2.6.7-mm4
- Includes dm-io, kcopyd, dm-snapshot, dm-mirror and dm-zero.
--- diff/CREDITS	2004-06-30 14:25:39.000000000 +0100
+++ source/CREDITS	2004-07-01 21:32:29.000000000 +0100
@@ -1060,6 +1060,12 @@
 N: Jeff Garzik
 E: jgarzik@pobox.com
 
+N: Kumar Gala
+E: kumar.gala@freescale.com
+D: Embedded PowerPC 6xx/7xx/74xx/82xx/85xx support
+S: Austin, Texas 78729
+S: USA
+
 N: Jacques Gelinas
 E: jacques@solucorp.qc.ca
 D: Author of the Umsdos file system
@@ -2267,8 +2273,8 @@
 N: Eberhard Moenkeberg
 E: emoenke@gwdg.de
 D: CDROM driver "sbpcd" (Matsushita/Panasonic/Soundblaster)
-S: Reinholdstrasse 14
-S: D-37083 Goettingen
+S: Ruhstrathoehe 2 b.
+S: D-37085 Goettingen
 S: Germany
 
 N: Thomas Molina
@@ -2527,6 +2533,7 @@
 E: mikpe@csd.uu.se
 W: http://www.csd.uu.se/~mikpe/
 D: Miscellaneous fixes
+D: Performance-monitoring counters driver
 
 N: Reed H. Petty
 E: rhp@draper.net
@@ -2571,6 +2578,14 @@
 D: sonypi, meye drivers, mct_u232 usb serial hacks
 S: Paris, France
 
+N: Matt Porter
+E: mporter@kernel.crashing.org
+D: Motorola PowerPC PReP support
+D: cPCI PowerPC support
+D: Embedded PowerPC 4xx/6xx/7xx/74xx support
+S: Chandler, Arizona 85249
+S: USA
+
 N: Frederic Potter 
 E: fpotter@cirpack.com
 D: Some PCI kernel support
@@ -3109,12 +3124,13 @@
 S: USA
 
 N: Marcelo W. Tosatti
-E: marcelo@conectiva.com.br
-W: http://bazar.conectiva.com.br/~marcelo/
-D: Miscellaneous kernel hacker (mostly VM/MM work)
-S: Conectiva S.A.
-S: R. Tocantins, 89 - Cristo Rei
-S: 80050-430 - Curitiba - Paraná
+E: marcelo.tosatti@cyclades.com
+D: Miscellaneous kernel hacker
+D: v2.4 kernel maintainer
+D: Current pc300/cyclades maintainer
+S: Cyclades Corporation
+S: Av Cristovao Colombo, 462. Floresta.
+S: Porto Alegre
 S: Brazil
 
 N: Stefan Traby
@@ -3597,6 +3613,14 @@
 D: EISA/sysfs subsystem
 S: France
 
+N: Luiz Fernando N. Capitulino
+E: lcapitulino@terra.com.br
+E: lcapitulino@prefeitura.sp.gov.br
+W: http://www.telecentros.sp.gov.br
+D: Little fixes and a lot of janitorial work
+S: E-GOV Telecentros SP
+S: Brazil
+
 # Don't add your name here, unless you really _are_ after Marc
 # alphabetically. Leonard used to be very proud of being the 
 # last entry, and he'll get positively pissed if he can't even
--- diff/Documentation/DMA-API.txt	2004-05-19 22:10:50.000000000 +0100
+++ source/Documentation/DMA-API.txt	2004-07-01 21:32:29.000000000 +0100
@@ -162,6 +162,20 @@
 
 Returns: 1 if successful and 0 if not
 
+u64
+dma_get_required_mask(struct device *dev)
+
+After setting the mask with dma_set_mask(), this API returns the
+actual mask (within that already set) that the platform actually
+requires to operate efficiently.  Usually this means the returned mask
+is the minimum required to cover all of memory.  Examining the
+required mask gives drivers with variable descriptor sizes the
+opportunity to use smaller descriptors as necessary.
+
+Requesting the required mask does not alter the current mask.  If you
+wish to take advantage of it, you should issue another dma_set_mask()
+call to lower the mask again.
+
 
 Part Id - Streaming DMA mappings
 --------------------------------
--- diff/Documentation/SubmittingDrivers	2004-06-30 14:25:39.000000000 +0100
+++ source/Documentation/SubmittingDrivers	2004-07-01 21:32:29.000000000 +0100
@@ -3,7 +3,8 @@
 
 This document is intended to explain how to submit device drivers to the
 various kernel trees. Note that if you are interested in video card drivers
-you should probably talk to XFree86 (http://www.xfree86.org) instead.
+you should probably talk to XFree86 (http://www.xfree86.org/) and/or X.Org
+(http://x.org/) instead.
 
 Also read the Documentation/SubmittingPatches document.
 
--- diff/Documentation/basic_profiling.txt	2004-05-19 22:10:50.000000000 +0100
+++ source/Documentation/basic_profiling.txt	2004-07-01 21:32:29.000000000 +0100
@@ -5,16 +5,19 @@
 
 <test> is the thing you're trying to measure.
 Make sure you have the correct System.map / vmlinux referenced!
-IMHO it's easier to use "make install" for linux and hack /sbin/installkernel
-to copy config files, system.map, vmlinux to /boot.
+
+It is probably easiest to use "make install" for linux and hack
+/sbin/installkernel to copy vmlinux to /boot, in addition to vmlinuz,
+config, System.map, which are usually installed by default.
 
 Readprofile
 -----------
-You need a fixed readprofile command for 2.5 ... either get hold of
-a current version from:
+A recent readprofile command is needed for 2.6, such as found in util-linux
+2.12a, which can be downloaded from:
+
 http://www.kernel.org/pub/linux/utils/util-linux/
-or get readprofile binary fixed for 2.5 / akpm's 2.5 patch from 
-ftp://ftp.kernel.org/pub/linux/kernel/people/mbligh/tools/readprofile/
+
+Most distributions will ship it already.
 
 Add "profile=2" to the kernel command line.
 
@@ -24,25 +27,26 @@
 
 Oprofile
 --------
-get source (I use 0.5) from http://oprofile.sourceforge.net/
-add "idle=poll" to the kernel command line 
+Get the source (I use 0.8) from http://oprofile.sourceforge.net/
+and add "idle=poll" to the kernel command line
 Configure with CONFIG_PROFILING=y and CONFIG_OPROFILE=y & reboot on new kernel
 ./configure --with-kernel-support
 make install
 
-One time setup (pick appropriate one for your CPU):
-P3		opcontrol --setup --vmlinux=/boot/vmlinux \
-		--ctr0-event=CPU_CLK_UNHALTED --ctr0-count=100000
-Athlon/x86-64	opcontrol --setup --vmlinux=/boot/vmlinux \
-		--ctr0-event=RETIRED_INSNS --ctr0-count=100000
-P4		opcontrol --setup --vmlinux=/boot/vmlinux \
-		--ctr0-event=GLOBAL_POWER_EVENTS \
-		--ctr0-unit-mask=1 --ctr0-count=100000
+For superior results, be sure to enable the local APIC. If opreport sees
+a 0Hz CPU, APIC was not on. Be aware that idle=poll may mean a performance
+penalty.
+
+One time setup:
+		opcontrol --setup --vmlinux=/boot/vmlinux
 
-start daemon	opcontrol --start-daemon
 clear		opcontrol --reset
 start		opcontrol --start
 		<test>
 stop		opcontrol --stop
-dump output	oprofpp -dl -i /boot/vmlinux  >  output_file
+dump output	opreport >  output_file
+
+To only report on the kernel, run opreport /boot/vmlinux > output_file
+
+A reset is needed to clear old statistics, which survive a reboot.
 
--- diff/Documentation/binfmt_misc.txt	2004-05-19 22:10:50.000000000 +0100
+++ source/Documentation/binfmt_misc.txt	2004-07-01 21:32:29.000000000 +0100
@@ -15,7 +15,7 @@
 	mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc 
 
 To actually register a new binary type, you have to set up a string looking like
-:name:type:offset:magic:mask:interpreter: (where you can choose the ':' upon
+:name:type:offset:magic:mask:interpreter:flags (where you can choose the ':' upon
 your needs) and echo it to /proc/sys/fs/binfmt_misc/register.
 Here is what the fields mean:
  - 'name' is an identifier string. A new /proc file will be created with this
@@ -34,6 +34,28 @@
    The mask is anded with the byte sequence of the file.
  - 'interpreter' is the program that should be invoked with the binary as first
    argument (specify the full path)
+ - 'flags' is an optional field that controls several aspects of the invocation
+   of the interpreter. It is a string of capital letters, each controls a certain
+   aspect. The following flags are supported -
+      'P' - preserve-argv[0].  Legacy behavior of binfmt_misc is to overwrite the
+            original argv[0] with the full path to the binary.  When this flag is
+            included, binfmt_misc will add an argument to the argument vector for
+            this purpose, thus preserving the original argv[0].
+      'O' - open-binary. Legacy behavior of binfmt_misc is to pass the full path
+            of the binary to the interpreter as an argument. When this flag is
+            included, binfmt_misc will open the file for reading and pass its
+            descriptor as an argument, instead of the full path, thus allowing
+            the interpreter to execute non-readable binaries. This feature should
+            be used with care - the interpreter has to be trusted not to emit
+            the contents of the non-readable binary.
+      'C' - credentials. Currently, the behavior of binfmt_misc is to calculate
+            the credentials and security token of the new process according to
+            the interpreter. When this flag is included, these attributes are
+            calculated according to the binary. It also implies the 'O' flag.
+            This feature should be used with care as the interpreter
+            will run with root permissions when a setuid binary owned by root
+            is run with binfmt_misc.
+
 
 There are some restrictions:
  - the whole register string may not exceed 255 characters
@@ -83,9 +105,9 @@
 write a wrapper script for it. See Documentation/java.txt for an
 example.
 
-Your interpreter should NOT look in the PATH for the filename; the
-kernel passes it the full filename to use.  Using the PATH can cause
-unexpected behaviour and be a security hazard.
+Your interpreter should NOT look in the PATH for the filename; the kernel
+passes it the full filename (or the file descriptor) to use.  Using $PATH can
+cause unexpected behaviour and can be a security hazard.
 
 
 There is a web page about binfmt_misc at
--- diff/Documentation/cachetlb.txt	2004-06-30 14:25:39.000000000 +0100
+++ source/Documentation/cachetlb.txt	2004-07-01 21:32:29.000000000 +0100
@@ -132,6 +132,17 @@
 	translations for software managed TLB configurations.
 	The sparc64 port currently does this.
 
+7) void tlb_migrate_finish(struct mm_struct *mm)
+
+	This interface is called at the end of an explicit
+	process migration. This interface provides a hook
+	to allow a platform to update TLB or context-specific
+	information for the address space.
+
+	The ia64 sn2 platform is one example of a platform
+	that uses this interface.
+
+
 Next, we have the cache flushing interfaces.  In general, when Linux
 is changing an existing virtual-->physical mapping to a new value,
 the sequence will be in one of the following forms:
--- diff/Documentation/devices.txt	2004-05-19 22:10:50.000000000 +0100
+++ source/Documentation/devices.txt	2004-07-01 21:32:29.000000000 +0100
@@ -434,6 +434,7 @@
 		225 = /dev/pps		Pulse Per Second driver
 		226 = /dev/systrace	Systrace device
 		227 = /dev/mcelog	X86_64 Machine Check Exception driver
+		228 = /dev/hpet		HPET driver
 		240-254			Reserved for local use
 		255			Reserved for MISC_DYNAMIC_MINOR
 
@@ -2377,16 +2378,16 @@
 		  1 = /dev/gpib1	Second GPIB bus
 		    ...
 
-160 block       Carmel 8-port SATA Disks on First Controller
-		  0 = /dev/carmel/0     SATA disk 0 whole disk
-		  1 = /dev/carmel/0p1   SATA disk 0 partition 1
+160 block       Promise SX8 8-port SATA Disks on First Controller
+		  0 = /dev/sx8/0     SATA disk 0 whole disk
+		  1 = /dev/sx8/0p1   SATA disk 0 partition 1
 		    ...
-		 31 = /dev/carmel/0p31  SATA disk 0 partition 31
+		 31 = /dev/sx8/0p31  SATA disk 0 partition 31
 
-		 32 = /dev/carmel/1     SATA disk 1 whole disk
-		 64 = /dev/carmel/2     SATA disk 2 whole disk
+		 32 = /dev/sx8/1     SATA disk 1 whole disk
+		 64 = /dev/sx8/2     SATA disk 2 whole disk
 		    ...
-		224 = /dev/carmel/7     SATA disk 7 whole disk
+		224 = /dev/sx8/7     SATA disk 7 whole disk
 
 		Partitions are handled in the same way as for IDE
 		disks (see major number 3) except that the limit on
@@ -2400,16 +2401,16 @@
 		 17 = /dev/irlpt1	Second IrLPT device
 		    ...
 
-161 block       Carmel 8-port SATA Disks on Second Controller
-		  0 = /dev/carmel/8     SATA disk 8 whole disk
-		  1 = /dev/carmel/8p1   SATA disk 8 partition 1
+161 block       Promise SX8 8-port SATA Disks on Second Controller
+		  0 = /dev/sx8/8     SATA disk 8 whole disk
+		  1 = /dev/sx8/8p1   SATA disk 8 partition 1
 		    ...
-		 31 = /dev/carmel/8p31  SATA disk 8 partition 31
+		 31 = /dev/sx8/8p31  SATA disk 8 partition 31
 
-		 32 = /dev/carmel/9     SATA disk 9 whole disk
-		 64 = /dev/carmel/10    SATA disk 10 whole disk
+		 32 = /dev/sx8/9     SATA disk 9 whole disk
+		 64 = /dev/sx8/10    SATA disk 10 whole disk
 		    ...
-		224 = /dev/carmel/15    SATA disk 15 whole disk
+		224 = /dev/sx8/15    SATA disk 15 whole disk
 
 		Partitions are handled in the same way as for IDE
 		disks (see major number 3) except that the limit on
@@ -2718,6 +2719,7 @@
 		 32 = /dev/ttyDB0		DataBooster serial port 0
 		    ...
 		 39 = /dev/ttyDB7		DataBooster serial port 7
+		 40 = /dev/ttySG0		SGI Altix console port
 
 205 char	Low-density serial ports (alternate device)
 		  0 = /dev/culu0		Callout device for ttyLU0
@@ -2742,6 +2744,7 @@
 		 32 = /dev/cudb0		Callout device for ttyDB0
 		    ...
 		 39 = /dev/cudb7		Callout device for ttyDB7
+		 40 = /dev/cusg0		Callout device for ttySG0
 
 206 char	OnStream SC-x0 tape devices
 		  0 = /dev/osst0		First OnStream SCSI tape, mode 0
--- diff/Documentation/filesystems/hpfs.txt	2004-05-19 22:10:51.000000000 +0100
+++ source/Documentation/filesystems/hpfs.txt	2004-07-01 21:32:29.000000000 +0100
@@ -1,5 +1,5 @@
-Read/Write HPFS 2.05
-1998-2001, Mikulas Patocka
+Read/Write HPFS 2.09
+1998-2004, Mikulas Patocka
 
 email: mikulas@artax.karlin.mff.cuni.cz
 homepage: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
@@ -283,6 +283,14 @@
 2.05 Fixed crash when got mount parameters without =
      Fixed crash when allocation of anode failed due to full disk
      Fixed some crashes when block io or inode allocation failed
+2.06 Fixed some crash on corrupted disk structures
+     Better allocation strategy
+     Reschedule points added so that it doesn't lock CPU long time
+     It should work in read-only mode on Warp Server
+2.07 More fixes for Warp Server. Now it really works
+2.08 Creating new files is not so slow on large disks
+     An attempt to sync deleted file does not generate filesystem error
+2.09 Fixed error on extremly fragmented files
 
 
  vim: set textwidth=80:
--- diff/Documentation/filesystems/proc.txt	2004-06-30 14:25:39.000000000 +0100
+++ source/Documentation/filesystems/proc.txt	2004-07-01 21:32:29.000000000 +0100
@@ -201,7 +201,7 @@
  devices     Available devices (block and character)           
  dma         Used DMS channels                                 
  filesystems Supported filesystems                             
- driver	     Various drivers grouped here, currently rtc	(2.4)
+ driver	     Various drivers grouped here, currently rtc (2.4)
  execdomains Execdomains, related to security			(2.4)
  fb	     Frame Buffer devices				(2.4)
  fs	     File system parameters, currently nfs/exports	(2.4)
@@ -1115,6 +1115,18 @@
 The files  in  this directory can be used to tune the operation of the virtual
 memory (VM)  subsystem  of  the  Linux  kernel.
 
+vfs_cache_pressure
+------------------
+
+Controls the tendency of the kernel to reclaim the memory which is used for
+caching of directory and inode objects.
+
+At the default value of vfs_cache_pressure=100 the kernel will attempt to
+reclaim dentries and inodes at a "fair" rate with respect to pagecache and
+swapcache reclaim.  Decreasing vfs_cache_pressure causes the kernel to prefer
+to retain dentry and inode caches.  Increasing vfs_cache_pressure beyond 100
+causes the kernel to prefer to reclaim dentries and inodes.
+
 dirty_background_ratio
 ----------------------
 
@@ -1640,7 +1652,8 @@
 
 Writing to this file results in a flush of the routing cache.
 
-gc_elastic, gc_interval, gc_min_interval, gc_tresh, gc_timeout
+gc_elasticity, gc_interval, gc_min_interval, gc_tresh, gc_timeout,
+gc_thresh, gc_thresh1, gc_thresh2, gc_thresh3
 --------------------------------------------------------------
 
 Values to  control  the  frequency  and  behavior  of  the  garbage collection
--- diff/Documentation/i386/zero-page.txt	2004-05-19 22:10:51.000000000 +0100
+++ source/Documentation/i386/zero-page.txt	2004-07-01 21:32:29.000000000 +0100
@@ -38,6 +38,7 @@
 0x1e0	unsigned long	ALT_MEM_K, alternative mem check, in Kb
 0x1e8	char		number of entries in E820MAP (below)
 0x1e9	unsigned char	number of entries in EDDBUF (below)
+0x1ea	unsigned char	number of entries in EDD_MBR_SIG_BUFFER (below)
 0x1f1	char		size of setup.S, number of sectors
 0x1f2	unsigned short	MOUNT_ROOT_RDONLY (if !=0)
 0x1f4	unsigned short	size of compressed kernel-part in the
@@ -72,7 +73,7 @@
 0x21c	unsigned long	INITRD_SIZE, size in bytes of ramdisk image
 0x220	4 bytes		(setup.S)
 0x224	unsigned short	setup.S heap end pointer
-0x2cc	4 bytes		DISK80_SIG_BUFFER (setup.S)
+0x290 - 0x2cf		EDD_MBR_SIG_BUFFER (edd.S)
 0x2d0 - 0x600		E820MAP
-0x600 - 0x7ff		EDDBUF (setup.S) for disk signature read sector
-0x600 - 0x7eb		EDDBUF (setup.S) for edd data
+0x600 - 0x7ff		EDDBUF (edd.S) for disk signature read sector
+0x600 - 0x7eb		EDDBUF (edd.S) for edd data
--- diff/Documentation/input/joystick-parport.txt	2004-05-19 22:10:51.000000000 +0100
+++ source/Documentation/input/joystick-parport.txt	2004-07-01 21:32:29.000000000 +0100
@@ -335,6 +335,7 @@
  * Analog PSX Pad (red mode)
  * Analog PSX Pad (green mode)
  * PSX Rumble Pad
+ * PSX DDR Pad
 
 2.4 Sega
 ~~~~~~~~
@@ -452,14 +453,22 @@
 	  5  | Multisystem 2-button joystick
 	  6  | N64 pad
 	  7  | Sony PSX controller
+	  8  | Sony PSX DDR controller
 
-  The exact type of the PSX controller type is autoprobed, so you must have
-your controller plugged in before initializing.
+  The exact type of the PSX controller type is autoprobed when used so
+hot swapping should work (but is not recomended).
 
   Should you want to use more than one of parallel ports at once, you can use
 gamecon.map2 and gamecon.map3 as additional command line parameters for two
 more parallel ports.
 
+  There are two options specific to PSX driver portion.  gamecon.psx_delay sets
+the command delay when talking to the controllers. The default of 25 should
+work but you can try lowering it for better performace. If your pads don't
+respond try raising it untill they work. Setting the type to 8 allows the
+driver to be used with Dance Dance Revolution or similar games. Arrow keys are
+registered as key presses instead of X and Y axes.
+
 3.2 db9.c
 ~~~~~~~~~
   Apart from making an interface, there is nothing difficult on using the
--- diff/Documentation/ioctl-number.txt	2004-05-19 22:10:50.000000000 +0100
+++ source/Documentation/ioctl-number.txt	2004-07-01 21:32:29.000000000 +0100
@@ -189,3 +189,5 @@
 					<mailto:michael.klein@puffin.lb.shuttle.de>
 0xDD	00-3F	ZFCP device driver	see drivers/s390/scsi/
 					<mailto:aherrman@de.ibm.com>
+0xF3	00-3F	video/sisfb.h		sisfb (in development)
+					<mailto:thomas@winischhofer.net>
--- diff/Documentation/kernel-parameters.txt	2004-06-30 14:25:39.000000000 +0100
+++ source/Documentation/kernel-parameters.txt	2004-07-01 21:32:29.000000000 +0100
@@ -652,6 +652,12 @@
 
 	mga=		[HW,DRM]
 
+	mousedev.tap_time=
+			[MOUSE] Maximum time between finger touching and
+			leaving touchpad surface for touch to be considered
+			a tap and be reported as a left button click (for
+			touchpads working in absolute mode only).
+			Format: <msecs>
 	mousedev.xres=	[MOUSE] Horizontal screen resolution, used for devices
 			reporting absolute coordinates, such as tablets
 	mousedev.yres=	[MOUSE] Vertical screen resolution, used for devices
--- diff/Documentation/laptop-mode.txt	2004-06-30 14:25:39.000000000 +0100
+++ source/Documentation/laptop-mode.txt	2004-07-01 21:32:29.000000000 +0100
@@ -28,8 +28,9 @@
 The short story
 ---------------
 
-If you just want to use it, run the laptop_mode control script (which is included
-at the end of this document) as follows:
+To use laptop mode, you don't need to set any kernel configuration options
+or anything. You simply need to run the laptop_mode control script (which
+is included in this document) as follows:
 
 # laptop_mode start
 
@@ -78,12 +79,13 @@
 The details
 -----------
 
-Laptop-mode is controlled by the flag /proc/sys/vm/laptop_mode. When this
-flag is set, any physical disk read operation (that might have caused the
-hard disk to spin up) causes Linux to flush all dirty blocks. The result
-of this is that after a disk has spun down, it will not be spun up anymore
-to write dirty blocks, because those blocks had already been written
-immediately after the most recent read operation
+Laptop-mode is controlled by the flag /proc/sys/vm/laptop_mode. This flag is
+present for all kernels that have the laptop mode patch, regardless of any
+configuration options. When the flag is set, any physical disk read operation
+(that might have caused the hard disk to spin up) causes Linux to flush all dirty
+blocks. The result of this is that after a disk has spun down, it will not be spun
+up anymore to write dirty blocks, because those blocks had already been written
+immediately after the most recent read operation.
 
 To increase the effectiveness of the laptop_mode strategy, the laptop_mode
 control script increases dirty_expire_centisecs and dirty_writeback_centisecs in
@@ -163,7 +165,7 @@
 Please note that this control script works for the Linux 2.4 and 2.6 series.
 
 --------------------CONTROL SCRIPT BEGIN------------------------------------------
-#! /bin/sh
+#!/bin/bash
 
 # start or stop laptop_mode, best run by a power management daemon when
 # ac gets connected/disconnected from a laptop
@@ -174,22 +176,91 @@
 #				 Bart Samwel
 #				 Micha Feigin
 #				 Andrew Morton
+#				 Herve Eychenne
 #				 Dax Kelson
 #
 # Original Linux 2.4 version by: Jens Axboe
 
+#############################################################################
+
+# Age time, in seconds. should be put into a sysconfig file
+MAX_AGE=600
+
+# Read-ahead, in kilobytes
+READAHEAD=4096
+
+# Shall we remount journaled fs. with appropiate commit interval? (1=yes)
+DO_REMOUNTS=1
+
+# And shall we add the "noatime" option to that as well? (1=yes)
+DO_REMOUNT_NOATIME=1
+
+# Dirty synchronous ratio.  At this percentage of dirty pages the process which
+# calls write() does its own writeback
+DIRTY_RATIO=40
+
+#
+# Allowed dirty background ratio, in percent.  Once DIRTY_RATIO has been
+# exceeded, the kernel will wake pdflush which will then reduce the amount
+# of dirty memory to dirty_background_ratio.  Set this nice and low, so once
+# some writeout has commenced, we do a lot of it.
+#
+DIRTY_BACKGROUND_RATIO=5
+
+# kernel default dirty buffer age
+DEF_AGE=30
+DEF_UPDATE=5
+DEF_DIRTY_BACKGROUND_RATIO=10
+DEF_DIRTY_RATIO=40
+DEF_XFS_AGE_BUFFER=15
+DEF_XFS_SYNC_INTERVAL=30
+DEF_XFS_BUFD_INTERVAL=1
+
+# This must be adjusted manually to the value of HZ in the running kernel
+# on 2.4, until the XFS people change their 2.4 external interfaces to work in
+# centisecs. This can be automated, but it's a work in progress that still needs
+# some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for external
+# interfaces, and that is currently always set to 100. So you don't need to
+# change this on 2.6.
+XFS_HZ=100
+
+#############################################################################
+
+KLEVEL="$(uname -r |
+             {
+	       IFS='.' read a b c
+	       echo $a.$b
+	     }
+)"
+case "$KLEVEL" in
+	"2.4"|"2.6")
+		;;
+	*)
+		echo "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
+		exit 1
+		;;
+esac
+
+if [ ! -e /proc/sys/vm/laptop_mode ] ; then
+	echo "Kernel is not patched with laptop_mode patch." >&2
+	exit 1
+fi
+
+if [ ! -w /proc/sys/vm/laptop_mode ] ; then
+	echo "You do not have enough privileges to enable laptop_mode." >&2
+	exit 1
+fi
+
 # Remove an option (the first parameter) of the form option=<number> from
 # a mount options string (the rest of the parameters).
 parse_mount_opts () {
 	OPT="$1"
 	shift
-	echo "$*"			| \
-	sed 's/.*/,&,/'			| \
-	sed 's/,'"$OPT"'=[0-9]*,/,/g'	| \
-	sed 's/,,*/,/g'			| \
-	sed 's/^,//'			| \
-	sed 's/,$//'			| \
-	cat -
+	echo ",$*," | sed		\
+	 -e 's/,'"$OPT"'=[0-9]*,/,/g'	\
+	 -e 's/,,*/,/g'			\
+	 -e 's/^,//'			\
+	 -e 's/,$//'
 }
 
 # Remove an option (the first parameter) without any arguments from
@@ -197,13 +268,11 @@
 parse_nonumber_mount_opts () {
 	OPT="$1"
 	shift
-	echo "$*" 			| \
-	sed 's/.*/,&,/'			| \
-	sed 's/,'"$OPT"',/,/g'		| \
-	sed 's/,,*/,/g'			| \
-	sed 's/^,//'			| \
-	sed 's/,$//'			| \
-	cat -
+	echo ",$*," | sed		\
+	 -e 's/,'"$OPT"',/,/g'		\
+	 -e 's/,,*/,/g'			\
+	 -e 's/^,//'			\
+	 -e 's/,$//'
 }
 
 # Find out the state of a yes/no option (e.g. "atime"/"noatime") in
@@ -218,28 +287,26 @@
 # If fstab contains, say, "rw" for this filesystem, then the result
 # will be "defaults,atime".
 parse_yesno_opts_wfstab () {
-	L_DEV=$1
-	shift
-	OPT=$1
-	shift
-	DEF_OPT=$1
-	shift
+	L_DEV="$1"
+	OPT="$2"
+	DEF_OPT="$3"
+	shift 3
 	L_OPTS="$*"
 	PARSEDOPTS1="$(parse_nonumber_mount_opts $OPT $L_OPTS)"
 	PARSEDOPTS1="$(parse_nonumber_mount_opts no$OPT $PARSEDOPTS1)"
 	# Watch for a default atime in fstab
-	FSTAB_OPTS="$(cat /etc/fstab | sed 's/  / /g' | grep ^\ *"$L_DEV " | awk '{ print $4 }')"
-	if [ -z "$(echo "$FSTAB_OPTS" | grep "$OPT")" ] ; then
-		# option not specified in fstab -- choose the default.
-		echo "$PARSEDOPTS1,$DEF_OPT"
-	else
+	FSTAB_OPTS="$(awk '$1 == "'$L_DEV'" { print $4 }' /etc/fstab)"
+	if echo "$FSTAB_OPTS" | grep "$OPT" > /dev/null ; then
 		# option specified in fstab: extract the value and use it
-		if [ -z "$(echo "$FSTAB_OPTS" | grep "no$OPT")" ] ; then
+		if echo "$FSTAB_OPTS" | grep "no$OPT" > /dev/null ; then
+			echo "$PARSEDOPTS1,no$OPT"
+		else
 			# no$OPT not found -- so we must have $OPT.
 			echo "$PARSEDOPTS1,$OPT"
-		else
-			echo "$PARSEDOPTS1,no$OPT"
 		fi
+	else
+		# option not specified in fstab -- choose the default.
+		echo "$PARSEDOPTS1,$DEF_OPT"
 	fi
 }
 
@@ -256,97 +323,27 @@
 # If fstab contains, say, "commit=3,rw" for this filesystem, then the
 # result will be "rw,commit=3".
 parse_mount_opts_wfstab () {
-	L_DEV=$1
-	shift
-	OPT=$1
-	shift
+	L_DEV="$1"
+	OPT="$2"
+	shift 2
 	L_OPTS="$*"
-
 	PARSEDOPTS1="$(parse_mount_opts $OPT $L_OPTS)"
 	# Watch for a default commit in fstab
-	FSTAB_OPTS="$(cat /etc/fstab | sed 's/	/ /g' | grep ^\ *"$L_DEV " | awk '{ print $4 }')"
-	if [ -z "$(echo "$FSTAB_OPTS" | grep "$OPT=")" ] ; then
-		# option not specified in fstab: set it to 0
-		echo "$PARSEDOPTS1,$OPT=0"
-	else
+	FSTAB_OPTS="$(awk '$1 == "'$L_DEV'" { print $4 }' /etc/fstab)"
+	if echo "$FSTAB_OPTS" | grep "$OPT=" > /dev/null ; then
 		# option specified in fstab: extract the value, and use it
 		echo -n "$PARSEDOPTS1,$OPT="
-		echo "$FSTAB_OPTS"	| \
-		sed 's/.*/,&,/'		| \
-		sed 's/.*,'"$OPT"'=//'	| \
-		sed 's/,.*//'		| \
-		cat -
+		echo ",$FSTAB_OPTS," | sed \
+		 -e 's/.*,'"$OPT"'=//'	\
+		 -e 's/,.*//'
+	else
+		# option not specified in fstab: set it to 0
+		echo "$PARSEDOPTS1,$OPT=0"
 	fi
 }
 
-KLEVEL=$(
-           uname -r |
-             (
-	       IFS="." read a b c
-	       echo $a.$b
-	     )
-	 )
-case "$KLEVEL" in
-	"2.4"|"2.6")
-		true
-		;;
-	*)
-		echo "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')"
-		exit 1
-		;;
-esac
-
-# Shall we remount journaled fs. with appropiate commit interval? (1=yes)
-DO_REMOUNTS=1
-
-# And shall we add the "noatime" option to that as well? (1=yes)
-DO_REMOUNT_NOATIME=1
-
-# age time, in seconds. should be put into a sysconfig file
-MAX_AGE=600
-
-# Dirty synchronous ratio.  At this percentage of dirty pages the process which
-# calls write() does its own writeback
-DIRTY_RATIO=40
-
-#
-# Allowed dirty background ratio, in percent.  Once DIRTY_RATIO has been
-# exceeded, the kernel will wake pdflush which will then reduce the amount
-# of dirty memory to dirty_background_ratio.  Set this nice and low, so once
-# some writeout has commenced, we do a lot of it.
-#
-DIRTY_BACKGROUND_RATIO=5
-
-READAHEAD=4096		# kilobytes
 
-# kernel default dirty buffer age
-DEF_AGE=30
-DEF_UPDATE=5
-DEF_DIRTY_BACKGROUND_RATIO=10
-DEF_DIRTY_RATIO=40
-DEF_XFS_AGE_BUFFER=15
-DEF_XFS_SYNC_INTERVAL=30
-DEF_XFS_BUFD_INTERVAL=1
-
-# This must be adjusted manually to the value of HZ in the running kernel
-# on 2.4, until the XFS people change their 2.4 external interfaces to work in
-# centisecs. This can be automated, but it's a work in progress that still needs
-# some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for external
-# interfaces, and that is currently always set to 100. So you don't need to
-# change this on 2.6.
-XFS_HZ=100
-
-if [ ! -e /proc/sys/vm/laptop_mode ]; then
-	echo "Kernel is not patched with laptop_mode patch."
-	exit 1
-fi
-
-if [ ! -w /proc/sys/vm/laptop_mode ]; then
-	echo "You do not have enough privileges to enable laptop_mode."
-	exit 1
-fi
-
-if [ $DO_REMOUNT_NOATIME -eq 1 ]; then
+if [ $DO_REMOUNT_NOATIME -eq 1 ] ; then
 	NOATIME_OPT=",noatime"
 fi
 
@@ -384,11 +381,11 @@
 
 		case "$KLEVEL" in
 			"2.4")
-				echo "1"				> /proc/sys/vm/laptop_mode
+				echo 1					> /proc/sys/vm/laptop_mode
 				echo "30 500 0 0 $AGE $AGE 60 20 0"	> /proc/sys/vm/bdflush
 				;;
 			"2.6")
-				echo "5"				> /proc/sys/vm/laptop_mode
+				echo 5					> /proc/sys/vm/laptop_mode
 				echo "$AGE"				> /proc/sys/vm/dirty_writeback_centisecs
 				echo "$AGE"				> /proc/sys/vm/dirty_expire_centisecs
 				echo "$DIRTY_RATIO"			> /proc/sys/vm/dirty_ratio
@@ -418,16 +415,16 @@
 		U_AGE=$((100*$DEF_UPDATE))
 		B_AGE=$((100*$DEF_AGE))
 		echo -n "Stopping laptop_mode"
-		echo "0" > /proc/sys/vm/laptop_mode
-		if [ -f /proc/sys/fs/xfs/age_buffer ] && [ ! -f /proc/sys/fs/xfs/lm_age_buffer ] ; then
+		echo 0 > /proc/sys/vm/laptop_mode
+		if [ -f /proc/sys/fs/xfs/age_buffer -a ! -f /proc/sys/fs/xfs/lm_age_buffer ] ; then
 			# These need to be restored, if there are no lm_*.
-			echo "$(($XFS_HZ*$DEF_XFS_AGE_BUFFER))" 	> /proc/sys/fs/xfs/age_buffer
-			echo "$(($XFS_HZ*$DEF_XFS_SYNC_INTERVAL))" 	> /proc/sys/fs/xfs/sync_interval
+			echo $(($XFS_HZ*$DEF_XFS_AGE_BUFFER))	 	> /proc/sys/fs/xfs/age_buffer
+			echo $(($XFS_HZ*$DEF_XFS_SYNC_INTERVAL)) 	> /proc/sys/fs/xfs/sync_interval
 		elif [ -f /proc/sys/fs/xfs/age_buffer_centisecs ] ; then
 			# These need to be restored as well.
-			echo "$((100*$DEF_XFS_AGE_BUFFER))" > /proc/sys/fs/xfs/age_buffer_centisecs
-			echo "$((100*$DEF_XFS_SYNC_INTERVAL))" > /proc/sys/fs/xfs/xfssyncd_centisecs
-			echo "$((100*$DEF_XFS_BUFD_INTERVAL))" > /proc/sys/fs/xfs/xfsbufd_centisecs
+			echo $((100*$DEF_XFS_AGE_BUFFER))	> /proc/sys/fs/xfs/age_buffer_centisecs
+			echo $((100*$DEF_XFS_SYNC_INTERVAL))	> /proc/sys/fs/xfs/xfssyncd_centisecs
+			echo $((100*$DEF_XFS_BUFD_INTERVAL))	> /proc/sys/fs/xfs/xfsbufd_centisecs
 		fi
 		case "$KLEVEL" in
 			"2.4")
@@ -440,7 +437,7 @@
 				echo "$DEF_DIRTY_BACKGROUND_RATIO"	> /proc/sys/vm/dirty_background_ratio
 				;;
 		esac
-		if [ $DO_REMOUNTS -eq 1 ]; then
+		if [ $DO_REMOUNTS -eq 1 ] ; then
 			cat /etc/mtab | while read DEV MP FST OPTS DUMP PASS ; do
 				# Reset commit and atime options to defaults.
 				case "$FST" in
@@ -462,13 +459,13 @@
 		echo "."
 		;;
 	*)
-		echo "Usage: $0 {start|stop}"
+		echo "Usage: $0 {start|stop}" 2>&1
+		exit 1
 		;;
 
 esac
 
 exit 0
-
 --------------------CONTROL SCRIPT END--------------------------------------------
 
 
--- diff/Documentation/networking/00-INDEX	2004-05-19 22:10:52.000000000 +0100
+++ source/Documentation/networking/00-INDEX	2004-07-01 21:32:29.000000000 +0100
@@ -4,8 +4,6 @@
 	- information on the 3Com EtherLink Plus (3c505) driver.
 6pack.txt
 	- info on the 6pack protocol, an alternative to KISS for AX.25
-8139too.txt
-	- info on the 8139too driver for RTL-8139 based network cards.
 Configurable
 	- info on some of the configurable network parameters
 DLINK.txt
--- diff/Documentation/networking/ip-sysctl.txt	2004-06-30 14:25:40.000000000 +0100
+++ source/Documentation/networking/ip-sysctl.txt	2004-07-01 21:32:29.000000000 +0100
@@ -17,6 +17,16 @@
 	Disable Path MTU Discovery.
 	default FALSE
 
+min_pmtu - INTEGER
+	default 562 - minimum discovered Path MTU
+
+mtu_expires - INTEGER
+	Time, in seconds, that cached PMTU information is kept.
+
+min_adv_mss - INTEGER
+	The advertised MSS depends on the first hop route MTU, but will
+	never be lower than this setting.
+
 IP Fragmentation:
 
 ipfrag_high_thresh - INTEGER
@@ -345,6 +355,20 @@
 	conections.
 	Default: 7
 
+
+tcp_frto - BOOLEAN
+	Enables F-RTO, an enhanced recovery algorithm for TCP retransmission
+	timeouts.  It is particularly beneficial in wireless environments
+	where packet loss is typically due to random radio interference
+	rather than intermediate router congestion.
+
+somaxconn - INTEGER
+	Limit of socket listen() backlog, known in userspace as SOMAXCONN.
+	Defaults to 128.  See also tcp_max_syn_backlog for additional tuning
+	for TCP sockets.
+
+IP Variables:
+
 ip_local_port_range - 2 INTEGERS
 	Defines the local port range that is used by TCP and UDP to
 	choose the local port. The first number is the first, the 
@@ -586,6 +610,19 @@
 	The max value from conf/{all,interface}/arp_ignore is used
 	when ARP request is received on the {interface}
 
+app_solicit - INTEGER
+	The maximum number of probes to send to the user space ARP daemon
+	via netlink before dropping back to multicast probes (see
+	mcast_solicit).  Defaults to 0.
+
+disable_policy - BOOLEAN
+	Disable IPSEC policy (SPD) for this interface
+
+disable_xfrm - BOOLEAN
+	Disable IPSEC encryption on this interface, whatever the policy
+
+
+
 tag - INTEGER
 	Allows you to write a number, which can be used as required.
 	Default value is 0.
@@ -678,9 +715,11 @@
 			    disabled if local forwarding is enabled.
 
 autoconf - BOOLEAN
-	Configure link-local addresses using L2 hardware addresses.
+	Autoconfigure addresses using Prefix Information in Router 
+	Advertisements.
 
-	Default: TRUE
+	Functional default: enabled if accept_ra is enabled.
+			    disabled if accept_ra is disabled.
 
 dad_transmits - INTEGER
 	The amount of Duplicate Address Detection probes to send.
@@ -804,4 +843,25 @@
 	Default: 1
 
 
+UNDOCUMENTED:
+
+dev_weight FIXME
+discovery_slots FIXME
+discovery_timeout FIXME
+fast_poll_increase FIXME
+ip6_queue_maxlen FIXME
+lap_keepalive_time FIXME
+lo_cong FIXME
+max_baud_rate FIXME
+max_dgram_qlen FIXME
+max_noreply_time FIXME
+max_tx_data_size FIXME
+max_tx_window FIXME
+min_tx_turn_time FIXME
+mod_cong FIXME
+no_cong FIXME
+no_cong_thresh FIXME
+slot_timeout FIXME
+warn_noreply_time FIXME
+
 $Id: ip-sysctl.txt,v 1.20 2001/12/13 09:00:18 davem Exp $
--- diff/Documentation/networking/pktgen.txt	2004-05-19 22:10:52.000000000 +0100
+++ source/Documentation/networking/pktgen.txt	2004-07-01 21:32:29.000000000 +0100
@@ -11,13 +11,13 @@
 5. After this two commands are defined:
    A. "pg" to start generator and to get results.
    B. "pgset" to change generator parameters. F.e.
-      pgset "clone_skb 100"   sets the number of coppies of the same packet 
+      pgset "clone_skb 100"   sets the number of copies of the same packet 
                               will be sent before a new packet is allocated
       pgset "clone_skb 0"     use multiple SKBs for packet generation
       pgset "pkt_size 9014"   sets packet size to 9014
       pgset "frags 5"         packet will consist of 5 fragments
       pgset "count 200000"    sets number of packets to send, set to zero
-                              for continious sends untill explicitly
+                              for continuous sends until explicitly
                               stopped.
       pgset "ipg 5000"        sets artificial gap inserted between packets
                               to 5000 nanoseconds
--- diff/Documentation/pci.txt	2004-05-19 22:10:50.000000000 +0100
+++ source/Documentation/pci.txt	2004-07-01 21:32:29.000000000 +0100
@@ -166,8 +166,9 @@
 ~~~~~~~~~~~~~~~~~~~
    Before you do anything with the device you've found, you need to enable
 it by calling pci_enable_device() which enables I/O and memory regions of
-the device, assigns missing resources if needed and wakes up the device
-if it was in suspended state. Please note that this function can fail.
+the device, allocates an IRQ if necessary, assigns missing resources if
+needed and wakes up the device if it was in suspended state. Please note
+that this function can fail.
 
    If you want to use the device in bus mastering mode, call pci_set_master()
 which enables the bus master bit in PCI_COMMAND register and also fixes
--- diff/Documentation/power/pci.txt	2004-05-19 22:10:52.000000000 +0100
+++ source/Documentation/power/pci.txt	2004-07-01 21:32:29.000000000 +0100
@@ -286,11 +286,11 @@
 +------------------+
 |  Bit  |  State   |
 +------------------+
-|  15   |   D0     |
-|  14   |   D1     |
+|  11   |   D0     |
+|  12   |   D1     |
 |  13   |   D2     |
-|  12   |   D3hot  |
-|  11   |   D3cold |
+|  14   |   D3hot  |
+|  15   |   D3cold |
 +------------------+
 
 A device can use this to enable wake events:
--- diff/Documentation/power/swsusp.txt	2004-06-30 14:25:40.000000000 +0100
+++ source/Documentation/power/swsusp.txt	2004-07-01 21:32:29.000000000 +0100
@@ -12,6 +12,9 @@
  *				...you'd better find out how to get along
  *				   without your data.
  *
+ * If you change kernel command line between suspend and resume...
+ *			        ...prepare for nasty fsck or worse.
+ *
  * (*) pm interface support is needed to make it safe.
 
 You need to append resume=/dev/your_swap_partition to kernel command
--- diff/Documentation/power/video.txt	2004-06-30 14:25:40.000000000 +0100
+++ source/Documentation/power/video.txt	2004-07-01 21:32:29.000000000 +0100
@@ -30,10 +30,6 @@
   patched X, and plain text console (no vesafb or radeonfb), see
   http://www.doesi.gmxhome.de/linux/tm800s3/s3.html. (Acer TM 800)
 
-* radeon systems, where X can soft-boot your video card. You'll need
-  patched X, and plain text console (no vesafb or radeonfb), see
-  http://www.doesi.gmxhome.de/linux/tm800s3/s3.html. (Acer TM 800)
-
 Now, if you pass acpi_sleep=something, and it does not work with your
 bios, you'll get hard crash during resume. Be carefull.
 
--- diff/Documentation/scsi/scsi_mid_low_api.txt	2004-05-19 22:10:52.000000000 +0100
+++ source/Documentation/scsi/scsi_mid_low_api.txt	2004-07-01 21:32:29.000000000 +0100
@@ -827,6 +827,7 @@
 Summary:
    bios_param - fetch head, sector, cylinder info for a disk
    detect - detects HBAs this driver wants to control
+   eh_timed_out - notify the host that a command timer expired
    eh_abort_handler - abort given command
    eh_bus_reset_handler - issue SCSI bus reset
    eh_device_reset_handler - issue SCSI device reset
@@ -895,6 +896,32 @@
 
 
 /**
+ *      eh_timed_out - The timer for the command has just fired
+ *      @scp: identifies command timing out
+ *
+ *      Returns:
+ *
+ *	EH_HANDLED:		I fixed the error, please complete the command
+ *	EH_RESET_TIMER:		I need more time, reset the timer and
+ *				begin counting again
+ *	EH_NOT_HANDLED		Begin normal error recovery
+
+ *
+ *      Locks: None held
+ *
+ *      Calling context: interrupt
+ *
+ *	Notes: This is to give the LLD an opportunity to do local recovery.
+ *	This recovery is limited to determining if the outstanding command
+ *	will ever complete.  You may not abort and restart the command from
+ *	this callback.
+ *
+ *      Optionally defined in: LLD
+ **/
+     int eh_timed_out(struct scsi_cmnd * scp)
+
+
+/**
  *      eh_abort_handler - abort command associated with scp
  *      @scp: identifies command to be aborted
  *
--- diff/Documentation/sh/new-machine.txt	2004-05-19 22:10:52.000000000 +0100
+++ source/Documentation/sh/new-machine.txt	2004-07-01 21:32:29.000000000 +0100
@@ -188,13 +188,7 @@
  - add a new file include/asm-sh/vapor/io.h which contains prototypes for
    any machine specific IO functions prefixed with the machine name, for
    example vapor_inb. These will be needed when filling out the machine
-   vector. In addition, a section is required which defines what to do when
-   building a machine specific version. For example:
-
-     #ifdef __WANT_IO_DEF
-     #define inb  vapor_inb
-     ...
-     #endif
+   vector.
 
    This is the minimum that is required, however there are ample
    opportunities to optimise this. In particular, by making the prototypes
--- diff/Documentation/sound/alsa/ALSA-Configuration.txt	2004-06-30 14:25:40.000000000 +0100
+++ source/Documentation/sound/alsa/ALSA-Configuration.txt	2004-07-01 21:32:29.000000000 +0100
@@ -516,6 +516,13 @@
 
     Module for ForteMedia FM801 based PCI soundcards.
 
+    tea575x_tuner       - Enable TEA575x tuner
+                          - 1 = MediaForte 256-PCS
+                          - 2 = MediaForte 256-PCPR
+                          - 3 = MediaForte 64-PCR  
+                          - High 16-bits are video (radio) device number + 1
+                          - example: 0x10002 (MediaForte 256-PCPR, device 1)
+
     Module supports up to 8 cards and autoprobe.
     
   Module snd-gusclassic
@@ -613,7 +620,7 @@
     model       - Use the given board model, one of the following:
 		  delta1010, dio2496, delta66, delta44, audiophile, delta410,
 		  delta1010lt, vx442, ewx2496, ews88mt, ews88mt_new, ews88d,
-		  dmx6fire, dsp24, dsp24_71, ez8
+		  dmx6fire, dsp24, dsp24_value, dsp24_71, ez8
     omni	- Omni I/O support for MidiMan M-Audio Delta44/66
     cs8427_timeout - reset timeout for the CS8427 chip (S/PDIF transciever)
                      in msec resolution, default value is 500 (0.5 sec)
@@ -631,7 +638,8 @@
 			* TerraTec Aureon Sky-5.1, Space-7.1
 
     model       - Use the given board model, one of the following:
-		  revo71, amp2000, prodigy71, aureon51, aureon71
+		  revo71, amp2000, prodigy71, aureon51, aureon71,
+		  k8x800
 
     Module supports up to 8 cards and autoprobe.
 
--- diff/Documentation/sysctl/vm.txt	2004-05-19 22:10:53.000000000 +0100
+++ source/Documentation/sysctl/vm.txt	2004-07-01 21:32:29.000000000 +0100
@@ -28,7 +28,7 @@
 ==============================================================
 
 dirty_ratio, dirty_background_ratio, dirty_expire_centisecs,
-dirty_writeback_centisecs:
+dirty_writeback_centisecs, vfs_cache_pressure:
 
 See Documentation/filesystems/proc.txt
 
--- diff/Documentation/usb/philips.txt	2004-05-19 22:10:53.000000000 +0100
+++ source/Documentation/usb/philips.txt	2004-07-01 21:32:29.000000000 +0100
@@ -1,13 +1,40 @@
-This file contains some additional information for the Philips webcams.
-E-mail: webcam@smcc.demon.nl                        Last updated: 2001-09-24
-
-The main webpage for the Philips driver is http://www.smcc.demon.nl/webcam/.
-It contains a lot of extra information, a FAQ, and the binary plugin
-'PWCX'. This plugin contains decompression routines that allow you to
-use higher image sizes and framerates; in addition the webcam uses less
-bandwidth on the USB bus (handy if you want to run more than 1 camera
-simultaneously). These routines fall under an NDA, and may therefor not be
-distributed as source; however, its use is completely optional.
+This file contains some additional information for the Philips and OEM webcams.
+E-mail: webcam@smcc.demon.nl                        Last updated: 2004-01-19
+Site: http://www.smcc.demon.nl/webcam/
+
+As of this moment, the following cameras are supported:
+ * Philips PCA645
+ * Philips PCA646
+ * Philips PCVC675
+ * Philips PCVC680
+ * Philips PCVC690
+ * Philips PCVC720/40
+ * Philips PCVC730
+ * Philips PCVC740
+ * Philips PCVC750
+ * Askey VC010
+ * Creative Labs Webcam 5
+ * Creative Labs Webcam Pro Ex
+ * Logitech QuickCam 3000 Pro
+ * Logitech QuickCam 4000 Pro
+ * Logitech QuickCam Notebook Pro
+ * Logitech QuickCam Zoom
+ * Logitech QuickCam Orbit
+ * Logitech QuickCam Sphere
+ * Samsung MPC-C10
+ * Samsung MPC-C30
+ * Sotec Afina Eye
+ * AME CU-001
+ * Visionite VCS-UM100
+ * Visionite VCS-UC300
+
+The main webpage for the Philips driver is at the address above. It contains
+a lot of extra information, a FAQ, and the binary plugin 'PWCX'. This plugin
+contains decompression routines that allow you to use higher image sizes and
+framerates; in addition the webcam uses less bandwidth on the USB bus (handy
+if you want to run more than 1 camera simultaneously). These routines fall
+under a NDA, and may therefor not be distributed as source; however, its use
+is completely optional.
 
 You can build this code either into your kernel, or as a module. I recommend
 the latter, since it makes troubleshooting a lot easier. The built-in
@@ -27,14 +54,14 @@
    Specifies the desired framerate. Is an integer in the range of 4-30.
 
 fbufs
-   This parameter specifies the number of internal buffers to use for storing 
+   This paramter specifies the number of internal buffers to use for storing 
    frames from the cam. This will help if the process that reads images from 
-   the cam is a bit slow or momentarily busy. However, on slow machines it
+   the cam is a bit slow or momentarely busy. However, on slow machines it 
    only introduces lag, so choose carefully. The default is 3, which is 
    reasonable. You can set it between 2 and 5.
 
 mbufs
-   This is an integer between 1 and 4. It will tell the module the number of
+   This is an integer between 1 and 10. It will tell the module the number of
    buffers to reserve for mmap(), VIDIOCCGMBUF, VIDIOCMCAPTURE and friends.
    The default is 2, which is adequate for most applications (double
    buffering).
@@ -45,9 +72,9 @@
    slack when your program is behind. But you need a multi-threaded or
    forked program to really take advantage of these buffers.
 
-   The absolute maximum is 4, but don't set it too high!  Every buffer takes
-   up 1.22 MB of RAM, so unless you have a lot of memory setting this to
-   something more than 2 is an absolute waste.  This memory is only
+   The absolute maximum is 10, but don't set it too high!  Every buffer takes
+   up 460 KB of RAM, so unless you have a lot of memory setting this to
+   something more than 4 is an absolute waste.  This memory is only
    allocated during open(), so nothing is wasted when the camera is not in
    use.
 
@@ -74,9 +101,10 @@
    introduce some unwanted artefacts. The default is 2, medium compression.
    See the FAQ on the website for an overview of which modes require
    compression.
-      
-   The compression parameter only applies to the Vesta & ToUCam cameras.
-   The 645 and 646 have fixed compression parameters.      
+
+   The compression parameter does not apply to the 645 and 646 cameras
+   and OEM models derived from those (only a few). Most cams honour this
+   parameter.
 
 leds
    This settings takes 2 integers, that define the on/off time for the LED
@@ -89,14 +117,17 @@
 
      leds=0,0
 
-   the LED never goes on, making it suitable for silent survaillance.
+   the LED never goes on, making it suitable for silent surveillance.
 
    By default the camera's LED is on solid while in use, and turned off
    when the camera is not used anymore.
 
-   This parameter works only with the ToUCam range of cameras (730, 740,
-   750). For other cameras this command is silently ignored, and the LED
-   cannot be controlled.
+   This parameter works only with the ToUCam range of cameras (720, 730, 740,
+   750) and OEMs. For other cameras this command is silently ignored, and 
+   the LED cannot be controlled.
+
+   Finally: this parameters does not take effect UNTIL the first time you
+   open the camera device. Until then, the LED remains on.
 
 dev_hint
    A long standing problem with USB devices is their dynamic nature: you
@@ -126,7 +157,7 @@
                                other cameras will get the first free 
                                available slot (see below).
 
-     dev_hint=645:1,680=2      The PCA645 camera will get /dev/video1,
+     dev_hint=645:1,680:2      The PCA645 camera will get /dev/video1,
                                and a PCVC680 /dev/video2.
                                
      dev_hint=645.0123:3,645.4567:0	The PCA645 camera with serialnumber 
@@ -176,13 +207,16 @@
 
       64   0x40   Show viewport and image sizes                       Off
 
+     128   0x80   PWCX debugging                                      Off
 
    For example, to trace the open() & read() fuctions, sum 8 + 4 = 12,
    so you would supply trace=12 during insmod or modprobe. If
    you want to turn the initialization and probing tracing off, set trace=0.
    The default value for trace is 35 (0x23).
 
-   Example:
+
+
+Example:
      
      # modprobe pwc size=cif fps=15 power_save=1
 
@@ -192,7 +226,7 @@
 size and fps only specify defaults when you open() the device; this is to
 accommodate some tools that don't set the size. You can change these
 settings after open() with the Video4Linux ioctl() calls. The default of
-defaults is QCIF size at 10 fps, BGR order.
+defaults is QCIF size at 10 fps.
 
 The compression parameter is semiglobal; it sets the initial compression
 preference for all camera's, but this parameter can be set per camera with
@@ -200,4 +234,3 @@
 
 All parameters are optional.
 
-
--- diff/MAINTAINERS	2004-06-30 14:25:40.000000000 +0100
+++ source/MAINTAINERS	2004-07-01 21:32:29.000000000 +0100
@@ -90,6 +90,20 @@
 L:	linux-net@vger.kernel.org
 S:	Maintained
 
+3W-XXXX ATA-RAID CONTROLLER DRIVER
+P:	Adam Radford
+M:	linuxraid@amcc.com
+L:	linux-scsi@vger.kernel.org
+W:	http://www.amcc.com
+S:	Supported
+
+3W-9XXX SATA-RAID CONTROLLER DRIVER
+P:	Adam Radford
+M:	linuxraid@amcc.com
+L:	linux-scsi@vger.kernel.org
+W:	http://www.amcc.com
+S:	Supported
+
 53C700 AND 53C700-66 SCSI DRIVER
 P:	James E.J. Bottomley
 M:	James.Bottomley@HansenPartnership.com
@@ -689,6 +703,12 @@
 L:	blinux-list@redhat.com
 S:	Maintained
 
+DRIVER CORE, KOBJECTS, AND SYSFS
+P:	Greg Kroah-Hartman
+M:	greg@kroah.com
+L:	linux-kernel@vger.kernel.org
+S:	Supported
+
 DRM DRIVERS
 L:	dri-devel@lists.sourceforge.net
 S:	Supported
@@ -1193,6 +1213,12 @@
 W:	http://developer.osdl.org/rddunlap/kj-patches/
 S:	Maintained
 
+KGDB FOR I386 PLATFORM
+P:	George Anzinger
+M:	george@mvista.com
+L:	linux-net@vger.kernel.org
+S:	Supported
+
 KERNEL NFSD
 P:	Neil Brown
 M:	neilb@cse.unsw.edu.au
@@ -1251,6 +1277,20 @@
 L:	linuxppc-dev@lists.linuxppc.org
 S:	Maintained
 
+LINUX FOR POWERPC EMBEDDED PPC4XX
+P:	Matt Porter
+M:	mporter@kernel.crashing.org
+W:	http://www.penguinppc.org/
+L:	linuxppc-embedded@lists.linuxppc.org
+S:	Maintained
+
+LINUX FOR POWERPC EMBEDDED PPC85XX
+P:     Kumar Gala
+M:     kumar.gala@freescale.com
+W:     http://www.penguinppc.org/
+L:     linuxppc-embedded@lists.linuxppc.org
+S:     Maintained
+
 LLC (802.2)
 P:	Arnaldo Carvalho de Melo
 M:	acme@conectiva.com.br
@@ -1615,6 +1655,12 @@
 L:	linux-net@vger.kernel.org
 S:	Supported
 
+PERFORMANCE-MONITORING COUNTERS DRIVER
+P:	Mikael Pettersson
+M:	mikpe@csd.uu.se
+W:	http://www.csd.uu.se/~mikpe/linux/perfctr/
+S:	Maintained
+
 PNP SUPPORT
 P:	Adam Belay
 M:	ambx1@neo.rr.com
--- diff/Makefile	2004-06-30 14:25:40.000000000 +0100
+++ source/Makefile	2004-07-01 21:32:29.000000000 +0100
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 7
-EXTRAVERSION =
+EXTRAVERSION = -mm4
 NAME=Zonked Quokka
 
 # *DOCUMENTATION*
@@ -290,8 +290,6 @@
 OBJCOPY		= $(CROSS_COMPILE)objcopy
 OBJDUMP		= $(CROSS_COMPILE)objdump
 AWK		= awk
-RPM 		:= $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
-		    	else echo rpm; fi)
 GENKSYMS	= scripts/genksyms/genksyms
 DEPMOD		= /sbin/depmod
 KALLSYMS	= scripts/kallsyms
@@ -409,13 +407,6 @@
 
 scripts_basic: include/linux/autoconf.h
 
-
-# That's our default target when none is given on the command line
-# Note that 'modules' will be added as a prerequisite as well, 
-# in the CONFIG_MODULES part below
-
-all:	vmlinux
-
 # Objects we will link into vmlinux / subdirs we need to visit
 init-y		:= init/
 drivers-y	:= drivers/ sound/
@@ -449,6 +440,19 @@
 
 include $(srctree)/arch/$(ARCH)/Makefile
 
+# Default kernel image to build when no specific target is given.
+# KBUILD_IMAGE may be overruled on the commandline or
+# set in the environment
+# Also any assingments in arch/$(ARCH)/Makefiel take precedence over
+# this default value
+export KBUILD_IMAGE ?= vmlinux
+
+# The all: target is the default when no target is given on the
+# command line.
+# This allow a user to issue only 'make' to build a kernel including modules
+# Defaults vmlinux but it is usually overriden in the arch makefile
+all: vmlinux
+
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 CFLAGS		+= -Os
 else
@@ -461,6 +465,7 @@
 
 ifdef CONFIG_DEBUG_INFO
 CFLAGS		+= -g
+AFLAGS		+= -g
 endif
 
 # warn about C99 declaration after statement
@@ -544,10 +549,7 @@
 	echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd
 endef
 
-define rule_vmlinux
-	$(rule_vmlinux__); \
-	$(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
-endef
+do_system_map = $(NM) $(1) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > $(2)
 
 LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
 
@@ -561,30 +563,57 @@
 #	  but due to the added section, some addresses have shifted
 #	  From here, we generate a correct .tmp_kallsyms2.o
 #	o The correct .tmp_kallsyms2.o is linked into the final vmlinux.
+#	o Verify that the System.map from vmlinux matches the map from
+#	  .tmp_vmlinux2, just in case we did not generate kallsyms correctly.
+#	o If CONFIG_KALLSYMS_EXTRA_PASS is set, do an extra pass using
+#	  .tmp_vmlinux3 and .tmp_kallsyms3.o.  This is only meant as a
+#	  temporary bypass to allow the kernel to be built while the
+#	  maintainers work out what went wrong with kallsyms.
 
 ifdef CONFIG_KALLSYMS
 
-kallsyms.o := .tmp_kallsyms2.o
+ifdef CONFIG_KALLSYMS_EXTRA_PASS
+last_kallsyms := 3
+else
+last_kallsyms := 2
+endif
+
+kallsyms.o := .tmp_kallsyms$(last_kallsyms).o
+
+define rule_verify_kallsyms
+	@$(call do_system_map, .tmp_vmlinux$(last_kallsyms), .tmp_System.map)
+	@cmp -s System.map .tmp_System.map || \
+		(echo Inconsistent kallsyms data, try setting CONFIG_KALLSYMS_EXTRA_PASS ; rm .tmp_kallsyms* ; false)
+endef
 
 quiet_cmd_kallsyms = KSYM    $@
 cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) $(foreach x,$(CONFIG_KALLSYMS_ALL),--all-symbols) > $@
 
-.tmp_kallsyms1.o .tmp_kallsyms2.o: %.o: %.S scripts FORCE
+.tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE
 	$(call if_changed_dep,as_o_S)
 
 .tmp_kallsyms%.S: .tmp_vmlinux%
 	$(call cmd,kallsyms)
 
 .tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
-	+$(call if_changed_rule,vmlinux__)
+	$(call if_changed_rule,vmlinux__)
 
 .tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
 	$(call if_changed_rule,vmlinux__)
 
+.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+	$(call if_changed_rule,vmlinux__)
+
 endif
 
 #	Finally the vmlinux rule
 
+define rule_vmlinux
+	$(rule_vmlinux__); \
+	$(call do_system_map, $@, System.map)
+	$(rule_verify_kallsyms)
+endef
+
 vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
 	$(call if_changed_rule,vmlinux)
 
@@ -604,14 +633,24 @@
 # A multi level approach is used. prepare1 is updated first, then prepare0.
 # prepare-all is the collection point for the prepare targets.
 
-.PHONY: prepare-all prepare prepare0 prepare1
+.PHONY: prepare-all prepare prepare0 prepare1 prepare2
+
+# prepare 2 generate Makefile to be placed in output directory, if
+# using a seperate output directory. This allows convinient use
+# of make in output directory
+prepare2:
+	$(Q)if [ ! $(srctree) -ef $(objtree) ]; then       \
+	$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile      \
+	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \
+	    > $(objtree)/Makefile;                         \
+	fi
 
 # prepare1 is used to check if we are building in a separate output directory,
 # and if so do:
 # 1) Check that make has not been executed in the kernel src $(srctree)
 # 2) Create the include2 directory, used for the second asm symlink
 
-prepare1:
+prepare1: prepare2
 ifneq ($(KBUILD_SRC),)
 	@echo '  Using $(srctree) as source for kernel'
 	$(Q)if [ -h $(srctree)/include/asm -o -f $(srctree)/.config ]; then \
@@ -721,6 +760,12 @@
 modules_prepare: prepare-all scripts
 
 # Target to install modules
+# Modules are pr. default installed in /lib/modules/$(KERNELRELEASE)/...
+# Within this directory create two symlinks:
+# build => link to the directory containing the output files of the kernel build
+# source => link to the directory containing the source for the kernel
+# source and build are equal except for the case when the kernel is build using
+# a separate output directory
 .PHONY: modules_install
 modules_install: _modinst_ _modinst_post
 
@@ -732,9 +777,13 @@
 		sleep 1; \
 	fi
 	@rm -rf $(MODLIB)/kernel
-	@rm -f $(MODLIB)/build
+	@rm -f $(MODLIB)/source
 	@mkdir -p $(MODLIB)/kernel
-	@ln -s $(TOPDIR) $(MODLIB)/build
+	@ln -s $(srctree) $(MODLIB)/source
+	@if [ ! $(objtree) -ef  $(MODLIB)/build ]; then \
+		rm -f $(MODLIB)/build ; \
+		ln -s $(objtree) $(MODLIB)/build ; \
+	fi
 	$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
 
 # If System.map exists, run depmod.  This deliberately does not have a
@@ -795,8 +844,8 @@
 
 # Directories & files removed with 'make clean'
 CLEAN_DIRS  += $(MODVERDIR)
-CLEAN_FILES +=	vmlinux System.map kernel.spec \
-                .tmp_kallsyms* .tmp_version .tmp_vmlinux*
+CLEAN_FILES +=	vmlinux System.map \
+                .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include2
@@ -841,44 +890,26 @@
 .PHONY: distclean
 
 distclean: mrproper
-	@find . $(RCS_FIND_IGNORE) \
+	@find $(srctree) $(RCS_FIND_IGNORE) \
 	 	\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
 		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
 	 	-o -name '.*.rej' -o -size 0 \
 		-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
 		-type f -print | xargs rm -f
 
-# RPM target
-# ---------------------------------------------------------------------------
-
-.PHONY: rpm
 
-# Remove hyphens since they have special meaning in RPM filenames
-KERNELPATH=kernel-$(subst -,,$(KERNELRELEASE))
+# Packaging of the kernel to various formats
+# ---------------------------------------------------------------------------
+# rpm target kept for backward compatibility
+package-dir	:= $(srctree)/scripts/package
 
-#	If you do a make spec before packing the tarball you can rpm -ta it
+.PHONY: %-pkg rpm
 
-spec:
-	$(CONFIG_SHELL) $(srctree)/scripts/mkspec > $(objtree)/kernel.spec
-
-#	a) Build a tar ball
-#	b) generate an rpm from it
-#	c) and pack the result
-#	- Use /. to avoid tar packing just the symlink
-
-rpm:	clean spec
-	set -e; \
-	cd .. ; \
-	ln -sf $(srctree) $(KERNELPATH) ; \
-	tar -cvz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
-	rm $(KERNELPATH)
-
-	set -e; \
-	$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version;\
-	mv -f $(objtree)/.tmp_version $(objtree)/.version;
+%pkg: FORCE
+	$(Q)$(MAKE) -f $(package-dir)/Makefile $@
+rpm: FORCE
+	$(Q)$(MAKE) -f $(package-dir)/Makefile $@
 
-	$(RPM) --target $(UTS_MACHINE) -ta ../$(KERNELPATH).tar.gz
-	rm ../$(KERNELPATH).tar.gz
 
 # Brief documentation of the typical targets used
 # ---------------------------------------------------------------------------
@@ -905,6 +936,8 @@
 	@echo  '  tags/TAGS	  - Generate tags file for editors'
 	@echo  '  cscope	  - Generate cscope index'
 	@echo  '  checkstack      - Generate a list of stack hogs'
+	@echo  'Kernel packaging:'
+	@$(MAKE) -f $(package-dir)/Makefile help
 	@echo  ''
 	@echo  'Documentation targets:'
 	@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
@@ -1070,7 +1103,7 @@
 .PHONY: checkstack
 checkstack:
 	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
-	$(PERL) scripts/checkstack.pl $(ARCH)
+	$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
 
 # FIXME Should go into a make.lib or something 
 # ===========================================================================
--- diff/arch/alpha/defconfig	2004-05-19 22:10:53.000000000 +0100
+++ source/arch/alpha/defconfig	2004-07-01 21:32:29.000000000 +0100
@@ -791,7 +791,7 @@
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V4 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=m
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=m
--- diff/arch/alpha/kernel/init_task.c	2004-05-19 22:10:53.000000000 +0100
+++ source/arch/alpha/kernel/init_task.c	2004-07-01 21:32:29.000000000 +0100
@@ -4,6 +4,7 @@
 #include <linux/init.h>
 #include <linux/init_task.h>
 #include <linux/fs.h>
+#include <linux/mqueue.h>
 #include <asm/uaccess.h>
 
 
--- diff/arch/alpha/kernel/irq.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/alpha/kernel/irq.c	2004-07-01 21:32:29.000000000 +0100
@@ -227,7 +227,7 @@
 #ifdef CONFIG_SMP 
 static struct proc_dir_entry * smp_affinity_entry[NR_IRQS];
 static char irq_user_affinity[NR_IRQS];
-static unsigned long irq_affinity[NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
+static cpumask_t irq_affinity[NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
 
 static void
 select_smp_affinity(int irq)
@@ -238,16 +238,14 @@
 	if (! irq_desc[irq].handler->set_affinity || irq_user_affinity[irq])
 		return;
 
-	while (((cpu_present_mask >> cpu) & 1) == 0)
+	while (!cpu_possible(cpu))
 		cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
 	last_cpu = cpu;
 
-	irq_affinity[irq] = 1UL << cpu;
-	irq_desc[irq].handler->set_affinity(irq, 1UL << cpu);
+	irq_affinity[irq] = cpumask_of_cpu(cpu);
+	irq_desc[irq].handler->set_affinity(irq, cpumask_of_cpu(cpu));
 }
 
-#define HEX_DIGITS 16
-
 static int
 irq_affinity_read_proc (char *page, char **start, off_t off,
 			int count, int *eof, void *data)
@@ -259,67 +257,28 @@
 	return len;
 }
 
-static unsigned int
-parse_hex_value (const char __user *buffer,
-		 unsigned long count, unsigned long *ret)
-{
-	unsigned char hexnum [HEX_DIGITS];
-	unsigned long value;
-	unsigned long i;
-
-	if (!count)
-		return -EINVAL;
-	if (count > HEX_DIGITS)
-		count = HEX_DIGITS;
-	if (copy_from_user(hexnum, buffer, count))
-		return -EFAULT;
-
-	/*
-	 * Parse the first 8 characters as a hex string, any non-hex char
-	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
-	 */
-	value = 0;
-
-	for (i = 0; i < count; i++) {
-		unsigned int c = hexnum[i];
-
-		switch (c) {
-			case '0' ... '9': c -= '0'; break;
-			case 'a' ... 'f': c -= 'a'-10; break;
-			case 'A' ... 'F': c -= 'A'-10; break;
-		default:
-			goto out;
-		}
-		value = (value << 4) | c;
-	}
-out:
-	*ret = value;
-	return 0;
-}
-
 static int
 irq_affinity_write_proc(struct file *file, const char __user *buffer,
 			unsigned long count, void *data)
 {
 	int irq = (long) data, full_count = count, err;
-	unsigned long new_value;
+	cpumask_t new_value;
 
 	if (!irq_desc[irq].handler->set_affinity)
 		return -EIO;
 
-	err = parse_hex_value(buffer, count, &new_value);
+	err = cpumask_parse(buffer, count, new_value);
 
 	/* The special value 0 means release control of the
 	   affinity to kernel.  */
-	if (new_value == 0) {
+	cpus_and(new_value, new_value, cpu_online_map);
+	if (cpus_empty(new_value)) {
 		irq_user_affinity[irq] = 0;
 		select_smp_affinity(irq);
 	}
 	/* Do not allow disabling IRQs completely - it's a too easy
 	   way to make the system unusable accidentally :-) At least
 	   one online CPU still has to be targeted.  */
-	else if (!(new_value & cpu_present_mask))
-		return -EINVAL;
 	else {
 		irq_affinity[irq] = new_value;
 		irq_user_affinity[irq] = 1;
@@ -344,10 +303,10 @@
 prof_cpu_mask_write_proc(struct file *file, const char __user *buffer,
 			 unsigned long count, void *data)
 {
-	unsigned long *mask = (unsigned long *) data, full_count = count, err;
-	unsigned long new_value;
+	unsigned long full_count = count, err;
+	cpumask_t new_value, *mask = (cpumask_t *)data;
 
-	err = parse_hex_value(buffer, count, &new_value);
+	err = cpumask_parse(buffer, count, new_value);
 	if (err)
 		return err;
 
@@ -457,7 +416,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/alpha/kernel/process.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/alpha/kernel/process.c	2004-07-01 21:32:29.000000000 +0100
@@ -119,8 +119,8 @@
 
 #ifdef CONFIG_SMP
 	/* Wait for the secondaries to halt. */
-	clear_bit(boot_cpuid, &cpu_present_mask);
-	while (cpu_present_mask)
+	cpu_clear(boot_cpuid, cpu_possible_map);
+	while (cpus_weight(cpu_possible_map))
 		barrier();
 #endif
 
--- diff/arch/alpha/kernel/setup.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/alpha/kernel/setup.c	2004-07-01 21:32:29.000000000 +0100
@@ -39,6 +39,7 @@
 #include <linux/reboot.h>
 #endif
 #include <linux/notifier.h>
+#include <asm/setup.h>
 #include <asm/io.h>
 
 extern struct notifier_block *panic_notifier_list;
@@ -122,7 +123,6 @@
 static void determine_cpu_caches (unsigned int);
 
 static char command_line[COMMAND_LINE_SIZE];
-char saved_command_line[COMMAND_LINE_SIZE];
 
 /*
  * The format of "screen_info" is strange, and due to early
@@ -1246,9 +1246,9 @@
 		       platform_string(), nr_processors);
 
 #ifdef CONFIG_SMP
-	seq_printf(f, "cpus active\t\t: %ld\n"
+	seq_printf(f, "cpus active\t\t: %d\n"
 		      "cpu active mask\t\t: %016lx\n",
-		       num_online_cpus(), cpu_present_mask);
+		       num_online_cpus(), cpus_addr(cpu_possible_map)[0]);
 #endif
 
 	show_cache_size (f, "L1 Icache", alpha_l1i_cacheshape);
--- diff/arch/alpha/kernel/smp.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/alpha/kernel/smp.c	2004-07-01 21:32:29.000000000 +0100
@@ -68,7 +68,7 @@
 static int smp_secondary_alive __initdata = 0;
 
 /* Which cpus ids came online.  */
-unsigned long cpu_present_mask;
+cpumask_t cpu_present_mask;
 cpumask_t cpu_online_map;
 
 EXPORT_SYMBOL(cpu_online_map);
@@ -439,8 +439,6 @@
 	if (IS_ERR(idle))
 		panic("failed fork for CPU %d", cpuid);
 
-	wake_up_forked_process(idle);
-
 	init_idle(idle, cpuid);
 	unhash_process(idle);
 
@@ -522,7 +520,7 @@
 		smp_num_probed = 1;
 		hwrpb_cpu_present_mask = (1UL << boot_cpuid);
 	}
-	cpu_present_mask = 1UL << boot_cpuid;
+	cpu_present_mask = cpumask_of_cpu(boot_cpuid);
 
 	printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
 	       smp_num_probed, hwrpb_cpu_present_mask);
@@ -547,7 +545,7 @@
 
 	/* Nothing to do on a UP box, or when told not to.  */
 	if (smp_num_probed == 1 || max_cpus == 0) {
-		cpu_present_mask = 1UL << boot_cpuid;
+		cpu_present_mask = cpumask_of_cpu(boot_cpuid);
 		printk(KERN_INFO "SMP mode deactivated.\n");
 		return;
 	}
@@ -562,7 +560,7 @@
 		if (((hwrpb_cpu_present_mask >> i) & 1) == 0)
 			continue;
 
-		cpu_present_mask |= 1UL << i;
+		cpu_set(i, cpu_possible_map);
 		cpu_count++;
 	}
 
@@ -597,7 +595,7 @@
 		if (cpu_online(cpu))
 			bogosum += cpu_data[cpu].loops_per_jiffy;
 	
-	printk(KERN_INFO "SMP: Total of %ld processors activated "
+	printk(KERN_INFO "SMP: Total of %d processors activated "
 	       "(%lu.%02lu BogoMIPS).\n",
 	       num_online_cpus(), 
 	       (bogosum + 2500) / (500000/HZ),
@@ -638,23 +636,17 @@
 
 
 static void
-send_ipi_message(unsigned long to_whom, enum ipi_message_type operation)
+send_ipi_message(cpumask_t to_whom, enum ipi_message_type operation)
 {
-	unsigned long i, set, n;
+	int i;
 
 	mb();
-	for (i = to_whom; i ; i &= ~set) {
-		set = i & -i;
-		n = __ffs(set);
-		set_bit(operation, &ipi_data[n].bits);
-	}
+	for_each_cpu_mask(i, to_whom)
+		set_bit(operation, &ipi_data[i].bits);
 
 	mb();
-	for (i = to_whom; i ; i &= ~set) {
-		set = i & -i;
-		n = __ffs(set);
-		wripir(n);
-	}
+	for_each_cpu_mask(i, to_whom)
+		wripir(i);
 }
 
 /* Structure and data for smp_call_function.  This is designed to 
@@ -784,13 +776,14 @@
 		printk(KERN_WARNING
 		       "smp_send_reschedule: Sending IPI to self.\n");
 #endif
-	send_ipi_message(1UL << cpu, IPI_RESCHEDULE);
+	send_ipi_message(cpumask_of_cpu(cpu), IPI_RESCHEDULE);
 }
 
 void
 smp_send_stop(void)
 {
-	unsigned long to_whom = cpu_present_mask & ~(1UL << smp_processor_id());
+	cpumask_t to_whom = cpu_possible_map;
+	cpu_clear(smp_processor_id(), to_whom);
 #ifdef DEBUG_IPI_MSG
 	if (hard_smp_processor_id() != boot_cpu_id)
 		printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n");
@@ -814,7 +807,7 @@
 
 int
 smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry,
-			  int wait, unsigned long to_whom)
+			  int wait, cpumask_t to_whom)
 {
 	struct smp_call_struct data;
 	unsigned long timeout;
@@ -827,8 +820,8 @@
 	data.info = info;
 	data.wait = wait;
 
-	to_whom &= ~(1L << smp_processor_id());
-	num_cpus_to_call = hweight64(to_whom);
+	cpu_clear(smp_processor_id(), to_whom);
+	num_cpus_to_call = cpus_weight(to_whom);
 
 	atomic_set(&data.unstarted_count, num_cpus_to_call);
 	atomic_set(&data.unfinished_count, num_cpus_to_call);
--- diff/arch/alpha/kernel/sys_dp264.c	2004-05-19 22:10:53.000000000 +0100
+++ source/arch/alpha/kernel/sys_dp264.c	2004-07-01 21:32:29.000000000 +0100
@@ -53,7 +53,6 @@
 	register int bcpu = boot_cpuid;
 
 #ifdef CONFIG_SMP
-	register unsigned long cpm = cpu_present_mask;
 	volatile unsigned long *dim0, *dim1, *dim2, *dim3;
 	unsigned long mask0, mask1, mask2, mask3, dummy;
 
@@ -72,10 +71,10 @@
 	dim1 = &cchip->dim1.csr;
 	dim2 = &cchip->dim2.csr;
 	dim3 = &cchip->dim3.csr;
-	if ((cpm & 1) == 0) dim0 = &dummy;
-	if ((cpm & 2) == 0) dim1 = &dummy;
-	if ((cpm & 4) == 0) dim2 = &dummy;
-	if ((cpm & 8) == 0) dim3 = &dummy;
+	if (cpu_possible(0)) dim0 = &dummy;
+	if (cpu_possible(1)) dim1 = &dummy;
+	if (cpu_possible(2)) dim2 = &dummy;
+	if (cpu_possible(3)) dim3 = &dummy;
 
 	*dim0 = mask0;
 	*dim1 = mask1;
@@ -164,13 +163,13 @@
 }
 
 static void
-cpu_set_irq_affinity(unsigned int irq, unsigned long affinity)
+cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
 {
 	int cpu;
 
 	for (cpu = 0; cpu < 4; cpu++) {
 		unsigned long aff = cpu_irq_affinity[cpu];
-		if (affinity & (1UL << cpu))
+		if (cpu_isset(cpu, affinity))
 			aff |= 1UL << irq;
 		else
 			aff &= ~(1UL << irq);
@@ -179,7 +178,7 @@
 }
 
 static void
-dp264_set_affinity(unsigned int irq, unsigned long affinity)
+dp264_set_affinity(unsigned int irq, cpumask_t affinity)
 { 
 	spin_lock(&dp264_irq_lock);
 	cpu_set_irq_affinity(irq, affinity);
@@ -188,7 +187,7 @@
 }
 
 static void
-clipper_set_affinity(unsigned int irq, unsigned long affinity)
+clipper_set_affinity(unsigned int irq, cpumask_t affinity)
 { 
 	spin_lock(&dp264_irq_lock);
 	cpu_set_irq_affinity(irq - 16, affinity);
--- diff/arch/alpha/kernel/time.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/alpha/kernel/time.c	2004-07-01 21:32:29.000000000 +0100
@@ -523,7 +523,6 @@
  *      sets the minutes. Usually you won't notice until after reboot!
  */
 
-extern int abs(int);
 
 static int
 set_rtc_mmss(unsigned long nowtime)
--- diff/arch/alpha/mm/init.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/alpha/mm/init.c	2004-07-01 21:32:29.000000000 +0100
@@ -106,7 +106,7 @@
 
 	printk("\nMem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	i = max_mapnr;
 	while (i-- > 0) {
 		total++;
--- diff/arch/alpha/mm/numa.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/alpha/mm/numa.c	2004-07-01 21:32:29.000000000 +0100
@@ -279,8 +279,8 @@
 				       initrd_end,
 				       phys_to_virt(PFN_PHYS(max_low_pfn)));
 		} else {
-			nid = NODE_DATA(kvaddr_to_nid(initrd_start));
-			reserve_bootmem_node(nid,
+			nid = kvaddr_to_nid(initrd_start);
+			reserve_bootmem_node(NODE_DATA(nid),
 					     virt_to_phys((void *)initrd_start),
 					     INITRD_SIZE);
 		}
@@ -371,7 +371,7 @@
 
 	printk("\nMem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	for (nid = 0; nid < numnodes; nid++) {
 		struct page * lmem_map = node_mem_map(nid);
 		i = node_spanned_pages(nid);
--- diff/arch/arm/Kconfig	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/Kconfig	2004-07-01 21:32:29.000000000 +0100
@@ -72,9 +72,6 @@
 	prompt "ARM system type"
 	default ARCH_RPC
 
-config ARCH_ADIFCC
-	bool "ADIFCC-based"
-
 config ARCH_CLPS7500
 	bool "Cirrus-CL-PS7500FE"
 
@@ -191,6 +188,11 @@
 	depends on ARCH_RPC
 	default y
 
+config TIMER_ACORN
+	bool
+	depends on ARCH_ACORN || ARCH_CLPS7500
+	default y
+
 #####################################################################
 # Footbridge support
 config FOOTBRIDGE
@@ -246,10 +248,10 @@
 # Select various configuration options depending on the machine type
 config DISCONTIGMEM
 	bool
-	depends on ARCH_EDB7211 || ARCH_SA1100 || ARCH_LH7A40X
+	depends on ARCH_EDB7211 || ARCH_SA1100 || (ARCH_LH7A40X && !LH7A40X_SROMLL)
 	default y
 	help
-	  Say Y to upport efficient handling of discontiguous physical memory,
+	  Say Y to support efficient handling of discontiguous physical memory,
 	  for architectures which are either NUMA (Non-Uniform Memory Access)
 	  or have huge holes in the physical address space for other reasons.
 	  See <file:Documentation/vm/numa> for more.
@@ -257,7 +259,7 @@
 # Now handle the bus types
 config PCI
 	bool "PCI support" if ARCH_INTEGRATOR_AP
-	default y if ARCH_FTVPCI || ARCH_SHARK || FOOTBRIDGE_HOST || ARCH_IOP3XX || ARCH_IXP4XX
+	default y if ARCH_SHARK || FOOTBRIDGE_HOST || ARCH_IOP3XX || ARCH_IXP4XX
 	help
 	  Find out whether you have a PCI motherboard. PCI is the name of a
 	  bus system, i.e. the way the CPU talks to the other stuff inside
@@ -270,11 +272,6 @@
 	  doesn't.
 
 # Select the host bridge type
-config PCI_HOST_PLX90X0
-	bool
-	depends on PCI && ARCH_FTVPCI
-	default y
-
 config PCI_HOST_VIA82C505
 	bool
 	depends on PCI && ARCH_SHARK
@@ -421,6 +418,17 @@
 	  If you do not feel you need a faster FP emulation you should better
 	  choose NWFPE.
 
+config VFP
+	bool "VFP-format floating point maths"
+	help
+	  Say Y to include VFP support code in the kernel. This is needed
+	  if your hardware includes a VFP unit.
+
+	  Please see <file:Documentation/arm/VFP/release-notes.txt> for
+	  release notes and additional status information.
+
+	  Say N if your target does not have VFP hardware.
+
 source "fs/Kconfig.binfmt"
 
 source "drivers/base/Kconfig"
@@ -539,7 +547,7 @@
 
 config LEDS
 	bool "Timer and CPU usage LEDs"
-	depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_FTVPCI || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE_PB
+	depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE_PB
 	help
 	  If you say Y here, the LEDs on your machine will be used
 	  to provide useful information about your current system status.
@@ -553,7 +561,7 @@
 
 config LEDS_TIMER
 	bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || MACH_MAINSTONE || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE_PB)
-	depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_FTVPCI || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE_PB
+	depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE_PB
 	default y if ARCH_EBSA110
 	help
 	  If you say Y here, one of the system LEDs (the green one on the
@@ -609,7 +617,7 @@
 
 source "net/Kconfig"
 
-if ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_L7200 || ARCH_LH7A40X || ARCH_FTVPCI || ARCH_PXA || ARCH_RPC || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE
+if ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE
 source "drivers/ide/Kconfig"
 endif
 
--- diff/arch/arm/Makefile	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/Makefile	2004-07-01 21:32:29.000000000 +0100
@@ -74,9 +74,6 @@
 textaddr-$(CONFIG_ARCH_CO285)	   := 0x60008000
  machine-$(CONFIG_ARCH_CO285)	   := footbridge
   incdir-$(CONFIG_ARCH_CO285)	   := ebsa285
- machine-$(CONFIG_ARCH_FTVPCI)	   := ftvpci
-  incdir-$(CONFIG_ARCH_FTVPCI)	   := nexuspci
- machine-$(CONFIG_ARCH_TBOX)	   := tbox
  machine-$(CONFIG_ARCH_SHARK)	   := shark
  machine-$(CONFIG_ARCH_SA1100)	   := sa1100
 ifeq ($(CONFIG_ARCH_SA1100),y)
@@ -91,7 +88,6 @@
  machine-$(CONFIG_ARCH_CLPS711X)   := clps711x
 textaddr-$(CONFIG_ARCH_FORTUNET)   := 0xc0008000
  machine-$(CONFIG_ARCH_IOP3XX)	   := iop3xx
- machine-$(CONFIG_ARCH_ADIFCC)	   := adifcc
  machine-$(CONFIG_ARCH_IXP4XX)	   := ixp4xx
  machine-$(CONFIG_ARCH_OMAP)	   := omap
  machine-$(CONFIG_ARCH_S3C2410)	   := s3c2410
@@ -119,6 +115,7 @@
 endif
 core-$(CONFIG_FPE_NWFPE)	+= arch/arm/nwfpe/
 core-$(CONFIG_FPE_FASTFPE)	+= $(FASTFPE_OBJ)
+core-$(CONFIG_VFP)		+= arch/arm/vfp/
 
 drivers-$(CONFIG_OPROFILE)      += arch/arm/oprofile/
 drivers-$(CONFIG_ARCH_CLPS7500)	+= drivers/acorn/char/
--- diff/arch/arm/boot/Makefile	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/boot/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -49,8 +49,6 @@
    zreladdr-$(CONFIG_ARCH_PXA)		:= 0xa0008000
    zreladdr-$(CONFIG_ARCH_IOP3XX)	:= 0xa0008000
 params_phys-$(CONFIG_ARCH_IOP3XX)	:= 0xa0000100
-   zreladdr-$(CONFIG_ARCH_ADIFCC)	:= 0xc0008000
-params_phys-$(CONFIG_ARCH_ADIFCC)	:= 0xc0000100
    zreladdr-$(CONFIG_ARCH_IXP4XX)	:= 0x00008000
 params-phys-$(CONFIG_ARCH_IXP4XX)	:= 0x00000100
    zreladdr-$(CONFIG_ARCH_OMAP)		:= 0x10008000
--- diff/arch/arm/boot/compressed/head-xscale.S	2004-05-19 22:10:54.000000000 +0100
+++ source/arch/arm/boot/compressed/head-xscale.S	2004-07-01 21:32:30.000000000 +0100
@@ -66,7 +66,4 @@
 		mov	r7, #MACH_TYPE_IQ80310
 #endif
 
-#ifdef CONFIG_ARCH_ADI_EVB
-		mov	r7, #MACH_TYPE_ADI_EVB
-#endif
 
--- diff/arch/arm/common/Makefile	2004-05-19 22:10:54.000000000 +0100
+++ source/arch/arm/common/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -2,10 +2,9 @@
 # Makefile for the linux kernel.
 #
 
-obj-y				+= platform.o
 obj-$(CONFIG_ARM_AMBA)		+= amba.o
 obj-$(CONFIG_ICST525)		+= icst525.o
 obj-$(CONFIG_SA1111)		+= sa1111.o
-obj-$(CONFIG_PCI_HOST_PLX90X0)	+= plx90x0.o
 obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o
 obj-$(CONFIG_DMABOUNCE)		+= dmabounce.o
+obj-$(CONFIG_TIMER_ACORN)	+= time-acorn.o
--- diff/arch/arm/common/dmabounce.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/common/dmabounce.c	2004-07-01 21:32:30.000000000 +0100
@@ -234,7 +234,7 @@
 		}
 	}
 
-	dma_addr = virt_to_bus(ptr);
+	dma_addr = virt_to_dma(dev, ptr);
 
 	if (device_info && dma_needs_bounce(dev, dma_addr, size)) {
 		struct safe_buffer *buf;
@@ -248,7 +248,7 @@
 
 		dev_dbg(dev,
 			"%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
-			__func__, buf->ptr, (void *) virt_to_bus(buf->ptr),
+			__func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
 			buf->safe, (void *) buf->safe_dma_addr);
 
 		if ((dir == DMA_TO_DEVICE) ||
@@ -290,7 +290,7 @@
 
 		dev_dbg(dev,
 			"%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
-			__func__, buf->ptr, (void *) virt_to_bus(buf->ptr),
+			__func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
 			buf->safe, (void *) buf->safe_dma_addr);
 
 
@@ -342,7 +342,7 @@
 
 		dev_dbg(dev,
 			"%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
-			__func__, buf->ptr, (void *) virt_to_bus(buf->ptr),
+			__func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
 			buf->safe, (void *) buf->safe_dma_addr);
 
 		DO_STATS ( device_info->bounce_count++ );
@@ -367,7 +367,7 @@
 		}
 		consistent_sync(buf->safe, size, dir);
 	} else {
-		consistent_sync(bus_to_virt(dma_addr), size, dir);
+		consistent_sync(dma_to_virt(dev, dma_addr), size, dir);
 	}
 }
 
--- diff/arch/arm/common/sa1111.c	2004-05-19 22:10:54.000000000 +0100
+++ source/arch/arm/common/sa1111.c	2004-07-01 21:32:30.000000000 +0100
@@ -610,7 +610,7 @@
  *	%-EBUSY		physical address already marked in-use.
  *	%0		successful.
  */
-static int __init
+static int
 __sa1111_probe(struct device *me, struct resource *mem, int irq)
 {
 	struct sa1111 *sachip;
--- diff/arch/arm/configs/mainstone_defconfig	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/configs/mainstone_defconfig	2004-07-01 21:32:30.000000000 +0100
@@ -28,6 +28,7 @@
 # CONFIG_IKCONFIG is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_IOSCHED_NOOP=y
@@ -52,44 +53,23 @@
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
-CONFIG_ARCH_PXA=y
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
+CONFIG_ARCH_PXA=y
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
-# CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_S3C2410 is not set
-# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
 # CONFIG_ARCH_VERSATILE_PB is not set
 
 #
-# CLPS711X/EP721X Implementations
-#
-
-#
-# Epxa10db
-#
-
-#
-# Footbridge Implementations
-#
-
-#
-# IOP3xx Implementation Options
-#
-# CONFIG_ARCH_IOP310 is not set
-# CONFIG_ARCH_IOP321 is not set
-
-#
-# IOP3xx Chipset Features
-#
-
-#
 # Intel PXA2xx Implementations
 #
 # CONFIG_ARCH_LUBBOCK is not set
@@ -99,34 +79,6 @@
 CONFIG_IWMMXT=y
 
 #
-# SA11x0 Implementations
-#
-
-#
-# TI OMAP Implementations
-#
-
-#
-# OMAP Core Type
-#
-
-#
-# OMAP Board Type
-#
-
-#
-# OMAP Feature Selections
-#
-
-#
-# S3C2410 Implementations
-#
-
-#
-# LH7A40X Implementations
-#
-
-#
 # Processor Type
 #
 CONFIG_CPU_32=y
@@ -163,6 +115,7 @@
 CONFIG_FPE_NWFPE=y
 # CONFIG_FPE_NWFPE_XP is not set
 # CONFIG_FPE_FASTFPE is not set
+# CONFIG_VFP is not set
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
@@ -170,6 +123,7 @@
 #
 # Generic Driver Options
 #
+CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_PM is not set
@@ -394,7 +348,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECS=y
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
@@ -406,6 +359,7 @@
 # IDE chipset support/bugfixes
 #
 # CONFIG_IDE_GENERIC is not set
+# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -571,6 +525,7 @@
 CONFIG_FAT_FS=y
 CONFIG_MSDOS_FS=y
 # CONFIG_VFAT_FS is not set
+CONFIG_FAT_DEFAULT_CODEPAGE=437
 # CONFIG_NTFS_FS is not set
 
 #
@@ -622,7 +577,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -658,6 +612,7 @@
 # CONFIG_NLS_ISO8859_8 is not set
 # CONFIG_NLS_CODEPAGE_1250 is not set
 # CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
 CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_ISO8859_2 is not set
 # CONFIG_NLS_ISO8859_3 is not set
@@ -681,7 +636,10 @@
 #
 # Graphics support
 #
-# CONFIG_FB is not set
+CONFIG_FB=y
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_VIRTUAL is not set
 
 #
 # Console display driver support
@@ -689,6 +647,19 @@
 # CONFIG_VGA_CONSOLE is not set
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
 
 #
 # Sound
--- diff/arch/arm/kernel/Makefile	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/kernel/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -11,8 +11,7 @@
 		   time.o traps.o
 
 obj-$(CONFIG_APM)		+= apm.o
-obj-$(CONFIG_ARCH_ACORN)	+= ecard.o time-acorn.o
-obj-$(CONFIG_ARCH_CLPS7500)	+= time-acorn.o
+obj-$(CONFIG_ARCH_ACORN)	+= ecard.o 
 obj-$(CONFIG_FOOTBRIDGE)	+= isa.o
 obj-$(CONFIG_FIQ)		+= fiq.o
 obj-$(CONFIG_MODULES)		+= armksyms.o module.o
--- diff/arch/arm/kernel/debug.S	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/kernel/debug.S	2004-07-01 21:32:30.000000000 +0100
@@ -439,32 +439,6 @@
 #endif
 		.endm
 
-#elif defined(CONFIG_ARCH_ADI_EVB)
-
-		.macro	addruart,rx
-		mrc	p15, 0, \rx, c1, c0
-		tst	\rx, #1			@ MMU enabled?
-		mov	\rx, #0x00400000	@ physical base address
-		orrne	\rx, \rx, #0xff000000	@ virtual base
-		.endm
-
-		.macro	senduart,rd,rx
-		strb	\rd, [\rx]
-		.endm
-
-		.macro	busyuart,rd,rx
-1002:		ldrb	\rd, [\rx, #0x5]
-		and	\rd, \rd, #0x60
-		teq	\rd, #0x60
-		bne	1002b
-		.endm
-
-		.macro	waituart,rd,rx
-1001:		ldrb	\rd, [\rx, #0x6]
-		tst	\rd, #0x10
-		beq	1001b
-		.endm
-
 #elif defined(CONFIG_ARCH_IXP4XX)
 
                 .macro  addruart,rx
@@ -591,7 +565,8 @@
 		.macro  addruart,rx
 		mrc     p15, 0, \rx, c1, c0
 		tst     \rx, #1                 @ MMU enabled?
-		ldr     \rx, =0x80000700        @ physical base address
+		mov     \rx, #0x00000700        @ offset from base
+		orreq   \rx, \rx, #0x80000000   @ physical base
 		orrne   \rx, \rx, #0xf8000000   @ virtual base
 		.endm
 
--- diff/arch/arm/kernel/entry-armv.S	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/kernel/entry-armv.S	2004-07-01 21:32:30.000000000 +0100
@@ -19,6 +19,7 @@
 #include <asm/thread_info.h>
 #include <asm/glue.h>
 #include <asm/ptrace.h>
+#include <asm/vfpmacros.h>
 
 #include "entry-header.S"
 
@@ -561,7 +562,7 @@
 		.macro	irq_prio_table
 		.endm
 
-#elif defined(CONFIG_ARCH_IOP310) || defined(CONFIG_ARCH_ADIFCC)
+#elif defined(CONFIG_ARCH_IOP310)
 
 		.macro	disable_fiq
 		.endm
@@ -1198,8 +1199,13 @@
 		mov	pc, lr				@ CP#7
 		mov	pc, lr				@ CP#8
 		mov	pc, lr				@ CP#9
+#ifdef CONFIG_VFP
+		b	do_vfp				@ CP#10 (VFP)
+		b	do_vfp				@ CP#11 (VFP)
+#else
 		mov	pc, lr				@ CP#10 (VFP)
 		mov	pc, lr				@ CP#11 (VFP)
+#endif
 		mov	pc, lr				@ CP#12
 		mov	pc, lr				@ CP#13
 		mov	pc, lr				@ CP#14 (Debug)
@@ -1260,6 +1266,13 @@
 		ldr	r3, [r2, #TI_CPU_DOMAIN]!
 		stmia	ip, {r4 - sl, fp, sp, lr}	@ Store most regs on stack
 		mcr	p15, 0, r3, c3, c0, 0		@ Set domain register
+#ifdef CONFIG_VFP
+		@ Always disable VFP so we can lazily save/restore the old
+		@ state. This occurs in the context of the previous thread.
+		VFPFMRX	r4, FPEXC
+		bic	r4, r4, #FPEXC_ENABLE
+		VFPFMXR	FPEXC, r4
+#endif
 		ldmib	r2, {r4 - sl, fp, sp, pc}	@ Load all regs saved previously
 
 		__INIT
--- diff/arch/arm/kernel/init_task.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/kernel/init_task.c	2004-07-01 21:32:30.000000000 +0100
@@ -7,6 +7,7 @@
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/init_task.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/arm/kernel/irq.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/kernel/irq.c	2004-07-01 21:32:30.000000000 +0100
@@ -674,7 +674,7 @@
 
 	action->handler = handler;
 	action->flags = irq_flags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/arm/kernel/process.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/kernel/process.c	2004-07-01 21:32:30.000000000 +0100
@@ -314,10 +314,16 @@
 	memset(thread->used_cp, 0, sizeof(thread->used_cp));
 	memset(&tsk->thread.debug, 0, sizeof(struct debug_info));
 	fp_init(&thread->fpstate);
+#if defined(CONFIG_VFP)
+	vfp_flush_thread(&thread->vfpstate);
+#endif
 }
 
 void release_thread(struct task_struct *dead_task)
 {
+#if defined(CONFIG_VFP)
+	vfp_release_thread(&dead_task->thread_info->vfpstate);
+#endif
 }
 
 asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
--- diff/arch/arm/kernel/setup.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/kernel/setup.c	2004-07-01 21:32:30.000000000 +0100
@@ -22,6 +22,7 @@
 #include <linux/init.h>
 #include <linux/root_dev.h>
 #include <linux/cpu.h>
+#include <linux/interrupt.h>
 
 #include <asm/elf.h>
 #include <asm/hardware.h>
@@ -34,6 +35,7 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
+#include <asm/mach/time.h>
 
 #ifndef MEM_SIZE
 #define MEM_SIZE	(16*1024*1024)
@@ -95,7 +97,6 @@
 char elf_platform[ELF_PLATFORM_SIZE];
 EXPORT_SYMBOL(elf_platform);
 
-char saved_command_line[COMMAND_LINE_SIZE];
 unsigned long phys_initrd_start __initdata = 0;
 unsigned long phys_initrd_size __initdata = 0;
 
@@ -727,6 +728,7 @@
 	 * Set up various architecture-specific pointers
 	 */
 	init_arch_irq = mdesc->init_irq;
+	init_arch_time = mdesc->init_time;
 	init_machine = mdesc->init_machine;
 
 #ifdef CONFIG_VT
--- diff/arch/arm/kernel/time.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/kernel/time.c	2004-07-01 21:32:30.000000000 +0100
@@ -27,12 +27,15 @@
 #include <linux/errno.h>
 #include <linux/profile.h>
 #include <linux/sysdev.h>
+#include <linux/timer.h>
 
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 
+#include <asm/mach/time.h>
+
 u64 jiffies_64 = INITIAL_JIFFIES;
 
 EXPORT_SYMBOL(jiffies_64);
@@ -49,15 +52,11 @@
 /* change this if you have some constant time drift */
 #define USECS_PER_JIFFY	(1000000/HZ)
 
-static int dummy_set_rtc(void)
-{
-	return 0;
-}
 
 /*
  * hook for setting the RTC's idea of the current time.
  */
-int (*set_rtc)(void) = dummy_set_rtc;
+int (*set_rtc)(void);
 
 static unsigned long dummy_gettimeoffset(void)
 {
@@ -238,7 +237,7 @@
 #endif
 
 #ifdef CONFIG_LEDS_TIMER
-static void do_leds(void)
+static inline void do_leds(void)
 {
 	static unsigned int count = 50;
 
@@ -248,7 +247,7 @@
 	}
 }
 #else
-#define do_leds()
+#define	do_leds()
 #endif
 
 void do_gettimeofday(struct timeval *tv)
@@ -316,12 +315,18 @@
 
 EXPORT_SYMBOL(do_settimeofday);
 
-static struct irqaction timer_irq = {
-	.name	= "timer",
-	.flags	= SA_INTERRUPT,
-};
+void timer_tick(struct pt_regs *regs)
+{
+	do_profile(regs);
+	do_leds();
+	do_set_rtc();
+	do_timer(regs);
+}
+
+void (*init_arch_time)(void);
+
+void __init time_init(void)
+{
+	init_arch_time();
+}
 
-/*
- * Include architecture specific code
- */
-#include <asm/arch/time.h>
--- diff/arch/arm/kernel/traps.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/kernel/traps.c	2004-07-01 21:32:30.000000000 +0100
@@ -426,7 +426,7 @@
 
 	/*
 	 * Flush a region from virtual address 'r0' to virtual address 'r1'
-	 * _inclusive_.  There is no alignment requirement on either address;
+	 * _exclusive_.  There is no alignment requirement on either address;
 	 * user space does not need to know the hardware cache layout.
 	 *
 	 * r2 contains flags.  It should ALWAYS be passed as ZERO until it
--- diff/arch/arm/mach-clps711x/autcpu12.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-clps711x/autcpu12.c	2004-07-01 21:32:30.000000000 +0100
@@ -37,6 +37,7 @@
 
 extern void clps711x_map_io(void);
 extern void clps711x_init_irq(void);
+extern void clps711x_init_time(void);
 
 /*
  * The on-chip registers are given a size of 1MB so that a section can
@@ -65,5 +66,6 @@
 	BOOT_PARAMS(0xc0020000)
 	MAPIO(autcpu12_map_io)
 	INITIRQ(clps711x_init_irq)
+	INITTIME(clp711x_init_time)
 MACHINE_END
 
--- diff/arch/arm/mach-clps711x/cdb89712.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-clps711x/cdb89712.c	2004-07-01 21:32:30.000000000 +0100
@@ -34,6 +34,7 @@
 
 extern void clps711x_init_irq(void);
 extern void clps711x_map_io(void);
+extern void clps711x-init_time(void);
 
 /*
  * Map the CS89712 Ethernet port.  That should be moved to the
@@ -55,6 +56,7 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(cdb89712_map_io)
 	INITIRQ(clps711x_init_irq)
+	INITTIME(clps711x_init_time)
 MACHINE_END
 
 static int cdb89712_hw_init(void)
--- diff/arch/arm/mach-clps711x/ceiva.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-clps711x/ceiva.c	2004-07-01 21:32:30.000000000 +0100
@@ -35,6 +35,7 @@
 #include <asm/mach/map.h>
 
 extern void clps711x_init_irq(void);
+extern void clps711x_init_time(void);
 
 static struct map_desc ceiva_io_desc[] __initdata = {
  /* virtual, physical, length, type */
@@ -58,4 +59,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(ceiva_map_io)
 	INITIRQ(clps711x_init_irq)
+	INITTIME(clps711x_init_time)
 MACHINE_END
--- diff/arch/arm/mach-clps711x/clep7312.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-clps711x/clep7312.c	2004-07-01 21:32:30.000000000 +0100
@@ -25,6 +25,7 @@
 
 extern void clps711x_init_irq(void);
 extern void clps711x_map_io(void); 
+extern void clps711x_init_time(void);
 
 static void __init
 fixup_clep7312(struct machine_desc *desc, struct tag *tags,
@@ -44,5 +45,6 @@
 	FIXUP(fixup_clep7312)
 	MAPIO(clps711x_map_io)
 	INITIRQ(clps711x_init_irq)
+	INITTIME(clps711x_init_time)
 MACHINE_END
 
--- diff/arch/arm/mach-clps711x/edb7211-arch.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-clps711x/edb7211-arch.c	2004-07-01 21:32:30.000000000 +0100
@@ -27,6 +27,7 @@
 
 extern void clps711x_init_irq(void);
 extern void edb7211_map_io(void);
+extern void clps711x_init_time(void);
 
 static void __init
 fixup_edb7211(struct machine_desc *desc, struct tag *tags,
@@ -56,4 +57,5 @@
 	FIXUP(fixup_edb7211)
 	MAPIO(edb7211_map_io)
 	INITIRQ(clps711x_init_irq)
+	INITTIME(clps711x_init_time)
 MACHINE_END
--- diff/arch/arm/mach-clps711x/fortunet.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-clps711x/fortunet.c	2004-07-01 21:32:30.000000000 +0100
@@ -33,6 +33,7 @@
 
 extern void clps711x_map_io(void);
 extern void clps711x_init_irq(void);
+extern void clps711x_init_time(void);
 
 struct meminfo memmap = {
 	.nr_banks	= 1,
@@ -82,4 +83,5 @@
 	FIXUP(fortunet_fixup)
 	MAPIO(clps711x_map_io)
 	INITIRQ(clps711x_init_irq)
+	INITTIME(clps711x_init_time)
 MACHINE_END
--- diff/arch/arm/mach-clps711x/p720t.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-clps711x/p720t.c	2004-07-01 21:32:30.000000000 +0100
@@ -36,6 +36,7 @@
 
 extern void clps711x_init_irq(void);
 extern void clps711x_map_io(void);
+extern void clps711x_init_time(void);
 
 /*
  * Map the P720T system PLD.  It occupies two address spaces:
@@ -86,6 +87,7 @@
 	FIXUP(fixup_p720t)
 	MAPIO(p720t_map_io)
 	INITIRQ(clps711x_init_irq)
+	INITTIME(clps711x_init_time)
 MACHINE_END
 
 static int p720t_hw_init(void)
--- diff/arch/arm/mach-clps711x/time.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-clps711x/time.c	2004-07-01 21:32:30.000000000 +0100
@@ -18,12 +18,17 @@
  */
 #include <linux/timex.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
 
 #include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/leds.h>
 #include <asm/io.h>
 #include <asm/hardware/clps7111.h>
 
-extern unsigned long (*gettimeoffset)(void);
+#include <asm/mach/time.h>
+
 
 /*
  * gettimeoffset() returns time since last timer tick, in usecs.
@@ -38,19 +43,36 @@
 	return (hwticks * (tick_nsec / 1000)) / LATCH;
 }
 
-void __init clps711x_setup_timer(void)
+/*
+ * IRQ handler for the timer
+ */
+static irqreturn_t
+p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	timer_tick(regs);
+	return IRQ_HANDLED;
+}
+
+static struct irqaction clps711x_timer_irq = {
+	.name		= "CLPS711x Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= p720t_timer_interrupt
+};
+
+void __init clps711x_init_time(void)
 {
 	struct timespec tv;
 	unsigned int syscon;
 
-	gettimeoffset = clps711x_gettimeoffset;
-
 	syscon = clps_readl(SYSCON1);
 	syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
 	clps_writel(syscon, SYSCON1);
 
 	clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
 
+	setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
+	gettimeoffset = clps711x_gettimeoffset;
+
 	tv.tv_nsec = 0;
 	tv.tv_sec = clps_readl(RTCDR);
 	do_settimeofday(&tv);
--- diff/arch/arm/mach-clps7500/core.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-clps7500/core.c	2004-07-01 21:32:30.000000000 +0100
@@ -10,12 +10,13 @@
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <linux/list.h>
-#include <linux/timer.h>
+#include <linux/sched.h>
 #include <linux/init.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
+#include <asm/mach/time.h>
 
 #include <asm/hardware.h>
 #include <asm/hardware/iomd.h>
@@ -187,7 +188,7 @@
 	.unmask	= cl7500_no_action,
 };
 
-static struct irqaction irq_isa = { no_action, 0, 0, "isa", NULL, NULL };
+static struct irqaction irq_isa = { no_action, 0, CPU_MASK_NONE, "isa", NULL, NULL };
 
 static void __init clps7500_init_irq(void)
 {
@@ -265,10 +266,47 @@
 	iotable_init(cl7500_io_desc, ARRAY_SIZE(cl7500_io_desc));
 }
 
+extern void ioctime_init(void);
+
+static irqreturn_t
+clps7500_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	timer_tick(regs);
+
+	/* Why not using do_leds interface?? */
+	{
+		/* Twinkle the lights. */
+		static int count, state = 0xff00;
+		if (count-- == 0) {
+			state ^= 0x100;
+			count = 25;
+			*((volatile unsigned int *)LED_ADDRESS) = state;
+		}
+	}
+	return IRQ_HANDLED;
+}
+
+static struct irqaction clps7500_timer_irq = {
+	.name		= "CLPS7500 Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= clps7500_timer_interrupt
+};
+
+/*
+ * Set up timer interrupt.
+ */
+void __init clps7500_init_time(void)
+{
+	ioctime_init();
+
+	setup_irq(IRQ_TIMER, &clps7500_timer_irq);
+}
+
 MACHINE_START(CLPS7500, "CL-PS7500")
 	MAINTAINER("Philip Blundell")
 	BOOT_MEM(0x10000000, 0x03000000, 0xe0000000)
 	MAPIO(clps7500_map_io)
 	INITIRQ(clps7500_init_irq)
+	INITTIME(clps7500_init_time)
 MACHINE_END
 
--- diff/arch/arm/mach-ebsa110/core.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-ebsa110/core.c	2004-07-01 21:32:30.000000000 +0100
@@ -11,6 +11,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/interrupt.h>
 #include <linux/init.h>
 
 #include <asm/hardware.h>
@@ -26,6 +27,8 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/map.h>
 
+#include <asm/mach/time.h>
+
 #define IRQ_MASK		0xfe000000	/* read */
 #define IRQ_MSET		0xfe000000	/* write */
 #define IRQ_STAT		0xff000000	/* read */
@@ -89,6 +92,103 @@
 	iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc));
 }
 
+
+#define PIT_CTRL		(PIT_BASE + 0x0d)
+#define PIT_T2			(PIT_BASE + 0x09)
+#define PIT_T1			(PIT_BASE + 0x05)
+#define PIT_T0			(PIT_BASE + 0x01)
+
+/*
+ * This is the rate at which your MCLK signal toggles (in Hz)
+ * This was measured on a 10 digit frequency counter sampling
+ * over 1 second.
+ */
+#define MCLK	47894000
+
+/*
+ * This is the rate at which the PIT timers get clocked
+ */
+#define CLKBY7	(MCLK / 7)
+
+/*
+ * This is the counter value.  We tick at 200Hz on this platform.
+ */
+#define COUNT	((CLKBY7 + (HZ / 2)) / HZ)
+
+/*
+ * Get the time offset from the system PIT.  Note that if we have missed an
+ * interrupt, then the PIT counter will roll over (ie, be negative).
+ * This actually works out to be convenient.
+ */
+static unsigned long ebsa110_gettimeoffset(void)
+{
+	unsigned long offset, count;
+
+	__raw_writeb(0x40, PIT_CTRL);
+	count = __raw_readb(PIT_T1);
+	count |= __raw_readb(PIT_T1) << 8;
+
+	/*
+	 * If count > COUNT, make the number negative.
+	 */
+	if (count > COUNT)
+		count |= 0xffff0000;
+
+	offset = COUNT;
+	offset -= count;
+
+	/*
+	 * `offset' is in units of timer counts.  Convert
+	 * offset to units of microseconds.
+	 */
+	offset = offset * (1000000 / HZ) / COUNT;
+
+	return offset;
+}
+
+static irqreturn_t
+ebsa110_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	u32 count;
+
+	/* latch and read timer 1 */
+	__raw_writeb(0x40, PIT_CTRL);
+	count = __raw_readb(PIT_T1);
+	count |= __raw_readb(PIT_T1) << 8;
+
+	count += COUNT;
+
+	__raw_writeb(count & 0xff, PIT_T1);
+	__raw_writeb(count >> 8, PIT_T1);
+
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction ebsa110_timer_irq = {
+	.name		= "EBSA110 Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= ebsa110_timer_interrupt
+};
+
+/*
+ * Set up timer interrupt.
+ */
+static void __init ebsa110_init_time(void)
+{
+	/*
+	 * Timer 1, mode 2, LSB/MSB
+	 */
+	__raw_writeb(0x70, PIT_CTRL);
+	__raw_writeb(COUNT & 0xff, PIT_T1);
+	__raw_writeb(COUNT >> 8, PIT_T1);
+
+	gettimeoffset = ebsa110_gettimeoffset;
+
+	setup_irq(IRQ_EBSA110_TIMER0, &ebsa110_timer_irq);
+}
+
 MACHINE_START(EBSA110, "EBSA110")
 	MAINTAINER("Russell King")
 	BOOT_MEM(0x00000000, 0xe0000000, 0xe0000000)
@@ -98,4 +198,5 @@
 	SOFT_REBOOT
 	MAPIO(ebsa110_map_io)
 	INITIRQ(ebsa110_init_irq)
+	INITTIME(ebsa110_init_time)
 MACHINE_END
--- diff/arch/arm/mach-epxa10db/arch.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-epxa10db/arch.c	2004-07-01 21:32:30.000000000 +0100
@@ -29,10 +29,13 @@
 
 extern void epxa10db_map_io(void);
 extern void epxa10db_init_irq(void);
+extern void epxa10db_init_time(void);
 
 MACHINE_START(CAMELOT, "Altera Epxa10db")
 	MAINTAINER("Altera Corporation")
 	BOOT_MEM(0x00000000, 0x7fffc000, 0xffffc000)
 	MAPIO(epxa10db_map_io)
 	INITIRQ(epxa10db_init_irq)
+	INITTIME(epxa10db_init_time)
 MACHINE_END
+
--- diff/arch/arm/mach-epxa10db/time.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-epxa10db/time.c	2004-07-01 21:32:30.000000000 +0100
@@ -10,11 +10,17 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
 
 #include <asm/hardware.h>
+#include <asm/system.h>
+#include <asm/leds.h>
 
+#include <asm/mach/time.h>
 
-extern int (*set_rtc)(void);
+#define TIMER00_TYPE (volatile unsigned int*)
+#include <asm/arch/timer00.h>
 
 static int epxa10db_set_rtc(void)
 {
@@ -29,3 +35,39 @@
 }
 
 __initcall(epxa10db_rtc_init);
+
+
+/*
+ * IRQ handler for the timer
+ */
+static irqreturn_t
+epxa10db_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+
+	// ...clear the interrupt
+	*TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))|=TIMER0_CR_CI_MSK;
+
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction epxa10db_timer_irq = {
+	.name		= "Excalibur Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= epxa10db_timer_interrupt
+};
+
+/*
+ * Set up timer interrupt, and return the current time in seconds.
+ */
+void __init epxa10db_init_time(void)
+{
+	/* Start the timer */
+	*TIMER0_LIMIT(IO_ADDRESS(EXC_TIMER00_BASE))=(unsigned int)(EXC_AHB2_CLK_FREQUENCY/200);
+	*TIMER0_PRESCALE(IO_ADDRESS(EXC_TIMER00_BASE))=1;
+	*TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))=TIMER0_CR_IE_MSK | TIMER0_CR_S_MSK;
+
+	setup_irq(IRQ_TIMER0, &epxa10db_timer_irq);
+}
+
--- diff/arch/arm/mach-footbridge/Makefile	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-footbridge/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -4,7 +4,7 @@
 
 # Object file lists.
 
-obj-y			:= arch.o dc21285.o dma.o irq.o isa-irq.o mm.o
+obj-y			:= arch.o dc21285.o dma.o irq.o isa-irq.o mm.o time.o
 obj-m			:=
 obj-n			:=
 obj-			:=
--- diff/arch/arm/mach-footbridge/arch.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-footbridge/arch.c	2004-07-01 21:32:30.000000000 +0100
@@ -22,6 +22,7 @@
 
 extern void footbridge_map_io(void);
 extern void footbridge_init_irq(void);
+extern void footbridge_init_time(void);
 
 unsigned int mem_fclk_21285 = 50000000;
 
@@ -43,6 +44,7 @@
 	VIDEO(0x000a0000, 0x000bffff)
 	MAPIO(footbridge_map_io)
 	INITIRQ(footbridge_init_irq)
+	INITTIME(footbridge_init_time)
 MACHINE_END
 #endif
 
@@ -78,6 +80,7 @@
 	FIXUP(fixup_netwinder)
 	MAPIO(footbridge_map_io)
 	INITIRQ(footbridge_init_irq)
+	INITTIME(footbridge_init_time)
 MACHINE_END
 #endif
 
@@ -103,6 +106,7 @@
 	FIXUP(fixup_cats)
 	MAPIO(footbridge_map_io)
 	INITIRQ(footbridge_init_irq)
+	INITTIME(footbridge_init_time)
 MACHINE_END
 #endif
 
@@ -129,6 +133,7 @@
 	FIXUP(fixup_coebsa285)
 	MAPIO(footbridge_map_io)
 	INITIRQ(footbridge_init_irq)
+	INITTIME(footbridge_init_time)
 MACHINE_END
 #endif
 
@@ -139,5 +144,6 @@
 	BOOT_PARAMS(0x00000100)
 	MAPIO(footbridge_map_io)
 	INITIRQ(footbridge_init_irq)
+	INITTIME(footbridge_init_time)
 MACHINE_END
 #endif
--- diff/arch/arm/mach-integrator/Makefile	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-integrator/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -4,7 +4,7 @@
 
 # Object file lists.
 
-obj-y					:= core.o lm.o time.o
+obj-y					:= clock.o core.o lm.o time.o
 obj-$(CONFIG_ARCH_INTEGRATOR_AP)	+= integrator_ap.o
 obj-$(CONFIG_ARCH_INTEGRATOR_CP)	+= integrator_cp.o
 
--- diff/arch/arm/mach-integrator/core.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-integrator/core.c	2004-07-01 21:32:30.000000000 +0100
@@ -12,12 +12,17 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/spinlock.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
 
 #include <asm/hardware.h>
 #include <asm/irq.h>
 #include <asm/io.h>
 #include <asm/hardware/amba.h>
 #include <asm/arch/cm.h>
+#include <asm/system.h>
+#include <asm/leds.h>
+#include <asm/mach/time.h>
 
 static struct amba_device rtc_device = {
 	.dev		= {
@@ -127,3 +132,137 @@
 }
 
 EXPORT_SYMBOL(cm_control);
+
+/*
+ * Where is the timer (VA)?
+ */
+#define TIMER0_VA_BASE (IO_ADDRESS(INTEGRATOR_CT_BASE)+0x00000000)
+#define TIMER1_VA_BASE (IO_ADDRESS(INTEGRATOR_CT_BASE)+0x00000100)
+#define TIMER2_VA_BASE (IO_ADDRESS(INTEGRATOR_CT_BASE)+0x00000200)
+#define VA_IC_BASE     IO_ADDRESS(INTEGRATOR_IC_BASE) 
+
+/*
+ * How long is the timer interval?
+ */
+#define TIMER_INTERVAL	(TICKS_PER_uSEC * mSEC_10)
+#if TIMER_INTERVAL >= 0x100000
+#define TICKS2USECS(x)	(256 * (x) / TICKS_PER_uSEC)
+#elif TIMER_INTERVAL >= 0x10000
+#define TICKS2USECS(x)	(16 * (x) / TICKS_PER_uSEC)
+#else
+#define TICKS2USECS(x)	((x) / TICKS_PER_uSEC)
+#endif
+
+/*
+ * What does it look like?
+ */
+typedef struct TimerStruct {
+	unsigned long TimerLoad;
+	unsigned long TimerValue;
+	unsigned long TimerControl;
+	unsigned long TimerClear;
+} TimerStruct_t;
+
+extern unsigned long (*gettimeoffset)(void);
+
+static unsigned long timer_reload;
+
+/*
+ * Returns number of ms since last clock interrupt.  Note that interrupts
+ * will have been disabled by do_gettimeoffset()
+ */
+static unsigned long integrator_gettimeoffset(void)
+{
+	volatile TimerStruct_t *timer1 = (TimerStruct_t *)TIMER1_VA_BASE;
+	unsigned long ticks1, ticks2, status;
+
+	/*
+	 * Get the current number of ticks.  Note that there is a race
+	 * condition between us reading the timer and checking for
+	 * an interrupt.  We get around this by ensuring that the
+	 * counter has not reloaded between our two reads.
+	 */
+	ticks2 = timer1->TimerValue & 0xffff;
+	do {
+		ticks1 = ticks2;
+		status = __raw_readl(VA_IC_BASE + IRQ_RAW_STATUS);
+		ticks2 = timer1->TimerValue & 0xffff;
+	} while (ticks2 > ticks1);
+
+	/*
+	 * Number of ticks since last interrupt.
+	 */
+	ticks1 = timer_reload - ticks2;
+
+	/*
+	 * Interrupt pending?  If so, we've reloaded once already.
+	 */
+	if (status & (1 << IRQ_TIMERINT1))
+		ticks1 += timer_reload;
+
+	/*
+	 * Convert the ticks to usecs
+	 */
+	return TICKS2USECS(ticks1);
+}
+
+/*
+ * IRQ handler for the timer
+ */
+static irqreturn_t
+integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	volatile TimerStruct_t *timer1 = (volatile TimerStruct_t *)TIMER1_VA_BASE;
+
+	// ...clear the interrupt
+	timer1->TimerClear = 1;
+
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction integrator_timer_irq = {
+	.name		= "Integrator Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= integrator_timer_interrupt
+};
+
+/*
+ * Set up timer interrupt, and return the current time in seconds.
+ */
+void __init integrator_time_init(unsigned long reload, unsigned int ctrl)
+{
+	volatile TimerStruct_t *timer0 = (volatile TimerStruct_t *)TIMER0_VA_BASE;
+	volatile TimerStruct_t *timer1 = (volatile TimerStruct_t *)TIMER1_VA_BASE;
+	volatile TimerStruct_t *timer2 = (volatile TimerStruct_t *)TIMER2_VA_BASE;
+	unsigned int timer_ctrl = 0x80 | 0x40;	/* periodic */
+
+	timer_reload = reload;
+	timer_ctrl |= ctrl;
+
+	if (timer_reload > 0x100000) {
+		timer_reload >>= 8;
+		timer_ctrl |= 0x08; /* /256 */
+	} else if (timer_reload > 0x010000) {
+		timer_reload >>= 4;
+		timer_ctrl |= 0x04; /* /16 */
+	}
+
+	/*
+	 * Initialise to a known state (all timers off)
+	 */
+	timer0->TimerControl = 0;
+	timer1->TimerControl = 0;
+	timer2->TimerControl = 0;
+
+	timer1->TimerLoad    = timer_reload;
+	timer1->TimerValue   = timer_reload;
+	timer1->TimerControl = timer_ctrl;
+
+	/* 
+	 * Make irqs happen for the system timer
+	 */
+	setup_irq(IRQ_TIMERINT1, &integrator_timer_irq);
+	gettimeoffset = integrator_gettimeoffset;
+}
--- diff/arch/arm/mach-integrator/impd1.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-integrator/impd1.c	2004-07-01 21:32:30.000000000 +0100
@@ -25,13 +25,16 @@
 #include <asm/arch/impd1.h>
 #include <asm/sizes.h>
 
+#include "clock.h"
+
 static int module_id;
 
 module_param_named(lmid, module_id, int, 0444);
 MODULE_PARM_DESC(lmid, "logic module stack position");
 
 struct impd1_module {
-	void	*base;
+	void		*base;
+	struct clk	vcos[2];
 };
 
 static const struct icst525_params impd1_vco_params = {
@@ -43,25 +46,20 @@
 	.rd_max		= 120,
 };
 
-void impd1_set_vco(struct device *dev, int vconr, unsigned long period)
+static void impd1_setvco(struct clk *clk, struct icst525_vco vco)
 {
-	struct impd1_module *impd1 = dev_get_drvdata(dev);
-	struct icst525_vco vco;
+	struct impd1_module *impd1 = clk->data;
+	int vconr = clk - impd1->vcos;
 	u32 val;
 
-	vco = icst525_ps_to_vco(&impd1_vco_params, period);
-
-	pr_debug("Guessed VCO reg params: S=%d R=%d V=%d\n",
-		vco.s, vco.r, vco.v);
-
 	val = vco.v | (vco.r << 9) | (vco.s << 16);
 
 	writel(0xa05f, impd1->base + IMPD1_LOCK);
 	switch (vconr) {
-	case 1:
+	case 0:
 		writel(val, impd1->base + IMPD1_OSC1);
 		break;
-	case 2:
+	case 1:
 		writel(val, impd1->base + IMPD1_OSC2);
 		break;
 	}
@@ -77,8 +75,6 @@
 #endif
 }
 
-EXPORT_SYMBOL(impd1_set_vco);
-
 void impd1_tweak_control(struct device *dev, u32 mask, u32 val)
 {
 	struct impd1_module *impd1 = dev_get_drvdata(dev);
@@ -140,6 +136,11 @@
 	}
 };
 
+static const char *impd1_vconames[2] = {
+	"CLCDCLK",
+	"AUXVCO2",
+};
+
 static int impd1_probe(struct lm_device *dev)
 {
 	struct impd1_module *impd1;
@@ -168,6 +169,16 @@
 
 	printk("IM-PD1 found at 0x%08lx\n", dev->resource.start);
 
+	for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) {
+		impd1->vcos[i].owner = THIS_MODULE,
+		impd1->vcos[i].name = impd1_vconames[i],
+		impd1->vcos[i].params = &impd1_vco_params,
+		impd1->vcos[i].data = impd1,
+		impd1->vcos[i].setvco = impd1_setvco;
+
+		clk_register(&impd1->vcos[i]);
+	}
+
 	for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) {
 		struct impd1_device *idev = impd1_devs + i;
 		struct amba_device *d;
@@ -216,6 +227,7 @@
 {
 	struct impd1_module *impd1 = lm_get_drvdata(dev);
 	struct list_head *l, *n;
+	int i;
 
 	list_for_each_safe(l, n, &dev->dev.children) {
 		struct device *d = list_to_dev(l);
@@ -223,6 +235,9 @@
 		device_unregister(d);
 	}
 
+	for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++)
+		clk_unregister(&impd1->vcos[i]);
+
 	lm_set_drvdata(dev, NULL);
 
 	iounmap(impd1->base);
--- diff/arch/arm/mach-integrator/integrator_ap.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-integrator/integrator_ap.c	2004-07-01 21:32:30.000000000 +0100
@@ -256,7 +256,7 @@
 	unsigned long sc_dec;
 	int i;
 
-	platform_add_device(&cfi_flash_device);
+	platform_device_register(&cfi_flash_device);
 
 	sc_dec = readl(VA_SC_BASE + INTEGRATOR_SC_DEC_OFFSET);
 	for (i = 0; i < 4; i++) {
@@ -281,11 +281,17 @@
 	}
 }
 
+static void ap_time_init(void)
+{
+	integrator_time_init(1000000 * TICKS_PER_uSEC / HZ, 0);
+}
+
 MACHINE_START(INTEGRATOR, "ARM-Integrator")
 	MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd")
 	BOOT_MEM(0x00000000, 0x16000000, 0xf1600000)
 	BOOT_PARAMS(0x00000100)
 	MAPIO(ap_map_io)
 	INITIRQ(ap_init_irq)
+	INITTIME(ap_time_init)
 	INIT_MACHINE(ap_init)
 MACHINE_END
--- diff/arch/arm/mach-integrator/integrator_cp.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-integrator/integrator_cp.c	2004-07-01 21:32:30.000000000 +0100
@@ -23,6 +23,7 @@
 #include <asm/mach-types.h>
 #include <asm/hardware/amba.h>
 #include <asm/hardware/amba_kmi.h>
+#include <asm/hardware/icst525.h>
 
 #include <asm/arch/lm.h>
 
@@ -32,12 +33,16 @@
 #include <asm/mach/mmc.h>
 #include <asm/mach/map.h>
 
+#include "clock.h"
+
 #define INTCP_PA_MMC_BASE		0x1c000000
 #define INTCP_PA_AACI_BASE		0x1d000000
 
 #define INTCP_PA_FLASH_BASE		0x24000000
 #define INTCP_FLASH_SIZE		SZ_32M
 
+#define INTCP_PA_CLCD_BASE		0xc0000000
+
 #define INTCP_VA_CIC_BASE		0xf1000040
 #define INTCP_VA_PIC_BASE		0xf1400000
 #define INTCP_VA_SIC_BASE		0xfca00000
@@ -210,6 +215,44 @@
 }
 
 /*
+ * Clock handling
+ */
+#define CM_LOCK (IO_ADDRESS(INTEGRATOR_HDR_BASE)+INTEGRATOR_HDR_LOCK_OFFSET)
+#define CM_AUXOSC (IO_ADDRESS(INTEGRATOR_HDR_BASE)+0x1c)
+
+static const struct icst525_params cp_auxvco_params = {
+	.ref		= 24000,
+	.vco_max	= 320000,
+	.vd_min 	= 8,
+	.vd_max 	= 263,
+	.rd_min 	= 3,
+	.rd_max 	= 65,
+};
+
+static void cp_auxvco_set(struct clk *clk, struct icst525_vco vco)
+{
+	u32 val;
+
+	val = readl(CM_AUXOSC) & ~0x7ffff;
+	val |= vco.v | (vco.r << 9) | (vco.s << 16);
+
+	writel(0xa05f, CM_LOCK);
+	writel(val, CM_AUXOSC);
+	writel(0, CM_LOCK);
+}
+
+static struct clk cp_clcd_clk = {
+	.name	= "CLCDCLK",
+	.params	= &cp_auxvco_params,
+	.setvco = cp_auxvco_set,
+};
+
+static struct clk cp_mmci_clk = {
+	.name	= "MCLK",
+	.rate	= 14745600,
+};
+
+/*
  * Flash handling.
  */
 static int intcp_flash_init(void)
@@ -308,7 +351,7 @@
 }
 
 static struct mmc_platform_data mmc_data = {
-	.mclk		= 33000000,
+	.mclk		= 14745600,
 	.ocr_mask	= MMC_VDD_32_33|MMC_VDD_33_34,
 	.status		= mmc_status,
 };
@@ -340,15 +383,34 @@
 	.periphid	= 0,
 };
 
+static struct amba_device clcd_device = {
+	.dev		= {
+		.bus_id	= "mb:c0",
+		.coherent_dma_mask = ~0,
+	},
+	.res		= {
+		.start	= INTCP_PA_CLCD_BASE,
+		.end	= INTCP_PA_CLCD_BASE + SZ_4K - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	.dma_mask	= ~0,
+	.irq		= { IRQ_CP_CLCDCINT, NO_IRQ },
+	.periphid	= 0,
+};
+
 static struct amba_device *amba_devs[] __initdata = {
 	&mmc_device,
 	&aaci_device,
+	&clcd_device,
 };
 
 static void __init intcp_init(void)
 {
 	int i;
 
+	clk_register(&cp_clcd_clk);
+	clk_register(&cp_mmci_clk);
+
 	platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs));
 
 	for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
@@ -357,11 +419,19 @@
 	}
 }
 
+#define TIMER_CTRL_IE	(1 << 5)			/* Interrupt Enable */
+
+static void __init intcp_init_time(void)
+{
+	integrator_time_init(1000000 / HZ, TIMER_CTRL_IE);
+}
+
 MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP")
 	MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd")
 	BOOT_MEM(0x00000000, 0x16000000, 0xf1600000)
 	BOOT_PARAMS(0x00000100)
 	MAPIO(intcp_map_io)
 	INITIRQ(intcp_init_irq)
+	INITTIME(intcp_init_time)
 	INIT_MACHINE(intcp_init)
 MACHINE_END
--- diff/arch/arm/mach-iop3xx/arch.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-iop3xx/arch.c	2004-07-01 21:32:30.000000000 +0100
@@ -29,6 +29,7 @@
 #ifdef CONFIG_ARCH_IQ80321
 extern void iq80321_map_io(void);
 extern void iop321_init_irq(void);
+extern void iop321_init_time(void);
 #endif
 
 #ifdef CONFIG_ARCH_IQ80310
@@ -67,6 +68,7 @@
 	FIXUP(fixup_iop321)
 	MAPIO(iq80321_map_io)
 	INITIRQ(iop321_init_irq)
+	INITTIME(iop321_init_time)
 MACHINE_END
 
 #else
--- diff/arch/arm/mach-iop3xx/iop321-time.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-iop3xx/iop321-time.c	2004-07-01 21:32:30.000000000 +0100
@@ -23,7 +23,9 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/uaccess.h>
+
 #include <asm/mach/irq.h>
+#include <asm/mach/time.h>
 
 static unsigned long iop321_gettimeoffset(void)
 {
@@ -61,27 +63,26 @@
 
 	asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (tisr));
 
-	do_timer(regs);
+	timer_tick(regs);
 
 	return IRQ_HANDLED;
 }
 
-extern unsigned long (*gettimeoffset)(void);
-
-static struct irqaction timer_irq = {
-	.name		= "timer",
+static struct irqaction iop321_timer_irq = {
+	.name		= "IOP321 Timer Tick",
 	.handler	= iop321_timer_interrupt,
+	.flags		= SA_INTERRUPT
 };
 
 extern int setup_arm_irq(int, struct irqaction*);
 
-void __init time_init(void)
+void __init iop321_init_time(void)
 {
 	u32 timer_ctl;
 	u32 latch = LATCH;
 
 	gettimeoffset = iop321_gettimeoffset;
-	setup_irq(IRQ_IOP321_TIMER0, &timer_irq);
+	setup_irq(IRQ_IOP321_TIMER0, &iop321_timer_irq);
 
 	timer_ctl = IOP321_TMR_EN | IOP321_TMR_PRIVILEGED | IOP321_TMR_RELOAD |
 			IOP321_TMR_RATIO_1_1;
--- diff/arch/arm/mach-ixp4xx/common.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-ixp4xx/common.c	2004-07-01 21:32:30.000000000 +0100
@@ -36,6 +36,7 @@
 
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
+#include <asm/mach/time.h>
 
 
 /*************************************************************************
@@ -227,24 +228,22 @@
 	 * Catch up with the real idea of time
 	 */
 	do {	
-		do_timer(regs);
+		timer_tick(regs);
 		last_jiffy_time += LATCH;
 	} while((*IXP4XX_OSTS - last_jiffy_time) > LATCH);
 
 	return IRQ_HANDLED;
 }
 
-extern unsigned long (*gettimeoffset)(void);
-
-static struct irqaction timer_irq = {
-	.name	= "IXP4xx Timer Tick",
-	.flags	= SA_INTERRUPT
+static struct irqaction ixp4xx_timer_irq = {
+	.name		= "IXP4xx Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= ixp4xx_timer_interrupt
 };
 
-void __init time_init(void)
+void __init ixp4xx_init_time(void)
 {
 	gettimeoffset = ixp4xx_gettimeoffset;
-	timer_irq.handler = ixp4xx_timer_interrupt;
 
 	/* Clear Pending Interrupt by writing '1' to it */
 	*IXP4XX_OSST = IXP4XX_OSST_TIMER_1_PEND;
@@ -257,7 +256,7 @@
 	last_jiffy_time = 0;
 
 	/* Connect the interrupt handler and enable the interrupt */
-	setup_irq(IRQ_IXP4XX_TIMER1, &timer_irq);
+	setup_irq(IRQ_IXP4XX_TIMER1, &ixp4xx_timer_irq);
 }
 
 
--- diff/arch/arm/mach-ixp4xx/coyote-setup.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-ixp4xx/coyote-setup.c	2004-07-01 21:32:30.000000000 +0100
@@ -84,6 +84,7 @@
                 IXP4XX_PERIPHERAL_BASE_VIRT)
         MAPIO(coyote_map_io)
         INITIRQ(ixp4xx_init_irq)
+	INITTIME(ixp4xx_init_time)
         BOOT_PARAMS(0x0100)
 	INIT_MACHINE(coyote_init)
 MACHINE_END
--- diff/arch/arm/mach-ixp4xx/ixdp425-setup.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-ixp4xx/ixdp425-setup.c	2004-07-01 21:32:30.000000000 +0100
@@ -113,6 +113,7 @@
 		IXP4XX_PERIPHERAL_BASE_VIRT)
 	MAPIO(ixdp425_map_io)
 	INITIRQ(ixp4xx_init_irq)
+	INITTIME(ixp4xx_init_time)
 	BOOT_PARAMS(0x0100)
 	INIT_MACHINE(ixdp425_init)
 MACHINE_END
@@ -123,6 +124,7 @@
 		IXP4XX_PERIPHERAL_BASE_VIRT)
 	MAPIO(ixdp425_map_io)
 	INITIRQ(ixp4xx_init_irq)
+	INITTIME(ixp4xx_init_time)
 	BOOT_PARAMS(0x0100)
 	INIT_MACHINE(ixdp425_init)
 MACHINE_END
@@ -140,6 +142,7 @@
 		IXP4XX_PERIPHERAL_BASE_VIRT)
 	MAPIO(ixdp425_map_io)
 	INITIRQ(ixp4xx_init_irq)
+	INITTIME(ixp4xx_init_time)
 	BOOT_PARAMS(0x0100)
 	INIT_MACHINE(ixdp425_init)
 MACHINE_END
--- diff/arch/arm/mach-ixp4xx/prpmc1100-setup.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-ixp4xx/prpmc1100-setup.c	2004-07-01 21:32:30.000000000 +0100
@@ -84,6 +84,7 @@
                 IXP4XX_PERIPHERAL_BASE_VIRT)
         MAPIO(prpmc1100_map_io)
         INITIRQ(ixp4xx_init_irq)
+	INITTIME(ixp4xx_init_time)
         BOOT_PARAMS(0x0100)
 	INIT_MACHINE(prpmc1100_init)
 MACHINE_END
--- diff/arch/arm/mach-lh7a40x/Kconfig	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-lh7a40x/Kconfig	2004-07-01 21:32:30.000000000 +0100
@@ -34,6 +34,37 @@
 config ARCH_LH7A404
 	bool
 
+config LH7A40X_CONTIGMEM
+	bool "Disable NUMA Support"
+	depends on ARCH_LH7A40X
+	help
+	  Say Y here if your bootloader sets the SROMLL bit(s) in
+	  the SDRAM controller, organizing memory as a contiguous
+	  array.  This option will disable CONFIG_DISCONTIGMEM and
+          force the kernel to manage all memory in one node.
+
+	  Setting this option incorrectly may prevent the kernel from
+	  booting.  It is OK to leave it N.
+
+	  For more information, consult
+	    <file:Documentation/arm/Sharp-LH/SDRAM>.
+
+config LH7A40X_ONE_BANK_PER_NODE
+	bool "Optimize NUMA Node Tables for Size"
+	depends on ARCH_LH7A40X && !LH7A40X_CONTIGMEM
+	help
+	  Say Y here to produce compact memory node tables.  By
+	  default pairs of adjacent physical RAM banks are managed
+	  together in a single node, incurring some wasted overhead
+	  in the node tables, however also maintaining compatibility
+	  with systems where physical memory is truly contiguous.
+
+	  Setting this option incorrectly may prevent the kernel from
+	  booting.  It is OK to leave it N.
+
+	  For more information, consult
+	    <file:Documentation/arm/Sharp-LH/SDRAM>.
+
 endmenu
 
 endif
--- diff/arch/arm/mach-lh7a40x/Makefile	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-lh7a40x/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -4,7 +4,7 @@
 
 # Object file lists.
 
-obj-y			:= fiq.o
+obj-y			:= fiq.o time.o
 # generic.o
 obj-$(CONFIG_MACH_KEV7A400) += arch-kev7a400.o irq-lh7a400.o
 obj-$(CONFIG_MACH_LPD7A400) += arch-lpd7a40x.o ide-lpd7a40x.o irq-lh7a400.o
--- diff/arch/arm/mach-lh7a40x/arch-kev7a400.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-lh7a40x/arch-kev7a400.c	2004-07-01 21:32:30.000000000 +0100
@@ -25,6 +25,7 @@
 
       /* This function calls the board specific IRQ initialization function. */
 extern void lh7a400_init_irq (void);
+extern void lh7a40x_init_time (void);
 
 static struct map_desc kev7a400_io_desc[] __initdata = {
 	{ IO_VIRT,    IO_PHYS,    IO_SIZE,    MT_DEVICE },
@@ -108,4 +109,5 @@
 	BOOT_PARAMS (0xc0000100)
 	MAPIO (kev7a400_map_io)
 	INITIRQ (lh7a400_init_irq)
+	INITTIME (lh7a40x_init_time)
 MACHINE_END
--- diff/arch/arm/mach-lh7a40x/arch-lpd7a40x.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-lh7a40x/arch-lpd7a40x.c	2004-07-01 21:32:30.000000000 +0100
@@ -280,6 +280,7 @@
 #ifdef CONFIG_MACH_LPD7A404
 
 extern void lh7a404_init_irq (void);
+extern void lh7a40x_init_time (void);
 
 MACHINE_START (LPD7A404, "Logic Product Development LPD7A404-10")
 	MAINTAINER ("Marc Singer")
@@ -287,6 +288,7 @@
 	BOOT_PARAMS (0xc0000100)
 	MAPIO (lpd7a400_map_io)
 	INITIRQ (lh7a404_init_irq)
+	INITTIME (lh7a40x_init_time)
 	INIT_MACHINE (lpd7a40x_init)
 MACHINE_END
 
--- diff/arch/arm/mach-omap/Makefile	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-omap/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := common.o irq.o dma.o clocks.o mux.o bus.o gpio.o
+obj-y := common.o irq.o dma.o clocks.o mux.o bus.o gpio.o time.o
 obj-m :=
 obj-n :=
 obj-  :=
--- diff/arch/arm/mach-omap/board-generic.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-omap/board-generic.c	2004-07-01 21:32:30.000000000 +0100
@@ -65,6 +65,11 @@
 	omap_map_io();
 }
 
+static void __init omap_generic_init_time(void)
+{
+	omap_init_time();
+}
+
 MACHINE_START(OMAP_GENERIC, "Generic OMAP-1510/1610/1710")
 	MAINTAINER("Tony Lindgren <tony@atomide.com>")
 	BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000)
@@ -72,4 +77,6 @@
 	MAPIO(omap_generic_map_io)
 	INITIRQ(omap_generic_init_irq)
 	INIT_MACHINE(omap_generic_init)
+	INITTIME(omap_generic_init_time)
 MACHINE_END
+
--- diff/arch/arm/mach-omap/board-innovator.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-omap/board-innovator.c	2004-07-01 21:32:30.000000000 +0100
@@ -156,5 +156,6 @@
 	BOOT_PARAMS(0x10000100)
 	MAPIO(innovator_map_io)
 	INITIRQ(innovator_init_irq)
+	INITTIME(omap_init_time)
 	INIT_MACHINE(innovator_init)
 MACHINE_END
--- diff/arch/arm/mach-omap/board-osk.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-omap/board-osk.c	2004-07-01 21:32:30.000000000 +0100
@@ -94,5 +94,6 @@
 	BOOT_PARAMS(0x10000100)
 	MAPIO(osk_map_io)
 	INITIRQ(osk_init_irq)
+	INITTIME(omap_init_time)
 	INIT_MACHINE(osk_init)
 MACHINE_END
--- diff/arch/arm/mach-omap/board-perseus2.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-omap/board-perseus2.c	2004-07-01 21:32:30.000000000 +0100
@@ -111,5 +111,6 @@
 	BOOT_PARAMS(0x10000100)
 	MAPIO(omap_perseus2_map_io)
 	INITIRQ(omap_perseus2_init_irq)
+	INITTIME(omap_init_time)
 	INIT_MACHINE(omap_perseus2_init)
 MACHINE_END
--- diff/arch/arm/mach-omap/bus.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-omap/bus.c	2004-07-01 21:32:30.000000000 +0100
@@ -81,40 +81,6 @@
 	},
 };
 
-#ifdef CONFIG_ARCH_OMAP1510
-/*
- * NOTE: This code _should_ go somewhere else. But let's wait for the
- *	 dma-mapping code to settle down first.
- */
-
-/*
- * Test for Local Bus device in order to do address translation between
- * dma_handle and Local Bus address.
- */
-inline int dmadev_uses_omap_lbus(struct device * dev)
-{
-	if (dev == NULL || !cpu_is_omap1510())
-		return 0;
-	return dev->bus == &omap_bus_types[OMAP_BUS_LBUS] ? 1 : 0;
-}
-
-/*
- * Translate bus address to Local Bus address for dma-mapping
- */
-inline int dmadev_to_lbus(dma_addr_t addr)
-{
-	return bus_to_lbus(addr);
-}
-
-/*
- * Translate Local Bus address to bus address for dma-mapping
- */
-inline int lbus_to_dmadev(dma_addr_t addr)
-{
-	return lbus_to_bus(addr);
-}
-#endif
-
 static int omap_bus_match(struct device *dev, struct device_driver *drv)
 {
 	struct omap_dev *omapdev = OMAP_DEV(dev);
@@ -278,8 +244,3 @@
 EXPORT_SYMBOL(omap_device_register);
 EXPORT_SYMBOL(omap_device_unregister);
 
-#ifdef CONFIG_ARCH_OMAP1510
-EXPORT_SYMBOL(dmadev_uses_omap_lbus);
-EXPORT_SYMBOL(dmadev_to_lbus);
-EXPORT_SYMBOL(lbus_to_dmadev);
-#endif
--- diff/arch/arm/mach-omap/common.h	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-omap/common.h	2004-07-01 21:32:30.000000000 +0100
@@ -28,6 +28,7 @@
 #define __ARCH_ARM_MACH_OMAP_COMMON_H
 
 extern void omap_map_io(void);
+extern void omap_init_time(void);
 
 #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
 
--- diff/arch/arm/mach-pxa/Makefile	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-pxa/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -3,7 +3,7 @@
 #
 
 # Common support (must be linked before board specific support)
-obj-y += generic.o irq.o dma.o
+obj-y += generic.o irq.o dma.o time.o
 obj-$(CONFIG_PXA25x) += pxa25x.o
 obj-$(CONFIG_PXA27x) += pxa27x.o
 
--- diff/arch/arm/mach-pxa/generic.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-pxa/generic.c	2004-07-01 21:32:30.000000000 +0100
@@ -59,6 +59,24 @@
 EXPORT_SYMBOL(pxa_gpio_mode);
 
 /*
+ * Routine to safely enable or disable a clock in the CKEN
+ */
+void pxa_set_cken(int clock, int enable)
+{
+	unsigned long flags;
+	local_irq_save(flags);
+
+	if (enable)
+		CKEN |= clock;
+	else
+		CKEN &= ~clock;
+
+	local_irq_restore(flags);
+}
+
+EXPORT_SYMBOL(pxa_set_cken);
+
+/*
  * Intel PXA2xx internal register mapping.
  *
  * Note 1: not all PXA2xx variants implement all those addresses.
@@ -180,10 +198,26 @@
 	.resource	= pxafb_resources,
 };
 
+static struct platform_device ffuart_device = {
+	.name		= "pxa2xx-uart",
+	.id		= 0,
+};
+static struct platform_device btuart_device = {
+	.name		= "pxa2xx-uart",
+	.id		= 1,
+};
+static struct platform_device stuart_device = {
+	.name		= "pxa2xx-uart",
+	.id		= 2,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&pxamci_device,
 	&udc_device,
 	&pxafb_device,
+	&ffuart_device,
+	&btuart_device,
+	&stuart_device,
 };
 
 static int __init pxa_init(void)
--- diff/arch/arm/mach-pxa/generic.h	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-pxa/generic.h	2004-07-01 21:32:30.000000000 +0100
@@ -11,6 +11,7 @@
 
 extern void __init pxa_map_io(void);
 extern void __init pxa_init_irq(void);
+extern void __init pxa_init_time(void);
 
 #define SET_BANK(__nr,__start,__size) \
 	mi->bank[__nr].start = (__start), \
--- diff/arch/arm/mach-pxa/idp.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-pxa/idp.c	2004-07-01 21:32:30.000000000 +0100
@@ -118,5 +118,6 @@
 	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
 	MAPIO(idp_map_io)
 	INITIRQ(idp_init_irq)
+	INITTIME(pxa_init_time)
 	INIT_MACHINE(idp_init)
 MACHINE_END
--- diff/arch/arm/mach-pxa/lubbock.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-pxa/lubbock.c	2004-07-01 21:32:30.000000000 +0100
@@ -220,5 +220,6 @@
 	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
 	MAPIO(lubbock_map_io)
 	INITIRQ(lubbock_init_irq)
+	INITTIME(pxa_init_time)
 	INIT_MACHINE(lubbock_init)
 MACHINE_END
--- diff/arch/arm/mach-pxa/mainstone.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-pxa/mainstone.c	2004-07-01 21:32:30.000000000 +0100
@@ -18,6 +18,7 @@
 #include <linux/interrupt.h>
 #include <linux/sched.h>
 #include <linux/bitops.h>
+#include <linux/fb.h>
 
 #include <asm/types.h>
 #include <asm/setup.h>
@@ -31,6 +32,7 @@
 #include <asm/mach/irq.h>
 
 #include <asm/arch/mainstone.h>
+#include <asm/arch/pxafb.h>
 
 #include "generic.h"
 
@@ -116,9 +118,66 @@
 	.resource	= smc91x_resources,
 };
 
+
+static void mainstone_backlight_power(int on)
+{
+	if (on) {
+		pxa_gpio_mode(GPIO16_PWM0_MD);
+		pxa_set_cken(CKEN0_PWM0, 1);
+		PWM_CTRL0 = 0;
+		PWM_PWDUTY0 = 0x3ff;
+		PWM_PERVAL0 = 0x3ff;
+	} else {
+		PWM_CTRL0 = 0;
+		PWM_PWDUTY0 = 0x0;
+		PWM_PERVAL0 = 0x3FF;
+		pxa_set_cken(CKEN0_PWM0, 0);
+	}
+}
+
+static struct pxafb_mach_info toshiba_ltm04c380k __initdata = {
+	.pixclock		= 50000,
+	.xres			= 640,
+	.yres			= 480,
+	.bpp			= 16,
+	.hsync_len		= 1,
+	.left_margin		= 0x9f,
+	.right_margin		= 1,
+	.vsync_len		= 44,
+	.upper_margin		= 0,
+	.lower_margin		= 0,
+	.sync			= FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,
+	.lccr0			= LCCR0_Act,
+	.lccr3			= LCCR3_PCP,
+	.pxafb_backlight_power	= mainstone_backlight_power,
+};
+
+static struct pxafb_mach_info toshiba_ltm035a776c __initdata = {
+	.pixclock		= 110000,
+	.xres			= 240,
+	.yres			= 320,
+	.bpp			= 16,
+	.hsync_len		= 4,
+	.left_margin		= 8,
+	.right_margin		= 20,
+	.vsync_len		= 3,
+	.upper_margin		= 1,
+	.lower_margin		= 10,
+	.sync			= FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,
+	.lccr0			= LCCR0_Act,
+	.lccr3			= LCCR3_PCP,
+	.pxafb_backlight_power	= mainstone_backlight_power,
+};
+
 static void __init mainstone_init(void)
 {
 	platform_add_device(&smc91x_device);
+
+	/* reading the BSR might be handy to select LCD type here */
+	if (0)
+		set_pxa_fb_info(&toshiba_ltm04c380k);
+	else
+		set_pxa_fb_info(&toshiba_ltm035a776c);
 }
 
 
@@ -137,5 +196,6 @@
 	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
 	MAPIO(mainstone_map_io)
 	INITIRQ(mainstone_init_irq)
+	INITTIME(pxa_init_time)
 	INIT_MACHINE(mainstone_init)
 MACHINE_END
--- diff/arch/arm/mach-rpc/riscpc.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-rpc/riscpc.c	2004-07-01 21:32:30.000000000 +0100
@@ -14,6 +14,8 @@
 #include <linux/delay.h>
 #include <linux/pm.h>
 #include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
 
 #include <asm/elf.h>
 #include <asm/io.h>
@@ -25,6 +27,7 @@
 
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
+#include <asm/mach/time.h>
 
 extern void rpc_init_irq(void);
 
@@ -82,6 +85,31 @@
 	elf_hwcap &= ~HWCAP_HALF;
 }
 
+static irqreturn_t
+rpc_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction rpc_timer_irq = {
+	.name		= "RiscPC Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= rpc_timer_interrupt
+};
+
+/*
+ * Set up timer interrupt.
+ */
+void __init rpc_init_time(void)
+{
+	extern void ioctime_init(void);
+	ioctime_init();
+
+	setup_irq(IRQ_TIMER, &rpc_timer_irq);
+}
+
 MACHINE_START(RISCPC, "Acorn-RiscPC")
 	MAINTAINER("Russell King")
 	BOOT_MEM(0x10000000, 0x03000000, 0xe0000000)
@@ -90,4 +118,5 @@
 	DISABLE_PARPORT(1)
 	MAPIO(rpc_map_io)
 	INITIRQ(rpc_init_irq)
+	INITTIME(rpc_init_time)
 MACHINE_END
--- diff/arch/arm/mach-s3c2410/Makefile	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-s3c2410/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -4,7 +4,7 @@
 
 # Object file lists.
 
-obj-y			:= s3c2410.o irq.o
+obj-y			:= s3c2410.o irq.o time.o
 obj-m			:=
 obj-n			:=
 obj-			:=
--- diff/arch/arm/mach-s3c2410/mach-bast.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-s3c2410/mach-bast.c	2004-07-01 21:32:30.000000000 +0100
@@ -185,10 +185,16 @@
 
 }
 
+void __init bast_init_time(void)
+{
+	s3c2410_init_time();
+}
+
 MACHINE_START(BAST, "Simtec-BAST")
      MAINTAINER("Ben Dooks <ben@simtec.co.uk>")
      BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(bast_map_io)
      INITIRQ(bast_init_irq)
+     INITTIME(bast_init_time)
 MACHINE_END
--- diff/arch/arm/mach-s3c2410/mach-h1940.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-s3c2410/mach-h1940.c	2004-07-01 21:32:30.000000000 +0100
@@ -91,10 +91,16 @@
 
 }
 
+void __init ipaq_init_time(void)
+{
+	s3c2410_init_time();
+}
+
 MACHINE_START(H1940, "IPAQ-H1940")
      MAINTAINER("Ben Dooks <ben@fluff.org>")
      BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(ipaq_map_io)
      INITIRQ(ipaq_init_irq)
+     INITTIME(ipaq_init_time)
 MACHINE_END
--- diff/arch/arm/mach-s3c2410/mach-smdk2410.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-s3c2410/mach-smdk2410.c	2004-07-01 21:32:30.000000000 +0100
@@ -99,6 +99,11 @@
 	s3c2410_init_irq();
 }
 
+void __init smdk2410_init_time(void)
+{
+	s3c2401_init_time();
+}
+
 MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch
 				    * to SMDK2410 */
      MAINTAINER("Jonas Dietsche")
@@ -106,4 +111,5 @@
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(smdk2410_map_io)
      INITIRQ(smdk2410_init_irq)
+     INITTIME(smdk2410_init_time)
 MACHINE_END
--- diff/arch/arm/mach-s3c2410/mach-vr1000.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-s3c2410/mach-vr1000.c	2004-07-01 21:32:30.000000000 +0100
@@ -155,10 +155,16 @@
 
 }
 
+void __init vr1000_init_time(void)
+{
+	s3c2401_init_time();
+}
+
 MACHINE_START(VR1000, "Simtec-VR1000")
      MAINTAINER("Ben Dooks <ben@simtec.co.uk>")
      BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(vr1000_map_io)
      INITIRQ(vr1000_init_irq)
+     INITTIME(vr1000_init_time)
 MACHINE_END
--- diff/arch/arm/mach-s3c2410/s3c2410.h	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-s3c2410/s3c2410.h	2004-07-01 21:32:30.000000000 +0100
@@ -4,3 +4,5 @@
 
 extern void s3c2410_init_irq(void);
 
+extern s3c2410_init_time(void);
+
--- diff/arch/arm/mach-sa1100/Makefile	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-sa1100/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := generic.o irq.o dma.o
+obj-y := generic.o irq.o dma.o time.o
 obj-m :=
 obj-n :=
 obj-  :=
--- diff/arch/arm/mach-sa1100/adsbitsy.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-sa1100/adsbitsy.c	2004-07-01 21:32:30.000000000 +0100
@@ -147,4 +147,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(adsbitsy_map_io)
 	INITIRQ(adsbitsy_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/assabet.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-sa1100/assabet.c	2004-07-01 21:32:30.000000000 +0100
@@ -324,5 +324,6 @@
 	FIXUP(fixup_assabet)
 	MAPIO(assabet_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 	INIT_MACHINE(assabet_init)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/badge4.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-sa1100/badge4.c	2004-07-01 21:32:30.000000000 +0100
@@ -245,4 +245,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(badge4_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/brutus.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-sa1100/brutus.c	2004-07-01 21:32:30.000000000 +0100
@@ -37,4 +37,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(brutus_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/cerf.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-sa1100/cerf.c	2004-07-01 21:32:30.000000000 +0100
@@ -92,4 +92,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(cerf_map_io)
 	INITIRQ(cerf_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/empeg.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-sa1100/empeg.c	2004-07-01 21:32:30.000000000 +0100
@@ -35,4 +35,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(empeg_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/flexanet.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-sa1100/flexanet.c	2004-07-01 21:32:30.000000000 +0100
@@ -183,5 +183,6 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(flexanet_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
 
--- diff/arch/arm/mach-sa1100/freebird.c	2004-05-19 22:10:56.000000000 +0100
+++ source/arch/arm/mach-sa1100/freebird.c	2004-07-01 21:32:30.000000000 +0100
@@ -77,4 +77,5 @@
 #endif
 	MAPIO(freebird_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/generic.h	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-sa1100/generic.h	2004-07-01 21:32:30.000000000 +0100
@@ -6,6 +6,7 @@
 
 extern void __init sa1100_map_io(void);
 extern void __init sa1100_init_irq(void);
+extern void __init sa1100_init_time(void);
 
 #define SET_BANK(__nr,__start,__size) \
 	mi->bank[__nr].start = (__start), \
--- diff/arch/arm/mach-sa1100/graphicsclient.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/graphicsclient.c	2004-07-01 21:32:30.000000000 +0100
@@ -198,4 +198,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(graphicsclient_map_io)
 	INITIRQ(graphicsclient_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/graphicsmaster.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/graphicsmaster.c	2004-07-01 21:32:30.000000000 +0100
@@ -287,4 +287,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(graphicsmaster_map_io)
 	INITIRQ(graphicsmaster_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/h3600.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/h3600.c	2004-07-01 21:32:30.000000000 +0100
@@ -286,6 +286,7 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(h3100_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
 
 #endif /* CONFIG_SA1100_H3100 */
@@ -400,6 +401,7 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(h3600_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
 
 #endif /* CONFIG_SA1100_H3600 */
@@ -783,6 +785,7 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(h3800_map_io)
 	INITIRQ(h3800_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
 
 #endif /* CONFIG_SA1100_H3800 */
--- diff/arch/arm/mach-sa1100/hackkit.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/hackkit.c	2004-07-01 21:32:30.000000000 +0100
@@ -174,4 +174,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(hackkit_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/huw_webpanel.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/huw_webpanel.c	2004-07-01 21:32:30.000000000 +0100
@@ -81,4 +81,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(huw_webpanel_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/itsy.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/itsy.c	2004-07-01 21:32:30.000000000 +0100
@@ -37,4 +37,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(itsy_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/jornada720.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/jornada720.c	2004-07-01 21:32:30.000000000 +0100
@@ -101,4 +101,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(jornada720_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/lart.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/lart.c	2004-07-01 21:32:30.000000000 +0100
@@ -43,4 +43,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(lart_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/nanoengine.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/nanoengine.c	2004-07-01 21:32:30.000000000 +0100
@@ -49,4 +49,5 @@
 	FIXUP(fixup_nanoengine)
 	MAPIO(nanoengine_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/omnimeter.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/omnimeter.c	2004-07-01 21:32:30.000000000 +0100
@@ -59,4 +59,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(omnimeter_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/pangolin.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/pangolin.c	2004-07-01 21:32:30.000000000 +0100
@@ -40,4 +40,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(pangolin_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/pfs168.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/pfs168.c	2004-07-01 21:32:30.000000000 +0100
@@ -112,4 +112,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(pfs168_map_io)
 	INITIRQ(pfs168_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/pleb.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/pleb.c	2004-07-01 21:32:30.000000000 +0100
@@ -31,4 +31,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(pleb_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/shannon.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/shannon.c	2004-07-01 21:32:30.000000000 +0100
@@ -41,4 +41,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(shannon_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/sherman.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/sherman.c	2004-07-01 21:32:30.000000000 +0100
@@ -27,4 +27,5 @@
         BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
         MAPIO(sherman_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/simpad.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/simpad.c	2004-07-01 21:32:30.000000000 +0100
@@ -231,4 +231,5 @@
         BOOT_PARAMS(0xc0000100)
 	MAPIO(simpad_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/stork.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/stork.c	2004-07-01 21:32:30.000000000 +0100
@@ -331,6 +331,7 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(stork_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
 
 
--- diff/arch/arm/mach-sa1100/system3.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/system3.c	2004-07-01 21:32:30.000000000 +0100
@@ -470,4 +470,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(system3_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/trizeps.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/trizeps.c	2004-07-01 21:32:30.000000000 +0100
@@ -228,4 +228,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(trizeps_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/xp860.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/xp860.c	2004-07-01 21:32:30.000000000 +0100
@@ -89,4 +89,5 @@
 	BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
 	MAPIO(xp860_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-sa1100/yopy.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-sa1100/yopy.c	2004-07-01 21:32:30.000000000 +0100
@@ -91,4 +91,5 @@
 	BOOT_PARAMS(0xc0000100)
 	MAPIO(yopy_map_io)
 	INITIRQ(sa1100_init_irq)
+	INITTIME(sa1100_init_time)
 MACHINE_END
--- diff/arch/arm/mach-shark/core.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-shark/core.c	2004-07-01 21:32:30.000000000 +0100
@@ -5,13 +5,18 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
 
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <asm/leds.h>
+#include <asm/param.h>
 
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
+#include <asm/mach/time.h>
 
 extern void shark_init_irq(void);
 
@@ -24,10 +29,43 @@
 	iotable_init(shark_io_desc, ARRAY_SIZE(shark_io_desc));
 }
 
+#define IRQ_TIMER 0
+#define HZ_TIME ((1193180 + HZ/2) / HZ)
+
+static irqreturn_t
+shark_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction shark_timer_irq = {
+	.name		= "Shark Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= shark_timer_interrupt
+};
+
+/*
+ * Set up timer interrupt, and return the current time in seconds.
+ */
+void __init shark_init_time(void)
+{
+        unsigned long flags;
+
+	outb(0x34, 0x43);               /* binary, mode 0, LSB/MSB, Ch 0 */
+	outb(HZ_TIME & 0xff, 0x40);     /* LSB of count */
+	outb(HZ_TIME >> 8, 0x40);
+
+	setup_irq(IRQ_TIMER, &shark_timer_irq);
+}
+
+
 MACHINE_START(SHARK, "Shark")
 	MAINTAINER("Alexander Schulz")
 	BOOT_MEM(0x08000000, 0x40000000, 0xe0000000)
 	BOOT_PARAMS(0x08003000)
 	MAPIO(shark_map_io)
 	INITIRQ(shark_init_irq)
+	INITTIME(shark_init_time)
 MACHINE_END
--- diff/arch/arm/mach-versatile/Makefile	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-versatile/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -2,4 +2,4 @@
 # Makefile for the linux kernel.
 #
 
-obj-y					:= core.o
+obj-y					:= core.o clock.o
--- diff/arch/arm/mach-versatile/core.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-versatile/core.c	2004-07-01 21:32:30.000000000 +0100
@@ -22,7 +22,9 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/sysdev.h>
+#include <linux/interrupt.h>
 
+#include <asm/system.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -33,6 +35,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/irq.h>
+#include <asm/mach/time.h>
 #include <asm/mach/map.h>
 #ifdef CONFIG_MMC
 #include <asm/mach/mmc.h>
@@ -500,8 +503,8 @@
 {
 	int i;
 
-	platform_add_device(&versatile_flash_device);
-	platform_add_device(&smc91x_device);
+	platform_device_register(&versatile_flash_device);
+	platform_device_register(&smc91x_device);
 
 	for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
 		struct amba_device *d = amba_devs[i];
@@ -511,11 +514,153 @@
 	leds_event = versatile_leds_event;
 }
 
+/*
+ * Where is the timer (VA)?
+ */
+#define TIMER0_VA_BASE		 IO_ADDRESS(VERSATILE_TIMER0_1_BASE)
+#define TIMER1_VA_BASE		(IO_ADDRESS(VERSATILE_TIMER0_1_BASE) + 0x20)
+#define TIMER2_VA_BASE		 IO_ADDRESS(VERSATILE_TIMER2_3_BASE)
+#define TIMER3_VA_BASE		(IO_ADDRESS(VERSATILE_TIMER2_3_BASE) + 0x20)
+#define VA_IC_BASE		 IO_ADDRESS(VERSATILE_VIC_BASE) 
+
+/*
+ * How long is the timer interval?
+ */
+#define TIMER_INTERVAL	(TICKS_PER_uSEC * mSEC_10)
+#if TIMER_INTERVAL >= 0x100000
+#define TIMER_RELOAD	(TIMER_INTERVAL >> 8)		/* Divide by 256 */
+#define TIMER_CTRL	0x88				/* Enable, Clock / 256 */
+#define TICKS2USECS(x)	(256 * (x) / TICKS_PER_uSEC)
+#elif TIMER_INTERVAL >= 0x10000
+#define TIMER_RELOAD	(TIMER_INTERVAL >> 4)		/* Divide by 16 */
+#define TIMER_CTRL	0x84				/* Enable, Clock / 16 */
+#define TICKS2USECS(x)	(16 * (x) / TICKS_PER_uSEC)
+#else
+#define TIMER_RELOAD	(TIMER_INTERVAL)
+#define TIMER_CTRL	0x80				/* Enable */
+#define TICKS2USECS(x)	((x) / TICKS_PER_uSEC)
+#endif
+
+#define TIMER_CTRL_IE	(1 << 5)	/* Interrupt Enable */
+
+/*
+ * What does it look like?
+ */
+typedef struct TimerStruct {
+	unsigned long TimerLoad;
+	unsigned long TimerValue;
+	unsigned long TimerControl;
+	unsigned long TimerClear;
+} TimerStruct_t;
+
+extern unsigned long (*gettimeoffset)(void);
+
+/*
+ * Returns number of ms since last clock interrupt.  Note that interrupts
+ * will have been disabled by do_gettimeoffset()
+ */
+static unsigned long versatile_gettimeoffset(void)
+{
+	volatile TimerStruct_t *timer0 = (TimerStruct_t *)TIMER0_VA_BASE;
+	unsigned long ticks1, ticks2, status;
+
+	/*
+	 * Get the current number of ticks.  Note that there is a race
+	 * condition between us reading the timer and checking for
+	 * an interrupt.  We get around this by ensuring that the
+	 * counter has not reloaded between our two reads.
+	 */
+	ticks2 = timer0->TimerValue & 0xffff;
+	do {
+		ticks1 = ticks2;
+		status = __raw_readl(VA_IC_BASE + VIC_IRQ_RAW_STATUS);
+		ticks2 = timer0->TimerValue & 0xffff;
+	} while (ticks2 > ticks1);
+
+	/*
+	 * Number of ticks since last interrupt.
+	 */
+	ticks1 = TIMER_RELOAD - ticks2;
+
+	/*
+	 * Interrupt pending?  If so, we've reloaded once already.
+	 *
+	 * FIXME: Need to check this is effectively timer 0 that expires
+	 */
+	if (status & IRQMASK_TIMERINT0_1)
+		ticks1 += TIMER_RELOAD;
+
+	/*
+	 * Convert the ticks to usecs
+	 */
+	return TICKS2USECS(ticks1);
+}
+
+/*
+ * IRQ handler for the timer
+ */
+static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	volatile TimerStruct_t *timer0 = (volatile TimerStruct_t *)TIMER0_VA_BASE;
+
+	// ...clear the interrupt
+	timer0->TimerClear = 1;
+
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction versatile_timer_irq = {
+	.name		= "Versatile Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= versatile_timer_interrupt
+};
+
+/*
+ * Set up timer interrupt, and return the current time in seconds.
+ */
+void __init versatile_init_time(void)
+{
+	volatile TimerStruct_t *timer0 = (volatile TimerStruct_t *)TIMER0_VA_BASE;
+	volatile TimerStruct_t *timer1 = (volatile TimerStruct_t *)TIMER1_VA_BASE;
+	volatile TimerStruct_t *timer2 = (volatile TimerStruct_t *)TIMER2_VA_BASE;
+	volatile TimerStruct_t *timer3 = (volatile TimerStruct_t *)TIMER3_VA_BASE;
+
+	/* 
+	 * set clock frequency: 
+	 *	VERSATILE_REFCLK is 32KHz
+	 *	VERSATILE_TIMCLK is 1MHz
+	 */
+	*(volatile unsigned int *)IO_ADDRESS(VERSATILE_SCTL_BASE) |= 
+	  ((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | 
+	   (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel));
+
+	/*
+	 * Initialise to a known state (all timers off)
+	 */
+	timer0->TimerControl = 0;
+	timer1->TimerControl = 0;
+	timer2->TimerControl = 0;
+	timer3->TimerControl = 0;
+
+	timer0->TimerLoad    = TIMER_RELOAD;
+	timer0->TimerValue   = TIMER_RELOAD;
+	timer0->TimerControl = TIMER_CTRL | 0x40 | TIMER_CTRL_IE;  /* periodic + IE */
+
+	/* 
+	 * Make irqs happen for the system timer
+	 */
+	setup_irq(IRQ_TIMERINT0_1, &versatile_timer_irq);
+	gettimeoffset = versatile_gettimeoffset;
+}
+
 MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
 	MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd")
 	BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000)
 	BOOT_PARAMS(0x00000100)
 	MAPIO(versatile_map_io)
 	INITIRQ(versatile_init_irq)
+	INITTIME(versatile_init_time)
 	INIT_MACHINE(versatile_init)
 MACHINE_END
--- diff/arch/arm/mm/Kconfig	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mm/Kconfig	2004-07-01 21:32:30.000000000 +0100
@@ -220,7 +220,7 @@
 # XScale
 config CPU_XSCALE
 	bool
-	depends on ARCH_IOP3XX || ARCH_ADIFCC || ARCH_PXA || ARCH_IXP4XX
+	depends on ARCH_IOP3XX || ARCH_PXA || ARCH_IXP4XX
 	default y
 	select CPU_32v5
 	select CPU_ABRT_EV5T
--- diff/arch/arm/mm/consistent.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mm/consistent.c	2004-07-01 21:32:30.000000000 +0100
@@ -194,7 +194,7 @@
 		/*
 		 * Set the "dma handle"
 		 */
-		*handle = page_to_bus(page);
+		*handle = page_to_dma(dev, page);
 
 		do {
 			BUG_ON(!pte_none(*pte));
--- diff/arch/arm/mm/init.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mm/init.c	2004-07-01 21:32:30.000000000 +0100
@@ -58,7 +58,7 @@
 
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 
 	for (node = 0; node < numnodes; node++) {
 		struct page *page, *end;
--- diff/arch/arm26/kernel/init_task.c	2004-05-19 22:10:58.000000000 +0100
+++ source/arch/arm26/kernel/init_task.c	2004-07-01 21:32:30.000000000 +0100
@@ -10,6 +10,7 @@
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/init_task.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/arm26/kernel/irq.c	2004-05-19 22:10:58.000000000 +0100
+++ source/arch/arm26/kernel/irq.c	2004-07-01 21:32:30.000000000 +0100
@@ -549,7 +549,7 @@
 
 	action->handler = handler;
 	action->flags = irq_flags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/arm26/kernel/setup.c	2004-05-19 22:10:58.000000000 +0100
+++ source/arch/arm26/kernel/setup.c	2004-07-01 21:32:30.000000000 +0100
@@ -76,7 +76,6 @@
 
 unsigned char aux_device_present;
 char elf_platform[ELF_PLATFORM_SIZE];
-char saved_command_line[COMMAND_LINE_SIZE];
 
 unsigned long phys_initrd_start __initdata = 0;
 unsigned long phys_initrd_size __initdata = 0;
--- diff/arch/arm26/mm/init.c	2004-05-19 22:10:58.000000000 +0100
+++ source/arch/arm26/mm/init.c	2004-07-01 21:32:30.000000000 +0100
@@ -67,7 +67,7 @@
 
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 
 
 	page = NODE_MEM_MAP(0);
--- diff/arch/cris/arch-v10/kernel/time.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/cris/arch-v10/kernel/time.c	2004-07-01 21:32:30.000000000 +0100
@@ -253,7 +253,7 @@
  */
 
 static struct irqaction irq2  = { timer_interrupt, SA_SHIRQ | SA_INTERRUPT,
-				  0, "timer", NULL, NULL};
+				  CPU_MASK_NONE, "timer", NULL, NULL};
 
 void __init
 time_init(void)
--- diff/arch/cris/kernel/irq.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/cris/kernel/irq.c	2004-07-01 21:32:30.000000000 +0100
@@ -240,7 +240,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/cris/kernel/process.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/cris/kernel/process.c	2004-07-01 21:32:30.000000000 +0100
@@ -112,6 +112,7 @@
 #include <linux/fs.h>
 #include <linux/user.h>
 #include <linux/elfcore.h>
+#include <linux/mqueue.h>
 
 //#define DEBUG
 
--- diff/arch/cris/kernel/setup.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/cris/kernel/setup.c	2004-07-01 21:32:30.000000000 +0100
@@ -18,6 +18,8 @@
 #include <linux/seq_file.h>
 #include <linux/tty.h>
 
+#include <asm/setup.h>
+
 /*
  * Setup options
  */
@@ -29,10 +31,7 @@
 extern int root_mountflags;
 extern char _etext, _edata, _end;
 
-#define COMMAND_LINE_SIZE 256
-
 static char command_line[COMMAND_LINE_SIZE] = { 0, };
-       char saved_command_line[COMMAND_LINE_SIZE];
 
 extern const unsigned long text_start, edata; /* set by the linker script */
 extern unsigned long dram_start, dram_end;
--- diff/arch/cris/mm/init.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/cris/mm/init.c	2004-07-01 21:32:30.000000000 +0100
@@ -138,7 +138,7 @@
 
 	printk("\nMem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	i = max_mapnr;
 	while (i-- > 0) {
 		total++;
--- diff/arch/h8300/Kconfig	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/h8300/Kconfig	2004-07-01 21:32:30.000000000 +0100
@@ -223,7 +223,7 @@
 
 config CONFIG_SH_STANDARD_BIOS
 	bool "Use gdb protocol serial console"
-	depends on (!H8300H_SIM && H8S_SIM)
+	depends on (!H8300H_SIM && !H8S_SIM)
 	help
 	  serial console output using GDB protocol.
 	  Require eCos/RedBoot
--- diff/arch/h8300/kernel/init_task.c	2004-05-19 22:10:59.000000000 +0100
+++ source/arch/h8300/kernel/init_task.c	2004-07-01 21:32:30.000000000 +0100
@@ -7,6 +7,7 @@
 #include <linux/init.h>
 #include <linux/init_task.h>
 #include <linux/fs.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/h8300/kernel/ptrace.c	2004-05-19 22:10:59.000000000 +0100
+++ source/arch/h8300/kernel/ptrace.c	2004-07-01 21:32:30.000000000 +0100
@@ -116,18 +116,36 @@
 		case PTRACE_PEEKUSR: {
 			unsigned long tmp;
 			
-			if ((addr & 3) || addr < 0 || addr >= sizeof(struct user))
+			if ((addr & 3) || addr < 0 || addr >= sizeof(struct user)) {
 				ret = -EIO;
+				break ;
+			}
 			
-			tmp = 0;  /* Default return condition */
+		        ret = 0;  /* Default return condition */
 			addr = addr >> 2; /* temporary hack. */
+
 			if (addr < H8300_REGS_NO)
 				tmp = h8300_get_reg(child, addr);
 			else {
-				ret = -EIO;
-				break ;
+				switch(addr) {
+				case 49:
+					tmp = child->mm->start_code;
+					break ;
+				case 50:
+					tmp = child->mm->start_data;
+					break ;
+				case 51:
+					tmp = child->mm->end_code;
+					break ;
+				case 52:
+					tmp = child->mm->end_data;
+					break ;
+				default:
+					ret = -EIO;
+				}
 			}
-			ret = put_user(tmp,(unsigned long *) data);
+			if (!ret)
+				ret = put_user(tmp,(unsigned long *) data);
 			break ;
 		}
 
--- diff/arch/h8300/kernel/setup.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/h8300/kernel/setup.c	2004-07-01 21:32:30.000000000 +0100
@@ -30,6 +30,7 @@
 #include <linux/major.h>
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
+#include <linux/init.h>
 
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -54,8 +55,7 @@
 unsigned long memory_start;
 unsigned long memory_end;
 
-char command_line[512];
-char saved_command_line[512];
+char command_line[COMMAND_LINE_SIZE];
 
 extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
 extern int _ramstart, _ramend;
@@ -155,8 +155,8 @@
 #endif
 	/* Keep a copy of command line */
 	*cmdline_p = &command_line[0];
-	memcpy(saved_command_line, command_line, sizeof(saved_command_line));
-	saved_command_line[sizeof(saved_command_line)-1] = 0;
+	memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
+	saved_command_line[COMMAND_LINE_SIZE-1] = 0;
 
 #ifdef DEBUG
 	if (strlen(*cmdline_p)) 
--- diff/arch/h8300/platform/h8s/entry.S	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/h8300/platform/h8s/entry.S	2004-07-01 21:32:30.000000000 +0100
@@ -83,6 +83,7 @@
 	mov.l	@(LER0-LER1:16,sp),er1		/* restore ER0 */
 	mov.l	er1,@er0
 	mov.w	@(LEXR-LER1:16,sp),r1		/* restore EXR */
+	mov.b	r1l,r1h
 	mov.w	r1,@(8:16,er0)
 	mov.w	@(LCCR-LER1:16,sp),r1		/* restore the RET addr */
 	mov.b	r1l,r1h
@@ -214,7 +215,6 @@
 	jsr	@SYMBOL_NAME(syscall_trace)
 	bra	SYMBOL_NAME(ret_from_exception):8
 
-
 SYMBOL_NAME_LABEL(ret_from_fork)
 	mov.l	er2,er0
 	jsr	@SYMBOL_NAME(schedule_tail)
--- diff/arch/h8300/platform/h8s/ptrace_h8s.c	2004-05-19 22:10:59.000000000 +0100
+++ source/arch/h8300/platform/h8s/ptrace_h8s.c	2004-07-01 21:32:30.000000000 +0100
@@ -23,7 +23,7 @@
 static const int h8300_register_offset[] = {
 	PT_REG(er1), PT_REG(er2), PT_REG(er3), PT_REG(er4),
 	PT_REG(er5), PT_REG(er6), PT_REG(er0), PT_REG(orig_er0),
-	PT_REG(ccr), PT_REG(pc), PT_REG(exr)
+	PT_REG(ccr), PT_REG(pc),  0,           PT_REG(exr)
 };
 
 /* read register */
--- diff/arch/i386/Kconfig	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/Kconfig	2004-07-01 21:32:30.000000000 +0100
@@ -436,7 +436,8 @@
 	  Choose N to continue using the legacy 8254 timer.
 
 config HPET_EMULATE_RTC
-	def_bool HPET_TIMER && RTC=y
+	bool "Provide RTC interrupt"
+	depends on HPET_TIMER && RTC=y
 
 config SMP
 	bool "Symmetric multi-processing support"
@@ -864,6 +865,8 @@
 	generate incorrect output with certain kernel constructs when
 	-mregparm=3 is used.
 
+source "drivers/perfctr/Kconfig"
+
 endmenu
 
 
@@ -1274,12 +1277,194 @@
 	  Say Y here only if you plan to use gdb to debug the kernel.
 	  If you don't debug the kernel, you can say N.
 	  
+config LOCKMETER
+	bool "Kernel lock metering"
+	depends on SMP
+	help
+	  Say Y to enable kernel lock metering, which adds overhead to SMP locks,
+	  but allows you to see various statistics using the lockstat command.
+
 config DEBUG_SPINLOCK_SLEEP
 	bool "Sleep-inside-spinlock checking"
 	help
 	  If you say Y here, various routines which may sleep will become very
 	  noisy if they are called with a spinlock held.	
 
+config KGDB
+	bool "Include kgdb kernel debugger"
+	depends on DEBUG_KERNEL
+	help
+	  If you say Y here, the system will be compiled with the debug
+	  option (-g) and a debugging stub will be included in the
+	  kernel.  This stub communicates with gdb on another (host)
+	  computer via a serial port.  The host computer should have
+	  access to the kernel binary file (vmlinux) and a serial port
+	  that is connected to the target machine.  Gdb can be made to
+	  configure the serial port or you can use stty and setserial to
+	  do this. See the 'target' command in gdb. This option also
+	  configures in the ability to request a breakpoint early in the
+	  boot process.  To request the breakpoint just include 'kgdb'
+	  as a boot option when booting the target machine.  The system
+	  will then break as soon as it looks at the boot options.  This
+	  option also installs a breakpoint in panic and sends any
+	  kernel faults to the debugger. For more information see the
+	  Documentation/i386/kgdb/kgdb.txt file.
+
+choice
+	depends on KGDB
+    	prompt "Debug serial port BAUD"
+	default KGDB_115200BAUD
+	help
+	  Gdb and the kernel stub need to agree on the baud rate to be
+	  used.  Some systems (x86 family at this writing) allow this to
+	  be configured.
+
+config KGDB_9600BAUD
+	bool "9600"
+
+config KGDB_19200BAUD
+	bool "19200"
+
+config KGDB_38400BAUD
+	bool "38400"
+
+config KGDB_57600BAUD
+	bool "57600"
+
+config KGDB_115200BAUD
+	bool "115200"
+endchoice
+
+config KGDB_PORT
+	hex "hex I/O port address of the debug serial port"
+	depends on KGDB
+	default  3f8
+	help
+	  Some systems (x86 family at this writing) allow the port
+	  address to be configured.  The number entered is assumed to be
+	  hex, don't put 0x in front of it.  The standard address are:
+	  COM1 3f8 , irq 4 and COM2 2f8 irq 3.  Setserial /dev/ttySx
+	  will tell you what you have.  It is good to test the serial
+	  connection with a live system before trying to debug.
+
+config KGDB_IRQ
+	int "IRQ of the debug serial port"
+	depends on KGDB
+	default 4
+	help
+	  This is the irq for the debug port.  If everything is working
+	  correctly and the kernel has interrupts on a control C to the
+	  port should cause a break into the kernel debug stub.
+
+config DEBUG_INFO
+	bool
+	depends on KGDB
+	default y
+
+config KGDB_MORE
+	bool "Add any additional compile options"
+	depends on KGDB
+	default n
+	help
+	  Saying yes here turns on the ability to enter additional
+	  compile options.
+
+
+config KGDB_OPTIONS
+	depends on KGDB_MORE
+	string "Additional compile arguments"
+	default "-O1"
+	help
+	  This option allows you enter additional compile options for
+	  the whole kernel compile.  Each platform will have a default
+	  that seems right for it.  For example on PPC "-ggdb -O1", and
+	  for i386 "-O1".  Note that by configuring KGDB "-g" is already
+	  turned on.  In addition, on i386 platforms
+	  "-fomit-frame-pointer" is deleted from the standard compile
+	  options.
+
+config NO_KGDB_CPUS
+	int "Number of CPUs"
+	depends on KGDB && SMP
+	default NR_CPUS
+	help
+
+	  This option sets the number of cpus for kgdb ONLY.  It is used
+	  to prune some internal structures so they look "nice" when
+	  displayed with gdb.  This is to overcome possibly larger
+	  numbers that may have been entered above.  Enter the real
+	  number to get nice clean kgdb_info displays.
+
+config KGDB_TS
+	bool "Enable kgdb time stamp macros?"
+	depends on KGDB
+	default n
+	help
+	  Kgdb event macros allow you to instrument your code with calls
+	  to the kgdb event recording function.  The event log may be
+	  examined with gdb at a break point.  Turning on this
+	  capability also allows you to choose how many events to
+	  keep. Kgdb always keeps the lastest events.
+
+choice
+	depends on KGDB_TS
+	prompt "Max number of time stamps to save?"
+	default KGDB_TS_128
+
+config KGDB_TS_64
+	bool "64"
+
+config KGDB_TS_128
+	bool "128"
+
+config KGDB_TS_256
+	bool "256"
+
+config KGDB_TS_512
+	bool "512"
+
+config KGDB_TS_1024
+	bool "1024"
+
+endchoice
+
+config STACK_OVERFLOW_TEST
+	bool "Turn on kernel stack overflow testing?"
+	depends on KGDB
+	default n
+	help
+	  This option enables code in the front line interrupt handlers
+	  to check for kernel stack overflow on interrupts and system
+	  calls.  This is part of the kgdb code on x86 systems.
+
+config KGDB_CONSOLE
+	bool "Enable serial console thru kgdb port"
+	depends on KGDB
+	default n
+	help
+	  This option enables the command line "console=kgdb" option.
+	  When the system is booted with this option in the command line
+	  all kernel printk output is sent to gdb (as well as to other
+	  consoles).  For this to work gdb must be connected.  For this
+	  reason, this command line option will generate a breakpoint if
+	  gdb has not yet connected.  After the gdb continue command is
+	  given all pent up console output will be printed by gdb on the
+	  host machine.  Neither this option, nor KGDB require the
+	  serial driver to be configured.
+
+config KGDB_SYSRQ
+	bool "Turn on SysRq 'G' command to do a break?"
+	depends on KGDB
+	default y
+	help
+	  This option includes an option in the SysRq code that allows
+	  you to enter SysRq G which generates a breakpoint to the KGDB
+	  stub.  This will work if the keyboard is alive and can
+	  interrupt the system.  Because of constraints on when the
+	  serial port interrupt can be enabled, this code may allow you
+	  to interrupt the system before the serial port control C is
+	  available.  Just say yes here.
+
 config FRAME_POINTER
 	bool "Compile the kernel with frame pointers"
 	help
@@ -1335,12 +1520,6 @@
 	depends on X86_SMP || (X86_VOYAGER && SMP)
 	default y
 
-# std_resources is overridden for pc9800, but that's not
-# a currently selectable arch choice
-config X86_STD_RESOURCES
-	bool
-	default y
-
 config PC
 	bool
 	depends on X86 && !EMBEDDED
--- diff/arch/i386/Makefile	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -99,6 +99,9 @@
 # default subarch .h files
 mflags-y += -Iinclude/asm-i386/mach-default
 
+mflags-$(CONFIG_KGDB) += -gdwarf-2
+mflags-$(CONFIG_KGDB_MORE) += $(shell echo $(CONFIG_KGDB_OPTIONS) | sed -e 's/"//g')
+
 head-y := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
 
 libs-y 					+= arch/i386/lib/
@@ -121,22 +124,23 @@
 
 all: bzImage
 
-BOOTIMAGE=arch/i386/boot/bzImage
-zImage zlilo zdisk: BOOTIMAGE=arch/i386/boot/zImage
+# KBUILD_IMAGE specify target image being built
+                    KBUILD_IMAGE := $(boot)/bzImage
+zImage zlilo zdisk: KBUILD_IMAGE := arch/i386/boot/zImage
 
 zImage bzImage: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
+	$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
 
 compressed: zImage
 
 zlilo bzlilo: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zlilo
+	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) zlilo
 
 zdisk bzdisk: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk
+	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) zdisk
 
 install fdimage fdimage144 fdimage288: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
+	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
 
 prepare: include/asm-$(ARCH)/asm_offsets.h
 CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
--- diff/arch/i386/boot/compressed/misc.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/boot/compressed/misc.c	2004-07-01 21:32:30.000000000 +0100
@@ -87,12 +87,11 @@
  */
 static unsigned char *real_mode; /* Pointer to real-mode data */
 
-#define EXT_MEM_K   (*(unsigned short *)(real_mode + 0x2))
+#define RM_EXT_MEM_K   (*(unsigned short *)(real_mode + 0x2))
 #ifndef STANDARD_MEMORY_BIOS_CALL
-#define ALT_MEM_K   (*(unsigned long *)(real_mode + 0x1e0))
+#define RM_ALT_MEM_K   (*(unsigned long *)(real_mode + 0x1e0))
 #endif
-#define SCREEN_INFO (*(struct screen_info *)(real_mode+0))
-#define EDID_INFO   (*(struct edid_info *)(real_mode+0x440))
+#define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0))
 
 extern char input_data[];
 extern int input_len;
@@ -174,8 +173,8 @@
 	int x,y,pos;
 	char c;
 
-	x = SCREEN_INFO.orig_x;
-	y = SCREEN_INFO.orig_y;
+	x = RM_SCREEN_INFO.orig_x;
+	y = RM_SCREEN_INFO.orig_y;
 
 	while ( ( c = *s++ ) != '\0' ) {
 		if ( c == '\n' ) {
@@ -196,8 +195,8 @@
 		}
 	}
 
-	SCREEN_INFO.orig_x = x;
-	SCREEN_INFO.orig_y = y;
+	RM_SCREEN_INFO.orig_x = x;
+	RM_SCREEN_INFO.orig_y = y;
 
 	pos = (x + cols * y) * 2;	/* Update cursor position */
 	outb_p(14, vidport);
@@ -306,9 +305,9 @@
 static void setup_normal_output_buffer(void)
 {
 #ifdef STANDARD_MEMORY_BIOS_CALL
-	if (EXT_MEM_K < 1024) error("Less than 2MB of memory");
+	if (RM_EXT_MEM_K < 1024) error("Less than 2MB of memory");
 #else
-	if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < 1024) error("Less than 2MB of memory");
+	if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < 1024) error("Less than 2MB of memory");
 #endif
 	output_data = (char *)0x100000; /* Points to 1M */
 	free_mem_end_ptr = (long)real_mode;
@@ -323,9 +322,11 @@
 {
 	high_buffer_start = (uch *)(((ulg)&end) + HEAP_SIZE);
 #ifdef STANDARD_MEMORY_BIOS_CALL
-	if (EXT_MEM_K < (3*1024)) error("Less than 4MB of memory");
+	if (RM_EXT_MEM_K < (3*1024)) error("Less than 4MB of memory");
 #else
-	if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory");
+	if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) <
+			(3*1024))
+		error("Less than 4MB of memory");
 #endif	
 	mv->low_buffer_start = output_data = (char *)LOW_BUFFER_START;
 	low_buffer_end = ((unsigned int)real_mode > LOW_BUFFER_MAX
@@ -358,7 +359,7 @@
 {
 	real_mode = rmode;
 
-	if (SCREEN_INFO.orig_video_mode == 7) {
+	if (RM_SCREEN_INFO.orig_video_mode == 7) {
 		vidmem = (char *) 0xb0000;
 		vidport = 0x3b4;
 	} else {
@@ -366,8 +367,8 @@
 		vidport = 0x3d4;
 	}
 
-	lines = SCREEN_INFO.orig_video_lines;
-	cols = SCREEN_INFO.orig_video_cols;
+	lines = RM_SCREEN_INFO.orig_video_lines;
+	cols = RM_SCREEN_INFO.orig_video_cols;
 
 	if (free_mem_ptr < 0x100000) setup_normal_output_buffer();
 	else setup_output_buffer_if_we_run_high(mv);
--- diff/arch/i386/boot/edd.S	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/boot/edd.S	2004-07-01 21:32:30.000000000 +0100
@@ -4,7 +4,7 @@
  * conformant to T13 Committee www.t13.org
  *   projects 1572D, 1484D, 1386D, 1226DT
  * disk signature read by Matt Domsch <Matt_Domsch@dell.com>
- *	and Andrew Wilks <Andrew_Wilks@dell.com> September 2003
+ *	and Andrew Wilks <Andrew_Wilks@dell.com> September 2003, June 2004
  * legacy CHS retreival by Patrick J. LoPresti <patl@users.sourceforge.net>
  *      March 2004
  */
@@ -12,28 +12,39 @@
 #include <linux/edd.h>
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
-# Read the first sector of device 80h and store the 4-byte signature
+# Read the first sector of each BIOS disk device and store the 4-byte signature
+edd_mbr_sig_start:
+	movb	$0, (EDD_MBR_SIG_NR_BUF)	# zero value at EDD_MBR_SIG_NR_BUF
+	movb	$0x80, %dl			# from device 80
+	movw	$EDD_MBR_SIG_BUF, %bx		# store buffer ptr in bx
+edd_mbr_sig_read:
 	movl	$0xFFFFFFFF, %eax
-	movl	%eax, (DISK80_SIG_BUFFER)	# assume failure
+	movl	%eax, (%bx)			# assume failure
+	pushw	%bx
 	movb	$READ_SECTORS, %ah
 	movb	$1, %al				# read 1 sector
-	movb	$0x80, %dl			# from device 80
 	movb	$0, %dh				# at head 0
 	movw	$1, %cx				# cylinder 0, sector 0
 	pushw	%es
 	pushw	%ds
 	popw	%es
-	movw	$EDDBUF, %bx
-	pushw   %dx             # work around buggy BIOSes
+    	movw	$EDDBUF, %bx			# disk's data goes into EDDBUF
+	pushw	%dx             # work around buggy BIOSes
 	stc                     # work around buggy BIOSes
-	int     $0x13
+	int	$0x13
 	sti                     # work around buggy BIOSes
-	popw    %dx
-	jc	disk_sig_done
-	movl	(EDDBUF+MBR_SIG_OFFSET), %eax
-	movl	%eax, (DISK80_SIG_BUFFER)	# store success
-disk_sig_done:
+	popw	%dx
 	popw	%es
+	popw	%bx
+	jc	edd_mbr_sig_done		# on failure, we're done.
+	movl	(EDDBUF+EDD_MBR_SIG_OFFSET), %eax # read sig out of the MBR
+	movl	%eax, (%bx)			# store success
+	incb	(EDD_MBR_SIG_NR_BUF)		# note that we stored something
+	incb	%dl				# increment to next device
+	addw	$4, %bx				# increment sig buffer ptr
+	cmpb	$EDD_MBR_SIG_MAX, (EDD_MBR_SIG_NR_BUF)	# Out of space?
+	jb	edd_mbr_sig_read		# keep looping
+edd_mbr_sig_done:
 
 # Do the BIOS Enhanced Disk Drive calls
 # This consists of two calls:
--- diff/arch/i386/defconfig	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/defconfig	2004-07-01 21:32:30.000000000 +0100
@@ -1148,7 +1148,7 @@
 # CONFIG_NFS_DIRECTIO is not set
 CONFIG_NFSD=y
 # CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=y
 CONFIG_EXPORTFS=y
 CONFIG_SUNRPC=y
--- diff/arch/i386/kernel/Makefile	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/Makefile	2004-07-01 21:32:30.000000000 +0100
@@ -14,6 +14,7 @@
 obj-$(CONFIG_ACPI_BOOT)		+= acpi/
 obj-$(CONFIG_X86_BIOS_REBOOT)	+= reboot.o
 obj-$(CONFIG_MCA)		+= mca.o
+obj-$(CONFIG_KGDB)		+= kgdb_stub.o
 obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
@@ -31,7 +32,6 @@
 obj-$(CONFIG_HPET_TIMER) 	+= time_hpet.o
 obj-$(CONFIG_EFI) 		+= efi.o efi_stub.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
-obj-$(CONFIG_X86_STD_RESOURCES)	+= std_resources.o
 
 EXTRA_AFLAGS   := -traditional
 
--- diff/arch/i386/kernel/acpi/boot.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/acpi/boot.c	2004-07-01 21:32:30.000000000 +0100
@@ -28,7 +28,9 @@
 #include <linux/acpi.h>
 #include <linux/efi.h>
 #include <linux/irq.h>
-#include <asm/pgalloc.h>
+#include <linux/module.h>
+
+#include <asm/pgtable.h>
 #include <asm/io_apic.h>
 #include <asm/apic.h>
 #include <asm/io.h>
@@ -437,6 +439,38 @@
 	return 0;
 }
 
+unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
+{
+	unsigned int irq;
+
+#ifdef CONFIG_PCI
+	/*
+	 * Make sure all (legacy) PCI IRQs are set as level-triggered.
+	 */
+	if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
+		static u16 irq_mask;
+		extern void eisa_set_level_irq(unsigned int irq);
+
+		if (edge_level == ACPI_LEVEL_SENSITIVE) {
+			if ((gsi < 16) && !((1 << gsi) & irq_mask)) {
+				Dprintk(KERN_DEBUG PREFIX "Setting GSI %u as level-triggered\n", gsi);
+				irq_mask |= (1 << gsi);
+				eisa_set_level_irq(gsi);
+			}
+		}
+	}
+#endif
+
+#ifdef CONFIG_X86_IO_APIC
+	if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) {
+		mp_register_gsi(gsi, edge_level, active_high_low);
+	}
+#endif
+	acpi_gsi_to_irq(gsi, &irq);
+	return irq;
+}
+EXPORT_SYMBOL(acpi_register_gsi);
+
 static unsigned long __init
 acpi_scan_rsdp (
 	unsigned long		start,
--- diff/arch/i386/kernel/apic.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/apic.c	2004-07-01 21:32:30.000000000 +0100
@@ -31,7 +31,6 @@
 #include <asm/smp.h>
 #include <asm/mtrr.h>
 #include <asm/mpspec.h>
-#include <asm/pgalloc.h>
 #include <asm/desc.h>
 #include <asm/arch_hooks.h>
 #include <asm/hpet.h>
@@ -81,6 +80,17 @@
 	apic_write_around(APIC_LVT0, v);
 }
 
+int get_physical_broadcast(void)
+{
+	unsigned int lvr, version;
+	lvr = apic_read(APIC_LVR);
+	version = GET_APIC_VERSION(lvr);
+	if (version >= 0x14)
+		return 0xff;
+	else
+		return 0xf;
+}
+
 int get_maxlvt(void)
 {
 	unsigned int v, ver, maxlvt;
--- diff/arch/i386/kernel/apm.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/apm.c	2004-07-01 21:32:30.000000000 +0100
@@ -222,6 +222,7 @@
 #include <linux/kernel.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
+#include <linux/dmi.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -1884,6 +1885,319 @@
 	&apm_bios_fops
 };
 
+
+/* Simple "print if true" callback */
+static int __init print_if_true(struct dmi_system_id *d)
+{
+	printk("%s\n", d->ident);
+	return 0;
+}
+
+/*
+ * Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it was
+ * disabled before the suspend. Linux used to get terribly confused by that.
+ */
+static int __init broken_ps2_resume(struct dmi_system_id *d)
+{
+	printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround hopefully not needed.\n", d->ident);
+	return 0;
+}
+
+/* Some bioses have a broken protected mode poweroff and need to use realmode */
+static int __init set_realmode_power_off(struct dmi_system_id *d)
+{
+	if (apm_info.realmode_power_off == 0) {
+		apm_info.realmode_power_off = 1;
+		printk(KERN_INFO "%s bios detected. Using realmode poweroff only.\n", d->ident);
+	}
+	return 0;
+}
+
+/* Some laptops require interrupts to be enabled during APM calls */
+static int __init set_apm_ints(struct dmi_system_id *d)
+{
+	if (apm_info.allow_ints == 0) {
+		apm_info.allow_ints = 1;
+		printk(KERN_INFO "%s machine detected. Enabling interrupts during APM calls.\n", d->ident);
+	}
+	return 0;
+}
+
+/* Some APM bioses corrupt memory or just plain do not work */
+static int __init apm_is_horked(struct dmi_system_id *d)
+{
+	if (apm_info.disabled == 0) {
+		apm_info.disabled = 1;
+		printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
+	}
+	return 0;
+}
+
+static int __init apm_is_horked_d850md(struct dmi_system_id *d)
+{
+	if (apm_info.disabled == 0) {
+		apm_info.disabled = 1;
+		printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
+		printk(KERN_INFO "This bug is fixed in bios P15 which is available for \n");
+		printk(KERN_INFO "download from support.intel.com \n");
+	}
+	return 0;
+}
+
+/* Some APM bioses hang on APM idle calls */
+static int __init apm_likes_to_melt(struct dmi_system_id *d)
+{
+	if (apm_info.forbid_idle == 0) {
+		apm_info.forbid_idle = 1;
+		printk(KERN_INFO "%s machine detected. Disabling APM idle calls.\n", d->ident);
+	}
+	return 0;
+}
+
+/*
+ *  Check for clue free BIOS implementations who use
+ *  the following QA technique
+ *
+ *      [ Write BIOS Code ]<------
+ *               |                ^
+ *      < Does it Compile >----N--
+ *               |Y               ^
+ *	< Does it Boot Win98 >-N--
+ *               |Y
+ *           [Ship It]
+ *
+ *	Phoenix A04  08/24/2000 is known bad (Dell Inspiron 5000e)
+ *	Phoenix A07  09/29/2000 is known good (Dell Inspiron 5000)
+ */
+static int __init broken_apm_power(struct dmi_system_id *d)
+{
+	apm_info.get_power_status_broken = 1;
+	printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
+	return 0;
+}
+
+/*
+ * This bios swaps the APM minute reporting bytes over (Many sony laptops
+ * have this problem).
+ */
+static int __init swab_apm_power_in_minutes(struct dmi_system_id *d)
+{
+	apm_info.get_power_status_swabinminutes = 1;
+	printk(KERN_WARNING "BIOS strings suggest APM reports battery life in minutes and wrong byte order.\n");
+	return 0;
+}
+
+static struct dmi_system_id __initdata apm_dmi_table[] = {
+	{
+		print_if_true,
+		KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
+			DMI_MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"), },
+	},
+	{	/* Handle problems with APM on the C600 */
+		broken_ps2_resume, "Dell Latitude C600",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "Dell"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C600"), },
+	},
+	{	/* Allow interrupts during suspend on Dell Latitude laptops*/
+		set_apm_ints, "Dell Latitude",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C510"), }
+	},
+	{	/* APM crashes */
+		apm_is_horked, "Dell Inspiron 2500",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
+			DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION,"A11"), },
+	},
+	{	/* Allow interrupts during suspend on Dell Inspiron laptops*/
+		set_apm_ints, "Dell Inspiron", {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 4000"), },
+	},
+	{	/* Handle problems with APM on Inspiron 5000e */
+		broken_apm_power, "Dell Inspiron 5000e",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "A04"),
+			DMI_MATCH(DMI_BIOS_DATE, "08/24/2000"), },
+	},
+	{	/* Handle problems with APM on Inspiron 2500 */
+		broken_apm_power, "Dell Inspiron 2500",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "A12"),
+			DMI_MATCH(DMI_BIOS_DATE, "02/04/2002"), },
+	},
+	{	/* APM crashes */
+		apm_is_horked, "Dell Dimension 4100",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
+			DMI_MATCH(DMI_BIOS_VENDOR,"Intel Corp."),
+			DMI_MATCH(DMI_BIOS_VERSION,"A11"), },
+	},
+	{	/* Allow interrupts during suspend on Compaq Laptops*/
+		set_apm_ints, "Compaq 12XL125",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Compaq PC"),
+			DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION,"4.06"), },
+	},
+	{	/* Allow interrupts during APM or the clock goes slow */
+		set_apm_ints, "ASUSTeK",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"), },
+	},
+	{	/* APM blows on shutdown */
+		apm_is_horked, "ABIT KX7-333[R]",
+		{	DMI_MATCH(DMI_BOARD_VENDOR, "ABIT"),
+			DMI_MATCH(DMI_BOARD_NAME, "VT8367-8233A (KX7-333[R])"), },
+	},
+	{	/* APM crashes */
+		apm_is_horked, "Trigem Delhi3",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Delhi3"), },
+	},
+	{	/* APM crashes */
+		apm_is_horked, "Fujitsu-Siemens",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"),
+			DMI_MATCH(DMI_BIOS_VERSION, "Version1.01"), },
+	},
+	{	/* APM crashes */
+		apm_is_horked_d850md, "Intel D850MD",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
+			DMI_MATCH(DMI_BIOS_VERSION, "MV85010A.86A.0016.P07.0201251536"), },
+	},
+	{	/* APM crashes */
+		apm_is_horked, "Intel D810EMO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
+			DMI_MATCH(DMI_BIOS_VERSION, "MO81010A.86A.0008.P04.0004170800"), },
+	},
+	{	/* APM crashes */
+		apm_is_horked, "Dell XPS-Z",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
+			DMI_MATCH(DMI_BIOS_VERSION, "A11"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"), },
+	},
+	{	/* APM crashes */
+		apm_is_horked, "Sharp PC-PJ/AX",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "SHARP"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"),
+			DMI_MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
+			DMI_MATCH(DMI_BIOS_VERSION,"Version R2.08"), },
+	},
+	{	/* APM crashes */
+		apm_is_horked, "Dell Inspiron 2500",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
+			DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION,"A11"), },
+	},
+	{	/* APM idle hangs */
+		apm_likes_to_melt, "Jabil AMD",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+			DMI_MATCH(DMI_BIOS_VERSION, "0AASNP06"), },
+	},
+	{	/* APM idle hangs */
+		apm_likes_to_melt, "AMI Bios",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+			DMI_MATCH(DMI_BIOS_VERSION, "0AASNP05"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0206H"),
+			DMI_MATCH(DMI_BIOS_DATE, "08/23/99"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-N505VX */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "W2K06H0"),
+			DMI_MATCH(DMI_BIOS_DATE, "02/03/00"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-XG29 */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0117A0"),
+			DMI_MATCH(DMI_BIOS_DATE, "04/25/00"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-Z600NE */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0121Z1"),
+			DMI_MATCH(DMI_BIOS_DATE, "05/11/00"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-Z600NE */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "WME01Z1"),
+			DMI_MATCH(DMI_BIOS_DATE, "08/11/00"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0206Z3"),
+			DMI_MATCH(DMI_BIOS_DATE, "12/25/00"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-Z505LS */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0203D0"),
+			DMI_MATCH(DMI_BIOS_DATE, "05/12/00"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-Z505LS */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0203Z3"),
+			DMI_MATCH(DMI_BIOS_DATE, "08/25/00"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0209Z3"),
+			DMI_MATCH(DMI_BIOS_DATE, "05/12/01"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-F104K */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0204K2"),
+			DMI_MATCH(DMI_BIOS_DATE, "08/28/00"), },
+	},
+
+	{	/* Handle problems with APM on Sony Vaio PCG-C1VN/C1VE */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0208P1"),
+			DMI_MATCH(DMI_BIOS_DATE, "11/09/00"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-C1VE */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "R0204P1"),
+			DMI_MATCH(DMI_BIOS_DATE, "09/12/00"), },
+	},
+	{	/* Handle problems with APM on Sony Vaio PCG-C1VE */
+		swab_apm_power_in_minutes, "Sony VAIO",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			DMI_MATCH(DMI_BIOS_VERSION, "WXPO1Z3"),
+			DMI_MATCH(DMI_BIOS_DATE, "10/26/01"), },
+	},
+	{	/* broken PM poweroff bios */
+		set_realmode_power_off, "Award Software v4.60 PGMA",
+		{	DMI_MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
+			DMI_MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
+			DMI_MATCH(DMI_BIOS_DATE, "134526184"), },
+	},
+
+	/* Generic per vendor APM settings  */
+
+	{	/* Allow interrupts during suspend on IBM laptops */
+		set_apm_ints, "IBM",
+		{	DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
+	},
+
+	{ }
+};
+
 /*
  * Just start the APM thread. We do NOT want to do APM BIOS
  * calls from anything but the APM thread, if for no other reason
@@ -1900,6 +2214,8 @@
 	int ret;
 	int i;
 
+	dmi_check_system(apm_dmi_table);
+
 	if (apm_info.bios.version == 0) {
 		printk(KERN_INFO "apm: BIOS not found.\n");
 		return -ENODEV;
--- diff/arch/i386/kernel/cpu/common.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/cpu/common.c	2004-07-01 21:32:30.000000000 +0100
@@ -329,7 +329,7 @@
 
 	generic_identify(c);
 
-	printk(KERN_DEBUG "CPU:     After generic identify, caps: %08lx %08lx %08lx %08lx\n",
+	printk(KERN_DEBUG "CPU: After generic identify, caps: %08lx %08lx %08lx %08lx\n",
 		c->x86_capability[0],
 		c->x86_capability[1],
 		c->x86_capability[2],
@@ -338,7 +338,7 @@
 	if (this_cpu->c_identify) {
 		this_cpu->c_identify(c);
 
-	printk(KERN_DEBUG "CPU:     After vendor identify, caps: %08lx %08lx %08lx %08lx\n",
+	printk(KERN_DEBUG "CPU: After vendor identify, caps:  %08lx %08lx %08lx %08lx\n",
 		c->x86_capability[0],
 		c->x86_capability[1],
 		c->x86_capability[2],
@@ -393,7 +393,7 @@
 
 	/* Now the feature flags better reflect actual CPU features! */
 
-	printk(KERN_DEBUG "CPU:     After all inits, caps: %08lx %08lx %08lx %08lx\n",
+	printk(KERN_DEBUG "CPU: After all inits, caps:        %08lx %08lx %08lx %08lx\n",
 	       c->x86_capability[0],
 	       c->x86_capability[1],
 	       c->x86_capability[2],
@@ -473,7 +473,6 @@
 
 void __init early_cpu_init(void)
 {
-	early_cpu_detect();
 	intel_cpu_init();
 	cyrix_init_cpu();
 	nsc_init_cpu();
@@ -483,6 +482,7 @@
 	rise_init_cpu();
 	nexgen_init_cpu();
 	umc_init_cpu();
+	early_cpu_detect();
 
 #ifdef CONFIG_DEBUG_PAGEALLOC
 	/* pse is not compatible with on-the-fly unmapping,
--- diff/arch/i386/kernel/cpu/cpufreq/powernow-k7.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/cpu/cpufreq/powernow-k7.c	2004-07-01 21:32:30.000000000 +0100
@@ -22,6 +22,7 @@
 #include <linux/cpufreq.h>
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/dmi.h>
 
 #include <asm/msr.h>
 #include <asm/timex.h>
@@ -195,7 +196,7 @@
 #endif
 		}
 
-		dprintk (KERN_INFO PFX "   FID: 0x%x (%d.%dx [%dMHz])\t", fid,
+		dprintk (KERN_INFO PFX "   FID: 0x%x (%d.%dx [%dMHz])  ", fid,
 			fid_codes[fid] / 10, fid_codes[fid] % 10, speed/1000);
 
 		if (speed < minimum_speed)
@@ -376,7 +377,7 @@
 				powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;
 		}
 
-		dprintk (KERN_INFO PFX "   FID: 0x%x (%d.%dx [%dMHz])\t", fid,
+		dprintk (KERN_INFO PFX "   FID: 0x%x (%d.%dx [%dMHz])  ", fid,
 			fid_codes[fid] / 10, fid_codes[fid] % 10, speed/1000);
 		dprintk ("VID: 0x%x (%d.%03dV)\n", vid,	mobile_vid_table[vid]/1000,
 			mobile_vid_table[vid]%1000);
@@ -466,9 +467,9 @@
 				    (maxfid==pst->maxfid) && (startvid==pst->startvid))
 				{
 					dprintk (KERN_INFO PFX "PST:%d (@%p)\n", i, pst);
-					dprintk (KERN_INFO PFX " cpuid: 0x%x\t", pst->cpuid);
-					dprintk ("fsb: %d\t", pst->fsbspeed);
-					dprintk ("maxFID: 0x%x\t", pst->maxfid);
+					dprintk (KERN_INFO PFX " cpuid: 0x%x  ", pst->cpuid);
+					dprintk ("fsb: %d  ", pst->fsbspeed);
+					dprintk ("maxFID: 0x%x  ", pst->maxfid);
 					dprintk ("startvid: 0x%x\n", pst->startvid);
 
 					ret = get_ranges ((char *) pst + sizeof (struct pst_s));
@@ -554,6 +555,31 @@
 }
 
 
+static int __init acer_cpufreq_pst(struct dmi_system_id *d)
+{
+	printk(KERN_WARNING "%s laptop with broken PST tables in BIOS detected.\n", d->ident);
+	printk(KERN_WARNING "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n");
+	printk(KERN_WARNING "cpufreq scaling has been disabled as a result of this.\n");
+	return 0;
+}
+
+/*
+ * Some Athlon laptops have really fucked PST tables.
+ * A BIOS update is all that can save them.
+ * Mention this, and disable cpufreq.
+ */
+static struct dmi_system_id __initdata powernow_dmi_table[] = {
+	{
+		.callback = acer_cpufreq_pst,
+		.ident = "Acer Aspire",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Insyde Software"),
+			DMI_MATCH(DMI_BIOS_VERSION, "3A71"),
+		},
+	},
+	{ }
+};
+
 static int __init powernow_cpu_init (struct cpufreq_policy *policy)
 {
 	union msr_fidvidstatus fidvidstatus;
@@ -572,7 +598,7 @@
 	}
 	dprintk(KERN_INFO PFX "FSB: %3d.%03d MHz\n", fsb/1000, fsb%1000);
 
-	if ((dmi_broken & BROKEN_CPUFREQ) || acpi_force) {
+ 	if (dmi_check_system(powernow_dmi_table) || acpi_force) {
 		printk (KERN_INFO PFX "PSB/PST known to be broken.  Trying ACPI instead\n");
 		result = powernow_acpi_init();
 	} else {
--- diff/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2004-07-01 21:32:30.000000000 +0100
@@ -60,6 +60,13 @@
 	.x86_mask = 1,
 };
 
+static const struct cpu_id cpu_id_dothan_b0 = {
+	.x86_vendor = X86_VENDOR_INTEL,
+	.x86 = 6,
+	.x86_model = 13,
+	.x86_mask = 6,
+};
+
 struct cpu_model
 {
 	const struct cpu_id *cpu_id;
@@ -400,7 +407,8 @@
 		return -ENODEV;
 
 	if ((centrino_verify_cpu_id(cpu, &cpu_id_banias)) &&
-	    (centrino_verify_cpu_id(cpu, &cpu_id_dothan_a1))) {
+	    (centrino_verify_cpu_id(cpu, &cpu_id_dothan_a1)) &&
+		(centrino_verify_cpu_id(cpu, &cpu_id_dothan_b0))) {
 		printk(KERN_INFO PFX "found unsupported CPU with Enhanced SpeedStep: "
 		       "send /proc/cpuinfo to " MAINTAINER "\n");
 		return -ENODEV;
--- diff/arch/i386/kernel/cpu/proc.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/cpu/proc.c	2004-07-01 21:32:30.000000000 +0100
@@ -27,7 +27,7 @@
 		/* AMD-defined */
 		NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 		NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
-		NULL, NULL, NULL, "mp", NULL, NULL, "mmxext", NULL,
+		NULL, NULL, NULL, "mp", "nx", NULL, "mmxext", NULL,
 		NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
 
 		/* Transmeta-defined */
--- diff/arch/i386/kernel/cpuid.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/cpuid.c	2004-07-01 21:32:30.000000000 +0100
@@ -36,12 +36,17 @@
 #include <linux/fs.h>
 #include <linux/smp_lock.h>
 #include <linux/fs.h>
+#include <linux/device.h>
+#include <linux/cpu.h>
+#include <linux/notifier.h>
 
 #include <asm/processor.h>
 #include <asm/msr.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
+static struct class_simple *cpuid_class;
+
 #ifdef CONFIG_SMP
 
 struct cpuid_command {
@@ -153,20 +158,84 @@
 	.open = cpuid_open,
 };
 
+static int cpuid_class_simple_device_add(int i) 
+{
+	int err = 0;
+	struct class_device *class_err;
+
+	class_err = class_simple_device_add(cpuid_class, MKDEV(CPUID_MAJOR, i), NULL, "cpu%d",i);
+	if (IS_ERR(class_err))
+		err = PTR_ERR(class_err);
+	return err;
+}
+
+static int __devinit cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
+{
+	unsigned int cpu = (unsigned long)hcpu;
+
+	switch (action) {
+	case CPU_ONLINE:
+		cpuid_class_simple_device_add(cpu);
+		break;
+	case CPU_DEAD:
+		class_simple_device_remove(MKDEV(CPUID_MAJOR, cpu));
+		break;
+	}
+	return NOTIFY_OK;
+}
+
+static struct notifier_block cpuid_class_cpu_notifier =
+{
+	.notifier_call = cpuid_class_cpu_callback,
+};
+
 int __init cpuid_init(void)
 {
+	int i, err = 0;
+	i = 0;
+
 	if (register_chrdev(CPUID_MAJOR, "cpu/cpuid", &cpuid_fops)) {
 		printk(KERN_ERR "cpuid: unable to get major %d for cpuid\n",
 		       CPUID_MAJOR);
-		return -EBUSY;
+		err = -EBUSY;
+		goto out;
+	}
+	cpuid_class = class_simple_create(THIS_MODULE, "cpuid");
+	if (IS_ERR(cpuid_class)) {
+		err = PTR_ERR(cpuid_class);
+		goto out_chrdev;
 	}
+	for_each_online_cpu(i) {
+		err = cpuid_class_simple_device_add(i);
+		if (err != 0) 
+			goto out_class;
+	}
+	register_cpu_notifier(&cpuid_class_cpu_notifier);
 
-	return 0;
+	err = 0;
+	goto out;
+
+out_class:
+	i = 0;
+	for_each_online_cpu(i) {
+		class_simple_device_remove(MKDEV(CPUID_MAJOR, i));
+	}
+	class_simple_destroy(cpuid_class);
+out_chrdev:
+	unregister_chrdev(CPUID_MAJOR, "cpu/cpuid");	
+out:
+	return err;
 }
 
 void __exit cpuid_exit(void)
 {
+	int cpu = 0;
+
+	for_each_online_cpu(cpu)
+		class_simple_device_remove(MKDEV(CPUID_MAJOR, cpu));
+	class_simple_destroy(cpuid_class);
 	unregister_chrdev(CPUID_MAJOR, "cpu/cpuid");
+	unregister_cpu_notifier(&cpuid_class_cpu_notifier);
 }
 
 module_init(cpuid_init);
--- diff/arch/i386/kernel/dmi_scan.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/dmi_scan.c	2004-07-01 21:32:30.000000000 +0100
@@ -1,20 +1,22 @@
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/apm_bios.h>
 #include <linux/slab.h>
 #include <asm/acpi.h>
 #include <asm/io.h>
 #include <linux/pm.h>
 #include <asm/system.h>
+#include <linux/dmi.h>
 #include <linux/bootmem.h>
 
 unsigned long dmi_broken;
 EXPORT_SYMBOL(dmi_broken);
 
+unsigned int i8042_dmi_noloop = 0;
+EXPORT_SYMBOL(i8042_dmi_noloop);
+
 int is_sony_vaio_laptop;
 int is_unsafe_smbus;
 int es7000_plat = 0;
@@ -139,21 +141,6 @@
 	return -1;
 }
 
-
-enum
-{
-	DMI_BIOS_VENDOR,
-	DMI_BIOS_VERSION,
-	DMI_BIOS_DATE,
-	DMI_SYS_VENDOR,
-	DMI_PRODUCT_NAME,
-	DMI_PRODUCT_VERSION,
-	DMI_BOARD_VENDOR,
-	DMI_BOARD_NAME,
-	DMI_BOARD_VERSION,
-	DMI_STRING_MAX
-};
-
 static char *dmi_ident[DMI_STRING_MAX];
 
 /*
@@ -176,26 +163,11 @@
 }
 
 /*
- *	DMI callbacks for problem boards
+ * Ugly compatibility crap.
  */
-
-struct dmi_strmatch
-{
-	u8 slot;
-	char *substr;
-};
-
-#define NONE	255
-
-struct dmi_blacklist
-{
-	int (*callback)(struct dmi_blacklist *);
-	char *ident;
-	struct dmi_strmatch matches[4];
-};
-
-#define NO_MATCH	{ NONE, NULL}
-#define MATCH(a,b)	{ a, b }
+#define dmi_blacklist	dmi_system_id
+#define NO_MATCH	{ DMI_NONE, NULL}
+#define MATCH		DMI_MATCH
 
 /* 
  * Reboot options and system auto-detection code provided by
@@ -243,73 +215,6 @@
 }
 
 /*
- * Some bioses have a broken protected mode poweroff and need to use realmode
- */
-
-static __init int set_realmode_power_off(struct dmi_blacklist *d)
-{
-       if (apm_info.realmode_power_off == 0)
-       {
-               apm_info.realmode_power_off = 1;
-               printk(KERN_INFO "%s bios detected. Using realmode poweroff only.\n", d->ident);
-       }
-       return 0;
-}
-
-
-/* 
- * Some laptops require interrupts to be enabled during APM calls 
- */
-
-static __init int set_apm_ints(struct dmi_blacklist *d)
-{
-	if (apm_info.allow_ints == 0)
-	{
-		apm_info.allow_ints = 1;
-		printk(KERN_INFO "%s machine detected. Enabling interrupts during APM calls.\n", d->ident);
-	}
-	return 0;
-}
-
-/* 
- * Some APM bioses corrupt memory or just plain do not work
- */
-
-static __init int apm_is_horked(struct dmi_blacklist *d)
-{
-	if (apm_info.disabled == 0)
-	{
-		apm_info.disabled = 1;
-		printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
-	}
-	return 0;
-}
-
-static __init int apm_is_horked_d850md(struct dmi_blacklist *d)
-{
-	if (apm_info.disabled == 0) {
-		apm_info.disabled = 1;
-		printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
-		printk(KERN_INFO "This bug is fixed in bios P15 which is available for \n");
-		printk(KERN_INFO "download from support.intel.com \n");
-	}
-	return 0;
-}
-
-/* 
- * Some APM bioses hang on APM idle calls
- */
-
-static __init int apm_likes_to_melt(struct dmi_blacklist *d)
-{
-	if (apm_info.forbid_idle == 0) {
-		apm_info.forbid_idle = 1;
-		printk(KERN_INFO "%s machine detected. Disabling APM idle calls.\n", d->ident);
-	}
-	return 0;
-}
-
-/*
  * Some machines, usually laptops, can't handle an enabled local APIC.
  * The symptoms include hangs or reboots when suspending or resuming,
  * attaching or detaching the power cord, or entering BIOS setup screens
@@ -343,83 +248,13 @@
 }
 
 /*
- * Work around broken HP Pavilion Notebooks which assign USB to
- * IRQ 9 even though it is actually wired to IRQ 11
+ * Several HP Proliant (and maybe other OSB4/ProFusion) systems
+ * shouldn't use the AUX LoopBack command, or they crash or reboot.
  */
-static __init int fix_broken_hp_bios_irq9(struct dmi_blacklist *d)
-{
-#ifdef CONFIG_PCI
-	extern int broken_hp_bios_irq9;
-	if (broken_hp_bios_irq9 == 0)
-	{
-		broken_hp_bios_irq9 = 1;
-		printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
-	}
-#endif
-	return 0;
-}
 
-/*
- *  Check for clue free BIOS implementations who use
- *  the following QA technique
- *
- *      [ Write BIOS Code ]<------
- *               |                ^
- *      < Does it Compile >----N--
- *               |Y               ^
- *	< Does it Boot Win98 >-N--
- *               |Y
- *           [Ship It]
- *
- *	Phoenix A04  08/24/2000 is known bad (Dell Inspiron 5000e)
- *	Phoenix A07  09/29/2000 is known good (Dell Inspiron 5000)
- */
-
-static __init int broken_apm_power(struct dmi_blacklist *d)
-{
-	apm_info.get_power_status_broken = 1;
-	printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
-	return 0;
-}		
-
-/*
- * Check for a Sony Vaio system
- *
- * On a Sony system we want to enable the use of the sonypi
- * driver for Sony-specific goodies like the camera and jogdial.
- * We also want to avoid using certain functions of the PnP BIOS.
- */
-
-static __init int sony_vaio_laptop(struct dmi_blacklist *d)
-{
-	if (is_sony_vaio_laptop == 0)
-	{
-		is_sony_vaio_laptop = 1;
-		printk(KERN_INFO "%s laptop detected.\n", d->ident);
-	}
-	return 0;
-}
-
-/*
- * This bios swaps the APM minute reporting bytes over (Many sony laptops
- * have this problem).
- */
- 
-static __init int swab_apm_power_in_minutes(struct dmi_blacklist *d)
+static __init int set_8042_noloop(struct dmi_blacklist *d)
 {
-	apm_info.get_power_status_swabinminutes = 1;
-	printk(KERN_WARNING "BIOS strings suggest APM reports battery life in minutes and wrong byte order.\n");
-	return 0;
-}
-
-/*
- * ASUS K7V-RM has broken ACPI table defining sleep modes
- */
-
-static __init int broken_acpi_Sx(struct dmi_blacklist *d)
-{
-	printk(KERN_WARNING "Detected ASUS mainboard with broken ACPI sleep table\n");
-	dmi_broken |= BROKEN_ACPI_Sx;
+	i8042_dmi_noloop = 1;
 	return 0;
 }
 
@@ -454,49 +289,6 @@
 }
 #endif
 
-/*
- * Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it was
- * disabled before the suspend. Linux used to get terribly confused by that.
- */
-
-static __init int broken_ps2_resume(struct dmi_blacklist *d)
-{
-	printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround hopefully not needed.\n", d->ident);
-	return 0;
-}
-
-/*
- *	Exploding PnPBIOS. Don't yet know if its the BIOS or us for
- *	some entries
- */
-
-static __init int exploding_pnp_bios(struct dmi_blacklist *d)
-{
-	printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident);
-	dmi_broken |= BROKEN_PNP_BIOS;
-	return 0;
-}
-
-static __init int acer_cpufreq_pst(struct dmi_blacklist *d)
-{
-	printk(KERN_WARNING "%s laptop with broken PST tables in BIOS detected.\n", d->ident);
-	printk(KERN_WARNING "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n");
-	printk(KERN_WARNING "cpufreq scaling has been disabled as a result of this.\n");
-	dmi_broken |= BROKEN_CPUFREQ;
-	return 0;
-}
-
-
-/*
- *	Simple "print if true" callback
- */
- 
-static __init int print_if_true(struct dmi_blacklist *d)
-{
-	printk("%s\n", d->ident);
-	return 0;
-}
-
 
 #ifdef	CONFIG_ACPI_BOOT
 extern int acpi_force;
@@ -546,15 +338,21 @@
 
 #ifdef	CONFIG_ACPI_PCI
 static __init int disable_acpi_irq(struct dmi_blacklist *d) 
-{ 
-	printk(KERN_NOTICE "%s detected: force use of acpi=noirq\n", d->ident); 	
-	acpi_noirq_set();
+{
+	if (!acpi_force) {
+		printk(KERN_NOTICE "%s detected: force use of acpi=noirq\n",
+		       d->ident); 	
+		acpi_noirq_set();
+	}
 	return 0;
 }
 static __init int disable_acpi_pci(struct dmi_blacklist *d) 
-{ 
-	printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident); 	
-	acpi_disable_pci();
+{
+	if (!acpi_force) {
+		printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n",
+		       d->ident); 	
+		acpi_disable_pci();
+	}
 	return 0;
 }  
 #endif
@@ -570,48 +368,6 @@
  */
  
 static __initdata struct dmi_blacklist dmi_blacklist[]={
-	{ broken_ps2_resume, "Dell Latitude C600", {	/* Handle problems with APM on the C600 */
-			MATCH(DMI_SYS_VENDOR, "Dell"),
-			MATCH(DMI_PRODUCT_NAME, "Latitude C600"),
-			NO_MATCH, NO_MATCH
-			} },
-	{ set_apm_ints, "Dell Latitude", {  /* Allow interrupts during suspend on Dell Latitude laptops*/
-			MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			MATCH(DMI_PRODUCT_NAME, "Latitude C510"),
-			NO_MATCH, NO_MATCH
-			} },
-	{ apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
-			MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
-			MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION,"A11")
-			} },
-	{ set_apm_ints, "Dell Inspiron", {	/* Allow interrupts during suspend on Dell Inspiron laptops*/
-			MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			MATCH(DMI_PRODUCT_NAME, "Inspiron 4000"),
-			NO_MATCH, NO_MATCH
-			} },
-	{ broken_apm_power, "Dell Inspiron 5000e", {	/* Handle problems with APM on Inspiron 5000e */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "A04"),
-			MATCH(DMI_BIOS_DATE, "08/24/2000"), NO_MATCH
-			} },
-	{ broken_apm_power, "Dell Inspiron 2500", {	/* Handle problems with APM on Inspiron 2500 */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "A12"),
-			MATCH(DMI_BIOS_DATE, "02/04/2002"), NO_MATCH
-			} },
-	{ apm_is_horked, "Dell Dimension 4100", { /* APM crashes */
-			MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
-			MATCH(DMI_BIOS_VENDOR,"Intel Corp."),
-			MATCH(DMI_BIOS_VERSION,"A11")
-			} },
-	{ set_realmode_power_off, "Award Software v4.60 PGMA", {	/* broken PM poweroff bios */
-			MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
-			MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
-			MATCH(DMI_BIOS_DATE, "134526184"), NO_MATCH
-			} },
 	{ set_smp_bios_reboot, "Dell PowerEdge 1300", {	/* Handle problems with rebooting on Dell 1300's */
 			MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
 			MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
@@ -627,165 +383,7 @@
 			MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
 			NO_MATCH, NO_MATCH
 			} },
-	{ set_apm_ints, "Compaq 12XL125", {	/* Allow interrupts during suspend on Compaq Laptops*/
-			MATCH(DMI_SYS_VENDOR, "Compaq"),
-			MATCH(DMI_PRODUCT_NAME, "Compaq PC"),
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION,"4.06")
-			} },
-	{ set_apm_ints, "ASUSTeK", {   /* Allow interrupts during APM or the clock goes slow */
-			MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
-			MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"),
-			NO_MATCH, NO_MATCH
-			} },					
-	{ apm_is_horked, "ABIT KX7-333[R]", { /* APM blows on shutdown */
-			MATCH(DMI_BOARD_VENDOR, "ABIT"),
-			MATCH(DMI_BOARD_NAME, "VT8367-8233A (KX7-333[R])"),
-			NO_MATCH, NO_MATCH,
-			} },
-	{ apm_is_horked, "Trigem Delhi3", { /* APM crashes */
-			MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
-			MATCH(DMI_PRODUCT_NAME, "Delhi3"),
-			NO_MATCH, NO_MATCH,
-			} },
-	{ apm_is_horked, "Fujitsu-Siemens", { /* APM crashes */
-			MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"),
-			MATCH(DMI_BIOS_VERSION, "Version1.01"),
-			NO_MATCH, NO_MATCH,
-			} },
-	{ apm_is_horked_d850md, "Intel D850MD", { /* APM crashes */
-			MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
-			MATCH(DMI_BIOS_VERSION, "MV85010A.86A.0016.P07.0201251536"),
-			NO_MATCH, NO_MATCH,
-			} },
-	{ apm_is_horked, "Intel D810EMO", { /* APM crashes */
-			MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
-			MATCH(DMI_BIOS_VERSION, "MO81010A.86A.0008.P04.0004170800"),
-			NO_MATCH, NO_MATCH,
-			} },
-	{ apm_is_horked, "Dell XPS-Z", { /* APM crashes */
-			MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
-			MATCH(DMI_BIOS_VERSION, "A11"),
-			MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
-			NO_MATCH,
-			} },
-	{ apm_is_horked, "Sharp PC-PJ/AX", { /* APM crashes */
-			MATCH(DMI_SYS_VENDOR, "SHARP"),
-			MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"),
-			MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
-			MATCH(DMI_BIOS_VERSION,"Version R2.08")
-			} },
-	{ apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
-			MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
-			MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION,"A11")
-			} },
-	{ apm_likes_to_melt, "Jabil AMD", { /* APM idle hangs */
-			MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
-			MATCH(DMI_BIOS_VERSION, "0AASNP06"),
-			NO_MATCH, NO_MATCH,
-			} },
-	{ apm_likes_to_melt, "AMI Bios", { /* APM idle hangs */
-			MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
-			MATCH(DMI_BIOS_VERSION, "0AASNP05"), 
-			NO_MATCH, NO_MATCH,
-			} },
-	{ sony_vaio_laptop, "Sony Vaio", { /* This is a Sony Vaio laptop */
-			MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-			MATCH(DMI_PRODUCT_NAME, "PCG-"),
-			NO_MATCH, NO_MATCH,
-			} },
-	{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0206H"),
-			MATCH(DMI_BIOS_DATE, "08/23/99"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505VX */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "W2K06H0"),
-			MATCH(DMI_BIOS_DATE, "02/03/00"), NO_MATCH
-			} },
 			
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-XG29 */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0117A0"),
-			MATCH(DMI_BIOS_DATE, "04/25/00"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-Z600NE */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0121Z1"),
-			MATCH(DMI_BIOS_DATE, "05/11/00"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-Z600NE */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "WME01Z1"),
-			MATCH(DMI_BIOS_DATE, "08/11/00"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0206Z3"),
-			MATCH(DMI_BIOS_DATE, "12/25/00"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-Z505LS */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0203D0"),
-			MATCH(DMI_BIOS_DATE, "05/12/00"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-Z505LS */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0203Z3"),
-			MATCH(DMI_BIOS_DATE, "08/25/00"), NO_MATCH
-			} },
-	
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0209Z3"),
-			MATCH(DMI_BIOS_DATE, "05/12/01"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-F104K */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0204K2"),
-			MATCH(DMI_BIOS_DATE, "08/28/00"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-C1VN/C1VE */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0208P1"),
-			MATCH(DMI_BIOS_DATE, "11/09/00"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-C1VE */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "R0204P1"),
-			MATCH(DMI_BIOS_DATE, "09/12/00"), NO_MATCH
-			} },
-
-	{ swab_apm_power_in_minutes, "Sony VAIO", {	/* Handle problems with APM on Sony Vaio PCG-C1VE */
-			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-			MATCH(DMI_BIOS_VERSION, "WXPO1Z3"),
-			MATCH(DMI_BIOS_DATE, "10/26/01"), NO_MATCH
-			} },
-			
-	{ exploding_pnp_bios, "Higraded P14H", {	/* PnPBIOS GPF on boot */
-			MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
-			MATCH(DMI_BIOS_VERSION, "07.00T"),
-			MATCH(DMI_SYS_VENDOR, "Higraded"),
-			MATCH(DMI_PRODUCT_NAME, "P14H")
-			} },
-	{ exploding_pnp_bios, "ASUS P4P800", {	/* PnPBIOS GPF on boot */
-			MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
-			MATCH(DMI_BOARD_NAME, "P4P800"),
-			NO_MATCH, NO_MATCH
-			} },
-
 	/* Machines which have problems handling enabled local APICs */
 
 	{ local_apic_kills_bios, "Dell Inspiron", {
@@ -812,12 +410,6 @@
 			NO_MATCH, NO_MATCH
 			} },
 
-	{ broken_acpi_Sx, "ASUS K7V-RM", {		/* Bad ACPI Sx table */
-			MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"),
-			MATCH(DMI_BOARD_NAME, "<K7V-RM>"),
-			NO_MATCH, NO_MATCH
-			} },
-
 	{ broken_toshiba_keyboard, "Toshiba Satellite 4030cdt", { /* Keyboard generates spurious repeats */
 			MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
 			NO_MATCH, NO_MATCH, NO_MATCH
@@ -833,29 +425,6 @@
 			} },
 #endif
 
-	{ print_if_true, KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.", {
-			MATCH(DMI_SYS_VENDOR, "IBM"),
-			MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"),
-			NO_MATCH, NO_MATCH
-			} },
-	 
-	{ fix_broken_hp_bios_irq9, "HP Pavilion N5400 Series Laptop", {
-			MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
-			MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
-			MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
-			MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736")
-			} },
- 
-
-	/*
-	 *	Generic per vendor APM settings
-	 */
-	 
-	{ set_apm_ints, "IBM", {	/* Allow interrupts during suspend on IBM laptops */
-			MATCH(DMI_SYS_VENDOR, "IBM"),
-			NO_MATCH, NO_MATCH, NO_MATCH
-			} },
-
 	/*
 	 *	SMBus / sensors settings
 	 */
@@ -865,16 +434,22 @@
 			NO_MATCH, NO_MATCH, NO_MATCH
 			} },
 
-	/*
-	 * Some Athlon laptops have really fucked PST tables.
-	 * A BIOS update is all that can save them.
-	 * Mention this, and disable cpufreq.
-	 */
-	{ acer_cpufreq_pst, "Acer Aspire", {
-			MATCH(DMI_SYS_VENDOR, "Insyde Software"),
-			MATCH(DMI_BIOS_VERSION, "3A71"),
-			NO_MATCH, NO_MATCH,
-			} },
+	/*      
+	 * Several HP Proliant (and maybe other OSB4/ProFusion) systems
+	 * can't use i8042 in mux mode, or they crash or reboot.
+	 */                     
+
+	{ set_8042_noloop, "Compaq Proliant 8500", {
+			MATCH(DMI_SYS_VENDOR, "Compaq"),
+			MATCH(DMI_PRODUCT_NAME , "ProLiant"),
+			MATCH(DMI_PRODUCT_VERSION, "8500"),
+			NO_MATCH }},
+
+	{ set_8042_noloop, "Compaq Proliant DL760", {
+			MATCH(DMI_SYS_VENDOR, "Compaq"),
+			MATCH(DMI_PRODUCT_NAME , "ProLiant"),
+			MATCH(DMI_PRODUCT_VERSION, "DL760"),
+			NO_MATCH }},
 
 #ifdef	CONFIG_ACPI_BOOT
 	/*
@@ -1034,6 +609,13 @@
 			MATCH(DMI_BOARD_NAME, "PR-DLS"),
 			MATCH(DMI_BIOS_VERSION, "ASUS PR-DLS ACPI BIOS Revision 1010"),
 			MATCH(DMI_BIOS_DATE, "03/21/2003") }},
+
+ 	{ disable_acpi_pci, "Acer TravelMate 36x Laptop", {
+ 			MATCH(DMI_SYS_VENDOR, "Acer"),
+ 			MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+ 			NO_MATCH, NO_MATCH
+ 			} },
+
 #endif
 
 	{ NULL, }
@@ -1048,9 +630,6 @@
 
 static __init void dmi_check_blacklist(void)
 {
-	struct dmi_blacklist *d;
-	int i;
-		
 #ifdef	CONFIG_ACPI_BOOT
 #define	ACPI_BLACKLIST_CUTOFF_YEAR	2001
 
@@ -1072,25 +651,7 @@
 		}
 	}
 #endif
-
-	d=&dmi_blacklist[0];
-	while(d->callback)
-	{
-		for(i=0;i<4;i++)
-		{
-			int s = d->matches[i].slot;
-			if(s==NONE)
-				continue;
-			if(dmi_ident[s] && strstr(dmi_ident[s], d->matches[i].substr))
-				continue;
-			/* No match */
-			goto fail;
-		}
-		if(d->callback(d))
-			return;
-fail:			
-		d++;
-	}
+ 	dmi_check_system(dmi_blacklist);
 }
 
 	
@@ -1156,4 +717,51 @@
 		printk(KERN_INFO "DMI not present.\n");
 }
 
-EXPORT_SYMBOL(is_unsafe_smbus);
+
+/**
+ *	dmi_check_system - check system DMI data
+ *	@list: array of dmi_system_id structures to match against
+ *
+ *	Walk the blacklist table running matching functions until someone
+ *	returns non zero or we hit the end. Callback function is called for
+ *	each successfull match. Returns the number of matches.
+ */
+int dmi_check_system(struct dmi_system_id *list)
+{
+	int i, count = 0;
+	struct dmi_system_id *d = list;
+
+	while (d->ident) {
+		for (i = 0; i < ARRAY_SIZE(d->matches); i++) {
+			int s = d->matches[i].slot;
+			if (s == DMI_NONE)
+				continue;
+			if (dmi_ident[s] && strstr(dmi_ident[s], d->matches[i].substr))
+				continue;
+			/* No match */
+			goto fail;
+		}
+		if (d->callback && d->callback(d))
+			break;
+		count++;
+fail:		d++;
+	}
+
+	return count;
+}
+
+EXPORT_SYMBOL(dmi_check_system);
+
+/**
+ *	dmi_get_system_info - return DMI data value
+ *	@field: data index (see enum dmi_filed)
+ *
+ *	Returns one DMI data value, can be used to perform
+ *	complex DMI data checks.
+ */
+char * dmi_get_system_info(int field)
+{
+	return dmi_ident[field];
+}
+
+EXPORT_SYMBOL(dmi_get_system_info);
--- diff/arch/i386/kernel/efi.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/efi.c	2004-07-01 21:32:30.000000000 +0100
@@ -37,7 +37,6 @@
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 #include <asm/desc.h>
-#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 
 #define EFI_DEBUG	0
--- diff/arch/i386/kernel/entry.S	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/entry.S	2004-07-01 21:32:30.000000000 +0100
@@ -48,6 +48,18 @@
 #include <asm/smp.h>
 #include <asm/page.h>
 #include "irq_vectors.h"
+        /* We do not recover from a stack overflow, but at least
+         * we know it happened and should be able to track it down.
+         */
+#ifdef CONFIG_STACK_OVERFLOW_TEST
+#define STACK_OVERFLOW_TEST \
+        testl $(THREAD_SIZE - 512),%esp;    \
+        jnz   10f;            \
+        call  stack_overflow; \
+10:
+#else
+#define STACK_OVERFLOW_TEST
+#endif
 
 #define nr_syscalls ((syscall_table_size)/4)
 
@@ -94,7 +106,8 @@
 	pushl %ebx; \
 	movl $(__USER_DS), %edx; \
 	movl %edx, %ds; \
-	movl %edx, %es;
+	movl %edx, %es; \
+        STACK_OVERFLOW_TEST
 
 #define RESTORE_INT_REGS \
 	popl %ebx;	\
@@ -232,6 +245,7 @@
 	# sysenter call handler stub
 ENTRY(sysenter_entry)
 	movl TSS_sysenter_esp0(%esp),%esp
+	.globl sysenter_past_esp
 sysenter_past_esp:
 	sti
 	pushl $(__USER_DS)
@@ -294,6 +308,19 @@
 	testw $_TIF_ALLWORK_MASK, %cx	# current->work
 	jne syscall_exit_work
 restore_all:
+#ifdef CONFIG_TRAP_BAD_SYSCALL_EXITS
+	movl EFLAGS(%esp), %eax		# mix EFLAGS and CS
+	movb CS(%esp), %al
+	testl $(VM_MASK | 3), %eax
+	jz resume_kernelX		# returning to kernel or vm86-space
+
+	cmpl $0,TI_PRE_COUNT(%ebx)	# non-zero preempt_count ?
+	jz resume_kernelX
+
+        int $3
+
+resume_kernelX:
+#endif
 	RESTORE_ALL
 
 	# perform work that needs to be done immediately before resumption
@@ -348,7 +375,7 @@
 	# perform syscall exit tracing
 	ALIGN
 syscall_exit_work:
-	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT), %cl
+	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP), %cl
 	jz work_pending
 	sti				# could let do_syscall_trace() call
 					# schedule() instead
@@ -406,6 +433,16 @@
 /* The include is where all of the SMP etc. interrupts come from */
 #include "entry_arch.h"
 
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PERFCTR)
+ENTRY(perfctr_interrupt)
+	pushl $LOCAL_PERFCTR_VECTOR-256
+	SAVE_ALL
+	pushl %esp
+	call smp_perfctr_interrupt
+	addl $4, %esp
+	jmp ret_from_intr
+#endif
+
 ENTRY(divide_error)
 	pushl $0			# no error code
 	pushl $do_divide_error
@@ -886,5 +923,11 @@
 	.long sys_mq_notify
 	.long sys_mq_getsetattr
 	.long sys_ni_syscall		/* reserved for kexec */
+	.long sys_perfctr_info
+	.long sys_vperfctr_open
+	.long sys_vperfctr_control
+	.long sys_vperfctr_unlink
+	.long sys_vperfctr_iresume
+	.long sys_vperfctr_read
 
 syscall_table_size=(.-sys_call_table)
--- diff/arch/i386/kernel/head.S	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/head.S	2004-07-01 21:32:30.000000000 +0100
@@ -153,6 +153,32 @@
 	orl %edx,%eax
 	movl %eax,%cr4
 
+	btl $5, %eax		# check if PAE is enabled
+	jnc 6f
+
+	/* Check if extended functions are implemented */
+	movl $0x80000000, %eax
+	cpuid
+	cmpl $0x80000000, %eax
+	jbe 6f
+	mov $0x80000001, %eax
+	cpuid
+	/* Execute Disable bit supported? */
+	btl $20, %edx
+	jnc 6f
+
+	/* Setup EFER (Extended Feature Enable Register) */
+	movl $0xc0000080, %ecx
+	rdmsr
+
+	btsl $11, %eax
+	/* Make changes effective */
+	wrmsr
+
+6:
+	/* cpuid clobbered ebx, set it up again: */
+	xorl %ebx,%ebx
+	incl %ebx
 3:
 #endif /* CONFIG_SMP */
 
--- diff/arch/i386/kernel/i386_ksyms.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/i386_ksyms.c	2004-07-01 21:32:30.000000000 +0100
@@ -29,7 +29,6 @@
 #include <asm/mmx.h>
 #include <asm/desc.h>
 #include <asm/pgtable.h>
-#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 #include <asm/nmi.h>
 #include <asm/ist.h>
@@ -173,24 +172,15 @@
 
 EXPORT_SYMBOL_GPL(set_nmi_callback);
 EXPORT_SYMBOL_GPL(unset_nmi_callback);
- 
-#undef memcpy
-#undef memset
+
 #undef memcmp
-extern void * memset(void *,int,__kernel_size_t);
-extern void * memcpy(void *,const void *,__kernel_size_t);
 extern int memcmp(const void *,const void *,__kernel_size_t);
-EXPORT_SYMBOL_NOVERS(memcpy);
-EXPORT_SYMBOL_NOVERS(memset);
 EXPORT_SYMBOL_NOVERS(memcmp);
 
 #ifdef CONFIG_HAVE_DEC_LOCK
 EXPORT_SYMBOL(atomic_dec_and_lock);
 #endif
 
-extern int is_sony_vaio_laptop;
-EXPORT_SYMBOL(is_sony_vaio_laptop);
-
 EXPORT_SYMBOL(__PAGE_KERNEL);
 
 #ifdef CONFIG_HIGHMEM
--- diff/arch/i386/kernel/i8259.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/i8259.c	2004-07-01 21:32:30.000000000 +0100
@@ -23,6 +23,7 @@
 #include <asm/apic.h>
 #include <asm/arch_hooks.h>
 #include <asm/i8259.h>
+#include <asm/perfctr.h>
 
 #include <linux/irq.h>
 
@@ -317,16 +318,11 @@
  * be shot.
  */
  
-/*
- * =PC9800NOTE= In NEC PC-9800, we use irq8 instead of irq13!
- */
 
 static irqreturn_t math_error_irq(int cpl, void *dev_id, struct pt_regs *regs)
 {
 	extern void math_error(void *);
-#ifndef CONFIG_X86_PC9800
 	outb(0,0xF0);
-#endif
 	if (ignore_fpu_irq || !boot_cpu_data.hard_math)
 		return IRQ_NONE;
 	math_error((void *)regs->eip);
@@ -337,7 +333,7 @@
  * New motherboards sometimes make IRQ 13 be a PCI interrupt,
  * so allow interrupt sharing.
  */
-static struct irqaction fpu_irq = { math_error_irq, 0, 0, "fpu", NULL, NULL };
+static struct irqaction fpu_irq = { math_error_irq, 0, CPU_MASK_NONE, "fpu", NULL, NULL };
 
 void __init init_ISA_irqs (void)
 {
@@ -432,6 +428,8 @@
 	 */
 	intr_init_hook();
 
+	perfctr_vector_init();
+
 	/*
 	 * Set the clock to HZ Hz, we already have a valid
 	 * vector now:
--- diff/arch/i386/kernel/init_task.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/init_task.c	2004-07-01 21:32:30.000000000 +0100
@@ -4,6 +4,7 @@
 #include <linux/init.h>
 #include <linux/init_task.h>
 #include <linux/fs.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/i386/kernel/io_apic.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/io_apic.c	2004-07-01 21:32:30.000000000 +0100
@@ -41,10 +41,6 @@
 
 #include "io_ports.h"
 
-#undef APIC_LOCKUP_DEBUG
-
-#define APIC_LOCKUP_DEBUG
-
 static spinlock_t ioapic_lock = SPIN_LOCK_UNLOCKED;
 
 /*
@@ -127,83 +123,47 @@
 	}
 }
 
-/* mask = 1 */
-static void __mask_IO_APIC_irq (unsigned int irq)
+static void __modify_IO_APIC_irq (unsigned int irq, unsigned long enable, unsigned long disable)
 {
-	int pin;
 	struct irq_pin_list *entry = irq_2_pin + irq;
+	unsigned int pin, reg;
 
 	for (;;) {
-		unsigned int reg;
 		pin = entry->pin;
 		if (pin == -1)
 			break;
 		reg = io_apic_read(entry->apic, 0x10 + pin*2);
-		io_apic_modify(entry->apic, 0x10 + pin*2, reg |= 0x00010000);
+		reg &= ~disable;
+		reg |= enable;
+		io_apic_modify(entry->apic, 0x10 + pin*2, reg);
 		if (!entry->next)
 			break;
 		entry = irq_2_pin + entry->next;
 	}
-	io_apic_sync(entry->apic);
+}
+
+/* mask = 1 */
+static void __mask_IO_APIC_irq (unsigned int irq)
+{
+	__modify_IO_APIC_irq(irq, 0x00010000, 0);
 }
 
 /* mask = 0 */
 static void __unmask_IO_APIC_irq (unsigned int irq)
 {
-	int pin;
-	struct irq_pin_list *entry = irq_2_pin + irq;
-
-	for (;;) {
-		unsigned int reg;
-		pin = entry->pin;
-		if (pin == -1)
-			break;
-		reg = io_apic_read(entry->apic, 0x10 + pin*2);
-		io_apic_modify(entry->apic, 0x10 + pin*2, reg &= 0xfffeffff);
-		if (!entry->next)
-			break;
-		entry = irq_2_pin + entry->next;
-	}
+	__modify_IO_APIC_irq(irq, 0, 0x00010000);
 }
 
 /* mask = 1, trigger = 0 */
 static void __mask_and_edge_IO_APIC_irq (unsigned int irq)
 {
-	int pin;
-	struct irq_pin_list *entry = irq_2_pin + irq;
-
-	for (;;) {
-		unsigned int reg;
-		pin = entry->pin;
-		if (pin == -1)
-			break;
-		reg = io_apic_read(entry->apic, 0x10 + pin*2);
-		reg = (reg & 0xffff7fff) | 0x00010000;
-		io_apic_modify(entry->apic, 0x10 + pin*2, reg);
-		if (!entry->next)
-			break;
-		entry = irq_2_pin + entry->next;
-	}
+	__modify_IO_APIC_irq(irq, 0x00010000, 0x00008000);
 }
 
 /* mask = 0, trigger = 1 */
 static void __unmask_and_level_IO_APIC_irq (unsigned int irq)
 {
-	int pin;
-	struct irq_pin_list *entry = irq_2_pin + irq;
-
-	for (;;) {
-		unsigned int reg;
-		pin = entry->pin;
-		if (pin == -1)
-			break;
-		reg = io_apic_read(entry->apic, 0x10 + pin*2);
-		reg = (reg & 0xfffeffff) | 0x00008000;
-		io_apic_modify(entry->apic, 0x10 + pin*2, reg);
-		if (!entry->next)
-			break;
-		entry = irq_2_pin + entry->next;
-	}
+	__modify_IO_APIC_irq(irq, 0x00008000, 0x00010000);
 }
 
 static void mask_IO_APIC_irq (unsigned int irq)
@@ -264,7 +224,7 @@
 	struct irq_pin_list *entry = irq_2_pin + irq;
 	unsigned int apicid_value;
 	
-	apicid_value = cpu_mask_to_apicid(mk_cpumask_const(cpumask));
+	apicid_value = cpu_mask_to_apicid(cpumask);
 	/* Prepare to do the io_apic_write */
 	apicid_value = apicid_value << 24;
 	spin_lock_irqsave(&ioapic_lock, flags);
@@ -595,7 +555,7 @@
 	return;
 }
 
-int balanced_irq(void *unused)
+static int balanced_irq(void *unused)
 {
 	int i;
 	unsigned long prev_balance_time = jiffies;
@@ -608,17 +568,17 @@
 		pending_irq_balance_cpumask[i] = cpumask_of_cpu(0);
 	}
 
-repeat:
-	set_current_state(TASK_INTERRUPTIBLE);
-	time_remaining = schedule_timeout(time_remaining);
-	if (time_after(jiffies, prev_balance_time+balanced_irq_interval)) {
-		Dprintk("balanced_irq: calling do_irq_balance() %lu\n",
-					jiffies);
-		do_irq_balance();
-		prev_balance_time = jiffies;
-		time_remaining = balanced_irq_interval;
+	for ( ; ; ) {
+		set_current_state(TASK_INTERRUPTIBLE);
+		time_remaining = schedule_timeout(time_remaining);
+		if (time_after(jiffies,
+				prev_balance_time+balanced_irq_interval)) {
+			do_irq_balance();
+			prev_balance_time = jiffies;
+			time_remaining = balanced_irq_interval;
+		}
 	}
-	goto repeat;
+	return 0;
 }
 
 static int __init balanced_irq_init(void)
@@ -1366,7 +1326,7 @@
 	printk(KERN_DEBUG ".......    : physical APIC id: %02X\n", reg_00.bits.ID);
 	printk(KERN_DEBUG ".......    : Delivery Type: %X\n", reg_00.bits.delivery_type);
 	printk(KERN_DEBUG ".......    : LTS          : %X\n", reg_00.bits.LTS);
-	if (reg_00.bits.ID >= APIC_BROADCAST_ID)
+	if (reg_00.bits.ID >= get_physical_broadcast())
 		UNEXPECTED_IO_APIC();
 	if (reg_00.bits.__reserved_1 || reg_00.bits.__reserved_2)
 		UNEXPECTED_IO_APIC();
@@ -1451,12 +1411,17 @@
 		);
 	}
 	}
+	if (use_pci_vector())
+		printk(KERN_INFO "Using vector-based indexing\n");
 	printk(KERN_DEBUG "IRQ to pin mappings:\n");
 	for (i = 0; i < NR_IRQS; i++) {
 		struct irq_pin_list *entry = irq_2_pin + i;
 		if (entry->pin < 0)
 			continue;
-		printk(KERN_DEBUG "IRQ%d ", i);
+ 		if (use_pci_vector() && !platform_legacy_irq(i))
+			printk(KERN_DEBUG "IRQ%d ", IO_APIC_VECTOR(i));
+		else
+			printk(KERN_DEBUG "IRQ%d ", i);
 		for (;;) {
 			printk("-> %d:%d", entry->apic, entry->pin);
 			if (!entry->next)
@@ -1682,7 +1647,7 @@
 		
 		old_id = mp_ioapics[apic].mpc_apicid;
 
-		if (mp_ioapics[apic].mpc_apicid >= APIC_BROADCAST_ID) {
+		if (mp_ioapics[apic].mpc_apicid >= get_physical_broadcast()) {
 			printk(KERN_ERR "BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n",
 				apic, mp_ioapics[apic].mpc_apicid);
 			printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",
@@ -1703,10 +1668,10 @@
 					mp_ioapics[apic].mpc_apicid)) {
 			printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n",
 				apic, mp_ioapics[apic].mpc_apicid);
-			for (i = 0; i < APIC_BROADCAST_ID; i++)
+			for (i = 0; i < get_physical_broadcast(); i++)
 				if (!physid_isset(i, phys_id_present_map))
 					break;
-			if (i >= APIC_BROADCAST_ID)
+			if (i >= get_physical_broadcast())
 				panic("Max APIC ID exceeded!\n");
 			printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",
 				i);
@@ -1893,30 +1858,11 @@
 	ack_APIC_irq();
 
 	if (!(v & (1 << (i & 0x1f)))) {
-#ifdef APIC_LOCKUP_DEBUG
-		struct irq_pin_list *entry;
-#endif
-
 #ifdef APIC_MISMATCH_DEBUG
 		atomic_inc(&irq_mis_count);
 #endif
 		spin_lock(&ioapic_lock);
 		__mask_and_edge_IO_APIC_irq(irq);
-#ifdef APIC_LOCKUP_DEBUG
-		for (entry = irq_2_pin + irq;;) {
-			unsigned int reg;
-
-			if (entry->pin == -1)
-				break;
-			reg = io_apic_read(entry->apic, 0x10 + entry->pin * 2);
-			if (reg & 0x00004000)
-				printk(KERN_CRIT "Aieee!!!  Remote IRR"
-					" still set after unlock!\n");
-			if (!entry->next)
-				break;
-			entry = irq_2_pin + entry->next;
-		}
-#endif
 		__unmask_and_level_IO_APIC_irq(irq);
 		spin_unlock(&ioapic_lock);
 	}
@@ -2322,8 +2268,6 @@
 
 #ifdef CONFIG_ACPI_BOOT
 
-#define IO_APIC_MAX_ID APIC_BROADCAST_ID
-
 int __init io_apic_get_unique_id (int ioapic, int apic_id)
 {
 	union IO_APIC_reg_00 reg_00;
@@ -2348,7 +2292,7 @@
 	reg_00.raw = io_apic_read(ioapic, 0);
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 
-	if (apic_id >= IO_APIC_MAX_ID) {
+	if (apic_id >= get_physical_broadcast()) {
 		printk(KERN_WARNING "IOAPIC[%d]: Invalid apic_id %d, trying "
 			"%d\n", ioapic, apic_id, reg_00.bits.ID);
 		apic_id = reg_00.bits.ID;
@@ -2360,12 +2304,12 @@
 	 */
 	if (check_apicid_used(apic_id_map, apic_id)) {
 
-		for (i = 0; i < IO_APIC_MAX_ID; i++) {
+		for (i = 0; i < get_physical_broadcast(); i++) {
 			if (!check_apicid_used(apic_id_map, i))
 				break;
 		}
 
-		if (i == IO_APIC_MAX_ID)
+		if (i == get_physical_broadcast())
 			panic("Max apic_id exceeded!\n");
 
 		printk(KERN_WARNING "IOAPIC[%d]: apic_id %d already used, "
--- diff/arch/i386/kernel/irq.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/irq.c	2004-07-01 21:32:30.000000000 +0100
@@ -41,7 +41,6 @@
 #include <asm/system.h>
 #include <asm/bitops.h>
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/delay.h>
 #include <asm/desc.h>
 #include <asm/irq.h>
@@ -570,6 +569,8 @@
 
 	irq_exit();
 
+	kgdb_process_breakpoint();
+
 	return 1;
 }
 
@@ -653,7 +654,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/i386/kernel/microcode.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/microcode.c	2004-07-01 21:32:30.000000000 +0100
@@ -1,7 +1,7 @@
 /*
- *	Intel CPU Microcode Update driver for Linux
+ *	Intel CPU Microcode Update Driver for Linux
  *
- *	Copyright (C) 2000 Tigran Aivazian
+ *	Copyright (C) 2000-2004 Tigran Aivazian
  *
  *	This driver allows to upgrade microcode on Intel processors
  *	belonging to IA-32 family - PentiumPro, Pentium II, 
@@ -32,7 +32,7 @@
  *		Added misc device support (now uses both devfs and misc).
  *		Added MICROCODE_IOCFREE ioctl to clear memory.
  *	1.05	09 Jun 2000, Simon Trimmer <simon@veritas.com>
- *		Messages for error cases (non intel & no suitable microcode).
+ *		Messages for error cases (non Intel & no suitable microcode).
  *	1.06	03 Aug 2000, Tigran Aivazian <tigran@veritas.com>
  *		Removed ->release(). Removed exclusive open and status bitmap.
  *		Added microcode_rwsem to serialize read()/write()/ioctl().
@@ -64,6 +64,9 @@
  *		Removed ->read() method and obsoleted MICROCODE_IOCFREE ioctl
  *		because we no longer hold a copy of applied microcode 
  *		in kernel memory.
+ *	1.14	25 Jun 2004 Tigran Aivazian <tigran@veritas.com>
+ *		Fix sigmatch() macro to handle old CPUs with pf == 0.
+ *		Thanks to Stuart Swales for pointing out this bug.
  */
 
 
@@ -80,11 +83,11 @@
 #include <asm/uaccess.h>
 #include <asm/processor.h>
 
-MODULE_DESCRIPTION("Intel CPU (IA-32) microcode update driver");
+MODULE_DESCRIPTION("Intel CPU (IA-32) Microcode Update Driver");
 MODULE_AUTHOR("Tigran Aivazian <tigran@veritas.com>");
 MODULE_LICENSE("GPL");
 
-#define MICROCODE_VERSION 	"1.13"
+#define MICROCODE_VERSION 	"1.14"
 #define MICRO_DEBUG 		0
 #if MICRO_DEBUG
 #define dprintk(x...) printk(KERN_INFO x)
@@ -104,7 +107,10 @@
 #define get_datasize(mc) \
 	(((microcode_t *)mc)->hdr.datasize ? \
 	 ((microcode_t *)mc)->hdr.datasize : DEFAULT_UCODE_DATASIZE)
-#define sigmatch(s1, s2, p1, p2) (((s1) == (s2)) && ((p1) & (p2)))
+
+#define sigmatch(s1, s2, p1, p2) \
+	(((s1) == (s2)) && (((p1) & (p2)) || (((p1) == 0) && ((p2) == 0))))
+
 #define exttable_size(et) ((et)->count * EXT_SIGNATURE_SIZE + EXT_HEADER_SIZE)
 
 /* serialize access to the physical write to MSR 0x79 */
@@ -363,7 +369,7 @@
 	struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num;
 
 	if (uci->mc == NULL) {
-		printk(KERN_INFO "microcode: No suitable data for cpu %d\n", cpu_num);
+		printk(KERN_INFO "microcode: No suitable data for CPU%d\n", cpu_num);
 		return;
 	}
 
@@ -495,16 +501,14 @@
 	}
 
 	printk(KERN_INFO 
-		"IA-32 Microcode Update Driver: v%s <tigran@veritas.com>\n", 
-		MICROCODE_VERSION);
+		"IA-32 Microcode Update Driver: v" MICROCODE_VERSION " <tigran@veritas.com>\n");
 	return 0;
 }
 
 static void __exit microcode_exit (void)
 {
 	misc_deregister(&microcode_dev);
-	printk(KERN_INFO "IA-32 Microcode Update Driver v%s unregistered\n", 
-			MICROCODE_VERSION);
+	printk(KERN_INFO "IA-32 Microcode Update Driver v" MICROCODE_VERSION " unregistered\n");
 }
 
 module_init(microcode_init)
--- diff/arch/i386/kernel/module.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/module.c	2004-07-01 21:32:30.000000000 +0100
@@ -32,7 +32,7 @@
 {
 	if (size == 0)
 		return NULL;
-	return vmalloc(size);
+	return vmalloc_exec(size);
 }
 
 
--- diff/arch/i386/kernel/mpparse.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/mpparse.c	2004-07-01 21:32:30.000000000 +0100
@@ -23,12 +23,12 @@
 #include <linux/smp_lock.h>
 #include <linux/kernel_stat.h>
 #include <linux/mc146818rtc.h>
+#include <linux/bitops.h>
 
 #include <asm/smp.h>
 #include <asm/acpi.h>
 #include <asm/mtrr.h>
 #include <asm/mpspec.h>
-#include <asm/pgalloc.h>
 #include <asm/io_apic.h>
 
 #include <mach_apic.h>
@@ -104,6 +104,21 @@
 static int mpc_record; 
 static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __initdata;
 
+#ifdef CONFIG_X86_NUMAQ
+static int MP_valid_apicid(int apicid, int version)
+{
+	return hweight_long(apicid & 0xf) == 1 && (apicid >> 4) != 0xf;
+}
+#else
+static int MP_valid_apicid(int apicid, int version)
+{
+	if (version >= 0x14)
+		return apicid < 0xff;
+	else
+		return apicid < 0xf;
+}
+#endif
+
 void __init MP_processor_info (struct mpc_config_processor *m)
 {
  	int ver, apicid;
@@ -180,14 +195,14 @@
 		return;
 	}
 	num_processors++;
+	ver = m->mpc_apicver;
 
-	if (MAX_APICS - m->mpc_apicid <= 0) {
+	if (!MP_valid_apicid(apicid, ver)) {
 		printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n",
 			m->mpc_apicid, MAX_APICS);
 		--num_processors;
 		return;
 	}
-	ver = m->mpc_apicver;
 
 	tmp = apicid_to_cpu_present(apicid);
 	physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp);
@@ -844,7 +859,7 @@
 	MP_processor_info(&processor);
 }
 
-#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
+#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT))
 
 #define MP_ISA_BUS		0
 #define MP_MAX_IOAPIC_PIN	127
@@ -857,7 +872,7 @@
 } mp_ioapic_routing[MAX_IO_APICS];
 
 
-static int __init mp_find_ioapic (
+static int mp_find_ioapic (
 	int			gsi)
 {
 	int			i = 0;
@@ -1000,14 +1015,23 @@
 	for (i = 0; i < 16; i++) {
 		int idx;
 
-		for (idx = 0; idx < mp_irq_entries; idx++)
-			if (mp_irqs[idx].mpc_srcbus == MP_ISA_BUS &&
-				(mp_irqs[idx].mpc_srcbusirq == i ||
-				mp_irqs[idx].mpc_dstirq == i))
-					break;
+		for (idx = 0; idx < mp_irq_entries; idx++) {
+			struct mpc_config_intsrc *irq = mp_irqs + idx;
 
-		if (idx != mp_irq_entries)
-			continue;			  /* IRQ already used */
+			/* Do we already have a mapping for this ISA IRQ? */
+			if (irq->mpc_srcbus == MP_ISA_BUS && irq->mpc_srcbusirq == i)
+				break;
+
+			/* Do we already have a mapping for this IOAPIC pin */
+			if ((irq->mpc_dstapic == intsrc.mpc_dstapic) &&
+				(irq->mpc_dstirq == i))
+				break;
+		}
+
+		if (idx != mp_irq_entries) {
+			printk(KERN_DEBUG "ACPI: IRQ%d used by override.\n", i);
+			continue;			/* IRQ already used */
+		}
 
 		intsrc.mpc_irqtype = mp_INT;
 		intsrc.mpc_srcbusirq = i;		   /* Identity mapped */
@@ -1025,96 +1049,56 @@
 	}
 }
 
-extern FADT_DESCRIPTOR acpi_fadt;
-
-#ifdef CONFIG_ACPI_PCI
-
 int (*platform_rename_gsi)(int ioapic, int gsi);
 
-void __init mp_parse_prt (void)
+void mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
 {
-	struct list_head	*node = NULL;
-	struct acpi_prt_entry	*entry = NULL;
 	int			ioapic = -1;
 	int			ioapic_pin = 0;
-	int			gsi = 0;
 	int			idx, bit = 0;
-	int			edge_level = 0;
-	int			active_high_low = 0;
 
-	/*
-	 * Parsing through the PCI Interrupt Routing Table (PRT) and program
-	 * routing for all entries.
-	 */
-	list_for_each(node, &acpi_prt.entries) {
-		entry = list_entry(node, struct acpi_prt_entry, node);
+#ifdef CONFIG_ACPI_BUS
+	/* Don't set up the ACPI SCI because it's already set up */
+	if (acpi_fadt.sci_int == gsi)
+		return;
+#endif
 
-		/* Need to get gsi for dynamic entry */
-		if (entry->link.handle) {
-			gsi = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low);
-			if (!gsi)
-				continue;
-		}
-		else {
-			/* Hardwired GSI. Assume PCI standard settings */
-			gsi = entry->link.index;
-			edge_level = 1;
-			active_high_low = 1;
-		}
+	ioapic = mp_find_ioapic(gsi);
+	if (ioapic < 0) {
+		printk(KERN_WARNING "No IOAPIC for GSI %u\n", gsi);
+		return;
+	}
 
-		/* Don't set up the ACPI SCI because it's already set up */
-                if (acpi_fadt.sci_int == gsi) {
-			/* we still need to set entry's irq */
-			acpi_gsi_to_irq(gsi, &entry->irq);
-			continue;
-                }
-	
-		ioapic = mp_find_ioapic(gsi);
-		if (ioapic < 0)
-			continue;
-		ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
-
-		if (platform_rename_gsi)
-			gsi = platform_rename_gsi(ioapic, gsi);
-
-		/* 
-		 * Avoid pin reprogramming.  PRTs typically include entries  
-		 * with redundant pin->gsi mappings (but unique PCI devices);
-		 * we only only program the IOAPIC on the first.
-		 */
-		bit = ioapic_pin % 32;
-		idx = (ioapic_pin < 32) ? 0 : (ioapic_pin / 32);
-		if (idx > 3) {
-			printk(KERN_ERR "Invalid reference to IOAPIC pin "
-				"%d-%d\n", mp_ioapic_routing[ioapic].apic_id, 
-				ioapic_pin);
-			continue;
-		}
-		if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
-			Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
-				mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
-			acpi_gsi_to_irq(gsi, &entry->irq);
-			continue;
-		}
+	ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
 
-		mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
+	if (platform_rename_gsi)
+		gsi = platform_rename_gsi(ioapic, gsi);
 
-		if (!io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, edge_level, active_high_low)) {
-			acpi_gsi_to_irq(gsi, &entry->irq);
-		}
-		printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d -> IRQ %d %s %s\n",
-			entry->id.segment, entry->id.bus,
-			entry->id.device, ('A' + entry->pin),
-			mp_ioapic_routing[ioapic].apic_id, ioapic_pin,
-			entry->irq, edge_level ? "level" : "edge",
-			active_high_low ? "low" : "high");
+	/* 
+	 * Avoid pin reprogramming.  PRTs typically include entries  
+	 * with redundant pin->gsi mappings (but unique PCI devices);
+	 * we only program the IOAPIC on the first.
+	 */
+	bit = ioapic_pin % 32;
+	idx = (ioapic_pin < 32) ? 0 : (ioapic_pin / 32);
+	if (idx > 3) {
+		printk(KERN_ERR "Invalid reference to IOAPIC pin "
+			"%d-%d\n", mp_ioapic_routing[ioapic].apic_id, 
+			ioapic_pin);
+		return;
+	}
+	if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
+		Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
+			mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
+		return;
 	}
 
-	print_IO_APIC();
+	mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
 
-	return;
+	io_apic_set_pci_routing(ioapic, ioapic_pin, gsi,
+		    edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1,
+		    active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1);
 }
 
-#endif /*CONFIG_ACPI_PCI*/
-#endif /*CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER*/
+#endif /*CONFIG_X86_IO_APIC && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)*/
 #endif /*CONFIG_ACPI_BOOT*/
--- diff/arch/i386/kernel/msr.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/msr.c	2004-07-01 21:32:31.000000000 +0100
@@ -35,12 +35,17 @@
 #include <linux/smp_lock.h>
 #include <linux/major.h>
 #include <linux/fs.h>
+#include <linux/device.h>
+#include <linux/cpu.h>
+#include <linux/notifier.h>
 
 #include <asm/processor.h>
 #include <asm/msr.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
+static struct class_simple *msr_class;
+
 /* Note: "err" is handled in a funny way below.  Otherwise one version
    of gcc or another breaks. */
 
@@ -255,20 +260,82 @@
 	.open = msr_open,
 };
 
+static int msr_class_simple_device_add(int i)
+{
+	int err = 0;
+	struct class_device *class_err;
+
+	class_err = class_simple_device_add(msr_class, MKDEV(MSR_MAJOR, i), NULL, "msr%d",i);
+	if (IS_ERR(class_err)) 
+		err = PTR_ERR(class_err);
+	return err;
+}
+
+static int __devinit msr_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
+{
+	unsigned int cpu = (unsigned long)hcpu;
+
+	switch (action) {
+	case CPU_ONLINE:
+		msr_class_simple_device_add(cpu);
+		break;
+	case CPU_DEAD:
+		class_simple_device_remove(MKDEV(MSR_MAJOR, cpu));	
+		break;
+	}
+	return NOTIFY_OK;
+}
+
+static struct notifier_block msr_class_cpu_notifier =
+{
+	.notifier_call = msr_class_cpu_callback,
+};
+
 int __init msr_init(void)
 {
+	int i, err = 0;
+	i = 0;
+
 	if (register_chrdev(MSR_MAJOR, "cpu/msr", &msr_fops)) {
 		printk(KERN_ERR "msr: unable to get major %d for msr\n",
 		       MSR_MAJOR);
-		return -EBUSY;
+		err = -EBUSY;
+		goto out;
+	}
+	msr_class = class_simple_create(THIS_MODULE, "msr");
+	if (IS_ERR(msr_class)) {
+		err = PTR_ERR(msr_class);
+		goto out_chrdev;
 	}
+	for_each_online_cpu(i) {
+		err = msr_class_simple_device_add(i);
+		if (err != 0)
+			goto out_class;
+	}
+	register_cpu_notifier(&msr_class_cpu_notifier);
 
-	return 0;
+	err = 0;
+	goto out;
+
+out_class:
+	i = 0;
+	for_each_online_cpu(i)
+		class_simple_device_remove(MKDEV(MSR_MAJOR, i));
+	class_simple_destroy(msr_class);
+out_chrdev:
+	unregister_chrdev(MSR_MAJOR, "cpu/msr");
+out:
+	return err;
 }
 
 void __exit msr_exit(void)
 {
+	int cpu = 0;
+	for_each_online_cpu(cpu)
+		class_simple_device_remove(MKDEV(MSR_MAJOR, cpu));
+	class_simple_destroy(msr_class);
 	unregister_chrdev(MSR_MAJOR, "cpu/msr");
+	unregister_cpu_notifier(&msr_class_cpu_notifier);
 }
 
 module_init(msr_init);
--- diff/arch/i386/kernel/nmi.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/nmi.c	2004-07-01 21:32:31.000000000 +0100
@@ -31,7 +31,17 @@
 #include <asm/mpspec.h>
 #include <asm/nmi.h>
 
+#ifdef CONFIG_KGDB
+#include <asm/kgdb.h>
+#ifdef CONFIG_SMP
+unsigned int nmi_watchdog = NMI_IO_APIC;
+#else
+unsigned int nmi_watchdog = NMI_LOCAL_APIC;
+#endif
+#else
 unsigned int nmi_watchdog = NMI_NONE;
+#endif
+
 static unsigned int nmi_hz = HZ;
 static unsigned int nmi_perfctr_msr;	/* the MSR to reset in NMI handler */
 static unsigned int nmi_p4_cccr_val;
@@ -458,6 +468,9 @@
 	for (i = 0; i < NR_CPUS; i++)
 		alert_counter[i] = 0;
 }
+#ifdef CONFIG_KGDB
+int tune_watchdog = 5*HZ;
+#endif
 
 void nmi_watchdog_tick (struct pt_regs * regs)
 {
@@ -471,12 +484,24 @@
 
 	sum = irq_stat[cpu].apic_timer_irqs;
 
+#ifdef CONFIG_KGDB
+ 	if (!in_kgdb(regs) && last_irq_sums[cpu] == sum) {
+
+#else
 	if (last_irq_sums[cpu] == sum) {
+#endif
 		/*
 		 * Ayiee, looks like this CPU is stuck ...
 		 * wait a few IRQs (5 seconds) before doing the oops ...
 		 */
 		alert_counter[cpu]++;
+#ifdef CONFIG_KGDB
+		if (alert_counter[cpu] == tune_watchdog) {
+			kgdb_handle_exception(2, SIGPWR, 0, regs);
+			last_irq_sums[cpu] = sum;
+			alert_counter[cpu] = 0;
+		}
+#endif
 		if (alert_counter[cpu] == 5*nmi_hz) {
 			spin_lock(&nmi_print_lock);
 			/*
--- diff/arch/i386/kernel/process.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/process.c	2004-07-01 21:32:31.000000000 +0100
@@ -32,6 +32,7 @@
 #include <linux/delay.h>
 #include <linux/reboot.h>
 #include <linux/init.h>
+#include <linux/perfctr.h>
 #include <linux/mc146818rtc.h>
 #include <linux/module.h>
 #include <linux/kallsyms.h>
@@ -304,6 +305,7 @@
 		tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
 		put_cpu();
 	}
+	perfctr_exit_thread(&tsk->thread);
 }
 
 void flush_thread(void)
@@ -366,6 +368,8 @@
 	savesegment(fs,p->thread.fs);
 	savesegment(gs,p->thread.gs);
 
+	perfctr_copy_thread(&p->thread);
+
 	tsk = current;
 	if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) {
 		p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
@@ -511,6 +515,8 @@
 
 	/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
 
+	perfctr_suspend_thread(prev);
+
 	__unlazy_fpu(prev_p);
 
 	/*
@@ -573,6 +579,9 @@
 			 */
 			tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
 	}
+
+	perfctr_resume_thread(next);
+
 	return prev_p;
 }
 
--- diff/arch/i386/kernel/ptrace.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/ptrace.c	2004-07-01 21:32:31.000000000 +0100
@@ -147,6 +147,7 @@
 { 
 	long tmp;
 
+	clear_tsk_thread_flag(child, TIF_SINGLESTEP);
 	tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
 	put_stack_long(child, EFL_OFFSET, tmp);
 }
@@ -370,6 +371,7 @@
 		else {
 			clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
 		}
+		clear_tsk_thread_flag(child, TIF_SINGLESTEP);
 		child->exit_code = data;
 	/* make sure the single step bit is not set. */
 		tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
@@ -391,6 +393,7 @@
 		if (child->state == TASK_ZOMBIE)	/* already dead */
 			break;
 		child->exit_code = SIGKILL;
+		clear_tsk_thread_flag(child, TIF_SINGLESTEP);
 		/* make sure the single step bit is not set. */
 		tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
 		put_stack_long(child, EFL_OFFSET, tmp);
@@ -411,6 +414,7 @@
 		}
 		tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG;
 		put_stack_long(child, EFL_OFFSET, tmp);
+		set_tsk_thread_flag(child, TIF_SINGLESTEP);
 		child->exit_code = data;
 		/* give it a chance to run. */
 		wake_up_process(child);
@@ -535,7 +539,8 @@
 			audit_syscall_exit(current, regs->eax);
 	}
 
-	if (!test_thread_flag(TIF_SYSCALL_TRACE))
+	if (!test_thread_flag(TIF_SYSCALL_TRACE) &&
+	    !test_thread_flag(TIF_SINGLESTEP))
 		return;
 	if (!(current->ptrace & PT_PTRACED))
 		return;
--- diff/arch/i386/kernel/setup.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/setup.c	2004-07-01 21:32:31.000000000 +0100
@@ -47,7 +47,7 @@
 #include <asm/sections.h>
 #include <asm/io_apic.h>
 #include <asm/ist.h>
-#include <asm/std_resources.h>
+#include <asm/io.h>
 #include "setup_arch_pre.h"
 
 /* This value is set up by the early boot code to point to the value
@@ -57,8 +57,6 @@
 
 int disable_pse __initdata = 0;
 
-static inline char * __init machine_specific_memory_setup(void);
-
 /*
  * Machine setup..
  */
@@ -129,12 +127,206 @@
 #define RAMDISK_LOAD_FLAG		0x4000	
 
 static char command_line[COMMAND_LINE_SIZE];
-       char saved_command_line[COMMAND_LINE_SIZE];
 
 unsigned char __initdata boot_params[PARAM_SIZE];
 
-static struct resource code_resource = { "Kernel code", 0x100000, 0 };
-static struct resource data_resource = { "Kernel data", 0, 0 };
+static struct resource data_resource = {
+	.name	= "Kernel data",
+	.start	= 0,
+	.end	= 0,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
+};
+
+static struct resource code_resource = {
+	.name	= "Kernel code",
+	.start	= 0,
+	.end	= 0,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
+};
+
+static struct resource system_rom_resource = {
+	.name	= "System ROM",
+	.start	= 0xf0000,
+	.end	= 0xfffff,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+};
+
+static struct resource extension_rom_resource = {
+	.name	= "Extension ROM",
+	.start	= 0xe0000,
+	.end	= 0xeffff,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+};
+
+static struct resource adapter_rom_resources[] = { {
+	.name 	= "Adapter ROM",
+	.start	= 0xc8000,
+	.end	= 0,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+}, {
+	.name 	= "Adapter ROM",
+	.start	= 0,
+	.end	= 0,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+}, {
+	.name 	= "Adapter ROM",
+	.start	= 0,
+	.end	= 0,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+}, {
+	.name 	= "Adapter ROM",
+	.start	= 0,
+	.end	= 0,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+}, {
+	.name 	= "Adapter ROM",
+	.start	= 0,
+	.end	= 0,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+}, {
+	.name 	= "Adapter ROM",
+	.start	= 0,
+	.end	= 0,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+} };
+
+#define ADAPTER_ROM_RESOURCES \
+	(sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
+
+static struct resource video_rom_resource = {
+	.name 	= "Video ROM",
+	.start	= 0xc0000,
+	.end	= 0xc7fff,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+};
+
+static struct resource video_ram_resource = {
+	.name	= "Video RAM area",
+	.start	= 0xa0000,
+	.end	= 0xbffff,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
+};
+
+static struct resource standard_io_resources[] = { {
+	.name	= "dma1",
+	.start	= 0x0000,
+	.end	= 0x001f,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
+}, {
+	.name	= "pic1",
+	.start	= 0x0020,
+	.end	= 0x0021,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
+}, {
+	.name	= "timer",
+	.start	= 0x0040,
+	.end	= 0x005f,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
+}, {
+	.name	= "keyboard",
+	.start	= 0x0060,
+	.end	= 0x006f,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
+}, {
+	.name	= "dma page reg",
+	.start	= 0x0080,
+	.end	= 0x008f,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
+}, {
+	.name	= "pic2",
+	.start	= 0x00a0,
+	.end	= 0x00a1,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
+}, {
+	.name	= "dma2",
+	.start	= 0x00c0,
+	.end	= 0x00df,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
+}, {
+	.name	= "fpu",
+	.start	= 0x00f0,
+	.end	= 0x00ff,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
+} };
+
+#define STANDARD_IO_RESOURCES \
+	(sizeof standard_io_resources / sizeof standard_io_resources[0])
+
+#define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
+
+static int __init romchecksum(unsigned char *rom, unsigned long length)
+{
+	unsigned char *p, sum = 0;
+
+	for (p = rom; p < rom + length; p++)
+		sum += *p;
+	return sum == 0;
+}
+
+static void __init probe_roms(void)
+{
+	unsigned long start, length, upper;
+	unsigned char *rom;
+	int	      i;
+
+	/* video rom */
+	upper = adapter_rom_resources[0].start;
+	for (start = video_rom_resource.start; start < upper; start += 2048) {
+		rom = isa_bus_to_virt(start);
+		if (!romsignature(rom))
+			continue;
+
+		video_rom_resource.start = start;
+
+		/* 0 < length <= 0x7f * 512, historically */
+		length = rom[2] * 512;
+
+		/* if checksum okay, trust length byte */
+		if (length && romchecksum(rom, length))
+			video_rom_resource.end = start + length - 1;
+
+		request_resource(&iomem_resource, &video_rom_resource);
+		break;
+	}
+
+	start = (video_rom_resource.end + 1 + 2047) & ~2047UL;
+	if (start < upper)
+		start = upper;
+
+	/* system rom */
+	request_resource(&iomem_resource, &system_rom_resource);
+	upper = system_rom_resource.start;
+
+	/* check for extension rom (ignore length byte!) */
+	rom = isa_bus_to_virt(extension_rom_resource.start);
+	if (romsignature(rom)) {
+		length = extension_rom_resource.end - extension_rom_resource.start + 1;
+		if (romchecksum(rom, length)) {
+			request_resource(&iomem_resource, &extension_rom_resource);
+			upper = extension_rom_resource.start;
+		}
+	}
+
+	/* check for adapter roms on 2k boundaries */
+	for (i = 0; i < ADAPTER_ROM_RESOURCES && start < upper; start += 2048) {
+		rom = isa_bus_to_virt(start);
+		if (!romsignature(rom))
+			continue;
+
+		/* 0 < length <= 0x7f * 512, historically */
+		length = rom[2] * 512;
+
+		/* but accept any length that fits if checksum okay */
+		if (!length || start + length > upper || !romchecksum(rom, length))
+			continue;
+
+		adapter_rom_resources[i].start = start;
+		adapter_rom_resources[i].end = start + length - 1;
+		request_resource(&iomem_resource, &adapter_rom_resources[i]);
+
+		start = adapter_rom_resources[i++].end & ~2047UL;
+	}
+}
 
 static void __init limit_regions(unsigned long long size)
 {
@@ -436,13 +628,9 @@
 }
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
-unsigned char eddnr;
-struct edd_info edd[EDDMAXNR];
-unsigned int edd_disk80_sig;
+struct edd edd;
 #ifdef CONFIG_EDD_MODULE
-EXPORT_SYMBOL(eddnr);
 EXPORT_SYMBOL(edd);
-EXPORT_SYMBOL(edd_disk80_sig);
 #endif
 /**
  * copy_edd() - Copy the BIOS EDD information
@@ -451,12 +639,15 @@
  */
 static inline void copy_edd(void)
 {
-     eddnr = EDD_NR;
-     memcpy(edd, EDD_BUF, sizeof(edd));
-     edd_disk80_sig = DISK80_SIGNATURE;
+     memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature));
+     memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info));
+     edd.mbr_signature_nr = EDD_MBR_SIG_NR;
+     edd.edd_info_nr = EDD_NR;
 }
 #else
-#define copy_edd() do {} while (0)
+static inline void copy_edd(void)
+{
+}
 #endif
 
 /*
@@ -465,14 +656,6 @@
  */
 #define LOWMEMSIZE()	(0x9f000)
 
-static void __init setup_memory_region(void)
-{
-	char *who = machine_specific_memory_setup();
-	printk(KERN_INFO "BIOS-provided physical RAM map:\n");
-	print_memory_map(who);
-} /* setup_memory_region */
-
-
 static void __init parse_cmdline_early (char ** cmdline_p)
 {
 	char c = ' ', *to = command_line, *from = saved_command_line;
@@ -948,6 +1131,7 @@
 static void __init register_memory(unsigned long max_low_pfn)
 {
 	unsigned long low_mem_size;
+	int	      i;
 
 	if (efi_enabled)
 		efi_initialize_iomem_resources(&code_resource, &data_resource);
@@ -955,10 +1139,11 @@
 		legacy_init_iomem_resources(&code_resource, &data_resource);
 
 	/* EFI systems may still have VGA */
-	request_graphics_resource();
+	request_resource(&iomem_resource, &video_ram_resource);
 
 	/* request I/O space for devices used on all i[345]86 PCs */
-	request_standard_io_resources();
+	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
+		request_resource(&ioport_resource, &standard_io_resources[i]);
 
 	/* Tell the PCI layer not to allocate too close to the RAM area.. */
 	low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
@@ -1073,6 +1258,8 @@
 
 __setup("noreplacement", noreplacement_setup); 
 
+static char * __init machine_specific_memory_setup(void);
+
 /*
  * Determine if we were loaded by an EFI loader.  If so, then we have also been
  * passed the efi memmap, systab, etc., so we should use these data structures
@@ -1123,8 +1310,10 @@
 	ARCH_SETUP
 	if (efi_enabled)
 		efi_init();
-	else
-		setup_memory_region();
+	else {
+		printk(KERN_INFO "BIOS-provided physical RAM map:\n");
+		print_memory_map(machine_specific_memory_setup());
+	}
 
 	copy_edd();
 
--- diff/arch/i386/kernel/signal.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/signal.c	2004-07-01 21:32:31.000000000 +0100
@@ -56,16 +56,15 @@
 }
 
 asmlinkage int
-sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize)
+sys_rt_sigsuspend(struct pt_regs regs)
 {
-	struct pt_regs * regs = (struct pt_regs *) &unewset;
 	sigset_t saveset, newset;
 
 	/* XXX: Don't preclude handling different sized sigset_t's.  */
-	if (sigsetsize != sizeof(sigset_t))
+	if (regs.ecx != sizeof(sigset_t))
 		return -EINVAL;
 
-	if (copy_from_user(&newset, unewset, sizeof(newset)))
+	if (copy_from_user(&newset, (sigset_t __user *)regs.ebx, sizeof(newset)))
 		return -EFAULT;
 	sigdelsetmask(&newset, ~_BLOCKABLE);
 
@@ -75,11 +74,11 @@
 	recalc_sigpending();
 	spin_unlock_irq(&current->sighand->siglock);
 
-	regs->eax = -EINTR;
+	regs.eax = -EINTR;
 	while (1) {
 		current->state = TASK_INTERRUPTIBLE;
 		schedule();
-		if (do_signal(regs, &saveset))
+		if (do_signal(&regs, &saveset))
 			return -EINTR;
 	}
 }
@@ -117,10 +116,11 @@
 }
 
 asmlinkage int
-sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
+sys_sigaltstack(struct pt_regs regs)
 {
-	struct pt_regs *regs = (struct pt_regs *) &uss;
-	return do_sigaltstack(uss, uoss, regs->esp);
+	const stack_t __user *uss = (const stack_t __user *)regs.ebx;
+	stack_t __user *uoss = (stack_t __user *)regs.ecx;
+	return do_sigaltstack(uss, uoss, regs.esp);
 }
 
 
--- diff/arch/i386/kernel/smp.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/smp.c	2004-07-01 21:32:31.000000000 +0100
@@ -21,7 +21,6 @@
 #include <linux/interrupt.h>
 
 #include <asm/mtrr.h>
-#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 #include <mach_ipi.h>
 #include <mach_apic.h>
@@ -160,7 +159,7 @@
  */
 inline void send_IPI_mask_bitmask(cpumask_t cpumask, int vector)
 {
-	unsigned long mask = cpus_coerce(cpumask);
+	unsigned long mask = cpus_addr(cpumask)[0];
 	unsigned long cfg;
 	unsigned long flags;
 
@@ -466,7 +465,17 @@
 {
 	on_each_cpu(do_flush_tlb_all, 0, 1, 1);
 }
-
+#ifdef CONFIG_KGDB
+/*
+ * By using the NMI code instead of a vector we just sneak thru the
+ * word generator coming out with just what we want.  AND it does
+ * not matter if clustered_apic_mode is set or not.
+ */
+void smp_send_nmi_allbutself(void)
+{
+	send_IPI_allbutself(APIC_DM_NMI);
+}
+#endif
 /*
  * this function sends a 'reschedule' IPI to another CPU.
  * it goes straight through and wastes no time serializing
--- diff/arch/i386/kernel/smpboot.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/smpboot.c	2004-07-01 21:32:31.000000000 +0100
@@ -47,7 +47,6 @@
 
 #include <linux/delay.h>
 #include <linux/mc146818rtc.h>
-#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 #include <asm/desc.h>
 #include <asm/arch_hooks.h>
@@ -796,16 +795,13 @@
 	idle = fork_by_hand();
 	if (IS_ERR(idle))
 		panic("failed fork for CPU %d", cpu);
-	wake_up_forked_process(idle);
 
-	/*
-	 * We remove it from the pidhash and the runqueue
-	 * once we got the process:
-	 */
+	/* Make this the idle thread */
 	init_idle(idle, cpu);
 
 	idle->thread.eip = (unsigned long) start_secondary;
 
+	/* Remove it from the pidhash */
 	unhash_process(idle);
 
 	/* start_eip had better be page-aligned! */
@@ -1193,7 +1189,9 @@
 		int j;
 		cpumask_t nodemask;
 		struct sched_group *node = &sched_group_nodes[i];
-		cpus_and(nodemask, node_to_cpumask(i), cpu_possible_map);
+		cpumask_t node_cpumask = node_to_cpumask(i);
+
+		cpus_and(nodemask, node_cpumask, cpu_possible_map);
 
 		if (cpus_empty(nodemask))
 			continue;
@@ -1229,7 +1227,9 @@
 	for (i = 0; i < MAX_NUMNODES; i++) {
 		struct sched_group *cpu = &sched_group_nodes[i];
 		cpumask_t nodemask;
-		cpus_and(nodemask, node_to_cpumask(i), cpu_possible_map);
+		cpumask_t node_cpumask = node_to_cpumask(i);
+
+		cpus_and(nodemask, node_cpumask, cpu_possible_map);
 
 		if (cpus_empty(nodemask))
 			continue;
--- diff/arch/i386/kernel/sysenter.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/sysenter.c	2004-07-01 21:32:31.000000000 +0100
@@ -45,7 +45,7 @@
 {
 	unsigned long page = get_zeroed_page(GFP_ATOMIC);
 
-	__set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY);
+	__set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC);
 
 	if (!boot_cpu_has(X86_FEATURE_SEP)) {
 		memcpy((void *) page,
--- diff/arch/i386/kernel/time_hpet.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/time_hpet.c	2004-07-01 21:32:31.000000000 +0100
@@ -21,6 +21,7 @@
 #include <linux/config.h>
 
 #include <asm/hpet.h>
+#include <linux/hpet.h>
 
 unsigned long hpet_period;	/* fsecs / HPET clock */
 unsigned long hpet_tick;	/* hpet clks count per tick */
@@ -135,6 +136,50 @@
 	hpet_writel(cfg, HPET_CFG);
 
 	use_hpet = 1;
+
+#ifdef	CONFIG_HPET
+	{
+		struct hpet_data	hd;
+		unsigned int 		ntimer;
+
+		memset(&hd, 0, sizeof (hd));
+
+		ntimer = hpet_readl(HPET_ID);
+		ntimer = (ntimer & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT;
+		ntimer++;
+
+		/*
+		 * Register with driver.
+		 * Timer0 and Timer1 is used by platform.
+		 */
+		hd.hd_address = hpet_virt_address;
+		hd.hd_nirqs = ntimer;
+		hd.hd_flags = HPET_DATA_PLATFORM;
+		hpet_reserve_timer(&hd, 0);
+#ifdef	CONFIG_HPET_EMULATE_RTC
+		hpet_reserve_timer(&hd, 1);
+#endif
+		hd.hd_irq[0] = HPET_LEGACY_8254;
+		hd.hd_irq[1] = HPET_LEGACY_RTC;
+		if (ntimer > 2) {
+			struct hpet		*hpet;
+			struct hpet_timer	*timer;
+			int			i;
+
+			hpet = (struct hpet *) hpet_virt_address;
+
+			for (i = 2, timer = &hpet->hpet_timers[2]; i < ntimer;
+				timer++, i++)
+				hd.hd_irq[i] = (timer->hpet_config &
+					Tn_INT_ROUTE_CNF_MASK) >>
+					Tn_INT_ROUTE_CNF_SHIFT;
+
+		}
+
+		hpet_alloc(&hd);
+	}
+#endif
+
 #ifdef CONFIG_X86_LOCAL_APIC
 	wait_timer_tick = wait_hpet_tick;
 #endif
--- diff/arch/i386/kernel/timers/timer_pm.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/kernel/timers/timer_pm.c	2004-07-01 21:32:31.000000000 +0100
@@ -21,6 +21,14 @@
 #include <asm/io.h>
 #include <asm/arch_hooks.h>
 
+#include <linux/timex.h>
+#include "mach_timer.h"
+
+/* Number of PMTMR ticks expected during calibration run */
+#define PMTMR_TICKS_PER_SEC 3579545
+#define PMTMR_EXPECTED_RATE \
+  ((CALIBRATE_LATCH * (PMTMR_TICKS_PER_SEC >> 10)) / (CLOCK_TICK_RATE>>10))
+
 
 /* The I/O port the PMTMR resides at.
  * The location is detected during setup_arch(),
@@ -57,6 +65,33 @@
 	return v2 & ACPI_PM_MASK;
 }
 
+
+/*
+ * Some boards have the PMTMR running way too fast. We check
+ * the PMTMR rate against PIT channel 2 to catch these cases.
+ */
+static int verify_pmtmr_rate(void)
+{
+	u32 value1, value2;
+	unsigned long count, delta;
+
+	mach_prepare_counter();
+	value1 = read_pmtmr();
+	mach_countup(&count);
+	value2 = read_pmtmr();
+	delta = (value2 - value1) & ACPI_PM_MASK;
+
+	/* Check that the PMTMR delta is within 5% of what we expect */
+	if (delta < (PMTMR_EXPECTED_RATE * 19) / 20 ||
+	    delta > (PMTMR_EXPECTED_RATE * 21) / 20) {
+		printk(KERN_INFO "PM-Timer running at invalid rate: %lu%% of normal - aborting.\n", 100UL * delta / PMTMR_EXPECTED_RATE);
+		return -1;
+	}
+
+	return 0;
+}
+
+
 static int init_pmtmr(char* override)
 {
 	u32 value1, value2;
@@ -89,6 +124,9 @@
 	return -ENODEV;
 
 pm_good:
+	if (verify_pmtmr_rate() != 0)
+		return -ENODEV;
+
 	init_cpu_khz();
 	return 0;
 }
--- diff/arch/i386/kernel/timers/timer_tsc.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/timers/timer_tsc.c	2004-07-01 21:32:31.000000000 +0100
@@ -1,6 +1,10 @@
 /*
  * This code largely moved from arch/i386/kernel/time.c.
  * See comments there for proper credits.
+ *
+ * 2004-06-25    Jesper Juhl
+ *      moved mark_offset_tsc below cpufreq_delayed_get to avoid gcc 3.4
+ *      failing to inline.
  */
 
 #include <linux/spinlock.h>
@@ -70,7 +74,6 @@
 	return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
 }
 
-
 static int count2; /* counter for mark_offset_tsc() */
 
 /* Cached *multiplier* to convert TSC counts to microseconds.
@@ -152,119 +155,6 @@
 	return cycles_2_ns(this_offset);
 }
 
-
-static void mark_offset_tsc(void)
-{
-	unsigned long lost,delay;
-	unsigned long delta = last_tsc_low;
-	int count;
-	int countmp;
-	static int count1 = 0;
-	unsigned long long this_offset, last_offset;
-	static int lost_count = 0;
-	
-	write_seqlock(&monotonic_lock);
-	last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
-	/*
-	 * It is important that these two operations happen almost at
-	 * the same time. We do the RDTSC stuff first, since it's
-	 * faster. To avoid any inconsistencies, we need interrupts
-	 * disabled locally.
-	 */
-
-	/*
-	 * Interrupts are just disabled locally since the timer irq
-	 * has the SA_INTERRUPT flag set. -arca
-	 */
-	
-	/* read Pentium cycle counter */
-
-	rdtsc(last_tsc_low, last_tsc_high);
-
-	spin_lock(&i8253_lock);
-	outb_p(0x00, PIT_MODE);     /* latch the count ASAP */
-
-	count = inb_p(PIT_CH0);    /* read the latched count */
-	count |= inb(PIT_CH0) << 8;
-
-	/*
-	 * VIA686a test code... reset the latch if count > max + 1
-	 * from timer_pit.c - cjb
-	 */
-	if (count > LATCH) {
-		outb_p(0x34, PIT_MODE);
-		outb_p(LATCH & 0xff, PIT_CH0);
-		outb(LATCH >> 8, PIT_CH0);
-		count = LATCH - 1;
-	}
-
-	spin_unlock(&i8253_lock);
-
-	if (pit_latch_buggy) {
-		/* get center value of last 3 time lutch */
-		if ((count2 >= count && count >= count1)
-		    || (count1 >= count && count >= count2)) {
-			count2 = count1; count1 = count;
-		} else if ((count1 >= count2 && count2 >= count)
-			   || (count >= count2 && count2 >= count1)) {
-			countmp = count;count = count2;
-			count2 = count1;count1 = countmp;
-		} else {
-			count2 = count1; count1 = count; count = count1;
-		}
-	}
-
-	/* lost tick compensation */
-	delta = last_tsc_low - delta;
-	{
-		register unsigned long eax, edx;
-		eax = delta;
-		__asm__("mull %2"
-		:"=a" (eax), "=d" (edx)
-		:"rm" (fast_gettimeoffset_quotient),
-		 "0" (eax));
-		delta = edx;
-	}
-	delta += delay_at_last_interrupt;
-	lost = delta/(1000000/HZ);
-	delay = delta%(1000000/HZ);
-	if (lost >= 2) {
-		jiffies_64 += lost-1;
-
-		/* sanity check to ensure we're not always losing ticks */
-		if (lost_count++ > 100) {
-			printk(KERN_WARNING "Losing too many ticks!\n");
-			printk(KERN_WARNING "TSC cannot be used as a timesource.  \n");
-			printk(KERN_WARNING "Possible reasons for this are:\n");
-			printk(KERN_WARNING "  You're running with Speedstep,\n");
-			printk(KERN_WARNING "  You don't have DMA enabled for your hard disk (see hdparm),\n");
-			printk(KERN_WARNING "  Incorrect TSC synchronization on an SMP system (see dmesg).\n");
-			printk(KERN_WARNING "Falling back to a sane timesource now.\n");
-
-			clock_fallback();
-		}
-		/* ... but give the TSC a fair chance */
-		if (lost_count > 25)
-			cpufreq_delayed_get();
-	} else
-		lost_count = 0;
-	/* update the monotonic base value */
-	this_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
-	monotonic_base += cycles_2_ns(this_offset - last_offset);
-	write_sequnlock(&monotonic_lock);
-
-	/* calculate delay_at_last_interrupt */
-	count = ((LATCH-1) - count) * TICK_SIZE;
-	delay_at_last_interrupt = (count + LATCH/2) / LATCH;
-
-	/* catch corner case where tick rollover occured 
-	 * between tsc and pit reads (as noted when 
-	 * usec delta is > 90% # of usecs/tick)
-	 */
-	if (lost && abs(delay - delay_at_last_interrupt) > (900000/HZ))
-		jiffies_64++;
-}
-
 static void delay_tsc(unsigned long loops)
 {
 	unsigned long bclock, now;
@@ -415,7 +305,8 @@
 {
 	int ret;
 	INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get, NULL);
-	ret = cpufreq_register_notifier(&time_cpufreq_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);
+	ret = cpufreq_register_notifier(&time_cpufreq_notifier_block,
+					CPUFREQ_TRANSITION_NOTIFIER);
 	if (!ret)
 		cpufreq_init = 1;
 	return ret;
@@ -426,6 +317,117 @@
 static inline void cpufreq_delayed_get(void) { return; }
 #endif 
 
+static void mark_offset_tsc(void)
+{
+	unsigned long lost,delay;
+	unsigned long delta = last_tsc_low;
+	int count;
+	int countmp;
+	static int count1 = 0;
+	unsigned long long this_offset, last_offset;
+	static int lost_count = 0;
+
+	write_seqlock(&monotonic_lock);
+	last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
+	/*
+	 * It is important that these two operations happen almost at
+	 * the same time. We do the RDTSC stuff first, since it's
+	 * faster. To avoid any inconsistencies, we need interrupts
+	 * disabled locally.
+	 */
+
+	/*
+	 * Interrupts are just disabled locally since the timer irq
+	 * has the SA_INTERRUPT flag set. -arca
+	 */
+
+	/* read Pentium cycle counter */
+
+	rdtsc(last_tsc_low, last_tsc_high);
+
+	spin_lock(&i8253_lock);
+	outb_p(0x00, PIT_MODE);     /* latch the count ASAP */
+
+	count = inb_p(PIT_CH0);    /* read the latched count */
+	count |= inb(PIT_CH0) << 8;
+
+	/*
+	 * VIA686a test code... reset the latch if count > max + 1
+	 * from timer_pit.c - cjb
+	 */
+	if (count > LATCH) {
+		outb_p(0x34, PIT_MODE);
+		outb_p(LATCH & 0xff, PIT_CH0);
+		outb(LATCH >> 8, PIT_CH0);
+		count = LATCH - 1;
+	}
+
+	spin_unlock(&i8253_lock);
+
+	if (pit_latch_buggy) {
+		/* get center value of last 3 time lutch */
+		if ((count2 >= count && count >= count1)
+		    || (count1 >= count && count >= count2)) {
+			count2 = count1; count1 = count;
+		} else if ((count1 >= count2 && count2 >= count)
+			   || (count >= count2 && count2 >= count1)) {
+			countmp = count;count = count2;
+			count2 = count1;count1 = countmp;
+		} else {
+			count2 = count1; count1 = count; count = count1;
+		}
+	}
+
+	/* lost tick compensation */
+	delta = last_tsc_low - delta;
+	{
+		register unsigned long eax, edx;
+		eax = delta;
+		__asm__("mull %2"
+		:"=a" (eax), "=d" (edx)
+		:"rm" (fast_gettimeoffset_quotient),
+		 "0" (eax));
+		delta = edx;
+	}
+	delta += delay_at_last_interrupt;
+	lost = delta/(1000000/HZ);
+	delay = delta%(1000000/HZ);
+	if (lost >= 2) {
+		jiffies_64 += lost-1;
+
+		/* sanity check to ensure we're not always losing ticks */
+		if (lost_count++ > 100) {
+			printk(KERN_WARNING "Losing too many ticks!\n");
+			printk(KERN_WARNING "TSC cannot be used as a timesource.  \n");
+			printk(KERN_WARNING "Possible reasons for this are:\n");
+			printk(KERN_WARNING "  You're running with Speedstep,\n");
+			printk(KERN_WARNING "  You don't have DMA enabled for your hard disk (see hdparm),\n");
+			printk(KERN_WARNING "  Incorrect TSC synchronization on an SMP system (see dmesg).\n");
+			printk(KERN_WARNING "Falling back to a sane timesource now.\n");
+
+			clock_fallback();
+		}
+		/* ... but give the TSC a fair chance */
+		if (lost_count > 25)
+			cpufreq_delayed_get();
+	} else
+		lost_count = 0;
+	/* update the monotonic base value */
+	this_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
+	monotonic_base += cycles_2_ns(this_offset - last_offset);
+	write_sequnlock(&monotonic_lock);
+
+	/* calculate delay_at_last_interrupt */
+	count = ((LATCH-1) - count) * TICK_SIZE;
+	delay_at_last_interrupt = (count + LATCH/2) / LATCH;
+
+	/* catch corner case where tick rollover occured
+	 * between tsc and pit reads (as noted when
+	 * usec delta is > 90% # of usecs/tick)
+	 */
+	if (lost && abs(delay - delay_at_last_interrupt) > (900000/HZ))
+		jiffies_64++;
+}
 
 static int __init init_tsc(char* override)
 {
--- diff/arch/i386/kernel/traps.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/kernel/traps.c	2004-07-01 21:32:31.000000000 +0100
@@ -47,7 +47,6 @@
 #include <asm/nmi.h>
 
 #include <asm/smp.h>
-#include <asm/pgalloc.h>
 #include <asm/arch_hooks.h>
 
 #include <linux/irq.h>
@@ -103,8 +102,42 @@
 	return 1;
 }
 
+#ifdef CONFIG_KGDB
+extern void sysenter_past_esp(void);
+#include <asm/kgdb.h>
+#include <linux/init.h>
+void set_intr_gate(unsigned int n, void *addr);
+static void set_intr_usr_gate(unsigned int n, void *addr);
+/*
+ * Should be able to call this breakpoint() very early in
+ * bring up.  Just hard code the call where needed.
+ * The breakpoint() code is here because set_?_gate() functions
+ * are local (static) to trap.c.  They need be done only once,
+ * but it does not hurt to do them over.
+ */
+void breakpoint(void)
+{
+        set_intr_usr_gate(3,&int3); /* disable ints on trap */
+	set_intr_gate(1,&debug);
+	set_intr_gate(14,&page_fault);
+
+        BREAKPOINT;
+}
+#define	CHK_REMOTE_DEBUG(trapnr,signr,error_code,regs,after)		\
+    {									\
+	if (!user_mode(regs)  ) \
+	{								\
+		kgdb_handle_exception(trapnr, signr, error_code, regs);	\
+		after;							\
+	} else if ((trapnr == 3) && (regs->eflags &0x200)) local_irq_enable(); \
+    }
+#else
+#define	CHK_REMOTE_DEBUG(trapnr,signr,error_code,regs,after)
+#endif
+
+
 #ifdef CONFIG_FRAME_POINTER
-void print_context_stack(struct task_struct *task, unsigned long *stack,
+static void print_context_stack(struct task_struct *task, unsigned long *stack,
 			 unsigned long ebp)
 {
 	unsigned long addr;
@@ -118,16 +151,17 @@
 	}
 }
 #else
-void print_context_stack(struct task_struct *task, unsigned long *stack,
+static void print_context_stack(struct task_struct *task, unsigned long *stack,
 			 unsigned long ebp)
 {
 	unsigned long addr;
 
 	while (!kstack_end(stack)) {
 		addr = *stack++;
-		if (kernel_text_address(addr)) {
-			printk(" [<%08lx>] ", addr);
-			print_symbol("%s\n", addr);
+		if (__kernel_text_address(addr)) {
+			printk(" [<%08lx>]", addr);
+			print_symbol(" %s", addr);
+			printk("\n");
 		}
 	}
 }
@@ -163,7 +197,6 @@
 			break;
 		printk(" =======================\n");
 	}
-	printk("\n");
 }
 
 void show_stack(struct task_struct *task, unsigned long *esp)
@@ -217,7 +250,7 @@
 		ss = regs->xss & 0xffff;
 	}
 	print_modules();
-	printk("CPU:    %d\nEIP:    %04x:[<%08lx>]    %s\nEFLAGS: %08lx"
+	printk("CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\nEFLAGS: %08lx"
 			"   (%s) \n",
 		smp_processor_id(), 0xffff & regs->xcs, regs->eip,
 		print_tainted(), regs->eflags, UTS_RELEASE);
@@ -235,23 +268,25 @@
 	 * time of the fault..
 	 */
 	if (in_kernel) {
+		u8 *eip;
 
 		printk("\nStack: ");
 		show_stack(NULL, (unsigned long*)esp);
 
 		printk("Code: ");
-		if(regs->eip < PAGE_OFFSET)
-			goto bad;
 
-		for(i=0;i<20;i++)
-		{
+		eip = (u8 *)regs->eip - 43;
+		for (i = 0; i < 64; i++, eip++) {
 			unsigned char c;
-			if(__get_user(c, &((unsigned char*)regs->eip)[i])) {
-bad:
+
+			if (eip < (u8 *)PAGE_OFFSET || __get_user(c, eip)) {
 				printk(" Bad EIP value.");
 				break;
 			}
-			printk("%02x ", c);
+			if (eip == (u8 *)regs->eip)
+				printk("<%02x> ", c);
+			else
+				printk("%02x ", c);
 		}
 	}
 	printk("\n");
@@ -319,6 +354,15 @@
 #endif
 	if (nl)
 		printk("\n");
+#ifdef CONFIG_KGDB
+	/* This is about the only place we want to go to kgdb even if in
+	 * user mode.  But we must go in via a trap so within kgdb we will
+	 * always be in kernel mode.
+	 */
+	if (user_mode(regs))
+		BREAKPOINT;
+#endif
+ 	CHK_REMOTE_DEBUG(0,SIGTRAP,err,regs,)
 	show_registers(regs);
 	bust_spinlocks(0);
 	spin_unlock_irq(&die_lock);
@@ -388,6 +432,7 @@
 #define DO_ERROR(trapnr, signr, str, name) \
 asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
 { \
+	CHK_REMOTE_DEBUG(trapnr,signr,error_code,regs,)\
 	do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \
 }
 
@@ -405,7 +450,9 @@
 #define DO_VM86_ERROR(trapnr, signr, str, name) \
 asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
 { \
+	CHK_REMOTE_DEBUG(trapnr, signr, error_code,regs, return)\
 	do_trap(trapnr, signr, str, 1, regs, error_code, NULL); \
+	return; \
 }
 
 #define DO_VM86_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \
@@ -452,8 +499,10 @@
 	return;
 
 gp_in_kernel:
-	if (!fixup_exception(regs))
+	if (!fixup_exception(regs)){
+ 		CHK_REMOTE_DEBUG(13,SIGSEGV,error_code,regs,)
 		die("general protection fault", regs, error_code);
+	}
 }
 
 static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
@@ -615,8 +664,18 @@
 		 * allowing programs to debug themselves without the ptrace()
 		 * interface.
 		 */
+#ifdef CONFIG_KGDB
+		/*
+		 * I think this is the only "real" case of a TF in the kernel
+		 * that really belongs to user space.  Others are
+		 * "Ours all ours!"
+		 */
+		if (((regs->xcs & 3) == 0) && ((void *)regs->eip == sysenter_past_esp))
+			goto clear_TF_reenable;
+#else
 		if ((regs->xcs & 3) == 0)
 			goto clear_TF_reenable;
+#endif
 		if ((tsk->ptrace & (PT_DTRACE|PT_PTRACED)) == PT_DTRACE)
 			goto clear_TF;
 	}
@@ -628,6 +687,17 @@
 	info.si_errno = 0;
 	info.si_code = TRAP_BRKPT;
 	
+#ifdef CONFIG_KGDB
+        /*
+	 * If this is a kernel mode trap, we need to reset db7 to allow us
+	 * to continue sanely ALSO skip the signal delivery
+         */
+	if ((regs->xcs & 3) == 0)
+		goto clear_dr7;
+
+        /* if not kernel, allow ints but only if they were on */
+       if ( regs->eflags & 0x200) local_irq_enable();
+#endif
 	/* If this is a kernel mode trap, save the user PC on entry to 
 	 * the kernel, that's what the debugger can make sense of.
 	 */
@@ -642,6 +712,7 @@
 	__asm__("movl %0,%%db7"
 		: /* no output */
 		: "r" (0));
+	CHK_REMOTE_DEBUG(1,SIGTRAP,error_code,regs,)
 	return;
 
 debug_vm86:
@@ -890,6 +961,12 @@
 {
 	_set_gate(a,12,3,addr,__KERNEL_CS);
 }
+#ifdef CONFIG_KGDB
+void set_intr_usr_gate(unsigned int n, void *addr)
+{
+	_set_gate(idt_table+n,14,3,addr,__KERNEL_CS);
+}
+#endif
 
 static void __init set_task_gate(unsigned int n, unsigned int gdt_entry)
 {
@@ -912,7 +989,11 @@
 	set_trap_gate(0,&divide_error);
 	set_intr_gate(1,&debug);
 	set_intr_gate(2,&nmi);
+#ifndef CONFIG_KGDB
 	set_system_gate(3,&int3);	/* int3-5 can be called from all */
+#else
+	set_intr_usr_gate(3,&int3);	/* int3-5 can be called from all */
+#endif
 	set_system_gate(4,&overflow);
 	set_system_gate(5,&bounds);
 	set_trap_gate(6,&invalid_op);
--- diff/arch/i386/kernel/vm86.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/vm86.c	2004-07-01 21:32:31.000000000 +0100
@@ -44,7 +44,6 @@
 #include <linux/ptrace.h>
 
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/io.h>
 #include <asm/tlbflush.h>
 #include <asm/irq.h>
@@ -178,8 +177,9 @@
 static int do_vm86_irq_handling(int subfunction, int irqnumber);
 static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk);
 
-asmlinkage int sys_vm86old(struct vm86_struct __user * v86)
+asmlinkage int sys_vm86old(struct pt_regs regs)
 {
+	struct vm86_struct __user *v86 = (struct vm86_struct __user *)regs.ebx;
 	struct kernel_vm86_struct info; /* declare this _on top_,
 					 * this avoids wasting of stack space.
 					 * This remains on the stack until we
@@ -198,7 +198,7 @@
 	if (tmp)
 		goto out;
 	memset(&info.vm86plus, 0, (int)&info.regs32 - (int)&info.vm86plus);
-	info.regs32 = (struct pt_regs *) &v86;
+	info.regs32 = &regs;
 	tsk->thread.vm86_info = v86;
 	do_sys_vm86(&info, tsk);
 	ret = 0;	/* we never return here */
@@ -207,7 +207,7 @@
 }
 
 
-asmlinkage int sys_vm86(unsigned long subfunction, struct vm86plus_struct __user * v86)
+asmlinkage int sys_vm86(struct pt_regs regs)
 {
 	struct kernel_vm86_struct info; /* declare this _on top_,
 					 * this avoids wasting of stack space.
@@ -216,14 +216,15 @@
 					 */
 	struct task_struct *tsk;
 	int tmp, ret;
+	struct vm86plus_struct __user *v86;
 
 	tsk = current;
-	switch (subfunction) {
+	switch (regs.ebx) {
 		case VM86_REQUEST_IRQ:
 		case VM86_FREE_IRQ:
 		case VM86_GET_IRQ_BITS:
 		case VM86_GET_AND_RESET_IRQ:
-			ret = do_vm86_irq_handling(subfunction,(int)v86);
+			ret = do_vm86_irq_handling(regs.ebx, (int)regs.ecx);
 			goto out;
 		case VM86_PLUS_INSTALL_CHECK:
 			/* NOTE: on old vm86 stuff this will return the error
@@ -239,13 +240,14 @@
 	ret = -EPERM;
 	if (tsk->thread.saved_esp0)
 		goto out;
+	v86 = (struct vm86plus_struct __user *)regs.ecx;
 	tmp  = copy_from_user(&info, v86, VM86_REGS_SIZE1);
 	tmp += copy_from_user(&info.regs.VM86_REGS_PART2, &v86->regs.VM86_REGS_PART2,
 		(long)&info.regs32 - (long)&info.regs.VM86_REGS_PART2);
 	ret = -EFAULT;
 	if (tmp)
 		goto out;
-	info.regs32 = (struct pt_regs *) &subfunction;
+	info.regs32 = &regs;
 	info.vm86plus.is_vm86pus = 1;
 	tsk->thread.vm86_info = (struct vm86_struct __user *)v86;
 	do_sys_vm86(&info, tsk);
@@ -486,9 +488,10 @@
  * in userspace is always better than an Oops anyway.) [KD]
  */
 static void do_int(struct kernel_vm86_regs *regs, int i,
-    unsigned char * ssp, unsigned short sp)
+    unsigned char __user * ssp, unsigned short sp)
 {
-	unsigned long *intr_ptr, segoffs;
+	unsigned long __user *intr_ptr;
+	unsigned long segoffs;
 
 	if (regs->cs == BIOSSEG)
 		goto cannot_handle;
@@ -496,7 +499,7 @@
 		goto cannot_handle;
 	if (i==0x21 && is_revectored(AH(regs),&KVM86->int21_revectored))
 		goto cannot_handle;
-	intr_ptr = (unsigned long *) (i << 2);
+	intr_ptr = (unsigned long __user *) (i << 2);
 	if (get_user(segoffs, intr_ptr))
 		goto cannot_handle;
 	if ((segoffs >> 16) == BIOSSEG)
@@ -521,7 +524,7 @@
 	if (VMPI.is_vm86pus) {
 		if ( (trapno==3) || (trapno==1) )
 			return_to_32bit(regs, VM86_TRAP + (trapno << 8));
-		do_int(regs, trapno, (unsigned char *) (regs->ss << 4), SP(regs));
+		do_int(regs, trapno, (unsigned char __user *) (regs->ss << 4), SP(regs));
 		return 0;
 	}
 	if (trapno !=1)
@@ -541,7 +544,9 @@
 
 void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code)
 {
-	unsigned char *csp, *ssp, opcode;
+	unsigned char opcode;
+	unsigned char __user *csp;
+	unsigned char __user *ssp;
 	unsigned short ip, sp;
 	int data32, pref_done;
 
@@ -553,8 +558,8 @@
 		return_to_32bit(regs, VM86_PICRETURN); \
 	return; } while (0)
 
-	csp = (unsigned char *) (regs->cs << 4);
-	ssp = (unsigned char *) (regs->ss << 4);
+	csp = (unsigned char __user *) (regs->cs << 4);
+	ssp = (unsigned char __user *) (regs->ss << 4);
 	sp = SP(regs);
 	ip = IP(regs);
 
--- diff/arch/i386/lib/Makefile	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/lib/Makefile	2004-07-01 21:32:31.000000000 +0100
@@ -3,9 +3,9 @@
 #
 
 
-lib-y = checksum.o delay.o \
-	usercopy.o getuser.o \
-	memcpy.o strstr.o
+lib-y = checksum.o delay.o usercopy.o getuser.o memcpy.o strstr.o \
+	bitops.o
 
 lib-$(CONFIG_X86_USE_3DNOW) += mmx.o
 lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
+lib-$(CONFIG_KGDB) += kgdb_serial.o
--- diff/arch/i386/lib/dec_and_lock.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/lib/dec_and_lock.c	2004-07-01 21:32:31.000000000 +0100
@@ -10,6 +10,7 @@
 #include <linux/spinlock.h>
 #include <asm/atomic.h>
 
+#ifndef ATOMIC_DEC_AND_LOCK
 int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
 {
 	int counter;
@@ -38,3 +39,5 @@
 	spin_unlock(lock);
 	return 0;
 }
+#endif
+
--- diff/arch/i386/lib/delay.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/lib/delay.c	2004-07-01 21:32:31.000000000 +0100
@@ -31,15 +31,16 @@
 inline void __const_udelay(unsigned long xloops)
 {
 	int d0;
+	xloops *= 4;
 	__asm__("mull %0"
 		:"=d" (xloops), "=&a" (d0)
-		:"1" (xloops),"0" (current_cpu_data.loops_per_jiffy));
-        __delay(xloops * HZ);
+		:"1" (xloops),"0" (current_cpu_data.loops_per_jiffy * (HZ/4)));
+        __delay(++xloops);
 }
 
 void __udelay(unsigned long usecs)
 {
-	__const_udelay(usecs * 0x000010c6);  /* 2**32 / 1000000 */
+	__const_udelay(usecs * 0x000010c7);  /* 2**32 / 1000000 (rounded up) */
 }
 
 void __ndelay(unsigned long nsecs)
--- diff/arch/i386/lib/memcpy.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/lib/memcpy.c	2004-07-01 21:32:31.000000000 +0100
@@ -1,10 +1,11 @@
 #include <linux/config.h>
 #include <linux/string.h>
+#include <linux/module.h>
 
 #undef memcpy
 #undef memset
 
-void * memcpy(void * to, const void * from, size_t n)
+void *memcpy(void *to, const void *from, size_t n)
 {
 #ifdef CONFIG_X86_USE_3DNOW
 	return __memcpy3d(to, from, n);
@@ -12,8 +13,32 @@
 	return __memcpy(to, from, n);
 #endif
 }
+EXPORT_SYMBOL_NOVERS(memcpy);
 
-void * memset(void * s, int c, size_t count)
+void *memset(void *s, int c, size_t count)
 {
 	return __memset(s, c, count);
 }
+EXPORT_SYMBOL_NOVERS(memset);
+
+void *memmove(void *dest, const void *src, size_t n)
+{
+	int d0, d1, d2;
+
+	if (dest < src) {
+		memcpy(dest,src,n);
+	} else {
+		__asm__ __volatile__(
+			"std\n\t"
+			"rep\n\t"
+			"movsb\n\t"
+			"cld"
+			: "=&c" (d0), "=&S" (d1), "=&D" (d2)
+			:"0" (n),
+			 "1" (n-1+(const char *)src),
+			 "2" (n-1+(char *)dest)
+			:"memory");
+	}
+	return dest;
+}
+EXPORT_SYMBOL_NOVERS(memmove);
--- diff/arch/i386/lib/usercopy.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/lib/usercopy.c	2004-07-01 21:32:31.000000000 +0100
@@ -219,7 +219,7 @@
 
 #ifdef CONFIG_X86_INTEL_USERCOPY
 static unsigned long
-__copy_user_intel(void *to, const void *from,unsigned long size)
+__copy_user_intel(void __user *to, const void *from, unsigned long size)
 {
 	int d0, d1;
 	__asm__ __volatile__(
@@ -326,7 +326,7 @@
 }
 
 static unsigned long
-__copy_user_zeroing_intel(void *to, const void *from, unsigned long size)
+__copy_user_zeroing_intel(void *to, const void __user *from, unsigned long size)
 {
 	int d0, d1;
 	__asm__ __volatile__(
@@ -425,9 +425,9 @@
  * them
  */
 unsigned long
-__copy_user_zeroing_intel(void *to, const void *from, unsigned long size);
+__copy_user_zeroing_intel(void *to, const void __user *from, unsigned long size);
 unsigned long
-__copy_user_intel(void *to, const void *from,unsigned long size);
+__copy_user_intel(void __user *to, const void *from, unsigned long size);
 #endif /* CONFIG_X86_INTEL_USERCOPY */
 
 /* Generic arbitrary sized copy.  */
@@ -562,9 +562,9 @@
 	}
 #endif
 	if (movsl_is_ok(to, from, n))
-		__copy_user((void *)to, from, n);
+		__copy_user(to, from, n);
 	else
-		n = __copy_user_intel((void *)to, from, n);
+		n = __copy_user_intel(to, from, n);
 	return n;
 }
 
@@ -572,9 +572,9 @@
 __copy_from_user_ll(void *to, const void __user *from, unsigned long n)
 {
 	if (movsl_is_ok(to, from, n))
-		__copy_user_zeroing(to, (const void *) from, n);
+		__copy_user_zeroing(to, from, n);
 	else
-		n = __copy_user_zeroing_intel(to, (const void *) from, n);
+		n = __copy_user_zeroing_intel(to, from, n);
 	return n;
 }
 
--- diff/arch/i386/mach-default/setup.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-default/setup.c	2004-07-01 21:32:31.000000000 +0100
@@ -27,7 +27,7 @@
 /*
  * IRQ2 is cascade interrupt to second interrupt controller
  */
-static struct irqaction irq2 = { no_action, 0, 0, "cascade", NULL, NULL};
+static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
 
 /**
  * intr_init_hook - post gate setup interrupt initialisation
@@ -71,7 +71,7 @@
 {
 }
 
-static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL};
+static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
 
 /**
  * time_init_hook - do any specific initialisations for the system timer.
--- diff/arch/i386/mach-visws/mpparse.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-visws/mpparse.c	2004-07-01 21:32:31.000000000 +0100
@@ -57,12 +57,12 @@
 		boot_cpu_logical_apicid = logical_apicid;
 	}
 
-	if (m->mpc_apicid > MAX_APICS) {
+	ver = m->mpc_apicver;
+	if ((ver >= 0x14 && m->mpc_apicid >= 0xff) || m->mpc_apicid >= 0xf) {
 		printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
 			m->mpc_apicid, MAX_APICS);
 		return;
 	}
-	ver = m->mpc_apicver;
 
 	apic_cpus = apicid_to_cpu_present(m->mpc_apicid);
 	physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus);
--- diff/arch/i386/mach-visws/traps.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-visws/traps.c	2004-07-01 21:32:31.000000000 +0100
@@ -8,7 +8,6 @@
 #include <linux/pci_ids.h>
 
 #include <asm/io.h>
-#include <asm/pgalloc.h>
 #include <asm/arch_hooks.h>
 #include <asm/apic.h>
 #include "cobalt.h"
--- diff/arch/i386/mach-voyager/setup.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-voyager/setup.c	2004-07-01 21:32:31.000000000 +0100
@@ -17,7 +17,7 @@
 /*
  * IRQ2 is cascade interrupt to second interrupt controller
  */
-static struct irqaction irq2 = { no_action, 0, 0, "cascade", NULL, NULL};
+static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
 
 void __init intr_init_hook(void)
 {
@@ -40,7 +40,7 @@
 {
 }
 
-static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL};
+static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
 
 void __init time_init_hook(void)
 {
--- diff/arch/i386/mach-voyager/voyager_basic.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-voyager/voyager_basic.c	2004-07-01 21:32:31.000000000 +0100
@@ -24,7 +24,6 @@
 #include <linux/reboot.h>
 #include <linux/sysrq.h>
 #include <asm/io.h>
-#include <asm/pgalloc.h>
 #include <asm/voyager.h>
 #include <asm/vic.h>
 #include <linux/pm.h>
--- diff/arch/i386/mach-voyager/voyager_smp.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/mach-voyager/voyager_smp.c	2004-07-01 21:32:31.000000000 +0100
@@ -24,7 +24,6 @@
 #include <asm/desc.h>
 #include <asm/voyager.h>
 #include <asm/vic.h>
-#include <asm/pgalloc.h>
 #include <asm/mtrr.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
@@ -154,7 +153,7 @@
 send_CPI_allbutself(__u8 cpi)
 {
 	__u8 cpu = smp_processor_id();
-	__u32 mask = cpus_coerce(cpu_online_map) & ~(1 << cpu);
+	__u32 mask = cpus_addr(cpu_online_map)[0] & ~(1 << cpu);
 	send_CPI(mask, cpi);
 }
 
@@ -403,11 +402,11 @@
 	/* set up everything for just this CPU, we can alter
 	 * this as we start the other CPUs later */
 	/* now get the CPU disposition from the extended CMOS */
-	phys_cpu_present_map = cpus_promote(voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK));
-	cpus_coerce(phys_cpu_present_map) |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8;
-	cpus_coerce(phys_cpu_present_map) |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 2) << 16;
-	cpus_coerce(phys_cpu_present_map) |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 3) << 24;
-	printk("VOYAGER SMP: phys_cpu_present_map = 0x%lx\n", cpus_coerce(phys_cpu_present_map));
+	cpus_addr(phys_cpu_present_map)[0] = voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK);
+	cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8;
+	cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 2) << 16;
+	cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 3) << 24;
+	printk("VOYAGER SMP: phys_cpu_present_map = 0x%lx\n", cpus_addr(phys_cpu_present_map)[0]);
 	/* Here we set up the VIC to enable SMP */
 	/* enable the CPIs by writing the base vector to their register */
 	outb(VIC_DEFAULT_CPI_BASE, VIC_CPI_BASE_REGISTER);
@@ -707,12 +706,12 @@
 		/* now that the cat has probed the Voyager System Bus, sanity
 		 * check the cpu map */
 		if( ((voyager_quad_processors | voyager_extended_vic_processors)
-		     & cpus_coerce(phys_cpu_present_map)) != cpus_coerce(phys_cpu_present_map)) {
+		     & cpus_addr(phys_cpu_present_map)[0]) != cpus_addr(phys_cpu_present_map)[0]) {
 			/* should panic */
 			printk("\n\n***WARNING*** Sanity check of CPU present map FAILED\n");
 		}
 	} else if(voyager_level == 4)
-		voyager_extended_vic_processors = cpus_coerce(phys_cpu_present_map);
+		voyager_extended_vic_processors = cpus_addr(phys_cpu_present_map)[0];
 
 	/* this sets up the idle task to run on the current cpu */
 	voyager_extended_cpus = 1;
@@ -910,7 +909,7 @@
 
 	if (!cpumask)
 		BUG();
-	if ((cpumask & cpus_coerce(cpu_online_map)) != cpumask)
+	if ((cpumask & cpus_addr(cpu_online_map)[0]) != cpumask)
 		BUG();
 	if (cpumask & (1 << smp_processor_id()))
 		BUG();
@@ -953,7 +952,7 @@
 
 	preempt_disable();
 
-	cpu_mask = cpus_coerce(mm->cpu_vm_mask) & ~(1 << smp_processor_id());
+	cpu_mask = cpus_addr(mm->cpu_vm_mask)[0] & ~(1 << smp_processor_id());
 	local_flush_tlb();
 	if (cpu_mask)
 		flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
@@ -969,7 +968,7 @@
 
 	preempt_disable();
 
-	cpu_mask = cpus_coerce(mm->cpu_vm_mask) & ~(1 << smp_processor_id());
+	cpu_mask = cpus_addr(mm->cpu_vm_mask)[0] & ~(1 << smp_processor_id());
 
 	if (current->active_mm == mm) {
 		if (current->mm)
@@ -990,7 +989,7 @@
 
 	preempt_disable();
 
-	cpu_mask = cpus_coerce(mm->cpu_vm_mask) & ~(1 << smp_processor_id());
+	cpu_mask = cpus_addr(mm->cpu_vm_mask)[0] & ~(1 << smp_processor_id());
 	if (current->active_mm == mm) {
 		if(current->mm)
 			__flush_tlb_one(va);
@@ -1099,7 +1098,7 @@
 		   int wait)
 {
 	struct call_data_struct data;
-	__u32 mask = cpus_coerce(cpu_online_map);
+	__u32 mask = cpus_addr(cpu_online_map)[0];
 
 	mask &= ~(1<<smp_processor_id());
 
@@ -1790,9 +1789,9 @@
 	unsigned long irq_mask = 1 << irq;
 	int cpu;
 
-	real_mask = cpus_coerce(mask) & voyager_extended_vic_processors;
+	real_mask = cpus_addr(mask)[0] & voyager_extended_vic_processors;
 	
-	if(cpus_coerce(mask) == 0)
+	if(cpus_addr(mask)[0] == 0)
 		/* can't have no cpu's to accept the interrupt -- extremely
 		 * bad things will happen */
 		return;
--- diff/arch/i386/mach-voyager/voyager_thread.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-voyager/voyager_thread.c	2004-07-01 21:32:31.000000000 +0100
@@ -28,7 +28,6 @@
 #include <asm/desc.h>
 #include <asm/voyager.h>
 #include <asm/vic.h>
-#include <asm/pgalloc.h>
 #include <asm/mtrr.h>
 #include <asm/msr.h>
 
--- diff/arch/i386/math-emu/errors.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/math-emu/errors.c	2004-07-01 21:32:31.000000000 +0100
@@ -41,18 +41,18 @@
 
   RE_ENTRANT_CHECK_OFF;
   /* No need to verify_area(), we have previously fetched these bytes. */
-  printk("Unimplemented FPU Opcode at eip=%p : ", (void *) address);
+  printk("Unimplemented FPU Opcode at eip=%p : ", (void __user *) address);
   if ( FPU_CS == __USER_CS )
     {
       while ( 1 )
 	{
-	  FPU_get_user(byte1, (u_char *) address);
+	  FPU_get_user(byte1, (u_char __user *) address);
 	  if ( (byte1 & 0xf8) == 0xd8 ) break;
 	  printk("[%02x]", byte1);
 	  address++;
 	}
       printk("%02x ", byte1);
-      FPU_get_user(FPU_modrm, 1 + (u_char *) address);
+      FPU_get_user(FPU_modrm, 1 + (u_char __user *) address);
       
       if (FPU_modrm >= 0300)
 	printk("%02x (%02x+%d)\n", FPU_modrm, FPU_modrm & 0xf8, FPU_modrm & 7);
@@ -98,7 +98,7 @@
 #define MAX_PRINTED_BYTES 20
       for ( i = 0; i < MAX_PRINTED_BYTES; i++ )
 	{
-	  FPU_get_user(byte1, (u_char *) address);
+	  FPU_get_user(byte1, (u_char __user *) address);
 	  if ( (byte1 & 0xf8) == 0xd8 )
 	    {
 	      printk(" %02x", byte1);
@@ -111,7 +111,7 @@
 	printk(" [more..]\n");
       else
 	{
-	  FPU_get_user(FPU_modrm, 1 + (u_char *) address);
+	  FPU_get_user(FPU_modrm, 1 + (u_char __user *) address);
 	  
 	  if (FPU_modrm >= 0300)
 	    printk(" %02x (%02x+%d)\n", FPU_modrm, FPU_modrm & 0xf8, FPU_modrm & 7);
--- diff/arch/i386/math-emu/fpu_arith.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/math-emu/fpu_arith.c	2004-07-01 21:32:31.000000000 +0100
@@ -16,7 +16,7 @@
 #include "status_w.h"
 
 
-void fadd__()
+void fadd__(void)
 {
   /* fadd st,st(i) */
   int i = FPU_rm;
@@ -25,7 +25,7 @@
 }
 
 
-void fmul__()
+void fmul__(void)
 {
   /* fmul st,st(i) */
   int i = FPU_rm;
@@ -35,7 +35,7 @@
 
 
 
-void fsub__()
+void fsub__(void)
 {
   /* fsub st,st(i) */
   clear_C1();
@@ -43,7 +43,7 @@
 }
 
 
-void fsubr_()
+void fsubr_(void)
 {
   /* fsubr st,st(i) */
   clear_C1();
@@ -51,7 +51,7 @@
 }
 
 
-void fdiv__()
+void fdiv__(void)
 {
   /* fdiv st,st(i) */
   clear_C1();
@@ -59,7 +59,7 @@
 }
 
 
-void fdivr_()
+void fdivr_(void)
 {
   /* fdivr st,st(i) */
   clear_C1();
@@ -68,7 +68,7 @@
 
 
 
-void fadd_i()
+void fadd_i(void)
 {
   /* fadd st(i),st */
   int i = FPU_rm;
@@ -77,7 +77,7 @@
 }
 
 
-void fmul_i()
+void fmul_i(void)
 {
   /* fmul st(i),st */
   clear_C1();
@@ -85,7 +85,7 @@
 }
 
 
-void fsubri()
+void fsubri(void)
 {
   /* fsubr st(i),st */
   clear_C1();
@@ -93,7 +93,7 @@
 }
 
 
-void fsub_i()
+void fsub_i(void)
 {
   /* fsub st(i),st */
   clear_C1();
@@ -101,7 +101,7 @@
 }
 
 
-void fdivri()
+void fdivri(void)
 {
   /* fdivr st(i),st */
   clear_C1();
@@ -109,7 +109,7 @@
 }
 
 
-void fdiv_i()
+void fdiv_i(void)
 {
   /* fdiv st(i),st */
   clear_C1();
@@ -118,7 +118,7 @@
 
 
 
-void faddp_()
+void faddp_(void)
 {
   /* faddp st(i),st */
   int i = FPU_rm;
@@ -128,7 +128,7 @@
 }
 
 
-void fmulp_()
+void fmulp_(void)
 {
   /* fmulp st(i),st */
   clear_C1();
@@ -138,7 +138,7 @@
 
 
 
-void fsubrp()
+void fsubrp(void)
 {
   /* fsubrp st(i),st */
   clear_C1();
@@ -147,7 +147,7 @@
 }
 
 
-void fsubp_()
+void fsubp_(void)
 {
   /* fsubp st(i),st */
   clear_C1();
@@ -156,7 +156,7 @@
 }
 
 
-void fdivrp()
+void fdivrp(void)
 {
   /* fdivrp st(i),st */
   clear_C1();
@@ -165,7 +165,7 @@
 }
 
 
-void fdivp_()
+void fdivp_(void)
 {
   /* fdivp st(i),st */
   clear_C1();
--- diff/arch/i386/math-emu/fpu_aux.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/math-emu/fpu_aux.c	2004-07-01 21:32:31.000000000 +0100
@@ -30,7 +30,7 @@
 }
 
 /* Needs to be externally visible */
-void finit()
+void finit(void)
 {
   control_word = 0x037f;
   partial_status = 0;
@@ -58,7 +58,7 @@
   fsetpm, FPU_illegal, FPU_illegal, FPU_illegal
 };
 
-void finit_()
+void finit_(void)
 {
   (finit_table[FPU_rm])();
 }
@@ -75,7 +75,7 @@
   FPU_illegal, FPU_illegal, FPU_illegal, FPU_illegal
 };
 
-void fstsw_()
+void fstsw_(void)
 {
   (fstsw_table[FPU_rm])();
 }
@@ -86,13 +86,13 @@
   FPU_illegal, FPU_illegal, FPU_illegal, FPU_illegal
 };
 
-void fp_nop()
+void fp_nop(void)
 {
   (fp_nop_table[FPU_rm])();
 }
 
 
-void fld_i_()
+void fld_i_(void)
 {
   FPU_REG *st_new_ptr;
   int i;
@@ -124,7 +124,7 @@
 }
 
 
-void fxch_i()
+void fxch_i(void)
 {
   /* fxch st(i) */
   FPU_REG t;
@@ -173,14 +173,14 @@
 }
 
 
-void ffree_()
+void ffree_(void)
 {
   /* ffree st(i) */
   FPU_settagi(FPU_rm, TAG_Empty);
 }
 
 
-void ffreep()
+void ffreep(void)
 {
   /* ffree st(i) + pop - unofficial code */
   FPU_settagi(FPU_rm, TAG_Empty);
@@ -188,14 +188,14 @@
 }
 
 
-void fst_i_()
+void fst_i_(void)
 {
   /* fst st(i) */
   FPU_copy_to_regi(&st(0), FPU_gettag0(), FPU_rm);
 }
 
 
-void fstp_i()
+void fstp_i(void)
 {
   /* fstp st(i) */
   FPU_copy_to_regi(&st(0), FPU_gettag0(), FPU_rm);
--- diff/arch/i386/math-emu/fpu_entry.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/math-emu/fpu_entry.c	2004-07-01 21:32:31.000000000 +0100
@@ -128,7 +128,7 @@
 u_char emulating=0;
 #endif /* RE_ENTRANT_CHECKING */
 
-static int valid_prefix(u_char *Byte, u_char **fpu_eip,
+static int valid_prefix(u_char *Byte, u_char __user **fpu_eip,
 			overrides *override);
 
 asmlinkage void math_emulate(long arg)
@@ -140,7 +140,7 @@
   FPU_REG loaded_data;
   FPU_REG *st0_ptr;
   u_char	  loaded_tag, st0_tag;
-  void *data_address;
+  void __user *data_address;
   struct address data_sel_off;
   struct address entry_sel_off;
   unsigned long code_base = 0;
@@ -192,7 +192,8 @@
 	  math_abort(FPU_info, SIGILL);
 	}
 
-      if ( SEG_D_SIZE(code_descriptor = LDT_DESCRIPTOR(FPU_CS)) )
+      code_descriptor = LDT_DESCRIPTOR(FPU_CS);
+      if ( SEG_D_SIZE(code_descriptor) )
 	{
 	  /* The above test may be wrong, the book is not clear */
 	  /* Segmented 32 bit protected mode */
@@ -214,7 +215,7 @@
   if (current->ptrace & PT_PTRACED)
     FPU_lookahead = 0;
 
-  if ( !valid_prefix(&byte1, (u_char **)&FPU_EIP,
+  if ( !valid_prefix(&byte1, (u_char __user **)&FPU_EIP,
 		     &addr_modes.override) )
     {
       RE_ENTRANT_CHECK_OFF;
@@ -257,7 +258,7 @@
 
   RE_ENTRANT_CHECK_OFF;
   FPU_code_verify_area(1);
-  FPU_get_user(FPU_modrm, (u_char *) FPU_EIP);
+  FPU_get_user(FPU_modrm, (u_char __user *) FPU_EIP);
   RE_ENTRANT_CHECK_ON;
   FPU_EIP++;
 
@@ -336,23 +337,23 @@
 	      switch ( (byte1 >> 1) & 3 )
 		{
 		case 0:
-		  unmasked = FPU_load_single((float *)data_address,
+		  unmasked = FPU_load_single((float __user *)data_address,
 					     &loaded_data);
 		  loaded_tag = unmasked & 0xff;
 		  unmasked &= ~0xff;
 		  break;
 		case 1:
-		  loaded_tag = FPU_load_int32((long *)data_address, &loaded_data);
+		  loaded_tag = FPU_load_int32((long __user *)data_address, &loaded_data);
 		  break;
 		case 2:
-		  unmasked = FPU_load_double((double *)data_address,
+		  unmasked = FPU_load_double((double __user *)data_address,
 					     &loaded_data);
 		  loaded_tag = unmasked & 0xff;
 		  unmasked &= ~0xff;
 		  break;
 		case 3:
 		default:  /* Used here to suppress gcc warnings. */
-		  loaded_tag = FPU_load_int16((short *)data_address, &loaded_data);
+		  loaded_tag = FPU_load_int16((short __user *)data_address, &loaded_data);
 		  break;
 		}
 
@@ -563,7 +564,7 @@
   if (FPU_lookahead && !need_resched())
     {
       FPU_ORIG_EIP = FPU_EIP - code_base;
-      if ( valid_prefix(&byte1, (u_char **)&FPU_EIP,
+      if ( valid_prefix(&byte1, (u_char __user **)&FPU_EIP,
 			&addr_modes.override) )
 	goto do_another_FPU_instruction;
     }
@@ -579,11 +580,11 @@
    all prefix bytes, further changes are needed in the emulator code
    which accesses user address space. Access to separate segments is
    important for msdos emulation. */
-static int valid_prefix(u_char *Byte, u_char **fpu_eip,
+static int valid_prefix(u_char *Byte, u_char __user **fpu_eip,
 			overrides *override)
 {
   u_char byte;
-  u_char *ip = *fpu_eip;
+  u_char __user *ip = *fpu_eip;
 
   *override = (overrides) { 0, 0, PREFIX_DEFAULT };       /* defaults */
 
@@ -679,9 +680,9 @@
 #define sstatus_word() \
   ((S387->swd & ~SW_Top & 0xffff) | ((S387->ftop << SW_Top_Shift) & SW_Top))
 
-int restore_i387_soft(void *s387, struct _fpstate *buf)
+int restore_i387_soft(void *s387, struct _fpstate __user *buf)
 {
-  u_char *d = (u_char *)buf;
+  u_char __user *d = (u_char __user *)buf;
   int offset, other, i, tags, regnr, tag, newtop;
 
   RE_ENTRANT_CHECK_OFF;
@@ -725,9 +726,9 @@
 }
 
 
-int save_i387_soft(void *s387, struct _fpstate * buf)
+int save_i387_soft(void *s387, struct _fpstate __user * buf)
 {
-  u_char *d = (u_char *)buf;
+  u_char __user *d = (u_char __user *)buf;
   int offset = (S387->ftop & 7) * 10, other = 80 - offset;
 
   RE_ENTRANT_CHECK_OFF;
--- diff/arch/i386/math-emu/fpu_etc.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/math-emu/fpu_etc.c	2004-07-01 21:32:31.000000000 +0100
@@ -137,7 +137,7 @@
   ftst_, fxam, (FUNC_ST0)FPU_illegal, (FUNC_ST0)FPU_illegal
 };
 
-void FPU_etc()
+void FPU_etc(void)
 {
   (fp_etc_table[FPU_rm])(&st(0), FPU_gettag0());
 }
--- diff/arch/i386/math-emu/fpu_proto.h	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/math-emu/fpu_proto.h	2004-07-01 21:32:31.000000000 +0100
@@ -77,13 +77,13 @@
 extern void FPU_triga(void);
 extern void FPU_trigb(void);
 /* get_address.c */
-extern void *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
+extern void __user *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
 			 struct address *addr, fpu_addr_modes addr_modes);
-extern void *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
+extern void __user *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
 			    struct address *addr, fpu_addr_modes addr_modes);
 /* load_store.c */
 extern int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
-			    void *data_address);
+			    void __user *data_address);
 /* poly_2xm1.c */
 extern int poly_2xm1(u_char sign, FPU_REG *arg, FPU_REG *result);
 /* poly_atan.c */
@@ -112,26 +112,26 @@
 /* reg_constant.c */
 extern void fconst(void);
 /* reg_ld_str.c */
-extern int FPU_load_extended(long double *s, int stnr);
-extern int FPU_load_double(double *dfloat, FPU_REG *loaded_data);
-extern int FPU_load_single(float *single, FPU_REG *loaded_data);
-extern int FPU_load_int64(long long *_s);
-extern int FPU_load_int32(long *_s, FPU_REG *loaded_data);
-extern int FPU_load_int16(short *_s, FPU_REG *loaded_data);
-extern int FPU_load_bcd(u_char *s);
+extern int FPU_load_extended(long double __user *s, int stnr);
+extern int FPU_load_double(double __user *dfloat, FPU_REG *loaded_data);
+extern int FPU_load_single(float __user *single, FPU_REG *loaded_data);
+extern int FPU_load_int64(long long __user *_s);
+extern int FPU_load_int32(long __user *_s, FPU_REG *loaded_data);
+extern int FPU_load_int16(short __user *_s, FPU_REG *loaded_data);
+extern int FPU_load_bcd(u_char __user *s);
 extern int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag,
-			      long double *d);
-extern int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *dfloat);
-extern int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float *single);
-extern int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long *d);
-extern int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long *d);
-extern int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short *d);
-extern int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char *d);
+			      long double __user *d);
+extern int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double __user *dfloat);
+extern int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float __user *single);
+extern int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long __user *d);
+extern int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long __user *d);
+extern int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short __user *d);
+extern int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char __user *d);
 extern int FPU_round_to_int(FPU_REG *r, u_char tag);
-extern u_char *fldenv(fpu_addr_modes addr_modes, u_char *s);
-extern void frstor(fpu_addr_modes addr_modes, u_char *data_address);
-extern u_char *fstenv(fpu_addr_modes addr_modes, u_char *d);
-extern void fsave(fpu_addr_modes addr_modes, u_char *data_address);
+extern u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user *s);
+extern void frstor(fpu_addr_modes addr_modes, u_char __user *data_address);
+extern u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user *d);
+extern void fsave(fpu_addr_modes addr_modes, u_char __user *data_address);
 extern int FPU_tagof(FPU_REG *ptr);
 /* reg_mul.c */
 extern int FPU_mul(FPU_REG const *b, u_char tagb, int deststnr, int control_w);
--- diff/arch/i386/math-emu/fpu_system.h	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/math-emu/fpu_system.h	2004-07-01 21:32:31.000000000 +0100
@@ -80,7 +80,7 @@
 /* A simpler test than verify_area() can probably be done for
    FPU_code_verify_area() because the only possible error is to step
    past the upper boundary of a legal code area. */
-#define	FPU_code_verify_area(z) FPU_verify_area(VERIFY_READ,(void *)FPU_EIP,z)
+#define	FPU_code_verify_area(z) FPU_verify_area(VERIFY_READ,(void __user *)FPU_EIP,z)
 #endif
 
 #define FPU_get_user(x,y)       get_user((x),(y))
--- diff/arch/i386/math-emu/get_address.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/math-emu/get_address.c	2004-07-01 21:32:31.000000000 +0100
@@ -82,7 +82,7 @@
 
   RE_ENTRANT_CHECK_OFF;
   FPU_code_verify_area(1);
-  FPU_get_user(base, (u_char *) (*fpu_eip));   /* The SIB byte */
+  FPU_get_user(base, (u_char __user *) (*fpu_eip));   /* The SIB byte */
   RE_ENTRANT_CHECK_ON;
   (*fpu_eip)++;
   ss = base >> 6;
@@ -112,7 +112,7 @@
       long displacement;
       RE_ENTRANT_CHECK_OFF;
       FPU_code_verify_area(1);
-      FPU_get_user(displacement, (signed char *) (*fpu_eip));
+      FPU_get_user(displacement, (signed char __user *) (*fpu_eip));
       offset += displacement;
       RE_ENTRANT_CHECK_ON;
       (*fpu_eip)++;
@@ -123,7 +123,7 @@
       long displacement;
       RE_ENTRANT_CHECK_OFF;
       FPU_code_verify_area(4);
-      FPU_get_user(displacement, (long *) (*fpu_eip));
+      FPU_get_user(displacement, (long __user *) (*fpu_eip));
       offset += displacement;
       RE_ENTRANT_CHECK_ON;
       (*fpu_eip) += 4;
@@ -241,7 +241,7 @@
 
 */
 
-void *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
+void __user *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
 		  struct address *addr,
 		  fpu_addr_modes addr_modes)
 {
@@ -277,24 +277,24 @@
 	      /* Special case: disp32 */
 	      RE_ENTRANT_CHECK_OFF;
 	      FPU_code_verify_area(4);
-	      FPU_get_user(address, (unsigned long *) (*fpu_eip));
+	      FPU_get_user(address, (unsigned long __user *) (*fpu_eip));
 	      (*fpu_eip) += 4;
 	      RE_ENTRANT_CHECK_ON;
 	      addr->offset = address;
-	      return (void *) address;
+	      return (void __user *) address;
 	    }
 	  else
 	    {
 	      address = *cpu_reg_ptr;  /* Just return the contents
 					  of the cpu register */
 	      addr->offset = address;
-	      return (void *) address;
+	      return (void __user *) address;
 	    }
 	case 1:
 	  /* 8 bit signed displacement */
 	  RE_ENTRANT_CHECK_OFF;
 	  FPU_code_verify_area(1);
-	  FPU_get_user(address, (signed char *) (*fpu_eip));
+	  FPU_get_user(address, (signed char __user *) (*fpu_eip));
 	  RE_ENTRANT_CHECK_ON;
 	  (*fpu_eip)++;
 	  break;
@@ -302,7 +302,7 @@
 	  /* 32 bit displacement */
 	  RE_ENTRANT_CHECK_OFF;
 	  FPU_code_verify_area(4);
-	  FPU_get_user(address, (long *) (*fpu_eip));
+	  FPU_get_user(address, (long __user *) (*fpu_eip));
 	  (*fpu_eip) += 4;
 	  RE_ENTRANT_CHECK_ON;
 	  break;
@@ -331,11 +331,11 @@
       EXCEPTION(EX_INTERNAL|0x133);
     }
 
-  return (void *)address;
+  return (void __user *)address;
 }
 
 
-void *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
+void __user *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
 		     struct address *addr,
 		     fpu_addr_modes addr_modes)
 {
@@ -363,7 +363,7 @@
 	  /* Special case: disp16 */
 	  RE_ENTRANT_CHECK_OFF;
 	  FPU_code_verify_area(2);
-	  FPU_get_user(address, (unsigned short *) (*fpu_eip));
+	  FPU_get_user(address, (unsigned short __user *) (*fpu_eip));
 	  (*fpu_eip) += 2;
 	  RE_ENTRANT_CHECK_ON;
 	  goto add_segment;
@@ -373,7 +373,7 @@
       /* 8 bit signed displacement */
       RE_ENTRANT_CHECK_OFF;
       FPU_code_verify_area(1);
-      FPU_get_user(address, (signed char *) (*fpu_eip));
+      FPU_get_user(address, (signed char __user *) (*fpu_eip));
       RE_ENTRANT_CHECK_ON;
       (*fpu_eip)++;
       break;
@@ -381,7 +381,7 @@
       /* 16 bit displacement */
       RE_ENTRANT_CHECK_OFF;
       FPU_code_verify_area(2);
-      FPU_get_user(address, (unsigned short *) (*fpu_eip));
+      FPU_get_user(address, (unsigned short __user *) (*fpu_eip));
       (*fpu_eip) += 2;
       RE_ENTRANT_CHECK_ON;
       break;
@@ -445,5 +445,5 @@
       EXCEPTION(EX_INTERNAL|0x131);
     }
 
-  return (void *)address ;
+  return (void __user *)address ;
 }
--- diff/arch/i386/math-emu/load_store.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/math-emu/load_store.c	2004-07-01 21:32:31.000000000 +0100
@@ -61,7 +61,7 @@
 };
 
 int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
-		     void *data_address)
+		     void __user *data_address)
 {
   FPU_REG loaded_data;
   FPU_REG *st0_ptr;
@@ -119,7 +119,7 @@
     {
     case 000:       /* fld m32real */
       clear_C1();
-      loaded_tag = FPU_load_single((float *)data_address, &loaded_data);
+      loaded_tag = FPU_load_single((float __user *)data_address, &loaded_data);
       if ( (loaded_tag == TAG_Special)
 	   && isNaN(&loaded_data)
 	   && (real_1op_NaN(&loaded_data) < 0) )
@@ -131,12 +131,12 @@
       break;
     case 001:      /* fild m32int */
       clear_C1();
-      loaded_tag = FPU_load_int32((long *)data_address, &loaded_data);
+      loaded_tag = FPU_load_int32((long __user *)data_address, &loaded_data);
       FPU_copy_to_reg0(&loaded_data, loaded_tag);
       break;
     case 002:      /* fld m64real */
       clear_C1();
-      loaded_tag = FPU_load_double((double *)data_address, &loaded_data);
+      loaded_tag = FPU_load_double((double __user *)data_address, &loaded_data);
       if ( (loaded_tag == TAG_Special)
 	   && isNaN(&loaded_data)
 	   && (real_1op_NaN(&loaded_data) < 0) )
@@ -148,68 +148,68 @@
       break;
     case 003:      /* fild m16int */
       clear_C1();
-      loaded_tag = FPU_load_int16((short *)data_address, &loaded_data);
+      loaded_tag = FPU_load_int16((short __user *)data_address, &loaded_data);
       FPU_copy_to_reg0(&loaded_data, loaded_tag);
       break;
     case 010:      /* fst m32real */
       clear_C1();
-      FPU_store_single(st0_ptr, st0_tag, (float *)data_address);
+      FPU_store_single(st0_ptr, st0_tag, (float __user *)data_address);
       break;
     case 011:      /* fist m32int */
       clear_C1();
-      FPU_store_int32(st0_ptr, st0_tag, (long *)data_address);
+      FPU_store_int32(st0_ptr, st0_tag, (long __user *)data_address);
       break;
     case 012:     /* fst m64real */
       clear_C1();
-      FPU_store_double(st0_ptr, st0_tag, (double *)data_address);
+      FPU_store_double(st0_ptr, st0_tag, (double __user *)data_address);
       break;
     case 013:     /* fist m16int */
       clear_C1();
-      FPU_store_int16(st0_ptr, st0_tag, (short *)data_address);
+      FPU_store_int16(st0_ptr, st0_tag, (short __user *)data_address);
       break;
     case 014:     /* fstp m32real */
       clear_C1();
-      if ( FPU_store_single(st0_ptr, st0_tag, (float *)data_address) )
+      if ( FPU_store_single(st0_ptr, st0_tag, (float __user *)data_address) )
 	pop_0();  /* pop only if the number was actually stored
 		     (see the 80486 manual p16-28) */
       break;
     case 015:     /* fistp m32int */
       clear_C1();
-      if ( FPU_store_int32(st0_ptr, st0_tag, (long *)data_address) )
+      if ( FPU_store_int32(st0_ptr, st0_tag, (long __user *)data_address) )
 	pop_0();  /* pop only if the number was actually stored
 		     (see the 80486 manual p16-28) */
       break;
     case 016:     /* fstp m64real */
       clear_C1();
-      if ( FPU_store_double(st0_ptr, st0_tag, (double *)data_address) )
+      if ( FPU_store_double(st0_ptr, st0_tag, (double __user *)data_address) )
 	pop_0();  /* pop only if the number was actually stored
 		     (see the 80486 manual p16-28) */
       break;
     case 017:     /* fistp m16int */
       clear_C1();
-      if ( FPU_store_int16(st0_ptr, st0_tag, (short *)data_address) )
+      if ( FPU_store_int16(st0_ptr, st0_tag, (short __user *)data_address) )
 	pop_0();  /* pop only if the number was actually stored
 		     (see the 80486 manual p16-28) */
       break;
     case 020:     /* fldenv  m14/28byte */
-      fldenv(addr_modes, (u_char *)data_address);
+      fldenv(addr_modes, (u_char __user *)data_address);
       /* Ensure that the values just loaded are not changed by
 	 fix-up operations. */
       return 1;
     case 022:     /* frstor m94/108byte */
-      frstor(addr_modes, (u_char *)data_address);
+      frstor(addr_modes, (u_char __user *)data_address);
       /* Ensure that the values just loaded are not changed by
 	 fix-up operations. */
       return 1;
     case 023:     /* fbld m80dec */
       clear_C1();
-      loaded_tag = FPU_load_bcd((u_char *)data_address);
+      loaded_tag = FPU_load_bcd((u_char __user *)data_address);
       FPU_settag0(loaded_tag);
       break;
     case 024:     /* fldcw */
       RE_ENTRANT_CHECK_OFF;
       FPU_verify_area(VERIFY_READ, data_address, 2);
-      FPU_get_user(control_word, (unsigned short *) data_address);
+      FPU_get_user(control_word, (unsigned short __user *) data_address);
       RE_ENTRANT_CHECK_ON;
       if ( partial_status & ~control_word & CW_Exceptions )
 	partial_status |= (SW_Summary | SW_Backward);
@@ -221,47 +221,47 @@
       return 1;
     case 025:      /* fld m80real */
       clear_C1();
-      loaded_tag = FPU_load_extended((long double *)data_address, 0);
+      loaded_tag = FPU_load_extended((long double __user *)data_address, 0);
       FPU_settag0(loaded_tag);
       break;
     case 027:      /* fild m64int */
       clear_C1();
-      loaded_tag = FPU_load_int64((long long *)data_address);
+      loaded_tag = FPU_load_int64((long long __user *)data_address);
       FPU_settag0(loaded_tag);
       break;
     case 030:     /* fstenv  m14/28byte */
-      fstenv(addr_modes, (u_char *)data_address);
+      fstenv(addr_modes, (u_char __user *)data_address);
       return 1;
     case 032:      /* fsave */
-      fsave(addr_modes, (u_char *)data_address);
+      fsave(addr_modes, (u_char __user *)data_address);
       return 1;
     case 033:      /* fbstp m80dec */
       clear_C1();
-      if ( FPU_store_bcd(st0_ptr, st0_tag, (u_char *)data_address) )
+      if ( FPU_store_bcd(st0_ptr, st0_tag, (u_char __user *)data_address) )
 	pop_0();  /* pop only if the number was actually stored
 		     (see the 80486 manual p16-28) */
       break;
     case 034:      /* fstcw m16int */
       RE_ENTRANT_CHECK_OFF;
       FPU_verify_area(VERIFY_WRITE,data_address,2);
-      FPU_put_user(control_word, (unsigned short *) data_address);
+      FPU_put_user(control_word, (unsigned short __user *) data_address);
       RE_ENTRANT_CHECK_ON;
       return 1;
     case 035:      /* fstp m80real */
       clear_C1();
-      if ( FPU_store_extended(st0_ptr, st0_tag, (long double *)data_address) )
+      if ( FPU_store_extended(st0_ptr, st0_tag, (long double __user *)data_address) )
 	pop_0();  /* pop only if the number was actually stored
 		     (see the 80486 manual p16-28) */
       break;
     case 036:      /* fstsw m2byte */
       RE_ENTRANT_CHECK_OFF;
       FPU_verify_area(VERIFY_WRITE,data_address,2);
-      FPU_put_user(status_word(),(unsigned short *) data_address);
+      FPU_put_user(status_word(),(unsigned short __user *) data_address);
       RE_ENTRANT_CHECK_ON;
       return 1;
     case 037:      /* fistp m64int */
       clear_C1();
-      if ( FPU_store_int64(st0_ptr, st0_tag, (long long *)data_address) )
+      if ( FPU_store_int64(st0_ptr, st0_tag, (long long __user *)data_address) )
 	pop_0();  /* pop only if the number was actually stored
 		     (see the 80486 manual p16-28) */
       break;
--- diff/arch/i386/math-emu/reg_compare.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/math-emu/reg_compare.c	2004-07-01 21:32:31.000000000 +0100
@@ -324,14 +324,14 @@
 
 /*---------------------------------------------------------------------------*/
 
-void fcom_st()
+void fcom_st(void)
 {
   /* fcom st(i) */
   compare_st_st(FPU_rm);
 }
 
 
-void fcompst()
+void fcompst(void)
 {
   /* fcomp st(i) */
   if ( !compare_st_st(FPU_rm) )
@@ -339,7 +339,7 @@
 }
 
 
-void fcompp()
+void fcompp(void)
 {
   /* fcompp */
   if (FPU_rm != 1)
@@ -352,7 +352,7 @@
 }
 
 
-void fucom_()
+void fucom_(void)
 {
   /* fucom st(i) */
   compare_u_st_st(FPU_rm);
@@ -360,7 +360,7 @@
 }
 
 
-void fucomp()
+void fucomp(void)
 {
   /* fucomp st(i) */
   if ( !compare_u_st_st(FPU_rm) )
@@ -368,7 +368,7 @@
 }
 
 
-void fucompp()
+void fucompp(void)
 {
   /* fucompp */
   if (FPU_rm == 1)
--- diff/arch/i386/math-emu/reg_ld_str.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/math-emu/reg_ld_str.c	2004-07-01 21:32:31.000000000 +0100
@@ -86,7 +86,7 @@
 
 
 /* Get a long double from user memory */
-int FPU_load_extended(long double *s, int stnr)
+int FPU_load_extended(long double __user *s, int stnr)
 {
   FPU_REG *sti_ptr = &st(stnr);
 
@@ -100,15 +100,15 @@
 
 
 /* Get a double from user memory */
-int FPU_load_double(double *dfloat, FPU_REG *loaded_data)
+int FPU_load_double(double __user *dfloat, FPU_REG *loaded_data)
 {
   int exp, tag, negative;
   unsigned m64, l64;
 
   RE_ENTRANT_CHECK_OFF;
   FPU_verify_area(VERIFY_READ, dfloat, 8);
-  FPU_get_user(m64, 1 + (unsigned long *) dfloat);
-  FPU_get_user(l64, (unsigned long *) dfloat);
+  FPU_get_user(m64, 1 + (unsigned long __user *) dfloat);
+  FPU_get_user(l64, (unsigned long __user *) dfloat);
   RE_ENTRANT_CHECK_ON;
 
   negative = (m64 & 0x80000000) ? SIGN_Negative : SIGN_Positive;
@@ -172,14 +172,14 @@
 
 
 /* Get a float from user memory */
-int FPU_load_single(float *single, FPU_REG *loaded_data)
+int FPU_load_single(float __user *single, FPU_REG *loaded_data)
 {
   unsigned m32;
   int exp, tag, negative;
 
   RE_ENTRANT_CHECK_OFF;
   FPU_verify_area(VERIFY_READ, single, 4);
-  FPU_get_user(m32, (unsigned long *) single);
+  FPU_get_user(m32, (unsigned long __user *) single);
   RE_ENTRANT_CHECK_ON;
 
   negative = (m32 & 0x80000000) ? SIGN_Negative : SIGN_Positive;
@@ -236,7 +236,7 @@
 
 
 /* Get a long long from user memory */
-int FPU_load_int64(long long *_s)
+int FPU_load_int64(long long __user *_s)
 {
   long long s;
   int sign;
@@ -268,7 +268,7 @@
 
 
 /* Get a long from user memory */
-int FPU_load_int32(long *_s, FPU_REG *loaded_data)
+int FPU_load_int32(long __user *_s, FPU_REG *loaded_data)
 {
   long s;
   int negative;
@@ -297,7 +297,7 @@
 
 
 /* Get a short from user memory */
-int FPU_load_int16(short *_s, FPU_REG *loaded_data)
+int FPU_load_int16(short __user *_s, FPU_REG *loaded_data)
 {
   int s, negative;
 
@@ -326,7 +326,7 @@
 
 
 /* Get a packed bcd array from user memory */
-int FPU_load_bcd(u_char *s)
+int FPU_load_bcd(u_char __user *s)
 {
   FPU_REG *st0_ptr = &st(0);
   int pos;
@@ -341,7 +341,7 @@
     {
       l *= 10;
       RE_ENTRANT_CHECK_OFF;
-      FPU_get_user(bcd, (u_char *) s+pos);
+      FPU_get_user(bcd, s+pos);
       RE_ENTRANT_CHECK_ON;
       l += bcd >> 4;
       l *= 10;
@@ -349,7 +349,7 @@
     }
  
   RE_ENTRANT_CHECK_OFF;
-  FPU_get_user(sign, (u_char *) s+9);
+  FPU_get_user(sign, s+9);
   sign = sign & 0x80 ? SIGN_Negative : SIGN_Positive;
   RE_ENTRANT_CHECK_ON;
 
@@ -369,7 +369,7 @@
 /*===========================================================================*/
 
 /* Put a long double into user memory */
-int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag, long double *d)
+int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag, long double __user *d)
 {
   /*
     The only exception raised by an attempt to store to an
@@ -382,9 +382,9 @@
       RE_ENTRANT_CHECK_OFF;
       FPU_verify_area(VERIFY_WRITE, d, 10);
 
-      FPU_put_user(st0_ptr->sigl, (unsigned long *) d);
-      FPU_put_user(st0_ptr->sigh, (unsigned long *) ((u_char *)d + 4));
-      FPU_put_user(exponent16(st0_ptr), (unsigned short *) ((u_char *)d + 8));
+      FPU_put_user(st0_ptr->sigl, (unsigned long __user *) d);
+      FPU_put_user(st0_ptr->sigh, (unsigned long __user *) ((u_char __user *)d + 4));
+      FPU_put_user(exponent16(st0_ptr), (unsigned short __user *) ((u_char __user *)d + 8));
       RE_ENTRANT_CHECK_ON;
 
       return 1;
@@ -398,9 +398,9 @@
       /* Put out the QNaN indefinite */
       RE_ENTRANT_CHECK_OFF;
       FPU_verify_area(VERIFY_WRITE,d,10);
-      FPU_put_user(0, (unsigned long *) d);
-      FPU_put_user(0xc0000000, 1 + (unsigned long *) d);
-      FPU_put_user(0xffff, 4 + (short *) d);
+      FPU_put_user(0, (unsigned long __user *) d);
+      FPU_put_user(0xc0000000, 1 + (unsigned long __user *) d);
+      FPU_put_user(0xffff, 4 + (short __user *) d);
       RE_ENTRANT_CHECK_ON;
       return 1;
     }
@@ -411,7 +411,7 @@
 
 
 /* Put a double into user memory */
-int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *dfloat)
+int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double __user *dfloat)
 {
   unsigned long l[2];
   unsigned long increment = 0;	/* avoid gcc warnings */
@@ -607,9 +607,9 @@
 	  /* The masked response */
 	  /* Put out the QNaN indefinite */
 	  RE_ENTRANT_CHECK_OFF;
-	  FPU_verify_area(VERIFY_WRITE,(void *)dfloat,8);
-	  FPU_put_user(0, (unsigned long *) dfloat);
-	  FPU_put_user(0xfff80000, 1 + (unsigned long *) dfloat);
+	  FPU_verify_area(VERIFY_WRITE,dfloat,8);
+	  FPU_put_user(0, (unsigned long __user *) dfloat);
+	  FPU_put_user(0xfff80000, 1 + (unsigned long __user *) dfloat);
 	  RE_ENTRANT_CHECK_ON;
 	  return 1;
 	}
@@ -620,9 +620,9 @@
     l[1] |= 0x80000000;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,(void *)dfloat,8);
-  FPU_put_user(l[0], (unsigned long *)dfloat);
-  FPU_put_user(l[1], 1 + (unsigned long *)dfloat);
+  FPU_verify_area(VERIFY_WRITE,dfloat,8);
+  FPU_put_user(l[0], (unsigned long __user *)dfloat);
+  FPU_put_user(l[1], 1 + (unsigned long __user *)dfloat);
   RE_ENTRANT_CHECK_ON;
 
   return 1;
@@ -630,7 +630,7 @@
 
 
 /* Put a float into user memory */
-int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float *single)
+int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float __user *single)
 {
   long templ = 0;
   unsigned long increment = 0;     	/* avoid gcc warnings */
@@ -826,8 +826,8 @@
 	  /* The masked response */
 	  /* Put out the QNaN indefinite */
 	  RE_ENTRANT_CHECK_OFF;
-	  FPU_verify_area(VERIFY_WRITE,(void *)single,4);
-	  FPU_put_user(0xffc00000, (unsigned long *) single);
+	  FPU_verify_area(VERIFY_WRITE,single,4);
+	  FPU_put_user(0xffc00000, (unsigned long __user *) single);
 	  RE_ENTRANT_CHECK_ON;
 	  return 1;
 	}
@@ -845,8 +845,8 @@
     templ |= 0x80000000;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,(void *)single,4);
-  FPU_put_user(templ,(unsigned long *) single);
+  FPU_verify_area(VERIFY_WRITE,single,4);
+  FPU_put_user(templ,(unsigned long __user *) single);
   RE_ENTRANT_CHECK_ON;
 
   return 1;
@@ -854,7 +854,7 @@
 
 
 /* Put a long long into user memory */
-int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long *d)
+int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long __user *d)
 {
   FPU_REG t;
   long long tll;
@@ -906,7 +906,7 @@
     }
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,(void *)d,8);
+  FPU_verify_area(VERIFY_WRITE,d,8);
   copy_to_user(d, &tll, 8);
   RE_ENTRANT_CHECK_ON;
 
@@ -915,7 +915,7 @@
 
 
 /* Put a long into user memory */
-int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long *d)
+int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long __user *d)
 {
   FPU_REG t;
   int precision_loss;
@@ -964,7 +964,7 @@
 
   RE_ENTRANT_CHECK_OFF;
   FPU_verify_area(VERIFY_WRITE,d,4);
-  FPU_put_user(t.sigl, (unsigned long *) d);
+  FPU_put_user(t.sigl, (unsigned long __user *) d);
   RE_ENTRANT_CHECK_ON;
 
   return 1;
@@ -972,7 +972,7 @@
 
 
 /* Put a short into user memory */
-int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short *d)
+int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short __user *d)
 {
   FPU_REG t;
   int precision_loss;
@@ -1021,7 +1021,7 @@
 
   RE_ENTRANT_CHECK_OFF;
   FPU_verify_area(VERIFY_WRITE,d,2);
-  FPU_put_user((short)t.sigl,(short *) d);
+  FPU_put_user((short)t.sigl, d);
   RE_ENTRANT_CHECK_ON;
 
   return 1;
@@ -1029,7 +1029,7 @@
 
 
 /* Put a packed bcd array into user memory */
-int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char *d)
+int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char __user *d)
 {
   FPU_REG t;
   unsigned long long ll;
@@ -1071,10 +1071,10 @@
 	  RE_ENTRANT_CHECK_OFF;
 	  FPU_verify_area(VERIFY_WRITE,d,10);
 	  for ( i = 0; i < 7; i++)
-	    FPU_put_user(0, (u_char *) d+i); /* These bytes "undefined" */
-	  FPU_put_user(0xc0, (u_char *) d+7); /* This byte "undefined" */
-	  FPU_put_user(0xff, (u_char *) d+8);
-	  FPU_put_user(0xff, (u_char *) d+9);
+	    FPU_put_user(0, d+i); /* These bytes "undefined" */
+	  FPU_put_user(0xc0, d+7); /* This byte "undefined" */
+	  FPU_put_user(0xff, d+8);
+	  FPU_put_user(0xff, d+9);
 	  RE_ENTRANT_CHECK_ON;
 	  return 1;
 	}
@@ -1095,11 +1095,11 @@
       b = FPU_div_small(&ll, 10);
       b |= (FPU_div_small(&ll, 10)) << 4;
       RE_ENTRANT_CHECK_OFF;
-      FPU_put_user(b,(u_char *) d+i);
+      FPU_put_user(b, d+i);
       RE_ENTRANT_CHECK_ON;
     }
   RE_ENTRANT_CHECK_OFF;
-  FPU_put_user(sign,(u_char *) d+9);
+  FPU_put_user(sign, d+9);
   RE_ENTRANT_CHECK_ON;
 
   return 1;
@@ -1175,7 +1175,7 @@
 
 /*===========================================================================*/
 
-u_char *fldenv(fpu_addr_modes addr_modes, u_char *s)
+u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user *s)
 {
   unsigned short tag_word = 0;
   u_char tag;
@@ -1187,13 +1187,13 @@
     {
       RE_ENTRANT_CHECK_OFF;
       FPU_verify_area(VERIFY_READ, s, 0x0e);
-      FPU_get_user(control_word, (unsigned short *) s);
-      FPU_get_user(partial_status, (unsigned short *) (s+2));
-      FPU_get_user(tag_word, (unsigned short *) (s+4));
-      FPU_get_user(instruction_address.offset, (unsigned short *) (s+6));
-      FPU_get_user(instruction_address.selector, (unsigned short *) (s+8));
-      FPU_get_user(operand_address.offset, (unsigned short *) (s+0x0a));
-      FPU_get_user(operand_address.selector, (unsigned short *) (s+0x0c));
+      FPU_get_user(control_word, (unsigned short __user *) s);
+      FPU_get_user(partial_status, (unsigned short __user *) (s+2));
+      FPU_get_user(tag_word, (unsigned short __user *) (s+4));
+      FPU_get_user(instruction_address.offset, (unsigned short __user *) (s+6));
+      FPU_get_user(instruction_address.selector, (unsigned short __user *) (s+8));
+      FPU_get_user(operand_address.offset, (unsigned short __user *) (s+0x0a));
+      FPU_get_user(operand_address.selector, (unsigned short __user *) (s+0x0c));
       RE_ENTRANT_CHECK_ON;
       s += 0x0e;
       if ( addr_modes.default_mode == VM86 )
@@ -1207,14 +1207,14 @@
     {
       RE_ENTRANT_CHECK_OFF;
       FPU_verify_area(VERIFY_READ, s, 0x1c);
-      FPU_get_user(control_word, (unsigned short *) s);
-      FPU_get_user(partial_status, (unsigned short *) (s+4));
-      FPU_get_user(tag_word, (unsigned short *) (s+8));
-      FPU_get_user(instruction_address.offset, (unsigned long *) (s+0x0c));
-      FPU_get_user(instruction_address.selector, (unsigned short *) (s+0x10));
-      FPU_get_user(instruction_address.opcode, (unsigned short *) (s+0x12));
-      FPU_get_user(operand_address.offset, (unsigned long *) (s+0x14));
-      FPU_get_user(operand_address.selector, (unsigned long *) (s+0x18));
+      FPU_get_user(control_word, (unsigned short __user *) s);
+      FPU_get_user(partial_status, (unsigned short __user *) (s+4));
+      FPU_get_user(tag_word, (unsigned short __user *) (s+8));
+      FPU_get_user(instruction_address.offset, (unsigned long __user *) (s+0x0c));
+      FPU_get_user(instruction_address.selector, (unsigned short __user *) (s+0x10));
+      FPU_get_user(instruction_address.opcode, (unsigned short __user *) (s+0x12));
+      FPU_get_user(operand_address.offset, (unsigned long __user *) (s+0x14));
+      FPU_get_user(operand_address.selector, (unsigned long __user *) (s+0x18));
       RE_ENTRANT_CHECK_ON;
       s += 0x1c;
     }
@@ -1266,10 +1266,10 @@
 }
 
 
-void frstor(fpu_addr_modes addr_modes, u_char *data_address)
+void frstor(fpu_addr_modes addr_modes, u_char __user *data_address)
 {
   int i, regnr;
-  u_char *s = fldenv(addr_modes, data_address);
+  u_char __user *s = fldenv(addr_modes, data_address);
   int offset = (top & 7) * 10, other = 80 - offset;
 
   /* Copy all registers in stack order. */
@@ -1291,7 +1291,7 @@
 }
 
 
-u_char *fstenv(fpu_addr_modes addr_modes, u_char *d)
+u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user *d)
 {
   if ( (addr_modes.default_mode == VM86) ||
       ((addr_modes.default_mode == PM16)
@@ -1300,25 +1300,25 @@
       RE_ENTRANT_CHECK_OFF;
       FPU_verify_area(VERIFY_WRITE,d,14);
 #ifdef PECULIAR_486
-      FPU_put_user(control_word & ~0xe080, (unsigned long *) d);
+      FPU_put_user(control_word & ~0xe080, (unsigned long __user *) d);
 #else
-      FPU_put_user(control_word, (unsigned short *) d);
+      FPU_put_user(control_word, (unsigned short __user *) d);
 #endif /* PECULIAR_486 */
-      FPU_put_user(status_word(), (unsigned short *) (d+2));
-      FPU_put_user(fpu_tag_word, (unsigned short *) (d+4));
-      FPU_put_user(instruction_address.offset, (unsigned short *) (d+6));
-      FPU_put_user(operand_address.offset, (unsigned short *) (d+0x0a));
+      FPU_put_user(status_word(), (unsigned short __user *) (d+2));
+      FPU_put_user(fpu_tag_word, (unsigned short __user *) (d+4));
+      FPU_put_user(instruction_address.offset, (unsigned short __user *) (d+6));
+      FPU_put_user(operand_address.offset, (unsigned short __user *) (d+0x0a));
       if ( addr_modes.default_mode == VM86 )
 	{
 	  FPU_put_user((instruction_address.offset & 0xf0000) >> 4,
-		      (unsigned short *) (d+8));
+		      (unsigned short __user *) (d+8));
 	  FPU_put_user((operand_address.offset & 0xf0000) >> 4,
-		      (unsigned short *) (d+0x0c));
+		      (unsigned short __user *) (d+0x0c));
 	}
       else
 	{
-	  FPU_put_user(instruction_address.selector, (unsigned short *) (d+8));
-	  FPU_put_user(operand_address.selector, (unsigned short *) (d+0x0c));
+	  FPU_put_user(instruction_address.selector, (unsigned short __user *) (d+8));
+	  FPU_put_user(operand_address.selector, (unsigned short __user *) (d+0x0c));
 	}
       RE_ENTRANT_CHECK_ON;
       d += 0x0e;
@@ -1348,9 +1348,9 @@
 }
 
 
-void fsave(fpu_addr_modes addr_modes, u_char *data_address)
+void fsave(fpu_addr_modes addr_modes, u_char __user *data_address)
 {
-  u_char *d;
+  u_char __user *d;
   int offset = (top & 7) * 10, other = 80 - offset;
 
   d = fstenv(addr_modes, data_address);
--- diff/arch/i386/mm/Makefile	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/mm/Makefile	2004-07-01 21:32:31.000000000 +0100
@@ -2,7 +2,7 @@
 # Makefile for the linux i386-specific parts of the memory manager.
 #
 
-obj-y	:= init.o pgtable.o fault.o ioremap.o extable.o pageattr.o 
+obj-y	:= init.o pgtable.o fault.o ioremap.o extable.o pageattr.o mmap.o
 
 obj-$(CONFIG_DISCONTIGMEM)	+= discontig.o
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
--- diff/arch/i386/mm/discontig.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/mm/discontig.c	2004-07-01 21:32:31.000000000 +0100
@@ -129,8 +129,11 @@
 }
 
 /* 
- * Allocate memory for the pg_data_t via a crude pre-bootmem method
- * We ought to relocate these onto their own node later on during boot.
+ * Allocate memory for the pg_data_t for this node via a crude pre-bootmem
+ * method.  For node zero take this from the bottom of memory, for
+ * subsequent nodes place them at node_remap_start_vaddr which contains
+ * node local data in physically node local memory.  See setup_memory()
+ * for details.
  */
 static void __init allocate_pgdat(int nid)
 {
@@ -233,6 +236,13 @@
 	unsigned long bootmap_size, system_start_pfn, system_max_low_pfn;
 	unsigned long reserve_pages;
 
+	/*
+	 * When mapping a NUMA machine we allocate the node_mem_map arrays
+	 * from node local memory.  They are then mapped directly into KVA
+	 * between zone normal and vmalloc space.  Calculate the size of
+	 * this space and use it to adjust the boundry between ZONE_NORMAL
+	 * and ZONE_HIGHMEM.
+	 */
 	get_memcfg_numa();
 	reserve_pages = calculate_numa_remap_pages();
 
@@ -240,7 +250,10 @@
 	system_start_pfn = min_low_pfn = PFN_UP(init_pg_tables_end);
 
 	find_max_pfn();
-	system_max_low_pfn = max_low_pfn = find_max_low_pfn();
+	system_max_low_pfn = max_low_pfn = find_max_low_pfn() - reserve_pages;
+	printk("reserve_pages = %ld find_max_low_pfn() ~ %ld\n",
+			reserve_pages, max_low_pfn + reserve_pages);
+	printk("max_pfn = %ld\n", max_pfn);
 #ifdef CONFIG_HIGHMEM
 	highstart_pfn = highend_pfn = max_pfn;
 	if (max_pfn > system_max_low_pfn)
@@ -248,7 +261,6 @@
 	printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
 	       pages_to_mb(highend_pfn - highstart_pfn));
 #endif
-	system_max_low_pfn = max_low_pfn = max_low_pfn - reserve_pages;
 	printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
 			pages_to_mb(system_max_low_pfn));
 	printk("min_low_pfn = %ld, max_low_pfn = %ld, highstart_pfn = %ld\n", 
@@ -258,15 +270,16 @@
 			(ulong) pfn_to_kaddr(max_low_pfn));
 	for (nid = 0; nid < numnodes; nid++) {
 		node_remap_start_vaddr[nid] = pfn_to_kaddr(
-			highstart_pfn - node_remap_offset[nid]);
+			(highstart_pfn + reserve_pages) - node_remap_offset[nid]);
 		allocate_pgdat(nid);
 		printk ("node %d will remap to vaddr %08lx - %08lx\n", nid,
 			(ulong) node_remap_start_vaddr[nid],
-			(ulong) pfn_to_kaddr(highstart_pfn
+			(ulong) pfn_to_kaddr(highstart_pfn + reserve_pages
 			    - node_remap_offset[nid] + node_remap_size[nid]));
 	}
 	printk("High memory starts at vaddr %08lx\n",
 			(ulong) pfn_to_kaddr(highstart_pfn));
+	vmalloc_earlyreserve = reserve_pages * PAGE_SIZE;
 	for (nid = 0; nid < numnodes; nid++)
 		find_max_pfn_node(nid);
 
--- diff/arch/i386/mm/fault.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/mm/fault.c	2004-07-01 21:32:31.000000000 +0100
@@ -24,7 +24,6 @@
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/hardirq.h>
 #include <asm/desc.h>
 
@@ -262,7 +261,27 @@
 	if (in_atomic() || !mm)
 		goto bad_area_nosemaphore;
 
-	down_read(&mm->mmap_sem);
+	/* When running in the kernel we expect faults to occur only to
+	 * addresses in user space.  All other faults represent errors in the
+	 * kernel and should generate an OOPS.  Unfortunatly, in the case of an
+	 * erroneous fault occuring in a code path which already holds mmap_sem
+	 * we will deadlock attempting to validate the fault against the
+	 * address space.  Luckily the kernel only validly references user
+	 * space from well defined areas of code, which are listed in the
+	 * exceptions table.
+	 *
+	 * As the vast majority of faults will be valid we will only perform
+	 * the source reference check when there is a possibilty of a deadlock.
+	 * Attempt to lock the address space, if we cannot we then validate the
+	 * source.  If this is invalid we can skip the address space check,
+	 * thus avoiding the deadlock.
+	 */
+	if (!down_read_trylock(&mm->mmap_sem)) {
+		if ((error_code & 4) == 0 &&
+		    !search_exception_tables(regs->eip))
+			goto bad_area_nosemaphore;
+		down_read(&mm->mmap_sem);
+	}
 
 	vma = find_vma(mm, address);
 	if (!vma)
@@ -403,9 +422,30 @@
  * Oops. The kernel tried to access some bad page. We'll have to
  * terminate things with extreme prejudice.
  */
+#ifdef CONFIG_KGDB
+        if (!user_mode(regs)){
+                kgdb_handle_exception(14,SIGBUS, error_code, regs);
+                return;
+        }
+#endif
 
 	bust_spinlocks(1);
 
+#ifdef CONFIG_X86_PAE
+	{
+		pgd_t *pgd;
+		pmd_t *pmd;
+
+
+
+		pgd = init_mm.pgd + pgd_index(address);
+		if (pgd_present(*pgd)) {
+			pmd = pmd_offset(pgd, address);
+			if (pmd_val(*pmd) & _PAGE_NX)
+				printk(KERN_CRIT "kernel tried to access NX-protected page - exploit attempt? (uid: %d)\n", current->uid);
+		}
+	}
+#endif
 	if (address < PAGE_SIZE)
 		printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
 	else
--- diff/arch/i386/mm/hugetlbpage.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/mm/hugetlbpage.c	2004-07-01 21:32:31.000000000 +0100
@@ -15,7 +15,6 @@
 #include <linux/err.h>
 #include <linux/sysctl.h>
 #include <asm/mman.h>
-#include <asm/pgalloc.h>
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
 
@@ -147,9 +146,6 @@
 	struct page *page;
 	struct vm_area_struct *vma;
 
-	if (! mm->used_hugetlb)
-		return ERR_PTR(-EINVAL);
-
 	vma = find_vma(mm, addr);
 	if (!vma || !is_vm_hugetlb_page(vma))
 		return ERR_PTR(-EINVAL);
@@ -245,8 +241,15 @@
 			ret = -ENOMEM;
 			goto out;
 		}
-		if (!pte_none(*pte))
-			continue;
+
+		if (!pte_none(*pte)) {
+			pmd_t *pmd = (pmd_t *) pte;
+
+			page = pmd_page(*pmd);
+			pmd_clear(pmd);
+			dec_page_state(nr_page_table_pages);
+			page_cache_release(page);
+		}
 
 		idx = ((addr - vma->vm_start) >> HPAGE_SHIFT)
 			+ (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));
--- diff/arch/i386/mm/init.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/mm/init.c	2004-07-01 21:32:31.000000000 +0100
@@ -32,7 +32,6 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
-#include <asm/pgalloc.h>
 #include <asm/dma.h>
 #include <asm/fixmap.h>
 #include <asm/e820.h>
@@ -123,6 +122,13 @@
 	}
 }
 
+static inline int is_kernel_text(unsigned long addr)
+{
+	if (addr >= (unsigned long)_stext && addr <= (unsigned long)__init_end)
+		return 1;
+	return 0;
+}
+
 /*
  * This maps the physical memory to kernel virtual address space, a total 
  * of max_low_pfn pages, by creating page tables starting from address 
@@ -145,18 +151,29 @@
 		if (pfn >= max_low_pfn)
 			continue;
 		for (pmd_idx = 0; pmd_idx < PTRS_PER_PMD && pfn < max_low_pfn; pmd++, pmd_idx++) {
+			unsigned int address = pfn * PAGE_SIZE + PAGE_OFFSET;
+
 			/* Map with big pages if possible, otherwise create normal page tables. */
 			if (cpu_has_pse) {
-				set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE));
+				unsigned int address2 = (pfn + PTRS_PER_PTE - 1) * PAGE_SIZE + PAGE_OFFSET + PAGE_SIZE-1;
+
+				if (is_kernel_text(address) || is_kernel_text(address2))
+					set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE_EXEC));
+				else
+					set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE));
 				pfn += PTRS_PER_PTE;
 			} else {
 				pte = one_page_table_init(pmd);
 
-				for (pte_ofs = 0; pte_ofs < PTRS_PER_PTE && pfn < max_low_pfn; pte++, pfn++, pte_ofs++)
-					set_pte(pte, pfn_pte(pfn, PAGE_KERNEL));
+				for (pte_ofs = 0; pte_ofs < PTRS_PER_PTE && pfn < max_low_pfn; pte++, pfn++, pte_ofs++) {
+						if (is_kernel_text(address))
+							set_pte(pte, pfn_pte(pfn, PAGE_KERNEL_EXEC));
+						else
+							set_pte(pte, pfn_pte(pfn, PAGE_KERNEL));
+				}
 			}
 		}
-	}	
+	}
 }
 
 static inline int page_kills_ppro(unsigned long pagenr)
@@ -273,7 +290,8 @@
 #define set_highmem_pages_init(bad_ppro) do { } while (0)
 #endif /* CONFIG_HIGHMEM */
 
-unsigned long __PAGE_KERNEL = _PAGE_KERNEL;
+unsigned long long __PAGE_KERNEL = _PAGE_KERNEL;
+unsigned long long __PAGE_KERNEL_EXEC = _PAGE_KERNEL_EXEC;
 
 #ifndef CONFIG_DISCONTIGMEM
 #define remap_numa_kva() do {} while (0)
@@ -302,6 +320,7 @@
 	if (cpu_has_pge) {
 		set_in_cr4(X86_CR4_PGE);
 		__PAGE_KERNEL |= _PAGE_GLOBAL;
+		__PAGE_KERNEL_EXEC |= _PAGE_GLOBAL;
 	}
 
 	kernel_physical_mapping_init(pgd_base);
@@ -392,6 +411,52 @@
 extern void zone_sizes_init(void);
 #endif /* !CONFIG_DISCONTIGMEM */
 
+static int disable_nx __initdata = 0;
+u64 __supported_pte_mask = ~_PAGE_NX;
+
+/*
+ * noexec = on|off
+ *
+ * Control non executable mappings.
+ *
+ * on      Enable
+ * off     Disable
+ */
+static int __init noexec_setup(char *str)
+{
+	if (!strncmp(str, "on",2) && cpu_has_nx) {
+		__supported_pte_mask |= _PAGE_NX;
+		disable_nx = 0;
+	} else if (!strncmp(str,"off",3)) {
+		disable_nx = 1;
+		__supported_pte_mask &= ~_PAGE_NX;
+	}
+	return 1;
+}
+
+__setup("noexec=", noexec_setup);
+
+#ifdef CONFIG_X86_PAE
+static int use_nx = 0;
+
+static void __init set_nx(void)
+{
+	unsigned int v[4], l, h;
+
+	if (cpu_has_pae && (cpuid_eax(0x80000000) > 0x80000001)) {
+		cpuid(0x80000001, &v[0], &v[1], &v[2], &v[3]);
+		if ((v[3] & (1 << 20)) && !disable_nx) {
+			rdmsr(MSR_EFER, l, h);
+			l |= EFER_NX;
+			wrmsr(MSR_EFER, l, h);
+			use_nx = 1;
+			__supported_pte_mask |= _PAGE_NX;
+		}
+	}
+}
+
+#endif
+
 /*
  * paging_init() sets up the page tables - note that the first 8MB are
  * already mapped by head.S.
@@ -401,6 +466,12 @@
  */
 void __init paging_init(void)
 {
+#ifdef CONFIG_X86_PAE
+	set_nx();
+	if (use_nx)
+		printk("NX (Execute Disable) protection: active\n");
+#endif
+
 	pagetable_init();
 
 	load_cr3(swapper_pg_dir);
--- diff/arch/i386/mm/ioremap.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/mm/ioremap.c	2004-07-01 21:32:31.000000000 +0100
@@ -12,7 +12,6 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <asm/io.h>
-#include <asm/pgalloc.h>
 #include <asm/fixmap.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
--- diff/arch/i386/mm/pgtable.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/mm/pgtable.c	2004-07-01 21:32:31.000000000 +0100
@@ -33,7 +33,7 @@
 
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	for_each_pgdat(pgdat) {
 		for (i = 0; i < pgdat->node_spanned_pages; ++i) {
 			page = pgdat->node_mem_map + i;
--- diff/arch/i386/pci/acpi.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/pci/acpi.c	2004-07-01 21:32:31.000000000 +0100
@@ -1,6 +1,8 @@
 #include <linux/pci.h>
 #include <linux/acpi.h>
 #include <linux/init.h>
+#include <linux/irq.h>
+#include <asm/hw_irq.h>
 #include "pci.h"
 
 struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum)
@@ -15,18 +17,31 @@
 
 static int __init pci_acpi_init(void)
 {
+	struct pci_dev *dev = NULL;
+
 	if (pcibios_scanned)
 		return 0;
 
-	if (!acpi_noirq) {
-		if (!acpi_pci_irq_init()) {
-			printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
-			pcibios_scanned++;
-			pcibios_enable_irq = acpi_pci_irq_enable;
-		} else
-			printk(KERN_WARNING "PCI: Invalid ACPI-PCI IRQ routing table\n");
+	if (acpi_noirq)
+		return 0;
 
-	}
+	printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
+	acpi_irq_penalty_init();
+	pcibios_scanned++;
+	pcibios_enable_irq = acpi_pci_irq_enable;
+
+	/*
+	 * PCI IRQ routing is set up by pci_enable_device(), but we
+	 * also do it here in case there are still broken drivers that
+	 * don't use pci_enable_device().
+	 */
+	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
+		acpi_pci_irq_enable(dev);
+
+#ifdef CONFIG_X86_IO_APIC
+	if (acpi_ioapic)
+		print_IO_APIC();
+#endif
 
 	return 0;
 }
--- diff/arch/i386/pci/irq.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/pci/irq.c	2004-07-01 21:32:31.000000000 +0100
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/dmi.h>
 #include <asm/io.h>
 #include <asm/smp.h>
 #include <asm/io_apic.h>
@@ -22,7 +23,8 @@
 #define PIRQ_SIGNATURE	(('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
 #define PIRQ_VERSION 0x0100
 
-int broken_hp_bios_irq9;
+static int broken_hp_bios_irq9;
+static int acer_tm360_irqrouting;
 
 static struct irq_routing_table *pirq_table;
 
@@ -745,6 +747,14 @@
 		r->set(pirq_router_dev, dev, pirq, 11);
 	}
 
+	/* same for Acer Travelmate 360, but with CB and irq 11 -> 10 */
+	if (acer_tm360_irqrouting && dev->irq == 11 && dev->vendor == PCI_VENDOR_ID_O2) {
+		pirq = 0x68;
+		mask = 0x400;
+		dev->irq = r->get(pirq_router_dev, dev, pirq);
+		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+	}
+
 	/*
 	 * Find the best IRQ to assign: use the one
 	 * reported by the device if possible.
@@ -893,6 +903,54 @@
 	}
 }
 
+/*
+ * Work around broken HP Pavilion Notebooks which assign USB to
+ * IRQ 9 even though it is actually wired to IRQ 11
+ */
+static int __init fix_broken_hp_bios_irq9(struct dmi_system_id *d)
+{
+	if (!broken_hp_bios_irq9) {
+		broken_hp_bios_irq9 = 1;
+		printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
+	}
+	return 0;
+}
+
+/*
+ * Work around broken Acer TravelMate 360 Notebooks which assign
+ * Cardbus to IRQ 11 even though it is actually wired to IRQ 10
+ */
+static int __init fix_acer_tm360_irqrouting(struct dmi_system_id *d)
+{
+	if (!acer_tm360_irqrouting) {
+		acer_tm360_irqrouting = 1;
+		printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
+	}
+	return 0;
+}
+
+static struct dmi_system_id __initdata pciirq_dmi_table[] = {
+	{
+		.callback = fix_broken_hp_bios_irq9,
+		.ident = "HP Pavilion N5400 Series Laptop",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			DMI_MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
+			DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
+		},
+	},
+	{
+		.callback = fix_acer_tm360_irqrouting,
+		.ident = "Acer TravelMate 36x Laptop",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+		},
+	},
+	{ }
+};
+
 static int __init pcibios_irq_init(void)
 {
 	DBG("PCI: IRQ init\n");
@@ -900,6 +958,8 @@
 	if (pcibios_enable_irq || raw_pci_ops == NULL)
 		return 0;
 
+	dmi_check_system(pciirq_dmi_table);
+
 	pirq_table = pirq_find_routing_table();
 
 #ifdef CONFIG_PCI_BIOS
@@ -1000,7 +1060,7 @@
 	/* VIA bridges use interrupt line for apic/pci steering across
 	   the V-Link */
 	else if (interrupt_line_quirk)
-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq & 15);
 	return 0;
 }
 
--- diff/arch/i386/pci/visws.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/pci/visws.c	2004-07-01 21:32:31.000000000 +0100
@@ -15,8 +15,6 @@
 #include "pci.h"
 
 
-int broken_hp_bios_irq9;
-
 extern struct pci_raw_ops pci_direct_conf1;
 
 static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; }
--- diff/arch/i386/power/cpu.c	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/i386/power/cpu.c	2004-07-01 21:32:31.000000000 +0100
@@ -27,7 +27,6 @@
 #include <asm/tlbflush.h>
 
 static struct saved_context saved_context;
-static void fix_processor_context(void);
 
 unsigned long saved_context_eax, saved_context_ebx;
 unsigned long saved_context_ecx, saved_context_edx;
@@ -37,33 +36,38 @@
 
 extern void enable_sep_cpu(void *);
 
-void save_processor_state(void)
+void __save_processor_state(struct saved_context *ctxt)
 {
 	kernel_fpu_begin();
 
 	/*
 	 * descriptor tables
 	 */
-	asm volatile ("sgdt %0" : "=m" (saved_context.gdt_limit));
-	asm volatile ("sidt %0" : "=m" (saved_context.idt_limit));
-	asm volatile ("sldt %0" : "=m" (saved_context.ldt));
-	asm volatile ("str %0"  : "=m" (saved_context.tr));
+	asm volatile ("sgdt %0" : "=m" (ctxt->gdt_limit));
+	asm volatile ("sidt %0" : "=m" (ctxt->idt_limit));
+	asm volatile ("sldt %0" : "=m" (ctxt->ldt));
+	asm volatile ("str %0"  : "=m" (ctxt->tr));
 
 	/*
 	 * segment registers
 	 */
-	asm volatile ("movw %%es, %0" : "=m" (saved_context.es));
-	asm volatile ("movw %%fs, %0" : "=m" (saved_context.fs));
-	asm volatile ("movw %%gs, %0" : "=m" (saved_context.gs));
-	asm volatile ("movw %%ss, %0" : "=m" (saved_context.ss));
+	asm volatile ("movw %%es, %0" : "=m" (ctxt->es));
+	asm volatile ("movw %%fs, %0" : "=m" (ctxt->fs));
+	asm volatile ("movw %%gs, %0" : "=m" (ctxt->gs));
+	asm volatile ("movw %%ss, %0" : "=m" (ctxt->ss));
 
 	/*
 	 * control registers 
 	 */
-	asm volatile ("movl %%cr0, %0" : "=r" (saved_context.cr0));
-	asm volatile ("movl %%cr2, %0" : "=r" (saved_context.cr2));
-	asm volatile ("movl %%cr3, %0" : "=r" (saved_context.cr3));
-	asm volatile ("movl %%cr4, %0" : "=r" (saved_context.cr4));
+	asm volatile ("movl %%cr0, %0" : "=r" (ctxt->cr0));
+	asm volatile ("movl %%cr2, %0" : "=r" (ctxt->cr2));
+	asm volatile ("movl %%cr3, %0" : "=r" (ctxt->cr3));
+	asm volatile ("movl %%cr4, %0" : "=r" (ctxt->cr4));
+}
+
+void save_processor_state(void)
+{
+	__save_processor_state(&saved_context);
 }
 
 static void
@@ -75,32 +79,59 @@
 	mxcsr_feature_mask_init();
 }
 
-void restore_processor_state(void)
+
+static void fix_processor_context(void)
+{
+	int cpu = smp_processor_id();
+	struct tss_struct * t = init_tss + cpu;
+
+	set_tss_desc(cpu,t);	/* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */
+        cpu_gdt_table[cpu][GDT_ENTRY_TSS].b &= 0xfffffdff;
+
+	load_TR_desc();				/* This does ltr */
+	load_LDT(&current->active_mm->context);	/* This does lldt */
+
+	/*
+	 * Now maybe reload the debug registers
+	 */
+	if (current->thread.debugreg[7]){
+                loaddebug(&current->thread, 0);
+                loaddebug(&current->thread, 1);
+                loaddebug(&current->thread, 2);
+                loaddebug(&current->thread, 3);
+                /* no 4 and 5 */
+                loaddebug(&current->thread, 6);
+                loaddebug(&current->thread, 7);
+	}
+
+}
+
+void __restore_processor_state(struct saved_context *ctxt)
 {
 
 	/*
 	 * control registers
 	 */
-	asm volatile ("movl %0, %%cr4" :: "r" (saved_context.cr4));
-	asm volatile ("movl %0, %%cr3" :: "r" (saved_context.cr3));
-	asm volatile ("movl %0, %%cr2" :: "r" (saved_context.cr2));
-	asm volatile ("movl %0, %%cr0" :: "r" (saved_context.cr0));
+	asm volatile ("movl %0, %%cr4" :: "r" (ctxt->cr4));
+	asm volatile ("movl %0, %%cr3" :: "r" (ctxt->cr3));
+	asm volatile ("movl %0, %%cr2" :: "r" (ctxt->cr2));
+	asm volatile ("movl %0, %%cr0" :: "r" (ctxt->cr0));
 
 	/*
 	 * segment registers
 	 */
-	asm volatile ("movw %0, %%es" :: "r" (saved_context.es));
-	asm volatile ("movw %0, %%fs" :: "r" (saved_context.fs));
-	asm volatile ("movw %0, %%gs" :: "r" (saved_context.gs));
-	asm volatile ("movw %0, %%ss" :: "r" (saved_context.ss));
+	asm volatile ("movw %0, %%es" :: "r" (ctxt->es));
+	asm volatile ("movw %0, %%fs" :: "r" (ctxt->fs));
+	asm volatile ("movw %0, %%gs" :: "r" (ctxt->gs));
+	asm volatile ("movw %0, %%ss" :: "r" (ctxt->ss));
 
 	/*
 	 * now restore the descriptor tables to their proper values
 	 * ltr is done i fix_processor_context().
 	 */
-	asm volatile ("lgdt %0" :: "m" (saved_context.gdt_limit));
-	asm volatile ("lidt %0" :: "m" (saved_context.idt_limit));
-	asm volatile ("lldt %0" :: "m" (saved_context.ldt));
+	asm volatile ("lgdt %0" :: "m" (ctxt->gdt_limit));
+	asm volatile ("lidt %0" :: "m" (ctxt->idt_limit));
+	asm volatile ("lldt %0" :: "m" (ctxt->ldt));
 
 	/*
 	 * sysenter MSRs
@@ -112,31 +143,11 @@
 	do_fpu_end();
 }
 
-static void fix_processor_context(void)
+void restore_processor_state(void)
 {
-	int cpu = smp_processor_id();
-	struct tss_struct * t = init_tss + cpu;
-
-	set_tss_desc(cpu,t);	/* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */
-        cpu_gdt_table[cpu][GDT_ENTRY_TSS].b &= 0xfffffdff;
-
-	load_TR_desc();				/* This does ltr */
-	load_LDT(&current->active_mm->context);	/* This does lldt */
-
-	/*
-	 * Now maybe reload the debug registers
-	 */
-	if (current->thread.debugreg[7]){
-                loaddebug(&current->thread, 0);
-                loaddebug(&current->thread, 1);
-                loaddebug(&current->thread, 2);
-                loaddebug(&current->thread, 3);
-                /* no 4 and 5 */
-                loaddebug(&current->thread, 6);
-                loaddebug(&current->thread, 7);
-	}
-
+	__restore_processor_state(&saved_context);
 }
 
+
 EXPORT_SYMBOL(save_processor_state);
 EXPORT_SYMBOL(restore_processor_state);
--- diff/arch/i386/power/swsusp.S	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/power/swsusp.S	2004-07-01 21:32:31.000000000 +0100
@@ -18,7 +18,7 @@
 ENTRY(do_magic)
 	pushl %ebx
 	cmpl $0,8(%esp)
-	jne .L1450
+	jne resume
 	call do_magic_suspend_1
 	call save_processor_state
 
@@ -33,21 +33,21 @@
 	pushfl ; popl saved_context_eflags
 
 	call do_magic_suspend_2
-	jmp .L1449
-	.p2align 4,,7
-.L1450:
+	popl %ebx
+	ret
+
+resume:
 	movl $swsusp_pg_dir-__PAGE_OFFSET,%ecx
 	movl %ecx,%cr3
 
 	call do_magic_resume_1
 	movl $0,loop
 	cmpl $0,nr_copy_pages
-	je .L1453
-	.p2align 4,,7
-.L1455:
+	je copy_done
+copy_loop:
 	movl $0,loop2
 	.p2align 4,,7
-.L1459:
+copy_one_page:
 	movl pagedir_nosave,%ecx
 	movl loop,%eax
 	movl loop2,%edx
@@ -56,23 +56,21 @@
 	movl (%ecx,%eax),%eax
 	movb (%edx,%eax),%al
 	movb %al,(%edx,%ebx)
-	movl %cr3, %eax;              
-	movl %eax, %cr3;  # flush TLB 
 
 	movl loop2,%eax
 	leal 1(%eax),%edx
 	movl %edx,loop2
 	movl %edx,%eax
 	cmpl $4095,%eax
-	jbe .L1459
+	jbe copy_one_page
 	movl loop,%eax
 	leal 1(%eax),%edx
 	movl %edx,loop
 	movl %edx,%eax
 	cmpl nr_copy_pages,%eax
-	jb .L1455
-	.p2align 4,,7
-.L1453:
+	jb copy_loop
+
+copy_done:
 	movl $__USER_DS,%eax
 
 	movw %ax, %ds
@@ -88,7 +86,6 @@
 	call restore_processor_state
 	pushl saved_context_eflags ; popfl
 	call do_magic_resume_2
-.L1449:
 	popl %ebx
 	ret
 
--- diff/arch/ia64/Kconfig	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/ia64/Kconfig	2004-07-01 21:32:31.000000000 +0100
@@ -149,20 +149,6 @@
 	default "6" if ITANIUM
 
 # align cache-sensitive data to 64 bytes
-config MCKINLEY_ASTEP_SPECIFIC
-	bool "McKinley A-step specific code"
-	depends on MCKINLEY
-	help
-	  Select this option to build a kernel for an IA-64 McKinley prototype
-	  system with any A-stepping CPU.
-
-config MCKINLEY_A0_SPECIFIC
-	bool "McKinley A0/A1-step specific code"
-	depends on MCKINLEY_ASTEP_SPECIFIC
-	help
-	  Select this option to build a kernel for an IA-64 McKinley prototype
-	  system with an A0 or A1 stepping CPU.
-
 config NUMA
 	bool "NUMA support"
 	depends on !IA64_HP_SIM
@@ -192,6 +178,184 @@
 	  or have huge holes in the physical address space for other reasons.
 	  See <file:Documentation/vm/numa> for more.
 
+config KGDB
+	bool "Include kgdb kernel debugger"
+	depends on DEBUG_KERNEL
+	help
+	  If you say Y here, the system will be compiled with the debug
+	  option (-g) and a debugging stub will be included in the
+	  kernel.  This stub communicates with gdb on another (host)
+	  computer via a serial port.  The host computer should have
+	  access to the kernel binary file (vmlinux) and a serial port
+	  that is connected to the target machine.  Gdb can be made to
+	  configure the serial port or you can use stty and setserial to
+	  do this. See the 'target' command in gdb. This option also
+	  configures in the ability to request a breakpoint early in the
+	  boot process.  To request the breakpoint just include 'kgdb'
+	  as a boot option when booting the target machine.  The system
+	  will then break as soon as it looks at the boot options.  This
+	  option also installs a breakpoint in panic and sends any
+	  kernel faults to the debugger. For more information see the
+	  Documentation/i386/kgdb/kgdb.txt file.
+
+config	KGDB_EARLY
+	bool
+	depends on KGDB
+	default n
+	prompt "KGDB Early"
+	help
+	  Kgdb debugging in kernel can start shortly before/after setup_arch routine exits.
+
+choice
+	depends on KGDB
+    	prompt "Debug serial port BAUD"
+	default KGDB_115200BAUD
+	help
+	  Gdb and the kernel stub need to agree on the baud rate to be
+	  used.  Some systems (x86 family at this writing) allow this to
+	  be configured.
+
+config KGDB_9600BAUD
+	bool "9600"
+
+config KGDB_19200BAUD
+	bool "19200"
+
+config KGDB_38400BAUD
+	bool "38400"
+
+config KGDB_57600BAUD
+	bool "57600"
+
+config KGDB_115200BAUD
+	bool "115200"
+endchoice
+
+config KGDB_IOMEM
+	hex "hex I/O port IOMEM address"
+	depends on KGDB
+	default	0xc0000000ff5e0000
+	help
+	  Some systems use IOMEM address for the port.  This value is from
+	  the rx2600 chassis console port.
+
+config KGDB_IOMEM_REG_SHIFT
+	hex "hex I/O port IOMEM reg shift"
+	depends on KGDB
+	default 0x0
+	help
+	  This is the memory shift for IOMEM.
+
+config KGDB_IRQ
+	int "IRQ of the debug serial port"
+	depends on KGDB
+	default 59
+	help
+	  This is the irq for the debug port.  If everything is working
+	  correctly and the kernel has interrupts on a control C to the
+	  port should cause a break into the kernel debug stub. This value
+	  is the rx2600 chassis's console port.
+
+config DEBUG_INFO
+	bool
+	depends on KGDB
+	default y
+
+config KGDB_MORE
+	bool "Add any additional compile options"
+	depends on KGDB
+	default n
+	help
+	  Saying yes here turns on the ability to enter additional
+	  compile options.
+
+
+config KGDB_OPTIONS
+	depends on KGDB_MORE
+	string "Additional compile arguments"
+	default "-O1"
+	help
+	  This option allows you enter additional compile options for
+	  the whole kernel compile.  Each platform will have a default
+	  that seems right for it.  For example on PPC "-ggdb -O1", and
+	  for i386 "-O1".  Note that by configuring KGDB "-g" is already
+	  turned on.  In addition, on i386 platforms
+	  "-fomit-frame-pointer" is deleted from the standard compile
+	  options.
+
+config NO_KGDB_CPUS
+	int "Number of CPUs"
+	depends on KGDB && SMP
+	default NR_CPUS
+	help
+
+	  This option sets the number of cpus for kgdb ONLY.  It is used
+	  to prune some internal structures so they look "nice" when
+	  displayed with gdb.  This is to overcome possibly larger
+	  numbers that may have been entered above.  Enter the real
+	  number to get nice clean kgdb_info displays.
+
+config KGDB_TS
+	bool "Enable kgdb time stamp macros?"
+	depends on KGDB
+	default n
+	help
+	  Kgdb event macros allow you to instrument your code with calls
+	  to the kgdb event recording function.  The event log may be
+	  examined with gdb at a break point.  Turning on this
+	  capability also allows you to choose how many events to
+	  keep. Kgdb always keeps the lastest events.
+
+choice
+	depends on KGDB_TS
+	prompt "Max number of time stamps to save?"
+	default KGDB_TS_128
+
+config KGDB_TS_64
+	bool "64"
+
+config KGDB_TS_128
+	bool "128"
+
+config KGDB_TS_256
+	bool "256"
+
+config KGDB_TS_512
+	bool "512"
+
+config KGDB_TS_1024
+	bool "1024"
+
+endchoice
+
+config KGDB_CONSOLE
+	bool "Enable serial console thru kgdb port"
+	depends on KGDB
+	default n
+	help
+	  This option enables the command line "console=kgdb" option.
+	  When the system is booted with this option in the command line
+	  all kernel printk output is sent to gdb (as well as to other
+	  consoles).  For this to work gdb must be connected.  For this
+	  reason, this command line option will generate a breakpoint if
+	  gdb has not yet connected.  After the gdb continue command is
+	  given all pent up console output will be printed by gdb on the
+	  host machine.  Neither this option, nor KGDB require the
+	  serial driver to be configured.
+
+config KGDB_SYSRQ
+	bool "Turn on SysRq 'G' command to do a break?"
+	depends on KGDB
+	default y
+	help
+	  This option includes an option in the SysRq code that allows
+	  you to enter SysRq G which generates a breakpoint to the KGDB
+	  stub.  This will work if the keyboard is alive and can
+	  interrupt the system.  Because of constraints on when the
+	  serial port interrupt can be enabled, this code may allow you
+	  to interrupt the system before the serial port control C is
+	  available.  Just say yes here.
+
 config IA64_CYCLONE
 	bool "Support Cyclone(EXA) Time Source"
 	help
@@ -494,6 +658,13 @@
 	  Say Y here only if you plan to use gdb to debug the kernel.
 	  If you don't debug the kernel, you can say N.
 
+config LOCKMETER
+       bool "Kernel lock metering"
+       depends on SMP
+       help
+         Say Y to enable kernel lock metering, which adds overhead to SMP locks,
+         but allows you to see various statistics using the lockstat command.
+
 config SYSVIPC_COMPAT
 	bool
 	depends on COMPAT && SYSVIPC
--- diff/arch/ia64/configs/sn2_defconfig	2004-05-19 22:11:02.000000000 +0100
+++ source/arch/ia64/configs/sn2_defconfig	2004-07-01 21:32:31.000000000 +0100
@@ -14,18 +14,22 @@
 #
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
 CONFIG_LOG_BUF_SHIFT=20
 CONFIG_HOTPLUG=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_IOSCHED_NOOP=y
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 
 #
@@ -60,7 +64,6 @@
 CONFIG_IA64_PAGE_SIZE_16KB=y
 # CONFIG_IA64_PAGE_SIZE_64KB is not set
 CONFIG_IA64_L1_CACHE_SHIFT=7
-# CONFIG_MCKINLEY_ASTEP_SPECIFIC is not set
 CONFIG_NUMA=y
 CONFIG_VIRTUAL_MEM_MAP=y
 CONFIG_DISCONTIGMEM=y
@@ -70,12 +73,17 @@
 CONFIG_FORCE_MAX_ZONEORDER=18
 CONFIG_SMP=y
 CONFIG_NR_CPUS=512
+# CONFIG_HOTPLUG_CPU is not set
 # CONFIG_PREEMPT is not set
 CONFIG_HAVE_DEC_LOCK=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_COMPAT=y
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
+
+#
+# Firmware Drivers
+#
 CONFIG_EFI_VARS=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
@@ -105,6 +113,7 @@
 #
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
+# CONFIG_PCI_USE_VECTOR is not set
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
 
@@ -174,7 +183,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECD=m
 CONFIG_BLK_DEV_IDETAPE=m
 CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -218,6 +226,7 @@
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
 CONFIG_IDEDMA_AUTO=y
@@ -243,7 +252,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_REPORT_LUNS=y
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -281,7 +289,9 @@
 CONFIG_SCSI_SATA_SVW=m
 CONFIG_SCSI_ATA_PIIX=m
 CONFIG_SCSI_SATA_PROMISE=m
+# CONFIG_SCSI_SATA_SX4 is not set
 # CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
 CONFIG_SCSI_SATA_VIA=m
 CONFIG_SCSI_SATA_VITESSE=y
 # CONFIG_SCSI_BUSLOGIC is not set
@@ -298,6 +308,7 @@
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 CONFIG_SCSI_QLOGIC_1280=y
@@ -343,6 +354,7 @@
 #
 # I2O device support
 #
+# CONFIG_I2O is not set
 
 #
 # Networking support
@@ -389,8 +401,6 @@
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
 CONFIG_IPV6_TUNNEL=m
-# CONFIG_DECNET is not set
-CONFIG_BRIDGE=m
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 CONFIG_BRIDGE_NETFILTER=y
@@ -452,6 +462,7 @@
 CONFIG_IP_NF_ARP_MANGLE=m
 # CONFIG_IP_NF_COMPAT_IPCHAINS is not set
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IP_NF_RAW is not set
 
 #
 # IPv6: Netfilter Configuration
@@ -471,7 +482,9 @@
 #
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
+CONFIG_BRIDGE=m
 CONFIG_VLAN_8021Q=m
+# CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
@@ -516,12 +529,14 @@
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_RX is not set
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 CONFIG_DUMMY=m
 CONFIG_BONDING=m
 CONFIG_EQUALIZER=m
@@ -529,6 +544,11 @@
 # CONFIG_ETHERTAP is not set
 
 #
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
@@ -582,7 +602,6 @@
 CONFIG_HAMACHI=m
 CONFIG_YELLOWFIN=m
 CONFIG_R8169=m
-CONFIG_SIS190=m
 CONFIG_SK98LIN=m
 CONFIG_TIGON3=y
 
@@ -591,6 +610,22 @@
 #
 CONFIG_IXGB=m
 # CONFIG_IXGB_NAPI is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 CONFIG_PPP=m
@@ -602,45 +637,11 @@
 # CONFIG_PPP_BSDCOMP is not set
 # CONFIG_PPPOE is not set
 # CONFIG_SLIP is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
 CONFIG_NET_FC=y
 # CONFIG_SHAPER is not set
 CONFIG_NETCONSOLE=y
 
 #
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
 # ISDN subsystem
 #
 # CONFIG_ISDN is not set
@@ -703,6 +704,7 @@
 CONFIG_HW_CONSOLE=y
 CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_ROCKETPORT is not set
+# CONFIG_CYCLADES is not set
 # CONFIG_SYNCLINK is not set
 # CONFIG_SYNCLINKMP is not set
 # CONFIG_N_HDLC is not set
@@ -713,18 +715,11 @@
 #
 # Serial drivers
 #
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_HCDP=y
-CONFIG_SERIAL_8250_ACPI=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-# CONFIG_SERIAL_8250_EXTENDED is not set
+# CONFIG_SERIAL_8250 is not set
 
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -740,7 +735,6 @@
 #
 # CONFIG_WATCHDOG is not set
 # CONFIG_HW_RANDOM is not set
-# CONFIG_GEN_RTC is not set
 CONFIG_EFI_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -852,6 +846,7 @@
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
 # CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
@@ -897,7 +892,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -968,6 +962,7 @@
 # Library routines
 #
 CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
 
@@ -1019,4 +1014,5 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=m
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_TEST is not set
--- diff/arch/ia64/defconfig	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/ia64/defconfig	2004-07-01 21:32:31.000000000 +0100
@@ -26,6 +26,7 @@
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_IOSCHED_NOOP=y
@@ -66,7 +67,6 @@
 CONFIG_IA64_PAGE_SIZE_16KB=y
 # CONFIG_IA64_PAGE_SIZE_64KB is not set
 CONFIG_IA64_L1_CACHE_SHIFT=7
-# CONFIG_MCKINLEY_ASTEP_SPECIFIC is not set
 # CONFIG_NUMA is not set
 CONFIG_VIRTUAL_MEM_MAP=y
 # CONFIG_IA64_CYCLONE is not set
@@ -74,6 +74,7 @@
 CONFIG_FORCE_MAX_ZONEORDER=18
 CONFIG_SMP=y
 CONFIG_NR_CPUS=16
+# CONFIG_HOTPLUG_CPU is not set
 # CONFIG_PREEMPT is not set
 CONFIG_HAVE_DEC_LOCK=y
 CONFIG_IA32_SUPPORT=y
@@ -178,7 +179,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
-# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=m
@@ -220,6 +220,7 @@
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
 CONFIG_IDEDMA_AUTO=y
@@ -245,7 +246,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_REPORT_LUNS=y
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_LOGGING=y
 
@@ -282,6 +282,7 @@
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
@@ -328,6 +329,7 @@
 #
 # I2O device support
 #
+# CONFIG_I2O is not set
 
 #
 # Networking support
@@ -573,7 +575,12 @@
 #
 # IPMI
 #
-# CONFIG_IPMI_HANDLER is not set
+CONFIG_IPMI_HANDLER=m
+CONFIG_IPMI_PANIC_EVENT=y
+CONFIG_IPMI_PANIC_STRING=y
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
 
 #
 # Watchdog Cards
@@ -651,6 +658,7 @@
 # CONFIG_SENSORS_LM83 is not set
 # CONFIG_SENSORS_LM85 is not set
 # CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_W83781D is not set
 # CONFIG_SENSORS_W83L785TS is not set
@@ -662,6 +670,7 @@
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
@@ -688,6 +697,7 @@
 # CONFIG_FB_CIRRUS is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
 # CONFIG_FB_IMSTT is not set
 CONFIG_FB_RIVA=m
 # CONFIG_FB_MATROX is not set
@@ -852,6 +862,7 @@
 # CONFIG_USB_KBTAB is not set
 # CONFIG_USB_POWERMATE is not set
 # CONFIG_USB_MTOUCH is not set
+# CONFIG_USB_EGALAX is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
 
@@ -901,6 +912,7 @@
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -987,7 +999,7 @@
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V4 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=y
@@ -998,7 +1010,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -1083,7 +1094,7 @@
 # CONFIG_IA64_GRANULE_64MB is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_IA64_PRINT_HAZARDS=y
-CONFIG_DISABLE_VHPT=y
+# CONFIG_DISABLE_VHPT is not set
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_IA64_EARLY_PRINTK_VGA is not set
 # CONFIG_DEBUG_SLAB is not set
--- diff/arch/ia64/ia32/binfmt_elf32.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/ia64/ia32/binfmt_elf32.c	2004-07-01 21:32:31.000000000 +0100
@@ -197,6 +197,10 @@
 	}
 	up_write(&current->mm->mmap_sem);
 
+	/* Can't do it in ia64_elf32_init(). Needs to be done before calls to
+	   elf32_map() */
+	current->thread.ppl = ia32_init_pp_list();
+
 	return 0;
 }
 
--- diff/arch/ia64/ia32/ia32_entry.S	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/ia64/ia32/ia32_entry.S	2004-07-01 21:32:31.000000000 +0100
@@ -349,7 +349,7 @@
 	data8 sys_setfsuid	/* 16-bit version */
 	data8 sys_setfsgid	/* 16-bit version */
 	data8 sys_llseek	  /* 140 */
-	data8 sys32_getdents
+	data8 compat_sys_getdents
 	data8 compat_sys_select
 	data8 sys_flock
 	data8 sys32_msync
@@ -371,7 +371,7 @@
 	data8 sys_sched_get_priority_min	 /* 160 */
 	data8 sys32_sched_rr_get_interval
 	data8 compat_sys_nanosleep
-	data8 sys_mremap
+	data8 sys32_mremap
 	data8 sys_setresuid	/* 16-bit version */
 	data8 sys32_getresuid16	/* 16-bit version */	  /* 165 */
 	data8 sys_ni_syscall	/* vm86 */
@@ -428,7 +428,7 @@
 	data8 sys_pivot_root
 	data8 sys_mincore
 	data8 sys_madvise
-	data8 sys_getdents64	  /* 220 */
+	data8 compat_sys_getdents64	  /* 220 */
 	data8 compat_sys_fcntl64
 	data8 sys_ni_syscall		/* reserved for TUX */
 	data8 sys_ni_syscall		/* reserved for Security */
--- diff/arch/ia64/ia32/ia32_support.c	2004-05-19 22:11:03.000000000 +0100
+++ source/arch/ia64/ia32/ia32_support.c	2004-07-01 21:32:31.000000000 +0100
@@ -218,6 +218,18 @@
 	ia32_exec_domain.signal_map = default_exec_domain.signal_map;
 	ia32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
 	register_exec_domain(&ia32_exec_domain);
+
+#if PAGE_SHIFT > IA32_PAGE_SHIFT
+	{
+		extern kmem_cache_t *partial_page_cachep;
+
+		partial_page_cachep = kmem_cache_create("partial_page_cache",
+							sizeof(struct partial_page), 0, 0,
+							NULL, NULL);
+		if (!partial_page_cachep)
+			panic("Cannot create partial page SLAB cache");
+	}
+#endif
 	return 0;
 }
 
--- diff/arch/ia64/ia32/ia32priv.h	2004-05-19 22:11:03.000000000 +0100
+++ source/arch/ia64/ia32/ia32priv.h	2004-07-01 21:32:31.000000000 +0100
@@ -1,5 +1,5 @@
-#ifndef _ASM_IA64_IA32_H
-#define _ASM_IA64_IA32_H
+#ifndef _ASM_IA64_IA32_PRIV_H
+#define _ASM_IA64_IA32_PRIV_H
 
 #include <linux/config.h>
 
@@ -9,6 +9,7 @@
 
 #include <linux/binfmts.h>
 #include <linux/compat.h>
+#include <linux/rbtree.h>
 
 #include <asm/processor.h>
 
@@ -16,12 +17,39 @@
  * 32 bit structures for IA32 support.
  */
 
-#define IA32_PAGE_SHIFT		12	/* 4KB pages */
 #define IA32_PAGE_SIZE		(1UL << IA32_PAGE_SHIFT)
 #define IA32_PAGE_MASK		(~(IA32_PAGE_SIZE - 1))
 #define IA32_PAGE_ALIGN(addr)	(((addr) + IA32_PAGE_SIZE - 1) & IA32_PAGE_MASK)
 #define IA32_CLOCKS_PER_SEC	100	/* Cast in stone for IA32 Linux */
 
+/*
+ * partially mapped pages provide precise accounting of which 4k sub pages
+ * are mapped and which ones are not, thereby improving IA-32 compatibility.
+ */
+struct partial_page {
+	struct partial_page	*next; /* linked list, sorted by address */
+	struct rb_node		pp_rb;
+	/* 64K is the largest "normal" page supported by ia64 ABI. So 4K*32
+	 * should suffice.*/
+	unsigned int		bitmap;
+	unsigned int		base;
+};
+
+struct partial_page_list {
+	struct partial_page	*pp_head; /* list head, points to the lowest
+					   * addressed partial page */
+	struct rb_root		ppl_rb;
+	struct partial_page	*pp_hint; /* pp_hint->next is the last
+					   * accessed partial page */
+	atomic_t		pp_count; /* reference count */
+};
+
+#if PAGE_SHIFT > IA32_PAGE_SHIFT
+struct partial_page_list* ia32_init_pp_list (void);
+#else
+# define ia32_init_pp_list()	0
+#endif
+
 /* sigcontext.h */
 /*
  * As documented in the iBCS2 standard..
@@ -528,4 +556,4 @@
 
 #endif /* !CONFIG_IA32_SUPPORT */
 
-#endif /* _ASM_IA64_IA32_H */
+#endif /* _ASM_IA64_IA32_PRIV_H */
--- diff/arch/ia64/ia32/sys_ia32.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/ia32/sys_ia32.c	2004-07-01 21:32:31.000000000 +0100
@@ -8,6 +8,7 @@
  * Copyright (C) 1997		David S. Miller (davem@caip.rutgers.edu)
  * Copyright (C) 2000-2003 Hewlett-Packard Co
  *	David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 2004		Gordon Jin <gordon.jin@intel.com>
  *
  * These routines maintain argument size conversion between 32bit and 64bit
  * environment.
@@ -48,6 +49,7 @@
 #include <linux/ipc.h>
 #include <linux/compat.h>
 #include <linux/vfs.h>
+#include <linux/mman.h>
 
 #include <asm/intrinsics.h>
 #include <asm/semaphore.h>
@@ -250,6 +252,508 @@
 	return ret;
 }
 
+/* SLAB cache for partial_page structures */
+kmem_cache_t *partial_page_cachep;
+
+/*
+ * init partial_page_list.
+ * return 0 means kmalloc fail.
+ */
+struct partial_page_list*
+ia32_init_pp_list(void)
+{
+	struct partial_page_list *p;
+
+	if ((p = kmalloc(sizeof(*p), GFP_KERNEL)) == NULL)
+		return p;
+	p->pp_head = 0;
+	p->ppl_rb = RB_ROOT;
+	p->pp_hint = 0;
+	atomic_set(&p->pp_count, 1);
+	return p;
+}
+
+/*
+ * Search for the partial page with @start in partial page list @ppl.
+ * If finds the partial page, return the found partial page.
+ * Else, return 0 and provide @pprev, @rb_link, @rb_parent to
+ * be used by later __ia32_insert_pp().
+ */
+static struct partial_page *
+__ia32_find_pp(struct partial_page_list *ppl, unsigned int start,
+	struct partial_page **pprev, struct rb_node ***rb_link,
+	struct rb_node **rb_parent)
+{
+	struct partial_page *pp;
+	struct rb_node **__rb_link, *__rb_parent, *rb_prev;
+
+	pp = ppl->pp_hint;
+	if (pp && pp->base == start)
+		return pp;
+
+	__rb_link = &ppl->ppl_rb.rb_node;
+	rb_prev = __rb_parent = NULL;
+
+	while (*__rb_link) {
+		__rb_parent = *__rb_link;
+		pp = rb_entry(__rb_parent, struct partial_page, pp_rb);
+
+		if (pp->base == start) {
+			ppl->pp_hint = pp;
+			return pp;
+		} else if (pp->base < start) {
+			rb_prev = __rb_parent;
+			__rb_link = &__rb_parent->rb_right;
+		} else {
+			__rb_link = &__rb_parent->rb_left;
+		}
+	}
+
+	*rb_link = __rb_link;
+	*rb_parent = __rb_parent;
+	*pprev = NULL;
+	if (rb_prev)
+		*pprev = rb_entry(rb_prev, struct partial_page, pp_rb);
+	return NULL;
+}
+
+/*
+ * insert @pp into @ppl.
+ */
+static void
+__ia32_insert_pp(struct partial_page_list *ppl, struct partial_page *pp,
+	 struct partial_page *prev, struct rb_node **rb_link,
+	struct rb_node *rb_parent)
+{
+	/* link list */
+	if (prev) {
+		pp->next = prev->next;
+		prev->next = pp;
+	} else {
+		ppl->pp_head = pp;
+		if (rb_parent)
+			pp->next = rb_entry(rb_parent,
+				struct partial_page, pp_rb);
+		else
+			pp->next = NULL;
+	}
+
+	/* link rb */
+	rb_link_node(&pp->pp_rb, rb_parent, rb_link);
+	rb_insert_color(&pp->pp_rb, &ppl->ppl_rb);
+
+	ppl->pp_hint = pp;
+}
+
+/*
+ * delete @pp from partial page list @ppl.
+ */
+static void
+__ia32_delete_pp(struct partial_page_list *ppl, struct partial_page *pp,
+	struct partial_page *prev)
+{
+	if (prev) {
+		prev->next = pp->next;
+		if (ppl->pp_hint == pp)
+			ppl->pp_hint = prev;
+	} else {
+		ppl->pp_head = pp->next;
+		if (ppl->pp_hint == pp)
+			ppl->pp_hint = pp->next;
+	}
+	rb_erase(&pp->pp_rb, &ppl->ppl_rb);
+	kmem_cache_free(partial_page_cachep, pp);
+}
+
+static struct partial_page *
+__pp_prev(struct partial_page *pp)
+{
+	struct rb_node *prev = rb_prev(&pp->pp_rb);
+	if (prev)
+		return rb_entry(prev, struct partial_page, pp_rb);
+	else
+		return NULL;
+}
+
+/*
+ * Delete partial pages with address between @start and @end.
+ * @start and @end are page aligned.
+ */
+static void
+__ia32_delete_pp_range(unsigned int start, unsigned int end)
+{
+	struct partial_page *pp, *prev;
+	struct rb_node **rb_link, *rb_parent;
+
+	if (start >= end)
+		return;
+
+	pp = __ia32_find_pp(current->thread.ppl, start, &prev,
+					&rb_link, &rb_parent);
+	if (pp)
+		prev = __pp_prev(pp);
+	else {
+		if (prev)
+			pp = prev->next;
+		else
+			pp = current->thread.ppl->pp_head;
+	}
+
+	while (pp && pp->base < end) {
+		struct partial_page *tmp = pp->next;
+		__ia32_delete_pp(current->thread.ppl, pp, prev);
+		pp = tmp;
+	}
+}
+
+/*
+ * Set the range between @start and @end in bitmap.
+ * @start and @end should be IA32 page aligned and in the same IA64 page.
+ */
+static int
+__ia32_set_pp(unsigned int start, unsigned int end, int flags)
+{
+	struct partial_page *pp, *prev;
+	struct rb_node ** rb_link, *rb_parent;
+	unsigned int pstart, start_bit, end_bit, i;
+
+	pstart = PAGE_START(start);
+	start_bit = (start % PAGE_SIZE) / IA32_PAGE_SIZE;
+	end_bit = (end % PAGE_SIZE) / IA32_PAGE_SIZE;
+	if (end_bit == 0)
+		end_bit = PAGE_SIZE / IA32_PAGE_SIZE;
+	pp = __ia32_find_pp(current->thread.ppl, pstart, &prev,
+					&rb_link, &rb_parent);
+	if (pp) {
+		for (i = start_bit; i < end_bit; i++)
+			set_bit(i, &pp->bitmap);
+		/*
+		 * Check: if this partial page has been set to a full page,
+		 * then delete it.
+		 */
+		if (find_first_zero_bit(&pp->bitmap, sizeof(pp->bitmap)*8) >=
+				PAGE_SIZE/IA32_PAGE_SIZE) {
+			__ia32_delete_pp(current->thread.ppl, pp, __pp_prev(pp));
+		}
+		return 0;
+	}
+
+	/*
+	 * MAP_FIXED may lead to overlapping mmap.
+	 * In this case, the requested mmap area may already mmaped as a full
+	 * page. So check vma before adding a new partial page.
+	 */
+	if (flags & MAP_FIXED) {
+		struct vm_area_struct *vma = find_vma(current->mm, pstart);
+		if (vma && vma->vm_start <= pstart)
+			return 0;
+	}
+
+	/* new a partial_page */
+	pp = kmem_cache_alloc(partial_page_cachep, GFP_KERNEL);
+	if (!pp)
+		return -ENOMEM;
+	pp->base = pstart;
+	pp->bitmap = 0;
+	for (i=start_bit; i<end_bit; i++)
+		set_bit(i, &(pp->bitmap));
+	pp->next = NULL;
+	__ia32_insert_pp(current->thread.ppl, pp, prev, rb_link, rb_parent);
+	return 0;
+}
+
+/*
+ * @start and @end should be IA32 page aligned, but don't need to be in the
+ * same IA64 page. Split @start and @end to make sure they're in the same IA64
+ * page, then call __ia32_set_pp().
+ */
+static void
+ia32_set_pp(unsigned int start, unsigned int end, int flags)
+{
+	down_write(&current->mm->mmap_sem);
+	if (flags & MAP_FIXED) {
+		/*
+		 * MAP_FIXED may lead to overlapping mmap. When this happens,
+		 * a series of complete IA64 pages results in deletion of
+		 * old partial pages in that range.
+		 */
+		__ia32_delete_pp_range(PAGE_ALIGN(start), PAGE_START(end));
+	}
+
+	if (end < PAGE_ALIGN(start)) {
+		__ia32_set_pp(start, end, flags);
+	} else {
+		if (offset_in_page(start))
+			__ia32_set_pp(start, PAGE_ALIGN(start), flags);
+		if (offset_in_page(end))
+			__ia32_set_pp(PAGE_START(end), end, flags);
+	}
+	up_write(&current->mm->mmap_sem);
+}
+
+/*
+ * Unset the range between @start and @end in bitmap.
+ * @start and @end should be IA32 page aligned and in the same IA64 page.
+ * After doing that, if the bitmap is 0, then free the page and return 1,
+ * 	else return 0;
+ * If not find the partial page in the list, then
+ * 	If the vma exists, then the full page is set to a partial page;
+ *	Else return -ENOMEM.
+ */
+static int
+__ia32_unset_pp(unsigned int start, unsigned int end)
+{
+	struct partial_page *pp, *prev;
+	struct rb_node ** rb_link, *rb_parent;
+	unsigned int pstart, start_bit, end_bit, i;
+	struct vm_area_struct *vma;
+
+	pstart = PAGE_START(start);
+	start_bit = (start % PAGE_SIZE) / IA32_PAGE_SIZE;
+	end_bit = (end % PAGE_SIZE) / IA32_PAGE_SIZE;
+	if (end_bit == 0)
+		end_bit = PAGE_SIZE / IA32_PAGE_SIZE;
+
+	pp = __ia32_find_pp(current->thread.ppl, pstart, &prev,
+					&rb_link, &rb_parent);
+	if (pp) {
+		for (i = start_bit; i < end_bit; i++)
+			clear_bit(i, &pp->bitmap);
+		if (pp->bitmap == 0) {
+			__ia32_delete_pp(current->thread.ppl, pp, __pp_prev(pp));
+			return 1;
+		}
+		return 0;
+	}
+
+	vma = find_vma(current->mm, pstart);
+	if (!vma || vma->vm_start > pstart) {
+		return -ENOMEM;
+	}
+
+	/* new a partial_page */
+	pp = kmem_cache_alloc(partial_page_cachep, GFP_KERNEL);
+	if (!pp)
+		return -ENOMEM;
+	pp->base = pstart;
+	pp->bitmap = 0;
+	for (i = 0; i < start_bit; i++)
+		set_bit(i, &(pp->bitmap));
+	for (i = end_bit; i < PAGE_SIZE / IA32_PAGE_SIZE; i++)
+		set_bit(i, &(pp->bitmap));
+	pp->next = NULL;
+	__ia32_insert_pp(current->thread.ppl, pp, prev, rb_link, rb_parent);
+	return 0;
+}
+
+/*
+ * Delete pp between PAGE_ALIGN(start) and PAGE_START(end) by calling
+ * __ia32_delete_pp_range(). Unset possible partial pages by calling
+ * __ia32_unset_pp().
+ * The returned value see __ia32_unset_pp().
+ */
+static int
+ia32_unset_pp(unsigned int *startp, unsigned int *endp)
+{
+	unsigned int start = *startp, end = *endp;
+	int ret = 0;
+
+	down_write(&current->mm->mmap_sem);
+
+	__ia32_delete_pp_range(PAGE_ALIGN(start), PAGE_START(end));
+
+	if (end < PAGE_ALIGN(start)) {
+		ret = __ia32_unset_pp(start, end);
+		if (ret == 1) {
+			*startp = PAGE_START(start);
+			*endp = PAGE_ALIGN(end);
+		}
+		if (ret == 0) {
+			/* to shortcut sys_munmap() in sys32_munmap() */
+			*startp = PAGE_START(start);
+			*endp = PAGE_START(end);
+		}
+	} else {
+		if (offset_in_page(start)) {
+			ret = __ia32_unset_pp(start, PAGE_ALIGN(start));
+			if (ret == 1)
+				*startp = PAGE_START(start);
+			if (ret == 0)
+				*startp = PAGE_ALIGN(start);
+			if (ret < 0)
+				goto out;
+		}
+		if (offset_in_page(end)) {
+			ret = __ia32_unset_pp(PAGE_START(end), end);
+			if (ret == 1)
+				*endp = PAGE_ALIGN(end);
+			if (ret == 0)
+				*endp = PAGE_START(end);
+		}
+	}
+
+ out:
+	up_write(&current->mm->mmap_sem);
+	return ret;
+}
+
+/*
+ * Compare the range between @start and @end with bitmap in partial page.
+ * @start and @end should be IA32 page aligned and in the same IA64 page.
+ */
+static int
+__ia32_compare_pp(unsigned int start, unsigned int end)
+{
+	struct partial_page *pp, *prev;
+	struct rb_node ** rb_link, *rb_parent;
+	unsigned int pstart, start_bit, end_bit, size;
+	unsigned int first_bit, next_zero_bit;	/* the first range in bitmap */
+
+	pstart = PAGE_START(start);
+
+	pp = __ia32_find_pp(current->thread.ppl, pstart, &prev,
+					&rb_link, &rb_parent);
+	if (!pp)
+		return 1;
+
+	start_bit = (start % PAGE_SIZE) / IA32_PAGE_SIZE;
+	end_bit = (end % PAGE_SIZE) / IA32_PAGE_SIZE;
+	size = sizeof(pp->bitmap) * 8;
+	first_bit = find_first_bit(&pp->bitmap, size);
+	next_zero_bit = find_next_zero_bit(&pp->bitmap, size, first_bit);
+	if ((start_bit < first_bit) || (end_bit > next_zero_bit)) {
+		/* exceeds the first range in bitmap */
+		return -ENOMEM;
+	} else if ((start_bit == first_bit) && (end_bit == next_zero_bit)) {
+		first_bit = find_next_bit(&pp->bitmap, size, next_zero_bit);
+		if ((next_zero_bit < first_bit) && (first_bit < size))
+			return 1;	/* has next range */
+		else
+			return 0; 	/* no next range */
+	} else
+		return 1;
+}
+
+/*
+ * @start and @end should be IA32 page aligned, but don't need to be in the
+ * same IA64 page. Split @start and @end to make sure they're in the same IA64
+ * page, then call __ia32_compare_pp().
+ *
+ * Take this as example: the range is the 1st and 2nd 4K page.
+ * Return 0 if they fit bitmap exactly, i.e. bitmap = 00000011;
+ * Return 1 if the range doesn't cover whole bitmap, e.g. bitmap = 00001111;
+ * Return -ENOMEM if the range exceeds the bitmap, e.g. bitmap = 00000001 or
+ * 	bitmap = 00000101.
+ */
+static int
+ia32_compare_pp(unsigned int *startp, unsigned int *endp)
+{
+	unsigned int start = *startp, end = *endp;
+	int retval = 0;
+
+	down_write(&current->mm->mmap_sem);
+
+	if (end < PAGE_ALIGN(start)) {
+		retval = __ia32_compare_pp(start, end);
+		if (retval == 0) {
+			*startp = PAGE_START(start);
+			*endp = PAGE_ALIGN(end);
+		}
+	} else {
+		if (offset_in_page(start)) {
+			retval = __ia32_compare_pp(start,
+						   PAGE_ALIGN(start));
+			if (retval == 0)
+				*startp = PAGE_START(start);
+			if (retval < 0)
+				goto out;
+		}
+		if (offset_in_page(end)) {
+			retval = __ia32_compare_pp(PAGE_START(end), end);
+			if (retval == 0)
+				*endp = PAGE_ALIGN(end);
+		}
+	}
+
+ out:
+	up_write(&current->mm->mmap_sem);
+	return retval;
+}
+
+static void
+__ia32_drop_pp_list(struct partial_page_list *ppl)
+{
+	struct partial_page *pp = ppl->pp_head;
+
+	while (pp) {
+		struct partial_page *next = pp->next;
+		kmem_cache_free(partial_page_cachep, pp);
+		pp = next;
+	}
+
+	kfree(ppl);
+}
+
+void
+ia32_drop_partial_page_list(struct task_struct *task)
+{
+	struct partial_page_list* ppl = task->thread.ppl;
+
+	if (ppl && atomic_dec_and_test(&ppl->pp_count))
+		__ia32_drop_pp_list(ppl);
+}
+
+/*
+ * Copy current->thread.ppl to ppl (already initialized).
+ */
+static int
+__ia32_copy_pp_list(struct partial_page_list *ppl)
+{
+	struct partial_page *pp, *tmp, *prev;
+	struct rb_node **rb_link, *rb_parent;
+
+	ppl->pp_head = NULL;
+	ppl->pp_hint = NULL;
+	ppl->ppl_rb = RB_ROOT;
+	rb_link = &ppl->ppl_rb.rb_node;
+	rb_parent = NULL;
+	prev = NULL;
+
+	for (pp = current->thread.ppl->pp_head; pp; pp = pp->next) {
+		tmp = kmem_cache_alloc(partial_page_cachep, GFP_KERNEL);
+		if (!tmp)
+			return -ENOMEM;
+		*tmp = *pp;
+		__ia32_insert_pp(ppl, tmp, prev, rb_link, rb_parent);
+		prev = tmp;
+		rb_link = &tmp->pp_rb.rb_right;
+		rb_parent = &tmp->pp_rb;
+	}
+	return 0;
+}
+
+int
+ia32_copy_partial_page_list(struct task_struct *p, unsigned long clone_flags)
+{
+	int retval = 0;
+
+	if (clone_flags & CLONE_VM) {
+		atomic_inc(&current->thread.ppl->pp_count);
+		p->thread.ppl = current->thread.ppl;
+	} else {
+		p->thread.ppl = ia32_init_pp_list();
+		if (!p->thread.ppl)
+			return -ENOMEM;
+		down_write(&current->mm->mmap_sem);
+		{
+			retval = __ia32_copy_pp_list(p->thread.ppl);
+		}
+		up_write(&current->mm->mmap_sem);
+	}
+
+	return retval;
+}
+
 static unsigned long
 emulate_mmap (struct file *file, unsigned long start, unsigned long len, int prot, int flags,
 	      loff_t off)
@@ -263,6 +767,7 @@
 	pend = PAGE_ALIGN(end);
 
 	if (flags & MAP_FIXED) {
+		ia32_set_pp((unsigned int)start, (unsigned int)end, flags);
 		if (start > pstart) {
 			if (flags & MAP_SHARED)
 				printk(KERN_INFO
@@ -274,7 +779,7 @@
 				return ret;
 			pstart += PAGE_SIZE;
 			if (pstart >= pend)
-				return start;	/* done */
+				goto out;	/* done */
 		}
 		if (end < pend) {
 			if (flags & MAP_SHARED)
@@ -287,7 +792,7 @@
 				return ret;
 			pend -= PAGE_SIZE;
 			if (pstart >= pend)
-				return start;	/* done */
+				goto out;	/* done */
 		}
 	} else {
 		/*
@@ -341,6 +846,10 @@
 		if (!(prot & PROT_WRITE) && sys_mprotect(pstart, pend - pstart, prot) < 0)
 			return -EINVAL;
 	}
+
+	if (!(flags & MAP_FIXED))
+		ia32_set_pp((unsigned int)start, (unsigned int)end, flags);
+out:
 	return start;
 }
 
@@ -478,11 +987,16 @@
 #if PAGE_SHIFT <= IA32_PAGE_SHIFT
 	ret = sys_munmap(start, end - start);
 #else
+	if (OFFSET4K(start))
+		return -EINVAL;
+
+	end = IA32_PAGE_ALIGN(end);
 	if (start >= end)
 		return -EINVAL;
 
-	start = PAGE_ALIGN(start);
-	end = PAGE_START(end);
+	ret = ia32_unset_pp(&start, &end);
+	if (ret < 0)
+		return ret;
 
 	if (start >= end)
 		return 0;
@@ -521,7 +1035,7 @@
 asmlinkage long
 sys32_mprotect (unsigned int start, unsigned int len, int prot)
 {
-	unsigned long end = start + len;
+	unsigned int end = start + len;
 #if PAGE_SHIFT > IA32_PAGE_SHIFT
 	long retval = 0;
 #endif
@@ -538,6 +1052,11 @@
 	if (end < start)
 		return -EINVAL;
 
+	retval = ia32_compare_pp(&start, &end);
+
+	if (retval < 0)
+		return retval;
+
 	down(&ia32_mmap_sem);
 	{
 		if (offset_in_page(start)) {
@@ -568,6 +1087,59 @@
 }
 
 asmlinkage long
+sys32_mremap (unsigned int addr, unsigned int old_len, unsigned int new_len,
+		unsigned int flags, unsigned int new_addr)
+{
+	long ret;
+
+#if PAGE_SHIFT <= IA32_PAGE_SHIFT
+	ret = sys_mremap(addr, old_len, new_len, flags, new_addr);
+#else
+	unsigned int old_end, new_end;
+
+	if (OFFSET4K(addr))
+		return -EINVAL;
+
+	old_len = IA32_PAGE_ALIGN(old_len);
+	new_len = IA32_PAGE_ALIGN(new_len);
+	old_end = addr + old_len;
+	new_end = addr + new_len;
+
+	if (!new_len)
+		return -EINVAL;
+
+	if ((flags & MREMAP_FIXED) && (OFFSET4K(new_addr)))
+		return -EINVAL;
+
+	if (old_len >= new_len) {
+		ret = sys32_munmap(addr + new_len, old_len - new_len);
+		if (ret && old_len != new_len)
+			return ret;
+		ret = addr;
+		if (!(flags & MREMAP_FIXED) || (new_addr == addr))
+			return ret;
+		old_len = new_len;
+	}
+
+	addr = PAGE_START(addr);
+	old_len = PAGE_ALIGN(old_end) - addr;
+	new_len = PAGE_ALIGN(new_end) - addr;
+
+	down(&ia32_mmap_sem);
+	{
+		ret = sys_mremap(addr, old_len, new_len, flags, new_addr);
+	}
+	up(&ia32_mmap_sem);
+
+	if ((ret >= 0) && (old_len < new_len)) {
+		/* mremap expanded successfully */
+		ia32_set_pp(old_end, new_end, flags);
+	}
+#endif
+	return ret;
+}
+
+asmlinkage long
 sys32_pipe (int *fd)
 {
 	int retval;
--- diff/arch/ia64/kernel/Makefile	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/Makefile	2004-07-01 21:32:31.000000000 +0100
@@ -17,6 +17,7 @@
 obj-$(CONFIG_SMP)		+= smp.o smpboot.o
 obj-$(CONFIG_PERFMON)		+= perfmon_default_smpl.o
 obj-$(CONFIG_IA64_CYCLONE)	+= cyclone.o
+obj-$(CONFIG_KGDB)		+= kgdb_stub.o
 
 # The gate DSO image is built using a special linker script.
 targets += gate.so gate-syms.o
--- diff/arch/ia64/kernel/acpi.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/acpi.c	2004-07-01 21:32:31.000000000 +0100
@@ -521,9 +521,14 @@
 #endif /* CONFIG_ACPI_NUMA */
 
 unsigned int
-acpi_register_gsi (u32 gsi, int polarity, int trigger)
+acpi_register_gsi (u32 gsi, int edge_level, int active_high_low)
 {
-	return acpi_register_irq(gsi, polarity, trigger);
+	if (has_8259 && gsi < 16)
+		return isa_irq_to_vector(gsi);
+
+	return iosapic_register_intr(gsi,
+			(active_high_low == ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW,
+			(edge_level == ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : IOSAPIC_LEVEL);
 }
 EXPORT_SYMBOL(acpi_register_gsi);
 
@@ -548,7 +553,7 @@
 	if (fadt->iapc_boot_arch & BAF_LEGACY_DEVICES)
 		acpi_legacy_devices = 1;
 
-	acpi_register_gsi(fadt->sci_int, ACPI_ACTIVE_LOW, ACPI_LEVEL_SENSITIVE);
+	acpi_register_gsi(fadt->sci_int, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW);
 	return 0;
 }
 
@@ -662,16 +667,4 @@
 	return 0;
 }
 
-int
-acpi_register_irq (u32 gsi, u32 polarity, u32 trigger)
-{
-	if (has_8259 && gsi < 16)
-		return isa_irq_to_vector(gsi);
-
-	return iosapic_register_intr(gsi,
-			(polarity == ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW,
-			(trigger == ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : IOSAPIC_LEVEL);
-}
-EXPORT_SYMBOL(acpi_register_irq);
-
 #endif /* CONFIG_ACPI_BOOT */
--- diff/arch/ia64/kernel/entry.S	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/entry.S	2004-07-01 21:32:31.000000000 +0100
@@ -179,17 +179,19 @@
 	.body
 
 	adds r22=IA64_TASK_THREAD_KSP_OFFSET,r13
+	movl r25=init_task
 	mov r27=IA64_KR(CURRENT_STACK)
+	adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0
 	dep r20=0,in0,61,3		// physical address of "current"
 	;;
 	st8 [r22]=sp			// save kernel stack pointer of old task
 	shr.u r26=r20,IA64_GRANULE_SHIFT
-	adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0
+	cmp.eq p7,p6=r25,in0
 	;;
 	/*
 	 * If we've already mapped this task's page, we can skip doing it again.
 	 */
-	cmp.eq p7,p6=r26,r27
+(p6)	cmp.eq p7,p6=r26,r27
 (p6)	br.cond.dpnt .map
 	;;
 .done:
--- diff/arch/ia64/kernel/head.S	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/head.S	2004-07-01 21:32:31.000000000 +0100
@@ -154,6 +154,10 @@
 #endif
 	;;
 	tpa r3=r2		// r3 == phys addr of task struct
+	;;
+	shr.u r16=r3,IA64_GRANULE_SHIFT
+(isBP)	br.cond.dpnt .load_current // BP stack is on region 5 --- no need to map it
+
 	// load mapping for stack (virtaddr in r2, physaddr in r3)
 	rsm psr.ic
 	movl r17=PAGE_KERNEL
@@ -165,7 +169,6 @@
 	dep r2=-1,r3,61,3	// IMVA of task
 	;;
 	mov r17=rr[r2]
-	shr.u r16=r3,IA64_GRANULE_SHIFT
 	;;
 	dep r17=0,r17,8,24
 	;;
@@ -180,6 +183,7 @@
 	srlz.d
   	;;
 
+.load_current:
 	// load the "current" pointer (r13) and ar.k6 with the current task
 	mov IA64_KR(CURRENT)=r2		// virtual address
 	mov IA64_KR(CURRENT_STACK)=r16
--- diff/arch/ia64/kernel/init_task.c	2004-05-19 22:11:03.000000000 +0100
+++ source/arch/ia64/kernel/init_task.c	2004-07-01 21:32:31.000000000 +0100
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/init_task.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/ia64/kernel/iosapic.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/iosapic.c	2004-07-01 21:32:31.000000000 +0100
@@ -100,7 +100,6 @@
 #endif
 
 static spinlock_t iosapic_lock = SPIN_LOCK_UNLOCKED;
-extern cpumask_t	__cacheline_aligned pending_irq_cpumask[NR_IRQS];
 
 /* These tables map IA-64 vectors to the IOSAPIC pin that generates this vector. */
 
@@ -335,21 +334,6 @@
 #endif
 }
 
-static inline void move_irq(int irq)
-{
-	/* note - we hold desc->lock */
-	cpumask_t tmp;
-	irq_desc_t *desc = irq_descp(irq);
-
-	if (!cpus_empty(pending_irq_cpumask[irq])) {
-		cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
-		if (unlikely(!cpus_empty(tmp))) {
-			desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
-		}
-		cpus_clear(pending_irq_cpumask[irq]);
-	}
-}
-
 /*
  * Handlers for level-triggered interrupts.
  */
@@ -483,7 +467,7 @@
 
 	index = find_iosapic(gsi);
 	if (index < 0) {
-		printk(KERN_WARNING "%s: No IOSAPIC for GSI 0x%x\n", __FUNCTION__, gsi);
+		printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n", __FUNCTION__, gsi);
 		return;
 	}
 
@@ -512,6 +496,42 @@
 	}
 }
 
+static unsigned int
+get_target_cpu (void)
+{
+#ifdef CONFIG_SMP
+	static int cpu = -1;
+
+	/*
+	 * If the platform supports redirection via XTP, let it
+	 * distribute interrupts.
+	 */
+	if (smp_int_redirect & SMP_IRQ_REDIRECTION)
+		return hard_smp_processor_id();
+
+	/*
+	 * Some interrupts (ACPI SCI, for instance) are registered
+	 * before the BSP is marked as online.
+	 */
+	if (!cpu_online(smp_processor_id()))
+		return hard_smp_processor_id();
+
+	/*
+	 * Otherwise, round-robin interrupt vectors across all the
+	 * processors.  (It'd be nice if we could be smarter in the
+	 * case of NUMA.)
+	 */
+	do {
+		if (++cpu >= NR_CPUS)
+			cpu = 0;
+	} while (!cpu_online(cpu));
+
+	return cpu_physical_id(cpu);
+#else
+	return hard_smp_processor_id();
+#endif
+}
+
 /*
  * ACPI can describe IOSAPIC interrupts via static tables and namespace
  * methods.  This provides an interface to register those interrupts and
@@ -522,21 +542,35 @@
 		       unsigned long polarity, unsigned long trigger)
 {
 	int vector;
-	unsigned int dest = (ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff;
+	unsigned int dest;
+	unsigned long flags;
 
-	vector = gsi_to_vector(gsi);
-	if (vector < 0)
-		vector = assign_irq_vector(AUTO_ASSIGN);
+	/*
+	 * If this GSI has already been registered (i.e., it's a
+	 * shared interrupt, or we lost a race to register it),
+	 * don't touch the RTE.
+	 */
+	spin_lock_irqsave(&iosapic_lock, flags);
+	{
+		vector = gsi_to_vector(gsi);
+		if (vector > 0) {
+			spin_unlock_irqrestore(&iosapic_lock, flags);
+			return vector;
+		}
 
-	register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY,
-		      polarity, trigger);
+		vector = assign_irq_vector(AUTO_ASSIGN);
+		dest = get_target_cpu();
+		register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY,
+			polarity, trigger);
+	}
+	spin_unlock_irqrestore(&iosapic_lock, flags);
 
-	printk(KERN_INFO "GSI 0x%x(%s,%s) -> CPU 0x%04x vector %d\n",
-	       gsi, (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
-	       (trigger == IOSAPIC_EDGE ? "edge" : "level"), dest, vector);
+	printk(KERN_INFO "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n",
+	       gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),
+	       (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
+	       cpu_logical_id(dest), dest, vector);
 
-	/* program the IOSAPIC routing table */
-	set_rte(vector, dest, 0);
+	set_rte(vector, dest, 1);
 	return vector;
 }
 
@@ -549,8 +583,9 @@
 				int iosapic_vector, u16 eid, u16 id,
 				unsigned long polarity, unsigned long trigger)
 {
+	static const char * const name[] = {"unknown", "PMI", "INIT", "CPEI"};
 	unsigned char delivery;
-	int vector;
+	int vector, mask = 0;
 	unsigned int dest = ((id << 8) | eid) & 0xffff;
 
 	switch (int_type) {
@@ -570,21 +605,22 @@
 	      case ACPI_INTERRUPT_CPEI:
 		vector = IA64_CPE_VECTOR;
 		delivery = IOSAPIC_LOWEST_PRIORITY;
+		mask = 1;
 		break;
 	      default:
-		printk(KERN_ERR "iosapic_register_platform_irq(): invalid int type\n");
+		printk(KERN_ERR "iosapic_register_platform_irq(): invalid int type 0x%x\n", int_type);
 		return -1;
 	}
 
-	register_intr(gsi, vector, delivery, polarity,
-		      trigger);
+	register_intr(gsi, vector, delivery, polarity, trigger);
 
-	printk(KERN_INFO "PLATFORM int 0x%x: GSI 0x%x(%s,%s) -> CPU 0x%04x vector %d\n",
-	       int_type, gsi, (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
-	       (trigger == IOSAPIC_EDGE ? "edge" : "level"), dest, vector);
+	printk(KERN_INFO "PLATFORM int %s (0x%x): GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n",
+	       int_type < ARRAY_SIZE(name) ? name[int_type] : "unknown",
+	       int_type, gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),
+	       (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
+	       cpu_logical_id(dest), dest, vector);
 
-	/* program the IOSAPIC routing table */
-	set_rte(vector, dest, 0);
+	set_rte(vector, dest, mask);
 	return vector;
 }
 
@@ -599,18 +635,18 @@
 			  unsigned long trigger)
 {
 	int vector;
-	unsigned int dest = (ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff;
+	unsigned int dest = hard_smp_processor_id();
 
 	vector = isa_irq_to_vector(isa_irq);
 
 	register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, polarity, trigger);
 
-	DBG("ISA: IRQ %u -> GSI 0x%x (%s,%s) -> CPU 0x%04x vector %d\n",
-	    isa_irq, gsi, polarity == IOSAPIC_POL_HIGH ? "high" : "low",
-	    trigger == IOSAPIC_EDGE ? "edge" : "level", dest, vector);
+	DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n",
+	    isa_irq, gsi, trigger == IOSAPIC_EDGE ? "edge" : "level",
+	    polarity == IOSAPIC_POL_HIGH ? "high" : "low",
+	    cpu_logical_id(dest), dest, vector);
 
-	/* program the IOSAPIC routing table */
-	set_rte(vector, dest, 0);
+	set_rte(vector, dest, 1);
 }
 
 void __init
@@ -665,104 +701,3 @@
 			iosapic_override_isa_irq(isa_irq, isa_irq, IOSAPIC_POL_HIGH, IOSAPIC_EDGE);
 	}
 }
-
-void
-iosapic_enable_intr (unsigned int vector)
-{
-	unsigned int dest;
-	irq_desc_t *desc;
-
-	/*
-	 * In the case of a shared interrupt, do not re-route the vector, and
-	 * especially do not mask a running interrupt (startup will not get
-	 * called for a shared interrupt).
-	 */
-	desc = irq_descp(vector);
-	if (desc->action)
-		return;
-
-#ifdef CONFIG_SMP
-	/*
-	 * For platforms that do not support interrupt redirect via the XTP interface, we
-	 * can round-robin the PCI device interrupts to the processors
-	 */
-	if (!(smp_int_redirect & SMP_IRQ_REDIRECTION)) {
-		static int cpu_index = -1;
-
-		do
-			if (++cpu_index >= NR_CPUS)
-				cpu_index = 0;
-		while (!cpu_online(cpu_index));
-
-		dest = cpu_physical_id(cpu_index) & 0xffff;
-	} else {
-		/*
-		 * Direct the interrupt vector to the current cpu, platform redirection
-		 * will distribute them.
-		 */
-		dest = (ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff;
-	}
-#else
-	/* direct the interrupt vector to the running cpu id */
-	dest = (ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff;
-#endif
-	set_rte(vector, dest, 1);
-
-	printk(KERN_INFO "IOSAPIC: vector %d -> CPU 0x%04x, enabled\n",
-	       vector, dest);
-}
-
-#ifdef CONFIG_ACPI_PCI
-
-void __init
-iosapic_parse_prt (void)
-{
-	struct acpi_prt_entry *entry;
-	struct list_head *node;
-	unsigned int gsi;
-	int vector;
-	char pci_id[16];
-	struct hw_interrupt_type *irq_type = &irq_type_iosapic_level;
-	irq_desc_t *idesc;
-
-	list_for_each(node, &acpi_prt.entries) {
-		entry = list_entry(node, struct acpi_prt_entry, node);
-
-		/* We're only interested in static (non-link) entries.  */
-		if (entry->link.handle)
-			continue;
-
-		gsi = entry->link.index;
-
-		vector = gsi_to_vector(gsi);
-		if (vector < 0) {
-			if (find_iosapic(gsi) < 0)
-				continue;
-
-			/* allocate a vector for this interrupt line */
-			if (pcat_compat && (gsi < 16))
-				vector = isa_irq_to_vector(gsi);
-			else
-				/* new GSI; allocate a vector for it */
-				vector = assign_irq_vector(AUTO_ASSIGN);
-
-			register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW,
-				      IOSAPIC_LEVEL);
-		}
-		entry->irq = vector;
-		snprintf(pci_id, sizeof(pci_id), "%02x:%02x:%02x[%c]",
-			 entry->id.segment, entry->id.bus, entry->id.device, 'A' + entry->pin);
-
-		/*
-		 * If vector was previously initialized to a different
-		 * handler, re-initialize.
-		 */
-		idesc = irq_descp(vector);
-		if (idesc->handler != irq_type)
-			register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW,
-				      IOSAPIC_LEVEL);
-
-	}
-}
-
-#endif /* CONFIG_ACPI */
--- diff/arch/ia64/kernel/irq.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/irq.c	2004-07-01 21:32:31.000000000 +0100
@@ -538,6 +538,11 @@
 		desc->handler->end(irq);
 		spin_unlock(&desc->lock);
 	}
+
+#ifdef	CONFIG_KGDB
+	kgdb_process_breakpoint();
+#endif
+
 	return 1;
 }
 
@@ -607,7 +612,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
@@ -1018,6 +1023,22 @@
 	return full_count;
 }
 
+void move_irq(int irq)
+{
+	/* note - we hold desc->lock */
+	cpumask_t tmp;
+	irq_desc_t *desc = irq_descp(irq);
+
+	if (!cpus_empty(pending_irq_cpumask[irq])) {
+		cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
+		if (unlikely(!cpus_empty(tmp))) {
+			desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
+		}
+		cpus_clear(pending_irq_cpumask[irq]);
+	}
+}
+
+
 #endif /* CONFIG_SMP */
 
 #ifdef CONFIG_HOTPLUG_CPU
--- diff/arch/ia64/kernel/ivt.S	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/ivt.S	2004-07-01 21:32:31.000000000 +0100
@@ -68,6 +68,13 @@
 # define DBG_FAULT(i)
 #endif
 
+#ifdef	CONFIG_KGDB
+#define	KGDB_ENABLE_PSR_DB mov r31=psr;; movl r30=IA64_PSR_DB;; or r31=r31,r30;; \
+		mov psr.l=r31;; srlz.i;;
+#else
+#define	KGDB_ENABLE_PSR_DB
+#endif
+
 #define MINSTATE_VIRT	/* needed by minstate.h */
 #include "minstate.h"
 
@@ -473,6 +480,7 @@
 	movl r14=ia64_leave_kernel
 	;;
 	SAVE_REST
+	KGDB_ENABLE_PSR_DB
 	mov rp=r14
 	;;
 	adds out2=16,r12			// out2 = pointer to pt_regs
@@ -733,6 +741,8 @@
 	;;
 	srlz.i					// guarantee that interruption collection is on
 	;;
+	KGDB_ENABLE_PSR_DB
+	;;
 (p15)	ssm psr.i				// restore psr.i
 	;;
 	mov r3=NR_syscalls - 1
@@ -774,6 +784,7 @@
 	srlz.i			// ensure everybody knows psr.ic is back on
 	;;
 	SAVE_REST
+	KGDB_ENABLE_PSR_DB
 	;;
 	alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group
 	mov out0=cr.ivr		// pass cr.ivr as first arg
@@ -1001,6 +1012,7 @@
 	movl r15=ia64_leave_kernel
 	;;
 	SAVE_REST
+	KGDB_ENABLE_PSR_DB
 	mov rp=r15
 	;;
 	br.call.sptk.many b6=ia64_bad_break	// avoid WAW on CFM and ignore return addr
@@ -1034,6 +1046,7 @@
 	adds r3=8,r2				// set up second base pointer
 	;;
 	SAVE_REST
+	KGDB_ENABLE_PSR_DB
 	movl r14=ia64_leave_kernel
 	;;
 	mov rp=r14
@@ -1076,6 +1089,7 @@
 	adds r3=8,r2				// set up second base pointer for SAVE_REST
 	;;
 	SAVE_REST
+	KGDB_ENABLE_PSR_DB
 	movl r14=ia64_leave_kernel
 	;;
 	mov rp=r14
--- diff/arch/ia64/kernel/machvec.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/machvec.c	2004-07-01 21:32:31.000000000 +0100
@@ -62,6 +62,12 @@
 EXPORT_SYMBOL(machvec_timer_interrupt);
 
 void
+machvec_tlb_migrate_finish (struct mm_struct *mm)
+{
+}
+EXPORT_SYMBOL(machvec_tlb_migrate_finish);
+
+void
 machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir)
 {
 	mb();
--- diff/arch/ia64/kernel/mca.c	2004-05-19 22:11:03.000000000 +0100
+++ source/arch/ia64/kernel/mca.c	2004-07-01 21:32:31.000000000 +0100
@@ -108,6 +108,7 @@
 #define MAX_CPE_POLL_INTERVAL (15*60*HZ) /* 15 minutes */
 #define MIN_CPE_POLL_INTERVAL (2*60*HZ)  /* 2 minutes */
 #define CMC_POLL_INTERVAL     (1*60*HZ)  /* 1 minute */
+#define CPE_HISTORY_LENGTH    5
 #define CMC_HISTORY_LENGTH    5
 
 static struct timer_list cpe_poll_timer;
@@ -127,6 +128,8 @@
  */
 static int cpe_poll_enabled = 1;
 
+static int cpe_vector = -1;
+
 extern void salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe);
 
 /*
@@ -267,20 +270,65 @@
  */
 #ifndef PLATFORM_MCA_HANDLERS
 
+#ifdef CONFIG_ACPI
+
 static irqreturn_t
 ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs)
 {
-	IA64_MCA_DEBUG("%s: received interrupt. CPU:%d vector = %#x\n",
-		       __FUNCTION__, smp_processor_id(), cpe_irq);
+	static unsigned long	cpe_history[CPE_HISTORY_LENGTH];
+	static int		index;
+	static spinlock_t	cpe_history_lock = SPIN_LOCK_UNLOCKED;
+
+	IA64_MCA_DEBUG("%s: received interrupt vector = %#x on CPU %d\n",
+		       __FUNCTION__, cpe_irq, smp_processor_id());
 
 	/* SAL spec states this should run w/ interrupts enabled */
 	local_irq_enable();
 
-	/* Get the CMC error record and log it */
+	/* Get the CPE error record and log it */
 	ia64_mca_log_sal_error_record(SAL_INFO_TYPE_CPE);
+
+	spin_lock(&cpe_history_lock);
+	if (!cpe_poll_enabled && cpe_vector >= 0) {
+
+		int i, count = 1; /* we know 1 happened now */
+		unsigned long now = jiffies;
+
+		for (i = 0; i < CPE_HISTORY_LENGTH; i++) {
+			if (now - cpe_history[i] <= HZ)
+				count++;
+		}
+
+		IA64_MCA_DEBUG(KERN_INFO "CPE threshold %d/%d\n", count, CPE_HISTORY_LENGTH);
+		if (count >= CPE_HISTORY_LENGTH) {
+
+			cpe_poll_enabled = 1;
+			spin_unlock(&cpe_history_lock);
+			disable_irq_nosync(local_vector_to_irq(IA64_CPE_VECTOR));
+
+			/*
+			 * Corrected errors will still be corrected, but
+			 * make sure there's a log somewhere that indicates
+			 * something is generating more than we can handle.
+			 */
+			printk(KERN_WARNING "WARNING: Switching to polling CPE handler; error records may be lost\n");
+
+			mod_timer(&cpe_poll_timer, jiffies + MIN_CPE_POLL_INTERVAL);
+
+			/* lock already released, get out now */
+			return IRQ_HANDLED;
+		} else {
+			cpe_history[index++] = now;
+			if (index == CPE_HISTORY_LENGTH)
+				index = 0;
+		}
+	}
+	spin_unlock(&cpe_history_lock);
 	return IRQ_HANDLED;
 }
 
+#endif /* CONFIG_ACPI */
+
 static void
 show_min_state (pal_min_state_area_t *minstate)
 {
@@ -901,7 +949,7 @@
  * 	handled
  */
 static irqreturn_t
-ia64_mca_cmc_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs)
+ia64_mca_cmc_int_caller(int cmc_irq, void *arg, struct pt_regs *ptregs)
 {
 	static int start_count = -1;
 	unsigned int cpuid;
@@ -912,7 +960,7 @@
 	if (start_count == -1)
 		start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CMC);
 
-	ia64_mca_cmc_int_handler(cpe_irq, arg, ptregs);
+	ia64_mca_cmc_int_handler(cmc_irq, arg, ptregs);
 
 	for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++);
 
@@ -967,11 +1015,13 @@
  * Outputs
  * 	handled
  */
+#ifdef CONFIG_ACPI
+
 static irqreturn_t
 ia64_mca_cpe_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs)
 {
 	static int start_count = -1;
-	static int poll_time = MAX_CPE_POLL_INTERVAL;
+	static int poll_time = MIN_CPE_POLL_INTERVAL;
 	unsigned int cpuid;
 
 	cpuid = smp_processor_id();
@@ -989,20 +1039,30 @@
 	} else {
 		/*
 		 * If a log was recorded, increase our polling frequency,
-		 * otherwise, backoff.
+		 * otherwise, backoff or return to interrupt mode.
 		 */
 		if (start_count != IA64_LOG_COUNT(SAL_INFO_TYPE_CPE)) {
 			poll_time = max(MIN_CPE_POLL_INTERVAL, poll_time / 2);
-		} else {
+		} else if (cpe_vector < 0) {
 			poll_time = min(MAX_CPE_POLL_INTERVAL, poll_time * 2);
+		} else {
+			poll_time = MIN_CPE_POLL_INTERVAL;
+
+			printk(KERN_WARNING "Returning to interrupt driven CPE handler\n");
+			enable_irq(local_vector_to_irq(IA64_CPE_VECTOR));
+			cpe_poll_enabled = 0;
 		}
+
+		if (cpe_poll_enabled)
+			mod_timer(&cpe_poll_timer, jiffies + poll_time);
 		start_count = -1;
-		mod_timer(&cpe_poll_timer, jiffies + poll_time);
 	}
 
 	return IRQ_HANDLED;
 }
 
+#endif /* CONFIG_ACPI */
+
 /*
  *  ia64_mca_cpe_poll
  *
@@ -1240,21 +1300,23 @@
 	register_percpu_irq(IA64_MCA_WAKEUP_VECTOR, &mca_wkup_irqaction);
 
 #ifdef CONFIG_ACPI
-	/* Setup the CPE interrupt vector */
+	/* Setup the CPEI/P vector and handler */
 	{
 		irq_desc_t *desc;
 		unsigned int irq;
-		int cpev = acpi_request_vector(ACPI_INTERRUPT_CPEI);
 
-		if (cpev >= 0) {
+		cpe_vector = acpi_request_vector(ACPI_INTERRUPT_CPEI);
+
+		if (cpe_vector >= 0) {
 			for (irq = 0; irq < NR_IRQS; ++irq)
-				if (irq_to_vector(irq) == cpev) {
+				if (irq_to_vector(irq) == cpe_vector) {
 					desc = irq_descp(irq);
 					desc->status |= IRQ_PER_CPU;
 					setup_irq(irq, &mca_cpe_irqaction);
 				}
-			ia64_mca_register_cpev(cpev);
+			ia64_mca_register_cpev(cpe_vector);
 		}
+		register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction);
 	}
 #endif
 
@@ -1294,9 +1356,10 @@
 
 #ifdef CONFIG_ACPI
 	/* If platform doesn't support CPEI, get the timer going. */
-	if (acpi_request_vector(ACPI_INTERRUPT_CPEI) < 0 && cpe_poll_enabled) {
-		register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction);
+	if (cpe_vector < 0 && cpe_poll_enabled) {
 		ia64_mca_cpe_poll(0UL);
+	} else {
+		cpe_poll_enabled = 0;
 	}
 #endif
 
--- diff/arch/ia64/kernel/palinfo.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/palinfo.c	2004-07-01 21:32:31.000000000 +0100
@@ -515,10 +515,10 @@
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL,
-	"Enable Cache Line Repl. Exclusive",
 	"Enable Cache Line Repl. Shared",
+	"Enable Cache Line Repl. Exclusive",
 	"Disable Transaction Queuing",
-	"Disable Reponse Error Checking",
+	"Disable Response Error Checking",
 	"Disable Bus Error Checking",
 	"Disable Bus Requester Internal Error Signalling",
 	"Disable Bus Requester Error Signalling",
--- diff/arch/ia64/kernel/perfmon.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/perfmon.c	2004-07-01 21:32:31.000000000 +0100
@@ -311,6 +311,7 @@
 	unsigned int		ctx_cpu;		/* cpu to which perfmon is applied (system wide) */
 
 	int			ctx_fd;			/* file descriptor used my this context */
+	pfm_ovfl_arg_t		ctx_ovfl_arg;		/* argument to custom buffer format handler */
 
 	pfm_buffer_fmt_t	*ctx_buf_fmt;		/* buffer format callbacks */
 	void			*ctx_smpl_hdr;		/* points to sampling buffer header kernel vaddr */
@@ -4584,31 +4585,6 @@
 	return 0;
 }
 
-static void
-pfm_force_cleanup(pfm_context_t *ctx, struct pt_regs *regs)
-{
-	struct task_struct *task = ctx->ctx_task;
-
-	ia64_psr(regs)->up = 0;
-	ia64_psr(regs)->sp = 1;
-
-	if (GET_PMU_OWNER() == task) {
-		DPRINT(("cleared ownership for [%d]\n", ctx->ctx_task->pid));
-		SET_PMU_OWNER(NULL, NULL);
-	}
-
-	/*
-	 * disconnect the task from the context and vice-versa
-	 */
-	PFM_SET_WORK_PENDING(task, 0);
-
-	task->thread.pfm_context  = NULL;
-	task->thread.flags       &= ~IA64_THREAD_PM_VALID;
-
-	DPRINT(("force cleanupf for [%d]\n",  task->pid));
-}
-
-
 
 /*
  * called only from exit_thread(): task == current
@@ -5185,7 +5161,7 @@
 static void
 pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, struct pt_regs *regs)
 {
-	pfm_ovfl_arg_t ovfl_arg;
+	pfm_ovfl_arg_t *ovfl_arg;
 	unsigned long mask;
 	unsigned long old_val, ovfl_val, new_val;
 	unsigned long ovfl_notify = 0UL, ovfl_pmds = 0UL, smpl_pmds = 0UL, reset_pmds;
@@ -5272,7 +5248,8 @@
 		int j, k, ret = 0;
 		int this_cpu = smp_processor_id();
 
-		pmd_mask   = ovfl_pmds >> PMU_FIRST_COUNTER;
+		pmd_mask = ovfl_pmds >> PMU_FIRST_COUNTER;
+		ovfl_arg = &ctx->ctx_ovfl_arg;
 
 		prefetch(ctx->ctx_smpl_hdr);
 
@@ -5282,15 +5259,15 @@
 
 			if ((pmd_mask & 0x1) == 0) continue;
 
-			ovfl_arg.ovfl_pmd      = (unsigned char )i;
-			ovfl_arg.ovfl_notify   = ovfl_notify & mask ? 1 : 0;
-			ovfl_arg.active_set    = 0;
-			ovfl_arg.ovfl_ctrl.val = 0; /* module must fill in all fields */
-			ovfl_arg.smpl_pmds[0]  = smpl_pmds = ctx->ctx_pmds[i].smpl_pmds[0];
-
-			ovfl_arg.pmd_value      = ctx->ctx_pmds[i].val;
-			ovfl_arg.pmd_last_reset = ctx->ctx_pmds[i].lval;
-			ovfl_arg.pmd_eventid    = ctx->ctx_pmds[i].eventid;
+			ovfl_arg->ovfl_pmd      = (unsigned char )i;
+			ovfl_arg->ovfl_notify   = ovfl_notify & mask ? 1 : 0;
+			ovfl_arg->active_set    = 0;
+			ovfl_arg->ovfl_ctrl.val = 0; /* module must fill in all fields */
+			ovfl_arg->smpl_pmds[0]  = smpl_pmds = ctx->ctx_pmds[i].smpl_pmds[0];
+
+			ovfl_arg->pmd_value      = ctx->ctx_pmds[i].val;
+			ovfl_arg->pmd_last_reset = ctx->ctx_pmds[i].lval;
+			ovfl_arg->pmd_eventid    = ctx->ctx_pmds[i].eventid;
 
 			/*
 		 	 * copy values of pmds of interest. Sampling format may copy them
@@ -5299,8 +5276,8 @@
 			if (smpl_pmds) {
 				for(j=0, k=0; smpl_pmds; j++, smpl_pmds >>=1) {
 					if ((smpl_pmds & 0x1) == 0) continue;
-					ovfl_arg.smpl_pmds_values[k++] = PMD_IS_COUNTING(j) ?  pfm_read_soft_counter(ctx, j) : ia64_get_pmd(j);
-					DPRINT_ovfl(("smpl_pmd[%d]=pmd%u=0x%lx\n", k-1, j, ovfl_arg.smpl_pmds_values[k-1]));
+					ovfl_arg->smpl_pmds_values[k++] = PMD_IS_COUNTING(j) ?  pfm_read_soft_counter(ctx, j) : ia64_get_pmd(j);
+					DPRINT_ovfl(("smpl_pmd[%d]=pmd%u=0x%lx\n", k-1, j, ovfl_arg->smpl_pmds_values[k-1]));
 				}
 			}
 
@@ -5311,7 +5288,7 @@
 			/*
 		 	 * call custom buffer format record (handler) routine
 		 	 */
-			ret = (*ctx->ctx_buf_fmt->fmt_handler)(task, ctx->ctx_smpl_hdr, &ovfl_arg, regs, tstamp);
+			ret = (*ctx->ctx_buf_fmt->fmt_handler)(task, ctx->ctx_smpl_hdr, ovfl_arg, regs, tstamp);
 
 			end_cycles = ia64_get_itc();
 
@@ -5319,13 +5296,13 @@
 			 * For those controls, we take the union because they have
 			 * an all or nothing behavior.
 			 */
-			ovfl_ctrl.bits.notify_user     |= ovfl_arg.ovfl_ctrl.bits.notify_user;
-			ovfl_ctrl.bits.block_task      |= ovfl_arg.ovfl_ctrl.bits.block_task;
-			ovfl_ctrl.bits.mask_monitoring |= ovfl_arg.ovfl_ctrl.bits.mask_monitoring;
+			ovfl_ctrl.bits.notify_user     |= ovfl_arg->ovfl_ctrl.bits.notify_user;
+			ovfl_ctrl.bits.block_task      |= ovfl_arg->ovfl_ctrl.bits.block_task;
+			ovfl_ctrl.bits.mask_monitoring |= ovfl_arg->ovfl_ctrl.bits.mask_monitoring;
 			/*
 			 * build the bitmask of pmds to reset now
 			 */
-			if (ovfl_arg.ovfl_ctrl.bits.reset_ovfl_pmds) reset_pmds |= mask;
+			if (ovfl_arg->ovfl_ctrl.bits.reset_ovfl_pmds) reset_pmds |= mask;
 
 			pfm_stats[this_cpu].pfm_smpl_handler_cycles += end_cycles - start_cycles;
 		}
@@ -5793,6 +5770,32 @@
 }
 
 #ifdef CONFIG_SMP
+
+static void
+pfm_force_cleanup(pfm_context_t *ctx, struct pt_regs *regs)
+{
+	struct task_struct *task = ctx->ctx_task;
+
+	ia64_psr(regs)->up = 0;
+	ia64_psr(regs)->sp = 1;
+
+	if (GET_PMU_OWNER() == task) {
+		DPRINT(("cleared ownership for [%d]\n", ctx->ctx_task->pid));
+		SET_PMU_OWNER(NULL, NULL);
+	}
+
+	/*
+	 * disconnect the task from the context and vice-versa
+	 */
+	PFM_SET_WORK_PENDING(task, 0);
+
+	task->thread.pfm_context  = NULL;
+	task->thread.flags       &= ~IA64_THREAD_PM_VALID;
+
+	DPRINT(("force cleanup for [%d]\n",  task->pid));
+}
+
+
 /*
  * in 2.6, interrupts are masked when we come here and the runqueue lock is held
  */
--- diff/arch/ia64/kernel/process.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/process.c	2004-07-01 21:32:31.000000000 +0100
@@ -407,6 +407,9 @@
 	 */
 	child_ptregs->cr_ipsr = ((child_ptregs->cr_ipsr | IA64_PSR_BITS_TO_SET)
 				 & ~(IA64_PSR_BITS_TO_CLEAR | IA64_PSR_PP | IA64_PSR_UP));
+#ifdef	CONFIG_KGDB
+	child_ptregs->cr_ipsr |= IA64_PSR_DB;
+#endif
 
 	/*
 	 * NOTE: The calling convention considers all floating point
@@ -439,6 +442,10 @@
 		ia32_save_state(p);
 		if (clone_flags & CLONE_SETTLS)
 			retval = ia32_clone_tls(p, child_ptregs);
+
+		/* Copy partially mapped page list */
+		if (!retval)
+			retval = ia32_copy_partial_page_list(p, clone_flags);
 	}
 #endif
 
@@ -639,6 +646,9 @@
 	regs.pt.r11 = (unsigned long) arg;	/* 2nd argument */
 	/* Preserve PSR bits, except for bits 32-34 and 37-45, which we can't read.  */
 	regs.pt.cr_ipsr = ia64_getreg(_IA64_REG_PSR) | IA64_PSR_BN;
+#ifdef	CONFIG_KGDB
+	regs.pt.cr_ipsr |= IA64_PSR_DB;
+#endif
 	regs.pt.cr_ifs = 1UL << 63;		/* mark as valid, empty frame */
 	regs.sw.ar_fpsr = regs.pt.ar_fpsr = ia64_getreg(_IA64_REG_AR_FPSR);
 	regs.sw.ar_bspstore = (unsigned long) current + IA64_RBS_OFFSET;
@@ -672,6 +682,8 @@
 	/* drop floating-point and debug-register state if it exists: */
 	current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
 	ia64_drop_fpu(current);
+	if (IS_IA32_PROCESS(ia64_task_regs(current)))
+		ia32_drop_partial_page_list(current);
 }
 
 /*
@@ -691,6 +703,8 @@
 	if (current->thread.flags & IA64_THREAD_DBG_VALID)
 		pfm_release_debug_registers(current);
 #endif
+	if (IS_IA32_PROCESS(ia64_task_regs(current)))
+		ia32_drop_partial_page_list(current);
 }
 
 unsigned long
--- diff/arch/ia64/kernel/setup.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/setup.c	2004-07-01 21:32:31.000000000 +0100
@@ -47,9 +47,11 @@
 #include <asm/sal.h>
 #include <asm/sections.h>
 #include <asm/serial.h>
+#include <asm/setup.h>
 #include <asm/smp.h>
 #include <asm/system.h>
 #include <asm/unistd.h>
+#include <asm/kgdb.h>
 
 #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
 # error "struct cpuinfo_ia64 too big!"
@@ -88,10 +90,6 @@
 unsigned long ia64_max_iommu_merge_mask = ~0UL;
 EXPORT_SYMBOL(ia64_max_iommu_merge_mask);
 
-#define COMMAND_LINE_SIZE	512
-
-char saved_command_line[COMMAND_LINE_SIZE]; /* used in proc filesystem */
-
 /*
  * We use a special marker for the end of memory and it uses the extra (+1) slot
  */
@@ -288,7 +286,7 @@
 	ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);
 
 	*cmdline_p = __va(ia64_boot_param->command_line);
-	strlcpy(saved_command_line, *cmdline_p, sizeof(saved_command_line));
+	strlcpy(saved_command_line, *cmdline_p, COMMAND_LINE_SIZE);
 
 	efi_init();
 	io_port_init();
@@ -323,37 +321,61 @@
 #ifdef CONFIG_ACPI_BOOT
 	acpi_boot_init();
 #endif
-#ifdef CONFIG_SERIAL_8250_CONSOLE
-#ifdef CONFIG_SERIAL_8250_HCDP
-	if (efi.hcdp) {
-		void setup_serial_hcdp(void *);
-		setup_serial_hcdp(efi.hcdp);
-	}
+#ifdef CONFIG_EFI_PCDP
+	efi_setup_pcdp_console(*cmdline_p);
 #endif
+#ifdef CONFIG_SERIAL_8250_CONSOLE
 	if (!efi.hcdp)
 		setup_serial_legacy();
 #endif
 
 #ifdef CONFIG_VT
+	if (!conswitchp) {
 # if defined(CONFIG_DUMMY_CONSOLE)
-	conswitchp = &dummy_con;
+		conswitchp = &dummy_con;
 # endif
 # if defined(CONFIG_VGA_CONSOLE)
-	/*
-	 * Non-legacy systems may route legacy VGA MMIO range to system
-	 * memory.  vga_con probes the MMIO hole, so memory looks like
-	 * a VGA device to it.  The EFI memory map can tell us if it's
-	 * memory so we can avoid this problem.
-	 */
-	if (efi_mem_type(0xA0000) != EFI_CONVENTIONAL_MEMORY)
-		conswitchp = &vga_con;
+		/*
+		 * Non-legacy systems may route legacy VGA MMIO range to system
+		 * memory.  vga_con probes the MMIO hole, so memory looks like
+		 * a VGA device to it.  The EFI memory map can tell us if it's
+		 * memory so we can avoid this problem.
+		 */
+		if (efi_mem_type(0xA0000) != EFI_CONVENTIONAL_MEMORY)
+			conswitchp = &vga_con;
 # endif
+	}
 #endif
+#ifndef	CONFIG_IA64_HP_SIM
+#ifdef	CONFIG_KGDB
+	{
+		unsigned long total_ibr, total_dbr;
+		long status;
+		int dbr;
+
+		status = ia64_pal_debug_info(&total_ibr, &total_dbr);
+
+		if (!status) {
+			printk(KERN_INFO "kgdb has DBR = %d IBR = %d\n",
+				(int) total_dbr, (int) total_ibr);
+
+			for (dbr = 0; dbr < total_dbr; dbr++)
+				ia64_set_dbr((dbr << 1) + 1, 0);
+			for (dbr = 0; dbr < total_ibr; dbr++)
+				ia64_set_ibr((dbr << 1) + 1, 0);
+		}
+	}
+#endif
+#endif
+
 
 	/* enable IA-64 Machine Check Abort Handling */
 	ia64_mca_init();
 
 	platform_setup(cmdline_p);
+#ifdef	CONFIG_KGDB_EARLY
+	kgdb_serial_init();
+#endif
 	paging_init();
 }
 
--- diff/arch/ia64/kernel/smp.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/smp.c	2004-07-01 21:32:31.000000000 +0100
@@ -47,6 +47,7 @@
 #include <asm/tlbflush.h>
 #include <asm/unistd.h>
 #include <asm/mca.h>
+#include <asm/kgdb.h>
 
 /*
  * Structure and data for smp_call_function(). This is designed to minimise static memory
@@ -66,6 +67,9 @@
 
 #define IPI_CALL_FUNC		0
 #define IPI_CPU_STOP		1
+#ifdef	CONFIG_KGDB
+#define	IPI_KGDB_INTERRUPT	2
+#endif
 
 /* This needs to be cacheline aligned because it is written to by *other* CPUs.  */
 static DEFINE_PER_CPU(u64, ipi_operation) ____cacheline_aligned;
@@ -156,6 +160,12 @@
 				stop_this_cpu();
 				break;
 
+#ifdef	CONFIG_KGDB
+			      case IPI_KGDB_INTERRUPT:
+				(void) in_kgdb(regs, NULL);
+				break;
+#endif
+
 			      default:
 				printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n", this_cpu, which);
 				break;
@@ -361,6 +371,14 @@
 }
 EXPORT_SYMBOL(smp_call_function);
 
+#ifdef	CONFIG_KGDB
+void
+smp_send_nmi_allbutself(void)
+{
+	send_IPI_allbutself(IPI_KGDB_INTERRUPT);
+}
+#endif
+
 /*
  * this function calls the 'stop' function on all other CPUs in the system.
  */
--- diff/arch/ia64/kernel/smpboot.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/smpboot.c	2004-07-01 21:32:31.000000000 +0100
@@ -400,14 +400,11 @@
 
 	if (IS_ERR(c_idle.idle))
 		panic("failed fork for CPU %d", cpu);
-	wake_up_forked_process(c_idle.idle);
 
-	/*
-	 * We remove it from the pidhash and the runqueue
-	 * once we got the process:
-	 */
+	/* Make this the idle thread */
 	init_idle(c_idle.idle, cpu);
 
+	/* Remove it from the pidhash */
 	unhash_process(c_idle.idle);
 
 	task_for_booting_cpu = c_idle.idle;
--- diff/arch/ia64/kernel/traps.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/traps.c	2004-07-01 21:32:31.000000000 +0100
@@ -35,6 +35,19 @@
 		fpswa_interface = __va(ia64_boot_param->fpswa);
 }
 
+#ifdef	CONFIG_KGDB
+extern int kgdb_handle_exception(int, int, int, struct pt_regs *);
+#define	CHK_REMOTE_DEBUG(trapnr, signr, error_code, regs, after)		\
+	{									\
+		if (!user_mode(regs)) {						\
+			kgdb_handle_exception(trapnr, signr, error_code, regs);	\
+			after;							\
+		}								\
+	}
+#else
+#define	CHK_REMOTE_DEBUG(trapnr, signr, error_code, regs, after)
+#endif
+
 /*
  * Unlock any spinlocks which will prevent us from getting the message out (timerlist_lock
  * is acquired through the console unblank code)
@@ -85,6 +98,8 @@
 		bust_spinlocks(1);
 	}
 
+	CHK_REMOTE_DEBUG(-1, SIGTRAP, err, regs,)
+
 	if (++die.lock_owner_depth < 3) {
 		printk("%s[%d]: %s %ld [%d]\n",
 			current->comm, current->pid, str, err, ++die_counter);
@@ -117,9 +132,13 @@
 	siginfo.si_flags = 0;		/* clear __ISR_VALID */
 	siginfo.si_isr = 0;
 
+
+
 	switch (break_num) {
 	      case 0: /* unknown error (used by GCC for __builtin_abort()) */
+#ifndef	CONFIG_KGDB
 		die_if_kernel("bugcheck!", regs, break_num);
+#endif
 		sig = SIGILL; code = ILL_ILLOPC;
 		break;
 
@@ -172,8 +191,10 @@
 		break;
 
 	      default:
+#ifndef	CONFIG_KGDB
 		if (break_num < 0x40000 || break_num > 0x100000)
 			die_if_kernel("Bad break", regs, break_num);
+#endif
 
 		if (break_num < 0x80000) {
 			sig = SIGILL; code = __ILL_BREAK;
@@ -181,6 +202,13 @@
 			sig = SIGTRAP; code = TRAP_BRKPT;
 		}
 	}
+#ifdef	CONFIG_KGDB
+	/*
+	 * We don't want to trap simulator system calls.
+	 */
+	if (break_num != 0x80001)
+		CHK_REMOTE_DEBUG(11, sig, break_num, regs, return)
+#endif
 	siginfo.si_signo = sig;
 	siginfo.si_errno = 0;
 	siginfo.si_code = code;
@@ -488,8 +516,9 @@
 		break;
 
 	      case 29: /* Debug */
-	      case 35: /* Taken Branch Trap */
 	      case 36: /* Single Step Trap */
+		CHK_REMOTE_DEBUG(vector, SIGTRAP, isr, regs, return)
+	      case 35: /* Taken Branch Trap */
 		if (fsys_mode(current, regs)) {
 			extern char __kernel_syscall_via_break[];
 			/*
@@ -603,6 +632,7 @@
 		sprintf(buf, "Fault %lu", vector);
 		break;
 	}
+	CHK_REMOTE_DEBUG(vector, SIGTRAP, isr, regs,)
 	die_if_kernel(buf, regs, error);
 	force_sig(SIGILL, current);
 }
--- diff/arch/ia64/kernel/unwind.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/kernel/unwind.c	2004-07-01 21:32:31.000000000 +0100
@@ -75,10 +75,69 @@
 # define STAT(x...)
 #endif
 
+
+#ifdef	CONFIG_KGDB_EARLY
+#define	KGDB_EARLY_SIZE	100
+static struct unw_reg_state __initdata kgdb_reg_state[KGDB_EARLY_SIZE];
+static struct unw_labeled_state __initdata kgdb_labeled_state[KGDB_EARLY_SIZE];
+void __initdata *kgdb_reg_state_free, __initdata *kgdb_labeled_state_free;
+
+static void __init
+kgdb_malloc_init(void)
+{
+	int i;
+
+	kgdb_reg_state_free = kgdb_reg_state;
+	for (i = 1; i < KGDB_EARLY_SIZE; i++) {
+		*((unsigned long *) &kgdb_reg_state[i]) = (unsigned long) kgdb_reg_state_free;
+		kgdb_reg_state_free = &kgdb_reg_state[i];
+	}
+
+	kgdb_labeled_state_free = kgdb_labeled_state;
+	for (i = 1; i < KGDB_EARLY_SIZE; i++) {
+		*((unsigned long *) &kgdb_labeled_state[i]) =
+			(unsigned long) kgdb_labeled_state_free;
+		kgdb_labeled_state_free = &kgdb_labeled_state[i];
+	}
+
+}
+
+static void * __init
+kgdb_malloc(void **mem)
+{
+	void *p;
+
+	p = *mem;
+	*mem = *((void **) p);
+	return p;
+}
+
+static void __init
+kgdb_free(void **mem, void *p)
+{
+	*((void **)p) = *mem;
+	*mem = p;
+}
+
+#define alloc_reg_state()	(!malloc_sizes[0].cs_cachep ? 		\
+		kgdb_malloc(&kgdb_reg_state_free) : 			\
+		kmalloc(sizeof(struct unw_reg_state), GFP_ATOMIC))
+#define free_reg_state(usr)	(!malloc_sizes[0].cs_cachep ?		\
+		kgdb_free(&kgdb_reg_state_free, usr) :			\
+		kfree(usr))
+#define alloc_labeled_state()	(!malloc_sizes[0].cs_cachep ?		\
+		kgdb_malloc(&kgdb_labeled_state_free) :			\
+		kmalloc(sizeof(struct unw_labeled_state), GFP_ATOMIC))
+#define free_labeled_state(usr)	(!malloc_sizes[0].cs_cachep ?		\
+		kgdb_free(&kgdb_labeled_state_free, usr) :		\
+		kfree(usr))
+
+#else
 #define alloc_reg_state()	kmalloc(sizeof(struct unw_reg_state), GFP_ATOMIC)
 #define free_reg_state(usr)	kfree(usr)
 #define alloc_labeled_state()	kmalloc(sizeof(struct unw_labeled_state), GFP_ATOMIC)
 #define free_labeled_state(usr)	kfree(usr)
+#endif
 
 typedef unsigned long unw_word;
 typedef unsigned char unw_hash_index_t;
@@ -385,9 +444,10 @@
 	}
 
 	if (write) {
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else {
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else {
 			*addr = *val;
 			if (*nat)
 				*nat_addr |= nat_mask;
@@ -432,9 +492,10 @@
 		return -1;
 	}
 	if (write)
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else
 			*addr = *val;
 	else
 		*val = *addr;
@@ -480,9 +541,10 @@
 	}
 
 	if (write)
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else
 			*addr = *val;
 	else
 		*val = *addr;
@@ -576,9 +638,10 @@
 	}
 
 	if (write) {
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else
 			*addr = *val;
 	} else
 		*val = *addr;
@@ -596,9 +659,10 @@
 		addr = &info->sw->pr;
 
 	if (write) {
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else
 			*addr = *val;
 	} else
 		*val = *addr;
@@ -2262,6 +2326,10 @@
 
 	init_unwind_table(&unw.kernel_table, "kernel", KERNEL_START, (unsigned long) __gp,
 			  __start_unwind, __end_unwind);
+
+#ifdef	CONFIG_KGDB_EARLY
+	kgdb_malloc_init();
+#endif
 }
 
 /*
--- diff/arch/ia64/lib/Makefile	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/lib/Makefile	2004-07-01 21:32:31.000000000 +0100
@@ -16,6 +16,7 @@
 lib-$(CONFIG_PERFMON)	+= carta_random.o
 lib-$(CONFIG_MD_RAID5)	+= xor.o
 lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
+lib-$(CONFIG_KGDB)	+= kgdb_serial.o
 
 AFLAGS___divdi3.o	=
 AFLAGS___udivdi3.o	= -DUNSIGNED
--- diff/arch/ia64/lib/dec_and_lock.c	2004-05-19 22:11:04.000000000 +0100
+++ source/arch/ia64/lib/dec_and_lock.c	2004-07-01 21:32:31.000000000 +0100
@@ -13,6 +13,7 @@
 #include <linux/spinlock.h>
 #include <asm/atomic.h>
 
+#ifndef CONFIG_LOCKMETER
 /*
  * Decrement REFCOUNT and if the count reaches zero, acquire the spinlock.  Both of these
  * operations have to be done atomically, so that the count doesn't drop to zero without
@@ -40,3 +41,4 @@
 }
 
 EXPORT_SYMBOL(atomic_dec_and_lock);
+#endif
--- diff/arch/ia64/mm/contig.c	2004-05-19 22:11:04.000000000 +0100
+++ source/arch/ia64/mm/contig.c	2004-07-01 21:32:31.000000000 +0100
@@ -43,7 +43,7 @@
 	printk("Mem-info:\n");
 	show_free_areas();
 
-	printk("Free swap:       %6dkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	i = max_mapnr;
 	while (i-- > 0) {
 		if (!pfn_valid(i))
--- diff/arch/ia64/mm/discontig.c	2004-05-19 22:11:04.000000000 +0100
+++ source/arch/ia64/mm/discontig.c	2004-07-01 21:32:31.000000000 +0100
@@ -154,6 +154,9 @@
 
 	memcpy(numa_slit, numa_slit_fix, sizeof (numa_slit));
 
+	for (i = nnode; i < numnodes; i++)
+		node_set_offline(i);
+
 	numnodes = nnode;
 
 	return;
@@ -495,7 +498,7 @@
 
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	for_each_pgdat(pgdat) {
 		printk("Node ID: %d\n", pgdat->node_id);
 		for(i = 0; i < pgdat->node_spanned_pages; i++) {
--- diff/arch/ia64/mm/fault.c	2004-05-19 22:11:04.000000000 +0100
+++ source/arch/ia64/mm/fault.c	2004-07-01 21:32:31.000000000 +0100
@@ -15,6 +15,7 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/hardirq.h>
+#include <asm/kgdb.h>
 
 extern void die (char *, struct pt_regs *, long);
 
@@ -232,6 +233,11 @@
 	 */
 	bust_spinlocks(1);
 
+#ifdef	CONFIG_KGDB
+	kgdb_handle_exception(5, SIGBUS, isr, regs);
+	return;
+#endif
+
 	if (address < PAGE_SIZE)
 		printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference (address %016lx)\n", address);
 	else
--- diff/arch/ia64/mm/hugetlbpage.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/mm/hugetlbpage.c	2004-07-01 21:32:31.000000000 +0100
@@ -158,8 +158,6 @@
 	struct page *page;
 	pte_t *ptep;
 
-	if (! mm->used_hugetlb)
-		return ERR_PTR(-EINVAL);
 	if (REGION_NUMBER(addr) != REGION_HPAGE)
 		return ERR_PTR(-EINVAL);
 
@@ -297,7 +295,7 @@
 				unlock_page(page);
 			} else {
 				hugetlb_put_quota(mapping);
-				free_huge_page(page);
+				page_cache_release(page);
 				goto out;
 			}
 		}
--- diff/arch/ia64/pci/pci.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/pci/pci.c	2004-07-01 21:32:31.000000000 +0100
@@ -134,10 +134,18 @@
 static int __init
 pci_acpi_init (void)
 {
-	if (!acpi_pci_irq_init())
-		printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
-	else
-		printk(KERN_WARNING "PCI: Invalid ACPI-PCI IRQ routing table\n");
+	struct pci_dev *dev = NULL;
+
+	printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
+
+	/*
+	 * PCI IRQ routing is set up by pci_enable_device(), but we
+	 * also do it here in case there are still broken drivers that
+	 * don't use pci_enable_device().
+	 */
+	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
+		acpi_pci_irq_enable(dev);
+
 	return 0;
 }
 
--- diff/arch/ia64/sn/io/machvec/pci_bus_cvlink.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/sn/io/machvec/pci_bus_cvlink.c	2004-07-01 21:32:31.000000000 +0100
@@ -741,7 +741,7 @@
 			/* Is this PCI bus associated with this moduleid? */
 			moduleid = NODE_MODULEID(
 				nasid_to_cnodeid(pcibr_soft->bs_nasid));
-			if (modules[i]->id == moduleid) {
+			if (sn_modules[i]->id == moduleid) {
 				struct pcibr_list_s *new_element;
 
 				new_element = kmalloc(sizeof (struct pcibr_soft_s), GFP_KERNEL);
@@ -781,7 +781,7 @@
 				
 		/*
 		 * We now have a list of all the pci bridges associated with
-		 * the module_id, modules[i].  Call pci_bus_map_create() for
+		 * the module_id, sn_modules[i].  Call pci_bus_map_create() for
 		 * each pci bridge
 		 */
 		softlistp = first_in_list;
--- diff/arch/ia64/sn/io/sn2/klgraph.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/sn/io/sn2/klgraph.c	2004-07-01 21:32:31.000000000 +0100
@@ -527,7 +527,7 @@
 		/* Use module as module vertex fastinfo */
 
 		memset(buffer, 0, 16);
-		format_module_id(buffer, modules[cm]->id, MODULE_FORMAT_BRIEF);
+		format_module_id(buffer, sn_modules[cm]->id, MODULE_FORMAT_BRIEF);
 		sprintf(name, EDGE_LBL_MODULE "/%s", buffer);
 
 		rc = hwgraph_path_add(hwgraph_root, name, &module_vhdl);
@@ -535,7 +535,7 @@
 		rc = rc;
 		HWGRAPH_DEBUG(__FILE__, __FUNCTION__, __LINE__, module_vhdl, NULL, "Created module path.\n");
 
-		hwgraph_fastinfo_set(module_vhdl, (arbitrary_info_t) modules[cm]);
+		hwgraph_fastinfo_set(module_vhdl, (arbitrary_info_t) sn_modules[cm]);
 
 		/* Add system controller */
 		sprintf(name,
--- diff/arch/ia64/sn/io/sn2/ml_iograph.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/sn/io/sn2/ml_iograph.c	2004-07-01 21:32:31.000000000 +0100
@@ -518,6 +518,14 @@
 	ASSERT(hubv != GRAPH_VERTEX_NONE);
 
 	/* 
+	 * attach our hub_provider information to hubv,
+	 * so we can use it as a crosstalk provider "master"
+	 * vertex.
+	 */
+	xtalk_provider_register(hubv, &hub_provider);
+	xtalk_provider_startup(hubv);
+
+	/* 
 	 * If nothing connected to this hub's xtalk port, we're done.
 	 */
 	early_probe_for_widget(hubv, &hwid);
@@ -527,14 +535,6 @@
 		/* NOTREACHED */
 	}
 
-	/* 
-	 * attach our hub_provider information to hubv,
-	 * so we can use it as a crosstalk provider "master"
-	 * vertex.
-	 */
-	xtalk_provider_register(hubv, &hub_provider);
-	xtalk_provider_startup(hubv);
-
 	/*
 	 * Create a vertex to represent the crosstalk bus
 	 * attached to this hub, and a vertex to be used
--- diff/arch/ia64/sn/io/sn2/module.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/sn/io/sn2/module.c	2004-07-01 21:32:31.000000000 +0100
@@ -33,7 +33,7 @@
 #define DPRINTF(x...)
 #endif
 
-module_t	       *modules[MODULE_MAX];
+module_t	       *sn_modules[MODULE_MAX];
 int			nummodules;
 
 #define SN00_SERIAL_FUDGE	0x3b1af409d513c2
@@ -59,9 +59,9 @@
     int			i;
 
     for (i = 0; i < nummodules; i++)
-	if (modules[i]->id == id) {
-	    DPRINTF("module_lookup: found m=0x%p\n", modules[i]);
-	    return modules[i];
+	if (sn_modules[i]->id == id) {
+	    DPRINTF("module_lookup: found m=0x%p\n", sn_modules[i]);
+	    return sn_modules[i];
 	}
 
     return NULL;
@@ -104,10 +104,10 @@
 
 	/* Insert in sorted order by module number */
 
-	for (i = nummodules; i > 0 && modules[i - 1]->id > moduleid; i--)
-	    modules[i] = modules[i - 1];
+	for (i = nummodules; i > 0 && sn_modules[i - 1]->id > moduleid; i--)
+	    sn_modules[i] = sn_modules[i - 1];
 
-	modules[i] = m;
+	sn_modules[i] = m;
 	nummodules++;
     }
 
--- diff/arch/ia64/sn/kernel/irq.c	2004-05-19 22:11:05.000000000 +0100
+++ source/arch/ia64/sn/kernel/irq.c	2004-07-01 21:32:31.000000000 +0100
@@ -41,6 +41,7 @@
 extern void pcibr_force_interrupt(pcibr_intr_t intr);
 extern int sn_force_interrupt_flag;
 struct irq_desc * sn_irq_desc(unsigned int irq);
+extern cpumask_t    __cacheline_aligned pending_irq_cpumask[NR_IRQS];
 
 struct sn_intr_list_t {
 	struct sn_intr_list_t *next;
@@ -71,6 +72,21 @@
 {
 }
 
+static inline void move_irq(int irq)
+{
+	/* note - we hold desc->lock */
+	cpumask_t tmp;
+	irq_desc_t *desc = irq_descp(irq);
+
+	if (!cpus_empty(pending_irq_cpumask[irq])) {
+		cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
+		if (unlikely(!cpus_empty(tmp))) {
+			desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
+		}
+		cpus_clear(pending_irq_cpumask[irq]);
+	}
+}
+
 static void
 sn_ack_irq(unsigned int irq)
 {
@@ -94,6 +110,7 @@
 	}
 	HUB_S((unsigned long *)GLOBAL_MMR_ADDR(nasid, SH_EVENT_OCCURRED_ALIAS), mask );
 	__set_bit(irq, (volatile void *)pda->sn_in_service_ivecs);
+	move_irq(irq);
 }
 
 static void
--- diff/arch/ia64/sn/kernel/setup.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/ia64/sn/kernel/setup.c	2004-07-01 21:32:31.000000000 +0100
@@ -226,7 +226,25 @@
 			shub_1_1_found = 1;
 }
 
-
+/**
+ * sn_set_error_handling_features - Tell the SN prom how to handle certain
+ * error types.
+ */
+static void __init
+sn_set_error_handling_features(void)
+{
+	u64 ret;
+	u64 sn_ehf_bits[7];	/* see ia64_sn_set_error_handling_features */
+	memset(sn_ehf_bits, 0, sizeof(sn_ehf_bits));
+#define EHF(x) __set_bit(SN_SAL_EHF_ ## x, sn_ehf_bits)
+	EHF(MCA_SLV_TO_OS_INIT_SLV);
+	EHF(NO_RZ_TLBC);
+	// Uncomment once Jesse's code goes in - EHF(NO_RZ_IO_READ); 
+#undef	EHF
+	ret = ia64_sn_set_error_handling_features(sn_ehf_bits);
+	if (ret)
+		printk(KERN_ERR "%s: failed, return code %ld\n", __FUNCTION__, ret);
+}
 
 /**
  * sn_setup - SN platform setup routine
@@ -318,6 +336,9 @@
 		       master_node_bedrock_address);
 	}
 
+	/* Tell the prom how to handle certain error types */
+	sn_set_error_handling_features();
+
 	/*
 	 * we set the default root device to /dev/hda
 	 * to make simulation easy
--- diff/arch/ia64/sn/kernel/sn2/sn2_smp.c	2004-05-19 22:11:05.000000000 +0100
+++ source/arch/ia64/sn/kernel/sn2/sn2_smp.c	2004-07-01 21:32:31.000000000 +0100
@@ -27,6 +27,7 @@
 #include <asm/delay.h>
 #include <asm/io.h>
 #include <asm/smp.h>
+#include <asm/tlb.h>
 #include <asm/numa.h>
 #include <asm/bitops.h>
 #include <asm/hw_irq.h>
@@ -60,6 +61,13 @@
 }
 
 
+void
+sn_tlb_migrate_finish(struct mm_struct *mm)
+{
+	if (mm == current->mm)
+		flush_tlb_mm(mm);
+}
+
 
 /**
  * sn2_global_tlb_purge - globally purge translation cache of virtual address range
@@ -114,6 +122,13 @@
 		return;
 	}
 
+	if (atomic_read(&mm->mm_users) == 1) {
+		flush_tlb_mm(mm);
+		preempt_enable();
+		return;
+	}
+
+
 	nix = 0;
 	for (cnode=find_first_bit(&nodes_flushed, NR_NODES); cnode < NR_NODES; 
 			cnode=find_next_bit(&nodes_flushed, NR_NODES, ++cnode))
--- diff/arch/m68k/Makefile	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/Makefile	2004-07-01 21:32:31.000000000 +0100
@@ -28,6 +28,8 @@
 LDFLAGS_vmlinux = -N
 endif
 
+CHECK := $(CHECK) -D__mc68000__=1 -I$(shell $(CC) -print-file-name=include)
+
 # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
 CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
 
--- diff/arch/m68k/atari/stram.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/atari/stram.c	2004-07-01 21:32:31.000000000 +0100
@@ -743,7 +743,7 @@
 
 		if (map[i]) {
 			entry = swp_entry(stram_swap_type, i);
-			DPRINTK("unswap: map[i=%lu]=%u nr_swap=%u\n",
+			DPRINTK("unswap: map[i=%lu]=%u nr_swap=%ld\n",
 				i, map[i], nr_swap_pages);
 
 			swap_device_lock(stram_swap_info);
@@ -772,7 +772,7 @@
 	#endif
 		}
 
-		DPRINTK( "unswap: map[i=%lu]=%u nr_swap=%u\n",
+		DPRINTK( "unswap: map[i=%lu]=%u nr_swap=%ld\n",
 				 i, map[i], nr_swap_pages );
 		swap_list_lock();
 		swap_device_lock(stram_swap_info);
--- diff/arch/m68k/ifpsp060/iskeleton.S	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/ifpsp060/iskeleton.S	2004-07-01 21:32:31.000000000 +0100
@@ -196,14 +196,57 @@
 | Expected outputs:
 |	d0 = 0 -> success; non-zero -> failure
 |
-| Linux/68k: As long as ints are disabled, no swapping out should
-| occur (hopefully...)
+| Linux/m68k: Make sure the page is properly paged in, so we use
+| plpaw and handle any exception here. The kernel must not be
+| preempted until _060_unlock_page(), so that the page stays mapped.
 |
 	.global		_060_real_lock_page
 _060_real_lock_page:
-	clr.l		%d0
+	move.l	%d2,-(%sp)
+	| load sfc/dfc
+	moveq	#5,%d0
+	tst.b	%d0
+	jne	1f
+	moveq	#1,%d0
+1:	movec.l	%dfc,%d2
+	movec.l	%d0,%dfc
+	movec.l	%d0,%sfc
+
+	clr.l	%d0
+	| prefetch address
+	.chip	68060
+	move.l	%a0,%a1
+1:	plpaw	(%a1)
+	addq.w	#1,%a0
+	tst.b	%d1
+	jeq	2f
+	addq.w	#2,%a0
+2:	plpaw	(%a0)
+3:	.chip	68k
+
+	| restore sfc/dfc
+	movec.l	%d2,%dfc
+	movec.l	%d2,%sfc
+	move.l	(%sp)+,%d2
 	rts
 
+.section __ex_table,"a"
+	.align	4
+	.long	1b,11f
+	.long	2b,21f
+.previous
+.section .fixup,"ax"
+	.even
+11:	move.l	#0x020003c0,%d0
+	or.l	%d2,%d0
+	swap	%d0
+	jra	3b
+21:	move.l	#0x02000bc0,%d0
+	or.l	%d2,%d0
+	swap	%d0
+	jra	3b
+.previous
+
 |
 | _060_unlock_page():
 |
@@ -216,8 +259,7 @@
 |	d0 = `xxxxxxff -> supervisor; `xxxxxx00 -> user
 |	d1 = `xxxxxxff -> longword; `xxxxxx00 -> word
 |
-| Linux/68k: As we do no special locking operation, also no unlocking
-| is needed...
+| Linux/m68k: perhaps reenable preemption here...
 
 	.global		_060_real_unlock_page
 _060_real_unlock_page:
--- diff/arch/m68k/kernel/process.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/kernel/process.c	2004-07-01 21:32:32.000000000 +0100
@@ -26,6 +26,7 @@
 #include <linux/a.out.h>
 #include <linux/reboot.h>
 #include <linux/init_task.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
--- diff/arch/m68k/kernel/setup.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/kernel/setup.c	2004-07-01 21:32:32.000000000 +0100
@@ -62,7 +62,6 @@
 static struct mem_info m68k_ramdisk;
 
 static char m68k_command_line[CL_SIZE];
-char saved_command_line[CL_SIZE];
 
 char m68k_debug_device[6] = "";
 
--- diff/arch/m68k/kernel/signal.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/kernel/signal.c	2004-07-01 21:32:32.000000000 +0100
@@ -228,8 +228,8 @@
 		goto out;
 
 	    __asm__ volatile (".chip 68k/68881\n\t"
-			      "fmovemx %0,%/fp0-%/fp1\n\t"
-			      "fmoveml %1,%/fpcr/%/fpsr/%/fpiar\n\t"
+			      "fmovemx %0,%%fp0-%%fp1\n\t"
+			      "fmoveml %1,%%fpcr/%%fpsr/%%fpiar\n\t"
 			      ".chip 68k"
 			      : /* no outputs */
 			      : "m" (*sc->sc_fpregs), "m" (*sc->sc_fpcntl));
@@ -258,7 +258,7 @@
 	if (FPU_IS_EMU) {
 		/* restore fpu control register */
 		if (__copy_from_user(current->thread.fpcntl,
-				&uc->uc_mcontext.fpregs.f_pcr, 12))
+				uc->uc_mcontext.fpregs.f_fpcntl, 12))
 			goto out;
 		/* restore all other fpu register */
 		if (__copy_from_user(current->thread.fp,
@@ -298,12 +298,12 @@
 				     sizeof(fpregs)))
 			goto out;
 		__asm__ volatile (".chip 68k/68881\n\t"
-				  "fmovemx %0,%/fp0-%/fp7\n\t"
-				  "fmoveml %1,%/fpcr/%/fpsr/%/fpiar\n\t"
+				  "fmovemx %0,%%fp0-%%fp7\n\t"
+				  "fmoveml %1,%%fpcr/%%fpsr/%%fpiar\n\t"
 				  ".chip 68k"
 				  : /* no outputs */
 				  : "m" (*fpregs.f_fpregs),
-				    "m" (fpregs.f_pcr));
+				    "m" (*fpregs.f_fpcntl));
 	}
 	if (context_size &&
 	    __copy_from_user(fpstate + 4, (long *)&uc->uc_fpstate + 1,
@@ -586,12 +586,12 @@
 				sc->sc_fpstate[0x38] |= 1 << 3;
 		}
 		__asm__ volatile (".chip 68k/68881\n\t"
-				  "fmovemx %/fp0-%/fp1,%0\n\t"
-				  "fmoveml %/fpcr/%/fpsr/%/fpiar,%1\n\t"
+				  "fmovemx %%fp0-%%fp1,%0\n\t"
+				  "fmoveml %%fpcr/%%fpsr/%%fpiar,%1\n\t"
 				  ".chip 68k"
-				  : /* no outputs */
-				  : "m" (*sc->sc_fpregs),
-				    "m" (*sc->sc_fpcntl)
+				  : "=m" (*sc->sc_fpregs),
+				    "=m" (*sc->sc_fpcntl)
+				  : /* no inputs */
 				  : "memory");
 	}
 }
@@ -604,7 +604,7 @@
 
 	if (FPU_IS_EMU) {
 		/* save fpu control register */
-		err |= copy_to_user(&uc->uc_mcontext.fpregs.f_pcr,
+		err |= copy_to_user(uc->uc_mcontext.fpregs.f_fpcntl,
 				current->thread.fpcntl, 12);
 		/* save all other fpu register */
 		err |= copy_to_user(uc->uc_mcontext.fpregs.f_fpregs,
@@ -631,12 +631,12 @@
 				fpstate[0x38] |= 1 << 3;
 		}
 		__asm__ volatile (".chip 68k/68881\n\t"
-				  "fmovemx %/fp0-%/fp7,%0\n\t"
-				  "fmoveml %/fpcr/%/fpsr/%/fpiar,%1\n\t"
+				  "fmovemx %%fp0-%%fp7,%0\n\t"
+				  "fmoveml %%fpcr/%%fpsr/%%fpiar,%1\n\t"
 				  ".chip 68k"
-				  : /* no outputs */
-				  : "m" (*fpregs.f_fpregs),
-				    "m" (fpregs.f_pcr)
+				  : "=m" (*fpregs.f_fpregs),
+				    "=m" (*fpregs.f_fpcntl)
+				  : /* no inputs */
 				  : "memory");
 		err |= copy_to_user(&uc->uc_mcontext.fpregs, &fpregs,
 				    sizeof(fpregs));
--- diff/arch/m68k/kernel/traps.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/kernel/traps.c	2004-07-01 21:32:32.000000000 +0100
@@ -329,7 +329,8 @@
 		 * fault during mem_read/mem_write in ifpsp060/os.S
 		 */
 		send_fault_sig(&fp->ptregs);
-	} else {
+	} else if (!(fslw & (MMU060_RE|MMU060_WE)) ||
+		   send_fault_sig(&fp->ptregs) > 0) {
 		printk("pc=%#lx, fa=%#lx\n", fp->ptregs.pc, fp->un.fmt4.effaddr);
 		printk( "68060 access error, fslw=%lx\n", fslw );
 		trap_c( fp );
@@ -517,7 +518,7 @@
 			if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr)
 				fp->un.fmt7.wb2s &= ~WBV_040;
 		}
-	} else {
+	} else if (send_fault_sig(&fp->ptregs) > 0) {
 		printk("68040 access error, ssw=%x\n", ssw);
 		trap_c(fp);
 	}
@@ -732,7 +733,7 @@
 				return;
 		} else if (!(mmusr & MMU_I)) {
 			/* probably a 020 cas fault */
-			if (!(ssw & RM))
+			if (!(ssw & RM) && send_fault_sig(&fp->ptregs) > 0)
 				printk("unexpected bus error (%#x,%#x)\n", ssw, mmusr);
 		} else if (mmusr & (MMU_B|MMU_L|MMU_S)) {
 			printk("invalid %s access at %#lx from pc %#lx\n",
@@ -910,7 +911,7 @@
 		 * down the cause of the crash will be able to figure
 		 * out the call path that was taken.
 		 */
-		if (kernel_text_address(addr)) {
+		if (__kernel_text_address(addr)) {
 #ifndef CONFIG_KALLSYMS
 			if (i % 5 == 0)
 				printk("\n       ");
--- diff/arch/m68k/mac/iop.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/mac/iop.c	2004-07-01 21:32:32.000000000 +0100
@@ -261,7 +261,7 @@
 		} else {
 			iop_base[IOP_NUM_ISM] = (struct mac_iop *) ISM_IOP_BASE_QUADRA;
 		}
-		iop_base[IOP_NUM_SCC]->status_ctrl = 0;
+		iop_base[IOP_NUM_ISM]->status_ctrl = 0;
 		iop_ism_present = 1;
 	} else {
 		iop_base[IOP_NUM_ISM] = NULL;
--- diff/arch/m68k/mm/init.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/mm/init.c	2004-07-01 21:32:32.000000000 +0100
@@ -47,7 +47,7 @@
 
     printk("\nMem-info:\n");
     show_free_areas();
-    printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+    printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
     i = max_mapnr;
     while (i-- > 0) {
 	total++;
--- diff/arch/m68k/mm/memory.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/mm/memory.c	2004-07-01 21:32:32.000000000 +0100
@@ -54,7 +54,7 @@
 
 	/* unreserve the page so it's possible to free that page */
 	PD_PAGE(dp)->flags &= ~(1 << PG_reserved);
-	atomic_set(&PD_PAGE(dp)->count, 1);
+	set_page_count(PD_PAGE(dp), 1);
 
 	return;
 }
--- diff/arch/m68k/q40/config.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/m68k/q40/config.c	2004-07-01 21:32:32.000000000 +0100
@@ -64,7 +64,6 @@
 
 extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/ );
 
-extern char *saved_command_line;
 extern char m68k_debug_device[];
 static void q40_mem_console_write(struct console *co, const char *b,
 				    unsigned int count);
--- diff/arch/m68knommu/kernel/init_task.c	2004-05-19 22:11:07.000000000 +0100
+++ source/arch/m68knommu/kernel/init_task.c	2004-07-01 21:32:32.000000000 +0100
@@ -7,6 +7,7 @@
 #include <linux/init.h>
 #include <linux/init_task.h>
 #include <linux/fs.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/m68knommu/kernel/setup.c	2004-05-19 22:11:07.000000000 +0100
+++ source/arch/m68knommu/kernel/setup.c	2004-07-01 21:32:32.000000000 +0100
@@ -31,6 +31,7 @@
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
+#include <linux/init.h>
 
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -44,8 +45,7 @@
 unsigned long memory_start;
 unsigned long memory_end;
 
-char command_line[512];
-char saved_command_line[512];
+char command_line[COMMAND_LINE_SIZE];
 
 /* setup some dummy routines */
 static void dummy_waitbut(void)
@@ -216,8 +216,8 @@
 
 	/* Keep a copy of command line */
 	*cmdline_p = &command_line[0];
-	memcpy(saved_command_line, command_line, sizeof(saved_command_line));
-	saved_command_line[sizeof(saved_command_line)-1] = 0;
+	memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
+	saved_command_line[COMMAND_LINE_SIZE-1] = 0;
 
 #ifdef DEBUG
 	if (strlen(*cmdline_p)) 
--- diff/arch/mips/Kconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/Kconfig	2004-07-01 21:32:32.000000000 +0100
@@ -96,11 +96,13 @@
 	select DMA_NONCOHERENT
 	select IRQ_CPU
 	depends on MACH_VR41XX
+	select HW_HAS_PCI
 
 config TANBAC_TB0226
 	bool "Support for TANBAC TB0226 (Mbase)"
 	depends on MACH_VR41XX
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	help
 	  The TANBAC TB0226 (Mbase) is a MIPS-based platform manufactured by TANBAC.
@@ -110,6 +112,7 @@
 	bool "Support for TANBAC TB0229 (VR4131DIMM)"
 	depends on MACH_VR41XX
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	help
 	  The TANBAC TB0229 (VR4131DIMM) is a MIPS-based platform manufactured by TANBAC.
@@ -118,6 +121,7 @@
 config VICTOR_MPC30X
 	bool "Support for Victor MP-C303/304"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	depends on MACH_VR41XX
 
@@ -125,17 +129,22 @@
 	bool "Support for ZAO Networks Capcella"
 	depends on MACH_VR41XX
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 
+config PCI_VR41XX
+	bool "Add PCI control unit support of NEC VR4100 series"
+	depends on MACH_VR41XX && PCI
+
 config VRC4171
-	tristate "add NEC VRC4171 companion chip support"
+	tristate "Add NEC VRC4171 companion chip support"
 	depends on MACH_VR41XX && ISA
 	---help---
 	  The NEC VRC4171/4171A is a companion chip for NEC VR4111/VR4121.
 
 config VRC4173
-	tristate "add NEC VRC4173 companion chip support"
-	depends on MACH_VR41XX && PCI
+	tristate "Add NEC VRC4173 companion chip support"
+	depends on MACH_VR41XX && PCI_VR41XX
 	---help---
 	  The NEC VRC4173 is a companion chip for NEC VR4122/VR4131.
 
@@ -143,11 +152,13 @@
 	bool "Support for Toshiba JMR-TX3927 board"
 	depends on MIPS32
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 
 config MIPS_COBALT
 	bool "Support for Cobalt Server (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 
 config MACH_DECSTATION
@@ -174,6 +185,7 @@
 	bool "Support for Galileo EV64120 Evaluation board (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	help
 	  This is an evaluation board based on the Galileo GT-64120
 	  single-chip system controller that contains a MIPS R5000 compatible
@@ -189,6 +201,7 @@
 	bool "Support for Galileo EV96100 Evaluation board (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	select MIPS_GT96100
 	select RM7000_CPU_SCACHE
@@ -201,6 +214,7 @@
 config MIPS_IVR
 	bool "Support for Globespan IVR board"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	help
 	  This is an evaluation board built by Globespan to showcase thir
 	  iVR (Internet Video Recorder) design. It utilizes a QED RM5231
@@ -211,6 +225,7 @@
 config LASAT
 	bool "Support for LASAT Networks platforms"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select R5000_CPU_SCACHE
 
 config PICVUE
@@ -233,11 +248,13 @@
 	bool "Support for Hewlett Packard LaserJet board"
 	depends on BROKEN
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 
 config MIPS_ITE8172
 	bool "Support for ITE 8172G board"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	help
 	  Ths is an evaluation board made by ITE <http://www.ite.com.tw/>
 	  with ATX form factor that utilizes a MIPS R5000 to work with its
@@ -257,6 +274,7 @@
 config MIPS_ATLAS
 	bool "Support for MIPS Atlas board"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	help
 	  This enables support for the QED R5231-based MIPS Atlas evaluation
 	  board.
@@ -265,6 +283,7 @@
 	bool "Support for MIPS Malta board"
 	select HAVE_STD_PC_SERIAL_PORT
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	help
 	  This enables support for the VR5000-based MIPS Malta evaluation
 	  board.
@@ -278,6 +297,7 @@
 config MOMENCO_OCELOT
 	bool "Support for Momentum Ocelot board"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	select IRQ_CPU_RM7K
 	select RM7000_CPU_SCACHE
@@ -288,6 +308,7 @@
 config MOMENCO_OCELOT_G
 	bool "Support for Momentum Ocelot-G board"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	select IRQ_CPU_RM7K
 	select RM7000_CPU_SCACHE
@@ -298,6 +319,7 @@
 config MOMENCO_OCELOT_C
 	bool "Support for Momentum Ocelot-C board"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	select RM7000_CPU_SCACHE
 	help
@@ -307,6 +329,7 @@
 config MOMENCO_JAGUAR_ATX
 	bool "Support for Momentum Jaguar board"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	select IRQ_CPU_RM7K
 	select LIMITED_DMA
@@ -324,7 +347,10 @@
 
 config PMC_YOSEMITE
 	bool "Support for PMC-Sierra Yosemite eval board"
-	select DMA_NONCOHERENT
+	select DMA_COHERENT
+	select HW_HAS_PCI
+	select IRQ_CPU
+	select IRQ_CPU_RM7K
 	help
 	  Yosemite is an evaluation board for the RM9000x2 processor
 	  manufactured by PMC-Sierra
@@ -338,6 +364,7 @@
 	depends on EXPERIMENTAL
 	select DMA_NONCOHERENT
 	select HAVE_STD_PC_SERIAL_PORT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	select ISA
 	help
@@ -348,6 +375,7 @@
 	bool "Support for NEC DDB Vrc-5476"
 	select DMA_NONCOHERENT
 	select HAVE_STD_PC_SERIAL_PORT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	select ISA
 	help
@@ -361,6 +389,7 @@
 config DDB5477
 	bool "Support for NEC DDB Vrc-5477"
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select IRQ_CPU
 	help
 	  This enables support for the R5432-based NEC DDB Vrc-5477,
@@ -393,6 +422,7 @@
 	bool "Support for SGI IP27 (Origin200/2000)"
 	depends on MIPS64
 	select DMA_IP27
+	select HW_HAS_PCI
 	help
 	  This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
 	  workstations.  To compile a Linux kernel that runs on these, say Y
@@ -457,6 +487,7 @@
 	bool "Support for SGI IP32 (O2) (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select R5000_CPU_SCACHE
 	select RM7000_CPU_SCACHE
 	help
@@ -499,26 +530,31 @@
 	bool "PB1000 board"
 	depends on SOC_AU1000
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 
 config MIPS_PB1100
 	bool "PB1100 board"
 	depends on SOC_AU1100
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 
 config MIPS_PB1500
 	bool "PB1500 board"
 	depends on SOC_AU1500
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 
 config MIPS_PB1550
 	bool "PB1550 board"
 	depends on SOC_AU1550
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 
 config MIPS_DB1000
 	bool "DB1000 board"
 	depends on SOC_AU1000
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 
 config MIPS_DB1100
 	bool "DB1100 board"
@@ -529,10 +565,12 @@
 	bool "DB1500 board"
 	depends on SOC_AU1500
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 
 config MIPS_DB1550
 	bool "DB1550 board"
 	depends on SOC_AU1550
+	select HW_HAS_PCI
 
 config MIPS_BOSPORUS
 	bool "Bosporus board"
@@ -642,6 +680,7 @@
 
 config SIBYTE_SB1250
 	bool
+	select HW_HAS_PCI
 
 config SIBYTE_BCM1120
 	bool
@@ -649,10 +688,12 @@
 
 config SIBYTE_BCM1125
 	bool
+	select HW_HAS_PCI
 	select SIBYTE_BCM112X
 
 config SIBYTE_BCM1125H
 	bool
+	select HW_HAS_PCI
 	select SIBYTE_BCM112X
 
 config SIBYTE_BCM112X
@@ -699,11 +740,6 @@
 config CPU_SB1_PASS_2
 	bool
 
-config SIBYTE_HAS_PCI
-	bool
-	depends on SIBYTE_SB1250 || SIBYTE_BCM1125 || SIBYTE_BCM1125H
-	default y
-
 config SIBYTE_HAS_LDT
 	bool
 	depends on PCI && (SIBYTE_SB1250 || SIBYTE_BCM1125H)
@@ -770,6 +806,7 @@
 	bool "Support for SNI RM200 PCI"
 	select DMA_NONCOHERENT
 	select HAVE_STD_PC_SERIAL_PORT
+	select HW_HAS_PCI
 	select ISA
 	help
 	  The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens
@@ -781,6 +818,7 @@
 	bool "Support for Toshiba TBTX49[23]7 board"
 	depends on MIPS32
 	select DMA_NONCOHERENT
+	select HW_HAS_PCI
 	select ISA
 
 config RWSEM_GENERIC_SPINLOCK
@@ -860,11 +898,6 @@
 config IRQ_CPU_RM7K
 	bool
 
-config DUMMY_KEYB
-	bool
-	depends on ZAO_CAPCELLA || VICTOR_MPC30X || SIBYTE_SB1xxx_SOC || NEC_EAGLE || NEC_OSPREY || DDB5477 || CASIO_E55 || TANBAC_TB0226 || TANBAC_TB0229
-	default y
-
 config DDB5XXX_COMMON
 	bool
 	depends on DDB5074 || DDB5476 || DDB5477
@@ -932,11 +965,6 @@
 	depends on MIPS_PB1500 || MIPS_PB1100 || MIPS_PB1000
 	default n
 
-config COBALT_LCD
-	bool
-	depends on MIPS_COBALT
-	default y
-
 config MIPS_GT96100
 	bool
 	depends on MIPS_EV96100
@@ -1169,6 +1197,16 @@
 	 4kB page size will minimize memory consumption and is therefore
 	 recommended for low memory systems. 
 
+config PAGE_SIZE_8KB
+	bool "8kB"
+	depends on EXPERIMENTAL && CPU_R8000
+	help
+	  Using 8kB page size will result in higher performance kernel at
+	  the price of higher memory consumption.  This option is available
+	  only on the R8000 processor.  Not that at the time of this writing
+	  this option is still high experimental; there are also issues with
+	  compatibility of user applications.
+
 config PAGE_SIZE_16KB
 	bool "16kB"
 	depends on EXPERIMENTAL && !CPU_R3000 && !CPU_TX39XX
@@ -1382,9 +1420,12 @@
 
 menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
 
+config HW_HAS_PCI
+	bool
+
 config PCI
 	bool "Support for PCI controller"
-	depends on MIPS_DB1000 || DDB5074 || DDB5476 || DDB5477 || HP_LASERJET || LASAT || MIPS_IVR || MIPS_ATLAS || MIPS_COBALT || MIPS_EV64120 || MIPS_EV96100 || MIPS_ITE8172 || MIPS_MALTA || MOMENCO_OCELOT || MOMENCO_OCELOT_C || MOMENCO_OCELOT_G || MOMENCO_JAGUAR_ATX || MIPS_PB1000 || MIPS_PB1100 || SOC_AU1500 || SOC_AU1550 || NEC_EAGLE || SGI_IP27 || SGI_IP32 || SIBYTE_HAS_PCI || SNI_RM200_PCI || TANBAC_TB0226 || TANBAC_TB0229 || TOSHIBA_JMR3927 || TOSHIBA_RBTX4927 || VICTOR_MPC30X || ZAO_CAPCELLA
+	depends on HW_HAS_PCI
 	help
 	  Find out whether you have a PCI motherboard. PCI is the name of a
 	  bus system, i.e. the way the CPU talks to the other stuff inside
@@ -1564,7 +1605,7 @@
 
 config DEBUG_SLAB
 	bool "Debug memory allocations"
-	depends on DEBUG_KERNEL && !CPU_HAS_LLDSCD
+	depends on DEBUG_KERNEL
 	help
 	  Say Y here to have the kernel do limited verification on memory
 	  allocation as well as poisoning memory on free to catch use of freed
--- diff/arch/mips/Makefile	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/Makefile	2004-07-01 21:32:32.000000000 +0100
@@ -406,6 +406,13 @@
 load-$(CONFIG_MOMENCO_OCELOT_C)	+= 0x80100000
 
 #
+# PMC-Sierra Yosemite
+#
+core-$(CONFIG_PMC_YOSEMITE)	+= arch/mips/pmc-sierra/yosemite/
+cflags-$(CONFIG_PMC_YOSEMITE)	+= -Iinclude/asm-mips/mach-yosemite
+load-$(CONFIG_PMC_YOSEMITE)	+= 0x80100000
+
+#
 # Momentum Jaguar ATX
 #
 core-$(CONFIG_MOMENCO_JAGUAR_ATX)	+= arch/mips/momentum/jaguar_atx/
@@ -659,8 +666,6 @@
 libs-$(CONFIG_MIPS64)	+= arch/mips/lib-64/
 
 core-y			+= arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
-core-$(CONFIG_MIPS32)	+= arch/mips/mm-32/
-core-$(CONFIG_MIPS64)	+= arch/mips/mm-64/
 
 ifdef CONFIG_BAGET_MIPS
 
--- diff/arch/mips/baget/irq.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/baget/irq.c	2004-07-01 21:32:32.000000000 +0100
@@ -325,7 +325,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
@@ -389,7 +389,7 @@
 }
 
 static struct irqaction irq0  =
-{ write_err_interrupt, SA_INTERRUPT, 0, "bus write error", NULL, NULL};
+{ write_err_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "bus write error", NULL, NULL};
 
 void __init init_IRQ(void)
 {
--- diff/arch/mips/baget/time.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/baget/time.c	2004-07-01 21:32:32.000000000 +0100
@@ -67,7 +67,7 @@
 }
 
 static struct irqaction timer_irq  =
-{ timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL};
+{ timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
 
 void __init time_init(void)
 {
--- diff/arch/mips/boot/Makefile	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/boot/Makefile	2004-07-01 21:32:32.000000000 +0100
@@ -39,7 +39,7 @@
 archhelp:
 	@echo	'* vmlinux.ecoff	- ECOFF boot image'
 
-CLEAN_FILES += addinitrd \
+clean-files += addinitrd \
 	       elf2ecoff \
 	       vmlinux.ecoff \
 	       vmlinux.srec \
--- diff/arch/mips/configs/atlas_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/atlas_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -107,6 +107,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -121,6 +122,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -197,7 +199,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_REPORT_LUNS is not set
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
 
@@ -216,11 +217,11 @@
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_PIO is not set
@@ -229,6 +230,7 @@
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
@@ -395,7 +397,6 @@
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -616,7 +617,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -651,3 +651,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/bosporus_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/bosporus_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -105,6 +105,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -496,6 +497,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -567,7 +571,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -652,11 +655,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/capcella_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/capcella_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -59,7 +59,8 @@
 # CONFIG_TANBAC_TB0229 is not set
 # CONFIG_VICTOR_MPC30X is not set
 CONFIG_ZAO_CAPCELLA=y
-# CONFIG_VRC4173 is not set
+CONFIG_PCI_VR41XX=y
+CONFIG_VRC4173=y
 # CONFIG_TOSHIBA_JMR3927 is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
@@ -91,7 +92,6 @@
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
-CONFIG_DUMMY_KEYB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
 
@@ -116,6 +116,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -126,6 +127,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -185,7 +187,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -197,6 +198,7 @@
 #
 CONFIG_IDE_GENERIC=y
 # CONFIG_BLK_DEV_IDEPCI is not set
+# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -214,7 +216,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -357,7 +358,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -591,7 +591,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -626,3 +625,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/cobalt_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/cobalt_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -80,7 +80,6 @@
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
 CONFIG_MIPS_GT64111=y
-CONFIG_COBALT_LCD=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
 
@@ -105,6 +104,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -117,6 +117,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -177,7 +178,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -189,6 +189,7 @@
 #
 CONFIG_IDE_GENERIC=y
 # CONFIG_BLK_DEV_IDEPCI is not set
+# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -206,7 +207,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -345,7 +345,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -432,6 +431,7 @@
 #
 # CONFIG_WATCHDOG is not set
 CONFIG_RTC=y
+CONFIG_COBALT_LCD=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -567,7 +567,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -602,3 +601,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/db1000_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/db1000_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -122,6 +122,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -136,6 +137,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 # CONFIG_PCI is not set
 CONFIG_MMU=y
 
@@ -522,6 +524,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -593,7 +598,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -678,11 +682,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/db1100_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/db1100_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -122,6 +122,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -518,6 +519,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -589,7 +593,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -674,11 +677,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/db1500_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/db1500_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -122,6 +122,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -136,6 +137,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 # CONFIG_PCI is not set
 CONFIG_MMU=y
 
@@ -259,7 +261,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECS=m
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
@@ -271,6 +272,7 @@
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
+# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -592,6 +594,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -665,7 +670,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -750,11 +754,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/ddb5476_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ddb5476_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -105,6 +105,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -117,6 +118,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -179,7 +181,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -191,6 +192,7 @@
 #
 CONFIG_IDE_GENERIC=y
 # CONFIG_BLK_DEV_IDEPCI is not set
+# CONFIG_IDE_ARM is not set
 # CONFIG_IDE_CHIPSETS is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
@@ -214,7 +216,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -363,7 +364,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -487,6 +487,7 @@
 #
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_RIVA is not set
 # CONFIG_FB_MATROX is not set
@@ -606,7 +607,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -641,3 +641,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/ddb5477_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ddb5477_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -80,7 +80,6 @@
 CONFIG_I8259=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
-CONFIG_DUMMY_KEYB=y
 CONFIG_DDB5XXX_COMMON=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
@@ -106,6 +105,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -118,6 +118,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -184,7 +185,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -345,7 +345,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -567,7 +566,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -602,3 +600,4 @@
 # Library routines
 #
 CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/decstation_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/decstation_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -109,6 +109,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -184,7 +185,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -537,7 +537,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -587,3 +586,4 @@
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/e55_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/e55_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -91,7 +91,6 @@
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
-CONFIG_DUMMY_KEYB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
 
@@ -116,6 +115,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -180,7 +180,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -191,6 +190,7 @@
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
+# CONFIG_IDE_ARM is not set
 # CONFIG_IDE_CHIPSETS is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
@@ -570,7 +570,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -605,3 +604,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/eagle_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/eagle_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -59,6 +59,7 @@
 # CONFIG_TANBAC_TB0229 is not set
 # CONFIG_VICTOR_MPC30X is not set
 # CONFIG_ZAO_CAPCELLA is not set
+CONFIG_PCI_VR41XX=y
 CONFIG_VRC4173=y
 # CONFIG_TOSHIBA_JMR3927 is not set
 # CONFIG_MIPS_COBALT is not set
@@ -91,7 +92,6 @@
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
-CONFIG_DUMMY_KEYB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
 
@@ -116,6 +116,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -126,6 +127,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -261,7 +263,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
-# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECS=y
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
@@ -274,6 +275,7 @@
 #
 CONFIG_IDE_GENERIC=y
 # CONFIG_BLK_DEV_IDEPCI is not set
+# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -291,7 +293,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -447,7 +448,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -692,7 +692,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -739,11 +738,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/ev64120_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ev64120_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -111,6 +111,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
@@ -124,6 +125,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -191,7 +193,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -339,7 +340,6 @@
 # CONFIG_PPP_BSDCOMP is not set
 # CONFIG_PPPOE is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -559,7 +559,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -594,3 +593,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/ev96100_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ev96100_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -110,6 +110,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
@@ -126,6 +127,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 # CONFIG_PCI is not set
 CONFIG_MMU=y
 
@@ -514,7 +516,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -549,3 +550,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/ip22_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ip22_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -114,6 +114,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
@@ -196,7 +197,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -583,7 +583,7 @@
 CONFIG_INDYDOG=m
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
-CONFIG_SGI_DS1286=y
+CONFIG_SGI_DS1286=m
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -750,7 +750,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -850,11 +849,13 @@
 CONFIG_CRYPTO_ARC4=m
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/ip27_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ip27_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -113,6 +113,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -128,6 +129,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -203,7 +205,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_LOGGING=y
 
@@ -226,7 +227,6 @@
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_PIO is not set
@@ -235,6 +235,7 @@
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_IPR is not set
 CONFIG_SCSI_QLOGIC_ISP=y
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
@@ -267,6 +268,7 @@
 #
 # I2O device support
 #
+# CONFIG_I2O is not set
 
 #
 # Networking support
@@ -638,7 +640,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -700,11 +701,13 @@
 CONFIG_CRYPTO_ARC4=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/ip32_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ip32_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -102,6 +102,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
@@ -116,6 +117,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -193,7 +195,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 CONFIG_SCSI_MULTI_LUN=y
-# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_LOGGING=y
 
@@ -222,7 +223,6 @@
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_PIO is not set
@@ -231,6 +231,7 @@
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
@@ -263,6 +264,7 @@
 #
 # I2O device support
 #
+# CONFIG_I2O is not set
 
 #
 # Networking support
@@ -617,7 +619,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -663,3 +664,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/it8172_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/it8172_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -110,6 +110,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -122,6 +123,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 # CONFIG_PCI is not set
 CONFIG_MMU=y
 
@@ -231,7 +233,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -242,6 +243,7 @@
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
+# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -615,7 +617,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -650,3 +651,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/ivr_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ivr_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -108,6 +108,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -120,6 +121,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -179,7 +181,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -191,6 +192,7 @@
 #
 CONFIG_IDE_GENERIC=y
 # CONFIG_BLK_DEV_IDEPCI is not set
+# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -208,7 +210,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -350,7 +351,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -571,7 +571,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -606,3 +605,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/jaguar-atx_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/jaguar-atx_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -100,6 +100,7 @@
 CONFIG_CPU_RM9000=y
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
@@ -118,6 +119,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -184,7 +186,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -538,3 +539,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/jmr3927_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/jmr3927_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -104,6 +104,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -115,6 +116,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -182,7 +184,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -324,7 +325,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -462,6 +462,7 @@
 #
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_RIVA is not set
 # CONFIG_FB_MATROX is not set
@@ -578,7 +579,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -613,3 +613,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/lasat200_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/lasat200_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -112,6 +112,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
@@ -127,6 +128,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 # CONFIG_PCI_NAMES is not set
@@ -242,7 +244,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -283,6 +284,7 @@
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
 CONFIG_IDEDMA_AUTO=y
@@ -301,7 +303,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -438,7 +439,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -665,7 +665,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -700,3 +699,4 @@
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/malta_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/malta_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -115,6 +115,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -129,6 +130,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -197,7 +199,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -357,7 +358,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -580,7 +580,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -615,3 +614,4 @@
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/mirage_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/mirage_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -105,6 +105,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -496,6 +497,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -567,7 +571,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -652,11 +655,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/mpc30x_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/mpc30x_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -59,6 +59,7 @@
 # CONFIG_TANBAC_TB0229 is not set
 CONFIG_VICTOR_MPC30X=y
 # CONFIG_ZAO_CAPCELLA is not set
+CONFIG_PCI_VR41XX=y
 CONFIG_VRC4173=y
 # CONFIG_TOSHIBA_JMR3927 is not set
 # CONFIG_MIPS_COBALT is not set
@@ -91,7 +92,6 @@
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
-CONFIG_DUMMY_KEYB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
 
@@ -116,6 +116,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -126,6 +127,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -192,7 +194,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -335,7 +336,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -555,7 +555,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -602,11 +601,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/mtx1_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/mtx1_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -105,6 +105,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -496,6 +497,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -567,7 +571,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -652,11 +655,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/ocelot_c_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ocelot_c_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -100,6 +100,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
@@ -114,7 +115,10 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
-# CONFIG_PCI is not set
+CONFIG_HW_HAS_PCI=y
+CONFIG_PCI=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
 CONFIG_MMU=y
 
 #
@@ -154,8 +158,13 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_CARMEL is not set
 # CONFIG_BLK_DEV_RAM is not set
 
 #
@@ -185,6 +194,7 @@
 #
 # I2O device support
 #
+# CONFIG_I2O is not set
 
 #
 # Networking support
@@ -258,26 +268,50 @@
 # CONFIG_ETHERTAP is not set
 
 #
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
 # CONFIG_MII is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-CONFIG_MV64340_ETH=y
-CONFIG_MV64340_ETH_0=y
-# CONFIG_MV64340_ETH_1 is not set
-# CONFIG_MV64340_ETH_2 is not set
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_MV64340_ETH is not set
 
 #
 # Ethernet (10000 Mbit)
 #
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
 
 #
 # Token Ring devices
 #
+# CONFIG_TR is not set
 
 #
 # Wireless LAN (non-hamradio)
@@ -288,6 +322,8 @@
 # Wan interfaces
 #
 # CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
@@ -329,6 +365,7 @@
 # CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
 
 #
 # Input Device Drivers
@@ -426,6 +463,7 @@
 #
 # USB support
 #
+# CONFIG_USB is not set
 
 #
 # USB Gadget Support
@@ -509,7 +547,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -544,3 +581,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/ocelot_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/ocelot_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -108,6 +108,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
@@ -124,6 +125,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 # CONFIG_PCI is not set
 CONFIG_MMU=y
 
@@ -513,7 +515,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -548,3 +549,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/osprey_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/osprey_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -83,7 +83,6 @@
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
-CONFIG_DUMMY_KEYB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
 CONFIG_VR4181=y
@@ -109,6 +108,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -507,7 +507,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -542,3 +541,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
--- diff/arch/mips/configs/pb1000_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/pb1000_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -105,6 +105,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -496,6 +497,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -567,7 +571,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -652,11 +655,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/pb1100_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/pb1100_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -105,6 +105,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -496,6 +497,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -567,7 +571,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -652,11 +655,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/pb1500_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/pb1500_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -123,6 +123,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -137,6 +138,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -213,7 +215,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECS is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
@@ -254,6 +255,7 @@
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
 # CONFIG_IDEDMA_AUTO is not set
@@ -272,7 +274,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -452,7 +453,6 @@
 # CONFIG_PPP_BSDCOMP is not set
 CONFIG_PPPOE=m
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -611,6 +611,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -682,7 +685,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -767,11 +769,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/pb1550_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/pb1550_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -122,6 +122,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -136,6 +137,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -212,7 +214,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECS is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
@@ -253,6 +254,7 @@
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
 # CONFIG_IDEDMA_AUTO is not set
@@ -271,7 +273,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -451,7 +452,6 @@
 # CONFIG_PPP_BSDCOMP is not set
 CONFIG_PPPOE=m
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -610,6 +610,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -681,7 +684,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -766,11 +768,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/rm200_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/rm200_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -116,6 +116,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
@@ -129,6 +130,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 # CONFIG_PCI_NAMES is not set
@@ -246,7 +248,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -268,12 +269,12 @@
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
@@ -294,6 +295,7 @@
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PSI240I is not set
 # CONFIG_SCSI_QLOGIC_FAS is not set
@@ -695,7 +697,6 @@
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -908,6 +909,7 @@
 CONFIG_USB_KBTAB=m
 CONFIG_USB_POWERMATE=m
 # CONFIG_USB_MTOUCH is not set
+CONFIG_USB_EGALAX=m
 CONFIG_USB_XPAD=m
 # CONFIG_USB_ATI_REMOTE is not set
 
@@ -1016,6 +1018,7 @@
 CONFIG_USB_LCD=m
 CONFIG_USB_LED=m
 CONFIG_USB_CYTHERM=m
+CONFIG_USB_PHIDGETSERVO=m
 CONFIG_USB_TEST=m
 
 #
@@ -1051,10 +1054,14 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 CONFIG_JFS_FS=m
 # CONFIG_JFS_POSIX_ACL is not set
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_RT is not set
 CONFIG_XFS_QUOTA=y
@@ -1140,6 +1147,7 @@
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
 CONFIG_NCP_FS=m
 CONFIG_NCPFS_PACKET_SIGNING=y
 CONFIG_NCPFS_IOCTL_LOCKING=y
@@ -1151,7 +1159,6 @@
 CONFIG_NCPFS_EXTRAS=y
 CONFIG_CODA_FS=m
 CONFIG_CODA_FS_OLD_API=y
-CONFIG_INTERMEZZO_FS=m
 CONFIG_AFS_FS=m
 CONFIG_RXRPC=m
 
@@ -1252,11 +1259,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_CRC32C is not set
 CONFIG_CRYPTO_TEST=m
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
--- diff/arch/mips/configs/sb1250-swarm_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/sb1250-swarm_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -93,7 +93,6 @@
 # CONFIG_CPU_SB1_PASS_4 is not set
 # CONFIG_CPU_SB1_PASS_2_112x is not set
 # CONFIG_CPU_SB1_PASS_3 is not set
-CONFIG_SIBYTE_HAS_PCI=y
 CONFIG_SIBYTE_HAS_LDT=y
 # CONFIG_SIMULATION is not set
 CONFIG_SIBYTE_CFE=y
@@ -107,7 +106,6 @@
 CONFIG_HAVE_DEC_LOCK=y
 CONFIG_DMA_COHERENT=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
-CONFIG_DUMMY_KEYB=y
 CONFIG_SWAP_IO_SPACE=y
 CONFIG_BOOT_ELF32=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
@@ -134,6 +132,7 @@
 # CONFIG_CPU_RM9000 is not set
 CONFIG_CPU_SB1=y
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_SIBYTE_DMA_PAGEOPS is not set
@@ -154,6 +153,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -213,7 +213,30 @@
 #
 # ATA/ATAPI/MFM/RLL support
 #
-# CONFIG_IDE is not set
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECD=y
+CONFIG_BLK_DEV_IDETAPE=y
+CONFIG_BLK_DEV_IDEFLOPPY=y
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_TASKFILE_IO is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_IDEPCI is not set
+CONFIG_BLK_DEV_IDE_SWARM=y
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI device support
@@ -228,7 +251,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -371,7 +393,6 @@
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -575,7 +596,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -623,11 +643,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/sead_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/sead_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -19,7 +19,6 @@
 #
 CONFIG_SWAP=y
 # CONFIG_SYSVIPC is not set
-# CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
@@ -103,6 +102,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -429,3 +429,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/tb0226_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/tb0226_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -90,7 +90,6 @@
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
-CONFIG_DUMMY_KEYB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 CONFIG_FB=y
 
@@ -115,6 +114,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -125,6 +125,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 # CONFIG_PCI is not set
 CONFIG_MMU=y
 
@@ -179,7 +180,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -191,6 +191,7 @@
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
+# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -215,7 +216,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 CONFIG_SCSI_MULTI_LUN=y
-# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -608,7 +608,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -681,5 +680,6 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=m
--- diff/arch/mips/configs/tb0229_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/tb0229_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -59,7 +59,8 @@
 CONFIG_TANBAC_TB0229=y
 # CONFIG_VICTOR_MPC30X is not set
 # CONFIG_ZAO_CAPCELLA is not set
-# CONFIG_VRC4173 is not set
+CONFIG_PCI_VR41XX=y
+CONFIG_VRC4173=y
 # CONFIG_TOSHIBA_JMR3927 is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
@@ -91,7 +92,6 @@
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
-CONFIG_DUMMY_KEYB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
 CONFIG_TANBAC_TB0219=y
@@ -117,6 +117,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -127,6 +128,7 @@
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -196,7 +198,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -355,7 +356,6 @@
 CONFIG_SLIP_COMPRESSED=y
 CONFIG_SLIP_SMART=y
 CONFIG_SLIP_MODE_SLIP6=y
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -599,7 +599,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -672,5 +671,6 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=m
--- diff/arch/mips/configs/workpad_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/workpad_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -115,6 +115,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
@@ -179,7 +180,6 @@
 #
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -190,6 +190,7 @@
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
+# CONFIG_IDE_ARM is not set
 # CONFIG_IDE_CHIPSETS is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
@@ -573,7 +574,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -608,3 +608,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/configs/xxs1500_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/xxs1500_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -105,6 +105,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -496,6 +497,9 @@
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
@@ -567,7 +571,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -652,11 +655,13 @@
 # CONFIG_CRYPTO_ARC4 is not set
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/configs/yosemite_defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/configs/yosemite_defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -9,20 +9,20 @@
 #
 # Code maturity level options
 #
-CONFIG_EXPERIMENTAL=y
+# CONFIG_EXPERIMENTAL is not set
 CONFIG_CLEAN_COMPILE=y
 CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
 #
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
-# CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_LOG_BUF_SHIFT=15
+CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_HOTPLUG is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
@@ -41,47 +41,40 @@
 #
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
 CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
 
 #
 # Machine selection
 #
 # CONFIG_MACH_JAZZ is not set
-# CONFIG_BAGET_MIPS is not set
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
-# CONFIG_MIPS_EV64120 is not set
-# CONFIG_MIPS_EV96100 is not set
 # CONFIG_MIPS_IVR is not set
 # CONFIG_LASAT is not set
 # CONFIG_MIPS_ITE8172 is not set
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
-# CONFIG_MIPS_SEAD is not set
 # CONFIG_MOMENCO_OCELOT is not set
 # CONFIG_MOMENCO_OCELOT_G is not set
 # CONFIG_MOMENCO_OCELOT_C is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
-# CONFIG_PMC_YOSEMITE is not set
-# CONFIG_DDB5074 is not set
+CONFIG_PMC_YOSEMITE=y
+# CONFIG_HYPERTRANSPORT is not set
 # CONFIG_DDB5476 is not set
 # CONFIG_DDB5477 is not set
 # CONFIG_NEC_OSPREY is not set
 # CONFIG_SGI_IP22 is not set
-# CONFIG_SGI_IP32 is not set
 # CONFIG_SOC_AU1X00 is not set
-# CONFIG_SIBYTE_SB1xxx_SOC is not set
 # CONFIG_SNI_RM200_PCI is not set
 # CONFIG_TOSHIBA_RBTX4927 is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_HAVE_DEC_LOCK=y
+CONFIG_DMA_COHERENT=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
+CONFIG_IRQ_CPU=y
+CONFIG_IRQ_CPU_RM7K=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
 
@@ -106,6 +99,7 @@
 CONFIG_CPU_RM9000=y
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
@@ -114,15 +108,18 @@
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_LLDSCD=y
 CONFIG_CPU_HAS_SYNC=y
-# CONFIG_HIGHMEM is not set
-CONFIG_SMP=y
-CONFIG_NR_CPUS=2
+CONFIG_HIGHMEM=y
+# CONFIG_SMP is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
+CONFIG_HW_HAS_PCI=y
+CONFIG_PCI=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
 CONFIG_MMU=y
 
 #
@@ -159,11 +156,14 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-CONFIG_BLK_DEV_LOOP=y
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_CARMEL is not set
 # CONFIG_BLK_DEV_RAM is not set
-CONFIG_LBD=y
+# CONFIG_LBD is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -173,40 +173,7 @@
 #
 # SCSI device support
 #
-CONFIG_SCSI=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=y
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=y
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=y
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_REPORT_LUNS=y
-# CONFIG_SCSI_CONSTANTS is not set
-# CONFIG_SCSI_LOGGING is not set
-
-#
-# SCSI Transport Attributes
-#
-# CONFIG_SCSI_SPI_ATTRS is not set
-# CONFIG_SCSI_FC_ATTRS is not set
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -225,6 +192,7 @@
 #
 # I2O device support
 #
+# CONFIG_I2O is not set
 
 #
 # Networking support
@@ -234,46 +202,31 @@
 #
 # Networking options
 #
-CONFIG_PACKET=y
+CONFIG_PACKET=m
 CONFIG_PACKET_MMAP=y
-# CONFIG_NETLINK_DEV is not set
+CONFIG_NETLINK_DEV=m
 CONFIG_UNIX=y
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_BOOTP=y
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
 # CONFIG_SYN_COOKIES is not set
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
-# CONFIG_IPV6 is not set
 # CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
 
 #
 # QoS and/or fair queueing
@@ -296,22 +249,49 @@
 # CONFIG_TUN is not set
 
 #
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
 
 #
 # Ethernet (1000 Mbit)
 #
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+CONFIG_TITAN_GE=y
 
 #
 # Ethernet (10000 Mbit)
 #
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
 
 #
 # Token Ring devices
 #
+# CONFIG_TR is not set
 
 #
 # Wireless LAN (non-hamradio)
@@ -322,10 +302,9 @@
 # Wan interfaces
 #
 # CONFIG_WAN is not set
+# CONFIG_FDDI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
 
 #
 # ISDN subsystem
@@ -351,10 +330,8 @@
 #
 # CONFIG_GAMEPORT is not set
 CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
 
 #
 # Input Device Drivers
@@ -364,22 +341,21 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_ROCKETPORT is not set
-# CONFIG_CYCLADES is not set
-# CONFIG_SYNCLINK is not set
-# CONFIG_SYNCLINKMP is not set
-# CONFIG_N_HDLC is not set
-# CONFIG_STALDRV is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
 
 #
 # Serial drivers
 #
-# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
 # Non-8250 serial port support
 #
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -403,6 +379,7 @@
 #
 # Ftape, the floppy tape device driver
 #
+# CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
@@ -438,6 +415,7 @@
 #
 # USB support
 #
+# CONFIG_USB is not set
 
 #
 # USB Gadget Support
@@ -448,13 +426,8 @@
 # File systems
 #
 # CONFIG_EXT2_FS is not set
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_FS_XATTR=y
-# CONFIG_EXT3_FS_POSIX_ACL is not set
-# CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_XFS_FS is not set
@@ -482,7 +455,6 @@
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
 # CONFIG_HUGETLB_PAGE is not set
@@ -491,13 +463,7 @@
 #
 # Miscellaneous filesystems
 #
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
 # CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -509,22 +475,16 @@
 # Network File Systems
 #
 CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFS_V3 is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
 # CONFIG_EXPORTFS is not set
 CONFIG_SUNRPC=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
-# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
@@ -558,3 +518,4 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/ddb5xxx/ddb5074/irq.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/ddb5xxx/ddb5074/irq.c	2004-07-01 21:32:32.000000000 +0100
@@ -24,7 +24,7 @@
 
 extern asmlinkage void ddbIRQ(void);
 
-static struct irqaction irq_cascade = { no_action, 0, 0, "cascade", NULL, NULL };
+static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL };
 
 #define M1543_PNP_CONFIG	0x03f0	/* PnP Config Port */
 #define M1543_PNP_INDEX		0x03f0	/* PnP Index Port */
--- diff/arch/mips/ddb5xxx/ddb5476/irq.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/ddb5xxx/ddb5476/irq.c	2004-07-01 21:32:32.000000000 +0100
@@ -107,8 +107,8 @@
 	/* memory resource acquire in ddb_setup */
 }
 
-static struct irqaction irq_cascade = { no_action, 0, 0, "cascade", NULL, NULL };
-static struct irqaction irq_error = { no_action, 0, 0, "error", NULL, NULL };
+static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL };
+static struct irqaction irq_error = { no_action, 0, CPU_MASK_NONE, "error", NULL, NULL };
 
 extern asmlinkage void ddb5476_handle_int(void);
 extern int setup_irq(unsigned int irq, struct irqaction *irqaction);
--- diff/arch/mips/ddb5xxx/ddb5477/irq.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/ddb5xxx/ddb5477/irq.c	2004-07-01 21:32:32.000000000 +0100
@@ -77,7 +77,7 @@
 extern void mips_cpu_irq_init(u32 base);
 extern asmlinkage void ddb5477_handle_int(void);
 extern int setup_irq(unsigned int irq, struct irqaction *irqaction);  
-static struct irqaction irq_cascade = { no_action, 0, 0, "cascade", NULL, NULL };
+static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL };
 
 void
 ddb5477_irq_setup(void)
--- diff/arch/mips/defconfig	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/defconfig	2004-07-01 21:32:32.000000000 +0100
@@ -114,6 +114,7 @@
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
@@ -196,7 +197,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -583,7 +583,7 @@
 CONFIG_INDYDOG=m
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
-CONFIG_SGI_DS1286=y
+CONFIG_SGI_DS1286=m
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -750,7 +750,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -850,11 +849,13 @@
 CONFIG_CRYPTO_ARC4=m
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
 # CONFIG_CRC32 is not set
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
--- diff/arch/mips/gt64120/common/time.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/gt64120/common/time.c	2004-07-01 21:32:32.000000000 +0100
@@ -80,7 +80,7 @@
 	timer.name = "timer";
 	timer.dev_id = NULL;
 	timer.next = NULL;
-	timer.mask = 0;
+	timer.mask = CPU_MASK_NONE;
 	irq_desc[GT_TIMER].action = &timer;
 
 	enable_irq(GT_TIMER);
--- diff/arch/mips/jmr3927/rbhma3100/irq.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/jmr3927/rbhma3100/irq.c	2004-07-01 21:32:32.000000000 +0100
@@ -301,7 +301,7 @@
 }
 
 static struct irqaction ioc_action = {
-	jmr3927_ioc_interrupt, 0, 0, "IOC", NULL, NULL,
+	jmr3927_ioc_interrupt, 0, CPU_MASK_NONE, "IOC", NULL, NULL,
 };
 
 static void jmr3927_isac_interrupt(int irq, void *dev_id, struct pt_regs *regs)
@@ -318,7 +318,7 @@
 }
 
 static struct irqaction isac_action = {
-	jmr3927_isac_interrupt, 0, 0, "ISAC", NULL, NULL,
+	jmr3927_isac_interrupt, 0, CPU_MASK_NONE, "ISAC", NULL, NULL,
 };
 
 
@@ -327,7 +327,7 @@
 	printk(KERN_WARNING "ISA error interrupt (irq 0x%x).\n", irq);
 }
 static struct irqaction isaerr_action = {
-	jmr3927_isaerr_interrupt, 0, 0, "ISA error", NULL, NULL,
+	jmr3927_isaerr_interrupt, 0, CPU_MASK_NONE, "ISA error", NULL, NULL,
 };
 
 static void jmr3927_pcierr_interrupt(int irq, void * dev_id, struct pt_regs * regs)
@@ -337,7 +337,7 @@
 	       tx3927_pcicptr->pcistat, tx3927_pcicptr->lbstat);
 }
 static struct irqaction pcierr_action = {
-	jmr3927_pcierr_interrupt, 0, 0, "PCI error", NULL, NULL,
+	jmr3927_pcierr_interrupt, 0, CPU_MASK_NONE, "PCI error", NULL, NULL,
 };
 
 int jmr3927_ether1_irq = 0;
--- diff/arch/mips/kernel/Makefile	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/kernel/Makefile	2004-07-01 21:32:32.000000000 +0100
@@ -9,7 +9,7 @@
 		   time.o traps.o unaligned.o
 
 ifdef CONFIG_MODULES
-obj-y				+= mips_ksyms.o
+obj-y				+= mips_ksyms.o module.o
 obj-$(CONFIG_MIPS32)		+= module-elf32.o
 obj-$(CONFIG_MIPS64)		+= module-elf64.o
 endif
@@ -23,6 +23,7 @@
 obj-$(CONFIG_CPU_R4X00)		+= r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R5000)		+= r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R5432)		+= r4k_fpu.o r4k_switch.o
+obj-$(CONFIG_CPU_R8000)		+= r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_RM7000)	+= r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_RM9000)	+= r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_NEVADA)	+= r4k_fpu.o r4k_switch.o
--- diff/arch/mips/kernel/cpu-bugs64.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/kernel/cpu-bugs64.c	2004-07-01 21:32:32.000000000 +0100
@@ -177,7 +177,7 @@
 	extern asmlinkage void handle_daddi_ov(void);
 	unsigned long flags;
 	void *handler;
-	long v;
+	long v, tmp;
 
 	printk("Checking for the daddi bug... ");
 
@@ -197,13 +197,15 @@
 		".set	noat\n\t"
 		".set	noreorder\n\t"
 		".set	nomacro\n\t"
+		"addiu	%1, $0, %2\n\t"
+		"dsrl	%1, %1, 1\n\t"
 #ifdef HAVE_AS_SET_DADDI
 		".set	daddi\n\t"
 #endif
-		"daddi	%0, %1, %2\n\t"
+		"daddi	%0, %1, %3\n\t"
 		".set	pop"
-		: "=r" (v)
-		: "r" (0x7fffffffffffedcd), "I" (0x1234));
+		: "=r" (v), "=&r" (tmp)
+		: "I" (0xffffffffffffdb9a), "I" (0x1234));
 	set_except_vector(12, handler);
 	local_irq_restore(flags);
 
@@ -217,9 +219,11 @@
 	local_irq_save(flags);
 	handler = set_except_vector(12, handle_daddi_ov);
 	asm volatile(
-		"daddi	%0, %1, %2"
-		: "=r" (v)
-		: "r" (0x7fffffffffffedcd), "I" (0x1234));
+		"addiu	%1, $0, %2\n\t"
+		"dsrl	%1, %1, 1\n\t"
+		"daddi	%0, %1, %3"
+		: "=r" (v), "=&r" (tmp)
+		: "I" (0xffffffffffffdb9a), "I" (0x1234));
 	set_except_vector(12, handler);
 	local_irq_restore(flags);
 
@@ -240,7 +244,7 @@
 
 static inline void check_daddiu(void)
 {
-	long v, w;
+	long v, w, tmp;
 
 	printk("Checking for the daddiu bug... ");
 
@@ -265,15 +269,17 @@
 		".set	noat\n\t"
 		".set	noreorder\n\t"
 		".set	nomacro\n\t"
+		"addiu	%2, $0, %3\n\t"
+		"dsrl	%2, %2, 1\n\t"
 #ifdef HAVE_AS_SET_DADDI
 		".set	daddi\n\t"
 #endif
-		"daddiu	%0, %2, %3\n\t"
-		"addiu	%1, $0, %3\n\t"
+		"daddiu	%0, %2, %4\n\t"
+		"addiu	%1, $0, %4\n\t"
 		"daddu	%1, %2\n\t"
 		".set	pop"
-		: "=&r" (v), "=&r" (w)
-		: "r" (0x7fffffffffffedcd), "I" (0x1234));
+		: "=&r" (v), "=&r" (w), "=&r" (tmp)
+		: "I" (0xffffffffffffdb9a), "I" (0x1234));
 
 	if (v == w) {
 		printk("no.\n");
@@ -283,11 +289,13 @@
 	printk("yes, workaround... ");
 
 	asm volatile(
-		"daddiu	%0, %2, %3\n\t"
-		"addiu	%1, $0, %3\n\t"
+		"addiu	%2, $0, %3\n\t"
+		"dsrl	%2, %2, 1\n\t"
+		"daddiu	%0, %2, %4\n\t"
+		"addiu	%1, $0, %4\n\t"
 		"daddu	%1, %2"
-		: "=&r" (v), "=&r" (w)
-		: "r" (0x7fffffffffffedcd), "I" (0x1234));
+		: "=&r" (v), "=&r" (w), "=&r" (tmp)
+		: "I" (0xffffffffffffdb9a), "I" (0x1234));
 
 	if (v == w) {
 		printk("yes.\n");
--- diff/arch/mips/kernel/cpu-probe.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/kernel/cpu-probe.c	2004-07-01 21:32:32.000000000 +0100
@@ -1,6 +1,8 @@
 /*
  * Processor capabilities determination functions.
  *
+ * Copyright (C) xxxx  the Anonymous
+ * Copyright (C) 2003  Maciej W. Rozycki
  * Copyright (C) 1994 - 2003 Ralf Baechle
  * Copyright (C) 2001 MIPS Inc.
  *
@@ -49,6 +51,14 @@
 		".set\tmips0");
 }
 
+/*
+ * The Au1xxx wait is available only if we run CONFIG_PM and
+ * the timer setup found we had a 32KHz counter available.
+ * There are still problems with functions that may call au1k_wait
+ * directly, but that will be discovered pretty quickly.
+ */
+extern void (*au1k_wait_ptr)(void);
+
 void au1k_wait(void)
 {
 #ifdef CONFIG_PM
@@ -90,7 +100,6 @@
 	case CPU_R5000:
 	case CPU_NEVADA:
 	case CPU_RM7000:
-/*	case CPU_RM9000: */
 	case CPU_TX49XX:
 	case CPU_4KC:
 	case CPU_4KEC:
@@ -102,12 +111,19 @@
 		cpu_wait = r4k_wait;
 		printk(" available.\n");
 		break;
+#ifdef CONFIG_PM
 	case CPU_AU1000:
 	case CPU_AU1100:
 	case CPU_AU1500:
-		cpu_wait = au1k_wait;
-		printk(" available.\n");
+		if (au1k_wait_ptr != NULL) {
+			cpu_wait = au1k_wait_ptr;
+			printk(" available.\n");
+		}
+		else {
+			printk(" unavailable.\n");
+		}
 		break;
+#endif
 	default:
 		printk(" unavailable.\n");
 		break;
@@ -238,8 +254,8 @@
 			break;
 		default:
 			printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
-				c->cputype = CPU_VR41XX;
-				break;
+			c->cputype = CPU_VR41XX;
+			break;
 		}
 		c->isa_level = MIPS_CPU_ISA_III;
 		c->options = R4K_OPTS;
@@ -371,7 +387,7 @@
 		c->cputype = CPU_RM9000;
 		c->isa_level = MIPS_CPU_ISA_IV;
 		c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
-			     MIPS_CPU_LLSC;
+		             MIPS_CPU_LLSC;
 		/*
 		 * Bit 29 in the info register of the RM9000
 		 * indicates if the TLB has 48 or 64 entries.
@@ -407,9 +423,6 @@
 		             MIPS_CPU_LLSC;
 		c->tlbsize = 64;
 		break;
-	default:
-		c->cputype = CPU_UNKNOWN;
-		break;
 	}
 }
 
@@ -475,9 +488,6 @@
 		/* Probe for L2 cache */
 		c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
 		break;
-	default:
-		c->cputype = CPU_UNKNOWN;
-		break;
 	}
 }
 
@@ -505,9 +515,6 @@
 			break;
 		}
 		c->isa_level = MIPS_CPU_ISA_M32;
- 		break;
-	default:
-		c->cputype = CPU_UNKNOWN;
 		break;
 	}
 }
@@ -528,9 +535,6 @@
 		c->options |= MIPS_CPU_FPU | MIPS_CPU_32FPR;
 #endif
 		break;
-	default:
-		c->cputype = CPU_UNKNOWN;
-		break;
 	}
 }
 
@@ -542,14 +546,11 @@
 		c->cputype = CPU_SR71000;
 		c->isa_level = MIPS_CPU_ISA_M64;
 		c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
-                                    MIPS_CPU_4KTLB | MIPS_CPU_FPU |
+		             MIPS_CPU_4KTLB | MIPS_CPU_FPU |
 		             MIPS_CPU_COUNTER | MIPS_CPU_MCHECK;
 		c->scache.ways = 8;
 		c->tlbsize = 64;
 		break;
-	default:
-		c->cputype = CPU_UNKNOWN;
-		break;
 	}
 }
 
@@ -563,7 +564,6 @@
 
 	c->processor_id = read_c0_prid();
 	switch (c->processor_id & 0xff0000) {
-
 	case PRID_COMP_LEGACY:
 		cpu_probe_legacy(c);
 		break;
--- diff/arch/mips/kernel/init_task.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/kernel/init_task.c	2004-07-01 21:32:32.000000000 +0100
@@ -3,6 +3,7 @@
 #include <linux/sched.h>
 #include <linux/init_task.h>
 #include <linux/fs.h>
+#include <linux/mqueue.h>
 
 #include <asm/thread_info.h>
 #include <asm/uaccess.h>
--- diff/arch/mips/kernel/irq.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/kernel/irq.c	2004-07-01 21:32:32.000000000 +0100
@@ -487,7 +487,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/mips/kernel/module-elf32.c	2004-05-19 22:11:09.000000000 +0100
+++ source/arch/mips/kernel/module-elf32.c	2004-07-01 21:32:32.000000000 +0100
@@ -248,14 +248,3 @@
 	       me->name);
 	return -ENOEXEC;
 }
-
-int module_finalize(const Elf_Ehdr *hdr,
-		    const Elf_Shdr *sechdrs,
-		    struct module *me)
-{
-	return 0;
-}
-
-void module_arch_cleanup(struct module *mod)
-{
-}
--- diff/arch/mips/kernel/module-elf64.c	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/kernel/module-elf64.c	2004-07-01 21:32:32.000000000 +0100
@@ -272,14 +272,3 @@
 
 	return 0;
 }
-
-int module_finalize(const Elf_Ehdr *hdr,
-		    const Elf_Shdr *sechdrs,
-		    struct module *me)
-{
-	return 0;
-}
-
-void module_arch_cleanup(struct module *mod)
-{
-}
--- diff/arch/mips/kernel/scall32-o32.S	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/kernel/scall32-o32.S	2004-07-01 21:32:32.000000000 +0100
@@ -627,6 +627,7 @@
 	sys	sys_mq_timedreceive	5
 	sys	sys_mq_notify		2	/* 4275 */
 	sys	sys_mq_getsetattr	3
+	sys	sys_ni_syscall		0	/* sys_vserver */
 
 	.endm
 
--- diff/arch/mips/kernel/scall64-64.S	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/kernel/scall64-64.S	2004-07-01 21:32:32.000000000 +0100
@@ -447,3 +447,4 @@
 	PTR	sys_mq_timedreceive
 	PTR	sys_mq_notify
 	PTR	sys_mq_getsetattr		/* 5235 */
+	PTR	sys_ni_syscall			/* sys_vserver */
--- diff/arch/mips/kernel/scall64-n32.S	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/kernel/scall64-n32.S	2004-07-01 21:32:32.000000000 +0100
@@ -357,3 +357,4 @@
 	PTR	compat_sys_mq_timedreceive
 	PTR	compat_sys_mq_notify
 	PTR	compat_sys_mq_getsetattr	/* 6239 */
+	PTR	sys_ni_syscall			/* sys_vserver */
--- diff/arch/mips/kernel/scall64-o32.S	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/kernel/scall64-o32.S	2004-07-01 21:32:32.000000000 +0100
@@ -535,6 +535,7 @@
 	sys	compat_sys_mq_timedreceive 5
 	sys	compat_sys_mq_notify	2	/* 4275 */
 	sys	compat_sys_mq_getsetattr 3
+	sys	sys_ni_syscall		0	/* sys_vserver */
 
 	.endm
 
--- diff/arch/mips/kernel/semaphore.c	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/kernel/semaphore.c	2004-07-01 21:32:32.000000000 +0100
@@ -1,273 +1,165 @@
 /*
- * Copyright (C) 1999, 2001, 02, 03 Ralf Baechle
+ * MIPS-specific semaphore code.
  *
- * Heavily inspired by the Alpha implementation
+ * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
+ * Copyright (C) 2004 Ralf Baechle <ralf@linux-mips.org>
+ *
+ * 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.
+ *
+ * April 2001 - Reworked by Paul Mackerras <paulus@samba.org>
+ * to eliminate the SMP races in the old version between the updates
+ * of `count' and `waking'.  Now we use negative `count' values to
+ * indicate that some process(es) are waiting for the semaphore.
  */
+
 #include <linux/config.h>
-#include <linux/errno.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/sched.h>
+#include <linux/init.h>
+#include <asm/atomic.h>
+#include <asm/semaphore.h>
+#include <asm/errno.h>
 
-#ifdef CONFIG_CPU_HAS_LLDSCD
-/*
- * On machines without lld/scd we need a spinlock to make the manipulation of
- * sem->count and sem->waking atomic.  Scalability isn't an issue because
- * this lock is used on UP only so it's just an empty variable.
- */
-spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
-
-EXPORT_SYMBOL(semaphore_lock);
-#endif
+#ifdef CONFIG_CPU_HAS_LLSC
 
 /*
- * Semaphores are implemented using a two-way counter: The "count" variable is
- * decremented for each process that tries to sleep, while the "waking" variable
- * is incremented when the "up()" code goes to wake up waiting processes.
- *
- * Notably, the inline "up()" and "down()" functions can efficiently test if
- * they need to do any extra work (up needs to do something only if count was
- * negative before the increment operation.
- *
- * waking_non_zero() must execute atomically.
- *
- * When __up() is called, the count was negative before incrementing it, and we
- * need to wake up somebody.
+ * Atomically update sem->count.
+ * This does the equivalent of the following:
  *
- * This routine adds one to the count of processes that need to wake up and
- * exit.  ALL waiting processes actually wake up but only the one that gets to
- * the "waking" field first will gate through and acquire the semaphore.  The
- * others will go back to sleep.
- *
- * Note that these functions are only called when there is contention on the
- * lock, and as such all this is the "non-critical" part of the whole semaphore
- * business. The critical part is the inline stuff in <asm/semaphore.h> where
- * we want to avoid any extra jumps and calls.
+ *	old_count = sem->count;
+ *	tmp = MAX(old_count, 0) + incr;
+ *	sem->count = tmp;
+ *	return old_count;
  */
-void __up_wakeup(struct semaphore *sem)
-{
-	wake_up(&sem->wait);
-}
-
-EXPORT_SYMBOL(__up_wakeup);
-
-#ifdef CONFIG_CPU_HAS_LLSC
-
-static inline int waking_non_zero(struct semaphore *sem)
+static inline int __sem_update_count(struct semaphore *sem, int incr)
 {
-	int ret, tmp;
+	int old_count, tmp;
 
 	__asm__ __volatile__(
-	"1:	ll	%1, %2			# waking_non_zero	\n"
-	"	blez	%1, 2f						\n"
-	"	subu	%0, %1, 1					\n"
-	"	sc	%0, %2						\n"
-	"	beqz	%0, 1b						\n"
-	"2:								\n"
-	: "=r" (ret), "=r" (tmp), "+m" (sem->waking)
-	: "0" (0));
+	"1:	ll	%0, %2					\n"
+	"	sra	%1, %0, 31				\n"
+	"	not	%1					\n"
+	"	and	%1, %0, %1				\n"
+	"	add	%1, %1, %3				\n"
+	"	sc	%1, %2					\n"
+	"	beqz	%1, 1b					\n"
+	: "=&r" (old_count), "=&r" (tmp), "=m" (sem->count)
+	: "r" (incr), "m" (sem->count));
 
-	return ret;
+	return old_count;
 }
 
-#else /* !CONFIG_CPU_HAS_LLSC */
+#else
+
+/*
+ * On machines without lld/scd we need a spinlock to make the manipulation of
+ * sem->count and sem->waking atomic.  Scalability isn't an issue because
+ * this lock is used on UP only so it's just an empty variable.
+ */
+static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
 
-static inline int waking_non_zero(struct semaphore *sem)
+static inline int __sem_update_count(struct semaphore *sem, int incr)
 {
 	unsigned long flags;
-	int waking, ret = 0;
+	int old_count, tmp;
 
 	spin_lock_irqsave(&semaphore_lock, flags);
-	waking = atomic_read(&sem->waking);
-	if (waking > 0) {
-		atomic_set(&sem->waking, waking - 1);
-		ret = 1;
-	}
+	old_count = atomic_read(&sem->count);
+	tmp = max_t(int, old_count, 0) + incr;
+	atomic_set(&sem->count, tmp);
 	spin_unlock_irqrestore(&semaphore_lock, flags);
 
-	return ret;
+	return old_count;
 }
 
-#endif /* !CONFIG_CPU_HAS_LLSC */
-
-/*
- * Perform the "down" function.  Return zero for semaphore acquired, return
- * negative for signalled out of the function.
- *
- * If called from down, the return is ignored and the wait loop is not
- * interruptible.  This means that a task waiting on a semaphore using "down()"
- * cannot be killed until someone does an "up()" on the semaphore.
- *
- * If called from down_interruptible, the return value gets checked upon return.
- * If the return value is negative then the task continues with the negative
- * value in the return register (it can be tested by the caller).
- *
- * Either form may be used in conjunction with "up()".
- */
+#endif
 
-void __sched __down_failed(struct semaphore * sem)
+void __up(struct semaphore *sem)
 {
-	struct task_struct *tsk = current;
-	wait_queue_t wait;
-
-	init_waitqueue_entry(&wait, tsk);
-	__set_current_state(TASK_UNINTERRUPTIBLE);
-	add_wait_queue_exclusive(&sem->wait, &wait);
-
 	/*
-	 * Ok, we're set up.  sem->count is known to be less than zero
-	 * so we must wait.
-	 *
-	 * We can let go the lock for purposes of waiting.
-	 * We re-acquire it after awaking so as to protect
-	 * all semaphore operations.
-	 *
-	 * If "up()" is called before we call waking_non_zero() then
-	 * we will catch it right away.  If it is called later then
-	 * we will have to go through a wakeup cycle to catch it.
-	 *
-	 * Multiple waiters contend for the semaphore lock to see
-	 * who gets to gate through and who has to wait some more.
+	 * Note that we incremented count in up() before we came here,
+	 * but that was ineffective since the result was <= 0, and
+	 * any negative value of count is equivalent to 0.
+	 * This ends up setting count to 1, unless count is now > 0
+	 * (i.e. because some other cpu has called up() in the meantime),
+	 * in which case we just increment count.
 	 */
-	for (;;) {
-		if (waking_non_zero(sem))
-			break;
-		schedule();
-		__set_current_state(TASK_UNINTERRUPTIBLE);
-	}
-	__set_current_state(TASK_RUNNING);
-	remove_wait_queue(&sem->wait, &wait);
+	__sem_update_count(sem, 1);
+	wake_up(&sem->wait);
 }
 
-EXPORT_SYMBOL(__down_failed);
-
-#ifdef CONFIG_CPU_HAS_LLDSCD
+EXPORT_SYMBOL(__up);
 
 /*
- * waking_non_zero_interruptible:
- *	1	got the lock
- *	0	go to sleep
- *	-EINTR	interrupted
- *
- * We must undo the sem->count down_interruptible decrement
- * simultaneously and atomically with the sem->waking adjustment,
- * otherwise we can race with wake_one_more.
- *
- * This is accomplished by doing a 64-bit lld/scd on the 2 32-bit words.
- *
- * This is crazy.  Normally it's strictly forbidden to use 64-bit operations
- * in the 32-bit MIPS kernel.  In this case it's however ok because if an
- * interrupt has destroyed the upper half of registers sc will fail.
- * Note also that this will not work for MIPS32 CPUs!
- *
- * Pseudocode:
- *
- * If(sem->waking > 0) {
- *	Decrement(sem->waking)
- *	Return(SUCCESS)
- * } else If(signal_pending(tsk)) {
- *	Increment(sem->count)
- *	Return(-EINTR)
- * } else {
- *	Return(SLEEP)
- * }
+ * Note that when we come in to __down or __down_interruptible,
+ * we have already decremented count, but that decrement was
+ * ineffective since the result was < 0, and any negative value
+ * of count is equivalent to 0.
+ * Thus it is only when we decrement count from some value > 0
+ * that we have actually got the semaphore.
  */
-
-static inline int
-waking_non_zero_interruptible(struct semaphore *sem, struct task_struct *tsk)
+void __sched __down(struct semaphore *sem)
 {
-	long ret, tmp;
-
-	__asm__ __volatile__(
-	"	.set	push		# waking_non_zero_interruptible	\n"
-	"	.set	mips3						\n"
-	"	.set	noat						\n"
-	"0:	lld	%1, %2						\n"
-	"	li	%0, 0						\n"
-	"	sll	$1, %1, 0					\n"
-	"	blez	$1, 1f						\n"
-	"	daddiu	%1, %1, -1					\n"
-	"	li	%0, 1						\n"
-	"	b	2f						\n"
-	"1:	beqz	%3, 2f						\n"
-	"	li	%0, %4						\n"
-	"	dli	$1, 0x0000000100000000				\n"
-	"	daddu	%1, %1, $1					\n"
-	"2:	scd	%1, %2						\n"
-	"	beqz	%1, 0b						\n"
-	"	.set	pop						\n"
-	: "=&r" (ret), "=&r" (tmp), "=m" (*sem)
-	: "r" (signal_pending(tsk)), "i" (-EINTR));
-
-	return ret;
-}
-
-#else /* !CONFIG_CPU_HAS_LLDSCD */
-
-static inline int waking_non_zero_interruptible(struct semaphore *sem,
-						struct task_struct *tsk)
-{
-	int waking, pending, ret = 0;
-	unsigned long flags;
+	struct task_struct *tsk = current;
+	DECLARE_WAITQUEUE(wait, tsk);
 
-	pending = signal_pending(tsk);
+	__set_task_state(tsk, TASK_UNINTERRUPTIBLE);
+	add_wait_queue_exclusive(&sem->wait, &wait);
 
-	spin_lock_irqsave(&semaphore_lock, flags);
-	waking = atomic_read(&sem->waking);
-	if (waking > 0) {
-		atomic_set(&sem->waking, waking - 1);
-		ret = 1;
-	} else if (pending) {
-		atomic_set(&sem->count, atomic_read(&sem->count) + 1);
-		ret = -EINTR;
+	/*
+	 * Try to get the semaphore.  If the count is > 0, then we've
+	 * got the semaphore; we decrement count and exit the loop.
+	 * If the count is 0 or negative, we set it to -1, indicating
+	 * that we are asleep, and then sleep.
+	 */
+	while (__sem_update_count(sem, -1) <= 0) {
+		schedule();
+		set_task_state(tsk, TASK_UNINTERRUPTIBLE);
 	}
-	spin_unlock_irqrestore(&semaphore_lock, flags);
+	remove_wait_queue(&sem->wait, &wait);
+	__set_task_state(tsk, TASK_RUNNING);
 
-	return ret;
+	/*
+	 * If there are any more sleepers, wake one of them up so
+	 * that it can either get the semaphore, or set count to -1
+	 * indicating that there are still processes sleeping.
+	 */
+	wake_up(&sem->wait);
 }
 
-#endif /* !CONFIG_CPU_HAS_LLDSCD */
+EXPORT_SYMBOL(__down);
 
-int __sched __down_failed_interruptible(struct semaphore * sem)
+int __sched __down_interruptible(struct semaphore * sem)
 {
+	int retval = 0;
 	struct task_struct *tsk = current;
-	wait_queue_t wait;
-	int ret = 0;
+	DECLARE_WAITQUEUE(wait, tsk);
 
-	init_waitqueue_entry(&wait, tsk);
-	__set_current_state(TASK_INTERRUPTIBLE);
+	__set_task_state(tsk, TASK_INTERRUPTIBLE);
 	add_wait_queue_exclusive(&sem->wait, &wait);
 
-	/*
-	 * Ok, we're set up.  sem->count is known to be less than zero
-	 * so we must wait.
-	 *
-	 * We can let go the lock for purposes of waiting.
-	 * We re-acquire it after awaking so as to protect
-	 * all semaphore operations.
-	 *
-	 * If "up()" is called before we call waking_non_zero() then
-	 * we will catch it right away.  If it is called later then
-	 * we will have to go through a wakeup cycle to catch it.
-	 *
-	 * Multiple waiters contend for the semaphore lock to see
-	 * who gets to gate through and who has to wait some more.
-	 */
-	for (;;) {
-		ret = waking_non_zero_interruptible(sem, tsk);
-		if (ret) {
-			if (ret == 1)
-				/* ret != 0 only if we get interrupted -arca */
-				ret = 0;
+	while (__sem_update_count(sem, -1) <= 0) {
+		if (signal_pending(current)) {
+			/*
+			 * A signal is pending - give up trying.
+			 * Set sem->count to 0 if it is negative,
+			 * since we are no longer sleeping.
+			 */
+			__sem_update_count(sem, 0);
+			retval = -EINTR;
 			break;
 		}
 		schedule();
-		__set_current_state(TASK_INTERRUPTIBLE);
+		set_task_state(tsk, TASK_INTERRUPTIBLE);
 	}
-	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&sem->wait, &wait);
+	__set_task_state(tsk, TASK_RUNNING);
 
-	return ret;
+	wake_up(&sem->wait);
+	return retval;
 }
 
-EXPORT_SYMBOL(__down_failed_interruptible);
+EXPORT_SYMBOL(__down_interruptible);
--- diff/arch/mips/kernel/setup.c	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/kernel/setup.c	2004-07-01 21:32:32.000000000 +0100
@@ -38,6 +38,7 @@
 #include <asm/bootinfo.h>
 #include <asm/cpu.h>
 #include <asm/sections.h>
+#include <asm/setup.h>
 #include <asm/system.h>
 
 struct cpuinfo_mips cpu_data[NR_CPUS];
@@ -71,7 +72,6 @@
 struct boot_mem_map boot_mem_map;
 
 static char command_line[CL_SIZE];
-       char saved_command_line[CL_SIZE];
        char arcs_cmdline[CL_SIZE]=CONFIG_CMDLINE;
 
 /*
@@ -453,14 +453,18 @@
 
 void __init setup_arch(char **cmdline_p)
 {
+	unsigned int status;
+
 	cpu_probe();
 	prom_init();
 	cpu_report();
 
 #ifdef CONFIG_MIPS32
 	/* Disable coprocessors and set FPU for 16/32 FPR register model */
-	clear_c0_status(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_FR);
-	set_c0_status(ST0_CU0);
+	status = read_c0_status();
+	status &= ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_FR);
+	status |= ST0_CU0;
+	write_c0_status(status);
 #endif
 #ifdef CONFIG_MIPS64
 	/*
@@ -468,8 +472,10 @@
 	 * Maybe because the kernel is in ckseg0 and not xkphys? Clear it
 	 * anyway ...
 	 */
-	clear_c0_status(ST0_BEV|ST0_TS|ST0_CU1|ST0_CU2|ST0_CU3);
-	set_c0_status(ST0_CU0|ST0_KX|ST0_SX|ST0_FR);
+	status = read_c0_status();
+	status &= ~(ST0_BEV|ST0_TS|ST0_CU1|ST0_CU2|ST0_CU3);
+	status |= (ST0_CU0|ST0_KX|ST0_SX|ST0_FR);
+	write_c0_status(status);
 #endif
 
 #if defined(CONFIG_VT)
@@ -484,7 +490,7 @@
 	do_earlyinitcalls();
 
 	strlcpy(command_line, arcs_cmdline, sizeof(command_line));
-	strlcpy(saved_command_line, command_line, sizeof(saved_command_line));
+	strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
 
 	*cmdline_p = command_line;
 
--- diff/arch/mips/kernel/smp.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/kernel/smp.c	2004-07-01 21:32:32.000000000 +0100
@@ -279,14 +279,10 @@
 	if (IS_ERR(idle))
 		panic("failed fork for CPU %d\n", cpu);
 
-	wake_up_forked_process(idle);
-
-	/*
-	 * We remove it from the pidhash and the runqueue once we've
-	 * got the process:
-	 */
+	/* Make this the idle thread */
 	init_idle(idle, cpu);
 
+	/* Remove it from the pidhash */
 	unhash_process(idle);
 
 	prom_boot_secondary(cpu, idle);
--- diff/arch/mips/kernel/syscall.c	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/kernel/syscall.c	2004-07-01 21:32:32.000000000 +0100
@@ -36,7 +36,7 @@
 #include <asm/sysmips.h>
 #include <asm/uaccess.h>
 
-asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs)
+asmlinkage int sys_pipe(nabi_no_regargs volatile struct pt_regs regs)
 {
 	int fd[2];
 	int error, res;
--- diff/arch/mips/kernel/sysirix.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/kernel/sysirix.c	2004-07-01 21:32:32.000000000 +0100
@@ -1639,7 +1639,7 @@
 
 	printk("[%s:%d] Wheee.. irix_statvfs(%s,%p)\n",
 	       current->comm, current->pid, fname, buf);
-	error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs));
+	error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs64));
 	if(error)
 		goto out;
 	error = user_path_walk(fname, &nd);
--- diff/arch/mips/kernel/time.c	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/kernel/time.c	2004-07-01 21:32:32.000000000 +0100
@@ -789,3 +789,8 @@
 EXPORT_SYMBOL(to_tm);
 EXPORT_SYMBOL(rtc_set_time);
 EXPORT_SYMBOL(rtc_get_time);
+
+unsigned long long sched_clock(void)
+{
+	return (unsigned long long)jiffies*(1000000000/HZ);
+}
--- diff/arch/mips/kernel/traps.c	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/kernel/traps.c	2004-07-01 21:32:32.000000000 +0100
@@ -118,7 +118,7 @@
 #endif
 	while (!kstack_end(stack)) {
 		addr = *stack++;
-		if (kernel_text_address(addr)) {
+		if (__kernel_text_address(addr)) {
 			printk(" [<%0*lx>] ", field, addr);
 			print_symbol("%s\n", addr);
 		}
@@ -234,6 +234,7 @@
 void show_registers(struct pt_regs *regs)
 {
 	show_regs(regs);
+	print_modules();
 	printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n",
 	        current->comm, current->pid, current_thread_info(), current);
 	show_stack(current, (long *) regs->regs[29]);
@@ -278,47 +279,8 @@
 	);
 }
 
-#ifdef CONFIG_MDULES
-
-/* Given an address, look for it in the module exception tables. */
-const struct exception_table_entry *search_module_dbetables(unsigned long addr)
-{
-	unsigned long flags;
-	const struct exception_table_entry *e = NULL;
-	struct module *mod;
-
-	spin_lock_irqsave(&modlist_lock, flags);
-	list_for_each_entry(mod, &modules, list) {
-		if (mod->arch.num_dbeentries == 0)
-			continue;
-				
-		e = search_extable(mod->arch.dbe_table_start,
-				   mod->arch.dbe_table_end +
-		                   mod->arch.num_dbeentries - 1,
-				   addr);
-		if (e)
-			break;
-	}
-	spin_unlock_irqrestore(&modlist_lock, flags);
-
-	/* Now, if we found one, we are running inside it now, hence
-           we cannot unload the module, hence no refcnt needed. */
-	return e;
-}
-
-#else
-
 /* Given an address, look for it in the exception tables. */
-static inline const struct exception_table_entry *
-search_module_dbetables(unsigned long addr)
-{
-	return NULL;
-}
-
-#endif
-
-/* Given an address, look for it in the exception tables. */
-const struct exception_table_entry *search_dbe_tables(unsigned long addr)
+static const struct exception_table_entry *search_dbe_tables(unsigned long addr)
 {
 	const struct exception_table_entry *e;
 
@@ -745,12 +707,25 @@
 static inline void parity_protection_init(void)
 {
 	switch (current_cpu_data.cputype) {
+	case CPU_24K:
+		/* 24K cache parity not currently implemented in FPGA */
+		printk(KERN_INFO "Disable cache parity protection for "
+		       "MIPS 24K CPU.\n");
+		write_c0_ecc(read_c0_ecc() & ~0x80000000);
+		break;
 	case CPU_5KC:
 		/* Set the PE bit (bit 31) in the c0_ecc register. */
-		printk(KERN_INFO "Enable the cache parity protection for "
-		       "MIPS 5KC CPUs.\n");
+		printk(KERN_INFO "Enable cache parity protection for "
+		       "MIPS 5KC/24K CPUs.\n");
 		write_c0_ecc(read_c0_ecc() | 0x80000000);
 		break;
+	case CPU_20KC:
+	case CPU_25KF:
+		/* Clear the DE bit (bit 16) in the c0_status register. */
+		printk(KERN_INFO "Enable cache parity protection for "
+		       "MIPS 20KC/25KF CPUs.\n");
+		clear_c0_status(ST0_DE);
+		break;
 	default:
 		break;
 	}
--- diff/arch/mips/lib-32/Makefile	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/lib-32/Makefile	2004-07-01 21:32:32.000000000 +0100
@@ -4,10 +4,22 @@
 
 lib-y	+= csum_partial.o memset.o watch.o 
 
-ifeq ($(CONFIG_CPU_R3000)$(CONFIG_CPU_TX39XX),y)
-  lib-y	+= r3k_dump_tlb.o
-else
-  lib-y	+= dump_tlb.o
-endif
+obj-$(CONFIG_CPU_MIPS32)	+= dump_tlb.o
+obj-$(CONFIG_CPU_MIPS64)	+= dump_tlb.o
+obj-$(CONFIG_CPU_NEVADA)	+= dump_tlb.o
+obj-$(CONFIG_CPU_R10000)	+= dump_tlb.o
+obj-$(CONFIG_CPU_R3000)		+= r3k_dump_tlb.o
+obj-$(CONFIG_CPU_R4300)		+= dump_tlb.o
+obj-$(CONFIG_CPU_R4X00)		+= dump_tlb.o
+obj-$(CONFIG_CPU_R5000)		+= dump_tlb.o
+obj-$(CONFIG_CPU_R5432)		+= dump_tlb.o
+obj-$(CONFIG_CPU_R6000)		+=
+obj-$(CONFIG_CPU_R8000)		+=
+obj-$(CONFIG_CPU_RM7000)	+= dump_tlb.o
+obj-$(CONFIG_CPU_RM9000)	+= dump_tlb.o
+obj-$(CONFIG_CPU_SB1)		+= dump_tlb.o
+obj-$(CONFIG_CPU_TX39XX)	+= r3k_dump_tlb.o
+obj-$(CONFIG_CPU_TX49XX)	+= dump_tlb.o
+obj-$(CONFIG_CPU_VR41XX)	+= dump_tlb.o
 
 EXTRA_AFLAGS := $(CFLAGS)
--- diff/arch/mips/lib-64/Makefile	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/lib-64/Makefile	2004-07-01 21:32:32.000000000 +0100
@@ -4,10 +4,22 @@
 
 lib-y	+= csum_partial.o memset.o watch.o 
 
-ifeq ($(CONFIG_CPU_R3000)$(CONFIG_CPU_TX39XX),y)
-  lib-y	+= r3k_dump_tlb.o
-else
-  lib-y	+= dump_tlb.o
-endif
+obj-$(CONFIG_CPU_MIPS32)	+= dump_tlb.o
+obj-$(CONFIG_CPU_MIPS64)	+= dump_tlb.o
+obj-$(CONFIG_CPU_NEVADA)	+= dump_tlb.o
+obj-$(CONFIG_CPU_R10000)	+= dump_tlb.o
+obj-$(CONFIG_CPU_R3000)		+= r3k_dump_tlb.o
+obj-$(CONFIG_CPU_R4300)		+= dump_tlb.o
+obj-$(CONFIG_CPU_R4X00)		+= dump_tlb.o
+obj-$(CONFIG_CPU_R5000)		+= dump_tlb.o
+obj-$(CONFIG_CPU_R5432)		+= dump_tlb.o
+obj-$(CONFIG_CPU_R6000)		+=
+obj-$(CONFIG_CPU_R8000)		+=
+obj-$(CONFIG_CPU_RM7000)	+= dump_tlb.o
+obj-$(CONFIG_CPU_RM9000)	+= dump_tlb.o
+obj-$(CONFIG_CPU_SB1)		+= dump_tlb.o
+obj-$(CONFIG_CPU_TX39XX)	+= r3k_dump_tlb.o
+obj-$(CONFIG_CPU_TX49XX)	+= dump_tlb.o
+obj-$(CONFIG_CPU_VR41XX)	+= dump_tlb.o
 
 EXTRA_AFLAGS := $(CFLAGS)
--- diff/arch/mips/mips-boards/generic/cmdline.c	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/mips-boards/generic/cmdline.c	2004-07-01 21:32:33.000000000 +0100
@@ -51,7 +51,9 @@
 		*cp++ = ' ';
 		actr++;
 	}
-	if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
+	if (cp != &(arcs_cmdline[0])) {
+		/* get rid of trailing space */
 		--cp;
-	*cp = '\0';
+		*cp = '\0';
+	}
 }
--- diff/arch/mips/mips-boards/generic/printf.c	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/mips-boards/generic/printf.c	2004-07-01 21:32:33.000000000 +0100
@@ -59,7 +59,7 @@
 	outb(value, PORT(offset));
 }
 
-int putPromChar(char c)
+int prom_putchar(char c)
 {
 	while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0)
 		;
@@ -69,7 +69,7 @@
 	return 1;
 }
 
-char getPromChar(void)
+char prom_getchar(void)
 {
 	while (!(serial_in(UART_LSR) & UART_LSR_DR))
 		;
@@ -77,33 +77,3 @@
 	return serial_in(UART_RX);
 }
 
-static spinlock_t con_lock = SPIN_LOCK_UNLOCKED;
-
-static char buf[1024];
-
-void __init prom_printf(char *fmt, ...)
-{
-	va_list args;
-	int l;
-	char *p, *buf_end;
-	long flags;
-
-	spin_lock_irqsave(con_lock, flags);
-
-	va_start(args, fmt);
-	l = vsprintf(buf, fmt, args); /* hopefully i < sizeof(buf) */
-	va_end(args);
-
-	buf_end = buf + l;
-
-	for (p = buf; p < buf_end; p++) {
-		/* Crude cr/nl handling is better than none */
-		if (*p == '\n')
-			putPromChar('\r');
-		putPromChar(*p);
-	}
-	/* wait for output to drain */
-	while ((serial_in(UART_LSR) & UART_LSR_TEMT) == 0)
-		;
-	spin_unlock_irqrestore(con_lock, flags);
-}
--- diff/arch/mips/mm/Makefile	2004-05-19 22:11:10.000000000 +0100
+++ source/arch/mips/mm/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -12,19 +12,54 @@
 obj-$(CONFIG_CPU_MIPS64)	+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 obj-$(CONFIG_CPU_NEVADA)	+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 obj-$(CONFIG_CPU_R10000)	+= c-r4k.o cex-gen.o pg-r4k.o tlb-andes.o
-obj-$(CONFIG_CPU_R3000)		+= c-r3k.o tlb-r3k.o pg-r4k.o tlbex-r3k.o
+obj-$(CONFIG_CPU_R3000)		+= c-r3k.o tlb-r3k.o pg-r4k.o
 obj-$(CONFIG_CPU_R4300)		+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 obj-$(CONFIG_CPU_R4X00)		+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 obj-$(CONFIG_CPU_R5000)		+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 obj-$(CONFIG_CPU_R5432)		+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
+obj-$(CONFIG_CPU_R8000)		+= c-r4k.o cex-gen.o pg-r4k.o tlb-r8k.o
 obj-$(CONFIG_CPU_RM7000)	+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 obj-$(CONFIG_CPU_RM9000)	+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 obj-$(CONFIG_CPU_SB1)		+= c-sb1.o cerr-sb1.o cex-sb1.o pg-sb1.o \
 				   tlb-sb1.o
-obj-$(CONFIG_CPU_TX39XX)	+= c-tx39.o pg-r4k.o tlb-r3k.o tlbex-r3k.o
+obj-$(CONFIG_CPU_TX39XX)	+= c-tx39.o pg-r4k.o tlb-r3k.o
 obj-$(CONFIG_CPU_TX49XX)	+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 obj-$(CONFIG_CPU_VR41XX)	+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 
+#
+# TLB exception handling code differs between 32-bit and 64-bit kernels.
+#
+ifdef CONFIG_MIPS32
+obj-$(CONFIG_CPU_R3000)		+= tlbex32-r3k.o
+obj-$(CONFIG_CPU_TX49XX)	+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_R4300)		+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_R4X00)		+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_VR41XX)	+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_R5000)		+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_NEVADA)	+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_R5432)		+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_RM7000)	+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_RM9000)	+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_R10000)	+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_MIPS32)	+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_MIPS64)	+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_SB1)		+= tlbex32-r4k.o
+obj-$(CONFIG_CPU_TX39XX)	+= tlbex32-r3k.o
+endif
+ifdef CONFIG_MIPS64
+obj-$(CONFIG_CPU_R4300)		+= tlb64-glue-r4k.o tlbex64-r4k.o
+obj-$(CONFIG_CPU_R4X00)		+= tlb64-glue-r4k.o tlbex64-r4k.o
+obj-$(CONFIG_CPU_R5000)		+= tlb64-glue-r4k.o tlbex64-r4k.o
+obj-$(CONFIG_CPU_NEVADA)	+= tlb64-glue-r4k.o tlbex64-r4k.o
+obj-$(CONFIG_CPU_R5432)		+= tlb64-glue-r4k.o tlbex64-r4k.o
+obj-$(CONFIG_CPU_RM7000)	+= tlb64-glue-r4k.o tlbex64-r4k.o
+obj-$(CONFIG_CPU_RM9000)	+= tlb64-glue-r4k.o tlbex64-r4k.o
+obj-$(CONFIG_CPU_R10000)	+= tlb64-glue-r4k.o tlbex64-r4k.o
+obj-$(CONFIG_CPU_SB1)		+= tlb64-glue-sb1.o tlbex64-r4k.o
+obj-$(CONFIG_CPU_MIPS64)	+= tlb64-glue-r4k.o tlbex64-r4k.o
+endif
+
+
 obj-$(CONFIG_IP22_CPU_SCACHE)	+= sc-ip22.o
 obj-$(CONFIG_R5000_CPU_SCACHE)  += sc-r5k.o
 obj-$(CONFIG_RM7000_CPU_SCACHE)	+= sc-rm7k.o
--- diff/arch/mips/mm/pgtable.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm/pgtable.c	2004-07-01 21:32:33.000000000 +0100
@@ -12,7 +12,7 @@
 
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	pfn = max_mapnr;
 	while (pfn-- > 0) {
 		page = pfn_to_page(pfn);
--- diff/arch/mips/mm/tlb-sb1.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm/tlb-sb1.c	2004-07-01 21:32:33.000000000 +0100
@@ -125,7 +125,7 @@
  * with the firmware, go back and give all the entries invalid addresses with
  * the normal flush routine.  Wired entries will be killed as well!
  */
-void sb1_sanitize_tlb(void)
+static void __init sb1_sanitize_tlb(void)
 {
 	int entry;
 	long addr = 0;
--- diff/arch/mips/momentum/jaguar_atx/irq.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/jaguar_atx/irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -42,7 +42,7 @@
 extern asmlinkage void jaguar_handle_int(void);
 
 static struct irqaction cascade_mv64340 = {
-	no_action, SA_INTERRUPT, 0, "MV64340-Cascade", NULL, NULL
+	no_action, SA_INTERRUPT, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL
 };
 
 void __init init_IRQ(void)
--- diff/arch/mips/momentum/jaguar_atx/prom.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/momentum/jaguar_atx/prom.c	2004-07-01 21:32:33.000000000 +0100
@@ -245,20 +245,6 @@
 {
 }
 
-/*
- * SMP support
- */
-int prom_setup_smp(void)
-{
-	int	num_cpus = 2;
-
-	/*
-	 * We know that the RM9000 on the Jaguar ATX board has 2 cores.
-	 * Hence, this can be hardcoded for now.
-	 */
-	return num_cpus;
-}
-
 int prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp)
 {
 	/* Clear the semaphore */
--- diff/arch/mips/momentum/jaguar_atx/setup.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/jaguar_atx/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -46,6 +46,7 @@
 #include <linux/types.h>
 #include <linux/mm.h>
 #include <linux/bootmem.h>
+#include <linux/pci.h>
 #include <linux/swap.h>
 #include <linux/ioport.h>
 #include <linux/sched.h>
@@ -57,7 +58,6 @@
 #include <asm/page.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/pci.h>
 #include <asm/pci_channel.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
--- diff/arch/mips/momentum/ocelot_c/Makefile	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_c/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -2,7 +2,7 @@
 # Makefile for Momentum Computer's Ocelot-C and -CS boards.
 #
 
-obj-y	 		+= cpci-irq.o uart-irq.o int-handler.o irq.o pci-irq.o \
-			   prom.o reset.o setup.o
+obj-y	 		+= cpci-irq.o int-handler.o irq.o prom.o reset.o \
+			   setup.o uart-irq.o
 
 obj-$(CONFIG_KGDB)	+= dbg_io.o
--- diff/arch/mips/momentum/ocelot_c/irq.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_c/irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -44,8 +44,9 @@
 #include <asm/bitops.h>
 #include <asm/bootinfo.h>
 #include <asm/io.h>
-#include <asm/irq.h>
+#include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
+#include <asm/mv64340.h>
 #include <asm/system.h>
 
 extern asmlinkage void ocelot_handle_int(void);
@@ -53,11 +54,11 @@
 extern void cpci_irq_init(void);
 
 static struct irqaction cascade_fpga = {
-	no_action, SA_INTERRUPT, 0, "cascade via FPGA", NULL, NULL
+	no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade via FPGA", NULL, NULL
 };
 
 static struct irqaction cascade_mv64340 = {
-	no_action, SA_INTERRUPT, 0, "cascade via MV64340", NULL, NULL
+	no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade via MV64340", NULL, NULL
 };
 
 void __init init_IRQ(void)
--- diff/arch/mips/momentum/ocelot_c/prom.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/momentum/ocelot_c/prom.c	2004-07-01 21:32:33.000000000 +0100
@@ -147,13 +147,14 @@
 #endif  /* CONFIG_MIPS64 */
 
 
-/* [jsun@junsun.net] PMON passes arguments in C main() style */
 void __init prom_init(void)
 {
 	int argc = fw_arg0;
 	char **arg = (char **) fw_arg1;
 	char **env = (char **) fw_arg2;
+	struct callvectors *cv = (struct callvectors *) fw_arg3;
 	int i;
+
 #ifdef CONFIG_MIPS64
 	char *ptr;
 
--- diff/arch/mips/momentum/ocelot_c/setup.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_c/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -193,7 +193,7 @@
 	rtc_base[0x7ff9] = BIN2BCD(tm.tm_sec);
 
 	/* day of week -- not really used, but let's keep it up-to-date */
-	rtc_base[0x7ffc] = CONV_BIN2BCD(tm.tm_wday + 1);
+	rtc_base[0x7ffc] = BIN2BCD(tm.tm_wday + 1);
 
 	/* disable writing */
 	rtc_base[0x7ff8] = 0x00;
--- diff/arch/mips/momentum/ocelot_g/Makefile	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_g/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -2,8 +2,7 @@
 # Makefile for Momentum Computer's Ocelot-G board.
 #
 
-obj-y	 		+= gt-irq.o pci-irq.o int-handler.o irq.o prom.o \
-			   reset.o setup.o
+obj-y	 		+= int-handler.o irq.o gt-irq.o prom.o reset.o setup.o
 obj-$(CONFIG_KGDB)	+= dbg_io.o
 
 EXTRA_AFLAGS := $(CFLAGS)
--- diff/arch/mips/momentum/ocelot_g/gt-irq.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_g/gt-irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -17,8 +17,8 @@
 #include <asm/ptrace.h>
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
+#include <asm/gt64240.h>
 #include <asm/io.h>
-#include "gt64240.h"
 
 unsigned long bus_clock;
 
@@ -108,25 +108,25 @@
  * we keep this particular structure in the function.
  */
 
-static void gt64240_p0int_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t gt64240_p0int_irq(int irq, void *dev, struct pt_regs *regs)
 {
 	uint32_t irq_src, irq_src_mask;
 	int handled;
 
 	/* get the low interrupt cause register */
-	GT_READ(LOW_INTERRUPT_CAUSE_REGISTER, &irq_src);
+	irq_src = GT_READ(LOW_INTERRUPT_CAUSE_REGISTER);
 
 	/* get the mask register for this pin */
-	GT_READ(PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW, &irq_src_mask);
+	irq_src_mask = GT_READ(PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW);
 
 	/* mask off only the interrupts we're interested in */
 	irq_src = irq_src & irq_src_mask;
 
-	handled = 0;
+	handled = IRQ_NONE;
 
 	/* Check for timer interrupt */
 	if (irq_src & 0x00000100) {
-		handled = 1;
+		handled = IRQ_HANDLED;
 		irq_src &= ~0x00000100;
 
 		/* Clear any pending cause bits */
@@ -141,90 +141,8 @@
 		       "UNKNOWN P0_INT# interrupt received, irq_src=0x%x\n",
 		       irq_src);
 	}
-}
-
-/*
- * Interrupt handler for interrupts coming from the Galileo chip.
- * It could be built in ethernet ports etc...
- */
-static void gt64240_irq(int irq, void *dev_id, struct pt_regs *regs)
-{
-	unsigned int irq_src, int_high_src, irq_src_mask,
-	    int_high_src_mask;
-	int handled;
-
-#if 0
-	GT_READ(GT_INTRCAUSE_OFS, &irq_src);
-	GT_READ(GT_INTRMASK_OFS, &irq_src_mask);
-	GT_READ(GT_HINTRCAUSE_OFS, &int_high_src);
-	GT_READ(GT_HINTRMASK_OFS, &int_high_src_mask);
-#endif
-	irq_src = irq_src & irq_src_mask;
-	int_high_src = int_high_src & int_high_src_mask;
-
-	handled = 0;
-
-	/* Execute all interrupt handlers */
-	/* Check for timer interrupt */
-	if (irq_src & 0x00000800) {
-		handled = 1;
-		irq_src &= ~0x00000800;
-		//    RESET_REG_BITS (INTERRUPT_CAUSE_REGISTER,BIT8);
-		do_timer(regs);
-	}
-
-	if (irq_src) {
-		printk(KERN_INFO
-		       "Other Galileo interrupt received irq_src %x\n",
-		       irq_src);
-#if CURRENTLY_UNUSED
-		for (count = 0; count < MAX_CAUSE_REG_WIDTH; count++) {
-			if (irq_src & (1 << count)) {
-				if (irq_handlers[INT_CAUSE_MAIN][count].
-				    routine) {
-					queue_task(&irq_handlers
-						   [INT_CAUSE_MAIN][count],
-						   &tq_immediate);
-					mark_bh(IMMEDIATE_BH);
-					handled = 1;
-				}
-			}
-		}
-#endif				/*  UNUSED  */
-	}
-#if 0
-	GT_WRITE(GT_INTRCAUSE_OFS, 0);
-	GT_WRITE(GT_HINTRCAUSE_OFS, 0);
-#endif
 
-#undef GALILEO_I2O
-#ifdef GALILEO_I2O
-	/*
-	 * Future I2O support.  We currently attach I2O interrupt handlers to
-	 * the Galileo interrupt (int 4) and handle them in do_IRQ.
-	 */
-	if (isInBoundDoorBellInterruptSet()) {
-		printk(KERN_INFO "I2O doorbell interrupt received.\n");
-		handled = 1;
-	}
-
-	if (isInBoundPostQueueInterruptSet()) {
-		printk(KERN_INFO "I2O Queue interrupt received.\n");
-		handled = 1;
-	}
-
-	/*
-	 * This normally would be outside of the ifdef, but since we're
-	 * handling I2O outside of this handler, this printk shows up every
-	 * time we get a valid I2O interrupt.  So turn this off for now.
-	 */
-	if (handled == 0) {
-		if (counter < 50) {
-			printk("Spurious Galileo interrupt...\n");
-			counter++;
-		}
-	}
-#endif
+	return handled;
 }
 
 /*
--- diff/arch/mips/momentum/ocelot_g/prom.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/momentum/ocelot_g/prom.c	2004-07-01 21:32:33.000000000 +0100
@@ -20,8 +20,8 @@
 #include <asm/addrspace.h>
 #include <asm/bootinfo.h>
 #include <asm/pmon.h>
+#include <asm/gt64240.h>
 
-#include "gt64240.h"
 #include "ocelot_pld.h"
 
 struct callvectors* debug_vectors;
@@ -38,10 +38,8 @@
 	return "Momentum Ocelot";
 }
 
-/* [jsun@junsun.net] PMON passes arguments in C main() style */
 void __init prom_init(void)
 {
-	uint32_t tmp;
 	int argc = fw_arg0;
 	char **arg = (char **) fw_arg1;
 	char **env = (char **) fw_arg2;
@@ -78,10 +76,8 @@
 			bus_clock = simple_strtol(*env + strlen("busclock="),
 							NULL, 10);
 		}
-		*env++;
+		env++;
 	}
-
-	debug_vectors->printf("Booting Linux kernel...\n");
 }
 
 unsigned long __init prom_free_prom_memory(void)
--- diff/arch/mips/momentum/ocelot_g/setup.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_g/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,6 +1,4 @@
 /*
- * setup.c
- *
  * BRIEF MODULE DESCRIPTION
  * Momentum Computer Ocelot-G (CP7000G) - board dependent boot routines
  *
@@ -55,14 +53,14 @@
 #include <asm/bootinfo.h>
 #include <asm/page.h>
 #include <asm/io.h>
+#include <asm/gt64240.h>
 #include <asm/irq.h>
 #include <asm/pci.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 #include <asm/reboot.h>
 #include <linux/bootmem.h>
-#include <linux/blkdev.h>
-#include "gt64240.h"
+
 #include "ocelot_pld.h"
 
 #ifdef CONFIG_GALILLEO_GT64240_ETH
@@ -88,8 +86,6 @@
 		_CACHE_UNCACHED)) >> 6;
 }
 
-static void __init setup_l3cache(unsigned long size);
-
 /* setup code for a handoff from a version 2 PMON 2000 PROM */
 void PMON_v2_setup(void)
 {
@@ -104,8 +100,10 @@
 		GT64240 Internal Regs	0xf4000000	0xe0000000
 		UARTs (CS2)		0xfd000000	0xe0001000
 	*/
-	add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xf4000000, PM_64K);
-	add_wired_entry(ENTRYLO(0xfd000000), ENTRYLO(0xfd001000), 0xfd000000, PM_4K);
+	add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000),
+	                0xf4000000, PM_64K);
+	add_wired_entry(ENTRYLO(0xfd000000), ENTRYLO(0xfd001000),
+	                0xfd000000, PM_4K);
 
 	/* Also a temporary entry to let us talk to the Ocelot PLD and NVRAM
 	   in the CS[012] region. We can't use ioremap() yet. The NVRAM
@@ -114,15 +112,57 @@
 		Ocelot PLD (CS0)	0xfc000000	0xe0020000
 		NVRAM (CS1)		0xfc800000	0xe0030000
 	*/
-	add_temporary_entry(ENTRYLO(0xfc000000), ENTRYLO(0xfc010000), 0xfc000000, PM_64K);
-	add_temporary_entry(ENTRYLO(0xfc800000), ENTRYLO(0xfc810000), 0xfc800000, PM_64K);
+	add_temporary_entry(ENTRYLO(0xfc000000), ENTRYLO(0xfc010000),
+	                    0xfc000000, PM_64K);
+	add_temporary_entry(ENTRYLO(0xfc800000), ENTRYLO(0xfc810000),
+	                    0xfc800000, PM_64K);
 
 	gt64240_base = 0xf4000000;
 }
 
-static void __init momenco_ocelot_g_setup(void)
+extern int rm7k_tcache_enabled;
+
+/*
+ * This runs in KSEG1. See the verbiage in rm7k.c::probe_scache()
+ */
+#define Page_Invalidate_T 0x16
+static void __init setup_l3cache(unsigned long size)
 {
-	void (*l3func)(unsigned long)=KSEG1ADDR(&setup_l3cache);
+	int register i;
+
+	printk("Enabling L3 cache...");
+
+	/* Enable the L3 cache in the GT64120A's CPU Configuration register */
+	GT_WRITE(0, GT_READ(0) | (1<<14));
+
+	/* Enable the L3 cache in the CPU */
+	set_c0_config(1<<12 /* CONF_TE */);
+
+	/* Clear the cache */
+	write_c0_taglo(0);
+	write_c0_taghi(0);
+
+	for (i=0; i < size; i+= 4096) {
+		__asm__ __volatile__ (
+			".set noreorder\n\t"
+			".set mips3\n\t"
+			"cache %1, (%0)\n\t"
+			".set mips0\n\t"
+			".set reorder"
+			:
+			: "r" (KSEG0ADDR(i)),
+			  "i" (Page_Invalidate_T));
+	}
+
+	/* Let the RM7000 MM code know that the tertiary cache is enabled */
+	rm7k_tcache_enabled = 1;
+
+	printk("Done\n");
+}
+
+static int  __init momenco_ocelot_g_setup(void)
+{
+	void (*l3func)(unsigned long) = (void *) KSEG1ADDR(setup_l3cache);
 	unsigned int tmpword;
 
 	board_time_init = gt64240_time_init;
@@ -200,51 +240,11 @@
 
 	/* FIXME: Fix up the DiskOnChip mapping */
 	GT_WRITE(0x468, 0xfef73);
-}
 
-early_initcall(momenco_ocelot_g_setup);
-
-extern int rm7k_tcache_enabled;
-/*
- * This runs in KSEG1. See the verbiage in rm7k.c::probe_scache()
- */
-#define Page_Invalidate_T 0x16
-static void __init setup_l3cache(unsigned long size)
-{
-	int register i;
-	unsigned long tmp;
-
-	printk("Enabling L3 cache...");
-
-	/* Enable the L3 cache in the GT64120A's CPU Configuration register */
-	GT_READ(0, &tmp);
-	GT_WRITE(0, tmp | (1<<14));
-
-	/* Enable the L3 cache in the CPU */
-	set_c0_config(1<<12 /* CONF_TE */);
-
-	/* Clear the cache */
-	write_c0_taglo(0);
-	write_c0_taghi(0);
-
-	for (i=0; i < size; i+= 4096) {
-		__asm__ __volatile__ (
-			".set noreorder\n\t"
-			".set mips3\n\t"
-			"cache %1, (%0)\n\t"
-			".set mips0\n\t"
-			".set reorder"
-			:
-			: "r" (KSEG0ADDR(i)),
-			  "i" (Page_Invalidate_T));
-	}
-
-	/* Let the RM7000 MM code know that the tertiary cache is enabled */
-	rm7k_tcache_enabled = 1;
-
-	printk("Done\n");
+	return 0;
 }
 
+early_initcall(momenco_ocelot_g_setup);
 
 /* This needs to be one of the first initcalls, because no I/O port access
    can work before this */
@@ -252,12 +252,12 @@
 static int io_base_ioremap(void)
 {
 	/* we're mapping PCI accesses from 0xc0000000 to 0xf0000000 */
-	void *io_remap_range = ioremap(0xc0000000, 0x30000000);
+	unsigned long io_remap_range;
 
-	if (!io_remap_range) {
+	io_remap_range = (unsigned long) ioremap(0xc0000000, 0x30000000);
+	if (!io_remap_range)
 		panic("Could not ioremap I/O port range");
-	}
-	printk("io_remap_range set at 0x%08x\n", (uint32_t)io_remap_range);
+
 	set_io_port_base(io_remap_range - 0xc0000000);
 
 	return 0;
--- diff/arch/mips/pci/Makefile	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -16,6 +16,7 @@
 obj-$(CONFIG_MIPS_MSC)		+= ops-msc.o
 obj-$(CONFIG_MIPS_NILE4)	+= ops-nile4.o
 obj-$(CONFIG_MIPS_TX3927)	+= ops-jmr3927.o
+obj-$(CONFIG_PCI_VR41XX)	+= ops-vr41xx.o pci-vr41xx.o
 
 #
 # These are still pretty much in the old state, watch, go blind.
@@ -34,20 +35,20 @@
 obj-$(CONFIG_SOC_AU1500)	+= fixup-au1000.o ops-au1000.o
 obj-$(CONFIG_SOC_AU1550)	+= fixup-au1000.o ops-au1000.o
 obj-$(CONFIG_MIPS_MALTA)	+= fixup-malta.o
-obj-$(CONFIG_MIPS_MV64340)	+= fixup-mv64340.o
+obj-$(CONFIG_MOMENCO_JAGUAR_ATX)+= fixup-jaguar.o
 obj-$(CONFIG_MOMENCO_OCELOT)	+= fixup-ocelot.o pci-ocelot.o
-obj-$(CONFIG_MOMENCO_OCELOT_C)	+= pci-ocelot-c.o
-obj-$(CONFIG_MOMENCO_OCELOT_G)	+= pci-ocelot-g.o
+obj-$(CONFIG_MOMENCO_OCELOT_C)	+= fixup-ocelot-c.o pci-ocelot-c.o
+obj-$(CONFIG_MOMENCO_OCELOT_G)	+= fixup-ocelot-g.o ops-gt64240.o pci-ocelot-g.o
 obj-$(CONFIG_NEC_EAGLE)		+= fixup-eagle.o ops-vrc4173.o
-obj-$(CONFIG_PMC_YOSEMITE)	+= fixup-yosemite.o ops-titan.o
+obj-$(CONFIG_PMC_YOSEMITE)	+= fixup-yosemite.o ops-titan.o ops-titan-ht.o \
+				   pci-yosemite.o
 obj-$(CONFIG_SGI_IP27)		+= pci-ip27.o
 obj-$(CONFIG_SGI_IP32)		+= fixup-ip32.o ops-mace.o pci-ip32.o
 obj-$(CONFIG_SIBYTE_SB1250)	+= pci-sb1250.o
 obj-$(CONFIG_SNI_RM200_PCI)	+= fixup-sni.o ops-sni.o
+obj-$(CONFIG_TANBAC_TB0219)	+= fixup-tb0219.o
 obj-$(CONFIG_TANBAC_TB0226)	+= fixup-tb0226.o
-obj-$(CONFIG_TANBAC_TB0229)	+= fixup-tb0229.o
 obj-$(CONFIG_TOSHIBA_JMR3927)	+= fixup-jmr3927.o pci-jmr3927.o
 obj-$(CONFIG_TOSHIBA_RBTX4927)	+= fixup-rbtx4927.o ops-tx4927.o
-obj-$(CONFIG_VICTOR_MPC30X)	+= fixup-capcella.o
-obj-$(CONFIG_MACH_VR41XX)	+= pci-vr41xx.o
-obj-$(CONFIG_ZAO_CAPCELLA)	+= fixup-victor-mpc30x.o
+obj-$(CONFIG_VICTOR_MPC30X)	+= fixup-mpc30x.o
+obj-$(CONFIG_ZAO_CAPCELLA)	+= fixup-capcella.o
--- diff/arch/mips/pci/fixup-capcella.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/fixup-capcella.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,17 +1,21 @@
 /*
- * FILE NAME
- *	arch/mips/vr41xx/zao-capcella/pci_fixup.c
+ *  fixup-cappcela.c, The ZAO Networks Capcella specific PCI fixups.
  *
- * BRIEF MODULE DESCRIPTION
- *	The ZAO Networks Capcella specific PCI fixups.
+ *  Copyright (C) 2002,2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
- * Copyright 2002 Yoichi Yuasa
- *                yuasa@hh.iij4u.or.jp
+ *  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 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/init.h>
 #include <linux/pci.h>
@@ -38,3 +42,7 @@
 {
 	return irq_tab_capcella[slot][pin];
 }
+
+struct pci_fixup pcibios_fixups[] __initdata = {
+	{	.pass = 0,	},
+};
--- diff/arch/mips/pci/fixup-tb0226.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/fixup-tb0226.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,78 +1,83 @@
 /*
- * FILE NAME
- *	arch/mips/vr41xx/tanbac-tb0226/pci_fixup.c
+ *  fixup-tb0226.c, The TANBAC TB0226 specific PCI fixups.
  *
- * BRIEF MODULE DESCRIPTION
- *	The TANBAC TB0226 specific PCI fixups.
+ *  Copyright (C) 2002-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
- * Copyright 2002,2003 Yoichi Yuasa
- *                yuasa@hh.iij4u.or.jp
+ *  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 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/init.h>
 #include <linux/pci.h>
 
 #include <asm/vr41xx/tb0226.h>
 
-void __init pcibios_fixup_irqs(void)
+int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
-	struct pci_dev *dev = NULL;
-	u8 slot, pin;
-
-	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
-		slot = PCI_SLOT(dev->devfn);
-		dev->irq = 0;
+	int irq = -1;
 
-		switch (slot) {
-		case 12:
-			vr41xx_set_irq_trigger(GD82559_1_PIN,
+	switch (slot) {
+	case 12:
+		vr41xx_set_irq_trigger(GD82559_1_PIN,
+				       TRIGGER_LEVEL,
+				       SIGNAL_THROUGH);
+		vr41xx_set_irq_level(GD82559_1_PIN, LEVEL_LOW);
+		irq = GD82559_1_IRQ;
+		break;
+	case 13:
+		vr41xx_set_irq_trigger(GD82559_2_PIN,
+				       TRIGGER_LEVEL,
+				       SIGNAL_THROUGH);
+		vr41xx_set_irq_level(GD82559_2_PIN, LEVEL_LOW);
+		irq = GD82559_2_IRQ;
+		break;
+	case 14:
+		switch (pin) {
+		case 1:
+			vr41xx_set_irq_trigger(UPD720100_INTA_PIN,
+					       TRIGGER_LEVEL,
+					       SIGNAL_THROUGH);
+			vr41xx_set_irq_level(UPD720100_INTA_PIN,
+					     LEVEL_LOW);
+			irq = UPD720100_INTA_IRQ;
+			break;
+		case 2:
+			vr41xx_set_irq_trigger(UPD720100_INTB_PIN,
 					       TRIGGER_LEVEL,
 					       SIGNAL_THROUGH);
-			vr41xx_set_irq_level(GD82559_1_PIN, LEVEL_LOW);
-			dev->irq = GD82559_1_IRQ;
+			vr41xx_set_irq_level(UPD720100_INTB_PIN,
+					     LEVEL_LOW);
+			irq = UPD720100_INTB_IRQ;
 			break;
-		case 13:
-			vr41xx_set_irq_trigger(GD82559_2_PIN,
+		case 3:
+			vr41xx_set_irq_trigger(UPD720100_INTC_PIN,
 					       TRIGGER_LEVEL,
 					       SIGNAL_THROUGH);
-			vr41xx_set_irq_level(GD82559_2_PIN, LEVEL_LOW);
-			dev->irq = GD82559_2_IRQ;
+			vr41xx_set_irq_level(UPD720100_INTC_PIN,
+					     LEVEL_LOW);
+			irq = UPD720100_INTC_IRQ;
 			break;
-		case 14:
-			pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
-			switch (pin) {
-			case 1:
-				vr41xx_set_irq_trigger(UPD720100_INTA_PIN,
-						       TRIGGER_LEVEL,
-						       SIGNAL_THROUGH);
-				vr41xx_set_irq_level(UPD720100_INTA_PIN,
-						     LEVEL_LOW);
-				dev->irq = UPD720100_INTA_IRQ;
-				break;
-			case 2:
-				vr41xx_set_irq_trigger(UPD720100_INTB_PIN,
-						       TRIGGER_LEVEL,
-						       SIGNAL_THROUGH);
-				vr41xx_set_irq_level(UPD720100_INTB_PIN,
-						     LEVEL_LOW);
-				dev->irq = UPD720100_INTB_IRQ;
-				break;
-			case 3:
-				vr41xx_set_irq_trigger(UPD720100_INTC_PIN,
-						       TRIGGER_LEVEL,
-						       SIGNAL_THROUGH);
-				vr41xx_set_irq_level(UPD720100_INTC_PIN,
-						     LEVEL_LOW);
-				dev->irq = UPD720100_INTC_IRQ;
-				break;
-			}
+		default:
 			break;
 		}
-
-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+		break;
+	default:
+		break;
 	}
+
+	return irq;
 }
+
+struct pci_fixup pcibios_fixups[] __initdata = {
+	{	.pass = 0,	},
+};
--- diff/arch/mips/pci/fixup-yosemite.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/fixup-yosemite.c	2004-07-01 21:32:33.000000000 +0100
@@ -26,21 +26,12 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 
-static char irq_tab_yosemite[8][5] __initdata = {
-	/*       INTA  INTB  INTC  INTD */
-	{    -1,   -1,   -1,   -1,   -1 },
-	{    -1,    3,    3,    3,    3 },
-	{    -1,    4,    4,    4,    4 },
-	{    -1,   -1,   -1,   -1,   -1 },
-	{    -1,   -1,   -1,   -1,   -1 },
-	{    -1,   -1,   -1,   -1,   -1 },
-	{    -1,   -1,   -1,   -1,   -1 },
-	{    -1,   -1,   -1,   -1,   -1 },
-};
-
 int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
-	return irq_tab_yosemite[slot][pin];
+	if (pin == 0)
+		return -1;
+
+	return 3;			/* Everything goes to one irq bit */
 }
 
 struct pci_fixup pcibios_fixups[] = {
--- diff/arch/mips/pci/ops-msc.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/ops-msc.c	2004-07-01 21:32:33.000000000 +0100
@@ -48,8 +48,12 @@
 	unsigned char type;
 	u32 intr;
 
-	if ((busnum == 0) && (PCI_SLOT(devfn) == 0))
+#ifdef CONFIG_MIPS_BOARDS_GEN
+	if ((busnum == 0) && (PCI_SLOT(devfn) == 17)) {
+		/* MIPS Core boards have SOCit connected as device 17 */
 		return -1;
+	}
+#endif
 
 	/* Clear status register bits. */
 	MSC_WRITE(MSC01_PCI_INTSTAT,
--- diff/arch/mips/pci/ops-titan.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/ops-titan.c	2004-07-01 21:32:33.000000000 +0100
@@ -39,30 +39,30 @@
 static int titan_read_config(struct pci_bus *bus, unsigned int devfn, int reg,
 	int size, u32 * val)
 {
-	int dev, bus, func;
+	int dev, busno, func;
 	uint32_t address_reg, data_reg;
 	uint32_t address;
 
-	bus = device->bus->number;
-	dev = PCI_SLOT(device->devfn);
-	func = PCI_FUNC(device->devfn);
+	busno = bus->number;
+	dev = PCI_SLOT(devfn);
+	func = PCI_FUNC(devfn);
 
 	address_reg = TITAN_PCI_0_CONFIG_ADDRESS;
 	data_reg = TITAN_PCI_0_CONFIG_DATA;
 
-	address = (bus << 16) | (dev << 11) | (func << 8) |
-		(offset & 0xfc) | 0x80000000;
+	address = (busno << 16) | (dev << 11) | (func << 8) |
+	          (reg & 0xfc) | 0x80000000;
 
 	/* start the configuration cycle */
 	TITAN_WRITE(address_reg, address);
 
 	switch (size) {
 	case 1:
-		TITAN_READ_8(data_reg + (offset & 0x3), val);
+		TITAN_READ_8(data_reg + (reg & 0x3), val);
 		break;
 
 	case 2:
-		TITAN_READ_16(data_reg + (offset & 0x2), val);
+		TITAN_READ_16(data_reg + (reg & 0x2), val);
 		break;
 
 	case 4:
@@ -80,17 +80,17 @@
 	int size, u32 val)
 {
 	uint32_t address_reg, data_reg, address;
-	int dev, bus, func;
+	int dev, busno, func;
 
-	bus = device->bus->number;
-	dev = PCI_SLOT(device->devfn);
-	func = PCI_FUNC(device->devfn);
+	busno = bus->number;
+	dev = PCI_SLOT(devfn);
+	func = PCI_FUNC(devfn);
 
 	address_reg = TITAN_PCI_0_CONFIG_ADDRESS;
 	data_reg = TITAN_PCI_0_CONFIG_DATA;
 
-	address = (bus << 16) | (dev << 11) | (func << 8) |
-		(offset & 0xfc) | 0x80000000;
+	address = (busno << 16) | (dev << 11) | (func << 8) |
+		(reg & 0xfc) | 0x80000000;
 
 	/* start the configuration cycle */
 	TITAN_WRITE(address_reg, address);
@@ -98,11 +98,11 @@
 	/* write the data */
 	switch (size) {
 	case 1:
-		TITAN_WRITE_8(data_reg + (offset & 0x3), val);
+		TITAN_WRITE_8(data_reg + (reg & 0x3), val);
 		break;
 
 	case 2:
-		TITAN_WRITE_16(data_reg + (offset & 0x2), val);
+		TITAN_WRITE_16(data_reg + (reg & 0x2), val);
 		break;
 
 	case 4:
--- diff/arch/mips/pci/pci-ocelot-c.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/pci-ocelot-c.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,61 +1,140 @@
 /*
- * Copyright 2002 Momentum Computer
- * Author: Matthew Dharm <mdharm@momenco.com>
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
  *
- *  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  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the  GNU General Public License along
- *  with this program; if not, write  to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright (C) 2004 by Ralf Baechle
  */
+
 #include <linux/types.h>
 #include <linux/pci.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <asm/pci.h>
-#include <asm/io.h>
 #include <asm/mv64340.h>
+#include <asm/pci_channel.h>
 
 #include <linux/init.h>
 
 /*
- * These functions and structures provide the BIOS scan and mapping of the PCI
- * devices.
+ * We assume the address ranges have already been setup appropriately by
+ * the firmware.  PMON in case of the Ocelot C does that.
  */
+static struct resource mv_pci_io_mem0_resource = {
+	.name	= "MV64340 PCI0 IO MEM",
+	.flags	= IORESOURCE_IO
+};
 
-void mv64340_board_pcibios_fixup_bus(struct pci_bus *c);
+static struct resource mv_pci_mem0_resource = {
+	.name	= "MV64340 PCI0 MEM",
+	.flags	= IORESOURCE_MEM
+};
+
+extern struct pci_ops mv64340_bus0_pci_ops;
 
-struct pci_fixup pcibios_fixups[] = {
-	{0}
+static struct pci_controller mv_bus0_controller = {
+	.pci_ops	= &mv64340_bus0_pci_ops,
+	.mem_resource	= &mv_pci_mem0_resource,
+	.io_resource	= &mv_pci_io_mem0_resource,
 };
 
-void __init pcibios_fixup_bus(struct pci_bus *c)
+static uint32_t mv_io_base, mv_io_size;
+
+static void mv64340_pci0_init(void)
 {
-	mv64340_board_pcibios_fixup_bus(c);
+	uint32_t mem0_base, mem0_size;
+	uint32_t io_base, io_size;
+
+	io_base = MV_READ(MV64340_PCI_0_IO_BASE_ADDR) << 16;
+	io_size = (MV_READ(MV64340_PCI_0_IO_SIZE) + 1) << 16;
+	mem0_base = MV_READ(MV64340_PCI_0_MEMORY0_BASE_ADDR) << 16;
+	mem0_size = (MV_READ(MV64340_PCI_0_MEMORY0_SIZE) + 1) << 16;
+
+	mv_pci_io_mem0_resource.start	= 0;
+	mv_pci_io_mem0_resource.end	= io_size - 1;
+	mv_pci_mem0_resource.start	= mem0_base;
+	mv_pci_mem0_resource.end	= mem0_base + mem0_size - 1;
+	mv_bus0_controller.mem_offset	= mem0_base;
+	mv_bus0_controller.io_offset	= 0;
+
+	ioport_resource.end		= io_size - 1;
+
+	register_pci_controller(&mv_bus0_controller);
+
+	mv_io_base = io_base;
+	mv_io_size = io_size;
 }
 
-void __init pcibios_init(void)
+static struct resource mv_pci_io_mem1_resource = {
+	.name	= "MV64340 PCI1 IO MEM",
+	.flags	= IORESOURCE_IO
+};
+
+static struct resource mv_pci_mem1_resource = {
+	.name	= "MV64340 PCI1 MEM",
+	.flags	= IORESOURCE_MEM
+};
+
+extern struct pci_ops mv64340_bus1_pci_ops;
+
+static struct pci_controller mv_bus1_controller = {
+	.pci_ops	= &mv64340_bus1_pci_ops,
+	.mem_resource	= &mv_pci_mem1_resource,
+	.io_resource	= &mv_pci_io_mem1_resource,
+};
+
+static __init void mv64340_pci1_init(void)
+{
+	uint32_t mem0_base, mem0_size;
+	uint32_t io_base, io_size;
+
+	io_base = MV_READ(MV64340_PCI_1_IO_BASE_ADDR) << 16;
+	io_size = (MV_READ(MV64340_PCI_1_IO_SIZE) + 1) << 16;
+	mem0_base = MV_READ(MV64340_PCI_1_MEMORY0_BASE_ADDR) << 16;
+	mem0_size = (MV_READ(MV64340_PCI_1_MEMORY0_SIZE) + 1) << 16;
+
+	/*
+	 * Here we assume the I/O window of second bus to be contiguous with
+	 * the first.  A gap is no problem but would waste address space for
+	 * remapping the port space.
+	 */
+	mv_pci_io_mem1_resource.start	= mv_io_size;
+	mv_pci_io_mem1_resource.end	= mv_io_size + io_size - 1;
+	mv_pci_mem1_resource.start	= mem0_base;
+	mv_pci_mem1_resource.end	= mem0_base + mem0_size - 1;
+	mv_bus1_controller.mem_offset	= mem0_base;
+	mv_bus1_controller.io_offset	= 0;
+
+	ioport_resource.end		= io_base + io_size -mv_io_base - 1;
+
+	register_pci_controller(&mv_bus1_controller);
+
+	mv_io_size = io_base + io_size - mv_io_base;
+}
+
+static __init int __init ocelot_c_pci_init(void)
 {
-	/* Reset PCI I/O and PCI MEM values */
-	ioport_resource.start = 0xe0000000;
-	ioport_resource.end = 0xe0000000 + 0x20000000 - 1;
-	iomem_resource.start = 0xc0000000;
-	iomem_resource.end = 0xc0000000 + 0x20000000 - 1;
+	unsigned long io_v_base;
+	uint32_t enable;
+
+	enable = ~MV_READ(MV64340_BASE_ADDR_ENABLE);
 
-	pci_scan_bus(0, &mv64340_bus0_pci_ops, NULL);
-	pci_scan_bus(1, &mv64340_bus1_pci_ops, NULL);
+	/*
+	 * We require at least one enabled I/O or PCI memory window or we
+	 * will ignore this PCI bus.  We ignore PCI windows 1, 2 and 3.
+	 */
+	if (enable & (0x01 <<  9) || enable & (0x01 << 10))
+		mv64340_pci0_init();
+
+	if (enable & (0x01 << 14) || enable & (0x01 << 15))
+		mv64340_pci1_init();
+
+	if (mv_io_size) {
+		io_v_base = (unsigned long) ioremap(mv_io_base, mv_io_size);
+		if (!io_v_base)
+			panic("Could not ioremap I/O port range");
+
+		set_io_port_base(io_v_base);
+	}
+
+	return 0;
 }
+
+arch_initcall(ocelot_c_pci_init);
--- diff/arch/mips/pci/pci-ocelot-g.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/pci-ocelot-g.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,460 +1,90 @@
 /*
- * Copyright 2002 Momentum Computer
- * Author: Matthew Dharm <mdharm@momenco.com>
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
  *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
+ * Copyright (C) 2004 by Ralf Baechle
  *
- *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the  GNU General Public License along
- *  with this program; if not, write  to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
+ * This doesn't really fly - but I don't have a GT64240 system for testing.
  */
+#include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/pci.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <asm/pci.h>
-#include <asm/io.h>
-#include "gt64240.h"
-
-#include <linux/init.h>
-
-#define SELF 0
-#define MASTER_ABORT_BIT 0x100
+#include <asm/gt64240.h>
+#include <asm/pci_channel.h>
 
 /*
- * These functions and structures provide the BIOS scan and mapping of the PCI
- * devices.
+ * We assume these address ranges have been programmed into the GT-64240 by
+ * the firmware.  PMON in case of the Ocelot G does that.  Note the size of
+ * the I/O range is completly stupid; I/O mappings are limited to at most
+ * 256 bytes by the PCI spec and deprecated; and just to make things worse
+ * apparently many devices don't decode more than 64k of I/O space.
  */
 
-void gt64240_board_pcibios_fixup_bus(struct pci_bus *c);
-
-/*  Functions to implement "pci ops"  */
-static int galileo_pcibios_read_config_word(int bus, int devfn,
-					    int offset, u16 * val);
-static int galileo_pcibios_read_config_byte(int bus, int devfn,
-					    int offset, u8 * val);
-static int galileo_pcibios_read_config_dword(int bus, int devfn,
-					     int offset, u32 * val);
-static int galileo_pcibios_write_config_byte(int bus, int devfn,
-					     int offset, u8 val);
-static int galileo_pcibios_write_config_word(int bus, int devfn,
-					     int offset, u16 val);
-static int galileo_pcibios_write_config_dword(int bus, int devfn,
-					      int offset, u32 val);
-
-static int pci_read(struct pci_bus *bus, unsigned int devfs, int where,
-		    int size, u32 * val);
-static int pci_write(struct pci_bus *bus, unsigned int devfs, int where,
-		     int size, u32 val);
-
-/*
- *  General-purpose PCI functions.
- */
-
-
-/*
- * pci_range_ck -
- *
- * Check if the pci device that are trying to access does really exists
- * on the evaluation board.
- *
- * Inputs :
- * bus - bus number (0 for PCI 0 ; 1 for PCI 1)
- * dev - number of device on the specific pci bus
- *
- * Outpus :
- * 0 - if OK , 1 - if failure
- */
-static __inline__ int pci_range_ck(unsigned char bus, unsigned char dev)
-{
-	/* Accessing device 31 crashes the GT-64240. */
-	if (dev < 5)
-		return 0;
-	return -1;
-}
-
-/*
- * galileo_pcibios_(read/write)_config_(dword/word/byte) -
- *
- * reads/write a dword/word/byte register from the configuration space
- * of a device.
- *
- * Note that bus 0 and bus 1 are local, and we assume all other busses are
- * bridged from bus 1.  This is a safe assumption, since any other
- * configuration will require major modifications to the CP7000G
- *
- * Inputs :
- * bus - bus number
- * dev - device number
- * offset - register offset in the configuration space
- * val - value to be written / read
- *
- * Outputs :
- * PCIBIOS_SUCCESSFUL when operation was succesfull
- * PCIBIOS_DEVICE_NOT_FOUND when the bus or dev is errorneous
- * PCIBIOS_BAD_REGISTER_NUMBER when accessing non aligned
- */
-
-static int galileo_pcibios_read_config_dword(int bus, int devfn,
-					     int offset, u32 * val)
-{
-	int dev, func;
-	uint32_t address_reg, data_reg;
-	uint32_t address;
-
-	dev = PCI_SLOT(devfn);
-	func = PCI_FUNC(devfn);
-
-	/* verify the range */
-	if (pci_range_ck(bus, dev))
-		return PCIBIOS_DEVICE_NOT_FOUND;
-
-	/* select the GT-64240 registers to communicate with the PCI bus */
-	if (bus == 0) {
-		address_reg = PCI_0CONFIGURATION_ADDRESS;
-		data_reg = PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER;
-		GT_WRITE(PCI_0ERROR_CAUSE, ~MASTER_ABORT_BIT);
-	} else {
-		address_reg = PCI_1CONFIGURATION_ADDRESS;
-		data_reg = PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER;
-		GT_WRITE(PCI_1ERROR_CAUSE, ~MASTER_ABORT_BIT);
-		if (bus == 1)
-			bus = 0;
-	}
-
-	address = (bus << 16) | (dev << 11) | (func << 8) |
-	    (offset & 0xfc) | 0x80000000;
-
-	/* start the configuration cycle */
-	GT_WRITE(address_reg, address);
-
-	/* read the data */
-	GT_READ(data_reg, val);
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-
-static int galileo_pcibios_read_config_word(int bus, int devfn,
-					    int offset, u16 * val)
-{
-	int dev, func;
-	uint32_t address_reg, data_reg;
-	uint32_t address;
-
-	dev = PCI_SLOT(devfn);
-	func = PCI_FUNC(devfn);
-
-	/* verify the range */
-	if (pci_range_ck(bus, dev))
-		return PCIBIOS_DEVICE_NOT_FOUND;
-
-	/* select the GT-64240 registers to communicate with the PCI bus */
-	if (bus == 0) {
-		address_reg = PCI_0CONFIGURATION_ADDRESS;
-		data_reg = PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER;
-		GT_WRITE(PCI_0ERROR_CAUSE, ~MASTER_ABORT_BIT);
-	} else {
-		address_reg = PCI_1CONFIGURATION_ADDRESS;
-		data_reg = PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER;
-		GT_WRITE(PCI_1ERROR_CAUSE, ~MASTER_ABORT_BIT);
-		if (bus == 1)
-			bus = 0;
-	}
-
-	address = (bus << 16) | (dev << 11) | (func << 8) |
-	    (offset & 0xfc) | 0x80000000;
-
-	/* start the configuration cycle */
-	GT_WRITE(address_reg, address);
-
-	/* read the data */
-	GT_READ_16(data_reg + (offset & 0x3), val);
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static int galileo_pcibios_read_config_byte(int bus, int devfn,
-					    int offset, u8 * val)
-{
-	int dev, func;
-	uint32_t address_reg, data_reg;
-	uint32_t address;
-
-	dev = PCI_SLOT(devfn);
-	func = PCI_FUNC(devfn);
-
-	/* verify the range */
-	if (pci_range_ck(bus, dev))
-		return PCIBIOS_DEVICE_NOT_FOUND;
-
-	/* select the GT-64240 registers to communicate with the PCI bus */
-	if (bus == 0) {
-		address_reg = PCI_0CONFIGURATION_ADDRESS;
-		data_reg = PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER;
-	} else {
-		address_reg = PCI_1CONFIGURATION_ADDRESS;
-		data_reg = PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER;
-		if (bus == 1)
-			bus = 0;
-	}
-
-	address = (bus << 16) | (dev << 11) | (func << 8) |
-	    (offset & 0xfc) | 0x80000000;
-
-	/* start the configuration cycle */
-	GT_WRITE(address_reg, address);
+#define gt_io_size	0x20000000UL
+#define gt_io_base	0xe0000000UL
 
-	/* write the data */
-	GT_READ_8(data_reg + (offset & 0x3), val);
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static int galileo_pcibios_write_config_dword(int bus, int devfn,
-					      int offset, u32 val)
-{
-	int dev, func;
-	uint32_t address_reg, data_reg;
-	uint32_t address;
-
-	dev = PCI_SLOT(devfn);
-	func = PCI_FUNC(devfn);
-
-	/* verify the range */
-	if (pci_range_ck(bus, dev))
-		return PCIBIOS_DEVICE_NOT_FOUND;
-
-	/* select the GT-64240 registers to communicate with the PCI bus */
-	if (bus == 0) {
-		address_reg = PCI_0CONFIGURATION_ADDRESS;
-		data_reg = PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER;
-	} else {
-		address_reg = PCI_1CONFIGURATION_ADDRESS;
-		data_reg = PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER;
-		if (bus == 1)
-			bus = 0;
-	}
-
-	address = (bus << 16) | (dev << 11) | (func << 8) |
-	    (offset & 0xfc) | 0x80000000;
-
-	/* start the configuration cycle */
-	GT_WRITE(address_reg, address);
-
-	/* write the data */
-	GT_WRITE(data_reg, val);
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-
-static int galileo_pcibios_write_config_word(int bus, int devfn,
-					     int offset, u16 val)
-{
-	int dev, func;
-	uint32_t address_reg, data_reg;
-	uint32_t address;
-
-	dev = PCI_SLOT(devfn);
-	func = PCI_FUNC(devfn);
-
-	/* verify the range */
-	if (pci_range_ck(bus, dev))
-		return PCIBIOS_DEVICE_NOT_FOUND;
-
-	/* select the GT-64240 registers to communicate with the PCI bus */
-	if (bus == 0) {
-		address_reg = PCI_0CONFIGURATION_ADDRESS;
-		data_reg = PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER;
-	} else {
-		address_reg = PCI_1CONFIGURATION_ADDRESS;
-		data_reg = PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER;
-		if (bus == 1)
-			bus = 0;
-	}
-
-	address = (bus << 16) | (dev << 11) | (func << 8) |
-	    (offset & 0xfc) | 0x80000000;
-
-	/* start the configuration cycle */
-	GT_WRITE(address_reg, address);
-
-	/* write the data */
-	GT_WRITE_16(data_reg + (offset & 0x3), val);
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static int galileo_pcibios_write_config_byte(int bus, int devfn,
-					     int offset, u8 val)
-{
-	int dev, func;
-	uint32_t address_reg, data_reg;
-	uint32_t address;
-
-	dev = PCI_SLOT(devfn);
-	func = PCI_FUNC(devfn);
-
-	/* verify the range */
-	if (pci_range_ck(bus, dev))
-		return PCIBIOS_DEVICE_NOT_FOUND;
-
-	/* select the GT-64240 registers to communicate with the PCI bus */
-	if (bus == 0) {
-		address_reg = PCI_0CONFIGURATION_ADDRESS;
-		data_reg = PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER;
-	} else {
-		address_reg = PCI_1CONFIGURATION_ADDRESS;
-		data_reg = PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER;
-		if (bus == 1)
-			bus = 0;
-	}
-
-	address = (bus << 16) | (dev << 11) | (func << 8) |
-	    (offset & 0xfc) | 0x80000000;
-
-	/* start the configuration cycle */
-	GT_WRITE(address_reg, address);
-
-	/* write the data */
-	GT_WRITE_8(data_reg + (offset & 0x3), val);
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-struct pci_ops galileo_pci_ops = {
-	.read = pci_read,
-	.write = pci_write
+static struct resource gt_pci_mem0_resource = {
+	.name	= "MV64240 PCI0 MEM",
+	.start	= 0xc0000000UL,
+	.end	= 0xcfffffffUL,
+	.flags	= IORESOURCE_MEM
 };
 
-static int pci_read(struct pci_bus *bus, unsigned int devfn, int where,
-		    int size, u32 * val)
-{
-	switch (size) {
-	case 1:
-		return galileo_pcibios_read_config_byte(bus->number,
-							devfn, where,
-							(u8 *) val);
-	case 2:
-		return galileo_pcibios_read_config_word(bus->number,
-							devfn, where,
-							(u16 *) val);
-	case 4:
-		return galileo_pcibios_read_config_dword(bus->number,
-							 devfn, where,
-							 (u32 *) val);
-	}
-	return PCIBIOS_FUNC_NOT_SUPPORTED;
-}
-
-static int pci_write(struct pci_bus *bus, unsigned int devfn, int where,
-		     int size, u32 val)
-{
-	switch (size) {
-	case 1:
-		return galileo_pcibios_write_config_byte(bus->number,
-							 devfn, where,
-							 val);
-	case 2:
-		return galileo_pcibios_write_config_word(bus->number,
-							 devfn, where,
-							 val);
-	case 4:
-		return galileo_pcibios_write_config_dword(bus->number,
-							  devfn, where,
-							  val);
-	}
-	return PCIBIOS_FUNC_NOT_SUPPORTED;
-}
-
-struct pci_fixup pcibios_fixups[] = {
-	{0}
+static struct resource gt_pci_io_mem0_resource = {
+	.name	= "MV64240 PCI0 IO MEM",
+	.start	= 0xe0000000UL,
+	.end	= 0xefffffffUL,
+	.flags	= IORESOURCE_IO
 };
 
-void __devinit pcibios_fixup_bus(struct pci_bus *c)
-{
-	gt64240_board_pcibios_fixup_bus(c);
-}
+static struct pci_controller gt_bus0_controller = {
+	.pci_ops	= &gt_bus0_pci_ops,
+	.mem_resource	= &gt_pci_mem0_resource,
+	.mem_offset	= 0xc0000000UL,
+	.io_resource	= &gt_pci_io_mem0_resource,
+	.io_offset	= 0x00000000UL
+};
 
+static struct resource gt_pci_mem1_resource = {
+	.name	= "MV64240 PCI1 MEM",
+	.start	= 0xd0000000UL,
+	.end	= 0xdfffffffUL,
+	.flags	= IORESOURCE_MEM
+};
 
-/********************************************************************
-* pci0P2PConfig - This function set the PCI_0 P2P configurate.
-*                 For more information on the P2P read PCI spec.
-*
-* Inputs:  unsigned int SecondBusLow - Secondery PCI interface Bus Range Lower
-*                                      Boundry.
-*          unsigned int SecondBusHigh - Secondry PCI interface Bus Range upper
-*                                      Boundry.
-*          unsigned int busNum - The CPI bus number to which the PCI interface
-*                                      is connected.
-*          unsigned int devNum - The PCI interface's device number.
-*
-* Returns:  true.
-*/
-void pci0P2PConfig(unsigned int SecondBusLow, unsigned int SecondBusHigh,
-		   unsigned int busNum, unsigned int devNum)
-{
-	uint32_t regData;
+static struct resource gt_pci_io_mem1_resource = {
+	.name	= "MV64240 PCI1 IO MEM",
+	.start	= 0xf0000000UL,
+	.end	= 0xffffffffUL,
+	.flags	= IORESOURCE_IO
+};
 
-	regData = (SecondBusLow & 0xff) | ((SecondBusHigh & 0xff) << 8) |
-	    ((busNum & 0xff) << 16) | ((devNum & 0x1f) << 24);
-	GT_WRITE(PCI_0P2P_CONFIGURATION, regData);
-}
+static struct pci_controller gt_bus1_controller = {
+	.pci_ops	= &gt_bus1_pci_ops,
+	.mem_resource	= &gt_pci_mem1_resource,
+	.mem_offset	= 0xd0000000UL,
+	.io_resource	= &gt_pci_io_mem1_resource,
+	.io_offset	= 0x10000000UL
+};
 
-/********************************************************************
-* pci1P2PConfig - This function set the PCI_1 P2P configurate.
-*                 For more information on the P2P read PCI spec.
-*
-* Inputs:  unsigned int SecondBusLow - Secondery PCI interface Bus Range Lower
-*               Boundry.
-*          unsigned int SecondBusHigh - Secondry PCI interface Bus Range upper
-*               Boundry.
-*          unsigned int busNum - The CPI bus number to which the PCI interface
-*               is connected.
-*          unsigned int devNum - The PCI interface's device number.
-*
-* Returns:  true.
-*/
-void pci1P2PConfig(unsigned int SecondBusLow, unsigned int SecondBusHigh,
-		   unsigned int busNum, unsigned int devNum)
+static __init int __init ocelot_g_pci_init(void)
 {
-	uint32_t regData;
-
-	regData = (SecondBusLow & 0xff) | ((SecondBusHigh & 0xff) << 8) |
-	    ((busNum & 0xff) << 16) | ((devNum & 0x1f) << 24);
-	GT_WRITE(PCI_1P2P_CONFIGURATION, regData);
-}
+	unsigned long io_v_base;
 
-#define PCI0_STATUS_COMMAND_REG                 0x4
-#define PCI1_STATUS_COMMAND_REG                 0x84
+	if (gt_io_size) {
+		io_v_base = (unsigned long) ioremap(gt_io_base, gt_io_size);
+		if (!io_v_base)
+			panic("Could not ioremap I/O port range");
 
-static int __init pcibios_init(void)
-{
-	/* Reset PCI I/O and PCI MEM values */
-	ioport_resource.start = 0xe0000000;
-	ioport_resource.end = 0xe0000000 + 0x20000000 - 1;
-	iomem_resource.start = 0xc0000000;
-	iomem_resource.end = 0xc0000000 + 0x20000000 - 1;
+		set_io_port_base(io_v_base);
+	}
 
-	pci_scan_bus(0, &galileo_pci_ops, NULL);
-	pci_scan_bus(1, &galileo_pci_ops, NULL);
+	register_pci_controller(&gt_bus0_controller);
+	register_pci_controller(&gt_bus1_controller);
 
 	return 0;
 }
 
-subsys_initcall(pcibios_init);
+arch_initcall(ocelot_g_pci_init);
--- diff/arch/mips/pci/pci-vr41xx.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/pci-vr41xx.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,48 +1,32 @@
 /*
- * FILE NAME
- *	arch/mips/vr41xx/common/pciu.c
+ *  pci-vr41xx.c, PCI Control Unit routines for the NEC VR4100 series.
  *
- * BRIEF MODULE DESCRIPTION
- *	PCI Control Unit routines for the NEC VR4100 series.
+ *  Copyright (C) 2001-2003 MontaVista Software Inc.
+ *    Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
+ *  Copyright (C) 2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
- * Author: Yoichi Yuasa
- *         yyuasa@mvista.com or source@mvista.com
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
  *
- * Copyright 2001-2003 MontaVista Software Inc.
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
  *
- *  This 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *  You 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
  */
 /*
  * Changes:
- *  Paul Mundt <lethal@chaoticdreams.org>
- *  - Fix deadlock-causing PCIU access race for VR4131.
- *
  *  MontaVista Software Inc. <yyuasa@mvista.com> or <source@mvista.com>
  *  - New creation, NEC VR4122 and VR4131 are supported.
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/types.h>
-#include <linux/delay.h>
 
 #include <asm/cpu.h>
 #include <asm/io.h>
@@ -51,183 +35,257 @@
 
 #include "pci-vr41xx.h"
 
-static inline int vr41xx_pci_config_access(unsigned char bus,
-					   unsigned int devfn, int where)
-{
-	if (bus == 0) {
-		/*
-		 * Type 0 configuration
-		 */
-		if (PCI_SLOT(devfn) < 11 || where > 255)
-			return -1;
-
-		writel((1UL << PCI_SLOT(devfn)) |
-		       (PCI_FUNC(devfn) << 8) |
-		       (where & 0xfc), PCICONFAREG);
-	} else {
-		/*
-		 * Type 1 configuration
-		 */
-		if (where > 255)
-			return -1;
-
-		writel((bus << 16) |
-		       (devfn << 8) | (where & 0xfc) | 1UL, PCICONFAREG);
-	}
-
-	return 0;
-}
-
-static int vr41xx_pci_config_read(struct pci_bus *bus, unsigned int devfn,
-				  int where, int size, u32 * val)
-{
-	u32 data;
+extern struct pci_ops vr41xx_pci_ops;
 
-	*val = 0xffffffffUL;
-	if (vr41xx_pci_config_access(bus->number, devfn, where) < 0)
-		return PCIBIOS_DEVICE_NOT_FOUND;
+static struct pci_master_address_conversion pci_master_memory1 = {
+	.bus_base_address	= PCI_MASTER_MEM1_BUS_BASE_ADDRESS,
+	.address_mask		= PCI_MASTER_MEM1_ADDRESS_MASK,
+	.pci_base_address	= PCI_MASTER_MEM1_PCI_BASE_ADDRESS,
+};
 
-	data = readl(PCICONFDREG);
+static struct pci_target_address_conversion pci_target_memory1 = {
+	.address_mask		= PCI_TARGET_MEM1_ADDRESS_MASK,
+	.bus_base_address	= PCI_TARGET_MEM1_BUS_BASE_ADDRESS,
+};
 
-	switch (size) {
-	case 1:
-		*val = (data >> ((where & 3) << 3)) & 0xffUL;
-		break;
-	case 2:
-		*val = (data >> ((where & 2) << 3)) & 0xffffUL;
-		break;
-	case 4:
-		*val = data;
-		break;
-	default:
-		return PCIBIOS_FUNC_NOT_SUPPORTED;
-	}
+static struct pci_master_address_conversion pci_master_io = {
+	.bus_base_address	= PCI_MASTER_IO_BUS_BASE_ADDRESS,
+	.address_mask		= PCI_MASTER_IO_ADDRESS_MASK,
+	.pci_base_address	= PCI_MASTER_IO_PCI_BASE_ADDRESS,
+};
 
-	return PCIBIOS_SUCCESSFUL;
-}
+static struct pci_mailbox_address pci_mailbox = {
+	.base_address		= PCI_MAILBOX_BASE_ADDRESS,
+};
 
-static int vr41xx_pci_config_write(struct pci_bus *bus, unsigned int devfn,
-				   int where, int size, u32 val)
-{
-	u32 data;
-	int shift;
+static struct pci_target_address_window pci_target_window1 = {
+	.base_address		= PCI_TARGET_WINDOW1_BASE_ADDRESS,
+};
 
-	if (vr41xx_pci_config_access(bus->number, devfn, where) < 0)
-		return PCIBIOS_DEVICE_NOT_FOUND;
+static struct resource pci_mem_resource = {
+	.name   = "PCI Memory resources",
+	.start  = PCI_MEM_RESOURCE_START,
+	.end    = PCI_MEM_RESOURCE_END,
+	.flags  = IORESOURCE_MEM,
+};
 
-	data = readl(PCICONFDREG);
+static struct resource pci_io_resource = {
+	.name   = "PCI I/O resources",
+	.start  = PCI_IO_RESOURCE_START,
+	.end    = PCI_IO_RESOURCE_END,
+	.flags  = IORESOURCE_IO,
+};
 
-	switch (size) {
-	case 1:
-		shift = (where & 3) << 3;
-		data &= ~(0xff << shift);
-		data |= ((val & 0xff) << shift);
-		break;
-	case 2:
-		shift = (where & 2) << 3;
-		data &= ~(0xffff << shift);
-		data |= ((val & 0xffff) << shift);
-		break;
-	case 4:
-		data = val;
-		break;
-	default:
-		return PCIBIOS_FUNC_NOT_SUPPORTED;
-	}
+static struct pci_controller_unit_setup vr41xx_pci_controller_unit_setup = {
+	.master_memory1				= &pci_master_memory1,
+	.target_memory1				= &pci_target_memory1,
+	.master_io				= &pci_master_io,
+	.exclusive_access			= CANNOT_LOCK_FROM_DEVICE,
+	.wait_time_limit_from_irdy_to_trdy	= 0,
+	.mailbox				= &pci_mailbox,
+	.target_window1				= &pci_target_window1,
+	.master_latency_timer			= 0x80,
+	.retry_limit				= 0,
+	.arbiter_priority_control		= PCI_ARBITRATION_MODE_FAIR,
+	.take_away_gnt_mode			= PCI_TAKE_AWAY_GNT_DISABLE,
+};
 
-	writel(data, PCICONFDREG);
+static struct pci_controller vr41xx_pci_controller = {
+	.pci_ops        = &vr41xx_pci_ops,
+	.mem_resource	= &pci_mem_resource,
+	.io_resource	= &pci_io_resource,
+};
 
-	return PCIBIOS_SUCCESSFUL;
+void __init vr41xx_pciu_setup(struct pci_controller_unit_setup *setup)
+{
+	vr41xx_pci_controller_unit_setup = *setup;
 }
 
-struct pci_ops vr41xx_pci_ops = {
-	.read = vr41xx_pci_config_read,
-	.write = vr41xx_pci_config_write,
-};
-
-void __init vr41xx_pciu_init(struct vr41xx_pci_address_map *map)
+static int __init vr41xx_pciu_init(void)
 {
-	struct vr41xx_pci_address_space *s;
-	unsigned long vtclock;
-	u32 config;
-	int n;
+	struct pci_controller_unit_setup *setup;
+	struct pci_master_address_conversion *master;
+	struct pci_target_address_conversion *target;
+	struct pci_mailbox_address *mailbox;
+	struct pci_target_address_window *window;
+	unsigned long vtclock, pci_clock_max;
+	uint32_t val;
 
-	if (!map)
-		return;
+	setup = &vr41xx_pci_controller_unit_setup;
 
 	/* Disable PCI interrupt */
-	writew(0, MPCIINTREG);
+	vr41xx_disable_pciint();
 
 	/* Supply VTClock to PCIU */
 	vr41xx_supply_clock(PCIU_CLOCK);
 
-	/*
-	 * Sleep for 1us after setting MSKPPCIU bit in CMUCLKMSK
-	 * before doing any PCIU access to avoid deadlock on VR4131.
-	 */
-	udelay(1);
+	/* Dummy write, waiting for supply of VTClock. */
+	vr41xx_disable_pciint();
 
 	/* Select PCI clock */
+	if (setup->pci_clock_max != 0)
+		pci_clock_max = setup->pci_clock_max;
+	else
+		pci_clock_max = PCI_CLOCK_MAX;
 	vtclock = vr41xx_get_vtclock_frequency();
-	if (vtclock < MAX_PCI_CLOCK)
+	if (vtclock < pci_clock_max)
 		writel(EQUAL_VTCLOCK, PCICLKSELREG);
-	else if ((vtclock / 2) < MAX_PCI_CLOCK)
+	else if ((vtclock / 2) < pci_clock_max)
 		writel(HALF_VTCLOCK, PCICLKSELREG);
-	else if ((vtclock / 4) < MAX_PCI_CLOCK)
+	else if (current_cpu_data.processor_id >= PRID_VR4131_REV2_1 &&
+	         (vtclock / 3) < pci_clock_max)
+		writel(ONE_THIRD_VTCLOCK, PCICLKSELREG);
+	else if ((vtclock / 4) < pci_clock_max)
 		writel(QUARTER_VTCLOCK, PCICLKSELREG);
-	else
-		printk(KERN_INFO "Warning: PCI Clock is over 33MHz.\n");
+	else {
+		printk(KERN_ERR "PCI Clock is over 33MHz.\n");
+		return -EINVAL;
+	}
 
 	/* Supply PCI clock by PCI bus */
 	vr41xx_supply_clock(PCI_CLOCK);
 
-	/*
-	 * Set PCI memory & I/O space address conversion registers
-	 * for master transaction.
-	 */
-	if (map->mem1 != NULL) {
-		s = map->mem1;
-		config = (s->internal_base & 0xff000000) |
-		    ((s->address_mask & 0x7f000000) >> 11) | (1UL << 12) |
-		    ((s->pci_base & 0xff000000) >> 24);
-		writel(config, PCIMMAW1REG);
-	}
-	if (map->mem2 != NULL) {
-		s = map->mem2;
-		config = (s->internal_base & 0xff000000) |
-		    ((s->address_mask & 0x7f000000) >> 11) | (1UL << 12) |
-		    ((s->pci_base & 0xff000000) >> 24);
-		writel(config, PCIMMAW2REG);
-	}
-	if (map->io != NULL) {
-		s = map->io;
-		config = (s->internal_base & 0xff000000) |
-		    ((s->address_mask & 0x7f000000) >> 11) | (1UL << 12) |
-		    ((s->pci_base & 0xff000000) >> 24);
-		writel(config, PCIMIOAWREG);
-	}
-
-	/* Set target memory windows */
-	writel(0x00081000, PCITAW1REG);
-	writel(0UL, PCITAW2REG);
-	pciu_write_config_dword(PCI_BASE_ADDRESS_0, 0UL);
-	pciu_write_config_dword(PCI_BASE_ADDRESS_1, 0UL);
+	if (setup->master_memory1 != NULL) {
+		master = setup->master_memory1;
+		val = IBA(master->bus_base_address) |
+		      MASTER_MSK(master->address_mask) |
+		      WINEN |
+		      PCIA(master->pci_base_address);
+		writel(val, PCIMMAW1REG);
+	} else {
+		val = readl(PCIMMAW1REG);
+		val &= ~WINEN;
+		writel(val, PCIMMAW1REG);
+	}
+
+	if (setup->master_memory2 != NULL) {
+		master = setup->master_memory2;
+		val = IBA(master->bus_base_address) |
+		      MASTER_MSK(master->address_mask) |
+		      WINEN |
+		      PCIA(master->pci_base_address);
+		writel(val, PCIMMAW2REG);
+	} else {
+		val = readl(PCIMMAW2REG);
+		val &= ~WINEN;
+		writel(val, PCIMMAW2REG);
+	}
 
-	/* Clear bus error */
-	n = readl(BUSERRADREG);
+	if (setup->target_memory1 != NULL) {
+		target = setup->target_memory1;
+		val = TARGET_MSK(target->address_mask) |
+		      WINEN |
+		      ITA(target->bus_base_address);
+		writel(val, PCITAW1REG);
+	} else {
+		val = readl(PCITAW1REG);
+		val &= ~WINEN;
+		writel(val, PCITAW1REG);
+	}
+
+	if (setup->target_memory2 != NULL) {
+		target = setup->target_memory2;
+		val = TARGET_MSK(target->address_mask) |
+		      WINEN |
+		      ITA(target->bus_base_address);
+		writel(val, PCITAW2REG);
+	} else {
+		val = readl(PCITAW2REG);
+		val &= ~WINEN;
+		writel(val, PCITAW2REG);
+	}
 
-	if (current_cpu_data.cputype == CPU_VR4122) {
-		writel(0UL, PCITRDYVREG);
-		pciu_write_config_dword(PCI_CACHE_LINE_SIZE, 0x0000f804);
+	if (setup->master_io != NULL) {
+		master = setup->master_io;
+		val = IBA(master->bus_base_address) |
+		      MASTER_MSK(master->address_mask) |
+		      WINEN |
+		      PCIIA(master->pci_base_address);
+		writel(val, PCIMIOAWREG);
 	} else {
-		writel(100UL, PCITRDYVREG);
-		pciu_write_config_dword(PCI_CACHE_LINE_SIZE, 0x00008004);
+		val = readl(PCIMIOAWREG);
+		val &= ~WINEN;
+		writel(val, PCIMIOAWREG);
+	}
+
+	if (setup->exclusive_access == CANNOT_LOCK_FROM_DEVICE)
+		writel(UNLOCK, PCIEXACCREG);
+	else
+		writel(0, PCIEXACCREG);
+
+	if (current_cpu_data.cputype == CPU_VR4122)
+		writel(TRDYV(setup->wait_time_limit_from_irdy_to_trdy), PCITRDYVREG);
+
+	writel(MLTIM(setup->master_latency_timer), LATTIMEREG);
+
+	if (setup->mailbox != NULL) {
+		mailbox = setup->mailbox;
+		val = MBADD(mailbox->base_address) | TYPE_32BITSPACE |
+		      MSI_MEMORY | PREF_APPROVAL;
+		writel(val, MAILBAREG);
+	}
+
+	if (setup->target_window1) {
+		window = setup->target_window1;
+		val = PMBA(window->base_address) | TYPE_32BITSPACE |
+		      MSI_MEMORY | PREF_APPROVAL;
+		writel(val, PCIMBA1REG);
+	}
+
+	if (setup->target_window2) {
+		window = setup->target_window2;
+		val = PMBA(window->base_address) | TYPE_32BITSPACE |
+		      MSI_MEMORY | PREF_APPROVAL;
+		writel(val, PCIMBA2REG);
 	}
 
+	val = readl(RETVALREG);
+	val &= ~RTYVAL_MASK;
+	val |= RTYVAL(setup->retry_limit);
+	writel(val, RETVALREG);
+
+	val = readl(PCIAPCNTREG);
+	val &= ~(TKYGNT | PAPC);
+
+	switch (setup->arbiter_priority_control) {
+	case PCI_ARBITRATION_MODE_ALTERNATE_0:
+		val |= PAPC_ALTERNATE_0;
+		break;
+	case PCI_ARBITRATION_MODE_ALTERNATE_B:
+		val |= PAPC_ALTERNATE_B;
+		break;
+	default:
+		val |= PAPC_FAIR;
+		break;
+	}
+
+	if (setup->take_away_gnt_mode == PCI_TAKE_AWAY_GNT_ENABLE)
+		val |= TKYGNT_ENABLE;
+
+	writel(val, PCIAPCNTREG);
+
+	writel(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
+	       PCI_COMMAND_PARITY | PCI_COMMAND_SERR, COMMANDREG);
+
+	/* Clear bus error */
+	readl(BUSERRADREG);
+
 	writel(CONFIG_DONE, PCIENREG);
-	pciu_write_config_dword(PCI_COMMAND,
-				PCI_COMMAND_IO |
-				PCI_COMMAND_MEMORY |
-				PCI_COMMAND_MASTER |
-				PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
+
+	if (setup->mem_resource != NULL)
+		vr41xx_pci_controller.mem_resource = setup->mem_resource;
+
+	if (setup->io_resource != NULL) {
+		vr41xx_pci_controller.io_resource = setup->io_resource;
+	} else {
+		set_io_port_base(IO_PORT_BASE);
+		ioport_resource.start = IO_PORT_RESOURCE_START;
+		ioport_resource.end = IO_PORT_RESOURCE_END;
+	}
+
+	register_pci_controller(&vr41xx_pci_controller);
+
+	return 0;
 }
+
+early_initcall(vr41xx_pciu_init);
--- diff/arch/mips/pci/pci-vr41xx.h	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/pci-vr41xx.h	2004-07-01 21:32:33.000000000 +0100
@@ -1,164 +1,151 @@
 /*
- * FILE NAME
- *	arch/mips/vr41xx/common/pciu.h
+ *  pci-vr41xx.h, Include file for PCI Control Unit of the NEC VR4100 series.
  *
- * BRIEF MODULE DESCRIPTION
- *	Include file for PCI Control Unit of the NEC VR4100 series.
- *
- * Author: Yoichi Yuasa
- *         yyuasa@mvista.com or source@mvista.com
- *
- * Copyright 2002 MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute it and/or modify it
- *  under the terms of the GNU General Public License as published by the
- *  Free Software Foundation; either version 2 of the License, or (at your
- *  option) any later version.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/*
- * Changes:
- *  MontaVista Software Inc. <yyuasa@mvista.com> or <source@mvista.com>
- *  - New creation, NEC VR4122 and VR4131 are supported.
+ *  Copyright (C) 2002  MontaVista Software Inc.
+ *    Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
+ *  Copyright (C) 2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *
+ *  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
  */
-#ifndef __VR41XX_PCIU_H
-#define __VR41XX_PCIU_H
-
-#include <linux/config.h>
-#include <asm/addrspace.h>
-
-#define BIT(x)	(1 << (x))
-
-#define PCIMMAW1REG			KSEG1ADDR(0x0f000c00)
-#define PCIMMAW2REG			KSEG1ADDR(0x0f000c04)
-#define PCITAW1REG			KSEG1ADDR(0x0f000c08)
-#define PCITAW2REG			KSEG1ADDR(0x0f000c0c)
-#define PCIMIOAWREG			KSEG1ADDR(0x0f000c10)
-#define INTERNAL_BUS_BASE_ADDRESS	0xff000000
-#define ADDRESS_MASK			0x000fe000
-#define PCI_ACCESS_ENABLE		BIT(12)
-#define PCI_ADDRESS_SETTING		0x000000ff
-
-#define PCICONFDREG			KSEG1ADDR(0x0f000c14)
-#define PCICONFAREG			KSEG1ADDR(0x0f000c18)
-#define PCIMAILREG			KSEG1ADDR(0x0f000c1c)
-
-#define BUSERRADREG			KSEG1ADDR(0x0f000c24)
-#define ERROR_ADDRESS			0xfffffffc
-
-#define INTCNTSTAREG			KSEG1ADDR(0x0f000c28)
-#define MABTCLR				BIT(31)
-#define TRDYCLR				BIT(30)
-#define PARCLR				BIT(29)
-#define MBCLR				BIT(28)
-#define SERRCLR				BIT(27)
-
-#define PCIEXACCREG			KSEG1ADDR(0x0f000c2c)
-#define UNLOCK				BIT(1)
-#define EAREQ				BIT(0)
-
-#define PCIRECONTREG			KSEG1ADDR(0x0f000c30)
-#define RTRYCNT				0x000000ff
+#ifndef __PCI_VR41XX_H
+#define __PCI_VR41XX_H
 
-#define PCIENREG			KSEG1ADDR(0x0f000c34)
-#define CONFIG_DONE			BIT(2)
+#define PCIMMAW1REG		KSEG1ADDR(0x0f000c00)
+#define PCIMMAW2REG		KSEG1ADDR(0x0f000c04)
+#define PCITAW1REG		KSEG1ADDR(0x0f000c08)
+#define PCITAW2REG		KSEG1ADDR(0x0f000c0c)
+#define PCIMIOAWREG		KSEG1ADDR(0x0f000c10)
+ #define IBA(addr)		((addr) & 0xff000000U)
+ #define MASTER_MSK(mask)	(((mask) >> 11) & 0x000fe000U)
+ #define PCIA(addr)		(((addr) >> 24) & 0x000000ffU)
+ #define TARGET_MSK(mask)	(((mask) >> 8) & 0x000fe000U)
+ #define ITA(addr)		(((addr) >> 24) & 0x000000ffU)
+ #define PCIIA(addr)		(((addr) >> 24) & 0x000000ffU)
+ #define WINEN			0x1000U
+#define PCICONFDREG		KSEG1ADDR(0x0f000c14)
+#define PCICONFAREG		KSEG1ADDR(0x0f000c18)
+#define PCIMAILREG		KSEG1ADDR(0x0f000c1c)
+#define BUSERRADREG		KSEG1ADDR(0x0f000c24)
+ #define EA(reg)		((reg) &0xfffffffc)
+
+#define INTCNTSTAREG		KSEG1ADDR(0x0f000c28)
+ #define MABTCLR		0x80000000U
+ #define TRDYCLR		0x40000000U
+ #define PARCLR			0x20000000U
+ #define MBCLR			0x10000000U
+ #define SERRCLR		0x08000000U
+ #define RTYCLR			0x04000000U
+ #define MABCLR			0x02000000U
+ #define TABCLR			0x01000000U
+ /* RFU */
+ #define MABTMSK		0x00008000U
+ #define TRDYMSK		0x00004000U
+ #define PARMSK			0x00002000U
+ #define MBMSK			0x00001000U
+ #define SERRMSK		0x00000800U
+ #define RTYMSK			0x00000400U
+ #define MABMSK			0x00000200U
+ #define TABMSK			0x00000100U
+ #define IBAMABT		0x00000080U
+ #define TRDYRCH		0x00000040U
+ #define PAR			0x00000020U
+ #define MB			0x00000010U
+ #define PCISERR		0x00000008U
+ #define RTYRCH			0x00000004U
+ #define MABORT			0x00000002U
+ #define TABORT			0x00000001U
+
+#define PCIEXACCREG		KSEG1ADDR(0x0f000c2c)
+ #define UNLOCK			0x2U
+ #define EAREQ			0x1U
+#define PCIRECONTREG		KSEG1ADDR(0x0f000c30)
+ #define RTRYCNT(reg)		((reg) & 0x000000ffU)
+#define PCIENREG		KSEG1ADDR(0x0f000c34)
+ #define CONFIG_DONE		0x4U
+#define PCICLKSELREG		KSEG1ADDR(0x0f000c38)
+ #define EQUAL_VTCLOCK		0x2U
+ #define HALF_VTCLOCK		0x0U
+ #define ONE_THIRD_VTCLOCK	0x3U
+ #define QUARTER_VTCLOCK	0x1U
+#define PCITRDYVREG		KSEG1ADDR(0x0f000c3c)
+ #define TRDYV(val)		((uint32_t)(val) & 0xffU)
+#define PCICLKRUNREG		KSEG1ADDR(0x0f000c60)
+
+#define VENDORIDREG		KSEG1ADDR(0x0f000d00)
+#define DEVICEIDREG		KSEG1ADDR(0x0f000d00)
+#define COMMANDREG		KSEG1ADDR(0x0f000d04)
+#define STATUSREG		KSEG1ADDR(0x0f000d04)
+#define REVIDREG		KSEG1ADDR(0x0f000d08)
+#define CLASSREG		KSEG1ADDR(0x0f000d08)
+#define CACHELSREG		KSEG1ADDR(0x0f000d0c)
+#define LATTIMEREG		KSEG1ADDR(0x0f000d0c)
+ #define MLTIM(val)		(((uint32_t)(val) << 7) & 0xff00U)
+#define MAILBAREG		KSEG1ADDR(0x0f000d10)
+#define PCIMBA1REG		KSEG1ADDR(0x0f000d14)
+#define PCIMBA2REG		KSEG1ADDR(0x0f000d18)
+ #define MBADD(base)		((base) & 0xfffff800U)
+ #define PMBA(base)		((base) & 0xffe00000U)
+ #define PREF			0x8U
+ #define PREF_APPROVAL		0x8U
+ #define PREF_DISAPPROVAL	0x0U
+ #define TYPE			0x6U
+ #define TYPE_32BITSPACE	0x0U
+ #define MSI			0x1U
+ #define MSI_MEMORY		0x0U
+#define INTLINEREG		KSEG1ADDR(0x0f000d3c)
+#define INTPINREG		KSEG1ADDR(0x0f000d3c)
+#define RETVALREG		KSEG1ADDR(0x0f000d40)
+#define PCIAPCNTREG		KSEG1ADDR(0x0f000d40)
+ #define TKYGNT			0x04000000U
+ #define TKYGNT_ENABLE		0x04000000U
+ #define TKYGNT_DISABLE		0x00000000U
+ #define PAPC			0x03000000U
+ #define PAPC_ALTERNATE_B	0x02000000U
+ #define PAPC_ALTERNATE_0	0x01000000U
+ #define PAPC_FAIR		0x00000000U
+ #define RTYVAL(val)		(((uint32_t)(val) << 7) & 0xff00U)
+ #define RTYVAL_MASK		0xff00U
 
-#define PCICLKSELREG			KSEG1ADDR(0x0f000c38)
-#define EQUAL_VTCLOCK			0x00000002
-#define HALF_VTCLOCK			0x00000000
-#define QUARTER_VTCLOCK			0x00000001
+#define PCI_CLOCK_MAX		33333333U
 
-#define PCITRDYVREG			KSEG1ADDR(0x0f000c3c)
-
-#define PCICLKRUNREG			KSEG1ADDR(0x0f000c60)
-
-#define PCIU_CONFIGREGS_BASE		KSEG1ADDR(0x0f000d00)
-#define VENDORIDREG			KSEG1ADDR(0x0f000d00)
-#define DEVICEIDREG			KSEG1ADDR(0x0f000d00)
-#define COMMANDREG			KSEG1ADDR(0x0f000d04)
-#define STATUSREG			KSEG1ADDR(0x0f000d04)
-#define REVIDREG			KSEG1ADDR(0x0f000d08)
-#define CLASSREG			KSEG1ADDR(0x0f000d08)
-#define CACHELSREG			KSEG1ADDR(0x0f000d0c)
-#define LATTIMEREG			KSEG1ADDR(0x0f000d0c)
-#define MAILBAREG			KSEG1ADDR(0x0f000d10)
-#define PCIMBA1REG			KSEG1ADDR(0x0f000d14)
-#define PCIMBA2REG			KSEG1ADDR(0x0f000d18)
-#define INTLINEREG			KSEG1ADDR(0x0f000d3c)
-#define INTPINREG			KSEG1ADDR(0x0f000d3c)
-#define RETVALREG			KSEG1ADDR(0x0f000d40)
-#define PCIAPCNTREG			KSEG1ADDR(0x0f000d40)
-
-#define MPCIINTREG			KSEG1ADDR(0x0f0000b2)
-
-#define MAX_PCI_CLOCK			33333333
-
-static inline int pciu_read_config_byte(int where, u8 * val)
-{
-	u32 data;
-
-	data = readl(PCIU_CONFIGREGS_BASE + where);
-	*val = (u8) (data >> ((where & 3) << 3));
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static inline int pciu_read_config_word(int where, u16 * val)
-{
-	u32 data;
-
-	if (where & 1)
-		return PCIBIOS_BAD_REGISTER_NUMBER;
-
-	data = readl(PCIU_CONFIGREGS_BASE + where);
-	*val = (u16) (data >> ((where & 2) << 3));
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static inline int pciu_read_config_dword(int where, u32 * val)
-{
-	if (where & 3)
-		return PCIBIOS_BAD_REGISTER_NUMBER;
-
-	*val = readl(PCIU_CONFIGREGS_BASE + where);
+/*
+ * Default setup
+ */
+#define PCI_MASTER_MEM1_BUS_BASE_ADDRESS	0x10000000U
+#define PCI_MASTER_MEM1_ADDRESS_MASK		0x7c000000U
+#define PCI_MASTER_MEM1_PCI_BASE_ADDRESS	0x10000000U
 
-	return PCIBIOS_SUCCESSFUL;
-}
+#define PCI_TARGET_MEM1_ADDRESS_MASK		0x08000000U
+#define PCI_TARGET_MEM1_BUS_BASE_ADDRESS	0x00000000U
 
-static inline int pciu_write_config_byte(int where, u8 val)
-{
-	writel(val, PCIU_CONFIGREGS_BASE + where);
+#define PCI_MASTER_IO_BUS_BASE_ADDRESS		0x16000000U
+#define PCI_MASTER_IO_ADDRESS_MASK		0x7e000000U
+#define PCI_MASTER_IO_PCI_BASE_ADDRESS		0x00000000U
 
-	return 0;
-}
+#define PCI_MAILBOX_BASE_ADDRESS		0x00000000U
 
-static inline int pciu_write_config_word(int where, u16 val)
-{
-	writel(val, PCIU_CONFIGREGS_BASE + where);
+#define PCI_TARGET_WINDOW1_BASE_ADDRESS		0x00000000U
 
-	return 0;
-}
+#define IO_PORT_BASE		KSEG1ADDR(PCI_MASTER_IO_BUS_BASE_ADDRESS)
+#define IO_PORT_RESOURCE_START	PCI_MASTER_IO_PCI_BASE_ADDRESS
+#define IO_PORT_RESOURCE_END	(~PCI_MASTER_IO_ADDRESS_MASK & PCI_MASTER_ADDRESS_MASK)
 
-static inline int pciu_write_config_dword(int where, u32 val)
-{
-	writel(val, PCIU_CONFIGREGS_BASE + where);
+#define PCI_IO_RESOURCE_START	0x01000000UL
+#define PCI_IO_RESOURCE_END	0x01ffffffUL
 
-	return 0;
-}
+#define PCI_MEM_RESOURCE_START	0x11000000UL
+#define PCI_MEM_RESOURCE_END	0x13ffffffUL
 
-#endif				/* __VR41XX_PCIU_H */
+#endif /* __PCI_VR41XX_H */
--- diff/arch/mips/pci/pci.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/pci.c	2004-07-01 21:32:33.000000000 +0100
@@ -231,7 +231,7 @@
 {
 	/* Update device resources.  */
 	struct pci_controller *hose = (struct pci_controller *)bus->sysdata;
-	unsigned long offset;
+	unsigned long offset = 0;
 	int i;
 
 	for (i = 0; i < PCI_NUM_RESOURCES; i++) {
--- diff/arch/mips/pmc-sierra/yosemite/Makefile	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -1,8 +1,7 @@
 #
-# Makefile for the PMC-Sierra Titan 
+# Makefile for the PMC-Sierra Titan
 #
 
-obj-y    += irq-handler.o irq.o prom.o setup.o
+obj-y    += irq-handler.o irq.o i2c-yosemite.o prom.o py-console.o setup.o
 
-obj-$(CONFIG_SMP)          	+= smp.o
-obj-$(CONFIG_HYPERTRANSPORT)	+= ht-irq.o ht.o
+obj-$(CONFIG_KGDB)		+= dbg_io.o
--- diff/arch/mips/pmc-sierra/yosemite/i2c-yosemite.h	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/i2c-yosemite.h	2004-07-01 21:32:33.000000000 +0100
@@ -31,7 +31,7 @@
 /* Read and Write operations to the chip */
 
 #define TITAN_I2C_BASE			0xbb000000	/* XXX Needs to change */
-	
+
 #define	TITAN_I2C_WRITE(offset, data)	\
 					*(volatile unsigned long *)(TITAN_I2C_BASE + offset) = data
 
@@ -48,14 +48,14 @@
 #define TITAN_I2C_MAX_POLL		100
 
 /* Registers used for I2C work */
-#define TITAN_I2C_SCMB_CONTROL		0x0180  /* SCMB Control */
-#define TITAN_I2C_SCMB_CLOCK_A		0x0184  /* SCMB Clock A */
-#define TITAN_I2C_SCMB_CLOCK_B		0x0188  /* SCMB Clock B */
-#define	TITAN_I2C_CONFIG		0x01A0  /* I2C Config */
-#define TITAN_I2C_COMMAND		0x01A4  /* I2C Command */
+#define TITAN_I2C_SCMB_CONTROL		0x0180	/* SCMB Control */
+#define TITAN_I2C_SCMB_CLOCK_A		0x0184	/* SCMB Clock A */
+#define TITAN_I2C_SCMB_CLOCK_B		0x0188	/* SCMB Clock B */
+#define	TITAN_I2C_CONFIG		0x01A0	/* I2C Config */
+#define TITAN_I2C_COMMAND		0x01A4	/* I2C Command */
 #define	TITAN_I2C_SLAVE_ADDRESS		0x01A8	/* I2C Slave Address */
-#define TITAN_I2C_DATA			0x01AC  /* I2C Data [15:0] */
-#define TITAN_I2C_INTERRUPTS		0x01BC  /* I2C Interrupts */
+#define TITAN_I2C_DATA			0x01AC	/* I2C Data [15:0] */
+#define TITAN_I2C_INTERRUPTS		0x01BC	/* I2C Interrupts */
 
 /* Error */
 #define	TITAN_I2C_ERR_ARB_LOST		(-9220)
@@ -66,31 +66,31 @@
 
 /* I2C Command Type */
 typedef enum {
-	TITAN_I2C_CMD_WRITE		= 0,
-	TITAN_I2C_CMD_READ		= 1,
-	TITAN_I2C_CMD_READ_WRITE	= 2
+	TITAN_I2C_CMD_WRITE = 0,
+	TITAN_I2C_CMD_READ = 1,
+	TITAN_I2C_CMD_READ_WRITE = 2
 } titan_i2c_cmd_type;
 
 /* I2C structures */
 typedef struct {
-	int	filtera; 		/* Register 0x0184, bits 15 - 12*/
-	int	clka;			/* Register 0x0184, bits 9 - 0 */
-	int	filterb;		/* Register 0x0188, bits 15 - 12 */
-	int	clkb;			/* Register 0x0188, bits 9 - 0 */
+	int filtera;		/* Register 0x0184, bits 15 - 12 */
+	int clka;		/* Register 0x0184, bits 9 - 0 */
+	int filterb;		/* Register 0x0188, bits 15 - 12 */
+	int clkb;		/* Register 0x0188, bits 9 - 0 */
 } titan_i2c_config;
 
 /* I2C command type */
 typedef struct {
-	titan_i2c_cmd_type	type;		/* Type of command */
-	int			num_arb;	/* Register 0x01a0, bits 15 - 12 */
-	int			num_nak;	/* Register 0x01a0, bits 11 - 8 */
-	int			addr_size;	/* Register 0x01a0, bit 7 */
-	int			mst_code;	/* Register 0x01a0, bits 6 - 4 */
-	int			arb_en;		/* Register 0x01a0, bit 1 */
-	int			speed;		/* Register 0x01a0, bit 0 */
-	int			slave_addr;	/* Register 0x01a8 */
-	int			write_size;	/* Register 0x01a4, bits 10 - 8 */
-	unsigned int		*data;		/* Register 0x01ac */
+	titan_i2c_cmd_type type;	/* Type of command */
+	int num_arb;		/* Register 0x01a0, bits 15 - 12 */
+	int num_nak;		/* Register 0x01a0, bits 11 - 8 */
+	int addr_size;		/* Register 0x01a0, bit 7 */
+	int mst_code;		/* Register 0x01a0, bits 6 - 4 */
+	int arb_en;		/* Register 0x01a0, bit 1 */
+	int speed;		/* Register 0x01a0, bit 0 */
+	int slave_addr;		/* Register 0x01a8 */
+	int write_size;		/* Register 0x01a4, bits 10 - 8 */
+	unsigned int *data;	/* Register 0x01ac */
 } titan_i2c_command;
 
-#endif /* __I2C_YOSEMITE_H */ 
+#endif				/* __I2C_YOSEMITE_H */
--- diff/arch/mips/pmc-sierra/yosemite/irq-handler.S	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/irq-handler.S	2004-07-01 21:32:33.000000000 +0100
@@ -8,6 +8,10 @@
  * 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.
+ *
+ * Titan supports Hypertransport or PCI but not both. Hence, one interrupt
+ * line is shared between the PCI slot A and Hypertransport. This is the
+ * Processor INTB #0.
  */
 
 #include <linux/config.h>
@@ -17,109 +21,90 @@
 #include <asm/regdef.h>
 #include <asm/stackframe.h>
 
-/*
- * IRQ router for the Titan board
- */
-
 		.align	5
 		NESTED(titan_handle_int, PT_SIZE, sp)
 		SAVE_ALL
 		CLI
 		.set	at
+		.set	noreorder
 		mfc0	t0, CP0_CAUSE
 		mfc0	t2, CP0_STATUS
 
 		and	t0, t2
-	
-		andi	t1, t0, STATUSF_IP0	/* INTB0 hardware line */
+
+		andi	t1, t0, STATUSF_IP2	/* INTB0 hardware line */
 		bnez	t1, ll_pcia_irq		/* 64-bit PCI */
-		andi	t1, t0, STATUSF_IP1	/* INTB1 hardware line */
+		andi	t1, t0, STATUSF_IP3	/* INTB1 hardware line */
 		bnez	t1, ll_pcib_irq		/* second 64-bit PCI slot */
-		andi	t1, t0, STATUSF_IP2	/* INTB2 hardware line */
+		andi	t1, t0, STATUSF_IP4	/* INTB2 hardware line */
 		bnez	t1, ll_duart_irq	/* UART	*/
-		andi	t1, t0, STATUSF_IP3	/* INTB3 hardware line*/
-		bnez	t1, ll_ht_smp_irq		/* Hypertransport */
-		andi	t1, t0, STATUSF_IP5	/* INTB5 hardware line */
+		andi    t1, t0, STATUSF_IP5	/* SMP inter-core interrupts */
+		bnez    t1, ll_smp_irq
+		andi	t1, t0, STATUSF_IP6
+		bnez	t1, ll_ht_irq		/* Hypertransport */
+		andi	t1, t0, STATUSF_IP7	/* INTB5 hardware line */
 		bnez	t1, ll_timer_irq	/* Timer */
 
 		nop
 		nop
 
 		/* Extended interrupts */
-		mfc0	t0, CPU_CAUSE
-		cfc0	t1, CP0_S1_INTCONTROL
+                mfc0    t0, CP0_CAUSE
+                cfc0    t1, CP0_S1_INTCONTROL
 
-		sll	t2, t1, 8
-		
-		and	t0, t2
-		srl	t0, t0, 16
-
-		
-		andi	t1, t0, STATUSF_IP6	/* INTB6 hardware line */
-		bnez	t1, ll_phy0_irq		/* Ethernet port 0 */
-		andi	t1, t0, STATUSF_IP7	/* INTB7 hardware line */
-		bnez	t1, ll_phy1_irq		/* Ethernet port 1 */
-		andi	t1, t0, STATUSF_IP8	/* INTB8 hardware line */
-		bnez	t1, ll_phy2_irq		/* Ethernet Port 2 */
+                sll     t2, t1, 8
 
-		nop
-		nop
+                and     t0, t2
+                srl     t0, t0, 16
 
 		.set	reorder
 
-		/* No handler */
 		j	spurious_interrupt
 		nop
 		END(titan_handle_int)
 
 		.align	5
 
-/* Individual Handlers */
-
 ll_pcia_irq:
-		li	a0, 1
-		move	a2, sp
+		li	a0, 2
+		move	a1, sp
+#ifdef CONFIG_HYPERTRANSPORT
+		jal	ll_ht_smp_irq_handler
+#else
 		jal	do_IRQ
+#endif
 		j	ret_from_irq
 
 ll_pcib_irq:
-		li      a0, 2
-                move    a1, sp
-                jal     do_IRQ
-                j       ret_from_irq
-
-ll_duart_irq:
 		li	a0, 3
 		move	a1, sp
 		jal	do_IRQ
 		j	ret_from_irq
 
-ll_ht_irq:
+ll_duart_irq:
 		li	a0, 4
 		move	a1, sp
-		jal	ll_ht_smp_irq_handler 	/* Detailed HT & SMP IRQ handling */
+		jal	do_IRQ
 		j	ret_from_irq
 
-ll_timer_irq:
+ll_smp_irq:
 		li	a0, 5
 		move	a1, sp
+#ifdef CONFIG_SMP
+		jal	jaguar_mailbox_irq
+#else
 		jal	do_IRQ
+#endif
 		j	ret_from_irq
 
-ll_phy0_irq:
+ll_ht_irq:
 		li	a0, 6
 		move	a1, sp
-		jal	do_IRQ
-		j	ret_from_irq	
-
-ll_phy1_irq:
-		li	a0, 7
-		move	a1, sp
-		jal	do_IRQ
+		jal	ll_ht_smp_irq_handler
 		j	ret_from_irq
 
-ll_phy2_irq:
-		li	a0, 8
+ll_timer_irq:
+		li	a0, 7
 		move	a1, sp
 		jal	do_IRQ
 		j	ret_from_irq
--- diff/arch/mips/pmc-sierra/yosemite/irq.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -41,207 +41,116 @@
 #include <asm/bootinfo.h>
 #include <asm/io.h>
 #include <asm/irq.h>
+#include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
 #include <asm/system.h>
+#include <asm/titan_dep.h>
 
 /* Hypertransport specific */
-#define IRQ_STATUS_REG_CPU0     0xbb001b30 	/* INT# 3 status register on CPU 0*/
-#define	IRQ_STATUS_REG_CPU1	0xbb002b30	/* INT# 3 status register on CPU 1*/
-#define IRQ_ACK_BITS            0x00000000 	/* Ack bits */
-#define IRQ_CLEAR_REG_CPU0      0xbb002b3c 	/* IRQ clear register on CPU 0*/
-#define IRQ_CLEAR_REG_CPU0      0xbb002b3c      /* IRQ clear register on CPU 1*/
-
-#define HYPERTRANSPORT_EOI      0xbb0006E0 	/* End of Interrupt */
-#define HYPERTRANSPORT_INTA     0x78    	/* INTA# */
-#define HYPERTRANSPORT_INTB     0x79    	/* INTB# */
-#define HYPERTRANSPORT_INTC     0x7a    	/* INTC# */
-#define HYPERTRANSPORT_INTD     0x7b    	/* INTD# */
-
-#define read_32bit_cp0_set1_register(source)                    \
-({ int __res;                                                   \
-        __asm__ __volatile__(                                   \
-        ".set\tpush\n\t"                                        \
-        ".set\treorder\n\t"                                     \
-        "cfc0\t%0,"STR(source)"\n\t"                            \
-        ".set\tpop"                                             \
-        : "=r" (__res));                                        \
-        __res;})
-
-#define write_32bit_cp0_set1_register(register,value)           \
-        __asm__ __volatile__(                                   \
-        "ctc0\t%0,"STR(register)"\n\t"                          \
-        "nop"                                                   \
-        : : "r" (value));
+#define IRQ_ACK_BITS            0x00000000	/* Ack bits */
 
-static spinlock_t irq_lock = SPIN_LOCK_UNLOCKED;
-
-/* Function for careful CP0 interrupt mask access */
-static inline void modify_cp0_intmask(unsigned clr_mask_in, unsigned set_mask_in)
-{
-        unsigned long status;
-        unsigned clr_mask;
-        unsigned set_mask;
-
-        /* do the low 8 bits first */
-        clr_mask = 0xff & clr_mask_in;
-        set_mask = 0xff & set_mask_in;
-        status = read_c0_status();
-        status &= ~((clr_mask & 0xFF) << 8);
-        status |= (set_mask & 0xFF) << 8 | 0x0000FF00;
-        write_c0_status(status);
-
-        /* do the high 8 bits */
-        clr_mask = 0xff & (clr_mask_in >> 8);
-        set_mask = 0xff & (set_mask_in >> 8);
-        status = read_32bit_cp0_set1_register(CP0_S1_INTCONTROL);
-        status &= ~((clr_mask & 0xFF) << 8);
-        status |= (set_mask & 0xFF) << 8;
-        write_32bit_cp0_set1_register(CP0_S1_INTCONTROL, status);
-}
-
-static inline void mask_irq(unsigned int irq)
-{
-        modify_cp0_intmask(irq, 0);
-}
-
-static inline void unmask_irq(unsigned int irq)
-{
-        modify_cp0_intmask(0, irq);
-}
-
-static void enable_rm9000_irq(unsigned int irq)
-{
-        unsigned long flags;
-
-        spin_lock_irqsave(&irq_lock, flags);
-        unmask_irq(1 << (irq-1));
-        spin_unlock_irqrestore(&irq_lock, flags);
-}
-
-static unsigned int startup_rm9000_irq(unsigned int irq)
-{
-        enable_rm9000_irq(irq);
-
-        return 0;                               /* never anything pending */
-}
-
-static void disable_rm9000_irq(unsigned int irq)
-{
-        unsigned long flags;
-
-        spin_lock_irqsave(&irq_lock, flags);
-        mask_irq(1 << (irq-1));
-        spin_unlock_irqrestore(&irq_lock, flags);
-}
-
-#define shutdown_rm9000_irq disable_rm9000_irq
-
-static void mask_and_ack_rm9000_irq(unsigned int irq)
-{
-        mask_irq(1 << (irq-1));
-}
-
-static void end_rm9000_irq(unsigned int irq)
-{
-        if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
-                unmask_irq(1 << (irq-1));
-}
-
-static struct hw_interrupt_type rm9000_hpcdma_irq_type = {
-        "RM9000",
-        startup_rm9000_irq,
-        shutdown_rm9000_irq,
-        enable_rm9000_irq,
-        disable_rm9000_irq,
-        mask_and_ack_rm9000_irq,
-        end_rm9000_irq,
-        NULL
-};
+#define HYPERTRANSPORT_INTA     0x78		/* INTA# */
+#define HYPERTRANSPORT_INTB     0x79		/* INTB# */
+#define HYPERTRANSPORT_INTC     0x7a		/* INTC# */
+#define HYPERTRANSPORT_INTD     0x7b		/* INTD# */
 
 extern asmlinkage void titan_handle_int(void);
 extern void jaguar_mailbox_irq(struct pt_regs *);
 
 /* 
- * Handle hypertransport & SMP interrupts. The interrupt lines are scarce. For interprocessor
- * interrupts, the best thing to do is to use the INTMSG register. We use the same external
- * interrupt line, i.e. INTB3 and monitor another status bit
+ * Handle hypertransport & SMP interrupts. The interrupt lines are scarce.
+ * For interprocessor interrupts, the best thing to do is to use the INTMSG
+ * register. We use the same external interrupt line, i.e. INTB3 and monitor
+ * another status bit
  */
 asmlinkage void ll_ht_smp_irq_handler(int irq, struct pt_regs *regs)
 {
-        u32 status;
-        status = *(volatile uint32_t *)(IRQ_STATUS_REG_CPU0);
+        u32 status = OCD_READ(RM9000x2_OCD_INTP0STATUS4);
 
 	/* Ack all the bits that correspond to the interrupt sources */
 	if (status != 0)
-	        *(volatile uint32_t *)(IRQ_STATUS_REG_CPU0) = IRQ_ACK_BITS;
+	        OCD_WRITE(RM9000x2_OCD_INTP0STATUS4, IRQ_ACK_BITS);
 
-	status = *(volatile uint32_t *)(IRQ_STATUS_REG_CPU1);
+	status = OCD_READ(RM9000x2_OCD_INTP1STATUS4);
 	if (status != 0)
-                *(volatile uint32_t *)(IRQ_STATUS_REG_CPU1) = IRQ_ACK_BITS;
+                OCD_WRITE(RM9000x2_OCD_INTP1STATUS4, IRQ_ACK_BITS);
 
-#ifdef CONFIG_SMP
-	if (status == 0x2) {
-		/* This is an SMP IPI sent from one core to another */
-		jaguar_mailbox_irq(regs);
-		goto done;
-	}
-#endif
-	
 #ifdef CONFIG_HT_LEVEL_TRIGGER
-        /*
-         * Level Trigger Mode only. Send the HT EOI message back to the source.
-         */
-        switch (status) {
-                case 0x1000000:
-                        *(volatile uint32_t *)(HYPERTRANSPORT_EOI) = HYPERTRANSPORT_INTA;
-                        break;
-                case 0x2000000:
-                        *(volatile uint32_t *)(HYPERTRANSPORT_EOI) = HYPERTRANSPORT_INTB;
-                        break;
-                case 0x4000000:
-                        *(volatile uint32_t *)(HYPERTRANSPORT_EOI) = HYPERTRANSPORT_INTC;
-                        break;
-                case 0x8000000:
-                        *(volatile uint32_t *)(HYPERTRANSPORT_EOI) = HYPERTRANSPORT_INTD;
-                        break;
-                case 0x0000001:
-                        /* PLX */
-                        *(volatile uint32_t *)(HYPERTRANSPORT_EOI) = 0x20;
-                        *(volatile uint32_t *)(IRQ_CLEAR_REG) = IRQ_ACK_BITS;
-                        break;
-                case 0xf000000:
-                        *(volatile uint32_t *)(HYPERTRANSPORT_EOI) = HYPERTRANSPORT_INTA;
-                        *(volatile uint32_t *)(HYPERTRANSPORT_EOI) = HYPERTRANSPORT_INTB;
-                        *(volatile uint32_t *)(HYPERTRANSPORT_EOI) = HYPERTRANSPORT_INTC;
-                        *(volatile uint32_t *)(HYPERTRANSPORT_EOI) = HYPERTRANSPORT_INTD;
-                        break;
-        }
+	/*
+	 * Level Trigger Mode only. Send the HT EOI message back to the source.
+	 */
+	switch (status) {
+	case 0x1000000:
+		OCD_WRITE(RM9000x2_OCD_HTEOI, HYPERTRANSPORT_INTA);
+		break;
+	case 0x2000000:
+		OCD_WRITE(RM9000x2_OCD_HTEOI, HYPERTRANSPORT_INTB);
+		break;
+	case 0x4000000:
+		OCD_WRITE(RM9000x2_OCD_HTEOI, HYPERTRANSPORT_INTC);
+		break;
+	case 0x8000000:
+		OCD_WRITE(RM9000x2_OCD_HTEOI, HYPERTRANSPORT_INTD);
+		break;
+	case 0x0000001:
+		/* PLX */
+		OCD_WRITE(RM9000x2_OCD_HTEOI, 0x20);
+		OCD_WRITE(IRQ_CLEAR_REG, IRQ_ACK_BITS);
+		break;
+	case 0xf000000:
+		OCD_WRITE(RM9000x2_OCD_HTEOI, HYPERTRANSPORT_INTA);
+		OCD_WRITE(RM9000x2_OCD_HTEOI, HYPERTRANSPORT_INTB);
+		OCD_WRITE(RM9000x2_OCD_HTEOI, HYPERTRANSPORT_INTC);
+		OCD_WRITE(RM9000x2_OCD_HTEOI, HYPERTRANSPORT_INTD);
+		break;
+	}
 #endif /* CONFIG_HT_LEVEL_TRIGGER */
 
-done:
-	if (status != 0x2)
-		/* Not for SMP */
-		do_IRQ(irq, regs);	
+	do_IRQ(irq, regs);
 }
 
+#ifdef CONFIG_KGDB
+extern void init_second_port(void);
+extern void breakpoint(void);
+extern void set_debug_traps(void);
+#endif
+
 /*
  * Initialize the next level interrupt handler
  */
 void __init init_IRQ(void)
 {
-	int	i;
-
-	clear_c0_status(ST0_IM | ST0_BEV);
-	__cli();
+	clear_c0_status(ST0_IM);
 
 	set_except_vector(0, titan_handle_int);
 	init_generic_irq();
+	mips_cpu_irq_init(0);
+	rm7k_cpu_irq_init(8);
 
-	for (i = 0; i < 13; i++) {
-                irq_desc[i].status      = IRQ_DISABLED;
-                irq_desc[i].action      = 0;
-                irq_desc[i].depth       = 1;
-                irq_desc[i].handler     = &rm9000_hpcdma_irq_type;
-        }
+#ifdef CONFIG_KGDB
+	/* At this point, initialize the second serial port */
+	init_second_port();
+	printk("Start kgdb ... \n");
+	set_debug_traps();
+	breakpoint();
+#endif
+
+#ifdef CONFIG_GDB_CONSOLE
+	register_gdb_console();
+#endif
 }
 
+#ifdef CONFIG_KGDB
+/*
+ * The 16550 DUART has two ports, but is allocated one IRQ
+ * for the serial console. Hence, a generic framework for
+ * serial IRQ routing in place. Currently, just calls the
+ * do_IRQ fuction. But, going in the future, need to check
+ * DUART registers for channel A and B, then decide the
+ * appropriate action
+ */
+asmlinkage void yosemite_kgdb_irq(int irq, struct pt_regs *regs)
+{
+	do_IRQ(irq, regs);
+}
+#endif
--- diff/arch/mips/pmc-sierra/yosemite/prom.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/prom.c	2004-07-01 21:32:33.000000000 +0100
@@ -7,55 +7,44 @@
  * Copyright (C) 2003 PMC-Sierra Inc.
  * Author: Manish Lachwani (lachwani@pmc-sierra.com)
  */
-
+#include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
+#include <linux/delay.h>
+#include <linux/smp.h>
+
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 #include <asm/reboot.h>
 #include <asm/system.h>
-#include <linux/delay.h>
-#include <linux/smp.h>
 #include <asm/bootinfo.h>
+#include <asm/pmon.h>
 
 #include "setup.h"
 
-/* Call Vectors */
-struct callvectors {
-        int     (*open) (char*, int, int);
-        int     (*close) (int);
-        int     (*read) (int, void*, int);
-        int     (*write) (int, void*, int);
-        off_t   (*lseek) (int, off_t, int);
-        int     (*printf) (const char*, ...);
-        void    (*cacheflush) (void);
-        char*   (*gets) (char*);
-};
-
-struct callvectors* debug_vectors;
+struct callvectors *debug_vectors;
 
 extern unsigned long yosemite_base;
 extern unsigned long cpu_clock;
-unsigned char titan_ge_mac_addr_base[6];
 
 const char *get_system_type(void)
 {
-        return "PMC-Sierra Yosemite";
+	return "PMC-Sierra Yosemite";
 }
 
-static void prom_cpu0_exit(void)
+static void prom_cpu0_exit(void *arg)
 {
-	void	*nvram = YOSEMITE_NVRAM_BASE_ADDR;
-	
+	void *nvram = (void *) YOSEMITE_NVRAM_BASE_ADDR;
+
 	/* Ask the NVRAM/RTC/watchdog chip to assert reset in 1/16 second */
-        writeb(0x84, nvram + 0xff7);
+	writeb(0x84, nvram + 0xff7);
 
-        /* wait for the watchdog to go off */
-        mdelay(100+(1000/16));
+	/* wait for the watchdog to go off */
+	mdelay(100 + (1000 / 16));
 
-        /* if the watchdog fails for some reason, let people know */
-        printk(KERN_NOTICE "Watchdog reset failed\n");
+	/* if the watchdog fails for some reason, let people know */
+	printk(KERN_NOTICE "Watchdog reset failed\n");
 }
 
 /*
@@ -68,78 +57,73 @@
 		/* CPU 1 */
 		smp_call_function(prom_cpu0_exit, NULL, 1, 1);
 #endif
-	prom_cpu0_exit;
-}
-
-/*
- * Get the MAC address from the EEPROM using the I2C protocol
- */
-void get_mac_address(char dest[6])
-{
-	/* Use the I2C command code in the i2c-yosemite */
+	prom_cpu0_exit(NULL);
 }
 
 /*
- * Halt the system 
+ * Halt the system
  */
 static void prom_halt(void)
 {
 	printk(KERN_NOTICE "\n** You can safely turn off the power\n");
 	while (1)
-                __asm__(".set\tmips3\n\t"
-                        "wait\n\t"
-                        ".set\tmips0");
+		__asm__(".set\tmips3\n\t" "wait\n\t" ".set\tmips0");
 }
 
 /*
  * Init routine which accepts the variables from PMON
  */
-__init prom_init(int argc, char **arg, char **env, struct callvectors *cv)
+void __init prom_init(void)
 {
-	int	i = 0;
+	int argc = fw_arg0;
+	char **arg = (char **) fw_arg1;
+	char **env = (char **) fw_arg2;
+	struct callvectors *cv = (struct callvectors *) fw_arg3;
+	int i = 0;
 
 	/* Callbacks for halt, restart */
-	_machine_restart = (void (*)(char *))prom_exit;	
+	_machine_restart = (void (*)(char *)) prom_exit;
 	_machine_halt = prom_halt;
 	_machine_power_off = prom_halt;
 
-#ifdef CONFIG_MIPS64
-
-	/* Do nothing for the 64-bit for now. Just implement for the 32-bit */
-
-#else /* CONFIG_MIPS64 */
+#ifdef CONFIG_MIPS32
 
 	debug_vectors = cv;
 	arcs_cmdline[0] = '\0';
 
 	/* Get the boot parameters */
 	for (i = 1; i < argc; i++) {
-                if (strlen(arcs_cmdline) + strlen(arg[i] + 1) >= sizeof(arcs_cmdline))
-                        break;
+		if (strlen(arcs_cmdline) + strlen(arg[i] + 1) >=
+		    sizeof(arcs_cmdline))
+			break;
 
 		strcat(arcs_cmdline, arg[i]);
 		strcat(arcs_cmdline, " ");
 	}
 
 	while (*env) {
-		if (strncmp("ocd_base", *env, strlen("ocd_base")) == 0) 
-			yosemite_base = simple_strtol(*env + strlen("ocd_base="),
-							NULL, 16);
-
-		if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0) 
-			cpu_clock = simple_strtol(*env + strlen("cpuclock="),
-							NULL, 10);
-		
+		if (strncmp("ocd_base", *env, strlen("ocd_base")) == 0)
+			yosemite_base =
+			    simple_strtol(*env + strlen("ocd_base="), NULL,
+					  16);
+
+		if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0)
+			cpu_clock =
+			    simple_strtol(*env + strlen("cpuclock="), NULL,
+					  10);
+
 		env++;
 	}
+#endif /* CONFIG_MIPS32 */
+
+#ifdef CONFIG_MIPS64
+
+	/* Do nothing for the 64-bit for now. Just implement for the 32-bit */
+
 #endif /* CONFIG_MIPS64 */
 
 	mips_machgroup = MACH_GROUP_TITAN;
 	mips_machtype = MACH_TITAN_YOSEMITE;
-
-	get_mac_address(titan_ge_mac_addr_base);
-
-	debug_vectors->printf("Booting Linux kernel...\n");
 }
 
 void __init prom_free_prom_memory(void)
@@ -149,41 +133,3 @@
 void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
 {
 }
-
-extern void asmlinkage smp_bootstrap(void);
-
-/*
- * SMP support
- */
-int prom_setup_smp(void)
-{
-        int     num_cpus = 2;
-
-        /*
-         * We know that the RM9000 on the Jaguar ATX board has 2 cores. Hence, this
-         * can be hardcoded for now.
-         */
-        return num_cpus;
-}
-
-int prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp)
-{
-        /* Clear the semaphore */
-        *(volatile uint32_t *)(0xbb000a68) = 0x80000000;
-
-        return 1;
-}
-
-void prom_init_secondary(void)
-{
-        clear_c0_config(CONF_CM_CMASK);
-        set_c0_config(0x2);
-
-        clear_c0_status(ST0_IM);
-        set_c0_status(0x1ffff);
-}
-
-void prom_smp_finish(void)
-{
-}
-	
--- diff/arch/mips/pmc-sierra/yosemite/setup.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,6 +1,4 @@
 /*
- *  arch/mips/pmc-sierra/yosemite/setup.c
- *
  *  Copyright (C) 2003 PMC-Sierra Inc.
  *  Author: Manish Lachwani (lachwani@pmc-sierra.com)
  *
@@ -24,19 +22,18 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  */
-
+#include <linux/bcd.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
-#include <linux/mc146818rtc.h>
 #include <linux/mm.h>
+#include <linux/bootmem.h>
 #include <linux/swap.h>
 #include <linux/ioport.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
-#include <linux/pci.h>
 #include <linux/timex.h>
-#include <linux/vmalloc.h>
+
 #include <asm/time.h>
 #include <asm/bootinfo.h>
 #include <asm/page.h>
@@ -46,36 +43,46 @@
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 #include <asm/reboot.h>
-#include <linux/version.h>
-#include <linux/bootmem.h>
-#include <linux/blk.h>
+#include <asm/pci_channel.h>
+#include <asm/serial.h>
+#include <linux/termios.h>
+#include <linux/tty.h>
+#include <linux/serial.h>
+#include <linux/serial_core.h>
+#include <asm/titan_dep.h>
 
 #include "setup.h"
 
+unsigned char titan_ge_mac_addr_base[6] = {
+	0x00, 0x03, 0xcc, 0x1d, 0x22, 0x00
+};
+
 unsigned long cpu_clock;
 unsigned long yosemite_base;
 
-void __init bus_error_init(void) 
-{ 
-	/* Do nothing */ 
+void __init bus_error_init(void)
+{
+	/* Do nothing */
 }
 
 unsigned long m48t37y_get_time(void)
 {
-	unsigned char	*rtc_base = YOSEMITE_RTC_BASE;
-	unsigned int	year, month, day, hour, min, sec;
+	//unsigned char *rtc_base = (unsigned char *) YOSEMITE_RTC_BASE;
+	unsigned char *rtc_base = (unsigned char *) 0xfc000000UL;
+	unsigned int year, month, day, hour, min, sec;
+return;
 
 	/* Stop the update to the time */
 	rtc_base[0x7ff8] = 0x40;
 
-	year = CONV_BCD_TO_BIN(rtc_base[0x7fff]);
-	year += CONV_BCD_TO_BIN(rtc_base[0x7fff1]) * 100;
+	year = BCD2BIN(rtc_base[0x7fff]);
+	year += BCD2BIN(rtc_base[0x7fff1]) * 100;
 
-	month = CONV_BCD_TO_BIN(rtc_base[0x7ffe]);
-	day = CONV_BCD_TO_BIN(rtc_base[0x7ffd]);
-	hour = CONV_BCD_TO_BIN(rtc_base[0x7ffb]);
-	min = CONV_BCD_TO_BIN(rtc_base[0x7ffa]);
-	sec = CONV_BCD_TO_BIN(rtc_base[0x7ff9]);
+	month = BCD2BIN(rtc_base[0x7ffe]);
+	day = BCD2BIN(rtc_base[0x7ffd]);
+	hour = BCD2BIN(rtc_base[0x7ffb]);
+	min = BCD2BIN(rtc_base[0x7ffa]);
+	sec = BCD2BIN(rtc_base[0x7ff9]);
 
 	/* Start the update to the time again */
 	rtc_base[0x7ff8] = 0x00;
@@ -85,83 +92,119 @@
 
 int m48t37y_set_time(unsigned long sec)
 {
-	unsigned char   *rtc_base = YOSEMITE_RTC_BASE;
-        unsigned int    year, month, day, hour, min, sec;
-
-        struct rtc_time tm;
+	unsigned char *rtc_base = (unsigned char *) YOSEMITE_RTC_BASE;
+	struct rtc_time tm;
+return;
 
-        /* convert to a more useful format -- note months count from 0 */
-        to_tm(sec, &tm);
-        tm.tm_mon += 1;
+	/* convert to a more useful format -- note months count from 0 */
+	to_tm(sec, &tm);
+	tm.tm_mon += 1;
 
-        /* enable writing */
-        rtc_base[0x7ff8] = 0x80;
+	/* enable writing */
+	rtc_base[0x7ff8] = 0x80;
 
-        /* year */
-        rtc_base[0x7fff] = CONV_BIN_TO_BCD(tm.tm_year % 100);
-        rtc_base[0x7ff1] = CONV_BIN_TO_BCD(tm.tm_year / 100);
+	/* year */
+	rtc_base[0x7fff] = BIN2BCD(tm.tm_year % 100);
+	rtc_base[0x7ff1] = BIN2BCD(tm.tm_year / 100);
 
-        /* month */
-        rtc_base[0x7ffe] = CONV_BIN_TO_BCD(tm.tm_mon);
+	/* month */
+	rtc_base[0x7ffe] = BIN2BCD(tm.tm_mon);
 
-        /* day */
-        rtc_base[0x7ffd] = CONV_BIN_TO_BCD(tm.tm_mday);
+	/* day */
+	rtc_base[0x7ffd] = BIN2BCD(tm.tm_mday);
 
-        /* hour/min/sec */
-        rtc_base[0x7ffb] = CONV_BIN_TO_BCD(tm.tm_hour);
-        rtc_base[0x7ffa] = CONV_BIN_TO_BCD(tm.tm_min);
-        rtc_base[0x7ff9] = CONV_BIN_TO_BCD(tm.tm_sec);
+	/* hour/min/sec */
+	rtc_base[0x7ffb] = BIN2BCD(tm.tm_hour);
+	rtc_base[0x7ffa] = BIN2BCD(tm.tm_min);
+	rtc_base[0x7ff9] = BIN2BCD(tm.tm_sec);
 
-        /* day of week -- not really used, but let's keep it up-to-date */
-        rtc_base[0x7ffc] = CONV_BIN_TO_BCD(tm.tm_wday + 1);
+	/* day of week -- not really used, but let's keep it up-to-date */
+	rtc_base[0x7ffc] = BIN2BCD(tm.tm_wday + 1);
 
-        /* disable writing */
-        rtc_base[0x7ff8] = 0x00;
+	/* disable writing */
+	rtc_base[0x7ff8] = 0x00;
 
-        return 0;
+	return 0;
 }
 
 void yosemite_timer_setup(struct irqaction *irq)
 {
-	setup_irq(6, irq);
+	setup_irq(7, irq);
 }
 
 void yosemite_time_init(void)
 {
-	mips_counter_frequency = cpu_clock / 2;
 	board_timer_setup = yosemite_timer_setup;
+	mips_hpt_frequency = cpu_clock / 2;
 
 	rtc_get_time = m48t37y_get_time;
 	rtc_set_time = m48t37y_set_time;
 }
 
+unsigned long uart_base = 0xfd000000L;
+
+/* No other usable initialization hook than this ...  */
+extern void (*late_time_init)(void);
+
+unsigned long ocd_base;
+
+EXPORT_SYMBOL(ocd_base);
+
+/*
+ * Common setup before any secondaries are started
+ */
+
+#define TITAN_UART_CLK		3686400
+#define TITAN_SERIAL_BASE_BAUD	(TITAN_UART_CLK / 16)
+#define TITAN_SERIAL_IRQ	4
+#define TITAN_SERIAL_BASE	0xfd000008UL
+
+static void __init py_map_ocd(void)
+{
+        struct uart_port up;
+
+	/*
+	 * Not specifically interrupt stuff but in case of SMP core_send_ipi
+	 * needs this first so I'm mapping it here ...
+	 */
+	ocd_base = (unsigned long) ioremap(OCD_BASE, OCD_SIZE);
+	if (!ocd_base)
+		panic("Mapping OCD failed - game over.  Your score is 0.");
+
+	/*
+	 * Register to interrupt zero because we share the interrupt with
+	 * the serial driver which we don't properly support yet.
+	 */
+	memset(&up, 0, sizeof(up));
+	up.membase      = (unsigned char *) ioremap(TITAN_SERIAL_BASE, 8);
+	up.irq          = TITAN_SERIAL_IRQ;
+	up.uartclk      = TITAN_UART_CLK;
+	up.regshift     = 0;
+	up.iotype       = UPIO_MEM;
+	up.flags        = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
+	up.line         = 0;
+
+	if (early_serial_setup(&up))
+		printk(KERN_ERR "Early serial init of port 0 failed\n");
+}
+
 static int __init pmc_yosemite_setup(void)
 {
-	unsigned long	val = 0;
+	extern void pmon_smp_bootstrap(void);
 
-	printk("PMC-Sierra Yosemite Board Setup  \n");
 	board_time_init = yosemite_time_init;
+	late_time_init = py_map_ocd;
 
 	/* Add memory regions */
 	add_memory_region(0x00000000, 0x10000000, BOOT_MEM_RAM);
-	add_memory_region(0x10000000, 0x10000000, BOOT_MEM_RAM);
-
-	/* Setup the HT controller */
-	val = *(volatile uint32_t *)(HYPERTRANSPORT_CONFIG_REG);
-	val |= HYPERTRANSPORT_ENABLE;
-        *(volatile uint32_t *)(HYPERTRANSPORT_CONFIG_REG) = val;
-
-        /* Set the BAR. Shifted mode */
-        *(volatile uint32_t *)(HYPERTRANSPORT_BAR0_REG) = HYPERTRANSPORT_BAR0_ADDR;
-        *(volatile uint32_t *)(HYPERTRANSPORT_SIZE0_REG) = HYPERTRANSPORT_SIZE0;
-
-#ifdef CONFIG_PCI
-	ioport_resource.start = 0xe0000000;
-	ioport_resource.end   = 0xe0000000 + 0x20000000 - 1;
-	iomem_resource.start  = 0xc0000000;
-	iomem_resource.end    = 0xc0000000 + 0x20000000 - 1;
 
-	pci_scan_bus(0, &titan_pci_ops, NULL);
+#if 0 /* XXX Crash ...  */
+	OCD_WRITE(RM9000x2_OCD_HTSC,
+	          OCD_READ(RM9000x2_OCD_HTSC) | HYPERTRANSPORT_ENABLE);
+
+	/* Set the BAR. Shifted mode */
+	OCD_WRITE(RM9000x2_OCD_HTBAR0, HYPERTRANSPORT_BAR0_ADDR);
+	OCD_WRITE(RM9000x2_OCD_HTMASK0, HYPERTRANSPORT_SIZE0);
 #endif
 
 	return 0;
--- diff/arch/mips/pmc-sierra/yosemite/setup.h	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/setup.h	2004-07-01 21:32:33.000000000 +0100
@@ -9,27 +9,13 @@
  * Free Software Foundation;  either version 2 of the  License, or (at your
  * option) any later version.
  */
-
 #ifndef __SETUP_H__
 #define __SETUP_H__
 
-/* Real Time Clock base */
-#define	YOSEMITE_RTC_BASE
-#define CONV_BCD_TO_BIN(val)    (((val) & 0xf) + (((val) >> 4) * 10))
-#define CONV_BIN_TO_BCD(val)    (((val) % 10) + (((val) / 10) << 4))
-
 /* NVRAM Base */
 #define	YOSEMITE_NVRAM_BASE_ADDR	0xbb000678	/* XXX Need change */
 #define	YOSEMITE_RTC_BASE		0xbb000679	/* XXX Need change */
 
-/*
- * Hypertransport Specific 
- */
-#define HYPERTRANSPORT_CONFIG_REG       0xbb000604
-#define HYPERTRANSPORT_BAR0_REG         0xbb000610
-#define HYPERTRANSPORT_SIZE0_REG        0xbb000688
-#define HYPERTRANSPORT_BAR0_ATTR_REG    0xbb000680
-
 #define HYPERTRANSPORT_BAR0_ADDR        0x00000006
 #define HYPERTRANSPORT_SIZE0            0x0fffffff
 #define HYPERTRANSPORT_BAR0_ATTR        0x00002000
@@ -37,11 +23,9 @@
 #define HYPERTRANSPORT_ENABLE           0x6
 
 /*
- * EEPROM Size 
+ * EEPROM Size
  */
 #define	TITAN_ATMEL_24C32_SIZE		32768
 #define	TITAN_ATMEL_24C64_SIZE		65536
 
-
 #endif /* __SETUP_H__ */
-
--- diff/arch/mips/ramdisk/Makefile	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/ramdisk/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -12,7 +12,7 @@
 
 quiet_cmd_ramdisk = LD      $@
 define cmd_ramdisk
-	$(LD) -T $(src)/ld.script -b binary --oformat $(O_FORMAT) -o $@ $(img)
+	$(LD) $(LDFLAGS) -T $(src)/ld.script -b binary --oformat $(O_FORMAT) -o $@ $(img)
 endef
 
 $(obj)/ramdisk.o: $(img) $(src)/ld.script
--- diff/arch/mips/sgi-ip22/ip22-setup.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/sgi-ip22/ip22-setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -10,6 +10,7 @@
 #include <linux/kernel.h>
 #include <linux/kdev_t.h>
 #include <linux/types.h>
+#include <linux/module.h>
 #include <linux/console.h>
 #include <linux/sched.h>
 #include <linux/tty.h>
@@ -54,6 +55,8 @@
 	ArcEnterInteractiveMode();
 }
 
+EXPORT_SYMBOL(ip22_do_break);
+
 extern void ip22_be_init(void) __init;
 extern void ip22_time_init(void) __init;
 
--- diff/arch/mips/sgi-ip32/ip32-irq.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/sgi-ip32/ip32-irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -123,9 +123,9 @@
 				      struct pt_regs *regs);
 
 struct irqaction memerr_irq = { crime_memerr_intr, SA_INTERRUPT,
-				0, "CRIME memory error", NULL, NULL };
+			CPU_MASK_NONE, "CRIME memory error", NULL, NULL };
 struct irqaction cpuerr_irq = { crime_cpuerr_intr, SA_INTERRUPT,
-				0, "CRIME CPU error", NULL, NULL };
+			CPU_MASK_NONE, "CRIME CPU error", NULL, NULL };
 
 extern void ip32_handle_int(void);
 
--- diff/arch/mips/sibyte/sb1250/irq.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/sibyte/sb1250/irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -279,7 +279,7 @@
 static struct irqaction sb1250_dummy_action = {
 	.handler = sb1250_dummy_handler,
 	.flags   = 0,
-	.mask    = 0,
+	.mask    = CPU_MASK_NONE,
 	.name    = "sb1250-private",
 	.next    = NULL,
 	.dev_id  = 0
--- diff/arch/mips/tx4927/common/tx4927_irq.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/tx4927/common/tx4927_irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -172,7 +172,7 @@
 	.set_affinity	= NULL
 };
 
-#define TX4927_PIC_ACTION(s) { no_action, 0, 0, s, NULL, NULL }
+#define TX4927_PIC_ACTION(s) { no_action, 0, CPU_MASK_NONE, s, NULL, NULL }
 static struct irqaction tx4927_irq_pic_action =
 TX4927_PIC_ACTION(TX4927_PIC_NAME);
 
--- diff/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -337,8 +337,8 @@
 	return (sw_irq);
 }
 
-//#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, 0, 0, s, NULL, NULL }
-#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, SA_SHIRQ, 0, s, NULL, NULL }
+//#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, 0, CPU_MASK_NONE, s, NULL, NULL }
+#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, SA_SHIRQ, CPU_MASK_NONE, s, NULL, NULL }
 static struct irqaction toshiba_rbtx4927_irq_ioc_action =
 TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_IOC_NAME);
 #ifdef CONFIG_TOSHIBA_FPCIB0
--- diff/arch/mips/vr4181/common/irq.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr4181/common/irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -180,9 +180,9 @@
 extern void mips_cpu_irq_init(u32 irq_base);
 
 static struct irqaction cascade =
-	{ no_action, SA_INTERRUPT, 0, "cascade", NULL, NULL };
+	{ no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade", NULL, NULL };
 static struct irqaction reserved =
-	{ no_action, SA_INTERRUPT, 0, "cascade", NULL, NULL };
+	{ no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade", NULL, NULL };
 
 void __init init_IRQ(void)
 {
--- diff/arch/mips/vr41xx/common/bcu.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/common/bcu.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,34 +1,23 @@
 /*
- * FILE NAME
- *	arch/mips/vr41xx/common/bcu.c
+ *  bcu.c, Bus Control Unit routines for the NEC VR4100 series.
  *
- * BRIEF MODULE DESCRIPTION
- *	Bus Control Unit routines for the NEC VR4100 series.
- *
- * Author: Yoichi Yuasa
- *         yyuasa@mvista.com or source@mvista.com
- *
- * Copyright 2002 MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute it and/or modify it
- *  under the terms of the GNU General Public License as published by the
- *  Free Software Foundation; either version 2 of the License, or (at your
- *  option) any later version.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *  Copyright (C) 2002  MontaVista Software Inc.
+ *    Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com>
+ *  Copyright (C) 2003-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *
+ *  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
  */
 /*
  * Changes:
@@ -40,12 +29,16 @@
  *  - Added support for NEC VR4133.
  */
 #include <linux/init.h>
+#include <linux/ioport.h>
 #include <linux/smp.h>
 #include <linux/types.h>
 
 #include <asm/cpu.h>
 #include <asm/io.h>
 
+#define IO_MEM_RESOURCE_START	0UL
+#define IO_MEM_RESOURCE_END	0x1fffffffUL
+
 #define CLKSPEEDREG_TYPE1	KSEG1ADDR(0x0b000014)
 #define CLKSPEEDREG_TYPE2	KSEG1ADDR(0x0f000014)
  #define CLKSP(x)		((x) & 0x001f)
@@ -213,7 +206,7 @@
 	return tclock;
 }
 
-void __init vr41xx_bcu_init(void)
+static int __init vr41xx_bcu_init(void)
 {
 	unsigned long pclock;
 	uint16_t clkspeed;
@@ -223,4 +216,11 @@
 	pclock = calculate_pclock(clkspeed);
 	vr41xx_vtclock = calculate_vtclock(clkspeed, pclock);
 	vr41xx_tclock = calculate_tclock(clkspeed, pclock, vr41xx_vtclock);
+
+	iomem_resource.start = IO_MEM_RESOURCE_START;
+	iomem_resource.end = IO_MEM_RESOURCE_END;
+
+	return 0;
 }
+
+early_initcall(vr41xx_bcu_init);
--- diff/arch/mips/vr41xx/common/cmu.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/common/cmu.c	2004-07-01 21:32:33.000000000 +0100
@@ -200,7 +200,7 @@
 	spin_unlock_irq(&cmu_lock);
 }
 
-void __init vr41xx_cmu_init(void)
+static int __init vr41xx_cmu_init(void)
 {
 	switch (current_cpu_data.cputype) {
         case CPU_VR4111:
@@ -223,4 +223,8 @@
 	cmuclkmsk = read_cmuclkmsk();
 
 	spin_lock_init(&cmu_lock);
+
+	return 0;
 }
+
+early_initcall(vr41xx_cmu_init);
--- diff/arch/mips/vr41xx/common/giu.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/common/giu.c	2004-07-01 21:32:33.000000000 +0100
@@ -28,10 +28,12 @@
  *  - Added support for NEC VR4133.
  *  - Removed board_irq_init.
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/types.h>
 
@@ -64,6 +66,8 @@
 #define read_giuint(offset)		readw(giu_base + (offset))
 #define write_giuint(val, offset)	writew((val), giu_base + (offset))
 
+#define GIUINT_HIGH_OFFSET	16
+
 static inline uint16_t set_giuint(uint8_t offset, uint16_t set)
 {
 	uint16_t res;
@@ -86,35 +90,121 @@
 	return res;
 }
 
-void vr41xx_enable_giuint(int pin)
+static unsigned int startup_giuint_low_irq(unsigned int irq)
 {
-	if (pin < 16)
-		set_giuint(GIUINTENL, (uint16_t)1 << pin);
-	else
-		set_giuint(GIUINTENH, (uint16_t)1 << (pin - 16));
+	unsigned int pin;
+
+	pin = GIU_IRQ_TO_PIN(irq);
+	write_giuint((uint16_t)1 << pin, GIUINTSTATL);
+	set_giuint(GIUINTENL, (uint16_t)1 << pin);
+
+	return 0;
 }
 
-void vr41xx_disable_giuint(int pin)
+static void shutdown_giuint_low_irq(unsigned int irq)
 {
-	if (pin < 16)
-		clear_giuint(GIUINTENL, (uint16_t)1 << pin);
-	else
-		clear_giuint(GIUINTENH, (uint16_t)1 << (pin - 16));
+	clear_giuint(GIUINTENL, (uint16_t)1 << GIU_IRQ_TO_PIN(irq));
 }
 
-void vr41xx_clear_giuint(int pin)
+static void enable_giuint_low_irq(unsigned int irq)
 {
-	if (pin < 16)
-		write_giuint((uint16_t)1 << pin, GIUINTSTATL);
-	else
-		write_giuint((uint16_t)1 << (pin - 16), GIUINTSTATH);
+	set_giuint(GIUINTENL, (uint16_t)1 << GIU_IRQ_TO_PIN(irq));
+}
+
+#define disable_giuint_low_irq	shutdown_giuint_low_irq
+
+static void ack_giuint_low_irq(unsigned int irq)
+{
+	unsigned int pin;
+
+	pin = GIU_IRQ_TO_PIN(irq);
+	clear_giuint(GIUINTENL, (uint16_t)1 << pin);
+	write_giuint((uint16_t)1 << pin, GIUINTSTATL);
+}
+
+static void end_giuint_low_irq(unsigned int irq)
+{
+	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
+		set_giuint(GIUINTENL, (uint16_t)1 << GIU_IRQ_TO_PIN(irq));
+}
+
+static struct hw_interrupt_type giuint_low_irq_type = {
+	.typename	= "GIUINTL",
+	.startup	= startup_giuint_low_irq,
+	.shutdown	= shutdown_giuint_low_irq,
+	.enable		= enable_giuint_low_irq,
+	.disable	= disable_giuint_low_irq,
+	.ack		= ack_giuint_low_irq,
+	.end		= end_giuint_low_irq,
+};
+
+static unsigned int startup_giuint_high_irq(unsigned int irq)
+{
+	unsigned int pin;
+
+	pin = GIU_IRQ_TO_PIN(irq - GIUINT_HIGH_OFFSET);
+	write_giuint((uint16_t)1 << pin, GIUINTSTATH);
+	set_giuint(GIUINTENH, (uint16_t)1 << pin);
+
+	return 0;
+}
+
+static void shutdown_giuint_high_irq(unsigned int irq)
+{
+	clear_giuint(GIUINTENH, (uint16_t)1 << GIU_IRQ_TO_PIN(irq - GIUINT_HIGH_OFFSET));
+}
+
+static void enable_giuint_high_irq(unsigned int irq)
+{
+	set_giuint(GIUINTENH, (uint16_t)1 << GIU_IRQ_TO_PIN(irq - GIUINT_HIGH_OFFSET));
+}
+
+#define disable_giuint_high_irq	shutdown_giuint_high_irq
+
+static void ack_giuint_high_irq(unsigned int irq)
+{
+	unsigned int pin;
+
+	pin = GIU_IRQ_TO_PIN(irq - GIUINT_HIGH_OFFSET);
+	clear_giuint(GIUINTENH, (uint16_t)1 << pin);
+	write_giuint((uint16_t)1 << pin, GIUINTSTATH);
+}
+
+static void end_giuint_high_irq(unsigned int irq)
+{
+	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
+		set_giuint(GIUINTENH, (uint16_t)1 << GIU_IRQ_TO_PIN(irq - GIUINT_HIGH_OFFSET));
+}
+
+static struct hw_interrupt_type giuint_high_irq_type = {
+	.typename	= "GIUINTH",
+	.startup	= startup_giuint_high_irq,
+	.shutdown	= shutdown_giuint_high_irq,
+	.enable		= enable_giuint_high_irq,
+	.disable	= disable_giuint_high_irq,
+	.ack		= ack_giuint_high_irq,
+	.end		= end_giuint_high_irq,
+};
+
+void __init init_vr41xx_giuint_irq(void)
+{
+	int i;
+
+	for (i = GIU_IRQ_BASE; i <= GIU_IRQ_LAST; i++) {
+		if (i < (GIU_IRQ_BASE + GIUINT_HIGH_OFFSET))
+			irq_desc[i].handler = &giuint_low_irq_type;
+		else
+			irq_desc[i].handler = &giuint_high_irq_type;
+	}
+
+	setup_irq(GIUINT_CASCADE_IRQ, &giu_cascade);
 }
 
 void vr41xx_set_irq_trigger(int pin, int trigger, int hold)
 {
 	uint16_t mask;
 
-	if (pin < 16) {
+	if (pin < GIUINT_HIGH_OFFSET) {
 		mask = (uint16_t)1 << pin;
 		if (trigger != TRIGGER_LEVEL) {
         		set_giuint(GIUINTTYPL, mask);
@@ -142,8 +232,9 @@
 			clear_giuint(GIUINTTYPL, mask);
 			clear_giuint(GIUINTHTSELL, mask);
 		}
+		write_giuint(mask, GIUINTSTATL);
 	} else {
-		mask = (uint16_t)1 << (pin - 16);
+		mask = (uint16_t)1 << (pin - GIUINT_HIGH_OFFSET);
 		if (trigger != TRIGGER_LEVEL) {
 			set_giuint(GIUINTTYPH, mask);
 			if (hold == SIGNAL_HOLD)
@@ -170,32 +261,35 @@
 			clear_giuint(GIUINTTYPH, mask);
 			clear_giuint(GIUINTHTSELH, mask);
 		}
+		write_giuint(mask, GIUINTSTATH);
 	}
-
-	vr41xx_clear_giuint(pin);
 }
 
+EXPORT_SYMBOL(vr41xx_set_irq_trigger);
+
 void vr41xx_set_irq_level(int pin, int level)
 {
 	uint16_t mask;
 
-	if (pin < 16) {
+	if (pin < GIUINT_HIGH_OFFSET) {
 		mask = (uint16_t)1 << pin;
 		if (level == LEVEL_HIGH)
 			set_giuint(GIUINTALSELL, mask);
 		else
 			clear_giuint(GIUINTALSELL, mask);
+		write_giuint(mask, GIUINTSTATL);
 	} else {
-		mask = (uint16_t)1 << (pin - 16);
+		mask = (uint16_t)1 << (pin - GIUINT_HIGH_OFFSET);
 		if (level == LEVEL_HIGH)
 			set_giuint(GIUINTALSELH, mask);
 		else
 			clear_giuint(GIUINTALSELH, mask);
+		write_giuint(mask, GIUINTSTATH);
 	}
-
-	vr41xx_clear_giuint(pin);
 }
 
+EXPORT_SYMBOL(vr41xx_set_irq_level);
+
 #define GIUINT_NR_IRQS		32
 
 enum {
@@ -209,7 +303,7 @@
 };
 
 static struct vr41xx_giuint_cascade giuint_cascade[GIUINT_NR_IRQS];
-static struct irqaction giu_cascade = {no_action, 0, 0, "cascade", NULL, NULL};
+static struct irqaction giu_cascade = {no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
 
 static int no_irq_number(int irq)
 {
@@ -232,7 +326,7 @@
 	giuint_cascade[pin].get_irq_number = get_irq_number;
 
 	retval = setup_irq(irq, &giu_cascade);
-	if (retval) {
+	if (retval != 0) {
 		giuint_cascade[pin].flag = GIUINT_NO_CASCADE;
 		giuint_cascade[pin].get_irq_number = no_irq_number;
 	}
@@ -240,29 +334,89 @@
 	return retval;
 }
 
-unsigned int giuint_do_IRQ(int pin, struct pt_regs *regs)
+EXPORT_SYMBOL(vr41xx_cascade_irq);
+
+static inline int get_irq_pin_number(void)
+{
+	uint16_t pendl, pendh, maskl, maskh;
+	int i;
+
+	pendl = read_giuint(GIUINTSTATL);
+	pendh = read_giuint(GIUINTSTATH);
+	maskl = read_giuint(GIUINTENL);
+	maskh = read_giuint(GIUINTENH);
+
+	maskl &= pendl;
+	maskh &= pendh;
+
+	if (maskl) {
+		for (i = 0; i < 16; i++) {
+			if (maskl & ((uint16_t)1 << i))
+				return i;
+		}
+	} else if (maskh) {
+		for (i = 0; i < 16; i++) {
+			if (maskh & ((uint16_t)1 << i))
+				return i + GIUINT_HIGH_OFFSET;
+		}
+	}
+
+	printk(KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n",
+	       maskl, pendl, maskh, pendh);
+
+	atomic_inc(&irq_err_count);
+
+	return -1;
+}
+
+static inline void ack_giuint_irq(int pin)
+{
+	if (pin < GIUINT_HIGH_OFFSET) {
+		clear_giuint(GIUINTENL, (uint16_t)1 << pin);
+		write_giuint((uint16_t)1 << pin, GIUINTSTATL);
+	} else {
+		pin -= GIUINT_HIGH_OFFSET;
+		clear_giuint(GIUINTENH, (uint16_t)1 << pin);
+		write_giuint((uint16_t)1 << pin, GIUINTSTATH);
+	}
+}
+
+static inline void end_giuint_irq(int pin)
+{
+	if (pin < GIUINT_HIGH_OFFSET)
+		set_giuint(GIUINTENL, (uint16_t)1 << pin);
+	else
+		set_giuint(GIUINTENH, (uint16_t)1 << (pin - GIUINT_HIGH_OFFSET));
+}
+
+void giuint_irq_dispatch(struct pt_regs *regs)
 {
 	struct vr41xx_giuint_cascade *cascade;
-	unsigned int retval = 0;
-	int giuint_irq, cascade_irq;
+	unsigned int giuint_irq;
+	int pin;
+
+	pin = get_irq_pin_number();
+	if (pin < 0)
+		return;
 
 	disable_irq(GIUINT_CASCADE_IRQ);
+
 	cascade = &giuint_cascade[pin];
 	giuint_irq = GIU_IRQ(pin);
 	if (cascade->flag == GIUINT_CASCADE) {
-		cascade_irq = cascade->get_irq_number(giuint_irq);
-		disable_irq(giuint_irq);
-		if (cascade_irq > 0)
-			retval = do_IRQ(cascade_irq, regs);
-		enable_irq(giuint_irq);
-	} else
-		retval = do_IRQ(giuint_irq, regs);
-	enable_irq(GIUINT_CASCADE_IRQ);
+		int irq = cascade->get_irq_number(giuint_irq);
+		ack_giuint_irq(pin);
+		if (irq >= 0)
+			do_IRQ(irq, regs);
+		end_giuint_irq(pin);
+	} else {
+		do_IRQ(giuint_irq, regs);
+	}
 
-	return retval;
+	enable_irq(GIUINT_CASCADE_IRQ);
 }
 
-void __init vr41xx_giuint_init(void)
+static int __init vr41xx_giu_init(void)
 {
 	int i;
 
@@ -277,16 +431,20 @@
 		giu_base = GIUIOSELL_TYPE2;
 		break;
 	default:
-		panic("GIU: Unexpected CPU of NEC VR4100 series");
-		break;
+		printk(KERN_ERR "GIU: Unexpected CPU of NEC VR4100 series\n");
+		return -EINVAL;
 	}
 
 	for (i = 0; i < GIUINT_NR_IRQS; i++) {
-                vr41xx_disable_giuint(i);
+		if (i < GIUINT_HIGH_OFFSET)
+			clear_giuint(GIUINTENL, (uint16_t)1 << i);
+		else
+			clear_giuint(GIUINTENH, (uint16_t)1 << (i - GIUINT_HIGH_OFFSET));
 		giuint_cascade[i].flag = GIUINT_NO_CASCADE;
 		giuint_cascade[i].get_irq_number = no_irq_number;
 	}
 
-	if (setup_irq(GIUINT_CASCADE_IRQ, &giu_cascade))
-		printk("GIUINT: Can not cascade IRQ %d.\n", GIUINT_CASCADE_IRQ);
+	return 0;
 }
+
+early_initcall(vr41xx_giu_init);
--- diff/arch/mips/vr41xx/common/icu.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/vr41xx/common/icu.c	2004-07-01 21:32:33.000000000 +0100
@@ -28,10 +28,12 @@
  *  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *  - Coped with INTASSIGN of NEC VR4133.
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/types.h>
 
@@ -43,11 +45,8 @@
 
 extern asmlinkage void vr41xx_handle_interrupt(void);
 
-extern void vr41xx_giuint_init(void);
-extern void vr41xx_enable_giuint(int pin);
-extern void vr41xx_disable_giuint(int pin);
-extern void vr41xx_clear_giuint(int pin);
-extern unsigned int giuint_do_IRQ(int pin, struct pt_regs *regs);
+extern void init_vr41xx_giuint_irq(void);
+extern void giuint_irq_dispatch(struct pt_regs *regs);
 
 static uint32_t icu1_base;
 static uint32_t icu2_base;
@@ -64,11 +63,17 @@
 #define SYSINT2REG_TYPE2	KSEG1ADDR(0x0f0000a0)
 
 #define SYSINT1REG	0x00
+#define PIUINTREG	0x02
 #define INTASSIGN0	0x04
 #define INTASSIGN1	0x06
 #define GIUINTLREG	0x08
+#define DSIUINTREG	0x0a
 #define MSYSINT1REG	0x0c
+#define MPIUINTREG	0x0e
+#define MAIUINTREG	0x10
+#define MKIUINTREG	0x12
 #define MGIUINTLREG	0x14
+#define MDSIUINTREG	0x16
 #define NMIREG		0x18
 #define SOFTREG		0x1a
 #define INTASSIGN2	0x1c
@@ -76,11 +81,21 @@
 
 #define SYSINT2REG	0x00
 #define GIUINTHREG	0x02
+#define FIRINTREG	0x04
 #define MSYSINT2REG	0x06
 #define MGIUINTHREG	0x08
-
-#define MDSIUINTREG	KSEG1ADDR(0x0f000096)
- #define INTDSIU	0x0800
+#define MFIRINTREG	0x0a
+#define PCIINTREG	0x0c
+ #define PCIINT0	0x0001
+#define SCUINTREG	0x0e
+ #define SCUINT0	0x0001
+#define CSIINTREG	0x10
+#define MPCIINTREG	0x12
+#define MSCUINTREG	0x14
+#define MCSIINTREG	0x16
+#define BCUINTREG	0x18
+ #define BCUINTR	0x0001
+#define MBCUINTREG	0x1a
 
 #define SYSINT1_IRQ_TO_PIN(x)	((x) - SYSINT1_IRQ_BASE)	/* Pin 0-15 */
 #define SYSINT2_IRQ_TO_PIN(x)	((x) - SYSINT2_IRQ_BASE)	/* Pin 0-15 */
@@ -140,212 +155,298 @@
 
 /*=======================================================================*/
 
-void vr41xx_enable_dsiuint(void)
+void vr41xx_enable_piuint(uint16_t mask)
 {
-	writew(INTDSIU, MDSIUINTREG);
+	irq_desc_t *desc = irq_desc + PIU_IRQ;
+	unsigned long flags;
+	uint16_t val;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu1(MPIUINTREG);
+	val |= mask;
+	write_icu1(val, MPIUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-void vr41xx_disable_dsiuint(void)
+void vr41xx_disable_piuint(uint16_t mask)
 {
-	writew(0, MDSIUINTREG);
+	irq_desc_t *desc = irq_desc + PIU_IRQ;
+	unsigned long flags;
+	uint16_t val;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu1(MPIUINTREG);
+	val &= ~mask;
+	write_icu1(val, MPIUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-/*=======================================================================*/
+void vr41xx_enable_aiuint(uint16_t mask)
+{
+	irq_desc_t *desc = irq_desc + AIU_IRQ;
+	unsigned long flags;
+	uint16_t val;
 
-static void enable_sysint1_irq(unsigned int irq)
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu1(MAIUINTREG);
+	val |= mask;
+	write_icu1(val, MAIUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+void vr41xx_disable_aiuint(uint16_t mask)
 {
-	set_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq));
+	irq_desc_t *desc = irq_desc + AIU_IRQ;
+	unsigned long flags;
+	uint16_t val;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu1(MAIUINTREG);
+	val &= ~mask;
+	write_icu1(val, MAIUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-static void disable_sysint1_irq(unsigned int irq)
+void vr41xx_enable_kiuint(uint16_t mask)
 {
-	clear_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq));
+	irq_desc_t *desc = irq_desc + KIU_IRQ;
+	unsigned long flags;
+	uint16_t val;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu1(MKIUINTREG);
+	val |= mask;
+	write_icu1(val, MKIUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-static unsigned int startup_sysint1_irq(unsigned int irq)
+void vr41xx_disable_kiuint(uint16_t mask)
 {
-	set_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq));
+	irq_desc_t *desc = irq_desc + KIU_IRQ;
+	unsigned long flags;
+	uint16_t val;
 
-	return 0; /* never anything pending */
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu1(MKIUINTREG);
+	val &= ~mask;
+	write_icu1(val, MKIUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-#define shutdown_sysint1_irq	disable_sysint1_irq
-#define ack_sysint1_irq		disable_sysint1_irq
+void vr41xx_enable_dsiuint(uint16_t mask)
+{
+	irq_desc_t *desc = irq_desc + DSIU_IRQ;
+	unsigned long flags;
+	uint16_t val;
 
-static void end_sysint1_irq(unsigned int irq)
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu1(MDSIUINTREG);
+	val |= mask;
+	write_icu1(val, MDSIUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+void vr41xx_disable_dsiuint(uint16_t mask)
 {
-	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-		set_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq));
+	irq_desc_t *desc = irq_desc + DSIU_IRQ;
+	unsigned long flags;
+	uint16_t val;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu1(MDSIUINTREG);
+	val &= ~mask;
+	write_icu1(val, MDSIUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-static struct hw_interrupt_type sysint1_irq_type = {
-	.typename	= "SYSINT1",
-	.startup	= startup_sysint1_irq,
-	.shutdown	= shutdown_sysint1_irq,
-	.enable		= enable_sysint1_irq,
-	.disable	= disable_sysint1_irq,
-	.ack		= ack_sysint1_irq,
-	.end		= end_sysint1_irq,
-};
+void vr41xx_enable_firint(uint16_t mask)
+{
+	irq_desc_t *desc = irq_desc + FIR_IRQ;
+	unsigned long flags;
+	uint16_t val;
 
-/*=======================================================================*/
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu2(MFIRINTREG);
+	val |= mask;
+	write_icu2(val, MFIRINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
 
-static void enable_sysint2_irq(unsigned int irq)
+void vr41xx_disable_firint(uint16_t mask)
 {
-	set_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq));
+	irq_desc_t *desc = irq_desc + FIR_IRQ;
+	unsigned long flags;
+	uint16_t val;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu2(MFIRINTREG);
+	val &= ~mask;
+	write_icu2(val, MFIRINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-static void disable_sysint2_irq(unsigned int irq)
+void vr41xx_enable_pciint(void)
 {
-	clear_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq));
+	irq_desc_t *desc = irq_desc + PCI_IRQ;
+	unsigned long flags;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	write_icu2(PCIINT0, MPCIINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-static unsigned int startup_sysint2_irq(unsigned int irq)
+void vr41xx_disable_pciint(void)
 {
-	set_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq));
+	irq_desc_t *desc = irq_desc + PCI_IRQ;
+	unsigned long flags;
 
-	return 0; /* never anything pending */
+	spin_lock_irqsave(&desc->lock, flags);
+	write_icu2(0, MPCIINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-#define shutdown_sysint2_irq	disable_sysint2_irq
-#define ack_sysint2_irq		disable_sysint2_irq
+void vr41xx_enable_scuint(void)
+{
+	irq_desc_t *desc = irq_desc + SCU_IRQ;
+	unsigned long flags;
 
-static void end_sysint2_irq(unsigned int irq)
+	spin_lock_irqsave(&desc->lock, flags);
+	write_icu2(SCUINT0, MSCUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+void vr41xx_disable_scuint(void)
 {
-	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-		set_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq));
+	irq_desc_t *desc = irq_desc + SCU_IRQ;
+	unsigned long flags;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	write_icu2(0, MSCUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-static struct hw_interrupt_type sysint2_irq_type = {
-	.typename	= "SYSINT2",
-	.startup	= startup_sysint2_irq,
-	.shutdown	= shutdown_sysint2_irq,
-	.enable		= enable_sysint2_irq,
-	.disable	= disable_sysint2_irq,
-	.ack		= ack_sysint2_irq,
-	.end		= end_sysint2_irq,
-};
+void vr41xx_enable_csiint(uint16_t mask)
+{
+	irq_desc_t *desc = irq_desc + CSI_IRQ;
+	unsigned long flags;
+	uint16_t val;
 
-/*=======================================================================*/
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu2(MCSIINTREG);
+	val |= mask;
+	write_icu2(val, MCSIINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
 
-static void enable_giuint_irq(unsigned int irq)
+void vr41xx_disable_csiint(uint16_t mask)
 {
-	int pin;
+	irq_desc_t *desc = irq_desc + CSI_IRQ;
+	unsigned long flags;
+	uint16_t val;
 
-	pin = GIU_IRQ_TO_PIN(irq);
-	if (pin < 16)
-		set_icu1(MGIUINTLREG, (uint16_t)1 << pin);
-	else
-		set_icu2(MGIUINTHREG, (uint16_t)1 << (pin - 16));
-	vr41xx_enable_giuint(pin);
+	spin_lock_irqsave(&desc->lock, flags);
+	val = read_icu2(MCSIINTREG);
+	val &= ~mask;
+	write_icu2(val, MCSIINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-static void disable_giuint_irq(unsigned int irq)
+void vr41xx_enable_bcuint(void)
 {
-	int pin;
+	irq_desc_t *desc = irq_desc + BCU_IRQ;
+	unsigned long flags;
 
-	pin = GIU_IRQ_TO_PIN(irq);
-	vr41xx_disable_giuint(pin);
-	if (pin < 16)
-		clear_icu1(MGIUINTLREG, (uint16_t)1 << pin);
-	else
-		clear_icu2(MGIUINTHREG, (uint16_t)1 << (pin - 16));
+	spin_lock_irqsave(&desc->lock, flags);
+	write_icu2(BCUINTR, MBCUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-static unsigned int startup_giuint_irq(unsigned int irq)
+void vr41xx_disable_bcuint(void)
 {
-	vr41xx_clear_giuint(GIU_IRQ_TO_PIN(irq));
+	irq_desc_t *desc = irq_desc + BCU_IRQ;
+	unsigned long flags;
 
-	enable_giuint_irq(irq);
+	spin_lock_irqsave(&desc->lock, flags);
+	write_icu2(0, MBCUINTREG);
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+/*=======================================================================*/
+
+static unsigned int startup_sysint1_irq(unsigned int irq)
+{
+	set_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq));
 
 	return 0; /* never anything pending */
 }
 
-#define shutdown_giuint_irq	disable_giuint_irq
-
-static void ack_giuint_irq(unsigned int irq)
+static void shutdown_sysint1_irq(unsigned int irq)
 {
-	disable_giuint_irq(irq);
+	clear_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq));
+}
 
-	vr41xx_clear_giuint(GIU_IRQ_TO_PIN(irq));
+static void enable_sysint1_irq(unsigned int irq)
+{
+	set_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq));
 }
 
-static void end_giuint_irq(unsigned int irq)
+#define disable_sysint1_irq	shutdown_sysint1_irq
+#define ack_sysint1_irq		shutdown_sysint1_irq
+
+static void end_sysint1_irq(unsigned int irq)
 {
 	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-		enable_giuint_irq(irq);
+		set_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq));
 }
 
-static struct hw_interrupt_type giuint_irq_type = {
-	.typename	= "GIUINT",
-	.startup	= startup_giuint_irq,
-	.shutdown	= shutdown_giuint_irq,
-	.enable		= enable_giuint_irq,
-	.disable	= disable_giuint_irq,
-	.ack		= ack_giuint_irq,
-	.end		= end_giuint_irq,
+static struct hw_interrupt_type sysint1_irq_type = {
+	.typename	= "SYSINT1",
+	.startup	= startup_sysint1_irq,
+	.shutdown	= shutdown_sysint1_irq,
+	.enable		= enable_sysint1_irq,
+	.disable	= disable_sysint1_irq,
+	.ack		= ack_sysint1_irq,
+	.end		= end_sysint1_irq,
 };
 
 /*=======================================================================*/
 
-static struct irqaction icu_cascade = {no_action, 0, 0, "cascade", NULL, NULL};
-
-static void __init vr41xx_icu_init(void)
+static unsigned int startup_sysint2_irq(unsigned int irq)
 {
-	int i;
-
-	switch (current_cpu_data.cputype) {
-	case CPU_VR4111:
-	case CPU_VR4121:
-		icu1_base = SYSINT1REG_TYPE1;
-		icu2_base = SYSINT2REG_TYPE1;
-		break;
-	case CPU_VR4122:
-	case CPU_VR4131:
-	case CPU_VR4133:
-		icu1_base = SYSINT1REG_TYPE2;
-		icu2_base = SYSINT2REG_TYPE2;
-		break;
-	default:
-		panic("Unexpected CPU of NEC VR4100 series");
-		break;
-	}
-
-	write_icu1(0, MSYSINT1REG);
-	write_icu1(0, MGIUINTLREG);
-
-	write_icu2(0, MSYSINT2REG);
-	write_icu2(0, MGIUINTHREG);
-
-	for (i = SYSINT1_IRQ_BASE; i <= GIU_IRQ_LAST; i++) {
-		if (i >= SYSINT1_IRQ_BASE && i <= SYSINT1_IRQ_LAST)
-			irq_desc[i].handler = &sysint1_irq_type;
-		else if (i >= SYSINT2_IRQ_BASE && i <= SYSINT2_IRQ_LAST)
-			irq_desc[i].handler = &sysint2_irq_type;
-		else if (i >= GIU_IRQ_BASE && i <= GIU_IRQ_LAST)
-			irq_desc[i].handler = &giuint_irq_type;
-	}
+	set_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq));
 
-	setup_irq(INT0_CASCADE_IRQ, &icu_cascade);
-	setup_irq(INT1_CASCADE_IRQ, &icu_cascade);
-	setup_irq(INT2_CASCADE_IRQ, &icu_cascade);
-	setup_irq(INT3_CASCADE_IRQ, &icu_cascade);
-	setup_irq(INT4_CASCADE_IRQ, &icu_cascade);
+	return 0; /* never anything pending */
 }
 
-void __init init_IRQ(void)
+static void shutdown_sysint2_irq(unsigned int irq)
 {
-	memset(irq_desc, 0, sizeof(irq_desc));
+	clear_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq));
+}
 
-	init_generic_irq();
-	mips_cpu_irq_init(MIPS_CPU_IRQ_BASE);
-	vr41xx_icu_init();
+static void enable_sysint2_irq(unsigned int irq)
+{
+	set_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq));
+}
 
-	vr41xx_giuint_init();
+#define disable_sysint2_irq	shutdown_sysint2_irq
+#define ack_sysint2_irq		shutdown_sysint2_irq
 
-	set_except_vector(0, vr41xx_handle_interrupt);
+static void end_sysint2_irq(unsigned int irq)
+{
+	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
+		set_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq));
 }
 
+static struct hw_interrupt_type sysint2_irq_type = {
+	.typename	= "SYSINT2",
+	.startup	= startup_sysint2_irq,
+	.shutdown	= shutdown_sysint2_irq,
+	.enable		= enable_sysint2_irq,
+	.disable	= disable_sysint2_irq,
+	.ack		= ack_sysint2_irq,
+	.end		= end_sysint2_irq,
+};
+
 /*=======================================================================*/
 
 static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
@@ -492,34 +593,14 @@
 	return retval;
 }
 
-/*=======================================================================*/
+EXPORT_SYMBOL(vr41xx_set_intassign);
 
-static inline void giuint_irq_dispatch(uint16_t pendl, uint16_t pendh,
-                                       struct pt_regs *regs)
-{
-	int i;
-
-	if (pendl) {
-		for (i = 0; i < 16; i++) {
-			if (pendl & ((uint16_t)1 << i)) {
-				giuint_do_IRQ(i, regs);
-				return;
-			}
-		}
-	} else {
-		for (i = 0; i < 16; i++) {
-			if (pendh & ((uint16_t)1 << i)) {
-				giuint_do_IRQ(i + 16, regs);
-				return;
-			}
-		}
-	}
-}
+/*=======================================================================*/
 
 asmlinkage void irq_dispatch(unsigned char intnum, struct pt_regs *regs)
 {
-	uint16_t pend1, pend2, pendl, pendh;
-	uint16_t mask1, mask2, maskl, maskh;
+	uint16_t pend1, pend2;
+	uint16_t mask1, mask2;
 	int i;
 
 	pend1 = read_icu1(SYSINT1REG);
@@ -528,28 +609,18 @@
 	pend2 = read_icu2(SYSINT2REG);
 	mask2 = read_icu2(MSYSINT2REG);
 
-	pendl = read_icu1(GIUINTLREG);
-	maskl = read_icu1(MGIUINTLREG);
-
-	pendh = read_icu2(GIUINTHREG);
-	maskh = read_icu2(MGIUINTHREG);
-
 	mask1 &= pend1;
 	mask2 &= pend2;
-	maskl &= pendl;
-	maskh &= pendh;
 
 	if (mask1) {
 		for (i = 0; i < 16; i++) {
 			if (intnum == sysint1_assign[i] &&
 			    (mask1 & ((uint16_t)1 << i))) {
-				if (i == 8 && (maskl | maskh)) {
-					giuint_irq_dispatch(maskl, maskh, regs);
-					return;
-				} else {
+				if (i == 8)
+					giuint_irq_dispatch(regs);
+				else
 					do_IRQ(SYSINT1_IRQ(i), regs);
-					return;
-				}
+				return;
 			}
 		}
 	}
@@ -564,6 +635,72 @@
 		}
 	}
 
-	printk(KERN_ERR "spurious interrupt: %04x,%04x,%04x,%04x\n", pend1, pend2, pendl, pendh);
+	printk(KERN_ERR "spurious ICU interrupt: %04x,%04x\n", pend1, pend2);
+
 	atomic_inc(&irq_err_count);
 }
+
+/*=======================================================================*/
+
+static int __init vr41xx_icu_init(void)
+{
+	switch (current_cpu_data.cputype) {
+	case CPU_VR4111:
+	case CPU_VR4121:
+		icu1_base = SYSINT1REG_TYPE1;
+		icu2_base = SYSINT2REG_TYPE1;
+		break;
+	case CPU_VR4122:
+	case CPU_VR4131:
+	case CPU_VR4133:
+		icu1_base = SYSINT1REG_TYPE2;
+		icu2_base = SYSINT2REG_TYPE2;
+		break;
+	default:
+		printk(KERN_ERR "ICU: Unexpected CPU of NEC VR4100 series\n");
+		return -EINVAL;
+	}
+
+	write_icu1(0, MSYSINT1REG);
+	write_icu1(0xffff, MGIUINTLREG);
+
+	write_icu2(0, MSYSINT2REG);
+	write_icu2(0xffff, MGIUINTHREG);
+
+	return 0;
+}
+
+early_initcall(vr41xx_icu_init);
+
+/*=======================================================================*/
+
+static struct irqaction icu_cascade = {no_action, 0, 0, "cascade", NULL, NULL};
+
+static inline void init_vr41xx_icu_irq(void)
+{
+	int i;
+
+	for (i = SYSINT1_IRQ_BASE; i <= SYSINT1_IRQ_LAST; i++)
+		irq_desc[i].handler = &sysint1_irq_type;
+
+	for (i = SYSINT2_IRQ_BASE; i <= SYSINT2_IRQ_LAST; i++)
+		irq_desc[i].handler = &sysint2_irq_type;
+
+	setup_irq(INT0_CASCADE_IRQ, &icu_cascade);
+	setup_irq(INT1_CASCADE_IRQ, &icu_cascade);
+	setup_irq(INT2_CASCADE_IRQ, &icu_cascade);
+	setup_irq(INT3_CASCADE_IRQ, &icu_cascade);
+	setup_irq(INT4_CASCADE_IRQ, &icu_cascade);
+}
+
+void __init init_IRQ(void)
+{
+	memset(irq_desc, 0, sizeof(irq_desc));
+
+	init_generic_irq();
+	mips_cpu_irq_init(MIPS_CPU_IRQ_BASE);
+	init_vr41xx_icu_irq();
+	init_vr41xx_giuint_irq();
+
+	set_except_vector(0, vr41xx_handle_interrupt);
+}
--- diff/arch/mips/vr41xx/common/init.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/common/init.c	2004-07-01 21:32:33.000000000 +0100
@@ -18,16 +18,9 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <linux/init.h>
-#include <linux/ioport.h>
 #include <linux/string.h>
 
 #include <asm/bootinfo.h>
-#include <asm/vr41xx/vr41xx.h>
-
-extern void vr41xx_bcu_init(void);
-extern void vr41xx_cmu_init(void);
-extern void vr41xx_pmu_init(void);
-extern void vr41xx_rtc_init(void);
 
 void __init prom_init(void)
 {
@@ -42,14 +35,6 @@
 		if (i < (argc - 1))
 			strcat(arcs_cmdline, " ");
 	}
-
-	iomem_resource.start = IO_MEM_RESOURCE_START;
-	iomem_resource.end = IO_MEM_RESOURCE_END;
-
-	vr41xx_bcu_init();
-	vr41xx_cmu_init();
-	vr41xx_pmu_init();
-	vr41xx_rtc_init();
 }
 
 unsigned long __init prom_free_prom_memory (void)
--- diff/arch/mips/vr41xx/common/ksyms.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/common/ksyms.c	2004-07-01 21:32:33.000000000 +0100
@@ -25,8 +25,6 @@
 EXPORT_SYMBOL(vr41xx_get_vtclock_frequency);
 EXPORT_SYMBOL(vr41xx_get_tclock_frequency);
 
-EXPORT_SYMBOL(vr41xx_set_intassign);
-
 EXPORT_SYMBOL(vr41xx_set_rtclong1_cycle);
 EXPORT_SYMBOL(vr41xx_read_rtclong1_counter);
 EXPORT_SYMBOL(vr41xx_set_rtclong2_cycle);
--- diff/arch/mips/vr41xx/common/pmu.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/common/pmu.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  *  pmu.c, Power Management Unit routines for NEC VR4100 series.
  *
- *  Copyright (C) 2003  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *  Copyright (C) 2003-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
  *  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
@@ -68,9 +68,13 @@
 	while (1) ;
 }
 
-void __init vr41xx_pmu_init(void)
+static int __init vr41xx_pmu_init(void)
 {
 	_machine_restart = vr41xx_restart;
 	_machine_halt = vr41xx_halt;
 	_machine_power_off = vr41xx_power_off;
+
+	return 0;
 }
+
+early_initcall(vr41xx_pmu_init);
--- diff/arch/mips/vr41xx/common/rtc.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/common/rtc.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  *  rtc.c, RTC(has only timer function) routines for NEC VR4100 series.
  *
- *  Copyright (C) 2003  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *  Copyright (C) 2003-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
  *  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
@@ -310,8 +310,12 @@
 	setup_irq(ELAPSEDTIME_IRQ, irq);
 }
 
-void __init vr41xx_rtc_init(void)
+static int __init vr41xx_rtc_init(void)
 {
 	board_time_init = vr41xx_time_init;
 	board_timer_setup = vr41xx_timer_setup;
+
+	return 0;
 }
+
+early_initcall(vr41xx_rtc_init);
--- diff/arch/mips/vr41xx/common/serial.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/vr41xx/common/serial.c	2004-07-01 21:32:33.000000000 +0100
@@ -168,7 +168,7 @@
 	if (port.membase != NULL) {
 		if (early_serial_setup(&port) == 0) {
 			vr41xx_supply_clock(DSIU_CLOCK);
-			vr41xx_enable_dsiuint();
+			vr41xx_enable_dsiuint(DSIUINT_ALL);
 			vr41xx_serial_ports++;
 			return;
 		}
--- diff/arch/mips/vr41xx/common/vrc4173.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/common/vrc4173.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,143 +1,336 @@
 /*
- * FILE NAME
- *	drivers/char/vrc4173.c
- * 
- * BRIEF MODULE DESCRIPTION
- *	NEC VRC4173 driver for NEC VR4122/VR4131.
+ *  vrc4173.c, NEC VRC4173 base driver for NEC VR4122/VR4131.
  *
- * Author: Yoichi Yuasa
- *         yyuasa@mvista.com or source@mvista.com
+ *  Copyright (C) 2001-2003  MontaVista Software Inc.
+ *    Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com>
+ *  Copyright (C) 2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
- * Copyright 2001,2002 MontaVista Software Inc.
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
  *
- *  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.
  *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *  You 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/config.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/pci.h>
+#include <linux/spinlock.h>
 #include <linux/types.h>
 
 #include <asm/vr41xx/vr41xx.h>
 #include <asm/vr41xx/vrc4173.h>
 
-MODULE_DESCRIPTION("NEC VRC4173 driver for NEC VR4122/4131");
+MODULE_DESCRIPTION("NEC VRC4173 base driver for NEC VR4122/4131");
 MODULE_AUTHOR("Yoichi Yuasa <yyuasa@mvista.com>");
 MODULE_LICENSE("GPL");
 
 #define VRC4173_CMUCLKMSK	0x040
+ #define MSKPIU			0x0001
+ #define MSKKIU			0x0002
+ #define MSKAIU			0x0004
+ #define MSKPS2CH1		0x0008
+ #define MSKPS2CH2		0x0010
+ #define MSKUSB			0x0020
+ #define MSKCARD1		0x0040
+ #define MSKCARD2		0x0080
+ #define MSKAC97		0x0100
+ #define MSK48MUSB		0x0400
+ #define MSK48MPIN		0x0800
+ #define MSK48MOSC		0x1000
 #define VRC4173_CMUSRST		0x042
-
-#define VRC4173_SELECTREG	0x09e
+ #define USBRST			0x0001
+ #define CARD1RST		0x0002
+ #define CARD2RST		0x0004
+ #define AC97RST		0x0008
 
 #define VRC4173_SYSINT1REG	0x060
 #define VRC4173_MSYSINT1REG	0x06c
 
-static struct pci_device_id vrc4173_table[] = {
-	{PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_VRC4173, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
-	{0, }
+#define VRC4173_SELECTREG	0x09e
+ #define SEL3			0x0008
+ #define SEL2			0x0004
+ #define SEL1			0x0002
+ #define SEL0			0x0001
+
+static struct pci_device_id vrc4173_id_table[] __devinitdata = {
+	{	.vendor		= PCI_VENDOR_ID_NEC,
+		.device		= PCI_DEVICE_ID_NEC_VRC4173,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= PCI_ANY_ID,			},
+	{	.vendor		= 0,				},
 };
 
 unsigned long vrc4173_io_offset = 0;
 
 EXPORT_SYMBOL(vrc4173_io_offset);
 
-static u16 vrc4173_cmuclkmsk;
 static int vrc4173_initialized;
+static uint16_t vrc4173_cmuclkmsk;
+static uint16_t vrc4173_selectreg;
+static spinlock_t vrc4173_cmu_lock;
+static spinlock_t vrc4173_giu_lock;
 
-void vrc4173_clock_supply(u16 mask)
+static inline void set_cmusrst(uint16_t val)
+{
+	uint16_t cmusrst;
+
+	cmusrst = vrc4173_inw(VRC4173_CMUSRST);
+	cmusrst |= val;
+	vrc4173_outw(cmusrst, VRC4173_CMUSRST);
+}
+
+static inline void clear_cmusrst(uint16_t val)
+{
+	uint16_t cmusrst;
+
+	cmusrst = vrc4173_inw(VRC4173_CMUSRST);
+	cmusrst &= ~val;
+	vrc4173_outw(cmusrst, VRC4173_CMUSRST);
+}
+
+void vrc4173_supply_clock(vrc4173_clock_t clock)
 {
 	if (vrc4173_initialized) {
-		vrc4173_cmuclkmsk |= mask;
+		spin_lock_irq(&vrc4173_cmu_lock);
+
+		switch (clock) {
+		case VRC4173_PIU_CLOCK:
+			vrc4173_cmuclkmsk |= MSKPIU;
+			break;
+		case VRC4173_KIU_CLOCK:
+			vrc4173_cmuclkmsk |= MSKKIU;
+			break;
+		case VRC4173_AIU_CLOCK:
+			vrc4173_cmuclkmsk |= MSKAIU;
+			break;
+		case VRC4173_PS2_CH1_CLOCK:
+			vrc4173_cmuclkmsk |= MSKPS2CH1;
+			break;
+		case VRC4173_PS2_CH2_CLOCK:
+			vrc4173_cmuclkmsk |= MSKPS2CH2;
+			break;
+		case VRC4173_USBU_PCI_CLOCK:
+			set_cmusrst(USBRST);
+			vrc4173_cmuclkmsk |= MSKUSB;
+			break;
+		case VRC4173_CARDU1_PCI_CLOCK:
+			set_cmusrst(CARD1RST);
+			vrc4173_cmuclkmsk |= MSKCARD1;
+			break;
+		case VRC4173_CARDU2_PCI_CLOCK:
+			set_cmusrst(CARD2RST);
+			vrc4173_cmuclkmsk |= MSKCARD2;
+			break;
+		case VRC4173_AC97U_PCI_CLOCK:
+			set_cmusrst(AC97RST);
+			vrc4173_cmuclkmsk |= MSKAC97;
+			break;
+		case VRC4173_USBU_48MHz_CLOCK:
+			set_cmusrst(USBRST);
+			vrc4173_cmuclkmsk |= MSK48MUSB;
+			break;
+		case VRC4173_EXT_48MHz_CLOCK:
+			if (vrc4173_cmuclkmsk & MSK48MOSC)
+				vrc4173_cmuclkmsk |= MSK48MPIN;
+			else
+				printk(KERN_WARNING
+				       "vrc4173_supply_clock: "
+				       "Please supply VRC4173_48MHz_CLOCK first "
+				       "rather than VRC4173_EXT_48MHz_CLOCK.\n");
+			break;
+		case VRC4173_48MHz_CLOCK:
+			vrc4173_cmuclkmsk |= MSK48MOSC;
+			break;
+		default:
+			printk(KERN_WARNING
+			       "vrc4173_supply_clock: Invalid CLOCK value %u\n", clock);
+			break;
+		}
+
 		vrc4173_outw(vrc4173_cmuclkmsk, VRC4173_CMUCLKMSK);
+
+		switch (clock) {
+		case VRC4173_USBU_PCI_CLOCK:
+		case VRC4173_USBU_48MHz_CLOCK:
+			clear_cmusrst(USBRST);
+			break;
+		case VRC4173_CARDU1_PCI_CLOCK:
+			clear_cmusrst(CARD1RST);
+			break;
+		case VRC4173_CARDU2_PCI_CLOCK:
+			clear_cmusrst(CARD2RST);
+			break;
+		case VRC4173_AC97U_PCI_CLOCK:
+			clear_cmusrst(AC97RST);
+			break;
+		default:
+			break;
+		}
+
+		spin_unlock_irq(&vrc4173_cmu_lock);
 	}
 }
 
-void vrc4173_clock_mask(u16 mask)
+EXPORT_SYMBOL(vrc4173_supply_clock);
+
+void vrc4173_mask_clock(vrc4173_clock_t clock)
 {
 	if (vrc4173_initialized) {
-		vrc4173_cmuclkmsk &= ~mask;
+		spin_lock_irq(&vrc4173_cmu_lock);
+
+		switch (clock) {
+		case VRC4173_PIU_CLOCK:
+			vrc4173_cmuclkmsk &= ~MSKPIU;
+			break;
+		case VRC4173_KIU_CLOCK:
+			vrc4173_cmuclkmsk &= ~MSKKIU;
+			break;
+		case VRC4173_AIU_CLOCK:
+			vrc4173_cmuclkmsk &= ~MSKAIU;
+			break;
+		case VRC4173_PS2_CH1_CLOCK:
+			vrc4173_cmuclkmsk &= ~MSKPS2CH1;
+			break;
+		case VRC4173_PS2_CH2_CLOCK:
+			vrc4173_cmuclkmsk &= ~MSKPS2CH2;
+			break;
+		case VRC4173_USBU_PCI_CLOCK:
+			set_cmusrst(USBRST);
+			vrc4173_cmuclkmsk &= ~MSKUSB;
+			break;
+		case VRC4173_CARDU1_PCI_CLOCK:
+			set_cmusrst(CARD1RST);
+			vrc4173_cmuclkmsk &= ~MSKCARD1;
+			break;
+		case VRC4173_CARDU2_PCI_CLOCK:
+			set_cmusrst(CARD2RST);
+			vrc4173_cmuclkmsk &= ~MSKCARD2;
+			break;
+		case VRC4173_AC97U_PCI_CLOCK:
+			set_cmusrst(AC97RST);
+			vrc4173_cmuclkmsk &= ~MSKAC97;
+			break;
+		case VRC4173_USBU_48MHz_CLOCK:
+			set_cmusrst(USBRST);
+			vrc4173_cmuclkmsk &= ~MSK48MUSB;
+			break;
+		case VRC4173_EXT_48MHz_CLOCK:
+			vrc4173_cmuclkmsk &= ~MSK48MPIN;
+			break;
+		case VRC4173_48MHz_CLOCK:
+			vrc4173_cmuclkmsk &= ~MSK48MOSC;
+			break;
+		default:
+			printk(KERN_WARNING "vrc4173_mask_clock: Invalid CLOCK value %u\n", clock);
+			break;
+		}
+
 		vrc4173_outw(vrc4173_cmuclkmsk, VRC4173_CMUCLKMSK);
+
+		switch (clock) {
+		case VRC4173_USBU_PCI_CLOCK:
+		case VRC4173_USBU_48MHz_CLOCK:
+			clear_cmusrst(USBRST);
+			break;
+		case VRC4173_CARDU1_PCI_CLOCK:
+			clear_cmusrst(CARD1RST);
+			break;
+		case VRC4173_CARDU2_PCI_CLOCK:
+			clear_cmusrst(CARD2RST);
+			break;
+		case VRC4173_AC97U_PCI_CLOCK:
+			clear_cmusrst(AC97RST);
+			break;
+		default:
+			break;
+		}
+
+		spin_unlock_irq(&vrc4173_cmu_lock);
 	}
 }
 
+EXPORT_SYMBOL(vrc4173_mask_clock);
+
 static inline void vrc4173_cmu_init(void)
 {
 	vrc4173_cmuclkmsk = vrc4173_inw(VRC4173_CMUCLKMSK);
-}
 
-EXPORT_SYMBOL(vrc4173_clock_supply);
-EXPORT_SYMBOL(vrc4173_clock_mask);
+	spin_lock_init(&vrc4173_cmu_lock);
+}
 
-void vrc4173_select_function(int func)
+void vrc4173_select_function(vrc4173_function_t function)
 {
-	u16 val;
-
 	if (vrc4173_initialized) {
-		val = vrc4173_inw(VRC4173_SELECTREG);
-		switch(func) {
-		case PS2CH1_SELECT:
-			val |= 0x0004;
+		spin_lock_irq(&vrc4173_giu_lock);
+
+		switch(function) {
+		case PS2_CHANNEL1:
+			vrc4173_selectreg |= SEL2;
 			break;
-		case PS2CH2_SELECT:
-			val |= 0x0002;
+		case PS2_CHANNEL2:
+			vrc4173_selectreg |= SEL1;
 			break;
-		case TOUCHPANEL_SELECT:
-			val &= 0x0007;
+		case TOUCHPANEL:
+			vrc4173_selectreg &= SEL2 | SEL1 | SEL0;
 			break;
-		case KIU8_SELECT:
-			val &= 0x000e;
+		case KEYBOARD_8SCANLINES:
+			vrc4173_selectreg &= SEL3 | SEL2 | SEL1;
 			break;
-		case KIU10_SELECT:
-			val &= 0x000c;
+		case KEYBOARD_10SCANLINES:
+			vrc4173_selectreg &= SEL3 | SEL2;
 			break;
-		case KIU12_SELECT:
-			val &= 0x0008;
+		case KEYBOARD_12SCANLINES:
+			vrc4173_selectreg &= SEL3;
 			break;
-		case GPIO_SELECT:
-			val |= 0x0008;
+		case GPIO_0_15PINS:
+			vrc4173_selectreg |= SEL0;
+			break;
+		case GPIO_16_20PINS:
+			vrc4173_selectreg |= SEL3;
 			break;
 		}
-		vrc4173_outw(val, VRC4173_SELECTREG);
+
+		vrc4173_outw(vrc4173_selectreg, VRC4173_SELECTREG);
+
+		spin_unlock_irq(&vrc4173_giu_lock);
 	}
 }
 
 EXPORT_SYMBOL(vrc4173_select_function);
 
+static inline void vrc4173_giu_init(void)
+{
+	vrc4173_selectreg = vrc4173_inw(VRC4173_SELECTREG);
+
+	spin_lock_init(&vrc4173_giu_lock);
+}
+
 static void enable_vrc4173_irq(unsigned int irq)
 {
-	u16 val;
+	uint16_t val;
 
 	val = vrc4173_inw(VRC4173_MSYSINT1REG);
-	val |= (u16)1 << (irq - VRC4173_IRQ_BASE);
+	val |= (uint16_t)1 << (irq - VRC4173_IRQ_BASE);
 	vrc4173_outw(val, VRC4173_MSYSINT1REG);
 }
 
 static void disable_vrc4173_irq(unsigned int irq)
 {
-	u16 val;
+	uint16_t val;
 
 	val = vrc4173_inw(VRC4173_MSYSINT1REG);
-	val &= ~((u16)1 << (irq - VRC4173_IRQ_BASE));
+	val &= ~((uint16_t)1 << (irq - VRC4173_IRQ_BASE));
 	vrc4173_outw(val, VRC4173_MSYSINT1REG);
 }
 
@@ -157,19 +350,18 @@
 }
 
 static struct hw_interrupt_type vrc4173_irq_type = {
-	"VRC4173",
-	startup_vrc4173_irq,
-	shutdown_vrc4173_irq,
-	enable_vrc4173_irq,
-	disable_vrc4173_irq,
-	ack_vrc4173_irq,
-	end_vrc4173_irq,
-	NULL
+	.typename	= "VRC4173",
+	.startup	= startup_vrc4173_irq,
+	.shutdown	= shutdown_vrc4173_irq,
+	.enable		= enable_vrc4173_irq,
+	.disable	= disable_vrc4173_irq,
+	.ack		= ack_vrc4173_irq,
+	.end		= end_vrc4173_irq,
 };
 
 static int vrc4173_get_irq_number(int irq)
 {
-	u16 status, mask;
+	uint16_t status, mask;
 	int i;
 
         status = vrc4173_inw(VRC4173_SYSINT1REG);
@@ -179,18 +371,18 @@
 	if (status) {
 		for (i = 0; i < 16; i++)
 			if (status & (0x0001 << i))
-				return VRC4173_IRQ_BASE + i;
+				return VRC4173_IRQ(i);
 	}
 
 	return -EINVAL;
 }
 
-static inline void vrc4173_icu_init(int cascade_irq)
+static inline int vrc4173_icu_init(int cascade_irq)
 {
 	int i;
 
 	if (cascade_irq < GIU_IRQ(0) || cascade_irq > GIU_IRQ(15))
-		return;
+		return -EINVAL;
 	
 	vrc4173_outw(0, VRC4173_MSYSINT1REG);
 
@@ -199,33 +391,38 @@
 
 	for (i = VRC4173_IRQ_BASE; i <= VRC4173_IRQ_LAST; i++)
                 irq_desc[i].handler = &vrc4173_irq_type;
+
+	return 0;
 }
 
-static int __devinit vrc4173_probe(struct pci_dev *pdev,
-                                   const struct pci_device_id *ent)
+static int __devinit vrc4173_probe(struct pci_dev *dev,
+                                   const struct pci_device_id *id)
 {
 	unsigned long start, flags;
 	int err;
 
-	if ((err = pci_enable_device(pdev)) < 0) {
-		printk(KERN_ERR "vrc4173: failed to enable device -- err=%d\n", err);
+	err = pci_enable_device(dev);
+	if (err < 0) {
+		printk(KERN_ERR "vrc4173: Failed to enable PCI device, aborting\n");
 		return err;
 	}
 
-	pci_set_master(pdev);
+	pci_set_master(dev);
 
-	start = pci_resource_start(pdev, 0);
-	if (!start) {
-		printk(KERN_ERR "vrc4173:No PCI I/O resources, aborting\n");
-		return -ENODEV;
+	start = pci_resource_start(dev, 0);
+	if (start == 0) {
+		printk(KERN_ERR "vrc4173:No such PCI I/O resource, aborting\n");
+		return -ENXIO;
 	}
 
-	if (!start || (((flags = pci_resource_flags(pdev, 0)) & IORESOURCE_IO) == 0)) {
-		printk(KERN_ERR "vrc4173: No PCI I/O resources, aborting\n");
-		return -ENODEV;
+	flags = pci_resource_flags(dev, 0);
+	if ((flags & IORESOURCE_IO) == 0) {
+		printk(KERN_ERR "vrc4173: No such PCI I/O resource, aborting\n");
+		return -ENXIO;
 	}
 
-	if ((err = pci_request_regions(pdev, "NEC VRC4173")) < 0) {
+	err = pci_request_regions(dev, "NEC VRC4173");
+	if (err < 0) {
 		printk(KERN_ERR "vrc4173: PCI resources are busy, aborting\n");
 		return err;
 	}
@@ -233,33 +430,46 @@
 	set_vrc4173_io_offset(start);
 
 	vrc4173_cmu_init();
+	vrc4173_giu_init();
 
-	vrc4173_icu_init(pdev->irq);
+	err = vrc4173_icu_init(dev->irq);
+	if (err < 0) {
+		printk(KERN_ERR "vrc4173: Invalid IRQ %d, aborting\n", dev->irq);
+		return err;
+	}
 
-	if ((err = vr41xx_cascade_irq(pdev->irq, vrc4173_get_irq_number)) < 0) {
-		printk(KERN_ERR
-		       "vrc4173: IRQ resource %d is busy, aborting\n", pdev->irq);
+	err = vr41xx_cascade_irq(dev->irq, vrc4173_get_irq_number);
+	if (err < 0) {
+		printk(KERN_ERR "vrc4173: IRQ resource %d is busy, aborting\n", dev->irq);
 		return err;
 	}
 
 	printk(KERN_INFO
-	       "NEC VRC4173 at 0x%#08lx, IRQ is cascaded to %d\n", start, pdev->irq);
+	       "NEC VRC4173 at 0x%#08lx, IRQ is cascaded to %d\n", start, dev->irq);
 
 	return 0;
 }
 
+static void vrc4173_remove(struct pci_dev *dev)
+{
+	free_irq(dev->irq, NULL);
+
+	pci_release_regions(dev);
+}
+
 static struct pci_driver vrc4173_driver = {
 	.name		= "NEC VRC4173",
 	.probe		= vrc4173_probe,
-	.remove		= NULL,
-	.id_table	= vrc4173_table,
+	.remove		= vrc4173_remove,
+	.id_table	= vrc4173_id_table,
 };
 
 static int __devinit vrc4173_init(void)
 {
 	int err;
 
-	if ((err = pci_module_init(&vrc4173_driver)) < 0)
+	err = pci_module_init(&vrc4173_driver);
+	if (err < 0)
 		return err;
 
 	vrc4173_initialized = 1;
--- diff/arch/mips/vr41xx/tanbac-tb0226/setup.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/vr41xx/tanbac-tb0226/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -18,59 +18,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <linux/config.h>
-#include <linux/ioport.h>
 
-#include <asm/io.h>
-#include <asm/pci_channel.h>
-#include <asm/vr41xx/tb0226.h>
-
-#ifdef CONFIG_PCI
-static struct resource vr41xx_pci_io_resource = {
-	.name	= "PCI I/O space",
-	.start	= VR41XX_PCI_IO_START,
-	.end	= VR41XX_PCI_IO_END,
-	.flags	= IORESOURCE_IO,
-};
-
-static struct resource vr41xx_pci_mem_resource = {
-	.name	= "PCI memory space",
-	.start	= VR41XX_PCI_MEM_START,
-	.end	= VR41XX_PCI_MEM_END,
-	.flags	= IORESOURCE_MEM,
-};
-
-extern struct pci_ops vr41xx_pci_ops;
-
-struct pci_controller vr41xx_controller[] = {
-	.pci_ops	= &vr41xx_pci_ops,
-	.io_resource	= &vr41xx_pci_io_resource,
-	.mem_resource	= &vr41xx_pci_mem_resource,
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_mem1 = {
-	.internal_base	= VR41XX_PCI_MEM1_BASE,
-	.address_mask	= VR41XX_PCI_MEM1_MASK,
-	.pci_base	= IO_MEM1_RESOURCE_START,
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_mem2 = {
-	.internal_base	= VR41XX_PCI_MEM2_BASE,
-	.address_mask	= VR41XX_PCI_MEM2_MASK,
-	.pci_base	= IO_MEM2_RESOURCE_START,
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_io = {
-	.internal_base	= VR41XX_PCI_IO_BASE,
-	.address_mask	= VR41XX_PCI_IO_MASK,
-	.pci_base	= IO_PORT_RESOURCE_START,
-};
-
-static struct vr41xx_pci_address_map pci_address_map = {
-	.mem1	= &vr41xx_pci_mem1,
-	.mem2	= &vr41xx_pci_mem2,
-	.io	= &vr41xx_pci_io,
-};
-#endif
+#include <asm/vr41xx/vr41xx.h>
 
 const char *get_system_type(void)
 {
@@ -79,19 +28,11 @@
 
 static int tanbac_tb0226_setup(void)
 {
-	set_io_port_base(IO_PORT_BASE);
-	ioport_resource.start = IO_PORT_RESOURCE_START;
-	ioport_resource.end = IO_PORT_RESOURCE_END;
-
 #ifdef CONFIG_SERIAL_8250
 	vr41xx_select_siu_interface(SIU_RS232C, IRDA_NONE);
 	vr41xx_siu_init();
 #endif
 
-#ifdef CONFIG_PCI
-	vr41xx_pciu_init(&pci_address_map);
-#endif
-
 	return 0;
 }
 
--- diff/arch/mips/vr41xx/tanbac-tb0229/Makefile	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/tanbac-tb0229/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -4,4 +4,4 @@
 
 obj-y				:= setup.o
 
-obj-$(CONFIG_TANBAC_TB0219)	+= reboot.o
+obj-$(CONFIG_TANBAC_TB0219)	+= tb0219.o
--- diff/arch/mips/vr41xx/tanbac-tb0229/setup.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/vr41xx/tanbac-tb0229/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -21,60 +21,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <linux/config.h>
-#include <linux/ioport.h>
 
-#include <asm/io.h>
-#include <asm/pci_channel.h>
-#include <asm/reboot.h>
-#include <asm/vr41xx/tb0229.h>
-
-#ifdef CONFIG_PCI
-static struct resource vr41xx_pci_io_resource = {
-	.name	= "PCI I/O space",
-	.start	= VR41XX_PCI_IO_START,
-	.end	= VR41XX_PCI_IO_END,
-	.flags	= IORESOURCE_IO,
-};
-
-static struct resource vr41xx_pci_mem_resource = {
-	.name	= "PCI memory space",
-	.start	= VR41XX_PCI_MEM_START,
-	.end	= VR41XX_PCI_MEM_END,
-	.flags	= IORESOURCE_MEM,
-};
-
-extern struct pci_ops vr41xx_pci_ops;
-
-struct pci_controller vr41xx_controller = {
-	.pci_ops	= &vr41xx_pci_ops,
-	.io_resource	= &vr41xx_pci_io_resource,
-	.mem_resource	= &vr41xx_pci_mem_resource,
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_mem1 = {
-	.internal_base	= VR41XX_PCI_MEM1_BASE,
-	.address_mask	= VR41XX_PCI_MEM1_MASK,
-	.pci_base	= IO_MEM1_RESOURCE_START,
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_mem2 = {
-	.internal_base	= VR41XX_PCI_MEM2_BASE,
-	.address_mask	= VR41XX_PCI_MEM2_MASK,
-	.pci_base	= IO_MEM2_RESOURCE_START,
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_io = {
-	.internal_base	= VR41XX_PCI_IO_BASE,
-	.address_mask	= VR41XX_PCI_IO_MASK,
-	.pci_base	= IO_PORT_RESOURCE_START
-};
-
-static struct vr41xx_pci_address_map pci_address_map = {
-	.mem1	= &vr41xx_pci_mem1,
-	.mem2	= &vr41xx_pci_mem2,
-	.io	= &vr41xx_pci_io,
-};
-#endif
+#include <asm/vr41xx/vr41xx.h>
 
 const char *get_system_type(void)
 {
@@ -83,24 +31,12 @@
 
 static int tanbac_tb0229_setup(void)
 {
-	set_io_port_base(IO_PORT_BASE);
-	ioport_resource.start = IO_PORT_RESOURCE_START;
-	ioport_resource.end = IO_PORT_RESOURCE_END;
-
 #ifdef CONFIG_SERIAL_8250
 	vr41xx_select_siu_interface(SIU_RS232C, IRDA_NONE);
 	vr41xx_siu_init();
 	vr41xx_dsiu_init();
 #endif
 
-#ifdef CONFIG_PCI
-	vr41xx_pciu_init(&pci_address_map);
-#endif
-
-#ifdef CONFIG_TANBAC_TB0219
-	_machine_restart = tanbac_tb0229_restart;
-#endif
-
 	return 0;
 }
 
--- diff/arch/mips/vr41xx/victor-mpc30x/setup.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/vr41xx/victor-mpc30x/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -18,59 +18,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <linux/config.h>
-#include <linux/ioport.h>
 
-#include <asm/io.h>
-#include <asm/pci_channel.h>
-#include <asm/vr41xx/mpc30x.h>
-
-#ifdef CONFIG_PCI
-static struct resource vr41xx_pci_io_resource = {
-	"PCI I/O space",
-	VR41XX_PCI_IO_START,
-	VR41XX_PCI_IO_END,
-	IORESOURCE_IO
-};
-
-static struct resource vr41xx_pci_mem_resource = {
-	"PCI memory space",
-	VR41XX_PCI_MEM_START,
-	VR41XX_PCI_MEM_END,
-	IORESOURCE_MEM
-};
-
-extern struct pci_ops vr41xx_pci_ops;
-
-struct pci_controller vr41xx_controller[] = {
-	.pci_ops	= &vr41xx_pci_ops,
-	.io_resource	= &vr41xx_pci_io_resource,
-	.mem_resource	= &vr41xx_pci_mem_resource,
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_mem1 = {
-	VR41XX_PCI_MEM1_BASE,
-	VR41XX_PCI_MEM1_MASK,
-	IO_MEM1_RESOURCE_START
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_mem2 = {
-	VR41XX_PCI_MEM2_BASE,
-	VR41XX_PCI_MEM2_MASK,
-	IO_MEM2_RESOURCE_START
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_io = {
-	VR41XX_PCI_IO_BASE,
-	VR41XX_PCI_IO_MASK,
-	IO_PORT_RESOURCE_START
-};
-
-static struct vr41xx_pci_address_map pci_address_map = {
-	&vr41xx_pci_mem1,
-	&vr41xx_pci_mem2,
-	&vr41xx_pci_io
-};
-#endif
+#include <asm/vr41xx/vr41xx.h>
 
 const char *get_system_type(void)
 {
@@ -79,19 +28,11 @@
 
 static int victor_mpc30x_setup(void)
 {
-	set_io_port_base(IO_PORT_BASE);
-	ioport_resource.start = IO_PORT_RESOURCE_START;
-	ioport_resource.end = IO_PORT_RESOURCE_END;
-
 #ifdef CONFIG_SERIAL_8250
 	vr41xx_select_siu_interface(SIU_RS232C, IRDA_NONE);
 	vr41xx_siu_init();
 #endif
 
-#ifdef CONFIG_PCI
-	vr41xx_pciu_init(&pci_address_map);
-#endif
-
 	return 0;
 }
 
--- diff/arch/mips/vr41xx/zao-capcella/setup.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/mips/vr41xx/zao-capcella/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -18,59 +18,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <linux/config.h>
-#include <linux/ioport.h>
 
-#include <asm/io.h>
-#include <asm/pci_channel.h>
-#include <asm/vr41xx/capcella.h>
-
-#ifdef CONFIG_PCI
-static struct resource vr41xx_pci_io_resource = {
-	"PCI I/O space",
-	VR41XX_PCI_IO_START,
-	VR41XX_PCI_IO_END,
-	IORESOURCE_IO
-};
-
-static struct resource vr41xx_pci_mem_resource = {
-	"PCI memory space",
-	VR41XX_PCI_MEM_START,
-	VR41XX_PCI_MEM_END,
-	IORESOURCE_MEM
-};
-
-extern struct pci_ops vr41xx_pci_ops;
-
-struct pci_controller vr41xx_controller = {
-	.pci_ops	= &vr41xx_pci_ops,
-	.io_resource	= &vr41xx_pci_io_resource,
-	.mem_resource	= &vr41xx_pci_mem_resource,
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_mem1 = {
-	VR41XX_PCI_MEM1_BASE,
-	VR41XX_PCI_MEM1_MASK,
-	IO_MEM1_RESOURCE_START
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_mem2 = {
-	VR41XX_PCI_MEM2_BASE,
-	VR41XX_PCI_MEM2_MASK,
-	IO_MEM2_RESOURCE_START
-};
-
-struct vr41xx_pci_address_space vr41xx_pci_io = {
-	VR41XX_PCI_IO_BASE,
-	VR41XX_PCI_IO_MASK,
-	IO_PORT_RESOURCE_START
-};
-
-static struct vr41xx_pci_address_map pci_address_map = {
-	&vr41xx_pci_mem1,
-	&vr41xx_pci_mem2,
-	&vr41xx_pci_io
-};
-#endif
+#include <asm/vr41xx/vr41xx.h>
 
 const char *get_system_type(void)
 {
@@ -79,20 +28,12 @@
 
 static int zao_capcella_setup(void)
 {
-	set_io_port_base(IO_PORT_BASE);
-	ioport_resource.start = IO_PORT_RESOURCE_START;
-	ioport_resource.end = IO_PORT_RESOURCE_END;
-
 #ifdef CONFIG_SERIAL_8250
 	vr41xx_select_siu_interface(SIU_RS232C, IRDA_NONE);
 	vr41xx_siu_init();
 	vr41xx_dsiu_init();
 #endif
 
-#ifdef CONFIG_PCI
-	vr41xx_pciu_init(&pci_address_map);
-#endif
-
 	return 0;
 }
 
--- diff/arch/parisc/kernel/init_task.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/parisc/kernel/init_task.c	2004-07-01 21:32:33.000000000 +0100
@@ -27,6 +27,7 @@
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/init_task.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/parisc/kernel/irq.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/parisc/kernel/irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -644,7 +644,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/parisc/kernel/setup.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/parisc/kernel/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -44,9 +44,8 @@
 #include <asm/machdep.h>	/* for pa7300lc_init() proto */
 #include <asm/pdc_chassis.h>
 #include <asm/io.h>
+#include <asm/setup.h>
 
-#define COMMAND_LINE_SIZE 1024
-char	saved_command_line[COMMAND_LINE_SIZE];
 char	command_line[COMMAND_LINE_SIZE];
 
 /* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
--- diff/arch/parisc/kernel/smp.c	2004-06-30 14:25:41.000000000 +0100
+++ source/arch/parisc/kernel/smp.c	2004-07-01 21:32:33.000000000 +0100
@@ -543,7 +543,6 @@
 	if (IS_ERR(idle))
 		panic("SMP: fork failed for CPU:%d", cpuid);
 
-	wake_up_forked_process(idle);
 	init_idle(idle, cpunum);
 	unhash_process(idle);
 	idle->thread_info->cpu = cpunum;
--- diff/arch/parisc/kernel/traps.c	2004-05-19 22:11:13.000000000 +0100
+++ source/arch/parisc/kernel/traps.c	2004-07-01 21:32:33.000000000 +0100
@@ -188,7 +188,7 @@
 		 * down the cause of the crash will be able to figure
 		 * out the call path that was taken.
 		 */
-		if (kernel_text_address(addr)) {
+		if (__kernel_text_address(addr)) {
 			printk(" [<" RFMT ">] ", addr);
 #ifdef CONFIG_KALLSYMS
 			print_symbol("%s\n", addr);
--- diff/arch/parisc/mm/init.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/parisc/mm/init.c	2004-07-01 21:32:33.000000000 +0100
@@ -484,7 +484,8 @@
 
 	printk(KERN_INFO "Mem-info:\n");
 	show_free_areas();
-	printk(KERN_INFO "Free swap:	 %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk(KERN_INFO "Free swap:	 %6ldkB\n",
+				nr_swap_pages<<(PAGE_SHIFT-10));
 	i = max_mapnr;
 	while (i-- > 0) {
 		total++;
--- diff/arch/ppc/8260_io/Kconfig	2004-05-19 22:11:13.000000000 +0100
+++ source/arch/ppc/8260_io/Kconfig	2004-07-01 21:32:33.000000000 +0100
@@ -1,12 +1,9 @@
 #
-# MPC8260 Communication options
+# CPM2 Communication options
 #
 
-menu "MPC8260 CPM Options"
-	depends on 8260
-
-config SCC_CONSOLE
-	bool "Enable SCC Console"
+menu "CPM2 Options"
+	depends on CPM2
 
 config SCC_ENET
 	bool "CPM SCC Ethernet"
@@ -24,19 +21,19 @@
 	bool "Ethernet on FCC1"
 	depends on FEC_ENET
 	help
-	  Use MPC8260 fast Ethernet controller 1 to drive Ethernet (default).
+	  Use CPM2 fast Ethernet controller 1 to drive Ethernet (default).
 
 config FCC2_ENET
 	bool "Ethernet on FCC2"
 	depends on FEC_ENET
 	help
-	  Use MPC8260 fast Ethernet controller 2 to drive Ethernet.
+	  Use CPM2 fast Ethernet controller 2 to drive Ethernet.
 
 config FCC3_ENET
 	bool "Ethernet on FCC3"
 	depends on FEC_ENET
 	help
-	  Use MPC8260 fast Ethernet controller 3 to drive Ethernet.
+	  Use CPM2 fast Ethernet controller 3 to drive Ethernet.
 
 config USE_MDIO
 	bool "Use MDIO for PHY configuration"
--- diff/arch/ppc/8260_io/Makefile	2004-05-19 22:11:13.000000000 +0100
+++ source/arch/ppc/8260_io/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -1,8 +1,6 @@
 #
-# Makefile for the linux MPC8xx ppc-specific parts of comm processor
+# Makefile for the linux ppc-specific parts of comm processor (v2)
 #
 
-obj-y			:= commproc.o uart.o
-
 obj-$(CONFIG_FEC_ENET)	+= fcc_enet.o
 obj-$(CONFIG_SCC_ENET)	+= enet.o
--- diff/arch/ppc/8260_io/enet.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/8260_io/enet.c	2004-07-01 21:32:33.000000000 +0100
@@ -40,12 +40,12 @@
 #include <linux/skbuff.h>
 #include <linux/spinlock.h>
 
-#include <asm/immap_8260.h>
+#include <asm/immap_cpm2.h>
 #include <asm/pgtable.h>
 #include <asm/mpc8260.h>
 #include <asm/bitops.h>
 #include <asm/uaccess.h>
-#include <asm/cpm_8260.h>
+#include <asm/cpm2.h>
 #include <asm/irq.h>
 
 /*
@@ -376,7 +376,7 @@
 	    }
 
 	    if (must_restart) {
-		volatile cpm8260_t *cp;
+		volatile cpm_cpm2_t *cp;
 
 		/* Some transmit errors cause the transmitter to shut
 		 * down.  We now issue a restart transmit.  Since the
@@ -552,10 +552,10 @@
 	
 		/* Log any net taps. */
 		printk("%s: Promiscuous mode enabled.\n", dev->name);
-		cep->sccp->scc_pmsr |= SCC_PSMR_PRO;
+		cep->sccp->scc_psmr |= SCC_PSMR_PRO;
 	} else {
 
-		cep->sccp->scc_pmsr &= ~SCC_PSMR_PRO;
+		cep->sccp->scc_psmr &= ~SCC_PSMR_PRO;
 
 		if (dev->flags & IFF_ALLMULTI) {
 			/* Catch all multicast addresses, so set the
@@ -613,19 +613,20 @@
 	struct net_device *dev;
 	struct scc_enet_private *cep;
 	int i, j, err;
+	void * dpaddr;
 	unsigned char	*eap;
 	unsigned long	mem_addr;
 	bd_t		*bd;
 	volatile	cbd_t		*bdp;
-	volatile	cpm8260_t	*cp;
+	volatile	cpm_cpm2_t	*cp;
 	volatile	scc_t		*sccp;
 	volatile	scc_enet_t	*ep;
-	volatile	immap_t		*immap;
-	volatile	iop8260_t	*io;
+	volatile	cpm2_map_t		*immap;
+	volatile	iop_cpm2_t	*io;
 
 	cp = cpmp;	/* Get pointer to Communication Processor */
 
-	immap = (immap_t *)IMAP_ADDR;	/* and to internal registers */
+	immap = (cpm2_map_t *)CPM_MAP_ADDR;	/* and to internal registers */
 	io = &immap->im_ioport;
 
 	bd = (bd_t *)__res;
@@ -680,13 +681,13 @@
 	 * These are relative offsets in the DP ram address space.
 	 * Initialize base addresses for the buffer descriptors.
 	 */
-	i = m8260_cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8);
-	ep->sen_genscc.scc_rbase = i;
-	cep->rx_bd_base = (cbd_t *)&immap->im_dprambase[i];
-
-	i = m8260_cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8);
-	ep->sen_genscc.scc_tbase = i;
-	cep->tx_bd_base = (cbd_t *)&immap->im_dprambase[i];
+	dpaddr = cpm2_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8);
+	ep->sen_genscc.scc_rbase = cpm2_dpram_offset(dpaddr);
+	cep->rx_bd_base = (cbd_t *)dpaddr;
+
+	dpaddr = cpm2_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8);
+	ep->sen_genscc.scc_tbase = cpm2_dpram_offset(dpaddr);
+	cep->tx_bd_base = (cbd_t *)dpaddr;
 
 	cep->dirty_tx = cep->cur_tx = cep->tx_bd_base;
 	cep->cur_rx = cep->rx_bd_base;
@@ -820,7 +821,7 @@
 	/* Set processing mode.  Use Ethernet CRC, catch broadcast, and
 	 * start frame search 22 bit times after RENA.
 	 */
-	sccp->scc_pmsr = (SCC_PSMR_ENCRC | SCC_PSMR_NIB22);
+	sccp->scc_psmr = (SCC_PSMR_ENCRC | SCC_PSMR_NIB22);
 
 	/* It is now OK to enable the Ethernet transmitter.
 	 * Unfortunately, there are board implementation differences here.
--- diff/arch/ppc/8260_io/fcc_enet.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/8260_io/fcc_enet.c	2004-07-01 21:32:33.000000000 +0100
@@ -35,13 +35,13 @@
 #include <linux/skbuff.h>
 #include <linux/spinlock.h>
 
-#include <asm/immap_8260.h>
+#include <asm/immap_cpm2.h>
 #include <asm/pgtable.h>
 #include <asm/mpc8260.h>
 #include <asm/irq.h>
 #include <asm/bitops.h>
 #include <asm/uaccess.h>
-#include <asm/cpm_8260.h>
+#include <asm/cpm2.h>
 
 /* The transmitter timeout
  */
@@ -159,20 +159,23 @@
 #define PA1_DIRA1	(PA1_TXDAT | PA1_TXEN | PA1_TXER)
 
 #ifdef CONFIG_SBC82xx
-/* rx is clk9, tx is clk10
- */
+/* rx is clk9, tx is clk10 */
 #define PC_F1RXCLK     ((uint)0x00000100)
 #define PC_F1TXCLK     ((uint)0x00000200)
 #define CMX1_CLK_ROUTE ((uint)0x25000000)
 #define CMX1_CLK_MASK  ((uint)0xff000000)
-#else
-/* CLK12 is receive, CLK11 is transmit.  These are board specific.
-*/
+#elif defined(CONFIG_ADS8272)
+#define PC_F1RXCLK	((uint)0x00000400)
+#define PC_F1TXCLK	((uint)0x00000200)
+#define CMX1_CLK_ROUTE	((uint)0x36000000)
+#define CMX1_CLK_MASK	((uint)0xff000000)
+#else /* other boards */
+/* CLK12 is receive, CLK11 is transmit.  These are board specific. */
 #define PC_F1RXCLK	((uint)0x00000800)
 #define PC_F1TXCLK	((uint)0x00000400)
 #define CMX1_CLK_ROUTE	((uint)0x3e000000)
 #define CMX1_CLK_MASK	((uint)0xff000000)
-#endif /* !CONFIG_SBC82xx */
+#endif
 
 /* I/O Pin assignment for FCC2.  I don't yet know the best way to do this,
  * but there is little variation among the choices.
@@ -193,10 +196,17 @@
 
 /* CLK13 is receive, CLK14 is transmit.  These are board dependent.
 */
+#ifdef CONFIG_ADS8272
+#define PC_F2RXCLK	((uint)0x00004000)
+#define PC_F2TXCLK	((uint)0x00008000)
+#define CMX2_CLK_ROUTE	((uint)0x00370000)
+#define CMX2_CLK_MASK	((uint)0x00ff0000)
+#else
 #define PC_F2RXCLK	((uint)0x00001000)
 #define PC_F2TXCLK	((uint)0x00002000)
 #define CMX2_CLK_ROUTE	((uint)0x00250000)
 #define CMX2_CLK_MASK	((uint)0x00ff0000)
+#endif
 
 /* I/O Pin assignment for FCC3.  I don't yet know the best way to do this,
  * but there is little variation among the choices.
@@ -228,6 +238,9 @@
 /* TQM8260 has MDIO and MDCK on PC30 and PC31 respectively */
 #define PC_MDIO		((uint)0x00000002)
 #define PC_MDCK		((uint)0x00000001)
+#elif defined(CONFIG_ADS8272)
+#define PC_MDIO		((uint)0x00002000)
+#define PC_MDCK		((uint)0x00001000)
 #else
 #define PC_MDIO		((uint)0x00000004)
 #define PC_MDCK		((uint)0x00000020)
@@ -255,7 +268,7 @@
 #ifdef CONFIG_FCC1_ENET
 	{ 0, CPM_CR_FCC1_SBLOCK, CPM_CR_FCC1_PAGE, PROFF_FCC1, SIU_INT_FCC1,
 		(PC_F1RXCLK | PC_F1TXCLK), CMX1_CLK_ROUTE, CMX1_CLK_MASK,
-# if defined(CONFIG_TQM8260)
+# if defined(CONFIG_TQM8260) || defined(CONFIG_ADS8272)
 		PC_MDIO, PC_MDCK },
 # else
 		0x00000004, 0x00000100 },
@@ -264,7 +277,7 @@
 #ifdef CONFIG_FCC2_ENET
 	{ 1, CPM_CR_FCC2_SBLOCK, CPM_CR_FCC2_PAGE, PROFF_FCC2, SIU_INT_FCC2,
 		(PC_F2RXCLK | PC_F2TXCLK), CMX2_CLK_ROUTE, CMX2_CLK_MASK,
-# if defined(CONFIG_TQM8260)
+# if defined(CONFIG_TQM8260) || defined(CONFIG_ADS8272)
 		PC_MDIO, PC_MDCK },
 # elif defined(CONFIG_EST8260) || defined(CONFIG_ADS8260)
 		0x00400000, 0x00200000 },
@@ -275,7 +288,7 @@
 #ifdef CONFIG_FCC3_ENET
 	{ 2, CPM_CR_FCC3_SBLOCK, CPM_CR_FCC3_PAGE, PROFF_FCC3, SIU_INT_FCC3,
 		(PC_F3RXCLK | PC_F3TXCLK), CMX3_CLK_ROUTE, CMX3_CLK_MASK,
-# if defined(CONFIG_TQM8260)
+# if defined(CONFIG_TQM8260) || defined(CONFIG_ADS8272)
 		PC_MDIO, PC_MDCK },
 # else
 		0x00000001, 0x00000040 },
@@ -331,12 +344,12 @@
 };
 
 static void init_fcc_shutdown(fcc_info_t *fip, struct fcc_enet_private *cep,
-	volatile immap_t *immap);
+	volatile cpm2_map_t *immap);
 static void init_fcc_startup(fcc_info_t *fip, struct net_device *dev);
-static void init_fcc_ioports(fcc_info_t *fip, volatile iop8260_t *io,
-	volatile immap_t *immap);
+static void init_fcc_ioports(fcc_info_t *fip, volatile iop_cpm2_t *io,
+	volatile cpm2_map_t *immap);
 static void init_fcc_param(fcc_info_t *fip, struct net_device *dev,
-	volatile immap_t *immap);
+	volatile cpm2_map_t *immap);
 
 #ifdef	CONFIG_USE_MDIO
 static int	mii_queue(struct net_device *dev, int request, void (*func)(uint, struct net_device *));
@@ -586,7 +599,7 @@
 	    }
 
 	    if (must_restart) {
-		volatile cpm8260_t *cp;
+		volatile cpm_cpm2_t *cp;
 
 		/* Some transmit errors cause the transmitter to shut
 		 * down.  We now issue a restart transmit.  Since the
@@ -1052,6 +1065,75 @@
 #endif /* CONFIG_FEC_QS6612 */
 
 
+/* ------------------------------------------------------------------------- */
+/* The Davicom DM9131 is used on the HYMOD board			     */
+
+#ifdef CONFIG_FCC_DM9131
+
+/* register definitions */
+
+#define MII_DM9131_ACR		16	/* Aux. Config Register		*/
+#define MII_DM9131_ACSR		17	/* Aux. Config/Status Register	*/
+#define MII_DM9131_10TCSR	18	/* 10BaseT Config/Status Reg.	*/
+#define MII_DM9131_INTR		21	/* Interrupt Register		*/
+#define MII_DM9131_RECR		22	/* Receive Error Counter Reg.	*/
+#define MII_DM9131_DISCR	23	/* Disconnect Counter Register	*/
+
+static void mii_parse_dm9131_acsr(uint mii_reg, struct net_device *dev)
+{
+	volatile struct fcc_enet_private *fep = dev->priv;
+	uint s = fep->phy_status;
+
+	s &= ~(PHY_STAT_SPMASK);
+
+	switch ((mii_reg >> 12) & 0xf) {
+	case 1: s |= PHY_STAT_10HDX;  break;
+	case 2: s |= PHY_STAT_10FDX;  break;
+	case 4: s |= PHY_STAT_100HDX; break;
+	case 8: s |= PHY_STAT_100FDX; break;
+	}
+
+	fep->phy_status = s;
+}
+
+static phy_info_t phy_info_dm9131 = {
+	0x00181b80,
+	"DM9131",
+
+	(const phy_cmd_t []) {  /* config */
+		/* parse cr and anar to get some info */
+		{ mk_mii_read(MII_REG_CR), mii_parse_cr },
+		{ mk_mii_read(MII_REG_ANAR), mii_parse_anar },
+		{ mk_mii_end, }
+	},
+	(const phy_cmd_t []) {  /* startup - enable interrupts */
+		{ mk_mii_write(MII_DM9131_INTR, 0x0002), NULL },
+		{ mk_mii_write(MII_REG_CR, 0x1200), NULL }, /* autonegotiate */
+		{ mk_mii_end, }
+	},
+	(const phy_cmd_t []) { /* ack_int */
+
+		/* we need to read INTR, SR and ANER to acknowledge */
+
+		{ mk_mii_read(MII_DM9131_INTR), NULL },
+		{ mk_mii_read(MII_REG_SR), mii_parse_sr },
+		{ mk_mii_read(MII_REG_ANER), NULL },
+
+		/* read acsr to get info */
+
+		{ mk_mii_read(MII_DM9131_ACSR), mii_parse_dm9131_acsr },
+		{ mk_mii_end, }
+	},
+	(const phy_cmd_t []) {  /* shutdown - disable interrupts */
+		{ mk_mii_write(MII_DM9131_INTR, 0x0f00), NULL },
+		{ mk_mii_end, }
+	},
+};
+
+
+#endif /* CONFIG_FEC_DM9131 */
+
+
 static phy_info_t *phy_info[] = {
 
 #ifdef CONFIG_FCC_LXT970
@@ -1064,7 +1146,11 @@
 
 #ifdef CONFIG_FCC_QS6612
 	&phy_info_qs6612,
-#endif /* CONFIG_FEC_LXT971 */
+#endif /* CONFIG_FEC_QS6612 */
+
+#ifdef CONFIG_FCC_DM9131
+	&phy_info_dm9131,
+#endif /* CONFIG_FEC_DM9131 */
 
 	NULL
 };
@@ -1361,10 +1447,10 @@
 	struct fcc_enet_private *cep;
 	fcc_info_t	*fip;
 	int	i, np, err;
-	volatile	immap_t		*immap;
-	volatile	iop8260_t	*io;
+	volatile	cpm2_map_t		*immap;
+	volatile	iop_cpm2_t	*io;
 
-	immap = (immap_t *)IMAP_ADDR;	/* and to internal registers */
+	immap = (cpm2_map_t *)CPM_MAP_ADDR;	/* and to internal registers */
 	io = &immap->im_ioport;
 
 	np = sizeof(fcc_ports) / sizeof(fcc_info_t);
@@ -1431,7 +1517,7 @@
 */
 static void __init
 init_fcc_shutdown(fcc_info_t *fip, struct fcc_enet_private *cep,
-						volatile immap_t *immap)
+						volatile cpm2_map_t *immap)
 {
 	volatile	fcc_enet_t	*ep;
 	volatile	fcc_t		*fccp;
@@ -1454,8 +1540,8 @@
 /* Initialize the I/O pins for the FCC Ethernet.
 */
 static void __init
-init_fcc_ioports(fcc_info_t *fip, volatile iop8260_t *io,
-						volatile immap_t *immap)
+init_fcc_ioports(fcc_info_t *fip, volatile iop_cpm2_t *io,
+						volatile cpm2_map_t *immap)
 {
 
 	/* FCC1 pins are on port A/C.  FCC2/3 are port B/C.
@@ -1513,7 +1599,7 @@
 
 static void __init
 init_fcc_param(fcc_info_t *fip, struct net_device *dev,
-						volatile immap_t *immap)
+						volatile cpm2_map_t *immap)
 {
 	unsigned char	*eap;
 	unsigned long	mem_addr;
@@ -1522,7 +1608,7 @@
 	struct		fcc_enet_private *cep;
 	volatile	fcc_enet_t	*ep;
 	volatile	cbd_t		*bdp;
-	volatile	cpm8260_t	*cp;
+	volatile	cpm_cpm2_t	*cp;
 
 	cep = (struct fcc_enet_private *)(dev->priv);
 	ep = cep->ep;
@@ -1535,28 +1621,15 @@
 	 */
 	memset((char *)ep, 0, sizeof(fcc_enet_t));
 
-	/* Allocate space for the buffer descriptors in the DP ram.
-	 * These are relative offsets in the DP ram address space.
+	/* Allocate space for the buffer descriptors from regular memory.
 	 * Initialize base addresses for the buffer descriptors.
 	 */
-#if 0
-	/* I really want to do this, but for some reason it doesn't
-	 * work with the data cache enabled, so I allocate from the
-	 * main memory instead.
-	 */
-	i = m8260_cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8);
-	ep->fen_genfcc.fcc_rbase = (uint)&immap->im_dprambase[i];
-	cep->rx_bd_base = (cbd_t *)&immap->im_dprambase[i];
-
-	i = m8260_cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8);
-	ep->fen_genfcc.fcc_tbase = (uint)&immap->im_dprambase[i];
-	cep->tx_bd_base = (cbd_t *)&immap->im_dprambase[i];
-#else
-	cep->rx_bd_base = (cbd_t *)m8260_cpm_hostalloc(sizeof(cbd_t) * RX_RING_SIZE, 8);
+	cep->rx_bd_base = (cbd_t *)kmalloc(sizeof(cbd_t) * RX_RING_SIZE,
+			GFP_KERNEL | GFP_DMA);
 	ep->fen_genfcc.fcc_rbase = __pa(cep->rx_bd_base);
-	cep->tx_bd_base = (cbd_t *)m8260_cpm_hostalloc(sizeof(cbd_t) * TX_RING_SIZE, 8);
+	cep->tx_bd_base = (cbd_t *)kmalloc(sizeof(cbd_t) * TX_RING_SIZE,
+			GFP_KERNEL | GFP_DMA);
 	ep->fen_genfcc.fcc_tbase = __pa(cep->tx_bd_base);
-#endif
 
 	cep->dirty_tx = cep->cur_tx = cep->tx_bd_base;
 	cep->cur_rx = cep->rx_bd_base;
@@ -1773,11 +1846,11 @@
 	 */
 	fccp->fcc_fpsmr = FCC_PSMR_ENCRC;
 
-#ifdef CONFIG_ADS8260
+#ifdef CONFIG_PQ2ADS
 	/* Enable the PHY.
 	*/
-	ads_csr_addr[1] |= BCSR1_FETH_RST;	/* Remove reset */
-	ads_csr_addr[1] &= ~BCSR1_FETHIEN;	/* Enable */
+        *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_FETHIEN;
+        *(volatile uint *)(BCSR_ADDR + 4) |=  BCSR1_FETH_RST;
 #endif
 
 #if defined(CONFIG_USE_MDIO) || defined(CONFIG_TQM8260)
@@ -1817,10 +1890,10 @@
 {
 	uint		retval;
 	int		read_op, i, off;
-	volatile	immap_t		*immap;
-	volatile	iop8260_t	*io;
+	volatile	cpm2_map_t		*immap;
+	volatile	iop_cpm2_t	*io;
 
-	immap = (immap_t *)IMAP_ADDR;
+	immap = (cpm2_map_t *)CPM_MAP_ADDR;
 	io = &immap->im_ioport;
 
 	io->iop_pdirc |= (fip->fc_mdio | fip->fc_mdck);
--- diff/arch/ppc/8xx_io/commproc.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/8xx_io/commproc.c	2004-07-01 21:32:33.000000000 +0100
@@ -27,6 +27,7 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 #include <asm/irq.h>
 #include <asm/mpc8xx.h>
 #include <asm/page.h>
@@ -34,11 +35,11 @@
 #include <asm/8xx_immap.h>
 #include <asm/commproc.h>
 #include <asm/io.h>
+#include <asm/rheap.h>
 
 extern int get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep);
 
-static	uint	dp_alloc_base;	/* Starting offset in DP ram */
-static	uint	dp_alloc_top;	/* Max offset + 1 */
+static void m8xx_cpm_dpinit(void);
 static	uint	host_buffer;	/* One page of host buffer */
 static	uint	host_end;	/* end + 1 */
 cpm8xx_t	*cpmp;		/* Pointer to comm processor space */
@@ -84,10 +85,8 @@
 	 */
 	imp->im_siu_conf.sc_sdcr = 1;
 
-	/* Reclaim the DP memory for our use.
-	*/
-	dp_alloc_base = CPM_DATAONLY_BASE;
-	dp_alloc_top = dp_alloc_base + CPM_DATAONLY_SIZE;
+	/* Reclaim the DP memory for our use. */
+	m8xx_cpm_dpinit();
 
 	/* Tell everyone where the comm processor resides.
 	*/
@@ -138,10 +137,8 @@
 	*/
 	imp->im_siu_conf.sc_sdcr = 1;
 
-	/* Reclaim the DP memory for our use.
-	*/
-	dp_alloc_base = CPM_DATAONLY_BASE;
-	dp_alloc_top = dp_alloc_base + CPM_DATAONLY_SIZE;
+	/* Reclaim the DP memory for our use. */
+	m8xx_cpm_dpinit();
 
 	/* Set the host page for allocation.
 	*/
@@ -257,30 +254,6 @@
 	((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr &= ~(1 << vec);
 }
 
-/* Allocate some memory from the dual ported ram.  We may want to
- * enforce alignment restrictions, but right now everyone is a good
- * citizen.
- */
-uint
-m8xx_cpm_dpalloc(uint size)
-{
-	uint	retloc;
-
-	if ((dp_alloc_base + size) >= dp_alloc_top)
-		return(CPM_DP_NOSPACE);
-
-	retloc = dp_alloc_base;
-	dp_alloc_base += size;
-
-	return(retloc);
-}
-
-uint
-m8xx_cpm_dpalloc_index(void)
-{
-	return dp_alloc_base;
-}
-
 /* We also own one page of host buffer space for the allocation of
  * UART "fifos" and the like.
  */
@@ -330,3 +303,102 @@
 		*bp = (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) |
 						CPM_BRG_EN | CPM_BRG_DIV16;
 }
+
+/*
+ * dpalloc / dpfree bits.
+ */
+static spinlock_t cpm_dpmem_lock;
+/*
+ * 16 blocks should be enough to satisfy all requests
+ * until the memory subsystem goes up...
+ */
+static rh_block_t cpm_boot_dpmem_rh_block[16];
+static rh_info_t cpm_dpmem_info;
+
+#define CPM_DPMEM_ALIGNMENT	8
+
+void m8xx_cpm_dpinit(void)
+{
+	cpm8xx_t *cp = &((immap_t *)IMAP_ADDR)->im_cpm;
+
+	spin_lock_init(&cpm_dpmem_lock);
+
+	/* Initialize the info header */
+	rh_init(&cpm_dpmem_info, CPM_DPMEM_ALIGNMENT,
+			sizeof(cpm_boot_dpmem_rh_block) /
+			sizeof(cpm_boot_dpmem_rh_block[0]),
+			cpm_boot_dpmem_rh_block);
+
+	/*
+	 * Attach the usable dpmem area.
+	 * XXX: This is actually crap.  CPM_DATAONLY_BASE and
+	 * CPM_DATAONLY_SIZE are a subset of the available dparm.  It varies
+	 * with the processor and the microcode patches applied / activated.
+	 * But the following should be at least safe.
+	 */
+	rh_attach_region(&cpm_dpmem_info, cp->cp_dpmem + CPM_DATAONLY_BASE,
+			CPM_DATAONLY_SIZE);
+}
+
+/*
+ * Allocate the requested size worth of DP memory.
+ * This function used to return an index into the DPRAM area.
+ * Now it returns the actuall physical address of that area.
+ * use m8xx_cpm_dpram_offset() to get the index
+ */
+void *m8xx_cpm_dpalloc(int size)
+{
+	void *start;
+	unsigned long flags;
+
+	spin_lock_irqsave(&cpm_dpmem_lock, flags);
+	start = rh_alloc(&cpm_dpmem_info, size, "commproc");
+	spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
+
+	return start;
+}
+EXPORT_SYMBOL(m8xx_cpm_dpalloc);
+
+int m8xx_cpm_dpfree(void *addr)
+{
+	int ret;
+	unsigned long flags;
+
+	spin_lock_irqsave(&cpm_dpmem_lock, flags);
+	ret = rh_free(&cpm_dpmem_info, addr);
+	spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
+
+	return ret;
+}
+EXPORT_SYMBOL(m8xx_cpm_dpfree);
+
+void *m8xx_cpm_dpalloc_fixed(void *addr, int size)
+{
+	void *start;
+	unsigned long flags;
+
+	spin_lock_irqsave(&cpm_dpmem_lock, flags);
+	start = rh_alloc_fixed(&cpm_dpmem_info, addr, size, "commproc");
+	spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
+
+	return start;
+}
+EXPORT_SYMBOL(m8xx_cpm_dpalloc_fixed);
+
+void m8xx_cpm_dpdump(void)
+{
+	rh_dump(&cpm_dpmem_info);
+}
+EXPORT_SYMBOL(m8xx_cpm_dpdump);
+
+int m8xx_cpm_dpram_offset(void *addr)
+{
+	return (u_char *)addr - ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem;
+}
+EXPORT_SYMBOL(m8xx_cpm_dpram_offset);
+
+void *m8xx_cpm_dpram_addr(int offset)
+{
+	return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset;
+}
+EXPORT_SYMBOL(m8xx_cpm_dpram_addr);
--- diff/arch/ppc/8xx_io/cs4218_tdm.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/8xx_io/cs4218_tdm.c	2004-07-01 21:32:33.000000000 +0100
@@ -2463,7 +2463,7 @@
 int __init tdm8xx_sound_init(void)
 {
 	int i, has_sound;
-	uint			dp_addr;
+	uint			dp_addr, dp_mem;
 	volatile uint		*sirp;
 	volatile cbd_t		*bdp;
 	volatile cpm8xx_t	*cp;
@@ -2525,14 +2525,15 @@
 	/* We need to allocate a transmit and receive buffer
 	 * descriptors from dual port ram.
 	 */
-	dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * numReadBufs);
+	dp_mem = m8xx_cpm_dpalloc(sizeof(cbd_t) * numReadBufs);
+	dp_addr = m8xx_cpm_dpram_offset(dp_mem);
 
 	/* Set the physical address of the host memory
 	 * buffers in the buffer descriptors, and the
 	 * virtual address for us to work with.
 	 */
 	bdp = (cbd_t *)&cp->cp_dpmem[dp_addr];
-	up->smc_rbase = dp_addr;
+	up->smc_rbase = dp_mem;
 	rx_cur = rx_base = (cbd_t *)bdp;
 
 	for (i=0; i<(numReadBufs-1); i++) {
@@ -2547,10 +2548,11 @@
 
 	/* Now, do the same for the transmit buffers.
 	*/
-	dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * numBufs);
+	dp_mem = m8xx_cpm_dpalloc(sizeof(cbd_t) * numBufs);
+	dp_addr = m8xx_cpm_dpram_offset(dp_mem);
 
 	bdp = (cbd_t *)&cp->cp_dpmem[dp_addr];
-	up->smc_tbase = dp_addr;
+	up->smc_tbase = dp_mem;
 	tx_cur = tx_base = (cbd_t *)bdp;
 
 	for (i=0; i<(numBufs-1); i++) {
--- diff/arch/ppc/8xx_io/enet.c	2004-05-19 22:11:13.000000000 +0100
+++ source/arch/ppc/8xx_io/enet.c	2004-07-01 21:32:33.000000000 +0100
@@ -644,6 +644,8 @@
 	struct net_device *dev;
 	struct scc_enet_private *cep;
 	int i, j, k, err;
+	void *dp_mem;
+	unsigned int dp_addr;
 	unsigned char	*eap, *ba;
 	dma_addr_t	mem_addr;
 	bd_t		*bd;
@@ -738,13 +740,15 @@
 	 * These are relative offsets in the DP ram address space.
 	 * Initialize base addresses for the buffer descriptors.
 	 */
-	i = m8xx_cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE);
-	ep->sen_genscc.scc_rbase = i;
-	cep->rx_bd_base = (cbd_t *)&cp->cp_dpmem[i];
-
-	i = m8xx_cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE);
-	ep->sen_genscc.scc_tbase = i;
-	cep->tx_bd_base = (cbd_t *)&cp->cp_dpmem[i];
+	dp_mem = m8xx_cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE);
+	dp_addr = m8xx_cpm_dpram_offset(dp_mem);
+	ep->sen_genscc.scc_rbase = dp_mem;
+	cep->rx_bd_base = (cbd_t *)&cp->cp_dpmem[dp_addr];
+
+	dp_mem = m8xx_cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE);
+	dp_addr = m8xx_cpm_dpram_offset(dp_mem);
+	ep->sen_genscc.scc_tbase = dp_mem;
+	cep->tx_bd_base = (cbd_t *)&cp->cp_dpmem[dp_addr];
 
 	cep->dirty_tx = cep->cur_tx = cep->tx_bd_base;
 	cep->cur_rx = cep->rx_bd_base;
--- diff/arch/ppc/8xx_io/uart.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/8xx_io/uart.c	2004-07-01 21:32:33.000000000 +0100
@@ -2491,7 +2491,7 @@
 {
 	struct serial_state * state;
 	ser_info_t	*info;
-	uint		mem_addr, dp_addr, iobits;
+	uint		mem_addr, dp_addr, dp_mem, iobits;
 	int		i, j, idx;
 	ushort		chan;
 	volatile	cbd_t		*bdp;
@@ -2623,7 +2623,8 @@
 			 * descriptors from dual port ram, and a character
 			 * buffer area from host mem.
 			 */
-			dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * RX_NUM_FIFO);
+			dp_mem = m8xx_cpm_dpalloc(sizeof(cbd_t) * RX_NUM_FIFO);
+			dp_addr = m8xx_cpm_dpram_offset(dp_mem);
 
 			/* Allocate space for FIFOs in the host memory.
 			*/
@@ -2650,15 +2651,16 @@
 			if (info->state->smc_scc_num & NUM_IS_SCC) {
 				scp = &cp->cp_scc[idx];
 				sup = (scc_uart_t *)&cp->cp_dparam[state->port];
-				sup->scc_genscc.scc_rbase = dp_addr;
+				sup->scc_genscc.scc_rbase = dp_mem;
 			}
 			else {
 				sp = &cp->cp_smc[idx];
 				up = (smc_uart_t *)&cp->cp_dparam[state->port];
-				up->smc_rbase = dp_addr;
+				up->smc_rbase = dp_mem;
 			}
 
-			dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * TX_NUM_FIFO);
+			dp_mem = m8xx_cpm_dpalloc(sizeof(cbd_t) * TX_NUM_FIFO);
+			dp_addr = m8xx_cpm_dpram_offset(dp_mem);
 
 			/* Allocate space for FIFOs in the host memory.
 			*/
@@ -2682,7 +2684,7 @@
 			bdp->cbd_sc = (BD_SC_WRAP | BD_SC_INTRPT);
 
 			if (info->state->smc_scc_num & NUM_IS_SCC) {
-				sup->scc_genscc.scc_tbase = dp_addr;
+				sup->scc_genscc.scc_tbase = dp_mem;
 
 				/* Set up the uart parameters in the
 				 * parameter ram.
@@ -2779,7 +2781,7 @@
 				cp->cp_simode &= ~(0xffff << (idx * 16));
 				cp->cp_simode |= (i << ((idx * 16) + 12));
 
-				up->smc_tbase = dp_addr;
+				up->smc_tbase = dp_mem;
 
 				/* Set up the uart parameters in the
 				 * parameter ram.
@@ -2843,7 +2845,7 @@
 static int __init serial_console_setup(struct console *co, char *options)
 {
 	struct		serial_state *ser;
-	uint		mem_addr, dp_addr, bidx, idx;
+	uint		mem_addr, dp_addr, dp_mem, bidx, idx;
 	ushort		chan;
 	volatile	cbd_t		*bdp;
 	volatile	cpm8xx_t	*cp;
@@ -2889,12 +2891,14 @@
 	 * memory yet because vm allocator isn't initialized
 	 * during this early console init.
 	 */
-	dp_addr = m8xx_cpm_dpalloc(8);
+	dp_mem = m8xx_cpm_dpalloc(8);
+	dp_addr = m8xx_cpm_dpram_offset(dp_mem);
 	mem_addr = (uint)(&cpmp->cp_dpmem[dp_addr]);
 
 	/* Allocate space for two buffer descriptors in the DP ram.
 	*/
-	dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * 2);
+	dp_mem = m8xx_cpm_dpalloc(sizeof(cbd_t) * 2);
+	dp_addr = m8xx_cpm_dpram_offset(dp_mem);
 
 	/* Set the physical address of the host memory buffers in
 	 * the buffer descriptors.
@@ -2918,8 +2922,8 @@
 	*/
 	if (ser->smc_scc_num & NUM_IS_SCC) {
 
-		sup->scc_genscc.scc_rbase = dp_addr;
-		sup->scc_genscc.scc_tbase = dp_addr + sizeof(cbd_t);
+		sup->scc_genscc.scc_rbase = dp_mem;
+		sup->scc_genscc.scc_tbase = dp_mem + sizeof(cbd_t);
 
 		/* Set up the uart parameters in the
 		 * parameter ram.
@@ -2977,8 +2981,8 @@
 
 	}
 	else {
-		up->smc_rbase = dp_addr;	/* Base of receive buffer desc. */
-		up->smc_tbase = dp_addr+sizeof(cbd_t);	/* Base of xmt buffer desc. */
+		up->smc_rbase = dp_mem;	/* Base of receive buffer desc. */
+		up->smc_tbase = dp_mem+sizeof(cbd_t);	/* Base of xmt buffer desc. */
 		up->smc_rfcr = SMC_EB;
 		up->smc_tfcr = SMC_EB;
 
--- diff/arch/ppc/Kconfig	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/Kconfig	2004-07-01 21:32:33.000000000 +0100
@@ -72,8 +72,21 @@
 config 8xx
 	bool "8xx"
 
+config E500
+	bool "e500"
+
 endchoice
 
+config BOOKE
+	bool
+	depends on E500
+	default y
+
+config FSL_BOOKE
+	bool
+	depends on E500
+	default y
+
 config PTE_64BIT
 	bool
 	depends on 44x
@@ -96,6 +109,21 @@
 
 	  If in doubt, say Y here.
 
+config SPE
+	bool "SPE Support"
+	depends on E500
+	---help---
+	  This option enables kernel support for the Signal Processing
+	  Extensions (SPE) to the PowerPC processor. The kernel currently
+	  supports saving and restoring SPE registers, and turning on the
+	  'spe enable' bit so user processes can execute SPE instructions.
+
+	  This option is only usefully if you have a processor that supports
+	  SPE (e500, otherwise known as 85xx series), but does not have any
+	  affect on a non-spe cpu (it does, however add code to the kernel).
+
+	  If in doubt, say Y here.
+
 config TAU
 	bool "Thermal Management Support"
 	depends on 6xx && !8260
@@ -142,7 +170,7 @@
 
 config MATH_EMULATION
 	bool "Math emulation"
-	depends on 4xx || 8xx
+	depends on 4xx || 8xx || E500
 	---help---
 	  Some PowerPC chips designed for embedded applications do not have
 	  a floating-point unit and therefore do not implement the
@@ -198,6 +226,7 @@
 	  If in doubt, say Y here.
 
 source arch/ppc/platforms/4xx/Kconfig
+source arch/ppc/platforms/85xx/Kconfig
 
 config PPC64BRIDGE
 	bool
@@ -214,6 +243,8 @@
 	depends on 4xx || 8xx
 	default y
 
+source "drivers/perfctr/Kconfig"
+
 endmenu
 
 menu "Platform options"
@@ -569,8 +600,16 @@
 	  End of Life: not yet :-)
 	  URL: <http://www.denx.de/PDF/TQM82xx_SPEC_Rev005.pdf>
 
+config ADS8272
+	bool "ADS8272"
+
 endchoice
 
+config PQ2ADS
+	bool
+	depends on ADS8272
+	default y
+
 config TQM8xxL
 	bool
 	depends on 8xx && (TQM823L || TQM850L || FPS850L || TQM855L || TQM860L || SM850)
@@ -582,14 +621,32 @@
 	default y
 
 config 8260
-	bool "MPC8260 CPM Support" if WILLOW
+	bool "CPM2 Support" if WILLOW
 	depends on 6xx
 	default y if TQM8260 || RPXSUPER || EST8260 || SBS8260 || SBC82xx
 	help
-	  The MPC8260 CPM (Communications Processor Module) is a typical
-	  embedded CPU made by Motorola.  Selecting this option means that
-	  you wish to build a kernel for a machine with specifically an 8260
-	  for a CPU.
+	  The MPC8260 is a typical embedded CPU made by Motorola.  Selecting
+	  this option means that you wish to build a kernel for a machine with
+	  an 8260 class CPU.
+
+config 8272
+	bool
+	depends on 6xx
+	default y if ADS8272
+	select 8260
+	help
+	  The MPC8272 CPM has a different internal dpram setup than other CPM2
+	  devices
+
+config CPM2
+	bool
+	depends on 8260
+	default y
+	help
+	  The CPM2 (Communications Processor Module) is a coprocessor on
+	  embedded CPUs made by Motorola.  Selecting this option means that
+	  you wish to build a kernel for a machine with a CPM2 coprocessor
+	  on it (826x, 827x, 8560).
 
 config PPC_CHRP
 	bool
@@ -672,11 +729,11 @@
 
 config PC_KEYBOARD
 	bool "PC PS/2 style Keyboard"
-	depends on 4xx || 8260
+	depends on 4xx || CPM2
 
 config SERIAL_CONSOLE
 	bool
-	depends on 8xx || 8260
+	depends on 8xx
 	default y
 
 config SERIAL_CONSOLE_BAUD
@@ -957,7 +1014,7 @@
 
 config GENERIC_ISA_DMA
 	bool
-	depends on POWER3 || POWER4 || 6xx && !8260
+	depends on POWER3 || POWER4 || 6xx && !CPM2
 	default y
 
 config EISA
@@ -974,10 +1031,10 @@
 	bool
 
 config PCI
-	bool "PCI support" if 40x || 8260
-	default y if !40x && !8260 && !8xx && !APUS
-	default PCI_PERMEDIA if !4xx && !8260 && !8xx && APUS
-	default PCI_QSPAN if !4xx && !8260 && 8xx
+	bool "PCI support" if 40x || CPM2 || 85xx
+	default y if !40x && !CPM2 && !8xx && !APUS && !85xx
+	default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
+	default PCI_QSPAN if !4xx && !CPM2 && 8xx
 	help
 	  Find out whether your system includes a PCI bus. PCI is the name of
 	  a bus system, i.e. the way the CPU talks to the other stuff inside
@@ -990,11 +1047,39 @@
 
 config PCI_QSPAN
 	bool "QSpan PCI"
-	depends on !4xx && !8260 && 8xx
+	depends on !4xx && !CPM2 && 8xx
 	help
 	  Say Y here if you have a system based on a Motorola 8xx-series
 	  embedded processor with a QSPAN PCI interface, otherwise say N.
 
+config PCI_8260
+	bool
+	depends on PCI && 8260 && !8272
+	default y
+	
+config 8260_PCI9
+	bool "  Enable workaround for MPC826x erratum PCI 9"
+	depends on PCI_8260
+	default y
+
+choice 
+	prompt "  IDMA channel for PCI 9 workaround"
+	depends on 8260_PCI9
+
+config 8260_PCI9_IDMA1
+	bool "IDMA1"
+
+config 8260_PCI9_IDMA2
+	bool "IDMA2"
+
+config 8260_PCI9_IDMA3
+	bool "IDMA3"
+
+config 8260_PCI9_IDMA4
+	bool "IDMA4"
+
+endchoice
+
 config PCI_PERMEDIA
 	bool "PCI for Permedia2"
 	depends on !4xx && !8xx && APUS
@@ -1154,6 +1239,7 @@
 
 source "lib/Kconfig"
 
+source "arch/ppc/oprofile/Kconfig"
 
 menu "Kernel hacking"
 
@@ -1229,7 +1315,7 @@
 
 config KGDB_CONSOLE
 	bool "Enable serial console thru kgdb port"
-	depends on KGDB && 8xx || 8260
+	depends on KGDB && 8xx || CPM2
 	help
 	  If you enable this, all serial console messages will be sent
 	  over the gdb stub.
@@ -1273,7 +1359,7 @@
 
 config PPC_OCP
 	bool
-	depends on IBM_OCP
+	depends on IBM_OCP || FSL_OCP
 	default y
 
 endmenu
--- diff/arch/ppc/Makefile	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -17,19 +17,24 @@
 CPPFLAGS	+= -Iarch/$(ARCH)
 AFLAGS		+= -Iarch/$(ARCH)
 cflags-y	+= -Iarch/$(ARCH) -msoft-float -pipe \
-		-ffixed-r2 -Wno-uninitialized -mmultiple -mstring
+		-ffixed-r2 -Wno-uninitialized -mmultiple
 CPP		= $(CC) -E $(CFLAGS)
 
+ifndef CONFIG_E500
+cflags-y	+= -mstring
+endif
+
 cflags-$(CONFIG_4xx)		+= -Wa,-m405
+cflags-$(CONFIG_E500)		+= -Wa,-me500
 cflags-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
 
 CFLAGS += $(cflags-y)
 
-
 head-y				:= arch/ppc/kernel/head.o
 head-$(CONFIG_8xx)		:= arch/ppc/kernel/head_8xx.o
 head-$(CONFIG_4xx)		:= arch/ppc/kernel/head_4xx.o
 head-$(CONFIG_44x)		:= arch/ppc/kernel/head_44x.o
+head-$(CONFIG_E500)		:= arch/ppc/kernel/head_e500.o
 
 head-$(CONFIG_6xx)		+= arch/ppc/kernel/idle_6xx.o
 head-$(CONFIG_POWER4)		+= arch/ppc/kernel/idle_power4.o
@@ -37,12 +42,15 @@
 core-y				+= arch/ppc/kernel/ arch/ppc/platforms/ \
 				   arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/
 core-$(CONFIG_4xx)		+= arch/ppc/platforms/4xx/
+core-$(CONFIG_85xx)		+= arch/ppc/platforms/85xx/
 core-$(CONFIG_MATH_EMULATION)	+= arch/ppc/math-emu/
 core-$(CONFIG_XMON)		+= arch/ppc/xmon/
 core-$(CONFIG_APUS)		+= arch/ppc/amiga/
 drivers-$(CONFIG_8xx)		+= arch/ppc/8xx_io/
 drivers-$(CONFIG_4xx)		+= arch/ppc/4xx_io/
-drivers-$(CONFIG_8260)		+= arch/ppc/8260_io/
+drivers-$(CONFIG_CPM2)		+= arch/ppc/8260_io/
+
+drivers-$(CONFIG_OPROFILE)	+= arch/ppc/oprofile/
 
 BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm
 
--- diff/arch/ppc/boot/simple/embed_config.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/boot/simple/embed_config.c	2004-07-01 21:32:33.000000000 +0100
@@ -16,7 +16,7 @@
 #endif
 #ifdef CONFIG_8260
 #include <asm/mpc8260.h>
-#include <asm/immap_8260.h>
+#include <asm/immap_cpm2.h>
 #endif
 #ifdef CONFIG_40x
 #include <asm/io.h>
@@ -415,9 +415,9 @@
 {
 	uint	scmr, vco_out, clkin;
 	uint	plldf, pllmf, corecnf;
-	volatile immap_t	*ip;
+	volatile cpm2_map_t	*ip;
 
-	ip = (immap_t *)IMAP_ADDR;
+	ip = (cpm2_map_t *)CPM_MAP_ADDR;
 	scmr = ip->im_clkrst.car_scmr;
 
 	/* The clkin is always bus frequency.
@@ -457,9 +457,9 @@
 {
 	uint	scmr, main_clk, clkin;
 	uint	pllmf, corecnf;
-	volatile immap_t	*ip;
+	volatile cpm2_map_t	*ip;
 
-	ip = (immap_t *)IMAP_ADDR;
+	ip = (cpm2_map_t *)CPM_MAP_ADDR;
 	scmr = ip->im_clkrst.car_scmr;
 
 	/* The clkin is always bus frequency.
--- diff/arch/ppc/boot/simple/m8260_tty.c	2004-05-19 22:11:14.000000000 +0100
+++ source/arch/ppc/boot/simple/m8260_tty.c	2004-07-01 21:32:33.000000000 +0100
@@ -3,7 +3,8 @@
  */
 #include <linux/types.h>
 #include <asm/mpc8260.h>
-#include <asm/cpm_8260.h>
+#include <asm/cpm2.h>
+#include <asm/immap_cpm2.h>
 
 uint	no_print;
 extern char	*params[];
@@ -29,12 +30,12 @@
 	volatile scc_uart_t	*sup;
 #endif
 	volatile cbd_t	*tbdf, *rbdf;
-	volatile immap_t	*ip;
-	volatile iop8260_t	*io;
-	volatile cpm8260_t	*cp;
+	volatile cpm2_map_t	*ip;
+	volatile iop_cpm2_t	*io;
+	volatile cpm_cpm2_t	*cp;
 	uint	dpaddr, memaddr;
 
-	ip = (immap_t *)IMAP_ADDR;
+	ip = (cpm2_map_t *)CPM_MAP_ADDR;
 	cp = &ip->im_cpm;
 	io = &ip->im_ioport;
 
@@ -223,10 +224,10 @@
 	volatile char		*buf;
 	volatile smc_uart_t	*up;
 	volatile scc_uart_t	*sup;
-	volatile immap_t	*ip;
+	volatile cpm2_map_t	*ip;
 	int	i, nc;
 
-	ip = (immap_t *)IMAP_ADDR;
+	ip = (cpm2_map_t *)CPM_MAP_ADDR;
 
 #ifdef SCC_CONSOLE
 	sup = (scc_uart_t *)&ip->im_dprambase[PROFF_SCC1 + ((SCC_CONSOLE-1) << 8)];
@@ -255,10 +256,10 @@
 	volatile char		*buf;
 	volatile smc_uart_t	*up;
 	volatile scc_uart_t	*sup;
-	volatile immap_t	*ip;
+	volatile cpm2_map_t	*ip;
 	extern bd_t		*board_info;
 
-	ip = (immap_t *)IMAP_ADDR;
+	ip = (cpm2_map_t *)CPM_MAP_ADDR;
 #ifdef SCC_CONSOLE
 	sup = (scc_uart_t *)&ip->im_dprambase[PROFF_SCC1 + ((SCC_CONSOLE-1) << 8)];
 	tbdf = (cbd_t *)&ip->im_dprambase[sup->scc_genscc.scc_tbase];
@@ -298,9 +299,9 @@
 	volatile cbd_t		*rbdf;
 	volatile smc_uart_t	*up;
 	volatile scc_uart_t	*sup;
-	volatile immap_t	*ip;
+	volatile cpm2_map_t	*ip;
 
-	ip = (immap_t *)IMAP_ADDR;
+	ip = (cpm2_map_t *)CPM_MAP_ADDR;
 #ifdef SCC_CONSOLE
 	sup = (scc_uart_t *)&ip->im_dprambase[PROFF_SCC1 + ((SCC_CONSOLE-1) << 8)];
 	rbdf = (cbd_t *)&ip->im_dprambase[sup->scc_genscc.scc_rbase];
--- diff/arch/ppc/defconfig	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/defconfig	2004-07-01 21:32:33.000000000 +0100
@@ -1230,7 +1230,7 @@
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V4 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=y
--- diff/arch/ppc/kernel/Makefile	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -8,10 +8,14 @@
 ifdef CONFIG_4xx
 EXTRA_AFLAGS		:= -Wa,-m405
 endif
+ifdef CONFIG_E500
+EXTRA_AFLAGS		:= -Wa,-me500
+endif
 
 extra-$(CONFIG_PPC_STD_MMU)	:= head.o
 extra-$(CONFIG_40x)		:= head_4xx.o
 extra-$(CONFIG_44x)		:= head_44x.o
+extra-$(CONFIG_E500)		:= head_e500.o
 extra-$(CONFIG_8xx)		:= head_8xx.o
 extra-$(CONFIG_6xx)		+= idle_6xx.o
 extra-$(CONFIG_POWER4)		+= idle_power4.o
--- diff/arch/ppc/kernel/align.c	2004-05-19 22:11:15.000000000 +0100
+++ source/arch/ppc/kernel/align.c	2004-07-01 21:32:33.000000000 +0100
@@ -21,7 +21,7 @@
 	unsigned char flags;
 };
 
-#if defined(CONFIG_4xx) || defined(CONFIG_POWER4)
+#if defined(CONFIG_4xx) || defined(CONFIG_POWER4) || defined(CONFIG_BOOKE)
 #define	OPCD(inst)	(((inst) & 0xFC000000) >> 26)
 #define	RS(inst)	(((inst) & 0x03E00000) >> 21)
 #define	RA(inst)	(((inst) & 0x001F0000) >> 16)
@@ -184,7 +184,7 @@
 fix_alignment(struct pt_regs *regs)
 {
 	int instr, nb, flags;
-#if defined(CONFIG_4xx) || defined(CONFIG_POWER4)
+#if defined(CONFIG_4xx) || defined(CONFIG_POWER4) || defined(CONFIG_BOOKE)
 	int opcode, f1, f2, f3;
 #endif
 	int i, t;
@@ -199,8 +199,8 @@
 
 	CHECK_FULL_REGS(regs);
 
-#if defined(CONFIG_4xx) || defined(CONFIG_POWER4)
-	/* The 4xx-family processors have no DSISR register,
+#if defined(CONFIG_4xx) || defined(CONFIG_POWER4) || defined(CONFIG_BOOKE)
+	/* The 4xx-family & Book-E processors have no DSISR register,
 	 * so we emulate it.
 	 * The POWER4 has a DSISR register but doesn't set it on
 	 * an alignment fault.  -- paulus
@@ -250,7 +250,7 @@
 
 	flags = aligninfo[instr].flags;
 
-	/* For the 4xx-family processors, the 'dar' field of the
+	/* For the 4xx-family & Book-E processors, the 'dar' field of the
 	 * pt_regs structure is overloaded and is really from the DEAR.
 	 */
 
--- diff/arch/ppc/kernel/asm-offsets.c	2004-05-19 22:11:15.000000000 +0100
+++ source/arch/ppc/kernel/asm-offsets.c	2004-07-01 21:32:33.000000000 +0100
@@ -44,7 +44,7 @@
 	DEFINE(THREAD_FPEXC_MODE, offsetof(struct thread_struct, fpexc_mode));
 	DEFINE(THREAD_FPR0, offsetof(struct thread_struct, fpr[0]));
 	DEFINE(THREAD_FPSCR, offsetof(struct thread_struct, fpscr));
-#ifdef CONFIG_4xx
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
 	DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0));
 	DEFINE(PT_PTRACED, PT_PTRACED);
 #endif
@@ -54,6 +54,12 @@
 	DEFINE(THREAD_VSCR, offsetof(struct thread_struct, vscr));
 	DEFINE(THREAD_USED_VR, offsetof(struct thread_struct, used_vr));
 #endif /* CONFIG_ALTIVEC */
+#ifdef CONFIG_SPE
+	DEFINE(THREAD_EVR0, offsetof(struct thread_struct, evr[0]));
+	DEFINE(THREAD_ACC, offsetof(struct thread_struct, acc));
+	DEFINE(THREAD_SPEFSCR, offsetof(struct thread_struct, spefscr));
+	DEFINE(THREAD_USED_SPE, offsetof(struct thread_struct, used_spe));
+#endif /* CONFIG_SPE */
 	/* Interrupt register frame */
 	DEFINE(STACK_FRAME_OVERHEAD, STACK_FRAME_OVERHEAD);
 	DEFINE(INT_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs));
--- diff/arch/ppc/kernel/cputable.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/cputable.c	2004-07-01 21:32:33.000000000 +0100
@@ -34,7 +34,8 @@
 extern void __setup_cpu_generic(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
 
 #define CLASSIC_PPC (!defined(CONFIG_8xx) && !defined(CONFIG_4xx) && \
-		     !defined(CONFIG_POWER3) && !defined(CONFIG_POWER4))
+		     !defined(CONFIG_POWER3) && !defined(CONFIG_POWER4) && \
+		     !defined(CONFIG_BOOKE))
 
 /* This table only contains "desktop" CPUs, it need to be filled with embedded
  * ones as well...
@@ -561,6 +562,16 @@
         0, /*__setup_cpu_440 */
     },
 #endif /* CONFIG_44x */
+#ifdef CONFIG_E500
+    { /* e500 */
+        0xffff0000, 0x80200000, "e500",
+	/* xxx - galak: add CPU_FTR_CAN_DOZE */
+        CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB,
+        PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
+        32, 32,
+        0, /*__setup_cpu_e500 */
+    },
+#endif
 #if !CLASSIC_PPC
     {	/* default match */
     	0x00000000, 0x00000000, "(generic PPC)",
--- diff/arch/ppc/kernel/entry.S	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/entry.S	2004-07-01 21:32:33.000000000 +0100
@@ -36,7 +36,7 @@
 #undef SHOW_SYSCALLS_TASK
 
 /*
- * MSR_KERNEL is > 0x10000 on 4xx since it include MSR_CE.
+ * MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE.
  */
 #if MSR_KERNEL >= 0x10000
 #define LOAD_MSR_KERNEL(r, x)	lis r,(x)@h; ori r,r,(x)@l
@@ -45,7 +45,7 @@
 #endif
 
 #ifdef CONFIG_BOOKE
-#define	COR	r8
+#define	COR	r8	/* Critical Offset Register (COR) */
 #define BOOKE_LOAD_COR	lis COR,crit_save@ha
 #define BOOKE_REST_COR	mfspr COR,SPRG2
 #define BOOKE_SAVE_COR	mtspr SPRG2,COR
@@ -241,11 +241,11 @@
 	andi.	r0,r9,(_TIF_SYSCALL_TRACE|_TIF_SIGPENDING|_TIF_NEED_RESCHED)
 	bne-	syscall_exit_work
 syscall_exit_cont:
-#ifdef CONFIG_4xx
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
 	/* If the process has its own DBCR0 value, load it up */
 	lwz	r0,PTRACE(r2)
 	andi.	r0,r0,PT_PTRACED
-	bnel-	load_4xx_dbcr0
+	bnel-	load_dbcr0
 #endif
 	stwcx.	r0,0,r1			/* to clear the reservation */
 	lwz	r4,_LINK(r1)
@@ -510,7 +510,12 @@
 	stw	r12,THREAD+THREAD_VRSAVE(r2)
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 #endif /* CONFIG_ALTIVEC */
-	and.	r0,r0,r11	/* FP or altivec enabled? */
+#ifdef CONFIG_SPE
+	oris	r0,r0,MSR_SPE@h	 /* Disable SPE */
+	mfspr	r12,SPRN_SPEFSCR /* save spefscr register value */
+	stw	r12,THREAD+THREAD_SPEFSCR(r2)
+#endif /* CONFIG_SPE */
+	and.	r0,r0,r11	/* FP or altivec or SPE enabled? */
 	beq+	1f
 	andc	r11,r11,r0
 	MTMSRD(r11)
@@ -543,6 +548,10 @@
 	mtspr	SPRN_VRSAVE,r0		/* if G4, restore VRSAVE reg */
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 #endif /* CONFIG_ALTIVEC */
+#ifdef CONFIG_SPE
+	lwz	r0,THREAD+THREAD_SPEFSCR(r2)
+	mtspr	SPRN_SPEFSCR,r0		/* restore SPEFSCR reg */
+#endif /* CONFIG_SPE */
 
 	lwz	r0,_CCR(r1)
 	mtcrf	0xFF,r0
@@ -589,11 +598,11 @@
 	bne	do_work
 
 restore_user:
-#ifdef CONFIG_4xx
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
 	/* Check whether this process has its own DBCR0 value */
 	lwz	r0,PTRACE(r2)
 	andi.	r0,r0,PT_PTRACED
-	bnel-	load_4xx_dbcr0
+	bnel-	load_dbcr0
 #endif
 
 #ifdef CONFIG_PREEMPT
@@ -645,7 +654,7 @@
 	PPC405_ERR77(0,r1)
 	stwcx.	r0,0,r1			/* to clear the reservation */
 
-#ifndef CONFIG_4xx
+#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 	lwz	r9,_MSR(r1)
 	andi.	r10,r9,MSR_RI		/* check if this exception occurred */
 	beql	nonrecoverable		/* at a bad place (MSR:RI = 0) */
@@ -681,9 +690,9 @@
 	SYNC
 	RFI
 
-#else /* CONFIG_4xx */
+#else /* !(CONFIG_4xx || CONFIG_BOOKE) */
 	/*
-	 * This is a bit different on 4xx because 4xx doesn't have
+	 * This is a bit different on 4xx/Book-E because it doesn't have
 	 * the RI bit in the MSR.
 	 * The TLB miss handler checks if we have interrupted
 	 * the exception exit path and restarts it if so
@@ -720,6 +729,9 @@
  * give the wrong answer).
  * We have to restore various SPRs that may have been in use at the
  * time of the critical interrupt.
+ *
+ * Note that SPRG6 is used for machine check on CONFIG_BOOKE parts and
+ * thus not saved in the critical handler
  */
 	.globl	ret_from_crit_exc
 ret_from_crit_exc:
@@ -866,7 +878,7 @@
  * Load the DBCR0 value for a task that is being ptraced,
  * having first saved away the global DBCR0.
  */
-load_4xx_dbcr0:
+load_dbcr0:
 	mfmsr	r0		/* first disable debug exceptions */
 	rlwinm	r0,r0,0,~MSR_DE
 	mtmsr	r0
@@ -885,7 +897,7 @@
 	blr
 
 	.comm	global_dbcr0,8
-#endif /* CONFIG_4xx */
+#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */
 
 do_work:			/* r10 contains MSR_KERNEL here */
 	andi.	r0,r9,_TIF_NEED_RESCHED
--- diff/arch/ppc/kernel/irq.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -241,7 +241,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;			
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->dev_id = dev_id;
 	action->next = NULL;
@@ -628,7 +628,9 @@
 static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer,
 					unsigned long count, void *data)
 {
-	cpumask_t *mask = (cpumask_t *)data, full_count = count, err;
+	int err;
+	int full_count = count;
+	cpumask_t *mask = (cpumask_t *)data;
 	cpumask_t new_value;
 
 	err = cpumask_parse(buffer, count, new_value);
--- diff/arch/ppc/kernel/misc.S	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/misc.S	2004-07-01 21:32:33.000000000 +0100
@@ -253,6 +253,24 @@
 	mtmsr	r7
 	blr
 
+_GLOBAL(low_choose_7447a_dfs)
+	/* Clear MSR:EE */
+	mfmsr	r7
+	rlwinm	r0,r7,0,17,15
+	mtmsr	r0
+	
+	/* Calc new HID1 value */
+	mfspr	r4,SPRN_HID1
+	insrwi	r4,r3,1,9	/* insert parameter into bit 9 */
+	sync
+	mtspr	SPRN_HID1,r4
+	sync
+	isync
+
+	/* Return */
+	mtmsr	r7
+	blr
+
 #endif /* CONFIG_CPU_FREQ_PMAC && CONFIG_6xx */
 
 /* void local_save_flags_ptr(unsigned long *flags) */
@@ -419,7 +437,24 @@
 	ble	1b
 
 	isync
-#else /* !(CONFIG_40x || CONFIG_44x) */
+#elif defined(CONFIG_FSL_BOOKE)
+	/* Invalidate all entries in TLB0 */
+	li	r3, 0x04
+	tlbivax	0,3
+	/* Invalidate all entries in TLB1 */
+	li	r3, 0x0c
+	tlbivax	0,3
+	/* Invalidate all entries in TLB2 */
+	li	r3, 0x14
+	tlbivax	0,3
+	/* Invalidate all entries in TLB3 */
+	li	r3, 0x1c
+	tlbivax	0,3
+	msync
+#ifdef CONFIG_SMP
+	tlbsync
+#endif /* CONFIG_SMP */
+#else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */
 #if defined(CONFIG_SMP)
 	rlwinm	r8,r1,0,0,18
 	lwz	r8,TI_CPU(r8)
@@ -487,7 +522,20 @@
 	tlbwe	r3, r3, PPC44x_TLB_PAGEID
 	isync
 10:
-#else /* !(CONFIG_40x || CONFIG_44x) */
+#elif defined(CONFIG_FSL_BOOKE)
+	rlwinm	r4, r3, 0, 0, 19
+	ori	r5, r4, 0x08	/* TLBSEL = 1 */
+	ori	r6, r4, 0x10	/* TLBSEL = 2 */
+	ori	r7, r4, 0x18	/* TLBSEL = 3 */
+	tlbivax	0, r4
+	tlbivax	0, r5
+	tlbivax	0, r6
+	tlbivax	0, r7
+	msync
+#if defined(CONFIG_SMP)
+	tlbsync
+#endif /* CONFIG_SMP */
+#else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */
 #if defined(CONFIG_SMP)
 	rlwinm	r8,r1,0,0,18
 	lwz	r8,TI_CPU(r8)
@@ -544,6 +592,10 @@
 	lis	r3, KERNELBASE@h
 	iccci	0,r3
 #endif
+#elif CONFIG_FSL_BOOKE
+	mfspr	r3,SPRN_L1CSR1
+	ori	r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR
+	mtspr	SPRN_L1CSR1,r3
 #else
 	mfspr	r3,PVR
 	rlwinm	r3,r3,16,16,31
@@ -1047,7 +1099,7 @@
  * and exceptions as if the cpu had performed the load or store.
  */
 
-#if defined(CONFIG_4xx)
+#if defined(CONFIG_4xx) || defined(CONFIG_E500)
 _GLOBAL(cvt_fd)
 	lfs	0,0(r3)
 	stfd	0,0(r4)
@@ -1398,3 +1450,9 @@
 	.long sys_mq_notify
 	.long sys_mq_getsetattr
 	.long sys_ni_syscall		/* 268 reserved for sys_kexec_load */
+	.long sys_perfctr_info
+	.long sys_vperfctr_open		/* 270 */
+	.long sys_vperfctr_control
+	.long sys_vperfctr_unlink
+	.long sys_vperfctr_iresume
+	.long sys_vperfctr_read
--- diff/arch/ppc/kernel/ppc-stub.c	2004-05-19 22:11:15.000000000 +0100
+++ source/arch/ppc/kernel/ppc-stub.c	2004-07-01 21:32:33.000000000 +0100
@@ -105,6 +105,8 @@
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <linux/sysrq.h>
 
 #include <asm/cacheflush.h>
 #include <asm/system.h>
@@ -855,3 +857,23 @@
 	return 1;
 }
 #endif
+
+static void sysrq_handle_gdb(int key, struct pt_regs *pt_regs,
+			     struct tty_struct *tty)
+{
+	printk("Entering GDB stub\n");
+	breakpoint();
+}
+static struct sysrq_key_op sysrq_gdb_op = {
+        .handler        = sysrq_handle_gdb,
+        .help_msg       = "Gdb",
+        .action_msg     = "GDB",
+};
+
+static int gdb_register_sysrq(void)
+{
+	printk("Registering GDB sysrq handler\n");
+	register_sysrq_key('g', &sysrq_gdb_op);
+	return 0;
+}
+module_init(gdb_register_sysrq);
--- diff/arch/ppc/kernel/ppc_ksyms.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/ppc_ksyms.c	2004-07-01 21:32:33.000000000 +0100
@@ -68,7 +68,6 @@
 long long __ashrdi3(long long, int);
 long long __ashldi3(long long, int);
 long long __lshrdi3(long long, int);
-int abs(int);
 
 extern unsigned long mm_ptov (unsigned long paddr);
 
@@ -199,6 +198,10 @@
 EXPORT_SYMBOL(last_task_used_altivec);
 EXPORT_SYMBOL(giveup_altivec);
 #endif /* CONFIG_ALTIVEC */
+#ifdef CONFIG_SPE
+EXPORT_SYMBOL(last_task_used_spe);
+EXPORT_SYMBOL(giveup_spe);
+#endif /* CONFIG_SPE */
 #ifdef CONFIG_SMP
 EXPORT_SYMBOL(smp_call_function);
 EXPORT_SYMBOL(smp_hw_index);
@@ -272,8 +275,6 @@
 EXPORT_SYMBOL(memcmp);
 EXPORT_SYMBOL(memchr);
 
-EXPORT_SYMBOL(abs);
-
 #if defined(CONFIG_FB_VGA16_MODULE)
 EXPORT_SYMBOL(screen_info);
 #endif
@@ -324,7 +325,7 @@
 EXPORT_SYMBOL(cpm_install_handler);
 EXPORT_SYMBOL(cpm_free_handler);
 #endif /* CONFIG_8xx */
-#if defined(CONFIG_8xx) || defined(CONFIG_40x)
+#if defined(CONFIG_8xx) || defined(CONFIG_40x) || defined(CONFIG_85xx)
 EXPORT_SYMBOL(__res);
 #endif
 #if defined(CONFIG_8xx)
--- diff/arch/ppc/kernel/process.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/process.c	2004-07-01 21:32:33.000000000 +0100
@@ -35,6 +35,8 @@
 #include <linux/init_task.h>
 #include <linux/module.h>
 #include <linux/kallsyms.h>
+#include <linux/perfctr.h>
+#include <linux/mqueue.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -49,6 +51,7 @@
 
 struct task_struct *last_task_used_math = NULL;
 struct task_struct *last_task_used_altivec = NULL;
+struct task_struct *last_task_used_spe = NULL;
 
 static struct fs_struct init_fs = INIT_FS;
 static struct files_struct init_files = INIT_FILES;
@@ -177,6 +180,34 @@
 EXPORT_SYMBOL(enable_kernel_altivec);
 #endif /* CONFIG_ALTIVEC */
 
+#ifdef CONFIG_SPE
+int
+dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs)
+{
+	if (regs->msr & MSR_SPE)
+		giveup_spe(current);
+	/* We copy u32 evr[32] + u64 acc + u32 spefscr -> 35 */
+	memcpy(evrregs, &current->thread.evr[0], sizeof(u32) * 35);
+	return 1;
+}
+
+void
+enable_kernel_spe(void)
+{
+	WARN_ON(preemptible());
+
+#ifdef CONFIG_SMP
+	if (current->thread.regs && (current->thread.regs->msr & MSR_SPE))
+		giveup_spe(current);
+	else
+		giveup_spe(NULL);	/* just enable SPE for kernel - force */
+#else
+	giveup_spe(last_task_used_spe);
+#endif /* __SMP __ */
+}
+EXPORT_SYMBOL(enable_kernel_spe);
+#endif /* CONFIG_SPE */
+
 void
 enable_kernel_fp(void)
 {
@@ -244,6 +275,17 @@
 	if ((prev->thread.regs && (prev->thread.regs->msr & MSR_VEC)))
 		giveup_altivec(prev);
 #endif /* CONFIG_ALTIVEC */
+#ifdef CONFIG_SPE
+	/*
+	 * If the previous thread used spe in the last quantum
+	 * (thus changing spe regs) then save them.
+	 *
+	 * On SMP we always save/restore spe regs just to avoid the
+	 * complexity of changing processors.
+	 */
+	if ((prev->thread.regs && (prev->thread.regs->msr & MSR_SPE)))
+		giveup_spe(prev);
+#endif /* CONFIG_SPE */
 #endif /* CONFIG_SMP */
 
 	/* Avoid the trap.  On smp this this never happens since
@@ -251,9 +293,18 @@
 	 */
 	if (new->thread.regs && last_task_used_altivec == new)
 		new->thread.regs->msr |= MSR_VEC;
+#ifdef CONFIG_SPE
+	/* Avoid the trap.  On smp this this never happens since
+	 * we don't set last_task_used_spe
+	 */
+	if (new->thread.regs && last_task_used_spe == new)
+		new->thread.regs->msr |= MSR_SPE;
+#endif /* CONFIG_SPE */
 	new_thread = &new->thread;
 	old_thread = &current->thread;
+	perfctr_suspend_thread(&prev->thread);
 	last = _switch(old_thread, new_thread);
+	perfctr_resume_thread(&current->thread);
 	local_irq_restore(s);
 	return last;
 }
@@ -322,6 +373,7 @@
 		last_task_used_math = NULL;
 	if (last_task_used_altivec == current)
 		last_task_used_altivec = NULL;
+	perfctr_exit_thread(&current->thread);
 }
 
 void flush_thread(void)
@@ -354,6 +406,10 @@
 	if (regs->msr & MSR_VEC)
 		giveup_altivec(current);
 #endif /* CONFIG_ALTIVEC */
+#ifdef CONFIG_SPE
+	if (regs->msr & MSR_SPE)
+		giveup_spe(current);
+#endif /* CONFIG_SPE */
 	preempt_enable();
 }
 
@@ -408,6 +464,8 @@
 
 	p->thread.last_syscall = -1;
 
+	perfctr_copy_thread(&p->thread);
+
 	return 0;
 }
 
@@ -438,18 +496,45 @@
 	current->thread.vrsave = 0;
 	current->thread.used_vr = 0;
 #endif /* CONFIG_ALTIVEC */
+#ifdef CONFIG_SPE
+	memset(current->thread.evr, 0, sizeof(current->thread.evr));
+	current->thread.acc = 0;
+	current->thread.spefscr = 0;
+	current->thread.used_spe = 0;
+#endif /* CONFIG_SPE */
 }
 
+#define PR_FP_ALL_EXCEPT (PR_FP_EXC_DIV | PR_FP_EXC_OVF | PR_FP_EXC_UND \
+		| PR_FP_EXC_RES | PR_FP_EXC_INV)
+
 int set_fpexc_mode(struct task_struct *tsk, unsigned int val)
 {
 	struct pt_regs *regs = tsk->thread.regs;
 
-	if (val > PR_FP_EXC_PRECISE)
+	/* This is a bit hairy.  If we are an SPE enabled  processor
+	 * (have embedded fp) we store the IEEE exception enable flags in
+	 * fpexc_mode.  fpexc_mode is also used for setting FP exception
+	 * mode (asyn, precise, disabled) for 'Classic' FP. */
+	if (val & PR_FP_EXC_SW_ENABLE) {
+#ifdef CONFIG_SPE
+		tsk->thread.fpexc_mode = val &
+			(PR_FP_EXC_SW_ENABLE | PR_FP_ALL_EXCEPT);
+#else
 		return -EINVAL;
-	tsk->thread.fpexc_mode = __pack_fe01(val);
-	if (regs != NULL && (regs->msr & MSR_FP) != 0)
-		regs->msr = (regs->msr & ~(MSR_FE0|MSR_FE1))
-			| tsk->thread.fpexc_mode;
+#endif
+	} else {
+		/* on a CONFIG_SPE this does not hurt us.  The bits that
+		 * __pack_fe01 use do not overlap with bits used for
+		 * PR_FP_EXC_SW_ENABLE.  Additionally, the MSR[FE0,FE1] bits
+		 * on CONFIG_SPE implementations are reserved so writing to
+		 * them does not change anything */
+		if (val > PR_FP_EXC_PRECISE)
+			return -EINVAL;
+		tsk->thread.fpexc_mode = __pack_fe01(val);
+		if (regs != NULL && (regs->msr & MSR_FP) != 0)
+			regs->msr = (regs->msr & ~(MSR_FE0|MSR_FE1))
+				| tsk->thread.fpexc_mode;
+	}
 	return 0;
 }
 
@@ -457,7 +542,14 @@
 {
 	unsigned int val;
 
-	val = __unpack_fe01(tsk->thread.fpexc_mode);
+	if (tsk->thread.fpexc_mode & PR_FP_EXC_SW_ENABLE)
+#ifdef CONFIG_SPE
+		val = tsk->thread.fpexc_mode;
+#else
+		return -EINVAL;
+#endif
+	else
+		val = __unpack_fe01(tsk->thread.fpexc_mode);
 	return put_user(val, (unsigned int *) adr);
 }
 
@@ -506,6 +598,10 @@
 	if (regs->msr & MSR_VEC)
 		giveup_altivec(current);
 #endif /* CONFIG_ALTIVEC */
+#ifdef CONFIG_SPE
+	if (regs->msr & MSR_SPE)
+		giveup_spe(current);
+#endif /* CONFIG_SPE */
 	preempt_enable();
 	error = do_execve(filename, (char __user *__user *) a1,
 			  (char __user *__user *) a2, regs);
--- diff/arch/ppc/kernel/ptrace.c	2004-05-19 22:11:15.000000000 +0100
+++ source/arch/ppc/kernel/ptrace.c	2004-07-01 21:32:33.000000000 +0100
@@ -35,7 +35,7 @@
 /*
  * Set of msr bits that gdb can change on behalf of a process.
  */
-#ifdef CONFIG_4xx
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
 #define MSR_DEBUGCHANGE	0
 #else
 #define MSR_DEBUGCHANGE	(MSR_SE | MSR_BE)
@@ -131,13 +131,77 @@
 }
 #endif
 
+#ifdef CONFIG_SPE
+
+/*
+ * For get_evrregs/set_evrregs functions 'data' has the following layout:
+ *
+ * struct {
+ *   u32 evr[32];
+ *   u64 acc;
+ *   u32 spefscr;
+ * }
+ */
+
+/*
+ * Get contents of SPE register state in task TASK.
+ */
+static inline int get_evrregs(unsigned long *data, struct task_struct *task)
+{
+	int i;
+
+	if (!access_ok(VERIFY_WRITE, data, 35 * sizeof(unsigned long)))
+		return -EFAULT;
+
+	/* copy SPEFSCR */
+	if (__put_user(task->thread.spefscr, &data[34]))
+		return -EFAULT;
+
+	/* copy SPE registers EVR[0] .. EVR[31] */
+	for (i = 0; i < 32; i++, data++)
+		if (__put_user(task->thread.evr[i], data))
+			return -EFAULT;
+
+	/* copy ACC */
+	if (__put_user64(task->thread.acc, (unsigned long long *)data))
+		return -EFAULT;
+
+	return 0;
+}
+
+/*
+ * Write contents of SPE register state into task TASK.
+ */
+static inline int set_evrregs(struct task_struct *task, unsigned long *data)
+{
+	int i;
+
+	if (!access_ok(VERIFY_READ, data, 35 * sizeof(unsigned long)))
+		return -EFAULT;
+
+	/* copy SPEFSCR */
+	if (__get_user(task->thread.spefscr, &data[34]))
+		return -EFAULT;
+
+	/* copy SPE registers EVR[0] .. EVR[31] */
+	for (i = 0; i < 32; i++, data++)
+		if (__get_user(task->thread.evr[i], data))
+			return -EFAULT;
+	/* copy ACC */
+	if (__get_user64(task->thread.acc, (unsigned long long*)data))
+		return -EFAULT;
+
+	return 0;
+}
+#endif /* CONFIG_SPE */
+
 static inline void
 set_single_step(struct task_struct *task)
 {
 	struct pt_regs *regs = task->thread.regs;
 
 	if (regs != NULL) {
-#ifdef CONFIG_4xx
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
 		task->thread.dbcr0 = DBCR0_IDM | DBCR0_IC;
 		/* MSR.DE should already be set */
 #else
@@ -152,7 +216,7 @@
 	struct pt_regs *regs = task->thread.regs;
 
 	if (regs != NULL) {
-#ifdef CONFIG_4xx
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
 		task->thread.dbcr0 = 0;
 #else
 		regs->msr &= ~MSR_SE;
@@ -360,6 +424,23 @@
 		ret = set_vrregs(child, (unsigned long *)data);
 		break;
 #endif
+#ifdef CONFIG_SPE
+	case PTRACE_GETEVRREGS:
+		/* Get the child spe register state. */
+		if (child->thread.regs->msr & MSR_SPE)
+			giveup_spe(child);
+		ret = get_evrregs((unsigned long *)data, child);
+		break;
+
+	case PTRACE_SETEVRREGS:
+		/* Set the child spe register state. */
+		/* this is to clear the MSR_SPE bit to force a reload
+		 * of register state from memory */
+		if (child->thread.regs->msr & MSR_SPE)
+			giveup_spe(child);
+		ret = set_evrregs(child, (unsigned long *)data);
+		break;
+#endif
 
 	default:
 		ret = ptrace_request(child, request, addr, data);
--- diff/arch/ppc/kernel/setup.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -54,7 +54,6 @@
 extern void power4_idle(void);
 
 extern boot_infos_t *boot_infos;
-char saved_command_line[COMMAND_LINE_SIZE];
 unsigned char aux_device_present;
 struct ide_machdep_calls ppc_ide_md;
 char *sysmap;
@@ -677,7 +676,7 @@
 	init_mm.brk = (unsigned long) klimit;
 
 	/* Save unparsed command line copy for /proc/cmdline */
-	strlcpy(saved_command_line, cmd_line, sizeof(saved_command_line));
+	strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
 	*cmdline_p = cmd_line;
 
 	/* set up the bootmem stuff with available memory */
--- diff/arch/ppc/kernel/signal.c	2004-05-19 22:11:15.000000000 +0100
+++ source/arch/ppc/kernel/signal.c	2004-07-01 21:32:33.000000000 +0100
@@ -183,8 +183,8 @@
 
 /*
  * Save the current user registers on the user stack.
- * We only save the altivec registers if the process has used
- * altivec instructions at some point.
+ * We only save the altivec/spe registers if the process has used
+ * altivec/spe instructions at some point.
  */
 static int
 save_user_regs(struct pt_regs *regs, struct mcontext *frame, int sigret)
@@ -198,6 +198,10 @@
 	if (current->thread.used_vr && (regs->msr & MSR_VEC))
 		giveup_altivec(current);
 #endif /* CONFIG_ALTIVEC */
+#ifdef CONFIG_SPE
+	if (current->thread.used_spe && (regs->msr & MSR_SPE))
+		giveup_spe(current);
+#endif /* CONFIG_ALTIVEC */
 	preempt_enable();
 
 	if (__copy_to_user(&frame->mc_gregs, regs, GP_REGS_SIZE)
@@ -229,6 +233,24 @@
 		return 1;
 #endif /* CONFIG_ALTIVEC */
 
+#ifdef CONFIG_SPE
+	/* save spe registers */
+	if (current->thread.used_spe) {
+		if (__copy_to_user(&frame->mc_vregs, current->thread.evr,
+				   ELF_NEVRREG * sizeof(u32)))
+			return 1;
+		/* set MSR_SPE in the saved MSR value to indicate that
+		   frame->mc_vregs contains valid data */
+		if (__put_user(regs->msr | MSR_SPE, &frame->mc_gregs[PT_MSR]))
+			return 1;
+	}
+	/* else assert((regs->msr & MSR_SPE) == 0) */
+
+	/* We always copy to/from spefscr */
+	if (__put_user(current->thread.spefscr, (u32 *)&frame->mc_vregs + ELF_NEVRREG))
+		return 1;
+#endif /* CONFIG_SPE */
+
 	if (sigret) {
 		/* Set up the sigreturn trampoline: li r0,sigret; sc */
 		if (__put_user(0x38000000UL + sigret, &frame->tramp[0])
@@ -249,7 +271,7 @@
 restore_user_regs(struct pt_regs *regs, struct mcontext __user *sr, int sig)
 {
 	unsigned long save_r2;
-#ifdef CONFIG_ALTIVEC
+#if defined(CONFIG_ALTIVEC) || defined(CONFIG_SPE)
 	unsigned long msr;
 #endif
 
@@ -290,6 +312,23 @@
 		return 1;
 #endif /* CONFIG_ALTIVEC */
 
+#ifdef CONFIG_SPE
+	/* force the process to reload the spe registers from
+	   current->thread when it next does spe instructions */
+	regs->msr &= ~MSR_SPE;
+	if (!__get_user(msr, &sr->mc_gregs[PT_MSR]) && (msr & MSR_SPE) != 0) {
+		/* restore spe registers from the stack */
+		if (__copy_from_user(current->thread.evr, &sr->mc_vregs,
+				     sizeof(sr->mc_vregs)))
+			return 1;
+	} else if (current->thread.used_spe)
+		memset(&current->thread.evr, 0, ELF_NEVRREG * sizeof(u32));
+
+	/* Always get SPEFSCR back */
+	if (__get_user(current->thread.spefscr, (u32 *)&sr->mc_vregs + ELF_NEVRREG))
+		return 1;
+#endif /* CONFIG_SPE */
+
 	return 0;
 }
 
--- diff/arch/ppc/kernel/smp.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/smp.c	2004-07-01 21:32:33.000000000 +0100
@@ -375,8 +375,6 @@
 	p = copy_process(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
 	if (IS_ERR(p))
 		panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
-	wake_up_forked_process(p);
-
 	init_idle(p, cpu);
 	unhash_process(p);
 
--- diff/arch/ppc/kernel/time.c	2004-05-19 22:11:15.000000000 +0100
+++ source/arch/ppc/kernel/time.c	2004-07-01 21:32:33.000000000 +0100
@@ -56,6 +56,7 @@
 #include <linux/mc146818rtc.h>
 #include <linux/time.h>
 #include <linux/init.h>
+#include <linux/profile.h>
 
 #include <asm/segment.h>
 #include <asm/io.h>
@@ -107,17 +108,23 @@
 	return delta;
 }
 
-extern unsigned long prof_cpu_mask;
-extern unsigned int * prof_buffer;
-extern unsigned long prof_len;
-extern unsigned long prof_shift;
 extern char _stext;
 
-static inline void ppc_do_profile (unsigned long nip)
+static inline void ppc_do_profile (struct pt_regs *regs)
 {
+	unsigned long nip;
+	extern unsigned long prof_cpu_mask;
+
+	profile_hook(regs);
+
+	if (user_mode(regs))
+		return;
+
 	if (!prof_buffer)
 		return;
 
+	nip = instruction_pointer(regs);
+
 	/*
 	 * Only measure the CPUs specified by /proc/irq/prof_cpu_mask.
 	 * (default is all CPUs.)
@@ -156,8 +163,9 @@
 
 	while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) < 0) {
 		jiffy_stamp += tb_ticks_per_jiffy;
-		if (!user_mode(regs))
-			ppc_do_profile(instruction_pointer(regs));
+		
+		ppc_do_profile(regs);
+
 	  	if (smp_processor_id())
 			continue;
 
--- diff/arch/ppc/kernel/traps.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/traps.c	2004-07-01 21:32:33.000000000 +0100
@@ -30,6 +30,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/prctl.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -102,8 +103,7 @@
 	do_exit(err);
 }
 
-void
-_exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
+void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
 {
 	siginfo_t info;
 
@@ -171,6 +171,11 @@
 /* On 4xx, the reason for the machine check or program exception
    is in the ESR. */
 #define get_reason(regs)	((regs)->dsisr)
+#ifndef CONFIG_E500
+#define get_mc_reason(regs)	((regs)->dsisr)
+#else
+#define get_mc_reason(regs)	(mfspr(SPRN_MCSR))
+#endif
 #define REASON_FP		0
 #define REASON_ILLEGAL		ESR_PIL
 #define REASON_PRIVILEGED	ESR_PPR
@@ -184,6 +189,7 @@
 /* On non-4xx, the reason for the machine check or program
    exception is in the MSR. */
 #define get_reason(regs)	((regs)->msr)
+#define get_mc_reason(regs)	((regs)->msr)
 #define REASON_FP		0x100000
 #define REASON_ILLEGAL		0x80000
 #define REASON_PRIVILEGED	0x40000
@@ -193,10 +199,9 @@
 #define clear_single_step(regs)	((regs)->msr &= ~MSR_SE)
 #endif
 
-void
-MachineCheckException(struct pt_regs *regs)
+void MachineCheckException(struct pt_regs *regs)
 {
-	unsigned long reason = get_reason(regs);
+	unsigned long reason = get_mc_reason(regs);
 
 	if (user_mode(regs)) {
 		regs->msr |= MSR_RI;
@@ -256,7 +261,37 @@
 		/* Clear MCSR */
 		mtspr(SPRN_MCSR, mcsr);
 	}
-#else /* !CONFIG_4xx */
+#elif defined (CONFIG_E500)
+	printk("Machine check in kernel mode.\n");
+	printk("Caused by (from MCSR=%lx): ", reason);
+
+	if (reason & MCSR_MCP)
+		printk("Machine Check Signal\n");
+	if (reason & MCSR_ICPERR)
+		printk("Instruction Cache Parity Error\n");
+	if (reason & MCSR_DCP_PERR)
+		printk("Data Cache Push Parity Error\n");
+	if (reason & MCSR_DCPERR)
+		printk("Data Cache Parity Error\n");
+	if (reason & MCSR_GL_CI)
+		printk("Guarded Load or Cache-Inhibited stwcx.\n");
+	if (reason & MCSR_BUS_IAERR)
+		printk("Bus - Instruction Address Error\n");
+	if (reason & MCSR_BUS_RAERR)
+		printk("Bus - Read Address Error\n");
+	if (reason & MCSR_BUS_WAERR)
+		printk("Bus - Write Address Error\n");
+	if (reason & MCSR_BUS_IBERR)
+		printk("Bus - Instruction Data Error\n");
+	if (reason & MCSR_BUS_RBERR)
+		printk("Bus - Read Data Bus Error\n");
+	if (reason & MCSR_BUS_WBERR)
+		printk("Bus - Read Data Bus Error\n");
+	if (reason & MCSR_BUS_IPERR)
+		printk("Bus - Instruction Parity Error\n");
+	if (reason & MCSR_BUS_RPERR)
+		printk("Bus - Read Parity Error\n");
+#else /* !CONFIG_4xx && !CONFIG_E500 */
 	printk("Machine check in kernel mode.\n");
 	printk("Caused by (from SRR1=%lx): ", reason);
 	switch (reason & 0x601F0000) {
@@ -292,8 +327,7 @@
 	die("machine check", regs, SIGBUS);
 }
 
-void
-SMIException(struct pt_regs *regs)
+void SMIException(struct pt_regs *regs)
 {
 	debugger(regs);
 #if !(defined(CONFIG_XMON) || defined(CONFIG_KGDB))
@@ -302,24 +336,21 @@
 #endif
 }
 
-void
-UnknownException(struct pt_regs *regs)
+void UnknownException(struct pt_regs *regs)
 {
 	printk("Bad trap at PC: %lx, MSR: %lx, vector=%lx    %s\n",
 	       regs->nip, regs->msr, regs->trap, print_tainted());
 	_exception(SIGTRAP, regs, 0, 0);
 }
 
-void
-InstructionBreakpoint(struct pt_regs *regs)
+void InstructionBreakpoint(struct pt_regs *regs)
 {
 	if (debugger_iabr_match(regs))
 		return;
 	_exception(SIGTRAP, regs, TRAP_BRKPT, 0);
 }
 
-void
-RunModeException(struct pt_regs *regs)
+void RunModeException(struct pt_regs *regs)
 {
 	_exception(SIGTRAP, regs, 0, 0);
 }
@@ -337,8 +368,7 @@
 #define INST_MFSPR_PVR		0x7c1f42a6
 #define INST_MFSPR_PVR_MASK	0xfc1fffff
 
-static int
-emulate_instruction(struct pt_regs *regs)
+static int emulate_instruction(struct pt_regs *regs)
 {
 	u32 instword;
 	u32 rd;
@@ -401,8 +431,7 @@
 	return module_find_bug(bugaddr);
 }
 
-int
-check_bug_trap(struct pt_regs *regs)
+int check_bug_trap(struct pt_regs *regs)
 {
 	struct bug_entry *bug;
 	unsigned long addr;
@@ -439,8 +468,7 @@
 	return 0;
 }
 
-void
-ProgramCheckException(struct pt_regs *regs)
+void ProgramCheckException(struct pt_regs *regs)
 {
 	unsigned int reason = get_reason(regs);
 	extern int do_mathemu(struct pt_regs *regs);
@@ -513,8 +541,7 @@
 	_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
 }
 
-void
-SingleStepException(struct pt_regs *regs)
+void SingleStepException(struct pt_regs *regs)
 {
 	regs->msr &= ~MSR_SE;  /* Turn off 'trace' bit */
 	if (debugger_sstep(regs))
@@ -522,8 +549,7 @@
 	_exception(SIGTRAP, regs, TRAP_TRACE, 0);
 }
 
-void
-AlignmentException(struct pt_regs *regs)
+void AlignmentException(struct pt_regs *regs)
 {
 	int fixed;
 
@@ -543,8 +569,7 @@
 	_exception(SIGBUS, regs, BUS_ADRALN, regs->dar);
 }
 
-void
-StackOverflow(struct pt_regs *regs)
+void StackOverflow(struct pt_regs *regs)
 {
 	printk(KERN_CRIT "Kernel stack overflow in process %p, r1=%lx\n",
 	       current, regs->gpr[1]);
@@ -561,8 +586,7 @@
 	die("nonrecoverable exception", regs, SIGKILL);
 }
 
-void
-trace_syscall(struct pt_regs *regs)
+void trace_syscall(struct pt_regs *regs)
 {
 	printk("Task: %p(%d), PC: %08lX/%08lX, Syscall: %3ld, Result: %s%ld    %s\n",
 	       current, current->pid, regs->nip, regs->link, regs->gpr[0],
@@ -570,8 +594,7 @@
 }
 
 #ifdef CONFIG_8xx
-void
-SoftwareEmulation(struct pt_regs *regs)
+void SoftwareEmulation(struct pt_regs *regs)
 {
 	extern int do_mathemu(struct pt_regs *);
 	extern int Soft_emulate_8xx(struct pt_regs *);
@@ -623,8 +646,7 @@
 #endif /* CONFIG_4xx || CONFIG_BOOKE */
 
 #if !defined(CONFIG_TAU_INT)
-void
-TAUException(struct pt_regs *regs)
+void TAUException(struct pt_regs *regs)
 {
 	printk("TAU trap at PC: %lx, MSR: %lx, vector=%lx    %s\n",
 	       regs->nip, regs->msr, regs->trap, print_tainted());
@@ -646,14 +668,13 @@
 	/* The kernel has executed an altivec instruction without
 	   first enabling altivec.  Whinge but let it do it. */
 	if (++kernel_altivec_count < 10)
-		printk(KERN_ERR "AltiVec used in kernel (task=%p, pc=%x)\n",
+		printk(KERN_ERR "AltiVec used in kernel (task=%p, pc=%lx)\n",
 		       current, regs->nip);
 	regs->msr |= MSR_VEC;
 }
 
 #ifdef CONFIG_ALTIVEC
-void
-AltivecAssistException(struct pt_regs *regs)
+void AltivecAssistException(struct pt_regs *regs)
 {
 	int err;
 
@@ -682,6 +703,55 @@
 }
 #endif /* CONFIG_ALTIVEC */
 
+#ifdef CONFIG_FSL_BOOKE
+void CacheLockingException(struct pt_regs *regs, unsigned long address,
+			   unsigned long error_code)
+{
+	/* We treat cache locking instructions from the user
+	 * as priv ops, in the future we could try to do
+	 * something smarter
+	 */
+	if (error_code & (ESR_DLK|ESR_ILK))
+		_exception(SIGILL, regs, ILL_PRVOPC, regs->nip);
+	return;
+}
+#endif /* CONFIG_FSL_BOOKE */
+
+#ifdef CONFIG_SPE
+void SPEFloatingPointException(struct pt_regs *regs)
+{
+	unsigned long spefscr;
+	int fpexc_mode;
+	int code = 0;
+
+	spefscr = current->thread.spefscr;
+	fpexc_mode = current->thread.fpexc_mode;
+
+	/* Hardware does not neccessarily set sticky
+	 * underflow/overflow/invalid flags */
+	if ((spefscr & SPEFSCR_FOVF) && (fpexc_mode & PR_FP_EXC_OVF)) {
+		code = FPE_FLTOVF;
+		spefscr |= SPEFSCR_FOVFS;
+	}
+	else if ((spefscr & SPEFSCR_FUNF) && (fpexc_mode & PR_FP_EXC_UND)) {
+		code = FPE_FLTUND;
+		spefscr |= SPEFSCR_FUNFS;
+	}
+	else if ((spefscr & SPEFSCR_FDBZ) && (fpexc_mode & PR_FP_EXC_DIV))
+		code = FPE_FLTDIV;
+	else if ((spefscr & SPEFSCR_FINV) && (fpexc_mode & PR_FP_EXC_INV)) {
+		code = FPE_FLTINV;
+		spefscr |= SPEFSCR_FINVS;
+	}
+	else if ((spefscr & (SPEFSCR_FG | SPEFSCR_FX)) && (fpexc_mode & PR_FP_EXC_RES))
+		code = FPE_FLTRES;
+
+	current->thread.spefscr = spefscr;
+
+	_exception(SIGFPE, regs, code, regs->nip);
+	return;
+}
+#endif
 
 void __init trap_init(void)
 {
--- diff/arch/ppc/kernel/vecemu.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/kernel/vecemu.c	2004-07-01 21:32:33.000000000 +0100
@@ -256,8 +256,7 @@
 	return (x + half) & ~(0x7fffff >> exp);
 }
 
-int
-emulate_altivec(struct pt_regs *regs)
+int emulate_altivec(struct pt_regs *regs)
 {
 	unsigned int instr, i;
 	unsigned int va, vb, vc, vd;
--- diff/arch/ppc/lib/Makefile	2004-05-19 22:11:15.000000000 +0100
+++ source/arch/ppc/lib/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -5,3 +5,5 @@
 obj-y			:= checksum.o string.o strcase.o dec_and_lock.o div64.o
 
 obj-$(CONFIG_SMP)	+= locks.o
+obj-$(CONFIG_8xx)	+= rheap.o
+obj-$(CONFIG_CPM2)	+= rheap.o
--- diff/arch/ppc/mm/Makefile	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/mm/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -12,3 +12,4 @@
 obj-$(CONFIG_PPC_STD_MMU)	+= hashtable.o ppc_mmu.o tlb.o
 obj-$(CONFIG_40x)		+= 4xx_mmu.o
 obj-$(CONFIG_44x)		+= 44x_mmu.o
+obj-$(CONFIG_FSL_BOOKE)		+= fsl_booke_mmu.o
--- diff/arch/ppc/mm/fault.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/mm/fault.c	2004-07-01 21:32:33.000000000 +0100
@@ -99,7 +99,7 @@
 	struct mm_struct *mm = current->mm;
 	siginfo_t info;
 	int code = SEGV_MAPERR;
-#if defined(CONFIG_4xx)
+#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE)
 	int is_write = error_code & ESR_DST;
 #else
 	int is_write = 0;
@@ -114,20 +114,20 @@
 		error_code &= 0x48200000;
 	else
 		is_write = error_code & 0x02000000;
-#endif /* CONFIG_4xx */
+#endif /* CONFIG_4xx || CONFIG_BOOKE */
 
 #if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
 	if (debugger_fault_handler && TRAP(regs) == 0x300) {
 		debugger_fault_handler(regs);
 		return 0;
 	}
-#if !defined(CONFIG_4xx)
+#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 	if (error_code & 0x00400000) {
 		/* DABR match */
 		if (debugger_dabr_match(regs))
 			return 0;
 	}
-#endif /* !CONFIG_4xx */
+#endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/
 #endif /* CONFIG_XMON || CONFIG_KGDB */
 
 	if (in_atomic() || mm == NULL)
@@ -200,8 +200,8 @@
 	if (is_write) {
 		if (!(vma->vm_flags & VM_WRITE))
 			goto bad_area;
-#if defined(CONFIG_4xx)
-	/* an exec  - 4xx allows for per-page execute permission */
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+	/* an exec  - 4xx/Book-E allows for per-page execute permission */
 	} else if (TRAP(regs) == 0x400) {
 		pte_t *ptep;
 
@@ -214,7 +214,7 @@
 			goto bad_area;
 #endif
 
-		/* Since 4xx supports per-page execute permission,
+		/* Since 4xx/Book-E supports per-page execute permission,
 		 * we lazily flush dcache to icache. */
 		ptep = NULL;
 		if (get_pteptr(mm, address, &ptep) && pte_present(*ptep)) {
--- diff/arch/ppc/mm/init.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/mm/init.c	2004-07-01 21:32:33.000000000 +0100
@@ -118,7 +118,7 @@
 
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	i = max_mapnr;
 	while (i-- > 0) {
 		total++;
@@ -253,6 +253,12 @@
 	if (__max_memory && total_memory > __max_memory)
 		total_memory = __max_memory;
 	total_lowmem = total_memory;
+#ifdef CONFIG_FSL_BOOKE
+	/* Freescale Book-E parts expect lowmem to be mapped by fixed TLB
+	 * entries, so we need to adjust lowmem to match the amount we can map
+	 * in the fixed entries */
+	adjust_total_lowmem();
+#endif /* CONFIG_FSL_BOOKE */
 	if (total_lowmem > __max_low_memory) {
 		total_lowmem = __max_low_memory;
 #ifndef CONFIG_HIGHMEM
--- diff/arch/ppc/mm/mmu_decl.h	2004-05-19 22:11:15.000000000 +0100
+++ source/arch/ppc/mm/mmu_decl.h	2004-07-01 21:32:33.000000000 +0100
@@ -27,6 +27,9 @@
 extern void setbat(int index, unsigned long virt, unsigned long phys,
 		   unsigned int size, int flags);
 extern void reserve_phys_mem(unsigned long start, unsigned long size);
+extern void settlbcam(int index, unsigned long virt, phys_addr_t phys,
+		      unsigned int size, int flags, unsigned int pid);
+extern void invalidate_tlbcam_entry(int index);
 
 extern int __map_without_bats;
 extern unsigned long ioremap_base;
@@ -53,6 +56,12 @@
 extern void MMU_init_hw(void);
 extern unsigned long mmu_mapin_ram(void);
 
+#elif defined(CONFIG_FSL_BOOKE)
+#define flush_HPTE(X, va, pg)	_tlbie(va)
+extern void MMU_init_hw(void);
+extern unsigned long mmu_mapin_ram(void);
+extern void adjust_total_lowmem(void);
+
 #else
 /* anything except 4xx or 8xx */
 extern void MMU_init_hw(void);
--- diff/arch/ppc/mm/pgtable.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/mm/pgtable.c	2004-07-01 21:32:33.000000000 +0100
@@ -42,6 +42,10 @@
 #define HAVE_BATS	1
 #endif
 
+#if defined(CONFIG_FSL_BOOKE)
+#define HAVE_TLBCAM	1
+#endif
+
 extern char etext[], _stext[];
 
 #ifdef CONFIG_SMP
@@ -59,6 +63,16 @@
 #define p_mapped_by_bats(x)	(0UL)
 #endif /* HAVE_BATS */
 
+#ifdef HAVE_TLBCAM
+extern unsigned int tlbcam_index;
+extern unsigned int num_tlbcam_entries;
+extern unsigned long v_mapped_by_tlbcam(unsigned long va);
+extern unsigned long p_mapped_by_tlbcam(unsigned long pa);
+#else /* !HAVE_TLBCAM */
+#define v_mapped_by_tlbcam(x)	(0UL)
+#define p_mapped_by_tlbcam(x)	(0UL)
+#endif /* HAVE_TLBCAM */
+
 #ifdef CONFIG_44x
 /* 44x uses an 8kB pgdir because it has 8-byte Linux PTEs. */
 #define PGDIR_ORDER	1
@@ -210,6 +224,9 @@
 	if ((v = p_mapped_by_bats(p)) /*&& p_mapped_by_bats(p+size-1)*/ )
 		goto out;
 
+	if ((v = p_mapped_by_tlbcam(p)))
+		goto out;
+
 	if (mem_init_done) {
 		struct vm_struct *area;
 		area = get_vm_area(size, VM_IOREMAP);
@@ -300,6 +317,9 @@
 /* is x a power of 2? */
 #define is_power_of_2(x)	((x) != 0 && (((x) & ((x) - 1)) == 0))
 
+/* is x a power of 4? */
+#define is_power_of_4(x)	((x) != 0 && (((x) & (x-1)) == 0) && (ffs(x) & 1))
+
 /*
  * Set up a mapping for a block of I/O.
  * virt, phys, size must all be page-aligned.
@@ -325,6 +345,18 @@
 	}
 #endif /* HAVE_BATS */
 
+#ifdef HAVE_TLBCAM
+	/*
+	 * Use a CAM for this if possible...
+	 */
+	if (tlbcam_index < num_tlbcam_entries && is_power_of_4(size)
+	    && (virt & (size - 1)) == 0 && (phys & (size - 1)) == 0) {
+		settlbcam(tlbcam_index, virt, phys, size, flags, 0);
+		++tlbcam_index;
+		return;
+	}
+#endif /* HAVE_TLBCAM */
+
 	/* No BATs available, put it in the page tables. */
 	for (i = 0; i < size; i += PAGE_SIZE)
 		map_page(virt + i, phys + i, flags);
--- diff/arch/ppc/platforms/Makefile	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/platforms/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -30,6 +30,7 @@
 obj-$(CONFIG_PREP_RESIDUAL)	+= residual.o
 obj-$(CONFIG_ADIR)		+= adir_setup.o adir_pic.o adir_pci.o
 obj-$(CONFIG_EST8260)		+= est8260_setup.o
+obj-$(CONFIG_PQ2ADS)		+= pq2ads_setup.o
 obj-$(CONFIG_TQM8260)		+= tqm8260_setup.o
 obj-$(CONFIG_EV64260)		+= ev64260_setup.o
 obj-$(CONFIG_GEMINI)		+= gemini_pci.o gemini_setup.o gemini_prom.o
--- diff/arch/ppc/platforms/est8260.h	2004-05-19 22:11:16.000000000 +0100
+++ source/arch/ppc/platforms/est8260.h	2004-07-01 21:32:33.000000000 +0100
@@ -6,7 +6,7 @@
 #ifndef __EST8260_PLATFORM
 #define __EST8260_PLATFORM
 
-#define IMAP_ADDR		((uint)0xf0000000)
+#define CPM_MAP_ADDR		((uint)0xf0000000)
 
 #define BOOTROM_RESTART_ADDR	((uint)0xff000104)
 
--- diff/arch/ppc/platforms/lopec_setup.c	2004-05-19 22:11:16.000000000 +0100
+++ source/arch/ppc/platforms/lopec_setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -33,7 +33,6 @@
 #include <asm/hw_irq.h>
 #include <asm/prep_nvram.h>
 
-extern char saved_command_line[];
 extern void lopec_find_bridges(void);
 
 /*
--- diff/arch/ppc/platforms/pmac_cpufreq.c	2004-05-19 22:11:16.000000000 +0100
+++ source/arch/ppc/platforms/pmac_cpufreq.c	2004-07-01 21:32:33.000000000 +0100
@@ -1,7 +1,8 @@
 /*
  *  arch/ppc/platforms/pmac_cpufreq.c
  *
- *  Copyright (C) 2002 - 2003 Benjamin Herrenschmidt <benh@kernel.crashing.org>
+ *  Copyright (C) 2002 - 2004 Benjamin Herrenschmidt <benh@kernel.crashing.org>
+ *  Copyright (C) 2004        John Steele Scott <toojays@toojays.net>
  *
  * 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
@@ -47,6 +48,7 @@
 #warning "WARNING, CPUFREQ not recommended on SMP kernels"
 #endif
 
+extern void low_choose_7447a_dfs(int dfs);
 extern void low_choose_750fx_pll(int pll);
 extern void low_sleep_handler(void);
 extern void openpic_suspend(struct sys_device *sysdev, u32 state);
@@ -54,18 +56,27 @@
 extern void enable_kernel_altivec(void);
 extern void enable_kernel_fp(void);
 
+/*
+ * Currently, PowerMac cpufreq supports only high & low frequencies
+ * that are set by the firmware
+ */
 static unsigned int low_freq;
 static unsigned int hi_freq;
 static unsigned int cur_freq;
 
-/* Clean that up some day ... use a func ptr or at least an enum... */
-static int cpufreq_uses_pmu;
-static int cpufreq_uses_gpios;
+/*
+ * Different models uses different mecanisms to switch the frequency
+ */
+static int (*set_speed_proc)(int low_speed);
 
+/*
+ * Some definitions used by the various speedprocs
+ */
 static u32 voltage_gpio;
 static u32 frequency_gpio;
 static u32 slew_done_gpio;
 
+
 #define PMAC_CPU_LOW_SPEED	1
 #define PMAC_CPU_HIGH_SPEED	0
 
@@ -123,9 +134,39 @@
 	return 0;
 }
 
+/* Switch CPU speed using DFS */
+static int __pmac dfs_set_cpu_speed(int low_speed)
+{
+	if (low_speed == 0) {
+		/* ramping up, set voltage first */
+		pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 0x05);
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(HZ/1000);
+	} else {
+		/* ramping down, enable aack delay first */
+		pmac_call_feature(PMAC_FTR_AACK_DELAY_ENABLE, NULL, 1, 0);
+	}
+
+	/* set frequency */
+	low_choose_7447a_dfs(low_speed);
+
+	if (low_speed == 1) {
+		/* ramping down, set voltage last */
+		pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 0x04);
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(HZ/1000);
+	} else {
+		/* ramping up, disable aack delay last */
+		pmac_call_feature(PMAC_FTR_AACK_DELAY_ENABLE, NULL, 0, 0);
+	}
+
+	return 0;
+}
+
+
 /* Switch CPU speed using slewing GPIOs
  */
-static int __pmac gpios_set_cpu_speed(unsigned int low_speed)
+static int __pmac gpios_set_cpu_speed(int low_speed)
 {
 	int gpio;
 
@@ -138,7 +179,8 @@
 	}
 
 	/* Set frequency */
-	pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, frequency_gpio, low_speed ? 0x04 : 0x05);
+	pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, frequency_gpio,
+			  low_speed ? 0x04 : 0x05);
 	udelay(200);
 	do {
 		set_current_state(TASK_UNINTERRUPTIBLE);
@@ -163,7 +205,7 @@
 
 /* Switch CPU speed under PMU control
  */
-static int __pmac pmu_set_cpu_speed(unsigned int low_speed)
+static int __pmac pmu_set_cpu_speed(int low_speed)
 {
 	struct adb_request req;
 	unsigned long save_l2cr;
@@ -269,12 +311,7 @@
 		return 0;
 
 	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
-	if (cpufreq_uses_pmu)
-		rc = pmu_set_cpu_speed(speed_mode);
-	else if (cpufreq_uses_gpios)
-		rc = gpios_set_cpu_speed(speed_mode);
-	else
-		rc = cpu_750fx_cpu_speed(speed_mode);
+	set_speed_proc(speed_mode == PMAC_CPU_LOW_SPEED);
 	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 	cur_freq = (speed_mode == PMAC_CPU_HIGH_SPEED) ? hi_freq : low_freq;
 
@@ -338,20 +375,137 @@
 };
 
 
+static int __pmac pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
+{
+	struct device_node *volt_gpio_np = of_find_node_by_name(NULL,
+								"voltage-gpio");
+	struct device_node *freq_gpio_np = of_find_node_by_name(NULL,
+								"frequency-gpio");
+	struct device_node *slew_done_gpio_np = of_find_node_by_name(NULL,
+								     "slewing-done");
+	u32 *value;
+
+	/*
+	 * Check to see if it's GPIO driven or PMU only
+	 *
+	 * The way we extract the GPIO address is slightly hackish, but it
+	 * works well enough for now. We need to abstract the whole GPIO
+	 * stuff sooner or later anyway
+	 */
+
+	if (volt_gpio_np)
+		voltage_gpio = read_gpio(volt_gpio_np);
+	if (freq_gpio_np)
+		frequency_gpio = read_gpio(freq_gpio_np);
+	if (slew_done_gpio_np)
+		slew_done_gpio = read_gpio(slew_done_gpio_np);
+
+	/* If we use the frequency GPIOs, calculate the min/max speeds based
+	 * on the bus frequencies
+	 */
+	if (frequency_gpio && slew_done_gpio) {
+		int lenp, rc;
+		u32 *freqs, *ratio;
+
+		freqs = (u32 *)get_property(cpunode, "bus-frequencies", &lenp);
+		lenp /= sizeof(u32);
+		if (freqs == NULL || lenp != 2) {
+			printk(KERN_ERR "cpufreq: bus-frequencies incorrect or missing\n");
+			return 1;
+		}
+		ratio = (u32 *)get_property(cpunode, "processor-to-bus-ratio*2", NULL);
+		if (ratio == NULL) {
+			printk(KERN_ERR "cpufreq: processor-to-bus-ratio*2 missing\n");
+			return 1;
+		}
+
+		/* Get the min/max bus frequencies */
+		low_freq = min(freqs[0], freqs[1]);
+		hi_freq = max(freqs[0], freqs[1]);
+
+		/* Grrrr.. It _seems_ that the device-tree is lying on the low bus
+		 * frequency, it claims it to be around 84Mhz on some models while
+		 * it appears to be approx. 101Mhz on all. Let's hack around here...
+		 * fortunately, we don't need to be too precise
+		 */
+		if (low_freq < 98000000)
+			low_freq = 101000000;
+			
+		/* Convert those to CPU core clocks */
+		low_freq = (low_freq * (*ratio)) / 2000;
+		hi_freq = (hi_freq * (*ratio)) / 2000;
+
+		/* Now we get the frequencies, we read the GPIO to see what is out current
+		 * speed
+		 */
+		rc = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, frequency_gpio, 0);
+		cur_freq = (rc & 0x01) ? hi_freq : low_freq;
+
+		set_speed_proc = gpios_set_cpu_speed;
+		return 1;
+	}
+
+	/* If we use the PMU, look for the min & max frequencies in the
+	 * device-tree
+	 */
+	value = (u32 *)get_property(cpunode, "min-clock-frequency", NULL);
+	if (!value)
+		return 1;
+	low_freq = (*value) / 1000;
+	/* The PowerBook G4 12" (PowerBook6,1) has an error in the device-tree
+	 * here */
+	if (low_freq < 100000)
+		low_freq *= 10;
+
+	value = (u32 *)get_property(cpunode, "max-clock-frequency", NULL);
+	if (!value)
+		return 1;
+	hi_freq = (*value) / 1000;
+	set_speed_proc = pmu_set_cpu_speed;
+
+	return 0;
+}
+
+static int __pmac pmac_cpufreq_init_7447A(struct device_node *cpunode)
+{
+	struct device_node *volt_gpio_np;
+
+	/* OF only reports the high frequency */
+	hi_freq = cur_freq;
+	low_freq = cur_freq/2;
+	if (mfspr(HID1) & HID1_DFS)
+		cur_freq = low_freq;
+	else
+		cur_freq = hi_freq;
+
+	volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select");
+	if (!volt_gpio_np){
+		printk(KERN_ERR "cpufreq: missing cpu-vcore-select gpio\n");
+		return 1;
+	}
+
+	u32 *reg = (u32 *)get_property(volt_gpio_np, "reg", NULL);
+	voltage_gpio = *reg;
+	set_speed_proc = dfs_set_cpu_speed;
+
+	return 0;
+}
+
 /* Currently, we support the following machines:
  *
  *  - Titanium PowerBook 1Ghz (PMU based, 667Mhz & 1Ghz)
  *  - Titanium PowerBook 800 (PMU based, 667Mhz & 800Mhz)
+ *  - Titanium PowerBook 400 (PMU based, 300Mhz & 400Mhz)
  *  - Titanium PowerBook 500 (PMU based, 300Mhz & 500Mhz)
  *  - iBook2 500 (PMU based, 400Mhz & 500Mhz)
  *  - iBook2 700 (CPU based, 400Mhz & 700Mhz, support low voltage)
- *  - Recent MacRISC3 machines
+ *  - Recent MacRISC3 laptops
+ *  - iBook G4s and PowerBook G4s with 7447A CPUs
  */
 static int __init pmac_cpufreq_setup(void)
 {
 	struct device_node	*cpunode;
 	u32			*value;
-	int			has_freq_ctl = 0;
 
 	if (strstr(cmd_line, "nocpufreq"))
 		return 0;
@@ -367,113 +521,36 @@
 		goto out;
 	cur_freq = (*value) / 1000;
 
-	/* Check for newer machines */
-	if (machine_is_compatible("PowerBook3,4") ||
-	    machine_is_compatible("PowerBook3,5") ||
-	    machine_is_compatible("MacRISC3")) {
-		struct device_node *volt_gpio_np = of_find_node_by_name(NULL, "voltage-gpio");
-		struct device_node *freq_gpio_np = of_find_node_by_name(NULL, "frequency-gpio");
-		struct device_node *slew_done_gpio_np = of_find_node_by_name(NULL, "slewing-done");
-
-		/*
-		 * Check to see if it's GPIO driven or PMU only
-		 *
-		 * The way we extract the GPIO address is slightly hackish, but it
-		 * works well enough for now. We need to abstract the whole GPIO
-		 * stuff sooner or later anyway
-		 */
-
-		if (volt_gpio_np)
-			voltage_gpio = read_gpio(volt_gpio_np);
-		if (freq_gpio_np)
-			frequency_gpio = read_gpio(freq_gpio_np);
-		if (slew_done_gpio_np)
-			slew_done_gpio = read_gpio(slew_done_gpio_np);
-
-		/* If we use the frequency GPIOs, calculate the min/max speeds based
-		 * on the bus frequencies
-		 */
-		if (frequency_gpio && slew_done_gpio) {
-			int lenp, rc;
-			u32 *freqs, *ratio;
-
-			freqs = (u32 *)get_property(cpunode, "bus-frequencies", &lenp);
-			lenp /= sizeof(u32);
-			if (freqs == NULL || lenp != 2) {
-				printk(KERN_ERR "cpufreq: bus-frequencies incorrect or missing\n");
-				goto out;
-			}
-			ratio = (u32 *)get_property(cpunode, "processor-to-bus-ratio*2", NULL);
-			if (ratio == NULL) {
-				printk(KERN_ERR "cpufreq: processor-to-bus-ratio*2 missing\n");
-				goto out;
-			}
-
-			/* Get the min/max bus frequencies */
-			low_freq = min(freqs[0], freqs[1]);
-			hi_freq = max(freqs[0], freqs[1]);
-
-			/* Grrrr.. It _seems_ that the device-tree is lying on the low bus
-			 * frequency, it claims it to be around 84Mhz on some models while
-			 * it appears to be approx. 101Mhz on all. Let's hack around here...
-			 * fortunately, we don't need to be too precise
-			 */
-			if (low_freq < 98000000)
-				low_freq = 101000000;
-			
-			/* Convert those to CPU core clocks */
-			low_freq = (low_freq * (*ratio)) / 2000;
-			hi_freq = (hi_freq * (*ratio)) / 2000;
-
-			/* Now we get the frequencies, we read the GPIO to see what is out current
-			 * speed
-			 */
-			rc = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, frequency_gpio, 0);
-			cur_freq = (rc & 0x01) ? hi_freq : low_freq;
-
-			has_freq_ctl = 1;
-			cpufreq_uses_gpios = 1;
-			goto out;
-		}
-
-		/* If we use the PMU, look for the min & max frequencies in the
-		 * device-tree
-		 */
-		value = (u32 *)get_property(cpunode, "min-clock-frequency", NULL);
-		if (!value)
-			goto out;
-		low_freq = (*value) / 1000;
-		/* The PowerBook G4 12" (PowerBook6,1) has an error in the device-tree
-		 * here */
-		if (low_freq < 100000)
-			low_freq *= 10;
-
-		value = (u32 *)get_property(cpunode, "max-clock-frequency", NULL);
-		if (!value)
-			goto out;
-		hi_freq = (*value) / 1000;
-		has_freq_ctl = 1;
-		cpufreq_uses_pmu = 1;
-	}
+	/*  Check for 7447A based iBook G4 or PowerBook */
+	if (machine_is_compatible("PowerBook6,5") ||
+	    machine_is_compatible("PowerBook6,4") ||
+	    machine_is_compatible("PowerBook5,5") ||
+	    machine_is_compatible("PowerBook5,4")) {
+		pmac_cpufreq_init_7447A(cpunode);
+	/* Check for other MacRISC3 machines */
+	} else if (machine_is_compatible("PowerBook3,4") ||
+		   machine_is_compatible("PowerBook3,5") ||
+		   machine_is_compatible("MacRISC3")) {
+		pmac_cpufreq_init_MacRISC3(cpunode);
 	/* Else check for iBook2 500 */
-	else if (machine_is_compatible("PowerBook4,1")) {
+	} else if (machine_is_compatible("PowerBook4,1")) {
 		/* We only know about 500Mhz model */
 		if (cur_freq < 450000 || cur_freq > 550000)
 			goto out;
 		hi_freq = cur_freq;
 		low_freq = 400000;
-		has_freq_ctl = 1;
-		cpufreq_uses_pmu = 1;
+		set_speed_proc = pmu_set_cpu_speed;
 	}
-	/* Else check for TiPb 500 */
+	/* Else check for TiPb 400 & 500 */
 	else if (machine_is_compatible("PowerBook3,2")) {
-		/* We only know about 500Mhz model */
-		if (cur_freq < 450000 || cur_freq > 550000)
+		/* We only know about the 400 MHz and the 500Mhz model
+		 * they both have 300 MHz as low frequency
+		 */
+		if (cur_freq < 350000 || cur_freq > 550000)
 			goto out;
 		hi_freq = cur_freq;
 		low_freq = 300000;
-		has_freq_ctl = 1;
-		cpufreq_uses_pmu = 1;
+		set_speed_proc = pmu_set_cpu_speed;
 	}
 	/* Else check for 750FX */
 	else if (PVR_VER(mfspr(PVR)) == 0x7000) {
@@ -483,21 +560,19 @@
 		value = (u32 *)get_property(cpunode, "reduced-clock-frequency", NULL);
 		if (!value)
 			goto out;
-		low_freq = (*value) / 1000;
-		cpufreq_uses_pmu = 0;
-		has_freq_ctl = 1;
+		low_freq = (*value) / 1000;		
+		set_speed_proc = cpu_750fx_cpu_speed;
 	}
 out:
-	if (!has_freq_ctl)
+	if (set_speed_proc == NULL)
 		return -ENODEV;
 
 	pmac_cpu_freqs[CPUFREQ_LOW].frequency = low_freq;
 	pmac_cpu_freqs[CPUFREQ_HIGH].frequency = hi_freq;
 
 	printk(KERN_INFO "Registering PowerMac CPU frequency driver\n");
-	printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Boot: %d Mhz, switch method: %s\n",
-	       low_freq/1000, hi_freq/1000, cur_freq/1000,
-	       cpufreq_uses_pmu ? "PMU" : (cpufreq_uses_gpios ? "GPIOs" : "CPU"));
+	printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Boot: %d Mhz\n",
+	       low_freq/1000, hi_freq/1000, cur_freq/1000);
 
 	return cpufreq_register_driver(&pmac_cpufreq_driver);
 }
--- diff/arch/ppc/platforms/pmac_feature.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/platforms/pmac_feature.c	2004-07-01 21:32:33.000000000 +0100
@@ -1282,6 +1282,25 @@
 	return 0;
 }
 
+static long __pmac
+intrepid_aack_delay_enable(struct device_node* node, long param, long value)
+{
+	unsigned long flags;
+
+    	if (uninorth_rev < 0xd2)
+		return -ENODEV;
+
+	LOCK(flags);
+	if (param)
+		UN_BIS(UNI_N_AACK_DELAY, UNI_N_AACK_DELAY_ENABLE);
+	else
+		UN_BIC(UNI_N_AACK_DELAY, UNI_N_AACK_DELAY_ENABLE);
+	UNLOCK(flags);
+
+    	return 0;
+}
+
+
 #endif /* CONFIG_POWER4 */
 
 static long __pmac
@@ -1914,6 +1933,7 @@
 	{ PMAC_FTR_SLEEP_STATE,		core99_sleep_state },
 	{ PMAC_FTR_READ_GPIO,		core99_read_gpio },
 	{ PMAC_FTR_WRITE_GPIO,		core99_write_gpio },
+	{ PMAC_FTR_AACK_DELAY_ENABLE,	intrepid_aack_delay_enable },
 	{ 0, NULL }
 };
 
@@ -2116,6 +2136,14 @@
 		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
 		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
 	},
+	{	"PowerBook5,4",			"PowerBook G4 15\"",
+		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
+		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+	},
+	{	"PowerBook5,5",			"PowerBook G4 17\"",
+		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
+		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+	},
 	{	"PowerBook6,1",			"PowerBook G4 12\"",
 		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
 		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
@@ -2128,6 +2156,10 @@
 		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
 		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
 	},
+	{	"PowerBook6,4",			"PowerBook G4 12\"",
+		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
+		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+	},
 	{	"PowerBook6,5",			"iBook G4",
 		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
 		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
--- diff/arch/ppc/platforms/pmac_setup.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/platforms/pmac_setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -103,8 +103,6 @@
 
 static int current_root_goodness = -1;
 
-extern char saved_command_line[];
-
 extern int pmac_newworld;
 
 #define DEFAULT_ROOT_DEVICE Root_SDA1	/* sda1 - slightly silly choice */
--- diff/arch/ppc/platforms/pplus.c	2004-05-19 22:11:16.000000000 +0100
+++ source/arch/ppc/platforms/pplus.c	2004-07-01 21:32:33.000000000 +0100
@@ -48,8 +48,6 @@
 
 TODC_ALLOC();
 
-extern char saved_command_line[];
-
 extern void pplus_setup_hose(void);
 extern void pplus_set_VIA_IDE_native(void);
 
--- diff/arch/ppc/platforms/prep_setup.c	2004-05-19 22:11:16.000000000 +0100
+++ source/arch/ppc/platforms/prep_setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -76,7 +76,6 @@
 extern void ibm_prep_init(void);
 
 extern void prep_find_bridges(void);
-extern char saved_command_line[];
 
 int _prep_type;
 
--- diff/arch/ppc/platforms/rpxsuper.h	2004-05-19 22:11:16.000000000 +0100
+++ source/arch/ppc/platforms/rpxsuper.h	2004-07-01 21:32:33.000000000 +0100
@@ -32,7 +32,7 @@
  * We just map a few things we need.  The CSR is actually 4 byte-wide
  * registers that can be accessed as 8-, 16-, or 32-bit values.
  */
-#define IMAP_ADDR		((uint)0xf0000000)
+#define CPM_MAP_ADDR		((uint)0xf0000000)
 #define RPX_CSR_ADDR		((uint)0xfa000000)
 #define RPX_CSR_SIZE		((uint)(512 * 1024))
 #define RPX_NVRTC_ADDR		((uint)0xfa080000)
--- diff/arch/ppc/platforms/sbc82xx.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/platforms/sbc82xx.c	2004-07-01 21:32:33.000000000 +0100
@@ -18,14 +18,18 @@
 #include <linux/config.h>
 #include <linux/seq_file.h>
 #include <linux/stddef.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <asm/mpc8260.h>
 #include <asm/machdep.h>
 #include <asm/io.h>
 #include <asm/todc.h>
-#include <asm/immap_8260.h>
+#include <asm/immap_cpm2.h>
+#include <asm/pci.h>
 
 static void (*callback_setup_arch)(void);
+static void (*callback_init_IRQ)(void);
 
 extern unsigned char __res[sizeof(bd_t)];
 
@@ -57,6 +61,7 @@
 	callback_setup_arch();
 }
 
+#ifdef CONFIG_GEN_RTC
 TODC_ALLOC();
 
 /*
@@ -64,16 +69,17 @@
  * directly use ioremap() at that time.
  * late_time_init() is call after paging init.
  */
-#ifdef CONFIG_GEN_RTC
+
 static void sbc82xx_time_init(void)
 {
-	volatile memctl8260_t *mc = &immr->im_memctl;
-	TODC_INIT(TODC_TYPE_MK48T59, 0, 0, SBC82xx_TODC_NVRAM_ADDR, 0);
+	volatile memctl_cpm2_t *mc = &cpm2_immr->im_memctl;
 
 	/* Set up CS11 for RTC chip */
 	mc->memc_br11=0;
 	mc->memc_or11=0xffff0836;
-	mc->memc_br11=0x80000801;
+	mc->memc_br11=SBC82xx_TODC_NVRAM_ADDR | 0x0801;
+
+	TODC_INIT(TODC_TYPE_MK48T59, 0, 0, SBC82xx_TODC_NVRAM_ADDR, 0);
 
 	todc_info->nvram_data =
 		(unsigned int)ioremap(todc_info->nvram_data, 0x2000);
@@ -86,6 +92,152 @@
 }
 #endif /* CONFIG_GEN_RTC */
 
+static volatile char *sbc82xx_i8259_map;
+static char sbc82xx_i8259_mask = 0xff;
+static spinlock_t sbc82xx_i8259_lock = SPIN_LOCK_UNLOCKED;
+
+static void sbc82xx_i8259_mask_and_ack_irq(unsigned int irq_nr)
+{
+	unsigned long flags;
+
+	irq_nr -= NR_SIU_INTS;
+
+	spin_lock_irqsave(&sbc82xx_i8259_lock, flags);
+	sbc82xx_i8259_mask |= 1 << irq_nr;
+	(void) sbc82xx_i8259_map[1];	/* Dummy read */
+	sbc82xx_i8259_map[1] = sbc82xx_i8259_mask;
+	sbc82xx_i8259_map[0] = 0x20;	/* OCW2: Non-specific EOI */
+	spin_unlock_irqrestore(&sbc82xx_i8259_lock, flags);
+}
+
+static void sbc82xx_i8259_mask_irq(unsigned int irq_nr)
+{
+	unsigned long flags;
+
+	irq_nr -= NR_SIU_INTS;
+
+	spin_lock_irqsave(&sbc82xx_i8259_lock, flags);
+	sbc82xx_i8259_mask |= 1 << irq_nr;
+	sbc82xx_i8259_map[1] = sbc82xx_i8259_mask;
+	spin_unlock_irqrestore(&sbc82xx_i8259_lock, flags);
+}
+
+static void sbc82xx_i8259_unmask_irq(unsigned int irq_nr)
+{
+	unsigned long flags;
+
+	irq_nr -= NR_SIU_INTS;
+
+	spin_lock_irqsave(&sbc82xx_i8259_lock, flags);
+	sbc82xx_i8259_mask &= ~(1 << irq_nr);
+	sbc82xx_i8259_map[1] = sbc82xx_i8259_mask;
+	spin_unlock_irqrestore(&sbc82xx_i8259_lock, flags);
+}
+
+static void sbc82xx_i8259_end_irq(unsigned int irq)
+{
+	if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))
+	    && irq_desc[irq].action)
+		sbc82xx_i8259_unmask_irq(irq);
+}
+
+
+struct hw_interrupt_type sbc82xx_i8259_ic = {
+	.typename = " i8259     ",
+	.enable = sbc82xx_i8259_unmask_irq,
+	.disable = sbc82xx_i8259_mask_irq,
+	.ack = sbc82xx_i8259_mask_and_ack_irq,
+	.end = sbc82xx_i8259_end_irq,
+};
+
+static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id, struct pt_regs *regs)
+{
+	spin_lock(&sbc82xx_i8259_lock);
+
+	sbc82xx_i8259_map[0] = 0x0c;	/* OCW3: Read IR register on RD# pulse */
+	irq = sbc82xx_i8259_map[0] & 7;	/* Read IRR */
+
+	if (irq == 7) {
+		/* Possible spurious interrupt */
+		int isr;
+		sbc82xx_i8259_map[0] = 0x0b;	/* OCW3: Read IS register on RD# pulse */
+		isr = sbc82xx_i8259_map[0];	/* Read ISR */
+
+		if (!(isr & 0x80)) {
+			printk(KERN_INFO "Spurious i8259 interrupt\n");
+			return IRQ_HANDLED;
+		}
+	}
+	ppc_irq_dispatch_handler(regs, NR_SIU_INTS + irq);
+	return IRQ_HANDLED;
+}
+
+void __init sbc82xx_init_IRQ(void)
+{
+	volatile memctl_cpm2_t *mc = &cpm2_immr->im_memctl;
+	volatile intctl_cpm2_t *ic = &cpm2_immr->im_intctl;
+	int i;
+
+	callback_init_IRQ();
+
+	/* u-boot doesn't always set the board up correctly */
+	mc->memc_br5 = 0;
+	mc->memc_or5 = 0xfff00856;
+	mc->memc_br5 = 0x22000801;
+
+	sbc82xx_i8259_map = ioremap(0x22008000, 2);
+	if (!sbc82xx_i8259_map) {
+		printk(KERN_CRIT "Mapping i8259 interrupt controller failed\n");
+		return;
+	}
+	
+	/* Set up the interrupt handlers for the i8259 IRQs */
+	for (i = NR_SIU_INTS; i < NR_SIU_INTS + 8; i++) {
+                irq_desc[i].handler = &sbc82xx_i8259_ic;
+		irq_desc[i].status |= IRQ_LEVEL;
+	}
+
+	/* make IRQ6 level sensitive */
+	ic->ic_siexr &= ~(1 << (14 - (SIU_INT_IRQ6 - SIU_INT_IRQ1)));
+	irq_desc[SIU_INT_IRQ6].status |= IRQ_LEVEL;
+
+	/* Initialise the i8259 */
+	sbc82xx_i8259_map[0] = 0x1b;	/* ICW1: Level, no cascade, ICW4 */
+	sbc82xx_i8259_map[1] = 0x00;	/* ICW2: vector base */
+					/* No ICW3 (no cascade) */
+	sbc82xx_i8259_map[1] = 0x01;	/* ICW4: 8086 mode, normal EOI */
+
+	sbc82xx_i8259_map[0] = 0x0b;	/* OCW3: Read IS register on RD# pulse */
+
+	sbc82xx_i8259_map[1] = sbc82xx_i8259_mask; /* Set interrupt mask */
+
+	/* Request cascade IRQ */
+	if (request_irq(SIU_INT_IRQ6, sbc82xx_i8259_demux, SA_INTERRUPT,
+			"i8259 demux", 0)) {
+		printk("Installation of i8259 IRQ demultiplexer failed.\n");
+	}
+}
+
+static int sbc82xx_pci_map_irq(struct pci_dev *dev, unsigned char idsel,
+			       unsigned char pin)
+{
+	static char pci_irq_table[][4] = {
+		/*
+		 * PCI IDSEL/INTPIN->INTLINE
+		 *  A      B      C      D
+		 */
+		{ SBC82xx_PIRQA, SBC82xx_PIRQB, SBC82xx_PIRQC, SBC82xx_PIRQD },	/* IDSEL 16 - PMC slot */
+		{ SBC82xx_PC_IRQA, SBC82xx_PC_IRQB, -1,  -1  },			/* IDSEL 17 - CardBus */
+		{ SBC82xx_PIRQA, SBC82xx_PIRQB, SBC82xx_PIRQC, SBC82xx_PIRQD }, /* IDSEL 18 - PCI-X bridge */
+	};
+
+	const long min_idsel = 16, max_idsel = 18, irqs_per_slot = 4;
+
+	return PCI_IRQ_TABLE_LOOKUP;
+}
+
+
+
 void __init
 platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 	      unsigned long r6, unsigned long r7)
@@ -101,7 +253,11 @@
 	ppc_md.show_cpuinfo	= sbc82xx_show_cpuinfo;
 
 	callback_setup_arch	= ppc_md.setup_arch;
+	callback_init_IRQ	= ppc_md.init_IRQ;
+
 	ppc_md.setup_arch	= sbc82xx_setup_arch;
+	ppc_md.init_IRQ		= sbc82xx_init_IRQ;
+	ppc_md.pci_map_irq	= sbc82xx_pci_map_irq;
 #ifdef CONFIG_GEN_RTC
 	ppc_md.time_init        = NULL;
 	ppc_md.get_rtc_time     = NULL;
--- diff/arch/ppc/platforms/sbc82xx.h	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/platforms/sbc82xx.h	2004-07-01 21:32:33.000000000 +0100
@@ -9,10 +9,9 @@
 
 #include <asm/ppcboot.h>
 
-#define IMAP_ADDR			0xf0000000
 #define CPM_MAP_ADDR			0xf0000000
 
-#define SBC82xx_TODC_NVRAM_ADDR		0x80000000
+#define SBC82xx_TODC_NVRAM_ADDR		0xd0000000
 
 #define SBC82xx_MACADDR_NVRAM_FCC1	0x220000c9	/* JP6B */
 #define SBC82xx_MACADDR_NVRAM_SCC1	0x220000cf	/* JP6A */
@@ -21,4 +20,13 @@
 
 #define BOOTROM_RESTART_ADDR      ((uint)0x40000104)
 
+#define SBC82xx_PC_IRQA (NR_SIU_INTS+0)
+#define SBC82xx_PC_IRQB (NR_SIU_INTS+1)
+#define SBC82xx_MPC185_IRQ (NR_SIU_INTS+2)
+#define SBC82xx_ATM_IRQ (NR_SIU_INTS+3)
+#define SBC82xx_PIRQA (NR_SIU_INTS+4)
+#define SBC82xx_PIRQB (NR_SIU_INTS+5)
+#define SBC82xx_PIRQC (NR_SIU_INTS+6)
+#define SBC82xx_PIRQD (NR_SIU_INTS+7)
+
 #endif /* __PPC_SBC82xx_H__ */
--- diff/arch/ppc/platforms/sbs8260.h	2004-05-19 22:11:16.000000000 +0100
+++ source/arch/ppc/platforms/sbs8260.h	2004-07-01 21:32:33.000000000 +0100
@@ -5,7 +5,7 @@
  * the configuration SCMR and the Power-On-Reset word.
  */
 
-#define IMAP_ADDR	((uint)0xfe000000)
+#define CPM_MAP_ADDR	((uint)0xfe000000)
 
 
 /* A Board Information structure that is given to a program when
--- diff/arch/ppc/platforms/tqm8260.h	2004-05-19 22:11:16.000000000 +0100
+++ source/arch/ppc/platforms/tqm8260.h	2004-07-01 21:32:33.000000000 +0100
@@ -11,7 +11,7 @@
 
 #include <asm/ppcboot.h>
 
-#define IMAP_ADDR		((uint)0xFFF00000)
+#define CPM_MAP_ADDR		((uint)0xFFF00000)
 #define PHY_INTERRUPT		25
 
 #define BOOTROM_RESTART_ADDR	((uint)0x40000104)
--- diff/arch/ppc/platforms/tqm8260_setup.c	2004-05-19 22:11:16.000000000 +0100
+++ source/arch/ppc/platforms/tqm8260_setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -17,7 +17,7 @@
 #include <linux/config.h>
 #include <linux/seq_file.h>
 
-#include <asm/immap_8260.h>
+#include <asm/immap_cpm2.h>
 #include <asm/mpc8260.h>
 #include <asm/machdep.h>
 
@@ -44,8 +44,8 @@
 static int
 tqm8260_set_rtc_time(unsigned long time)
 {
-	((immap_t *)IMAP_ADDR)->im_sit.sit_tmcnt = time;
-	((immap_t *)IMAP_ADDR)->im_sit.sit_tmcntsc = 0x3;
+	((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcnt = time;
+	((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcntsc = 0x3;
 
 	return(0);
 }
@@ -53,7 +53,7 @@
 static unsigned long
 tqm8260_get_rtc_time(void)
 {
-	return ((immap_t *)IMAP_ADDR)->im_sit.sit_tmcnt;
+	return ((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcnt;
 }
 
 static void __init
--- diff/arch/ppc/syslib/Makefile	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/syslib/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -8,6 +8,9 @@
 ifdef CONFIG_4xx
 EXTRA_AFLAGS		:= -Wa,-m405
 endif
+ifdef CONFIG_E500
+EXTRA_AFLAGS		:= -Wa,-me500
+endif
 
 CFLAGS_prom_init.o      += -fPIC
 CFLAGS_btext.o          += -fPIC
@@ -66,7 +69,10 @@
 obj-$(CONFIG_SBC82xx)		+= todc_time.o
 obj-$(CONFIG_SPRUCE)		+= cpc700_pic.o indirect_pci.o pci_auto.o \
 				   todc_time.o
-obj-$(CONFIG_8260)		+= m8260_setup.o ppc8260_pic.o
+obj-$(CONFIG_8260)		+= m8260_setup.o cpm2_pic.o
+obj-$(CONFIG_PCI_8260)		+= m8260_pci.o indirect_pci.o
+obj-$(CONFIG_8260_PCI9)		+= m8260_pci_erratum9.o
+obj-$(CONFIG_CPM2)		+= cpm2_common.o
 ifeq ($(CONFIG_PPC_GEN550),y)
 obj-$(CONFIG_KGDB)		+= gen550_kgdb.o gen550_dbg.o
 obj-$(CONFIG_SERIAL_TEXT_DEBUG)	+= gen550_dbg.o
@@ -75,3 +81,7 @@
 obj-$(CONFIG_MPC10X_BRIDGE)     += mpc10x_common.o indirect_pci.o
 obj-$(CONFIG_40x)		+= dcr.o
 obj-$(CONFIG_BOOKE)		+= dcr.o
+obj-$(CONFIG_85xx)		+= open_pic.o ppc85xx_common.o ppc85xx_setup.o
+ifeq ($(CONFIG_85xx),y)
+obj-$(CONFIG_PCI)		+= indirect_pci.o pci_auto.o
+endif
--- diff/arch/ppc/syslib/m8260_setup.c	2004-05-19 22:11:17.000000000 +0100
+++ source/arch/ppc/syslib/m8260_setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -39,12 +39,12 @@
 #include <asm/pgtable.h>
 #include <asm/ide.h>
 #include <asm/mpc8260.h>
-#include <asm/immap_8260.h>
+#include <asm/immap_cpm2.h>
 #include <asm/machdep.h>
 #include <asm/bootinfo.h>
 #include <asm/time.h>
 
-#include "ppc8260_pic.h"
+#include "cpm2_pic.h"
 
 static int m8260_set_rtc_time(unsigned long time);
 static unsigned long m8260_get_rtc_time(void);
@@ -52,14 +52,23 @@
 
 unsigned char __res[sizeof(bd_t)];
 
-extern void m8260_cpm_reset(void);
+extern void cpm2_reset(void);
+extern void m8260_find_bridges(void);
+extern void idma_pci9_init(void);
 
 static void __init
 m8260_setup_arch(void)
 {
 	/* Reset the Communication Processor Module.
 	*/
-	m8260_cpm_reset();
+	cpm2_reset();
+#ifdef CONFIG_8260_PCI9
+	/* Initialise IDMA for PCI erratum workaround */
+	idma_pci9_init();
+#endif
+#ifdef CONFIG_PCI_8260
+	m8260_find_bridges();
+#endif
 }
 
 /* The decrementer counts at the system (internal) clock frequency
@@ -142,9 +151,9 @@
 
 	bp = (bd_t *)__res;
 
-	seq_printf(m, "core clock\t: %d MHz\n"
-		   "CPM  clock\t: %d MHz\n"
-		   "bus  clock\t: %d MHz\n",
+	seq_printf(m, "core clock\t: %ld MHz\n"
+		   "CPM  clock\t: %ld MHz\n"
+		   "bus  clock\t: %ld MHz\n",
 		   bp->bi_intfreq / 1000000,
 		   bp->bi_cpmfreq / 1000000,
 		   bp->bi_busfreq / 1000000);
@@ -164,15 +173,15 @@
 	void cpm_interrupt_init(void);
 
         for ( i = 0 ; i < NR_SIU_INTS ; i++ )
-                irq_desc[i].handler = &ppc8260_pic;
+                irq_desc[i].handler = &cpm2_pic;
 
 	/* Initialize the default interrupt mapping priorities,
 	 * in case the boot rom changed something on us.
 	 */
-	immr->im_intctl.ic_sicr = 0;
-	immr->im_intctl.ic_siprr = 0x05309770;
-	immr->im_intctl.ic_scprrh = 0x05309770;
-	immr->im_intctl.ic_scprrl = 0x05309770;
+	cpm2_immr->im_intctl.ic_sicr = 0;
+	cpm2_immr->im_intctl.ic_siprr = 0x05309770;
+	cpm2_immr->im_intctl.ic_scprrh = 0x05309770;
+	cpm2_immr->im_intctl.ic_scprrl = 0x05309770;
 }
 
 /*
@@ -200,7 +209,7 @@
 	uint addr;
 
 	/* Map IMMR region to a 256MB BAT */
-	addr = (immr != NULL) ? (uint)immr : IMAP_ADDR;
+	addr = (cpm2_immr != NULL) ? (uint)cpm2_immr : CPM_MAP_ADDR;
 	io_block_mapping(addr, addr, 0x10000000, _PAGE_IO);
 
 	/* Map I/O region to a 256MB BAT */
@@ -244,7 +253,7 @@
 	ppc_md.show_percpuinfo		= m8260_show_percpuinfo;
 	ppc_md.irq_canonicalize	= NULL;
 	ppc_md.init_IRQ			= m8260_init_IRQ;
-	ppc_md.get_irq			= m8260_get_irq;
+	ppc_md.get_irq			= cpm2_get_irq;
 	ppc_md.init			= NULL;
 
 	ppc_md.restart			= m8260_restart;
--- diff/arch/ppc/syslib/open_pic.c	2004-05-19 22:11:17.000000000 +0100
+++ source/arch/ppc/syslib/open_pic.c	2004-07-01 21:32:33.000000000 +0100
@@ -28,7 +28,7 @@
 
 #include "open_pic_defs.h"
 
-#ifdef CONFIG_PRPMC800
+#if defined(CONFIG_PRPMC800) || defined(CONFIG_85xx)
 #define OPENPIC_BIG_ENDIAN
 #endif
 
--- diff/arch/ppc64/Kconfig	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/Kconfig	2004-07-01 21:32:33.000000000 +0100
@@ -198,7 +198,6 @@
 
 config PREEMPT
 	bool "Preemptible Kernel"
-	depends on BROKEN
 	help
 	  This option reduces the latency of the kernel when reacting to
 	  real-time or interactive events by allowing a low priority process to
--- diff/arch/ppc64/kernel/Makefile	2004-05-19 22:11:18.000000000 +0100
+++ source/arch/ppc64/kernel/Makefile	2004-07-01 21:32:33.000000000 +0100
@@ -56,4 +56,6 @@
 obj-$(CONFIG_PPC_PMAC)		+= pmac_smp.o smp-tbsync.o
 endif
 
+obj-$(CONFIG_ALTIVEC)		+= vecemu.o vector.o
+
 CFLAGS_ioctl32.o += -Ifs/
--- diff/arch/ppc64/kernel/align.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/align.c	2004-07-01 21:32:33.000000000 +0100
@@ -22,8 +22,6 @@
 #include <asm/cache.h>
 #include <asm/cputable.h>
 
-void disable_kernel_fp(void); /* asm function from head.S */
-
 struct aligninfo {
 	unsigned char len;
 	unsigned char flags;
@@ -280,8 +278,11 @@
 	}
 
 	/* Force the fprs into the save area so we can reference them */
-	if ((flags & F) && (regs->msr & MSR_FP))
-		giveup_fpu(current);
+	if (flags & F) {
+		if (!user_mode(regs))
+			return 0;
+		flush_fp_to_thread(current);
+	}
 	
 	/* If we are loading, get the data from user space */
 	if (flags & LD) {
@@ -310,9 +311,11 @@
 		if (flags & F) {
 			if (nb == 4) {
 				/* Doing stfs, have to convert to single */
+				preempt_disable();
 				enable_kernel_fp();
 				cvt_df(&current->thread.fpr[reg], (float *)&data.v[4], &current->thread.fpscr);
 				disable_kernel_fp();
+				preempt_enable();
 			}
 			else
 				data.dd = current->thread.fpr[reg];
@@ -344,9 +347,11 @@
 		if (flags & F) {
 			if (nb == 4) {
 				/* Doing lfs, have to convert to double */
+				preempt_disable();
 				enable_kernel_fp();
 				cvt_fd((float *)&data.v[4], &current->thread.fpr[reg], &current->thread.fpscr);
 				disable_kernel_fp();
+				preempt_enable();
 			}
 			else
 				current->thread.fpr[reg] = data.dd;
--- diff/arch/ppc64/kernel/asm-offsets.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/asm-offsets.c	2004-07-01 21:32:33.000000000 +0100
@@ -48,6 +48,8 @@
 	DEFINE(THREAD_SHIFT, THREAD_SHIFT);
 	DEFINE(THREAD_SIZE, THREAD_SIZE);
 	DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
+	DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
+	DEFINE(TI_SC_NOERR, offsetof(struct thread_info, syscall_noerror));
 
 	/* task_struct->thread */
 	DEFINE(THREAD, offsetof(struct task_struct, thread));
@@ -99,7 +101,10 @@
 	DEFINE(PACALPPACA, offsetof(struct paca_struct, xLpPaca));
         DEFINE(LPPACA, offsetof(struct paca_struct, xLpPaca));
         DEFINE(PACAREGSAV, offsetof(struct paca_struct, xRegSav));
-        DEFINE(PACAEXC, offsetof(struct paca_struct, exception_stack));
+        DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen));
+        DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc));
+        DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb));
+        DEFINE(PACA_EXDSI, offsetof(struct paca_struct, exdsi));
         DEFINE(PACAGUARD, offsetof(struct paca_struct, guard));
         DEFINE(LPPACASRR0, offsetof(struct ItLpPaca, xSavedSrr0));
         DEFINE(LPPACASRR1, offsetof(struct ItLpPaca, xSavedSrr1));
@@ -136,6 +141,10 @@
 	DEFINE(GPR7, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[7]));
 	DEFINE(GPR8, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[8]));
 	DEFINE(GPR9, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[9]));
+	DEFINE(GPR10, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[10]));
+	DEFINE(GPR11, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[11]));
+	DEFINE(GPR12, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[12]));
+	DEFINE(GPR13, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[13]));
 	DEFINE(GPR20, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[20]));
 	DEFINE(GPR21, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[21]));
 	DEFINE(GPR22, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[22]));
@@ -154,7 +163,7 @@
 	DEFINE(_DSISR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr));
 	DEFINE(ORIG_GPR3, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, orig_gpr3));
 	DEFINE(RESULT, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, result));
-	DEFINE(TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap));
+	DEFINE(_TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap));
 	DEFINE(SOFTE, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, softe));
 
 	/* These _only_ to be used with {PROM,RTAS}_FRAME_SIZE!!! */
--- diff/arch/ppc64/kernel/bitops.c	2004-05-19 22:11:18.000000000 +0100
+++ source/arch/ppc64/kernel/bitops.c	2004-07-01 21:32:33.000000000 +0100
@@ -7,10 +7,10 @@
 #include <asm/bitops.h>
 #include <asm/byteorder.h>
 
-unsigned long find_next_zero_bit(unsigned long *addr, unsigned long size,
+unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size,
 				 unsigned long offset)
 {
-	unsigned long *p = addr + (offset >> 6);
+	const unsigned long *p = addr + (offset >> 6);
 	unsigned long result = offset & ~63UL;
 	unsigned long tmp;
 
@@ -48,10 +48,10 @@
 
 EXPORT_SYMBOL(find_next_zero_bit);
 
-unsigned long find_next_bit(unsigned long *addr, unsigned long size,
+unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
 			    unsigned long offset)
 {
-	unsigned long *p = addr + (offset >> 6);
+	const unsigned long *p = addr + (offset >> 6);
 	unsigned long result = offset & ~63UL;
 	unsigned long tmp;
 
@@ -106,10 +106,10 @@
 	return rc;
 }
 
-unsigned long find_next_zero_le_bit(unsigned long *addr, unsigned long size,
+unsigned long find_next_zero_le_bit(const unsigned long *addr, unsigned long size,
 				    unsigned long offset)
 {
-	unsigned int *p = ((unsigned int *)addr) + (offset >> 5);
+	const unsigned int *p = ((const unsigned int *)addr) + (offset >> 5);
 	unsigned int result = offset & ~31;
 	unsigned int tmp;
 
--- diff/arch/ppc64/kernel/cputable.c	2004-05-19 22:11:18.000000000 +0100
+++ source/arch/ppc64/kernel/cputable.c	2004-07-01 21:32:33.000000000 +0100
@@ -141,7 +141,8 @@
 	    0xffff0000, 0x003a0000, "POWER5 (gr)",
 	    CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
 		    CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA | CPU_FTR_SMT |
-		    CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE,
+		    CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE |
+		    CPU_FTR_MMCRA_SIHV,
 	    COMMON_USER_PPC64,
 	    128, 128,
 	    __setup_cpu_power4,
@@ -151,7 +152,8 @@
 	    0xffff0000, 0x003b0000, "POWER5 (gs)",
 	    CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
 		    CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA | CPU_FTR_SMT |
-		    CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE,
+		    CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE |
+		    CPU_FTR_MMCRA_SIHV,
 	    COMMON_USER_PPC64,
 	    128, 128,
 	    __setup_cpu_power4,
--- diff/arch/ppc64/kernel/eeh.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/eeh.c	2004-07-01 21:32:33.000000000 +0100
@@ -365,7 +365,8 @@
 	unsigned long addr;
 	struct pci_dev *dev;
 	struct device_node *dn;
-	unsigned long ret, rets[2];
+	unsigned long ret;
+	int rets[2];
 	static spinlock_t lock = SPIN_LOCK_UNLOCKED;
 	/* dont want this on the stack */
 	static unsigned char slot_err_buf[RTAS_ERROR_LOG_MAX];
@@ -444,11 +445,11 @@
 		 * can use it here.
 		 */
 		if (panic_on_oops) {
-			panic("EEH: MMIO failure (%ld) on device:%s %s\n",
+			panic("EEH: MMIO failure (%d) on device:%s %s\n",
 			      rets[0], pci_name(dev), pci_pretty_name(dev));
 		} else {
 			__get_cpu_var(ignored_failures)++;
-			printk(KERN_INFO "EEH: MMIO failure (%ld) on device:%s %s\n",
+			printk(KERN_INFO "EEH: MMIO failure (%d) on device:%s %s\n",
 			       rets[0], pci_name(dev), pci_pretty_name(dev));
 		}
 	} else {
--- diff/arch/ppc64/kernel/entry.S	2004-05-19 22:11:18.000000000 +0100
+++ source/arch/ppc64/kernel/entry.S	2004-07-01 21:32:33.000000000 +0100
@@ -35,15 +35,9 @@
 #define DO_SOFT_DISABLE
 #endif
 
-#undef SHOW_SYSCALLS
-#undef SHOW_SYSCALLS_TASK
-
-#ifdef SHOW_SYSCALLS_TASK
-	.data
-show_syscalls_task:
-	.long	-1
-#endif
-
+/*
+ * System calls.
+ */
 	.section	".toc","aw"
 .SYS_CALL_TABLE:
 	.tc .sys_call_table[TC],.sys_call_table
@@ -51,107 +45,175 @@
 .SYS_CALL_TABLE32:
 	.tc .sys_call_table32[TC],.sys_call_table32
 
+/* This value is used to mark exception frames on the stack. */
+exception_marker:
+	.tc	ID_72656773_68657265[TC],0x7265677368657265
+
 	.section	".text"
-	.align 3
+	.align 7
 
-/*
- * Handle a system call.
- */
-_GLOBAL(DoSyscall)
+#undef SHOW_SYSCALLS
+
+	.globl SystemCall_common
+SystemCall_common:
+	andi.	r10,r12,MSR_PR
+	mr	r10,r1
+	addi	r1,r1,-INT_FRAME_SIZE
+	beq-	1f
+	ld	r1,PACAKSAVE(r13)
+1:	std	r10,0(r1)
+	std	r11,_NIP(r1)
+	std	r12,_MSR(r1)
+	std	r0,GPR0(r1)
+	std	r10,GPR1(r1)
+	std	r2,GPR2(r1)
+	std	r3,GPR3(r1)
+	std	r4,GPR4(r1)
+	std	r5,GPR5(r1)
+	std	r6,GPR6(r1)
+	std	r7,GPR7(r1)
+	std	r8,GPR8(r1)
+	li	r11,0
+	std	r11,GPR9(r1)
+	std	r11,GPR10(r1)
+	std	r11,GPR11(r1)
+	std	r11,GPR12(r1)
+	std	r9,GPR13(r1)
+	crclr	so
+	mfcr	r9
+	mflr	r10
+	li	r11,0xc01
+	std	r9,_CCR(r1)
+	std	r10,_LINK(r1)
+	std	r11,_TRAP(r1)
+	mfxer	r9
+	mfctr	r10
+	std	r9,_XER(r1)
+	std	r10,_CTR(r1)
 	std	r3,ORIG_GPR3(r1)
-	ld	r11,_CCR(r1)	/* Clear SO bit in CR */
-	lis	r10,0x1000
-	andc	r11,r11,r10
-	std	r11,_CCR(r1)
+	ld	r2,PACATOC(r13)
+	addi	r9,r1,STACK_FRAME_OVERHEAD
+	ld	r11,exception_marker@toc(r2)
+	std	r11,-16(r9)		/* "regshere" marker */
+#ifdef CONFIG_PPC_ISERIES
+	/* Hack for handling interrupts when soft-enabling on iSeries */
+	cmpdi	cr1,r0,0x5555		/* syscall 0x5555 */
+	andi.	r10,r12,MSR_PR		/* from kernel */
+	crand	4*cr0+eq,4*cr1+eq,4*cr0+eq
+	beq	HardwareInterrupt_entry
+	lbz	r10,PACAPROCENABLED(r13)
+	std	r10,SOFTE(r1)
+#endif
+	mfmsr	r11
+	ori	r11,r11,MSR_EE
+	mtmsrd	r11,1
+
 #ifdef SHOW_SYSCALLS
-#ifdef SHOW_SYSCALLS_TASK
-	LOADBASE(r31,show_syscalls_task)
-	ld	r31,show_syscalls_task@l(r31)
-	ld	r10,PACACURRENT(r13)
-	cmp	0,r10,r31
-	bne	1f
+	bl	.do_show_syscall
+	REST_GPR(0,r1)
+	REST_4GPRS(3,r1)
+	REST_2GPRS(7,r1)
+	addi	r9,r1,STACK_FRAME_OVERHEAD
 #endif
-	LOADADDR(r3,7f)
-	ld	r4,GPR0(r1)
-	ld	r5,GPR3(r1)
-	ld	r6,GPR4(r1)
-	ld	r7,GPR5(r1)
-	ld	r8,GPR6(r1)
-	ld	r9,GPR7(r1)
-	bl	.printk
-	LOADADDR(r3,77f)
-	ld	r4,GPR8(r1)
-	ld	r5,GPR9(r1)
-	ld	r6, PACACURRENT(r13)
-	bl	.printk
-	ld	r0,GPR0(r1)
-	ld	r3,GPR3(r1)
-	ld	r4,GPR4(r1)
-	ld	r5,GPR5(r1)
-	ld	r6,GPR6(r1)
-	ld	r7,GPR7(r1)
-	ld	r8,GPR8(r1)
-1:
-#endif /* SHOW_SYSCALLS */
-	clrrdi	r10,r1,THREAD_SHIFT
-	ld	r10,TI_FLAGS(r10)
+	clrrdi	r11,r1,THREAD_SHIFT
+	li	r12,0
+	ld	r10,TI_FLAGS(r11)
+	stb	r12,TI_SC_NOERR(r11)
 	andi.	r11,r10,_TIF_SYSCALL_T_OR_A
-	bne-	50f
+	bne-	syscall_dotrace
+syscall_dotrace_cont:
 	cmpli	0,r0,NR_syscalls
-	bge-	66f
+	bge-	syscall_enosys
+
+system_call:			/* label this so stack traces look sane */
 /*
  * Need to vector to 32 Bit or default sys_call_table here,
  * based on caller's run-mode / personality.
  */
-	andi.	r11,r10,_TIF_32BIT
+	ld	r11,.SYS_CALL_TABLE@toc(2)
+	andi.	r10,r10,_TIF_32BIT
 	beq-	15f
-	ld	r10,.SYS_CALL_TABLE32@toc(2)
-/*
- * We now zero extend all six arguments (r3 - r8), the compatibility
- * layer assumes this.
- */
+	ld	r11,.SYS_CALL_TABLE32@toc(2)
 	clrldi	r3,r3,32
 	clrldi	r4,r4,32
 	clrldi	r5,r5,32
 	clrldi	r6,r6,32
 	clrldi	r7,r7,32
 	clrldi	r8,r8,32
-	b	17f
 15:
-	ld	r10,.SYS_CALL_TABLE@toc(2)
-17:	slwi	r0,r0,3
-	ldx	r10,r10,r0	/* Fetch system call handler [ptr] */
+	slwi	r0,r0,3
+	ldx	r10,r11,r0	/* Fetch system call handler [ptr] */
 	mtlr	r10
-	addi	r9,r1,STACK_FRAME_OVERHEAD
 	blrl			/* Call handler */
-_GLOBAL(ret_from_syscall_1)
-	std	r3,RESULT(r1)	/* Save result */
+
+syscall_exit:
 #ifdef SHOW_SYSCALLS
-#ifdef SHOW_SYSCALLS_TASK
-	ld	r10, PACACURRENT(13)
-	cmp	0,r10,r31
-	bne	91f
-#endif
-	mr	r4,r3
-	LOADADDR(r3,79f)
-	bl	.printk
-	ld	r3,RESULT(r1)
-91:
+	std	r3,GPR3(r1)
+	bl	.do_show_syscall_exit
+	ld	r3,GPR3(r1)
 #endif
+	std	r3,RESULT(r1)
+	ld	r5,_CCR(r1)
 	li	r10,-_LAST_ERRNO
-	cmpld	0,r3,r10
-	blt	30f
+	cmpld	r3,r10
+	clrrdi	r12,r1,THREAD_SHIFT
+	bge-	syscall_error
+syscall_error_cont:
+
+	/* check for syscall tracing or audit */
+	ld	r9,TI_FLAGS(r12)
+	andi.	r0,r9,_TIF_SYSCALL_T_OR_A
+	bne-	syscall_exit_trace
+syscall_exit_trace_cont:
+
+	/* disable interrupts so current_thread_info()->flags can't change,
+	   and so that we don't get interrupted after loading SRR0/1. */
+	ld	r8,_MSR(r1)
+	andi.	r10,r8,MSR_RI
+	beq-	unrecov_restore
+	mfmsr	r10
+	rldicl	r10,r10,48,1
+	rotldi	r10,r10,16
+	mtmsrd	r10,1
+	ld	r9,TI_FLAGS(r12)
+	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SIGPENDING|_TIF_NEED_RESCHED)
+	bne-	syscall_exit_work
+	ld	r7,_NIP(r1)
+	stdcx.	r0,0,r1			/* to clear the reservation */
+	andi.	r6,r8,MSR_PR
+	ld	r4,_LINK(r1)
+	beq	1f			/* only restore r13 if */
+	ld	r13,GPR13(r1)		/* returning to usermode */
+1:	ld	r2,GPR2(r1)
+	ld	r1,GPR1(r1)
+	li	r12,MSR_RI
+	andc	r10,r10,r12
+	mtmsrd	r10,1			/* clear MSR.RI */
+	mtlr	r4
+	mtcr	r5
+	mtspr	SRR0,r7
+	mtspr	SRR1,r8
+	rfid
+
+syscall_enosys:
+	li	r3,-ENOSYS
+	std	r3,RESULT(r1)
+	clrrdi	r12,r1,THREAD_SHIFT
+	ld	r5,_CCR(r1)
+
+syscall_error:
+	lbz	r11,TI_SC_NOERR(r12)
+	cmpi	0,r11,0
+	bne-	syscall_error_cont
 	neg	r3,r3
-22:	ld	r10,_CCR(r1)	/* Set SO bit in CR */
-	oris	r10,r10,0x1000
-	std	r10,_CCR(r1)
-30:	std	r3,GPR3(r1)	/* Update return value */
-	b	.ret_from_except
-66:	li	r3,ENOSYS
-	b	22b
+	oris	r5,r5,0x1000	/* Set SO bit in CR */
+	std	r5,_CCR(r1)
+	b	syscall_error_cont
         
 /* Traced system call support */
-50:	addi	r3,r1,STACK_FRAME_OVERHEAD
+syscall_dotrace:
+	bl	.save_nvgprs
+	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	.do_syscall_trace_enter
 	ld	r0,GPR0(r1)	/* Restore original registers */
 	ld	r3,GPR3(r1)
@@ -160,65 +222,82 @@
 	ld	r6,GPR6(r1)
 	ld	r7,GPR7(r1)
 	ld	r8,GPR8(r1)
-	/* XXX check this - Anton */
-	ld	r9,GPR9(r1)
-	cmpli	0,r0,NR_syscalls
-	bge-	66f
-/*
- * Need to vector to 32 Bit or default sys_call_table here,
- * based on caller's run-mode / personality.
- */
+	addi	r9,r1,STACK_FRAME_OVERHEAD
 	clrrdi	r10,r1,THREAD_SHIFT
 	ld	r10,TI_FLAGS(r10)
-	andi.	r11,r10,_TIF_32BIT
-	beq-	55f
-	ld	r10,.SYS_CALL_TABLE32@toc(2)
+	b	syscall_dotrace_cont
+
+syscall_exit_trace:
+	std	r3,GPR3(r1)
+	bl	.save_nvgprs
+	bl	.do_syscall_trace_leave
+	REST_NVGPRS(r1)
+	ld	r3,GPR3(r1)
+	ld	r5,_CCR(r1)
+	clrrdi	r12,r1,THREAD_SHIFT
+	b	syscall_exit_trace_cont
+
+/* Stuff to do on exit from a system call. */
+syscall_exit_work:
+	std	r3,GPR3(r1)
+	std	r5,_CCR(r1)
+	b	.ret_from_except_lite
+
+/* Save non-volatile GPRs, if not already saved. */
+_GLOBAL(save_nvgprs)
+	ld	r11,_TRAP(r1)
+	andi.	r0,r11,1
+	beqlr-
+	SAVE_NVGPRS(r1)
+	clrrdi	r0,r11,1
+	std	r0,_TRAP(r1)
+	blr
+
 /*
- * We now zero extend all six arguments (r3 - r8), the compatibility
- * layer assumes this.
+ * The sigsuspend and rt_sigsuspend system calls can call do_signal
+ * and thus put the process into the stopped state where we might
+ * want to examine its user state with ptrace.  Therefore we need
+ * to save all the nonvolatile registers (r14 - r31) before calling
+ * the C code.  Similarly, fork, vfork and clone need the full
+ * register state on the stack so that it can be copied to the child.
  */
-	clrldi	r3,r3,32
-	clrldi	r4,r4,32
-	clrldi	r5,r5,32
-	clrldi	r6,r6,32
-	clrldi	r7,r7,32
-	clrldi	r8,r8,32
-	b	57f
-55:
-	ld	r10,.SYS_CALL_TABLE@toc(2)
-57:
-	slwi	r0,r0,3
-	ldx	r10,r10,r0	/* Fetch system call handler [ptr] */
-	mtlr	r10
-	addi	r9,r1,STACK_FRAME_OVERHEAD
-	blrl			/* Call handler */
-_GLOBAL(ret_from_syscall_2)
-	std	r3,RESULT(r1)	/* Save result */	
-	li	r10,-_LAST_ERRNO
-	cmpld	0,r3,r10
-	blt	60f
-	neg	r3,r3
-57:	ld	r10,_CCR(r1)	/* Set SO bit in CR */
-	oris	r10,r10,0x1000
-	std	r10,_CCR(r1)
-60:	std	r3,GPR3(r1)	/* Update return value */
-	bl	.do_syscall_trace_leave
-	b	.ret_from_except
-66:	li	r3,ENOSYS
-	b	57b
-#ifdef SHOW_SYSCALLS
-7:	.string	"syscall %d(%x, %x, %x, %x, %x, "
-77:	.string	"%x, %x), current=%p\n"
-79:	.string	" -> %x\n"
-	.align	2,0
-#endif
+_GLOBAL(ppc32_sigsuspend)
+	bl	.save_nvgprs
+	bl	.sys32_sigsuspend
+	b	syscall_exit
+
+_GLOBAL(ppc64_rt_sigsuspend)
+	bl	.save_nvgprs
+	bl	.sys_rt_sigsuspend
+	b	syscall_exit
+
+_GLOBAL(ppc32_rt_sigsuspend)
+	bl	.save_nvgprs
+	bl	.sys32_rt_sigsuspend
+	b	syscall_exit
+
+_GLOBAL(ppc_fork)
+	bl	.save_nvgprs
+	bl	.sys_fork
+	b	syscall_exit
+
+_GLOBAL(ppc_vfork)
+	bl	.save_nvgprs
+	bl	.sys_vfork
+	b	syscall_exit
+
+_GLOBAL(ppc_clone)
+	bl	.save_nvgprs
+	bl	.sys_clone
+	b	syscall_exit
 
-	
 _GLOBAL(ppc32_swapcontext)
+	bl	.save_nvgprs
 	bl	.sys32_swapcontext
 	b	80f
 	
 _GLOBAL(ppc64_swapcontext)
+	bl	.save_nvgprs
 	bl	.sys_swapcontext
 	b	80f
 
@@ -233,17 +312,20 @@
 _GLOBAL(ppc64_rt_sigreturn)
 	bl	.sys_rt_sigreturn
 
-80:	clrrdi	r4,r1,THREAD_SHIFT
+80:	cmpdi	0,r3,0
+	blt	syscall_exit
+	clrrdi	r4,r1,THREAD_SHIFT
 	ld	r4,TI_FLAGS(r4)
 	andi.	r4,r4,_TIF_SYSCALL_T_OR_A
-	bne-	81f
-	cmpi	0,r3,0
-	bge	.ret_from_except
-	b	.ret_from_syscall_1
-81:	cmpi	0,r3,0
-	blt	.ret_from_syscall_2
+	beq+	81f
 	bl	.do_syscall_trace_leave
-	b	.ret_from_except
+81:	b	.ret_from_except
+
+_GLOBAL(ret_from_fork)
+	bl	.schedule_tail
+	REST_NVGPRS(r1)
+	li	r3,0
+	b	syscall_exit
 
 /*
  * This routine switches between two different tasks.  The process
@@ -263,6 +345,7 @@
  * The code which creates the new task context is in 'copy_thread'
  * in arch/ppc64/kernel/process.c
  */
+	.align	7
 _GLOBAL(_switch)
 	mflr	r0
 	std	r0,16(r1)
@@ -315,7 +398,10 @@
 2:
 END_FTR_SECTION_IFSET(CPU_FTR_SLB)
 	clrrdi	r7,r8,THREAD_SHIFT	/* base of new stack */
-	addi	r7,r7,THREAD_SIZE-INT_FRAME_SIZE
+	/* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE
+	   because we don't need to leave the 288-byte ABI gap at the
+	   top of the kernel stack. */
+	addi	r7,r7,THREAD_SIZE-SWITCH_FRAME_SIZE
 
 	mr	r1,r8		/* start using new stack pointer */
 	std	r7,PACAKSAVE(r13)
@@ -350,60 +436,56 @@
 	addi	r1,r1,SWITCH_FRAME_SIZE
 	blr
 
-_GLOBAL(ret_from_fork)
-	bl	.schedule_tail
-	clrrdi	r4,r1,THREAD_SHIFT
-	ld	r4,TI_FLAGS(r4)
-	andi.	r4,r4,_TIF_SYSCALL_T_OR_A
-	beq+	.ret_from_except
-	bl	.do_syscall_trace_leave
-	b	.ret_from_except
-
+	.align	7
 _GLOBAL(ret_from_except)
+	ld	r11,_TRAP(r1)
+	andi.	r0,r11,1
+	bne	.ret_from_except_lite
+	REST_NVGPRS(r1)
+
+_GLOBAL(ret_from_except_lite)
 	/*
 	 * Disable interrupts so that current_thread_info()->flags
 	 * can't change between when we test it and when we return
 	 * from the interrupt.
 	 */
 	mfmsr	r10		/* Get current interrupt state */
-	li	r4,0
-	ori	r4,r4,MSR_EE
-	andc	r9,r10,r4	/* clear MSR_EE */
+	rldicl	r9,r10,48,1	/* clear MSR_EE */
+	rotldi	r9,r9,16
 	mtmsrd	r9,1		/* Update machine state */
 
+#ifdef CONFIG_PREEMPT
+	clrrdi	r9,r1,THREAD_SHIFT	/* current_thread_info() */
+	li	r0,_TIF_NEED_RESCHED	/* bits to check */
+	ld	r3,_MSR(r1)
+	ld	r4,TI_FLAGS(r9)
+	/* Move MSR_PR bit in r3 to _TIF_SIGPENDING position in r0 */
+	rlwimi	r0,r3,32+TIF_SIGPENDING-MSR_PR_LG,_TIF_SIGPENDING
+	and.	r0,r4,r0	/* check NEED_RESCHED and maybe SIGPENDING */
+	bne	do_work
+
+#else /* !CONFIG_PREEMPT */
 	ld	r3,_MSR(r1)	/* Returning to user mode? */
 	andi.	r3,r3,MSR_PR
 	beq	restore		/* if not, just restore regs and return */
 
 	/* Check current_thread_info()->flags */
-	clrrdi	r3,r1,THREAD_SHIFT
-	ld	r3,TI_FLAGS(r3)
-	andi.	r0,r3,_TIF_USER_WORK_MASK
+	clrrdi	r9,r1,THREAD_SHIFT
+	ld	r4,TI_FLAGS(r9)
+	andi.	r0,r4,_TIF_USER_WORK_MASK
 	bne	do_work
-
-	addi	r0,r1,INT_FRAME_SIZE	/* size of frame */
-	ld	r4,PACACURRENT(r13)
-	std	r0,THREAD+KSP(r4)	/* save kernel stack pointer */
-
-	/*
-	 * r13 is our per cpu area, only restore it if we are returning to
-	 * userspace
-	 */
-	REST_GPR(13,r1)
+#endif
 
 restore:
 #ifdef CONFIG_PPC_ISERIES
 	ld	r5,SOFTE(r1)
-	mfspr	r4,SPRG3		/* get paca address */
 	cmpdi	0,r5,0
 	beq	4f
 	/* Check for pending interrupts (iSeries) */
-	/* this is CHECKANYINT except that we already have the paca address */
-	ld	r3,PACALPPACA+LPPACAANYINT(r4)
+	ld	r3,PACALPPACA+LPPACAANYINT(r13)
 	cmpdi	r3,0
 	beq+	4f			/* skip do_IRQ if no interrupts */
 
-	mfspr	r13,SPRG3		/* get paca pointer back */
 	li	r3,0
 	stb	r3,PACAPROCENABLED(r13)	/* ensure we are soft-disabled */
 	mtmsrd	r10			/* hard-enable again */
@@ -411,13 +493,22 @@
 	bl	.do_IRQ
 	b	.ret_from_except		/* loop back and handle more */
 
-4:	stb	r5,PACAPROCENABLED(r4)
+4:	stb	r5,PACAPROCENABLED(r13)
 #endif
 
 	ld	r3,_MSR(r1)
-	andi.	r3,r3,MSR_RI
+	andi.	r0,r3,MSR_RI
 	beq-	unrecov_restore
 
+	andi.	r0,r3,MSR_PR
+
+	/*
+	 * r13 is our per cpu area, only restore it if we are returning to
+	 * userspace
+	 */
+	beq	1f
+	REST_GPR(13, r1)
+1:
 	ld	r3,_CTR(r1)
 	ld	r0,_LINK(r1)
 	mtctr	r3
@@ -426,8 +517,6 @@
 	mtspr	XER,r3
 
 	REST_8GPRS(5, r1)
-	REST_10GPRS(14, r1)
-	REST_8GPRS(24, r1)
 
 	stdcx.	r0,0,r1		/* to clear the reservation */
 
@@ -451,26 +540,62 @@
 	ld	r1,GPR1(r1)
 
 	rfid
+	b	.
 
-/* Note: this must change if we start using the  TIF_NOTIFY_RESUME bit */
+/* Note: this must change if we start using the TIF_NOTIFY_RESUME bit */
 do_work:
+#ifdef CONFIG_PREEMPT
+	andi.	r0,r3,MSR_PR	/* Returning to user mode? */
+	bne	user_work
+	/* Check that preempt_count() == 0 and interrupts are enabled */
+	lwz	r8,TI_PREEMPT(r9)
+	cmpwi	cr1,r8,0
+#ifdef CONFIG_PPC_ISERIES
+	ld	r0,SOFTE(r1)
+	cmpdi	r0,0
+#else
+	andi.	r0,r3,MSR_EE
+#endif
+	crandc	eq,cr1*4+eq,eq
+	bne	restore
+	/* here we are preempting the current task */
+1:	lis	r0,PREEMPT_ACTIVE@h
+	stw	r0,TI_PREEMPT(r9)
+#ifdef CONFIG_PPC_ISERIES
+	li	r0,1
+	stb	r0,PACAPROCENABLED(r13)
+#endif
+	mtmsrd	r10,1		/* reenable interrupts */
+	bl	.schedule
+	mfmsr	r10
+	clrrdi	r9,r1,THREAD_SHIFT
+	rldicl	r10,r10,48,1	/* disable interrupts again */
+	li	r0,0
+	rotldi	r10,r10,16
+	mtmsrd	r10,1
+	ld	r4,TI_FLAGS(r9)
+	andi.	r0,r4,_TIF_NEED_RESCHED
+	bne	1b
+	stw	r0,TI_PREEMPT(r9)
+	b	restore
+
+user_work:
+#endif
 	/* Enable interrupts */
 	mtmsrd	r10,1
 
-	andi.	r0,r3,_TIF_NEED_RESCHED
+	andi.	r0,r4,_TIF_NEED_RESCHED
 	beq	1f
 	bl	.schedule
-	b	.ret_from_except
+	b	.ret_from_except_lite
 
-1:	andi.	r0,r3,_TIF_SIGPENDING
-	beq	.ret_from_except
+1:	bl	.save_nvgprs
 	li	r3,0
 	addi	r4,r1,STACK_FRAME_OVERHEAD
 	bl	.do_signal
 	b	.ret_from_except
 
 unrecov_restore:
-	mfspr   r13,SPRG3
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	.unrecoverable_exception
 	b	unrecov_restore
@@ -488,7 +613,7 @@
 	mflr	r0
 	std	r0,16(r1)
         stdu	r1,-RTAS_FRAME_SIZE(r1)	/* Save SP and create stack space. */
-	
+
 	/* Because RTAS is running in 32b mode, it clobbers the high order half
 	 * of all registers that it saves.  We therefore save those registers
 	 * RTAS might touch to the stack.  (r0, r3-r13 are caller saved)
--- diff/arch/ppc64/kernel/head.S	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/head.S	2004-07-01 21:32:33.000000000 +0100
@@ -35,25 +35,17 @@
 #include <asm/offsets.h>
 #include <asm/bug.h>
 #include <asm/cputable.h>
+#include <asm/setup.h>
 
 #ifdef CONFIG_PPC_ISERIES
 #define DO_SOFT_DISABLE
 #endif
 
-/* copy saved SOFTE bit or EE bit from saved MSR depending
- * if we are doing soft-disable or not
- */
-#ifdef DO_SOFT_DISABLE
-#define DO_COPY_EE()	ld	r20,SOFTE(r1)
-#else
-#define DO_COPY_EE()	rldicl	r20,r23,49,63
-#endif
-
 /*
  * hcall interface to pSeries LPAR
  */
-#define HVSC .long 0x44000022
-#define H_SET_ASR		0x30
+#define HVSC		.long 0x44000022
+#define H_SET_ASR	0x30
 
 /*
  * We layout physical memory as follows:
@@ -62,19 +54,19 @@
  * 0x3000 - 0x3fff : Interrupt support
  * 0x4000 - 0x4fff : NACA
  * 0x5000 - 0x5fff : SystemCfg
- * 0x6000          : iSeries and common interrupt prologs
+ * 0x6000	   : iSeries and common interrupt prologs
  * 0x9000 - 0x9fff : Initial segment table
  */
 
 /*
  *   SPRG Usage
  *
- *   Register          Definition
+ *   Register	Definition
  *
- *   SPRG0             reserved for hypervisor
- *   SPRG1             temp - used to save gpr
- *   SPRG2             temp - used to save gpr
- *   SPRG3             virt addr of paca
+ *   SPRG0	reserved for hypervisor
+ *   SPRG1	temp - used to save gpr
+ *   SPRG2	temp - used to save gpr
+ *   SPRG3	virt addr of paca
  */
 
 /*
@@ -115,7 +107,7 @@
 	 * to the pidhash table (also used by the debugger)
 	 */
 	.llong msChunks-KERNELBASE
-	.llong 0 /* pidhash-KERNELBASE SFRXXX */
+	.llong 0	/* pidhash-KERNELBASE SFRXXX */
 
 	/* Offset 0x38 - Pointer to start of embedded System.map */
 	.globl	embedded_sysmap_start
@@ -130,13 +122,13 @@
 	/* Secondary processors spin on this value until it goes to 1. */
 	.globl  __secondary_hold_spinloop
 __secondary_hold_spinloop:
-	.llong  0x0
+	.llong	0x0
 
 	/* Secondary processors write this value with their cpu # */
-	/* after they enter the spin loop immediately below.       */
-	.globl  __secondary_hold_acknowledge
+	/* after they enter the spin loop immediately below.	  */
+	.globl	__secondary_hold_acknowledge
 __secondary_hold_acknowledge:
-	.llong  0x0
+	.llong	0x0
 
 	. = 0x60
 /*
@@ -152,36 +144,43 @@
 	mtmsrd	r24			/* RI on */
 
 	/* Grab our linux cpu number */
-	mr      r24,r3
+	mr	r24,r3
 
 	/* Tell the master cpu we're here */
 	/* Relocation is off & we are located at an address less */
 	/* than 0x100, so only need to grab low order offset.    */
-	std     r24,__secondary_hold_acknowledge@l(0)
+	std	r24,__secondary_hold_acknowledge@l(0)
 	sync
 
 	/* All secondary cpu's wait here until told to start. */
-100:    ld      r4,__secondary_hold_spinloop@l(0)
-	cmpdi   0,r4,1
-	bne     100b
+100:	ld	r4,__secondary_hold_spinloop@l(0)
+	cmpdi	0,r4,1
+	bne	100b
 
 #ifdef CONFIG_HMT
 	b	.hmt_init
 #else
 #ifdef CONFIG_SMP
-	mr      r3,r24
-	b       .pseries_secondary_smp_init
+	mr	r3,r24
+	b	.pseries_secondary_smp_init
 #else
 	BUG_OPCODE
 #endif
 #endif
 #endif
 
+/* This value is used to mark exception frames on the stack. */
+	.section ".toc","aw"
+exception_marker:
+	.tc	ID_72656773_68657265[TC],0x7265677368657265
+	.text
+
 /*
  * The following macros define the code that appears as
  * the prologue to each of the exception handlers.  They
  * are split into two parts to allow a single kernel binary
- * to be used for pSeries, and iSeries.
+ * to be used for pSeries and iSeries.
+ * LOL.  One day... - paulus
  */
 
 /*
@@ -194,81 +193,55 @@
  * This is the start of the interrupt handlers for pSeries
  * This code runs with relocation off.
  */
-#define EX_SRR0		0
-#define EX_SRR1		8
-#define EX_R20		16
-#define EX_R21		24
-#define EX_R22		32
-#define EX_R23		40
+#define EX_R9		0
+#define EX_R10		8
+#define EX_R11		16
+#define EX_R12		24
+#define EX_R13		32
+#define EX_SRR0		40
 #define EX_DAR		48
 #define EX_DSISR	56
-#define EX_CCR   	60
-#define EX_TRAP   	60
+#define EX_CCR		60
 
-#define EXCEPTION_PROLOG_PSERIES(n,label)                                \
-	mtspr   SPRG2,r20;              /* use SPRG2 as scratch reg   */ \
-	mtspr   SPRG1,r21;              /* save r21                   */ \
-	mfspr   r20,SPRG3;              /* get paca virt addr         */ \
-	ld      r21,PACAEXCSP(r20);     /* get exception stack ptr    */ \
-	addi    r21,r21,EXC_FRAME_SIZE; /* make exception frame       */ \
-	std	r22,EX_R22(r21);	/* Save r22 in exc. frame     */ \
-	li	r22,n;                  /* Save the ex # in exc. frame*/ \
-	stw	r22,EX_TRAP(r21);	/*                            */ \
-	std	r23,EX_R23(r21);	/* Save r23 in exc. frame     */ \
-	mfspr   r22,SRR0;               /* EA of interrupted instr    */ \
-	std	r22,EX_SRR0(r21);	/* Save SRR0 in exc. frame    */ \
-	mfspr   r23,SRR1;               /* machine state at interrupt */ \
-	std	r23,EX_SRR1(r21);	/* Save SRR1 in exc. frame    */ \
-                                                                         \
-	mfspr   r23,DAR;                /* Save DAR in exc. frame      */ \
-	std	r23,EX_DAR(r21);	                                  \
-	mfspr	r23,DSISR;		/* Save DSISR in exc. frame    */ \
-	stw	r23,EX_DSISR(r21);	                                  \
-	mfspr	r23,SPRG2;		/* Save r20 in exc. frame      */ \
-	std	r23,EX_R20(r21);	                                  \
-                                                                         \
-	clrrdi  r22,r20,60;             /* Get 0xc part of the vaddr  */ \
-	ori	r22,r22,(label)@l;      /* add in the vaddr offset    */ \
-		                        /*   assumes *_common < 16b   */ \
-	mfmsr   r23;                                                     \
-	rotldi  r23,r23,4;                                               \
-	ori     r23,r23,0x32B;          /* Set IR, DR, RI, SF, ISF, HV*/ \
-	rotldi  r23,r23,60;             /* for generic handlers       */ \
-	mtspr   SRR0,r22;                                                \
-	mtspr   SRR1,r23;                                                \
-	mfcr    r23;                    /* save CR in r23             */ \
+#define EXCEPTION_PROLOG_PSERIES(area, label)				\
+	mfspr	r13,SPRG3;		/* get paca address into r13 */	\
+	std	r9,area+EX_R9(r13);	/* save r9 - r12 */		\
+	std	r10,area+EX_R10(r13);					\
+	std	r11,area+EX_R11(r13);					\
+	std	r12,area+EX_R12(r13);					\
+	mfspr	r9,SPRG1;						\
+	std	r9,area+EX_R13(r13);					\
+	mfcr	r9;							\
+	clrrdi	r12,r13,32;		/* get high part of &label */	\
+	mfmsr	r10;							\
+	mfspr	r11,SRR0;		/* save SRR0 */			\
+	ori	r12,r12,(label)@l;	/* virt addr of handler */	\
+	ori	r10,r10,MSR_IR|MSR_DR|MSR_RI;				\
+	mtspr	SRR0,r12;						\
+	mfspr	r12,SRR1;		/* and SRR1 */			\
+	mtspr	SRR1,r10;						\
 	rfid
 
 /*
  * This is the start of the interrupt handlers for iSeries
  * This code runs with relocation on.
  */
-#define EXCEPTION_PROLOG_ISERIES(n)	                                      \
-	mtspr	SPRG2,r20;		    /* use SPRG2 as scratch reg    */ \
-	mtspr   SPRG1,r21;                  /* save r21                    */ \
-	mfspr	r20,SPRG3;		    /* get paca                    */ \
-	ld      r21,PACAEXCSP(r20);         /* get exception stack ptr     */ \
-	addi    r21,r21,EXC_FRAME_SIZE;     /* make exception frame        */ \
-	std	r22,EX_R22(r21);	    /* save r22 on exception frame */ \
-	li	r22,n;                      /* Save the ex # in exc. frame */ \
-	stw	r22,EX_TRAP(r21);	    /*                             */ \
-	std	r23,EX_R23(r21);	    /* Save r23 in exc. frame      */ \
-	ld      r22,LPPACA+LPPACASRR0(r20); /* Get SRR0 from ItLpPaca      */ \
-	std	r22,EX_SRR0(r21);	    /* save SRR0 in exc. frame     */ \
-	ld      r23,LPPACA+LPPACASRR1(r20); /* Get SRR1 from ItLpPaca      */ \
-	std	r23,EX_SRR1(r21);	    /* save SRR1 in exc. frame     */ \
-                                                                         \
-	mfspr   r23,DAR;                /* Save DAR in exc. frame      */ \
-	std	r23,EX_DAR(r21);	                                  \
-	mfspr	r23,DSISR;		/* Save DSISR in exc. frame    */ \
-	stw	r23,EX_DSISR(r21);	                                  \
-	mfspr	r23,SPRG2;		/* Save r20 in exc. frame      */ \
-	std	r23,EX_R20(r21);	                                  \
-                                                                         \
-	mfmsr	r22;			    /* set MSR.RI		   */ \
-	ori	r22,r22,MSR_RI;						      \
-	mtmsrd	r22,1;							      \
-	mfcr    r23;                        /* save CR in r23              */
+#define EXCEPTION_PROLOG_ISERIES_1(area)				\
+	mfspr	r13,SPRG3;		/* get paca address into r13 */	\
+	std	r9,area+EX_R9(r13);	/* save r9 - r12 */		\
+	std	r10,area+EX_R10(r13);					\
+	std	r11,area+EX_R11(r13);					\
+	std	r12,area+EX_R12(r13);					\
+	mfspr	r9,SPRG1;						\
+	std	r9,area+EX_R13(r13);					\
+	mfcr	r9
+
+#define EXCEPTION_PROLOG_ISERIES_2					\
+	mfmsr	r10;							\
+	ld	r11,LPPACA+LPPACASRR0(r13);				\
+	ld	r12,LPPACA+LPPACASRR1(r13);				\
+	ori	r10,r10,MSR_RI;						\
+	mtmsrd	r10,1
 
 /*
  * The common exception prolog is used for all except a few exceptions
@@ -276,106 +249,153 @@
  * to take another exception from the point where we first touch the
  * kernel stack onwards.
  *
- * On entry r20 points to the paca and r21 points to the exception
- * frame on entry, r23 contains the saved CR, and relocation is on.
- */
-#define EXCEPTION_PROLOG_COMMON                                           \
-	mfspr	r22,SPRG1;		/* Save r21 in exc. frame      */ \
-	std	r22,EX_R21(r21);	                                  \
-	std     r21,PACAEXCSP(r20);     /* update exception stack ptr  */ \
-	ld	r22,EX_SRR1(r21);	/* Get SRR1 from exc. frame    */ \
-	andi.   r22,r22,MSR_PR;         /* Set CR for later branch     */ \
-	mr      r22,r1;                 /* Save r1                     */ \
-	subi    r1,r1,INT_FRAME_SIZE;   /* alloc frame on kernel stack */ \
-	beq-    1f;                                                       \
-	ld      r1,PACAKSAVE(r20);      /* kernel stack to use         */ \
-1:      cmpdi	cr1,r1,0;		/* check if r1 is in userspace */ \
-	bge	cr1,bad_stack;		/* abort if it is	       */ \
-	std     r22,GPR1(r1);           /* save r1 in stackframe       */ \
-	std     r22,0(r1);              /* make stack chain pointer    */ \
-	std     r23,_CCR(r1);           /* save CR in stackframe       */ \
-	ld	r22,EX_R20(r21);	/* move r20 to stackframe      */ \
-	std	r22,GPR20(r1);		                                  \
-	ld	r23,EX_R21(r21);	/* move r21 to stackframe      */ \
-	std	r23,GPR21(r1);		                                  \
-	ld	r22,EX_R22(r21);	/* move r22 to stackframe      */ \
-	std	r22,GPR22(r1);		                                  \
-	ld	r23,EX_R23(r21);	/* move r23 to stackframe      */ \
-	std	r23,GPR23(r1);		                                  \
-	mflr    r22;                    /* save LR in stackframe       */ \
-	std     r22,_LINK(r1);                                            \
-	mfctr   r23;                    /* save CTR in stackframe      */ \
-	std     r23,_CTR(r1);                                             \
-	mfspr   r22,XER;                /* save XER in stackframe      */ \
-	std     r22,_XER(r1);                                             \
-	ld	r23,EX_DAR(r21);	/* move DAR to stackframe      */ \
-	std	r23,_DAR(r1);		                                  \
-	lwz     r22,EX_DSISR(r21);	/* move DSISR to stackframe    */ \
-	std	r22,_DSISR(r1);		                                  \
-	lbz	r22,PACAPROCENABLED(r20);                                 \
-	std	r22,SOFTE(r1);		                                  \
-	ld	r22,EX_SRR0(r21);	/* get SRR0 from exc. frame    */ \
-	ld	r23,EX_SRR1(r21);	/* get SRR1 from exc. frame    */ \
-	addi    r21,r21,-EXC_FRAME_SIZE;/* pop off exception frame     */ \
-	std     r21,PACAEXCSP(r20);                                       \
-	SAVE_GPR(0, r1);                /* save r0 in stackframe       */ \
-	SAVE_8GPRS(2, r1);              /* save r2 - r13 in stackframe */ \
-	SAVE_4GPRS(10, r1);                                               \
-	ld      r2,PACATOC(r20);	                                  \
-	mr	r13,r20
-
-/*
- * Note: code which follows this uses cr0.eq (set if from kernel),
- * r1, r22 (SRR0), and r23 (SRR1).
- */
+ * On entry r13 points to the paca, r9-r13 are saved in the paca,
+ * r9 contains the saved CR, r11 and r12 contain the saved SRR0 and
+ * SRR1, and relocation is on.
+ */
+#define EXCEPTION_PROLOG_COMMON(n, area)				   \
+	andi.	r10,r12,MSR_PR;		/* See if coming from user	*/ \
+	mr	r10,r1;			/* Save r1			*/ \
+	subi	r1,r1,INT_FRAME_SIZE;	/* alloc frame on kernel stack	*/ \
+	beq-	1f;							   \
+	ld	r1,PACAKSAVE(r13);	/* kernel stack to use		*/ \
+1:	cmpdi	cr1,r1,0;		/* check if r1 is in userspace	*/ \
+	bge-	cr1,bad_stack;		/* abort if it is		*/ \
+	std	r9,_CCR(r1);		/* save CR in stackframe	*/ \
+	std	r11,_NIP(r1);		/* save SRR0 in stackframe	*/ \
+	std	r12,_MSR(r1);		/* save SRR1 in stackframe	*/ \
+	std	r10,0(r1);		/* make stack chain pointer	*/ \
+	std	r0,GPR0(r1);		/* save r0 in stackframe	*/ \
+	std	r10,GPR1(r1);		/* save r1 in stackframe	*/ \
+	std	r2,GPR2(r1);		/* save r2 in stackframe	*/ \
+	SAVE_4GPRS(3, r1);		/* save r3 - r6 in stackframe	*/ \
+	SAVE_2GPRS(7, r1);		/* save r7, r8 in stackframe	*/ \
+	ld	r9,area+EX_R9(r13);	/* move r9, r10 to stackframe	*/ \
+	ld	r10,area+EX_R10(r13);					   \
+	std	r9,GPR9(r1);						   \
+	std	r10,GPR10(r1);						   \
+	ld	r9,area+EX_R11(r13);	/* move r11 - r13 to stackframe	*/ \
+	ld	r10,area+EX_R12(r13);					   \
+	ld	r11,area+EX_R13(r13);					   \
+	std	r9,GPR11(r1);						   \
+	std	r10,GPR12(r1);						   \
+	std	r11,GPR13(r1);						   \
+	ld	r2,PACATOC(r13);	/* get kernel TOC into r2	*/ \
+	mflr	r9;			/* save LR in stackframe	*/ \
+	std	r9,_LINK(r1);						   \
+	mfctr	r10;			/* save CTR in stackframe	*/ \
+	std	r10,_CTR(r1);						   \
+	mfspr	r11,XER;		/* save XER in stackframe	*/ \
+	std	r11,_XER(r1);						   \
+	li	r9,(n)+1;						   \
+	std	r9,_TRAP(r1);		/* set trap number		*/ \
+	li	r10,0;							   \
+	ld	r11,exception_marker@toc(r2);				   \
+	std	r10,RESULT(r1);		/* clear regs->result		*/ \
+	std	r11,STACK_FRAME_OVERHEAD-16(r1); /* mark the frame	*/
 
 /*
  * Exception vectors.
  */
-#define STD_EXCEPTION_PSERIES(n, label )	\
-	. = n;					\
-	.globl label##_Pseries;			\
-label##_Pseries:				\
-	EXCEPTION_PROLOG_PSERIES( n, label##_common )
-
-#define STD_EXCEPTION_ISERIES( n, label )	\
-	.globl label##_Iseries;			\
-label##_Iseries:				\
-	EXCEPTION_PROLOG_ISERIES( n );          \
+#define STD_EXCEPTION_PSERIES(n, label)			\
+	. = n;						\
+	.globl label##_Pseries;				\
+label##_Pseries:					\
+	mtspr	SPRG1,r13;		/* save r13 */	\
+	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common)
+
+#define STD_EXCEPTION_ISERIES(n, label, area)		\
+	.globl label##_Iseries;				\
+label##_Iseries:					\
+	mtspr	SPRG1,r13;		/* save r13 */	\
+	EXCEPTION_PROLOG_ISERIES_1(area);		\
+	EXCEPTION_PROLOG_ISERIES_2;			\
 	b	label##_common
 
-#define MASKABLE_EXCEPTION_ISERIES( n, label )	\
-	.globl label##_Iseries;			\
-label##_Iseries:				\
-	EXCEPTION_PROLOG_ISERIES( n );		\
-	lbz	r22,PACAPROFENABLED(r20);	\
-	cmpi	0,r22,0;			\
-	bne-	label##_Iseries_profile;	\
-label##_Iseries_prof_ret:			\
-	lbz	r22,PACAPROCENABLED(r20);	\
-	cmpi	0,r22,0;			\
-	beq-	label##_Iseries_masked;		\
-	b	label##_common;			\
-label##_Iseries_profile:			\
-	std	r24,48(r21);			\
-	std	r25,56(r21);			\
-	mflr	r24;				\
-	bl	do_profile;			\
-	mtlr	r24;				\
-	ld	r24,48(r21);			\
-	ld	r25,56(r21);			\
+#define MASKABLE_EXCEPTION_ISERIES(n, label)				\
+	.globl label##_Iseries;						\
+label##_Iseries:							\
+	mtspr	SPRG1,r13;		/* save r13 */			\
+	EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN);				\
+	lbz	r10,PACAPROFENABLED(r13);				\
+	cmpwi	r10,0;							\
+	bne-	label##_Iseries_profile;				\
+label##_Iseries_prof_ret:						\
+	lbz	r10,PACAPROCENABLED(r13);				\
+	cmpwi	0,r10,0;						\
+	beq-	label##_Iseries_masked;					\
+	EXCEPTION_PROLOG_ISERIES_2;					\
+	b	label##_common;						\
+label##_Iseries_profile:						\
+	ld	r12,LPPACA+LPPACASRR1(r13);				\
+	andi.	r12,r12,MSR_PR;		/* Test if in kernel */		\
+	bne	label##_Iseries_prof_ret;				\
+	ld	r11,LPPACA+LPPACASRR0(r13);				\
+	ld	r12,PACAPROFSTEXT(r13);	/* _stext */			\
+	subf	r11,r12,r11;		/* offset into kernel */	\
+	lwz	r12,PACAPROFSHIFT(r13);					\
+	srd	r11,r11,r12;						\
+	lwz	r12,PACAPROFLEN(r13);	/* profile table length - 1 */	\
+	cmpd	r11,r12;		/* off end? */			\
+	ble	1f;							\
+	mr	r11,r12;		/* force into last entry */	\
+1:	sldi	r11,r11,2;		/* convert to offset */		\
+	ld	r12,PACAPROFBUFFER(r13);/* profile buffer */		\
+	add	r12,r12,r11;						\
+2:	lwarx	r11,0,r12;		/* atomically increment */	\
+	addi	r11,r11,1;						\
+	stwcx.	r11,0,r12;						\
+	bne-	2b;							\
 	b	label##_Iseries_prof_ret
 
-#define STD_EXCEPTION_COMMON( trap, label, hdlr )	\
-	.globl label##_common;			\
-label##_common:					\
-	EXCEPTION_PROLOG_COMMON;		\
-	addi	r3,r1,STACK_FRAME_OVERHEAD;	\
-	li	r20,0;				\
-	li	r6,trap;			\
-	bl      .save_remaining_regs;           \
-	bl      hdlr;                           \
-	b       .ret_from_except
+#ifdef DO_SOFT_DISABLE
+#define DISABLE_INTS				\
+	lbz	r10,PACAPROCENABLED(r13);	\
+	li	r11,0;				\
+	std	r10,SOFTE(r1);			\
+	mfmsr	r10;				\
+	stb	r11,PACAPROCENABLED(r13);	\
+	ori	r10,r10,MSR_EE;			\
+	mtmsrd	r10,1
+
+#define ENABLE_INTS				\
+	lbz	r10,PACAPROCENABLED(r13);	\
+	mfmsr	r11;				\
+	std	r10,SOFTE(r1);			\
+	ori	r11,r11,MSR_EE;			\
+	mtmsrd	r11,1
+
+#else	/* hard enable/disable interrupts */
+#define DISABLE_INTS
+
+#define ENABLE_INTS				\
+	ld	r12,_MSR(r1);			\
+	mfmsr	r11;				\
+	rlwimi	r11,r12,0,MSR_EE;		\
+	mtmsrd	r11,1
+
+#endif
+
+#define STD_EXCEPTION_COMMON(trap, label, hdlr)		\
+	.align	7;					\
+	.globl label##_common;				\
+label##_common:						\
+	EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN);	\
+	DISABLE_INTS;					\
+	bl	.save_nvgprs;				\
+	addi	r3,r1,STACK_FRAME_OVERHEAD;		\
+	bl	hdlr;					\
+	b	.ret_from_except
+
+#define STD_EXCEPTION_COMMON_LITE(trap, label, hdlr)	\
+	.align	7;					\
+	.globl label##_common;				\
+label##_common:						\
+	EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN);	\
+	DISABLE_INTS;					\
+	addi	r3,r1,STACK_FRAME_OVERHEAD;		\
+	bl	hdlr;					\
+	b	.ret_from_except_lite
 
 /*
  * Start of pSeries system interrupt routines
@@ -384,22 +404,74 @@
 	.globl __start_interrupts
 __start_interrupts:
 
-	STD_EXCEPTION_PSERIES( 0x100, SystemReset )
-	STD_EXCEPTION_PSERIES( 0x200, MachineCheck )
-	STD_EXCEPTION_PSERIES( 0x300, DataAccess )
-	STD_EXCEPTION_PSERIES( 0x380, DataAccessSLB )
-	STD_EXCEPTION_PSERIES( 0x400, InstructionAccess )
-	STD_EXCEPTION_PSERIES( 0x480, InstructionAccessSLB )
-	STD_EXCEPTION_PSERIES( 0x500, HardwareInterrupt )
-	STD_EXCEPTION_PSERIES( 0x600, Alignment )
-	STD_EXCEPTION_PSERIES( 0x700, ProgramCheck )
-	STD_EXCEPTION_PSERIES( 0x800, FPUnavailable )
-	STD_EXCEPTION_PSERIES( 0x900, Decrementer )
-	STD_EXCEPTION_PSERIES( 0xa00, Trap_0a )
-	STD_EXCEPTION_PSERIES( 0xb00, Trap_0b )
-	STD_EXCEPTION_PSERIES( 0xc00, SystemCall )
-	STD_EXCEPTION_PSERIES( 0xd00, SingleStep )
-	STD_EXCEPTION_PSERIES( 0xe00, Trap_0e )
+	STD_EXCEPTION_PSERIES(0x100, SystemReset)
+
+	. = 0x200
+	.globl MachineCheck_Pseries
+_MachineCheckPseries:
+	mtspr	SPRG1,r13		/* save r13 */
+	EXCEPTION_PROLOG_PSERIES(PACA_EXMC, MachineCheck_common)
+
+	. = 0x300
+	.globl DataAccess_Pseries
+DataAccess_Pseries:
+	mtspr	SPRG1,r13
+BEGIN_FTR_SECTION
+	mtspr	SPRG2,r12
+	mfspr	r13,DAR
+	mfspr	r12,DSISR
+	srdi	r13,r13,60
+	rlwimi	r13,r12,16,0x20
+	mfcr	r12
+	cmpwi	r13,0x2c
+	beq	.do_stab_bolted_Pseries
+	mtcrf	0x80,r12
+	mfspr	r12,SPRG2
+END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
+	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, DataAccess_common)
+
+	. = 0x380
+	.globl DataAccessSLB_Pseries
+DataAccessSLB_Pseries:
+	mtspr	SPRG1,r13
+	mtspr	SPRG2,r12
+	mfspr	r13,DAR
+	mfcr	r12
+	srdi	r13,r13,60
+	cmpdi	r13,0xc
+	beq	.do_slb_bolted_Pseries
+	mtcrf	0x80,r12
+	mfspr	r12,SPRG2
+	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, DataAccessSLB_common)
+
+	STD_EXCEPTION_PSERIES(0x400, InstructionAccess)
+	STD_EXCEPTION_PSERIES(0x480, InstructionAccessSLB)
+	STD_EXCEPTION_PSERIES(0x500, HardwareInterrupt)
+	STD_EXCEPTION_PSERIES(0x600, Alignment)
+	STD_EXCEPTION_PSERIES(0x700, ProgramCheck)
+	STD_EXCEPTION_PSERIES(0x800, FPUnavailable)
+	STD_EXCEPTION_PSERIES(0x900, Decrementer)
+	STD_EXCEPTION_PSERIES(0xa00, Trap_0a)
+	STD_EXCEPTION_PSERIES(0xb00, Trap_0b)
+
+	. = 0xc00
+	.globl	SystemCall_Pseries
+SystemCall_Pseries:
+	mr	r9,r13
+	mfmsr	r10
+	mfspr	r13,SPRG3
+	mfspr	r11,SRR0
+	clrrdi	r12,r13,32
+	oris	r12,r12,SystemCall_common@h
+	ori	r12,r12,SystemCall_common@l
+	mtspr	SRR0,r12
+	ori	r10,r10,MSR_IR|MSR_DR|MSR_RI
+	mfspr	r12,SRR1
+	mtspr	SRR1,r10
+	rfid
+
+	STD_EXCEPTION_PSERIES(0xd00, SingleStep)
+	STD_EXCEPTION_PSERIES(0xe00, Trap_0e)
 
 	/* We need to deal with the Altivec unavailable exception
 	 * here which is at 0xf20, thus in the middle of the
@@ -407,27 +479,28 @@
 	 * trickery is thus necessary
 	 */
 	. = 0xf00
-	b	.PerformanceMonitor_Pseries
-	. = 0xf20
-	b	.AltivecUnavailable_Pseries
+	b	PerformanceMonitor_Pseries
 
-	STD_EXCEPTION_PSERIES( 0x1300, InstructionBreakpoint )
-	STD_EXCEPTION_PSERIES( 0x1700, AltivecAssist )
+	STD_EXCEPTION_PSERIES(0xf20, AltivecUnavailable)
+
+	STD_EXCEPTION_PSERIES(0x1300, InstructionBreakpoint)
+	STD_EXCEPTION_PSERIES(0x1700, AltivecAssist)
+
+	/* moved from 0xf00 */
+	STD_EXCEPTION_PSERIES(0x3000, PerformanceMonitor)
 
-	/* Here are the "moved" performance monitor and
-	 * altivec unavailable exceptions
-	 */
-	. = 0x3000
-	.globl PerformanceMonitor_Pseries;
-.PerformanceMonitor_Pseries:
-	EXCEPTION_PROLOG_PSERIES(0xf00, PerformanceMonitor_common)
-	
 	. = 0x3100
-	.globl AltivecUnavailable_Pseries;
-.AltivecUnavailable_Pseries:
-	EXCEPTION_PROLOG_PSERIES(0xf20, AltivecUnavailable_common)
+_GLOBAL(do_stab_bolted_Pseries)
+	mtcrf	0x80,r12
+	mfspr	r12,SPRG2
+	EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted)
+
+_GLOBAL(do_slb_bolted_Pseries)
+	mtcrf	0x80,r12
+	mfspr	r12,SPRG2
+	EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_slb_bolted)
+
 	
-		
 	/* Space for the naca.  Architected to be located at real address
 	 * NACA_PHYS_ADDR.  Various tools rely on this location being fixed.
 	 * The first dword of the naca is required by iSeries LPAR to
@@ -466,16 +539,16 @@
 	 * VSID generation algorithm.  See include/asm/mmu_context.h.
 	 */
 
-	.llong	1		/* # ESIDs to be mapped by hypervisor         */
+	.llong	1		/* # ESIDs to be mapped by hypervisor	 */
 	.llong	1		/* # memory ranges to be mapped by hypervisor */
-	.llong	STAB0_PAGE	/* Page # of segment table within load area   */
+	.llong	STAB0_PAGE	/* Page # of segment table within load area	*/
+	.llong	0		/* Reserved */
+	.llong	0		/* Reserved */
 	.llong	0		/* Reserved */
-	.llong  0		/* Reserved */
-	.llong  0		/* Reserved */
 	.llong	0		/* Reserved */
 	.llong	0		/* Reserved */
 	.llong	0x0c00000000	/* ESID to map (Kernel at EA = 0xC000000000000000) */
-	.llong	0x06a99b4b14    /* VSID to map (Kernel at VA = 0x6a99b4b140000000) */
+	.llong	0x06a99b4b14	/* VSID to map (Kernel at VA = 0x6a99b4b140000000) */
 	.llong	8192		/* # pages to map (32 MB) */
 	.llong	0		/* Offset from start of loadarea to start of map */
 	.llong	0x0006a99b4b140000	/* VPN of first page to map */
@@ -484,22 +557,76 @@
 
 /***  ISeries-LPAR interrupt handlers ***/
 
-	STD_EXCEPTION_ISERIES( 0x200, MachineCheck )
-	STD_EXCEPTION_ISERIES( 0x300, DataAccess )
-	STD_EXCEPTION_ISERIES( 0x380, DataAccessSLB )
-	STD_EXCEPTION_ISERIES( 0x400, InstructionAccess )
-	STD_EXCEPTION_ISERIES( 0x480, InstructionAccessSLB )
-	MASKABLE_EXCEPTION_ISERIES( 0x500, HardwareInterrupt )
-	STD_EXCEPTION_ISERIES( 0x600, Alignment )
-	STD_EXCEPTION_ISERIES( 0x700, ProgramCheck )
-	STD_EXCEPTION_ISERIES( 0x800, FPUnavailable )
-	MASKABLE_EXCEPTION_ISERIES( 0x900, Decrementer )
-	STD_EXCEPTION_ISERIES( 0xa00, Trap_0a )
-	STD_EXCEPTION_ISERIES( 0xb00, Trap_0b )
-	STD_EXCEPTION_ISERIES( 0xc00, SystemCall )
-	STD_EXCEPTION_ISERIES( 0xd00, SingleStep )
-	STD_EXCEPTION_ISERIES( 0xe00, Trap_0e )
-	STD_EXCEPTION_ISERIES( 0xf00, PerformanceMonitor )
+	STD_EXCEPTION_ISERIES(0x200, MachineCheck, PACA_EXMC)
+
+	.globl DataAccess_Iseries
+DataAccess_Iseries:
+	mtspr	SPRG1,r13
+BEGIN_FTR_SECTION
+	mtspr	SPRG2,r12
+	mfspr	r13,DAR
+	mfspr	r12,DSISR
+	srdi	r13,r13,60
+	rlwimi	r13,r12,16,0x20
+	mfcr	r12
+	cmpwi	r13,0x2c
+	beq	.do_stab_bolted_Iseries
+	mtcrf	0x80,r12
+	mfspr	r12,SPRG2
+END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
+	EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN)
+	EXCEPTION_PROLOG_ISERIES_2
+	b	DataAccess_common
+
+.do_stab_bolted_Iseries:
+	mtcrf	0x80,r12
+	mfspr	r12,SPRG2
+	EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB)
+	EXCEPTION_PROLOG_ISERIES_2
+	b	.do_stab_bolted
+
+	.globl	DataAccessSLB_Iseries
+DataAccessSLB_Iseries:
+	mtspr	SPRG1,r13		/* save r13 */
+	mtspr	SPRG2,r12
+	mfspr	r13,DAR
+	mfcr	r12
+	srdi	r13,r13,60
+	cmpdi	r13,0xc
+	beq	.do_slb_bolted_Iseries
+	mtcrf	0x80,r12
+	mfspr	r12,SPRG2
+	EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN)
+	EXCEPTION_PROLOG_ISERIES_2
+	b	DataAccessSLB_common
+
+.do_slb_bolted_Iseries:
+	mtcrf	0x80,r12
+	mfspr	r12,SPRG2
+	EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB)
+	EXCEPTION_PROLOG_ISERIES_2
+	b	.do_slb_bolted
+
+	STD_EXCEPTION_ISERIES(0x400, InstructionAccess, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES(0x480, InstructionAccessSLB, PACA_EXGEN)
+	MASKABLE_EXCEPTION_ISERIES(0x500, HardwareInterrupt)
+	STD_EXCEPTION_ISERIES(0x600, Alignment, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES(0x700, ProgramCheck, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES(0x800, FPUnavailable, PACA_EXGEN)
+	MASKABLE_EXCEPTION_ISERIES(0x900, Decrementer)
+	STD_EXCEPTION_ISERIES(0xa00, Trap_0a, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES(0xb00, Trap_0b, PACA_EXGEN)
+
+	.globl	SystemCall_Iseries
+SystemCall_Iseries:
+	mr	r9,r13
+	mfspr	r13,SPRG3
+	EXCEPTION_PROLOG_ISERIES_2
+	b	SystemCall_common
+
+	STD_EXCEPTION_ISERIES( 0xd00, SingleStep, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES( 0xe00, Trap_0e, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES( 0xf00, PerformanceMonitor, PACA_EXGEN)
 
 	.globl SystemReset_Iseries
 SystemReset_Iseries:
@@ -508,7 +635,7 @@
 	ori	r24,r24,MSR_RI
 	mtmsrd	r24			/* RI on */
 	lhz	r24,PACAPACAINDEX(r13)	/* Get processor # */
-	cmpi	0,r24,0			/* Are we processor 0? */
+	cmpwi	0,r24,0			/* Are we processor 0? */
 	beq	.__start_initialization_iSeries	/* Start up the first processor */
 	mfspr	r4,CTRLF
 	li	r5,RUNLATCH		/* Turn off the run light */
@@ -527,7 +654,7 @@
 	addi	r1,r3,THREAD_SIZE
 	subi	r1,r1,STACK_FRAME_OVERHEAD
 
-	cmpi	0,r23,0
+	cmpwi	0,r23,0
 	beq	iseries_secondary_smp_loop	/* Loop until told to go */
 #ifdef SECONDARY_PROCESSORS
 	bne	.__secondary_start		/* Loop until told to go */
@@ -539,7 +666,7 @@
 	rldicr	r3,r3,32,15		/* r0 = (r3 << 32) & 0xffff000000000000 */
 #else /* CONFIG_SMP */
 	/* Yield the processor.  This is required for non-SMP kernels
-	   which are running on multi-threaded machines. */
+		which are running on multi-threaded machines. */
 	lis	r3,0x8000
 	rldicr	r3,r3,32,15		/* r3 = (r3 << 32) & 0xffff000000000000 */
 	addi	r3,r3,18		/* r3 = 0x8000000000000012 which is "yield" */
@@ -552,32 +679,33 @@
 	b	1b			/* If SMP not configured, secondaries
 					 * loop forever */
 
-	.globl HardwareInterrupt_Iseries_masked
-HardwareInterrupt_Iseries_masked:
-	b	maskable_exception_exit
-
 	.globl Decrementer_Iseries_masked
 Decrementer_Iseries_masked:
-	li	r22,1
-	stb	r22,PACALPPACA+LPPACADECRINT(r20)
-	lwz	r22,PACADEFAULTDECR(r20)
-	mtspr	DEC,r22
-maskable_exception_exit:
-	mtcrf	0xff,r23		/* Restore regs and free exception frame */
-	ld	r22,EX_SRR0(r21)
-	ld	r23,EX_SRR1(r21)
-	mtspr	SRR0,r22
-	mtspr	SRR1,r23
-	ld	r22,EX_R22(r21)
-	ld	r23,EX_R23(r21)
-	mfspr	r21,SPRG1
-	mfspr	r20,SPRG2
+	li	r11,1
+	stb	r11,PACALPPACA+LPPACADECRINT(r13)
+	lwz	r12,PACADEFAULTDECR(r13)
+	mtspr	DEC,r12
+	/* fall through */
+
+	.globl HardwareInterrupt_Iseries_masked
+HardwareInterrupt_Iseries_masked:
+	mtcrf	0x80,r9		/* Restore regs */
+	ld	r11,LPPACA+LPPACASRR0(r13)
+	ld	r12,LPPACA+LPPACASRR1(r13)
+	mtspr	SRR0,r11
+	mtspr	SRR1,r12
+	ld	r9,PACA_EXGEN+EX_R9(r13)
+	ld	r10,PACA_EXGEN+EX_R10(r13)
+	ld	r11,PACA_EXGEN+EX_R11(r13)
+	ld	r12,PACA_EXGEN+EX_R12(r13)
+	ld	r13,PACA_EXGEN+EX_R13(r13)
 	rfid
 #endif
+
 /*
  * Data area reserved for FWNMI option.
  */
-        .= 0x7000
+	.= 0x7000
 	.globl fwnmi_data_area
 fwnmi_data_area:
 
@@ -587,10 +715,12 @@
 	. = 0x8000
 	.globl SystemReset_FWNMI
 SystemReset_FWNMI:
-	EXCEPTION_PROLOG_PSERIES(0x100, SystemReset_common)
+	mtspr	SPRG1,r13		/* save r13 */
+	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, SystemReset_common)
 	.globl MachineCheck_FWNMI
 MachineCheck_FWNMI:
-	EXCEPTION_PROLOG_PSERIES(0x200, MachineCheck_common)
+	mtspr	SPRG1,r13		/* save r13 */
+	EXCEPTION_PROLOG_PSERIES(PACA_EXMC, MachineCheck_common)
 
 	/*
 	 * Space for the initial segment table
@@ -608,327 +738,266 @@
 
 /*** Common interrupt handlers ***/
 
-	STD_EXCEPTION_COMMON( 0x100, SystemReset, .SystemResetException )
-	STD_EXCEPTION_COMMON( 0x200, MachineCheck, .MachineCheckException )
-	STD_EXCEPTION_COMMON( 0x900, Decrementer, .timer_interrupt )
-	STD_EXCEPTION_COMMON( 0xa00, Trap_0a, .UnknownException )
-	STD_EXCEPTION_COMMON( 0xb00, Trap_0b, .UnknownException )
-	STD_EXCEPTION_COMMON( 0xd00, SingleStep, .SingleStepException )
-	STD_EXCEPTION_COMMON( 0xe00, Trap_0e, .UnknownException )
-	STD_EXCEPTION_COMMON( 0xf00, PerformanceMonitor, .PerformanceMonitorException )
-	STD_EXCEPTION_COMMON(0x1300, InstructionBreakpoint, .InstructionBreakpointException )
+	STD_EXCEPTION_COMMON(0x100, SystemReset, .SystemResetException)
+
+	/*
+	 * Machine check is different because we use a different
+	 * save area: PACA_EXMC instead of PACA_EXGEN.
+	 */
+	.align	7
+	.globl MachineCheck_common
+MachineCheck_common:
+	EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC)
+	DISABLE_INTS
+	bl	.save_nvgprs
+	addi	r3,r1,STACK_FRAME_OVERHEAD
+	bl	.MachineCheckException
+	b	.ret_from_except
+
+	STD_EXCEPTION_COMMON_LITE(0x900, Decrementer, .timer_interrupt)
+	STD_EXCEPTION_COMMON(0xa00, Trap_0a, .UnknownException)
+	STD_EXCEPTION_COMMON(0xb00, Trap_0b, .UnknownException)
+	STD_EXCEPTION_COMMON(0xd00, SingleStep, .SingleStepException)
+	STD_EXCEPTION_COMMON(0xe00, Trap_0e, .UnknownException)
+	STD_EXCEPTION_COMMON(0xf00, PerformanceMonitor, .PerformanceMonitorException)
+	STD_EXCEPTION_COMMON(0x1300, InstructionBreakpoint, .InstructionBreakpointException)
 #ifdef CONFIG_ALTIVEC
-	STD_EXCEPTION_COMMON(0x1700, AltivecAssist, .AltivecAssistException )
+	STD_EXCEPTION_COMMON(0x1700, AltivecAssist, .AltivecAssistException)
 #else
-	STD_EXCEPTION_COMMON(0x1700, AltivecAssist, .UnknownException )
+	STD_EXCEPTION_COMMON(0x1700, AltivecAssist, .UnknownException)
 #endif
 
 /*
- * Here the exception frame is filled out and we have detected that
- * the kernel stack pointer is bad.  R23 contains the saved CR, r20
- * points to the paca, r21 points to the exception frame, and r22
- * contains the (bad) kernel stack pointer.
+ * Here we have detected that the kernel stack pointer is bad.
+ * R9 contains the saved CR, r13 points to the paca,
+ * r10 contains the (bad) kernel stack pointer,
+ * r11 and r12 contain the saved SRR0 and SRR1.
  * We switch to using the paca guard page as an emergency stack,
- * save the registers on there, and call kernel_bad_stack(),
- * which panics.
+ * save the registers there, and call kernel_bad_stack(), which panics.
  */
 bad_stack:
-	addi	r1,r20,8192-64-INT_FRAME_SIZE
-	std	r22,GPR1(r1)
-	std	r23,_CCR(r1)
-	ld	r22,EX_R20(r21)
-	std	r22,GPR20(r1)
-	ld	r23,EX_R21(r21)
-	std	r23,GPR21(r1)
-	ld	r22,EX_R22(r21)
-	std	r22,GPR22(r1)
-	ld	r23,EX_R23(r21)
-	std	r23,GPR23(r1)
-	ld	r23,EX_DAR(r21)
-	std	r23,_DAR(r1)
-	lwz     r22,EX_DSISR(r21)
-	std	r22,_DSISR(r1)
-	lwz	r23,EX_TRAP(r21)
-	std	r23,TRAP(r1)
-	ld	r22,EX_SRR0(r21)
-	ld	r23,EX_SRR1(r21)
-	std	r22,_NIP(r1)
-	std	r23,_MSR(r1)
-	addi	r21,r21,-EXC_FRAME_SIZE
-	std	r21,PACAEXCSP(r20)
-	mflr	r22
-	std	r22,_LINK(r1)
-	mfctr	r23
-	std	r23,_CTR(r1)
-	mfspr	r22,XER
-	std	r22,_XER(r1)
-	SAVE_GPR(0, r1)
-	SAVE_10GPRS(2, r1)
-	SAVE_8GPRS(12, r1)
-	SAVE_8GPRS(24, r1)
-	addi	r21,r1,INT_FRAME_SIZE
-	std	r21,0(r1)
-	li	r22,0
-	std	r22,0(r21)
-	ld	r2,PACATOC(r20)
-	mr	r13,r20
+	addi	r1,r13,8192-64-INT_FRAME_SIZE
+	std	r9,_CCR(r1)
+	std	r10,GPR1(r1)
+	std	r11,_NIP(r1)
+	std	r12,_MSR(r1)
+	mfspr	r11,DAR
+	mfspr	r12,DSISR
+	std	r11,_DAR(r1)
+	std	r12,_DSISR(r1)
+	mflr	r10
+	mfctr	r11
+	mfxer	r12
+	std	r10,_LINK(r1)
+	std	r11,_CTR(r1)
+	std	r12,_XER(r1)
+	SAVE_GPR(0,r1)
+	SAVE_GPR(2,r1)
+	SAVE_4GPRS(3,r1)
+	SAVE_2GPRS(7,r1)
+	SAVE_10GPRS(12,r1)
+	SAVE_10GPRS(22,r1)
+	addi	r11,r1,INT_FRAME_SIZE
+	std	r11,0(r1)
+	li	r12,0
+	std	r12,0(r11)
+	ld	r2,PACATOC(r13)
 1:	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	.kernel_bad_stack
 	b	1b
 
 /*
- * Return from an exception which is handled without calling
- * save_remaining_regs.  The caller is assumed to have done
- * EXCEPTION_PROLOG_COMMON.
+ * Return from an exception with minimal checks.
+ * The caller is assumed to have done EXCEPTION_PROLOG_COMMON.
+ * If interrupts have been enabled, or anything has been
+ * done that might have changed the scheduling status of
+ * any task or sent any task a signal, you should use
+ * ret_from_except or ret_from_except_lite instead of this.
  */
 fast_exception_return:
-	andi.	r3,r23,MSR_RI		/* check if RI is set */
+	ld	r12,_MSR(r1)
+	ld	r11,_NIP(r1)
+	andi.	r3,r12,MSR_RI		/* check if RI is set */
 	beq-	unrecov_fer
-	ld      r3,_CCR(r1)
-	ld      r4,_LINK(r1)
-	ld      r5,_CTR(r1)
-	ld      r6,_XER(r1)
-	mtcr    r3
-	mtlr    r4
-	mtctr   r5
-	mtspr   XER,r6
+	ld	r3,_CCR(r1)
+	ld	r4,_LINK(r1)
+	ld	r5,_CTR(r1)
+	ld	r6,_XER(r1)
+	mtcr	r3
+	mtlr	r4
+	mtctr	r5
+	mtxer	r6
 	REST_GPR(0, r1)
 	REST_8GPRS(2, r1)
-	REST_4GPRS(10, r1)
 
-	mfmsr	r20
-	li	r21, MSR_RI
-	andc	r20,r20,r21
-	mtmsrd	r20,1
-
-	mtspr   SRR1,r23
-	mtspr   SRR0,r22
-	REST_4GPRS(20, r1)
-	ld      r1,GPR1(r1)
+	mfmsr	r10
+	clrrdi	r10,r10,2		/* clear RI (LE is 0 already) */
+	mtmsrd	r10,1
+
+	mtspr	SRR1,r12
+	mtspr	SRR0,r11
+	REST_4GPRS(10, r1)
+	ld	r1,GPR1(r1)
 	rfid
 
 unrecov_fer:
-	li	r6,0x4000
-	li	r20,0
-	bl	.save_remaining_regs
+	bl	.save_nvgprs
 1:	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	.unrecoverable_exception
 	b	1b
 
 /*
- * Here r20 points to the PACA, r21 to the exception frame,
- * r23 contains the saved CR.
- * r20 - r23, SRR0 and SRR1 are saved in the exception frame.
+ * Here r13 points to the paca, r9 contains the saved CR,
+ * SRR0 and SRR1 are saved in r11 and r12,
+ * r9 - r13 are saved in paca->exgen.
  */
+	.align	7
 	.globl DataAccess_common
 DataAccess_common:
-BEGIN_FTR_SECTION
-	mfspr   r22,DAR
-	srdi    r22,r22,60
-	cmpi    0,r22,0xc
-
-	/* Segment fault on a bolted segment. Go off and map that segment. */
-	beq-	.do_stab_bolted
-END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
-stab_bolted_user_return:
-	EXCEPTION_PROLOG_COMMON
-	ld      r3,_DSISR(r1)
-	andis.	r0,r3,0xa450		/* weird error? */
-	bne	1f			/* if not, try to put a PTE */
-	andis.	r0,r3,0x0020		/* Is it a page table fault? */
-	rlwinm	r4,r3,32-23,29,29	/* DSISR_STORE -> _PAGE_RW */
-	ld      r3,_DAR(r1)             /* into the hash table */
-
-BEGIN_FTR_SECTION
-	beq+	2f			/* If so handle it */
-	li	r4,0x300                /* Trap number */
-	bl	.do_stab_SI
-	b	1f
-END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
-
-2:	li	r5,0x300
-	bl	.do_hash_page_DSI 	/* Try to handle as hpte fault */
-1:
-	ld      r4,_DAR(r1)
-	ld      r5,_DSISR(r1)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	DO_COPY_EE()
-	li	r6,0x300
-	bl      .save_remaining_regs
-	bl      .do_page_fault
-	b       .ret_from_except
+	mfspr	r10,DAR
+	std	r10,PACA_EXGEN+EX_DAR(r13)
+	mfspr	r10,DSISR
+	stw	r10,PACA_EXGEN+EX_DSISR(r13)
+	EXCEPTION_PROLOG_COMMON(0x300, PACA_EXGEN)
+	ld	r3,PACA_EXGEN+EX_DAR(r13)
+	lwz	r4,PACA_EXGEN+EX_DSISR(r13)
+	li	r5,0x300
+	b	.do_hash_page	 	/* Try to handle as hpte fault */
 
+	.align	7
 	.globl DataAccessSLB_common
 DataAccessSLB_common:
-	mfspr   r22,DAR
-	srdi    r22,r22,60
-	cmpi    0,r22,0xc
-
-	/* Segment fault on a bolted segment. Go off and map that segment. */
-	beq     .do_slb_bolted
-
-	EXCEPTION_PROLOG_COMMON
-	ld      r3,_DAR(r1)
-	li      r4,0x380                /* Exception vector  */
+	mfspr	r10,DAR
+	std	r10,PACA_EXGEN+EX_DAR(r13)
+	EXCEPTION_PROLOG_COMMON(0x380, PACA_EXGEN)
+	ld	r3,PACA_EXGEN+EX_DAR(r13)
+	std	r3,_DAR(r1)
 	bl	.slb_allocate
-	or.	r3,r3,r3		/* Check return code */
-	beq     fast_exception_return   /* Return if we succeeded */
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	DO_COPY_EE()
-	ld      r4,_DAR(r1)
-	li	r6,0x380
+	cmpdi	r3,0			/* Check return code */
+	beq	fast_exception_return	/* Return if we succeeded */
 	li	r5,0
-	bl      .save_remaining_regs
-	bl      .do_page_fault
-	b       .ret_from_except
+	std	r5,_DSISR(r1)
+	b	.handle_page_fault
 
+	.align	7
 	.globl InstructionAccess_common
 InstructionAccess_common:
-	EXCEPTION_PROLOG_COMMON
-
-BEGIN_FTR_SECTION
-	andis.	r0,r23,0x0020		/* no ste found? */
-	beq+	2f
-	mr	r3,r22			/* SRR0 at interrupt */
-	li	r4,0x400		/* Trap number       */
-	bl	.do_stab_SI
-	b	1f
-END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
-
-2:	mr	r3,r22
+	EXCEPTION_PROLOG_COMMON(0x400, PACA_EXGEN)
+	ld	r3,_NIP(r1)
+	andis.	r4,r12,0x5820
 	li	r5,0x400
-	bl	.do_hash_page_ISI	/* Try to handle as hpte fault */
-1:
-	mr	r4,r22
-	rlwinm	r5,r23,0,4,4		/* We only care about PR in error_code */
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	DO_COPY_EE()
-	li	r6,0x400
-	bl      .save_remaining_regs
-	bl      .do_page_fault
-	b       .ret_from_except
+	b	.do_hash_page		/* Try to handle as hpte fault */
 
+	.align	7
 	.globl InstructionAccessSLB_common
 InstructionAccessSLB_common:
-	EXCEPTION_PROLOG_COMMON
-	mr      r3,r22                  /* SRR0 = NIA        */
-	li	r4,0x480                /* Exception vector  */
+	EXCEPTION_PROLOG_COMMON(0x480, PACA_EXGEN)
+	ld	r3,_NIP(r1)		/* SRR0 = NIA	*/
 	bl	.slb_allocate
 	or.	r3,r3,r3		/* Check return code */
-	beq+	fast_exception_return   /* Return if we succeeded */
+	beq+	fast_exception_return	/* Return if we succeeded */
 
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	DO_COPY_EE()
-	mr      r4,r22                  /* SRR0 = NIA        */
-	li	r6,0x480
+	ld	r4,_NIP(r1)
 	li	r5,0
-	bl      .save_remaining_regs
-	bl      .do_page_fault
-	b       .ret_from_except
+	std	r4,_DAR(r1)
+	std	r5,_DSISR(r1)
+	b      .handle_page_fault
 
+	.align	7
 	.globl HardwareInterrupt_common
+	.globl HardwareInterrupt_entry
 HardwareInterrupt_common:
-	EXCEPTION_PROLOG_COMMON
+	EXCEPTION_PROLOG_COMMON(0x500, PACA_EXGEN)
 HardwareInterrupt_entry:
+	DISABLE_INTS
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	li	r20,0
-	li	r6,0x500
-	bl      .save_remaining_regs
-	bl      .do_IRQ
-	b       .ret_from_except
+	bl	.do_IRQ
+	b	.ret_from_except_lite
 
+	.align	7
 	.globl Alignment_common
 Alignment_common:
-	EXCEPTION_PROLOG_COMMON
+	mfspr	r10,DAR
+	std	r10,PACA_EXGEN+EX_DAR(r13)
+	mfspr	r10,DSISR
+	stw	r10,PACA_EXGEN+EX_DSISR(r13)
+	EXCEPTION_PROLOG_COMMON(0x600, PACA_EXGEN)
+	ld	r3,PACA_EXGEN+EX_DAR(r13)
+	lwz	r4,PACA_EXGEN+EX_DSISR(r13)
+	std	r3,_DAR(r1)
+	std	r4,_DSISR(r1)
+	bl	.save_nvgprs
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	DO_COPY_EE()
-	li	r6,0x600
-	bl      .save_remaining_regs
-	bl      .AlignmentException
-	b       .ret_from_except
+	ENABLE_INTS
+	bl	.AlignmentException
+	b	.ret_from_except
 
+	.align	7
 	.globl ProgramCheck_common
 ProgramCheck_common:
-	EXCEPTION_PROLOG_COMMON
+	EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
+	bl	.save_nvgprs
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	DO_COPY_EE()
-	li	r6,0x700
-	bl      .save_remaining_regs
-	bl      .ProgramCheckException
-	b       .ret_from_except
+	ENABLE_INTS
+	bl	.ProgramCheckException
+	b	.ret_from_except
 
+	.align	7
 	.globl FPUnavailable_common
 FPUnavailable_common:
-	EXCEPTION_PROLOG_COMMON
+	EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
 	bne	.load_up_fpu		/* if from user, just load it up */
+	bl	.save_nvgprs
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	DO_COPY_EE()
-	li	r6,0x800
-	bl      .save_remaining_regs
-	bl      .KernelFPUnavailableException
+	ENABLE_INTS
+	bl	.KernelFPUnavailableException
 	BUG_OPCODE
 
+	.align	7
 	.globl AltivecUnavailable_common
 AltivecUnavailable_common:
-	EXCEPTION_PROLOG_COMMON
+	EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN)
 #ifdef CONFIG_ALTIVEC
-	bne	.load_up_altivec		/* if from user, just load it up */
+	bne	.load_up_altivec	/* if from user, just load it up */
 #endif
+	bl	.save_nvgprs
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	DO_COPY_EE()
-	li	r6,0xf20
-	bl      .save_remaining_regs
-#ifdef CONFIG_ALTIVEC
-	bl	.KernelAltivecUnavailableException
-#else
-	bl      .UnknownException
-#endif
-	BUG_OPCODE
-		
-	.globl SystemCall_common
-SystemCall_common:
-	EXCEPTION_PROLOG_COMMON
-#ifdef CONFIG_PPC_ISERIES
-	cmpi	0,r0,0x5555		/* Special syscall to handle pending */
-	bne+	1f			/* interrupts */
-	andi.	r6,r23,MSR_PR		/* Only allowed from kernel */
-	beq+	HardwareInterrupt_entry
-1:
-#endif
-	DO_COPY_EE()
-	li	r6,0xC00
-	bl      .save_remaining_regs
-	bl      .DoSyscall
-	b       .ret_from_except
-
-_GLOBAL(do_hash_page_ISI)
-	li	r4,0
-_GLOBAL(do_hash_page_DSI)
+	ENABLE_INTS
+	bl	.AltivecUnavailableException
+	b	.ret_from_except
+
+/*
+ * Hash table stuff
+ */
+	.align	7
+_GLOBAL(do_hash_page)
+	std	r3,_DAR(r1)
+	std	r4,_DSISR(r1)
+
+	andis.	r0,r4,0xa450		/* weird error? */
+	bne-	.handle_page_fault	/* if not, try to insert a HPTE */
+BEGIN_FTR_SECTION
+	andis.	r0,r4,0x0020		/* Is it a segment table fault? */
+	bne-	.do_ste_alloc		/* If so handle it */
+END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
+
 	/*
 	 * We need to set the _PAGE_USER bit if MSR_PR is set or if we are
 	 * accessing a userspace segment (even from the kernel). We assume
 	 * kernel addresses always have the high bit set.
 	 */
-	rotldi	r0,r3,15		/* Move high bit into MSR_PR position */
-	orc	r0,r23,r0
-	rlwimi	r4,r0,32-13,30,30	/* Insert into _PAGE_USER */
+	rlwinm	r4,r4,32-23,29,29	/* DSISR_STORE -> _PAGE_RW */
+	rotldi	r0,r3,15		/* Move high bit into MSR_PR posn */
+	orc	r0,r12,r0		/* MSR_PR | ~high_bit */
+	rlwimi	r4,r0,32-13,30,30	/* becomes _PAGE_USER access bit */
 	ori	r4,r4,1			/* add _PAGE_PRESENT */
 
-	mflr	r21			/* Save LR in r21 */
-
-#ifdef DO_SOFT_DISABLE
 	/*
-	 * We hard enable here (but first soft disable) so that the hash_page
-	 * code can spin on the hash_table_lock with problem on a shared
-	 * processor.
+	 * On iSeries, we soft-disable interrupts here, then
+	 * hard-enable interrupts so that the hash_page code can spin on
+	 * the hash_table_lock without problems on a shared processor.
 	 */
-	li	r0,0
-	stb	r0,PACAPROCENABLED(r20)	/* Soft Disabled */
-
-	mfmsr	r0
-	ori	r0,r0,MSR_EE
-	mtmsrd	r0,1			/* Hard Enable */
-#endif
+	DISABLE_INTS
 
 	/*
 	 * r3 contains the faulting address
@@ -937,184 +1006,159 @@
 	 *
 	 * at return r3 = 0 for success
 	 */
-
 	bl	.hash_page		/* build HPTE if possible */
+	cmpdi	r3,0			/* see if hash_page succeeded */
 
 #ifdef DO_SOFT_DISABLE
 	/*
-	 * Now go back to hard disabled.
+	 * If we had interrupts soft-enabled at the point where the
+	 * DSI/ISI occurred, and an interrupt came in during hash_page,
+	 * handle it now.
+	 * We jump to ret_from_except_lite rather than fast_exception_return
+	 * because ret_from_except_lite will check for and handle pending
+	 * interrupts if necessary.
 	 */
-	mfmsr	r0
-	li	r4,0
-	ori	r4,r4,MSR_EE
-	andc	r0,r0,r4
-	mtmsrd	r0,1			/* Hard Disable */
-
-	ld	r0,SOFTE(r1)
-	cmpdi	0,r0,0			/* See if we will soft enable in */
-					/* save_remaining_regs */
-	beq	5f
-	CHECKANYINT(r4,r5)
-	bne-	HardwareInterrupt_entry	/* Convert this DSI into an External */
-					/* to process interrupts which occurred */
-					/* during hash_page */
-5:
-	stb	r0,PACAPROCENABLED(r20)	/* Restore soft enable/disable status */
+	beq	.ret_from_except_lite
+	/*
+	 * hash_page couldn't handle it, set soft interrupt enable back
+	 * to what it was before the trap.  Note that .local_irq_restore
+	 * handles any interrupts pending at this point.
+	 */
+	ld	r3,SOFTE(r1)
+	bl	.local_irq_restore
+	b	11f
+#else
+	beq+	fast_exception_return   /* Return from exception on success */
+	/* fall through */
 #endif
-	or.	r3,r3,r3		/* Check return code */
-	beq     fast_exception_return   /* Return from exception on success */
 
-	mtlr    r21                     /* restore LR */
-	blr                             /* Return to DSI or ISI on failure */
+/* Here we have a page fault that hash_page can't handle. */
+_GLOBAL(handle_page_fault)
+	ENABLE_INTS
+11:	ld	r4,_DAR(r1)
+	ld	r5,_DSISR(r1)
+	addi	r3,r1,STACK_FRAME_OVERHEAD
+	bl	.do_page_fault
+	cmpdi	r3,0
+	beq+	.ret_from_except_lite
+	bl	.save_nvgprs
+	mr	r5,r3
+	addi	r3,r1,STACK_FRAME_OVERHEAD
+	lwz	r4,_DAR(r1)
+	bl	.bad_page_fault
+	b	.ret_from_except
+
+	/* here we have a segment miss */
+_GLOBAL(do_ste_alloc)
+	bl	.ste_allocate		/* try to insert stab entry */
+	cmpdi	r3,0
+	beq+	fast_exception_return
+	b	.handle_page_fault
 
 /*
- * r20 points to the PACA, r21 to the exception frame,
- * r23 contains the saved CR.
- * r20 - r23, SRR0 and SRR1 are saved in the exception frame.
+ * r13 points to the PACA, r9 contains the saved CR,
+ * r11 and r12 contain the saved SRR0 and SRR1.
+ * r9 - r13 are saved in paca->exslb.
  * We assume we aren't going to take any exceptions during this procedure.
+ * We assume (DAR >> 60) == 0xc.
  */
+	.align	7
 _GLOBAL(do_stab_bolted)
-	stw	r23,EX_CCR(r21)	/* save CR in exc. frame */
+	stw	r9,PACA_EXSLB+EX_CCR(r13)	/* save CR in exc. frame */
+	std	r11,PACA_EXSLB+EX_SRR0(r13)	/* save SRR0 in exc. frame */
 
-	mfspr   r22,DSISR
-	andis.  r22,r22,0x0020
-	beq-	stab_bolted_user_return
+	/* Hash to the primary group */
+	ld	r10,PACASTABVIRT(r13)
+	mfspr	r11,DAR
+	srdi	r11,r11,28
+	rldimi	r10,r11,7,52	/* r10 = first ste of the group */
 
+	/* Calculate VSID */
 	/* (((ea >> 28) & 0x1fff) << 15) | (ea >> 60) */
-	mfspr	r21,DAR
-	rldicl	r20,r21,36,51
-	sldi	r20,r20,15
-	srdi	r21,r21,60
-	or	r20,r20,r21
+	rldic	r11,r11,15,36
+	ori	r11,r11,0xc
 
 	/* VSID_RANDOMIZER */
-	li      r21,9
-	sldi    r21,r21,32
-	oris    r21,r21,58231
-	ori     r21,r21,39831
-
-	mulld   r20,r20,r21
-	clrldi  r20,r20,28      /* r20 = vsid */
+	li	r9,9
+	sldi	r9,r9,32
+	oris	r9,r9,58231
+	ori	r9,r9,39831
 
-	mfsprg  r21,3
-	ld      r21,PACASTABVIRT(r21)
-
-	/* Hash to the primary group */
-	mfspr	r22,DAR
-	rldicl  r22,r22,36,59
-	rldicr  r22,r22,7,56
-	or      r21,r21,r22     /* r21 = first ste of the group */
+	mulld	r9,r11,r9
+	rldic	r9,r9,12,16	/* r9 = vsid << 12 */
 
 	/* Search the primary group for a free entry */
-	li      r22,0
-1:
-	ld      r23,0(r21)      /* Test valid bit of the current ste   */
-	rldicl  r23,r23,57,63
-	cmpwi   r23,0
-	bne     2f
-	li	r23,0
-	rldimi  r23,r20,12,0    /* Insert the new vsid value            */
-	std     r23,8(r21)      /* Put new entry back into the stab     */
-	eieio                  /* Order vsid update                    */
-	li	r23,0
-	mfspr	r20,DAR        /* Get the new esid                     */
-	rldicl  r20,r20,36,28  /* Permits a full 36b of ESID           */
-	rldimi  r23,r20,28,0    /* Insert the new esid value            */
-	ori     r23,r23,144      /* Turn on valid and kp                 */
-	std     r23,0(r21)      /* Put new entry back into the stab     */
-	sync                   /* Order the update                     */
-	b       3f
-2:
-	addi    r22,r22,1
-	addi    r21,r21,16
-	cmpldi  r22,7
-	ble     1b
+1:	ld	r11,0(r10)	/* Test valid bit of the current ste	*/
+	andi.	r11,r11,0x80
+	beq	2f
+	addi	r10,r10,16
+	andi.	r11,r10,0x70
+	bne	1b
 
-	/* Stick for only searching the primary group for now.          */
+	/* Stick for only searching the primary group for now.		*/
 	/* At least for now, we use a very simple random castout scheme */
-	/* Use the TB as a random number ;  OR in 1 to avoid entry 0    */
-	mftb    r22
-	andi.   r22,r22,7
-	ori	r22,r22,1
-	sldi	r22,r22,4
-
-	/* r21 currently points to and ste one past the group of interest */
-	/* make it point to the randomly selected entry                   */
-	subi	r21,r21,128
-	or 	r21,r21,r22      /* r21 is the entry to invalidate        */
-
-	isync                    /* mark the entry invalid                */
-	ld      r23,0(r21)
-	li      r22,-129
-	and     r23,r23,r22
-	std     r23,0(r21)
+	/* Use the TB as a random number ;  OR in 1 to avoid entry 0	*/
+	mftb	r11
+	rldic	r11,r11,4,57	/* r11 = (r11 << 4) & 0x70 */
+	ori	r11,r11,0x10
+
+	/* r10 currently points to an ste one past the group of interest */
+	/* make it point to the randomly selected entry			*/
+	subi	r10,r10,128
+	or 	r10,r10,r11	/* r10 is the entry to invalidate	*/
+
+	isync			/* mark the entry invalid		*/
+	ld	r11,0(r10)
+	rldicl	r11,r11,56,1	/* clear the valid bit */
+	rotldi	r11,r11,8
+	std	r11,0(r10)
 	sync
 
-	li	r23,0
-	rldimi  r23,r20,12,0
-	std     r23,8(r21)
+	clrrdi	r11,r11,28	/* Get the esid part of the ste		*/
+	slbie	r11
+
+2:	std	r9,8(r10)	/* Store the vsid part of the ste	*/
 	eieio
 
-	ld	r22,0(r21)	/* Get the esid part of the ste         */
-	li	r23,0
-	mfspr	r20,DAR         /* Get the new esid                     */
-	rldicl  r20,r20,36,28   /* Permits a full 32b of ESID           */
-	rldimi  r23,r20,28,0    /* Insert the new esid value            */
-	ori     r23,r23,144     /* Turn on valid and kp                 */
-	std     r23,0(r21)      /* Put new entry back into the stab     */
-
-	rldicl  r22,r22,36,28
-	rldicr  r22,r22,28,35
-	slbie   r22
+	mfspr	r11,DAR		/* Get the new esid			*/
+	clrrdi	r11,r11,28	/* Permits a full 32b of ESID		*/
+	ori	r11,r11,0x90	/* Turn on valid and kp			*/
+	std	r11,0(r10)	/* Put new entry back into the stab	*/
+
 	sync
 
-3:
 	/* All done -- return from exception. */
-	mfsprg  r20,3                   /* Load the PACA pointer  */
-	ld      r21,PACAEXCSP(r20)      /* Get the exception frame pointer */
-	addi    r21,r21,EXC_FRAME_SIZE
-	lwz	r23,EX_CCR(r21)		/* get saved CR */
-
-	ld	r22,EX_SRR1(r21)
-	andi.	r22,r22,MSR_RI
-	beq-	unrecov_stab
-
-	/* note that this is almost identical to maskable_exception_exit */
-	mtcr    r23                     /* restore CR */
-
-	mfmsr	r22
-	li	r23, MSR_RI
-	andc	r22,r22,r23
-	mtmsrd	r22,1
-
-	ld	r22,EX_SRR0(r21)	/* Get SRR0 from exc. frame */
-	ld	r23,EX_SRR1(r21)	/* Get SRR1 from exc. frame */
-	mtspr	SRR0,r22
-	mtspr   SRR1,r23
-	ld	r22,EX_R22(r21)		/* restore r22 and r23 */
-	ld	r23,EX_R23(r21)
-	mfspr	r20,SPRG2
-	mfspr	r21,SPRG1
-	rfid
+	lwz	r9,PACA_EXSLB+EX_CCR(r13)	/* get saved CR */
+	ld	r11,PACA_EXSLB+EX_SRR0(r13)	/* get saved SRR0 */
 
-unrecov_stab:
-	EXCEPTION_PROLOG_COMMON
-	li	r6,0x4100
-	li	r20,0
-	bl	.save_remaining_regs
-1:	addi	r3,r1,STACK_FRAME_OVERHEAD
-	bl	.unrecoverable_exception
-	b	1b
+	andi.	r10,r12,MSR_RI
+	beq-	unrecov_slb
+
+	mtcrf	0x80,r9			/* restore CR */
+
+	mfmsr	r10
+	clrrdi	r10,r10,2
+	mtmsrd	r10,1
+
+	mtspr	SRR0,r11
+	mtspr	SRR1,r12
+	ld	r9,PACA_EXSLB+EX_R9(r13)
+	ld	r10,PACA_EXSLB+EX_R10(r13)
+	ld	r11,PACA_EXSLB+EX_R11(r13)
+	ld	r12,PACA_EXSLB+EX_R12(r13)
+	ld	r13,PACA_EXSLB+EX_R13(r13)
+	rfid
 
 /*
- * r20 points to the PACA, r21 to the exception frame,
- * r23 contains the saved CR.
- * r20 - r23, SRR0 and SRR1 are saved in the exception frame.
+ * r13 points to the PACA, r9 contains the saved CR,
+ * r11 and r12 contain the saved SRR0 and SRR1.
+ * r9 - r13 are saved in paca->exslb.
  * We assume we aren't going to take any exceptions during this procedure.
  */
 /* XXX note fix masking in get_kernel_vsid to match */
 _GLOBAL(do_slb_bolted)
-	stw	r23,EX_CCR(r21)		/* save CR in exc. frame */
+	stw	r9,PACA_EXSLB+EX_CCR(r13)	/* save CR in exc. frame */
+	std	r11,PACA_EXSLB+EX_SRR0(r13)	/* save SRR0 in exc. frame */
 
 	/*
 	 * We take the next entry, round robin. Previously we tried
@@ -1122,15 +1166,15 @@
 	 * we dont have any LRU information to help us choose a slot.
 	 */
 
-	/* r20 = paca */
-1:	ld	r22,PACASTABRR(r20)
-	addi	r21,r22,1
-	cmpdi	r21,SLB_NUM_ENTRIES
+	/* r13 = paca */
+1:	ld	r10,PACASTABRR(r13)
+	addi	r9,r10,1
+	cmpdi	r9,SLB_NUM_ENTRIES
 	blt+	2f
-	li	r21,2			/* dont touch slot 0 or 1 */
-2:	std	r21,PACASTABRR(r20)
+	li	r9,2			/* dont touch slot 0 or 1 */
+2:	std	r9,PACASTABRR(r13)
 
-	/* r20 = paca, r22 = entry */
+	/* r13 = paca, r10 = entry */
 
 	/* 
 	 * Never cast out the segment for our kernel stack. Since we
@@ -1139,8 +1183,8 @@
 	 * which gets invalidated due to a tlbie from another cpu at a
 	 * non recoverable point (after setting srr0/1) - Anton
 	 */
-	slbmfee	r21,r22
-	srdi	r21,r21,27
+	slbmfee	r9,r10
+	srdi	r9,r9,27
 	/*
 	 * Use paca->ksave as the value of the kernel stack pointer,
 	 * because this is valid at all times.
@@ -1150,74 +1194,71 @@
 	 * switch (between updating r1 and updating paca->ksave),
 	 * we check against both r1 and paca->ksave.
 	 */
-	srdi	r23,r1,27
-	ori	r23,r23,1
-	cmpd	r23,r21
+	srdi	r11,r1,27
+	ori	r11,r11,1
+	cmpd	r11,r9
 	beq-	1b
-	ld	r23,PACAKSAVE(r20)
-	srdi	r23,r23,27
- 	ori	r23,r23,1
- 	cmpd	r23,r21
+	ld	r11,PACAKSAVE(r13)
+	srdi	r11,r11,27
+ 	ori	r11,r11,1
+ 	cmpd	r11,r9
  	beq-	1b
 
-	/* r20 = paca, r22 = entry */
+	/* r13 = paca, r10 = entry */
 
 	/* (((ea >> 28) & 0x1fff) << 15) | (ea >> 60) */
-	mfspr	r21,DAR
-	rldicl	r23,r21,36,51
-	sldi	r23,r23,15
-	srdi	r21,r21,60
-	or	r23,r23,r21
+	mfspr	r9,DAR
+	rldicl	r11,r9,36,51
+	sldi	r11,r11,15
+	srdi	r9,r9,60
+	or	r11,r11,r9
 
 	/* VSID_RANDOMIZER */
-	li	r21,9
-	sldi	r21,r21,32
-	oris	r21,r21,58231
-	ori	r21,r21,39831
+	li	r9,9
+	sldi	r9,r9,32
+	oris	r9,r9,58231
+	ori	r9,r9,39831
 
 	/* vsid = (ordinal * VSID_RANDOMIZER) & VSID_MASK */
-	mulld	r23,r23,r21
-	clrldi	r23,r23,28
+	mulld	r11,r11,r9
+	clrldi	r11,r11,28
 
-	/* r20 = paca, r22 = entry, r23 = vsid */
+	/* r13 = paca, r10 = entry, r11 = vsid */
 
 	/* Put together slb word1 */
-	sldi	r23,r23,12
+	sldi	r11,r11,12
 
 BEGIN_FTR_SECTION
 	/* set kp and c bits */
-	ori	r23,r23,0x480
+	ori	r11,r11,0x480
 END_FTR_SECTION_IFCLR(CPU_FTR_16M_PAGE)
 BEGIN_FTR_SECTION
 	/* set kp, l and c bits */
-	ori	r23,r23,0x580
+	ori	r11,r11,0x580
 END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE)
 
-	/* r20 = paca, r22 = entry, r23 = slb word1 */
+	/* r13 = paca, r10 = entry, r11 = slb word1 */
 
 	/* Put together slb word0 */
-	mfspr	r21,DAR
-	rldicr	r21,r21,0,35	/* get the new esid */
-	oris	r21,r21,2048	/* set valid bit */
-	rldimi	r21,r22,0,52	/* insert entry */
+	mfspr	r9,DAR
+	clrrdi	r9,r9,28	/* get the new esid */
+	oris	r9,r9,0x800	/* set valid bit */
+	rldimi	r9,r10,0,52	/* insert entry */
 
-	/* r20 = paca, r21 = slb word0, r23 = slb word1 */
+	/* r13 = paca, r9 = slb word0, r11 = slb word1 */
 
 	/* 
 	 * No need for an isync before or after this slbmte. The exception
 	 * we enter with and the rfid we exit with are context synchronizing .
 	 */
-	slbmte	r23,r21
+	slbmte	r11,r9
 
 	/* All done -- return from exception. */
-	ld	r21,PACAEXCSP(r20)	/* Get the exception frame pointer */
-	addi	r21,r21,EXC_FRAME_SIZE
-	lwz	r23,EX_CCR(r21)		/* get saved CR */
-	/* note that this is almost identical to maskable_exception_exit */
-
-	ld	r22,EX_SRR1(r21)
-	andi.	r22,r22,MSR_RI
-	beq-	unrecov_stab
+	lwz	r9,PACA_EXSLB+EX_CCR(r13)	/* get saved CR */
+	ld	r11,PACA_EXSLB+EX_SRR0(r13)	/* get saved SRR0 */
+
+	andi.	r10,r12,MSR_RI	/* check for unrecoverable exception */
+	beq-	unrecov_slb
 
 	/*
 	 * Until everyone updates binutils hardwire the POWER4 optimised
@@ -1226,124 +1267,32 @@
 #if 0
 	.machine	push
 	.machine	"power4"
-	mtcrf	0x80,r23
+	mtcrf	0x80,r9
 	.machine	pop
 #else
-	.long 0x7ef80120
+	.long 0x7d380120
 #endif
 
-	mfmsr	r22
-	li	r23, MSR_RI
-	andc	r22,r22,r23
-	mtmsrd	r22,1
-
-	ld	r22,EX_SRR0(r21)	/* Get SRR0 from exc. frame */
-	ld	r23,EX_SRR1(r21)	/* Get SRR1 from exc. frame */
-	mtspr	SRR0,r22
-	mtspr	SRR1,r23
-	ld	r22,EX_R22(r21)		/* restore r22 and r23 */
-	ld	r23,EX_R23(r21)
-	ld	r20,EX_R20(r21)
-	mfspr	r21,SPRG1
+	mfmsr	r10
+	clrrdi	r10,r10,2
+	mtmsrd	r10,1
+
+	mtspr	SRR0,r11
+	mtspr	SRR1,r12
+	ld	r9,PACA_EXSLB+EX_R9(r13)
+	ld	r10,PACA_EXSLB+EX_R10(r13)
+	ld	r11,PACA_EXSLB+EX_R11(r13)
+	ld	r12,PACA_EXSLB+EX_R12(r13)
+	ld	r13,PACA_EXSLB+EX_R13(r13)
 	rfid
 
-_GLOBAL(do_stab_SI)
-	mflr	r21			/* Save LR in r21 */
-
-	/*
-	 * r3 contains the faulting address
-	 * r4 contains the required access permissions
-	 *
-	 * at return r3 = 0 for success
-	 */
-
-	bl	.ste_allocate		/* build STE if possible */
-	or.	r3,r3,r3		/* Check return code */
-	beq     fast_exception_return   /* Return from exception on success */
-	mtlr    r21                     /* restore LR */
-	blr                             /* Return to DSI or ISI on failure */
-
-/*
- * This code finishes saving the registers to the exception frame.
- * Address translation is already on.
- */
-_GLOBAL(save_remaining_regs)
-	/*
-	 * Save the rest of the registers into the pt_regs structure
-	 */
-	std     r22,_NIP(r1)
-	std     r23,_MSR(r1)
-	std     r6,TRAP(r1)
-	ld      r6,GPR6(r1)
-	SAVE_2GPRS(14, r1)
-	SAVE_4GPRS(16, r1)
-	SAVE_8GPRS(24, r1)
-
-	/* Set the marker value "regshere" just before the reg values */
-	SET_REG_TO_CONST(r22, 0x7265677368657265)
-	std	r22,STACK_FRAME_OVERHEAD-16(r1)
-
-	/*
-	 * Clear the RESULT field
-	 */
-	li	r22,0
-	std	r22,RESULT(r1)
-
-	/*
-	 * Test if from user state; result will be tested later
-	 */
-	andi.	r23,r23,MSR_PR		/* Set CR for later branch */
-
-	/*
-	 * Indicate that r1 contains the kernel stack and
-	 * get the Kernel TOC pointer from the paca
-	 */
-	ld	r2,PACATOC(r13)		/* Get Kernel TOC pointer */
-
-	/*
-	 * If from user state, update THREAD.regs
-	 */
-	beq	2f			/* Modify THREAD.regs if from user */
-	addi	r23,r1,STACK_FRAME_OVERHEAD
-	ld	r22, PACACURRENT(r13)
-	std	r23,THREAD+PT_REGS(r22)
-2:
-	SET_REG_TO_CONST(r22, MSR_KERNEL)
-
-#ifdef DO_SOFT_DISABLE
-	stb	r20,PACAPROCENABLED(r13) /* possibly soft enable */
-	ori	r22,r22,MSR_EE		/* always hard enable */
-#else
-	rldimi	r22,r20,15,48		/* Insert desired EE value */
-#endif
-
-	mtmsrd  r22,1
-	blr
-
-/*
- * Kernel profiling with soft disable on iSeries
- */
-do_profile:
-	ld	r22,8(r21)		/* Get SRR1 */
-	andi.	r22,r22,MSR_PR		/* Test if in kernel */
-	bnelr				/* return if not in kernel */
-	ld	r22,0(r21)		/* Get SRR0 */
-	ld	r25,PACAPROFSTEXT(r20)	/* _stext */
-	subf	r22,r25,r22		/* offset into kernel */
-	lwz	r25,PACAPROFSHIFT(r20)
-	srd	r22,r22,r25
-	lwz	r25,PACAPROFLEN(r20)	/* length of profile table (-1) */
-	cmp	0,r22,r25		/* off end? */
-	ble	1f
-	mr	r22,r25			/* force into last entry */
-1:	sldi	r22,r22,2		/* convert to offset into buffer */
-	ld	r25,PACAPROFBUFFER(r20)	/* profile buffer */
-	add	r25,r25,r22
-2:	lwarx	r22,0,r25		/* atomically increment */
-	addi	r22,r22,1
-	stwcx.	r22,0,r25
-	bne-	2b
-	blr
+unrecov_slb:
+	EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB)
+	DISABLE_INTS
+	bl	.save_nvgprs
+1:	addi	r3,r1,STACK_FRAME_OVERHEAD
+	bl	.unrecoverable_exception
+	b	1b
 
 
 /*
@@ -1356,32 +1305,32 @@
 	isync
 
 	/* Set up a paca value for this processor. */
-	LOADADDR(r24, paca) 		 /* Get base vaddr of paca array  */
-	mulli	r13,r3,PACA_SIZE	 /* Calculate vaddr of right paca */
-	add	r13,r13,r24              /* for this processor.           */
+	LOADADDR(r24, paca) 		/* Get base vaddr of paca array	 */
+	mulli	r13,r3,PACA_SIZE	/* Calculate vaddr of right paca */
+	add	r13,r13,r24		/* for this processor.		 */
 
-	mtspr	SPRG3,r13		 /* Save vaddr of paca in SPRG3   */
-	mr	r24,r3			 /* __secondary_start needs cpu#  */
+	mtspr	SPRG3,r13		/* Save vaddr of paca in SPRG3	 */
+	mr	r24,r3			/* __secondary_start needs cpu#	 */
 
 1:
 	HMT_LOW
-	lbz	r23,PACAPROCSTART(r13)	 /* Test if this processor should */
-					 /* start.                        */
+	lbz	r23,PACAPROCSTART(r13)	/* Test if this processor should */
+					/* start.			 */
 	sync
 
-        /* Create a temp kernel stack for use before relocation is on.    */
-        mr      r1,r13
-        addi    r1,r1,PACAGUARD
-        addi    r1,r1,0x1000
-        subi    r1,r1,STACK_FRAME_OVERHEAD
+	/* Create a temp kernel stack for use before relocation is on.	*/
+	mr	r1,r13
+	addi	r1,r1,PACAGUARD
+	addi	r1,r1,0x1000
+	subi	r1,r1,STACK_FRAME_OVERHEAD
 
-	cmpi	0,r23,0
+	cmpwi	0,r23,0
 #ifdef CONFIG_SMP
 #ifdef SECONDARY_PROCESSORS
 	bne	.__secondary_start
 #endif
 #endif
-	b 	1b			 /* Loop until told to go         */
+	b 	1b			/* Loop until told to go	 */
 #ifdef CONFIG_PPC_ISERIES
 _GLOBAL(__start_initialization_iSeries)
 	/* Clear out the BSS */
@@ -1389,13 +1338,13 @@
 
 	LOADADDR(r8,__bss_start)
 
-	sub	r11,r11,r8        /* bss size                        */
-	addi	r11,r11,7         /* round up to an even double word */
-	rldicl. r11,r11,61,3      /* shift right by 3                */
+	sub	r11,r11,r8		/* bss size			*/
+	addi	r11,r11,7		/* round up to an even double word */
+	rldicl. r11,r11,61,3		/* shift right by 3		*/
 	beq	4f
 	addi	r8,r8,-8
 	li	r0,0
-	mtctr	r11		  /* zero this many doublewords      */
+	mtctr	r11			/* zero this many doublewords	*/
 3:	stdu	r0,8(r8)
 	bdnz	3b
 4:
@@ -1422,10 +1371,10 @@
 	std	r4,0(r9)		/* set the naca pointer */
 
 	/* Get the pointer to the segment table */
-	ld	r6,PACA(r4)             /* Get the base paca pointer       */
+	ld	r6,PACA(r4)		/* Get the base paca pointer	*/
 	ld	r4,PACASTABVIRT(r6)
 
-	bl      .iSeries_fixup_klimit
+	bl	.iSeries_fixup_klimit
 
 	/* relocation is on at this point */
 
@@ -1456,8 +1405,8 @@
 	bl	.reloc_offset
 
 	LOADADDR(r2,__toc_start)
-	addi    r2,r2,0x4000
-	addi    r2,r2,0x4000
+	addi	r2,r2,0x4000
+	addi	r2,r2,0x4000
 
 	/* Relocate the TOC from a virt addr to a real addr */
 	sub	r2,r2,r3
@@ -1498,33 +1447,33 @@
  * unknown exception placeholders.
  *
  * Note: This process overwrites the OF exception vectors.
- *       r26 == relocation offset
- *       r27 == KERNELBASE
+ *	r26 == relocation offset
+ *	r27 == KERNELBASE
  */
 	bl	.reloc_offset
 	mr	r26,r3
 	SET_REG_TO_CONST(r27,KERNELBASE)
 
-	li	r3,0                    /* target addr */
+	li	r3,0			/* target addr */
 
 	// XXX FIXME: Use phys returned by OF (r23)
-	sub	r4,r27,r26 		/* source addr */
-					/* current address of _start   */
-			                /*   i.e. where we are running */
-			                /*        the source addr      */
+	sub	r4,r27,r26 		/* source addr			 */
+					/* current address of _start	 */
+					/*   i.e. where we are running	 */
+					/*	the source addr		 */
 
-	LOADADDR(r5,copy_to_here)	/* # bytes of memory to copy      */
+	LOADADDR(r5,copy_to_here)	/* # bytes of memory to copy	 */
 	sub	r5,r5,r27
 
-	li	r6,0x100		/* Start offset, the first 0x100  */
-					/* bytes were copied earlier.	  */
+	li	r6,0x100		/* Start offset, the first 0x100 */
+					/* bytes were copied earlier.	 */
 
-	bl	.copy_and_flush		/* copy the first n bytes         */
-					/* this includes the code being   */
-					/* executed here.                 */
+	bl	.copy_and_flush		/* copy the first n bytes	 */
+					/* this includes the code being	 */
+					/* executed here.		 */
 
-        LOADADDR(r0, 4f)                /* Jump to the copy of this code  */
-	mtctr	r0			/* that we just made/relocated    */
+	LOADADDR(r0, 4f)		/* Jump to the copy of this code */
+	mtctr	r0			/* that we just made/relocated	 */
 	bctr
 
 4:	LOADADDR(r5,klimit)
@@ -1546,23 +1495,23 @@
 _GLOBAL(copy_and_flush)
 	addi	r5,r5,-8
 	addi	r6,r6,-8
-4:	li	r0,16                   /* Use the least common      */
-					/* denominator cache line    */
-			                /* size.  This results in    */
-					/* extra cache line flushes  */
-					/* but operation is correct. */
-					/* Can't get cache line size */
-					/* from NACA as it is being  */
-					/* moved too.                */
+4:	li	r0,16			/* Use the least common		*/
+					/* denominator cache line	*/
+					/* size.  This results in	*/
+					/* extra cache line flushes	*/
+					/* but operation is correct.	*/
+					/* Can't get cache line size	*/
+					/* from NACA as it is being	*/
+					/* moved too.			*/
 
-	mtctr	r0			/* put # words/line in ctr */
-3:	addi	r6,r6,8			/* copy a cache line */
+	mtctr	r0			/* put # words/line in ctr	*/
+3:	addi	r6,r6,8			/* copy a cache line		*/
 	ldx	r0,r6,r4
 	stdx	r0,r6,r3
 	bdnz	3b
-	dcbst	r6,r3			/* write it to memory */
+	dcbst	r6,r3			/* write it to memory		*/
 	sync
-	icbi	r6,r3			/* flush the icache line */
+	icbi	r6,r3			/* flush the icache line	*/
 	cmpld	0,r6,r5
 	blt	4b
 	sync
@@ -1583,9 +1532,9 @@
  * On entry: r13 == 'current' && last_task_used_math != 'current'
  */
 _STATIC(load_up_fpu)
-	mfmsr	r5                      /* grab the current MSR */
+	mfmsr	r5			/* grab the current MSR */
 	ori	r5,r5,MSR_FP
-	mtmsrd  r5			/* enable use of fpu now */
+	mtmsrd	r5			/* enable use of fpu now */
 	isync
 /*
  * For SMP, we don't do lazy FPU switching because it just gets too
@@ -1594,9 +1543,9 @@
  *
  */
 #ifndef CONFIG_SMP
-	LOADBASE(r3,last_task_used_math)
-	ld	r4,last_task_used_math@l(r3)
-	cmpi	0,r4,0
+	ld	r3,last_task_used_math@got(r2)
+	ld	r4,0(r3)
+	cmpdi	0,r4,0
 	beq	1f
 	/* Save FP state to last_task_used_math's THREAD struct */
 	addi	r4,r4,THREAD
@@ -1606,8 +1555,8 @@
 	/* Disable FP for last_task_used_math */
 	ld	r5,PT_REGS(r4)
 	ld	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-	li	r20,MSR_FP|MSR_FE0|MSR_FE1
-	andc	r4,r4,r20
+	li	r6,MSR_FP|MSR_FE0|MSR_FE1
+	andc	r4,r4,r6
 	std	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
 1:
 #endif /* CONFIG_SMP */
@@ -1615,15 +1564,16 @@
 	ld	r4,PACACURRENT(r13)
 	addi	r5,r4,THREAD		/* Get THREAD */
 	ld	r4,THREAD_FPEXC_MODE(r5)
-	ori	r23,r23,MSR_FP
-	or	r23,r23,r4
+	ori	r12,r12,MSR_FP
+	or	r12,r12,r4
+	std	r12,_MSR(r1)
 	lfd	fr0,THREAD_FPSCR(r5)
 	mtfsf	0xff,fr0
 	REST_32FPRS(0, r5)
 #ifndef CONFIG_SMP
 	/* Update last_task_used_math to 'current' */
 	subi	r4,r5,THREAD		/* Back to 'current' */
-	std	r4,last_task_used_math@l(r3)
+	std	r4,0(r3)
 #endif /* CONFIG_SMP */
 	/* restore registers and return */
 	b	fast_exception_return
@@ -1633,10 +1583,10 @@
  * Disable the FPU.
  */
 _GLOBAL(disable_kernel_fp)
-	mfmsr   r3
-	rldicl  r0,r3,(63-MSR_FP_LG),1
-	rldicl  r3,r0,(MSR_FP_LG+1),0
-	mtmsrd  r3			/* disable use of fpu now */
+	mfmsr	r3
+	rldicl	r0,r3,(63-MSR_FP_LG),1
+	rldicl	r3,r0,(MSR_FP_LG+1),0
+	mtmsrd	r3			/* disable use of fpu now */
 	isync
 	blr
 
@@ -1651,11 +1601,11 @@
 	ori	r5,r5,MSR_FP
 	mtmsrd	r5			/* enable use of fpu now */
 	isync
-	cmpi	0,r3,0
+	cmpdi	0,r3,0
 	beqlr-				/* if no previous owner, done */
 	addi	r3,r3,THREAD		/* want THREAD of task */
 	ld	r5,PT_REGS(r3)
-	cmpi	0,r5,0
+	cmpdi	0,r5,0
 	SAVE_32FPRS(0, r3)
 	mffs	fr0
 	stfd	fr0,THREAD_FPSCR(r3)
@@ -1667,8 +1617,8 @@
 1:
 #ifndef CONFIG_SMP
 	li	r5,0
-	LOADBASE(r4,last_task_used_math)
-	std	r5,last_task_used_math@l(r4)
+	ld	r4,last_task_used_math@got(r2)
+	std	r5,0(r4)
 #endif /* CONFIG_SMP */
 	blr
 
@@ -1685,9 +1635,9 @@
  * On entry: r13 == 'current' && last_task_used_altivec != 'current'
  */
 _STATIC(load_up_altivec)
-	mfmsr	r5                      /* grab the current MSR */
+	mfmsr	r5			/* grab the current MSR */
 	oris	r5,r5,MSR_VEC@h
-	mtmsrd  r5			/* enable use of VMX now */
+	mtmsrd	r5			/* enable use of VMX now */
 	isync
 	
 /*
@@ -1699,9 +1649,9 @@
  * avoid saving all of the VREGs here...
  */
 #ifndef CONFIG_SMP
-	LOADBASE(r3,last_task_used_altivec)
-	ld	r4,last_task_used_altivec@l(r3)
-	cmpi	0,r4,0
+	ld	r3,last_task_used_altivec@got(r2)
+	ld	r4,0(r3)
+	cmpdi	0,r4,0
 	beq	1f
 	/* Save VMX state to last_task_used_altivec's THREAD struct */
 	addi	r4,r4,THREAD
@@ -1712,8 +1662,8 @@
 	/* Disable VMX for last_task_used_altivec */
 	ld	r5,PT_REGS(r4)
 	ld	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-	lis	r20,MSR_VEC@h
-	andc	r4,r4,r20
+	lis	r6,MSR_VEC@h
+	andc	r4,r4,r6
 	std	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
 1:
 #endif /* CONFIG_SMP */
@@ -1723,7 +1673,7 @@
 	 * all 1's
 	 */
 	mfspr	r4,SPRN_VRSAVE
-	cmpi	0,r4,0
+	cmpdi	0,r4,0
 	bne+	1f
 	li	r4,-1
 	mtspr	SPRN_VRSAVE,r4
@@ -1731,7 +1681,8 @@
 	/* enable use of VMX after return */
 	ld	r4,PACACURRENT(r13)
 	addi	r5,r4,THREAD		/* Get THREAD */
-	oris	r23,r23,MSR_VEC@h
+	oris	r12,r12,MSR_VEC@h
+	std	r12,_MSR(r1)
 	li	r4,1
 	li	r10,THREAD_VSCR
 	stw	r4,THREAD_USED_VR(r5)
@@ -1740,7 +1691,7 @@
 #ifndef CONFIG_SMP
 	/* Update last_task_used_math to 'current' */
 	subi	r4,r5,THREAD		/* Back to 'current' */
-	std	r4,last_task_used_altivec@l(r3)
+	std	r4,0(r3)
 #endif /* CONFIG_SMP */
 	/* restore registers and return */
 	b	fast_exception_return
@@ -1750,10 +1701,10 @@
  * Disable the VMX.
  */
 _GLOBAL(disable_kernel_altivec)
-	mfmsr   r3
-	rldicl  r0,r3,(63-MSR_VEC_LG),1
-	rldicl  r3,r0,(MSR_VEC_LG+1),0
-	mtmsrd  r3			/* disable use of VMX now */
+	mfmsr	r3
+	rldicl	r0,r3,(63-MSR_VEC_LG),1
+	rldicl	r3,r0,(MSR_VEC_LG+1),0
+	mtmsrd	r3			/* disable use of VMX now */
 	isync
 	blr
 
@@ -1768,11 +1719,11 @@
 	oris	r5,r5,MSR_VEC@h
 	mtmsrd	r5			/* enable use of VMX now */
 	isync
-	cmpi	0,r3,0
+	cmpdi	0,r3,0
 	beqlr-				/* if no previous owner, done */
 	addi	r3,r3,THREAD		/* want THREAD of task */
 	ld	r5,PT_REGS(r3)
-	cmpi	0,r5,0
+	cmpdi	0,r5,0
 	SAVE_32VRS(0,r4,r3)
 	mfvscr	vr0
 	li	r4,THREAD_VSCR
@@ -1785,8 +1736,8 @@
 1:
 #ifndef CONFIG_SMP
 	li	r5,0
-	LOADBASE(r4,last_task_used_altivec)
-	std	r5,last_task_used_altivec@l(r4)
+	ld	r4,last_task_used_altivec@got(r2)
+	std	r5,0(r4)
 #endif /* CONFIG_SMP */
 	blr
 
@@ -1830,16 +1781,16 @@
 	mtmsrd	r3			/* RI on */
 
 	/* Set up a paca value for this processor. */
-	LOADADDR(r4, paca) 		 /* Get base vaddr of paca array  */
+	LOADADDR(r4, paca) 		 /* Get base vaddr of paca array	*/
 	mulli	r13,r24,PACA_SIZE	 /* Calculate vaddr of right paca */
-	add	r13,r13,r4               /* for this processor.           */
-	mtspr	SPRG3,r13		 /* Save vaddr of paca in SPRG3   */
+	add	r13,r13,r4		/* for this processor.		*/
+	mtspr	SPRG3,r13		 /* Save vaddr of paca in SPRG3	*/
 
-        /* Create a temp kernel stack for use before relocation is on.    */
-        mr      r1,r13
-        addi    r1,r1,PACAGUARD
-        addi    r1,r1,0x1000
-        subi    r1,r1,STACK_FRAME_OVERHEAD
+	/* Create a temp kernel stack for use before relocation is on.	*/
+	mr	r1,r13
+	addi	r1,r1,PACAGUARD
+	addi	r1,r1,0x1000
+	subi	r1,r1,STACK_FRAME_OVERHEAD
 
 	b	.__secondary_start
 
@@ -1853,7 +1804,7 @@
  *   1. Processor number
  *   2. Segment table pointer (virtual address)
  * On entry the following are set:
- *   r1    = stack pointer.  vaddr for iSeries, raddr (temp stack) for pSeries
+ *   r1	= stack pointer.  vaddr for iSeries, raddr (temp stack) for pSeries
  *   r24   = cpu# (in Linux terms)
  *   r13   = paca virtual address
  *   SPRG3 = paca virtual address
@@ -1864,8 +1815,8 @@
 
 	/* set up the TOC (virtual address) */
 	LOADADDR(r2,__toc_start)
-	addi    r2,r2,0x4000
-	addi    r2,r2,0x4000
+	addi	r2,r2,0x4000
+	addi	r2,r2,0x4000
 
 	std	r2,PACATOC(r13)
 	li	r6,0
@@ -1874,23 +1825,22 @@
 #ifndef CONFIG_PPC_ISERIES
 	/* Initialize the page table pointer register. */
 	LOADADDR(r6,_SDR1)
-	ld	r6,0(r6)		/* get the value of _SDR1 */
-	mtspr	SDR1,r6			/* set the htab location  */
+	ld	r6,0(r6)		/* get the value of _SDR1	 */
+	mtspr	SDR1,r6			/* set the htab location	 */
 #endif
-	/* Initialize the first segment table (or SLB) entry                */
-	ld	r3,PACASTABVIRT(r13)    /* get addr of segment table        */
+	/* Initialize the first segment table (or SLB) entry		 */
+	ld	r3,PACASTABVIRT(r13)	/* get addr of segment table	 */
 	bl	.stab_initialize
 
-	/* Initialize the kernel stack.  Just a repeat for iSeries.         */
+	/* Initialize the kernel stack.  Just a repeat for iSeries.	 */
 	LOADADDR(r3,current_set)
-	sldi	r28,r24,3		/* get current_set[cpu#] */
+	sldi	r28,r24,3		/* get current_set[cpu#]	 */
 	ldx	r1,r3,r28
-	addi	r1,r1,THREAD_SIZE
-	subi	r1,r1,STACK_FRAME_OVERHEAD
+	addi	r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
 	std	r1,PACAKSAVE(r13)
 
-	ld	r3,PACASTABREAL(r13)    /* get raddr of segment table       */
-	ori	r4,r3,1			/* turn on valid bit                */
+	ld	r3,PACASTABREAL(r13)	/* get raddr of segment table	 */
+	ori	r4,r3,1			/* turn on valid bit		 */
 
 #ifdef CONFIG_PPC_ISERIES
 	li	r0,-1			/* hypervisor call */
@@ -1900,23 +1850,23 @@
 	sc				/* HvCall_setASR */
 #else
 	/* set the ASR */
-	li	r3,SYSTEMCFG_PHYS_ADDR	/* r3 = ptr to systemcfg  */
-	lwz   	r3,PLATFORM(r3)		/* r3 = platform flags */
+	li	r3,SYSTEMCFG_PHYS_ADDR	/* r3 = ptr to systemcfg	 */
+	lwz	r3,PLATFORM(r3)		/* r3 = platform flags		 */
 	cmpldi 	r3,PLATFORM_PSERIES_LPAR
-	bne   	98f
+	bne	98f
 	mfspr	r3,PVR
 	srwi	r3,r3,16
-	cmpwi	r3,0x37         /* SStar  */
+	cmpwi	r3,0x37			/* SStar  */
 	beq	97f
-	cmpwi	r3,0x36         /* IStar  */
+	cmpwi	r3,0x36			/* IStar  */
 	beq	97f
-	cmpwi	r3,0x34         /* Pulsar */
+	cmpwi	r3,0x34			/* Pulsar */
 	bne	98f
-97:	li	r3,H_SET_ASR    /* hcall = H_SET_ASR */
-	HVSC     		/* Invoking hcall */
+97:	li	r3,H_SET_ASR		/* hcall = H_SET_ASR */
+	HVSC				/* Invoking hcall */
 	b	99f
-98:                             /* !(rpa hypervisor) || !(star)  */
-	mtasr	r4	        /* set the stab location         */
+98:					/* !(rpa hypervisor) || !(star)  */
+	mtasr	r4			/* set the stab location	 */
 99:
 #endif
 	li	r7,0
@@ -1938,22 +1888,22 @@
  */
 _GLOBAL(start_secondary_prolog)
 	li	r3,0
-	std	r3,0(r1)                /* Zero the stack frame pointer     */
+	std	r3,0(r1)		/* Zero the stack frame pointer	*/
 	bl	.start_secondary
 #endif
 
 /*
- * This subroutine clobbers r11, r12 and the LR
+ * This subroutine clobbers r11 and r12
  */
 _GLOBAL(enable_64b_mode)
-	mfmsr   r11                      /* grab the current MSR */
-	li      r12,1
-	rldicr  r12,r12,MSR_SF_LG,(63-MSR_SF_LG)
-	or      r11,r11,r12
-	li      r12,1
-	rldicr  r12,r12,MSR_ISF_LG,(63-MSR_ISF_LG)
-	or      r11,r11,r12
-	mtmsrd  r11
+	mfmsr	r11			/* grab the current MSR */
+	li	r12,1
+	rldicr	r12,r12,MSR_SF_LG,(63-MSR_SF_LG)
+	or	r11,r11,r12
+	li	r12,1
+	rldicr	r12,r12,MSR_ISF_LG,(63-MSR_ISF_LG)
+	or	r11,r11,r12
+	mtmsrd	r11
 	isync
 	blr
 
@@ -1970,30 +1920,30 @@
 	ori	r6,r6,MSR_RI
 	mtmsrd	r6			/* RI on */
 
-	/* setup the systemcfg pointer which is needed by *tab_initialize  */
+	/* setup the systemcfg pointer which is needed by *tab_initialize	*/
 	LOADADDR(r6,systemcfg)
-	sub	r6,r6,r26                /* addr of the variable systemcfg */
+	sub	r6,r6,r26		/* addr of the variable systemcfg */
 	li	r27,SYSTEMCFG_PHYS_ADDR
-	std	r27,0(r6)	 	 /* set the value of systemcfg     */
+	std	r27,0(r6)	 	/* set the value of systemcfg	*/
 
-	/* setup the naca pointer which is needed by *tab_initialize       */
+	/* setup the naca pointer which is needed by *tab_initialize	*/
 	LOADADDR(r6,naca)
-	sub	r6,r6,r26                /* addr of the variable naca      */
+	sub	r6,r6,r26		/* addr of the variable naca	*/
 	li	r27,NACA_PHYS_ADDR
-	std	r27,0(r6)	 	 /* set the value of naca          */
+	std	r27,0(r6)	 	/* set the value of naca	*/
 
 #ifdef CONFIG_HMT
 	/* Start up the second thread on cpu 0 */
 	mfspr	r3,PVR
 	srwi	r3,r3,16
-	cmpwi	r3,0x34                 /* Pulsar  */
+	cmpwi	r3,0x34			/* Pulsar  */
 	beq	90f
-	cmpwi	r3,0x36                 /* Icestar */
+	cmpwi	r3,0x36			/* Icestar */
 	beq	90f
-	cmpwi	r3,0x37                 /* SStar   */
+	cmpwi	r3,0x37			/* SStar   */
 	beq	90f
-	b	91f                     /* HMT not supported */
-90:	li      r3,0
+	b	91f			/* HMT not supported */
+90:	li	r3,0
 	bl	.hmt_start_secondary
 91:
 #endif
@@ -2008,7 +1958,7 @@
 	li	r3,1
 	LOADADDR(r5,__secondary_hold_spinloop)
 	tophys(r4,r5)
-	std     r3,0(r4)
+	std	r3,0(r4)
 #endif
 
 	/* The following gets the stack and TOC set up with the regs */
@@ -2027,8 +1977,8 @@
 
 		/* set up the TOC (physical address) */
 	LOADADDR(r2,__toc_start)
-	addi    r2,r2,0x4000
-	addi    r2,r2,0x4000
+	addi	r2,r2,0x4000
+	addi	r2,r2,0x4000
 	sub	r2,r2,r26
 
 	LOADADDR(r3,cpu_specs)
@@ -2038,44 +1988,44 @@
 	mr	r5,r26
 	bl	.identify_cpu
 
-	/* Get the pointer to the segment table which is used by           */
-	/* stab_initialize                                                 */
+	/* Get the pointer to the segment table which is used by		*/
+	/* stab_initialize						 */
 	LOADADDR(r27, boot_cpuid)
 	sub	r27,r27,r26
 	lwz	r27,0(r27)
 
-	LOADADDR(r24, paca) 		 /* Get base vaddr of paca array  */
-	mulli	r13,r27,PACA_SIZE	 /* Calculate vaddr of right paca */
-	add	r13,r13,r24              /* for this processor.           */
-	sub	r13,r13,r26		/* convert to physical addr         */
+	LOADADDR(r24, paca) 		/* Get base vaddr of paca array	 */
+	mulli	r13,r27,PACA_SIZE	/* Calculate vaddr of right paca */
+	add	r13,r13,r24		/* for this processor.		 */
+	sub	r13,r13,r26		/* convert to physical addr	 */
 
 	mtspr	SPRG3,r13		/* PPPBBB: Temp... -Peter */
 	ld	r3,PACASTABREAL(r13)
-	ori	r4,r3,1			/* turn on valid bit                */
+	ori	r4,r3,1			/* turn on valid bit		 */
 	
 	/* set the ASR */
 	li	r3,SYSTEMCFG_PHYS_ADDR	/* r3 = ptr to systemcfg */
-	lwz   	r3,PLATFORM(r3)		/* r3 = platform flags */
+	lwz	r3,PLATFORM(r3)		/* r3 = platform flags */
 	cmpldi 	r3,PLATFORM_PSERIES_LPAR
-	bne   	98f
+	bne	98f
 	mfspr	r3,PVR
 	srwi	r3,r3,16
-	cmpwi	r3,0x37         /* SStar */
+	cmpwi	r3,0x37			/* SStar */
 	beq	97f
-	cmpwi	r3,0x36         /* IStar  */
+	cmpwi	r3,0x36			/* IStar  */
 	beq	97f
-	cmpwi	r3,0x34         /* Pulsar */
+	cmpwi	r3,0x34			/* Pulsar */
 	bne	98f
-97:	li	r3,H_SET_ASR    /* hcall = H_SET_ASR */
-	HVSC     	        /* Invoking hcall */
-	b     	99f
-98:                             /* !(rpa hypervisor) || !(star) */
-	mtasr	r4	        /* set the stab location         */
+97:	li	r3,H_SET_ASR		/* hcall = H_SET_ASR */
+	HVSC				/* Invoking hcall */
+	b	99f
+98:					/* !(rpa hypervisor) || !(star) */
+	mtasr	r4			/* set the stab location	*/
 99:
 	mfspr	r6,SPRG3
-	ld	r3,PACASTABREAL(r6)     /* restore r3 for stab_initialize */
+	ld	r3,PACASTABREAL(r6)	/* restore r3 for stab_initialize */
 
-	/* Initialize an initial memory mapping and turn on relocation.   */
+	/* Initialize an initial memory mapping and turn on relocation.	*/
 	bl	.stab_initialize
 	bl	.htab_initialize
 
@@ -2083,7 +2033,7 @@
 	lwz	r3,PLATFORM(r3)		/* r3 = platform flags */
 	/* Test if bit 0 is set (LPAR bit) */
 	andi.	r3,r3,0x1
-	bne    98f
+	bne	98f
 	LOADADDR(r6,_SDR1)		/* Only if NOT LPAR */
 	sub	r6,r6,r26
 	ld	r6,0(r6)		/* get the value of _SDR1 */
@@ -2112,8 +2062,8 @@
 
 	/* set up the TOC */
 	LOADADDR(r2,__toc_start)
-	addi    r2,r2,0x4000
-	addi    r2,r2,0x4000
+	addi	r2,r2,0x4000
+	addi	r2,r2,0x4000
 
 	/* Apply the CPUs-specific fixups (nop out sections not relevant
 	 * to this CPU
@@ -2129,14 +2079,14 @@
 	/* setup the naca pointer */
 	LOADADDR(r9,naca)
 	SET_REG_TO_CONST(r8, NACA_VIRT_ADDR)
-	std	r8,0(r9)		/* set the value of the naca ptr  */
+	std	r8,0(r9)		/* set the value of the naca ptr */
 
 	LOADADDR(r26, boot_cpuid)
 	lwz	r26,0(r26)
 
-	LOADADDR(r24, paca) 		 /* Get base vaddr of paca array  */
-	mulli	r13,r26,PACA_SIZE	 /* Calculate vaddr of right paca */
-	add	r13,r13,r24              /* for this processor.           */
+	LOADADDR(r24, paca) 		/* Get base vaddr of paca array  */
+	mulli	r13,r26,PACA_SIZE	/* Calculate vaddr of right paca */
+	add	r13,r13,r24		/* for this processor.		 */
 	mtspr	SPRG3,r13
 
 	/* ptr to current */
@@ -2144,7 +2094,6 @@
 	std	r4,PACACURRENT(r13)
 
 	std	r2,PACATOC(r13)
-	li	r5,0
 	std	r1,PACAKSAVE(r13)
 
 	/* Restore the parms passed in from the bootloader. */
@@ -2176,11 +2125,11 @@
 	LOADADDR(r5, hmt_thread_data)
 	mfspr	r7,PVR
 	srwi	r7,r7,16
-	cmpwi	r7,0x34                 /* Pulsar  */
+	cmpwi	r7,0x34			/* Pulsar  */
 	beq	90f
-	cmpwi	r7,0x36                 /* Icestar */
+	cmpwi	r7,0x36			/* Icestar */
 	beq	91f
-	cmpwi	r7,0x37                 /* SStar   */
+	cmpwi	r7,0x37			/* SStar   */
 	beq	91f
 	b	101f
 90:	mfspr	r6,PIR
@@ -2214,32 +2163,32 @@
 
 104:	addi	r7,r7,4
 	lwzx	r9,r5,r7
-	mr      r24,r9
+	mr	r24,r9
 101:
 #endif
-	mr      r3,r24
-	b       .pseries_secondary_smp_init
+	mr	r3,r24
+	b	.pseries_secondary_smp_init
 
 #ifdef CONFIG_HMT
 _GLOBAL(hmt_start_secondary)
 	LOADADDR(r4,__hmt_secondary_hold)
 	clrldi	r4,r4,4
-	mtspr   NIADORM, r4
-	mfspr   r4, MSRDORM
-	li      r5, -65
-	and     r4, r4, r5
-	mtspr   MSRDORM, r4
+	mtspr	NIADORM, r4
+	mfspr	r4, MSRDORM
+	li	r5, -65
+	and	r4, r4, r5
+	mtspr	MSRDORM, r4
 	lis	r4,0xffef
 	ori	r4,r4,0x7403
 	mtspr	TSC, r4
 	li	r4,0x1f4
 	mtspr	TST, r4
-	mfspr   r4, HID0
-	ori     r4, r4, 0x1
-	mtspr   HID0, r4
-	mfspr   r4, CTRLF
-	oris    r4, r4, 0x40
-	mtspr   CTRLT, r4
+	mfspr	r4, HID0
+	ori	r4, r4, 0x1
+	mtspr	HID0, r4
+	mfspr	r4, CTRLF
+	oris	r4, r4, 0x40
+	mtspr	CTRLT, r4
 	blr
 #endif
 
@@ -2249,7 +2198,7 @@
  * which is page-aligned.
  */
 	.data
-	.align  12
+	.align	12
 	.globl	sdata
 sdata:
 	.globl	empty_zero_page
@@ -2267,7 +2216,7 @@
 /* 1 page segment table per cpu (max 48, cpu0 allocated at STAB0_PHYS_ADDR) */
 	.globl	stab_array
 stab_array:
-        .space	4096 * 48
+	.space	4096 * 48
 	
 /*
  * This space gets a copy of optional info passed to us by the bootstrap
@@ -2275,4 +2224,4 @@
  */
 	.globl	cmd_line
 cmd_line:
-	.space	512	/* COMMAND_LINE_SIZE */
+	.space	COMMAND_LINE_SIZE
--- diff/arch/ppc64/kernel/iSeries_setup.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/iSeries_setup.c	2004-07-01 21:32:33.000000000 +0100
@@ -357,15 +357,14 @@
 	HvCallEvent_dmaToSp(cmd_line, 2 * 64* 1024, 256,
 			HvLpDma_Direction_RemoteToLocal);
 
-	p = q = cmd_line + 255;
-	while (p > cmd_line) {
-		if ((*p == 0) || (*p == ' ') || (*p == '\n'))
-			--p;
-		else
+	p = cmd_line;
+	q = cmd_line + 255;
+	while( p < q ) {
+		if (!*p || *p == '\n')
 			break;
+		++p;
 	}
-	if (p < q)
-		*(p + 1) = 0;
+	*p = 0;
 
         if (strstr(cmd_line, "dprofile=")) {
                 for (q = cmd_line; (p = strstr(q, "dprofile=")) != 0; ) {
--- diff/arch/ppc64/kernel/init_task.c	2004-05-19 22:11:18.000000000 +0100
+++ source/arch/ppc64/kernel/init_task.c	2004-07-01 21:32:33.000000000 +0100
@@ -4,6 +4,7 @@
 #include <linux/init.h>
 #include <linux/init_task.h>
 #include <linux/fs.h>
+#include <linux/mqueue.h>
 #include <asm/uaccess.h>
 
 static struct fs_struct init_fs = INIT_FS;
--- diff/arch/ppc64/kernel/irq.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/irq.c	2004-07-01 21:32:33.000000000 +0100
@@ -206,7 +206,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->dev_id = dev_id;
 	action->next = NULL;
@@ -738,7 +738,6 @@
 	irq_desc_t *desc = get_irq_desc(irq);
 	int ret;
 	cpumask_t new_value, tmp;
-	cpumask_t allcpus = CPU_MASK_ALL;
 
 	if (!desc->handler->set_affinity)
 		return -EIO;
@@ -753,7 +752,7 @@
 	 * NR_CPUS == 32 and cpumask is a long), so we mask it here to
 	 * be consistent.
 	 */
-	cpus_and(new_value, new_value, allcpus);
+	cpus_and(new_value, new_value, CPU_MASK_ALL);
 
 	/*
 	 * Grab lock here so cpu_online_map can't change, and also
@@ -808,11 +807,10 @@
 	{
 		unsigned i;
 		for (i=0; i<NR_CPUS; ++i) {
-			if ( paca[i].prof_buffer && (new_value & 1) )
+			if ( paca[i].prof_buffer && cpu_isset(i, new_value) )
 				paca[i].prof_enabled = 1;
 			else
 				paca[i].prof_enabled = 0;
-			new_value >>= 1;
 		}
 	}
 #endif
--- diff/arch/ppc64/kernel/mf_proc.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/mf_proc.c	2004-07-01 21:32:33.000000000 +0100
@@ -25,33 +25,26 @@
 {
 	int len = count;
 	char *p;
-    
+
+	if (off) {
+		*eof = 1;
+		return 0;
+	}
+
 	len = mf_getCmdLine(page, &len, (u64)data);
    
-	p = page + len - 1;
-	while (p > page) {
-		if ((*p == 0) || (*p == ' '))
-			--p;
-		else
+	p = page;
+	while (len < (count - 1)) {
+		if (!*p || *p == '\n')
 			break;
+		p++;
+		len++;
 	}
-	if (*p != '\n') {
-		++p;
-		*p = '\n';
-	}
-	++p;
+	*p = '\n';
+	p++;
 	*p = 0;
-	len = p - page;
-    
-	len -= off;			
-	if (len < count) {		
-		*eof = 1;		
-		if (len <= 0)		
-			return 0;	
-	} else				
-		len = count;		
-	*start = page + off;		
-	return len;			
+
+	return p - page;
 }
 
 #if 0
--- diff/arch/ppc64/kernel/misc.S	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/misc.S	2004-07-01 21:32:34.000000000 +0100
@@ -85,16 +85,17 @@
 	cmpw	0,r3,r5
 	beqlr
 	/* are we enabling interrupts? */
-	cmpi	0,r3,0
+	cmpdi	0,r3,0
 	stb	r3,PACAPROCENABLED(r13)
 	beqlr
 	/* Check pending interrupts */
 	/*   A decrementer, IPI or PMC interrupt may have occurred
 	 *   while we were in the hypervisor (which enables) */
-	CHECKANYINT(r4,r5)
+	ld	r4,PACALPPACA+LPPACAANYINT(r13)
+	cmpdi	r4,0
 	beqlr
 
-	/* 
+	/*
 	 * Handle pending interrupts in interrupt context
 	 */
 	li	r0,0x5555
@@ -608,7 +609,7 @@
 _GLOBAL(sys_call_table32)
 	.llong .sys_restart_syscall	/* 0 */
 	.llong .sys_exit
-	.llong .sys_fork
+	.llong .ppc_fork
 	.llong .sys_read
 	.llong .sys_write
 	.llong .sys32_open		/* 5 */
@@ -678,7 +679,7 @@
 	.llong .sys32_ssetmask
 	.llong .sys_setreuid	        /* 70 */
 	.llong .sys_setregid
-	.llong .sys32_sigsuspend
+	.llong .ppc32_sigsuspend
 	.llong .compat_sys_sigpending
 	.llong .sys32_sethostname
 	.llong .compat_sys_setrlimit	        /* 75 */
@@ -726,7 +727,7 @@
 	.llong .sys32_ipc
 	.llong .sys_fsync
 	.llong .ppc32_sigreturn
-	.llong .sys_clone		/* 120 */
+	.llong .ppc_clone		/* 120 */
 	.llong .sys32_setdomainname
 	.llong .ppc64_newuname
 	.llong .sys_ni_syscall		/* old modify_ldt syscall */
@@ -784,7 +785,7 @@
 	.llong .sys32_rt_sigpending     /* 175 */
 	.llong .sys32_rt_sigtimedwait
 	.llong .sys32_rt_sigqueueinfo
-	.llong .sys32_rt_sigsuspend
+	.llong .ppc32_rt_sigsuspend
 	.llong .sys32_pread64
 	.llong .sys32_pwrite64	        /* 180 */
 	.llong .sys_chown
@@ -795,7 +796,7 @@
 	.llong .sys32_sendfile
 	.llong .sys_ni_syscall		/* reserved for streams1 */
 	.llong .sys_ni_syscall		/* reserved for streams2 */
-	.llong .sys_vfork
+	.llong .ppc_vfork
 	.llong .compat_sys_getrlimit	        /* 190 */
 	.llong .sys32_readahead
 	.llong .sys32_mmap2
@@ -880,7 +881,7 @@
 _GLOBAL(sys_call_table)
 	.llong .sys_restart_syscall	/* 0 */
 	.llong .sys_exit
-	.llong .sys_fork
+	.llong .ppc_fork
 	.llong .sys_read
 	.llong .sys_write
 	.llong .sys_open		/* 5 */
@@ -998,7 +999,7 @@
 	.llong .sys_ipc
 	.llong .sys_fsync
 	.llong .sys_ni_syscall
-	.llong .sys_clone		/* 120 */
+	.llong .ppc_clone		/* 120 */
 	.llong .sys_setdomainname
 	.llong .ppc64_newuname
 	.llong .sys_ni_syscall		/* old modify_ldt syscall */
@@ -1056,7 +1057,7 @@
 	.llong .sys_rt_sigpending	/* 175 */
 	.llong .sys_rt_sigtimedwait
 	.llong .sys_rt_sigqueueinfo
-	.llong .sys_rt_sigsuspend
+	.llong .ppc64_rt_sigsuspend
 	.llong .sys_pread64
 	.llong .sys_pwrite64	        /* 180 */
 	.llong .sys_chown
@@ -1067,7 +1068,7 @@
 	.llong .sys_sendfile64
 	.llong .sys_ni_syscall		/* reserved for streams1 */
 	.llong .sys_ni_syscall		/* reserved for streams2 */
-	.llong .sys_vfork
+	.llong .ppc_vfork
 	.llong .sys_getrlimit	        /* 190 */
 	.llong .sys_readahead
 	.llong .sys_ni_syscall		/* 32bit only mmap2 */
--- diff/arch/ppc64/kernel/open_pic.c	2004-05-19 22:11:18.000000000 +0100
+++ source/arch/ppc64/kernel/open_pic.c	2004-07-01 21:32:34.000000000 +0100
@@ -591,7 +591,7 @@
 void openpic_init_processor(u_int cpumask)
 {
 	openpic_write(&OpenPIC->Global.Processor_Initialization,
-		      physmask(cpumask & cpus_coerce(cpu_online_map)));
+		      physmask(cpumask & cpus_addr(cpu_online_map)[0]));
 }
 
 #ifdef CONFIG_SMP
@@ -625,7 +625,7 @@
 	CHECK_THIS_CPU;
 	check_arg_ipi(ipi);
 	openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi),
-		      physmask(cpumask & cpus_coerce(cpu_online_map)));
+		      physmask(cpumask & cpus_addr(cpu_online_map)[0]));
 }
 
 void openpic_request_IPIs(void)
@@ -711,7 +711,7 @@
 {
 	check_arg_timer(timer);
 	openpic_write(&OpenPIC->Global.Timer[timer].Destination,
-		      physmask(cpumask & cpus_coerce(cpu_online_map)));
+		      physmask(cpumask & cpus_addr(cpu_online_map)[0]));
 }
 
 
@@ -844,7 +844,7 @@
 	cpumask_t tmp;
 
 	cpus_and(tmp, cpumask, cpu_online_map);
-	openpic_mapirq(irq_nr - open_pic_irq_offset, physmask(cpus_coerce(tmp)));
+	openpic_mapirq(irq_nr - open_pic_irq_offset, physmask(cpus_addr(tmp)[0]));
 }
 
 #ifdef CONFIG_SMP
--- diff/arch/ppc64/kernel/pSeries_nvram.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/pSeries_nvram.c	2004-07-01 21:32:34.000000000 +0100
@@ -37,7 +37,8 @@
 static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index)
 {
 	unsigned int i;
-	unsigned long len, done;
+	unsigned long len;
+	int done;
 	unsigned long flags;
 	char *p = buf;
 
@@ -80,7 +81,8 @@
 static ssize_t pSeries_nvram_write(char *buf, size_t count, loff_t *index)
 {
 	unsigned int i;
-	unsigned long len, done;
+	unsigned long len;
+	int done;
 	unsigned long flags;
 	const char *p = buf;
 
--- diff/arch/ppc64/kernel/pSeries_pci.c	2004-05-19 22:11:18.000000000 +0100
+++ source/arch/ppc64/kernel/pSeries_pci.c	2004-07-01 21:32:34.000000000 +0100
@@ -62,7 +62,7 @@
 
 static int rtas_read_config(struct device_node *dn, int where, int size, u32 *val)
 {
-	unsigned long returnval = ~0L;
+	int returnval = -1;
 	unsigned long buid, addr;
 	int ret;
 
@@ -72,7 +72,8 @@
 	addr = (dn->busno << 16) | (dn->devfn << 8) | where;
 	buid = dn->phb->buid;
 	if (buid) {
-		ret = rtas_call(ibm_read_pci_config, 4, 2, &returnval, addr, buid >> 32, buid & 0xffffffff, size);
+		ret = rtas_call(ibm_read_pci_config, 4, 2, &returnval,
+				addr, buid >> 32, buid & 0xffffffff, size);
 	} else {
 		ret = rtas_call(read_pci_config, 2, 2, &returnval, addr, size);
 	}
--- diff/arch/ppc64/kernel/pacaData.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/pacaData.c	2004-07-01 21:32:34.000000000 +0100
@@ -62,8 +62,6 @@
 		.xDesc = 0xd397d9e2,	/* "LpRS" */			    \
 		.xSize = sizeof(struct ItLpRegSave)			    \
 	},								    \
-	.exception_sp =							    \
-		(&paca[number].exception_stack[0]) - EXC_FRAME_SIZE,	    \
 }
 
 struct paca_struct paca[] __page_aligned = {
--- diff/arch/ppc64/kernel/ppc_ksyms.c	2004-05-19 22:11:18.000000000 +0100
+++ source/arch/ppc64/kernel/ppc_ksyms.c	2004-07-01 21:32:34.000000000 +0100
@@ -47,10 +47,7 @@
 
 extern int do_signal(sigset_t *, struct pt_regs *);
 
-int abs(int);
-
 EXPORT_SYMBOL(do_signal);
-EXPORT_SYMBOL(sys_ioctl);
 
 EXPORT_SYMBOL(isa_io_base);
 EXPORT_SYMBOL(pci_io_base);
@@ -158,8 +155,6 @@
 EXPORT_SYMBOL_NOVERS(memcmp);
 EXPORT_SYMBOL_NOVERS(memchr);
 
-EXPORT_SYMBOL(abs);
-
 EXPORT_SYMBOL(timer_interrupt);
 EXPORT_SYMBOL(irq_desc);
 EXPORT_SYMBOL(get_wchan);
--- diff/arch/ppc64/kernel/process.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/process.c	2004-07-01 21:32:34.000000000 +0100
@@ -65,8 +65,43 @@
 	.page_table_lock = SPIN_LOCK_UNLOCKED,
 };
 
+/*
+ * Make sure the floating-point register state in the
+ * the thread_struct is up to date for task tsk.
+ */
+void flush_fp_to_thread(struct task_struct *tsk)
+{
+	if (tsk->thread.regs) {
+		/*
+		 * We need to disable preemption here because if we didn't,
+		 * another process could get scheduled after the regs->msr
+		 * test but before we have finished saving the FP registers
+		 * to the thread_struct.  That process could take over the
+		 * FPU, and then when we get scheduled again we would store
+		 * bogus values for the remaining FP registers.
+		 */
+		preempt_disable();
+		if (tsk->thread.regs->msr & MSR_FP) {
+#ifdef CONFIG_SMP
+			/*
+			 * This should only ever be called for current or
+			 * for a stopped child process.  Since we save away
+			 * the FP register state on context switch on SMP,
+			 * there is something wrong if a stopped child appears
+			 * to still have its FP state in the CPU registers.
+			 */
+			BUG_ON(tsk != current);
+#endif
+			giveup_fpu(current);
+		}
+		preempt_enable();
+	}
+}
+
 void enable_kernel_fp(void)
 {
+	WARN_ON(preemptible());
+
 #ifdef CONFIG_SMP
 	if (current->thread.regs && (current->thread.regs->msr & MSR_FP))
 		giveup_fpu(current);
@@ -80,12 +115,9 @@
 
 int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs)
 {
-	struct pt_regs *regs = tsk->thread.regs;
-
-	if (!regs)
+	if (!tsk->thread.regs)
 		return 0;
-	if (tsk == current && (regs->msr & MSR_FP))
-		giveup_fpu(current);
+	flush_fp_to_thread(current);
 
 	memcpy(fpregs, &tsk->thread.fpr[0], sizeof(*fpregs));
 
@@ -96,6 +128,8 @@
 
 void enable_kernel_altivec(void)
 {
+	WARN_ON(preemptible());
+
 #ifdef CONFIG_SMP
 	if (current->thread.regs && (current->thread.regs->msr & MSR_VEC))
 		giveup_altivec(current);
@@ -107,10 +141,29 @@
 }
 EXPORT_SYMBOL(enable_kernel_altivec);
 
+/*
+ * Make sure the VMX/Altivec register state in the
+ * the thread_struct is up to date for task tsk.
+ */
+void flush_altivec_to_thread(struct task_struct *tsk)
+{
+#ifdef CONFIG_ALTIVEC
+	if (tsk->thread.regs) {
+		preempt_disable();
+		if (tsk->thread.regs->msr & MSR_VEC) {
+#ifdef CONFIG_SMP
+			BUG_ON(tsk != current);
+#endif
+			giveup_altivec(current);
+		}
+		preempt_enable();
+	}
+#endif
+}
+
 int dump_task_altivec(struct pt_regs *regs, elf_vrregset_t *vrregs)
 {
-	if (regs->msr & MSR_VEC)
-		giveup_altivec(current);
+	flush_altivec_to_thread(current);
 	memcpy(vrregs, &current->thread.vr[0], sizeof(*vrregs));
 	return 1;
 }
@@ -166,6 +219,7 @@
 void show_regs(struct pt_regs * regs)
 {
 	int i;
+	unsigned long trap;
 
 	printk("NIP: %016lX XER: %016lX LR: %016lX\n",
 	       regs->nip, regs->xer, regs->link);
@@ -176,7 +230,8 @@
 	       regs->msr & MSR_FP ? 1 : 0,regs->msr&MSR_ME ? 1 : 0,
 	       regs->msr&MSR_IR ? 1 : 0,
 	       regs->msr&MSR_DR ? 1 : 0);
-	if (regs->trap == 0x300 || regs->trap == 0x380 || regs->trap == 0x600)
+	trap = TRAP(regs);
+	if (trap == 0x300 || trap == 0x380 || trap == 0x600)
 		printk("DAR: %016lx, DSISR: %016lx\n", regs->dar, regs->dsisr);
 	printk("TASK: %p[%d] '%s' THREAD: %p",
 	       current, current->pid, current->comm, current->thread_info);
@@ -191,6 +246,8 @@
 		}
 
 		printk("%016lX ", regs->gpr[i]);
+		if (i == 13 && !FULL_REGS(regs))
+			break;
 	}
 	printk("\n");
 	/*
@@ -245,16 +302,8 @@
  */
 void prepare_to_copy(struct task_struct *tsk)
 {
-	struct pt_regs *regs = tsk->thread.regs;
-
-	if (regs == NULL)
-		return;
-	if (regs->msr & MSR_FP)
-		giveup_fpu(current);
-#ifdef CONFIG_ALTIVEC
-	if (regs->msr & MSR_VEC)
-		giveup_altivec(current);
-#endif /* CONFIG_ALTIVEC */
+	flush_fp_to_thread(current);
+	flush_altivec_to_thread(current);
 }
 
 /*
@@ -439,12 +488,8 @@
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
 		goto out;
-	if (regs->msr & MSR_FP)
-		giveup_fpu(current);
-#ifdef CONFIG_ALTIVEC
-	if (regs->msr & MSR_VEC)
-		giveup_altivec(current);
-#endif /* CONFIG_ALTIVEC */
+	flush_fp_to_thread(current);
+	flush_altivec_to_thread(current);
 	error = do_execve(filename, (char __user * __user *) a1,
 				    (char __user * __user *) a2, regs);
   
--- diff/arch/ppc64/kernel/prom.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/prom.c	2004-07-01 21:32:34.000000000 +0100
@@ -15,9 +15,7 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#if 0
-#define DEBUG_PROM
-#endif
+#undef DEBUG_PROM
 
 #include <stdarg.h>
 #include <linux/config.h>
@@ -91,15 +89,17 @@
  */
 
 
-#define PROM_BUG() do { \
-        prom_print(RELOC("kernel BUG at ")); \
-        prom_print(RELOC(__FILE__)); \
-        prom_print(RELOC(":")); \
-        prom_print_hex(__LINE__); \
-        prom_print(RELOC("!\n")); \
-        __asm__ __volatile__(".long " BUG_ILLEGAL_INSTR); \
+#define PROM_BUG() do {						\
+        prom_printf("kernel BUG at %s line 0x%x!\n",		\
+		    RELOC(__FILE__), __LINE__);			\
+        __asm__ __volatile__(".long " BUG_ILLEGAL_INSTR);	\
 } while (0)
 
+#ifdef DEBUG_PROM
+#define prom_debug(x...)	prom_printf(x)
+#else
+#define prom_debug(x...)
+#endif
 
 
 struct pci_reg_property {
@@ -178,29 +178,36 @@
 
 char testString[] = "LINUX\n"; 
 
+/*
+ * This are used in calls to call_prom.  The 4th and following
+ * arguments to call_prom should be 32-bit values.  64 bit values
+ * are truncated to 32 bits (and fortunately don't get interpreted
+ * as two arguments).
+ */
+#define ADDR(x)		(u32) ((unsigned long)(x) - offset)
 
 /* This is the one and *ONLY* place where we actually call open
  * firmware from, since we need to make sure we're running in 32b
  * mode when we do.  We switch back to 64b mode upon return.
  */
 
-#define PROM_ERROR	(0x00000000fffffffful)
+#define PROM_ERROR	(-1)
 
-static unsigned long __init call_prom(const char *service, int nargs, int nret, ...)
+static int __init call_prom(const char *service, int nargs, int nret, ...)
 {
 	int i;
 	unsigned long offset = reloc_offset();
 	struct prom_t *_prom = PTRRELOC(&prom);
 	va_list list;
         
-	_prom->args.service = (u32)LONG_LSW(service);
+	_prom->args.service = ADDR(service);
 	_prom->args.nargs = nargs;
 	_prom->args.nret = nret;
         _prom->args.rets = (prom_arg_t *)&(_prom->args.args[nargs]);
 
         va_start(list, nret);
-	for (i=0; i < nargs ;i++)
-		_prom->args.args[i] = (prom_arg_t)LONG_LSW(va_arg(list, unsigned long));
+	for (i=0; i < nargs; i++)
+		_prom->args.args[i] = va_arg(list, prom_arg_t);
         va_end(list);
 
 	for (i=0; i < nret ;i++)
@@ -208,7 +215,7 @@
 
 	enter_prom(&_prom->args);
 
-	return (unsigned long)((nret > 0) ? _prom->args.rets[0] : 0);
+	return (nret > 0)? _prom->args.rets[0]: 0;
 }
 
 
@@ -225,21 +232,21 @@
 		for (q = p; *q != 0 && *q != '\n'; ++q)
 			;
 		if (q > p)
-			call_prom(RELOC("write"), 3, 1, _prom->stdout,
-				  p, q - p);
-		if (*q != 0) {
-			++q;
-			call_prom(RELOC("write"), 3, 1, _prom->stdout,
-				  RELOC("\r\n"), 2);
-		}
+			call_prom("write", 3, 1, _prom->stdout, p, q - p);
+		if (*q == 0)
+			break;
+		++q;
+		call_prom("write", 3, 1, _prom->stdout, ADDR("\r\n"), 2);
 	}
 }
 
 
 static void __init prom_print_hex(unsigned long val)
 {
+	unsigned long offset = reloc_offset();
         int i, nibbles = sizeof(val)*2;
         char buf[sizeof(val)*2+1];
+	struct prom_t *_prom = PTRRELOC(&prom);
 
         for (i = nibbles-1;  i >= 0;  i--) {
                 buf[i] = (val & 0xf) + '0';
@@ -248,24 +255,58 @@
                 val >>= 4;
         }
         buf[nibbles] = '\0';
-	prom_print(buf);
+	call_prom("write", 3, 1, _prom->stdout, buf, nibbles);
 }
 
 
-static void __init prom_print_nl(void)
+static void __init prom_printf(const char *format, ...)
 {
 	unsigned long offset = reloc_offset();
-	prom_print(RELOC("\n"));
+	const char *p, *q, *s;
+	va_list args;
+	unsigned long v;
+	struct prom_t *_prom = PTRRELOC(&prom);
+
+	va_start(args, format);
+	for (p = PTRRELOC(format); *p != 0; p = q) {
+		for (q = p; *q != 0 && *q != '\n' && *q != '%'; ++q)
+			;
+		if (q > p)
+			call_prom("write", 3, 1, _prom->stdout, p, q - p);
+		if (*q == 0)
+			break;
+		if (*q == '\n') {
+			++q;
+			call_prom("write", 3, 1, _prom->stdout,
+				  ADDR("\r\n"), 2);
+			continue;
+		}
+		++q;
+		if (*q == 0)
+			break;
+		switch (*q) {
+		case 's':
+			++q;
+			s = va_arg(args, const char *);
+			prom_print(s);
+			break;
+		case 'x':
+			++q;
+			v = va_arg(args, unsigned long);
+			prom_print_hex(v);
+			break;
+		}
+	}
 }
 
 
-static void __init prom_panic(const char *reason)
+static void __init __attribute__((noreturn)) prom_panic(const char *reason)
 {
 	unsigned long offset = reloc_offset();
 
-	prom_print(reason);
+	prom_print(PTRRELOC(reason));
 	/* ToDo: should put up an SRC here */
-	call_prom(RELOC("exit"), 0, 0);
+	call_prom("exit", 0, 0);
 
 	for (;;)			/* should never get here */
 		;
@@ -275,21 +316,28 @@
 static int __init prom_next_node(phandle *nodep)
 {
 	phandle node;
-	unsigned long offset = reloc_offset();
 
 	if ((node = *nodep) != 0
-	    && (*nodep = call_prom(RELOC("child"), 1, 1, node)) != 0)
+	    && (*nodep = call_prom("child", 1, 1, node)) != 0)
 		return 1;
-	if ((*nodep = call_prom(RELOC("peer"), 1, 1, node)) != 0)
+	if ((*nodep = call_prom("peer", 1, 1, node)) != 0)
 		return 1;
 	for (;;) {
-		if ((node = call_prom(RELOC("parent"), 1, 1, node)) == 0)
+		if ((node = call_prom("parent", 1, 1, node)) == 0)
 			return 0;
-		if ((*nodep = call_prom(RELOC("peer"), 1, 1, node)) != 0)
+		if ((*nodep = call_prom("peer", 1, 1, node)) != 0)
 			return 1;
 	}
 }
 
+static int __init prom_getprop(phandle node, const char *pname,
+			       void *value, size_t valuelen)
+{
+	unsigned long offset = reloc_offset();
+
+	return call_prom("getprop", 4, 1, node, ADDR(pname),
+			 (u32)(unsigned long) value, (u32) valuelen);
+}
 
 static void __init prom_initialize_naca(void)
 {
@@ -302,16 +350,13 @@
         struct systemcfg *_systemcfg = RELOC(systemcfg);
 
 	/* NOTE: _naca->debug_switch is already initialized. */
-#ifdef DEBUG_PROM
-	prom_print(RELOC("prom_initialize_naca: start...\n"));
-#endif
+	prom_debug("prom_initialize_naca: start...\n");
 
 	_naca->pftSize = 0;	/* ilog2 of htab size.  computed below. */
 
         for (node = 0; prom_next_node(&node); ) {
                 type[0] = 0;
-                call_prom(RELOC("getprop"), 4, 1, node, RELOC("device_type"),
-                          type, sizeof(type));
+		prom_getprop(node, "device_type", type, sizeof(type));
 
                 if (!strcmp(type, RELOC("cpu"))) {
 			num_cpus += 1;
@@ -321,37 +366,30 @@
 			 */
 			if ( num_cpus == 1 ) {
 				u32 size, lsize;
+				const char *dc, *ic;
 
-				call_prom(RELOC("getprop"), 4, 1, node,
-					  RELOC("d-cache-size"),
-					  &size, sizeof(size));
-
-				if (_systemcfg->platform == PLATFORM_POWERMAC)
-					call_prom(RELOC("getprop"), 4, 1, node,
-						  RELOC("d-cache-block-size"),
-						  &lsize, sizeof(lsize));
-				else
-					call_prom(RELOC("getprop"), 4, 1, node,
-						  RELOC("d-cache-line-size"),
-						  &lsize, sizeof(lsize));
+				if (_systemcfg->platform == PLATFORM_POWERMAC){
+					dc = "d-cache-block-size";
+					ic = "i-cache-block-size";
+				} else {
+					dc = "d-cache-line-size";
+					ic = "i-cache-line-size";
+				}
+
+				prom_getprop(node, "d-cache-size",
+					     &size, sizeof(size));
+
+				prom_getprop(node, dc, &lsize, sizeof(lsize));
 
 				_systemcfg->dCacheL1Size = size;
 				_systemcfg->dCacheL1LineSize = lsize;
 				_naca->dCacheL1LogLineSize = __ilog2(lsize);
 				_naca->dCacheL1LinesPerPage = PAGE_SIZE/lsize;
 
-				call_prom(RELOC("getprop"), 4, 1, node,
-					  RELOC("i-cache-size"),
-					  &size, sizeof(size));
-
-				if (_systemcfg->platform == PLATFORM_POWERMAC)
-					call_prom(RELOC("getprop"), 4, 1, node,
-						  RELOC("i-cache-block-size"),
-						  &lsize, sizeof(lsize));
-				else
-					call_prom(RELOC("getprop"), 4, 1, node,
-						  RELOC("i-cache-line-size"),
-						  &lsize, sizeof(lsize));
+				prom_getprop(node, "i-cache-size",
+					     &size, sizeof(size));
+
+				prom_getprop(node, ic, &lsize, sizeof(lsize));
 
 				_systemcfg->iCacheL1Size = size;
 				_systemcfg->iCacheL1LineSize = lsize;
@@ -360,9 +398,8 @@
 
 				if (_systemcfg->platform == PLATFORM_PSERIES_LPAR) {
 					u32 pft_size[2];
-					call_prom(RELOC("getprop"), 4, 1, node, 
-						  RELOC("ibm,pft-size"),
-						  &pft_size, sizeof(pft_size));
+					prom_getprop(node, "ibm,pft-size",
+						&pft_size, sizeof(pft_size));
 				/* pft_size[0] is the NUMA CEC cookie */
 					_naca->pftSize = pft_size[1];
 				}
@@ -375,24 +412,21 @@
 			if (_systemcfg->platform == PLATFORM_POWERMAC)
 				continue;
 			type[0] = 0;
-			call_prom(RELOC("getprop"), 4, 1, node,
-				  RELOC("ibm,aix-loc"), type, sizeof(type));
+			prom_getprop(node, "ibm,aix-loc", type, sizeof(type));
 
 			if (strcmp(type, RELOC("S1")))
 				continue;
 
-			call_prom(RELOC("getprop"), 4, 1, node, RELOC("reg"),
-				  &reg, sizeof(reg));
+			prom_getprop(node, "reg", &reg, sizeof(reg));
 
-			isa = call_prom(RELOC("parent"), 1, 1, node);
+			isa = call_prom("parent", 1, 1, node);
 			if (!isa)
 				PROM_BUG();
-			pci = call_prom(RELOC("parent"), 1, 1, isa);
+			pci = call_prom("parent", 1, 1, isa);
 			if (!pci)
 				PROM_BUG();
 
-			call_prom(RELOC("getprop"), 4, 1, pci, RELOC("ranges"),
-				  &ranges, sizeof(ranges));
+			prom_getprop(pci, "ranges", &ranges, sizeof(ranges));
 
 			if ( _prom->encode_phys_size == 32 )
 				_naca->serialPortAddr = ranges.pci32.phys+reg.address;
@@ -410,25 +444,23 @@
 		_naca->interrupt_controller = IC_INVALID;
 		for (node = 0; prom_next_node(&node); ) {
 			type[0] = 0;
-			call_prom(RELOC("getprop"), 4, 1, node, RELOC("name"),
-				  type, sizeof(type));
+			prom_getprop(node, "name", type, sizeof(type));
 			if (strcmp(type, RELOC("interrupt-controller")))
 				continue;
-			call_prom(RELOC("getprop"), 4, 1, node, RELOC("compatible"),
-				  type, sizeof(type));
+			prom_getprop(node, "compatible", type, sizeof(type));
 			if (strstr(type, RELOC("open-pic")))
 				_naca->interrupt_controller = IC_OPEN_PIC;
 			else if (strstr(type, RELOC("ppc-xicp")))
 				_naca->interrupt_controller = IC_PPC_XIC;
 			else
-				prom_print(RELOC("prom: failed to recognize"
-						 " interrupt-controller\n"));
+				prom_printf("prom: failed to recognize"
+					    " interrupt-controller\n");
 			break;
 		}
 	}
 
 	if (_naca->interrupt_controller == IC_INVALID) {
-		prom_print(RELOC("prom: failed to find interrupt-controller\n"));
+		prom_printf("prom: failed to find interrupt-controller\n");
 		PROM_BUG();
 	}
 
@@ -454,7 +486,7 @@
 	}
 
 	if (_naca->pftSize == 0) {
-		prom_print(RELOC("prom: failed to compute pftSize!\n"));
+		prom_printf("prom: failed to compute pftSize!\n");
 		PROM_BUG();
 	}
 
@@ -464,41 +496,23 @@
 	_systemcfg->version.minor = SYSTEMCFG_MINOR;
 	_systemcfg->processor = _get_PVR();
 
-#ifdef DEBUG_PROM
-        prom_print(RELOC("systemcfg->processorCount       = 0x"));
-        prom_print_hex(_systemcfg->processorCount);
-        prom_print_nl();
-
-        prom_print(RELOC("systemcfg->physicalMemorySize   = 0x"));
-        prom_print_hex(_systemcfg->physicalMemorySize);
-        prom_print_nl();
-
-        prom_print(RELOC("naca->pftSize                   = 0x"));
-        prom_print_hex(_naca->pftSize);
-        prom_print_nl();
-
-        prom_print(RELOC("systemcfg->dCacheL1LineSize     = 0x"));
-        prom_print_hex(_systemcfg->dCacheL1LineSize);
-        prom_print_nl();
-
-        prom_print(RELOC("systemcfg->iCacheL1LineSize     = 0x"));
-        prom_print_hex(_systemcfg->iCacheL1LineSize);
-        prom_print_nl();
-
-        prom_print(RELOC("naca->serialPortAddr            = 0x"));
-        prom_print_hex(_naca->serialPortAddr);
-        prom_print_nl();
-
-        prom_print(RELOC("naca->interrupt_controller      = 0x"));
-        prom_print_hex(_naca->interrupt_controller);
-        prom_print_nl();
-
-        prom_print(RELOC("systemcfg->platform             = 0x"));
-        prom_print_hex(_systemcfg->platform);
-        prom_print_nl();
-
-	prom_print(RELOC("prom_initialize_naca: end...\n"));
-#endif
+        prom_debug("systemcfg->processorCount       = 0x%x\n",
+		   _systemcfg->processorCount);
+        prom_debug("systemcfg->physicalMemorySize   = 0x%x\n",
+		   _systemcfg->physicalMemorySize);
+        prom_debug("naca->pftSize                   = 0x%x\n",
+		   _naca->pftSize);
+        prom_debug("systemcfg->dCacheL1LineSize     = 0x%x\n",
+		   _systemcfg->dCacheL1LineSize);
+        prom_debug("systemcfg->iCacheL1LineSize     = 0x%x\n",
+		   _systemcfg->iCacheL1LineSize);
+        prom_debug("naca->serialPortAddr            = 0x%x\n",
+		   _naca->serialPortAddr);
+        prom_debug("naca->interrupt_controller      = 0x%x\n",
+		   _naca->interrupt_controller);
+        prom_debug("systemcfg->platform             = 0x%x\n",
+		   _systemcfg->platform);
+	prom_debug("prom_initialize_naca: end...\n");
 }
 
 
@@ -512,9 +526,7 @@
 
 	opt = strstr(RELOC(cmd_line), RELOC("iommu="));
 	if (opt) {
-		prom_print(RELOC("opt is:"));
-		prom_print(opt);
-		prom_print(RELOC("\n"));
+		prom_printf("opt is:%s\n", opt);
 		opt += 6;
 		while (*opt && *opt == ' ')
 			opt++;
@@ -527,7 +539,7 @@
 #ifndef CONFIG_PMAC_DART
 	if (_systemcfg->platform == PLATFORM_POWERMAC) {
 		RELOC(ppc64_iommu_off) = 1;
-		prom_print(RELOC("DART disabled on PowerMac !\n"));
+		prom_printf("DART disabled on PowerMac !\n");
 	}
 #endif
 }
@@ -539,46 +551,31 @@
         unsigned long offset = reloc_offset();
 	struct lmb *_lmb  = PTRRELOC(&lmb);
 
-        prom_print(RELOC("\nprom_dump_lmb:\n"));
-        prom_print(RELOC("    memory.cnt                  = 0x"));
-        prom_print_hex(_lmb->memory.cnt);
-	prom_print_nl();
-        prom_print(RELOC("    memory.size                 = 0x"));
-        prom_print_hex(_lmb->memory.size);
-	prom_print_nl();
+        prom_printf("\nprom_dump_lmb:\n");
+        prom_printf("    memory.cnt                  = 0x%x\n",
+		    _lmb->memory.cnt);
+        prom_printf("    memory.size                 = 0x%x\n",
+		    _lmb->memory.size);
         for (i=0; i < _lmb->memory.cnt ;i++) {
-                prom_print(RELOC("    memory.region[0x"));
-		prom_print_hex(i);
-		prom_print(RELOC("].base       = 0x"));
-                prom_print_hex(_lmb->memory.region[i].base);
-		prom_print_nl();
-                prom_print(RELOC("                      .physbase = 0x"));
-                prom_print_hex(_lmb->memory.region[i].physbase);
-		prom_print_nl();
-                prom_print(RELOC("                      .size     = 0x"));
-                prom_print_hex(_lmb->memory.region[i].size);
-		prom_print_nl();
+                prom_printf("    memory.region[0x%x].base       = 0x%x\n",
+			    i, _lmb->memory.region[i].base);
+                prom_printf("                      .physbase = 0x%x\n",
+			    _lmb->memory.region[i].physbase);
+                prom_printf("                      .size     = 0x%x\n",
+			    _lmb->memory.region[i].size);
         }
 
-	prom_print_nl();
-        prom_print(RELOC("    reserved.cnt                  = 0x"));
-        prom_print_hex(_lmb->reserved.cnt);
-	prom_print_nl();
-        prom_print(RELOC("    reserved.size                 = 0x"));
-        prom_print_hex(_lmb->reserved.size);
-	prom_print_nl();
+        prom_printf("\n    reserved.cnt                  = 0x%x\n",
+		    _lmb->reserved.cnt);
+        prom_printf("    reserved.size                 = 0x%x\n",
+		    _lmb->reserved.size);
         for (i=0; i < _lmb->reserved.cnt ;i++) {
-                prom_print(RELOC("    reserved.region[0x"));
-		prom_print_hex(i);
-		prom_print(RELOC("].base       = 0x"));
-                prom_print_hex(_lmb->reserved.region[i].base);
-		prom_print_nl();
-                prom_print(RELOC("                      .physbase = 0x"));
-                prom_print_hex(_lmb->reserved.region[i].physbase);
-		prom_print_nl();
-                prom_print(RELOC("                      .size     = 0x"));
-                prom_print_hex(_lmb->reserved.region[i].size);
-		prom_print_nl();
+                prom_printf("    reserved.region[0x%x\n].base       = 0x%x\n",
+			    i, _lmb->reserved.region[i].base);
+                prom_printf("                      .physbase = 0x%x\n",
+			    _lmb->reserved.region[i].physbase);
+                prom_printf("                      .size     = 0x%x\n",
+			    _lmb->reserved.region[i].size);
         }
 }
 #endif /* DEBUG_PROM */
@@ -604,14 +601,13 @@
 
         for (node = 0; prom_next_node(&node); ) {
                 type[0] = 0;
-                call_prom(RELOC("getprop"), 4, 1, node, RELOC("device_type"),
-                          type, sizeof(type));
+                prom_getprop(node, "device_type", type, sizeof(type));
 
                 if (strcmp(type, RELOC("memory")))
 			continue;
 
-		num_regs = call_prom(RELOC("getprop"), 4, 1, node, RELOC("reg"),
-			&reg, sizeof(reg)) / bytes_per_reg;
+		num_regs = prom_getprop(node, "reg", &reg, sizeof(reg))
+			/ bytes_per_reg;
 
 		for (i=0; i < num_regs ;i++) {
 			if (_systemcfg->platform == PLATFORM_POWERMAC) {
@@ -636,7 +632,7 @@
 			}
 
 			if (lmb_add(lmb_base, lmb_size) < 0)
-				prom_print(RELOC("Too many LMB's, discarding this one...\n"));
+				prom_printf("Too many LMB's, discarding this one...\n");
 		}
 
 	}
@@ -658,30 +654,23 @@
         u32 getprop_rval;
 	char hypertas_funcs[4];
 
-#ifdef DEBUG_PROM
-	prom_print(RELOC("prom_instantiate_rtas: start...\n"));
-#endif
-	prom_rtas = (ihandle)call_prom(RELOC("finddevice"), 1, 1, RELOC("/rtas"));
+	prom_debug("prom_instantiate_rtas: start...\n");
+
+	prom_rtas = call_prom("finddevice", 1, 1, ADDR("/rtas"));
 	if (prom_rtas != (ihandle) -1) {
 		unsigned long x;
-		x = call_prom(RELOC("getprop"),
-				  4, 1, prom_rtas,
-				  RELOC("ibm,hypertas-functions"), 
-				  hypertas_funcs, 
-			      sizeof(hypertas_funcs));
+		x = prom_getprop(prom_rtas, "ibm,hypertas-functions",
+				 hypertas_funcs, sizeof(hypertas_funcs));
 
 		if (x != PROM_ERROR) {
-			prom_print(RELOC("Hypertas detected, assuming LPAR !\n"));
+			prom_printf("Hypertas detected, assuming LPAR !\n");
 			_systemcfg->platform = PLATFORM_PSERIES_LPAR;
 		}
 
-		call_prom(RELOC("getprop"), 
-			  4, 1, prom_rtas,
-			  RELOC("rtas-size"), 
-			  &getprop_rval, 
-			  sizeof(getprop_rval));
+		prom_getprop(prom_rtas, "rtas-size",
+			     &getprop_rval, sizeof(getprop_rval));
 	        _rtas->size = getprop_rval;
-		prom_print(RELOC("instantiating rtas"));
+		prom_printf("instantiating rtas");
 		if (_rtas->size != 0) {
 			unsigned long rtas_region = RTAS_INSTANTIATE_MAX;
 
@@ -696,17 +685,15 @@
 
 			_rtas->base = lmb_alloc_base(_rtas->size, PAGE_SIZE, rtas_region);
 
-			prom_print(RELOC(" at 0x"));
-			prom_print_hex(_rtas->base);
+			prom_printf(" at 0x%x", _rtas->base);
+
+			prom_rtas = call_prom("open", 1, 1, ADDR("/rtas"));
+			prom_printf("...");
 
-			prom_rtas = (ihandle)call_prom(RELOC("open"), 
-					      	1, 1, RELOC("/rtas"));
-			prom_print(RELOC("..."));
-
-			if (call_prom(RELOC("call-method"), 3, 2,
-						      RELOC("instantiate-rtas"),
-						      prom_rtas,
-						      _rtas->base) != PROM_ERROR) {
+			if (call_prom("call-method", 3, 2,
+				      ADDR("instantiate-rtas"),
+				      prom_rtas,
+				      _rtas->base) != PROM_ERROR) {
 				_rtas->entry = (long)_prom->args.rets[1];
 			}
 			RELOC(rtas_rmo_buf)
@@ -715,26 +702,16 @@
 		}
 
 		if (_rtas->entry <= 0) {
-			prom_print(RELOC(" failed\n"));
+			prom_printf(" failed\n");
 		} else {
-			prom_print(RELOC(" done\n"));
+			prom_printf(" done\n");
 		}
 
-#ifdef DEBUG_PROM
-        	prom_print(RELOC("rtas->base                 = 0x"));
-        	prom_print_hex(_rtas->base);
-        	prom_print_nl();
-        	prom_print(RELOC("rtas->entry                = 0x"));
-        	prom_print_hex(_rtas->entry);
-        	prom_print_nl();
-        	prom_print(RELOC("rtas->size                 = 0x"));
-        	prom_print_hex(_rtas->size);
-        	prom_print_nl();
-#endif
+        	prom_debug("rtas->base                = 0x%x\n", _rtas->base);
+        	prom_debug("rtas->entry               = 0x%x\n", _rtas->entry);
+        	prom_debug("rtas->size                = 0x%x\n", _rtas->size);
 	}
-#ifdef DEBUG_PROM
-	prom_print(RELOC("prom_instantiate_rtas: end...\n"));
-#endif
+	prom_debug("prom_instantiate_rtas: end...\n");
 }
 
 
@@ -759,9 +736,7 @@
 	RELOC(dart_tablebase) = (unsigned long)
 		abs_to_virt(lmb_alloc_base(1UL<<24, 1UL<<24, 0x80000000L));
 
-	prom_print(RELOC("Dart at: "));
-	prom_print_hex(RELOC(dart_tablebase));
-	prom_print(RELOC("\n"));
+	prom_printf("Dart at: %x\n", RELOC(dart_tablebase));
 }
 #endif /* CONFIG_PMAC_DART */
 
@@ -780,27 +755,23 @@
 	if (RELOC(ppc64_iommu_off))
 		return;
 
-#ifdef DEBUG_PROM
-	prom_print(RELOC("starting prom_initialize_tce_table\n"));
-#endif
+	prom_debug("starting prom_initialize_tce_table\n");
 
 	/* Search all nodes looking for PHBs. */
 	for (node = 0; prom_next_node(&node); ) {
 		if (table == MAX_PHB) {
-			prom_print(RELOC("WARNING: PCI host bridge ignored, "
-				         "need to increase MAX_PHB\n"));
+			prom_printf("WARNING: PCI host bridge ignored, "
+				    "need to increase MAX_PHB\n");
 			continue;
 		}
 
 		compatible[0] = 0;
 		type[0] = 0;
 		model[0] = 0;
-		call_prom(RELOC("getprop"), 4, 1, node, RELOC("compatible"),
-			  compatible, sizeof(compatible));
-		call_prom(RELOC("getprop"), 4, 1, node, RELOC("device_type"),
-			  type, sizeof(type));
-		call_prom(RELOC("getprop"), 4, 1, node, RELOC("model"),
-			  model, sizeof(model));
+		prom_getprop(node, "compatible",
+			     compatible, sizeof(compatible));
+		prom_getprop(node, "device_type", type, sizeof(type));
+		prom_getprop(node, "model", model, sizeof(model));
 
 		/* Keep the old logic in tack to avoid regression. */
 		if (compatible[0] != 0) {
@@ -819,15 +790,13 @@
 			continue;
 		}
 
-		if (call_prom(RELOC("getprop"), 4, 1, node, 
-			     RELOC("tce-table-minalign"), &minalign, 
-			     sizeof(minalign)) == PROM_ERROR) {
+		if (prom_getprop(node, "tce-table-minalign", &minalign,
+				 sizeof(minalign)) == PROM_ERROR) {
 			minalign = 0;
 		}
 
-		if (call_prom(RELOC("getprop"), 4, 1, node, 
-			     RELOC("tce-table-minsize"), &minsize, 
-			     sizeof(minsize)) == PROM_ERROR) {
+		if (prom_getprop(node, "tce-table-minsize", &minsize,
+				 sizeof(minsize)) == PROM_ERROR) {
 			minsize = 4UL << 20;
 		}
 
@@ -854,7 +823,7 @@
 		base = lmb_alloc(minsize, align);
 
 		if ( !base ) {
-			prom_panic(RELOC("ERROR, cannot find space for TCE table.\n"));
+			prom_panic("ERROR, cannot find space for TCE table.\n");
 		}
 
 		vbase = (unsigned long)abs_to_virt(base);
@@ -864,23 +833,10 @@
 		prom_tce_table[table].base = vbase;
 		prom_tce_table[table].size = minsize;
 
-#ifdef DEBUG_PROM
-		prom_print(RELOC("TCE table: 0x"));
-		prom_print_hex(table);
-		prom_print_nl();
-
-		prom_print(RELOC("\tnode = 0x"));
-		prom_print_hex(node);
-		prom_print_nl();
-
-		prom_print(RELOC("\tbase = 0x"));
-		prom_print_hex(vbase);
-		prom_print_nl();
-
-		prom_print(RELOC("\tsize = 0x"));
-		prom_print_hex(minsize);
-		prom_print_nl();
-#endif
+		prom_debug("TCE table: 0x%x\n", table);
+		prom_debug("\tnode = 0x%x\n", node);
+		prom_debug("\tbase = 0x%x\n", vbase);
+		prom_debug("\tsize = 0x%x\n", minsize);
 
 		/* Initialize the table to have a one-to-one mapping
 		 * over the allocated size.
@@ -895,37 +851,30 @@
 		/* It seems OF doesn't null-terminate the path :-( */
 		memset(path, 0, sizeof(path));
 		/* Call OF to setup the TCE hardware */
-		if (call_prom(RELOC("package-to-path"), 3, 1, node,
-                             path, sizeof(path)-1) == PROM_ERROR) {
-                        prom_print(RELOC("package-to-path failed\n"));
+		if (call_prom("package-to-path", 3, 1, node,
+			      path, sizeof(path)-1) == PROM_ERROR) {
+                        prom_printf("package-to-path failed\n");
                 } else {
-                        prom_print(RELOC("opening PHB "));
-                        prom_print(path);
+                        prom_printf("opening PHB %s", path);
                 }
 
-                phb_node = (ihandle)call_prom(RELOC("open"), 1, 1, path);
+                phb_node = call_prom("open", 1, 1, path);
                 if ( (long)phb_node <= 0) {
-                        prom_print(RELOC("... failed\n"));
+                        prom_printf("... failed\n");
                 } else {
-                        prom_print(RELOC("... done\n"));
+                        prom_printf("... done\n");
                 }
-                call_prom(RELOC("call-method"), 6, 0,
-                             RELOC("set-64-bit-addressing"),
-			     phb_node,
-			     -1,
-                             minsize, 
-                             base & 0xffffffff,
-                             (base >> 32) & 0xffffffff);
-                call_prom(RELOC("close"), 1, 0, phb_node);
+                call_prom("call-method", 6, 0, ADDR("set-64-bit-addressing"),
+			  phb_node, -1, minsize,
+			  (u32) base, (u32) (base >> 32));
+                call_prom("close", 1, 0, phb_node);
 
 		table++;
 	}
 
 	/* Flag the first invalid entry */
 	prom_tce_table[table].node = 0;
-#ifdef DEBUG_PROM
-	prom_print(RELOC("ending prom_initialize_tce_table\n"));
-#endif
+	prom_debug("ending prom_initialize_tce_table\n");
 }
 
 /*
@@ -983,13 +932,11 @@
 	if (_systemcfg->platform == PLATFORM_POWERMAC) {
 		for (node = 0; prom_next_node(&node); ) {
 			type[0] = 0;
-			call_prom(RELOC("getprop"), 4, 1, node, RELOC("device_type"),
-				  type, sizeof(type));
+			prom_getprop(node, "device_type", type, sizeof(type));
 			if (strcmp(type, RELOC("cpu")) != 0)
 				continue;
 			reg = -1;
-			call_prom(RELOC("getprop"), 4, 1, node, RELOC("reg"),
-				  &reg, sizeof(reg));
+			prom_getprop(node, "reg", &reg, sizeof(reg));
 			_xPaca[cpuid].xHwProcNum = reg;
 
 #ifdef CONFIG_SMP
@@ -1007,24 +954,13 @@
 	/* Initially, we must have one active CPU. */
 	_systemcfg->processorCount = 1;
 
-#ifdef DEBUG_PROM
-	prom_print(RELOC("prom_hold_cpus: start...\n"));
-	prom_print(RELOC("    1) spinloop       = 0x"));
-	prom_print_hex((unsigned long)spinloop);
-	prom_print_nl();
-	prom_print(RELOC("    1) *spinloop      = 0x"));
-	prom_print_hex(*spinloop);
-	prom_print_nl();
-	prom_print(RELOC("    1) acknowledge    = 0x"));
-	prom_print_hex((unsigned long)acknowledge);
-	prom_print_nl();
-	prom_print(RELOC("    1) *acknowledge   = 0x"));
-	prom_print_hex(*acknowledge);
-	prom_print_nl();
-	prom_print(RELOC("    1) secondary_hold = 0x"));
-	prom_print_hex(secondary_hold);
-	prom_print_nl();
-#endif
+	prom_debug("prom_hold_cpus: start...\n");
+	prom_debug("    1) spinloop       = 0x%x\n", (unsigned long)spinloop);
+	prom_debug("    1) *spinloop      = 0x%x\n", *spinloop);
+	prom_debug("    1) acknowledge    = 0x%x\n",
+		   (unsigned long)acknowledge);
+	prom_debug("    1) *acknowledge   = 0x%x\n", *acknowledge);
+	prom_debug("    1) secondary_hold = 0x%x\n", secondary_hold);
 
         /* Set the common spinloop variable, so all of the secondary cpus
 	 * will block when they are awakened from their OF spinloop.
@@ -1041,36 +977,26 @@
 	/* look for cpus */
 	for (node = 0; prom_next_node(&node); ) {
 		type[0] = 0;
-		call_prom(RELOC("getprop"), 4, 1, node, RELOC("device_type"),
-			  type, sizeof(type));
+		prom_getprop(node, "device_type", type, sizeof(type));
 		if (strcmp(type, RELOC("cpu")) != 0)
 			continue;
 
 		/* Skip non-configured cpus. */
-		call_prom(RELOC("getprop"), 4, 1, node, RELOC("status"),
-			  type, sizeof(type));
+		prom_getprop(node, "status", type, sizeof(type));
 		if (strcmp(type, RELOC("okay")) != 0)
 			continue;
 
                 reg = -1;
-		call_prom(RELOC("getprop"), 4, 1, node, RELOC("reg"),
-			  &reg, sizeof(reg));
+		prom_getprop(node, "reg", &reg, sizeof(reg));
 
 		path = (char *) mem;
 		memset(path, 0, 256);
-		if ((long) call_prom(RELOC("package-to-path"), 3, 1,
-				     node, path, 255) == PROM_ERROR)
+		if (call_prom("package-to-path", 3, 1,
+			      node, path, 255) == PROM_ERROR)
 			continue;
 
-#ifdef DEBUG_PROM
-		prom_print_nl();
-		prom_print(RELOC("cpuid        = 0x"));
-		prom_print_hex(cpuid);
-		prom_print_nl();
-		prom_print(RELOC("cpu hw idx   = 0x"));
-		prom_print_hex(reg);
-		prom_print_nl();
-#endif
+		prom_debug("\ncpuid        = 0x%x\n", cpuid);
+		prom_debug("cpu hw idx   = 0x%x\n", reg);
 		_xPaca[cpuid].xHwProcNum = reg;
 
 		/* Init the acknowledge var which will be reset by
@@ -1079,10 +1005,9 @@
 		 */
 		*acknowledge = (unsigned long)-1;
 
-		propsize = call_prom(RELOC("getprop"), 4, 1, node,
-				     RELOC("ibm,ppc-interrupt-server#s"), 
-				     &interrupt_server, 
-				     sizeof(interrupt_server));
+		propsize = prom_getprop(node, "ibm,ppc-interrupt-server#s",
+					&interrupt_server,
+					sizeof(interrupt_server));
 		if (propsize < 0) {
 			/* no property.  old hardware has no SMT */
 			cpu_threads = 1;
@@ -1091,11 +1016,9 @@
 			/* We have a threaded processor */
 			cpu_threads = propsize / sizeof(u32);
 			if (cpu_threads > MAX_CPU_THREADS) {
-				prom_print(RELOC("SMT: too many threads!\nSMT: found "));
-				prom_print_hex(cpu_threads);
-				prom_print(RELOC(", max is "));
-				prom_print_hex(MAX_CPU_THREADS);
-				prom_print_nl();
+				prom_printf("SMT: too many threads!\n"
+					    "SMT: found %x, max is %x\n",
+					    cpu_threads, MAX_CPU_THREADS);
 				cpu_threads = 1; /* ToDo: panic? */
 			}
 		}
@@ -1103,18 +1026,15 @@
 		hw_cpu_num = interrupt_server[0];
 		if (hw_cpu_num != _prom->cpu) {
 			/* Primary Thread of non-boot cpu */
-			prom_print_hex(cpuid);
-			prom_print(RELOC(" : starting cpu "));
-			prom_print(path);
-			prom_print(RELOC("... "));
-			call_prom(RELOC("start-cpu"), 3, 0, node, 
+			prom_printf("%x : starting cpu %s... ", cpuid, path);
+			call_prom("start-cpu", 3, 0, node,
 				  secondary_hold, cpuid);
 
 			for ( i = 0 ; (i < 100000000) && 
 			      (*acknowledge == ((unsigned long)-1)); i++ ) ;
 
 			if (*acknowledge == cpuid) {
-				prom_print(RELOC("... done\n"));
+				prom_printf("... done\n");
 				/* We have to get every CPU out of OF,
 				 * even if we never start it. */
 				if (cpuid >= NR_CPUS)
@@ -1127,17 +1047,12 @@
 				cpu_set(cpuid, RELOC(cpu_present_at_boot));
 #endif
 			} else {
-				prom_print(RELOC("... failed: "));
-				prom_print_hex(*acknowledge);
-				prom_print_nl();
+				prom_printf("... failed: %x\n", *acknowledge);
 			}
 		}
 #ifdef CONFIG_SMP
 		else {
-			prom_print_hex(cpuid);
-			prom_print(RELOC(" : booting  cpu "));
-			prom_print(path);
-			prom_print_nl();
+			prom_printf("%x : booting  cpu %s\n", cpuid, path);
 			cpu_set(cpuid, RELOC(cpu_available_map));
 			cpu_set(cpuid, RELOC(cpu_possible_map));
 			cpu_set(cpuid, RELOC(cpu_online_map));
@@ -1152,16 +1067,15 @@
 			if (cpuid >= NR_CPUS)
 				continue;
 			_xPaca[cpuid].xHwProcNum = interrupt_server[i];
-			prom_print_hex(interrupt_server[i]);
-			prom_print(RELOC(" : preparing thread ... "));
+			prom_printf("%x : preparing thread ... ",
+				    interrupt_server[i]);
 			if (_naca->smt_state) {
 				cpu_set(cpuid, RELOC(cpu_available_map));
 				cpu_set(cpuid, RELOC(cpu_present_at_boot));
-				prom_print(RELOC("available"));
+				prom_printf("available\n");
 			} else {
-				prom_print(RELOC("not available"));
+				prom_printf("not available\n");
 			}
-			prom_print_nl();
 		}
 #endif
 		cpuid++;
@@ -1171,7 +1085,7 @@
 	if (__is_processor(PV_PULSAR) || 
 	    __is_processor(PV_ICESTAR) ||
 	    __is_processor(PV_SSTAR)) {
-		prom_print(RELOC("    starting secondary threads\n"));
+		prom_printf("    starting secondary threads\n");
 
 		for (i = 0; i < NR_CPUS; i += 2) {
 			if (!cpu_online(i))
@@ -1192,24 +1106,22 @@
 		}
 		_systemcfg->processorCount *= 2;
 	} else {
-		prom_print(RELOC("Processor is not HMT capable\n"));
+		prom_printf("Processor is not HMT capable\n");
 	}
 #endif
 
-	if (cpuid >= NR_CPUS)
-		prom_print(RELOC("WARNING: maximum CPUs (" __stringify(NR_CPUS)
-				 ") exceeded: ignoring extras\n"));
+	if (cpuid > NR_CPUS)
+		prom_printf("WARNING: maximum CPUs (" __stringify(NR_CPUS)
+			    ") exceeded: ignoring extras\n");
 
-#ifdef DEBUG_PROM
-	prom_print(RELOC("prom_hold_cpus: end...\n"));
-#endif
+	prom_debug("prom_hold_cpus: end...\n");
 }
 
 static void __init smt_setup(void)
 {
 	char *p, *q;
 	char my_smt_enabled = SMT_DYNAMIC;
-	ihandle prom_options = NULL;
+	ihandle prom_options = 0;
 	char option[9];
 	unsigned long offset = reloc_offset();
         struct naca_struct *_naca = RELOC(naca);
@@ -1233,13 +1145,10 @@
 		}
 	}
 	if (!found) {
-		prom_options = (ihandle)call_prom(RELOC("finddevice"), 1, 1, RELOC("/options"));
+		prom_options = call_prom("finddevice", 1, 1, ADDR("/options"));
 		if (prom_options != (ihandle) -1) {
-			call_prom(RELOC("getprop"), 
-				4, 1, prom_options,
-				RELOC("ibm,smt-enabled"), 
-				option, 
-				sizeof(option));
+			prom_getprop(prom_options, "ibm,smt-enabled",
+				     option, sizeof(option));
 			if (option[0] != 0) {
 				found = 1;
 				if (!strcmp(option, RELOC("off")))
@@ -1272,43 +1181,29 @@
 	int i, naddrs;
 	char name[64];
 	unsigned long offset = reloc_offset();
-	char *getprop = RELOC("getprop");
-
-	prom_print(RELOC("Initializing fake screen: "));
 
 	memset(name, 0, sizeof(name));
-	call_prom(getprop, 4, 1, dp, RELOC("name"), name, sizeof(name));
+	prom_getprop(dp, "name", name, sizeof(name));
 	name[sizeof(name)-1] = 0;
-	prom_print(name);
-	prom_print(RELOC("\n"));
-	call_prom(getprop, 4, 1, dp, RELOC("width"), &width, sizeof(width));
-	call_prom(getprop, 4, 1, dp, RELOC("height"), &height, sizeof(height));
-	call_prom(getprop, 4, 1, dp, RELOC("depth"), &depth, sizeof(depth));
+	prom_printf("Initializing fake screen: %s\n", name);
+
+	prom_getprop(dp, "width", &width, sizeof(width));
+	prom_getprop(dp, "height", &height, sizeof(height));
+	prom_getprop(dp, "depth", &depth, sizeof(depth));
 	pitch = width * ((depth + 7) / 8);
-	call_prom(getprop, 4, 1, dp, RELOC("linebytes"),
-		  &pitch, sizeof(pitch));
+	prom_getprop(dp, "linebytes", &pitch, sizeof(pitch));
 	if (pitch == 1)
 		pitch = 0x1000;		/* for strange IBM display */
 	address = 0;
 
-	prom_print(RELOC("width "));
-	prom_print_hex(width);
-	prom_print(RELOC(" height "));
-	prom_print_hex(height);
-	prom_print(RELOC(" depth "));
-	prom_print_hex(depth);
-	prom_print(RELOC(" linebytes "));
-	prom_print_hex(pitch);
-	prom_print(RELOC("\n"));
-
+	prom_printf("width %x height %x depth %x linebytes %x\n",
+		    width, height, depth, depth);
 
-	call_prom(getprop, 4, 1, dp, RELOC("address"),
-		  &address, sizeof(address));
+	prom_getprop(dp, "address", &address, sizeof(address));
 	if (address == 0) {
 		/* look for an assigned address with a size of >= 1MB */
-		naddrs = (int) call_prom(getprop, 4, 1, dp,
-				RELOC("assigned-addresses"),
-				addrs, sizeof(addrs));
+		naddrs = prom_getprop(dp, "assigned-addresses",
+				      addrs, sizeof(addrs));
 		naddrs /= sizeof(struct pci_reg_property);
 		for (i = 0; i < naddrs; ++i) {
 			if (addrs[i].size_lo >= (1 << 20)) {
@@ -1320,14 +1215,12 @@
 			}
 		}
 		if (address == 0) {
-			prom_print(RELOC("Failed to get address of frame buffer\n"));
+			prom_printf("Failed to get address of frame buffer\n");
 			return;
 		}
 	}
 	btext_setup_display(width, height, depth, pitch, address);
-	prom_print(RELOC("Addr of fb: "));
-	prom_print_hex(address);
-	prom_print_nl();
+	prom_printf("Addr of fb: %x\n", address);
 	RELOC(boot_text_mapped) = 0;
 }
 #endif /* CONFIG_BOOTX_TEXT */
@@ -1344,15 +1237,14 @@
 	_prom->encode_phys_size = 32;
 
 	/* get a handle for the stdout device */
-	_prom->chosen = (ihandle)call_prom(RELOC("finddevice"), 1, 1,
-				       RELOC("/chosen"));
+	_prom->chosen = call_prom("finddevice", 1, 1, ADDR("/chosen"));
 	if ((long)_prom->chosen <= 0)
-		prom_panic(RELOC("cannot find chosen")); /* msg won't be printed :( */
+		prom_panic("cannot find chosen"); /* msg won't be printed :( */
 
 	/* get device tree root */
-	_prom->root = (ihandle)call_prom(RELOC("finddevice"), 1, 1, RELOC("/"));
+	_prom->root = call_prom("finddevice", 1, 1, ADDR("/"));
 	if ((long)_prom->root <= 0)
-		prom_panic(RELOC("cannot find device tree root")); /* msg won't be printed :( */
+		prom_panic("cannot find device tree root"); /* msg won't be printed :( */
 }
 
 static void __init prom_init_stdout(void)
@@ -1361,12 +1253,10 @@
 	struct prom_t *_prom = PTRRELOC(&prom);
 	u32 val;
 
-        if ((long)call_prom(RELOC("getprop"), 4, 1, _prom->chosen,
-			    RELOC("stdout"), &val,
-			    sizeof(val)) <= 0)
-                prom_panic(RELOC("cannot find stdout"));
+        if (prom_getprop(_prom->chosen, "stdout", &val, sizeof(val)) <= 0)
+                prom_panic("cannot find stdout");
 
-        _prom->stdout = (ihandle)(unsigned long)val;
+        _prom->stdout = val;
 }
 
 static int __init prom_find_machine_type(void)
@@ -1376,9 +1266,8 @@
 	char compat[256];
 	int len, i = 0;
 
-	len = (int)(long)call_prom(RELOC("getprop"), 4, 1, _prom->root,
-				   RELOC("compatible"),
-				   compat, sizeof(compat)-1);
+	len = prom_getprop(_prom->root, "compatible",
+			   compat, sizeof(compat)-1);
 	if (len > 0) {
 		compat[len] = 0;
 		while (i < len) {
@@ -1400,13 +1289,7 @@
 {
 	unsigned long offset = reloc_offset();
 
-	return (int)(long)call_prom(RELOC("call-method"), 6, 1,
-		                    RELOC("color!"),
-                                    ih,
-                                    (void *)(long) i,
-                                    (void *)(long) b,
-                                    (void *)(long) g,
-                                    (void *)(long) r );
+	return call_prom("call-method", 6, 1, ADDR("color!"), ih, i, b, g, r);
 }
 
 /*
@@ -1447,16 +1330,13 @@
 
 	_prom->disp_node = 0;
 
-	prom_print(RELOC("Looking for displays\n"));
-	if (RELOC(of_stdout_device) != 0) {
-		prom_print(RELOC("OF stdout is    : "));
-		prom_print(PTRRELOC(RELOC(of_stdout_device)));
-		prom_print(RELOC("\n"));
-	}
+	prom_printf("Looking for displays\n");
+	if (RELOC(of_stdout_device) != 0)
+		prom_printf("OF stdout is    : %s\n",
+			    PTRRELOC(RELOC(of_stdout_device)));
 	for (node = 0; prom_next_node(&node); ) {
 		type[0] = 0;
-		call_prom(RELOC("getprop"), 4, 1, node, RELOC("device_type"),
-			  type, sizeof(type));
+		prom_getprop(node, "device_type", type, sizeof(type));
 		if (strcmp(type, RELOC("display")) != 0)
 			continue;
 		/* It seems OF doesn't null-terminate the path :-( */
@@ -1467,12 +1347,9 @@
 		 * leave some room at the end of the path for appending extra
 		 * arguments
 		 */
-		if ((long) call_prom(RELOC("package-to-path"), 3, 1,
-				    node, path, 250) < 0)
+		if (call_prom("package-to-path", 3, 1, node, path, 250) < 0)
 			continue;
-		prom_print(RELOC("found display   : "));
-		prom_print(path);
-		prom_print(RELOC("\n"));
+		prom_printf("found display   : %s\n", path);
 		
 		/*
 		 * If this display is the device that OF is using for stdout,
@@ -1489,27 +1366,26 @@
 				RELOC(prom_display_nodes[i])
 					= RELOC(prom_display_nodes[i-1]);
 			}
-			_prom->disp_node = (ihandle)(unsigned long)node;
+			_prom->disp_node = node;
 		}
 		RELOC(prom_display_paths[i]) = PTRUNRELOC(path);
 		RELOC(prom_display_nodes[i]) = node;
 		if (_prom->disp_node == 0)
-			_prom->disp_node = (ihandle)(unsigned long)node;
+			_prom->disp_node = node;
 		if (RELOC(prom_num_displays) >= FB_MAX)
 			break;
 	}
-	prom_print(RELOC("Opening displays...\n"));
+	prom_printf("Opening displays...\n");
 	for (j = RELOC(prom_num_displays) - 1; j >= 0; j--) {
 		path = PTRRELOC(RELOC(prom_display_paths[j]));
-		prom_print(RELOC("opening display : "));
-		prom_print(path);
-		ih = (ihandle)call_prom(RELOC("open"), 1, 1, path);
+		prom_printf("opening display : %s", path);
+		ih = call_prom("open", 1, 1, path);
 		if (ih == (ihandle)0 || ih == (ihandle)-1) {
-			prom_print(RELOC("... failed\n"));
+			prom_printf("... failed\n");
 			continue;
 		}
 
-		prom_print(RELOC("... done\n"));
+		prom_printf("... done\n");
 
 		/* Setup a useable color table when the appropriate
 		 * method is available. Should update this to set-colors */
@@ -1546,9 +1422,9 @@
 		unsigned long initrd_len;
 
 		if (*mem_end != RELOC(initrd_start))
-			prom_panic(RELOC("No memory for copy_device_tree"));
+			prom_panic("No memory for copy_device_tree");
 
-		prom_print(RELOC("Huge device_tree: moving initrd\n"));
+		prom_printf("Huge device_tree: moving initrd\n");
 		/* Move by 4M. */
 		initrd_len = RELOC(initrd_end) - RELOC(initrd_start);
 		*mem_end = RELOC(initrd_start) + 4 * 1024 * 1024;
@@ -1557,7 +1433,7 @@
 		RELOC(initrd_start) = *mem_end;
 		RELOC(initrd_end) = RELOC(initrd_start) + initrd_len;
 #else
-		prom_panic(RELOC("No memory for copy_device_tree"));
+		prom_panic("No memory for copy_device_tree");
 #endif
 	}
 
@@ -1606,8 +1482,7 @@
 	for (;;) {
 		/* 32 is max len of name including nul. */
 		namep = make_room(mem_start, mem_end, char[32]);
-		if ((long) call_prom(RELOC("nextprop"), 3, 1, node, prev_name,
-				     namep) <= 0) {
+		if (call_prom("nextprop", 3, 1, node, prev_name, namep) <= 0) {
 			/* No more nodes: unwind alloc */
 			*mem_start = (unsigned long)namep;
 			break;
@@ -1619,28 +1494,24 @@
 		pp->name = PTRUNRELOC(namep);
 		prev_name = namep;
 
-		pp->length = call_prom(RELOC("getproplen"), 2, 1, node, namep);
+		pp->length = call_prom("getproplen", 2, 1, node, namep);
 		if (pp->length < 0)
 			continue;
 		if (pp->length > MAX_PROPERTY_LENGTH) {
 			char path[128];
 
-			prom_print(RELOC("WARNING: ignoring large property "));
+			prom_printf("WARNING: ignoring large property ");
 			/* It seems OF doesn't null-terminate the path :-( */
 			memset(path, 0, sizeof(path));
-			if (call_prom(RELOC("package-to-path"), 3, 1, node,
-                            path, sizeof(path)-1) > 0)
-				prom_print(path);
-			prom_print(namep);
-			prom_print(RELOC(" length 0x"));
-			prom_print_hex(pp->length);
-			prom_print_nl();
-
+			if (call_prom("package-to-path", 3, 1, node,
+				      path, sizeof(path)-1) > 0)
+				prom_printf("[%s] ", path);
+			prom_printf("%s length 0x%x\n", namep, pp->length);
 			continue;
 		}
 		valp = __make_room(mem_start, mem_end, pp->length, 1);
 		pp->value = PTRUNRELOC(valp);
-		call_prom(RELOC("getprop"), 4, 1, node, namep,valp,pp->length);
+		call_prom("getprop", 4, 1, node, namep, valp, pp->length);
 		*prev_propp = PTRUNRELOC(pp);
 		prev_propp = &pp->next;
 	}
@@ -1660,19 +1531,19 @@
 	/* Set np->linux_phandle to the value of the ibm,phandle property
 	   if it exists, otherwise to the phandle for this node. */
 	np->linux_phandle = node;
-	if ((int)call_prom(RELOC("getprop"), 4, 1, node, RELOC("ibm,phandle"),
-			   &ibm_phandle, sizeof(ibm_phandle)) > 0)
+	if (prom_getprop(node, "ibm,phandle",
+			 &ibm_phandle, sizeof(ibm_phandle)) > 0)
 		np->linux_phandle = ibm_phandle;
 
 	/* get the node's full name */
 	namep = (char *)*mem_start;
-	l = (long) call_prom(RELOC("package-to-path"), 3, 1, node,
-			     namep, *mem_end - *mem_start);
+	l = call_prom("package-to-path", 3, 1, node,
+		      namep, *mem_end - *mem_start);
 	if (l >= 0) {
 		/* Didn't fit?  Get more room. */
 		if (l+1 > *mem_end - *mem_start) {
 			namep = __make_room(mem_start, mem_end, l+1, 1);
-			call_prom(RELOC("package-to-path"),3,1,node,namep,l);
+			call_prom("package-to-path", 3, 1, node, namep, l);
 		}
 		np->full_name = PTRUNRELOC(namep);
 		namep[l] = '\0';
@@ -1680,11 +1551,11 @@
 	}
 
 	/* do all our children */
-	child = call_prom(RELOC("child"), 1, 1, node);
+	child = call_prom("child", 1, 1, node);
 	while (child != (phandle)0) {
 		inspect_node(child, np, mem_start, mem_end,
 					 allnextpp);
-		child = call_prom(RELOC("peer"), 1, 1, child);
+		child = call_prom("peer", 1, 1, child);
 	}
 }
 
@@ -1706,9 +1577,9 @@
 		mem_end = RELOC(initrd_start);
 #endif /* CONFIG_BLK_DEV_INITRD */
 
-	root = call_prom(RELOC("peer"), 1, 1, (phandle)0);
+	root = call_prom("peer", 1, 1, (phandle)0);
 	if (root == (phandle)0) {
-		prom_panic(RELOC("couldn't get device tree root\n"));
+		prom_panic("couldn't get device tree root\n");
 	}
 	allnextp = &RELOC(allnodes);
 	inspect_node(root, 0, &mem_start, &mem_end, &allnextp);
@@ -1720,44 +1591,25 @@
 static struct bi_record * __init prom_bi_rec_verify(struct bi_record *bi_recs)
 {
 	struct bi_record *first, *last;
-#ifdef DEBUG_PROM
-	unsigned long offset = reloc_offset();
 
-  	prom_print(RELOC("birec_verify: r6=0x"));
-  	prom_print_hex((unsigned long)bi_recs);
-  	prom_print_nl();
-	if (bi_recs != NULL) {
-		prom_print(RELOC("  tag=0x"));
-		prom_print_hex(bi_recs->tag);
-		prom_print_nl();
-	}
-#endif /* DEBUG_PROM */
+  	prom_debug("birec_verify: r6=0x%x\n", (unsigned long)bi_recs);
+	if (bi_recs != NULL)
+		prom_debug("  tag=0x%x\n", bi_recs->tag);
 
 	if ( bi_recs == NULL || bi_recs->tag != BI_FIRST )
 		return NULL;
 
 	last = (struct bi_record *)(long)bi_recs->data[0];
 
-#ifdef DEBUG_PROM
-  	prom_print(RELOC("  last=0x"));
-  	prom_print_hex((unsigned long)last);
-  	prom_print_nl();
-	if (last != NULL) {
-		prom_print(RELOC("  last_tag=0x"));
-		prom_print_hex(last->tag);
-		prom_print_nl();
-	}
-#endif /* DEBUG_PROM */
+  	prom_debug("  last=0x%x\n", (unsigned long)last);
+	if (last != NULL)
+		prom_debug("  last_tag=0x%x\n", last->tag);
 
 	if ( last == NULL || last->tag != BI_LAST )
 		return NULL;
 
 	first = (struct bi_record *)(long)last->data[0];
-#ifdef DEBUG_PROM
-  	prom_print(RELOC("  first=0x"));
-  	prom_print_hex((unsigned long)first);
-  	prom_print_nl();
-#endif /* DEBUG_PROM */
+  	prom_debug("  first=0x%x\n", (unsigned long)first);
 
 	if ( first == NULL || first != bi_recs )
 		return NULL;
@@ -1776,11 +1628,7 @@
 		for ( rec=_prom->bi_recs;
 		      rec->tag != BI_LAST;
 		      rec=bi_rec_next(rec) ) {
-#ifdef DEBUG_PROM
-			prom_print(RELOC("bi: 0x"));
-			prom_print_hex(rec->tag);
-			prom_print_nl();
-#endif /* DEBUG_PROM */
+			prom_debug("bi: 0x%x\n", rec->tag);
 			switch (rec->tag) {
 #ifdef CONFIG_BLK_DEV_INITRD
 			case BI_INITRD:
@@ -1833,31 +1681,17 @@
 	/* Init prom stdout device */
 	prom_init_stdout();
 
-#ifdef DEBUG_PROM
-  	prom_print(RELOC("klimit=0x"));
-  	prom_print_hex(RELOC(klimit));
-  	prom_print_nl();
-  	prom_print(RELOC("offset=0x"));
-  	prom_print_hex(offset);
-  	prom_print_nl();
-  	prom_print(RELOC("->mem=0x"));
-  	prom_print_hex(RELOC(klimit) - offset);
-  	prom_print_nl();
-#endif /* DEBUG_PROM */
+  	prom_debug("klimit=0x%x\n", RELOC(klimit));
+  	prom_debug("offset=0x%x\n", offset);
+  	prom_debug("->mem=0x%x\n", RELOC(klimit) - offset);
 
 	/* check out if we have bi_recs */
 	_prom->bi_recs = prom_bi_rec_verify((struct bi_record *)r6);
 	if ( _prom->bi_recs != NULL ) {
 		RELOC(klimit) = PTRUNRELOC((unsigned long)_prom->bi_recs +
 					   _prom->bi_recs->data[1]);
-#ifdef DEBUG_PROM
-		prom_print(RELOC("bi_recs=0x"));
-		prom_print_hex((unsigned long)_prom->bi_recs);
-		prom_print_nl();
-		prom_print(RELOC("new mem=0x"));
-		prom_print_hex(RELOC(klimit) - offset);
-		prom_print_nl();
-#endif /* DEBUG_PROM */
+		prom_debug("bi_recs=0x%x\n", (unsigned long)_prom->bi_recs);
+		prom_debug("new mem=0x%x\n", RELOC(klimit) - offset);
 	}
 
 	/* If we don't have birec's or didn't find them, check for an initrd
@@ -1884,57 +1718,46 @@
 	/* Get the full OF pathname of the stdout device */
 	p = (char *) mem;
 	memset(p, 0, 256);
-	call_prom(RELOC("instance-to-path"), 3, 1, _prom->stdout, p, 255);
+	call_prom("instance-to-path", 3, 1, _prom->stdout, p, 255);
 	RELOC(of_stdout_device) = PTRUNRELOC(p);
 	mem += strlen(p) + 1;
 
 	getprop_rval = 1;
-	call_prom(RELOC("getprop"), 4, 1,
-		  _prom->root, RELOC("#size-cells"),
-		  &getprop_rval, sizeof(getprop_rval));
+	prom_getprop(_prom->root, "#size-cells",
+		     &getprop_rval, sizeof(getprop_rval));
 	_prom->encode_phys_size = (getprop_rval == 1) ? 32 : 64;
 
 	/* Determine which cpu is actually running right _now_ */
-        if ((long)call_prom(RELOC("getprop"), 4, 1, _prom->chosen,
-			    RELOC("cpu"), &getprop_rval,
-			    sizeof(getprop_rval)) <= 0)
-                prom_panic(RELOC("cannot find boot cpu"));
-
-	prom_cpu = (ihandle)(unsigned long)getprop_rval;
-	cpu_pkg = call_prom(RELOC("instance-to-package"), 1, 1, prom_cpu);
-	call_prom(RELOC("getprop"), 4, 1,
-		cpu_pkg, RELOC("reg"),
-		&getprop_rval, sizeof(getprop_rval));
-	_prom->cpu = (int)(unsigned long)getprop_rval;
+        if (prom_getprop(_prom->chosen, "cpu",
+			 &prom_cpu, sizeof(prom_cpu)) <= 0)
+                prom_panic("cannot find boot cpu");
+
+	cpu_pkg = call_prom("instance-to-package", 1, 1, prom_cpu);
+	prom_getprop(cpu_pkg, "reg", &getprop_rval, sizeof(getprop_rval));
+	_prom->cpu = getprop_rval;
 	_xPaca[0].xHwProcNum = _prom->cpu;
 
 	RELOC(boot_cpuid) = 0;
 
-#ifdef DEBUG_PROM
-  	prom_print(RELOC("Booting CPU hw index = 0x"));
-  	prom_print_hex(_prom->cpu);
-  	prom_print_nl();
-#endif
+  	prom_debug("Booting CPU hw index = 0x%x\n", _prom->cpu);
 
 	/* Get the boot device and translate it to a full OF pathname. */
 	p = (char *) mem;
-	l = (long) call_prom(RELOC("getprop"), 4, 1, _prom->chosen,
-			    RELOC("bootpath"), p, 1<<20);
+	l = prom_getprop(_prom->chosen, "bootpath", p, 1<<20);
 	if (l > 0) {
 		p[l] = 0;	/* should already be null-terminated */
 		RELOC(bootpath) = PTRUNRELOC(p);
 		mem += l + 1;
 		d = (char *) mem;
 		*d = 0;
-		call_prom(RELOC("canon"), 3, 1, p, d, 1<<20);
+		call_prom("canon", 3, 1, p, d, 1<<20);
 		RELOC(bootdevice) = PTRUNRELOC(d);
 		mem = DOUBLEWORD_ALIGN(mem + strlen(d) + 1);
 	}
 
 	RELOC(cmd_line[0]) = 0;
 	if ((long)_prom->chosen > 0) {
-		call_prom(RELOC("getprop"), 4, 1, _prom->chosen,
-			  RELOC("bootargs"), p, sizeof(cmd_line));
+		prom_getprop(_prom->chosen, "bootargs", p, sizeof(cmd_line));
 		if (p != NULL && p[0] != 0)
 			strlcpy(RELOC(cmd_line), p, sizeof(cmd_line));
 	}
@@ -1961,33 +1784,20 @@
          */
 	prom_hold_cpus(mem);
 
-#ifdef DEBUG_PROM
-  	prom_print(RELOC("after basic inits, mem=0x"));
-  	prom_print_hex(mem);
-  	prom_print_nl();
+  	prom_debug("after basic inits, mem=0x%x\n", mem);
 #ifdef CONFIG_BLK_DEV_INITRD
-	prom_print(RELOC("initrd_start=0x"));
-	prom_print_hex(RELOC(initrd_start));
-	prom_print_nl();
-	prom_print(RELOC("initrd_end=0x"));
-	prom_print_hex(RELOC(initrd_end));
-	prom_print_nl();
+	prom_debug("initrd_start=0x%x\n", RELOC(initrd_start));
+	prom_debug("initrd_end=0x%x\n", RELOC(initrd_end));
 #endif /* CONFIG_BLK_DEV_INITRD */
-	prom_print(RELOC("copying OF device tree...\n"));
-#endif /* DEBUG_PROM */
+	prom_debug("copying OF device tree...\n");
+
 	mem = copy_device_tree(mem);
 
 	RELOC(klimit) = mem + offset;
 
-#ifdef DEBUG_PROM
-	prom_print(RELOC("new klimit is\n"));
-  	prom_print(RELOC("klimit=0x"));
-  	prom_print_hex(RELOC(klimit));
-	prom_print(RELOC(" ->mem=0x\n"));
-  	prom_print(RELOC("klimit=0x"));
-  	prom_print_hex(mem);
-  	prom_print_nl();
-#endif /* DEBUG_PROM */
+	prom_debug("new klimit is\n");
+  	prom_debug("klimit=0x%x\n", RELOC(klimit));
+	prom_debug(" ->mem=0x%x\n", mem);
 
 	lmb_reserve(0, __pa(RELOC(klimit)));
 
@@ -2017,14 +1827,14 @@
 #endif
 
 #ifdef CONFIG_BOOTX_TEXT
-	if(_prom->disp_node) {
-		prom_print(RELOC("Setting up bi display...\n"));
+	if (_prom->disp_node) {
+		prom_printf("Setting up bi display...\n");
 		setup_disp_fake_bi(_prom->disp_node);
 	}
 #endif /* CONFIG_BOOTX_TEXT */
 
-	prom_print(RELOC("Calling quiesce ...\n"));
-	call_prom(RELOC("quiesce"), 0, 0);
+	prom_printf("Calling quiesce ...\n");
+	call_prom("quiesce", 0, 0);
 	phys = KERNELBASE - offset;
 
 #ifdef CONFIG_BLK_DEV_INITRD
@@ -2035,7 +1845,7 @@
 	}
 #endif /* CONFIG_BLK_DEV_INITRD */
 
-	prom_print(RELOC("returning from prom_init\n"));
+	prom_printf("returning from prom_init\n");
 	return phys;
 }
 
--- diff/arch/ppc64/kernel/ptrace.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/ptrace.c	2004-07-01 21:32:34.000000000 +0100
@@ -119,8 +119,7 @@
 		if (index < PT_FPR0) {
 			tmp = get_reg(child, (int)index);
 		} else {
-			if (child->thread.regs->msr & MSR_FP)
-				giveup_fpu(child);
+			flush_fp_to_thread(child);
 			tmp = ((unsigned long *)child->thread.fpr)[index - PT_FPR0];
 		}
 		ret = put_user(tmp,(unsigned long __user *) data);
@@ -152,8 +151,7 @@
 		if (index < PT_FPR0) {
 			ret = put_reg(child, index, data);
 		} else {
-			if (child->thread.regs->msr & MSR_FP)
-				giveup_fpu(child);
+			flush_fp_to_thread(child);
 			((unsigned long *)child->thread.fpr)[index - PT_FPR0] = data;
 			ret = 0;
 		}
@@ -245,8 +243,7 @@
 		unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
 		unsigned long __user *tmp = (unsigned long __user *)addr;
 
-		if (child->thread.regs->msr & MSR_FP)
-			giveup_fpu(child);
+		flush_fp_to_thread(child);
 
 		for (i = 0; i < 32; i++) {
 			ret = put_user(*reg, tmp);
@@ -263,8 +260,7 @@
 		unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
 		unsigned long __user *tmp = (unsigned long __user *)addr;
 
-		if (child->thread.regs->msr & MSR_FP)
-			giveup_fpu(child);
+		flush_fp_to_thread(child);
 
 		for (i = 0; i < 32; i++) {
 			ret = get_user(*reg, tmp);
--- diff/arch/ppc64/kernel/ptrace32.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/ptrace32.c	2004-07-01 21:32:34.000000000 +0100
@@ -136,8 +136,7 @@
 		if (index < PT_FPR0) {
 			tmp = get_reg(child, index);
 		} else {
-			if (child->thread.regs->msr & MSR_FP)
-				giveup_fpu(child);
+			flush_fp_to_thread(child);
 			/*
 			 * the user space code considers the floating point
 			 * to be an array of unsigned int (32 bits) - the
@@ -179,8 +178,7 @@
 			break;
 
 		if (numReg >= PT_FPR0) {
-			if (child->thread.regs->msr & MSR_FP)
-				giveup_fpu(child);
+			flush_fp_to_thread(child);
 			tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0];
 		} else { /* register within PT_REGS struct */
 			tmp = get_reg(child, numReg);
@@ -244,8 +242,7 @@
 		if (index < PT_FPR0) {
 			ret = put_reg(child, index, data);
 		} else {
-			if (child->thread.regs->msr & MSR_FP)
-				giveup_fpu(child);
+			flush_fp_to_thread(child);
 			/*
 			 * the user space code considers the floating point
 			 * to be an array of unsigned int (32 bits) - the
@@ -283,8 +280,7 @@
 				|| ((numReg > PT_CCR) && (numReg < PT_FPR0)))
 			break;
 		if (numReg >= PT_FPR0) {
-			if (child->thread.regs->msr & MSR_FP)
-				giveup_fpu(child);
+			flush_fp_to_thread(child);
 		}
 		if (numReg == PT_MSR)
 			data = (data & MSR_DEBUGCHANGE)
@@ -379,8 +375,7 @@
 		unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
 		unsigned int __user *tmp = (unsigned int __user *)addr;
 
-		if (child->thread.regs->msr & MSR_FP)
-			giveup_fpu(child);
+		flush_fp_to_thread(child);
 
 		for (i = 0; i < 32; i++) {
 			ret = put_user(*reg, tmp);
@@ -397,8 +392,7 @@
 		unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
 		unsigned int __user *tmp = (unsigned int __user *)addr;
 
-		if (child->thread.regs->msr & MSR_FP)
-			giveup_fpu(child);
+		flush_fp_to_thread(child);
 
 		for (i = 0; i < 32; i++) {
 			ret = get_user(*reg, tmp);
--- diff/arch/ppc64/kernel/rtas-proc.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/rtas-proc.c	2004-07-01 21:32:34.000000000 +0100
@@ -394,7 +394,7 @@
 		size_t count, loff_t *ppos)
 {
 	unsigned int year, mon, day, hour, min, sec;
-	unsigned long *ret = kmalloc(4*8, GFP_KERNEL);
+	int ret[8];
 	int n, sn, error;
 	char stkbuf[40];  /* its small, its on stack */
 
@@ -411,7 +411,6 @@
 		n = scnprintf (stkbuf, sizeof(stkbuf), "%lu\n",
 				mktime(year, mon, day, hour, min, sec));
 	}
-	kfree(ret);
 
 	sn = strlen (stkbuf) +1;
 	if (*ppos >= sn)
@@ -434,7 +433,6 @@
 		int count, int *eof, void *data)
 {
 	int i,j,n;
-	unsigned long ret;
 	int state, error;
 	char *buffer;
 	int get_sensor_state = rtas_token("get-sensor-state");
@@ -464,11 +462,10 @@
 		/* A sensor may have multiple instances */
 		while (j >= 0) {
 
-			error =	rtas_call(get_sensor_state, 2, 2, &ret, 
+			error =	rtas_call(get_sensor_state, 2, 2, &state, 
 				  	  sensors.sensor[i].token, 
 				  	  sensors.sensor[i].quant - j);
 
-			state = (int) ret;
 			n += ppc_rtas_process_sensor(sensors.sensor[i], state, 
 					     	     error, buffer+n );
 			n += sprintf (buffer+n, "\n");
--- diff/arch/ppc64/kernel/rtas.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/rtas.c	2004-07-01 21:32:34.000000000 +0100
@@ -33,45 +33,23 @@
 
 struct flash_block_list_header rtas_firmware_flash_list = {0, 0};
 
-/*
- * prom_init() is called very early on, before the kernel text
- * and data have been mapped to KERNELBASE.  At this point the code
- * is running at whatever address it has been loaded at, so
- * references to extern and static variables must be relocated
- * explicitly.  The procedure reloc_offset() returns the address
- * we're currently running at minus the address we were linked at.
- * (Note that strings count as static variables.)
- *
- * Because OF may have mapped I/O devices into the area starting at
- * KERNELBASE, particularly on CHRP machines, we can't safely call
- * OF once the kernel has been mapped to KERNELBASE.  Therefore all
- * OF calls should be done within prom_init(), and prom_init()
- * and all routines called within it must be careful to relocate
- * references as necessary.
- *
- * Note that the bss is cleared *after* prom_init runs, so we have
- * to make sure that any static or extern variables it accesses
- * are put in the data segment.
- */
-
 struct rtas_t rtas = { 
 	.lock = SPIN_LOCK_UNLOCKED
 };
 
 char rtas_err_buf[RTAS_ERROR_LOG_MAX];
 
-extern unsigned long reloc_offset(void);
-
 spinlock_t rtas_data_buf_lock = SPIN_LOCK_UNLOCKED;
 char rtas_data_buf[RTAS_DATA_BUF_SIZE]__page_aligned;
 
 void
 call_rtas_display_status(char c)
 {
-	struct rtas_args *args = &(get_paca()->xRtas);
+	struct rtas_args *args;
 	unsigned long s;
 
 	spin_lock_irqsave(&rtas.lock, s);
+	args = &(get_paca()->xRtas);
 
 	args->token = 10;
 	args->nargs = 1;
@@ -138,15 +116,13 @@
 		log_error(rtas_err_buf, ERR_TYPE_RTAS_LOG, 0);
 }
 
-long
-rtas_call(int token, int nargs, int nret,
-	  unsigned long *outputs, ...)
+int rtas_call(int token, int nargs, int nret, int *outputs, ...)
 {
 	va_list list;
 	int i, logit = 0;
 	unsigned long s;
-	struct rtas_args *rtas_args = &(get_paca()->xRtas);
-	long ret;
+	struct rtas_args *rtas_args;
+	int ret;
 
 	PPCDBG(PPCDBG_RTAS, "Entering rtas_call\n");
 	PPCDBG(PPCDBG_RTAS, "\ttoken    = 0x%x\n", token);
@@ -158,6 +134,7 @@
 
 	/* Gotta do something different here, use global lock for now... */
 	spin_lock_irqsave(&rtas.lock, s);
+	rtas_args = &(get_paca()->xRtas);
 
 	rtas_args->token = token;
 	rtas_args->nargs = nargs;
@@ -165,8 +142,8 @@
 	rtas_args->rets  = (rtas_arg_t *)&(rtas_args->args[nargs]);
 	va_start(list, outputs);
 	for (i = 0; i < nargs; ++i) {
-		rtas_args->args[i] = (rtas_arg_t)LONG_LSW(va_arg(list, ulong));
-		PPCDBG(PPCDBG_RTAS, "\tnarg[%d] = 0x%lx\n", i, rtas_args->args[i]);
+		rtas_args->args[i] = va_arg(list, rtas_arg_t);
+		PPCDBG(PPCDBG_RTAS, "\tnarg[%d] = 0x%x\n", i, rtas_args->args[i]);
 	}
 	va_end(list);
 
@@ -189,7 +166,7 @@
 	if (nret > 1 && outputs != NULL)
 		for (i = 0; i < nret-1; ++i)
 			outputs[i] = rtas_args->rets[i+1];
-	ret = (ulong)((nret > 0) ? rtas_args->rets[0] : 0);
+	ret = (nret > 0)? rtas_args->rets[0]: 0;
 
 	/* Gotta do something different here, use global lock for now... */
 	spin_unlock_irqrestore(&rtas.lock, s);
@@ -225,20 +202,13 @@
 rtas_get_power_level(int powerdomain, int *level)
 {
 	int token = rtas_token("get-power-level");
-	long powerlevel;
 	int rc;
 
 	if (token == RTAS_UNKNOWN_SERVICE)
 		return RTAS_UNKNOWN_OP;
 
-	while(1) {
-		rc = (int) rtas_call(token, 1, 2, &powerlevel, powerdomain);
-		if (rc == RTAS_BUSY)
-			udelay(1);
-		else
-			break;
-	}
-	*level = (int) powerlevel;
+	while ((rc = rtas_call(token, 1, 2, level, powerdomain)) == RTAS_BUSY)
+		udelay(1);
 	return rc;
 }
 
@@ -247,25 +217,21 @@
 {
 	int token = rtas_token("set-power-level");
 	unsigned int wait_time;
-	long returned_level;
 	int rc;
 
 	if (token == RTAS_UNKNOWN_SERVICE)
 		return RTAS_UNKNOWN_OP;
 
 	while (1) {
-		rc = (int) rtas_call(token, 2, 2, &returned_level, powerdomain,
-					level);
+		rc = rtas_call(token, 2, 2, setlevel, powerdomain, level);
 		if (rc == RTAS_BUSY)
 			udelay(1);
 		else if (rtas_is_extended_busy(rc)) {
 			wait_time = rtas_extended_busy_delay_time(rc);
 			udelay(wait_time * 1000);
-		}
-		else
+		} else
 			break;
 	}
-	*setlevel = (int) returned_level;
 	return rc;
 }
 
@@ -274,25 +240,21 @@
 {
 	int token = rtas_token("get-sensor-state");
 	unsigned int wait_time;
-	long returned_state;
 	int rc;
 
 	if (token == RTAS_UNKNOWN_SERVICE)
 		return RTAS_UNKNOWN_OP;
 
 	while (1) {
-		rc = (int) rtas_call(token, 2, 2, &returned_state, sensor,
-					index);
+		rc = rtas_call(token, 2, 2, state, sensor, index);
 		if (rc == RTAS_BUSY)
 			udelay(1);
 		else if (rtas_is_extended_busy(rc)) {
 			wait_time = rtas_extended_busy_delay_time(rc);
 			udelay(wait_time * 1000);
-		}
-		else
+		} else
 			break;
 	}
-	*state = (int) returned_state;
 	return rc;
 }
 
@@ -307,8 +269,7 @@
 		return RTAS_UNKNOWN_OP;
 
 	while (1) {
-		rc = (int) rtas_call(token, 3, 1, NULL, indicator, index,
-					new_value);
+		rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value);
 		if (rc == RTAS_BUSY)
 			udelay(1);
 		else if (rtas_is_extended_busy(rc)) {
@@ -407,7 +368,7 @@
 	if (rtas_firmware_flash_list.next)
 		rtas_flash_firmware();
 
-        printk("RTAS system-reboot returned %ld\n",
+        printk("RTAS system-reboot returned %d\n",
 	       rtas_call(rtas_token("system-reboot"), 0, 1, NULL));
         for (;;);
 }
@@ -418,8 +379,8 @@
 	if (rtas_firmware_flash_list.next)
 		rtas_flash_bypass_warning();
         /* allow power on only with power button press */
-        printk("RTAS power-off returned %ld\n",
-               rtas_call(rtas_token("power-off"), 2, 1, NULL,0xffffffff,0xffffffff));
+        printk("RTAS power-off returned %d\n",
+               rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
         for (;;);
 }
 
@@ -436,7 +397,7 @@
 
 void rtas_os_term(char *str)
 {
-	long status;
+	int status;
 
 	snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
 
@@ -447,7 +408,7 @@
 		if (status == RTAS_BUSY)
 			udelay(1);
 		else if (status != 0)
-			printk(KERN_EMERG "ibm,os-term call failed %ld\n",
+			printk(KERN_EMERG "ibm,os-term call failed %d\n",
 			       status);
 	} while (status == RTAS_BUSY);
 }
--- diff/arch/ppc64/kernel/rtas_flash.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/rtas_flash.c	2004-07-01 21:32:34.000000000 +0100
@@ -344,8 +344,8 @@
 	s32 rc;
 
 	while (1) {
-		rc = (s32) rtas_call(rtas_token("ibm,manage-flash-image"), 1, 
-				1, NULL, (long) args_buf->op);
+		rc = rtas_call(rtas_token("ibm,manage-flash-image"), 1, 
+			       1, NULL, args_buf->op);
 		if (rc == RTAS_RC_BUSY)
 			udelay(1);
 		else if (rtas_is_extended_busy(rc)) {
@@ -429,15 +429,15 @@
 {
 	int token = rtas_token("ibm,validate-flash-image");
 	unsigned int wait_time;
-	long update_results;
+	int update_results;
 	s32 rc;	
 
 	rc = 0;
 	while(1) {
 		spin_lock(&rtas_data_buf_lock);
 		memcpy(rtas_data_buf, args_buf->buf, VALIDATE_BUF_SIZE);
-		rc = (s32) rtas_call(token, 2, 2, &update_results, 
-				     __pa(rtas_data_buf), args_buf->buf_size);
+		rc = rtas_call(token, 2, 2, &update_results, 
+			       (u32) __pa(rtas_data_buf), args_buf->buf_size);
 		memcpy(args_buf->buf, rtas_data_buf, VALIDATE_BUF_SIZE);
 		spin_unlock(&rtas_data_buf_lock);
 			
@@ -451,7 +451,7 @@
 	}
 
 	args_buf->status = rc;
-	args_buf->update_results = (u32) update_results;
+	args_buf->update_results = update_results;
 }
 
 static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf, 
--- diff/arch/ppc64/kernel/rtasd.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/rtasd.c	2004-07-01 21:32:34.000000000 +0100
@@ -364,7 +364,6 @@
 	unsigned int err_type;
 	int cpu = 0;
 	int event_scan = rtas_token("event-scan");
-	cpumask_t all = CPU_MASK_ALL;
 	int rc;
 
 	daemonize("rtasd");
@@ -415,11 +414,11 @@
 	}
 
 	lock_cpu_hotplug();
-	cpu = first_cpu_const(mk_cpumask_const(cpu_online_map));
+	cpu = first_cpu(cpu_online_map);
 	for (;;) {
 		set_cpus_allowed(current, cpumask_of_cpu(cpu));
 		do_event_scan(event_scan);
-		set_cpus_allowed(current, all);
+		set_cpus_allowed(current, CPU_MASK_ALL);
 
 		/* Drop hotplug lock, and sleep for a bit (at least
 		 * one second since some machines have problems if we
@@ -429,9 +428,9 @@
 		schedule_timeout((HZ*60/rtas_event_scan_rate) / 2);
 		lock_cpu_hotplug();
 
-		cpu = next_cpu_const(cpu, mk_cpumask_const(cpu_online_map));
+		cpu = next_cpu(cpu, cpu_online_map);
 		if (cpu == NR_CPUS)
-			cpu = first_cpu_const(mk_cpumask_const(cpu_online_map));
+			cpu = first_cpu(cpu_online_map);
 	}
 
 error:
--- diff/arch/ppc64/kernel/rtc.c	2004-05-19 22:11:19.000000000 +0100
+++ source/arch/ppc64/kernel/rtc.c	2004-07-01 21:32:34.000000000 +0100
@@ -346,13 +346,13 @@
 #define RTAS_CLOCK_BUSY (-2)
 void pSeries_get_boot_time(struct rtc_time *rtc_tm)
 {
-	unsigned long ret[8];
+	int ret[8];
 	int error, wait_time;
 	unsigned long max_wait_tb;
 
 	max_wait_tb = __get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
 	do {
-		error = rtas_call(rtas_token("get-time-of-day"), 0, 8, (void *)&ret);
+		error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
 		if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) {
 			wait_time = rtas_extended_busy_delay_time(error);
 			/* This is boot time so we spin. */
@@ -381,13 +381,13 @@
  */
 void pSeries_get_rtc_time(struct rtc_time *rtc_tm)
 {
-        unsigned long ret[8];
+        int ret[8];
 	int error, wait_time;
 	unsigned long max_wait_tb;
 
 	max_wait_tb = __get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
 	do {
-		error = rtas_call(rtas_token("get-time-of-day"), 0, 8, (void *)&ret);
+		error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
 		if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) {
 			if (in_interrupt()) {
 				printk(KERN_WARNING "error: reading clock would delay interrupt\n");
--- diff/arch/ppc64/kernel/scanlog.c	2004-05-19 22:11:19.000000000 +0100
+++ source/arch/ppc64/kernel/scanlog.c	2004-07-01 21:32:34.000000000 +0100
@@ -49,7 +49,7 @@
         struct inode * inode = file->f_dentry->d_inode;
 	struct proc_dir_entry *dp;
 	unsigned int *data;
-	unsigned long status;
+	int status;
 	unsigned long len, off;
 	unsigned int wait_time;
 
@@ -81,11 +81,11 @@
 		spin_lock(&rtas_data_buf_lock);
 		memcpy(rtas_data_buf, data, RTAS_DATA_BUF_SIZE);
 		status = rtas_call(ibm_scan_log_dump, 2, 1, NULL,
-				   __pa(rtas_data_buf), count);
+				   (u32) __pa(rtas_data_buf), (u32) count);
 		memcpy(data, rtas_data_buf, RTAS_DATA_BUF_SIZE);
 		spin_unlock(&rtas_data_buf_lock);
 
-		DEBUG("status=%ld, data[0]=%x, data[1]=%x, data[2]=%x\n",
+		DEBUG("status=%d, data[0]=%x, data[1]=%x, data[2]=%x\n",
 		      status, data[0], data[1], data[2]);
 		switch (status) {
 		    case SCANLOG_COMPLETE:
@@ -133,7 +133,7 @@
 			     size_t count, loff_t *ppos)
 {
 	char stkbuf[20];
-	unsigned long status;
+	int status;
 
 	if (count > 19) count = 19;
 	if (copy_from_user (stkbuf, buf, count)) {
@@ -144,8 +144,8 @@
 	if (buf) {
 		if (strncmp(stkbuf, "reset", 5) == 0) {
 			DEBUG("reset scanlog\n");
-			status = rtas_call(ibm_scan_log_dump, 2, 1, NULL, NULL, 0);
-			DEBUG("rtas returns %ld\n", status);
+			status = rtas_call(ibm_scan_log_dump, 2, 1, NULL, 0, 0);
+			DEBUG("rtas returns %d\n", status);
 		} else if (strncmp(stkbuf, "debugon", 7) == 0) {
 			printk(KERN_ERR "scanlog: debug on\n");
 			scanlog_debug = 1;
--- diff/arch/ppc64/kernel/setup.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/setup.c	2004-07-01 21:32:34.000000000 +0100
@@ -44,6 +44,7 @@
 #include <asm/sections.h>
 #include <asm/btext.h>
 #include <asm/nvram.h>
+#include <asm/setup.h>
 #include <asm/system.h>
 
 extern unsigned long klimit;
@@ -82,7 +83,6 @@
 
 int powersave_nap;
 
-char saved_command_line[COMMAND_LINE_SIZE];
 unsigned char aux_device_present;
 
 void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
@@ -165,7 +165,7 @@
 		  unsigned long r6, unsigned long r7)
 {
 #if defined(CONFIG_SMP) && defined(CONFIG_PPC_PSERIES)
-	unsigned int ret, i;
+	int ret, i;
 #endif
 
 #ifdef CONFIG_XMON_DEFAULT
@@ -233,12 +233,11 @@
 #ifdef CONFIG_SMP
 		/* Start secondary threads on SMT systems */
 		for (i = 0; i < NR_CPUS; i++) {
-			if(cpu_available(i)  && !cpu_possible(i)) {
+			if (cpu_available(i) && !cpu_possible(i)) {
 				printk("%16.16x : starting thread\n", i);
-				rtas_call(rtas_token("start-cpu"), 3, 1, 
-					  (void *)&ret,
+				rtas_call(rtas_token("start-cpu"), 3, 1, &ret,
 					  get_hard_smp_processor_id(i), 
-					  *((unsigned long *)pseries_secondary_smp_init),
+					  (u32)*((unsigned long *)pseries_secondary_smp_init),
 					  i);
 				cpu_set(i, cpu_possible_map);
 				systemcfg->processorCount++;
@@ -631,7 +630,7 @@
 	init_mm.brk = klimit;
 	
 	/* Save unparsed command line copy for /proc/cmdline */
-	strlcpy(saved_command_line, cmd_line, sizeof(saved_command_line));
+	strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
 	*cmdline_p = cmd_line;
 
 	irqstack_early_init();
--- diff/arch/ppc64/kernel/signal.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/signal.c	2004-07-01 21:32:34.000000000 +0100
@@ -131,8 +131,7 @@
 #endif
 	long err = 0;
 
-	if (regs->msr & MSR_FP)
-		giveup_fpu(current);
+	flush_fp_to_thread(current);
 
 	/* Make sure signal doesn't get spurrious FP exceptions */
 	current->thread.fpscr = 0;
@@ -141,9 +140,8 @@
 	err |= __put_user(v_regs, &sc->v_regs);
 
 	/* save altivec registers */
-	if (current->thread.used_vr) {		
-		if (regs->msr & MSR_VEC)
-			giveup_altivec(current);
+	if (current->thread.used_vr) {
+		flush_altivec_to_thread(current);
 		/* Copy 33 vec registers (vr0..31 and vscr) to the stack */
 		err |= __copy_to_user(v_regs, current->thread.vr, 33 * sizeof(vector128));
 		/* set MSR_VEC in the MSR value in the frame to indicate that sc->v_reg)
@@ -530,13 +528,13 @@
 		struct k_sigaction *ka = &current->sighand->action[signr-1];
 
 		/* Whee!  Actually deliver the signal.  */
-		if (regs->trap == 0x0C00)
+		if (TRAP(regs) == 0x0C00)
 			syscall_restart(regs, ka);
 		handle_signal(signr, ka, &info, oldset, regs);
 		return 1;
 	}
 
-	if (regs->trap == 0x0C00) {	/* System Call! */
+	if (TRAP(regs) == 0x0C00) {	/* System Call! */
 		if ((int)regs->result == -ERESTARTNOHAND ||
 		    (int)regs->result == -ERESTARTSYS ||
 		    (int)regs->result == -ERESTARTNOINTR) {
--- diff/arch/ppc64/kernel/signal32.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/signal32.c	2004-07-01 21:32:34.000000000 +0100
@@ -130,11 +130,10 @@
 {
 	elf_greg_t64 *gregs = (elf_greg_t64 *)regs;
 	int i, err = 0;
-	
-	/* Make sure floating point registers are stored in regs */ 
-	if (regs->msr & MSR_FP)
-		giveup_fpu(current);
-	
+
+	/* Make sure floating point registers are stored in regs */
+	flush_fp_to_thread(current);
+
 	/* save general and floating-point registers */
 	for (i = 0; i <= PT_RESULT; i ++)
 		err |= __put_user((unsigned int)gregs[i], &frame->mc_gregs[i]);
@@ -148,8 +147,7 @@
 #ifdef CONFIG_ALTIVEC
 	/* save altivec registers */
 	if (current->thread.used_vr) {
-		if (regs->msr & MSR_VEC)
-			giveup_altivec(current);
+		flush_altivec_to_thread(current);
 		if (__copy_to_user(&frame->mc_vregs, current->thread.vr,
 				   ELF_NVRREG32 * sizeof(vector128)))
 			return 1;
@@ -934,7 +932,7 @@
 
 	ka = (signr == 0)? NULL: &current->sighand->action[signr-1];
 
-	if (regs->trap == 0x0C00		/* System Call! */
+	if (TRAP(regs) == 0x0C00		/* System Call! */
 	    && regs->ccr & 0x10000000		/* error signalled */
 	    && ((ret = regs->gpr[3]) == ERESTARTSYS
 		|| ret == ERESTARTNOHAND || ret == ERESTARTNOINTR
--- diff/arch/ppc64/kernel/smp.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/smp.c	2004-07-01 21:32:34.000000000 +0100
@@ -241,7 +241,7 @@
  */
 static int query_cpu_stopped(unsigned int pcpu)
 {
-	long cpu_status;
+	int cpu_status;
 	int status, qcss_tok;
 
 	qcss_tok = rtas_token("query-cpu-stopped-state");
@@ -812,7 +812,6 @@
 	if (IS_ERR(p))
 		panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
 
-	wake_up_forked_process(p);
 	init_idle(p, cpu);
 	unhash_process(p);
 
--- diff/arch/ppc64/kernel/sys_ppc32.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/sys_ppc32.c	2004-07-01 21:32:34.000000000 +0100
@@ -617,12 +617,8 @@
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
 		goto out;
-	if (regs->msr & MSR_FP)
-		giveup_fpu(current);
-#ifdef CONFIG_ALTIVEC
-	if (regs->msr & MSR_VEC)
-		giveup_altivec(current);
-#endif /* CONFIG_ALTIVEC */
+	flush_fp_to_thread(current);
+	flush_altivec_to_thread(current);
 
 	error = compat_do_execve(filename, compat_ptr(a1), compat_ptr(a2), regs);
 
--- diff/arch/ppc64/kernel/syscalls.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/syscalls.c	2004-07-01 21:32:34.000000000 +0100
@@ -237,5 +237,19 @@
 	return secs;
 }
 
+void do_show_syscall(unsigned long r3, unsigned long r4, unsigned long r5,
+		     unsigned long r6, unsigned long r7, unsigned long r8,
+		     struct pt_regs *regs)
+{
+	printk("syscall %ld(%lx, %lx, %lx, %lx, %lx, %lx) regs=%p current=%p"
+	       " cpu=%d\n", regs->gpr[0], r3, r4, r5, r6, r7, r8, regs,
+	       current, smp_processor_id());
+}
+
+void do_show_syscall_exit(unsigned long r3)
+{
+	printk(" -> %lx, current=%p cpu=%d\n", r3, current, smp_processor_id());
+}
+
 /* Only exists on P-series. */
 cond_syscall(ppc_rtas);
--- diff/arch/ppc64/kernel/sysfs.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/sysfs.c	2004-07-01 21:32:34.000000000 +0100
@@ -325,6 +325,16 @@
 #ifdef CONFIG_NUMA
 		parent = &node_devices[cpu_to_node(cpu)];
 #endif
+		/*
+		 * For now, we just see if the system supports making
+		 * the RTAS calls for CPU hotplug.  But, there may be a
+		 * more comprehensive way to do this for an individual
+		 * CPU.  For instance, the boot cpu might never be valid
+		 * for hotplugging.
+		 */
+		if (systemcfg->platform != PLATFORM_PSERIES_LPAR)
+			c->no_control = 1;
+
 		register_cpu(c, cpu, parent);
 
 		register_cpu_pmc(&c->sysdev);
--- diff/arch/ppc64/kernel/traps.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/traps.c	2004-07-01 21:32:34.000000000 +0100
@@ -172,9 +172,9 @@
  */
 static void FWNMI_release_errinfo(void)
 {
-	unsigned long ret = rtas_call(rtas_token("ibm,nmi-interlock"), 0, 1, NULL);
+	int ret = rtas_call(rtas_token("ibm,nmi-interlock"), 0, 1, NULL);
 	if (ret != 0)
-		printk("FWNMI: nmi-interlock failed: %ld\n", ret);
+		printk("FWNMI: nmi-interlock failed: %d\n", ret);
 }
 #endif
 
@@ -308,8 +308,7 @@
 	siginfo_t info;
 	unsigned long fpscr;
 
-	if (regs->msr & MSR_FP)
-		giveup_fpu(current);
+	flush_fp_to_thread(current);
 
 	fpscr = current->thread.fpscr;
 
@@ -442,8 +441,22 @@
 	die("Unrecoverable FP Unavailable Exception", regs, SIGABRT);
 }
 
-void KernelAltivecUnavailableException(struct pt_regs *regs)
+void AltivecUnavailableException(struct pt_regs *regs)
 {
+#ifndef CONFIG_ALTIVEC
+	if (user_mode(regs)) {
+		/* A user program has executed an altivec instruction,
+		   but this kernel doesn't support altivec. */
+		siginfo_t info;
+
+		memset(&info, 0, sizeof(info));
+		info.si_signo = SIGILL;
+		info.si_code = ILL_ILLOPC;
+		info.si_addr = (void *) regs->nip;
+		_exception(SIGILL, &info, regs);
+		return;
+	}
+#endif
 	printk(KERN_EMERG "Unrecoverable VMX/Altivec Unavailable Exception "
 			  "%lx at %lx\n", regs->trap, regs->nip);
 	die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT);
@@ -531,10 +544,39 @@
 void
 AltivecAssistException(struct pt_regs *regs)
 {
-	if (regs->msr & MSR_VEC)
-		giveup_altivec(current);
-	/* XXX quick hack for now: set the non-Java bit in the VSCR */
-	current->thread.vscr.u[3] |= 0x10000;
+	int err;
+	siginfo_t info;
+
+	if (!user_mode(regs)) {
+		printk(KERN_EMERG "VMX/Altivec assist exception in kernel mode"
+		       " at %lx\n", regs->nip);
+		die("Kernel VMX/Altivec assist exception", regs, SIGILL);
+	}
+
+	flush_altivec_to_thread(current);
+
+	err = emulate_altivec(regs);
+	if (err == 0) {
+		regs->nip += 4;		/* skip emulated instruction */
+		emulate_single_step(regs);
+		return;
+	}
+
+	if (err == -EFAULT) {
+		/* got an error reading the instruction */
+		info.si_signo = SIGSEGV;
+		info.si_errno = 0;
+		info.si_code = SEGV_MAPERR;
+		info.si_addr = (void *) regs->nip;
+		force_sig_info(SIGSEGV, &info, current);
+	} else {
+		/* didn't recognize the instruction */
+		/* XXX quick hack for now: set the non-Java bit in the VSCR */
+		if (printk_ratelimit())
+			printk(KERN_ERR "Unrecognized altivec instruction "
+			       "in %s at %lx\n", current->comm, regs->nip);
+		current->thread.vscr.u[3] |= 0x10000;
+	}
 }
 #endif /* CONFIG_ALTIVEC */
 
--- diff/arch/ppc64/kernel/udbg.c	2004-05-19 22:11:19.000000000 +0100
+++ source/arch/ppc64/kernel/udbg.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,12 +3,6 @@
  *
  * c 2001 PPC 64 Team, IBM Corp
  *
- * NOTE: I am trying to make this code avoid any static data references to
- *  simplify debugging early boot.  We'll see how that goes...
- *
- * To use this call udbg_init() first.  It will init the uart to 9600 8N1.
- * You may need to update the COM1 define if your uart is at a different addr.
- *
  *      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
@@ -53,10 +47,9 @@
 #define LSR_TEMT 0x40  /* Xmitter empty */
 #define LSR_ERR  0x80  /* Error */
 
-volatile struct NS16550 *udbg_comport;
+static volatile struct NS16550 *udbg_comport;
 
-void
-udbg_init_uart(void *comport)
+void udbg_init_uart(void *comport)
 {
 	if (comport) {
 		udbg_comport = (struct NS16550 *)comport;
@@ -89,8 +82,7 @@
     3,  0xc1,		/* rx enable, 8 bits */
 };
 
-void
-udbg_init_scc(struct device_node *np)
+void udbg_init_scc(struct device_node *np)
 {
 	unsigned long addr;
 	int i, x;
@@ -127,10 +119,9 @@
 
 #endif /* CONFIG_PPC_PMAC */
 
-void
-udbg_putc(unsigned char c)
+void udbg_putc(unsigned char c)
 {
-	if ( udbg_comport ) {
+	if (udbg_comport) {
 		while ((udbg_comport->lsr & LSR_THRE) == 0)
 			/* wait for idle */;
 		udbg_comport->thr = c; eieio();
@@ -173,10 +164,9 @@
 	return -1;
 }
 
-unsigned char
-udbg_getc(void)
+unsigned char udbg_getc(void)
 {
-	if ( udbg_comport ) {
+	if (udbg_comport) {
 		while ((udbg_comport->lsr & LSR_DR) == 0)
 			/* wait for char */;
 		return udbg_comport->rbr;
@@ -192,8 +182,7 @@
 	return 0;
 }
 
-void
-udbg_puts(const char *s)
+void udbg_puts(const char *s)
 {
 	if (ppc_md.udbg_putc) {
 		char c;
@@ -207,8 +196,7 @@
 	}
 }
 
-int
-udbg_write(const char *s, int n)
+int udbg_write(const char *s, int n)
 {
 	int remain = n;
 	char c;
@@ -216,20 +204,23 @@
 	if (!ppc_md.udbg_putc)
 		return 0;
 
-	if ( s && *s != '\0' ) {
-		while ( (( c = *s++ ) != '\0') && (remain-- > 0)) {
+	if (s && *s != '\0') {
+		while (((c = *s++) != '\0') && (remain-- > 0)) {
 			ppc_md.udbg_putc(c);
 		}
 	}
+
 	return n - remain;
 }
 
-int
-udbg_read(char *buf, int buflen) {
+int udbg_read(char *buf, int buflen)
+{
 	char c, *p = buf;
 	int i;
+
 	if (!ppc_md.udbg_putc)
-		for (;;);	/* stop here for cpuctl */
+		return 0;
+
 	for (i = 0; i < buflen; ++i) {
 		do {
 			c = ppc_md.udbg_getc();
@@ -238,68 +229,38 @@
 			break;
 		*p++ = c;
 	}
+
 	return i;
 }
 
-void
-udbg_console_write(struct console *con, const char *s, unsigned int n)
+void udbg_console_write(struct console *con, const char *s, unsigned int n)
 {
 	udbg_write(s, n);
 }
 
-void
-udbg_puthex(unsigned long val)
-{
-	int i, nibbles = sizeof(val)*2;
-	unsigned char buf[sizeof(val)*2+1];
-	for (i = nibbles-1;  i >= 0;  i--) {
-		buf[i] = (val & 0xf) + '0';
-		if (buf[i] > '9')
-		    buf[i] += ('a'-'0'-10);
-		val >>= 4;
-	}
-	buf[nibbles] = '\0';
-	udbg_puts(buf);
-}
-
-void
-udbg_printSP(const char *s)
-{
-	if (systemcfg->platform == PLATFORM_PSERIES) {
-		unsigned long sp;
-		asm("mr %0,1" : "=r" (sp) :);
-		if (s)
-			udbg_puts(s);
-		udbg_puthex(sp);
-	}
-}
-
-void
-udbg_printf(const char *fmt, ...)
+#define UDBG_BUFSIZE 256
+void udbg_printf(const char *fmt, ...)
 {
-	unsigned char buf[256];
-
+	unsigned char buf[UDBG_BUFSIZE];
 	va_list args;
-	va_start(args, fmt);
 
-	vsprintf(buf, fmt, args);
+	va_start(args, fmt);
+	vsnprintf(buf, UDBG_BUFSIZE, fmt, args);
 	udbg_puts(buf);
-
 	va_end(args);
 }
 
 /* Special print used by PPCDBG() macro */
-void
-udbg_ppcdbg(unsigned long debug_flags, const char *fmt, ...)
+void udbg_ppcdbg(unsigned long debug_flags, const char *fmt, ...)
 {
 	unsigned long active_debugs = debug_flags & naca->debug_switch;
 
-	if ( active_debugs ) {
+	if (active_debugs) {
 		va_list ap;
-		unsigned char buf[256];
+		unsigned char buf[UDBG_BUFSIZE];
 		unsigned long i, len = 0;
 
-		for(i=0; i < PPCDBG_NUM_FLAGS ;i++) {
+		for (i=0; i < PPCDBG_NUM_FLAGS; i++) {
 			if (((1U << i) & active_debugs) && 
 			    trace_names[i]) {
 				len += strlen(trace_names[i]); 
@@ -307,25 +268,24 @@
 				break;
 			}
 		}
-		sprintf(buf, " [%s]: ", current->comm);
+
+		snprintf(buf, UDBG_BUFSIZE, " [%s]: ", current->comm);
 		len += strlen(buf); 
 		udbg_puts(buf);
 
-		while(len < 18) {
+		while (len < 18) {
 			udbg_puts(" ");
 			len++;
 		}
 
 		va_start(ap, fmt);
-		vsprintf(buf, fmt, ap);
+		vsnprintf(buf, UDBG_BUFSIZE, fmt, ap);
 		udbg_puts(buf);
-		
 		va_end(ap);
 	}
 }
 
-unsigned long
-udbg_ifdebug(unsigned long flags)
+unsigned long udbg_ifdebug(unsigned long flags)
 {
 	return (flags & naca->debug_switch);
 }
--- diff/arch/ppc64/kernel/vio.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/vio.c	2004-07-01 21:32:34.000000000 +0100
@@ -26,39 +26,39 @@
 #include <asm/vio.h>
 #include <asm/hvcall.h>
 #include <asm/iSeries/vio.h>
+#include <asm/iSeries/HvTypes.h>
 #include <asm/iSeries/HvCallXm.h>
+#include <asm/iSeries/HvLpConfig.h>
 
 #define DBGENTER() pr_debug("%s entered\n", __FUNCTION__)
 
 extern struct subsystem devices_subsys; /* needed for vio_find_name() */
 
-static struct iommu_table *vio_build_iommu_table(struct vio_dev *);
 static const struct vio_device_id *vio_match_device(
 		const struct vio_device_id *, const struct vio_dev *);
 
 #ifdef CONFIG_PPC_PSERIES
+static struct iommu_table *vio_build_iommu_table(struct vio_dev *);
 static int vio_num_address_cells;
 #endif
 static struct vio_dev *vio_bus_device; /* fake "parent" device */
 
 #ifdef CONFIG_PPC_ISERIES
+static struct vio_dev *__init vio_register_device_iseries(char *type,
+		uint32_t unit_num);
+
 static struct iommu_table veth_iommu_table;
 static struct iommu_table vio_iommu_table;
 
-static struct vio_dev _veth_dev = {
-	.iommu_table = &veth_iommu_table,
-	.dev.bus = &vio_bus_type
-};
 static struct vio_dev _vio_dev  = {
 	.iommu_table = &vio_iommu_table,
 	.dev.bus = &vio_bus_type
 };
-
-struct vio_dev *iSeries_veth_dev = &_veth_dev;
 struct device *iSeries_vio_dev = &_vio_dev.dev;
-
-EXPORT_SYMBOL(iSeries_veth_dev);
 EXPORT_SYMBOL(iSeries_vio_dev);
+
+#define device_is_compatible(a, b)	1
+
 #endif
 
 /* convert from struct device to struct vio_dev and pass to driver.
@@ -143,14 +143,12 @@
 {
 	DBGENTER();
 
-#ifdef CONFIG_PPC_PSERIES
 	while (ids->type) {
-		if ((strncmp(((struct device_node *)dev->dev.platform_data)->type, ids->type, strlen(ids->type)) == 0) &&
+		if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) &&
 			device_is_compatible(dev->dev.platform_data, ids->compat))
 			return ids;
 		ids++;
 	}
-#endif
 	return NULL;
 }
 
@@ -196,14 +194,59 @@
 }
 #endif
 
+#ifdef CONFIG_PPC_PSERIES
+static void probe_bus_pseries(void)
+{
+	struct device_node *node_vroot, *of_node;
+
+	node_vroot = find_devices("vdevice");
+	if ((node_vroot == NULL) || (node_vroot->child == NULL))
+		/* this machine doesn't do virtual IO, and that's ok */
+		return;
+
+	vio_num_address_cells = prom_n_addr_cells(node_vroot->child);
+
+	/*
+	 * Create struct vio_devices for each virtual device in the device tree.
+	 * Drivers will associate with them later.
+	 */
+	for (of_node = node_vroot->child; of_node != NULL;
+			of_node = of_node->sibling) {
+		printk(KERN_DEBUG "%s: processing %p\n", __FUNCTION__, of_node);
+		vio_register_device_node(of_node);
+	}
+}
+#endif
+
+#ifdef CONFIG_PPC_ISERIES
+static void probe_bus_iseries(void)
+{
+	HvLpIndexMap vlan_map = HvLpConfig_getVirtualLanIndexMap();
+	struct vio_dev *viodev;
+	int i;
+
+	vlan_map = HvLpConfig_getVirtualLanIndexMap();
+	for (i = 0; i < HVMAXARCHITECTEDVIRTUALLANS; i++) {
+		if ((vlan_map & (0x8000 >> i)) == 0)
+			continue;
+		viodev = vio_register_device_iseries("vlan", i);
+		/* veth is special and has it own iommu_table */
+		viodev->iommu_table = &veth_iommu_table;
+	}
+	for (i = 0; i < HVMAXARCHITECTEDVIRTUALDISKS; i++)
+		vio_register_device_iseries("viodasd", i);
+	for (i = 0; i < HVMAXARCHITECTEDVIRTUALCDROMS; i++)
+		vio_register_device_iseries("viocd", i);
+	for (i = 0; i < HVMAXARCHITECTEDVIRTUALTAPES; i++)
+		vio_register_device_iseries("viotape", i);
+}
+#endif
+
 /**
  * vio_bus_init: - Initialize the virtual IO bus
  */
 static int __init vio_bus_init(void)
 {
-#ifdef CONFIG_PPC_PSERIES
-	struct device_node *node_vroot, *of_node;
-#endif
 	int err;
 
 	err = bus_register(&vio_bus_type);
@@ -229,25 +272,10 @@
 	}
 
 #ifdef CONFIG_PPC_PSERIES
-	node_vroot = find_devices("vdevice");
-	if ((node_vroot == NULL) || (node_vroot->child == NULL)) {
-		/* this machine doesn't do virtual IO, and that's ok */
-		return 0;
-	}
-
-	vio_num_address_cells = prom_n_addr_cells(node_vroot->child);
-
-	/*
-	 * Create struct vio_devices for each virtual device in the device tree.
-	 * Drivers will associate with them later.
-	 */
-	for (of_node = node_vroot->child;
-			of_node != NULL;
-			of_node = of_node->sibling) {
-		printk(KERN_DEBUG "%s: processing %p\n", __FUNCTION__, of_node);
-
-		vio_register_device(of_node);
-	}
+	probe_bus_pseries();
+#endif
+#ifdef CONFIG_PPC_ISERIES
+	probe_bus_iseries();
 #endif
 
 	return 0;
@@ -255,20 +283,19 @@
 
 __initcall(vio_bus_init);
 
-
-#ifdef CONFIG_PPC_PSERIES
 /* vio_dev refcount hit 0 */
 static void __devinit vio_dev_release(struct device *dev)
 {
-	struct vio_dev *viodev = to_vio_dev(dev);
-
 	DBGENTER();
 
+#ifdef CONFIG_PPC_PSERIES
 	/* XXX free TCE table */
-	of_node_put(viodev->dev.platform_data);
-	kfree(viodev);
+	of_node_put(dev->platform_data);
+#endif
+	kfree(to_vio_dev(dev));
 }
 
+#ifdef CONFIG_PPC_PSERIES
 static ssize_t viodev_show_devspec(struct device *dev, char *buf)
 {
 	struct device_node *of_node = dev->platform_data;
@@ -276,17 +303,43 @@
 	return sprintf(buf, "%s\n", of_node->full_name);
 }
 DEVICE_ATTR(devspec, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_devspec, NULL);
+#endif
 
 static ssize_t viodev_show_name(struct device *dev, char *buf)
 {
-	struct device_node *of_node = dev->platform_data;
-
-	return sprintf(buf, "%s\n", of_node->name);
+	return sprintf(buf, "%s\n", to_vio_dev(dev)->name);
 }
 DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_name, NULL);
 
+static struct vio_dev * __devinit vio_register_device_common(
+		struct vio_dev *viodev, char *name, char *type,
+		uint32_t unit_address, struct iommu_table *iommu_table)
+{
+	DBGENTER();
+
+	viodev->name = name;
+	viodev->type = type;
+	viodev->unit_address = unit_address;
+	viodev->iommu_table = iommu_table;
+	/* init generic 'struct device' fields: */
+	viodev->dev.parent = &vio_bus_device->dev;
+	viodev->dev.bus = &vio_bus_type;
+	viodev->dev.release = vio_dev_release;
+
+	/* register with generic device framework */
+	if (device_register(&viodev->dev)) {
+		printk(KERN_ERR "%s: failed to register device %s\n",
+				__FUNCTION__, viodev->dev.bus_id);
+		return NULL;
+	}
+	device_create_file(&viodev->dev, &dev_attr_name);
+
+	return viodev;
+}
+
+#ifdef CONFIG_PPC_PSERIES
 /**
- * vio_register_device: - Register a new vio device.
+ * vio_register_device_node: - Register a new vio device.
  * @of_node:	The OF node for this device.
  *
  * Creates and initializes a vio_dev structure from the data in
@@ -294,7 +347,7 @@
  * Returns a pointer to the created vio_dev or NULL if node has
  * NULL device_type or compatible fields.
  */
-struct vio_dev * __devinit vio_register_device(struct device_node *of_node)
+struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
 {
 	struct vio_dev *viodev;
 	unsigned int *unit_address;
@@ -325,8 +378,6 @@
 	memset(viodev, 0, sizeof(struct vio_dev));
 
 	viodev->dev.platform_data = of_node_get(of_node);
-	viodev->unit_address = *unit_address;
-	viodev->iommu_table = vio_build_iommu_table(viodev);
 
 	viodev->irq = NO_IRQ;
 	irq_p = (unsigned int *)get_property(of_node, "interrupts", 0);
@@ -339,36 +390,60 @@
 			viodev->irq = irq_offset_up(virq);
 	}
 
-	/* init generic 'struct device' fields: */
-	viodev->dev.parent = &vio_bus_device->dev;
-	viodev->dev.bus = &vio_bus_type;
-	snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%x", viodev->unit_address);
-	viodev->dev.release = vio_dev_release;
+	snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%x", *unit_address);
 
 	/* register with generic device framework */
-	if (device_register(&viodev->dev)) {
-		printk(KERN_ERR "%s: failed to register device %s\n", __FUNCTION__,
-			viodev->dev.bus_id);
+	if (vio_register_device_common(viodev, of_node->name, of_node->type,
+				*unit_address, vio_build_iommu_table(viodev))
+			== NULL) {
 		/* XXX free TCE table */
 		kfree(viodev);
 		return NULL;
 	}
-	device_create_file(&viodev->dev, &dev_attr_name);
 	device_create_file(&viodev->dev, &dev_attr_devspec);
 
 	return viodev;
 }
-EXPORT_SYMBOL(vio_register_device);
+EXPORT_SYMBOL(vio_register_device_node);
+#endif
+
+#ifdef CONFIG_PPC_ISERIES
+/**
+ * vio_register_device: - Register a new vio device.
+ * @voidev:	The device to register.
+ */
+static struct vio_dev *__init vio_register_device_iseries(char *type,
+		uint32_t unit_num)
+{
+	struct vio_dev *viodev;
+
+	DBGENTER();
+
+	/* allocate a vio_dev for this node */
+	viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL);
+	if (!viodev)
+		return NULL;
+	memset(viodev, 0, sizeof(struct vio_dev));
+
+	snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%s%d", type, unit_num);
+
+	return vio_register_device_common(viodev, viodev->dev.bus_id, type,
+			unit_num, &vio_iommu_table);
+}
+#endif
 
 void __devinit vio_unregister_device(struct vio_dev *viodev)
 {
 	DBGENTER();
+#ifdef CONFIG_PPC_PSERIES
 	device_remove_file(&viodev->dev, &dev_attr_devspec);
+#endif
 	device_remove_file(&viodev->dev, &dev_attr_name);
 	device_unregister(&viodev->dev);
 }
 EXPORT_SYMBOL(vio_unregister_device);
 
+#ifdef CONFIG_PPC_PSERIES
 /**
  * vio_get_attribute: - get attribute for virtual device
  * @vdev:	The vio device to get property.
--- diff/arch/ppc64/kernel/xics.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/kernel/xics.c	2004-07-01 21:32:34.000000000 +0100
@@ -240,14 +240,13 @@
 static int get_irq_server(unsigned int irq)
 {
 	cpumask_t cpumask = irq_affinity[irq];
-	cpumask_t allcpus = CPU_MASK_ALL;
 	cpumask_t tmp = CPU_MASK_NONE;
 	unsigned int server;
 
 #ifdef CONFIG_IRQ_ALL_CPUS
 	/* For the moment only implement delivery to all cpus or one cpu */
 	if (smp_threads_ready) {
-		if (cpus_equal(cpumask, allcpus)) {
+		if (cpus_equal(cpumask, CPU_MASK_ALL)) {
 			server = default_distrib_server;
 		} else {
 			cpus_and(tmp, cpu_online_map, cpumask);
@@ -276,7 +275,7 @@
 static void xics_enable_irq(unsigned int virq)
 {
 	unsigned int irq;
-	long call_status;
+	int call_status;
 	unsigned int server;
 
 	irq = virt_irq_to_real(irq_offset_down(virq));
@@ -288,7 +287,7 @@
 				DEFAULT_PRIORITY);
 	if (call_status != 0) {
 		printk(KERN_ERR "xics_enable_irq: irq=%x: ibm_set_xive "
-		       "returned %lx\n", irq, call_status);
+		       "returned %x\n", irq, call_status);
 		return;
 	}
 
@@ -296,14 +295,14 @@
 	call_status = rtas_call(ibm_int_on, 1, 1, NULL, irq);
 	if (call_status != 0) {
 		printk(KERN_ERR "xics_enable_irq: irq=%x: ibm_int_on "
-		       "returned %lx\n", irq, call_status);
+		       "returned %x\n", irq, call_status);
 		return;
 	}
 }
 
 static void xics_disable_real_irq(unsigned int irq)
 {
-	long call_status;
+	int call_status;
 	unsigned int server;
 
 	if (irq == XICS_IPI)
@@ -312,7 +311,7 @@
 	call_status = rtas_call(ibm_int_off, 1, 1, NULL, irq);
 	if (call_status != 0) {
 		printk(KERN_ERR "xics_disable_real_irq: irq=%x: "
-		       "ibm_int_off returned %lx\n", irq, call_status);
+		       "ibm_int_off returned %x\n", irq, call_status);
 		return;
 	}
 
@@ -321,7 +320,7 @@
 	call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server, 0xff);
 	if (call_status != 0) {
 		printk(KERN_ERR "xics_disable_irq: irq=%x: ibm_set_xive(0xff)"
-		       " returned %lx\n", irq, call_status);
+		       " returned %x\n", irq, call_status);
 		return;
 	}
 }
@@ -613,26 +612,25 @@
 static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
 {
 	unsigned int irq;
-	long status;
-	unsigned long xics_status[2];
+	int status;
+	int xics_status[2];
 	unsigned long newmask;
-	cpumask_t allcpus = CPU_MASK_ALL;
 	cpumask_t tmp = CPU_MASK_NONE;
 
 	irq = virt_irq_to_real(irq_offset_down(virq));
 	if (irq == XICS_IPI || irq == NO_IRQ)
 		return;
 
-	status = rtas_call(ibm_get_xive, 1, 3, (void *)&xics_status, irq);
+	status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq);
 
 	if (status) {
 		printk(KERN_ERR "xics_set_affinity: irq=%d ibm,get-xive "
-		       "returns %ld\n", irq, status);
+		       "returns %d\n", irq, status);
 		return;
 	}
 
 	/* For the moment only implement delivery to all cpus or one cpu */
-	if (cpus_equal(cpumask, allcpus)) {
+	if (cpus_equal(cpumask, CPU_MASK_ALL)) {
 		newmask = default_distrib_server;
 	} else {
 		cpus_and(tmp, cpu_online_map, cpumask);
@@ -646,7 +644,7 @@
 
 	if (status) {
 		printk(KERN_ERR "xics_set_affinity irq=%d ibm,set-xive "
-		       "returns %ld\n", irq, status);
+		       "returns %d\n", irq, status);
 		return;
 	}
 }
@@ -657,10 +655,10 @@
 void xics_migrate_irqs_away(void)
 {
 	int set_indicator = rtas_token("set-indicator");
-	const unsigned long giqs = 9005UL; /* Global Interrupt Queue Server */
-	unsigned long status = 0;
+	const unsigned int giqs = 9005UL; /* Global Interrupt Queue Server */
+	int status = 0;
 	unsigned int irq, cpu = smp_processor_id();
-	unsigned long xics_status[2];
+	int xics_status[2];
 	unsigned long flags;
 
 	BUG_ON(set_indicator == RTAS_UNKNOWN_SERVICE);
@@ -671,7 +669,7 @@
 
 	/* Refuse any new interrupts... */
 	rtas_call(set_indicator, 3, 1, &status, giqs,
-		  hard_smp_processor_id(), 0UL);
+		  hard_smp_processor_id(), 0);
 	WARN_ON(status != 0);
 
 	/* Allow IPIs again... */
@@ -694,11 +692,10 @@
 
 		spin_lock_irqsave(&desc->lock, flags);
 
-		status = rtas_call(ibm_get_xive, 1, 3, (void *)&xics_status,
-				   irq);
+		status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq);
 		if (status) {
 			printk(KERN_ERR "migrate_irqs_away: irq=%d "
-					"ibm,get-xive returns %ld\n",
+					"ibm,get-xive returns %d\n",
 					irq, status);
 			goto unlock;
 		}
@@ -721,7 +718,7 @@
 				irq, xics_status[0], xics_status[1]);
 		if (status)
 			printk(KERN_ERR "migrate_irqs_away irq=%d "
-					"ibm,set-xive returns %ld\n",
+					"ibm,set-xive returns %d\n",
 					irq, status);
 
 unlock:
--- diff/arch/ppc64/lib/string.S	2004-05-19 22:11:19.000000000 +0100
+++ source/arch/ppc64/lib/string.S	2004-07-01 21:32:34.000000000 +0100
@@ -66,28 +66,69 @@
 	blr
 
 _GLOBAL(memset)
+	neg	r0,r5
 	rlwimi	r4,r4,8,16,23
+	andi.	r0,r0,7			/* # bytes to be 8-byte aligned */
 	rlwimi	r4,r4,16,0,15
-	addi	r6,r3,-4
-	cmplwi	0,r5,4
-	blt	7f
-	stwu	r4,4(r6)
-	beqlr
-	andi.	r0,r6,3
-	add	r5,r0,r5
-	subf	r6,r0,r6
-	srwi	r0,r5,2
+	cmplw	cr1,r5,r0		/* do we get that far? */
+	rldimi	r4,r4,32,0
+	mr	r6,r3
+	mtcrf	1,r0
+	mr	r6,r3
+	blt	cr1,8f
+	beq+	3f			/* if already 8-byte aligned */
+	subf	r5,r0,r5
+	bf	31,1f
+	stb	r4,0(r6)
+	addi	r6,r6,1
+1:	bf	30,2f
+	sth	r4,0(r6)
+	addi	r6,r6,2
+2:	bf	29,3f
+	stw	r4,0(r6)
+	addi	r6,r6,4
+3:	srdi.	r0,r5,6
+	clrldi	r5,r5,58
 	mtctr	r0
-	bdz	6f
-1:	stwu	r4,4(r6)
-	bdnz	1b
-6:	andi.	r5,r5,3
-7:	cmpwi	0,r5,0
-	beqlr
-	mtctr	r5
-	addi	r6,r6,3
-8:	stbu	r4,1(r6)
-	bdnz	8b
+	beq	5f
+4:	std	r4,0(r6)
+	std	r4,8(r6)
+	std	r4,16(r6)
+	std	r4,24(r6)
+	std	r4,32(r6)
+	std	r4,40(r6)
+	std	r4,48(r6)
+	std	r4,56(r6)
+	addi	r6,r6,64
+	bdnz	4b
+5:	srwi.	r0,r5,3
+	clrlwi	r5,r5,29
+	mtcrf	1,r0
+	beq	8f
+	bf	29,6f
+	std	r4,0(r6)
+	std	r4,8(r6)
+	std	r4,16(r6)
+	std	r4,24(r6)
+	addi	r6,r6,32
+6:	bf	30,7f
+	std	r4,0(r6)
+	std	r4,8(r6)
+	addi	r6,r6,16
+7:	bf	31,8f
+	std	r4,0(r6)
+	addi	r6,r6,8
+8:	cmpwi	r5,0
+	mtcrf	1,r5
+	beqlr+
+	bf	29,9f
+	stw	r4,0(r6)
+	addi	r6,r6,4
+9:	bf	30,10f
+	sth	r4,0(r6)
+	addi	r6,r6,2
+10:	bflr	31
+	stb	r4,0(r6)
 	blr
 
 _GLOBAL(memmove)
--- diff/arch/ppc64/mm/fault.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/mm/fault.c	2004-07-01 21:32:34.000000000 +0100
@@ -80,37 +80,67 @@
  *  - DSISR for a non-SLB data access fault,
  *  - SRR1 & 0x08000000 for a non-SLB instruction access fault
  *  - 0 any SLB fault.
+ * The return value is 0 if the fault was handled, or the signal
+ * number if this is a kernel fault that can't be handled here.
  */
-void do_page_fault(struct pt_regs *regs, unsigned long address,
-		   unsigned long error_code)
+int do_page_fault(struct pt_regs *regs, unsigned long address,
+		  unsigned long error_code)
 {
 	struct vm_area_struct * vma;
 	struct mm_struct *mm = current->mm;
 	siginfo_t info;
 	unsigned long code = SEGV_MAPERR;
 	unsigned long is_write = error_code & 0x02000000;
+	unsigned long trap = TRAP(regs);
 
-	if (regs->trap == 0x300 || regs->trap == 0x380) {
+	if (trap == 0x300 || trap == 0x380) {
 		if (debugger_fault_handler(regs))
-			return;
+			return 0;
 	}
 
 	/* On a kernel SLB miss we can only check for a valid exception entry */
-	if (!user_mode(regs) && (regs->trap == 0x380)) {
-		bad_page_fault(regs, address, SIGSEGV);
-		return;
-	}
+	if (!user_mode(regs) && (trap == 0x380 || address >= TASK_SIZE))
+		return SIGSEGV;
 
 	if (error_code & 0x00400000) {
 		if (debugger_dabr_match(regs))
-			return;
+			return 0;
 	}
 
 	if (in_atomic() || mm == NULL) {
-		bad_page_fault(regs, address, SIGSEGV);
-		return;
+		if (!user_mode(regs))
+			return SIGSEGV;
+		/* in_atomic() in user mode is really bad,
+		   as is current->mm == NULL. */
+		printk(KERN_EMERG "Page fault in user mode with"
+		       "in_atomic() = %d mm = %p\n", in_atomic(), mm);
+		printk(KERN_EMERG "NIP = %lx  MSR = %lx\n",
+		       regs->nip, regs->msr);
+		die("Weird page fault", regs, SIGSEGV);
+	}
+
+	/* When running in the kernel we expect faults to occur only to
+	 * addresses in user space.  All other faults represent errors in the
+	 * kernel and should generate an OOPS.  Unfortunatly, in the case of an
+	 * erroneous fault occuring in a code path which already holds mmap_sem
+	 * we will deadlock attempting to validate the fault against the
+	 * address space.  Luckily the kernel only validly references user
+	 * space from well defined areas of code, which are listed in the
+	 * exceptions table.
+	 *
+	 * As the vast majority of faults will be valid we will only perform
+	 * the source reference check when there is a possibilty of a deadlock.
+	 * Attempt to lock the address space, if we cannot we then validate the
+	 * source.  If this is invalid we can skip the address space check,
+	 * thus avoiding the deadlock.
+	 */
+	if (!down_read_trylock(&mm->mmap_sem)) {
+		if (!user_mode(regs) && !search_exception_tables(regs->nip))
+			goto bad_area_nosemaphore;
+
+		down_read(&mm->mmap_sem);
 	}
-	down_read(&mm->mmap_sem);
+
 	vma = find_vma(mm, address);
 	if (!vma)
 		goto bad_area;
@@ -195,11 +225,12 @@
 	}
 
 	up_read(&mm->mmap_sem);
-	return;
+	return 0;
 
 bad_area:
 	up_read(&mm->mmap_sem);
 
+bad_area_nosemaphore:
 	/* User mode accesses cause a SIGSEGV */
 	if (user_mode(regs)) {
 		info.si_signo = SIGSEGV;
@@ -207,11 +238,10 @@
 		info.si_code = code;
 		info.si_addr = (void *) address;
 		force_sig_info(SIGSEGV, &info, current);
-		return;
+		return 0;
 	}
 
-	bad_page_fault(regs, address, SIGSEGV);
-	return;
+	return SIGSEGV;
 
 /*
  * We ran out of memory, or some other thing happened to us that made
@@ -227,18 +257,19 @@
 	printk("VM: killing process %s\n", current->comm);
 	if (user_mode(regs))
 		do_exit(SIGKILL);
-	bad_page_fault(regs, address, SIGKILL);
-	return;
+	return SIGKILL;
 
 do_sigbus:
 	up_read(&mm->mmap_sem);
-	info.si_signo = SIGBUS;
-	info.si_errno = 0;
-	info.si_code = BUS_ADRERR;
-	info.si_addr = (void *)address;
-	force_sig_info (SIGBUS, &info, current);
-	if (!user_mode(regs))
-		bad_page_fault(regs, address, SIGBUS);
+	if (user_mode(regs)) {
+		info.si_signo = SIGBUS;
+		info.si_errno = 0;
+		info.si_code = BUS_ADRERR;
+		info.si_addr = (void *)address;
+		force_sig_info(SIGBUS, &info, current);
+		return 0;
+	}
+	return SIGBUS;
 }
 
 /*
--- diff/arch/ppc64/mm/hash_utils.c	2004-05-19 22:11:19.000000000 +0100
+++ source/arch/ppc64/mm/hash_utils.c	2004-07-01 21:32:34.000000000 +0100
@@ -251,6 +251,7 @@
 	struct mm_struct *mm;
 	pte_t *ptep;
 	int ret;
+	int cpu;
 	int user_region = 0;
 	int local = 0;
 	cpumask_t tmp;
@@ -302,7 +303,8 @@
 	if (pgdir == NULL)
 		return 1;
 
-	tmp = cpumask_of_cpu(smp_processor_id());
+	cpu = get_cpu();
+	tmp = cpumask_of_cpu(cpu);
 	if (user_region && cpus_equal(mm->cpu_vm_mask, tmp))
 		local = 1;
 
@@ -311,11 +313,13 @@
 		ret = hash_huge_page(mm, access, ea, vsid, local);
 	else {
 		ptep = find_linux_pte(pgdir, ea);
-		if (ptep == NULL)
+		if (ptep == NULL) {
+			put_cpu();
 			return 1;
+		}
 		ret = __hash_page(ea, access, vsid, ptep, trap, local);
 	}
-
+	put_cpu();
 
 	return ret;
 }
--- diff/arch/ppc64/mm/hugetlbpage.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/mm/hugetlbpage.c	2004-07-01 21:32:34.000000000 +0100
@@ -375,6 +375,7 @@
 	unsigned long addr;
 	hugepte_t *ptep;
 	struct page *page;
+	int cpu;
 	int local = 0;
 	cpumask_t tmp;
 
@@ -383,7 +384,8 @@
 	BUG_ON((end % HPAGE_SIZE) != 0);
 
 	/* XXX are there races with checking cpu_vm_mask? - Anton */
-	tmp = cpumask_of_cpu(smp_processor_id());
+	cpu = get_cpu();
+	tmp = cpumask_of_cpu(cpu);
 	if (cpus_equal(vma->vm_mm->cpu_vm_mask, tmp))
 		local = 1;
 
@@ -406,6 +408,7 @@
 
 		put_page(page);
 	}
+	put_cpu();
 
 	mm->rss -= (end - start) >> PAGE_SHIFT;
 }
--- diff/arch/ppc64/mm/init.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/mm/init.c	2004-07-01 21:32:34.000000000 +0100
@@ -89,15 +89,15 @@
 
 void show_mem(void)
 {
-	int total = 0, reserved = 0;
-	int shared = 0, cached = 0;
+	unsigned long total = 0, reserved = 0;
+	unsigned long shared = 0, cached = 0;
 	struct page *page;
 	pg_data_t *pgdat;
 	unsigned long i;
 
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	for_each_pgdat(pgdat) {
 		for (i = 0; i < pgdat->node_spanned_pages; i++) {
 			page = pgdat->node_mem_map + i;
@@ -110,10 +110,10 @@
 				shared += page_count(page) - 1;
 		}
 	}
-	printk("%d pages of RAM\n",total);
-	printk("%d reserved pages\n",reserved);
-	printk("%d pages shared\n",shared);
-	printk("%d pages swap cached\n",cached);
+	printk("%ld pages of RAM\n", total);
+	printk("%ld reserved pages\n", reserved);
+	printk("%ld pages shared\n", shared);
+	printk("%ld pages swap cached\n", cached);
 }
 
 #ifdef CONFIG_PPC_ISERIES
@@ -764,6 +764,7 @@
 	void *pgdir;
 	pte_t *ptep;
 	int local = 0;
+	int cpu;
 	cpumask_t tmp;
 
 	/* handle i-cache coherency */
@@ -794,12 +795,14 @@
 
 	vsid = get_vsid(vma->vm_mm->context.id, ea);
 
-	tmp = cpumask_of_cpu(smp_processor_id());
+	cpu = get_cpu();
+	tmp = cpumask_of_cpu(cpu);
 	if (cpus_equal(vma->vm_mm->cpu_vm_mask, tmp))
 		local = 1;
 
 	__hash_page(ea, pte_val(pte) & (_PAGE_USER|_PAGE_RW), vsid, ptep,
 		    0x300, local);
+	put_cpu();
 }
 
 void * reserve_phb_iospace(unsigned long size)
--- diff/arch/ppc64/mm/numa.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/mm/numa.c	2004-07-01 21:32:34.000000000 +0100
@@ -457,7 +457,7 @@
 		zones_size[ZONE_DMA] = end_pfn - start_pfn;
 		zholes_size[ZONE_DMA] = 0;
 		if (nid == 0)
-			zholes_size[ZONE_DMA] = node0_io_hole_size;
+			zholes_size[ZONE_DMA] = node0_io_hole_size >> PAGE_SHIFT;
 
 		dbg("free_area_init node %d %lx %lx (hole: %lx)\n", nid,
 		    zones_size[ZONE_DMA], start_pfn, zholes_size[ZONE_DMA]);
--- diff/arch/ppc64/mm/tlb.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/mm/tlb.c	2004-07-01 21:32:34.000000000 +0100
@@ -41,6 +41,33 @@
 DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
 unsigned long pte_freelist_forced_free;
 
+void __pte_free_tlb(struct mmu_gather *tlb, struct page *ptepage)
+{
+	/* This is safe as we are holding page_table_lock */
+        cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());
+	struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
+
+	if (atomic_read(&tlb->mm->mm_users) < 2 ||
+	    cpus_equal(tlb->mm->cpu_vm_mask, local_cpumask)) {
+		pte_free(ptepage);
+		return;
+	}
+
+	if (*batchp == NULL) {
+		*batchp = (struct pte_freelist_batch *)__get_free_page(GFP_ATOMIC);
+		if (*batchp == NULL) {
+			pte_free_now(ptepage);
+			return;
+		}
+		(*batchp)->index = 0;
+	}
+	(*batchp)->pages[(*batchp)->index++] = ptepage;
+	if ((*batchp)->index == PTE_FREELIST_SIZE) {
+		pte_free_submit(*batchp);
+		*batchp = NULL;
+	}
+}
+
 /*
  * Update the MMU hash table to correspond with a change to
  * a Linux PTE.  If wrprot is true, it is permissible to
@@ -91,12 +118,15 @@
 void __flush_tlb_pending(struct ppc64_tlb_batch *batch)
 {
 	int i;
-	cpumask_t tmp = cpumask_of_cpu(smp_processor_id());
+	int cpu;
+	cpumask_t tmp;
 	int local = 0;
 
 	BUG_ON(in_interrupt());
 
+	cpu = get_cpu();
 	i = batch->index;
+	tmp = cpumask_of_cpu(cpu);
 	if (cpus_equal(batch->mm->cpu_vm_mask, tmp))
 		local = 1;
 
@@ -106,6 +136,7 @@
 	else
 		flush_hash_range(batch->context, i, local);
 	batch->index = 0;
+	put_cpu();
 }
 
 #ifdef CONFIG_SMP
@@ -127,9 +158,10 @@
 	pte_free(ptepage);
 }
 
-static void pte_free_rcu_callback(void *arg)
+static void pte_free_rcu_callback(struct rcu_head *head)
 {
-	struct pte_freelist_batch *batch = arg;
+	struct pte_freelist_batch *batch =
+		container_of(head, struct pte_freelist_batch, rcu);
 	unsigned int i;
 
 	for (i = 0; i < batch->index; i++)
@@ -140,7 +172,7 @@
 void pte_free_submit(struct pte_freelist_batch *batch)
 {
 	INIT_RCU_HEAD(&batch->rcu);
-	call_rcu(&batch->rcu, pte_free_rcu_callback, batch);
+	call_rcu(&batch->rcu, pte_free_rcu_callback);
 }
 
 void pte_free_finish(void)
--- diff/arch/ppc64/oprofile/common.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/oprofile/common.c	2004-07-01 21:32:34.000000000 +0100
@@ -154,8 +154,8 @@
 			oprof_ppc64_ops.cpu_type = "ppc64/power4";
 			break;
 
-		case PV_GPUL:
-		case PV_GPULp:
+		case PV_970:
+		case PV_970FX:
 			model = &op_model_power4;
 			model->num_counters = 8;
 			oprof_ppc64_ops.cpu_type = "ppc64/970";
--- diff/arch/ppc64/oprofile/op_model_power4.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/oprofile/op_model_power4.c	2004-07-01 21:32:34.000000000 +0100
@@ -42,7 +42,7 @@
 	 *
 	 * It has been verified to work on POWER5 so we enable it there.
 	 */
-	if (!(__is_processor(PV_POWER4) || __is_processor(PV_POWER4p)))
+	if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA_SIHV)
 		mmcra_has_sihv = 1;
 
 	for (i = 0; i < num_counters; ++i)
--- diff/arch/ppc64/xmon/xmon.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc64/xmon/xmon.c	2004-07-01 21:32:34.000000000 +0100
@@ -44,9 +44,6 @@
 static int xmon_gate;
 #endif /* CONFIG_SMP */
 
-#define TRAP(regs)	((regs)->trap)
-#define FULL_REGS(regs)	1
-
 static unsigned long in_xmon = 0;
 
 static unsigned long adrs;
--- diff/arch/s390/defconfig	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/s390/defconfig	2004-07-01 21:32:34.000000000 +0100
@@ -422,7 +422,7 @@
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V4 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=y
--- diff/arch/s390/kernel/init_task.c	2004-05-19 22:11:20.000000000 +0100
+++ source/arch/s390/kernel/init_task.c	2004-07-01 21:32:34.000000000 +0100
@@ -10,6 +10,7 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/init_task.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/s390/kernel/s390_ksyms.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/s390/kernel/s390_ksyms.c	2004-07-01 21:32:34.000000000 +0100
@@ -76,4 +76,3 @@
 EXPORT_SYMBOL_NOVERS(do_call_softirq);
 EXPORT_SYMBOL(sys_wait4);
 EXPORT_SYMBOL(cpcmd);
-EXPORT_SYMBOL(sys_ioctl);
--- diff/arch/s390/kernel/setup.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/s390/kernel/setup.c	2004-07-01 21:32:34.000000000 +0100
@@ -76,7 +76,6 @@
 #include <asm/setup.h>
 
 static char command_line[COMMAND_LINE_SIZE] = { 0, };
-       char saved_command_line[COMMAND_LINE_SIZE];
 
 static struct resource code_resource = { "Kernel code", 0x100000, 0 };
 static struct resource data_resource = { "Kernel data", 0, 0 };
--- diff/arch/s390/kernel/smp.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/s390/kernel/smp.c	2004-07-01 21:32:34.000000000 +0100
@@ -567,14 +567,11 @@
                 printk("failed fork for CPU %d", cpu);
 		return -EIO;
 	}
-	wake_up_forked_process(idle);
 
-        /*
-         * We remove it from the pidhash and the runqueue
-         * once we got the process:
-         */
+	/* Make this the idle thread */
 	init_idle(idle, cpu);
 
+	/* Remove it from the pidhash */
         unhash_process(idle);
 
         cpu_lowcore = lowcore_ptr[cpu];
--- diff/arch/s390/mm/init.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/s390/mm/init.c	2004-07-01 21:32:34.000000000 +0100
@@ -60,7 +60,7 @@
 
         printk("Mem-info:\n");
         show_free_areas();
-        printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+        printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
         i = max_mapnr;
         while (i-- > 0) {
                 total++;
--- diff/arch/sh/Kconfig	2004-05-19 22:11:20.000000000 +0100
+++ source/arch/sh/Kconfig	2004-07-01 21:32:34.000000000 +0100
@@ -45,6 +45,12 @@
 	  Select 7751 SolutionEngine if configuring for a Hitachi SH7751
 	  evalutation board.
 
+config SH_7300_SOLUTION_ENGINE
+	bool "SolutionEngine7300"
+	help
+	  Select 7300 SolutionEngine if configuring for a Hitachi SH7300(SH-Mobile V)
+	  evalutation board.
+
 config SH_7751_SYSTEMH
 	bool "SystemH7751R"
 	help
@@ -138,6 +144,18 @@
 	  This includes both the OEM SecureEdge products as well as the
 	  SME product line.
 
+config SH_HS7751RVOIP
+	bool "HS7751RVOIP"
+	help
+	  Select HS7751RVOIP if configuring for a Renesas Technology
+	  Sales VoIP board.
+
+config SH_RTS7751R2D
+	bool "RTS7751R2D"
+	help
+	  Select RTS7751R2D if configuring for a Renesas Technology
+	  Sales SH-Graphics board.
+
 config SH_UNKNOWN
 	bool "BareCPU"
 	help
@@ -186,7 +204,11 @@
 config CPU_SUBTYPE_SH7300
 	bool "SH7300"
 	depends on CPU_SH3
-	  
+
+config CPU_SUBTYPE_SH7705
+	bool "SH7705"
+	depends on CPU_SH3
+
 config CPU_SUBTYPE_SH7707
 	bool "SH7707"
 	depends on CPU_SH3
@@ -224,10 +246,17 @@
 	depends on CPU_SH4
 
 config CPU_SUBTYPE_ST40STB1
-	bool "ST40STB1"
-	depends on CPU_SH4
-	help
-	  Select ST40STB1 if you have a ST40STB1 CPU.
+       bool "ST40STB1 / ST40RA"
+       depends on CPU_SH4
+       help
+         Select ST40STB1 if you have a ST40RA CPU.
+         This was previously called the ST40STB1, hence the option name.
+
+config CPU_SUBTYPE_ST40GX1
+       bool "ST40GX1"
+       depends on CPU_SH4
+       help
+         Select ST40GX1 if you have a ST40GX1 CPU.
 
 endchoice
 
@@ -268,7 +297,7 @@
 config MEMORY_START
 	hex "Physical memory start address" if !MEMORY_SET || MEMORY_OVERRIDE
 	default "0x08000000" if !MEMORY_SET || MEMORY_OVERRIDE || !MEMORY_OVERRIDE && SH_ADX || SH_MPC1211 || SH_SECUREEDGE5410
-	default "0x0c000000" if !MEMORY_OVERRIDE && (SH_DREAMCAST || SH_HP600 || SH_BIGSUR || SH_SH2000 || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE)
+	default "0x0c000000" if !MEMORY_OVERRIDE && (SH_DREAMCAST || SH_HP600 || SH_BIGSUR || SH_SH2000 || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE || SH_HS7751RVOIP || SH_RTS7751R2D)
 	---help---
 	  Computers built with Hitachi SuperH processors always
 	  map the ROM starting at address zero.  But the processor
@@ -287,7 +316,7 @@
 	hex "Physical memory size" if !MEMORY_SET || MEMORY_OVERRIDE
 	default "0x00400000" if !MEMORY_SET || MEMORY_OVERRIDE || !MEMORY_OVERRIDE && SH_ADX || !MEMORY_OVERRIDE && (SH_HP600 || SH_BIGSUR || SH_SH2000)
 	default "0x01000000" if !MEMORY_OVERRIDE && SH_DREAMCAST || SH_SECUREEDGE5410
-	default "0x04000000" if !MEMORY_OVERRIDE && SH_7751_SOLUTION_ENGINE
+	default "0x04000000" if !MEMORY_OVERRIDE && (SH_7751_SOLUTION_ENGINE || SH_HS7751RVOIP || SH_RTS7751R2D)
 	default "0x02000000" if !MEMORY_OVERRIDE && SH_SOLUTION_ENGINE
 	default "0x08000000" if SH_MPC1211
 	help
@@ -299,7 +328,7 @@
 
 config MEMORY_SET
 	bool
-	depends on !MEMORY_OVERRIDE && (SH_MPC1211 || SH_ADX || SH_DREAMCAST || SH_HP600 || SH_BIGSUR || SH_SH2000 || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE || SH_SECUREEDGE5410)
+	depends on !MEMORY_OVERRIDE && (SH_MPC1211 || SH_ADX || SH_DREAMCAST || SH_HP600 || SH_BIGSUR || SH_SH2000 || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE || SH_SECUREEDGE5410 || SH_HS7751RVOIP || SH_RTS7751R2D)
 	default y
 	help
 	  This is an option about which you will never be asked a question.
@@ -358,7 +387,7 @@
 # The SH7750 RTC module is disabled in the Dreamcast
 config SH_RTC
 	bool
-	depends on !SH_DREAMCAST && !SH_SATURN
+	depends on !SH_DREAMCAST && !SH_SATURN && !SH_7300_SOLUTION_ENGINE
 	default y
 	help
 	  Selecting this option will allow the Linux kernel to emulate
@@ -377,11 +406,26 @@
 
 	  This option must be set in order to enable the DSP.
 
+config SH_ADC
+	bool "ADC support"
+	depends on CPU_SH3
+	default y
+	help
+	  Selecting this option will allow the Linux kernel to use SH3 on-chip
+	  ADC module.
+
+	  If unsure, say N.
+
 config SH_HP600
 	bool
 	depends on SH_HP620 || SH_HP680 || SH_HP690
 	default y
 
+config CPU_SUBTYPE_ST40
+       bool
+       depends on CPU_SUBTYPE_ST40STB1 || CPU_SUBTYPE_ST40GX1
+       default y
+
 config DISCONTIGMEM
 	bool
 	depends on SH_HP690
@@ -514,10 +558,32 @@
 	  This is purely to save memory - each supported CPU adds
 	  approximately eight kilobytes to the kernel image.
 
+config HS7751RVOIP_CODEC
+	bool "Support VoIP Codec section"
+	depends on SH_HS7751RVOIP
+	help
+	  Selecting this option will support CODEC section.
+
+config RTS7751R2D_REV11
+	bool "RTS7751R2D Rev. 1.1 board support"
+	depends on SH_RTS7751R2D
+	help
+	  Selecting this option will support version rev. 1.1.
+
+config SH_PCLK_CALC
+	bool
+	default n if CPU_SUBTYPE_SH7300
+	default y
+	help
+	  This option will cause the PCLK value to be probed at run-time. It
+	  will display a notification if the probed value has greater than a
+	  1% variance of the hardcoded CONFIG_SH_PCLK_FREQ.
+
 config SH_PCLK_FREQ
 	int "Peripheral clock frequency (in Hz)"
 	default "49876504" if CPU_SUBTYPE_SH7750
 	default "60013568" if CPU_SUBTYPE_SH7751
+	default "33333333" if CPU_SUBTYPE_SH7300
 	default "1193182"
 	help
 	  This option is used to specify the peripheral clock frequency. This
@@ -570,12 +636,18 @@
 
 config HEARTBEAT
 	bool "Heartbeat LED"
-	depends on SH_MPC1211 || SH_CAT68701 || SH_STB1_HARP || SH_STB1_OVERDRIVE || SH_BIGSUR || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE
+	depends on SH_MPC1211 || SH_CAT68701 || SH_STB1_HARP || SH_STB1_OVERDRIVE || SH_BIGSUR || SH_7751_SOLUTION_ENGINE || SH_7300_SOLUTION_ENGINE || SH_SOLUTION_ENGINE || SH_RTS7751R2D
 	help
 	  Use the power-on LED on your machine as a load meter.  The exact
 	  behavior is platform-dependent, but normally the flash frequency is
 	  a hyperbolic function of the 5-minute load average.
 
+config RTC_9701JE
+	tristate "EPSON RTC-9701JE support"
+	depends on SH_RTS7751R2D
+	help
+	  Selecting this option will support EPSON RTC-9701JE.
+
 endmenu
 
 
@@ -646,6 +718,24 @@
 
 endmenu
 
+menu "SH initrd options"
+	depends on BLK_DEV_INITRD
+
+config EMBEDDED_RAMDISK
+	bool "Embed root filesystem ramdisk into the kernel"
+
+config EMBEDDED_RAMDISK_IMAGE
+	string "Filename of gziped ramdisk image"
+	depends on EMBEDDED_RAMDISK
+	default "ramdisk.gz"
+	help
+	  This is the filename of the ramdisk image to be built into the
+	  kernel.  Relative pathnames are relative to arch/mips/ramdisk/.
+	  The ramdisk image is not part of the kernel distribution; you must
+	  provide one yourself.
+
+endmenu
+
 source "drivers/Kconfig"
 
 source "fs/Kconfig"
@@ -675,6 +765,14 @@
 	  best used in conjunction with the NMI watchdog so that spinlock
 	  deadlocks are also debuggable.
 
+config DEBUG_INFO
+        bool "Compile the kernel with debug info"
+        help
+          If you say Y here the resulting kernel image will include
+          debugging info resulting in a larger kernel image.
+          Say Y here only if you plan to use gdb to debug the kernel.
+          If you don't debug the kernel, you can say N.
+
 config SH_STANDARD_BIOS
 	bool "Use LinuxSH standard BIOS"
 	help
@@ -688,9 +786,13 @@
 	  mask ROM and no flash (WindowsCE machines fall in this category).
 	  If unsure, say N.
 
-config SH_EARLY_PRINTK
+config EARLY_SCIF_CONSOLE
+	bool "Use early SCIF console"
+	depends on CPU_SH4
+
+config EARLY_PRINTK
 	bool "Early printk support"
-	depends on SH_STANDARD_BIOS
+	depends on SH_STANDARD_BIOS || EARLY_SCIF_CONSOLE
 	help
 	  Say Y here to redirect kernel printk messages to the serial port
 	  used by the SH-IPL bootloader, starting very early in the boot
--- diff/arch/sh/Makefile	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -1,11 +1,11 @@
-# $Id: Makefile,v 1.34 2004/03/21 17:31:06 lethal Exp $
+# $Id: Makefile,v 1.35 2004/04/15 03:39:20 sugioka Exp $
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
 # for more details.
 #
 # Copyright (C) 1999  Kaz Kojima
-# Copyright (C) 2002, 2003  Paul Mundt
+# Copyright (C) 2002, 2003, 2004  Paul Mundt
 # Copyright (C) 2002  M. R. Brown
 #
 # This file is included by the global makefile so that you can add your own
@@ -64,10 +64,18 @@
 
 core-y				+= arch/sh/kernel/ arch/sh/mm/
 
+#
+# ramdisk/initrd support
+# You need a compressed ramdisk image, named
+# CONFIG_EMBEDDED_RAMDISK_IMAGE. Relative pathnames
+# are relative to arch/sh/ramdisk/.
+#
+core-$(CONFIG_EMBEDDED_RAMDISK)	+= arch/sh/ramdisk/
+
 # Boards
 machdir-$(CONFIG_SH_SOLUTION_ENGINE)		:= se/770x
 machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)	:= se/7751
-machdir-$(CONFIG_SH_7751_SYSTEMH)		:= systemh
+machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE)	:= se/7300
 machdir-$(CONFIG_SH_STB1_HARP)			:= harp
 machdir-$(CONFIG_SH_STB1_OVERDRIVE)		:= overdrive
 machdir-$(CONFIG_SH_HP620)			:= hp6xx/hp620
@@ -84,19 +92,24 @@
 machdir-$(CONFIG_SH_ADX)			:= adx
 machdir-$(CONFIG_SH_MPC1211)			:= mpc1211
 machdir-$(CONFIG_SH_SECUREEDGE5410)		:= snapgear
+machdir-$(CONFIG_SH_HS7751RVOIP)		:= renesas/hs7751rvoip
+machdir-$(CONFIG_SH_RTS7751R2D)			:= renesas/rts7751r2d
+machdir-$(CONFIG_SH_7751_SYSTEMH)		:= renesas/systemh
 machdir-$(CONFIG_SH_UNKNOWN)			:= unknown
 
-incdir-y			:= $(machdir-y)
+incdir-y			:= $(notdir $(machdir-y))
 
 incdir-$(CONFIG_SH_SOLUTION_ENGINE)		:= se
 incdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)	:= se7751
+incdir-$(CONFIG_SH_7300_SOLUTION_ENGINE)        := se7300
 incdir-$(CONFIG_SH_HP600)			:= hp6xx
 
 core-y				+= arch/sh/boards/$(machdir-y)/
 
 # Companion chips
-core-$(CONFIG_HD64461)	+= arch/sh/cchips/hd6446x/hd64461/
-core-$(CONFIG_HD64465)	+= arch/sh/cchips/hd6446x/hd64465/
+core-$(CONFIG_HD64461)		+= arch/sh/cchips/hd6446x/hd64461/
+core-$(CONFIG_HD64465)		+= arch/sh/cchips/hd6446x/hd64465/
+core-$(CONFIG_VOYAGERGX)	+= arch/sh/cchips/voyagergx/
 
 cpuincdir-$(CONFIG_CPU_SH2)	:= cpu-sh2
 cpuincdir-$(CONFIG_CPU_SH3)	:= cpu-sh3
@@ -114,6 +127,9 @@
 prepare: target_links
 
 .PHONY: target_links FORCE
+
+all: zImage
+
 target_links:
 	@echo '  Making asm-sh/cpu -> asm-sh/$(cpuincdir-y) link'
 	@rm -f include/asm-sh/cpu
--- diff/arch/sh/boot/compressed/Makefile	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/boot/compressed/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -15,7 +15,11 @@
 
 #
 # IMAGE_OFFSET is the load offset of the compression loader
+# Assign dummy values if these 2 variables are not defined,
+# in order to suppress error message.
 #
+CONFIG_MEMORY_START     ?= 0x0c000000
+CONFIG_BOOT_LINK_OFFSET ?= 0x00800000
 IMAGE_OFFSET := $(shell printf "0x%8x" $$[0x80000000+$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
 
 LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds.s
--- diff/arch/sh/boot/compressed/misc.c	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/boot/compressed/misc.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  * arch/sh/boot/compressed/misc.c
- * 
- * This is a collection of several routines from gzip-1.0.3 
+ *
+ * This is a collection of several routines from gzip-1.0.3
  * adapted for Linux.
  *
  * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
@@ -52,7 +52,7 @@
 #define RESERVED     0xC0 /* bit 6,7:   reserved */
 
 #define get_byte()  (inptr < insize ? inbuf[inptr++] : fill_inbuf())
-		
+
 /* Diagnostic functions */
 #ifdef DEBUG
 #  define Assert(cond,msg) {if(!(cond)) error(msg);}
@@ -75,7 +75,7 @@
 static void error(char *m);
 static void gzip_mark(void **);
 static void gzip_release(void **);
-  
+
 extern char input_data[];
 extern int input_len;
 
@@ -83,20 +83,19 @@
 static uch *output_data;
 static unsigned long output_ptr = 0;
 
- 
 static void *malloc(int size);
 static void free(void *where);
 static void error(char *m);
 static void gzip_mark(void **);
 static void gzip_release(void **);
- 
-static void puts(const char *);
-  
+
+int puts(const char *);
+
 extern int _text;		/* Defined in vmlinux.lds.S */
 extern int _end;
 static unsigned long free_mem_ptr;
 static unsigned long free_mem_end_ptr;
- 
+
 #define HEAP_SIZE             0x10000
 
 #include "../../../../lib/inflate.c"
@@ -134,7 +133,7 @@
 }
 
 #ifdef CONFIG_SH_STANDARD_BIOS
-static int strlen(const char *s)
+size_t strlen(const char *s)
 {
 	int i = 0;
 
@@ -143,14 +142,17 @@
 	return i;
 }
 
-void puts(const char *s)
+int puts(const char *s)
 {
-	sh_bios_console_write(s, strlen(s));
+	int len = strlen(s);
+	sh_bios_console_write(s, len);
+	return len;
 }
 #else
-void puts(const char *s)
+int puts(const char *s)
 {
-  /* This should be updated to use the sh-sci routines */
+	/* This should be updated to use the sh-sci routines */
+	return 0;
 }
 #endif
 
@@ -198,9 +200,9 @@
     ulg c = crc;         /* temporary variable */
     unsigned n;
     uch *in, *out, ch;
-    
+
     in = window;
-    out = &output_data[output_ptr]; 
+    out = &output_data[output_ptr];
     for (n = 0; n < outcnt; n++) {
 	    ch = *out++ = *in++;
 	    c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
--- diff/arch/sh/cchips/Kconfig	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/cchips/Kconfig	2004-07-01 21:32:34.000000000 +0100
@@ -1,5 +1,18 @@
 menu "Companion Chips"
 
+config VOYAGERGX
+	bool "VoyagerGX chip support"
+	depends on SH_RTS7751R2D
+	help
+	  Selecting this option will support Silicon Motion, Inc. SM501.
+	  Designed to complement needs for the embedded industry, it
+	  provides video and 2D capability. To reduce system cost a
+	  wide variety of include I/O is supported, including analog RGB
+	  and digital LCD Panel interface, 8-bit parallel interface, USB,
+	  UART, IrDA, Zoom Video, AC97 or I2S, SSP, PWM, and I2C. There
+	  are additional GPIO bits that can be used to interface to
+	  external as well.
+
 # A board must have defined HD6446X_SERIES in order to see these
 config HD6446X_SERIES
 	bool "HD6446x support"
--- diff/arch/sh/cchips/hd6446x/hd64461/setup.c	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/cchips/hd6446x/hd64461/setup.c	2004-07-01 21:32:34.000000000 +0100
@@ -134,7 +134,7 @@
 	return __irq_demux(irq);
 }
 
-static struct irqaction irq0 = { hd64461_interrupt, SA_INTERRUPT, 0, "HD64461", NULL, NULL };
+static struct irqaction irq0 = { hd64461_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "HD64461", NULL, NULL };
 
 int __init setup_hd64461(void)
 {
--- diff/arch/sh/cchips/hd6446x/hd64465/setup.c	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/cchips/hd6446x/hd64465/setup.c	2004-07-01 21:32:34.000000000 +0100
@@ -154,7 +154,7 @@
 	return irq;
 }
 
-static struct irqaction irq0  = { hd64465_interrupt, SA_INTERRUPT, 0, "HD64465", NULL, NULL};
+static struct irqaction irq0  = { hd64465_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "HD64465", NULL, NULL};
 
 
 static int __init setup_hd64465(void)
--- diff/arch/sh/defconfig	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/defconfig	2004-07-01 21:32:34.000000000 +0100
@@ -352,7 +352,7 @@
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 CONFIG_SH_STANDARD_BIOS=y
-CONFIG_SH_EARLY_PRINTK=y
+CONFIG_EARLY_PRINTK=y
 # CONFIG_KGDB is not set
 # CONFIG_FRAME_POINTER is not set
 
--- diff/arch/sh/drivers/dma/Makefile	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/dma/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -3,6 +3,7 @@
 #
 
 obj-y				+= dma-api.o dma-isa.o
+obj-$(CONFIG_SYSFS)		+= dma-sysfs.o
 obj-$(CONFIG_SH_DMA)		+= dma-sh.o
 obj-$(CONFIG_SH_DREAMCAST)	+= dma-pvr2.o dma-g2.o
 
--- diff/arch/sh/drivers/dma/dma-api.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/dma/dma-api.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,23 +3,24 @@
  *
  * SuperH-specific DMA management API
  *
- * Copyright (C) 2003  Paul Mundt
+ * Copyright (C) 2003, 2004  Paul Mundt
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
- */ 
+ */
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/proc_fs.h>
+#include <linux/list.h>
 #include <asm/dma.h>
 
-struct dma_info dma_info[MAX_DMA_CHANNELS] = { { 0, } };
 spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
+static LIST_HEAD(registered_dmac_list);
 
-/* 
+/*
  * A brief note about the reasons for this API as it stands.
  *
  * For starters, the old ISA DMA API didn't work for us for a number of
@@ -54,124 +55,213 @@
 
 struct dma_info *get_dma_info(unsigned int chan)
 {
-	return dma_info + chan;
+	struct list_head *pos, *tmp;
+	unsigned int total = 0;
+
+	/*
+	 * Look for each DMAC's range to determine who the owner of
+	 * the channel is.
+	 */
+	list_for_each_safe(pos, tmp, &registered_dmac_list) {
+		struct dma_info *info = list_entry(pos, struct dma_info, list);
+
+		total += info->nr_channels;
+		if (chan > total)
+			continue;
+
+		return info;
+	}
+
+	return NULL;
+}
+
+struct dma_channel *get_dma_channel(unsigned int chan)
+{
+	struct dma_info *info = get_dma_info(chan);
+
+	if (!info)
+		return ERR_PTR(-EINVAL);
+
+	return info->channels + chan;
 }
 
 int get_dma_residue(unsigned int chan)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
 	if (info->ops->get_residue)
-		return info->ops->get_residue(info);
-	
+		return info->ops->get_residue(channel);
+
 	return 0;
 }
 
 int request_dma(unsigned int chan, const char *dev_id)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
-	down(&info->sem);
+	down(&channel->sem);
 
 	if (!info->ops || chan >= MAX_DMA_CHANNELS) {
-		up(&info->sem);
+		up(&channel->sem);
 		return -EINVAL;
 	}
-	
-	atomic_set(&info->busy, 1);
 
-	info->dev_id = dev_id;
+	atomic_set(&channel->busy, 1);
 
-	up(&info->sem);
+	strlcpy(channel->dev_id, dev_id, sizeof(channel->dev_id));
+
+	up(&channel->sem);
 
 	if (info->ops->request)
-		return info->ops->request(info);
-	
+		return info->ops->request(channel);
+
 	return 0;
 }
 
 void free_dma(unsigned int chan)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
 	if (info->ops->free)
-		info->ops->free(info);
-	
-	atomic_set(&info->busy, 0);
+		info->ops->free(channel);
+
+	atomic_set(&channel->busy, 0);
 }
 
 void dma_wait_for_completion(unsigned int chan)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
-	if (info->tei_capable) {
-		wait_event(info->wait_queue, (info->ops->get_residue(info) == 0));
+	if (channel->flags & DMA_TEI_CAPABLE) {
+		wait_event(channel->wait_queue,
+			   (info->ops->get_residue(channel) == 0));
 		return;
 	}
 
-	while (info->ops->get_residue(info))
+	while (info->ops->get_residue(channel))
 		cpu_relax();
 }
 
 void dma_configure_channel(unsigned int chan, unsigned long flags)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
 	if (info->ops->configure)
-		info->ops->configure(info, flags);
+		info->ops->configure(channel, flags);
 }
 
 int dma_xfer(unsigned int chan, unsigned long from,
 	     unsigned long to, size_t size, unsigned int mode)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
-	info->sar	= from;
-	info->dar	= to;
-	info->count	= size;
-	info->mode	= mode;
+	channel->sar	= from;
+	channel->dar	= to;
+	channel->count	= size;
+	channel->mode	= mode;
 
-	return info->ops->xfer(info);
+	return info->ops->xfer(channel);
 }
 
 #ifdef CONFIG_PROC_FS
 static int dma_read_proc(char *buf, char **start, off_t off,
 			 int len, int *eof, void *data)
 {
-	struct dma_info *info;
+	struct list_head *pos, *tmp;
 	char *p = buf;
-	int i;
 
-	for (i = 0, info = dma_info; i < MAX_DMA_CHANNELS; i++, info++) {
-		if (!atomic_read(&info->busy))
-			continue;
+	if (list_empty(&registered_dmac_list))
+		return 0;
 
-		p += sprintf(p, "%2d: %14s    %s\n", i,
-			     info->ops->name, info->dev_id);
+	/*
+	 * Iterate over each registered DMAC
+	 */
+	list_for_each_safe(pos, tmp, &registered_dmac_list) {
+		struct dma_info *info = list_entry(pos, struct dma_info, list);
+		int i;
+
+		/*
+		 * Iterate over each channel
+		 */
+		for (i = 0; i < info->nr_channels; i++) {
+			struct dma_channel *channel = info->channels + i;
+
+			if (!(channel->flags & DMA_CONFIGURED))
+				continue;
+
+			p += sprintf(p, "%2d: %14s    %s\n", i,
+				     info->name, channel->dev_id);
+		}
 	}
 
 	return p - buf;
 }
 #endif
 
-int __init register_dmac(struct dma_ops *ops)
+
+int __init register_dmac(struct dma_info *info)
 {
 	int i;
 
-	printk("DMA: Registering %s handler.\n", ops->name);
+	INIT_LIST_HEAD(&info->list);
+
+	printk(KERN_INFO "DMA: Registering %s handler (%d channels).\n",
+	       info->name, info->nr_channels);
+
+	BUG_ON((info->flags & DMAC_CHANNELS_CONFIGURED) && !info->channels);
+
+	/*
+	 * Don't touch pre-configured channels
+	 */
+	if (!(info->flags & DMAC_CHANNELS_CONFIGURED)) {
+		unsigned int size;
+
+		size = sizeof(struct dma_channel) * info->nr_channels;
+
+		info->channels = kmalloc(size, GFP_KERNEL);
+		if (!info->channels)
+			return -ENOMEM;
+
+		memset(info->channels, 0, size);
+	}
+
+	for (i = 0; i < info->nr_channels; i++) {
+		struct dma_channel *chan = info->channels + i;
+
+		chan->chan = i;
+
+		memcpy(chan->dev_id, "Unused", 7);
 
-	for (i = 0; i < MAX_DMA_CHANNELS; i++) {
-		struct dma_info *info = get_dma_info(i);
+		if (info->flags & DMAC_CHANNELS_TEI_CAPABLE)
+			chan->flags |= DMA_TEI_CAPABLE;
 
-		info->chan = i;
+		init_MUTEX(&chan->sem);
+		init_waitqueue_head(&chan->wait_queue);
 
-		init_MUTEX(&info->sem);
-		init_waitqueue_head(&info->wait_queue);
+#ifdef CONFIG_SYSFS
+		dma_create_sysfs_files(chan);
+#endif
 	}
 
+	list_add(&info->list, &registered_dmac_list);
+
 	return 0;
 }
 
+void __exit unregister_dmac(struct dma_info *info)
+{
+	if (!(info->flags & DMAC_CHANNELS_CONFIGURED))
+		kfree(info->channels);
+
+	list_del(&info->list);
+}
+
 static int __init dma_api_init(void)
 {
 	printk("DMA: Registering DMA API.\n");
@@ -191,8 +281,11 @@
 
 EXPORT_SYMBOL(request_dma);
 EXPORT_SYMBOL(free_dma);
+EXPORT_SYMBOL(register_dmac);
+EXPORT_SYMBOL(unregister_dmac);
 EXPORT_SYMBOL(get_dma_residue);
 EXPORT_SYMBOL(get_dma_info);
+EXPORT_SYMBOL(get_dma_channel);
 EXPORT_SYMBOL(dma_xfer);
 EXPORT_SYMBOL(dma_wait_for_completion);
 EXPORT_SYMBOL(dma_configure_channel);
--- diff/arch/sh/drivers/dma/dma-isa.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/dma/dma-isa.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,13 +3,14 @@
  *
  * Generic ISA DMA wrapper for SH DMA API
  *
- * Copyright (C) 2003  Paul Mundt
+ * Copyright (C) 2003, 2004  Paul Mundt
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
- */ 
+ */
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <asm/dma.h>
 
 /*
@@ -39,55 +40,67 @@
 
 	return flags;
 }
+EXPORT_SYMBOL(claim_dma_lock);
 
 void __deprecated release_dma_lock(unsigned long flags)
 {
 	spin_unlock_irqrestore(&dma_spin_lock, flags);
 }
+EXPORT_SYMBOL(release_dma_lock);
 
 void __deprecated disable_dma(unsigned int chan)
 {
 	/* Nothing */
 }
+EXPORT_SYMBOL(disable_dma);
 
 void __deprecated enable_dma(unsigned int chan)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
-	info->ops->xfer(info);
+	info->ops->xfer(channel);
 }
+EXPORT_SYMBOL(enable_dma);
 
 void clear_dma_ff(unsigned int chan)
 {
 	/* Nothing */
 }
+EXPORT_SYMBOL(clear_dma_ff);
 
 void set_dma_mode(unsigned int chan, char mode)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
-	info->mode = mode;
+	channel->mode = mode;
 }
+EXPORT_SYMBOL(set_dma_mode);
 
 void set_dma_addr(unsigned int chan, unsigned int addr)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
 	/*
 	 * Single address mode is the only thing supported through
 	 * this interface.
 	 */
-	if ((info->mode & DMA_MODE_MASK) == DMA_MODE_READ) {
-		info->sar = addr;
+	if ((channel->mode & DMA_MODE_MASK) == DMA_MODE_READ) {
+		channel->sar = addr;
 	} else {
-		info->dar = addr;
+		channel->dar = addr;
 	}
 }
+EXPORT_SYMBOL(set_dma_addr);
 
 void set_dma_count(unsigned int chan, unsigned int count)
 {
 	struct dma_info *info = get_dma_info(chan);
+	struct dma_channel *channel = &info->channels[chan];
 
-	info->count = count;
+	channel->count = count;
 }
+EXPORT_SYMBOL(set_dma_count);
 
--- diff/arch/sh/drivers/dma/dma-sh.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/dma/dma-sh.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,10 +1,10 @@
 /*
- * arch/sh/kernel/cpu/dma.c
+ * arch/sh/drivers/dma/dma-sh.c
  *
- * Copyright (C) 2000 Takashi YOSHII
- * Copyright (C) 2003 Paul Mundt
+ * SuperH On-chip DMAC Support
  *
- * PC like DMA API for SuperH's DMAC.
+ * Copyright (C) 2000 Takashi YOSHII
+ * Copyright (C) 2003, 2004 Paul Mundt
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
@@ -29,43 +29,29 @@
  * Defaults to a 64-bit transfer size.
  */
 enum {
-	XMIT_SZ_64BIT	= 0,
-	XMIT_SZ_8BIT	= 1,
-	XMIT_SZ_16BIT	= 2,
-	XMIT_SZ_32BIT	= 3,
-	XMIT_SZ_256BIT	= 4,
+	XMIT_SZ_64BIT,
+	XMIT_SZ_8BIT,
+	XMIT_SZ_16BIT,
+	XMIT_SZ_32BIT,
+	XMIT_SZ_256BIT,
 };
 
 /*
  * The DMA count is defined as the number of bytes to transfer.
  */
 static unsigned int ts_shift[] = {
-	[XMIT_SZ_64BIT]		3,
-	[XMIT_SZ_8BIT]		0,
-	[XMIT_SZ_16BIT]		1,
-	[XMIT_SZ_32BIT]		2,
-	[XMIT_SZ_256BIT]	5,
+	[XMIT_SZ_64BIT]		= 3,
+	[XMIT_SZ_8BIT]		= 0,
+	[XMIT_SZ_16BIT]		= 1,
+	[XMIT_SZ_32BIT]		= 2,
+	[XMIT_SZ_256BIT]	= 5,
 };
 
-struct sh_dmac_channel {
-        unsigned long sar;
-        unsigned long dar;
-        unsigned long dmatcr;
-        unsigned long chcr;
-} __attribute__ ((aligned(16)));
-
-struct sh_dmac_info {
-        struct sh_dmac_channel channel[4];
-        unsigned long dmaor;
-};
-
-static volatile struct sh_dmac_info *sh_dmac = (volatile struct sh_dmac_info *)SH_DMAC_BASE;
-
 static inline unsigned int get_dmte_irq(unsigned int chan)
 {
 	unsigned int irq;
 
-	/* 
+	/*
 	 * Normally we could just do DMTE0_IRQ + chan outright, though in the
 	 * case of the 7751R, the DMTE IRQs for channels > 4 start right above
 	 * the SCIF
@@ -84,13 +70,17 @@
  * We determine the correct shift size based off of the CHCR transmit size
  * for the given channel. Since we know that it will take:
  *
- * 	info->count >> ts_shift[transmit_size]
+ *	info->count >> ts_shift[transmit_size]
  *
  * iterations to complete the transfer.
  */
-static inline unsigned int calc_xmit_shift(struct dma_info *info)
+static inline unsigned int calc_xmit_shift(struct dma_channel *chan)
 {
-	return ts_shift[(sh_dmac->channel[info->chan].chcr >> 4) & 0x0007];
+	u32 chcr = ctrl_inl(CHCR[chan->chan]);
+
+	chcr >>= 4;
+
+	return ts_shift[chcr & 0x0007];
 }
 
 /*
@@ -101,68 +91,79 @@
  */
 static irqreturn_t dma_tei(int irq, void *dev_id, struct pt_regs *regs)
 {
-	struct dma_info * info = (struct dma_info *)dev_id;
-	u32 chcr = sh_dmac->channel[info->chan].chcr;
+	struct dma_channel *chan = (struct dma_channel *)dev_id;
+	u32 chcr;
+
+	chcr = ctrl_inl(CHCR[chan->chan]);
 
 	if (!(chcr & CHCR_TE))
 		return IRQ_NONE;
 
-	sh_dmac->channel[info->chan].chcr = chcr & ~(CHCR_IE | CHCR_DE);
+	chcr &= ~(CHCR_IE | CHCR_DE);
+	ctrl_outl(chcr, CHCR[chan->chan]);
 
-	wake_up(&info->wait_queue);
+	wake_up(&chan->wait_queue);
 
 	return IRQ_HANDLED;
 }
 
-static int sh_dmac_request_dma(struct dma_info *info)
+static int sh_dmac_request_dma(struct dma_channel *chan)
 {
-	return request_irq(get_dmte_irq(info->chan), dma_tei,
-			   SA_INTERRUPT, "DMAC Transfer End", info);
+	return request_irq(get_dmte_irq(chan->chan), dma_tei,
+			   SA_INTERRUPT, "DMAC Transfer End", chan);
 }
 
-static void sh_dmac_free_dma(struct dma_info *info)
+static void sh_dmac_free_dma(struct dma_channel *chan)
 {
-	free_irq(get_dmte_irq(info->chan), info);
+	free_irq(get_dmte_irq(chan->chan), chan);
 }
 
-static void sh_dmac_configure_channel(struct dma_info *info, unsigned long chcr)
+static void sh_dmac_configure_channel(struct dma_channel *chan, unsigned long chcr)
 {
 	if (!chcr)
 		chcr = RS_DUAL;
 
-	sh_dmac->channel[info->chan].chcr = chcr;
+	ctrl_outl(chcr, CHCR[chan->chan]);
 
-	info->configured = 1;
+	chan->flags |= DMA_CONFIGURED;
 }
 
-static void sh_dmac_enable_dma(struct dma_info *info)
+static void sh_dmac_enable_dma(struct dma_channel *chan)
 {
-	int irq = get_dmte_irq(info->chan);
+	int irq = get_dmte_irq(chan->chan);
+	u32 chcr;
+
+	chcr = ctrl_inl(CHCR[chan->chan]);
+	chcr |= CHCR_DE | CHCR_IE;
+	ctrl_outl(chcr, CHCR[chan->chan]);
 
-	sh_dmac->channel[info->chan].chcr |= (CHCR_DE | CHCR_IE);
 	enable_irq(irq);
 }
 
-static void sh_dmac_disable_dma(struct dma_info *info)
+static void sh_dmac_disable_dma(struct dma_channel *chan)
 {
-	int irq = get_dmte_irq(info->chan);
+	int irq = get_dmte_irq(chan->chan);
+	u32 chcr;
 
 	disable_irq(irq);
-	sh_dmac->channel[info->chan].chcr &= ~(CHCR_DE | CHCR_TE | CHCR_IE);
+
+	chcr = ctrl_inl(CHCR[chan->chan]);
+	chcr &= ~(CHCR_DE | CHCR_TE | CHCR_IE);
+	ctrl_outl(chcr, CHCR[chan->chan]);
 }
 
-static int sh_dmac_xfer_dma(struct dma_info *info)
+static int sh_dmac_xfer_dma(struct dma_channel *chan)
 {
-	/* 
+	/*
 	 * If we haven't pre-configured the channel with special flags, use
 	 * the defaults.
 	 */
-	if (!info->configured)
-		sh_dmac_configure_channel(info, 0);
+	if (!(chan->flags & DMA_CONFIGURED))
+		sh_dmac_configure_channel(chan, 0);
 
-	sh_dmac_disable_dma(info);
-	
-	/* 
+	sh_dmac_disable_dma(chan);
+
+	/*
 	 * Single-address mode usage note!
 	 *
 	 * It's important that we don't accidentally write any value to SAR/DAR
@@ -177,33 +178,36 @@
 	 * cascading to the PVR2 DMAC. In this case, we still need to write
 	 * SAR and DAR, regardless of value, in order for cascading to work.
 	 */
-	if (info->sar || (mach_is_dreamcast() && info->chan == 2))
-		sh_dmac->channel[info->chan].sar = info->sar;
-	if (info->dar || (mach_is_dreamcast() && info->chan == 2))
-		sh_dmac->channel[info->chan].dar = info->dar;
-	
-	sh_dmac->channel[info->chan].dmatcr = info->count >> calc_xmit_shift(info);
+	if (chan->sar || (mach_is_dreamcast() && chan->chan == 2))
+		ctrl_outl(chan->sar, SAR[chan->chan]);
+	if (chan->dar || (mach_is_dreamcast() && chan->chan == 2))
+		ctrl_outl(chan->dar, DAR[chan->chan]);
+
+	ctrl_outl(chan->count >> calc_xmit_shift(chan), DMATCR[chan->chan]);
 
-	sh_dmac_enable_dma(info);
+	sh_dmac_enable_dma(chan);
 
 	return 0;
 }
 
-static int sh_dmac_get_dma_residue(struct dma_info *info)
+static int sh_dmac_get_dma_residue(struct dma_channel *chan)
 {
-	if (!(sh_dmac->channel[info->chan].chcr & CHCR_DE))
+	if (!(ctrl_inl(CHCR[chan->chan]) & CHCR_DE))
 		return 0;
 
-	return sh_dmac->channel[info->chan].dmatcr << calc_xmit_shift(info);
+	return ctrl_inl(DMATCR[chan->chan]) << calc_xmit_shift(chan);
 }
 
 #if defined(CONFIG_CPU_SH4)
 static irqreturn_t dma_err(int irq, void *dev_id, struct pt_regs *regs)
 {
-	printk("DMAE: DMAOR=%lx\n", sh_dmac->dmaor);
+	unsigned long dmaor = ctrl_inl(DMAOR);
+
+	printk("DMAE: DMAOR=%lx\n", dmaor);
 
-	sh_dmac->dmaor &= ~(DMAOR_NMIF | DMAOR_AE);
-	sh_dmac->dmaor |= DMAOR_DME;
+	ctrl_outl(ctrl_inl(DMAOR)&~DMAOR_NMIF, DMAOR);
+	ctrl_outl(ctrl_inl(DMAOR)&~DMAOR_AE, DMAOR);
+	ctrl_outl(ctrl_inl(DMAOR)|DMAOR_DME, DMAOR);
 
 	disable_irq(irq);
 
@@ -212,16 +216,23 @@
 #endif
 
 static struct dma_ops sh_dmac_ops = {
-	.name		= "SuperH DMAC",
 	.request	= sh_dmac_request_dma,
 	.free		= sh_dmac_free_dma,
 	.get_residue	= sh_dmac_get_dma_residue,
 	.xfer		= sh_dmac_xfer_dma,
 	.configure	= sh_dmac_configure_channel,
 };
-	
+
+static struct dma_info sh_dmac_info = {
+	.name		= "SuperH DMAC",
+	.nr_channels	= 4,
+	.ops		= &sh_dmac_ops,
+	.flags		= DMAC_CHANNELS_TEI_CAPABLE,
+};
+
 static int __init sh_dmac_init(void)
 {
+	struct dma_info *info = &sh_dmac_info;
 	int i;
 
 #ifdef CONFIG_CPU_SH4
@@ -231,18 +242,15 @@
 		return i;
 #endif
 
-	for (i = 0; i < MAX_DMAC_CHANNELS; i++) {
+	for (i = 0; i < info->nr_channels; i++) {
 		int irq = get_dmte_irq(i);
 
 		make_ipr_irq(irq, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY);
-
-		dma_info[i].ops = &sh_dmac_ops;
-		dma_info[i].tei_capable = 1;
 	}
 
-	sh_dmac->dmaor |= 0x8000 | DMAOR_DME;
+	ctrl_outl(0x8000 | DMAOR_DME, DMAOR);
 
-	return register_dmac(&sh_dmac_ops);
+	return register_dmac(info);
 }
 
 static void __exit sh_dmac_exit(void)
--- diff/arch/sh/drivers/pci/Makefile	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/pci/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -12,4 +12,5 @@
 					   dma-dreamcast.o
 obj-$(CONFIG_SH_SECUREEDGE5410)		+= ops-snapgear.o
 obj-$(CONFIG_SH_BIGSUR)			+= ops-bigsur.o
+obj-$(CONFIG_SH_RTS7751R2D)		+= ops-rts7751r2d.o fixups-rts7751r2d.o
 
--- diff/arch/sh/drivers/pci/ops-snapgear.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/pci/ops-snapgear.c	2004-07-01 21:32:34.000000000 +0100
@@ -61,6 +61,8 @@
 		.base	= SH7751_CS2_BASE_ADDR,
 		.size	= SNAPGEAR_LSR1_SIZE,
 	},
+
+	.flags	= SH7751_PCIC_NO_RESET,
 };
 
 /*
--- diff/arch/sh/drivers/pci/pci-auto.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/pci/pci-auto.c	2004-07-01 21:32:34.000000000 +0100
@@ -45,7 +45,7 @@
 #include <linux/types.h>
 #include <linux/pci.h>
 
-#define	DEBUG
+#undef	DEBUG
 #ifdef 	DEBUG
 #define	DBG(x...)	printk(x)
 #else
@@ -106,7 +106,8 @@
 pciauto_setup_bars(struct pci_channel *hose,
 		   int top_bus,
 		   int current_bus,
-		   int pci_devfn)
+		   int pci_devfn,
+		   int bar_limit)
 {
 	u32 bar_response, bar_size, bar_value;
 	u32 bar, addr_mask, bar_nr = 0;
@@ -114,7 +115,8 @@
 	u32 * lower_limit;
 	int found_mem64 = 0;
 
-	for (bar = PCI_BASE_ADDRESS_0; bar <= PCI_BASE_ADDRESS_5; bar+=4) {
+	for (bar = PCI_BASE_ADDRESS_0; bar <= bar_limit; bar+=4) {
+#if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
 		u32 bar_addr;
 
 		/* Read the old BAR value */
@@ -123,6 +125,7 @@
 					pci_devfn,
 					bar,
 					&bar_addr);
+#endif
 
 		/* Tickle the BAR and get the response */
 		early_write_config_dword(hose, top_bus,
@@ -137,6 +140,7 @@
 					bar,
 					&bar_response);
 
+#if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
 		/* 
 		 * Write the old BAR value back out, only update the BAR
 		 * if we implicitly want resources to be updated, which
@@ -147,6 +151,7 @@
 					 pci_devfn,
 					 bar,
 					 bar_addr);
+#endif
 
 		/* If BAR is not implemented go to the next BAR */
 		if (!bar_response)
@@ -287,6 +292,11 @@
 {
 	u32 temp;
 
+	/*
+	 * [jsun] we always bump up baselines a little, so that if there
+	 * nothing behind P2P bridge, we don't wind up overlapping IO/MEM
+	 * spaces.
+	 */
 	pciauto_lower_memspc += 1;
 	pciauto_lower_iospc += 1;
 
@@ -318,93 +328,99 @@
 
 static void __init
 pciauto_prescan_setup_cardbus_bridge(struct pci_channel *hose,
-                            int top_bus,
-                            int current_bus,
-                            int pci_devfn,
-                            int sub_bus)
+			int top_bus,
+			int current_bus,
+			int pci_devfn,
+			int sub_bus)
 {
-       /* Configure bus number registers */
-       early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
-                               PCI_PRIMARY_BUS, current_bus);
-       early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
-                               PCI_SECONDARY_BUS, sub_bus + 1);
-       early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
-                               PCI_SUBORDINATE_BUS, 0xff);
-
-       /* Align memory and I/O to 4KB and 4 byte boundaries. */
-       pciauto_lower_memspc = (pciauto_lower_memspc + (0x1000 - 1))
-               & ~(0x1000 - 1);
-       pciauto_lower_iospc = (pciauto_lower_iospc + (0x4 - 1))
-               & ~(0x4 - 1);
-
-       early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
-               PCI_CB_MEMORY_BASE_0, pciauto_lower_memspc);
-       early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
-               PCI_CB_IO_BASE_0, pciauto_lower_iospc);  
+	/* Configure bus number registers */
+	early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
+				PCI_PRIMARY_BUS, current_bus);
+	early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
+				PCI_SECONDARY_BUS, sub_bus + 1);
+	early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
+				PCI_SUBORDINATE_BUS, 0xff);
+
+	/* Align memory and I/O to 4KB and 4 byte boundaries. */
+	pciauto_lower_memspc = (pciauto_lower_memspc + (0x1000 - 1))
+		& ~(0x1000 - 1);
+	pciauto_lower_iospc = (pciauto_lower_iospc + (0x4 - 1))
+		& ~(0x4 - 1);
+
+	early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
+		PCI_CB_MEMORY_BASE_0, pciauto_lower_memspc);
+	early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
+		PCI_CB_IO_BASE_0, pciauto_lower_iospc);
 }
 
 static void __init
 pciauto_postscan_setup_cardbus_bridge(struct pci_channel *hose,
-                             int top_bus,
-                             int current_bus,
-                             int pci_devfn,
-                             int sub_bus)
+			int top_bus,
+			int current_bus,
+			int pci_devfn,
+			int sub_bus)
 {
-       u32 temp;
+	u32 temp;
+
+#if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
+	/*
+	 * [jsun] we always bump up baselines a little, so that if there
+	 * nothing behind P2P bridge, we don't wind up overlapping IO/MEM
+	 * spaces.
+	 */
+	pciauto_lower_memspc += 1;
+	pciauto_lower_iospc += 1;
+#endif
+
+	/*
+	 * Configure subordinate bus number.  The PCI subsystem
+	 * bus scan will renumber buses (reserving three additional
+	 * for this PCI<->CardBus bridge for the case where a CardBus
+	 * adapter contains a P2P or CB2CB bridge.
+	 */
+
+	early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
+				PCI_SUBORDINATE_BUS, sub_bus);
+
+	/*
+	 * Reserve an additional 4MB for mem space and 16KB for
+	 * I/O space.  This should cover any additional space
+	 * requirement of unusual CardBus devices with
+	 * additional bridges that can consume more address space.
+	 *
+	 * Although pcmcia-cs currently will reprogram bridge
+	 * windows, the goal is to add an option to leave them
+	 * alone and use the bridge window ranges as the regions
+	 * that are searched for free resources upon hot-insertion
+	 * of a device.  This will allow a PCI<->CardBus bridge
+	 * configured by this routine to happily live behind a
+	 * P2P bridge in a system.
+	 */
+#if defined(CONFIG_SH_HS7751RVOIP) || defined(CONFIG_SH_RTS7751R2D)
+	pciauto_lower_memspc += 0x00400000;
+	pciauto_lower_iospc += 0x00004000;
+#endif
+
+	/* Align memory and I/O to 4KB and 4 byte boundaries. */
+	pciauto_lower_memspc = (pciauto_lower_memspc + (0x1000 - 1))
+		& ~(0x1000 - 1);
+	pciauto_lower_iospc = (pciauto_lower_iospc + (0x4 - 1))
+		& ~(0x4 - 1);
+	/* Set up memory and I/O filter limits, assume 32-bit I/O space */
+	early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
+		PCI_CB_MEMORY_LIMIT_0, pciauto_lower_memspc - 1);
+	early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
+		PCI_CB_IO_LIMIT_0, pciauto_lower_iospc - 1);
 
-       /* 
-        * [jsun] we always bump up baselines a little, so that if there 
-        * nothing behind P2P bridge, we don't wind up overlapping IO/MEM 
-        * spaces.
-        */
-       pciauto_lower_memspc += 1;
-       pciauto_lower_iospc += 1;
-
-       /*
-        * Configure subordinate bus number.  The PCI subsystem
-        * bus scan will renumber buses (reserving three additional
-        * for this PCI<->CardBus bridge for the case where a CardBus
-        * adapter contains a P2P or CB2CB bridge.
-        */
-
-       early_write_config_byte(hose, top_bus, current_bus, pci_devfn,
-                               PCI_SUBORDINATE_BUS, sub_bus);
-
-       /*
-        * Reserve an additional 4MB for mem space and 16KB for
-        * I/O space.  This should cover any additional space
-        * requirement of unusual CardBus devices with 
-        * additional bridges that can consume more address space.
-        * 
-        * Although pcmcia-cs currently will reprogram bridge
-        * windows, the goal is to add an option to leave them
-        * alone and use the bridge window ranges as the regions
-        * that are searched for free resources upon hot-insertion
-        * of a device.  This will allow a PCI<->CardBus bridge
-        * configured by this routine to happily live behind a
-        * P2P bridge in a system.
-        */
-
-       /* Align memory and I/O to 4KB and 4 byte boundaries. */
-       pciauto_lower_memspc = (pciauto_lower_memspc + (0x1000 - 1))
-               & ~(0x1000 - 1);
-       pciauto_lower_iospc = (pciauto_lower_iospc + (0x4 - 1))
-               & ~(0x4 - 1);
-       /* Set up memory and I/O filter limits, assume 32-bit I/O space */
-       early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
-               PCI_CB_MEMORY_LIMIT_0, pciauto_lower_memspc - 1); 
-       early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
-               PCI_CB_IO_LIMIT_0, pciauto_lower_iospc - 1);
-       
-       /* Enable memory and I/O accesses, enable bus master */
-       early_read_config_dword(hose, top_bus, current_bus, pci_devfn,
-               PCI_COMMAND, &temp);
-       early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
-               PCI_COMMAND, temp | PCI_COMMAND_IO | PCI_COMMAND_MEMORY
-               | PCI_COMMAND_MASTER);
+	/* Enable memory and I/O accesses, enable bus master */
+	early_read_config_dword(hose, top_bus, current_bus, pci_devfn,
+		PCI_COMMAND, &temp);
+	early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
+		PCI_COMMAND, temp | PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
+		PCI_COMMAND_MASTER);
 }
 
-#define      PCIAUTO_IDE_MODE_MASK           0x05
+#define	PCIAUTO_IDE_MODE_MASK		0x05
 
 static int __init
 pciauto_bus_scan(struct pci_channel *hose, int top_bus, int current_bus)
@@ -455,6 +471,9 @@
 		if ((pci_class >> 16) == PCI_CLASS_BRIDGE_PCI) {
 			DBG("        Bridge: primary=%.2x, secondary=%.2x\n",
 				current_bus, sub_bus + 1);
+#if defined(CONFIG_SH_HS7751RVOIP) || defined(CONFIG_SH_RTS7751R2D)
+			pciauto_setup_bars(hose, top_bus, current_bus, pci_devfn, PCI_BASE_ADDRESS_1);
+#endif
 			pciauto_prescan_setup_bridge(hose, top_bus, current_bus,
 						     pci_devfn, sub_bus);
 			DBG("Scanning sub bus %.2x, I/O 0x%.8x, Mem 0x%.8x\n",
@@ -463,26 +482,26 @@
 			sub_bus = pciauto_bus_scan(hose, top_bus, sub_bus+1);
 			DBG("Back to bus %.2x\n", current_bus);
 			pciauto_postscan_setup_bridge(hose, top_bus, current_bus,
-						      pci_devfn, sub_bus);
+							pci_devfn, sub_bus);
 			continue;
-                } else if ((pci_class >> 16) == PCI_CLASS_BRIDGE_CARDBUS) {
-                        DBG("  CARDBUS  Bridge: primary=%.2x, secondary=%.2x\n",
-                                current_bus, sub_bus + 1);
-                        DBG("PCI Autoconfig: Found CardBus bridge, device %d function %d\n", PCI_SLOT(pci_devfn), PCI_FUNC(pci_devfn));
-                        /* Place CardBus Socket/ExCA registers */
-                        pciauto_setup_bars(hose, top_bus, current_bus, pci_devfn);
+		} else if ((pci_class >> 16) == PCI_CLASS_BRIDGE_CARDBUS) {
+			DBG("  CARDBUS  Bridge: primary=%.2x, secondary=%.2x\n",
+				current_bus, sub_bus + 1);
+			DBG("PCI Autoconfig: Found CardBus bridge, device %d function %d\n", PCI_SLOT(pci_devfn), PCI_FUNC(pci_devfn));
+			/* Place CardBus Socket/ExCA registers */
+			pciauto_setup_bars(hose, top_bus, current_bus, pci_devfn, PCI_BASE_ADDRESS_0);
  
-                        pciauto_prescan_setup_cardbus_bridge(hose, top_bus, 
-                                        current_bus, pci_devfn, sub_bus);
+			pciauto_prescan_setup_cardbus_bridge(hose, top_bus,
+					current_bus, pci_devfn, sub_bus);
  
-                        DBG("Scanning sub bus %.2x, I/O 0x%.8x, Mem 0x%.8x\n",
-                                sub_bus + 1,
-                                pciauto_lower_iospc, pciauto_lower_memspc);
-                        sub_bus = pciauto_bus_scan(hose, top_bus, sub_bus+1);
-                        DBG("Back to bus %.2x, sub_bus is %x\n", current_bus, sub_bus);
-                        pciauto_postscan_setup_cardbus_bridge(hose, top_bus, 
-                                        current_bus, pci_devfn, sub_bus);
-                        continue;
+			DBG("Scanning sub bus %.2x, I/O 0x%.8x, Mem 0x%.8x\n",
+				sub_bus + 1,
+				pciauto_lower_iospc, pciauto_lower_memspc);
+			sub_bus = pciauto_bus_scan(hose, top_bus, sub_bus+1);
+			DBG("Back to bus %.2x, sub_bus is %x\n", current_bus, sub_bus);
+			pciauto_postscan_setup_cardbus_bridge(hose, top_bus,
+					current_bus, pci_devfn, sub_bus);
+			continue;
 		} else if ((pci_class >> 16) == PCI_CLASS_STORAGE_IDE) {
 
 			unsigned char prg_iface;
@@ -495,7 +514,7 @@
 			}
 		}
 
- 		/*
+		/*
 		 * Found a peripheral, enable some standard
 		 * settings
 		 */
@@ -509,7 +528,7 @@
 					PCI_LATENCY_TIMER, 0x80);
 
 		/* Allocate PCI I/O and/or memory space */
-		pciauto_setup_bars(hose, top_bus, current_bus, pci_devfn);
+		pciauto_setup_bars(hose, top_bus, current_bus, pci_devfn, PCI_BASE_ADDRESS_5);
 	}
 	return sub_bus;
 }
--- diff/arch/sh/drivers/pci/pci-sh7751.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/pci/pci-sh7751.c	2004-07-01 21:32:34.000000000 +0100
@@ -31,6 +31,7 @@
 #include "pci-sh7751.h"
 
 static unsigned int pci_probe = PCI_PROBE_CONF1;
+extern int pci_fixup_pcic(void);
 
 /*
  * Direct access to PCI hardware...
@@ -74,7 +75,8 @@
 }
 
 /* 
- * Since SH7751 only does 32bit access we'll have to do a read,mask,write operation.  
+ * Since SH7751 only does 32bit access we'll have to do a read,
+ * mask,write operation.
  * We'll allow an odd byte offset, though it should be illegal.
  */ 
 static int sh7751_pci_write(struct pci_bus *bus, unsigned int devfn,
@@ -156,6 +158,7 @@
  *  Handle bus scanning and fixups ....
  */
 
+#if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
 static void __init pci_fixup_ide_bases(struct pci_dev *d)
 {
 	int i;
@@ -174,11 +177,13 @@
 		}
 	}
 }
-
+#endif
 
 /* Add future fixups here... */
 struct pci_fixup pcibios_fixups[] = {
+#if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D)
 	{ PCI_FIXUP_HEADER,	PCI_ANY_ID,	PCI_ANY_ID,	pci_fixup_ide_bases },
+#endif
 	{ 0 }
 };
 
@@ -261,19 +266,19 @@
 	outl(word, PCI_REG(SH7751_PCICLKR));
 
 	/*
-	 * XXX: This code is unused for the SnapGear boards as it is done in
-	 * the bootloader and doing it here means the MAC addresses loaded by
-	 * the bootloader get lost.
+	 * This code is unused for some boards as it is done in the
+	 * bootloader and doing it here means the MAC addresses loaded
+	 * by the bootloader get lost.
 	 */
-#ifndef CONFIG_SH_SECUREEDGE5410
-	/* toggle PCI reset pin */
-	word = SH7751_PCICR_PREFIX | SH7751_PCICR_PRST;
-	outl(word,PCI_REG(SH7751_PCICR));    
-	/* Wait for a long time... not 1 sec. but long enough */
-	mdelay(100);
-	word = SH7751_PCICR_PREFIX;
-	outl(word,PCI_REG(SH7751_PCICR)); 
-#endif
+	if (!(map->flags & SH7751_PCIC_NO_RESET)) {
+		/* toggle PCI reset pin */
+		word = SH7751_PCICR_PREFIX | SH7751_PCICR_PRST;
+		outl(word,PCI_REG(SH7751_PCICR));
+		/* Wait for a long time... not 1 sec. but long enough */
+		mdelay(100);
+		word = SH7751_PCICR_PREFIX;
+		outl(word,PCI_REG(SH7751_PCICR));
+	}
 	
 	/* set the command/status bits to:
 	 * Wait Cycle Control + Parity Enable + Bus Master +
@@ -364,6 +369,10 @@
 	 * DMA interrupts...
 	 */
 	 
+#ifdef CONFIG_SH_RTS7751R2D
+	pci_fixup_pcic();
+#endif
+
 	/* SH7751 init done, set central function init complete */
 	/* use round robin mode to stop a device starving/overruning */
 	word = SH7751_PCICR_PREFIX | SH7751_PCICR_CFIN | SH7751_PCICR_ARBM;
--- diff/arch/sh/drivers/pci/pci-sh7751.h	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/pci/pci-sh7751.h	2004-07-01 21:32:34.000000000 +0100
@@ -234,6 +234,7 @@
 #define SH7751_PCIWCR2             0x1EC         /* Wait Control 2 Register */
 #define SH7751_PCIWCR3             0x1F0         /* Wait Control 3 Register */
 #define SH7751_PCIMCR              0x1F4         /* Memory Control Register */
+#define SH7751_PCIBCR3		   0x1f8	 /* Memory BCR3 Register */
 #define SH7751_PCIPCTR             0x200         /* Port Control Register */
   #define SH7751_PCIPCTR_P2EN        0x000400000 /* Port 2 Enable */
   #define SH7751_PCIPCTR_P1EN        0x000200000 /* Port 1 Enable */
@@ -256,6 +257,8 @@
 /* Memory Control Registers */
 #define SH7751_BCR1                0xFF800000    /* Memory BCR1 Register */
 #define SH7751_BCR2                0xFF800004    /* Memory BCR2 Register */
+#define SH7751_BCR3                0xFF800050    /* Memory BCR3 Register */
+#define SH7751_BCR4                0xFE0A00F0    /* Memory BCR4 Register */
 #define SH7751_WCR1                0xFF800008    /* Wait Control 1 Register */
 #define SH7751_WCR2                0xFF80000C    /* Wait Control 2 Register */
 #define SH7751_WCR3                0xFF800010    /* Wait Control 3 Register */
@@ -274,6 +277,9 @@
 /* General PCI values */
 #define SH7751_PCI_HOST_BRIDGE		0x6
 
+/* Flags */
+#define SH7751_PCIC_NO_RESET	0x0001
+
 /* External functions defined per platform i.e. Big Sur, SE... (these could be routed 
  * through the machine vectors... */
 extern int pcibios_init_platform(void);
@@ -287,6 +293,7 @@
 struct sh7751_pci_address_map {
 	struct sh7751_pci_address_space window0;
 	struct sh7751_pci_address_space window1;
+	unsigned long flags;
 };
 
 /* arch/sh/drivers/pci/pci-sh7751.c */
--- diff/arch/sh/drivers/pci/pci.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/drivers/pci/pci.c	2004-07-01 21:32:34.000000000 +0100
@@ -25,7 +25,7 @@
 
 #ifdef CONFIG_PCI_AUTO
 	/* assign resources */
-	busno=0;
+	busno = 0;
 	for (p = board_pci_channels; p->pci_ops != NULL; p++) {
 		busno = pciauto_assign_resources(busno, p) + 1;
 	}
--- diff/arch/sh/kernel/Makefile	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -16,6 +16,7 @@
 obj-$(CONFIG_SH_KGDB)		+= kgdb_stub.o kgdb_jmp.o
 obj-$(CONFIG_SH_CPU_FREQ)	+= cpufreq.o
 obj-$(CONFIG_MODULES)		+= module.o
+obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
 USE_STANDARD_AS_RULE := true
 
--- diff/arch/sh/kernel/cpu/Makefile	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/cpu/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -2,7 +2,7 @@
 # Makefile for the Linux/SuperH CPU-specifc backends.
 #
 
-obj-y	:= irq_ipr.o irq_imask.o init.o
+obj-y	:= irq_ipr.o irq_imask.o init.o bus.o
 
 obj-$(CONFIG_CPU_SH2)		+= sh2/
 obj-$(CONFIG_CPU_SH3)		+= sh3/
@@ -10,6 +10,7 @@
 
 obj-$(CONFIG_SH_RTC)            += rtc.o
 obj-$(CONFIG_UBC_WAKEUP)	+= ubc.o
+obj-$(CONFIG_SH_ADC)            += adc.o
 
 USE_STANDARD_AS_RULE := true
 
--- diff/arch/sh/kernel/cpu/init.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/cpu/init.c	2004-07-01 21:32:34.000000000 +0100
@@ -42,7 +42,7 @@
  */
 static void __init cache_init(void)
 {
-	unsigned long ccr, flags = 0;
+	unsigned long ccr, flags;
 
 	if (cpu_data->type == CPU_SH_NONE)
 		panic("Unknown CPU");
@@ -54,42 +54,50 @@
 	 * If the cache is already enabled .. flush it.
 	 */
 	if (ccr & CCR_CACHE_ENABLE) {
-		unsigned long entries, i, j;
+		unsigned long ways, waysize, addrstart;
 
-		entries = cpu_data->dcache.sets;
+		waysize = cpu_data->dcache.sets;
 
 		/*
 		 * If the OC is already in RAM mode, we only have
 		 * half of the entries to flush..
 		 */
 		if (ccr & CCR_CACHE_ORA)
-			entries >>= 1;
+			waysize >>= 1;
 
-		for (i = 0; i < entries; i++) {
-			for (j = 0; j < cpu_data->dcache.ways; j++) {
-				unsigned long data, addr;
-
-				addr = CACHE_OC_ADDRESS_ARRAY |
-					(j << cpu_data->dcache.way_shift) |
-					(i << cpu_data->dcache.entry_shift);
-
-				data = ctrl_inl(addr);
-
-				if ((data & (SH_CACHE_UPDATED | SH_CACHE_VALID))
-					== (SH_CACHE_UPDATED | SH_CACHE_VALID))
-					ctrl_outl(data & ~SH_CACHE_UPDATED, addr);
-			}
-		}
+		waysize <<= cpu_data->dcache.entry_shift;
+
+#ifdef CCR_CACHE_EMODE
+		/* If EMODE is not set, we only have 1 way to flush. */
+		if (!(ccr & CCR_CACHE_EMODE))
+			ways = 1;
+		else
+#endif
+			ways = cpu_data->dcache.ways;
+
+		addrstart = CACHE_OC_ADDRESS_ARRAY;
+		do {
+			unsigned long addr;
+
+			for (addr = addrstart;
+			     addr < addrstart + waysize;
+			     addr += cpu_data->dcache.linesz)
+				ctrl_outl(0, addr);
+
+			addrstart += cpu_data->dcache.way_incr;
+		} while (--ways);
 	}
 
 	/* 
 	 * Default CCR values .. enable the caches
-	 * and flush them immediately..
+	 * and invalidate them immediately..
 	 */
-	flags |= CCR_CACHE_ENABLE | CCR_CACHE_INVALIDATE;
-	
+	flags = CCR_CACHE_ENABLE | CCR_CACHE_INVALIDATE;
+
 #ifdef CCR_CACHE_EMODE
-	flags |= (ccr & CCR_CACHE_EMODE);
+	/* Force EMODE if possible */
+	if (cpu_data->dcache.ways > 1)
+		flags |= CCR_CACHE_EMODE;
 #endif
 
 #ifdef CONFIG_SH_WRITETHROUGH
@@ -145,8 +153,8 @@
 
 	/* If the DSP bit is still set, this CPU has a DSP */
 	if (sr & SR_DSP)
-		set_bit(CPU_HAS_DSP, &(cpu_data->flags));
-	
+		cpu_data->flags |= CPU_HAS_DSP;
+
 	/* Now that we've determined the DSP status, clear the DSP bit. */
 	release_dsp();
 }
@@ -184,7 +192,7 @@
 	}
 
 	/* FPU initialization */
-	if (test_bit(CPU_HAS_FPU, &(cpu_data->flags))) {
+	if ((cpu_data->flags & CPU_HAS_FPU)) {
 		clear_thread_flag(TIF_USEDFPU);
 		current->used_math = 0;
 	}
--- diff/arch/sh/kernel/cpu/irq_ipr.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/cpu/irq_ipr.c	2004-07-01 21:32:34.000000000 +0100
@@ -4,12 +4,13 @@
  *
  * Copyright (C) 1999  Niibe Yutaka & Takeshi Yaegashi
  * Copyright (C) 2000  Kazumoto Kojima
+ * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
  *
  * Interrupt handling for IPR-based IRQ.
  *
  * Supported system:
  *	On-chip supporting modules (TMU, RTC, etc.).
- *	On-chip supporting modules for SH7709/SH7709A/SH7729.
+ *	On-chip supporting modules for SH7709/SH7709A/SH7729/SH7300.
  *	Hitachi SolutionEngine external I/O:
  *		MS7709SE01, MS7709ASE01, and MS7750SE01
  *
@@ -88,7 +89,8 @@
 {
 	disable_ipr_irq(irq);
 
-#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705)
 	/* This is needed when we use edge triggered setting */
 	/* XXX: Is it really needed? */
 	if (IRQ0_IRQ <= irq && irq <= IRQ5_IRQ) {
@@ -117,7 +119,9 @@
 	disable_ipr_irq(irq);
 }
 
-#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7707) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7709)
 static unsigned char pint_map[256];
 static unsigned long portcr_mask = 0;
 
@@ -131,7 +135,7 @@
 static void end_pint_irq(unsigned int irq);
 
 static unsigned int startup_pint_irq(unsigned int irq)
-{ 
+{
 	enable_pint_irq(irq);
 	return 0; /* never anything pending */
 }
@@ -191,13 +195,17 @@
 
 void __init init_IRQ(void)
 {
-#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7707) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7709)
 	int i;
 #endif
 
 	make_ipr_irq(TIMER_IRQ, TIMER_IPR_ADDR, TIMER_IPR_POS, TIMER_PRIORITY);
 	make_ipr_irq(TIMER1_IRQ, TIMER1_IPR_ADDR, TIMER1_IPR_POS, TIMER1_PRIORITY);
+#if defined(CONFIG_SH_RTC)
 	make_ipr_irq(RTC_IRQ, RTC_IPR_ADDR, RTC_IPR_POS, RTC_PRIORITY);
+#endif
 
 #ifdef SCI_ERI_IRQ
 	make_ipr_irq(SCI_ERI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY);
@@ -212,6 +220,13 @@
 	make_ipr_irq(SCIF1_TXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY);
 #endif
 
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+	make_ipr_irq(SCIF0_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY);
+	make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY);
+	make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY);
+	make_ipr_irq(VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY);
+#endif
+
 #ifdef SCIF_ERI_IRQ
 	make_ipr_irq(SCIF_ERI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY);
 	make_ipr_irq(SCIF_RXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY);
@@ -226,11 +241,12 @@
 	make_ipr_irq(IRDA_TXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY);
 #endif
 
-#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705)
 	/*
 	 * Initialize the Interrupt Controller (INTC)
 	 * registers to their power on values
-	 */ 
+	 */
 
 	/*
 	 * Enable external irq (INTC IRQ mode).
@@ -243,6 +259,7 @@
 	make_ipr_irq(IRQ3_IRQ, IRQ3_IPR_ADDR, IRQ3_IPR_POS, IRQ3_PRIORITY);
 	make_ipr_irq(IRQ4_IRQ, IRQ4_IPR_ADDR, IRQ4_IPR_POS, IRQ4_PRIORITY);
 	make_ipr_irq(IRQ5_IRQ, IRQ5_IPR_ADDR, IRQ5_IPR_POS, IRQ5_PRIORITY);
+#if !defined(CONFIG_CPU_SUBTYPE_SH7300)
 	make_ipr_irq(PINT0_IRQ, PINT0_IPR_ADDR, PINT0_IPR_POS, PINT0_PRIORITY);
 	make_ipr_irq(PINT8_IRQ, PINT8_IPR_ADDR, PINT8_IPR_POS, PINT8_PRIORITY);
 	enable_ipr_irq(PINT0_IRQ);
@@ -261,16 +278,19 @@
 		else if(i & 0x40) pint_map[i] = 6;
 		else if(i & 0x80) pint_map[i] = 7;
 	}
-#endif /* CONFIG_CPU_SUBTYPE_SH7707 || CONFIG_CPU_SUBTYPE_SH7709 */
+#endif /* !CONFIG_CPU_SUBTYPE_SH7300 */
+#endif /* CONFIG_CPU_SUBTYPE_SH7707 || CONFIG_CPU_SUBTYPE_SH7709  || CONFIG_CPU_SUBTYPE_SH7300*/
 
 	/* Perform the machine specific initialisation */
 	if (sh_mv.mv_init_irq != NULL) {
 		sh_mv.mv_init_irq();
 	}
 }
-#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705)
 int ipr_irq_demux(int irq)
 {
+#if !defined(CONFIG_CPU_SUBTYPE_SH7300)
 	unsigned long creg, dreg, d, sav;
 
 	if(irq == PINT0_IRQ)
@@ -305,6 +325,7 @@
 		if(d == 0) return irq;
 		return PINT_IRQ_BASE + 8 + pint_map[d];
 	}
+#endif
 	return irq;
 }
 #endif
--- diff/arch/sh/kernel/cpu/sh3/ex.S	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/cpu/sh3/ex.S	2004-07-01 21:32:34.000000000 +0100
@@ -85,7 +85,8 @@
 	.long	do_IRQ	!      rovi
 	.long	do_IRQ			
 	.long	do_IRQ			/* 5E0 */
-#if  defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if  defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \
+     defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705)
 	.long	do_IRQ	! 32 IRQ  irq0	/* 600 */
 	.long	do_IRQ	! 33      irq1
 	.long	do_IRQ	! 34      irq2
@@ -115,10 +116,84 @@
 	.long	do_IRQ	! 58      bri2
 	.long	do_IRQ	! 59      txi2
 	.long	do_IRQ	! 60 ADC  adi	/* 980 */
-#if defined(CONFIG_CPU_SUBTYPE_SH7707)
+#if defined(CONFIG_CPU_SUBTYPE_SH7705)
+	.long	exception_none	! 61	/* 9A0 */
+	.long	exception_none	! 62
+	.long	exception_none	! 63
+	.long	exception_none	! 64	/* A00 */
+	.long	do_IRQ	! 65 USB  usi0
+	.long	do_IRQ	! 66      usi1
+	.long	exception_none	! 67
+	.long	exception_none	! 68
+	.long	exception_none	! 69
+	.long	exception_none	! 70
+	.long	exception_none	! 71
+	.long	exception_none	! 72	/* B00 */
+	.long	exception_none	! 73
+	.long	exception_none	! 74
+	.long	exception_none	! 75
+	.long	exception_none	! 76
+	.long	exception_none	! 77
+	.long	exception_none	! 78
+	.long	exception_none	! 79
+	.long	do_IRQ	! 80 TPU0 tpi0	/* C00 */
+	.long	do_IRQ	! 81 TPU1 tpi1
+	.long	exception_none	! 82
+	.long	exception_none	! 83
+	.long	do_IRQ	! 84 TPU2 tpi2
+	.long	do_IRQ	! 85 TPU3 tpi3	/* CA0 */
+#endif
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7300)
 	.long   do_IRQ	! 61 LCDC lcdi	/* 9A0 */
 	.long   do_IRQ	! 62 PCC  pcc0i
 	.long   do_IRQ	! 63      pcc1i	/* 9E0 */
 #endif
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+	.long   do_IRQ	! 64
+	.long   do_IRQ	! 65
+	.long   do_IRQ	! 66
+	.long   do_IRQ	! 67
+	.long   do_IRQ	! 68
+	.long   do_IRQ	! 69
+	.long   do_IRQ	! 70
+	.long   do_IRQ	! 71
+	.long   do_IRQ	! 72
+	.long   do_IRQ	! 73
+	.long   do_IRQ	! 74
+	.long   do_IRQ	! 75
+	.long   do_IRQ	! 76
+	.long   do_IRQ	! 77
+	.long   do_IRQ	! 78
+	.long   do_IRQ	! 79
+	.long   do_IRQ	! 80 SCIF0(SH7300)
+	.long   do_IRQ	! 81
+	.long   do_IRQ	! 82
+	.long   do_IRQ	! 83
+	.long   do_IRQ	! 84
+	.long   do_IRQ	! 85
+	.long   do_IRQ	! 86
+	.long   do_IRQ	! 87
+	.long   do_IRQ	! 88
+	.long   do_IRQ	! 89
+	.long   do_IRQ	! 90
+	.long   do_IRQ	! 91
+	.long   do_IRQ	! 92
+	.long   do_IRQ	! 93
+	.long   do_IRQ	! 94
+	.long   do_IRQ	! 95
+	.long   do_IRQ	! 96
+	.long   do_IRQ	! 97
+	.long   do_IRQ	! 98
+	.long   do_IRQ	! 99
+	.long   do_IRQ	! 100
+	.long   do_IRQ	! 101
+	.long   do_IRQ	! 102
+	.long   do_IRQ	! 103
+	.long   do_IRQ	! 104
+	.long   do_IRQ	! 105
+	.long   do_IRQ	! 106
+	.long   do_IRQ	! 107
+	.long   do_IRQ	! 108
+#endif
 #endif
 
--- diff/arch/sh/kernel/cpu/sh4/sq.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/cpu/sh4/sq.c	2004-07-01 21:32:34.000000000 +0100
@@ -34,8 +34,6 @@
 static LIST_HEAD(sq_mapping_list);
 static spinlock_t sq_mapping_lock = SPIN_LOCK_UNLOCKED;
 
-extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, unsigned long start, unsigned long end);
-
 /**
  * sq_flush - Flush (prefetch) the store queue cache
  *
--- diff/arch/sh/kernel/entry.S	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/entry.S	2004-07-01 21:32:34.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: entry.S,v 1.35 2004/02/21 14:45:47 lethal Exp $
+/* $Id: entry.S,v 1.37 2004/06/11 13:02:46 doyu Exp $
  *
  *  linux/arch/sh/entry.S
  *
@@ -77,7 +77,8 @@
 #if defined(CONFIG_CPU_SH3)
 TRA     = 0xffffffd0
 EXPEVT  = 0xffffffd4
-#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705)
 INTEVT  = 0xa4000000		! INTEVTE2(0xa4000000)
 #else
 INTEVT  = 0xffffffd8
@@ -1129,6 +1130,14 @@
 	.long sys_utimes
  	.long sys_fadvise64_64_wrapper
 	.long sys_ni_syscall	/* Reserved for vserver */
-	.long sys_ni_syscall
+	.long sys_ni_syscall	/* Reserved for mbind */
+	.long sys_ni_syscall	/* 275 - get_mempolicy */
+	.long sys_ni_syscall	/* set_mempolicy */
+	.long sys_mq_open
+	.long sys_mq_unlink
+	.long sys_mq_timedsend
+	.long sys_mq_timedreceive       /* 280 */
+	.long sys_mq_notify
+	.long sys_mq_getsetattr
 
 /* End of entry.S */
--- diff/arch/sh/kernel/init_task.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/init_task.c	2004-07-01 21:32:34.000000000 +0100
@@ -2,6 +2,7 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/init_task.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/sh/kernel/io_generic.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/io_generic.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: io_generic.c,v 1.1.1.1.4.2.2.1 2003/01/10 17:26:56 lethal Exp $
+/* $Id: io_generic.c,v 1.2 2003/05/04 19:29:53 lethal Exp $
  *
  * linux/arch/sh/kernel/io_generic.c
  *
@@ -71,16 +71,32 @@
 	return v;
 }
 
+/*
+ * insb/w/l all read a series of bytes/words/longs from a fixed port
+ * address. However as the port address doesn't change we only need to
+ * convert the port address to real address once.
+ */
+
 void generic_insb(unsigned long port, void *buffer, unsigned long count)
 {
+	volatile unsigned char *port_addr;
 	unsigned char *buf=buffer;
-	while(count--) *buf++=inb(port);
+
+	port_addr = (volatile unsigned char *)PORT2ADDR(port);
+
+	while(count--)
+	    *buf++ = *port_addr;
 }
 
 void generic_insw(unsigned long port, void *buffer, unsigned long count)
 {
+	volatile unsigned short *port_addr;
 	unsigned short *buf=buffer;
-	while(count--) *buf++=inw(port);
+
+	port_addr = (volatile unsigned short *)PORT2ADDR(port);
+
+	while(count--)
+	    *buf++ = *port_addr;
 #ifdef SH3_PCMCIA_BUG_WORKAROUND
 	ctrl_inb (DUMMY_READ_AREA6);
 #endif
@@ -88,8 +104,13 @@
 
 void generic_insl(unsigned long port, void *buffer, unsigned long count)
 {
+	volatile unsigned long *port_addr;
 	unsigned long *buf=buffer;
-	while(count--) *buf++=inl(port);
+
+	port_addr = (volatile unsigned long *)PORT2ADDR(port);
+
+	while(count--)
+	    *buf++ = *port_addr;
 #ifdef SH3_PCMCIA_BUG_WORKAROUND
 	ctrl_inb (DUMMY_READ_AREA6);
 #endif
@@ -128,16 +149,33 @@
 	delay();
 }
 
+/*
+ * outsb/w/l all write a series of bytes/words/longs to a fixed port
+ * address. However as the port address doesn't change we only need to
+ * convert the port address to real address once.
+ */
+
 void generic_outsb(unsigned long port, const void *buffer, unsigned long count)
 {
+	volatile unsigned char *port_addr;
 	const unsigned char *buf=buffer;
-	while(count--) outb(*buf++, port);
+
+	port_addr = (volatile unsigned char *)PORT2ADDR(port);
+
+	while(count--)
+	    *port_addr = *buf++;
 }
 
 void generic_outsw(unsigned long port, const void *buffer, unsigned long count)
 {
+	volatile unsigned short *port_addr;
 	const unsigned short *buf=buffer;
-	while(count--) outw(*buf++, port);
+
+	port_addr = (volatile unsigned short *)PORT2ADDR(port);
+
+	while(count--)
+	    *port_addr = *buf++;
+
 #ifdef SH3_PCMCIA_BUG_WORKAROUND
 	ctrl_inb (DUMMY_READ_AREA6);
 #endif
@@ -145,8 +183,14 @@
 
 void generic_outsl(unsigned long port, const void *buffer, unsigned long count)
 {
+	volatile unsigned long *port_addr;
 	const unsigned long *buf=buffer;
-	while(count--) outl(*buf++, port);
+
+	port_addr = (volatile unsigned long *)PORT2ADDR(port);
+
+	while(count--)
+	    *port_addr = *buf++;
+
 #ifdef SH3_PCMCIA_BUG_WORKAROUND
 	ctrl_inb (DUMMY_READ_AREA6);
 #endif
--- diff/arch/sh/kernel/irq.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/irq.c	2004-07-01 21:32:34.000000000 +0100
@@ -436,7 +436,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
@@ -575,6 +575,49 @@
 
 EXPORT_SYMBOL(probe_irq_on);
 
+/* Return a mask of triggered interrupts (this
+ * can handle only legacy ISA interrupts).
+ */
+
+/*
+ *	probe_irq_mask - scan a bitmap of interrupt lines
+ *	@val:	mask of interrupts to consider
+ *
+ *	Scan the ISA bus interrupt lines and return a bitmap of
+ *	active interrupts. The interrupt probe logic state is then
+ *	returned to its previous value.
+ *
+ *	Note: we need to scan all the irq's even though we will
+ *	only return ISA irq numbers - just so that we reset them
+ *	all to a known state.
+ */
+unsigned int probe_irq_mask(unsigned long val)
+{
+	int i;
+	unsigned int mask;
+
+	mask = 0;
+	for (i = 0; i < NR_IRQS; i++) {
+		irq_desc_t *desc = irq_desc + i;
+		unsigned int status;
+
+		spin_lock_irq(&desc->lock);
+		status = desc->status;
+
+		if (status & IRQ_AUTODETECT) {
+			if (i < 16 && !(status & IRQ_WAITING))
+				mask |= 1 << i;
+
+			desc->status = status & ~IRQ_AUTODETECT;
+			desc->handler->shutdown(i);
+		}
+		spin_unlock_irq(&desc->lock);
+	}
+	up(&probe_sem);
+
+	return mask & val;
+}
+
 int probe_irq_off(unsigned long val)
 {
 	int i, irq_found, nr_irqs;
--- diff/arch/sh/kernel/process.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sh/kernel/process.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.26 2004/02/06 14:14:14 kkojima Exp $
+/* $Id: process.c,v 1.28 2004/05/05 16:54:23 lethal Exp $
  *
  *  linux/arch/sh/kernel/process.c
  *
@@ -25,6 +25,11 @@
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
 #include <asm/elf.h>
+#if defined(CONFIG_SH_HS7751RVOIP)
+#include <asm/hs7751rvoip/hs7751rvoip.h>
+#elif defined(CONFIG_SH_RTS7751R2D)
+#include <asm/rts7751r2d/rts7751r2d.h>
+#endif
 
 static int hlt_counter=0;
 
@@ -50,8 +55,14 @@
 {
 	/* endless idle loop with no priority at all */
 	while (1) {
-		while (!need_resched())
-			cpu_relax();
+		if (hlt_counter) {
+			while (1)
+				if (need_resched())
+					break;
+		} else {
+			while (!need_resched())
+				cpu_sleep();
+		}
 
 		schedule();
 	}
@@ -73,14 +84,30 @@
 
 void machine_halt(void)
 {
+#if defined(CONFIG_SH_HS7751RVOIP)
+	unsigned short value;
+
+	value = ctrl_inw(PA_OUTPORTR);
+	ctrl_outw((value & 0xffdf), PA_OUTPORTR);
+#elif defined(CONFIG_SH_RTS7751R2D)
+	ctrl_outw(0x0001, PA_POWOFF);
+#endif
 	while (1)
-		cpu_relax();
+		cpu_sleep();
 }
 
 EXPORT_SYMBOL(machine_halt);
 
 void machine_power_off(void)
 {
+#if defined(CONFIG_SH_HS7751RVOIP)
+	unsigned short value;
+
+	value = ctrl_inw(PA_OUTPORTR);
+	ctrl_outw((value & 0xffdf), PA_OUTPORTR);
+#elif defined(CONFIG_SH_RTS7751R2D)
+	ctrl_outw(0x0001, PA_POWOFF);
+#endif
 }
 
 EXPORT_SYMBOL(machine_power_off);
--- diff/arch/sh/kernel/ptrace.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/ptrace.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: ptrace.c,v 1.14 2003/11/28 23:05:43 kkojima Exp $
+/* $Id: ptrace.c,v 1.15 2004/05/07 05:32:05 sugioka Exp $
  *
  * linux/arch/sh/kernel/ptrace.c
  *
@@ -255,13 +255,6 @@
 		ret = ptrace_detach(child, data);
 		break;
 
-	case PTRACE_SETOPTIONS:
-		if (data & PTRACE_O_TRACESYSGOOD)
-			child->ptrace |= PT_TRACESYSGOOD;
-		else
-			child->ptrace &= ~PT_TRACESYSGOOD;
-		ret = 0;
-		break;
 #ifdef CONFIG_SH_DSP
 	case PTRACE_GETDSPREGS: {
 		unsigned long dp;
--- diff/arch/sh/kernel/setup.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/setup.c	2004-07-01 21:32:34.000000000 +0100
@@ -25,15 +25,13 @@
 #include <asm/io_generic.h>
 #include <asm/sections.h>
 #include <asm/irq.h>
-#ifdef CONFIG_SH_EARLY_PRINTK
-#include <asm/sh_bios.h>
-#endif
+#include <asm/setup.h>
 
 #ifdef CONFIG_SH_KGDB
 #include <asm/kgdb.h>
 static int kgdb_parse_options(char *options);
 #endif
-
+extern void * __rd_start, * __rd_end;
 /*
  * Machine setup..
  */
@@ -85,14 +83,12 @@
 #define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
 /* ... */
 #define COMMAND_LINE ((char *) (PARAM+0x100))
-#define COMMAND_LINE_SIZE 256
 
 #define RAMDISK_IMAGE_START_MASK  	0x07FF
 #define RAMDISK_PROMPT_FLAG		0x8000
 #define RAMDISK_LOAD_FLAG		0x4000	
 
 static char command_line[COMMAND_LINE_SIZE] = { 0, };
-       char saved_command_line[COMMAND_LINE_SIZE];
 
 struct resource standard_io_resources[] = {
 	{ "dma1", 0x00, 0x1f },
@@ -120,130 +116,6 @@
 
 unsigned long memory_start, memory_end;
 
-/* XXX: MRB-remove - blatant hack */
-#if 1
-#define SCIF_REG	0xffe80000
-
-static void scif_sercon_putc(int c)
-{
-	while (!(ctrl_inw(SCIF_REG + 0x10) & 0x20)) ;
-
-	ctrl_outb(c, SCIF_REG + 12);
-	ctrl_outw((ctrl_inw(SCIF_REG + 0x10) & 0x9f), SCIF_REG + 0x10);
-
-	if (c == '\n')
-		scif_sercon_putc('\r');
-}
-
-static void scif_sercon_flush(void)
-{
-	ctrl_outw((ctrl_inw(SCIF_REG + 0x10) & 0xbf), SCIF_REG + 0x10);
-
-	while (!(ctrl_inw(SCIF_REG + 0x10) & 0x40)) ;
-
-	ctrl_outw((ctrl_inw(SCIF_REG + 0x10) & 0xbf), SCIF_REG + 0x10);
-}
-
-static void scif_sercon_write(struct console *con, const char *s, unsigned count)
-{
-	while (count-- > 0)
-		scif_sercon_putc(*s++);
-
-	scif_sercon_flush();
-}
-
-static int __init scif_sercon_setup(struct console *con, char *options)
-{
-	con->cflag = CREAD | HUPCL | CLOCAL | B57600 | CS8;
-
-	return 0;
-}
-
-static struct console scif_sercon = {
-	.name		= "sercon",
-	.write		= scif_sercon_write,
-	.setup		= scif_sercon_setup,
-	.flags		= CON_PRINTBUFFER,
-	.index		= -1,
-};
-
-void scif_sercon_init(int baud)
-{
-	ctrl_outw(0, SCIF_REG + 8);
-	ctrl_outw(0, SCIF_REG);
-
-	/* Set baud rate */
-	ctrl_outb((50000000 / (32 * baud)) - 1, SCIF_REG + 4);
-
-	ctrl_outw(12, SCIF_REG + 24);
-	ctrl_outw(8, SCIF_REG + 24);
-	ctrl_outw(0, SCIF_REG + 32);
-	ctrl_outw(0x60, SCIF_REG + 16);
-	ctrl_outw(0, SCIF_REG + 36);
-	ctrl_outw(0x30, SCIF_REG + 8);
-
-	register_console(&scif_sercon);
-}
-
-void scif_sercon_unregister(void)
-{
-	unregister_console(&scif_sercon);
-}
-#endif
-
-#ifdef CONFIG_SH_EARLY_PRINTK
-/*
- *	Print a string through the BIOS
- */
-static void sh_console_write(struct console *co, const char *s,
-				 unsigned count)
-{
-    	sh_bios_console_write(s, count);
-}
-
-/*
- *	Setup initial baud/bits/parity. We do two things here:
- *	- construct a cflag setting for the first rs_open()
- *	- initialize the serial port
- *	Return non-zero if we didn't find a serial port.
- */
-static int __init sh_console_setup(struct console *co, char *options)
-{
-	int	cflag = CREAD | HUPCL | CLOCAL;
-
-	/*
-	 *	Now construct a cflag setting.
-	 *  	TODO: this is a totally bogus cflag, as we have
-	 *  	no idea what serial settings the BIOS is using, or
-	 *  	even if its using the serial port at all.
-	 */
-    	cflag |= B115200 | CS8 | /*no parity*/0;
-
-	co->cflag = cflag;
-
-	return 0;
-}
-
-static struct console sh_console = {
-	.name		= "bios",
-	.write		= sh_console_write,
-	.setup		= sh_console_setup,
-	.flags		= CON_PRINTBUFFER,
-	.index		= -1,
-};
-
-void sh_console_init(void)
-{
-	register_console(&sh_console);
-}
-
-void sh_console_unregister(void)
-{
-	unregister_console(&sh_console);
-}
-
-#endif
-
 static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE],
 				  struct sh_machine_vector** mvp,
 				  unsigned long *mv_io_base,
@@ -325,10 +197,6 @@
 
 	parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base, &mv_mmio_enable);
 
-#ifdef CONFIG_CMDLINE_BOOL
-        sprintf(*cmdline_p, CONFIG_CMDLINE);
-#endif
-
 #ifdef CONFIG_SH_GENERIC
 	if (mv == NULL) {
 		mv = &mv_unknown;
@@ -382,14 +250,15 @@
 	unsigned long bootmap_size;
 	unsigned long start_pfn, max_pfn, max_low_pfn;
 
-/* XXX: MRB-remove */
-#if 0
-	scif_sercon_init(57600);
+#ifdef CONFIG_EARLY_PRINTK
+	extern void enable_early_printk(void);
+
+	enable_early_printk();
 #endif
-#ifdef CONFIG_SH_EARLY_PRINTK
-	sh_console_init();
+#ifdef CONFIG_CMDLINE_BOOL
+        strcpy(COMMAND_LINE, CONFIG_CMDLINE);
 #endif
-	
+
 	ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
 
 #ifdef CONFIG_BLK_DEV_RAM
@@ -492,6 +361,13 @@
 	reserve_bootmem_node(NODE_DATA(0), __MEMORY_START, PAGE_SIZE);
 
 #ifdef CONFIG_BLK_DEV_INITRD
+ 	ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
+ 	if (&__rd_start != &__rd_end) {
+		LOADER_TYPE = 1;
+		INITRD_START = PHYSADDR((unsigned long)&__rd_start) - __MEMORY_START;
+		INITRD_SIZE = (unsigned long)&__rd_end - (unsigned long)&__rd_start;
+ 	}
+
 	if (LOADER_TYPE && INITRD_START) {
 		if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
 			reserve_bootmem_node(NODE_DATA(0), INITRD_START+__MEMORY_START, INITRD_SIZE);
@@ -557,8 +433,10 @@
 
 static const char *cpu_name[] = {
 	[CPU_SH7604]	= "SH7604",
+	[CPU_SH7705]	= "SH7705",
 	[CPU_SH7708]	= "SH7708",
 	[CPU_SH7729]	= "SH7729",
+	[CPU_SH7300]	= "SH7300",
 	[CPU_SH7750]	= "SH7750",
 	[CPU_SH7750S]	= "SH7750S",
 	[CPU_SH7750R]	= "SH7750R",
@@ -595,8 +473,8 @@
 
 	for (i = 0; i < cpu_data->flags; i++)
 		if ((cpu_data->flags & (1 << i)))
-			seq_printf(m, " %s", cpu_flags[i]);
-	
+			seq_printf(m, " %s", cpu_flags[i+1]);
+
 	seq_printf(m, "\n");
 }
 
--- diff/arch/sh/kernel/sh_ksyms.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/sh_ksyms.c	2004-07-01 21:32:34.000000000 +0100
@@ -33,6 +33,7 @@
 EXPORT_SYMBOL(iounmap);
 EXPORT_SYMBOL(enable_irq);
 EXPORT_SYMBOL(disable_irq);
+EXPORT_SYMBOL(probe_irq_mask);
 EXPORT_SYMBOL(kernel_thread);
 EXPORT_SYMBOL(disable_irq_nosync);
 EXPORT_SYMBOL(irq_desc);
@@ -83,6 +84,7 @@
 EXPORT_SYMBOL(__down_interruptible);
 
 EXPORT_SYMBOL(__udelay);
+EXPORT_SYMBOL(__ndelay);
 EXPORT_SYMBOL(__const_udelay);
 
 #define DECLARE_EXPORT(name) extern void name(void);EXPORT_SYMBOL_NOVERS(name)
@@ -100,6 +102,7 @@
  
 DECLARE_EXPORT(__movstr_i4_even);
 DECLARE_EXPORT(__movstr_i4_odd);
+DECLARE_EXPORT(__movstrSI12_i4);
 
 /* needed by some modules */
 EXPORT_SYMBOL(flush_cache_all);
@@ -115,3 +118,4 @@
 #endif
 
 EXPORT_SYMBOL(csum_partial);
+EXPORT_SYMBOL(consistent_sync);
--- diff/arch/sh/kernel/smp.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sh/kernel/smp.c	2004-07-01 21:32:34.000000000 +0100
@@ -106,8 +106,6 @@
 	if (IS_ERR(tsk))
 		panic("Failed forking idle task for cpu %d\n", cpu);
 	
-	wake_up_forked_process(tsk);
-
 	init_idle(tsk, cpu);
 	unhash_process(tsk);
 	
--- diff/arch/sh/kernel/time.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/time.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,10 +1,10 @@
-/* $Id: time.c,v 1.19 2004/02/27 00:40:48 lethal Exp $
+/* $Id: time.c,v 1.21 2004/04/21 00:09:15 lethal Exp $
  *
  *  linux/arch/sh/kernel/time.c
  *
  *  Copyright (C) 1999  Tetsuya Okada & Niibe Yutaka
  *  Copyright (C) 2000  Philipp Rumpf <prumpf@tux.org>
- *  Copyright (C) 2002, 2003  Paul Mundt
+ *  Copyright (C) 2002, 2003, 2004  Paul Mundt
  *  Copyright (C) 2002  M. R. Brown  <mrbrown@linux-sh.org>
  *
  *  Some code taken from i386 version.
@@ -47,12 +47,26 @@
 #define TMU0_TCR_CALIB	0x0000
 
 #if defined(CONFIG_CPU_SH3)
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+#define TMU_TSTR        0xA412FE92      /* Byte access */
+
+#define TMU0_TCOR       0xA412FE94      /* Long access */
+#define TMU0_TCNT       0xA412FE98      /* Long access */
+#define TMU0_TCR        0xA412FE9C      /* Word access */
+
+#define TMU1_TCOR	0xA412FEA0	/* Long access */
+#define TMU1_TCNT	0xA412FEA4	/* Long access */
+#define TMU1_TCR	0xA412FEA8	/* Word access */
+
+#define FRQCR           0xA415FF80
+#else
 #define TMU_TOCR	0xfffffe90	/* Byte access */
 #define TMU_TSTR	0xfffffe92	/* Byte access */
 
 #define TMU0_TCOR	0xfffffe94	/* Long access */
 #define TMU0_TCNT	0xfffffe98	/* Long access */
 #define TMU0_TCR	0xfffffe9c	/* Word access */
+#endif
 #elif defined(CONFIG_CPU_SH4)
 #define TMU_TOCR	0xffd80000	/* Byte access */
 #define TMU_TSTR	0xffd80004	/* Byte access */
@@ -85,6 +99,9 @@
 int (*rtc_set_time)(const time_t) = 0;
 #endif
 
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+static int md_table[] = { 1, 2, 3, 4, 6, 8, 12 };
+#endif
 #if defined(CONFIG_CPU_SH3)
 static int stc_multipliers[] = { 1, 2, 3, 4, 6, 1, 1, 1 };
 static int stc_values[]      = { 0, 1, 4, 2, 5, 0, 0, 0 };
@@ -337,7 +354,9 @@
 	 * have it count down at its natural rate.
 	 */
 	ctrl_outb(0, TMU_TSTR);
+#if !defined(CONFIG_CPU_SUBTYPE_SH7300)
 	ctrl_outb(TMU_TOCR_INIT, TMU_TOCR);
+#endif
 	ctrl_outw(TMU0_TCR_CALIB, TMU0_TCR);
 	ctrl_outl(0xffffffff, TMU0_TCOR);
 	ctrl_outl(0xffffffff, TMU0_TCNT);
@@ -391,13 +410,22 @@
 }
 __setup("sh_pclk=", sh_pclk_setup);
 
-static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL};
+static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
 
 void get_current_frequency_divisors(unsigned int *ifc, unsigned int *bfc, unsigned int *pfc)
 {
 	unsigned int frqcr = ctrl_inw(FRQCR);
 
 #if defined(CONFIG_CPU_SH3)
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+	*ifc = md_table[((frqcr & 0x0070) >> 4)];
+	*bfc = md_table[((frqcr & 0x0700) >> 8)];
+	*pfc = md_table[frqcr & 0x0007];
+#elif defined(CONFIG_CPU_SUBTYPE_SH7705)
+	*bfc = stc_multipliers[(frqcr & 0x0300) >> 8];
+	*ifc = ifc_divisors[(frqcr & 0x0030) >> 4];
+	*pfc = pfc_divisors[frqcr & 0x0003];
+#else
 	unsigned int tmp;
 
 	tmp  = (frqcr & 0x8000) >> 13;
@@ -409,6 +437,7 @@
 	tmp  = (frqcr & 0x2000) >> 11;
 	tmp |= frqcr & 0x0003;
 	*pfc = pfc_divisors[tmp];
+#endif
 #elif defined(CONFIG_CPU_SH4)
 	*ifc = ifc_divisors[(frqcr >> 6) & 0x0007];
 	*bfc = bfc_divisors[(frqcr >> 3) & 0x0007];
@@ -431,26 +460,139 @@
 _FREQ_TABLE(bfc);
 _FREQ_TABLE(pfc);
 
+#ifdef CONFIG_CPU_SUBTYPE_ST40STB1
+
+/* The ST40 divisors are totally different so we set the cpu data
+** clocks using a different algorithm
+**
+** I've just plugged this from the 2.4 code - Alex Bennee <kernel-hacker@bennee.com>
+*/
+#define CCN_PVR_CHIP_SHIFT 24
+#define CCN_PVR_CHIP_MASK  0xff
+#define CCN_PVR_CHIP_ST40STB1 0x4
+
+
+struct frqcr_data {
+    unsigned short frqcr;
+    struct {
+	unsigned char multiplier;
+	unsigned char divisor;
+    } factor[3];
+};
+
+static struct frqcr_data st40_frqcr_table[] = {
+    { 0x000, {{1,1}, {1,1}, {1,2}}},
+    { 0x002, {{1,1}, {1,1}, {1,4}}},
+    { 0x004, {{1,1}, {1,1}, {1,8}}},
+    { 0x008, {{1,1}, {1,2}, {1,2}}},
+    { 0x00A, {{1,1}, {1,2}, {1,4}}},
+    { 0x00C, {{1,1}, {1,2}, {1,8}}},
+    { 0x011, {{1,1}, {2,3}, {1,6}}},
+    { 0x013, {{1,1}, {2,3}, {1,3}}},
+    { 0x01A, {{1,1}, {1,2}, {1,4}}},
+    { 0x01C, {{1,1}, {1,2}, {1,8}}},
+    { 0x023, {{1,1}, {2,3}, {1,3}}},
+    { 0x02C, {{1,1}, {1,2}, {1,8}}},
+    { 0x048, {{1,2}, {1,2}, {1,4}}},
+    { 0x04A, {{1,2}, {1,2}, {1,6}}},
+    { 0x04C, {{1,2}, {1,2}, {1,8}}},
+    { 0x05A, {{1,2}, {1,3}, {1,6}}},
+    { 0x05C, {{1,2}, {1,3}, {1,6}}},
+    { 0x063, {{1,2}, {1,4}, {1,4}}},
+    { 0x06C, {{1,2}, {1,4}, {1,8}}},
+    { 0x091, {{1,3}, {1,3}, {1,6}}},
+    { 0x093, {{1,3}, {1,3}, {1,6}}},
+    { 0x0A3, {{1,3}, {1,6}, {1,6}}},
+    { 0x0DA, {{1,4}, {1,4}, {1,8}}},
+    { 0x0DC, {{1,4}, {1,4}, {1,8}}},
+    { 0x0EC, {{1,4}, {1,8}, {1,8}}},
+    { 0x123, {{1,4}, {1,4}, {1,8}}},
+    { 0x16C, {{1,4}, {1,8}, {1,8}}},
+};
+
+struct memclk_data {
+    unsigned char multiplier;
+    unsigned char divisor;
+};
+static struct memclk_data st40_memclk_table[8] = {
+    {1,1},	// 000
+    {1,2},	// 001
+    {1,3},	// 010
+    {2,3},	// 011
+    {1,4},	// 100
+    {1,6},	// 101
+    {1,8},	// 110
+    {1,8}	// 111
+};
+
+static void st40_specific_time_init(unsigned int module_clock, unsigned short frqcr)
+{
+    unsigned int cpu_clock, master_clock, bus_clock, memory_clock;
+    struct frqcr_data *d;
+    int a;
+    unsigned long memclkcr;
+    struct memclk_data *e;
+
+    for (a=0; a<ARRAY_SIZE(st40_frqcr_table); a++) {
+	d = &st40_frqcr_table[a];
+	if (d->frqcr == (frqcr & 0x1ff))
+	    break;
+    }
+    if (a == ARRAY_SIZE(st40_frqcr_table)) {
+	d = st40_frqcr_table;
+	printk("ERROR: Unrecognised FRQCR value (0x%x), using default multipliers\n",frqcr);
+    }
+
+    memclkcr = ctrl_inl(CLOCKGEN_MEMCLKCR);
+    e = &st40_memclk_table[memclkcr & MEMCLKCR_RATIO_MASK];
+
+    printk("Clock multipliers: CPU: %d/%d Bus: %d/%d Mem: %d/%d Periph: %d/%d\n",
+	    d->factor[0].multiplier, d->factor[0].divisor,
+	    d->factor[1].multiplier, d->factor[1].divisor,
+	    e->multiplier,           e->divisor,
+	    d->factor[2].multiplier, d->factor[2].divisor);
+
+    master_clock = module_clock * d->factor[2].divisor    / d->factor[2].multiplier;
+    bus_clock    = master_clock * d->factor[1].multiplier / d->factor[1].divisor;
+    memory_clock = master_clock * e->multiplier           / e->divisor;
+    cpu_clock    = master_clock * d->factor[0].multiplier / d->factor[0].divisor;
+
+    current_cpu_data.cpu_clock    = cpu_clock;
+    current_cpu_data.master_clock = master_clock;
+    current_cpu_data.bus_clock    = bus_clock;
+    current_cpu_data.memory_clock = memory_clock;
+    current_cpu_data.module_clock = module_clock;
+
+}
+
+#endif
+
 void __init time_init(void)
 {
 	unsigned int timer_freq = 0;
 	unsigned int ifc, pfc, bfc;
 	unsigned long interval;
+#ifdef CONFIG_CPU_SUBTYPE_ST40STB1
+	unsigned long pvr;
+	unsigned short frqcr;
+#endif
 
 	if (board_time_init)
 		board_time_init();
 
-	get_current_frequency_divisors(&ifc, &bfc, &pfc);
 
 	/*
 	 * If we don't have an RTC (such as with the SH7300), don't attempt to
 	 * probe the timer frequency. Rely on an either hardcoded peripheral
-	 * clock value, or on the sh_pclk command line option.
+	 * clock value, or on the sh_pclk command line option. Note that we
+	 * still need to have CONFIG_SH_PCLK_FREQ set in order for things like
+	 * CLOCK_TICK_RATE to be sane.
 	 */
 	current_cpu_data.module_clock = sh_pclk_freq;
 
+#ifdef CONFIG_SH_PCLK_CALC
 	/* XXX: Switch this over to a more generic test. */
-	if (current_cpu_data.type != CPU_SH7300) {
+	{
 		unsigned int freq;
 
 		/* 
@@ -466,15 +608,31 @@
 		timer_freq = get_timer_frequency();
 		freq = timer_freq * 4;
 
-		if (sh_pclk_freq && sh_pclk_freq != freq) {
+		if (sh_pclk_freq && (sh_pclk_freq/100*99 > freq || sh_pclk_freq/100*101 < freq)) {
 			printk(KERN_NOTICE "Calculated peripheral clock value "
 			       "%d differs from sh_pclk value %d, fixing..\n",
 			       freq, sh_pclk_freq);
 			current_cpu_data.module_clock = freq;
 		}
 	}
+#endif
 
-	rtc_get_time(&xtime);
+#ifdef CONFIG_CPU_SUBTYPE_ST40STB1
+	pvr = ctrl_inl(CCN_PVR);
+	frqcr = ctrl_inw(FRQCR);
+	printk("time.c ST40 Probe: PVR %08lx, FRQCR %04hx\n", pvr, frqcr);
+	if (((pvr >>CCN_PVR_CHIP_SHIFT) & CCN_PVR_CHIP_MASK) == CCN_PVR_CHIP_ST40STB1)
+	    st40_specific_time_init(current_cpu_data.module_clock, frqcr);
+	else
+#endif
+	    get_current_frequency_divisors(&ifc, &bfc, &pfc);
+
+	if (rtc_get_time)
+		rtc_get_time(&xtime);
+	else {
+         	xtime.tv_sec = mktime(2000, 1, 1, 0, 0, 0);
+         	xtime.tv_nsec = 0;
+	}
 
         set_normalized_timespec(&wall_to_monotonic,
                                 -xtime.tv_sec, -xtime.tv_nsec);
@@ -485,6 +643,10 @@
 		setup_irq(TIMER_IRQ, &irq0);
 	}
 
+	/*
+	** for ST40 chips the current_cpu_data should already be set
+	** so not having valid pfc/bfc/ifc shouldn't be a problem
+	*/
 	if (!current_cpu_data.master_clock)
 		current_cpu_data.master_clock = current_cpu_data.module_clock * pfc;
 	if (!current_cpu_data.bus_clock)
@@ -506,13 +668,19 @@
 	printk("Module clock: %d.%02dMHz\n",
 	       (current_cpu_data.module_clock / 1000000),
 	       (current_cpu_data.module_clock % 1000000)/10000);
+#if defined(CONFIG_SH_HS7751RVOIP) || defined(CONFIG_SH_RTS7751R2D)
+	interval = ((current_cpu_data.module_clock/4 + HZ/2) / HZ) - 1;
+#else
 	interval = (current_cpu_data.module_clock/4 + HZ/2) / HZ;
+#endif
 
 	printk("Interval = %ld\n", interval);
 
 	/* Start TMU0 */
 	ctrl_outb(0, TMU_TSTR);
+#if !defined(CONFIG_CPU_SUBTYPE_SH7300)
 	ctrl_outb(TMU_TOCR_INIT, TMU_TOCR);
+#endif
 	ctrl_outw(TMU0_TCR_INIT, TMU0_TCR);
 	ctrl_outl(interval, TMU0_TCOR);
 	ctrl_outl(interval, TMU0_TCNT);
--- diff/arch/sh/kernel/traps.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/traps.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: traps.c,v 1.16 2004/03/16 00:10:54 lethal Exp $
+/* $Id: traps.c,v 1.17 2004/05/02 01:46:30 sugioka Exp $
  *
  *  linux/arch/sh/traps.c
  *
@@ -559,7 +559,7 @@
 	 * Safe guard if DSP mode is already enabled or we're lacking
 	 * the DSP altogether.
 	 */
-	if (!test_bit(CPU_HAS_DSP, &(cpu_data->flags)) || (regs->sr & SR_DSP))
+	if (!(cpu_data->flags & CPU_HAS_DSP) || (regs->sr & SR_DSP))
 		return 0;
 
 	get_user(inst, ((unsigned short *) regs->pc));
@@ -636,7 +636,7 @@
 		= (void *)do_illegal_slot_inst;
 
 #ifdef CONFIG_CPU_SH4
-	if (!test_bit(CPU_HAS_FPU, &(cpu_data->flags))) {
+	if (!(cpu_data->flags & CPU_HAS_FPU)) {
 		/* For SH-4 lacking an FPU, treat floating point instructions
 		   as reserved. */
 		/* entry 64 corresponds to EXPEVT=0x800 */
--- diff/arch/sh/kernel/vmlinux.lds.S	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/kernel/vmlinux.lds.S	2004-07-01 21:32:34.000000000 +0100
@@ -38,6 +38,14 @@
 
   .data : {			/* Data */
 	*(.data)
+
+ 	 /* Align the initial ramdisk image (INITRD) on page boundaries. */
+ 	 . = ALIGN(4096);
+ 	 __rd_start = .;
+ 	 *(.initrd)
+ 	 . = ALIGN(4096);
+ 	 __rd_end = .;
+
 	CONSTRUCTORS
 	}
 
--- diff/arch/sh/lib/delay.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/lib/delay.c	2004-07-01 21:32:34.000000000 +0100
@@ -33,3 +33,9 @@
 {
 	__const_udelay(usecs * 0x000010c6);  /* 2**32 / 1000000 */
 }
+
+void __ndelay(unsigned long nsecs)
+{
+	__const_udelay(nsecs * 0x00000005);
+}
+
--- diff/arch/sh/mm/cache-sh3.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/mm/cache-sh3.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: cache-sh3.c,v 1.8 2004/02/01 16:26:27 lethal Exp $
+/* $Id: cache-sh3.c,v 1.9 2004/05/02 01:46:30 sugioka Exp $
  *
  *  linux/arch/sh/mm/cache-sh3.c
  *
@@ -65,14 +65,14 @@
 	 * 2K(direct) 7702 is not supported (yet)
 	 */
 	if (data0 == data1 && data2 == data3) {	/* Shadow */
-		cpu_data->dcache.way_shift	= 11;
+		cpu_data->dcache.way_incr	= (1 << 11);
 		cpu_data->dcache.entry_mask	= 0x7f0;
 		cpu_data->dcache.sets		= 128;
 		cpu_data->type = CPU_SH7708;
 
-		set_bit(CPU_HAS_MMU_PAGE_ASSOC, &(cpu_data->flags));
+		cpu_data->flags |= CPU_HAS_MMU_PAGE_ASSOC;
 	} else {				/* 7709A or 7729  */
-		cpu_data->dcache.way_shift	= 12;
+		cpu_data->dcache.way_incr	= (1 << 12);
 		cpu_data->dcache.entry_mask	= 0xff0;
 		cpu_data->dcache.sets		= 256;
 		cpu_data->type = CPU_SH7729;
@@ -108,13 +108,12 @@
 		& ~(L1_CACHE_BYTES-1);
 
 	for (v = begin; v < end; v+=L1_CACHE_BYTES) {
+		unsigned long addrstart = CACHE_OC_ADDRESS_ARRAY;
 		for (j = 0; j < cpu_data->dcache.ways; j++) {
 			unsigned long data, addr, p;
 
 			p = __pa(v);
-			addr = CACHE_OC_ADDRESS_ARRAY |
-				(j << cpu_data->dcache.way_shift)|
-				(v & cpu_data->dcache.entry_mask);
+			addr = addrstart | (v & cpu_data->dcache.entry_mask);
 			local_irq_save(flags);
 			data = ctrl_inl(addr);
 			
@@ -126,6 +125,7 @@
 				break;
 			}
 			local_irq_restore(flags);
+			addrstart += cpu_data->dcache.way_incr;
 		}
 	}
 }
--- diff/arch/sh/mm/cache-sh4.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/mm/cache-sh4.c	2004-07-01 21:32:34.000000000 +0100
@@ -30,7 +30,7 @@
 
 int __init detect_cpu_and_cache_system(void)
 {
-	unsigned long pvr, prr, ccr, cvr;
+	unsigned long pvr, prr, cvr;
 	unsigned long size;
 
 	static unsigned long sizes[16] = {
@@ -48,7 +48,7 @@
 	/*
 	 * Setup some sane SH-4 defaults for the icache
 	 */
-	cpu_data->icache.way_shift	= 13;
+	cpu_data->icache.way_incr	= (1 << 13);
 	cpu_data->icache.entry_shift	= 5;
 	cpu_data->icache.entry_mask	= 0x1fe0;
 	cpu_data->icache.sets		= 256;
@@ -58,7 +58,7 @@
 	/*
 	 * And again for the dcache ..
 	 */
-	cpu_data->dcache.way_shift	= 14;
+	cpu_data->dcache.way_incr	= (1 << 14);
 	cpu_data->dcache.entry_shift	= 5;
 	cpu_data->dcache.entry_mask	= 0x3fe0;
 	cpu_data->dcache.sets		= 512;
@@ -66,7 +66,7 @@
 	cpu_data->dcache.linesz		= L1_CACHE_BYTES;
 
 	/* Set the FPU flag, virtually all SH-4's have one */
-	set_bit(CPU_HAS_FPU, &(cpu_data->flags));
+	cpu_data->flags |= CPU_HAS_FPU;
 
 	/*
 	 * Probe the underlying processor version/revision and
@@ -75,7 +75,7 @@
 	switch (pvr) {
 	case 0x205:
 		cpu_data->type = CPU_SH7750;
-		set_bit(CPU_HAS_P2_FLUSH_BUG, &(cpu_data->flags));
+		cpu_data->flags |= CPU_HAS_P2_FLUSH_BUG;
 		break;
 	case 0x206:
 		cpu_data->type = CPU_SH7750S;
@@ -84,7 +84,7 @@
 		 * FIXME: This is needed for 7750, but do we need it for the
 		 * 7750S too? For now, assume we do.. -- PFM
 		 */
-		set_bit(CPU_HAS_P2_FLUSH_BUG, &(cpu_data->flags));
+		cpu_data->flags |= CPU_HAS_P2_FLUSH_BUG;
 
 		break;
 	case 0x1100:
@@ -102,7 +102,7 @@
 		cpu_data->dcache.ways = 2;
 
 		/* No FPU on the SH4-500 series.. */
-		clear_bit(CPU_HAS_FPU, &(cpu_data->flags));
+		cpu_data->flags &= ~CPU_HAS_FPU;
 		break;
 	case 0x600:
 		cpu_data->type = CPU_SH4_202;
@@ -129,27 +129,20 @@
 	 * On anything that's not a direct-mapped cache, look to the CVR
 	 * for I/D-cache specifics.
 	 */
-	if (cpu_data->dcache.ways > 1) {
-		jump_to_P2();
-		ccr = ctrl_inl(CCR);
-
-		/* Force EMODE */
-		if (!(ccr & CCR_CACHE_EMODE)) {
-			ccr |= CCR_CACHE_EMODE;
-			ctrl_outl(ccr, CCR);
-		}
-
-		back_to_P1();
-
+	if (cpu_data->icache.ways > 1) {
 		size = sizes[(cvr >> 20) & 0xf];
-		cpu_data->icache.way_shift	=  (size >> 1);
-		cpu_data->icache.entry_mask	= ((size >> 2) - (1 << 5));
-		cpu_data->icache.sets		=  (size >> 6);
+		cpu_data->icache.way_incr	= size / cpu_data->icache.ways;
+		cpu_data->icache.sets		= (size >> 6);
+		cpu_data->icache.entry_mask	=
+			((size / cpu_data->icache.ways) - (1 << 5));
+	}
 
+	if (cpu_data->dcache.ways > 1) {
 		size = sizes[(cvr >> 16) & 0xf];
-		cpu_data->dcache.way_shift	=  (size >> 1);
-		cpu_data->dcache.entry_mask	= ((size >> 2) - (1 << 5));
-		cpu_data->dcache.sets		=  (size >> 6);
+		cpu_data->dcache.way_incr	= size / cpu_data->dcache.ways;
+		cpu_data->dcache.sets		= (size >> 6);
+		cpu_data->dcache.entry_mask	=
+			((size / cpu_data->dcache.ways) - (1 << 5));
 	}
 
 	return 0;
@@ -250,7 +243,7 @@
 	int i;
 
 	entry_offset = 1 << cpu_data->dcache.entry_shift;
-	for (i = 0; i < cpu_data->dcache.ways; i++, start += (1 << cpu_data->dcache.way_shift)) {
+	for (i = 0; i < cpu_data->dcache.ways; i++, start += cpu_data->dcache.way_incr) {
 		for (addr = CACHE_OC_ADDRESS_ARRAY + start;
 		     addr < CACHE_OC_ADDRESS_ARRAY + 4096 + start;
 		     addr += entry_offset) {
@@ -297,7 +290,7 @@
 
 	local_irq_save(flags);
 	jump_to_P2();
-	for(i = 0; i < cpu_data->icache.ways; i++, index += (1 << cpu_data->icache.way_shift))
+	for(i = 0; i < cpu_data->icache.ways; i++, index += cpu_data->icache.way_incr)
 		ctrl_outl(0, index);	/* Clear out Valid-bit */
 	back_to_P1();
 	local_irq_restore(flags);
@@ -313,12 +306,13 @@
 	 * SH7751, SH7751R, and ST40 have no restriction to handle cache.
 	 * (While SH7750 must do that at P2 area.)
 	 */
-	if (test_bit(CPU_HAS_P2_FLUSH_BUG, &(cpu_data->flags))) {
+	if ((cpu_data->flags & CPU_HAS_P2_FLUSH_BUG)
+	   || start < CACHE_OC_ADDRESS_ARRAY) {
 		local_irq_save(flags);
-		__flush_cache_4096(start | SH_CACHE_ASSOC, phys | 0x80000000, 0x20000000);
+		__flush_cache_4096(start | SH_CACHE_ASSOC, P1SEGADDR(phys), 0x20000000);
 		local_irq_restore(flags);
-	} else if (start >= CACHE_OC_ADDRESS_ARRAY) {
-		__flush_cache_4096(start | SH_CACHE_ASSOC, phys | 0x80000000, 0);
+	} else {
+		__flush_cache_4096(start | SH_CACHE_ASSOC, P1SEGADDR(phys), 0);
 	}
 }
 
--- diff/arch/sh/mm/consistent.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/mm/consistent.c	2004-07-01 21:32:34.000000000 +0100
@@ -24,56 +24,58 @@
 	if (!page)
 		return NULL;
 
-	ret = (void *)P2SEGADDR(page_to_bus(page));
+	ret = page_address(page);
+	*handle = virt_to_phys(ret);
 
 	/*
 	 * We must flush the cache before we pass it on to the device
 	 */
 	dma_cache_wback_inv(ret, size);
 
-	*handle = (unsigned long)ret;
-
+	page = virt_to_page(ret);
 	free = page + (size >> PAGE_SHIFT);
 	end  = page + (1 << order);
 
-	do {
+	while (++page < end) {
 		set_page_count(page, 1);
-		page++;
-	} while (size -= PAGE_SIZE);
 
-	/*
-	 * Free any unused pages
-	 */
-	while (page < end) {
-		set_page_count(page, 1);
-		__free_page(page);
-		page++;
+		/* Free any unused pages */
+		if (page >= free) {
+			__free_page(page);
+		}
 	}
 
-	return ret;
+	return P2SEGADDR(ret);
 }
 
 void consistent_free(void *vaddr, size_t size)
 {
 	unsigned long addr = P1SEGADDR((unsigned long)vaddr);
+	struct page *page=virt_to_page(addr);
+	int num_pages=(size+PAGE_SIZE-1) >> PAGE_SHIFT;
+	int i;
 
-	free_pages(addr, get_order(size));
+	for(i=0;i<num_pages;i++) {
+		__free_page((page+i));
+	}
 }
 
 void consistent_sync(void *vaddr, size_t size, int direction)
 {
+	void * p1addr = (void*) P1SEGADDR((unsigned long)vaddr);
+
 	switch (direction) {
 	case DMA_FROM_DEVICE:		/* invalidate only */
-		dma_cache_inv(vaddr, size);
+		dma_cache_inv(p1addr, size);
 		break;
 	case DMA_TO_DEVICE:		/* writeback only */
-		dma_cache_wback(vaddr, size);
+		dma_cache_wback(p1addr, size);
 		break;
 	case DMA_BIDIRECTIONAL:		/* writeback and invalidate */
-		dma_cache_wback_inv(vaddr, size);
+		dma_cache_wback_inv(p1addr, size);
 		break;
 	default:
 		BUG();
 	}
 }
-
+EXPORT_SYMBOL(consistent_sync);
--- diff/arch/sh/mm/init.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/mm/init.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,7 +3,7 @@
  *  linux/arch/sh/mm/init.c
  *
  *  Copyright (C) 1999  Niibe Yutaka
- *  Copyright (C) 2002  Paul Mundt
+ *  Copyright (C) 2002, 2004  Paul Mundt
  *
  *  Based on linux/arch/i386/mm/init.c:
  *   Copyright (C) 1995  Linus Torvalds
@@ -66,7 +66,7 @@
 
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 	i = max_mapnr;
 	while (i-- > 0) {
 		total++;
@@ -83,6 +83,66 @@
 	printk("%d pages swap cached\n",cached);
 }
 
+static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
+{
+	pgd_t *pgd;
+	pmd_t *pmd;
+	pte_t *pte;
+
+	pgd = swapper_pg_dir + pgd_index(addr);
+	if (pgd_none(*pgd)) {
+		pgd_ERROR(*pgd);
+		return;
+	}
+
+	pmd = pmd_offset(pgd, addr);
+	if (pmd_none(*pmd)) {
+		pte = (pte_t *)get_zeroed_page(GFP_ATOMIC);
+		set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
+		if (pte != pte_offset_kernel(pmd, 0)) {
+			pmd_ERROR(*pmd);
+			return;
+		}
+	}
+
+	pte = pte_offset_kernel(pmd, addr);
+	if (!pte_none(*pte)) {
+		pte_ERROR(*pte);
+		return;
+	}
+
+	set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, prot));
+
+	__flush_tlb_page(get_asid(), addr);
+}
+
+/*
+ * As a performance optimization, other platforms preserve the fixmap mapping
+ * across a context switch, we don't presently do this, but this could be done
+ * in a similar fashion as to the wired TLB interface that sh64 uses (by way
+ * of the memorry mapped UTLB configuration) -- this unfortunately forces us to
+ * give up a TLB entry for each mapping we want to preserve. While this may be
+ * viable for a small number of fixmaps, it's not particularly useful for
+ * everything and needs to be carefully evaluated. (ie, we may want this for
+ * the vsyscall page).
+ *
+ * XXX: Perhaps add a _PAGE_WIRED flag or something similar that we can pass
+ * in at __set_fixmap() time to determine the appropriate behavior to follow.
+ *
+ *					 -- PFM.
+ */
+void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
+{
+	unsigned long address = __fix_to_virt(idx);
+
+	if (idx >= __end_of_fixed_addresses) {
+		BUG();
+		return;
+	}
+
+	set_pte_phys(address, phys, prot);
+}
+
 /* References to section boundaries */
 
 extern char _text, _etext, _edata, __bss_start, _end;
--- diff/arch/sh/mm/pg-sh4.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/mm/pg-sh4.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,7 +1,5 @@
-/* 
- * $Id: pg-sh4.c,v 1.1.2.2 2002/11/17 17:56:18 lethal Exp $
- *
- *  arch/sh/mm/pg-sh4.c
+/*
+ * arch/sh/mm/pg-sh4.c
  *
  * Copyright (C) 1999, 2000, 2002  Niibe Yutaka
  * Copyright (C) 2002  Paul Mundt
@@ -101,3 +99,24 @@
 		up(&p3map_sem[(address & CACHE_ALIAS)>>12]);
 	}
 }
+
+/*
+ * For SH-4, we have our own implementation for ptep_get_and_clear
+ */
+inline pte_t ptep_get_and_clear(pte_t *ptep)
+{
+	pte_t pte = *ptep;
+
+	pte_clear(ptep);
+	if (!pte_not_present(pte)) {
+		unsigned long pfn = pte_pfn(pte);
+		if (pfn_valid(pfn)) {
+			struct page *page = pfn_to_page(pfn);
+			struct address_space *mapping = page_mapping(page);
+			if (!mapping || !mapping_writably_mapped(mapping))
+				__clear_bit(PG_mapped, &page->flags);
+		}
+	}
+	return pte;
+}
+
--- diff/arch/sh/mm/tlb-sh3.c	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/mm/tlb-sh3.c	2004-07-01 21:32:34.000000000 +0100
@@ -72,7 +72,7 @@
 	addr = MMU_TLB_ADDRESS_ARRAY | (page & 0x1F000);
 	data = (page & 0xfffe0000) | asid; /* VALID bit is off */
 	
-	if (test_bit(CPU_HAS_MMU_PAGE_ASSOC, &(cpu_data->flags))) {
+	if ((cpu_data->flags & CPU_HAS_MMU_PAGE_ASSOC)) {
 		addr |= MMU_PAGE_ASSOC_BIT;
 		ways = 1;	/* we already know the way .. */
 	}
--- diff/arch/sh/tools/mach-types	2004-05-19 22:11:22.000000000 +0100
+++ source/arch/sh/tools/mach-types	2004-07-01 21:32:34.000000000 +0100
@@ -7,6 +7,7 @@
 #
 SE			SH_SOLUTION_ENGINE
 7751SE			SH_7751_SOLUTION_ENGINE		
+7300SE			SH_7300_SOLUTION_ENGINE
 7751SYSTEMH		SH_7751_SYSTEMH
 HP600			SH_HP600
 HP620			SH_HP620
@@ -21,4 +22,6 @@
 ADX			SH_ADX
 MPC1211			SH_MPC1211
 SNAPGEAR		SH_SECUREEDGE5410
+HS7751RVOIP		SH_HS7751RVOIP
+RTS7751R2D		SH_RTS7751R2D
 
--- diff/arch/sparc/kernel/init_task.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc/kernel/init_task.c	2004-07-01 21:32:34.000000000 +0100
@@ -2,6 +2,7 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/init_task.h>
+#include <linux/mqueue.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
--- diff/arch/sparc/kernel/irq.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc/kernel/irq.c	2004-07-01 21:32:34.000000000 +0100
@@ -449,7 +449,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->dev_id = NULL;
 	action->next = NULL;
@@ -529,7 +529,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/sparc/kernel/setup.c	2004-05-19 22:11:23.000000000 +0100
+++ source/arch/sparc/kernel/setup.c	2004-07-01 21:32:34.000000000 +0100
@@ -47,6 +47,7 @@
 #include <asm/hardirq.h>
 #include <asm/machines.h>
 #include <asm/cpudata.h>
+#include <asm/setup.h>
 
 struct screen_info screen_info = {
 	0, 0,			/* orig-x, orig-y */
@@ -244,8 +245,7 @@
 
 extern int root_mountflags;
 
-char saved_command_line[256];
-char reboot_command[256];
+char reboot_command[COMMAND_LINE_SIZE];
 enum sparc_cpu sparc_cpu_model;
 
 struct tt_entry *sparc_ttable;
--- diff/arch/sparc/kernel/sparc_ksyms.c	2004-05-19 22:11:23.000000000 +0100
+++ source/arch/sparc/kernel/sparc_ksyms.c	2004-07-01 21:32:34.000000000 +0100
@@ -11,6 +11,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/init.h>
 #include <linux/smp.h>
 #include <linux/types.h>
 #include <linux/string.h>
@@ -74,7 +75,6 @@
 extern void *__memscan_generic(void *, int, size_t);
 extern int __memcmp(const void *, const void *, __kernel_size_t);
 extern int __strncmp(const char *, const char *, __kernel_size_t);
-extern char saved_command_line[];
 
 extern void bcopy (const char *, char *, int);
 extern int __ashrdi3(int, int);
--- diff/arch/sparc/kernel/sun4d_irq.c	2004-05-19 22:11:23.000000000 +0100
+++ source/arch/sparc/kernel/sun4d_irq.c	2004-07-01 21:32:34.000000000 +0100
@@ -336,7 +336,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/sparc/mm/init.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc/mm/init.c	2004-07-01 21:32:34.000000000 +0100
@@ -76,7 +76,7 @@
 {
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",
+	printk("Free swap:       %6ldkB\n",
 	       nr_swap_pages << (PAGE_SHIFT-10));
 	printk("%ld pages of RAM\n", totalram_pages);
 	printk("%d free pages\n", nr_free_pages());
--- diff/arch/sparc64/Kconfig	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc64/Kconfig	2004-07-01 21:32:34.000000000 +0100
@@ -687,12 +687,19 @@
 	depends on DEBUG_KERNEL
 	bool "Debug BOOTMEM initialization"
 
+config LOCKMETER
+	bool "Kernel lock metering"
+	depends on SMP && !PREEMPT
+	help
+	  Say Y to enable kernel lock metering, which adds overhead to SMP locks,
+	  but allows you to see various statistics using the lockstat command.
+
 # We have a custom atomic_dec_and_lock() implementation but it's not
 # compatible with spinlock debugging so we need to fall back on
 # the generic version in that case.
 config HAVE_DEC_LOCK
 	bool
-	depends on SMP && !DEBUG_SPINLOCK
+	depends on SMP && !DEBUG_SPINLOCK && !LOCKMETER
 	default y
 
 config MCOUNT
--- diff/arch/sparc64/defconfig	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc64/defconfig	2004-07-01 21:32:34.000000000 +0100
@@ -110,6 +110,7 @@
 #
 # Generic Driver Options
 #
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
 CONFIG_FW_LOADER=m
 # CONFIG_DEBUG_DRIVER is not set
 
@@ -117,6 +118,7 @@
 # Graphics support
 #
 CONFIG_FB=y
+# CONFIG_FB_CIRRUS is not set
 CONFIG_FB_PM2=y
 # CONFIG_FB_PM2_FIFO_DISCONNECT is not set
 # CONFIG_FB_CYBER2000 is not set
@@ -219,7 +221,7 @@
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_CARMEL=m
+CONFIG_BLK_DEV_SX8=m
 # CONFIG_BLK_DEV_RAM is not set
 
 #
@@ -231,6 +233,7 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
+# CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
 CONFIG_BLK_DEV_IDECD=y
@@ -317,6 +320,7 @@
 # SCSI low-level drivers
 #
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
 # CONFIG_SCSI_AIC7XXX is not set
@@ -334,6 +338,7 @@
 CONFIG_SCSI_SATA=y
 CONFIG_SCSI_SATA_SVW=m
 CONFIG_SCSI_ATA_PIIX=m
+CONFIG_SCSI_SATA_NV=m
 CONFIG_SCSI_SATA_PROMISE=m
 CONFIG_SCSI_SATA_SX4=m
 CONFIG_SCSI_SATA_SIL=m
@@ -407,6 +412,9 @@
 CONFIG_MD_MULTIPATH=m
 CONFIG_BLK_DEV_DM=m
 CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
 
 #
 # Fusion MPT device support
@@ -579,6 +587,8 @@
 CONFIG_IP_NF_COMPAT_IPFWADM=m
 CONFIG_IP_NF_TARGET_NOTRACK=m
 CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_MATCH_REALM=m
 
 #
 # IPv6: Netfilter Configuration
@@ -696,9 +706,12 @@
 CONFIG_NET_CLS_ROUTE=y
 CONFIG_NET_CLS_FW=m
 CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_NET_CLS_IND=y
 CONFIG_NET_CLS_RSVP=m
 CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_POLICE=m
 
 #
 # Network testing
@@ -860,6 +873,7 @@
 CONFIG_SUNDANCE_MMIO=y
 CONFIG_VIA_RHINE=m
 # CONFIG_VIA_RHINE_MMIO is not set
+CONFIG_VIA_VELOCITY=m
 
 #
 # Ethernet (1000 Mbit)
@@ -1195,6 +1209,8 @@
 CONFIG_FAT_FS=m
 CONFIG_MSDOS_FS=m
 CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -1255,6 +1271,7 @@
 # CONFIG_SMB_NLS_DEFAULT is not set
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_POSIX=y
 CONFIG_NCP_FS=m
 # CONFIG_NCPFS_PACKET_SIGNING is not set
 # CONFIG_NCPFS_IOCTL_LOCKING is not set
@@ -1281,43 +1298,44 @@
 #
 CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
-# CONFIG_NLS_CODEPAGE_437 is not set
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
 
 #
 # Multimedia devices
@@ -1349,6 +1367,7 @@
 CONFIG_VIDEO_HEXIUM_ORION=m
 CONFIG_VIDEO_HEXIUM_GEMINI=m
 CONFIG_VIDEO_CX88=m
+CONFIG_VIDEO_OVCAMCHIP=m
 
 #
 # Radio Adapters
@@ -1544,6 +1563,7 @@
 CONFIG_USB_PRINTER=m
 CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_RW_DETECT=y
 # CONFIG_USB_STORAGE_DATAFAB is not set
 CONFIG_USB_STORAGE_FREECOM=y
 CONFIG_USB_STORAGE_ISD200=y
@@ -1585,7 +1605,6 @@
 # CONFIG_USB_IBMCAM is not set
 # CONFIG_USB_KONICAWC is not set
 # CONFIG_USB_OV511 is not set
-CONFIG_USB_PWC=m
 # CONFIG_USB_SE401 is not set
 # CONFIG_USB_STV680 is not set
 CONFIG_USB_W9968CF=m
--- diff/arch/sparc64/kernel/entry.S	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc64/kernel/entry.S	2004-07-01 21:32:34.000000000 +0100
@@ -1751,42 +1751,44 @@
 	ldx		[%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc
 	sra		%o0, 0, %o0
 	mov		%ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2
-	cmp		%o0, -ENOIOCTLCMD
 	sllx		%g2, 32, %g2
+
+	/* Check if force_successful_syscall_return()
+	 * was invoked.
+	 */
+	ldx		[%curptr + TI_FLAGS], %l0
+	andcc		%l0, _TIF_SYSCALL_SUCCESS, %g0
+	be,pt		%icc, 1f
+	 andn		%l0, _TIF_SYSCALL_SUCCESS, %l0
+	ba,pt		%xcc, 80f
+	 stx		%l0, [%curptr + TI_FLAGS]
+
+1:
+	cmp		%o0, -ENOIOCTLCMD
 	bgeu,pn		%xcc, 1f
 	 andcc		%l0, _TIF_SYSCALL_TRACE, %l6	
 80:
-	andn		%g3, %g2, %g3		/* System call success, clear Carry condition code. */
+	/* System call success, clear Carry condition code. */
+	andn		%g3, %g2, %g3
 	stx		%g3, [%sp + PTREGS_OFF + PT_V9_TSTATE]	
 	bne,pn		%icc, linux_syscall_trace2
-	 add		%l1, 0x4, %l2				         ! npc = npc+4
+	 add		%l1, 0x4, %l2			! npc = npc+4
 	stx		%l1, [%sp + PTREGS_OFF + PT_V9_TPC]
 	ba,pt		%xcc, rtrap_clr_l6
 	 stx		%l2, [%sp + PTREGS_OFF + PT_V9_TNPC]
 
 1:
-	/* Really a failure?  Check if force_successful_syscall_return()
-	 * was invoked.
-	 */
-	ldx		[%curptr + TI_FLAGS], %l0		! Load
-	andcc		%l0, _TIF_SYSCALL_SUCCESS, %g0
-	be,pt		%icc, 1f
-	 andcc		%l0, _TIF_SYSCALL_TRACE, %l6	
-	andn		%l0, _TIF_SYSCALL_SUCCESS, %l0
-	ba,pt		%xcc, 80b
-	 stx		%l0, [%curptr + TI_FLAGS]
-
 	/* System call failure, set Carry condition code.
 	 * Also, get abs(errno) to return to the process.
 	 */
-1:
+	andcc		%l0, _TIF_SYSCALL_TRACE, %l6	
 	sub		%g0, %o0, %o0
 	or		%g3, %g2, %g3
 	stx		%o0, [%sp + PTREGS_OFF + PT_V9_I0]
 	mov		1, %l6
 	stx		%g3, [%sp + PTREGS_OFF + PT_V9_TSTATE]
 	bne,pn		%icc, linux_syscall_trace2
-	 add		%l1, 0x4, %l2				         !npc = npc+4
+	 add		%l1, 0x4, %l2			! npc = npc+4
 	stx		%l1, [%sp + PTREGS_OFF + PT_V9_TPC]
 
 	b,pt		%xcc, rtrap
--- diff/arch/sparc64/kernel/init_task.c	2004-05-19 22:11:24.000000000 +0100
+++ source/arch/sparc64/kernel/init_task.c	2004-07-01 21:32:34.000000000 +0100
@@ -2,6 +2,7 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/init_task.h>
+#include <linux/mqueue.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
--- diff/arch/sparc64/kernel/irq.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc64/kernel/irq.c	2004-07-01 21:32:34.000000000 +0100
@@ -118,10 +118,6 @@
 		action->flags |= __irq_ino(irq) << 48;
 #define get_ino_in_irqaction(action)	(action->flags >> 48)
 
-#if NR_CPUS > 64
-#error irqaction embedded smp affinity does not work with > 64 cpus, FIXME
-#endif
-
 #define put_smpaff_in_irqaction(action, smpaff)	(action)->mask = (smpaff)
 #define get_smpaff_in_irqaction(action) 	((action)->mask)
 
@@ -458,7 +454,7 @@
 	action->next = NULL;
 	action->dev_id = dev_id;
 	put_ino_in_irqaction(action, irq);
-	put_smpaff_in_irqaction(action, 0);
+	put_smpaff_in_irqaction(action, CPU_MASK_NONE);
 
 	if (tmp)
 		tmp->next = action;
@@ -691,9 +687,10 @@
 	 *    Just Do It.
 	 */
 	struct irqaction *ap = bp->irq_info;
-	cpumask_t cpu_mask = get_smpaff_in_irqaction(ap);
+	cpumask_t cpu_mask;
 	unsigned int buddy, ticks;
 
+	cpu_mask = get_smpaff_in_irqaction(ap);
 	cpus_and(cpu_mask, cpu_mask, cpu_online_map);
 	if (cpus_empty(cpu_mask))
 		cpu_mask = cpu_online_map;
@@ -714,7 +711,7 @@
 		if (++buddy >= NR_CPUS)
 			buddy = 0;
 		if (++ticks > NR_CPUS) {
-			put_smpaff_in_irqaction(ap, 0);
+			put_smpaff_in_irqaction(ap, CPU_MASK_NONE);
 			goto out;
 		}
 	}
@@ -948,7 +945,7 @@
 	action->name = name;
 	action->next = NULL;
 	put_ino_in_irqaction(action, irq);
-	put_smpaff_in_irqaction(action, 0);
+	put_smpaff_in_irqaction(action, CPU_MASK_NONE);
 
 	*(bucket->pil + irq_action) = action;
 	enable_irq(irq);
@@ -1166,53 +1163,15 @@
 
 #ifdef CONFIG_SMP
 
-#define HEX_DIGITS 16
-
-static unsigned int parse_hex_value (const char __user *buffer,
-		unsigned long count, unsigned long *ret)
-{
-	unsigned char hexnum [HEX_DIGITS];
-	unsigned long value;
-	int i;
-
-	if (!count)
-		return -EINVAL;
-	if (count > HEX_DIGITS)
-		count = HEX_DIGITS;
-	if (copy_from_user(hexnum, buffer, count))
-		return -EFAULT;
-
-	/*
-	 * Parse the first 8 characters as a hex string, any non-hex char
-	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
-	 */
-	value = 0;
-
-	for (i = 0; i < count; i++) {
-		unsigned int c = hexnum[i];
-
-		switch (c) {
-			case '0' ... '9': c -= '0'; break;
-			case 'a' ... 'f': c -= 'a'-10; break;
-			case 'A' ... 'F': c -= 'A'-10; break;
-		default:
-			goto out;
-		}
-		value = (value << 4) | c;
-	}
-out:
-	*ret = value;
-	return 0;
-}
-
 static int irq_affinity_read_proc (char *page, char **start, off_t off,
 			int count, int *eof, void *data)
 {
 	struct ino_bucket *bp = ivector_table + (long)data;
 	struct irqaction *ap = bp->irq_info;
-	cpumask_t mask = get_smpaff_in_irqaction(ap);
+	cpumask_t mask;
 	int len;
 
+	mask = get_smpaff_in_irqaction(ap);
 	if (cpus_empty(mask))
 		mask = cpu_online_map;
 
@@ -1223,7 +1182,7 @@
 	return len;
 }
 
-static inline void set_intr_affinity(int irq, unsigned long hw_aff)
+static inline void set_intr_affinity(int irq, cpumask_t hw_aff)
 {
 	struct ino_bucket *bp = ivector_table + irq;
 
@@ -1241,22 +1200,17 @@
 					unsigned long count, void *data)
 {
 	int irq = (long) data, full_count = count, err;
-	unsigned long new_value, i;
+	cpumask_t new_value;
 
-	err = parse_hex_value(buffer, count, &new_value);
+	err = cpumask_parse(buffer, count, new_value);
 
 	/*
 	 * Do not allow disabling IRQs completely - it's a too easy
 	 * way to make the system unusable accidentally :-) At least
 	 * one online CPU still has to be targeted.
 	 */
-	for (i = 0; i < NR_CPUS; i++) {
-		if ((new_value & (1UL << i)) != 0 &&
-		    !cpu_online(i))
-			new_value &= ~(1UL << i);
-	}
-
-	if (!new_value)
+	cpus_and(new_value, new_value, cpu_online_map);
+	if (cpus_empty(new_value))
 		return -EINVAL;
 
 	set_intr_affinity(irq, new_value);
--- diff/arch/sparc64/kernel/setup.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc64/kernel/setup.c	2004-07-01 21:32:34.000000000 +0100
@@ -47,6 +47,7 @@
 #include <asm/mmu_context.h>
 #include <asm/timer.h>
 #include <asm/sections.h>
+#include <asm/setup.h>
 
 #ifdef CONFIG_IP_PNP
 #include <net/ipconfig.h>
@@ -451,8 +452,7 @@
 
 extern int root_mountflags;
 
-char saved_command_line[256];
-char reboot_command[256];
+char reboot_command[COMMAND_LINE_SIZE];
 
 static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 };
 
--- diff/arch/sparc64/kernel/smp.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc64/kernel/smp.c	2004-07-01 21:32:34.000000000 +0100
@@ -406,23 +406,14 @@
 	int i;
 
 	__asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate));
-	for (i = 0; i < NR_CPUS; i++) {
-		if (cpu_isset(i, mask)) {
-			spitfire_xcall_helper(data0, data1, data2, pstate, i);
-			cpu_clear(i, mask);
-			if (cpus_empty(mask))
-				break;
-		}
-	}
+	for_each_cpu_mask(i, mask)
+		spitfire_xcall_helper(data0, data1, data2, pstate, i);
 }
 
 /* Cheetah now allows to send the whole 64-bytes of data in the interrupt
  * packet, but we have no use for that.  However we do take advantage of
  * the new pipelining feature (ie. dispatch to multiple cpus simultaneously).
  */
-#if NR_CPUS > 32
-#error Fixup cheetah_xcall_deliver Dave...
-#endif
 static void cheetah_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t mask)
 {
 	u64 pstate, ver;
@@ -456,25 +447,19 @@
 
 	nack_busy_id = 0;
 	{
-		cpumask_t work_mask = mask;
 		int i;
 
-		for (i = 0; i < NR_CPUS; i++) {
-			if (cpu_isset(i, work_mask)) {
-				u64 target = (i << 14) | 0x70;
-
-				if (!is_jalapeno)
-					target |= (nack_busy_id << 24);
-				__asm__ __volatile__(
-					"stxa	%%g0, [%0] %1\n\t"
-					"membar	#Sync\n\t"
-					: /* no outputs */
-					: "r" (target), "i" (ASI_INTR_W));
-				nack_busy_id++;
- 				cpu_clear(i, work_mask);
-				if (cpus_empty(work_mask))
-					break;
-			}
+		for_each_cpu_mask(i, mask) {
+			u64 target = (i << 14) | 0x70;
+
+			if (!is_jalapeno)
+				target |= (nack_busy_id << 24);
+			__asm__ __volatile__(
+				"stxa	%%g0, [%0] %1\n\t"
+				"membar	#Sync\n\t"
+				: /* no outputs */
+				: "r" (target), "i" (ASI_INTR_W));
+			nack_busy_id++;
 		}
 	}
 
@@ -507,7 +492,6 @@
 			printk("CPU[%d]: mondo stuckage result[%016lx]\n",
 			       smp_processor_id(), dispatch_stat);
 		} else {
-			cpumask_t work_mask = mask;
 			int i, this_busy_nack = 0;
 
 			/* Delay some random time with interrupts enabled
@@ -518,22 +502,17 @@
 			/* Clear out the mask bits for cpus which did not
 			 * NACK us.
 			 */
-			for (i = 0; i < NR_CPUS; i++) {
-				if (cpu_isset(i, work_mask)) {
-					u64 check_mask;
-
-					if (is_jalapeno)
-						check_mask = (0x2UL << (2*i));
-					else
-						check_mask = (0x2UL <<
-							      this_busy_nack);
-					if ((dispatch_stat & check_mask) == 0)
-						cpu_clear(i, mask);
-					this_busy_nack += 2;
-					cpu_clear(i, work_mask);
-					if (cpus_empty(work_mask))
-						break;
-				}
+			for_each_cpu_mask(i, mask) {
+				u64 check_mask;
+
+				if (is_jalapeno)
+					check_mask = (0x2UL << (2*i));
+				else
+					check_mask = (0x2UL <<
+						      this_busy_nack);
+				if ((dispatch_stat & check_mask) == 0)
+					cpu_clear(i, mask);
+				this_busy_nack += 2;
 			}
 
 			goto retry;
@@ -675,13 +654,13 @@
 static __inline__ void __local_flush_dcache_page(struct page *page)
 {
 #if (L1DCACHE_SIZE > PAGE_SIZE)
-	__flush_dcache_page(page->virtual,
+	__flush_dcache_page(page_address(page),
 			    ((tlb_type == spitfire) &&
 			     page_mapping(page) != NULL));
 #else
 	if (page_mapping(page) != NULL &&
 	    tlb_type == spitfire)
-		__flush_icache_page(__pa(page->virtual));
+		__flush_icache_page(__pa(page_address(page)));
 #endif
 }
 
@@ -696,6 +675,7 @@
 	if (cpu == this_cpu) {
 		__local_flush_dcache_page(page);
 	} else if (cpu_online(cpu)) {
+		void *pg_addr = page_address(page);
 		u64 data0;
 
 		if (tlb_type == spitfire) {
@@ -704,14 +684,14 @@
 			if (page_mapping(page) != NULL)
 				data0 |= ((u64)1 << 32);
 			spitfire_xcall_deliver(data0,
-					       __pa(page->virtual),
-					       (u64) page->virtual,
+					       __pa(pg_addr),
+					       (u64) pg_addr,
 					       mask);
 		} else {
 			data0 =
 				((u64)&xcall_flush_dcache_page_cheetah);
 			cheetah_xcall_deliver(data0,
-					      __pa(page->virtual),
+					      __pa(pg_addr),
 					      0, mask);
 		}
 #ifdef CONFIG_DEBUG_DCFLUSH
@@ -724,6 +704,7 @@
 
 void flush_dcache_page_all(struct mm_struct *mm, struct page *page)
 {
+	void *pg_addr = page_address(page);
 	cpumask_t mask = cpu_online_map;
 	u64 data0;
 	int this_cpu = get_cpu();
@@ -740,13 +721,13 @@
 		if (page_mapping(page) != NULL)
 			data0 |= ((u64)1 << 32);
 		spitfire_xcall_deliver(data0,
-				       __pa(page->virtual),
-				       (u64) page->virtual,
+				       __pa(pg_addr),
+				       (u64) pg_addr,
 				       mask);
 	} else {
 		data0 = ((u64)&xcall_flush_dcache_page_cheetah);
 		cheetah_xcall_deliver(data0,
-				      __pa(page->virtual),
+				      __pa(pg_addr),
 				      0, mask);
 	}
 #ifdef CONFIG_DEBUG_DCFLUSH
--- diff/arch/sparc64/kernel/sparc64_ksyms.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/sparc64/kernel/sparc64_ksyms.c	2004-07-01 21:32:34.000000000 +0100
@@ -24,6 +24,7 @@
 #include <linux/socket.h>
 #include <linux/syscalls.h>
 #include <linux/percpu.h>
+#include <linux/init.h>
 #include <net/compat.h>
 
 #include <asm/oplib.h>
@@ -76,7 +77,6 @@
 extern int __strncmp(const char *, const char *, __kernel_size_t);
 extern __kernel_size_t __strlen(const char *);
 extern __kernel_size_t strlen(const char *);
-extern char saved_command_line[];
 extern void linux_sparc_syscall(void);
 extern void rtrap(void);
 extern void show_regs(struct pt_regs *);
@@ -327,7 +327,6 @@
 EXPORT_SYMBOL(sys_getgid);
 EXPORT_SYMBOL(svr4_getcontext);
 EXPORT_SYMBOL(svr4_setcontext);
-EXPORT_SYMBOL(sys_ioctl);
 EXPORT_SYMBOL(compat_sys_ioctl);
 EXPORT_SYMBOL(sparc32_open);
 EXPORT_SYMBOL(sys_close);
@@ -361,6 +360,8 @@
 EXPORT_SYMBOL(phys_base);
 EXPORT_SYMBOL(pfn_base);
 EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
+EXPORT_SYMBOL(page_to_pfn);
+EXPORT_SYMBOL(pfn_to_page);
 
 /* No version information on this, heavily used in inline asm,
  * and will always be 'void __ret_efault(void)'.
--- diff/arch/sparc64/lib/find_bit.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/sparc64/lib/find_bit.c	2004-07-01 21:32:34.000000000 +0100
@@ -6,9 +6,10 @@
  * @offset: The bitnumber to start searching at
  * @size: The maximum size to search
  */
-unsigned long find_next_bit(unsigned long *addr, unsigned long size, unsigned long offset)
+unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
+				unsigned long offset)
 {
-	unsigned long *p = addr + (offset >> 6);
+	const unsigned long *p = addr + (offset >> 6);
 	unsigned long result = offset & ~63UL;
 	unsigned long tmp;
 
--- diff/arch/sparc64/lib/rwlock.S	2004-05-19 22:11:25.000000000 +0100
+++ source/arch/sparc64/lib/rwlock.S	2004-07-01 21:32:34.000000000 +0100
@@ -85,5 +85,20 @@
 __write_trylock_fail:
 	retl
 	 mov		0, %o0
+
+	.globl	__read_trylock
+__read_trylock: /* %o0 = lock_ptr */
+	ldsw		[%o0], %g5
+	brlz,pn		%g5, 100f
+	add		%g5, 1, %g7
+	cas		[%o0], %g5, %g7
+	cmp		%g5, %g7
+	bne,pn		%icc, __read_trylock
+	 membar		#StoreLoad | #StoreStore
+	retl
+	mov		1, %o0
+100:	retl
+	mov		0, %o0
+
 rwlock_impl_end:
 
--- diff/arch/sparc64/mm/init.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/sparc64/mm/init.c	2004-07-01 21:32:34.000000000 +0100
@@ -137,13 +137,13 @@
 #endif
 
 #if (L1DCACHE_SIZE > PAGE_SIZE)
-	__flush_dcache_page(page->virtual,
+	__flush_dcache_page(page_address(page),
 			    ((tlb_type == spitfire) &&
 			     page_mapping(page) != NULL));
 #else
 	if (page_mapping(page) != NULL &&
 	    tlb_type == spitfire)
-		__flush_icache_page(__pa(page->virtual));
+		__flush_icache_page(__pa(page_address(page)));
 #endif
 }
 
@@ -344,11 +344,21 @@
 	}
 }
 
+unsigned long page_to_pfn(struct page *page)
+{
+	return (unsigned long) ((page - mem_map) + pfn_base);
+}
+
+struct page *pfn_to_page(unsigned long pfn)
+{
+	return (mem_map + (pfn - pfn_base));
+}
+
 void show_mem(void)
 {
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",
+	printk("Free swap:       %6ldkB\n",
 	       nr_swap_pages << (PAGE_SHIFT-10));
 	printk("%ld pages of RAM\n", num_physpages);
 	printk("%d free pages\n", nr_free_pages());
--- diff/arch/um/kernel/init_task.c	2004-05-19 22:11:27.000000000 +0100
+++ source/arch/um/kernel/init_task.c	2004-07-01 21:32:34.000000000 +0100
@@ -9,6 +9,7 @@
 #include "linux/sched.h"
 #include "linux/init_task.h"
 #include "linux/version.h"
+#include "linux/mqueue.h"
 #include "asm/uaccess.h"
 #include "asm/pgtable.h"
 #include "user_util.h"
--- diff/arch/um/kernel/irq.c	2004-05-19 22:11:27.000000000 +0100
+++ source/arch/um/kernel/irq.c	2004-07-01 21:32:34.000000000 +0100
@@ -419,7 +419,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/um/kernel/mem.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/um/kernel/mem.c	2004-07-01 21:32:34.000000000 +0100
@@ -380,7 +380,7 @@
 
         printk("Mem-info:\n");
         show_free_areas();
-        printk("Free swap:       %6dkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
+        printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
         pfn = max_mapnr;
         while(pfn-- > 0) {
 		page = pfn_to_page(pfn);
--- diff/arch/um/kernel/sysrq.c	2004-05-19 22:11:27.000000000 +0100
+++ source/arch/um/kernel/sysrq.c	2004-07-01 21:32:34.000000000 +0100
@@ -23,7 +23,7 @@
         i = 1;
         while (((long) stack & (THREAD_SIZE-1)) != 0) {
                 addr = *stack++;
-		if (kernel_text_address(addr)) {
+		if (__kernel_text_address(addr)) {
 			if (i && ((i % 6) == 0))
 				printk("\n   ");
 			printk("[<%08lx>] ", addr);
--- diff/arch/um/kernel/user_util.c	2004-05-19 22:11:27.000000000 +0100
+++ source/arch/um/kernel/user_util.c	2004-07-01 21:32:34.000000000 +0100
@@ -34,7 +34,6 @@
 #define COMMAND_LINE_SIZE _POSIX_ARG_MAX
 
 /* Changed in linux_main and setup_arch, which run before SMP is started */
-char saved_command_line[COMMAND_LINE_SIZE] = { 0 };
 char command_line[COMMAND_LINE_SIZE] = { 0 };
 
 void add_arg(char *cmd_line, char *arg)
--- diff/arch/v850/kernel/as85ep1.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/v850/kernel/as85ep1.c	2004-07-01 21:32:34.000000000 +0100
@@ -57,10 +57,10 @@
 	AS85EP1_ASC    = 0;
 	AS85EP1_LBS    = 0x00A9;
 
-	AS85EP1_PORT_PMC(6)  = 0xFF; /* A20-25, A0,A1 $BM-8z(B */
-	AS85EP1_PORT_PMC(7)  = 0x0E; /* CS1,2,3       $BM-8z(B */
-	AS85EP1_PORT_PMC(9)  = 0xFF; /* D16-23        $BM-8z(B */
-	AS85EP1_PORT_PMC(10) = 0xFF; /* D24-31        $BM-8z(B */
+	AS85EP1_PORT_PMC(6)  = 0xFF; /* valid A0,A1,A20-A25 */
+	AS85EP1_PORT_PMC(7)  = 0x0E; /* valid CS1-CS3       */
+	AS85EP1_PORT_PMC(9)  = 0xFF; /* valid D16-D23       */
+	AS85EP1_PORT_PMC(10) = 0xFF; /* valid D24-D31       */
 
 	AS85EP1_RFS(1) = 0x800c;
 	AS85EP1_RFS(3) = 0x800c;
@@ -76,7 +76,7 @@
 	   write to address (N - 0x10).  We avoid this (effectively) by
 	   writing in 16-byte chunks backwards from the end.  */
 
-	AS85EP1_IRAMM = 0x3;	/* $BFbB"L?Na(BRAM$B$O!V(Bwrite-mode$B!W$K$J$j$^$9(B */
+	AS85EP1_IRAMM = 0x3;	/* "write-mode" for the internal instruction memory */
 
 	src = (u32 *)(((u32)&_intv_copy_src_end - 1) & ~0xF);
 	dst = (u32 *)&_intv_copy_dst_start
@@ -88,7 +88,7 @@
 		src -= 4;
 	} while (src > (u32 *)&_intv_copy_src_start);
 
-	AS85EP1_IRAMM = 0x0;	/* $BFbB"L?Na(BRAM$B$O!V(Bread-mode$B!W$K$J$j$^$9(B */
+	AS85EP1_IRAMM = 0x0;	/* "read-mode" for the internal instruction memory */
 #endif /* !CONFIG_ROM_KERNEL */
 
 	v850e_intc_disable_irqs ();
--- diff/arch/v850/kernel/as85ep1.ld	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/v850/kernel/as85ep1.ld	2004-07-01 21:32:34.000000000 +0100
@@ -2,7 +2,7 @@
    (CONFIG_V850E_AS85EP1).  */
 
 MEMORY {
-	/* 1MB of internal memory (ĆâÂ˘ĚżÎáRAM).  */
+	/* 1MB of internal instruction memory. */
 	iMEM0 : ORIGIN = 0,	     LENGTH = 0x00100000
 
 	/* 1MB of static RAM.  */
--- diff/arch/v850/kernel/fpga85e2c.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/v850/kernel/fpga85e2c.c	2004-07-01 21:32:34.000000000 +0100
@@ -168,5 +168,5 @@
 
 static int reg_snap_dev_id;
 static struct irqaction reg_snap_action = {
-	make_reg_snap, 0, 0, "reg_snap", &reg_snap_dev_id, 0
+	make_reg_snap, 0, CPU_MASK_NONE, "reg_snap", &reg_snap_dev_id, 0
 };
--- diff/arch/v850/kernel/init_task.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/v850/kernel/init_task.c	2004-07-01 21:32:34.000000000 +0100
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/init_task.h>
 #include <linux/fs.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/v850/kernel/irq.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/v850/kernel/irq.c	2004-07-01 21:32:34.000000000 +0100
@@ -392,7 +392,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/v850/kernel/setup.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/v850/kernel/setup.c	2004-07-01 21:32:34.000000000 +0100
@@ -20,8 +20,10 @@
 #include <linux/major.h>
 #include <linux/root_dev.h>
 #include <linux/mtd/mtd.h>
+#include <linux/init.h>
 
 #include <asm/irq.h>
+#include <asm/setup.h>
 
 #include "mach.h"
 
@@ -40,8 +42,7 @@
 extern char _root_fs_image_end __attribute__ ((__weak__));
 
 
-char command_line[512];
-char saved_command_line[512];
+char command_line[COMMAND_LINE_SIZE];
 
 /* Memory not used by the kernel.  */
 static unsigned long total_ram_pages;
@@ -63,8 +64,8 @@
 {
 	/* Keep a copy of command line */
 	*cmdline = command_line;
-	memcpy (saved_command_line, command_line, sizeof saved_command_line);
-	saved_command_line[sizeof saved_command_line - 1] = '\0';
+	memcpy (saved_command_line, command_line, COMMAND_LINE_SIZE);
+	saved_command_line[COMMAND_LINE_SIZE - 1] = '\0';
 
 	console_verbose ();
 
--- diff/arch/v850/kernel/time.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/v850/kernel/time.c	2004-07-01 21:32:34.000000000 +0100
@@ -203,7 +203,7 @@
 static struct irqaction timer_irqaction = {
 	timer_interrupt,
 	SA_INTERRUPT,
-	0,
+	CPU_MASK_NONE,
 	"timer",
 	&timer_dev_id,
 	NULL
--- diff/arch/v850/kernel/vmlinux.lds.S	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/v850/kernel/vmlinux.lds.S	2004-07-01 21:32:34.000000000 +0100
@@ -1,8 +1,8 @@
 /*
  * arch/v850/vmlinux.lds.S -- kernel linker script for v850 platforms
  *
- *  Copyright (C) 2002,03  NEC Electronics Corporation
- *  Copyright (C) 2002,03  Miles Bader <miles@gnu.org>
+ *  Copyright (C) 2002,03,04  NEC Electronics Corporation
+ *  Copyright (C) 2002,03,04  Miles Bader <miles@gnu.org>
  *
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file COPYING in the main directory of this
@@ -65,7 +65,7 @@
 #define TEXT_CONTENTS							      \
 		__stext = . ;						      \
         	*(.text)						      \
-		SCHED_TEXT
+		SCHED_TEXT						      \
 			*(.exit.text)	/* 2.5 convention */		      \
 			*(.text.exit)	/* 2.4 convention */		      \
 			*(.text.lock)					      \
--- diff/arch/x86_64/Kconfig	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/Kconfig	2004-07-01 21:32:34.000000000 +0100
@@ -318,6 +318,8 @@
 	bool
 	default y
 
+source "drivers/perfctr/Kconfig"
+
 endmenu
 
 
@@ -455,6 +457,7 @@
 config DEBUG_INFO
 	bool "Compile the kernel with debug info"
 	depends on DEBUG_KERNEL
+	default n
 	help
           If you say Y here the resulting kernel image will include
 	  debugging info resulting in a larger kernel image.
@@ -493,9 +496,8 @@
        help
          Add a simple leak tracer to the IOMMU code. This is useful when you
 	 are debugging a buggy device driver that leaks IOMMU mappings.
-       
-#config X86_REMOTE_DEBUG
-#       bool "kgdb debugging stub"
+
+source "arch/x86_64/Kconfig.kgdb"
 
 endmenu
 
--- diff/arch/x86_64/Makefile	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/x86_64/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -37,6 +37,8 @@
 OBJCOPYFLAGS	:= -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux := -e stext
 
+CHECK           := $(CHECK) -D__x86_64__=1
+
 cflags-$(CONFIG_MK8) += $(call check_gcc,-march=k8,)
 cflags-$(CONFIG_MPSC) += $(call check_gcc,-march=nocona,)
 CFLAGS += $(cflags-y)
--- diff/arch/x86_64/ia32/ia32entry.S	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/ia32/ia32entry.S	2004-07-01 21:32:34.000000000 +0100
@@ -589,6 +589,12 @@
 	.quad compat_sys_mq_notify
 	.quad compat_sys_mq_getsetattr
 	.quad quiet_ni_syscall		/* reserved for kexec */
+	.quad sys_perfctr_info
+	.quad sys_vperfctr_open
+	.quad sys_vperfctr_control
+	.quad sys_vperfctr_unlink
+	.quad sys_vperfctr_iresume
+	.quad sys_vperfctr_read
 	/* don't forget to change IA32_NR_syscalls */
 ia32_syscall_end:		
 	.rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8
--- diff/arch/x86_64/kernel/Makefile	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -28,6 +28,7 @@
 obj-$(CONFIG_SCHED_SMT)		+= domain.o
 
 obj-$(CONFIG_MODULES)		+= module.o
+obj-$(CONFIG_KGDB)		+= kgdb_stub.o
 
 obj-y				+= topology.o
 
--- diff/arch/x86_64/kernel/e820.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/x86_64/kernel/e820.c	2004-07-01 21:32:34.000000000 +0100
@@ -34,7 +34,7 @@
  */
 unsigned long end_user_pfn = MAXMEM>>PAGE_SHIFT;  
 
-extern struct resource code_resource, data_resource, vram_resource;
+extern struct resource code_resource, data_resource;
 
 /* Check for some hardcoded bad areas that early boot is not allowed to touch */ 
 static inline int bad_addr(unsigned long *addrp, unsigned long size)
--- diff/arch/x86_64/kernel/entry.S	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/x86_64/kernel/entry.S	2004-07-01 21:32:34.000000000 +0100
@@ -557,6 +557,11 @@
 	apicinterrupt SPURIOUS_APIC_VECTOR,smp_spurious_interrupt
 #endif
 				
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PERFCTR)
+ENTRY(perfctr_interrupt)
+	apicinterrupt LOCAL_PERFCTR_VECTOR,smp_perfctr_interrupt
+#endif
+
 /*
  * Exception entry points.
  */ 		
--- diff/arch/x86_64/kernel/head64.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/head64.c	2004-07-01 21:32:34.000000000 +0100
@@ -16,6 +16,7 @@
 #include <asm/proto.h>
 #include <asm/smp.h>
 #include <asm/bootsetup.h>
+#include <asm/setup.h>
 
 /* Don't add a printk in there. printk relies on the PDA which is not initialized 
    yet. */
--- diff/arch/x86_64/kernel/i8259.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/x86_64/kernel/i8259.c	2004-07-01 21:32:34.000000000 +0100
@@ -24,6 +24,7 @@
 #include <asm/delay.h>
 #include <asm/desc.h>
 #include <asm/apic.h>
+#include <asm/perfctr.h>
 
 #include <linux/irq.h>
 
@@ -47,6 +48,12 @@
 	BI(x,8) BI(x,9) BI(x,a) BI(x,b) \
 	BI(x,c) BI(x,d) BI(x,e) BI(x,f)
 
+#define BUILD_14_IRQS(x) \
+	BI(x,0) BI(x,1) BI(x,2) BI(x,3) \
+	BI(x,4) BI(x,5) BI(x,6) BI(x,7) \
+	BI(x,8) BI(x,9) BI(x,a) BI(x,b) \
+	BI(x,c) BI(x,d)
+
 /*
  * ISA PIC or low IO-APIC triggered (INTA-cycle or APIC) interrupts:
  * (these are usually mapped to vectors 0x20-0x2f)
@@ -68,9 +75,15 @@
 BUILD_16_IRQS(0x4) BUILD_16_IRQS(0x5) BUILD_16_IRQS(0x6) BUILD_16_IRQS(0x7)
 BUILD_16_IRQS(0x8) BUILD_16_IRQS(0x9) BUILD_16_IRQS(0xa) BUILD_16_IRQS(0xb)
 BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd)
+
+#ifdef CONFIG_PCI_USE_VECTOR
+	BUILD_14_IRQS(0xe)
+#endif
+
 #endif
 
 #undef BUILD_16_IRQS
+#undef BUILD_14_IRQS
 #undef BI
 
 
@@ -83,6 +96,12 @@
 	IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
 	IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f)
 
+#define IRQLIST_14(x) \
+	IRQ(x,0), IRQ(x,1), IRQ(x,2), IRQ(x,3), \
+	IRQ(x,4), IRQ(x,5), IRQ(x,6), IRQ(x,7), \
+	IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
+	IRQ(x,c), IRQ(x,d)
+
 void (*interrupt[NR_IRQS])(void) = {
 	IRQLIST_16(0x0),
 
@@ -91,11 +110,17 @@
 	IRQLIST_16(0x4), IRQLIST_16(0x5), IRQLIST_16(0x6), IRQLIST_16(0x7),
 	IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
 	IRQLIST_16(0xc), IRQLIST_16(0xd)
+
+#ifdef CONFIG_PCI_USE_VECTOR
+	, IRQLIST_14(0xe)
+#endif
+
 #endif
 };
 
 #undef IRQ
 #undef IRQLIST_16
+#undef IRQLIST_14
 
 /*
  * This is the 'legacy' 8259A Programmable Interrupt Controller,
@@ -365,7 +390,7 @@
  * IRQ2 is cascade interrupt to second interrupt controller
  */
 
-static struct irqaction irq2 = { no_action, 0, 0, "cascade", NULL, NULL};
+static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
 
 void __init init_ISA_irqs (void)
 {
@@ -485,6 +510,8 @@
 	set_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
 #endif
 
+	perfctr_vector_init();
+
 	/*
 	 * Set the clock to HZ Hz, we already have a valid
 	 * vector now:
--- diff/arch/x86_64/kernel/init_task.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/x86_64/kernel/init_task.c	2004-07-01 21:32:34.000000000 +0100
@@ -4,6 +4,7 @@
 #include <linux/init.h>
 #include <linux/init_task.h>
 #include <linux/fs.h>
+#include <linux/mqueue.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
--- diff/arch/x86_64/kernel/io_apic.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/io_apic.c	2004-07-01 21:32:34.000000000 +0100
@@ -67,8 +67,8 @@
 	short apic, pin, next;
 } irq_2_pin[PIN_MAP_SIZE];
 
+int vector_irq[NR_VECTORS] = { [0 ... NR_VECTORS - 1] = -1};
 #ifdef CONFIG_PCI_USE_VECTOR
-int vector_irq[NR_IRQS] = { [0 ... NR_IRQS -1] = -1};
 #define vector_to_irq(vector) 	\
 	(platform_legacy_irq(vector) ? vector : vector_irq[vector])
 #else
@@ -656,10 +656,14 @@
 /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
 u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
 
-#ifndef CONFIG_PCI_USE_VECTOR
+#ifdef CONFIG_PCI_USE_VECTOR
+int assign_irq_vector(int irq)
+#else
 int __init assign_irq_vector(int irq)
+#endif
 {
 	static int current_vector = FIRST_DEVICE_VECTOR, offset = 0;
+
 	BUG_ON(irq >= NR_IRQ_VECTORS);
 	if (IO_APIC_VECTOR(irq) > 0)
 		return IO_APIC_VECTOR(irq);
@@ -668,18 +672,19 @@
 	if (current_vector == IA32_SYSCALL_VECTOR)
 		goto next;
 
-	if (current_vector > FIRST_SYSTEM_VECTOR) {
+	if (current_vector >= FIRST_SYSTEM_VECTOR) {
 		offset++;
+		if (!(offset%8))
+			return -ENOSPC;
 		current_vector = FIRST_DEVICE_VECTOR + offset;
 	}
 
-	if (current_vector == FIRST_SYSTEM_VECTOR)
-		panic("ran out of interrupt sources!");
+	vector_irq[current_vector] = irq;
+	if (irq != AUTO_ASSIGN)
+		IO_APIC_VECTOR(irq) = current_vector;
 
-	IO_APIC_VECTOR(irq) = current_vector;
 	return current_vector;
 }
-#endif
 
 extern void (*interrupt[NR_IRQS])(void);
 static struct hw_interrupt_type ioapic_level_type;
@@ -925,12 +930,17 @@
 		);
 	}
 	}
+	if (use_pci_vector())
+		printk(KERN_INFO "Using vector-based indexing\n");
 	printk(KERN_DEBUG "IRQ to pin mappings:\n");
 	for (i = 0; i < NR_IRQS; i++) {
 		struct irq_pin_list *entry = irq_2_pin + i;
 		if (entry->pin < 0)
 			continue;
-		printk(KERN_DEBUG "IRQ%d ", i);
+ 		if (use_pci_vector() && !platform_legacy_irq(i))
+			printk(KERN_DEBUG "IRQ%d ", IO_APIC_VECTOR(i));
+		else
+			printk(KERN_DEBUG "IRQ%d ", i);
 		for (;;) {
 			printk("-> %d:%d", entry->apic, entry->pin);
 			if (!entry->next)
@@ -1384,7 +1394,7 @@
 	unsigned long flags;
 	unsigned int dest;
 
-	dest = cpu_mask_to_apicid(mk_cpumask_const(mask));
+	dest = cpu_mask_to_apicid(mask);
 
 	/*
 	 * Only the first 8 bits are valid.
--- diff/arch/x86_64/kernel/irq.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/irq.c	2004-07-01 21:32:34.000000000 +0100
@@ -405,6 +405,9 @@
 	spin_unlock(&desc->lock);
 
 	irq_exit();
+
+	kgdb_process_breakpoint();
+
 	return 1;
 }
 
@@ -488,7 +491,7 @@
 
 	action->handler = handler;
 	action->flags = irqflags;
-	action->mask = 0;
+	cpus_clear(action->mask);
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
--- diff/arch/x86_64/kernel/module.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/x86_64/kernel/module.c	2004-07-01 21:32:34.000000000 +0100
@@ -121,7 +121,7 @@
 			goto fail;
 	}
 	
-	if (map_vm_area(area, PAGE_KERNEL_EXECUTABLE, &pages))
+	if (map_vm_area(area, PAGE_KERNEL_EXEC, &pages))
 		goto fail;
 	
 	memset(addr, 0, size);
--- diff/arch/x86_64/kernel/mpparse.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/mpparse.c	2004-07-01 21:32:34.000000000 +0100
@@ -716,7 +716,7 @@
 } mp_ioapic_routing[MAX_IO_APICS];
 
 
-static int __init mp_find_ioapic (
+static int mp_find_ioapic (
 	int			gsi)
 {
 	int			i = 0;
@@ -859,15 +859,22 @@
 	for (i = 0; i < 16; i++) {
 		int idx;
 
-		for (idx = 0; idx < mp_irq_entries; idx++)
-			if (mp_irqs[idx].mpc_srcbus == MP_ISA_BUS &&
-				(mp_irqs[idx].mpc_srcbusirq == i ||
-				mp_irqs[idx].mpc_dstirq == i))
-					break;
+		for (idx = 0; idx < mp_irq_entries; idx++) {
+			struct mpc_config_intsrc *irq = mp_irqs + idx;
+
+			/* Do we already have a mapping for this ISA IRQ? */
+			if (irq->mpc_srcbus == MP_ISA_BUS && irq->mpc_srcbusirq == i)
+				break;
+
+			/* Do we already have a mapping for this IOAPIC pin */
+			if ((irq->mpc_dstapic == intsrc.mpc_dstapic) &&
+				(irq->mpc_dstirq == i))
+				break;
+		}
 
 		if (idx != mp_irq_entries) {
 			printk(KERN_DEBUG "ACPI: IRQ%d used by override.\n", i);
-			continue;			 /* IRQ already used */
+			continue;			/* IRQ already used */
 		}
 
 		intsrc.mpc_irqtype = mp_INT;
@@ -888,91 +895,54 @@
 	return;
 }
 
-
-extern FADT_DESCRIPTOR acpi_fadt;
-
-#ifdef CONFIG_ACPI_PCI
-
-void __init mp_parse_prt (void)
+void mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
 {
-	struct list_head	*node = NULL;
-	struct acpi_prt_entry	*entry = NULL;
 	int			ioapic = -1;
 	int			ioapic_pin = 0;
-	int			gsi = 0;
 	int			idx, bit = 0;
-	int			edge_level = 0;
-	int			active_high_low = 0;
 
-	/*
-	 * Parsing through the PCI Interrupt Routing Table (PRT) and program
-	 * routing for all static (IOAPIC-direct) entries.
-	 */
-	list_for_each(node, &acpi_prt.entries) {
-		entry = list_entry(node, struct acpi_prt_entry, node);
+	if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC)
+		return;
 
-		/* Need to get gsi for dynamic entry */
-		if (entry->link.handle) {
-			gsi = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low);
-			if (!gsi)
-				continue;
-		} else {
-			/* Hardwired GSI. Assume PCI standard settings */
-			gsi = entry->link.index;
-			edge_level = 1;
-			active_high_low = 1;
-		}
+#ifdef CONFIG_ACPI_BUS
+	/* Don't set up the ACPI SCI because it's already set up */
+	if (acpi_fadt.sci_int == gsi)
+		return;
+#endif
 
-		/* Don't set up the ACPI SCI because it's already set up */
-		if (acpi_fadt.sci_int == gsi) {
-			/* we still need to set up the entry's irq */
-			acpi_gsi_to_irq(gsi, &entry->irq);
-			continue;
-		}
+	ioapic = mp_find_ioapic(gsi);
+	if (ioapic < 0) {
+		printk(KERN_WARNING "No IOAPIC for GSI %u\n", gsi);
+		return;
+	}
 
-		ioapic = mp_find_ioapic(gsi);
-		if (ioapic < 0)
-			continue;
-		ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_start;
-
-		/* 
-		 * Avoid pin reprogramming.  PRTs typically include entries  
-		 * with redundant pin->gsi mappings (but unique PCI devices);
-		 * we only only program the IOAPIC on the first.
-		 */
-		bit = ioapic_pin % 32;
-		idx = (ioapic_pin < 32) ? 0 : (ioapic_pin / 32);
-		if (idx > 3) {
-			printk(KERN_ERR "Invalid reference to IOAPIC pin "
-				"%d-%d\n", mp_ioapic_routing[ioapic].apic_id, 
-				ioapic_pin);
-			continue;
-		}
-		if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
-			Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
-				mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
-			acpi_gsi_to_irq(gsi, &entry->irq);
-			continue;
-		}
+	ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_start;
 
-		mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
-		if (!io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, edge_level, active_high_low)) {
-			acpi_gsi_to_irq(gsi, &entry->irq);
- 		}
-		printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d -> IRQ %d\n",
-			entry->id.segment, entry->id.bus,
-			entry->id.device, ('A' + entry->pin), 
-			mp_ioapic_routing[ioapic].apic_id, ioapic_pin,
-			entry->irq);
+	/* 
+	 * Avoid pin reprogramming.  PRTs typically include entries  
+	 * with redundant pin->gsi mappings (but unique PCI devices);
+	 * we only program the IOAPIC on the first.
+	 */
+	bit = ioapic_pin % 32;
+	idx = (ioapic_pin < 32) ? 0 : (ioapic_pin / 32);
+	if (idx > 3) {
+		printk(KERN_ERR "Invalid reference to IOAPIC pin "
+			"%d-%d\n", mp_ioapic_routing[ioapic].apic_id, 
+			ioapic_pin);
+		return;
+	}
+	if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
+		Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
+			mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
+		return;
 	}
-	
-	print_IO_APIC();
 
-	return;
-}
+	mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
 
-#endif /*CONFIG_ACPI_PCI*/
+	io_apic_set_pci_routing(ioapic, ioapic_pin, gsi,
+		edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1,
+		active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1);
+}
 
 #endif /*CONFIG_X86_IO_APIC*/
-
 #endif /*CONFIG_ACPI_BOOT*/
--- diff/arch/x86_64/kernel/pci-gart.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/pci-gart.c	2004-07-01 21:32:34.000000000 +0100
@@ -148,7 +148,7 @@
 { 
 	unsigned long flags;
 	int bus = dev ? dev->bus->number : -1;
-	cpumask_const_t bus_cpumask = pcibus_to_cpumask(bus);
+	cpumask_t bus_cpumask = pcibus_to_cpumask(bus);
 	int flushed = 0;
 	int i;
 
@@ -158,7 +158,7 @@
 			u32 w;
 			if (!northbridges[i]) 
 				continue;
-			if (bus >= 0 && !(cpu_isset_const(i, bus_cpumask)))
+			if (bus >= 0 && !(cpu_isset(i, bus_cpumask)))
 				continue;
 			pci_write_config_dword(northbridges[i], 0x9c, 
 					       northbridge_flush_word[i] | 1); 
--- diff/arch/x86_64/kernel/process.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/process.c	2004-07-01 21:32:34.000000000 +0100
@@ -32,6 +32,7 @@
 #include <linux/delay.h>
 #include <linux/irq.h>
 #include <linux/ptrace.h>
+#include <linux/perfctr.h>
 #include <linux/version.h>
 
 #include <asm/uaccess.h>
@@ -262,6 +263,7 @@
 		tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
 		put_cpu();
 	}
+	perfctr_exit_thread(&me->thread);
 }
 
 void flush_thread(void)
@@ -365,6 +367,8 @@
 	asm("movl %%es,%0" : "=m" (p->thread.es));
 	asm("movl %%ds,%0" : "=m" (p->thread.ds));
 
+	perfctr_copy_thread(&p->thread);
+
 	if (unlikely(me->thread.io_bitmap_ptr != NULL)) { 
 		p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
 		if (!p->thread.io_bitmap_ptr) 
@@ -411,6 +415,8 @@
 	int cpu = smp_processor_id();  
 	struct tss_struct *tss = init_tss + cpu;
 
+	perfctr_suspend_thread(prev);
+
 	unlazy_fpu(prev_p);
 
 	/*
@@ -514,6 +520,8 @@
 		}
 	}
 
+	perfctr_resume_thread(next);
+
 	return prev_p;
 }
 
--- diff/arch/x86_64/kernel/setup.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/setup.c	2004-07-01 21:32:34.000000000 +0100
@@ -55,6 +55,7 @@
 #include <asm/bootsetup.h>
 #include <asm/smp.h>
 #include <asm/proto.h>
+#include <asm/setup.h>
 
 /*
  * Machine setup..
@@ -100,7 +101,6 @@
 extern char _text, _etext, _edata, _end;
 
 char command_line[COMMAND_LINE_SIZE];
-char saved_command_line[COMMAND_LINE_SIZE];
 
 struct resource standard_io_resources[] = {
 	{ "dma1", 0x00, 0x1f, IORESOURCE_BUSY | IORESOURCE_IO },
@@ -116,9 +116,10 @@
 #define STANDARD_IO_RESOURCES \
 	(sizeof standard_io_resources / sizeof standard_io_resources[0])
 
-struct resource code_resource = { "Kernel code", 0x100000, 0, IORESOURCE_MEM };
-struct resource data_resource = { "Kernel data", 0, 0, IORESOURCE_MEM };
-struct resource vram_resource = { "Video RAM area", 0xa0000, 0xbffff, IORESOURCE_BUSY | IORESOURCE_MEM };
+#define IORESOURCE_RAM (IORESOURCE_BUSY | IORESOURCE_MEM)
+
+struct resource data_resource = { "Kernel data", 0, 0, IORESOURCE_RAM };
+struct resource code_resource = { "Kernel code", 0, 0, IORESOURCE_RAM };
 
 #define IORESOURCE_ROM (IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM)
 
@@ -138,10 +139,11 @@
 	(sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
 
 static struct resource video_rom_resource = { "Video ROM", 0xc0000, 0xc7fff, IORESOURCE_ROM };
+static struct resource video_ram_resource = { "Video RAM area", 0xa0000, 0xbffff, IORESOURCE_RAM };
 
 #define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
 
-static int __init checksum(unsigned char *rom, unsigned long length)
+static int __init romchecksum(unsigned char *rom, unsigned long length)
 {
 	unsigned char *p, sum = 0;
 
@@ -169,7 +171,7 @@
 		length = rom[2] * 512;
 
 		/* if checksum okay, trust length byte */
-		if (length && checksum(rom, length))
+		if (length && romchecksum(rom, length))
 			video_rom_resource.end = start + length - 1;
 
 		request_resource(&iomem_resource, &video_rom_resource);
@@ -188,7 +190,7 @@
 	rom = isa_bus_to_virt(extension_rom_resource.start);
 	if (romsignature(rom)) {
 		length = extension_rom_resource.end - extension_rom_resource.start + 1;
-		if (checksum(rom, length)) {
+		if (romchecksum(rom, length)) {
 			request_resource(&iomem_resource, &extension_rom_resource);
 			upper = extension_rom_resource.start;
 		}
@@ -204,7 +206,7 @@
 		length = rom[2] * 512;
 
 		/* but accept any length that fits if checksum okay */
-		if (!length || start + length > upper || !checksum(rom, length))
+		if (!length || start + length > upper || !romchecksum(rom, length))
 			continue;
 
 		adapter_rom_resources[i].start = start;
@@ -399,27 +401,26 @@
 __setup("noreplacement", noreplacement_setup); 
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
-unsigned char eddnr;
-struct edd_info edd[EDDMAXNR];
-unsigned int edd_disk80_sig;
+struct edd edd;
 #ifdef CONFIG_EDD_MODULE
-EXPORT_SYMBOL(eddnr);
 EXPORT_SYMBOL(edd);
-EXPORT_SYMBOL(edd_disk80_sig);
 #endif
 /**
  * copy_edd() - Copy the BIOS EDD information
- *              from empty_zero_page into a safe place.
+ *              from boot_params into a safe place.
  *
  */
 static inline void copy_edd(void)
 {
-     eddnr = EDD_NR;
-     memcpy(edd, EDD_BUF, sizeof(edd));
-     edd_disk80_sig = DISK80_SIGNATURE;
+     memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature));
+     memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info));
+     edd.mbr_signature_nr = EDD_MBR_SIG_NR;
+     edd.edd_info_nr = EDD_NR;
 }
 #else
-#define copy_edd() do {} while (0)
+static inline void copy_edd(void)
+{
+}
 #endif
 
 void __init setup_arch(char **cmdline_p)
@@ -555,13 +556,13 @@
 	probe_roms();
 	e820_reserve_resources(); 
 
-	request_resource(&iomem_resource, &vram_resource);
+	request_resource(&iomem_resource, &video_ram_resource);
 
 	{
 	unsigned i;
 	/* request I/O space for devices used on all i[345]86 PCs */
 	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
-		request_resource(&ioport_resource, standard_io_resources+i);
+		request_resource(&ioport_resource, &standard_io_resources[i]);
 	}
 
 	/* Will likely break when you have unassigned resources with more
--- diff/arch/x86_64/kernel/smp.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/smp.c	2004-07-01 21:32:34.000000000 +0100
@@ -94,7 +94,7 @@
 
 static inline void send_IPI_mask(cpumask_t cpumask, int vector)
 {
-	unsigned long mask = cpus_coerce(cpumask);
+	unsigned long mask = cpus_addr(cpumask)[0];
 	unsigned long cfg;
 	unsigned long flags;
 
@@ -362,6 +362,18 @@
 	send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR);
 }
 
+#ifdef CONFIG_KGDB
+/*
+ * By using the NMI code instead of a vector we just sneak thru the
+ * word generator coming out with just what we want.  AND it does
+ * not matter if clustered_apic_mode is set or not.
+ */
+void smp_send_nmi_allbutself(void)
+{
+	send_IPI_allbutself(APIC_DM_NMI);
+}
+#endif
+
 /*
  * Structure and data for smp_call_function(). This is designed to minimise
  * static memory requirements. It also looks cleaner.
--- diff/arch/x86_64/kernel/smpboot.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/smpboot.c	2004-07-01 21:32:34.000000000 +0100
@@ -576,15 +576,12 @@
 	idle = fork_by_hand();
 	if (IS_ERR(idle))
 		panic("failed fork for CPU %d", cpu);
-	wake_up_forked_process(idle);	
 	x86_cpu_to_apicid[cpu] = apicid;
 
-	/*
-	 * We remove it from the pidhash and the runqueue
-	 * once we got the process:
-	 */
+	/* Make this the idle thread */
 	init_idle(idle,cpu);
 
+	/* Remove it from the pidhash */
 	unhash_process(idle);
 
 	cpu_pda[cpu].pcurrent = idle;
@@ -827,7 +824,7 @@
 		if (apicid == boot_cpu_id || (apicid == BAD_APICID))
 			continue;
 
-		if (!cpu_isset(apicid, phys_cpu_present_map))
+		if (!physid_isset(apicid, phys_cpu_present_map))
 			continue;
 		if ((max_cpus >= 0) && (max_cpus <= cpucount+1))
 			continue;
--- diff/arch/x86_64/kernel/suspend.c	2004-05-19 22:11:28.000000000 +0100
+++ source/arch/x86_64/kernel/suspend.c	2004-07-01 21:32:34.000000000 +0100
@@ -35,40 +35,45 @@
 unsigned long saved_context_r12, saved_context_r13, saved_context_r14, saved_context_r15;
 unsigned long saved_context_eflags;
 
-void save_processor_state (void)
+void __save_processor_state(struct saved_context *ctxt)
 {
 	kernel_fpu_begin();
 
 	/*
 	 * descriptor tables
 	 */
-	asm volatile ("sgdt %0" : "=m" (saved_context.gdt_limit));
-	asm volatile ("sidt %0" : "=m" (saved_context.idt_limit));
-	asm volatile ("sldt %0" : "=m" (saved_context.ldt));
-	asm volatile ("str %0"  : "=m" (saved_context.tr));
+	asm volatile ("sgdt %0" : "=m" (ctxt->gdt_limit));
+	asm volatile ("sidt %0" : "=m" (ctxt->idt_limit));
+	asm volatile ("sldt %0" : "=m" (ctxt->ldt));
+	asm volatile ("str %0"  : "=m" (ctxt->tr));
 
 	/* XMM0..XMM15 should be handled by kernel_fpu_begin(). */
 	/* EFER should be constant for kernel version, no need to handle it. */
 	/*
 	 * segment registers
 	 */
-	asm volatile ("movw %%ds, %0" : "=m" (saved_context.ds));
-	asm volatile ("movw %%es, %0" : "=m" (saved_context.es));
-	asm volatile ("movw %%fs, %0" : "=m" (saved_context.fs));
-	asm volatile ("movw %%gs, %0" : "=m" (saved_context.gs));
-	asm volatile ("movw %%ss, %0" : "=m" (saved_context.ss));
-
-	rdmsrl(MSR_FS_BASE, saved_context.fs_base);
-	rdmsrl(MSR_GS_BASE, saved_context.gs_base);
-	rdmsrl(MSR_KERNEL_GS_BASE, saved_context.gs_kernel_base);
+	asm volatile ("movw %%ds, %0" : "=m" (ctxt->ds));
+	asm volatile ("movw %%es, %0" : "=m" (ctxt->es));
+	asm volatile ("movw %%fs, %0" : "=m" (ctxt->fs));
+	asm volatile ("movw %%gs, %0" : "=m" (ctxt->gs));
+	asm volatile ("movw %%ss, %0" : "=m" (ctxt->ss));
+
+	rdmsrl(MSR_FS_BASE, ctxt->fs_base);
+	rdmsrl(MSR_GS_BASE, ctxt->gs_base);
+	rdmsrl(MSR_KERNEL_GS_BASE, ctxt->gs_kernel_base);
 
 	/*
 	 * control registers 
 	 */
-	asm volatile ("movq %%cr0, %0" : "=r" (saved_context.cr0));
-	asm volatile ("movq %%cr2, %0" : "=r" (saved_context.cr2));
-	asm volatile ("movq %%cr3, %0" : "=r" (saved_context.cr3));
-	asm volatile ("movq %%cr4, %0" : "=r" (saved_context.cr4));
+	asm volatile ("movq %%cr0, %0" : "=r" (ctxt->cr0));
+	asm volatile ("movq %%cr2, %0" : "=r" (ctxt->cr2));
+	asm volatile ("movq %%cr3, %0" : "=r" (ctxt->cr3));
+	asm volatile ("movq %%cr4, %0" : "=r" (ctxt->cr4));
+}
+
+void save_processor_state(void)
+{
+	__save_processor_state(&saved_context);
 }
 
 static void
@@ -80,42 +85,47 @@
 	mxcsr_feature_mask_init();
 }
 
-void restore_processor_state(void)
+void __restore_processor_state(struct saved_context *ctxt)
 {
 	/*
 	 * control registers
 	 */
-	asm volatile ("movq %0, %%cr4" :: "r" (saved_context.cr4));
-	asm volatile ("movq %0, %%cr3" :: "r" (saved_context.cr3));
-	asm volatile ("movq %0, %%cr2" :: "r" (saved_context.cr2));
-	asm volatile ("movq %0, %%cr0" :: "r" (saved_context.cr0));
+	asm volatile ("movq %0, %%cr4" :: "r" (ctxt->cr4));
+	asm volatile ("movq %0, %%cr3" :: "r" (ctxt->cr3));
+	asm volatile ("movq %0, %%cr2" :: "r" (ctxt->cr2));
+	asm volatile ("movq %0, %%cr0" :: "r" (ctxt->cr0));
 
 	/*
 	 * segment registers
 	 */
-	asm volatile ("movw %0, %%ds" :: "r" (saved_context.ds));
-	asm volatile ("movw %0, %%es" :: "r" (saved_context.es));
-	asm volatile ("movw %0, %%fs" :: "r" (saved_context.fs));
-	load_gs_index(saved_context.gs);
-	asm volatile ("movw %0, %%ss" :: "r" (saved_context.ss));
-
-	wrmsrl(MSR_FS_BASE, saved_context.fs_base);
-	wrmsrl(MSR_GS_BASE, saved_context.gs_base);
-	wrmsrl(MSR_KERNEL_GS_BASE, saved_context.gs_kernel_base);
+	asm volatile ("movw %0, %%ds" :: "r" (ctxt->ds));
+	asm volatile ("movw %0, %%es" :: "r" (ctxt->es));
+	asm volatile ("movw %0, %%fs" :: "r" (ctxt->fs));
+	load_gs_index(ctxt->gs);
+	asm volatile ("movw %0, %%ss" :: "r" (ctxt->ss));
+
+	wrmsrl(MSR_FS_BASE, ctxt->fs_base);
+	wrmsrl(MSR_GS_BASE, ctxt->gs_base);
+	wrmsrl(MSR_KERNEL_GS_BASE, ctxt->gs_kernel_base);
 
 	/*
 	 * now restore the descriptor tables to their proper values
 	 * ltr is done i fix_processor_context().
 	 */
-	asm volatile ("lgdt %0" :: "m" (saved_context.gdt_limit));
-	asm volatile ("lidt %0" :: "m" (saved_context.idt_limit));
-	asm volatile ("lldt %0" :: "m" (saved_context.ldt));
+	asm volatile ("lgdt %0" :: "m" (ctxt->gdt_limit));
+	asm volatile ("lidt %0" :: "m" (ctxt->idt_limit));
+	asm volatile ("lldt %0" :: "m" (ctxt->ldt));
 
 	fix_processor_context();
 
 	do_fpu_end();
 }
 
+void restore_processor_state(void)
+{
+	__restore_processor_state(&saved_context);
+}
+
 void fix_processor_context(void)
 {
 	int cpu = smp_processor_id();
--- diff/arch/x86_64/kernel/time.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/time.c	2004-07-01 21:32:34.000000000 +0100
@@ -689,7 +689,7 @@
 }
 
 static struct irqaction irq0 = {
-	timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL
+	timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL
 };
 
 extern void __init config_acpi_tables(void);
--- diff/arch/x86_64/kernel/traps.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/traps.c	2004-07-01 21:32:34.000000000 +0100
@@ -45,6 +45,9 @@
 #include <asm/proto.h>
 
 #include <linux/irq.h>
+#ifdef CONFIG_KGDB
+#include <asm/kgdb.h>
+#endif
 
 extern struct gate_struct idt_table[256]; 
 
@@ -140,7 +143,7 @@
 	if (estack_end) { 
 		while (stack < estack_end) { 
 			addr = *stack++; 
-			if (kernel_text_address(addr)) {  
+			if (__kernel_text_address(addr)) {
 				i += printk_address(addr);
 				i += printk(" "); 
 				if (i > 50) {
@@ -169,7 +172,7 @@
 			 * down the cause of the crash will be able to figure
 			 * out the call path that was taken.
 			 */
-			 if (kernel_text_address(addr)) {  
+			 if (__kernel_text_address(addr)) {
 				 i += printk_address(addr);
 				 i += printk(" "); 
 				 if (i > 50) { 
@@ -185,7 +188,7 @@
 
 	while (((long) stack & (THREAD_SIZE-1)) != 0) {
 		addr = *stack++;
-		if (kernel_text_address(addr)) { 	 
+		if (__kernel_text_address(addr)) {
 			i += printk_address(addr);
 			i += printk(" "); 
 			if (i > 50) { 
--- diff/arch/x86_64/kernel/x8664_ksyms.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/kernel/x8664_ksyms.c	2004-07-01 21:32:34.000000000 +0100
@@ -218,4 +218,3 @@
 EXPORT_SYMBOL_GPL(flush_tlb_all);
 #endif
 
-EXPORT_SYMBOL(sys_ioctl);
--- diff/arch/x86_64/lib/Makefile	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/lib/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -12,3 +12,4 @@
 lib-y += memcpy.o memmove.o memset.o copy_user.o
 
 lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
+lib-$(CONFIG_KGDB) += kgdb_serial.o
--- diff/arch/x86_64/mm/init.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/mm/init.c	2004-07-01 21:32:34.000000000 +0100
@@ -60,7 +60,7 @@
 
 	printk("Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 
 	for_each_pgdat(pgdat) {
                for (i = 0; i < pgdat->node_spanned_pages; ++i) {
--- diff/arch/x86_64/mm/numa.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/mm/numa.c	2004-07-01 21:32:34.000000000 +0100
@@ -182,7 +182,7 @@
 	numnodes = 1;
 	for (i = 0; i < NR_CPUS; i++)
 		cpu_to_node[i] = 0;
-	node_to_cpumask[0] = 1;
+	node_to_cpumask[0] = cpumask_of_cpu(0);
 	setup_node_bootmem(0, start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT);
 }
 
--- diff/arch/x86_64/mm/pageattr.c	2004-06-30 14:25:43.000000000 +0100
+++ source/arch/x86_64/mm/pageattr.c	2004-07-01 21:32:34.000000000 +0100
@@ -180,7 +180,7 @@
 			unsigned long addr2;
 			addr2 = __START_KERNEL_map + page_to_phys(page);
 			err = __change_page_attr(addr2, page, prot, 
-						 PAGE_KERNEL_EXECUTABLE);
+						 PAGE_KERNEL_EXEC);
 		} 
 	} 	
 	up_write(&init_mm.mmap_sem); 
--- diff/drivers/Makefile	2004-05-19 22:11:29.000000000 +0100
+++ source/drivers/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -37,9 +37,9 @@
 obj-$(CONFIG_TC)		+= tc/
 obj-$(CONFIG_USB)		+= usb/
 obj-$(CONFIG_USB_GADGET)	+= usb/gadget/
+obj-$(CONFIG_SERIO)		+= input/serio/
 obj-$(CONFIG_INPUT)		+= input/
 obj-$(CONFIG_GAMEPORT)		+= input/gameport/
-obj-$(CONFIG_SERIO)		+= input/serio/
 obj-$(CONFIG_I2O)		+= message/
 obj-$(CONFIG_I2C)		+= i2c/
 obj-$(CONFIG_PHONE)		+= telephony/
@@ -49,4 +49,5 @@
 obj-$(CONFIG_MCA)		+= mca/
 obj-$(CONFIG_EISA)		+= eisa/
 obj-$(CONFIG_CPU_FREQ)		+= cpufreq/
+obj-$(CONFIG_PERFCTR)		+= perfctr/
 obj-y				+= firmware/
--- diff/drivers/acpi/Kconfig	2004-05-19 22:11:29.000000000 +0100
+++ source/drivers/acpi/Kconfig	2004-07-01 21:32:34.000000000 +0100
@@ -267,7 +267,7 @@
 	  (TSC) timing source.
 
 	  So, if you see messages like 'Losing too many ticks!' in the
-	  kernel logs, and/or you are using a this on a notebook which
+	  kernel logs, and/or you are using this on a notebook which
 	  does not yet have an HPET, you should say "Y" here.
 
 endmenu
--- diff/drivers/acpi/pci_irq.c	2004-05-19 22:11:29.000000000 +0100
+++ source/drivers/acpi/pci_irq.c	2004-07-01 21:32:34.000000000 +0100
@@ -35,12 +35,6 @@
 #include <linux/pm.h>
 #include <linux/pci.h>
 #include <linux/acpi.h>
-#ifdef CONFIG_X86_IO_APIC
-#include <asm/mpspec.h>
-#endif
-#ifdef CONFIG_IOSAPIC
-# include <asm/iosapic.h>
-#endif
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
@@ -50,10 +44,6 @@
 
 struct acpi_prt_list		acpi_prt;
 
-#ifdef CONFIG_X86
-extern void eisa_set_level_irq(unsigned int irq);
-#endif
-
 
 /* --------------------------------------------------------------------------
                          PCI IRQ Routing Table (PRT) Support
@@ -237,12 +227,18 @@
                           PCI Interrupt Routing Support
    -------------------------------------------------------------------------- */
 
-int
-acpi_pci_irq_lookup (struct pci_bus *bus, int device, int pin)
+static int
+acpi_pci_irq_lookup (
+	struct pci_bus		*bus,
+	int			device,
+	int			pin,
+	int			*edge_level,
+	int			*active_high_low)
 {
 	struct acpi_prt_entry	*entry = NULL;
 	int segment = pci_domain_nr(bus);
 	int bus_nr = bus->number;
+	int irq;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_irq_lookup");
 
@@ -255,28 +251,30 @@
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "PRT entry not found\n"));
 		return_VALUE(0);
 	}
-
-	if (!entry->irq && entry->link.handle) {
-		entry->irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, NULL, NULL);
-		if (!entry->irq) {
+	
+	if (entry->link.handle) {
+		irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, edge_level, active_high_low);
+		if (!irq) {
 			ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid IRQ link routing entry\n"));
 			return_VALUE(0);
 		}
-	}
-	else if (!entry->irq) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid static routing entry (IRQ 0)\n"));
-		return_VALUE(0);
+	} else {
+		irq = entry->link.index;
+		*edge_level = ACPI_LEVEL_SENSITIVE;
+		*active_high_low = ACPI_ACTIVE_LOW;
 	}
 
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", entry->irq));
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", irq));
 
-	return_VALUE(entry->irq);
+	return_VALUE(irq);
 }
 
 static int
 acpi_pci_irq_derive (
 	struct pci_dev		*dev,
-	int			pin)
+	int			pin,
+	int			*edge_level,
+	int			*active_high_low)
 {
 	struct pci_dev		*bridge = dev;
 	int			irq = 0;
@@ -308,8 +306,8 @@
 			pin = bridge_pin;
 		}
 
-		irq = acpi_pci_irq_lookup(bridge->bus,
-				PCI_SLOT(bridge->devfn), pin);
+		irq = acpi_pci_irq_lookup(bridge->bus, PCI_SLOT(bridge->devfn),
+			pin, edge_level, active_high_low);
 	}
 
 	if (!irq) {
@@ -330,6 +328,8 @@
 {
 	int			irq = 0;
 	u8			pin = 0;
+	int			edge_level = ACPI_LEVEL_SENSITIVE;
+	int			active_high_low = ACPI_ACTIVE_LOW;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
 
@@ -352,21 +352,22 @@
 	 * First we check the PCI IRQ routing table (PRT) for an IRQ.  PRT
 	 * values override any BIOS-assigned IRQs set during boot.
 	 */
- 	irq = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin);
+ 	irq = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin, &edge_level, &active_high_low);
 
 	/*
 	 * If no PRT entry was found, we'll try to derive an IRQ from the
 	 * device's parent bridge.
 	 */
 	if (!irq)
- 		irq = acpi_pci_irq_derive(dev, pin);
+ 		irq = acpi_pci_irq_derive(dev, pin, &edge_level, &active_high_low);
  
 	/*
 	 * No IRQ known to the ACPI subsystem - maybe the BIOS / 
 	 * driver reported one, then use it. Exit in any case.
 	 */
 	if (!irq) {
-		printk(KERN_WARNING PREFIX "No IRQ known for interrupt pin %c of device %s", ('A' + pin), pci_name(dev));
+		printk(KERN_WARNING PREFIX "PCI interrupt %s[%c]: no GSI",
+			pci_name(dev), ('A' + pin));
 		/* Interrupt Line values above 0xF are forbidden */
 		if (dev->irq && (dev->irq <= 0xF)) {
 			printk(" - using IRQ %d\n", dev->irq);
@@ -378,62 +379,14 @@
 		}
  	}
 
-	dev->irq = irq;
+	dev->irq = acpi_register_gsi(irq, edge_level, active_high_low);
 
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device %s using IRQ %d\n", pci_name(dev), dev->irq));
-
-	/* 
-	 * Make sure all (legacy) PCI IRQs are set as level-triggered.
-	 */
-#ifdef CONFIG_X86
-	{
-		static u16 irq_mask;
-		if ((dev->irq < 16) &&  !((1 << dev->irq) & irq_mask)) {
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Setting IRQ %d as level-triggered\n", dev->irq));
-			irq_mask |= (1 << dev->irq);
-			eisa_set_level_irq(dev->irq);
-		}
-	}
-#endif
-#ifdef CONFIG_IOSAPIC
-	if (acpi_irq_model == ACPI_IRQ_MODEL_IOSAPIC)
-		iosapic_enable_intr(dev->irq);
-#endif
+	printk(KERN_INFO PREFIX "PCI interrupt %s[%c] -> GSI %u "
+		"(%s, %s) -> IRQ %d\n",
+		pci_name(dev), 'A' + pin, irq,
+		(edge_level == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
+		(active_high_low == ACPI_ACTIVE_LOW) ? "low" : "high",
+		dev->irq);
 
 	return_VALUE(dev->irq);
 }
-
-
-int __init
-acpi_pci_irq_init (void)
-{
-	struct pci_dev          *dev = NULL;
-
-	ACPI_FUNCTION_TRACE("acpi_pci_irq_init");
-
-	if (!acpi_prt.count) {
-		printk(KERN_WARNING PREFIX "ACPI tables contain no PCI IRQ "
-			"routing entries\n");
-		return_VALUE(-ENODEV);
-	}
-
-	/* Make sure all link devices have a valid IRQ. */
-	if (acpi_pci_link_check()) {
-		return_VALUE(-ENODEV);
-	}
-
-#ifdef CONFIG_X86_IO_APIC
-	/* Program IOAPICs using data from PRT entries. */
-	if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC)
-		mp_parse_prt();
-#endif
-#ifdef CONFIG_IOSAPIC
-	if (acpi_irq_model == ACPI_IRQ_MODEL_IOSAPIC)
-		iosapic_parse_prt();
-#endif
-
-	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
-		acpi_pci_irq_enable(dev);
-
-	return_VALUE(0);
-}
--- diff/drivers/acpi/pci_link.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/acpi/pci_link.c	2004-07-01 21:32:34.000000000 +0100
@@ -308,31 +308,12 @@
 		struct acpi_resource	end;
 	}                       resource;
 	struct acpi_buffer	buffer = {sizeof(resource)+1, &resource};
-	int			i = 0;
-	int			valid = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_link_set");
 
 	if (!link || !irq)
 		return_VALUE(-EINVAL);
 
-	/* We don't check irqs the first time around */
-	if (link->irq.setonboot) {
-		/* See if we're already at the target IRQ. */
-		if (irq == link->irq.active)
-			return_VALUE(0);
-
-		/* Make sure the target IRQ in the list of possible IRQs. */
-		for (i=0; i<link->irq.possible_count; i++) {
-			if (irq == link->irq.possible[i])
-				valid = 1;
-		}
-		if (!valid) {
-			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Target IRQ %d invalid\n", irq));
-			return_VALUE(-EINVAL);
-		}
-	}
-
 	memset(&resource, 0, sizeof(resource));
 
 	switch(link->irq.resource_type) {
@@ -487,13 +468,13 @@
 };
 
 int
-acpi_pci_link_check (void)
+acpi_irq_penalty_init(void)
 {
 	struct list_head	*node = NULL;
 	struct acpi_pci_link    *link = NULL;
 	int			i = 0;
 
-	ACPI_FUNCTION_TRACE("acpi_pci_link_check");
+	ACPI_FUNCTION_TRACE("acpi_irq_penalty_init");
 
 	/*
 	 * Update penalties to facilitate IRQ balancing.
@@ -703,6 +684,9 @@
 	acpi_link.count++;
 
 end:
+	/* disable all links -- to be activated on use */
+	acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL);
+
 	if (result)
 		kfree(link);
 
--- diff/drivers/acpi/pci_root.c	2004-05-19 22:11:29.000000000 +0100
+++ source/drivers/acpi/pci_root.c	2004-07-01 21:32:34.000000000 +0100
@@ -113,6 +113,40 @@
 	}
 }
 
+static acpi_status
+get_root_bridge_busnr_callback (struct acpi_resource *resource, void *data)
+{
+	int *busnr = (int *)data;
+	struct acpi_resource_address64 address;
+
+	if (resource->id != ACPI_RSTYPE_ADDRESS16 &&
+	    resource->id != ACPI_RSTYPE_ADDRESS32 &&
+	    resource->id != ACPI_RSTYPE_ADDRESS64)
+		return AE_OK;
+
+	acpi_resource_to_address64(resource, &address);
+	if ((address.address_length > 0) && 
+	   (address.resource_type == ACPI_BUS_NUMBER_RANGE))
+		*busnr = address.min_address_range;
+
+	return AE_OK;
+}
+
+static acpi_status 
+try_get_root_bridge_busnr(acpi_handle handle, int *busnum)
+{
+	acpi_status status;
+
+	*busnum = -1;
+	status = acpi_walk_resources(handle, METHOD_NAME__CRS, get_root_bridge_busnr_callback, busnum);
+	if (ACPI_FAILURE(status))
+		return status;
+	/* Check if we really get a bus number from _CRS */
+	if (*busnum == -1)
+		return AE_ERROR;
+	return AE_OK;
+}
+
 static int
 acpi_pci_root_add (
 	struct acpi_device	*device)
@@ -190,9 +224,22 @@
 	/* Some systems have wrong _BBN */
 	list_for_each_entry(tmp, &acpi_pci_roots, node) {
 		if ((tmp->id.segment == root->id.segment)
-				&& (tmp->id.bus == root->id.bus))
+				&& (tmp->id.bus == root->id.bus)) {
+			int bus = 0;
+			acpi_status status;
+
 			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 
 				"Wrong _BBN value, please reboot and using option 'pci=noacpi'\n"));
+
+			status = try_get_root_bridge_busnr(root->handle, &bus);
+			if (ACPI_FAILURE(status))
+				break;
+			if (bus != root->id.bus) {
+				printk(KERN_INFO PREFIX "PCI _CRS %d overrides _BBN 0\n", bus);
+				root->id.bus = bus;
+			}
+			break;
+		}
 	}
 	/*
 	 * Device & Function
--- diff/drivers/acpi/tables.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/acpi/tables.c	2004-07-01 21:32:34.000000000 +0100
@@ -131,7 +131,7 @@
 	{
 		struct acpi_table_ioapic *p =
 			(struct acpi_table_ioapic*) header;
-		printk(KERN_INFO PREFIX "IOAPIC (id[0x%02x] address[0x%08x] global_irq_base[0x%x])\n",
+		printk(KERN_INFO PREFIX "IOAPIC (id[0x%02x] address[0x%08x] gsi_base[%d])\n",
 			p->id, p->address, p->global_irq_base);
 	}
 		break;
@@ -185,8 +185,8 @@
 	{
 		struct acpi_table_iosapic *p =
 			(struct acpi_table_iosapic*) header;
-		printk(KERN_INFO PREFIX "IOSAPIC (id[0x%x] global_irq_base[0x%x] address[%p])\n",
-			p->id, p->global_irq_base, (void *) (unsigned long) p->address);
+		printk(KERN_INFO PREFIX "IOSAPIC (id[0x%x] address[%p] gsi_base[%d])\n",
+			p->id, (void *) (unsigned long) p->address, p->global_irq_base);
 	}
 		break;
 
--- diff/drivers/acpi/thermal.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/acpi/thermal.c	2004-07-01 21:32:34.000000000 +0100
@@ -289,6 +289,13 @@
 	status = acpi_get_handle(tz->handle, "_SCP", &handle);
 	if (ACPI_FAILURE(status)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n"));
+		status = acpi_get_handle(tz->handle, "_PSV", &handle);
+		if(!ACPI_FAILURE(status)) {
+			tz->cooling_mode = 1;
+			ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cooling mode [%s]\n", 
+				mode?"passive":"active"));
+			return_VALUE(0);
+		}
 		return_VALUE(-ENODEV);
 	}
 
--- diff/drivers/atm/firestream.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/atm/firestream.c	2004-07-01 21:32:34.000000000 +0100
@@ -576,7 +576,7 @@
 }
 
 
-static inline u32  read_fs (struct fs_dev *dev, int offset)
+static inline u32 read_fs (struct fs_dev *dev, int offset)
 {
 	return readl (dev->base + offset);
 }
@@ -1380,7 +1380,7 @@
 
 	if (alignment <= 0x10) {
 		t = kmalloc (size, flags);
-		if ((unsigned int)t & (alignment-1)) {
+		if ((unsigned long)t & (alignment-1)) {
 			printk ("Kmalloc doesn't align things correctly! %p\n", t);
 			kfree (t);
 			return aligned_kmalloc (size, flags, alignment * 4);
@@ -1496,7 +1496,7 @@
 		ne->skb = skb;
 		ne->fp = fp;
 
-		qe = (struct FS_BPENTRY *) (read_fs (dev, FP_EA(fp->offset)));
+		qe = (struct FS_BPENTRY *)(long)(read_fs (dev, FP_EA(fp->offset)));
 		fs_dprintk (FS_DEBUG_QUEUE, "link at %p\n", qe);
 		if (qe) {
 			qe = bus_to_virt ((long) qe);
--- diff/drivers/base/Kconfig	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/Kconfig	2004-07-01 21:32:34.000000000 +0100
@@ -1,5 +1,14 @@
 menu "Generic Driver Options"
 
+config PREVENT_FIRMWARE_BUILD
+	bool "Prevent firmware from being built"
+	default y
+	help
+	  Say yes to avoid building firmware. Firmware is usually shipped
+	  with the driver, and only when updating the firware a rebuild
+	  should be made.
+	  If unsure say Y here.
+
 config FW_LOADER
 	tristate "Hotplug firmware loading support"
 	depends on HOTPLUG
--- diff/drivers/base/base.h	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/base.h	2004-07-01 21:32:34.000000000 +0100
@@ -6,12 +6,13 @@
 
 static inline struct class_device *to_class_dev(struct kobject *obj)
 {
-	return container_of(obj,struct class_device,kobj);
+	return container_of(obj, struct class_device, kobj);
 }
+
 static inline
 struct class_device_attribute *to_class_dev_attr(struct attribute *_attr)
 {
-	return container_of(_attr,struct class_device_attribute,attr);
+	return container_of(_attr, struct class_device_attribute, attr);
 }
 
 
--- diff/drivers/base/bus.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/base/bus.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2002-3 Patrick Mochel
  * Copyright (c) 2002-3 Open Source Development Labs
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -17,17 +17,17 @@
 #include "base.h"
 #include "power/power.h"
 
-#define to_dev(node) container_of(node,struct device,bus_list)
-#define to_drv(node) container_of(node,struct device_driver,kobj.entry)
+#define to_dev(node) container_of(node, struct device, bus_list)
+#define to_drv(node) container_of(node, struct device_driver, kobj.entry)
 
-#define to_bus_attr(_attr) container_of(_attr,struct bus_attribute,attr)
-#define to_bus(obj) container_of(obj,struct bus_type,subsys.kset.kobj)
+#define to_bus_attr(_attr) container_of(_attr, struct bus_attribute, attr)
+#define to_bus(obj) container_of(obj, struct bus_type, subsys.kset.kobj)
 
 /*
  * sysfs bindings for drivers
  */
 
-#define to_drv_attr(_attr) container_of(_attr,struct driver_attribute,attr)
+#define to_drv_attr(_attr) container_of(_attr, struct driver_attribute, attr)
 #define to_driver(obj) container_of(obj, struct device_driver, kobj)
 
 
@@ -39,12 +39,12 @@
 	ssize_t ret = 0;
 
 	if (drv_attr->show)
-		ret = drv_attr->show(drv,buf);
+		ret = drv_attr->show(drv, buf);
 	return ret;
 }
 
 static ssize_t
-drv_attr_store(struct kobject * kobj, struct attribute * attr, 
+drv_attr_store(struct kobject * kobj, struct attribute * attr,
 	       const char * buf, size_t count)
 {
 	struct driver_attribute * drv_attr = to_drv_attr(attr);
@@ -52,7 +52,7 @@
 	ssize_t ret = 0;
 
 	if (drv_attr->store)
-		ret = drv_attr->store(drv,buf,count);
+		ret = drv_attr->store(drv, buf, count);
 	return ret;
 }
 
@@ -87,12 +87,12 @@
 	ssize_t ret = 0;
 
 	if (bus_attr->show)
-		ret = bus_attr->show(bus,buf);
+		ret = bus_attr->show(bus, buf);
 	return ret;
 }
 
 static ssize_t
-bus_attr_store(struct kobject * kobj, struct attribute * attr, 
+bus_attr_store(struct kobject * kobj, struct attribute * attr,
 	       const char * buf, size_t count)
 {
 	struct bus_attribute * bus_attr = to_bus_attr(attr);
@@ -100,7 +100,7 @@
 	ssize_t ret = 0;
 
 	if (bus_attr->store)
-		ret = bus_attr->store(bus,buf,count);
+		ret = bus_attr->store(bus, buf, count);
 	return ret;
 }
 
@@ -113,7 +113,7 @@
 {
 	int error;
 	if (get_bus(bus)) {
-		error = sysfs_create_file(&bus->subsys.kset.kobj,&attr->attr);
+		error = sysfs_create_file(&bus->subsys.kset.kobj, &attr->attr);
 		put_bus(bus);
 	} else
 		error = -EINVAL;
@@ -123,7 +123,7 @@
 void bus_remove_file(struct bus_type * bus, struct bus_attribute * attr)
 {
 	if (get_bus(bus)) {
-		sysfs_remove_file(&bus->subsys.kset.kobj,&attr->attr);
+		sysfs_remove_file(&bus->subsys.kset.kobj, &attr->attr);
 		put_bus(bus);
 	}
 }
@@ -133,7 +133,7 @@
 
 };
 
-decl_subsys(bus,&ktype_bus,NULL);
+decl_subsys(bus, &ktype_bus, NULL);
 
 /**
  *	bus_for_each_dev - device iterator.
@@ -151,10 +151,10 @@
  *
  *	NOTE: The device that returns a non-zero value is not retained
  *	in any way, nor is its refcount incremented. If the caller needs
- *	to retain this data, it should do, and increment the reference 
+ *	to retain this data, it should do, and increment the reference
  *	count in the supplied callback.
  */
-int bus_for_each_dev(struct bus_type * bus, struct device * start, 
+int bus_for_each_dev(struct bus_type * bus, struct device * start,
 		     void * data, int (*fn)(struct device *, void *))
 {
 	struct device *dev;
@@ -170,7 +170,7 @@
 	down_read(&bus->subsys.rwsem);
 	list_for_each_entry_continue(dev, head, bus_list) {
 		get_device(dev);
-		error = fn(dev,data);
+		error = fn(dev, data);
 		put_device(dev);
 		if (error)
 			break;
@@ -193,7 +193,7 @@
  *	and return it. If @start is not NULL, we use it as the head
  *	of the list.
  *
- *	NOTE: we don't return the driver that returns a non-zero 
+ *	NOTE: we don't return the driver that returns a non-zero
  *	value, nor do we leave the reference count incremented for that
  *	driver. If the caller needs to know that info, it must set it
  *	in the callback. It must also be sure to increment the refcount
@@ -216,7 +216,7 @@
 	down_read(&bus->subsys.rwsem);
 	list_for_each_entry_continue(drv, head, kobj.entry) {
 		get_driver(drv);
-		error = fn(drv,data);
+		error = fn(drv, data);
 		put_driver(drv);
 		if(error)
 			break;
@@ -233,8 +233,8 @@
  *	Allow manual attachment of a driver to a deivce.
  *	Caller must have already set @dev->driver.
  *
- *	Note that this does not modify the bus reference count 
- *	nor take the bus's rwsem. Please verify those are accounted 
+ *	Note that this does not modify the bus reference count
+ *	nor take the bus's rwsem. Please verify those are accounted
  *	for before calling this. (It is ok to call with no other effort
  *	from a driver's probe() method.)
  */
@@ -242,9 +242,9 @@
 void device_bind_driver(struct device * dev)
 {
 	pr_debug("bound device '%s' to driver '%s'\n",
-		 dev->bus_id,dev->driver->name);
-	list_add_tail(&dev->driver_list,&dev->driver->devices);
-	sysfs_create_link(&dev->driver->kobj,&dev->kobj,
+		 dev->bus_id, dev->driver->name);
+	list_add_tail(&dev->driver_list, &dev->driver->devices);
+	sysfs_create_link(&dev->driver->kobj, &dev->kobj,
 			  kobject_name(&dev->kobj));
 }
 
@@ -255,18 +255,18 @@
  *	@drv:	driver.
  *
  *	First, we call the bus's match function, which should compare
- *	the device IDs the driver supports with the device IDs of the 
- *	device. Note we don't do this ourselves because we don't know 
+ *	the device IDs the driver supports with the device IDs of the
+ *	device. Note we don't do this ourselves because we don't know
  *	the format of the ID structures, nor what is to be considered
  *	a match and what is not.
- *	
- *	If we find a match, we call @drv->probe(@dev) if it exists, and 
+ *
+ *	If we find a match, we call @drv->probe(@dev) if it exists, and
  *	call attach() above.
  */
 static int bus_match(struct device * dev, struct device_driver * drv)
 {
 	int error = -ENODEV;
-	if (dev->bus->match(dev,drv)) {
+	if (dev->bus->match(dev, drv)) {
 		dev->driver = drv;
 		if (drv->probe) {
 			if ((error = drv->probe(dev))) {
@@ -285,7 +285,7 @@
  *	device_attach - try to attach device to a driver.
  *	@dev:	device.
  *
- *	Walk the list of drivers that the bus has and call bus_match() 
+ *	Walk the list of drivers that the bus has and call bus_match()
  *	for each pair. If a compatible pair is found, break out and return.
  */
 static int device_attach(struct device * dev)
@@ -300,15 +300,15 @@
 	}
 
 	if (bus->match) {
-		list_for_each(entry,&bus->drivers.list) {
+		list_for_each(entry, &bus->drivers.list) {
 			struct device_driver * drv = to_drv(entry);
-			error = bus_match(dev,drv);
-			if (!error )  
+			error = bus_match(dev, drv);
+			if (!error)
 				/* success, driver matched */
-				return 1; 
-			if (error != -ENODEV) 
+				return 1;
+			if (error != -ENODEV)
 				/* driver matched but the probe failed */
-				printk(KERN_WARNING 
+				printk(KERN_WARNING
 				    "%s: probe of %s failed with error %d\n",
 				    drv->name, dev->bus_id, error);
 		}
@@ -327,7 +327,7 @@
  *	If bus_match() returns 0 and the @dev->driver is set, we've found
  *	a compatible pair.
  *
- *	Note that we ignore the -ENODEV error from bus_match(), since it's 
+ *	Note that we ignore the -ENODEV error from bus_match(), since it's
  *	perfectly valid for a driver not to bind to any devices.
  */
 void driver_attach(struct device_driver * drv)
@@ -339,13 +339,13 @@
 	if (!bus->match)
 		return;
 
-	list_for_each(entry,&bus->devices.list) {
-		struct device * dev = container_of(entry,struct device,bus_list);
+	list_for_each(entry, &bus->devices.list) {
+		struct device * dev = container_of(entry, struct device, bus_list);
 		if (!dev->driver) {
-			error = bus_match(dev,drv);
+			error = bus_match(dev, drv);
 			if (error && (error != -ENODEV))
 				/* driver matched but the probe failed */
-				printk(KERN_WARNING 
+				printk(KERN_WARNING
 				    "%s: probe of %s failed with error %d\n",
 				    drv->name, dev->bus_id, error);
 		}
@@ -367,7 +367,7 @@
 {
 	struct device_driver * drv = dev->driver;
 	if (drv) {
-		sysfs_remove_link(&drv->kobj,kobject_name(&dev->kobj));
+		sysfs_remove_link(&drv->kobj, kobject_name(&dev->kobj));
 		list_del_init(&dev->driver_list);
 		device_detach_shutdown(dev);
 		if (drv->remove)
@@ -385,13 +385,44 @@
 static void driver_detach(struct device_driver * drv)
 {
 	struct list_head * entry, * next;
-	list_for_each_safe(entry,next,&drv->devices) {
-		struct device * dev = container_of(entry,struct device,driver_list);
+	list_for_each_safe(entry, next, &drv->devices) {
+		struct device * dev = container_of(entry, struct device, driver_list);
 		device_release_driver(dev);
 	}
-	
 }
 
+static int device_add_attrs(struct bus_type * bus, struct device * dev)
+{
+	int error = 0;
+	int i;
+
+	if (bus->dev_attrs) {
+		for (i = 0; attr_name(bus->dev_attrs[i]); i++) {
+			error = device_create_file(dev,&bus->dev_attrs[i]);
+			if (error)
+				goto Err;
+		}
+	}
+ Done:
+	return error;
+ Err:
+	while (--i >= 0)
+		device_remove_file(dev,&bus->dev_attrs[i]);
+	goto Done;
+}
+
+
+static void device_remove_attrs(struct bus_type * bus, struct device * dev)
+{
+	int i;
+
+	if (bus->dev_attrs) {
+		for (i = 0; attr_name(bus->dev_attrs[i]); i++)
+			device_remove_file(dev,&bus->dev_attrs[i]);
+	}
+}
+
+
 /**
  *	bus_add_device - add device to bus
  *	@dev:	device being added
@@ -407,11 +438,12 @@
 
 	if (bus) {
 		down_write(&dev->bus->subsys.rwsem);
-		pr_debug("bus %s: add device %s\n",bus->name,dev->bus_id);
-		list_add_tail(&dev->bus_list,&dev->bus->devices.list);
+		pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id);
+		list_add_tail(&dev->bus_list, &dev->bus->devices.list);
 		device_attach(dev);
 		up_write(&dev->bus->subsys.rwsem);
-		sysfs_create_link(&bus->devices.kobj,&dev->kobj,dev->bus_id);
+		device_add_attrs(bus, dev);
+		sysfs_create_link(&bus->devices.kobj, &dev->kobj, dev->bus_id);
 	}
 	return error;
 }
@@ -428,9 +460,10 @@
 void bus_remove_device(struct device * dev)
 {
 	if (dev->bus) {
-		sysfs_remove_link(&dev->bus->devices.kobj,dev->bus_id);
+		sysfs_remove_link(&dev->bus->devices.kobj, dev->bus_id);
+		device_remove_attrs(dev->bus, dev);
 		down_write(&dev->bus->subsys.rwsem);
-		pr_debug("bus %s: remove device %s\n",dev->bus->name,dev->bus_id);
+		pr_debug("bus %s: remove device %s\n", dev->bus->name, dev->bus_id);
 		device_release_driver(dev);
 		list_del_init(&dev->bus_list);
 		up_write(&dev->bus->subsys.rwsem);
@@ -438,6 +471,37 @@
 	}
 }
 
+static int driver_add_attrs(struct bus_type * bus, struct device_driver * drv)
+{
+	int error = 0;
+	int i;
+
+	if (bus->drv_attrs) {
+		for (i = 0; attr_name(bus->drv_attrs[i]); i++) {
+			error = driver_create_file(drv, &bus->drv_attrs[i]);
+			if (error)
+				goto Err;
+		}
+	}
+ Done:
+	return error;
+ Err:
+	while (--i >= 0)
+		driver_remove_file(drv, &bus->drv_attrs[i]);
+	goto Done;
+}
+
+
+static void driver_remove_attrs(struct bus_type * bus, struct device_driver * drv)
+{
+	int i;
+
+	if (bus->drv_attrs) {
+		for (i = 0; attr_name(bus->drv_attrs[i]); i++)
+			driver_remove_file(drv, &bus->drv_attrs[i]);
+	}
+}
+
 
 /**
  *	bus_add_driver - Add a driver to the bus.
@@ -450,8 +514,8 @@
 	int error = 0;
 
 	if (bus) {
-		pr_debug("bus %s: add driver %s\n",bus->name,drv->name);
-		error = kobject_set_name(&drv->kobj,drv->name);
+		pr_debug("bus %s: add driver %s\n", bus->name, drv->name);
+		error = kobject_set_name(&drv->kobj, drv->name);
 		if (error) {
 			put_bus(bus);
 			return error;
@@ -466,6 +530,7 @@
 		driver_attach(drv);
 		up_write(&bus->subsys.rwsem);
 
+		driver_add_attrs(bus, drv);
 	}
 	return error;
 }
@@ -483,8 +548,9 @@
 void bus_remove_driver(struct device_driver * drv)
 {
 	if (drv->bus) {
+		driver_remove_attrs(drv->bus, drv);
 		down_write(&drv->bus->subsys.rwsem);
-		pr_debug("bus %s: remove driver %s\n",drv->bus->name,drv->name);
+		pr_debug("bus %s: remove driver %s\n", drv->bus->name, drv->name);
 		driver_detach(drv);
 		up_write(&drv->bus->subsys.rwsem);
 		kobject_unregister(&drv->kobj);
@@ -526,7 +592,7 @@
 
 struct bus_type * get_bus(struct bus_type * bus)
 {
-	return bus ? container_of(subsys_get(&bus->subsys),struct bus_type,subsys) : NULL;
+	return bus ? container_of(subsys_get(&bus->subsys), struct bus_type, subsys) : NULL;
 }
 
 void put_bus(struct bus_type * bus)
@@ -545,29 +611,64 @@
 
 struct bus_type * find_bus(char * name)
 {
-	struct kobject * k = kset_find_obj(&bus_subsys.kset,name);
+	struct kobject * k = kset_find_obj(&bus_subsys.kset, name);
 	return k ? to_bus(k) : NULL;
 }
 
+
+/**
+ *	bus_add_attrs - Add default attributes for this bus.
+ *	@bus:	Bus that has just been registered.
+ */
+
+static int bus_add_attrs(struct bus_type * bus)
+{
+	int error = 0;
+	int i;
+
+	if (bus->bus_attrs) {
+		for (i = 0; attr_name(bus->bus_attrs[i]); i++) {
+			if ((error = bus_create_file(bus,&bus->bus_attrs[i])))
+				goto Err;
+		}
+	}
+ Done:
+	return error;
+ Err:
+	while (--i >= 0)
+		bus_remove_file(bus,&bus->bus_attrs[i]);
+	goto Done;
+}
+
+static void bus_remove_attrs(struct bus_type * bus)
+{
+	int i;
+
+	if (bus->bus_attrs) {
+		for (i = 0; attr_name(bus->bus_attrs[i]); i++)
+			bus_remove_file(bus,&bus->bus_attrs[i]);
+	}
+}
+
 /**
  *	bus_register - register a bus with the system.
  *	@bus:	bus.
  *
  *	Once we have that, we registered the bus with the kobject
  *	infrastructure, then register the children subsystems it has:
- *	the devices and drivers that belong to the bus. 
+ *	the devices and drivers that belong to the bus.
  */
 int bus_register(struct bus_type * bus)
 {
 	int retval;
 
-	retval = kobject_set_name(&bus->subsys.kset.kobj,bus->name);
+	retval = kobject_set_name(&bus->subsys.kset.kobj, bus->name);
 	if (retval)
 		goto out;
 
-	subsys_set_kset(bus,bus_subsys);
+	subsys_set_kset(bus, bus_subsys);
 	retval = subsystem_register(&bus->subsys);
-	if (retval) 
+	if (retval)
 		goto out;
 
 	kobject_set_name(&bus->devices.kobj, "devices");
@@ -582,8 +683,9 @@
 	retval = kset_register(&bus->drivers);
 	if (retval)
 		goto bus_drivers_fail;
+	bus_add_attrs(bus);
 
-	pr_debug("bus type '%s' registered\n",bus->name);
+	pr_debug("bus type '%s' registered\n", bus->name);
 	return 0;
 
 bus_drivers_fail:
@@ -596,7 +698,7 @@
 
 
 /**
- *	bus_unregister - remove a bus from the system 
+ *	bus_unregister - remove a bus from the system
  *	@bus:	bus.
  *
  *	Unregister the child subsystems and the bus itself.
@@ -604,7 +706,8 @@
  */
 void bus_unregister(struct bus_type * bus)
 {
-	pr_debug("bus %s: unregistering\n",bus->name);
+	pr_debug("bus %s: unregistering\n", bus->name);
+	bus_remove_attrs(bus);
 	kset_unregister(&bus->drivers);
 	kset_unregister(&bus->devices);
 	subsystem_unregister(&bus->subsys);
--- diff/drivers/base/class.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/base/class.c	2004-07-01 21:32:34.000000000 +0100
@@ -5,7 +5,7 @@
  * Copyright (c) 2002-3 Open Source Development Labs
  * Copyright (c) 2003-2004 Greg Kroah-Hartman
  * Copyright (c) 2003-2004 IBM Corp.
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -17,8 +17,8 @@
 #include <linux/string.h>
 #include "base.h"
 
-#define to_class_attr(_attr) container_of(_attr,struct class_attribute,attr)
-#define to_class(obj) container_of(obj,struct class,subsys.kset.kobj)
+#define to_class_attr(_attr) container_of(_attr, struct class_attribute, attr)
+#define to_class(obj) container_of(obj, struct class, subsys.kset.kobj)
 
 static ssize_t
 class_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
@@ -28,12 +28,12 @@
 	ssize_t ret = 0;
 
 	if (class_attr->show)
-		ret = class_attr->show(dc,buf);
+		ret = class_attr->show(dc, buf);
 	return ret;
 }
 
 static ssize_t
-class_attr_store(struct kobject * kobj, struct attribute * attr, 
+class_attr_store(struct kobject * kobj, struct attribute * attr,
 		 const char * buf, size_t count)
 {
 	struct class_attribute * class_attr = to_class_attr(attr);
@@ -41,7 +41,7 @@
 	ssize_t ret = 0;
 
 	if (class_attr->store)
-		ret = class_attr->store(dc,buf,count);
+		ret = class_attr->store(dc, buf, count);
 	return ret;
 }
 
@@ -69,14 +69,14 @@
 };
 
 /* Hotplug events for classes go to the class_obj subsys */
-static decl_subsys(class,&ktype_class,NULL);
+static decl_subsys(class, &ktype_class, NULL);
 
 
 int class_create_file(struct class * cls, const struct class_attribute * attr)
 {
 	int error;
 	if (cls) {
-		error = sysfs_create_file(&cls->subsys.kset.kobj,&attr->attr);
+		error = sysfs_create_file(&cls->subsys.kset.kobj, &attr->attr);
 	} else
 		error = -EINVAL;
 	return error;
@@ -85,13 +85,13 @@
 void class_remove_file(struct class * cls, const struct class_attribute * attr)
 {
 	if (cls)
-		sysfs_remove_file(&cls->subsys.kset.kobj,&attr->attr);
+		sysfs_remove_file(&cls->subsys.kset.kobj, &attr->attr);
 }
 
 struct class * class_get(struct class * cls)
 {
 	if (cls)
-		return container_of(subsys_get(&cls->subsys),struct class,subsys);
+		return container_of(subsys_get(&cls->subsys), struct class, subsys);
 	return NULL;
 }
 
@@ -100,33 +100,67 @@
 	subsys_put(&cls->subsys);
 }
 
+
+static int add_class_attrs(struct class * cls)
+{
+	int i;
+	int error = 0;
+
+	if (cls->class_attrs) {
+		for (i = 0; attr_name(cls->class_attrs[i]); i++) {
+			error = class_create_file(cls,&cls->class_attrs[i]);
+			if (error)
+				goto Err;
+		}
+	}
+ Done:
+	return error;
+ Err:
+	while (--i >= 0)
+		class_remove_file(cls,&cls->class_attrs[i]);
+	goto Done;
+}
+
+static void remove_class_attrs(struct class * cls)
+{
+	int i;
+
+	if (cls->class_attrs) {
+		for (i = 0; attr_name(cls->class_attrs[i]); i++)
+			class_remove_file(cls,&cls->class_attrs[i]);
+	}
+}
+
 int class_register(struct class * cls)
 {
 	int error;
 
-	pr_debug("device class '%s': registering\n",cls->name);
+	pr_debug("device class '%s': registering\n", cls->name);
 
 	INIT_LIST_HEAD(&cls->children);
 	INIT_LIST_HEAD(&cls->interfaces);
-	error = kobject_set_name(&cls->subsys.kset.kobj,cls->name);
+	error = kobject_set_name(&cls->subsys.kset.kobj, cls->name);
 	if (error)
 		return error;
 
-	subsys_set_kset(cls,class_subsys);
+	subsys_set_kset(cls, class_subsys);
 
 	error = subsystem_register(&cls->subsys);
-	if (error)
-		return error;
-
-	return 0;
+	if (!error) {
+		error = add_class_attrs(class_get(cls));
+		class_put(cls);
+	}
+	return error;
 }
 
 void class_unregister(struct class * cls)
 {
-	pr_debug("device class '%s': unregistering\n",cls->name);
+	pr_debug("device class '%s': unregistering\n", cls->name);
+	remove_class_attrs(cls);
 	subsystem_unregister(&cls->subsys);
 }
 
+
 /* Class Device Stuff */
 
 int class_device_create_file(struct class_device * class_dev,
@@ -181,12 +215,12 @@
 	ssize_t ret = 0;
 
 	if (class_dev_attr->show)
-		ret = class_dev_attr->show(cd,buf);
+		ret = class_dev_attr->show(cd, buf);
 	return ret;
 }
 
 static ssize_t
-class_device_attr_store(struct kobject * kobj, struct attribute * attr, 
+class_device_attr_store(struct kobject * kobj, struct attribute * attr,
 			const char * buf, size_t count)
 {
 	struct class_device_attribute * class_dev_attr = to_class_dev_attr(attr);
@@ -194,7 +228,7 @@
 	ssize_t ret = 0;
 
 	if (class_dev_attr->store)
-		ret = class_dev_attr->store(cd,buf,count);
+		ret = class_dev_attr->store(cd, buf, count);
 	return ret;
 }
 
@@ -208,7 +242,7 @@
 	struct class_device *cd = to_class_dev(kobj);
 	struct class * cls = cd->class;
 
-	pr_debug("device class '%s': release.\n",cd->class_id);
+	pr_debug("device class '%s': release.\n", cd->class_id);
 
 	if (cls->release)
 		cls->release(cd);
@@ -272,6 +306,40 @@
 
 static decl_subsys(class_obj, &ktype_class_device, &class_hotplug_ops);
 
+
+static int class_device_add_attrs(struct class_device * cd)
+{
+	int i;
+	int error = 0;
+	struct class * cls = cd->class;
+
+	if (cls->class_dev_attrs) {
+		for (i = 0; attr_name(cls->class_dev_attrs[i]); i++) {
+			error = class_device_create_file(cd,
+							 &cls->class_dev_attrs[i]);
+			if (error)
+				goto Err;
+		}
+	}
+ Done:
+	return error;
+ Err:
+	while (--i >= 0)
+		class_device_remove_file(cd,&cls->class_dev_attrs[i]);
+	goto Done;
+}
+
+static void class_device_remove_attrs(struct class_device * cd)
+{
+	int i;
+	struct class * cls = cd->class;
+
+	if (cls->class_dev_attrs) {
+		for (i = 0; attr_name(cls->class_dev_attrs[i]); i++)
+			class_device_remove_file(cd,&cls->class_dev_attrs[i]);
+	}
+}
+
 void class_device_initialize(struct class_device *class_dev)
 {
 	kobj_set_kset_s(class_dev, class_obj_subsys);
@@ -311,7 +379,7 @@
 				class_intf->add(class_dev);
 		up_write(&parent->subsys.rwsem);
 	}
-
+	class_device_add_attrs(class_dev);
 	class_device_dev_link(class_dev);
 	class_device_driver_link(class_dev);
 
@@ -344,7 +412,8 @@
 
 	class_device_dev_unlink(class_dev);
 	class_device_driver_unlink(class_dev);
-	
+	class_device_remove_attrs(class_dev);
+
 	kobject_del(&class_dev->kobj);
 
 	if (parent)
--- diff/drivers/base/class_simple.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/class_simple.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
  * Copyright (c) 2003-2004 IBM Corp.
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -111,7 +111,7 @@
 
 /**
  * class_simple_device_add - adds a class device to sysfs for a character driver
- * @cs: pointer to the struct class_simple that this device should be registered to.  
+ * @cs: pointer to the struct class_simple that this device should be registered to.
  * @dev: the dev_t for the device to be added.
  * @device: a pointer to a struct device that is assiociated with this class device.
  * @fmt: string for the class device's name
@@ -146,8 +146,8 @@
 	s_dev->dev = dev;
 	s_dev->class_dev.dev = device;
 	s_dev->class_dev.class = &cs->class;
-	
-	va_start(args,fmt);
+
+	va_start(args, fmt);
 	vsnprintf(s_dev->class_dev.class_id, BUS_ID_SIZE, fmt, args);
 	va_end(args);
 	retval = class_device_register(&s_dev->class_dev);
@@ -173,10 +173,10 @@
  * @cs: pointer to the struct class_simple to hold the pointer
  * @hotplug: function pointer to the hotplug function
  *
- * Implement and set a hotplug function to add environment variables specific to this 
+ * Implement and set a hotplug function to add environment variables specific to this
  * class on the hotplug event.
  */
-int class_simple_set_hotplug(struct class_simple *cs, 
+int class_simple_set_hotplug(struct class_simple *cs,
 	int (*hotplug)(struct class_device *dev, char **envp, int num_envp, char *buffer, int buffer_size))
 {
 	if ((cs == NULL) || (IS_ERR(cs)))
--- diff/drivers/base/core.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/core.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2002-3 Patrick Mochel
  * Copyright (c) 2002-3 Open Source Development Labs
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -28,8 +28,8 @@
  * sysfs bindings for devices.
  */
 
-#define to_dev(obj) container_of(obj,struct device,kobj)
-#define to_dev_attr(_attr) container_of(_attr,struct device_attribute,attr)
+#define to_dev(obj) container_of(obj, struct device, kobj)
+#define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
 
 extern struct attribute * dev_default_attrs[];
 
@@ -41,12 +41,12 @@
 	ssize_t ret = 0;
 
 	if (dev_attr->show)
-		ret = dev_attr->show(dev,buf);
+		ret = dev_attr->show(dev, buf);
 	return ret;
 }
 
 static ssize_t
-dev_attr_store(struct kobject * kobj, struct attribute * attr, 
+dev_attr_store(struct kobject * kobj, struct attribute * attr,
 	       const char * buf, size_t count)
 {
 	struct device_attribute * dev_attr = to_dev_attr(attr);
@@ -54,7 +54,7 @@
 	ssize_t ret = 0;
 
 	if (dev_attr->store)
-		ret = dev_attr->store(dev,buf,count);
+		ret = dev_attr->store(dev, buf, count);
 	return ret;
 }
 
@@ -153,7 +153,7 @@
 {
 	int error = 0;
 	if (get_device(dev)) {
-		error = sysfs_create_file(&dev->kobj,&attr->attr);
+		error = sysfs_create_file(&dev->kobj, &attr->attr);
 		put_device(dev);
 	}
 	return error;
@@ -168,7 +168,7 @@
 void device_remove_file(struct device * dev, struct device_attribute * attr)
 {
 	if (get_device(dev)) {
-		sysfs_remove_file(&dev->kobj,&attr->attr);
+		sysfs_remove_file(&dev->kobj, &attr->attr);
 		put_device(dev);
 	}
 }
@@ -179,7 +179,7 @@
  *	@dev:	device.
  *
  *	This prepares the device for use by other layers,
- *	including adding it to the device hierarchy. 
+ *	including adding it to the device hierarchy.
  *	It is the first half of device_register(), if called by
  *	that, though it can also be called separately, so one
  *	may use @dev's fields (e.g. the refcount).
@@ -187,7 +187,7 @@
 
 void device_initialize(struct device *dev)
 {
-	kobj_set_kset_s(dev,devices_subsys);
+	kobj_set_kset_s(dev, devices_subsys);
 	kobject_init(&dev->kobj);
 	INIT_LIST_HEAD(&dev->node);
 	INIT_LIST_HEAD(&dev->children);
@@ -200,7 +200,7 @@
  *	device_add - add device to device hierarchy.
  *	@dev:	device.
  *
- *	This is part 2 of device_register(), though may be called 
+ *	This is part 2 of device_register(), though may be called
  *	separately _iff_ device_initialize() has been called separately.
  *
  *	This adds it to the kobject hierarchy via kobject_add(), adds it
@@ -221,7 +221,7 @@
 	pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id);
 
 	/* first, register with generic layer. */
-	kobject_set_name(&dev->kobj,dev->bus_id);
+	kobject_set_name(&dev->kobj, dev->bus_id);
 	if (parent)
 		dev->kobj.parent = &parent->kobj;
 
@@ -233,7 +233,7 @@
 		goto BusError;
 	down_write(&devices_subsys.rwsem);
 	if (parent)
-		list_add_tail(&dev->node,&parent->children);
+		list_add_tail(&dev->node, &parent->children);
 	up_write(&devices_subsys.rwsem);
 
 	/* notify platform of device entry */
@@ -245,7 +245,7 @@
  BusError:
 	device_pm_remove(dev);
  PMError:
-	kobject_unregister(&dev->kobj);
+	kobject_del(&dev->kobj);
  Error:
 	if (parent)
 		put_device(parent);
@@ -258,9 +258,9 @@
  *	@dev:	pointer to the device structure
  *
  *	This happens in two clean steps - initialize the device
- *	and add it to the system. The two steps can be called 
- *	separately, but this is the easiest and most common. 
- *	I.e. you should only call the two helpers separately if 
+ *	and add it to the system. The two steps can be called
+ *	separately, but this is the easiest and most common.
+ *	I.e. you should only call the two helpers separately if
  *	have a clearly defined need to use and refcount the device
  *	before it is added to the hierarchy.
  */
@@ -301,13 +301,13 @@
  *	device_del - delete device from system.
  *	@dev:	device.
  *
- *	This is the first part of the device unregistration 
+ *	This is the first part of the device unregistration
  *	sequence. This removes the device from the lists we control
- *	from here, has it removed from the other driver model 
+ *	from here, has it removed from the other driver model
  *	subsystems it was added to in device_add(), and removes it
  *	from the kobject hierarchy.
  *
- *	NOTE: this should be called manually _iff_ device_add() was 
+ *	NOTE: this should be called manually _iff_ device_add() was
  *	also called manually.
  */
 
@@ -340,7 +340,7 @@
  *	we remove it from all the subsystems with device_del(), then
  *	we decrement the reference count via put_device(). If that
  *	is the final reference count, the device will be cleaned up
- *	via device_release() above. Otherwise, the structure will 
+ *	via device_release() above. Otherwise, the structure will
  *	stick around until the final reference to the device is dropped.
  */
 void device_unregister(struct device * dev)
@@ -358,7 +358,7 @@
  *	@fn:	function to be called for each device.
  *
  *	Iterate over @dev's child devices, and call @fn for each,
- *	passing it @data. 
+ *	passing it @data.
  *
  *	We check the return of @fn each time. If it returns anything
  *	other than 0, we break out and return that value.
@@ -370,8 +370,8 @@
 	int error = 0;
 
 	down_read(&devices_subsys.rwsem);
-	list_for_each_entry(child,&dev->children,node) {
-		if((error = fn(child,data)))
+	list_for_each_entry(child, &dev->children, node) {
+		if((error = fn(child, data)))
 			break;
 	}
 	up_read(&devices_subsys.rwsem);
--- diff/drivers/base/cpu.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/cpu.c	2004-07-01 21:32:34.000000000 +0100
@@ -58,6 +58,8 @@
 
 /*
  * register_cpu - Setup a driverfs device for a CPU.
+ * @cpu - Callers can set the cpu->no_control field to 1, to indicate not to
+ *		  generate a control file in sysfs for this CPU.
  * @num - CPU number to use when creating the device.
  *
  * Initialize and register the CPU device.
@@ -75,7 +77,7 @@
 		error = sysfs_create_link(&root->sysdev.kobj,
 					  &cpu->sysdev.kobj,
 					  kobject_name(&cpu->sysdev.kobj));
-	if (!error)
+	if (!error && !cpu->no_control)
 		register_cpu_control(cpu);
 	return error;
 }
--- diff/drivers/base/driver.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/driver.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2002-3 Patrick Mochel
  * Copyright (c) 2002-3 Open Source Development Labs
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -15,8 +15,8 @@
 #include <linux/string.h>
 #include "base.h"
 
-#define to_dev(node) container_of(node,struct device,driver_list)
-#define to_drv(obj) container_of(obj,struct device_driver,kobj)
+#define to_dev(node) container_of(node, struct device, driver_list)
+#define to_drv(obj) container_of(obj, struct device_driver, kobj)
 
 /**
  *	driver_create_file - create sysfs file for driver.
@@ -28,7 +28,7 @@
 {
 	int error;
 	if (get_driver(drv)) {
-		error = sysfs_create_file(&drv->kobj,&attr->attr);
+		error = sysfs_create_file(&drv->kobj, &attr->attr);
 		put_driver(drv);
 	} else
 		error = -EINVAL;
@@ -45,7 +45,7 @@
 void driver_remove_file(struct device_driver * drv, struct driver_attribute * attr)
 {
 	if (get_driver(drv)) {
-		sysfs_remove_file(&drv->kobj,&attr->attr);
+		sysfs_remove_file(&drv->kobj, &attr->attr);
 		put_driver(drv);
 	}
 }
@@ -76,7 +76,7 @@
  *	@drv:	driver to register
  *
  *	We pass off most of the work to the bus_add_driver() call,
- *	since most of the things we have to do deal with the bus 
+ *	since most of the things we have to do deal with the bus
  *	structures.
  *
  *	The one interesting aspect is that we initialize @drv->unload_sem
@@ -99,8 +99,8 @@
  *
  *	Though, once that is done, we attempt to take @drv->unload_sem.
  *	This will block until the driver refcount reaches 0, and it is
- *	released. Only modular drivers will call this function, and we 
- *	have to guarantee that it won't complete, letting the driver 
+ *	released. Only modular drivers will call this function, and we
+ *	have to guarantee that it won't complete, letting the driver
  *	unload until all references are gone.
  */
 
@@ -111,10 +111,26 @@
 	up(&drv->unload_sem);
 }
 
+/**
+ *	driver_find - find driver on a given bus by its name.
+ *	@name:	name of the driver.
+ *	@bus:	bus to seatch for the driver
+ */
+
+struct device_driver *driver_find(const char *name, struct bus_type *bus)
+{
+	struct kobject *k = kset_find_obj(&bus->drivers, name);
+	if (k)
+		return to_drv(k);
+	return NULL;
+}
+
+
 EXPORT_SYMBOL(driver_register);
 EXPORT_SYMBOL(driver_unregister);
 EXPORT_SYMBOL(get_driver);
 EXPORT_SYMBOL(put_driver);
+EXPORT_SYMBOL(driver_find);
 
 EXPORT_SYMBOL(driver_create_file);
 EXPORT_SYMBOL(driver_remove_file);
--- diff/drivers/base/firmware.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/firmware.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2002-3 Patrick Mochel
  * Copyright (c) 2002-3 Open Source Development Labs
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -12,11 +12,11 @@
 #include <linux/module.h>
 #include <linux/init.h>
 
-static decl_subsys(firmware,NULL,NULL);
+static decl_subsys(firmware, NULL, NULL);
 
 int firmware_register(struct subsystem * s)
 {
-	kset_set_kset_s(s,firmware_subsys);
+	kset_set_kset_s(s, firmware_subsys);
 	return subsystem_register(s);
 }
 
--- diff/drivers/base/firmware_class.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/firmware_class.c	2004-07-01 21:32:34.000000000 +0100
@@ -68,7 +68,7 @@
  *	firmware will be provided.
  *
  *	Note: zero means 'wait for ever'
- *  
+ *
  **/
 static ssize_t
 firmware_timeout_store(struct class *class, const char *buf, size_t count)
@@ -121,7 +121,7 @@
 /**
  * firmware_loading_store: - loading control file
  * Description:
- *	The relevant values are: 
+ *	The relevant values are:
  *
  *	 1: Start a load, discarding any previous partial load.
  *	 0: Conclude the load and handle the data to the driver code.
@@ -376,7 +376,7 @@
 	return retval;
 }
 
-/** 
+/**
  * request_firmware: - request firmware to hotplug and wait for it
  * Description:
  *	@firmware will be used to return a firmware image by the name
@@ -457,7 +457,7 @@
 
 /**
  * register_firmware: - provide a firmware image for later usage
- * 
+ *
  * Description:
  *	Make sure that @data will be available by requesting firmware @name.
  *
@@ -541,7 +541,7 @@
 
 	ret = kernel_thread(request_firmware_work_func, fw_work,
 			    CLONE_FS | CLONE_FILES);
-	
+
 	if (ret < 0) {
 		fw_work->cont(NULL, fw_work->context);
 		return ret;
--- diff/drivers/base/init.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/init.c	2004-07-01 21:32:34.000000000 +0100
@@ -2,7 +2,7 @@
  *
  * Copyright (c) 2002-3 Patrick Mochel
  * Copyright (c) 2002-3 Open Source Development Labs
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -33,7 +33,7 @@
 	classes_init();
 	firmware_init();
 
-	/* These are also core pieces, but must come after the 
+	/* These are also core pieces, but must come after the
 	 * core core pieces.
 	 */
 	platform_bus_init();
--- diff/drivers/base/interface.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/interface.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,10 +1,10 @@
 /*
- * drivers/base/interface.c - common driverfs interface that's exported to 
+ * drivers/base/interface.c - common driverfs interface that's exported to
  * 	the world for all devices.
  *
  * Copyright (c) 2002-3 Patrick Mochel
  * Copyright (c) 2002-3 Open Source Development Labs
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -16,33 +16,33 @@
 
 /**
  *	detach_state - control the default power state for the device.
- *	
- *	This is the state the device enters when it's driver module is 
+ *
+ *	This is the state the device enters when it's driver module is
  *	unloaded. The value is an unsigned integer, in the range of 0-4.
  *	'0' indicates 'On', so no action will be taken when the driver is
  *	unloaded. This is the default behavior.
  *	'4' indicates 'Off', meaning the driver core will call the driver's
  *	shutdown method to quiesce the device.
- *	1-3 indicate a low-power state for the device to enter via the 
- *	driver's suspend method. 
+ *	1-3 indicate a low-power state for the device to enter via the
+ *	driver's suspend method.
  */
 
 static ssize_t detach_show(struct device * dev, char * buf)
 {
-	return sprintf(buf,"%u\n",dev->detach_state);
+	return sprintf(buf, "%u\n", dev->detach_state);
 }
 
 static ssize_t detach_store(struct device * dev, const char * buf, size_t n)
 {
 	u32 state;
-	state = simple_strtoul(buf,NULL,10);
+	state = simple_strtoul(buf, NULL, 10);
 	if (state > 4)
 		return -EINVAL;
 	dev->detach_state = state;
 	return n;
 }
 
-static DEVICE_ATTR(detach_state,0644,detach_show,detach_store);
+static DEVICE_ATTR(detach_state, 0644, detach_show, detach_store);
 
 
 struct attribute * dev_default_attrs[] = {
--- diff/drivers/base/node.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/base/node.c	2004-07-01 21:32:34.000000000 +0100
@@ -7,6 +7,7 @@
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/node.h>
+#include <linux/hugetlb.h>
 #include <linux/cpumask.h>
 #include <linux/topology.h>
 
@@ -29,13 +30,7 @@
 	return len;
 }
 
-static SYSDEV_ATTR(cpumap,S_IRUGO,node_read_cpumap,NULL);
-
-/* Can be overwritten by architecture specific code. */
-int __attribute__((weak)) hugetlb_report_node_meminfo(int node, char *buf)
-{
-	return 0;
-}
+static SYSDEV_ATTR(cpumap, S_IRUGO, node_read_cpumap, NULL);
 
 #define K(x) ((x) << (PAGE_SHIFT - 10))
 static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
@@ -54,17 +49,17 @@
 		       "Node %d LowFree:      %8lu kB\n",
 		       nid, K(i.totalram),
 		       nid, K(i.freeram),
-		       nid, K(i.totalram-i.freeram),
+		       nid, K(i.totalram - i.freeram),
 		       nid, K(i.totalhigh),
 		       nid, K(i.freehigh),
-		       nid, K(i.totalram-i.totalhigh),
-		       nid, K(i.freeram-i.freehigh));
+		       nid, K(i.totalram - i.totalhigh),
+		       nid, K(i.freeram - i.freehigh));
 	n += hugetlb_report_node_meminfo(nid, buf + n);
 	return n;
 }
 
-#undef K 
-static SYSDEV_ATTR(meminfo,S_IRUGO,node_read_meminfo,NULL);
+#undef K
+static SYSDEV_ATTR(meminfo, S_IRUGO, node_read_meminfo, NULL);
 
 static ssize_t node_read_numastat(struct sys_device * dev, char * buf)
 {
@@ -104,7 +99,7 @@
 		       local_node,
 		       other_node);
 }
-static SYSDEV_ATTR(numastat,S_IRUGO,node_read_numastat,NULL);
+static SYSDEV_ATTR(numastat, S_IRUGO, node_read_numastat, NULL);
 
 /*
  * register_node - Setup a driverfs device for a node.
--- diff/drivers/base/platform.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/base/platform.c	2004-07-01 21:32:34.000000000 +0100
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2002-3 Patrick Mochel
  * Copyright (c) 2002-3 Open Source Development Labs
- * 
+ *
  * This file is released under the GPLv2
  *
  * Please see Documentation/driver-model/platform.txt for more
@@ -13,18 +13,78 @@
 #include <linux/device.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/err.h>
 
 struct device platform_bus = {
 	.bus_id		= "platform",
 };
 
 /**
+ *	platform_get_resource - get a resource for a device
+ *	@dev: platform device
+ *	@type: resource type
+ *	@num: resource index
+ */
+struct resource *
+platform_get_resource(struct platform_device *dev, unsigned int type,
+		      unsigned int num)
+{
+	int i;
+
+	for (i = 0; i < dev->num_resources; i++) {
+		struct resource *r = &dev->resource[i];
+
+		if ((r->flags & (IORESOURCE_IO|IORESOURCE_MEM|
+				 IORESOURCE_IRQ|IORESOURCE_DMA))
+		    == type)
+			if (num-- == 0)
+				return r;
+	}
+	return NULL;
+}
+
+/**
+ *	platform_get_irq - get an IRQ for a device
+ *	@dev: platform device
+ *	@num: IRQ number index
+ */
+int platform_get_irq(struct platform_device *dev, unsigned int num)
+{
+	struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num);
+
+	return r ? r->start : 0;
+}
+
+/**
+ *	platform_add_devices - add a numbers of platform devices
+ *	@devs: array of platform devices to add
+ *	@num: number of platform devices in array
+ */
+int platform_add_devices(struct platform_device **devs, int num)
+{
+	int i, ret = 0;
+
+	for (i = 0; i < num; i++) {
+		ret = platform_device_register(devs[i]);
+		if (ret) {
+			while (--i >= 0)
+				platform_device_unregister(devs[i]);
+			break;
+		}
+	}
+
+	return ret;
+}
+
+/**
  *	platform_device_register - add a platform-level device
  *	@dev:	platform device we're adding
  *
  */
 int platform_device_register(struct platform_device * pdev)
 {
+	int i, ret = 0;
+
 	if (!pdev)
 		return -EINVAL;
 
@@ -32,18 +92,125 @@
 		pdev->dev.parent = &platform_bus;
 
 	pdev->dev.bus = &platform_bus_type;
-	
-	snprintf(pdev->dev.bus_id,BUS_ID_SIZE,"%s%u",pdev->name,pdev->id);
+
+	if (pdev->id != -1)
+		snprintf(pdev->dev.bus_id, BUS_ID_SIZE, "%s%u", pdev->name, pdev->id);
+	else
+		strlcpy(pdev->dev.bus_id, pdev->name, BUS_ID_SIZE);
+
+	for (i = 0; i < pdev->num_resources; i++) {
+		struct resource *p, *r = &pdev->resource[i];
+
+		r->name = pdev->dev.bus_id;
+
+		p = NULL;
+		if (r->flags & IORESOURCE_MEM)
+			p = &iomem_resource;
+		else if (r->flags & IORESOURCE_IO)
+			p = &ioport_resource;
+
+		if (p && request_resource(p, r)) {
+			printk(KERN_ERR
+			       "%s: failed to claim resource %d\n",
+			       pdev->dev.bus_id, i);
+			ret = -EBUSY;
+			goto failed;
+		}
+	}
 
 	pr_debug("Registering platform device '%s'. Parent at %s\n",
-		 pdev->dev.bus_id,pdev->dev.parent->bus_id);
-	return device_register(&pdev->dev);
+		 pdev->dev.bus_id, pdev->dev.parent->bus_id);
+
+	ret = device_register(&pdev->dev);
+	if (ret == 0)
+		return ret;
+
+ failed:
+	while (--i >= 0)
+		if (pdev->resource[i].flags & (IORESOURCE_MEM|IORESOURCE_IO))
+			release_resource(&pdev->resource[i]);
+	return ret;
 }
 
+/**
+ *	platform_device_unregister - remove a platform-level device
+ *	@dev:	platform device we're removing
+ *
+ *	Note that this function will also release all memory- and port-based
+ *	resources owned by the device (@dev->resource).
+ */
 void platform_device_unregister(struct platform_device * pdev)
 {
-	if (pdev)
+	int i;
+
+	if (pdev) {
 		device_unregister(&pdev->dev);
+
+		for (i = 0; i < pdev->num_resources; i++) {
+			struct resource *r = &pdev->resource[i];
+			if (r->flags & (IORESOURCE_MEM|IORESOURCE_IO))
+				release_resource(r);
+		}
+	}
+}
+
+struct platform_object {
+        struct platform_device pdev;
+        struct resource resources[0];
+};
+
+static void platform_device_release_simple(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+
+	kfree(container_of(pdev, struct platform_object, pdev));
+}
+
+/**
+ *	platform_device_register_simple
+ *	@name:  base name of the device we're adding
+ *	@id:    instance id
+ *	@res:   set of resources that needs to be allocated for the device
+ *	@num:	number of resources
+ *
+ *	This function creates a simple platform device that requires minimal
+ *	resource and memory management. Canned release function freeing
+ *	memory allocated for the device allows drivers using such devices
+ *	to be unloaded iwithout waiting for the last reference to the device
+ *	to be dropped.
+ */
+struct platform_device *platform_device_register_simple(char *name, unsigned int id,
+							struct resource *res, unsigned int num)
+{
+	struct platform_object *pobj;
+	int retval;
+
+	pobj = kmalloc(sizeof(struct platform_object) + sizeof(struct resource) * num, GFP_KERNEL);
+	if (!pobj) {
+		retval = -ENOMEM;
+		goto error;
+	}
+
+	memset(pobj, 0, sizeof(*pobj));
+	pobj->pdev.name = name;
+	pobj->pdev.id = id;
+	pobj->pdev.dev.release = platform_device_release_simple;
+
+	if (num) {
+		memcpy(pobj->resources, res, sizeof(struct resource) * num);
+		pobj->pdev.resource = pobj->resources;
+		pobj->pdev.num_resources = num;
+	}
+
+	retval = platform_device_register(&pobj->pdev);
+	if (retval)
+		goto error;
+
+	return &pobj->pdev;
+
+error:
+	kfree(pobj);
+	return ERR_PTR(retval);
 }
 
 
@@ -52,13 +219,13 @@
  *	@dev:	device.
  *	@drv:	driver.
  *
- *	Platform device IDs are assumed to be encoded like this: 
- *	"<name><instance>", where <name> is a short description of the 
- *	type of device, like "pci" or "floppy", and <instance> is the 
+ *	Platform device IDs are assumed to be encoded like this:
+ *	"<name><instance>", where <name> is a short description of the
+ *	type of device, like "pci" or "floppy", and <instance> is the
  *	enumerated instance of the device, like '0' or '42'.
- *	Driver IDs are simply "<name>". 
- *	So, extract the <name> from the platform_device structure, 
- *	and compare it against the name of the driver. Return whether 
+ *	Driver IDs are simply "<name>".
+ *	So, extract the <name> from the platform_device structure,
+ *	and compare it against the name of the driver. Return whether
  *	they match or not.
  */
 
@@ -113,4 +280,7 @@
 EXPORT_SYMBOL(platform_bus);
 EXPORT_SYMBOL(platform_bus_type);
 EXPORT_SYMBOL(platform_device_register);
+EXPORT_SYMBOL(platform_device_register_simple);
 EXPORT_SYMBOL(platform_device_unregister);
+EXPORT_SYMBOL(platform_get_irq);
+EXPORT_SYMBOL(platform_get_resource);
--- diff/drivers/base/power/main.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/power/main.c	2004-07-01 21:32:34.000000000 +0100
@@ -12,10 +12,10 @@
  * and add it to the list of power-controlled devices. sysfs entries for
  * controlling device power management will also be added.
  *
- * A different set of lists than the global subsystem list are used to 
- * keep track of power info because we use different lists to hold 
- * devices based on what stage of the power management process they 
- * are in. The power domain dependencies may also differ from the 
+ * A different set of lists than the global subsystem list are used to
+ * keep track of power info because we use different lists to hold
+ * devices based on what stage of the power management process they
+ * are in. The power domain dependencies may also differ from the
  * ancestral dependencies that the subsystem list maintains.
  */
 
@@ -74,10 +74,10 @@
 
 	pr_debug("PM: Adding info for %s:%s\n",
 		 dev->bus ? dev->bus->name : "No Bus", dev->kobj.name);
-	atomic_set(&dev->power.pm_users,0);
+	atomic_set(&dev->power.pm_users, 0);
 	down(&dpm_sem);
-	list_add_tail(&dev->power.entry,&dpm_active);
-	device_pm_set_parent(dev,dev->parent);
+	list_add_tail(&dev->power.entry, &dpm_active);
+	device_pm_set_parent(dev, dev->parent);
 	if ((error = dpm_sysfs_add(dev)))
 		list_del(&dev->power.entry);
 	up(&dpm_sem);
--- diff/drivers/base/power/power.h	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/power/power.h	2004-07-01 21:32:34.000000000 +0100
@@ -27,7 +27,7 @@
  */
 extern struct semaphore dpm_sem;
 
-/* 
+/*
  * The PM lists.
  */
 extern struct list_head dpm_active;
@@ -37,12 +37,12 @@
 
 static inline struct dev_pm_info * to_pm_info(struct list_head * entry)
 {
-	return container_of(entry,struct dev_pm_info,entry);
+	return container_of(entry, struct dev_pm_info, entry);
 }
 
 static inline struct device * to_device(struct list_head * entry)
 {
-	return container_of(to_pm_info(entry),struct device,power);
+	return container_of(to_pm_info(entry), struct device, power);
 }
 
 extern int device_pm_add(struct device *);
@@ -56,7 +56,7 @@
 extern void dpm_sysfs_remove(struct device *);
 
 /*
- * resume.c 
+ * resume.c
  */
 
 extern void dpm_resume(void);
--- diff/drivers/base/power/resume.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/base/power/resume.c	2004-07-01 21:32:34.000000000 +0100
@@ -39,7 +39,7 @@
 		if (!dev->power.prev_state)
 			resume_device(dev);
 
-		list_add_tail(entry,&dpm_active);
+		list_add_tail(entry, &dpm_active);
 	}
 }
 
@@ -48,7 +48,7 @@
  *	device_resume - Restore state of each device in system.
  *
  *	Walk the dpm_off list, remove each entry, resume the device,
- *	then add it to the dpm_active list. 
+ *	then add it to the dpm_active list.
  */
 
 void device_resume(void)
@@ -62,14 +62,14 @@
 
 
 /**
- *	device_power_up_irq - Power on some devices. 
+ *	device_power_up_irq - Power on some devices.
  *
- *	Walk the dpm_off_irq list and power each device up. This 
+ *	Walk the dpm_off_irq list and power each device up. This
  *	is used for devices that required they be powered down with
  *	interrupts disabled. As devices are powered on, they are moved to
  *	the dpm_suspended list.
  *
- *	Interrupts must be disabled when calling this. 
+ *	Interrupts must be disabled when calling this.
  */
 
 void dpm_power_up(void)
@@ -78,7 +78,7 @@
 		struct list_head * entry = dpm_off_irq.next;
 		list_del_init(entry);
 		resume_device(to_device(entry));
-		list_add_tail(entry,&dpm_active);
+		list_add_tail(entry, &dpm_active);
 	}
 }
 
--- diff/drivers/base/power/runtime.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/base/power/runtime.c	2004-07-01 21:32:34.000000000 +0100
@@ -24,9 +24,9 @@
  *	dpm_runtime_resume - Power one device back on.
  *	@dev:	Device.
  *
- *	Bring one device back to the on state by first powering it 
+ *	Bring one device back to the on state by first powering it
  *	on, then restoring state. We only operate on devices that aren't
- *	already on. 
+ *	already on.
  *	FIXME: We need to handle devices that are in an unknown state.
  */
 
@@ -55,7 +55,7 @@
 	if (dev->power.power_state)
 		runtime_resume(dev);
 
-	if (!(error = suspend_device(dev,state)))
+	if (!(error = suspend_device(dev, state)))
 		dev->power.power_state = state;
  Done:
 	up(&dpm_sem);
@@ -70,7 +70,7 @@
  *
  *	This is an update mechanism for drivers to notify the core
  *	what power state a device is in. Device probing code may not
- *	always be able to tell, but we need accurate information to 
+ *	always be able to tell, but we need accurate information to
  *	work reliably.
  */
 void dpm_set_power_state(struct device * dev, u32 state)
--- diff/drivers/base/power/shutdown.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/base/power/shutdown.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,9 +1,9 @@
 /*
  * shutdown.c - power management functions for the device tree.
- * 
+ *
  * Copyright (c) 2002-3 Patrick Mochel
  *		 2002-3 Open Source Development Lab
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -14,7 +14,7 @@
 
 #include "power.h"
 
-#define to_dev(node) container_of(node,struct device,kobj.entry)
+#define to_dev(node) container_of(node, struct device, kobj.entry)
 
 extern struct subsystem devices_subsys;
 
@@ -29,7 +29,7 @@
 			dev->driver->shutdown(dev);
 		return 0;
 	}
-	return dpm_runtime_suspend(dev,dev->detach_state);
+	return dpm_runtime_suspend(dev, dev->detach_state);
 }
 
 
@@ -38,8 +38,8 @@
  * down last and resume them first. That way, we don't do anything stupid like
  * shutting down the interrupt controller before any devices..
  *
- * Note that there are not different stages for power management calls - 
- * they only get one called once when interrupts are disabled. 
+ * Note that there are not different stages for power management calls -
+ * they only get one called once when interrupts are disabled.
  */
 
 extern int sysdev_shutdown(void);
@@ -50,10 +50,10 @@
 void device_shutdown(void)
 {
 	struct device * dev;
-	
+
 	down_write(&devices_subsys.rwsem);
-	list_for_each_entry_reverse(dev,&devices_subsys.kset.list,kobj.entry) {
-		pr_debug("shutting down %s: ",dev->bus_id);
+	list_for_each_entry_reverse(dev, &devices_subsys.kset.list, kobj.entry) {
+		pr_debug("shutting down %s: ", dev->bus_id);
 		if (dev->driver && dev->driver->shutdown) {
 			pr_debug("Ok\n");
 			dev->driver->shutdown(dev);
--- diff/drivers/base/power/suspend.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/base/power/suspend.c	2004-07-01 21:32:34.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * suspend.c - Functions for putting devices to sleep. 
+ * suspend.c - Functions for putting devices to sleep.
  *
  * Copyright (c) 2003 Patrick Mochel
  * Copyright (c) 2003 Open Source Development Labs
@@ -10,18 +10,18 @@
 
 #include <linux/device.h>
 #include "power.h"
- 
+
 extern int sysdev_suspend(u32 state);
 
 /*
  * The entries in the dpm_active list are in a depth first order, simply
- * because children are guaranteed to be discovered after parents, and 
- * are inserted at the back of the list on discovery. 
- * 
+ * because children are guaranteed to be discovered after parents, and
+ * are inserted at the back of the list on discovery.
+ *
  * All list on the suspend path are done in reverse order, so we operate
  * on the leaves of the device tree (or forests, depending on how you want
- * to look at it ;) first. As nodes are removed from the back of the list, 
- * they are inserted into the front of their destintation lists. 
+ * to look at it ;) first. As nodes are removed from the back of the list,
+ * they are inserted into the front of their destintation lists.
  *
  * Things are the reverse on the resume path - iterations are done in
  * forward order, and nodes are inserted at the back of their destination
@@ -44,7 +44,7 @@
 	dev->power.prev_state = dev->power.power_state;
 
 	if (dev->bus && dev->bus->suspend && !dev->power.power_state)
-		error = dev->bus->suspend(dev,state);
+		error = dev->bus->suspend(dev, state);
 
 	return error;
 }
@@ -52,16 +52,16 @@
 
 /**
  *	device_suspend - Save state and stop all devices in system.
- *	@state:		Power state to put each device in. 
+ *	@state:		Power state to put each device in.
  *
  *	Walk the dpm_active list, call ->suspend() for each device, and move
- *	it to dpm_off. 
+ *	it to dpm_off.
  *	Check the return value for each. If it returns 0, then we move the
- *	the device to the dpm_off list. If it returns -EAGAIN, we move it to 
- *	the dpm_off_irq list. If we get a different error, try and back out. 
+ *	the device to the dpm_off list. If it returns -EAGAIN, we move it to
+ *	the dpm_off_irq list. If we get a different error, try and back out.
  *
  *	If we hit a failure with any of the devices, call device_resume()
- *	above to bring the suspended devices back to life. 
+ *	above to bring the suspended devices back to life.
  *
  *	Note this function leaves dpm_sem held to
  *	a) block other devices from registering.
@@ -78,14 +78,14 @@
 	while(!list_empty(&dpm_active)) {
 		struct list_head * entry = dpm_active.prev;
 		struct device * dev = to_device(entry);
-		error = suspend_device(dev,state);
+		error = suspend_device(dev, state);
 
 		if (!error) {
 			list_del(&dev->power.entry);
-			list_add(&dev->power.entry,&dpm_off);
+			list_add(&dev->power.entry, &dpm_off);
 		} else if (error == -EAGAIN) {
 			list_del(&dev->power.entry);
-			list_add(&dev->power.entry,&dpm_off_irq);
+			list_add(&dev->power.entry, &dpm_off_irq);
 		} else {
 			printk(KERN_ERR "Could not suspend device %s: "
 				"error %d\n", kobject_name(&dev->kobj), error);
@@ -108,8 +108,8 @@
  *	@state:		Power state to enter.
  *
  *	Walk the dpm_off_irq list, calling ->power_down() for each device that
- *	couldn't power down the device with interrupts enabled. When we're 
- *	done, power down system devices. 
+ *	couldn't power down the device with interrupts enabled. When we're
+ *	done, power down system devices.
  */
 
 int device_power_down(u32 state)
@@ -117,10 +117,10 @@
 	int error = 0;
 	struct device * dev;
 
-	list_for_each_entry_reverse(dev,&dpm_off_irq,power.entry) {
-		if ((error = suspend_device(dev,state)))
+	list_for_each_entry_reverse(dev, &dpm_off_irq, power.entry) {
+		if ((error = suspend_device(dev, state)))
 			break;
-	} 
+	}
 	if (error)
 		goto Error;
 	if ((error = sysdev_suspend(state)))
--- diff/drivers/base/power/sysfs.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/base/power/sysfs.c	2004-07-01 21:32:34.000000000 +0100
@@ -11,10 +11,10 @@
  *
  *	show() returns the current power state of the device. '0' indicates
  *	the device is on. Other values (1-3) indicate the device is in a low
- *	power state. 
+ *	power state.
  *
- *	store() sets the current power state, which is an integer value 
- *	between 0-3. If the device is on ('0'), and the value written is 
+ *	store() sets the current power state, which is an integer value
+ *	between 0-3. If the device is on ('0'), and the value written is
  *	greater than 0, then the device is placed directly into the low-power
  *	state (via its driver's ->suspend() method).
  *	If the device is currently in a low-power state, and the value is 0,
@@ -26,7 +26,7 @@
 
 static ssize_t state_show(struct device * dev, char * buf)
 {
-	return sprintf(buf,"%u\n",dev->power.power_state);
+	return sprintf(buf, "%u\n", dev->power.power_state);
 }
 
 static ssize_t state_store(struct device * dev, const char * buf, size_t n)
@@ -35,17 +35,17 @@
 	char * rest;
 	int error = 0;
 
-	state = simple_strtoul(buf,&rest,10);
+	state = simple_strtoul(buf, &rest, 10);
 	if (*rest)
 		return -EINVAL;
 	if (state)
-		error = dpm_runtime_suspend(dev,state);
+		error = dpm_runtime_suspend(dev, state);
 	else
 		dpm_runtime_resume(dev);
 	return error ? error : n;
 }
 
-static DEVICE_ATTR(state,0644,state_show,state_store);
+static DEVICE_ATTR(state, 0644, state_show, state_store);
 
 
 static struct attribute * power_attrs[] = {
@@ -59,10 +59,10 @@
 
 int dpm_sysfs_add(struct device * dev)
 {
-	return sysfs_create_group(&dev->kobj,&pm_attr_group);
+	return sysfs_create_group(&dev->kobj, &pm_attr_group);
 }
 
 void dpm_sysfs_remove(struct device * dev)
 {
-	sysfs_remove_group(&dev->kobj,&pm_attr_group);
+	sysfs_remove_group(&dev->kobj, &pm_attr_group);
 }
--- diff/drivers/base/sys.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/base/sys.c	2004-07-01 21:32:34.000000000 +0100
@@ -5,8 +5,8 @@
  *               2002-3 Open Source Development Lab
  *
  * This file is released under the GPLv2
- * 
- * This exports a 'system' bus type. 
+ *
+ * This exports a 'system' bus type.
  * By default, a 'sys' bus gets added to the root of the system. There will
  * always be core system devices. Devices can use sysdev_register() to
  * add themselves as children of the system bus.
@@ -24,31 +24,31 @@
 
 extern struct subsystem devices_subsys;
 
-#define to_sysdev(k) container_of(k,struct sys_device,kobj)
-#define to_sysdev_attr(a) container_of(a,struct sysdev_attribute,attr)
+#define to_sysdev(k) container_of(k, struct sys_device, kobj)
+#define to_sysdev_attr(a) container_of(a, struct sysdev_attribute, attr)
 
 
-static ssize_t 
+static ssize_t
 sysdev_show(struct kobject * kobj, struct attribute * attr, char * buffer)
 {
 	struct sys_device * sysdev = to_sysdev(kobj);
 	struct sysdev_attribute * sysdev_attr = to_sysdev_attr(attr);
 
 	if (sysdev_attr->show)
-		return sysdev_attr->show(sysdev,buffer);
+		return sysdev_attr->show(sysdev, buffer);
 	return 0;
 }
 
 
 static ssize_t
-sysdev_store(struct kobject * kobj, struct attribute * attr, 
+sysdev_store(struct kobject * kobj, struct attribute * attr,
 	     const char * buffer, size_t count)
 {
 	struct sys_device * sysdev = to_sysdev(kobj);
 	struct sysdev_attribute * sysdev_attr = to_sysdev_attr(attr);
 
 	if (sysdev_attr->store)
-		return sysdev_attr->store(sysdev,buffer,count);
+		return sysdev_attr->store(sysdev, buffer, count);
 	return 0;
 }
 
@@ -64,22 +64,22 @@
 
 int sysdev_create_file(struct sys_device * s, struct sysdev_attribute * a)
 {
-	return sysfs_create_file(&s->kobj,&a->attr);
+	return sysfs_create_file(&s->kobj, &a->attr);
 }
 
 
 void sysdev_remove_file(struct sys_device * s, struct sysdev_attribute * a)
 {
-	sysfs_remove_file(&s->kobj,&a->attr);
+	sysfs_remove_file(&s->kobj, &a->attr);
 }
 
 EXPORT_SYMBOL(sysdev_create_file);
 EXPORT_SYMBOL(sysdev_remove_file);
 
-/* 
- * declare system_subsys 
+/*
+ * declare system_subsys
  */
-decl_subsys(system,&ktype_sysdev,NULL);
+decl_subsys(system, &ktype_sysdev, NULL);
 
 int sysdev_class_register(struct sysdev_class * cls)
 {
@@ -87,7 +87,7 @@
 		 kobject_name(&cls->kset.kobj));
 	INIT_LIST_HEAD(&cls->drivers);
 	cls->kset.subsys = &system_subsys;
-	kset_set_kset_s(cls,system_subsys);
+	kset_set_kset_s(cls, system_subsys);
 	return kset_register(&cls->kset);
 }
 
@@ -109,19 +109,19 @@
  * 	@cls:	Device class driver belongs to.
  *	@drv:	Driver.
  *
- *	If @cls is valid, then @drv is inserted into @cls->drivers to be 
+ *	If @cls is valid, then @drv is inserted into @cls->drivers to be
  *	called on each operation on devices of that class. The refcount
- *	of @cls is incremented. 
- *	Otherwise, @drv is inserted into global_drivers, and called for 
+ *	of @cls is incremented.
+ *	Otherwise, @drv is inserted into global_drivers, and called for
  *	each device.
  */
 
-int sysdev_driver_register(struct sysdev_class * cls, 
+int sysdev_driver_register(struct sysdev_class * cls,
 			   struct sysdev_driver * drv)
 {
 	down_write(&system_subsys.rwsem);
 	if (cls && kset_get(&cls->kset)) {
-		list_add_tail(&drv->entry,&cls->drivers);
+		list_add_tail(&drv->entry, &cls->drivers);
 
 		/* If devices of this class already exist, tell the driver */
 		if (drv->add) {
@@ -130,7 +130,7 @@
 				drv->add(dev);
 		}
 	} else
-		list_add_tail(&drv->entry,&global_drivers);
+		list_add_tail(&drv->entry, &global_drivers);
 	up_write(&system_subsys.rwsem);
 	return 0;
 }
@@ -180,12 +180,12 @@
 
 	/* But make sure we point to the right type for sysfs translation */
 	sysdev->kobj.ktype = &ktype_sysdev;
-	error = kobject_set_name(&sysdev->kobj,"%s%d",
-			 kobject_name(&cls->kset.kobj),sysdev->id);
+	error = kobject_set_name(&sysdev->kobj, "%s%d",
+			 kobject_name(&cls->kset.kobj), sysdev->id);
 	if (error)
 		return error;
 
-	pr_debug("Registering sys device '%s'\n",kobject_name(&sysdev->kobj));
+	pr_debug("Registering sys device '%s'\n", kobject_name(&sysdev->kobj));
 
 	/* Register the object */
 	error = kobject_register(&sysdev->kobj);
@@ -194,18 +194,18 @@
 		struct sysdev_driver * drv;
 
 		down_write(&system_subsys.rwsem);
-		/* Generic notification is implicit, because it's that 
-		 * code that should have called us. 
+		/* Generic notification is implicit, because it's that
+		 * code that should have called us.
 		 */
 
 		/* Notify global drivers */
-		list_for_each_entry(drv,&global_drivers,entry) {
+		list_for_each_entry(drv, &global_drivers, entry) {
 			if (drv->add)
 				drv->add(sysdev);
 		}
 
 		/* Notify class auxillary drivers */
-		list_for_each_entry(drv,&cls->drivers,entry) {
+		list_for_each_entry(drv, &cls->drivers, entry) {
 			if (drv->add)
 				drv->add(sysdev);
 		}
@@ -219,12 +219,12 @@
 	struct sysdev_driver * drv;
 
 	down_write(&system_subsys.rwsem);
-	list_for_each_entry(drv,&global_drivers,entry) {
+	list_for_each_entry(drv, &global_drivers, entry) {
 		if (drv->remove)
 			drv->remove(sysdev);
 	}
 
-	list_for_each_entry(drv,&sysdev->cls->drivers,entry) {
+	list_for_each_entry(drv, &sysdev->cls->drivers, entry) {
 		if (drv->remove)
 			drv->remove(sysdev);
 	}
@@ -241,12 +241,12 @@
  *	Loop over each class of system devices, and the devices in each
  *	of those classes. For each device, we call the shutdown method for
  *	each driver registered for the device - the globals, the auxillaries,
- *	and the class driver. 
+ *	and the class driver.
  *
  *	Note: The list is iterated in reverse order, so that we shut down
  *	child devices before we shut down thier parents. The list ordering
  *	is guaranteed by virtue of the fact that child devices are registered
- *	after their parents. 
+ *	after their parents.
  */
 
 void sysdev_shutdown(void)
@@ -256,25 +256,25 @@
 	pr_debug("Shutting Down System Devices\n");
 
 	down_write(&system_subsys.rwsem);
-	list_for_each_entry_reverse(cls,&system_subsys.kset.list,
+	list_for_each_entry_reverse(cls, &system_subsys.kset.list,
 				    kset.kobj.entry) {
 		struct sys_device * sysdev;
 
 		pr_debug("Shutting down type '%s':\n",
 			 kobject_name(&cls->kset.kobj));
 
-		list_for_each_entry(sysdev,&cls->kset.list,kobj.entry) {
+		list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) {
 			struct sysdev_driver * drv;
-			pr_debug(" %s\n",kobject_name(&sysdev->kobj));
+			pr_debug(" %s\n", kobject_name(&sysdev->kobj));
 
 			/* Call global drivers first. */
-			list_for_each_entry(drv,&global_drivers,entry) {
+			list_for_each_entry(drv, &global_drivers, entry) {
 				if (drv->shutdown)
 					drv->shutdown(sysdev);
 			}
 
 			/* Call auxillary drivers next. */
-			list_for_each_entry(drv,&cls->drivers,entry) {
+			list_for_each_entry(drv, &cls->drivers, entry) {
 				if (drv->shutdown)
 					drv->shutdown(sysdev);
 			}
@@ -295,7 +295,7 @@
  *	We perform an almost identical operation as sys_device_shutdown()
  *	above, though calling ->suspend() instead. Interrupts are disabled
  *	when this called. Devices are responsible for both saving state and
- *	quiescing or powering down the device. 
+ *	quiescing or powering down the device.
  *
  *	This is only called by the device PM core, so we let them handle
  *	all synchronization.
@@ -307,32 +307,32 @@
 
 	pr_debug("Suspending System Devices\n");
 
-	list_for_each_entry_reverse(cls,&system_subsys.kset.list,
+	list_for_each_entry_reverse(cls, &system_subsys.kset.list,
 				    kset.kobj.entry) {
 		struct sys_device * sysdev;
 
 		pr_debug("Suspending type '%s':\n",
 			 kobject_name(&cls->kset.kobj));
 
-		list_for_each_entry(sysdev,&cls->kset.list,kobj.entry) {
+		list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) {
 			struct sysdev_driver * drv;
-			pr_debug(" %s\n",kobject_name(&sysdev->kobj));
+			pr_debug(" %s\n", kobject_name(&sysdev->kobj));
 
 			/* Call global drivers first. */
-			list_for_each_entry(drv,&global_drivers,entry) {
+			list_for_each_entry(drv, &global_drivers, entry) {
 				if (drv->suspend)
-					drv->suspend(sysdev,state);
+					drv->suspend(sysdev, state);
 			}
 
 			/* Call auxillary drivers next. */
-			list_for_each_entry(drv,&cls->drivers,entry) {
+			list_for_each_entry(drv, &cls->drivers, entry) {
 				if (drv->suspend)
-					drv->suspend(sysdev,state);
+					drv->suspend(sysdev, state);
 			}
 
 			/* Now call the generic one */
 			if (cls->suspend)
-				cls->suspend(sysdev,state);
+				cls->suspend(sysdev, state);
 		}
 	}
 	return 0;
@@ -345,7 +345,7 @@
  *	Similar to sys_device_suspend(), but we iterate the list forwards
  *	to guarantee that parent devices are resumed before their children.
  *
- *	Note: Interrupts are disabled when called. 
+ *	Note: Interrupts are disabled when called.
  */
 
 int sysdev_resume(void)
@@ -354,28 +354,28 @@
 
 	pr_debug("Resuming System Devices\n");
 
-	list_for_each_entry(cls,&system_subsys.kset.list,kset.kobj.entry) {
+	list_for_each_entry(cls, &system_subsys.kset.list, kset.kobj.entry) {
 		struct sys_device * sysdev;
 
 		pr_debug("Resuming type '%s':\n",
 			 kobject_name(&cls->kset.kobj));
 
-		list_for_each_entry(sysdev,&cls->kset.list,kobj.entry) {
+		list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) {
 			struct sysdev_driver * drv;
-			pr_debug(" %s\n",kobject_name(&sysdev->kobj));
+			pr_debug(" %s\n", kobject_name(&sysdev->kobj));
 
 			/* First, call the class-specific one */
 			if (cls->resume)
 				cls->resume(sysdev);
 
 			/* Call auxillary drivers next. */
-			list_for_each_entry(drv,&cls->drivers,entry) {
+			list_for_each_entry(drv, &cls->drivers, entry) {
 				if (drv->resume)
 					drv->resume(sysdev);
 			}
 
 			/* Call global drivers. */
-			list_for_each_entry(drv,&global_drivers,entry) {
+			list_for_each_entry(drv, &global_drivers, entry) {
 				if (drv->resume)
 					drv->resume(sysdev);
 			}
--- diff/drivers/block/Kconfig	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/block/Kconfig	2004-07-01 21:32:34.000000000 +0100
@@ -6,7 +6,7 @@
 
 config BLK_DEV_FD
 	tristate "Normal floppy disk support"
-	depends on (!X86_PC9800 && !ARCH_S390 && !M68K && !IA64) || Q40 || (SUN3X && BROKEN)
+	depends on (!ARCH_S390 && !M68K && !IA64) || Q40 || (SUN3X && BROKEN)
 	---help---
 	  If you want to use the floppy disk drive(s) of your PC under Linux,
 	  say Y. Information about this driver, especially important for IBM
@@ -26,13 +26,6 @@
 	tristate "Atari floppy support"
 	depends on ATARI
 
-config BLK_DEV_FD98
-	tristate "NEC PC-9800 floppy disk support"
-	depends on X86_PC9800
-	---help---
-	  If you want to use the floppy disk drive(s) of NEC PC-9801/PC-9821,
-	  say Y.
-
 config BLK_DEV_SWIM_IOP
 	bool "Macintosh IIfx/Quadra 900/Quadra 950 floppy support (EXPERIMENTAL)"
 	depends on MAC && EXPERIMENTAL && BROKEN
@@ -292,14 +285,14 @@
 
 	  If unsure, say N.
 
-config BLK_DEV_CARMEL
-	tristate "Promise SATA SX8 (carmel) support"
+config BLK_DEV_SX8
+	tristate "Promise SATA SX8 support"
 	depends on PCI
 	---help---
 	  Saying Y or M here will enable support for the 
-	  Promise SATA SX8 ("carmel") controllers.
+	  Promise SATA SX8 controllers.
 
-	  Use devices /dev/carmel/$N and /dev/carmel/$Np$M.
+	  Use devices /dev/sx8/$N and /dev/sx8/$Np$M.
 
 config BLK_DEV_RAM
 	tristate "RAM disk support"
--- diff/drivers/block/Makefile	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/block/Makefile	2004-07-01 21:32:34.000000000 +0100
@@ -41,5 +41,5 @@
 obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
 
 obj-$(CONFIG_VIODASD)		+= viodasd.o
-obj-$(CONFIG_BLK_DEV_CARMEL)	+= carmel.o
+obj-$(CONFIG_BLK_DEV_SX8)	+= sx8.o
 
--- diff/drivers/block/cciss.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/block/cciss.c	2004-07-01 21:32:34.000000000 +0100
@@ -479,6 +479,148 @@
 	return 0;
 }
 
+#ifdef CONFIG_COMPAT
+/* for AMD 64 bit kernel compatibility with 32-bit userland ioctls */
+extern long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
+extern int
+register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int,
+      unsigned int, unsigned long, struct file *));
+extern int unregister_ioctl32_conversion(unsigned int cmd);
+
+static int cciss_ioctl32_passthru(unsigned int fd, unsigned cmd, unsigned long arg, struct file *file);
+static int cciss_ioctl32_big_passthru(unsigned int fd, unsigned cmd, unsigned long arg,
+	struct file *file);
+
+typedef int (*handler_type) (unsigned int, unsigned int, unsigned long, struct file *);
+
+static struct ioctl32_map {
+	unsigned int cmd;
+	handler_type handler;
+	int registered;
+} cciss_ioctl32_map[] = {
+	{ CCISS_GETPCIINFO,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_GETINTINFO,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_SETINTINFO,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_GETNODENAME,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_SETNODENAME,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_GETHEARTBEAT,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_GETBUSTYPES,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_GETFIRMVER,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_GETDRIVVER,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_REVALIDVOLS,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_PASSTHRU32,	cciss_ioctl32_passthru, 0 },
+	{ CCISS_DEREGDISK,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_REGNEWDISK,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_REGNEWD,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_RESCANDISK,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_GETLUNINFO,	(handler_type) sys_ioctl, 0 },
+	{ CCISS_BIG_PASSTHRU32,	cciss_ioctl32_big_passthru, 0 },
+};
+#define NCCISS_IOCTL32_ENTRIES (sizeof(cciss_ioctl32_map) / sizeof(cciss_ioctl32_map[0]))
+static void register_cciss_ioctl32(void)
+{
+	int i, rc;
+
+	for (i=0; i < NCCISS_IOCTL32_ENTRIES; i++) {
+		rc = register_ioctl32_conversion(
+			cciss_ioctl32_map[i].cmd,
+			cciss_ioctl32_map[i].handler);
+		if (rc != 0) {
+			printk(KERN_WARNING "cciss: failed to register "
+				"32 bit compatible ioctl 0x%08x\n",
+				cciss_ioctl32_map[i].cmd);
+			cciss_ioctl32_map[i].registered = 0;
+		} else
+			cciss_ioctl32_map[i].registered = 1;
+	}
+}
+static void unregister_cciss_ioctl32(void)
+{
+	int i, rc;
+
+	for (i=0; i < NCCISS_IOCTL32_ENTRIES; i++) {
+		if (!cciss_ioctl32_map[i].registered)
+			continue;
+		rc = unregister_ioctl32_conversion(
+			cciss_ioctl32_map[i].cmd);
+		if (rc == 0) {
+			cciss_ioctl32_map[i].registered = 0;
+			continue;
+		}
+		printk(KERN_WARNING "cciss: failed to unregister "
+			"32 bit compatible ioctl 0x%08x\n",
+			cciss_ioctl32_map[i].cmd);
+	}
+}
+int cciss_ioctl32_passthru(unsigned int fd, unsigned cmd, unsigned long arg,
+	struct file *file)
+{
+	IOCTL32_Command_struct *arg32 =
+		(IOCTL32_Command_struct *) arg;
+	IOCTL_Command_struct arg64;
+	mm_segment_t old_fs;
+	int err;
+	unsigned long cp;
+
+	err = 0;
+	err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info, sizeof(arg64.LUN_info));
+	err |= copy_from_user(&arg64.Request, &arg32->Request, sizeof(arg64.Request));
+	err |= copy_from_user(&arg64.error_info, &arg32->error_info, sizeof(arg64.error_info));
+	err |= get_user(arg64.buf_size, &arg32->buf_size);
+	err |= get_user(cp, &arg32->buf);
+	arg64.buf = (BYTE *)cp;
+
+	if (err)
+		return -EFAULT;
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	err = sys_ioctl(fd, CCISS_PASSTHRU, (unsigned long) &arg64);
+	set_fs(old_fs);
+	if (err)
+		return err;
+	err |= copy_to_user(&arg32->error_info, &arg64.error_info, sizeof(&arg32->error_info));
+	if (err)
+		return -EFAULT;
+	return err;
+}
+int cciss_ioctl32_big_passthru(unsigned int fd, unsigned cmd, unsigned long arg,
+	struct file *file)
+{
+	BIG_IOCTL32_Command_struct *arg32 =
+		(BIG_IOCTL32_Command_struct *) arg;
+	BIG_IOCTL_Command_struct arg64;
+	mm_segment_t old_fs;
+	int err;
+	unsigned long cp;
+
+	err = 0;
+	err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info, sizeof(arg64.LUN_info));
+	err |= copy_from_user(&arg64.Request, &arg32->Request, sizeof(arg64.Request));
+	err |= copy_from_user(&arg64.error_info, &arg32->error_info, sizeof(arg64.error_info));
+	err |= get_user(arg64.buf_size, &arg32->buf_size);
+	err |= get_user(arg64.malloc_size, &arg32->malloc_size);
+	err |= get_user(cp, &arg32->buf);
+	arg64.buf = (BYTE *)cp;
+
+	if (err)
+		 return -EFAULT;
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	err = sys_ioctl(fd, CCISS_BIG_PASSTHRU, (unsigned long) &arg64);
+	set_fs(old_fs);
+	if (err)
+		return err;
+	err |= copy_to_user(&arg32->error_info, &arg64.error_info, sizeof(&arg32->error_info));
+	if (err)
+		return -EFAULT;
+	return err;
+}
+#else
+static inline void register_cciss_ioctl32(void) {}
+static inline void unregister_cciss_ioctl32(void) {}
+#endif
 /*
  * ioctl 
  */
@@ -2728,6 +2870,7 @@
 
 static int __init init_cciss_module(void)
 {
+	register_cciss_ioctl32();
 	return ( cciss_init());
 }
 
@@ -2735,6 +2878,7 @@
 {
 	int i;
 
+	unregister_cciss_ioctl32();
 	pci_unregister_driver(&cciss_pci_driver);
 	/* double check that all controller entrys have been removed */
 	for (i=0; i< MAX_CTLR; i++) 
--- diff/drivers/block/cciss_scsi.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/block/cciss_scsi.c	2004-07-01 21:32:34.000000000 +0100
@@ -29,7 +29,7 @@
    physical nor logical disks are presented through the scsi layer. */
 
 #include "../scsi/scsi.h" 
-#include "../scsi/hosts.h" 
+#include <scsi/scsi_host.h> 
 #include <asm/atomic.h>
 #include <linux/timer.h>
 #include <linux/completion.h>
--- diff/drivers/block/cfq-iosched.c	2004-05-19 22:11:32.000000000 +0100
+++ source/drivers/block/cfq-iosched.c	2004-07-01 21:32:34.000000000 +0100
@@ -59,6 +59,14 @@
 	unsigned int max_queued;
 
 	mempool_t *crq_pool;
+
+	request_queue_t *queue;
+
+	/*
+	 * tunables
+	 */
+	unsigned int cfq_quantum;
+	unsigned int cfq_queued;
 };
 
 struct cfq_queue {
@@ -89,7 +97,8 @@
 
 static void cfq_put_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq);
 static struct cfq_queue *cfq_find_cfq_hash(struct cfq_data *cfqd, int pid);
-static void cfq_dispatch_sort(struct list_head *head, struct cfq_rq *crq);
+static void cfq_dispatch_sort(struct cfq_data *cfqd, struct cfq_queue *cfqq,
+			      struct cfq_rq *crq);
 
 /*
  * lots of deadline iosched dupes, can be abstracted later...
@@ -206,8 +215,7 @@
 		return;
 	}
 
-	cfq_del_crq_rb(cfqq, __alias);
-	cfq_dispatch_sort(cfqd->dispatch, __alias);
+	cfq_dispatch_sort(cfqd, cfqq, __alias);
 	goto retry;
 }
 
@@ -321,11 +329,16 @@
 	cfq_remove_request(q, next);
 }
 
-static void cfq_dispatch_sort(struct list_head *head, struct cfq_rq *crq)
+static void
+cfq_dispatch_sort(struct cfq_data *cfqd, struct cfq_queue *cfqq,
+		  struct cfq_rq *crq)
 {
-	struct list_head *entry = head;
+	struct list_head *head = cfqd->dispatch, *entry = head;
 	struct request *__rq;
 
+	cfq_del_crq_rb(cfqq, crq);
+	cfq_remove_merge_hints(cfqd->queue, crq);
+
 	if (!list_empty(head)) {
 		__rq = list_entry_rq(head->next);
 
@@ -352,9 +365,7 @@
 {
 	struct cfq_rq *crq = rb_entry_crq(rb_first(&cfqq->sort_list));
 
-	cfq_del_crq_rb(cfqq, crq);
-	cfq_remove_merge_hints(q, crq);
-	cfq_dispatch_sort(cfqd->dispatch, crq);
+	cfq_dispatch_sort(cfqd, cfqq, crq);
 }
 
 static int cfq_dispatch_requests(request_queue_t *q, struct cfq_data *cfqd)
@@ -385,7 +396,7 @@
 		ret = 1;
 	}
 
-	if ((queued < cfq_quantum) && good_queues)
+	if ((queued < cfqd->cfq_quantum) && good_queues)
 		goto restart;
 
 	return ret;
@@ -556,7 +567,7 @@
 
 	cfqq = cfq_find_cfq_hash(cfqd, current->tgid);
 	if (cfqq) {
-		int limit = (q->nr_requests - cfq_queued) / cfqd->busy_queues;
+		int limit = (q->nr_requests - cfqd->cfq_queued) / cfqd->busy_queues;
 
 		if (limit < 3)
 			limit = 3;
@@ -574,6 +585,8 @@
 {
 	struct cfq_data *cfqd = q->elevator.elevator_data;
 	struct cfq_rq *crq = RQ_DATA(rq);
+	struct request_list *rl;
+	int other_rw;
 
 	if (crq) {
 		BUG_ON(q->last_merge == rq);
@@ -582,6 +595,23 @@
 		mempool_free(crq, cfqd->crq_pool);
 		rq->elevator_private = NULL;
 	}
+
+	/*
+	 * work-around for may_queue "bug": if a read gets issued and refused
+	 * to queue because writes ate all the allowed slots and no other
+	 * reads are pending for this queue, it could get stuck infinitely
+	 * since freed_request() only checks the waitqueue for writes when
+	 * freeing them. or vice versa for a single write vs many reads.
+	 * so check here whether "the other" data direction might be able
+	 * to queue and wake them
+	 */
+	rl = &q->rq;
+	other_rw = rq_data_dir(rq) ^ 1;
+	if (rl->count[other_rw] <= q->nr_requests) {
+		smp_mb();
+		if (waitqueue_active(&rl->wait[other_rw]))
+			wake_up(&rl->wait[other_rw]);
+	}
 }
 
 static int cfq_set_request(request_queue_t *q, struct request *rq, int gfp_mask)
@@ -643,6 +673,7 @@
 
 	cfqd->dispatch = &q->queue_head;
 	e->elevator_data = cfqd;
+	cfqd->queue = q;
 
 	/*
 	 * just set it to some high value, we want anyone to be able to queue
@@ -651,6 +682,9 @@
 	cfqd->max_queued = q->nr_requests;
 	q->nr_requests = 8192;
 
+	cfqd->cfq_queued = cfq_queued;
+	cfqd->cfq_quantum = cfq_quantum;
+
 	return 0;
 out_crqpool:
 	kfree(cfqd->cfq_hash);
@@ -685,8 +719,110 @@
 
 subsys_initcall(cfq_slab_setup);
 
+/*
+ * sysfs parts below -->
+ */
+struct cfq_fs_entry {
+	struct attribute attr;
+	ssize_t (*show)(struct cfq_data *, char *);
+	ssize_t (*store)(struct cfq_data *, const char *, size_t);
+};
+
+static ssize_t
+cfq_var_show(unsigned int var, char *page)
+{
+	return sprintf(page, "%d\n", var);
+}
+
+static ssize_t
+cfq_var_store(unsigned int *var, const char *page, size_t count)
+{
+	char *p = (char *) page;
+
+	*var = simple_strtoul(p, &p, 10);
+	return count;
+}
+
+#define SHOW_FUNCTION(__FUNC, __VAR)					\
+static ssize_t __FUNC(struct cfq_data *cfqd, char *page)		\
+{									\
+	return cfq_var_show(__VAR, (page));				\
+}
+SHOW_FUNCTION(cfq_quantum_show, cfqd->cfq_quantum);
+SHOW_FUNCTION(cfq_queued_show, cfqd->cfq_queued);
+#undef SHOW_FUNCTION
+
+#define STORE_FUNCTION(__FUNC, __PTR, MIN, MAX)				\
+static ssize_t __FUNC(struct cfq_data *cfqd, const char *page, size_t count)	\
+{									\
+	int ret = cfq_var_store(__PTR, (page), count);			\
+	if (*(__PTR) < (MIN))						\
+		*(__PTR) = (MIN);					\
+	else if (*(__PTR) > (MAX))					\
+		*(__PTR) = (MAX);					\
+	return ret;							\
+}
+STORE_FUNCTION(cfq_quantum_store, &cfqd->cfq_quantum, 1, INT_MAX);
+STORE_FUNCTION(cfq_queued_store, &cfqd->cfq_queued, 1, INT_MAX);
+#undef STORE_FUNCTION
+
+static struct cfq_fs_entry cfq_quantum_entry = {
+	.attr = {.name = "quantum", .mode = S_IRUGO | S_IWUSR },
+	.show = cfq_quantum_show,
+	.store = cfq_quantum_store,
+};
+static struct cfq_fs_entry cfq_queued_entry = {
+	.attr = {.name = "queued", .mode = S_IRUGO | S_IWUSR },
+	.show = cfq_queued_show,
+	.store = cfq_queued_store,
+};
+
+static struct attribute *default_attrs[] = {
+	&cfq_quantum_entry.attr,
+	&cfq_queued_entry.attr,
+	NULL,
+};
+
+#define to_cfq(atr) container_of((atr), struct cfq_fs_entry, attr)
+
+static ssize_t
+cfq_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
+{
+	elevator_t *e = container_of(kobj, elevator_t, kobj);
+	struct cfq_fs_entry *entry = to_cfq(attr);
+
+	if (!entry->show)
+		return 0;
+
+	return entry->show(e->elevator_data, page);
+}
+
+static ssize_t
+cfq_attr_store(struct kobject *kobj, struct attribute *attr,
+	       const char *page, size_t length)
+{
+	elevator_t *e = container_of(kobj, elevator_t, kobj);
+	struct cfq_fs_entry *entry = to_cfq(attr);
+
+	if (!entry->store)
+		return -EINVAL;
+
+	return entry->store(e->elevator_data, page, length);
+}
+
+static struct sysfs_ops cfq_sysfs_ops = {
+	.show	= cfq_attr_show,
+	.store	= cfq_attr_store,
+};
+
+struct kobj_type cfq_ktype = {
+	.sysfs_ops	= &cfq_sysfs_ops,
+	.default_attrs	= default_attrs,
+};
+
 elevator_t iosched_cfq = {
 	.elevator_name =		"cfq",
+	.elevator_ktype =		&cfq_ktype,
 	.elevator_merge_fn = 		cfq_merge,
 	.elevator_merged_fn =		cfq_merged_request,
 	.elevator_merge_req_fn =	cfq_merged_requests,
--- diff/drivers/block/elevator.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/block/elevator.c	2004-07-01 21:32:34.000000000 +0100
@@ -181,6 +181,14 @@
 
 	rq->q = q;
 	q->elevator.elevator_add_req_fn(q, rq, where);
+
+	if (blk_queue_plugged(q)) {
+		int nrq = q->rq.count[READ] + q->rq.count[WRITE] - q->in_flight;
+
+		if (nrq == q->unplug_thresh)
+			__generic_unplug_device(q);
+	}
+
 }
 
 void elv_add_request(request_queue_t *q, struct request *rq, int where,
@@ -203,7 +211,7 @@
 	struct request *rq;
 	int ret;
 
-	while ((rq = __elv_next_request(q))) {
+	while ((rq = __elv_next_request(q)) != NULL) {
 		/*
 		 * just mark as started even if we don't start it, a request
 		 * that has been delayed should not be passed by new incoming
--- diff/drivers/block/ll_rw_blk.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/block/ll_rw_blk.c	2004-07-01 21:32:34.000000000 +0100
@@ -263,6 +263,45 @@
 EXPORT_SYMBOL(blk_queue_make_request);
 
 /**
+ * blk_queue_ordered - does this queue support ordered writes
+ * @q:     the request queue
+ * @flag:  see below
+ *
+ * Description:
+ *   For journalled file systems, doing ordered writes on a commit
+ *   block instead of explicitly doing wait_on_buffer (which is bad
+ *   for performance) can be a big win. Block drivers supporting this
+ *   feature should call this function and indicate so.
+ *
+ **/
+void blk_queue_ordered(request_queue_t *q, int flag)
+{
+	if (flag)
+		set_bit(QUEUE_FLAG_ORDERED, &q->queue_flags);
+	else
+		clear_bit(QUEUE_FLAG_ORDERED, &q->queue_flags);
+}
+
+EXPORT_SYMBOL(blk_queue_ordered);
+
+/**
+ * blk_queue_issue_flush_fn - set function for issuing a flush
+ * @q:     the request queue
+ * @iff:   the function to be called issuing the flush
+ *
+ * Description:
+ *   If a driver supports issuing a flush command, the support is notified
+ *   to the block layer by defining it through this call.
+ *
+ **/
+void blk_queue_issue_flush_fn(request_queue_t *q, issue_flush_fn *iff)
+{
+	q->issue_flush_fn = iff;
+}
+
+EXPORT_SYMBOL(blk_queue_issue_flush_fn);
+
+/**
  * blk_queue_bounce_limit - set bounce buffer limit for queue
  * @q:  the request queue for the device
  * @dma_addr:   bus address limit
@@ -817,14 +856,14 @@
 void blk_recount_segments(request_queue_t *q, struct bio *bio)
 {
 	struct bio_vec *bv, *bvprv = NULL;
-	int i, nr_phys_segs, nr_hw_segs, seg_size, cluster;
+	int i, nr_phys_segs, nr_hw_segs, seg_size, hw_seg_size, cluster;
 	int high, highprv = 1;
 
 	if (unlikely(!bio->bi_io_vec))
 		return;
 
 	cluster = q->queue_flags & (1 << QUEUE_FLAG_CLUSTER);
-	seg_size = nr_phys_segs = nr_hw_segs = 0;
+	hw_seg_size = seg_size = nr_phys_segs = nr_hw_segs = 0;
 	bio_for_each_segment(bv, bio, i) {
 		/*
 		 * the trick here is making sure that a high page is never
@@ -841,22 +880,35 @@
 				goto new_segment;
 			if (!BIOVEC_SEG_BOUNDARY(q, bvprv, bv))
 				goto new_segment;
+			if (BIOVEC_VIRT_OVERSIZE(hw_seg_size + bv->bv_len))
+				goto new_hw_segment;
 
 			seg_size += bv->bv_len;
+			hw_seg_size += bv->bv_len;
 			bvprv = bv;
 			continue;
 		}
 new_segment:
-		if (!BIOVEC_VIRT_MERGEABLE(bvprv, bv))
+		if (BIOVEC_VIRT_MERGEABLE(bvprv, bv) &&
+		    !BIOVEC_VIRT_OVERSIZE(hw_seg_size + bv->bv_len)) {
+			hw_seg_size += bv->bv_len;
+		} else {
 new_hw_segment:
+			if (hw_seg_size > bio->bi_hw_front_size)
+				bio->bi_hw_front_size = hw_seg_size;
+			hw_seg_size = BIOVEC_VIRT_START_SIZE(bv) + bv->bv_len;
 			nr_hw_segs++;
+		}
 
 		nr_phys_segs++;
 		bvprv = bv;
 		seg_size = bv->bv_len;
 		highprv = high;
 	}
-
+	if (hw_seg_size > bio->bi_hw_back_size)
+		bio->bi_hw_back_size = hw_seg_size;
+	if (nr_hw_segs == 1 && hw_seg_size > bio->bi_hw_front_size)
+		bio->bi_hw_front_size = hw_seg_size;
 	bio->bi_phys_segments = nr_phys_segs;
 	bio->bi_hw_segments = nr_hw_segs;
 	bio->bi_flags |= (1 << BIO_SEG_VALID);
@@ -889,22 +941,17 @@
 int blk_hw_contig_segment(request_queue_t *q, struct bio *bio,
 				 struct bio *nxt)
 {
-	if (!(q->queue_flags & (1 << QUEUE_FLAG_CLUSTER)))
-		return 0;
-
-	if (!BIOVEC_VIRT_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)))
+	if (unlikely(!bio_flagged(bio, BIO_SEG_VALID)))
+		blk_recount_segments(q, bio);
+	if (unlikely(!bio_flagged(nxt, BIO_SEG_VALID)))
+		blk_recount_segments(q, nxt);
+	if (!BIOVEC_VIRT_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)) ||
+	    BIOVEC_VIRT_OVERSIZE(bio->bi_hw_front_size + bio->bi_hw_back_size))
 		return 0;
 	if (bio->bi_size + nxt->bi_size > q->max_segment_size)
 		return 0;
 
-	/*
-	 * bio and nxt are contigous in memory, check if the queue allows
-	 * these two to be merged into one
-	 */
-	if (BIO_SEG_BOUNDARY(q, bio, nxt))
-		return 1;
-
-	return 0;
+	return 1;
 }
 
 EXPORT_SYMBOL(blk_hw_contig_segment);
@@ -974,7 +1021,8 @@
 
 	if (req->nr_phys_segments + nr_phys_segs > q->max_phys_segments) {
 		req->flags |= REQ_NOMERGE;
-		q->last_merge = NULL;
+		if (req == q->last_merge)
+			q->last_merge = NULL;
 		return 0;
 	}
 
@@ -996,7 +1044,8 @@
 	if (req->nr_hw_segments + nr_hw_segs > q->max_hw_segments
 	    || req->nr_phys_segments + nr_phys_segs > q->max_phys_segments) {
 		req->flags |= REQ_NOMERGE;
-		q->last_merge = NULL;
+		if (req == q->last_merge)
+			q->last_merge = NULL;
 		return 0;
 	}
 
@@ -1012,14 +1061,31 @@
 static int ll_back_merge_fn(request_queue_t *q, struct request *req, 
 			    struct bio *bio)
 {
+	int len;
+
 	if (req->nr_sectors + bio_sectors(bio) > q->max_sectors) {
 		req->flags |= REQ_NOMERGE;
-		q->last_merge = NULL;
+		if (req == q->last_merge)
+			q->last_merge = NULL;
 		return 0;
 	}
-
-	if (BIOVEC_VIRT_MERGEABLE(__BVEC_END(req->biotail), __BVEC_START(bio)))
-		return ll_new_mergeable(q, req, bio);
+	if (unlikely(!bio_flagged(req->biotail, BIO_SEG_VALID)))
+		blk_recount_segments(q, req->biotail);
+	if (unlikely(!bio_flagged(bio, BIO_SEG_VALID)))
+		blk_recount_segments(q, bio);
+	len = req->biotail->bi_hw_back_size + bio->bi_hw_front_size;
+	if (BIOVEC_VIRT_MERGEABLE(__BVEC_END(req->biotail), __BVEC_START(bio)) &&
+	    !BIOVEC_VIRT_OVERSIZE(len)) {
+		int mergeable =  ll_new_mergeable(q, req, bio);
+
+		if (mergeable) {
+			if (req->nr_hw_segments == 1)
+				req->bio->bi_hw_front_size = len;
+			if (bio->bi_hw_segments == 1)
+				bio->bi_hw_back_size = len;
+		}
+		return mergeable;
+	}
 
 	return ll_new_hw_segment(q, req, bio);
 }
@@ -1027,14 +1093,31 @@
 static int ll_front_merge_fn(request_queue_t *q, struct request *req, 
 			     struct bio *bio)
 {
+	int len;
+
 	if (req->nr_sectors + bio_sectors(bio) > q->max_sectors) {
 		req->flags |= REQ_NOMERGE;
-		q->last_merge = NULL;
+		if (req == q->last_merge)
+			q->last_merge = NULL;
 		return 0;
 	}
-
-	if (BIOVEC_VIRT_MERGEABLE(__BVEC_END(bio), __BVEC_START(req->bio)))
-		return ll_new_mergeable(q, req, bio);
+	len = bio->bi_hw_back_size + req->bio->bi_hw_front_size;
+	if (unlikely(!bio_flagged(bio, BIO_SEG_VALID)))
+		blk_recount_segments(q, bio);
+	if (unlikely(!bio_flagged(req->bio, BIO_SEG_VALID)))
+		blk_recount_segments(q, req->bio);
+	if (BIOVEC_VIRT_MERGEABLE(__BVEC_END(bio), __BVEC_START(req->bio)) &&
+	    !BIOVEC_VIRT_OVERSIZE(len)) {
+		int mergeable =  ll_new_mergeable(q, req, bio);
+
+		if (mergeable) {
+			if (bio->bi_hw_segments == 1)
+				bio->bi_hw_front_size = len;
+			if (req->nr_hw_segments == 1)
+				req->biotail->bi_hw_back_size = len;
+		}
+		return mergeable;
+	}
 
 	return ll_new_hw_segment(q, req, bio);
 }
@@ -1066,8 +1149,17 @@
 		return 0;
 
 	total_hw_segments = req->nr_hw_segments + next->nr_hw_segments;
-	if (blk_hw_contig_segment(q, req->biotail, next->bio))
+	if (blk_hw_contig_segment(q, req->biotail, next->bio)) {
+		int len = req->biotail->bi_hw_back_size + next->bio->bi_hw_front_size;
+		/*
+		 * propagate the combined length to the end of the requests
+		 */
+		if (req->nr_hw_segments == 1)
+			req->bio->bi_hw_front_size = len;
+		if (next->nr_hw_segments == 1)
+			next->biotail->bi_hw_back_size = len;
 		total_hw_segments--;
+	}
 
 	if (total_hw_segments > q->max_hw_segments)
 		return 0;
@@ -1123,7 +1215,7 @@
 /*
  * remove the plug and let it rip..
  */
-static inline void __generic_unplug_device(request_queue_t *q)
+void __generic_unplug_device(request_queue_t *q)
 {
 	if (test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags))
 		return;
@@ -1137,6 +1229,7 @@
 	if (elv_next_request(q))
 		q->request_fn(q);
 }
+EXPORT_SYMBOL(__generic_unplug_device);
 
 /**
  * generic_unplug_device - fire a request queue
@@ -1151,6 +1244,7 @@
  **/
 void generic_unplug_device(request_queue_t *q)
 {
+	might_sleep();
 	spin_lock_irq(q->queue_lock);
 	__generic_unplug_device(q);
 	spin_unlock_irq(q->queue_lock);
@@ -1872,10 +1966,11 @@
 	}
 
 	rq->flags |= REQ_NOMERGE;
-	rq->waiting = &wait;
+	if (!rq->waiting)
+		rq->waiting = &wait;
 	elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 1);
 	generic_unplug_device(q);
-	wait_for_completion(&wait);
+	wait_for_completion(rq->waiting);
 	rq->waiting = NULL;
 
 	if (rq->errors)
@@ -1886,6 +1981,72 @@
 
 EXPORT_SYMBOL(blk_execute_rq);
 
+/**
+ * blkdev_issue_flush - queue a flush
+ * @bdev:	blockdev to issue flush for
+ * @error_sector:	error sector
+ *
+ * Description:
+ *    Issue a flush for the block device in question. Caller can supply
+ *    room for storing the error offset in case of a flush error, if they
+ *    wish to.  Caller must run wait_for_completion() on its own.
+ */
+int blkdev_issue_flush(struct block_device *bdev, sector_t *error_sector)
+{
+	request_queue_t *q;
+
+	if (bdev->bd_disk == NULL)
+		return -ENXIO;
+
+	q = bdev_get_queue(bdev);
+	if (!q)
+		return -ENXIO;
+	if (!q->issue_flush_fn)
+		return -EOPNOTSUPP;
+
+	return q->issue_flush_fn(q, bdev->bd_disk, error_sector);
+}
+
+EXPORT_SYMBOL(blkdev_issue_flush);
+
+/**
+ * blkdev_scsi_issue_flush_fn - issue flush for SCSI devices
+ * @q:		device queue
+ * @disk:	gendisk
+ * @error_sector:	error offset
+ *
+ * Description:
+ *    Devices understanding the SCSI command set, can use this function as
+ *    a helper for issuing a cache flush. Note: driver is required to store
+ *    the error offset (in case of error flushing) in ->sector of struct
+ *    request.
+ */
+int blkdev_scsi_issue_flush_fn(request_queue_t *q, struct gendisk *disk,
+			       sector_t *error_sector)
+{
+	struct request *rq = blk_get_request(q, WRITE, __GFP_WAIT);
+	int ret;
+
+	rq->flags |= REQ_BLOCK_PC | REQ_SOFTBARRIER;
+	rq->sector = 0;
+	memset(rq->cmd, 0, sizeof(rq->cmd));
+	rq->cmd[0] = 0x35;
+	rq->cmd_len = 12;
+	rq->data = NULL;
+	rq->data_len = 0;
+	rq->timeout = 60 * HZ;
+
+	ret = blk_execute_rq(q, disk, rq);
+
+	if (ret && error_sector)
+		*error_sector = rq->sector;
+
+	blk_put_request(rq);
+	return ret;
+}
+
+EXPORT_SYMBOL(blkdev_scsi_issue_flush_fn);
+
 void drive_stat_acct(struct request *rq, int nr_sectors, int new_io)
 {
 	int rw = rq_data_dir(rq);
@@ -2139,7 +2300,7 @@
 static int __make_request(request_queue_t *q, struct bio *bio)
 {
 	struct request *req, *freereq = NULL;
-	int el_ret, rw, nr_sectors, cur_nr_sectors, barrier, ra;
+	int el_ret, rw, nr_sectors, cur_nr_sectors, barrier, err;
 	sector_t sector;
 
 	sector = bio->bi_sector;
@@ -2157,9 +2318,11 @@
 
 	spin_lock_prefetch(q->queue_lock);
 
-	barrier = test_bit(BIO_RW_BARRIER, &bio->bi_rw);
-
-	ra = bio->bi_rw & (1 << BIO_RW_AHEAD);
+	barrier = bio_barrier(bio);
+	if (barrier && !(q->queue_flags & (1 << QUEUE_FLAG_ORDERED))) {
+		err = -EOPNOTSUPP;
+		goto end_io;
+	}
 
 again:
 	spin_lock_irq(q->queue_lock);
@@ -2239,7 +2402,8 @@
 			/*
 			 * READA bit set
 			 */
-			if (ra)
+			err = -EWOULDBLOCK;
+			if (bio_rw_ahead(bio))
 				goto end_io;
 	
 			freereq = get_request_wait(q, rw);
@@ -2250,10 +2414,9 @@
 	req->flags |= REQ_CMD;
 
 	/*
-	 * inherit FAILFAST from bio and don't stack up
-	 * retries for read ahead
+	 * inherit FAILFAST from bio (for read-ahead, and explicit FAILFAST)
 	 */
-	if (ra || test_bit(BIO_RW_FAILFAST, &bio->bi_rw))	
+	if (bio_rw_ahead(bio) || bio_failfast(bio))
 		req->flags |= REQ_FAILFAST;
 
 	/*
@@ -2280,18 +2443,14 @@
 out:
 	if (freereq)
 		__blk_put_request(q, freereq);
+	if (bio_sync(bio))
+		__generic_unplug_device(q);
 
-	if (blk_queue_plugged(q)) {
-		int nrq = q->rq.count[READ] + q->rq.count[WRITE] - q->in_flight;
-
-		if (nrq == q->unplug_thresh || bio_sync(bio))
-			__generic_unplug_device(q);
-	}
 	spin_unlock_irq(q->queue_lock);
 	return 0;
 
 end_io:
-	bio_endio(bio, nr_sectors << 9, -EWOULDBLOCK);
+	bio_endio(bio, nr_sectors << 9, err);
 	return 0;
 }
 
@@ -2535,7 +2694,7 @@
 
 void blk_recalc_rq_segments(struct request *rq)
 {
-	struct bio *bio;
+	struct bio *bio, *prevbio = NULL;
 	int nr_phys_segs, nr_hw_segs;
 
 	if (!rq->bio)
@@ -2548,6 +2707,13 @@
 
 		nr_phys_segs += bio_phys_segments(rq->q, bio);
 		nr_hw_segs += bio_hw_segments(rq->q, bio);
+		if (prevbio) {
+			if (blk_phys_contig_segment(rq->q, prevbio, bio))
+				nr_phys_segs--;
+			if (blk_hw_contig_segment(rq->q, prevbio, bio))
+				nr_hw_segs--;
+		}
+		prevbio = bio;
 	}
 
 	rq->nr_phys_segments = nr_phys_segs;
@@ -2591,10 +2757,17 @@
 static int __end_that_request_first(struct request *req, int uptodate,
 				    int nr_bytes)
 {
-	int total_bytes, bio_nbytes, error = 0, next_idx = 0;
+	int total_bytes, bio_nbytes, error, next_idx = 0;
 	struct bio *bio;
 
 	/*
+	 * extend uptodate bool to allow < 0 value to be direct io error
+	 */
+	error = 0;
+	if (end_io_error(uptodate))
+		error = !uptodate ? -EIO : uptodate;
+
+	/*
 	 * for a REQ_BLOCK_PC request, we want to carry any eventual
 	 * sense key with us all the way through
 	 */
@@ -2602,7 +2775,6 @@
 		req->errors = 0;
 
 	if (!uptodate) {
-		error = -EIO;
 		if (blk_fs_request(req) && !(req->flags & REQ_QUIET))
 			printk("end_request: I/O error, dev %s, sector %llu\n",
 				req->rq_disk ? req->rq_disk->disk_name : "?",
@@ -2610,7 +2782,7 @@
 	}
 
 	total_bytes = bio_nbytes = 0;
-	while ((bio = req->bio)) {
+	while ((bio = req->bio) != NULL) {
 		int nbytes;
 
 		if (nr_bytes >= bio->bi_size) {
@@ -2685,7 +2857,7 @@
 /**
  * end_that_request_first - end I/O on a request
  * @req:      the request being processed
- * @uptodate: 0 for I/O error
+ * @uptodate: 1 for success, 0 for I/O error, < 0 for specific error
  * @nr_sectors: number of sectors to end I/O on
  *
  * Description:
@@ -2706,7 +2878,7 @@
 /**
  * end_that_request_chunk - end I/O on a request
  * @req:      the request being processed
- * @uptodate: 0 for I/O error
+ * @uptodate: 1 for success, 0 for I/O error, < 0 for specific error
  * @nr_bytes: number of bytes to complete
  *
  * Description:
--- diff/drivers/block/viodasd.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/block/viodasd.c	2004-07-01 21:32:35.000000000 +0100
@@ -68,7 +68,7 @@
 
 enum {
 	PARTITION_SHIFT = 3,
-	MAX_DISKNO = 32,
+	MAX_DISKNO = HVMAXARCHITECTEDVIRTUALDISKS,
 	MAX_DISK_NAME = sizeof(((struct gendisk *)0)->disk_name)
 };
 
@@ -168,6 +168,7 @@
 	int		read_only;
 	spinlock_t	q_lock;
 	struct gendisk	*disk;
+	struct device	*dev;
 } viodasd_devices[MAX_DISKNO];
 
 /*
@@ -342,7 +343,7 @@
 
 	/* Now build the scatter-gather list */
 	nsg = blk_rq_map_sg(req->q, req, sg);
-	nsg = dma_map_sg(iSeries_vio_dev, sg, nsg, direction);
+	nsg = dma_map_sg(d->dev, sg, nsg, direction);
 
 	spin_lock_irqsave(&viodasd_spinlock, flags);
 	num_req_outstanding++;
@@ -422,7 +423,7 @@
 error_ret:
 	num_req_outstanding--;
 	spin_unlock_irqrestore(&viodasd_spinlock, flags);
-	dma_unmap_sg(iSeries_vio_dev, sg, nsg, direction);
+	dma_unmap_sg(d->dev, sg, nsg, direction);
 	return -1;
 }
 
@@ -557,6 +558,7 @@
 	g->fops = &viodasd_fops;
 	g->queue = q;
 	g->private_data = d;
+	g->driverfs_dev = d->dev;
 	set_capacity(g, d->size >> 9);
 
 	printk(VIOD_KERN_INFO "disk %d: %lu sectors (%lu MB) "
@@ -623,7 +625,7 @@
 	struct scatterlist sg[VIOMAXBLOCKDMA];
 	struct HvLpEvent *event = &bevent->event;
 	unsigned long irq_flags;
-	int device_no;
+	struct viodasd_device *d;
 	int error;
 	spinlock_t *qlock;
 
@@ -633,7 +635,10 @@
 		pci_direction = DMA_FROM_DEVICE;
 	else
 		pci_direction = DMA_TO_DEVICE;
-	dma_unmap_sg(iSeries_vio_dev, sg, num_sg, pci_direction);
+	req = (struct request *)bevent->event.xCorrelationToken;
+	d = req->rq_disk->private_data;
+
+	dma_unmap_sg(d->dev, sg, num_sg, pci_direction);
 
 	/*
 	 * Since this is running in interrupt mode, we need to make sure
@@ -643,9 +648,6 @@
 	num_req_outstanding--;
 	spin_unlock_irqrestore(&viodasd_spinlock, irq_flags);
 
-	req = (struct request *)bevent->event.xCorrelationToken;
-	device_no = DEVICE_NO(req->rq_disk->private_data);
-
 	error = event->xRc != HvLpEvent_Rc_Good;
 	if (error) {
 		const struct vio_error_entry *err;
@@ -660,7 +662,7 @@
 	spin_unlock_irqrestore(qlock, irq_flags);
 
 	/* Finally, try to get more requests off of this device's queue */
-	viodasd_restart_all_queues_starting_from(device_no);
+	viodasd_restart_all_queues_starting_from(DEVICE_NO(d));
 
 	return 0;
 }
@@ -742,10 +744,49 @@
 	}
 	return count;
 }
-static DRIVER_ATTR(probe, S_IWUSR, NULL, probe_disks)
+static DRIVER_ATTR(probe, S_IWUSR, NULL, probe_disks);
+
+static int viodasd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
+{
+	struct viodasd_device *d = &viodasd_devices[vdev->unit_address];
 
+	d->dev = &vdev->dev;
+	probe_disk(d);
+	if (d->disk == NULL)
+		return -ENODEV;
+	return 0;
+}
+
+static int viodasd_remove(struct vio_dev *vdev)
+{
+	struct viodasd_device *d;
+
+	d = &viodasd_devices[vdev->unit_address];
+	if (d->disk) {
+		del_gendisk(d->disk);
+		put_disk(d->disk);
+		blk_cleanup_queue(d->disk->queue);
+		d->disk = NULL;
+	}
+	d->dev = NULL;
+	return 0;
+}
+
+/**
+ * viodasd_device_table: Used by vio.c to match devices that we
+ * support.
+ */
+static struct vio_device_id viodasd_device_table[] __devinitdata = {
+	{ "viodasd", "" },
+	{ 0, }
+};
+
+MODULE_DEVICE_TABLE(vio, viodasd_device_table);
 static struct vio_driver viodasd_driver = {
-	.name = "viodasd"
+	.name = "viodasd",
+	.id_table = viodasd_device_table,
+	.probe = viodasd_probe,
+	.remove = viodasd_remove
 };
 
 /*
@@ -754,7 +795,7 @@
  */
 static int __init viodasd_init(void)
 {
-	int i;
+	int rc;
 
 	/* Try to open to our host lp */
 	if (viopath_hostLp == HvLpIndexInvalid)
@@ -788,33 +829,17 @@
 	/* Initialize our request handler */
 	vio_setHandler(viomajorsubtype_blockio, handle_block_event);
 
-	for (i = 0; i < MAX_DISKNO; i++)
-		probe_disk(&viodasd_devices[i]);
-
-	vio_register_driver(&viodasd_driver);	/* FIX ME - error checking */
-	driver_create_file(&viodasd_driver.driver, &driver_attr_probe);
-
-	return 0;
+	rc = vio_register_driver(&viodasd_driver);
+	if (rc == 0)
+		driver_create_file(&viodasd_driver.driver, &driver_attr_probe);
+	return rc;
 }
 module_init(viodasd_init);
 
 void viodasd_exit(void)
 {
-	int i;
-	struct viodasd_device *d;
-
 	driver_remove_file(&viodasd_driver.driver, &driver_attr_probe);
 	vio_unregister_driver(&viodasd_driver);
-
-        for (i = 0; i < MAX_DISKNO; i++) {
-		d = &viodasd_devices[i];
-		if (d->disk) {
-			del_gendisk(d->disk);
-			put_disk(d->disk);
-			blk_cleanup_queue(d->disk->queue);
-			d->disk = NULL;
-		}
-	}
 	vio_clearHandler(viomajorsubtype_blockio);
 	unregister_blkdev(VIODASD_MAJOR, VIOD_GENHD_NAME);
 	viopath_close(viopath_hostLp, viomajorsubtype_blockio, VIOMAXREQ + 2);
--- diff/drivers/cdrom/cdrom.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/cdrom/cdrom.c	2004-07-01 21:32:35.000000000 +0100
@@ -508,6 +508,8 @@
 	unsigned char buffer[16];
 	int ret;
 
+	*write = 0;
+
 	init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ);
 
 	cgc.cmd[0] = GPCMD_GET_CONFIGURATION;
@@ -521,8 +523,10 @@
 	mfd = (struct mrw_feature_desc *)&buffer[sizeof(struct feature_header)];
 	*write = mfd->write;
 
-	if ((ret = cdrom_mrw_probe_pc(cdi)))
+	if ((ret = cdrom_mrw_probe_pc(cdi))) {
+		*write = 0;
 		return ret;
+	}
 
 	return 0;
 }
@@ -822,8 +826,30 @@
  */
 static int cdrom_open_write(struct cdrom_device_info *cdi)
 {
+	int mrw, mrw_write, ram_write;
 	int ret = 1;
 
+	mrw = 0;
+	if (!cdrom_is_mrw(cdi, &mrw_write))
+		mrw = 1;
+
+	(void) cdrom_is_random_writable(cdi, &ram_write);
+
+	if (mrw)
+		cdi->mask &= ~CDC_MRW;
+	else
+		cdi->mask |= CDC_MRW;
+
+	if (mrw_write)
+		cdi->mask &= ~CDC_MRW_W;
+	else
+		cdi->mask |= CDC_MRW_W;
+
+	if (ram_write)
+		cdi->mask &= ~CDC_RAM;
+	else
+		cdi->mask |= CDC_RAM;
+
 	if (CDROM_CAN(CDC_MRW_W))
 		ret = cdrom_mrw_open_write(cdi);
 	else if (CDROM_CAN(CDC_DVD_RAM))
@@ -866,6 +892,9 @@
 	if ((fp->f_flags & O_NONBLOCK) && (cdi->options & CDO_USE_FFLAGS)) {
 		ret = cdi->ops->open(cdi, 1);
 	} else {
+		ret = open_for_data(cdi);
+		if (ret)
+			goto err;
 		if (fp->f_mode & FMODE_WRITE) {
 			ret = -EROFS;
 			if (!CDROM_CAN(CDC_RAM))
@@ -873,7 +902,6 @@
 			if (cdrom_open_write(cdi))
 				goto err;
 		}
-		ret = open_for_data(cdi);
 	}
 
 	if (ret)
@@ -1448,6 +1476,7 @@
 	/* LU data send */
 	case DVD_LU_SEND_AGID:
 		cdinfo(CD_DVD, "entering DVD_LU_SEND_AGID\n"); 
+		cgc.quiet = 1;
 		setup_report_key(&cgc, ai->lsa.agid, 0);
 
 		if ((ret = cdo->generic_packet(cdi, &cgc)))
@@ -1482,6 +1511,7 @@
 	/* Post-auth key */
 	case DVD_LU_SEND_TITLE_KEY:
 		cdinfo(CD_DVD, "entering DVD_LU_SEND_TITLE_KEY\n"); 
+		cgc.quiet = 1;
 		setup_report_key(&cgc, ai->lstk.agid, 4);
 		cgc.cmd[5] = ai->lstk.lba;
 		cgc.cmd[4] = ai->lstk.lba >> 8;
--- diff/drivers/cdrom/isp16.c	2004-05-19 22:11:33.000000000 +0100
+++ source/drivers/cdrom/isp16.c	2004-07-01 21:32:35.000000000 +0100
@@ -16,6 +16,10 @@
  *			   module_init & module_exit.
  *			   Torben Mathiasen <tmm@image.dk>
  *
+ *     19 June 2004     -- check_region() converted to request_region()
+ *                         and return statement cleanups.
+ *                         Jesper Juhl <juhl-lkml@dif.dk>
+ *
  *    Detect cdrom interface on ISP16 sound card.
  *    Configure cdrom interface.
  *
@@ -118,17 +122,17 @@
 
 	if (!strcmp(isp16_cdrom_type, "noisp16")) {
 		printk("ISP16: no cdrom interface configured.\n");
-		return (0);
+		return 0;
 	}
 
-	if (check_region(ISP16_IO_BASE, ISP16_IO_SIZE)) {
+	if (!request_region(ISP16_IO_BASE, ISP16_IO_SIZE, "isp16")) {
 		printk("ISP16: i/o ports already in use.\n");
-		return (-EIO);
+		goto out;
 	}
 
 	if ((isp16_type = isp16_detect()) < 0) {
 		printk("ISP16: no cdrom interface found.\n");
-		return (-EIO);
+		goto cleanup_out;
 	}
 
 	printk(KERN_INFO
@@ -148,27 +152,32 @@
 	else {
 		printk("ISP16: %s not supported by cdrom interface.\n",
 		       isp16_cdrom_type);
-		return (-EIO);
+		goto cleanup_out;
 	}
 
 	if (isp16_cdi_config(isp16_cdrom_base, expected_drive,
 			     isp16_cdrom_irq, isp16_cdrom_dma) < 0) {
 		printk
 		    ("ISP16: cdrom interface has not been properly configured.\n");
-		return (-EIO);
+		goto cleanup_out;
 	}
 	printk(KERN_INFO
 	       "ISP16: cdrom interface set up with io base 0x%03X, irq %d, dma %d,"
 	       " type %s.\n", isp16_cdrom_base, isp16_cdrom_irq,
 	       isp16_cdrom_dma, isp16_cdrom_type);
-	return (0);
+	return 0;
+
+cleanup_out:
+	release_region(ISP16_IO_BASE, ISP16_IO_SIZE);
+out:
+	return -EIO;
 }
 
 static short __init isp16_detect(void)
 {
 
 	if (isp16_c929__detect() >= 0)
-		return (2);
+		return 2;
 	else
 		return (isp16_c928__detect());
 }
@@ -206,7 +215,7 @@
 			ISP16_OUT(ISP16_C928__ENABLE_PORT, enable_cdrom);
 		} else {	/* bits are not the same */
 			ISP16_OUT(ISP16_CTRL_PORT, ctrl);
-			return (i);	/* -> not detected: possibly incorrect conclusion */
+			return i;	/* -> not detected: possibly incorrect conclusion */
 		}
 	} else if (enable_cdrom == 0x20)
 		i = 0;
@@ -215,7 +224,7 @@
 
 	ISP16_OUT(ISP16_CTRL_PORT, ctrl);
 
-	return (i);
+	return i;
 }
 
 static short __init isp16_c929__detect(void)
@@ -236,12 +245,12 @@
 	tmp = ISP16_IN(ISP16_CTRL_PORT);
 
 	if (tmp != 2)		/* isp16 with 82C929 not detected */
-		return (-1);
+		return -1;
 
 	/* restore ctrl port value */
 	ISP16_OUT(ISP16_CTRL_PORT, ctrl);
 
-	return (2);
+	return 2;
 }
 
 static short __init
@@ -272,7 +281,7 @@
 		printk
 		    ("ISP16: base address 0x%03X not supported by cdrom interface.\n",
 		     base);
-		return (-1);
+		return -1;
 	}
 	switch (irq) {
 	case 0:
@@ -303,7 +312,7 @@
 	default:
 		printk("ISP16: irq %d not supported by cdrom interface.\n",
 		       irq);
-		return (-1);
+		return -1;
 	}
 	switch (dma) {
 	case 0:
@@ -312,7 +321,7 @@
 	case 1:
 		printk("ISP16: dma 1 cannot be used by cdrom interface,"
 		       " due to conflict with the sound card.\n");
-		return (-1);
+		return -1;
 		break;
 	case 3:
 		dma_code = ISP16_DMA_3;
@@ -329,7 +338,7 @@
 	default:
 		printk("ISP16: dma %d not supported by cdrom interface.\n",
 		       dma);
-		return (-1);
+		return -1;
 	}
 
 	if (drive_type != ISP16_SONY && drive_type != ISP16_PANASONIC0 &&
@@ -339,7 +348,7 @@
 		printk
 		    ("ISP16: drive type (code 0x%02X) not supported by cdrom"
 		     " interface.\n", drive_type);
-		return (-1);
+		return -1;
 	}
 
 	/* set type of interface */
@@ -354,7 +363,7 @@
 	i = ISP16_IN(ISP16_IO_SET_PORT) & ISP16_IO_SET_MASK;	/* keep some bits */
 	ISP16_OUT(ISP16_IO_SET_PORT, i | base_code | irq_code | dma_code);
 
-	return (0);
+	return 0;
 }
 
 void __exit isp16_exit(void)
--- diff/drivers/cdrom/viocd.c	2004-05-19 22:11:33.000000000 +0100
+++ source/drivers/cdrom/viocd.c	2004-07-01 21:32:35.000000000 +0100
@@ -44,6 +44,7 @@
 
 #include <asm/bug.h>
 
+#include <asm/vio.h>
 #include <asm/scatterlist.h>
 #include <asm/iSeries/HvTypes.h>
 #include <asm/iSeries/HvLpEvent.h>
@@ -84,7 +85,7 @@
 /*
  * Should probably make this a module parameter....sigh
  */
-#define VIOCD_MAX_CD 8
+#define VIOCD_MAX_CD	HVMAXARCHITECTEDVIRTUALCDROMS
 
 static const struct vio_error_entry viocd_err_table[] = {
 	{0x0201, EINVAL, "Invalid Range"},
@@ -144,6 +145,7 @@
 struct disk_info {
 	struct gendisk			*viocd_disk;
 	struct cdrom_device_info	viocd_info;
+	struct device			*dev;
 };
 static struct disk_info viocd_diskinfo[VIOCD_MAX_CD];
 
@@ -260,13 +262,13 @@
 	for (i = 0; (i < VIOCD_MAX_CD) && viocd_unitinfo[i].rsrcname[0]; i++)
 		viocd_numdev++;
 
-	return;
-
 error_ret:
-	dma_free_coherent(iSeries_vio_dev,
-			sizeof(*viocd_unitinfo) * VIOCD_MAX_CD,
-			viocd_unitinfo, unitinfo_dmaaddr);
-	viocd_unitinfo = NULL;
+	if (viocd_numdev == 0) {
+		dma_free_coherent(iSeries_vio_dev,
+				sizeof(*viocd_unitinfo) * VIOCD_MAX_CD,
+				viocd_unitinfo, unitinfo_dmaaddr);
+		viocd_unitinfo = NULL;
+	}
 }
 
 static int viocd_open(struct cdrom_device_info *cdi, int purpose)
@@ -341,7 +343,7 @@
 		return -1;
 	}
 
-	if (dma_map_sg(iSeries_vio_dev, &sg, 1, DMA_FROM_DEVICE) == 0) {
+	if (dma_map_sg(diskinfo->dev, &sg, 1, DMA_FROM_DEVICE) == 0) {
 		printk(VIOCD_KERN_WARNING "error allocating sg tce\n");
 		return -1;
 	}
@@ -513,8 +515,9 @@
 		 * Since this is running in interrupt mode, we need to
 		 * make sure we're not stepping on any global I/O operations
 		 */
+		di = &viocd_diskinfo[bevent->disk];
 		spin_lock_irqsave(&viocd_reqlock, flags);
-		dma_unmap_single(iSeries_vio_dev, bevent->token, bevent->len,
+		dma_unmap_single(di->dev, bevent->token, bevent->len,
 				DMA_FROM_DEVICE);
 		req = (struct request *)bevent->event.xCorrelationToken;
 		rwreq--;
@@ -565,12 +568,97 @@
 	return entry->capability;
 }
 
-static int __init viocd_init(void)
+static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
 {
 	struct gendisk *gendisk;
 	int deviceno;
-	int ret = 0;
+	struct disk_info *d;
+	struct cdrom_device_info *c;
+	struct cdrom_info *ci;
+
+	deviceno = vdev->unit_address;
+	if (deviceno >= viocd_numdev)
+		return -ENODEV;
+
+	d = &viocd_diskinfo[deviceno];
+	c = &d->viocd_info;
+	ci = &viocd_unitinfo[deviceno];
+
+	c->ops = &viocd_dops;
+	c->speed = 4;
+	c->capacity = 1;
+	c->handle = d;
+	c->mask = ~find_capability(ci->type);
+	sprintf(c->name, VIOCD_DEVICE "%c", 'a' + deviceno);
+
+	if (register_cdrom(c) != 0) {
+		printk(VIOCD_KERN_WARNING "Cannot register viocd CD-ROM %s!\n",
+				c->name);
+		return 0;
+	}
+	printk(VIOCD_KERN_INFO "cd %s is iSeries resource %10.10s "
+			"type %4.4s, model %3.3s\n",
+			c->name, ci->rsrcname, ci->type, ci->model);
+	gendisk = alloc_disk(1);
+	if (gendisk == NULL) {
+		printk(VIOCD_KERN_WARNING "Cannot create gendisk for %s!\n",
+				c->name);
+		unregister_cdrom(c);
+		return 0;
+	}
+	gendisk->major = VIOCD_MAJOR;
+	gendisk->first_minor = deviceno;
+	strncpy(gendisk->disk_name, c->name,
+			sizeof(gendisk->disk_name));
+	snprintf(gendisk->devfs_name, sizeof(gendisk->devfs_name),
+			VIOCD_DEVICE_DEVFS "%d", deviceno);
+	gendisk->queue = viocd_queue;
+	gendisk->fops = &viocd_fops;
+	gendisk->flags = GENHD_FL_CD|GENHD_FL_REMOVABLE;
+	set_capacity(gendisk, 0);
+	gendisk->private_data = d;
+	d->viocd_disk = gendisk;
+	d->dev = &vdev->dev;
+	gendisk->driverfs_dev = d->dev;
+	add_disk(gendisk);
+
+	return 0;
+}
+
+static int viocd_remove(struct vio_dev *vdev)
+{
+	struct disk_info *d = &viocd_diskinfo[vdev->unit_address];
+
+	if (unregister_cdrom(&d->viocd_info) != 0)
+		printk(VIOCD_KERN_WARNING
+				"Cannot unregister viocd CD-ROM %s!\n",
+				d->viocd_info.name);
+	del_gendisk(d->viocd_disk);
+	put_disk(d->viocd_disk);
+	return 0;
+}
+
+/**
+ * viocd_device_table: Used by vio.c to match devices that we
+ * support.
+ */
+static struct vio_device_id viocd_device_table[] __devinitdata = {
+	{ "viocd", "" },
+	{ 0, }
+};
+
+MODULE_DEVICE_TABLE(vio, viocd_device_table);
+static struct vio_driver viocd_driver = {
+	.name = "viocd",
+	.id_table = viocd_device_table,
+	.probe = viocd_probe,
+	.remove = viocd_remove
+};
+
+static int __init viocd_init(void)
+{
 	struct proc_dir_entry *e;
+	int ret = 0;
 
 	if (viopath_hostLp == HvLpIndexInvalid) {
 		vio_set_hostlp();
@@ -583,8 +671,7 @@
 			viopath_hostLp);
 
 	if (register_blkdev(VIOCD_MAJOR, VIOCD_DEVICE) != 0) {
-		printk(VIOCD_KERN_WARNING
-				"Unable to get major %d for %s\n",
+		printk(VIOCD_KERN_WARNING "Unable to get major %d for %s\n",
 				VIOCD_MAJOR, VIOCD_DEVICE);
 		return -EIO;
 	}
@@ -605,59 +692,19 @@
 	if (viocd_numdev == 0)
 		goto out_undo_vio;
 
-	ret = -ENOMEM;
 	spin_lock_init(&viocd_reqlock);
 	viocd_queue = blk_init_queue(do_viocd_request, &viocd_reqlock);
-	if (viocd_queue == NULL)
-		goto out_unregister;
+	if (viocd_queue == NULL) {
+		ret = -ENOMEM;
+		goto out_free_info;
+	}
 	blk_queue_max_hw_segments(viocd_queue, 1);
 	blk_queue_max_phys_segments(viocd_queue, 1);
 	blk_queue_max_sectors(viocd_queue, 4096 / 512);
 
-	/* initialize units */
-	for (deviceno = 0; deviceno < viocd_numdev; deviceno++) {
-		struct disk_info *d = &viocd_diskinfo[deviceno];
-		struct cdrom_device_info *c = &d->viocd_info;
-		struct cdrom_info *ci = &viocd_unitinfo[deviceno];
-
-		c->ops = &viocd_dops;
-		c->speed = 4;
-		c->capacity = 1;
-		c->handle = d;
-		c->mask = ~find_capability(ci->type);
-		sprintf(c->name, VIOCD_DEVICE "%c", 'a' + deviceno);
-
-		if (register_cdrom(c) != 0) {
-			printk(VIOCD_KERN_WARNING
-					"Cannot register viocd CD-ROM %s!\n",
-					c->name);
-			continue;
-		}
-		printk(VIOCD_KERN_INFO "cd %s is iSeries resource %10.10s "
-				"type %4.4s, model %3.3s\n",
-				c->name, ci->rsrcname, ci->type, ci->model);
-		gendisk = alloc_disk(1);
-		if (gendisk == NULL) {
-			printk(VIOCD_KERN_WARNING
-					"Cannot create gendisk for %s!\n",
-					c->name);
-			unregister_cdrom(c);
-			continue;
-		}
-		gendisk->major = VIOCD_MAJOR;
-		gendisk->first_minor = deviceno;
-		strncpy(gendisk->disk_name, c->name,
-				sizeof(gendisk->disk_name));
-		snprintf(gendisk->devfs_name, sizeof(gendisk->devfs_name),
-				VIOCD_DEVICE_DEVFS "%d", deviceno);
-		gendisk->queue = viocd_queue;
-		gendisk->fops = &viocd_fops;
-		gendisk->flags = GENHD_FL_CD|GENHD_FL_REMOVABLE;
-		set_capacity(gendisk, 0);
-		gendisk->private_data = d;
-		d->viocd_disk = gendisk;
-		add_disk(gendisk);
-	}
+	ret = vio_register_driver(&viocd_driver);
+	if (ret)
+		goto out_cleanup_queue;
 
 	e = create_proc_entry("iSeries/viocd", S_IFREG|S_IRUGO, NULL);
 	if (e) {
@@ -667,6 +714,12 @@
 
 	return 0;
 
+out_cleanup_queue:
+	blk_cleanup_queue(viocd_queue);
+out_free_info:
+	dma_free_coherent(iSeries_vio_dev,
+			sizeof(*viocd_unitinfo) * VIOCD_MAX_CD,
+			viocd_unitinfo, unitinfo_dmaaddr);
 out_undo_vio:
 	vio_clearHandler(viomajorsubtype_cdio);
 	viopath_close(viopath_hostLp, viomajorsubtype_cdio, MAX_CD_REQ + 2);
@@ -677,18 +730,8 @@
 
 static void __exit viocd_exit(void)
 {
-	int deviceno;
-
 	remove_proc_entry("iSeries/viocd", NULL);
-	for (deviceno = 0; deviceno < viocd_numdev; deviceno++) {
-		struct disk_info *d = &viocd_diskinfo[deviceno];
-		if (unregister_cdrom(&d->viocd_info) != 0)
-			printk(VIOCD_KERN_WARNING
-					"Cannot unregister viocd CD-ROM %s!\n",
-					d->viocd_info.name);
-		del_gendisk(d->viocd_disk);
-		put_disk(d->viocd_disk);
-	}
+	vio_unregister_driver(&viocd_driver);
 	blk_cleanup_queue(viocd_queue);
 	if (viocd_unitinfo != NULL)
 		dma_free_coherent(iSeries_vio_dev,
--- diff/drivers/char/Kconfig	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/Kconfig	2004-07-01 21:32:35.000000000 +0100
@@ -371,22 +371,6 @@
 	  If you have an Alchemy AU1000 processor (MIPS based) and you want
 	  to use serial ports, say Y.  Otherwise, say N.
 
-config SGI_L1_SERIAL
-	bool "SGI Altix L1 serial support"
-	depends on SERIAL_NONSTANDARD && IA64
-	help
-	  If you have an SGI Altix and you want to use the serial port
-	  connected to the system controller (you want this!), say Y.
-	  Otherwise, say N.
-
-config SGI_L1_SERIAL_CONSOLE
-	bool "SGI Altix L1 serial console support"
-	depends on SGI_L1_SERIAL
-	help
-	  If you have an SGI Altix and you would like to use the system
-	  controller serial port as your console (you want this!),
-	  say Y.  Otherwise, say N.
-
 config AU1000_SERIAL_CONSOLE
 	bool "Enable Au1000 serial console"
 	depends on AU1000_UART
@@ -586,17 +570,6 @@
 	  console. This driver allows each pSeries partition to have a console
 	  which is accessed via the HMC.
 
-config PC9800_OLDLP
-	tristate "NEC PC-9800 old-style printer port support"
-	depends on X86_PC9800 && !PARPORT
-	---help---
-	  If you intend to attach a printer to the parallel port of NEC PC-9801
-	  /PC-9821 with OLD compatibility mode, Say Y.
-
-config PC9800_OLDLP_CONSOLE
-	bool "Support for console on line printer"
-	depends on PC9800_OLDLP
-
 config QIC02_TAPE
 	tristate "QIC-02 tape support"
 	help
@@ -740,7 +713,7 @@
 
 config RTC
 	tristate "Enhanced Real Time Clock Support"
-	depends on !PPC32 && !PARISC && !IA64 && !X86_PC9800 && !M68K
+	depends on !PPC32 && !PARISC && !IA64 && !M68K
 	---help---
 	  If you say Y here and create a character special file /dev/rtc with
 	  major number 10 and minor number 135 using mknod ("man mknod"), you
@@ -764,6 +737,28 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called rtc.
 
+config SGI_DS1286
+	tristate "SGI DS1286 RTC support"
+	depends on SGI_IP22
+	help
+	  If you say Y here and create a character special file /dev/rtc with
+	  major number 10 and minor number 135 using mknod ("man mknod"), you
+	  will get access to the real time clock built into your computer.
+	  Every SGI has such a clock built in. It reports status information
+	  via the file /proc/rtc and its behaviour is set by various ioctls on
+	  /dev/rtc.
+
+config SGI_IP27_RTC
+	bool "SGI M48T35 RTC support"
+	depends on SGI_IP27
+	help
+	  If you say Y here and create a character special file /dev/rtc with
+	  major number 10 and minor number 135 using mknod ("man mknod"), you
+	  will get access to the real time clock built into your computer.
+	  Every SGI has such a clock built in. It reports status information
+	  via the file /proc/rtc and its behaviour is set by various ioctls on
+	  /dev/rtc.
+
 config GEN_RTC
 	tristate "Generic /dev/rtc emulation"
 	depends on RTC!=y && !IA64
@@ -793,14 +788,12 @@
 	bool "EFI Real Time Clock Services"
 	depends on IA64
 
-config RTC98
-	tristate "NEC PC-9800 Real Time Clock Support"
-	depends on X86_PC9800
-	default y
-	---help---
-	  If you say Y here and create a character special file /dev/rtc with
-	  major number 10 and minor number 135 using mknod ("man mknod"), you
-	  will get access to the real time clock (or hardware clock) built
+config COBALT_LCD
+	bool "Support for Cobalt LCD"
+	depends on MIPS_COBALT
+	help
+	  This option enables support for the LCD display and buttons found
+	  on Cobalt systems through a misc device.
 
 config H8
 	bool "Tadpole ANA H8 Support (OBSOLETE)"
@@ -957,6 +950,33 @@
           kernels.  Applications should simply open the device (eg /dev/hda1)
           with the O_DIRECT flag.
 
+config HPET
+	bool "HPET - High Precision Event Timer" if (X86 || IA64)
+	default n
+	depends on ACPI
+	help
+	  If you say Y here, you will have a miscdevice named "/dev/hpet/".  Each
+	  open selects one of the timers supported by the HPET.  The timers are
+	  non-periodioc and/or periodic.
+
+config HPET_RTC_IRQ
+	bool "HPET Control RTC IRQ" if !HPET_EMULATE_RTC
+	default n
+	depends on HPET
+	help
+	  If you say Y here, you will disable RTC_IRQ in drivers/char/rtc.c. It
+	  is assumed the platform called hpet_alloc with the RTC IRQ values for
+	  the HPET timers.
+
+config HPET_NOMMAP
+	bool "HPET - Control mmap capability."
+	default n
+	depends on HPET
+	help
+	  If you say Y here, then the mmap interface for the HPET driver returns ENOSYS.
+	  Some hardware implementations might not want all the memory in the page the
+	  HPET control registers reside to be exposed.
+
 config MAX_RAW_DEVS
 	int "Maximum number of RAW devices to support (1-8192)"
 	depends on RAW_DRIVER
--- diff/drivers/char/Makefile	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/Makefile	2004-07-01 21:32:35.000000000 +0100
@@ -41,21 +41,22 @@
 obj-$(CONFIG_RIO)		+= rio/ generic_serial.o
 obj-$(CONFIG_HVC_CONSOLE)	+= hvc_console.o
 obj-$(CONFIG_RAW_DRIVER)	+= raw.o
-obj-$(CONFIG_SGI_L1_SERIAL)	+= sn_serial.o
 obj-$(CONFIG_VIOCONS) += viocons.o
 obj-$(CONFIG_VIOTAPE)		+= viotape.o
 
 obj-$(CONFIG_PRINTER) += lp.o
 obj-$(CONFIG_TIPAR) += tipar.o
-obj-$(CONFIG_PC9800_OLDLP) += lp_old98.o
 
 obj-$(CONFIG_DTLK) += dtlk.o
 obj-$(CONFIG_R3964) += n_r3964.o
 obj-$(CONFIG_APPLICOM) += applicom.o
 obj-$(CONFIG_SONYPI) += sonypi.o
 obj-$(CONFIG_RTC) += rtc.o
+obj-$(CONFIG_HPET) += hpet.o
 obj-$(CONFIG_GEN_RTC) += genrtc.o
 obj-$(CONFIG_EFI_RTC) += efirtc.o
+obj-$(CONFIG_SGI_DS1286) += ds1286.o
+obj-$(CONFIG_SGI_IP27_RTC) += ip27-rtc.o
 ifeq ($(CONFIG_GENERIC_NVRAM),y)
   obj-$(CONFIG_NVRAM) += generic_nvram.o
 else
@@ -67,6 +68,7 @@
 obj-$(CONFIG_HW_RANDOM) += hw_random.o
 obj-$(CONFIG_QIC02_TAPE) += tpqic02.o
 obj-$(CONFIG_FTAPE) += ftape/
+obj-$(CONFIG_COBALT_LCD) += lcd.o
 obj-$(CONFIG_H8) += h8.o
 obj-$(CONFIG_PPDEV) += ppdev.o
 obj-$(CONFIG_NWBUTTON) += nwbutton.o
--- diff/drivers/char/agp/Kconfig	2004-05-19 22:11:35.000000000 +0100
+++ source/drivers/char/agp/Kconfig	2004-07-01 21:32:35.000000000 +0100
@@ -165,7 +165,7 @@
 	tristate "Transmeta Efficeon support"
 	depends on AGP && X86 && !X86_64
 	help
-	  This option fives you AGP support for the Transmeta Efficeon
+	  This option gives you AGP support for the Transmeta Efficeon
 	  series processors with integrated northbridges.
 
 	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
--- diff/drivers/char/agp/generic.c	2004-05-19 22:11:35.000000000 +0100
+++ source/drivers/char/agp/generic.c	2004-07-01 21:32:35.000000000 +0100
@@ -1,6 +1,6 @@
 /*
  * AGPGART driver.
- * Copyright (C) 2002-2003 Dave Jones.
+ * Copyright (C) 2002-2004 Dave Jones.
  * Copyright (C) 1999 Jeff Hartmann.
  * Copyright (C) 1999 Precision Insight, Inc.
  * Copyright (C) 1999 Xi Graphics, Inc.
@@ -18,12 +18,12 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
+ * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  *
- * TODO: 
+ * TODO:
  * - Allocate more than order 0 pages to avoid too much linear map splitting.
  */
 #include <linux/config.h>
@@ -37,7 +37,7 @@
 #include <linux/vmalloc.h>
 #include "agp.h"
 
-__u32 *agp_gatt_table; 
+__u32 *agp_gatt_table;
 int agp_memory_reserved;
 
 /*
@@ -46,7 +46,7 @@
  */
 EXPORT_SYMBOL_GPL(agp_memory_reserved);
 
-/* 
+/*
  * Generic routines for handling agp_memory structures -
  * They use the basic page allocation routines to do the brunt of the work.
  */
@@ -142,12 +142,12 @@
  *	agp_allocate_memory  -  allocate a group of pages of a certain type.
  *
  *	@page_count:	size_t argument of the number of pages
- *	@type:	u32 argument of the type of memory to be allocated.  
+ *	@type:	u32 argument of the type of memory to be allocated.
  *
  *	Every agp bridge device will allow you to allocate AGP_NORMAL_MEMORY which
  *	maps to physical ram.  Any other type is device dependent.
  *
- *	It returns NULL whenever memory is unavailable. 
+ *	It returns NULL whenever memory is unavailable.
  */
 struct agp_memory *agp_allocate_memory(size_t page_count, u32 type)
 {
@@ -311,7 +311,7 @@
 
 /**
  *	agp_bind_memory  -  Bind an agp_memory structure into the GATT.
- * 
+ *
  *	@curr:		agp_memory pointer
  *	@pg_start:	an offset into the graphics aperture translation table
  *
@@ -347,9 +347,9 @@
 
 /**
  *	agp_unbind_memory  -  Removes an agp_memory structure from the GATT
- * 
+ *
  * @curr:	agp_memory pointer to be removed from the GATT.
- * 
+ *
  * It returns -EINVAL if this piece of agp_memory is not currently bound to
  * the graphics aperture translation table or if the agp_memory pointer == NULL
  */
@@ -404,12 +404,18 @@
 		*cmd &= ~(AGPSTAT2_1X | AGPSTAT2_4X);	/* 2X */
 
 	if (*cmd & AGPSTAT2_1X)
-		*cmd &= ~(AGPSTAT2_2X | AGPSTAT2_4X);	/* 1Xf */
+		*cmd &= ~(AGPSTAT2_2X | AGPSTAT2_4X);	/* 1X */
 }
 
-
+/*
+ * mode = requested mode.
+ * cmd = PCI_AGP_STATUS from agp bridge.
+ * tmp = PCI_AGP_STATUS from graphic card.
+ */
 static void agp_v3_parse_one(u32 *mode, u32 *cmd, u32 *tmp)
 {
+	u32 origcmd=*cmd, origtmp=*tmp;
+
 	/* ARQSZ - Set the value to the maximum one.
 	 * Don't allow the mode register to override values. */
 	*cmd = ((*cmd & ~AGPSTAT_ARQSZ) |
@@ -452,17 +458,43 @@
 		*mode |= AGPSTAT3_4X;
 	}
 
-	if (!((*cmd & AGPSTAT3_8X) && (*tmp & AGPSTAT3_8X) && (*mode & AGPSTAT3_8X)))
-		*cmd &= ~AGPSTAT3_8X;
+	if (*mode & AGPSTAT3_8X) {
+		if (!(*cmd & AGPSTAT3_8X)) {
+			*cmd &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD);
+			*cmd |= AGPSTAT3_4X;
+			printk ("%s requested AGPx8 but bridge not capable.\n", current->comm);
+			return;
+		}
+		if (!(*tmp & AGPSTAT3_8X)) {
+			*cmd &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD);
+			*cmd |= AGPSTAT3_4X;
+			printk ("%s requested AGPx8 but graphic card not capable.\n", current->comm);
+			return;
+		}
+		/* All set, bridge & device can do AGP x8*/
+		*cmd &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD);
+		return;
 
-	if (!((*cmd & AGPSTAT3_4X) && (*tmp & AGPSTAT3_4X) && (*mode & AGPSTAT3_4X)))
-		*cmd &= ~AGPSTAT3_4X;
+	} else {
 
-	/* Clear out unwanted bits. */
-	if (*cmd & AGPSTAT3_8X)
-		*cmd &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD);
-	if (*cmd & AGPSTAT3_4X)
+		/*
+		 * If we didn't specify AGPx8, we can only do x4.
+		 * If the hardware can't do x4, we're up shit creek, and never
+		 *  should have got this far.
+		 */
 		*cmd &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD);
+		if ((*cmd & AGPSTAT3_4X) && (*tmp & AGPSTAT3_4X))
+			*cmd |= AGPSTAT3_4X;
+		else {
+			printk (KERN_INFO PFX "Badness. Don't know which AGP mode to set. "
+							"[cmd:%x tmp:%x fell back to:- cmd:%x tmp:%x]\n",
+							origcmd, origtmp, *cmd, *tmp);
+			if (!(*cmd & AGPSTAT3_4X))
+				printk (KERN_INFO PFX "Bridge couldn't do AGP x4.\n");
+			if (!(*tmp & AGPSTAT3_4X))
+				printk (KERN_INFO PFX "Graphic card couldn't do AGP x4.\n");
+		}
+	}
 }
 
 //FIXME: This doesn't smell right.
@@ -479,8 +511,10 @@
 		if (!cap_ptr)
 			continue;
 
+		//FIXME: We should probably skip anything here that
+		// isn't an AGP graphic card.
 		/*
-		 * Ok, here we have a AGP device. Disable impossible 
+		 * Ok, here we have a AGP device. Disable impossible
 		 * settings, and adjust the readqueue to the minimum.
 		 */
 		pci_read_config_dword(device, cap_ptr+PCI_AGP_STATUS, &tmp);
@@ -489,7 +523,7 @@
 		cmd = ((cmd & ~AGPSTAT_RQ_DEPTH) |
 		     min_t(u32, (mode & AGPSTAT_RQ_DEPTH),
 			 min_t(u32, (cmd & AGPSTAT_RQ_DEPTH), (tmp & AGPSTAT_RQ_DEPTH))));
-		
+
 		/* disable FW if it's not supported */
 		if (!((cmd & AGPSTAT_FW) && (tmp & AGPSTAT_FW) && (mode & AGPSTAT_FW)))
 			cmd &= ~AGPSTAT_FW;
@@ -663,7 +697,7 @@
 					    agp_bridge->current_size;
 					break;
 				}
-				temp = agp_bridge->current_size;	
+				temp = agp_bridge->current_size;
 			} else {
 				agp_bridge->aperture_size_idx = i;
 			}
@@ -684,7 +718,7 @@
 		SetPageReserved(page);
 
 	agp_bridge->gatt_table_real = (u32 *) table;
-	agp_gatt_table = (void *)table; 
+	agp_gatt_table = (void *)table;
 
 	agp_bridge->driver->cache_flush();
 	agp_bridge->gatt_table = ioremap_nocache(virt_to_phys(table),
@@ -870,9 +904,9 @@
 EXPORT_SYMBOL(agp_generic_free_by_type);
 
 
-/* 
+/*
  * Basic Page Allocation Routines -
- * These routines handle page allocation and by default they reserve the allocated 
+ * These routines handle page allocation and by default they reserve the allocated
  * memory.  They also handle incrementing the current_memory_agp value, Which is checked
  * against a maximum value.
  */
@@ -914,9 +948,9 @@
 /* End Basic Page Allocation Routines */
 
 
-/** 
+/**
  * agp_enable  -  initialise the agp point-to-point connection.
- * 
+ *
  * @mode:	agp mode register value to configure with.
  */
 void agp_enable(u32 mode)
--- diff/drivers/char/agp/sworks-agp.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/agp/sworks-agp.c	2004-07-01 21:32:35.000000000 +0100
@@ -447,6 +447,7 @@
 	struct agp_bridge_data *bridge;
 	struct pci_dev *bridge_dev;
 	u32 temp, temp2;
+	u8 cap_ptr = 0;
 
 	/* Everything is on func 1 here so we are hardcoding function one */
 	bridge_dev = pci_find_slot((unsigned int)pdev->bus->number,
@@ -457,6 +458,8 @@
 		return -ENODEV;
 	}
 
+	cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
+
 	switch (pdev->device) {
 	case 0x0006:
 		/* ServerWorks CNB20HE
@@ -470,14 +473,15 @@
 		break;
 
 	default:
-		printk(KERN_ERR PFX "Unsupported Serverworks chipset "
-				"(device id: %04x)\n", pdev->device);
+		if (cap_ptr)
+			printk(KERN_ERR PFX "Unsupported Serverworks chipset "
+					"(device id: %04x)\n", pdev->device);
 		return -ENODEV;
 	}
 
 	serverworks_private.svrwrks_dev = bridge_dev;
 	serverworks_private.gart_addr_ofs = 0x10;
-	
+
 	pci_read_config_dword(pdev, SVWRKS_APSIZE, &temp);
 	if (temp & PCI_BASE_ADDRESS_MEM_TYPE_64) {
 		pci_read_config_dword(pdev, SVWRKS_APSIZE + 4, &temp2);
--- diff/drivers/char/agp/via-agp.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/agp/via-agp.c	2004-07-01 21:32:35.000000000 +0100
@@ -434,6 +434,7 @@
 	.subvendor	= PCI_ANY_ID,			\
 	.subdevice	= PCI_ANY_ID,			\
 	}
+	ID(PCI_DEVICE_ID_VIA_82C597_0),
 	ID(PCI_DEVICE_ID_VIA_82C598_0),
 	ID(PCI_DEVICE_ID_VIA_8501_0),
 	ID(PCI_DEVICE_ID_VIA_8601_0),
--- diff/drivers/char/applicom.c	2004-05-19 22:11:33.000000000 +0100
+++ source/drivers/char/applicom.c	2004-07-01 21:32:35.000000000 +0100
@@ -105,8 +105,8 @@
 static unsigned int ReadErrorCount;	/* number of read error       */
 static unsigned int DeviceErrorCount;	/* number of device error     */
 
-static ssize_t ac_read (struct file *, char *, size_t, loff_t *);
-static ssize_t ac_write (struct file *, const char *, size_t, loff_t *);
+static ssize_t ac_read (struct file *, char __user *, size_t, loff_t *);
+static ssize_t ac_write (struct file *, const char __user *, size_t, loff_t *);
 static int ac_ioctl(struct inode *, struct file *, unsigned int,
 		    unsigned long);
 static irqreturn_t ac_interrupt(int, void *, struct pt_regs *);
@@ -343,7 +343,7 @@
 __initcall(applicom_init);
 #endif
 
-static ssize_t ac_write(struct file *file, const char *buf, size_t count, loff_t * ppos)
+static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos)
 {
 	unsigned int NumCard;	/* Board number 1 -> 8           */
 	unsigned int IndexCard;	/* Index board number 0 -> 7     */
@@ -467,7 +467,7 @@
 	return 0;
 }
 
-static int do_ac_read(int IndexCard, char *buf,
+static int do_ac_read(int IndexCard, char __user *buf,
 		struct st_ram_io *st_loc, struct mailbox *mailbox)
 {
 	unsigned long from = (unsigned long)apbs[IndexCard].RamIO + RAM_TO_PC;
@@ -521,7 +521,7 @@
 	return (sizeof(struct st_ram_io) + sizeof(struct mailbox));
 }
 
-static ssize_t ac_read (struct file *filp, char *buf, size_t count, loff_t *ptr)
+static ssize_t ac_read (struct file *filp, char __user *buf, size_t count, loff_t *ptr)
 {
 	unsigned long flags;
 	unsigned int i;
@@ -689,6 +689,7 @@
 	int ret = 0;
 	volatile unsigned char byte_reset_it;
 	struct st_ram_io *adgl;
+	void __user *argp = (void __user *)arg;
 
 	/* In general, the device is only openable by root anyway, so we're not
 	   particularly concerned that bogus ioctls can flood the console. */
@@ -697,7 +698,7 @@
 	if (!adgl)
 		return -ENOMEM;
 
-	if (copy_from_user(adgl, (void *)arg,sizeof(struct st_ram_io))) {
+	if (copy_from_user(adgl, argp, sizeof(struct st_ram_io))) {
 		kfree(adgl);
 		return -EFAULT;
 	}
@@ -721,7 +722,7 @@
 		pmem = apbs[IndexCard].RamIO;
 		for (i = 0; i < sizeof(struct st_ram_io); i++)
 			((unsigned char *)adgl)[i]=readb(pmem++);
-		if (copy_to_user((void *)arg, adgl, sizeof(struct st_ram_io)))
+		if (copy_to_user(argp, adgl, sizeof(struct st_ram_io)))
 			ret = -EFAULT;
 		break;
 	case 1:
@@ -742,7 +743,7 @@
 			(readb(apbs[IndexCard].RamIO + SERIAL_NUMBER + 1) << 8) + 
 			(readb(apbs[IndexCard].RamIO + SERIAL_NUMBER + 2) );
 
-		if (copy_to_user((void *)arg, adgl, sizeof(struct st_ram_io)))
+		if (copy_to_user(argp, adgl, sizeof(struct st_ram_io)))
 			ret = -EFAULT;
 		break;
 	case 2:
@@ -768,7 +769,7 @@
 		pmem = apbs[IndexCard].RamIO + TIC_OWNER_TO_PC;
 		adgl->tic_owner_to_pc     = readb(pmem++);
 		adgl->numcard_owner_to_pc = readb(pmem);
-		if (copy_to_user((void *)arg, adgl,sizeof(struct st_ram_io)))
+		if (copy_to_user(argp, adgl,sizeof(struct st_ram_io)))
 			ret = -EFAULT;
 		break;
 	case 5:
--- diff/drivers/char/cyclades.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/cyclades.c	2004-07-01 21:32:35.000000000 +0100
@@ -676,8 +676,6 @@
 #include <linux/stat.h>
 #include <linux/proc_fs.h>
 
-#define cy_put_user	put_user
-
 static void cy_throttle (struct tty_struct *tty);
 static void cy_send_xchar (struct tty_struct *tty, char ch);
 
@@ -3536,7 +3534,7 @@
 
 static int
 get_serial_info(struct cyclades_port * info,
-                           struct serial_struct * retinfo)
+                           struct serial_struct __user * retinfo)
 {
   struct serial_struct tmp;
   struct cyclades_card *cinfo = &cy_card[info->card];
@@ -3559,7 +3557,7 @@
 
 static int
 set_serial_info(struct cyclades_port * info,
-                           struct serial_struct * new_info)
+                           struct serial_struct __user * new_info)
 {
   struct serial_struct new_serial;
   struct cyclades_port old_info;
@@ -3613,7 +3611,7 @@
  *	    transmit holding register is empty.  This functionality
  *	    allows an RS485 driver to be written in user space.
  */
-static int get_lsr_info(struct cyclades_port *info, unsigned int *value)
+static int get_lsr_info(struct cyclades_port *info, unsigned int __user *value)
 {
     int card, chip, channel, index;
     unsigned char status;
@@ -3638,7 +3636,7 @@
 	/* Not supported yet */
 	return -EINVAL;
     }
-    return cy_put_user(result, (unsigned long *) value);
+    return put_user(result, (unsigned long __user *) value);
 }
 
 static int
@@ -3916,7 +3914,7 @@
 } /* cy_break */
 
 static int
-get_mon_info(struct cyclades_port * info, struct cyclades_monitor * mon)
+get_mon_info(struct cyclades_port * info, struct cyclades_monitor __user * mon)
 {
 
     if(copy_to_user(mon, &info->mon, sizeof(struct cyclades_monitor)))
@@ -3961,7 +3959,7 @@
 
 
 static int
-get_threshold(struct cyclades_port * info, unsigned long *value)
+get_threshold(struct cyclades_port * info, unsigned long __user *value)
 {
   unsigned char *base_addr;
   int card,channel,chip,index;
@@ -3978,7 +3976,7 @@
 		       + (cy_chip_offset[chip]<<index));
 
 	tmp = cy_readb(base_addr+(CyCOR3<<index)) & CyREC_FIFO;
-	return cy_put_user(tmp,value);
+	return put_user(tmp,value);
     } else {
 	// Nothing to do!
 	return 0;
@@ -3995,9 +3993,9 @@
 
 
 static int
-get_default_threshold(struct cyclades_port * info, unsigned long *value)
+get_default_threshold(struct cyclades_port * info, unsigned long __user *value)
 {
-    return cy_put_user(info->default_threshold,value);
+    return put_user(info->default_threshold,value);
 }/* get_default_threshold */
 
 
@@ -4029,7 +4027,7 @@
 
 
 static int
-get_timeout(struct cyclades_port * info, unsigned long *value)
+get_timeout(struct cyclades_port * info, unsigned long __user *value)
 {
   unsigned char *base_addr;
   int card,channel,chip,index;
@@ -4046,7 +4044,7 @@
 		       + (cy_chip_offset[chip]<<index));
 
 	tmp = cy_readb(base_addr+(CyRTPR<<index));
-	return cy_put_user(tmp,value);
+	return put_user(tmp,value);
     } else {
 	// Nothing to do!
 	return 0;
@@ -4063,9 +4061,9 @@
 
 
 static int
-get_default_timeout(struct cyclades_port * info, unsigned long *value)
+get_default_timeout(struct cyclades_port * info, unsigned long __user *value)
 {
-    return cy_put_user(info->default_timeout,value);
+    return put_user(info->default_timeout,value);
 }/* get_default_timeout */
 
 /*
@@ -4079,9 +4077,10 @@
 {
   struct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
   struct cyclades_icount cprev, cnow;		/* kernel counter temps */
-  struct serial_icounter_struct *p_cuser;	/* user space */
+  struct serial_icounter_struct __user *p_cuser;	/* user space */
   int ret_val = 0;
   unsigned long flags;
+  void __user *argp = (void __user *)arg;
 
     if (serial_paranoia_check(info, tty->name, "cy_ioctl"))
 	return -ENODEV;
@@ -4093,31 +4092,31 @@
 
     switch (cmd) {
         case CYGETMON:
-            ret_val = get_mon_info(info, (struct cyclades_monitor *)arg);
+            ret_val = get_mon_info(info, argp);
             break;
         case CYGETTHRESH:
-            ret_val = get_threshold(info, (unsigned long *)arg);
+            ret_val = get_threshold(info, argp);
             break;
         case CYSETTHRESH:
-            ret_val = set_threshold(info, (unsigned long)arg);
+            ret_val = set_threshold(info, arg);
             break;
         case CYGETDEFTHRESH:
-            ret_val = get_default_threshold(info, (unsigned long *)arg);
+            ret_val = get_default_threshold(info, argp);
             break;
         case CYSETDEFTHRESH:
-            ret_val = set_default_threshold(info, (unsigned long)arg);
+            ret_val = set_default_threshold(info, arg);
             break;
         case CYGETTIMEOUT:
-            ret_val = get_timeout(info, (unsigned long *)arg);
+            ret_val = get_timeout(info, argp);
             break;
         case CYSETTIMEOUT:
-            ret_val = set_timeout(info, (unsigned long)arg);
+            ret_val = set_timeout(info, arg);
             break;
         case CYGETDEFTIMEOUT:
-            ret_val = get_default_timeout(info, (unsigned long *)arg);
+            ret_val = get_default_timeout(info, argp);
             break;
         case CYSETDEFTIMEOUT:
-            ret_val = set_default_timeout(info, (unsigned long)arg);
+            ret_val = set_default_timeout(info, arg);
             break;
 	case CYSETRFLOW:
     	    info->rflow = (int)arg;
@@ -4134,7 +4133,7 @@
 	    ret_val = info->rtsdtr_inv;
 	    break;
 	case CYGETCARDINFO:
-            if (copy_to_user((void *)arg, (void *)&cy_card[info->card], 
+            if (copy_to_user(argp, &cy_card[info->card], 
 			sizeof (struct cyclades_card))) {
 		ret_val = -EFAULT;
 		break;
@@ -4161,13 +4160,13 @@
 	    ret_val = info->closing_wait / (HZ/100);
 	    break;
         case TIOCGSERIAL:
-            ret_val = get_serial_info(info, (struct serial_struct *) arg);
+            ret_val = get_serial_info(info, argp);
             break;
         case TIOCSSERIAL:
-            ret_val = set_serial_info(info, (struct serial_struct *) arg);
+            ret_val = set_serial_info(info, argp);
             break;
 	case TIOCSERGETLSR: /* Get line status register */
-	    ret_val = get_lsr_info(info, (unsigned int *) arg);
+	    ret_val = get_lsr_info(info, argp);
 	    break;
 	/*
 	 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change 
@@ -4215,7 +4214,7 @@
 	    CY_LOCK(info, flags);
 	    cnow = info->icount;
 	    CY_UNLOCK(info, flags);
-	    p_cuser = (struct serial_icounter_struct *) arg;
+	    p_cuser = argp;
 	    ret_val = put_user(cnow.cts, &p_cuser->cts);
 	    if (ret_val) return ret_val;
 	    ret_val = put_user(cnow.dsr, &p_cuser->dsr);
--- diff/drivers/char/drm/sis_mm.c	2004-05-19 22:11:36.000000000 +0100
+++ source/drivers/char/drm/sis_mm.c	2004-07-01 21:32:35.000000000 +0100
@@ -113,7 +113,7 @@
 
 	DRM_COPY_TO_USER_IOCTL((drm_sis_mem_t *)data, fb, sizeof(fb));
 
-	DRM_DEBUG("alloc fb, size = %d, offset = %ld\n", fb.size, req.offset);
+	DRM_DEBUG("alloc fb, size = %d, offset = %d\n", fb.size, req.offset);
 
 	return retval;
 }
@@ -130,7 +130,7 @@
 
 	if (!del_alloc_set(fb.context, VIDEO_TYPE, fb.free))
 		retval = DRM_ERR(EINVAL);
-	sis_free(fb.free);
+	sis_free((u32)fb.free);
 
 	DRM_DEBUG("free fb, offset = %lu\n", fb.free);
 
--- diff/drivers/char/dtlk.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/dtlk.c	2004-07-01 21:32:35.000000000 +0100
@@ -85,9 +85,9 @@
 static struct timer_list dtlk_timer;
 
 /* prototypes for file_operations struct */
-static ssize_t dtlk_read(struct file *, char *,
+static ssize_t dtlk_read(struct file *, char __user *,
 			 size_t nbytes, loff_t * ppos);
-static ssize_t dtlk_write(struct file *, const char *,
+static ssize_t dtlk_write(struct file *, const char __user *,
 			  size_t nbytes, loff_t * ppos);
 static unsigned int dtlk_poll(struct file *, poll_table *);
 static int dtlk_open(struct inode *, struct file *);
@@ -121,7 +121,7 @@
  */
 static void dtlk_timer_tick(unsigned long data);
 
-static ssize_t dtlk_read(struct file *file, char *buf,
+static ssize_t dtlk_read(struct file *file, char __user *buf,
 			 size_t count, loff_t * ppos)
 {
 	unsigned int minor = iminor(file->f_dentry->d_inode);
@@ -158,7 +158,7 @@
 	return -EAGAIN;
 }
 
-static ssize_t dtlk_write(struct file *file, const char *buf,
+static ssize_t dtlk_write(struct file *file, const char __user *buf,
 			  size_t count, loff_t * ppos)
 {
 	int i = 0, retries = 0, ch;
@@ -277,6 +277,7 @@
 		      unsigned int cmd,
 		      unsigned long arg)
 {
+	char __user *argp = (char __user *)arg;
 	struct dtlk_settings *sp;
 	char portval;
 	TRACE_TEXT(" dtlk_ioctl");
@@ -285,14 +286,13 @@
 
 	case DTLK_INTERROGATE:
 		sp = dtlk_interrogate();
-		if (copy_to_user((char *) arg, (char *) sp,
-				   sizeof(struct dtlk_settings)))
+		if (copy_to_user(argp, sp, sizeof(struct dtlk_settings)))
 			return -EINVAL;
 		return 0;
 
 	case DTLK_STATUS:
 		portval = inb_p(dtlk_port_tts);
-		return put_user(portval, (char *) arg);
+		return put_user(portval, argp);
 
 	default:
 		return -EINVAL;
--- diff/drivers/char/genrtc.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/genrtc.c	2004-07-01 21:32:35.000000000 +0100
@@ -171,7 +171,7 @@
 /*
  *	Now all the various file operations that we export.
  */
-static ssize_t gen_rtc_read(struct file *file, char *buf,
+static ssize_t gen_rtc_read(struct file *file, char __user *buf,
 			size_t count, loff_t *ppos)
 {
 	DECLARE_WAITQUEUE(wait, current);
@@ -200,10 +200,10 @@
 	/* first test allows optimizer to nuke this case for 32-bit machines */
 	if (sizeof (int) != sizeof (long) && count == sizeof (unsigned int)) {
 		unsigned int uidata = data;
-		retval = put_user(uidata, (unsigned long *)buf);
+		retval = put_user(uidata, (unsigned long __user *)buf);
 	}
 	else {
-		retval = put_user(data, (unsigned long *)buf);
+		retval = put_user(data, (unsigned long __user *)buf);
 	}
 	if (!retval)
 		retval = sizeof(unsigned long);
@@ -278,6 +278,7 @@
 {
 	struct rtc_time wtime;
 	struct rtc_pll_info pll;
+	void __user *argp = (void __user *)arg;
 
 	switch (cmd) {
 
@@ -285,13 +286,12 @@
 	    if (get_rtc_pll(&pll))
 	 	    return -EINVAL;
 	    else
-		    return copy_to_user((void *)arg, &pll, sizeof pll) ? -EFAULT : 0;
+		    return copy_to_user(argp, &pll, sizeof pll) ? -EFAULT : 0;
 
 	case RTC_PLL_SET:
 		if (!capable(CAP_SYS_TIME))
 			return -EACCES;
-		if (copy_from_user(&pll, (struct rtc_pll_info*)arg,
-				   sizeof(pll)))
+		if (copy_from_user(&pll, argp, sizeof(pll)))
 			return -EFAULT;
 	    return set_rtc_pll(&pll);
 
@@ -307,7 +307,7 @@
 		memset(&wtime, 0, sizeof(wtime));
 		get_rtc_time(&wtime);
 
-		return copy_to_user((void *)arg, &wtime, sizeof(wtime)) ? -EFAULT : 0;
+		return copy_to_user(argp, &wtime, sizeof(wtime)) ? -EFAULT : 0;
 
 	case RTC_SET_TIME:	/* Set the RTC */
 	    {
@@ -317,8 +317,7 @@
 		if (!capable(CAP_SYS_TIME))
 			return -EACCES;
 
-		if (copy_from_user(&wtime, (struct rtc_time *)arg,
-				   sizeof(wtime)))
+		if (copy_from_user(&wtime, argp, sizeof(wtime)))
 			return -EFAULT;
 
 		year = wtime.tm_year + 1900;
--- diff/drivers/char/ipmi/ipmi_bt_sm.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/ipmi/ipmi_bt_sm.c	2004-07-01 21:32:35.000000000 +0100
@@ -31,7 +31,7 @@
 #include <linux/ipmi_msgdefs.h>		/* for completion codes */
 #include "ipmi_si_sm.h"
 
-#define IPMI_BT_VERSION "v31"
+#define IPMI_BT_VERSION "v32"
 
 static int bt_debug = 0x00;	/* Production value 0, see following flags */
 
--- diff/drivers/char/ipmi/ipmi_devintf.c	2004-05-19 22:11:38.000000000 +0100
+++ source/drivers/char/ipmi/ipmi_devintf.c	2004-07-01 21:32:35.000000000 +0100
@@ -45,7 +45,7 @@
 #include <asm/semaphore.h>
 #include <linux/init.h>
 
-#define IPMI_DEVINTF_VERSION "v31"
+#define IPMI_DEVINTF_VERSION "v32"
 
 struct ipmi_file_private
 {
@@ -199,7 +199,7 @@
 			goto out;
 		}
 
-		if (copy_from_user(&msgdata,
+		if (copy_from_user(msgdata,
 				   req->msg.data,
 				   req->msg.data_len))
 		{
@@ -231,6 +231,7 @@
 {
 	int                      rv = -EINVAL;
 	struct ipmi_file_private *priv = file->private_data;
+	void __user *arg = (void __user *)data;
 
 	switch (cmd) 
 	{
@@ -238,7 +239,7 @@
 	{
 		struct ipmi_req req;
 
-		if (copy_from_user(&req, (void *) data, sizeof(req))) {
+		if (copy_from_user(&req, arg, sizeof(req))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -254,7 +255,7 @@
 	{
 		struct ipmi_req_settime req;
 
-		if (copy_from_user(&req, (void *) data, sizeof(req))) {
+		if (copy_from_user(&req, arg, sizeof(req))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -277,7 +278,7 @@
 		
 
 		rv = 0;
-		if (copy_from_user(&rsp, (void *) data, sizeof(rsp))) {
+		if (copy_from_user(&rsp, arg, sizeof(rsp))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -344,7 +345,7 @@
 			rsp.msg.data_len = 0;
 		}
 
-		if (copy_to_user((void *) data, &rsp, sizeof(rsp))) {
+		if (copy_to_user(arg, &rsp, sizeof(rsp))) {
 			rv = -EFAULT;
 			goto recv_putback_on_err;
 		}
@@ -371,7 +372,7 @@
 	{
 		struct ipmi_cmdspec val;
 
-		if (copy_from_user(&val, (void *) data, sizeof(val))) {
+		if (copy_from_user(&val, arg, sizeof(val))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -384,7 +385,7 @@
 	{
 		struct ipmi_cmdspec   val;
 
-		if (copy_from_user(&val, (void *) data, sizeof(val))) {
+		if (copy_from_user(&val, arg, sizeof(val))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -397,7 +398,7 @@
 	{
 		int val;
 
-		if (copy_from_user(&val, (void *) data, sizeof(val))) {
+		if (copy_from_user(&val, arg, sizeof(val))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -410,7 +411,7 @@
 	{
 		unsigned int val;
 
-		if (copy_from_user(&val, (void *) data, sizeof(val))) {
+		if (copy_from_user(&val, arg, sizeof(val))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -426,7 +427,7 @@
 
 		val = ipmi_get_my_address(priv->user);
 
-		if (copy_to_user((void *) data, &val, sizeof(val))) {
+		if (copy_to_user(arg, &val, sizeof(val))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -438,7 +439,7 @@
 	{
 		unsigned int val;
 
-		if (copy_from_user(&val, (void *) data, sizeof(val))) {
+		if (copy_from_user(&val, arg, sizeof(val))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -454,7 +455,7 @@
 
 		val = ipmi_get_my_LUN(priv->user);
 
-		if (copy_to_user((void *) data, &val, sizeof(val))) {
+		if (copy_to_user(arg, &val, sizeof(val))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -465,7 +466,7 @@
 	{
 		struct ipmi_timing_parms parms;
 
-		if (copy_from_user(&parms, (void *) data, sizeof(parms))) {
+		if (copy_from_user(&parms, arg, sizeof(parms))) {
 			rv = -EFAULT;
 			break;
 		}
@@ -483,7 +484,7 @@
 		parms.retries = priv->default_retries;
 		parms.retry_time_ms = priv->default_retry_time_ms;
 
-		if (copy_to_user((void *) data, &parms, sizeof(parms))) {
+		if (copy_to_user(arg, &parms, sizeof(parms))) {
 			rv = -EFAULT;
 			break;
 		}
--- diff/drivers/char/ipmi/ipmi_kcs_sm.c	2004-05-19 22:11:38.000000000 +0100
+++ source/drivers/char/ipmi/ipmi_kcs_sm.c	2004-07-01 21:32:35.000000000 +0100
@@ -42,7 +42,7 @@
 #include <linux/ipmi_msgdefs.h>		/* for completion codes */
 #include "ipmi_si_sm.h"
 
-#define IPMI_KCS_VERSION "v31"
+#define IPMI_KCS_VERSION "v32"
 
 /* Set this if you want a printout of why the state machine was hosed
    when it gets hosed. */
--- diff/drivers/char/ipmi/ipmi_msghandler.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/ipmi/ipmi_msghandler.c	2004-07-01 21:32:35.000000000 +0100
@@ -46,7 +46,7 @@
 #include <linux/init.h>
 #include <linux/proc_fs.h>
 
-#define IPMI_MSGHANDLER_VERSION "v31"
+#define IPMI_MSGHANDLER_VERSION "v32"
 
 struct ipmi_recv_msg *ipmi_alloc_recv_msg(void);
 static int ipmi_init_msghandler(void);
@@ -1648,6 +1648,22 @@
 		/* It's the one we want */
 		if (msg->rsp[2] != 0) {
 			/* Got an error from the channel, just go on. */
+
+			if (msg->rsp[2] == IPMI_INVALID_COMMAND_ERR) {
+				/* If the MC does not support this
+				   command, that is legal.  We just
+				   assume it has one IPMB at channel
+				   zero. */
+				intf->channels[0].medium
+					= IPMI_CHANNEL_MEDIUM_IPMB;
+				intf->channels[0].protocol
+					= IPMI_CHANNEL_PROTOCOL_IPMB;
+				rv = -ENOSYS;
+
+				intf->curr_channel = IPMI_MAX_CHANNELS;
+				wake_up(&intf->waitq);
+				goto out;
+			}
 			goto next_channel;
 		}
 		if (msg->rsp_size < 6) {
@@ -1671,10 +1687,20 @@
 			wake_up(&intf->waitq);
 
 			printk(KERN_WARNING "ipmi_msghandler: Error sending"
-			       "channel information: 0x%x\n",
+			       "channel information: %d\n",
 			       rv);
 		}
 	}
+ out:
+	return;
+}
+
+void ipmi_poll_interface(ipmi_user_t user)
+{
+	ipmi_smi_t intf = user->intf;
+
+	if (intf->handlers->poll)
+		intf->handlers->poll(intf->send_info);
 }
 
 int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
@@ -3154,6 +3180,7 @@
 EXPORT_SYMBOL(ipmi_request_settime);
 EXPORT_SYMBOL(ipmi_request_supply_msgs);
 EXPORT_SYMBOL(ipmi_request_with_source);
+EXPORT_SYMBOL(ipmi_poll_interface);
 EXPORT_SYMBOL(ipmi_register_smi);
 EXPORT_SYMBOL(ipmi_unregister_smi);
 EXPORT_SYMBOL(ipmi_register_for_cmd);
--- diff/drivers/char/ipmi/ipmi_si_intf.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/ipmi/ipmi_si_intf.c	2004-07-01 21:32:35.000000000 +0100
@@ -76,7 +76,7 @@
 #include "ipmi_si_sm.h"
 #include <linux/init.h>
 
-#define IPMI_SI_VERSION "v31"
+#define IPMI_SI_VERSION "v32"
 
 /* Measure times between events in the driver. */
 #undef DEBUG_TIMING
@@ -712,6 +712,13 @@
 	spin_unlock_irqrestore(&(smi_info->si_lock), flags);
 }
 
+static void poll(void *send_info)
+{
+	struct smi_info *smi_info = send_info;
+
+	smi_event_handler(smi_info, 0);
+}
+
 static void request_events(void *send_info)
 {
 	struct smi_info *smi_info = send_info;
@@ -851,7 +858,8 @@
 	.owner                  = THIS_MODULE,
 	.sender			= sender,
 	.request_events		= request_events,
-	.set_run_to_completion  = set_run_to_completion
+	.set_run_to_completion  = set_run_to_completion,
+	.poll			= poll,
 };
 
 /* There can be 4 IO ports passed in (with or without IRQs), 4 addresses,
@@ -1124,7 +1132,7 @@
 static int acpi_failure = 0;
 
 /* For GPE-type interrupts. */
-void ipmi_acpi_gpe(void *context)
+u32 ipmi_acpi_gpe(void *context)
 {
 	struct smi_info *smi_info = context;
 	unsigned long   flags;
@@ -1148,6 +1156,7 @@
 	smi_event_handler(smi_info, 0);
  out:
 	spin_unlock_irqrestore(&(smi_info->si_lock), flags);
+	return 0;
 }
 
 static int acpi_gpe_irq_setup(struct smi_info *info)
@@ -1848,6 +1857,21 @@
 	atomic_set(&new_smi->req_events, 0);
 	new_smi->run_to_completion = 0;
 
+	new_smi->interrupt_disabled = 0;
+	new_smi->timer_stopped = 0;
+	new_smi->stop_operation = 0;
+
+	/* The ipmi_register_smi() code does some operations to
+	   determine the channel information, so we must be ready to
+	   handle operations before it is called.  This means we have
+	   to stop the timer if we get an error after this point. */
+	init_timer(&(new_smi->si_timer));
+	new_smi->si_timer.data = (long) new_smi;
+	new_smi->si_timer.function = smi_timeout;
+	new_smi->last_timeout_jiffies = jiffies;
+	new_smi->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES;
+	add_timer(&(new_smi->si_timer));
+
 	rv = ipmi_register_smi(&handlers,
 			       new_smi,
 			       new_smi->ipmi_version_major,
@@ -1857,7 +1881,7 @@
 		printk(KERN_ERR
 		       "ipmi_si: Unable to register device: error %d\n",
 		       rv);
-		goto out_err;
+		goto out_err_stop_timer;
 	}
 
 	rv = ipmi_smi_add_proc_entry(new_smi->intf, "type",
@@ -1867,7 +1891,7 @@
 		printk(KERN_ERR
 		       "ipmi_si: Unable to create proc entry: %d\n",
 		       rv);
-		goto out_err;
+		goto out_err_stop_timer;
 	}
 
 	rv = ipmi_smi_add_proc_entry(new_smi->intf, "si_stats",
@@ -1877,7 +1901,7 @@
 		printk(KERN_ERR
 		       "ipmi_si: Unable to create proc entry: %d\n",
 		       rv);
-		goto out_err;
+		goto out_err_stop_timer;
 	}
 
 	start_clear_flags(new_smi);
@@ -1886,34 +1910,40 @@
 	if (new_smi->irq)
 		new_smi->si_state = SI_CLEARING_FLAGS_THEN_SET_IRQ;
 
-	new_smi->interrupt_disabled = 0;
-	new_smi->timer_stopped = 0;
-	new_smi->stop_operation = 0;
-
-	init_timer(&(new_smi->si_timer));
-	new_smi->si_timer.data = (long) new_smi;
-	new_smi->si_timer.function = smi_timeout;
-	new_smi->last_timeout_jiffies = jiffies;
-	new_smi->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES;
-	add_timer(&(new_smi->si_timer));
-
 	*smi = new_smi;
 
 	printk(" IPMI %s interface initialized\n", si_type[intf_num]);
 
 	return 0;
 
+ out_err_stop_timer:
+	new_smi->stop_operation = 1;
+
+	/* Wait for the timer to stop.  This avoids problems with race
+	   conditions removing the timer here. */
+	while (!new_smi->timer_stopped) {
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(1);
+	}
+
  out_err:
 	if (new_smi->intf)
 		ipmi_unregister_smi(new_smi->intf);
 
 	new_smi->irq_cleanup(new_smi);
+
+	/* Wait until we know that we are out of any interrupt
+	   handlers might have been running before we freed the
+	   interrupt. */
+	synchronize_kernel();
+
 	if (new_smi->si_sm) {
 		if (new_smi->handlers)
 			new_smi->handlers->cleanup(new_smi->si_sm);
 		kfree(new_smi->si_sm);
 	}
 	new_smi->io_cleanup(new_smi);
+
 	return rv;
 }
 
--- diff/drivers/char/ipmi/ipmi_smic_sm.c	2004-05-19 22:11:38.000000000 +0100
+++ source/drivers/char/ipmi/ipmi_smic_sm.c	2004-07-01 21:32:35.000000000 +0100
@@ -46,7 +46,7 @@
 #include <linux/ipmi_msgdefs.h>		/* for completion codes */
 #include "ipmi_si_sm.h"
 
-#define IPMI_SMIC_VERSION "v31"
+#define IPMI_SMIC_VERSION "v32"
 
 /* smic_debug is a bit-field
  *	SMIC_DEBUG_ENABLE -	turned on for now
--- diff/drivers/char/ipmi/ipmi_watchdog.c	2004-05-19 22:11:38.000000000 +0100
+++ source/drivers/char/ipmi/ipmi_watchdog.c	2004-07-01 21:32:35.000000000 +0100
@@ -51,7 +51,7 @@
 #include <asm/apic.h>
 #endif
 
-#define IPMI_WATCHDOG_VERSION "v31"
+#define IPMI_WATCHDOG_VERSION "v32"
 
 /*
  * The IPMI command/response information for the watchdog timer.
@@ -515,40 +515,37 @@
 static int ipmi_ioctl(struct inode *inode, struct file *file,
 		      unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
 	int i;
 	int val;
 
 	switch(cmd) {
 	case WDIOC_GETSUPPORT:
-		i = copy_to_user((void*)arg, &ident, sizeof(ident));
+		i = copy_to_user(argp, &ident, sizeof(ident));
 		return i ? -EFAULT : 0;
 
 	case WDIOC_SETTIMEOUT:
-		i = copy_from_user(&val, (void *) arg, sizeof(int));
+		i = copy_from_user(&val, argp, sizeof(int));
 		if (i)
 			return -EFAULT;
 		timeout = val;
 		return ipmi_set_timeout(IPMI_SET_TIMEOUT_HB_IF_NECESSARY);
 
 	case WDIOC_GETTIMEOUT:
-		i = copy_to_user((void *) arg,
-				 &timeout,
-				 sizeof(timeout));
+		i = copy_to_user(argp, &timeout, sizeof(timeout));
 		if (i)
 			return -EFAULT;
 		return 0;
 
 	case WDIOC_SET_PRETIMEOUT:
-		i = copy_from_user(&val, (void *) arg, sizeof(int));
+		i = copy_from_user(&val, argp, sizeof(int));
 		if (i)
 			return -EFAULT;
 		pretimeout = val;
 		return ipmi_set_timeout(IPMI_SET_TIMEOUT_HB_IF_NECESSARY);
 
 	case WDIOC_GET_PRETIMEOUT:
-		i = copy_to_user((void *) arg,
-				 &pretimeout,
-				 sizeof(pretimeout));
+		i = copy_to_user(argp, &pretimeout, sizeof(pretimeout));
 		if (i)
 			return -EFAULT;
 		return 0;
@@ -557,7 +554,7 @@
 		return ipmi_heartbeat();
 
 	case WDIOC_SETOPTIONS:
-		i = copy_from_user(&val, (void *) arg, sizeof(int));
+		i = copy_from_user(&val, argp, sizeof(int));
 		if (i)
 			return -EFAULT;
 		if (val & WDIOS_DISABLECARD)
@@ -576,7 +573,7 @@
 
 	case WDIOC_GETSTATUS:
 		val = 0;
-		i = copy_to_user((void *) arg, &val, sizeof(val));
+		i = copy_to_user(argp, &val, sizeof(val));
 		if (i)
 			return -EFAULT;
 		return 0;
@@ -587,7 +584,7 @@
 }
 
 static ssize_t ipmi_write(struct file *file,
-			  const char  *buf,
+			  const char  __user *buf,
 			  size_t      len,
 			  loff_t      *ppos)
 {
@@ -607,7 +604,7 @@
 }
 
 static ssize_t ipmi_read(struct file *file,
-			 char        *buf,
+			 char        __user *buf,
 			 size_t      count,
 			 loff_t      *ppos)
 {
@@ -883,14 +880,12 @@
 
 	/* On a panic, if we have a panic timeout, make sure that the thing
 	   reboots, even if it hangs during that panic. */
-	if (watchdog_user && !panic_event_handled && (panic_timeout > 0)) {
+	if (watchdog_user && !panic_event_handled) {
 		/* Make sure the panic doesn't hang, and make sure we
 		   do this only once. */
 		panic_event_handled = 1;
 	    
-		timeout = panic_timeout + 120;
-		if (timeout > 255)
-			timeout = 255;
+		timeout = 255;
 		pretimeout = 0;
 		ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
 		panic_halt_ipmi_set_timeout();
--- diff/drivers/char/istallion.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/istallion.c	2004-07-01 21:32:35.000000000 +0100
@@ -851,7 +851,7 @@
 	i = tty_unregister_driver(stli_serial);
 	if (i) {
 		printk("STALLION: failed to un-register tty driver, "
-			"errno=%d,%d\n", -i);
+			"errno=%d\n", -i);
 		restore_flags(flags);
 		return;
 	}
--- diff/drivers/char/keyboard.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/keyboard.c	2004-07-01 21:32:35.000000000 +0100
@@ -52,13 +52,12 @@
 
 /*
  * Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
- * This seems a good reason to start with NumLock off. On PC9800 and HIL keyboards 
+ * This seems a good reason to start with NumLock off. On HIL keyboards
  * of PARISC machines however there is no NumLock key and everyone expects the keypad 
  * to be used for numbers.
  */
 
-#if defined(CONFIG_X86_PC9800) || \
-    defined(CONFIG_PARISC) && (defined(CONFIG_KEYBOARD_HIL) || defined(CONFIG_KEYBOARD_HIL_OLD))
+#if defined(CONFIG_PARISC) && (defined(CONFIG_KEYBOARD_HIL) || defined(CONFIG_KEYBOARD_HIL_OLD))
 #define KBD_DEFLEDS (1 << VC_NUMLOCK)
 #else
 #define KBD_DEFLEDS 0
@@ -124,7 +123,7 @@
  */
 
 static struct input_handler kbd_handler;
-static unsigned long key_down[256/BITS_PER_LONG];	/* keyboard key bitmap */
+static unsigned long key_down[NBITS(KEY_MAX)];		/* keyboard key bitmap */
 static unsigned char shift_down[NR_SHIFT];		/* shift state counters.. */
 static int dead_key_next;
 static int npadch = -1;					/* -1 or number assembled on pad */
@@ -143,7 +142,7 @@
 /* Simple translation table for the SysRq keys */
 
 #ifdef CONFIG_MAGIC_SYSRQ
-unsigned char kbd_sysrq_xlate[128] =
+unsigned char kbd_sysrq_xlate[KEY_MAX] =
         "\000\0331234567890-=\177\t"                    /* 0x00 - 0x0f */
         "qwertyuiop[]\r\000as"                          /* 0x10 - 0x1f */
         "dfghjkl;'`\000\\zxcv"                          /* 0x20 - 0x2f */
@@ -940,7 +939,10 @@
 	tasklet_enable(&keyboard_tasklet);
 }
 
-#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SH_MPC1211)
+#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH)
+
+#define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\
+			((dev)->id.bustype == BUS_I8042) && ((dev)->id.vendor == 0x0001) && ((dev)->id.product == 0x0001))
 
 static unsigned short x86_keycodes[256] =
 	{ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
@@ -1008,6 +1010,8 @@
 
 #else
 
+#define HW_RAW(dev)	0
+
 #warning "Cannot generate rawmode keyboard for your architecture yet."
 
 static int emulate_raw(struct vc_data *vc, unsigned int keycode, unsigned char up_flag)
@@ -1020,7 +1024,15 @@
 }
 #endif
 
-void kbd_keycode(unsigned int keycode, int down, struct pt_regs *regs)
+void kbd_rawcode(unsigned char data)
+{
+	struct vc_data *vc = vc_cons[fg_console].d;
+	kbd = kbd_table + fg_console;
+	if (kbd->kbdmode == VC_RAW)
+		put_queue(vc, data);
+}
+
+void kbd_keycode(unsigned int keycode, int down, int hw_raw, struct pt_regs *regs)
 {
 	struct vc_data *vc = vc_cons[fg_console].d;
 	unsigned short keysym, *key_map;
@@ -1054,7 +1066,7 @@
 		return;
 #endif /* CONFIG_MAC_EMUMOUSEBTN */
 
-	if ((raw_mode = (kbd->kbdmode == VC_RAW)))
+	if ((raw_mode = (kbd->kbdmode == VC_RAW)) && !hw_raw)
 		if (emulate_raw(vc, keycode, !down << 7))
 			if (keycode < BTN_MISC)
 				printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);
@@ -1066,6 +1078,9 @@
 	}
 	if (sysrq_down && down && !rep) {
 		handle_sysrq(kbd_sysrq_xlate[keycode], regs, tty);
+#ifdef CONFIG_KGDB_SYSRQ
+                sysrq_down = 0;        /* in case we miss the "up" event */
+#endif
 		return;
 	}
 #endif
@@ -1120,6 +1135,9 @@
 		return;
 	}
 
+	if (keycode > NR_KEYS)
+		return;
+
 	keysym = key_map[keycode];
 	type = KTYP(keysym);
 
@@ -1149,11 +1167,12 @@
 }
 
 static void kbd_event(struct input_handle *handle, unsigned int event_type, 
-		      unsigned int keycode, int down)
+		      unsigned int event_code, int value)
 {
-	if (event_type != EV_KEY)
-		return;
-	kbd_keycode(keycode, down, handle->dev->regs);
+	if (event_type == EV_MSC && event_code == MSC_RAW && HW_RAW(handle->dev))
+		kbd_rawcode(value);
+	if (event_type == EV_KEY)
+		kbd_keycode(event_code, value, HW_RAW(handle->dev), handle->dev->regs);
 	tasklet_schedule(&keyboard_tasklet);
 	do_poke_blanked_console = 1;
 	schedule_console_callback();
--- diff/drivers/char/lcd.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/lcd.c	2004-07-01 21:32:35.000000000 +0100
@@ -12,7 +12,7 @@
  *
  */
 
-#define RTC_IO_EXTENT	0x10    /*Only really two ports, but...	*/
+#define RTC_IO_EXTENT	0x10	/*Only really two ports, but... */
 
 #include <linux/config.h>
 #include <linux/types.h>
@@ -32,8 +32,8 @@
 
 #include "lcd.h"
 
-static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 
-                     unsigned long arg);
+static int lcd_ioctl(struct inode *inode, struct file *file,
+		     unsigned int cmd, unsigned long arg);
 
 static int lcd_present = 1;
 
@@ -57,8 +57,8 @@
 }
 #endif
 
-static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 
-			unsigned long arg)
+static int lcd_ioctl(struct inode *inode, struct file *file,
+		     unsigned int cmd, unsigned long arg)
 {
 	struct lcd_display button_display;
 	unsigned long address, a;
@@ -69,7 +69,7 @@
 		udelay(150);
 		BusyCheck();
 		LCDWriteInst(0x0F);
-		break;		
+		break;
 
 	case LCD_Off:
 		udelay(150);
@@ -95,7 +95,7 @@
 	case LCD_Clear:
 		udelay(150);
 		BusyCheck();
-       		LCDWriteInst(0x01);     
+		LCDWriteInst(0x01);
 		break;
 
 	case LCD_Cursor_Left:
@@ -108,86 +108,95 @@
 		udelay(150);
 		BusyCheck();
 		LCDWriteInst(0x14);
-		break;	
+		break;
 
 	case LCD_Cursor_Off:
 		udelay(150);
-                BusyCheck();
-                LCDWriteInst(0x0C);
-	        break;
-
-        case LCD_Cursor_On:
-                udelay(150);
-                BusyCheck();
-                LCDWriteInst(0x0F);
-                break;
-
-        case LCD_Blink_Off:
-                udelay(150);
-                BusyCheck();
-                LCDWriteInst(0x0E);
-                break;
-
-	case LCD_Get_Cursor_Pos:{
-                struct lcd_display display;
+		BusyCheck();
+		LCDWriteInst(0x0C);
+		break;
 
+	case LCD_Cursor_On:
 		udelay(150);
-                BusyCheck();
-		display.cursor_address = ( LCDReadInst ); 
-		display.cursor_address = ( display.cursor_address & 0x07F );
-		if(copy_to_user((struct lcd_display*)arg, &display, sizeof(struct lcd_display)))
-		  return -EFAULT;
+		BusyCheck();
+		LCDWriteInst(0x0F);
+		break;
 
+	case LCD_Blink_Off:
+		udelay(150);
+		BusyCheck();
+		LCDWriteInst(0x0E);
 		break;
+
+	case LCD_Get_Cursor_Pos:{
+			struct lcd_display display;
+
+			udelay(150);
+			BusyCheck();
+			display.cursor_address = (LCDReadInst);
+			display.cursor_address =
+			    (display.cursor_address & 0x07F);
+			if (copy_to_user
+			    ((struct lcd_display *) arg, &display,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
+
+			break;
 		}
 
 
-	case LCD_Set_Cursor_Pos: {
-                struct lcd_display display;
+	case LCD_Set_Cursor_Pos:{
+			struct lcd_display display;
 
-                if(copy_from_user(&display, (struct lcd_display*)arg, sizeof(struct lcd_display)))
-		  return -EFAULT;
+			if (copy_from_user
+			    (&display, (struct lcd_display *) arg,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
 
-		a = (display.cursor_address | kLCD_Addr ); 
+			a = (display.cursor_address | kLCD_Addr);
 
-                udelay(150);
-                BusyCheck();    
-                LCDWriteInst( a );
+			udelay(150);
+			BusyCheck();
+			LCDWriteInst(a);
 
-                break;
+			break;
 		}
-	
-	case LCD_Get_Cursor: {
-                struct lcd_display display;
 
-                udelay(150);
-                BusyCheck();    
-		display.character = LCDReadData;	
+	case LCD_Get_Cursor:{
+			struct lcd_display display;
 
-		if(copy_to_user((struct lcd_display*)arg, &display, sizeof(struct lcd_display)))
-		  return -EFAULT;
-                udelay(150);
-                BusyCheck();
-                LCDWriteInst(0x10);
+			udelay(150);
+			BusyCheck();
+			display.character = LCDReadData;
 
-		break;
+			if (copy_to_user
+			    ((struct lcd_display *) arg, &display,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
+			udelay(150);
+			BusyCheck();
+			LCDWriteInst(0x10);
+
+			break;
 		}
 
 	case LCD_Set_Cursor:{
-                struct lcd_display display;
-   
-                if(copy_from_user(&display, (struct lcd_display*)arg, sizeof(struct lcd_display)))
-		  return -EFAULT;
-
-                udelay(150);
-		BusyCheck();    
-                LCDWriteData( display.character );
-                udelay(150);
-                BusyCheck();
-                LCDWriteInst(0x10);
+			struct lcd_display display;
 
-                break;
-                }
+			if (copy_from_user
+			    (&display, (struct lcd_display *) arg,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
+
+			udelay(150);
+			BusyCheck();
+			LCDWriteData(display.character);
+			udelay(150);
+			BusyCheck();
+			LCDWriteInst(0x10);
+
+			break;
+		}
 
 
 	case LCD_Disp_Left:
@@ -208,294 +217,330 @@
 		LCDWriteInst(0x02);
 		break;
 
-	case LCD_Write: {
-		struct lcd_display display;
-   
+	case LCD_Write:{
+			struct lcd_display display;
+
+
+			if (copy_from_user
+			    (&display, (struct lcd_display *) arg,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
 
-                if(copy_from_user(&display, (struct lcd_display*)arg, sizeof(struct lcd_display)))
-		  return -EFAULT;
- 
-		udelay(150);
-                BusyCheck();    
-                LCDWriteInst(0x80);
-		udelay(150);
-		BusyCheck();
-	
-		for (index = 0; index < (display.size1); index++) {
 			udelay(150);
-			BusyCheck();	
-			LCDWriteData( display.line1[index]);
-			BusyCheck();	
-		}		
-		
-		udelay(150);
-		BusyCheck();	
-		LCDWriteInst(0xC0);	
-		udelay(150);
-		BusyCheck();	
-                for (index = 0; index < (display.size2); index++) {
-                        udelay(150);
-                        BusyCheck();    
-                        LCDWriteData( display.line2[index]);
-		}
- 
-		break;	
-	}
-	
-	case LCD_Read: {	
-        	struct lcd_display display;
+			BusyCheck();
+			LCDWriteInst(0x80);
+			udelay(150);
+			BusyCheck();
 
-		BusyCheck();
-		for (address = kDD_R00; address <= kDD_R01; address++) {
-			a = (address | kLCD_Addr );	
+			for (index = 0; index < (display.size1); index++) {
+				udelay(150);
+				BusyCheck();
+				LCDWriteData(display.line1[index]);
+				BusyCheck();
+			}
 
 			udelay(150);
 			BusyCheck();
-			LCDWriteInst( a );
+			LCDWriteInst(0xC0);
 			udelay(150);
 			BusyCheck();
-			display.line1[address] = LCDReadData;
+			for (index = 0; index < (display.size2); index++) {
+				udelay(150);
+				BusyCheck();
+				LCDWriteData(display.line2[index]);
+			}
+
+			break;
 		}
 
-		display.line1[ 0x27 ] = '\0';
-	
-		for (address = kDD_R10; address <= kDD_R11; address++) {
-			a = (address | kLCD_Addr );     
-        
-			udelay(150);
-	 		BusyCheck();
-        		LCDWriteInst( a );
-       
-        		udelay(150);
-	 		BusyCheck();
-        		display.line2[address - 0x40 ] = LCDReadData;
-		 }
-
-		display.line2[ 0x27 ] = '\0';
-
-		if(copy_to_user((struct lcd_display*)arg, &display,
-				sizeof(struct lcd_display)))
-		  return -EFAULT;
-		break;
-	}
+	case LCD_Read:{
+			struct lcd_display display;
+
+			BusyCheck();
+			for (address = kDD_R00; address <= kDD_R01;
+			     address++) {
+				a = (address | kLCD_Addr);
+
+				udelay(150);
+				BusyCheck();
+				LCDWriteInst(a);
+				udelay(150);
+				BusyCheck();
+				display.line1[address] = LCDReadData;
+			}
 
-//  set all GPIO leds to led_display.leds 
+			display.line1[0x27] = '\0';
 
-	case LED_Set: {	
-		struct lcd_display led_display;
-	
+			for (address = kDD_R10; address <= kDD_R11;
+			     address++) {
+				a = (address | kLCD_Addr);
+
+				udelay(150);
+				BusyCheck();
+				LCDWriteInst(a);
+
+				udelay(150);
+				BusyCheck();
+				display.line2[address - 0x40] =
+				    LCDReadData;
+			}
+
+			display.line2[0x27] = '\0';
 
-	        if(copy_from_user(&led_display, (struct lcd_display*)arg,
-				  sizeof(struct lcd_display)))
-		  return -EFAULT;
+			if (copy_to_user
+			    ((struct lcd_display *) arg, &display,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
+			break;
+		}
 
-		led_state = led_display.leds;
-		LEDSet(led_state);
+//  set all GPIO leds to led_display.leds
 
-        	break;
-	}
+	case LED_Set:{
+			struct lcd_display led_display;
+
+
+			if (copy_from_user
+			    (&led_display, (struct lcd_display *) arg,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
+
+			led_state = led_display.leds;
+			LEDSet(led_state);
+
+			break;
+		}
 
 
 //  set only bit led_display.leds
 
-        case LED_Bit_Set: {
-                int i;
-		int bit=1;
-                struct lcd_display led_display;
+	case LED_Bit_Set:{
+			int i;
+			int bit = 1;
+			struct lcd_display led_display;
 
 
-                if(copy_from_user(&led_display, (struct lcd_display*)arg,
-				  sizeof(struct lcd_display)))
-		  return -EFAULT;
+			if (copy_from_user
+			    (&led_display, (struct lcd_display *) arg,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
 
-		for (i=0;i<(int)led_display.leds;i++)
-			{
-				bit = 2*bit;	
+			for (i = 0; i < (int) led_display.leds; i++) {
+				bit = 2 * bit;
 			}
 
-		led_state = led_state | bit;
-                LEDSet(led_state);
-                break;
-        }
+			led_state = led_state | bit;
+			LEDSet(led_state);
+			break;
+		}
 
 //  clear only bit led_display.leds
 
-        case LED_Bit_Clear: {
-                int i;
-		int bit=1;
-                struct lcd_display led_display;
-
-
-                if(copy_from_user(&led_display, (struct lcd_display*)arg,
-				  sizeof(struct lcd_display)))
-		  return -EFAULT;
-
-                for (i=0;i<(int)led_display.leds;i++)
-                        {
-                                bit = 2*bit;
-                        }
-
-		led_state = led_state &  ~bit;
-                LEDSet(led_state);
-                break;
-        }
-
-
-	case BUTTON_Read: {
-		button_display.buttons = GPIRead;
-                if(copy_to_user((struct lcd_display*)arg, &button_display, sizeof(struct lcd_display)))
-		  return -EFAULT;
-		break;
-	}
+	case LED_Bit_Clear:{
+			int i;
+			int bit = 1;
+			struct lcd_display led_display;
 
-        case LINK_Check: {
-                button_display.buttons = *((volatile unsigned long *) (0xB0100060) );
-                if(copy_to_user((struct lcd_display*)arg, &button_display, sizeof(struct lcd_display)))
-		  return -EFAULT;
-                break;
-        }
-
-	case LINK_Check_2: {
-		int iface_num;
-
-		/* panel-utils should pass in the desired interface status is wanted for
-		 * in "buttons" of the structure.  We will set this to non-zero if the
-		 * link is in fact up for the requested interface.  --DaveM
-		 */
-		if(copy_from_user(&button_display, (struct lcd_display *)arg, sizeof(button_display)))
-		  return -EFAULT;
-		iface_num = button_display.buttons;
-#if defined(CONFIG_TULIP) && 0
-		if (iface_num >= 0 &&
-		    iface_num < MAX_INTERFACES &&
-		    linkcheck_callbacks[iface_num] != NULL) {
-			button_display.buttons =
-				linkcheck_callbacks[iface_num](linkcheck_cookies[iface_num]);
-		} else
-#endif
-			button_display.buttons = 0;
-
-                if(__copy_to_user((struct lcd_display*)arg, &button_display, sizeof(struct lcd_display)))
-		  return -EFAULT;
-                break;
-	}
 
-//  Erase the flash
+			if (copy_from_user
+			    (&led_display, (struct lcd_display *) arg,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
 
-	case FLASH_Erase: {
+			for (i = 0; i < (int) led_display.leds; i++) {
+				bit = 2 * bit;
+			}
 
-		int ctr=0;
+			led_state = led_state & ~bit;
+			LEDSet(led_state);
+			break;
+		}
 
-		    // Chip Erase Sequence
-		WRITE_FLASH( kFlash_Addr1, kFlash_Data1 );
-		WRITE_FLASH( kFlash_Addr2, kFlash_Data2 );
-		WRITE_FLASH( kFlash_Addr1, kFlash_Erase3 );
-		WRITE_FLASH( kFlash_Addr1, kFlash_Data1 );
-		WRITE_FLASH( kFlash_Addr2, kFlash_Data2 );
-		WRITE_FLASH( kFlash_Addr1, kFlash_Erase6 );
 
-		printk( "Erasing Flash.\n");
+	case BUTTON_Read:{
+			button_display.buttons = GPIRead;
+			if (copy_to_user
+			    ((struct lcd_display *) arg, &button_display,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
+			break;
+		}
 
-		while ( (!dqpoll(0x00000000,0xFF)) && (!timeout(0x00000000)) ) {
-		    ctr++;
+	case LINK_Check:{
+			button_display.buttons =
+			    *((volatile unsigned long *) (0xB0100060));
+			if (copy_to_user
+			    ((struct lcd_display *) arg, &button_display,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
+			break;
 		}
 
-		printk("\n");
-		printk("\n");
-		printk("\n");
+	case LINK_Check_2:{
+			int iface_num;
 
-		if (READ_FLASH(0x07FFF0)==0xFF) { printk("Erase Successful\r\n"); }
-		else if (timeout) { printk("Erase Timed Out\r\n"); }
+			/* panel-utils should pass in the desired interface status is wanted for
+			 * in "buttons" of the structure.  We will set this to non-zero if the
+			 * link is in fact up for the requested interface.  --DaveM
+			 */
+			if (copy_from_user
+			    (&button_display, (struct lcd_display *) arg,
+			     sizeof(button_display)))
+				return -EFAULT;
+			iface_num = button_display.buttons;
+#if defined(CONFIG_TULIP) && 0
+			if (iface_num >= 0 &&
+			    iface_num < MAX_INTERFACES &&
+			    linkcheck_callbacks[iface_num] != NULL) {
+				button_display.buttons =
+				    linkcheck_callbacks[iface_num]
+				    (linkcheck_cookies[iface_num]);
+			} else
+#endif
+				button_display.buttons = 0;
 
-	break;
-	}
+			if (__copy_to_user
+			    ((struct lcd_display *) arg, &button_display,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
+			break;
+		}
 
-// burn the flash 
+//  Erase the flash
 
-	case FLASH_Burn: {
+	case FLASH_Erase:{
 
-		volatile unsigned long burn_addr;
-		unsigned long flags;
-		int i;
-		unsigned char *rom;
-		
-
-                struct lcd_display display;
-
-                if(copy_from_user(&display, (struct lcd_display*)arg, sizeof(struct lcd_display)))
-		  return -EFAULT;
-		rom = (unsigned char *) kmalloc((128),GFP_ATOMIC);
-                if ( rom == NULL ) {
-                       printk ("broken\n");
-                       return 1;
-                   }
-
-		printk("Churning and Burning -");
-		save_flags(flags);
-		for (i=0; i<FLASH_SIZE; i=i+128) {
-
-		        if(copy_from_user(rom, display.RomImage + i, 128))
-			   return -EFAULT;
-			burn_addr = kFlashBase + i;
-			cli();
-			for ( index = 0; index < ( 128 ) ; index++ ) 
-		  	  {
-
-				WRITE_FLASH( kFlash_Addr1, kFlash_Data1 );
-		 	    	WRITE_FLASH( kFlash_Addr2, kFlash_Data2 );
-		 	    	WRITE_FLASH( kFlash_Addr1, kFlash_Prog );
-		 	    	*((volatile unsigned char *)burn_addr) = (volatile unsigned char) rom[index];
-
-		   	 	 while ( (!dqpoll(burn_addr,(volatile unsigned char) rom[index])) && (!timeout(burn_addr)) ) {
-		  	   		}
-		  	   	burn_addr++;
-		  	  }
-			restore_flags(flags);
-                	if ( *((volatile unsigned char *)(burn_addr-1)) == (volatile unsigned char) rom[index-1]  ) {
-               		 } else if (timeout) {
-                	    printk("Program timed out\r\n");
-               		 }
+			int ctr = 0;
 
+			// Chip Erase Sequence
+			WRITE_FLASH(kFlash_Addr1, kFlash_Data1);
+			WRITE_FLASH(kFlash_Addr2, kFlash_Data2);
+			WRITE_FLASH(kFlash_Addr1, kFlash_Erase3);
+			WRITE_FLASH(kFlash_Addr1, kFlash_Data1);
+			WRITE_FLASH(kFlash_Addr2, kFlash_Data2);
+			WRITE_FLASH(kFlash_Addr1, kFlash_Erase6);
+
+			printk("Erasing Flash.\n");
+
+			while ((!dqpoll(0x00000000, 0xFF))
+			       && (!timeout(0x00000000))) {
+				ctr++;
+			}
+
+			printk("\n");
+			printk("\n");
+			printk("\n");
+
+			if (READ_FLASH(0x07FFF0) == 0xFF) {
+				printk("Erase Successful\r\n");
+			} else if (timeout) {
+				printk("Erase Timed Out\r\n");
+			}
 
+			break;
 		}
-		kfree(rom);
 
-	break;
-	}
+// burn the flash
 
-//  read the flash all at once 
-	
-	case FLASH_Read: {
+	case FLASH_Burn:{
 
-		unsigned char *user_bytes;
-                volatile unsigned long read_addr;
-                int i;
+			volatile unsigned long burn_addr;
+			unsigned long flags;
+			int i;
+			unsigned char *rom;
+
+
+			struct lcd_display display;
+
+			if (copy_from_user
+			    (&display, (struct lcd_display *) arg,
+			     sizeof(struct lcd_display)))
+				return -EFAULT;
+			rom = (unsigned char *) kmalloc((128), GFP_ATOMIC);
+			if (rom == NULL) {
+				printk("broken\n");
+				return 1;
+			}
 
-		user_bytes = &(((struct lcd_display *)arg)->RomImage[0]);
+			printk("Churning and Burning -");
+			save_flags(flags);
+			for (i = 0; i < FLASH_SIZE; i = i + 128) {
+
+				if (copy_from_user
+				    (rom, display.RomImage + i, 128))
+					return -EFAULT;
+				burn_addr = kFlashBase + i;
+				cli();
+				for (index = 0; index < (128); index++) {
+
+					WRITE_FLASH(kFlash_Addr1,
+						    kFlash_Data1);
+					WRITE_FLASH(kFlash_Addr2,
+						    kFlash_Data2);
+					WRITE_FLASH(kFlash_Addr1,
+						    kFlash_Prog);
+					*((volatile unsigned char *)
+					  burn_addr) =
+		 (volatile unsigned char) rom[index];
+
+					while ((!dqpoll
+						(burn_addr,
+						 (volatile unsigned char)
+						 rom[index]))
+					       && (!timeout(burn_addr))) {
+					}
+					burn_addr++;
+				}
+				restore_flags(flags);
+				if (*
+				    ((volatile unsigned char *) (burn_addr
+								 - 1)) ==
+				    (volatile unsigned char) rom[index -
+								 1]) {
+				} else if (timeout) {
+					printk("Program timed out\r\n");
+				}
 
-		if(!access_ok(VERIFY_WRITE, user_bytes, FLASH_SIZE))
-                         return -EFAULT;
 
-		printk("Reading Flash");
-		for (i=0; i<FLASH_SIZE; i++) {
-			unsigned char tmp_byte;
-			read_addr = kFlashBase + i;
-			tmp_byte = *((volatile unsigned char *)read_addr);
-			if(__put_user (tmp_byte, &user_bytes[i]))
-			  return -EFAULT;
-		}
+			}
+			kfree(rom);
 
+			break;
+		}
 
-	break;
-	}
+//  read the flash all at once
 
+	case FLASH_Read:{
 
+			unsigned char *user_bytes;
+			volatile unsigned long read_addr;
+			int i;
+
+			user_bytes =
+			    &(((struct lcd_display *) arg)->RomImage[0]);
+
+			if (!access_ok
+			    (VERIFY_WRITE, user_bytes, FLASH_SIZE))
+				return -EFAULT;
+
+			printk("Reading Flash");
+			for (i = 0; i < FLASH_SIZE; i++) {
+				unsigned char tmp_byte;
+				read_addr = kFlashBase + i;
+				tmp_byte =
+				    *((volatile unsigned char *)
+				      read_addr);
+				if (__put_user(tmp_byte, &user_bytes[i]))
+					return -EFAULT;
+			}
 
 
+			break;
+		}
 
 	default:
 		return 0;
-	break;
+		break;
 
 	}
 
@@ -517,7 +562,8 @@
 {
 	unsigned long buttons = GPIRead;
 
-	if ( (buttons == BUTTON_Next) || (buttons == BUTTON_Next_B) || (buttons == BUTTON_Reset_B) )
+	if ((buttons == BUTTON_Next) || (buttons == BUTTON_Next_B)
+	    || (buttons == BUTTON_Reset_B))
 		return buttons;
 	return 0;
 }
@@ -526,22 +572,23 @@
 
 static int lcd_waiters = 0;
 
-static long lcd_read(struct inode *inode, struct file *file, char *buf, unsigned long count)
+static long lcd_read(struct inode *inode, struct file *file, char *buf,
+		     unsigned long count)
 {
 	long buttons_now;
 
-	if(lcd_waiters > 0)
+	if (lcd_waiters > 0)
 		return -EINVAL;
 
 	lcd_waiters++;
-	while(((buttons_now = (long)button_pressed()) == 0) &&
-	      !(signal_pending(current))) {
+	while (((buttons_now = (long) button_pressed()) == 0) &&
+	       !(signal_pending(current))) {
 		current->state = TASK_INTERRUPTIBLE;
 		schedule_timeout(2 * HZ);
 	}
 	lcd_waiters--;
 
-	if(signal_pending(current))
+	if (signal_pending(current))
 		return -ERESTARTSYS;
 	return buttons_now;
 }
@@ -551,21 +598,20 @@
  */
 
 static struct file_operations lcd_fops = {
-	.read		= lcd_read,
-	.ioctl		= lcd_ioctl,
-	.open		= lcd_open,
+	.read = lcd_read,
+	.ioctl = lcd_ioctl,
+	.open = lcd_open,
 };
 
-static struct miscdevice lcd_dev=
-{
-	LCD_MINOR,
+static struct miscdevice lcd_dev = {
+	MISC_DYNAMIC_MINOR,
 	"lcd",
 	&lcd_fops
 };
 
-int lcd_init(void)
+static int lcd_init(void)
 {
-unsigned long data;
+	unsigned long data;
 
 	printk("%s\n", LCD_DRIVER);
 	misc_register(&lcd_dev);
@@ -575,19 +621,22 @@
 
 	udelay(150);
 	data = LCDReadData;
-	if ( (data & 0x000000FF) == (0x00) ) {
+	if ((data & 0x000000FF) == (0x00)) {
 		lcd_present = 0;
 		printk("LCD Not Present\n");
-	        }
-	else {
+	} else {
 		lcd_present = 1;
-		WRITE_GAL( kGal_DevBank2PReg, kGal_DevBank2Cfg );
-		WRITE_GAL( kGal_DevBank3PReg, kGal_DevBank3Cfg );
-		}
+		WRITE_GAL(kGal_DevBank2PReg, kGal_DevBank2Cfg);
+		WRITE_GAL(kGal_DevBank3PReg, kGal_DevBank3Cfg);
+	}
 
 	return 0;
 }
 
+static void __exit lcd_exit(void)
+{
+	misc_deregister(&lcd_dev);
+}
 
 //
 // Function: dqpoll
@@ -600,17 +649,15 @@
 //
 //
 
-int dqpoll( volatile unsigned long address, volatile unsigned char data ) {
-
-volatile unsigned char dq7;
-
-dq7 = data & 0x80;
+static int dqpoll(volatile unsigned long address, volatile unsigned char data)
+{
+	volatile unsigned char dq7;
 
-return ( (READ_FLASH(address) & 0x80) == dq7  );
+	dq7 = data & 0x80;
 
+	return ((READ_FLASH(address) & 0x80) == dq7);
 }
 
-
 //
 // Function: timeout
 //
@@ -622,12 +669,13 @@
 //
 // Out: 0 = not timed out, 1 = timed out
 
-int timeout( volatile unsigned long address ) {
-
-
-return (  (READ_FLASH(address) & 0x20) ==  0x20 );
-
+static int timeout(volatile unsigned long address)
+{
+	return (READ_FLASH(address) & 0x20) == 0x20;
 }
 
+module_init(lcd_init);
+module_exit(lcd_exit);
 
-
+MODULE_AUTHOR("Andrew Bose");
+MODULE_LICENSE("GPL");
--- diff/drivers/char/mem.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/mem.c	2004-07-01 21:32:35.000000000 +0100
@@ -26,7 +26,6 @@
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
-#include <asm/pgalloc.h>
 
 #ifdef CONFIG_IA64
 # include <linux/efi.h>
@@ -39,6 +38,7 @@
 extern void tapechar_init(void);
 #endif
 
+#ifdef pgprot_noncached
 /*
  * Architectures vary in how they handle caching for addresses
  * outside of main memory.
@@ -77,7 +77,8 @@
 	return 0;
 #elif defined(CONFIG_IA64)
 	/*
-	 * On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases.
+	 * On ia64, we ignore O_SYNC because we cannot tolerate memory
+	 * attribute aliases.
 	 */
 	return !(efi_mem_attributes(addr) & EFI_MEMORY_WB);
 #elif defined(CONFIG_PPC64)
@@ -90,14 +91,15 @@
 	return !page_is_ram(addr);
 #else
 	/*
-	 * Accessing memory above the top the kernel knows about or through a file pointer
-	 * that was marked O_SYNC will be done non-cached.
+	 * Accessing memory above the top the kernel knows about or through a
+	 * file pointer that was marked O_SYNC will be done non-cached.
 	 */
 	if (file->f_flags & O_SYNC)
 		return 1;
 	return addr >= __pa(high_memory);
 #endif
 }
+#endif
 
 #ifndef ARCH_HAS_VALID_PHYS_ADDR_RANGE
 static inline int valid_phys_addr_range(unsigned long addr, size_t *count)
@@ -194,28 +196,24 @@
 	return do_write_mem(__va(p), p, buf, count, ppos);
 }
 
-static int mmap_mem(struct file * file, struct vm_area_struct * vma)
+static int mmap_mem(struct file *file, struct vm_area_struct *vma)
 {
 	unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
-	int uncached;
 
-	uncached = uncached_access(file, offset);
 #ifdef pgprot_noncached
-	if (uncached)
+	if (uncached_access(file, offset))
 		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 #endif
 
-	/* Don't try to swap out physical pages.. */
-	vma->vm_flags |= VM_RESERVED;
-
 	/*
-	 * Don't dump addresses that are not real memory to a core file.
+	 * Don't try to swap out physical pages..
+	 * And treat /dev/mem mappings as "IO" regions: they may not
+	 * describe valid pageframes.
 	 */
-	if (uncached)
-		vma->vm_flags |= VM_IO;
+	vma->vm_flags |= VM_RESERVED|VM_IO;
 
-	if (remap_page_range(vma, vma->vm_start, offset, vma->vm_end-vma->vm_start,
-			     vma->vm_page_prot))
+	if (remap_page_range(vma, vma->vm_start, offset,
+			vma->vm_end-vma->vm_start, vma->vm_page_prot))
 		return -EAGAIN;
 	return 0;
 }
--- diff/drivers/char/misc.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/misc.c	2004-07-01 21:32:35.000000000 +0100
@@ -63,13 +63,8 @@
 #define DYNAMIC_MINORS 64 /* like dynamic majors */
 static unsigned char misc_minors[DYNAMIC_MINORS / 8];
 
-#ifdef CONFIG_SGI_NEWPORT_GFX
-extern void gfx_register(void);
-#endif
-extern void streamable_init(void);
 extern int rtc_DP8570A_init(void);
 extern int rtc_MK48T08_init(void);
-extern int ds1286_init(void);
 extern int pmu_device_init(void);
 extern int tosh_init(void);
 extern int i8k_init(void);
@@ -318,21 +313,9 @@
 #ifdef CONFIG_BVME6000
 	rtc_DP8570A_init();
 #endif
-#ifdef CONFIG_SGI_DS1286
-	ds1286_init();
-#endif
 #ifdef CONFIG_PMAC_PBOOK
 	pmu_device_init();
 #endif
-#ifdef CONFIG_SGI_NEWPORT_GFX
-	gfx_register ();
-#endif
-#ifdef CONFIG_SGI_IP22
-	streamable_init ();
-#endif
-#ifdef CONFIG_SGI_NEWPORT_GFX
-	gfx_register ();
-#endif
 #ifdef CONFIG_TOSHIBA
 	tosh_init();
 #endif
--- diff/drivers/char/mwave/3780i.c	2004-05-19 22:11:38.000000000 +0100
+++ source/drivers/char/mwave/3780i.c	2004-07-01 21:32:35.000000000 +0100
@@ -467,10 +467,10 @@
 }
 
 
-int dsp3780I_ReadDStore(unsigned short usDspBaseIO, void *pvBuffer,
+int dsp3780I_ReadDStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                         unsigned uCount, unsigned long ulDSPAddr)
 {
-	unsigned short *pusBuffer = pvBuffer;
+	unsigned short __user *pusBuffer = pvBuffer;
 	unsigned short val;
 
 
@@ -508,10 +508,10 @@
 }
 
 int dsp3780I_ReadAndClearDStore(unsigned short usDspBaseIO,
-                                void *pvBuffer, unsigned uCount,
+                                void __user *pvBuffer, unsigned uCount,
                                 unsigned long ulDSPAddr)
 {
-	unsigned short *pusBuffer = pvBuffer;
+	unsigned short __user *pusBuffer = pvBuffer;
 	unsigned short val;
 
 
@@ -549,10 +549,10 @@
 }
 
 
-int dsp3780I_WriteDStore(unsigned short usDspBaseIO, void *pvBuffer,
+int dsp3780I_WriteDStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                          unsigned uCount, unsigned long ulDSPAddr)
 {
-	unsigned short *pusBuffer = pvBuffer;
+	unsigned short __user *pusBuffer = pvBuffer;
 
 
 	PRINTK_5(TRACE_3780I,
@@ -590,10 +590,10 @@
 }
 
 
-int dsp3780I_ReadIStore(unsigned short usDspBaseIO, void *pvBuffer,
+int dsp3780I_ReadIStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                         unsigned uCount, unsigned long ulDSPAddr)
 {
-	unsigned short *pusBuffer = pvBuffer;
+	unsigned short __user *pusBuffer = pvBuffer;
 
 	PRINTK_5(TRACE_3780I,
 		"3780i::dsp3780I_ReadIStore entry usDspBaseIO %x, pusBuffer %p, uCount %x, ulDSPAddr %lx\n",
@@ -637,10 +637,10 @@
 }
 
 
-int dsp3780I_WriteIStore(unsigned short usDspBaseIO, void *pvBuffer,
+int dsp3780I_WriteIStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                          unsigned uCount, unsigned long ulDSPAddr)
 {
-	unsigned short *pusBuffer = pvBuffer;
+	unsigned short __user *pusBuffer = pvBuffer;
 
 	PRINTK_5(TRACE_3780I,
 		"3780i::dsp3780I_WriteIStore entry usDspBaseIO %x, pusBuffer %p, uCount %x, ulDSPAddr %lx\n",
--- diff/drivers/char/mwave/3780i.h	2004-05-19 22:11:38.000000000 +0100
+++ source/drivers/char/mwave/3780i.h	2004-07-01 21:32:35.000000000 +0100
@@ -323,16 +323,16 @@
 int dsp3780I_DisableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings);
 int dsp3780I_Reset(DSP_3780I_CONFIG_SETTINGS * pSettings);
 int dsp3780I_Run(DSP_3780I_CONFIG_SETTINGS * pSettings);
-int dsp3780I_ReadDStore(unsigned short usDspBaseIO, void *pvBuffer,
+int dsp3780I_ReadDStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                         unsigned uCount, unsigned long ulDSPAddr);
 int dsp3780I_ReadAndClearDStore(unsigned short usDspBaseIO,
-                                void *pvBuffer, unsigned uCount,
+                                void __user *pvBuffer, unsigned uCount,
                                 unsigned long ulDSPAddr);
-int dsp3780I_WriteDStore(unsigned short usDspBaseIO, void *pvBuffer,
+int dsp3780I_WriteDStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                          unsigned uCount, unsigned long ulDSPAddr);
-int dsp3780I_ReadIStore(unsigned short usDspBaseIO, void *pvBuffer,
+int dsp3780I_ReadIStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                         unsigned uCount, unsigned long ulDSPAddr);
-int dsp3780I_WriteIStore(unsigned short usDspBaseIO, void *pvBuffer,
+int dsp3780I_WriteIStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                          unsigned uCount, unsigned long ulDSPAddr);
 unsigned short dsp3780I_ReadMsaCfg(unsigned short usDspBaseIO,
                                    unsigned long ulMsaAddr);
--- diff/drivers/char/mwave/mwavedd.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/mwave/mwavedd.c	2004-07-01 21:32:35.000000000 +0100
@@ -121,6 +121,7 @@
 {
 	unsigned int retval = 0;
 	pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd;
+	void __user *arg = (void __user *)ioarg;
 
 	PRINTK_5(TRACE_MWAVE,
 		"mwavedd::mwave_ioctl, entry inode %x file %x cmd %x arg %x\n",
@@ -164,8 +165,7 @@
 				" retval %x from tp3780I_QueryAbilities\n",
 				retval);
 			if (retval == 0) {
-				if( copy_to_user((char *) ioarg,
-							(char *) &rAbilities,
+				if( copy_to_user(arg, &rAbilities,
 							sizeof(MW_ABILITIES)) )
 					return -EFAULT;
 			}
@@ -179,13 +179,12 @@
 		case IOCTL_MW_READ_DATA:
 		case IOCTL_MW_READCLEAR_DATA: {
 			MW_READWRITE rReadData;
-			unsigned short *pusBuffer = 0;
+			unsigned short __user *pusBuffer = 0;
 	
-			if( copy_from_user((char *) &rReadData,
-						(char *) ioarg,
+			if( copy_from_user(&rReadData, arg,
 						sizeof(MW_READWRITE)) )
 				return -EFAULT;
-			pusBuffer = (unsigned short *) (rReadData.pBuf);
+			pusBuffer = (unsigned short __user *) (rReadData.pBuf);
 	
 			PRINTK_4(TRACE_MWAVE,
 				"mwavedd::mwave_ioctl IOCTL_MW_READ_DATA,"
@@ -193,7 +192,7 @@
 				rReadData.ulDataLength, ioarg, pusBuffer);
 			retval = tp3780I_ReadWriteDspDStore(&pDrvData->rBDData,
 					iocmd,
-					(void *) pusBuffer,
+					pusBuffer,
 					rReadData.ulDataLength,
 					rReadData.usDspAddress);
 		}
@@ -201,12 +200,12 @@
 	
 		case IOCTL_MW_READ_INST: {
 			MW_READWRITE rReadData;
-			unsigned short *pusBuffer = 0;
+			unsigned short __user *pusBuffer = 0;
 	
-			if( copy_from_user((char *) &rReadData, (char *) ioarg,
+			if( copy_from_user(&rReadData, arg,
 						sizeof(MW_READWRITE)) )
 				return -EFAULT;
-			pusBuffer = (unsigned short *) (rReadData.pBuf);
+			pusBuffer = (unsigned short __user *) (rReadData.pBuf);
 	
 			PRINTK_4(TRACE_MWAVE,
 				"mwavedd::mwave_ioctl IOCTL_MW_READ_INST,"
@@ -222,13 +221,12 @@
 	
 		case IOCTL_MW_WRITE_DATA: {
 			MW_READWRITE rWriteData;
-			unsigned short *pusBuffer = 0;
+			unsigned short __user *pusBuffer = 0;
 	
-			if( copy_from_user((char *) &rWriteData,
-						(char *) ioarg,
+			if( copy_from_user(&rWriteData, arg,
 						sizeof(MW_READWRITE)) )
 				return -EFAULT;
-			pusBuffer = (unsigned short *) (rWriteData.pBuf);
+			pusBuffer = (unsigned short __user *) (rWriteData.pBuf);
 	
 			PRINTK_4(TRACE_MWAVE,
 				"mwavedd::mwave_ioctl IOCTL_MW_WRITE_DATA,"
@@ -244,13 +242,12 @@
 	
 		case IOCTL_MW_WRITE_INST: {
 			MW_READWRITE rWriteData;
-			unsigned short *pusBuffer = 0;
+			unsigned short __user *pusBuffer = 0;
 	
-			if( copy_from_user((char *) &rWriteData,
-						(char *) ioarg,
+			if( copy_from_user(&rWriteData, arg,
 						sizeof(MW_READWRITE)) )
 				return -EFAULT;
-			pusBuffer = (unsigned short *) (rWriteData.pBuf);
+			pusBuffer = (unsigned short __user *)(rWriteData.pBuf);
 	
 			PRINTK_4(TRACE_MWAVE,
 				"mwavedd::mwave_ioctl IOCTL_MW_WRITE_INST,"
@@ -388,7 +385,7 @@
 }
 
 
-static ssize_t mwave_read(struct file *file, char *buf, size_t count,
+static ssize_t mwave_read(struct file *file, char __user *buf, size_t count,
                           loff_t * ppos)
 {
 	PRINTK_5(TRACE_MWAVE,
@@ -399,7 +396,7 @@
 }
 
 
-static ssize_t mwave_write(struct file *file, const char *buf,
+static ssize_t mwave_write(struct file *file, const char __user *buf,
                            size_t count, loff_t * ppos)
 {
 	PRINTK_5(TRACE_MWAVE,
--- diff/drivers/char/mwave/tp3780i.c	2004-05-19 22:11:38.000000000 +0100
+++ source/drivers/char/mwave/tp3780i.c	2004-07-01 21:32:35.000000000 +0100
@@ -522,7 +522,7 @@
 }
 
 int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode,
-                               void *pvBuffer, unsigned int uCount,
+                               void __user *pvBuffer, unsigned int uCount,
                                unsigned long ulDSPAddr)
 {
 	int retval = 0;
@@ -558,7 +558,7 @@
 
 
 int tp3780I_ReadWriteDspIStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode,
-                               void *pvBuffer, unsigned int uCount,
+                               void __user *pvBuffer, unsigned int uCount,
                                unsigned long ulDSPAddr)
 {
 	int retval = 0;
--- diff/drivers/char/mwave/tp3780i.h	2004-05-19 22:11:38.000000000 +0100
+++ source/drivers/char/mwave/tp3780i.h	2004-07-01 21:32:35.000000000 +0100
@@ -93,10 +93,10 @@
 int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData, MW_ABILITIES * pAbilities);
 int tp3780I_Cleanup(THINKPAD_BD_DATA * pBDData);
 int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode,
-                               void *pvBuffer, unsigned int uCount,
+                               void __user *pvBuffer, unsigned int uCount,
                                unsigned long ulDSPAddr);
 int tp3780I_ReadWriteDspIStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode,
-                               void *pvBuffer, unsigned int uCount,
+                               void __user *pvBuffer, unsigned int uCount,
                                unsigned long ulDSPAddr);
 
 
--- diff/drivers/char/n_hdlc.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/n_hdlc.c	2004-07-01 21:32:35.000000000 +0100
@@ -182,9 +182,9 @@
 /* TTY callbacks */
 
 static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
-			   __u8 *buf, size_t nr);
+			   __u8 __user *buf, size_t nr);
 static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
-			    const __u8 *buf, size_t nr);
+			    const __u8 __user *buf, size_t nr);
 static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
 			    unsigned int cmd, unsigned long arg);
 static unsigned int n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
@@ -572,7 +572,7 @@
  * Returns the number of bytes returned or error code.
  */
 static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
-			   __u8 *buf, size_t nr)
+			   __u8 __user *buf, size_t nr)
 {
 	struct n_hdlc *n_hdlc = tty2n_hdlc(tty);
 	int error;
@@ -649,7 +649,7 @@
  * Returns the number of bytes written (or error code).
  */
 static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
-			    const __u8 *data, size_t count)
+			    const __u8 __user *data, size_t count)
 {
 	struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
 	int error = 0;
@@ -755,7 +755,7 @@
 		else
 			count = 0;
 		spin_unlock_irqrestore(&n_hdlc->rx_buf_list.spinlock,flags);
-		error = put_user(count, (int *)arg);
+		error = put_user(count, (int __user *)arg);
 		break;
 
 	case TIOCOUTQ:
@@ -767,7 +767,7 @@
 		if (n_hdlc->tx_buf_list.head)
 			count += n_hdlc->tx_buf_list.head->count;
 		spin_unlock_irqrestore(&n_hdlc->tx_buf_list.spinlock,flags);
-		error = put_user(count, (int*)arg);
+		error = put_user(count, (int __user *)arg);
 		break;
 
 	default:
--- diff/drivers/char/n_r3964.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/n_r3964.c	2004-07-01 21:32:35.000000000 +0100
@@ -126,7 +126,7 @@
 static void receive_error(struct r3964_info *pInfo, const char flag);
 static void on_timeout(unsigned long priv);
 static int enable_signals(struct r3964_info *pInfo, pid_t pid, int arg);
-static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char *buf);
+static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char __user *buf);
 static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg,
              int error_code, struct r3964_block_header *pBlock);
 static struct r3964_message* remove_msg(struct r3964_info *pInfo, 
@@ -137,9 +137,9 @@
 static int  r3964_open(struct tty_struct *tty);
 static void r3964_close(struct tty_struct *tty);
 static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
-                     unsigned char *buf, size_t nr);
+                     unsigned char __user *buf, size_t nr);
 static ssize_t r3964_write(struct tty_struct * tty, struct file * file,
-                      const unsigned char * buf, size_t nr);
+                      const unsigned char __user * buf, size_t nr);
 static int r3964_ioctl(struct tty_struct * tty, struct file * file,
                        unsigned int cmd, unsigned long arg);
 static void r3964_set_termios(struct tty_struct *tty, struct termios * old);
@@ -910,7 +910,7 @@
    return 0;
 }
 
-static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char *buf)
+static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char __user *buf)
 {
     struct r3964_client_info *pClient;
     struct r3964_block_header *block;
@@ -1185,7 +1185,7 @@
 }
 
 static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
-			  unsigned char *buf, size_t nr)
+			  unsigned char __user *buf, size_t nr)
 {
    struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
    struct r3964_client_info *pClient;
@@ -1246,7 +1246,7 @@
 }
 
 static ssize_t r3964_write(struct tty_struct * tty, struct file * file,
-			   const unsigned char *data, size_t count)
+			   const unsigned char __user *data, size_t count)
 {
    struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
    struct r3964_block_header *pHeader;
@@ -1348,7 +1348,7 @@
             pInfo->flags &= ~R3964_BCC;
          return 0;
       case R3964_READ_TELEGRAM:
-         return read_telegram(pInfo, current->pid, (unsigned char *)arg);
+         return read_telegram(pInfo, current->pid, (unsigned char __user *)arg);
       default:
          return -ENOIOCTLCMD;
    }
--- diff/drivers/char/raw.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/raw.c	2004-07-01 21:32:35.000000000 +0100
@@ -18,6 +18,7 @@
 #include <linux/capability.h>
 #include <linux/uio.h>
 #include <linux/cdev.h>
+#include <linux/device.h>
 
 #include <asm/uaccess.h>
 
@@ -26,6 +27,7 @@
 	int inuse;
 };
 
+static struct class_simple *raw_class;
 static struct raw_device_data raw_devices[MAX_RAW_MINORS];
 static DECLARE_MUTEX(raw_mutex);
 static struct file_operations raw_ctl_fops;	     /* forward declaration */
@@ -123,6 +125,13 @@
 	return ioctl_by_bdev(bdev, command, arg);
 }
 
+static void bind_device(struct raw_config_request *rq)
+{
+	class_simple_device_remove(MKDEV(RAW_MAJOR, rq->raw_minor));
+	class_simple_device_add(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor),
+				      NULL, "raw%d", rq->raw_minor);
+}
+
 /*
  * Deal with ioctls against the raw-device control interface, to bind
  * and unbind other raw devices.
@@ -191,12 +200,16 @@
 			if (rq.block_major == 0 && rq.block_minor == 0) {
 				/* unbind */
 				rawdev->binding = NULL;
+				class_simple_device_remove(MKDEV(RAW_MAJOR,
+								rq.raw_minor));
 			} else {
 				rawdev->binding = bdget(dev);
 				if (rawdev->binding == NULL)
 					err = -ENOMEM;
-				else
+				else {
 					__module_get(THIS_MODULE);
+					bind_device(&rq);
+				}
 			}
 			up(&raw_mutex);
 		} else {
@@ -287,6 +300,15 @@
 		goto error;
 	}
 
+	raw_class = class_simple_create(THIS_MODULE, "raw");
+	if (IS_ERR(raw_class)) {
+		printk(KERN_ERR "Error creating raw class.\n");
+		cdev_del(&raw_cdev);
+		unregister_chrdev_region(dev, MAX_RAW_MINORS);
+		goto error;
+	}
+	class_simple_device_add(raw_class, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
+
 	devfs_mk_cdev(MKDEV(RAW_MAJOR, 0),
 		      S_IFCHR | S_IRUGO | S_IWUGO,
 		      "raw/rawctl");
@@ -309,6 +331,8 @@
 		devfs_remove("raw/raw%d", i);
 	devfs_remove("raw/rawctl");
 	devfs_remove("raw");
+	class_simple_device_remove(MKDEV(RAW_MAJOR, 0));
+	class_simple_destroy(raw_class);
 	cdev_del(&raw_cdev);
 	unregister_chrdev_region(MKDEV(RAW_MAJOR, 0), MAX_RAW_MINORS);
 }
--- diff/drivers/char/rocket.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/rocket.c	2004-07-01 21:32:35.000000000 +0100
@@ -1258,7 +1258,7 @@
 	return 0;
 }
 
-static int get_config(struct r_port *info, struct rocket_config *retinfo)
+static int get_config(struct r_port *info, struct rocket_config __user *retinfo)
 {
 	struct rocket_config tmp;
 
@@ -1276,7 +1276,7 @@
 	return 0;
 }
 
-static int set_config(struct r_port *info, struct rocket_config *new_info)
+static int set_config(struct r_port *info, struct rocket_config __user *new_info)
 {
 	struct rocket_config new_serial;
 
@@ -1319,7 +1319,7 @@
  *  to user space.  See setrocket.c where the info is used to create
  *  the /dev/ttyRx ports.
  */
-static int get_ports(struct r_port *info, struct rocket_ports *retports)
+static int get_ports(struct r_port *info, struct rocket_ports __user *retports)
 {
 	struct rocket_ports tmp;
 	int board;
@@ -1341,11 +1341,11 @@
 	return 0;
 }
 
-static int reset_rm2(struct r_port *info, unsigned long arg)
+static int reset_rm2(struct r_port *info, void __user *arg)
 {
 	int reset;
 
-	if (copy_from_user(&reset, (void *) arg, sizeof (int)))
+	if (copy_from_user(&reset, arg, sizeof (int)))
 		return -EFAULT;
 	if (reset)
 		reset = 1;
@@ -1362,7 +1362,7 @@
 	return 0;
 }
 
-static int get_version(struct r_port *info, struct rocket_version *retvers)
+static int get_version(struct r_port *info, struct rocket_version __user *retvers)
 {
 	if (copy_to_user(retvers, &driver_version, sizeof (*retvers)))
 		return -EFAULT;
@@ -1374,25 +1374,26 @@
 		    unsigned int cmd, unsigned long arg)
 {
 	struct r_port *info = (struct r_port *) tty->driver_data;
+	void __user *argp = (void __user *)arg;
 
 	if (cmd != RCKP_GET_PORTS && rocket_paranoia_check(info, "rp_ioctl"))
 		return -ENXIO;
 
 	switch (cmd) {
 	case RCKP_GET_STRUCT:
-		if (copy_to_user((void *) arg, info, sizeof (struct r_port)))
+		if (copy_to_user(argp, info, sizeof (struct r_port)))
 			return -EFAULT;
 		return 0;
 	case RCKP_GET_CONFIG:
-		return get_config(info, (struct rocket_config *) arg);
+		return get_config(info, argp);
 	case RCKP_SET_CONFIG:
-		return set_config(info, (struct rocket_config *) arg);
+		return set_config(info, argp);
 	case RCKP_GET_PORTS:
-		return get_ports(info, (struct rocket_ports *) arg);
+		return get_ports(info, argp);
 	case RCKP_RESET_RM2:
-		return reset_rm2(info, arg);
+		return reset_rm2(info, argp);
 	case RCKP_GET_VERSION:
-		return get_version(info, (struct rocket_version *) arg);
+		return get_version(info, argp);
 	default:
 		return -ENOIOCTLCMD;
 	}
--- diff/drivers/char/rtc.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/rtc.c	2004-07-01 21:32:35.000000000 +0100
@@ -97,6 +97,10 @@
 static int rtc_irq = PCI_IRQ_NONE;
 #endif
 
+#ifdef	CONFIG_HPET_RTC_IRQ
+#undef	RTC_IRQ
+#endif
+
 #ifdef RTC_IRQ
 static int rtc_has_irq = 1;
 #endif
--- diff/drivers/char/sonypi.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/sonypi.c	2004-07-01 21:32:35.000000000 +0100
@@ -43,6 +43,7 @@
 #include <linux/delay.h>
 #include <linux/wait.h>
 #include <linux/acpi.h>
+#include <linux/dmi.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -820,10 +821,21 @@
 	printk(KERN_INFO "sonypi: removed.\n");
 }
 
-static int __init sonypi_init_module(void) {
-	struct pci_dev *pcidev = NULL;
+static struct dmi_system_id __initdata sonypi_dmi_table[] = {
+	{
+		.ident = "Sony Vaio",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "PCG-"),
+		},
+	},
+	{ }
+};
 
-	if (is_sony_vaio_laptop) {
+static int __init sonypi_init_module(void)
+{
+	struct pci_dev *pcidev = NULL;
+	if (dmi_check_system(sonypi_dmi_table)) {
 		pcidev = pci_find_device(PCI_VENDOR_ID_INTEL, 
 					 PCI_DEVICE_ID_INTEL_82371AB_3, 
 					 NULL);
--- diff/drivers/char/synclinkmp.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/synclinkmp.c	2004-07-01 21:32:35.000000000 +0100
@@ -567,17 +567,17 @@
 
 /* ioctl handlers */
 
-static int  get_stats(SLMP_INFO *info, struct mgsl_icount *user_icount);
-static int  get_params(SLMP_INFO *info, MGSL_PARAMS *params);
-static int  set_params(SLMP_INFO *info, MGSL_PARAMS *params);
-static int  get_txidle(SLMP_INFO *info, int*idle_mode);
+static int  get_stats(SLMP_INFO *info, struct mgsl_icount __user *user_icount);
+static int  get_params(SLMP_INFO *info, MGSL_PARAMS __user *params);
+static int  set_params(SLMP_INFO *info, MGSL_PARAMS __user *params);
+static int  get_txidle(SLMP_INFO *info, int __user *idle_mode);
 static int  set_txidle(SLMP_INFO *info, int idle_mode);
 static int  tx_enable(SLMP_INFO *info, int enable);
 static int  tx_abort(SLMP_INFO *info);
 static int  rx_enable(SLMP_INFO *info, int enable);
 static int  map_status(int signals);
 static int  modem_input_wait(SLMP_INFO *info,int arg);
-static int  wait_mgsl_event(SLMP_INFO *info, int *mask_ptr);
+static int  wait_mgsl_event(SLMP_INFO *info, int __user *mask_ptr);
 static int  tiocmget(struct tty_struct *tty, struct file *file);
 static int  tiocmset(struct tty_struct *tty, struct file *file,
 		     unsigned int set, unsigned int clear);
@@ -692,7 +692,7 @@
  * This allows remote debugging of dynamically loadable modules.
  */
 static void* synclinkmp_get_text_ptr(void);
-static void* synclinkmp_get_text_ptr() {return synclinkmp_get_text_ptr;}
+static void* synclinkmp_get_text_ptr(void) {return synclinkmp_get_text_ptr;}
 
 static inline int sanity_check(SLMP_INFO *info,
 			       char *name, const char *routine)
@@ -1333,8 +1333,9 @@
 	SLMP_INFO *info = (SLMP_INFO *)tty->driver_data;
 	int error;
 	struct mgsl_icount cnow;	/* kernel counter temps */
-	struct serial_icounter_struct *p_cuser;	/* user space */
+	struct serial_icounter_struct __user *p_cuser;	/* user space */
 	unsigned long flags;
+	void __user *argp = (void __user *)arg;
 
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):%s ioctl() cmd=%08X\n", __FILE__,__LINE__,
@@ -1351,23 +1352,23 @@
 
 	switch (cmd) {
 	case MGSL_IOCGPARAMS:
-		return get_params(info,(MGSL_PARAMS *)arg);
+		return get_params(info, argp);
 	case MGSL_IOCSPARAMS:
-		return set_params(info,(MGSL_PARAMS *)arg);
+		return set_params(info, argp);
 	case MGSL_IOCGTXIDLE:
-		return get_txidle(info,(int*)arg);
+		return get_txidle(info, argp);
 	case MGSL_IOCSTXIDLE:
-		return set_txidle(info,(int)arg);
+		return set_txidle(info, (int)arg);
 	case MGSL_IOCTXENABLE:
-		return tx_enable(info,(int)arg);
+		return tx_enable(info, (int)arg);
 	case MGSL_IOCRXENABLE:
-		return rx_enable(info,(int)arg);
+		return rx_enable(info, (int)arg);
 	case MGSL_IOCTXABORT:
 		return tx_abort(info);
 	case MGSL_IOCGSTATS:
-		return get_stats(info,(struct mgsl_icount*)arg);
+		return get_stats(info, argp);
 	case MGSL_IOCWAITEVENT:
-		return wait_mgsl_event(info,(int*)arg);
+		return wait_mgsl_event(info, argp);
 	case MGSL_IOCLOOPTXDONE:
 		return 0; // TODO: Not supported, need to document
 		/* Wait for modem input (DCD,RI,DSR,CTS) change
@@ -1386,7 +1387,7 @@
 		spin_lock_irqsave(&info->lock,flags);
 		cnow = info->icount;
 		spin_unlock_irqrestore(&info->lock,flags);
-		p_cuser = (struct serial_icounter_struct *) arg;
+		p_cuser = argp;
 		PUT_USER(error,cnow.cts, &p_cuser->cts);
 		if (error) return error;
 		PUT_USER(error,cnow.dsr, &p_cuser->dsr);
@@ -2762,7 +2763,7 @@
 	program_hw(info);
 }
 
-static int get_stats(SLMP_INFO * info, struct mgsl_icount *user_icount)
+static int get_stats(SLMP_INFO * info, struct mgsl_icount __user *user_icount)
 {
 	int err;
 
@@ -2781,7 +2782,7 @@
 	return 0;
 }
 
-static int get_params(SLMP_INFO * info, MGSL_PARAMS *user_params)
+static int get_params(SLMP_INFO * info, MGSL_PARAMS __user *user_params)
 {
 	int err;
 	if (debug_level >= DEBUG_LEVEL_INFO)
@@ -2799,7 +2800,7 @@
 	return 0;
 }
 
-static int set_params(SLMP_INFO * info, MGSL_PARAMS *new_params)
+static int set_params(SLMP_INFO * info, MGSL_PARAMS __user *new_params)
 {
  	unsigned long flags;
 	MGSL_PARAMS tmp_params;
@@ -2825,7 +2826,7 @@
 	return 0;
 }
 
-static int get_txidle(SLMP_INFO * info, int*idle_mode)
+static int get_txidle(SLMP_INFO * info, int __user *idle_mode)
 {
 	int err;
 
@@ -2938,7 +2939,7 @@
 
 /* wait for specified event to occur
  */
-static int wait_mgsl_event(SLMP_INFO * info, int * mask_ptr)
+static int wait_mgsl_event(SLMP_INFO * info, int __user *mask_ptr)
 {
  	unsigned long flags;
 	int s;
--- diff/drivers/char/sysrq.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/sysrq.c	2004-07-01 21:32:35.000000000 +0100
@@ -35,6 +35,25 @@
 #include <linux/spinlock.h>
 
 #include <asm/ptrace.h>
+#ifdef CONFIG_KGDB_SYSRQ
+
+#define  GDB_OP &kgdb_op
+static void kgdb_sysrq(int key, struct pt_regs *pt_regs, struct tty_struct *tty)
+{
+	printk("kgdb sysrq\n");
+	breakpoint();
+}
+
+static struct sysrq_key_op kgdb_op = {
+	.handler	= kgdb_sysrq,
+	.help_msg	= "kGdb|Fgdb",
+	.action_msg	= "Debug breakpoint\n",
+};
+
+#else
+#define  GDB_OP NULL
+#endif
+
 
 extern void reset_vc(unsigned int);
 
@@ -238,8 +257,8 @@
 /* c */ NULL,
 /* d */	NULL,
 /* e */	&sysrq_term_op,
-/* f */	NULL,
-/* g */	NULL,
+/* f */	GDB_OP,
+/* g */	GDB_OP,
 /* h */	NULL,
 /* i */	&sysrq_kill_op,
 /* j */	NULL,
--- diff/drivers/char/tipar.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/tipar.c	2004-07-01 21:32:35.000000000 +0100
@@ -279,7 +279,7 @@
 }
 
 static ssize_t
-tipar_write(struct file *file, const char *buf, size_t count, loff_t * ppos)
+tipar_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos)
 {
 	unsigned int minor = iminor(file->f_dentry->d_inode) - TIPAR_MINOR;
 	ssize_t n;
@@ -306,7 +306,7 @@
 }
 
 static ssize_t
-tipar_read(struct file *file, char *buf, size_t count, loff_t * ppos)
+tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos)
 {
 	int b = 0;
 	unsigned int minor = iminor(file->f_dentry->d_inode) - TIPAR_MINOR;
@@ -328,7 +328,7 @@
 			retval = -ETIMEDOUT;
 			goto out;
 		} else {
-			if (put_user(b, ((unsigned char *) buf) + n)) {
+			if (put_user(b, buf + n)) {
 				retval = -EFAULT;
 				break;
 			} else
--- diff/drivers/char/tty_io.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/tty_io.c	2004-07-01 21:32:35.000000000 +0100
@@ -91,6 +91,7 @@
 #include <linux/module.h>
 #include <linux/smp_lock.h>
 #include <linux/device.h>
+#include <linux/idr.h>
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -128,6 +129,8 @@
 #ifdef CONFIG_UNIX98_PTYS
 extern struct tty_driver *ptm_driver;	/* Unix98 pty masters; for /dev/ptmx */
 extern int pty_limit;		/* Config limit on Unix98 ptys */
+static DEFINE_IDR(allocated_ptys);
+static DECLARE_MUTEX(allocated_ptys_lock);
 #endif
 
 extern void disable_early_printk(void);
@@ -442,21 +445,13 @@
 	}
 	file_list_unlock();
 	
-	/* FIXME! What are the locking issues here? This may me overdoing things..
-	* this question is especially important now that we've removed the irqlock. */
-	{
-		unsigned long flags;
-
-		local_irq_save(flags); // FIXME: is this safe?
-		if (tty->ldisc.flush_buffer)
-			tty->ldisc.flush_buffer(tty);
-		if (tty->driver->flush_buffer)
-			tty->driver->flush_buffer(tty);
-		if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) &&
-		    tty->ldisc.write_wakeup)
-			(tty->ldisc.write_wakeup)(tty);
-		local_irq_restore(flags); // FIXME: is this safe?
-	}
+	if (tty->ldisc.flush_buffer)
+		tty->ldisc.flush_buffer(tty);
+	if (tty->driver->flush_buffer)
+		tty->driver->flush_buffer(tty);
+	if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) &&
+	    tty->ldisc.write_wakeup)
+		(tty->ldisc.write_wakeup)(tty);
 
 	wake_up_interruptible(&tty->write_wait);
 	wake_up_interruptible(&tty->read_wait);
@@ -1065,6 +1060,7 @@
 {
 	struct tty_struct *tty, *o_tty;
 	int	pty_master, tty_closing, o_tty_closing, do_sleep;
+	int	devpts_master;
 	int	idx;
 	char	buf[64];
 	
@@ -1079,6 +1075,7 @@
 	idx = tty->index;
 	pty_master = (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
 		      tty->driver->subtype == PTY_TYPE_MASTER);
+	devpts_master = pty_master && (tty->driver->flags & TTY_DRIVER_DEVPTS_MEM);
 	o_tty = tty->link;
 
 #ifdef TTY_PARANOIA_CHECK
@@ -1295,11 +1292,21 @@
 		o_tty->ldisc = ldiscs[N_TTY];
 	}
 
-	/* 
+	/*
 	 * The release_mem function takes care of the details of clearing
 	 * the slots and preserving the termios structure.
 	 */
 	release_mem(tty, idx);
+
+#ifdef CONFIG_UNIX98_PTYS
+	/* Make this pty number available for reallocation */
+	if (devpts_master) {
+		down(&allocated_ptys_lock);
+		idr_remove(&allocated_ptys, idx);
+		up(&allocated_ptys_lock);
+	}
+#endif
+
 }
 
 /*
@@ -1322,8 +1329,12 @@
 	int index;
 	dev_t device = inode->i_rdev;
 	unsigned short saved_flags = filp->f_flags;
+
 retry_open:
 	noctty = filp->f_flags & O_NOCTTY;
+	index  = -1;
+	retval = 0;
+
 	if (device == MKDEV(TTYAUX_MAJOR,0)) {
 		if (!current->signal->tty)
 			return -ENXIO;
@@ -1344,13 +1355,8 @@
 	}
 #endif
 	if (device == MKDEV(TTYAUX_MAJOR,1)) {
-		struct console *c = console_drivers;
-		for (c = console_drivers; c; c = c->next) {
-			if (!c->device)
-				continue;
-			driver = c->device(c, &index);
-			if (!driver)
-				continue;
+		driver = console_device(&index);
+		if (driver) {
 			/* Don't let /dev/console block */
 			filp->f_flags |= O_NONBLOCK;
 			noctty = 1;
@@ -1361,24 +1367,40 @@
 
 #ifdef CONFIG_UNIX98_PTYS
 	if (device == MKDEV(TTYAUX_MAJOR,2)) {
+		int idr_ret;
+
 		/* find a device that is not in use. */
-		static int next_ptmx_dev = 0;
-		retval = -1;
+		down(&allocated_ptys_lock);
+		if (!idr_pre_get(&allocated_ptys, GFP_KERNEL)) {
+			up(&allocated_ptys_lock);
+			return -ENOMEM;
+		}
+		idr_ret = idr_get_new(&allocated_ptys, NULL, &index);
+		if (idr_ret < 0) {
+			up(&allocated_ptys_lock);
+			if (idr_ret == -EAGAIN)
+				return -ENOMEM;
+			return -EIO;
+		}
+		if (index >= pty_limit) {
+			idr_remove(&allocated_ptys, index);
+			up(&allocated_ptys_lock);
+			return -EIO;
+		}
+		up(&allocated_ptys_lock);
+
 		driver = ptm_driver;
-		while (driver->refcount < pty_limit) {
-			index = next_ptmx_dev;
-			next_ptmx_dev = (next_ptmx_dev+1) % driver->num;
-			if (!init_dev(driver, index, &tty))
-				goto ptmx_found; /* ok! */
+		retval = init_dev(driver, index, &tty);
+		if (retval) {
+			down(&allocated_ptys_lock);
+			idr_remove(&allocated_ptys, index);
+			up(&allocated_ptys_lock);
+			return retval;
 		}
-		return -EIO; /* no free ptys */
-	ptmx_found:
+
 		set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
-		if (devpts_pty_new(tty->link)) {
-			/* BADNESS - need to destroy both ptm and pts! */
-			return -ENOMEM;
-		}
-		noctty = 1;
+		if (devpts_pty_new(tty->link))
+			retval = -ENOMEM;
 	} else
 #endif
 	{
@@ -1400,10 +1422,12 @@
 #ifdef TTY_DEBUG_HANGUP
 	printk(KERN_DEBUG "opening %s...", tty->name);
 #endif
-	if (tty->driver->open)
-		retval = tty->driver->open(tty, filp);
-	else
-		retval = -ENODEV;
+	if (!retval) {
+		if (tty->driver->open)
+			retval = tty->driver->open(tty, filp);
+		else
+			retval = -ENODEV;
+	}
 	filp->f_flags = saved_flags;
 
 	if (!retval && test_bit(TTY_EXCLUSIVE, &tty->flags) && !capable(CAP_SYS_ADMIN))
@@ -1415,6 +1439,14 @@
 		       tty->name);
 #endif
 
+#ifdef CONFIG_UNIX98_PTYS
+		if (index != -1) {
+			down(&allocated_ptys_lock);
+			idr_remove(&allocated_ptys, index);
+			up(&allocated_ptys_lock);
+		}
+#endif
+
 		release_dev(filp);
 		if (retval != -ERESTARTSYS)
 			return retval;
--- diff/drivers/char/vc_screen.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/vc_screen.c	2004-07-01 21:32:35.000000000 +0100
@@ -70,11 +70,11 @@
 {
 	int size;
 
-	lock_kernel();
+	down(&con_buf_sem);
 	size = vcs_size(file->f_dentry->d_inode);
 	switch (orig) {
 		default:
-			unlock_kernel();
+			up(&con_buf_sem);
 			return -EINVAL;
 		case 2:
 			offset += size;
@@ -85,28 +85,21 @@
 			break;
 	}
 	if (offset < 0 || offset > size) {
-		unlock_kernel();
+		up(&con_buf_sem);
 		return -EINVAL;
 	}
 	file->f_pos = offset;
-	unlock_kernel();
+	up(&con_buf_sem);
 	return file->f_pos;
 }
 
-/* We share this temporary buffer with the console write code
- * so that we can easily avoid touching user space while holding the
- * console spinlock.
- */
-extern char con_buf[PAGE_SIZE];
-#define CON_BUF_SIZE	PAGE_SIZE
-extern struct semaphore con_buf_sem;
 
 static ssize_t
 vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 {
 	struct inode *inode = file->f_dentry->d_inode;
 	unsigned int currcons = iminor(inode);
-	long pos = *ppos;
+	long pos;
 	long viewed, attr, read;
 	int col, maxcol;
 	unsigned short *org = NULL;
@@ -114,6 +107,8 @@
 
 	down(&con_buf_sem);
 
+	pos = *ppos;
+
 	/* Select the proper current console and verify
 	 * sanity of the situation under the console lock.
 	 */
@@ -275,7 +270,7 @@
 {
 	struct inode *inode = file->f_dentry->d_inode;
 	unsigned int currcons = iminor(inode);
-	long pos = *ppos;
+	long pos;
 	long viewed, attr, size, written;
 	char *con_buf0;
 	int col, maxcol;
@@ -284,6 +279,8 @@
 
 	down(&con_buf_sem);
 
+	pos = *ppos;
+
 	/* Select the proper current console and verify
 	 * sanity of the situation under the console lock.
 	 */
--- diff/drivers/char/viotape.c	2004-05-19 22:11:35.000000000 +0100
+++ source/drivers/char/viotape.c	2004-07-01 21:32:35.000000000 +0100
@@ -53,6 +53,7 @@
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
 
+#include <asm/vio.h>
 #include <asm/iSeries/vio.h>
 #include <asm/iSeries/HvLpEvent.h>
 #include <asm/iSeries/HvCallEvent.h>
@@ -216,7 +217,7 @@
 };
 
 /* Maximum number of tapes we support */
-#define VIOTAPE_MAX_TAPE	8
+#define VIOTAPE_MAX_TAPE	HVMAXARCHITECTEDVIRTUALTAPES
 #define MAX_PARTITIONS		4
 
 /* defines for current tape state */
@@ -238,6 +239,8 @@
 
 static struct class_simple *tape_class;
 
+static struct device *tape_device[VIOTAPE_MAX_TAPE];
+
 /*
  * maintain the current state of each tape (and partition)
  * so that we know when to write EOF marks.
@@ -262,6 +265,7 @@
 	int			rc;
 	int			non_blocking;
 	struct completion	com;
+	struct device		*dev;
 	struct op_struct	*next;
 };
 
@@ -459,7 +463,8 @@
 		down(&reqSem);
 
 	/* Allocate a DMA buffer */
-	op->buffer = dma_alloc_coherent(iSeries_vio_dev, count, &op->dmaaddr,
+	op->dev = tape_device[devi.devno];
+	op->buffer = dma_alloc_coherent(op->dev, count, &op->dmaaddr,
 			GFP_ATOMIC);
 
 	if (op->buffer == NULL) {
@@ -509,7 +514,7 @@
 	}
 
 free_dma:
-	dma_free_coherent(iSeries_vio_dev, count, op->buffer, op->dmaaddr);
+	dma_free_coherent(op->dev, count, op->buffer, op->dmaaddr);
 up_sem:
 	up(&reqSem);
 free_op:
@@ -550,7 +555,8 @@
 	chg_state(devi.devno, VIOT_READING, file);
 
 	/* Allocate a DMA buffer */
-	op->buffer = dma_alloc_coherent(iSeries_vio_dev, count, &op->dmaaddr,
+	op->dev = tape_device[devi.devno];
+	op->buffer = dma_alloc_coherent(op->dev, count, &op->dmaaddr,
 			GFP_ATOMIC);
 	if (op->buffer == NULL) {
 		ret = -EFAULT;
@@ -588,7 +594,7 @@
 	}
 
 free_dma:
-	dma_free_coherent(iSeries_vio_dev, count, op->buffer, op->dmaaddr);
+	dma_free_coherent(op->dev, count, op->buffer, op->dmaaddr);
 up_sem:
 	up(&reqSem);
 free_op:
@@ -910,7 +916,7 @@
 		break;
 	case viotapewrite:
 		if (op->non_blocking) {
-			dma_free_coherent(iSeries_vio_dev, op->count,
+			dma_free_coherent(op->dev, op->count,
 					op->buffer, op->dmaaddr);
 			free_op_struct(op);
 			up(&reqSem);
@@ -936,12 +942,70 @@
 	}
 }
 
+static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
+{
+	char tapename[32];
+	int i = vdev->unit_address;
+	int j;
+
+	if (i >= viotape_numdev)
+		return -ENODEV;
+
+	tape_device[i] = &vdev->dev;
+
+	state[i].cur_part = 0;
+	for (j = 0; j < MAX_PARTITIONS; ++j)
+		state[i].part_stat_rwi[j] = VIOT_IDLE;
+	class_simple_device_add(tape_class, MKDEV(VIOTAPE_MAJOR, i), NULL,
+			"iseries!vt%d", i);
+	class_simple_device_add(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80),
+			NULL, "iseries!nvt%d", i);
+	devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR,
+			"iseries/vt%d", i);
+	devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i | 0x80),
+			S_IFCHR | S_IRUSR | S_IWUSR, "iseries/nvt%d", i);
+	sprintf(tapename, "iseries/vt%d", i);
+	state[i].dev_handle = devfs_register_tape(tapename);
+	printk(VIOTAPE_KERN_INFO "tape %s is iSeries "
+			"resource %10.10s type %4.4s, model %3.3s\n",
+			tapename, viotape_unitinfo[i].rsrcname,
+			viotape_unitinfo[i].type, viotape_unitinfo[i].model);
+	return 0;
+}
+
+static int viotape_remove(struct vio_dev *vdev)
+{
+	int i = vdev->unit_address;
+
+	devfs_remove("iseries/nvt%d", i);
+	devfs_remove("iseries/vt%d", i);
+	devfs_unregister_tape(state[i].dev_handle);
+	class_simple_device_remove(MKDEV(VIOTAPE_MAJOR, i | 0x80));
+	class_simple_device_remove(MKDEV(VIOTAPE_MAJOR, i));
+	return 0;
+}
+
+/**
+ * viotape_device_table: Used by vio.c to match devices that we
+ * support.
+ */
+static struct vio_device_id viotape_device_table[] __devinitdata = {
+	{ "viotape", "" },
+	{ 0, }
+};
+
+MODULE_DEVICE_TABLE(vio, viotape_device_table);
+static struct vio_driver viotape_driver = {
+	.name = "viotape",
+	.id_table = viotape_device_table,
+	.probe = viotape_probe,
+	.remove = viotape_remove
+};
+
 
 int __init viotap_init(void)
 {
 	int ret;
-	char tapename[32];
-	int i;
 	struct proc_dir_entry *e;
 
 	op_struct_list = NULL;
@@ -993,31 +1057,9 @@
 		goto unreg_class;
 	}
 
-	for (i = 0; i < viotape_numdev; i++) {
-		int j;
-
-		state[i].cur_part = 0;
-		for (j = 0; j < MAX_PARTITIONS; ++j)
-			state[i].part_stat_rwi[j] = VIOT_IDLE;
-		class_simple_device_add(tape_class, MKDEV(VIOTAPE_MAJOR, i),
-				NULL, "iseries!vt%d", i);
-		class_simple_device_add(tape_class,
-				MKDEV(VIOTAPE_MAJOR, i | 0x80),
-				NULL, "iseries!nvt%d", i);
-		devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i),
-				S_IFCHR | S_IRUSR | S_IWUSR,
-				"iseries/vt%d", i);
-		devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i | 0x80),
-				S_IFCHR | S_IRUSR | S_IWUSR,
-				"iseries/nvt%d", i);
-		sprintf(tapename, "iseries/vt%d", i);
-		state[i].dev_handle = devfs_register_tape(tapename);
-		printk(VIOTAPE_KERN_INFO "tape %s is iSeries "
-				"resource %10.10s type %4.4s, model %3.3s\n",
-				tapename, viotape_unitinfo[i].rsrcname,
-				viotape_unitinfo[i].type,
-				viotape_unitinfo[i].model);
-	}
+	ret = vio_register_driver(&viotape_driver);
+	if (ret)
+		goto unreg_class;
 
 	e = create_proc_entry("iSeries/viotape", S_IFREG|S_IRUGO, NULL);
 	if (e) {
@@ -1064,17 +1106,10 @@
 /* Cleanup */
 static void __exit viotap_exit(void)
 {
-	int i, ret;
+	int ret;
 
 	remove_proc_entry("iSeries/viotape", NULL);
-
-	for (i = 0; i < viotape_numdev; ++i) {
-		devfs_remove("iseries/nvt%d", i);
-		devfs_remove("iseries/vt%d", i);
-		devfs_unregister_tape(state[i].dev_handle);
-		class_simple_device_remove(MKDEV(VIOTAPE_MAJOR, i | 0x80));
-		class_simple_device_remove(MKDEV(VIOTAPE_MAJOR, i));
-	}
+	vio_unregister_driver(&viotape_driver);
 	class_simple_destroy(tape_class);
 	ret = unregister_chrdev(VIOTAPE_MAJOR, "viotape");
 	if (ret < 0)
--- diff/drivers/char/vt.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/vt.c	2004-07-01 21:32:35.000000000 +0100
@@ -1865,7 +1865,6 @@
  * kernel memory allocation is available.
  */
 char con_buf[PAGE_SIZE];
-#define CON_BUF_SIZE	PAGE_SIZE
 DECLARE_MUTEX(con_buf_sem);
 
 /* acquires console_sem */
--- diff/drivers/char/watchdog/Kconfig	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/Kconfig	2004-07-01 21:32:35.000000000 +0100
@@ -96,12 +96,13 @@
 	  Say N if you are unsure.
 
 config SA1100_WATCHDOG
-	tristate "SA1100 watchdog"
-	depends on WATCHDOG && ARCH_SA1100
+	tristate "SA1100/PXA2xx watchdog"
+	depends on WATCHDOG && ( ARCH_SA1100 || ARCH_PXA )
 	help
-	  Watchdog timer embedded into SA11x0 chips. This will reboot your
-	  system when timeout is reached.
-	  NOTE, that once enabled, this timer cannot be disabled.
+	  Watchdog timer embedded into SA11x0 and PXA2xx chips. This will
+	  reboot your system when timeout is reached.
+
+	  NOTE: once enabled, this timer cannot be disabled.
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called sa1100_wdt.
--- diff/drivers/char/watchdog/acquirewdt.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/acquirewdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -111,7 +111,7 @@
  *	/dev/watchdog handling.
  */
 
-static ssize_t acq_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+static ssize_t acq_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
 	if (ppos != &file->f_pos)
@@ -146,6 +146,8 @@
 	unsigned long arg)
 {
 	int options, retval = -EINVAL;
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident =
 	{
 		.options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
@@ -156,22 +158,22 @@
 	switch(cmd)
 	{
 	case WDIOC_GETSUPPORT:
-	  return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)) ? -EFAULT : 0;
+	  return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
 
 	case WDIOC_GETSTATUS:
 	case WDIOC_GETBOOTSTATUS:
-	  return put_user(0, (int *)arg);
+	  return put_user(0, p);
 
 	case WDIOC_KEEPALIVE:
 	  acq_keepalive();
 	  return 0;
 
 	case WDIOC_GETTIMEOUT:
-	  return put_user(WATCHDOG_HEARTBEAT, (int *)arg);
+	  return put_user(WATCHDOG_HEARTBEAT, p);
 
 	case WDIOC_SETOPTIONS:
 	{
-	    if (get_user(options, (int *)arg))
+	    if (get_user(options, p))
 	      return -EFAULT;
 
 	    if (options & WDIOS_DISABLECARD)
--- diff/drivers/char/watchdog/advantechwdt.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/advantechwdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -100,7 +100,7 @@
 }
 
 static ssize_t
-advwdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+advwdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
 	if (ppos != &file->f_pos)
@@ -130,6 +130,8 @@
 	  unsigned long arg)
 {
 	int new_timeout;
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
 		.firmware_version = 1,
@@ -138,20 +140,20 @@
 
 	switch (cmd) {
 	case WDIOC_GETSUPPORT:
-	  if (copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
+	  if (copy_to_user(argp, &ident, sizeof(ident)))
 	    return -EFAULT;
 	  break;
 
 	case WDIOC_GETSTATUS:
 	case WDIOC_GETBOOTSTATUS:
-	  return put_user(0, (int *)arg);
+	  return put_user(0, p);
 
 	case WDIOC_KEEPALIVE:
 	  advwdt_ping();
 	  break;
 
 	case WDIOC_SETTIMEOUT:
-	  if (get_user(new_timeout, (int *)arg))
+	  if (get_user(new_timeout, p))
 		  return -EFAULT;
 	  if ((new_timeout < 1) || (new_timeout > 63))
 		  return -EINVAL;
@@ -160,13 +162,13 @@
 	  /* Fall */
 
 	case WDIOC_GETTIMEOUT:
-	  return put_user(timeout, (int *)arg);
+	  return put_user(timeout, p);
 
 	case WDIOC_SETOPTIONS:
 	{
 	  int options, retval = -EINVAL;
 
-	  if (get_user(options, (int *)arg))
+	  if (get_user(options, p))
 	    return -EFAULT;
 
 	  if (options & WDIOS_DISABLECARD) {
--- diff/drivers/char/watchdog/alim1535_wdt.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/alim1535_wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -138,7 +138,7 @@
  *	the next close to turn off the watchdog.
  */
 
-static ssize_t ali_write(struct file *file, const char *data,
+static ssize_t ali_write(struct file *file, const char __user *data,
 			      size_t len, loff_t * ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
@@ -184,6 +184,8 @@
 static int ali_ioctl(struct inode *inode, struct file *file,
 			  unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.options =		WDIOF_KEEPALIVEPING |
 					WDIOF_SETTIMEOUT |
@@ -194,12 +196,12 @@
 
 	switch (cmd) {
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *) arg, &ident,
+			return copy_to_user(argp, &ident,
 				sizeof (ident)) ? -EFAULT : 0;
 
 		case WDIOC_GETSTATUS:
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0, (int *) arg);
+			return put_user(0, p);
 
 		case WDIOC_KEEPALIVE:
 			ali_keepalive();
@@ -209,7 +211,7 @@
 		{
 			int new_options, retval = -EINVAL;
 
-			if (get_user (new_options, (int *) arg))
+			if (get_user (new_options, p))
 				return -EFAULT;
 
 			if (new_options & WDIOS_DISABLECARD) {
@@ -229,7 +231,7 @@
 		{
 			int new_timeout;
 
-			if (get_user(new_timeout, (int *) arg))
+			if (get_user(new_timeout, p))
 				return -EFAULT;
 
 			if (ali_settimer(new_timeout))
@@ -240,7 +242,7 @@
 		}
 
 		case WDIOC_GETTIMEOUT:
-			return put_user(timeout, (int *)arg);
+			return put_user(timeout, p);
 
 		default:
 			return -ENOIOCTLCMD;
--- diff/drivers/char/watchdog/alim7101_wdt.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/alim7101_wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -148,7 +148,7 @@
  * /dev/watchdog handling
  */
 
-static ssize_t fop_write(struct file * file, const char * buf, size_t count, loff_t * ppos)
+static ssize_t fop_write(struct file * file, const char __user * buf, size_t count, loff_t * ppos)
 {
 	/* We can't seek */
 	if(ppos != &file->f_pos)
@@ -203,6 +203,8 @@
 
 static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident =
 	{
 		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
@@ -213,10 +215,10 @@
 	switch(cmd)
 	{
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
+			return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0;
 		case WDIOC_GETSTATUS:
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0, (int *)arg);
+			return put_user(0, p);
 		case WDIOC_KEEPALIVE:
 			wdt_keepalive();
 			return 0;
@@ -224,7 +226,7 @@
 		{
 			int new_options, retval = -EINVAL;
 
-			if(get_user(new_options, (int *)arg))
+			if(get_user(new_options, p))
 				return -EFAULT;
 
 			if(new_options & WDIOS_DISABLECARD) {
@@ -243,7 +245,7 @@
 		{
 			int new_timeout;
 
-			if(get_user(new_timeout, (int *)arg))
+			if(get_user(new_timeout, p))
 				return -EFAULT;
 
 			if(new_timeout < 1 || new_timeout > 3600) /* arbitrary upper limit */
@@ -254,7 +256,7 @@
 			/* Fall through */
 		}
 		case WDIOC_GETTIMEOUT:
-			return put_user(timeout, (int *)arg);
+			return put_user(timeout, p);
 		default:
 			return -ENOIOCTLCMD;
 	}
--- diff/drivers/char/watchdog/cpu5wdt.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/cpu5wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -145,6 +145,7 @@
 
 static int cpu5wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
 	unsigned int value;
 	static struct watchdog_info ident =
 	{
@@ -159,15 +160,15 @@
 		case WDIOC_GETSTATUS:
 			value = inb(port + CPU5WDT_STATUS_REG);
 			value = (value >> 2) & 1;
-			if ( copy_to_user((int *)arg, (int *)&value, sizeof(int)) )
+			if ( copy_to_user(argp, &value, sizeof(int)) )
 				return -EFAULT;
 			break;
 		case WDIOC_GETSUPPORT:
-			if ( copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)) )
+			if ( copy_to_user(argp, &ident, sizeof(ident)) )
 				return -EFAULT;
 			break;
 		case WDIOC_SETOPTIONS:
-			if ( copy_from_user(&value, (int *)arg, sizeof(int)) )
+			if ( copy_from_user(&value, argp, sizeof(int)) )
 				return -EFAULT;
 			switch(value) {
 				case WDIOS_ENABLECARD:
@@ -185,7 +186,7 @@
 	return 0;
 }
 
-static ssize_t cpu5wdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+static ssize_t cpu5wdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	if ( !count )
 		return -EIO;
--- diff/drivers/char/watchdog/eurotechwdt.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/eurotechwdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -196,8 +196,8 @@
  * write of data will do, as we we don't define content meaning.
  */
 
-static ssize_t eurwdt_write(struct file *file, const char *buf, size_t count,
-loff_t *ppos)
+static ssize_t eurwdt_write(struct file *file, const char __user *buf,
+size_t count, loff_t *ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
 	if (ppos != &file->f_pos)
@@ -237,6 +237,8 @@
 static int eurwdt_ioctl(struct inode *inode, struct file *file,
 	unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.options	  = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
 		.firmware_version = 1,
@@ -251,19 +253,18 @@
 		return -ENOIOCTLCMD;
 
 	case WDIOC_GETSUPPORT:
-		return copy_to_user((struct watchdog_info *)arg, &ident,
-			sizeof(ident)) ? -EFAULT : 0;
+		return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
 
 	case WDIOC_GETSTATUS:
 	case WDIOC_GETBOOTSTATUS:
-		return put_user(0, (int *) arg);
+		return put_user(0, p);
 
 	case WDIOC_KEEPALIVE:
 		eurwdt_ping();
 		return 0;
 
 	case WDIOC_SETTIMEOUT:
-		if (copy_from_user(&time, (int *) arg, sizeof(int)))
+		if (copy_from_user(&time, p, sizeof(int)))
 			return -EFAULT;
 
 		/* Sanity check */
@@ -275,10 +276,10 @@
 		/* Fall */
 
 	case WDIOC_GETTIMEOUT:
-		return put_user(eurwdt_timeout, (int *)arg);
+		return put_user(eurwdt_timeout, p);
 
 	case WDIOC_SETOPTIONS:
-		if (get_user(options, (int *)arg))
+		if (get_user(options, p))
 			return -EFAULT;
 		if (options & WDIOS_DISABLECARD) {
 			eurwdt_disable_timer();
--- diff/drivers/char/watchdog/i8xx_tco.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/i8xx_tco.c	2004-07-01 21:32:35.000000000 +0100
@@ -212,7 +212,7 @@
 	return 0;
 }
 
-static ssize_t i8xx_tco_write (struct file *file, const char *data,
+static ssize_t i8xx_tco_write (struct file *file, const char __user *data,
 			      size_t len, loff_t * ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
@@ -249,6 +249,8 @@
 {
 	int new_options, retval = -EINVAL;
 	int new_heartbeat;
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.options =		WDIOF_SETTIMEOUT |
 					WDIOF_KEEPALIVEPING |
@@ -259,12 +261,12 @@
 
 	switch (cmd) {
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *) arg, &ident,
+			return copy_to_user(argp, &ident,
 				sizeof (ident)) ? -EFAULT : 0;
 
 		case WDIOC_GETSTATUS:
 		case WDIOC_GETBOOTSTATUS:
-			return put_user (0, (int *) arg);
+			return put_user (0, p);
 
 		case WDIOC_KEEPALIVE:
 			tco_timer_keepalive ();
@@ -272,7 +274,7 @@
 
 		case WDIOC_SETOPTIONS:
 		{
-			if (get_user (new_options, (int *) arg))
+			if (get_user (new_options, p))
 				return -EFAULT;
 
 			if (new_options & WDIOS_DISABLECARD) {
@@ -291,7 +293,7 @@
 
 		case WDIOC_SETTIMEOUT:
 		{
-			if (get_user(new_heartbeat, (int *) arg))
+			if (get_user(new_heartbeat, p))
 				return -EFAULT;
 
 			if (tco_timer_set_heartbeat(new_heartbeat))
@@ -302,7 +304,7 @@
 		}
 
 		case WDIOC_GETTIMEOUT:
-			return put_user(heartbeat, (int *)arg);
+			return put_user(heartbeat, p);
 
 		default:
 			return -ENOIOCTLCMD;
--- diff/drivers/char/watchdog/ib700wdt.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/ib700wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -139,7 +139,7 @@
 }
 
 static ssize_t
-ibwdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+ibwdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
 	if (ppos != &file->f_pos)
@@ -170,6 +170,8 @@
 	  unsigned long arg)
 {
 	int i, new_margin;
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 
 	static struct watchdog_info ident = {
 		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
@@ -179,19 +181,19 @@
 
 	switch (cmd) {
 	case WDIOC_GETSUPPORT:
-	  if (copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
+	  if (copy_to_user(argp, &ident, sizeof(ident)))
 	    return -EFAULT;
 	  break;
 
 	case WDIOC_GETSTATUS:
-	  return put_user(0, (int *) arg);
+	  return put_user(0, p);
 
 	case WDIOC_KEEPALIVE:
 	  ibwdt_ping();
 	  break;
 
 	case WDIOC_SETTIMEOUT:
-	  if (get_user(new_margin, (int *)arg))
+	  if (get_user(new_margin, p))
 		  return -EFAULT;
 	  if ((new_margin < 0) || (new_margin > 30))
 		  return -EINVAL;
@@ -203,7 +205,7 @@
 	  /* Fall */
 
 	case WDIOC_GETTIMEOUT:
-	  return put_user(wd_times[wd_margin], (int *)arg);
+	  return put_user(wd_times[wd_margin], p);
 	  break;
 
 	default:
--- diff/drivers/char/watchdog/indydog.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/indydog.c	2004-07-01 21:32:35.000000000 +0100
@@ -12,6 +12,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -22,16 +23,11 @@
 #include <linux/notifier.h>
 #include <linux/reboot.h>
 #include <linux/init.h>
-#include <linux/moduleparam.h>
 #include <asm/uaccess.h>
-#include <asm/sgi/sgimc.h>
+#include <asm/sgi/mc.h>
 
 #define PFX "indydog: "
-#define WATCHDOG_HEARTBEAT 60
-
-static unsigned long indydog_alive;
-static struct sgimc_misc_ctrl *mcmisc_regs;
-static char expect_close;
+static int indydog_alive;
 
 #ifdef CONFIG_WATCHDOG_NOWAYOUT
 static int nowayout = 1;
@@ -39,96 +35,75 @@
 static int nowayout = 0;
 #endif
 
+#define WATCHDOG_TIMEOUT 30		/* 30 sec default timeout */
+
 module_param(nowayout, int, 0);
 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
 
 static void indydog_start(void)
 {
-	u32 mc_ctrl0 = mcmisc_regs->cpuctrl0;
-
-	mc_ctrl0 |= SGIMC_CCTRL0_WDOG;
-	mcmisc_regs->cpuctrl0 = mc_ctrl0;
+	u32 mc_ctrl0 = sgimc->cpuctrl0;
 
-	printk(KERN_INFO PFX "Started watchdog timer.\n");
+	mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG;
+	sgimc->cpuctrl0 = mc_ctrl0;
 }
 
 static void indydog_stop(void)
 {
-	u32 mc_ctrl0 = mcmisc_regs->cpuctrl0;
+	u32 mc_ctrl0 = sgimc->cpuctrl0;
 
 	mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
-	mcmisc_regs->cpuctrl0 = mc_ctrl0;
+	sgimc->cpuctrl0 = mc_ctrl0;
 
 	printk(KERN_INFO PFX "Stopped watchdog timer.\n");
 }
 
 static void indydog_ping(void)
 {
-	mcmisc_regs->watchdogt = 0;
+	sgimc->watchdogt = 0;
 }
 
 /*
  *	Allow only one person to hold it open
  */
-
 static int indydog_open(struct inode *inode, struct file *file)
 {
-	if( test_and_set_bit(0,&indydog_alive) )
+	if (indydog_alive)
 		return -EBUSY;
 
 	if (nowayout)
 		__module_get(THIS_MODULE);
 
-	/*
-	 *	Activate timer
-	 */
+	/* Activate timer */
 	indydog_start();
 	indydog_ping();
 
+	indydog_alive = 1;
+	printk(KERN_INFO "Started watchdog timer.\n");
+
 	return 0;
 }
 
 static int indydog_release(struct inode *inode, struct file *file)
 {
-	/*
-	 *	Shut off the timer.
-	 * 	Lock it in if it's a module and we set nowayout
-	 */
-
-	if (expect_close == 42) {
-		indydog_stop();
-	} else {
-		printk(KERN_CRIT PFX "WDT device closed unexpectedly.  WDT will not stop!\n");
-		indydog_ping();
-	}
-	clear_bit(0,&indydog_alive);
-	expect_close = 0;
+	/* Shut off the timer.
+	 * Lock it in if it's a module and we defined ...NOWAYOUT */
+	if (!nowayout)
+		indydog_stop();		/* Turn the WDT off */
+
+	indydog_alive = 0;
+
 	return 0;
 }
 
 static ssize_t indydog_write(struct file *file, const char *data, size_t len, loff_t *ppos)
 {
-	/*  Can't seek (pwrite) on this device  */
+	/* Can't seek (pwrite) on this device */
 	if (ppos != &file->f_pos)
 		return -ESPIPE;
 
 	/* Refresh the timer. */
 	if (len) {
-		if (!nowayout) {
-			size_t i;
-
-			/* In case it was set long ago */
-			expect_close = 0;
-
-			for (i = 0; i != len; i++) {
-				char c;
-
-				if (get_user(c, data + i))
-					return -EFAULT;
-				if (c == 'V')
-					expect_close = 42;
-			}
-		}
 		indydog_ping();
 	}
 	return len;
@@ -139,17 +114,18 @@
 {
 	int options, retval = -EINVAL;
 	static struct watchdog_info ident = {
-		.options =		WDIOF_KEEPALIVEPING |
-					WDIOF_MAGICCLOSE,
-		.firmware_version =	0,
-		.identity =		"Hardware Watchdog for SGI IP22",
+		.options		= WDIOF_KEEPALIVEPING |
+					  WDIOF_MAGICCLOSE,
+		.firmware_version	= 0,
+		.identity		= "Hardware Watchdog for SGI IP22",
 	};
 
 	switch (cmd) {
 		default:
 			return -ENOIOCTLCMD;
 		case WDIOC_GETSUPPORT:
-			if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
+			if (copy_to_user((struct watchdog_info *)arg,
+					 &ident, sizeof(ident)))
 				return -EFAULT;
 			return 0;
 		case WDIOC_GETSTATUS:
@@ -165,14 +141,12 @@
 			if (get_user(options, (int *)arg))
 				return -EFAULT;
 
-			if (options & WDIOS_DISABLECARD)
-			{
+			if (options & WDIOS_DISABLECARD) {
 				indydog_stop();
 				retval = 0;
 			}
 
-			if (options & WDIOS_ENABLECARD)
-			{
+			if (options & WDIOS_ENABLECARD) {
 				indydog_start();
 				retval = 0;
 			}
@@ -184,40 +158,37 @@
 
 static int indydog_notify_sys(struct notifier_block *this, unsigned long code, void *unused)
 {
-	if (code==SYS_DOWN || code==SYS_HALT) {
-		/* Turn the WDT off */
-		indydog_stop();
-	}
+	if (code == SYS_DOWN || code == SYS_HALT)
+		indydog_stop();		/* Turn the WDT off */
 
 	return NOTIFY_DONE;
 }
 
 static struct file_operations indydog_fops = {
-	.owner	= THIS_MODULE,
-	.write	= indydog_write,
-	.ioctl	= indydog_ioctl,
-	.open	= indydog_open,
-	.release= indydog_release,
+	.owner		= THIS_MODULE,
+	.write		= indydog_write,
+	.ioctl		= indydog_ioctl,
+	.open		= indydog_open,
+	.release	= indydog_release,
 };
 
 static struct miscdevice indydog_miscdev = {
-	.minor	= WATCHDOG_MINOR,
-	.name	= "watchdog",
-	.fops	= &indydog_fops,
+	.minor		= WATCHDOG_MINOR,
+	.name		= "watchdog",
+	.fops		= &indydog_fops,
 };
 
 static struct notifier_block indydog_notifier = {
 	.notifier_call = indydog_notify_sys,
 };
 
-static char banner[] __initdata = KERN_INFO PFX "Hardware Watchdog Timer for SGI IP22: 0.3\n";
+static char banner[] __initdata =
+	KERN_INFO PFX "Hardware Watchdog Timer for SGI IP22: 0.3\n";
 
 static int __init watchdog_init(void)
 {
 	int ret;
 
-	mcmisc_regs = (struct sgimc_misc_ctrl *)(KSEG1+0x1fa00000);
-
 	ret = register_reboot_notifier(&indydog_notifier);
 	if (ret) {
 		printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",
--- diff/drivers/char/watchdog/machzwd.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/machzwd.c	2004-07-01 21:32:35.000000000 +0100
@@ -302,7 +302,7 @@
 	}
 }
 
-static ssize_t zf_write(struct file *file, const char *buf, size_t count,
+static ssize_t zf_write(struct file *file, const char __user *buf, size_t count,
 								loff_t *ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
@@ -352,15 +352,16 @@
 static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	switch(cmd){
 		case WDIOC_GETSUPPORT:
-			if (copy_to_user((struct watchdog_info *)arg,
-					 &zf_info, sizeof(zf_info)))
+			if (copy_to_user(argp, &zf_info, sizeof(zf_info)))
 				return -EFAULT;
 			break;
 
 		case WDIOC_GETSTATUS:
-			return put_user(0, (int *) arg);
+			return put_user(0, p);
 
 		case WDIOC_KEEPALIVE:
 			zf_ping(0);
--- diff/drivers/char/watchdog/mixcomwd.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/mixcomwd.c	2004-07-01 21:32:35.000000000 +0100
@@ -134,7 +134,7 @@
 }
 
 
-static ssize_t mixcomwd_write(struct file *file, const char *data, size_t len, loff_t *ppos)
+static ssize_t mixcomwd_write(struct file *file, const char __user *data, size_t len, loff_t *ppos)
 {
 	if (ppos != &file->f_pos) {
 		return -ESPIPE;
@@ -164,6 +164,8 @@
 static int mixcomwd_ioctl(struct inode *inode, struct file *file,
 	unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	int status;
 	static struct watchdog_info ident = {
 		.options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
@@ -178,13 +180,12 @@
 			if (!nowayout) {
 				status|=mixcomwd_timer_alive;
 			}
-			if (copy_to_user((int *)arg, &status, sizeof(int))) {
+			if (copy_to_user(p, &status, sizeof(int))) {
 				return -EFAULT;
 			}
 			break;
 		case WDIOC_GETSUPPORT:
-			if (copy_to_user((struct watchdog_info *)arg, &ident,
-			    sizeof(ident))) {
+			if (copy_to_user(argp, &ident, sizeof(ident))) {
 				return -EFAULT;
 			}
 			break;
--- diff/drivers/char/watchdog/pcwd_pci.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/pcwd_pci.c	2004-07-01 21:32:35.000000000 +0100
@@ -258,7 +258,7 @@
  *	/dev/watchdog handling
  */
 
-static ssize_t pcipcwd_write(struct file *file, const char *data,
+static ssize_t pcipcwd_write(struct file *file, const char __user *data,
 			      size_t len, loff_t *ppos)
 {
 	/* Can't seek (pwrite) on this device  */
@@ -293,6 +293,8 @@
 static int pcipcwd_ioctl(struct inode *inode, struct file *file,
 			  unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.options =		WDIOF_OVERHEAT |
 					WDIOF_CARDRESET |
@@ -305,7 +307,7 @@
 
 	switch (cmd) {
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *) arg, &ident,
+			return copy_to_user(argp, &ident,
 				sizeof (ident)) ? -EFAULT : 0;
 
 		case WDIOC_GETSTATUS:
@@ -314,11 +316,11 @@
 
 			pcipcwd_get_status(&status);
 
-			return put_user(status, (int *) arg);
+			return put_user(status, p);
 		}
 
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(pcipcwd_private.boot_status, (int *) arg);
+			return put_user(pcipcwd_private.boot_status, p);
 
 		case WDIOC_GETTEMP:
 		{
@@ -327,7 +329,7 @@
 			if (pcipcwd_get_temperature(&temperature))
 				return -EFAULT;
 
-			return put_user(temperature, (int *) arg);
+			return put_user(temperature, p);
 		}
 
 		case WDIOC_KEEPALIVE:
@@ -338,7 +340,7 @@
 		{
 			int new_options, retval = -EINVAL;
 
-			if (get_user (new_options, (int *) arg))
+			if (get_user (new_options, p))
 				return -EFAULT;
 
 			if (new_options & WDIOS_DISABLECARD) {
@@ -363,7 +365,7 @@
 		{
 			int new_heartbeat;
 
-			if (get_user(new_heartbeat, (int *) arg))
+			if (get_user(new_heartbeat, p))
 				return -EFAULT;
 
 			if (pcipcwd_set_heartbeat(new_heartbeat))
@@ -374,7 +376,7 @@
 		}
 
 		case WDIOC_GETTIMEOUT:
-			return put_user(heartbeat, (int *)arg);
+			return put_user(heartbeat, p);
 
 		default:
 			return -ENOIOCTLCMD;
@@ -413,7 +415,7 @@
  *	/dev/temperature handling
  */
 
-static ssize_t pcipcwd_temp_read(struct file *file, char *data,
+static ssize_t pcipcwd_temp_read(struct file *file, char __user *data,
 				size_t len, loff_t *ppos)
 {
 	int temperature;
--- diff/drivers/char/watchdog/pcwd_usb.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/pcwd_usb.c	2004-07-01 21:32:35.000000000 +0100
@@ -326,7 +326,7 @@
  *	/dev/watchdog handling
  */
 
-static ssize_t usb_pcwd_write(struct file *file, const char *data,
+static ssize_t usb_pcwd_write(struct file *file, const char __user *data,
 			      size_t len, loff_t *ppos)
 {
 	/* Can't seek (pwrite) on this device  */
@@ -361,6 +361,8 @@
 static int usb_pcwd_ioctl(struct inode *inode, struct file *file,
 			  unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.options =		WDIOF_KEEPALIVEPING |
 					WDIOF_SETTIMEOUT |
@@ -371,12 +373,12 @@
 
 	switch (cmd) {
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *) arg, &ident,
+			return copy_to_user(argp, &ident,
 				sizeof (ident)) ? -EFAULT : 0;
 
 		case WDIOC_GETSTATUS:
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0, (int *) arg);
+			return put_user(0, p);
 
 		case WDIOC_GETTEMP:
 		{
@@ -385,7 +387,7 @@
 			if (usb_pcwd_get_temperature(usb_pcwd_device, &temperature))
 				return -EFAULT;
 
-			return put_user(temperature, (int *) arg);
+			return put_user(temperature, p);
 		}
 
 		case WDIOC_KEEPALIVE:
@@ -396,7 +398,7 @@
 		{
 			int new_options, retval = -EINVAL;
 
-			if (get_user (new_options, (int *) arg))
+			if (get_user (new_options, p))
 				return -EFAULT;
 
 			if (new_options & WDIOS_DISABLECARD) {
@@ -416,7 +418,7 @@
 		{
 			int new_heartbeat;
 
-			if (get_user(new_heartbeat, (int *) arg))
+			if (get_user(new_heartbeat, p))
 				return -EFAULT;
 
 			if (usb_pcwd_set_heartbeat(usb_pcwd_device, new_heartbeat))
@@ -427,7 +429,7 @@
 		}
 
 		case WDIOC_GETTIMEOUT:
-			return put_user(heartbeat, (int *)arg);
+			return put_user(heartbeat, p);
 
 		default:
 			return -ENOIOCTLCMD;
@@ -466,7 +468,7 @@
  *	/dev/temperature handling
  */
 
-static ssize_t usb_pcwd_temperature_read(struct file *file, char *data,
+static ssize_t usb_pcwd_temperature_read(struct file *file, char __user *data,
 				size_t len, loff_t *ppos)
 {
 	int temperature;
@@ -478,7 +480,7 @@
 	if (usb_pcwd_get_temperature(usb_pcwd_device, &temperature))
 		return -EFAULT;
 
-	if (copy_to_user (data, &temperature, 1))
+	if (copy_to_user(data, &temperature, 1))
 		return -EFAULT;
 
 	return 1;
--- diff/drivers/char/watchdog/sa1100_wdt.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/sa1100_wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- *	Watchdog driver for the SA11x0
+ *	Watchdog driver for the SA11x0/PXA2xx
  *
  *      (c) Copyright 2000 Oleg Drokin <green@crimea.edu>
  *          Based on SoftDog driver by Alan Cox <alan@redhat.com>
@@ -174,7 +174,7 @@
 static struct miscdevice sa1100dog_miscdev =
 {
 	.minor		= WATCHDOG_MINOR,
-	.name		= "SA1100 watchdog",
+	.name		= "SA1100/PXA2xx watchdog",
 	.fops		= &sa1100dog_fops,
 };
 
@@ -194,7 +194,7 @@
 
 	ret = misc_register(&sa1100dog_miscdev);
 	if (ret == 0)
-		printk("SA1100 Watchdog Timer: timer margin %d sec\n",
+		printk("SA1100/PXA2xx Watchdog Timer: timer margin %d sec\n",
 		       margin);
 
 	return ret;
@@ -209,7 +209,7 @@
 module_exit(sa1100dog_exit);
 
 MODULE_AUTHOR("Oleg Drokin <green@crimea.edu>");
-MODULE_DESCRIPTION("SA1100 Watchdog");
+MODULE_DESCRIPTION("SA1100/PXA2xx Watchdog");
 
 module_param(margin, int, 0);
 MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)");
--- diff/drivers/char/watchdog/sbc60xxwdt.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/sbc60xxwdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -166,7 +166,7 @@
  * /dev/watchdog handling
  */
 
-static ssize_t fop_write(struct file * file, const char * buf, size_t count, loff_t * ppos)
+static ssize_t fop_write(struct file * file, const char __user * buf, size_t count, loff_t * ppos)
 {
 	/* We can't seek */
 	if(ppos != &file->f_pos)
@@ -230,6 +230,8 @@
 static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident=
 	{
 		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
@@ -242,10 +244,10 @@
 		default:
 			return -ENOIOCTLCMD;
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
+			return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0;
 		case WDIOC_GETSTATUS:
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0, (int *)arg);
+			return put_user(0, p);
 		case WDIOC_KEEPALIVE:
 			wdt_keepalive();
 			return 0;
@@ -253,7 +255,7 @@
 		{
 			int new_options, retval = -EINVAL;
 
-			if(get_user(new_options, (int *)arg))
+			if(get_user(new_options, p))
 				return -EFAULT;
 
 			if(new_options & WDIOS_DISABLECARD) {
@@ -272,7 +274,7 @@
 		{
 			int new_timeout;
 
-			if(get_user(new_timeout, (int *)arg))
+			if(get_user(new_timeout, p))
 				return -EFAULT;
 
 			if(new_timeout < 1 || new_timeout > 3600) /* arbitrary upper limit */
@@ -283,7 +285,7 @@
 			/* Fall through */
 		}
 		case WDIOC_GETTIMEOUT:
-			return put_user(timeout, (int *)arg);
+			return put_user(timeout, p);
 	}
 }
 
--- diff/drivers/char/watchdog/sc1200wdt.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/sc1200wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -174,6 +174,8 @@
 static int sc1200wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
 {
 	int new_timeout;
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
 		.firmware_version = 0,
@@ -185,22 +187,22 @@
 			return -ENOIOCTLCMD;	/* Keep Pavel Machek amused ;) */
 
 		case WDIOC_GETSUPPORT:
-			if (copy_to_user((struct watchdog_info *)arg, &ident, sizeof ident))
+			if (copy_to_user(argp, &ident, sizeof ident))
 				return -EFAULT;
 			return 0;
 
 		case WDIOC_GETSTATUS:
-			return put_user(sc1200wdt_status(), (int *)arg);
+			return put_user(sc1200wdt_status(), p);
 
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0, (int *)arg);
+			return put_user(0, p);
 
 		case WDIOC_KEEPALIVE:
 			sc1200wdt_write_data(WDTO, timeout);
 			return 0;
 
 		case WDIOC_SETTIMEOUT:
-			if (get_user(new_timeout, (int *)arg))
+			if (get_user(new_timeout, p))
 				return -EFAULT;
 
 			/* the API states this is given in secs */
@@ -213,13 +215,13 @@
 			/* fall through and return the new timeout */
 
 		case WDIOC_GETTIMEOUT:
-			return put_user(timeout * 60, (int *)arg);
+			return put_user(timeout * 60, p);
 
 		case WDIOC_SETOPTIONS:
 		{
 			int options, retval = -EINVAL;
 
-			if (get_user(options, (int *)arg))
+			if (get_user(options, p))
 				return -EFAULT;
 
 			if (options & WDIOS_DISABLECARD) {
@@ -254,7 +256,7 @@
 }
 
 
-static ssize_t sc1200wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos)
+static ssize_t sc1200wdt_write(struct file *file, const char __user *data, size_t len, loff_t *ppos)
 {
 	if (ppos != &file->f_pos)
 		return -ESPIPE;
--- diff/drivers/char/watchdog/sc520_wdt.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/sc520_wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -225,7 +225,7 @@
  *	/dev/watchdog handling
  */
 
-static ssize_t fop_write(struct file * file, const char * buf, size_t count, loff_t * ppos)
+static ssize_t fop_write(struct file * file, const char __user * buf, size_t count, loff_t * ppos)
 {
 	/* We can't seek */
 	if(ppos != &file->f_pos)
@@ -285,6 +285,8 @@
 static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
 		.firmware_version = 1,
@@ -296,10 +298,10 @@
 		default:
 			return -ENOIOCTLCMD;
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
+			return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0;
 		case WDIOC_GETSTATUS:
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0, (int *)arg);
+			return put_user(0, p);
 		case WDIOC_KEEPALIVE:
 			wdt_keepalive();
 			return 0;
@@ -307,7 +309,7 @@
 		{
 			int new_options, retval = -EINVAL;
 
-			if(get_user(new_options, (int *)arg))
+			if(get_user(new_options, p))
 				return -EFAULT;
 
 			if(new_options & WDIOS_DISABLECARD) {
@@ -326,7 +328,7 @@
 		{
 			int new_timeout;
 
-			if(get_user(new_timeout, (int *)arg))
+			if(get_user(new_timeout, p))
 				return -EFAULT;
 
 			if(wdt_set_heartbeat(new_timeout))
@@ -336,7 +338,7 @@
 			/* Fall through */
 		}
 		case WDIOC_GETTIMEOUT:
-			return put_user(timeout, (int *)arg);
+			return put_user(timeout, p);
 	}
 }
 
--- diff/drivers/char/watchdog/scx200_wdt.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/scx200_wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -132,7 +132,7 @@
 	.notifier_call = scx200_wdt_notify_sys,
 };
 
-static ssize_t scx200_wdt_write(struct file *file, const char *data,
+static ssize_t scx200_wdt_write(struct file *file, const char __user *data,
 				     size_t len, loff_t *ppos)
 {
 	if (ppos != &file->f_pos)
@@ -163,6 +163,8 @@
 static int scx200_wdt_ioctl(struct inode *inode, struct file *file,
 	unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.identity = "NatSemi SCx200 Watchdog",
 		.firmware_version = 1,
@@ -174,20 +176,19 @@
 	default:
 		return -ENOIOCTLCMD;
 	case WDIOC_GETSUPPORT:
-		if(copy_to_user((struct watchdog_info *)arg, &ident,
-				sizeof(ident)))
+		if(copy_to_user(argp, &ident, sizeof(ident)))
 			return -EFAULT;
 		return 0;
 	case WDIOC_GETSTATUS:
 	case WDIOC_GETBOOTSTATUS:
-		if (put_user(0, (int *)arg))
+		if (put_user(0, p))
 			return -EFAULT;
 		return 0;
 	case WDIOC_KEEPALIVE:
 		scx200_wdt_ping();
 		return 0;
 	case WDIOC_SETTIMEOUT:
-		if (get_user(new_margin, (int *)arg))
+		if (get_user(new_margin, p))
 			return -EFAULT;
 		if (new_margin < 1)
 			return -EINVAL;
@@ -195,7 +196,7 @@
 		scx200_wdt_update_margin();
 		scx200_wdt_ping();
 	case WDIOC_GETTIMEOUT:
-		if (put_user(margin, (int *)arg))
+		if (put_user(margin, p))
 			return -EFAULT;
 		return 0;
 	}
--- diff/drivers/char/watchdog/softdog.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/softdog.c	2004-07-01 21:32:35.000000000 +0100
@@ -161,7 +161,7 @@
 	return 0;
 }
 
-static ssize_t softdog_write(struct file *file, const char *data, size_t len, loff_t *ppos)
+static ssize_t softdog_write(struct file *file, const char __user *data, size_t len, loff_t *ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
 	if (ppos != &file->f_pos)
@@ -194,6 +194,8 @@
 static int softdog_ioctl(struct inode *inode, struct file *file,
 	unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	int new_margin;
 	static struct watchdog_info ident = {
 		.options =		WDIOF_SETTIMEOUT |
@@ -206,23 +208,23 @@
 		default:
 			return -ENOIOCTLCMD;
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *)arg, &ident,
+			return copy_to_user(argp, &ident,
 				sizeof(ident)) ? -EFAULT : 0;
 		case WDIOC_GETSTATUS:
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0,(int *)arg);
+			return put_user(0, p);
 		case WDIOC_KEEPALIVE:
 			softdog_keepalive();
 			return 0;
 		case WDIOC_SETTIMEOUT:
-			if (get_user(new_margin, (int *)arg))
+			if (get_user(new_margin, p))
 				return -EFAULT;
 			if (softdog_set_heartbeat(new_margin))
 				return -EINVAL;
 			softdog_keepalive();
 			/* Fall */
 		case WDIOC_GETTIMEOUT:
-			return put_user(soft_margin, (int *)arg);
+			return put_user(soft_margin, p);
 	}
 }
 
--- diff/drivers/char/watchdog/w83627hf_wdt.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/w83627hf_wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -142,7 +142,7 @@
 }
 
 static ssize_t
-wdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+wdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
 	if (ppos != &file->f_pos)
@@ -171,6 +171,8 @@
 wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	  unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	int new_timeout;
 	static struct watchdog_info ident = {
 		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
@@ -180,20 +182,20 @@
 
 	switch (cmd) {
 	case WDIOC_GETSUPPORT:
-	  if (copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
+	  if (copy_to_user(argp, &ident, sizeof(ident)))
 	    return -EFAULT;
 	  break;
 
 	case WDIOC_GETSTATUS:
 	case WDIOC_GETBOOTSTATUS:
-	  return put_user(0, (int *)arg);
+	  return put_user(0, p);
 
 	case WDIOC_KEEPALIVE:
 	  wdt_ping();
 	  break;
 
 	case WDIOC_SETTIMEOUT:
-	  if (get_user(new_timeout, (int *)arg))
+	  if (get_user(new_timeout, p))
 		  return -EFAULT;
 	  if (wdt_set_heartbeat(new_timeout))
 		  return -EINVAL;
@@ -201,13 +203,13 @@
 	  /* Fall */
 
 	case WDIOC_GETTIMEOUT:
-	  return put_user(timeout, (int *)arg);
+	  return put_user(timeout, p);
 
 	case WDIOC_SETOPTIONS:
 	{
 	  int options, retval = -EINVAL;
 
-	  if (get_user(options, (int *)arg))
+	  if (get_user(options, p))
 	    return -EFAULT;
 
 	  if (options & WDIOS_DISABLECARD) {
--- diff/drivers/char/watchdog/w83877f_wdt.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/w83877f_wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -188,7 +188,7 @@
  * /dev/watchdog handling
  */
 
-static ssize_t fop_write(struct file * file, const char * buf, size_t count, loff_t * ppos)
+static ssize_t fop_write(struct file * file, const char __user * buf, size_t count, loff_t * ppos)
 {
 	/* We can't seek */
 	if(ppos != &file->f_pos)
@@ -249,6 +249,8 @@
 static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident=
 	{
 		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
@@ -261,10 +263,10 @@
 		default:
 			return -ENOIOCTLCMD;
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
+			return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0;
 		case WDIOC_GETSTATUS:
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0, (int *)arg);
+			return put_user(0, p);
 		case WDIOC_KEEPALIVE:
 			wdt_keepalive();
 			return 0;
@@ -272,7 +274,7 @@
 		{
 			int new_options, retval = -EINVAL;
 
-			if(get_user(new_options, (int *)arg))
+			if(get_user(new_options, p))
 				return -EFAULT;
 
 			if(new_options & WDIOS_DISABLECARD) {
@@ -291,7 +293,7 @@
 		{
 			int new_timeout;
 
-			if(get_user(new_timeout, (int *)arg))
+			if(get_user(new_timeout, p))
 				return -EFAULT;
 
 			if(new_timeout < 1 || new_timeout > 3600) /* arbitrary upper limit */
@@ -302,7 +304,7 @@
 			/* Fall through */
 		}
 		case WDIOC_GETTIMEOUT:
-			return put_user(timeout, (int *)arg);
+			return put_user(timeout, p);
 	}
 }
 
--- diff/drivers/char/watchdog/wafer5823wdt.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/wafer5823wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -95,7 +95,7 @@
 	inb_p(wdt_stop);
 }
 
-static ssize_t wafwdt_write(struct file *file, const char *buf, size_t count, loff_t * ppos)
+static ssize_t wafwdt_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
 	if (ppos != &file->f_pos)
@@ -128,6 +128,8 @@
 	     unsigned long arg)
 {
 	int new_timeout;
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	static struct watchdog_info ident = {
 		.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
 		.firmware_version = 1,
@@ -136,21 +138,20 @@
 
 	switch (cmd) {
 	case WDIOC_GETSUPPORT:
-		if (copy_to_user
-		    ((struct watchdog_info *) arg, &ident, sizeof (ident)))
+		if (copy_to_user(argp, &ident, sizeof (ident)))
 			return -EFAULT;
 		break;
 
 	case WDIOC_GETSTATUS:
 	case WDIOC_GETBOOTSTATUS:
-		return put_user(0, (int *)arg);
+		return put_user(0, p);
 
 	case WDIOC_KEEPALIVE:
 		wafwdt_ping();
 		break;
 
 	case WDIOC_SETTIMEOUT:
-		if (get_user(new_timeout, (int *)arg))
+		if (get_user(new_timeout, p))
 			return -EFAULT;
 		if ((new_timeout < 1) || (new_timeout > 255))
 			return -EINVAL;
@@ -159,13 +160,13 @@
 		wafwdt_start();
 		/* Fall */
 	case WDIOC_GETTIMEOUT:
-		return put_user(timeout, (int *)arg);
+		return put_user(timeout, p);
 
 	case WDIOC_SETOPTIONS:
 	{
 		int options, retval = -EINVAL;
 
-		if (get_user(options, (int *)arg))
+		if (get_user(options, p))
 			return -EFAULT;
 
 		if (options & WDIOS_DISABLECARD) {
--- diff/drivers/char/watchdog/wdt.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/watchdog/wdt.c	2004-07-01 21:32:35.000000000 +0100
@@ -286,7 +286,7 @@
  *	write of data will do, as we we don't define content meaning.
  */
 
-static ssize_t wdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+static ssize_t wdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
 	if (ppos != &file->f_pos)
@@ -327,6 +327,8 @@
 static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	int new_heartbeat;
 	int status;
 
@@ -351,18 +353,18 @@
 		default:
 			return -ENOIOCTLCMD;
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
+			return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0;
 
 		case WDIOC_GETSTATUS:
 			wdt_get_status(&status);
-			return put_user(status,(int *)arg);
+			return put_user(status, p);
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0, (int *)arg);
+			return put_user(0, p);
 		case WDIOC_KEEPALIVE:
 			wdt_ping();
 			return 0;
 		case WDIOC_SETTIMEOUT:
-			if (get_user(new_heartbeat, (int *)arg))
+			if (get_user(new_heartbeat, p))
 				return -EFAULT;
 
 			if (wdt_set_heartbeat(new_heartbeat))
@@ -371,7 +373,7 @@
 			wdt_ping();
 			/* Fall */
 		case WDIOC_GETTIMEOUT:
-			return put_user(heartbeat, (int *)arg);
+			return put_user(heartbeat, p);
 	}
 }
 
@@ -435,7 +437,7 @@
  *	farenheit. It was designed by an imperial measurement luddite.
  */
 
-static ssize_t wdt_temp_read(struct file *file, char *buf, size_t count, loff_t *ptr)
+static ssize_t wdt_temp_read(struct file *file, char __user *buf, size_t count, loff_t *ptr)
 {
 	int temperature;
 
--- diff/drivers/char/watchdog/wdt_pci.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/char/watchdog/wdt_pci.c	2004-07-01 21:32:35.000000000 +0100
@@ -331,7 +331,7 @@
  *	write of data will do, as we we don't define content meaning.
  */
 
-static ssize_t wdtpci_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+static ssize_t wdtpci_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	/*  Can't seek (pwrite) on this device  */
 	if (ppos != &file->f_pos)
@@ -374,6 +374,8 @@
 {
 	int new_heartbeat;
 	int status;
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 
 	static struct watchdog_info ident = {
 		.options =		WDIOF_SETTIMEOUT|
@@ -396,18 +398,18 @@
 		default:
 			return -ENOIOCTLCMD;
 		case WDIOC_GETSUPPORT:
-			return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
+			return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0;
 
 		case WDIOC_GETSTATUS:
 			wdtpci_get_status(&status);
-			return put_user(status,(int *)arg);
+			return put_user(status, p);
 		case WDIOC_GETBOOTSTATUS:
-			return put_user(0, (int *)arg);
+			return put_user(0, p);
 		case WDIOC_KEEPALIVE:
 			wdtpci_ping();
 			return 0;
 		case WDIOC_SETTIMEOUT:
-			if (get_user(new_heartbeat, (int *)arg))
+			if (get_user(new_heartbeat, p))
 				return -EFAULT;
 
 			if (wdtpci_set_heartbeat(new_heartbeat))
@@ -416,7 +418,7 @@
 			wdtpci_ping();
 			/* Fall */
 		case WDIOC_GETTIMEOUT:
-			return put_user(heartbeat, (int *)arg);
+			return put_user(heartbeat, p);
 	}
 }
 
@@ -484,7 +486,7 @@
  *	fahrenheit. It was designed by an imperial measurement luddite.
  */
 
-static ssize_t wdtpci_temp_read(struct file *file, char *buf, size_t count, loff_t *ptr)
+static ssize_t wdtpci_temp_read(struct file *file, char __user *buf, size_t count, loff_t *ptr)
 {
 	int temperature;
 
--- diff/drivers/fc4/fc.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/fc4/fc.c	2004-07-01 21:32:36.000000000 +0100
@@ -38,7 +38,7 @@
 #include <asm/irq.h>
 #include <asm/semaphore.h>
 #include "fcp_impl.h"
-#include "../scsi/hosts.h"
+#include <scsi/scsi_host.h>
 
 /* #define FCDEBUG */
 
--- diff/drivers/firmware/Kconfig	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/firmware/Kconfig	2004-07-01 21:32:36.000000000 +0100
@@ -34,4 +34,23 @@
 	  Subsequent efibootmgr releases may be found at:
 	  http://linux.dell.com/efibootmgr
 
+config EFI_PCDP
+	bool "Console device selection via EFI PCDP or HCDP table"
+	depends on ACPI && EFI && IA64
+	default y if IA64
+	help
+	  If your firmware supplies the PCDP table, and you want to
+	  automatically use the primary console device it describes
+	  as the Linux console, say Y here.
+
+	  If your firmware supplies the HCDP table, and you want to
+	  use the first serial port it describes as the Linux console,
+	  say Y here.  If your EFI ConOut path contains only a UART
+	  device, it will become the console automatically.  Otherwise,
+	  you must specify the "console=ttyS0" kernel boot argument.
+
+	  You must also enable the appropriate drivers (serial, VGA, etc.)
+
+	  See <http://www.dig64.org/specifications/DIG64_HCDPv20_042804.pdf>
+
 endmenu
--- diff/drivers/firmware/Makefile	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/firmware/Makefile	2004-07-01 21:32:36.000000000 +0100
@@ -3,3 +3,4 @@
 #
 obj-$(CONFIG_EDD)             	+= edd.o
 obj-$(CONFIG_EFI_VARS)		+= efivars.o
+obj-$(CONFIG_EFI_PCDP)		+= pcdp.o
--- diff/drivers/firmware/edd.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/firmware/edd.c	2004-07-01 21:32:36.000000000 +0100
@@ -2,7 +2,7 @@
  * linux/arch/i386/kernel/edd.c
  *  Copyright (C) 2002, 2003, 2004 Dell Inc.
  *  by Matt Domsch <Matt_Domsch@dell.com>
- *  disk80 signature by Matt Domsch, Andrew Wilks, and Sandeep K. Shandilya
+ *  disk signature by Matt Domsch, Andrew Wilks, and Sandeep K. Shandilya
  *  legacy CHS by Patrick J. LoPresti <patl@users.sourceforge.net>
  *
  * BIOS Enhanced Disk Drive Services (EDD)
@@ -43,8 +43,8 @@
 #include <linux/blkdev.h>
 #include <linux/edd.h>
 
-#define EDD_VERSION "0.15"
-#define EDD_DATE    "2004-May-17"
+#define EDD_VERSION "0.16"
+#define EDD_DATE    "2004-Jun-25"
 
 MODULE_AUTHOR("Matt Domsch <Matt_Domsch@Dell.com>");
 MODULE_DESCRIPTION("sysfs interface to BIOS EDD information");
@@ -54,6 +54,8 @@
 #define left (PAGE_SIZE - (p - buf) - 1)
 
 struct edd_device {
+	unsigned int index;
+	unsigned int mbr_signature;
 	struct edd_info *info;
 	struct kobject kobj;
 };
@@ -77,6 +79,18 @@
 	.test	= _test,				\
 };
 
+static int
+edd_has_mbr_signature(struct edd_device *edev)
+{
+	return edev->index < min_t(unsigned char, edd.mbr_signature_nr, EDD_MBR_SIG_MAX);
+}
+
+static int
+edd_has_edd_info(struct edd_device *edev)
+{
+	return edev->index < min_t(unsigned char, edd.edd_info_nr, EDDMAXNR);
+}
+
 static inline struct edd_info *
 edd_dev_get_info(struct edd_device *edev)
 {
@@ -84,9 +98,13 @@
 }
 
 static inline void
-edd_dev_set_info(struct edd_device *edev, struct edd_info *info)
+edd_dev_set_info(struct edd_device *edev, int i)
 {
-	edev->info = info;
+	edev->index = i;
+	if (edd_has_mbr_signature(edev))
+		edev->mbr_signature = edd.mbr_signature[i];
+	if (edd_has_edd_info(edev))
+		edev->info = &edd.edd_info[i];
 }
 
 #define to_edd_attr(_attr) container_of(_attr,struct edd_attribute,attr)
@@ -256,10 +274,10 @@
 }
 
 static ssize_t
-edd_show_disk80_sig(struct edd_device *edev, char *buf)
+edd_show_mbr_signature(struct edd_device *edev, char *buf)
 {
 	char *p = buf;
-	p += scnprintf(p, left, "0x%08x\n", edd_disk80_sig);
+	p += scnprintf(p, left, "0x%08x\n", edev->mbr_signature);
 	return (p - buf);
 }
 
@@ -440,10 +458,10 @@
 {
 	struct edd_info *info;
 	if (!edev)
-		return -EINVAL;
+		return 0;
 	info = edd_dev_get_info(edev);
 	if (!info)
-		return -EINVAL;
+		return 0;
 	return info->legacy_max_cylinder > 0;
 }
 
@@ -452,10 +470,10 @@
 {
 	struct edd_info *info;
 	if (!edev)
-		return -EINVAL;
+		return 0;
 	info = edd_dev_get_info(edev);
 	if (!info)
-		return -EINVAL;
+		return 0;
 	return info->legacy_max_head > 0;
 }
 
@@ -464,10 +482,10 @@
 {
 	struct edd_info *info;
 	if (!edev)
-		return -EINVAL;
+		return 0;
 	info = edd_dev_get_info(edev);
 	if (!info)
-		return -EINVAL;
+		return 0;
 	return info->legacy_sectors_per_track > 0;
 }
 
@@ -476,10 +494,10 @@
 {
 	struct edd_info *info;
 	if (!edev)
-		return -EINVAL;
+		return 0;
 	info = edd_dev_get_info(edev);
 	if (!info)
-		return -EINVAL;
+		return 0;
 	return info->params.num_default_cylinders > 0;
 }
 
@@ -488,10 +506,10 @@
 {
 	struct edd_info *info;
 	if (!edev)
-		return -EINVAL;
+		return 0;
 	info = edd_dev_get_info(edev);
 	if (!info)
-		return -EINVAL;
+		return 0;
 	return info->params.num_default_heads > 0;
 }
 
@@ -500,10 +518,10 @@
 {
 	struct edd_info *info;
 	if (!edev)
-		return -EINVAL;
+		return 0;
 	info = edd_dev_get_info(edev);
 	if (!info)
-		return -EINVAL;
+		return 0;
 	return info->params.sectors_per_track > 0;
 }
 
@@ -538,23 +556,12 @@
 	return 1;
 }
 
-static int
-edd_has_disk80_sig(struct edd_device *edev)
-{
-	struct edd_info *info;
-	if (!edev)
-		return 0;
-	info = edd_dev_get_info(edev);
-	if (!info)
-		return 0;
-	return info->device == 0x80;
-}
 
-static EDD_DEVICE_ATTR(raw_data, 0444, edd_show_raw_data, NULL);
-static EDD_DEVICE_ATTR(version, 0444, edd_show_version, NULL);
-static EDD_DEVICE_ATTR(extensions, 0444, edd_show_extensions, NULL);
-static EDD_DEVICE_ATTR(info_flags, 0444, edd_show_info_flags, NULL);
-static EDD_DEVICE_ATTR(sectors, 0444, edd_show_sectors, NULL);
+static EDD_DEVICE_ATTR(raw_data, 0444, edd_show_raw_data, edd_has_edd_info);
+static EDD_DEVICE_ATTR(version, 0444, edd_show_version, edd_has_edd_info);
+static EDD_DEVICE_ATTR(extensions, 0444, edd_show_extensions, edd_has_edd_info);
+static EDD_DEVICE_ATTR(info_flags, 0444, edd_show_info_flags, edd_has_edd_info);
+static EDD_DEVICE_ATTR(sectors, 0444, edd_show_sectors, edd_has_edd_info);
 static EDD_DEVICE_ATTR(legacy_max_cylinder, 0444,
                        edd_show_legacy_max_cylinder,
 		       edd_has_legacy_max_cylinder);
@@ -572,23 +579,23 @@
 		       edd_has_default_sectors_per_track);
 static EDD_DEVICE_ATTR(interface, 0444, edd_show_interface, edd_has_edd30);
 static EDD_DEVICE_ATTR(host_bus, 0444, edd_show_host_bus, edd_has_edd30);
-static EDD_DEVICE_ATTR(mbr_signature, 0444, edd_show_disk80_sig, edd_has_disk80_sig);
+static EDD_DEVICE_ATTR(mbr_signature, 0444, edd_show_mbr_signature, edd_has_mbr_signature);
 
 
 /* These are default attributes that are added for every edd
- * device discovered.
+ * device discovered.  There are none.
  */
 static struct attribute * def_attrs[] = {
-	&edd_attr_raw_data.attr,
-	&edd_attr_version.attr,
-	&edd_attr_extensions.attr,
-	&edd_attr_info_flags.attr,
-	&edd_attr_sectors.attr,
 	NULL,
 };
 
 /* These attributes are conditional and only added for some devices. */
 static struct edd_attribute * edd_attrs[] = {
+	&edd_attr_raw_data,
+	&edd_attr_version,
+	&edd_attr_extensions,
+	&edd_attr_info_flags,
+	&edd_attr_sectors,
 	&edd_attr_legacy_max_cylinder,
 	&edd_attr_legacy_max_head,
 	&edd_attr_legacy_sectors_per_track,
@@ -709,9 +716,9 @@
 	if (!edev)
 		return 1;
 	memset(edev, 0, sizeof (*edev));
-	edd_dev_set_info(edev, &edd[i]);
+	edd_dev_set_info(edev, i);
 	kobject_set_name(&edev->kobj, "int13_dev%02x",
-			 edd[i].device);
+			 0x80 + i);
 	kobj_set_kset_s(edev,edd_subsys);
 	error = kobject_register(&edev->kobj);
 	if (!error)
@@ -719,11 +726,15 @@
 	return error;
 }
 
+static inline int edd_num_devices(void)
+{
+	return min_t(unsigned char,
+		     max_t(unsigned char, edd.edd_info_nr, edd.mbr_signature_nr),
+		     max_t(unsigned char, EDD_MBR_SIG_MAX, EDDMAXNR));
+}
+
 /**
  * edd_init() - creates sysfs tree of EDD data
- *
- * This assumes that eddnr and edd were
- * assigned in setup.c already.
  */
 static int __init
 edd_init(void)
@@ -733,9 +744,9 @@
 	struct edd_device *edev;
 
 	printk(KERN_INFO "BIOS EDD facility v%s %s, %d devices found\n",
-	       EDD_VERSION, EDD_DATE, eddnr);
+	       EDD_VERSION, EDD_DATE, edd_num_devices());
 
-	if (!eddnr) {
+	if (!edd_num_devices()) {
 		printk(KERN_INFO "EDD information not available.\n");
 		return 1;
 	}
@@ -744,7 +755,7 @@
 	if (rc)
 		return rc;
 
-	for (i = 0; i < eddnr && i < EDDMAXNR && !rc; i++) {
+	for (i = 0; i < edd_num_devices() && !rc; i++) {
 		edev = kmalloc(sizeof (*edev), GFP_KERNEL);
 		if (!edev)
 			return -ENOMEM;
@@ -768,7 +779,7 @@
 	int i;
 	struct edd_device *edev;
 
-	for (i = 0; i < eddnr && i < EDDMAXNR; i++) {
+	for (i = 0; i < edd_num_devices(); i++) {
 		if ((edev = edd_devices[i]))
 			edd_device_unregister(edev);
 	}
--- diff/drivers/firmware/efivars.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/firmware/efivars.c	2004-07-01 21:32:36.000000000 +0100
@@ -134,7 +134,7 @@
 
 #define EFI_ATTR(_name, _mode, _show, _store) \
 struct subsys_attribute efi_attr_##_name = { \
-	.attr {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE}, \
+	.attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE}, \
 	.show = _show, \
 	.store = _store, \
 };
--- diff/drivers/i2c/busses/i2c-piix4.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/i2c/busses/i2c-piix4.c	2004-07-01 21:32:36.000000000 +0100
@@ -40,6 +40,7 @@
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/apm_bios.h>
+#include <linux/dmi.h>
 #include <asm/io.h>
 
 
@@ -114,18 +115,13 @@
 static unsigned short piix4_smba = 0;
 static struct i2c_adapter piix4_adapter;
 
-/*
- * Get DMI information.
- */
-static int __devinit ibm_dmi_probe(void)
-{
-#ifdef CONFIG_X86
-	extern int is_unsafe_smbus;
-	return is_unsafe_smbus;
-#else
-	return 0;
-#endif
-}
+static struct dmi_system_id __devinitdata piix4_dmi_table[] = {
+	{
+		.ident = "IBM",
+		.matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
+	},
+	{ },
+};
 
 static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
 				const struct pci_device_id *id)
@@ -138,7 +134,9 @@
 
 	dev_info(&PIIX4_dev->dev, "Found %s device\n", pci_name(PIIX4_dev));
 
-	if(ibm_dmi_probe()) {
+	/* Don't access SMBus on IBM systems which get corrupted eeproms */
+	if (dmi_check_system(piix4_dmi_table) &&
+			PIIX4_dev->vendor == PCI_VENDOR_ID_INTEL) {
 		dev_err(&PIIX4_dev->dev, "IBM Laptop detected; this module "
 			"may corrupt your serial eeprom! Refusing to load "
 			"module!\n");
--- diff/drivers/i2c/busses/i2c-rpx.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/i2c/busses/i2c-rpx.c	2004-07-01 21:32:36.000000000 +0100
@@ -50,7 +50,8 @@
 	/* Allocate space for two transmit and two receive buffer
 	 * descriptors in the DP ram.
 	 */
-	data->dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * 4);
+	data->dp_addr = m8xx_cpm_dpram_offset(m8xx_cpm_dpalloc(sizeof(cbd_t)
+				* 4));
 
 	/* ptr to i2c area */
 	data->i2c = (i2c8xx_t *)&(((immap_t *)IMAP_ADDR)->im_i2c);
--- diff/drivers/i2c/chips/asb100.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/i2c/chips/asb100.c	2004-07-01 21:32:36.000000000 +0100
@@ -272,7 +272,7 @@
 	return show_in(dev, buf, 0x##offset); \
 } \
 static DEVICE_ATTR(in##offset##_input, S_IRUGO, \
-		show_in##offset, NULL) \
+		show_in##offset, NULL); \
 static ssize_t \
 	show_in##offset##_min (struct device *dev, char *buf) \
 { \
@@ -294,17 +294,17 @@
 	return set_in_max(dev, buf, count, 0x##offset); \
 } \
 static DEVICE_ATTR(in##offset##_min, S_IRUGO | S_IWUSR, \
-		show_in##offset##_min, set_in##offset##_min) \
+		show_in##offset##_min, set_in##offset##_min); \
 static DEVICE_ATTR(in##offset##_max, S_IRUGO | S_IWUSR, \
-		show_in##offset##_max, set_in##offset##_max)
+		show_in##offset##_max, set_in##offset##_max);
 
-sysfs_in(0)
-sysfs_in(1)
-sysfs_in(2)
-sysfs_in(3)
-sysfs_in(4)
-sysfs_in(5)
-sysfs_in(6)
+sysfs_in(0);
+sysfs_in(1);
+sysfs_in(2);
+sysfs_in(3);
+sysfs_in(4);
+sysfs_in(5);
+sysfs_in(6);
 
 #define device_create_file_in(client, offset) do { \
 	device_create_file(&client->dev, &dev_attr_in##offset##_input); \
@@ -410,15 +410,15 @@
 	return set_fan_div(dev, buf, count, offset - 1); \
 } \
 static DEVICE_ATTR(fan##offset##_input, S_IRUGO, \
-		show_fan##offset, NULL) \
+		show_fan##offset, NULL); \
 static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \
-		show_fan##offset##_min, set_fan##offset##_min) \
+		show_fan##offset##_min, set_fan##offset##_min); \
 static DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, \
-		show_fan##offset##_div, set_fan##offset##_div)
+		show_fan##offset##_div, set_fan##offset##_div);
 
-sysfs_fan(1)
-sysfs_fan(2)
-sysfs_fan(3)
+sysfs_fan(1);
+sysfs_fan(2);
+sysfs_fan(3);
 
 #define device_create_file_fan(client, offset) do { \
 	device_create_file(&client->dev, &dev_attr_fan##offset##_input); \
@@ -449,9 +449,9 @@
 	return sprintf_temp_from_reg(data->reg[nr], buf, nr); \
 }
 
-show_temp_reg(temp)
-show_temp_reg(temp_max)
-show_temp_reg(temp_hyst)
+show_temp_reg(temp);
+show_temp_reg(temp_max);
+show_temp_reg(temp_hyst);
 
 #define set_temp_reg(REG, reg) \
 static ssize_t set_##reg(struct device *dev, const char *buf, \
@@ -473,15 +473,15 @@
 	return count; \
 }
 
-set_temp_reg(MAX, temp_max)
-set_temp_reg(HYST, temp_hyst)
+set_temp_reg(MAX, temp_max);
+set_temp_reg(HYST, temp_hyst);
 
 #define sysfs_temp(num) \
 static ssize_t show_temp##num(struct device *dev, char *buf) \
 { \
 	return show_temp(dev, buf, num-1); \
 } \
-static DEVICE_ATTR(temp##num##_input, S_IRUGO, show_temp##num, NULL) \
+static DEVICE_ATTR(temp##num##_input, S_IRUGO, show_temp##num, NULL); \
 static ssize_t show_temp_max##num(struct device *dev, char *buf) \
 { \
 	return show_temp_max(dev, buf, num-1); \
@@ -492,7 +492,7 @@
 	return set_temp_max(dev, buf, count, num-1); \
 } \
 static DEVICE_ATTR(temp##num##_max, S_IRUGO | S_IWUSR, \
-		show_temp_max##num, set_temp_max##num) \
+		show_temp_max##num, set_temp_max##num); \
 static ssize_t show_temp_hyst##num(struct device *dev, char *buf) \
 { \
 	return show_temp_hyst(dev, buf, num-1); \
@@ -503,12 +503,12 @@
 	return set_temp_hyst(dev, buf, count, num-1); \
 } \
 static DEVICE_ATTR(temp##num##_max_hyst, S_IRUGO | S_IWUSR, \
-		show_temp_hyst##num, set_temp_hyst##num)
+		show_temp_hyst##num, set_temp_hyst##num);
 
-sysfs_temp(1)
-sysfs_temp(2)
-sysfs_temp(3)
-sysfs_temp(4)
+sysfs_temp(1);
+sysfs_temp(2);
+sysfs_temp(3);
+sysfs_temp(4);
 
 /* VID */
 #define device_create_file_temp(client, num) do { \
@@ -523,7 +523,7 @@
 	return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm));
 }
 
-static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid, NULL)
+static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid, NULL);
 #define device_create_file_vid(client) \
 device_create_file(&client->dev, &dev_attr_in0_ref)
 
@@ -544,7 +544,7 @@
 }
 
 /* Alarms */
-static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm)
+static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm);
 #define device_create_file_vrm(client) \
 device_create_file(&client->dev, &dev_attr_vrm);
 
@@ -554,7 +554,7 @@
 	return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->alarms));
 }
 
-static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL)
+static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
 #define device_create_file_alarms(client) \
 device_create_file(&client->dev, &dev_attr_alarms)
 
@@ -594,9 +594,9 @@
 	return count;
 }
 
-static DEVICE_ATTR(fan1_pwm, S_IRUGO | S_IWUSR, show_pwm1, set_pwm1)
+static DEVICE_ATTR(fan1_pwm, S_IRUGO | S_IWUSR, show_pwm1, set_pwm1);
 static DEVICE_ATTR(fan1_pwm_enable, S_IRUGO | S_IWUSR,
-		show_pwm_enable1, set_pwm_enable1)
+		show_pwm_enable1, set_pwm_enable1);
 #define device_create_file_pwm1(client) do { \
 	device_create_file(&new_client->dev, &dev_attr_fan1_pwm); \
 	device_create_file(&new_client->dev, &dev_attr_fan1_pwm_enable); \
--- diff/drivers/i2c/chips/it87.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/i2c/chips/it87.c	2004-07-01 21:32:36.000000000 +0100
@@ -128,15 +128,15 @@
 
 #define IT87_REG_FAN(nr)       (0x0d + (nr))
 #define IT87_REG_FAN_MIN(nr)   (0x10 + (nr))
-#define IT87_REG_FAN_CTRL      0x13
+#define IT87_REG_FAN_MAIN_CTRL 0x13
 
 #define IT87_REG_VIN(nr)       (0x20 + (nr))
 #define IT87_REG_TEMP(nr)      (0x29 + (nr))
 
 #define IT87_REG_VIN_MAX(nr)   (0x30 + (nr) * 2)
 #define IT87_REG_VIN_MIN(nr)   (0x31 + (nr) * 2)
-#define IT87_REG_TEMP_HIGH(nr) (0x40 + ((nr) * 2))
-#define IT87_REG_TEMP_LOW(nr)  (0x41 + ((nr) * 2))
+#define IT87_REG_TEMP_HIGH(nr) (0x40 + (nr) * 2)
+#define IT87_REG_TEMP_LOW(nr)  (0x41 + (nr) * 2)
 
 #define IT87_REG_I2C_ADDR      0x48
 
@@ -145,8 +145,8 @@
 
 #define IT87_REG_CHIPID        0x58
 
-#define IN_TO_REG(val)  (SENSORS_LIMIT((((val) * 10 + 8)/16),0,255))
-#define IN_FROM_REG(val) (((val) *  16) / 10)
+#define IN_TO_REG(val)  (SENSORS_LIMIT((((val) + 8)/16),0,255))
+#define IN_FROM_REG(val) ((val) * 16)
 
 static inline u8 FAN_TO_REG(long rpm, int div)
 {
@@ -159,9 +159,9 @@
 
 #define FAN_FROM_REG(val,div) ((val)==0?-1:(val)==255?0:1350000/((val)*(div)))
 
-#define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-5)/10):\
-					((val)+5)/10),0,255))
-#define TEMP_FROM_REG(val) (((val)>0x80?(val)-0x100:(val))*10)
+#define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-500)/1000):\
+					((val)+500)/1000),-128,127))
+#define TEMP_FROM_REG(val) (((val)>0x80?(val)-0x100:(val))*1000)
 
 #define VID_FROM_REG(val) ((val)==0x1f?0:(val)>=0x10?510-(val)*10:\
 				205-(val)*5)
@@ -170,7 +170,7 @@
 static int DIV_TO_REG(int val)
 {
 	int answer = 0;
-	while ((val >>= 1))
+	while ((val >>= 1) != 0)
 		answer++;
 	return answer;
 }
@@ -231,19 +231,19 @@
 static ssize_t show_in(struct device *dev, char *buf, int nr)
 {
 	struct it87_data *data = it87_update_device(dev);
-	return sprintf(buf, "%d\n", IN_FROM_REG(data->in[nr])*10 );
+	return sprintf(buf, "%d\n", IN_FROM_REG(data->in[nr]));
 }
 
 static ssize_t show_in_min(struct device *dev, char *buf, int nr)
 {
 	struct it87_data *data = it87_update_device(dev);
-	return sprintf(buf, "%d\n", IN_FROM_REG(data->in_min[nr])*10 );
+	return sprintf(buf, "%d\n", IN_FROM_REG(data->in_min[nr]));
 }
 
 static ssize_t show_in_max(struct device *dev, char *buf, int nr)
 {
 	struct it87_data *data = it87_update_device(dev);
-	return sprintf(buf, "%d\n", IN_FROM_REG(data->in_max[nr])*10 );
+	return sprintf(buf, "%d\n", IN_FROM_REG(data->in_max[nr]));
 }
 
 static ssize_t set_in_min(struct device *dev, const char *buf, 
@@ -251,7 +251,7 @@
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct it87_data *data = i2c_get_clientdata(client);
-	unsigned long val = simple_strtoul(buf, NULL, 10)/10;
+	unsigned long val = simple_strtoul(buf, NULL, 10);
 	data->in_min[nr] = IN_TO_REG(val);
 	it87_write_value(client, IT87_REG_VIN_MIN(nr), 
 			data->in_min[nr]);
@@ -262,7 +262,7 @@
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct it87_data *data = i2c_get_clientdata(client);
-	unsigned long val = simple_strtoul(buf, NULL, 10)/10;
+	unsigned long val = simple_strtoul(buf, NULL, 10);
 	data->in_max[nr] = IN_TO_REG(val);
 	it87_write_value(client, IT87_REG_VIN_MAX(nr), 
 			data->in_max[nr]);
@@ -275,7 +275,7 @@
 {								\
 	return show_in(dev, buf, 0x##offset);			\
 }								\
-static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_in##offset, NULL)
+static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_in##offset, NULL);
 
 #define limit_in_offset(offset)					\
 static ssize_t							\
@@ -299,9 +299,9 @@
 	return set_in_max(dev, buf, count, 0x##offset);		\
 }								\
 static DEVICE_ATTR(in##offset##_min, S_IRUGO | S_IWUSR, 	\
-		show_in##offset##_min, set_in##offset##_min)	\
+		show_in##offset##_min, set_in##offset##_min);	\
 static DEVICE_ATTR(in##offset##_max, S_IRUGO | S_IWUSR, 	\
-		show_in##offset##_max, set_in##offset##_max)
+		show_in##offset##_max, set_in##offset##_max);
 
 show_in_offset(0);
 limit_in_offset(0);
@@ -325,24 +325,24 @@
 static ssize_t show_temp(struct device *dev, char *buf, int nr)
 {
 	struct it87_data *data = it87_update_device(dev);
-	return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr])*100 );
+	return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr]));
 }
 static ssize_t show_temp_max(struct device *dev, char *buf, int nr)
 {
 	struct it87_data *data = it87_update_device(dev);
-	return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_high[nr])*100);
+	return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_high[nr]));
 }
 static ssize_t show_temp_min(struct device *dev, char *buf, int nr)
 {
 	struct it87_data *data = it87_update_device(dev);
-	return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_low[nr])*100);
+	return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_low[nr]));
 }
 static ssize_t set_temp_max(struct device *dev, const char *buf, 
 		size_t count, int nr)
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct it87_data *data = i2c_get_clientdata(client);
-	int val = simple_strtol(buf, NULL, 10)/100;
+	int val = simple_strtol(buf, NULL, 10);
 	data->temp_high[nr] = TEMP_TO_REG(val);
 	it87_write_value(client, IT87_REG_TEMP_HIGH(nr), data->temp_high[nr]);
 	return count;
@@ -352,7 +352,7 @@
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct it87_data *data = i2c_get_clientdata(client);
-	int val = simple_strtol(buf, NULL, 10)/100;
+	int val = simple_strtol(buf, NULL, 10);
 	data->temp_low[nr] = TEMP_TO_REG(val);
 	it87_write_value(client, IT87_REG_TEMP_LOW(nr), data->temp_low[nr]);
 	return count;
@@ -382,11 +382,11 @@
 {									\
 	return set_temp_min(dev, buf, count, 0x##offset - 1);		\
 }									\
-static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_temp_##offset, NULL) \
+static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_temp_##offset, NULL); \
 static DEVICE_ATTR(temp##offset##_max, S_IRUGO | S_IWUSR, 		\
-		show_temp_##offset##_max, set_temp_##offset##_max) 	\
+		show_temp_##offset##_max, set_temp_##offset##_max); 	\
 static DEVICE_ATTR(temp##offset##_min, S_IRUGO | S_IWUSR, 		\
-		show_temp_##offset##_min, set_temp_##offset##_min)	
+		show_temp_##offset##_min, set_temp_##offset##_min);	
 
 show_temp_offset(1);
 show_temp_offset(2);
@@ -430,8 +430,8 @@
 {									\
 	return set_sensor(dev, buf, count, 0x##offset - 1);		\
 }									\
-static DEVICE_ATTR(temp##offset##_type, S_IRUGO | S_IWUSR,	 		\
-		show_sensor_##offset, set_sensor_##offset)
+static DEVICE_ATTR(temp##offset##_type, S_IRUGO | S_IWUSR, 		\
+		show_sensor_##offset, set_sensor_##offset);
 
 show_sensor_offset(1);
 show_sensor_offset(2);
@@ -525,11 +525,11 @@
 {									\
 	return set_fan_div(dev, buf, count, 0x##offset - 1);		\
 }									\
-static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL) \
+static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL); \
 static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, 		\
-		show_fan_##offset##_min, set_fan_##offset##_min) 	\
+		show_fan_##offset##_min, set_fan_##offset##_min); 	\
 static DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, 		\
-		show_fan_##offset##_div, set_fan_##offset##_div)
+		show_fan_##offset##_div, set_fan_##offset##_div);
 
 show_fan_offset(1);
 show_fan_offset(2);
@@ -773,9 +773,7 @@
    We don't want to lock the whole ISA bus, so we lock each client
    separately.
    We ignore the IT87 BUSY flag at this moment - it could lead to deadlocks,
-   would slow down the IT87 access and should not be necessary. 
-   There are some ugly typecasts here, but the good new is - they should
-   nowhere else be necessary! */
+   would slow down the IT87 access and should not be necessary. */
 static int it87_read_value(struct i2c_client *client, u8 reg)
 {
 	struct it87_data *data = i2c_get_clientdata(client);
@@ -795,9 +793,7 @@
    We don't want to lock the whole ISA bus, so we lock each client
    separately.
    We ignore the IT87 BUSY flag at this moment - it could lead to deadlocks,
-   would slow down the IT87 access and should not be necessary. 
-   There are some ugly typecasts here, but the good new is - they should
-   nowhere else be necessary! */
+   would slow down the IT87 access and should not be necessary. */
 static int it87_write_value(struct i2c_client *client, u8 reg, u8 value)
 {
 	struct it87_data *data = i2c_get_clientdata(client);
@@ -840,11 +836,11 @@
 	}
 
 	/* Check if tachometers are reset manually or by some reason */
-	tmp = it87_read_value(client, IT87_REG_FAN_CTRL);
+	tmp = it87_read_value(client, IT87_REG_FAN_MAIN_CTRL);
 	if ((tmp & 0x70) == 0) {
 		/* Enable all fan tachometers */
 		tmp = (tmp & 0x8f) | 0x70;
-		it87_write_value(client, IT87_REG_FAN_CTRL, tmp);
+		it87_write_value(client, IT87_REG_FAN_MAIN_CTRL, tmp);
 	}
 
 	/* Start monitoring */
--- diff/drivers/i2c/chips/lm78.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/i2c/chips/lm78.c	2004-07-01 21:32:36.000000000 +0100
@@ -281,7 +281,7 @@
 	return show_in(dev, buf, 0x##offset);			\
 }								\
 static DEVICE_ATTR(in##offset##_input, S_IRUGO, 		\
-		show_in##offset, NULL)				\
+		show_in##offset, NULL);				\
 static ssize_t							\
 	show_in##offset##_min (struct device *dev, char *buf)   \
 {								\
@@ -303,9 +303,9 @@
 	return set_in_max(dev, buf, count, 0x##offset);		\
 }								\
 static DEVICE_ATTR(in##offset##_min, S_IRUGO | S_IWUSR,		\
-		show_in##offset##_min, set_in##offset##_min)    \
+		show_in##offset##_min, set_in##offset##_min);	\
 static DEVICE_ATTR(in##offset##_max, S_IRUGO | S_IWUSR,		\
-		show_in##offset##_max, set_in##offset##_max)
+		show_in##offset##_max, set_in##offset##_max);
 
 show_in_offset(0);
 show_in_offset(1);
@@ -354,11 +354,11 @@
 	return count;
 }
 
-static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL)
+static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL);
 static DEVICE_ATTR(temp1_max, S_IRUGO | S_IWUSR,
-		show_temp_over, set_temp_over)
+		show_temp_over, set_temp_over);
 static DEVICE_ATTR(temp1_max_hyst, S_IRUGO | S_IWUSR,
-		show_temp_hyst, set_temp_hyst)
+		show_temp_hyst, set_temp_hyst);
 
 /* 3 Fans */
 static ssize_t show_fan(struct device *dev, char *buf, int nr)
@@ -439,9 +439,9 @@
 {									\
 	return set_fan_min(dev, buf, count, 0x##offset - 1);		\
 }									\
-static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL) \
+static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL);\
 static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR,		\
-		show_fan_##offset##_min, set_fan_##offset##_min)
+		show_fan_##offset##_min, set_fan_##offset##_min);
 
 static ssize_t set_fan_1_div(struct device *dev, const char *buf,
 		size_t count)
@@ -461,10 +461,10 @@
 
 /* Fan 3 divisor is locked in H/W */
 static DEVICE_ATTR(fan1_div, S_IRUGO | S_IWUSR,
-		show_fan_1_div, set_fan_1_div)
+		show_fan_1_div, set_fan_1_div);
 static DEVICE_ATTR(fan2_div, S_IRUGO | S_IWUSR,
-		show_fan_2_div, set_fan_2_div)
-static DEVICE_ATTR(fan3_div, S_IRUGO, show_fan_3_div, NULL)
+		show_fan_2_div, set_fan_2_div);
+static DEVICE_ATTR(fan3_div, S_IRUGO, show_fan_3_div, NULL);
 
 /* VID */
 static ssize_t show_vid(struct device *dev, char *buf)
--- diff/drivers/i2c/chips/lm85.c	2004-05-19 22:11:40.000000000 +0100
+++ source/drivers/i2c/chips/lm85.c	2004-07-01 21:32:36.000000000 +0100
@@ -451,9 +451,9 @@
 {									\
 	return set_fan_min(dev, buf, count, 0x##offset - 1);		\
 }									\
-static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL) \
+static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL);\
 static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, 		\
-		show_fan_##offset##_min, set_fan_##offset##_min)
+		show_fan_##offset##_min, set_fan_##offset##_min);
 
 show_fan_offset(1);
 show_fan_offset(2);
@@ -468,7 +468,7 @@
 	return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm));
 }
 
-static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL)
+static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL);
 
 static ssize_t show_vrm_reg(struct device *dev, char *buf)
 {
@@ -487,7 +487,7 @@
 	return count;
 }
 
-static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg)
+static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg);
 
 static ssize_t show_alarms_reg(struct device *dev, char *buf)
 {
@@ -495,7 +495,7 @@
 	return sprintf(buf, "%ld\n", (long) ALARMS_FROM_REG(data->alarms));
 }
 
-static DEVICE_ATTR(alarms, S_IRUGO, show_alarms_reg, NULL)
+static DEVICE_ATTR(alarms, S_IRUGO, show_alarms_reg, NULL);
 
 /* pwm */
 
@@ -542,8 +542,8 @@
 	return show_pwm_enable(dev, buf, 0x##offset - 1);			\
 }									\
 static DEVICE_ATTR(fan##offset##_pwm, S_IRUGO | S_IWUSR, 			\
-		show_pwm_##offset, set_pwm_##offset)			\
-static DEVICE_ATTR(fan##offset##_pwm_enable, S_IRUGO, show_pwm_enable##offset, NULL)
+		show_pwm_##offset, set_pwm_##offset);			\
+static DEVICE_ATTR(fan##offset##_pwm_enable, S_IRUGO, show_pwm_enable##offset, NULL);
 
 show_pwm_reg(1);
 show_pwm_reg(2);
@@ -617,11 +617,11 @@
 {									\
 	return set_in_max(dev, buf, count, 0x##offset);			\
 }									\
-static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_in_##offset, NULL)	\
+static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_in_##offset, NULL);	\
 static DEVICE_ATTR(in##offset##_min, S_IRUGO | S_IWUSR, 		\
-		show_in_##offset##_min, set_in_##offset##_min)		\
+		show_in_##offset##_min, set_in_##offset##_min);		\
 static DEVICE_ATTR(in##offset##_max, S_IRUGO | S_IWUSR, 		\
-		show_in_##offset##_max, set_in_##offset##_max)
+		show_in_##offset##_max, set_in_##offset##_max);
 
 show_in_reg(0);
 show_in_reg(1);
@@ -697,11 +697,11 @@
 {									\
 	return set_temp_max(dev, buf, count, 0x##offset - 1);		\
 }									\
-static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_temp_##offset, NULL)	\
+static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_temp_##offset, NULL);	\
 static DEVICE_ATTR(temp##offset##_min, S_IRUGO | S_IWUSR, 		\
-		show_temp_##offset##_min, set_temp_##offset##_min)	\
+		show_temp_##offset##_min, set_temp_##offset##_min);	\
 static DEVICE_ATTR(temp##offset##_max, S_IRUGO | S_IWUSR, 		\
-		show_temp_##offset##_max, set_temp_##offset##_max)
+		show_temp_##offset##_max, set_temp_##offset##_max);
 
 show_temp_reg(1);
 show_temp_reg(2);
--- diff/drivers/i2c/chips/via686a.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/i2c/chips/via686a.c	2004-07-01 21:32:36.000000000 +0100
@@ -405,11 +405,11 @@
 {								\
 	return set_in_max(dev, buf, count, 0x##offset);		\
 }								\
-static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_in##offset, NULL) 	\
+static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_in##offset, NULL);\
 static DEVICE_ATTR(in##offset##_min, S_IRUGO | S_IWUSR, 	\
-		show_in##offset##_min, set_in##offset##_min)	\
+		show_in##offset##_min, set_in##offset##_min);	\
 static DEVICE_ATTR(in##offset##_max, S_IRUGO | S_IWUSR, 	\
-		show_in##offset##_max, set_in##offset##_max)
+		show_in##offset##_max, set_in##offset##_max);
 
 show_in_offset(0);
 show_in_offset(1);
@@ -473,11 +473,11 @@
 {									\
 	return set_temp_hyst(dev, buf, count, 0x##offset - 1);		\
 }									\
-static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_temp_##offset, NULL) \
+static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_temp_##offset, NULL);\
 static DEVICE_ATTR(temp##offset##_max, S_IRUGO | S_IWUSR, 		\
-		show_temp_##offset##_over, set_temp_##offset##_over) 	\
+		show_temp_##offset##_over, set_temp_##offset##_over);	\
 static DEVICE_ATTR(temp##offset##_max_hyst, S_IRUGO | S_IWUSR, 		\
-		show_temp_##offset##_hyst, set_temp_##offset##_hyst)	
+		show_temp_##offset##_hyst, set_temp_##offset##_hyst);	
 
 show_temp_offset(1);
 show_temp_offset(2);
@@ -542,11 +542,11 @@
 {									\
 	return set_fan_div(dev, buf, count, 0x##offset - 1);		\
 }									\
-static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL) \
+static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL);\
 static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, 		\
-		show_fan_##offset##_min, set_fan_##offset##_min) 	\
+		show_fan_##offset##_min, set_fan_##offset##_min);	\
 static DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, 		\
-		show_fan_##offset##_div, set_fan_##offset##_div)
+		show_fan_##offset##_div, set_fan_##offset##_div);
 
 show_fan_offset(1);
 show_fan_offset(2);
--- diff/drivers/i2c/chips/w83627hf.c	2004-05-19 22:11:40.000000000 +0100
+++ source/drivers/i2c/chips/w83627hf.c	2004-07-01 21:32:36.000000000 +0100
@@ -199,7 +199,7 @@
 #define W83627THF_REG_PWM2		0x03	/* 697HF and 637HF too */
 #define W83627THF_REG_PWM3		0x11	/* 637HF too */
 
-#define W83627THF_REG_VRM_OVT_CFG 	0x18	/* 637HF too, unused yet */
+#define W83627THF_REG_VRM_OVT_CFG 	0x18	/* 637HF too */
 
 static const u8 regpwm_627hf[] = { W83627HF_REG_PWM1, W83627HF_REG_PWM2 };
 static const u8 regpwm[] = { W83627THF_REG_PWM1, W83627THF_REG_PWM2,
@@ -222,7 +222,7 @@
    these macros are called: arguments may be evaluated more than once.
    Fixing this is just not worth it. */
 #define IN_TO_REG(val)  (SENSORS_LIMIT((((val) + 8)/16),0,255))
-#define IN_FROM_REG(val) ((val) * 16 + 5)
+#define IN_FROM_REG(val) ((val) * 16)
 
 static inline u8 FAN_TO_REG(long rpm, int div)
 {
@@ -312,6 +312,7 @@
 				   Default = 3435.
 				   Other Betas unimplemented */
 	u8 vrm;
+	u8 vrm_ovt;		/* Register value, 627thf & 637hf only */
 };
 
 
@@ -370,7 +371,7 @@
 { \
         return show_in(dev, buf, 0x##offset); \
 } \
-static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_regs_in_##offset, NULL)
+static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_regs_in_##offset, NULL);
 
 #define sysfs_in_reg_offset(reg, offset) \
 static ssize_t show_regs_in_##reg##offset (struct device *dev, char *buf) \
@@ -384,22 +385,104 @@
 	return store_in_##reg (dev, buf, count, 0x##offset); \
 } \
 static DEVICE_ATTR(in##offset##_##reg, S_IRUGO| S_IWUSR, \
-		  show_regs_in_##reg##offset, store_regs_in_##reg##offset)
+		  show_regs_in_##reg##offset, store_regs_in_##reg##offset);
 
 #define sysfs_in_offsets(offset) \
 sysfs_in_offset(offset) \
 sysfs_in_reg_offset(min, offset) \
 sysfs_in_reg_offset(max, offset)
 
-sysfs_in_offsets(0)
-sysfs_in_offsets(1)
-sysfs_in_offsets(2)
-sysfs_in_offsets(3)
-sysfs_in_offsets(4)
-sysfs_in_offsets(5)
-sysfs_in_offsets(6)
-sysfs_in_offsets(7)
-sysfs_in_offsets(8)
+sysfs_in_offsets(1);
+sysfs_in_offsets(2);
+sysfs_in_offsets(3);
+sysfs_in_offsets(4);
+sysfs_in_offsets(5);
+sysfs_in_offsets(6);
+sysfs_in_offsets(7);
+sysfs_in_offsets(8);
+
+/* use a different set of functions for in0 */
+static ssize_t show_in_0(struct w83627hf_data *data, char *buf, u8 reg)
+{
+	long in0;
+
+	if ((data->vrm_ovt & 0x01) &&
+		(w83627thf == data->type || w83637hf == data->type))
+
+		/* use VRM9 calculation */
+		in0 = (long)((reg * 488 + 70000 + 50) / 100);
+	else
+		/* use VRM8 (standard) calculation */
+		in0 = (long)IN_FROM_REG(reg);
+
+	return sprintf(buf,"%ld\n", in0);
+}
+
+static ssize_t show_regs_in_0(struct device *dev, char *buf)
+{
+	struct w83627hf_data *data = w83627hf_update_device(dev);
+	return show_in_0(data, buf, data->in[0]);
+}
+
+static ssize_t show_regs_in_min0(struct device *dev, char *buf)
+{
+	struct w83627hf_data *data = w83627hf_update_device(dev);
+	return show_in_0(data, buf, data->in_min[0]);
+}
+
+static ssize_t show_regs_in_max0(struct device *dev, char *buf)
+{
+	struct w83627hf_data *data = w83627hf_update_device(dev);
+	return show_in_0(data, buf, data->in_max[0]);
+}
+
+static ssize_t store_regs_in_min0(struct device *dev,
+	const char *buf, size_t count)
+{
+	struct i2c_client *client = to_i2c_client(dev);
+	struct w83627hf_data *data = i2c_get_clientdata(client);
+	u32 val;
+
+	val = simple_strtoul(buf, NULL, 10);
+	if ((data->vrm_ovt & 0x01) &&
+		(w83627thf == data->type || w83637hf == data->type))
+
+		/* use VRM9 calculation */
+		data->in_min[0] = (u8)(((val * 100) - 70000 + 244) / 488);
+	else
+		/* use VRM8 (standard) calculation */
+		data->in_min[0] = IN_TO_REG(val);
+
+	w83627hf_write_value(client, W83781D_REG_IN_MIN(0), data->in_min[0]);
+	return count;
+}
+
+static ssize_t store_regs_in_max0(struct device *dev,
+	const char *buf, size_t count)
+{
+	struct i2c_client *client = to_i2c_client(dev);
+	struct w83627hf_data *data = i2c_get_clientdata(client);
+	u32 val;
+
+	val = simple_strtoul(buf, NULL, 10);
+	if ((data->vrm_ovt & 0x01) &&
+		(w83627thf == data->type || w83637hf == data->type))
+		
+		/* use VRM9 calculation */
+		data->in_max[0] = (u8)(((val * 100) - 70000 + 244) / 488);
+	else
+		/* use VRM8 (standard) calculation */
+		data->in_max[0] = IN_TO_REG(val);
+
+	w83627hf_write_value(client, W83781D_REG_IN_MAX(0), data->in_max[0]);
+	return count;
+}
+
+static DEVICE_ATTR(in0_input, S_IRUGO, show_regs_in_0, NULL);
+static DEVICE_ATTR(in0_min, S_IRUGO | S_IWUSR,
+	show_regs_in_min0, store_regs_in_min0);
+static DEVICE_ATTR(in0_max, S_IRUGO | S_IWUSR,
+	show_regs_in_max0, store_regs_in_max0);
 
 #define device_create_file_in(client, offset) \
 do { \
@@ -416,8 +499,8 @@
 		FAN_FROM_REG(data->reg[nr-1], \
 			    (long)DIV_FROM_REG(data->fan_div[nr-1]))); \
 }
-show_fan_reg(fan)
-show_fan_reg(fan_min)
+show_fan_reg(fan);
+show_fan_reg(fan_min);
 
 static ssize_t
 store_fan_min(struct device *dev, const char *buf, size_t count, int nr)
@@ -440,7 +523,7 @@
 { \
 	return show_fan(dev, buf, 0x##offset); \
 } \
-static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_regs_fan_##offset, NULL)
+static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_regs_fan_##offset, NULL);
 
 #define sysfs_fan_min_offset(offset) \
 static ssize_t show_regs_fan_min##offset (struct device *dev, char *buf) \
@@ -453,14 +536,14 @@
 	return store_fan_min(dev, buf, count, 0x##offset); \
 } \
 static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \
-		  show_regs_fan_min##offset, store_regs_fan_min##offset)
+		  show_regs_fan_min##offset, store_regs_fan_min##offset);
 
-sysfs_fan_offset(1)
-sysfs_fan_min_offset(1)
-sysfs_fan_offset(2)
-sysfs_fan_min_offset(2)
-sysfs_fan_offset(3)
-sysfs_fan_min_offset(3)
+sysfs_fan_offset(1);
+sysfs_fan_min_offset(1);
+sysfs_fan_offset(2);
+sysfs_fan_min_offset(2);
+sysfs_fan_offset(3);
+sysfs_fan_min_offset(3);
 
 #define device_create_file_fan(client, offset) \
 do { \
@@ -479,9 +562,9 @@
 		return sprintf(buf,"%ld\n", (long)TEMP_FROM_REG(data->reg)); \
 	} \
 }
-show_temp_reg(temp)
-show_temp_reg(temp_max)
-show_temp_reg(temp_max_hyst)
+show_temp_reg(temp);
+show_temp_reg(temp_max);
+show_temp_reg(temp_max_hyst);
 
 #define store_temp_reg(REG, reg) \
 static ssize_t \
@@ -505,8 +588,8 @@
 	 \
 	return count; \
 }
-store_temp_reg(OVER, max)
-store_temp_reg(HYST, max_hyst)
+store_temp_reg(OVER, max);
+store_temp_reg(HYST, max_hyst);
 
 #define sysfs_temp_offset(offset) \
 static ssize_t \
@@ -514,7 +597,7 @@
 { \
 	return show_temp(dev, buf, 0x##offset); \
 } \
-static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_regs_temp_##offset, NULL)
+static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_regs_temp_##offset, NULL);
 
 #define sysfs_temp_reg_offset(reg, offset) \
 static ssize_t show_regs_temp_##reg##offset (struct device *dev, char *buf) \
@@ -528,16 +611,16 @@
 	return store_temp_##reg (dev, buf, count, 0x##offset); \
 } \
 static DEVICE_ATTR(temp##offset##_##reg, S_IRUGO| S_IWUSR, \
-		  show_regs_temp_##reg##offset, store_regs_temp_##reg##offset)
+		  show_regs_temp_##reg##offset, store_regs_temp_##reg##offset);
 
 #define sysfs_temp_offsets(offset) \
 sysfs_temp_offset(offset) \
 sysfs_temp_reg_offset(max, offset) \
 sysfs_temp_reg_offset(max_hyst, offset)
 
-sysfs_temp_offsets(1)
-sysfs_temp_offsets(2)
-sysfs_temp_offsets(3)
+sysfs_temp_offsets(1);
+sysfs_temp_offsets(2);
+sysfs_temp_offsets(3);
 
 #define device_create_file_temp(client, offset) \
 do { \
@@ -552,7 +635,7 @@
 	struct w83627hf_data *data = w83627hf_update_device(dev);
 	return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm));
 }
-static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL)
+static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL);
 #define device_create_file_vid(client) \
 device_create_file(&client->dev, &dev_attr_in0_ref)
 
@@ -574,7 +657,7 @@
 
 	return count;
 }
-static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg)
+static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg);
 #define device_create_file_vrm(client) \
 device_create_file(&client->dev, &dev_attr_vrm)
 
@@ -584,7 +667,7 @@
 	struct w83627hf_data *data = w83627hf_update_device(dev);
 	return sprintf(buf, "%ld\n", (long) data->alarms);
 }
-static DEVICE_ATTR(alarms, S_IRUGO, show_alarms_reg, NULL)
+static DEVICE_ATTR(alarms, S_IRUGO, show_alarms_reg, NULL);
 #define device_create_file_alarms(client) \
 device_create_file(&client->dev, &dev_attr_alarms)
 
@@ -641,10 +724,10 @@
 	return store_beep_reg(dev, buf, count, BEEP_##REG); \
 } \
 static DEVICE_ATTR(beep_##reg, S_IRUGO | S_IWUSR, \
-		  show_regs_beep_##reg, store_regs_beep_##reg)
+		  show_regs_beep_##reg, store_regs_beep_##reg);
 
-sysfs_beep(ENABLE, enable)
-sysfs_beep(MASK, mask)
+sysfs_beep(ENABLE, enable);
+sysfs_beep(MASK, mask);
 
 #define device_create_file_beep(client) \
 do { \
@@ -707,11 +790,11 @@
 	return store_fan_div_reg(dev, buf, count, offset - 1); \
 } \
 static DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, \
-		  show_regs_fan_div_##offset, store_regs_fan_div_##offset)
+		  show_regs_fan_div_##offset, store_regs_fan_div_##offset);
 
-sysfs_fan_div(1)
-sysfs_fan_div(2)
-sysfs_fan_div(3)
+sysfs_fan_div(1);
+sysfs_fan_div(2);
+sysfs_fan_div(3);
 
 #define device_create_file_fan_div(client, offset) \
 do { \
@@ -763,11 +846,11 @@
 	return store_pwm_reg(dev, buf, count, offset); \
 } \
 static DEVICE_ATTR(fan##offset##_pwm, S_IRUGO | S_IWUSR, \
-		  show_regs_pwm_##offset, store_regs_pwm_##offset)
+		  show_regs_pwm_##offset, store_regs_pwm_##offset);
 
-sysfs_pwm(1)
-sysfs_pwm(2)
-sysfs_pwm(3)
+sysfs_pwm(1);
+sysfs_pwm(2);
+sysfs_pwm(3);
 
 #define device_create_file_pwm(client, offset) \
 do { \
@@ -836,11 +919,11 @@
     return store_sensor_reg(dev, buf, count, offset); \
 } \
 static DEVICE_ATTR(temp##offset##_type, S_IRUGO | S_IWUSR, \
-		  show_regs_sensor_##offset, store_regs_sensor_##offset)
+		  show_regs_sensor_##offset, store_regs_sensor_##offset);
 
-sysfs_sensor(1)
-sysfs_sensor(2)
-sysfs_sensor(3)
+sysfs_sensor(1);
+sysfs_sensor(2);
+sysfs_sensor(3);
 
 #define device_create_file_sensor(client, offset) \
 do { \
@@ -1157,7 +1240,7 @@
 static void w83627hf_init_client(struct i2c_client *client)
 {
 	struct w83627hf_data *data = i2c_get_clientdata(client);
-	int vid = 0, i;
+	int i;
 	int type = data->type;
 	u8 tmp;
 
@@ -1191,10 +1274,15 @@
 		data->vid = w83627thf_read_gpio5(client) & 0x1f;
 	}
 
-	/* Convert VID to voltage based on default VRM */
-	data->vrm = DEFAULT_VRM;
-	if (type != w83697hf)
-		vid = vid_from_reg(vid, data->vrm);
+	/* Read VRM & OVT Config only once */
+	if (w83627thf == data->type || w83637hf == data->type) {
+		data->vrm_ovt = 
+			w83627hf_read_value(client, W83627THF_REG_VRM_OVT_CFG);
+		data->vrm = (data->vrm_ovt & 0x01) ? 90 : 82;
+	} else {
+		/* Convert VID to voltage based on default VRM */
+		data->vrm = DEFAULT_VRM;
+	}
 
 	tmp = w83627hf_read_value(client, W83781D_REG_SCFG1);
 	for (i = 1; i <= 3; i++) {
--- diff/drivers/i2c/chips/w83781d.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/i2c/chips/w83781d.c	2004-07-01 21:32:36.000000000 +0100
@@ -320,7 +320,7 @@
 { \
         return show_in(dev, buf, 0x##offset); \
 } \
-static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_regs_in_##offset, NULL)
+static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_regs_in_##offset, NULL);
 
 #define sysfs_in_reg_offset(reg, offset) \
 static ssize_t show_regs_in_##reg##offset (struct device *dev, char *buf) \
@@ -331,7 +331,7 @@
 { \
 	return store_in_##reg (dev, buf, count, 0x##offset); \
 } \
-static DEVICE_ATTR(in##offset##_##reg, S_IRUGO| S_IWUSR, show_regs_in_##reg##offset, store_regs_in_##reg##offset)
+static DEVICE_ATTR(in##offset##_##reg, S_IRUGO| S_IWUSR, show_regs_in_##reg##offset, store_regs_in_##reg##offset);
 
 #define sysfs_in_offsets(offset) \
 sysfs_in_offset(offset); \
@@ -386,7 +386,7 @@
 { \
 	return show_fan(dev, buf, 0x##offset); \
 } \
-static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_regs_fan_##offset, NULL)
+static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_regs_fan_##offset, NULL);
 
 #define sysfs_fan_min_offset(offset) \
 static ssize_t show_regs_fan_min##offset (struct device *dev, char *buf) \
@@ -397,7 +397,7 @@
 { \
 	return store_fan_min(dev, buf, count, 0x##offset); \
 } \
-static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, show_regs_fan_min##offset, store_regs_fan_min##offset)
+static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, show_regs_fan_min##offset, store_regs_fan_min##offset);
 
 sysfs_fan_offset(1);
 sysfs_fan_min_offset(1);
@@ -466,7 +466,7 @@
 { \
 	return show_temp(dev, buf, 0x##offset); \
 } \
-static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_regs_temp_##offset, NULL)
+static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_regs_temp_##offset, NULL);
 
 #define sysfs_temp_reg_offset(reg, offset) \
 static ssize_t show_regs_temp_##reg##offset (struct device *dev, char *buf) \
@@ -477,7 +477,7 @@
 { \
 	return store_temp_##reg (dev, buf, count, 0x##offset); \
 } \
-static DEVICE_ATTR(temp##offset##_##reg, S_IRUGO| S_IWUSR, show_regs_temp_##reg##offset, store_regs_temp_##reg##offset)
+static DEVICE_ATTR(temp##offset##_##reg, S_IRUGO| S_IWUSR, show_regs_temp_##reg##offset, store_regs_temp_##reg##offset);
 
 #define sysfs_temp_offsets(offset) \
 sysfs_temp_offset(offset); \
@@ -503,7 +503,7 @@
 }
 
 static
-DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL)
+DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL);
 #define device_create_file_vid(client) \
 device_create_file(&client->dev, &dev_attr_in0_ref);
 static ssize_t
@@ -527,7 +527,7 @@
 }
 
 static
-DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg)
+DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg);
 #define device_create_file_vrm(client) \
 device_create_file(&client->dev, &dev_attr_vrm);
 static ssize_t
@@ -538,7 +538,7 @@
 }
 
 static
-DEVICE_ATTR(alarms, S_IRUGO, show_alarms_reg, NULL)
+DEVICE_ATTR(alarms, S_IRUGO, show_alarms_reg, NULL);
 #define device_create_file_alarms(client) \
 device_create_file(&client->dev, &dev_attr_alarms);
 static ssize_t show_beep_mask (struct device *dev, char *buf)
@@ -598,7 +598,7 @@
 { \
 	return store_beep_reg(dev, buf, count, BEEP_##REG); \
 } \
-static DEVICE_ATTR(beep_##reg, S_IRUGO | S_IWUSR, show_regs_beep_##reg, store_regs_beep_##reg)
+static DEVICE_ATTR(beep_##reg, S_IRUGO | S_IWUSR, show_regs_beep_##reg, store_regs_beep_##reg);
 
 sysfs_beep(ENABLE, enable);
 sysfs_beep(MASK, mask);
@@ -665,7 +665,7 @@
 { \
 	return store_fan_div_reg(dev, buf, count, offset - 1); \
 } \
-static DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, show_regs_fan_div_##offset, store_regs_fan_div_##offset)
+static DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, show_regs_fan_div_##offset, store_regs_fan_div_##offset);
 
 sysfs_fan_div(1);
 sysfs_fan_div(2);
@@ -744,7 +744,7 @@
 { \
 	return store_pwm_reg(dev, buf, count, offset); \
 } \
-static DEVICE_ATTR(fan##offset##_pwm, S_IRUGO | S_IWUSR, show_regs_pwm_##offset, store_regs_pwm_##offset)
+static DEVICE_ATTR(fan##offset##_pwm, S_IRUGO | S_IWUSR, show_regs_pwm_##offset, store_regs_pwm_##offset);
 
 #define sysfs_pwmenable(offset) \
 static ssize_t show_regs_pwmenable_##offset (struct device *dev, char *buf) \
@@ -755,7 +755,7 @@
 { \
 	return store_pwmenable_reg(dev, buf, count, offset); \
 } \
-static DEVICE_ATTR(fan##offset##_pwm_enable, S_IRUGO | S_IWUSR, show_regs_pwmenable_##offset, store_regs_pwmenable_##offset)
+static DEVICE_ATTR(fan##offset##_pwm_enable, S_IRUGO | S_IWUSR, show_regs_pwmenable_##offset, store_regs_pwmenable_##offset);
 
 sysfs_pwm(1);
 sysfs_pwm(2);
@@ -833,7 +833,7 @@
 { \
     return store_sensor_reg(dev, buf, count, offset); \
 } \
-static DEVICE_ATTR(temp##offset##_type, S_IRUGO | S_IWUSR, show_regs_sensor_##offset, store_regs_sensor_##offset)
+static DEVICE_ATTR(temp##offset##_type, S_IRUGO | S_IWUSR, show_regs_sensor_##offset, store_regs_sensor_##offset);
 
 sysfs_sensor(1);
 sysfs_sensor(2);
@@ -891,7 +891,7 @@
 { \
     return store_rt_reg(dev, buf, count, offset); \
 } \
-static DEVICE_ATTR(rt##offset, S_IRUGO | S_IWUSR, show_regs_rt_##offset, store_regs_rt_##offset)
+static DEVICE_ATTR(rt##offset, S_IRUGO | S_IWUSR, show_regs_rt_##offset, store_regs_rt_##offset);
 
 sysfs_rt(1);
 sysfs_rt(2);
@@ -1491,7 +1491,7 @@
 w83781d_init_client(struct i2c_client *client)
 {
 	struct w83781d_data *data = i2c_get_clientdata(client);
-	int vid = 0, i, p;
+	int i, p;
 	int type = data->type;
 	u8 tmp;
 
@@ -1513,14 +1513,7 @@
 		w83781d_write_value(client, W83781D_REG_BEEP_INTS2, 0);
 	}
 
-	if (type != w83697hf) {
-		vid = w83781d_read_value(client, W83781D_REG_VID_FANDIV) & 0x0f;
-		vid |=
-		    (w83781d_read_value(client, W83781D_REG_CHIPID) & 0x01) <<
-		    4;
-		data->vrm = DEFAULT_VRM;
-		vid = vid_from_reg(vid, data->vrm);
-	}
+	data->vrm = 82;
 
 	if ((type != w83781d) && (type != as99127f)) {
 		tmp = w83781d_read_value(client, W83781D_REG_SCFG1);
--- diff/drivers/i2c/chips/w83l785ts.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/i2c/chips/w83l785ts.c	2004-07-01 21:32:36.000000000 +0100
@@ -137,8 +137,8 @@
 	return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over));
 }
 
-static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL)
-static DEVICE_ATTR(temp1_max, S_IRUGO, show_temp_over, NULL)
+static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL);
+static DEVICE_ATTR(temp1_max, S_IRUGO, show_temp_over, NULL);
 
 /*
  * Real code
--- diff/drivers/i2c/i2c-core.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/i2c/i2c-core.c	2004-07-01 21:32:36.000000000 +0100
@@ -126,7 +126,13 @@
 		goto out_unlock;
 	}
 
-	id = idr_get_new(&i2c_adapter_idr, NULL);
+	res = idr_get_new(&i2c_adapter_idr, NULL, &id);
+	if (res < 0) {
+		if (res == -EAGAIN)
+			res = -ENOMEM;
+		goto out_unlock;
+	}
+
 	adap->nr =  id & MAX_ID_MASK;
 	init_MUTEX(&adap->bus_lock);
 	init_MUTEX(&adap->clist_lock);
@@ -162,7 +168,7 @@
 
 	dev_dbg(&adap->dev, "registered as adapter #%d\n", adap->nr);
 
- out_unlock:
+out_unlock:
 	up(&core_lists);
 	return res;
 }
--- diff/drivers/i2c/i2c-dev.c	2004-05-19 22:11:39.000000000 +0100
+++ source/drivers/i2c/i2c-dev.c	2004-07-01 21:32:36.000000000 +0100
@@ -181,7 +181,7 @@
 	struct i2c_smbus_ioctl_data data_arg;
 	union i2c_smbus_data temp;
 	struct i2c_msg *rdwr_pa;
-	u8 **data_ptrs;
+	u8 __user **data_ptrs;
 	int i,datasize,res;
 	unsigned long funcs;
 
@@ -238,8 +238,7 @@
 			return -EFAULT;
 		}
 
-		data_ptrs = (u8 **) kmalloc(rdwr_arg.nmsgs * sizeof(u8 *),
-					    GFP_KERNEL);
+		data_ptrs = kmalloc(rdwr_arg.nmsgs * sizeof(u8 __user *), GFP_KERNEL);
 		if (data_ptrs == NULL) {
 			kfree(rdwr_pa);
 			return -ENOMEM;
@@ -252,7 +251,7 @@
 				res = -EINVAL;
 				break;
 			}
-			data_ptrs[i] = rdwr_pa[i].buf;
+			data_ptrs[i] = (u8 __user *)rdwr_pa[i].buf;
 			rdwr_pa[i].buf = kmalloc(rdwr_pa[i].len, GFP_KERNEL);
 			if(rdwr_pa[i].buf == NULL) {
 				res = -ENOMEM;
--- diff/drivers/ide/Kconfig	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/Kconfig	2004-07-01 21:32:36.000000000 +0100
@@ -54,7 +54,7 @@
 
 config IDE_MAX_HWIFS 
 	int "Max IDE interfaces"
-	depends on ALPHA
+	depends on ALPHA || SUPERH
 	default 4
 	help
 	  This is the maximum number of IDE hardware interfaces that will
@@ -95,27 +95,29 @@
 
 comment "Please see Documentation/ide.txt for help/info on IDE drives"
 
-config BLK_DEV_HD_IDE
-	bool "Use old disk-only driver on primary interface"
-	depends on ((X86 && X86_PC9800!=y) || SH_MPC1211)
+config BLK_DEV_IDE_SATA
+	bool "Support for SATA (deprecated; conflicts with libata SATA driver)"
+	default n
 	---help---
-	  There are two drivers for MFM/RLL/IDE disks.  Most people use just
-	  the new enhanced driver by itself.  This option however installs the
-	  old hard disk driver to control the primary IDE/disk interface in
-	  the system, leaving the new enhanced IDE driver to take care of only
-	  the 2nd/3rd/4th IDE interfaces.  Doing this will prevent you from
-	  having an IDE/ATAPI CD-ROM or tape drive connected to the primary
-	  IDE interface.  Choosing this option may be useful for older systems
-	  which have MFM/RLL/ESDI controller+drives at the primary port
-	  address (0x1f0), along with IDE drives at the secondary/3rd/4th port
-	  addresses.
+	  There are two drivers for Serial ATA controllers.
 
-	  Normally, just say N here; you will then use the new driver for all
-	  4 interfaces.
+	  The main driver, "libata", exists inside the SCSI subsystem
+	  and supports most modern SATA controllers.
 
-config BLK_DEV_HD_IDE98
+	  The IDE driver (which you are currently configuring) supports
+	  a few first-generation SATA controllers.
+
+	  In order to eliminate conflicts between the two subsystems,
+	  this config option enables the IDE driver's SATA support.
+	  Normally this is disabled, as it is preferred that libata
+	  supports SATA controllers, and this (IDE) driver supports
+	  PATA controllers.
+
+	  If unsure, say N.
+
+config BLK_DEV_HD_IDE
 	bool "Use old disk-only driver on primary interface"
-	depends on X86 && X86_PC9800
+	depends on (X86 || SH_MPC1211)
 	---help---
 	  There are two drivers for MFM/RLL/IDE disks.  Most people use just
 	  the new enhanced driver by itself.  This option however installs the
--- diff/drivers/ide/Makefile	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/Makefile	2004-07-01 21:32:36.000000000 +0100
@@ -29,7 +29,6 @@
 ide-core-$(CONFIG_IDE_ARM)		+= arm/ide_arm.o
 
 # built-in only drivers from legacy/
-ide-core-$(CONFIG_BLK_DEV_IDE_PC9800)	+= legacy/pc9800.o
 ide-core-$(CONFIG_BLK_DEV_BUDDHA)	+= legacy/buddha.o
 ide-core-$(CONFIG_BLK_DEV_FALCON_IDE)	+= legacy/falconide.o
 ide-core-$(CONFIG_BLK_DEV_GAYLE)	+= legacy/gayle.o
--- diff/drivers/ide/ide-cd.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/ide-cd.c	2004-07-01 21:32:36.000000000 +0100
@@ -2816,7 +2816,6 @@
 	return 0;
 }
 
-
 /*
  * Close down the device.  Invalidate all cached blocks.
  */
@@ -2890,12 +2889,6 @@
 		devinfo->mask |= CDC_CLOSE_TRAY;
 	if (!CDROM_CONFIG_FLAGS(drive)->mo_drive)
 		devinfo->mask |= CDC_MO_DRIVE;
-	if (!CDROM_CONFIG_FLAGS(drive)->mrw)
-		devinfo->mask |= CDC_MRW;
-	if (!CDROM_CONFIG_FLAGS(drive)->mrw_w)
-		devinfo->mask |= CDC_MRW_W;
-	if (!CDROM_CONFIG_FLAGS(drive)->ram)
-		devinfo->mask |= CDC_RAM;
 
 	devinfo->disk = drive->disk;
 	return register_cdrom(devinfo);
@@ -2932,7 +2925,7 @@
 	struct cdrom_info *info = drive->driver_data;
 	struct cdrom_device_info *cdi = &info->devinfo;
 	struct atapi_capabilities_page cap;
-	int nslots = 1, mrw_write = 0, ram_write = 0;
+	int nslots = 1;
 
 	if (drive->media == ide_optical) {
 		CDROM_CONFIG_FLAGS(drive)->mo_drive = 1;
@@ -2961,17 +2954,6 @@
 	if (ide_cdrom_get_capabilities(drive, &cap))
 		return 0;
 
-	if (!cdrom_is_mrw(cdi, &mrw_write)) {
-		CDROM_CONFIG_FLAGS(drive)->mrw = 1;
-		if (mrw_write) {
-			CDROM_CONFIG_FLAGS(drive)->mrw_w = 1;
-			CDROM_CONFIG_FLAGS(drive)->ram = 1;
-		}
-	}
-	if (!cdrom_is_random_writable(cdi, &ram_write))
-		if (ram_write)
-			CDROM_CONFIG_FLAGS(drive)->ram = 1;
-
 	if (cap.lock == 0)
 		CDROM_CONFIG_FLAGS(drive)->no_doorlock = 1;
 	if (cap.eject)
@@ -3051,9 +3033,6 @@
         	(CDROM_CONFIG_FLAGS(drive)->cd_r)? "-R" : "", 
         	(CDROM_CONFIG_FLAGS(drive)->cd_rw)? "/RW" : "");
 
-	if (CDROM_CONFIG_FLAGS(drive)->mrw || CDROM_CONFIG_FLAGS(drive)->mrw_w)
-		printk(" CD-MR%s", CDROM_CONFIG_FLAGS(drive)->mrw_w ? "W" : "");
-
         if (CDROM_CONFIG_FLAGS(drive)->is_changer) 
         	printk(" changer w/%d slots", nslots);
         else 	
--- diff/drivers/ide/ide-cd.h	2004-05-19 22:11:40.000000000 +0100
+++ source/drivers/ide/ide-cd.h	2004-07-01 21:32:36.000000000 +0100
@@ -79,8 +79,6 @@
 	__u8 dvd		: 1; /* Drive is a DVD-ROM */
 	__u8 dvd_r		: 1; /* Drive can write DVD-R */
 	__u8 dvd_ram		: 1; /* Drive can write DVD-RAM */
-	__u8 mrw		: 1; /* drive can read mrw */
-	__u8 mrw_w		: 1; /* drive can write mrw */
 	__u8 ram		: 1; /* generic WRITE (dvd-ram/mrw) */
 	__u8 test_write		: 1; /* Drive can fake writes */
 	__u8 supp_disc_present	: 1; /* Changer can report exact contents
--- diff/drivers/ide/ide-disk.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/ide-disk.c	2004-07-01 21:32:36.000000000 +0100
@@ -702,6 +702,37 @@
 	}
 #endif	/* FANCY_STATUS_DUMPS */
 	printk("\n");
+	{
+		struct request *rq;
+		unsigned char opcode = 0;
+		int found = 0;
+
+		spin_lock(&ide_lock);
+		rq = HWGROUP(drive)->rq;
+		spin_unlock(&ide_lock);
+		if (!rq)
+			goto out;
+		if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK)) {
+			char *args = rq->buffer;
+			if (args) {
+				opcode = args[0];
+				found = 1;
+			}
+		} else if (rq->flags & REQ_DRIVE_TASKFILE) {
+			ide_task_t *args = rq->special;
+			if (args) {
+				task_struct_t *tf = (task_struct_t *) args->tfRegister;
+				opcode = tf->command;
+				found = 1;
+			}
+		}
+		printk("ide: failed opcode was: ");
+		if (!found)
+			printk("unknown\n");
+		else
+			printk("0x%02x\n", opcode);
+	}
+out:
 	local_irq_restore(flags);
 	return err;
 }
@@ -1203,6 +1234,41 @@
 
 #endif	/* CONFIG_PROC_FS */
 
+static int idedisk_issue_flush(request_queue_t *q, struct gendisk *disk,
+			       sector_t *error_sector)
+{
+	ide_drive_t *drive = q->queuedata;
+	struct request *rq;
+	int ret;
+
+	if (!drive->wcache)
+		return 0;
+
+	rq = blk_get_request(q, WRITE, __GFP_WAIT);
+
+	memset(rq->cmd, 0, sizeof(rq->cmd));
+
+	if ((drive->id->cfs_enable_2 & 0x2400) == 0x2400)
+		rq->cmd[0] = WIN_FLUSH_CACHE_EXT;
+	else
+		rq->cmd[0] = WIN_FLUSH_CACHE;
+
+
+	rq->flags |= REQ_DRIVE_TASK | REQ_SOFTBARRIER;
+	rq->buffer = rq->cmd;
+
+	ret = blk_execute_rq(q, disk, rq);
+
+	/*
+	 * if we failed and caller wants error offset, get it
+	 */
+	if (ret && error_sector)
+		*error_sector = ide_get_error_location(drive, rq->cmd);
+
+	blk_put_request(rq);
+	return ret;
+}
+
 /*
  * This is tightly woven into the driver->do_special can not touch.
  * DON'T do it again until a total personality rewrite is committed.
@@ -1231,16 +1297,10 @@
 	return 0;
 }
 
-/* check if CACHE FLUSH (EXT) command is supported (bits defined in ATA-6) */
-#define ide_id_has_flush_cache(id)	((id)->cfs_enable_2 & 0x3000)
-
-/* some Maxtor disks have bit 13 defined incorrectly so check bit 10 too */
-#define ide_id_has_flush_cache_ext(id)	\
-	(((id)->cfs_enable_2 & 0x2400) == 0x2400)
-
 static int write_cache (ide_drive_t *drive, int arg)
 {
 	ide_task_t args;
+	int err;
 
 	if (!ide_id_has_flush_cache(drive->id))
 		return 1;
@@ -1251,7 +1311,10 @@
 	args.tfRegister[IDE_COMMAND_OFFSET]	= WIN_SETFEATURES;
 	args.command_type			= IDE_DRIVE_TASK_NO_DATA;
 	args.handler				= &task_no_data_intr;
-	(void) ide_raw_taskfile(drive, &args, NULL);
+
+	err = ide_raw_taskfile(drive, &args, NULL);
+	if (err)
+		return err;
 
 	drive->wcache = arg;
 	return 0;
@@ -1334,7 +1397,8 @@
 	idedisk_pm_flush_cache	= ide_pm_state_start_suspend,
 	idedisk_pm_standby,
 
-	idedisk_pm_restore_dma	= ide_pm_state_start_resume,
+	idedisk_pm_idle		= ide_pm_state_start_resume,
+	idedisk_pm_restore_dma,
 };
 
 static void idedisk_complete_power_step (ide_drive_t *drive, struct request *rq, u8 stat, u8 error)
@@ -1349,6 +1413,9 @@
 	case idedisk_pm_standby:	/* Suspend step 2 (standby) complete */
 		rq->pm->pm_step = ide_pm_state_completed;
 		break;
+	case idedisk_pm_idle:		/* Resume step 1 (idle) complete */
+		rq->pm->pm_step = idedisk_pm_restore_dma;
+		break;
 	}
 }
 
@@ -1372,13 +1439,20 @@
 		args->command_type = IDE_DRIVE_TASK_NO_DATA;
 		args->handler	   = &task_no_data_intr;
 		return do_rw_taskfile(drive, args);
+
 	case idedisk_pm_standby:	/* Suspend step 2 (standby) */
 		args->tfRegister[IDE_COMMAND_OFFSET] = WIN_STANDBYNOW1;
 		args->command_type = IDE_DRIVE_TASK_NO_DATA;
 		args->handler	   = &task_no_data_intr;
 		return do_rw_taskfile(drive, args);
 
-	case idedisk_pm_restore_dma:	/* Resume step 1 (restore DMA) */
+	case idedisk_pm_idle:		/* Resume step 1 (idle) */
+		args->tfRegister[IDE_COMMAND_OFFSET] = WIN_IDLEIMMEDIATE;
+		args->command_type = IDE_DRIVE_TASK_NO_DATA;
+		args->handler = task_no_data_intr;
+		return do_rw_taskfile(drive, args);
+
+	case idedisk_pm_restore_dma:	/* Resume step 2 (restore DMA) */
 		/*
 		 * Right now, all we do is call hwif->ide_dma_check(drive),
 		 * we could be smarter and check for current xfer_speed
@@ -1401,6 +1475,7 @@
 {
 	struct hd_driveid *id = drive->id;
 	unsigned long long capacity;
+	int barrier;
 
 	idedisk_add_settings(drive);
 
@@ -1532,6 +1607,28 @@
 		drive->wcache = 1;
 
 	write_cache(drive, 1);
+
+	/*
+	 * decide if we can sanely support flushes and barriers on
+	 * this drive. unfortunately not all drives advertise FLUSH_CACHE
+	 * support even if they support it. So assume FLUSH_CACHE is there
+	 * always. LBA48 drives are newer, so expect it to flag support
+	 * properly. We can safely support FLUSH_CACHE on lba48, if capacity
+	 * doesn't exceed lba28
+	 */
+	barrier = 1;
+	if (drive->addressing == 1) {
+		barrier = ide_id_has_flush_cache(id);
+		if (capacity > (1ULL << 28) && !ide_id_has_flush_cache_ext(id))
+			barrier = 0;
+	}
+
+	printk("%s: cache flushes %ssupported\n",
+		drive->name, barrier ? "" : "not ");
+	if (barrier) {
+		blk_queue_ordered(drive->queue, 1);
+		blk_queue_issue_flush_fn(drive->queue, idedisk_issue_flush);
+	}
 }
 
 static void ide_cacheflush_p(ide_drive_t *drive)
--- diff/drivers/ide/ide-io.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/ide-io.c	2004-07-01 21:32:36.000000000 +0100
@@ -54,38 +54,73 @@
 #include <asm/io.h>
 #include <asm/bitops.h>
 
-/**
- *	ide_end_request		-	complete an IDE I/O
- *	@drive: IDE device for the I/O
- *	@uptodate: 
- *	@nr_sectors: number of sectors completed
- *
- *	This is our end_request wrapper function. We complete the I/O
- *	update random number input and dequeue the request, which if
- *	it was tagged may be out of order.
+static void ide_fill_flush_cmd(ide_drive_t *drive, struct request *rq)
+{
+	char *buf = rq->cmd;
+
+	/*
+	 * reuse cdb space for ata command
+	 */
+	memset(buf, 0, sizeof(rq->cmd));
+
+	rq->flags |= REQ_DRIVE_TASK | REQ_STARTED;
+	rq->buffer = buf;
+	rq->buffer[0] = WIN_FLUSH_CACHE;
+
+	if (ide_id_has_flush_cache_ext(drive->id))
+		rq->buffer[0] = WIN_FLUSH_CACHE_EXT;
+}
+
+/*
+ * preempt pending requests, and store this cache flush for immediate
+ * execution
  */
- 
-int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors)
+static struct request *ide_queue_flush_cmd(ide_drive_t *drive,
+					   struct request *rq, int post)
 {
-	struct request *rq;
-	unsigned long flags;
-	int ret = 1;
+	struct request *flush_rq = &HWGROUP(drive)->wrq;
 
-	spin_lock_irqsave(&ide_lock, flags);
-	rq = HWGROUP(drive)->rq;
+	/*
+	 * write cache disabled, just return barrier write immediately
+	 */
+	if (!drive->wcache)
+		return rq;
 
-	BUG_ON(!(rq->flags & REQ_STARTED));
+	ide_init_drive_cmd(flush_rq);
+	ide_fill_flush_cmd(drive, flush_rq);
 
-	if (!nr_sectors)
-		nr_sectors = rq->hard_cur_sectors;
+	flush_rq->special = rq;
+	flush_rq->nr_sectors = rq->nr_sectors;
+
+	if (!post) {
+		drive->doing_barrier = 1;
+		flush_rq->flags |= REQ_BAR_PREFLUSH;
+		blkdev_dequeue_request(rq);
+	} else
+		flush_rq->flags |= REQ_BAR_POSTFLUSH;
+
+	__elv_add_request(drive->queue, flush_rq, ELEVATOR_INSERT_FRONT, 0);
+	HWGROUP(drive)->rq = NULL;
+	return flush_rq;
+}
+
+static int __ide_end_request(ide_drive_t *drive, struct request *rq,
+			     int uptodate, int nr_sectors)
+{
+	int ret = 1;
+
+	BUG_ON(!(rq->flags & REQ_STARTED));
 
 	/*
 	 * if failfast is set on a request, override number of sectors and
 	 * complete the whole request right now
 	 */
-	if (blk_noretry_request(rq) && !uptodate)
+	if (blk_noretry_request(rq) && end_io_error(uptodate))
 		nr_sectors = rq->hard_nr_sectors;
 
+	if (!blk_fs_request(rq) && end_io_error(uptodate) && !rq->errors)
+		rq->errors = -EIO;
+
 	/*
 	 * decide whether to reenable DMA -- 3 is a random magic for now,
 	 * if we DMA timeout more than 3 times, just stay in PIO
@@ -97,15 +132,56 @@
 
 	if (!end_that_request_first(rq, uptodate, nr_sectors)) {
 		add_disk_randomness(rq->rq_disk);
+
+		if (blk_rq_tagged(rq))
+			blk_queue_end_tag(drive->queue, rq);
+
 		blkdev_dequeue_request(rq);
 		HWGROUP(drive)->rq = NULL;
 		end_that_request_last(rq);
 		ret = 0;
 	}
-	spin_unlock_irqrestore(&ide_lock, flags);
 	return ret;
 }
 
+/**
+ *	ide_end_request		-	complete an IDE I/O
+ *	@drive: IDE device for the I/O
+ *	@uptodate:
+ *	@nr_sectors: number of sectors completed
+ *
+ *	This is our end_request wrapper function. We complete the I/O
+ *	update random number input and dequeue the request, which if
+ *	it was tagged may be out of order.
+ */
+
+int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors)
+{
+	struct request *rq;
+	unsigned long flags;
+	int ret = 1;
+
+	spin_lock_irqsave(&ide_lock, flags);
+	rq = HWGROUP(drive)->rq;
+
+	if (!nr_sectors)
+		nr_sectors = rq->hard_cur_sectors;
+
+	if (!blk_barrier_rq(rq))
+		ret = __ide_end_request(drive, rq, uptodate, nr_sectors);
+	else {
+		struct request *flush_rq = &HWGROUP(drive)->wrq;
+
+		flush_rq->nr_sectors -= nr_sectors;
+		if (!flush_rq->nr_sectors) {
+			ide_queue_flush_cmd(drive, rq, 1);
+			ret = 0;
+		}
+	}
+
+	spin_unlock_irqrestore(&ide_lock, flags);
+	return ret;
+}
 EXPORT_SYMBOL(ide_end_request);
 
 /**
@@ -137,6 +213,113 @@
 	spin_unlock_irqrestore(&ide_lock, flags);
 }
 
+/*
+ * FIXME: probably move this somewhere else, name is bad too :)
+ */
+u64 ide_get_error_location(ide_drive_t *drive, char *args)
+{
+	u32 high, low;
+	u8 hcyl, lcyl, sect;
+	u64 sector;
+
+	high = 0;
+	hcyl = args[5];
+	lcyl = args[4];
+	sect = args[3];
+
+	if (ide_id_has_flush_cache_ext(drive->id)) {
+		low = (hcyl << 16) | (lcyl << 8) | sect;
+		HWIF(drive)->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
+		high = ide_read_24(drive);
+	} else {
+		u8 cur = HWIF(drive)->INB(IDE_SELECT_REG);
+		if (cur & 0x40)
+			low = (hcyl << 16) | (lcyl << 8) | sect;
+		else {
+			low = hcyl * drive->head * drive->sect;
+			low += lcyl * drive->sect;
+			low += sect - 1;
+		}
+	}
+
+	sector = ((u64) high << 24) | low;
+	return sector;
+}
+EXPORT_SYMBOL(ide_get_error_location);
+
+static void ide_complete_barrier(ide_drive_t *drive, struct request *rq,
+				 int error)
+{
+	struct request *real_rq = rq->special;
+	int good_sectors, bad_sectors;
+	sector_t sector;
+
+	if (!error) {
+		if (blk_barrier_postflush(rq)) {
+			/*
+			 * this completes the barrier write
+			 */
+			__ide_end_request(drive, real_rq, 1, real_rq->hard_nr_sectors);
+			drive->doing_barrier = 0;
+		} else {
+			/*
+			 * just indicate that we did the pre flush
+			 */
+			real_rq->flags |= REQ_BAR_PREFLUSH;
+			elv_requeue_request(drive->queue, real_rq);
+		}
+		/*
+		 * all is fine, return
+		 */
+		return;
+	}
+
+	/*
+	 * we need to end real_rq, but it's not on the queue currently.
+	 * put it back on the queue, so we don't have to special case
+	 * anything else for completing it
+	 */
+	if (!blk_barrier_postflush(rq))
+		elv_requeue_request(drive->queue, real_rq);
+
+	/*
+	 * drive aborted flush command, assume FLUSH_CACHE_* doesn't
+	 * work and disable barrier support
+	 */
+	if (error & ABRT_ERR) {
+		printk(KERN_ERR "%s: barrier support doesn't work\n", drive->name);
+		__ide_end_request(drive, real_rq, -EOPNOTSUPP, real_rq->hard_nr_sectors);
+		blk_queue_ordered(drive->queue, 0);
+		blk_queue_issue_flush_fn(drive->queue, NULL);
+	} else {
+		/*
+		 * find out what part of the request failed
+		 */
+		good_sectors = 0;
+		if (blk_barrier_postflush(rq)) {
+			sector = ide_get_error_location(drive, rq->buffer);
+
+			if ((sector >= real_rq->hard_sector) &&
+			    (sector < real_rq->hard_sector + real_rq->hard_nr_sectors))
+				good_sectors = sector - real_rq->hard_sector;
+		} else
+			sector = real_rq->hard_sector;
+
+		bad_sectors = real_rq->hard_nr_sectors - good_sectors;
+		if (good_sectors)
+			__ide_end_request(drive, real_rq, 1, good_sectors);
+		if (bad_sectors)
+			__ide_end_request(drive, real_rq, 0, bad_sectors);
+
+		printk(KERN_ERR "%s: failed barrier write: "
+				"sector=%Lx(good=%d/bad=%d)\n",
+				drive->name, (unsigned long long)sector,
+				good_sectors, bad_sectors);
+	}
+
+	drive->doing_barrier = 0;
+}
+
 /**
  *	ide_end_drive_cmd	-	end an explicit drive command
  *	@drive: command 
@@ -226,6 +409,10 @@
 
 	spin_lock_irqsave(&ide_lock, flags);
 	blkdev_dequeue_request(rq);
+
+	if (blk_barrier_preflush(rq) || blk_barrier_postflush(rq))
+		ide_complete_barrier(drive, rq, err);
+
 	HWGROUP(drive)->rq = NULL;
 	end_that_request_last(rq);
 	spin_unlock_irqrestore(&ide_lock, flags);
@@ -712,6 +899,22 @@
 repeat:	
 	best = NULL;
 	drive = hwgroup->drive;
+
+	/*
+	 * drive is doing pre-flush, ordered write, post-flush sequence. even
+	 * though that is 3 requests, it must be seen as a single transaction.
+	 * we must not preempt this drive until that is complete
+	 */
+	if (drive->doing_barrier) {
+		/*
+		 * small race where queue could get replugged during
+		 * the 3-request flush cycle, just yank the plug since
+		 * we want it to finish asap
+		 */
+		blk_remove_plug(drive->queue);
+		return drive;
+	}
+
 	do {
 		if ((!drive->sleep || time_after_eq(jiffies, drive->sleep))
 		    && !elv_queue_empty(drive->queue)) {
@@ -868,6 +1071,13 @@
 		}
 
 		/*
+		 * if rq is a barrier write, issue pre cache flush if not
+		 * already done
+		 */
+		if (blk_barrier_rq(rq) && !blk_barrier_preflush(rq))
+			rq = ide_queue_flush_cmd(drive, rq, 0);
+
+		/*
 		 * Sanity: don't accept a request that isn't a PM request
 		 * if we are currently power managed. This is very important as
 		 * blk_stop_queue() doesn't prevent the elv_next_request()
@@ -917,7 +1127,9 @@
  */
 void do_ide_request(request_queue_t *q)
 {
-	ide_do_request(q->queuedata, IDE_NO_IRQ);
+	ide_drive_t *drive = q->queuedata;
+
+	ide_do_request(HWGROUP(drive), IDE_NO_IRQ);
 }
 
 /*
@@ -1286,6 +1498,7 @@
 {
 	memset(rq, 0, sizeof(*rq));
 	rq->flags = REQ_DRIVE_CMD;
+	rq->ref_count = 1;
 }
 
 EXPORT_SYMBOL(ide_init_drive_cmd);
--- diff/drivers/ide/ide-probe.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/ide-probe.c	2004-07-01 21:32:36.000000000 +0100
@@ -893,7 +893,7 @@
 	if (!q)
 		return 1;
 
-	q->queuedata = HWGROUP(drive);
+	q->queuedata = drive;
 	blk_queue_segment_boundary(q, 0xffff);
 
 	if (!hwif->rqsize)
--- diff/drivers/ide/ide-proc.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/ide-proc.c	2004-07-01 21:32:36.000000000 +0100
@@ -321,7 +321,6 @@
 		case ide_cy82c693:	name = "cy82c693";	break;
 		case ide_4drives:	name = "4drives";	break;
 		case ide_pmac:		name = "mac-io";	break;
-		case ide_pc9800:	name = "pc9800";	break;
 		default:		name = "(unknown)";	break;
 	}
 	len = sprintf(page, "%s\n", name);
--- diff/drivers/ide/ide-tape.c	2004-05-19 22:11:40.000000000 +0100
+++ source/drivers/ide/ide-tape.c	2004-07-01 21:32:36.000000000 +0100
@@ -2674,7 +2674,7 @@
 	return __idetape_kmalloc_stage(tape, 0, 0);
 }
 
-static void idetape_copy_stage_from_user (idetape_tape_t *tape, idetape_stage_t *stage, const char *buf, int n)
+static void idetape_copy_stage_from_user (idetape_tape_t *tape, idetape_stage_t *stage, const char __user *buf, int n)
 {
 	struct idetape_bh *bh = tape->bh;
 	int count;
@@ -2701,7 +2701,7 @@
 	tape->bh = bh;
 }
 
-static void idetape_copy_stage_to_user (idetape_tape_t *tape, char *buf, idetape_stage_t *stage, int n)
+static void idetape_copy_stage_to_user (idetape_tape_t *tape, char __user *buf, idetape_stage_t *stage, int n)
 {
 	struct idetape_bh *bh = tape->bh;
 	int count;
@@ -3610,6 +3610,7 @@
 {
 	idetape_tape_t *tape = drive->driver_data;
 	idetape_config_t config;
+	void __user *argp = (void __user *)arg;
 
 #if IDETAPE_DEBUG_LOG	
 	if (tape->debug_level >= 4)
@@ -3617,7 +3618,7 @@
 #endif /* IDETAPE_DEBUG_LOG */
 	switch (cmd) {
 		case 0x0340:
-			if (copy_from_user ((char *) &config, (char *) arg, sizeof (idetape_config_t)))
+			if (copy_from_user(&config, argp, sizeof (idetape_config_t)))
 				return -EFAULT;
 			tape->best_dsc_rw_frequency = config.dsc_rw_frequency;
 			tape->max_stages = config.nr_stages;
@@ -3625,7 +3626,7 @@
 		case 0x0350:
 			config.dsc_rw_frequency = (int) tape->best_dsc_rw_frequency;
 			config.nr_stages = tape->max_stages; 
-			if (copy_to_user((char *) arg, (char *) &config, sizeof (idetape_config_t)))
+			if (copy_to_user(argp, &config, sizeof (idetape_config_t)))
 				return -EFAULT;
 			break;
 		default:
@@ -3747,7 +3748,7 @@
  *	will no longer hit performance.
  *      This is not applicable to Onstream.
  */
-static ssize_t idetape_chrdev_read (struct file *file, char *buf,
+static ssize_t idetape_chrdev_read (struct file *file, char __user *buf,
 				    size_t count, loff_t *ppos)
 {
 	ide_drive_t *drive = file->private_data;
@@ -3810,7 +3811,7 @@
 	return actually_read;
 }
 
-static ssize_t idetape_chrdev_write (struct file *file, const char *buf,
+static ssize_t idetape_chrdev_write (struct file *file, const char __user *buf,
 				     size_t count, loff_t *ppos)
 {
 	ide_drive_t *drive = file->private_data;
@@ -4127,6 +4128,7 @@
 	struct mtget mtget;
 	struct mtpos mtpos;
 	int block_offset = 0, position = tape->first_frame_position;
+	void __user *argp = (void __user *)arg;
 
 #if IDETAPE_DEBUG_LOG
 	if (tape->debug_level >= 3)
@@ -4146,7 +4148,7 @@
 	}
 	switch (cmd) {
 		case MTIOCTOP:
-			if (copy_from_user((char *) &mtop, (char *) arg, sizeof (struct mtop)))
+			if (copy_from_user(&mtop, argp, sizeof (struct mtop)))
 				return -EFAULT;
 			return (idetape_mtioctop(drive,mtop.mt_op,mtop.mt_count));
 		case MTIOCGET:
@@ -4157,12 +4159,12 @@
 			if (tape->drv_write_prot) {
 				mtget.mt_gstat |= GMT_WR_PROT(0xffffffff);
 			}
-			if (copy_to_user((char *) arg,(char *) &mtget, sizeof(struct mtget)))
+			if (copy_to_user(argp, &mtget, sizeof(struct mtget)))
 				return -EFAULT;
 			return 0;
 		case MTIOCPOS:
 			mtpos.mt_blkno = position / tape->user_bs_factor - block_offset;
-			if (copy_to_user((char *) arg,(char *) &mtpos, sizeof(struct mtpos)))
+			if (copy_to_user(argp, &mtpos, sizeof(struct mtpos)))
 				return -EFAULT;
 			return 0;
 		default:
--- diff/drivers/ide/ide-taskfile.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/ide-taskfile.c	2004-07-01 21:32:36.000000000 +0100
@@ -53,12 +53,6 @@
 
 #define DEBUG_TASKFILE	0	/* unset when fixed */
 
-#if DEBUG_TASKFILE
-#define DTF(x...) printk(x)
-#else
-#define DTF(x...)
-#endif
-
 static void ata_bswap_data (void *buffer, int wcount)
 {
 	u16 *p = buffer;
@@ -165,7 +159,7 @@
 	hwif->OUTB(taskfile->high_cylinder, IDE_HCYL_REG);
 
 	hwif->OUTB((taskfile->device_head & HIHI) | drive->select.all, IDE_SELECT_REG);
-#ifdef CONFIG_IDE_TASKFILE_IO
+
 	if (task->handler != NULL) {
 		if (task->prehandler != NULL) {
 			hwif->OUTBSYNC(drive, taskfile->command, IDE_COMMAND_REG);
@@ -175,14 +169,6 @@
 		ide_execute_command(drive, taskfile->command, task->handler, WAIT_WORSTCASE, NULL);
 		return ide_started;
 	}
-#else
-	if (task->handler != NULL) {
-		ide_execute_command(drive, taskfile->command, task->handler, WAIT_WORSTCASE, NULL);
-		if (task->prehandler != NULL)
-			return task->prehandler(drive, task->rq);
-		return ide_started;
-	}
-#endif
 
 	if (!drive->using_dma)
 		return ide_stopped;
@@ -283,8 +269,6 @@
 
 	local_irq_enable();
 	if (!OK_STAT(stat = hwif->INB(IDE_STATUS_REG),READY_STAT,BAD_STAT)) {
-		DTF("%s: command opcode 0x%02x\n", drive->name,
-			args->tfRegister[IDE_COMMAND_OFFSET]);
 		return DRIVER(drive)->error(drive, "task_no_data_intr", stat);
 		/* calls ide_end_drive_cmd */
 	}
@@ -296,6 +280,29 @@
 
 EXPORT_SYMBOL(task_no_data_intr);
 
+static void task_buffer_sectors(ide_drive_t *drive, struct request *rq,
+				unsigned nsect, unsigned rw)
+{
+	char *buf = rq->buffer + blk_rq_offset(rq);
+
+	rq->sector += nsect;
+	rq->current_nr_sectors -= nsect;
+	rq->nr_sectors -= nsect;
+	__task_sectors(drive, buf, nsect, rw);
+}
+
+static inline void task_buffer_multi_sectors(ide_drive_t *drive,
+					     struct request *rq, unsigned rw)
+{
+	unsigned int msect = drive->mult_count, nsect;
+
+	nsect = rq->current_nr_sectors;
+	if (nsect > msect)
+		nsect = msect;
+
+	task_buffer_sectors(drive, rq, nsect, rw);
+}
+
 /*
  * old taskfile PIO handlers, to be killed as soon as possible.
  */
@@ -308,7 +315,6 @@
 {
 	struct request *rq	= HWGROUP(drive)->rq;
 	ide_hwif_t *hwif	= HWIF(drive);
-	char *pBuf		= NULL;
 	u8 stat;
 
 	if (!OK_STAT(stat = hwif->INB(IDE_STATUS_REG),DATA_READY,BAD_R_STAT)) {
@@ -316,28 +322,18 @@
 			return DRIVER(drive)->error(drive, "task_in_intr", stat);
 		}
 		if (!(stat & BUSY_STAT)) {
-			DTF("task_in_intr to Soon wait for next interrupt\n");
-			if (HWGROUP(drive)->handler == NULL)
-				ide_set_handler(drive, &task_in_intr, WAIT_WORSTCASE, NULL);
+			ide_set_handler(drive, &task_in_intr, WAIT_WORSTCASE, NULL);
 			return ide_started;  
 		}
 	}
 
-	pBuf = rq->buffer + task_rq_offset(rq);
-	DTF("Read: %p, rq->current_nr_sectors: %d, stat: %02x\n",
-		pBuf, (int) rq->current_nr_sectors, stat);
-	taskfile_input_data(drive, pBuf, SECTOR_WORDS);
+	task_buffer_sectors(drive, rq, 1, IDE_PIO_IN);
 
 	/* FIXME: check drive status */
-	if (--rq->current_nr_sectors <= 0)
+	if (!rq->current_nr_sectors)
 		if (!DRIVER(drive)->end_request(drive, 1, 0))
 			return ide_stopped;
-	/*
-	 * ERM, it is techincally legal to leave/exit here but it makes
-	 * a mess of the code ...
-	 */
-	if (HWGROUP(drive)->handler == NULL)
-		ide_set_handler(drive, &task_in_intr, WAIT_WORSTCASE, NULL);
+	ide_set_handler(drive, &task_in_intr, WAIT_WORSTCASE, NULL);
 	return ide_started;
 }
 
@@ -350,9 +346,6 @@
 {
 	ide_hwif_t *hwif	= HWIF(drive);
 	struct request *rq	= HWGROUP(drive)->rq;
-	char *pBuf		= NULL;
-	unsigned int msect	= drive->mult_count;
-	unsigned int nsect;
 	u8 stat;
 
 	if (!OK_STAT(stat = hwif->INB(IDE_STATUS_REG),DATA_READY,BAD_R_STAT)) {
@@ -360,32 +353,19 @@
 			return DRIVER(drive)->error(drive, "task_mulin_intr", stat);
 		}
 		/* no data yet, so wait for another interrupt */
-		if (HWGROUP(drive)->handler == NULL)
-			ide_set_handler(drive, &task_mulin_intr, WAIT_WORSTCASE, NULL);
+		ide_set_handler(drive, &task_mulin_intr, WAIT_WORSTCASE, NULL);
 		return ide_started;
 	}
 
-	do {
-		nsect = rq->current_nr_sectors;
-		if (nsect > msect)
-			nsect = msect;
-		pBuf = rq->buffer + task_rq_offset(rq);
-		DTF("Multiread: %p, nsect: %d, msect: %d, " \
-			" rq->current_nr_sectors: %d\n",
-			pBuf, nsect, msect, rq->current_nr_sectors);
-		taskfile_input_data(drive, pBuf, nsect * SECTOR_WORDS);
-		rq->errors = 0;
-		rq->current_nr_sectors -= nsect;
-		msect -= nsect;
+	task_buffer_multi_sectors(drive, rq, IDE_PIO_IN);
 
-		/* FIXME: check drive status */
-		if (!rq->current_nr_sectors) {
-			if (!DRIVER(drive)->end_request(drive, 1, 0))
-				return ide_stopped;
-		}
-	} while (msect);
-	if (HWGROUP(drive)->handler == NULL)
-		ide_set_handler(drive, &task_mulin_intr, WAIT_WORSTCASE, NULL);
+	/* FIXME: check drive status */
+	if (!rq->current_nr_sectors) {
+		DRIVER(drive)->end_request(drive, 1, 0);
+		return ide_stopped;
+	}
+
+	ide_set_handler(drive, &task_mulin_intr, WAIT_WORSTCASE, NULL);
 	return ide_started;
 }
 
@@ -407,8 +387,9 @@
 		return startstop;
 	}
 	/* For Write_sectors we need to stuff the first sector */
-	taskfile_output_data(drive, rq->buffer + task_rq_offset(rq), SECTOR_WORDS);
-	rq->current_nr_sectors--;
+	ide_set_handler(drive, &task_out_intr, WAIT_WORSTCASE, NULL);
+	task_buffer_sectors(drive, rq, 1, IDE_PIO_OUT);
+
 	return ide_started;
 }
 
@@ -423,7 +404,6 @@
 {
 	ide_hwif_t *hwif	= HWIF(drive);
 	struct request *rq	= HWGROUP(drive)->rq;
-	char *pBuf		= NULL;
 	u8 stat;
 
 	if (!OK_STAT(stat = hwif->INB(IDE_STATUS_REG), DRIVE_READY, drive->bad_wstat)) {
@@ -437,16 +417,9 @@
 		if (!DRIVER(drive)->end_request(drive, 1, 0))
 			return ide_stopped;
 	if ((rq->current_nr_sectors==1) ^ (stat & DRQ_STAT)) {
-		rq = HWGROUP(drive)->rq;
-		pBuf = rq->buffer + task_rq_offset(rq);
-		DTF("write: %p, rq->current_nr_sectors: %d\n",
-			pBuf, (int) rq->current_nr_sectors);
-		taskfile_output_data(drive, pBuf, SECTOR_WORDS);
-		rq->errors = 0;
-		rq->current_nr_sectors--;
+		task_buffer_sectors(drive, rq, 1, IDE_PIO_OUT);
 	}
-	if (HWGROUP(drive)->handler == NULL)
-		ide_set_handler(drive, &task_out_intr, WAIT_WORSTCASE, NULL);
+	ide_set_handler(drive, &task_out_intr, WAIT_WORSTCASE, NULL);
 	return ide_started;
 }
 
@@ -454,7 +427,6 @@
 
 ide_startstop_t pre_task_mulout_intr (ide_drive_t *drive, struct request *rq)
 {
-	ide_task_t *args = rq->special;
 	ide_startstop_t startstop;
 
 	if (ide_wait_stat(&startstop, drive, DATA_READY,
@@ -472,28 +444,22 @@
 		}
 	}
 
-	/*
-	 * WARNING :: if the drive as not acked good status we may not
-	 * move the DATA-TRANSFER T-Bar as BSY != 0. <andre@linux-ide.org>
-	 */
-	return args->handler(drive);
+	ide_set_handler(drive, &task_mulout_intr, WAIT_WORSTCASE, NULL);
+	task_buffer_multi_sectors(drive, rq, IDE_PIO_OUT);
+
+	return ide_started;
 }
 
 EXPORT_SYMBOL(pre_task_mulout_intr);
 
 /*
  * Handler for command write multiple
- * Called directly from execute_drive_cmd for the first bunch of sectors,
- * afterwards only by the ISR
  */
 ide_startstop_t task_mulout_intr (ide_drive_t *drive)
 {
 	ide_hwif_t *hwif		= HWIF(drive);
 	u8 stat				= hwif->INB(IDE_STATUS_REG);
 	struct request *rq		= HWGROUP(drive)->rq;
-	char *pBuf			= NULL;
-	unsigned int msect		= drive->mult_count;
-	unsigned int nsect;
 
 	if (!OK_STAT(stat, DATA_READY, BAD_R_STAT) || !rq->current_nr_sectors) {
 		if (stat & (ERR_STAT|DRQ_STAT)) {
@@ -505,47 +471,58 @@
 			return ide_stopped;
 		}
 		/* no data yet, so wait for another interrupt */
-		if (HWGROUP(drive)->handler == NULL)
-			ide_set_handler(drive, &task_mulout_intr, WAIT_WORSTCASE, NULL);
+		ide_set_handler(drive, &task_mulout_intr, WAIT_WORSTCASE, NULL);
 		return ide_started;
 	}
 
-	if (HWGROUP(drive)->handler != NULL) {
-		unsigned long lflags;
-		spin_lock_irqsave(&ide_lock, lflags);
-		HWGROUP(drive)->handler = NULL;
-		del_timer(&HWGROUP(drive)->timer);
-		spin_unlock_irqrestore(&ide_lock, lflags);
-	}
+	task_buffer_multi_sectors(drive, rq, IDE_PIO_OUT);
+	ide_set_handler(drive, &task_mulout_intr, WAIT_WORSTCASE, NULL);
+
+	return ide_started;
+}
+
+EXPORT_SYMBOL(task_mulout_intr);
+
+#else /* !CONFIG_IDE_TASKFILE_IO */
+
+static void task_sectors(ide_drive_t *drive, struct request *rq,
+			 unsigned nsect, unsigned rw)
+{
+	if (rq->cbio) {	/* fs request */
+		rq->errors = 0;
+		task_bio_sectors(drive, rq, nsect, rw);
+	} else		/* task request */
+		task_buffer_sectors(drive, rq, nsect, rw);
+}
+
+static inline void task_bio_multi_sectors(ide_drive_t *drive,
+					  struct request *rq, unsigned rw)
+{
+	unsigned int nsect, msect = drive->mult_count;
 
 	do {
 		nsect = rq->current_nr_sectors;
 		if (nsect > msect)
 			nsect = msect;
-		pBuf = rq->buffer + task_rq_offset(rq);
-		DTF("Multiwrite: %p, nsect: %d, msect: %d, " \
-			"rq->current_nr_sectors: %ld\n",
-			pBuf, nsect, msect, rq->current_nr_sectors);
-		msect -= nsect;
-		taskfile_output_data(drive, pBuf, nsect * SECTOR_WORDS);
-		rq->current_nr_sectors -= nsect;
 
-		/* FIXME: check drive status */
-		if (!rq->current_nr_sectors) {
-			if (!DRIVER(drive)->end_request(drive, 1, 0))
-				if (!rq->bio)
-					return ide_stopped;
-		}
+		task_bio_sectors(drive, rq, nsect, rw);
+
+		if (!rq->nr_sectors)
+			msect = 0;
+		else
+			msect -= nsect;
 	} while (msect);
-	rq->errors = 0;
-	if (HWGROUP(drive)->handler == NULL)
-		ide_set_handler(drive, &task_mulout_intr, WAIT_WORSTCASE, NULL);
-	return ide_started;
 }
 
-EXPORT_SYMBOL(task_mulout_intr);
-
-#else /* !CONFIG_IDE_TASKFILE_IO */
+static void task_multi_sectors(ide_drive_t *drive,
+			       struct request *rq, unsigned rw)
+{
+	if (rq->cbio) {	/* fs request */
+		rq->errors = 0;
+		task_bio_multi_sectors(drive, rq, rw);
+	} else		/* task request */
+		task_buffer_multi_sectors(drive, rq, rw);
+}
 
 static u8 wait_drive_not_busy(ide_drive_t *drive)
 {
@@ -573,19 +550,16 @@
 ide_startstop_t task_in_intr (ide_drive_t *drive)
 {
 	struct request *rq = HWGROUP(drive)->rq;
-	u8 stat, good_stat;
+	u8 stat = HWIF(drive)->INB(IDE_STATUS_REG);
 
-	good_stat = DATA_READY;
-	stat = HWIF(drive)->INB(IDE_STATUS_REG);
-check_status:
-	if (!OK_STAT(stat, good_stat, BAD_R_STAT)) {
+	if (!OK_STAT(stat, DATA_READY, BAD_R_STAT)) {
 		if (stat & (ERR_STAT | DRQ_STAT))
 			return DRIVER(drive)->error(drive, __FUNCTION__, stat);
 		/* BUSY_STAT: No data yet, so wait for another IRQ. */
 		ide_set_handler(drive, &task_in_intr, WAIT_WORSTCASE, NULL);
 		return ide_started;
 	}
-
+finish_rq:
 	/*
 	 * Complete previously submitted bios (if any).
 	 * Status was already verifyied.
@@ -595,18 +569,18 @@
 			return ide_stopped;
 	/* Complete rq->buffer based request (ioctls). */
 	if (!rq->bio && !rq->nr_sectors) {
-		ide_end_drive_cmd(drive, stat, HWIF(drive)->INB(IDE_ERROR_REG));
+		DRIVER(drive)->end_request(drive, 1, 0);
 		return ide_stopped;
 	}
 
-	rq->errors = 0;
 	task_sectors(drive, rq, 1, IDE_PIO_IN);
 
 	/* If it was the last datablock check status and finish transfer. */
 	if (!rq->nr_sectors) {
-		good_stat = 0;
 		stat = wait_drive_not_busy(drive);
-		goto check_status;
+		if (!OK_STAT(stat, 0, BAD_R_STAT))
+			return DRIVER(drive)->error(drive, __FUNCTION__, stat);
+		goto finish_rq;
 	}
 
 	/* Still data left to transfer. */
@@ -622,21 +596,16 @@
 ide_startstop_t task_mulin_intr (ide_drive_t *drive)
 {
 	struct request *rq = HWGROUP(drive)->rq;
-	unsigned int msect = drive->mult_count;
-	unsigned int nsect;
-	u8 stat, good_stat;
+	u8 stat = HWIF(drive)->INB(IDE_STATUS_REG);
 
-	good_stat = DATA_READY;
-	stat = HWIF(drive)->INB(IDE_STATUS_REG);
-check_status:
-	if (!OK_STAT(stat, good_stat, BAD_R_STAT)) {
+	if (!OK_STAT(stat, DATA_READY, BAD_R_STAT)) {
 		if (stat & (ERR_STAT | DRQ_STAT))
 			return DRIVER(drive)->error(drive, __FUNCTION__, stat);
 		/* BUSY_STAT: No data yet, so wait for another IRQ. */
 		ide_set_handler(drive, &task_mulin_intr, WAIT_WORSTCASE, NULL);
 		return ide_started;
 	}
-
+finish_rq:
 	/*
 	 * Complete previously submitted bios (if any).
 	 * Status was already verifyied.
@@ -646,29 +615,18 @@
 			return ide_stopped;
 	/* Complete rq->buffer based request (ioctls). */
 	if (!rq->bio && !rq->nr_sectors) {
-		ide_end_drive_cmd(drive, stat, HWIF(drive)->INB(IDE_ERROR_REG));
+		DRIVER(drive)->end_request(drive, 1, 0);
 		return ide_stopped;
 	}
 
-	rq->errors = 0;
-	do {
-		nsect = rq->current_nr_sectors;
-		if (nsect > msect)
-			nsect = msect;
-
-		task_sectors(drive, rq, nsect, IDE_PIO_IN);
-
-		if (!rq->nr_sectors)
-			msect = 0;
-		else
-			msect -= nsect;
-	} while (msect);
+	task_multi_sectors(drive, rq, IDE_PIO_IN);
 
 	/* If it was the last datablock check status and finish transfer. */
 	if (!rq->nr_sectors) {
-		good_stat = 0;
 		stat = wait_drive_not_busy(drive);
-		goto check_status;
+		if (!OK_STAT(stat, 0, BAD_R_STAT))
+			return DRIVER(drive)->error(drive, __FUNCTION__, stat);
+		goto finish_rq;
 	}
 
 	/* Still data left to transfer. */
@@ -712,14 +670,12 @@
 			return ide_stopped;
 	/* Complete rq->buffer based request (ioctls). */
 	if (!rq->bio && !rq->nr_sectors) {
-		ide_end_drive_cmd(drive, stat, HWIF(drive)->INB(IDE_ERROR_REG));
+		DRIVER(drive)->end_request(drive, 1, 0);
 		return ide_stopped;
 	}
 
 	/* Still data left to transfer. */
 	ide_set_handler(drive, &task_out_intr, WAIT_WORSTCASE, NULL);
-
-	rq->errors = 0;
 	task_sectors(drive, rq, 1, IDE_PIO_OUT);
 
 	return ide_started;
@@ -751,8 +707,6 @@
 ide_startstop_t task_mulout_intr (ide_drive_t *drive)
 {
 	struct request *rq = HWGROUP(drive)->rq;
-	unsigned int msect = drive->mult_count;
-	unsigned int nsect;
 	u8 stat;
 
 	stat = HWIF(drive)->INB(IDE_STATUS_REG);
@@ -781,26 +735,13 @@
 			return ide_stopped;
 	/* Complete rq->buffer based request (ioctls). */
 	if (!rq->bio && !rq->nr_sectors) {
-		ide_end_drive_cmd(drive, stat, HWIF(drive)->INB(IDE_ERROR_REG));
+		DRIVER(drive)->end_request(drive, 1, 0);
 		return ide_stopped;
 	}
 
 	/* Still data left to transfer. */
 	ide_set_handler(drive, &task_mulout_intr, WAIT_WORSTCASE, NULL);
-
-	rq->errors = 0;
-	do {
-		nsect = rq->current_nr_sectors;
-		if (nsect > msect)
-			nsect = msect;
-
-		task_sectors(drive, rq, nsect, IDE_PIO_OUT);
-
-		if (!rq->nr_sectors)
-			msect = 0;
-		else
-			msect -= nsect;
-	} while (msect);
+	task_multi_sectors(drive, rq, IDE_PIO_OUT);
 
 	return ide_started;
 }
@@ -1201,6 +1142,14 @@
 	void debug_taskfile(drive, task);
 #endif /* CONFIG_IDE_TASK_IOCTL_DEBUG */
 
+	if (task->data_phase == TASKFILE_MULTI_IN ||
+	    task->data_phase == TASKFILE_MULTI_OUT) {
+		if (!drive->mult_count) {
+			printk(KERN_ERR "%s: multimode not set!\n", drive->name);
+			return ide_stopped;
+		}
+	}
+
 	/*
 	 * (ks) Check taskfile in/out flags.
 	 * If set, then execute as it is defined.
@@ -1333,7 +1282,6 @@
 	ide_hwif_t *hwif	= HWIF(drive);
 	u8 stat			= hwif->INB(IDE_STATUS_REG);
 	struct request *rq	= HWGROUP(drive)->rq;
-	char *pBuf		= NULL;
 	int retries             = 5;
 
 	if (!OK_STAT(stat, DATA_READY, BAD_R_STAT)) {
@@ -1349,12 +1297,9 @@
 		return DRIVER(drive)->error(drive, "flagged_task_in_intr (unexpected data phase)", stat); 
 	}
 
-	pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
-	DTF("Read - rq->current_nr_sectors: %d, status: %02x\n", (int) rq->current_nr_sectors, stat);
-
-	taskfile_input_data(drive, pBuf, SECTOR_WORDS);
+	task_buffer_sectors(drive, rq, 1, IDE_PIO_IN);
 
-	if (--rq->current_nr_sectors != 0) {
+	if (rq->current_nr_sectors) {
 		/*
                  * (ks) We don't know which command was executed. 
 		 * So, we wait the 'WORSTCASE' value.
@@ -1378,13 +1323,7 @@
 	ide_hwif_t *hwif	= HWIF(drive);
 	u8 stat			= hwif->INB(IDE_STATUS_REG);
 	struct request *rq	= HWGROUP(drive)->rq;
-	char *pBuf		= NULL;
 	int retries             = 5;
-	unsigned int msect, nsect;
-
-	msect = drive->mult_count;
-	if (msect == 0) 
-		return DRIVER(drive)->error(drive, "flagged_task_mulin_intr (multimode not set)", stat); 
 
 	if (!OK_STAT(stat, DATA_READY, BAD_R_STAT)) {
 		if (stat & ERR_STAT) {
@@ -1399,15 +1338,8 @@
 		return DRIVER(drive)->error(drive, "flagged_task_mulin_intr (unexpected data phase)", stat); 
 	}
 
-	nsect = (rq->current_nr_sectors > msect) ? msect : rq->current_nr_sectors;
-	pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
-
-	DTF("Multiread: %p, nsect: %d , rq->current_nr_sectors: %ld\n",
-	    pBuf, nsect, rq->current_nr_sectors);
+	task_buffer_multi_sectors(drive, rq, IDE_PIO_IN);
 
-	taskfile_input_data(drive, pBuf, nsect * SECTOR_WORDS);
-
-	rq->current_nr_sectors -= nsect;
 	if (rq->current_nr_sectors != 0) {
 		/*
                  * (ks) We don't know which command was executed. 
@@ -1441,8 +1373,7 @@
 		return startstop;
 	}
 
-	taskfile_output_data(drive, rq->buffer, SECTOR_WORDS);
-	--rq->current_nr_sectors;
+	task_buffer_sectors(drive, rq, 1, IDE_PIO_OUT);
 
 	return ide_started;
 }
@@ -1452,7 +1383,6 @@
 	ide_hwif_t *hwif	= HWIF(drive);
 	u8 stat			= hwif->INB(IDE_STATUS_REG);
 	struct request *rq	= HWGROUP(drive)->rq;
-	char *pBuf		= NULL;
 
 	if (!OK_STAT(stat, DRIVE_READY, BAD_W_STAT)) 
 		return DRIVER(drive)->error(drive, "flagged_task_out_intr", stat);
@@ -1472,12 +1402,7 @@
 		return DRIVER(drive)->error(drive, "flagged_task_out_intr (unexpected data phase)", stat); 
 	}
 
-	pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
-	DTF("Write - rq->current_nr_sectors: %d, status: %02x\n",
-		(int) rq->current_nr_sectors, stat);
-
-	taskfile_output_data(drive, pBuf, SECTOR_WORDS);
-	--rq->current_nr_sectors;
+	task_buffer_sectors(drive, rq, 1, IDE_PIO_OUT);
 
 	/*
 	 * (ks) We don't know which command was executed. 
@@ -1490,15 +1415,7 @@
 
 ide_startstop_t flagged_pre_task_mulout_intr (ide_drive_t *drive, struct request *rq)
 {
-	ide_hwif_t *hwif	= HWIF(drive);
-	u8 stat			= hwif->INB(IDE_STATUS_REG);
-	char *pBuf		= NULL;
 	ide_startstop_t startstop;
-	unsigned int msect, nsect;
-
-	msect = drive->mult_count;
-	if (msect == 0)
-		return DRIVER(drive)->error(drive, "flagged_pre_task_mulout_intr (multimode not set)", stat);
 
 	if (ide_wait_stat(&startstop, drive, DATA_READY,
 			BAD_W_STAT, WAIT_DRQ)) {
@@ -1506,14 +1423,7 @@
 		return startstop;
 	}
 
-	nsect = (rq->current_nr_sectors > msect) ? msect : rq->current_nr_sectors;
-	pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
-	DTF("Multiwrite: %p, nsect: %d , rq->current_nr_sectors: %ld\n",
-	    pBuf, nsect, rq->current_nr_sectors);
-
-	taskfile_output_data(drive, pBuf, nsect * SECTOR_WORDS);
-
-	rq->current_nr_sectors -= nsect;
+	task_buffer_multi_sectors(drive, rq, IDE_PIO_OUT);
 
 	return ide_started;
 }
@@ -1523,12 +1433,6 @@
 	ide_hwif_t *hwif	= HWIF(drive);
 	u8 stat			= hwif->INB(IDE_STATUS_REG);
 	struct request *rq	= HWGROUP(drive)->rq;
-	char *pBuf		= NULL;
-	unsigned int msect, nsect;
-
-	msect = drive->mult_count;
-	if (msect == 0)
-		return DRIVER(drive)->error(drive, "flagged_task_mulout_intr (multimode not set)", stat);
 
 	if (!OK_STAT(stat, DRIVE_READY, BAD_W_STAT)) 
 		return DRIVER(drive)->error(drive, "flagged_task_mulout_intr", stat);
@@ -1548,13 +1452,7 @@
 		return DRIVER(drive)->error(drive, "flagged_task_mulout_intr (unexpected data phase)", stat); 
 	}
 
-	nsect = (rq->current_nr_sectors > msect) ? msect : rq->current_nr_sectors;
-	pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
-	DTF("Multiwrite: %p, nsect: %d , rq->current_nr_sectors: %ld\n",
-	    pBuf, nsect, rq->current_nr_sectors);
-
-	taskfile_output_data(drive, pBuf, nsect * SECTOR_WORDS);
-	rq->current_nr_sectors -= nsect;
+	task_buffer_multi_sectors(drive, rq, IDE_PIO_OUT);
 
 	/*
 	 * (ks) We don't know which command was executed. 
--- diff/drivers/ide/ide.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/ide.c	2004-07-01 21:32:36.000000000 +0100
@@ -437,6 +437,30 @@
 #endif	/* FANCY_STATUS_DUMPS */
 		printk("\n");
 	}
+	{
+		struct request *rq;
+		int opcode = 0x100;
+
+		spin_lock(&ide_lock);
+		rq = HWGROUP(drive)->rq;
+		spin_unlock(&ide_lock);
+		if (!rq)
+			goto out;
+		if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK)) {
+			char *args = rq->buffer;
+			if (args)
+				opcode = args[0];
+		} else if (rq->flags & REQ_DRIVE_TASKFILE) {
+			ide_task_t *args = rq->special;
+			if (args) {
+				task_struct_t *tf = (task_struct_t *) args->tfRegister;
+				opcode = tf->command;
+			}
+		}
+
+		printk("ide: failed opcode was %x\n", opcode);
+	}
+out:
 	local_irq_restore(flags);
 	return err;
 }
--- diff/drivers/ide/legacy/hd.c	2004-05-19 22:11:41.000000000 +0100
+++ source/drivers/ide/legacy/hd.c	2004-07-01 21:32:36.000000000 +0100
@@ -660,7 +660,7 @@
 	unsigned int cmd, unsigned long arg)
 {
 	struct hd_i_struct *disk = inode->i_bdev->bd_disk->private_data;
-	struct hd_geometry *loc = (struct hd_geometry *) arg;
+	struct hd_geometry __user *loc = (struct hd_geometry __user *) arg;
 	struct hd_geometry g; 
 
 	if (cmd != HDIO_GETGEO)
--- diff/drivers/ide/legacy/ide-cs.c	2004-05-19 22:11:41.000000000 +0100
+++ source/drivers/ide/legacy/ide-cs.c	2004-07-01 21:32:36.000000000 +0100
@@ -199,6 +199,16 @@
     
 } /* ide_detach */
 
+static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq)
+{
+    hw_regs_t hw;
+    memset(&hw, 0, sizeof(hw));
+    ide_init_hwif_ports(&hw, io, ctl, NULL);
+    hw.irq = irq;
+    hw.chipset = ide_pci;
+    return ide_register_hw(&hw, NULL);
+}
+
 /*======================================================================
 
     ide_config() is scheduled to run after a CARD_INSERTION event
@@ -210,84 +220,82 @@
 #define CS_CHECK(fn, ret) \
 do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
 
-static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq)
-{
-    hw_regs_t hw;
-    memset(&hw, 0, sizeof(hw));
-    ide_init_hwif_ports(&hw, io, ctl, NULL);
-    hw.irq = irq;
-    hw.chipset = ide_pci;
-    return ide_register_hw(&hw, NULL);
-}
-
 void ide_config(dev_link_t *link)
 {
     client_handle_t handle = link->handle;
     ide_info_t *info = link->priv;
     tuple_t tuple;
-    u_short buf[128];
-    cisparse_t parse;
-    config_info_t conf;
-    cistpl_cftable_entry_t *cfg = &parse.cftable_entry;
-    cistpl_cftable_entry_t dflt = { 0 };
-    int i, pass, last_ret, last_fn, hd, is_kme = 0;
+    struct {
+	u_short		buf[128];
+	cisparse_t	parse;
+	config_info_t	conf;
+	cistpl_cftable_entry_t dflt;
+    } *stk = 0;
+    cistpl_cftable_entry_t *cfg;
+    int i, pass, last_ret = 0, last_fn = 0, hd, is_kme = 0;
     unsigned long io_base, ctl_base;
 
     DEBUG(0, "ide_config(0x%p)\n", link);
-    
-    tuple.TupleData = (cisdata_t *)buf;
-    tuple.TupleOffset = 0; tuple.TupleDataMax = 255;
+
+    stk = kmalloc(sizeof(*stk), GFP_KERNEL);
+    if (!stk) goto err_mem;
+    memset(stk, 0, sizeof(*stk));
+    cfg = &stk->parse.cftable_entry;
+
+    tuple.TupleData = (cisdata_t *)&stk->buf;
+    tuple.TupleOffset = 0;
+    tuple.TupleDataMax = 255;
     tuple.Attributes = 0;
     tuple.DesiredTuple = CISTPL_CONFIG;
     CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
     CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
-    CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));
-    link->conf.ConfigBase = parse.config.base;
-    link->conf.Present = parse.config.rmask[0];
+    CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &stk->parse));
+    link->conf.ConfigBase = stk->parse.config.base;
+    link->conf.Present = stk->parse.config.rmask[0];
 
     tuple.DesiredTuple = CISTPL_MANFID;
     if (!pcmcia_get_first_tuple(handle, &tuple) &&
 	!pcmcia_get_tuple_data(handle, &tuple) &&
-	!pcmcia_parse_tuple(handle, &tuple, &parse))
-	is_kme = ((parse.manfid.manf == MANFID_KME) &&
-		  ((parse.manfid.card == PRODID_KME_KXLC005_A) ||
-		   (parse.manfid.card == PRODID_KME_KXLC005_B)));
+	!pcmcia_parse_tuple(handle, &tuple, &stk->parse))
+	is_kme = ((stk->parse.manfid.manf == MANFID_KME) &&
+		  ((stk->parse.manfid.card == PRODID_KME_KXLC005_A) ||
+		   (stk->parse.manfid.card == PRODID_KME_KXLC005_B)));
 
     /* Configure card */
     link->state |= DEV_CONFIG;
 
     /* Not sure if this is right... look up the current Vcc */
-    CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(handle, &conf));
-    link->conf.Vcc = conf.Vcc;
-    
+    CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(handle, &stk->conf));
+    link->conf.Vcc = stk->conf.Vcc;
+
     pass = io_base = ctl_base = 0;
     tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
     tuple.Attributes = 0;
     CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
     while (1) {
     	if (pcmcia_get_tuple_data(handle, &tuple) != 0) goto next_entry;
-	if (pcmcia_parse_tuple(handle, &tuple, &parse) != 0) goto next_entry;
+	if (pcmcia_parse_tuple(handle, &tuple, &stk->parse) != 0) goto next_entry;
 
 	/* Check for matching Vcc, unless we're desperate */
 	if (!pass) {
-	    if (cfg->vcc.present & (1<<CISTPL_POWER_VNOM)) {
-		if (conf.Vcc != cfg->vcc.param[CISTPL_POWER_VNOM]/10000)
+	    if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) {
+		if (stk->conf.Vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000)
 		    goto next_entry;
-	    } else if (dflt.vcc.present & (1<<CISTPL_POWER_VNOM)) {
-		if (conf.Vcc != dflt.vcc.param[CISTPL_POWER_VNOM]/10000)
+	    } else if (stk->dflt.vcc.present & (1 << CISTPL_POWER_VNOM)) {
+		if (stk->conf.Vcc != stk->dflt.vcc.param[CISTPL_POWER_VNOM] / 10000)
 		    goto next_entry;
 	    }
 	}
-	
-	if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM))
+
+	if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM))
 	    link->conf.Vpp1 = link->conf.Vpp2 =
-		cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
-	else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM))
+		cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
+	else if (stk->dflt.vpp1.present & (1 << CISTPL_POWER_VNOM))
 	    link->conf.Vpp1 = link->conf.Vpp2 =
-		dflt.vpp1.param[CISTPL_POWER_VNOM]/10000;
-	
-	if ((cfg->io.nwin > 0) || (dflt.io.nwin > 0)) {
-	    cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt.io;
+		stk->dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000;
+
+	if ((cfg->io.nwin > 0) || (stk->dflt.io.nwin > 0)) {
+	    cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &stk->dflt.io;
 	    link->conf.ConfigIndex = cfg->index;
 	    link->io.BasePort1 = io->win[0].base;
 	    link->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK;
@@ -307,54 +315,52 @@
 		if (pcmcia_request_io(link->handle, &link->io) != 0)
 			goto next_entry;
 		io_base = link->io.BasePort1;
-		ctl_base = link->io.BasePort1+0x0e;
+		ctl_base = link->io.BasePort1 + 0x0e;
 	    } else goto next_entry;
 	    /* If we've got this far, we're done */
 	    break;
 	}
-	
+
     next_entry:
-	if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg;
+	if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
+	    memcpy(&stk->dflt, cfg, sizeof(stk->dflt));
 	if (pass) {
 	    CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(handle, &tuple));
 	} else if (pcmcia_get_next_tuple(handle, &tuple) != 0) {
 	    CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
-	    memset(&dflt, 0, sizeof(dflt));
+	    memset(&stk->dflt, 0, sizeof(stk->dflt));
 	    pass++;
 	}
     }
-    
+
     CS_CHECK(RequestIRQ, pcmcia_request_irq(handle, &link->irq));
     CS_CHECK(RequestConfiguration, pcmcia_request_configuration(handle, &link->conf));
 
-    /* deal with brain dead IDE resource management */
-    release_region(link->io.BasePort1, link->io.NumPorts1);
-    if (link->io.NumPorts2)
-	release_region(link->io.BasePort2, link->io.NumPorts2);
-
     /* disable drive interrupts during IDE probe */
     outb(0x02, ctl_base);
 
     /* special setup for KXLC005 card */
-    if (is_kme) outb(0x81, ctl_base+1);
+    if (is_kme)
+	outb(0x81, ctl_base+1);
 
     /* retry registration in case device is still spinning up */
     for (hd = -1, i = 0; i < 10; i++) {
 	hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ);
 	if (hd >= 0) break;
 	if (link->io.NumPorts1 == 0x20) {
-	    outb(0x02, ctl_base+0x10);
-	    hd = idecs_register(io_base+0x10, ctl_base+0x10,
+	    outb(0x02, ctl_base + 0x10);
+	    hd = idecs_register(io_base + 0x10, ctl_base + 0x10,
 				link->irq.AssignedIRQ);
 	    if (hd >= 0) {
-		io_base += 0x10; ctl_base += 0x10;
+		io_base += 0x10;
+		ctl_base += 0x10;
 		break;
 	    }
 	}
 	__set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout(HZ/10);
     }
-    
+
     if (hd < 0) {
 	printk(KERN_NOTICE "ide-cs: ide_register() at 0x%3lx & 0x%3lx"
 	       ", irq %u failed\n", io_base, ctl_base,
@@ -363,24 +369,29 @@
     }
 
     info->ndev = 1;
-    sprintf(info->node.dev_name, "hd%c", 'a'+(hd*2));
+    sprintf(info->node.dev_name, "hd%c", 'a' + (hd * 2));
     info->node.major = ide_major[hd];
     info->node.minor = 0;
     info->hd = hd;
     link->dev = &info->node;
     printk(KERN_INFO "ide-cs: %s: Vcc = %d.%d, Vpp = %d.%d\n",
-	   info->node.dev_name, link->conf.Vcc/10, link->conf.Vcc%10,
-	   link->conf.Vpp1/10, link->conf.Vpp1%10);
+	   info->node.dev_name, link->conf.Vcc / 10, link->conf.Vcc % 10,
+	   link->conf.Vpp1 / 10, link->conf.Vpp1 % 10);
 
     link->state &= ~DEV_CONFIG_PENDING;
+    kfree(stk);
     return;
-    
+
+err_mem:
+    printk(KERN_NOTICE "ide-cs: ide_config failed memory allocation\n");
+    goto failed;
+
 cs_failed:
     cs_error(link->handle, last_fn, last_ret);
 failed:
+    kfree(stk);
     ide_release(link);
     link->state &= ~DEV_CONFIG_PENDING;
-
 } /* ide_config */
 
 /*======================================================================
--- diff/drivers/ide/legacy/pdc4030.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/legacy/pdc4030.c	2004-07-01 21:32:36.000000000 +0100
@@ -355,7 +355,7 @@
 #endif /* DEBUG_READ */
 
 #ifdef CONFIG_IDE_TASKFILE_IO
-	task_sectors(drive, rq, nsect, IDE_PIO_IN);
+	task_bio_sectors(drive, rq, nsect, IDE_PIO_IN);
 
 	/* FIXME: can we check status after transfer on pdc4030? */
 	/* Complete previously submitted bios. */
@@ -478,7 +478,7 @@
 		if (nsect > msect)
 			nsect = msect;
 
-		task_sectors(drive, rq, nsect, IDE_PIO_OUT);
+		task_bio_sectors(drive, rq, nsect, IDE_PIO_OUT);
 
 		if (!rq->nr_sectors)
 			msect = 0;
--- diff/drivers/ide/pci/amd74xx.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/pci/amd74xx.c	2004-07-01 21:32:36.000000000 +0100
@@ -71,11 +71,7 @@
 	{ PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA,	0x50, AMD_UDMA_133 },
 	{ PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2,	0x50, AMD_UDMA_133 },
 	{ PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE,	0x50, AMD_UDMA_133 },
-	{ PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA,	0x50, AMD_UDMA_133 },
-	{ PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2,	0x50, AMD_UDMA_133 },
 	{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE,	0x50, AMD_UDMA_133 },
-	{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA,	0x50, AMD_UDMA_133 },
-	{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2,	0x50, AMD_UDMA_133 },
 	{ 0 }
 };
 
@@ -487,11 +483,7 @@
 	/* 11 */ DECLARE_NV_DEV("NFORCE3-250-SATA"),
 	/* 12 */ DECLARE_NV_DEV("NFORCE3-250-SATA2"),
 	/* 13 */ DECLARE_NV_DEV("NFORCE-CK804"),
-	/* 14 */ DECLARE_NV_DEV("NFORCE-CK804-SATA"),
-	/* 15 */ DECLARE_NV_DEV("NFORCE-CK804-SATA2"),
-	/* 16 */ DECLARE_NV_DEV("NFORCE-MCP04"),
-	/* 17 */ DECLARE_NV_DEV("NFORCE-MCP04-SATA"),
-	/* 18 */ DECLARE_NV_DEV("NFORCE-MCP04-SATA2")
+	/* 14 */ DECLARE_NV_DEV("NFORCE-MCP04"),
 };
 
 static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
@@ -512,17 +504,17 @@
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE,	PCI_ANY_ID, PCI_ANY_ID, 0, 0,  5 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE,	PCI_ANY_ID, PCI_ANY_ID, 0, 0,  6 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE,	PCI_ANY_ID, PCI_ANY_ID, 0, 0,  7 },
+#ifdef CONFIG_BLK_DEV_IDE_SATA
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA,	PCI_ANY_ID, PCI_ANY_ID, 0, 0,  8 },
+#endif
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE,	PCI_ANY_ID, PCI_ANY_ID, 0, 0,  9 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE,	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10 },
+#ifdef CONFIG_BLK_DEV_IDE_SATA
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA,	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2,	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12 },
+#endif
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE,	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 },
-	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA,	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 },
-	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 },
-	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE,	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 },
-	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA,	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 },
-	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE,	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 },
 	{ 0, },
 };
 MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl);
--- diff/drivers/ide/pci/generic.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/pci/generic.c	2004-07-01 21:32:36.000000000 +0100
@@ -127,7 +127,9 @@
 	{ PCI_VENDOR_ID_HINT,   PCI_DEVICE_ID_HINT_VXPROII_IDE,    PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6},
 	{ PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_82C561,          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7},
 	{ PCI_VENDOR_ID_OPTI,   PCI_DEVICE_ID_OPTI_82C558,         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8},
+#ifdef CONFIG_BLK_DEV_IDE_SATA
 	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237_SATA,	   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9},
+#endif
 	{ PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10},
 	{ PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11},
 	{ PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12},
--- diff/drivers/ide/pci/hpt366.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/pci/hpt366.c	2004-07-01 21:32:36.000000000 +0100
@@ -292,7 +292,7 @@
 	return chipset_table->chipset_settings;
 }
 
-static void hpt366_tune_chipset (ide_drive_t *drive, u8 xferspeed)
+static int hpt36x_tune_chipset(ide_drive_t *drive, u8 xferspeed)
 {
 	struct pci_dev *dev	= HWIF(drive)->pci_dev;
 	u8 speed		= hpt3xx_ratefilter(drive, xferspeed);
@@ -329,14 +329,11 @@
 	reg2 &= ~0x80000000;
 
 	pci_write_config_dword(dev, regtime, reg2);
-}
 
-static void hpt368_tune_chipset (ide_drive_t *drive, u8 speed)
-{
-	hpt366_tune_chipset(drive, speed);
+	return ide_config_drive_speed(drive, speed);
 }
 
-static void hpt370_tune_chipset (ide_drive_t *drive, u8 xferspeed)
+static int hpt370_tune_chipset(ide_drive_t *drive, u8 xferspeed)
 {
 	struct pci_dev *dev = HWIF(drive)->pci_dev;
 	u8 speed	= hpt3xx_ratefilter(drive, xferspeed);
@@ -378,9 +375,11 @@
 	}
 
 	pci_write_config_dword(dev, drive_pci, list_conf);
+
+	return ide_config_drive_speed(drive, speed);
 }
 
-static void hpt372_tune_chipset (ide_drive_t *drive, u8 xferspeed)
+static int hpt372_tune_chipset(ide_drive_t *drive, u8 xferspeed)
 {
 	struct pci_dev *dev	= HWIF(drive)->pci_dev;
 	u8 speed	= hpt3xx_ratefilter(drive, xferspeed);
@@ -406,11 +405,8 @@
 	if (speed < XFER_MW_DMA_0)
 		list_conf &= ~0x80000000; /* Disable on-chip PIO FIFO/buffer */
 	pci_write_config_dword(dev, drive_pci, list_conf);
-}
 
-static void hpt374_tune_chipset (ide_drive_t *drive, u8 speed)
-{
-	hpt372_tune_chipset(drive, speed);
+	return ide_config_drive_speed(drive, speed);
 }
 
 static int hpt3xx_tune_chipset (ide_drive_t *drive, u8 speed)
@@ -418,7 +414,7 @@
 	struct pci_dev *dev	= HWIF(drive)->pci_dev;
 
 	if (hpt_minimum_revision(dev, 8))
-		hpt374_tune_chipset(drive, speed);
+		return hpt372_tune_chipset(drive, speed); /* not a typo */
 #if 0
 	else if (hpt_minimum_revision(dev, 7))
 		hpt371_tune_chipset(drive, speed);
@@ -426,15 +422,11 @@
 		hpt302_tune_chipset(drive, speed);
 #endif
 	else if (hpt_minimum_revision(dev, 5))
-		hpt372_tune_chipset(drive, speed);
+		return hpt372_tune_chipset(drive, speed);
 	else if (hpt_minimum_revision(dev, 3))
-		hpt370_tune_chipset(drive, speed);
-	else if (hpt_minimum_revision(dev, 2))
-		hpt368_tune_chipset(drive, speed);
-	else
-                hpt366_tune_chipset(drive, speed);
-
-	return ((int) ide_config_drive_speed(drive, speed));
+		return hpt370_tune_chipset(drive, speed);
+	else	/* hpt368: hpt_minimum_revision(dev, 2) */
+		return hpt36x_tune_chipset(drive, speed);
 }
 
 static void hpt3xx_tune_drive (ide_drive_t *drive, u8 pio)
--- diff/drivers/ide/pci/pdc202xx_old.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/pci/pdc202xx_old.c	2004-07-01 21:32:36.000000000 +0100
@@ -717,6 +717,12 @@
 
 static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
 {
+	struct pci_dev *dev = hwif->pci_dev;
+
+	/* PDC20265 has problems with large LBA48 requests */
+	if (dev->device == PCI_DEVICE_ID_PROMISE_20265)
+		hwif->rqsize = 256;
+
 	hwif->autodma = 0;
 	hwif->tuneproc  = &config_chipset_for_pio;
 	hwif->quirkproc = &pdc202xx_quirkproc;
--- diff/drivers/ide/pci/piix.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/pci/piix.c	2004-07-01 21:32:36.000000000 +0100
@@ -793,9 +793,9 @@
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_11,PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15},
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_11, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16},
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_10,PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17},
-#ifndef CONFIG_SCSI_SATA
+#ifdef CONFIG_BLK_DEV_IDE_SATA
  	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18},
-#endif /* !CONFIG_SCSI_SATA */
+#endif
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19},
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_19, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20},
 	{ 0, },
--- diff/drivers/ide/pci/siimage.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/pci/siimage.c	2004-07-01 21:32:36.000000000 +0100
@@ -21,6 +21,7 @@
  *	if neccessary
  */
 
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/pci.h>
@@ -1127,8 +1128,10 @@
 
 static struct pci_device_id siimage_pci_tbl[] = {
 	{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+#ifdef CONFIG_BLK_DEV_IDE_SATA
 	{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
 	{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
+#endif
 	{ 0, },
 };
 MODULE_DEVICE_TABLE(pci, siimage_pci_tbl);
--- diff/drivers/ide/pci/trm290.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ide/pci/trm290.c	2004-07-01 21:32:36.000000000 +0100
@@ -3,6 +3,10 @@
  *
  *  Copyright (c) 1997-1998  Mark Lord
  *  May be copied or modified under the terms of the GNU General Public License
+ *
+ *  June 22, 2004 - get rid of check_region
+ *                  Jesper Juhl <juhl-lkml@dif.dk>
+ *
  */
 
 /*
@@ -372,16 +376,6 @@
 		if (old != compat && old_mask == 0xff) {
 			/* leave lower 10 bits untouched */
 			compat += (next_offset += 0x400);
-#  if 1
-			if (check_region(compat + 2, 1))
-				printk(KERN_ERR "%s: check_region failure at 0x%04x\n",
-					hwif->name, (compat + 2));
-			/*
-			 * The region check is not needed; however.........
-			 * Since this is the checked in ide-probe.c,
-			 * this is only an assignment.
-			 */
-#  endif
 			hwif->io_ports[IDE_CONTROL_OFFSET] = compat + 2;
 			hwif->OUTW(compat|1, hwif->config_data);
 			new = hwif->INW(hwif->config_data);
--- diff/drivers/ieee1394/amdtp.c	2004-05-19 22:11:41.000000000 +0100
+++ source/drivers/ieee1394/amdtp.c	2004-07-01 21:32:36.000000000 +0100
@@ -1095,7 +1095,7 @@
 
 /* File operations */
 
-static ssize_t amdtp_write(struct file *file, const char *buffer, size_t count,
+static ssize_t amdtp_write(struct file *file, const char __user *buffer, size_t count,
 			   loff_t *offset_is_ignored)
 {
 	struct stream *s = file->private_data;
@@ -1150,7 +1150,7 @@
 	{
 	case AMDTP_IOC_PLUG:
 	case AMDTP_IOC_CHANNEL:
-		if (copy_from_user(&cfg, (struct amdtp_ioctl *) arg, sizeof cfg))
+		if (copy_from_user(&cfg, (struct amdtp_ioctl __user *) arg, sizeof cfg))
 			return -EFAULT;
 		else
 			return stream_configure(s, cmd, &cfg);
--- diff/drivers/ieee1394/dv1394.c	2004-05-19 22:11:42.000000000 +0100
+++ source/drivers/ieee1394/dv1394.c	2004-07-01 21:32:36.000000000 +0100
@@ -1333,7 +1333,7 @@
         return 0;
 }
 
-static ssize_t dv1394_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
+static ssize_t dv1394_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
 {
 	struct video_card *video = file_to_video_card(file);
 	DECLARE_WAITQUEUE(wait, current);
@@ -1430,7 +1430,7 @@
 }
 
 
-static ssize_t dv1394_read(struct file *file,  char *buffer, size_t count, loff_t *ppos)
+static ssize_t dv1394_read(struct file *file,  char __user *buffer, size_t count, loff_t *ppos)
 {
 	struct video_card *video = file_to_video_card(file);
 	DECLARE_WAITQUEUE(wait, current);
@@ -1549,6 +1549,7 @@
 	struct video_card *video = file_to_video_card(file);
 	unsigned long flags;
 	int ret = -EINVAL;
+	void __user *argp = (void __user *)arg;
 
 	DECLARE_WAITQUEUE(wait, current);
 
@@ -1718,10 +1719,10 @@
 
 	case DV1394_IOC_INIT: {
 		struct dv1394_init init;
-		if (arg == (unsigned long) NULL) {
+		if (!argp) {
 			ret = do_dv1394_init_default(video);
 		} else {
-			if (copy_from_user(&init, (void*)arg, sizeof(init))) {
+			if (copy_from_user(&init, argp, sizeof(init))) {
 				ret = -EFAULT;
 				goto out;
 			}
@@ -1767,7 +1768,7 @@
 
 		spin_unlock_irqrestore(&video->spinlock, flags);
 
-		if (copy_to_user((void*)arg, &status, sizeof(status))) {
+		if (copy_to_user(argp, &status, sizeof(status))) {
 			ret = -EFAULT;
 			goto out;
 		}
--- diff/drivers/ieee1394/eth1394.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ieee1394/eth1394.c	2004-07-01 21:32:36.000000000 +0100
@@ -431,9 +431,12 @@
 		if (!node)
 			return -ENOMEM;
 
-
 		node_info = kmalloc(sizeof(struct eth1394_node_info),
 				    in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
+		if (!node_info) {
+			kfree(node);
+			return -ENOMEM;
+                }
 
 		spin_lock_init(&node_info->pdg.lock);
 		INIT_LIST_HEAD(&node_info->pdg.list);
--- diff/drivers/ieee1394/pcilynx.c	2004-05-19 22:11:42.000000000 +0100
+++ source/drivers/ieee1394/pcilynx.c	2004-07-01 21:32:36.000000000 +0100
@@ -500,7 +500,7 @@
         pcl.async_error_next = PCL_NEXT_INVALID;
         pcl.pcl_status = 0;
         pcl.buffer[0].control = packet->speed_code << 14 | packet->header_size;
-#ifdef __BIG_ENDIAN
+#ifndef __BIG_ENDIAN
         pcl.buffer[0].control |= PCL_BIGENDIAN;
 #endif
         pcl.buffer[0].pointer = d->header_dma;
@@ -1697,7 +1697,7 @@
         pcl.async_error_next = PCL_NEXT_INVALID;
 
         pcl.buffer[0].control = PCL_CMD_RCV | 16;
-#ifdef __BIG_ENDIAN
+#ifndef __BIG_ENDIAN
 	pcl.buffer[0].control |= PCL_BIGENDIAN;
 #endif
 	pcl.buffer[1].control = PCL_LAST_BUFF | 4080;
--- diff/drivers/ieee1394/raw1394-private.h	2004-05-19 22:11:42.000000000 +0100
+++ source/drivers/ieee1394/raw1394-private.h	2004-07-01 21:32:36.000000000 +0100
@@ -35,11 +35,11 @@
 
         struct list_head addr_list;
 
-        u8 *fcp_buffer;
+        u8 __user *fcp_buffer;
 
 	/* old ISO API */
         u64 listen_channels;
-        quadlet_t *iso_buffer;
+        quadlet_t __user *iso_buffer;
         size_t iso_buffer_length;
 
         u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */
--- diff/drivers/ieee1394/raw1394.c	2004-05-19 22:11:42.000000000 +0100
+++ source/drivers/ieee1394/raw1394.c	2004-07-01 21:32:36.000000000 +0100
@@ -56,11 +56,11 @@
 #include "raw1394-private.h"
 
 #if BITS_PER_LONG == 64
-#define int2ptr(x) ((void *)x)
-#define ptr2int(x) ((u64)x)
+#define int2ptr(x) ((void __user *)x)
+#define ptr2int(x) ((u64)(unsigned long)(void __user *)x)
 #else
-#define int2ptr(x) ((void *)(u32)x)
-#define ptr2int(x) ((u64)(u32)x)
+#define int2ptr(x) ((void __user *)(u32)x)
+#define ptr2int(x) ((u64)(unsigned long)(void __user *)x)
 #endif
 
 #ifdef CONFIG_IEEE1394_VERBOSEDEBUG
@@ -410,7 +410,7 @@
 }
 
 
-static ssize_t raw1394_read(struct file *file, char *buffer, size_t count,
+static ssize_t raw1394_read(struct file *file, char __user *buffer, size_t count,
                     loff_t *offset_is_ignored)
 {
         struct file_info *fi = (struct file_info *)file->private_data;
@@ -602,7 +602,7 @@
                 if (fi->fcp_buffer) {
                         req->req.error = RAW1394_ERROR_ALREADY;
                 } else {
-                        fi->fcp_buffer = (u8 *)int2ptr(req->req.recvb);
+                        fi->fcp_buffer = int2ptr(req->req.recvb);
                 }
         } else {
                 if (!fi->fcp_buffer) {
@@ -826,7 +826,7 @@
                 return sizeof(struct raw1394_request);
         }
 
-        if (copy_from_user(packet->data, ((u8*) int2ptr(req->req.sendb)) + header_length,
+        if (copy_from_user(packet->data, int2ptr(req->req.sendb) + header_length,
                            packet->data_size)) {
                 req->req.error = RAW1394_ERROR_MEMFAULT;
                 req->req.length = 0;
@@ -964,9 +964,8 @@
                 arm_req->buffer  = NULL;
                 arm_resp->buffer = NULL;
                 if (rcode == RCODE_COMPLETE) {
-                        arm_resp->buffer = ((byte_t *)(arm_resp) +
-                                (sizeof(struct arm_response)));
-                        memcpy (arm_resp->buffer,
+                        byte_t *buf = (byte_t *)arm_resp + sizeof(struct arm_response);
+                        memcpy (buf,
                                 (arm_addr->addr_space_buffer)+(addr-(arm_addr->start)),
                                 length);
                         arm_resp->buffer = int2ptr((arm_addr->recvb) +
@@ -1091,10 +1090,9 @@
                         (sizeof (struct arm_request_response)));
                 arm_resp = (struct arm_response *) ((byte_t *)(arm_req) +
                         (sizeof(struct arm_request)));
-                arm_req->buffer = ((byte_t *)(arm_resp) +
-                        (sizeof(struct arm_response)));
                 arm_resp->buffer = NULL;
-                memcpy (arm_req->buffer, data, length);
+                memcpy ((byte_t *)arm_resp + sizeof(struct arm_response),
+			data, length);
                 arm_req->buffer = int2ptr((arm_addr->recvb) +
                         sizeof (struct arm_request_response) +
                         sizeof (struct arm_request) +
@@ -1233,6 +1231,7 @@
                 }
         }
         if (arm_addr->notification_options & ARM_LOCK) {
+		byte_t *buf1, *buf2;
                 DBGMSG("arm_lock -> entering notification-section");
                 req = __alloc_pending_request(SLAB_ATOMIC);
                 if (!req) {
@@ -1258,26 +1257,22 @@
                         (sizeof (struct arm_request_response)));
                 arm_resp = (struct arm_response *) ((byte_t *)(arm_req) +
                         (sizeof(struct arm_request)));
-                arm_req->buffer = ((byte_t *)(arm_resp) +
-                        (sizeof(struct arm_response)));
-                arm_resp->buffer = ((byte_t *)(arm_req->buffer) +
-                        (2* sizeof(*store)));
+                buf1 = (byte_t *)arm_resp + sizeof(struct arm_response);
+		buf2 = buf1 + 2 * sizeof(*store);
                 if ((ext_tcode == EXTCODE_FETCH_ADD) ||
                         (ext_tcode == EXTCODE_LITTLE_ADD)) {
                         arm_req->buffer_length = sizeof(*store);
-                        memcpy (arm_req->buffer, &data, sizeof(*store));
+                        memcpy (buf1, &data, sizeof(*store));
 
                 } else {
                         arm_req->buffer_length = 2 * sizeof(*store);
-                        memcpy (arm_req->buffer, &arg,  sizeof(*store));
-                        memcpy (((arm_req->buffer) + sizeof(*store)),
-                                &data, sizeof(*store));
+                        memcpy (buf1, &arg,  sizeof(*store));
+                        memcpy (buf1 + sizeof(*store), &data, sizeof(*store));
                 }
                 if (rcode == RCODE_COMPLETE) {
                         arm_resp->buffer_length = sizeof(*store);
-                        memcpy (arm_resp->buffer, &old, sizeof(*store));
+                        memcpy (buf2, &old, sizeof(*store));
                 } else {
-                        arm_resp->buffer = NULL;
                         arm_resp->buffer_length = 0;
                 }
                 req->file_info = fi;
@@ -1438,6 +1433,7 @@
                 }
         }
         if (arm_addr->notification_options & ARM_LOCK) {
+		byte_t *buf1, *buf2;
                 DBGMSG("arm_lock64 -> entering notification-section");
                 req = __alloc_pending_request(SLAB_ATOMIC);
                 if (!req) {
@@ -1463,26 +1459,22 @@
                         (sizeof (struct arm_request_response)));
                 arm_resp = (struct arm_response *) ((byte_t *)(arm_req) +
                         (sizeof(struct arm_request)));
-                arm_req->buffer = ((byte_t *)(arm_resp) +
-                        (sizeof(struct arm_response)));
-                arm_resp->buffer = ((byte_t *)(arm_req->buffer) +
-                        (2* sizeof(*store)));
+                buf1 = (byte_t *)arm_resp + sizeof(struct arm_response);
+                buf2 = buf1 + 2 * sizeof(*store);
                 if ((ext_tcode == EXTCODE_FETCH_ADD) ||
                         (ext_tcode == EXTCODE_LITTLE_ADD)) {
                         arm_req->buffer_length = sizeof(*store);
-                        memcpy (arm_req->buffer, &data, sizeof(*store));
+                        memcpy (buf1, &data, sizeof(*store));
 
                 } else {
                         arm_req->buffer_length = 2 * sizeof(*store);
-                        memcpy (arm_req->buffer, &arg,  sizeof(*store));
-                        memcpy (((arm_req->buffer) + sizeof(*store)),
-                                &data, sizeof(*store));
+                        memcpy (buf1, &arg,  sizeof(*store));
+                        memcpy (buf1 + sizeof(*store), &data, sizeof(*store));
                 }
                 if (rcode == RCODE_COMPLETE) {
                         arm_resp->buffer_length = sizeof(*store);
-                        memcpy (arm_resp->buffer, &old, sizeof(*store));
+                        memcpy (buf2, &old, sizeof(*store));
                 } else {
-                        arm_resp->buffer = NULL;
                         arm_resp->buffer_length = 0;
                 }
                 req->file_info = fi;
@@ -2146,7 +2138,7 @@
 }
 
 
-static ssize_t raw1394_write(struct file *file, const char *buffer, size_t count,
+static ssize_t raw1394_write(struct file *file, const char __user *buffer, size_t count,
                      loff_t *offset_is_ignored)
 {
         struct file_info *fi = (struct file_info *)file->private_data;
@@ -2262,7 +2254,7 @@
 	stat->xmit_cycle = iso->xmit_cycle;
 }
 
-static int raw1394_iso_xmit_init(struct file_info *fi, void *uaddr)
+static int raw1394_iso_xmit_init(struct file_info *fi, void __user *uaddr)
 {
 	struct raw1394_iso_status stat;
 
@@ -2294,7 +2286,7 @@
 	return 0;
 }
 
-static int raw1394_iso_recv_init(struct file_info *fi, void *uaddr)
+static int raw1394_iso_recv_init(struct file_info *fi, void __user *uaddr)
 {
 	struct raw1394_iso_status stat;
 
@@ -2322,7 +2314,7 @@
 	return 0;
 }
 
-static int raw1394_iso_get_status(struct file_info *fi, void *uaddr)
+static int raw1394_iso_get_status(struct file_info *fi, void __user *uaddr)
 {
 	struct raw1394_iso_status stat;
 	struct hpsb_iso *iso = fi->iso_handle;
@@ -2338,7 +2330,7 @@
 }
 
 /* copy N packet_infos out of the ringbuffer into user-supplied array */
-static int raw1394_iso_recv_packets(struct file_info *fi, void *uaddr)
+static int raw1394_iso_recv_packets(struct file_info *fi, void __user *uaddr)
 {
 	struct raw1394_iso_packets upackets;
 	unsigned int packet = fi->iso_handle->first_packet;
@@ -2369,7 +2361,7 @@
 }
 
 /* copy N packet_infos from user to ringbuffer, and queue them for transmission */
-static int raw1394_iso_send_packets(struct file_info *fi, void *uaddr)
+static int raw1394_iso_send_packets(struct file_info *fi, void __user *uaddr)
 {
 	struct raw1394_iso_packets upackets;
 	int i, rv;
@@ -2426,14 +2418,15 @@
 static int raw1394_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
 {
 	struct file_info *fi = file->private_data;
+	void __user *argp = (void __user *)arg;
 
 	switch(fi->iso_state) {
 	case RAW1394_ISO_INACTIVE:
 		switch(cmd) {
 		case RAW1394_IOC_ISO_XMIT_INIT:
-			return raw1394_iso_xmit_init(fi, (void*) arg);
+			return raw1394_iso_xmit_init(fi, argp);
 		case RAW1394_IOC_ISO_RECV_INIT:
-			return raw1394_iso_recv_init(fi, (void*) arg);
+			return raw1394_iso_recv_init(fi, argp);
 		default:
 			break;
 		}
@@ -2443,7 +2436,7 @@
 		case RAW1394_IOC_ISO_RECV_START: {
 			/* copy args from user-space */
 			int args[3];
-			if (copy_from_user(&args[0], (void*) arg, sizeof(args)))
+			if (copy_from_user(&args[0], argp, sizeof(args)))
 				return -EFAULT;
 			return hpsb_iso_recv_start(fi->iso_handle, args[0], args[1], args[2]);
 		}
@@ -2457,14 +2450,14 @@
 		case RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK: {
 			/* copy the u64 from user-space */
 			u64 mask;
-			if (copy_from_user(&mask, (void*) arg, sizeof(mask)))
+			if (copy_from_user(&mask, argp, sizeof(mask)))
 				return -EFAULT;
 			return hpsb_iso_recv_set_channel_mask(fi->iso_handle, mask);
 		}
 		case RAW1394_IOC_ISO_GET_STATUS:
-			return raw1394_iso_get_status(fi, (void*) arg);
+			return raw1394_iso_get_status(fi, argp);
 		case RAW1394_IOC_ISO_RECV_PACKETS:
-			return raw1394_iso_recv_packets(fi, (void*) arg);
+			return raw1394_iso_recv_packets(fi, argp);
 		case RAW1394_IOC_ISO_RECV_RELEASE_PACKETS:
 			return hpsb_iso_recv_release_packets(fi->iso_handle, arg);
 		case RAW1394_IOC_ISO_RECV_FLUSH:
@@ -2482,7 +2475,7 @@
 		case RAW1394_IOC_ISO_XMIT_START: {
 			/* copy two ints from user-space */
 			int args[2];
-			if (copy_from_user(&args[0], (void*) arg, sizeof(args)))
+			if (copy_from_user(&args[0], argp, sizeof(args)))
 				return -EFAULT;
 			return hpsb_iso_xmit_start(fi->iso_handle, args[0], args[1]);
 		}
@@ -2492,9 +2485,9 @@
 			hpsb_iso_stop(fi->iso_handle);
 			return 0;
 		case RAW1394_IOC_ISO_GET_STATUS:
-			return raw1394_iso_get_status(fi, (void*) arg);
+			return raw1394_iso_get_status(fi, argp);
 		case RAW1394_IOC_ISO_XMIT_PACKETS:
-			return raw1394_iso_send_packets(fi, (void*) arg);
+			return raw1394_iso_send_packets(fi, argp);
 		case RAW1394_IOC_ISO_SHUTDOWN:
 			raw1394_iso_shutdown(fi);
 			return 0;
--- diff/drivers/ieee1394/raw1394.h	2004-05-19 22:11:42.000000000 +0100
+++ source/drivers/ieee1394/raw1394.h	2004-07-01 21:32:36.000000000 +0100
@@ -105,18 +105,18 @@
         __u8            extended_transaction_code;
         __u32           generation;
         __u16           buffer_length;
-        __u8            *buffer;
+        __u8            __user *buffer;
 } *arm_request_t;
 
 typedef struct arm_response {
         __s32           response_code;
         __u16           buffer_length;
-        __u8            *buffer;
+        __u8            __user *buffer;
 } *arm_response_t;
 
 typedef struct arm_request_response {
-        struct arm_request  *request;
-        struct arm_response *response;
+        struct arm_request  __user *request;
+        struct arm_response __user *response;
 } *arm_request_response_t;
 
 /* rawiso API */
@@ -136,7 +136,7 @@
 /* argument for RAW1394_ISO_RECV/XMIT_PACKETS ioctls */
 struct raw1394_iso_packets {
 	__u32 n_packets;
-	struct raw1394_iso_packet_info *infos;
+	struct raw1394_iso_packet_info __user *infos;
 };
 
 struct raw1394_iso_config {
--- diff/drivers/ieee1394/sbp2.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ieee1394/sbp2.c	2004-07-01 21:32:36.000000000 +0100
@@ -65,7 +65,7 @@
 #include <asm/scatterlist.h>
 
 #include "../scsi/scsi.h"
-#include "../scsi/hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "csr1212.h"
 #include "ieee1394.h"
--- diff/drivers/ieee1394/video1394.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/ieee1394/video1394.c	2004-07-01 21:32:36.000000000 +0100
@@ -705,6 +705,7 @@
 	struct file_ctx *ctx = (struct file_ctx *)file->private_data;
 	struct ti_ohci *ohci = ctx->ohci;
 	unsigned long flags;
+	void __user *argp = (void __user *)arg;
 
 	switch(cmd)
 	{
@@ -716,7 +717,7 @@
 		struct dma_iso_ctx *d;
 		int i;
 
-		if (copy_from_user(&v, (void *)arg, sizeof(v)))
+		if (copy_from_user(&v, argp, sizeof(v)))
 			return -EFAULT;
 
 		/* if channel < 0, find lowest available one */
@@ -813,7 +814,7 @@
 			      v.channel);
 		}
 
-		if (copy_to_user((void *)arg, &v, sizeof(v)))
+		if (copy_to_user(argp, &v, sizeof(v)))
 			return -EFAULT;
 
 		return 0;
@@ -825,7 +826,7 @@
 		u64 mask;
 		struct dma_iso_ctx *d;
 
-		if (copy_from_user(&channel, (void *)arg, sizeof(int)))
+		if (copy_from_user(&channel, argp, sizeof(int)))
 			return -EFAULT;
 
 		if (channel<0 || channel>(ISO_CHANNELS-1)) {
@@ -860,7 +861,7 @@
 		struct video1394_wait v;
 		struct dma_iso_ctx *d;
 
-		if (copy_from_user(&v, (void *)arg, sizeof(v)))
+		if (copy_from_user(&v, argp, sizeof(v)))
 			return -EFAULT;
 
 		d = find_ctx(&ctx->context_list, OHCI_ISO_RECEIVE, v.channel);
@@ -923,7 +924,7 @@
 		struct dma_iso_ctx *d;
 		int i;
 
-		if (copy_from_user(&v, (void *)arg, sizeof(v)))
+		if (copy_from_user(&v, argp, sizeof(v)))
 			return -EFAULT;
 
 		d = find_ctx(&ctx->context_list, OHCI_ISO_RECEIVE, v.channel);
@@ -994,7 +995,7 @@
 		spin_unlock_irqrestore(&d->lock, flags);
 
 		v.buffer=i;
-		if (copy_to_user((void *)arg, &v, sizeof(v)))
+		if (copy_to_user(argp, &v, sizeof(v)))
 			return -EFAULT;
 
 		return 0;
@@ -1007,7 +1008,7 @@
 
 		qv.packet_sizes = NULL;
 
-		if (copy_from_user(&v, (void *)arg, sizeof(v)))
+		if (copy_from_user(&v, argp, sizeof(v)))
 			return -EFAULT;
 
 		d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel);
@@ -1023,7 +1024,7 @@
 			unsigned int *psizes;
 			int buf_size = d->nb_cmd * sizeof(unsigned int);
 
-			if (copy_from_user(&qv, (void *)arg, sizeof(qv)))
+			if (copy_from_user(&qv, argp, sizeof(qv)))
 				return -EFAULT;
 
 			psizes = kmalloc(buf_size, GFP_KERNEL);
@@ -1111,7 +1112,7 @@
 		struct video1394_wait v;
 		struct dma_iso_ctx *d;
 
-		if (copy_from_user(&v, (void *)arg, sizeof(v)))
+		if (copy_from_user(&v, argp, sizeof(v)))
 			return -EFAULT;
 
 		d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel);
--- diff/drivers/input/gameport/emu10k1-gp.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/gameport/emu10k1-gp.c	2004-07-01 21:32:36.000000000 +0100
@@ -50,8 +50,11 @@
 };
 
 static struct pci_device_id emu_tbl[] = {
+ 
 	{ 0x1102, 0x7002, PCI_ANY_ID, PCI_ANY_ID }, /* SB Live gameport */
 	{ 0x1102, 0x7003, PCI_ANY_ID, PCI_ANY_ID }, /* Audigy gameport */
+	{ 0x1102, 0x7004, PCI_ANY_ID, PCI_ANY_ID }, /* Dell SB Live */
+	{ 0x1102, 0x7005, PCI_ANY_ID, PCI_ANY_ID }, /* Audigy LS gameport */
 	{ 0, }
 };
 
--- diff/drivers/input/joydev.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joydev.c	2004-07-01 21:32:36.000000000 +0100
@@ -191,12 +191,12 @@
 	return 0;
 }
 
-static ssize_t joydev_write(struct file * file, const char * buffer, size_t count, loff_t *ppos)
+static ssize_t joydev_write(struct file * file, const char __user * buffer, size_t count, loff_t *ppos)
 {
 	return -EINVAL;
 }
 
-static ssize_t joydev_read(struct file *file, char *buf, size_t count, loff_t *ppos)
+static ssize_t joydev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 {
 	struct joydev_list *list = file->private_data;
 	struct joydev *joydev = list->joydev;
@@ -291,6 +291,7 @@
 	struct joydev_list *list = file->private_data;
 	struct joydev *joydev = list->joydev;
 	struct input_dev *dev = joydev->handle.dev;
+	void __user *argp = (void __user *)arg;
 	int i, j;
 
 	if (!joydev->exist) return -ENODEV;
@@ -298,34 +299,34 @@
 	switch (cmd) {
 
 		case JS_SET_CAL:
-			return copy_from_user(&joydev->glue.JS_CORR, (struct JS_DATA_TYPE *) arg,
+			return copy_from_user(&joydev->glue.JS_CORR, argp,
 				sizeof(struct JS_DATA_TYPE)) ? -EFAULT : 0;
 		case JS_GET_CAL:
-			return copy_to_user((struct JS_DATA_TYPE *) arg, &joydev->glue.JS_CORR,
+			return copy_to_user(argp, &joydev->glue.JS_CORR,
 				sizeof(struct JS_DATA_TYPE)) ? -EFAULT : 0;
 		case JS_SET_TIMEOUT:
-			return get_user(joydev->glue.JS_TIMEOUT, (int *) arg);
+			return get_user(joydev->glue.JS_TIMEOUT, (int __user *) arg);
 		case JS_GET_TIMEOUT:
-			return put_user(joydev->glue.JS_TIMEOUT, (int *) arg);
+			return put_user(joydev->glue.JS_TIMEOUT, (int __user *) arg);
 		case JS_SET_TIMELIMIT:
-			return get_user(joydev->glue.JS_TIMELIMIT, (long *) arg);
+			return get_user(joydev->glue.JS_TIMELIMIT, (long __user *) arg);
 		case JS_GET_TIMELIMIT:
-			return put_user(joydev->glue.JS_TIMELIMIT, (long *) arg);
+			return put_user(joydev->glue.JS_TIMELIMIT, (long __user *) arg);
 		case JS_SET_ALL:
-			return copy_from_user(&joydev->glue, (struct JS_DATA_SAVE_TYPE *) arg,
+			return copy_from_user(&joydev->glue, argp,
 						sizeof(struct JS_DATA_SAVE_TYPE)) ? -EFAULT : 0;
 		case JS_GET_ALL:
-			return copy_to_user((struct JS_DATA_SAVE_TYPE *) arg, &joydev->glue,
+			return copy_to_user(argp, &joydev->glue,
 						sizeof(struct JS_DATA_SAVE_TYPE)) ? -EFAULT : 0;
 
 		case JSIOCGVERSION:
-			return put_user(JS_VERSION, (__u32 *) arg);
+			return put_user(JS_VERSION, (__u32 __user *) arg);
 		case JSIOCGAXES:
-			return put_user(joydev->nabs, (__u8 *) arg);
+			return put_user(joydev->nabs, (__u8 __user *) arg);
 		case JSIOCGBUTTONS:
-			return put_user(joydev->nkey, (__u8 *) arg);
+			return put_user(joydev->nkey, (__u8 __user *) arg);
 		case JSIOCSCORR:
-			if (copy_from_user(joydev->corr, (struct js_corr *)arg,
+			if (copy_from_user(joydev->corr, argp,
 				      sizeof(struct js_corr) * joydev->nabs))
 			    return -EFAULT;
 			for (i = 0; i < joydev->nabs; i++) {
@@ -334,10 +335,10 @@
 			}
 			return 0;
 		case JSIOCGCORR:
-			return copy_to_user((struct js_corr *) arg, joydev->corr,
+			return copy_to_user(argp, joydev->corr,
 						sizeof(struct js_corr) * joydev->nabs) ? -EFAULT : 0;
 		case JSIOCSAXMAP:
-			if (copy_from_user(joydev->abspam, (__u8 *) arg, sizeof(__u8) * ABS_MAX))
+			if (copy_from_user(joydev->abspam, argp, sizeof(__u8) * ABS_MAX))
 				return -EFAULT;
 			for (i = 0; i < joydev->nabs; i++) {
 				if (joydev->abspam[i] > ABS_MAX) return -EINVAL;
@@ -345,10 +346,10 @@
 			}
 			return 0;
 		case JSIOCGAXMAP:
-			return copy_to_user((__u8 *) arg, joydev->abspam,
+			return copy_to_user(argp, joydev->abspam,
 						sizeof(__u8) * ABS_MAX) ? -EFAULT : 0;
 		case JSIOCSBTNMAP:
-			if (copy_from_user(joydev->keypam, (__u16 *) arg, sizeof(__u16) * (KEY_MAX - BTN_MISC)))
+			if (copy_from_user(joydev->keypam, argp, sizeof(__u16) * (KEY_MAX - BTN_MISC)))
 				return -EFAULT;
 			for (i = 0; i < joydev->nkey; i++) {
 				if (joydev->keypam[i] > KEY_MAX || joydev->keypam[i] < BTN_MISC) return -EINVAL;
@@ -356,7 +357,7 @@
 			}
 			return 0;
 		case JSIOCGBTNMAP:
-			return copy_to_user((__u16 *) arg, joydev->keypam,
+			return copy_to_user(argp, joydev->keypam,
 						sizeof(__u16) * (KEY_MAX - BTN_MISC)) ? -EFAULT : 0;
 		default:
 			if ((cmd & ~(_IOC_SIZEMASK << _IOC_SIZESHIFT)) == JSIOCGNAME(0)) {
@@ -364,7 +365,7 @@
 				if (!dev->name) return 0;
 				len = strlen(dev->name) + 1;
 				if (len > _IOC_SIZE(cmd)) len = _IOC_SIZE(cmd);
-				if (copy_to_user((char *) arg, dev->name, len)) return -EFAULT;
+				if (copy_to_user(argp, dev->name, len)) return -EFAULT;
 				return len;
 			}
 	}
--- diff/drivers/input/joystick/gamecon.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/gamecon.c	2004-07-01 21:32:36.000000000 +0100
@@ -1,7 +1,8 @@
 /*
- * $Id: gamecon.c,v 1.22 2002/07/01 15:42:25 vojtech Exp $
+ * NES, SNES, N64, MultiSystem, PSX gamepad driver for Linux
  *
- *  Copyright (c) 1999-2001 Vojtech Pavlik
+ *  Copyright (c) 1999-2004 	Vojtech Pavlik <vojtech@suse.cz>
+ *  Copyright (c) 2004 		Peter Nelson <rufus-kernel@hackish.org>
  *
  *  Based on the work of:
  *  	Andree Borrmann		John Dahlstrom
@@ -9,10 +10,6 @@
  */
 
 /*
- * NES, SNES, N64, MultiSystem, PSX gamepad driver for Linux
- */
-
-/*
  * 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
@@ -72,8 +69,9 @@
 #define GC_MULTI2	5
 #define GC_N64		6
 #define GC_PSX		7
+#define GC_DDR		8
 
-#define GC_MAX		7
+#define GC_MAX		8
 
 #define GC_REFRESH_TIME	HZ/100
 
@@ -91,7 +89,8 @@
 static int gc_status_bit[] = { 0x40, 0x80, 0x20, 0x10, 0x08 };
 
 static char *gc_names[] = { NULL, "SNES pad", "NES pad", "NES FourPort", "Multisystem joystick",
-				"Multisystem 2-button joystick", "N64 controller", "PSX controller" };
+				"Multisystem 2-button joystick", "N64 controller", "PSX controller"
+				"PSX DDR controller" };
 /*
  * N64 support.
  */
@@ -237,7 +236,7 @@
 #define GC_PSX_RUMBLE	7		/* Rumble in Red mode */
 
 #define GC_PSX_CLOCK	0x04		/* Pin 4 */
-#define GC_PSX_COMMAND	0x01		/* Pin 1 */
+#define GC_PSX_COMMAND	0x01		/* Pin 2 */
 #define GC_PSX_POWER	0xf8		/* Pins 5-9 */
 #define GC_PSX_SELECT	0x02		/* Pin 3 */
 
@@ -253,25 +252,29 @@
 static short gc_psx_abs[] = { ABS_X, ABS_Y, ABS_RX, ABS_RY, ABS_HAT0X, ABS_HAT0Y };
 static short gc_psx_btn[] = { BTN_TL, BTN_TR, BTN_TL2, BTN_TR2, BTN_A, BTN_B, BTN_X, BTN_Y,
 				BTN_START, BTN_SELECT, BTN_THUMBL, BTN_THUMBR };
+static short gc_psx_ddr_btn[] = { BTN_0, BTN_1, BTN_2, BTN_3 };
 
 /*
  * gc_psx_command() writes 8bit command and reads 8bit data from
  * the psx pad.
  */
 
-static int gc_psx_command(struct gc *gc, int b)
+static void gc_psx_command(struct gc *gc, int b, unsigned char data[GC_PSX_LENGTH])
 {
-	int i, cmd, data = 0;
+	int i, j, cmd, read;
+	for (i = 0; i < 5; i++)
+		data[i] = 0;
 
 	for (i = 0; i < 8; i++, b >>= 1) {
 		cmd = (b & 1) ? GC_PSX_COMMAND : 0;
 		parport_write_data(gc->pd->port, cmd | GC_PSX_POWER);
 		udelay(gc_psx_delay);
-		data |= ((parport_read_status(gc->pd->port) ^ 0x80) & gc->pads[GC_PSX]) ? (1 << i) : 0;
+		read = parport_read_status(gc->pd->port) ^ 0x80;
+		for (j = 0; j < 5; j++)
+			data[j] |= (read & gc_status_bit[j] & gc->pads[GC_PSX]) ? (1 << i) : 0;
 		parport_write_data(gc->pd->port, cmd | GC_PSX_CLOCK | GC_PSX_POWER);
 		udelay(gc_psx_delay);
 	}
-	return data;
 }
 
 /*
@@ -279,30 +282,39 @@
  * device identifier code.
  */
 
-static int gc_psx_read_packet(struct gc *gc, unsigned char *data)
+static void gc_psx_read_packet(struct gc *gc, unsigned char data[5][GC_PSX_LENGTH], unsigned char id[5])
 {
-	int i, id;
+	int i, j, max_len = 0;
 	unsigned long flags;
+	unsigned char data2[5];
 
 	parport_write_data(gc->pd->port, GC_PSX_CLOCK | GC_PSX_SELECT | GC_PSX_POWER);	/* Select pad */
-	udelay(gc_psx_delay * 2);
+	udelay(gc_psx_delay);
 	parport_write_data(gc->pd->port, GC_PSX_CLOCK | GC_PSX_POWER);			/* Deselect, begin command */
-	udelay(gc_psx_delay * 2);
+	udelay(gc_psx_delay);
 
 	local_irq_save(flags);
 
-	gc_psx_command(gc, 0x01);							/* Access pad */
-	id = gc_psx_command(gc, 0x42);							/* Get device id */
-	if (gc_psx_command(gc, 0) == 0x5a) {						/* Okay? */
-		for (i = 0; i < GC_PSX_LEN(id) * 2; i++)
-			data[i] = gc_psx_command(gc, 0);
-	} else id = 0;
+	gc_psx_command(gc, 0x01, data2);						/* Access pad */
+	gc_psx_command(gc, 0x42, id);							/* Get device ids */
+	gc_psx_command(gc, 0, data2);							/* Dump status */
+
+	for (i =0; i < 5; i++)								/* Find the longest pad */
+		if((gc_status_bit[i] & gc->pads[GC_PSX]) && (GC_PSX_LEN(id[i]) > max_len))
+			max_len = GC_PSX_LEN(id[i]);
+
+	for (i = 0; i < max_len * 2; i++) {						/* Read in all the data */
+		gc_psx_command(gc, 0, data2);
+		for (j = 0; j < 5; j++)
+			data[j][i] = data2[j];
+	}
 
 	local_irq_restore(flags);
 
 	parport_write_data(gc->pd->port, GC_PSX_CLOCK | GC_PSX_SELECT | GC_PSX_POWER);
 
-	return GC_PSX_ID(id);
+	for(i = 0; i < 5; i++)								/* Set id's to the real value */
+		id[i] = GC_PSX_ID(id[i]);
 }
 
 /*
@@ -316,6 +328,7 @@
 	struct gc *gc = (void *) private;
 	struct input_dev *dev = gc->dev;
 	unsigned char data[GC_MAX_LENGTH];
+	unsigned char data_psx[5][GC_PSX_LENGTH];
 	int i, j, s;
 
 /*
@@ -412,53 +425,72 @@
  * PSX controllers
  */
 
-	if (gc->pads[GC_PSX]) {
+	if (gc->pads[GC_PSX] || gc->pads[GC_DDR]) {
 
-		for (i = 0; i < 5; i++)
-	       		if (gc->pads[GC_PSX] & gc_status_bit[i])
-				break;
+		gc_psx_read_packet(gc, data_psx, data);
 
- 		switch (gc_psx_read_packet(gc, data)) {
+		for (i = 0; i < 5; i++) {
+	 		switch (data[i]) {
 
-			case GC_PSX_RUMBLE:
+				case GC_PSX_RUMBLE:
 
-				input_report_key(dev + i, BTN_THUMBL, ~data[0] & 0x04);
-				input_report_key(dev + i, BTN_THUMBR, ~data[0] & 0x02);
-				input_sync(dev + i);
+					input_report_key(dev + i, BTN_THUMBL, ~data_psx[i][0] & 0x04);
+					input_report_key(dev + i, BTN_THUMBR, ~data_psx[i][0] & 0x02);
 
-			case GC_PSX_NEGCON:
-			case GC_PSX_ANALOG:
+				case GC_PSX_NEGCON:
+				case GC_PSX_ANALOG:
 
-				for (j = 0; j < 4; j++)
-					input_report_abs(dev + i, gc_psx_abs[j], data[j + 2]);
+					if(gc->pads[GC_DDR] & gc_status_bit[i]) {
+						for(j = 0; j < 4; j++)
+							input_report_key(dev + i, gc_psx_ddr_btn[j], ~data_psx[i][0] & (0x10 << j));
+					} else {
+						for (j = 0; j < 4; j++)
+							input_report_abs(dev + i, gc_psx_abs[j+2], data_psx[i][j + 2]);
 
-				input_report_abs(dev + i, ABS_HAT0X, !(data[0] & 0x20) - !(data[0] & 0x80));
-				input_report_abs(dev + i, ABS_HAT0Y, !(data[0] & 0x40) - !(data[0] & 0x10));
+						input_report_abs(dev + i, ABS_X, 128 + !(data_psx[i][0] & 0x20) * 127 - !(data_psx[i][0] & 0x80) * 128);
+						input_report_abs(dev + i, ABS_Y, 128 + !(data_psx[i][0] & 0x40) * 127 - !(data_psx[i][0] & 0x10) * 128);
+					}
 
-				for (j = 0; j < 8; j++)
-					input_report_key(dev + i, gc_psx_btn[j], ~data[1] & (1 << j));
+					for (j = 0; j < 8; j++)
+						input_report_key(dev + i, gc_psx_btn[j], ~data_psx[i][1] & (1 << j));
 
-				input_report_key(dev + i, BTN_START,  ~data[0] & 0x08);
-				input_report_key(dev + i, BTN_SELECT, ~data[0] & 0x01);
+					input_report_key(dev + i, BTN_START,  ~data_psx[i][0] & 0x08);
+					input_report_key(dev + i, BTN_SELECT, ~data_psx[i][0] & 0x01);
 
-				input_sync(dev + i);
+					input_sync(dev + i);
 
-				break;
+					break;
 
-			case GC_PSX_NORMAL:
+				case GC_PSX_NORMAL:
+					if(gc->pads[GC_DDR] & gc_status_bit[i]) {
+						for(j = 0; j < 4; j++)
+							input_report_key(dev + i, gc_psx_ddr_btn[j], ~data_psx[i][0] & (0x10 << j));
+					} else {
+						input_report_abs(dev + i, ABS_X, 128 + !(data_psx[i][0] & 0x20) * 127 - !(data_psx[i][0] & 0x80) * 128);
+						input_report_abs(dev + i, ABS_Y, 128 + !(data_psx[i][0] & 0x40) * 127 - !(data_psx[i][0] & 0x10) * 128);
 
-				input_report_abs(dev + i, ABS_X, 128 + !(data[0] & 0x20) * 127 - !(data[0] & 0x80) * 128);
-				input_report_abs(dev + i, ABS_Y, 128 + !(data[0] & 0x40) * 127 - !(data[0] & 0x10) * 128);
+						/* for some reason if the extra axes are left unset they drift */
+						/* for (j = 0; j < 4; j++)
+							input_report_abs(dev + i, gc_psx_abs[j+2], 128);
+						 * This needs to be debugged properly,
+						 * maybe fuzz processing needs to be done in input_sync()
+						 *				 --vojtech
+						 */
+					}
 
-				for (j = 0; j < 8; j++)
-					input_report_key(dev + i, gc_psx_btn[j], ~data[1] & (1 << j));
+					for (j = 0; j < 8; j++)
+						input_report_key(dev + i, gc_psx_btn[j], ~data_psx[i][1] & (1 << j));
 
-				input_report_key(dev + i, BTN_START,  ~data[0] & 0x08);
-				input_report_key(dev + i, BTN_SELECT, ~data[0] & 0x01);
+					input_report_key(dev + i, BTN_START,  ~data_psx[i][0] & 0x08);
+					input_report_key(dev + i, BTN_SELECT, ~data_psx[i][0] & 0x01);
 
-				input_sync(dev + i);
+					input_sync(dev + i);
 
-				break;
+					break;
+
+				case 0: /* not a pad, ignore */
+					break;
+			}
 		}
 	}
 
@@ -490,8 +522,7 @@
 {
 	struct gc *gc;
 	struct parport *pp;
-	int i, j, psx;
-	unsigned char data[32];
+	int i, j;
 
 	if (config[0] < 0)
 		return NULL;
@@ -588,43 +619,22 @@
 				break;
 
 			case GC_PSX:
+			case GC_DDR:
+				if(config[i + 1] == GC_DDR) {
+					for (j = 0; j < 4; j++)
+						set_bit(gc_psx_ddr_btn[j], gc->dev[i].keybit);
+				} else {
+					for (j = 0; j < 6; j++) {
+						set_bit(gc_psx_abs[j], gc->dev[i].absbit);
+						gc->dev[i].absmin[gc_psx_abs[j]] = 4;
+						gc->dev[i].absmax[gc_psx_abs[j]] = 252;
+						gc->dev[i].absflat[gc_psx_abs[j]] = 2;
+					}
+				}
 
-				psx = gc_psx_read_packet(gc, data);
+				for (j = 0; j < 12; j++)
+					set_bit(gc_psx_btn[j], gc->dev[i].keybit);
 
-				switch(psx) {
-					case GC_PSX_NEGCON:
-					case GC_PSX_NORMAL:
-					case GC_PSX_ANALOG:
-					case GC_PSX_RUMBLE:
-
-						for (j = 0; j < 6; j++) {
-							psx = gc_psx_abs[j];
-							set_bit(psx, gc->dev[i].absbit);
-							if (j < 4) {
-								gc->dev[i].absmin[psx] = 4;
-								gc->dev[i].absmax[psx] = 252;
-								gc->dev[i].absflat[psx] = 2;
-							} else {
-								gc->dev[i].absmin[psx] = -1;
-								gc->dev[i].absmax[psx] = 1;
-							}
-						}
-
-						for (j = 0; j < 12; j++)
-							set_bit(gc_psx_btn[j], gc->dev[i].keybit);
-
-						break;
-
-					case 0:
-						gc->pads[GC_PSX] &= ~gc_status_bit[i];
-						printk(KERN_ERR "gamecon.c: No PSX controller found.\n");
-						break;
-
-					default:
-						gc->pads[GC_PSX] &= ~gc_status_bit[i];
-						printk(KERN_WARNING "gamecon.c: Unsupported PSX controller %#x,"
-							" please report to <vojtech@ucw.cz>.\n", psx);
-				}
 				break;
 		}
 
--- diff/drivers/input/joystick/iforce/iforce-main.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/iforce/iforce-main.c	2004-07-01 21:32:36.000000000 +0100
@@ -524,7 +524,7 @@
 	usb_register(&iforce_usb_driver);
 #endif
 #ifdef CONFIG_JOYSTICK_IFORCE_232
-	serio_register_device(&iforce_serio_dev);
+	serio_register_driver(&iforce_serio_drv);
 #endif
 	return 0;
 }
@@ -535,7 +535,7 @@
 	usb_deregister(&iforce_usb_driver);
 #endif
 #ifdef CONFIG_JOYSTICK_IFORCE_232
-	serio_unregister_device(&iforce_serio_dev);
+	serio_unregister_driver(&iforce_serio_drv);
 #endif
 }
 
--- diff/drivers/input/joystick/iforce/iforce-serio.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/iforce/iforce-serio.c	2004-07-01 21:32:36.000000000 +0100
@@ -124,7 +124,7 @@
 	return IRQ_HANDLED;
 }
 
-static void iforce_serio_connect(struct serio *serio, struct serio_dev *dev)
+static void iforce_serio_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct iforce *iforce;
 	if (serio->type != (SERIO_RS232 | SERIO_IFORCE))
@@ -137,7 +137,7 @@
 	iforce->serio = serio;
 	serio->private = iforce;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(iforce);
 		return;
 	}
@@ -158,9 +158,13 @@
 	kfree(iforce);
 }
 
-struct serio_dev iforce_serio_dev = {
-	.write_wakeup =	iforce_serio_write_wakeup,
-	.interrupt =	iforce_serio_irq,
-	.connect =	iforce_serio_connect,
-	.disconnect =	iforce_serio_disconnect,
+struct serio_driver iforce_serio_drv = {
+	.driver		= {
+		.name	= "iforce",
+	},
+	.description	= "RS232 I-Force joysticks and wheels driver",
+	.write_wakeup	= iforce_serio_write_wakeup,
+	.interrupt	= iforce_serio_irq,
+	.connect	= iforce_serio_connect,
+	.disconnect	= iforce_serio_disconnect,
 };
--- diff/drivers/input/joystick/iforce/iforce.h	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/iforce/iforce.h	2004-07-01 21:32:36.000000000 +0100
@@ -187,5 +187,5 @@
 int iforce_upload_condition(struct iforce*, struct ff_effect*, int is_update);
 
 /* Public variables */
-extern struct serio_dev iforce_serio_dev;
+extern struct serio_driver iforce_serio_drv;
 extern struct usb_driver iforce_usb_driver;
--- diff/drivers/input/joystick/magellan.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/magellan.c	2004-07-01 21:32:36.000000000 +0100
@@ -35,8 +35,10 @@
 #include <linux/serio.h>
 #include <linux/init.h>
 
+#define DRIVER_DESC	"Magellan and SpaceMouse 6dof controller driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("Magellan and SpaceMouse 6dof controller driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 /*
@@ -146,7 +148,7 @@
  * it as an input device.
  */
 
-static void magellan_connect(struct serio *serio, struct serio_dev *dev)
+static void magellan_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct magellan *magellan;
 	int i, t;
@@ -184,7 +186,7 @@
 
 	serio->private = magellan;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(magellan);
 		return;
 	}
@@ -199,10 +201,14 @@
  * The serio device structure.
  */
 
-static struct serio_dev magellan_dev = {
-	.interrupt =	magellan_interrupt,
-	.connect =	magellan_connect,
-	.disconnect =	magellan_disconnect,
+static struct serio_driver magellan_drv = {
+	.driver		= {
+		.name	= "magellan",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= magellan_interrupt,
+	.connect	= magellan_connect,
+	.disconnect	= magellan_disconnect,
 };
 
 /*
@@ -211,13 +217,13 @@
 
 int __init magellan_init(void)
 {
-	serio_register_device(&magellan_dev);
+	serio_register_driver(&magellan_drv);
 	return 0;
 }
 
 void __exit magellan_exit(void)
 {
-	serio_unregister_device(&magellan_dev);
+	serio_unregister_driver(&magellan_drv);
 }
 
 module_init(magellan_init);
--- diff/drivers/input/joystick/spaceball.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/spaceball.c	2004-07-01 21:32:36.000000000 +0100
@@ -39,8 +39,10 @@
 #include <linux/input.h>
 #include <linux/serio.h>
 
+#define DRIVER_DESC	"SpaceTec SpaceBall 2003/3003/4000 FLX driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("SpaceTec SpaceBall 2003/3003/4000 FLX driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 /*
@@ -201,7 +203,7 @@
  * it as an input device.
  */
 
-static void spaceball_connect(struct serio *serio, struct serio_dev *dev)
+static void spaceball_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct spaceball *spaceball;
 	int i, t, id;
@@ -254,7 +256,7 @@
 
 	serio->private = spaceball;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(spaceball);
 		return;
 	}
@@ -269,10 +271,14 @@
  * The serio device structure.
  */
 
-static struct serio_dev spaceball_dev = {
-	.interrupt =	spaceball_interrupt,
-	.connect =	spaceball_connect,
-	.disconnect =	spaceball_disconnect,
+static struct serio_driver spaceball_drv = {
+	.driver		= {
+		.name	= "spaceball",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= spaceball_interrupt,
+	.connect	= spaceball_connect,
+	.disconnect	= spaceball_disconnect,
 };
 
 /*
@@ -281,13 +287,13 @@
 
 int __init spaceball_init(void)
 {
-	serio_register_device(&spaceball_dev);
+	serio_register_driver(&spaceball_drv);
 	return 0;
 }
 
 void __exit spaceball_exit(void)
 {
-	serio_unregister_device(&spaceball_dev);
+	serio_unregister_driver(&spaceball_drv);
 }
 
 module_init(spaceball_init);
--- diff/drivers/input/joystick/spaceorb.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/spaceorb.c	2004-07-01 21:32:36.000000000 +0100
@@ -38,8 +38,10 @@
 #include <linux/input.h>
 #include <linux/serio.h>
 
+#define DRIVER_DESC	"SpaceTec SpaceOrb 360 and Avenger 6dof controller driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("SpaceTec SpaceOrb 360 and Avenger 6dof controller driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 /*
@@ -162,7 +164,7 @@
  * it as an input device.
  */
 
-static void spaceorb_connect(struct serio *serio, struct serio_dev *dev)
+static void spaceorb_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct spaceorb *spaceorb;
 	int i, t;
@@ -201,7 +203,7 @@
 
 	serio->private = spaceorb;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(spaceorb);
 		return;
 	}
@@ -213,10 +215,14 @@
  * The serio device structure.
  */
 
-static struct serio_dev spaceorb_dev = {
-	.interrupt =	spaceorb_interrupt,
-	.connect =	spaceorb_connect,
-	.disconnect =	spaceorb_disconnect,
+static struct serio_driver spaceorb_drv = {
+	.driver		= {
+		.name	= "spaceorb",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= spaceorb_interrupt,
+	.connect	= spaceorb_connect,
+	.disconnect	= spaceorb_disconnect,
 };
 
 /*
@@ -225,13 +231,13 @@
 
 int __init spaceorb_init(void)
 {
-	serio_register_device(&spaceorb_dev);
+	serio_register_driver(&spaceorb_drv);
 	return 0;
 }
 
 void __exit spaceorb_exit(void)
 {
-	serio_unregister_device(&spaceorb_dev);
+	serio_unregister_driver(&spaceorb_drv);
 }
 
 module_init(spaceorb_init);
--- diff/drivers/input/joystick/stinger.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/stinger.c	2004-07-01 21:32:36.000000000 +0100
@@ -36,8 +36,10 @@
 #include <linux/serio.h>
 #include <linux/init.h>
 
+#define DRIVER_DESC	"Gravis Stinger gamepad driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("Gravis Stinger gamepad driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 /*
@@ -134,7 +136,7 @@
  * it as an input device.
  */
 
-static void stinger_connect(struct serio *serio, struct serio_dev *dev)
+static void stinger_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct stinger *stinger;
 	int i;
@@ -172,7 +174,7 @@
 	stinger->dev.private = stinger;
 	serio->private = stinger;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(stinger);
 		return;
 	}
@@ -187,10 +189,14 @@
  * The serio device structure.
  */
 
-static struct serio_dev stinger_dev = {
-	.interrupt =	stinger_interrupt,
-	.connect =	stinger_connect,
-	.disconnect =	stinger_disconnect,
+static struct serio_driver stinger_drv = {
+	.driver		= {
+		.name	= "stinger",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= stinger_interrupt,
+	.connect	= stinger_connect,
+	.disconnect	= stinger_disconnect,
 };
 
 /*
@@ -199,13 +205,13 @@
 
 int __init stinger_init(void)
 {
-	serio_register_device(&stinger_dev);
+	serio_register_driver(&stinger_drv);
 	return 0;
 }
 
 void __exit stinger_exit(void)
 {
-	serio_unregister_device(&stinger_dev);
+	serio_unregister_driver(&stinger_drv);
 }
 
 module_init(stinger_init);
--- diff/drivers/input/joystick/twidjoy.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/twidjoy.c	2004-07-01 21:32:36.000000000 +0100
@@ -187,7 +187,7 @@
  * it as an input device.
  */
 
-static void twidjoy_connect(struct serio *serio, struct serio_dev *dev)
+static void twidjoy_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct twidjoy_button_spec *bp;
 	struct twidjoy *twidjoy;
@@ -232,7 +232,7 @@
 	twidjoy->dev.private = twidjoy;
 	serio->private = twidjoy;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(twidjoy);
 		return;
 	}
@@ -246,10 +246,14 @@
  * The serio device structure.
  */
 
-static struct serio_dev twidjoy_dev = {
-	.interrupt =	twidjoy_interrupt,
-	.connect =	twidjoy_connect,
-	.disconnect =	twidjoy_disconnect,
+static struct serio_driver twidjoy_drv = {
+	.driver		= {
+		.name	= "twidjoy",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= twidjoy_interrupt,
+	.connect	= twidjoy_connect,
+	.disconnect	= twidjoy_disconnect,
 };
 
 /*
@@ -258,13 +262,13 @@
 
 int __init twidjoy_init(void)
 {
-	serio_register_device(&twidjoy_dev);
+	serio_register_driver(&twidjoy_drv);
 	return 0;
 }
 
 void __exit twidjoy_exit(void)
 {
-	serio_unregister_device(&twidjoy_dev);
+	serio_unregister_driver(&twidjoy_drv);
 }
 
 module_init(twidjoy_init);
--- diff/drivers/input/joystick/warrior.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/joystick/warrior.c	2004-07-01 21:32:36.000000000 +0100
@@ -35,8 +35,10 @@
 #include <linux/serio.h>
 #include <linux/init.h>
 
+#define DRIVER_DESC	"Logitech WingMan Warrior joystick driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("Logitech WingMan Warrior joystick driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 /*
@@ -139,7 +141,7 @@
  * it as an input device.
  */
 
-static void warrior_connect(struct serio *serio, struct serio_dev *dev)
+static void warrior_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct warrior *warrior;
 	int i;
@@ -185,7 +187,7 @@
 
 	serio->private = warrior;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(warrior);
 		return;
 	}
@@ -199,10 +201,14 @@
  * The serio device structure.
  */
 
-static struct serio_dev warrior_dev = {
-	.interrupt =	warrior_interrupt,
-	.connect =	warrior_connect,
-	.disconnect =	warrior_disconnect,
+static struct serio_driver warrior_drv = {
+	.driver		= {
+		.name	= "warrior",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= warrior_interrupt,
+	.connect	= warrior_connect,
+	.disconnect	= warrior_disconnect,
 };
 
 /*
@@ -211,13 +217,13 @@
 
 int __init warrior_init(void)
 {
-	serio_register_device(&warrior_dev);
+	serio_register_driver(&warrior_drv);
 	return 0;
 }
 
 void __exit warrior_exit(void)
 {
-	serio_unregister_device(&warrior_dev);
+	serio_unregister_driver(&warrior_drv);
 }
 
 module_init(warrior_init);
--- diff/drivers/input/keyboard/Kconfig	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/keyboard/Kconfig	2004-07-01 21:32:36.000000000 +0100
@@ -96,15 +96,3 @@
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called amikbd.
-
-config KEYBOARD_98KBD
-	tristate "NEC PC-9800 Keyboard support"
-	depends on X86_PC9800 && INPUT && INPUT_KEYBOARD
-	select SERIO
-	help
-	  Say Y here if you want to use the NEC PC-9801/PC-9821 keyboard (or
-	  compatible) on your system.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called 98kbd.
-
--- diff/drivers/input/keyboard/atkbd.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/keyboard/atkbd.c	2004-07-01 21:32:36.000000000 +0100
@@ -27,8 +27,10 @@
 #include <linux/serio.h>
 #include <linux/workqueue.h>
 
+#define DRIVER_DESC	"AT and PS/2 keyboard driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
-MODULE_DESCRIPTION("AT and PS/2 keyboard driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 static int atkbd_set = 2;
@@ -47,6 +49,10 @@
 module_param_named(softrepeat, atkbd_softrepeat, bool, 0);
 MODULE_PARM_DESC(softrepeat, "Use software keyboard repeat");
 
+static int atkbd_softraw = 1;
+module_param_named(softraw, atkbd_softraw, bool, 0);
+MODULE_PARM_DESC(softraw, "Use software generated rawmode");
+
 static int atkbd_scroll;
 module_param_named(scroll, atkbd_scroll, bool, 0);
 MODULE_PARM_DESC(scroll, "Enable scroll-wheel on MS Office and similar keyboards");
@@ -164,34 +170,48 @@
 	{ ATKBD_SCR_CLICK, 0x60 },
 };
 
+#define ATKBD_FLAG_ACK		0	/* Waiting for ACK/NAK */
+#define ATKBD_FLAG_CMD		1	/* Waiting for command to finish */
+#define ATKBD_FLAG_CMD1		2	/* First byte of command response */
+#define ATKBD_FLAG_ID		3	/* First byte is not keyboard ID */
+#define ATKBD_FLAG_ENABLED	4	/* Waining for init to finish */
+
 /*
  * The atkbd control structure
  */
 
 struct atkbd {
-	unsigned char keycode[512];
-	struct input_dev dev;
-	struct serio *serio;
 
+	/* Written only during init */
 	char name[64];
 	char phys[32];
-	unsigned short id;
+	struct serio *serio;
+	struct input_dev dev;
+
 	unsigned char set;
-	unsigned int translated:1;
-	unsigned int extra:1;
-	unsigned int write:1;
+	unsigned short id;
+	unsigned char keycode[512];
+	unsigned char translated;
+	unsigned char extra;
+	unsigned char write;
+
+	/* Protected by FLAG_ACK */
+	unsigned char nak;
 
+	/* Protected by FLAG_CMD */
 	unsigned char cmdbuf[4];
 	unsigned char cmdcnt;
-	volatile signed char ack;
-	unsigned char emul;
-	unsigned int resend:1;
-	unsigned int release:1;
-	unsigned int bat_xl:1;
-	unsigned int enabled:1;
 
+	/* Accessed only from interrupt */
+	unsigned char emul;
+	unsigned char resend;
+	unsigned char release;
+	unsigned char bat_xl;
 	unsigned int last;
 	unsigned long time;
+
+	/* Flags */
+	unsigned long flags;
 };
 
 static void atkbd_report_key(struct input_dev *dev, struct pt_regs *regs, int code, int value)
@@ -224,7 +244,7 @@
 
 #if !defined(__i386__) && !defined (__x86_64__)
 	if ((flags & (SERIO_FRAME | SERIO_PARITY)) && (~flags & SERIO_TIMEOUT) && !atkbd->resend && atkbd->write) {
-		printk("atkbd.c: frame/parity error: %02x\n", flags);
+		printk(KERN_WARNING "atkbd.c: frame/parity error: %02x\n", flags);
 		serio_write(serio, ATKBD_CMD_RESEND);
 		atkbd->resend = 1;
 		goto out;
@@ -234,24 +254,45 @@
 		atkbd->resend = 0;
 #endif
 
-	if (!atkbd->ack)
+	if (test_bit(ATKBD_FLAG_ACK, &atkbd->flags))
 		switch (code) {
 			case ATKBD_RET_ACK:
-				atkbd->ack = 1;
+				atkbd->nak = 0;
+				if (atkbd->cmdcnt) {
+					set_bit(ATKBD_FLAG_CMD, &atkbd->flags);
+					set_bit(ATKBD_FLAG_CMD1, &atkbd->flags);
+					set_bit(ATKBD_FLAG_ID, &atkbd->flags);
+				}
+				clear_bit(ATKBD_FLAG_ACK, &atkbd->flags);
 				goto out;
 			case ATKBD_RET_NAK:
-				atkbd->ack = -1;
+				atkbd->nak = 1;
+				clear_bit(ATKBD_FLAG_ACK, &atkbd->flags);
 				goto out;
 		}
 
-	if (atkbd->cmdcnt) {
-		atkbd->cmdbuf[--atkbd->cmdcnt] = code;
+	if (test_bit(ATKBD_FLAG_CMD, &atkbd->flags)) {
+
+		atkbd->cmdcnt--;
+		atkbd->cmdbuf[atkbd->cmdcnt] = code;
+
+		if (atkbd->cmdcnt == 1) {
+		    	if (code != 0xab && code != 0xac)
+				clear_bit(ATKBD_FLAG_ID, &atkbd->flags);
+			clear_bit(ATKBD_FLAG_CMD1, &atkbd->flags);
+		}
+
+		if (!atkbd->cmdcnt)
+			clear_bit(ATKBD_FLAG_CMD, &atkbd->flags);
+
 		goto out;
 	}
 
-	if (!atkbd->enabled)
+	if (!test_bit(ATKBD_FLAG_ENABLED, &atkbd->flags))
 		goto out;
 
+	input_event(&atkbd->dev, EV_MSC, MSC_RAW, code);
+
 	if (atkbd->translated) {
 
 		if (atkbd->emul ||
@@ -270,6 +311,7 @@
 
 	switch (code) {
 		case ATKBD_RET_BAT:
+			clear_bit(ATKBD_FLAG_ENABLED, &atkbd->flags);
 			serio_rescan(atkbd->serio);
 			goto out;
 		case ATKBD_RET_EMUL0:
@@ -288,7 +330,7 @@
 			atkbd_report_key(&atkbd->dev, regs, KEY_HANJA, 3);
 			goto out;
 		case ATKBD_RET_ERR:
-			printk(KERN_WARNING "atkbd.c: Keyboard on %s reports too many keys pressed.\n", serio->phys);
+			printk(KERN_DEBUG "atkbd.c: Keyboard on %s reports too many keys pressed.\n", serio->phys);
 			goto out;
 	}
 
@@ -300,6 +342,9 @@
 		code |= (atkbd->set != 3) ? 0x80 : 0x100;
 	}
 
+	if (atkbd->keycode[code] != ATKBD_KEY_NULL)
+		input_event(&atkbd->dev, EV_MSC, MSC_SCAN, code);
+
 	switch (atkbd->keycode[code]) {
 		case ATKBD_KEY_NULL:
 			break;
@@ -376,18 +421,20 @@
 
 static int atkbd_sendbyte(struct atkbd *atkbd, unsigned char byte)
 {
-	int timeout = 20000; /* 200 msec */
-	atkbd->ack = 0;
+	int timeout = 200000; /* 200 msec */
 
 #ifdef ATKBD_DEBUG
 	printk(KERN_DEBUG "atkbd.c: Sent: %02x\n", byte);
 #endif
+
+	set_bit(ATKBD_FLAG_ACK, &atkbd->flags);
+	clear_bit(ATKBD_FLAG_CMD, &atkbd->flags);
 	if (serio_write(atkbd->serio, byte))
 		return -1;
+	while (test_bit(ATKBD_FLAG_ACK, &atkbd->flags) && timeout--) udelay(1);
+	clear_bit(ATKBD_FLAG_ACK, &atkbd->flags);
 
-	while (!atkbd->ack && timeout--) udelay(10);
-
-	return -(atkbd->ack <= 0);
+	return -atkbd->nak;
 }
 
 /*
@@ -405,7 +452,7 @@
 	atkbd->cmdcnt = receive;
 
 	if (command == ATKBD_CMD_RESET_BAT)
-		timeout = 2000000; /* 2 sec */
+		timeout = 4000000; /* 4 sec */
 
 	if (receive && param)
 		for (i = 0; i < receive; i++)
@@ -413,38 +460,40 @@
 
 	if (command & 0xff)
 		if (atkbd_sendbyte(atkbd, command & 0xff))
-			return (atkbd->cmdcnt = 0) - 1;
+			return -1;
 
 	for (i = 0; i < send; i++)
 		if (atkbd_sendbyte(atkbd, param[i]))
-			return (atkbd->cmdcnt = 0) - 1;
-
-	while (atkbd->cmdcnt && timeout--) {
+			return -1;
 
-		if (atkbd->cmdcnt == 1 &&
-		    command == ATKBD_CMD_RESET_BAT && timeout > 100000)
-			timeout = 100000;
+	while (test_bit(ATKBD_FLAG_CMD, &atkbd->flags) && timeout--) {
 
-		if (atkbd->cmdcnt == 1 && command == ATKBD_CMD_GETID &&
-		    atkbd->cmdbuf[1] != 0xab && atkbd->cmdbuf[1] != 0xac) {
-			atkbd->cmdcnt = 0;
-			break;
+		if (!test_bit(ATKBD_FLAG_CMD1, &atkbd->flags)) {
+		    
+			if (command == ATKBD_CMD_RESET_BAT && timeout > 100000)
+				timeout = 100000;
+
+			if (command == ATKBD_CMD_GETID && !test_bit(ATKBD_FLAG_ID, &atkbd->flags)) {
+				clear_bit(ATKBD_FLAG_CMD, &atkbd->flags);
+				atkbd->cmdcnt = 0;
+				break;
+			}
 		}
 
 		udelay(1);
 	}
 
+	clear_bit(ATKBD_FLAG_CMD, &atkbd->flags);
+
 	if (param)
 		for (i = 0; i < receive; i++)
 			param[i] = atkbd->cmdbuf[(receive - 1) - i];
 
 	if (command == ATKBD_CMD_RESET_BAT && atkbd->cmdcnt == 1)
-		atkbd->cmdcnt = 0;
+		return 0;
 
-	if (atkbd->cmdcnt) {
-		atkbd->cmdcnt = 0;
+	if (atkbd->cmdcnt)
 		return -1;
-	}
 
 	return 0;
 }
@@ -672,6 +721,7 @@
 static void atkbd_disconnect(struct serio *serio)
 {
 	struct atkbd *atkbd = serio->private;
+	clear_bit(ATKBD_FLAG_ENABLED, &atkbd->flags);
 	input_unregister_device(&atkbd->dev);
 	serio_close(serio);
 	kfree(atkbd);
@@ -684,7 +734,7 @@
  * to the input module.
  */
 
-static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
+static void atkbd_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct atkbd *atkbd;
 	int i;
@@ -709,17 +759,22 @@
 			return;
 	}
 
+	if (!atkbd->write)
+		atkbd_softrepeat = 1;
+	if (atkbd_softrepeat)
+		atkbd_softraw = 1;
+
 	if (atkbd->write) {
-		atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP);
+		atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP) | BIT(EV_MSC);
 		atkbd->dev.ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL);
-	} else  atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
+	} else  atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_MSC);
+	atkbd->dev.mscbit[0] = atkbd_softraw ? BIT(MSC_SCAN) : BIT(MSC_RAW) | BIT(MSC_SCAN);
 
 	if (!atkbd_softrepeat) {
 		atkbd->dev.rep[REP_DELAY] = 250;
 		atkbd->dev.rep[REP_PERIOD] = 33;
-	}
+	} else atkbd_softraw = 1;
 
-	atkbd->ack = 1;
 	atkbd->serio = serio;
 
 	init_input_dev(&atkbd->dev);
@@ -732,7 +787,7 @@
 
 	serio->private = atkbd;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(atkbd);
 		return;
 	}
@@ -754,8 +809,6 @@
 		atkbd->id = 0xab00;
 	}
 
-	atkbd->enabled = 1;
-
 	if (atkbd->extra) {
 		atkbd->dev.ledbit[0] |= BIT(LED_COMPOSE) | BIT(LED_SUSPEND) | BIT(LED_SLEEP) | BIT(LED_MUTE) | BIT(LED_MISC);
 		sprintf(atkbd->name, "AT Set 2 Extra keyboard");
@@ -797,6 +850,8 @@
 
 	input_register_device(&atkbd->dev);
 
+	set_bit(ATKBD_FLAG_ENABLED, &atkbd->flags);
+
 	printk(KERN_INFO "input: %s on %s\n", atkbd->name, serio->phys);
 }
 
@@ -808,10 +863,10 @@
 static int atkbd_reconnect(struct serio *serio)
 {
 	struct atkbd *atkbd = serio->private;
-	struct serio_dev *dev = serio->dev;
+	struct serio_driver *drv = serio->drv;
 	unsigned char param[1];
 
-	if (!dev) {
+	if (!drv) {
 		printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n");
 		return -1;
 	}
@@ -832,26 +887,32 @@
 			return -1;
 	}
 
+	set_bit(ATKBD_FLAG_ENABLED, &atkbd->flags);
+
 	return 0;
 }
 
-static struct serio_dev atkbd_dev = {
-	.interrupt =	atkbd_interrupt,
-	.connect =	atkbd_connect,
-	.reconnect = 	atkbd_reconnect,
-	.disconnect =	atkbd_disconnect,
-	.cleanup =	atkbd_cleanup,
+static struct serio_driver atkbd_drv = {
+	.driver		= {
+		.name	= "atkbd",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= atkbd_interrupt,
+	.connect	= atkbd_connect,
+	.reconnect	= atkbd_reconnect,
+	.disconnect	= atkbd_disconnect,
+	.cleanup	= atkbd_cleanup,
 };
 
 int __init atkbd_init(void)
 {
-	serio_register_device(&atkbd_dev);
+	serio_register_driver(&atkbd_drv);
 	return 0;
 }
 
 void __exit atkbd_exit(void)
 {
-	serio_unregister_device(&atkbd_dev);
+	serio_unregister_driver(&atkbd_drv);
 }
 
 module_init(atkbd_init);
--- diff/drivers/input/keyboard/lkkbd.c	2004-05-19 22:11:43.000000000 +0100
+++ source/drivers/input/keyboard/lkkbd.c	2004-07-01 21:32:36.000000000 +0100
@@ -76,8 +76,10 @@
 #include <linux/serio.h>
 #include <linux/workqueue.h>
 
+#define DRIVER_DESC	"LK keyboard driver"
+
 MODULE_AUTHOR ("Jan-Benedict Glaw <jbglaw@lug-owl.de>");
-MODULE_DESCRIPTION ("LK keyboard driver");
+MODULE_DESCRIPTION (DRIVER_DESC);
 MODULE_LICENSE ("GPL");
 
 /*
@@ -622,7 +624,7 @@
  * lkkbd_connect() probes for a LK keyboard and fills the necessary structures.
  */
 static void
-lkkbd_connect (struct serio *serio, struct serio_dev *dev)
+lkkbd_connect (struct serio *serio, struct serio_driver *drv)
 {
 	struct lkkbd *lk;
 	int i;
@@ -665,7 +667,7 @@
 
 	serio->private = lk;
 
-	if (serio_open (serio, dev)) {
+	if (serio_open (serio, drv)) {
 		kfree (lk);
 		return;
 	}
@@ -703,10 +705,14 @@
 	kfree (lk);
 }
 
-static struct serio_dev lkkbd_dev = {
-	.connect = lkkbd_connect,
-	.disconnect = lkkbd_disconnect,
-	.interrupt = lkkbd_interrupt,
+static struct serio_driver lkkbd_drv = {
+	.driver		= {
+		.name	= "lkkbd",
+	},
+	.description	= DRIVER_DESC,
+	.connect	= lkkbd_connect,
+	.disconnect	= lkkbd_disconnect,
+	.interrupt	= lkkbd_interrupt,
 };
 
 /*
@@ -715,14 +721,14 @@
 int __init
 lkkbd_init (void)
 {
-	serio_register_device (&lkkbd_dev);
+	serio_register_driver(&lkkbd_drv);
 	return 0;
 }
 
 void __exit
 lkkbd_exit (void)
 {
-	serio_unregister_device (&lkkbd_dev);
+	serio_unregister_driver(&lkkbd_drv);
 }
 
 module_init (lkkbd_init);
--- diff/drivers/input/keyboard/newtonkbd.c	2004-05-19 22:11:43.000000000 +0100
+++ source/drivers/input/keyboard/newtonkbd.c	2004-07-01 21:32:36.000000000 +0100
@@ -32,8 +32,10 @@
 #include <linux/init.h>
 #include <linux/serio.h>
 
+#define DRIVER_DESC	"Newton keyboard driver"
+
 MODULE_AUTHOR("Justin Cormack <j.cormack@doc.ic.ac.uk>");
-MODULE_DESCRIPTION("Newton keyboard driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 #define NKBD_KEY	0x7f
@@ -82,7 +84,7 @@
 
 }
 
-void nkbd_connect(struct serio *serio, struct serio_dev *dev)
+void nkbd_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct nkbd *nkbd;
 	int i;
@@ -106,7 +108,7 @@
 	nkbd->dev.private = nkbd;
 	serio->private = nkbd;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(nkbd);
 		return;
 	}
@@ -138,21 +140,25 @@
 	kfree(nkbd);
 }
 
-struct serio_dev nkbd_dev = {
-	.interrupt =	nkbd_interrupt,
-	.connect =	nkbd_connect,
-	.disconnect =	nkbd_disconnect
+struct serio_driver nkbd_drv = {
+	.driver		= {
+		.name	= "newtonkbd",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= nkbd_interrupt,
+	.connect	= nkbd_connect,
+	.disconnect	= nkbd_disconnect,
 };
 
 int __init nkbd_init(void)
 {
-	serio_register_device(&nkbd_dev);
+	serio_register_driver(&nkbd_drv);
 	return 0;
 }
 
 void __exit nkbd_exit(void)
 {
-	serio_unregister_device(&nkbd_dev);
+	serio_unregister_driver(&nkbd_drv);
 }
 
 module_init(nkbd_init);
--- diff/drivers/input/keyboard/sunkbd.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/keyboard/sunkbd.c	2004-07-01 21:32:36.000000000 +0100
@@ -37,8 +37,10 @@
 #include <linux/serio.h>
 #include <linux/workqueue.h>
 
+#define DRIVER_DESC	"Sun keyboard driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("Sun keyboard driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 static unsigned char sunkbd_keycode[128] = {
@@ -221,7 +223,7 @@
  * sunkbd_connect() probes for a Sun keyboard and fills the necessary structures.
  */
 
-static void sunkbd_connect(struct serio *serio, struct serio_dev *dev)
+static void sunkbd_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct sunkbd *sunkbd;
 	int i;
@@ -257,7 +259,7 @@
 
 	serio->private = sunkbd;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(sunkbd);
 		return;
 	}
@@ -301,10 +303,14 @@
 	kfree(sunkbd);
 }
 
-static struct serio_dev sunkbd_dev = {
-	.interrupt =	sunkbd_interrupt,
-	.connect =	sunkbd_connect,
-	.disconnect =	sunkbd_disconnect
+static struct serio_driver sunkbd_drv = {
+	.driver		= {
+		.name	= "sunkbd",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= sunkbd_interrupt,
+	.connect	= sunkbd_connect,
+	.disconnect	= sunkbd_disconnect,
 };
 
 /*
@@ -313,13 +319,13 @@
 
 int __init sunkbd_init(void)
 {
-	serio_register_device(&sunkbd_dev);
+	serio_register_driver(&sunkbd_drv);
 	return 0;
 }
 
 void __exit sunkbd_exit(void)
 {
-	serio_unregister_device(&sunkbd_dev);
+	serio_unregister_driver(&sunkbd_drv);
 }
 
 module_init(sunkbd_init);
--- diff/drivers/input/keyboard/xtkbd.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/keyboard/xtkbd.c	2004-07-01 21:32:36.000000000 +0100
@@ -34,8 +34,10 @@
 #include <linux/init.h>
 #include <linux/serio.h>
 
+#define DRIVER_DESC	"XT keyboard driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("XT keyboard driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 #define XTKBD_EMUL0	0xe0
@@ -86,7 +88,7 @@
 	return IRQ_HANDLED;
 }
 
-void xtkbd_connect(struct serio *serio, struct serio_dev *dev)
+void xtkbd_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct xtkbd *xtkbd;
 	int i;
@@ -111,7 +113,7 @@
 
 	serio->private = xtkbd;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(xtkbd);
 		return;
 	}
@@ -143,21 +145,25 @@
 	kfree(xtkbd);
 }
 
-struct serio_dev xtkbd_dev = {
-	.interrupt =	xtkbd_interrupt,
-	.connect =	xtkbd_connect,
-	.disconnect =	xtkbd_disconnect
+struct serio_driver xtkbd_drv = {
+	.driver		= {
+		.name	= "xtkbd",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= xtkbd_interrupt,
+	.connect	= xtkbd_connect,
+	.disconnect	= xtkbd_disconnect,
 };
 
 int __init xtkbd_init(void)
 {
-	serio_register_device(&xtkbd_dev);
+	serio_register_driver(&xtkbd_drv);
 	return 0;
 }
 
 void __exit xtkbd_exit(void)
 {
-	serio_unregister_device(&xtkbd_dev);
+	serio_unregister_driver(&xtkbd_drv);
 }
 
 module_init(xtkbd_init);
--- diff/drivers/input/misc/Kconfig	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/misc/Kconfig	2004-07-01 21:32:36.000000000 +0100
@@ -40,10 +40,6 @@
 	tristate "M68k Beeper support"
 	depends on M68K && INPUT && INPUT_MISC
 
-config INPUT_98SPKR
-	tristate "PC-9800 Speaker support"
-	depends on X86_PC9800 && INPUT && INPUT_MISC
-
 config INPUT_UINPUT
 	tristate "User level driver support"
 	depends on INPUT && INPUT_MISC
--- diff/drivers/input/misc/uinput.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/misc/uinput.c	2004-07-01 21:32:36.000000000 +0100
@@ -166,7 +166,7 @@
 	return retval;
 }
 
-static int uinput_alloc_device(struct file *file, const char *buffer, size_t count)
+static int uinput_alloc_device(struct file *file, const char __user *buffer, size_t count)
 {
 	struct uinput_user_dev	*user_dev;
 	struct input_dev	*dev;
@@ -226,7 +226,7 @@
 	return retval;
 }
 
-static ssize_t uinput_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
+static ssize_t uinput_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
 {
 	struct uinput_device	*udev = file->private_data;
 
@@ -243,7 +243,7 @@
 	return count;
 }
 
-static ssize_t uinput_read(struct file *file, char *buffer, size_t count, loff_t *ppos)
+static ssize_t uinput_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
 {
 	struct uinput_device *udev = file->private_data;
 	int retval = 0;
@@ -279,6 +279,9 @@
 {
 	struct uinput_device *udev = file->private_data;
 
+	if (!test_bit(UIST_CREATED, &(udev->state)))
+		return 0;
+
 	poll_wait(file, &udev->waitq, wait);
 
 	if (udev->head != udev->tail)
--- diff/drivers/input/mouse/Kconfig	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/mouse/Kconfig	2004-07-01 21:32:36.000000000 +0100
@@ -30,8 +30,6 @@
 	  and a new verion of GPM at:
 		http://www.geocities.com/dt_or/gpm/gpm.html
 	  to take advantage of the advanced features of the touchpad.
-	  If you do not want install specialized drivers but want tapping
-	  working please use option psmouse.proto=imps.
 
 	  If unsure, say Y.
 
@@ -130,14 +128,3 @@
 	  described in the source file). This driver should, in theory,
 	  also work with the digitizer DEC produced, but it isn't tested
 	  with that (I don't have the hardware yet).
-
-config MOUSE_PC9800
-	tristate "NEC PC-9800 busmouse"
-	depends on X86_PC9800 && INPUT && INPUT_MOUSE && ISA
-	help
-	  Say Y here if you have NEC PC-9801/PC-9821 computer and want its
-	  native mouse supported.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called 98busmouse.
-
--- diff/drivers/input/mouse/Makefile	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/mouse/Makefile	2004-07-01 21:32:36.000000000 +0100
@@ -10,7 +10,6 @@
 obj-$(CONFIG_MOUSE_LOGIBM)	+= logibm.o
 obj-$(CONFIG_MOUSE_MAPLE)	+= maplemouse.o
 obj-$(CONFIG_MOUSE_PC110PAD)	+= pc110pad.o
-obj-$(CONFIG_MOUSE_PC9800)	+= 98busmouse.o
 obj-$(CONFIG_MOUSE_PS2)		+= psmouse.o
 obj-$(CONFIG_MOUSE_SERIAL)	+= sermouse.o
 obj-$(CONFIG_MOUSE_VSXXXAA)	+= vsxxxaa.o
--- diff/drivers/input/mouse/logips2pp.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/mouse/logips2pp.c	2004-07-01 21:32:36.000000000 +0100
@@ -277,7 +277,7 @@
 				protocol = PSMOUSE_PS2TPP;
 			}
 
-		} else if (get_model_info(model) != NULL) {
+		} else if (model_info != NULL) {
 
 			param[0] = param[1] = param[2] = 0;
 			ps2pp_cmd(psmouse, param, 0x39); /* Magic knock */
--- diff/drivers/input/mouse/psmouse-base.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/mouse/psmouse-base.c	2004-07-01 21:32:36.000000000 +0100
@@ -22,8 +22,10 @@
 #include "synaptics.h"
 #include "logips2pp.h"
 
+#define DRIVER_DESC	"PS/2 mouse driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
-MODULE_DESCRIPTION("PS/2 mouse driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 static char *psmouse_proto;
@@ -142,34 +144,45 @@
 			printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n",
 				flags & SERIO_TIMEOUT ? " timeout" : "",
 				flags & SERIO_PARITY ? " bad parity" : "");
-		if (psmouse->acking) {
-			psmouse->ack = -1;
-			psmouse->acking = 0;
-		}
-		psmouse->pktcnt = 0;
+		psmouse->nak = 1;
+		clear_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
+		clear_bit(PSMOUSE_FLAG_CMD,  &psmouse->flags);
 		goto out;
 	}
 
-	if (psmouse->acking) {
+	if (test_bit(PSMOUSE_FLAG_ACK, &psmouse->flags))
 		switch (data) {
 			case PSMOUSE_RET_ACK:
-				psmouse->ack = 1;
+				psmouse->nak = 0;
+				clear_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
+				goto out;
 				break;
 			case PSMOUSE_RET_NAK:
-				psmouse->ack = -1;
-				break;
+				psmouse->nak = 1;
+				clear_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
+				goto out;
 			default:
-				psmouse->ack = 1;	/* Workaround for mice which don't ACK the Get ID command */
-				if (psmouse->cmdcnt)
-					psmouse->cmdbuf[--psmouse->cmdcnt] = data;
-				break;
+				psmouse->nak = 0;	/* Workaround for mice which don't ACK the Get ID command */
+				clear_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
+				if (!test_bit(PSMOUSE_FLAG_CMD, &psmouse->flags))
+					goto out;
+
+		}
+
+	if (test_bit(PSMOUSE_FLAG_CMD, &psmouse->flags)) {
+
+		psmouse->cmdcnt--;
+		psmouse->cmdbuf[psmouse->cmdcnt] = data;
+
+		if (psmouse->cmdcnt == 1) {
+			if (data != 0xab && data != 0xac)
+				clear_bit(PSMOUSE_FLAG_ID, &psmouse->flags);
+			clear_bit(PSMOUSE_FLAG_CMD1, &psmouse->flags);
 		}
-		psmouse->acking = 0;
-		goto out;
-	}
 
-	if (psmouse->cmdcnt) {
-		psmouse->cmdbuf[--psmouse->cmdcnt] = data;
+		if (!psmouse->cmdcnt)
+			clear_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
+
 		goto out;
 	}
 
@@ -242,18 +255,15 @@
 
 static int psmouse_sendbyte(struct psmouse *psmouse, unsigned char byte)
 {
-	int timeout = 10000; /* 100 msec */
-	psmouse->ack = 0;
-	psmouse->acking = 1;
+	int timeout = 200000; /* 200 msec */
 
-	if (serio_write(psmouse->serio, byte)) {
-		psmouse->acking = 0;
+	set_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
+	if (serio_write(psmouse->serio, byte))
 		return -1;
-	}
+	while (test_bit(PSMOUSE_FLAG_ACK, &psmouse->flags) && timeout--) udelay(1);
+	clear_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
 
-	while (!psmouse->ack && timeout--) udelay(10);
-
-	return -(psmouse->ack <= 0);
+	return -psmouse->nak;
 }
 
 /*
@@ -271,46 +281,62 @@
 	psmouse->cmdcnt = receive;
 
 	if (command == PSMOUSE_CMD_RESET_BAT)
-                timeout = 4000000; /* 4 sec */
+		timeout = 4000000; /* 4 sec */
 
-	/* initialize cmdbuf with preset values from param */
-	if (receive)
-	   for (i = 0; i < receive; i++)
-		psmouse->cmdbuf[(receive - 1) - i] = param[i];
+	if (receive && param)
+		for (i = 0; i < receive; i++)
+			psmouse->cmdbuf[(receive - 1) - i] = param[i];
+
+	if (receive) {
+		set_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
+		set_bit(PSMOUSE_FLAG_CMD1, &psmouse->flags);
+		set_bit(PSMOUSE_FLAG_ID, &psmouse->flags);
+	}
 
 	if (command & 0xff)
-		if (psmouse_sendbyte(psmouse, command & 0xff))
-			return (psmouse->cmdcnt = 0) - 1;
+		if (psmouse_sendbyte(psmouse, command & 0xff)) {
+			clear_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
+			return -1;
+		}
 
 	for (i = 0; i < send; i++)
-		if (psmouse_sendbyte(psmouse, param[i]))
-			return (psmouse->cmdcnt = 0) - 1;
+		if (psmouse_sendbyte(psmouse, param[i])) {
+			clear_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
+			return -1;
+		}
 
-	while (psmouse->cmdcnt && timeout--) {
+	while (test_bit(PSMOUSE_FLAG_CMD, &psmouse->flags) && timeout--) {
 
-		if (psmouse->cmdcnt == 1 && command == PSMOUSE_CMD_RESET_BAT &&
-				timeout > 100000) /* do not run in a endless loop */
-			timeout = 100000; /* 1 sec */
-
-		if (psmouse->cmdcnt == 1 && command == PSMOUSE_CMD_GETID &&
-		    psmouse->cmdbuf[1] != 0xab && psmouse->cmdbuf[1] != 0xac) {
-			psmouse->cmdcnt = 0;
-			break;
+		if (!test_bit(PSMOUSE_FLAG_CMD1, &psmouse->flags)) {
+		    
+			if (command == PSMOUSE_CMD_RESET_BAT && timeout > 100000)
+				timeout = 100000;
+
+			if (command == PSMOUSE_CMD_GETID && !test_bit(PSMOUSE_FLAG_ID, &psmouse->flags)) {
+				clear_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
+				psmouse->cmdcnt = 0;
+				break;
+			}
 		}
 
 		udelay(1);
 	}
 
-	for (i = 0; i < receive; i++)
-		param[i] = psmouse->cmdbuf[(receive - 1) - i];
+	clear_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
+
+	if (param)
+		for (i = 0; i < receive; i++)
+			param[i] = psmouse->cmdbuf[(receive - 1) - i];
+
+	if (command == PSMOUSE_CMD_RESET_BAT && psmouse->cmdcnt == 1)
+		return 0;
 
 	if (psmouse->cmdcnt)
-		return (psmouse->cmdcnt = 0) - 1;
+		return -1;
 
 	return 0;
 }
 
-
 /*
  * psmouse_sliced_command() sends an extended PS/2 command to the mouse
  * using sliced syntax, understood by advanced devices, such as Logitech
@@ -394,6 +420,8 @@
 {
 	unsigned char param[2];
 
+	intellimouse_detect(psmouse);
+
 	param[0] = 200;
 	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
 	param[0] = 200;
@@ -598,6 +626,23 @@
 }
 
 /*
+ * psmouse_set_state() sets new psmouse state and resets all flags and
+ * counters while holding serio lock so fighting with interrupt handler
+ * is not a concern.
+ */
+
+static void psmouse_set_state(struct psmouse *psmouse, unsigned char new_state)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&psmouse->serio->lock, flags);
+	psmouse->state = new_state;
+	psmouse->pktcnt = psmouse->cmdcnt = psmouse->out_of_sync = 0;
+	psmouse->flags = 0;
+	spin_unlock_irqrestore(&psmouse->serio->lock, flags);
+}
+
+/*
  * psmouse_activate() enables the mouse so that we get motion reports from it.
  */
 
@@ -606,7 +651,7 @@
 	if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_ENABLE))
 		printk(KERN_WARNING "psmouse.c: Failed to enable mouse on %s\n", psmouse->serio->phys);
 
-	psmouse->state = PSMOUSE_ACTIVATED;
+	psmouse_set_state(psmouse, PSMOUSE_ACTIVATED);
 }
 
 /*
@@ -626,22 +671,21 @@
 
 static void psmouse_disconnect(struct serio *serio)
 {
-	struct psmouse *psmouse = serio->private;
+	struct psmouse *psmouse, *parent;
 
-	psmouse->state = PSMOUSE_CMD_MODE;
+	psmouse = serio->private;
+	psmouse_set_state(psmouse, PSMOUSE_CMD_MODE);
 
-	if (psmouse->ptport) {
-		if (psmouse->ptport->deactivate)
-			psmouse->ptport->deactivate(psmouse);
-		__serio_unregister_port(&psmouse->ptport->serio); /* we have serio_sem */
-		kfree(psmouse->ptport);
-		psmouse->ptport = NULL;
+	if (serio->parent && (serio->type & SERIO_TYPE) == SERIO_PS_PSTHRU) {
+		parent = serio->parent->private;
+		if (parent->pt_deactivate)
+			parent->pt_deactivate(parent);
 	}
 
 	if (psmouse->disconnect)
 		psmouse->disconnect(psmouse);
 
-	psmouse->state = PSMOUSE_IGNORE;
+	psmouse_set_state(psmouse, PSMOUSE_IGNORE);
 
 	input_unregister_device(&psmouse->dev);
 	serio_close(serio);
@@ -652,16 +696,19 @@
  * psmouse_connect() is a callback from the serio module when
  * an unhandled serio port is found.
  */
-static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
+static void psmouse_connect(struct serio *serio, struct serio_driver *drv)
 {
-	struct psmouse *psmouse;
+	struct psmouse *psmouse, *parent = NULL;
 
 	if ((serio->type & SERIO_TYPE) != SERIO_8042 &&
 	    (serio->type & SERIO_TYPE) != SERIO_PS_PSTHRU)
 		return;
 
+	if (serio->parent && (serio->type & SERIO_TYPE) == SERIO_PS_PSTHRU)
+		parent = serio->parent->private;
+
 	if (!(psmouse = kmalloc(sizeof(struct psmouse), GFP_KERNEL)))
-		return;
+		goto out;
 
 	memset(psmouse, 0, sizeof(struct psmouse));
 
@@ -669,22 +716,22 @@
 	psmouse->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
 	psmouse->dev.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
 	psmouse->dev.relbit[0] = BIT(REL_X) | BIT(REL_Y);
-	psmouse->state = PSMOUSE_CMD_MODE;
 	psmouse->serio = serio;
 	psmouse->dev.private = psmouse;
+	psmouse_set_state(psmouse, PSMOUSE_CMD_MODE);
 
 	serio->private = psmouse;
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(psmouse);
 		serio->private = NULL;
-		return;
+		goto out;
 	}
 
 	if (psmouse_probe(psmouse) < 0) {
 		serio_close(serio);
 		kfree(psmouse);
 		serio->private = NULL;
-		return;
+		goto out;
 	}
 
 	psmouse->type = psmouse_extensions(psmouse, psmouse_max_proto, 1);
@@ -713,29 +760,45 @@
 
 	psmouse_initialize(psmouse);
 
-	if (psmouse->ptport) {
-		printk(KERN_INFO "serio: %s port at %s\n", psmouse->ptport->serio.name, psmouse->phys);
-		__serio_register_port(&psmouse->ptport->serio); /* we have serio_sem */
-		if (psmouse->ptport->activate)
-			psmouse->ptport->activate(psmouse);
-	}
+	if (parent && parent->pt_activate)
+		parent->pt_activate(parent);
+
+	/*
+	 * OK, the device is ready, we just need to activate it (turn the
+	 * stream mode on). But if mouse has a pass-through port we don't
+	 * want to do it yet to not disturb child detection.
+	 * The child will activate this port when it's ready.
+	 */
+
+	if (serio->child) {
+		/*
+		 * Nothing to be done here, serio core will detect that
+		 * the driver set serio->child and will register it for us.
+		 */
+		printk(KERN_INFO "serio: %s port at %s\n", serio->child->name, psmouse->phys);
+	} else
+		psmouse_activate(psmouse);
 
-	psmouse_activate(psmouse);
+out:
+	/* If this is a pass-through port the parent awaits to be activated */
+	if (parent)
+		psmouse_activate(parent);
 }
 
 
 static int psmouse_reconnect(struct serio *serio)
 {
 	struct psmouse *psmouse = serio->private;
-	struct serio_dev *dev = serio->dev;
+	struct psmouse *parent = NULL;
+	struct serio_driver *drv = serio->drv;
 
-	if (!dev || !psmouse) {
+	if (!drv || !psmouse) {
 		printk(KERN_DEBUG "psmouse: reconnect request, but serio is disconnected, ignoring...\n");
 		return -1;
 	}
 
-	psmouse->state = PSMOUSE_CMD_MODE;
-	psmouse->acking = psmouse->cmdcnt = psmouse->pktcnt = psmouse->out_of_sync = 0;
+	psmouse_set_state(psmouse, PSMOUSE_CMD_MODE);
+
 	if (psmouse->reconnect) {
 	       if (psmouse->reconnect(psmouse))
 			return -1;
@@ -748,26 +811,33 @@
 	 */
 	psmouse_initialize(psmouse);
 
-	if (psmouse->ptport) {
-       		if (psmouse_reconnect(&psmouse->ptport->serio)) {
-			__serio_unregister_port(&psmouse->ptport->serio);
-			__serio_register_port(&psmouse->ptport->serio);
-			if (psmouse->ptport->activate)
-				psmouse->ptport->activate(psmouse);
-		}
-	}
+	if (serio->parent && (serio->type & SERIO_TYPE) == SERIO_PS_PSTHRU)
+		parent = serio->parent->private;
+
+	if (parent && parent->pt_activate)
+		parent->pt_activate(parent);
+
+	if (!serio->child)
+		psmouse_activate(psmouse);
+
+	/* If this is a pass-through port the parent waits to be activated */
+	if (parent)
+		psmouse_activate(parent);
 
-	psmouse_activate(psmouse);
 	return 0;
 }
 
 
-static struct serio_dev psmouse_dev = {
-	.interrupt =	psmouse_interrupt,
-	.connect =	psmouse_connect,
-	.reconnect =	psmouse_reconnect,
-	.disconnect =	psmouse_disconnect,
-	.cleanup =	psmouse_cleanup,
+static struct serio_driver psmouse_drv = {
+	.driver		= {
+		.name	= "psmouse",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= psmouse_interrupt,
+	.connect	= psmouse_connect,
+	.reconnect	= psmouse_reconnect,
+	.disconnect	= psmouse_disconnect,
+	.cleanup	= psmouse_cleanup,
 };
 
 static inline void psmouse_parse_proto(void)
@@ -787,13 +857,13 @@
 int __init psmouse_init(void)
 {
 	psmouse_parse_proto();
-	serio_register_device(&psmouse_dev);
+	serio_register_driver(&psmouse_drv);
 	return 0;
 }
 
 void __exit psmouse_exit(void)
 {
-	serio_unregister_device(&psmouse_dev);
+	serio_unregister_driver(&psmouse_drv);
 }
 
 module_init(psmouse_init);
--- diff/drivers/input/mouse/psmouse.h	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/mouse/psmouse.h	2004-07-01 21:32:36.000000000 +0100
@@ -22,6 +22,11 @@
 #define PSMOUSE_ACTIVATED	1
 #define PSMOUSE_IGNORE		2
 
+#define PSMOUSE_FLAG_ACK	0	/* Waiting for ACK/NAK */
+#define PSMOUSE_FLAG_CMD	1	/* Waiting for command to finish */
+#define PSMOUSE_FLAG_CMD1	2	/* First byte of command response */
+#define PSMOUSE_FLAG_ID		3	/* First byte is not keyboard ID */
+
 /* psmouse protocol handler return codes */
 typedef enum {
 	PSMOUSE_BAD_DATA,
@@ -29,20 +34,10 @@
 	PSMOUSE_FULL_PACKET
 } psmouse_ret_t;
 
-struct psmouse;
-
-struct psmouse_ptport {
-	struct serio serio;
-
-	void (*activate)(struct psmouse *parent);
-	void (*deactivate)(struct psmouse *parent);
-};
-
 struct psmouse {
 	void *private;
 	struct input_dev dev;
 	struct serio *serio;
-	struct psmouse_ptport *ptport;
 	char *vendor;
 	char *name;
 	unsigned char cmdbuf[8];
@@ -54,15 +49,18 @@
 	unsigned long last;
 	unsigned long out_of_sync;
 	unsigned char state;
-	char acking;
-	volatile char ack;
+	unsigned char nak;
 	char error;
 	char devname[64];
 	char phys[32];
+	unsigned long flags;
 
-	psmouse_ret_t (*protocol_handler)(struct psmouse *psmouse, struct pt_regs *regs); 
+	psmouse_ret_t (*protocol_handler)(struct psmouse *psmouse, struct pt_regs *regs);
 	int (*reconnect)(struct psmouse *psmouse);
 	void (*disconnect)(struct psmouse *psmouse);
+
+	void (*pt_activate)(struct psmouse *psmouse);
+	void (*pt_deactivate)(struct psmouse *psmouse);
 };
 
 #define PSMOUSE_PS2		1
--- diff/drivers/input/mouse/sermouse.c	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/mouse/sermouse.c	2004-07-01 21:32:36.000000000 +0100
@@ -37,8 +37,10 @@
 #include <linux/serio.h>
 #include <linux/init.h>
 
+#define DRIVER_DESC	"Serial mouse driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("Serial mouse driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 static char *sermouse_protocols[] = { "None", "Mouse Systems Mouse", "Sun Mouse", "Microsoft Mouse",
@@ -237,7 +239,7 @@
  * an unhandled serio port is found.
  */
 
-static void sermouse_connect(struct serio *serio, struct serio_dev *dev)
+static void sermouse_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct sermouse *sermouse;
 	unsigned char c;
@@ -279,7 +281,7 @@
 	sermouse->dev.id.product = c;
 	sermouse->dev.id.version = 0x0100;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(sermouse);
 		return;
 	}
@@ -289,21 +291,25 @@
 	printk(KERN_INFO "input: %s on %s\n", sermouse_protocols[sermouse->type], serio->phys);
 }
 
-static struct serio_dev sermouse_dev = {
-	.interrupt =	sermouse_interrupt,
-	.connect =	sermouse_connect,
-	.disconnect =	sermouse_disconnect
+static struct serio_driver sermouse_drv = {
+	.driver		= {
+		.name	= "sermouse",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= sermouse_interrupt,
+	.connect	= sermouse_connect,
+	.disconnect	= sermouse_disconnect,
 };
 
 int __init sermouse_init(void)
 {
-	serio_register_device(&sermouse_dev);
+	serio_register_driver(&sermouse_drv);
 	return 0;
 }
 
 void __exit sermouse_exit(void)
 {
-	serio_unregister_device(&sermouse_dev);
+	serio_unregister_driver(&sermouse_drv);
 }
 
 module_init(sermouse_init);
--- diff/drivers/input/mouse/synaptics.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/mouse/synaptics.c	2004-07-01 21:32:36.000000000 +0100
@@ -212,9 +212,9 @@
 /*****************************************************************************
  *	Synaptics pass-through PS/2 port support
  ****************************************************************************/
-static int synaptics_pt_write(struct serio *port, unsigned char c)
+static int synaptics_pt_write(struct serio *serio, unsigned char c)
 {
-	struct psmouse *parent = port->driver;
+	struct psmouse *parent = serio->parent->private;
 	char rate_param = SYN_PS_CLIENT_CMD; /* indicates that we want pass-through port */
 
 	if (psmouse_sliced_command(parent, c))
@@ -248,7 +248,7 @@
 
 static void synaptics_pt_activate(struct psmouse *psmouse)
 {
-	struct psmouse *child = psmouse->ptport->serio.private;
+	struct psmouse *child = psmouse->serio->child->private;
 
 	/* adjust the touchpad to child's choice of protocol */
 	if (child && child->type >= PSMOUSE_GENPS) {
@@ -259,23 +259,25 @@
 
 static void synaptics_pt_create(struct psmouse *psmouse)
 {
-	struct psmouse_ptport *port;
+	struct serio *serio;
 
-	psmouse->ptport = port = kmalloc(sizeof(struct psmouse_ptport), GFP_KERNEL);
-	if (!port) {
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (!serio) {
 		printk(KERN_ERR "synaptics: not enough memory to allocate pass-through port\n");
 		return;
 	}
 
-	memset(port, 0, sizeof(struct psmouse_ptport));
+	memset(serio, 0, sizeof(struct serio));
 
-	port->serio.type = SERIO_PS_PSTHRU;
-	port->serio.name = "Synaptics pass-through";
-	port->serio.phys = "synaptics-pt/serio0";
-	port->serio.write = synaptics_pt_write;
-	port->serio.driver = psmouse;
+	serio->type = SERIO_PS_PSTHRU;
+	strlcpy(serio->name, "Synaptics pass-through", sizeof(serio->name));
+	strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->name));
+	serio->write = synaptics_pt_write;
+	serio->parent = psmouse->serio;
 
-	port->activate = synaptics_pt_activate;
+	psmouse->pt_activate = synaptics_pt_activate;
+
+	psmouse->serio->child = serio;
 }
 
 /*****************************************************************************
@@ -470,9 +472,10 @@
 		if (unlikely(priv->pkt_type == SYN_NEWABS))
 			priv->pkt_type = synaptics_detect_pkt_type(psmouse);
 
-		if (psmouse->ptport && psmouse->ptport->serio.dev && synaptics_is_pt_packet(psmouse->packet))
-			synaptics_pass_pt_packet(&psmouse->ptport->serio, psmouse->packet);
-		else
+		if (SYN_CAP_PASS_THROUGH(priv->capabilities) && synaptics_is_pt_packet(psmouse->packet)) {
+			if (psmouse->serio->child && psmouse->serio->child->drv)
+				synaptics_pass_pt_packet(psmouse->serio->child, psmouse->packet);
+		} else
 			synaptics_process_packet(psmouse);
 
 		return PSMOUSE_FULL_PACKET;
--- diff/drivers/input/mouse/vsxxxaa.c	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/mouse/vsxxxaa.c	2004-07-01 21:32:36.000000000 +0100
@@ -82,8 +82,10 @@
 #include <linux/serio.h>
 #include <linux/init.h>
 
+#define DRIVER_DESC	"Serial DEC VSXXX-AA/GA mouse / DEC tablet driver"
+
 MODULE_AUTHOR ("Jan-Benedict Glaw <jbglaw@lug-owl.de>");
-MODULE_DESCRIPTION ("Serial DEC VSXXX-AA/GA mouse / DEC tablet driver");
+MODULE_DESCRIPTION (DRIVER_DESC);
 MODULE_LICENSE ("GPL");
 
 #undef VSXXXAA_DEBUG
@@ -482,7 +484,7 @@
 }
 
 static void
-vsxxxaa_connect (struct serio *serio, struct serio_dev *dev)
+vsxxxaa_connect (struct serio *serio, struct serio_driver *drv)
 {
 	struct vsxxxaa *mouse;
 
@@ -524,7 +526,7 @@
 	mouse->dev.id.bustype = BUS_RS232;
 	mouse->serio = serio;
 
-	if (serio_open (serio, dev)) {
+	if (serio_open (serio, drv)) {
 		kfree (mouse);
 		return;
 	}
@@ -540,23 +542,27 @@
 	printk (KERN_INFO "input: %s on %s\n", mouse->name, mouse->phys);
 }
 
-static struct serio_dev vsxxxaa_dev = {
-	.connect = vsxxxaa_connect,
-	.interrupt = vsxxxaa_interrupt,
-	.disconnect = vsxxxaa_disconnect,
+static struct serio_driver vsxxxaa_drv = {
+	.driver		= {
+		.name	= "vsxxxaa",
+	},
+	.description	= DRIVER_DESC,
+	.connect	= vsxxxaa_connect,
+	.interrupt	= vsxxxaa_interrupt,
+	.disconnect	= vsxxxaa_disconnect,
 };
 
 int __init
 vsxxxaa_init (void)
 {
-	serio_register_device (&vsxxxaa_dev);
+	serio_register_driver(&vsxxxaa_drv);
 	return 0;
 }
 
 void __exit
 vsxxxaa_exit (void)
 {
-	serio_unregister_device (&vsxxxaa_dev);
+	serio_unregister_driver(&vsxxxaa_drv);
 }
 
 module_init (vsxxxaa_init);
--- diff/drivers/input/mousedev.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/mousedev.c	2004-07-01 21:32:36.000000000 +0100
@@ -48,8 +48,13 @@
 module_param(yres, uint, 0);
 MODULE_PARM_DESC(yres, "Vertical screen resolution");
 
+static unsigned tap_time = 200;
+module_param(tap_time, uint, 0);
+MODULE_PARM_DESC(tap_time, "Tap time for touchpads in absolute mode (msecs)");
+
 struct mousedev_motion {
 	int dx, dy, dz;
+	unsigned long buttons;
 };
 
 struct mousedev {
@@ -62,21 +67,31 @@
 	struct input_handle handle;
 
 	struct mousedev_motion packet;
-	unsigned long buttons;
 	unsigned int pkt_count;
 	int old_x[4], old_y[4];
-	unsigned int touch;
+	unsigned long touch;
 };
 
+enum mousedev_emul {
+	MOUSEDEV_EMUL_PS2,
+	MOUSEDEV_EMUL_IMPS,
+	MOUSEDEV_EMUL_EXPS
+} __attribute__ ((packed));
+
+#define PACKET_QUEUE_LEN	16
 struct mousedev_list {
 	struct fasync_struct *fasync;
 	struct mousedev *mousedev;
 	struct list_head node;
-	int dx, dy, dz;
-	unsigned long buttons;
+
+	struct mousedev_motion packets[PACKET_QUEUE_LEN];
+	unsigned int head, tail;
+	spinlock_t packet_lock;
+
 	signed char ps2[6];
 	unsigned char ready, buffer, bufsiz;
-	unsigned char mode, imexseq, impsseq;
+	unsigned char imexseq, impsseq;
+	enum mousedev_emul mode;
 };
 
 #define MOUSEDEV_SEQ_LEN	6
@@ -165,30 +180,70 @@
 	}
 
 	if (value) {
-		set_bit(index, &mousedev->buttons);
-		set_bit(index, &mousedev_mix.buttons);
+		set_bit(index, &mousedev->packet.buttons);
+		set_bit(index, &mousedev_mix.packet.buttons);
 	} else {
-		clear_bit(index, &mousedev->buttons);
-		clear_bit(index, &mousedev_mix.buttons);
+		clear_bit(index, &mousedev->packet.buttons);
+		clear_bit(index, &mousedev_mix.packet.buttons);
 	}
 }
 
 static void mousedev_notify_readers(struct mousedev *mousedev, struct mousedev_motion *packet)
 {
 	struct mousedev_list *list;
+	struct mousedev_motion *p;
+	unsigned long flags;
 
 	list_for_each_entry(list, &mousedev->list, node) {
-		list->dx += packet->dx;
-		list->dy += packet->dy;
-		list->dz += packet->dz;
-		list->buttons = mousedev->buttons;
+		spin_lock_irqsave(&list->packet_lock, flags);
+
+		p = &list->packets[list->head];
+		if (list->ready && p->buttons != packet->buttons) {
+			unsigned int new_head = (list->head + 1) % PACKET_QUEUE_LEN;
+			if (new_head != list->tail) {
+				p = &list->packets[list->head = new_head];
+				memset(p, 0, sizeof(struct mousedev_motion));
+			}
+		}
+
+		p->dx += packet->dx;
+		p->dy += packet->dy;
+		p->dz += packet->dz;
+		p->buttons = mousedev->packet.buttons;
+
 		list->ready = 1;
+
+		spin_unlock_irqrestore(&list->packet_lock, flags);
 		kill_fasync(&list->fasync, SIGIO, POLL_IN);
 	}
 
 	wake_up_interruptible(&mousedev->wait);
 }
 
+static void mousedev_touchpad_touch(struct mousedev *mousedev, int value)
+{
+	if (!value) {
+		if (mousedev->touch &&
+		    !time_after(jiffies, mousedev->touch + msecs_to_jiffies(tap_time))) {
+			/*
+			 * Toggle left button to emulate tap.
+			 * We rely on the fact that mousedev_mix always has 0
+			 * motion packet so we won't mess current position.
+			 */
+			set_bit(0, &mousedev->packet.buttons);
+			set_bit(0, &mousedev_mix.packet.buttons);
+			mousedev_notify_readers(mousedev, &mousedev_mix.packet);
+			mousedev_notify_readers(&mousedev_mix, &mousedev_mix.packet);
+			clear_bit(0, &mousedev->packet.buttons);
+			clear_bit(0, &mousedev_mix.packet.buttons);
+		}
+		mousedev->touch = mousedev->pkt_count = 0;
+	}
+	else
+		if (!mousedev->touch)
+			mousedev->touch = jiffies;
+}
+
 static void mousedev_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
 {
 	struct mousedev *mousedev = handle->private;
@@ -212,12 +267,8 @@
 
 		case EV_KEY:
 			if (value != 2) {
-				if (code == BTN_TOUCH && test_bit(BTN_TOOL_FINGER, handle->dev->keybit)) {
-					/* Handle touchpad data */
-					mousedev->touch = value;
-					if (!mousedev->touch)
-						mousedev->pkt_count = 0;
-				}
+				if (code == BTN_TOUCH && test_bit(BTN_TOOL_FINGER, handle->dev->keybit))
+					mousedev_touchpad_touch(mousedev, value);
 				else
 					mousedev_key_event(mousedev, code, value);
 			}
@@ -237,7 +288,7 @@
 				mousedev_notify_readers(mousedev, &mousedev->packet);
 				mousedev_notify_readers(&mousedev_mix, &mousedev->packet);
 
-				memset(&mousedev->packet, 0, sizeof(struct mousedev_motion));
+				mousedev->packet.dx = mousedev->packet.dy = mousedev->packet.dz = 0;
 			}
 			break;
 	}
@@ -322,6 +373,7 @@
 		return -ENOMEM;
 	memset(list, 0, sizeof(struct mousedev_list));
 
+	spin_lock_init(&list->packet_lock);
 	list->mousedev = mousedev_table[i];
 	list_add_tail(&list->node, &mousedev_table[i]->list);
 	file->private_data = list;
@@ -341,32 +393,56 @@
 	return 0;
 }
 
-static void mousedev_packet(struct mousedev_list *list, unsigned char off)
+static inline int mousedev_limit_delta(int delta, int limit)
 {
-	list->ps2[off] = 0x08 | ((list->dx < 0) << 4) | ((list->dy < 0) << 5) | (list->buttons & 0x07);
-	list->ps2[off + 1] = (list->dx > 127 ? 127 : (list->dx < -127 ? -127 : list->dx));
-	list->ps2[off + 2] = (list->dy > 127 ? 127 : (list->dy < -127 ? -127 : list->dy));
-	list->dx -= list->ps2[off + 1];
-	list->dy -= list->ps2[off + 2];
-	list->bufsiz = off + 3;
-
-	if (list->mode == 2) {
-		list->ps2[off + 3] = (list->dz > 7 ? 7 : (list->dz < -7 ? -7 : list->dz));
-		list->dz -= list->ps2[off + 3];
-		list->ps2[off + 3] = (list->ps2[off + 3] & 0x0f) | ((list->buttons & 0x18) << 1);
-		list->bufsiz++;
-	} else {
-		list->ps2[off] |= ((list->buttons & 0x10) >> 3) | ((list->buttons & 0x08) >> 1);
+	return delta > limit ? limit : (delta < -limit ? -limit : delta);
+}
+
+static void mousedev_packet(struct mousedev_list *list, signed char *ps2_data)
+{
+	struct mousedev_motion *p;
+	unsigned long flags;
+
+	spin_lock_irqsave(&list->packet_lock, flags);
+	p = &list->packets[list->tail];
+
+	ps2_data[0] = 0x08 | ((p->dx < 0) << 4) | ((p->dy < 0) << 5) | (p->buttons & 0x07);
+	ps2_data[1] = mousedev_limit_delta(p->dx, 127);
+	ps2_data[2] = mousedev_limit_delta(p->dy, 127);
+	p->dx -= ps2_data[1];
+	p->dy -= ps2_data[2];
+
+	switch (list->mode) {
+		case MOUSEDEV_EMUL_EXPS:
+			ps2_data[3] = mousedev_limit_delta(p->dz, 127);
+			p->dz -= ps2_data[3];
+			ps2_data[3] = (ps2_data[3] & 0x0f) | ((p->buttons & 0x18) << 1);
+			list->bufsiz = 4;
+			break;
+
+		case MOUSEDEV_EMUL_IMPS:
+			ps2_data[0] |= ((p->buttons & 0x10) >> 3) | ((p->buttons & 0x08) >> 1);
+			ps2_data[3] = mousedev_limit_delta(p->dz, 127);
+			p->dz -= ps2_data[3];
+			list->bufsiz = 4;
+			break;
+
+		case MOUSEDEV_EMUL_PS2:
+		default:
+			ps2_data[0] |= ((p->buttons & 0x10) >> 3) | ((p->buttons & 0x08) >> 1);
+			p->dz = 0;
+			list->bufsiz = 3;
+			break;
 	}
 
-	if (list->mode == 1) {
-		list->ps2[off + 3] = (list->dz > 127 ? 127 : (list->dz < -127 ? -127 : list->dz));
-		list->dz -= list->ps2[off + 3];
-		list->bufsiz++;
+	if (!p->dx && !p->dy && !p->dz) {
+		if (list->tail != list->head)
+			list->tail = (list->tail + 1) % PACKET_QUEUE_LEN;
+		if (list->tail == list->head)
+			list->ready = 0;
 	}
 
-	if (!list->dx && !list->dy && (!list->mode || !list->dz)) list->ready = 0;
-	list->buffer = list->bufsiz;
+	spin_unlock_irqrestore(&list->packet_lock, flags);
 }
 
 
@@ -384,31 +460,31 @@
 		if (c == mousedev_imex_seq[list->imexseq]) {
 			if (++list->imexseq == MOUSEDEV_SEQ_LEN) {
 				list->imexseq = 0;
-				list->mode = 2;
+				list->mode = MOUSEDEV_EMUL_EXPS;
 			}
 		} else list->imexseq = 0;
 
 		if (c == mousedev_imps_seq[list->impsseq]) {
 			if (++list->impsseq == MOUSEDEV_SEQ_LEN) {
 				list->impsseq = 0;
-				list->mode = 1;
+				list->mode = MOUSEDEV_EMUL_IMPS;
 			}
 		} else list->impsseq = 0;
 
 		list->ps2[0] = 0xfa;
-		list->bufsiz = 1;
 
 		switch (c) {
 
 			case 0xeb: /* Poll */
-				mousedev_packet(list, 1);
+				mousedev_packet(list, &list->ps2[1]);
+				list->bufsiz++; /* account for leading ACK */
 				break;
 
 			case 0xf2: /* Get ID */
 				switch (list->mode) {
-					case 0: list->ps2[1] = 0; break;
-					case 1: list->ps2[1] = 3; break;
-					case 2: list->ps2[1] = 4; break;
+					case MOUSEDEV_EMUL_PS2:  list->ps2[1] = 0; break;
+					case MOUSEDEV_EMUL_IMPS: list->ps2[1] = 3; break;
+					case MOUSEDEV_EMUL_EXPS: list->ps2[1] = 4; break;
 				}
 				list->bufsiz = 2;
 				break;
@@ -419,13 +495,15 @@
 				break;
 
 			case 0xff: /* Reset */
-				list->impsseq = 0;
-				list->imexseq = 0;
-				list->mode = 0;
-				list->ps2[1] = 0xaa;
-				list->ps2[2] = 0x00;
+				list->impsseq = list->imexseq = 0;
+				list->mode = MOUSEDEV_EMUL_PS2;
+				list->ps2[1] = 0xaa; list->ps2[2] = 0x00;
 				list->bufsiz = 3;
 				break;
+
+			default:
+				list->bufsiz = 1;
+				break;
 		}
 
 		list->buffer = list->bufsiz;
@@ -451,8 +529,10 @@
 	if (retval)
 		return retval;
 
-	if (!list->buffer && list->ready)
-		mousedev_packet(list, 0);
+	if (!list->buffer && list->ready) {
+		mousedev_packet(list, list->ps2);
+		list->buffer = list->bufsiz;
+	}
 
 	if (count > list->buffer)
 		count = list->buffer;
--- diff/drivers/input/serio/Kconfig	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/serio/Kconfig	2004-07-01 21:32:36.000000000 +0100
@@ -97,16 +97,6 @@
 	tristate "Intel SA1111 keyboard controller"
 	depends on SA1111 && SERIO
 
-config SERIO_98KBD
-	tristate "NEC PC-9800 keyboard controller"
-	depends on X86_PC9800 && SERIO
-	help
-	  Say Y here if you have the NEC PC-9801/PC-9821 and want to use its
-	  standard keyboard connected to its keyboard controller.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called 98kbd-io.
-
 config SERIO_GSCPS2
 	tristate "HP GSC PS/2 keyboard and PS/2 mouse controller"
 	depends on GSC && SERIO
@@ -140,3 +130,19 @@
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called maceps2.
+
+config SERIO_RAW
+	tristate "Raw access to serio ports"
+	depends on SERIO
+	help
+	  Say Y here if you want to have raw access to serio ports, such as
+	  AUX ports on i8042 keyboard controller. Each serio port that is
+	  bound to this driver will be accessible via a char device with
+	  major 10 and dynamically allocated minor. The driver will try
+	  allocating minor 1 (that historically corresponds to /dev/psaux)
+	  first. To bind this driver to a serio port use sysfs interface:
+
+	      echo -n "serio_raw" > /sys/bus/serio/devices/serioX/driver
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called serio_raw.
--- diff/drivers/input/serio/Makefile	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/serio/Makefile	2004-07-01 21:32:36.000000000 +0100
@@ -17,3 +17,4 @@
 obj-$(CONFIG_SERIO_GSCPS2)	+= gscps2.o
 obj-$(CONFIG_SERIO_PCIPS2)	+= pcips2.o
 obj-$(CONFIG_SERIO_MACEPS2)	+= maceps2.o
+obj-$(CONFIG_SERIO_RAW)		+= serio_raw.o
--- diff/drivers/input/serio/ambakmi.c	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/serio/ambakmi.c	2004-07-01 21:32:36.000000000 +0100
@@ -18,17 +18,19 @@
 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <linux/err.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/hardware/amba.h>
 #include <asm/hardware/amba_kmi.h>
+#include <asm/hardware/clock.h>
 
 #define KMI_BASE	(kmi->base)
 
 struct amba_kmi_port {
-	struct serio		io;
-	struct amba_kmi_port	*next;
+	struct serio		*io;
+	struct clk		*clk;
 	unsigned char		*base;
 	unsigned int		irq;
 	unsigned int		divisor;
@@ -42,7 +44,7 @@
 	int handled = IRQ_NONE;
 
 	while (status & KMIIR_RXINTR) {
-		serio_interrupt(&kmi->io, readb(KMIDATA), 0, regs);
+		serio_interrupt(kmi->io, readb(KMIDATA), 0, regs);
 		status = readb(KMIIR);
 		handled = IRQ_HANDLED;
 	}
@@ -52,7 +54,7 @@
 
 static int amba_kmi_write(struct serio *io, unsigned char val)
 {
-	struct amba_kmi_port *kmi = io->driver;
+	struct amba_kmi_port *kmi = io->port_data;
 	unsigned int timeleft = 10000; /* timeout in 100ms */
 
 	while ((readb(KMISTAT) & KMISTAT_TXEMPTY) == 0 && timeleft--)
@@ -66,36 +68,56 @@
 
 static int amba_kmi_open(struct serio *io)
 {
-	struct amba_kmi_port *kmi = io->driver;
+	struct amba_kmi_port *kmi = io->port_data;
+	unsigned int divisor;
 	int ret;
 
-	writeb(kmi->divisor, KMICLKDIV);
+	ret = clk_use(kmi->clk);
+	if (ret)
+		goto out;
+
+	ret = clk_enable(kmi->clk);
+	if (ret)
+		goto clk_unuse;
+
+	divisor = clk_get_rate(kmi->clk) / 8000000 - 1;
+	writeb(divisor, KMICLKDIV);
 	writeb(KMICR_EN, KMICR);
 
 	ret = request_irq(kmi->irq, amba_kmi_int, 0, "kmi-pl050", kmi);
 	if (ret) {
 		printk(KERN_ERR "kmi: failed to claim IRQ%d\n", kmi->irq);
 		writeb(0, KMICR);
-		return ret;
+		goto clk_disable;
 	}
 
 	writeb(KMICR_EN | KMICR_RXINTREN, KMICR);
 
 	return 0;
+
+ clk_disable:
+	clk_disable(kmi->clk);
+ clk_unuse:
+	clk_unuse(kmi->clk);
+ out:
+	return ret;
 }
 
 static void amba_kmi_close(struct serio *io)
 {
-	struct amba_kmi_port *kmi = io->driver;
+	struct amba_kmi_port *kmi = io->port_data;
 
 	writeb(0, KMICR);
 
 	free_irq(kmi->irq, kmi);
+	clk_disable(kmi->clk);
+	clk_unuse(kmi->clk);
 }
 
 static int amba_kmi_probe(struct amba_device *dev, void *id)
 {
 	struct amba_kmi_port *kmi;
+	struct serio *io;
 	int ret;
 
 	ret = amba_request_regions(dev, NULL);
@@ -103,37 +125,48 @@
 		return ret;
 
 	kmi = kmalloc(sizeof(struct amba_kmi_port), GFP_KERNEL);
-	if (!kmi) {
+	io = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (!kmi || !io) {
 		ret = -ENOMEM;
 		goto out;
 	}
 
 	memset(kmi, 0, sizeof(struct amba_kmi_port));
+	memset(io, 0, sizeof(struct serio));
 
-	kmi->io.type	= SERIO_8042;
-	kmi->io.write	= amba_kmi_write;
-	kmi->io.open	= amba_kmi_open;
-	kmi->io.close	= amba_kmi_close;
-	kmi->io.name	= dev->dev.bus_id;
-	kmi->io.phys	= dev->dev.bus_id;
-	kmi->io.driver	= kmi;
+	io->type	= SERIO_8042;
+	io->write	= amba_kmi_write;
+	io->open	= amba_kmi_open;
+	io->close	= amba_kmi_close;
+	strlcpy(io->name, dev->dev.bus_id, sizeof(io->name));
+	strlcpy(io->phys, dev->dev.bus_id, sizeof(io->phys));
+	io->port_data	= kmi;
+	io->dev.parent	= &dev->dev;
 
+	kmi->io 	= io;
 	kmi->base	= ioremap(dev->res.start, KMI_SIZE);
 	if (!kmi->base) {
 		ret = -ENOMEM;
 		goto out;
 	}
 
-	kmi->irq	= dev->irq[0];
-	kmi->divisor	= 24 / 8 - 1;
+	kmi->clk = clk_get(&dev->dev, "KMIREFCLK");
+	if (IS_ERR(kmi->clk)) {
+		ret = PTR_ERR(kmi->clk);
+		goto unmap;
+	}
 
+	kmi->irq = dev->irq[0];
 	amba_set_drvdata(dev, kmi);
 
-	serio_register_port(&kmi->io);
+	serio_register_port(kmi->io);
 	return 0;
 
+ unmap:
+	iounmap(kmi->base);
  out:
 	kfree(kmi);
+	kfree(io);
 	amba_release_regions(dev);
 	return ret;
 }
@@ -144,7 +177,8 @@
 
 	amba_set_drvdata(dev, NULL);
 
-	serio_unregister_port(&kmi->io);
+	serio_unregister_port(kmi->io);
+	clk_put(kmi->clk);
 	iounmap(kmi->base);
 	kfree(kmi);
 	amba_release_regions(dev);
@@ -156,7 +190,7 @@
 	struct amba_kmi_port *kmi = amba_get_drvdata(dev);
 
 	/* kick the serio layer to rescan this port */
-	serio_rescan(&kmi->io);
+	serio_reconnect(kmi->io);
 
 	return 0;
 }
@@ -186,7 +220,7 @@
 
 static void __exit amba_kmi_exit(void)
 {
-	return amba_driver_unregister(&ambakmi_driver);
+	amba_driver_unregister(&ambakmi_driver);
 }
 
 module_init(amba_kmi_init);
--- diff/drivers/input/serio/ct82c710.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/ct82c710.c	2004-07-01 21:32:36.000000000 +0100
@@ -36,6 +36,7 @@
 #include <linux/interrupt.h>
 #include <linux/serio.h>
 #include <linux/errno.h>
+#include <linux/err.h>
 
 #include <asm/io.h>
 
@@ -43,9 +44,6 @@
 MODULE_DESCRIPTION("82C710 C&T mouse port chip driver");
 MODULE_LICENSE("GPL");
 
-static char ct82c710_name[] = "C&T 82c710 mouse port";
-static char ct82c710_phys[16];
-
 /*
  * ct82c710 interface
  */
@@ -61,10 +59,22 @@
 
 #define CT82C710_IRQ          12
 
-static int ct82c710_data;
-static int ct82c710_status;
+#define CT82C710_DATA         ct82c710_iores.start
+#define CT82C710_STATUS       (ct82c710_iores.start + 1)
 
-static irqreturn_t ct82c710_interrupt(int cpl, void *dev_id, struct pt_regs * regs);
+static struct serio *ct82c710_port;
+static struct platform_device *ct82c710_device;
+static struct resource ct82c710_iores;
+
+/*
+ * Interrupt handler for the 82C710 mouse port. A character
+ * is waiting in the 82C710.
+ */
+
+static irqreturn_t ct82c710_interrupt(int cpl, void *dev_id, struct pt_regs * regs)
+{
+	return serio_interrupt(ct82c710_port, inb(CT82C710_DATA), 0, regs);
+}
 
 /*
  * Wait for device to send output char and flush any input char.
@@ -74,10 +84,10 @@
 {
 	int timeout = 60000;
 
-	while ((inb(ct82c710_status) & (CT82C710_RX_FULL | CT82C710_TX_IDLE | CT82C710_DEV_IDLE))
+	while ((inb(CT82C710_STATUS) & (CT82C710_RX_FULL | CT82C710_TX_IDLE | CT82C710_DEV_IDLE))
 		       != (CT82C710_DEV_IDLE | CT82C710_TX_IDLE) && timeout) {
 
-		if (inb_p(ct82c710_status) & CT82C710_RX_FULL) inb_p(ct82c710_data);
+		if (inb_p(CT82C710_STATUS) & CT82C710_RX_FULL) inb_p(CT82C710_DATA);
 
 		udelay(1);
 		timeout--;
@@ -91,7 +101,7 @@
 	if (ct82c170_wait())
 		printk(KERN_WARNING "ct82c710.c: Device busy in close()\n");
 
-	outb_p(inb_p(ct82c710_status) & ~(CT82C710_ENABLE | CT82C710_INTS_ON), ct82c710_status);
+	outb_p(inb_p(CT82C710_STATUS) & ~(CT82C710_ENABLE | CT82C710_INTS_ON), CT82C710_STATUS);
 
 	if (ct82c170_wait())
 		printk(KERN_WARNING "ct82c710.c: Device busy in close()\n");
@@ -106,21 +116,21 @@
 	if (request_irq(CT82C710_IRQ, ct82c710_interrupt, 0, "ct82c710", NULL))
 		return -1;
 
-	status = inb_p(ct82c710_status);
+	status = inb_p(CT82C710_STATUS);
 
 	status |= (CT82C710_ENABLE | CT82C710_RESET);
-	outb_p(status, ct82c710_status);
+	outb_p(status, CT82C710_STATUS);
 
 	status &= ~(CT82C710_RESET);
-	outb_p(status, ct82c710_status);
+	outb_p(status, CT82C710_STATUS);
 
 	status |= CT82C710_INTS_ON;
-	outb_p(status, ct82c710_status);	/* Enable interrupts */
+	outb_p(status, CT82C710_STATUS);	/* Enable interrupts */
 
 	while (ct82c170_wait()) {
 		printk(KERN_ERR "ct82c710: Device busy in open()\n");
 		status &= ~(CT82C710_ENABLE | CT82C710_INTS_ON);
-		outb_p(status, ct82c710_status);
+		outb_p(status, CT82C710_STATUS);
 		free_irq(CT82C710_IRQ, NULL);
 		return -1;
 	}
@@ -135,30 +145,10 @@
 static int ct82c710_write(struct serio *port, unsigned char c)
 {
 	if (ct82c170_wait()) return -1;
-	outb_p(c, ct82c710_data);
+	outb_p(c, CT82C710_DATA);
 	return 0;
 }
 
-static struct serio ct82c710_port =
-{
-	.type	= SERIO_8042,
-	.name	= ct82c710_name,
-	.phys	= ct82c710_phys,
-	.write	= ct82c710_write,
-	.open	= ct82c710_open,
-	.close	= ct82c710_close,
-};
-
-/*
- * Interrupt handler for the 82C710 mouse port. A character
- * is waiting in the 82C710.
- */
-
-static irqreturn_t ct82c710_interrupt(int cpl, void *dev_id, struct pt_regs * regs)
-{
-	return serio_interrupt(&ct82c710_port, inb(ct82c710_data), 0, regs);
-}
-
 /*
  * See if we can find a 82C710 device. Read mouse address.
  */
@@ -175,36 +165,60 @@
 		return -1;				/* No: no 82C710 here */
 
 	outb_p(0x0d, 0x390);				/* Write index */
-	ct82c710_data = inb_p(0x391) << 2;		/* Get mouse I/O address */
-	ct82c710_status = ct82c710_data + 1;
+	ct82c710_iores.start = inb_p(0x391) << 2;	/* Get mouse I/O address */
+	ct82c710_iores.end = ct82c710_iores.start + 1;
+	ct82c710_iores.flags = IORESOURCE_IO;
 	outb_p(0x0f, 0x390);
 	outb_p(0x0f, 0x391);				/* Close config mode */
 
 	return 0;
 }
 
+static struct serio * __init ct82c710_allocate_port(void)
+{
+	struct serio *serio;
+
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
+		memset(serio, 0, sizeof(struct serio));
+		serio->type = SERIO_8042;
+		serio->open = ct82c710_open;
+		serio->close = ct82c710_close;
+		serio->write = ct82c710_write;
+		serio->dev.parent = &ct82c710_device->dev;
+		strlcpy(serio->name, "C&T 82c710 mouse port", sizeof(serio->name));
+		snprintf(serio->phys, sizeof(serio->phys), "isa%04lx/serio0", CT82C710_DATA);
+	}
+
+	return serio;
+}
+
 int __init ct82c710_init(void)
 {
 	if (ct82c710_probe())
 		return -ENODEV;
 
-	if (request_region(ct82c710_data, 2, "ct82c710"))
-		return -EBUSY;
-
-	sprintf(ct82c710_phys, "isa%04x/serio0", ct82c710_data);
+	ct82c710_device = platform_device_register_simple("ct82c710", -1, &ct82c710_iores, 1);
+	if (IS_ERR(ct82c710_device))
+		return PTR_ERR(ct82c710_device);
+
+	if (!(ct82c710_port = ct82c710_allocate_port())) {
+		platform_device_unregister(ct82c710_device);
+		return -ENOMEM;
+	}
 
-	serio_register_port(&ct82c710_port);
+	serio_register_port(ct82c710_port);
 
-	printk(KERN_INFO "serio: C&T 82c710 mouse port at %#x irq %d\n",
-		ct82c710_data, CT82C710_IRQ);
+	printk(KERN_INFO "serio: C&T 82c710 mouse port at %#lx irq %d\n",
+		CT82C710_DATA, CT82C710_IRQ);
 
 	return 0;
 }
 
 void __exit ct82c710_exit(void)
 {
-	serio_unregister_port(&ct82c710_port);
-	release_region(ct82c710_data, 2);
+	serio_unregister_port(ct82c710_port);
+	platform_device_unregister(ct82c710_device);
 }
 
 module_init(ct82c710_init);
--- diff/drivers/input/serio/gscps2.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/gscps2.c	2004-07-01 21:32:36.000000000 +0100
@@ -91,7 +91,7 @@
 struct gscps2port {
 	struct list_head node;
 	struct parisc_device *padev;
-	struct serio port;
+	struct serio *port;
 	spinlock_t lock;
 	char *addr;
 	u8 act, append; /* position in buffer[] */
@@ -100,7 +100,6 @@
 		u8 str;
 	} buffer[BUFFER_SIZE+1];
 	int id;
-	char name[32];
 };
 
 /*
@@ -272,7 +271,7 @@
 	    rxflags =	((status & GSC_STAT_TERR) ? SERIO_TIMEOUT : 0 ) |
 			((status & GSC_STAT_PERR) ? SERIO_PARITY  : 0 );
 
-	    serio_interrupt(&ps2port->port, data, rxflags, regs);
+	    serio_interrupt(ps2port->port, data, rxflags, regs);
 
 	  } /* while() */
 
@@ -288,7 +287,7 @@
 
 static int gscps2_write(struct serio *port, unsigned char data)
 {
-	struct gscps2port *ps2port = port->driver;
+	struct gscps2port *ps2port = port->port_data;
 
 	if (!gscps2_writeb_output(ps2port, data)) {
 		printk(KERN_DEBUG PFX "sending byte %#x failed.\n", data);
@@ -304,7 +303,7 @@
 
 static int gscps2_open(struct serio *port)
 {
-	struct gscps2port *ps2port = port->driver;
+	struct gscps2port *ps2port = port->port_data;
 
 	gscps2_reset(ps2port);
 
@@ -319,7 +318,7 @@
 
 static void gscps2_close(struct serio *port)
 {
-	struct gscps2port *ps2port = port->driver;
+	struct gscps2port *ps2port = port->port_data;
 	gscps2_enable(ps2port, DISABLE);
 }
 
@@ -343,7 +342,8 @@
 
 static int __init gscps2_probe(struct parisc_device *dev)
 {
-        struct gscps2port *ps2port;
+	struct gscps2port *ps2port;
+	struct serio *serio;
 	unsigned long hpa = dev->hpa;
 	int ret;
 
@@ -355,34 +355,45 @@
 		hpa += GSC_DINO_OFFSET;
 
 	ps2port = kmalloc(sizeof(struct gscps2port), GFP_KERNEL);
-	if (!ps2port)
-		return -ENOMEM;
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (!ps2port || !serio) {
+		ret = -ENOMEM;
+		goto fail_nomem;
+	}
 
 	dev_set_drvdata(&dev->dev, ps2port);
 
 	memset(ps2port, 0, sizeof(struct gscps2port));
+	memset(serio, 0, sizeof(struct serio));
+	ps2port->port = serio;
 	ps2port->padev = dev;
 	ps2port->addr = ioremap(hpa, GSC_STATUS + 4);
 	spin_lock_init(&ps2port->lock);
 
 	gscps2_reset(ps2port);
-	ps2port->id = readb(ps2port->addr+GSC_ID) & 0x0f;
-	snprintf(ps2port->name, sizeof(ps2port->name)-1, "%s %s",
-		gscps2_serio_port.name,
-		(ps2port->id == GSC_ID_KEYBOARD) ? "keyboard" : "mouse" );
-
-	memcpy(&ps2port->port, &gscps2_serio_port, sizeof(gscps2_serio_port));
-	ps2port->port.driver = ps2port;
-	ps2port->port.name = ps2port->name;
-	ps2port->port.phys = dev->dev.bus_id;
+	ps2port->id = readb(ps2port->addr + GSC_ID) & 0x0f;
+
+	snprintf(serio->name, sizeof(serio->name), "GSC PS/2 %s",
+		 (ps2port->id == GSC_ID_KEYBOARD) ? "keyboard" : "mouse");
+	strlcpy(serio->phys, dev->dev.bus_id, sizeof(serio->phys));
+	serio->idbus		= BUS_GSC;
+	serio->idvendor		= PCI_VENDOR_ID_HP;
+	serio->idproduct	= 0x0001;
+	serio->idversion	= 0x0010;
+	serio->type		= SERIO_8042;
+	serio->write		= gscps2_write;
+	serio->open		= gscps2_open;
+	serio->close		= gscps2_close;
+	serio->port_data	= ps2port;
+	serio->dev.parent	= &dev->dev;
 
 	list_add_tail(&ps2port->node, &ps2port_list);
 
 	ret = -EBUSY;
-	if (request_irq(dev->irq, gscps2_interrupt, SA_SHIRQ, ps2port->name, ps2port))
+	if (request_irq(dev->irq, gscps2_interrupt, SA_SHIRQ, ps2port->port->name, ps2port))
 		goto fail_miserably;
 
-	if ( (ps2port->id != GSC_ID_KEYBOARD) && (ps2port->id != GSC_ID_MOUSE) ) {
+	if (ps2port->id != GSC_ID_KEYBOARD && ps2port->id != GSC_ID_MOUSE) {
 		printk(KERN_WARNING PFX "Unsupported PS/2 port at 0x%08lx (id=%d) ignored\n",
 				hpa, ps2port->id);
 		ret = -ENODEV;
@@ -395,12 +406,12 @@
 #endif
 
 	printk(KERN_INFO "serio: %s port at 0x%p irq %d @ %s\n",
-		ps2port->name,
+		ps2port->port->name,
 		ps2port->addr,
 		ps2port->padev->irq,
-		ps2port->port.phys);
+		ps2port->port->phys);
 
-	serio_register_port(&ps2port->port);
+	serio_register_port(ps2port->port);
 
 	return 0;
 
@@ -411,7 +422,10 @@
 	list_del(&ps2port->node);
 	iounmap(ps2port->addr);
 	release_mem_region(dev->hpa, GSC_STATUS + 4);
+
+fail_nomem:
 	kfree(ps2port);
+	kfree(serio);
 	return ret;
 }
 
@@ -424,7 +438,7 @@
 {
 	struct gscps2port *ps2port = dev_get_drvdata(&dev->dev);
 
-	serio_unregister_port(&ps2port->port);
+	serio_unregister_port(ps2port->port);
 	free_irq(dev->irq, ps2port);
 	gscps2_flush(ps2port);
 	list_del(&ps2port->node);
--- diff/drivers/input/serio/i8042-io.h	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/serio/i8042-io.h	2004-07-01 21:32:36.000000000 +0100
@@ -28,6 +28,8 @@
 #elif defined(__arm__)
 /* defined in include/asm-arm/arch-xxx/irqs.h */
 #include <asm/irq.h>
+#elif defined(CONFIG_SUPERH64)
+#include <asm/irq.h>
 #else
 # define I8042_KBD_IRQ	1
 # define I8042_AUX_IRQ	12
--- diff/drivers/input/serio/i8042.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/i8042.c	2004-07-01 21:32:36.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  *  i8042 keyboard and mouse controller driver for Linux
  *
- *  Copyright (c) 1999-2002 Vojtech Pavlik
+ *  Copyright (c) 1999-2004 Vojtech Pavlik
  */
 
 /*
@@ -21,6 +21,7 @@
 #include <linux/sysdev.h>
 #include <linux/pm.h>
 #include <linux/serio.h>
+#include <linux/err.h>
 
 #include <asm/io.h>
 
@@ -52,6 +53,11 @@
 module_param_named(dumbkbd, i8042_dumbkbd, bool, 0);
 MODULE_PARM_DESC(dumbkbd, "Pretend that controller can only read data from keyboard");
 
+#ifdef __i386__
+extern unsigned int i8042_dmi_noloop;
+#endif
+static unsigned int i8042_noloop;
+
 __obsolete_setup("i8042_noaux");
 __obsolete_setup("i8042_nomux");
 __obsolete_setup("i8042_unlock");
@@ -70,19 +76,35 @@
 	unsigned char irqen;
 	unsigned char exists;
 	signed char mux;
-	unsigned char *name;
-	unsigned char *phys;
+	char name[8];
+};
+
+static struct i8042_values i8042_kbd_values = {
+	.disable	= I8042_CTR_KBDDIS,
+	.irqen 		= I8042_CTR_KBDINT,
+	.mux		= -1,
+	.name		= "KBD",
 };
 
-static struct serio i8042_kbd_port;
-static struct serio i8042_aux_port;
+static struct i8042_values i8042_aux_values = {
+	.disable	= I8042_CTR_AUXDIS,
+	.irqen		= I8042_CTR_AUXINT,
+	.mux		= -1,
+	.name		= "AUX",
+};
+
+static struct i8042_values i8042_mux_values[I8042_NUM_MUX_PORTS];
+
+static struct serio *i8042_kbd_port;
+static struct serio *i8042_aux_port;
+static struct serio *i8042_mux_port[I8042_NUM_MUX_PORTS];
 static unsigned char i8042_initial_ctr;
 static unsigned char i8042_ctr;
 static unsigned char i8042_mux_open;
 static unsigned char i8042_mux_present;
-static unsigned char i8042_sysdev_initialized;
 static struct pm_dev *i8042_pm_dev;
-struct timer_list i8042_timer;
+static struct timer_list i8042_timer;
+static struct platform_device *i8042_platform_device;
 
 /*
  * Shared IRQ's require a device pointer, but this driver doesn't support
@@ -95,6 +117,7 @@
 /*
  * The i8042_wait_read() and i8042_wait_write functions wait for the i8042 to
  * be ready for reading values from it / writing values to it.
+ * Called always with i8042_lock held.
  */
 
 static int i8042_wait_read(void)
@@ -154,6 +177,9 @@
 	unsigned long flags;
 	int retval = 0, i = 0;
 
+	if (i8042_noloop && command == I8042_CMD_AUX_LOOP)
+		return -1;
+
 	spin_lock_irqsave(&i8042_lock, flags);
 
 	retval = i8042_wait_write();
@@ -214,7 +240,7 @@
 
 static int i8042_aux_write(struct serio *port, unsigned char c)
 {
-	struct i8042_values *values = port->driver;
+	struct i8042_values *values = port->port_data;
 	int retval;
 
 /*
@@ -242,7 +268,7 @@
 
 static int i8042_activate_port(struct serio *port)
 {
-	struct i8042_values *values = port->driver;
+	struct i8042_values *values = port->port_data;
 
 	i8042_flush();
 
@@ -270,7 +296,7 @@
 
 static int i8042_open(struct serio *port)
 {
-	struct i8042_values *values = port->driver;
+	struct i8042_values *values = port->port_data;
 
 	if (values->mux != -1)
 		if (i8042_mux_open++)
@@ -309,7 +335,7 @@
 
 static void i8042_close(struct serio *port)
 {
-	struct i8042_values *values = port->driver;
+	struct i8042_values *values = port->port_data;
 
 	if (values->mux != -1)
 		if (--i8042_mux_open)
@@ -328,52 +354,6 @@
 }
 
 /*
- * Structures for registering the devices in the serio.c module.
- */
-
-static struct i8042_values i8042_kbd_values = {
-	.irqen =	I8042_CTR_KBDINT,
-	.disable =	I8042_CTR_KBDDIS,
-	.name =		"KBD",
-	.mux =		-1,
-};
-
-static struct serio i8042_kbd_port =
-{
-	.type =		SERIO_8042_XL,
-	.write =	i8042_kbd_write,
-	.open =		i8042_open,
-	.close =	i8042_close,
-	.driver =	&i8042_kbd_values,
-	.name =		"i8042 Kbd Port",
-	.phys =		I8042_KBD_PHYS_DESC,
-};
-
-static struct i8042_values i8042_aux_values = {
-	.irqen =	I8042_CTR_AUXINT,
-	.disable =	I8042_CTR_AUXDIS,
-	.name =		"AUX",
-	.mux =		-1,
-};
-
-static struct serio i8042_aux_port =
-{
-	.type =		SERIO_8042,
-	.write =	i8042_aux_write,
-	.open =		i8042_open,
-	.close =	i8042_close,
-	.driver =	&i8042_aux_values,
-	.name =		"i8042 Aux Port",
-	.phys =		I8042_AUX_PHYS_DESC,
-};
-
-static struct i8042_values i8042_mux_values[4];
-static struct serio i8042_mux_port[4];
-static char i8042_mux_names[4][32];
-static char i8042_mux_short[4][16];
-static char i8042_mux_phys[4][32];
-
-/*
  * i8042_interrupt() is the most important function in this driver -
  * it handles the interrupts from the i8042, and sends incoming bytes
  * to the upper layers.
@@ -419,7 +399,7 @@
 			dfl & SERIO_PARITY ? ", bad parity" : "",
 			dfl & SERIO_TIMEOUT ? ", timeout" : "");
 
-		serio_interrupt(i8042_mux_port + ((str >> 6) & 3), data, dfl, regs);
+		serio_interrupt(i8042_mux_port[(str >> 6) & 3], data, dfl, regs);
 
 		goto irq_ret;
 	}
@@ -430,14 +410,14 @@
 		dfl & SERIO_TIMEOUT ? ", timeout" : "");
 
 	if (i8042_aux_values.exists && (str & I8042_STR_AUXDATA)) {
-		serio_interrupt(&i8042_aux_port, data, dfl, regs);
+		serio_interrupt(i8042_aux_port, data, dfl, regs);
 		goto irq_ret;
 	}
 
 	if (!i8042_kbd_values.exists)
 		goto irq_ret;
 
-	serio_interrupt(&i8042_kbd_port, data, dfl, regs);
+	serio_interrupt(i8042_kbd_port, data, dfl, regs);
 
 irq_ret:
 	ret = 1;
@@ -474,17 +454,8 @@
 	if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0xa9)
 		return -1;
 	param = 0xa4;
-	if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param == 0x5b) {
-
-/*
- * Do another loop test with the 0x5a value. Doing anything else upsets
- * Profusion/ServerWorks OSB4 chipsets.
- */
-
-		param = 0x5a;
-		i8042_command(&param, I8042_CMD_AUX_LOOP);
+	if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param == 0x5b)
 		return -1;
-	}
 
 	if (mux_version)
 		*mux_version = ~param;
@@ -639,8 +610,10 @@
  * registers it, and reports to the user.
  */
 
-static int __init i8042_port_register(struct i8042_values *values, struct serio *port)
+static int __init i8042_port_register(struct serio *port)
 {
+	struct i8042_values *values = port->port_data;
+
 	values->exists = 1;
 
 	i8042_ctr &= ~values->disable;
@@ -677,6 +650,7 @@
 
 static int i8042_controller_init(void)
 {
+	unsigned long flags;
 
 /*
  * Test the i8042. We need to know if it thinks it's working correctly
@@ -723,12 +697,14 @@
  * Handle keylock.
  */
 
+	spin_lock_irqsave(&i8042_lock, flags);
 	if (~i8042_read_status() & I8042_STR_KEYLOCK) {
 		if (i8042_unlock)
 			i8042_ctr |= I8042_CTR_IGNKEYLOCK;
 		 else
 			printk(KERN_WARNING "i8042.c: Warning: Keylock active.\n");
 	}
+	spin_unlock_irqrestore(&i8042_lock, flags);
 
 /*
  * If the chip is configured into nontranslated mode by the BIOS, don't
@@ -745,10 +721,8 @@
  * BIOSes.
  */
 
-	if (i8042_direct) {
+	if (i8042_direct)
 		i8042_ctr &= ~I8042_CTR_XLATE;
-		i8042_kbd_port.type = SERIO_8042;
-	}
 
 /*
  * Write CTR back.
@@ -802,14 +776,14 @@
  */
 
 	if (i8042_kbd_values.exists)
-		serio_cleanup(&i8042_kbd_port);
+		serio_cleanup(i8042_kbd_port);
 
 	if (i8042_aux_values.exists)
-		serio_cleanup(&i8042_aux_port);
+		serio_cleanup(i8042_aux_port);
 
-	for (i = 0; i < 4; i++)
+	for (i = 0; i < I8042_NUM_MUX_PORTS; i++)
 		if (i8042_mux_values[i].exists)
-			serio_cleanup(i8042_mux_port + i);
+			serio_cleanup(i8042_mux_port[i]);
 
 	i8042_controller_reset();
 }
@@ -851,15 +825,15 @@
  * Reconnect anything that was connected to the ports.
  */
 
-	if (i8042_kbd_values.exists && i8042_activate_port(&i8042_kbd_port) == 0)
-		serio_reconnect(&i8042_kbd_port);
+	if (i8042_kbd_values.exists && i8042_activate_port(i8042_kbd_port) == 0)
+		serio_reconnect(i8042_kbd_port);
 
-	if (i8042_aux_values.exists && i8042_activate_port(&i8042_aux_port) == 0)
-		serio_reconnect(&i8042_aux_port);
+	if (i8042_aux_values.exists && i8042_activate_port(i8042_aux_port) == 0)
+		serio_reconnect(i8042_aux_port);
 
-	for (i = 0; i < 4; i++)
-		if (i8042_mux_values[i].exists && i8042_activate_port(i8042_mux_port + i) == 0)
-			serio_reconnect(i8042_mux_port + i);
+	for (i = 0; i < I8042_NUM_MUX_PORTS; i++)
+		if (i8042_mux_values[i].exists && i8042_activate_port(i8042_mux_port[i]) == 0)
+			serio_reconnect(i8042_mux_port[i]);
 /*
  * Restart timer (for polling "stuck" data)
  */
@@ -882,7 +856,7 @@
         return NOTIFY_DONE;
 }
 
-static struct notifier_block i8042_notifier=
+static struct notifier_block i8042_notifier =
 {
         i8042_notify_sys,
         NULL,
@@ -892,25 +866,27 @@
 /*
  * Suspend/resume handlers for the new PM scheme (driver model)
  */
-static int i8042_suspend(struct sys_device *dev, u32 state)
+static int i8042_suspend(struct device *dev, u32 state, u32 level)
 {
-	return i8042_controller_suspend();
+	return level == SUSPEND_DISABLE ? i8042_controller_suspend() : 0;
 }
 
-static int i8042_resume(struct sys_device *dev)
+static int i8042_resume(struct device *dev, u32 level)
 {
-	return i8042_controller_resume();
+	return level == RESUME_ENABLE ? i8042_controller_resume() : 0;
 }
 
-static struct sysdev_class kbc_sysclass = {
-	set_kset_name("i8042"),
-	.suspend = i8042_suspend,
-	.resume = i8042_resume,
-};
+static void i8042_shutdown(struct device *dev)
+{
+	i8042_controller_cleanup();
+}
 
-static struct sys_device device_i8042 = {
-       .id     = 0,
-       .cls    = &kbc_sysclass,
+static struct device_driver i8042_driver = {
+	.name		= "i8042",
+	.bus		= &platform_bus_type,
+	.suspend	= i8042_suspend,
+	.resume		= i8042_resume,
+	.shutdown	= i8042_shutdown,
 };
 
 /*
@@ -929,23 +905,75 @@
 	return 0;
 }
 
-static void __init i8042_init_mux_values(struct i8042_values *values, struct serio *port, int index)
+static struct serio * __init i8042_allocate_kbd_port(void)
 {
-	memcpy(port, &i8042_aux_port, sizeof(struct serio));
-	memcpy(values, &i8042_aux_values, sizeof(struct i8042_values));
-	sprintf(i8042_mux_names[index], "i8042 Aux-%d Port", index);
-	sprintf(i8042_mux_phys[index], I8042_MUX_PHYS_DESC, index + 1);
-	sprintf(i8042_mux_short[index], "AUX%d", index);
-	port->name = i8042_mux_names[index];
-	port->phys = i8042_mux_phys[index];
-	port->driver = values;
-	values->name = i8042_mux_short[index];
-	values->mux = index;
+	struct serio *serio;
+
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
+		memset(serio, 0, sizeof(struct serio));
+		serio->type		= i8042_direct ? SERIO_8042 : SERIO_8042_XL,
+		serio->write		= i8042_dumbkbd ? NULL : i8042_kbd_write,
+		serio->open		= i8042_open,
+		serio->close		= i8042_close,
+		serio->port_data	= &i8042_kbd_values,
+		serio->dev.parent	= &i8042_platform_device->dev;
+		strlcpy(serio->name, "i8042 Kbd Port", sizeof(serio->name));
+		strlcpy(serio->phys, I8042_KBD_PHYS_DESC, sizeof(serio->phys));
+	}
+
+	return serio;
+}
+
+static struct serio * __init i8042_allocate_aux_port(void)
+{
+	struct serio *serio;
+
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
+		memset(serio, 0, sizeof(struct serio));
+		serio->type		= SERIO_8042;
+		serio->write		= i8042_aux_write;
+		serio->open		= i8042_open;
+		serio->close		= i8042_close;
+		serio->port_data	= &i8042_aux_values,
+		serio->dev.parent	= &i8042_platform_device->dev;
+		strlcpy(serio->name, "i8042 Aux Port", sizeof(serio->name));
+		strlcpy(serio->phys, I8042_AUX_PHYS_DESC, sizeof(serio->phys));
+	}
+
+	return serio;
+}
+
+static struct serio * __init i8042_allocate_mux_port(int index)
+{
+	struct serio *serio;
+	struct i8042_values *values = &i8042_mux_values[index];
+
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
+		*values = i8042_aux_values;
+		snprintf(values->name, sizeof(values->name), "AUX%d", index);
+		values->mux = index;
+
+		memset(serio, 0, sizeof(struct serio));
+		serio->type		= SERIO_8042;
+		serio->write		= i8042_aux_write;
+		serio->open		= i8042_open;
+		serio->close		= i8042_close;
+		serio->port_data	= values;
+		serio->dev.parent	= &i8042_platform_device->dev;
+		snprintf(serio->name, sizeof(serio->name), "i8042 Aux-%d Port", index);
+		snprintf(serio->phys, sizeof(serio->phys), I8042_MUX_PHYS_DESC, index + 1);
+	}
+
+	return serio;
 }
 
 int __init i8042_init(void)
 {
 	int i;
+	int err;
 
 	dbg_init();
 
@@ -961,30 +989,43 @@
 	if (i8042_controller_init())
 		return -ENODEV;
 
-	if (i8042_dumbkbd)
-		i8042_kbd_port.write = NULL;
+#ifdef __i386__
+	if (i8042_dmi_noloop) {
+		printk(KERN_INFO "i8042.c: AUX LoopBack command disabled by DMI.\n");
+		i8042_noloop = 1;
+	}
+#endif
+
+	err = driver_register(&i8042_driver);
+	if (err)
+		return err;
+
+	i8042_platform_device = platform_device_register_simple("i8042", -1, NULL, 0);
+	if (IS_ERR(i8042_platform_device)) {
+		driver_unregister(&i8042_driver);
+		return PTR_ERR(i8042_platform_device);
+	}
 
 	if (!i8042_noaux && !i8042_check_aux(&i8042_aux_values)) {
 		if (!i8042_nomux && !i8042_check_mux(&i8042_aux_values))
-			for (i = 0; i < 4; i++) {
-				i8042_init_mux_values(i8042_mux_values + i, i8042_mux_port + i, i);
-				i8042_port_register(i8042_mux_values + i, i8042_mux_port + i);
+			for (i = 0; i < I8042_NUM_MUX_PORTS; i++) {
+				i8042_mux_port[i] = i8042_allocate_mux_port(i);
+				if (i8042_mux_port[i])
+					i8042_port_register(i8042_mux_port[i]);
 			}
-		else
-			i8042_port_register(&i8042_aux_values, &i8042_aux_port);
+		else {
+			i8042_aux_port = i8042_allocate_aux_port();
+			if (i8042_aux_port)
+				i8042_port_register(i8042_aux_port);
+		}
 	}
 
-	i8042_port_register(&i8042_kbd_values, &i8042_kbd_port);
+	i8042_kbd_port = i8042_allocate_kbd_port();
+	if (i8042_kbd_port)
+		i8042_port_register(i8042_kbd_port);
 
 	mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
 
-        if (sysdev_class_register(&kbc_sysclass) == 0) {
-                if (sysdev_register(&device_i8042) == 0)
-			i8042_sysdev_initialized = 1;
-		else
-			sysdev_class_unregister(&kbc_sysclass);
-        }
-
 	i8042_pm_dev = pm_register(PM_SYS_DEV, PM_SYS_UNKNOWN, i8042_pm_callback);
 
 	register_reboot_notifier(&i8042_notifier);
@@ -1001,24 +1042,23 @@
 	if (i8042_pm_dev)
 		pm_unregister(i8042_pm_dev);
 
-	if (i8042_sysdev_initialized) {
-		sysdev_unregister(&device_i8042);
-		sysdev_class_unregister(&kbc_sysclass);
-	}
-
 	i8042_controller_cleanup();
 
 	if (i8042_kbd_values.exists)
-		serio_unregister_port(&i8042_kbd_port);
+		serio_unregister_port(i8042_kbd_port);
 
 	if (i8042_aux_values.exists)
-		serio_unregister_port(&i8042_aux_port);
+		serio_unregister_port(i8042_aux_port);
 
-	for (i = 0; i < 4; i++)
+	for (i = 0; i < I8042_NUM_MUX_PORTS; i++)
 		if (i8042_mux_values[i].exists)
-			serio_unregister_port(i8042_mux_port + i);
+			serio_unregister_port(i8042_mux_port[i]);
+
 	del_timer_sync(&i8042_timer);
 
+	platform_device_unregister(i8042_platform_device);
+	driver_unregister(&i8042_driver);
+
 	i8042_platform_exit();
 }
 
--- diff/drivers/input/serio/i8042.h	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/serio/i8042.h	2004-07-01 21:32:36.000000000 +0100
@@ -104,6 +104,13 @@
 #define I8042_BUFFER_SIZE	32
 
 /*
+ * Number of AUX ports on controllers supporting active multiplexing
+ * specification
+ */
+
+#define I8042_NUM_MUX_PORTS	4
+
+/*
  * Debug.
  */
 
--- diff/drivers/input/serio/maceps2.c	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/serio/maceps2.c	2004-07-01 21:32:36.000000000 +0100
@@ -17,6 +17,7 @@
 #include <linux/device.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/err.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -46,15 +47,18 @@
 #define PS2_CONTROL_RX_CLOCK_ENABLE  BIT(4) /* pause reception if set to 0 */
 #define PS2_CONTROL_RESET            BIT(5) /* reset */
 
-
 struct maceps2_data {
 	struct mace_ps2port *port;
 	int irq;
 };
 
+static struct maceps2_data port_data[2];
+static struct serio *maceps2_port[2];
+static struct platform_device *maceps2_device;
+
 static int maceps2_write(struct serio *dev, unsigned char val)
 {
-	struct mace_ps2port *port = ((struct maceps2_data *)dev->driver)->port;
+	struct mace_ps2port *port = ((struct maceps2_data *)dev->port_data)->port;
 	unsigned int timeout = MACE_PS2_TIMEOUT;
 
 	do {
@@ -68,11 +72,10 @@
 	return -1;
 }
 
-static irqreturn_t maceps2_interrupt(int irq, void *dev_id,
-				     struct pt_regs *regs)
+static irqreturn_t maceps2_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct serio *dev = dev_id;
-	struct mace_ps2port *port = ((struct maceps2_data *)dev->driver)->port;
+	struct mace_ps2port *port = ((struct maceps2_data *)dev->port_data)->port;
 	unsigned int byte;
 
 	if (mace_read(port->status) & PS2_STATUS_RX_FULL) {
@@ -85,7 +88,7 @@
 
 static int maceps2_open(struct serio *dev)
 {
-	struct maceps2_data *data = (struct maceps2_data *)dev->driver;
+	struct maceps2_data *data = (struct maceps2_data *)dev->port_data;
 
 	if (request_irq(data->irq, maceps2_interrupt, 0, "PS/2 port", dev)) {
 		printk(KERN_ERR "Could not allocate PS/2 IRQ\n");
@@ -106,7 +109,7 @@
 
 static void maceps2_close(struct serio *dev)
 {
-	struct maceps2_data *data = (struct maceps2_data *)dev->driver;
+	struct maceps2_data *data = (struct maceps2_data *)dev->port_data;
 
 	mace_write(PS2_CONTROL_TX_CLOCK_DISABLE | PS2_CONTROL_RESET,
 		   data->port->control);
@@ -114,46 +117,59 @@
 	free_irq(data->irq, dev);
 }
 
-static struct maceps2_data port0_data, port1_data;
 
-static struct serio maceps2_port0 =
+static struct serio * __init maceps2_allocate_port(int idx)
 {
-	.type	= SERIO_8042,
-	.open	= maceps2_open,
-	.close	= maceps2_close,
-	.write	= maceps2_write,
-	.name	= "MACE PS/2 port0",
-	.phys	= "mace/serio0",
-	.driver = &port0_data,
-};
+	struct serio *serio;
+
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
+		memset(serio, 0, sizeof(struct serio));
+		serio->type		= SERIO_8042;
+		serio->write		= maceps2_write;
+		serio->open		= maceps2_open;
+		serio->close		= maceps2_close;
+		snprintf(serio->name, sizeof(serio->name), "MACE PS/2 port%d", idx);
+		snprintf(serio->phys, sizeof(serio->phys), "mace/serio%d", idx);
+		serio->port_data	= &port_data[idx];
+		serio->dev.parent	= &maceps2_device->dev;
+	}
+
+	return serio;
+}
 
-static struct serio maceps2_port1 =
-{
-	.type	= SERIO_8042,
-	.open	= maceps2_open,
-	.close	= maceps2_close,
-	.write	= maceps2_write,
-	.name	= "MACE PS/2 port1",
-	.phys	= "mace/serio1",
-	.driver = &port1_data,
-};
 
 static int __init maceps2_init(void)
 {
-	port0_data.port = &mace->perif.ps2.keyb;
-	port0_data.irq  = MACEISA_KEYB_IRQ;
-	port1_data.port = &mace->perif.ps2.mouse;
-	port1_data.irq  = MACEISA_MOUSE_IRQ;
-	serio_register_port(&maceps2_port0);
-	serio_register_port(&maceps2_port1);
+	maceps2_device = platform_device_register_simple("maceps2", -1, NULL, 0);
+	if (IS_ERR(maceps2_device))
+		return PTR_ERR(maceps2_device);
+
+	port_data[0].port = &mace->perif.ps2.keyb;
+	port_data[0].irq  = MACEISA_KEYB_IRQ;
+	port_data[1].port = &mace->perif.ps2.mouse;
+	port_data[1].irq  = MACEISA_MOUSE_IRQ;
+
+	maceps2_port[0] = maceps2_allocate_port(0);
+	maceps2_port[1] = maceps2_allocate_port(1);
+	if (!maceps2_port[0] || !maceps2_port[1]) {
+		kfree(maceps2_port[0]);
+		kfree(maceps2_port[1]);
+		platform_device_unregister(maceps2_device);
+		return -ENOMEM;
+	}
+
+	serio_register_port(maceps2_port[0]);
+	serio_register_port(maceps2_port[1]);
 
 	return 0;
 }
 
 static void __exit maceps2_exit(void)
 {
-	serio_unregister_port(&maceps2_port0);
-	serio_unregister_port(&maceps2_port1);
+	serio_unregister_port(maceps2_port[0]);
+	serio_unregister_port(maceps2_port[1]);
+	platform_device_unregister(maceps2_device);
 }
 
 module_init(maceps2_init);
--- diff/drivers/input/serio/parkbd.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/parkbd.c	2004-07-01 21:32:36.000000000 +0100
@@ -53,9 +53,7 @@
 static unsigned long parkbd_start;
 
 static struct pardevice *parkbd_dev;
-
-static char parkbd_name[] = "PARKBD AT/XT keyboard adapter";
-static char parkbd_phys[32];
+static struct serio *parkbd_port;
 
 static int parkbd_readlines(void)
 {
@@ -86,13 +84,6 @@
 	return 0;
 }
 
-static struct serio parkbd_port =
-{
-	.write	= parkbd_write,
-	.name	= parkbd_name,
-	.phys	= parkbd_phys,
-};
-
 static void parkbd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 
@@ -125,7 +116,7 @@
 		parkbd_buffer |= (parkbd_readlines() >> 1) << parkbd_counter++;
 
 		if (parkbd_counter == parkbd_mode + 10)
-			serio_interrupt(&parkbd_port, (parkbd_buffer >> (2 - parkbd_mode)) & 0xff, 0, regs);
+			serio_interrupt(parkbd_port, (parkbd_buffer >> (2 - parkbd_mode)) & 0xff, 0, regs);
 	}
 
 	parkbd_last = jiffies;
@@ -163,16 +154,38 @@
 	return 0;
 }
 
+static struct serio * __init parkbd_allocate_serio(void)
+{
+	struct serio *serio;
+
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
+		serio->type = parkbd_mode;
+		serio->write = parkbd_write,
+		strlcpy(serio->name, "PARKBD AT/XT keyboard adapter", sizeof(serio->name));
+		snprintf(serio->phys, sizeof(serio->phys), "%s/serio0", parkbd_dev->port->name);
+	}
+
+	return serio;
+}
 
 int __init parkbd_init(void)
 {
-	if (parkbd_getport()) return -1;
-	parkbd_writelines(3);
-	parkbd_port.type = parkbd_mode;
+	int err;
 
-	sprintf(parkbd_phys, "%s/serio0", parkbd_dev->port->name);
+	err = parkbd_getport();
+	if (err)
+		return err;
+
+	parkbd_port = parkbd_allocate_serio();
+	if (!parkbd_port) {
+		parport_release(parkbd_dev);
+		return -ENOMEM;
+	}
+
+	parkbd_writelines(3);
 
-	serio_register_port(&parkbd_port);
+	serio_register_port(parkbd_port);
 
 	printk(KERN_INFO "serio: PARKBD %s adapter on %s\n",
                         parkbd_mode ? "AT" : "XT", parkbd_dev->port->name);
@@ -183,7 +196,7 @@
 void __exit parkbd_exit(void)
 {
 	parport_release(parkbd_dev);
-	serio_unregister_port(&parkbd_port);
+	serio_unregister_port(parkbd_port);
 	parport_unregister_device(parkbd_dev);
 }
 
--- diff/drivers/input/serio/pcips2.c	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/serio/pcips2.c	2004-07-01 21:32:36.000000000 +0100
@@ -38,14 +38,14 @@
 #define PS2_STAT_TXEMPTY	(1<<7)
 
 struct pcips2_data {
-	struct serio	io;
+	struct serio	*io;
 	unsigned int	base;
 	struct pci_dev	*dev;
 };
 
 static int pcips2_write(struct serio *io, unsigned char val)
 {
-	struct pcips2_data *ps2if = io->driver;
+	struct pcips2_data *ps2if = io->port_data;
 	unsigned int stat;
 
 	do {
@@ -80,7 +80,7 @@
 		if (hweight8(scancode) & 1)
 			flag ^= SERIO_PARITY;
 
-		serio_interrupt(&ps2if->io, scancode, flag, regs);
+		serio_interrupt(ps2if->io, scancode, flag, regs);
 	} while (1);
 	return IRQ_RETVAL(handled);
 }
@@ -101,7 +101,7 @@
 
 static int pcips2_open(struct serio *io)
 {
-	struct pcips2_data *ps2if = io->driver;
+	struct pcips2_data *ps2if = io->port_data;
 	int ret, val = 0;
 
 	outb(PS2_CTRL_ENABLE, ps2if->base);
@@ -119,7 +119,7 @@
 
 static void pcips2_close(struct serio *io)
 {
-	struct pcips2_data *ps2if = io->driver;
+	struct pcips2_data *ps2if = io->port_data;
 
 	outb(0, ps2if->base);
 
@@ -129,6 +129,7 @@
 static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	struct pcips2_data *ps2if;
+	struct serio *serio;
 	int ret;
 
 	ret = pci_enable_device(dev);
@@ -142,29 +143,35 @@
 	}
 
 	ps2if = kmalloc(sizeof(struct pcips2_data), GFP_KERNEL);
-	if (!ps2if) {
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (!ps2if || !serio) {
 		ret = -ENOMEM;
 		goto release;
 	}
 
 	memset(ps2if, 0, sizeof(struct pcips2_data));
+	memset(serio, 0, sizeof(struct serio));
 
-	ps2if->io.type		= SERIO_8042;
-	ps2if->io.write		= pcips2_write;
-	ps2if->io.open		= pcips2_open;
-	ps2if->io.close		= pcips2_close;
-	ps2if->io.name		= pci_name(dev);
-	ps2if->io.phys		= dev->dev.bus_id;
-	ps2if->io.driver	= ps2if;
+	serio->type		= SERIO_8042;
+	serio->write		= pcips2_write;
+	serio->open		= pcips2_open;
+	serio->close		= pcips2_close;
+	strlcpy(serio->name, pci_name(dev), sizeof(serio->name));
+	strlcpy(serio->phys, dev->dev.bus_id, sizeof(serio->phys));
+	serio->port_data	= ps2if;
+	serio->dev.parent	= &dev->dev;
+	ps2if->io		= serio;
 	ps2if->dev		= dev;
 	ps2if->base		= pci_resource_start(dev, 0);
 
 	pci_set_drvdata(dev, ps2if);
 
-	serio_register_port(&ps2if->io);
+	serio_register_port(ps2if->io);
 	return 0;
 
  release:
+	kfree(ps2if);
+	kfree(serio);
 	release_region(pci_resource_start(dev, 0),
 		       pci_resource_len(dev, 0));
  disable:
@@ -176,7 +183,7 @@
 {
 	struct pcips2_data *ps2if = pci_get_drvdata(dev);
 
-	serio_unregister_port(&ps2if->io);
+	serio_unregister_port(ps2if->io);
 	release_region(pci_resource_start(dev, 0),
 		       pci_resource_len(dev, 0));
 	pci_set_drvdata(dev, NULL);
--- diff/drivers/input/serio/q40kbd.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/q40kbd.c	2004-07-01 21:32:36.000000000 +0100
@@ -35,6 +35,7 @@
 #include <linux/init.h>
 #include <linux/serio.h>
 #include <linux/interrupt.h>
+#include <linux/err.h>
 
 #include <asm/bitops.h>
 #include <asm/io.h>
@@ -47,43 +48,106 @@
 MODULE_DESCRIPTION("Q40 PS/2 keyboard controller driver");
 MODULE_LICENSE("GPL");
 
-static struct serio q40kbd_port =
-{
-	.type	= SERIO_8042,
-	.name	= "Q40 kbd port",
-	.phys	= "Q40",
-	.write	= NULL,
-};
+spinlock_t q40kbd_lock = SPIN_LOCK_UNLOCKED;
+static struct serio *q40kbd_port;
+static struct platform_device *q40kbd_device;
 
-static irqreturn_t q40kbd_interrupt(int irq, void *dev_id,
-				    struct pt_regs *regs)
+static irqreturn_t q40kbd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
+	unsigned long flags;
+
+	spin_lock_irqsave(&q40kbd_lock, flags);
+
 	if (Q40_IRQ_KEYB_MASK & master_inb(INTERRUPT_REG))
-		serio_interrupt(&q40kbd_port, master_inb(KEYCODE_REG), 0, regs);
+		serio_interrupt(q40kbd_port, master_inb(KEYCODE_REG), 0, regs);
 
 	master_outb(-1, KEYBOARD_UNLOCK_REG);
+
+	spin_unlock_irqrestore(&q40kbd_lock, flags);
+
 	return IRQ_HANDLED;
 }
 
-static int __init q40kbd_init(void)
+/*
+ * q40kbd_flush() flushes all data that may be in the keyboard buffers
+ */
+
+static void q40kbd_flush(void)
 {
-	int maxread = 100;
+ 	int maxread = 100;
+	unsigned long flags;
+
+	spin_lock_irqsave(&q40kbd_lock, flags);
+
+ 	while (maxread-- && (Q40_IRQ_KEYB_MASK & master_inb(INTERRUPT_REG)))
+ 		master_inb(KEYCODE_REG);
+
+	spin_unlock_irqrestore(&q40kbd_lock, flags);
+}
+
+/*
+ * q40kbd_open() is called when a port is open by the higher layer.
+ * It allocates the interrupt and enables in in the chip.
+ */
+
+static int q40kbd_open(struct serio *port)
+{
+	q40kbd_flush();
+
+	if (request_irq(Q40_IRQ_KEYBOARD, q40kbd_interrupt, 0, "q40kbd", NULL)) {
+		printk(KERN_ERR "q40kbd.c: Can't get irq %d.\n", Q40_IRQ_KEYBOARD);
+		return -1;
+	}
+
+ 	/* off we go */
+ 	master_outb(-1, KEYBOARD_UNLOCK_REG);
+ 	master_outb(1, KEY_IRQ_ENABLE_REG);
+
+ 	return 0;
+}
 
+static void q40kbd_close(struct serio *port)
+{
+	master_outb(0, KEY_IRQ_ENABLE_REG);
+	master_outb(-1, KEYBOARD_UNLOCK_REG);
+	free_irq(Q40_IRQ_KEYBOARD, NULL);
+
+	q40kbd_flush();
+}
+
+static struct serio * __init q40kbd_allocate_port(void)
+{
+	struct serio *serio;
+
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
+		memset(serio, 0, sizeof(struct serio));
+		serio->type		= SERIO_8042;
+		serio->open		= q40kbd_open;
+		serio->close		= q40kbd_close;
+		serio->dev.parent	= &q40kbd_device->dev;
+		strlcpy(serio->name, "Q40 Kbd Port", sizeof(serio->name));
+		strlcpy(serio->phys, "Q40", sizeof(serio->phys));
+	}
+
+	return serio;
+}
+
+static int __init q40kbd_init(void)
+{
 	if (!MACH_IS_Q40)
 		return -EIO;
 
-	/* allocate the IRQ */
-	request_irq(Q40_IRQ_KEYBOARD, q40kbd_interrupt, 0, "q40kbd", NULL);
-
-	/* flush any pending input */
-	while (maxread-- && (Q40_IRQ_KEYB_MASK & master_inb(INTERRUPT_REG)))
-		master_inb(KEYCODE_REG);
-
-	/* off we go */
-	master_outb(-1,KEYBOARD_UNLOCK_REG);
-	master_outb(1,KEY_IRQ_ENABLE_REG);
+	q40kbd_device = platform_device_register_simple("q40kbd", -1, NULL, 0);
+	if (IS_ERR(q40kbd_device))
+		return PTR_ERR(q40kbd_device);
+
+	if (!(q40kbd_port = q40kbd_allocate_port())) {
+		platform_device_unregister(q40kbd_device);
+		return -ENOMEM;
+	}
 
-	serio_register_port(&q40kbd_port);
+	serio_register_port(q40kbd_port);
 	printk(KERN_INFO "serio: Q40 kbd registered\n");
 
 	return 0;
@@ -91,11 +155,8 @@
 
 static void __exit q40kbd_exit(void)
 {
-	master_outb(0,KEY_IRQ_ENABLE_REG);
-	master_outb(-1,KEYBOARD_UNLOCK_REG);
-
-	serio_unregister_port(&q40kbd_port);
-	free_irq(Q40_IRQ_KEYBOARD, NULL);
+	serio_unregister_port(q40kbd_port);
+	platform_device_unregister(q40kbd_device);
 }
 
 module_init(q40kbd_init);
--- diff/drivers/input/serio/rpckbd.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/rpckbd.c	2004-07-01 21:32:36.000000000 +0100
@@ -33,6 +33,7 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/serio.h>
+#include <linux/err.h>
 
 #include <asm/irq.h>
 #include <asm/hardware.h>
@@ -44,6 +45,9 @@
 MODULE_DESCRIPTION("Acorn RiscPC PS/2 keyboard controller driver");
 MODULE_LICENSE("GPL");
 
+static struct serio *rpckbd_port;
+static struct platform_device *rpckbd_device;
+
 static int rpckbd_write(struct serio *port, unsigned char val)
 {
 	while (!(iomd_readb(IOMD_KCTRL) & (1 << 7)))
@@ -101,25 +105,49 @@
 	free_irq(IRQ_KEYBOARDTX, port);
 }
 
-static struct serio rpckbd_port =
-{
-	.type	= SERIO_8042,
-	.open	= rpckbd_open,
-	.close	= rpckbd_close,
-	.write	= rpckbd_write,
-	.name	= "RiscPC PS/2 kbd port",
-	.phys	= "rpckbd/serio0",
-};
+/*
+ * Allocate and initialize serio structure for subsequent registration
+ * with serio core.
+ */
+
+static struct serio * __init rpckbd_allocate_port(void)
+{
+	struct serio *serio;
+
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
+		memset(serio, 0, sizeof(struct serio));
+		serio->type		= SERIO_8042;
+		serio->write		= rpckbd_write;
+		serio->open		= rpckbd_open;
+		serio->close		= rpckbd_close;
+		serio->dev.parent	= &rpckbd_device->dev;
+		strlcpy(serio->name, "RiscPC PS/2 kbd port", sizeof(serio->name));
+		strlcpy(serio->phys, "rpckbd/serio0", sizeof(serio->phys));
+	}
+
+	return serio;
+}
 
 static int __init rpckbd_init(void)
 {
-	serio_register_port(&rpckbd_port);
+	rpckbd_device = platform_device_register_simple("rpckbd", -1, NULL, 0);
+	if (IS_ERR(rpckbd_device))
+		return PTR_ERR(rpckbd_device);
+
+	if (!(rpckbd_port = rpckbd_allocate_port())) {
+		platform_device_unregister(rpckbd_device);
+		return -ENOMEM;
+	}
+
+	serio_register_port(rpckbd_port);
 	return 0;
 }
 
 static void __exit rpckbd_exit(void)
 {
-	serio_unregister_port(&rpckbd_port);
+	serio_unregister_port(rpckbd_port);
+	platform_device_unregister(rpckbd_device);
 }
 
 module_init(rpckbd_init);
--- diff/drivers/input/serio/sa1111ps2.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/sa1111ps2.c	2004-07-01 21:32:36.000000000 +0100
@@ -26,7 +26,7 @@
 #include <asm/hardware/sa1111.h>
 
 struct ps2if {
-	struct serio		io;
+	struct serio		*io;
 	struct sa1111_dev	*dev;
 	unsigned long		base;
 	unsigned int		open;
@@ -59,7 +59,7 @@
 		if (hweight8(scancode) & 1)
 			flag ^= SERIO_PARITY;
 
-		serio_interrupt(&ps2if->io, scancode, flag, regs);
+		serio_interrupt(ps2if->io, scancode, flag, regs);
 
 		status = sa1111_readl(ps2if->base + SA1111_PS2STAT);
         }
@@ -95,7 +95,7 @@
  */
 static int ps2_write(struct serio *io, unsigned char val)
 {
-	struct ps2if *ps2if = io->driver;
+	struct ps2if *ps2if = io->port_data;
 	unsigned long flags;
 	unsigned int head;
 
@@ -122,7 +122,7 @@
 
 static int ps2_open(struct serio *io)
 {
-	struct ps2if *ps2if = io->driver;
+	struct ps2if *ps2if = io->port_data;
 	int ret;
 
 	sa1111_enable_device(ps2if->dev);
@@ -154,7 +154,7 @@
 
 static void ps2_close(struct serio *io)
 {
-	struct ps2if *ps2if = io->driver;
+	struct ps2if *ps2if = io->port_data;
 
 	sa1111_writel(0, ps2if->base + SA1111_PS2CR);
 
@@ -232,22 +232,28 @@
 static int ps2_probe(struct sa1111_dev *dev)
 {
 	struct ps2if *ps2if;
+	struct serio *serio;
 	int ret;
 
 	ps2if = kmalloc(sizeof(struct ps2if), GFP_KERNEL);
-	if (!ps2if) {
-		return -ENOMEM;
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (!ps2if || !serio) {
+		ret = -ENOMEM;
+		goto free;
 	}
 
 	memset(ps2if, 0, sizeof(struct ps2if));
+	memset(serio, 0, sizeof(struct serio));
 
-	ps2if->io.type		= SERIO_8042;
-	ps2if->io.write		= ps2_write;
-	ps2if->io.open		= ps2_open;
-	ps2if->io.close		= ps2_close;
-	ps2if->io.name		= dev->dev.bus_id;
-	ps2if->io.phys		= dev->dev.bus_id;
-	ps2if->io.driver	= ps2if;
+	serio->type		= SERIO_8042;
+	serio->write		= ps2_write;
+	serio->open		= ps2_open;
+	serio->close		= ps2_close;
+	strlcpy(serio->name, dev->dev.bus_id, sizeof(serio->name));
+	strlcpy(serio->phys, dev->dev.bus_id, sizeof(serio->phys));
+	serio->port_data	= ps2if;
+	serio->dev.parent	= &dev->dev;
+	ps2if->io		= serio;
 	ps2if->dev		= dev;
 	sa1111_set_drvdata(dev, ps2if);
 
@@ -292,7 +298,7 @@
 	ps2_clear_input(ps2if);
 
 	sa1111_disable_device(ps2if->dev);
-	serio_register_port(&ps2if->io);
+	serio_register_port(ps2if->io);
 	return 0;
 
  out:
@@ -302,6 +308,7 @@
  free:
 	sa1111_set_drvdata(dev, NULL);
 	kfree(ps2if);
+	kfree(serio);
 	return ret;
 }
 
@@ -312,7 +319,7 @@
 {
 	struct ps2if *ps2if = sa1111_get_drvdata(dev);
 
-	serio_unregister_port(&ps2if->io);
+	serio_unregister_port(ps2if->io);
 	release_mem_region(dev->res.start,
 			   dev->res.end - dev->res.start + 1);
 	sa1111_set_drvdata(dev, NULL);
--- diff/drivers/input/serio/serio.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/serio.c	2004-07-01 21:32:36.000000000 +0100
@@ -1,11 +1,9 @@
 /*
- * $Id: serio.c,v 1.15 2002/01/22 21:12:03 vojtech Exp $
- *
- *  Copyright (c) 1999-2001 Vojtech Pavlik
- */
-
-/*
  *  The Serio abstraction module
+ *
+ *  Copyright (c) 1999-2004 Vojtech Pavlik
+ *  Copyright (c) 2004 Dmitry Torokhov
+ *  Copyright (c) 2003 Daniele Bellucci
  */
 
 /*
@@ -26,10 +24,6 @@
  * Should you need to contact me, the author, you can do so either by
  * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
  * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
- *
- * Changes:
- * 20 Jul. 2003    Daniele Bellucci <bellucda@tiscali.it>
- *                 Minor cleanups.
  */
 
 #include <linux/stddef.h>
@@ -50,100 +44,178 @@
 EXPORT_SYMBOL(serio_interrupt);
 EXPORT_SYMBOL(serio_register_port);
 EXPORT_SYMBOL(serio_register_port_delayed);
-EXPORT_SYMBOL(__serio_register_port);
 EXPORT_SYMBOL(serio_unregister_port);
 EXPORT_SYMBOL(serio_unregister_port_delayed);
-EXPORT_SYMBOL(__serio_unregister_port);
-EXPORT_SYMBOL(serio_register_device);
-EXPORT_SYMBOL(serio_unregister_device);
+EXPORT_SYMBOL(serio_register_driver);
+EXPORT_SYMBOL(serio_unregister_driver);
 EXPORT_SYMBOL(serio_open);
 EXPORT_SYMBOL(serio_close);
 EXPORT_SYMBOL(serio_rescan);
 EXPORT_SYMBOL(serio_reconnect);
 
+static DECLARE_MUTEX(serio_sem);	/* protects serio_list and serio_diriver_list */
+static LIST_HEAD(serio_list);
+static LIST_HEAD(serio_driver_list);
+static unsigned int serio_no;
+
+struct bus_type serio_bus = {
+	.name =	"serio",
+};
+
+static void serio_find_driver(struct serio *serio);
+static void serio_create_port(struct serio *serio);
+static void serio_destroy_port(struct serio *serio);
+static void serio_connect_port(struct serio *serio, struct serio_driver *drv);
+static void serio_reconnect_port(struct serio *serio);
+static void serio_disconnect_port(struct serio *serio);
+
+static int serio_bind_driver(struct serio *serio, struct serio_driver *drv)
+{
+	get_driver(&drv->driver);
+
+	drv->connect(serio, drv);
+	if (serio->drv) {
+		down_write(&serio_bus.subsys.rwsem);
+		serio->dev.driver = &drv->driver;
+		device_bind_driver(&serio->dev);
+		up_write(&serio_bus.subsys.rwsem);
+		return 1;
+	}
+
+	put_driver(&drv->driver);
+	return 0;
+}
+
+/* serio_find_driver() must be called with serio_sem down.  */
+static void serio_find_driver(struct serio *serio)
+{
+	struct serio_driver *drv;
+
+	list_for_each_entry(drv, &serio_driver_list, node)
+		if (!drv->manual_bind)
+			if (serio_bind_driver(serio, drv))
+				break;
+}
+
+/*
+ * Serio event processing.
+ */
+
 struct serio_event {
 	int type;
 	struct serio *serio;
 	struct list_head node;
 };
 
-static DECLARE_MUTEX(serio_sem);
-static LIST_HEAD(serio_list);
-static LIST_HEAD(serio_dev_list);
+enum serio_event_type {
+	SERIO_RESCAN,
+	SERIO_RECONNECT,
+	SERIO_REGISTER_PORT,
+	SERIO_UNREGISTER_PORT,
+};
+
+static spinlock_t serio_event_lock = SPIN_LOCK_UNLOCKED;	/* protects serio_event_list */
 static LIST_HEAD(serio_event_list);
+static DECLARE_WAIT_QUEUE_HEAD(serio_wait);
+static DECLARE_COMPLETION(serio_exited);
 static int serio_pid;
 
-static void serio_find_dev(struct serio *serio)
+static void serio_queue_event(struct serio *serio, int event_type)
 {
-	struct serio_dev *dev;
+	unsigned long flags;
+	struct serio_event *event;
 
-	list_for_each_entry(dev, &serio_dev_list, node) {
-		if (serio->dev)
-			break;
-		if (dev->connect)
-			dev->connect(serio, dev);
-	}
-}
+	spin_lock_irqsave(&serio_event_lock, flags);
 
-#define SERIO_RESCAN		1
-#define SERIO_RECONNECT		2
-#define SERIO_REGISTER_PORT	3
-#define SERIO_UNREGISTER_PORT	4
+	if ((event = kmalloc(sizeof(struct serio_event), GFP_ATOMIC))) {
+		event->type = event_type;
+		event->serio = serio;
 
-static DECLARE_WAIT_QUEUE_HEAD(serio_wait);
-static DECLARE_COMPLETION(serio_exited);
+		list_add_tail(&event->node, &serio_event_list);
+		wake_up(&serio_wait);
+	}
 
-static void serio_invalidate_pending_events(struct serio *serio)
+	spin_unlock_irqrestore(&serio_event_lock, flags);
+}
+
+static struct serio_event *serio_get_event(void)
 {
 	struct serio_event *event;
+	struct list_head *node;
+	unsigned long flags;
+
+	spin_lock_irqsave(&serio_event_lock, flags);
+
+	if (list_empty(&serio_event_list)) {
+		spin_unlock_irqrestore(&serio_event_lock, flags);
+		return NULL;
+	}
+
+	node = serio_event_list.next;
+	event = container_of(node, struct serio_event, node);
+	list_del_init(node);
 
-	list_for_each_entry(event, &serio_event_list, node)
-		if (event->serio == serio)
-			event->serio = NULL;
+	spin_unlock_irqrestore(&serio_event_lock, flags);
+
+	return event;
 }
 
-void serio_handle_events(void)
+static void serio_handle_events(void)
 {
-	struct list_head *node, *next;
 	struct serio_event *event;
 
-	list_for_each_safe(node, next, &serio_event_list) {
-		event = container_of(node, struct serio_event, node);
+	while ((event = serio_get_event())) {
 
 		down(&serio_sem);
-		if (event->serio == NULL)
-			goto event_done;
 
 		switch (event->type) {
 			case SERIO_REGISTER_PORT :
-				__serio_register_port(event->serio);
+				serio_create_port(event->serio);
+				serio_connect_port(event->serio, NULL);
 				break;
 
 			case SERIO_UNREGISTER_PORT :
-				__serio_unregister_port(event->serio);
+				serio_disconnect_port(event->serio);
+				serio_destroy_port(event->serio);
 				break;
 
 			case SERIO_RECONNECT :
-				if (event->serio->dev && event->serio->dev->reconnect)
-					if (event->serio->dev->reconnect(event->serio) == 0)
-						break;
-				/* reconnect failed - fall through to rescan */
+				serio_reconnect_port(event->serio);
+				break;
 
 			case SERIO_RESCAN :
-				if (event->serio->dev && event->serio->dev->disconnect)
-					event->serio->dev->disconnect(event->serio);
-				serio_find_dev(event->serio);
+				serio_disconnect_port(event->serio);
+				serio_connect_port(event->serio, NULL);
 				break;
 			default:
 				break;
 		}
-event_done:
+
 		up(&serio_sem);
-		list_del_init(node);
 		kfree(event);
 	}
 }
 
+static void serio_remove_pending_events(struct serio *serio)
+{
+	struct list_head *node, *next;
+	struct serio_event *event;
+	unsigned long flags;
+
+	spin_lock_irqsave(&serio_event_lock, flags);
+
+	list_for_each_safe(node, next, &serio_event_list) {
+		event = container_of(node, struct serio_event, node);
+		if (event->serio == serio) {
+			list_del_init(node);
+			kfree(event);
+		}
+	}
+
+	spin_unlock_irqrestore(&serio_event_lock, flags);
+}
+
+
 static int serio_thread(void *nothing)
 {
 	lock_kernel();
@@ -163,52 +235,219 @@
 	complete_and_exit(&serio_exited, 0);
 }
 
-static void serio_queue_event(struct serio *serio, int event_type)
+
+/*
+ * Serio port operations
+ */
+
+static ssize_t serio_show_description(struct device *dev, char *buf)
 {
-	struct serio_event *event;
+	struct serio *serio = to_serio_port(dev);
+	return sprintf(buf, "%s\n", serio->name);
+}
 
-	if ((event = kmalloc(sizeof(struct serio_event), GFP_ATOMIC))) {
-		event->type = event_type;
-		event->serio = serio;
+static ssize_t serio_show_legacy_position(struct device *dev, char *buf)
+{
+	struct serio *serio = to_serio_port(dev);
+	return sprintf(buf, "%s\n", serio->phys);
+}
 
-		list_add_tail(&event->node, &serio_event_list);
-		wake_up(&serio_wait);
+static ssize_t serio_show_driver(struct device *dev, char *buf)
+{
+	return sprintf(buf, "%s\n", dev->driver ? dev->driver->name : "(none)");
+}
+
+static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t count)
+{
+	struct serio *serio = to_serio_port(dev);
+	struct device_driver *drv;
+	int retval;
+
+	retval = down_interruptible(&serio_sem);
+	if (retval)
+		return retval;
+
+	retval = count;
+	if (!strncmp(buf, "none", count)) {
+		serio_disconnect_port(serio);
+	} else if (!strncmp(buf, "reconnect", count)) {
+		serio_reconnect_port(serio);
+	} else if (!strncmp(buf, "rescan", count)) {
+		serio_disconnect_port(serio);
+		serio_connect_port(serio, NULL);
+	} else if ((drv = driver_find(buf, &serio_bus)) != NULL) {
+		serio_disconnect_port(serio);
+		serio_connect_port(serio, to_serio_driver(drv));
+	} else {
+		retval = -EINVAL;
 	}
+
+	up(&serio_sem);
+
+	return retval;
 }
 
-void serio_rescan(struct serio *serio)
+static struct device_attribute serio_device_attrs[] = {
+	__ATTR(description, S_IRUGO, serio_show_description, NULL),
+	__ATTR(legacy_position, S_IRUGO, serio_show_legacy_position, NULL),
+	__ATTR(driver, S_IWUSR | S_IRUGO, serio_show_driver, serio_rebind_driver),
+	__ATTR_NULL
+};
+
+
+static void serio_release_port(struct device *dev)
 {
-	serio_queue_event(serio, SERIO_RESCAN);
+	struct serio *serio = to_serio_port(dev);
+
+	kfree(serio);
+	module_put(THIS_MODULE);
 }
 
-void serio_reconnect(struct serio *serio)
+static void serio_create_port(struct serio *serio)
 {
-	serio_queue_event(serio, SERIO_RECONNECT);
+	try_module_get(THIS_MODULE);
+
+	spin_lock_init(&serio->lock);
+	list_add_tail(&serio->node, &serio_list);
+	snprintf(serio->dev.bus_id, sizeof(serio->dev.bus_id), "serio%d", serio_no++);
+	serio->dev.bus = &serio_bus;
+	serio->dev.release = serio_release_port;
+	if (serio->parent)
+		serio->dev.parent = &serio->parent->dev;
+	device_register(&serio->dev);
 }
 
-irqreturn_t serio_interrupt(struct serio *serio,
-		unsigned char data, unsigned int flags, struct pt_regs *regs)
+/*
+ * serio_destroy_port() completes deregistration process and removes
+ * port from the system
+ */
+static void serio_destroy_port(struct serio *serio)
 {
-	irqreturn_t ret = IRQ_NONE;
+	struct serio_driver *drv = serio->drv;
+	unsigned long flags;
 
-        if (serio->dev && serio->dev->interrupt) {
-                ret = serio->dev->interrupt(serio, data, flags, regs);
-	} else {
-		if (!flags) {
-			if ((serio->type == SERIO_8042 ||
-				serio->type == SERIO_8042_XL) && (data != 0xaa))
-					return ret;
-			serio_rescan(serio);
-			ret = IRQ_HANDLED;
+	serio_remove_pending_events(serio);
+	list_del_init(&serio->node);
+
+	if (drv) {
+		drv->disconnect(serio);
+		down_write(&serio_bus.subsys.rwsem);
+		device_release_driver(&serio->dev);
+		up_write(&serio_bus.subsys.rwsem);
+		put_driver(&drv->driver);
+	}
+
+	if (serio->parent) {
+		spin_lock_irqsave(&serio->parent->lock, flags);
+		serio->parent->child = NULL;
+		spin_unlock_irqrestore(&serio->parent->lock, flags);
+	}
+
+	device_unregister(&serio->dev);
+}
+
+/*
+ * serio_connect_port() tries to bind the port and possible all its
+ * children to appropriate drivers. If driver passed in the function will not
+ * try otehr drivers when binding parent port.
+ */
+static void serio_connect_port(struct serio *serio, struct serio_driver *drv)
+{
+	WARN_ON(serio->drv);
+	WARN_ON(serio->child);
+
+	if (drv)
+		serio_bind_driver(serio, drv);
+	else
+		serio_find_driver(serio);
+
+	/* Ok, now bind children, if any */
+	while (serio->child) {
+		serio = serio->child;
+
+		WARN_ON(serio->drv);
+		WARN_ON(serio->child);
+
+		serio_create_port(serio);
+
+		/*
+		 * With children we just _prefer_ passed in driver,
+		 * but we will try other options in case preferred
+		 * is not the one
+		 */
+		if (!drv || !serio_bind_driver(serio, drv))
+			serio_find_driver(serio);
+	}
+}
+
+/*
+ *
+ */
+static void serio_reconnect_port(struct serio *serio)
+{
+	do {
+		if (!serio->drv || !serio->drv->reconnect || serio->drv->reconnect(serio)) {
+			serio_disconnect_port(serio);
+			serio_connect_port(serio, NULL);
+			/* Ok, old children are now gone, we are done */
+			break;
+		}
+		serio = serio->child;
+	} while (serio);
+}
+
+/*
+ * serio_disconnect_port() unbinds a port from its driver. As a side effect
+ * all child ports are unbound and destroyed.
+ */
+static void serio_disconnect_port(struct serio *serio)
+{
+	struct serio_driver *drv = serio->drv;
+	struct serio *s;
+
+	if (serio->child) {
+		/*
+		 * Children ports should be disconnected and destroyed
+		 * first, staring with the leaf one, since we don't want
+		 * to do recursion
+		 */
+		do {
+			s = serio->child;
+		} while (s->child);
+
+		while (s != serio) {
+			s = s->parent;
+			serio_destroy_port(s->child);
 		}
 	}
-	return ret;
+
+	/*
+	 * Ok, no children left, now disconnect this port
+	 */
+	if (drv) {
+		drv->disconnect(serio);
+		down_write(&serio_bus.subsys.rwsem);
+		device_release_driver(&serio->dev);
+		up_write(&serio_bus.subsys.rwsem);
+		put_driver(&drv->driver);
+	}
+}
+
+void serio_rescan(struct serio *serio)
+{
+	serio_queue_event(serio, SERIO_RESCAN);
+}
+
+void serio_reconnect(struct serio *serio)
+{
+	serio_queue_event(serio, SERIO_RECONNECT);
 }
 
 void serio_register_port(struct serio *serio)
 {
 	down(&serio_sem);
-	__serio_register_port(serio);
+	serio_create_port(serio);
+	serio_connect_port(serio, NULL);
 	up(&serio_sem);
 }
 
@@ -222,21 +461,11 @@
 	serio_queue_event(serio, SERIO_REGISTER_PORT);
 }
 
-/*
- * Should only be called directly if serio_sem has already been taken,
- * for example when unregistering a serio from other input device's
- * connect() function.
- */
-void __serio_register_port(struct serio *serio)
-{
-	list_add_tail(&serio->node, &serio_list);
-	serio_find_dev(serio);
-}
-
 void serio_unregister_port(struct serio *serio)
 {
 	down(&serio_sem);
-	__serio_unregister_port(serio);
+	serio_disconnect_port(serio);
+	serio_destroy_port(serio);
 	up(&serio_sem);
 }
 
@@ -250,82 +479,147 @@
 	serio_queue_event(serio, SERIO_UNREGISTER_PORT);
 }
 
+
 /*
- * Should only be called directly if serio_sem has already been taken,
- * for example when unregistering a serio from other input device's
- * disconnect() function.
+ * Serio driver operations
  */
-void __serio_unregister_port(struct serio *serio)
+
+static ssize_t serio_driver_show_description(struct device_driver *drv, char *buf)
 {
-	serio_invalidate_pending_events(serio);
-	list_del_init(&serio->node);
-	if (serio->dev && serio->dev->disconnect)
-		serio->dev->disconnect(serio);
+	struct serio_driver *driver = to_serio_driver(drv);
+	return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)");
 }
 
-void serio_register_device(struct serio_dev *dev)
+static struct driver_attribute serio_driver_attrs[] = {
+	__ATTR(description, S_IRUGO, serio_driver_show_description, NULL),
+	__ATTR_NULL
+};
+
+void serio_register_driver(struct serio_driver *drv)
 {
 	struct serio *serio;
+
 	down(&serio_sem);
-	list_add_tail(&dev->node, &serio_dev_list);
-	list_for_each_entry(serio, &serio_list, node)
-		if (!serio->dev && dev->connect)
-			dev->connect(serio, dev);
+
+	list_add_tail(&drv->node, &serio_driver_list);
+
+	drv->driver.bus = &serio_bus;
+	driver_register(&drv->driver);
+
+	if (drv->manual_bind)
+		goto out;
+
+start_over:
+	list_for_each_entry(serio, &serio_list, node) {
+		if (!serio->drv) {
+			serio_connect_port(serio, drv);
+			/*
+			 * if new child appeared then the list is changed,
+			 * we need to start over
+			 */
+			if (serio->child)
+				goto start_over;
+		}
+	}
+
+out:
 	up(&serio_sem);
 }
 
-void serio_unregister_device(struct serio_dev *dev)
+void serio_unregister_driver(struct serio_driver *drv)
 {
 	struct serio *serio;
 
 	down(&serio_sem);
-	list_del_init(&dev->node);
 
+	list_del_init(&drv->node);
+
+start_over:
 	list_for_each_entry(serio, &serio_list, node) {
-		if (serio->dev == dev && dev->disconnect)
-			dev->disconnect(serio);
-		serio_find_dev(serio);
+		if (serio->drv == drv) {
+			serio_disconnect_port(serio);
+			serio_connect_port(serio, NULL);
+			/* we could've deleted some ports, restart */
+			goto start_over;
+		}
 	}
+
+	driver_unregister(&drv->driver);
+
 	up(&serio_sem);
 }
 
-/* called from serio_dev->connect/disconnect methods under serio_sem */
-int serio_open(struct serio *serio, struct serio_dev *dev)
+/* called from serio_driver->connect/disconnect methods under serio_sem */
+int serio_open(struct serio *serio, struct serio_driver *drv)
 {
-	serio->dev = dev;
+	unsigned long flags;
+
+	spin_lock_irqsave(&serio->lock, flags);
+	serio->drv = drv;
+	spin_unlock_irqrestore(&serio->lock, flags);
 	if (serio->open && serio->open(serio)) {
-		serio->dev = NULL;
+		spin_lock_irqsave(&serio->lock, flags);
+		serio->drv = NULL;
+		spin_unlock_irqrestore(&serio->lock, flags);
 		return -1;
 	}
 	return 0;
 }
 
-/* called from serio_dev->connect/disconnect methods under serio_sem */
+/* called from serio_driver->connect/disconnect methods under serio_sem */
 void serio_close(struct serio *serio)
 {
+	unsigned long flags;
+
 	if (serio->close)
 		serio->close(serio);
-	serio->dev = NULL;
+	spin_lock_irqsave(&serio->lock, flags);
+	serio->drv = NULL;
+	spin_unlock_irqrestore(&serio->lock, flags);
 }
 
-static int __init serio_init(void)
+irqreturn_t serio_interrupt(struct serio *serio,
+		unsigned char data, unsigned int dfl, struct pt_regs *regs)
 {
-	int pid;
+	unsigned long flags;
+	irqreturn_t ret = IRQ_NONE;
+
+	spin_lock_irqsave(&serio->lock, flags);
+
+        if (likely(serio->drv)) {
+                ret = serio->drv->interrupt(serio, data, dfl, regs);
+	} else {
+		if (!dfl) {
+			if ((serio->type != SERIO_8042 &&
+			     serio->type != SERIO_8042_XL) || (data == 0xaa)) {
+				serio_rescan(serio);
+				ret = IRQ_HANDLED;
+			}
+		}
+	}
 
-	pid = kernel_thread(serio_thread, NULL, CLONE_KERNEL);
+	spin_unlock_irqrestore(&serio->lock, flags);
 
-	if (!pid) {
+	return ret;
+}
+
+static int __init serio_init(void)
+{
+	if (!(serio_pid = kernel_thread(serio_thread, NULL, CLONE_KERNEL))) {
 		printk(KERN_WARNING "serio: Failed to start kseriod\n");
 		return -1;
 	}
 
-	serio_pid = pid;
+	serio_bus.dev_attrs = serio_device_attrs;
+	serio_bus.drv_attrs = serio_driver_attrs;
+	bus_register(&serio_bus);
 
 	return 0;
 }
 
 static void __exit serio_exit(void)
 {
+	bus_unregister(&serio_bus);
 	kill_proc(serio_pid, SIGTERM, 1);
 	wait_for_completion(&serio_exited);
 }
--- diff/drivers/input/serio/serport.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/serport.c	2004-07-01 21:32:36.000000000 +0100
@@ -31,28 +31,25 @@
 struct serport {
 	struct tty_struct *tty;
 	wait_queue_head_t wait;
-	struct serio serio;
+	struct serio *serio;
 	unsigned long flags;
-	char phys[32];
 };
 
-char serport_name[] = "Serial port";
-
 /*
  * Callback functions from the serio code.
  */
 
 static int serport_serio_write(struct serio *serio, unsigned char data)
 {
-	struct serport *serport = serio->driver;
+	struct serport *serport = serio->port_data;
 	return -(serport->tty->driver->write(serport->tty, 0, &data, 1) != 1);
 }
 
 static void serport_serio_close(struct serio *serio)
 {
-	struct serport *serport = serio->driver;
+	struct serport *serport = serio->port_data;
 
-	serport->serio.type = 0;
+	serport->serio->type = 0;
 	wake_up_interruptible(&serport->wait);
 }
 
@@ -64,26 +61,30 @@
 static int serport_ldisc_open(struct tty_struct *tty)
 {
 	struct serport *serport;
+	struct serio *serio;
 	char name[64];
 
 	serport = kmalloc(sizeof(struct serport), GFP_KERNEL);
-	if (unlikely(!serport))
+	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (unlikely(!serport || !serio)) {
+		kfree(serport);
+		kfree(serio);
 		return -ENOMEM;
-	memset(serport, 0, sizeof(struct serport));
+	}
 
+	memset(serport, 0, sizeof(struct serport));
+	serport->serio = serio;
 	set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
 	serport->tty = tty;
 	tty->disc_data = serport;
 
-	snprintf(serport->phys, sizeof(serport->phys), "%s/serio0", tty_name(tty, name));
-
-	serport->serio.name = serport_name;
-	serport->serio.phys = serport->phys;
-
-	serport->serio.type = SERIO_RS232;
-	serport->serio.write = serport_serio_write;
-	serport->serio.close = serport_serio_close;
-	serport->serio.driver = serport;
+	memset(serio, 0, sizeof(struct serio));
+	strlcpy(serio->name, "Serial port", sizeof(serio->name));
+	snprintf(serio->phys, sizeof(serio->phys), "%s/serio0", tty_name(tty, name));
+	serio->type = SERIO_RS232;
+	serio->write = serport_serio_write;
+	serio->close = serport_serio_close;
+	serio->port_data = serport;
 
 	init_waitqueue_head(&serport->wait);
 
@@ -114,7 +115,7 @@
 	struct serport *serport = (struct serport*) tty->disc_data;
 	int i;
 	for (i = 0; i < count; i++)
-		serio_interrupt(&serport->serio, cp[i], 0, NULL);
+		serio_interrupt(serport->serio, cp[i], 0, NULL);
 }
 
 /*
@@ -142,10 +143,10 @@
 	if (test_and_set_bit(SERPORT_BUSY, &serport->flags))
 		return -EBUSY;
 
-	serio_register_port(&serport->serio);
+	serio_register_port(serport->serio);
 	printk(KERN_INFO "serio: Serial port %s\n", tty_name(tty, name));
-	wait_event_interruptible(serport->wait, !serport->serio.type);
-	serio_unregister_port(&serport->serio);
+	wait_event_interruptible(serport->wait, !serport->serio->type);
+	serio_unregister_port(serport->serio);
 
 	clear_bit(SERPORT_BUSY, &serport->flags);
 
@@ -161,7 +162,7 @@
 	struct serport *serport = (struct serport*) tty->disc_data;
 
 	if (cmd == SPIOCSTYPE)
-		return get_user(serport->serio.type, (unsigned long __user *) arg);
+		return get_user(serport->serio->type, (unsigned long __user *) arg);
 
 	return -EINVAL;
 }
@@ -170,7 +171,7 @@
 {
 	struct serport *sp = (struct serport *) tty->disc_data;
 
-	serio_dev_write_wakeup(&sp->serio);
+	serio_drv_write_wakeup(sp->serio);
 }
 
 /*
--- diff/drivers/input/touchscreen/gunze.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/touchscreen/gunze.c	2004-07-01 21:32:36.000000000 +0100
@@ -36,8 +36,10 @@
 #include <linux/serio.h>
 #include <linux/init.h>
 
+#define DRIVER_DESC	"Gunze AHL-51S touchscreen driver"
+
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("Gunze AHL-51S touchscreen driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 /*
@@ -111,7 +113,7 @@
  * and if yes, registers it as an input device.
  */
 
-static void gunze_connect(struct serio *serio, struct serio_dev *dev)
+static void gunze_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct gunze *gunze;
 
@@ -142,7 +144,7 @@
 	gunze->dev.id.product = 0x0051;
 	gunze->dev.id.version = 0x0100;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
 		kfree(gunze);
 		return;
 	}
@@ -156,10 +158,14 @@
  * The serio device structure.
  */
 
-static struct serio_dev gunze_dev = {
-	.interrupt =	gunze_interrupt,
-	.connect =	gunze_connect,
-	.disconnect =	gunze_disconnect,
+static struct serio_driver gunze_drv = {
+	.driver		= {
+		.name	= "gunze",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= gunze_interrupt,
+	.connect	= gunze_connect,
+	.disconnect	= gunze_disconnect,
 };
 
 /*
@@ -168,13 +174,13 @@
 
 int __init gunze_init(void)
 {
-	serio_register_device(&gunze_dev);
+	serio_register_driver(&gunze_drv);
 	return 0;
 }
 
 void __exit gunze_exit(void)
 {
-	serio_unregister_device(&gunze_dev);
+	serio_unregister_driver(&gunze_drv);
 }
 
 module_init(gunze_init);
--- diff/drivers/input/touchscreen/h3600_ts_input.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/touchscreen/h3600_ts_input.c	2004-07-01 21:32:36.000000000 +0100
@@ -45,8 +45,10 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/irqs.h>
 
+#define DRIVER_DESC	"H3600 touchscreen driver"
+
 MODULE_AUTHOR("James Simmons <jsimmons@transvirtual.com>");
-MODULE_DESCRIPTION("H3600 touchscreen driver");
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 /*
@@ -373,7 +375,7 @@
  * new serio device. It looks whether it was registered as a H3600 touchscreen
  * and if yes, registers it as an input device.
  */
-static void h3600ts_connect(struct serio *serio, struct serio_dev *dev)
+static void h3600ts_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct h3600_dev *ts;
 
@@ -441,7 +443,7 @@
 	ts->dev.id.product = 0x0666;  /* FIXME !!! We can ask the hardware */
 	ts->dev.id.version = 0x0100;
 
-	if (serio_open(serio, dev)) {
+	if (serio_open(serio, drv)) {
         	free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts);
         	free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts);
 		kfree(ts);
@@ -478,10 +480,14 @@
  * The serio device structure.
  */
 
-static struct serio_dev h3600ts_dev = {
-	.interrupt =	h3600ts_interrupt,
-	.connect =	h3600ts_connect,
-	.disconnect =	h3600ts_disconnect,
+static struct serio_driver h3600ts_drv = {
+	.driver		= {
+		.name	= "h3600ts",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= h3600ts_interrupt,
+	.connect	= h3600ts_connect,
+	.disconnect	= h3600ts_disconnect,
 };
 
 /*
@@ -490,13 +496,13 @@
 
 static int __init h3600ts_init(void)
 {
-	serio_register_device(&h3600ts_dev);
+	serio_register_driver(&h3600ts_drv);
 	return 0;
 }
 
 static void __exit h3600ts_exit(void)
 {
-	serio_unregister_device(&h3600ts_dev);
+	serio_unregister_driver(&h3600ts_drv);
 }
 
 module_init(h3600ts_init);
--- diff/drivers/input/tsdev.c	2004-05-19 22:11:43.000000000 +0100
+++ source/drivers/input/tsdev.c	2004-07-01 21:32:36.000000000 +0100
@@ -3,9 +3,17 @@
  *
  *  Copyright (c) 2001 "Crazy" james Simmons 
  *
- *  Input driver to Touchscreen device driver module.
+ *  Compaq touchscreen protocol driver. The protocol emulated by this driver
+ *  is obsolete; for new programs use the tslib library which can read directly
+ *  from evdev and perform dejittering, variance filtering and calibration -
+ *  all in user space, not at kernel level. The meaning of this driver is
+ *  to allow usage of newer input drivers with old applications that use the
+ *  old /dev/h3600_ts and /dev/h3600_tsraw devices.
  *
- *  Sponsored by Transvirtual Technology
+ *  09-Apr-2004: Andrew Zabolotny <zap@homelink.ru>
+ *      Fixed to actually work, not just output random numbers.
+ *      Added support for both h3600_ts and h3600_tsraw protocol
+ *      emulation.
  */
 
 /*
@@ -24,11 +32,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  * 
  * Should you need to contact me, the author, you can do so either by
- * e-mail - mail your message to <jsimmons@transvirtual.com>.
+ * e-mail - mail your message to <jsimmons@infradead.org>.
  */
 
 #define TSDEV_MINOR_BASE 	128
 #define TSDEV_MINORS		32
+/* First 16 devices are h3600_ts compatible; second 16 are h3600_tsraw */
+#define TSDEV_MINOR_MASK	15
 #define TSDEV_BUFFER_SIZE	64
 
 #include <linux/slab.h>
@@ -52,48 +62,84 @@
 #define CONFIG_INPUT_TSDEV_SCREEN_Y	320
 #endif
 
+/* This driver emulates both protocols of the old h3600_ts and h3600_tsraw
+ * devices. The first one must output X/Y data in 'cooked' format, e.g.
+ * filtered, dejittered and calibrated. Second device just outputs raw
+ * data received from the hardware.
+ *
+ * This driver doesn't support filtering and dejittering; it supports only
+ * calibration. Filtering and dejittering must be done in the low-level
+ * driver, if needed, because it may gain additional benefits from knowing
+ * the low-level details, the nature of noise and so on.
+ *
+ * The driver precomputes a calibration matrix given the initial xres and
+ * yres values (quite innacurate for most touchscreens) that will result
+ * in a more or less expected range of output values. The driver supports
+ * the TS_SET_CAL ioctl, which will replace the calibration matrix with a
+ * new one, supposedly generated from the values taken from the raw device.
+ */
+
 MODULE_AUTHOR("James Simmons <jsimmons@transvirtual.com>");
 MODULE_DESCRIPTION("Input driver to touchscreen converter");
 MODULE_LICENSE("GPL");
 
 static int xres = CONFIG_INPUT_TSDEV_SCREEN_X;
 module_param(xres, uint, 0);
-MODULE_PARM_DESC(xres, "Horizontal screen resolution");
+MODULE_PARM_DESC(xres, "Horizontal screen resolution (can be negative for X-mirror)");
 
 static int yres = CONFIG_INPUT_TSDEV_SCREEN_Y;
 module_param(yres, uint, 0);
-MODULE_PARM_DESC(yres, "Vertical screen resolution");
+MODULE_PARM_DESC(yres, "Vertical screen resolution (can be negative for Y-mirror)");
+
+/* From Compaq's Touch Screen Specification version 0.2 (draft) */
+struct ts_event {
+	short pressure;
+	short x;
+	short y;
+	short millisecs;
+};
+
+struct ts_calibration {
+	int xscale;
+	int xtrans;
+	int yscale;
+	int ytrans;
+	int xyswap;
+};
 
 struct tsdev {
 	int exist;
 	int open;
 	int minor;
-	char name[16];
+	char name[8];
 	wait_queue_head_t wait;
 	struct list_head list;
 	struct input_handle handle;
+	int x, y, pressure;
+	struct ts_calibration cal;
 };
 
-/* From Compaq's Touch Screen Specification version 0.2 (draft) */
-typedef struct {
-	short pressure;
-	short x;
-	short y;
-	short millisecs;
-} TS_EVENT;
-
 struct tsdev_list {
 	struct fasync_struct *fasync;
 	struct list_head node;
 	struct tsdev *tsdev;
 	int head, tail;
-	int oldx, oldy, pendown;
-	TS_EVENT event[TSDEV_BUFFER_SIZE];
+	struct ts_event event[TSDEV_BUFFER_SIZE];
+	int raw;
 };
 
+/* The following ioctl codes are defined ONLY for backward compatibility.
+ * Don't use tsdev for new developement; use the tslib library instead.
+ * Touchscreen calibration is a fully userspace task.
+ */
+/* Use 'f' as magic number */
+#define IOC_H3600_TS_MAGIC  'f'
+#define TS_GET_CAL	_IOR(IOC_H3600_TS_MAGIC, 10, struct ts_calibration)
+#define TS_SET_CAL	_IOW(IOC_H3600_TS_MAGIC, 11, struct ts_calibration)
+
 static struct input_handler tsdev_handler;
 
-static struct tsdev *tsdev_table[TSDEV_MINORS];
+static struct tsdev *tsdev_table[TSDEV_MINORS/2];
 
 static int tsdev_fasync(int fd, struct file *file, int on)
 {
@@ -109,13 +155,16 @@
 	int i = iminor(inode) - TSDEV_MINOR_BASE;
 	struct tsdev_list *list;
 
-	if (i >= TSDEV_MINORS || !tsdev_table[i])
+	if (i >= TSDEV_MINORS || !tsdev_table[i & TSDEV_MINOR_MASK])
 		return -ENODEV;
 
 	if (!(list = kmalloc(sizeof(struct tsdev_list), GFP_KERNEL)))
 		return -ENOMEM;
 	memset(list, 0, sizeof(struct tsdev_list));
 
+	list->raw = (i >= TSDEV_MINORS/2) ? 1 : 0;
+
+	i &= TSDEV_MINOR_MASK;
 	list->tsdev = tsdev_table[i];
 	list_add_tail(&list->node, &tsdev_table[i]->list);
 	file->private_data = list;
@@ -151,7 +200,7 @@
 	return 0;
 }
 
-static ssize_t tsdev_read(struct file *file, char *buffer, size_t count,
+static ssize_t tsdev_read(struct file *file, char __user *buffer, size_t count,
 			  loff_t * ppos)
 {
 	struct tsdev_list *list = file->private_data;
@@ -169,11 +218,13 @@
 	if (!list->tsdev->exist)
 		return -ENODEV;
 
-	while (list->head != list->tail && retval + sizeof(TS_EVENT) <= count) {
-		if (copy_to_user (buffer + retval, list->event + list->tail, sizeof(TS_EVENT)))
+	while (list->head != list->tail &&
+	       retval + sizeof (struct ts_event) <= count) {
+		if (copy_to_user (buffer + retval, list->event + list->tail,
+				  sizeof (struct ts_event)))
 			return -EFAULT;
 		list->tail = (list->tail + 1) & (TSDEV_BUFFER_SIZE - 1);
-		retval += sizeof(TS_EVENT);
+		retval += sizeof (struct ts_event);
 	}
 
 	return retval;
@@ -193,22 +244,27 @@
 static int tsdev_ioctl(struct inode *inode, struct file *file,
 		       unsigned int cmd, unsigned long arg)
 {
-/*
 	struct tsdev_list *list = file->private_data;
-        struct tsdev *evdev = list->tsdev;
-        struct input_dev *dev = tsdev->handle.dev;
-        int retval;
-	
+	struct tsdev *tsdev = list->tsdev;
+	int retval = 0;
+
 	switch (cmd) {
-		case HHEHE:
-			return 0;
-		case hjff:
-			return 0;
-		default:
-			return 0;
+	case TS_GET_CAL:
+		if (copy_to_user ((void *)arg, &tsdev->cal,
+				  sizeof (struct ts_calibration)))
+			retval = -EFAULT;
+		break;
+	case TS_SET_CAL:
+		if (copy_from_user (&tsdev->cal, (void *)arg,
+				    sizeof (struct ts_calibration)))
+			retval = -EFAULT;
+		break;
+	default:
+		retval = -EINVAL;
+		break;
 	}
-*/
-	return -EINVAL;
+
+	return retval;
 }
 
 struct file_operations tsdev_fops = {
@@ -227,82 +283,85 @@
 	struct tsdev *tsdev = handle->private;
 	struct tsdev_list *list;
 	struct timeval time;
-	int size;
 
-	list_for_each_entry(list, &tsdev->list, node) {
-		switch (type) {
-		case EV_ABS:
-			switch (code) {
-			case ABS_X:
-				if (!list->pendown)
-					return;
-				size = handle->dev->absmax[ABS_X] - handle->dev->absmin[ABS_X];
-				if (size > 0)
-					list->oldx = ((value - handle->dev->absmin[ABS_X]) * xres / size);
-				else
-					list->oldx = ((value - handle->dev->absmin[ABS_X]));
-				break;
-			case ABS_Y:
-				if (!list->pendown)
-					return;
-				size = handle->dev->absmax[ABS_Y] - handle->dev->absmin[ABS_Y];
-				if (size > 0)
-					list->oldy = ((value - handle->dev->absmin[ABS_Y]) * yres / size);
-				else
-					list->oldy = ((value - handle->dev->absmin[ABS_Y]));
-				break;
-			case ABS_PRESSURE:
-				list->pendown = ((value > handle->dev-> absmin[ABS_PRESSURE])) ?
-				    value - handle->dev->absmin[ABS_PRESSURE] : 0;
-				break;
-			}
+	switch (type) {
+	case EV_ABS:
+		switch (code) {
+		case ABS_X:
+			tsdev->x = value;
+			break;
+		case ABS_Y:
+			tsdev->y = value;
+			break;
+		case ABS_PRESSURE:
+			if (value > handle->dev->absmax[ABS_PRESSURE])
+				value = handle->dev->absmax[ABS_PRESSURE];
+			value -= handle->dev->absmin[ABS_PRESSURE];
+			if (value < 0)
+				value = 0;
+			tsdev->pressure = value;
+			break;
+		}
+		break;
+
+	case EV_REL:
+		switch (code) {
+		case REL_X:
+			tsdev->x += value;
+			if (tsdev->x < 0)
+				tsdev->x = 0;
+			else if (tsdev->x > xres)
+				tsdev->x = xres;
+			break;
+		case REL_Y:
+			tsdev->y += value;
+			if (tsdev->y < 0)
+				tsdev->y = 0;
+			else if (tsdev->y > yres)
+				tsdev->y = yres;
 			break;
+		}
+		break;
 
-		case EV_REL:
-			switch (code) {
-			case REL_X:
-				if (!list->pendown)
-					return;
-				list->oldx += value;
-				if (list->oldx < 0)
-					list->oldx = 0;
-				else if (list->oldx > xres)
-					list->oldx = xres;
+	case EV_KEY:
+		if (code == BTN_TOUCH || code == BTN_MOUSE) {
+			switch (value) {
+			case 0:
+				tsdev->pressure = 0;
 				break;
-			case REL_Y:
-				if (!list->pendown)
-					return;
-				list->oldy += value;
-				if (list->oldy < 0)
-					list->oldy = 0;
-				else if (list->oldy > xres)
-					list->oldy = xres;
+			case 1:
+				if (!tsdev->pressure)
+					tsdev->pressure = 1;
 				break;
 			}
-			break;
-
-		case EV_KEY:
-			if (code == BTN_TOUCH || code == BTN_MOUSE) {
-				switch (value) {
-				case 0:
-					list->pendown = 0;
-					break;
-				case 1:
-					if (!list->pendown)
-						list->pendown = 1;
-					break;
-				case 2:
-					return;
-				}
-			} else
-				return;
-			break;
 		}
+		break;
+	}
+
+	if (type != EV_SYN || code != SYN_REPORT)
+		return;
+
+	list_for_each_entry(list, &tsdev->list, node) {
+		int x, y, tmp;
+
 		do_gettimeofday(&time);
 		list->event[list->head].millisecs = time.tv_usec / 100;
-		list->event[list->head].pressure = list->pendown;
-		list->event[list->head].x = list->oldx;
-		list->event[list->head].y = list->oldy;
+		list->event[list->head].pressure = tsdev->pressure;
+
+		x = tsdev->x;
+		y = tsdev->y;
+
+		/* Calibration */
+		if (!list->raw) {
+			x = ((x * tsdev->cal.xscale) >> 8) + tsdev->cal.xtrans;
+			y = ((y * tsdev->cal.yscale) >> 8) + tsdev->cal.ytrans;
+			if (tsdev->cal.xyswap) {
+				tmp = x; x = y; y = tmp;
+			}
+		}
+
+		list->event[list->head].x = x;
+		list->event[list->head].y = y;
 		list->head = (list->head + 1) & (TSDEV_BUFFER_SIZE - 1);
 		kill_fasync(&list->fasync, SIGIO, POLL_IN);
 	}
@@ -314,11 +373,11 @@
 					  struct input_device_id *id)
 {
 	struct tsdev *tsdev;
-	int minor;
+	int minor, delta;
 
-	for (minor = 0; minor < TSDEV_MINORS && tsdev_table[minor];
+	for (minor = 0; minor < TSDEV_MINORS/2 && tsdev_table[minor];
 	     minor++);
-	if (minor == TSDEV_MINORS) {
+	if (minor >= TSDEV_MINORS/2) {
 		printk(KERN_ERR
 		       "tsdev: You have way too many touchscreens\n");
 		return NULL;
@@ -340,10 +399,25 @@
 	tsdev->handle.handler = handler;
 	tsdev->handle.private = tsdev;
 
+	/* Precompute the rough calibration matrix */
+	delta = dev->absmax [ABS_X] - dev->absmin [ABS_X] + 1;
+	if (delta == 0)
+		delta = 1;
+	tsdev->cal.xscale = (xres << 8) / delta;
+	tsdev->cal.xtrans = - ((dev->absmin [ABS_X] * tsdev->cal.xscale) >> 8);
+
+	delta = dev->absmax [ABS_Y] - dev->absmin [ABS_Y] + 1;
+	if (delta == 0)
+		delta = 1;
+	tsdev->cal.yscale = (yres << 8) / delta;
+	tsdev->cal.ytrans = - ((dev->absmin [ABS_Y] * tsdev->cal.yscale) >> 8);
+
 	tsdev_table[minor] = tsdev;
-	
+
 	devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
 			S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor);
+	devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2),
+			S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor);
 	class_simple_device_add(input_class, 
 				MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
 				dev->dev, "ts%d", minor);
@@ -362,6 +436,7 @@
 		wake_up_interruptible(&tsdev->wait);
 	} else
 		tsdev_free(tsdev);
+	devfs_remove("input/tsraw%d", tsdev->minor);
 }
 
 static struct input_device_id tsdev_ids[] = {
@@ -379,6 +454,12 @@
 	      .absbit	= { BIT(ABS_X) | BIT(ABS_Y) },
 	 },/* A tablet like device, at least touch detection, two absolute axes */
 
+	{
+	      .flags	= INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+	      .evbit	= { BIT(EV_ABS) },
+	      .absbit	= { BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) },
+	 },/* A tablet like device with several gradations of pressure */
+
 	{},/* Terminating entry */
 };
 
--- diff/drivers/isdn/capi/capi.c	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/isdn/capi/capi.c	2004-07-01 21:32:36.000000000 +0100
@@ -650,7 +650,7 @@
 /* -------- file_operations for capidev ----------------------------- */
 
 static ssize_t
-capi_read(struct file *file, char *buf, size_t count, loff_t *ppos)
+capi_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 {
 	struct capidev *cdev = (struct capidev *)file->private_data;
 	struct sk_buff *skb;
@@ -693,7 +693,7 @@
 }
 
 static ssize_t
-capi_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+capi_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	struct capidev *cdev = (struct capidev *)file->private_data;
 	struct sk_buff *skb;
@@ -766,6 +766,7 @@
 	struct capi20_appl *ap = &cdev->ap;
 	capi_ioctl_struct data;
 	int retval = -EINVAL;
+	void __user *argp = (void __user *)arg;
 
 	switch (cmd) {
 	case CAPI_REGISTER:
@@ -773,7 +774,7 @@
 			if (ap->applid)
 				return -EEXIST;
 
-			if (copy_from_user(&cdev->ap.rparam, (void *) arg,
+			if (copy_from_user(&cdev->ap.rparam, argp,
 					   sizeof(struct capi_register_params)))
 				return -EFAULT;
 			
@@ -789,14 +790,13 @@
 
 	case CAPI_GET_VERSION:
 		{
-			if (copy_from_user((void *) &data.contr,
-						(void *) arg,
+			if (copy_from_user(&data.contr, argp,
 						sizeof(data.contr)))
 				return -EFAULT;
 		        cdev->errcode = capi20_get_version(data.contr, &data.version);
 			if (cdev->errcode)
 				return -EIO;
-			if (copy_to_user((void *)arg, (void *)&data.version,
+			if (copy_to_user(argp, &data.version,
 					 sizeof(data.version)))
 				return -EFAULT;
 		}
@@ -804,20 +804,20 @@
 
 	case CAPI_GET_SERIAL:
 		{
-			if (copy_from_user((void *)&data.contr, (void *)arg,
+			if (copy_from_user(&data.contr, argp,
 					   sizeof(data.contr)))
 				return -EFAULT;
 			cdev->errcode = capi20_get_serial (data.contr, data.serial);
 			if (cdev->errcode)
 				return -EIO;
-			if (copy_to_user((void *)arg, (void *)data.serial,
+			if (copy_to_user(argp, data.serial,
 					 sizeof(data.serial)))
 				return -EFAULT;
 		}
 		return 0;
 	case CAPI_GET_PROFILE:
 		{
-			if (copy_from_user((void *)&data.contr, (void *)arg,
+			if (copy_from_user(&data.contr, argp,
 					   sizeof(data.contr)))
 				return -EFAULT;
 
@@ -826,8 +826,8 @@
 				if (cdev->errcode)
 					return -EIO;
 
-				retval = copy_to_user((void *) arg,
-				      (void *) &data.profile.ncontroller,
+				retval = copy_to_user(argp,
+				      &data.profile.ncontroller,
 				       sizeof(data.profile.ncontroller));
 
 			} else {
@@ -835,8 +835,7 @@
 				if (cdev->errcode)
 					return -EIO;
 
-				retval = copy_to_user((void *) arg,
-						  (void *) &data.profile,
+				retval = copy_to_user(argp, &data.profile,
 						   sizeof(data.profile));
 			}
 			if (retval)
@@ -846,14 +845,14 @@
 
 	case CAPI_GET_MANUFACTURER:
 		{
-			if (copy_from_user((void *)&data.contr, (void *)arg,
+			if (copy_from_user(&data.contr, argp,
 					   sizeof(data.contr)))
 				return -EFAULT;
 			cdev->errcode = capi20_get_manufacturer(data.contr, data.manufacturer);
 			if (cdev->errcode)
 				return -EIO;
 
-			if (copy_to_user((void *)arg, (void *)data.manufacturer,
+			if (copy_to_user(argp, data.manufacturer,
 					 sizeof(data.manufacturer)))
 				return -EFAULT;
 
@@ -863,7 +862,7 @@
 		data.errcode = cdev->errcode;
 		cdev->errcode = CAPI_NOERROR;
 		if (arg) {
-			if (copy_to_user((void *)arg, (void *)&data.errcode,
+			if (copy_to_user(argp, &data.errcode,
 					 sizeof(data.errcode)))
 				return -EFAULT;
 		}
@@ -879,7 +878,7 @@
 			struct capi_manufacturer_cmd mcmd;
 			if (!capable(CAP_SYS_ADMIN))
 				return -EPERM;
-			if (copy_from_user((void *)&mcmd, (void *)arg,
+			if (copy_from_user(&mcmd, argp,
 					   sizeof(mcmd)))
 				return -EFAULT;
 			return capi20_manufacturer(mcmd.cmd, mcmd.data);
@@ -890,7 +889,7 @@
 	case CAPI_CLR_FLAGS:
 		{
 			unsigned userflags;
-			if (copy_from_user((void *)&userflags, (void *)arg,
+			if (copy_from_user(&userflags, argp,
 					   sizeof(userflags)))
 				return -EFAULT;
 			if (cmd == CAPI_SET_FLAGS)
@@ -901,7 +900,7 @@
 		return 0;
 
 	case CAPI_GET_FLAGS:
-		if (copy_to_user((void *)arg, (void *)&cdev->userflags,
+		if (copy_to_user(argp, &cdev->userflags,
 				 sizeof(cdev->userflags)))
 			return -EFAULT;
 		return 0;
@@ -914,8 +913,7 @@
 #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
 			unsigned ncci;
 			int count = 0;
-			if (copy_from_user((void *)&ncci, (void *)arg,
-					   sizeof(ncci)))
+			if (copy_from_user(&ncci, argp, sizeof(ncci)))
 				return -EFAULT;
 
 			down(&cdev->ncci_list_sem);
@@ -940,7 +938,7 @@
 			struct capiminor *mp;
 			unsigned ncci;
 			int unit = 0;
-			if (copy_from_user((void *)&ncci, (void *)arg,
+			if (copy_from_user(&ncci, argp,
 					   sizeof(ncci)))
 				return -EFAULT;
 			down(&cdev->ncci_list_sem);
--- diff/drivers/isdn/hisax/Kconfig	2004-05-19 22:11:45.000000000 +0100
+++ source/drivers/isdn/hisax/Kconfig	2004-07-01 21:32:36.000000000 +0100
@@ -4,6 +4,7 @@
 
 config ISDN_DRV_HISAX
 	tristate "HiSax SiemensChipSet driver support"
+	select CRC16
 	---help---
 	  This is a driver supporting the Siemens chipset on various
 	  ISDN-cards (like AVM A1, Elsa ISDN cards, Teles S0-16.0, Teles
@@ -399,6 +400,7 @@
 config HISAX_ST5481
 	tristate "ST5481 USB ISDN modem (EXPERIMENTAL)"
 	depends on USB && EXPERIMENTAL
+	select CRC16
 	help
 	  This enables the driver for ST5481 based USB ISDN adapters,
 	  e.g. the BeWan Gazel 128 USB
--- diff/drivers/isdn/hisax/isdnhdlc.c	2004-05-19 22:11:45.000000000 +0100
+++ source/drivers/isdn/hisax/isdnhdlc.c	2004-07-01 21:32:36.000000000 +0100
@@ -22,6 +22,7 @@
 
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/crc16.h>
 #include "isdnhdlc.h"
 
 /*-------------------------------------------------------------------*/
@@ -58,43 +59,6 @@
 	0x0F,0x8F,0x4F,0xCF,0x2F,0xAF,0x6F,0xEF,0x1F,0x9F,0x5F,0xDF,0x3F,0xBF,0x7F,0xFF
 };
 
-/* Table for CRC16. Internal used only. */
-static const unsigned short int crc16_tab[] = {
-	0x0000,0x1189,0x2312,0x329b,0x4624,0x57ad,0x6536,0x74bf,
-	0x8c48,0x9dc1,0xaf5a,0xbed3,0xca6c,0xdbe5,0xe97e,0xf8f7,
-	0x1081,0x0108,0x3393,0x221a,0x56a5,0x472c,0x75b7,0x643e,
-	0x9cc9,0x8d40,0xbfdb,0xae52,0xdaed,0xcb64,0xf9ff,0xe876,
-	0x2102,0x308b,0x0210,0x1399,0x6726,0x76af,0x4434,0x55bd,
-	0xad4a,0xbcc3,0x8e58,0x9fd1,0xeb6e,0xfae7,0xc87c,0xd9f5,
-	0x3183,0x200a,0x1291,0x0318,0x77a7,0x662e,0x54b5,0x453c,
-	0xbdcb,0xac42,0x9ed9,0x8f50,0xfbef,0xea66,0xd8fd,0xc974,
-	0x4204,0x538d,0x6116,0x709f,0x0420,0x15a9,0x2732,0x36bb,
-	0xce4c,0xdfc5,0xed5e,0xfcd7,0x8868,0x99e1,0xab7a,0xbaf3,
-	0x5285,0x430c,0x7197,0x601e,0x14a1,0x0528,0x37b3,0x263a,
-	0xdecd,0xcf44,0xfddf,0xec56,0x98e9,0x8960,0xbbfb,0xaa72,
-	0x6306,0x728f,0x4014,0x519d,0x2522,0x34ab,0x0630,0x17b9,
-	0xef4e,0xfec7,0xcc5c,0xddd5,0xa96a,0xb8e3,0x8a78,0x9bf1,
-	0x7387,0x620e,0x5095,0x411c,0x35a3,0x242a,0x16b1,0x0738,
-	0xffcf,0xee46,0xdcdd,0xcd54,0xb9eb,0xa862,0x9af9,0x8b70,
-	0x8408,0x9581,0xa71a,0xb693,0xc22c,0xd3a5,0xe13e,0xf0b7,
-	0x0840,0x19c9,0x2b52,0x3adb,0x4e64,0x5fed,0x6d76,0x7cff,
-	0x9489,0x8500,0xb79b,0xa612,0xd2ad,0xc324,0xf1bf,0xe036,
-	0x18c1,0x0948,0x3bd3,0x2a5a,0x5ee5,0x4f6c,0x7df7,0x6c7e,
-	0xa50a,0xb483,0x8618,0x9791,0xe32e,0xf2a7,0xc03c,0xd1b5,
-	0x2942,0x38cb,0x0a50,0x1bd9,0x6f66,0x7eef,0x4c74,0x5dfd,
-	0xb58b,0xa402,0x9699,0x8710,0xf3af,0xe226,0xd0bd,0xc134,
-	0x39c3,0x284a,0x1ad1,0x0b58,0x7fe7,0x6e6e,0x5cf5,0x4d7c,
-	0xc60c,0xd785,0xe51e,0xf497,0x8028,0x91a1,0xa33a,0xb2b3,
-	0x4a44,0x5bcd,0x6956,0x78df,0x0c60,0x1de9,0x2f72,0x3efb,
-	0xd68d,0xc704,0xf59f,0xe416,0x90a9,0x8120,0xb3bb,0xa232,
-	0x5ac5,0x4b4c,0x79d7,0x685e,0x1ce1,0x0d68,0x3ff3,0x2e7a,
-	0xe70e,0xf687,0xc41c,0xd595,0xa12a,0xb0a3,0x8238,0x93b1,
-	0x6b46,0x7acf,0x4854,0x59dd,0x2d62,0x3ceb,0x0e70,0x1ff9,
-	0xf78f,0xe606,0xd49d,0xc514,0xb1ab,0xa022,0x92b9,0x8330,
-	0x7bc7,0x6a4e,0x58d5,0x495c,0x3de3,0x2c6a,0x1ef1,0x0f78
-};
-
-
 enum {
 	HDLC_FAST_IDLE,HDLC_GET_FLAG_B0,HDLC_GETFLAG_B1A6,HDLC_GETFLAG_B7,
 	HDLC_GET_DATA,HDLC_FAST_FLAG
@@ -339,12 +303,10 @@
 				return status;
 			}
 			if(hdlc->data_bits==8){
-				unsigned cval;
-
 				hdlc->data_bits = 0;
 				hdlc->data_received = 1;
-				cval = (hdlc->crc^hdlc->shift_reg) & 0xff;
-				hdlc->crc = (hdlc->crc>>8)^crc16_tab[cval];
+				hdlc->crc = crc16_byte(hdlc->crc, hdlc->shift_reg);
+
 				// good byte received
 				if (dsize--) {
 					dst[hdlc->dstpos++] = hdlc->shift_reg;
@@ -520,10 +482,7 @@
 				break;
 			}
 			if(hdlc->bit_shift==8){
-				unsigned cval;
-
-				cval = (hdlc->crc^hdlc->shift_reg) & 0xff;
-				hdlc->crc = (hdlc->crc>>8)^crc16_tab[cval];
+				hdlc->crc = crc16_byte(hdlc->crc, hdlc->shift_reg);
 			}
 			if(hdlc->shift_reg & 0x01){
 				hdlc->hdlc_bits1++;
--- diff/drivers/isdn/hisax/netjet.c	2004-05-19 22:11:45.000000000 +0100
+++ source/drivers/isdn/hisax/netjet.c	2004-07-01 21:32:36.000000000 +0100
@@ -58,42 +58,6 @@
 	insb(cs->hw.njet.isac, data, size);
 }
 
-__u16 fcstab[256] =
-{
-	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
-	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
-	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
-	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
-	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
-	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
-	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
-	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
-	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
-	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
-	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
-	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
-	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
-	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
-	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
-	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
-	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
-	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
-	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
-	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
-	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
-	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
-	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
-	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
-	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
-	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
-	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
-	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
-	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
-	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
-	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
-	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
-};
-
 void 
 NETjet_WriteICfifo(struct IsdnCardState *cs, u_char *data, int size)
 {
--- diff/drivers/isdn/hisax/st5481_hdlc.c	2004-05-19 22:11:45.000000000 +0100
+++ source/drivers/isdn/hisax/st5481_hdlc.c	2004-07-01 21:32:36.000000000 +0100
@@ -10,44 +10,9 @@
  *
  */
 
+#include <linux/crc16.h>
 #include "st5481_hdlc.h"
 
-static const unsigned short int crc16_tab[] = {
-	0x0000,0x1189,0x2312,0x329b,0x4624,0x57ad,0x6536,0x74bf,
-	0x8c48,0x9dc1,0xaf5a,0xbed3,0xca6c,0xdbe5,0xe97e,0xf8f7,
-	0x1081,0x0108,0x3393,0x221a,0x56a5,0x472c,0x75b7,0x643e,
-	0x9cc9,0x8d40,0xbfdb,0xae52,0xdaed,0xcb64,0xf9ff,0xe876,
-	0x2102,0x308b,0x0210,0x1399,0x6726,0x76af,0x4434,0x55bd,
-	0xad4a,0xbcc3,0x8e58,0x9fd1,0xeb6e,0xfae7,0xc87c,0xd9f5,
-	0x3183,0x200a,0x1291,0x0318,0x77a7,0x662e,0x54b5,0x453c,
-	0xbdcb,0xac42,0x9ed9,0x8f50,0xfbef,0xea66,0xd8fd,0xc974,
-	0x4204,0x538d,0x6116,0x709f,0x0420,0x15a9,0x2732,0x36bb,
-	0xce4c,0xdfc5,0xed5e,0xfcd7,0x8868,0x99e1,0xab7a,0xbaf3,
-	0x5285,0x430c,0x7197,0x601e,0x14a1,0x0528,0x37b3,0x263a,
-	0xdecd,0xcf44,0xfddf,0xec56,0x98e9,0x8960,0xbbfb,0xaa72,
-	0x6306,0x728f,0x4014,0x519d,0x2522,0x34ab,0x0630,0x17b9,
-	0xef4e,0xfec7,0xcc5c,0xddd5,0xa96a,0xb8e3,0x8a78,0x9bf1,
-	0x7387,0x620e,0x5095,0x411c,0x35a3,0x242a,0x16b1,0x0738,
-	0xffcf,0xee46,0xdcdd,0xcd54,0xb9eb,0xa862,0x9af9,0x8b70,
-	0x8408,0x9581,0xa71a,0xb693,0xc22c,0xd3a5,0xe13e,0xf0b7,
-	0x0840,0x19c9,0x2b52,0x3adb,0x4e64,0x5fed,0x6d76,0x7cff,
-	0x9489,0x8500,0xb79b,0xa612,0xd2ad,0xc324,0xf1bf,0xe036,
-	0x18c1,0x0948,0x3bd3,0x2a5a,0x5ee5,0x4f6c,0x7df7,0x6c7e,
-	0xa50a,0xb483,0x8618,0x9791,0xe32e,0xf2a7,0xc03c,0xd1b5,
-	0x2942,0x38cb,0x0a50,0x1bd9,0x6f66,0x7eef,0x4c74,0x5dfd,
-	0xb58b,0xa402,0x9699,0x8710,0xf3af,0xe226,0xd0bd,0xc134,
-	0x39c3,0x284a,0x1ad1,0x0b58,0x7fe7,0x6e6e,0x5cf5,0x4d7c,
-	0xc60c,0xd785,0xe51e,0xf497,0x8028,0x91a1,0xa33a,0xb2b3,
-	0x4a44,0x5bcd,0x6956,0x78df,0x0c60,0x1de9,0x2f72,0x3efb,
-	0xd68d,0xc704,0xf59f,0xe416,0x90a9,0x8120,0xb3bb,0xa232,
-	0x5ac5,0x4b4c,0x79d7,0x685e,0x1ce1,0x0d68,0x3ff3,0x2e7a,
-	0xe70e,0xf687,0xc41c,0xd595,0xa12a,0xb0a3,0x8238,0x93b1,
-	0x6b46,0x7acf,0x4854,0x59dd,0x2d62,0x3ceb,0x0e70,0x1ff9,
-	0xf78f,0xe606,0xd49d,0xc514,0xb1ab,0xa022,0x92b9,0x8330,
-	0x7bc7,0x6a4e,0x58d5,0x495c,0x3de3,0x2c6a,0x1ef1,0x0f78
-};
-
-
 
 enum {
 	HDLC_FAST_IDLE,HDLC_GET_FLAG_B0,HDLC_GETFLAG_B1A6,HDLC_GETFLAG_B7,
@@ -295,12 +260,10 @@
 				return status;
 			}
 			if(hdlc->data_bits==8){
-				unsigned cval;
-				
 				hdlc->data_bits = 0;
 				hdlc->data_received = 1;
-				cval = (hdlc->crc^hdlc->shift_reg) & 0xff;
-				hdlc->crc = (hdlc->crc>>8)^crc16_tab[cval];
+				hdlc->crc = crc16_byte(hdlc->crc, hdlc->shift_reg);
+
 				// good byte received
 				if (dsize--) {
 					dst[hdlc->dstpos++] = hdlc->shift_reg;
@@ -476,10 +439,7 @@
 				break;
 			}
 			if(hdlc->bit_shift==8){
-				unsigned cval;
-
-				cval = (hdlc->crc^hdlc->shift_reg) & 0xff;
-				hdlc->crc = (hdlc->crc>>8)^crc16_tab[cval];
+				hdlc->crc = crc16_byte(hdlc->crc, hdlc->shift_reg);
 			}
 			if(hdlc->shift_reg & 0x01){
 				hdlc->hdlc_bits1++;
--- diff/drivers/isdn/i4l/isdn_common.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/isdn/i4l/isdn_common.c	2004-07-01 21:32:36.000000000 +0100
@@ -64,7 +64,7 @@
 #endif /* CONFIG_ISDN_DIVERSION */
 
 
-static int isdn_writebuf_stub(int, int, const u_char *, int, int);
+static int isdn_writebuf_stub(int, int, const u_char __user *, int);
 static void set_global_features(void);
 static int isdn_wildmat(char *s, char *p);
 
@@ -937,7 +937,7 @@
 }
 
 static ssize_t
-isdn_read(struct file *file, char *buf, size_t count, loff_t * off)
+isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off)
 {
 	uint minor = MINOR(file->f_dentry->d_inode->i_rdev);
 	int len = 0;
@@ -1044,7 +1044,7 @@
 }
 
 static ssize_t
-isdn_write(struct file *file, const char *buf, size_t count, loff_t * off)
+isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
 {
 	uint minor = MINOR(file->f_dentry->d_inode->i_rdev);
 	int drvidx;
@@ -1072,7 +1072,7 @@
 			goto out;
 		}
 		chidx = isdn_minor2chan(minor);
-		while (isdn_writebuf_stub(drvidx, chidx, buf, count, 1) != count)
+		while (isdn_writebuf_stub(drvidx, chidx, buf, count) != count)
 			interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]);
 		retval = count;
 		goto out;
@@ -1159,7 +1159,7 @@
 	int chidx;
 	int ret;
 	int i;
-	char *p;
+	char __user *p;
 	char *s;
 	union iocpar {
 		char name[10];
@@ -1168,6 +1168,7 @@
 		isdn_net_ioctl_phone phone;
 		isdn_net_ioctl_cfg cfg;
 	} iocpar;
+	void __user *argp = (void __user *)arg;
 
 #define name  iocpar.name
 #define bname iocpar.bname
@@ -1183,9 +1184,9 @@
 					(INF_DV << 16));
 			case IIOCGETCPS:
 				if (arg) {
-					ulong *p = (ulong *) arg;
+					ulong __user *p = argp;
 					int i;
-					if ((ret = verify_area(VERIFY_WRITE, (void *) arg,
+					if ((ret = verify_area(VERIFY_WRITE, p,
 							       sizeof(ulong) * ISDN_MAX_CHANNELS * 2)))
 						return ret;
 					for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
@@ -1201,9 +1202,9 @@
 				/* Get peer phone number of a connected 
 				 * isdn network interface */
 				if (arg) {
-					if (copy_from_user((char *) &phone, (char *) arg, sizeof(phone)))
+					if (copy_from_user(&phone, argp, sizeof(phone)))
 						return -EFAULT;
-					return isdn_net_getpeer(&phone, (isdn_net_ioctl_phone *) arg);
+					return isdn_net_getpeer(&phone, argp);
 				} else
 					return -EINVAL;
 #endif
@@ -1241,7 +1242,7 @@
 			case IIOCNETAIF:
 				/* Add a network-interface */
 				if (arg) {
-					if (copy_from_user(name, (char *) arg, sizeof(name)))
+					if (copy_from_user(name, argp, sizeof(name)))
 						return -EFAULT;
 					s = name;
 				} else {
@@ -1250,7 +1251,7 @@
 				ret = down_interruptible(&dev->sem);
 				if( ret ) return ret;
 				if ((s = isdn_net_new(s, NULL))) {
-					if (copy_to_user((char *) arg, s, strlen(s) + 1)){
+					if (copy_to_user(argp, s, strlen(s) + 1)){
 						ret = -EFAULT;
 					} else {
 						ret = 0;
@@ -1262,14 +1263,14 @@
 			case IIOCNETASL:
 				/* Add a slave to a network-interface */
 				if (arg) {
-					if (copy_from_user(bname, (char *) arg, sizeof(bname) - 1))
+					if (copy_from_user(bname, argp, sizeof(bname) - 1))
 						return -EFAULT;
 				} else
 					return -EINVAL;
 				ret = down_interruptible(&dev->sem);
 				if( ret ) return ret;
 				if ((s = isdn_net_newslave(bname))) {
-					if (copy_to_user((char *) arg, s, strlen(s) + 1)){
+					if (copy_to_user(argp, s, strlen(s) + 1)){
 						ret = -EFAULT;
 					} else {
 						ret = 0;
@@ -1281,7 +1282,7 @@
 			case IIOCNETDIF:
 				/* Delete a network-interface */
 				if (arg) {
-					if (copy_from_user(name, (char *) arg, sizeof(name)))
+					if (copy_from_user(name, argp, sizeof(name)))
 						return -EFAULT;
 					ret = down_interruptible(&dev->sem);
 					if( ret ) return ret;
@@ -1293,7 +1294,7 @@
 			case IIOCNETSCF:
 				/* Set configurable parameters of a network-interface */
 				if (arg) {
-					if (copy_from_user((char *) &cfg, (char *) arg, sizeof(cfg)))
+					if (copy_from_user(&cfg, argp, sizeof(cfg)))
 						return -EFAULT;
 					return isdn_net_setcfg(&cfg);
 				} else
@@ -1301,10 +1302,10 @@
 			case IIOCNETGCF:
 				/* Get configurable parameters of a network-interface */
 				if (arg) {
-					if (copy_from_user((char *) &cfg, (char *) arg, sizeof(cfg)))
+					if (copy_from_user(&cfg, argp, sizeof(cfg)))
 						return -EFAULT;
 					if (!(ret = isdn_net_getcfg(&cfg))) {
-						if (copy_to_user((char *) arg, (char *) &cfg, sizeof(cfg)))
+						if (copy_to_user(argp, &cfg, sizeof(cfg)))
 							return -EFAULT;
 					}
 					return ret;
@@ -1313,7 +1314,7 @@
 			case IIOCNETANM:
 				/* Add a phone-number to a network-interface */
 				if (arg) {
-					if (copy_from_user((char *) &phone, (char *) arg, sizeof(phone)))
+					if (copy_from_user(&phone, argp, sizeof(phone)))
 						return -EFAULT;
 					ret = down_interruptible(&dev->sem);
 					if( ret ) return ret;
@@ -1325,11 +1326,11 @@
 			case IIOCNETGNM:
 				/* Get list of phone-numbers of a network-interface */
 				if (arg) {
-					if (copy_from_user((char *) &phone, (char *) arg, sizeof(phone)))
+					if (copy_from_user(&phone, argp, sizeof(phone)))
 						return -EFAULT;
 					ret = down_interruptible(&dev->sem);
 					if( ret ) return ret;
-					ret = isdn_net_getphones(&phone, (char *) arg);
+					ret = isdn_net_getphones(&phone, argp);
 					up(&dev->sem);
 					return ret;
 				} else
@@ -1337,7 +1338,7 @@
 			case IIOCNETDNM:
 				/* Delete a phone-number of a network-interface */
 				if (arg) {
-					if (copy_from_user((char *) &phone, (char *) arg, sizeof(phone)))
+					if (copy_from_user(&phone, argp, sizeof(phone)))
 						return -EFAULT;
 					ret = down_interruptible(&dev->sem);
 					if( ret ) return ret;
@@ -1349,7 +1350,7 @@
 			case IIOCNETDIL:
 				/* Force dialing of a network-interface */
 				if (arg) {
-					if (copy_from_user(name, (char *) arg, sizeof(name)))
+					if (copy_from_user(name, argp, sizeof(name)))
 						return -EFAULT;
 					return isdn_net_force_dial(name);
 				} else
@@ -1358,13 +1359,13 @@
 			case IIOCNETALN:
 				if (!arg)
 					return -EINVAL;
-				if (copy_from_user(name, (char *) arg, sizeof(name)))
+				if (copy_from_user(name, argp, sizeof(name)))
 					return -EFAULT;
 				return isdn_ppp_dial_slave(name);
 			case IIOCNETDLN:
 				if (!arg)
 					return -EINVAL;
-				if (copy_from_user(name, (char *) arg, sizeof(name)))
+				if (copy_from_user(name, argp, sizeof(name)))
 					return -EFAULT;
 				return isdn_ppp_hangup_slave(name);
 #endif
@@ -1372,7 +1373,7 @@
 				/* Force hangup of a network-interface */
 				if (!arg)
 					return -EINVAL;
-				if (copy_from_user(name, (char *) arg, sizeof(name)))
+				if (copy_from_user(name, argp, sizeof(name)))
 					return -EFAULT;
 				return isdn_net_force_hangup(name);
 				break;
@@ -1394,7 +1395,7 @@
 				if (arg) {
 					int i;
 					char *p;
-					if (copy_from_user((char *) &iocts, (char *) arg,
+					if (copy_from_user(&iocts, argp,
 					     sizeof(isdn_ioctl_struct)))
 						return -EFAULT;
 					if (strlen(iocts.drvid)) {
@@ -1422,10 +1423,10 @@
 			case IIOCGETPRF:
 				/* Get all Modem-Profiles */
 				if (arg) {
-					char *p = (char *) arg;
+					char __user *p = argp;
 					int i;
 
-					if ((ret = verify_area(VERIFY_WRITE, (void *) arg,
+					if ((ret = verify_area(VERIFY_WRITE, argp,
 					(ISDN_MODEM_NUMREG + ISDN_MSNLEN + ISDN_LMSNLEN)
 						   * ISDN_MAX_CHANNELS)))
 						return ret;
@@ -1449,10 +1450,10 @@
 			case IIOCSETPRF:
 				/* Set all Modem-Profiles */
 				if (arg) {
-					char *p = (char *) arg;
+					char __user *p = argp;
 					int i;
 
-					if ((ret = verify_area(VERIFY_READ, (void *) arg,
+					if ((ret = verify_area(VERIFY_READ, argp,
 					(ISDN_MODEM_NUMREG + ISDN_MSNLEN + ISDN_LMSNLEN)
 						   * ISDN_MAX_CHANNELS)))
 						return ret;
@@ -1478,8 +1479,7 @@
 				/* Set/Get MSN->EAZ-Mapping for a driver */
 				if (arg) {
 
-					if (copy_from_user((char *) &iocts,
-							    (char *) arg,
+					if (copy_from_user(&iocts, argp,
 					     sizeof(isdn_ioctl_struct)))
 						return -EFAULT;
 					if (strlen(iocts.drvid)) {
@@ -1496,7 +1496,7 @@
 					if (cmd == IIOCSETMAP) {
 						int loop = 1;
 
-						p = (char *) iocts.arg;
+						p = (char __user *) iocts.arg;
 						i = 0;
 						while (loop) {
 							int j = 0;
@@ -1524,7 +1524,7 @@
 								break;
 						}
 					} else {
-						p = (char *) iocts.arg;
+						p = (char __user *) iocts.arg;
 						for (i = 0; i < 10; i++) {
 							sprintf(bname, "%s%s",
 								strlen(dev->drv[drvidx]->msn2eaz[i]) ?
@@ -1540,7 +1540,7 @@
 					return -EINVAL;
 			case IIOCDBGVAR:
 				if (arg) {
-					if (copy_to_user((char *) arg, (char *) &dev, sizeof(ulong)))
+					if (copy_to_user(argp, &dev, sizeof(ulong)))
 						return -EFAULT;
 					return 0;
 				} else
@@ -1554,7 +1554,7 @@
 				if (arg) {
 					int i;
 					char *p;
-					if (copy_from_user((char *) &iocts, (char *) arg, sizeof(isdn_ioctl_struct)))
+					if (copy_from_user(&iocts, argp, sizeof(isdn_ioctl_struct)))
 						return -EFAULT;
 					if (strlen(iocts.drvid)) {
 						if ((p = strchr(iocts.drvid, ',')))
@@ -1569,16 +1569,16 @@
 						drvidx = 0;
 					if (drvidx == -1)
 						return -ENODEV;
-					if ((ret = verify_area(VERIFY_WRITE, (void *) arg,
+					if ((ret = verify_area(VERIFY_WRITE, argp,
 					     sizeof(isdn_ioctl_struct))))
 						return ret;
 					c.driver = drvidx;
 					c.command = ISDN_CMD_IOCTL;
 					c.arg = cmd;
-					memcpy(c.parm.num, (char *) &iocts.arg, sizeof(ulong));
+					memcpy(c.parm.num, &iocts.arg, sizeof(ulong));
 					ret = isdn_command(&c);
-					memcpy((char *) &iocts.arg, c.parm.num, sizeof(ulong));
-					if (copy_to_user((char *) arg, &iocts, sizeof(isdn_ioctl_struct)))
+					memcpy(&iocts.arg, c.parm.num, sizeof(ulong));
+					if (copy_to_user(argp, &iocts, sizeof(isdn_ioctl_struct)))
 						return -EFAULT;
 					return ret;
 				} else
@@ -1838,8 +1838,7 @@
  *  writebuf replacement for SKB_ABLE drivers
  */
 static int
-isdn_writebuf_stub(int drvidx, int chan, const u_char * buf, int len,
-		   int user)
+isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len)
 {
 	int ret;
 	int hl = dev->drv[drvidx]->interface->hl_hdrlen;
@@ -1848,10 +1847,7 @@
 	if (!skb)
 		return 0;
 	skb_reserve(skb, hl);
-	if (user)
-		copy_from_user(skb_put(skb, len), buf, len);
-	else
-		memcpy(skb_put(skb, len), buf, len);
+	copy_from_user(skb_put(skb, len), buf, len);
 	ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb);
 	if (ret <= 0)
 		dev_kfree_skb(skb);
--- diff/drivers/isdn/i4l/isdn_net.c	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/i4l/isdn_net.c	2004-07-01 21:32:36.000000000 +0100
@@ -315,7 +315,7 @@
 unsigned long last_jiffies = -HZ;
 
 void
-isdn_net_autohup()
+isdn_net_autohup(void)
 {
 	isdn_net_dev *p = dev->netdev;
 	int anymore;
@@ -1443,15 +1443,14 @@
 		/* get/set keepalive period */
 		case SIOCGKEEPPERIOD:
 			len = (unsigned long)sizeof(lp->cisco_keepalive_period);
-			if (copy_to_user((char *)ifr->ifr_ifru.ifru_data,
-				(int *)&lp->cisco_keepalive_period, len))
+			if (copy_to_user(ifr->ifr_data,
+				&lp->cisco_keepalive_period, len))
 				rc = -EFAULT;
 			break;
 		case SIOCSKEEPPERIOD:
 			tmp = lp->cisco_keepalive_period;
 			len = (unsigned long)sizeof(lp->cisco_keepalive_period);
-			if (copy_from_user((int *)&period,
-				(char *)ifr->ifr_ifru.ifru_data, len))
+			if (copy_from_user(&period, ifr->ifr_data, len))
 				rc = -EFAULT;
 			if ((period > 0) && (period <= 32767))
 				lp->cisco_keepalive_period = period;
@@ -1470,14 +1469,14 @@
 		/* get/set debugging */
 		case SIOCGDEBSERINT:
 			len = (unsigned long)sizeof(lp->cisco_debserint);
-			if (copy_to_user((char *)ifr->ifr_ifru.ifru_data,
-				(char *)&lp->cisco_debserint, len))
+			if (copy_to_user(ifr->ifr_data,
+				&lp->cisco_debserint, len))
 				rc = -EFAULT;
 			break;
 		case SIOCSDEBSERINT:
 			len = (unsigned long)sizeof(lp->cisco_debserint);
-			if (copy_from_user((char *)&debserint,
-				(char *)ifr->ifr_ifru.ifru_data, len))
+			if (copy_from_user(&debserint,
+				ifr->ifr_data, len))
 				rc = -EFAULT;
 			if ((debserint >= 0) && (debserint <= 64))
 				lp->cisco_debserint = debserint;
@@ -2968,7 +2967,7 @@
  * This might sleep and must be called with the isdn semaphore down.
  */
 int
-isdn_net_getphones(isdn_net_ioctl_phone * phone, char *phones)
+isdn_net_getphones(isdn_net_ioctl_phone * phone, char __user *phones)
 {
 	isdn_net_dev *p = isdn_net_findif(phone->name);
 	int inout = phone->outgoing & 1;
@@ -3001,7 +3000,7 @@
  * to user space.
  */
 int
-isdn_net_getpeer(isdn_net_ioctl_phone *phone, isdn_net_ioctl_phone *peer)
+isdn_net_getpeer(isdn_net_ioctl_phone *phone, isdn_net_ioctl_phone __user *peer)
 {
 	isdn_net_dev *p = isdn_net_findif(phone->name);
 	int ch, dv, idx;
--- diff/drivers/isdn/i4l/isdn_net.h	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/i4l/isdn_net.h	2004-07-01 21:32:36.000000000 +0100
@@ -39,8 +39,8 @@
 extern int isdn_net_setcfg(isdn_net_ioctl_cfg *);
 extern int isdn_net_getcfg(isdn_net_ioctl_cfg *);
 extern int isdn_net_addphone(isdn_net_ioctl_phone *);
-extern int isdn_net_getphones(isdn_net_ioctl_phone *, char *);
-extern int isdn_net_getpeer(isdn_net_ioctl_phone *, isdn_net_ioctl_phone *);
+extern int isdn_net_getphones(isdn_net_ioctl_phone *, char __user *);
+extern int isdn_net_getpeer(isdn_net_ioctl_phone *, isdn_net_ioctl_phone __user *);
 extern int isdn_net_delphone(isdn_net_ioctl_phone *);
 extern int isdn_net_find_icall(int, int, int, setup_parm *);
 extern void isdn_net_hangup(struct net_device *);
--- diff/drivers/isdn/i4l/isdn_ppp.c	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/i4l/isdn_ppp.c	2004-07-01 21:32:36.000000000 +0100
@@ -320,8 +320,8 @@
 	is->slcomp = slhc_init(16, 16);	/* not necessary for 2. link in bundle */
 #endif
 #ifdef CONFIG_IPPP_FILTER
-	is->pass_filter.filter = NULL;
-	is->active_filter.filter = NULL;
+	is->pass_filter = NULL;
+	is->active_filter = NULL;
 #endif
 	is->state = IPPP_OPEN;
 
@@ -378,13 +378,13 @@
 	is->slcomp = NULL;
 #endif
 #ifdef CONFIG_IPPP_FILTER
-	if (is->pass_filter.filter) {
-		kfree(is->pass_filter.filter);
-		is->pass_filter.filter = NULL;
-	}
-	if (is->active_filter.filter) {
-		kfree(is->active_filter.filter);
-		is->active_filter.filter = NULL;
+	if (is->pass_filter) {
+		kfree(is->pass_filter);
+		is->pass_filter = NULL;
+	}
+	if (is->active_filter) {
+		kfree(is->active_filter);
+		is->active_filter = NULL;
 	}
 #endif
 
@@ -414,11 +414,11 @@
  * get_arg .. ioctl helper
  */
 static int
-get_arg(void *b, void *val, int len)
+get_arg(void __user *b, void *val, int len)
 {
 	if (len <= 0)
 		len = sizeof(void *);
-	if (copy_from_user((void *) val, b, len))
+	if (copy_from_user(val, b, len))
 		return -EFAULT;
 	return 0;
 }
@@ -427,15 +427,50 @@
  * set arg .. ioctl helper
  */
 static int
-set_arg(void *b, void *val,int len)
+set_arg(void __user *b, void *val,int len)
 {
 	if(len <= 0)
 		len = sizeof(void *);
-	if (copy_to_user(b, (void *) val, len))
+	if (copy_to_user(b, val, len))
 		return -EFAULT;
 	return 0;
 }
 
+static int get_filter(void __user *arg, struct sock_filter **p)
+{
+	struct sock_fprog uprog;
+	struct sock_filter *code = NULL;
+	int len, err;
+
+	if (copy_from_user(&uprog, arg, sizeof(uprog)))
+		return -EFAULT;
+
+	if (!uprog.len) {
+		*p = NULL;
+		return 0;
+	}
+
+	/* uprog.len is unsigned short, so no overflow here */
+	len = uprog.len * sizeof(struct sock_filter);
+	code = kmalloc(len, GFP_KERNEL);
+	if (code == NULL)
+		return -ENOMEM;
+
+	if (copy_from_user(code, uprog.filter, len)) {
+		kfree(code);
+		return -EFAULT;
+	}
+
+	err = sk_chk_filter(code, uprog.len);
+	if (err) {
+		kfree(code);
+		return err;
+	}
+
+	*p = code;
+	return uprog.len;
+}
+
 /*
  * ippp device ioctl
  */
@@ -447,6 +482,7 @@
 	struct ippp_struct *is;
 	isdn_net_local *lp;
 	struct isdn_ppp_comp_data data;
+	void __user *argp = (void __user *)arg;
 
 	is = (struct ippp_struct *) file->private_data;
 	lp = is->lp;
@@ -462,7 +498,7 @@
 #ifdef CONFIG_ISDN_MPP
 			if (!(is->state & IPPP_CONNECT))
 				return -EINVAL;
-			if ((r = get_arg((void *) arg, &val, sizeof(val) )))
+			if ((r = get_arg(argp, &val, sizeof(val) )))
 				return r;
 			printk(KERN_DEBUG "iPPP-bundle: minor: %d, slave unit: %d, master unit: %d\n",
 			       (int) min, (int) is->unit, (int) val);
@@ -472,30 +508,30 @@
 #endif
 			break;
 		case PPPIOCGUNIT:	/* get ppp/isdn unit number */
-			if ((r = set_arg((void *) arg, &is->unit, sizeof(is->unit) )))
+			if ((r = set_arg(argp, &is->unit, sizeof(is->unit) )))
 				return r;
 			break;
 		case PPPIOCGIFNAME:
 			if(!lp)
 				return -EINVAL;
-			if ((r = set_arg((void *) arg, lp->name, strlen(lp->name))))
+			if ((r = set_arg(argp, lp->name, strlen(lp->name))))
 				return r;
 			break;
 		case PPPIOCGMPFLAGS:	/* get configuration flags */
-			if ((r = set_arg((void *) arg, &is->mpppcfg, sizeof(is->mpppcfg) )))
+			if ((r = set_arg(argp, &is->mpppcfg, sizeof(is->mpppcfg) )))
 				return r;
 			break;
 		case PPPIOCSMPFLAGS:	/* set configuration flags */
-			if ((r = get_arg((void *) arg, &val, sizeof(val) )))
+			if ((r = get_arg(argp, &val, sizeof(val) )))
 				return r;
 			is->mpppcfg = val;
 			break;
 		case PPPIOCGFLAGS:	/* get configuration flags */
-			if ((r = set_arg((void *) arg, &is->pppcfg,sizeof(is->pppcfg) )))
+			if ((r = set_arg(argp, &is->pppcfg,sizeof(is->pppcfg) )))
 				return r;
 			break;
 		case PPPIOCSFLAGS:	/* set configuration flags */
-			if ((r = get_arg((void *) arg, &val, sizeof(val) ))) {
+			if ((r = get_arg(argp, &val, sizeof(val) ))) {
 				return r;
 			}
 			if (val & SC_ENABLE_IP && !(is->pppcfg & SC_ENABLE_IP) && (is->state & IPPP_CONNECT)) {
@@ -512,12 +548,12 @@
 			if (lp) {
 				struct ppp_idle pidle;
 				pidle.xmit_idle = pidle.recv_idle = lp->huptimer;
-				if ((r = set_arg((void *) arg, &pidle,sizeof(struct ppp_idle))))
+				if ((r = set_arg(argp, &pidle,sizeof(struct ppp_idle))))
 					 return r;
 			}
 			break;
 		case PPPIOCSMRU:	/* set receive unit size for PPP */
-			if ((r = get_arg((void *) arg, &val, sizeof(val) )))
+			if ((r = get_arg(argp, &val, sizeof(val) )))
 				return r;
 			is->mru = val;
 			break;
@@ -526,7 +562,7 @@
 		case PPPIOCSMPMTU:
 			break;
 		case PPPIOCSMAXCID:	/* set the maximum compression slot id */
-			if ((r = get_arg((void *) arg, &val, sizeof(val) )))
+			if ((r = get_arg(argp, &val, sizeof(val) )))
 				return r;
 			val++;
 			if (is->maxcid != val) {
@@ -549,11 +585,11 @@
 			}
 			break;
 		case PPPIOCGDEBUG:
-			if ((r = set_arg((void *) arg, &is->debug, sizeof(is->debug) )))
+			if ((r = set_arg(argp, &is->debug, sizeof(is->debug) )))
 				return r;
 			break;
 		case PPPIOCSDEBUG:
-			if ((r = get_arg((void *) arg, &val, sizeof(val) )))
+			if ((r = get_arg(argp, &val, sizeof(val) )))
 				return r;
 			is->debug = val;
 			break;
@@ -568,12 +604,12 @@
 						protos[j] |= (0x1<<i);
 					ipc = ipc->next;
 				}
-				if ((r = set_arg((void *) arg,protos,8*sizeof(long) )))
+				if ((r = set_arg(argp,protos,8*sizeof(long) )))
 					return r;
 			}
 			break;
 		case PPPIOCSCOMPRESSOR:
-			if ((r = get_arg((void *) arg, &data, sizeof(struct isdn_ppp_comp_data))))
+			if ((r = get_arg(argp, &data, sizeof(struct isdn_ppp_comp_data))))
 				return r;
 			return isdn_ppp_set_compressor(is, &data);
 		case PPPIOCGCALLINFO:
@@ -594,38 +630,29 @@
 					if(lp->flags & ISDN_NET_CALLBACK)
 						pci.calltype |= CALLTYPE_CALLBACK;
 				}
-				return set_arg((void *)arg,&pci,sizeof(struct pppcallinfo));
+				return set_arg(argp,&pci,sizeof(struct pppcallinfo));
 			}
 #ifdef CONFIG_IPPP_FILTER
 		case PPPIOCSPASS:
+			{
+				struct sock_filter *code;
+				int len = get_filter(argp, &code);
+				if (len < 0)
+					return len;
+				kfree(is->pass_filter);
+				is->pass_filter = code;
+				is->pass_len = len;
+				break;
+			}
 		case PPPIOCSACTIVE:
 			{
-				struct sock_fprog uprog, *filtp;
-				struct sock_filter *code = NULL;
-				int len, err;
-
-				if (copy_from_user(&uprog, (void *) arg, sizeof(uprog)))
-					return -EFAULT;
-				if (uprog.len > 0) {
-					len = uprog.len * sizeof(struct sock_filter);
-					code = kmalloc(len, GFP_KERNEL);
-					if (code == NULL)
-						return -ENOMEM;
-					if (copy_from_user(code, uprog.filter, len)) {
-						kfree(code);
-						return -EFAULT;
-					}
-					err = sk_chk_filter(code, uprog.len);
-					if (err) {
-						kfree(code);
-						return err;
-					}
-				}
-				filtp = (cmd == PPPIOCSPASS) ? &is->pass_filter : &is->active_filter;
-				if (filtp->filter)
-					kfree(filtp->filter);
-				filtp->filter = code;
-				filtp->len = uprog.len;
+				struct sock_filter *code;
+				int len = get_filter(argp, &code);
+				if (len < 0)
+					return len;
+				kfree(is->active_filter);
+				is->active_filter = code;
+				is->active_len = len;
 				break;
 			}
 #endif /* CONFIG_IPPP_FILTER */
@@ -733,7 +760,7 @@
  */
 
 int
-isdn_ppp_read(int min, struct file *file, char *buf, int count)
+isdn_ppp_read(int min, struct file *file, char __user *buf, int count)
 {
 	struct ippp_struct *is;
 	struct ippp_buf_queue *b;
@@ -746,7 +773,7 @@
 	if (!(is->state & IPPP_OPEN))
 		return 0;
 
-	if ((r = verify_area(VERIFY_WRITE, (void *) buf, count)))
+	if ((r = verify_area(VERIFY_WRITE, buf, count)))
 		return r;
 
 	spin_lock_irqsave(&is->buflock, flags);
@@ -773,7 +800,7 @@
  */
 
 int
-isdn_ppp_write(int min, struct file *file, const char *buf, int count)
+isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)
 {
 	isdn_net_local *lp;
 	struct ippp_struct *is;
@@ -1128,17 +1155,16 @@
 		*p = 0;	/* indicate inbound in DLT_LINUX_SLL */
 	}
 
-	if (is->pass_filter.filter
-	    && sk_run_filter(skb, is->pass_filter.filter,
-	                    is->pass_filter.len) == 0) {
+	if (is->pass_filter
+	    && sk_run_filter(skb, is->pass_filter, is->pass_len) == 0) {
 		if (is->debug & 0x2)
 			printk(KERN_DEBUG "IPPP: inbound frame filtered.\n");
 		kfree_skb(skb);
 		return;
 	}
-	if (!(is->active_filter.filter
-	      && sk_run_filter(skb, is->active_filter.filter,
-	                       is->active_filter.len) == 0)) {
+	if (!(is->active_filter
+	      && sk_run_filter(skb, is->active_filter,
+	                       is->active_len) == 0)) {
 		if (is->debug & 0x2)
 			printk(KERN_DEBUG "IPPP: link-active filter: reseting huptimer.\n");
 		lp->huptimer = 0;
@@ -1276,17 +1302,16 @@
 		*p   = htons(proto);
 	}
 
-	if (ipt->pass_filter.filter 
-	    && sk_run_filter(skb, ipt->pass_filter.filter,
-		             ipt->pass_filter.len) == 0) {
+	if (ipt->pass_filter
+	    && sk_run_filter(skb, ipt->pass_filter, ipt->pass_len) == 0) {
 		if (ipt->debug & 0x4)
 			printk(KERN_DEBUG "IPPP: outbound frame filtered.\n");
 		kfree_skb(skb);
 		goto unlock;
 	}
-	if (!(ipt->active_filter.filter
-	      && sk_run_filter(skb, ipt->active_filter.filter,
-		               ipt->active_filter.len) == 0)) {
+	if (!(ipt->active_filter
+	      && sk_run_filter(skb, ipt->active_filter,
+		               ipt->active_len) == 0)) {
 		if (ipt->debug & 0x4)
 			printk(KERN_DEBUG "IPPP: link-active filter: reseting huptimer.\n");
 		lp->huptimer = 0;
@@ -1475,12 +1500,10 @@
 		*p   = htons(proto);
 	}
 	
-	drop |= is->pass_filter.filter
-	        && sk_run_filter(skb, is->pass_filter.filter,
-	                         is->pass_filter.len) == 0;
-	drop |= is->active_filter.filter
-	        && sk_run_filter(skb, is->active_filter.filter,
-	                         is->active_filter.len) == 0;
+	drop |= is->pass_filter
+	        && sk_run_filter(skb, is->pass_filter, is->pass_len) == 0;
+	drop |= is->active_filter
+	        && sk_run_filter(skb, is->active_filter, is->active_len) == 0;
 	
 	skb_push(skb, IPPP_MAX_HEADER - 4);
 	return drop;
@@ -1969,12 +1992,11 @@
 static int
 isdn_ppp_dev_ioctl_stats(int slot, struct ifreq *ifr, struct net_device *dev)
 {
-	struct ppp_stats *res,
-	 t;
+	struct ppp_stats __user *res = ifr->ifr_data;
+	struct ppp_stats t;
 	isdn_net_local *lp = (isdn_net_local *) dev->priv;
 	int err;
 
-	res = (struct ppp_stats *) ifr->ifr_ifru.ifru_data;
 	err = verify_area(VERIFY_WRITE, res, sizeof(struct ppp_stats));
 
 	if (err)
@@ -2004,7 +2026,8 @@
 		}
 #endif
 	}
-	if( copy_to_user(res, &t, sizeof(struct ppp_stats))) return -EFAULT;
+	if (copy_to_user(res, &t, sizeof(struct ppp_stats)))
+		return -EFAULT;
 	return 0;
 }
 
@@ -2012,7 +2035,6 @@
 isdn_ppp_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
 	int error=0;
-	char *r;
 	int len;
 	isdn_net_local *lp = (isdn_net_local *) dev->priv;
 
@@ -2023,9 +2045,8 @@
 	switch (cmd) {
 #define PPP_VERSION "2.3.7"
 		case SIOCGPPPVER:
-			r = (char *) ifr->ifr_ifru.ifru_data;
 			len = strlen(PPP_VERSION) + 1;
-			if (copy_to_user(r, PPP_VERSION, len))
+			if (copy_to_user(ifr->ifr_data, PPP_VERSION, len))
 				error = -EFAULT;
 			break;
 
--- diff/drivers/isdn/i4l/isdn_ppp.h	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/i4l/isdn_ppp.h	2004-07-01 21:32:36.000000000 +0100
@@ -12,8 +12,8 @@
 #include <linux/ppp_defs.h>     /* for PPP_PROTOCOL */
 #include <linux/isdn_ppp.h>	/* for isdn_ppp info */
 
-extern int isdn_ppp_read(int, struct file *, char *, int);
-extern int isdn_ppp_write(int, struct file *, const char *, int);
+extern int isdn_ppp_read(int, struct file *, char __user *, int);
+extern int isdn_ppp_write(int, struct file *, const char __user *, int);
 extern int isdn_ppp_open(int, struct file *);
 extern int isdn_ppp_init(void);
 extern void isdn_ppp_cleanup(void);
--- diff/drivers/isdn/i4l/isdn_tty.c	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/i4l/isdn_tty.c	2004-07-01 21:32:36.000000000 +0100
@@ -1359,14 +1359,14 @@
  *          allows RS485 driver to be written in user space.
  */
 static int
-isdn_tty_get_lsr_info(modem_info * info, uint * value)
+isdn_tty_get_lsr_info(modem_info * info, uint __user * value)
 {
 	u_char status;
 	uint result;
 
 	status = info->lsr;
 	result = ((status & UART_LSR_TEMT) ? TIOCSER_TEMT : 0);
-	return put_user(result, (uint *) value);
+	return put_user(result, value);
 }
 
 
@@ -1468,12 +1468,12 @@
 #ifdef ISDN_DEBUG_MODEM_IOCTL
 			printk(KERN_DEBUG "ttyI%d ioctl TIOCGSOFTCAR\n", info->line);
 #endif
-			return put_user(C_CLOCAL(tty) ? 1 : 0, (ulong *) arg);
+			return put_user(C_CLOCAL(tty) ? 1 : 0, (ulong __user *) arg);
 		case TIOCSSOFTCAR:
 #ifdef ISDN_DEBUG_MODEM_IOCTL
 			printk(KERN_DEBUG "ttyI%d ioctl TIOCSSOFTCAR\n", info->line);
 #endif
-			if (get_user(arg, (ulong *) arg))
+			if (get_user(arg, (ulong __user *) arg))
 				return -EFAULT;
 			tty->termios->c_cflag =
 			    ((tty->termios->c_cflag & ~CLOCAL) |
--- diff/drivers/isdn/i4l/isdn_x25iface.c	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/i4l/isdn_x25iface.c	2004-07-01 21:32:36.000000000 +0100
@@ -79,7 +79,7 @@
 
 /* create a new x25 interface protocol instance
  */
-struct concap_proto * isdn_x25iface_proto_new()
+struct concap_proto * isdn_x25iface_proto_new(void)
 {
 	ix25_pdata_t * tmp = kmalloc(sizeof(ix25_pdata_t),GFP_KERNEL);
 	IX25DEBUG("isdn_x25iface_proto_new\n");
@@ -275,8 +275,7 @@
 int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
 {
 	unsigned char firstbyte = skb->data[0];
-	unsigned *state = 
-		&( ( (ix25_pdata_t*) (cprot -> proto_data) ) -> state  );
+	enum wan_states *state = &((ix25_pdata_t*)cprot->proto_data)->state;
 	int ret = 0;
 	IX25DEBUG( "isdn_x25iface_xmit: %s first=%x state=%d \n", MY_DEVNAME(cprot -> net_dev), firstbyte, *state );
 	switch ( firstbyte ){
--- diff/drivers/isdn/sc/message.c	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/sc/message.c	2004-07-01 21:32:36.000000000 +0100
@@ -30,7 +30,6 @@
  */
 extern int indicate_status(int,ulong,char*);
 extern int scm_command(isdn_ctrl *);
-extern void *memcpy_fromshmem(int, void *, const void *, size_t);
 
 
 /*
--- diff/drivers/isdn/sc/packet.c	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/sc/packet.c	2004-07-01 21:32:36.000000000 +0100
@@ -25,8 +25,8 @@
 
 extern int get_card_from_id(int);
 extern int indicate_status(int, int,ulong, char*);
-extern void *memcpy_toshmem(int, void *, const void *, size_t);
-extern void *memcpy_fromshmem(int, void *, const void *, size_t);
+extern void memcpy_toshmem(int, void *, const void *, size_t);
+extern void memcpy_fromshmem(int, void *, const void *, size_t);
 extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
                 unsigned int, unsigned int, unsigned int, unsigned int *);
 
--- diff/drivers/isdn/sc/shmem.c	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/sc/shmem.c	2004-07-01 21:32:36.000000000 +0100
@@ -30,19 +30,18 @@
 /*
  *
  */
-void *memcpy_toshmem(int card, void *dest, const void *src, size_t n)
+void memcpy_toshmem(int card, void *dest, const void *src, size_t n)
 {
 	unsigned long flags;
-	void *ret;
 	unsigned char ch;
 
 	if(!IS_VALID_CARD(card)) {
 		pr_debug("Invalid param: %d is not a valid card id\n", card);
-		return NULL;
+		return;
 	}
 
 	if(n > SRAM_PAGESIZE) {
-		return NULL;
+		return;
 	}
 
 	/*
@@ -57,7 +56,7 @@
 
 	outb(((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE) >> 14) | 0x80,
 		sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]);
-	ret = memcpy_toio(sc_adapter[card]->rambase +
+	memcpy_toio(sc_adapter[card]->rambase +
 		((unsigned long) dest % 0x4000), src, n);
 	spin_unlock_irqrestore(&sc_adapter[card]->lock, flags);
 	pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename,
@@ -66,26 +65,23 @@
 		sc_adapter[card]->devicename, n,
 		(unsigned long) src,
 		sc_adapter[card]->rambase + ((unsigned long) dest %0x4000));
-
-	return ret;
 }
 
 /*
  * Reverse of above
  */
-void *memcpy_fromshmem(int card, void *dest, const void *src, size_t n)
+void memcpy_fromshmem(int card, void *dest, const void *src, size_t n)
 {
 	unsigned long flags;
-	void *ret;
 	unsigned char ch;
 
 	if(!IS_VALID_CARD(card)) {
 		pr_debug("Invalid param: %d is not a valid card id\n", card);
-		return NULL;
+		return;
 	}
 
 	if(n > SRAM_PAGESIZE) {
-		return NULL;
+		return;
 	}
 
 	/*
@@ -102,7 +98,7 @@
 
 	outb(((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE) >> 14) | 0x80,
 		sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]);
-	ret = memcpy_fromio(dest,(void *)(sc_adapter[card]->rambase +
+	memcpy_fromio(dest,(void *)(sc_adapter[card]->rambase +
 		((unsigned long) src % 0x4000)), n);
 	spin_unlock_irqrestore(&sc_adapter[card]->lock, flags);
 	pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename,
@@ -110,23 +106,20 @@
 /*	pr_debug("%s: copying %d bytes from %#x to %#x\n",
 		sc_adapter[card]->devicename, n,
 		sc_adapter[card]->rambase + ((unsigned long) src %0x4000), (unsigned long) dest); */
-
-	return ret;
 }
 
-void *memset_shmem(int card, void *dest, int c, size_t n)
+void memset_shmem(int card, void *dest, int c, size_t n)
 {
 	unsigned long flags;
 	unsigned char ch;
-	void *ret;
 
 	if(!IS_VALID_CARD(card)) {
 		pr_debug("Invalid param: %d is not a valid card id\n", card);
-		return NULL;
+		return;
 	}
 
 	if(n > SRAM_PAGESIZE) {
-		return NULL;
+		return;
 	}
 
 	/*
@@ -142,11 +135,9 @@
 
 	outb(((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE) >> 14) | 0x80,
 		sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]);
-	ret = memset_io(sc_adapter[card]->rambase +
+	memset_io(sc_adapter[card]->rambase +
 		((unsigned long) dest % 0x4000), c, n);
 	pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename,
 		((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80);
 	spin_unlock_irqrestore(&sc_adapter[card]->lock, flags);
-
-	return ret;
 }
--- diff/drivers/isdn/tpam/Kconfig	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/tpam/Kconfig	2004-07-01 21:32:36.000000000 +0100
@@ -4,6 +4,7 @@
 config ISDN_DRV_TPAM
 	tristate "Auvertech TurboPAM support (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && ISDN_I4L && PCI
+	select CRC16
 	help
 	  This enables support for the Auvertech TurboPAM ISDN-card.
 	  For running this card, additional firmware is necessary, which has
--- diff/drivers/isdn/tpam/tpam_crcpc.c	2004-05-19 22:11:46.000000000 +0100
+++ source/drivers/isdn/tpam/tpam_crcpc.c	2004-07-01 21:32:36.000000000 +0100
@@ -27,6 +27,7 @@
 
 ---------------------------------------------------------------------------*/
 
+#include <linux/crc16.h>
 #include "tpam.h"
 
 #define  HDLC_CTRL_CHAR_CMPL_MASK	0x20	/* HDLC control character complement mask */
@@ -38,41 +39,6 @@
 #define TRUE	1
 #define FALSE	0
 
-static u16 t_ap_hdlc_like_fcs [256] = {
-	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
-	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
-	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
-	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
-	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
-	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
-	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
-	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
-	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
-	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
-	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
-	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
-	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
-	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
-	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
-	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
-	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
-	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
-	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
-	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
-	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
-	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
-	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
-	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
-	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
-	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
-	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
-	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
-	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
-	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
-	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
-	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
-};
-
 static u8 ap_t_ctrl_char_complemented[256]; /* list of characters to complement */
 
 static void ap_hdlc_like_ctrl_char_list (u32 ctrl_char) {
@@ -119,7 +85,7 @@
 		/*
 		 *   FCS calculation
 		 */
-		fcs = (fcs>>8) ^ t_ap_hdlc_like_fcs[((u8)(fcs^data)) & 0xff];
+		fcs = crc16_byte(fcs, data);
 
 		ESCAPE_CHAR(p_data_out, data);
 	}
@@ -155,7 +121,7 @@
 	while (lng_in--) {
 		data = *buffer_in++;
 		/* calculate FCS */
-		fcs = (fcs>>8) ^ t_ap_hdlc_like_fcs[((u8)(fcs^data)) & 0xff];
+		fcs = crc16_byte(fcs, data);
 		*p_data_out++ = data;
 	}
 
@@ -185,7 +151,7 @@
 	while (lng_in--) {
 		data = *buffer_in++;
 		/* calculate FCS */
-		fcs = (fcs>>8) ^ t_ap_hdlc_like_fcs[((u8)(fcs^data)) & 0xff];
+		fcs = crc16_byte(fcs, data);
 	}
 
 	if (fcs == HDLC_FCS_OK) 
--- diff/drivers/md/Kconfig	2004-05-19 22:11:47.000000000 +0100
+++ source/drivers/md/Kconfig	2004-07-01 21:32:36.000000000 +0100
@@ -180,5 +180,25 @@
 
 	  If unsure, say N.
 
+config DM_SNAPSHOT
+       tristate "Snapshot target (EXPERIMENTAL)"
+       depends on BLK_DEV_DM && EXPERIMENTAL
+       ---help---
+         Allow volume managers to take writeable snapshots of a device.
+
+config DM_MIRROR
+       tristate "Mirror target (EXPERIMENTAL)"
+       depends on BLK_DEV_DM && EXPERIMENTAL
+       ---help---
+         Allow volume managers to mirror logical volumes, also
+         needed for live data migration tools such as 'pvmove'.
+
+config DM_ZERO
+	tristate "Zero target (EXPERIMENTAL)"
+	depends on BLK_DEV_DM && EXPERIMENTAL
+	---help---
+	  A target that discards writes, and returns all zeroes for
+	  reads.  Useful in some recovery situations.
+
 endmenu
 
--- diff/drivers/md/Makefile	2004-05-19 22:11:47.000000000 +0100
+++ source/drivers/md/Makefile	2004-07-01 21:32:36.000000000 +0100
@@ -3,7 +3,9 @@
 #
 
 dm-mod-objs	:= dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \
-		   dm-ioctl.o
+		   dm-ioctl.o dm-io.o kcopyd.o
+dm-snapshot-objs := dm-snap.o dm-exception-store.o
+dm-mirror-objs	:= dm-log.o dm-raid1.o
 raid6-objs	:= raid6main.o raid6algos.o raid6recov.o raid6tables.o \
 		   raid6int1.o raid6int2.o raid6int4.o \
 		   raid6int8.o raid6int16.o raid6int32.o \
@@ -24,6 +26,9 @@
 obj-$(CONFIG_BLK_DEV_MD)	+= md.o
 obj-$(CONFIG_BLK_DEV_DM)	+= dm-mod.o
 obj-$(CONFIG_DM_CRYPT)		+= dm-crypt.o
+obj-$(CONFIG_DM_SNAPSHOT)	+= dm-snapshot.o
+obj-$(CONFIG_DM_MIRROR)		+= dm-mirror.o
+obj-$(CONFIG_DM_ZERO)		+= dm-zero.o
 
 quiet_cmd_unroll = UNROLL  $@
       cmd_unroll = $(PERL) $(srctree)/$(src)/unroll.pl $(UNROLL) \
--- diff/drivers/md/dm-table.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/md/dm-table.c	2004-07-01 21:32:36.000000000 +0100
@@ -400,7 +400,7 @@
 	struct dm_dev dd_copy;
 	dev_t dev = dd->bdev->bd_dev;
 
-	memcpy(&dd_copy, dd, sizeof(dd_copy));
+	dd_copy = *dd;
 
 	dd->mode |= new_mode;
 	dd->bdev = NULL;
@@ -408,7 +408,7 @@
 	if (!r)
 		close_dev(&dd_copy);
 	else
-		memcpy(dd, &dd_copy, sizeof(dd_copy));
+		*dd = dd_copy;
 
 	return r;
 }
@@ -900,6 +900,28 @@
 	}
 }
 
+int dm_table_flush_all(struct dm_table *t)
+{
+	struct list_head *d, *devices = dm_table_get_devices(t);
+	int ret = 0;
+
+	for (d = devices->next; d != devices; d = d->next) {
+		struct dm_dev *dd = list_entry(d, struct dm_dev, list);
+		request_queue_t *q = bdev_get_queue(dd->bdev);
+		int err;
+
+		if (!q->issue_flush_fn)
+			err = -EOPNOTSUPP;
+		else
+			err = q->issue_flush_fn(q, dd->bdev->bd_disk, NULL);
+
+		if (!ret)
+			ret = err;
+	}
+
+	return ret;
+}
+
 EXPORT_SYMBOL(dm_vcalloc);
 EXPORT_SYMBOL(dm_get_device);
 EXPORT_SYMBOL(dm_put_device);
@@ -908,3 +930,4 @@
 EXPORT_SYMBOL(dm_table_put);
 EXPORT_SYMBOL(dm_table_get);
 EXPORT_SYMBOL(dm_table_unplug_all);
+EXPORT_SYMBOL(dm_table_flush_all);
--- diff/drivers/md/dm.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/md/dm.c	2004-07-01 21:32:36.000000000 +0100
@@ -394,7 +394,7 @@
 	struct bio_vec *bv = bio->bi_io_vec + idx;
 
 	clone = bio_alloc(GFP_NOIO, 1);
-	memcpy(clone->bi_io_vec, bv, sizeof(*bv));
+	*clone->bi_io_vec = *bv;
 
 	clone->bi_sector = sector;
 	clone->bi_bdev = bio->bi_bdev;
@@ -586,6 +586,21 @@
 	return 0;
 }
 
+static int dm_flush_all(request_queue_t *q, struct gendisk *disk,
+			sector_t *error_sector)
+{
+	struct mapped_device *md = q->queuedata;
+	struct dm_table *map = dm_get_table(md);
+	int ret = -ENXIO;
+
+	if (map) {
+		ret = dm_table_flush_all(md->map);
+		dm_table_put(map);
+	}
+
+	return ret;
+}
+
 static void dm_unplug_all(request_queue_t *q)
 {
 	struct mapped_device *md = q->queuedata;
@@ -698,6 +713,7 @@
 	md->queue->backing_dev_info.congested_data = md;
 	blk_queue_make_request(md->queue, dm_request);
 	md->queue->unplug_fn = dm_unplug_all;
+	md->queue->issue_flush_fn = dm_flush_all;
 
 	md->io_pool = mempool_create(MIN_IOS, mempool_alloc_slab,
 				     mempool_free_slab, _io_cache);
--- diff/drivers/md/dm.h	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/md/dm.h	2004-07-01 21:32:37.000000000 +0100
@@ -113,6 +113,7 @@
 void dm_table_resume_targets(struct dm_table *t);
 int dm_table_any_congested(struct dm_table *t, int bdi_bits);
 void dm_table_unplug_all(struct dm_table *t);
+int dm_table_flush_all(struct dm_table *t);
 
 /*-----------------------------------------------------------------
  * A registry of target types.
--- diff/drivers/md/linear.c	2004-05-19 22:11:47.000000000 +0100
+++ source/drivers/md/linear.c	2004-07-01 21:32:37.000000000 +0100
@@ -47,7 +47,6 @@
 		return hash->dev0;
 }
 
-
 /**
  *	linear_mergeable_bvec -- tell bio layer if a two requests can be merged
  *	@q: request queue
@@ -93,6 +92,27 @@
 	}
 }
 
+static int linear_issue_flush(request_queue_t *q, struct gendisk *disk,
+			      sector_t *error_sector)
+{
+	mddev_t *mddev = q->queuedata;
+	linear_conf_t *conf = mddev_to_conf(mddev);
+	int i, ret = 0;
+
+	for (i=0; i < mddev->raid_disks; i++) {
+		struct block_device *bdev = conf->disks[i].rdev->bdev;
+		request_queue_t *r_queue = bdev_get_queue(bdev);
+
+		if (!r_queue->issue_flush_fn) {
+			ret = -EOPNOTSUPP;
+			break;
+		}
+		ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector);
+		if (ret)
+			break;
+	}
+	return ret;
+}
 
 static int linear_run (mddev_t *mddev)
 {
@@ -200,6 +220,7 @@
 
 	blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec);
 	mddev->queue->unplug_fn = linear_unplug;
+	mddev->queue->issue_flush_fn = linear_issue_flush;
 	return 0;
 
 out:
--- diff/drivers/md/md.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/md/md.c	2004-07-01 21:32:37.000000000 +0100
@@ -154,6 +154,39 @@
 		tmp = tmp->next;})					\
 		)
 
+int md_flush_mddev(mddev_t *mddev, sector_t *error_sector)
+{
+	struct list_head *tmp;
+	mdk_rdev_t *rdev;
+	int ret = 0;
+
+	/*
+	 * this list iteration is done without any locking in md?!
+	 */
+	ITERATE_RDEV(mddev, rdev, tmp) {
+		request_queue_t *r_queue = bdev_get_queue(rdev->bdev);
+		int err;
+
+		if (!r_queue->unplug_fn)
+			err = -EOPNOTSUPP;
+		else
+			err = r_queue->issue_flush_fn(r_queue, rdev->bdev->bd_disk, error_sector);
+
+		if (!ret)
+			ret = err;
+	}
+
+	return ret;
+}
+
+static int md_flush_all(request_queue_t *q, struct gendisk *disk,
+			 sector_t *error_sector)
+{
+	mddev_t *mddev = q->queuedata;
+
+	return md_flush_mddev(mddev, error_sector);
+}
+
 static int md_fail_request (request_queue_t *q, struct bio *bio)
 {
 	bio_io_error(bio, bio->bi_size);
@@ -1645,6 +1678,7 @@
 	 */
 	mddev->queue->queuedata = mddev;
 	mddev->queue->make_request_fn = mddev->pers->make_request;
+	mddev->queue->issue_flush_fn = md_flush_all;
 
 	mddev->changed = 1;
 	return 0;
--- diff/drivers/md/multipath.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/md/multipath.c	2004-07-01 21:32:37.000000000 +0100
@@ -216,6 +216,31 @@
 	seq_printf (seq, "]");
 }
 
+static int multipath_issue_flush(request_queue_t *q, struct gendisk *disk,
+				 sector_t *error_sector)
+{
+	mddev_t *mddev = q->queuedata;
+	multipath_conf_t *conf = mddev_to_conf(mddev);
+	int i, ret = 0;
+
+	for (i=0; i<mddev->raid_disks; i++) {
+		mdk_rdev_t *rdev = conf->multipaths[i].rdev;
+		if (rdev && !rdev->faulty) {
+			struct block_device *bdev = rdev->bdev;
+			request_queue_t *r_queue = bdev_get_queue(bdev);
+
+			if (!r_queue->issue_flush_fn) {
+				ret = -EOPNOTSUPP;
+				break;
+			}
+
+			ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector);
+			if (ret)
+				break;
+		}
+	}
+	return ret;
+}
 
 /*
  * Careful, this can execute in IRQ contexts as well!
@@ -430,6 +455,8 @@
 
 	mddev->queue->unplug_fn = multipath_unplug;
 
+	mddev->queue->issue_flush_fn = multipath_issue_flush;
+
 	conf->working_disks = 0;
 	ITERATE_RDEV(mddev,rdev,tmp) {
 		disk_idx = rdev->raid_disk;
--- diff/drivers/md/raid0.c	2004-05-19 22:11:47.000000000 +0100
+++ source/drivers/md/raid0.c	2004-07-01 21:32:37.000000000 +0100
@@ -40,6 +40,31 @@
 	}
 }
 
+static int raid0_issue_flush(request_queue_t *q, struct gendisk *disk,
+			     sector_t *error_sector)
+{
+	mddev_t *mddev = q->queuedata;
+	raid0_conf_t *conf = mddev_to_conf(mddev);
+	mdk_rdev_t **devlist = conf->strip_zone[0].dev;
+	int i, ret = 0;
+
+	for (i=0; i<mddev->raid_disks; i++) {
+		struct block_device *bdev = devlist[i]->bdev;
+		request_queue_t *r_queue = bdev_get_queue(bdev);
+
+		if (!r_queue->issue_flush_fn) {
+			ret = -EOPNOTSUPP;
+			break;
+		}
+
+		ret =r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector);
+		if (ret)
+			break;
+	}
+	return ret;
+}
+
+
 static int create_strip_zones (mddev_t *mddev)
 {
 	int i, c, j;
@@ -219,6 +244,8 @@
 
 	mddev->queue->unplug_fn = raid0_unplug;
 
+	mddev->queue->issue_flush_fn = raid0_issue_flush;
+
 	printk("raid0: done.\n");
 	return 0;
  abort:
--- diff/drivers/md/raid1.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/md/raid1.c	2004-07-01 21:32:37.000000000 +0100
@@ -206,7 +206,7 @@
 			*rdevp = rdev;
 			atomic_inc(&rdev->nr_pending);
 			spin_unlock_irq(&conf->device_lock);
-			return 0;
+			return i;
 		}
 	}
 	spin_unlock_irq(&conf->device_lock);
@@ -376,7 +376,8 @@
 	 * device if no resync is going on, or below the resync window.
 	 * We take the first readable disk when above the resync window.
 	 */
-	if (!conf->mddev->in_sync && (this_sector + sectors >= conf->next_resync)) {
+	if (conf->mddev->recovery_cp < MaxSector &&
+	    (this_sector + sectors >= conf->next_resync)) {
 		/* make sure that disk is operational */
 		new_disk = 0;
 
@@ -480,6 +481,32 @@
 	unplug_slaves(q->queuedata);
 }
 
+static int raid1_issue_flush(request_queue_t *q, struct gendisk *disk,
+			     sector_t *error_sector)
+{
+	mddev_t *mddev = q->queuedata;
+	conf_t *conf = mddev_to_conf(mddev);
+	unsigned long flags;
+	int i, ret = 0;
+
+	spin_lock_irqsave(&conf->device_lock, flags);
+	for (i=0; i<mddev->raid_disks; i++) {
+		mdk_rdev_t *rdev = conf->mirrors[i].rdev;
+		if (rdev && !rdev->faulty) {
+			struct block_device *bdev = rdev->bdev;
+			request_queue_t *r_queue = bdev_get_queue(bdev);
+
+			if (r_queue->issue_flush_fn) {
+				ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector);
+				if (ret)
+					break;
+			}
+		}
+	}
+	spin_unlock_irqrestore(&conf->device_lock, flags);
+	return ret;
+}
+
 /*
  * Throttle resync depth, so that we can both get proper overlapping of
  * requests, but are still able to handle normal requests quickly.
@@ -918,18 +945,22 @@
 
 		mddev = r1_bio->mddev;
 		conf = mddev_to_conf(mddev);
-		bio = r1_bio->master_bio;
 		if (test_bit(R1BIO_IsSync, &r1_bio->state)) {
 			sync_request_write(mddev, r1_bio);
 			unplug = 1;
 		} else {
-			if (map(mddev, &rdev) == -1) {
+			int disk;
+			bio = r1_bio->bios[r1_bio->read_disk];
+			if ((disk=map(mddev, &rdev)) == -1) {
 				printk(KERN_ALERT "raid1: %s: unrecoverable I/O"
 				       " read error for block %llu\n",
 				       bdevname(bio->bi_bdev,b),
 				       (unsigned long long)r1_bio->sector);
 				raid_end_bio_io(r1_bio);
 			} else {
+				r1_bio->bios[r1_bio->read_disk] = NULL;
+				r1_bio->read_disk = disk;
+				r1_bio->bios[r1_bio->read_disk] = bio;
 				printk(KERN_ERR "raid1: %s: redirecting sector %llu to"
 				       " another mirror\n",
 				       bdevname(rdev->bdev,b),
@@ -1163,6 +1194,7 @@
 
 	mddev->queue->unplug_fn = raid1_unplug;
 
+	mddev->queue->issue_flush_fn = raid1_issue_flush;
 
 	ITERATE_RDEV(mddev, rdev, tmp) {
 		disk_idx = rdev->raid_disk;
--- diff/drivers/md/raid5.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/md/raid5.c	2004-07-01 21:32:37.000000000 +0100
@@ -1339,6 +1339,39 @@
 	unplug_slaves(mddev);
 }
 
+static int raid5_issue_flush(request_queue_t *q, struct gendisk *disk,
+			     sector_t *error_sector)
+{
+	mddev_t *mddev = q->queuedata;
+	raid5_conf_t *conf = mddev_to_conf(mddev);
+	int i, ret = 0;
+
+	for (i=0; i<mddev->raid_disks; i++) {
+		mdk_rdev_t *rdev = conf->disks[i].rdev;
+		if (rdev && !rdev->faulty) {
+			struct block_device *bdev = rdev->bdev;
+			request_queue_t *r_queue;
+
+			if (!bdev)
+				continue;
+
+			r_queue = bdev_get_queue(bdev);
+			if (!r_queue)
+				continue;
+
+			if (!r_queue->issue_flush_fn) {
+				ret = -EOPNOTSUPP;
+				break;
+			}
+
+			ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector);
+			if (ret)
+				break;
+		}
+	}
+	return ret;
+}
+
 static inline void raid5_plug_device(raid5_conf_t *conf)
 {
 	spin_lock_irq(&conf->device_lock);
@@ -1545,6 +1578,7 @@
 	atomic_set(&conf->preread_active_stripes, 0);
 
 	mddev->queue->unplug_fn = raid5_unplug_device;
+	mddev->queue->issue_flush_fn = raid5_issue_flush;
 
 	PRINTK("raid5: run(%s) called.\n", mdname(mddev));
 
--- diff/drivers/md/raid6main.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/md/raid6main.c	2004-07-01 21:32:37.000000000 +0100
@@ -1501,6 +1501,39 @@
 	unplug_slaves(mddev);
 }
 
+static int raid6_issue_flush(request_queue_t *q, struct gendisk *disk,
+			     sector_t *error_sector)
+{
+	mddev_t *mddev = q->queuedata;
+	raid6_conf_t *conf = mddev_to_conf(mddev);
+	int i, ret = 0;
+
+	for (i=0; i<mddev->raid_disks; i++) {
+		mdk_rdev_t *rdev = conf->disks[i].rdev;
+		if (rdev && !rdev->faulty) {
+			struct block_device *bdev = rdev->bdev;
+			request_queue_t *r_queue;
+
+			if (!bdev)
+				continue;
+
+			r_queue = bdev_get_queue(bdev);
+			if (!r_queue)
+				continue;
+
+			if (!r_queue->issue_flush_fn) {
+				ret = -EOPNOTSUPP;
+				break;
+			}
+
+			ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector);
+			if (ret)
+				break;
+		}
+	}
+	return ret;
+}
+
 static inline void raid6_plug_device(raid6_conf_t *conf)
 {
 	spin_lock_irq(&conf->device_lock);
@@ -1708,6 +1741,7 @@
 	atomic_set(&conf->preread_active_stripes, 0);
 
 	mddev->queue->unplug_fn = raid6_unplug_device;
+	mddev->queue->issue_flush_fn = raid6_issue_flush;
 
 	PRINTK("raid6: run(%s) called.\n", mdname(mddev));
 
--- diff/drivers/md/xor.c	2004-05-19 22:11:47.000000000 +0100
+++ source/drivers/md/xor.c	2004-07-01 21:32:37.000000000 +0100
@@ -108,29 +108,40 @@
 	}
 	b2 = b1 + 2*PAGE_SIZE + BENCH_SIZE;
 
-	printk(KERN_INFO "raid5: measuring checksumming speed\n");
+	/*
+	 * If this arch/cpu has a short-circuited selection, don't loop through all
+	 * the possible functions, just test the best one
+	 */
+
+	fastest = NULL;
+
+#ifdef XOR_SELECT_TEMPLATE
+		fastest = XOR_SELECT_TEMPLATE(fastest);
+#endif
 
 #define xor_speed(templ)	do_xor_speed((templ), b1, b2)
 
-	XOR_TRY_TEMPLATES;
+	if (fastest) {
+		printk(KERN_INFO "raid5: automatically using best checksumming function: %s\n",
+			fastest->name);
+		xor_speed(fastest);
+	} else {
+		printk(KERN_INFO "raid5: measuring checksumming speed\n");
+		XOR_TRY_TEMPLATES;
+		fastest = template_list;
+		for (f = fastest; f; f = f->next)
+			if (f->speed > fastest->speed)
+				fastest = f;
+	}
+
+	printk("raid5: using function: %s (%d.%03d MB/sec)\n",
+	       fastest->name, fastest->speed / 1000, fastest->speed % 1000);
 
 #undef xor_speed
 
 	free_pages((unsigned long)b1, 2);
 
-	fastest = template_list;
-	for (f = fastest; f; f = f->next)
-		if (f->speed > fastest->speed)
-			fastest = f;
-
-#ifdef XOR_SELECT_TEMPLATE
-	fastest = XOR_SELECT_TEMPLATE(fastest);
-#endif
-
 	active_template = fastest;
-	printk("raid5: using function: %s (%d.%03d MB/sec)\n",
-	       fastest->name, fastest->speed / 1000, fastest->speed % 1000);
-
 	return 0;
 }
 
--- diff/drivers/media/common/ir-common.c	2004-05-19 22:11:47.000000000 +0100
+++ source/drivers/media/common/ir-common.c	2004-07-01 21:32:37.000000000 +0100
@@ -75,6 +75,8 @@
 	[ 0x35 ] = KEY_PLAY,            // play
 	[ 0x36 ] = KEY_STOP,            // stop
 	[ 0x37 ] = KEY_RECORD,          // recording
+	[ 0x3c ] = KEY_TEXT,            // teletext submode (Japan: 12)
+	[ 0x3d ] = KEY_SUSPEND,         // system standby
 
 #if 0 /* FIXME */
 	[ 0x0a ] = KEY_RESERVED,        // 1/2/3 digits (japan: 10)
@@ -106,8 +108,6 @@
 	[ 0x39 ] = KEY_RESERVED,        // external 2
 	[ 0x3a ] = KEY_RESERVED,        // PIP display mode
 	[ 0x3b ] = KEY_RESERVED,        // view data mode / advance
-	[ 0x3c ] = KEY_RESERVED,        // teletext submode (Japan: 12)
-	[ 0x3d ] = KEY_RESERVED,        // system standby
 	[ 0x3e ] = KEY_RESERVED,        // crispener on/off
 	[ 0x3f ] = KEY_RESERVED,        // system select
 #endif
--- diff/drivers/media/radio/radio-zoltrix.c	2004-05-19 22:11:49.000000000 +0100
+++ source/drivers/media/radio/radio-zoltrix.c	2004-07-01 21:32:37.000000000 +0100
@@ -273,7 +273,7 @@
 	case VIDIOCGAUDIO:
 		{
 			struct video_audio *v = arg;
-			memset(&v, 0, sizeof(*v));
+			memset(v, 0, sizeof(*v));
 			v->flags |= VIDEO_AUDIO_MUTABLE | VIDEO_AUDIO_VOLUME;
 			v->mode |= zol_is_stereo(zol)
 				? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
--- diff/drivers/media/video/Kconfig	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/media/video/Kconfig	2004-07-01 21:32:37.000000000 +0100
@@ -295,5 +295,16 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called cx8800
 
+config VIDEO_OVCAMCHIP
+	tristate "OmniVision Camera Chip support"
+	depends on VIDEO_DEV && I2C
+	---help---
+	  Support for the OmniVision OV6xxx and OV7xxx series of camera chips.
+	  This driver is intended to be used with the ov511 and w9968cf USB
+	  camera drivers.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called ovcamchip
+
 endmenu
 
--- diff/drivers/media/video/Makefile	2004-05-19 22:11:49.000000000 +0100
+++ source/drivers/media/video/Makefile	2004-07-01 21:32:37.000000000 +0100
@@ -37,6 +37,7 @@
 obj-$(CONFIG_VIDEO_MEYE) += meye.o
 obj-$(CONFIG_VIDEO_SAA7134) += saa7134/
 obj-$(CONFIG_VIDEO_CX88) += cx88/
+obj-$(CONFIG_VIDEO_OVCAMCHIP) += ovcamchip/
 obj-$(CONFIG_VIDEO_MXB) += saa7111.o tuner.o tda9840.o tea6415c.o tea6420.o mxb.o
 obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
 obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
--- diff/drivers/media/video/bttv-cards.c	2004-05-19 22:11:49.000000000 +0100
+++ source/drivers/media/video/bttv-cards.c	2004-07-01 21:32:37.000000000 +0100
@@ -71,6 +71,9 @@
 
 static void PXC200_muxsel(struct bttv *btv, unsigned int input);
 
+static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
+static void picolo_tetra_init(struct bttv *btv);
+
 static int terratec_active_radio_upgrade(struct bttv *btv);
 static int tea5757_read(struct bttv *btv);
 static int tea5757_write(struct bttv *btv, int value);
@@ -181,6 +184,7 @@
 	{ 0xff00bd11, BTTV_PINNACLE,      "Pinnacle PCTV [bswap]" },
 
 	{ 0x3000121a, BTTV_VOODOOTV_FM,   "3Dfx VoodooTV FM/ VoodooTV 200" },
+	{ 0x263710b4, BTTV_VOODOOTV_FM,   "3Dfx VoodooTV FM/ VoodooTV 200" },
 	{ 0x3060121a, BTTV_STB2,	  "3Dfx VoodooTV 100/ STB OEM" },
 	
 	{ 0x3000144f, BTTV_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
@@ -260,12 +264,15 @@
 	{ 0x41424344, BTTV_GRANDTEC,      "GrandTec Multi Capture" },
 	{ 0x01020304, BTTV_XGUARD,        "Grandtec Grand X-Guard" },
 	
-    	{ 0x010115cb, BTTV_GMV1,          "AG GMV1" },
-	{ 0x010114c7, BTTV_MODTEC_205,    "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
 	{ 0x18501851, BTTV_CHRONOS_VS2,   "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
 	{ 0x18511851, BTTV_FLYVIDEO98EZ,  "FlyVideo 98EZ (LR51)/ CyberMail AV" },
 	{ 0x18521852, BTTV_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
 	{ 0x41a0a051, BTTV_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
+	{ 0x18501f7f, BTTV_FLYVIDEO_98,   "Lifeview Flyvideo 98" },
+
+    	{ 0x010115cb, BTTV_GMV1,          "AG GMV1" },
+	{ 0x010114c7, BTTV_MODTEC_205,    "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
+
 	{ 0x10b42636, BTTV_HAUPPAUGE878,  "STB ???" },
 	{ 0x217d6606, BTTV_WINFAST2000,   "Leadtek WinFast TV 2000" },
 	{ 0xfff6f6ff, BTTV_WINFAST2000,   "Leadtek WinFast TV 2000" },
@@ -280,14 +287,21 @@
 	{ 0x40111554, BTTV_PV_BT878P_9B,  "Prolink Pixelview PV-BT" },
 	{ 0x17de0a01, BTTV_KWORLD,        "Mecer TV/FM/Video Tuner" },
 
+	{ 0x01051805, BTTV_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
+	{ 0x01061805, BTTV_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
+	{ 0x01071805, BTTV_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
+	{ 0x01081805, BTTV_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
+
 	// likely broken, vendor id doesn't match the other magic views ...
 	//{ 0xa0fca04f, BTTV_MAGICTVIEW063, "Guillemot Maxi TV Video 3" },
 	
 	// DVB cards (using pci function .1 for mpeg data xfer)
 	{ 0x01010071, BTTV_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
+	{ 0x07611461, BTTV_NEBULA_DIGITV, "AverMedia AverTV DVB-T" },
 	{ 0x002611bd, BTTV_TWINHAN_DST,   "Pinnacle PCTV SAT CI" },
 	{ 0x00011822, BTTV_TWINHAN_DST,   "Twinhan VisionPlus DVB-T" },
 	{ 0xfc00270f, BTTV_TWINHAN_DST,   "ChainTech digitop DST-1000 DVB-S" },
+	{ 0x07711461, BTTV_AVDVBT_771,    "AVermedia DVB-T 771" },
 	
 	{ 0, -1, NULL }
 };
@@ -835,7 +849,7 @@
 	.svhs		= 2,
 	.gpiomask	= 0x03000F,
 	.muxsel		= { 2, 3, 1, 1},
-	.audiomux	= { 2, 0, 0, 0, 1},
+	.audiomux	= { 2, 0xd0001, 0, 0, 1},
 	.needs_tvaudio	= 0,
 	.pll		= PLL_28,
 	.tuner_type	= -1,
@@ -1646,6 +1660,7 @@
 	.muxsel         = { 3, 0, 1, 2},
 	.needs_tvaudio  = 0, 
 	.pll            = PLL_28,
+	.no_gpioirq     = 1,
 },{
         .name           = "Formac ProTV II (bt878)",
         .video_inputs   = 4,
@@ -2012,6 +2027,57 @@
 	.tuner_type     = TUNER_PHILIPS_PAL,
 	.has_remote     = 1,
 	.has_radio      = 1,
+},{
+	/*Eric DEBIEF <debief@telemsa.com>*/
+	/*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controled*/
+	/* adds picolo_tetra_muxsel(), picolo_tetra_init(), the folowing declaration strucure, and #define BTTV_PICOLO_TETRA_CHIP*/
+	/*0x79 in bttv.h*/
+	.name           = "Euresys Picolo Tetra",
+	.video_inputs   = 4,
+	.audio_inputs   = 0,
+	.tuner          = -1,
+	.svhs           = -1,
+	.gpiomask       = 0,
+	.gpiomask2      = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
+	.no_msp34xx     = 1,
+	.no_tda9875     = 1,
+	.no_tda7432     = 1,
+	.muxsel         = {2,2,2,2},/*878A input is always MUX0, see above.*/
+	.audiomux       = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
+	.pll            = PLL_28,
+	.needs_tvaudio  = 0,
+	.muxsel_hook    = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
+},{
+	/* Spirit TV Tuner from http://spiritmodems.com.au */
+	/* Stafford Goodsell <surge@goliath.homeunix.org> */
+	.name           = "Spirit TV Tuner",
+	.video_inputs   = 3,
+	.audio_inputs   = 1,
+	.tuner          = 0,
+	.svhs           = 2,
+	.gpiomask       = 0x0000000f,
+	.muxsel         = { 2, 1, 1 },
+	.audiomux       = { 0x02, 0x00, 0x00, 0x00, 0x00},
+	.tuner_type     = TUNER_TEMIC_PAL,
+	.no_msp34xx     = 1,
+	.no_tda9875     = 1,
+},{
+	/* Wolfram Joost <wojo@frokaschwei.de> */
+        .name           = "AVerMedia AVerTV DVB-T 771",
+        .video_inputs   = 2,
+        .svhs           = 1,
+        .tuner          = -1,
+        .tuner_type     = TUNER_ABSENT,
+        .muxsel         = { 3 , 3 },
+        .no_msp34xx     = 1,
+        .no_tda9875     = 1,
+        .no_tda7432     = 1,
+        .pll            = PLL_28,
+        .has_dvb        = 1,
+        .no_gpioirq     = 1,
+#if 0 /* untested */
+        .has_remote     = 1,
+#endif
 }};
 
 const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
@@ -2381,6 +2447,7 @@
 		pvr_boot(btv);
 		break;
 	case BTTV_TWINHAN_DST:
+	case BTTV_AVDVBT_771:
 		btv->use_i2c_hw = 1;
 		break;
 	}
@@ -2432,6 +2499,9 @@
 	case BTTV_PXC200:
 		init_PXC200(btv);
 		break;
+	case BTTV_PICOLO_TETRA_CHIP:
+		picolo_tetra_init(btv);
+		break;
 	case BTTV_VHX:
 		btv->has_radio    = 1;
 		btv->has_matchbox = 1;
@@ -2668,6 +2738,10 @@
 		btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
 		printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
                        btv->c.nr,&eeprom_data[0x1e]);
+        } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
+                btv->tuner_type=TUNER_PHILIPS_NTSC;
+                printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
+                       btv->c.nr,&eeprom_data[0x1e]);
 	} else {
 		printk("bttv%d: Modtec: Unknown TunerString: %s\n",
 		       btv->c.nr,&eeprom_data[0x1e]);
@@ -3786,6 +3860,21 @@
 	};
 	gpio_write(masks[input%16]);
 }
+static void picolo_tetra_init(struct bttv *btv)
+{
+	/*This is the video input redirection fonctionality : I DID NOT USED IT. */
+	btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
+	btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A]  set to 1*/
+}
+static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
+{
+
+	dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel =>  input = %d\n",btv->c.nr,input);
+	/*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
+	/*GPIO[20]&GPIO[21] used to choose the right input*/
+	btwrite (input<<20,BT848_GPIO_DATA);
+
+}
 
 /*
  * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
--- diff/drivers/media/video/bttv-driver.c	2004-05-19 22:11:50.000000000 +0100
+++ source/drivers/media/video/bttv-driver.c	2004-07-01 21:32:37.000000000 +0100
@@ -1334,7 +1334,8 @@
 	spin_lock_irqsave(&btv->s_lock,flags);
 	old = btv->screen;
 	btv->screen = new;
-	bttv_set_dma(btv, 0x03, 1);
+	btv->curr.irqflags |= 1;
+	bttv_set_dma(btv, 0x03, btv->curr.irqflags);
 	spin_unlock_irqrestore(&btv->s_lock,flags);
 	if (NULL == new)
 		free_btres(btv,fh,RESOURCE_OVERLAY);
@@ -1441,7 +1442,8 @@
 
 	buf->vb.state = STATE_QUEUED;
 	list_add_tail(&buf->vb.queue,&fh->btv->capture);
-	bttv_set_dma(fh->btv, 0x03, 1);
+	fh->btv->curr.irqflags |= 1;
+	bttv_set_dma(fh->btv, 0x03, fh->btv->curr.irqflags);
 }
 
 static void buffer_release(struct file *file, struct videobuf_buffer *vb)
@@ -3203,8 +3205,8 @@
 	printk("  main: %08Lx\n",
 	       (unsigned long long)btv->main.dma);
 	printk("  vbi : o=%08Lx e=%08Lx\n",
-	       btv->curr.vbi ? (unsigned long long)btv->curr.vbi->top.dma : 0,
-	       btv->curr.vbi ? (unsigned long long)btv->curr.vbi->bottom.dma : 0);
+	       btv->cvbi ? (unsigned long long)btv->cvbi->top.dma : 0,
+	       btv->cvbi ? (unsigned long long)btv->cvbi->bottom.dma : 0);
 	printk("  cap : o=%08Lx e=%08Lx\n",
 	       btv->curr.top    ? (unsigned long long)btv->curr.top->top.dma : 0,
 	       btv->curr.bottom ? (unsigned long long)btv->curr.bottom->bottom.dma : 0);
@@ -3224,7 +3226,7 @@
 
 	if (0 == (btread(BT848_DSTATUS) & BT848_DSTATUS_HLOC)) {
 		printk("bttv%d: Oh, there (temporarely?) is no input signal. "
-		       "Ok, then this is harmless, don't worry ;)",
+		       "Ok, then this is harmless, don't worry ;)\n",
 		       btv->c.nr);
 		return;
 	}
@@ -3236,18 +3238,12 @@
 }
 
 static int
-bttv_irq_next_set(struct bttv *btv, struct bttv_buffer_set *set)
+bttv_irq_next_video(struct bttv *btv, struct bttv_buffer_set *set)
 {
 	struct bttv_buffer *item;
 
 	memset(set,0,sizeof(*set));
 
-	/* vbi request ? */
-	if (!list_empty(&btv->vcapture)) {
-		set->irqflags = 1;
-		set->vbi = list_entry(btv->vcapture.next, struct bttv_buffer, vb.queue);
-	}
-
 	/* capture request ? */
 	if (!list_empty(&btv->capture)) {
 		set->irqflags = 1;
@@ -3295,27 +3291,20 @@
 		}
 	}
 
-	dprintk("bttv%d: next set: top=%p bottom=%p vbi=%p "
-		"[screen=%p,irq=%d,%d]\n",
-		btv->c.nr,set->top, set->bottom, set->vbi,
+	dprintk("bttv%d: next set: top=%p bottom=%p [screen=%p,irq=%d,%d]\n",
+		btv->c.nr,set->top, set->bottom,
 		btv->screen,set->irqflags,set->topirq);
 	return 0;
 }
 
 static void
-bttv_irq_wakeup_set(struct bttv *btv, struct bttv_buffer_set *wakeup,
-		    struct bttv_buffer_set *curr, unsigned int state)
+bttv_irq_wakeup_video(struct bttv *btv, struct bttv_buffer_set *wakeup,
+		      struct bttv_buffer_set *curr, unsigned int state)
 {
 	struct timeval ts;
 
 	do_gettimeofday(&ts);
 
-	if (NULL != wakeup->vbi) {
-		wakeup->vbi->vb.ts = ts;
-		wakeup->vbi->vb.field_count = btv->field_count;
-		wakeup->vbi->vb.state = state;
-		wake_up(&wakeup->vbi->vb.done);
-	}
 	if (wakeup->top == wakeup->bottom) {
 		if (NULL != wakeup->top && curr->top != wakeup->top) {
 			if (irq_debug > 1)
@@ -3345,10 +3334,27 @@
 	}
 }
 
+static void
+bttv_irq_wakeup_vbi(struct bttv *btv, struct bttv_buffer *wakeup,
+		    unsigned int state)
+{
+	struct timeval ts;
+
+	if (NULL == wakeup)
+		return;
+
+	do_gettimeofday(&ts);
+	wakeup->vb.ts = ts;
+	wakeup->vb.field_count = btv->field_count;
+	wakeup->vb.state = state;
+	wake_up(&wakeup->vb.done);
+}
+
 static void bttv_irq_timeout(unsigned long data)
 {
 	struct bttv *btv = (struct bttv *)data;
 	struct bttv_buffer_set old,new;
+	struct bttv_buffer *ovbi;
 	struct bttv_buffer *item;
 	unsigned long flags;
 	
@@ -3364,13 +3370,17 @@
 	
 	/* deactivate stuff */
 	memset(&new,0,sizeof(new));
-	old = btv->curr;
+	old  = btv->curr;
+	ovbi = btv->cvbi;
 	btv->curr = new;
-	bttv_buffer_set_activate(btv, &new);
+	btv->cvbi = NULL;
+	bttv_buffer_activate_video(btv, &new);
+	bttv_buffer_activate_vbi(btv,   NULL);
 	bttv_set_dma(btv, 0, 0);
 
 	/* wake up */
-	bttv_irq_wakeup_set(btv, &old, &new, STATE_ERROR);
+	bttv_irq_wakeup_video(btv, &old, &new, STATE_ERROR);
+	bttv_irq_wakeup_vbi(btv, ovbi, STATE_ERROR);
 
 	/* cancel all outstanding capture / vbi requests */
 	while (!list_empty(&btv->capture)) {
@@ -3410,8 +3420,17 @@
 	spin_unlock(&btv->s_lock);
 }
 
+static inline int is_active(struct btcx_riscmem *risc, u32 rc)
+{
+	if (rc < risc->dma)
+		return 0;
+	if (rc > risc->dma + risc->size)
+		return 0;
+	return 1;
+}
+
 static void
-bttv_irq_switch_fields(struct bttv *btv)
+bttv_irq_switch_video(struct bttv *btv)
 {
 	struct bttv_buffer_set new;
 	struct bttv_buffer_set old;
@@ -3420,9 +3439,10 @@
 	spin_lock(&btv->s_lock);
 
 	/* new buffer set */
-	bttv_irq_next_set(btv, &new);
+	bttv_irq_next_video(btv, &new);
 	rc = btread(BT848_RISC_COUNT);
-	if (rc < btv->main.dma || rc > btv->main.dma + 0x100) {
+	if ((btv->curr.top    && is_active(&btv->curr.top->top,       rc)) ||
+	    (btv->curr.bottom && is_active(&btv->curr.bottom->bottom, rc))) {
 		btv->framedrop++;
 		if (debug_latency)
 			bttv_irq_debug_low_latency(btv, rc);
@@ -3433,7 +3453,7 @@
 	/* switch over */
 	old = btv->curr;
 	btv->curr = new;
-	bttv_buffer_set_activate(btv, &new);
+	bttv_buffer_activate_video(btv, &new);
 	bttv_set_dma(btv, 0, new.irqflags);
 
 	/* switch input */
@@ -3443,7 +3463,39 @@
 	}
 
 	/* wake up finished buffers */
-	bttv_irq_wakeup_set(btv, &old, &new, STATE_DONE);
+	bttv_irq_wakeup_video(btv, &old, &new, STATE_DONE);
+	spin_unlock(&btv->s_lock);
+}
+
+static void
+bttv_irq_switch_vbi(struct bttv *btv)
+{
+	struct bttv_buffer *new = NULL;
+	struct bttv_buffer *old;
+	u32 rc;
+
+	spin_lock(&btv->s_lock);
+
+	if (!list_empty(&btv->vcapture))
+		new = list_entry(btv->vcapture.next, struct bttv_buffer, vb.queue);
+	old = btv->cvbi;
+
+	rc = btread(BT848_RISC_COUNT);
+	if (NULL != old && (is_active(&old->top,    rc) ||
+			    is_active(&old->bottom, rc))) {
+		btv->framedrop++;
+		if (debug_latency)
+			bttv_irq_debug_low_latency(btv, rc);
+		spin_unlock(&btv->s_lock);
+		return;
+	}
+
+	/* switch */
+	btv->cvbi = new;
+	bttv_buffer_activate_vbi(btv, new);
+	bttv_set_dma(btv, 0, btv->curr.irqflags);
+
+	bttv_irq_wakeup_vbi(btv, old, STATE_DONE);
 	spin_unlock(&btv->s_lock);
 }
 
@@ -3500,11 +3552,14 @@
 			wake_up(&btv->i2c_queue);
 		}
 
+                if ((astat & BT848_INT_RISCI)  &&  (stat & (4<<28)))
+			bttv_irq_switch_vbi(btv);
+
                 if ((astat & BT848_INT_RISCI)  &&  (stat & (2<<28)))
 			bttv_irq_wakeup_top(btv);
 
                 if ((astat & BT848_INT_RISCI)  &&  (stat & (1<<28)))
-			bttv_irq_switch_fields(btv);
+			bttv_irq_switch_video(btv);
 
 		if ((astat & BT848_INT_HLOCK)  &&  btv->opt_automute)
 			audio_mux(btv, -1);
@@ -3872,9 +3927,11 @@
 	/* stop dma + irqs */
 	spin_lock_irqsave(&btv->s_lock,flags);
 	memset(&idle, 0, sizeof(idle));
-	btv->state.set = btv->curr;
+	btv->state.video = btv->curr;
+	btv->state.vbi   = btv->cvbi;
 	btv->curr = idle;
-	bttv_buffer_set_activate(btv, &idle);
+	bttv_buffer_activate_video(btv, &idle);
+	bttv_buffer_activate_vbi(btv, NULL);
 	bttv_set_dma(btv, 0, 0);
 	btwrite(0, BT848_INT_MASK);
 	spin_unlock_irqrestore(&btv->s_lock,flags);
@@ -3914,8 +3971,10 @@
 
 	/* restart dma */
 	spin_lock_irqsave(&btv->s_lock,flags);
-	btv->curr = btv->state.set;
-	bttv_buffer_set_activate(btv, &btv->curr);
+	btv->curr = btv->state.video;
+	btv->cvbi = btv->state.vbi;
+	bttv_buffer_activate_video(btv, &btv->curr);
+	bttv_buffer_activate_vbi(btv, btv->cvbi);
 	bttv_set_dma(btv, 0, btv->curr.irqflags);
 	spin_unlock_irqrestore(&btv->s_lock,flags);
 	return 0;
--- diff/drivers/media/video/bttv-risc.c	2004-05-19 22:11:50.000000000 +0100
+++ source/drivers/media/video/bttv-risc.c	2004-07-01 21:32:37.000000000 +0100
@@ -379,7 +379,7 @@
 	btv->cap_ctl = 0;
 	if (NULL != btv->curr.top)      btv->cap_ctl |= 0x02;
 	if (NULL != btv->curr.bottom)   btv->cap_ctl |= 0x01;
-	if (NULL != btv->curr.vbi)      btv->cap_ctl |= 0x0c;
+	if (NULL != btv->cvbi)          btv->cap_ctl |= 0x0c;
 
 	capctl  = 0;
 	capctl |= (btv->cap_ctl & 0x03) ? 0x03 : 0x00;  /* capture  */
@@ -389,9 +389,9 @@
 	d2printk(KERN_DEBUG
 		 "bttv%d: capctl=%x irq=%d top=%08Lx/%08Lx even=%08Lx/%08Lx\n",
 		 btv->c.nr,capctl,irqflags,
-		 btv->curr.vbi     ? (unsigned long long)btv->curr.vbi->top.dma        : 0,
+		 btv->cvbi         ? (unsigned long long)btv->cvbi->top.dma            : 0,
 		 btv->curr.top     ? (unsigned long long)btv->curr.top->top.dma        : 0,
-		 btv->curr.vbi     ? (unsigned long long)btv->curr.vbi->bottom.dma     : 0,
+		 btv->cvbi         ? (unsigned long long)btv->cvbi->bottom.dma         : 0,
 		 btv->curr.bottom  ? (unsigned long long)btv->curr.bottom->bottom.dma  : 0);
 	
 	cmd = BT848_RISC_JUMP;
@@ -399,6 +399,8 @@
 		cmd |= BT848_RISC_IRQ;
 		cmd |= (irqflags  & 0x0f) << 16;
 		cmd |= (~irqflags & 0x0f) << 20;
+	}
+	if (irqflags || btv->cvbi) {
 		mod_timer(&btv->timeout, jiffies+BTTV_TIMEOUT);
 	} else {
 		del_timer(&btv->timeout);
@@ -501,20 +503,26 @@
 }
 
 int
-bttv_buffer_set_activate(struct bttv *btv,
-			 struct bttv_buffer_set *set)
+bttv_buffer_activate_vbi(struct bttv *btv,
+			 struct bttv_buffer *vbi)
 {
 	/* vbi capture */
-	if (set->vbi) {
-		set->vbi->vb.state = STATE_ACTIVE;
-		list_del(&set->vbi->vb.queue);
-		bttv_risc_hook(btv, RISC_SLOT_O_VBI, &set->vbi->top,    0);
-		bttv_risc_hook(btv, RISC_SLOT_E_VBI, &set->vbi->bottom, 0);
+	if (vbi) {
+		vbi->vb.state = STATE_ACTIVE;
+		list_del(&vbi->vb.queue);
+		bttv_risc_hook(btv, RISC_SLOT_O_VBI, &vbi->top,    0);
+		bttv_risc_hook(btv, RISC_SLOT_E_VBI, &vbi->bottom, 4);
 	} else {
 		bttv_risc_hook(btv, RISC_SLOT_O_VBI, NULL, 0);
 		bttv_risc_hook(btv, RISC_SLOT_E_VBI, NULL, 0);
 	}
+	return 0;
+}
 
+int
+bttv_buffer_activate_video(struct bttv *btv,
+			   struct bttv_buffer_set *set)
+{
 	/* video capture */
 	if (NULL != set->top  &&  NULL != set->bottom) {
 		if (set->top == set->bottom) {
--- diff/drivers/media/video/bttv-vbi.c	2004-05-19 22:11:50.000000000 +0100
+++ source/drivers/media/video/bttv-vbi.c	2004-07-01 21:32:37.000000000 +0100
@@ -114,7 +114,10 @@
 	dprintk("queue %p\n",vb);
 	buf->vb.state = STATE_QUEUED;
 	list_add_tail(&buf->vb.queue,&btv->vcapture);
-	bttv_set_dma(btv,0x0c,1);
+	if (NULL == btv->cvbi) {
+		fh->btv->curr.irqflags |= 4;
+		bttv_set_dma(btv,0x0c,fh->btv->curr.irqflags);
+	}
 }
 
 static void vbi_buffer_release(struct file *file, struct videobuf_buffer *vb)
--- diff/drivers/media/video/bttv.h	2004-05-19 22:11:50.000000000 +0100
+++ source/drivers/media/video/bttv.h	2004-07-01 21:32:37.000000000 +0100
@@ -124,6 +124,8 @@
 #define BTTV_SIMUS_GVC1100  0x74
 #define BTTV_NGSTV_PLUS     0x75
 #define BTTV_LMLBT4         0x76
+#define BTTV_PICOLO_TETRA_CHIP 0x79
+#define BTTV_AVDVBT_771     0x7b
 
 /* i2c address list */
 #define I2C_TSA5522        0xc2
--- diff/drivers/media/video/bttvp.h	2004-05-19 22:11:50.000000000 +0100
+++ source/drivers/media/video/bttvp.h	2004-07-01 21:32:37.000000000 +0100
@@ -25,7 +25,7 @@
 #define _BTTVP_H_
 
 #include <linux/version.h>
-#define BTTV_VERSION_CODE KERNEL_VERSION(0,9,14)
+#define BTTV_VERSION_CODE KERNEL_VERSION(0,9,15)
 
 #include <linux/types.h>
 #include <linux/wait.h>
@@ -127,7 +127,6 @@
 struct bttv_buffer_set {
 	struct bttv_buffer     *top;       /* top field buffer    */
 	struct bttv_buffer     *bottom;    /* bottom field buffer */
-	struct bttv_buffer     *vbi;       /* vbi buffer */
 	unsigned int           irqflags;
 	unsigned int           topirq;
 };
@@ -197,8 +196,10 @@
 
 /* capture buffer handling */
 int bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf);
-int bttv_buffer_set_activate(struct bttv *btv,
-			     struct bttv_buffer_set *set);
+int bttv_buffer_activate_video(struct bttv *btv,
+			       struct bttv_buffer_set *set);
+int bttv_buffer_activate_vbi(struct bttv *btv,
+			     struct bttv_buffer *vbi);
 void bttv_dma_free(struct bttv *btv, struct bttv_buffer *buf);
 
 /* overlay handling */
@@ -279,7 +280,8 @@
 	u32  gpio_enable;
 	u32  gpio_data;
 	int  disabled;
-	struct bttv_buffer_set set;
+	struct bttv_buffer_set video;
+	struct bttv_buffer     *vbi;
 };
 
 struct bttv {
@@ -377,6 +379,7 @@
 	struct list_head        capture;    /* video capture queue */
 	struct list_head        vcapture;   /* vbi capture queue   */
 	struct bttv_buffer_set  curr;       /* active buffers      */
+	struct bttv_buffer      *cvbi;      /* active vbi buffer   */
 	int                     new_input;
 
 	unsigned long cap_ctl;
--- diff/drivers/media/video/cx88/cx88-cards.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/cx88/cx88-cards.c	2004-07-01 21:32:37.000000000 +0100
@@ -99,6 +99,10 @@
 		.input          = {{
 			.type   = CX88_VMUX_TELEVISION,
 			.vmux   = 0,
+                        .gpio0  = 0x000003ff,
+                        .gpio1  = 0x000000ff,
+                        .gpio2  = 0x000000ff,
+                        .gpio3  = 0x00000000,
 		},{
 			.type   = CX88_VMUX_COMPOSITE1,
 			.vmux   = 1,
@@ -111,6 +115,7 @@
         [CX88_BOARD_WINFAST2000XP] = {
                 .name           = "Leadtek Winfast 2000XP Expert",
                 .tuner_type     = 44,
+		.needs_tda9887  = 1,
                 .input          = {{
                         .type   = CX88_VMUX_TELEVISION,
                         .vmux   = 0,
@@ -149,22 +154,33 @@
 			.vmux   = 0,
 		}},
 	},
-	[CX88_BOARD_MSI_TVANYWHERE] = {
+	[CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
+		//added gpio values thanks to Torsten Seeboth
+		//values for PAL from DScaler
 		.name           = "MSI TV-@nywhere Master",
 		.tuner_type     = 33,
+		.needs_tda9887	= 1,
 		.input          = {{
 			.type   = CX88_VMUX_TELEVISION,
 			.vmux   = 0,
+			.gpio0  = 0x000040bf,
+			.gpio1  = 0x000080c0,
+			.gpio2  = 0x0000ff40,
+                   	.gpio3  = 0x00000000,
 		},{
                         .type   = CX88_VMUX_COMPOSITE1,
                         .vmux   = 1,
-		},{
-			 // temporarly for testing ...
-                        .type   = CX88_VMUX_COMPOSITE2,
-                        .vmux   = 2,
+			.gpio0  = 0x000040bf,
+			.gpio1  = 0x000080c0,
+			.gpio2  = 0x0000ff40,
+			.gpio3  = 0x00000000,
 		},{
                         .type   = CX88_VMUX_SVIDEO,
                         .vmux   = 2,
+			.gpio0  = 0x000040bf,
+			.gpio1  = 0x000080c0,
+			.gpio2  = 0x0000ff40,
+			.gpio3  = 0x00000000,
                 }},
                 .radio = {
                         .type   = CX88_RADIO,
@@ -199,8 +215,97 @@
                         .type   = CX88_RADIO,
                 },
         },
-
-
+	[CX88_BOARD_IODATA_GVVCP3PCI] = {
+ 		.name		= "IODATA GV-VCP3/PCI",
+		.tuner_type     = TUNER_ABSENT,
+		.needs_tda9887  = 0,
+ 		.input          = {{
+ 			.type   = CX88_VMUX_COMPOSITE1,
+ 			.vmux   = 0,
+ 		},{
+ 			.type   = CX88_VMUX_COMPOSITE2,
+ 			.vmux   = 1,
+ 		},{
+ 			.type   = CX88_VMUX_SVIDEO,
+ 			.vmux   = 2,
+ 		}},
+ 	},
+	[CX88_BOARD_PROLINK_PLAYTVPVR] = {
+                .name           = "Prolink PlayTV PVR",
+                .tuner_type     = 43,
+		.needs_tda9887	= 1,
+		.input          = {{
+			.type   = CX88_VMUX_TELEVISION,
+			.vmux   = 0,
+			.gpio0  = 0xff00,
+		},{
+			.type   = CX88_VMUX_COMPOSITE1,
+			.vmux   = 1,
+			.gpio0  = 0xff03,
+		},{
+			.type   = CX88_VMUX_SVIDEO,
+			.vmux   = 2,
+			.gpio0  = 0xff03,
+		}},
+		.radio = {
+			.type   = CX88_RADIO,
+			.gpio0  = 0xff00,
+		},
+	},
+	[CX88_BOARD_ASUS_PVR_416] = {
+		.name		= "ASUS PVR-416",
+		.tuner_type     = 43,
+                .needs_tda9887  = 1,
+		.input          = {{
+			.type   = CX88_VMUX_TELEVISION,
+			.vmux   = 0,
+			.gpio0  = 0x0000fde6,
+			.gpio1  = 0x00000000, // possibly for mpeg data
+			.gpio2  = 0x000000e9,
+                   	.gpio3  = 0x00000000,
+ 		},{
+			.type   = CX88_VMUX_SVIDEO,
+			.vmux   = 2,
+			.gpio0  = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
+			.gpio1  = 0x00000000, // possibly for mpeg data
+			.gpio2  = 0x000000e9,
+                   	.gpio3  = 0x00000000,
+		}},
+                .radio = {
+                        .type   = CX88_RADIO,
+			.gpio0  = 0x0000fde2,
+			.gpio1  = 0x00000000,
+			.gpio2  = 0x000000e9,
+                   	.gpio3  = 0x00000000,
+                },
+	},
+	[CX88_BOARD_MSI_TVANYWHERE] = {
+		.name           = "MSI TV-@nywhere",
+		.tuner_type     = 33,
+		.needs_tda9887  = 1,
+		.input          = {{
+			.type   = CX88_VMUX_TELEVISION,
+			.vmux   = 0,
+			.gpio0  = 0x00000fbf,
+			.gpio1  = 0x000000c0,
+			.gpio2  = 0x0000fc08,
+			.gpio3  = 0x00000000,
+		},{
+  			.type   = CX88_VMUX_COMPOSITE1,
+  			.vmux   = 1,
+			.gpio0  = 0x00000fbf,
+			.gpio1  = 0x000000c0,
+			.gpio2  = 0x0000fc68,
+			.gpio3  = 0x00000000,
+		},{
+  			.type   = CX88_VMUX_SVIDEO,
+  			.vmux   = 2,
+			.gpio0  = 0x00000fbf,
+			.gpio1  = 0x000000c0,
+			.gpio2  = 0x0000fc68,
+			.gpio3  = 0x00000000,
+  		}},
+	},
 };
 const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
 
@@ -242,6 +347,10 @@
                 .card      = CX88_BOARD_WINFAST_DV2000,
         },{
                 .subvendor = 0x107d,
+                .subdevice = 0x663b,
+                .card      = CX88_BOARD_LEADTEK_PVR2000,
+        },{
+                .subvendor = 0x107d,
                 .subdevice = 0x663C,
                 .card      = CX88_BOARD_LEADTEK_PVR2000,
         },{
@@ -251,12 +360,19 @@
 	},{
 		.subvendor = 0x1462,
 		.subdevice = 0x8606,
-		.card      = CX88_BOARD_MSI_TVANYWHERE,
-	}
+		.card      = CX88_BOARD_MSI_TVANYWHERE_MASTER,
+	},{
+ 		.subvendor = 0x10fc,
+ 		.subdevice = 0xd003,
+ 		.card      = CX88_BOARD_IODATA_GVVCP3PCI,
+	},{
+ 		.subvendor = 0x1043,
+ 		.subdevice = 0x4823,  /* with mpeg encoder */
+ 		.card      = CX88_BOARD_ASUS_PVR_416,
+ 	}
 };
 const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
 
-
 /* ----------------------------------------------------------------------- */
 /* some leadtek specific stuff                                             */
 
@@ -386,20 +502,22 @@
 	[ 0x02 ] = { .id   = TUNER_ABSENT,
 		     .name = "PAL_B" },
 	[ 0x03 ] = { .id   = TUNER_ABSENT,
-		     .name = "BAL_I" },
+		     .name = "PAL_I" },
 	[ 0x04 ] = { .id   = TUNER_ABSENT,
 		     .name = "PAL_D" },
 	[ 0x05 ] = { .id   = TUNER_ABSENT,
 		     .name = "SECAM" },
 
-	[ 0x10 ] = { .id   = TUNER_ABSENT, .fm = 1, 
+	[ 0x10 ] = { .id   = TUNER_ABSENT,
+		     .fm   = 1,
 		     .name = "TEMIC_4049" },
 	[ 0x11 ] = { .id   = TUNER_TEMIC_4136FY5,
 		     .name = "TEMIC_4136" },
 	[ 0x12 ] = { .id   = TUNER_ABSENT,
 		     .name = "TEMIC_4146" },
 
-	[ 0x20 ] = { .id   = TUNER_PHILIPS_FQ1216ME, .fm = 1,
+	[ 0x20 ] = { .id   = TUNER_PHILIPS_FQ1216ME,
+		     .fm   = 1,
 		     .name = "PHILIPS_FQ1216_MK3" },
 	[ 0x21 ] = { .id   = TUNER_ABSENT, .fm = 1,
 		     .name = "PHILIPS_FQ1236_MK3" },
@@ -454,7 +572,33 @@
 	return 0;
 }
 
-void __devinit cx88_card_setup(struct cx8800_dev *dev)
+void cx88_card_list(struct cx8800_dev *dev)
+{
+	int i;
+
+	if (0 == dev->pci->subsystem_vendor &&
+	    0 == dev->pci->subsystem_device) {
+		printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
+		       "%s: be autodetected.  Please pass card=<n> insmod option to\n"
+		       "%s: workaround that.  Redirect complaints to the vendor of\n"
+		       "%s: the TV card.  Best regards,\n"
+		       "%s:         -- tux\n",
+		       dev->name,dev->name,dev->name,dev->name,dev->name);
+	} else {
+		printk("%s: Your board isn't known (yet) to the driver.  You can\n"
+		       "%s: try to pick one of the existing card configs via\n"
+		       "%s: card=<n> insmod option.  Updating to the latest\n"
+		       "%s: version might help as well.\n",
+		       dev->name,dev->name,dev->name,dev->name);
+	}
+	printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
+	       dev->name);
+	for (i = 0; i < cx88_bcount; i++)
+		printk("%s:    card=%d -> %s\n",
+		       dev->name, i, cx88_boards[i].name);
+}
+
+void cx88_card_setup(struct cx8800_dev *dev)
 {
 	static u8 eeprom[128];
 		
@@ -474,6 +618,9 @@
 			i2c_eeprom(&dev->i2c_client,eeprom,sizeof(eeprom));
 		leadtek_eeprom(dev,eeprom);
 		break;
+        case CX88_BOARD_ASUS_PVR_416:
+		dev->has_radio = 1;
+                break;
 	}
 }
 
@@ -483,6 +630,7 @@
 EXPORT_SYMBOL(cx88_bcount);
 EXPORT_SYMBOL(cx88_subids);
 EXPORT_SYMBOL(cx88_idcount);
+EXPORT_SYMBOL(cx88_card_list);
 EXPORT_SYMBOL(cx88_card_setup);
 
 /*
--- diff/drivers/media/video/cx88/cx88-i2c.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/media/video/cx88/cx88-i2c.c	2004-07-01 21:32:37.000000000 +0100
@@ -22,8 +22,6 @@
     
 */
 
-#define __NO_VERSION__ 1
-
 #include <linux/module.h>
 #include <linux/init.h>
 
--- diff/drivers/media/video/cx88/cx88-reg.h	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/cx88/cx88-reg.h	2004-07-01 21:32:37.000000000 +0100
@@ -599,10 +599,20 @@
 #define EN_I2SIN_STR2DAC        0x00004000
 #define EN_I2SIN_ENABLE         0x00008000
 
+#if 0
+/* old */
 #define EN_DMTRX_SUMDIFF        0x00000800
 #define EN_DMTRX_SUMR           0x00000880
 #define EN_DMTRX_LR             0x00000900
 #define EN_DMTRX_MONO           0x00000980
+#else
+/* dscaler cvs */
+#define EN_DMTRX_SUMDIFF        (0 << 7)
+#define EN_DMTRX_SUMR           (1 << 7)
+#define EN_DMTRX_LR             (2 << 7)
+#define EN_DMTRX_MONO           (3 << 7)
+#define EN_DMTRX_BYPASS         (1 << 11)
+#endif
 
 // Video 
 #define VID_CAPTURE_CONTROL		0x310180
--- diff/drivers/media/video/cx88/cx88-tvaudio.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/cx88/cx88-tvaudio.c	2004-07-01 21:32:37.000000000 +0100
@@ -48,6 +48,7 @@
 #include <linux/interrupt.h>
 #include <linux/vmalloc.h>
 #include <linux/init.h>
+#include <linux/smp_lock.h>
 
 #include "cx88.h"
 
@@ -60,6 +61,33 @@
 
 /* ----------------------------------------------------------- */
 
+static char *aud_ctl_names[64] =
+{
+	[ EN_BTSC_FORCE_MONO       ] = "BTSC_FORCE_MONO",
+	[ EN_BTSC_FORCE_STEREO     ] = "BTSC_FORCE_STEREO",
+	[ EN_BTSC_FORCE_SAP        ] = "BTSC_FORCE_SAP",
+	[ EN_BTSC_AUTO_STEREO      ] = "BTSC_AUTO_STEREO",
+	[ EN_BTSC_AUTO_SAP         ] = "BTSC_AUTO_SAP",
+	[ EN_A2_FORCE_MONO1        ] = "A2_FORCE_MONO1",
+	[ EN_A2_FORCE_MONO2        ] = "A2_FORCE_MONO2",
+	[ EN_A2_FORCE_STEREO       ] = "A2_FORCE_STEREO",
+	[ EN_A2_AUTO_MONO2         ] = "A2_AUTO_MONO2",
+	[ EN_A2_AUTO_STEREO        ] = "A2_AUTO_STEREO",
+	[ EN_EIAJ_FORCE_MONO1      ] = "EIAJ_FORCE_MONO1",
+	[ EN_EIAJ_FORCE_MONO2      ] = "EIAJ_FORCE_MONO2",
+	[ EN_EIAJ_FORCE_STEREO     ] = "EIAJ_FORCE_STEREO",
+	[ EN_EIAJ_AUTO_MONO2       ] = "EIAJ_AUTO_MONO2",
+	[ EN_EIAJ_AUTO_STEREO      ] = "EIAJ_AUTO_STEREO",
+	[ EN_NICAM_FORCE_MONO1     ] = "NICAM_FORCE_MONO1",
+	[ EN_NICAM_FORCE_MONO2     ] = "NICAM_FORCE_MONO2",
+	[ EN_NICAM_FORCE_STEREO    ] = "NICAM_FORCE_STEREO",
+	[ EN_NICAM_AUTO_MONO2      ] = "NICAM_AUTO_MONO2",
+	[ EN_NICAM_AUTO_STEREO     ] = "NICAM_AUTO_STEREO",
+	[ EN_FMRADIO_FORCE_MONO    ] = "FMRADIO_FORCE_MONO",
+	[ EN_FMRADIO_FORCE_STEREO  ] = "FMRADIO_FORCE_STEREO",
+	[ EN_FMRADIO_AUTO_STEREO   ] = "FMRADIO_AUTO_STEREO",
+};
+
 struct rlist {
 	u32 reg;
 	u32 val;
@@ -125,26 +153,116 @@
 static void set_audio_standard_BTSC(struct cx8800_dev *dev, unsigned int sap)
 {
 	static const struct rlist btsc[] = {
-		/* Magic stuff from leadtek driver + datasheet.*/
-		{ AUD_DBX_IN_GAIN,   0x4734 },
-		{ AUD_DBX_WBE_GAIN,  0x4640 },
-		{ AUD_DBX_SE_GAIN,   0x8D31 },
-		{ AUD_DEEMPH0_G0,    0x1604 },
-		{ AUD_PHASE_FIX_CTL, 0x0020 },
-
+		/* from dscaler */
+		{ AUD_OUT1_SEL,                0x00000013 },
+		{ AUD_OUT1_SHIFT,              0x00000000 },
+		{ AUD_POLY0_DDS_CONSTANT,      0x0012010c },
+		{ AUD_DMD_RA_DDS,              0x00c3e7aa },
+		{ AUD_DBX_IN_GAIN,             0x00004734 },
+		{ AUD_DBX_WBE_GAIN,            0x00004640 },
+		{ AUD_DBX_SE_GAIN,             0x00008d31 },
+		{ AUD_DCOC_0_SRC,              0x0000001a },
+		{ AUD_IIR1_4_SEL,              0x00000021 },
+		{ AUD_DCOC_PASS_IN,            0x00000003 },
+		{ AUD_DCOC_0_SHIFT_IN0,        0x0000000a },
+		{ AUD_DCOC_0_SHIFT_IN1,        0x00000008 },
+		{ AUD_DCOC_1_SHIFT_IN0,        0x0000000a },
+		{ AUD_DCOC_1_SHIFT_IN1,        0x00000008 },
+		{ AUD_DN0_FREQ,                0x0000283b },
+		{ AUD_DN2_SRC_SEL,             0x00000008 },
+		{ AUD_DN2_FREQ,                0x00003000 },
+		{ AUD_DN2_AFC,                 0x00000002 },
+		{ AUD_DN2_SHFT,                0x00000000 },
+		{ AUD_IIR2_2_SEL,              0x00000020 },
+		{ AUD_IIR2_2_SHIFT,            0x00000000 },
+		{ AUD_IIR2_3_SEL,              0x0000001f },
+		{ AUD_IIR2_3_SHIFT,            0x00000000 },
+		{ AUD_CRDC1_SRC_SEL,           0x000003ce },
+		{ AUD_CRDC1_SHIFT,             0x00000000 },
+		{ AUD_CORDIC_SHIFT_1,          0x00000007 },
+		{ AUD_DCOC_1_SRC,              0x0000001b },
+		{ AUD_DCOC1_SHIFT,             0x00000000 },
+		{ AUD_RDSI_SEL,                0x00000008 },
+		{ AUD_RDSQ_SEL,                0x00000008 },
+		{ AUD_RDSI_SHIFT,              0x00000000 },
+		{ AUD_RDSQ_SHIFT,              0x00000000 },
+		{ AUD_POLYPH80SCALEFAC,        0x00000003 },
+                { /* end of list */ },
+	};
+	static const struct rlist btsc_sap[] = {
+		{ AUD_DBX_IN_GAIN,             0x00007200 },
+		{ AUD_DBX_WBE_GAIN,            0x00006200 },
+		{ AUD_DBX_SE_GAIN,             0x00006200 },
+		{ AUD_IIR1_1_SEL,              0x00000000 },
+		{ AUD_IIR1_3_SEL,              0x00000001 },
+		{ AUD_DN1_SRC_SEL,             0x00000007 },
+		{ AUD_IIR1_4_SHIFT,            0x00000006 },
+		{ AUD_IIR2_1_SHIFT,            0x00000000 },
+		{ AUD_IIR2_2_SHIFT,            0x00000000 },
+		{ AUD_IIR3_0_SHIFT,            0x00000000 },
+		{ AUD_IIR3_1_SHIFT,            0x00000000 },
+		{ AUD_IIR3_0_SEL,              0x0000000d },
+		{ AUD_IIR3_1_SEL,              0x0000000e },
+		{ AUD_DEEMPH1_SRC_SEL,         0x00000014 },
+		{ AUD_DEEMPH1_SHIFT,           0x00000000 },
+		{ AUD_DEEMPH1_G0,              0x00004000 },
+		{ AUD_DEEMPH1_A0,              0x00000000 },
+		{ AUD_DEEMPH1_B0,              0x00000000 },
+		{ AUD_DEEMPH1_A1,              0x00000000 },
+		{ AUD_DEEMPH1_B1,              0x00000000 },
+		{ AUD_OUT0_SEL,                0x0000003f },
+		{ AUD_OUT1_SEL,                0x0000003f },
+		{ AUD_DN1_AFC,                 0x00000002 },
+		{ AUD_DCOC_0_SHIFT_IN0,        0x0000000a },
+		{ AUD_DCOC_0_SHIFT_IN1,        0x00000008 },
+		{ AUD_DCOC_1_SHIFT_IN0,        0x0000000a },
+		{ AUD_DCOC_1_SHIFT_IN1,        0x00000008 },
+		{ AUD_IIR1_0_SEL,              0x0000001d },
+		{ AUD_IIR1_2_SEL,              0x0000001e },
+		{ AUD_IIR2_1_SEL,              0x00000002 },
+		{ AUD_IIR2_2_SEL,              0x00000004 },
+		{ AUD_IIR3_2_SEL,              0x0000000f },
+		{ AUD_DCOC2_SHIFT,             0x00000001 },
+		{ AUD_IIR3_2_SHIFT,            0x00000001 },
+		{ AUD_DEEMPH0_SRC_SEL,         0x00000014 },
+		{ AUD_CORDIC_SHIFT_1,          0x00000006 },
+		{ AUD_POLY0_DDS_CONSTANT,      0x000e4db2 },
+		{ AUD_DMD_RA_DDS,              0x00f696e6 },
+		{ AUD_IIR2_3_SEL,              0x00000025 },
+		{ AUD_IIR1_4_SEL,              0x00000021 },
+		{ AUD_DN1_FREQ,                0x0000c965 },
+		{ AUD_DCOC_PASS_IN,            0x00000003 },
+		{ AUD_DCOC_0_SRC,              0x0000001a },
+		{ AUD_DCOC_1_SRC,              0x0000001b },
+		{ AUD_DCOC1_SHIFT,             0x00000000 },
+		{ AUD_RDSI_SEL,                0x00000009 },
+		{ AUD_RDSQ_SEL,                0x00000009 },
+		{ AUD_RDSI_SHIFT,              0x00000000 },
+		{ AUD_RDSQ_SHIFT,              0x00000000 },
+		{ AUD_POLYPH80SCALEFAC,        0x00000003 },
                 { /* end of list */ },
 	};
 
-	dprintk("%s (status: unknown)\n",__FUNCTION__);
-	set_audio_start(dev, 0x0001,
-			EN_BTSC_AUTO_STEREO);
-        set_audio_registers(dev, btsc);
+	// dscaler: exactly taken from driver,
+	// dscaler: don't know why to set EN_FMRADIO_EN_RDS
+	if (sap) {
+		dprintk("%s SAP (status: unknown)\n",__FUNCTION__);
+		set_audio_start(dev, 0x0001,
+				EN_FMRADIO_EN_RDS | EN_BTSC_FORCE_SAP);
+		set_audio_registers(dev, btsc_sap);
+	} else {
+		dprintk("%s (status: known-good)\n",__FUNCTION__);
+		set_audio_start(dev, 0x0001,
+				EN_FMRADIO_EN_RDS | EN_BTSC_AUTO_STEREO);
+		set_audio_registers(dev, btsc);
+	}
 	set_audio_finish(dev);
 }
 
 static void set_audio_standard_NICAM(struct cx8800_dev *dev)
 {
-	static const struct rlist nicam[] = {
+	static const struct rlist nicam_common[] = {
+		/* from dscaler */
     		{ AUD_RATE_ADJ1,           0x00000010 },
     		{ AUD_RATE_ADJ2,           0x00000040 },
     		{ AUD_RATE_ADJ3,           0x00000100 },
@@ -152,21 +270,64 @@
     		{ AUD_RATE_ADJ5,           0x00001000 },
     //		{ AUD_DMD_RA_DDS,          0x00c0d5ce },
 
+		// Deemphasis 1:
+		{ AUD_DEEMPHGAIN_R,        0x000023c2 },
+		{ AUD_DEEMPHNUMER1_R,      0x0002a7bc },
+		{ AUD_DEEMPHNUMER2_R,      0x0003023e },
+		{ AUD_DEEMPHDENOM1_R,      0x0000f3d0 },
+		{ AUD_DEEMPHDENOM2_R,      0x00000000 },
+
+#if 0
+		// Deemphasis 2: (other tv norm?)
+		{ AUD_DEEMPHGAIN_R,        0x0000c600 },
+		{ AUD_DEEMPHNUMER1_R,      0x00066738 },
+		{ AUD_DEEMPHNUMER2_R,      0x00066739 },
+		{ AUD_DEEMPHDENOM1_R,      0x0001e88c },
+		{ AUD_DEEMPHDENOM2_R,      0x0001e88c },
+#endif
+
+		{ AUD_DEEMPHDENOM2_R,      0x00000000 },
+		{ AUD_ERRLOGPERIOD_R,      0x00000fff },
+		{ AUD_ERRINTRPTTHSHLD1_R,  0x000003ff },
+		{ AUD_ERRINTRPTTHSHLD2_R,  0x000000ff },
+		{ AUD_ERRINTRPTTHSHLD3_R,  0x0000003f },
+		{ AUD_POLYPH80SCALEFAC,    0x00000003 },
+
 		// setup QAM registers
 		{ AUD_PDF_DDS_CNST_BYTE2,  0x06 },
 		{ AUD_PDF_DDS_CNST_BYTE1,  0x82 },
 		{ AUD_PDF_DDS_CNST_BYTE0,  0x16 },
 		{ AUD_QAM_MODE,            0x05 },
+
+                { /* end of list */ },
+        };
+	static const struct rlist nicam_pal_i[] = {
+		{ AUD_PDF_DDS_CNST_BYTE0,  0x12 },
+		{ AUD_PHACC_FREQ_8MSB,     0x3a },
+		{ AUD_PHACC_FREQ_8LSB,     0x93 },
+
+                { /* end of list */ },
+	};
+	static const struct rlist nicam_default[] = {
+		{ AUD_PDF_DDS_CNST_BYTE0,  0x16 },
 		{ AUD_PHACC_FREQ_8MSB,     0x34 },
 		{ AUD_PHACC_FREQ_8LSB,     0x4c },
 
                 { /* end of list */ },
-        };
+	};
 
-	dprintk("%s (status: unknown)\n",__FUNCTION__);
         set_audio_start(dev, 0x0010,
-			EN_DMTRX_LR | EN_NICAM_FORCE_STEREO);
-        set_audio_registers(dev, nicam);
+			EN_DMTRX_LR | EN_DMTRX_BYPASS | EN_NICAM_AUTO_STEREO);
+        set_audio_registers(dev, nicam_common);
+	switch (dev->tvaudio) {
+	case WW_NICAM_I:
+		dprintk("%s PAL-I NICAM (status: unknown)\n",__FUNCTION__);
+		set_audio_registers(dev, nicam_pal_i);
+	case WW_NICAM_BGDKL:
+		dprintk("%s PAL NICAM (status: unknown)\n",__FUNCTION__);
+		set_audio_registers(dev, nicam_default);
+		break;
+	};
         set_audio_finish(dev);
 }
 
@@ -297,7 +458,7 @@
 static void set_audio_standard_A2(struct cx8800_dev *dev)
 {
 	/* from dscaler cvs */
-	static const struct rlist a2[] = {
+	static const struct rlist a2_common[] = {
 		{ AUD_PDF_DDS_CNST_BYTE2,     0x06 },
 		{ AUD_PDF_DDS_CNST_BYTE1,     0x82 },
 		{ AUD_PDF_DDS_CNST_BYTE0,     0x12 },
@@ -347,16 +508,20 @@
 		{ AUD_RDSQ_SHIFT,	0x00000000 },
 		{ AUD_POLYPH80SCALEFAC,	0x00000001 },
 
-		// Table 1
+		{ /* end of list */ },
+	};
+
+	static const struct rlist a2_table1[] = {
+		// PAL-BG
 		{ AUD_DMD_RA_DDS,	0x002a73bd },
 		{ AUD_C1_UP_THR,	0x00007000 },
 		{ AUD_C1_LO_THR,	0x00005400 },
 		{ AUD_C2_UP_THR,	0x00005400 },
 		{ AUD_C2_LO_THR,	0x00003000 },
-
-#if 0
-		// found this in WDM-driver for A2, must country spec.
-		// Table 2
+		{ /* end of list */ },
+	};
+	static const struct rlist a2_table2[] = {
+		// PAL-DK
 		{ AUD_DMD_RA_DDS,	0x002a73bd },
 		{ AUD_C1_UP_THR,	0x00007000 },
 		{ AUD_C1_LO_THR,	0x00005400 },
@@ -364,8 +529,10 @@
 		{ AUD_C2_LO_THR,	0x00003000 },
 		{ AUD_DN0_FREQ,		0x00003a1c },
 		{ AUD_DN2_FREQ,		0x0000d2e0 },
-
-		// Table 3
+		{ /* end of list */ },
+	};
+	static const struct rlist a2_table3[] = {
+		// unknown, probably NTSC-M
 		{ AUD_DMD_RA_DDS,	0x002a2873 },
 		{ AUD_C1_UP_THR,	0x00003c00 },
 		{ AUD_C1_LO_THR,	0x00003000 },
@@ -375,140 +542,26 @@
 		{ AUD_DN1_FREQ,		0x00003418 },
 		{ AUD_DN2_FREQ,		0x000029c7 },
 		{ AUD_POLY0_DDS_CONSTANT, 0x000a7540 },
-#endif
-
 		{ /* end of list */ },
 	};
 
-	static const struct rlist a2_old[] = {
-		{ AUD_DN0_FREQ,            0x0000312b },
-		{ AUD_POLY0_DDS_CONSTANT,  0x000a62b4 },
-		{ AUD_IIR1_0_SEL,          0x00000000 },
-		{ AUD_IIR1_1_SEL,          0x00000001 },
-		{ AUD_IIR1_2_SEL,          0x0000001f },
-		{ AUD_IIR1_3_SEL,          0x00000020 },
-		{ AUD_IIR1_4_SEL,          0x00000023 },
-		{ AUD_IIR1_5_SEL,          0x00000007 },
-		{ AUD_IIR1_0_SHIFT,        0x00000000 },
-		{ AUD_IIR1_1_SHIFT,        0x00000000 },
-		{ AUD_IIR1_2_SHIFT,        0x00000007 },
-		{ AUD_IIR1_3_SHIFT,        0x00000007 },
-		{ AUD_IIR1_4_SHIFT,        0x00000007 },
-		{ AUD_IIR1_5_SHIFT,        0x00000000 },
-		{ AUD_IIR2_0_SEL,          0x00000002 },
-		{ AUD_IIR2_1_SEL,          0x00000003 },
-		{ AUD_IIR2_2_SEL,          0x00000004 },
-		{ AUD_IIR2_3_SEL,          0x00000005 },
-		{ AUD_IIR3_0_SEL,          0x00000021 },
-		{ AUD_IIR3_1_SEL,          0x00000023 },
-		{ AUD_IIR3_2_SEL,          0x00000016 },
-		{ AUD_IIR3_0_SHIFT,        0x00000000 },
-		{ AUD_IIR3_1_SHIFT,        0x00000000 },
-		{ AUD_IIR3_2_SHIFT,        0x00000000 },
-		{ AUD_IIR4_0_SEL,          0x0000001d },
-		{ AUD_IIR4_1_SEL,          0x00000019 },
-		{ AUD_IIR4_2_SEL,          0x00000008 },
-		{ AUD_IIR4_0_SHIFT,        0x00000000 },
-		{ AUD_IIR4_1_SHIFT,        0x00000000 },
-		{ AUD_IIR4_2_SHIFT,        0x00000001 },
-		{ AUD_IIR4_0_CA0,          0x0003e57e },
-		{ AUD_IIR4_0_CA1,          0x00005e11 },
-		{ AUD_IIR4_0_CA2,          0x0003a7cf },
-		{ AUD_IIR4_0_CB0,          0x00002368 },
-		{ AUD_IIR4_0_CB1,          0x0003bf1b },
-		{ AUD_IIR4_1_CA0,          0x00006349 },
-		{ AUD_IIR4_1_CA1,          0x00006f27 },
-		{ AUD_IIR4_1_CA2,          0x0000e7a3 },
-		{ AUD_IIR4_1_CB0,          0x00005653 },
-		{ AUD_IIR4_1_CB1,          0x0000cf97 },
-		{ AUD_IIR4_2_CA0,          0x00006349 },
-		{ AUD_IIR4_2_CA1,          0x00006f27 },
-		{ AUD_IIR4_2_CA2,          0x0000e7a3 },
-		{ AUD_IIR4_2_CB0,          0x00005653 },
-		{ AUD_IIR4_2_CB1,          0x0000cf97 },
-		{ AUD_HP_MD_IIR4_1,        0x00000001 },
-		{ AUD_HP_PROG_IIR4_1,      0x00000017 },
-		{ AUD_DN1_FREQ,            0x00003618 },
-		{ AUD_DN1_SRC_SEL,         0x00000017 },
-		{ AUD_DN1_SHFT,            0x00000007 },
-		{ AUD_DN1_AFC,             0x00000000 },
-		{ AUD_DN1_FREQ_SHIFT,      0x00000000 },
-		{ AUD_DN2_SRC_SEL,         0x00000040 },
-		{ AUD_DN2_SHFT,            0x00000000 },
-		{ AUD_DN2_AFC,             0x00000002 },
-		{ AUD_DN2_FREQ,            0x0000caaf },
-		{ AUD_DN2_FREQ_SHIFT,      0x00000000 },
-		{ AUD_PDET_SRC,            0x00000014 },
-		{ AUD_PDET_SHIFT,          0x00000000 },
-		{ AUD_DEEMPH0_SRC_SEL,     0x00000011 },
-		{ AUD_DEEMPH1_SRC_SEL,     0x00000013 },
-		{ AUD_DEEMPH0_SHIFT,       0x00000000 },
-		{ AUD_DEEMPH1_SHIFT,       0x00000000 },
-		{ AUD_DEEMPH0_G0,          0x000004da },
-		{ AUD_DEEMPH0_A0,          0x0000777a },
-		{ AUD_DEEMPH0_B0,          0x00000000 },
-		{ AUD_DEEMPH0_A1,          0x0003f062 },
-		{ AUD_DEEMPH0_B1,          0x00000000 },
-		{ AUD_DEEMPH1_G0,          0x000004da },
-		{ AUD_DEEMPH1_A0,          0x0000777a },
-		{ AUD_DEEMPH1_B0,          0x00000000 },
-		{ AUD_DEEMPH1_A1,          0x0003f062 },
-		{ AUD_DEEMPH1_B1,          0x00000000 },
-		{ AUD_PLL_EN,              0x00000000 },
-		{ AUD_DMD_RA_DDS,          0x002a4efb },
-		{ AUD_RATE_ADJ1,           0x00001000 },
-		{ AUD_RATE_ADJ2,           0x00002000 },
-		{ AUD_RATE_ADJ3,           0x00003000 },
-		{ AUD_RATE_ADJ4,           0x00004000 },
-		{ AUD_RATE_ADJ5,           0x00005000 },
-		{ AUD_C2_UP_THR,           0x0000ffff },
-		{ AUD_C2_LO_THR,           0x0000e800 },
-		{ AUD_C1_UP_THR,           0x00008c00 },
-		{ AUD_C1_LO_THR,           0x00006c00 },
-
-		//   ; Completely ditch AFC feedback
-		{ AUD_DCOC_0_SRC,          0x00000021 },
-		{ AUD_DCOC_1_SRC,          0x0000001a },
-		{ AUD_DCOC1_SHIFT,         0x00000000 },
-		{ AUD_DCOC_1_SHIFT_IN0,    0x0000000a },
-		{ AUD_DCOC_1_SHIFT_IN1,    0x00000008 },
-		{ AUD_DCOC_PASS_IN,        0x00000000 },
-		{ AUD_IIR4_0_SEL,          0x00000023 },
-
-		//  ; Completely ditc FM-2 AFC feedback
-		{ AUD_DN1_AFC,             0x00000000 },
-		{ AUD_DCOC_2_SRC,          0x0000001b },
-		{ AUD_IIR4_1_SEL,          0x00000025 },
-
-		// ; WARNING!!! THIS CHANGE WAS NOT EXPECTED!!!
-		// ; Swap I & Q inputs into second rotator
-		// ; to reverse frequency and therefor invert
-		// ; phase from the cordic FM demodulator
-		// ; (frequency rotation must also be reversed
-		{ AUD_DN2_SRC_SEL,         0x00000001 },
-		{ AUD_DN2_FREQ,            0x00003551 },
-
-		//  setup Audio PLL
-		{ AUD_PLL_PRESCALE,        0x00000002 },
-		{ AUD_PLL_INT,             0x0000001f },
-
-		{ /* end of list */ },
+	set_audio_start(dev, 0x0004, EN_DMTRX_SUMDIFF | EN_A2_AUTO_STEREO);
+	set_audio_registers(dev, a2_common);
+	switch (dev->tvaudio) {
+	case WW_A2_BG:
+		dprintk("%s PAL-BG A2 (status: known-good)\n",__FUNCTION__);
+		set_audio_registers(dev, a2_table1);
+		break;
+	case WW_A2_DK:
+		dprintk("%s PAL-DK A2 (status: known-good)\n",__FUNCTION__);
+		set_audio_registers(dev, a2_table2);
+		break;
+	case WW_A2_M:
+		dprintk("%s NTSC-M A2 (status: unknown)\n",__FUNCTION__);
+		set_audio_registers(dev, a2_table3);
+		break;
 	};
-
-
-	dprintk("%s (status: WorksForMe[tm])\n",__FUNCTION__);
-
-	if (0) {
-		/* old code */
-		set_audio_start(dev, 0x0004, EN_DMTRX_SUMR | EN_A2_AUTO_STEREO);
-		set_audio_registers(dev, a2_old);
-		set_audio_finish(dev);
-	} else {
-		/* new code */
-		set_audio_start(dev, 0x0004, EN_DMTRX_LR | EN_A2_AUTO_STEREO);
-		set_audio_registers(dev, a2);
-		set_audio_finish(dev);
-	}
+	set_audio_finish(dev);
 }
 
 static void set_audio_standard_EIAJ(struct cx8800_dev *dev)
@@ -617,9 +670,9 @@
 	reg   = cx_read(AUD_STATUS);
 	mode  = reg & 0x03;
 	pilot = (reg >> 2) & 0x03;
-	dprintk("AUD_STATUS: %s / %s [status=0x%x,ctl=0x%x,vol=0x%x]\n",
-		m[mode], p[pilot], reg,
-		cx_read(AUD_CTL), cx_sread(SHADOW_AUD_VOL_CTL));
+	dprintk("AUD_STATUS: 0x%x [%s/%s] ctl=%s\n",
+		reg, m[mode], p[pilot],
+		aud_ctl_names[cx_read(AUD_CTL) & 63]);
 
 	t->capability = V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_SAP |
 		V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2;
@@ -628,6 +681,8 @@
 
 	switch (dev->tvaudio) {
 	case WW_A2_BG:
+	case WW_A2_DK:
+	case WW_A2_M:
  		if (1 == pilot) {
 			/* stereo */
 			t->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
@@ -659,6 +714,8 @@
 
 	switch (dev->tvaudio) {
 	case WW_A2_BG:
+	case WW_A2_DK:
+	case WW_A2_M:
 		switch (mode) {
 		case V4L2_TUNER_MODE_MONO:   
 		case V4L2_TUNER_MODE_LANG1:
@@ -717,6 +774,32 @@
 	return;
 }
 
+/* just monitor the audio status for now ... */
+int cx88_audio_thread(void *data)
+{
+	struct cx8800_dev *dev = data;
+	struct v4l2_tuner t;
+
+	daemonize("msp3400");
+	allow_signal(SIGTERM);
+	dprintk("cx88: tvaudio thread started\n");
+
+	for (;;) {
+		set_current_state(TASK_INTERRUPTIBLE);
+		schedule_timeout(HZ*3);
+		if (signal_pending(current))
+			break;
+		if (dev->shutdown)
+			break;
+
+		memset(&t,0,sizeof(t));
+		cx88_get_stereo(dev,&t);
+	}
+
+	dprintk("cx88: tvaudio thread exiting\n");
+        complete_and_exit(&dev->texit, 0);
+}
+
 /*
  * Local variables:
  * c-basic-offset: 8
--- diff/drivers/media/video/cx88/cx88-vbi.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/cx88/cx88-vbi.c	2004-07-01 21:32:37.000000000 +0100
@@ -28,17 +28,14 @@
 	f->fmt.vbi.count[0] = VBI_LINE_COUNT;
 	f->fmt.vbi.count[1] = VBI_LINE_COUNT;
 
-	switch (dev->tvnorm->id) {
-	case V4L2_STD_NTSC_M:
-	case V4L2_STD_NTSC_M_JP:
+	if (dev->tvnorm->id & V4L2_STD_525_60) {
+		/* ntsc */
 		f->fmt.vbi.sampling_rate = 28636363;
 		f->fmt.vbi.start[0] = 10 -1;
 		f->fmt.vbi.start[1] = 273 -1;
-		break;
-	case V4L2_STD_PAL_BG:
-	case V4L2_STD_PAL_DK:
-	case V4L2_STD_PAL_I:
-	case V4L2_STD_SECAM:
+
+	} else if (V4L2_STD_625_50) {
+		/* pal */
 		f->fmt.vbi.sampling_rate = 35468950;
 		f->fmt.vbi.start[0] = 7 -1;
 		f->fmt.vbi.start[1] = 319 -1;
--- diff/drivers/media/video/cx88/cx88-video.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/cx88/cx88-video.c	2004-07-01 21:32:37.000000000 +0100
@@ -2,7 +2,7 @@
  * device driver for Conexant 2388x based TV cards
  * video4linux video interface
  *
- * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
+ * (c) 2003-04 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
  *
  *  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
@@ -19,8 +19,6 @@
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define __NO_VERSION__ 1
-
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/module.h>
@@ -32,6 +30,8 @@
 
 #include "cx88.h"
 
+#define V4L2_I2C_CLIENTS 1
+
 MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards");
 MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
 MODULE_LICENSE("GPL");
@@ -194,8 +194,13 @@
 		.cxiformat = VideoFormatPAL60,
 		.cxoformat = 0x181f0008,
 	},{
-		.name      = "SECAM",
-		.id        = V4L2_STD_SECAM,
+		.name      = "SECAM-L",
+		.id        = V4L2_STD_SECAM_L,
+		.cxiformat = VideoFormatSECAM,
+		.cxoformat = 0x181f0008,
+	},{
+		.name      = "SECAM-DK",
+		.id        = V4L2_STD_SECAM_DK,
 		.cxiformat = VideoFormatSECAM,
 		.cxoformat = 0x181f0008,
 	}
@@ -483,35 +488,38 @@
 	if (CX88_VMUX_TELEVISION != INPUT(dev->input)->type)
 		return 0;
 
-	switch (dev->tvnorm->id) {
-	case V4L2_STD_PAL_BG:
+	if (V4L2_STD_PAL_BG & dev->tvnorm->id) {
 		dev->tvaudio = nicam ? WW_NICAM_BGDKL : WW_A2_BG;
-		break;
-	case V4L2_STD_PAL_DK:
+
+	} else if (V4L2_STD_PAL_DK & dev->tvnorm->id) {
 		dev->tvaudio = nicam ? WW_NICAM_BGDKL : WW_A2_DK;
-		break;
-	case V4L2_STD_PAL_I:
+
+	} else if (V4L2_STD_PAL_I & dev->tvnorm->id) {
 		dev->tvaudio = WW_NICAM_I;
-		break;
-	case V4L2_STD_SECAM:
-		dev->tvaudio = WW_SYSTEM_L_AM;  /* FIXME: fr != ru */
-		break;
-	case V4L2_STD_NTSC_M:
+
+	} else if (V4L2_STD_SECAM_L & dev->tvnorm->id) {
+		dev->tvaudio = WW_SYSTEM_L_AM;
+
+	} else if (V4L2_STD_SECAM_DK & dev->tvnorm->id) {
+		dev->tvaudio = WW_A2_DK;
+
+	} else if ((V4L2_STD_NTSC_M & dev->tvnorm->id) ||
+		   (V4L2_STD_PAL_M  & dev->tvnorm->id)) {
 		dev->tvaudio = WW_BTSC;
-		break;
-	case V4L2_STD_NTSC_M_JP:
+
+	} else if (V4L2_STD_NTSC_M_JP & dev->tvnorm->id) {
 		dev->tvaudio = WW_EIAJ;
-		break;
-	default:
-		dprintk(1,"tvaudio support needs work for this tv norm [%s], sorry\n",
-			dev->tvnorm->name);
+
+	} else {
+		printk("%s: tvaudio support needs work for this tv norm [%s], sorry\n",
+		       dev->name, dev->tvnorm->name);
 		dev->tvaudio = 0;
 		return 0;
 	}
 
 	cx_andor(MO_AFECFG_IO, 0x1f, 0x0);
 	cx88_set_tvaudio(dev);
-	cx88_set_stereo(dev,V4L2_TUNER_MODE_STEREO);
+	// cx88_set_stereo(dev,V4L2_TUNER_MODE_STEREO);
 
 	cx_write(MO_AUDD_LNGTH, 128/8);  /* fifo size */
 	cx_write(MO_AUDR_LNGTH, 128/8);  /* fifo size */
@@ -526,7 +534,6 @@
 	u32 vdec_clock;
 	u64 tmp64;
 	u32 bdelay,agcdelay,htotal;
-	struct video_channel c;
 	
 	dev->tvnorm = norm;
 	fsc8       = norm_fsc8(norm);
@@ -592,30 +599,43 @@
 	set_tvaudio(dev);
 
 	// tell i2c chips
-	memset(&c,0,sizeof(c));
-	c.channel = dev->input;
-	c.norm = VIDEO_MODE_PAL;
-	if ((norm->id & (V4L2_STD_NTSC_M|V4L2_STD_NTSC_M_JP)))
-		c.norm = VIDEO_MODE_NTSC;
-	if (norm->id & V4L2_STD_SECAM)
-		c.norm = VIDEO_MODE_SECAM;
-	cx8800_call_i2c_clients(dev,VIDIOCSCHAN,&c);
+#ifdef V4L2_I2C_CLIENTS
+	cx8800_call_i2c_clients(dev,VIDIOC_S_STD,&norm->id);
+#else
+	{
+		struct video_channel c;
+		memset(&c,0,sizeof(c));
+		c.channel = dev->input;
+		c.norm = VIDEO_MODE_PAL;
+		if ((norm->id & (V4L2_STD_NTSC_M|V4L2_STD_NTSC_M_JP)))
+			c.norm = VIDEO_MODE_NTSC;
+		if (norm->id & V4L2_STD_SECAM)
+			c.norm = VIDEO_MODE_SECAM;
+		cx8800_call_i2c_clients(dev,VIDIOCSCHAN,&c);
+	}
+#endif
 
 	// done
 	return 0;
 }
 
 static int set_scale(struct cx8800_dev *dev, unsigned int width, unsigned int height,
-		     int interlaced)
+		     enum v4l2_field field)
 {
 	unsigned int swidth  = norm_swidth(dev->tvnorm);
 	unsigned int sheight = norm_maxh(dev->tvnorm);
 	u32 value;
 
-	dprintk(1,"set_scale: %dx%d [%s]\n", width, height, dev->tvnorm->name);
+	dprintk(1,"set_scale: %dx%d [%s%s,%s]\n", width, height,
+		V4L2_FIELD_HAS_TOP(field)    ? "T" : "",
+		V4L2_FIELD_HAS_BOTTOM(field) ? "B" : "",
+		dev->tvnorm->name);
+	if (!V4L2_FIELD_HAS_BOTH(field))
+		height *= 2;
 
 	// recalc H delay and scale registers
 	value = (width * norm_hdelay(dev->tvnorm)) / swidth;
+	value &= 0x3fe;
 	cx_write(MO_HDELAY_EVEN,  value);
 	cx_write(MO_HDELAY_ODD,   value);
 	dprintk(1,"set_scale: hdelay  0x%04x\n", value);
@@ -646,7 +666,7 @@
 	// setup filters
 	value = 0;
 	value |= (1 << 19);        // CFILT (default)
-	if (interlaced)
+	if (V4L2_FIELD_INTERLACED == field)
 		value |= (1 << 3); // VINT (interlaced vertical scaling)
 	if (width < 385)
 		value |= (1 << 0); // 3-tap interpolation
@@ -675,10 +695,12 @@
 
 	switch (INPUT(input)->type) {
 	case CX88_VMUX_SVIDEO:
-		cx_andor(MO_AFECFG_IO, 0x01, 0x01);
+		cx_set(MO_AFECFG_IO,    0x00000001);
+		cx_set(MO_INPUT_FORMAT, 0x00010010);
 		break;
 	default:
-		cx_andor(MO_AFECFG_IO, 0x01, 0x00);
+		cx_clear(MO_AFECFG_IO,    0x00000001);
+		cx_clear(MO_INPUT_FORMAT, 0x00010010);
 		break;
 	}
 	return 0;
@@ -693,7 +715,7 @@
 	/* setup fifo + format */
 	cx88_sram_channel_setup(dev, &cx88_sram_channels[SRAM_CH21],
 				buf->bpl, buf->risc.dma);
-	set_scale(dev, buf->vb.width, buf->vb.height, 1);
+	set_scale(dev, buf->vb.width, buf->vb.height, buf->vb.field);
 	cx_write(MO_COLOR_CTRL, buf->fmt->cxformat | ColorFormatGamma);
 
 	/* reset counter */
@@ -1350,6 +1372,9 @@
 	case V4L2_CID_AUDIO_BALANCE:
 		ctl->value = (value & 0x40) ? (value & 0x3f) : (0x40 - (value & 0x3f));
 		break;
+	case V4L2_CID_AUDIO_VOLUME:
+		ctl->value = 0x3f - (value & 0x3f);
+		break;
 	default:
 		ctl->value = ((value + (c->off << c->shift)) & c->mask) >> c->shift;
 		break;
@@ -1378,6 +1403,9 @@
 	case V4L2_CID_AUDIO_BALANCE:
 		value = (ctl->value < 0x40) ? (0x40 - ctl->value) : ctl->value;
 		break;
+	case V4L2_CID_AUDIO_VOLUME:
+		value = 0x3f - (ctl->value & 0x3f);
+		break;
 	case V4L2_CID_SATURATION:
 		/* special v_sat handling */
 		v_sat_value = ctl->value - (0x7f - 0x5a);
@@ -1409,7 +1437,7 @@
 	};
 	static struct v4l2_control volume = {
 		.id    = V4L2_CID_AUDIO_VOLUME,
-		.value = 0,
+		.value = 0x3f,
 	};
 
 	set_control(dev,&mute);
@@ -1459,15 +1487,12 @@
 		maxw  = norm_maxw(dev->tvnorm);
 		maxh  = norm_maxh(dev->tvnorm);
 
-#if 0
 		if (V4L2_FIELD_ANY == field) {
 			field = (f->fmt.pix.height > maxh/2)
 				? V4L2_FIELD_INTERLACED
 				: V4L2_FIELD_BOTTOM;
 		}
-#else
-		field = V4L2_FIELD_INTERLACED;
-#endif
+
 		switch (field) {
 		case V4L2_FIELD_TOP:
 		case V4L2_FIELD_BOTTOM:
@@ -1480,14 +1505,15 @@
 		}
 
 		f->fmt.pix.field = field;
-		if (f->fmt.pix.width < 48)
-			f->fmt.pix.width = 48;
 		if (f->fmt.pix.height < 32)
 			f->fmt.pix.height = 32;
-		if (f->fmt.pix.width > maxw)
-			f->fmt.pix.width = maxw;
 		if (f->fmt.pix.height > maxh)
 			f->fmt.pix.height = maxh;
+		if (f->fmt.pix.width < 48)
+			f->fmt.pix.width = 48;
+		if (f->fmt.pix.width > maxw)
+			f->fmt.pix.width = maxw;
+		f->fmt.pix.width &= ~0x03;
 		f->fmt.pix.bytesperline =
 			(f->fmt.pix.width * fmt->depth) >> 3;
 		f->fmt.pix.sizeimage =
@@ -1783,7 +1809,11 @@
 			return -EINVAL;
 		down(&dev->lock);
 		dev->freq = f->frequency;
+#ifdef V4L2_I2C_CLIENTS
+		cx8800_call_i2c_clients(dev,VIDIOC_S_FREQUENCY,f);
+#else
 		cx8800_call_i2c_clients(dev,VIDIOCSFREQ,&dev->freq);
+#endif
 		up(&dev->lock);
 		return 0;
 	}
@@ -1885,7 +1915,6 @@
 	case VIDIOC_G_TUNER:
 	{
 		struct v4l2_tuner *t = arg;
-		struct video_tuner vt;
 
 		if (t->index > 0)
 			return -EINVAL;
@@ -1895,9 +1924,16 @@
                 t->rangelow  = (int)(65*16);
                 t->rangehigh = (int)(108*16);
 		
-		memset(&vt,0,sizeof(vt));
-		cx8800_call_i2c_clients(dev,VIDIOCGTUNER,&vt);
-		t->signal = vt.signal;
+#ifdef V4L2_I2C_CLIENTS
+		cx8800_call_i2c_clients(dev,VIDIOC_G_TUNER,t);
+#else
+		{
+			struct video_tuner vt;
+			memset(&vt,0,sizeof(vt));
+			cx8800_call_i2c_clients(dev,VIDIOCGTUNER,&vt);
+			t->signal = vt.signal;
+		}
+#endif
 		return 0;
 	}
 	case VIDIOC_ENUMINPUT:
@@ -2281,11 +2317,6 @@
 	}
 }
 
-/* debug that damn oops ... */
-static unsigned int oops = 0;
-MODULE_PARM(oops,"i");
-#define OOPS(msg) if (oops) printk("%s: %s\n",__FUNCTION__,msg);
-
 static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
 				    const struct pci_device_id *pci_id)
 {
@@ -2299,7 +2330,6 @@
 	memset(dev,0,sizeof(*dev));
 
 	/* pci init */
-	OOPS("pci init");
 	dev->pci = pci_dev;
 	if (pci_enable_device(pci_dev)) {
 		err = -EIO;
@@ -2308,7 +2338,6 @@
 	sprintf(dev->name,"cx%x[%d]",pci_dev->device,cx8800_devcount);
 
 	/* pci quirks */
-	OOPS("pci quirks");
 	cx88_pci_quirks(dev->name, dev->pci, &latency);
 	if (UNSET != latency) {
 		printk(KERN_INFO "%s: setting pci latency timer to %d\n",
@@ -2317,7 +2346,6 @@
 	}
 
 	/* print pci info */
-	OOPS("pci info");
 	pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &dev->pci_rev);
         pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER,  &dev->pci_lat);
         printk(KERN_INFO "%s: found at %s, rev: %d, irq: %d, "
@@ -2333,14 +2361,15 @@
 	}
 
 	/* board config */
-	OOPS("board config");
 	dev->board = card[cx8800_devcount];
 	for (i = 0; UNSET == dev->board  &&  i < cx88_idcount; i++) 
 		if (pci_dev->subsystem_vendor == cx88_subids[i].subvendor &&
 		    pci_dev->subsystem_device == cx88_subids[i].subdevice)
 			dev->board = cx88_subids[i].card;
-	if (UNSET == dev->board)
+	if (UNSET == dev->board) {
 		dev->board = CX88_BOARD_UNKNOWN;
+		cx88_card_list(dev);
+	}
         printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
 	       dev->name,pci_dev->subsystem_vendor,
 	       pci_dev->subsystem_device,cx88_boards[dev->board].name,
@@ -2352,7 +2381,6 @@
 		dev->tuner_type = cx88_boards[dev->board].tuner_type;
 
 	/* get mmio */
-	OOPS("get mmio");
 	if (!request_mem_region(pci_resource_start(pci_dev,0),
 				pci_resource_len(pci_dev,0),
 				dev->name)) {
@@ -2366,7 +2394,6 @@
 	dev->bmmio = (u8*)dev->lmmio;
 
 	/* initialize driver struct */
-	OOPS("init structs");
         init_MUTEX(&dev->lock);
 	dev->slock = SPIN_LOCK_UNLOCKED;
 	dev->tvnorm = tvnorms;
@@ -2390,11 +2417,9 @@
 			  MO_VID_DMACNTRL,0x88,0x00);
 
 	/* initialize hardware */
-	OOPS("reset hardware");
 	cx8800_reset(dev);
 
 	/* get irq */
-	OOPS("install irq handler");
 	err = request_irq(pci_dev->irq, cx8800_irq,
 			  SA_SHIRQ | SA_INTERRUPT, dev->name, dev);
 	if (err < 0) {
@@ -2404,13 +2429,10 @@
 	}
 
 	/* register i2c bus + load i2c helpers */
-	OOPS("i2c setup");
 	cx8800_i2c_init(dev);
-	OOPS("card setup");
 	cx88_card_setup(dev);
 
 	/* load and configure helper modules */
-	OOPS("configure i2c clients");
 	if (TUNER_ABSENT != dev->tuner_type)
 		request_module("tuner");
 	if (cx88_boards[dev->board].needs_tda9887)
@@ -2419,7 +2441,6 @@
 		cx8800_call_i2c_clients(dev,TUNER_SET_TYPE,&dev->tuner_type);
 
 	/* register v4l devices */
-	OOPS("register video");
 	dev->video_dev = vdev_init(dev,&cx8800_video_template,"video");
 	err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER,
 				    video_nr[cx8800_devcount]);
@@ -2431,7 +2452,6 @@
 	printk(KERN_INFO "%s: registered device video%d [v4l2]\n",
 	       dev->name,dev->video_dev->minor & 0x1f);
 
-	OOPS("register vbi");
 	dev->vbi_dev = vdev_init(dev,&cx8800_vbi_template,"vbi");
 	err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI,
 				    vbi_nr[cx8800_devcount]);
@@ -2444,7 +2464,6 @@
 	       dev->name,dev->vbi_dev->minor & 0x1f);
 
 	if (dev->has_radio) {
-		OOPS("register radio");
 		dev->radio_dev = vdev_init(dev,&cx8800_radio_template,"radio");
 		err = video_register_device(dev->radio_dev,VFL_TYPE_RADIO,
 					    radio_nr[cx8800_devcount]);
@@ -2458,32 +2477,31 @@
 	}
 
 	/* everything worked */
-	OOPS("finalize");
 	list_add_tail(&dev->devlist,&cx8800_devlist);
 	pci_set_drvdata(pci_dev,dev);
 	cx8800_devcount++;
 
 	/* initial device configuration */
-	OOPS("init device");
 	down(&dev->lock);
 	init_controls(dev);
 	set_tvnorm(dev,tvnorms);
 	video_mux(dev,0);
 	up(&dev->lock);
+
+	/* start tvaudio thread */
+	init_completion(&dev->texit);
+	dev->tpid = kernel_thread(cx88_audio_thread, dev, 0);
 	return 0;
 
  fail3:
-	OOPS("fail3");
 	cx8800_unregister_video(dev);
 	if (0 == dev->i2c_rc)
 		i2c_bit_del_bus(&dev->i2c_adap);
 	free_irq(pci_dev->irq, dev);
  fail2:
-	OOPS("fail2");
 	release_mem_region(pci_resource_start(pci_dev,0),
 			   pci_resource_len(pci_dev,0));
  fail1:
-	OOPS("fail1");
 	kfree(dev);
 	return err;
 }
@@ -2492,6 +2510,11 @@
 {
         struct cx8800_dev *dev = pci_get_drvdata(pci_dev);
 
+	/* stop thread */
+	dev->shutdown = 1;
+	if (dev->tpid >= 0)
+		wait_for_completion(&dev->texit);
+
 	cx8800_shutdown(dev);
 	pci_disable_device(pci_dev);
 
--- diff/drivers/media/video/cx88/cx88.h	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/cx88/cx88.h	2004-07-01 21:32:37.000000000 +0100
@@ -32,7 +32,7 @@
 #include "cx88-reg.h"
 
 #include <linux/version.h>
-#define CX88_VERSION_CODE KERNEL_VERSION(0,0,3)
+#define CX88_VERSION_CODE KERNEL_VERSION(0,0,4)
 
 #ifndef TRUE
 # define TRUE (1==1)
@@ -114,17 +114,20 @@
 /* card configuration                                          */
 
 #define CX88_BOARD_NOAUTO        UNSET
-#define CX88_BOARD_UNKNOWN           0
-#define CX88_BOARD_HAUPPAUGE         1
-#define CX88_BOARD_GDI               2
-#define CX88_BOARD_PIXELVIEW         3
-#define CX88_BOARD_ATI_WONDER_PRO    4
-#define CX88_BOARD_WINFAST2000XP     5
-#define CX88_BOARD_AVERTV_303        6
-#define CX88_BOARD_MSI_TVANYWHERE    7
-#define CX88_BOARD_WINFAST_DV2000    8
-#define CX88_BOARD_LEADTEK_PVR2000   9
-
+#define CX88_BOARD_UNKNOWN               0
+#define CX88_BOARD_HAUPPAUGE             1
+#define CX88_BOARD_GDI                   2
+#define CX88_BOARD_PIXELVIEW             3
+#define CX88_BOARD_ATI_WONDER_PRO        4
+#define CX88_BOARD_WINFAST2000XP         5
+#define CX88_BOARD_AVERTV_303            6
+#define CX88_BOARD_MSI_TVANYWHERE_MASTER 7
+#define CX88_BOARD_WINFAST_DV2000        8
+#define CX88_BOARD_LEADTEK_PVR2000       9
+#define CX88_BOARD_IODATA_GVVCP3PCI      10
+#define CX88_BOARD_PROLINK_PLAYTVPVR     11
+#define CX88_BOARD_ASUS_PVR_416          12
+#define CX88_BOARD_MSI_TVANYWHERE        13
 
 enum cx88_itype {
 	CX88_VMUX_COMPOSITE1 = 1,
@@ -263,6 +266,9 @@
 
 	/* other global state info */
 	u32                         shadow[SHADOW_MAX];
+	int                         shutdown;
+	pid_t                       tpid;
+	struct completion           texit;
 	struct cx8800_suspend_state state;
 };
 
@@ -351,7 +357,8 @@
 extern struct cx88_subid cx88_subids[];
 extern const unsigned int cx88_idcount;
 
-extern void __devinit cx88_card_setup(struct cx8800_dev *dev);
+extern void cx88_card_list(struct cx8800_dev *dev);
+extern void cx88_card_setup(struct cx8800_dev *dev);
 
 /* ----------------------------------------------------------- */
 /* cx88-tvaudio.c                                              */
@@ -372,6 +379,7 @@
 void cx88_set_tvaudio(struct cx8800_dev *dev);
 void cx88_get_stereo(struct cx8800_dev *dev, struct v4l2_tuner *t);
 void cx88_set_stereo(struct cx8800_dev *dev, u32 mode);
+int cx88_audio_thread(void *data);
 
 /*
  * Local variables:
--- diff/drivers/media/video/ir-kbd-gpio.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/media/video/ir-kbd-gpio.c	2004-07-01 21:32:37.000000000 +0100
@@ -1,3 +1,4 @@
+
 /*
  * Copyright (c) 2003 Gerd Knorr
  * Copyright (c) 2003 Pavel Machek
@@ -32,47 +33,45 @@
 /* ---------------------------------------------------------------------- */
 
 static IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE] = {
-	[ 17 ] = KEY_KP0, 
-	[ 20 ] = KEY_KP1, 
-	[ 12 ] = KEY_KP2, 
-	[ 28 ] = KEY_KP3, 
-	[ 18 ] = KEY_KP4, 
-	[ 10 ] = KEY_KP5, 
-	[ 26 ] = KEY_KP6, 
-	[ 22 ] = KEY_KP7, 
-	[ 14 ] = KEY_KP8, 
-	[ 30 ] = KEY_KP9, 
+	[ 34 ] = KEY_KP0,
+	[ 40 ] = KEY_KP1,
+	[ 24 ] = KEY_KP2,
+	[ 56 ] = KEY_KP3,
+	[ 36 ] = KEY_KP4,
+	[ 20 ] = KEY_KP5,
+	[ 52 ] = KEY_KP6,
+	[ 44 ] = KEY_KP7,
+	[ 28 ] = KEY_KP8,
+	[ 60 ] = KEY_KP9,
 
-	[ 24 ] = KEY_EJECTCD,     // Unmarked on my controller
+	[ 48 ] = KEY_EJECTCD,     // Unmarked on my controller
 	[  0 ] = KEY_POWER, 
-	[  9 ] = BTN_LEFT,        // DISPLAY/L
-	[ 25 ] = BTN_RIGHT,       // LOOP/R
-	[  5 ] = KEY_MUTE, 
-	[ 19 ] = KEY_RECORD, 
-	[ 11 ] = KEY_PAUSE, 
-	[ 27 ] = KEY_STOP, 
-	[ 15 ] = KEY_VOLUMEDOWN, 
-	[ 31 ] = KEY_VOLUMEUP, 
-
-	[ 16 ] = KEY_TUNER,       // TV/FM
-	[  8 ] = KEY_CD, 
-	[  4 ] = KEY_VIDEO, 
-	[  2 ] = KEY_AUDIO, 
-	[  6 ] = KEY_ZOOM,        // full screen
-	[  1 ] = KEY_INFO,        // preview 
-	[ 21 ] = KEY_SEARCH,      // autoscan
-	[ 13 ] = KEY_STOP,        // freeze 
-	[ 29 ] = KEY_RECORD,      // capture 
-	[  3 ] = KEY_PLAY,        // unmarked
-	[ 23 ] = KEY_RED,         // unmarked
-	[  7 ] = KEY_GREEN,       // unmarked
-
-#if 0
-	[ 16 ] = KEY_YELLOW,      // unmarked
-	[  8 ] = KEY_CHANNELDOWN, 
-	[ 24 ] = KEY_CHANNELUP, 
-	[  0 ] = KEY_BLUE,        // unmarked
-#endif
+	[ 18 ] = BTN_LEFT,        // DISPLAY/L
+	[ 50 ] = BTN_RIGHT,       // LOOP/R
+	[ 10 ] = KEY_MUTE,
+	[ 38 ] = KEY_RECORD,
+	[ 22 ] = KEY_PAUSE,
+	[ 54 ] = KEY_STOP,
+	[ 30 ] = KEY_VOLUMEDOWN,
+	[ 62 ] = KEY_VOLUMEUP,
+
+	[ 32 ] = KEY_TUNER,       // TV/FM
+	[ 16 ] = KEY_CD,
+	[  8 ] = KEY_VIDEO,
+	[  4 ] = KEY_AUDIO,
+	[ 12 ] = KEY_ZOOM,        // full screen
+	[  2 ] = KEY_INFO,        // preview
+	[ 42 ] = KEY_SEARCH,      // autoscan
+	[ 26 ] = KEY_STOP,        // freeze
+	[ 58 ] = KEY_RECORD,      // capture
+	[  6 ] = KEY_PLAY,        // unmarked
+	[ 46 ] = KEY_RED,         // unmarked
+	[ 14 ] = KEY_GREEN,       // unmarked
+
+	[ 33 ] = KEY_YELLOW,      // unmarked
+	[ 17 ] = KEY_CHANNELDOWN,
+	[ 49 ] = KEY_CHANNELUP,
+	[  1 ] = KEY_BLUE,        // unmarked
 };
 
 static IR_KEYTAB_TYPE winfast_codes[IR_KEYTAB_SIZE] = {
@@ -280,8 +279,9 @@
 	case BTTV_AVPHONE98:
 	case BTTV_AVERMEDIA98:
 		ir_codes         = ir_codes_avermedia;
-		ir->mask_keycode = 0xf80000;
+		ir->mask_keycode = 0xf88000;
 		ir->mask_keydown = 0x010000;
+		ir->polling      = 50; // ms
 		break;
 
 	case BTTV_PXELVWPLTVPAK:
@@ -300,7 +300,7 @@
 
 	case BTTV_WINFAST2000:
 		ir_codes         = winfast_codes;
-		ir->mask_keycode = 0x8f8;
+		ir->mask_keycode = 0x1f8;
 		break;
 	case BTTV_MAGICTVIEW061:
 	case BTTV_MAGICTVIEW063:
--- diff/drivers/media/video/ir-kbd-i2c.c	2004-05-19 22:11:50.000000000 +0100
+++ source/drivers/media/video/ir-kbd-i2c.c	2004-07-01 21:32:37.000000000 +0100
@@ -77,6 +77,56 @@
 	[ 15 ] = KEY_SELECT, 		// SOURCE
 	[ 10 ] = KEY_KPPLUS,		// +100
 	[ 20 ] = KEY_KPEQUAL,		// SYNC
+	[ 28 ] = KEY_MEDIA,             // PC/TV
+};
+
+static IR_KEYTAB_TYPE ir_codes_purpletv[IR_KEYTAB_SIZE] = {
+	[ 0x3  ] = KEY_POWER,
+	[ 0x6f ] = KEY_MUTE,
+	[ 0x10 ] = KEY_BACKSPACE,	// Recall
+
+	[ 0x11 ] = KEY_KP0,
+	[ 0x4  ] = KEY_KP1,
+	[ 0x5  ] = KEY_KP2,
+	[ 0x6  ] = KEY_KP3,
+	[ 0x8  ] = KEY_KP4,
+	[ 0x9  ] = KEY_KP5,
+	[ 0xa  ] = KEY_KP6,
+	[ 0xc  ] = KEY_KP7,
+	[ 0xd  ] = KEY_KP8,
+	[ 0xe  ] = KEY_KP9,
+	[ 0x12 ] = KEY_KPDOT,		// 100+
+
+	[ 0x7  ] = KEY_VOLUMEUP,
+	[ 0xb  ] = KEY_VOLUMEDOWN,
+	[ 0x1a ] = KEY_KPPLUS,
+	[ 0x18 ] = KEY_KPMINUS,
+	[ 0x15 ] = KEY_UP,
+	[ 0x1d ] = KEY_DOWN,
+	[ 0xf  ] = KEY_CHANNELUP,
+	[ 0x13 ] = KEY_CHANNELDOWN,
+	[ 0x48 ] = KEY_ZOOM,
+
+	[ 0x1b ] = KEY_VIDEO,		// Video source
+#if 0
+	[ 0x1f ] = KEY_S,       	// Snapshot
+#endif
+	[ 0x49 ] = KEY_LANGUAGE,	// MTS Select
+	[ 0x19 ] = KEY_SEARCH,		// Auto Scan
+
+	[ 0x4b ] = KEY_RECORD,
+	[ 0x46 ] = KEY_PLAY,
+	[ 0x45 ] = KEY_PAUSE,   	// Pause
+	[ 0x44 ] = KEY_STOP,
+#if 0
+	[ 0x43 ] = KEY_T,    		// Time Shift
+	[ 0x47 ] = KEY_Y,    		// Time Shift OFF
+	[ 0x4a ] = KEY_O,    		// TOP
+	[ 0x17 ] = KEY_F,    		// SURF CH
+#endif
+	[ 0x40 ] = KEY_FORWARD,   	// Forward ?
+	[ 0x42 ] = KEY_REWIND,   	// Backward ?
+
 };
 
 struct IR;
@@ -202,11 +252,33 @@
 	return 1;
 }
 
+static int get_key_purpletv(struct IR *ir, u32 *ir_key, u32 *ir_raw)
+{
+        unsigned char b;
+
+	/* poll IR chip */
+	if (1 != i2c_master_recv(&ir->c,&b,1)) {
+		dprintk(1,"read error\n");
+		return -EIO;
+	}
+
+	/* no button press */
+	if (b==0)
+		return 0;
+
+	/* repeating */
+	if (b & 0x80)
+		return 1;
+
+	*ir_key = b;
+	*ir_raw = b;
+	return 1;
+}
 /* ----------------------------------------------------------------------- */
 
 static void ir_key_poll(struct IR *ir)
 {
-	u32 ir_key, ir_raw;
+	static u32 ir_key, ir_raw;
 	int rc;
 
 	dprintk(2,"ir_poll_key\n");
@@ -300,6 +372,12 @@
 		ir_type     = IR_TYPE_OTHER;
 		ir_codes    = ir_codes_empty;
 		break;
+	case 0x7a:
+		name        = "Purple TV";
+		ir->get_key = get_key_purpletv;
+		ir_type     = IR_TYPE_OTHER;
+		ir_codes    = ir_codes_purpletv;
+		break;
 	default:
 		/* shouldn't happen */
 		printk(DEVNAME ": Huh? unknown i2c address (0x%02x)?\n",addr);
@@ -320,7 +398,8 @@
 	ir->input.name       = ir->c.name;
 	ir->input.phys       = ir->phys;
 	input_register_device(&ir->input);
-	printk(DEVNAME ": %s detected at %s\n",ir->input.name,ir->input.phys);
+	printk(DEVNAME ": %s detected at %s [%s]\n",
+	       ir->input.name,ir->input.phys,adap->name);
 	       
 	/* start polling via eventd */
 	INIT_WORK(&ir->work, ir_work, ir);
@@ -361,22 +440,33 @@
 	   That's why we probe 0x1a (~0x34) first. CB 
 	*/
 	
-	static const int probe[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1};
+	static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1};
+	static const int probe_saa7134[] = { 0x7a, -1};
+	const int *probe = NULL;
 	struct i2c_client c; char buf; int i,rc;
 
-	if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) {
-		memset(&c,0,sizeof(c));
-		c.adapter = adap;
-		for (i = 0; -1 != probe[i]; i++) {
-			c.addr = probe[i];
-			rc = i2c_master_recv(&c,&buf,1);
-			dprintk(1,"probe 0x%02x @ %s: %s\n",
-				probe[i], adap->name, 
-				(1 == rc) ? "yes" : "no");
-			if (1 == rc) {
-				ir_attach(adap,probe[i],0,0);
-				break;
-			}
+	switch (adap->id) {
+	case I2C_ALGO_BIT | I2C_HW_B_BT848:
+		probe = probe_bttv;
+		break;
+	case I2C_ALGO_SAA7134:
+		probe = probe_saa7134;
+		break;
+	}
+	if (NULL == probe)
+		return 0;
+
+	memset(&c,0,sizeof(c));
+	c.adapter = adap;
+	for (i = 0; -1 != probe[i]; i++) {
+		c.addr = probe[i];
+		rc = i2c_master_recv(&c,&buf,1);
+		dprintk(1,"probe 0x%02x @ %s: %s\n",
+			probe[i], adap->name,
+			(1 == rc) ? "yes" : "no");
+		if (1 == rc) {
+			ir_attach(adap,probe[i],0,0);
+			break;
 		}
 	}
 	return 0;
--- diff/drivers/media/video/msp3400.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/media/video/msp3400.c	2004-07-01 21:32:37.000000000 +0100
@@ -51,6 +51,7 @@
 #include <asm/pgtable.h>
 
 #include <media/audiochip.h>
+#include <media/id.h>
 #include "msp3400.h"
 
 /* insmod parameters */
@@ -80,7 +81,7 @@
 	int input;
 
 	int muted;
-	int left, right;	/* volume */
+	int volume, balance;
 	int bass, treble;
 
 	/* shadow register set */
@@ -378,26 +379,24 @@
 }
 
 static void msp3400c_setvolume(struct i2c_client *client,
-			       int muted, int left, int right)
+			       int muted, int volume, int balance)
 {
-	int vol = 0,val = 0,balance = 0;
+	int val = 0, bal = 0;
 
 	if (!muted) {
-		vol     = (left > right) ? left : right;
-		val     = (vol * 0x73 / 65535) << 8;
+		val = (volume * 0x73 / 65535) << 8;
 	}
-	if (vol > 0) {
-		balance = ((right-left) * 127) / vol;
+	if (val) {
+		bal = (balance / 256) - 128;
 	}
-
 	dprintk(KERN_DEBUG
 		"msp34xx: setvolume: mute=%s %d:%d  v=0x%02x b=0x%02x\n",
-		muted ? "on" : "off", left, right, val>>8, balance);
+		muted ? "on" : "off", volume, balance, val>>8, bal);
 	msp3400c_write(client,I2C_MSP3400C_DFP, 0x0000, val); /* loudspeaker */
 	msp3400c_write(client,I2C_MSP3400C_DFP, 0x0006, val); /* headphones  */
 	/* scart - on/off only */
 	msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007, val ? 0x4000 : 0);
-	msp3400c_write(client,I2C_MSP3400C_DFP, 0x0001, balance << 8);
+	msp3400c_write(client,I2C_MSP3400C_DFP, 0x0001, bal << 8);
 }
 
 static void msp3400c_setbass(struct i2c_client *client, int bass)
@@ -815,7 +814,7 @@
 			/* no carrier scan, just unmute */
 			printk("msp3400: thread: no carrier scan\n");
 			msp3400c_setvolume(client, msp->muted,
-					   msp->left, msp->right);
+					   msp->volume, msp->balance);
 			continue;
 		}
 		msp->restart = 0;
@@ -960,7 +959,8 @@
 		}
 
 		/* unmute + restore dfp registers */
-		msp3400c_setvolume(client, msp->muted, msp->left, msp->right);
+		msp3400c_setvolume(client, msp->muted,
+				   msp->volume, msp->balance);
 		msp3400c_restore_dfp(client);
 
 		if (msp->watch_stereo)
@@ -1042,7 +1042,7 @@
 			/* no carrier scan needed, just unmute */
 			dprintk(KERN_DEBUG "msp3410: thread: no carrier scan\n");
 			msp3400c_setvolume(client, msp->muted,
-					   msp->left, msp->right);
+					   msp->volume, msp->balance);
 			continue;
 		}
 		msp->restart = 0;
@@ -1194,7 +1194,8 @@
 		/* unmute + restore dfp registers */
 		msp3400c_setbass(client, msp->bass);
 		msp3400c_settreble(client, msp->treble);
-		msp3400c_setvolume(client, msp->muted, msp->left, msp->right);
+		msp3400c_setvolume(client, msp->muted,
+				    msp->volume, msp->balance);
 		msp3400c_restore_dfp(client);
 
 		if (msp->watch_stereo)
@@ -1257,8 +1258,8 @@
 	}
 	
 	memset(msp,0,sizeof(struct msp3400c));
-	msp->left   = 65535;
-	msp->right  = 65535;
+	msp->volume = 65535;
+	msp->balance = 32768;
 	msp->bass   = 32768;
 	msp->treble = 32768;
 	msp->input  = -1;
@@ -1290,7 +1291,7 @@
 	/* this will turn on a 1kHz beep - might be useful for debugging... */
 	msp3400c_write(c,I2C_MSP3400C_DFP, 0x0014, 0x1040);
 #endif
-	msp3400c_setvolume(c,msp->muted,msp->left,msp->right);
+	msp3400c_setvolume(c, msp->muted, msp->volume, msp->balance);
 
 	snprintf(c->name, sizeof(c->name), "MSP34%02d%c-%c%d",
 		 (msp->rev2>>8)&0xff, (msp->rev1&0xff)+'@',
@@ -1440,8 +1441,10 @@
 		} else {
 			/* set msp3400 to FM radio mode */
 			msp3400c_setmode(client,MSP_MODE_FM_RADIO);
-			msp3400c_setcarrier(client, MSP_CARRIER(10.7),MSP_CARRIER(10.7));
-			msp3400c_setvolume(client,msp->muted,msp->left,msp->right);			
+			msp3400c_setcarrier(client, MSP_CARRIER(10.7),
+					    MSP_CARRIER(10.7));
+			msp3400c_setvolume(client, msp->muted,
+					   msp->volume, msp->balance);
 		}
 		if (msp->active)
 			msp->restart = 1;
@@ -1488,16 +1491,9 @@
 			VIDEO_AUDIO_MUTABLE;
 		if (msp->muted)
 			va->flags |= VIDEO_AUDIO_MUTE;
-		va->volume=max(msp->left,msp->right);
 
-		if (0 == va->volume) {
-			va->balance = 32768;
-		} else {
-			va->balance = (32768 * min(msp->left,msp->right))
-				/ va->volume;
-			va->balance = (msp->left<msp->right) ?
-				(65535 - va->balance) : va->balance;
-		}
+		va->volume = msp->volume;
+		va->balance = (va->volume) ? msp->balance : 32768;
 		va->bass = msp->bass;
 		va->treble = msp->treble;
 
@@ -1513,13 +1509,13 @@
 
 		dprintk(KERN_DEBUG "msp34xx: VIDIOCSAUDIO\n");
 		msp->muted = (va->flags & VIDEO_AUDIO_MUTE);
-		msp->left = (min(65536 - va->balance,32768) *
-			     va->volume) / 32768;
-		msp->right = (min(va->balance,(__u16)32768) *
-			      va->volume) / 32768;
+		msp->volume = va->volume;
+		msp->balance = va->balance;
 		msp->bass = va->bass;
 		msp->treble = va->treble;
-		msp3400c_setvolume(client,msp->muted,msp->left,msp->right);
+
+		msp3400c_setvolume(client, msp->muted,
+				   msp->volume, msp->balance);
 		msp3400c_setbass(client,msp->bass);
 		msp3400c_settreble(client,msp->treble);
 
--- diff/drivers/media/video/saa7134/saa6752hs.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/media/video/saa7134/saa6752hs.c	2004-07-01 21:32:37.000000000 +0100
@@ -337,7 +337,6 @@
 {
 	if (adap->class & I2C_CLASS_TV_ANALOG)
 		return i2c_probe(adap, &addr_data, saa6752hs_attach);
-
 	return 0;
 }
 
--- diff/drivers/media/video/saa7134/saa7134-cards.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/saa7134/saa7134-cards.c	2004-07-01 21:32:37.000000000 +0100
@@ -420,20 +420,14 @@
 			.vmux   = 1,
 			.amux   = TV,
 			.tv     = 1,
-#if 0
 		},{
 			.name   = name_comp1,
 			.vmux   = 0,
 			.amux   = LINE2,
 		},{
-			.name   = name_comp2,
-			.vmux   = 3,
-			.amux   = LINE2,
-		},{
 			.name   = name_svideo,
 			.vmux   = 8,
 			.amux   = LINE2,
-#endif
 		}},
 		.radio = {
 			.name   = name_radio,
@@ -515,24 +509,14 @@
                         .vmux = 1,
                         .amux = TV,
                         .tv   = 1,
-#if 0 /* untested */
                 },{
                         .name = name_comp1,
                         .vmux = 4,
                         .amux = LINE2,
                 },{
-                        .name = name_comp2,
-                        .vmux = 2,
-                        .amux = LINE2,
-                },{
                         .name = name_svideo,
                         .vmux = 6,
                         .amux = LINE2,
-                },{
-                        .name = "S-Video2",
-                        .vmux = 7,
-                        .amux = LINE2,
-#endif
                 }},
                 .radio = {
                         .name = name_radio,
@@ -679,7 +663,7 @@
                 }},
         },
 	[SAA7134_BOARD_MD2819] = {
-		.name           = "Medion 2819/ AverMedia M156",
+		.name           = "AverMedia M156 / Medion 2819",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
 		.need_tda9887   = 1,
@@ -951,6 +935,96 @@
 			.vmux = 3,
 		}},
 	},
+        [SAA7134_BOARD_NOVAC_PRIMETV7133] = {
+                /* toshii@netbsd.org */
+                .name           = "Noval Prime TV 7133",
+                .audio_clock    = 0x00200000,
+                .tuner_type     = TUNER_ALPS_TSBH1_NTSC,
+                .inputs         = {{
+                        .name = name_comp1,
+                        .vmux = 3,
+                },{
+                        .name = name_tv,
+                        .vmux = 1,
+                        .amux = TV,
+                        .tv   = 1,
+                },{
+                        .name = name_svideo,
+                        .vmux = 8,
+                }},
+        },
+	[SAA7134_BOARD_AVERMEDIA_305] = {
+		.name           = "AverMedia 305",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+		.need_tda9887   = 1,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 1,
+			.amux = LINE2,
+			.tv   = 1,
+		},{
+			.name = name_comp1,
+			.vmux = 0,
+			.amux = LINE2,
+		},{
+			.name = name_comp2,
+			.vmux = 3,
+			.amux = LINE2,
+		},{
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE2,
+		}},
+		.radio = {
+			 .name = name_radio,
+			 .amux = LINE2,
+		 },
+		.mute = {
+			 .name = name_mute,
+			 .amux = LINE1,
+		},
+	},
+  	[SAA7133_BOARD_UPMOST_PURPLE_TV] = {
+  		.name           = "UPMOST PURPLE TV",
+  		.audio_clock    = 0x00187de7,
+  		.tuner_type     = TUNER_PHILIPS_FM1236_MK3,
+  		.need_tda9887   = 1,
+  		.inputs         = {{
+  			.name = name_tv,
+  			.vmux = 7,
+  			.amux = TV,
+  			.tv   = 1,
+  		},{
+  			.name = name_svideo,
+  			.vmux = 7,
+  			.amux = LINE1,
+  		}},
+          },
+	[SAA7134_BOARD_ITEMS_MTV005] = {
+		/* Norman Jonas <normanjonas@arcor.de> */
+		.name           = "Items MuchTV Plus / IT-005",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_PAL,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		},{
+			.name   = name_comp1,
+			.vmux   = 1,
+			.amux   = LINE1,
+		},{
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		}},
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+		},
+	},
 };
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
 
@@ -1103,12 +1177,11 @@
                 .subdevice    = 0xa70b,
 		.driver_data  = SAA7134_BOARD_MD2819,
 	},{
-		/* AverMedia Studio 305, using AverMedia M156 entry for now */
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
-		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
+		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
                 .subdevice    = 0x2115,
-		.driver_data  = SAA7134_BOARD_MD2819,
+		.driver_data  = SAA7134_BOARD_AVERMEDIA_305,
 	},{
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
@@ -1141,7 +1214,13 @@
                 .subdevice    = 0x4cb5,
                 .driver_data  = SAA7134_BOARD_ECS_TVP3XP_4CB5,
         },{
+		.vendor       = PCI_VENDOR_ID_PHILIPS,
+ 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+                .subvendor    = 0x12ab,
+                .subdevice    = 0x0800,
+ 		.driver_data  = SAA7133_BOARD_UPMOST_PURPLE_TV,
 		
+ 	},{
 		/* --- boards without eeprom + subsystem ID --- */
                 .vendor       = PCI_VENDOR_ID_PHILIPS,
                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -1251,6 +1330,9 @@
 	case SAA7134_BOARD_ECS_TVP3XP_4CB5:
 		dev->has_remote = 1;
 		break;
+	case SAA7134_BOARD_AVACSSMARTTV:
+		dev->has_remote = 1;
+		break;
 	}
 	return 0;
 }
--- diff/drivers/media/video/saa7134/saa7134-core.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/saa7134/saa7134-core.c	2004-07-01 21:32:37.000000000 +0100
@@ -607,10 +607,18 @@
 	};
 	if (10 == loop) {
 		print_irqstatus(dev,loop,report,status);
-		printk(KERN_WARNING "%s/irq: looping -- clearing enable bits\n",dev->name);
-		/* disable all irqs */
-		saa_writel(SAA7134_IRQ1,0);
-		saa_writel(SAA7134_IRQ2,0);
+		if (report & SAA7134_IRQ_REPORT_PE) {
+			/* disable all parity error */
+			printk(KERN_WARNING "%s/irq: looping -- "
+			       "clearing PE (parity error!) enable bit\n",dev->name);
+			saa_clearl(SAA7134_IRQ2,SAA7134_IRQ2_INTE_PE);
+		} else {
+			/* disable all irqs */
+			printk(KERN_WARNING "%s/irq: looping -- "
+			       "clearing all enable bits\n",dev->name);
+			saa_writel(SAA7134_IRQ1,0);
+			saa_writel(SAA7134_IRQ2,0);
+		}
 	}
 
  out:
--- diff/drivers/media/video/saa7134/saa7134-input.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/media/video/saa7134/saa7134-input.c	2004-07-01 21:32:37.000000000 +0100
@@ -20,12 +20,24 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/sched.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 
 #include "saa7134-reg.h"
 #include "saa7134.h"
 
+static unsigned int disable_ir = 0;
+MODULE_PARM(disable_ir,"i");
+MODULE_PARM_DESC(disable_ir,"disable infrared remote support");
+
+static unsigned int ir_debug = 0;
+MODULE_PARM(ir_debug,"i");
+MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]");
+
+#define dprintk(fmt, arg...)	if (ir_debug) \
+	printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg)
+
 /* ---------------------------------------------------------------------- */
 
 static IR_KEYTAB_TYPE flyvideo_codes[IR_KEYTAB_SIZE] = {
@@ -156,6 +168,47 @@
         [ 33 ] = KEY_KPDOT,          // . (decimal dot)
 };
 
+static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = {
+        [ 30 ] = KEY_POWER,		// power
+	[ 28 ] = KEY_SEARCH,		// scan
+        [  7 ] = KEY_SELECT,		// source
+
+	[ 22 ] = KEY_VOLUMEUP,
+	[ 20 ] = KEY_VOLUMEDOWN,
+        [ 31 ] = KEY_CHANNELUP,
+	[ 23 ] = KEY_CHANNELDOWN,
+	[ 24 ] = KEY_MUTE,
+
+	[  2 ] = KEY_KP0,
+        [  1 ] = KEY_KP1,
+        [ 11 ] = KEY_KP2,
+        [ 27 ] = KEY_KP3,
+        [  5 ] = KEY_KP4,
+        [  9 ] = KEY_KP5,
+        [ 21 ] = KEY_KP6,
+	[  6 ] = KEY_KP7,
+        [ 10 ] = KEY_KP8,
+	[ 18 ] = KEY_KP9,
+	[ 16 ] = KEY_KPDOT,
+
+	[  3 ] = KEY_TUNER,		// tv/fm
+        [  4 ] = KEY_REWIND,		// fm tuning left or function left
+        [ 12 ] = KEY_FORWARD,		// fm tuning right or function right
+
+	[  0 ] = KEY_RECORD,
+        [  8 ] = KEY_STOP,
+        [ 17 ] = KEY_PLAY,
+
+	[ 25 ] = KEY_ZOOM,
+	[ 14 ] = KEY_MENU,		// function
+	[ 19 ] = KEY_AGAIN,		// recall
+	[ 29 ] = KEY_RESTART,		// reset
+
+// FIXME
+	[ 13 ] = KEY_F21,		// mts
+        [ 15 ] = KEY_F22,		// min
+	[ 26 ] = KEY_F23,		// freeze
+};
 /* ---------------------------------------------------------------------- */
 
 static int build_key(struct saa7134_dev *dev)
@@ -175,8 +228,8 @@
         }
 
  	data = ir_extract_bits(gpio, ir->mask_keycode);
-	printk("%s: build_key gpio=0x%x mask=0x%x data=%d\n",
-	       dev->name, gpio, ir->mask_keycode, data);
+	dprintk("build_key gpio=0x%x mask=0x%x data=%d\n",
+		gpio, ir->mask_keycode, data);
 
 	if ((ir->mask_keydown  &&  (0 != (gpio & ir->mask_keydown))) ||
 	    (ir->mask_keyup    &&  (0 == (gpio & ir->mask_keyup)))) {
@@ -218,9 +271,12 @@
 	int polling      = 0;
 	int ir_type      = IR_TYPE_OTHER;
 
-	/* detect & configure */
 	if (!dev->has_remote)
 		return -ENODEV;
+	if (disable_ir)
+		return -ENODEV;
+
+	/* detect & configure */
 	switch (dev->board) {
 	case SAA7134_BOARD_FLYVIDEO2000:
 	case SAA7134_BOARD_FLYVIDEO3000:
@@ -241,6 +297,12 @@
                 mask_keyup   = 0x000002;
 		polling      = 50; // ms
                 break;
+	case SAA7134_BOARD_AVACSSMARTTV:
+	        ir_codes     = avacssmart_codes;
+		mask_keycode = 0x00001F;
+		mask_keyup   = 0x000020;
+		polling      = 50; // ms
+		break;
 	}
 	if (NULL == ir_codes) {
 		printk("%s: Oops: IR config error [card=%d]\n",
--- diff/drivers/media/video/saa7134/saa7134-oss.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/saa7134/saa7134-oss.c	2004-07-01 21:32:37.000000000 +0100
@@ -50,7 +50,7 @@
 	if (blksize < 0x100)
 		blksize = 0x100;
 	if (blksize > 0x10000)
-		blksize = 0x100;
+		blksize = 0x10000;
 
 	if (blocks < 2)
 		blocks = 2;
@@ -74,6 +74,7 @@
 
 	if (!dev->oss.bufsize)
 		BUG();
+	videobuf_dma_init(&dev->oss.dma);
 	err = videobuf_dma_init_kernel(&dev->oss.dma, PCI_DMA_FROMDEVICE,
 				       dev->oss.bufsize >> PAGE_SHIFT);
 	if (0 != err)
@@ -172,7 +173,7 @@
 			fmt |= (2 << 4);
 		if (!sign)
 			fmt |= 0x04;
-		saa_writel(0x588 >> 2, dev->oss.blksize);
+		saa_writel(0x588 >> 2, dev->oss.blksize -4);
 		saa_writel(0x58c >> 2, 0x543210 | (fmt << 24));
 		break;
 	}
--- diff/drivers/media/video/saa7134/saa7134-ts.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/saa7134/saa7134-ts.c	2004-07-01 21:32:37.000000000 +0100
@@ -33,6 +33,8 @@
 
 /* ------------------------------------------------------------------ */
 
+#define TS_PACKET_SIZE 188 /* TS packets 188 bytes */
+
 static unsigned int ts_debug  = 0;
 MODULE_PARM(ts_debug,"i");
 MODULE_PARM_DESC(ts_debug,"enable debug messages [ts]");
@@ -41,8 +43,9 @@
 MODULE_PARM(tsbufs,"i");
 MODULE_PARM_DESC(tsbufs,"number of ts buffers, range 2-32");
 
-#define TS_PACKET_SIZE 188 /* TS packets 188 bytes */
-#define TS_NR_PACKETS 312
+static unsigned int ts_nr_packets = 30;
+MODULE_PARM(ts_nr_packets,"i");
+MODULE_PARM_DESC(ts_nr_packets,"size of a ts buffers (in ts packets)");
 
 #define dprintk(fmt, arg...)	if (ts_debug) \
 	printk(KERN_DEBUG "%s/ts: " fmt, dev->name , ## arg)
@@ -96,7 +99,7 @@
 	dprintk("buffer_prepare [%p,%s]\n",buf,v4l2_field_names[field]);
 
 	llength = TS_PACKET_SIZE;
-	lines = TS_NR_PACKETS;
+	lines = ts_nr_packets;
 	
 	size = lines * llength;
 	if (0 != buf->vb.baddr  &&  buf->vb.bsize < size)
@@ -135,7 +138,7 @@
 static int
 buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
 {
-	*size = TS_PACKET_SIZE * TS_NR_PACKETS;
+	*size = TS_PACKET_SIZE * ts_nr_packets;
 	if (0 == *count)
 		*count = tsbufs;
 	*count = saa7134_buffer_count(*size,*count);
@@ -353,7 +356,7 @@
 		f->fmt.pix.width        = 720; /* D1 */
 		f->fmt.pix.height       = 576;
 		f->fmt.pix.pixelformat  = V4L2_PIX_FMT_MPEG;
-		f->fmt.pix.sizeimage    = TS_PACKET_SIZE*TS_NR_PACKETS;
+		f->fmt.pix.sizeimage    = TS_PACKET_SIZE*ts_nr_packets;
 		return 0;
 	}
 	
@@ -379,7 +382,7 @@
 		f->fmt.pix.width        = 720; /* D1 */
 		f->fmt.pix.height       = 576;
 		f->fmt.pix.pixelformat  = V4L2_PIX_FMT_MPEG;
-		f->fmt.pix.sizeimage    = TS_PACKET_SIZE*TS_NR_PACKETS;
+		f->fmt.pix.sizeimage    = TS_PACKET_SIZE*ts_nr_packets;
 		return 0;
 	}
 
@@ -408,7 +411,7 @@
 
 	case MPEG_SETPARAMS:
 		return ts_init_encoder(dev, arg);
-	  
+
 	default:
 		return -ENOIOCTLCMD;
 	}
@@ -455,6 +458,10 @@
 		tsbufs = 2;
 	if (tsbufs > VIDEO_MAX_FRAME)
 		tsbufs = VIDEO_MAX_FRAME;
+	if (ts_nr_packets < 4)
+		ts_nr_packets = 4;
+	if (ts_nr_packets > 312)
+		ts_nr_packets = 312;
 
 	INIT_LIST_HEAD(&dev->ts_q.queue);
 	init_timer(&dev->ts_q.timeout);
@@ -472,9 +479,9 @@
 	saa_writeb(SAA7134_TS_SERIAL1, 0x00);  /* deactivate TS softreset */
 	saa_writeb(SAA7134_TS_PARALLEL, 0xec); /* TSSOP high active, TSVAL high active, TSLOCK ignored */
 	saa_writeb(SAA7134_TS_PARALLEL_SERIAL, (TS_PACKET_SIZE-1));
-	saa_writeb(SAA7134_TS_DMA0, ((TS_NR_PACKETS-1)&0xff));
-	saa_writeb(SAA7134_TS_DMA1, (((TS_NR_PACKETS-1)>>8)&0xff));
-	saa_writeb(SAA7134_TS_DMA2, ((((TS_NR_PACKETS-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */	 
+	saa_writeb(SAA7134_TS_DMA0, ((ts_nr_packets-1)&0xff));
+	saa_writeb(SAA7134_TS_DMA1, (((ts_nr_packets-1)>>8)&0xff));
+	saa_writeb(SAA7134_TS_DMA2, ((((ts_nr_packets-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */
  
 	return 0;
 }
--- diff/drivers/media/video/saa7134/saa7134-tvaudio.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/saa7134/saa7134-tvaudio.c	2004-07-01 21:32:37.000000000 +0100
@@ -37,10 +37,6 @@
 MODULE_PARM(audio_debug,"i");
 MODULE_PARM_DESC(audio_debug,"enable debug messages [tv audio]");
 
-static unsigned int audio_carrier = 0;
-MODULE_PARM(audio_carrier,"i");
-MODULE_PARM_DESC(audio_carrier,"audio carrier location");
-
 static unsigned int audio_ddep = 0;
 MODULE_PARM(audio_ddep,"i");
 MODULE_PARM_DESC(audio_ddep,"audio ddep overwrite");
@@ -67,6 +63,30 @@
 /* ------------------------------------------------------------------ */
 /* saa7134 code                                                       */
 
+static struct mainscan {
+	char         *name;
+	v4l2_std_id  std;
+	int          carr;
+} mainscan[] = {
+	{
+		.name = "M",
+		.std  = V4L2_STD_NTSC | V4L2_STD_PAL_M,
+		.carr = 4500,
+	},{
+		.name = "BG",
+		.std  = V4L2_STD_PAL_BG,
+		.carr = 5500,
+	},{
+		.name = "I",
+		.std  = V4L2_STD_PAL_I,
+		.carr = 6000,
+	},{
+		.name = "DKL",
+		.std  = V4L2_STD_PAL_DK | V4L2_STD_SECAM,
+		.carr = 6500,
+	}
+};
+
 static struct saa7134_tvaudio tvaudio[] = {
 	{
 		.name          = "PAL-B/G FM-stereo",
@@ -314,15 +334,15 @@
 	return dev->thread.scan1 != dev->thread.scan2;
 }
 
-static int tvaudio_checkcarrier(struct saa7134_dev *dev, int carrier)
+static int tvaudio_checkcarrier(struct saa7134_dev *dev, struct mainscan *scan)
 {
 	__s32 left,right,value;
 
 	if (audio_debug > 1) {
 		int i;
-		dprintk("debug %d:",carrier);
+		dprintk("debug %d:",scan->carr);
 		for (i = -150; i <= 150; i += 30) {
-			tvaudio_setcarrier(dev,carrier+i,carrier+i);
+			tvaudio_setcarrier(dev,scan->carr+i,scan->carr+i);
 			saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
 			if (tvaudio_sleep(dev,SCAN_SAMPLE_DELAY))
 				return -1;
@@ -334,24 +354,31 @@
 		}
 		printk("\n");
 	}
-	
-	tvaudio_setcarrier(dev,carrier-90,carrier-90);
-	saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
-	if (tvaudio_sleep(dev,SCAN_SAMPLE_DELAY))
-		return -1;
-	left = saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
-
-	tvaudio_setcarrier(dev,carrier+90,carrier+90);
-	saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
-	if (tvaudio_sleep(dev,SCAN_SAMPLE_DELAY))
-		return -1;
-	right = saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
-
-	left >>= 16;
-        right >>= 16;
-	value = left > right ? left - right : right - left;
-	dprintk("scanning %d.%03d MHz =>  dc is %5d [%d/%d]\n",
-		carrier/1000,carrier%1000,value,left,right);
+
+	if (dev->tvnorm->id & scan->std) {
+		tvaudio_setcarrier(dev,scan->carr-90,scan->carr-90);
+		saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
+		if (tvaudio_sleep(dev,SCAN_SAMPLE_DELAY))
+			return -1;
+		left = saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
+
+		tvaudio_setcarrier(dev,scan->carr+90,scan->carr+90);
+		saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
+		if (tvaudio_sleep(dev,SCAN_SAMPLE_DELAY))
+			return -1;
+		right = saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
+
+		left >>= 16;
+		right >>= 16;
+		value = left > right ? left - right : right - left;
+		dprintk("scanning %d.%03d MHz [%4s] =>  dc is %5d [%d/%d]\n",
+			scan->carr / 1000, scan->carr % 1000,
+			scan->name, value, left, right);
+	} else {
+		value = 0;
+		dprintk("skipping %d.%03d MHz [%4s]\n",
+			scan->carr / 1000, scan->carr % 1000, scan->name);
+	}
 	return value;
 }
 
@@ -384,6 +411,7 @@
 	case TVAUDIO_FM_K_STEREO:
 	case TVAUDIO_FM_BG_STEREO:
 		idp = (saa_readb(SAA7134_IDENT_SIF) & 0xe0) >> 5;
+		dprintk("getstereo: fm/stereo: idp=0x%x\n",idp);
 		if (0x03 == (idp & 0x03))
 			retval = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2;
 		else if (0x05 == (idp & 0x05))
@@ -397,6 +425,7 @@
 	case TVAUDIO_NICAM_FM:
 	case TVAUDIO_NICAM_AM:
 		nicam = saa_readb(SAA7134_NICAM_STATUS);
+		dprintk("getstereo: nicam=0x%x\n",nicam);
 		switch (nicam & 0x0b) {
 		case 0x08:
 			retval = V4L2_TUNER_SUB_MONO;
@@ -458,16 +487,10 @@
 
 static int tvaudio_thread(void *data)
 {
-#define MAX_SCAN 4
-	static const int carr_pal[MAX_SCAN]     = { 5500, 6000, 6500 };
-	static const int carr_ntsc[MAX_SCAN]    = { 4500 };
-	static const int carr_secam[MAX_SCAN]   = { 6500 };
-	static const int carr_default[MAX_SCAN] = { 4500, 5500, 6000, 6500 };
 	struct saa7134_dev *dev = data;
-	const int *carr_scan;
-	int carr_vals[4];
-	unsigned int i, audio;
-	int max1,max2,carrier,rx,mode,lastmode;
+	int carr_vals[ARRAY_SIZE(mainscan)];
+	unsigned int i, audio, nscan;
+	int max1,max2,carrier,rx,mode,lastmode,default_carrier;
 
 	daemonize("%s", dev->name);
 	allow_signal(SIGTERM);
@@ -488,32 +511,40 @@
 		if (tvaudio_sleep(dev,SCAN_INITIAL_DELAY))
 			goto restart;
 
-		/* find the main carrier */
-		carr_scan = carr_default;
-		if (dev->tvnorm->id & V4L2_STD_PAL)
-			carr_scan = carr_pal;
-		if (dev->tvnorm->id & V4L2_STD_NTSC)
-			carr_scan = carr_ntsc;
-		if (dev->tvnorm->id & V4L2_STD_SECAM)
-			carr_scan = carr_secam;
-		saa_writeb(SAA7134_MONITOR_SELECT,0x00);
-		tvaudio_setmode(dev,&tvaudio[0],NULL);
-		for (i = 0; i < MAX_SCAN; i++) {
-			if (!carr_scan[i])
+		max1 = 0;
+		max2 = 0;
+		nscan = 0;
+		carrier = 0;
+		default_carrier = 0;
+		for (i = 0; i < ARRAY_SIZE(mainscan); i++) {
+			if (!(dev->tvnorm->id & mainscan[i].std))
 				continue;
-			carr_vals[i] = tvaudio_checkcarrier(dev,carr_scan[i]);
-			if (dev->thread.scan1 != dev->thread.scan2)
-				goto restart;
+			if (!default_carrier)
+				default_carrier = mainscan[i].carr;
+			nscan++;
 		}
-		for (carrier = 0, max1 = 0, max2 = 0, i = 0; i < MAX_SCAN; i++) {
-			if (!carr_scan[i])
-				continue;
-			if (max1 < carr_vals[i]) {
-				max2 = max1;
-				max1 = carr_vals[i];
-				carrier = carr_scan[i];
-			} else if (max2 < carr_vals[i]) {
-				max2 = carr_vals[i];
+
+		if (1 == nscan) {
+			/* only one candidate -- skip scan ;) */
+			max1 = 12345;
+			carrier = default_carrier;
+		} else {
+			/* scan for the main carrier */
+			saa_writeb(SAA7134_MONITOR_SELECT,0x00);
+			tvaudio_setmode(dev,&tvaudio[0],NULL);
+			for (i = 0; i < ARRAY_SIZE(mainscan); i++) {
+				carr_vals[i] = tvaudio_checkcarrier(dev, mainscan+i);
+				if (dev->thread.scan1 != dev->thread.scan2)
+					goto restart;
+			}
+			for (max1 = 0, max2 = 0, i = 0; i < ARRAY_SIZE(mainscan); i++) {
+				if (max1 < carr_vals[i]) {
+					max2 = max1;
+					max1 = carr_vals[i];
+					carrier = mainscan[i].carr;
+				} else if (max2 < carr_vals[i]) {
+					max2 = carr_vals[i];
+				}
 			}
 		}
 
@@ -523,21 +554,17 @@
 				dev->tvnorm->name, carrier/1000, carrier%1000,
 				max1, max2);
 			dev->last_carrier = carrier;
-		} else if (0 != audio_carrier) {
-			/* no carrier -- try insmod option as fallback */
-			carrier = audio_carrier;
-			printk(KERN_WARNING "%s/audio: audio carrier scan failed, "
-			       "using %d.%03d MHz [insmod option]\n",
-			       dev->name, carrier/1000, carrier%1000);
+
 		} else if (0 != dev->last_carrier) {
 			/* no carrier -- try last detected one as fallback */
 			carrier = dev->last_carrier;
 			printk(KERN_WARNING "%s/audio: audio carrier scan failed, "
 			       "using %d.%03d MHz [last detected]\n",
 			       dev->name, carrier/1000, carrier%1000);
+
 		} else {
-			/* no carrier + no fallback -- try first in list */
-			carrier = carr_scan[0];
+			/* no carrier + no fallback -- use default */
+			carrier = default_carrier;
 			printk(KERN_WARNING "%s/audio: audio carrier scan failed, "
 			       "using %d.%03d MHz [default]\n",
 			       dev->name, carrier/1000, carrier%1000);
@@ -550,7 +577,7 @@
 		/* find the exact tv audio norm */
 		for (audio = UNSET, i = 0; i < TVAUDIO; i++) {
 			if (dev->tvnorm->id != UNSET &&
-			    dev->tvnorm->id != tvaudio[i].std)
+			    !(dev->tvnorm->id & tvaudio[i].std))
 				continue;
 			if (tvaudio[i].carr1 != carrier)
 				continue;
@@ -722,11 +749,16 @@
 static int tvaudio_thread_ddep(void *data)
 {
 	struct saa7134_dev *dev = data;
-	u32 value, norms;
+	u32 value, norms, clock;
 
 	daemonize("%s", dev->name);
 	allow_signal(SIGTERM);
 
+	clock = saa7134_boards[dev->board].audio_clock;
+	if (UNSET != audio_clock_override)
+		clock = audio_clock_override;
+	saa_writel(0x598 >> 2, clock);
+
 	/* unmute */
 	saa_dsp_writel(dev, 0x474 >> 2, 0x00);
 	saa_dsp_writel(dev, 0x450 >> 2, 0x00);
@@ -769,9 +801,11 @@
 				(norms & 0x40) ? " M"    : "");
 		}
 
-		/* quick & dirty -- to be fixed up later ... */
+		/* kick automatic standard detection */
 		saa_dsp_writel(dev, 0x454 >> 2, 0);
 		saa_dsp_writel(dev, 0x454 >> 2, norms | 0x80);
+
+		/* setup crossbars */
 		saa_dsp_writel(dev, 0x464 >> 2, 0x000000);
 		saa_dsp_writel(dev, 0x470 >> 2, 0x101010);
 
--- diff/drivers/media/video/saa7134/saa7134-video.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/saa7134/saa7134-video.c	2004-07-01 21:32:37.000000000 +0100
@@ -28,13 +28,15 @@
 #include "saa7134-reg.h"
 #include "saa7134.h"
 
+#define V4L2_I2C_CLIENTS 1
+
 /* ------------------------------------------------------------------ */
 
 static unsigned int video_debug   = 0;
 static unsigned int gbuffers      = 8;
 static unsigned int noninterlaced = 0;
-static unsigned int gbufsize      = 768*576*4;
-static unsigned int gbufsize_max  = 768*576*4;
+static unsigned int gbufsize      = 720*576*4;
+static unsigned int gbufsize_max  = 720*576*4;
 MODULE_PARM(video_debug,"i");
 MODULE_PARM_DESC(video_debug,"enable debug messages [video]");
 MODULE_PARM(gbuffers,"i");
@@ -148,10 +150,65 @@
 };
 #define FORMATS ARRAY_SIZE(formats)
 
+#define NORM_625_50			\
+		.h_start       = 0,	\
+		.h_stop        = 719,	\
+		.video_v_start = 24,	\
+		.video_v_stop  = 311,	\
+		.vbi_v_start   = 7,	\
+		.vbi_v_stop    = 22,	\
+		.src_timing    = 4
+
+#define NORM_525_60			\
+		.h_start       = 0,	\
+		.h_stop        = 703,	\
+		.video_v_start = 22,	\
+		.video_v_stop  = 22+239, \
+		.vbi_v_start   = 10, /* FIXME */ \
+		.vbi_v_stop    = 21, /* FIXME */ \
+		.src_timing    = 1
+
 static struct saa7134_tvnorm tvnorms[] = {
 	{
-		.name          = "PAL",
+		.name          = "PAL", /* autodetect */
 		.id            = V4L2_STD_PAL,
+		NORM_625_50,
+
+		.sync_control  = 0x18,
+		.luma_control  = 0x40,
+		.chroma_ctrl1  = 0x81,
+		.chroma_gain   = 0x2a,
+		.chroma_ctrl2  = 0x06,
+		.vgate_misc    = 0x1c,
+
+	},{
+		.name          = "PAL-BG",
+		.id            = V4L2_STD_PAL_BG,
+		NORM_625_50,
+
+		.sync_control  = 0x18,
+		.luma_control  = 0x40,
+		.chroma_ctrl1  = 0x81,
+		.chroma_gain   = 0x2a,
+		.chroma_ctrl2  = 0x06,
+		.vgate_misc    = 0x1c,
+
+	},{
+		.name          = "PAL-I",
+		.id            = V4L2_STD_PAL_I,
+		NORM_625_50,
+
+		.sync_control  = 0x18,
+		.luma_control  = 0x40,
+		.chroma_ctrl1  = 0x81,
+		.chroma_gain   = 0x2a,
+		.chroma_ctrl2  = 0x06,
+		.vgate_misc    = 0x1c,
+
+	},{
+		.name          = "PAL-DK",
+		.id            = V4L2_STD_PAL_DK,
+		NORM_625_50,
 
 		.sync_control  = 0x18,
 		.luma_control  = 0x40,
@@ -160,16 +217,10 @@
 		.chroma_ctrl2  = 0x06,
 		.vgate_misc    = 0x1c,
 
-		.h_start       = 0,
-		.h_stop        = 719,
-		.video_v_start = 24,
-		.video_v_stop  = 311,
-		.vbi_v_start   = 7,
-		.vbi_v_stop    = 22,
-		.src_timing    = 4,
 	},{
 		.name          = "NTSC",
 		.id            = V4L2_STD_NTSC,
+		NORM_525_60,
 
 		.sync_control  = 0x59,
 		.luma_control  = 0x40,
@@ -178,16 +229,10 @@
 		.chroma_ctrl2  = 0x0e,
 		.vgate_misc    = 0x18,
 
-		.h_start       = 0,
-		.h_stop        = 719,
-		.video_v_start = 22,
-		.video_v_stop  = 22+240,
-		.vbi_v_start   = 10, /* FIXME */
-		.vbi_v_stop    = 21, /* FIXME */
-		.src_timing    = 1,
 	},{
 		.name          = "SECAM",
 		.id            = V4L2_STD_SECAM,
+		NORM_625_50,
 
 		.sync_control  = 0x18, /* old: 0x58, */
 		.luma_control  = 0x1b,
@@ -196,16 +241,10 @@
 		.chroma_ctrl2  = 0x00,
 		.vgate_misc    = 0x1c,
 
-		.h_start       = 0,
-		.h_stop        = 719,
-		.video_v_start = 24,
-		.video_v_stop  = 311,
-		.vbi_v_start   = 7,
-		.vbi_v_stop    = 22,
-		.src_timing    = 4,
 	},{
 		.name          = "PAL-M",
 		.id            = V4L2_STD_PAL_M,
+		NORM_525_60,
 
 		.sync_control  = 0x59,
 		.luma_control  = 0x40,
@@ -214,16 +253,10 @@
 		.chroma_ctrl2  = 0x0e,
 		.vgate_misc    = 0x18,
 
-		.h_start       = 0,
-		.h_stop        = 719,
-		.video_v_start = 22,
-		.video_v_stop  = 22+240,
-		.vbi_v_start   = 10, /* FIXME */
-		.vbi_v_stop    = 21, /* FIXME */
-		.src_timing    = 1,
 	},{
 		.name          = "PAL-Nc",
 		.id            = V4L2_STD_PAL_Nc,
+		NORM_625_50,
 
 		.sync_control  = 0x18,
 		.luma_control  = 0x40,
@@ -232,35 +265,6 @@
 		.chroma_ctrl2  = 0x06,
 		.vgate_misc    = 0x1c,
 
-		.h_start       = 0,
-		.h_stop        = 719,
-		.video_v_start = 24,
-		.video_v_stop  = 311,
-		.vbi_v_start   = 7,
-		.vbi_v_stop    = 22,
-		.src_timing    = 4,
-#if 0
-	},{
-		.name          = "AUTO",
-		.id            = V4L2_STD_PAL|V4L2_STD_NTSC|V4L2_STD_SECAM,
-		.width         = 768,
-		.height        = 576,
-
-		.sync_control  = 0x98,
-		.luma_control  = 0x40,
-		.chroma_ctrl1  = 0x8b,
-		.chroma_gain   = 0x00,
-		.chroma_ctrl2  = 0x00,
-		.vgate_misc    = 0x18,
-
-		.h_start       = 0,
-		.h_stop        = 719,
-		.video_v_start = 24,
-		.video_v_stop  = 311,
-		.vbi_v_start   = 7,
-		.vbi_v_stop    = 22,
-		.src_timing    = 4,
-#endif
 	}
 };
 #define TVNORMS ARRAY_SIZE(tvnorms)
@@ -429,7 +433,6 @@
 
 static void set_tvnorm(struct saa7134_dev *dev, struct saa7134_tvnorm *norm)
 {
-	struct video_channel c;
 	int luma_control,sync_control,mux;
 
 	dprintk("set tv norm = %s\n",norm->name);
@@ -489,15 +492,22 @@
 	saa_writeb(SAA7134_RAW_DATA_GAIN,         0x40);
 	saa_writeb(SAA7134_RAW_DATA_OFFSET,       0x80);
 
-	/* pass down info to the i2c chips (v4l1) */
-	memset(&c,0,sizeof(c));
-	c.channel = dev->ctl_input;
-	c.norm = VIDEO_MODE_PAL;
-	if (norm->id & V4L2_STD_NTSC)
-		c.norm = VIDEO_MODE_NTSC;
-	if (norm->id & V4L2_STD_SECAM)
-		c.norm = VIDEO_MODE_SECAM;
-	saa7134_i2c_call_clients(dev,VIDIOCSCHAN,&c);
+#ifdef V4L2_I2C_CLIENTS
+	saa7134_i2c_call_clients(dev,VIDIOC_S_STD,&norm->id);
+#else
+	{
+		/* pass down info to the i2c chips (v4l1) */
+		struct video_channel c;
+		memset(&c,0,sizeof(c));
+		c.channel = dev->ctl_input;
+		c.norm = VIDEO_MODE_PAL;
+		if (norm->id & V4L2_STD_NTSC)
+			c.norm = VIDEO_MODE_NTSC;
+		if (norm->id & V4L2_STD_SECAM)
+			c.norm = VIDEO_MODE_SECAM;
+		saa7134_i2c_call_clients(dev,VIDIOCSCHAN,&c);
+	}
+#endif
 }
 
 static void video_mux(struct saa7134_dev *dev, int input)
@@ -593,11 +603,11 @@
 	saa_writeb(SAA7134_VIDEO_V_STOP1(task),  v_stop  &  0xff);
 	saa_writeb(SAA7134_VIDEO_V_STOP2(task),  v_stop  >> 8);
 
-	prescale = dev->crop_defrect.width / width;
+	prescale = dev->crop_current.width / width;
 	if (0 == prescale)
 		prescale = 1;
-	xscale = 1024 * dev->crop_defrect.width / prescale / width;
-	yscale = 512 * div * dev->crop_defrect.height / height;
+	xscale = 1024 * dev->crop_current.width / prescale / width;
+	yscale = 512 * div * dev->crop_current.height / height;
        	dprintk("prescale=%d xscale=%d yscale=%d\n",prescale,xscale,yscale);
 	set_h_prescale(dev,task,prescale);
 	saa_writeb(SAA7134_H_SCALE_INC1(task),      xscale &  0xff);
@@ -909,10 +919,12 @@
 	/* sanity checks */
 	if (NULL == fh->fmt)
 		return -EINVAL;
-	if (fh->width  < 48 ||
-	    fh->height < 32 ||
-	    fh->width  > dev->crop_current.width ||
-	    fh->height > dev->crop_current.height)
+	if (fh->width    < 48 ||
+	    fh->height   < 32 ||
+	    fh->width/4  > dev->crop_current.width  ||
+	    fh->height/4 > dev->crop_current.height ||
+	    fh->width    > dev->crop_bounds.width  ||
+	    fh->height   > dev->crop_bounds.height)
 		return -EINVAL;
 	size = (fh->width * fh->height * fh->fmt->depth) >> 3;
 	if (0 != buf->vb.baddr  &&  buf->vb.bsize < size)
@@ -1192,7 +1204,7 @@
 	fh->radio    = radio;
 	fh->type     = type;
 	fh->fmt      = format_by_fourcc(V4L2_PIX_FMT_BGR24);
-	fh->width    = 768;
+	fh->width    = 720;
 	fh->height   = 576;
 #ifdef VIDIOC_G_PRIORITY
 	v4l2_prio_open(&dev->prio,&fh->prio);
@@ -1409,8 +1421,8 @@
 			return -EINVAL;
 
 		field = f->fmt.pix.field;
-		maxw  = dev->crop_current.width;
-		maxh  = dev->crop_current.height;
+		maxw  = min(dev->crop_current.width*4,  dev->crop_bounds.width);
+		maxh  = min(dev->crop_current.height*4, dev->crop_bounds.height);
 		
 		if (V4L2_FIELD_ANY == field) {
 			field = (f->fmt.pix.height > maxh/2)
@@ -1670,10 +1682,14 @@
 		v4l2_std_id *id = arg;
 		unsigned int i;
 
-		for(i = 0; i < TVNORMS; i++)
-			if (*id & tvnorms[i].id)
+		for (i = 0; i < TVNORMS; i++)
+			if (*id == tvnorms[i].id)
 				break;
 		if (i == TVNORMS)
+			for (i = 0; i < TVNORMS; i++)
+				if (*id & tvnorms[i].id)
+					break;
+		if (i == TVNORMS)
 			return -EINVAL;
 
 		down(&dev->lock);
@@ -1685,6 +1701,7 @@
 			spin_unlock_irqrestore(&dev->slock,flags);
 		} else 
 			set_tvnorm(dev,&tvnorms[i]);
+		saa7134_tvaudio_do_scan(dev);
 		up(&dev->lock);
 		return 0;
 	}
@@ -1817,7 +1834,11 @@
 			return -EINVAL;
 		down(&dev->lock);
 		dev->ctl_freq = f->frequency;
+#ifdef V4L2_I2C_CLIENTS
+		saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,f);
+#else
 		saa7134_i2c_call_clients(dev,VIDIOCSFREQ,&dev->ctl_freq);
+#endif
 		saa7134_tvaudio_do_scan(dev);
 		up(&dev->lock);
 		return 0;
@@ -2064,7 +2085,6 @@
 	case VIDIOC_G_TUNER:
 	{
 		struct v4l2_tuner *t = arg;
-		struct video_tuner vt;
 
 		if (0 != t->index)
 			return -EINVAL;
@@ -2073,10 +2093,17 @@
 		strcpy(t->name, "Radio");
                 t->rangelow  = (int)(65*16);
                 t->rangehigh = (int)(108*16);
-		
-		memset(&vt,0,sizeof(vt));
-		saa7134_i2c_call_clients(dev,VIDIOCGTUNER,&vt);
-		t->signal = vt.signal;
+
+#ifdef V4L2_I2C_CLIENTS
+		saa7134_i2c_call_clients(dev,VIDIOC_G_TUNER,t);
+#else
+		{
+			struct video_tuner vt;
+			memset(&vt,0,sizeof(vt));
+			saa7134_i2c_call_clients(dev,VIDIOCGTUNER,&vt);
+			t->signal = vt.signal;
+		}
+#endif
 		return 0;
 	}
 	case VIDIOC_ENUMINPUT:
--- diff/drivers/media/video/saa7134/saa7134.h	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/media/video/saa7134/saa7134.h	2004-07-01 21:32:37.000000000 +0100
@@ -19,7 +19,7 @@
  */
 
 #include <linux/version.h>
-#define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,11)
+#define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,12)
 
 #include <linux/pci.h>
 #include <linux/i2c.h>
@@ -152,6 +152,10 @@
 #define SAA7134_BOARD_ECS_TVP3XP_4CB5  31
 #define SAA7134_BOARD_AVACSSMARTTV     32
 #define SAA7134_BOARD_AVERMEDIA_DVD_EZMAKER 33
+#define SAA7134_BOARD_NOVAC_PRIMETV7133 34
+#define SAA7134_BOARD_AVERMEDIA_305    35
+#define SAA7133_BOARD_UPMOST_PURPLE_TV 36
+#define SAA7134_BOARD_ITEMS_MTV005     37
 
 #define SAA7134_INPUT_MAX 8
 
--- diff/drivers/media/video/tda9840.c	2004-05-19 22:11:50.000000000 +0100
+++ source/drivers/media/video/tda9840.c	2004-07-01 21:32:37.000000000 +0100
@@ -268,13 +268,12 @@
         .command	= tda9840_command,
 };
 
-static int tda9840_init_module(void)
+static int __init tda9840_init_module(void)
 {
-        i2c_add_driver(&driver);
-        return 0;
+        return i2c_add_driver(&driver);
 }
 
-static void tda9840_cleanup_module(void)
+static void __exit tda9840_cleanup_module(void)
 {
         i2c_del_driver(&driver);
 }
@@ -285,4 +284,3 @@
 MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
 MODULE_DESCRIPTION("tda9840 driver");
 MODULE_LICENSE("GPL");
-
--- diff/drivers/media/video/tda9887.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/media/video/tda9887.c	2004-07-01 21:32:37.000000000 +0100
@@ -21,7 +21,7 @@
       Note: OP2 of tda988x must be set to 1, else MT2032 is disabled!
    - KNC One TV-Station RDS (saa7134)
 */
-    
+
 
 /* Addresses to scan */
 static unsigned short normal_i2c[] = {
@@ -33,22 +33,30 @@
 I2C_CLIENT_INSMOD;
 
 /* insmod options */
-static int debug =  0;
-static char *pal =  "b";
-static char *secam =  "l";
+static unsigned int debug = 0;
 MODULE_PARM(debug,"i");
-MODULE_PARM(pal,"s");
-MODULE_PARM(secam,"s");
 MODULE_LICENSE("GPL");
 
 /* ---------------------------------------------------------------------- */
 
+#define UNSET       (-1U)
+#define PREFIX      "tda9885/6/7: "
 #define dprintk     if (debug) printk
 
 struct tda9887 {
-	struct i2c_client client;
-	int radio,tvnorm;
-	int pinnacle_id;
+	struct i2c_client  client;
+	v4l2_std_id        std;
+	unsigned int       radio;
+	unsigned int       pinnacle_id;
+	unsigned int       using_v4l2;
+};
+
+struct tvnorm {
+	v4l2_std_id       std;
+	char              *name;
+	unsigned char     b;
+	unsigned char     c;
+	unsigned char     e;
 };
 
 static struct i2c_driver driver;
@@ -60,7 +68,7 @@
 // TDA defines
 //
 
-//// first reg
+//// first reg (b)
 #define cVideoTrapBypassOFF     0x00    // bit b0
 #define cVideoTrapBypassON      0x01    // bit b0
 
@@ -85,7 +93,7 @@
 #define cOutputPort2Inactive    0x80    // bit b7
 
 
-//// second reg
+//// second reg (c)
 #define cDeemphasisOFF          0x00    // bit c5
 #define cDeemphasisON           0x20    // bit c5
 
@@ -96,7 +104,7 @@
 #define cAudioGain6             0x80    // bit c7
 
 
-//// third reg
+//// third reg (e)
 #define cAudioIF_4_5             0x00    // bit e0:1
 #define cAudioIF_5_5             0x01    // bit e0:1
 #define cAudioIF_6_0             0x02    // bit e0:1
@@ -122,126 +130,287 @@
 #define cAgcOutON                0x80    // bit e7
 #define cAgcOutOFF               0x00    // bit e7
 
-static int tda9887_miro(struct tda9887 *t)
+/* ---------------------------------------------------------------------- */
+
+static struct tvnorm tvnorms[] = {
+	{
+		.std   = V4L2_STD_PAL_BG,
+		.name  = "PAL-BG",
+		.b     = ( cNegativeFmTV  |
+			   cQSS           ),
+		.c     = ( cDeemphasisON  |
+			   cDeemphasis50  ),
+		.e     = ( cAudioIF_5_5   |
+			   cVideoIF_38_90 ),
+	},{
+		.std   = V4L2_STD_PAL_I,
+		.name  = "PAL-I",
+		.b     = ( cNegativeFmTV  |
+			   cQSS           ),
+		.c     = ( cDeemphasisON  |
+			   cDeemphasis50  ),
+		.e     = ( cAudioIF_6_0   |
+			   cVideoIF_38_90 ),
+	},{
+		.std   = V4L2_STD_PAL_DK,
+		.name  = "PAL-DK",
+		.b     = ( cNegativeFmTV  |
+			   cQSS           ),
+		.c     = ( cDeemphasisON  |
+			   cDeemphasis50  ),
+		.e     = ( cAudioIF_6_5   |
+			   cVideoIF_38_00 ),
+	},{
+		.std   = V4L2_STD_PAL_M | V4L2_STD_PAL_N,
+		.name  = "PAL-M/N",
+		.b     = ( cNegativeFmTV  |
+			   cQSS           ),
+		.c     = ( cDeemphasisON  |
+			   cDeemphasis75  ),
+		.e     = ( cAudioIF_4_5   |
+			   cVideoIF_45_75 ),
+	},{
+		.std   = V4L2_STD_SECAM_L,
+		.name  = "SECAM-L",
+		.b     = ( cPositiveAmTV  |
+			   cQSS           ),
+		.e     = ( cAudioIF_6_5   |
+			   cVideoIF_38_90 ),
+	},{
+		.std   = V4L2_STD_SECAM_DK,
+		.name  = "SECAM-DK",
+		.b     = ( cNegativeFmTV  |
+			   cQSS           ),
+		.c     = ( cDeemphasisON  |
+			   cDeemphasis50  ),
+		.e     = ( cAudioIF_6_5   |
+			   cVideoIF_38_00 ),
+	},{
+		.std   = V4L2_STD_NTSC_M,
+		.name  = "NTSC-M",
+		.b     = ( cNegativeFmTV  |
+			   cQSS           ),
+		.c     = ( cDeemphasisON  |
+			   cDeemphasis50  ),
+		.e     = ( cGating_36     |
+			   cAudioIF_4_5   |
+			   cVideoIF_45_75 ),
+	},{
+		.std   = V4L2_STD_NTSC_M_JP,
+		.name  = "NTSC-JP",
+		.b     = ( cNegativeFmTV  |
+			   cQSS           ),
+		.c     = ( cDeemphasisON  |
+			   cDeemphasis50  ),
+		.e     = ( cGating_36     |
+			   cAudioIF_4_5   |
+			   cVideoIF_58_75 ),
+	}
+};
+
+static struct tvnorm radio = {
+	.name = "radio",
+	.b    = ( cFmRadio       |
+		  cQSS           ),
+	.c    = ( cDeemphasisON  |
+		  cDeemphasis50  ),
+	.e    = ( cAudioIF_5_5   |
+		  cRadioIF_38_90 ),
+};
+
+/* ---------------------------------------------------------------------- */
+
+static void dump_read_message(unsigned char *buf)
 {
-	int rc;
-	u8   bData[4]     = { 0 };
-	u8   bVideoIF     = 0;
-	u8   bAudioIF     = 0;
-	u8   bDeEmphasis  = 0;
-	u8   bDeEmphVal   = 0;
-	u8   bModulation  = 0;
-	u8   bCarrierMode = 0;
-	u8   bOutPort1    = cOutputPort1Inactive;
-#if 0
-	u8   bOutPort2    = cOutputPort2Inactive & mbTADState; // store i2c tuner state
-#else
-	u8   bOutPort2    = cOutputPort2Inactive;
-#endif
-	u8   bVideoTrap   = cVideoTrapBypassOFF;
-#if 1
-	u8   bTopAdjust   = 0x0e /* -2dB */;
-#else
-	u8   bTopAdjust   = 0;
-#endif
+	static char *afc[16] = {
+		"- 12.5 kHz",
+		"- 37.5 kHz",
+		"- 62.5 kHz",
+		"- 87.5 kHz",
+		"-112.5 kHz",
+		"-137.5 kHz",
+		"-162.5 kHz",
+		"-187.5 kHz [min]",
+		"+187.5 kHz [max]",
+		"+162.5 kHz",
+		"+137.5 kHz",
+		"+112.5 kHz",
+		"+ 87.5 kHz",
+		"+ 62.5 kHz",
+		"+ 37.5 kHz",
+		"+ 12.5 kHz",
+	};
+	printk(PREFIX "read: 0x%2x\n", buf[0]);
+	printk("  after power on : %s\n", (buf[0] & 0x01) ? "yes" : "no");
+	printk("  afc            : %s\n", afc[(buf[0] >> 1) & 0x0f]);
+	printk("  afc window     : %s\n", (buf[0] & 0x40) ? "in" : "out");
+	printk("  vfi level      : %s\n", (buf[0] & 0x80) ? "high" : "low");
+}
 
-#if 0
-	if (mParams.fVideoTrap)
-		bVideoTrap   = cVideoTrapBypassON;
-#endif
+static void dump_write_message(unsigned char *buf)
+{
+	static char *sound[4] = {
+		"AM/TV",
+		"FM/radio",
+		"FM/TV",
+		"FM/radio"
+	};
+	static char *adjust[32] = {
+		"-16", "-15", "-14", "-13", "-12", "-11", "-10", "-9",
+		"-8",  "-7",  "-6",  "-5",  "-4",  "-3",  "-2",  "-1",
+		"0",   "+1",  "+2",  "+3",  "+4",  "+5",  "+6",  "+7",
+		"+8",  "+9",  "+10", "+11", "+12", "+13", "+14", "+15"
+	};
+	static char *deemph[4] = {
+		"no", "no", "75", "50"
+	};
+	static char *carrier[4] = {
+		"4.5 MHz",
+		"5.5 MHz",
+		"6.0 MHz",
+		"6.5 MHz / AM"
+	};
+	static char *vif[8] = {
+		"58.75 MHz",
+		"45.75 MHz",
+		"38.9 MHz",
+		"38.0 MHz",
+		"33.9 MHz",
+		"33.4 MHz",
+		"45.75 MHz + pin13",
+		"38.9 MHz + pin13",
+	};
+	static char *rif[4] = {
+		"44 MHz",
+		"52 MHz",
+		"52 MHz",
+		"44 MHz",
+	};
+
+	printk(PREFIX "write: byte B 0x%02x\n",buf[1]);
+	printk("  B0   video mode      : %s\n",
+	       (buf[1] & 0x01) ? "video trap" : "sound trap");
+	printk("  B1   auto mute fm    : %s\n",
+	       (buf[1] & 0x02) ? "yes" : "no");
+	printk("  B2   carrier mode    : %s\n",
+	       (buf[1] & 0x04) ? "QSS" : "Intercarrier");
+	printk("  B3-4 tv sound/radio  : %s\n",
+	       sound[(buf[1] & 0x18) >> 3]);
+	printk("  B5   force mute audio: %s\n",
+	       (buf[1] & 0x20) ? "yes" : "no");
+	printk("  B6   output port 1   : %s\n",
+	       (buf[1] & 0x40) ? "high" : "low");
+	printk("  B7   output port 2   : %s\n",
+	       (buf[1] & 0x80) ? "high" : "low");
+
+	printk(PREFIX "write: byte C 0x%02x\n",buf[2]);
+	printk("  C0-4 top adjustment  : %s dB\n", adjust[buf[2] & 0x1f]);
+	printk("  C5-6 de-emphasis     : %s\n", deemph[(buf[2] & 0x60) >> 5]);
+	printk("  C7   audio gain      : %s\n",
+	       (buf[2] & 0x80) ? "-6" : "0");
+
+	printk(PREFIX "write: byte E 0x%02x\n",buf[3]);
+	printk("  E0-1 sound carrier   : %s\n",
+	       carrier[(buf[3] & 0x03)]);
+	printk("  E6   l pll ganting   : %s\n",
+	       (buf[3] & 0x40) ? "36" : "13");
+
+	if (buf[1] & 0x08) {
+		/* radio */
+		printk("  E2-4 video if        : %s\n",
+		       rif[(buf[3] & 0x0c) >> 2]);
+		printk("  E7   vif agc output  : %s\n",
+		       (buf[3] & 0x80)
+		       ? ((buf[3] & 0x10) ? "fm-agc radio" : "sif-agc radio")
+		       : "fm radio carrier afc");
+	} else {
+		/* video */
+		printk("  E2-4 video if        : %s\n",
+		       vif[(buf[3] & 0x1c) >> 2]);
+		printk("  E5   tuner gain      : %s\n",
+		       (buf[3] & 0x80)
+		       ? ((buf[3] & 0x20) ? "external" : "normal")
+		       : ((buf[3] & 0x20) ? "minimum"  : "normal"));
+		printk("  E7   vif agc output  : %s\n",
+		       (buf[3] & 0x80)
+		       ? ((buf[3] & 0x20)
+			  ? "pin3 port, pin22 vif agc out"
+			  : "pin22 port, pin3 vif acg ext in")
+		       : "pin3+pin22 port");
+	}
+	printk("--\n");
+}
+
+/* ---------------------------------------------------------------------- */
+
+static int tda9887_set_tvnorm(struct tda9887 *t, char *buf)
+{
+	struct tvnorm *norm = NULL;
+	int i;
 
 	if (t->radio) {
-		bVideoTrap   = cVideoTrapBypassOFF;
-		bCarrierMode = cQSS;
-		bModulation  = cFmRadio;
-		bOutPort1    = cOutputPort1Inactive;
-		bDeEmphasis  = cDeemphasisON;
-		if (3 == t->pinnacle_id) {
-			/* ntsc */
-			bDeEmphVal   = cDeemphasis75;
-			bAudioIF     = cAudioIF_4_5;
-			bVideoIF     = cRadioIF_45_75;
-		} else {
-			/* pal */
-			bAudioIF     = cAudioIF_5_5;
-			bVideoIF     = cRadioIF_38_90;
-			bDeEmphVal   = cDeemphasis50;
+		norm = &radio;
+	} else {
+		for (i = 0; i < ARRAY_SIZE(tvnorms); i++) {
+			if (tvnorms[i].std & t->std) {
+				norm = tvnorms+i;
+				break;
+			}
 		}
+	}
+	if (NULL == norm) {
+		dprintk(PREFIX "Oops: no tvnorm entry found\n");
+		return -1;
+	}
+
+	dprintk(PREFIX "configure for: %s\n",norm->name);
+	buf[1] = norm->b;
+	buf[2] = norm->c;
+	buf[3] = norm->e;
+	return 0;
+}
+
+static unsigned int port1  = 1;
+static unsigned int port2  = 1;
+static unsigned int qss    = UNSET;
+static unsigned int adjust = 0x10;
+MODULE_PARM(port1,"i");
+MODULE_PARM(port2,"i");
+MODULE_PARM(qss,"i");
+MODULE_PARM(adjust,"i");
+
+static int tda9887_set_insmod(struct tda9887 *t, char *buf)
+{
+	if (port1)
+		buf[1] |= cOutputPort1Inactive;
+	if (port2)
+		buf[1] |= cOutputPort2Inactive;
+	if (UNSET != qss) {
+		if (qss)
+			buf[1] |= cQSS;
+		else
+			buf[1] &= ~cQSS;
+	}
+
+	if (adjust >= 0x00 && adjust < 0x20)
+		buf[2] |= adjust;
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
 
-	} else if (t->tvnorm == VIDEO_MODE_PAL) {
-		bDeEmphasis  = cDeemphasisON;
-		bDeEmphVal   = cDeemphasis50;
-		bModulation  = cNegativeFmTV;
-		bOutPort1    = cOutputPort1Inactive;
+static int tda9887_set_pinnacle(struct tda9887 *t, char *buf)
+{
+	unsigned int bCarrierMode = UNSET;
+
+	if (t->std & V4L2_STD_PAL) {
 		if ((1 == t->pinnacle_id) || (7 == t->pinnacle_id)) {
 			bCarrierMode = cIntercarrier;
 		} else {
-			// stereo boards
 			bCarrierMode = cQSS;
 		}
-		switch (pal[0]) {
-		case 'b':
-		case 'g':
-		case 'h':
-			bVideoIF     = cVideoIF_38_90;
-			bAudioIF     = cAudioIF_5_5;
-			break;
-		case 'd':
-			bVideoIF     = cVideoIF_38_00;
-			bAudioIF     = cAudioIF_6_5;
-			break;
-		case 'i':
-			bVideoIF     = cVideoIF_38_90;
-			bAudioIF     = cAudioIF_6_0;
-			break;
-		case 'm':
-		case 'n':
-			bVideoIF     = cVideoIF_45_75;
-			bAudioIF     = cAudioIF_4_5;
-			bDeEmphVal   = cDeemphasis75;
-			if ((5 == t->pinnacle_id) || (6 == t->pinnacle_id)) {
-				bCarrierMode = cIntercarrier;
-			} else {
-				bCarrierMode = cQSS;
-			}
-			break;
-		}
-
-	} else if (t->tvnorm == VIDEO_MODE_SECAM) {
-		bAudioIF     = cAudioIF_6_5;
-		bDeEmphasis  = cDeemphasisON;
-		bDeEmphVal   = cDeemphasis50;
-		bModulation  = cNegativeFmTV;
-		bCarrierMode = cQSS;
-		bOutPort1    = cOutputPort1Inactive;                
-		switch (secam[0]) {
-		case 'd':
-			bVideoIF     = cVideoIF_38_00;
-			break;
-		case 'k':
-			bVideoIF     = cVideoIF_38_90;
-			break;
-		case 'l':
-			bVideoIF     = cVideoIF_38_90;
-			bDeEmphasis  = cDeemphasisOFF;
-			bDeEmphVal   = cDeemphasis75;
-			bModulation  = cPositiveAmTV;
-			break;
-		case 'L' /* L1 */:
-			bVideoIF     = cVideoIF_33_90;
-			bDeEmphasis  = cDeemphasisOFF;
-			bDeEmphVal   = cDeemphasis75;
-			bModulation  = cPositiveAmTV;
-			break;
-		}
-
-	} else if (t->tvnorm == VIDEO_MODE_NTSC) {
-                bVideoIF     = cVideoIF_45_75;
-                bAudioIF     = cAudioIF_4_5;
-                bDeEmphasis  = cDeemphasisON;
-                bDeEmphVal   = cDeemphasis75;
-                bModulation  = cNegativeFmTV;                
-                bOutPort1    = cOutputPort1Inactive;
+	}
+	if (t->std & V4L2_STD_NTSC) {
                 if ((5 == t->pinnacle_id) || (6 == t->pinnacle_id)) {
 			bCarrierMode = cIntercarrier;
 		} else {
@@ -249,99 +418,102 @@
                 }
 	}
 
-	bData[1] = bVideoTrap        |  // B0: video trap bypass
-		cAutoMuteFmInactive  |  // B1: auto mute
-		bCarrierMode         |  // B2: InterCarrier for PAL else QSS 
-		bModulation          |  // B3 - B4: positive AM TV for SECAM only
-		cForcedMuteAudioOFF  |  // B5: forced Audio Mute (off)
-		bOutPort1            |  // B6: Out Port 1 
-		bOutPort2;              // B7: Out Port 2 
-	bData[2] = bTopAdjust |   // C0 - C4: Top Adjust 0 == -16dB  31 == 15dB
-		bDeEmphasis   |   // C5: De-emphasis on/off
-		bDeEmphVal    |   // C6: De-emphasis 50/75 microsec
-		cAudioGain0;      // C7: normal audio gain
-	bData[3] = bAudioIF      |  // E0 - E1: Sound IF
-		bVideoIF         |  // E2 - E4: Video IF
-		cTunerGainNormal |  // E5: Tuner gain (normal)
-		cGating_18       |  // E6: Gating (18%)
-		cAgcOutOFF;         // E7: VAGC  (off)
-	
-	dprintk("tda9885/6/7: 0x%02x 0x%02x 0x%02x [pinnacle_id=%d]\n",
-		bData[1],bData[2],bData[3],t->pinnacle_id);
-	if (4 != (rc = i2c_master_send(&t->client,bData,4)))
-		printk("tda9885/6/7: i2c i/o error: rc == %d (should be 4)\n",rc);
+	if (bCarrierMode != UNSET) {
+		buf[1] &= ~0x04;
+		buf[1] |= bCarrierMode;
+	}
 	return 0;
 }
 
 /* ---------------------------------------------------------------------- */
 
-#if 0
-/* just for reference: old knc-one saa7134 stuff */
-static unsigned char buf_pal_bg[]    = { 0x00, 0x16, 0x70, 0x49 };
-static unsigned char buf_pal_i[]     = { 0x00, 0x16, 0x70, 0x4a };
-static unsigned char buf_pal_dk[]    = { 0x00, 0x16, 0x70, 0x4b };
-static unsigned char buf_pal_l[]     = { 0x00, 0x06, 0x50, 0x4b };
-static unsigned char buf_fm_stereo[] = { 0x00, 0x0e, 0x0d, 0x77 };
-#endif
-
-static unsigned char buf_pal_bg[]    = { 0x00, 0x96, 0x70, 0x49 };
-static unsigned char buf_pal_i[]     = { 0x00, 0x96, 0x70, 0x4a };
-static unsigned char buf_pal_dk[]    = { 0x00, 0x96, 0x70, 0x4b };
-static unsigned char buf_pal_l[]     = { 0x00, 0x86, 0x50, 0x4b };
-static unsigned char buf_fm_stereo[] = { 0x00, 0x8e, 0x0d, 0x77 };
-static unsigned char buf_ntsc[]	     = { 0x00, 0x96, 0x70, 0x44 };
-static unsigned char buf_ntsc_jp[]   = { 0x00, 0x96, 0x70, 0x40 };
+static char *pal = "-";
+MODULE_PARM(pal,"s");
+static char *secam = "-";
+MODULE_PARM(secam,"s");
 
-static int tda9887_configure(struct tda9887 *t)
+static int tda9887_fixup_std(struct tda9887 *t)
 {
-	unsigned char *buf = NULL;
-	int rc;
-
-	if (t->radio) {
-		dprintk("tda9885/6/7: FM Radio mode\n");
-		buf = buf_fm_stereo;
-
-	} else if (t->tvnorm == VIDEO_MODE_PAL) {
-		dprintk("tda9885/6/7: PAL-%c mode\n",pal[0]);
+	/* get more precise norm info from insmod option */
+	if ((t->std & V4L2_STD_PAL) == V4L2_STD_PAL) {
 		switch (pal[0]) {
 		case 'b':
+		case 'B':
 		case 'g':
-			buf = buf_pal_bg;
+		case 'G':
+			dprintk(PREFIX "insmod fixup: PAL => PAL-BG\n");
+			t->std = V4L2_STD_PAL_BG;
 			break;
 		case 'i':
-			buf = buf_pal_i;
+		case 'I':
+			dprintk(PREFIX "insmod fixup: PAL => PAL-I\n");
+			t->std = V4L2_STD_PAL_I;
+			break;
+		case 'd':
+		case 'D':
+		case 'k':
+		case 'K':
+			dprintk(PREFIX "insmod fixup: PAL => PAL-DK\n");
+			t->std = V4L2_STD_PAL_DK;
 			break;
+		}
+	}
+	if ((t->std & V4L2_STD_SECAM) == V4L2_STD_SECAM) {
+		switch (secam[0]) {
 		case 'd':
+		case 'D':
 		case 'k':
-			buf = buf_pal_dk;
+		case 'K':
+			dprintk(PREFIX "insmod fixup: SECAM => SECAM-DK\n");
+			t->std = V4L2_STD_SECAM_DK;
 			break;
 		case 'l':
-			buf = buf_pal_l;
+		case 'L':
+			dprintk(PREFIX "insmod fixup: SECAM => SECAM-L\n");
+			t->std = V4L2_STD_SECAM_L;
 			break;
 		}
+	}
+	return 0;
+}
 
-	} else if (t->tvnorm == VIDEO_MODE_NTSC) {
-		dprintk("tda9885/6/7: NTSC mode\n");
-		buf = buf_ntsc;
+static int tda9887_status(struct tda9887 *t)
+{
+	unsigned char buf[1];
+	int rc;
 
-	} else if (t->tvnorm == VIDEO_MODE_SECAM) {
-		dprintk("tda9885/6/7: SECAM mode\n");
-                buf = buf_pal_l;
+	memset(buf,0,sizeof(buf));
+        if (1 != (rc = i2c_master_recv(&t->client,buf,1)))
+                printk(PREFIX "i2c i/o error: rc == %d (should be 1)\n",rc);
+	dump_read_message(buf);
+	return 0;
+}
 
-        } else if (t->tvnorm == 6 /* BTTV hack */) {
-		dprintk("tda9885/6/7: NTSC-Japan mode\n");
-                buf = buf_ntsc_jp;
-        }
+static int tda9887_configure(struct tda9887 *t)
+{
+	unsigned char buf[4];
+	int rc;
 
-	if (NULL == buf) {
-		printk("tda9885/6/7 unknown norm=%d\n",t->tvnorm);
-		return 0;
+	memset(buf,0,sizeof(buf));
+	tda9887_set_tvnorm(t,buf);
+	if (UNSET != t->pinnacle_id) {
+		tda9887_set_pinnacle(t,buf);
 	}
+	tda9887_set_insmod(t,buf);
 
-	dprintk("tda9885/6/7: 0x%02x 0x%02x 0x%02x\n",
+	dprintk(PREFIX "writing: b=0x%02x c=0x%02x e=0x%02x\n",
 		buf[1],buf[2],buf[3]);
+	if (debug > 1)
+		dump_write_message(buf);
+
         if (4 != (rc = i2c_master_send(&t->client,buf,4)))
-                printk("tda9885/6/7: i2c i/o error: rc == %d (should be 4)\n",rc);
+                printk(PREFIX "i2c i/o error: rc == %d (should be 4)\n",rc);
+
+	if (debug > 2) {
+		set_current_state(TASK_INTERRUPTIBLE);
+		schedule_timeout(HZ);
+		tda9887_status(t);
+	}
 	return 0;
 }
 
@@ -354,14 +526,14 @@
         client_template.adapter = adap;
         client_template.addr    = addr;
 
-        printk("tda9887: chip found @ 0x%x\n", addr<<1);
+        printk(PREFIX "chip found @ 0x%x\n", addr<<1);
 
         if (NULL == (t = kmalloc(sizeof(*t), GFP_KERNEL)))
                 return -ENOMEM;
 	memset(t,0,sizeof(*t));
-	t->client = client_template;
-	t->pinnacle_id = -1;
-	t->tvnorm=VIDEO_MODE_PAL;
+	t->client      = client_template;
+	t->std         = 0;;
+	t->pinnacle_id = UNSET;
         i2c_set_clientdata(&t->client, t);
         i2c_attach_client(&t->client);
         
@@ -394,6 +566,13 @@
 	return 0;
 }
 
+#define SWITCH_V4L2	if (!t->using_v4l2 && debug) \
+		          printk(PREFIX "switching to v4l2\n"); \
+	                  t->using_v4l2 = 1;
+#define CHECK_V4L2	if (t->using_v4l2) { if (debug) \
+			  printk(PREFIX "ignore v4l1 call\n"); \
+		          return 0; }
+
 static int
 tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
 {
@@ -404,10 +583,7 @@
 	/* --- configuration --- */
 	case AUDC_SET_RADIO:
 		t->radio = 1;
-		if (-1 != t->pinnacle_id)
-			tda9887_miro(t);
-		else
-			tda9887_configure(t);
+		tda9887_configure(t);
 		break;
 		
 	case AUDC_CONFIG_PINNACLE:
@@ -415,7 +591,7 @@
 		int *i = arg;
 
 		t->pinnacle_id = *i;
-		tda9887_miro(t);
+		tda9887_configure(t);
 		break;
 	}
 	/* --- v4l ioctls --- */
@@ -423,16 +599,52 @@
 	   kernel pointer here... */
 	case VIDIOCSCHAN:
 	{
+		static const v4l2_std_id map[] = {
+			[ VIDEO_MODE_PAL   ] = V4L2_STD_PAL,
+			[ VIDEO_MODE_NTSC  ] = V4L2_STD_NTSC_M,
+			[ VIDEO_MODE_SECAM ] = V4L2_STD_SECAM,
+			[ 4 /* bttv */     ] = V4L2_STD_PAL_M,
+			[ 5 /* bttv */     ] = V4L2_STD_PAL_N,
+			[ 6 /* bttv */     ] = V4L2_STD_NTSC_M_JP,
+		};
 		struct video_channel *vc = arg;
 
-		t->radio  = 0;
-		t->tvnorm = vc->norm;
-		if (-1 != t->pinnacle_id)
-			tda9887_miro(t);
-		else
-			tda9887_configure(t);
+		CHECK_V4L2;
+		t->radio = 0;
+		if (vc->norm < ARRAY_SIZE(map))
+			t->std = map[vc->norm];
+		tda9887_fixup_std(t);
+		tda9887_configure(t);
+		break;
+	}
+	case VIDIOC_S_STD:
+	{
+		v4l2_std_id *id = arg;
+
+		SWITCH_V4L2;
+		t->radio = 0;
+		t->std   = *id;
+		tda9887_fixup_std(t);
+		tda9887_configure(t);
 		break;
 	}
+	case VIDIOC_S_FREQUENCY:
+	{
+		struct v4l2_frequency *f = arg;
+
+		SWITCH_V4L2;
+		if (V4L2_TUNER_ANALOG_TV == f->type) {
+			if (t->radio == 0)
+				return 0;
+			t->radio = 0;
+		}
+		if (V4L2_TUNER_RADIO == f->type) {
+			if (t->radio == 1)
+				return 0;
+			t->radio = 1;
+		}
+		tda9887_configure(t);
+	}
 	default:
 		/* nothing */
 		break;
--- diff/drivers/media/video/tuner.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/media/video/tuner.c	2004-07-01 21:32:37.000000000 +0100
@@ -26,15 +26,17 @@
 static unsigned int debug =  0;
 static unsigned int type  =  UNSET;
 static unsigned int addr  =  0;
-static char *pal =  "b";
 static unsigned int tv_range[2]    = { 44, 958 };
 static unsigned int radio_range[2] = { 65, 108 };
+static unsigned int tv_antenna = 1;
+static unsigned int radio_antenna = 0;
 MODULE_PARM(debug,"i");
 MODULE_PARM(type,"i");
 MODULE_PARM(addr,"i");
 MODULE_PARM(tv_range,"2i");
 MODULE_PARM(radio_range,"2i");
-MODULE_PARM(pal,"s");
+MODULE_PARM(tv_antenna,"i");
+MODULE_PARM(radio_antenna,"i");
 
 #define optimize_vco 1
 
@@ -48,10 +50,10 @@
 struct tuner {
 	unsigned int type;            /* chip type */
 	unsigned int freq;            /* keep track of the current settings */
-	unsigned int std;
+	v4l2_std_id  std;
+	int          using_v4l2;
 	
 	unsigned int radio;
-	unsigned int mode;            /* current norm for multi-norm tuners */
 	unsigned int input;
 	
 	// only for MT2032
@@ -537,15 +539,16 @@
 	int if2,from,to;
 
 	// signal bandwidth and picture carrier
-	if (t->mode == VIDEO_MODE_NTSC) {
-		from=40750*1000;
-		to=46750*1000;
-		if2=45750*1000; 
+	if (t->std & V4L2_STD_525_60) {
+		// NTSC
+		from = 40750*1000;
+		to   = 46750*1000;
+		if2  = 45750*1000;
 	} else {
-		// Pal 
-		from=32900*1000;
-		to=39900*1000;
-		if2=38900*1000;
+		// PAL
+		from = 32900*1000;
+		to   = 39900*1000;
+		if2  = 38900*1000;
 	}
 
         mt2032_set_if_freq(c, freq*62500 /* freq*1000*1000/16 */,
@@ -619,6 +622,17 @@
         return(1);
 }
 
+static void mt2050_set_antenna(struct i2c_client *c, unsigned char antenna)
+{
+       unsigned char buf[2];
+       int ret;
+
+       buf[0] = 6;
+       buf[1] = antenna ? 0x11 : 0x10;
+       ret=i2c_master_send(c,buf,2);
+       dprintk("mt2050: enabled antenna connector %d\n", antenna);
+}
+
 static void mt2050_set_if_freq(struct i2c_client *c,unsigned int freq, unsigned int if2)
 {
 	unsigned int if1=1218*1000*1000;
@@ -683,13 +697,15 @@
 	struct tuner *t = i2c_get_clientdata(c);
 	unsigned int if2;
 	
-	if (t->mode == VIDEO_MODE_NTSC) {
-                if2=45750*1000;
+	if (t->std & V4L2_STD_525_60) {
+		// NTSC
+                if2 = 45750*1000;
         } else {
-                // Pal
-                if2=38900*1000;
+                // PAL
+                if2 = 38900*1000;
         }
-	mt2050_set_if_freq(c,freq*62500,if2);
+	mt2050_set_if_freq(c, freq*62500, if2);
+	mt2050_set_antenna(c, tv_antenna);
 }
 
 static void mt2050_set_radio_freq(struct i2c_client *c, unsigned int freq)
@@ -698,6 +714,7 @@
 	int if2 = t->radio_if2;
 	
 	mt2050_set_if_freq(c, freq*62500, if2);
+	mt2050_set_antenna(c, radio_antenna);
 }
 
 static int mt2050_init(struct i2c_client *c)
@@ -731,8 +748,8 @@
         unsigned char buf[21];
 	int company_code;
 	
-        buf[0] = 0;
-	t->tv_freq = NULL;
+	memset(buf,0,sizeof(buf));
+	t->tv_freq    = NULL;
 	t->radio_freq = NULL;
 	name = "unknown";
 
@@ -751,6 +768,9 @@
 	company_code = buf[0x11] << 8 | buf[0x12];
         printk("tuner: microtune: companycode=%04x part=%02x rev=%02x\n",
 	       company_code,buf[0x13],buf[0x14]);
+
+#if 0
+	/* seems to cause more problems than it solves ... */
 	switch (company_code) {
 	case 0x30bf:
 	case 0x3cbf:
@@ -764,6 +784,7 @@
 		printk("tuner: microtune: unknown companycode\n");
 		return 0;
 	}
+#endif
 
 	if (buf[0x13] < ARRAY_SIZE(microtune_part) &&
 	    NULL != microtune_part[buf[0x13]])
@@ -811,54 +832,40 @@
 		/* 0x02 -> PAL BDGHI / SECAM L */
 		/* 0x04 -> ??? PAL others / SECAM others ??? */
 		config &= ~0x02;
-		if (t->mode == VIDEO_MODE_SECAM)
+		if (t->std & V4L2_STD_SECAM)
 			config |= 0x02;
 		break;
 
 	case TUNER_TEMIC_4046FM5:
 		config &= ~0x0f;
-		switch (pal[0]) {
-		case 'i':
-		case 'I':
+
+		if (t->std & V4L2_STD_PAL_BG) {
+			config |= TEMIC_SET_PAL_BG;
+
+		} else if (t->std & V4L2_STD_PAL_I) {
 			config |= TEMIC_SET_PAL_I;
-			break;
-		case 'd':
-		case 'D':
+
+		} else if (t->std & V4L2_STD_PAL_DK) {
 			config |= TEMIC_SET_PAL_DK;
-			break;
-		case 'l':
-		case 'L':
+
+		} else if (t->std & V4L2_STD_SECAM_L) {
 			config |= TEMIC_SET_PAL_L;
-			break;
-		case 'b':
-		case 'B':
-		case 'g':
-		case 'G':
-		default:
-			config |= TEMIC_SET_PAL_BG;
-			break;
+
 		}
 		break;
 
 	case TUNER_PHILIPS_FQ1216ME:
 		config &= ~0x0f;
-		switch (pal[0]) {
-		case 'i':
-		case 'I':
+
+		if (t->std & (V4L2_STD_PAL_BG|V4L2_STD_PAL_DK)) {
+			config |= PHILIPS_SET_PAL_BGDK;
+
+		} else if (t->std & V4L2_STD_PAL_I) {
 			config |= PHILIPS_SET_PAL_I;
-			break;
-		case 'l':
-		case 'L':
+
+		} else if (t->std & V4L2_STD_SECAM_L) {
 			config |= PHILIPS_SET_PAL_L;
-			break;
-		case 'd':
-		case 'D':
-		case 'b':
-		case 'B':
-		case 'g':
-		case 'G':
-			config |= PHILIPS_SET_PAL_BGDK;
-			break;
+
 		}
 		break;
 
@@ -867,12 +874,9 @@
 		/* 0x01 -> ATSC antenna input 2 */
 		/* 0x02 -> NTSC antenna input 1 */
 		/* 0x03 -> NTSC antenna input 2 */
-		
 		config &= ~0x03;
-#ifdef VIDEO_MODE_ATSC
-		if (VIDEO_MODE_ATSC != t->mode)
+		if (t->std & V4L2_STD_ATSC)
 			config |= 2;
-#endif
 		/* FIXME: input */
 		break;
 	}
@@ -990,6 +994,22 @@
 	t->radio_freq(c,freq);
 }
 
+static void set_freq(struct i2c_client *c, unsigned long freq)
+{
+	struct tuner *t = i2c_get_clientdata(c);
+
+	if (t->radio) {
+		dprintk("tuner: radio freq set to %lu.%02lu\n",
+			freq/16,freq%16*100/16);
+		set_radio_freq(c,freq);
+	} else {
+		dprintk("tuner: tv freq set to %lu.%02lu\n",
+			freq/16,freq%16*100/16);
+		set_tv_freq(c, freq);
+	}
+	t->freq = freq;
+}
+
 static void set_type(struct i2c_client *c, unsigned int type, char *source)
 {
 	struct tuner *t = i2c_get_clientdata(c);
@@ -1019,6 +1039,38 @@
 	}
 }
 
+static char *pal = "-";
+MODULE_PARM(pal,"s");
+
+static int tuner_fixup_std(struct tuner *t)
+{
+	if ((t->std & V4L2_STD_PAL) == V4L2_STD_PAL) {
+		/* get more precise norm info from insmod option */
+		switch (pal[0]) {
+		case 'b':
+		case 'B':
+		case 'g':
+		case 'G':
+			dprintk("insmod fixup: PAL => PAL-BG\n");
+			t->std = V4L2_STD_PAL_BG;
+			break;
+		case 'i':
+		case 'I':
+			dprintk("insmod fixup: PAL => PAL-I\n");
+			t->std = V4L2_STD_PAL_I;
+			break;
+		case 'd':
+		case 'D':
+		case 'k':
+		case 'K':
+			dprintk("insmod fixup: PAL => PAL-DK\n");
+			t->std = V4L2_STD_PAL_DK;
+			break;
+		}
+	}
+	return 0;
+}
+
 /* ---------------------------------------------------------------------- */
 
 static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
@@ -1054,7 +1106,7 @@
 		set_type(client, type, "insmod option");
 		printk("tuner: The type=<n> insmod option will go away soon.\n");
 		printk("tuner: Please use the tuner=<n> option provided by\n");
-		printk("tuner: tv card core driver (bttv, saa7134, ...) instead.\n");
+		printk("tuner: tv aard core driver (bttv, saa7134, ...) instead.\n");
 	}
 	return 0;
 }
@@ -1094,6 +1146,13 @@
 	return 0;
 }
 
+#define SWITCH_V4L2	if (!t->using_v4l2 && debug) \
+		          printk("tuner: switching to v4l2\n"); \
+	                  t->using_v4l2 = 1;
+#define CHECK_V4L2	if (t->using_v4l2) { if (debug) \
+			  printk("tuner: ignore v4l1 call\n"); \
+		          return 0; }
+
 static int
 tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
 {
@@ -1130,10 +1189,21 @@
 	   kernel pointer here... */
 	case VIDIOCSCHAN:
 	{
+		static const v4l2_std_id map[] = {
+			[ VIDEO_MODE_PAL   ] = V4L2_STD_PAL,
+			[ VIDEO_MODE_NTSC  ] = V4L2_STD_NTSC_M,
+			[ VIDEO_MODE_SECAM ] = V4L2_STD_SECAM,
+			[ 4 /* bttv */     ] = V4L2_STD_PAL_M,
+			[ 5 /* bttv */     ] = V4L2_STD_PAL_N,
+			[ 6 /* bttv */     ] = V4L2_STD_NTSC_M_JP,
+		};
 		struct video_channel *vc = arg;
 
+		CHECK_V4L2;
 		t->radio = 0;
-		t->mode = vc->norm;
+		if (vc->norm < ARRAY_SIZE(map))
+			t->std = map[vc->norm];
+		tuner_fixup_std(t);
 		if (t->freq)
 			set_tv_freq(client,t->freq);
 		return 0;
@@ -1142,22 +1212,15 @@
 	{
 		unsigned long *v = arg;
 
-		if (t->radio) {
-			dprintk("tuner: radio freq set to %lu.%02lu\n",
-				(*v)/16,(*v)%16*100/16);
-			set_radio_freq(client,*v);
-		} else {
-			dprintk("tuner: tv freq set to %lu.%02lu\n",
-				(*v)/16,(*v)%16*100/16);
-			set_tv_freq(client,*v);
-		}
-		t->freq = *v;
+		CHECK_V4L2;
+		set_freq(client,*v);
 		return 0;
 	}
 	case VIDIOCGTUNER:
 	{
 		struct video_tuner *vt = arg;
 
+		CHECK_V4L2;
 		if (t->radio)
 			vt->signal = tuner_signal(client);
 		return 0;
@@ -1165,10 +1228,52 @@
 	case VIDIOCGAUDIO:
 	{
 		struct video_audio *va = arg;
+
+		CHECK_V4L2;
 		if (t->radio)
 			va->mode = (tuner_stereo(client) ? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO);
 		return 0;
 	}
+
+	case VIDIOC_S_STD:
+	{
+		v4l2_std_id *id = arg;
+
+		SWITCH_V4L2;
+		t->radio = 0;
+		t->std = *id;
+		tuner_fixup_std(t);
+		if (t->freq)
+			set_freq(client,t->freq);
+		break;
+	}
+	case VIDIOC_S_FREQUENCY:
+	{
+		struct v4l2_frequency *f = arg;
+
+		SWITCH_V4L2;
+		if (V4L2_TUNER_ANALOG_TV == f->type) {
+			t->radio = 0;
+		}
+		if (V4L2_TUNER_RADIO == f->type) {
+			if (!t->radio) {
+				set_tv_freq(client,400*16);
+				t->radio = 1;
+			}
+		}
+		t->freq  = f->frequency;
+		set_freq(client,t->freq);
+		break;
+	}
+	case VIDIOC_G_TUNER:
+	{
+		struct v4l2_tuner *tuner = arg;
+
+		SWITCH_V4L2;
+		if (t->radio)
+			tuner->signal = tuner_signal(client);
+		break;
+	}
 	default:
 		/* nothing */
 		break;
--- diff/drivers/media/video/video-buf.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/media/video/video-buf.c	2004-07-01 21:32:37.000000000 +0100
@@ -5,10 +5,10 @@
  * The functions expect the hardware being able to scatter gatter
  * (i.e. the buffers are not linear in physical memory, but fragmented
  * into PAGE_SIZE chunks).  They also assume the driver does not need
- * to touch the video data (thus it is probably not useful for USB as
- * data often must be uncompressed by the drivers).
+ * to touch the video data (thus it is probably not useful for USB 1.1
+ * as data often must be uncompressed by the drivers).
  * 
- * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>
+ * (c) 2001-2004 Gerd Knorr <kraxel@bytesex.org> [SUSE Labs]
  *
  * 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
@@ -28,6 +28,11 @@
 
 #include <media/video-buf.h>
 
+#define MAGIC_DMABUF 0x19721112
+#define MAGIC_BUFFER 0x20040302
+#define MAGIC_CHECK(is,should)	if (unlikely((is) != (should))) \
+	{ printk(KERN_ERR "magic mismatch: %x (expected %x)\n",is,should); BUG(); }
+
 static int debug = 0;
 
 MODULE_DESCRIPTION("helper module to manage video4linux pci dma buffers");
@@ -109,6 +114,12 @@
 
 /* --------------------------------------------------------------------- */
 
+void videobuf_dma_init(struct videobuf_dmabuf *dma)
+{
+	memset(dma,0,sizeof(*dma));
+	dma->magic = MAGIC_DMABUF;
+}
+
 int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
 			   unsigned long data, unsigned long size)
 {
@@ -178,8 +189,8 @@
 
 int videobuf_dma_pci_map(struct pci_dev *dev, struct videobuf_dmabuf *dma)
 {
-	if (0 == dma->nr_pages)
-		BUG();
+	MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
+	BUG_ON(0 == dma->nr_pages);
 	
 	if (dma->pages) {
 		dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages,
@@ -211,8 +222,8 @@
 
 int videobuf_dma_pci_sync(struct pci_dev *dev, struct videobuf_dmabuf *dma)
 {
-	if (!dma->sglen)
-		BUG();
+	MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
+	BUG_ON(!dma->sglen);
 
 	if (!dma->bus_addr)
 		pci_dma_sync_sg_for_cpu(dev,dma->sglist,dma->nr_pages,dma->direction);
@@ -221,6 +232,7 @@
 
 int videobuf_dma_pci_unmap(struct pci_dev *dev, struct videobuf_dmabuf *dma)
 {
+	MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
 	if (!dma->sglen)
 		return 0;
 
@@ -234,8 +246,8 @@
 
 int videobuf_dma_free(struct videobuf_dmabuf *dma)
 {
-	if (dma->sglen)
-		BUG();
+	MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
+	BUG_ON(dma->sglen);
 
 	if (dma->pages) {
 		int i;
@@ -264,7 +276,9 @@
 	vb = kmalloc(size,GFP_KERNEL);
 	if (NULL != vb) {
 		memset(vb,0,size);
+		videobuf_dma_init(&vb->dma);
 		init_waitqueue_head(&vb->done);
+		vb->magic     = MAGIC_BUFFER;
 	}
 	return vb;
 }
@@ -274,6 +288,7 @@
 	int retval = 0;
 	DECLARE_WAITQUEUE(wait, current);
 	
+	MAGIC_CHECK(vb->magic,MAGIC_BUFFER);
 	add_wait_queue(&vb->done, &wait);
 	while (vb->state == STATE_ACTIVE || vb->state == STATE_QUEUED) {
 		if (non_blocking) {
@@ -302,6 +317,7 @@
 	int err,pages;
 	dma_addr_t bus;
 
+	MAGIC_CHECK(vb->magic,MAGIC_BUFFER);
 	switch (vb->memory) {
 	case V4L2_MEMORY_MMAP:
 	case V4L2_MEMORY_USERPTR:
@@ -453,6 +469,8 @@
 videobuf_status(struct v4l2_buffer *b, struct videobuf_buffer *vb,
 		enum v4l2_buf_type type)
 {
+	MAGIC_CHECK(vb->magic,MAGIC_BUFFER);
+
 	b->index    = vb->i;
 	b->type     = type;
 
@@ -491,6 +509,11 @@
 		break;
 	}
 
+	if (vb->input != UNSET) {
+		b->flags |= V4L2_BUF_FLAG_INPUT;
+		b->input  = vb->input;
+	}
+
 	b->field     = vb->field;
 	b->timestamp = vb->ts;
 	b->bytesused = vb->size;
@@ -513,6 +536,11 @@
 	    req->memory != V4L2_MEMORY_OVERLAY)
 		return -EINVAL;
 
+	if (q->streaming)
+		return -EBUSY;
+	if (!list_empty(&q->stream))
+		return -EBUSY;
+
 	down(&q->lock);
 	count = req->count;
 	if (count > VIDEO_MAX_FRAME)
@@ -568,12 +596,21 @@
 	buf = q->bufs[b->index];
 	if (NULL == buf)
 		goto done;
+	MAGIC_CHECK(buf->magic,MAGIC_BUFFER);
 	if (buf->memory != b->memory)
 		goto done;
 	if (buf->state == STATE_QUEUED ||
 	    buf->state == STATE_ACTIVE)
 		goto done;
 
+	if (b->flags & V4L2_BUF_FLAG_INPUT) {
+		if (b->input >= q->inputs)
+			goto done;
+		buf->input = b->input;
+	} else {
+		buf->input = UNSET;
+	}
+
 	switch (b->memory) {
 	case V4L2_MEMORY_MMAP:
 		if (0 == buf->baddr)
@@ -582,6 +619,8 @@
 	case V4L2_MEMORY_USERPTR:
 		if (b->length < buf->bsize)
 			goto done;
+		if (STATE_NEEDS_INIT != buf->state && buf->baddr != b->m.userptr)
+			q->ops->buf_release(file,buf);
 		buf->baddr = b->m.userptr;
 		break;
 	case V4L2_MEMORY_OVERLAY:
@@ -1075,6 +1114,7 @@
 	for (i = 0; i < bcount; i++) {
 		q->bufs[i] = videobuf_alloc(q->msize);
 		q->bufs[i]->i      = i;
+		q->bufs[i]->input  = UNSET;
 		q->bufs[i]->memory = memory;
 		q->bufs[i]->bsize  = bsize;
 		switch (memory) {
@@ -1085,7 +1125,7 @@
 		case V4L2_MEMORY_OVERLAY:
 			/* nothing */
 			break;
-		};
+		}
 	}
 	dprintk(1,"mmap setup: %d buffers, %d bytes each\n",
 		bcount,bsize);
@@ -1192,6 +1232,7 @@
 
 EXPORT_SYMBOL_GPL(videobuf_vmalloc_to_sg);
 
+EXPORT_SYMBOL_GPL(videobuf_dma_init);
 EXPORT_SYMBOL_GPL(videobuf_dma_init_user);
 EXPORT_SYMBOL_GPL(videobuf_dma_init_kernel);
 EXPORT_SYMBOL_GPL(videobuf_dma_init_overlay);
--- diff/drivers/message/fusion/isense.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/message/fusion/isense.c	2004-07-01 21:32:37.000000000 +0100
@@ -56,14 +56,6 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <asm/io.h>
-#if defined (__sparc__)
-#include <linux/timer.h>
-#endif
-
-/* Hmmm, avoid undefined spinlock_t on lk-2.2.14-5.0 */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
-#include <asm/spinlock.h>
-#endif
 
 #define MODULEAUTHOR "Steven J. Ralston"
 #define COPYRIGHT "Copyright (c) 2001-2004 " MODULEAUTHOR
--- diff/drivers/message/fusion/linux_compat.h	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/message/fusion/linux_compat.h	2004-07-01 21:32:37.000000000 +0100
@@ -2,196 +2,17 @@
 
 #ifndef FUSION_LINUX_COMPAT_H
 #define FUSION_LINUX_COMPAT_H
-/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 
 #include <linux/version.h>
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
+#include <scsi/scsi_device.h>
 
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
-#ifndef rwlock_init
-#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
-#endif
-
-#define SET_NICE(current,x) do {(current)->nice = (x);} while (0)
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
-#	if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)
-		typedef unsigned int dma_addr_t;
-#	endif
-#else
-#	if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,42)
-		typedef unsigned int dma_addr_t;
-#	endif
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)
-/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
-/* This block snipped from lk-2.2.18/include/linux/init.h { */
-/*
- * Used for initialization calls..
- */
-typedef int (*initcall_t)(void);
-typedef void (*exitcall_t)(void);
-
-#define __init_call	__attribute__ ((unused,__section__ (".initcall.init")))
-#define __exit_call	__attribute__ ((unused,__section__ (".exitcall.exit")))
-
-extern initcall_t __initcall_start, __initcall_end;
-
-#define __initcall(fn)								\
-	static initcall_t __initcall_##fn __init_call = fn
-#define __exitcall(fn)								\
-	static exitcall_t __exitcall_##fn __exit_call = fn
-
-#ifdef MODULE
-/* These macros create a dummy inline: gcc 2.9x does not count alias
- as usage, hence the `unused function' warning when __init functions
- are declared static. We use the dummy __*_module_inline functions
- both to kill the warning and check the type of the init/cleanup
- function. */
-typedef int (*__init_module_func_t)(void);
-typedef void (*__cleanup_module_func_t)(void);
-#define module_init(x) \
-	int init_module(void) __attribute__((alias(#x))); \
-	static inline __init_module_func_t __init_module_inline(void) \
-	{ return x; }
-#define module_exit(x) \
-	void cleanup_module(void) __attribute__((alias(#x))); \
-	static inline __cleanup_module_func_t __cleanup_module_inline(void) \
-	{ return x; }
-
-#else
-#define module_init(x)	__initcall(x);
-#define module_exit(x)	__exitcall(x);
-#endif
-/* } block snipped from lk-2.2.18/include/linux/init.h */
-
-/* This block snipped from lk-2.2.18/include/linux/sched.h { */
-/*
- * Used prior to schedule_timeout calls..
- */
-#define __set_current_state(state_value)	do { current->state = state_value; } while (0)
-#ifdef CONFIG_SMP
-#define set_current_state(state_value)		do { __set_current_state(state_value); mb(); } while (0)
-#else
-#define set_current_state(state_value)		__set_current_state(state_value)
-#endif
-/* } block snipped from lk-2.2.18/include/linux/sched.h */
-
-/* procfs compat stuff... */
-#define proc_mkdir(x,y)			create_proc_entry(x, S_IFDIR, y)
-
-/* MUTEX compat stuff... */
-#define DECLARE_MUTEX(name)		struct semaphore name=MUTEX
-#define DECLARE_MUTEX_LOCKED(name)	struct semaphore name=MUTEX_LOCKED
-#define init_MUTEX(x)			*(x)=MUTEX
-#define init_MUTEX_LOCKED(x)		*(x)=MUTEX_LOCKED
-
-/* Wait queues. */
-#define DECLARE_WAIT_QUEUE_HEAD(name)	\
-	struct wait_queue * (name) = NULL
-#define DECLARE_WAITQUEUE(name, task)	\
-	struct wait_queue (name) = { (task), NULL }
-
-#if defined(__sparc__) && defined(__sparc_v9__)
-/* The sparc64 ioremap implementation is wrong in 2.2.x,
- * but fixing it would break all of the drivers which
- * workaround it.  Fixed in 2.3.x onward. -DaveM
- */
-#define ARCH_IOREMAP(base)	((unsigned long) (base))
-#else
-#define ARCH_IOREMAP(base)	ioremap(base)
-#endif
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-#else		/* LINUX_VERSION_CODE must be >= KERNEL_VERSION(2,2,18) */
-
-/* No ioremap bugs in >2.3.x kernels. */
-#define ARCH_IOREMAP(base)	ioremap(base)
-
-/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-#endif		/* LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18) */
-
-
-/*
- * Inclined to use:
- *   #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,10)
- * here, but MODULE_LICENSE defined in 2.4.9-6 and 2.4.9-13
- * breaks the rule:-(
- */
-#ifndef MODULE_LICENSE
-#define MODULE_LICENSE(license)
-#endif
-
-
-/* PCI/driver subsystem { */
-#define PCI_BASEADDR_FLAGS(idx)         resource[idx].flags
-#define PCI_BASEADDR_START(idx)         resource[idx].start
-#define PCI_BASEADDR_SIZE(dev,idx)      (dev)->resource[idx].end - (dev)->resource[idx].start + 1
-
-/* Compatability for the 2.3.x PCI DMA API. */
-#ifndef PCI_DMA_BIDIRECTIONAL
-/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
-#define PCI_DMA_BIDIRECTIONAL	0
-#define PCI_DMA_TODEVICE	1
-#define PCI_DMA_FROMDEVICE	2
-#define PCI_DMA_NONE		3
-
-#ifdef __KERNEL__
-#include <asm/page.h>
-/* Pure 2^n version of get_order */
-static __inline__ int __get_order(unsigned long size)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,6))
+static int inline scsi_device_online(struct scsi_device *sdev)
 {
-	int order;
-
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+	return sdev->online;
 }
 #endif
 
-#define pci_alloc_consistent(hwdev, size, dma_handle) \
-({	void *__ret = (void *)__get_free_pages(GFP_ATOMIC, __get_order(size)); \
-	if (__ret != NULL) { \
-		memset(__ret, 0, size); \
-		*(dma_handle) = virt_to_bus(__ret); \
-	} \
-	__ret; \
-})
-
-#define pci_free_consistent(hwdev, size, vaddr, dma_handle) \
-	free_pages((unsigned long)vaddr, __get_order(size))
-
-#define pci_map_single(hwdev, ptr, size, direction) \
-	virt_to_bus(ptr);
-
-#define pci_unmap_single(hwdev, dma_addr, size, direction) \
-	do { /* Nothing to do */ } while (0)
-
-#define pci_map_sg(hwdev, sg, nents, direction)	(nents)
-#define pci_unmap_sg(hwdev, sg, nents, direction) \
-	do { /* Nothing to do */ } while(0)
-
-#define sg_dma_address(sg)	(virt_to_bus((sg)->address))
-#define sg_dma_len(sg)		((sg)->length)
-
-/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-#endif /* PCI_DMA_BIDIRECTIONAL */
-
-
-#define mpt_work_struct work_struct
-#define MPT_INIT_WORK(_task, _func, _data) INIT_WORK(_task, _func, _data)
-#define mpt_sync_irq(_irq) synchronize_irq(_irq)
 
 /*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 #endif /* _LINUX_COMPAT_H */
-
--- diff/drivers/message/fusion/lsi/mpi_type.h	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/message/fusion/lsi/mpi_type.h	2004-07-01 21:32:37.000000000 +0100
@@ -47,18 +47,13 @@
 typedef unsigned short  U16;
 
 
-#if defined(unix) || defined(__arm) || defined(ALPHA)
-
-    typedef signed   int   S32;
-    typedef unsigned int   U32;
-
-#else
-
-    typedef signed   long  S32;
-    typedef unsigned long  U32;
-
-#endif
+typedef int32_t   S32;
+typedef u_int32_t U32;
 
+/*
+ *  The only way crap below could work on big-endian boxen would be if it
+ *  wasn't used at all.
+ */
 
 typedef struct _S64
 {
--- diff/drivers/message/fusion/mptbase.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/message/fusion/mptbase.c	2004-07-01 21:32:37.000000000 +0100
@@ -150,9 +150,8 @@
 /*
  *  Private data...
  */
-					/* Adapter lookup table */
-       MPT_ADAPTER		*mpt_adapters[MPT_MAX_ADAPTERS];
-static MPT_ADAPTER_TRACKER	 MptAdapters;
+					/* Adapter link list */
+LIST_HEAD(ioc_list);
 					/* Callback lookup table */
 static MPT_CALLBACK		 MptCallbacks[MPT_MAX_PROTOCOL_DRIVERS];
 					/* Protocol driver class lookup table */
@@ -210,8 +209,6 @@
 static int	SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp);
 
 #ifdef CONFIG_PROC_FS
-static int	procmpt_create(void);
-static int	procmpt_destroy(void);
 static int	procmpt_summary_read(char *buf, char **start, off_t offset,
 				int request, int *eof, void *data);
 static int	procmpt_version_read(char *buf, char **start, off_t offset,
@@ -234,31 +231,6 @@
 static int  __init    fusion_init  (void);
 static void __exit    fusion_exit  (void);
 
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- *  more Private data...
- */
-#ifdef CONFIG_PROC_FS
-struct _mpt_proc_list {
-	const char	*name;
-	int		(*f)(char *, char **, off_t, int, int *, void *);
-} mpt_proc_list[] = {
-	{ "summary", procmpt_summary_read},
-	{ "version", procmpt_version_read},
-};
-#define MPT_PROC_ENTRIES (sizeof(mpt_proc_list)/sizeof(mpt_proc_list[0]))
-
-struct _mpt_ioc_proc_list {
-	const char	*name;
-	int		(*f)(char *, char **, off_t, int, int *, void *);
-} mpt_ioc_proc_list[] = {
-	{ "info", procmpt_iocinfo_read},
-	{ "summary", procmpt_summary_read},
-};
-#define MPT_IOC_PROC_ENTRIES (sizeof(mpt_ioc_proc_list)/sizeof(mpt_ioc_proc_list[0]))
-
-#endif
-
 /****************************************************************************
  * Supported hardware
  */
@@ -282,7 +254,8 @@
 };
 MODULE_DEVICE_TABLE(pci, mptbase_pci_table);
 
-#define CHIPREG_READ32(addr) 		readl(addr)
+#define CHIPREG_READ32(addr) 		readl_relaxed(addr)
+#define CHIPREG_READ32_dmasync(addr)	readl(addr)
 #define CHIPREG_WRITE32(addr,val) 	writel(val, addr)
 #define CHIPREG_PIO_WRITE32(addr,val)	outl(val, (unsigned long)addr)
 #define CHIPREG_PIO_READ32(addr) 	inl((unsigned long)addr)
@@ -320,23 +293,6 @@
 
 	ioc = bus_id;
 
-#ifdef MPT_DEBUG_IRQ
-	/*
-	 * Verify ioc pointer is ok
-	 */
-	{
-		MPT_ADAPTER	*iocCmp;
-		iocCmp = mpt_adapter_find_first();
-		while ((ioc != iocCmp)  && iocCmp)
-			iocCmp = mpt_adapter_find_next(iocCmp);
-
-		if (!iocCmp) {
-			printk(KERN_WARNING "mpt_interrupt: Invalid ioc!\n");
-			return IRQ_NONE;
-		}
-	}
-#endif
-
 	/*
 	 *  Drain the reply FIFO!
 	 *
@@ -347,7 +303,7 @@
 	 */
 	while (1) {
 
-		if ((pa = CHIPREG_READ32(&ioc->chip->ReplyFifo)) == 0xFFFFFFFF)
+		if ((pa = CHIPREG_READ32_dmasync(&ioc->chip->ReplyFifo)) == 0xFFFFFFFF)
 			return IRQ_HANDLED;
 
 		cb_idx = 0;
@@ -806,8 +762,7 @@
 	MptDeviceDriverHandlers[cb_idx] = dd_cbfunc;
 
 	/* call per pci device probe entry point */
-	for(ioc = mpt_adapter_find_first(); ioc != NULL;
-	  ioc = mpt_adapter_find_next(ioc)) {
+	list_for_each_entry(ioc, &ioc_list, list) {
 		if(dd_cbfunc->probe) {
 			error = dd_cbfunc->probe(ioc->pcidev,
 			  ioc->pcidev->driver->id_table);
@@ -826,9 +781,19 @@
 void
 mpt_device_driver_deregister(int cb_idx)
 {
+	struct mpt_pci_driver *dd_cbfunc;
+	MPT_ADAPTER	*ioc;
+
 	if (cb_idx < 1 || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS)
 		return;
 
+	dd_cbfunc = MptDeviceDriverHandlers[cb_idx];
+
+	list_for_each_entry(ioc, &ioc_list, list) {
+		if (dd_cbfunc->remove)
+			dd_cbfunc->remove(ioc->pcidev);
+	}
+	
 	MptDeviceDriverHandlers[cb_idx] = NULL;
 }
 
@@ -844,15 +809,11 @@
  *	or IOC is not active.
  */
 MPT_FRAME_HDR*
-mpt_get_msg_frame(int handle, int iocid)
+mpt_get_msg_frame(int handle, MPT_ADAPTER *iocp)
 {
 	MPT_FRAME_HDR *mf;
-	MPT_ADAPTER *iocp;
 	unsigned long flags;
 
-	/* validate handle and ioc identifier */
-	iocp = mpt_adapters[iocid];
-
 #ifdef MFCNT
 	if (!iocp->active)
 		printk(KERN_WARNING "IOC Not Active! mpt_get_msg_frame returning NULL!\n");
@@ -907,48 +868,39 @@
  *	specific MPT adapter.
  */
 void
-mpt_put_msg_frame(int handle, int iocid, MPT_FRAME_HDR *mf)
+mpt_put_msg_frame(int handle, MPT_ADAPTER *iocp, MPT_FRAME_HDR *mf)
 {
-	MPT_ADAPTER *iocp;
-
-	iocp = mpt_adapters[iocid];
-	if (iocp != NULL) {
-		u32 mf_dma_addr;
-		int req_offset;
+	u32 mf_dma_addr;
+	int req_offset;
 
-		/* ensure values are reset properly! */
-		mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle;		/* byte */
-		req_offset = (u8 *)mf - (u8 *)iocp->req_frames;
+	/* ensure values are reset properly! */
+	mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle;		/* byte */
+	req_offset = (u8 *)mf - (u8 *)iocp->req_frames;
 									/* u16! */
-		mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(req_offset / iocp->req_sz);
-		mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0;
+	mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(req_offset / iocp->req_sz);
+	mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0;
 
 #ifdef MPT_DEBUG_MSG_FRAME
-		{
-			u32	*m = mf->u.frame.hwhdr.__hdr;
-			int	 ii, n;
+	{
+		u32	*m = mf->u.frame.hwhdr.__hdr;
+		int	 ii, n;
 
-			printk(KERN_INFO MYNAM ": %s: About to Put msg frame @ %p:\n" KERN_INFO " ",
-					iocp->name, m);
-			n = iocp->req_sz/4 - 1;
-			while (m[n] == 0)
-				n--;
-			for (ii=0; ii<=n; ii++) {
-				if (ii && ((ii%8)==0))
-					printk("\n" KERN_INFO " ");
-				printk(" %08x", le32_to_cpu(m[ii]));
-			}
-			printk("\n");
+		printk(KERN_INFO MYNAM ": %s: About to Put msg frame @ %p:\n" KERN_INFO " ",
+				iocp->name, m);
+		n = iocp->req_sz/4 - 1;
+		while (m[n] == 0)
+			n--;
+		for (ii=0; ii<=n; ii++) {
+			if (ii && ((ii%8)==0))
+				printk("\n" KERN_INFO " ");
+			printk(" %08x", le32_to_cpu(m[ii]));
 		}
-#endif
-
-		mf_dma_addr = iocp->req_frames_low_dma + req_offset;
-		CHIPREG_WRITE32(&iocp->chip->RequestFifo, mf_dma_addr);
-	} else {
-		printk (KERN_ERR
-		    "mpt_put_msg_frame: Invalid iocid=%d\n", iocid);
+		printk("\n");
 	}
+#endif
 
+	mf_dma_addr = iocp->req_frames_low_dma + req_offset;
+	CHIPREG_WRITE32(&iocp->chip->RequestFifo, mf_dma_addr);
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -962,21 +914,17 @@
  *	FreeQ.
  */
 void
-mpt_free_msg_frame(int handle, int iocid, MPT_FRAME_HDR *mf)
+mpt_free_msg_frame(int handle, MPT_ADAPTER *iocp, MPT_FRAME_HDR *mf)
 {
-	MPT_ADAPTER *iocp;
 	unsigned long flags;
 
-	iocp = mpt_adapters[iocid];
-	if (iocp != NULL) {
-		/*  Put Request back on FreeQ!  */
-		spin_lock_irqsave(&iocp->FreeQlock, flags);
-		Q_ADD_TAIL(&iocp->FreeQ, &mf->u.frame.linkage, MPT_FRAME_HDR);
+	/*  Put Request back on FreeQ!  */
+	spin_lock_irqsave(&iocp->FreeQlock, flags);
+	Q_ADD_TAIL(&iocp->FreeQ, &mf->u.frame.linkage, MPT_FRAME_HDR);
 #ifdef MFCNT
-		iocp->mfcnt--;
+	iocp->mfcnt--;
 #endif
-		spin_unlock_irqrestore(&iocp->FreeQlock, flags);
-	}
+	spin_unlock_irqrestore(&iocp->FreeQlock, flags);
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -1062,127 +1010,80 @@
  *	Returns 0 for success, non-zero for failure.
  */
 int
-mpt_send_handshake_request(int handle, int iocid, int reqBytes, u32 *req, int sleepFlag)
+mpt_send_handshake_request(int handle, MPT_ADAPTER *iocp, int reqBytes, u32 *req, int sleepFlag)
 {
-	MPT_ADAPTER	*iocp;
 	int		 r = 0;
+	u8	*req_as_bytes;
+	int	 ii;
 
-	iocp = mpt_adapters[iocid];
-	if (iocp != NULL) {
-		u8	*req_as_bytes;
-		int	 ii;
-
-		/* State is known to be good upon entering
-		 * this function so issue the bus reset
-		 * request.
-		 */
-
-		/*
-		 * Emulate what mpt_put_msg_frame() does /wrt to sanity
-		 * setting cb_idx/req_idx.  But ONLY if this request
-		 * is in proper (pre-alloc'd) request buffer range...
-		 */
-		ii = MFPTR_2_MPT_INDEX(iocp,(MPT_FRAME_HDR*)req);
-		if (reqBytes >= 12 && ii >= 0 && ii < iocp->req_depth) {
-			MPT_FRAME_HDR *mf = (MPT_FRAME_HDR*)req;
-			mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(ii);
-			mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle;
-		}
-
-		/* Make sure there are no doorbells */
-		CHIPREG_WRITE32(&iocp->chip->IntStatus, 0);
+	/* State is known to be good upon entering
+	 * this function so issue the bus reset
+	 * request.
+	 */
 
-		CHIPREG_WRITE32(&iocp->chip->Doorbell,
-				((MPI_FUNCTION_HANDSHAKE<<MPI_DOORBELL_FUNCTION_SHIFT) |
-				 ((reqBytes/4)<<MPI_DOORBELL_ADD_DWORDS_SHIFT)));
+	/*
+	 * Emulate what mpt_put_msg_frame() does /wrt to sanity
+	 * setting cb_idx/req_idx.  But ONLY if this request
+	 * is in proper (pre-alloc'd) request buffer range...
+	 */
+	ii = MFPTR_2_MPT_INDEX(iocp,(MPT_FRAME_HDR*)req);
+	if (reqBytes >= 12 && ii >= 0 && ii < iocp->req_depth) {
+		MPT_FRAME_HDR *mf = (MPT_FRAME_HDR*)req;
+		mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(ii);
+		mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle;
+	}
 
-		/* Wait for IOC doorbell int */
-		if ((ii = WaitForDoorbellInt(iocp, 5, sleepFlag)) < 0) {
-			return ii;
-		}
+	/* Make sure there are no doorbells */
+	CHIPREG_WRITE32(&iocp->chip->IntStatus, 0);
+	CHIPREG_WRITE32(&iocp->chip->Doorbell,
+			((MPI_FUNCTION_HANDSHAKE<<MPI_DOORBELL_FUNCTION_SHIFT) |
+			 ((reqBytes/4)<<MPI_DOORBELL_ADD_DWORDS_SHIFT)));
 
-		/* Read doorbell and check for active bit */
-		if (!(CHIPREG_READ32(&iocp->chip->Doorbell) & MPI_DOORBELL_ACTIVE))
-				return -5;
+	/* Wait for IOC doorbell int */
+	ii = WaitForDoorbellInt(iocp, 5, sleepFlag);
+	if (ii < 0)
+		return ii;
 
-		dhsprintk((KERN_INFO MYNAM ": %s: mpt_send_handshake_request start, WaitCnt=%d\n",
-				iocp->name, ii));
+	/* Read doorbell and check for active bit */
+	if (!(CHIPREG_READ32(&iocp->chip->Doorbell) & MPI_DOORBELL_ACTIVE))
+		return -5;
 
-		CHIPREG_WRITE32(&iocp->chip->IntStatus, 0);
+	dhsprintk((KERN_INFO MYNAM ": %s: mpt_send_handshake_request start, WaitCnt=%d\n",
+			iocp->name, ii));
 
-		if ((r = WaitForDoorbellAck(iocp, 5, sleepFlag)) < 0) {
-			return -2;
-		}
+	CHIPREG_WRITE32(&iocp->chip->IntStatus, 0);
 
-		/* Send request via doorbell handshake */
-		req_as_bytes = (u8 *) req;
-		for (ii = 0; ii < reqBytes/4; ii++) {
-			u32 word;
+	r = WaitForDoorbellAck(iocp, 5, sleepFlag);
+	if (r < 0)
+		return -2;
 
-			word = ((req_as_bytes[(ii*4) + 0] <<  0) |
-				(req_as_bytes[(ii*4) + 1] <<  8) |
-				(req_as_bytes[(ii*4) + 2] << 16) |
-				(req_as_bytes[(ii*4) + 3] << 24));
-			CHIPREG_WRITE32(&iocp->chip->Doorbell, word);
-			if ((r = WaitForDoorbellAck(iocp, 5, sleepFlag)) < 0) {
-				r = -3;
-				break;
-			}
+	/* Send request via doorbell handshake */
+	req_as_bytes = (u8 *) req;
+	for (ii = 0; ii < reqBytes/4; ii++) {
+		u32 word;
+
+		word = ((req_as_bytes[(ii*4) + 0] <<  0) |
+			(req_as_bytes[(ii*4) + 1] <<  8) |
+			(req_as_bytes[(ii*4) + 2] << 16) |
+			(req_as_bytes[(ii*4) + 3] << 24));
+		CHIPREG_WRITE32(&iocp->chip->Doorbell, word);
+		r = WaitForDoorbellAck(iocp, 5, sleepFlag);
+		if (r < 0) {
+			r = -3;
+			break;
 		}
-
-		if (r >= 0 && WaitForDoorbellInt(iocp, 10, sleepFlag) >= 0)
-			r = 0;
-		else
-			r = -4;
-
-		/* Make sure there are no doorbells */
-		CHIPREG_WRITE32(&iocp->chip->IntStatus, 0);
 	}
 
-	return r;
-}
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/**
- *	mpt_adapter_find_first - Find first MPT adapter pointer.
- *
- *	Returns first MPT adapter pointer or %NULL if no MPT adapters
- *	are present.
- */
-MPT_ADAPTER *
-mpt_adapter_find_first(void)
-{
-	MPT_ADAPTER *this;
-
-	if (! Q_IS_EMPTY(&MptAdapters))
-		this = MptAdapters.head;
+	if (r >= 0 && WaitForDoorbellInt(iocp, 10, sleepFlag) >= 0)
+		r = 0;
 	else
-		this = NULL;
-
-	return this;
-}
+		r = -4;
 
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/**
- *	mpt_adapter_find_next - Find next MPT adapter pointer.
- *	@prev: Pointer to previous MPT adapter
- *
- *	Returns next MPT adapter pointer or %NULL if there are no more.
- */
-MPT_ADAPTER *
-mpt_adapter_find_next(MPT_ADAPTER *prev)
-{
-	MPT_ADAPTER *next;
-
-	if (prev && (prev->forw != (MPT_ADAPTER*)&MptAdapters.head))
-		next = prev->forw;
-	else
-		next = NULL;
-
-	return next;
+	/* Make sure there are no doorbells */
+	CHIPREG_WRITE32(&iocp->chip->IntStatus, 0);
+	return r;
 }
 
-
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /**
  *	mpt_verify_adapter - Given a unique IOC identifier, set pointer to
@@ -1195,18 +1096,17 @@
 int
 mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp)
 {
-	MPT_ADAPTER *p;
+	MPT_ADAPTER *ioc;
 
+	list_for_each_entry(ioc,&ioc_list,list) {
+		if (ioc->id == iocid) {
+			*iocpp =ioc;
+			return iocid;
+		} 
+	}
+	
 	*iocpp = NULL;
-	if (iocid >= MPT_MAX_ADAPTERS)
-		return -1;
-
-	p = mpt_adapters[iocid];
-	if (p == NULL)
-		return -1;
-
-	*iocpp = p;
-	return iocid;
+	return -1;
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -1240,6 +1140,8 @@
 	u64		 mask = 0xffffffffffffffffULL;
 	u8		 revision;
 	u8		 pcixcmd;
+	static int	 mpt_ids = 0;
+	struct proc_dir_entry *dent, *ent;
 
 	if (pci_enable_device(pdev))
 		return r;
@@ -1296,29 +1198,20 @@
 	Q_INIT(&ioc->configQ, Q_ITEM);
 
 	/* Find lookup slot. */
-	for (ii=0; ii < MPT_MAX_ADAPTERS; ii++) {
-		if (mpt_adapters[ii] == NULL) {
-			ioc->id = ii;		/* Assign adapter unique id (lookup) */
-			break;
-		}
-	}
-	if (ii == MPT_MAX_ADAPTERS) {
-		printk(KERN_ERR MYNAM ": ERROR - mpt_adapters[%d] table overflow!\n", ii);
-		kfree(ioc);
-		return -ENFILE;
-	}
-
+	INIT_LIST_HEAD(&ioc->list);
+	ioc->id = mpt_ids++;
+	
 	mem_phys = msize = 0;
 	port = psize = 0;
 	for (ii=0; ii < DEVICE_COUNT_RESOURCE; ii++) {
-		if (pdev->PCI_BASEADDR_FLAGS(ii) & PCI_BASE_ADDRESS_SPACE_IO) {
+		if (pci_resource_flags(pdev, ii) & PCI_BASE_ADDRESS_SPACE_IO) {
 			/* Get I/O space! */
-			port = pdev->PCI_BASEADDR_START(ii);
-			psize = PCI_BASEADDR_SIZE(pdev,ii);
+			port = pci_resource_start(pdev, ii);
+			psize = pci_resource_len(pdev,ii);
 		} else {
 			/* Get memmap */
-			mem_phys = pdev->PCI_BASEADDR_START(ii);
-			msize = PCI_BASEADDR_SIZE(pdev,ii);
+			mem_phys = pci_resource_start(pdev, ii);
+			msize = pci_resource_len(pdev,ii);
 			break;
 		}
 	}
@@ -1429,11 +1322,8 @@
 	ioc->active = 0;
 	CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);
 
-	/* tack onto tail of our MPT adapter list */
-	Q_ADD_TAIL(&MptAdapters, ioc, MPT_ADAPTER);
-
 	/* Set lookup ptr. */
-	mpt_adapters[ioc->id] = ioc;
+	list_add_tail(&ioc->list, &ioc_list);
 
 	ioc->pci_irq = -1;
 	if (pdev->irq) {
@@ -1448,7 +1338,7 @@
 					ioc->name, __irq_itoa(pdev->irq));
 #endif
 			Q_DEL_ITEM(ioc);
-			mpt_adapters[ioc->id] = NULL;
+			list_del(&ioc->list);
 			iounmap(mem);
 			kfree(ioc);
 			return -EBUSY;
@@ -1480,7 +1370,7 @@
 		  ioc->name, r);
 
 		Q_DEL_ITEM(ioc);
-		mpt_adapters[ioc->id] = NULL;
+		list_del(&ioc->list);
 		free_irq(ioc->pci_irq, ioc);
 		iounmap(mem);
 		kfree(ioc);
@@ -1496,6 +1386,23 @@
 		}
 	}
 
+	/*
+	 *  Create "/proc/mpt/iocN" subdirectory entry for each MPT adapter.
+	 */
+	dent = proc_mkdir(ioc->name, mpt_proc_root_dir);
+	if (dent) {
+		ent = create_proc_entry("info", S_IFREG|S_IRUGO, dent);
+		if (ent) {
+			ent->read_proc = procmpt_iocinfo_read;
+			ent->data = ioc;
+		}
+		ent = create_proc_entry("summary", S_IFREG|S_IRUGO, dent);
+		if (ent) {
+			ent->read_proc = procmpt_summary_read;
+			ent->data = ioc;
+		}
+	}
+
 	return 0;
 }
 
@@ -1510,8 +1417,16 @@
 mptbase_remove(struct pci_dev *pdev)
 {
 	MPT_ADAPTER 	*ioc = pci_get_drvdata(pdev);
+	char pname[32];
 	int ii;
 
+	sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s/summary", ioc->name);
+	remove_proc_entry(pname, NULL);
+	sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s/info", ioc->name);
+	remove_proc_entry(pname, NULL);
+	sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s", ioc->name);
+	remove_proc_entry(pname, NULL);
+	
 	/* call per device driver remove entry point */
 	for(ii=0; ii<MPT_MAX_PROTOCOL_DRIVERS; ii++) {
 		if(MptDeviceDriverHandlers[ii] &&
@@ -1519,19 +1434,18 @@
 			MptDeviceDriverHandlers[ii]->remove(pdev);
 		}
 	}
-
+	
 	/* Disable interrupts! */
 	CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF);
 
 	ioc->active = 0;
-	mpt_sync_irq(pdev->irq);
+	synchronize_irq(pdev->irq);
 
 	/* Clear any lingering interrupt */
 	CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);
 
 	CHIPREG_READ32(&ioc->chip->IntStatus);
 
-	Q_DEL_ITEM(ioc);
 	mpt_adapter_dispose(ioc);
 
 	pci_set_drvdata(pdev, NULL);
@@ -1769,11 +1683,17 @@
 					ioc->alt_ioc->name, r);
 	}
 
-	/* Get IOC facts! Allow 1 retry */
-	if ((r = GetIocFacts(ioc, sleepFlag, reason)) != 0)
-		r = GetIocFacts(ioc, sleepFlag, reason);
+	for (ii=0; ii<5; ii++) {
+		/* Get IOC facts! Allow 1 retry */
+		if ((r = GetIocFacts(ioc, sleepFlag, reason)) != 0) {
+			dinitprintk((MYIOC_s_INFO_FMT 
+			     "ii=%d IocFacts failed r=%x\n", ioc->name, ii, r));
+		} else
+			break;
+	}
 
 	if (r) {
+		dinitprintk((MYIOC_s_INFO_FMT "Retry IocFacts failed r=%x\n", ioc->name, r));
 		ret = -2;
 	} else if (reason == MPT_HOSTEVENT_IOC_BRINGUP) {
 		MptDisplayIocCapabilities(ioc);
@@ -1781,11 +1701,13 @@
 
 	if (alt_ioc_ready) {
 		if ((r = GetIocFacts(ioc->alt_ioc, sleepFlag, reason)) != 0) {
+			dinitprintk((MYIOC_s_INFO_FMT "Initial Alt IocFacts failed r=%x\n", ioc->name, r));
 			/* Retry - alt IOC was initialized once
 			 */
 			r = GetIocFacts(ioc->alt_ioc, sleepFlag, reason);
 		}
 		if (r) {
+			dinitprintk((MYIOC_s_INFO_FMT "Retry Alt IocFacts failed r=%x\n", ioc->name, r));
 			alt_ioc_ready = 0;
 			reset_alt_ioc_active = 0;
 		} else if (reason == MPT_HOSTEVENT_IOC_BRINGUP) {
@@ -1973,15 +1895,15 @@
 static void
 mpt_detect_bound_ports(MPT_ADAPTER *ioc, struct pci_dev *pdev)
 {
-	MPT_ADAPTER *ioc_srch = mpt_adapter_find_first();
 	unsigned int match_lo, match_hi;
+	MPT_ADAPTER *ioc_srch;
 
 	match_lo = pdev->devfn-1;
 	match_hi = pdev->devfn+1;
 	dprintk((MYIOC_s_INFO_FMT "PCI bus/devfn=%x/%x, searching for devfn match on %x or %x\n",
 			ioc->name, pdev->bus->number, pdev->devfn, match_lo, match_hi));
 
-	while (ioc_srch != NULL) {
+	list_for_each_entry(ioc_srch, &ioc_list, list) {
 		struct pci_dev *_pcidev = ioc_srch->pcidev;
 
 		if ((_pcidev->device == pdev->device) &&
@@ -2003,7 +1925,6 @@
 			ioc->alt_ioc = ioc_srch;
 			break;
 		}
-		ioc_srch = mpt_adapter_find_next(ioc_srch);
 	}
 }
 
@@ -2018,15 +1939,8 @@
 {
 	if (this != NULL) {
 		int sz=0;
-		u32 state;
 		int ret;
 
-		/* Disable the FW */
-		state = mpt_GetIocState(this, 1);
-		if (state == MPI_IOC_STATE_OPERATIONAL) {
-			SendIocReset(this, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, NO_SLEEP);
-		}
-
 		if (this->cached_fw != NULL) {
 			ddlprintk((KERN_INFO MYNAM ": Pushing FW onto adapter\n"));
 
@@ -2070,25 +1984,11 @@
 		}
 
 		if (freeup && this->cached_fw != NULL) {
-			int ii = 0;
-
-			while ((ii < this->num_fw_frags) && (this->cached_fw[ii]!= NULL)) {
-				sz = this->cached_fw[ii]->size;
-				pci_free_consistent(this->pcidev, sz,
-					this->cached_fw[ii]->fw, this->cached_fw[ii]->fw_dma);
-				this->cached_fw[ii]->fw = NULL;
-				this->alloc_total -= sz;
-
-				kfree(this->cached_fw[ii]);
-				this->cached_fw[ii] = NULL;
-				this->alloc_total -= sizeof(fw_image_t);
-
-				ii++;
-			}
 
-			kfree(this->cached_fw);
+			sz = this->facts.FWImageSize;
+			pci_free_consistent(this->pcidev, sz,
+				this->cached_fw, this->cached_fw_dma);
 			this->cached_fw = NULL;
-			sz = this->num_fw_frags * sizeof(void *);
 			this->alloc_total -= sz;
 		}
 
@@ -2130,11 +2030,6 @@
 
 		sz_first = this->alloc_total;
 
-		if (this->alt_ioc != NULL) {
-			this->alt_ioc->alt_ioc = NULL;
-			this->alt_ioc = NULL;
-		}
-
 		mpt_adapter_disable(this, 1);
 
 		if (this->pci_irq != -1) {
@@ -2153,7 +2048,7 @@
 #endif
 
 		/*  Zap the adapter lookup ptr!  */
-		mpt_adapters[this->id] = NULL;
+		list_del(&this->list);
 
 		sz_last = this->alloc_total;
 		dprintk((KERN_INFO MYNAM ": %s: free'd %d of %d bytes\n",
@@ -2250,13 +2145,14 @@
 		if ((int)ioc->chip_type <= (int)FC929)
 			return 0;
 		else {
+			return 0;
 			/* Workaround from broken 1030 FW.
 			 * Force a diagnostic reset if fails.
 			 */
-			if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) == 0)
+/*			if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) == 0)
 				return 0;
 			else
-				statefault = 4;
+				statefault = 4; */
 		}
 	}
 
@@ -2275,7 +2171,7 @@
 	 *	Hmmm...  Did it get left operational?
 	 */
 	if ((ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_OPERATIONAL) {
-		dprintk((MYIOC_s_WARN_FMT "IOC operational unexpected\n",
+		dinitprintk((MYIOC_s_WARN_FMT "IOC operational unexpected\n",
 				ioc->name));
 
 		/* Check WhoInit.
@@ -2419,7 +2315,7 @@
 	get_facts.Function = MPI_FUNCTION_IOC_FACTS;
 	/* Assert: All other get_facts fields are zero! */
 
-	dprintk((MYIOC_s_INFO_FMT "Sending get IocFacts request\n", ioc->name));
+	dinitprintk((MYIOC_s_INFO_FMT "Sending get IocFacts request\n", ioc->name));
 
 	/* No non-zero fields in the get_facts request are greater than
 	 * 1 byte in size, so we can just fire it off as is.
@@ -2519,8 +2415,10 @@
 				return r;
 		}
 	} else {
-		printk(MYIOC_s_ERR_FMT "Invalid IOC facts reply!\n",
-				ioc->name);
+		printk(MYIOC_s_ERR_FMT 
+		     "Invalid IOC facts reply, msgLength=%d offsetof=%d!\n",
+		     ioc->name, facts->MsgLength, (offsetof(IOCFactsReply_t,
+		     RequestFrameSize)/sizeof(u32)));
 		return -66;
 	}
 
@@ -2665,7 +2563,7 @@
 	ioc->facts.CurrentHostMfaHighAddr = ioc_init.HostMfaHighAddr;
 	ioc->facts.CurrentSenseBufferHighAddr = ioc_init.SenseBufferHighAddr;
 
-	dprintk((MYIOC_s_INFO_FMT "Sending IOCInit (req @ %p)\n",
+	dhsprintk((MYIOC_s_INFO_FMT "Sending IOCInit (req @ %p)\n",
 			ioc->name, &ioc_init));
 
 	r = mpt_handshake_req_reply_wait(ioc, sizeof(IOCInit_t), (u32*)&ioc_init,
@@ -2677,6 +2575,9 @@
 	 * since we don't even look at it's contents.
 	 */
 
+	dhsprintk((MYIOC_s_INFO_FMT "Sending PortEnable (req @ %p)\n",
+			ioc->name, &ioc_init));
+	
 	if ((r = SendPortEnable(ioc, 0, sleepFlag)) != 0)
 		return r;
 
@@ -2771,86 +2672,14 @@
  * Outputs: frags - number of fragments needed
  * Return NULL if failed.
  */
-void *
-mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size, int *frags, int *alloc_sz)
+void
+mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size)
 {
-	fw_image_t	**cached_fw;
-	u8		*mem;
-	dma_addr_t	fw_dma;
-	int		alloc_total = 0;
-	int		bytes_left, bytes, num_frags;
-	int		sz, ii;
-
 	/* cached_fw
 	 */
-	sz = ioc->num_fw_frags * sizeof(void *);
-	mem = kmalloc(sz, GFP_ATOMIC);
-	if (mem == NULL)
-		return NULL;
-
-	memset(mem, 0, sz);
-	cached_fw = (fw_image_t **)mem;
-	alloc_total += sz;
-
-	/* malloc fragment memory
-	 * fw_image_t struct and dma for fw data
-	 */
-	bytes_left = size;
-	ii = 0;
-	num_frags = 0;
-	bytes = bytes_left;
-	while((bytes_left) && (num_frags < ioc->num_fw_frags)) {
-		if (cached_fw[ii] == NULL) {
-			mem = kmalloc(sizeof(fw_image_t), GFP_ATOMIC);
-			if (mem == NULL)
-				break;
-
-			memset(mem, 0, sizeof(fw_image_t));
-			cached_fw[ii] = (fw_image_t *)mem;
-			alloc_total += sizeof(fw_image_t);
-		}
-
-		mem = pci_alloc_consistent(ioc->pcidev, bytes, &fw_dma);
-		if (mem == NULL) {
-			if (bytes > 0x10000)
-				bytes = 0x10000;
-			else if (bytes > 0x8000)
-				bytes = 0x8000;
-			else if (bytes > 0x4000)
-				bytes = 0x4000;
-			else if (bytes > 0x2000)
-				bytes = 0x2000;
-			else if (bytes > 0x1000)
-				bytes = 0x1000;
-			else
-				break;
-
-			continue;
-		}
-
-		cached_fw[ii]->fw = mem;
-		cached_fw[ii]->fw_dma = fw_dma;
-		cached_fw[ii]->size = bytes;
-		memset(mem, 0, bytes);
-		alloc_total += bytes;
-
-		bytes_left -= bytes;
-
-		num_frags++;
-		ii++;
-	}
-
-	if (bytes_left ) {
-		/* Major Failure.
-		 */
-		mpt_free_fw_memory(ioc, cached_fw);
-		return NULL;
-	}
-
-	*frags = num_frags;
-	*alloc_sz = alloc_total;
 
-	return (void *) cached_fw;
+	if ( (ioc->cached_fw = pci_alloc_consistent(ioc->pcidev, size, &ioc->cached_fw_dma) ) )
+		ioc->alloc_total += size;
 }
 
 /*
@@ -2858,45 +2687,14 @@
  * Else, delete a secondary image in same format.
  */
 void
-mpt_free_fw_memory(MPT_ADAPTER *ioc, fw_image_t **alt_img)
+mpt_free_fw_memory(MPT_ADAPTER *ioc)
 {
-	fw_image_t **cached_fw;
-	int ii;
 	int sz;
-	int alloc_freed = 0;
-
-	if (alt_img != NULL)
-		cached_fw = alt_img;
-	else
-		cached_fw = ioc->cached_fw;
-
-	if (cached_fw == NULL)
-		return;
-
-	ii = 0;
-	while ((ii < ioc->num_fw_frags) && (cached_fw[ii]!= NULL)) {
-		sz = cached_fw[ii]->size;
-		if (sz > 0) {
-			pci_free_consistent(ioc->pcidev, sz,
-						cached_fw[ii]->fw, cached_fw[ii]->fw_dma);
-		}
-		cached_fw[ii]->fw = NULL;
-		alloc_freed += sz;
-
-		kfree(cached_fw[ii]);
-		cached_fw[ii] = NULL;
-		alloc_freed += sizeof(fw_image_t);
-
-		ii++;
-	}
 
-	kfree(cached_fw);
-	cached_fw = NULL;
-	sz = ioc->num_fw_frags * sizeof(void *);
-	alloc_freed += sz;
-
-	if (alt_img == NULL)
-		ioc->alloc_total -= alloc_freed;
+	sz = ioc->facts.FWImageSize;
+	pci_free_consistent(ioc->pcidev, sz,
+			ioc->cached_fw, ioc->cached_fw_dma);
+	ioc->cached_fw = NULL;
 
 	return;
 }
@@ -2925,9 +2723,9 @@
 	FWUploadReply_t		*preply;
 	FWUploadTCSGE_t		*ptcsge;
 	int			 sgeoffset;
+	u32			 flagsLength;
 	int			 ii, sz, reply_sz;
 	int			 cmdStatus, freeMem = 0;
-	int			 num_frags, alloc_sz;
 
 	/* If the image size is 0 or if the pointer is
 	 * not NULL (error), we are done.
@@ -2935,24 +2733,21 @@
 	if (((sz = ioc->facts.FWImageSize) == 0) || ioc->cached_fw)
 		return 0;
 
-	ioc->num_fw_frags = ioc->req_sz - sizeof(FWUpload_t) + sizeof(dma_addr_t) + sizeof(u32) -1;
-	ioc->num_fw_frags /= sizeof(dma_addr_t) + sizeof(u32);
+	if ( sz & 0x01 )
+		sz += 1;
+	if ( sz & 0x02 )
+		sz += 2;
 
-	ioc->cached_fw = (fw_image_t **) mpt_alloc_fw_memory(ioc,
-			ioc->facts.FWImageSize, &num_frags, &alloc_sz);
+	mpt_alloc_fw_memory(ioc, sz);
 
 	if (ioc->cached_fw == NULL) {
 		/* Major Failure.
 		 */
-		mpt_free_fw_memory(ioc, NULL);
-		ioc->cached_fw = NULL;
-		
 		return -ENOMEM;
 	}
-	ioc->alloc_total += alloc_sz;
 
-	ddlprintk((KERN_INFO MYNAM ": FW Image  @ %p, sz=%d bytes\n",
-		 (void *)(ulong)ioc->cached_fw, ioc->facts.FWImageSize));
+	dinitprintk((KERN_WARNING MYNAM ": FW Image  @ %p[%p], sz=%d[%x] bytes\n",
+		 ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz));
 
 	prequest = (FWUpload_t *)&request;
 	preply = (FWUploadReply_t *)&reply;
@@ -2965,39 +2760,27 @@
 
 	prequest->ImageType = MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM;
 	prequest->Function = MPI_FUNCTION_FW_UPLOAD;
-	prequest->MsgContext = 0;		/* anything */
 
 	ptcsge = (FWUploadTCSGE_t *) &prequest->SGL;
-	ptcsge->Reserved = 0;
-	ptcsge->ContextSize = 0;
 	ptcsge->DetailsLength = 12;
 	ptcsge->Flags = MPI_SGE_FLAGS_TRANSACTION_ELEMENT;
-	ptcsge->Reserved1 = 0;
-	ptcsge->ImageOffset = 0;
 	ptcsge->ImageSize = cpu_to_le32(sz);
 
 	sgeoffset = sizeof(FWUpload_t) - sizeof(SGE_MPI_UNION) + sizeof(FWUploadTCSGE_t);
 
-	for (ii = 0; ii < (num_frags-1); ii++) {
-		mpt_add_sge(&request[sgeoffset], MPT_SGE_FLAGS_SIMPLE_ELEMENT |	
-			MPT_SGE_FLAGS_ADDRESSING | MPT_TRANSFER_IOC_TO_HOST |
-			(u32) ioc->cached_fw[ii]->size, ioc->cached_fw[ii]->fw_dma);
-
-		sgeoffset += sizeof(u32) + sizeof(dma_addr_t);
-	}
-
-	mpt_add_sge(&request[sgeoffset],
-			MPT_SGE_FLAGS_SSIMPLE_READ |(u32) ioc->cached_fw[ii]->size,
-			ioc->cached_fw[ii]->fw_dma);
+	flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ | sz;
+	mpt_add_sge(&request[sgeoffset], flagsLength, ioc->cached_fw_dma);
 
 	sgeoffset += sizeof(u32) + sizeof(dma_addr_t);
-
-	dprintk((MYIOC_s_INFO_FMT "Sending FW Upload (req @ %p) size %d \n",
-			ioc->name, prequest, sgeoffset));
+	dinitprintk((KERN_WARNING MYNAM "Sending FW Upload (req @ %p) sgeoffset=%d \n",
+			prequest, sgeoffset));
+	DBG_DUMP_FW_REQUEST_FRAME(prequest)
 
 	ii = mpt_handshake_req_reply_wait(ioc, sgeoffset, (u32*)prequest,
 				reply_sz, (u16*)preply, 65 /*seconds*/, sleepFlag);
 
+	dinitprintk((KERN_WARNING MYNAM "FW Upload completed rc=%x \n", ii));
+
 	cmdStatus = -EFAULT;
 	if (ii == 0) {
 		/* Handshake transfer was complete and successful.
@@ -3011,7 +2794,7 @@
 				cmdStatus = 0;
 		}
 	}
-	ddlprintk((MYIOC_s_INFO_FMT ": do_upload status %d \n",
+	dinitprintk((MYIOC_s_INFO_FMT ": do_upload status %d \n",
 			ioc->name, cmdStatus));
 
 	/* Check to see if we have a copy of this image in
@@ -3031,8 +2814,7 @@
 
 		ddlprintk((MYIOC_s_INFO_FMT ": do_upload freeing %s image \n",
 			ioc->name, cmdStatus ? "incomplete" : "duplicate"));
-		mpt_free_fw_memory(ioc, NULL);
-		ioc->cached_fw = NULL;
+		mpt_free_fw_memory(ioc);
 	}
 
 	return cmdStatus;
@@ -3055,241 +2837,138 @@
 static int
 mpt_downloadboot(MPT_ADAPTER *ioc, int sleepFlag)
 {
-	MpiFwHeader_t		*FwHdr;
-	MpiExtImageHeader_t 	*ExtHdr;
-	fw_image_t		**pCached=NULL;
-	int			 fw_sz;
+	MpiFwHeader_t		*pFwHeader;
+	MpiExtImageHeader_t	*pExtImage;
+	u32			 fwSize;
 	u32			 diag0val;
 #ifdef MPT_DEBUG
 	u32			 diag1val = 0;
 #endif
 	int			 count = 0;
-	u32			*ptru32;
+	u32			*ptrFw;
 	u32			 diagRwData;
 	u32			 nextImage;
-	u32			 ext_offset;
 	u32			 load_addr;
-	int			 max_idx, fw_idx, ext_idx;
-	int			 left_u32s;
+	u32 			 ioc_state;
 
-	ddlprintk((MYIOC_s_INFO_FMT "DbGb0: downloadboot entered.\n",
-				ioc->name));
-#ifdef MPT_DEBUG
-	diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
-	if (ioc->alt_ioc)
-		diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic);
-	ddlprintk((MYIOC_s_INFO_FMT "DbGb1: diag0=%08x, diag1=%08x\n",
-				ioc->name, diag0val, diag1val));
-#endif
-
-	ddlprintk((MYIOC_s_INFO_FMT "fw size 0x%x, ioc FW Ptr %p\n",
+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot: fw size 0x%x, ioc FW Ptr %p\n",
 				ioc->name, ioc->facts.FWImageSize, ioc->cached_fw));
-	if (ioc->alt_ioc)
-		ddlprintk((MYIOC_s_INFO_FMT "alt ioc FW Ptr %p\n",
-				ioc->name, ioc->alt_ioc->cached_fw));
 
 	/* Get dma_addr and data transfer size.
 	 */
-	if ((fw_sz = ioc->facts.FWImageSize) == 0)
+	if ( ioc->facts.FWImageSize == 0 )
 		return -1;
 
 	/* Get the DMA from ioc or ioc->alt_ioc */
-	if (ioc->cached_fw != NULL)
-		pCached = (fw_image_t **)ioc->cached_fw;
-	else if (ioc->alt_ioc && (ioc->alt_ioc->cached_fw != NULL))
-		pCached = (fw_image_t **)ioc->alt_ioc->cached_fw;
-	else
+	if (ioc->cached_fw == NULL)
 		return -2;
 
-	ddlprintk((MYIOC_s_INFO_FMT "DbGb2: FW Image @ %p\n",
-			ioc->name, pCached));
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_2ND_KEY_VALUE);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_3RD_KEY_VALUE);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_4TH_KEY_VALUE);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
 
-	/* Write magic sequence to WriteSequence register
-	 * until enter diagnostic mode
-	 */
 	diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
-	while ((diag0val & MPI_DIAG_DRWE) == 0) {
-		CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
-		CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE);
-		CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_2ND_KEY_VALUE);
-		CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_3RD_KEY_VALUE);
-		CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_4TH_KEY_VALUE);
-		CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
+	diag0val |= (MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM);
+	CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
 
-		/* wait 100 msec */
+	/* wait 100 msec */
+	if (sleepFlag == CAN_SLEEP) {
+		set_current_state(TASK_INTERRUPTIBLE);
+		schedule_timeout(100 * HZ / 1000);
+	} else {
+		mdelay (100);
+	}
+
+	CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | MPI_DIAG_RESET_ADAPTER);
+
+	for (count = 0; count < 30; count ++) {
+		diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
+		if (!(diag0val & MPI_DIAG_RESET_ADAPTER)) {
+			ddlprintk((MYIOC_s_INFO_FMT "RESET_ADAPTER cleared, count=%d\n",
+				ioc->name, count));
+			break;
+		}
+		/* wait 1 sec */
 		if (sleepFlag == CAN_SLEEP) {
 			set_current_state(TASK_INTERRUPTIBLE);
-			schedule_timeout(100 * HZ / 1000);
+			schedule_timeout(HZ);
 		} else {
-			mdelay (100);
-		}
-
-		count++;
-		if (count > 20) {
-			printk(MYIOC_s_ERR_FMT "Enable Diagnostic mode FAILED! (%02xh)\n",
-					ioc->name, diag0val);
-			return -EFAULT;
-
+			mdelay (1000);
 		}
-
-		diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
-#ifdef MPT_DEBUG
-		if (ioc->alt_ioc)
-			diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic);
-		ddlprintk((MYIOC_s_INFO_FMT "DbGb3: diag0=%08x, diag1=%08x\n",
-				ioc->name, diag0val, diag1val));
-#endif
-		ddlprintk((MYIOC_s_INFO_FMT "Wrote magic DiagWriteEn sequence (%x)\n",
-				ioc->name, diag0val));
 	}
 
-	/* Set the DiagRwEn and Disable ARM bits */
-	diag0val |= (MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM);
-	CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
+	if ( count == 30 ) {
+		ddlprintk((MYIOC_s_INFO_FMT "downloadboot failed! Unable to RESET_ADAPTER diag0val=%x\n",
+		ioc->name, diag0val));
+		return -3;
+	}
 
-#ifdef MPT_DEBUG
-	if (ioc->alt_ioc)
-		diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_2ND_KEY_VALUE);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_3RD_KEY_VALUE);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_4TH_KEY_VALUE);
+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
 
-	ddlprintk((MYIOC_s_INFO_FMT "DbGb3: diag0=%08x, diag1=%08x\n",
-			ioc->name, diag0val, diag1val));
-#endif
+	/* Set the DiagRwEn and Disable ARM bits */
+	diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
+	CHIPREG_WRITE32(&ioc->chip->Diagnostic, (diag0val | MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM));
 
-	/* max_idx = 1 + maximum valid buffer index
-	 */
-	max_idx = 0;
-	while (pCached[max_idx])
-		max_idx++;
-
-	fw_idx = 0;
-	FwHdr = (MpiFwHeader_t *) pCached[fw_idx]->fw;
-	ptru32 = (u32 *) FwHdr;
-	count = (FwHdr->ImageSize + 3)/4;
-	nextImage = FwHdr->NextImageHeaderOffset;
+	pFwHeader = (MpiFwHeader_t *) ioc->cached_fw;
+	fwSize = (pFwHeader->ImageSize + 3)/4;
+	ptrFw = (u32 *) pFwHeader;
 
 	/* Write the LoadStartAddress to the DiagRw Address Register
 	 * using Programmed IO
 	 */
-	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, FwHdr->LoadStartAddress);
+	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->LoadStartAddress);
 	ddlprintk((MYIOC_s_INFO_FMT "LoadStart addr written 0x%x \n",
-		ioc->name, FwHdr->LoadStartAddress));
+		ioc->name, pFwHeader->LoadStartAddress));
 
-	ddlprintk((MYIOC_s_INFO_FMT "Write FW Image: 0x%x u32's @ %p\n",
-				ioc->name, count, ptru32));
-	left_u32s = pCached[fw_idx]->size/4;
-	while (count--) {
-		if (left_u32s == 0) {
-			fw_idx++;
-			if (fw_idx >= max_idx) {
-				/* FIXME
-				ERROR CASE
-				*/
-				;
-			}
-			ptru32 = (u32 *) pCached[fw_idx]->fw;
-			left_u32s = pCached[fw_idx]->size / 4;
-		}
-		left_u32s--;
-		CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, *ptru32);
-		ptru32++;
+	ddlprintk((MYIOC_s_INFO_FMT "Write FW Image: 0x%x bytes @ %p\n",
+				ioc->name, fwSize*4, ptrFw));
+	while (fwSize--) {
+		CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, *ptrFw++);
 	}
 
-	/* left_u32s, fw_idx and ptru32 are all valid
-	 */
+	nextImage = pFwHeader->NextImageHeaderOffset;
 	while (nextImage) {
-		ext_idx = 0;
-		ext_offset = nextImage;
-		while (ext_offset > pCached[ext_idx]->size) {
-			ext_idx++;
-			if (ext_idx >= max_idx) {
-				/* FIXME
-				ERROR CASE
-				*/
-				;
-			}
-			ext_offset -= pCached[ext_idx]->size;
-		}
-		ptru32 = (u32 *) ((char *)pCached[ext_idx]->fw + ext_offset);
-		left_u32s = pCached[ext_idx]->size - ext_offset;
+		pExtImage = (MpiExtImageHeader_t *) ((char *)pFwHeader + nextImage);
 
-		if ((left_u32s * 4) >= sizeof(MpiExtImageHeader_t)) {
-			ExtHdr = (MpiExtImageHeader_t *) ptru32;
-			count = (ExtHdr->ImageSize + 3 )/4;
-			nextImage = ExtHdr->NextImageHeaderOffset;
-			load_addr = ExtHdr->LoadStartAddress;
-		} else {
-			u32 * ptmp = (u32 *)pCached[ext_idx+1]->fw;
+		load_addr = pExtImage->LoadStartAddress;
 
-			switch (left_u32s) {
-			case 5:
-				count = *(ptru32 + 2);
-				nextImage = *(ptru32 + 3);
-				load_addr = *(ptru32 + 4);
-				break;
-			case 4:
-				count = *(ptru32 + 2);
-				nextImage = *(ptru32 + 3);
-				load_addr = *ptmp;
-				break;
-			case 3:
-				count = *(ptru32 + 2);
-				nextImage = *ptmp;
-				load_addr = *(ptmp + 1);
-				break;
-			case 2:
-				count = *ptmp;
-				nextImage = *(ptmp + 1);
-				load_addr = *(ptmp + 2);
-				break;
-
-			case 1:
-				count = *(ptmp + 1);
-				nextImage = *(ptmp + 2);
-				load_addr = *(ptmp + 3);
-				break;
+		fwSize = (pExtImage->ImageSize + 3) >> 2;
+		ptrFw = (u32 *)pExtImage;
 
-			default:
-				count = 0;
-				nextImage = 0;
-				load_addr = 0;
-				/* FIXME
-				ERROR CASE
-				*/
-				;
-
-			}
-			count = (count +3)/4;
-		}
-
-		ddlprintk((MYIOC_s_INFO_FMT "Write Ext Image: 0x%x u32's @ %p\n",
-						ioc->name, count, ptru32));
+		ddlprintk((MYIOC_s_INFO_FMT "Write Ext Image: 0x%x bytes @ %p load_addr=%x\n",
+						ioc->name, fwSize*4, ptrFw, load_addr));
 		CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, load_addr);
 
-		while (count--) {
-			if (left_u32s == 0) {
-				fw_idx++;
-				if (fw_idx >= max_idx) {
-					/* FIXME
-					ERROR CASE
-					*/
-					;
-				}
-				ptru32 = (u32 *) pCached[fw_idx]->fw;
-				left_u32s = pCached[fw_idx]->size / 4;
-			}
-			left_u32s--;
-			CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, *ptru32);
-			ptru32++;
+		while (fwSize--) {
+			CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, *ptrFw++);
 		}
+		nextImage = pExtImage->NextImageHeaderOffset;
 	}
 
 	/* Write the IopResetVectorRegAddr */
-	ddlprintk((MYIOC_s_INFO_FMT "Write IopResetVector Addr! \n", ioc->name));
-	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, FwHdr->IopResetRegAddr);
+	ddlprintk((MYIOC_s_INFO_FMT "Write IopResetVector Addr=%x! \n", ioc->name, 	pFwHeader->IopResetRegAddr));
+	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->IopResetRegAddr);
 
 	/* Write the IopResetVectorValue */
-	ddlprintk((MYIOC_s_INFO_FMT "Write IopResetVector Value! \n", ioc->name));
-	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, FwHdr->IopResetVectorValue);
+	ddlprintk((MYIOC_s_INFO_FMT "Write IopResetVector Value=%x! \n", ioc->name, pFwHeader->IopResetVectorValue));
+	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, pFwHeader->IopResetVectorValue);
+
+	/* clear the PREVENT_IOC_BOOT bit */
+	diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot diag0val=%x, turning off PREVENT_IOC_BOOT\n",
+		ioc->name, diag0val));
+	diag0val &= ~(MPI_DIAG_PREVENT_IOC_BOOT);
+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot now diag0val=%x\n",
+		ioc->name, diag0val));
+	CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
 
 	/* Clear the internal flash bad bit - autoincrementing register,
 	 * so must do two writes.
@@ -3300,15 +2979,63 @@
 	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, 0x3F000000);
 	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, diagRwData);
 
-	/* clear the RW enable and DISARM bits */
 	diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
-	diag0val &= ~(MPI_DIAG_DISABLE_ARM | MPI_DIAG_RW_ENABLE | MPI_DIAG_FLASH_BAD_SIG);
+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot diag0val=%x, turning off DISABLE_ARM, RW_ENABLE, RESET_HISTORY\n",
+		ioc->name, diag0val));
+	diag0val &= ~(MPI_DIAG_DISABLE_ARM | MPI_DIAG_RW_ENABLE | MPI_DIAG_RESET_HISTORY);
+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot now diag0val=%x\n",
+		ioc->name, diag0val));
 	CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
 
+	/* wait 100 msec */
+	if (sleepFlag == CAN_SLEEP) {
+		ddlprintk((MYIOC_s_INFO_FMT "CAN_SLEEP 100 msec before reset the sequencer\n", ioc->name));
+		set_current_state(TASK_INTERRUPTIBLE);
+		schedule_timeout(100 * HZ / 1000);
+	} else {
+		ddlprintk((MYIOC_s_INFO_FMT "mdelay 100 msec before reset the sequencer\n", ioc->name));
+		mdelay (100);
+	}
+
+	diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
+	if ( diag0val & (MPI_DIAG_FLASH_BAD_SIG | MPI_DIAG_DISABLE_ARM) ) {
+		ddlprintk((MYIOC_s_INFO_FMT "downloadboot failed, diag0val=%x FLASH_BAD_SIG | DISABLE_ARM on\n ",
+			ioc->name, diag0val));
+	}
 	/* Write 0xFF to reset the sequencer */
 	CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
 
-	return 0;
+	for (count=0; count<HZ*20; count++) {
+		if ((ioc_state = mpt_GetIocState(ioc, 0)) & MPI_IOC_STATE_READY) {
+			ddlprintk((MYIOC_s_INFO_FMT "downloadboot successful! (count=%d) IocState=%x\n",
+					ioc->name, count, ioc_state));
+/*			if ((r = GetIocFacts(ioc, sleepFlag, MPT_HOSTEVENT_IOC_BRINGUP)) != 0) {
+				if ((r = GetIocFacts(ioc, sleepFlag, MPT_HOSTEVENT_IOC_BRINGUP)) != 0) {
+					ddlprintk((MYIOC_s_INFO_FMT "GetIocFacts failed\n",
+						ioc->name));
+						return -EFAULT;
+				}
+			} */
+			/* wait 2 sec */
+/*			if (sleepFlag == CAN_SLEEP) {
+				set_current_state(TASK_INTERRUPTIBLE);
+				schedule_timeout(5000 * HZ / 1000);
+			} else {
+				mdelay (5000);
+			} */
+
+			return 0;
+		}
+		if (sleepFlag == CAN_SLEEP) {
+			set_current_state(TASK_INTERRUPTIBLE);
+			schedule_timeout(1);
+		} else {
+			mdelay (10);
+		}
+	}
+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot failed! IocState=%x\n",
+		ioc->name, ioc_state));
+	return -EFAULT;
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -3344,7 +3071,7 @@
 	u32 ioc_state;
 	int cntdn, cnt = 0;
 
-	dprintk((KERN_WARNING MYNAM ": KickStarting %s!\n", ioc->name));
+	dinitprintk((KERN_WARNING MYNAM ": KickStarting %s!\n", ioc->name));
 	if ((int)ioc->chip_type > (int)FC929) {
 		/* Always issue a Msg Unit Reset first. This will clear some
 		 * SCSI bus hang conditions.
@@ -3593,6 +3320,7 @@
 		/* Write magic sequence to WriteSequence register
 		 * Loop until in diagnostic mode
 		 */
+		CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
 		CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE);
 		CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_2ND_KEY_VALUE);
 		CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_3RD_KEY_VALUE);
@@ -3672,7 +3400,7 @@
 	u32 state;
 	int cntdn, count;
 
-	dprintk((KERN_WARNING MYNAM ": %s: Sending IOC reset(0x%02x)!\n",
+	drsprintk((KERN_WARNING MYNAM ": %s: Sending IOC reset(0x%02x)!\n",
 			ioc->name, reset_type));
 	CHIPREG_WRITE32(&ioc->chip->Doorbell, reset_type<<MPI_DOORBELL_FUNCTION_SHIFT);
 	if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0)
@@ -3799,7 +3527,8 @@
 
 		/*  Prime reply FIFO...  */
 		dprintk((KERN_INFO MYNAM ": %s.reply_alloc  @ %p[%p], sz=%d bytes\n",
-			 	ioc->name, mem, (void *)(ulong)ioc->reply_alloc_dma, reply_buffer_sz));
+			ioc->name, ioc->reply_alloc, 
+			(void *)(ulong)ioc->reply_alloc_dma, reply_buffer_sz));
 
 		b = (unsigned long) ioc->reply_alloc;
 		b = (b + (0x80UL - 1UL)) & ~(0x80UL - 1UL); /* round up to 128-byte boundary */
@@ -3812,7 +3541,8 @@
 	
 		/*  Request FIFO - WE manage this!  */
 		dprintk((KERN_INFO MYNAM ": %s.req_alloc    @ %p[%p], sz=%d bytes\n",
-			 	ioc->name, mem, (void *)(ulong)ioc->req_alloc_dma, request_buffer_sz));
+			ioc->name, ioc->req_alloc,
+			(void *)(ulong)ioc->req_alloc_dma, request_buffer_sz));
 
 		b = (unsigned long) ioc->req_alloc;
 		b = (b + (0x80UL - 1UL)) & ~(0x80UL - 1UL); /* round up to 128-byte boundary */
@@ -4009,6 +3739,9 @@
 		 */
 		if (!failcnt && (t = WaitForDoorbellReply(ioc, maxwait, sleepFlag)) < 0)
 			failcnt++;
+		
+		dhsprintk((MYIOC_s_INFO_FMT "HandShake reply count=%d%s\n",
+				ioc->name, t, failcnt ? " - MISSING DOORBELL REPLY!" : ""));
 
 		/*
 		 * Copy out the cached reply...
@@ -4040,7 +3773,7 @@
 {
 	int cntdn;
 	int count = 0;
-	u32 intstat;
+	u32 intstat=0;
 
 	cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * howlong;
 
@@ -4064,13 +3797,13 @@
 	}
 
 	if (cntdn) {
-		dhsprintk((MYIOC_s_INFO_FMT "WaitForDoorbell ACK (cnt=%d)\n",
+		dprintk((MYIOC_s_INFO_FMT "WaitForDoorbell ACK (count=%d)\n",
 				ioc->name, count));
 		return count;
 	}
 
-	printk(MYIOC_s_ERR_FMT "Doorbell ACK timeout(%d)!\n",
-			ioc->name, (count+5)/HZ);
+	printk(MYIOC_s_ERR_FMT "Doorbell ACK timeout (count=%d), IntStatus=%x!\n",
+			ioc->name, count, intstat);
 	return -1;
 }
 
@@ -4091,7 +3824,7 @@
 {
 	int cntdn;
 	int count = 0;
-	u32 intstat;
+	u32 intstat=0;
 
 	cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * howlong;
 	if (sleepFlag == CAN_SLEEP) {
@@ -4114,13 +3847,13 @@
 	}
 
 	if (cntdn) {
-		dhsprintk((MYIOC_s_INFO_FMT "WaitForDoorbell INT (cnt=%d)\n",
-				ioc->name, count));
+		dprintk((MYIOC_s_INFO_FMT "WaitForDoorbell INT (cnt=%d) howlong=%d\n",
+				ioc->name, count, howlong));
 		return count;
 	}
 
-	printk(MYIOC_s_ERR_FMT "Doorbell INT timeout(%d)!\n",
-			ioc->name, (count+5)/HZ);
+	printk(MYIOC_s_ERR_FMT "Doorbell INT timeout (count=%d), IntStatus=%x!\n",
+			ioc->name, count, intstat);
 	return -1;
 }
 
@@ -4166,8 +3899,8 @@
 		}
 	}
 
-	dhsprintk((MYIOC_s_INFO_FMT "First handshake reply word=%08x%s\n",
-			ioc->name, le32_to_cpu(*(u32 *)hs_reply),
+	dhsprintk((MYIOC_s_INFO_FMT "WaitCnt=%d First handshake reply word=%08x%s\n",
+			ioc->name, t, le32_to_cpu(*(u32 *)hs_reply), 
 			failcnt ? " - MISSING DOORBELL HANDSHAKE!" : ""));
 
 	/*
@@ -4205,8 +3938,8 @@
 	dmfprintk((MYIOC_s_INFO_FMT "Got Handshake reply:\n", ioc->name));
 	DBG_DUMP_REPLY_FRAME(mptReply)
 
-	dhsprintk((MYIOC_s_INFO_FMT "WaitForDoorbell REPLY (sz=%d)\n",
-			ioc->name, u16cnt/2));
+	dhsprintk((MYIOC_s_INFO_FMT "WaitForDoorbell REPLY WaitCnt=%d (sz=%d)\n",
+			ioc->name, t, u16cnt/2));
 	return u16cnt/2;
 }
 
@@ -4998,7 +4731,7 @@
 {
 	EventNotification_t	*evnp;
 
-	evnp = (EventNotification_t *) mpt_get_msg_frame(mpt_base_index, ioc->id);
+	evnp = (EventNotification_t *) mpt_get_msg_frame(mpt_base_index, ioc);
 	if (evnp == NULL) {
 		dprintk((MYIOC_s_WARN_FMT "Unable to allocate event request frame!\n",
 				ioc->name));
@@ -5013,7 +4746,7 @@
 	evnp->MsgFlags = 0;
 	evnp->Switch = EvSwitch;
 
-	mpt_put_msg_frame(mpt_base_index, ioc->id, (MPT_FRAME_HDR *)evnp);
+	mpt_put_msg_frame(mpt_base_index, ioc, (MPT_FRAME_HDR *)evnp);
 
 	return 0;
 }
@@ -5029,7 +4762,7 @@
 {
 	EventAck_t	*pAck;
 
-	if ((pAck = (EventAck_t *) mpt_get_msg_frame(mpt_base_index, ioc->id)) == NULL) {
+	if ((pAck = (EventAck_t *) mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
 		printk(MYIOC_s_WARN_FMT "Unable to allocate event ACK request frame!\n",
 				ioc->name);
 		return -1;
@@ -5044,7 +4777,7 @@
 	pAck->Event        = evnp->Event;
 	pAck->EventContext = evnp->EventContext;
 
-	mpt_put_msg_frame(mpt_base_index, ioc->id, (MPT_FRAME_HDR *)pAck);
+	mpt_put_msg_frame(mpt_base_index, ioc, (MPT_FRAME_HDR *)pAck);
 
 	return 0;
 }
@@ -5070,7 +4803,7 @@
 	MPT_FRAME_HDR	*mf;
 	unsigned long	 flags;
 	int		 ii, rc;
-	int		 flagsLength;
+	u32		 flagsLength;
 	int		 in_isr;
 
 	/* (Bugzilla:fibrebugs, #513)
@@ -5087,7 +4820,7 @@
 
 	/* Get and Populate a free Frame
 	 */
-	if ((mf = mpt_get_msg_frame(mpt_base_index, ioc->id)) == NULL) {
+	if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
 		dcprintk((MYIOC_s_WARN_FMT "mpt_config: no msg frames!\n",
 				ioc->name));
 		return -EAGAIN;
@@ -5146,7 +4879,7 @@
 	spin_unlock_irqrestore(&ioc->FreeQlock, flags);
 
 	add_timer(&pCfg->timer);
-	mpt_put_msg_frame(mpt_base_index, ioc->id, mf);
+	mpt_put_msg_frame(mpt_base_index, ioc, mf);
 	wait_event(mpt_waitq, pCfg->wait_done);
 
 	/* mf has been freed - do not access */
@@ -5174,10 +4907,11 @@
 mpt_toolbox(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg)
 {
 	ToolboxIstwiReadWriteRequest_t	*pReq;
+	struct pci_dev	*pdev;
 	MPT_FRAME_HDR	*mf;
 	unsigned long	 flags;
 	int		 rc;
-	int		 flagsLength;
+	u32		 flagsLength;
 	int		 in_isr;
 
 	/* (Bugzilla:fibrebugs, #513)
@@ -5194,7 +4928,7 @@
 
 	/* Get and Populate a free Frame
 	 */
-	if ((mf = mpt_get_msg_frame(mpt_base_index, ioc->id)) == NULL) {
+	if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
 		dcprintk((MYIOC_s_WARN_FMT "mpt_toolbox: no msg frames!\n",
 				ioc->name));
 		return -EAGAIN;
@@ -5213,7 +4947,11 @@
 	pReq->NumAddressBytes = 0x01;
 	pReq->Reserved4 = 0;
 	pReq->DataLength = 0x04;
-	pReq->DeviceAddr = 0xB0;
+	pdev = (struct pci_dev *) ioc->pcidev;
+	if (pdev->devfn & 1)
+		pReq->DeviceAddr = 0xB2;
+	else
+		pReq->DeviceAddr = 0xB0;
 	pReq->Addr1 = 0;
 	pReq->Addr2 = 0;
 	pReq->Addr3 = 0;
@@ -5252,7 +4990,7 @@
 	spin_unlock_irqrestore(&ioc->FreeQlock, flags);
 
 	add_timer(&pCfg->timer);
-	mpt_put_msg_frame(mpt_base_index, ioc->id, mf);
+	mpt_put_msg_frame(mpt_base_index, ioc, mf);
 	wait_event(mpt_waitq, pCfg->wait_done);
 
 	/* mf has been freed - do not access */
@@ -5366,61 +5104,19 @@
 static int
 procmpt_create(void)
 {
-	MPT_ADAPTER		*ioc;
 	struct proc_dir_entry	*ent;
-	int	 ii;
 
-	/*
-	 *	BEWARE: If/when MPT_PROCFS_MPTBASEDIR changes from "mpt"
-	 *	(single level) to multi level (e.g. "driver/message/fusion")
-	 *	something here needs to change.  -sralston
-	 */
 	mpt_proc_root_dir = proc_mkdir(MPT_PROCFS_MPTBASEDIR, NULL);
 	if (mpt_proc_root_dir == NULL)
 		return -ENOTDIR;
 
-	for (ii=0; ii < MPT_PROC_ENTRIES; ii++) {
-		ent = create_proc_entry(mpt_proc_list[ii].name,
-				S_IFREG|S_IRUGO, mpt_proc_root_dir);
-		if (!ent) {
-			printk(KERN_WARNING MYNAM
-					": WARNING - Could not create /proc/mpt/%s entry\n",
-					mpt_proc_list[ii].name);
-			continue;
-		}
-		ent->read_proc = mpt_proc_list[ii].f;
-		ent->data      = NULL;
-	}
-
-	ioc = mpt_adapter_find_first();
-	while (ioc != NULL) {
-		struct proc_dir_entry	*dent;
-		/*
-		 *  Create "/proc/mpt/iocN" subdirectory entry for each MPT adapter.
-		 */
-		if ((dent = proc_mkdir(ioc->name, mpt_proc_root_dir)) != NULL) {
-			/*
-			 *  And populate it with mpt_ioc_proc_list[] entries.
-			 */
-			for (ii=0; ii < MPT_IOC_PROC_ENTRIES; ii++) {
-				ent = create_proc_entry(mpt_ioc_proc_list[ii].name,
-						S_IFREG|S_IRUGO, dent);
-				if (!ent) {
-					printk(KERN_WARNING MYNAM
-							": WARNING - Could not create /proc/mpt/%s/%s entry!\n",
-							ioc->name,
-							mpt_ioc_proc_list[ii].name);
-					continue;
-				}
-				ent->read_proc = mpt_ioc_proc_list[ii].f;
-				ent->data      = ioc;
-			}
-		} else {
-			printk(MYIOC_s_WARN_FMT "Could not create /proc/mpt/%s subdir entry!\n",
-					ioc->name, mpt_ioc_proc_list[ii].name);
-		}
-		ioc = mpt_adapter_find_next(ioc);
-	}
+	ent = create_proc_entry("summary", S_IFREG|S_IRUGO, mpt_proc_root_dir);
+	if (ent)
+		ent->read_proc = procmpt_summary_read;
+
+	ent = create_proc_entry("version", S_IFREG|S_IRUGO, mpt_proc_root_dir);
+	if (ent)
+		ent->read_proc = procmpt_version_read;
 
 	return 0;
 }
@@ -5431,49 +5127,12 @@
  *
  *	Returns 0 for success, non-zero for failure.
  */
-static int
+static void
 procmpt_destroy(void)
 {
-	MPT_ADAPTER	*ioc;
-	int		 ii;
-
-	if (!mpt_proc_root_dir)
-		return 0;
-
-	/*
-	 *	BEWARE: If/when MPT_PROCFS_MPTBASEDIR changes from "mpt"
-	 *	(single level) to multi level (e.g. "driver/message/fusion")
-	 *	something here needs to change.  -sralston
-	 */
-
-	ioc = mpt_adapter_find_first();
-	while (ioc != NULL) {
-		char pname[32];
-		int namelen;
-
-		namelen = sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s", ioc->name);
-
-		/*
-		 *  Tear down each "/proc/mpt/iocN" subdirectory.
-		 */
-		for (ii=0; ii < MPT_IOC_PROC_ENTRIES; ii++) {
-			(void) sprintf(pname+namelen, "/%s", mpt_ioc_proc_list[ii].name);
-			remove_proc_entry(pname, NULL);
-		}
-		remove_proc_entry(ioc->name, mpt_proc_root_dir);
-		ioc = mpt_adapter_find_next(ioc);
-	}
-
-	for (ii=0; ii < MPT_PROC_ENTRIES; ii++)
-		remove_proc_entry(mpt_proc_list[ii].name, mpt_proc_root_dir);
-
-	if (atomic_read((atomic_t *)&mpt_proc_root_dir->count) == 0) {
-		remove_proc_entry(MPT_PROCFS_MPTBASEDIR, NULL);
-		mpt_proc_root_dir = NULL;
-		return 0;
-	}
-
-	return -1;
+	remove_proc_entry("version", mpt_proc_root_dir);
+	remove_proc_entry("summary", mpt_proc_root_dir);
+	remove_proc_entry(MPT_PROCFS_MPTBASEDIR, NULL);
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -5496,26 +5155,25 @@
 	char *out = buf;
 	int len;
 
-	if (data == NULL)
-		ioc = mpt_adapter_find_first();
-	else
-		ioc = data;
-
-	while (ioc) {
-		int	more = 0;
+	if (data) {
+		int more = 0;
 
+		ioc = data;
 		mpt_print_ioc_summary(ioc, out, &more, 0, 1);
 
 		out += more;
-		if ((out-buf) >= request) {
-			break;
-		}
+	} else {
+		list_for_each_entry(ioc, &ioc_list, list) {
+			int	more = 0;
 
-		if (data == NULL)
-			ioc = mpt_adapter_find_next(ioc);
-		else
-			ioc = NULL;		/* force exit for iocN */
+			mpt_print_ioc_summary(ioc, out, &more, 0, 1);
+
+			out += more;
+			if ((out-buf) >= request)
+				break;
+		}
 	}
+
 	len = out - buf;
 
 	MPT_PROC_READ_RETURN(buf,start,offset,request,eof,len);
@@ -6293,7 +5951,7 @@
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 
-EXPORT_SYMBOL(mpt_adapters);
+EXPORT_SYMBOL(ioc_list);
 EXPORT_SYMBOL(mpt_proc_root_dir);
 EXPORT_SYMBOL(DmpService);
 EXPORT_SYMBOL(mpt_register);
@@ -6311,8 +5969,6 @@
 EXPORT_SYMBOL(mpt_add_chain);
 EXPORT_SYMBOL(mpt_send_handshake_request);
 EXPORT_SYMBOL(mpt_handshake_req_reply_wait);
-EXPORT_SYMBOL(mpt_adapter_find_first);
-EXPORT_SYMBOL(mpt_adapter_find_next);
 EXPORT_SYMBOL(mpt_verify_adapter);
 EXPORT_SYMBOL(mpt_GetIocState);
 EXPORT_SYMBOL(mpt_print_ioc_summary);
@@ -6367,7 +6023,6 @@
 	show_mptmod_ver(my_NAME, my_VERSION);
 	printk(KERN_INFO COPYRIGHT "\n");
 
-	Q_INIT(&MptAdapters, MPT_ADAPTER);			/* set to empty */
 	for (i = 0; i < MPT_MAX_PROTOCOL_DRIVERS; i++) {
 		MptCallbacks[i] = NULL;
 		MptDriverClass[i] = MPTUNKNOWN_DRIVER;
@@ -6391,13 +6046,12 @@
 		/* FIXME! */
 	}
 
-	r = pci_module_init(&mptbase_driver);
-	if(r)
-		return(r);
-
 #ifdef CONFIG_PROC_FS
 	(void) procmpt_create();
 #endif
+	r = pci_module_init(&mptbase_driver);
+	if(r)
+		return(r);
 
 	return r;
 }
@@ -6413,16 +6067,14 @@
 fusion_exit(void)
 {
 
-	dprintk((KERN_INFO MYNAM ": fusion_exit() called!\n"));
+	dexitprintk((KERN_INFO MYNAM ": fusion_exit() called!\n"));
 
-	/* Whups?  20010120 -sralston
-	 *  Moved this *above* removal of all MptAdapters!
-	 */
-#ifdef CONFIG_PROC_FS
-	(void) procmpt_destroy();
-#endif
 	pci_unregister_driver(&mptbase_driver);
 	mpt_reset_deregister(mpt_base_index);
+
+#ifdef CONFIG_PROC_FS
+	procmpt_destroy();
+#endif
 }
 
 
--- diff/drivers/message/fusion/mptbase.h	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/message/fusion/mptbase.h	2004-07-01 21:32:37.000000000 +0100
@@ -55,7 +55,11 @@
 #define MPTBASE_H_INCLUDED
 /*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 
-#include "linux_compat.h"	/* linux-2.2.x (vs. -2.4.x) tweaks */
+#include <linux/version.h>
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+
 #include "scsi3.h"		/* SCSI defines */
 
 #include "lsi/mpi_type.h"
@@ -81,8 +85,8 @@
 #define COPYRIGHT	"Copyright (c) 1999-2004 " MODULEAUTHOR
 #endif
 
-#define MPT_LINUX_VERSION_COMMON	"3.01.06"
-#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-3.01.06"
+#define MPT_LINUX_VERSION_COMMON	"3.01.09"
+#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-3.01.09"
 #define WHAT_MAGIC_STRING		"@" "(" "#" ")"
 
 #define show_mptmod_ver(s,ver)  \
@@ -577,13 +581,6 @@
 	u8		 rsvd[1];
 } ScsiCfgData;
 
-typedef struct _fw_image {
-	char		*fw;
-	dma_addr_t	 fw_dma;
-	u32		 size;
-	u32		 rsvd;
-} fw_image_t;
-
 /*
  *  Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS
  */
@@ -655,9 +652,9 @@
 	int			timeout_maxcnt;
 #endif
 	struct _mpt_ioctl_events *events;	/* pointer to event log */
-	fw_image_t		**cached_fw;	/* Pointer to FW SG List */
+	u8			*cached_fw;	/* Pointer to FW */
+	dma_addr_t	 	cached_fw_dma;
 	Q_TRACKER		 configQ;	/* linked list of config. requests */
-	int			 num_fw_frags;	/* Number of SGE in FW SG List */
 	int			 hs_reply_idx;
 #ifndef MFCNT
 	u32			 pad0;
@@ -678,6 +675,7 @@
 	u8			 upload_fw;	/* If set, do a fw upload */
 	u8			 reload_fw;	/* Force a FW Reload on next reset */
 	u8			 pad1[5];
+	struct list_head	 list; 
 } MPT_ADAPTER;
 
 
@@ -738,6 +736,33 @@
 #define dprintk(x)
 #endif
 
+#ifdef MPT_DEBUG_INIT
+#define dinitprintk(x)  printk x
+#define DBG_DUMP_FW_REQUEST_FRAME(mfp) \
+	{	int  i, n = 10;						\
+		u32 *m = (u32 *)(mfp);					\
+		printk(KERN_INFO " ");					\
+		for (i=0; i<n; i++)					\
+			printk(" %08x", le32_to_cpu(m[i]));		\
+		printk("\n");						\
+	}
+#else
+#define dinitprintk(x)
+#define DBG_DUMP_FW_REQUEST_FRAME(mfp)
+#endif
+
+#ifdef MPT_DEBUG_EXIT
+#define dexitprintk(x)  printk x
+#else
+#define dexitprintk(x)
+#endif
+
+#ifdef MPT_DEBUG_RESET
+#define drsprintk(x)  printk x
+#else
+#define drsprintk(x)
+#endif
+
 #ifdef MPT_DEBUG_HANDSHAKE
 #define dhsprintk(x)  printk x
 #else
@@ -971,19 +996,6 @@
 	ushort			  sel_timeout[MPT_MAX_FC_DEVICES];
 } MPT_SCSI_HOST;
 
-/*
- *	Structure for overlaying onto scsi_cmnd->SCp area
- *	NOTE: SCp area is 36 bytes min, 44 bytes max?
- */
-typedef struct _scPrivate {
-	struct scsi_cmnd	*forw;
-	struct scsi_cmnd	*back;
-	void			*p1;
-	void			*p2;
-	u8			 io_path_id;	/* DMP */
-	u8			 pad[7];
-} scPrivate;
-
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
  *	More Dynamic Multi-Pathing stuff...
@@ -1045,31 +1057,29 @@
 extern void	 mpt_device_driver_deregister(int cb_idx);
 extern int	 mpt_register_ascqops_strings(void *ascqTable, int ascqtbl_sz, const char **opsTable);
 extern void	 mpt_deregister_ascqops_strings(void);
-extern MPT_FRAME_HDR	*mpt_get_msg_frame(int handle, int iocid);
-extern void	 mpt_free_msg_frame(int handle, int iocid, MPT_FRAME_HDR *mf);
-extern void	 mpt_put_msg_frame(int handle, int iocid, MPT_FRAME_HDR *mf);
+extern MPT_FRAME_HDR	*mpt_get_msg_frame(int handle, MPT_ADAPTER *ioc);
+extern void	 mpt_free_msg_frame(int handle, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
+extern void	 mpt_put_msg_frame(int handle, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
 extern void	 mpt_add_sge(char *pAddr, u32 flagslength, dma_addr_t dma_addr);
 extern void	 mpt_add_chain(char *pAddr, u8 next, u16 length, dma_addr_t dma_addr);
 
-extern int	 mpt_send_handshake_request(int handle, int iocid, int reqBytes, u32 *req, int sleepFlag);
+extern int	 mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag);
 extern int	 mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, u32 *req, int replyBytes, u16 *u16reply, int maxwait, int sleepFlag);
 extern int	 mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp);
-extern MPT_ADAPTER	*mpt_adapter_find_first(void);
-extern MPT_ADAPTER	*mpt_adapter_find_next(MPT_ADAPTER *prev);
 extern u32	 mpt_GetIocState(MPT_ADAPTER *ioc, int cooked);
 extern void	 mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buf, int *size, int len, int showlan);
 extern int	 mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag);
 extern int	 mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *cfg);
 extern int	 mpt_toolbox(MPT_ADAPTER *ioc, CONFIGPARMS *cfg);
-extern void	*mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size, int *frags, int *alloc_sz);
-extern void	 mpt_free_fw_memory(MPT_ADAPTER *ioc, fw_image_t **alt_img);
+extern void	 mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size);
+extern void	 mpt_free_fw_memory(MPT_ADAPTER *ioc);
 extern int	 mpt_findImVolumes(MPT_ADAPTER *ioc);
 extern int	 mpt_read_ioc_pg_3(MPT_ADAPTER *ioc);
 
 /*
  *  Public data decl's...
  */
-extern MPT_ADAPTER	 	*mpt_adapters[MPT_MAX_ADAPTERS];
+extern struct list_head	  ioc_list;
 extern struct proc_dir_entry	*mpt_proc_root_dir;
 extern DmpServices_t		*DmpService;
 
--- diff/drivers/message/fusion/mptctl.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/message/fusion/mptctl.c	2004-07-01 21:32:37.000000000 +0100
@@ -83,14 +83,16 @@
 #include <linux/pci.h>
 #include <linux/miscdevice.h>
 #include <linux/smp_lock.h>
+#include <linux/compat.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
-#include <linux/kdev_t.h>	/* needed for access to Scsi_Host struct */
-#include <linux/blkdev.h>
-#include "../../scsi/scsi.h"
-#include "../../scsi/hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>
 
 #define COPYRIGHT	"Copyright (c) 1999-2004 LSI Logic Corporation"
 #define MODULEAUTHOR	"Steven J. Ralston, Noah Romer, Pamela Delaney"
@@ -102,9 +104,6 @@
 #define my_VERSION	MPT_LINUX_VERSION_COMMON
 #define MYNAM		"mptctl"
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,62)
-EXPORT_NO_SYMBOLS;
-#endif
 MODULE_AUTHOR(MODULEAUTHOR);
 MODULE_DESCRIPTION(my_NAME);
 MODULE_LICENSE("GPL");
@@ -144,8 +143,8 @@
 /*
  * Private function calls.
  */
-static int mptctl_do_mpt_command (struct mpt_ioctl_command karg, char *mfPtr, int local);
-static int mptctl_do_fw_download(int ioc, char *ufwbuf, size_t fwlen);
+static int mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr);
+static int mptctl_do_fw_download(int ioc, char __user *ufwbuf, size_t fwlen);
 static MptSge_t *kbuf_alloc_2_sgl( int bytes, u32 dir, int sge_offset, int *frags,
 		struct buflist **blp, dma_addr_t *sglbuf_dma, MPT_ADAPTER *ioc);
 static void kfree_sgl( MptSge_t *sgl, dma_addr_t sgl_dma,
@@ -402,7 +401,7 @@
 
 	/* Send request
 	 */
-	if ((mf = mpt_get_msg_frame(mptctl_id, ioctl->ioc->id)) == NULL) {
+	if ((mf = mpt_get_msg_frame(mptctl_id, ioctl->ioc)) == NULL) {
 		dctlprintk((MYIOC_s_WARN_FMT "IssueTaskMgmt, no msg frames!!\n",
 				ioctl->ioc->name));
 
@@ -437,7 +436,7 @@
 	ioctl->status |= MPT_IOCTL_STATUS_TMTIMER_ACTIVE;
 	add_timer(&ioctl->TMtimer);
 
-	retval = mpt_send_handshake_request(mptctl_id, ioctl->ioc->id,
+	retval = mpt_send_handshake_request(mptctl_id, ioctl->ioc,
 			sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, NO_SLEEP);
 
 	if (retval != 0) {
@@ -446,7 +445,7 @@
 
 		mptctl_free_tm_flags(ioctl->ioc);
 		del_timer(&ioctl->TMtimer);
-		mpt_free_msg_frame(mptctl_id, ioctl->ioc->id, mf);
+		mpt_free_msg_frame(mptctl_id, ioctl->ioc, mf);
 		ioctl->tmPtr = NULL;
 	}
 
@@ -521,7 +520,7 @@
 		if (ioctl && (ioctl->status & MPT_IOCTL_STATUS_TMTIMER_ACTIVE)){
 			ioctl->status &= ~MPT_IOCTL_STATUS_TMTIMER_ACTIVE;
 			del_timer(&ioctl->TMtimer);
-			mpt_free_msg_frame(mptctl_id, ioc->id, ioctl->tmPtr);
+			mpt_free_msg_frame(mptctl_id, ioc, ioctl->tmPtr);
 		}
 
 	} else {
@@ -547,38 +546,6 @@
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
- *  struct file_operations functionality.
- *  Members:
- *	llseek, write, read, ioctl, open, release
- */
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,9)
-static loff_t
-mptctl_llseek(struct file *file, loff_t offset, int origin)
-{
-	return -ESPIPE;
-}
-#define no_llseek mptctl_llseek
-#endif
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-static ssize_t
-mptctl_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
-{
-	printk(KERN_ERR MYNAM ": ioctl WRITE not yet supported\n");
-	return 0;
-}
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-static ssize_t
-mptctl_read(struct file *file, char *buf, size_t count, loff_t *ptr)
-{
-	printk(KERN_ERR MYNAM ": ioctl READ not yet supported\n");
-	return 0;
-}
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
  *  MPT ioctl handler
  *  cmd - specify the particular IOCTL command to be issued
  *  arg - data specific to the command. Must not be null.
@@ -586,7 +553,7 @@
 static int
 mptctl_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
 {
-	mpt_ioctl_header	*uhdr = (mpt_ioctl_header *) arg;
+	mpt_ioctl_header __user *uhdr = (void __user *) arg;
 	mpt_ioctl_header	 khdr;
 	int iocnum;
 	unsigned iocnumX;
@@ -599,7 +566,7 @@
 	if (copy_from_user(&khdr, uhdr, sizeof(khdr))) {
 		printk(KERN_ERR "%s::mptctl_ioctl() @%d - "
 				"Unable to copy mpt_ioctl_header data @ %p\n",
-				__FILE__, __LINE__, (void*)uhdr);
+				__FILE__, __LINE__, uhdr);
 		return -EFAULT;
 	}
 	ret = -ENXIO;				/* (-6) No such device or address */
@@ -671,7 +638,7 @@
 
 static int mptctl_do_reset(unsigned long arg)
 {
-	struct mpt_ioctl_diag_reset *urinfo = (struct mpt_ioctl_diag_reset *) arg;
+	struct mpt_ioctl_diag_reset __user *urinfo = (void __user *) arg;
 	struct mpt_ioctl_diag_reset krinfo;
 	MPT_ADAPTER		*iocp;
 
@@ -680,7 +647,7 @@
 	if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
 		printk(KERN_ERR "%s@%d::mptctl_do_reset - "
 				"Unable to copy mpt_ioctl_diag_reset struct @ %p\n",
-				__FILE__, __LINE__, (void*)urinfo);
+				__FILE__, __LINE__, urinfo);
 		return -EFAULT;
 	}
 
@@ -700,21 +667,6 @@
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-static int mptctl_open(struct inode *inode, struct file *file)
-{
-	/*
-	 * Should support multiple management users
-	 */
-	return 0;
-}
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-static int mptctl_release(struct inode *inode, struct file *file)
-{
-	return 0;
-}
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
  * MPT FW download function.  Cast the arg into the mpt_fw_xfer structure.
  * This structure contains: iocnum, firmware length (bytes),
@@ -734,14 +686,14 @@
 static int
 mptctl_fw_download(unsigned long arg)
 {
-	struct mpt_fw_xfer	*ufwdl = (struct mpt_fw_xfer *) arg;
+	struct mpt_fw_xfer __user *ufwdl = (void __user *) arg;
 	struct mpt_fw_xfer	 kfwdl;
 
 	dctlprintk((KERN_INFO "mptctl_fwdl called. mptctl_id = %xh\n", mptctl_id)); //tc
 	if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
 		printk(KERN_ERR "%s@%d::_ioctl_fwdl - "
 				"Unable to copy mpt_fw_xfer struct @ %p\n",
-				__FILE__, __LINE__, (void*)ufwdl);
+				__FILE__, __LINE__, ufwdl);
 		return -EFAULT;
 	}
 
@@ -763,7 +715,7 @@
  *		-ENOMSG if FW upload returned bad status
  */
 static int
-mptctl_do_fw_download(int ioc, char *ufwbuf, size_t fwlen)
+mptctl_do_fw_download(int ioc, char __user *ufwbuf, size_t fwlen)
 {
 	FWDownload_t		*dlmsg;
 	MPT_FRAME_HDR		*mf;
@@ -800,7 +752,7 @@
 
 	/*  Valid device. Get a message frame and construct the FW download message.
 	 */
-	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL)
+	if ((mf = mpt_get_msg_frame(mptctl_id, iocp)) == NULL)
 		return -EAGAIN;
 	dlmsg = (FWDownload_t*) mf;
 	ptsge = (FWDownloadTCSGE_t *) &dlmsg->SGL;
@@ -892,7 +844,7 @@
 			if (copy_from_user(bl->kptr, ufwbuf+fw_bytes_copied, bl->len)) {
 				printk(KERN_ERR "%s@%d::_ioctl_fwdl - "
 						"Unable to copy f/w buffer hunk#%d @ %p\n",
-						__FILE__, __LINE__, n, (void*)ufwbuf);
+						__FILE__, __LINE__, n, ufwbuf);
 				goto fwdl_out;
 			}
 			fw_bytes_copied += bl->len;
@@ -916,7 +868,7 @@
 	 * Finally, perform firmware download.
 	 */
 	ReplyMsg = NULL;
-	mpt_put_msg_frame(mptctl_id, ioc, mf);
+	mpt_put_msg_frame(mptctl_id, iocp, mf);
 
 	/*
 	 *  Wait until the reply has been received
@@ -1198,7 +1150,7 @@
 static int
 mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
 {
-	struct mpt_ioctl_iocinfo *uarg = (struct mpt_ioctl_iocinfo *) arg;
+	struct mpt_ioctl_iocinfo __user *uarg = (void __user *) arg;
 	struct mpt_ioctl_iocinfo *karg;
 	MPT_ADAPTER		*ioc;
 	struct pci_dev		*pdev;
@@ -1238,7 +1190,7 @@
 	if (copy_from_user(karg, uarg, data_size)) {
 		printk(KERN_ERR "%s@%d::mptctl_getiocinfo - "
 			"Unable to read in mpt_ioctl_iocinfo struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		kfree(karg);
 		return -EFAULT;
 	}
@@ -1278,10 +1230,8 @@
 	karg->pciId = pdev->device;
 	pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
 	karg->hwRev = revision;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 	karg->subSystemDevice = pdev->subsystem_device;
 	karg->subSystemVendor = pdev->subsystem_vendor;
-#endif
 
 	if (cim_rev == 1) {
 		/* Get the PCI bus, device, and function numbers for the IOC
@@ -1335,10 +1285,10 @@
 
 	/* Copy the data from kernel memory to user memory
 	 */
-	if (copy_to_user((char *)arg, karg, data_size)) {
+	if (copy_to_user((char __user *)arg, karg, data_size)) {
 		printk(KERN_ERR "%s@%d::mptctl_getiocinfo - "
 			"Unable to write out mpt_ioctl_iocinfo struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		kfree(karg);
 		return -EFAULT;
 	}
@@ -1360,7 +1310,7 @@
 static int
 mptctl_gettargetinfo (unsigned long arg)
 {
-	struct mpt_ioctl_targetinfo *uarg = (struct mpt_ioctl_targetinfo *) arg;
+	struct mpt_ioctl_targetinfo __user *uarg = (void __user *) arg;
 	struct mpt_ioctl_targetinfo karg;
 	MPT_ADAPTER		*ioc;
 	struct Scsi_Host	*sh;
@@ -1369,6 +1319,7 @@
 	char			*pmem;
 	int			*pdata;
 	IOCPage2_t		*pIoc2;
+	IOCPage3_t		*pIoc3;
 	int			iocnum;
 	int			numDevices = 0;
 	unsigned int		max_id;
@@ -1382,7 +1333,7 @@
 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_targetinfo))) {
 		printk(KERN_ERR "%s@%d::mptctl_gettargetinfo - "
 			"Unable to read in mpt_ioctl_targetinfo struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -1445,53 +1396,57 @@
 		if (hd && hd->Targets) {
 			mpt_findImVolumes(ioc);
 			pIoc2 = ioc->spi_data.pIocPg2;
-			for ( id = 0; id <= max_id; id++ ) {
-				if ( pIoc2 && pIoc2->NumActiveVolumes &&
-					( id == pIoc2->RaidVolume[0].VolumeID ) ) {
-					if (maxWordsLeft <= 0) {
-						printk(KERN_ERR "mptctl_gettargetinfo - "
+			for ( id = 0; id <= max_id; ) {
+				if ( pIoc2 && pIoc2->NumActiveVolumes ) {
+					if ( id == pIoc2->RaidVolume[0].VolumeID ) {
+						if (maxWordsLeft <= 0) {
+							printk(KERN_ERR "mptctl_gettargetinfo - "
 			"buffer is full but volume is available on ioc %d\n, numDevices=%d", iocnum, numDevices);
-						goto data_space_full;
-					}
-                    			if ( ( pIoc2->RaidVolume[0].Flags & MPI_IOCPAGE2_FLAG_VOLUME_INACTIVE ) == 0 )
-                        			devType = 0x80;
-                    			else
-                        			devType = 0xC0;
-					bus_id = pIoc2->RaidVolume[0].VolumeBus;
-	            			numDevices++;
-                    			*pdata = ( (devType << 24) | (bus_id << 8) | id );
-					dctlprintk((KERN_ERR "mptctl_gettargetinfo - "
+							goto data_space_full;
+						}
+						if ( ( pIoc2->RaidVolume[0].Flags & MPI_IOCPAGE2_FLAG_VOLUME_INACTIVE ) == 0 )
+                        				devType = 0x80;
+                    				else
+                        				devType = 0xC0;
+						bus_id = pIoc2->RaidVolume[0].VolumeBus;
+	            				numDevices++;
+                    				*pdata = ( (devType << 24) | (bus_id << 8) | id );
+						dctlprintk((KERN_ERR "mptctl_gettargetinfo - "
 		"volume ioc=%d target=%x numDevices=%d pdata=%p\n", iocnum, *pdata, numDevices, pdata));
-                    			pdata++;
-					--maxWordsLeft;
-            			} else {
-					vdev = hd->Targets[id];
-					if (vdev) {
-						for (jj = 0; jj <= MPT_LAST_LUN; jj++) {
-							lun_index = (jj >> 5);
-							indexed_lun = (jj % 32);
-							lun = (1 << indexed_lun);
-							if (vdev->luns[lun_index] & lun) {
-								if (maxWordsLeft <= 0) {
-									printk(KERN_ERR
-									"mptctl_gettargetinfo - "
-									"buffer is full but more targets are available on ioc %d numDevices=%d\n",
-									iocnum, numDevices);
-									goto data_space_full;
-								}
-								bus_id = vdev->bus_id;
-								numDevices++;
-                            					*pdata = ( (jj << 16) | (bus_id << 8) | id );
-								dctlprintk((KERN_ERR
-								 "mptctl_gettargetinfo - "
-								 "target ioc=%d target=%x numDevices=%d pdata=%p\n",
-								 iocnum, *pdata, numDevices, pdata));
-								pdata++;
-								--maxWordsLeft;
+                    				pdata++;
+						--maxWordsLeft;
+						goto next_id;
+					} else {
+						pIoc3 = ioc->spi_data.pIocPg3;
+            					for ( jj = 0; jj < pIoc3->NumPhysDisks; jj++ ) {
+                    					if ( pIoc3->PhysDisk[jj].PhysDiskID == id )
+								goto next_id;
+						}
+					}
+				}
+				if ( (vdev = hd->Targets[id]) ) {
+					for (jj = 0; jj <= MPT_LAST_LUN; jj++) {
+						lun_index = (jj >> 5);
+						indexed_lun = (jj % 32);
+						lun = (1 << indexed_lun);
+						if (vdev->luns[lun_index] & lun) {
+							if (maxWordsLeft <= 0) {
+								printk(KERN_ERR "mptctl_gettargetinfo - "
+			"buffer is full but more targets are available on ioc %d numDevices=%d\n", iocnum, numDevices);
+								goto data_space_full;
 							}
+							bus_id = vdev->bus_id;
+							numDevices++;
+                            				*pdata = ( (jj << 16) | (bus_id << 8) | id );
+							dctlprintk((KERN_ERR "mptctl_gettargetinfo - "
+		"target ioc=%d target=%x numDevices=%d pdata=%p\n", iocnum, *pdata, numDevices, pdata));
+							pdata++;
+							--maxWordsLeft;
 						}
 					}
 				}
+next_id:
+				id++;
 			}
 		}
 	}
@@ -1500,21 +1455,21 @@
 
 	/* Copy part of the data from kernel memory to user memory
 	 */
-	if (copy_to_user((char *)arg, &karg,
+	if (copy_to_user((char __user *)arg, &karg,
 				sizeof(struct mpt_ioctl_targetinfo))) {
 		printk(KERN_ERR "%s@%d::mptctl_gettargetinfo - "
 			"Unable to write out mpt_ioctl_targetinfo struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		kfree(pmem);
 		return -EFAULT;
 	}
 
 	/* Copy the remaining data from kernel memory to user memory
 	 */
-	if (copy_to_user((char *) uarg->targetInfo, pmem, numBytes)) {
+	if (copy_to_user(uarg->targetInfo, pmem, numBytes)) {
 		printk(KERN_ERR "%s@%d::mptctl_gettargetinfo - "
 			"Unable to write out mpt_ioctl_targetinfo struct @ %p\n",
-				__FILE__, __LINE__, (void*)pdata);
+				__FILE__, __LINE__, pdata);
 		kfree(pmem);
 		return -EFAULT;
 	}
@@ -1535,7 +1490,7 @@
 static int
 mptctl_readtest (unsigned long arg)
 {
-	struct mpt_ioctl_test	*uarg = (struct mpt_ioctl_test *) arg;
+	struct mpt_ioctl_test __user *uarg = (void __user *) arg;
 	struct mpt_ioctl_test	 karg;
 	MPT_ADAPTER *ioc;
 	int iocnum;
@@ -1544,7 +1499,7 @@
 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
 		printk(KERN_ERR "%s@%d::mptctl_readtest - "
 			"Unable to read in mpt_ioctl_test struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -1571,10 +1526,10 @@
 
 	/* Copy the data from kernel memory to user memory
 	 */
-	if (copy_to_user((char *)arg, &karg, sizeof(struct mpt_ioctl_test))) {
+	if (copy_to_user((char __user *)arg, &karg, sizeof(struct mpt_ioctl_test))) {
 		printk(KERN_ERR "%s@%d::mptctl_readtest - "
 			"Unable to write out mpt_ioctl_test struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -1595,7 +1550,7 @@
 static int
 mptctl_eventquery (unsigned long arg)
 {
-	struct mpt_ioctl_eventquery	*uarg = (struct mpt_ioctl_eventquery *) arg;
+	struct mpt_ioctl_eventquery __user *uarg = (void __user *) arg;
 	struct mpt_ioctl_eventquery	 karg;
 	MPT_ADAPTER *ioc;
 	int iocnum;
@@ -1604,7 +1559,7 @@
 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
 		printk(KERN_ERR "%s@%d::mptctl_eventquery - "
 			"Unable to read in mpt_ioctl_eventquery struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -1620,10 +1575,10 @@
 
 	/* Copy the data from kernel memory to user memory
 	 */
-	if (copy_to_user((char *)arg, &karg, sizeof(struct mpt_ioctl_eventquery))) {
+	if (copy_to_user((char __user *)arg, &karg, sizeof(struct mpt_ioctl_eventquery))) {
 		printk(KERN_ERR "%s@%d::mptctl_eventquery - "
 			"Unable to write out mpt_ioctl_eventquery struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 	return 0;
@@ -1633,7 +1588,7 @@
 static int
 mptctl_eventenable (unsigned long arg)
 {
-	struct mpt_ioctl_eventenable	*uarg = (struct mpt_ioctl_eventenable *) arg;
+	struct mpt_ioctl_eventenable __user *uarg = (void __user *) arg;
 	struct mpt_ioctl_eventenable	 karg;
 	MPT_ADAPTER *ioc;
 	int iocnum;
@@ -1642,7 +1597,7 @@
 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
 		printk(KERN_ERR "%s@%d::mptctl_eventenable - "
 			"Unable to read in mpt_ioctl_eventenable struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -1680,7 +1635,7 @@
 static int
 mptctl_eventreport (unsigned long arg)
 {
-	struct mpt_ioctl_eventreport	*uarg = (struct mpt_ioctl_eventreport *) arg;
+	struct mpt_ioctl_eventreport __user *uarg = (void __user *) arg;
 	struct mpt_ioctl_eventreport	 karg;
 	MPT_ADAPTER		 *ioc;
 	int			 iocnum;
@@ -1690,7 +1645,7 @@
 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
 		printk(KERN_ERR "%s@%d::mptctl_eventreport - "
 			"Unable to read in mpt_ioctl_eventreport struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -1716,10 +1671,10 @@
 	/* Copy the data from kernel memory to user memory
 	 */
 	numBytes = max * sizeof(MPT_IOCTL_EVENTS);
-	if (copy_to_user((char *) uarg->eventData, ioc->events, numBytes)) {
+	if (copy_to_user(uarg->eventData, ioc->events, numBytes)) {
 		printk(KERN_ERR "%s@%d::mptctl_eventreport - "
 			"Unable to write out mpt_ioctl_eventreport struct @ %p\n",
-				__FILE__, __LINE__, (void*)ioc->events);
+				__FILE__, __LINE__, ioc->events);
 		return -EFAULT;
 	}
 
@@ -1730,21 +1685,17 @@
 static int
 mptctl_replace_fw (unsigned long arg)
 {
-	struct mpt_ioctl_replace_fw	*uarg = (struct mpt_ioctl_replace_fw *) arg;
+	struct mpt_ioctl_replace_fw __user *uarg = (void __user *) arg;
 	struct mpt_ioctl_replace_fw	 karg;
 	MPT_ADAPTER		 *ioc;
-	fw_image_t		 **fwmem = NULL;
 	int			 iocnum;
 	int			 newFwSize;
-	int			 num_frags, alloc_sz;
-	int			 ii;
-	u32			 offset;
 
 	dctlprintk(("mptctl_replace_fw called.\n"));
 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
 		printk(KERN_ERR "%s@%d::mptctl_replace_fw - "
 			"Unable to read in mpt_ioctl_replace_fw struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -1755,52 +1706,39 @@
 		return -ENODEV;
 	}
 
-	/* If not caching FW, return 0
+	/* If caching FW, Free the old FW image
 	 */
-	if ((ioc->cached_fw == NULL) && (ioc->alt_ioc) && (ioc->alt_ioc->cached_fw == NULL))
+	if (ioc->cached_fw == NULL)
 		return 0;
 
+	mpt_free_fw_memory(ioc);
+
 	/* Allocate memory for the new FW image
 	 */
 	newFwSize = karg.newImageSize;
-	fwmem = mpt_alloc_fw_memory(ioc, newFwSize, &num_frags, &alloc_sz);
-	if (fwmem == NULL)
-		return -ENOMEM;
 
-	offset = 0;
-	for (ii = 0; ii < num_frags; ii++) {
-		/* Copy the data from user memory to kernel space
-		 */
-		if (copy_from_user(fwmem[ii]->fw, uarg->newImage + offset, fwmem[ii]->size)) {
-			printk(KERN_ERR "%s@%d::mptctl_replace_fw - "
-				"Unable to read in mpt_ioctl_replace_fw image @ %p\n",
-					__FILE__, __LINE__, (void*)uarg);
-
-			mpt_free_fw_memory(ioc, fwmem);
-			return -EFAULT;
-		}
-		offset += fwmem[ii]->size;
-	}
+	if (newFwSize & 0x01)
+		newFwSize += 1;
+	if (newFwSize & 0x02)
+		newFwSize += 2;
 
+	mpt_alloc_fw_memory(ioc, newFwSize);
+	if (ioc->cached_fw == NULL)
+		return -ENOMEM;
 
-	/* Free the old FW image
+	/* Copy the data from user memory to kernel space
 	 */
-	if (ioc->cached_fw) {
-		mpt_free_fw_memory(ioc, 0);
-		ioc->cached_fw = fwmem;
-		ioc->alloc_total += alloc_sz;
-	} else if ((ioc->alt_ioc) && (ioc->alt_ioc->cached_fw)) {
-		mpt_free_fw_memory(ioc->alt_ioc, 0);
-		ioc->alt_ioc->cached_fw = fwmem;
-		ioc->alt_ioc->alloc_total += alloc_sz;
+	if (copy_from_user(ioc->cached_fw, uarg->newImage, newFwSize)) {
+		printk(KERN_ERR "%s@%d::mptctl_replace_fw - "
+				"Unable to read in mpt_ioctl_replace_fw image "
+				"@ %p\n", __FILE__, __LINE__, uarg);
+		mpt_free_fw_memory(ioc);
+		return -EFAULT;
 	}
 
 	/* Update IOCFactsReply
 	 */
 	ioc->facts.FWImageSize = newFwSize;
-	if (ioc->alt_ioc)
-		ioc->alt_ioc->facts.FWImageSize = newFwSize;
-
 	return 0;
 }
 
@@ -1819,7 +1757,7 @@
 static int
 mptctl_mpt_command (unsigned long arg)
 {
-	struct mpt_ioctl_command *uarg = (struct mpt_ioctl_command *) arg;
+	struct mpt_ioctl_command __user *uarg = (void __user *) arg;
 	struct mpt_ioctl_command  karg;
 	MPT_ADAPTER	*ioc;
 	int		iocnum;
@@ -1830,7 +1768,7 @@
 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
 		printk(KERN_ERR "%s@%d::mptctl_mpt_command - "
 			"Unable to read in mpt_ioctl_command struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -1841,7 +1779,7 @@
 		return -ENODEV;
 	}
 
-	rc = mptctl_do_mpt_command (karg, (char *) &uarg->MF, 0);
+	rc = mptctl_do_mpt_command (karg, &uarg->MF);
 
 	return rc;
 }
@@ -1859,7 +1797,7 @@
  *		-EPERM if SCSI I/O and target is untagged
  */
 static int
-mptctl_do_mpt_command (struct mpt_ioctl_command karg, char *mfPtr, int local)
+mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
 {
 	MPT_ADAPTER	*ioc;
 	MPT_FRAME_HDR	*mf = NULL;
@@ -1914,7 +1852,7 @@
 
 	/* Get a free request frame and save the message context.
 	 */
-        if ((mf = mpt_get_msg_frame(mptctl_id, ioc->id)) == NULL)
+        if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL)
                 return -EAGAIN;
 
 	hdr = (MPIHeader_t *) mf;
@@ -1923,23 +1861,15 @@
 
 	/* Copy the request frame
 	 * Reset the saved message context.
+	 * Request frame in user space
 	 */
-        if (local) {
-		/* Request frame in kernel space
-		 */
-		memcpy((char *)mf, (char *) mfPtr, karg.dataSgeOffset * 4);
-        } else {
-		/* Request frame in user space
-		 */
-		if (copy_from_user((char *)mf, (char *) mfPtr,
-					karg.dataSgeOffset * 4)){
-			printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
-				"Unable to read MF from mpt_ioctl_command struct @ %p\n",
-				__FILE__, __LINE__, (void*)mfPtr);
-			rc = -EFAULT;
-			goto done_free_mem;
-		}
-        }
+	if (copy_from_user(mf, mfPtr, karg.dataSgeOffset * 4)) {
+		printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
+			"Unable to read MF from mpt_ioctl_command struct @ %p\n",
+			__FILE__, __LINE__, mfPtr);
+		rc = -EFAULT;
+		goto done_free_mem;
+	}
 	hdr->MsgContext = cpu_to_le32(msgContext);
 
 
@@ -2220,7 +2150,7 @@
 						"%s@%d::mptctl_do_mpt_command - Unable "
 						"to read user data "
 						"struct @ %p\n",
-						__FILE__, __LINE__,(void*)karg.dataOutBufPtr);
+						__FILE__, __LINE__,karg.dataOutBufPtr);
 					rc =  -EFAULT;
 					goto done_free_mem;
 				}
@@ -2266,7 +2196,7 @@
 	add_timer(&ioc->ioctl->timer);
 
 	if (hdr->Function == MPI_FUNCTION_SCSI_TASK_MGMT) {
-		rc = mpt_send_handshake_request(mptctl_id, ioc->id,
+		rc = mpt_send_handshake_request(mptctl_id, ioc,
 				sizeof(SCSITaskMgmt_t), (u32*)mf, CAN_SLEEP);
 		if (rc == 0) {
 			wait_event(mptctl_wait, ioc->ioctl->wait_done);
@@ -2276,10 +2206,10 @@
 			del_timer(&ioc->ioctl->timer);
 			ioc->ioctl->status &= ~MPT_IOCTL_STATUS_TIMER_ACTIVE;
 			ioc->ioctl->status |= MPT_IOCTL_STATUS_TM_FAILED;
-			mpt_free_msg_frame(mptctl_id, ioc->id, mf);
+			mpt_free_msg_frame(mptctl_id, ioc, mf);
 		}
 	} else {
-		mpt_put_msg_frame(mptctl_id, ioc->id, mf);
+		mpt_put_msg_frame(mptctl_id, ioc, mf);
 		wait_event(mptctl_wait, ioc->ioctl->wait_done);
 	}
 
@@ -2321,12 +2251,12 @@
 			}
 
 			if (sz > 0) {
-				if (copy_to_user((char *)karg.replyFrameBufPtr,
+				if (copy_to_user(karg.replyFrameBufPtr,
 					 &ioc->ioctl->ReplyFrame, sz)){
 
 					 printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
 					 "Unable to write out reply frame %p\n",
-					 __FILE__, __LINE__, (void*)karg.replyFrameBufPtr);
+					 __FILE__, __LINE__, karg.replyFrameBufPtr);
 					 rc =  -ENODATA;
 					 goto done_free_mem;
 				}
@@ -2338,11 +2268,11 @@
 		if (ioc->ioctl->status & MPT_IOCTL_STATUS_SENSE_VALID) {
 			sz = min(karg.maxSenseBytes, MPT_SENSE_BUFFER_SIZE);
 			if (sz > 0) {
-				if (copy_to_user((char *)karg.senseDataPtr, ioc->ioctl->sense, sz)) {
+				if (copy_to_user(karg.senseDataPtr, ioc->ioctl->sense, sz)) {
 					printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
 					"Unable to write sense data to user %p\n",
 					__FILE__, __LINE__,
-					(void*)karg.senseDataPtr);
+					karg.senseDataPtr);
 					rc =  -ENODATA;
 					goto done_free_mem;
 				}
@@ -2355,12 +2285,12 @@
 		if ((ioc->ioctl->status & MPT_IOCTL_STATUS_COMMAND_GOOD) &&
 					(karg.dataInSize > 0) && (bufIn.kptr)) {
 
-			if (copy_to_user((char *)karg.dataInBufPtr,
+			if (copy_to_user(karg.dataInBufPtr,
 					 bufIn.kptr, karg.dataInSize)) {
 				printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
 					"Unable to write data to user %p\n",
 					__FILE__, __LINE__,
-					(void*)karg.dataInBufPtr);
+					karg.dataInBufPtr);
 				rc =  -ENODATA;
 			}
 		}
@@ -2394,7 +2324,7 @@
 	 * otherwise, failure occured after mf acquired.
 	 */
 	if (mf)
-		mpt_free_msg_frame(mptctl_id, ioc->id, mf);
+		mpt_free_msg_frame(mptctl_id, ioc, mf);
 
 	return rc;
 }
@@ -2413,7 +2343,7 @@
 static int
 mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
 {
-	hp_host_info_t	*uarg = (hp_host_info_t *) arg;
+	hp_host_info_t	__user *uarg = (void __user *) arg;
 	MPT_ADAPTER		*ioc;
 	struct pci_dev		*pdev;
 	char			*pbuf;
@@ -2437,7 +2367,7 @@
 	if (copy_from_user(&karg, uarg, sizeof(hp_host_info_t))) {
 		printk(KERN_ERR "%s@%d::mptctl_hp_host_info - "
 			"Unable to read in hp_host_info struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -2455,10 +2385,8 @@
 
 	karg.vendor = pdev->vendor;
 	karg.device = pdev->device;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 	karg.subsystem_id = pdev->subsystem_device;
 	karg.subsystem_vendor = pdev->subsystem_vendor;
-#endif
 	karg.devfn = pdev->devfn;
 	karg.bus = pdev->bus->number;
 
@@ -2540,7 +2468,7 @@
 		break;
 	}
 
-	karg.base_io_addr = pdev->PCI_BASEADDR_START(0);
+	karg.base_io_addr = pci_resource_start(pdev, 0);
 
 	if ((int)ioc->chip_type <= (int) FC929)
 		karg.bus_phys_width = HP_BUS_WIDTH_UNK;
@@ -2576,11 +2504,10 @@
 
 	/* Copy the data from kernel memory to user memory
 	 */
-	if (copy_to_user((char *)arg, &karg,
-				sizeof(hp_host_info_t))) {
+	if (copy_to_user((char __user *)arg, &karg, sizeof(hp_host_info_t))) {
 		printk(KERN_ERR "%s@%d::mptctl_hpgethostinfo - "
 			"Unable to write out hp_host_info @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -2602,7 +2529,7 @@
 static int
 mptctl_hp_targetinfo(unsigned long arg)
 {
-	hp_target_info_t	*uarg = (hp_target_info_t *) arg;
+	hp_target_info_t __user *uarg = (void __user *) arg;
 	SCSIDevicePage0_t	*pg0_alloc;
 	SCSIDevicePage3_t	*pg3_alloc;
 	MPT_ADAPTER		*ioc;
@@ -2619,7 +2546,7 @@
 	if (copy_from_user(&karg, uarg, sizeof(hp_target_info_t))) {
 		printk(KERN_ERR "%s@%d::mptctl_hp_targetinfo - "
 			"Unable to read in hp_host_targetinfo struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 	
@@ -2727,10 +2654,10 @@
 
 	/* Copy the data from kernel memory to user memory
 	 */
-	if (copy_to_user((char *)arg, &karg, sizeof(hp_target_info_t))) {
+	if (copy_to_user((char __user *)arg, &karg, sizeof(hp_target_info_t))) {
 		printk(KERN_ERR "%s@%d::mptctl_hp_target_info - "
 			"Unable to write out mpt_ioctl_targetinfo struct @ %p\n",
-				__FILE__, __LINE__, (void*)uarg);
+				__FILE__, __LINE__, uarg);
 		return -EFAULT;
 	}
 
@@ -2739,20 +2666,10 @@
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,51)
-#define	owner_THIS_MODULE  .owner = THIS_MODULE,
-#else
-#define	owner_THIS_MODULE
-#endif
-
 static struct file_operations mptctl_fops = {
-	owner_THIS_MODULE
+	.owner =	THIS_MODULE,
 	.llseek =	no_llseek,
-	.read =		mptctl_read,
-	.write =	mptctl_write,
 	.ioctl =	mptctl_ioctl,
-	.open =		mptctl_open,
-	.release =	mptctl_release,
 };
 
 static struct miscdevice mptctl_miscdev = {
@@ -2800,7 +2717,7 @@
 
 	dctlprintk((KERN_INFO MYNAM "::compat_mptfwxfer_ioctl() called\n"));
 
-	if (copy_from_user(&kfw32, (char *)arg, sizeof(kfw32)))
+	if (copy_from_user(&kfw32, (char __user *)arg, sizeof(kfw32)))
 		return -EFAULT;
 
 	/* Verify intended MPT adapter */
@@ -2817,7 +2734,7 @@
 
 	kfw.iocnum = iocnum;
 	kfw.fwlen = kfw32.fwlen;
-	kfw.bufp = (void *)(unsigned long)kfw32.bufp;
+	kfw.bufp = compat_ptr(kfw32.bufp);
 
 	ret = mptctl_do_fw_download(kfw.iocnum, kfw.bufp, kfw.fwlen);
 
@@ -2831,7 +2748,7 @@
 			unsigned long arg, struct file *filp)
 {
 	struct mpt_ioctl_command32 karg32;
-	struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
+	struct mpt_ioctl_command32 __user *uarg = (struct mpt_ioctl_command32 __user *) arg;
 	struct mpt_ioctl_command karg;
 	MPT_ADAPTER *iocp = NULL;
 	int iocnum, iocnumX;
@@ -2840,7 +2757,7 @@
 
 	dctlprintk((KERN_INFO MYNAM "::compat_mpt_command() called\n"));
 
-	if (copy_from_user(&karg32, (char *)arg, sizeof(karg32)))
+	if (copy_from_user(&karg32, (char __user *)arg, sizeof(karg32)))
 		return -EFAULT;
 
 	/* Verify intended MPT adapter */
@@ -2866,14 +2783,14 @@
 	karg.maxSenseBytes = karg32.maxSenseBytes;
 	karg.dataSgeOffset = karg32.dataSgeOffset;
 
-	karg.replyFrameBufPtr = (char *)(unsigned long)karg32.replyFrameBufPtr;
-	karg.dataInBufPtr = (char *)(unsigned long)karg32.dataInBufPtr;
-	karg.dataOutBufPtr = (char *)(unsigned long)karg32.dataOutBufPtr;
-	karg.senseDataPtr = (char *)(unsigned long)karg32.senseDataPtr;
+	karg.replyFrameBufPtr = (char __user *)(unsigned long)karg32.replyFrameBufPtr;
+	karg.dataInBufPtr = (char __user *)(unsigned long)karg32.dataInBufPtr;
+	karg.dataOutBufPtr = (char __user *)(unsigned long)karg32.dataOutBufPtr;
+	karg.senseDataPtr = (char __user *)(unsigned long)karg32.senseDataPtr;
 
 	/* Pass new structure to do_mpt_command
 	 */
-	ret = mptctl_do_mpt_command (karg, (char *) &uarg->MF, 0);
+	ret = mptctl_do_mpt_command (karg, &uarg->MF);
 
 	up(&mptctl_syscall_sem_ioc[iocp->id]);
 
--- diff/drivers/message/fusion/mptctl.h	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/message/fusion/mptctl.h	2004-07-01 21:32:37.000000000 +0100
@@ -115,7 +115,7 @@
 struct mpt_fw_xfer {
 	unsigned int	 iocnum;	/* IOC unit number */
 	unsigned int	 fwlen;
-	void		*bufp;		/* Pointer to firmware buffer */
+	void		__user *bufp;	/* Pointer to firmware buffer */
 };
 
 #if defined(__KERNEL__) && defined(CONFIG_COMPAT)
@@ -332,10 +332,10 @@
 struct mpt_ioctl_command {
 	mpt_ioctl_header hdr;
 	int		timeout;	/* optional (seconds) */
-	char		*replyFrameBufPtr;
-	char		*dataInBufPtr;
-	char		*dataOutBufPtr;
-	char		*senseDataPtr;
+	char		__user *replyFrameBufPtr;
+	char		__user *dataInBufPtr;
+	char		__user *dataOutBufPtr;
+	char		__user *senseDataPtr;
 	int		maxReplyBytes;
 	int		dataInSize;
 	int		dataOutSize;
--- diff/drivers/message/fusion/mptlan.c	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/message/fusion/mptlan.c	2004-07-01 21:32:37.000000000 +0100
@@ -133,7 +133,7 @@
 	u32 total_received;
 	struct net_device_stats stats;	/* Per device statistics */
 
-	struct mpt_work_struct post_buckets_task;
+	struct work_struct post_buckets_task;
 	unsigned long post_buckets_active;
 };
 
@@ -502,7 +502,7 @@
 	LANResetRequest_t *pResetReq;
 	struct mpt_lan_priv *priv = netdev_priv(dev);
 
-	mf = mpt_get_msg_frame(LanCtx, priv->mpt_dev->id);
+	mf = mpt_get_msg_frame(LanCtx, priv->mpt_dev);
 
 	if (mf == NULL) {
 /*		dlprintk((KERN_ERR MYNAM "/reset: Evil funkiness abounds! "
@@ -520,7 +520,7 @@
 	pResetReq->MsgFlags	= 0;
 	pResetReq->Reserved2	= 0;
 
-	mpt_put_msg_frame(LanCtx, priv->mpt_dev->id, mf);
+	mpt_put_msg_frame(LanCtx, priv->mpt_dev, mf);
 
 	return 0;
 }
@@ -754,7 +754,7 @@
 		return 1;
 	}
 
-	mf = mpt_get_msg_frame(LanCtx, mpt_dev->id);
+	mf = mpt_get_msg_frame(LanCtx, mpt_dev);
 	if (mf == NULL) {
 		netif_stop_queue(dev);
 		spin_unlock_irqrestore(&priv->txfidx_lock, flags);
@@ -859,7 +859,7 @@
 	else
 		pSimple->Address.High = 0;
 
-	mpt_put_msg_frame (LanCtx, mpt_dev->id, mf);
+	mpt_put_msg_frame (LanCtx, mpt_dev, mf);
 	dev->trans_start = jiffies;
 
 	dioprintk((KERN_INFO MYNAM ": %s/%s: Sending packet. FlagsLength = %08x.\n",
@@ -880,18 +880,9 @@
 	
 	if (test_and_set_bit(0, &priv->post_buckets_active) == 0) {
 		if (priority) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
 			schedule_work(&priv->post_buckets_task);
-#else
-			queue_task(&priv->post_buckets_task, &tq_immediate);
-			mark_bh(IMMEDIATE_BH);
-#endif
 		} else {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
 			schedule_delayed_work(&priv->post_buckets_task, 1);
-#else
-			queue_task(&priv->post_buckets_task, &tq_timer);
-#endif
 			dioprintk((KERN_INFO MYNAM ": post_buckets queued on "
 				   "timer.\n"));
 		}
@@ -1253,7 +1244,7 @@
 			(MPT_LAN_TRANSACTION32_SIZE + sizeof(SGESimple64_t));
 
 	while (buckets) {
-		mf = mpt_get_msg_frame(LanCtx, mpt_dev->id);
+		mf = mpt_get_msg_frame(LanCtx, mpt_dev);
 		if (mf == NULL) {
 			printk (KERN_ERR "%s: Unable to alloc request frame\n",
 				__FUNCTION__);
@@ -1343,7 +1334,7 @@
 		if (pSimple == NULL) {
 /**/			printk (KERN_WARNING MYNAM "/%s: No buckets posted\n",
 /**/				__FUNCTION__);
-			mpt_free_msg_frame(LanCtx, mpt_dev->id, mf);
+			mpt_free_msg_frame(LanCtx, mpt_dev, mf);
 			goto out;
 		}
 
@@ -1357,7 +1348,7 @@
  *	printk ("\n");
  */
 
-		mpt_put_msg_frame(LanCtx, mpt_dev->id, mf);
+		mpt_put_msg_frame(LanCtx, mpt_dev, mf);
 
 		priv->total_posted += i;
 		buckets -= i;
@@ -1391,8 +1382,8 @@
 	priv->mpt_dev = mpt_dev;
 	priv->pnum = pnum;
 
-	memset(&priv->post_buckets_task, 0, sizeof(struct mpt_work_struct));
-	MPT_INIT_WORK(&priv->post_buckets_task, mpt_lan_post_receive_buckets, dev);
+	memset(&priv->post_buckets_task, 0, sizeof(struct work_struct));
+	INIT_WORK(&priv->post_buckets_task, mpt_lan_post_receive_buckets, dev);
 	priv->post_buckets_active = 0;
 
 	dlprintk((KERN_INFO MYNAM "@%d: bucketlen = %d\n",
@@ -1498,7 +1489,7 @@
 		mpt_landev[j] = NULL;
 	}
 
-	for (p = mpt_adapter_find_first(); p; p = mpt_adapter_find_next(p)) {
+	list_for_each_entry(p, &ioc_list, list) {
 		for (i = 0; i < p->facts.NumberOfPorts; i++) {
 			printk (KERN_INFO MYNAM ": %s: PortNum=%x, ProtocolFlags=%02Xh (%c%c%c%c)\n",
 					p->name,
@@ -1566,10 +1557,6 @@
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,59)
-MODULE_PARM(tx_max_out_p, "i");
-MODULE_PARM(max_buckets_out, "i"); // Debug stuff. FIXME!
-#endif
 
 module_init(mpt_lan_init);
 module_exit(mpt_lan_exit);
--- diff/drivers/message/fusion/mptscsih.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/message/fusion/mptscsih.c	2004-07-01 21:32:37.000000000 +0100
@@ -65,6 +65,7 @@
 */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 
+#include "linux_compat.h"	/* linux-2.6 tweaks */
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -74,9 +75,14 @@
 #include <linux/delay.h>	/* for mdelay */
 #include <linux/interrupt.h>	/* needed for in_interrupt() proto */
 #include <linux/reboot.h>	/* notifier code */
-#include "../../scsi/scsi.h"
-#include <scsi/scsi_host.h>
+#include <linux/sched.h>
+#include <linux/workqueue.h>
 
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>
 
 #include "mptbase.h"
 #include "mptscsih.h"
@@ -152,16 +158,16 @@
  *  Other private/forward protos...
  */
 static int	mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
-static void	mptscsih_report_queue_full(Scsi_Cmnd *sc, SCSIIOReply_t *pScsiReply, SCSIIORequest_t *pScsiReq);
+static void	mptscsih_report_queue_full(struct scsi_cmnd *sc, SCSIIOReply_t *pScsiReply, SCSIIORequest_t *pScsiReq);
 static int	mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
 
-static int	mptscsih_AddSGE(MPT_SCSI_HOST *hd, Scsi_Cmnd *SCpnt,
+static int	mptscsih_AddSGE(MPT_SCSI_HOST *hd, struct scsi_cmnd *SCpnt,
 				 SCSIIORequest_t *pReq, int req_idx);
 static void	mptscsih_freeChainBuffers(MPT_SCSI_HOST *hd, int req_idx);
 static int	mptscsih_initChainBuffers (MPT_SCSI_HOST *hd, int init);
-static void	copy_sense_data(Scsi_Cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply);
+static void	copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply);
 static int	mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd);
-static u32	SCPNT_TO_LOOKUP_IDX(Scsi_Cmnd *sc);
+static u32	SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc);
 static MPT_FRAME_HDR *mptscsih_search_pendingQ(MPT_SCSI_HOST *hd, int scpnt_idx);
 static void	post_pendingQ_commands(MPT_SCSI_HOST *hd);
 
@@ -185,7 +191,7 @@
 static int	mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *iocmd);
 static int	mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, int portnum);
 
-static struct mpt_work_struct   mptscsih_rstTask;
+static struct work_struct   mptscsih_rstTask;
 
 #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
 static int	mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io);
@@ -231,7 +237,7 @@
 static spinlock_t dvtaskQ_lock = SPIN_LOCK_UNLOCKED;
 static int dvtaskQ_active = 0;
 static int dvtaskQ_release = 0;
-static struct mpt_work_struct	mptscsih_dvTask;
+static struct work_struct	mptscsih_dvTask;
 #endif
 
 /*
@@ -246,127 +252,10 @@
 	driver_setup = MPTSCSIH_DRIVER_SETUP;
 
 #ifdef MPTSCSIH_DBG_TIMEOUT
-static Scsi_Cmnd *foo_to[8];
+static struct scsi_cmnd *foo_to[8];
 #endif
 
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
-/* see mptscsih.h */
-
-static struct scsi_host_template driver_template = {
-	.proc_name			= "mptscsih",
-	.proc_info			= x_scsi_proc_info,
-	.name				= "MPT SCSI Host",
-	.info				= x_scsi_info,
-	.queuecommand			= x_scsi_queuecommand,
-	.slave_alloc			= x_scsi_slave_alloc,
-	.slave_configure		= x_scsi_slave_configure,
-	.slave_destroy			= x_scsi_slave_destroy,
-	.eh_abort_handler		= x_scsi_abort,
-	.eh_device_reset_handler	= x_scsi_dev_reset,
-	.eh_bus_reset_handler		= x_scsi_bus_reset,
-	.eh_host_reset_handler		= x_scsi_host_reset,
-	.bios_param			= x_scsi_bios_param,
-	.can_queue			= MPT_SCSI_CAN_QUEUE,
-	.this_id			= -1,
-	.sg_tablesize			= MPT_SCSI_SG_DEPTH,
-	.max_sectors			= MPT_SCSI_MAX_SECTORS,
-	.cmd_per_lun			= MPT_SCSI_CMD_PER_LUN,
-	.use_clustering			= ENABLE_CLUSTERING,
-};
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- *  Private inline routines...
- */
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/* 19991030 -sralston
- *  Return absolute SCSI data direction:
- *     1 = _DATA_OUT
- *     0 = _DIR_NONE
- *    -1 = _DATA_IN
- *
- * Changed: 3-20-2002 pdelaney to use the default data
- * direction and the defines set up in the
- * 2.4 kernel series
- *     1 = _DATA_OUT	changed to SCSI_DATA_WRITE (1)
- *     0 = _DIR_NONE	changed to SCSI_DATA_NONE (3)
- *    -1 = _DATA_IN	changed to SCSI_DATA_READ (2)
- * If the direction is unknown, fall through to original code.
- *
- * Mid-layer bug fix(): sg interface generates the wrong data
- * direction in some cases. Set the direction the hard way for
- * the most common commands.
- */
-static inline int
-mptscsih_io_direction(Scsi_Cmnd *cmd)
-{
-	switch (cmd->cmnd[0]) {
-	case WRITE_6:
-	case WRITE_10:
-	case WRITE_16:
-		return SCSI_DATA_WRITE;
-		break;
-	case READ_6:
-	case READ_10:
-	case READ_16:
-		return SCSI_DATA_READ;
-		break;
-	}
-
-	if (cmd->sc_data_direction != SCSI_DATA_UNKNOWN)
-		return cmd->sc_data_direction;
-
-	switch (cmd->cmnd[0]) {
-	/*  _DATA_OUT commands	*/
-	case WRITE_6:		case WRITE_10:		case WRITE_12:
-	case WRITE_16:
-	case WRITE_LONG:	case WRITE_SAME:	case WRITE_BUFFER:
-	case WRITE_VERIFY:	case WRITE_VERIFY_12:
-	case COMPARE:		case COPY:		case COPY_VERIFY:
-	case SEARCH_EQUAL:	case SEARCH_HIGH:	case SEARCH_LOW:
-	case SEARCH_EQUAL_12:	case SEARCH_HIGH_12:	case SEARCH_LOW_12:
-	case MODE_SELECT:	case MODE_SELECT_10:	case LOG_SELECT:
-	case SEND_DIAGNOSTIC:	case CHANGE_DEFINITION: case UPDATE_BLOCK:
-	case SET_WINDOW:	case MEDIUM_SCAN:	case SEND_VOLUME_TAG:
-	case REASSIGN_BLOCKS:
-	case PERSISTENT_RESERVE_OUT:
-	case 0xea:
-	case 0xa3:
-		return SCSI_DATA_WRITE;
-
-	/*  No data transfer commands  */
-	case SEEK_6:		case SEEK_10:
-	case RESERVE:		case RELEASE:
-	case TEST_UNIT_READY:
-	case START_STOP:
-	case ALLOW_MEDIUM_REMOVAL:
-		return SCSI_DATA_NONE;
-
-	/*  Conditional data transfer commands	*/
-	case FORMAT_UNIT:
-		if (cmd->cmnd[1] & 0x10)	/* FmtData (data out phase)? */
-			return SCSI_DATA_WRITE;
-		else
-			return SCSI_DATA_NONE;
-
-	case VERIFY:
-		if (cmd->cmnd[1] & 0x02)	/* VERIFY:BYTCHK (data out phase)? */
-			return SCSI_DATA_WRITE;
-		else
-			return SCSI_DATA_NONE;
-
-	case RESERVE_10:
-		if (cmd->cmnd[1] & 0x03)	/* RESERVE:{LongID|Extent} (data out phase)? */
-			return SCSI_DATA_WRITE;
-		else
-			return SCSI_DATA_NONE;
-
-	/*  Must be data _IN!  */
-	default:
-		return SCSI_DATA_READ;
-	}
-} /* mptscsih_io_direction() */
+static struct scsi_host_template driver_template;
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /**
@@ -480,13 +369,13 @@
  *	mptscsih_AddSGE - Add a SGE (plus chain buffers) to the
  *	SCSIIORequest_t Message Frame.
  *	@hd: Pointer to MPT_SCSI_HOST structure
- *	@SCpnt: Pointer to Scsi_Cmnd structure
+ *	@SCpnt: Pointer to scsi_cmnd structure
  *	@pReq: Pointer to SCSIIORequest_t structure
  *
  *	Returns ...
  */
 static int
-mptscsih_AddSGE(MPT_SCSI_HOST *hd, Scsi_Cmnd *SCpnt,
+mptscsih_AddSGE(MPT_SCSI_HOST *hd, struct scsi_cmnd *SCpnt,
 		SCSIIORequest_t *pReq, int req_idx)
 {
 	char 	*psge;
@@ -519,29 +408,20 @@
 	if ( (sges_left = SCpnt->use_sg) ) {
 		sges_left = pci_map_sg(hd->ioc->pcidev,
 			       (struct scatterlist *) SCpnt->request_buffer,
-			       SCpnt->use_sg,
-			       scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+ 			       SCpnt->use_sg,
+			       SCpnt->sc_data_direction);
 		if (sges_left == 0)
 			return FAILED;
 	} else if (SCpnt->request_bufflen) {
-		dma_addr_t	 buf_dma_addr;
-		scPrivate	*my_priv;
-
-		buf_dma_addr = pci_map_single(hd->ioc->pcidev,
+		SCpnt->SCp.dma_handle = pci_map_single(hd->ioc->pcidev,
 				      SCpnt->request_buffer,
 				      SCpnt->request_bufflen,
-				      scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
-
-		/* We hide it here for later unmap. */
-		my_priv = (scPrivate *) &SCpnt->SCp;
-		my_priv->p1 = (void *)(ulong) buf_dma_addr;
-
+				      SCpnt->sc_data_direction);
 		dsgprintk((MYIOC_s_INFO_FMT "SG: non-SG for %p, len=%d\n",
 				hd->ioc->name, SCpnt, SCpnt->request_bufflen));
-
 		mptscsih_add_sge((char *) &pReq->SGL,
 			0xD1000000|MPT_SGE_FLAGS_ADDRESSING|sgdir|SCpnt->request_bufflen,
-			buf_dma_addr);
+			SCpnt->SCp.dma_handle);
 
 		return SUCCESS;
 	}
@@ -730,7 +610,7 @@
 static int
 mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
 {
-	Scsi_Cmnd	*sc;
+	struct scsi_cmnd	*sc;
 	MPT_SCSI_HOST	*hd;
 	SCSIIORequest_t	*pScsiReq;
 	SCSIIOReply_t	*pScsiReply;
@@ -851,6 +731,15 @@
 			break;
 
 		case MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH:	/* 0x0049 */
+			sc->result = (DRIVER_SENSE << 24) | (DID_OK << 16) | 
+					(CHECK_CONDITION << 1);
+			sc->sense_buffer[0] = 0x70;
+			sc->sense_buffer[2] = NO_SENSE;
+			sc->sense_buffer[12] = 0;
+			sc->sense_buffer[13] = 0;
+			dprintk((KERN_NOTICE "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->target));
+			break;
+		
 		case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN:		/* 0x0045 */
 			/*
 			 *  Do upfront check for valid SenseData and give it
@@ -968,14 +857,10 @@
 	/* Unmap the DMA buffers, if any. */
 	if (sc->use_sg) {
 		pci_unmap_sg(ioc->pcidev, (struct scatterlist *) sc->request_buffer,
-			    sc->use_sg, scsi_to_pci_dma_dir(sc->sc_data_direction));
+			    sc->use_sg, sc->sc_data_direction);
 	} else if (sc->request_bufflen) {
-		scPrivate	*my_priv;
-
-		my_priv = (scPrivate *) &sc->SCp;
-		pci_unmap_single(ioc->pcidev, (dma_addr_t)(ulong)my_priv->p1,
-			   sc->request_bufflen,
-			   scsi_to_pci_dma_dir(sc->sc_data_direction));
+		pci_unmap_single(ioc->pcidev, sc->SCp.dma_handle,
+				sc->request_bufflen, sc->sc_data_direction);
 	}
 
 	hd->ScsiLookup[req_idx] = NULL;
@@ -996,7 +881,7 @@
 flush_doneQ(MPT_SCSI_HOST *hd)
 {
 	MPT_DONE_Q	*buffer;
-	Scsi_Cmnd	*SCpnt;
+	struct scsi_cmnd	*SCpnt;
 	unsigned long	 flags;
 
 	/* Flush the doneQ.
@@ -1014,9 +899,9 @@
 		 */
 		Q_DEL_ITEM(buffer);
 
-		/* Set the Scsi_Cmnd pointer
+		/* Set the struct scsi_cmnd pointer
 		 */
-		SCpnt = (Scsi_Cmnd *) buffer->argp;
+		SCpnt = (struct scsi_cmnd *) buffer->argp;
 		buffer->argp = NULL;
 
 		/* Add to the freeQ
@@ -1037,7 +922,7 @@
  * Calling function will finish processing.
  */
 static void
-search_doneQ_for_cmd(MPT_SCSI_HOST *hd, Scsi_Cmnd *SCpnt)
+search_doneQ_for_cmd(MPT_SCSI_HOST *hd, struct scsi_cmnd *SCpnt)
 {
 	unsigned long	 flags;
 	MPT_DONE_Q	*buffer;
@@ -1046,12 +931,12 @@
 	if (!Q_IS_EMPTY(&hd->doneQ)) {
 		buffer = hd->doneQ.head;
 		do {
-			Scsi_Cmnd *sc = (Scsi_Cmnd *) buffer->argp;
+			struct scsi_cmnd *sc = (struct scsi_cmnd *) buffer->argp;
 			if (SCpnt == sc) {
 				Q_DEL_ITEM(buffer);
 				SCpnt->result = sc->result;
 
-				/* Set the Scsi_Cmnd pointer
+				/* Set the struct scsi_cmnd pointer
 				 */
 				buffer->argp = NULL;
 
@@ -1079,7 +964,7 @@
 static void
 mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
 {
-	Scsi_Cmnd	*SCpnt;
+	struct scsi_cmnd	*SCpnt;
 	MPT_FRAME_HDR	*mf;
 	MPT_DONE_Q	*buffer;
 	int		 ii;
@@ -1115,15 +1000,12 @@
 					pci_unmap_sg(hd->ioc->pcidev,
 						(struct scatterlist *) SCpnt->request_buffer,
 						SCpnt->use_sg,
-						scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+						SCpnt->sc_data_direction);
 				} else if (SCpnt->request_bufflen) {
-					scPrivate	*my_priv;
-
-					my_priv = (scPrivate *) &SCpnt->SCp;
 					pci_unmap_single(hd->ioc->pcidev,
-						(dma_addr_t)(ulong)my_priv->p1,
+						SCpnt->SCp.dma_handle,
 						SCpnt->request_bufflen,
-						scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+						SCpnt->sc_data_direction);
 				}
 			}
 			SCpnt->result = DID_RESET << 16;
@@ -1133,7 +1015,7 @@
 			mptscsih_freeChainBuffers(hd, ii);
 
 			/* Free Message frames */
-			mpt_free_msg_frame(ScsiDoneCtx, hd->ioc->id, mf);
+			mpt_free_msg_frame(ScsiDoneCtx, hd->ioc, mf);
 
 #if 1
 			/* Post to doneQ, do not reply until POST phase
@@ -1145,7 +1027,7 @@
 				buffer = hd->freeQ.head;
 				Q_DEL_ITEM(buffer);
 
-				/* Set the Scsi_Cmnd pointer
+				/* Set the struct scsi_cmnd pointer
 				 */
 				buffer->argp = (void *)SCpnt;
 
@@ -1171,7 +1053,7 @@
  *	mptscsih_search_running_cmds - Delete any commands associated
  *		with the specified target and lun. Function called only
  *		when a lun is disable by mid-layer.
- *		Do NOT access the referenced Scsi_Cmnd structure or
+ *		Do NOT access the referenced scsi_cmnd structure or
  *		members. Will cause either a paging or NULL ptr error.
  *	@hd: Pointer to a SCSI HOST structure
  *	@target: target id
@@ -1206,7 +1088,7 @@
 			 */
 			hd->ScsiLookup[ii] = NULL;
 			mptscsih_freeChainBuffers(hd, ii);
-			mpt_free_msg_frame(ScsiDoneCtx, hd->ioc->id, (MPT_FRAME_HDR *)mf);
+			mpt_free_msg_frame(ScsiDoneCtx, hd->ioc, (MPT_FRAME_HDR *)mf);
 		}
 	}
 
@@ -1329,7 +1211,7 @@
 /*
  *	mptscsih_report_queue_full - Report QUEUE_FULL status returned
  *	from a SCSI target device.
- *	@sc: Pointer to Scsi_Cmnd structure
+ *	@sc: Pointer to scsi_cmnd structure
  *	@pScsiReply: Pointer to SCSIIOReply_t
  *	@pScsiReq: Pointer to original SCSI request
  *
@@ -1338,7 +1220,7 @@
  *	printk() API call, not more than once every 10 seconds.
  */
 static void
-mptscsih_report_queue_full(Scsi_Cmnd *sc, SCSIIOReply_t *pScsiReply, SCSIIORequest_t *pScsiReq)
+mptscsih_report_queue_full(struct scsi_cmnd *sc, SCSIIOReply_t *pScsiReply, SCSIIORequest_t *pScsiReq)
 {
 	long time = jiffies;
 
@@ -1459,7 +1341,6 @@
 	}
 		
 	sh->max_lun = MPT_LAST_LUN + 1;
-	sh->max_sectors = MPT_SCSI_MAX_SECTORS;
 	sh->max_channel = 0;
 	sh->this_id = ioc->pfacts[0].PortSCSIID;
 		
@@ -1515,7 +1396,7 @@
 		hd->is_multipath = 1;
 	}
 
-	/* SCSI needs Scsi_Cmnd lookup table!
+	/* SCSI needs scsi_cmnd lookup table!
 	 * (with size equal to req_depth*PtrSz!)
 	 */
 	sz = hd->ioc->req_depth * sizeof(void *);
@@ -1800,8 +1681,8 @@
 		}
 
 		dprintk((MYIOC_s_INFO_FMT
-		  "Free'd ScsiLookup (%d), chain (%d) and Target (%d+%d) memory\n",
-		  hd->ioc->name, sz1, szchain, sz3, sztarget));
+		  "Free'd ScsiLookup (%d) Target (%d+%d) memory\n",
+		  hd->ioc->name, sz1, sz3, sztarget));
 		dprintk(("Free'd done and free Q (%d) memory\n", szQ));
 
 		/* NULL the Scsi_Host pointer
@@ -1879,9 +1760,9 @@
 	if (!dvtaskQ_active) {
 		dvtaskQ_active = 1;
 		spin_unlock_irqrestore(&dvtaskQ_lock, lflags);
-		MPT_INIT_WORK(&mptscsih_dvTask,
+		INIT_WORK(&mptscsih_dvTask,
 		  mptscsih_domainValidation, (void *) hd);
-		SCHEDULE_TASK(&mptscsih_dvTask);
+		schedule_work(&mptscsih_dvTask);
 	} else {
 		spin_unlock_irqrestore(&dvtaskQ_lock, lflags);
 	}
@@ -1902,7 +1783,6 @@
 #endif
 };
 
-
 /*  SCSI host fops start here...  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /**
@@ -1956,16 +1836,7 @@
 static void __exit
 mptscsih_exit(void)
 {
-	MPT_ADAPTER	*ioc;
-
-	/* removing devices */
-	for(ioc = mpt_adapter_find_first(); ioc != NULL;
-	  ioc = mpt_adapter_find_next(ioc)) {
-		if ((ioc->last_state != MPI_IOC_STATE_OPERATIONAL) ||
-		  (ioc->sh == NULL))
-			continue;
-		mptscsih_remove(ioc->pcidev);
-	}
+	mpt_device_driver_deregister(MPTSCSIH_DRIVER);
 
 	mpt_reset_deregister(ScsiDoneCtx);
 	dprintk((KERN_INFO MYNAM
@@ -1975,7 +1846,6 @@
 	dprintk((KERN_INFO MYNAM
 	  ": Deregistered for IOC event notifications\n"));
 
-	mpt_device_driver_deregister(MPTSCSIH_DRIVER);
 	mpt_deregister(ScsiScanDvCtx);
 	mpt_deregister(ScsiTaskCtx);
 	mpt_deregister(ScsiDoneCtx);
@@ -1990,7 +1860,7 @@
  *	mptscsih_info - Return information about MPT adapter
  *	@SChost: Pointer to Scsi_Host structure
  *
- *	(linux Scsi_Host_Template.info routine)
+ *	(linux scsi_host_template.info routine)
  *
  *	Returns pointer to buffer where information was written.
  */
@@ -2200,7 +2070,7 @@
 /**
  *	mptscsih_proc_info - Return information about MPT adapter
  *
- *	(linux Scsi_Host_Template.info routine)
+ *	(linux scsi_host_template.info routine)
  *
  * 	buffer: if write, user data; if read, buffer for user
  * 	length: if write, return length;
@@ -2212,23 +2082,10 @@
 int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset,
 			int length, int func)
 {
-	MPT_ADAPTER	*ioc;
-	MPT_SCSI_HOST	*hd = NULL;
+	MPT_SCSI_HOST	*hd = (MPT_SCSI_HOST *)host->hostdata;
+	MPT_ADAPTER	*ioc = hd->ioc;
 	int size = 0;
 
-	dprintk(("Called mptscsih_proc_info: hostno=%d, func=%d\n", host->host_no, func));
-	dprintk(("buffer %p, start=%p (%p) offset=%ld length = %d\n",
-			buffer, start, *start, offset, length));
-
-	for (ioc = mpt_adapter_find_first(); ioc != NULL; ioc = mpt_adapter_find_next(ioc)) {
-		if ((ioc->sh) && (ioc->sh == host)) {
-			hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
-			break;
-		}
-	}
-	if ((ioc == NULL) || (ioc->sh == NULL) || (hd == NULL))
-		return 0;
-
 	if (func) {
 		size = mptscsih_user_command(ioc, buffer, length);
 	} else {
@@ -2248,17 +2105,17 @@
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /**
  *	mptscsih_qcmd - Primary Fusion MPT SCSI initiator IO start routine.
- *	@SCpnt: Pointer to Scsi_Cmnd structure
+ *	@SCpnt: Pointer to scsi_cmnd structure
  *	@done: Pointer SCSI mid-layer IO completion function
  *
- *	(linux Scsi_Host_Template.queuecommand routine)
+ *	(linux scsi_host_template.queuecommand routine)
  *	This is the primary SCSI IO start routine.  Create a MPI SCSIIORequest
- *	from a linux Scsi_Cmnd request and send it to the IOC.
+ *	from a linux scsi_cmnd request and send it to the IOC.
  *
  *	Returns 0. (rtn value discarded by linux scsi mid-layer)
  */
 int
-mptscsih_qcmd(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
+mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
 {
 	MPT_SCSI_HOST		*hd;
 	MPT_FRAME_HDR		*mf;
@@ -2268,7 +2125,6 @@
 	unsigned long		 flags;
 	int	 target;
 	int	 lun;
-	int	 datadir;
 	u32	 datalen;
 	u32	 scsictl;
 	u32	 scsidir;
@@ -2306,7 +2162,7 @@
 	/*
 	 *  Put together a MPT SCSI request...
 	 */
-	if ((mf = mpt_get_msg_frame(ScsiDoneCtx, hd->ioc->id)) == NULL) {
+	if ((mf = mpt_get_msg_frame(ScsiDoneCtx, hd->ioc)) == NULL) {
 		dprintk((MYIOC_s_WARN_FMT "QueueCmd, no msg frames!!\n",
 				hd->ioc->name));
 		did_errcode = 2;
@@ -2319,21 +2175,15 @@
 
 	ADD_INDEX_LOG(my_idx);
 
-	/*
-	 *  The scsi layer should be handling this stuff
-	 *  (In 2.3.x it does -DaveM)
-	 */
-
 	/*  BUG FIX!  19991030 -sralston
 	 *    TUR's being issued with scsictl=0x02000000 (DATA_IN)!
 	 *    Seems we may receive a buffer (datalen>0) even when there
 	 *    will be no data transfer!  GRRRRR...
 	 */
-	datadir = mptscsih_io_direction(SCpnt);
-	if (datadir == SCSI_DATA_READ) {
+	if (SCpnt->sc_data_direction == DMA_FROM_DEVICE) {
 		datalen = SCpnt->request_bufflen;
 		scsidir = MPI_SCSIIO_CONTROL_READ;	/* DATA IN  (host<--ioc<--dev) */
-	} else if (datadir == SCSI_DATA_WRITE) {
+	} else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) {
 		datalen = SCpnt->request_bufflen;
 		scsidir = MPI_SCSIIO_CONTROL_WRITE;	/* DATA OUT (host-->ioc-->dev) */
 	} else {
@@ -2414,17 +2264,6 @@
 
 			if (dvStatus || hd->ioc->spi_data.forceDv) {
 
-				/* Write SDP1 on this I/O to this target */
-				if (dvStatus & MPT_SCSICFG_NEGOTIATE) {
-					mptscsih_writeSDP1(hd, 0, target, hd->negoNvram);
-					dvStatus &= ~MPT_SCSICFG_NEGOTIATE;
-					hd->ioc->spi_data.dvStatus[target] =  dvStatus;
-				} else if (dvStatus & MPT_SCSICFG_BLK_NEGO) {
-					mptscsih_writeSDP1(hd, 0, target, MPT_SCSICFG_BLK_NEGO);
-					dvStatus &= ~MPT_SCSICFG_BLK_NEGO;
-					hd->ioc->spi_data.dvStatus[target] =  dvStatus;
-				}
-
 #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
 				if ((dvStatus & MPT_SCSICFG_NEED_DV) ||
 					(hd->ioc->spi_data.forceDv & MPT_SCSICFG_NEED_DV)) {
@@ -2434,9 +2273,9 @@
 					if (!dvtaskQ_active) {
 						dvtaskQ_active = 1;
 						spin_unlock_irqrestore(&dvtaskQ_lock, lflags);
-						MPT_INIT_WORK(&mptscsih_dvTask, mptscsih_domainValidation, (void *) hd);
+						INIT_WORK(&mptscsih_dvTask, mptscsih_domainValidation, (void *) hd);
 
-						SCHEDULE_TASK(&mptscsih_dvTask);
+						schedule_work(&mptscsih_dvTask);
 					} else {
 						spin_unlock_irqrestore(&dvtaskQ_lock, lflags);
 					}
@@ -2472,7 +2311,7 @@
 #endif
 
 		if (issueCmd) {
-			mpt_put_msg_frame(ScsiDoneCtx, hd->ioc->id, mf);
+			mpt_put_msg_frame(ScsiDoneCtx, hd->ioc, mf);
 			dmfprintk((MYIOC_s_INFO_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n",
 					hd->ioc->name, SCpnt, mf, my_idx));
 		} else {
@@ -2500,7 +2339,7 @@
 		}
 	} else {
 		mptscsih_freeChainBuffers(hd, my_idx);
-		mpt_free_msg_frame(ScsiDoneCtx, hd->ioc->id, mf);
+		mpt_free_msg_frame(ScsiDoneCtx, hd->ioc, mf);
 		did_errcode = 3;
 		goto did_error;
 	}
@@ -2519,7 +2358,7 @@
 		buffer = hd->freeQ.head;
 		Q_DEL_ITEM(buffer);
 
-		/* Set the Scsi_Cmnd pointer
+		/* Set the scsi_cmnd pointer
 		 */
 		buffer->argp = (void *)SCpnt;
 
@@ -2753,7 +2592,7 @@
 
 	/* Return Fail to calling function if no message frames available.
 	 */
-	if ((mf = mpt_get_msg_frame(ScsiTaskCtx, hd->ioc->id)) == NULL) {
+	if ((mf = mpt_get_msg_frame(ScsiTaskCtx, hd->ioc)) == NULL) {
 		dtmprintk((MYIOC_s_WARN_FMT "IssueTaskMgmt, no msg frames!!\n",
 				hd->ioc->name));
 		//return FAILED;
@@ -2797,7 +2636,7 @@
 	hd->TMtimer.expires = jiffies + timeout;
 	add_timer(&hd->TMtimer);
 
-	if ((retval = mpt_send_handshake_request(ScsiTaskCtx, hd->ioc->id,
+	if ((retval = mpt_send_handshake_request(ScsiTaskCtx, hd->ioc,
 				sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, sleepFlag))
 	!= 0) {
 		dtmprintk((MYIOC_s_WARN_FMT "_send_handshake FAILED!"
@@ -2805,7 +2644,7 @@
 		hd->numTMrequests--;
 		hd->tmPtr = NULL;
 		del_timer(&hd->TMtimer);
-		mpt_free_msg_frame(ScsiTaskCtx, hd->ioc->id, mf);
+		mpt_free_msg_frame(ScsiTaskCtx, hd->ioc, mf);
 	}
 
 	return retval;
@@ -2813,15 +2652,15 @@
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /**
- *	mptscsih_abort - Abort linux Scsi_Cmnd routine, new_eh variant
- *	@SCpnt: Pointer to Scsi_Cmnd structure, IO to be aborted
+ *	mptscsih_abort - Abort linux scsi_cmnd routine, new_eh variant
+ *	@SCpnt: Pointer to scsi_cmnd structure, IO to be aborted
  *
- *	(linux Scsi_Host_Template.eh_abort_handler routine)
+ *	(linux scsi_host_template.eh_abort_handler routine)
  *
  *	Returns SUCCESS or FAILED.
  */
 int
-mptscsih_abort(Scsi_Cmnd * SCpnt)
+mptscsih_abort(struct scsi_cmnd * SCpnt)
 {
 	MPT_SCSI_HOST	*hd;
 	MPT_FRAME_HDR	*mf;
@@ -2869,7 +2708,7 @@
 	 * and then following up with the reset request.
 	 */
 	if ((mf = mptscsih_search_pendingQ(hd, scpnt_idx)) != NULL) {
-		mpt_put_msg_frame(ScsiDoneCtx, hd->ioc->id, mf);
+		mpt_put_msg_frame(ScsiDoneCtx, hd->ioc, mf);
 		post_pendingQ_commands(hd);
 		dtmprintk((KERN_WARNING MYNAM ": %s: mptscsih_abort: "
 			   "Posting pended cmd! (sc=%p)\n",
@@ -2916,14 +2755,14 @@
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /**
  *	mptscsih_dev_reset - Perform a SCSI TARGET_RESET!  new_eh variant
- *	@SCpnt: Pointer to Scsi_Cmnd structure, IO which reset is due to
+ *	@SCpnt: Pointer to scsi_cmnd structure, IO which reset is due to
  *
- *	(linux Scsi_Host_Template.eh_dev_reset_handler routine)
+ *	(linux scsi_host_template.eh_dev_reset_handler routine)
  *
  *	Returns SUCCESS or FAILED.
  */
 int
-mptscsih_dev_reset(Scsi_Cmnd * SCpnt)
+mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
 {
 	MPT_SCSI_HOST	*hd;
 	spinlock_t	*host_lock = SCpnt->device->host->host_lock;
@@ -2971,14 +2810,14 @@
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /**
  *	mptscsih_bus_reset - Perform a SCSI BUS_RESET!	new_eh variant
- *	@SCpnt: Pointer to Scsi_Cmnd structure, IO which reset is due to
+ *	@SCpnt: Pointer to scsi_cmnd structure, IO which reset is due to
  *
- *	(linux Scsi_Host_Template.eh_bus_reset_handler routine)
+ *	(linux scsi_host_template.eh_bus_reset_handler routine)
  *
  *	Returns SUCCESS or FAILED.
  */
 int
-mptscsih_bus_reset(Scsi_Cmnd * SCpnt)
+mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
 {
 	MPT_SCSI_HOST	*hd;
 	spinlock_t	*host_lock = SCpnt->device->host->host_lock;
@@ -3026,14 +2865,14 @@
 /**
  *	mptscsih_host_reset - Perform a SCSI host adapter RESET!
  *	new_eh variant
- *	@SCpnt: Pointer to Scsi_Cmnd structure, IO which reset is due to
+ *	@SCpnt: Pointer to scsi_cmnd structure, IO which reset is due to
  *
- *	(linux Scsi_Host_Template.eh_host_reset_handler routine)
+ *	(linux scsi_host_template.eh_host_reset_handler routine)
  *
  *	Returns SUCCESS or FAILED.
  */
 int
-mptscsih_host_reset(Scsi_Cmnd *SCpnt)
+mptscsih_host_reset(struct scsi_cmnd *SCpnt)
 {
 	MPT_SCSI_HOST *  hd;
 	int              status = SUCCESS;
@@ -3269,7 +3108,7 @@
  *	Init memory once per id (not LUN).
  */
 int
-mptscsih_slave_alloc(Scsi_Device *device)
+mptscsih_slave_alloc(struct scsi_device *device)
 {
 	struct Scsi_Host	*host = device->host;
 	MPT_SCSI_HOST		*hd;
@@ -3309,7 +3148,7 @@
  *	Called if no device present or device being unloaded
  */
 void
-mptscsih_slave_destroy(Scsi_Device *device)
+mptscsih_slave_destroy(struct scsi_device *device)
 {
 	struct Scsi_Host	*host = device->host;
 	MPT_SCSI_HOST		*hd;
@@ -3374,7 +3213,7 @@
  *	Return non-zero if fails.
  */
 int
-mptscsih_slave_configure(Scsi_Device *device)
+mptscsih_slave_configure(struct scsi_device *device)
 {
 	struct Scsi_Host	*sh = device->host;
 	VirtDevice		*pTarget;
@@ -3457,7 +3296,7 @@
  *
  */
 static void
-copy_sense_data(Scsi_Cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply)
+copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply)
 {
 	VirtDevice	*target;
 	SCSIIORequest_t	*pReq;
@@ -3535,7 +3374,7 @@
 }
 
 static u32
-SCPNT_TO_LOOKUP_IDX(Scsi_Cmnd *sc)
+SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc)
 {
 	MPT_SCSI_HOST *hd;
 	int i;
@@ -3632,12 +3471,12 @@
 			continue;
 		}
 
-		mpt_put_msg_frame(ScsiDoneCtx, hd->ioc->id, mf);
+		mpt_put_msg_frame(ScsiDoneCtx, hd->ioc, mf);
 
 #if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY)
 		{
 			u16		 req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
-			Scsi_Cmnd	*sc = hd->ScsiLookup[req_idx];
+			struct scsi_cmnd	*sc = hd->ScsiLookup[req_idx];
 			printk(MYIOC_s_INFO_FMT "Issued SCSI cmd (sc=%p) idx=%d (mf=%p)\n",
 					hd->ioc->name, sc, req_idx, mf);
 		}
@@ -3699,7 +3538,7 @@
 		 */
 		if (hd->cmdPtr) {
 			del_timer(&hd->timer);
-			mpt_free_msg_frame(ScsiScanDvCtx, ioc->id, hd->cmdPtr);
+			mpt_free_msg_frame(ScsiScanDvCtx, ioc, hd->cmdPtr);
 		}
 
 		/* 2d. If a task management has not completed,
@@ -3707,7 +3546,7 @@
 		 */
 		if (hd->tmPtr) {
 			del_timer(&hd->TMtimer);
-			mpt_free_msg_frame(ScsiTaskCtx, ioc->id, hd->tmPtr);
+			mpt_free_msg_frame(ScsiTaskCtx, ioc, hd->tmPtr);
 		}
 
 #ifdef MPTSCSIH_DBG_TIMEOUT
@@ -3905,6 +3744,29 @@
 	return 1;		/* currently means nothing really */
 }
 
+static struct scsi_host_template driver_template = {
+	.proc_name			= "mptscsih",
+	.proc_info			= mptscsih_proc_info,
+	.name				= "MPT SCSI Host",
+	.info				= mptscsih_info,
+	.queuecommand			= mptscsih_qcmd,
+	.slave_alloc			= mptscsih_slave_alloc,
+	.slave_configure		= mptscsih_slave_configure,
+	.slave_destroy			= mptscsih_slave_destroy,
+	.eh_abort_handler		= mptscsih_abort,
+	.eh_device_reset_handler	= mptscsih_dev_reset,
+	.eh_bus_reset_handler		= mptscsih_bus_reset,
+	.eh_host_reset_handler		= mptscsih_host_reset,
+	.bios_param			= mptscsih_bios_param,
+	.can_queue			= MPT_SCSI_CAN_QUEUE,
+	.this_id			= -1,
+	.sg_tablesize			= MPT_SCSI_SG_DEPTH,
+	.max_sectors			= 8192,
+	.cmd_per_lun			= 7,
+	.use_clustering			= ENABLE_CLUSTERING,
+};
+
+
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
  *  Private data...
@@ -4378,7 +4240,7 @@
 			}
 		}
 
-		data_56 = 0;
+		data_56 = 0x0F;  /* Default to full capabilities if Inq data length is < 57 */
 		if (dlen > 56) {
 			if ( (!(vdev->tflags & MPT_TARGET_FLAGS_VALID_56))) {
 			/* Update the target capabilities
@@ -4443,14 +4305,16 @@
 			}
 
 			if (target->inq_data[7] & 0x10) {
-				/* bits 2 & 3 show DT support
+				/* bits 2 & 3 show Clocking support
 				 */
-				if ((byte56 & 0x04) == 0)
+				if ((byte56 & 0x0C) == 0)
 					factor = MPT_ULTRA2;
-				else if ((byte56 & 0x03) == 0)
-					factor = MPT_ULTRA160;
-				else
-					factor = MPT_ULTRA320;
+				else {
+					if ((byte56 & 0x03) == 0)
+						factor = MPT_ULTRA160;
+					else
+						factor = MPT_ULTRA320;
+				}
 				offset = pspi_data->maxSyncOffset;
 
 				/* If RAID, never disable QAS
@@ -4459,8 +4323,9 @@
 				 * bit 1 QAS support, non-raid only
 				 * bit 0 IU support
 				 */
-				if ((target->raidVolume == 1) || ((byte56 & 0x02) != 0))
+				if ((target->raidVolume == 1) || (byte56 & 0x02)) {
 					noQas = 0;
+				}
 			} else {
 				factor = MPT_ASYNC;
 				offset = 0;
@@ -4539,7 +4404,7 @@
 				/* Disable QAS in a mixed configuration case
 		 		*/
 
-//				ddvtprintk((KERN_INFO "Disabling QAS!\n"));
+				ddvtprintk((KERN_INFO "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id));
 				for (ii = 0; ii < id; ii++) {
 					if ( (vdev = hd->Targets[ii]) ) {
 						vdev->negoFlags |= MPT_TARGET_NO_NEGO_QAS;
@@ -4547,6 +4412,15 @@
 				}
 			}
 		}
+		
+		/* Write SDP1 on this I/O to this target */
+		if (pspi_data->dvStatus[id] & MPT_SCSICFG_NEGOTIATE) {
+			mptscsih_writeSDP1(hd, 0, id, hd->negoNvram);
+			pspi_data->dvStatus[id] &= ~MPT_SCSICFG_NEGOTIATE;
+		} else if (pspi_data->dvStatus[id] & MPT_SCSICFG_BLK_NEGO) {
+			mptscsih_writeSDP1(hd, 0, id, MPT_SCSICFG_BLK_NEGO);
+			pspi_data->dvStatus[id] &= ~MPT_SCSICFG_BLK_NEGO;
+		}
 	}
 
 	return;
@@ -4779,7 +4653,7 @@
 
 		/* Get a MF for this command.
 		 */
-		if ((mf = mpt_get_msg_frame(ScsiDoneCtx, ioc->id)) == NULL) {
+		if ((mf = mpt_get_msg_frame(ScsiDoneCtx, ioc)) == NULL) {
 			dprintk((MYIOC_s_WARN_FMT "write SDP1: no msg frames!\n",
 						ioc->name));
 			return -EAGAIN;
@@ -4843,7 +4717,7 @@
 				ioc->name, id, (id | (bus<<8)),
 				requested, configuration));
 
-		mpt_put_msg_frame(ScsiDoneCtx, ioc->id, mf);
+		mpt_put_msg_frame(ScsiDoneCtx, ioc, mf);
 	}
 
 	return 0;
@@ -4874,7 +4748,7 @@
 
 	/* Get a MF for this command.
 	 */
-	if ((mf = mpt_get_msg_frame(ScsiDoneCtx, ioc->id)) == NULL) {
+	if ((mf = mpt_get_msg_frame(ScsiDoneCtx, ioc)) == NULL) {
 		dprintk((MYIOC_s_WARN_FMT "writeIOCPage4 : no msg frames!\n",
 					ioc->name));
 		return -EAGAIN;
@@ -4923,7 +4797,7 @@
 		"writeIOCPage4: pgaddr 0x%x\n",
 			ioc->name, (target_id | (bus<<8))));
 
-	mpt_put_msg_frame(ScsiDoneCtx, ioc->id, mf);
+	mpt_put_msg_frame(ScsiDoneCtx, ioc, mf);
 
 	return 0;
 }
@@ -4950,8 +4824,8 @@
 	/* Call the reset handler. Already had a TM request
 	 * timeout - so issue a diagnostic reset
 	 */
-	MPT_INIT_WORK(&mptscsih_rstTask, mptscsih_schedule_reset, (void *)hd);
-	SCHEDULE_TASK(&mptscsih_rstTask);
+	INIT_WORK(&mptscsih_rstTask, mptscsih_schedule_reset, (void *)hd);
+	schedule_work(&mptscsih_rstTask);
 	return;
 }
 
@@ -5235,7 +5109,7 @@
 
 	/* Get and Populate a free Frame
 	 */
-	if ((mf = mpt_get_msg_frame(ScsiScanDvCtx, hd->ioc->id)) == NULL) {
+	if ((mf = mpt_get_msg_frame(ScsiScanDvCtx, hd->ioc)) == NULL) {
 		ddvprintk((MYIOC_s_WARN_FMT "_do_raid: no msg frames!\n",
 					hd->ioc->name));
 		return -EAGAIN;
@@ -5260,7 +5134,7 @@
 			hd->ioc->name, action, io->id));
 
 	hd->pLocal = NULL;
-	hd->timer.expires = jiffies + HZ*2; /* 2 second timeout */
+	hd->timer.expires = jiffies + HZ*10; /* 10 second timeout */
 	scandv_wait_done = 0;
 
 	/* Save cmd pointer, for resource free if timeout or
@@ -5269,7 +5143,7 @@
 	hd->cmdPtr = mf;
 
 	add_timer(&hd->timer);
-	mpt_put_msg_frame(ScsiScanDvCtx, hd->ioc->id, mf);
+	mpt_put_msg_frame(ScsiScanDvCtx, hd->ioc, mf);
 	wait_event(scandv_waitq, scandv_wait_done);
 
 	if ((hd->pLocal == NULL) || (hd->pLocal->completion != MPT_SCANDV_GOOD))
@@ -5416,7 +5290,7 @@
 
 	/* Get and Populate a free Frame
 	 */
-	if ((mf = mpt_get_msg_frame(ScsiScanDvCtx, hd->ioc->id)) == NULL) {
+	if ((mf = mpt_get_msg_frame(ScsiScanDvCtx, hd->ioc)) == NULL) {
 		ddvprintk((MYIOC_s_WARN_FMT "No msg frames!\n",
 					hd->ioc->name));
 		return -EBUSY;
@@ -5506,7 +5380,7 @@
 	hd->cmdPtr = mf;
 
 	add_timer(&hd->timer);
-	mpt_put_msg_frame(ScsiScanDvCtx, hd->ioc->id, mf);
+	mpt_put_msg_frame(ScsiScanDvCtx, hd->ioc, mf);
 	wait_event(scandv_waitq, scandv_wait_done);
 
 	if (hd->pLocal) {
@@ -5714,7 +5588,7 @@
 	did = 1;
 	while (did) {
 		did = 0;
-		for (ioc = mpt_adapter_find_first(); ioc != NULL; ioc = mpt_adapter_find_next(ioc)) {
+		list_for_each_entry(ioc, &ioc_list, list) {
 			spin_lock_irqsave(&dvtaskQ_lock, flags);
 			if (dvtaskQ_release) {
 				dvtaskQ_active = 0;
--- diff/drivers/message/fusion/mptscsih.h	2004-05-19 22:11:51.000000000 +0100
+++ source/drivers/message/fusion/mptscsih.h	2004-07-01 21:32:37.000000000 +0100
@@ -108,75 +108,4 @@
         MPTSCSIH_SAF_TE,                        \
 }
 
-
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- *	Various bits and pieces broke within the lk-2.4.0-testN series:-(
- *	So here are various HACKS to work around them.
- */
-
-/*
- *	tq_scheduler disappeared @ lk-2.4.0-test12
- *	(right when <linux/sched.h> newly defined TQ_ACTIVE)
- *	tq_struct reworked in 2.5.41. Include workqueue.h.
- */
-#	include <linux/sched.h>
-#	include <linux/workqueue.h>
-#define SCHEDULE_TASK(x)		\
-	if (schedule_work(x) == 0) {	\
-		/*MOD_DEC_USE_COUNT*/;	\
-	}
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
-#define x_scsi_info		mptscsih_info
-#define x_scsi_queuecommand	mptscsih_qcmd
-#define x_scsi_abort		mptscsih_abort
-#define x_scsi_bus_reset	mptscsih_bus_reset
-#define x_scsi_dev_reset	mptscsih_dev_reset
-#define x_scsi_host_reset	mptscsih_host_reset
-#define x_scsi_bios_param	mptscsih_bios_param
-
-#define x_scsi_slave_alloc	mptscsih_slave_alloc
-#define x_scsi_slave_configure	mptscsih_slave_configure
-#define x_scsi_slave_destroy	mptscsih_slave_destroy
-#define x_scsi_proc_info	mptscsih_proc_info
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- *	MPT SCSI Host / Initiator decls...
- */
-extern	const char	*x_scsi_info(struct Scsi_Host *);
-extern	int		 x_scsi_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-extern	int		 x_scsi_abort(Scsi_Cmnd *);
-extern	int		 x_scsi_bus_reset(Scsi_Cmnd *);
-extern	int		 x_scsi_dev_reset(Scsi_Cmnd *);
-extern	int		 x_scsi_host_reset(Scsi_Cmnd *);
-extern int		 x_scsi_bios_param(struct scsi_device * sdev, struct block_device *bdev,
-				sector_t capacity, int geom[]);
-extern	int		 x_scsi_slave_alloc(Scsi_Device *);
-extern	int		 x_scsi_slave_configure(Scsi_Device *);
-extern	void		 x_scsi_slave_destroy(Scsi_Device *);
-extern	int		 x_scsi_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
-/*  include/scsi/scsi.h may not be quite complete...  */
-#ifndef RESERVE_10
-#define RESERVE_10		0x56
-#endif
-#ifndef RELEASE_10
-#define RELEASE_10		0x57
-#endif
-#ifndef PERSISTENT_RESERVE_IN
-#define PERSISTENT_RESERVE_IN	0x5e
-#endif
-#ifndef PERSISTENT_RESERVE_OUT
-#define PERSISTENT_RESERVE_OUT	0x5f
 #endif
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
-#endif
-
--- diff/drivers/message/i2o/i2o_block.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/message/i2o/i2o_block.c	2004-07-01 21:32:37.000000000 +0100
@@ -280,8 +280,8 @@
 {
 	struct i2o_controller *c = dev->controller;
 	int tid = dev->tid;
-	unsigned long msg;
-	unsigned long mptr;
+	void *msg;
+	void *mptr;
 	u64 offset;
 	struct request *req = ireq->req;
 	int count = req->nr_sectors<<9;
@@ -291,7 +291,7 @@
 
 	// printk(KERN_INFO "i2ob_send called\n");
 	/* Map the message to a virtual address */
-	msg = c->mem_offset + m;
+	msg = c->msg_virt + m;
 	
 	sgnum = i2ob_build_sglist(dev, ireq);
 	
@@ -479,7 +479,7 @@
 		/* Now flush the message by making it a NOP */
 		m[0]&=0x00FFFFFF;
 		m[0]|=(I2O_CMD_UTIL_NOP)<<24;
-		i2o_post_message(c, ((unsigned long)m) - c->mem_offset);
+		i2o_post_message(c, (unsigned long) m - (unsigned long) c->msg_virt);
 
 		return;
 	}
@@ -861,6 +861,7 @@
 {
 	struct gendisk *disk = inode->i_bdev->bd_disk;
 	struct i2ob_device *dev = disk->private_data;
+	void __user *argp = (void __user *)arg;
 
 	/* Anyone capable of this syscall can do *real bad* things */
 
@@ -873,13 +874,13 @@
 			i2o_block_biosparam(get_capacity(disk), 
 					&g.cylinders, &g.heads, &g.sectors);
 			g.start = get_start_sect(inode->i_bdev);
-			return copy_to_user((void *)arg,&g, sizeof(g))?-EFAULT:0;
+			return copy_to_user(argp, &g, sizeof(g))?-EFAULT:0;
 		}
 		
 		case BLKI2OGRSTRAT:
-			return put_user(dev->rcache, (int *)arg);
+			return put_user(dev->rcache, (int __user *)argp);
 		case BLKI2OGWSTRAT:
-			return put_user(dev->wcache, (int *)arg);
+			return put_user(dev->wcache, (int __user *)argp);
 		case BLKI2OSRSTRAT:
 			if(arg<0||arg>CACHE_SMARTFETCH)
 				return -EINVAL;
--- diff/drivers/message/i2o/i2o_config.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/message/i2o/i2o_config.c	2004-07-01 21:32:37.000000000 +0100
@@ -97,7 +97,7 @@
 	u32 *msg = (u32 *)m;
 
 	if (msg[0] & MSG_FAIL) {
-		u32 *preserved_msg = (u32*)(c->mem_offset + msg[7]);
+		u32 *preserved_msg = (u32*)(c->msg_virt + msg[7]);
 
 		printk(KERN_ERR "i2o_config: IOP failed to process the msg.\n");
 
@@ -194,7 +194,7 @@
 	0xffffffff	// All classes
 };
 
-static ssize_t cfg_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+static ssize_t cfg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	printk(KERN_INFO "i2o_config write not yet supported\n");
 
@@ -202,7 +202,7 @@
 }
 
 
-static ssize_t cfg_read(struct file *file, char *buf, size_t count, loff_t *ptr)
+static ssize_t cfg_read(struct file *file, char __user *buf, size_t count, loff_t *ptr)
 {
 	return 0;
 }
@@ -278,7 +278,7 @@
 
 int ioctl_getiops(unsigned long arg)
 {
-	u8 *user_iop_table = (u8*)arg;
+	u8  __user *user_iop_table = (void __user *)arg;
 	struct i2o_controller *c = NULL;
 	int i;
 	u8 foo[MAX_I2O_CONTROLLERS];
@@ -314,7 +314,7 @@
 int ioctl_gethrt(unsigned long arg)
 {
 	struct i2o_controller *c;
-	struct i2o_cmd_hrtlct *cmd = (struct i2o_cmd_hrtlct*)arg;
+	struct i2o_cmd_hrtlct __user *cmd = (void __user *)arg;
 	struct i2o_cmd_hrtlct kcmd;
 	i2o_hrt *hrt;
 	int len;
@@ -353,7 +353,7 @@
 int ioctl_getlct(unsigned long arg)
 {
 	struct i2o_controller *c;
-	struct i2o_cmd_hrtlct *cmd = (struct i2o_cmd_hrtlct*)arg;
+	struct i2o_cmd_hrtlct __user *cmd = (void __user *)arg;
 	struct i2o_cmd_hrtlct kcmd;
 	i2o_lct *lct;
 	int len;
@@ -390,7 +390,7 @@
 {
 	int ret = 0;
 	struct i2o_controller *c;
-	struct i2o_cmd_psetget *cmd = (struct i2o_cmd_psetget*)arg;
+	struct i2o_cmd_psetget __user *cmd = (void __user *)arg;
 	struct i2o_cmd_psetget kcmd;
 	u32 reslen;
 	u8 *ops;
@@ -460,7 +460,7 @@
 
 int ioctl_html(unsigned long arg)
 {
-	struct i2o_html *cmd = (struct i2o_html*)arg;
+	struct i2o_html __user *cmd = (void __user *)arg;
 	struct i2o_html kcmd;
 	struct i2o_controller *c;
 	u8 *res = NULL;
@@ -573,7 +573,7 @@
 int ioctl_swdl(unsigned long arg)
 {
 	struct i2o_sw_xfer kxfer;
-	struct i2o_sw_xfer *pxfer = (struct i2o_sw_xfer *)arg;
+	struct i2o_sw_xfer __user *pxfer = (void __user *)arg;
 	unsigned char maxfrag = 0, curfrag = 1;
 	unsigned char *buffer;
 	u32 msg[9];
@@ -642,7 +642,7 @@
 int ioctl_swul(unsigned long arg)
 {
 	struct i2o_sw_xfer kxfer;
-	struct i2o_sw_xfer *pxfer = (struct i2o_sw_xfer *)arg;
+	struct i2o_sw_xfer __user *pxfer = (void __user *)arg;
 	unsigned char maxfrag = 0, curfrag = 1;
 	unsigned char *buffer;
 	u32 msg[9];
@@ -709,7 +709,8 @@
 int ioctl_swdel(unsigned long arg)
 {
 	struct i2o_controller *c;
-	struct i2o_sw_xfer kxfer, *pxfer = (struct i2o_sw_xfer *)arg;
+	struct i2o_sw_xfer kxfer;
+	struct i2o_sw_xfer __user *pxfer = (void __user *)arg;
 	u32 msg[7];
 	unsigned int swlen;
 	int token;
@@ -776,7 +777,7 @@
 static int ioctl_evt_reg(unsigned long arg, struct file *fp)
 {
 	u32 msg[5];
-	struct i2o_evt_id *pdesc = (struct i2o_evt_id *)arg;
+	struct i2o_evt_id __user *pdesc = (void __user *)arg;
 	struct i2o_evt_id kdesc;
 	struct i2o_controller *iop;
 	struct i2o_device *d;
@@ -813,7 +814,7 @@
 {
 	u32 id = (u32)fp->private_data;
 	struct i2o_cfg_info *p = NULL;
-	struct i2o_evt_get *uget = (struct i2o_evt_get*)arg;
+	struct i2o_evt_get __user *uget = (void __user *)arg;
 	struct i2o_evt_get kget;
 	unsigned long flags;
 
@@ -842,24 +843,28 @@
 
 static int ioctl_passthru(unsigned long arg)
 {
-	struct i2o_cmd_passthru *cmd = (struct i2o_cmd_passthru *) arg;
+	struct i2o_cmd_passthru __user *cmd = (void __user *) arg;
 	struct i2o_controller *c;
 	u32 msg[MSG_FRAME_SIZE];
-	u32 *user_msg = (u32*)cmd->msg;
+	u32 __user *user_msg;
 	u32 *reply = NULL;
-	u32 *user_reply = NULL;
+	u32 __user *user_reply = NULL;
 	u32 size = 0;
 	u32 reply_size = 0;
 	u32 rcode = 0;
-	ulong sg_list[SG_TABLESIZE];
+	void *sg_list[SG_TABLESIZE];
 	u32 sg_offset = 0;
 	u32 sg_count = 0;
 	int sg_index = 0;
 	u32 i = 0;
-	ulong p = 0;
+	void *p = 0;
+	unsigned int iop;
 
-	c = i2o_find_controller(cmd->iop);
-	if(!c)
+	if (get_user(iop, &cmd->iop) || get_user(user_msg, &cmd->msg))
+		return -EFAULT;
+
+	c = i2o_find_controller(iop);
+	if (!c)
                 return -ENXIO;
 
 	memset(&msg, 0, MSG_FRAME_SIZE*4);
@@ -873,7 +878,7 @@
 	size *= 4; // Convert to bytes
 
 	/* Copy in the user's I2O command */
-	if(copy_from_user((void*)msg, (void*)user_msg, size))
+	if(copy_from_user(msg, user_msg, size))
 		return -EFAULT;
 	if(get_user(reply_size, &user_reply[0]) < 0)
 		return -EFAULT;
@@ -916,7 +921,7 @@
 			}
 			sg_size = sg[i].flag_count & 0xffffff;
 			/* Allocate memory for the transfer */
-			p = (ulong)kmalloc(sg_size, GFP_KERNEL);
+			p = kmalloc(sg_size, GFP_KERNEL);
 			if (!p) {
 				printk(KERN_DEBUG"%s: Could not allocate SG buffer - size = %d buffer number %d of %d\n", c->name,sg_size,i,sg_count);
 				rcode = -ENOMEM;
@@ -926,14 +931,14 @@
 			/* Copy in the user's SG buffer if necessary */
 			if(sg[i].flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR*/) {
 				// TODO 64bit fix
-			        if (copy_from_user((void*)p,(void*)sg[i].addr_bus, sg_size)) {
+			        if (copy_from_user(p,(void __user *)sg[i].addr_bus, sg_size)) {
 					printk(KERN_DEBUG"%s: Could not copy SG buf %d FROM user\n",c->name,i);
 					rcode = -EFAULT;
 					goto cleanup;
 				}
 			}
 			//TODO 64bit fix
-			sg[i].addr_bus = (u32)virt_to_bus((void*)p);
+			sg[i].addr_bus = (u32)virt_to_bus(p);
 		}
 	}
 
@@ -958,7 +963,7 @@
 		size = size>>16;
 		size *= 4;
 		/* Copy in the user's I2O command */
-		if (copy_from_user ((void*)msg, (void*)user_msg, size)) {
+		if (copy_from_user (msg, user_msg, size)) {
 			rcode = -EFAULT;
 			goto cleanup;
 		}
@@ -971,8 +976,8 @@
 			if (!(sg[j].flag_count & 0x4000000 /*I2O_SGL_FLAGS_DIR*/)) {
 				sg_size = sg[j].flag_count & 0xffffff;
 				// TODO 64bit fix
-				if (copy_to_user((void*)sg[j].addr_bus,(void*)sg_list[j], sg_size)) {
-					printk(KERN_WARNING"%s: Could not copy %lx TO user %x\n",c->name, sg_list[j], sg[j].addr_bus);
+				if (copy_to_user((void __user *)sg[j].addr_bus,sg_list[j], sg_size)) {
+					printk(KERN_WARNING"%s: Could not copy %p TO user %x\n",c->name, sg_list[j], sg[j].addr_bus);
 					rcode = -EFAULT;
 					goto cleanup;
 				}
--- diff/drivers/message/i2o/i2o_core.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/message/i2o/i2o_core.c	2004-07-01 21:32:37.000000000 +0100
@@ -354,7 +354,7 @@
 
 	if (msg[0] & MSG_FAIL) // Fail bit is set
 	{
-		u32 *preserved_msg = (u32*)(c->mem_offset + msg[7]);
+		u32 *preserved_msg = (u32*)(c->msg_virt + msg[7]);
 
 		i2o_report_status(KERN_INFO, "i2o_core", msg);
 		i2o_dump_message(preserved_msg);
@@ -1794,7 +1794,7 @@
 	m=i2o_wait_message(c, "AdapterReset");
 	if(m==0xFFFFFFFF)	
 		return -ETIMEDOUT;
-	msg=(u32 *)(c->mem_offset+m);
+	msg=(u32 *)(c->msg_virt+m);
 	
 	status = pci_alloc_consistent(c->pdev, 4, &status_phys);
 	if(status == NULL) {
@@ -1923,7 +1923,7 @@
 	m=i2o_wait_message(c, "StatusGet");
 	if(m==0xFFFFFFFF)
 		return -ETIMEDOUT;	
-	msg=(u32 *)(c->mem_offset+m);
+	msg=(u32 *)(c->msg_virt+m);
 
 	msg[0]=NINE_WORD_MSG_SIZE|SGL_OFFSET_0;
 	msg[1]=I2O_CMD_STATUS_GET<<24|HOST_TID<<12|ADAPTER_TID;
@@ -2344,7 +2344,7 @@
 	m=i2o_wait_message(c, "OutboundInit");
 	if(m==0xFFFFFFFF)
 		return -ETIMEDOUT;
-	msg=(u32 *)(c->mem_offset+m);
+	msg=(u32 *)(c->msg_virt+m);
 
 	status = pci_alloc_consistent(c->pdev, 4, &status_phys);
 	if (status==NULL) {
@@ -2618,7 +2618,7 @@
 		sys_tbl->iops[count].last_changed = sys_tbl_ind - 1; // ??
 		sys_tbl->iops[count].iop_capabilities = 
 				iop->status_block->iop_capabilities;
-		sys_tbl->iops[count].inbound_low = iop->post_port;
+		sys_tbl->iops[count].inbound_low = (u32)iop->post_port;
 		sys_tbl->iops[count].inbound_high = 0;	// FIXME: 64-bit support
 
 		count++;
@@ -2666,7 +2666,7 @@
 		       c->name);
 		return -ETIMEDOUT;
 	}
-	msg = (u32 *)(c->mem_offset + m);
+	msg = (u32 *)(c->msg_virt + m);
  	memcpy_toio(msg, data, len);
 	i2o_post_message(c,m);
 	return 0;
@@ -3592,7 +3592,9 @@
 	I2O_IRQ_WRITE32(c,0xFFFFFFFF);
 	if(c->irq > 0)
 		free_irq(c->irq, c);
-	iounmap(((u8 *)c->post_port)-0x40);
+	iounmap(c->base_virt);
+	if(c->raptor)
+		iounmap(c->msg_virt);
 
 #ifdef CONFIG_MTRR
 	if(c->mtrr_reg0 > 0)
@@ -3633,9 +3635,12 @@
 {
 	struct i2o_controller *c=kmalloc(sizeof(struct i2o_controller),
 						GFP_KERNEL);
-	unsigned long mem;
-	u32 memptr = 0;
-	u32 size;
+	void *bar0_virt;
+	void *bar1_virt;
+	unsigned long bar0_phys = 0;
+	unsigned long bar1_phys = 0;
+	unsigned long bar0_size = 0;
+	unsigned long bar1_size = 0;
 	
 	int i;
 
@@ -3646,37 +3651,9 @@
 	}
 	memset(c, 0, sizeof(*c));
 
-	for(i=0; i<6; i++)
-	{
-		/* Skip I/O spaces */
-		if(!(pci_resource_flags(dev, i) & IORESOURCE_IO))
-		{
-			memptr = pci_resource_start(dev, i);
-			break;
-		}
-	}
-	
-	if(i==6)
-	{
-		printk(KERN_ERR "i2o: I2O controller has no memory regions defined.\n");
-		kfree(c);
-		return -EINVAL;
-	}
-	
-	size = dev->resource[i].end-dev->resource[i].start+1;	
-	/* Map the I2O controller */
-	
-	printk(KERN_INFO "i2o: PCI I2O controller at 0x%08X size=%d\n", memptr, size);
-	mem = (unsigned long)ioremap(memptr, size);
-	if(mem==0)
-	{
-		printk(KERN_ERR "i2o: Unable to map controller.\n");
-		kfree(c);
-		return -EINVAL;
-	}
-
 	c->irq = -1;
 	c->dpt = 0;
+	c->raptor = 0;
 	c->short_req = 0;
 	c->pdev = dev;
 
@@ -3684,13 +3661,6 @@
 	c->context_list_lock = SPIN_LOCK_UNLOCKED;
 #endif
 
-	c->irq_mask = mem+0x34;
-	c->post_port = mem+0x40;
-	c->reply_port = mem+0x44;
-
-	c->mem_phys = memptr;
-	c->mem_offset = mem;
-	
 	/*
 	 *	Cards that fall apart if you hit them with large I/O
 	 *	loads...
@@ -3701,6 +3671,7 @@
 		c->short_req = 1;
 		printk(KERN_INFO "I2O: Symbios FC920 workarounds activated.\n");
 	}
+
 	if(dev->subsystem_vendor == PCI_VENDOR_ID_PROMISE)
 	{
 		c->promise = 1;
@@ -3712,15 +3683,85 @@
 	 *	them
 	 */
 	 
-	if(dev->vendor == PCI_VENDOR_ID_DPT)
+	if(dev->vendor == PCI_VENDOR_ID_DPT) {
 		c->dpt=1;
+		if(dev->device == 0xA511)
+			c->raptor=1;
+	}
+
+	for(i=0; i<6; i++)
+	{
+		/* Skip I/O spaces */
+		if(!(pci_resource_flags(dev, i) & IORESOURCE_IO))
+		{
+			if(!bar0_phys)
+			{
+				bar0_phys = pci_resource_start(dev, i);
+				bar0_size = pci_resource_len(dev, i);
+				if(!c->raptor)
+					break;
+			}
+			else
+			{
+				bar1_phys = pci_resource_start(dev, i);
+				bar1_size = pci_resource_len(dev, i);
+				break;
+			}
+		}
+	}
+
+	if(i==6)
+	{
+		printk(KERN_ERR "i2o: I2O controller has no memory regions defined.\n");
+		kfree(c);
+		return -EINVAL;
+	}
+
+
+	/* Map the I2O controller */
+	if(!c->raptor)
+		printk(KERN_INFO "i2o: PCI I2O controller at %08lX size=%ld\n", bar0_phys, bar0_size);
+	else
+		printk(KERN_INFO "i2o: PCI I2O controller\n    BAR0 at 0x%08lX size=%ld\n    BAR1 at 0x%08lX size=%ld\n", bar0_phys, bar0_size, bar1_phys, bar1_size);
+
+	bar0_virt = ioremap(bar0_phys, bar0_size);
+	if(bar0_virt==0)
+	{
+		printk(KERN_ERR "i2o: Unable to map controller.\n");
+		kfree(c);
+		return -EINVAL;
+	}
+
+	if(c->raptor)
+	{
+		bar1_virt = ioremap(bar1_phys, bar1_size);
+		if(bar1_virt==0)
+		{
+			printk(KERN_ERR "i2o: Unable to map controller.\n");
+			kfree(c);
+			iounmap(bar0_virt);
+			return -EINVAL;
+		}
+	} else {
+		bar1_virt = bar0_virt;
+		bar1_phys = bar0_phys;
+		bar1_size = bar0_size;
+	}
+
+	c->irq_mask = bar0_virt+0x34;
+	c->post_port = bar0_virt+0x40;
+	c->reply_port = bar0_virt+0x44;
+
+	c->base_phys = bar0_phys;
+	c->base_virt = bar0_virt;
+	c->msg_phys = bar1_phys;
+	c->msg_virt = bar1_virt;
 	
 	/* 
 	 * Enable Write Combining MTRR for IOP's memory region
 	 */
 #ifdef CONFIG_MTRR
-	c->mtrr_reg0 =
-		mtrr_add(c->mem_phys, size, MTRR_TYPE_WRCOMB, 1);
+	c->mtrr_reg0 = mtrr_add(c->base_phys, bar0_size, MTRR_TYPE_WRCOMB, 1);
 	/*
 	 * If it is an INTEL i960 I/O processor then set the first 64K to
 	 * Uncacheable since the region contains the Messaging unit which
@@ -3730,14 +3771,16 @@
 	if(dev->vendor == PCI_VENDOR_ID_INTEL || dev->vendor == PCI_VENDOR_ID_DPT)
 	{
 		printk(KERN_INFO "I2O: MTRR workaround for Intel i960 processor\n"); 
-		c->mtrr_reg1 =	mtrr_add(c->mem_phys, 65536, MTRR_TYPE_UNCACHABLE, 1);
+		c->mtrr_reg1 =	mtrr_add(c->base_phys, 65536, MTRR_TYPE_UNCACHABLE, 1);
 		if(c->mtrr_reg1< 0)
 		{
 			printk(KERN_INFO "i2o_pci: Error in setting MTRR_TYPE_UNCACHABLE\n");
-			mtrr_del(c->mtrr_reg0, c->mem_phys, size);
+			mtrr_del(c->mtrr_reg0, c->msg_phys, bar1_size);
 			c->mtrr_reg0 = -1;
 		}
 	}
+	if(c->raptor)
+		c->mtrr_reg1 = mtrr_add(c->msg_phys, bar1_size, MTRR_TYPE_WRCOMB, 1);
 
 #endif
 
@@ -3749,7 +3792,9 @@
 	{
 		printk(KERN_ERR "i2o: Unable to install controller.\n");
 		kfree(c);
-		iounmap((void *)mem);
+		iounmap(bar0_virt);
+		if(c->raptor)
+			iounmap(bar1_virt);
 		return i;
 	}
 
@@ -3764,7 +3809,9 @@
 				c->name, dev->irq);
 			c->irq = -1;
 			i2o_delete_controller(c);
-			iounmap((void *)mem);
+			iounmap(bar0_virt);
+			if(c->raptor)
+				iounmap(bar1_virt);
 			return -EBUSY;
 		}
 	}
@@ -3797,10 +3844,12 @@
 
 	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
 	{
-		if((dev->class>>8)!=PCI_CLASS_INTELLIGENT_I2O)
+		if((dev->class>>8)!=PCI_CLASS_INTELLIGENT_I2O &&
+		   (dev->vendor!=PCI_VENDOR_ID_DPT || dev->device!=0xA511))
 			continue;
 
-		if((dev->class&0xFF)>1)
+		if((dev->class>>8)==PCI_CLASS_INTELLIGENT_I2O &&
+		   (dev->class&0xFF)>1)
 		{
 			printk(KERN_INFO "i2o: I2O Controller found but does not support I2O 1.5 (skipping).\n");
 			continue;
--- diff/drivers/message/i2o/i2o_scsi.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/message/i2o/i2o_scsi.c	2004-07-01 21:32:37.000000000 +0100
@@ -59,9 +59,11 @@
 #include <asm/atomic.h>
 #include <linux/blkdev.h>
 #include <linux/i2o.h>
-#include "../../scsi/scsi.h"
-#include "../../scsi/hosts.h"
 
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
 
 
 #define VERSION_STRING        "Version 0.1.2"
@@ -186,7 +188,7 @@
 
 static void i2o_scsi_reply(struct i2o_handler *h, struct i2o_controller *c, struct i2o_message *msg)
 {
-	Scsi_Cmnd *current_command;
+	struct scsi_cmnd *current_command;
 	spinlock_t *lock;
 	u32 *m = (u32 *)msg;
 	u8 as,ds,st;
@@ -230,7 +232,7 @@
 		{
 			spin_unlock_irqrestore(&retry_lock, flags);
 			/* Create a scsi error for this */
-			current_command = (Scsi_Cmnd *)i2o_context_list_get(m[3], c);
+			current_command = (struct scsi_cmnd *)i2o_context_list_get(m[3], c);
 			if(!current_command)
 				return;
 
@@ -277,7 +279,7 @@
 		return;
 	}
 
-	current_command = (Scsi_Cmnd *)i2o_context_list_get(m[3], c);
+	current_command = (struct scsi_cmnd *)i2o_context_list_get(m[3], c);
 	
 	/*
 	 *	Is this a control request coming back - eg an abort ?
@@ -330,10 +332,17 @@
 		 */		
 		current_command->result = DID_OK << 16 | ds;
 
-	if (current_command->use_sg)
-		pci_unmap_sg(c->pdev, (struct scatterlist *)current_command->buffer, current_command->use_sg, scsi_to_pci_dma_dir(current_command->sc_data_direction));
-	else if (current_command->request_bufflen)
-		pci_unmap_single(c->pdev, (dma_addr_t)((long)current_command->SCp.ptr), current_command->request_bufflen, scsi_to_pci_dma_dir(current_command->sc_data_direction));
+	if (current_command->use_sg) {
+		pci_unmap_sg(c->pdev,
+			(struct scatterlist *)current_command->buffer,
+			current_command->use_sg,
+			current_command->sc_data_direction);
+	} else if (current_command->request_bufflen) {
+		pci_unmap_single(c->pdev,
+			(dma_addr_t)((long)current_command->SCp.ptr),
+			current_command->request_bufflen,
+			current_command->sc_data_direction);
+	}
 
 	lock = current_command->device->host->host_lock;
 	spin_lock_irqsave(lock, flags);
@@ -461,7 +470,7 @@
  *	scsi controller and then let the enumeration fake up the rest
  */
  
-static int i2o_scsi_detect(Scsi_Host_Template * tpnt)
+static int i2o_scsi_detect(struct scsi_host_template * tpnt)
 {
 	struct Scsi_Host *shpnt = NULL;
 	int i;
@@ -592,12 +601,13 @@
  *	Locks: takes the controller lock on error path only
  */
  
-static int i2o_scsi_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
+static int i2o_scsi_queuecommand(struct scsi_cmnd *SCpnt,
+				 void (*done) (struct scsi_cmnd *))
 {
 	int i;
 	int tid;
 	struct i2o_controller *c;
-	Scsi_Cmnd *current_command;
+	struct scsi_cmnd *current_command;
 	struct Scsi_Host *host;
 	struct i2o_scsi_host *hostdata;
 	u32 *msg, *mptr;
@@ -659,7 +669,7 @@
 	if(m==0xFFFFFFFF)
 		return 1;
 
-	msg = (u32 *)(c->mem_offset + m);
+	msg = (u32 *)(c->msg_virt + m);
 	
 	/*
 	 *	Put together a scsi execscb message
@@ -668,19 +678,14 @@
 	len = SCpnt->request_bufflen;
 	direction = 0x00000000;			// SGL IN  (osm<--iop)
 	
-	if(SCpnt->sc_data_direction == SCSI_DATA_NONE)
+	if (SCpnt->sc_data_direction == DMA_NONE) {
 		scsidir = 0x00000000;			// DATA NO XFER
-	else if(SCpnt->sc_data_direction == SCSI_DATA_WRITE)
-	{
-		direction=0x04000000;	// SGL OUT  (osm-->iop)
-		scsidir  =0x80000000;	// DATA OUT (iop-->dev)
-	}
-	else if(SCpnt->sc_data_direction == SCSI_DATA_READ)
-	{
-		scsidir  =0x40000000;	// DATA IN  (iop<--dev)
-	}
-	else
-	{
+	} else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) {
+		direction = 0x04000000;	// SGL OUT  (osm-->iop)
+		scsidir = 0x80000000;	// DATA OUT (iop-->dev)
+	} else if(SCpnt->sc_data_direction == DMA_FROM_DEVICE) {
+		scsidir = 0x40000000;	// DATA IN  (iop<--dev)
+	} else {
 		/* Unknown - kill the command */
 		SCpnt->result = DID_NO_CONNECT << 16;
 		
@@ -768,7 +773,7 @@
 		len = 0;
 
 		sg_count = pci_map_sg(c->pdev, sg, SCpnt->use_sg,
-				      scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+				SCpnt->sc_data_direction);
 
 		/* FIXME: handle fail */
 		if(!sg_count)
@@ -840,7 +845,7 @@
 			dma_addr = pci_map_single(c->pdev,
 					       SCpnt->request_buffer,
 					       SCpnt->request_bufflen,
-					       scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+					       SCpnt->sc_data_direction);
 			if(dma_addr == 0)
 				BUG();	/* How to handle ?? */
 			SCpnt->SCp.ptr = (char *)(unsigned long) dma_addr;
@@ -883,7 +888,7 @@
  *	Locks: no locks are held or needed
  */
  
-int i2o_scsi_abort(Scsi_Cmnd * SCpnt)
+static int i2o_scsi_abort(struct scsi_cmnd * SCpnt)
 {
 	struct i2o_controller *c;
 	struct Scsi_Host *host;
@@ -929,14 +934,14 @@
  *	Locks: called with no lock held, requires no locks.
  */
  
-static int i2o_scsi_bus_reset(Scsi_Cmnd * SCpnt)
+static int i2o_scsi_bus_reset(struct scsi_cmnd * SCpnt)
 {
 	int tid;
 	struct i2o_controller *c;
 	struct Scsi_Host *host;
 	struct i2o_scsi_host *hostdata;
 	u32 m;
-	unsigned long msg;
+	void *msg;
 	unsigned long timeout;
 
 	
@@ -974,7 +979,7 @@
 	while(time_before(jiffies, timeout));
 	
 	
-	msg = c->mem_offset + m;
+	msg = c->msg_virt + m;
 	i2o_raw_writel(FOUR_WORD_MSG_SIZE|SGL_OFFSET_0, msg);
 	i2o_raw_writel(I2O_CMD_SCSI_BUSRESET<<24|HOST_TID<<12|tid, msg+4);
 	i2o_raw_writel(scsi_context|0x80000000, msg+8);
@@ -992,32 +997,6 @@
 }
 
 /**
- *	i2o_scsi_host_reset	-	host reset callback
- *	@SCpnt: command causing the reset
- *
- *	An I2O controller can be many things at once. While we can
- *	reset a controller the potential mess from doing so is vast, and
- *	it's better to simply hold on and pray
- */
- 
-static int i2o_scsi_host_reset(Scsi_Cmnd * SCpnt)
-{
-	return FAILED;
-}
-
-/**
- *	i2o_scsi_device_reset	-	device reset callback
- *	@SCpnt: command causing the reset
- *
- *	I2O does not (AFAIK) support doing a device reset
- */
- 
-static int i2o_scsi_device_reset(Scsi_Cmnd * SCpnt)
-{
-	return FAILED;
-}
-
-/**
  *	i2o_scsi_bios_param	-	Invent disk geometry
  *	@sdev: scsi device 
  *	@dev: block layer device
@@ -1048,7 +1027,7 @@
 MODULE_LICENSE("GPL");
 
 
-static Scsi_Host_Template driver_template = {
+static struct scsi_host_template driver_template = {
 	.proc_name		= "i2o_scsi",
 	.name			= "I2O SCSI Layer",
 	.detect			= i2o_scsi_detect,
@@ -1057,8 +1036,6 @@
 	.queuecommand		= i2o_scsi_queuecommand,
 	.eh_abort_handler	= i2o_scsi_abort,
 	.eh_bus_reset_handler	= i2o_scsi_bus_reset,
-	.eh_device_reset_handler= i2o_scsi_device_reset,
-	.eh_host_reset_handler	= i2o_scsi_host_reset,
 	.bios_param		= i2o_scsi_bios_param,
 	.can_queue		= I2O_SCSI_CAN_QUEUE,
 	.this_id		= 15,
--- diff/drivers/misc/ibmasm/ibmasmfs.c	2004-05-19 22:11:52.000000000 +0100
+++ source/drivers/misc/ibmasm/ibmasmfs.c	2004-07-01 21:32:37.000000000 +0100
@@ -224,12 +224,12 @@
 	return dentry;
 }
 
-int ibmasmfs_register()
+int ibmasmfs_register(void)
 {
 	return register_filesystem(&ibmasmfs_type);
 }
 
-void ibmasmfs_unregister()
+void ibmasmfs_unregister(void)
 {
 	unregister_filesystem(&ibmasmfs_type);
 }
@@ -287,7 +287,7 @@
 	return 0;
 }
 
-static ssize_t command_file_read(struct file *file, char *buf, size_t count, loff_t *offset)
+static ssize_t command_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
 	struct ibmasmfs_command_data *command_data = file->private_data;
 	struct command *cmd;
@@ -324,7 +324,7 @@
 	return len;
 }
 
-static ssize_t command_file_write(struct file *file, const char *ubuff, size_t count, loff_t *offset)
+static ssize_t command_file_write(struct file *file, const char __user *ubuff, size_t count, loff_t *offset)
 {
 	struct ibmasmfs_command_data *command_data = file->private_data;
 	struct command *cmd;
@@ -345,7 +345,7 @@
 	if (!cmd)
 		return -ENOMEM;
 
-	if (copy_from_user((void *)cmd->buffer, (void *)ubuff, count)) {
+	if (copy_from_user(cmd->buffer, ubuff, count)) {
 		command_put(cmd);
 		return -EFAULT;
 	}
@@ -395,7 +395,7 @@
 	return 0;
 }
 
-static ssize_t event_file_read(struct file *file, char *buf, size_t count, loff_t *offset)
+static ssize_t event_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
 	struct ibmasmfs_event_data *event_data = file->private_data;
 	struct event_reader *reader = &event_data->reader;
@@ -421,7 +421,7 @@
 	return reader->data_size;
 }
 
-static ssize_t event_file_write(struct file *file, const char *buf, size_t count, loff_t *offset)
+static ssize_t event_file_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
 {
 	struct ibmasmfs_event_data *event_data = file->private_data;
 
@@ -462,7 +462,7 @@
 	return 0;
 }
 
-static ssize_t r_heartbeat_file_read(struct file *file, char *buf, size_t count, loff_t *offset)
+static ssize_t r_heartbeat_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
 	struct ibmasmfs_heartbeat_data *rhbeat = file->private_data;
 	unsigned long flags;
@@ -490,7 +490,7 @@
 	return result;
 }
 
-static ssize_t r_heartbeat_file_write(struct file *file, const char *buf, size_t count, loff_t *offset)
+static ssize_t r_heartbeat_file_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
 {
 	struct ibmasmfs_heartbeat_data *rhbeat = file->private_data;
 
@@ -518,7 +518,7 @@
 	return 0;
 }
 
-static ssize_t remote_settings_file_read(struct file *file, char *buf, size_t count, loff_t *offset)
+static ssize_t remote_settings_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
 	unsigned long address = (unsigned long)file->private_data;
 	unsigned char *page;
@@ -552,7 +552,7 @@
 	return retval;
 }
 
-static ssize_t remote_settings_file_write(struct file *file, const char *ubuff, size_t count, loff_t *offset)
+static ssize_t remote_settings_file_write(struct file *file, const char __user *ubuff, size_t count, loff_t *offset)
 {
 	unsigned long address = (unsigned long)file->private_data;
 	char *buff;
@@ -571,7 +571,7 @@
 
 	memset(buff, 0x0, count + 1);
 
-	if (copy_from_user((void *)buff, (void *)ubuff, count)) {
+	if (copy_from_user(buff, ubuff, count)) {
 		kfree(buff);
 		return -EFAULT;
 	}
@@ -618,7 +618,7 @@
 	return 0;
 }
 
-static ssize_t remote_event_file_read(struct file *file, char *buf, size_t count, loff_t *offset)
+static ssize_t remote_event_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
 	struct service_processor *sp = file->private_data;
 	struct remote_queue *q = &sp->remote_queue;
@@ -663,7 +663,7 @@
 	.open =		event_file_open,
 	.release =	event_file_close,
 	.read =		event_file_read,
-	.write 		event_file_write,
+	.write =	event_file_write,
 };
 
 static struct file_operations r_heartbeat_fops = {
--- diff/drivers/mtd/chips/cfi_cmdset_0001.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/mtd/chips/cfi_cmdset_0001.c	2004-07-01 21:32:37.000000000 +0100
@@ -378,7 +378,7 @@
 				chip->state = FL_ERASING;
 				chip->oldstate = FL_READY;
 				printk(KERN_ERR "Chip not ready after erase "
-				       "suspended: status = 0x%x\n", status);
+				       "suspended: status = 0x%llx\n", status);
 				return -EIO;
 			}
 
@@ -963,7 +963,7 @@
 	   So we must check here and reset those bits if they're set. Otherwise
 	   we're just pissing in the wind */
 	if (status & CMD(0x30)) {
-		printk(KERN_WARNING "SR.4 or SR.5 bits set in buffer write (status %x). Clearing.\n", status);
+		printk(KERN_WARNING "SR.4 or SR.5 bits set in buffer write (status %llx). Clearing.\n", status);
 		cfi_write(map, CMD(0x50), cmd_adr);
 		cfi_write(map, CMD(0x70), cmd_adr);
 	}
--- diff/drivers/mtd/chips/cfi_cmdset_0002.c	2004-05-19 22:11:52.000000000 +0100
+++ source/drivers/mtd/chips/cfi_cmdset_0002.c	2004-07-01 21:32:37.000000000 +0100
@@ -509,7 +509,7 @@
 	chip->state = FL_WRITING;
 
 	adr += chip->start;
-	DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): WRITE 0x%.8lx(0x%.8x)\n",
+	DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): WRITE 0x%.8lx(0x%.8llx)\n",
 	       __func__, adr, datum );
 
 	ENABLE_VPP(map);
@@ -645,7 +645,7 @@
 	       __func__ );
 
 	printk(KERN_WARNING
-	       "MTD %s(): 0x%.8lx(0x%.8x): 0x%.8x 0x%.8x 0x%.8x 0x%.8x\n",
+	       "MTD %s(): 0x%.8lx(0x%.8llx): 0x%.8x 0x%.8x 0x%.8x 0x%.8x\n",
 	       __func__, adr, datum,
 	       prev_oldstatus, prev_status,
 	       oldstatus, status);
@@ -971,7 +971,7 @@
 	       __func__ );
 
 	printk(KERN_WARNING
-	       "MTD %s(): 0x%.8lx(0x%.8x): 0x%.8x 0x%.8x 0x%.8x 0x%.8x\n",
+	       "MTD %s(): 0x%.8lx(0x%.8llx): 0x%.8x 0x%.8x 0x%.8x 0x%.8x\n",
 	       __func__, adr, ones,
 	       prev_oldstatus, prev_status,
 	       oldstatus, status);
@@ -1151,7 +1151,7 @@
 	       __func__ );
 
 	printk(KERN_WARNING
-	       "MTD %s(): 0x%.8lx(0x%.8x): 0x%.8x 0x%.8x 0x%.8x 0x%.8x\n",
+	       "MTD %s(): 0x%.8lx(0x%.8llx): 0x%.8x 0x%.8x 0x%.8x 0x%.8x\n",
 	       __func__, adr, ones,
 	       prev_oldstatus, prev_status,
 	       oldstatus, status);
--- diff/drivers/mtd/chips/cfi_cmdset_0020.c	2004-05-19 22:11:52.000000000 +0100
+++ source/drivers/mtd/chips/cfi_cmdset_0020.c	2004-07-01 21:32:37.000000000 +0100
@@ -489,7 +489,7 @@
 		/* Urgh. Chip not yet ready to talk to us. */
 		if (time_after(jiffies, timeo)) {
 			spin_unlock_bh(chip->mutex);
-                        printk(KERN_ERR "waiting for chip to be ready timed out in buffer write Xstatus = %x, status = %x\n",
+                        printk(KERN_ERR "waiting for chip to be ready timed out in buffer write Xstatus = %x, status = %llx\n",
                                status, cfi_read(map, cmd_adr));
 			return -EIO;
 		}
@@ -859,7 +859,7 @@
 		if (time_after(jiffies, timeo)) {
 			cfi_write(map, CMD(0x70), adr);
 			chip->state = FL_STATUS;
-			printk(KERN_ERR "waiting for erase to complete timed out. Xstatus = %x, status = %x.\n", status, cfi_read(map, adr));
+			printk(KERN_ERR "waiting for erase to complete timed out. Xstatus = %x, status = %llx.\n", status, cfi_read(map, adr));
 			DISABLE_VPP(map);
 			spin_unlock_bh(chip->mutex);
 			return -EIO;
@@ -1145,7 +1145,7 @@
 		if (time_after(jiffies, timeo)) {
 			cfi_write(map, CMD(0x70), adr);
 			chip->state = FL_STATUS;
-			printk(KERN_ERR "waiting for lock to complete timed out. Xstatus = %x, status = %x.\n", status, cfi_read(map, adr));
+			printk(KERN_ERR "waiting for lock to complete timed out. Xstatus = %x, status = %llx.\n", status, cfi_read(map, adr));
 			DISABLE_VPP(map);
 			spin_unlock_bh(chip->mutex);
 			return -EIO;
@@ -1294,7 +1294,7 @@
 		if (time_after(jiffies, timeo)) {
 			cfi_write(map, CMD(0x70), adr);
 			chip->state = FL_STATUS;
-			printk(KERN_ERR "waiting for unlock to complete timed out. Xstatus = %x, status = %x.\n", status, cfi_read(map, adr));
+			printk(KERN_ERR "waiting for unlock to complete timed out. Xstatus = %x, status = %llx.\n", status, cfi_read(map, adr));
 			DISABLE_VPP(map);
 			spin_unlock_bh(chip->mutex);
 			return -EIO;
--- diff/drivers/mtd/devices/doc2000.c	2004-05-19 22:11:52.000000000 +0100
+++ source/drivers/mtd/devices/doc2000.c	2004-07-01 21:32:37.000000000 +0100
@@ -53,9 +53,11 @@
 static int doc_write(struct mtd_info *mtd, loff_t to, size_t len,
 		     size_t *retlen, const u_char *buf);
 static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len,
-			size_t *retlen, u_char *buf, u_char *eccbuf, int oobsel);
+			size_t *retlen, u_char *buf, u_char *eccbuf,
+			struct nand_oobinfo *unused);
 static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,
-			 size_t *retlen, const u_char *buf, u_char *eccbuf, int oobsel);
+			 size_t *retlen, const u_char *buf, u_char *eccbuf,
+			struct nand_oobinfo *unused);
 static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
 			size_t *retlen, u_char *buf);
 static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
@@ -601,7 +603,8 @@
 }
 
 static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len,
-			size_t * retlen, u_char * buf, u_char * eccbuf, int oobsel)
+			size_t * retlen, u_char * buf, u_char * eccbuf,
+			struct nand_oobinfo *unused)
 {
 	struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
 	unsigned long docptr;
@@ -750,7 +753,8 @@
 
 static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,
 			 size_t * retlen, const u_char * buf,
-			 u_char * eccbuf, int oobsel)
+			 u_char * eccbuf,
+			 struct nand_oobinfo *unused)
 {
 	struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
 	int di; /* Yes, DI is a hangover from when I was disassembling the binary driver */
--- diff/drivers/mtd/devices/doc2001.c	2004-05-19 22:11:52.000000000 +0100
+++ source/drivers/mtd/devices/doc2001.c	2004-07-01 21:32:37.000000000 +0100
@@ -37,9 +37,12 @@
 static int doc_write(struct mtd_info *mtd, loff_t to, size_t len,
 		     size_t *retlen, const u_char *buf);
 static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len,
-			size_t *retlen, u_char *buf, u_char *eccbuf, int oobsel);
+			size_t *retlen, u_char *buf, u_char *eccbuf,
+			struct nand_oobinfo *unused);
 static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,
-			 size_t *retlen, const u_char *buf, u_char *eccbuf, int oobsel);
+			 size_t *retlen, const u_char *buf, u_char *eccbuf,
+			struct nand_oobinfo *unused);
+
 static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
 			size_t *retlen, u_char *buf);
 static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
@@ -407,7 +410,8 @@
 }
 
 static int doc_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
-			 size_t *retlen, u_char *buf, u_char *eccbuf, int oobsel)
+			 size_t *retlen, u_char *buf, u_char *eccbuf,
+			 struct nand_oobinfo *unused)
 {
 	int i, ret;
 	volatile char dummy;
@@ -533,7 +537,8 @@
 }
 
 static int doc_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
-			  size_t *retlen, const u_char *buf, u_char *eccbuf, int oobsel)
+			  size_t *retlen, const u_char *buf, u_char *eccbuf,
+			  struct nand_oobinfo *unused)
 {
 	int i,ret = 0;
 	volatile char dummy;
--- diff/drivers/mtd/maps/wr_sbc82xx_flash.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/mtd/maps/wr_sbc82xx_flash.c	2004-07-01 21:32:37.000000000 +0100
@@ -20,7 +20,7 @@
 #include <linux/config.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/immap_8260.h>
+#include <asm/immap_cpm2.h>
 
 static struct mtd_info *sbcmtd[3];
 static struct mtd_partition *sbcmtd_parts[3];
@@ -59,7 +59,7 @@
 
 int __init init_sbc82xx_flash(void)
 {
-	volatile  memctl8260_t *mc = &immr->im_memctl;
+	volatile  memctl_cpm2_t *mc = &cpm2_immr->im_memctl;
 	int bigflash;
 	int i;
 
--- diff/drivers/mtd/mtd_blkdevs.c	2004-05-19 22:11:52.000000000 +0100
+++ source/drivers/mtd/mtd_blkdevs.c	2004-07-01 21:32:37.000000000 +0100
@@ -220,7 +220,7 @@
 				return ret;
 
 			g.start = get_start_sect(inode->i_bdev);
-			if (copy_to_user((void *)arg, &g, sizeof(g)))
+			if (copy_to_user((void __user *)arg, &g, sizeof(g)))
 				return -EFAULT;
 			return 0;
 		} /* else */
--- diff/drivers/mtd/mtdblock.c	2004-05-19 22:11:52.000000000 +0100
+++ source/drivers/mtd/mtdblock.c	2004-07-01 21:32:37.000000000 +0100
@@ -275,7 +275,7 @@
 	
 	/* OK, it's not open. Create cache info for it */
 	mtdblk = kmalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
-	if (!mtdblks)
+	if (!mtdblk)
 		return -ENOMEM;
 
 	memset(mtdblk, 0, sizeof(*mtdblk));
--- diff/drivers/mtd/mtdchar.c	2004-05-19 22:11:52.000000000 +0100
+++ source/drivers/mtd/mtdchar.c	2004-07-01 21:32:37.000000000 +0100
@@ -116,7 +116,7 @@
 */
 #define MAX_KMALLOC_SIZE 0x20000
 
-static ssize_t mtd_read(struct file *file, char *buf, size_t count,loff_t *ppos)
+static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t *ppos)
 {
 	struct mtd_info *mtd = (struct mtd_info *)file->private_data;
 	size_t retlen=0;
@@ -169,7 +169,7 @@
 	return total_retlen;
 } /* mtd_read */
 
-static ssize_t mtd_write(struct file *file, const char *buf, size_t count,loff_t *ppos)
+static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count,loff_t *ppos)
 {
 	struct mtd_info *mtd = (struct mtd_info *)file->private_data;
 	char *kbuf;
@@ -238,6 +238,7 @@
 		     u_int cmd, u_long arg)
 {
 	struct mtd_info *mtd = (struct mtd_info *)file->private_data;
+	void __user *argp = (void __user *)arg;
 	int ret = 0;
 	u_long size;
 	
@@ -245,17 +246,17 @@
 
 	size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT;
 	if (cmd & IOC_IN) {
-		ret = verify_area(VERIFY_READ, (char *)arg, size);
+		ret = verify_area(VERIFY_READ, argp, size);
 		if (ret) return ret;
 	}
 	if (cmd & IOC_OUT) {
-		ret = verify_area(VERIFY_WRITE, (char *)arg, size);
+		ret = verify_area(VERIFY_WRITE, argp, size);
 		if (ret) return ret;
 	}
 	
 	switch (cmd) {
 	case MEMGETREGIONCOUNT:
-		if (copy_to_user((int *) arg, &(mtd->numeraseregions), sizeof(int)))
+		if (copy_to_user(argp, &(mtd->numeraseregions), sizeof(int)))
 			return -EFAULT;
 		break;
 
@@ -263,24 +264,19 @@
 	{
 		struct region_info_user ur;
 
-		if (copy_from_user(	&ur, 
-					(struct region_info_user *)arg, 
-					sizeof(struct region_info_user))) {
+		if (copy_from_user(&ur, argp, sizeof(struct region_info_user)))
 			return -EFAULT;
-		}
 
 		if (ur.regionindex >= mtd->numeraseregions)
 			return -EINVAL;
-		if (copy_to_user((struct mtd_erase_region_info *) arg, 
-				&(mtd->eraseregions[ur.regionindex]),
+		if (copy_to_user(argp, &(mtd->eraseregions[ur.regionindex]),
 				sizeof(struct mtd_erase_region_info)))
 			return -EFAULT;
 		break;
 	}
 
 	case MEMGETINFO:
-		if (copy_to_user((struct mtd_info *)arg, mtd,
-				 sizeof(struct mtd_info_user)))
+		if (copy_to_user(argp, mtd, sizeof(struct mtd_info_user)))
 			return -EFAULT;
 		break;
 
@@ -301,7 +297,7 @@
 			init_waitqueue_head(&waitq);
 
 			memset (erase,0,sizeof(struct erase_info));
-			if (copy_from_user(&erase->addr, (u_long *)arg,
+			if (copy_from_user(&erase->addr, argp,
 					   2 * sizeof(u_long))) {
 				kfree(erase);
 				return -EFAULT;
@@ -345,7 +341,7 @@
 		if(!(file->f_mode & 2))
 			return -EPERM;
 
-		if (copy_from_user(&buf, (struct mtd_oob_buf *)arg, sizeof(struct mtd_oob_buf)))
+		if (copy_from_user(&buf, argp, sizeof(struct mtd_oob_buf)))
 			return -EFAULT;
 		
 		if (buf.length > 0x4096)
@@ -354,7 +350,7 @@
 		if (!mtd->write_oob)
 			ret = -EOPNOTSUPP;
 		else
-			ret = verify_area(VERIFY_READ, (char *)buf.ptr, buf.length);
+			ret = verify_area(VERIFY_READ, buf.ptr, buf.length);
 
 		if (ret)
 			return ret;
@@ -370,7 +366,7 @@
 
 		ret = (mtd->write_oob)(mtd, buf.start, buf.length, &retlen, databuf);
 
-		if (copy_to_user((void *)arg + sizeof(u_int32_t), &retlen, sizeof(u_int32_t)))
+		if (copy_to_user(argp + sizeof(u_int32_t), &retlen, sizeof(u_int32_t)))
 			ret = -EFAULT;
 
 		kfree(databuf);
@@ -384,7 +380,7 @@
 		void *databuf;
 		ssize_t retlen;
 
-		if (copy_from_user(&buf, (struct mtd_oob_buf *)arg, sizeof(struct mtd_oob_buf)))
+		if (copy_from_user(&buf, argp, sizeof(struct mtd_oob_buf)))
 			return -EFAULT;
 		
 		if (buf.length > 0x4096)
@@ -393,7 +389,7 @@
 		if (!mtd->read_oob)
 			ret = -EOPNOTSUPP;
 		else
-			ret = verify_area(VERIFY_WRITE, (char *)buf.ptr, buf.length);
+			ret = verify_area(VERIFY_WRITE, buf.ptr, buf.length);
 
 		if (ret)
 			return ret;
@@ -404,7 +400,7 @@
 		
 		ret = (mtd->read_oob)(mtd, buf.start, buf.length, &retlen, databuf);
 
-		if (copy_to_user((void *)arg + sizeof(u_int32_t), &retlen, sizeof(u_int32_t)))
+		if (copy_to_user(argp + sizeof(u_int32_t), &retlen, sizeof(u_int32_t)))
 			ret = -EFAULT;
 		else if (retlen && copy_to_user(buf.ptr, databuf, retlen))
 			ret = -EFAULT;
@@ -417,7 +413,7 @@
 	{
 		unsigned long adrs[2];
 
-		if (copy_from_user(adrs ,(void *)arg, 2* sizeof(unsigned long)))
+		if (copy_from_user(adrs, argp, 2* sizeof(unsigned long)))
 			return -EFAULT;
 
 		if (!mtd->lock)
@@ -431,7 +427,7 @@
 	{
 		unsigned long adrs[2];
 
-		if (copy_from_user(adrs, (void *)arg, 2* sizeof(unsigned long)))
+		if (copy_from_user(adrs, argp, 2* sizeof(unsigned long)))
 			return -EFAULT;
 
 		if (!mtd->unlock)
@@ -443,7 +439,7 @@
 
 	case MEMSETOOBSEL:
 	{
-		if (copy_from_user(&mtd->oobinfo ,(void *)arg, sizeof(struct nand_oobinfo)))
+		if (copy_from_user(&mtd->oobinfo, argp, sizeof(struct nand_oobinfo)))
 			return -EFAULT;
 		break;
 	}
--- diff/drivers/net/3c501.c	2004-05-19 22:11:52.000000000 +0100
+++ source/drivers/net/3c501.c	2004-07-01 21:32:37.000000000 +0100
@@ -225,7 +225,7 @@
 	 *	Reserve I/O resource for exclusive use by this driver
 	 */
 
-	if (!request_region(ioaddr, EL1_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, EL1_IO_EXTENT, DRV_NAME))
 		return -ENODEV;
 
 	/*
--- diff/drivers/net/3c503.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/3c503.c	2004-07-01 21:32:37.000000000 +0100
@@ -147,6 +147,7 @@
 	release_region(dev->base_addr, EL2_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init el2_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -171,6 +172,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 /* Probe for the Etherlink II card at I/O port base IOADDR,
    returning non-zero on success.  If found, set the station
@@ -182,10 +184,10 @@
     static unsigned version_printed;
     unsigned long vendor_id;
 
-    if (!request_region(ioaddr, EL2_IO_EXTENT, dev->name))
+    if (!request_region(ioaddr, EL2_IO_EXTENT, DRV_NAME))
 	return -EBUSY;
 
-    if (!request_region(ioaddr + 0x400, 8, dev->name)) {
+    if (!request_region(ioaddr + 0x400, 8, DRV_NAME)) {
 	retval = -EBUSY;
 	goto out;
     }
--- diff/drivers/net/3c505.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/3c505.c	2004-07-01 21:32:37.000000000 +0100
@@ -1614,6 +1614,7 @@
 	return err;
 }
 
+#ifndef MODULE
 struct net_device * __init elplus_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(elp_device));
@@ -1632,7 +1633,7 @@
 	return dev;
 }
 
-#ifdef MODULE
+#else
 static struct net_device *dev_3c505[ELP_MAX_CARDS];
 static int io[ELP_MAX_CARDS];
 static int irq[ELP_MAX_CARDS];
--- diff/drivers/net/3c507.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/3c507.c	2004-07-01 21:32:37.000000000 +0100
@@ -373,7 +373,7 @@
 		init_ID_done = 1;
 	}
 
-	if (!request_region(ioaddr, EL16_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, EL16_IO_EXTENT, DRV_NAME))
 		return -ENODEV;
 
 	if ((inb(ioaddr) != '*') || (inb(ioaddr + 1) != '3') || 
@@ -392,7 +392,7 @@
 
 	irq = inb(ioaddr + IRQ_CONFIG) & 0x0f;
 
-	irqval = request_irq(irq, &el16_interrupt, 0, dev->name, dev);
+	irqval = request_irq(irq, &el16_interrupt, 0, DRV_NAME, dev);
 	if (irqval) {
 		printk ("unable to get IRQ %d (irqval=%d).\n", irq, irqval);
 		retval = -EAGAIN;
--- diff/drivers/net/3c509.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/net/3c509.c	2004-07-01 21:32:37.000000000 +0100
@@ -56,10 +56,6 @@
 		v1.19b 08Nov2002 Marc Zyngier <maz@wild-wind.fr.eu.org>
 		    - Introduce driver model for EISA cards.
 */
-/*
-  FIXES for PC-9800:
-  Shu Iwanaga: 3c569B(PC-9801 C-bus) support
-*/
 
 #define DRV_NAME	"3c509"
 #define DRV_VERSION	"1.19b"
@@ -265,7 +261,7 @@
 };
 #endif /* CONFIG_MCA */
 
-#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
+#if defined(__ISAPNP__)
 static struct isapnp_device_id el3_isapnp_adapters[] __initdata = {
 	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
 		ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5090),
@@ -362,7 +358,7 @@
 	if (lp->pmdev)
 		pm_unregister(lp->pmdev);
 #endif
-#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
+#if defined(__ISAPNP__)
 	if (lp->type == EL3_PNP)
 		pnp_device_detach(to_pnp_dev(lp->dev));
 #endif
@@ -381,7 +377,7 @@
 	u16 phys_addr[3];
 	static int current_tag;
 	int err = -ENODEV;
-#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
+#if defined(__ISAPNP__)
 	static int pnp_cards;
 	struct pnp_dev *idev = NULL;
 
@@ -436,9 +432,6 @@
 no_pnp:
 #endif /* __ISAPNP__ */
 
-#ifdef CONFIG_X86_PC9800
-	id_port = 0x71d0;
-#else
 	/* Select an open I/O location at 0x1*0 to do contention select. */
 	for ( ; id_port < 0x200; id_port += 0x10) {
 		if (!request_region(id_port, 1, "3c509"))
@@ -456,7 +449,7 @@
 		printk(" WARNING: No I/O port available for 3c509 activation.\n");
 		return -ENODEV;
 	}
-#endif /* CONFIG_X86_PC9800 */
+
 	/* Next check for all ISA bus boards by sending the ID sequence to the
 	   ID_PORT.  We find cards past the first by setting the 'current_tag'
 	   on cards as they are found.  Cards with their tag set will not
@@ -487,7 +480,7 @@
 		phys_addr[i] = htons(id_read_eeprom(i));
 	}
 
-#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
+#if defined(__ISAPNP__)
 	if (nopnp == 0) {
 		/* The ISA PnP 3c509 cards respond to the ID sequence.
 		   This check is needed in order not to register them twice. */
@@ -512,19 +505,9 @@
 	{
 		unsigned int iobase = id_read_eeprom(8);
 		if_port = iobase >> 14;
-#ifdef CONFIG_X86_PC9800
-		ioaddr = 0x40d0 + ((iobase & 0x1f) << 8);
-#else
 		ioaddr = 0x200 + ((iobase & 0x1f) << 4);
-#endif
 	}
 	irq = id_read_eeprom(9) >> 12;
-#ifdef CONFIG_X86_PC9800
-	if (irq == 7)
-		irq = 6;
-	else if (irq == 15)
-		irq = 13;
-#endif
 
 	dev = alloc_etherdev(sizeof (struct el3_private));
 	if (!dev)
@@ -555,11 +538,7 @@
 	outb(0xd0 + ++current_tag, id_port);
 
 	/* Activate the adaptor at the EEPROM location. */
-#ifdef CONFIG_X86_PC9800
-	outb((ioaddr >> 8) | 0xe0, id_port);
-#else
 	outb((ioaddr >> 4) | 0xe0, id_port);
-#endif
 
 	EL3WINDOW(0);
 	if (inw(ioaddr) != 0x6d50)
@@ -568,7 +547,7 @@
 	/* Free the interrupt so that some other card can use it. */
 	outw(0x0f00, ioaddr + WN0_IRQ);
 
-#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
+#if defined(__ISAPNP__)
  found:							/* PNP jumps here... */
 #endif /* __ISAPNP__ */
 
@@ -577,7 +556,7 @@
 	dev->irq = irq;
 	dev->if_port = if_port;
 	lp = netdev_priv(dev);
-#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
+#if defined(__ISAPNP__)
 	lp->dev = &idev->dev;
 #endif
 	err = el3_common_init(dev);
@@ -601,7 +580,7 @@
 	return 0;
 
 out1:
-#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
+#if defined(__ISAPNP__)
 	if (idev)
 		pnp_device_detach(idev);
 #endif
@@ -1461,12 +1440,6 @@
 	outw(0x0001, ioaddr + 4);
 
 	/* Set the IRQ line. */
-#ifdef CONFIG_X86_PC9800
-	if (dev->irq == 6)
-		dev->irq = 7;
-	else if (dev->irq == 13)
-		dev->irq = 15;
-#endif
 	outw((dev->irq << 12) | 0x0f00, ioaddr + WN0_IRQ);
 
 	/* Set the station address in window 2 each time opened. */
@@ -1629,7 +1602,7 @@
 MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)");
 MODULE_PARM_DESC(xcvr,"transceiver(s) (0=internal, 1=external)");
 MODULE_PARM_DESC(max_interrupt_work, "maximum events handled per interrupt");
-#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
+#if defined(__ISAPNP__)
 MODULE_PARM(nopnp, "i");
 MODULE_PARM_DESC(nopnp, "disable ISA PnP support (0-1)");
 MODULE_DEVICE_TABLE(isapnp, el3_isapnp_adapters);
--- diff/drivers/net/3c523.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/3c523.c	2004-07-01 21:32:37.000000000 +0100
@@ -445,7 +445,7 @@
 			slot = mca_find_adapter(ELMC_MCA_ID, slot + 1);
 			continue;
 		}
-		if (!request_region(dev->base_addr, ELMC_IO_EXTENT, dev->name)) {
+		if (!request_region(dev->base_addr, ELMC_IO_EXTENT, DRV_NAME)) {
 			slot = mca_find_adapter(ELMC_MCA_ID, slot + 1);
 			continue;
 		}
@@ -585,6 +585,7 @@
 	release_region(dev->base_addr, ELMC_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init elmc_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(struct priv));
@@ -609,6 +610,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 /**********************************************
  * init the chip (elmc-interrupt should be disabled?!)
--- diff/drivers/net/3c527.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/net/3c527.c	2004-07-01 21:32:37.000000000 +0100
@@ -435,10 +435,10 @@
 	 *	Grab the IRQ
 	 */
 
-	err = request_irq(dev->irq, &mc32_interrupt, SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev);
+	err = request_irq(dev->irq, &mc32_interrupt, SA_SHIRQ | SA_SAMPLE_RANDOM, DRV_NAME, dev);
 	if (err) {
 		release_region(dev->base_addr, MC32_IO_EXTENT);
-		printk(KERN_ERR "%s: unable to get IRQ %d.\n", dev->name, dev->irq);
+		printk(KERN_ERR "%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq);
 		goto err_exit_ports;
 	}
 
--- diff/drivers/net/3c59x.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/net/3c59x.c	2004-07-01 21:32:37.000000000 +0100
@@ -446,6 +446,7 @@
 	CH_3C905B_2,
 	CH_3C905B_FX,
 	CH_3C905C,
+	CH_3C9202,
 	CH_3C980,
 	CH_3C9805,
 
@@ -520,12 +521,14 @@
 	{"3c905B-FX Cyclone 100baseFx",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
 	{"3c905C Tornado",
-	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
+	PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, },
+	{"3c920B-EMB-WNM (ATI Radeon 9100 IGP)",
+	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_MII|HAS_HWCKSM, 128, },
 	{"3c980 Cyclone",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
+
 	{"3c980C Python-T",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, },
-
 	{"3cSOHO100-TX Hurricane",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, },
 	{"3c555 Laptop Hurricane",
@@ -536,9 +539,9 @@
 	{"3c556B Laptop Hurricane",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_OFFSET|HAS_CB_FNS|INVERT_MII_PWR|
 	                                WNO_XCVR_PWR|HAS_HWCKSM, 128, },
+
 	{"3c575 [Megahertz] 10/100 LAN 	CardBus",
 	PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, },
-
 	{"3c575 Boomerang CardBus",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, },
 	{"3CCFE575BT Cyclone CardBus",
@@ -550,10 +553,10 @@
 	{"3CCFE656 Cyclone CardBus",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR|
 									INVERT_LED_PWR|HAS_HWCKSM, 128, },
+
 	{"3CCFEM656B Cyclone+Winmodem CardBus",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR|
 									INVERT_LED_PWR|HAS_HWCKSM, 128, },
-
 	{"3CXFEM656C Tornado+Winmodem CardBus",			/* From pcmcia-cs-3.1.5 */
 	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR|
 									MAX_COLLISION_RESET|HAS_HWCKSM, 128, },
@@ -563,9 +566,9 @@
 	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
 	{"3c982 Hydra Dual Port A",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, },
+
 	{"3c982 Hydra Dual Port B",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, },
-
 	{"3c905B-T4",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, },
 	{"3c920B-EMB-WNM Tornado",
@@ -597,6 +600,7 @@
 	{ 0x10B7, 0x9058, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905B_2 },
 	{ 0x10B7, 0x905A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905B_FX },
 	{ 0x10B7, 0x9200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905C },
+	{ 0x10B7, 0x9202, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C9202 },
 	{ 0x10B7, 0x9800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C980 },
 	{ 0x10B7, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C9805 },
 
@@ -884,7 +888,7 @@
 static int vortex_probe1(struct device *gendev, long ioaddr, int irq,
 				   int chip_idx, int card_idx);
 static void vortex_up(struct net_device *dev);
-static void vortex_down(struct net_device *dev);
+static void vortex_down(struct net_device *dev, int final);
 static int vortex_open(struct net_device *dev);
 static void mdio_sync(long ioaddr, int bits);
 static int mdio_read(struct net_device *dev, int phy_id, int location);
@@ -948,7 +952,7 @@
 	if (dev && dev->priv) {
 		if (netif_running(dev)) {
 			netif_device_detach(dev);
-			vortex_down(dev);
+			vortex_down(dev, 1);
 		}
 	}
 	return 0;
@@ -2059,7 +2063,8 @@
 				printk(KERN_ERR "%s: PCI bus error, bus status %8.8x\n", dev->name, bus_status);
 
 			/* In this case, blow the card away */
-			vortex_down(dev);
+			/* Must not enter D3 or we can't legally issue the reset! */
+			vortex_down(dev, 0);
 			issue_and_wait(dev, TotalReset | 0xff);
 			vortex_up(dev);		/* AKPM: bug.  vortex_up() assumes that the rx ring is full. It may not be. */
 		} else if (fifo_diag & 0x0400)
@@ -2656,7 +2661,7 @@
 }
 
 static void
-vortex_down(struct net_device *dev)
+vortex_down(struct net_device *dev, int final_down)
 {
 	struct vortex_private *vp = netdev_priv(dev);
 	long ioaddr = dev->base_addr;
@@ -2685,7 +2690,7 @@
 	if (vp->full_bus_master_tx)
 		outl(0, ioaddr + DownListPtr);
 
-	if (VORTEX_PCI(vp) && vp->enable_wol) {
+	if (final_down && VORTEX_PCI(vp) && vp->enable_wol) {
 		pci_save_state(VORTEX_PCI(vp), vp->power_state);
 		acpi_set_WOL(dev);
 	}
@@ -2699,7 +2704,7 @@
 	int i;
 
 	if (netif_device_present(dev))
-		vortex_down(dev);
+		vortex_down(dev, 1);
 
 	if (vortex_debug > 1) {
 		printk(KERN_DEBUG"%s: vortex_close() status %4.4x, Tx status %2.2x.\n",
@@ -2869,7 +2874,7 @@
 	.get_drvinfo =		vortex_get_drvinfo,
 };
 
-static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+static int vortex_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
 	struct vortex_private *vp = netdev_priv(dev);
 	long ioaddr = dev->base_addr;
@@ -2904,6 +2909,30 @@
 	return retval;
 }
 
+/*
+ *	Must power the device up to do MDIO operations
+ */
+static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+{
+	int err;
+	struct vortex_private *vp = netdev_priv(dev);
+	int state = 0;
+
+	if(VORTEX_PCI(vp))
+		state = VORTEX_PCI(vp)->current_state;
+
+	/* The kernel core really should have pci_get_power_state() */
+
+	if(state != 0)
+		pci_set_power_state(VORTEX_PCI(vp), 0);
+	err = vortex_do_ioctl(dev, rq, cmd);
+	if(state != 0)
+		pci_set_power_state(VORTEX_PCI(vp), state);
+
+	return err;
+}
+
+
 /* Pre-Cyclone chips have no documented multicast filter, so the only
    multicast setting is to receive all multicast frames.  At least
    the chip has a very clean way to set the mode, unlike many others. */
@@ -3059,14 +3088,14 @@
 	 * here
 	 */
 	unregister_netdev(dev);
-	/* Should really use issue_and_wait() here */
-	outw(TotalReset|0x14, dev->base_addr + EL3_CMD);
 
 	if (VORTEX_PCI(vp) && vp->enable_wol) {
 		pci_set_power_state(VORTEX_PCI(vp), 0);	/* Go active */
 		if (vp->pm_state_valid)
 			pci_restore_state(VORTEX_PCI(vp), vp->power_state);
 	}
+	/* Should really use issue_and_wait() here */
+	outw(TotalReset|0x14, dev->base_addr + EL3_CMD);
 
 	pci_free_consistent(pdev,
 						sizeof(struct boom_rx_desc) * RX_RING_SIZE
--- diff/drivers/net/8139too.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/net/8139too.c	2004-07-01 21:32:37.000000000 +0100
@@ -87,8 +87,6 @@
 		"rtl8139-diag -mmmaaavvveefN" output
 		enable RTL8139_DEBUG below, and look at 'dmesg' or kernel log
 
-		See 8139too.txt for more details.
-
 */
 
 #define DRV_NAME	"8139too"
--- diff/drivers/net/82596.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/82596.c	2004-07-01 21:32:37.000000000 +0100
@@ -58,11 +58,12 @@
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <asm/pgtable.h>
-#include <asm/pgalloc.h>
 
 static char version[] __initdata =
 	"82596.c $Revision: 1.5 $\n";
 
+#define DRV_NAME	"82596"
+
 /* DEBUG flags
  */
 
@@ -1191,7 +1192,7 @@
 		/* this is easy the ethernet interface can only be at 0x300 */
 		/* first check nothing is already registered here */
 
-		if (!request_region(ioaddr, I596_TOTAL_SIZE, dev->name)) {
+		if (!request_region(ioaddr, I596_TOTAL_SIZE, DRV_NAME)) {
 			printk(KERN_ERR "82596: IO address 0x%04x in use\n", ioaddr);
 			err = -EBUSY;
 			goto out;
--- diff/drivers/net/Kconfig	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/net/Kconfig	2004-07-01 21:32:37.000000000 +0100
@@ -883,7 +883,7 @@
 
 config AT1700
 	tristate "AT1700/1720/RE1000Plus(C-Bus) support (EXPERIMENTAL)"
-	depends on NET_ETHERNET && (ISA || MCA) && EXPERIMENTAL
+	depends on NET_ETHERNET && (ISA || MCA_LEGACY) && EXPERIMENTAL
 	select CRC32
 	---help---
 	  If you have a network (Ethernet) card of this type, say Y and read
@@ -922,7 +922,7 @@
 
 config NET_ISA
 	bool "Other ISA cards"
-	depends on NET_ETHERNET && ISA && !X86_PC9800
+	depends on NET_ETHERNET && ISA
 	---help---
 	  If your network (Ethernet) card hasn't been mentioned yet and its
 	  bus system (that's the way the cards talks to the other components
@@ -1105,56 +1105,6 @@
 	  the Ethernet-HOWTO, available from
 	  <http://www.tldp.org/docs.html#howto>.
 
-config NET_CBUS
-	bool "NEC PC-9800 C-bus cards"
-	depends on NET_ETHERNET && ISA && X86_PC9800
-	---help---
-	  If your network (Ethernet) card hasn't been mentioned yet and its
-	  bus system (that's the way the cards talks to the other components
-	  of your computer) is NEC PC-9800 C-Bus, say Y.
-
-config NE2K_CBUS
-	tristate "Most NE2000-based Ethernet support"
-	depends on NET_CBUS
-	select CRC32
-
-config NE2K_CBUS_EGY98
-	bool "Melco EGY-98 support"
-	depends on NE2K_CBUS
-
-config NE2K_CBUS_LGY98
-	bool "Melco LGY-98 support"
-	depends on NE2K_CBUS
-
-config NE2K_CBUS_ICM
-	bool "ICM IF-27xxET support"
-	depends on NE2K_CBUS
-
-config NE2K_CBUS_IOLA98
-	bool "I-O DATA LA-98 support"
-	depends on NE2K_CBUS
-
-config NE2K_CBUS_CNET98EL
-	bool "Contec C-NET(98)E/L support"
-	depends on NE2K_CBUS
-
-config NE2K_CBUS_CNET98EL_IO_BASE
-	hex "C-NET(98)E/L I/O base address (0xaaed or 0x55ed)"
-	depends on NE2K_CBUS_CNET98EL
-	default "0xaaed"
-
-config NE2K_CBUS_ATLA98
-	bool "Allied Telesis LA-98 Support"
-	depends on NE2K_CBUS
-
-config NE2K_CBUS_BDN
-	bool "ELECOM Laneed LD-BDN[123]A Support"
-	depends on NE2K_CBUS
-
-config NE2K_CBUS_NEC108
-	bool "NEC PC-9801-108 Support"
-	depends on NE2K_CBUS
-
 config SKMC
 	tristate "SKnet MCA support"
 	depends on NET_ETHERNET && MCA && BROKEN
@@ -1172,7 +1122,7 @@
 
 config NE2_MCA
 	tristate "NE/2 (ne2000 MCA version) support"
-	depends on NET_ETHERNET && MCA
+	depends on NET_ETHERNET && MCA_LEGACY
 	select CRC32
 	help
 	  If you have a network (Ethernet) card of this type, say Y and read
@@ -1287,6 +1237,19 @@
 config AMD8111E_NAPI
 	bool "Enable NAPI support"
 	depends on AMD8111_ETH
+	help
+	  NAPI is a new driver API designed to reduce CPU and interrupt load
+	  when the driver is receiving lots of packets from the card. It is
+	  still somewhat experimental and thus not yet enabled by default.
+
+	  If your estimated Rx load is 10kpps or more, or if the card will be
+	  deployed on potentially unfriendly networks (e.g. in a firewall),
+	  then say Y here.
+
+	  See <file:Documentation/networking/NAPI_HOWTO.txt> for more
+	  information.
+
+	  If in doubt, say N.
 
 config ADAPTEC_STARFIRE
 	tristate "Adaptec Starfire/DuraLAN support"
@@ -1314,6 +1277,11 @@
 	  deployed on potentially unfriendly networks (e.g. in a firewall),
 	  then say Y here.
 
+	  See <file:Documentation/networking/NAPI_HOWTO.txt> for more
+	  information.
+
+	  If in doubt, say N.
+
 config AC3200
 	tristate "Ansel Communications EISA 3200 support (EXPERIMENTAL)"
 	depends on NET_PCI && (ISA || EISA) && EXPERIMENTAL
@@ -1498,10 +1466,6 @@
 	  <file:Documentation/networking/net-modules.txt>.  The module
 	  will be called e100.
 
-config E100_NAPI
-	bool "Use Rx Polling (NAPI)"
-	depends on E100
-
 config LNE390
 	tristate "Mylex EISA LNE390A/B support (EXPERIMENTAL)"
 	depends on NET_PCI && EISA && EXPERIMENTAL
@@ -1605,9 +1569,7 @@
 	---help---
 	  This is a driver for the Fast Ethernet PCI network cards based on
 	  the RTL8139 chips. If you have one of those, say Y and read
-	  <file:Documentation/networking/8139too.txt> as well as the
-	  Ethernet-HOWTO, available from
-	  <http://www.tldp.org/docs.html#howto>.
+	  the Ethernet-HOWTO <http://www.tldp.org/docs.html#howto>.
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called 8139too.  This is recommended.
@@ -1745,6 +1707,17 @@
 
 	  If unsure, say Y.
 
+config VIA_VELOCITY
+	tristate "VIA Velocity support"
+	depends on NET_PCI && PCI
+	select CRC32
+	select MII
+	help
+	  If you have a VIA "Velocity" based network card say Y here.
+
+	  To compile this driver as a module, choose M here. The module
+	  will be called via-rhine.
+
 config LAN_SAA9730
 	bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)"
 	depends on NET_PCI && EXPERIMENTAL && MIPS
@@ -1963,6 +1936,19 @@
 config E1000_NAPI
 	bool "Use Rx Polling (NAPI)"
 	depends on E1000
+	help
+	  NAPI is a new driver API designed to reduce CPU and interrupt load
+	  when the driver is receiving lots of packets from the card. It is
+	  still somewhat experimental and thus not yet enabled by default.
+
+	  If your estimated Rx load is 10kpps or more, or if the card will be
+	  deployed on potentially unfriendly networks (e.g. in a firewall),
+	  then say Y here.
+
+	  See <file:Documentation/networking/NAPI_HOWTO.txt> for more
+	  information.
+
+	  If in doubt, say N.
 
 config MYRI_SBUS
 	tristate "MyriCOM Gigabit Ethernet support"
@@ -2020,6 +2006,23 @@
 	  To compile this driver as a module, choose M here: the module
 	  will be called r8169.  This is recommended.
 
+config R8169_NAPI
+	bool "Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)"
+	depends on R8169 && EXPERIMENTAL
+	help
+	  NAPI is a new driver API designed to reduce CPU and interrupt load
+	  when the driver is receiving lots of packets from the card. It is
+	  still somewhat experimental and thus not yet enabled by default.
+
+	  If your estimated Rx load is 10kpps or more, or if the card will be
+	  deployed on potentially unfriendly networks (e.g. in a firewall),
+	  then say Y here.
+
+	  See <file:Documentation/networking/NAPI_HOWTO.txt> for more
+	  information.
+
+	  If in doubt, say N.
+
 config SK98LIN
 	tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support"
 	depends on PCI
@@ -2108,6 +2111,34 @@
 	  To compile this driver as a module, choose M here: the module
 	  will be called tg3.  This is recommended.
 
+config MV64340_ETH
+	bool "MV-64340 Ethernet support"
+	depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX
+	help
+	  This driver supports the gigabit Ethernet on the Marvell MV64340
+	  chipset which is used in the Momenco Ocelot C and Jaguar ATX.
+
+config MV64340_ETH_0
+	bool "MV-64340 Port 0"
+	depends on MV64340_ETH
+	help
+	  This enables support for Port 0 of the Marvell MV64340 Gigabit
+	  Ethernet.
+
+config MV64340_ETH_1
+	bool "MV-64340 Port 1"
+	depends on MV64340_ETH
+	help
+	  This enables support for Port 1 of the Marvell MV64340 Gigabit
+	  Ethernet.
+
+config MV64340_ETH_2
+	bool "MV-64340 Port 2"
+	depends on MV64340_ETH
+	help
+	  This enables support for Port 2 of the Marvell MV64340 Gigabit
+	  Ethernet.
+
 endmenu
 
 #
@@ -2148,6 +2179,19 @@
 config IXGB_NAPI
 	bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"
 	depends on IXGB && EXPERIMENTAL
+	help
+	  NAPI is a new driver API designed to reduce CPU and interrupt load
+	  when the driver is receiving lots of packets from the card. It is
+	  still somewhat experimental and thus not yet enabled by default.
+
+	  If your estimated Rx load is 10kpps or more, or if the card will be
+	  deployed on potentially unfriendly networks (e.g. in a firewall),
+	  then say Y here.
+
+	  See <file:Documentation/networking/NAPI_HOWTO.txt> for more
+	  information.
+
+	  If in doubt, say N.
 
 config S2IO
 	tristate "S2IO 10Gbe XFrame NIC"
@@ -2160,6 +2204,19 @@
 config S2IO_NAPI
 	bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"
 	depends on S2IO && EXPERIMENTAL
+	help
+	  NAPI is a new driver API designed to reduce CPU and interrupt load
+	  when the driver is receiving lots of packets from the card. It is
+	  still somewhat experimental and thus not yet enabled by default.
+
+	  If your estimated Rx load is 10kpps or more, or if the card will be
+	  deployed on potentially unfriendly networks (e.g. in a firewall),
+	  then say Y here.
+
+	  See <file:Documentation/networking/NAPI_HOWTO.txt> for more
+	  information.
+
+	  If in doubt, say N.
 
 endmenu
 
@@ -2356,6 +2413,7 @@
 config PPP_ASYNC
 	tristate "PPP support for async serial ports"
 	depends on PPP
+	select CRC16
 	---help---
 	  Say Y (or M) here if you want to be able to use PPP over standard
 	  asynchronous serial ports, such as COM1 or COM2 on a PC.  If you use
--- diff/drivers/net/Makefile	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/net/Makefile	2004-07-01 21:32:37.000000000 +0100
@@ -52,6 +52,7 @@
 obj-$(CONFIG_SK98LIN) += sk98lin/
 obj-$(CONFIG_SKFP) += skfp/
 obj-$(CONFIG_VIA_RHINE) += via-rhine.o
+obj-$(CONFIG_VIA_VELOCITY) += via-velocity.o
 obj-$(CONFIG_ADAPTEC_STARFIRE) += starfire.o
 
 #
@@ -79,7 +80,6 @@
 obj-$(CONFIG_WD80x3) += wd.o 8390.o
 obj-$(CONFIG_EL2) += 3c503.o 8390.o
 obj-$(CONFIG_NE2000) += ne.o 8390.o
-obj-$(CONFIG_NE2K_CBUS) += ne2k_cbus.o 8390.o
 obj-$(CONFIG_NE2_MCA) += ne2.o 8390.o
 obj-$(CONFIG_HPLAN) += hp.o 8390.o
 obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390.o
@@ -95,6 +95,8 @@
 obj-$(CONFIG_FORCEDETH) += forcedeth.o
 obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o
 
+obj-$(CONFIG_MV64340_ETH) += mv64340_eth.o
+
 obj-$(CONFIG_PPP) += ppp_generic.o slhc.o
 obj-$(CONFIG_PPP_ASYNC) += ppp_async.o
 obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o
@@ -188,4 +190,6 @@
 obj-$(CONFIG_HAMRADIO) += hamradio/
 obj-$(CONFIG_IRDA) += irda/
 
+# Must come after all NICs that might use them
 obj-$(CONFIG_NETCONSOLE) += netconsole.o
+obj-$(CONFIG_KGDB) += kgdb_eth.o
--- diff/drivers/net/Space.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/net/Space.c	2004-07-01 21:32:37.000000000 +0100
@@ -191,8 +191,8 @@
 #ifdef CONFIG_E2100		/* Cabletron E21xx series. */
 	{e2100_probe, 0},
 #endif
-#if defined(CONFIG_NE2000) || defined(CONFIG_NE2K_CBUS)	|| \
-    defined(CONFIG_NE_H8300)  /* ISA & PC-9800 CBUS (use ne2k-pci for PCI cards) */
+#if defined(CONFIG_NE2000) || \
+    defined(CONFIG_NE_H8300)  /* ISA (use ne2k-pci for PCI cards) */
 	{ne_probe, 0},
 #endif
 #ifdef CONFIG_LANCE		/* ISA/VLB (use pcnet32 for PCI cards) */
--- diff/drivers/net/ac3200.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/ac3200.c	2004-07-01 21:32:37.000000000 +0100
@@ -39,6 +39,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME	"ac3200"
+
 /* Offsets from the base address. */
 #define AC_NIC_BASE	0x00
 #define AC_SA_PROM	0x16			/* The station address PROM. */
@@ -130,6 +132,7 @@
 		iounmap((void *)dev->mem_start);
 }
 
+#ifndef MODULE
 struct net_device * __init ac3200_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -154,12 +157,13 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init ac_probe1(int ioaddr, struct net_device *dev)
 {
 	int i, retval;
 
-	if (!request_region(ioaddr, AC_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, AC_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	if (inb_p(ioaddr + AC_ID_PORT) == 0xff) {
@@ -203,7 +207,7 @@
 		printk(", assigning");
 	}
 
-	retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev);
+	retval = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev);
 	if (retval) {
 		printk (" nothing! Unable to get IRQ %d.\n", dev->irq);
 		goto out1;
--- diff/drivers/net/acenic.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/net/acenic.c	2004-07-01 21:32:37.000000000 +0100
@@ -85,6 +85,8 @@
 #include <asm/uaccess.h>
 
 
+#define DRV_NAME "acenic"
+
 #undef INDEX_DEBUG
 
 #ifdef CONFIG_ACENIC_OMIT_TIGON_I
@@ -443,6 +445,16 @@
   "acenic.c: v0.92 08/05/2002  Jes Sorensen, linux-acenic@SunSITE.dk\n"
   "                            http://home.cern.ch/~jes/gige/acenic.html\n";
 
+static int ace_get_settings(struct net_device *, struct ethtool_cmd *);
+static int ace_set_settings(struct net_device *, struct ethtool_cmd *);
+static void ace_get_drvinfo(struct net_device *, struct ethtool_drvinfo *);
+
+static struct ethtool_ops ace_ethtool_ops = {
+	.get_settings = ace_get_settings,
+	.set_settings = ace_set_settings,
+	.get_drvinfo = ace_get_drvinfo,
+};
+
 static int __devinit acenic_probe_one(struct pci_dev *pdev,
 		const struct pci_device_id *id)
 {
@@ -480,7 +492,7 @@
 	dev->hard_start_xmit = &ace_start_xmit;
 	dev->get_stats = &ace_get_stats;
 	dev->set_multicast_list = &ace_set_multicast_list;
-	dev->do_ioctl = &ace_ioctl;
+	SET_ETHTOOL_OPS(dev, &ace_ethtool_ops);
 	dev->set_mac_address = &ace_set_mac_addr;
 	dev->change_mtu = &ace_change_mtu;
 
@@ -1195,10 +1207,10 @@
 	}
 
 	ecode = request_irq(pdev->irq, ace_interrupt, SA_SHIRQ,
-			    dev->name, dev);
+			    DRV_NAME, dev);
 	if (ecode) {
 		printk(KERN_WARNING "%s: Requested IRQ %d is busy\n",
-		       dev->name, pdev->irq);
+		       DRV_NAME, pdev->irq);
 		goto init_error;
 	} else
 		dev->irq = pdev->irq;
@@ -2688,146 +2700,136 @@
 	return 0;
 }
 
-
-static int ace_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+static int ace_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
 {
 	struct ace_private *ap = dev->priv;
 	struct ace_regs *regs = ap->regs;
-#ifdef SIOCETHTOOL
-	struct ethtool_cmd ecmd;
-	u32 link, speed;
+	u32 link;
 
-	if (cmd != SIOCETHTOOL)
-		return -EOPNOTSUPP;
-	if (copy_from_user(&ecmd, ifr->ifr_data, sizeof(ecmd)))
-		return -EFAULT;
-	switch (ecmd.cmd) {
-	case ETHTOOL_GSET:
-		ecmd.supported =
-			(SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
-			 SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
-			 SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full |
-			 SUPPORTED_Autoneg | SUPPORTED_FIBRE);
-
-		ecmd.port = PORT_FIBRE;
-		ecmd.transceiver = XCVR_INTERNAL;
-		ecmd.phy_address = 0;
-
-		link = readl(&regs->GigLnkState);
-		if (link & LNK_1000MB)
-			ecmd.speed = SPEED_1000;
-		else {
-			link = readl(&regs->FastLnkState);
-			if (link & LNK_100MB)
-				ecmd.speed = SPEED_100;
-			else if (link & LNK_100MB)
-				ecmd.speed = SPEED_10;
-			else
-				ecmd.speed = 0;
-		}
-		if (link & LNK_FULL_DUPLEX)
-			ecmd.duplex = DUPLEX_FULL;
+	memset(ecmd, 0, sizeof(struct ethtool_cmd));
+	ecmd->supported =
+		(SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
+		 SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
+		 SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full |
+		 SUPPORTED_Autoneg | SUPPORTED_FIBRE);
+
+	ecmd->port = PORT_FIBRE;
+	ecmd->transceiver = XCVR_INTERNAL;
+
+	link = readl(&regs->GigLnkState);
+	if (link & LNK_1000MB)
+		ecmd->speed = SPEED_1000;
+	else {
+		link = readl(&regs->FastLnkState);
+		if (link & LNK_100MB)
+			ecmd->speed = SPEED_100;
+		else if (link & LNK_10MB)
+			ecmd->speed = SPEED_10;
 		else
-			ecmd.duplex = DUPLEX_HALF;
+			ecmd->speed = 0;
+	}
+	if (link & LNK_FULL_DUPLEX)
+		ecmd->duplex = DUPLEX_FULL;
+	else
+		ecmd->duplex = DUPLEX_HALF;
 
-		if (link & LNK_NEGOTIATE)
-			ecmd.autoneg = AUTONEG_ENABLE;
-		else
-			ecmd.autoneg = AUTONEG_DISABLE;
+	if (link & LNK_NEGOTIATE)
+		ecmd->autoneg = AUTONEG_ENABLE;
+	else
+		ecmd->autoneg = AUTONEG_DISABLE;
 
 #if 0
-		/*
-		 * Current struct ethtool_cmd is insufficient
-		 */
-		ecmd.trace = readl(&regs->TuneTrace);
+	/*
+	 * Current struct ethtool_cmd is insufficient
+	 */
+	ecmd->trace = readl(&regs->TuneTrace);
 
-		ecmd.txcoal = readl(&regs->TuneTxCoalTicks);
-		ecmd.rxcoal = readl(&regs->TuneRxCoalTicks);
+	ecmd->txcoal = readl(&regs->TuneTxCoalTicks);
+	ecmd->rxcoal = readl(&regs->TuneRxCoalTicks);
 #endif
-		ecmd.maxtxpkt = readl(&regs->TuneMaxTxDesc);
-		ecmd.maxrxpkt = readl(&regs->TuneMaxRxDesc);
+	ecmd->maxtxpkt = readl(&regs->TuneMaxTxDesc);
+	ecmd->maxrxpkt = readl(&regs->TuneMaxRxDesc);
 
-		if(copy_to_user(ifr->ifr_data, &ecmd, sizeof(ecmd)))
-			return -EFAULT;
-		return 0;
-
-	case ETHTOOL_SSET:
-		link = readl(&regs->GigLnkState);
-		if (link & LNK_1000MB)
-			speed = SPEED_1000;
-		else {
-			link = readl(&regs->FastLnkState);
-			if (link & LNK_100MB)
-				speed = SPEED_100;
-			else if (link & LNK_100MB)
-				speed = SPEED_10;
-			else
-				speed = SPEED_100;
-		}
+	return 0;
+}
 
-		link = LNK_ENABLE | LNK_1000MB | LNK_100MB | LNK_10MB |
-			LNK_RX_FLOW_CTL_Y | LNK_NEG_FCTL;
-		if (!ACE_IS_TIGON_I(ap))
-			link |= LNK_TX_FLOW_CTL_Y;
-		if (ecmd.autoneg == AUTONEG_ENABLE)
-			link |= LNK_NEGOTIATE;
-		if (ecmd.speed != speed) {
-			link &= ~(LNK_1000MB | LNK_100MB | LNK_10MB);
-			switch (speed) {
-			case SPEED_1000:
-				link |= LNK_1000MB;
-				break;
-			case SPEED_100:
-				link |= LNK_100MB;
-				break;
-			case SPEED_10:
-				link |= LNK_10MB;
-				break;
-			}
+static int ace_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
+{
+	struct ace_private *ap = dev->priv;
+	struct ace_regs *regs = ap->regs;
+	u32 link, speed;
+
+	link = readl(&regs->GigLnkState);
+	if (link & LNK_1000MB)
+		speed = SPEED_1000;
+	else {
+		link = readl(&regs->FastLnkState);
+		if (link & LNK_100MB)
+			speed = SPEED_100;
+		else if (link & LNK_10MB)
+			speed = SPEED_10;
+		else
+			speed = SPEED_100;
+	}
+
+	link = LNK_ENABLE | LNK_1000MB | LNK_100MB | LNK_10MB |
+		LNK_RX_FLOW_CTL_Y | LNK_NEG_FCTL;
+	if (!ACE_IS_TIGON_I(ap))
+		link |= LNK_TX_FLOW_CTL_Y;
+	if (ecmd->autoneg == AUTONEG_ENABLE)
+		link |= LNK_NEGOTIATE;
+	if (ecmd->speed != speed) {
+		link &= ~(LNK_1000MB | LNK_100MB | LNK_10MB);
+		switch (speed) {
+		case SPEED_1000:
+			link |= LNK_1000MB;
+			break;
+		case SPEED_100:
+			link |= LNK_100MB;
+			break;
+		case SPEED_10:
+			link |= LNK_10MB;
+			break;
 		}
-		if (ecmd.duplex == DUPLEX_FULL)
-			link |= LNK_FULL_DUPLEX;
+	}
 
-		if (link != ap->link) {
-			struct cmd cmd;
-			printk(KERN_INFO "%s: Renegotiating link state\n",
-			       dev->name);
+	if (ecmd->duplex == DUPLEX_FULL)
+		link |= LNK_FULL_DUPLEX;
 
-			ap->link = link;
-			writel(link, &regs->TuneLink);
-			if (!ACE_IS_TIGON_I(ap))
-				writel(link, &regs->TuneFastLink);
-			wmb();
+	if (link != ap->link) {
+		struct cmd cmd;
+		printk(KERN_INFO "%s: Renegotiating link state\n",
+		       dev->name);
 
-			cmd.evt = C_LNK_NEGOTIATION;
-			cmd.code = 0;
-			cmd.idx = 0;
-			ace_issue_cmd(regs, &cmd);
-		}
-		return 0;
+		ap->link = link;
+		writel(link, &regs->TuneLink);
+		if (!ACE_IS_TIGON_I(ap))
+			writel(link, &regs->TuneFastLink);
+		wmb();
 
-	case ETHTOOL_GDRVINFO: {
-		struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
-		strncpy(info.driver, "acenic", sizeof(info.driver) - 1);
-		sprintf(info.fw_version, "%i.%i.%i", 
-			 tigonFwReleaseMajor, tigonFwReleaseMinor,
-			 tigonFwReleaseFix);
-		strncpy(info.version, version, sizeof(info.version) - 1);
-		if (ap && ap->pdev)
-			strcpy(info.bus_info, pci_name(ap->pdev));
-		if (copy_to_user(ifr->ifr_data, &info, sizeof(info)))
-			return -EFAULT;
-		return 0;
-	}
-	default:
-		break;
+		cmd.evt = C_LNK_NEGOTIATION;
+		cmd.code = 0;
+		cmd.idx = 0;
+		ace_issue_cmd(regs, &cmd);
 	}
-	
-#endif
-
-	return -EOPNOTSUPP;
+	return 0;
 }
 
+static void ace_get_drvinfo(struct net_device *dev, 
+			    struct ethtool_drvinfo *info)
+{
+	struct ace_private *ap = dev->priv;
+
+	strlcpy(info->driver, "acenic", sizeof(info->driver));
+	snprintf(info->version, sizeof(info->version), "%i.%i.%i", 
+		tigonFwReleaseMajor, tigonFwReleaseMinor,
+		tigonFwReleaseFix);
+
+	if (ap->pdev)
+		strlcpy(info->bus_info, pci_name(ap->pdev), 
+			sizeof(info->bus_info));
+
+}
 
 /*
  * Set the hardware MAC address.
--- diff/drivers/net/acenic.h	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/acenic.h	2004-07-01 21:32:37.000000000 +0100
@@ -790,7 +790,6 @@
 static void ace_dump_trace(struct ace_private *ap);
 static void ace_set_multicast_list(struct net_device *dev);
 static int ace_change_mtu(struct net_device *dev, int new_mtu);
-static int ace_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
 static int ace_set_mac_addr(struct net_device *dev, void *p);
 static void ace_set_rxtx_parms(struct net_device *dev, int jumbo);
 static int ace_allocate_descriptors(struct net_device *dev);
--- diff/drivers/net/apne.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/apne.c	2004-07-01 21:32:37.000000000 +0100
@@ -49,6 +49,8 @@
 
 /* ---- No user-serviceable parts below ---- */
 
+#define DRV_NAME "apne"
+
 #define NE_BASE	 (dev->base_addr)
 #define NE_CMD	 		0x00
 #define NE_DATAPORT		0x10            /* NatSemi-defined port window offset. */
@@ -168,7 +170,7 @@
 		return ERR_PTR(-ENODEV);
 	}
 
-	if (!request_region(IOBASE, 0x20, dev->name)) {
+	if (!request_region(IOBASE, 0x20, DRV_NAME)) {
 		free_netdev(dev);
 		return ERR_PTR(-EBUSY);
 	}
@@ -310,7 +312,7 @@
     dev->base_addr = ioaddr;
 
     /* Install the Interrupt handler */
-    i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ, dev->name, dev);
+    i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ, DRV_NAME, dev);
     if (i) return i;
 
     for(i = 0; i < ETHER_ADDR_LEN; i++) {
--- diff/drivers/net/arm/Kconfig	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/arm/Kconfig	2004-07-01 21:32:37.000000000 +0100
@@ -45,3 +45,20 @@
 	  number (MTD support is required for this). Otherwise you will
 	  need to set a suitable hw address using ifconfig.
 
+config SMC91X
+	tristate "SMC 91C9x/91C1xxx support"
+	select CRC32
+	select MII
+	depends on ARM
+	help
+	  This is a driver for SMC's 91x series of Ethernet chipsets,
+	  including the SMC91C94 and the SMC91C111. Say Y if you want it
+	  compiled into the kernel, and read the file
+	  <file:Documentation/networking/smc9.txt>  and the Ethernet-HOWTO,
+	  available from  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called smc91x.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/networking/net-modules.txt>.
--- diff/drivers/net/arm/Makefile	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/arm/Makefile	2004-07-01 21:32:37.000000000 +0100
@@ -8,3 +8,4 @@
 obj-$(CONFIG_ARM_ETHERH)	+= etherh.o
 obj-$(CONFIG_ARM_ETHER3)	+= ether3.o
 obj-$(CONFIG_ARM_ETHER1)	+= ether1.o
+obj-$(CONFIG_SMC91X)		+= smc91x.o
--- diff/drivers/net/at1700.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/net/at1700.c	2004-07-01 21:32:37.000000000 +0100
@@ -65,6 +65,8 @@
 static char version[] __initdata =
 	"at1700.c:v1.15 4/7/98  Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
+#define DRV_NAME "at1700"
+
 /* Tunable parameters. */
 
 /* When to switch from the 64-entry multicast filter to Rx-all-multicast. */
@@ -80,17 +82,10 @@
  *	ISA
  */
 
-#ifndef CONFIG_X86_PC9800
 static unsigned at1700_probe_list[] __initdata = {
 	0x260, 0x280, 0x2a0, 0x240, 0x340, 0x320, 0x380, 0x300, 0
 };
 
-#else /* CONFIG_X86_PC9800 */
-static unsigned at1700_probe_list[] __initdata = {
-	0x1d6, 0x1d8, 0x1da, 0x1d4, 0xd4, 0xd2, 0xd8, 0xd0, 0
-};
-
-#endif /* CONFIG_X86_PC9800 */
 /*
  *	MCA
  */
@@ -133,7 +128,6 @@
 
 
 /* Offsets from the base address. */
-#ifndef CONFIG_X86_PC9800
 #define STATUS			0
 #define TX_STATUS		0
 #define RX_STATUS		1
@@ -161,34 +155,6 @@
 #define RESET			31		/* Write to reset some parts of the chip. */
 #define AT1700_IO_EXTENT	32
 #define PORT_OFFSET(o) (o)
-#else /* CONFIG_X86_PC9800 */
-#define STATUS			(0x0000)
-#define TX_STATUS		(0x0000)
-#define RX_STATUS		(0x0001)
-#define TX_INTR			(0x0200)/* Bit-mapped interrupt enable registers. */
-#define RX_INTR			(0x0201)
-#define TX_MODE			(0x0400)
-#define RX_MODE			(0x0401)
-#define CONFIG_0		(0x0600)/* Misc. configuration settings. */
-#define CONFIG_1		(0x0601)
-/* Run-time register bank 2 definitions. */
-#define DATAPORT		(0x0800)/* Word-wide DMA or programmed-I/O dataport. */
-#define TX_START		(0x0a00)
-#define COL16CNTL		(0x0a01)/* Controll Reg for 16 collisions */
-#define MODE13			(0x0c01)
-#define RX_CTRL			(0x0e00)
-/* Configuration registers only on the '865A/B chips. */
-#define EEPROM_Ctrl 	(0x1000)
-#define EEPROM_Data 	(0x1200)
-#define CARDSTATUS	16			/* FMV-18x Card Status */
-#define CARDSTATUS1	17			/* FMV-18x Card Status */
-#define IOCONFIG		(0x1400)/* Either read the jumper, or move the I/O. */
-#define IOCONFIG1		(0x1600)
-#define	SAPROM			20		/* The station address PROM, if no EEPROM. */
-#define	MODE24			(0x1800)/* The station address PROM, if no EEPROM. */
-#define RESET			(0x1e01)/* Write to reset some parts of the chip. */
-#define PORT_OFFSET(o) ({ int _o_ = (o); (_o_ & ~1) * 0x100 + (_o_ & 1); })
-#endif /* CONFIG_X86_PC9800 */
 
 
 #define TX_TIMEOUT		10
@@ -230,11 +196,7 @@
    (detachable devices only).
    */
 
-#ifndef CONFIG_X86_PC9800
 static int io = 0x260;
-#else
-static int io = 0xd0;
-#endif
 
 static int irq;
 
@@ -246,15 +208,7 @@
 		mca_mark_as_unused(lp->mca_slot);
 #endif	
 	free_irq(dev->irq, NULL);
-#ifndef CONFIG_X86_PC9800
 	release_region(dev->base_addr, AT1700_IO_EXTENT);
-#else
-	{
-		int i;
-		for (i = 0; i < 0x2000; i += 0x200)
-			release_region(dev->base_addr + i, 2);
-	}
-#endif
 }
 
 struct net_device * __init at1700_probe(int unit)
@@ -321,20 +275,8 @@
 	int slot, ret = -ENODEV;
 	struct net_local *lp = netdev_priv(dev);
 
-#ifndef CONFIG_X86_PC9800
-	if (!request_region(ioaddr, AT1700_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, AT1700_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
-#else
-	for (i = 0; i < 0x2000; i += 0x0200) {
-		if (!request_region(ioaddr + i, 2, dev->name)) {
-			while (i > 0) {
-				i -= 0x0200;
-				release_region(ioaddr + i, 2);
-			}
-			return -EBUSY;
-		}
-	}
-#endif
 
 	/* Resetting the chip doesn't reset the ISA interface, so don't bother.
 	   That means we have to be careful with the register values we probe
@@ -425,15 +367,8 @@
 	outb(0, ioaddr + RESET);
 
 	if (is_at1700) {
-#ifndef CONFIG_X86_PC9800
 		irq = at1700_irqmap[(read_eeprom(ioaddr, 12)&0x04)
 						   | (read_eeprom(ioaddr, 0)>>14)];
-#else
-		{
-			char re1000plus_irqmap[4] = {3, 5, 6, 12};
-			irq = re1000plus_irqmap[inb(ioaddr + IOCONFIG1) >> 6];
-		}
-#endif
 	} else {
 		/* Check PnP mode for FMV-183/184/183A/184A. */
 		/* This PnP routine is very poor. IO and IRQ should be known. */
@@ -517,11 +452,7 @@
 	/* Switch to bank 2 */
 	/* Lock our I/O address, and set manual processing mode for 16 collisions. */
 	outb(0x08, ioaddr + CONFIG_1);
-#ifndef CONFIG_X86_PC9800
 	outb(dev->if_port, ioaddr + MODE13);
-#else
-	outb(0, ioaddr + MODE13);
-#endif
 	outb(0x00, ioaddr + COL16CNTL);
 
 	if (net_debug)
@@ -542,7 +473,7 @@
 	lp->jumpered = is_fmv18x;
 	lp->mca_slot = slot;
 	/* Snarf the interrupt vector now. */
-	ret = request_irq(irq, &net_interrupt, 0, dev->name, dev);
+	ret = request_irq(irq, &net_interrupt, 0, DRV_NAME, dev);
 	if (ret) {
 		printk ("  AT1700 at %#3x is unusable due to a conflict on"
 				"IRQ %d.\n", ioaddr, irq);
@@ -557,12 +488,7 @@
 		mca_mark_as_unused(slot);
 #endif
 err_out:
-#ifndef CONFIG_X86_PC9800
 	release_region(ioaddr, AT1700_IO_EXTENT);
-#else
-	for (i = 0; i < 0x2000; i += 0x0200)
-		release_region(ioaddr + i, 2);
-#endif
 	return ret;
 }
 
@@ -573,13 +499,6 @@
 #define EE_DATA_WRITE	0x80	/* EEPROM chip data in, in reg. 17. */
 #define EE_DATA_READ	0x80	/* EEPROM chip data out, in reg. 17. */
 
-/* Delay between EEPROM clock transitions. */
-#ifndef CONFIG_X86_PC9800
-#define eeprom_delay()	do { } while (0)
-#else
-#define eeprom_delay()	__asm__ ("out%B0 %%al,%0" :: "N"(0x5f))
-#endif
-
 /* The EEPROM commands include the alway-set leading bit. */
 #define EE_WRITE_CMD	(5 << 6)
 #define EE_READ_CMD		(6 << 6)
@@ -598,22 +517,17 @@
 		short dataval = (read_cmd & (1 << i)) ? EE_DATA_WRITE : 0;
 		outb(EE_CS, ee_addr);
 		outb(dataval, ee_daddr);
-		eeprom_delay();
 		outb(EE_CS | EE_SHIFT_CLK, ee_addr);	/* EEPROM clock tick. */
-		eeprom_delay();
 	}
 	outb(EE_DATA_WRITE, ee_daddr);
 	for (i = 16; i > 0; i--) {
 		outb(EE_CS, ee_addr);
-		eeprom_delay();
 		outb(EE_CS | EE_SHIFT_CLK, ee_addr);
-		eeprom_delay();
 		retval = (retval << 1) | ((inb(ee_daddr) & EE_DATA_READ) ? 1 : 0);
 	}
 
 	/* Terminate the EEPROM access. */
 	outb(EE_CS, ee_addr);
-	eeprom_delay();
 	outb(EE_SHIFT_CLK, ee_addr);
 	outb(0, ee_addr);
 	return retval;
--- diff/drivers/net/cs89x0.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/cs89x0.c	2004-07-01 21:32:38.000000000 +0100
@@ -141,6 +141,8 @@
 static char version[] __initdata =
 "cs89x0.c: v2.4.3-pre1 Russell Nelson <nelson@crynwr.com>, Andrew Morton <andrewm@uow.edu.au>\n";
 
+#define DRV_NAME "cs89x0"
+
 /* First, a few definitions that the brave might change.
    A zero-terminated list of I/O addresses to be probed. Some special flags..
       Addr & 1 = Read back the address port, look for signature and reset
@@ -261,7 +263,6 @@
 }
 
 __setup("cs89x0_media=", media_fn);
-#endif
 
 
 /* Check for a network adaptor of this type, and return '0' iff one exists.
@@ -318,6 +319,7 @@
 	printk(KERN_WARNING "cs89x0: no cs8900 or cs8920 detected.  Be sure to disable PnP with SETUP\n");
 	return ERR_PTR(err);
 }
+#endif
 
 static int
 readreg(struct net_device *dev, int portno)
@@ -425,9 +427,9 @@
 
 	/* Grab the region so we can find another board if autoIRQ fails. */
 	/* WTF is going on here? */
-	if (!request_region(ioaddr & ~3, NETCARD_IO_EXTENT, dev->name)) {
+	if (!request_region(ioaddr & ~3, NETCARD_IO_EXTENT, DRV_NAME)) {
 		printk(KERN_ERR "%s: request_region(0x%x, 0x%x) failed\n",
-				dev->name, ioaddr, NETCARD_IO_EXTENT);
+				DRV_NAME, ioaddr, NETCARD_IO_EXTENT);
 		retval = -EBUSY;
 		goto out1;
 	}
--- diff/drivers/net/defxx.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/defxx.c	2004-07-01 21:32:38.000000000 +0100
@@ -219,6 +219,8 @@
 static char version[] __devinitdata =
 	"defxx.c:v1.06 2003/08/04  Lawrence V. Stefani and others\n";
 
+#define DRV_NAME "defxx"
+
 #define DYNAMIC_BUFFERS 1
 
 #define SKBUFF_RX_COPYBREAK 200
@@ -435,9 +437,9 @@
 
 	bp = dev->priv;
 
-	if (!request_region (ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, dev->name)) {
+	if (!request_region (ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, DRV_NAME)) {
 		printk (KERN_ERR "%s: Cannot reserve I/O resource 0x%x @ 0x%lx, aborting\n",
-			dev->name, PFI_K_CSR_IO_LEN, ioaddr);
+			DRV_NAME, PFI_K_CSR_IO_LEN, ioaddr);
 		err = -EBUSY;
 		goto err_out;
 	}
--- diff/drivers/net/dgrs.h	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/dgrs.h	2004-07-01 21:32:38.000000000 +0100
@@ -26,7 +26,7 @@
 typedef struct dgrs_ioctl {
 	unsigned short cmd;	/* Command to run */
 	unsigned short len;	/* Length of the data buffer */
-	unsigned char  *data;	/* Pointer to the data buffer */
+	unsigned char  __user *data;	/* Pointer to the data buffer */
 	unsigned short	port;	/* port number for command, if needed */
 	unsigned short	filter;	/* filter number for command, if needed */
 } DGRS_IOCTL;
--- diff/drivers/net/e100.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/e100.c	2004-07-01 21:32:38.000000000 +0100
@@ -87,9 +87,8 @@
  *	cb_to_use is the next CB to use for queuing a command; cb_to_clean
  *	is the next CB to check for completion; cb_to_send is the first
  *	CB to start on in case of a previous failure to resume.  CB clean
- *	up happens in interrupt context in response to a CU interrupt, or
- *	in dev->poll in the case where NAPI is enabled.  cbs_avail keeps
- *	track of number of free CB resources available.
+ *	up happens in interrupt context in response to a CU interrupt.
+ *	cbs_avail keeps track of number of free CB resources available.
  *
  * 	Hardware padding of short packets to minimum packet size is
  * 	enabled.  82557 pads with 7Eh, while the later controllers pad
@@ -112,9 +111,8 @@
  *	replacement RFDs cannot be allocated, or the RU goes non-active,
  *	the RU must be restarted.  Frame arrival generates an interrupt,
  *	and Rx indication and re-allocation happen in the same context,
- *	therefore no locking is required.  If NAPI is enabled, this work
- *	happens in dev->poll.  A software-generated interrupt is gen-
- *	erated from the watchdog to recover from a failed allocation
+ *	therefore no locking is required.  A software-generated interrupt
+ *	is generated from the watchdog to recover from a failed allocation
  *	senario where all Rx resources have been indicated and none re-
  *	placed.
  *
@@ -126,8 +124,6 @@
  * 	supported.  Tx Scatter/Gather is not supported.  Jumbo Frames is
  * 	not supported (hardware limitation).
  *
- * 	NAPI support is enabled with CONFIG_E100_NAPI.
- *
  * 	MagicPacket(tm) WoL support is enabled/disabled via ethtool.
  *
  * 	Thanks to JC (jchapman@katalix.com) for helping with
@@ -158,7 +154,7 @@
 
 
 #define DRV_NAME		"e100"
-#define DRV_VERSION		"3.0.18"
+#define DRV_VERSION		"3.0.22-NAPI"
 #define DRV_DESCRIPTION		"Intel(R) PRO/100 Network Driver"
 #define DRV_COPYRIGHT		"Copyright(c) 1999-2004 Intel Corporation"
 #define PFX			DRV_NAME ": "
@@ -1463,11 +1459,7 @@
 		nic->net_stats.rx_packets++;
 		nic->net_stats.rx_bytes += actual_size;
 		nic->netdev->last_rx = jiffies;
-#ifdef CONFIG_E100_NAPI
 		netif_receive_skb(skb);
-#else
-		netif_rx(skb);
-#endif
 		if(work_done)
 			(*work_done)++;
 	}
@@ -1562,20 +1554,12 @@
 	if(stat_ack & stat_ack_rnr)
 		nic->ru_running = 0;
 
-#ifdef CONFIG_E100_NAPI
 	e100_disable_irq(nic);
 	netif_rx_schedule(netdev);
-#else
-	if(stat_ack & stat_ack_rx)
-		e100_rx_clean(nic, NULL, 0);
-	if(stat_ack & stat_ack_tx)
-		e100_tx_clean(nic);
-#endif
 
 	return IRQ_HANDLED;
 }
 
-#ifdef CONFIG_E100_NAPI
 static int e100_poll(struct net_device *netdev, int *budget)
 {
 	struct nic *nic = netdev_priv(netdev);
@@ -1598,7 +1582,6 @@
 
 	return 1;
 }
-#endif
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void e100_netpoll(struct net_device *netdev)
@@ -2135,10 +2118,8 @@
 	SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops);
 	netdev->tx_timeout = e100_tx_timeout;
 	netdev->watchdog_timeo = E100_WATCHDOG_PERIOD;
-#ifdef CONFIG_E100_NAPI
 	netdev->poll = e100_poll;
 	netdev->weight = E100_NAPI_WEIGHT;
-#endif
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	netdev->poll_controller = e100_netpoll;
 #endif
--- diff/drivers/net/e1000/e1000.h	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/e1000/e1000.h	2004-07-01 21:32:38.000000000 +0100
@@ -196,6 +196,7 @@
 	uint32_t part_num;
 	uint32_t wol;
 	uint32_t smartspeed;
+	uint32_t en_mng_pt;
 	uint16_t link_speed;
 	uint16_t link_duplex;
 	spinlock_t stats_lock;
--- diff/drivers/net/e1000/e1000_ethtool.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/e1000/e1000_ethtool.c	2004-07-01 21:32:38.000000000 +0100
@@ -1004,11 +1004,12 @@
 		struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rxdr, i);
 		struct sk_buff *skb;
 
-		if(!(skb = alloc_skb(E1000_RXBUFFER_2048 + 2, GFP_KERNEL))) {
+		if(!(skb = alloc_skb(E1000_RXBUFFER_2048 + NET_IP_ALIGN,
+				     GFP_KERNEL))) {
 			ret_val = 6;
 			goto err_nomem;
 		}
-		skb_reserve(skb, 2);
+		skb_reserve(skb, NET_IP_ALIGN);
 		rxdr->buffer_info[i].skb = skb;
 		rxdr->buffer_info[i].length = E1000_RXBUFFER_2048;
 		rxdr->buffer_info[i].dma =
--- diff/drivers/net/e1000/e1000_hw.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/e1000/e1000_hw.c	2004-07-01 21:32:38.000000000 +0100
@@ -265,6 +265,17 @@
         return -E1000_ERR_MAC_TYPE;
     }
 
+    switch(hw->mac_type) {
+    case e1000_82541:
+    case e1000_82547:
+    case e1000_82541_rev_2:
+    case e1000_82547_rev_2:
+        hw->asf_firmware_present = TRUE;
+        break;
+    default:
+        break;
+    }
+
     return E1000_SUCCESS;
 }
 
@@ -5189,3 +5200,27 @@
     return E1000_SUCCESS;
 }
 
+/******************************************************************************
+ * Verifies the hardware needs to allow ARPs to be processed by the host
+ *
+ * hw - Struct containing variables accessed by shared code
+ *
+ * returns: - TRUE/FALSE
+ *
+ *****************************************************************************/
+uint32_t
+e1000_enable_mng_pass_thru(struct e1000_hw *hw)
+{
+    uint32_t manc;
+
+    if (hw->asf_firmware_present) {
+        manc = E1000_READ_REG(hw, MANC);
+
+        if (!(manc & E1000_MANC_RCV_TCO_EN) ||
+            !(manc & E1000_MANC_EN_MAC_ADDR_FILTER))
+            return FALSE;
+        if ((manc & E1000_MANC_SMBUS_EN) && !(manc & E1000_MANC_ASF_EN))
+            return TRUE;
+    }
+    return FALSE;
+}
--- diff/drivers/net/e1000/e1000_hw.h	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/e1000/e1000_hw.h	2004-07-01 21:32:38.000000000 +0100
@@ -307,6 +307,7 @@
 /* Adaptive IFS Functions */
 
 /* Everything else */
+uint32_t e1000_enable_mng_pass_thru(struct e1000_hw *hw);
 void e1000_clear_hw_cntrs(struct e1000_hw *hw);
 void e1000_reset_adaptive(struct e1000_hw *hw);
 void e1000_update_adaptive(struct e1000_hw *hw);
@@ -983,6 +984,7 @@
     e1000_ms_type master_slave;
     e1000_ms_type original_master_slave;
     e1000_ffe_config ffe_config_state;
+    uint32_t asf_firmware_present;
     unsigned long io_base;
     uint32_t phy_id;
     uint32_t phy_revision;
--- diff/drivers/net/e1000/e1000_main.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/e1000/e1000_main.c	2004-07-01 21:32:38.000000000 +0100
@@ -299,7 +299,7 @@
 void
 e1000_reset(struct e1000_adapter *adapter)
 {
-	uint32_t pba;
+	uint32_t pba, manc;
 	/* Repartition Pba for greater than 9k mtu
 	 * To take effect CTRL.RST is required.
 	 */
@@ -341,6 +341,12 @@
 
 	e1000_reset_adaptive(&adapter->hw);
 	e1000_phy_get_info(&adapter->hw, &adapter->phy_info);
+
+	if(adapter->en_mng_pt) {
+		manc = E1000_READ_REG(&adapter->hw, MANC);
+		manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST);
+		E1000_WRITE_REG(&adapter->hw, MANC, manc);
+	}
 }
 
 /**
@@ -483,6 +489,8 @@
 	if(pci_using_dac)
 		netdev->features |= NETIF_F_HIGHDMA;
 
+	adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw);
+
 	/* before reading the EEPROM, reset the controller to 
 	 * put the device in a known good starting state */
 	
@@ -2367,7 +2375,6 @@
 	struct e1000_rx_desc *rx_desc;
 	struct e1000_buffer *buffer_info;
 	struct sk_buff *skb;
-	int reserve_len = 2;
 	unsigned int i;
 
 	i = rx_ring->next_to_use;
@@ -2376,7 +2383,7 @@
 	while(!buffer_info->skb) {
 		rx_desc = E1000_RX_DESC(*rx_ring, i);
 
-		skb = dev_alloc_skb(adapter->rx_buffer_len + reserve_len);
+		skb = dev_alloc_skb(adapter->rx_buffer_len + NET_IP_ALIGN);
 
 		if(!skb) {
 			/* Better luck next round */
@@ -2387,7 +2394,7 @@
 		 * this will result in a 16 byte aligned IP header after
 		 * the 14 byte MAC header is removed
 		 */
-		skb_reserve(skb, reserve_len);
+		skb_reserve(skb, NET_IP_ALIGN);
 
 		skb->dev = netdev;
 
@@ -2858,6 +2865,8 @@
 		}
 	}
 
+	pci_disable_device(pdev);
+
 	state = (state > 0) ? 3 : 0;
 	pci_set_power_state(pdev, state);
 
@@ -2872,6 +2881,7 @@
 	struct e1000_adapter *adapter = netdev->priv;
 	uint32_t manc;
 
+	pci_enable_device(pdev);
 	pci_set_power_state(pdev, 0);
 	pci_restore_state(pdev, adapter->pci_state);
 
--- diff/drivers/net/e2100.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/e2100.c	2004-07-01 21:32:38.000000000 +0100
@@ -51,6 +51,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "e2100"
+
 static int e21_probe_list[] = {0x300, 0x280, 0x380, 0x220, 0};
 
 /* Offsets from the base_addr.
@@ -144,6 +146,7 @@
 	release_region(dev->base_addr, E21_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init e2100_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -168,6 +171,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init e21_probe1(struct net_device *dev, int ioaddr)
 {
@@ -175,7 +179,7 @@
 	unsigned char *station_addr = dev->dev_addr;
 	static unsigned version_printed;
 
-	if (!request_region(ioaddr, E21_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, E21_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	/* First check the station address for the Ctron prefix. */
--- diff/drivers/net/eepro.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/eepro.c	2004-07-01 21:32:38.000000000 +0100
@@ -151,6 +151,8 @@
 #include <asm/io.h>
 #include <asm/dma.h>
 
+#define DRV_NAME "eepro"
+
 #define compat_dev_kfree_skb( skb, mode ) dev_kfree_skb( (skb) )
 /* I had reports of looong delays with SLOW_DOWN defined as udelay(2) */
 #define SLOW_DOWN inb(0x80)
@@ -577,6 +579,7 @@
 	return -ENODEV;
 }
 
+#ifndef MODULE
 struct net_device * __init eepro_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(struct eepro_local));
@@ -603,6 +606,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static void __init printEEPROMInfo(short ioaddr, struct net_device *dev)
 {
@@ -745,7 +749,7 @@
 	int ioaddr = dev->base_addr;
 
 	/* Grab the region so we can find another board if autoIRQ fails. */
-	if (!request_region(ioaddr, EEPRO_IO_EXTENT, dev->name)) { 
+	if (!request_region(ioaddr, EEPRO_IO_EXTENT, DRV_NAME)) { 
 		if (!autoprobe)
 			printk(KERN_WARNING "EEPRO: io-port 0x%04x in use \n",
 				ioaddr);
--- diff/drivers/net/eexpress.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/eexpress.c	2004-07-01 21:32:38.000000000 +0100
@@ -423,6 +423,7 @@
 	return -ENODEV;
 }
 
+#ifndef MODULE
 struct net_device * __init express_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(struct net_local));
@@ -443,6 +444,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 /*
  * open and initialize the adapter, ready for use
--- diff/drivers/net/epic100.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/epic100.c	2004-07-01 21:32:38.000000000 +0100
@@ -80,8 +80,6 @@
    These may be modified when a driver module is loaded.*/
 
 static int debug = 1;			/* 1 normal messages, 0 quiet .. 7 verbose. */
-/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
-static int max_interrupt_work = 32;
 
 /* Used to pass the full-duplex flag, etc. */
 #define MAX_UNITS 8		/* More are supported, limit only on options */
@@ -99,9 +97,9 @@
    Making the Tx ring too large decreases the effectiveness of channel
    bonding and packet priority.
    There are no ill effects from too-large receive rings. */
-#define TX_RING_SIZE	16
-#define TX_QUEUE_LEN	10		/* Limit ring entries actually used.  */
-#define RX_RING_SIZE	32
+#define TX_RING_SIZE	256
+#define TX_QUEUE_LEN	240		/* Limit ring entries actually used.  */
+#define RX_RING_SIZE	256
 #define TX_TOTAL_SIZE	TX_RING_SIZE*sizeof(struct epic_tx_desc)
 #define RX_TOTAL_SIZE	RX_RING_SIZE*sizeof(struct epic_rx_desc)
 
@@ -158,12 +156,10 @@
 MODULE_LICENSE("GPL");
 
 MODULE_PARM(debug, "i");
-MODULE_PARM(max_interrupt_work, "i");
 MODULE_PARM(rx_copybreak, "i");
 MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
 MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
 MODULE_PARM_DESC(debug, "EPIC/100 debug level (0-5)");
-MODULE_PARM_DESC(max_interrupt_work, "EPIC/100 maximum events handled per interrupt");
 MODULE_PARM_DESC(options, "EPIC/100: Bits 0-3: media type, bit 4: full duplex");
 MODULE_PARM_DESC(rx_copybreak, "EPIC/100 copy breakpoint for copy-only-tiny-frames");
 MODULE_PARM_DESC(full_duplex, "EPIC/100 full duplex setting(s) (1)");
@@ -295,6 +291,12 @@
 	StopTxDMA=0x20, StopRxDMA=0x40, RestartTx=0x80,
 };
 
+#define EpicRemoved	0xffffffff	/* Chip failed or removed (CardBus) */
+
+#define EpicNapiEvent	(TxEmpty | TxDone | \
+			 RxDone | RxStarted | RxEarlyWarn | RxOverflow | RxFull)
+#define EpicNormalEvent	(0x0000ffff & ~EpicNapiEvent)
+
 static u16 media2miictl[16] = {
 	0, 0x0C00, 0x0C00, 0x2000,  0x0100, 0x2100, 0, 0,
 	0, 0, 0, 0,  0, 0, 0, 0 };
@@ -333,9 +335,12 @@
 
 	/* Ring pointers. */
 	spinlock_t lock;				/* Group with Tx control cache line. */
+	spinlock_t napi_lock;
+	unsigned int reschedule_in_poll;
 	unsigned int cur_tx, dirty_tx;
 
 	unsigned int cur_rx, dirty_rx;
+	u32 irq_mask;
 	unsigned int rx_buf_sz;				/* Based on MTU+slack. */
 
 	struct pci_dev *pci_dev;			/* PCI bus location. */
@@ -362,7 +367,8 @@
 static void epic_tx_timeout(struct net_device *dev);
 static void epic_init_ring(struct net_device *dev);
 static int epic_start_xmit(struct sk_buff *skb, struct net_device *dev);
-static int epic_rx(struct net_device *dev);
+static int epic_rx(struct net_device *dev, int budget);
+static int epic_poll(struct net_device *dev, int *budget);
 static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static struct ethtool_ops netdev_ethtool_ops;
@@ -381,7 +387,7 @@
 	int irq;
 	struct net_device *dev;
 	struct epic_private *ep;
-	int i, option = 0, duplex = 0;
+	int i, ret, option = 0, duplex = 0;
 	void *ring_space;
 	dma_addr_t ring_dma;
 
@@ -395,29 +401,33 @@
 	
 	card_idx++;
 	
-	i = pci_enable_device(pdev);
-	if (i)
-		return i;
+	ret = pci_enable_device(pdev);
+	if (ret)
+		goto out;
 	irq = pdev->irq;
 
 	if (pci_resource_len(pdev, 0) < pci_id_tbl[chip_idx].io_size) {
 		printk (KERN_ERR "card %d: no PCI region space\n", card_idx);
-		return -ENODEV;
+		ret = -ENODEV;
+		goto err_out_disable;
 	}
 	
 	pci_set_master(pdev);
 
+	ret = pci_request_regions(pdev, DRV_NAME);
+	if (ret < 0)
+		goto err_out_disable;
+
+	ret = -ENOMEM;
+
 	dev = alloc_etherdev(sizeof (*ep));
 	if (!dev) {
 		printk (KERN_ERR "card %d: no memory for eth device\n", card_idx);
-		return -ENOMEM;
+		goto err_out_free_res;
 	}
 	SET_MODULE_OWNER(dev);
 	SET_NETDEV_DEV(dev, &pdev->dev);
 
-	if (pci_request_regions(pdev, DRV_NAME))
-		goto err_out_free_netdev;
-
 #ifdef USE_IO_OPS
 	ioaddr = pci_resource_start (pdev, 0);
 #else
@@ -425,7 +435,7 @@
 	ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1));
 	if (!ioaddr) {
 		printk (KERN_ERR DRV_NAME " %d: ioremap failed\n", card_idx);
-		goto err_out_free_res;
+		goto err_out_free_netdev;
 	}
 #endif
 
@@ -462,7 +472,9 @@
 	dev->base_addr = ioaddr;
 	dev->irq = irq;
 
-	spin_lock_init (&ep->lock);
+	spin_lock_init(&ep->lock);
+	spin_lock_init(&ep->napi_lock);
+	ep->reschedule_in_poll = 0;
 
 	/* Bring the chip out of low-power mode. */
 	outl(0x4200, ioaddr + GENCTL);
@@ -492,6 +504,9 @@
 	ep->pci_dev = pdev;
 	ep->chip_id = chip_idx;
 	ep->chip_flags = pci_id_tbl[chip_idx].drv_flags;
+	ep->irq_mask = 
+		(ep->chip_flags & TYPE2_INTR ?  PCIBusErr175 : PCIBusErr170)
+		 | CntFull | TxUnderrun | EpicNapiEvent;
 
 	/* Find the connected MII xcvrs.
 	   Doing this in open() would allow detecting external xcvrs later, but
@@ -546,10 +561,12 @@
 	dev->ethtool_ops = &netdev_ethtool_ops;
 	dev->watchdog_timeo = TX_TIMEOUT;
 	dev->tx_timeout = &epic_tx_timeout;
+	dev->poll = epic_poll;
+	dev->weight = 64;
 
-	i = register_netdev(dev);
-	if (i)
-		goto err_out_unmap_tx;
+	ret = register_netdev(dev);
+	if (ret < 0)
+		goto err_out_unmap_rx;
 
 	printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ",
 		   dev->name, pci_id_tbl[chip_idx].name, ioaddr, dev->irq);
@@ -557,19 +574,24 @@
 		printk("%2.2x:", dev->dev_addr[i]);
 	printk("%2.2x.\n", dev->dev_addr[i]);
 
-	return 0;
+out:
+	return ret;
 
+err_out_unmap_rx:
+	pci_free_consistent(pdev, RX_TOTAL_SIZE, ep->rx_ring, ep->rx_ring_dma);
 err_out_unmap_tx:
 	pci_free_consistent(pdev, TX_TOTAL_SIZE, ep->tx_ring, ep->tx_ring_dma);
 err_out_iounmap:
 #ifndef USE_IO_OPS
 	iounmap(ioaddr);
-err_out_free_res:
-#endif
-	pci_release_regions(pdev);
 err_out_free_netdev:
+#endif
 	free_netdev(dev);
-	return -ENODEV;
+err_out_free_res:
+	pci_release_regions(pdev);
+err_out_disable:
+	pci_disable_device(pdev);
+	goto out;
 }
 
 /* Serial EEPROM section. */
@@ -595,6 +617,38 @@
 #define EE_READ256_CMD	(6 << 8)
 #define EE_ERASE_CMD	(7 << 6)
 
+static void epic_disable_int(struct net_device *dev, struct epic_private *ep)
+{
+	long ioaddr = dev->base_addr;
+
+	outl(0x00000000, ioaddr + INTMASK);
+}
+
+static inline void __epic_pci_commit(long ioaddr)
+{
+#ifndef USE_IO_OPS
+	inl(ioaddr + INTMASK);
+#endif
+}
+
+static inline void epic_napi_irq_off(struct net_device *dev,
+				     struct epic_private *ep)
+{
+	long ioaddr = dev->base_addr;
+
+	outl(ep->irq_mask & ~EpicNapiEvent, ioaddr + INTMASK);
+	__epic_pci_commit(ioaddr);
+}
+
+static inline void epic_napi_irq_on(struct net_device *dev,
+				    struct epic_private *ep)
+{
+	long ioaddr = dev->base_addr;
+
+	/* No need to commit possible posted write */
+	outl(ep->irq_mask | EpicNapiEvent, ioaddr + INTMASK);
+}
+
 static int __devinit read_eeprom(long ioaddr, int location)
 {
 	int i;
@@ -755,9 +809,8 @@
 
 	/* Enable interrupts by setting the interrupt mask. */
 	outl((ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170)
-		 | CntFull | TxUnderrun | TxDone | TxEmpty
-		 | RxError | RxOverflow | RxFull | RxHeader | RxDone,
-		 ioaddr + INTMASK);
+		 | CntFull | TxUnderrun 
+		 | RxError | RxHeader | EpicNapiEvent, ioaddr + INTMASK);
 
 	if (debug > 1)
 		printk(KERN_DEBUG "%s: epic_open() ioaddr %lx IRQ %d status %4.4x "
@@ -798,7 +851,7 @@
 	}
 
 	/* Remove the packets on the Rx queue. */
-	epic_rx(dev);
+	epic_rx(dev, RX_RING_SIZE);
 }
 
 static void epic_restart(struct net_device *dev)
@@ -844,9 +897,9 @@
 
 	/* Enable interrupts by setting the interrupt mask. */
 	outl((ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170)
-		 | CntFull | TxUnderrun | TxDone | TxEmpty
-		 | RxError | RxOverflow | RxFull | RxHeader | RxDone,
-		 ioaddr + INTMASK);
+		 | CntFull | TxUnderrun
+		 | RxError | RxHeader | EpicNapiEvent, ioaddr + INTMASK);
+
 	printk(KERN_DEBUG "%s: epic_restart() done, cmd status %4.4x, ctl %4.4x"
 		   " interrupt %4.4x.\n",
 		   dev->name, (int)inl(ioaddr + COMMAND), (int)inl(ioaddr + GENCTL),
@@ -932,7 +985,6 @@
 	int i;
 
 	ep->tx_full = 0;
-	ep->lock = (spinlock_t) SPIN_LOCK_UNLOCKED;
 	ep->dirty_tx = ep->cur_tx = 0;
 	ep->cur_rx = ep->dirty_rx = 0;
 	ep->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32);
@@ -1032,6 +1084,76 @@
 	return 0;
 }
 
+static void epic_tx_error(struct net_device *dev, struct epic_private *ep,
+			  int status)
+{
+	struct net_device_stats *stats = &ep->stats;
+
+#ifndef final_version
+	/* There was an major error, log it. */
+	if (debug > 1)
+		printk(KERN_DEBUG "%s: Transmit error, Tx status %8.8x.\n",
+		       dev->name, status);
+#endif
+	stats->tx_errors++;
+	if (status & 0x1050)
+		stats->tx_aborted_errors++;
+	if (status & 0x0008)
+		stats->tx_carrier_errors++;
+	if (status & 0x0040)
+		stats->tx_window_errors++;
+	if (status & 0x0010)
+		stats->tx_fifo_errors++;
+}
+
+static void epic_tx(struct net_device *dev, struct epic_private *ep)
+{
+	unsigned int dirty_tx, cur_tx;
+
+	/*
+	 * Note: if this lock becomes a problem we can narrow the locked
+	 * region at the cost of occasionally grabbing the lock more times.
+	 */
+	cur_tx = ep->cur_tx;
+	for (dirty_tx = ep->dirty_tx; cur_tx - dirty_tx > 0; dirty_tx++) {
+		struct sk_buff *skb;
+		int entry = dirty_tx % TX_RING_SIZE;
+		int txstatus = le32_to_cpu(ep->tx_ring[entry].txstatus);
+
+		if (txstatus & DescOwn)
+			break;	/* It still hasn't been Txed */
+
+		if (likely(txstatus & 0x0001)) {
+			ep->stats.collisions += (txstatus >> 8) & 15;
+			ep->stats.tx_packets++;
+			ep->stats.tx_bytes += ep->tx_skbuff[entry]->len;
+		} else
+			epic_tx_error(dev, ep, txstatus);
+
+		/* Free the original skb. */
+		skb = ep->tx_skbuff[entry];
+		pci_unmap_single(ep->pci_dev, ep->tx_ring[entry].bufaddr, 
+				 skb->len, PCI_DMA_TODEVICE);
+		dev_kfree_skb_irq(skb);
+		ep->tx_skbuff[entry] = 0;
+	}
+
+#ifndef final_version
+	if (cur_tx - dirty_tx > TX_RING_SIZE) {
+		printk(KERN_WARNING
+		       "%s: Out-of-sync dirty pointer, %d vs. %d, full=%d.\n",
+		       dev->name, dirty_tx, cur_tx, ep->tx_full);
+		dirty_tx += TX_RING_SIZE;
+	}
+#endif
+	ep->dirty_tx = dirty_tx;
+	if (ep->tx_full && cur_tx - dirty_tx < TX_QUEUE_LEN - 4) {
+		/* The ring is no longer full, allow new TX entries. */
+		ep->tx_full = 0;
+		netif_wake_queue(dev);
+	}
+}
+
 /* The interrupt handler does all of the Rx thread work and cleans up
    after the Tx thread. */
 static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
@@ -1039,135 +1161,71 @@
 	struct net_device *dev = dev_instance;
 	struct epic_private *ep = dev->priv;
 	long ioaddr = dev->base_addr;
-	int status, boguscnt = max_interrupt_work;
 	unsigned int handled = 0;
+	int status;
 
-	do {
-		status = inl(ioaddr + INTSTAT);
-		/* Acknowledge all of the current interrupt sources ASAP. */
-		outl(status & 0x00007fff, ioaddr + INTSTAT);
-
-		if (debug > 4)
-			printk(KERN_DEBUG "%s: Interrupt, status=%#8.8x new "
-				   "intstat=%#8.8x.\n",
-				   dev->name, status, (int)inl(ioaddr + INTSTAT));
-
-		if ((status & IntrSummary) == 0)
-			break;
-		handled = 1;
+	status = inl(ioaddr + INTSTAT);
+	/* Acknowledge all of the current interrupt sources ASAP. */
+	outl(status & EpicNormalEvent, ioaddr + INTSTAT);
 
-		if (status & (RxDone | RxStarted | RxEarlyWarn | RxOverflow))
-			epic_rx(dev);
+	if (debug > 4) {
+		printk(KERN_DEBUG "%s: Interrupt, status=%#8.8x new "
+				   "intstat=%#8.8x.\n", dev->name, status,
+				   (int)inl(ioaddr + INTSTAT));
+	}
 
-		if (status & (TxEmpty | TxDone)) {
-			unsigned int dirty_tx, cur_tx;
+	if ((status & IntrSummary) == 0)
+		goto out;
 
-			/* Note: if this lock becomes a problem we can narrow the locked
-			   region at the cost of occasionally grabbing the lock more
-			   times. */
-			spin_lock(&ep->lock);
-			cur_tx = ep->cur_tx;
-			dirty_tx = ep->dirty_tx;
-			for (; cur_tx - dirty_tx > 0; dirty_tx++) {
-				struct sk_buff *skb;
-				int entry = dirty_tx % TX_RING_SIZE;
-				int txstatus = le32_to_cpu(ep->tx_ring[entry].txstatus);
+	handled = 1;
 
-				if (txstatus & DescOwn)
-					break;			/* It still hasn't been Txed */
+	if ((status & EpicNapiEvent) && !ep->reschedule_in_poll) {
+		spin_lock(&ep->napi_lock);
+		if (netif_rx_schedule_prep(dev)) {
+			epic_napi_irq_off(dev, ep);
+			__netif_rx_schedule(dev);
+		} else
+			ep->reschedule_in_poll++;
+		spin_unlock(&ep->napi_lock);
+	}
+	status &= ~EpicNapiEvent;
 
-				if ( ! (txstatus & 0x0001)) {
-					/* There was an major error, log it. */
-#ifndef final_version
-					if (debug > 1)
-						printk(KERN_DEBUG "%s: Transmit error, Tx status %8.8x.\n",
-							   dev->name, txstatus);
-#endif
-					ep->stats.tx_errors++;
-					if (txstatus & 0x1050) ep->stats.tx_aborted_errors++;
-					if (txstatus & 0x0008) ep->stats.tx_carrier_errors++;
-					if (txstatus & 0x0040) ep->stats.tx_window_errors++;
-					if (txstatus & 0x0010) ep->stats.tx_fifo_errors++;
-				} else {
-					ep->stats.collisions += (txstatus >> 8) & 15;
-					ep->stats.tx_packets++;
-					ep->stats.tx_bytes += ep->tx_skbuff[entry]->len;
-				}
-
-				/* Free the original skb. */
-				skb = ep->tx_skbuff[entry];
-				pci_unmap_single(ep->pci_dev, ep->tx_ring[entry].bufaddr, 
-						 skb->len, PCI_DMA_TODEVICE);
-				dev_kfree_skb_irq(skb);
-				ep->tx_skbuff[entry] = 0;
-			}
+	/* Check uncommon events all at once. */
+	if (status & (CntFull | TxUnderrun | PCIBusErr170 | PCIBusErr175)) {
+		if (status == EpicRemoved)
+			goto out;
 
-#ifndef final_version
-			if (cur_tx - dirty_tx > TX_RING_SIZE) {
-				printk(KERN_WARNING "%s: Out-of-sync dirty pointer, %d vs. %d, full=%d.\n",
-					   dev->name, dirty_tx, cur_tx, ep->tx_full);
-				dirty_tx += TX_RING_SIZE;
-			}
-#endif
-			ep->dirty_tx = dirty_tx;
-			if (ep->tx_full
-				&& cur_tx - dirty_tx < TX_QUEUE_LEN - 4) {
-				/* The ring is no longer full, allow new TX entries. */
-				ep->tx_full = 0;
-				spin_unlock(&ep->lock);
-				netif_wake_queue(dev);
-			} else
-				spin_unlock(&ep->lock);
-		}
+		/* Always update the error counts to avoid overhead later. */
+		ep->stats.rx_missed_errors += inb(ioaddr + MPCNT);
+		ep->stats.rx_frame_errors += inb(ioaddr + ALICNT);
+		ep->stats.rx_crc_errors += inb(ioaddr + CRCCNT);
 
-		/* Check uncommon events all at once. */
-		if (status & (CntFull | TxUnderrun | RxOverflow | RxFull |
-					  PCIBusErr170 | PCIBusErr175)) {
-			if (status == 0xffffffff) /* Chip failed or removed (CardBus). */
-				break;
-			/* Always update the error counts to avoid overhead later. */
-			ep->stats.rx_missed_errors += inb(ioaddr + MPCNT);
-			ep->stats.rx_frame_errors += inb(ioaddr + ALICNT);
-			ep->stats.rx_crc_errors += inb(ioaddr + CRCCNT);
-
-			if (status & TxUnderrun) { /* Tx FIFO underflow. */
-				ep->stats.tx_fifo_errors++;
-				outl(ep->tx_threshold += 128, ioaddr + TxThresh);
-				/* Restart the transmit process. */
-				outl(RestartTx, ioaddr + COMMAND);
-			}
-			if (status & RxOverflow) {		/* Missed a Rx frame. */
-				ep->stats.rx_errors++;
-			}
-			if (status & (RxOverflow | RxFull))
-				outw(RxQueued, ioaddr + COMMAND);
-			if (status & PCIBusErr170) {
-				printk(KERN_ERR "%s: PCI Bus Error!  EPIC status %4.4x.\n",
-					   dev->name, status);
-				epic_pause(dev);
-				epic_restart(dev);
-			}
-			/* Clear all error sources. */
-			outl(status & 0x7f18, ioaddr + INTSTAT);
+		if (status & TxUnderrun) { /* Tx FIFO underflow. */
+			ep->stats.tx_fifo_errors++;
+			outl(ep->tx_threshold += 128, ioaddr + TxThresh);
+			/* Restart the transmit process. */
+			outl(RestartTx, ioaddr + COMMAND);
 		}
-		if (--boguscnt < 0) {
-			printk(KERN_ERR "%s: Too much work at interrupt, "
-				   "IntrStatus=0x%8.8x.\n",
-				   dev->name, status);
-			/* Clear all interrupt sources. */
-			outl(0x0001ffff, ioaddr + INTSTAT);
-			break;
+		if (status & PCIBusErr170) {
+			printk(KERN_ERR "%s: PCI Bus Error! status %4.4x.\n",
+					 dev->name, status);
+			epic_pause(dev);
+			epic_restart(dev);
 		}
-	} while (1);
+		/* Clear all error sources. */
+		outl(status & 0x7f18, ioaddr + INTSTAT);
+	}
 
-	if (debug > 3)
-		printk(KERN_DEBUG "%s: exiting interrupt, intr_status=%#4.4x.\n",
-			   dev->name, status);
+out:
+	if (debug > 3) {
+		printk(KERN_DEBUG "%s: exit interrupt, intr_status=%#4.4x.\n",
+				   dev->name, status);
+	}
 
 	return IRQ_RETVAL(handled);
 }
 
-static int epic_rx(struct net_device *dev)
+static int epic_rx(struct net_device *dev, int budget)
 {
 	struct epic_private *ep = dev->priv;
 	int entry = ep->cur_rx % RX_RING_SIZE;
@@ -1177,6 +1235,10 @@
 	if (debug > 4)
 		printk(KERN_DEBUG " In epic_rx(), entry %d %8.8x.\n", entry,
 			   ep->rx_ring[entry].rxstatus);
+
+	if (rx_work_limit > budget)
+		rx_work_limit = budget;
+
 	/* If we own the next entry, it's a new packet. Send it up. */
 	while ((ep->rx_ring[entry].rxstatus & cpu_to_le32(DescOwn)) == 0) {
 		int status = le32_to_cpu(ep->rx_ring[entry].rxstatus);
@@ -1218,13 +1280,8 @@
 							    ep->rx_ring[entry].bufaddr,
 							    ep->rx_buf_sz,
 							    PCI_DMA_FROMDEVICE);
-#if 1 /* HAS_IP_COPYSUM */
 				eth_copy_and_sum(skb, ep->rx_skbuff[entry]->tail, pkt_len, 0);
 				skb_put(skb, pkt_len);
-#else
-				memcpy(skb_put(skb, pkt_len), ep->rx_skbuff[entry]->tail,
-					   pkt_len);
-#endif
 				pci_dma_sync_single_for_device(ep->pci_dev,
 							       ep->rx_ring[entry].bufaddr,
 							       ep->rx_buf_sz,
@@ -1237,7 +1294,7 @@
 				ep->rx_skbuff[entry] = NULL;
 			}
 			skb->protocol = eth_type_trans(skb, dev);
-			netif_rx(skb);
+			netif_receive_skb(skb);
 			dev->last_rx = jiffies;
 			ep->stats.rx_packets++;
 			ep->stats.rx_bytes += pkt_len;
@@ -1265,6 +1322,65 @@
 	return work_done;
 }
 
+static void epic_rx_err(struct net_device *dev, struct epic_private *ep)
+{
+	long ioaddr = dev->base_addr;
+	int status;
+
+	status = inl(ioaddr + INTSTAT);
+
+	if (status == EpicRemoved)
+		return;
+	if (status & RxOverflow) 	/* Missed a Rx frame. */
+		ep->stats.rx_errors++;
+	if (status & (RxOverflow | RxFull))
+		outw(RxQueued, ioaddr + COMMAND);
+}
+
+static int epic_poll(struct net_device *dev, int *budget)
+{
+	struct epic_private *ep = dev->priv;
+	int work_done, orig_budget;
+	long ioaddr = dev->base_addr;
+
+	orig_budget = (*budget > dev->quota) ? dev->quota : *budget;
+
+rx_action:
+
+	epic_tx(dev, ep);
+
+	work_done = epic_rx(dev, *budget);
+
+	epic_rx_err(dev, ep);
+
+	*budget -= work_done;
+	dev->quota -= work_done;
+
+	if (netif_running(dev) && (work_done < orig_budget)) {
+		unsigned long flags;
+		int more;
+
+		/* A bit baroque but it avoids a (space hungry) spin_unlock */
+
+		spin_lock_irqsave(&ep->napi_lock, flags);
+
+		more = ep->reschedule_in_poll;
+		if (!more) {
+			__netif_rx_complete(dev);
+			outl(EpicNapiEvent, ioaddr + INTSTAT);
+			epic_napi_irq_on(dev, ep);
+		} else
+			ep->reschedule_in_poll--;
+
+		spin_unlock_irqrestore(&ep->napi_lock, flags);
+
+		if (more)
+			goto rx_action;
+	}
+
+	return (work_done >= orig_budget);
+}
+
 static int epic_close(struct net_device *dev)
 {
 	long ioaddr = dev->base_addr;
@@ -1279,9 +1395,13 @@
 			   dev->name, (int)inl(ioaddr + INTSTAT));
 
 	del_timer_sync(&ep->timer);
-	epic_pause(dev);
+
+	epic_disable_int(dev, ep);
+
 	free_irq(dev->irq, dev);
 
+	epic_pause(dev);
+
 	/* Free all the skbuffs in the Rx queue. */
 	for (i = 0; i < RX_RING_SIZE; i++) {
 		skb = ep->rx_skbuff[i];
@@ -1502,6 +1622,7 @@
 #endif
 	pci_release_regions(pdev);
 	free_netdev(dev);
+	pci_disable_device(pdev);
 	pci_set_drvdata(pdev, NULL);
 	/* pci_power_off(pdev, -1); */
 }
--- diff/drivers/net/eql.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/eql.c	2004-07-01 21:32:38.000000000 +0100
@@ -495,8 +495,12 @@
 		return -EFAULT;
 
 	slave_dev = dev_get_by_name(sc.slave_name);
+	if (!slave_dev)
+		return -ENODEV;
 
 	ret = -EINVAL;
+	if (!slave_dev)
+		return ret;
 
 	spin_lock_bh(&eql->queue.lock);
 	if (eql_is_slave(slave_dev)) {
@@ -527,11 +531,15 @@
 	if (copy_from_user(&sc, scp, sizeof (slave_config_t)))
 		return -EFAULT;
 
-	eql = dev->priv;
 	slave_dev = dev_get_by_name(sc.slave_name);
+	if (!slave_dev)
+		return -ENODEV;
 
 	ret = -EINVAL;
+	if (!slave_dev)
+		return ret;
 
+	eql = dev->priv;
 	spin_lock_bh(&eql->queue.lock);
 	if (eql_is_slave(slave_dev)) {
 		slave = __eql_find_slave_dev(&eql->queue, slave_dev);
--- diff/drivers/net/es3210.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/es3210.c	2004-07-01 21:32:38.000000000 +0100
@@ -161,6 +161,7 @@
 	release_region(dev->base_addr, ES_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init es_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -185,6 +186,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init es_probe1(struct net_device *dev, int ioaddr)
 {
--- diff/drivers/net/eth16i.c	2004-05-19 22:11:53.000000000 +0100
+++ source/drivers/net/eth16i.c	2004-07-01 21:32:38.000000000 +0100
@@ -458,6 +458,7 @@
 	return -ENODEV;
 }
 
+#ifndef MODULE
 struct net_device * __init eth16i_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(struct eth16i_local));
@@ -483,6 +484,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init eth16i_probe1(struct net_device *dev, int ioaddr)
 {
@@ -491,7 +493,7 @@
 	int retval;
 
 	/* Let's grab the region */
-	if (!request_region(ioaddr, ETH16I_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, ETH16I_IO_EXTENT, cardname))
 		return -EBUSY;
 
 	/*
@@ -538,9 +540,9 @@
 
 	/* Try to obtain interrupt vector */
 
-	if ((retval = request_irq(dev->irq, (void *)&eth16i_interrupt, 0, dev->name, dev))) {
-		printk(KERN_WARNING "%s: %s at %#3x, but is unusable due conflicting IRQ %d.\n", 
-		       dev->name, cardname, ioaddr, dev->irq);
+	if ((retval = request_irq(dev->irq, (void *)&eth16i_interrupt, 0, cardname, dev))) {
+		printk(KERN_WARNING "%s at %#3x, but is unusable due to conflicting IRQ %d.\n", 
+		       cardname, ioaddr, dev->irq);
 		goto out;
 	}
 
--- diff/drivers/net/ewrk3.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/ewrk3.c	2004-07-01 21:32:38.000000000 +0100
@@ -341,6 +341,7 @@
     mdelay(1);\
 }
 
+#ifndef MODULE
 struct net_device * __init ewrk3_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(struct ewrk3_private));
@@ -364,6 +365,7 @@
 	return ERR_PTR(err);
 	
 }
+#endif
 
 static int __init ewrk3_probe1(struct net_device *dev, u_long iobase, int irq)
 {
@@ -1269,7 +1271,7 @@
 	for (; (i < maxSlots) && (dev != NULL);
 	     iobase += EWRK3_IOP_INC, i++)
 	{
-		if (request_region(iobase, EWRK3_TOTAL_SIZE, dev->name)) {
+		if (request_region(iobase, EWRK3_TOTAL_SIZE, DRV_NAME)) {
 			if (DevicePresent(iobase) == 0) {
 				int irq = dev->irq;
 				ret = ewrk3_hw_init(dev, iobase);
@@ -1310,7 +1312,7 @@
 
 	for (i = 1; (i < maxSlots) && (dev != NULL); i++, iobase += EISA_SLOT_INC) {
 		if (EISA_signature(name, EISA_ID) == 0) {
-			if (request_region(iobase, EWRK3_TOTAL_SIZE, dev->name) &&
+			if (request_region(iobase, EWRK3_TOTAL_SIZE, DRV_NAME) &&
 			    DevicePresent(iobase) == 0) {
 				int irq = dev->irq;
 				ret = ewrk3_hw_init(dev, iobase);
--- diff/drivers/net/fc/iph5526.c	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/fc/iph5526.c	2004-07-01 21:32:38.000000000 +0100
@@ -52,7 +52,7 @@
 			       others + includes if_fcdevice.h */
 
 #include "../../scsi/scsi.h"
-#include "../../scsi/hosts.h"
+#include <scsi/scsi_host.h>
 #include "../../fc4/fcp.h"
 
 #include <asm/system.h>
--- diff/drivers/net/fealnx.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/fealnx.c	2004-07-01 21:32:38.000000000 +0100
@@ -858,12 +858,17 @@
 {
 	struct netdev_private *np = dev->priv;
 	long ioaddr = dev->base_addr;
+	int i;
 
 	writel(0x00000001, ioaddr + BCR);	/* Reset */
 
 	if (request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev))
 		return -EAGAIN;
 
+	for (i = 0; i < 3; i++)
+		writew(((unsigned short*)dev->dev_addr)[i],
+				ioaddr + PAR0 + i*2);
+
 	init_ring(dev);
 
 	writel(np->rx_ring_dma, ioaddr + RXLBA);
--- diff/drivers/net/fmv18x.c	2004-05-19 22:11:54.000000000 +0100
+++ source/drivers/net/fmv18x.c	2004-07-01 21:32:38.000000000 +0100
@@ -57,6 +57,8 @@
 #include <asm/io.h>
 #include <asm/dma.h>
 
+#define DRV_NAME "fmv18x"
+
 static unsigned fmv18x_probe_list[] __initdata = {
 	0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x300, 0x340, 0
 };
@@ -192,7 +194,7 @@
 	   That means we have to be careful with the register values we probe for.
 	   */
 
-	if (!request_region(ioaddr, FMV18X_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, FMV18X_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	dev->irq = irq;
@@ -224,7 +226,7 @@
 	}
 
 	/* Snarf the interrupt vector now. */
-	retval = request_irq(dev->irq, &net_interrupt, 0, dev->name, dev);
+	retval = request_irq(dev->irq, &net_interrupt, 0, DRV_NAME, dev);
 	if (retval) {
 		printk ("FMV-18x found at %#3x, but it's unusable due to a conflict on"
 				"IRQ %d.\n", ioaddr, dev->irq);
--- diff/drivers/net/forcedeth.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/forcedeth.c	2004-07-01 21:32:38.000000000 +0100
@@ -81,6 +81,7 @@
  * superfluous timer interrupts from the nic.
  */
 #define FORCEDETH_VERSION		"0.25"
+#define DRV_NAME			"forcedeth"
 
 #include <linux/module.h>
 #include <linux/types.h>
@@ -1424,7 +1425,7 @@
 
 	pci_set_master(pci_dev);
 
-	err = pci_request_regions(pci_dev, dev->name);
+	err = pci_request_regions(pci_dev, DRV_NAME);
 	if (err < 0)
 		goto out_disable;
 
--- diff/drivers/net/hamachi.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/hamachi.c	2004-07-01 21:32:38.000000000 +0100
@@ -207,10 +207,8 @@
 /* Condensed bus+endian portability operations. */
 #if ADDRLEN == 64
 #define cpu_to_leXX(addr)	cpu_to_le64(addr)
-#define desc_to_virt(addr) bus_to_virt(le64_to_cpu(addr))
 #else 
 #define cpu_to_leXX(addr)	cpu_to_le32(addr)
-#define desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr))
 #endif   
 
 
@@ -1502,7 +1500,7 @@
 					    desc->addr,
 					    hmp->rx_buf_sz,
 					    PCI_DMA_FROMDEVICE);
-		buf_addr = desc_to_virt(desc->addr);
+		buf_addr = (u8 *) hmp->rx_skbuff[entry]->tail;
 		frame_status = le32_to_cpu(get_unaligned((s32*)&(buf_addr[data_size - 12])));
 		if (hamachi_debug > 4)
 			printk(KERN_DEBUG "  hamachi_rx() status was %8.8x.\n",
--- diff/drivers/net/hamradio/Kconfig	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/hamradio/Kconfig	2004-07-01 21:32:38.000000000 +0100
@@ -113,6 +113,7 @@
 config BAYCOM_SER_FDX
 	tristate "BAYCOM ser12 fullduplex driver for AX.25"
 	depends on AX25
+	select CRC16
 	---help---
 	  This is one of two drivers for Baycom style simple amateur radio
 	  modems that connect to a serial interface. The driver supports the
@@ -132,6 +133,7 @@
 config BAYCOM_SER_HDX
 	tristate "BAYCOM ser12 halfduplex driver for AX.25"
 	depends on AX25
+	select CRC16
 	---help---
 	  This is one of two drivers for Baycom style simple amateur radio
 	  modems that connect to a serial interface. The driver supports the
@@ -149,6 +151,7 @@
 config BAYCOM_PAR
 	tristate "BAYCOM picpar and par96 driver for AX.25"
 	depends on PARPORT && AX25
+	select CRC16
 	---help---
 	  This is a driver for Baycom style simple amateur radio modems that
 	  connect to a parallel interface. The driver supports the picpar and
@@ -163,6 +166,7 @@
 config BAYCOM_EPP
 	tristate "BAYCOM epp driver for AX.25"
 	depends on PARPORT && AX25 && !64BIT
+	select CRC16
 	---help---
 	  This is a driver for Baycom style simple amateur radio modems that
 	  connect to a parallel interface. The driver supports the EPP
--- diff/drivers/net/hamradio/baycom_epp.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/hamradio/baycom_epp.c	2004-07-01 21:32:38.000000000 +0100
@@ -58,6 +58,7 @@
 /* prototypes for ax25_encapsulate and ax25_rebuild_header */
 #include <net/ax25.h> 
 #endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */
+#include <linux/crc16.h>
 
 /* --------------------------------------------------------------------- */
 
@@ -260,40 +261,6 @@
  * by Dieter Deyke
  */
 
-static const unsigned short crc_ccitt_table[] = {
-	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
-	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
-	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
-	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
-	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
-	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
-	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
-	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
-	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
-	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
-	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
-	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
-	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
-	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
-	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
-	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
-	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
-	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
-	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
-	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
-	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
-	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
-	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
-	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
-	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
-	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
-	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
-	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
-	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
-	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
-	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
-	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
-};
 
 /*---------------------------------------------------------------------------*/
 
@@ -314,23 +281,14 @@
 
 static inline int check_crc_ccitt(const unsigned char *buf, int cnt)
 {
-	unsigned int crc = 0xffff;
-
-	for (; cnt > 0; cnt--)
-		crc = (crc >> 8) ^ crc_ccitt_table[(crc ^ *buf++) & 0xff];
-	return (crc & 0xffff) == 0xf0b8;
+	return (crc16(0xffff, buf, cnt) & 0xffff) == 0xf0b8;
 }
 
 /*---------------------------------------------------------------------------*/
 
 static inline int calc_crc_ccitt(const unsigned char *buf, int cnt)
 {
-	unsigned int crc = 0xffff;
-
-	for (; cnt > 0; cnt--)
-		crc = (crc >> 8) ^ crc_ccitt_table[(crc ^ *buf++) & 0xff];
-	crc ^= 0xffff;
-	return (crc & 0xffff);
+	return (crc16(0xffff, buf, cnt) ^ 0xffff) & 0xffff;
 }
 
 /* ---------------------------------------------------------------------- */
--- diff/drivers/net/hamradio/hdlcdrv.c	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/hamradio/hdlcdrv.c	2004-07-01 21:32:38.000000000 +0100
@@ -66,6 +66,7 @@
 #include <linux/ip.h>
 #include <linux/udp.h>
 #include <linux/tcp.h>
+#include <linux/crc16.h>
 
 /* --------------------------------------------------------------------- */
 
@@ -99,50 +100,12 @@
  * by Dieter Deyke
  */
 
-static const unsigned short crc_ccitt_table[] = {
-	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
-	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
-	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
-	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
-	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
-	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
-	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
-	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
-	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
-	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
-	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
-	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
-	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
-	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
-	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
-	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
-	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
-	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
-	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
-	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
-	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
-	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
-	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
-	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
-	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
-	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
-	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
-	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
-	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
-	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
-	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
-	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
-};
 
 /*---------------------------------------------------------------------------*/
 
 static inline void append_crc_ccitt(unsigned char *buffer, int len)
 {
- 	unsigned int crc = 0xffff;
-
-	for (;len>0;len--)
-		crc = (crc >> 8) ^ crc_ccitt_table[(crc ^ *buffer++) & 0xff];
-	crc ^= 0xffff;
+ 	unsigned int crc = crc16(0xffff, buffer, len) ^ 0xffff;
 	*buffer++ = crc;
 	*buffer++ = crc >> 8;
 }
@@ -151,11 +114,7 @@
 
 static inline int check_crc_ccitt(const unsigned char *buf, int cnt)
 {
-	unsigned int crc = 0xffff;
-
-	for (; cnt > 0; cnt--)
-		crc = (crc >> 8) ^ crc_ccitt_table[(crc ^ *buf++) & 0xff];
-	return (crc & 0xffff) == 0xf0b8;
+	return (crc16(0xffff, buf, cnt) & 0xffff) == 0xf0b8;
 }
 
 /*---------------------------------------------------------------------------*/
@@ -588,6 +547,8 @@
 		return -EINVAL;
 	s = (struct hdlcdrv_state *)dev->priv;
 
+	netif_stop_queue(dev);
+
 	if (s->ops && s->ops->close)
 		i = s->ops->close(dev);
 	if (s->skb)
--- diff/drivers/net/hp-plus.c	2004-05-19 22:11:54.000000000 +0100
+++ source/drivers/net/hp-plus.c	2004-07-01 21:32:38.000000000 +0100
@@ -37,6 +37,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "hp-plus"
+
 /* A zero-terminated list of I/O addresses to be probed. */
 static unsigned int hpplus_portlist[] __initdata =
 {0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340, 0};
@@ -142,6 +144,7 @@
 	release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init hp_plus_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -166,6 +169,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 /* Do the interesting part of the probe at a single address. */
 static int __init hpp_probe1(struct net_device *dev, int ioaddr)
@@ -176,7 +180,7 @@
 	int mem_start;
 	static unsigned version_printed;
 
-	if (!request_region(ioaddr, HP_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, HP_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	/* Check for the HP+ signature, 50 48 0x 53. */
--- diff/drivers/net/hp.c	2004-05-19 22:11:54.000000000 +0100
+++ source/drivers/net/hp.c	2004-07-01 21:32:38.000000000 +0100
@@ -37,6 +37,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "hp"
+
 /* A zero-terminated list of I/O addresses to be probed. */
 static unsigned int hppclan_portlist[] __initdata =
 { 0x300, 0x320, 0x340, 0x280, 0x2C0, 0x200, 0x240, 0};
@@ -106,6 +108,7 @@
 	release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init hp_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -130,6 +133,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init hp_probe1(struct net_device *dev, int ioaddr)
 {
@@ -137,7 +141,7 @@
 	const char *name;
 	static unsigned version_printed;
 
-	if (!request_region(ioaddr, HP_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, HP_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	/* Check for the HP physical address, 08 00 09 xx xx xx. */
@@ -182,7 +186,7 @@
 				outb_p(irqmap[irq] | HP_RUN, ioaddr + HP_CONFIGURE);
 				outb_p( 0x00 | HP_RUN, ioaddr + HP_CONFIGURE);
 				if (irq == probe_irq_off(cookie)		 /* It's a good IRQ line! */
-					&& request_irq (irq, ei_interrupt, 0, dev->name, dev) == 0) {
+					&& request_irq (irq, ei_interrupt, 0, DRV_NAME, dev) == 0) {
 					printk(" selecting IRQ %d.\n", irq);
 					dev->irq = *irqp;
 					break;
@@ -197,7 +201,7 @@
 	} else {
 		if (dev->irq == 2)
 			dev->irq = 9;
-		if ((retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev))) {
+		if ((retval = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev))) {
 			printk (" unable to get IRQ %d.\n", dev->irq);
 			goto out;
 		}
--- diff/drivers/net/hp100.c	2004-05-19 22:11:54.000000000 +0100
+++ source/drivers/net/hp100.c	2004-07-01 21:32:38.000000000 +0100
@@ -386,6 +386,7 @@
 }
 
 
+#ifndef MODULE
 struct net_device * __init hp100_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private));
@@ -420,6 +421,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init hp100_probe1(struct net_device *dev, int ioaddr,
 			       u_char bus, struct pci_dev *pci_dev)
--- diff/drivers/net/ibmlana.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/ibmlana.c	2004-07-01 21:32:38.000000000 +0100
@@ -98,6 +98,8 @@
 
 #undef DEBUG
 
+#define DRV_NAME "ibmlana"
+
 /* ------------------------------------------------------------------------
  * global static data - not more since we can handle multiple boards and
  * have to pack all state info into the device struct!
@@ -952,8 +954,8 @@
 	printk(KERN_INFO "%s: IBM LAN Adapter/A found in slot %d\n", dev->name, slot + 1);
 
 	/* try to obtain I/O range */
-	if (!request_region(iobase, IBM_LANA_IORANGE, dev->name)) {
-		printk(KERN_ERR "%s: cannot allocate I/O range at %#x!\n", dev->name, iobase);
+	if (!request_region(iobase, IBM_LANA_IORANGE, DRV_NAME)) {
+		printk(KERN_ERR "%s: cannot allocate I/O range at %#x!\n", DRV_NAME, iobase);
 		startslot = slot + 1;
 		return -EBUSY;
 	}
--- diff/drivers/net/irda/ali-ircc.c	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/irda/ali-ircc.c	2004-07-01 21:32:38.000000000 +0100
@@ -33,6 +33,7 @@
 #include <linux/init.h>
 #include <linux/rtnetlink.h>
 #include <linux/serial_reg.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>
@@ -304,16 +305,18 @@
 	self->tx_buff.truesize = 14384;
 
 	/* Allocate memory if needed */
-	self->rx_buff.head = (__u8 *) kmalloc(self->rx_buff.truesize,
-					      GFP_KERNEL |GFP_DMA); 
+	self->rx_buff.head =
+		dma_alloc_coherent(NULL, self->rx_buff.truesize,
+				   &self->rx_buff_dma, GFP_KERNEL);
 	if (self->rx_buff.head == NULL) {
 		err = -ENOMEM;
 		goto err_out2;
 	}
 	memset(self->rx_buff.head, 0, self->rx_buff.truesize);
 	
-	self->tx_buff.head = (__u8 *) kmalloc(self->tx_buff.truesize, 
-					      GFP_KERNEL|GFP_DMA); 
+	self->tx_buff.head =
+		dma_alloc_coherent(NULL, self->tx_buff.truesize,
+				   &self->tx_buff_dma, GFP_KERNEL);
 	if (self->tx_buff.head == NULL) {
 		err = -ENOMEM;
 		goto err_out3;
@@ -362,9 +365,11 @@
 	return 0;
 
  err_out4:
-	kfree(self->tx_buff.head);
+	dma_free_coherent(NULL, self->tx_buff.truesize,
+			  self->tx_buff.head, self->tx_buff_dma);
  err_out3:
-	kfree(self->rx_buff.head);
+	dma_free_coherent(NULL, self->rx_buff.truesize,
+			  self->rx_buff.head, self->rx_buff_dma);
  err_out2:
 	release_region(self->io.fir_base, self->io.fir_ext);
  err_out1:
@@ -398,10 +403,12 @@
 	release_region(self->io.fir_base, self->io.fir_ext);
 
 	if (self->tx_buff.head)
-		kfree(self->tx_buff.head);
+		dma_free_coherent(NULL, self->tx_buff.truesize,
+				  self->tx_buff.head, self->tx_buff_dma);
 	
 	if (self->rx_buff.head)
-		kfree(self->rx_buff.head);
+		dma_free_coherent(NULL, self->rx_buff.truesize,
+				  self->rx_buff.head, self->rx_buff_dma);
 
 	dev_self[self->index] = NULL;
 	free_netdev(self->netdev);
@@ -1572,7 +1579,8 @@
 	self->io.direction = IO_XMIT;
 	
 	irda_setup_dma(self->io.dma, 
-		       self->tx_fifo.queue[self->tx_fifo.ptr].start, 
+		       ((u8 *)self->tx_fifo.queue[self->tx_fifo.ptr].start -
+			self->tx_buff.head) + self->tx_buff_dma,
 		       self->tx_fifo.queue[self->tx_fifo.ptr].len, 
 		       DMA_TX_MODE);
 		
@@ -1724,8 +1732,8 @@
 	self->st_fifo.len = self->st_fifo.pending_bytes = 0;
 	self->st_fifo.tail = self->st_fifo.head = 0;
 		
-	irda_setup_dma(self->io.dma, self->rx_buff.data, 
-		       self->rx_buff.truesize, DMA_RX_MODE);	
+	irda_setup_dma(self->io.dma, self->rx_buff_dma, self->rx_buff.truesize,
+		       DMA_RX_MODE);
 	 
 	/* Set Receive Mode,Brick Wall */
 	//switch_bank(iobase, BANK0);
--- diff/drivers/net/irda/ali-ircc.h	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/irda/ali-ircc.h	2004-07-01 21:32:38.000000000 +0100
@@ -26,6 +26,7 @@
 
 #include <linux/spinlock.h>
 #include <linux/pm.h>
+#include <linux/types.h>
 #include <asm/io.h>
 
 /* SIR Register */
@@ -198,6 +199,8 @@
 	chipio_t io;               /* IrDA controller information */
 	iobuff_t tx_buff;          /* Transmit buffer */
 	iobuff_t rx_buff;          /* Receive buffer */
+	dma_addr_t tx_buff_dma;
+	dma_addr_t rx_buff_dma;
 
 	__u8 ier;                  /* Interrupt enable register */
 	
--- diff/drivers/net/irda/irtty-sir.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/irda/irtty-sir.c	2004-07-01 21:32:38.000000000 +0100
@@ -438,7 +438,6 @@
 	struct irtty_info { char name[6]; } info;
 	struct sir_dev *dev;
 	struct sirtty_cb *priv = tty->disc_data;
-	int size = _IOC_SIZE(cmd);
 	int err = 0;
 
 	ASSERT(priv != NULL, return -ENODEV;);
@@ -449,13 +448,6 @@
 	dev = priv->dev;
 	ASSERT(dev != NULL, return -1;);
 
-	if (_IOC_DIR(cmd) & _IOC_READ)
-		err = verify_area(VERIFY_WRITE, (void *) arg, size);
-	else if (_IOC_DIR(cmd) & _IOC_WRITE)
-		err = verify_area(VERIFY_READ, (void *) arg, size);
-	if (err)
-		return err;
-	
 	switch (cmd) {
 	case TCGETS:
 	case TCGETA:
@@ -473,7 +465,7 @@
 		memset(&info, 0, sizeof(info)); 
 		strncpy(info.name, dev->netdev->name, sizeof(info.name)-1);
 
-		if (copy_to_user((void *)arg, &info, sizeof(info)))
+		if (copy_to_user((void __user *)arg, &info, sizeof(info)))
 			err = -EFAULT;
 		break;
 	default:
--- diff/drivers/net/irda/nsc-ircc.c	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/irda/nsc-ircc.c	2004-07-01 21:32:38.000000000 +0100
@@ -52,6 +52,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/rtnetlink.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>
@@ -307,8 +308,9 @@
 	self->tx_buff.truesize = 14384;
 
 	/* Allocate memory if needed */
-	self->rx_buff.head = (__u8 *) kmalloc(self->rx_buff.truesize,
-					      GFP_KERNEL|GFP_DMA);
+	self->rx_buff.head =
+		dma_alloc_coherent(NULL, self->rx_buff.truesize,
+				   &self->rx_buff_dma, GFP_KERNEL);
 	if (self->rx_buff.head == NULL) {
 		err = -ENOMEM;
 		goto out2;
@@ -316,8 +318,9 @@
 	}
 	memset(self->rx_buff.head, 0, self->rx_buff.truesize);
 	
-	self->tx_buff.head = (__u8 *) kmalloc(self->tx_buff.truesize, 
-					      GFP_KERNEL|GFP_DMA);
+	self->tx_buff.head =
+		dma_alloc_coherent(NULL, self->tx_buff.truesize,
+				   &self->tx_buff_dma, GFP_KERNEL);
 	if (self->tx_buff.head == NULL) {
 		err = -ENOMEM;
 		goto out3;
@@ -368,9 +371,11 @@
 
 	return 0;
  out4:
-	kfree(self->tx_buff.head);
+	dma_free_coherent(NULL, self->tx_buff.truesize,
+			  self->tx_buff.head, self->tx_buff_dma);
  out3:
-	kfree(self->rx_buff.head);
+	dma_free_coherent(NULL, self->rx_buff.truesize,
+			  self->rx_buff.head, self->rx_buff_dma);
  out2:
 	release_region(self->io.fir_base, self->io.fir_ext);
  out1:
@@ -404,10 +409,12 @@
 	release_region(self->io.fir_base, self->io.fir_ext);
 
 	if (self->tx_buff.head)
-		kfree(self->tx_buff.head);
+		dma_free_coherent(NULL, self->tx_buff.truesize,
+				  self->tx_buff.head, self->tx_buff_dma);
 	
 	if (self->rx_buff.head)
-		kfree(self->rx_buff.head);
+		dma_free_coherent(NULL, self->rx_buff.truesize,
+				  self->rx_buff.head, self->rx_buff_dma);
 
 	dev_self[self->index] = NULL;
 	free_netdev(self->netdev);
@@ -1409,7 +1416,8 @@
 	outb(ECR1_DMASWP|ECR1_DMANF|ECR1_EXT_SL, iobase+ECR1);
 	
 	irda_setup_dma(self->io.dma, 
-		       self->tx_fifo.queue[self->tx_fifo.ptr].start, 
+		       ((u8 *)self->tx_fifo.queue[self->tx_fifo.ptr].start -
+			self->tx_buff.head) + self->tx_buff_dma,
 		       self->tx_fifo.queue[self->tx_fifo.ptr].len, 
 		       DMA_TX_MODE);
 
@@ -1566,8 +1574,8 @@
 	self->st_fifo.len = self->st_fifo.pending_bytes = 0;
 	self->st_fifo.tail = self->st_fifo.head = 0;
 	
-	irda_setup_dma(self->io.dma, self->rx_buff.data, 
-		       self->rx_buff.truesize, DMA_RX_MODE);
+	irda_setup_dma(self->io.dma, self->rx_buff_dma, self->rx_buff.truesize,
+		       DMA_RX_MODE);
 
 	/* Enable DMA */
 	switch_bank(iobase, BANK0);
--- diff/drivers/net/irda/nsc-ircc.h	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/irda/nsc-ircc.h	2004-07-01 21:32:38.000000000 +0100
@@ -32,6 +32,7 @@
 
 #include <linux/spinlock.h>
 #include <linux/pm.h>
+#include <linux/types.h>
 #include <asm/io.h>
 
 /* DMA modes needed */
@@ -255,6 +256,8 @@
 	chipio_t io;               /* IrDA controller information */
 	iobuff_t tx_buff;          /* Transmit buffer */
 	iobuff_t rx_buff;          /* Receive buffer */
+	dma_addr_t tx_buff_dma;
+	dma_addr_t rx_buff_dma;
 
 	__u8 ier;                  /* Interrupt enable register */
 
--- diff/drivers/net/irda/smsc-ircc2.c	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/irda/smsc-ircc2.c	2004-07-01 21:32:38.000000000 +0100
@@ -52,6 +52,7 @@
 #include <linux/init.h>
 #include <linux/rtnetlink.h>
 #include <linux/serial_reg.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>
@@ -112,6 +113,8 @@
 	chipio_t io;               /* IrDA controller information */
 	iobuff_t tx_buff;          /* Transmit buffer */
 	iobuff_t rx_buff;          /* Receive buffer */
+	dma_addr_t tx_buff_dma;
+	dma_addr_t rx_buff_dma;
 
 	struct qos_info qos;       /* QoS capabilities for this device */
 
@@ -413,16 +416,18 @@
 	self->rx_buff.truesize = SMSC_IRCC2_RX_BUFF_TRUESIZE; 
 	self->tx_buff.truesize = SMSC_IRCC2_TX_BUFF_TRUESIZE;
 
-	self->rx_buff.head = (u8 *) kmalloc(self->rx_buff.truesize,
-					      GFP_KERNEL|GFP_DMA);
+	self->rx_buff.head =
+		dma_alloc_coherent(NULL, self->rx_buff.truesize,
+				   &self->rx_buff_dma, GFP_KERNEL);
 	if (self->rx_buff.head == NULL) {
 		ERROR("%s, Can't allocate memory for receive buffer!\n",
                       driver_name);
 		goto err_out2;
 	}
 
-	self->tx_buff.head = (u8 *) kmalloc(self->tx_buff.truesize, 
-					      GFP_KERNEL|GFP_DMA);
+	self->tx_buff.head =
+		dma_alloc_coherent(NULL, self->tx_buff.truesize,
+				   &self->tx_buff_dma, GFP_KERNEL);
 	if (self->tx_buff.head == NULL) {
 		ERROR("%s, Can't allocate memory for transmit buffer!\n",
                       driver_name);
@@ -464,9 +469,11 @@
 
 	return 0;
  err_out4:
-	kfree(self->tx_buff.head);
+	dma_free_coherent(NULL, self->tx_buff.truesize,
+			  self->tx_buff.head, self->tx_buff_dma);
  err_out3:
-	kfree(self->rx_buff.head);
+	dma_free_coherent(NULL, self->rx_buff.truesize,
+			  self->rx_buff.head, self->rx_buff_dma);
  err_out2:
 	free_netdev(self->netdev);
 	dev_self[--dev_count] = NULL;
@@ -1159,7 +1166,7 @@
 	     IRCC_CFGB_DMA_BURST, iobase+IRCC_SCE_CFGB);
 
 	/* Setup DMA controller (must be done after enabling chip DMA) */
-	irda_setup_dma(self->io.dma, self->tx_buff.data, self->tx_buff.len, 
+	irda_setup_dma(self->io.dma, self->tx_buff_dma, self->tx_buff.len,
 		       DMA_TX_MODE);
 
 	/* Enable interrupt */
@@ -1249,8 +1256,8 @@
 	outb(2050 & 0xff, iobase+IRCC_RX_SIZE_LO);
 
 	/* Setup DMA controller */
-	irda_setup_dma(self->io.dma, self->rx_buff.data,
-		       self->rx_buff.truesize, DMA_RX_MODE);
+	irda_setup_dma(self->io.dma, self->rx_buff_dma, self->rx_buff.truesize,
+		       DMA_RX_MODE);
 
 	/* Enable burst mode chip Rx DMA */
 	register_bank(iobase, 1);
@@ -1717,10 +1724,12 @@
 	release_region(self->io.sir_base, self->io.sir_ext);
 
 	if (self->tx_buff.head)
-		kfree(self->tx_buff.head);
+		dma_free_coherent(NULL, self->tx_buff.truesize,
+				  self->tx_buff.head, self->tx_buff_dma);
 	
 	if (self->rx_buff.head)
-		kfree(self->rx_buff.head);
+		dma_free_coherent(NULL, self->rx_buff.truesize,
+				  self->rx_buff.head, self->rx_buff_dma);
 
 	free_netdev(self->netdev);
 
--- diff/drivers/net/irda/via-ircc.c	2004-05-19 22:11:57.000000000 +0100
+++ source/drivers/net/irda/via-ircc.c	2004-07-01 21:32:38.000000000 +0100
@@ -39,6 +39,7 @@
 #include <linux/init.h>
 #include <linux/rtnetlink.h>
 #include <linux/pci.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>
@@ -383,7 +384,8 @@
 
 	/* Allocate memory if needed */
 	self->rx_buff.head =
-	    (__u8 *) kmalloc(self->rx_buff.truesize, GFP_KERNEL | GFP_DMA);
+		dma_alloc_coherent(NULL, self->rx_buff.truesize,
+				   &self->rx_buff_dma, GFP_KERNEL);
 	if (self->rx_buff.head == NULL) {
 		err = -ENOMEM;
 		goto err_out2;
@@ -391,7 +393,8 @@
 	memset(self->rx_buff.head, 0, self->rx_buff.truesize);
 
 	self->tx_buff.head =
-	    (__u8 *) kmalloc(self->tx_buff.truesize, GFP_KERNEL | GFP_DMA);
+		dma_alloc_coherent(NULL, self->tx_buff.truesize,
+				   &self->tx_buff_dma, GFP_KERNEL);
 	if (self->tx_buff.head == NULL) {
 		err = -ENOMEM;
 		goto err_out3;
@@ -432,9 +435,11 @@
 
 	return 0;
  err_out4:
-	kfree(self->tx_buff.head);
+	dma_free_coherent(NULL, self->tx_buff.truesize,
+			  self->tx_buff.head, self->tx_buff_dma);
  err_out3:
-	kfree(self->rx_buff.head);
+	dma_free_coherent(NULL, self->rx_buff.truesize,
+			  self->rx_buff.head, self->rx_buff_dma);
  err_out2:
 	release_region(self->io.fir_base, self->io.fir_ext);
  err_out1:
@@ -468,9 +473,11 @@
 		   __FUNCTION__, self->io.fir_base);
 	release_region(self->io.fir_base, self->io.fir_ext);
 	if (self->tx_buff.head)
-		kfree(self->tx_buff.head);
+		dma_free_coherent(NULL, self->tx_buff.truesize,
+				  self->tx_buff.head, self->tx_buff_dma);
 	if (self->rx_buff.head)
-		kfree(self->rx_buff.head);
+		dma_free_coherent(NULL, self->rx_buff.truesize,
+				  self->rx_buff.head, self->rx_buff_dma);
 	dev_self[self->index] = NULL;
 
 	free_netdev(self->netdev);
@@ -816,7 +823,7 @@
 	EnTXDMA(iobase, ON);
 	EnRXDMA(iobase, OFF);
 
-	irda_setup_dma(self->io.dma, self->tx_buff.data, self->tx_buff.len,
+	irda_setup_dma(self->io.dma, self->tx_buff_dma, self->tx_buff.len,
 		       DMA_TX_MODE);
 
 	SetSendByte(iobase, self->tx_buff.len);
@@ -897,7 +904,8 @@
 	EnTXDMA(iobase, ON);
 	EnRXDMA(iobase, OFF);
 	irda_setup_dma(self->io.dma,
-		       self->tx_fifo.queue[self->tx_fifo.ptr].start,
+		       ((u8 *)self->tx_fifo.queue[self->tx_fifo.ptr].start -
+			self->tx_buff.head) + self->tx_buff_dma,
 		       self->tx_fifo.queue[self->tx_fifo.ptr].len, DMA_TX_MODE);
 #ifdef	DBGMSG
 	DBG(printk
@@ -1022,8 +1030,8 @@
 	EnAllInt(iobase, ON);
 	EnTXDMA(iobase, OFF);
 	EnRXDMA(iobase, ON);
-	irda_setup_dma(self->io.dma2, self->rx_buff.data,
-		       self->rx_buff.truesize, DMA_RX_MODE);
+	irda_setup_dma(self->io.dma2, self->rx_buff_dma,
+		  self->rx_buff.truesize, DMA_RX_MODE);
 	TXStart(iobase, OFF);
 	RXStart(iobase, ON);
 
--- diff/drivers/net/irda/via-ircc.h	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/irda/via-ircc.h	2004-07-01 21:32:38.000000000 +0100
@@ -33,6 +33,7 @@
 #include <linux/time.h>
 #include <linux/spinlock.h>
 #include <linux/pm.h>
+#include <linux/types.h>
 #include <asm/io.h>
 
 #define MAX_TX_WINDOW 7
@@ -102,6 +103,8 @@
 	chipio_t io;		/* IrDA controller information */
 	iobuff_t tx_buff;	/* Transmit buffer */
 	iobuff_t rx_buff;	/* Receive buffer */
+	dma_addr_t tx_buff_dma;
+	dma_addr_t rx_buff_dma;
 
 	__u8 ier;		/* Interrupt enable register */
 
--- diff/drivers/net/irda/w83977af_ir.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/irda/w83977af_ir.c	2004-07-01 21:32:38.000000000 +0100
@@ -50,6 +50,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/rtnetlink.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>
@@ -207,8 +208,9 @@
 	self->tx_buff.truesize = 4000;
 	
 	/* Allocate memory if needed */
-	self->rx_buff.head = (__u8 *) kmalloc(self->rx_buff.truesize,
-					      GFP_KERNEL|GFP_DMA);
+	self->rx_buff.head =
+		dma_alloc_coherent(NULL, self->rx_buff.truesize,
+				   &self->rx_buff_dma, GFP_KERNEL);
 	if (self->rx_buff.head == NULL) {
 		err = -ENOMEM;
 		goto err_out1;
@@ -216,8 +218,9 @@
 
 	memset(self->rx_buff.head, 0, self->rx_buff.truesize);
 	
-	self->tx_buff.head = (__u8 *) kmalloc(self->tx_buff.truesize, 
-					      GFP_KERNEL|GFP_DMA);
+	self->tx_buff.head =
+		dma_alloc_coherent(NULL, self->tx_buff.truesize,
+				   &self->tx_buff_dma, GFP_KERNEL);
 	if (self->tx_buff.head == NULL) {
 		err = -ENOMEM;
 		goto err_out2;
@@ -252,9 +255,11 @@
 	
 	return 0;
 err_out3:
-	kfree(self->tx_buff.head);
+	dma_free_coherent(NULL, self->tx_buff.truesize,
+			  self->tx_buff.head, self->tx_buff_dma);
 err_out2:	
-	kfree(self->rx_buff.head);
+	dma_free_coherent(NULL, self->rx_buff.truesize,
+			  self->rx_buff.head, self->rx_buff_dma);
 err_out1:
 	free_netdev(dev);
 err_out:
@@ -297,10 +302,12 @@
 	release_region(self->io.fir_base, self->io.fir_ext);
 
 	if (self->tx_buff.head)
-		kfree(self->tx_buff.head);
+		dma_free_coherent(NULL, self->tx_buff.truesize,
+				  self->tx_buff.head, self->tx_buff_dma);
 	
 	if (self->rx_buff.head)
-		kfree(self->rx_buff.head);
+		dma_free_coherent(NULL, self->rx_buff.truesize,
+				  self->rx_buff.head, self->rx_buff_dma);
 
 	free_netdev(self->netdev);
 
@@ -606,10 +613,10 @@
 	disable_dma(self->io.dma);
 	clear_dma_ff(self->io.dma);
 	set_dma_mode(self->io.dma, DMA_MODE_READ);
-	set_dma_addr(self->io.dma, isa_virt_to_bus(self->tx_buff.data));
+	set_dma_addr(self->io.dma, self->tx_buff_dma);
 	set_dma_count(self->io.dma, self->tx_buff.len);
 #else
-	irda_setup_dma(self->io.dma, self->tx_buff.data, self->tx_buff.len, 
+	irda_setup_dma(self->io.dma, self->tx_buff_dma, self->tx_buff.len,
 		       DMA_MODE_WRITE);	
 #endif
 	self->io.direction = IO_XMIT;
@@ -763,10 +770,10 @@
 	disable_dma(self->io.dma);
 	clear_dma_ff(self->io.dma);
 	set_dma_mode(self->io.dma, DMA_MODE_READ);
-	set_dma_addr(self->io.dma, isa_virt_to_bus(self->rx_buff.data));
+	set_dma_addr(self->io.dma, self->rx_buff_dma);
 	set_dma_count(self->io.dma, self->rx_buff.truesize);
 #else
-	irda_setup_dma(self->io.dma, self->rx_buff.data, self->rx_buff.truesize, 
+	irda_setup_dma(self->io.dma, self->rx_buff_dma, self->rx_buff.truesize,
 		       DMA_MODE_READ);
 #endif
 	/* 
--- diff/drivers/net/irda/w83977af_ir.h	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/irda/w83977af_ir.h	2004-07-01 21:32:38.000000000 +0100
@@ -26,6 +26,7 @@
 #define W83977AF_IR_H
 
 #include <asm/io.h>
+#include <linux/types.h>
 
 /* Flags for configuration register CRF0 */
 #define ENBNKSEL	0x01
@@ -179,6 +180,8 @@
 	chipio_t io;               /* IrDA controller information */
 	iobuff_t tx_buff;          /* Transmit buffer */
 	iobuff_t rx_buff;          /* Receive buffer */
+	dma_addr_t tx_buff_dma;
+	dma_addr_t rx_buff_dma;
 
 	/* Note : currently locking is *very* incomplete, but this
 	 * will get you started. Check in nsc-ircc.c for a proper
--- diff/drivers/net/isa-skeleton.c	2004-05-19 22:11:54.000000000 +0100
+++ source/drivers/net/isa-skeleton.c	2004-07-01 21:32:38.000000000 +0100
@@ -161,6 +161,7 @@
 	release_region(dev->base_addr, NETCARD_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init netcard_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(struct net_local));
@@ -185,6 +186,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 /*
  * This is the real probe routine. Linux has a history of friendly device
--- diff/drivers/net/iseries_veth.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/iseries_veth.c	2004-07-01 21:32:38.000000000 +0100
@@ -81,8 +81,6 @@
 
 #include "iseries_veth.h"
 
-extern struct vio_dev *iSeries_veth_dev;
-
 MODULE_AUTHOR("Kyle Lucke <klucke@us.ibm.com>");
 MODULE_DESCRIPTION("iSeries Virtual ethernet driver");
 MODULE_LICENSE("GPL");
@@ -119,6 +117,7 @@
 	int token;
 	unsigned long in_use;
 	struct sk_buff *skb;
+	struct device *dev;
 };
 
 struct veth_lpar_connection {
@@ -147,6 +146,7 @@
 };
 
 struct veth_port {
+	struct device *dev;
 	struct net_device_stats stats;
 	u64 mac_addr;
 	HvLpIndexMap lpar_map;
@@ -843,7 +843,7 @@
 	spin_unlock_irqrestore(&port->pending_gate, flags);
 }
 
-struct net_device * __init veth_probe_one(int vlan)
+static struct net_device * __init veth_probe_one(int vlan, struct device *vdev)
 {
 	struct net_device *dev;
 	struct veth_port *port;
@@ -869,6 +869,7 @@
 		if (map & (0x8000 >> vlan))
 			port->lpar_map |= (1 << i);
 	}
+	port->dev = vdev;
 
 	dev->dev_addr[0] = 0x02;
 	dev->dev_addr[1] = 0x01;
@@ -893,6 +894,8 @@
 	dev->watchdog_timeo = 2 * (VETH_ACKTIMEOUT * HZ / 1000000);
 	dev->tx_timeout = veth_tx_timeout;
 
+	SET_NETDEV_DEV(dev, vdev);
+
 	rc = register_netdev(dev);
 	if (rc != 0) {
 		veth_printk(KERN_ERR,
@@ -945,7 +948,7 @@
 	}
 
 	dma_length = skb->len;
-	dma_address = vio_map_single(iSeries_veth_dev, skb->data,
+	dma_address = dma_map_single(port->dev, skb->data,
 				     dma_length, DMA_TO_DEVICE);
 
 	if (dma_mapping_error(dma_address))
@@ -954,6 +957,7 @@
 	/* Is it really necessary to check the length and address
 	 * fields of the first entry here? */
 	msg->skb = skb;
+	msg->dev = port->dev;
 	msg->data.addr[0] = dma_address;
 	msg->data.len[0] = dma_length;
 	msg->data.eofmask = 1 << VETH_EOF_SHIFT;
@@ -1059,7 +1063,7 @@
 		dma_address = msg->data.addr[0];
 		dma_length = msg->data.len[0];
 
-		vio_unmap_single(iSeries_veth_dev, dma_address, dma_length,
+		dma_unmap_single(msg->dev, dma_address, dma_length,
 				 DMA_TO_DEVICE);
 
 		if (msg->skb) {
@@ -1327,6 +1331,58 @@
 	spin_unlock_irqrestore(&cnx->lock, flags);
 }
 
+static int veth_remove(struct vio_dev *vdev)
+{
+	int i = vdev->unit_address;
+	struct net_device *dev;
+
+	dev = veth_dev[i];
+	if (dev != NULL) {
+		veth_dev[i] = NULL;
+		unregister_netdev(dev);
+		free_netdev(dev);
+	}
+	return 0;
+}
+
+static int veth_probe(struct vio_dev *vdev, const struct vio_device_id *id)
+{
+	int i = vdev->unit_address;
+	struct net_device *dev;
+
+	dev = veth_probe_one(i, &vdev->dev);
+	if (dev == NULL) {
+		veth_remove(vdev);
+		return 1;
+	}
+	veth_dev[i] = dev;
+
+	/* Start the state machine on each connection, to commence
+	 * link negotiation */
+	for (i = 0; i < HVMAXARCHITECTEDLPS; i++)
+		if (veth_cnx[i])
+			veth_kick_statemachine(veth_cnx[i]);
+
+	return 0;
+}
+
+/**
+ * veth_device_table: Used by vio.c to match devices that we
+ * support.
+ */
+static struct vio_device_id veth_device_table[] __devinitdata = {
+	{ "vlan", "" },
+	{ NULL, NULL }
+};
+MODULE_DEVICE_TABLE(vio, veth_device_table);
+
+static struct vio_driver veth_driver = {
+	.name = "iseries_veth",
+	.id_table = veth_device_table,
+	.probe = veth_probe,
+	.remove = veth_remove
+};
+
 /*
  * Module initialization/cleanup
  */
@@ -1335,27 +1391,17 @@
 {
 	int i;
 
+	vio_unregister_driver(&veth_driver);
+
 	for (i = 0; i < HVMAXARCHITECTEDLPS; ++i)
 		veth_destroy_connection(i);
 
 	HvLpEvent_unregisterHandler(HvLpEvent_Type_VirtualLan);
-
-	for (i = 0; i < HVMAXARCHITECTEDVIRTUALLANS; ++i) {
-		struct net_device *dev = veth_dev[i];
-
-		if (! dev)
-			continue;
-
-		veth_dev[i] = NULL;
-		unregister_netdev(dev);
-		free_netdev(dev);
-	}
 }
 module_exit(veth_module_cleanup);
 
 int __init veth_module_init(void)
 {
-	HvLpIndexMap vlan_map = HvLpConfig_getVirtualLanIndexMap();
 	int i;
 	int rc;
 
@@ -1369,31 +1415,9 @@
 		}
 	}
 
-	for (i = 0; i < HVMAXARCHITECTEDVIRTUALLANS; ++i) {
-		struct net_device *dev;
-
-		if (! (vlan_map & (0x8000 >> i)))
-			continue;
-
-		dev = veth_probe_one(i);
-
-		if (! dev) {
-			veth_module_cleanup();
-			return rc;
-		}
-
-		veth_dev[i] = dev;
-	}
-
 	HvLpEvent_registerHandler(HvLpEvent_Type_VirtualLan,
 				  &veth_handle_event);
 
-	/* Start the state machine on each connection, to commence
-	 * link negotiation */
-	for (i = 0; i < HVMAXARCHITECTEDLPS; i++)
-		if (veth_cnx[i])
-			veth_kick_statemachine(veth_cnx[i]);
-
-	return 0;
+	return vio_register_driver(&veth_driver);
 }
 module_init(veth_module_init);
--- diff/drivers/net/iseries_veth.h	2004-05-19 22:11:54.000000000 +0100
+++ source/drivers/net/iseries_veth.h	2004-07-01 21:32:38.000000000 +0100
@@ -43,6 +43,4 @@
 
 };
 
-#define HVMAXARCHITECTEDVIRTUALLANS (16)
-
 #endif	/* _ISERIES_VETH_H */
--- diff/drivers/net/ixgb/ixgb_main.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/ixgb/ixgb_main.c	2004-07-01 21:32:38.000000000 +0100
@@ -1876,7 +1876,6 @@
 	struct ixgb_rx_desc *rx_desc;
 	struct ixgb_buffer *buffer_info;
 	struct sk_buff *skb;
-	int reserve_len = 2;
 	unsigned int i;
 	int num_group_tail_writes;
 	long cleancount;
@@ -1895,7 +1894,7 @@
 	while (--cleancount > 0) {
 		rx_desc = IXGB_RX_DESC(*rx_ring, i);
 
-		skb = dev_alloc_skb(adapter->rx_buffer_len + reserve_len);
+		skb = dev_alloc_skb(adapter->rx_buffer_len + NET_IP_ALIGN);
 
 		if (unlikely(!skb)) {
 			/* Better luck next round */
@@ -1906,7 +1905,7 @@
 		 * this will result in a 16 byte aligned IP header after
 		 * the 14 byte MAC header is removed
 		 */
-		skb_reserve(skb, reserve_len);
+		skb_reserve(skb, NET_IP_ALIGN);
 
 		skb->dev = netdev;
 
--- diff/drivers/net/jazzsonic.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/jazzsonic.c	2004-07-01 21:32:38.000000000 +0100
@@ -37,6 +37,8 @@
 #include <asm/jazz.h>
 #include <asm/jazzdma.h>
 
+#define DRV_NAME "jazzsonic"
+
 #define SREGS_PAD(n)    u16 n;
 
 #include "sonic.h"
@@ -151,7 +153,7 @@
 	int err = -ENODEV;
 	int i;
 
-	if (!request_region(base_addr, 0x100, dev->name))
+	if (!request_region(base_addr, 0x100, DRV_NAME))
 		return -EBUSY;
 	/*
 	 * get the Silicon Revision ID. If this is one of the known
--- diff/drivers/net/lance.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/lance.c	2004-07-01 21:32:38.000000000 +0100
@@ -432,6 +432,7 @@
 	return -ENODEV;
 }
 
+#ifndef MODULE
 struct net_device * __init lance_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(0);
@@ -456,6 +457,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int options)
 {
--- diff/drivers/net/lasi_82596.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/lasi_82596.c	2004-07-01 21:32:38.000000000 +0100
@@ -87,7 +87,6 @@
 #include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/pgtable.h>
-#include <asm/pgalloc.h>
 #include <asm/irq.h>
 #include <asm/pdc.h>
 #include <asm/cache.h>
--- diff/drivers/net/lne390.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/lne390.c	2004-07-01 21:32:38.000000000 +0100
@@ -49,6 +49,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "lne390"
+
 static int lne390_probe1(struct net_device *dev, int ioaddr);
 
 static int lne390_open(struct net_device *dev);
@@ -112,7 +114,7 @@
 	SET_MODULE_OWNER(dev);
 
 	if (ioaddr > 0x1ff) {		/* Check a single specified location. */
-		if (!request_region(ioaddr, LNE390_IO_EXTENT, dev->name))
+		if (!request_region(ioaddr, LNE390_IO_EXTENT, DRV_NAME))
 			return -EBUSY;
 		ret = lne390_probe1(dev, ioaddr);
 		if (ret)
@@ -131,7 +133,7 @@
 
 	/* EISA spec allows for up to 16 slots, but 8 is typical. */
 	for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000) {
-		if (!request_region(ioaddr, LNE390_IO_EXTENT, dev->name))
+		if (!request_region(ioaddr, LNE390_IO_EXTENT, DRV_NAME))
 			continue;
 		if (lne390_probe1(dev, ioaddr) == 0)
 			return 0;
@@ -151,6 +153,7 @@
 		iounmap((void *)dev->mem_start);
 }
 
+#ifndef MODULE
 struct net_device * __init lne390_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -175,6 +178,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init lne390_probe1(struct net_device *dev, int ioaddr)
 {
@@ -228,7 +232,7 @@
 	}
 	printk(" IRQ %d,", dev->irq);
 
-	if ((ret = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev))) {
+	if ((ret = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev))) {
 		printk (" unable to get IRQ %d.\n", dev->irq);
 		return ret;
 	}
--- diff/drivers/net/loopback.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/loopback.c	2004-07-01 21:32:38.000000000 +0100
@@ -55,7 +55,9 @@
 #include <linux/if_arp.h>	/* For ARPHRD_ETHER */
 #include <linux/ip.h>
 #include <linux/tcp.h>
+#include <linux/percpu.h>
 
+static DEFINE_PER_CPU(struct net_device_stats, loopback_stats);
 
 #define LOOPBACK_OVERHEAD (128 + MAX_HEADER + 16 + 16)
 
@@ -123,7 +125,7 @@
  */
 static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-	struct net_device_stats *stats = dev->priv;
+	struct net_device_stats *lb_stats;
 
 	skb_orphan(skb);
 
@@ -142,12 +144,13 @@
 	}
 
 	dev->last_rx = jiffies;
-	if (likely(stats)) {
-		stats->rx_bytes+=skb->len;
-		stats->tx_bytes+=skb->len;
-		stats->rx_packets++;
-		stats->tx_packets++;
-	}
+
+	lb_stats = &per_cpu(loopback_stats, get_cpu());
+	lb_stats->rx_bytes += skb->len;
+	lb_stats->tx_bytes += skb->len;
+	lb_stats->rx_packets++;
+	lb_stats->tx_packets++;
+	put_cpu();
 
 	netif_rx(skb);
 
@@ -156,7 +159,28 @@
 
 static struct net_device_stats *get_stats(struct net_device *dev)
 {
-	return (struct net_device_stats *)dev->priv;
+	struct net_device_stats *stats = dev->priv;
+	int i;
+
+	if (!stats) {
+		return NULL;
+	}
+
+	memset(stats, 0, sizeof(struct net_device_stats));
+
+	for (i=0; i < NR_CPUS; i++) {
+		struct net_device_stats *lb_stats;
+
+		if (!cpu_possible(i)) 
+			continue;
+		lb_stats = &per_cpu(loopback_stats, i);
+		stats->rx_bytes   += lb_stats->rx_bytes;
+		stats->tx_bytes   += lb_stats->tx_bytes;
+		stats->rx_packets += lb_stats->rx_packets;
+		stats->tx_packets += lb_stats->tx_packets;
+	}
+				
+	return stats;
 }
 
 struct net_device loopback_dev = {
@@ -173,7 +197,8 @@
 	.rebuild_header		= eth_rebuild_header,
 	.flags			= IFF_LOOPBACK,
 	.features 		= NETIF_F_SG|NETIF_F_FRAGLIST
-				  |NETIF_F_NO_CSUM|NETIF_F_HIGHDMA,
+				  |NETIF_F_NO_CSUM|NETIF_F_HIGHDMA
+				  |NETIF_F_LLTX,
 };
 
 /* Setup and register the of the LOOPBACK device. */
--- diff/drivers/net/lp486e.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/lp486e.c	2004-07-01 21:32:38.000000000 +0100
@@ -75,6 +75,8 @@
 #include <asm/io.h>
 #include <asm/dma.h>
 
+#define DRV_NAME "lp486e"
+
 /* debug print flags */
 #define LOG_SRCDST    0x80000000
 #define LOG_STATINT   0x40000000
@@ -970,7 +972,7 @@
 		return -ENODEV;
 	probed++;
 
-	if (!request_region(IOADDR, LP486E_TOTAL_SIZE, dev->name)) {
+	if (!request_region(IOADDR, LP486E_TOTAL_SIZE, DRV_NAME)) {
 		printk(KERN_ERR "lp486e: IO address 0x%x in use\n", IOADDR);
 		return -EBUSY;
 	}
--- diff/drivers/net/macsonic.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/macsonic.c	2004-07-01 21:32:38.000000000 +0100
@@ -53,7 +53,6 @@
 #include <asm/macintosh.h>
 #include <asm/macints.h>
 #include <asm/mac_via.h>
-#include <asm/pgalloc.h>
 
 #define SREGS_PAD(n)    u16 n;
 
@@ -613,7 +612,6 @@
 
 MODULE_PARM(sonic_debug, "i");
 MODULE_PARM_DESC(sonic_debug, "macsonic debug level (1-4)");
-MODULE_LICENSE("GPL");
 
 int
 init_module(void)
--- diff/drivers/net/natsemi.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/natsemi.c	2004-07-01 21:32:38.000000000 +0100
@@ -360,6 +360,18 @@
 #define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_MEM | PCI_ADDR1)
 
 
+/*
+ * Support for fibre connections on Am79C874:
+ * This phy needs a special setup when connected to a fibre cable.
+ * http://www.amd.com/files/connectivitysolutions/networking/archivednetworking/22235.pdf
+ */
+#define PHYID_AM79C874	0x0022561b
+
+#define MII_MCTRL	0x15	/* mode control register */
+#define MII_FX_SEL	0x0001	/* 100BASE-FX (fiber) */
+#define MII_EN_SCRM	0x0004	/* enable scrambler (tp) */
+
+ 
 /* array of board data directly indexed by pci_tbl[x].driver_data */
 static struct {
 	const char *name;
@@ -463,6 +475,9 @@
 	EE_DataIn		= 0x01,
 	EE_ChipSelect		= 0x08,
 	EE_DataOut		= 0x02,
+	MII_Data 		= 0x10,
+	MII_Write		= 0x20,
+	MII_ShiftClk		= 0x40,
 };
 
 enum PCIBusCfg_bits {
@@ -594,9 +609,12 @@
 };
 
 enum PhyCtrl_bits {
-	PhyAddrMask		= 0xf,
+	PhyAddrMask		= 0x1f,
 };
 
+#define PHY_ADDR_NONE		32
+#define PHY_ADDR_INTERNAL	1
+
 /* values we might find in the silicon revision register */
 #define SRR_DP83815_C	0x0302
 #define SRR_DP83815_D	0x0403
@@ -656,7 +674,9 @@
 	int oom;
 	/* Do not touch the nic registers */
 	int hands_off;
-	/* These values are keep track of the transceiver/media in use */
+	/* external phy that is used: only valid if dev->if_port != PORT_TP */
+	int mii;
+	int phy_addr_external;
 	unsigned int full_duplex;
 	/* Rx filter */
 	u32 cur_rx_mode;
@@ -669,6 +689,10 @@
 	u32 srr;
 	/* expected DSPCFG value */
 	u16 dspcfg;
+	/* parms saved in ethtool format */
+	u16	speed;		/* The forced speed, 10Mb, 100Mb, gigabit */
+	u8	duplex;		/* Duplex, half or full */
+	u8	autoneg;	/* Autonegotiation enabled */
 	/* MII transceiver section */
 	u16 advertising;
 	unsigned int iosize;
@@ -676,9 +700,14 @@
 	u32 msg_enable;
 };
 
+static void move_int_phy(struct net_device *dev, int addr);
 static int eeprom_read(long ioaddr, int location);
-static int mdio_read(struct net_device *dev, int phy_id, int reg);
-static void mdio_write(struct net_device *dev, int phy_id, int reg, u16 data);
+static int mdio_read(struct net_device *dev, int reg);
+static void mdio_write(struct net_device *dev, int reg, u16 data);
+static void init_phy_fixup(struct net_device *dev);
+static int miiport_read(struct net_device *dev, int phy_id, int reg);
+static void miiport_write(struct net_device *dev, int phy_id, int reg, u16 data);
+static int find_mii(struct net_device *dev);
 static void natsemi_reset(struct net_device *dev);
 static void natsemi_reload_eeprom(struct net_device *dev);
 static void natsemi_stop_rxtx(struct net_device *dev);
@@ -718,6 +747,29 @@
 static int netdev_get_regs(struct net_device *dev, u8 *buf);
 static int netdev_get_eeprom(struct net_device *dev, u8 *buf);
 
+static void move_int_phy(struct net_device *dev, int addr)
+{
+	struct netdev_private *np = dev->priv;
+	int target = 31;
+
+	/* 
+	 * The internal phy is visible on the external mii bus. Therefore we must
+	 * move it away before we can send commands to an external phy.
+	 * There are two addresses we must avoid:
+	 * - the address on the external phy that is used for transmission.
+	 * - the address that we want to access. User space can access phys
+	 *   on the mii bus with SIOCGMIIREG/SIOCSMIIREG, independant from the
+	 *   phy that is used for transmission.
+	 */
+
+	if (target == addr)
+		target--;
+	if (target == np->phy_addr_external)
+		target--;
+	writew(target, dev->base_addr + PhyCtrl);
+	readw(dev->base_addr + PhyCtrl);
+	udelay(1);
+}
 
 static int __devinit natsemi_probe1 (struct pci_dev *pdev,
 	const struct pci_device_id *ent)
@@ -766,7 +818,7 @@
 	SET_MODULE_OWNER(dev);
 	SET_NETDEV_DEV(dev, &pdev->dev);
 
-	i = pci_request_regions(pdev, dev->name);
+	i = pci_request_regions(pdev, DRV_NAME);
 	if (i)
 		goto err_pci_request_regions;
 
@@ -797,10 +849,32 @@
 	np->msg_enable = (debug >= 0) ? (1<<debug)-1 : NATSEMI_DEF_MSG;
 	np->hands_off = 0;
 
+	/* Initial port:
+	 * - If the nic was configured to use an external phy and if find_mii
+	 *   finds a phy: use external port, first phy that replies.
+	 * - Otherwise: internal port.
+	 * Note that the phy address for the internal phy doesn't matter:
+	 * The address would be used to access a phy over the mii bus, but
+	 * the internal phy is accessed through mapped registers.
+	 */
+	if (readl(dev->base_addr + ChipConfig) & CfgExtPhy)
+		dev->if_port = PORT_MII;
+	else
+		dev->if_port = PORT_TP;
 	/* Reset the chip to erase previous misconfiguration. */
 	natsemi_reload_eeprom(dev);
 	natsemi_reset(dev);
 
+	if (dev->if_port != PORT_TP) {
+		np->phy_addr_external = find_mii(dev);
+		if (np->phy_addr_external == PHY_ADDR_NONE) {
+			dev->if_port = PORT_TP;
+			np->phy_addr_external = PHY_ADDR_INTERNAL;
+		}
+	} else {
+		np->phy_addr_external = PHY_ADDR_INTERNAL;
+	}
+
 	option = find_cnt < MAX_UNITS ? options[find_cnt] : 0;
 	if (dev->mem_start)
 		option = dev->mem_start;
@@ -811,8 +885,8 @@
 			np->full_duplex = 1;
 		if (option & 15)
 			printk(KERN_INFO
-				"%s: ignoring user supplied media type %d",
-				dev->name, option & 15);
+				"natsemi %s: ignoring user supplied media type %d",
+				pci_name(np->pci_dev), option & 15);
 	}
 	if (find_cnt < MAX_UNITS  &&  full_duplex[find_cnt])
 		np->full_duplex = 1;
@@ -830,45 +904,57 @@
 	if (mtu)
 		dev->mtu = mtu;
 
-	i = register_netdev(dev);
-	if (i)
-		goto err_register_netdev;
-
 	netif_carrier_off(dev);
 
-	if (netif_msg_drv(np)) {
-		printk(KERN_INFO "%s: %s at %#08lx, ",
-			dev->name, natsemi_pci_info[chip_idx].name, ioaddr);
-		for (i = 0; i < ETH_ALEN-1; i++)
-				printk("%02x:", dev->dev_addr[i]);
-		printk("%02x, IRQ %d.\n", dev->dev_addr[i], irq);
-	}
+	/* get the initial settings from hardware */
+	tmp            = mdio_read(dev, MII_BMCR);
+	np->speed      = (tmp & BMCR_SPEED100)? SPEED_100     : SPEED_10;
+	np->duplex     = (tmp & BMCR_FULLDPLX)? DUPLEX_FULL   : DUPLEX_HALF;
+	np->autoneg    = (tmp & BMCR_ANENABLE)? AUTONEG_ENABLE: AUTONEG_DISABLE;
+	np->advertising= mdio_read(dev, MII_ADVERTISE);
 
-	np->advertising = mdio_read(dev, 1, MII_ADVERTISE);
-	if ((readl(ioaddr + ChipConfig) & 0xe000) != 0xe000
+	if ((np->advertising & ADVERTISE_ALL) != ADVERTISE_ALL
 	 && netif_msg_probe(np)) {
-		u32 chip_config = readl(ioaddr + ChipConfig);
-		printk(KERN_INFO "%s: Transceiver default autonegotiation %s "
+		printk(KERN_INFO "natsemi %s: Transceiver default autonegotiation %s "
 			"10%s %s duplex.\n",
-			dev->name,
-			chip_config & CfgAnegEnable ?
+			pci_name(np->pci_dev),
+			(mdio_read(dev, MII_BMCR) & BMCR_ANENABLE)?
 			  "enabled, advertise" : "disabled, force",
-			chip_config & CfgAneg100 ? "0" : "",
-			chip_config & CfgAnegFull ? "full" : "half");
+			(np->advertising &
+			  (ADVERTISE_100FULL|ADVERTISE_100HALF))?
+			    "0" : "",
+			(np->advertising &
+			  (ADVERTISE_100FULL|ADVERTISE_10FULL))?
+			    "full" : "half");
 	}
 	if (netif_msg_probe(np))
 		printk(KERN_INFO
-			"%s: Transceiver status %#04x advertising %#04x.\n",
-			dev->name, mdio_read(dev, 1, MII_BMSR),
+			"natsemi %s: Transceiver status %#04x advertising %#04x.\n",
+			pci_name(np->pci_dev), mdio_read(dev, MII_BMSR),
 			np->advertising);
 
 	/* save the silicon revision for later querying */
 	np->srr = readl(ioaddr + SiliconRev);
 	if (netif_msg_hw(np))
-		printk(KERN_INFO "%s: silicon revision %#04x.\n",
-				dev->name, np->srr);
+		printk(KERN_INFO "natsemi %s: silicon revision %#04x.\n",
+				pci_name(np->pci_dev), np->srr);
 
+	i = register_netdev(dev);
+	if (i)
+		goto err_register_netdev;
 
+	if (netif_msg_drv(np)) {
+		printk(KERN_INFO "natsemi %s: %s at %#08lx (%s), ",
+			dev->name, natsemi_pci_info[chip_idx].name, ioaddr,
+			pci_name(np->pci_dev));
+		for (i = 0; i < ETH_ALEN-1; i++)
+				printk("%02x:", dev->dev_addr[i]);
+		printk("%02x, IRQ %d", dev->dev_addr[i], irq);
+		if (dev->if_port == PORT_TP)
+			printk(", port TP.\n");
+		else
+			printk(", port MII, phy ad %d.\n", np->phy_addr_external);
+	}
 	return 0;
 
  err_register_netdev:
@@ -939,25 +1025,335 @@
 
 /* MII transceiver control section.
  * The 83815 series has an internal transceiver, and we present the
- * management registers as if they were MII connected. */
+ * internal management registers as if they were MII connected.
+ * External Phy registers are referenced through the MII interface.
+ */
+
+/* clock transitions >= 20ns (25MHz)
+ * One readl should be good to PCI @ 100MHz
+ */
+#define mii_delay(dev)  readl(dev->base_addr + EECtrl)
+
+static int mii_getbit (struct net_device *dev)
+{
+	int data;
+
+	writel(MII_ShiftClk, dev->base_addr + EECtrl);
+	data = readl(dev->base_addr + EECtrl);
+	writel(0, dev->base_addr + EECtrl);
+	mii_delay(dev);
+	return (data & MII_Data)? 1 : 0;
+}
 
-static int mdio_read(struct net_device *dev, int phy_id, int reg)
+static void mii_send_bits (struct net_device *dev, u32 data, int len)
 {
-	if (phy_id == 1 && reg < 32)
-		return readl(dev->base_addr+BasicControl+(reg<<2))&0xffff;
+	u32 i;
+
+	for (i = (1 << (len-1)); i; i >>= 1)
+	{
+		u32 mdio_val = MII_Write | ((data & i)? MII_Data : 0);
+		writel(mdio_val, dev->base_addr + EECtrl);
+		mii_delay(dev);
+		writel(mdio_val | MII_ShiftClk, dev->base_addr + EECtrl);
+		mii_delay(dev);
+	}
+	writel(0, dev->base_addr + EECtrl);
+	mii_delay(dev);
+}
+
+static int miiport_read(struct net_device *dev, int phy_id, int reg)
+{
+	u32 cmd;
+	int i;
+	u32 retval = 0;
+
+	/* Ensure sync */
+	mii_send_bits (dev, 0xffffffff, 32);
+	/* ST(2), OP(2), ADDR(5), REG#(5), TA(2), Data(16) total 32 bits */
+	/* ST,OP = 0110'b for read operation */
+	cmd = (0x06 << 10) | (phy_id << 5) | reg;
+	mii_send_bits (dev, cmd, 14);
+	/* Turnaround */
+	if (mii_getbit (dev))
+		return 0;
+	/* Read data */
+	for (i = 0; i < 16; i++) {
+		retval <<= 1;
+		retval |= mii_getbit (dev);
+	}
+	/* End cycle */
+	mii_getbit (dev);
+	return retval;
+}
+
+static void miiport_write(struct net_device *dev, int phy_id, int reg, u16 data)
+{
+	u32 cmd;
+
+	/* Ensure sync */
+	mii_send_bits (dev, 0xffffffff, 32);
+	/* ST(2), OP(2), ADDR(5), REG#(5), TA(2), Data(16) total 32 bits */
+	/* ST,OP,AAAAA,RRRRR,TA = 0101xxxxxxxxxx10'b = 0x5002 for write */
+	cmd = (0x5002 << 16) | (phy_id << 23) | (reg << 18) | data;
+	mii_send_bits (dev, cmd, 32);
+	/* End cycle */
+	mii_getbit (dev);
+}
+
+static int mdio_read(struct net_device *dev, int reg)
+{
+	struct netdev_private *np = dev->priv;
+
+	/* The 83815 series has two ports:
+	 * - an internal transceiver
+	 * - an external mii bus
+	 */
+	if (dev->if_port == PORT_TP)
+		return readw(dev->base_addr+BasicControl+(reg<<2));
 	else
-		return 0xffff;
+		return miiport_read(dev, np->phy_addr_external, reg);
 }
 
-static void mdio_write(struct net_device *dev, int phy_id, int reg, u16 data)
+static void mdio_write(struct net_device *dev, int reg, u16 data)
 {
 	struct netdev_private *np = dev->priv;
-	if (phy_id == 1 && reg < 32) {
+
+	/* The 83815 series has an internal transceiver; handle separately */
+	if (dev->if_port == PORT_TP)
 		writew(data, dev->base_addr+BasicControl+(reg<<2));
-		switch (reg) {
-			case MII_ADVERTISE: np->advertising = data; break;
+	else
+		miiport_write(dev, np->phy_addr_external, reg, data);
+}
+
+static void init_phy_fixup(struct net_device *dev)
+{
+	struct netdev_private *np = dev->priv;
+	long ioaddr = dev->base_addr;
+	int i;
+	u32 cfg;
+	u16 tmp;
+
+	/* restore stuff lost when power was out */
+	tmp = mdio_read(dev, MII_BMCR);
+	if (np->autoneg == AUTONEG_ENABLE) {
+		/* renegotiate if something changed */
+		if ((tmp & BMCR_ANENABLE) == 0
+		 || np->advertising != mdio_read(dev, MII_ADVERTISE))
+		{
+			/* turn on autonegotiation and force negotiation */
+			tmp |= (BMCR_ANENABLE | BMCR_ANRESTART);
+			mdio_write(dev, MII_ADVERTISE, np->advertising);
 		}
+	} else {
+		/* turn off auto negotiation, set speed and duplexity */
+		tmp &= ~(BMCR_ANENABLE | BMCR_SPEED100 | BMCR_FULLDPLX);
+		if (np->speed == SPEED_100)
+			tmp |= BMCR_SPEED100;
+		if (np->duplex == DUPLEX_FULL)
+			tmp |= BMCR_FULLDPLX;
+		/* 
+		 * Note: there is no good way to inform the link partner
+		 * that our capabilities changed. The user has to unplug
+		 * and replug the network cable after some changes, e.g.
+		 * after switching from 10HD, autoneg off to 100 HD,
+		 * autoneg off.
+		 */
+	}
+	mdio_write(dev, MII_BMCR, tmp);
+	readl(dev->base_addr + ChipConfig);
+	udelay(1);
+
+	/* find out what phy this is */
+	np->mii = (mdio_read(dev, MII_PHYSID1) << 16)
+				+ mdio_read(dev, MII_PHYSID2);
+
+	/* handle external phys here */
+	switch (np->mii) {
+	case PHYID_AM79C874:
+		/* phy specific configuration for fibre/tp operation */
+		tmp = mdio_read(dev, MII_MCTRL);
+		tmp &= ~(MII_FX_SEL | MII_EN_SCRM);
+		if (dev->if_port == PORT_FIBRE)
+			tmp |= MII_FX_SEL;
+		else
+			tmp |= MII_EN_SCRM;
+		mdio_write(dev, MII_MCTRL, tmp);
+		break;
+	default:
+		break;
 	}
+	cfg = readl(dev->base_addr + ChipConfig);
+	if (cfg & CfgExtPhy)
+		return;
+
+	/* On page 78 of the spec, they recommend some settings for "optimum
+	   performance" to be done in sequence.  These settings optimize some
+	   of the 100Mbit autodetection circuitry.  They say we only want to
+	   do this for rev C of the chip, but engineers at NSC (Bradley
+	   Kennedy) recommends always setting them.  If you don't, you get
+	   errors on some autonegotiations that make the device unusable.
+
+	   It seems that the DSP needs a few usec to reinitialize after
+	   the start of the phy. Just retry writing these values until they
+	   stick.
+	*/
+	for (i=0;i<NATSEMI_HW_TIMEOUT;i++) {
+
+		int dspcfg;
+		writew(1, ioaddr + PGSEL);
+		writew(PMDCSR_VAL, ioaddr + PMDCSR);
+		writew(TSTDAT_VAL, ioaddr + TSTDAT);
+		np->dspcfg = DSPCFG_VAL;
+		writew(np->dspcfg, ioaddr + DSPCFG);
+		writew(SDCFG_VAL, ioaddr + SDCFG);
+		writew(0, ioaddr + PGSEL);
+		readl(ioaddr + ChipConfig);
+		udelay(10);
+
+		writew(1, ioaddr + PGSEL);
+		dspcfg = readw(ioaddr + DSPCFG);
+		writew(0, ioaddr + PGSEL);
+		if (np->dspcfg == dspcfg)
+			break;
+	}
+
+	if (netif_msg_link(np)) {
+		if (i==NATSEMI_HW_TIMEOUT) {
+			printk(KERN_INFO
+				"%s: DSPCFG mismatch after retrying for %d usec.\n",
+				dev->name, i*10);
+		} else {
+			printk(KERN_INFO
+				"%s: DSPCFG accepted after %d usec.\n",
+				dev->name, i*10);
+		}
+	}
+	/*
+	 * Enable PHY Specific event based interrupts.  Link state change
+	 * and Auto-Negotiation Completion are among the affected.
+	 * Read the intr status to clear it (needed for wake events).
+	 */
+	readw(ioaddr + MIntrStatus);
+	writew(MICRIntEn, ioaddr + MIntrCtrl);
+}
+
+static int switch_port_external(struct net_device *dev)
+{
+	struct netdev_private *np = dev->priv;
+	u32 cfg;
+
+	cfg = readl(dev->base_addr + ChipConfig);
+	if (cfg & CfgExtPhy)
+		return 0;
+
+	if (netif_msg_link(np)) {
+		printk(KERN_INFO "%s: switching to external transceiver.\n",
+				dev->name);
+	}
+
+	/* 1) switch back to external phy */
+	writel(cfg | (CfgExtPhy | CfgPhyDis), dev->base_addr + ChipConfig);
+	readl(dev->base_addr + ChipConfig);
+	udelay(1);
+
+	/* 2) reset the external phy: */
+	/* resetting the external PHY has been known to cause a hub supplying
+	 * power over Ethernet to kill the power.  We don't want to kill
+	 * power to this computer, so we avoid resetting the phy.
+	 */
+
+	/* 3) reinit the phy fixup, it got lost during power down. */
+	move_int_phy(dev, np->phy_addr_external);
+	init_phy_fixup(dev);
+
+	return 1;
+}
+
+static int switch_port_internal(struct net_device *dev)
+{
+	struct netdev_private *np = dev->priv;
+	int i;
+	u32 cfg;
+	u16 bmcr;
+
+	cfg = readl(dev->base_addr + ChipConfig);
+	if (!(cfg &CfgExtPhy))
+		return 0;
+
+	if (netif_msg_link(np)) {
+		printk(KERN_INFO "%s: switching to internal transceiver.\n",
+				dev->name);
+	}
+	/* 1) switch back to internal phy: */
+	cfg = cfg & ~(CfgExtPhy | CfgPhyDis);
+	writel(cfg, dev->base_addr + ChipConfig);
+	readl(dev->base_addr + ChipConfig);
+	udelay(1);
+	
+	/* 2) reset the internal phy: */
+	bmcr = readw(dev->base_addr+BasicControl+(MII_BMCR<<2));
+	writel(bmcr | BMCR_RESET, dev->base_addr+BasicControl+(MII_BMCR<<2));
+	readl(dev->base_addr + ChipConfig);
+	udelay(10);
+	for (i=0;i<NATSEMI_HW_TIMEOUT;i++) {
+		bmcr = readw(dev->base_addr+BasicControl+(MII_BMCR<<2));
+		if (!(bmcr & BMCR_RESET))
+			break;
+		udelay(10);
+	}
+	if (i==NATSEMI_HW_TIMEOUT && netif_msg_link(np)) {
+		printk(KERN_INFO
+			"%s: phy reset did not complete in %d usec.\n",
+			dev->name, i*10);
+	}
+	/* 3) reinit the phy fixup, it got lost during power down. */
+	init_phy_fixup(dev);
+
+	return 1;
+}
+
+/* Scan for a PHY on the external mii bus.
+ * There are two tricky points:
+ * - Do not scan while the internal phy is enabled. The internal phy will
+ *   crash: e.g. reads from the DSPCFG register will return odd values and
+ *   the nasty random phy reset code will reset the nic every few seconds.
+ * - The internal phy must be moved around, an external phy could
+ *   have the same address as the internal phy.
+ */
+static int find_mii(struct net_device *dev)
+{
+	struct netdev_private *np = dev->priv;
+	int tmp;
+	int i;
+	int did_switch;
+
+	/* Switch to external phy */
+	did_switch = switch_port_external(dev);
+		
+	/* Scan the possible phy addresses:
+	 *
+	 * PHY address 0 means that the phy is in isolate mode. Not yet
+	 * supported due to lack of test hardware. User space should
+	 * handle it through ethtool.
+	 */
+	for (i = 1; i <= 31; i++) {
+		move_int_phy(dev, i);
+		tmp = miiport_read(dev, i, MII_BMSR);
+		if (tmp != 0xffff && tmp != 0x0000) {
+			/* found something! */
+			np->mii = (mdio_read(dev, MII_PHYSID1) << 16)
+					+ mdio_read(dev, MII_PHYSID2);
+	 		if (netif_msg_probe(np)) {
+				printk(KERN_INFO "natsemi %s: found external phy %08x at address %d.\n",
+						pci_name(np->pci_dev), np->mii, i);
+			}
+			break;
+		}
+	}
+	/* And switch back to internal phy: */
+	if (did_switch)
+		switch_port_internal(dev);
+	return i;
 }
 
 /* CFG bits [13:16] [18:23] */
@@ -1019,6 +1415,11 @@
 
 	/* restore CFG */
 	cfg |= readl(dev->base_addr + ChipConfig) & ~CFG_RESET_SAVE;
+	/* turn on external phy if it was selected */
+	if (dev->if_port == PORT_TP)
+		cfg &= ~(CfgExtPhy | CfgPhyDis);
+	else
+		cfg |= (CfgExtPhy | CfgPhyDis);
 	writel(cfg, dev->base_addr + ChipConfig);
 	/* restore WCSR */
 	wcsr |= readl(dev->base_addr + WOLCmd) & ~WCSR_RESET_SAVE;
@@ -1050,11 +1451,11 @@
 			break;
 	}
 	if (i==NATSEMI_HW_TIMEOUT) {
-		printk(KERN_WARNING "%s: EEPROM did not reload in %d usec.\n",
-			dev->name, i*50);
+		printk(KERN_WARNING "natsemi %s: EEPROM did not reload in %d usec.\n",
+			pci_name(np->pci_dev), i*50);
 	} else if (netif_msg_hw(np)) {
-		printk(KERN_DEBUG "%s: EEPROM reloaded in %d usec.\n",
-			dev->name, i*50);
+		printk(KERN_DEBUG "natsemi %s: EEPROM reloaded in %d usec.\n",
+			pci_name(np->pci_dev), i*50);
 	}
 }
 
@@ -1132,6 +1533,9 @@
 {
 	struct netdev_private *np = dev->priv;
 
+	if (dev->if_port != PORT_TP)
+		return;
+
 	if (np->srr >= SRR_DP83816_A5)
 		return;
 
@@ -1173,6 +1577,9 @@
 	u16 data;
 	struct netdev_private *np = dev->priv;
 
+	if (dev->if_port != PORT_TP)
+		return;
+
 	if (np->srr >= SRR_DP83816_A5)
 		return;
 
@@ -1189,9 +1596,16 @@
 	struct netdev_private *np = dev->priv;
 	long ioaddr = dev->base_addr;
 	int duplex;
-	int chipcfg = readl(ioaddr + ChipConfig);
+	u16 bmsr;
+       
+	/* The link status field is latched: it remains low after a temporary
+	 * link failure until it's read. We need the current link status,
+	 * thus read twice.
+	 */
+	mdio_read(dev, MII_BMSR);
+	bmsr = mdio_read(dev, MII_BMSR);
 
-	if (!(chipcfg & CfgLink)) {
+	if (!(bmsr & BMSR_LSTATUS)) {
 		if (netif_carrier_ok(dev)) {
 			if (netif_msg_link(np))
 				printk(KERN_NOTICE "%s: link down.\n",
@@ -1208,7 +1622,16 @@
 		do_cable_magic(dev);
 	}
 
-	duplex = np->full_duplex || (chipcfg & CfgFullDuplex ? 1 : 0);
+	duplex = np->full_duplex;
+	if (!duplex) {
+		if (bmsr & BMSR_ANEGCOMPLETE) {
+			int tmp = mii_nway_result(
+				np->advertising & mdio_read(dev, MII_LPA));
+			if (tmp == LPA_100FULL || tmp == LPA_10FULL)
+				duplex = 1;
+		} else if (mdio_read(dev, MII_BMCR) & BMCR_FULLDPLX)
+			duplex = 1;
+	}
 
 	/* if duplex is set then bit 28 must be set, too */
 	if (duplex ^ !!(np->rx_config & RxAcceptTx)) {
@@ -1233,40 +1656,8 @@
 {
 	struct netdev_private *np = dev->priv;
 	long ioaddr = dev->base_addr;
-	int i;
 
-	for (i=0;i<NATSEMI_HW_TIMEOUT;i++) {
-		if (readl(dev->base_addr + ChipConfig) & CfgAnegDone)
-			break;
-		udelay(10);
-	}
-	if (i==NATSEMI_HW_TIMEOUT && netif_msg_link(np)) {
-		printk(KERN_INFO
-			"%s: autonegotiation did not complete in %d usec.\n",
-			dev->name, i*10);
-	}
-
-	/* On page 78 of the spec, they recommend some settings for "optimum
-	   performance" to be done in sequence.  These settings optimize some
-	   of the 100Mbit autodetection circuitry.  They say we only want to
-	   do this for rev C of the chip, but engineers at NSC (Bradley
-	   Kennedy) recommends always setting them.  If you don't, you get
-	   errors on some autonegotiations that make the device unusable.
-	*/
-	writew(1, ioaddr + PGSEL);
-	writew(PMDCSR_VAL, ioaddr + PMDCSR);
-	writew(TSTDAT_VAL, ioaddr + TSTDAT);
-	writew(DSPCFG_VAL, ioaddr + DSPCFG);
-	writew(SDCFG_VAL, ioaddr + SDCFG);
-	writew(0, ioaddr + PGSEL);
-	np->dspcfg = DSPCFG_VAL;
-
-	/* Enable PHY Specific event based interrupts.  Link state change
-	   and Auto-Negotiation Completion are among the affected.
-	   Read the intr status to clear it (needed for wake events).
-	*/
-	readw(ioaddr + MIntrStatus);
-	writew(MICRIntEn, ioaddr + MIntrCtrl);
+	init_phy_fixup(dev);
 
 	/* clear any interrupts that are pending, such as wake events */
 	readl(ioaddr + IntrStatus);
@@ -1296,6 +1687,10 @@
 	 * MXDMA 0: up to 256 byte bursts
 	 */
 	np->rx_config = RxMxdma_256 | 0x20;
+	/* if receive ring now has bigger buffers than normal, enable jumbo */
+	if (np->rx_buf_sz > PKT_BUF_SZ)
+		np->rx_config |= RxAcceptLong;
+
 	writel(np->rx_config, ioaddr + RxConfig);
 
 	/* Disable PME:
@@ -1339,8 +1734,6 @@
 	struct net_device *dev = (struct net_device *)data;
 	struct netdev_private *np = dev->priv;
 	int next_tick = 5*HZ;
-	long ioaddr = dev->base_addr;
-	u16 dspcfg;
 
 	if (netif_msg_timer(np)) {
 		/* DO NOT read the IntrStatus register,
@@ -1350,33 +1743,41 @@
 			dev->name);
 	}
 
-	spin_lock_irq(&np->lock);
+	if (dev->if_port == PORT_TP) {
+		long ioaddr = dev->base_addr;
+		u16 dspcfg;
 
-	/* check for a nasty random phy-reset - use dspcfg as a flag */
-	writew(1, ioaddr+PGSEL);
-	dspcfg = readw(ioaddr+DSPCFG);
-	writew(0, ioaddr+PGSEL);
-	if (dspcfg != np->dspcfg) {
-		if (!netif_queue_stopped(dev)) {
-			spin_unlock_irq(&np->lock);
-			if (netif_msg_hw(np))
-				printk(KERN_NOTICE "%s: possible phy reset: "
-					"re-initializing\n", dev->name);
-			disable_irq(dev->irq);
-			spin_lock_irq(&np->lock);
-			natsemi_stop_rxtx(dev);
-			dump_ring(dev);
-			reinit_ring(dev);
-			init_registers(dev);
-			spin_unlock_irq(&np->lock);
-			enable_irq(dev->irq);
+		spin_lock_irq(&np->lock);
+		/* check for a nasty random phy-reset - use dspcfg as a flag */
+		writew(1, ioaddr+PGSEL);
+		dspcfg = readw(ioaddr+DSPCFG);
+		writew(0, ioaddr+PGSEL);
+		if (dspcfg != np->dspcfg) {
+			if (!netif_queue_stopped(dev)) {
+				spin_unlock_irq(&np->lock);
+				if (netif_msg_hw(np))
+					printk(KERN_NOTICE "%s: possible phy reset: "
+						"re-initializing\n", dev->name);
+				disable_irq(dev->irq);
+				spin_lock_irq(&np->lock);
+				natsemi_stop_rxtx(dev);
+				dump_ring(dev);
+				reinit_ring(dev);
+				init_registers(dev);
+				spin_unlock_irq(&np->lock);
+				enable_irq(dev->irq);
+			} else {
+				/* hurry back */
+				next_tick = HZ;
+				spin_unlock_irq(&np->lock);
+			}
 		} else {
-			/* hurry back */
-			next_tick = HZ;
+			/* init_registers() calls check_link() for the above case */
+			check_link(dev);
 			spin_unlock_irq(&np->lock);
 		}
 	} else {
-		/* init_registers() calls check_link() for the above case */
+		spin_lock_irq(&np->lock);
 		check_link(dev);
 		spin_unlock_irq(&np->lock);
 	}
@@ -1507,8 +1908,10 @@
 	/* 2) RX ring */
 	np->dirty_rx = 0;
 	np->cur_rx = RX_RING_SIZE;
-	np->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32);
 	np->oom = 0;
+	np->rx_buf_sz = PKT_BUF_SZ;
+	if (dev->mtu > ETH_DATA_LEN)
+		np->rx_buf_sz += dev->mtu - ETH_DATA_LEN;
 	np->rx_head_desc = &np->rx_ring[0];
 
 	/* Please be carefull before changing this loop - at least gcc-2.95.1
@@ -1755,12 +2158,14 @@
 
 	/* If the driver owns the next entry it's a new packet. Send it up. */
 	while (desc_status < 0) { /* e.g. & DescOwn */
+		int pkt_len;
 		if (netif_msg_rx_status(np))
 			printk(KERN_DEBUG
 				"  netdev_rx() entry %d status was %#08x.\n",
 				entry, desc_status);
 		if (--boguscnt < 0)
 			break;
+		pkt_len = (desc_status & DescSizeMask) - 4;
 		if ((desc_status&(DescMore|DescPktOK|DescRxLong)) != DescPktOK){
 			if (desc_status & DescMore) {
 				if (netif_msg_rx_err(np))
@@ -1783,10 +2188,14 @@
 				if (desc_status & DescRxCRC)
 					np->stats.rx_crc_errors++;
 			}
+		} else if (pkt_len > np->rx_buf_sz) {
+			/* if this is the tail of a double buffer
+			 * packet, we've already counted the error
+			 * on the first part.  Ignore the second half.
+			 */
 		} else {
 			struct sk_buff *skb;
 			/* Omit CRC size. */
-			int pkt_len = (desc_status & DescSizeMask) - 4;
 			/* Check if the packet is long enough to accept
 			 * without copying to a minimally-sized skbuff. */
 			if (pkt_len < rx_copybreak
@@ -1798,14 +2207,9 @@
 					np->rx_dma[entry],
 					buflen,
 					PCI_DMA_FROMDEVICE);
-#if HAS_IP_COPYSUM
 				eth_copy_and_sum(skb,
 					np->rx_skbuff[entry]->tail, pkt_len, 0);
 				skb_put(skb, pkt_len);
-#else
-				memcpy(skb_put(skb, pkt_len),
-					np->rx_skbuff[entry]->tail, pkt_len);
-#endif
 				pci_dma_sync_single_for_device(np->pci_dev,
 					np->rx_dma[entry],
 					buflen,
@@ -1842,14 +2246,13 @@
 
 	spin_lock(&np->lock);
 	if (intr_status & LinkChange) {
-		u16 adv = mdio_read(dev, 1, MII_ADVERTISE);
-		u16 lpa = mdio_read(dev, 1, MII_LPA);
-		if (mdio_read(dev, 1, MII_BMCR) & BMCR_ANENABLE
+		u16 lpa = mdio_read(dev, MII_LPA);
+		if (mdio_read(dev, MII_BMCR) & BMCR_ANENABLE
 		 && netif_msg_link(np)) {
 			printk(KERN_INFO
 				"%s: Autonegotiation advertising"
 				" %#04x  partner %#04x.\n", dev->name,
-				adv, lpa);
+				np->advertising, lpa);
 		}
 
 		/* read MII int status to clear the flag */
@@ -2077,10 +2480,10 @@
 		int tmp;
 		int r = -EINVAL;
 		/* if autoneg is off, it's an error */
-		tmp = mdio_read(dev, 1, MII_BMCR);
+		tmp = mdio_read(dev, MII_BMCR);
 		if (tmp & BMCR_ANENABLE) {
 			tmp |= (BMCR_ANRESTART);
-			mdio_write(dev, 1, MII_BMCR, tmp);
+			mdio_write(dev, MII_BMCR, tmp);
 			r = 0;
 		}
 		return r;
@@ -2089,8 +2492,8 @@
 	case ETHTOOL_GLINK: {
 		struct ethtool_value edata = {ETHTOOL_GLINK};
 		/* LSTATUS is latched low until a read - so read twice */
-		mdio_read(dev, 1, MII_BMSR);
-		edata.data = (mdio_read(dev, 1, MII_BMSR)&BMSR_LSTATUS) ? 1:0;
+		mdio_read(dev, MII_BMSR);
+		edata.data = (mdio_read(dev, MII_BMSR)&BMSR_LSTATUS) ? 1:0;
 		if (copy_to_user(useraddr, &edata, sizeof(edata)))
 			return -EFAULT;
 		return 0;
@@ -2257,56 +2660,75 @@
 
 static int netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
 {
+	struct netdev_private *np = dev->priv;
 	u32 tmp;
 
-	ecmd->supported =
-		(SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
-		SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
-		SUPPORTED_Autoneg | SUPPORTED_TP | SUPPORTED_MII);
-
-	/* only supports twisted-pair or MII */
-	tmp = readl(dev->base_addr + ChipConfig);
-	if (tmp & CfgExtPhy)
-		ecmd->port = PORT_MII;
-	else
-		ecmd->port = PORT_TP;
-
-	/* only supports internal transceiver */
-	ecmd->transceiver = XCVR_INTERNAL;
-
-	/* not sure what this is for */
-	ecmd->phy_address = readw(dev->base_addr + PhyCtrl) & PhyAddrMask;
-
-	ecmd->advertising = ADVERTISED_TP | ADVERTISED_MII;
-	tmp = mdio_read(dev, 1, MII_ADVERTISE);
-	if (tmp & ADVERTISE_10HALF)
+	ecmd->port        = dev->if_port;
+	ecmd->speed       = np->speed;
+	ecmd->duplex      = np->duplex;
+	ecmd->autoneg     = np->autoneg;
+	ecmd->advertising = 0;
+	if (np->advertising & ADVERTISE_10HALF)
 		ecmd->advertising |= ADVERTISED_10baseT_Half;
-	if (tmp & ADVERTISE_10FULL)
+	if (np->advertising & ADVERTISE_10FULL)
 		ecmd->advertising |= ADVERTISED_10baseT_Full;
-	if (tmp & ADVERTISE_100HALF)
+	if (np->advertising & ADVERTISE_100HALF)
 		ecmd->advertising |= ADVERTISED_100baseT_Half;
-	if (tmp & ADVERTISE_100FULL)
+	if (np->advertising & ADVERTISE_100FULL)
 		ecmd->advertising |= ADVERTISED_100baseT_Full;
+	ecmd->supported   = (SUPPORTED_Autoneg |
+		SUPPORTED_10baseT_Half  | SUPPORTED_10baseT_Full  |
+		SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
+		SUPPORTED_TP | SUPPORTED_MII | SUPPORTED_FIBRE);
+	ecmd->phy_address = np->phy_addr_external;
+	/*
+	 * We intentionally report the phy address of the external
+	 * phy, even if the internal phy is used. This is necessary
+	 * to work around a deficiency of the ethtool interface:
+	 * It's only possible to query the settings of the active
+	 * port. Therefore 
+	 * # ethtool -s ethX port mii
+	 * actually sends an ioctl to switch to port mii with the
+	 * settings that are used for the current active port.
+	 * If we would report a different phy address in this
+	 * command, then
+	 * # ethtool -s ethX port tp;ethtool -s ethX port mii
+	 * would unintentionally change the phy address.
+	 *
+	 * Fortunately the phy address doesn't matter with the
+	 * internal phy...
+	 */
 
-	tmp = mdio_read(dev, 1, MII_BMCR);
-	if (tmp & BMCR_ANENABLE) {
-		ecmd->advertising |= ADVERTISED_Autoneg;
-		ecmd->autoneg = AUTONEG_ENABLE;
-	} else {
-		ecmd->autoneg = AUTONEG_DISABLE;
-	}
-
-	tmp = readl(dev->base_addr + ChipConfig);
-	if (tmp & CfgSpeed100) {
-		ecmd->speed = SPEED_100;
-	} else {
-		ecmd->speed = SPEED_10;
+	/* set information based on active port type */
+	switch (ecmd->port) {
+	default:
+	case PORT_TP:
+		ecmd->advertising |= ADVERTISED_TP;
+		ecmd->transceiver = XCVR_INTERNAL;
+		break;
+	case PORT_MII:
+		ecmd->advertising |= ADVERTISED_MII;
+		ecmd->transceiver = XCVR_EXTERNAL;
+		break;
+	case PORT_FIBRE:
+		ecmd->advertising |= ADVERTISED_FIBRE;
+		ecmd->transceiver = XCVR_EXTERNAL;
+		break;
 	}
 
-	if (tmp & CfgFullDuplex) {
-		ecmd->duplex = DUPLEX_FULL;
-	} else {
-		ecmd->duplex = DUPLEX_HALF;
+	/* if autonegotiation is on, try to return the active speed/duplex */
+	if (ecmd->autoneg == AUTONEG_ENABLE) {
+		ecmd->advertising |= ADVERTISED_Autoneg;
+		tmp = mii_nway_result(
+			np->advertising & mdio_read(dev, MII_LPA));
+		if (tmp == LPA_100FULL || tmp == LPA_100HALF)
+			ecmd->speed  = SPEED_100;
+		else
+			ecmd->speed  = SPEED_10;
+		if (tmp == LPA_100FULL || tmp == LPA_10FULL)
+			ecmd->duplex = DUPLEX_FULL;
+		else
+			ecmd->duplex = DUPLEX_HALF;
 	}
 
 	/* ignore maxtxpkt, maxrxpkt for now */
@@ -2317,38 +2739,74 @@
 static int netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
 {
 	struct netdev_private *np = dev->priv;
-	u32 tmp;
 
-	if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100)
-		return -EINVAL;
-	if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
+	if (ecmd->port != PORT_TP && ecmd->port != PORT_MII && ecmd->port != PORT_FIBRE)
 		return -EINVAL;
-	if (ecmd->port != PORT_TP && ecmd->port != PORT_MII)
+	if (ecmd->transceiver != XCVR_INTERNAL && ecmd->transceiver != XCVR_EXTERNAL)
 		return -EINVAL;
-	if (ecmd->transceiver != XCVR_INTERNAL)
-		return -EINVAL;
-	if (ecmd->autoneg != AUTONEG_DISABLE && ecmd->autoneg != AUTONEG_ENABLE)
+	if (ecmd->autoneg == AUTONEG_ENABLE) {
+		if ((ecmd->advertising & (ADVERTISED_10baseT_Half |
+					  ADVERTISED_10baseT_Full |
+					  ADVERTISED_100baseT_Half |
+					  ADVERTISED_100baseT_Full)) == 0) {
+			return -EINVAL;
+		}
+	} else if (ecmd->autoneg == AUTONEG_DISABLE) {
+		if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100)
+			return -EINVAL;
+		if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
+			return -EINVAL;
+	} else {
 		return -EINVAL;
-	/* ignore phy_address, maxtxpkt, maxrxpkt for now */
+	}
+
+	/*
+	 * maxtxpkt, maxrxpkt: ignored for now.
+	 *
+	 * transceiver:
+	 * PORT_TP is always XCVR_INTERNAL, PORT_MII and PORT_FIBRE are always
+	 * XCVR_EXTERNAL. The implementation thus ignores ecmd->transceiver and
+	 * selects based on ecmd->port.
+	 *
+	 * Actually PORT_FIBRE is nearly identical to PORT_MII: it's for fibre
+	 * phys that are connected to the mii bus. It's used to apply fibre
+	 * specific updates.
+	 */
 
 	/* WHEW! now lets bang some bits */
 
-	tmp = mdio_read(dev, 1, MII_BMCR);
-	if (ecmd->autoneg == AUTONEG_ENABLE) {
-		/* turn on autonegotiation */
-		tmp |= BMCR_ANENABLE;
-		np->advertising = mdio_read(dev, 1, MII_ADVERTISE);
+	/* save the parms */
+	dev->if_port          = ecmd->port;
+	np->autoneg           = ecmd->autoneg;
+	np->phy_addr_external = ecmd->phy_address & PhyAddrMask;
+	if (np->autoneg == AUTONEG_ENABLE) {
+		/* advertise only what has been requested */
+		np->advertising &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
+		if (ecmd->advertising & ADVERTISED_10baseT_Half)
+			np->advertising |= ADVERTISE_10HALF;
+		if (ecmd->advertising & ADVERTISED_10baseT_Full)
+			np->advertising |= ADVERTISE_10FULL;
+		if (ecmd->advertising & ADVERTISED_100baseT_Half)
+			np->advertising |= ADVERTISE_100HALF;
+		if (ecmd->advertising & ADVERTISED_100baseT_Full)
+			np->advertising |= ADVERTISE_100FULL;
 	} else {
-		/* turn off auto negotiation, set speed and duplexity */
-		tmp &= ~(BMCR_ANENABLE | BMCR_SPEED100 | BMCR_FULLDPLX);
-		if (ecmd->speed == SPEED_100)
-			tmp |= BMCR_SPEED100;
-		if (ecmd->duplex == DUPLEX_FULL)
-			tmp |= BMCR_FULLDPLX;
-		else
+		np->speed  = ecmd->speed;
+		np->duplex = ecmd->duplex;
+		/* user overriding the initial full duplex parm? */
+		if (np->duplex == DUPLEX_HALF)
 			np->full_duplex = 0;
 	}
-	mdio_write(dev, 1, MII_BMCR, tmp);
+
+	/* get the right phy enabled */
+	if (ecmd->port == PORT_TP)
+		switch_port_internal(dev);
+	else
+		switch_port_external(dev);
+
+	/* set parms and see how this affected our link status */
+	init_phy_fixup(dev);
+	check_link(dev);
 	return 0;
 }
 
@@ -2359,11 +2817,15 @@
 	u32 rfcr;
 	u32 *rbuf = (u32 *)buf;
 
-	/* read all of page 0 of registers */
-	for (i = 0; i < NATSEMI_PG0_NREGS; i++) {
+	/* read non-mii page 0 of registers */
+	for (i = 0; i < NATSEMI_PG0_NREGS/2; i++) {
 		rbuf[i] = readl(dev->base_addr + i*4);
 	}
 
+	/* read current mii registers */
+	for (i = NATSEMI_PG0_NREGS/2; i < NATSEMI_PG0_NREGS; i++)
+		rbuf[i] = mdio_read(dev, i & 0x1f);
+
 	/* read only the 'magic' registers from page 1 */
 	writew(1, dev->base_addr + PGSEL);
 	rbuf[i++] = readw(dev->base_addr + PMDCSR);
@@ -2414,31 +2876,59 @@
 	}
 	return 0;
 }
-
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
 	struct mii_ioctl_data *data = if_mii(rq);
+	struct netdev_private *np = dev->priv;
 
 	switch(cmd) {
 	case SIOCETHTOOL:
 		return netdev_ethtool_ioctl(dev, rq->ifr_data);
 	case SIOCGMIIPHY:		/* Get address of MII PHY in use. */
 	case SIOCDEVPRIVATE:		/* for binary compat, remove in 2.5 */
-		data->phy_id = 1;
+		data->phy_id = np->phy_addr_external;
 		/* Fall Through */
 
 	case SIOCGMIIREG:		/* Read MII PHY register. */
 	case SIOCDEVPRIVATE+1:		/* for binary compat, remove in 2.5 */
-		data->val_out = mdio_read(dev, data->phy_id & 0x1f,
-			data->reg_num & 0x1f);
+		/* The phy_id is not enough to uniquely identify
+		 * the intended target. Therefore the command is sent to
+		 * the given mii on the current port.
+		 */
+		if (dev->if_port == PORT_TP) {
+			if ((data->phy_id & 0x1f) == np->phy_addr_external)
+				data->val_out = mdio_read(dev,
+							data->reg_num & 0x1f);
+			else
+				data->val_out = 0;
+		} else {
+			move_int_phy(dev, data->phy_id & 0x1f);
+			data->val_out = miiport_read(dev, data->phy_id & 0x1f,
+							data->reg_num & 0x1f);
+		}
 		return 0;
 
 	case SIOCSMIIREG:		/* Write MII PHY register. */
 	case SIOCDEVPRIVATE+2:		/* for binary compat, remove in 2.5 */
 		if (!capable(CAP_NET_ADMIN))
 			return -EPERM;
-		mdio_write(dev, data->phy_id & 0x1f, data->reg_num & 0x1f,
-			data->val_in);
+		if (dev->if_port == PORT_TP) {
+			if ((data->phy_id & 0x1f) == np->phy_addr_external) {
+ 				if ((data->reg_num & 0x1f) == MII_ADVERTISE)
+					np->advertising = data->val_in;
+				mdio_write(dev, data->reg_num & 0x1f,
+							data->val_in);
+			}
+		} else {
+			if ((data->phy_id & 0x1f) == np->phy_addr_external) {
+ 				if ((data->reg_num & 0x1f) == MII_ADVERTISE)
+					np->advertising = data->val_in;
+			}
+			move_int_phy(dev, data->phy_id & 0x1f);
+			miiport_write(dev, data->phy_id & 0x1f,
+						data->reg_num & 0x1f,
+						data->val_in);
+		}
 		return 0;
 	default:
 		return -EOPNOTSUPP;
--- diff/drivers/net/ne-h8300.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/ne-h8300.c	2004-07-01 21:32:38.000000000 +0100
@@ -34,6 +34,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "ne-h8300"
+
 /* Some defines that people can play with if so inclined. */
 
 /* Do we perform extra sanity checks on stuff ? */
@@ -156,6 +158,7 @@
 	release_region(dev->base_addr, NE_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init ne_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -187,6 +190,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init ne_probe1(struct net_device *dev, int ioaddr)
 {
@@ -200,7 +204,7 @@
 	struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
 	unsigned char bus_width;
 
-	if (!request_region(ioaddr, NE_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	reg0 = inb_p(ioaddr);
--- diff/drivers/net/ne.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/ne.c	2004-07-01 21:32:38.000000000 +0100
@@ -55,6 +55,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "ne"
+
 /* Some defines that people can play with if so inclined. */
 
 /* Do we support clones that don't adhere to 14,15 of the SAprom ? */
@@ -203,6 +205,7 @@
 	release_region(dev->base_addr, NE_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init ne_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -227,6 +230,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init ne_probe_isapnp(struct net_device *dev)
 {
@@ -284,7 +288,7 @@
 	int reg0, ret;
 	static unsigned version_printed;
 
-	if (!request_region(ioaddr, NE_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	reg0 = inb_p(ioaddr);
--- diff/drivers/net/ne2.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/ne2.c	2004-07-01 21:32:38.000000000 +0100
@@ -82,6 +82,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "ne2"
+
 /* Some defines that people can play with if so inclined. */
 
 /* Do we perform extra sanity checks on stuff ? */
@@ -284,6 +286,7 @@
 	release_region(dev->base_addr, NE_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init ne2_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -308,6 +311,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int ne2_procinfo(char *buf, int slot, struct net_device *dev)
 {
@@ -368,7 +372,7 @@
 		irq = irqs[(POS & 0x60)>>5];
 	}
 
-	if (!request_region(base_addr, NE_IO_EXTENT, dev->name))
+	if (!request_region(base_addr, NE_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 #ifdef DEBUG
@@ -470,7 +474,7 @@
 
 	/* Snarf the interrupt now.  There's no point in waiting since we cannot
 	   share and the board will usually be enabled. */
-	retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev);
+	retval = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev);
 	if (retval) {
 		printk (" unable to get IRQ %d (irqval=%d).\n", 
 				dev->irq, retval);
--- diff/drivers/net/ne3210.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/ne3210.c	2004-07-01 21:32:38.000000000 +0100
@@ -45,6 +45,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "ne3210"
+
 static int ne3210_open(struct net_device *dev);
 static int ne3210_close(struct net_device *dev);
 
@@ -111,13 +113,13 @@
 	device->driver_data = dev;
 	ioaddr = edev->base_addr;
 
-	if (!request_region(ioaddr, NE3210_IO_EXTENT, dev->name)) {
+	if (!request_region(ioaddr, NE3210_IO_EXTENT, DRV_NAME)) {
 		retval = -EBUSY;
 		goto out;
 	}
 
 	if (!request_region(ioaddr + NE3210_CFG1,
-			    NE3210_CFG_EXTENT, dev->name)) {
+			    NE3210_CFG_EXTENT, DRV_NAME)) {
 		retval = -EBUSY;
 		goto out1;
 	}
@@ -140,7 +142,7 @@
 	dev->irq = irq_map[(inb(ioaddr + NE3210_CFG2) >> 3) & 0x07];
 	printk(".\nne3210.c: using IRQ %d, ", dev->irq);
 
-	retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev);
+	retval = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev);
 	if (retval) {
 		printk (" unable to get IRQ %d.\n", dev->irq);
 		goto out2;
@@ -163,7 +165,7 @@
 		}
 	}
 	
-	if (!request_mem_region (phys_mem, NE3210_STOP_PG*0x100, dev->name)) {
+	if (!request_mem_region (phys_mem, NE3210_STOP_PG*0x100, DRV_NAME)) {
 		printk ("ne3210.c: Unable to request shared memory at physical address %#lx\n",
 			phys_mem);
 		goto out3;
--- diff/drivers/net/ni52.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/ni52.c	2004-07-01 21:32:38.000000000 +0100
@@ -124,6 +124,8 @@
 
 #include "ni52.h"
 
+#define DRV_NAME "ni52"
+
 #define DEBUG       /* debug on */
 #define SYSBUSVAL 1 /* 8 Bit */
 
@@ -424,7 +426,7 @@
 	dev->mem_start = memstart;
 	dev->mem_end = memend;
 
-	if (!request_region(ioaddr, NI52_TOTAL_SIZE, dev->name))
+	if (!request_region(ioaddr, NI52_TOTAL_SIZE, DRV_NAME))
 		return -EBUSY;
 
 	if( !(inb(ioaddr+NI52_MAGIC1) == NI52_MAGICVAL1) ||
--- diff/drivers/net/ns83820.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/ns83820.c	2004-07-01 21:32:38.000000000 +0100
@@ -113,6 +113,8 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
+#define DRV_NAME "ns83820"
+
 /* Global parameters.  See MODULE_PARM near the bottom. */
 static int ihr = 2;
 static int reset_phy = 0;
@@ -1851,7 +1853,7 @@
 		0);
 
 	err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ,
-			  ndev->name, ndev);
+			  DRV_NAME, ndev);
 	if (err) {
 		printk(KERN_INFO "ns83820: unable to register irq %d\n",
 			pci_dev->irq);
--- diff/drivers/net/oaknet.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/oaknet.c	2004-07-01 21:32:38.000000000 +0100
@@ -164,7 +164,7 @@
 	ret = -EAGAIN;
 	if (request_irq(dev->irq, ei_interrupt, 0, name, dev)) {
 		printk("%s: unable to request interrupt %d.\n",
-		       dev->name, dev->irq);
+		       name, dev->irq);
 		goto out_region;
 	}
 
--- diff/drivers/net/pcmcia/3c574_cs.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/pcmcia/3c574_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -518,6 +518,7 @@
 
 	link->state &= ~DEV_CONFIG_PENDING;
 	link->dev = &lp->node;
+	SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
 	if (register_netdev(dev) != 0) {
 		printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
--- diff/drivers/net/pcmcia/3c589_cs.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/pcmcia/3c589_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -390,6 +390,7 @@
     
     link->dev = &lp->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if (register_netdev(dev) != 0) {
 	printk(KERN_ERR "3c589_cs: register_netdev() failed\n");
--- diff/drivers/net/pcmcia/axnet_cs.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/pcmcia/axnet_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -457,6 +457,7 @@
     info->phy_id = (i < 32) ? i : -1;
     link->dev = &info->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if (register_netdev(dev) != 0) {
 	printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n");
--- diff/drivers/net/pcmcia/com20020_cs.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/pcmcia/com20020_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -396,6 +396,7 @@
 
     link->dev = &info->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     i = com20020_found(dev, 0);	/* calls register_netdev */
     
--- diff/drivers/net/pcmcia/fmvj18x_cs.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/pcmcia/fmvj18x_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -590,6 +590,7 @@
     lp->cardtype = cardtype;
     link->dev = &lp->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if (register_netdev(dev) != 0) {
 	printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");
--- diff/drivers/net/pcmcia/ibmtr_cs.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/pcmcia/ibmtr_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -366,6 +366,7 @@
 
     link->dev = &info->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     i = ibmtr_probe_card(dev);
     if (i != 0) {
--- diff/drivers/net/pcmcia/nmclan_cs.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/pcmcia/nmclan_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -774,6 +774,7 @@
 
   link->dev = &lp->node;
   link->state &= ~DEV_CONFIG_PENDING;
+  SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
   i = register_netdev(dev);
   if (i != 0) {
--- diff/drivers/net/pcmcia/pcnet_cs.c	2004-06-30 14:25:47.000000000 +0100
+++ source/drivers/net/pcmcia/pcnet_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -721,6 +721,7 @@
 
     link->dev = &info->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
     dev->poll_controller = ei_poll;
--- diff/drivers/net/pcmcia/smc91c92_cs.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/pcmcia/smc91c92_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -1021,6 +1021,7 @@
 
     link->dev = &smc->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if (register_netdev(dev) != 0) {
 	printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
--- diff/drivers/net/pcmcia/xirc2ps_cs.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/pcmcia/xirc2ps_cs.c	2004-07-01 21:32:38.000000000 +0100
@@ -1120,6 +1120,7 @@
 
     link->dev = &local->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if ((err=register_netdev(dev))) {
 	printk(KNOT_XIRC "register_netdev() failed\n");
--- diff/drivers/net/pcnet32.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/pcnet32.c	2004-07-01 21:32:38.000000000 +0100
@@ -22,8 +22,8 @@
  *************************************************************************/
 
 #define DRV_NAME	"pcnet32"
-#define DRV_VERSION	"1.30c"
-#define DRV_RELDATE	"05.25.2004"
+#define DRV_VERSION	"1.30f"
+#define DRV_RELDATE	"06.16.2004"
 #define PFX		DRV_NAME ": "
 
 static const char *version =
@@ -245,6 +245,11 @@
  * v1.30b  24 May 2004 Don Fry fix bogus tx carrier errors with 79c973,
  *	   assisted by Bruce Penrod <bmpenrod@endruntechnologies.com>.
  * v1.30c  25 May 2004 Don Fry added netif_wake_queue after pcnet32_restart.
+ * v1.30d  01 Jun 2004 Don Fry discard oversize rx packets.
+ * v1.30e  11 Jun 2004 Don Fry recover after fifo error and rx hang.
+ * v1.30f  16 Jun 2004 Don Fry cleanup IRQ to allow 0 and 1 for PCI,
+ * 	   expanding on suggestions from Ralf Baechle <ralf@linux-mips.org>,
+ * 	   and Brian Murphy <brian@murphy.dk>.
  */
 
 
@@ -360,7 +365,7 @@
 
 static void pcnet32_probe_vlbus(void);
 static int  pcnet32_probe_pci(struct pci_dev *, const struct pci_device_id *);
-static int  pcnet32_probe1(unsigned long, unsigned int, int, struct pci_dev *);
+static int  pcnet32_probe1(unsigned long, int, struct pci_dev *);
 static int  pcnet32_open(struct net_device *);
 static int  pcnet32_init_ring(struct net_device *);
 static int  pcnet32_start_xmit(struct sk_buff *, struct net_device *);
@@ -958,7 +963,7 @@
 	if (request_region(ioaddr, PCNET32_TOTAL_SIZE, "pcnet32_probe_vlbus")) {
 	    /* check if there is really a pcnet chip on that ioaddr */
 	    if ((inb(ioaddr + 14) == 0x57) && (inb(ioaddr + 15) == 0x57)) {
-		pcnet32_probe1(ioaddr, 0, 0, NULL);
+		pcnet32_probe1(ioaddr, 0, NULL);
 	    } else {
 		release_region(ioaddr, PCNET32_TOTAL_SIZE);
 	    }
@@ -999,7 +1004,7 @@
 	return -EBUSY;
     }
 
-    return pcnet32_probe1(ioaddr, pdev->irq, 1, pdev);
+    return pcnet32_probe1(ioaddr, 1, pdev);
 }
 
 
@@ -1008,8 +1013,7 @@
  *  pdev will be NULL when called from pcnet32_probe_vlbus.
  */
 static int __devinit
-pcnet32_probe1(unsigned long ioaddr, unsigned int irq_line, int shared,
-		struct pci_dev *pdev)
+pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
 {
     struct pcnet32_private *lp;
     dma_addr_t lp_dma_addr;
@@ -1270,11 +1274,8 @@
     a->write_csr(ioaddr, 2, (lp->dma_addr + offsetof(struct pcnet32_private,
 		    init_block)) >> 16);
 
-    if (irq_line) {
-	dev->irq = irq_line;
-    }
-
-    if (dev->irq >= 2) {
+    if (pdev) {		/* use the IRQ provided by PCI */
+	dev->irq = pdev->irq;
 	if (pcnet32_debug & NETIF_MSG_PROBE)
 	    printk(" assigned IRQ %d.\n", dev->irq);
     } else {
@@ -1362,8 +1363,7 @@
     int rc;
     unsigned long flags;
 
-    if (dev->irq == 0 ||
-	request_irq(dev->irq, &pcnet32_interrupt,
+    if (request_irq(dev->irq, &pcnet32_interrupt,
 		    lp->shared_irq ? SA_SHIRQ : 0, dev->name, (void *)dev)) {
 	return -EAGAIN;
     }
@@ -1531,13 +1531,15 @@
     int i;
 
     for (i = 0; i < TX_RING_SIZE; i++) {
+	lp->tx_ring[i].status = 0;	/* CPU owns buffer */
+	wmb();	/* Make sure adapter sees owner change */
 	if (lp->tx_skbuff[i]) {
 	    pci_unmap_single(lp->pci_dev, lp->tx_dma_addr[i],
 		    lp->tx_skbuff[i]->len, PCI_DMA_TODEVICE);
 	    dev_kfree_skb_any(lp->tx_skbuff[i]);
-	    lp->tx_skbuff[i] = NULL;
-	    lp->tx_dma_addr[i] = 0;
 	}
+	lp->tx_skbuff[i] = NULL;
+	lp->tx_dma_addr[i] = 0;
     }
 }
 
@@ -1566,21 +1568,23 @@
 	    skb_reserve (rx_skbuff, 2);
 	}
 
+	rmb();
 	if (lp->rx_dma_addr[i] == 0)
 	    lp->rx_dma_addr[i] = pci_map_single(lp->pci_dev, rx_skbuff->tail,
 		    PKT_BUF_SZ-2, PCI_DMA_FROMDEVICE);
 	lp->rx_ring[i].base = (u32)le32_to_cpu(lp->rx_dma_addr[i]);
 	lp->rx_ring[i].buf_length = le16_to_cpu(2-PKT_BUF_SZ);
+	wmb();	/* Make sure owner changes after all others are visible */
 	lp->rx_ring[i].status = le16_to_cpu(0x8000);
     }
     /* The Tx buffer address is filled in as needed, but we do need to clear
      * the upper ownership bit. */
     for (i = 0; i < TX_RING_SIZE; i++) {
+	lp->tx_ring[i].status = 0;	/* CPU owns buffer */
+	wmb();	/* Make sure adapter sees owner change */
 	lp->tx_ring[i].base = 0;
-	lp->tx_ring[i].status = 0;
 	lp->tx_dma_addr[i] = 0;
     }
-    wmb(); /* Make sure all changes are visible */
 
     lp->init_block.tlen_rlen = le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS);
     for (i = 0; i < 6; i++)
@@ -1589,9 +1593,14 @@
 	    offsetof(struct pcnet32_private, rx_ring));
     lp->init_block.tx_ring = (u32)le32_to_cpu(lp->dma_addr +
 	    offsetof(struct pcnet32_private, tx_ring));
+    wmb();	/* Make sure all changes are visible */
     return 0;
 }
 
+/* the pcnet32 has been issued a stop or reset.  Wait for the stop bit
+ * then flush the pending transmit operations, re-initialize the ring,
+ * and tell the chip to initialize.
+ */
 static void
 pcnet32_restart(struct net_device *dev, unsigned int csr0_bits)
 {
@@ -1599,6 +1608,15 @@
     unsigned long ioaddr = dev->base_addr;
     int i;
 
+    /* wait for stop */
+    for (i=0; i<100; i++)
+	if (lp->a.read_csr(ioaddr, 0) & 0x0004)
+	   break;
+
+    if (i >= 100 && netif_msg_drv(lp))
+	printk(KERN_ERR "%s: pcnet32_restart timed out waiting for stop.\n",
+		dev->name);
+
     pcnet32_purge_tx_ring(dev);
     if (pcnet32_init_ring(dev))
 	return;
@@ -1857,15 +1875,16 @@
 	}
 
 	if (must_restart) {
-	    /* stop the chip to clear the error condition, then restart */
-	    lp->a.write_csr (ioaddr, 0, 0x0004);
+	    /* reset the chip to clear the error condition, then restart */
+	    lp->a.reset(ioaddr);
+	    lp->a.write_csr(ioaddr, 4, 0x0915);
 	    pcnet32_restart(dev, 0x0002);
 	    netif_wake_queue(dev);
 	}
     }
 
-    /* Clear any other interrupt, and set interrupt enable. */
-    lp->a.write_csr (ioaddr, 0, 0x7940);
+    /* Set interrupt enable. */
+    lp->a.write_csr (ioaddr, 0, 0x0040);
     lp->a.write_rap (ioaddr,rap);
 
     if (netif_msg_intr(lp))
@@ -1907,7 +1926,13 @@
 	    short pkt_len = (le32_to_cpu(lp->rx_ring[entry].msg_length) & 0xfff)-4;
 	    struct sk_buff *skb;
 
-	    if (pkt_len < 60) {
+	    /* Discard oversize frames. */
+	    if (unlikely(pkt_len > PKT_BUF_SZ - 2)) {
+		if (netif_msg_drv(lp))
+		    printk(KERN_ERR "%s: Impossible packet size %d!\n",
+			    dev->name, pkt_len);
+		lp->stats.rx_errors++;
+	    } else if (pkt_len < 60) {
 		if (netif_msg_rx_err(lp))
 		    printk(KERN_ERR "%s: Runt packet!\n", dev->name);
 		lp->stats.rx_errors++;
--- diff/drivers/net/ppp_async.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/ppp_async.c	2004-07-01 21:32:38.000000000 +0100
@@ -24,6 +24,7 @@
 #include <linux/tty.h>
 #include <linux/netdevice.h>
 #include <linux/poll.h>
+#include <linux/crc16.h>
 #include <linux/ppp_defs.h>
 #include <linux/if_ppp.h>
 #include <linux/ppp_channel.h>
@@ -238,7 +239,7 @@
  */
 static ssize_t
 ppp_asynctty_read(struct tty_struct *tty, struct file *file,
-		  unsigned char *buf, size_t count)
+		  unsigned char __user *buf, size_t count)
 {
 	return -EAGAIN;
 }
@@ -249,7 +250,7 @@
  */
 static ssize_t
 ppp_asynctty_write(struct tty_struct *tty, struct file *file,
-		   const unsigned char *buf, size_t count)
+		   const unsigned char __user *buf, size_t count)
 {
 	return -EAGAIN;
 }
@@ -260,6 +261,7 @@
 {
 	struct asyncppp *ap = ap_get(tty);
 	int err, val;
+	int __user *p = (int __user *)arg;
 
 	if (ap == 0)
 		return -ENXIO;
@@ -270,7 +272,7 @@
 		if (ap == 0)
 			break;
 		err = -EFAULT;
-		if (put_user(ppp_channel_index(&ap->chan), (int *) arg))
+		if (put_user(ppp_channel_index(&ap->chan), p))
 			break;
 		err = 0;
 		break;
@@ -280,7 +282,7 @@
 		if (ap == 0)
 			break;
 		err = -EFAULT;
-		if (put_user(ppp_unit_number(&ap->chan), (int *) arg))
+		if (put_user(ppp_unit_number(&ap->chan), p))
 			break;
 		err = 0;
 		break;
@@ -299,7 +301,7 @@
 
 	case FIONREAD:
 		val = 0;
-		if (put_user(val, (int *) arg))
+		if (put_user(val, p))
 			break;
 		err = 0;
 		break;
@@ -397,6 +399,8 @@
 ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
 {
 	struct asyncppp *ap = chan->private;
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 	int err, val;
 	u32 accm[8];
 
@@ -404,12 +408,12 @@
 	switch (cmd) {
 	case PPPIOCGFLAGS:
 		val = ap->flags | ap->rbits;
-		if (put_user(val, (int *) arg))
+		if (put_user(val, p))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSFLAGS:
-		if (get_user(val, (int *) arg))
+		if (get_user(val, p))
 			break;
 		ap->flags = val & ~SC_RCV_BITS;
 		spin_lock_irq(&ap->recv_lock);
@@ -419,34 +423,34 @@
 		break;
 
 	case PPPIOCGASYNCMAP:
-		if (put_user(ap->xaccm[0], (u32 *) arg))
+		if (put_user(ap->xaccm[0], (u32 __user *)argp))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSASYNCMAP:
-		if (get_user(ap->xaccm[0], (u32 *) arg))
+		if (get_user(ap->xaccm[0], (u32 __user *)argp))
 			break;
 		err = 0;
 		break;
 
 	case PPPIOCGRASYNCMAP:
-		if (put_user(ap->raccm, (u32 *) arg))
+		if (put_user(ap->raccm, (u32 __user *)argp))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSRASYNCMAP:
-		if (get_user(ap->raccm, (u32 *) arg))
+		if (get_user(ap->raccm, (u32 __user *)argp))
 			break;
 		err = 0;
 		break;
 
 	case PPPIOCGXASYNCMAP:
-		if (copy_to_user((void __user *) arg, ap->xaccm, sizeof(ap->xaccm)))
+		if (copy_to_user(argp, ap->xaccm, sizeof(ap->xaccm)))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSXASYNCMAP:
-		if (copy_from_user(accm, (void __user *) arg, sizeof(accm)))
+		if (copy_from_user(accm, argp, sizeof(accm)))
 			break;
 		accm[2] &= ~0x40000000U;	/* can't escape 0x5e */
 		accm[3] |= 0x60000000U;		/* must escape 0x7d, 0x7e */
@@ -455,12 +459,12 @@
 		break;
 
 	case PPPIOCGMRU:
-		if (put_user(ap->mru, (int *) arg))
+		if (put_user(ap->mru, p))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSMRU:
-		if (get_user(val, (int *) arg))
+		if (get_user(val, p))
 			break;
 		if (val < PPP_MRU)
 			val = PPP_MRU;
@@ -501,43 +505,6 @@
  * Procedures for encapsulation and framing.
  */
 
-u16 ppp_crc16_table[256] = {
-	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
-	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
-	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
-	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
-	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
-	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
-	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
-	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
-	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
-	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
-	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
-	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
-	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
-	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
-	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
-	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
-	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
-	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
-	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
-	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
-	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
-	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
-	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
-	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
-	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
-	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
-	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
-	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
-	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
-	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
-	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
-	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
-};
-EXPORT_SYMBOL(ppp_crc16_table);
-#define fcstab	ppp_crc16_table		/* for PPP_FCS macro */
-
 /*
  * Procedure to encode the data for async serial transmission.
  * Does octet stuffing (escaping), puts the address/control bytes
--- diff/drivers/net/ppp_generic.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/ppp_generic.c	2004-07-01 21:32:38.000000000 +0100
@@ -129,8 +129,9 @@
 #endif /* CONFIG_PPP_MULTILINK */
 	struct net_device_stats stats;	/* statistics */
 #ifdef CONFIG_PPP_FILTER
-	struct sock_fprog pass_filter;	/* filter for packets to pass */
-	struct sock_fprog active_filter;/* filter for pkts to reset idle */
+	struct sock_filter *pass_filter;	/* filter for packets to pass */
+	struct sock_filter *active_filter;/* filter for pkts to reset idle */
+	unsigned pass_len, active_len;
 #endif /* CONFIG_PPP_FILTER */
 };
 
@@ -493,6 +494,45 @@
 	return mask;
 }
 
+#ifdef CONFIG_PPP_FILTER
+static int get_filter(void __user *arg, struct sock_filter **p)
+{
+	struct sock_fprog uprog;
+	struct sock_filter *code = NULL;
+	int len, err;
+
+	if (copy_from_user(&uprog, arg, sizeof(uprog)))
+		return -EFAULT;
+
+	if (uprog.len > BPF_MAXINSNS)
+		return -EINVAL;
+
+	if (!uprog.len) {
+		*p = NULL;
+		return 0;
+	}
+
+	len = uprog.len * sizeof(struct sock_filter);
+	code = kmalloc(len, GFP_KERNEL);
+	if (code == NULL)
+		return -ENOMEM;
+
+	if (copy_from_user(code, uprog.filter, len)) {
+		kfree(code);
+		return -EFAULT;
+	}
+
+	err = sk_chk_filter(code, uprog.len);
+	if (err) {
+		kfree(code);
+		return err;
+	}
+
+	*p = code;
+	return uprog.len;
+}
+#endif /* CONFIG_PPP_FILTER */
+
 static int ppp_ioctl(struct inode *inode, struct file *file,
 		     unsigned int cmd, unsigned long arg)
 {
@@ -503,6 +543,8 @@
 	struct npioctl npi;
 	int unit, cflags;
 	struct slcompress *vj;
+	void __user *argp = (void __user *)arg;
+	int __user *p = argp;
 
 	if (pf == 0)
 		return ppp_unattached_ioctl(pf, file, cmd, arg);
@@ -540,7 +582,7 @@
 
 		switch (cmd) {
 		case PPPIOCCONNECT:
-			if (get_user(unit, (int *) arg))
+			if (get_user(unit, p))
 				break;
 			err = ppp_connect_channel(pch, unit);
 			break;
@@ -569,14 +611,14 @@
 	ppp = PF_TO_PPP(pf);
 	switch (cmd) {
 	case PPPIOCSMRU:
-		if (get_user(val, (int *) arg))
+		if (get_user(val, p))
 			break;
 		ppp->mru = val;
 		err = 0;
 		break;
 
 	case PPPIOCSFLAGS:
-		if (get_user(val, (int *) arg))
+		if (get_user(val, p))
 			break;
 		ppp_lock(ppp);
 		cflags = ppp->flags & ~val;
@@ -589,7 +631,7 @@
 
 	case PPPIOCGFLAGS:
 		val = ppp->flags | ppp->xstate | ppp->rstate;
-		if (put_user(val, (int *) arg))
+		if (put_user(val, p))
 			break;
 		err = 0;
 		break;
@@ -599,20 +641,20 @@
 		break;
 
 	case PPPIOCGUNIT:
-		if (put_user(ppp->file.index, (int *) arg))
+		if (put_user(ppp->file.index, p))
 			break;
 		err = 0;
 		break;
 
 	case PPPIOCSDEBUG:
-		if (get_user(val, (int *) arg))
+		if (get_user(val, p))
 			break;
 		ppp->debug = val;
 		err = 0;
 		break;
 
 	case PPPIOCGDEBUG:
-		if (put_user(ppp->debug, (int *) arg))
+		if (put_user(ppp->debug, p))
 			break;
 		err = 0;
 		break;
@@ -620,13 +662,13 @@
 	case PPPIOCGIDLE:
 		idle.xmit_idle = (jiffies - ppp->last_xmit) / HZ;
 		idle.recv_idle = (jiffies - ppp->last_recv) / HZ;
-		if (copy_to_user((void __user *) arg, &idle, sizeof(idle)))
+		if (copy_to_user(argp, &idle, sizeof(idle)))
 			break;
 		err = 0;
 		break;
 
 	case PPPIOCSMAXCID:
-		if (get_user(val, (int *) arg))
+		if (get_user(val, p))
 			break;
 		val2 = 15;
 		if ((val >> 16) != 0) {
@@ -649,7 +691,7 @@
 
 	case PPPIOCGNPMODE:
 	case PPPIOCSNPMODE:
-		if (copy_from_user(&npi, (void __user *) arg, sizeof(npi)))
+		if (copy_from_user(&npi, argp, sizeof(npi)))
 			break;
 		err = proto_to_npindex(npi.protocol);
 		if (err < 0)
@@ -658,7 +700,7 @@
 		if (cmd == PPPIOCGNPMODE) {
 			err = -EFAULT;
 			npi.mode = ppp->npmode[i];
-			if (copy_to_user((void __user *) arg, &npi, sizeof(npi)))
+			if (copy_to_user(argp, &npi, sizeof(npi)))
 				break;
 		} else {
 			ppp->npmode[i] = npi.mode;
@@ -670,49 +712,38 @@
 
 #ifdef CONFIG_PPP_FILTER
 	case PPPIOCSPASS:
+	{
+		struct sock_filter *code;
+		err = get_filter(argp, &code);
+		if (err >= 0) {
+			ppp_lock(ppp);
+			kfree(ppp->pass_filter);
+			ppp->pass_filter = code;
+			ppp->pass_len = err;
+			ppp_unlock(ppp);
+			err = 0;
+		}
+		break;
+	}
 	case PPPIOCSACTIVE:
 	{
-		struct sock_fprog uprog, *filtp;
-		struct sock_filter *code = NULL;
-		int len;
-
-		if (copy_from_user(&uprog, (void __user *) arg, sizeof(uprog)))
-			break;
-		err = -EINVAL;
-		if (uprog.len > BPF_MAXINSNS)
-			break;
-		err = -ENOMEM;
-		if (uprog.len > 0) {
-			len = uprog.len * sizeof(struct sock_filter);
-			code = kmalloc(len, GFP_KERNEL);
-			if (code == NULL)
-				break;
-			err = -EFAULT;
-			if (copy_from_user(code, (void __user *) uprog.filter, len)) {
-				kfree(code);
-				break;
-			}
-			err = sk_chk_filter(code, uprog.len);
-			if (err) {
-				kfree(code);
-				break;
-			}
+		struct sock_filter *code;
+		err = get_filter(argp, &code);
+		if (err >= 0) {
+			ppp_lock(ppp);
+			kfree(ppp->active_filter);
+			ppp->active_filter = code;
+			ppp->active_len = err;
+			ppp_unlock(ppp);
+			err = 0;
 		}
-		filtp = (cmd == PPPIOCSPASS)? &ppp->pass_filter: &ppp->active_filter;
-		ppp_lock(ppp);
-		if (filtp->filter)
-			kfree(filtp->filter);
-		filtp->filter = code;
-		filtp->len = uprog.len;
-		ppp_unlock(ppp);
-		err = 0;
 		break;
 	}
 #endif /* CONFIG_PPP_FILTER */
 
 #ifdef CONFIG_PPP_MULTILINK
 	case PPPIOCSMRRU:
-		if (get_user(val, (int *) arg))
+		if (get_user(val, p))
 			break;
 		ppp_recv_lock(ppp);
 		ppp->mrru = val;
@@ -734,11 +765,12 @@
 	int unit, err = -EFAULT;
 	struct ppp *ppp;
 	struct channel *chan;
+	int __user *p = (int __user *)arg;
 
 	switch (cmd) {
 	case PPPIOCNEWUNIT:
 		/* Create a new ppp unit */
-		if (get_user(unit, (int *) arg))
+		if (get_user(unit, p))
 			break;
 		ppp = ppp_create_interface(unit, &err);
 		if (ppp == 0)
@@ -746,14 +778,14 @@
 		file->private_data = &ppp->file;
 		ppp->owner = file;
 		err = -EFAULT;
-		if (put_user(ppp->file.index, (int *) arg))
+		if (put_user(ppp->file.index, p))
 			break;
 		err = 0;
 		break;
 
 	case PPPIOCATTACH:
 		/* Attach to an existing ppp unit */
-		if (get_user(unit, (int *) arg))
+		if (get_user(unit, p))
 			break;
 		down(&all_ppp_sem);
 		err = -ENXIO;
@@ -767,7 +799,7 @@
 		break;
 
 	case PPPIOCATTCHAN:
-		if (get_user(unit, (int *) arg))
+		if (get_user(unit, p))
 			break;
 		spin_lock_bh(&all_channels_lock);
 		err = -ENXIO;
@@ -999,18 +1031,18 @@
 
 			*p = htons(4); /* indicate outbound in DLT_LINUX_SLL */;
 		}
-		if (ppp->pass_filter.filter
-		    && sk_run_filter(skb, ppp->pass_filter.filter,
-				     ppp->pass_filter.len) == 0) {
+		if (ppp->pass_filter
+		    && sk_run_filter(skb, ppp->pass_filter,
+				     ppp->pass_len) == 0) {
 			if (ppp->debug & 1)
 				printk(KERN_DEBUG "PPP: outbound frame not passed\n");
 			kfree_skb(skb);
 			return;
 		}
 		/* if this packet passes the active filter, record the time */
-		if (!(ppp->active_filter.filter
-		      && sk_run_filter(skb, ppp->active_filter.filter,
-				       ppp->active_filter.len) == 0))
+		if (!(ppp->active_filter
+		      && sk_run_filter(skb, ppp->active_filter,
+				       ppp->active_len) == 0))
 			ppp->last_xmit = jiffies;
 		skb_pull(skb, 2);
 #else
@@ -1546,17 +1578,17 @@
 
 			*p = 0; /* indicate inbound in DLT_LINUX_SLL */
 		}
-		if (ppp->pass_filter.filter
-		    && sk_run_filter(skb, ppp->pass_filter.filter,
-				     ppp->pass_filter.len) == 0) {
+		if (ppp->pass_filter
+		    && sk_run_filter(skb, ppp->pass_filter,
+				     ppp->pass_len) == 0) {
 			if (ppp->debug & 1)
 				printk(KERN_DEBUG "PPP: inbound frame not passed\n");
 			kfree_skb(skb);
 			return;
 		}
-		if (!(ppp->active_filter.filter
-		      && sk_run_filter(skb, ppp->active_filter.filter,
-				       ppp->active_filter.len) == 0))
+		if (!(ppp->active_filter
+		      && sk_run_filter(skb, ppp->active_filter,
+				       ppp->active_len) == 0))
 			ppp->last_recv = jiffies;
 		skb_pull(skb, 2);
 #else
@@ -2423,13 +2455,13 @@
 	skb_queue_purge(&ppp->mrq);
 #endif /* CONFIG_PPP_MULTILINK */
 #ifdef CONFIG_PPP_FILTER
-	if (ppp->pass_filter.filter) {
-		kfree(ppp->pass_filter.filter);
-		ppp->pass_filter.filter = NULL;
-	}
-	if (ppp->active_filter.filter) {
-		kfree(ppp->active_filter.filter);
-		ppp->active_filter.filter = 0;
+	if (ppp->pass_filter) {
+		kfree(ppp->pass_filter);
+		ppp->pass_filter = NULL;
+	}
+	if (ppp->active_filter) {
+		kfree(ppp->active_filter);
+		ppp->active_filter = 0;
 	}
 #endif /* CONFIG_PPP_FILTER */
 
--- diff/drivers/net/ppp_synctty.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/ppp_synctty.c	2004-07-01 21:32:38.000000000 +0100
@@ -29,7 +29,7 @@
  * PPP driver, written by Michael Callahan and Al Longyear, and
  * subsequently hacked by Paul Mackerras.
  *
- * ==FILEVERSION 20020125==
+ * ==FILEVERSION 20040616==
  */
 
 #include <linux/module.h>
@@ -65,7 +65,9 @@
 	struct sk_buff	*tpkt;
 	unsigned long	last_xmit;
 
-	struct sk_buff	*rpkt;
+	struct sk_buff_head rqueue;
+
+	struct tasklet_struct tsk;
 
 	atomic_t	refcnt;
 	struct semaphore dead_sem;
@@ -88,6 +90,7 @@
 static int ppp_sync_send(struct ppp_channel *chan, struct sk_buff *skb);
 static int ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd,
 			  unsigned long arg);
+static void ppp_sync_process(unsigned long arg);
 static int ppp_sync_push(struct syncppp *ap);
 static void ppp_sync_flush_output(struct syncppp *ap);
 static void ppp_sync_input(struct syncppp *ap, const unsigned char *buf,
@@ -217,6 +220,9 @@
 	ap->xaccm[3] = 0x60000000U;
 	ap->raccm = ~0U;
 
+	skb_queue_head_init(&ap->rqueue);
+	tasklet_init(&ap->tsk, ppp_sync_process, (unsigned long) ap);
+
 	atomic_set(&ap->refcnt, 1);
 	init_MUTEX_LOCKED(&ap->dead_sem);
 
@@ -267,10 +273,10 @@
 	 */
 	if (!atomic_dec_and_test(&ap->refcnt))
 		down(&ap->dead_sem);
+	tasklet_kill(&ap->tsk);
 
 	ppp_unregister_channel(&ap->chan);
-	if (ap->rpkt != 0)
-		kfree_skb(ap->rpkt);
+	skb_queue_purge(&ap->rqueue);
 	if (ap->tpkt != 0)
 		kfree_skb(ap->tpkt);
 	kfree(ap);
@@ -282,7 +288,7 @@
  */
 static ssize_t
 ppp_sync_read(struct tty_struct *tty, struct file *file,
-	       unsigned char *buf, size_t count)
+	       unsigned char __user *buf, size_t count)
 {
 	return -EAGAIN;
 }
@@ -293,7 +299,7 @@
  */
 static ssize_t
 ppp_sync_write(struct tty_struct *tty, struct file *file,
-		const unsigned char *buf, size_t count)
+		const unsigned char __user *buf, size_t count)
 {
 	return -EAGAIN;
 }
@@ -303,6 +309,7 @@
 		  unsigned int cmd, unsigned long arg)
 {
 	struct syncppp *ap = sp_get(tty);
+	int __user *p = (int __user *)arg;
 	int err, val;
 
 	if (ap == 0)
@@ -314,7 +321,7 @@
 		if (ap == 0)
 			break;
 		err = -EFAULT;
-		if (put_user(ppp_channel_index(&ap->chan), (int *) arg))
+		if (put_user(ppp_channel_index(&ap->chan), p))
 			break;
 		err = 0;
 		break;
@@ -324,7 +331,7 @@
 		if (ap == 0)
 			break;
 		err = -EFAULT;
-		if (put_user(ppp_unit_number(&ap->chan), (int *) arg))
+		if (put_user(ppp_unit_number(&ap->chan), p))
 			break;
 		err = 0;
 		break;
@@ -343,7 +350,7 @@
 
 	case FIONREAD:
 		val = 0;
-		if (put_user(val, (int *) arg))
+		if (put_user(val, p))
 			break;
 		err = 0;
 		break;
@@ -369,17 +376,24 @@
 	return 65535;
 }
 
+/*
+ * This can now be called from hard interrupt level as well
+ * as soft interrupt level or mainline.
+ */
 static void
 ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
-		  char *flags, int count)
+		  char *cflags, int count)
 {
 	struct syncppp *ap = sp_get(tty);
+	unsigned long flags;
 
 	if (ap == 0)
 		return;
-	spin_lock_bh(&ap->recv_lock);
-	ppp_sync_input(ap, buf, flags, count);
-	spin_unlock_bh(&ap->recv_lock);
+	spin_lock_irqsave(&ap->recv_lock, flags);
+	ppp_sync_input(ap, buf, cflags, count);
+	spin_unlock_irqrestore(&ap->recv_lock, flags);
+	if (skb_queue_len(&ap->rqueue))
+		tasklet_schedule(&ap->tsk);
 	sp_put(ap);
 	if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
 	    && tty->driver->unthrottle)
@@ -394,8 +408,8 @@
 	clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
 	if (ap == 0)
 		return;
-	if (ppp_sync_push(ap))
-		ppp_output_wakeup(&ap->chan);
+	set_bit(XMIT_WAKEUP, &ap->xmit_flags);
+	tasklet_schedule(&ap->tsk);
 	sp_put(ap);
 }
 
@@ -436,54 +450,56 @@
 	struct syncppp *ap = chan->private;
 	int err, val;
 	u32 accm[8];
+	void __user *argp = (void __user *)arg;
+	u32 __user *p = argp;
 
 	err = -EFAULT;
 	switch (cmd) {
 	case PPPIOCGFLAGS:
 		val = ap->flags | ap->rbits;
-		if (put_user(val, (int *) arg))
+		if (put_user(val, (int __user *) argp))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSFLAGS:
-		if (get_user(val, (int *) arg))
+		if (get_user(val, (int __user *) argp))
 			break;
 		ap->flags = val & ~SC_RCV_BITS;
-		spin_lock_bh(&ap->recv_lock);
+		spin_lock_irq(&ap->recv_lock);
 		ap->rbits = val & SC_RCV_BITS;
-		spin_unlock_bh(&ap->recv_lock);
+		spin_unlock_irq(&ap->recv_lock);
 		err = 0;
 		break;
 
 	case PPPIOCGASYNCMAP:
-		if (put_user(ap->xaccm[0], (u32 *) arg))
+		if (put_user(ap->xaccm[0], p))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSASYNCMAP:
-		if (get_user(ap->xaccm[0], (u32 *) arg))
+		if (get_user(ap->xaccm[0], p))
 			break;
 		err = 0;
 		break;
 
 	case PPPIOCGRASYNCMAP:
-		if (put_user(ap->raccm, (u32 *) arg))
+		if (put_user(ap->raccm, p))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSRASYNCMAP:
-		if (get_user(ap->raccm, (u32 *) arg))
+		if (get_user(ap->raccm, p))
 			break;
 		err = 0;
 		break;
 
 	case PPPIOCGXASYNCMAP:
-		if (copy_to_user((void *) arg, ap->xaccm, sizeof(ap->xaccm)))
+		if (copy_to_user(argp, ap->xaccm, sizeof(ap->xaccm)))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSXASYNCMAP:
-		if (copy_from_user(accm, (void *) arg, sizeof(accm)))
+		if (copy_from_user(accm, argp, sizeof(accm)))
 			break;
 		accm[2] &= ~0x40000000U;	/* can't escape 0x5e */
 		accm[3] |= 0x60000000U;		/* must escape 0x7d, 0x7e */
@@ -492,12 +508,12 @@
 		break;
 
 	case PPPIOCGMRU:
-		if (put_user(ap->mru, (int *) arg))
+		if (put_user(ap->mru, (int __user *) argp))
 			break;
 		err = 0;
 		break;
 	case PPPIOCSMRU:
-		if (get_user(val, (int *) arg))
+		if (get_user(val, (int __user *) argp))
 			break;
 		if (val < PPP_MRU)
 			val = PPP_MRU;
@@ -512,6 +528,32 @@
 }
 
 /*
+ * This is called at softirq level to deliver received packets
+ * to the ppp_generic code, and to tell the ppp_generic code
+ * if we can accept more output now.
+ */
+static void ppp_sync_process(unsigned long arg)
+{
+	struct syncppp *ap = (struct syncppp *) arg;
+	struct sk_buff *skb;
+
+	/* process received packets */
+	while ((skb = skb_dequeue(&ap->rqueue)) != NULL) {
+		if (skb->len == 0) {
+			/* zero length buffers indicate error */
+			ppp_input_error(&ap->chan, 0);
+			kfree_skb(skb);
+		}
+		else
+			ppp_input(&ap->chan, skb);
+	}
+
+	/* try to push more stuff out */
+	if (test_bit(XMIT_WAKEUP, &ap->xmit_flags) && ppp_sync_push(ap))
+		ppp_output_wakeup(&ap->chan);
+}
+
+/*
  * Procedures for encapsulation and framing.
  */
 
@@ -600,7 +642,6 @@
 	struct tty_struct *tty = ap->tty;
 	int tty_stuffed = 0;
 
-	set_bit(XMIT_WAKEUP, &ap->xmit_flags);
 	if (!spin_trylock_bh(&ap->xmit_lock))
 		return 0;
 	for (;;) {
@@ -667,15 +708,44 @@
  * Receive-side routines.
  */
 
-static inline void
-process_input_packet(struct syncppp *ap)
+/* called when the tty driver has data for us.
+ *
+ * Data is frame oriented: each call to ppp_sync_input is considered
+ * a whole frame. If the 1st flag byte is non-zero then the whole
+ * frame is considered to be in error and is tossed.
+ */
+static void
+ppp_sync_input(struct syncppp *ap, const unsigned char *buf,
+		char *flags, int count)
 {
 	struct sk_buff *skb;
 	unsigned char *p;
-	int code = 0;
 
-	skb = ap->rpkt;
-	ap->rpkt = 0;
+	if (count == 0)
+		return;
+
+	if (ap->flags & SC_LOG_INPKT)
+		ppp_print_buffer ("receive buffer", buf, count);
+
+	/* stuff the chars in the skb */
+	if ((skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2)) == 0) {
+		printk(KERN_ERR "PPPsync: no memory (input pkt)\n");
+		goto err;
+	}
+	/* Try to get the payload 4-byte aligned */
+	if (buf[0] != PPP_ALLSTATIONS)
+		skb_reserve(skb, 2 + (buf[0] & 1));
+
+	if (flags != 0 && *flags) {
+		/* error flag set, ignore frame */
+		goto err;
+	} else if (count > skb_tailroom(skb)) {
+		/* packet overflowed MRU */
+		goto err;
+	}
+
+	p = skb_put(skb, count);
+	memcpy(p, buf, count);
 
 	/* strip address/control field if present */
 	p = skb->data;
@@ -693,59 +763,15 @@
 	} else if (skb->len < 2)
 		goto err;
 
-	/* pass to generic layer */
-	ppp_input(&ap->chan, skb);
+	/* queue the frame to be processed */
+	skb_queue_tail(&ap->rqueue, skb);
 	return;
 
- err:
-	kfree_skb(skb);
-	ppp_input_error(&ap->chan, code);
-}
-
-/* called when the tty driver has data for us. 
- *
- * Data is frame oriented: each call to ppp_sync_input is considered
- * a whole frame. If the 1st flag byte is non-zero then the whole
- * frame is considered to be in error and is tossed.
- */
-static void
-ppp_sync_input(struct syncppp *ap, const unsigned char *buf,
-		char *flags, int count)
-{
-	struct sk_buff *skb;
-	unsigned char *sp;
-
-	if (count == 0)
-		return;
-
-	/* if flag set, then error, ignore frame */
-	if (flags != 0 && *flags) {
-		ppp_input_error(&ap->chan, *flags);
-		return;
-	}
-
-	if (ap->flags & SC_LOG_INPKT)
-		ppp_print_buffer ("receive buffer", buf, count);
-
-	/* stuff the chars in the skb */
-	if ((skb = ap->rpkt) == 0) {
-		if ((skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2)) == 0) {
-			printk(KERN_ERR "PPPsync: no memory (input pkt)\n");
-			ppp_input_error(&ap->chan, 0);
-			return;
-		}
-		/* Try to get the payload 4-byte aligned */
-		if (buf[0] != PPP_ALLSTATIONS)
-			skb_reserve(skb, 2 + (buf[0] & 1));
-		ap->rpkt = skb;
-	}
-	if (count > skb_tailroom(skb)) {
-		/* packet overflowed MRU */
-		ppp_input_error(&ap->chan, 1);
-	} else {
-		sp = skb_put(skb, count);
-		memcpy(sp, buf, count);
-		process_input_packet(ap);
+err:
+	/* queue zero length packet as error indication */
+	if (skb || (skb = dev_alloc_skb(0))) {
+		skb_trim(skb, 0);
+		skb_queue_tail(&ap->rqueue, skb);
 	}
 }
 
--- diff/drivers/net/pppoe.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/pppoe.c	2004-07-01 21:32:38.000000000 +0100
@@ -691,7 +691,7 @@
 		if (put_user(po->pppoe_dev->mtu -
 			     sizeof(struct pppoe_hdr) -
 			     PPP_HDRLEN,
-			     (int *) arg))
+			     (int __user *) arg))
 			break;
 		err = 0;
 		break;
@@ -702,7 +702,7 @@
 			break;
 
 		err = -EFAULT;
-		if (get_user(val,(int *) arg))
+		if (get_user(val,(int __user *) arg))
 			break;
 
 		if (val < (po->pppoe_dev->mtu
@@ -715,7 +715,7 @@
 
 	case PPPIOCSFLAGS:
 		err = -EFAULT;
-		if (get_user(val, (int *) arg))
+		if (get_user(val, (int __user *) arg))
 			break;
 		err = 0;
 		break;
@@ -736,7 +736,7 @@
 		   PPPoE address to which frames are forwarded to */
 		err = -EFAULT;
 		if (copy_from_user(&po->pppoe_relay,
-				   (void*)arg,
+				   (void __user *)arg,
 				   sizeof(struct sockaddr_pppox)))
 			break;
 
--- diff/drivers/net/pppox.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/pppox.c	2004-07-01 21:32:38.000000000 +0100
@@ -86,7 +86,7 @@
 
 		rc = -EINVAL;
 		index = ppp_channel_index(&po->chan);
-		if (put_user(index , (int *) arg))
+		if (put_user(index , (int __user *) arg))
 			break;
 
 		rc = 0;
--- diff/drivers/net/r8169.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/r8169.c	2004-07-01 21:32:38.000000000 +0100
@@ -7,7 +7,7 @@
  Feb  4 2002	- created initially by ShuChen <shuchen@realtek.com.tw>.
  May 20 2002	- Add link status force-mode and TBI mode support.
 =========================================================================
-  1. The media can be forced in 5 modes.
+  1. [DEPRECATED: use ethtool instead] The media can be forced in 5 modes.
 	 Command: 'insmod r8169 media = SET_MEDIA'
 	 Ex:	  'insmod r8169 media = 0x04' will force PHY to operate in 100Mpbs Half-duplex.
 	
@@ -41,6 +41,7 @@
 #include <linux/etherdevice.h>
 #include <linux/delay.h>
 #include <linux/ethtool.h>
+#include <linux/mii.h>
 #include <linux/crc32.h>
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
@@ -64,6 +65,14 @@
 #define dprintk(fmt, args...)	do {} while (0)
 #endif /* RTL8169_DEBUG */
 
+#ifdef CONFIG_R8169_NAPI
+#define rtl8169_rx_skb			netif_receive_skb
+#define rtl8169_rx_quota(count, quota)	min(count, quota)
+#else
+#define rtl8169_rx_skb			netif_rx
+#define rtl8169_rx_quota(count, quota)	count
+#endif
+
 /* media options */
 #define MAX_UNITS 8
 static int media[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 };
@@ -90,15 +99,16 @@
 #define RxPacketMaxSize	0x0800	/* Maximum size supported is 16K-1 */
 #define InterFrameGap	0x03	/* 3 means InterFrameGap = the shortest one */
 
+#define R8169_NAPI_WEIGHT	64
 #define NUM_TX_DESC	64	/* Number of Tx descriptor registers */
-#define NUM_RX_DESC	64	/* Number of Rx descriptor registers */
+#define NUM_RX_DESC	256	/* Number of Rx descriptor registers */
 #define RX_BUF_SIZE	1536	/* Rx Buffer size */
 #define R8169_TX_RING_BYTES	(NUM_TX_DESC * sizeof(struct TxDesc))
 #define R8169_RX_RING_BYTES	(NUM_RX_DESC * sizeof(struct RxDesc))
 
 #define RTL_MIN_IO_SIZE 0x80
 #define RTL8169_TX_TIMEOUT	(6*HZ)
-#define RTL8169_PHY_TIMEOUT	(HZ) 
+#define RTL8169_PHY_TIMEOUT	(10*HZ)
 
 /* write/read MMIO register */
 #define RTL_W8(reg, val8)	writeb ((val8), ioaddr + (reg))
@@ -194,7 +204,7 @@
 	SWInt = 0x0100,
 	TxDescUnavail = 0x80,
 	RxFIFOOver = 0x40,
-	RxUnderrun = 0x20,
+	LinkChg = 0x20,
 	RxOverflow = 0x10,
 	TxErr = 0x08,
 	TxOK = 0x04,
@@ -233,6 +243,14 @@
 	TxInterFrameGapShift = 24,
 	TxDMAShift = 8,	/* DMA burst value (0-7) is shift this many bits */
 
+	/* TBICSR p.28 */
+	TBIReset	= 0x80000000,
+	TBILoopback	= 0x40000000,
+	TBINwEnable	= 0x20000000,
+	TBINwRestart	= 0x10000000,
+	TBILinkOk	= 0x02000000,
+	TBINwComplete	= 0x01000000,
+
 	/* CPlusCmd p.31 */
 	RxVlan		= (1 << 6),
 	RxChkSum	= (1 << 5),
@@ -306,10 +324,10 @@
 };
 
 struct rtl8169_private {
-	void *mmio_addr;	/* memory map physical address */
+	void *mmio_addr;		/* memory map physical address */
 	struct pci_dev *pci_dev;	/* Index of PCI device  */
 	struct net_device_stats stats;	/* statistics of net device */
-	spinlock_t lock;	/* spin lock flag */
+	spinlock_t lock;		/* spin lock flag */
 	int chipset;
 	int mac_version;
 	int phy_version;
@@ -317,15 +335,23 @@
 	u32 cur_tx; /* Index into the Tx descriptor buffer of next Rx pkt. */
 	u32 dirty_rx;
 	u32 dirty_tx;
-	struct TxDesc *TxDescArray;	/* Index of 256-alignment Tx Descriptor buffer */
-	struct RxDesc *RxDescArray;	/* Index of 256-alignment Rx Descriptor buffer */
+	struct TxDesc *TxDescArray;	/* 256-aligned Tx descriptor ring */
+	struct RxDesc *RxDescArray;	/* 256-aligned Rx descriptor ring */
 	dma_addr_t TxPhyAddr;
 	dma_addr_t RxPhyAddr;
 	struct sk_buff *Rx_skbuff[NUM_RX_DESC];	/* Rx data buffers */
-	struct sk_buff *Tx_skbuff[NUM_TX_DESC];	/* Index of Transmit data buffer */
+	struct sk_buff *Tx_skbuff[NUM_TX_DESC];	/* Tx data buffers */
 	struct timer_list timer;
-	unsigned long phy_link_down_cnt;
 	u16 cp_cmd;
+	u16 intr_mask;
+	int phy_auto_nego_reg;
+	int phy_1000_ctrl_reg;
+
+	int (*set_speed)(struct net_device *, u8 autoneg, u16 speed, u8 duplex);
+	void (*get_settings)(struct net_device *, struct ethtool_cmd *);
+	void (*phy_reset_enable)(void *);
+	unsigned int (*phy_reset_pending)(void *);
+	unsigned int (*link_ok)(void *);
 };
 
 MODULE_AUTHOR("Realtek");
@@ -344,9 +370,14 @@
 static void rtl8169_set_rx_mode(struct net_device *dev);
 static void rtl8169_tx_timeout(struct net_device *dev);
 static struct net_device_stats *rtl8169_get_stats(struct net_device *netdev);
+#ifdef CONFIG_R8169_NAPI
+static int rtl8169_poll(struct net_device *dev, int *budget);
+#endif
 
 static const u16 rtl8169_intr_mask =
-    RxUnderrun | RxOverflow | RxFIFOOver | TxErr | TxOK | RxErr | RxOK;
+	LinkChg | RxOverflow | RxFIFOOver | TxErr | TxOK | RxErr | RxOK;
+static const u16 rtl8169_napi_event =
+	RxOK | RxOverflow | RxFIFOOver | TxOK | TxErr;
 static const unsigned int rtl8169_rx_config =
     (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift);
 
@@ -364,11 +395,9 @@
 
 	for (i = 2000; i > 0; i--) {
 		// Check if the RTL8169 has completed writing to the specified MII register
-		if (!(RTL_R32(PHYAR) & 0x80000000)) {
+		if (!(RTL_R32(PHYAR) & 0x80000000)) 
 			break;
-		} else {
-			udelay(100);
-		}
+		udelay(100);
 	}
 }
 
@@ -390,18 +419,264 @@
 	return value;
 }
 
+static unsigned int rtl8169_tbi_reset_pending(void *ioaddr)
+{
+	return RTL_R32(TBICSR) & TBIReset;
+}
+
+static unsigned int rtl8169_xmii_reset_pending(void *ioaddr)
+{
+	return mdio_read(ioaddr, 0) & 0x8000;
+}
+
+static unsigned int rtl8169_tbi_link_ok(void *ioaddr)
+{
+	return RTL_R32(TBICSR) & TBILinkOk;
+}
+
+static unsigned int rtl8169_xmii_link_ok(void *ioaddr)
+{
+	return RTL_R8(PHYstatus) & LinkStatus;
+}
+
+static void rtl8169_tbi_reset_enable(void *ioaddr)
+{
+	RTL_W32(TBICSR, RTL_R32(TBICSR) | TBIReset);
+}
+
+static void rtl8169_xmii_reset_enable(void *ioaddr)
+{
+	unsigned int val;
+
+	val = (mdio_read(ioaddr, PHY_CTRL_REG) | 0x8000) & 0xffff;
+	mdio_write(ioaddr, PHY_CTRL_REG, val);
+}
+
+static void rtl8169_check_link_status(struct net_device *dev,
+				      struct rtl8169_private *tp, void *ioaddr)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&tp->lock, flags);
+	if (tp->link_ok(ioaddr)) {
+		netif_carrier_on(dev);
+		printk(KERN_INFO PFX "%s: link up\n", dev->name);
+	} else
+		netif_carrier_off(dev);
+	spin_unlock_irqrestore(&tp->lock, flags);
+}
+
+static void rtl8169_link_option(int idx, u8 *autoneg, u16 *speed, u8 *duplex)
+{
+	struct {
+		u16 speed;
+		u8 duplex;
+		u8 autoneg;
+		u8 media;
+	} link_settings[] = {
+		{ SPEED_10,	DUPLEX_HALF, AUTONEG_DISABLE,	_10_Half },
+		{ SPEED_10,	DUPLEX_FULL, AUTONEG_DISABLE,	_10_Full },
+		{ SPEED_100,	DUPLEX_HALF, AUTONEG_DISABLE,	_100_Half },
+		{ SPEED_100,	DUPLEX_FULL, AUTONEG_DISABLE,	_100_Full },
+		{ SPEED_1000,	DUPLEX_FULL, AUTONEG_DISABLE,	_1000_Full },
+		/* Make TBI happy */
+		{ SPEED_1000,	DUPLEX_FULL, AUTONEG_ENABLE,	0xff }
+	}, *p;
+	unsigned char option;
+	
+	option = ((idx < MAX_UNITS) && (idx >= 0)) ? media[idx] : 0xff;
+
+	if ((option != 0xff) && !idx)
+		printk(KERN_WARNING PFX "media option is deprecated.\n");
+
+	for (p = link_settings; p->media != 0xff; p++) {
+		if (p->media == option)
+			break;
+	}
+	*autoneg = p->autoneg;
+	*speed = p->speed;
+	*duplex = p->duplex;
+}
+
 static void rtl8169_get_drvinfo(struct net_device *dev,
 				struct ethtool_drvinfo *info)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 
 	strcpy(info->driver, RTL8169_DRIVER_NAME);
 	strcpy(info->version, RTL8169_VERSION );
 	strcpy(info->bus_info, pci_name(tp->pci_dev));
 }
 
+static int rtl8169_set_speed_tbi(struct net_device *dev,
+				 u8 autoneg, u16 speed, u8 duplex)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void *ioaddr = tp->mmio_addr;
+	int ret = 0;
+	u32 reg;
+
+	reg = RTL_R32(TBICSR);
+	if ((autoneg == AUTONEG_DISABLE) && (speed == SPEED_1000) &&
+	    (duplex == DUPLEX_FULL)) {
+		RTL_W32(TBICSR, reg & ~(TBINwEnable | TBINwRestart));
+	} else if (autoneg == AUTONEG_ENABLE)
+		RTL_W32(TBICSR, reg | TBINwEnable | TBINwRestart);
+	else {
+		printk(KERN_WARNING PFX
+		       "%s: incorrect speed setting refused in TBI mode\n",
+		       dev->name);
+		ret = -EOPNOTSUPP;
+	}
+
+	return ret;
+}
+
+static int rtl8169_set_speed_xmii(struct net_device *dev,
+				  u8 autoneg, u16 speed, u8 duplex)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void *ioaddr = tp->mmio_addr;
+	int auto_nego, giga_ctrl;
+
+	auto_nego = mdio_read(ioaddr, PHY_AUTO_NEGO_REG);
+	auto_nego &= ~(PHY_Cap_10_Half | PHY_Cap_10_Full |
+		       PHY_Cap_100_Half | PHY_Cap_100_Full);
+	giga_ctrl = mdio_read(ioaddr, PHY_1000_CTRL_REG);
+	giga_ctrl &= ~(PHY_Cap_1000_Full | PHY_Cap_Null);
+
+	if (autoneg == AUTONEG_ENABLE) {
+		auto_nego |= (PHY_Cap_10_Half | PHY_Cap_10_Full |
+			      PHY_Cap_100_Half | PHY_Cap_100_Full);
+		giga_ctrl |= PHY_Cap_1000_Full;
+	} else {
+		if (speed == SPEED_10)
+			auto_nego |= PHY_Cap_10_Half | PHY_Cap_10_Full;
+		else if (speed == SPEED_100)
+			auto_nego |= PHY_Cap_100_Half | PHY_Cap_100_Full;
+		else if (speed == SPEED_1000)
+			giga_ctrl |= PHY_Cap_1000_Full;
+
+		if (duplex == DUPLEX_HALF)
+			auto_nego &= ~(PHY_Cap_10_Full | PHY_Cap_100_Full);
+	}
+
+	tp->phy_auto_nego_reg = auto_nego;
+	tp->phy_1000_ctrl_reg = giga_ctrl;
+
+	mdio_write(ioaddr, PHY_AUTO_NEGO_REG, auto_nego);
+	mdio_write(ioaddr, PHY_1000_CTRL_REG, giga_ctrl);
+	mdio_write(ioaddr, PHY_CTRL_REG, PHY_Enable_Auto_Nego |
+					 PHY_Restart_Auto_Nego);
+	return 0;
+}
+
+static int rtl8169_set_speed(struct net_device *dev,
+			     u8 autoneg, u16 speed, u8 duplex)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	int ret;
+
+	ret = tp->set_speed(dev, autoneg, speed, duplex);
+
+	if (netif_running(dev) && (tp->phy_1000_ctrl_reg & PHY_Cap_1000_Full))
+		mod_timer(&tp->timer, jiffies + RTL8169_PHY_TIMEOUT);
+
+	return ret;
+}
+
+static int rtl8169_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	unsigned long flags;
+	int ret;
+
+	spin_lock_irqsave(&tp->lock, flags);
+	ret = rtl8169_set_speed(dev, cmd->autoneg, cmd->speed, cmd->duplex);
+	spin_unlock_irqrestore(&tp->lock, flags);
+	
+	return ret;
+}
+
+static void rtl8169_gset_tbi(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void *ioaddr = tp->mmio_addr;
+	u32 status;
+
+	cmd->supported =
+		SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg | SUPPORTED_FIBRE;
+	cmd->port = PORT_FIBRE;
+	cmd->transceiver = XCVR_INTERNAL;
+
+	status = RTL_R32(TBICSR);
+	cmd->advertising = (status & TBINwEnable) ?  ADVERTISED_Autoneg : 0;
+	cmd->autoneg = !!(status & TBINwEnable);
+
+	cmd->speed = SPEED_1000;
+	cmd->duplex = DUPLEX_FULL; /* Always set */
+}
+
+static void rtl8169_gset_xmii(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void *ioaddr = tp->mmio_addr;
+	u8 status;
+
+	cmd->supported = SUPPORTED_10baseT_Half |
+			 SUPPORTED_10baseT_Full |
+			 SUPPORTED_100baseT_Half |
+			 SUPPORTED_100baseT_Full |
+			 SUPPORTED_1000baseT_Full |
+			 SUPPORTED_Autoneg |
+		         SUPPORTED_TP;
+
+	cmd->autoneg = 1;
+	cmd->advertising = ADVERTISED_TP | ADVERTISED_Autoneg;
+
+	if (tp->phy_auto_nego_reg & PHY_Cap_10_Half)
+		cmd->advertising |= ADVERTISED_10baseT_Half;
+	if (tp->phy_auto_nego_reg & PHY_Cap_10_Full)
+		cmd->advertising |= ADVERTISED_10baseT_Full;
+	if (tp->phy_auto_nego_reg & PHY_Cap_100_Half)
+		cmd->advertising |= ADVERTISED_100baseT_Half;
+	if (tp->phy_auto_nego_reg & PHY_Cap_100_Full)
+		cmd->advertising |= ADVERTISED_100baseT_Full;
+	if (tp->phy_1000_ctrl_reg & PHY_Cap_1000_Full)
+		cmd->advertising |= ADVERTISED_1000baseT_Full;
+
+	status = RTL_R8(PHYstatus);
+
+	if (status & _1000bpsF)
+		cmd->speed = SPEED_1000;
+	else if (status & _100bps)
+		cmd->speed = SPEED_100;
+	else if (status & _10bps)
+		cmd->speed = SPEED_10;
+
+	cmd->duplex = ((status & _1000bpsF) || (status & FullDup)) ?
+		      DUPLEX_FULL : DUPLEX_HALF;
+}
+
+static int rtl8169_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	unsigned long flags;
+
+	spin_lock_irqsave(&tp->lock, flags);
+
+	tp->get_settings(dev, cmd);
+
+	spin_unlock_irqrestore(&tp->lock, flags);
+	return 0;
+}
+
+
 static struct ethtool_ops rtl8169_ethtool_ops = {
 	.get_drvinfo		= rtl8169_get_drvinfo,
+	.get_link		= ethtool_op_get_link,
+	.get_settings		= rtl8169_get_settings,
+	.set_settings		= rtl8169_set_settings,
 };
 
 static void rtl8169_write_gmii_reg_bit(void *ioaddr, int reg, int bitnum,
@@ -500,7 +775,7 @@
 
 static void rtl8169_hw_phy_config(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	void *ioaddr = tp->mmio_addr;
 	struct {
 		u16 regs[5]; /* Beware of bit-sign propagation */
@@ -566,61 +841,47 @@
 	mdio_write(ioaddr, 31, 0x0000); //w 31 2 0 0
 }
 
-static void rtl8169_hw_phy_reset(struct net_device *dev)
-{
-	struct rtl8169_private *tp = dev->priv;
-	void *ioaddr = tp->mmio_addr;
-	int i, val;
-
-	printk(KERN_WARNING PFX "%s: Reset RTL8169s PHY\n", dev->name);
-
-	val = (mdio_read(ioaddr, 0) | 0x8000) & 0xffff;
-	mdio_write(ioaddr, 0, val);
-
-	for (i = 50; i >= 0; i--) {
-		if (!(mdio_read(ioaddr, 0) & 0x8000))
-			break;
-		udelay(100); /* Gross */
-	}
-
-	if (i < 0) {
-		printk(KERN_WARNING PFX "%s: no PHY Reset ack. Giving up.\n",
-		       dev->name);
-	}
-}
-
 static void rtl8169_phy_timer(unsigned long __opaque)
 {
 	struct net_device *dev = (struct net_device *)__opaque;
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	struct timer_list *timer = &tp->timer;
 	void *ioaddr = tp->mmio_addr;
+	unsigned long timeout = RTL8169_PHY_TIMEOUT;
 
 	assert(tp->mac_version > RTL_GIGA_MAC_VER_B);
 	assert(tp->phy_version < RTL_GIGA_PHY_VER_G);
 
-	if (RTL_R8(PHYstatus) & LinkStatus)
-		tp->phy_link_down_cnt = 0;
-	else {
-		tp->phy_link_down_cnt++;
-		if (tp->phy_link_down_cnt >= 12) {
-			int reg;
-
-			// If link on 1000, perform phy reset.
-			reg = mdio_read(ioaddr, PHY_1000_CTRL_REG);
-			if (reg & PHY_Cap_1000_Full) 
-				rtl8169_hw_phy_reset(dev);
+	if (!(tp->phy_1000_ctrl_reg & PHY_Cap_1000_Full))
+		return;
 
-			tp->phy_link_down_cnt = 0;
-		}
+	spin_lock_irq(&tp->lock);
+
+	if (tp->phy_reset_pending(ioaddr)) {
+		/* 
+		 * A busy loop could burn quite a few cycles on nowadays CPU.
+		 * Let's delay the execution of the timer for a few ticks.
+		 */
+		timeout = HZ/10;
+		goto out_mod_timer;
 	}
 
-	mod_timer(timer, jiffies + RTL8169_PHY_TIMEOUT);
+	if (tp->link_ok(ioaddr))
+		goto out_unlock;
+
+	printk(KERN_WARNING PFX "%s: PHY reset until link up\n", dev->name);
+
+	tp->phy_reset_enable(ioaddr);
+
+out_mod_timer:
+	mod_timer(timer, jiffies + timeout);
+out_unlock:
+	spin_unlock_irq(&tp->lock);
 }
 
 static inline void rtl8169_delete_timer(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	struct timer_list *timer = &tp->timer;
 
 	if ((tp->mac_version <= RTL_GIGA_MAC_VER_B) ||
@@ -628,21 +889,17 @@
 		return;
 
 	del_timer_sync(timer);
-
-	tp->phy_link_down_cnt = 0;
 }
 
 static inline void rtl8169_request_timer(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	struct timer_list *timer = &tp->timer;
 
 	if ((tp->mac_version <= RTL_GIGA_MAC_VER_B) ||
 	    (tp->phy_version >= RTL_GIGA_PHY_VER_G))
 		return;
 
-	tp->phy_link_down_cnt = 0;
-
 	init_timer(timer);
 	timer->expires = jiffies + RTL8169_PHY_TIMEOUT;
 	timer->data = (unsigned long)(dev);
@@ -681,7 +938,7 @@
 	// enable device (incl. PCI PM wakeup and hotplug setup)
 	rc = pci_enable_device(pdev);
 	if (rc) {
-		printk(KERN_ERR PFX "%s: unable to enable device\n", pdev->slot_name);
+		printk(KERN_ERR PFX "%s: enable failure\n", pdev->slot_name);
 		goto err_out;
 	}
 
@@ -693,7 +950,8 @@
 		pci_read_config_word(pdev, pm_cap + PCI_PM_CTRL, &pwr_command);
 		acpi_idle_state = pwr_command & PCI_PM_CTRL_STATE_MASK;
 	} else {
-		printk(KERN_ERR PFX "Cannot find PowerManagement capability, aborting.\n");
+		printk(KERN_ERR PFX
+		       "Cannot find PowerManagement capability, aborting.\n");
 		goto err_out_free_res;
 	}
 
@@ -716,9 +974,10 @@
 		goto err_out_disable;
 	}
 
-	rc = pci_request_regions(pdev, dev->name);
+	rc = pci_request_regions(pdev, MODULENAME);
 	if (rc) {
-		printk(KERN_ERR PFX "%s: Could not request regions.\n", pdev->slot_name);
+		printk(KERN_ERR PFX "%s: could not request regions.\n",
+		       pdev->slot_name);
 		goto err_out_disable;
 	}
 
@@ -800,8 +1059,9 @@
 	void *ioaddr = NULL;
 	static int board_idx = -1;
 	static int printed_version = 0;
+	u8 autoneg, duplex;
+	u16 speed;
 	int i, rc;
-	int option = -1, Cap10_100 = 0, Cap1000 = 0;
 
 	assert(pdev != NULL);
 	assert(ent != NULL);
@@ -822,6 +1082,22 @@
 	assert(dev != NULL);
 	assert(tp != NULL);
 
+	if (RTL_R8(PHYstatus) & TBI_Enable) {
+		tp->set_speed = rtl8169_set_speed_tbi;
+		tp->get_settings = rtl8169_gset_tbi;
+		tp->phy_reset_enable = rtl8169_tbi_reset_enable;
+		tp->phy_reset_pending = rtl8169_tbi_reset_pending;
+		tp->link_ok = rtl8169_tbi_link_ok;
+
+		tp->phy_1000_ctrl_reg = PHY_Cap_1000_Full; /* Implied by TBI */
+	} else {
+		tp->set_speed = rtl8169_set_speed_xmii;
+		tp->get_settings = rtl8169_gset_xmii;
+		tp->phy_reset_enable = rtl8169_xmii_reset_enable;
+		tp->phy_reset_pending = rtl8169_xmii_reset_pending;
+		tp->link_ok = rtl8169_xmii_link_ok;
+	}
+
 	// Get MAC address.  FIXME: read EEPROM
 	for (i = 0; i < MAC_ADDR_LEN; i++)
 		dev->dev_addr[i] = RTL_R8(MAC0 + i);
@@ -836,9 +1112,12 @@
 	dev->watchdog_timeo = RTL8169_TX_TIMEOUT;
 	dev->irq = pdev->irq;
 	dev->base_addr = (unsigned long) ioaddr;
-//      dev->do_ioctl           = mii_ioctl;
-
-	tp = dev->priv;		// private data //
+#ifdef CONFIG_R8169_NAPI
+	dev->poll = rtl8169_poll;
+	dev->weight = R8169_NAPI_WEIGHT;
+	printk(KERN_INFO PFX "NAPI enabled\n");
+#endif
+	tp->intr_mask = 0xffff;
 	tp->pci_dev = pdev;
 	tp->mmio_addr = ioaddr;
 
@@ -885,95 +1164,12 @@
 		mdio_write(ioaddr, 0x0b, 0x0000); //w 0x0b 15 0 0
 	}
 
-	// if TBI is not endbled
-	if (!(RTL_R8(PHYstatus) & TBI_Enable)) {
-		int val = mdio_read(ioaddr, PHY_AUTO_NEGO_REG);
-
-		option = (board_idx >= MAX_UNITS) ? 0 : media[board_idx];
-		// Force RTL8169 in 10/100/1000 Full/Half mode.
-		if (option > 0) {
-			printk(KERN_INFO "%s: Force-mode Enabled.\n",
-			       dev->name);
-			Cap10_100 = 0, Cap1000 = 0;
-			switch (option) {
-			case _10_Half:
-				Cap10_100 = PHY_Cap_10_Half_Or_Less;
-				Cap1000 = PHY_Cap_Null;
-				break;
-			case _10_Full:
-				Cap10_100 = PHY_Cap_10_Full_Or_Less;
-				Cap1000 = PHY_Cap_Null;
-				break;
-			case _100_Half:
-				Cap10_100 = PHY_Cap_100_Half_Or_Less;
-				Cap1000 = PHY_Cap_Null;
-				break;
-			case _100_Full:
-				Cap10_100 = PHY_Cap_100_Full_Or_Less;
-				Cap1000 = PHY_Cap_Null;
-				break;
-			case _1000_Full:
-				Cap10_100 = PHY_Cap_100_Full_Or_Less;
-				Cap1000 = PHY_Cap_1000_Full;
-				break;
-			default:
-				break;
-			}
-			mdio_write(ioaddr, PHY_AUTO_NEGO_REG, Cap10_100 | (val & 0x1F));	//leave PHY_AUTO_NEGO_REG bit4:0 unchanged
-			mdio_write(ioaddr, PHY_1000_CTRL_REG, Cap1000);
-		} else {
-			printk(KERN_INFO "%s: Auto-negotiation Enabled.\n",
-			       dev->name);
+	rtl8169_link_option(board_idx, &autoneg, &speed, &duplex);
 
-			// enable 10/100 Full/Half Mode, leave PHY_AUTO_NEGO_REG bit4:0 unchanged
-			mdio_write(ioaddr, PHY_AUTO_NEGO_REG,
-				   PHY_Cap_100_Full_Or_Less | (val & 0x1f));
-
-			// enable 1000 Full Mode
-			mdio_write(ioaddr, PHY_1000_CTRL_REG,
-				   PHY_Cap_1000_Full);
-
-		}
-
-		// Enable auto-negotiation and restart auto-nigotiation
-		mdio_write(ioaddr, PHY_CTRL_REG,
-			   PHY_Enable_Auto_Nego | PHY_Restart_Auto_Nego);
-		udelay(100);
-
-		// wait for auto-negotiation process
-		for (i = 10000; i > 0; i--) {
-			//check if auto-negotiation complete
-			if (mdio_read(ioaddr, PHY_STAT_REG) &
-			    PHY_Auto_Neco_Comp) {
-				udelay(100);
-				option = RTL_R8(PHYstatus);
-				if (option & _1000bpsF) {
-					printk(KERN_INFO
-					       "%s: 1000Mbps Full-duplex operation.\n",
-					       dev->name);
-				} else {
-					printk(KERN_INFO
-					       "%s: %sMbps %s-duplex operation.\n",
-					       dev->name,
-					       (option & _100bps) ? "100" :
-					       "10",
-					       (option & FullDup) ? "Full" :
-					       "Half");
-				}
-				break;
-			} else {
-				udelay(100);
-			}
-		}		// end for-loop to wait for auto-negotiation process
-
-	} else {
-		udelay(100);
-		printk(KERN_INFO
-		       "%s: 1000Mbps Full-duplex operation, TBI Link %s!\n",
-		       dev->name,
-		       (RTL_R32(TBICSR) & TBILinkOK) ? "OK" : "Failed");
-
-	}
+	rtl8169_set_speed(dev, autoneg, speed, duplex);
+	
+	if (RTL_R8(PHYstatus) & TBI_Enable)
+		printk(KERN_INFO PFX "%s: TBI auto-negotiating\n", dev->name);
 
 	return 0;
 }
@@ -982,7 +1178,7 @@
 rtl8169_remove_one(struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 
 	assert(dev != NULL);
 	assert(tp != NULL);
@@ -1001,7 +1197,7 @@
 static int rtl8169_suspend(struct pci_dev *pdev, u32 state)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	void *ioaddr = tp->mmio_addr;
 	unsigned long flags;
 
@@ -1042,7 +1238,7 @@
 static int
 rtl8169_open(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	struct pci_dev *pdev = tp->pci_dev;
 	int retval;
 
@@ -1074,6 +1270,8 @@
 	rtl8169_hw_start(dev);
 
 	rtl8169_request_timer(dev);
+
+	rtl8169_check_link_status(dev, tp, tp->mmio_addr);
 out:
 	return retval;
 
@@ -1091,7 +1289,7 @@
 static void
 rtl8169_hw_start(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	void *ioaddr = tp->mmio_addr;
 	u32 i;
 
@@ -1102,8 +1300,7 @@
 	for (i = 1000; i > 0; i--) {
 		if ((RTL_R8(ChipCmd) & CmdReset) == 0)
 			break;
-		else
-			udelay(10);
+		udelay(10);
 	}
 
 	RTL_W8(Cfg9346, Cfg9346_Unlock);
@@ -1114,8 +1311,8 @@
 	RTL_W16(RxMaxSize, RxPacketMaxSize);
 
 	// Set Rx Config register
-	i = rtl8169_rx_config | (RTL_R32(RxConfig) & rtl_chip_info[tp->chipset].
-				 RxConfigMask);
+	i = rtl8169_rx_config |
+		(RTL_R32(RxConfig) & rtl_chip_info[tp->chipset].RxConfigMask);
 	RTL_W32(RxConfig, i);
 
 	/* Set DMA burst size and Interframe Gap Time */
@@ -1126,7 +1323,8 @@
 	RTL_W16(CPlusCmd, tp->cp_cmd);
 
 	if (tp->mac_version == RTL_GIGA_MAC_VER_D) {
-		dprintk(KERN_INFO PFX "Set MAC Reg C+CR Offset 0xE0: bit-3 and bit-14 MUST be 1\n");
+		dprintk(KERN_INFO PFX "Set MAC Reg C+CR Offset 0xE0. "
+			"Bit-3 and bit-14 MUST be 1\n");
 		tp->cp_cmd |= (1 << 14) | PCIMulRW;
 		RTL_W16(CPlusCmd, tp->cp_cmd);
 	}
@@ -1151,7 +1349,6 @@
 	RTL_W16(IntrMask, rtl8169_intr_mask);
 
 	netif_start_queue(dev);
-
 }
 
 static inline void rtl8169_make_unusable_by_asic(struct RxDesc *desc)
@@ -1248,7 +1445,7 @@
 
 static int rtl8169_init_ring(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 
 	tp->cur_rx = tp->dirty_rx = 0;
 	tp->cur_tx = tp->dirty_tx = 0;
@@ -1302,10 +1499,11 @@
 static void
 rtl8169_tx_timeout(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	void *ioaddr = tp->mmio_addr;
 	u8 tmp8;
 
+	printk(KERN_INFO "%s: TX Timeout\n", dev->name);
 	/* disable Tx, if not already */
 	tmp8 = RTL_R8(ChipCmd);
 	if (tmp8 & CmdTxEnb)
@@ -1328,9 +1526,9 @@
 static int
 rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	void *ioaddr = tp->mmio_addr;
-	int entry = tp->cur_tx % NUM_TX_DESC;
+	unsigned int entry = tp->cur_tx % NUM_TX_DESC;
 	u32 len = skb->len;
 
 	if (unlikely(skb->len < ETH_ZLEN)) {
@@ -1340,10 +1538,9 @@
 		len = ETH_ZLEN;
 	}
 	
-	spin_lock_irq(&tp->lock);
-
 	if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) {
 		dma_addr_t mapping;
+		u32 status;
 
 		mapping = pci_map_single(tp->pci_dev, skb->data, len,
 					 PCI_DMA_TODEVICE);
@@ -1351,24 +1548,30 @@
 		tp->Tx_skbuff[entry] = skb;
 		tp->TxDescArray[entry].addr = cpu_to_le64(mapping);
 
-		tp->TxDescArray[entry].status = cpu_to_le32(OWNbit | FSbit |
-			LSbit | len | (EORbit * !((entry + 1) % NUM_TX_DESC)));
+		/* anti gcc 2.95.3 bugware */
+		status = OWNbit | FSbit | LSbit | len |
+			 (EORbit * !((entry + 1) % NUM_TX_DESC));
+		tp->TxDescArray[entry].status = cpu_to_le32(status);
 			
 		RTL_W8(TxPoll, 0x40);	//set polling bit
 
 		dev->trans_start = jiffies;
 
 		tp->cur_tx++;
+		smp_wmb();
 	} else
 		goto err_drop;
 
-
 	if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) {
+		u32 dirty = tp->dirty_tx;
+	
 		netif_stop_queue(dev);
+		smp_rmb();
+		if (dirty != tp->dirty_tx)
+			netif_wake_queue(dev);
 	}
-out:
-	spin_unlock_irq(&tp->lock);
 
+out:
 	return 0;
 
 err_drop:
@@ -1382,17 +1585,18 @@
 rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
 		     void *ioaddr)
 {
-	unsigned long dirty_tx, tx_left;
+	unsigned int dirty_tx, tx_left;
 
 	assert(dev != NULL);
 	assert(tp != NULL);
 	assert(ioaddr != NULL);
 
 	dirty_tx = tp->dirty_tx;
+	smp_rmb();
 	tx_left = tp->cur_tx - dirty_tx;
 
 	while (tx_left > 0) {
-		int entry = dirty_tx % NUM_TX_DESC;
+		unsigned int entry = dirty_tx % NUM_TX_DESC;
 		struct sk_buff *skb = tp->Tx_skbuff[entry];
 		u32 status;
 
@@ -1415,6 +1619,7 @@
 
 	if (tp->dirty_tx != dirty_tx) {
 		tp->dirty_tx = dirty_tx;
+		smp_wmb();
 		if (netif_queue_stopped(dev))
 			netif_wake_queue(dev);
 	}
@@ -1442,11 +1647,11 @@
 	return ret;
 }
 
-static void
+static int
 rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
 		     void *ioaddr)
 {
-	unsigned long cur_rx, rx_left;
+	unsigned int cur_rx, rx_left, count;
 	int delta;
 
 	assert(dev != NULL);
@@ -1455,9 +1660,10 @@
 
 	cur_rx = tp->cur_rx;
 	rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx;
+	rx_left = rtl8169_rx_quota(rx_left, (u32) dev->quota);
 
 	while (rx_left > 0) {
-		int entry = cur_rx % NUM_RX_DESC;
+		unsigned int entry = cur_rx % NUM_RX_DESC;
 		u32 status;
 
 		rmb();
@@ -1494,7 +1700,7 @@
 
 			skb_put(skb, pkt_size);
 			skb->protocol = eth_type_trans(skb, dev);
-			netif_rx(skb);
+			rtl8169_rx_skb(skb);
 
 			dev->last_rx = jiffies;
 			tp->stats.rx_bytes += pkt_size;
@@ -1505,13 +1711,15 @@
 		rx_left--;
 	}
 
+	count = cur_rx - tp->cur_rx;
 	tp->cur_rx = cur_rx;
 
 	delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx);
-	if (delta > 0)
-		tp->dirty_rx += delta;
-	else if (delta < 0)
+	if (delta < 0) {
 		printk(KERN_INFO "%s: no Rx buffer allocated\n", dev->name);
+		delta = 0;
+	}
+	tp->dirty_rx += delta;
 
 	/*
 	 * FIXME: until there is periodic timer to try and refill the ring,
@@ -1522,6 +1730,8 @@
 	 */
 	if (tp->dirty_rx + NUM_RX_DESC == tp->cur_rx)
 		printk(KERN_EMERG "%s: Rx buffers exhausted\n", dev->name);
+
+	return count;
 }
 
 /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */
@@ -1529,7 +1739,7 @@
 rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *) dev_instance;
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	int boguscnt = max_interrupt_work;
 	void *ioaddr = tp->mmio_addr;
 	int status = 0;
@@ -1543,26 +1753,37 @@
 			break;
 
 		handled = 1;
-/*
-		if (status & RxUnderrun)
-			link_changed = RTL_R16 (CSCR) & CSCR_LinkChangeBit;
-*/
+
+		status &= tp->intr_mask;
 		RTL_W16(IntrStatus,
 			(status & RxFIFOOver) ? (status | RxOverflow) : status);
 
 		if (!(status & rtl8169_intr_mask))
 			break;
 
+		if (status & LinkChg)
+			rtl8169_check_link_status(dev, tp, ioaddr);
+
+#ifdef CONFIG_R8169_NAPI
+		RTL_W16(IntrMask, rtl8169_intr_mask & ~rtl8169_napi_event);
+		tp->intr_mask = ~rtl8169_napi_event;
+
+		if (likely(netif_rx_schedule_prep(dev)))
+			__netif_rx_schedule(dev);
+		else {
+			printk(KERN_INFO "%s: interrupt %x taken in poll\n",
+			       dev->name, status);	
+		}
+		break;
+#else
 		// Rx interrupt 
-		if (status & (RxOK | RxUnderrun | RxOverflow | RxFIFOOver)) {
+		if (status & (RxOK | RxOverflow | RxFIFOOver)) {
 			rtl8169_rx_interrupt(dev, tp, ioaddr);
 		}
 		// Tx interrupt
-		if (status & (TxOK | TxErr)) {
-			spin_lock(&tp->lock);
+		if (status & (TxOK | TxErr))
 			rtl8169_tx_interrupt(dev, tp, ioaddr);
-			spin_unlock(&tp->lock);
-		}
+#endif
 
 		boguscnt--;
 	} while (boguscnt > 0);
@@ -1576,10 +1797,40 @@
 	return IRQ_RETVAL(handled);
 }
 
+#ifdef CONFIG_R8169_NAPI
+static int rtl8169_poll(struct net_device *dev, int *budget)
+{
+	unsigned int work_done, work_to_do = min(*budget, dev->quota);
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void *ioaddr = tp->mmio_addr;
+
+	work_done = rtl8169_rx_interrupt(dev, tp, ioaddr);
+	rtl8169_tx_interrupt(dev, tp, ioaddr);
+
+	*budget -= work_done;
+	dev->quota -= work_done;
+
+	if ((work_done < work_to_do) || !netif_running(dev)) {
+		netif_rx_complete(dev);
+		tp->intr_mask = 0xffff;
+		/*
+		 * 20040426: the barrier is not strictly required but the
+		 * behavior of the irq handler could be less predictable
+		 * without it. Btw, the lack of flush for the posted pci
+		 * write is safe - FR
+		 */
+		smp_wmb();
+		RTL_W16(IntrMask, rtl8169_intr_mask);
+	}
+
+	return (work_done >= work_to_do);
+}
+#endif
+
 static int
 rtl8169_close(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	struct pci_dev *pdev = tp->pci_dev;
 	void *ioaddr = tp->mmio_addr;
 
@@ -1621,7 +1872,7 @@
 static void
 rtl8169_set_rx_mode(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	void *ioaddr = tp->mmio_addr;
 	unsigned long flags;
 	u32 mc_filter[2];	/* Multicast hash filter */
@@ -1655,10 +1906,8 @@
 
 	spin_lock_irqsave(&tp->lock, flags);
 
-	tmp =
-	    rtl8169_rx_config | rx_mode | (RTL_R32(RxConfig) &
-					   rtl_chip_info[tp->chipset].
-					   RxConfigMask);
+	tmp = rtl8169_rx_config | rx_mode |
+	      (RTL_R32(RxConfig) & rtl_chip_info[tp->chipset].RxConfigMask);
 
 	RTL_W32(RxConfig, tmp);
 	RTL_W32(MAR0 + 0, mc_filter[0]);
@@ -1675,7 +1924,7 @@
  */
 static struct net_device_stats *rtl8169_get_stats(struct net_device *dev)
 {
-	struct rtl8169_private *tp = dev->priv;
+	struct rtl8169_private *tp = netdev_priv(dev);
 	void *ioaddr = tp->mmio_addr;
 	unsigned long flags;
 
--- diff/drivers/net/s2io.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/s2io.c	2004-07-01 21:32:39.000000000 +0100
@@ -1425,13 +1425,13 @@
 			goto end;
 		}
 
-		skb = dev_alloc_skb(size + HEADER_ALIGN_LAYER_3);
+		skb = dev_alloc_skb(size + NET_IP_ALIGN);
 		if (!skb) {
 			DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name);
 			DBG_PRINT(ERR_DBG, "memory to allocate SKBs\n");
 			return -ENOMEM;
 		}
-		skb_reserve(skb, HEADER_ALIGN_LAYER_3);
+		skb_reserve(skb, NET_IP_ALIGN);
 		memset(rxdp, 0, sizeof(RxD_t));
 		rxdp->Buffer0_ptr = pci_map_single
 		    (nic->pdev, skb->data, size, PCI_DMA_FROMDEVICE);
--- diff/drivers/net/s2io.h	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/s2io.h	2004-07-01 21:32:39.000000000 +0100
@@ -411,7 +411,6 @@
 #define HEADER_802_2_SIZE              3
 #define HEADER_SNAP_SIZE               5
 #define HEADER_VLAN_SIZE               4
-#define HEADER_ALIGN_LAYER_3           2
 
 #define MIN_MTU                       46
 #define MAX_PYLD                    1500
--- diff/drivers/net/sb1250-mac.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/sb1250-mac.c	2004-07-01 21:32:39.000000000 +0100
@@ -2900,15 +2900,15 @@
 sbmac_cleanup_module(void)
 {
 	struct net_device *dev;
-	sbmac_port_t port;
 	int idx;
 
 	for (idx = 0; idx < MAX_UNITS; idx++) {
+		struct sbmac_softc *sc;
 		dev = dev_sbmac[idx];
 		if (!dev)
 			continue;
 
-		struct sbmac_softc *sc = netdev_priv(dev);
+		sc = netdev_priv(dev);
 		unregister_netdev(dev);
 		sbmac_uninitctx(sc);
 		free_netdev(dev);
--- diff/drivers/net/sgiseeq.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/sgiseeq.c	2004-07-01 21:32:39.000000000 +0100
@@ -64,13 +64,13 @@
 #define DEBUG
 
 struct sgiseeq_rx_desc {
-	struct hpc_dma_desc rdma;
-	signed int buf_vaddr;
+	volatile struct hpc_dma_desc rdma;
+	volatile signed int buf_vaddr;
 };
 
 struct sgiseeq_tx_desc {
-	struct hpc_dma_desc tdma;
-	signed int buf_vaddr;
+	volatile struct hpc_dma_desc tdma;
+	volatile signed int buf_vaddr;
 };
 
 /*
@@ -79,17 +79,17 @@
  *          some care.
  */
 struct sgiseeq_init_block { /* Note the name ;-) */
-	/* Ptrs to the descriptors in KSEG1 uncached space. */
-	struct sgiseeq_rx_desc *rx_desc;
-	struct sgiseeq_tx_desc *tx_desc;
-	unsigned int _padding[30]; /* Pad out to largest cache line size. */
-
 	struct sgiseeq_rx_desc rxvector[SEEQ_RX_BUFFERS];
 	struct sgiseeq_tx_desc txvector[SEEQ_TX_BUFFERS];
 };
 
 struct sgiseeq_private {
-	volatile struct sgiseeq_init_block srings;
+	struct sgiseeq_init_block *srings;
+
+	/* Ptrs to the descriptors in uncached space. */
+	struct sgiseeq_rx_desc *rx_desc;
+	struct sgiseeq_tx_desc *tx_desc;
+
 	char *name;
 	struct hpc3_ethregs *hregs;
 	struct sgiseeq_regs *sregs;
@@ -152,8 +152,7 @@
 
 static int seeq_init_ring(struct net_device *dev)
 {
-	struct sgiseeq_private *sp = dev->priv;
-	volatile struct sgiseeq_init_block *ib = &sp->srings;
+	struct sgiseeq_private *sp = netdev_priv(dev);
 	int i;
 
 	netif_stop_queue(dev);
@@ -170,32 +169,32 @@
 
 	/* Setup tx ring. */
 	for(i = 0; i < SEEQ_TX_BUFFERS; i++) {
-		if (!ib->tx_desc[i].tdma.pbuf) {
+		if (!sp->tx_desc[i].tdma.pbuf) {
 			unsigned long buffer;
 
 			buffer = (unsigned long) kmalloc(PKT_BUF_SZ, GFP_KERNEL);
 			if (!buffer)
 				return -ENOMEM;
-			ib->tx_desc[i].buf_vaddr = KSEG1ADDR(buffer);
-			ib->tx_desc[i].tdma.pbuf = CPHYSADDR(buffer);
+			sp->tx_desc[i].buf_vaddr = KSEG1ADDR(buffer);
+			sp->tx_desc[i].tdma.pbuf = CPHYSADDR(buffer);
 		}
-		ib->tx_desc[i].tdma.cntinfo = TCNTINFO_INIT;
+		sp->tx_desc[i].tdma.cntinfo = TCNTINFO_INIT;
 	}
 
 	/* And now the rx ring. */
 	for (i = 0; i < SEEQ_RX_BUFFERS; i++) {
-		if (!ib->rx_desc[i].rdma.pbuf) {
+		if (!sp->rx_desc[i].rdma.pbuf) {
 			unsigned long buffer;
 
 			buffer = (unsigned long) kmalloc(PKT_BUF_SZ, GFP_KERNEL);
 			if (!buffer)
 				return -ENOMEM;
-			ib->rx_desc[i].buf_vaddr = KSEG1ADDR(buffer);
-			ib->rx_desc[i].rdma.pbuf = CPHYSADDR(buffer);
+			sp->rx_desc[i].buf_vaddr = KSEG1ADDR(buffer);
+			sp->rx_desc[i].rdma.pbuf = CPHYSADDR(buffer);
 		}
-		ib->rx_desc[i].rdma.cntinfo = RCNTINFO_INIT;
+		sp->rx_desc[i].rdma.cntinfo = RCNTINFO_INIT;
 	}
-	ib->rx_desc[i - 1].rdma.cntinfo |= HPCDMA_EOR;
+	sp->rx_desc[i - 1].rdma.cntinfo |= HPCDMA_EOR;
 	return 0;
 }
 
@@ -206,8 +205,8 @@
 void sgiseeq_dump_rings(void)
 {
 	static int once;
-	struct sgiseeq_rx_desc *r = gpriv->srings.rx_desc;
-	struct sgiseeq_tx_desc *t = gpriv->srings.tx_desc;
+	struct sgiseeq_rx_desc *r = gpriv->rx_desc;
+	struct sgiseeq_tx_desc *t = gpriv->tx_desc;
 	struct hpc3_ethregs *hregs = gpriv->hregs;
 	int i;
 
@@ -268,8 +267,8 @@
 
 	hregs->rx_dconfig |= RDMACFG_INIT;
 
-	hregs->rx_ndptr = CPHYSADDR(sp->srings.rx_desc);
-	hregs->tx_ndptr = CPHYSADDR(sp->srings.tx_desc);
+	hregs->rx_ndptr = CPHYSADDR(sp->rx_desc);
+	hregs->tx_ndptr = CPHYSADDR(sp->tx_desc);
 
 	seeq_go(sp, hregs, sregs);
 	return 0;
@@ -294,14 +293,14 @@
 				    struct sgiseeq_regs *sregs)
 {
 	if (!(hregs->rx_ctrl & HPC3_ERXCTRL_ACTIVE)) {
-		hregs->rx_ndptr = CPHYSADDR(sp->srings.rx_desc + sp->rx_new);
+		hregs->rx_ndptr = CPHYSADDR(sp->rx_desc + sp->rx_new);
 		seeq_go(sp, hregs, sregs);
 	}
 }
 
-#define for_each_rx(rd, sp) for((rd) = &(sp)->srings.rx_desc[(sp)->rx_new]; \
+#define for_each_rx(rd, sp) for((rd) = &(sp)->rx_desc[(sp)->rx_new]; \
 				!((rd)->rdma.cntinfo & HPCDMA_OWN); \
-				(rd) = &(sp)->srings.rx_desc[(sp)->rx_new])
+				(rd) = &(sp)->rx_desc[(sp)->rx_new])
 
 static inline void sgiseeq_rx(struct net_device *dev, struct sgiseeq_private *sp,
 			      struct hpc3_ethregs *hregs,
@@ -349,8 +348,8 @@
 		rd->rdma.cntinfo = RCNTINFO_INIT;
 		sp->rx_new = NEXT_RX(sp->rx_new);
 	}
-	sp->srings.rx_desc[orig_end].rdma.cntinfo &= ~(HPCDMA_EOR);
-	sp->srings.rx_desc[PREV_RX(sp->rx_new)].rdma.cntinfo |= HPCDMA_EOR;
+	sp->rx_desc[orig_end].rdma.cntinfo &= ~(HPCDMA_EOR);
+	sp->rx_desc[PREV_RX(sp->rx_new)].rdma.cntinfo |= HPCDMA_EOR;
 	rx_maybe_restart(sp, hregs, sregs);
 }
 
@@ -403,7 +402,7 @@
 
 	/* Ack 'em... */
 	for (j = sp->tx_old; j != sp->tx_new; j = NEXT_TX(j)) {
-		td = &sp->srings.tx_desc[j];
+		td = &sp->tx_desc[j];
 
 		if (!(td->tdma.cntinfo & (HPCDMA_XIU)))
 			break;
@@ -424,7 +423,7 @@
 static irqreturn_t sgiseeq_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *) dev_id;
-	struct sgiseeq_private *sp = dev->priv;
+	struct sgiseeq_private *sp = netdev_priv(dev);
 	struct hpc3_ethregs *hregs = sp->hregs;
 	struct sgiseeq_regs *sregs = sp->sregs;
 
@@ -450,21 +449,33 @@
 
 static int sgiseeq_open(struct net_device *dev)
 {
-	struct sgiseeq_private *sp = dev->priv;
+	struct sgiseeq_private *sp = netdev_priv(dev);
 	struct sgiseeq_regs *sregs = sp->sregs;
+	unsigned int irq = dev->irq;
+	int err;
 
-	int err = init_seeq(dev, sp, sregs);
+	if (request_irq(irq, sgiseeq_interrupt, 0, sgiseeqstr, dev)) {
+		printk(KERN_ERR "Seeq8003: Can't get irq %d\n", dev->irq);
+		err = -EAGAIN;
+	}
+
+	err = init_seeq(dev, sp, sregs);
 	if (err)
-		return err;
+		goto out_free_irq;
 
 	netif_start_queue(dev);
 
 	return 0;
+
+out_free_irq:
+	free_irq(irq, dev);
+
+	return err;
 }
 
 static int sgiseeq_close(struct net_device *dev)
 {
-	struct sgiseeq_private *sp = dev->priv;
+	struct sgiseeq_private *sp = netdev_priv(dev);
 	struct sgiseeq_regs *sregs = sp->sregs;
 
 	netif_stop_queue(dev);
@@ -477,7 +488,7 @@
 
 static inline int sgiseeq_reset(struct net_device *dev)
 {
-	struct sgiseeq_private *sp = dev->priv;
+	struct sgiseeq_private *sp = netdev_priv(dev);
 	struct sgiseeq_regs *sregs = sp->sregs;
 	int err;
 
@@ -499,7 +510,7 @@
 
 static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-	struct sgiseeq_private *sp = dev->priv;
+	struct sgiseeq_private *sp = netdev_priv(dev);
 	struct hpc3_ethregs *hregs = sp->hregs;
 	unsigned long flags;
 	struct sgiseeq_tx_desc *td;
@@ -512,7 +523,7 @@
 	len = (skblen <= ETH_ZLEN) ? ETH_ZLEN : skblen;
 	sp->stats.tx_bytes += len;
 	entry = sp->tx_new;
-	td = &sp->srings.tx_desc[entry];
+	td = &sp->tx_desc[entry];
 
 	/* Create entry.  There are so many races with adding a new
 	 * descriptor to the chain:
@@ -535,14 +546,14 @@
 	if (sp->tx_old != sp->tx_new) {
 		struct sgiseeq_tx_desc *backend;
 
-		backend = &sp->srings.tx_desc[PREV_TX(sp->tx_new)];
+		backend = &sp->tx_desc[PREV_TX(sp->tx_new)];
 		backend->tdma.cntinfo &= ~HPCDMA_EOX;
 	}
 	sp->tx_new = NEXT_TX(sp->tx_new); /* Advance. */
 
 	/* Maybe kick the HPC back into motion. */
 	if (!(hregs->tx_ctrl & HPC3_ETXCTRL_ACTIVE))
-		kick_tx(&sp->srings.tx_desc[sp->tx_old], hregs);
+		kick_tx(&sp->tx_desc[sp->tx_old], hregs);
 
 	dev->trans_start = jiffies;
 	dev_kfree_skb(skb);
@@ -565,7 +576,7 @@
 
 static struct net_device_stats *sgiseeq_get_stats(struct net_device *dev)
 {
-	struct sgiseeq_private *sp = dev->priv;
+	struct sgiseeq_private *sp = netdev_priv(dev);
 
 	return &sp->stats;
 }
@@ -601,31 +612,29 @@
 
 #define ALIGNED(x)  ((((unsigned long)(x)) + 0xf) & ~(0xf))
 
-int sgiseeq_init(struct hpc3_regs* regs, int irq)
+static int sgiseeq_init(struct hpc3_regs* regs, int irq)
 {
-	struct net_device *dev;
+	struct sgiseeq_init_block *sr;
 	struct sgiseeq_private *sp;
+	struct net_device *dev;
 	int err, i;
 
-	dev = alloc_etherdev(0);
+	dev = alloc_etherdev(sizeof (struct sgiseeq_private));
 	if (!dev) {
 		printk(KERN_ERR "Sgiseeq: Etherdev alloc failed, aborting.\n");
 		err = -ENOMEM;
 		goto err_out;
 	}
+	sp = netdev_priv(dev);
+
 	/* Make private data page aligned */
-	sp = (struct sgiseeq_private *) get_zeroed_page(GFP_KERNEL); 	 
-	if (!sp) {
+	sr = (struct sgiseeq_init_block *) get_zeroed_page(GFP_KERNEL);
+	if (!sr) {
 		printk(KERN_ERR "Sgiseeq: Page alloc failed, aborting.\n");
 		err = -ENOMEM;
 		goto err_out_free_dev;
 	}
-
-	if (request_irq(irq, sgiseeq_interrupt, 0, sgiseeqstr, dev)) {
-		printk(KERN_ERR "Seeq8003: Can't get irq %d\n", dev->irq);
-		err = -EAGAIN;
-		goto err_out_free_page;
-	}
+	sp->srings = sr;
 
 #define EADDR_NVOFS     250
 	for (i = 0; i < 3; i++) {
@@ -643,18 +652,18 @@
 	sp->hregs = &hpc3c0->ethregs;
 	sp->name = sgiseeqstr;
 
-	sp->srings.rx_desc = (struct sgiseeq_rx_desc *)
-	                     KSEG1ADDR(ALIGNED(&sp->srings.rxvector[0]));
-	dma_cache_wback_inv((unsigned long)&sp->srings.rxvector,
-	                    sizeof(sp->srings.rxvector));
-	sp->srings.tx_desc = (struct sgiseeq_tx_desc *)
-	                     KSEG1ADDR(ALIGNED(&sp->srings.txvector[0]));
-	dma_cache_wback_inv((unsigned long)&sp->srings.txvector,
-	                    sizeof(sp->srings.txvector));
+	sp->rx_desc = (struct sgiseeq_rx_desc *)
+	              KSEG1ADDR(ALIGNED(&sp->srings->rxvector[0]));
+	dma_cache_wback_inv((unsigned long)&sp->srings->rxvector,
+	                    sizeof(sp->srings->rxvector));
+	sp->tx_desc = (struct sgiseeq_tx_desc *)
+	              KSEG1ADDR(ALIGNED(&sp->srings->txvector[0]));
+	dma_cache_wback_inv((unsigned long)&sp->srings->txvector,
+	                    sizeof(sp->srings->txvector));
 
 	/* A couple calculations now, saves many cycles later. */
-	setup_rx_ring(sp->srings.rx_desc, SEEQ_RX_BUFFERS);
-	setup_tx_ring(sp->srings.tx_desc, SEEQ_TX_BUFFERS);
+	setup_rx_ring(sp->rx_desc, SEEQ_RX_BUFFERS);
+	setup_tx_ring(sp->tx_desc, SEEQ_TX_BUFFERS);
 
 	/* Reset the chip. */
 	hpc3_eth_reset(sp->hregs);
@@ -673,14 +682,12 @@
 	dev->get_stats		= sgiseeq_get_stats;
 	dev->set_multicast_list	= sgiseeq_set_multicast;
 	dev->irq		= irq;
-	dev->dma		= 0;
-	dev->priv		= sp;
 
 	if (register_netdev(dev)) {
 		printk(KERN_ERR "Sgiseeq: Cannot register net device, "
 		       "aborting.\n");
 		err = -ENODEV;
-		goto err_out_free_irq;
+		goto err_out_free_page;
 	}
 
 	printk(KERN_INFO "%s: SGI Seeq8003 ", dev->name);
@@ -692,8 +699,6 @@
 
 	return 0;
 
-err_out_free_irq:
-	free_irq(irq, dev);
 err_out_free_page:
 	free_page((unsigned long) sp);
 err_out_free_dev:
@@ -718,12 +723,12 @@
 	int irq;
 
 	for (dev = root_sgiseeq_dev; dev; dev = next) {
-		sp = (struct sgiseeq_private *) dev->priv;
+		sp = (struct sgiseeq_private *) netdev_priv(dev);
 		next = sp->next_module;
 		irq = dev->irq;
 		unregister_netdev(dev);
 		free_irq(irq, dev);
-		free_page((unsigned long) dev->priv);
+		free_page((unsigned long) sp);
 		free_netdev(dev);
 	}
 }
--- diff/drivers/net/sis900.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/sis900.c	2004-07-01 21:32:39.000000000 +0100
@@ -116,6 +116,7 @@
 #define	HOME 	0x0001
 #define LAN	0x0002
 #define MIX	0x0003
+#define UNKNOWN	0x0
 } mii_chip_table[] = {
 	{ "SiS 900 Internal MII PHY", 		0x001d, 0x8000, LAN },
 	{ "SiS 7014 Physical Layer Solution", 	0x0016, 0xf830, LAN },
@@ -577,9 +578,11 @@
 				break;
 			}
 			
-		if( !mii_chip_table[i].phy_id1 )
+		if( !mii_chip_table[i].phy_id1 ) {
 			printk(KERN_INFO "%s: Unknown PHY transceiver found at address %d.\n",
-			       net_dev->name, phy_addr);			
+			       net_dev->name, phy_addr);
+			mii_phy->phy_types = UNKNOWN;
+		}
 	}
 	
 	if (sis_priv->mii == NULL) {
@@ -644,15 +647,15 @@
 static u16 sis900_default_phy(struct net_device * net_dev)
 {
 	struct sis900_private * sis_priv = net_dev->priv;
- 	struct mii_phy *phy = NULL, *phy_home = NULL, *default_phy = NULL;
+ 	struct mii_phy *phy = NULL, *phy_home = NULL, *default_phy = NULL, *phy_lan = NULL;
 	u16 status;
 
         for( phy=sis_priv->first_mii; phy; phy=phy->next ){
 		status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
 		status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
 
-		/* Link ON & Not select deafalut PHY */
-		 if ( (status & MII_STAT_LINK) && !(default_phy) )
+		/* Link ON & Not select default PHY & not ghost PHY */
+		 if ( (status & MII_STAT_LINK) && !default_phy && (phy->phy_types != UNKNOWN) )
 		 	default_phy = phy;
 		 else{
 			status = mdio_read(net_dev, phy->phy_addr, MII_CONTROL);
@@ -660,12 +663,16 @@
 				status | MII_CNTL_AUTO | MII_CNTL_ISOLATE);
 			if( phy->phy_types == HOME )
 				phy_home = phy;
+			else if (phy->phy_types == LAN)
+				phy_lan = phy;
 		 }
 	}
 
-	if( (!default_phy) && phy_home )
+	if( !default_phy && phy_home )
 		default_phy = phy_home;
-	else if(!default_phy)
+	else if( !default_phy && phy_lan )
+		default_phy = phy_lan;
+	else if ( !default_phy )
 		default_phy = sis_priv->first_mii;
 
 	if( sis_priv->mii != default_phy ){
--- diff/drivers/net/sk98lin/h/skdrv2nd.h	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/sk98lin/h/skdrv2nd.h	2004-07-01 21:32:39.000000000 +0100
@@ -58,7 +58,8 @@
     /* 3Com (0x10b7) */     \
     if (pdev->vendor == 0x10b7) {     \
         /* Gigabit Ethernet Adapter (0x1700) */     \
-        if ((pdev->device == 0x1700)) { \
+        if ((pdev->device == 0x1700) || \
+            (pdev->device == 0x80eb)) { \
             result = SK_TRUE;     \
         }     \
     /* SysKonnect (0x1148) */     \
@@ -169,7 +170,7 @@
 typedef struct s_IOCTL	SK_GE_IOCTL;
 
 struct s_IOCTL {
-	char*		pData;
+	char __user *	pData;
 	unsigned int	Len;
 };
 
--- diff/drivers/net/skfp/cfm.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/cfm.c	2004-07-01 21:32:39.000000000 +0100
@@ -96,14 +96,13 @@
 /*
  * function declarations
  */
-static void cfm_fsm() ;
+static void cfm_fsm(struct s_smc *smc, int cmd);
 
 /*
 	init CFM state machine
 	clear all CFM vars and flags
 */
-void cfm_init(smc)
-struct s_smc *smc ;
+void cfm_init(struct s_smc *smc)
 {
 	smc->mib.fddiSMTCF_State = ACTIONS(SC0_ISOLATED) ;
 	smc->r.rm_join = 0 ;
@@ -118,9 +117,7 @@
 #define THRU_ENABLED(smc)	(smc->y[PA].pc_mode != PM_TREE && \
 				 smc->y[PB].pc_mode != PM_TREE)
 /* Selection criteria for the ports */
-static void	selection_criteria (smc,phy)
-struct s_smc	*smc ;
-struct s_phy	*phy ;
+static void selection_criteria (struct s_smc *smc, struct s_phy *phy)
 {
 
 	switch (phy->mib->fddiPORTMy_Type) {
@@ -146,8 +143,7 @@
 
 }
 
-void	all_selection_criteria (smc)
-struct s_smc *smc ;
+void all_selection_criteria(struct s_smc *smc)
 {
 	struct s_phy	*phy ;
 	int		p ;
@@ -158,9 +154,7 @@
 	}
 }
 
-static void	cem_priv_state (smc, event)
-struct s_smc *smc ;
-int event ;
+static void cem_priv_state(struct s_smc *smc, int event)
 /* State machine for private PORT states: used to optimize dual homing */
 {
 	int	np;	/* Number of the port */
@@ -216,9 +210,7 @@
 		process event
 	until SM is stable
 */
-void cfm(smc,event)
-struct s_smc *smc ;
-int event ;
+void cfm(struct s_smc *smc, int event)
 {
 	int	state ;		/* remember last state */
 	int	cond ;
@@ -290,9 +282,7 @@
 	process CFM event
 */
 /*ARGSUSED1*/
-static void cfm_fsm(smc,cmd)
-struct s_smc *smc ;
-int cmd ;
+static void cfm_fsm(struct s_smc *smc, int cmd)
 {
 	switch(smc->mib.fddiSMTCF_State) {
 	case ACTIONS(SC0_ISOLATED) :
@@ -550,8 +540,7 @@
  *	return :
  *		PA or PB
  */
-int cfm_get_mac_input(smc)
-struct s_smc *smc ;
+int cfm_get_mac_input(struct s_smc *smc)
 {
 	return((smc->mib.fddiSMTCF_State == SC10_C_WRAP_B ||
 		smc->mib.fddiSMTCF_State == SC5_THRU_B) ? PB : PA) ;
@@ -562,8 +551,7 @@
  *	return :
  *		PA or PB
  */
-int cfm_get_mac_output(smc)
-struct s_smc *smc ;
+int cfm_get_mac_output(struct s_smc *smc)
 {
 	return((smc->mib.fddiSMTCF_State == SC10_C_WRAP_B ||
 		smc->mib.fddiSMTCF_State == SC4_THRU_A) ? PB : PA) ;
@@ -603,10 +591,7 @@
 	0,0,	0,RES_MAC,	0,INDEX_MAC,		0,PATH_ISO,
 } ;
 
-int cem_build_path(smc,to,path_index)
-struct s_smc *smc ;
-char *to ;
-int path_index ;
+int cem_build_path(struct s_smc *smc, char *to, int path_index)
 {
 	char	*path ;
 	int	len ;
--- diff/drivers/net/skfp/drvfbi.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/drvfbi.c	2004-07-01 21:32:39.000000000 +0100
@@ -100,14 +100,13 @@
 #endif	/* MULT_OEM */
 
 /* Prototypes of external functions */
-extern void hwt_restart() ;
 #ifdef AIX
 extern int AIX_vpdReadByte() ;
 #endif
 
 
 /* Prototypes of local functions. */
-void smt_stop_watchdog() ;
+void smt_stop_watchdog(struct s_smc *smc);
 
 #ifdef MCA
 static int read_card_id() ;
@@ -129,8 +128,7 @@
 /*
  * FDDI card reset
  */
-static void card_start(smc)
-struct s_smc *smc ;
+static void card_start(struct s_smc *smc)
 {
 	int i ;
 #ifdef	PCI
@@ -250,8 +248,7 @@
 	GET_PAGE(0) ;		/* necessary for BOOT */
 }
 
-void card_stop(smc)
-struct s_smc *smc ;
+void card_stop(struct s_smc *smc)
 {
 	smt_stop_watchdog(smc) ;
 	smc->hw.mac_ring_is_up = 0 ;		/* ring down */
@@ -282,14 +279,11 @@
 }
 /*--------------------------- ISR handling ----------------------------------*/
 
-#ifndef PCI
-void mac1_irq(smc,stu, stl)
-struct s_smc *smc ;
-u_short stu;
-u_short stl;
+void mac1_irq(struct s_smc *smc, u_short stu, u_short stl)
 {
 	int	restart_tx = 0 ;
 again:
+#ifndef PCI
 #ifndef ISA
 /*
  * FORMAC+ bug modified the queue pointer if many read/write accesses happens!?
@@ -344,14 +338,6 @@
 }
 #else	/* PCI */
 
-void mac1_irq(smc,stu, stl)
-struct s_smc *smc ;
-u_short stu;
-u_short stl;
-{
-	int	restart_tx = 0 ;
-again:
-
 	/*
 	 * parity error: note encoding error is not possible in tag mode
 	 */
@@ -396,8 +382,7 @@
  * interrupt source= plc1
  * this function is called in nwfbisr.asm
  */
-void plc1_irq(smc)
-struct s_smc *smc ;
+void plc1_irq(struct s_smc *smc)
 {
 	u_short	st = inpw(PLC(PB,PL_INTR_EVENT)) ;
 
@@ -412,8 +397,7 @@
  * interrupt source= plc2
  * this function is called in nwfbisr.asm
  */
-void plc2_irq(smc)
-struct s_smc *smc ;
+void plc2_irq(struct s_smc *smc)
 {
 	u_short	st = inpw(PLC(PA,PL_INTR_EVENT)) ;
 
@@ -428,8 +412,7 @@
 /*
  * interrupt source= timer
  */
-void timer_irq(smc)
-struct s_smc *smc ;
+void timer_irq(struct s_smc *smc)
 {
 	hwt_restart(smc);
 	smc->hw.t_stop = smc->hw.t_start;
@@ -439,8 +422,7 @@
 /*
  * return S-port (PA or PB)
  */
-int pcm_get_s_port(smc)
-struct s_smc *smc ;
+int pcm_get_s_port(struct s_smc *smc)
 {
 	SK_UNUSED(smc) ;
 	return(PS) ;
@@ -457,9 +439,7 @@
 #define STATION_LABEL_PMD_OFFSET	6
 #define STATION_LABEL_PORT_OFFSET	7
 
-void read_address(smc,mac_addr)
-struct s_smc *smc ;
-u_char *mac_addr ;
+void read_address(struct s_smc *smc, u_char *mac_addr)
 {
 	char ConnectorType ;
 	char PmdType ;
@@ -528,9 +508,7 @@
 /*
  * FDDI card soft reset
  */
-void init_board(smc,mac_addr)
-struct s_smc *smc ;
-u_char *mac_addr ;
+void init_board(struct s_smc *smc, u_char *mac_addr)
 {
 	card_start(smc) ;
 	read_address(smc,mac_addr) ;
@@ -559,9 +537,7 @@
 /*
  * insert or deinsert optical bypass (called by ECM)
  */
-void sm_pm_bypass_req(smc,mode)
-struct s_smc *smc ;
-int mode;
+void sm_pm_bypass_req(struct s_smc *smc, int mode)
 {
 #if	(defined(ISA) || defined(EISA))
 	int csra_v ;
@@ -614,8 +590,7 @@
 /*
  * check if bypass connected
  */
-int sm_pm_bypass_present(smc)
-struct s_smc *smc ;
+int sm_pm_bypass_present(struct s_smc *smc)
 {
 #ifndef	PCI
 	return(	(inpw(CSR_A) & CS_BYSTAT) ? FALSE : TRUE ) ;
@@ -624,9 +599,7 @@
 #endif
 }
 
-void plc_clear_irq(smc,p)
-struct s_smc *smc ;
-int p ;
+void plc_clear_irq(struct s_smc *smc, int p)
 {
 	SK_UNUSED(p) ;
 
@@ -658,9 +631,7 @@
  *	LED_Y_OFF	just switch yellow LED off
  *	LED_Y_ON	just switch yello LED on
  */
-void led_indication(smc,led_event)
-struct s_smc	*smc ;
-int		led_event;
+void led_indication(struct s_smc *smc, int led_event)
 {
 	/* use smc->hw.mac_ring_is_up == TRUE 
 	 * as indication for Ring Operational
@@ -754,10 +725,7 @@
 }
 
 
-void pcm_state_change(smc,plc,p_state)
-struct s_smc *smc;
-int plc;
-int p_state;
+void pcm_state_change(struct s_smc *smc, int plc, int p_state)
 {
 	/*
 	 * the current implementation of pcm_state_change() in the driver
@@ -770,9 +738,7 @@
 }
 
 
-void rmt_indication(smc,i)
-struct s_smc *smc ;
-int i;
+void rmt_indication(struct s_smc *smc, int i)
 {
 	/* Call a driver special function if defined */
 	DRV_RMT_INDICATION(smc,i) ;
@@ -784,8 +750,7 @@
 /*
  * llc_recover_tx called by init_tx (fplus.c)
  */
-void llc_recover_tx(smc)
-struct s_smc *smc ;
+void llc_recover_tx(struct s_smc *smc)
 {
 #ifdef	LOAD_GEN
 	extern	int load_gen_flag ;
@@ -805,9 +770,7 @@
 /*
  * init DMA
  */
-void init_dma(smc,dma)
-struct s_smc *smc;
-int	dma;
+void init_dma(struct s_smc *smc, int dma)
 {
 	SK_UNUSED(smc) ;
 
@@ -828,9 +791,7 @@
 /*
  * disable DMA
  */
-void dis_dma(smc,dma)
-struct s_smc *smc ;
-int	dma;
+void dis_dma(struct s_smc *smc, int dma)
 {
 	SK_UNUSED(smc) ;
 
@@ -854,9 +815,7 @@
 static const int base[8] = { 0x000,0x002,0x004,0x006,0,0x0c4,0x0c8,0x0cc } ;
 static const int page[8] = { 0x087,0x083,0x081,0x082,0,0x08b,0x089,0x08a } ;
 
-void init_dma(smc,dma)
-struct s_smc *smc ;
-int	dma;
+void init_dma(struct s_smc *smc, int dma)
 {
 	/*
 	 * extended mode register
@@ -885,9 +844,7 @@
 
 }
 
-void dis_dma(smc,dma)
-struct s_smc *smc ;
-int	dma;
+void dis_dma(struct s_smc *smc, int dma)
 {
 	SK_UNUSED(smc) ;
 
@@ -896,16 +853,13 @@
 #endif	/* EISA */
 
 #ifdef	MCA
-void init_dma(smc,dma)
-struct s_smc *smc;
-int	dma;
+void init_dma(struct s_smc *smc, int dma)
 {
 	SK_UNUSED(smc) ;
 	SK_UNUSED(dma) ;
 }
-void dis_dma(smc,dma)
-struct s_smc *smc;
-int	dma;
+
+void dis_dma(struct s_smc *smc, int dma)
 {
 	SK_UNUSED(smc) ;
 	SK_UNUSED(dma) ;
@@ -913,16 +867,13 @@
 #endif
 
 #ifdef	PCI
-void init_dma(smc,dma)
-struct s_smc *smc;
-int	dma;
+void init_dma(struct s_smc *smc, int dma)
 {
 	SK_UNUSED(smc) ;
 	SK_UNUSED(dma) ;
 }
-void dis_dma(smc,dma)
-struct s_smc *smc;
-int	dma;
+
+void dis_dma(struct s_smc *smc, int dma)
 {
 	SK_UNUSED(smc) ;
 	SK_UNUSED(dma) ;
@@ -930,10 +881,7 @@
 #endif
 
 #ifdef MULT_OEM
-static int is_equal_num(comp1,comp2,num)
-char comp1[] ;
-char comp2[] ;
-int num ;
+static int is_equal_num(char comp1[], char comp2[], int num)
 {
 	int i ;
 
@@ -954,8 +902,7 @@
  *		2	data base empty
  *		3	no active entry	
  */
-int set_oi_id_def(smc)
-struct s_smc *smc ;
+int set_oi_id_def(struct s_smc *smc)
 {
 	int sel_id ;
 	int i ;
@@ -1029,9 +976,7 @@
  *
  ************************/
 #define LONG_CARD_ID(lo, hi)	((((hi) & 0xff) << 8) | ((lo) & 0xff))
-int exist_board(smc,slot)
-struct s_smc *smc ;
-int	slot ;
+int exist_board(struct s_smc *smc, int slot)
 {
 #ifdef MULT_OEM
 	SK_LOC_DECL(u_char,id[2]) ;
@@ -1081,9 +1026,8 @@
  *	number is specified, the function returns zero.
  *
  ************************/
-static int read_card_id(smc,slot)
-struct s_smc *smc ;	/* Do not use. */
-int slot ;
+static int read_card_id(struct s_smc *smc, int slot)
+/* struct s_smc *smc ;	Do not use. */
 {
 	int card_id ;
 
@@ -1126,9 +1070,7 @@
  * END_MANUAL_ENTRY()
  *
  ************************/
-int get_board_para(smc,slot)
-struct s_smc *smc ;
-int slot ;
+int get_board_para(struct s_smc *smc, int slot)
 {
 	int val ;
 	int i ;
@@ -1175,9 +1117,7 @@
 }
 
 /* Enable access to specified MCA slot. */
-static void EnableSlotAccess(smc,slot)
-struct s_smc *smc ;
-int slot ;
+static void EnableSlotAccess(struct s_smc *smc, int slot)
 {
 	SK_UNUSED(slot) ;
 
@@ -1195,8 +1135,7 @@
 }
 
 /* Disable access to MCA slot formerly enabled via EnableSlotAccess(). */
-static void DisableSlotAccess(smc)
-struct s_smc *smc ;
+static void DisableSlotAccess(struct s_smc *smc)
 {
 #ifndef AIX
 	SK_UNUSED(smc) ;
@@ -1245,9 +1184,7 @@
  *	The smc pointer must be valid now.
  *
  ************************/
-int exist_board(smc,slot)
-struct s_smc *smc ;
-int	slot ;
+int exist_board(struct s_smc *smc, int slot)
 {
 	int i ;
 #ifdef MULT_OEM
@@ -1284,9 +1221,7 @@
 }
 
 
-int get_board_para(smc,slot)
-struct s_smc *smc ;
-int	slot ;
+int get_board_para(struct s_smc *smc, int slot)
 {
 	int	i ;
 
@@ -1327,9 +1262,7 @@
 #endif	/* MULT_OEM */
 
 
-int exist_board(smc,port)
-struct s_smc *smc ;
-HW_PTR	port ;
+int exist_board(struct s_smc *smc, HW_PTR port)
 {
 	int	i ;
 #ifdef MULT_OEM
@@ -1400,9 +1333,7 @@
 #endif	/* MULT_OEM */
 }
 
-int get_board_para(smc,slot)
-struct s_smc *smc ;
-int	slot ;
+int get_board_para(struct s_smc *smc, int slot)
 {
 	SK_UNUSED(smc) ;
 	SK_UNUSED(slot) ;
@@ -1412,9 +1343,7 @@
 
 #ifdef PCI
 #ifdef USE_BIOS_FUN
-int exist_board(smc,slot)
-struct s_smc *smc ;
-int	slot ;
+int exist_board(struct s_smc *smc, int slot)
 {
 	u_short dev_id ;
 	u_short ven_id ;
@@ -1452,9 +1381,7 @@
 #endif	/* PCI */
 #endif	/* USE_BIOS_FUNC */
 
-void driver_get_bia(smc, bia_addr)
-struct s_smc *smc ;
-struct fddi_addr *bia_addr ;
+void driver_get_bia(struct s_smc *smc, struct fddi_addr *bia_addr)
 {
 	int i ;
 
@@ -1465,8 +1392,7 @@
 	}
 }
 
-void smt_start_watchdog(smc)
-struct s_smc *smc ;
+void smt_start_watchdog(struct s_smc *smc)
 {
 	SK_UNUSED(smc) ;	/* Make LINT happy. */
 
@@ -1481,8 +1407,7 @@
 #endif	/* DEBUG */
 }
 
-void smt_stop_watchdog(smc)
-struct s_smc *smc ;
+void smt_stop_watchdog(struct s_smc *smc)
 {
 	SK_UNUSED(smc) ;	/* Make LINT happy. */
 #ifndef	DEBUG
@@ -1497,9 +1422,7 @@
 }
 
 #ifdef	PCI
-static char get_rom_byte(smc,addr)
-struct s_smc *smc ;
-u_short	addr ;
+static char get_rom_byte(struct s_smc *smc, u_short addr)
 {
 	GET_PAGE(addr) ;
 	return (READ_PROM(ADDR(B2_FDP))) ;
@@ -1544,11 +1467,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-int mac_drv_vpd_read(smc,buf,size,image)
-struct s_smc *smc ;
-char *buf ;
-int size ;
-char image ;
+int mac_drv_vpd_read(struct s_smc *smc, char *buf, int size, char image)
 {
 	u_short	ibase ;
 	u_short pci_base ;
@@ -1597,16 +1516,14 @@
 	return(len) ;
 }
 
-void mac_drv_pci_fix(smc,fix_value)
-struct s_smc *smc ;
-u_long fix_value ;
+void mac_drv_pci_fix(struct s_smc *smc, u_long fix_value)
 {
 	smc->hw.pci_fix_value = fix_value ;
 }
 
-void mac_do_pci_fix(smc)
-struct s_smc *smc ;
+void mac_do_pci_fix(struct s_smc *smc)
 {
 	SK_UNUSED(smc) ;
 }
 #endif	/* PCI */
+
--- diff/drivers/net/skfp/ecm.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/ecm.c	2004-07-01 21:32:39.000000000 +0100
@@ -94,17 +94,16 @@
  * function declarations
  */
 
-static void ecm_fsm() ;
-static void start_ecm_timer() ;
-static void stop_ecm_timer() ;
-static void prop_actions() ;
+static void ecm_fsm(struct s_smc *smc, int cmd);
+static void start_ecm_timer(struct s_smc *smc, u_long value, int event);
+static void stop_ecm_timer(struct s_smc *smc);
+static void prop_actions(struct s_smc *smc);
 
 /*
 	init ECM state machine
 	clear all ECM vars and flags
 */
-void ecm_init(smc)
-struct s_smc *smc ;
+void ecm_init(struct s_smc *smc)
 {
 	smc->e.path_test = PT_PASSED ;
 	smc->e.trace_prop = 0 ;
@@ -122,9 +121,7 @@
 		process event
 	until SM is stable
 */
-void ecm(smc,event)
-struct s_smc *smc ;
-int event ;
+void ecm(struct s_smc *smc, int event)
 {
 	int	state ;
 
@@ -143,9 +140,7 @@
 /*
 	process ECM event
 */
-static void ecm_fsm(smc,cmd)
-struct s_smc *smc ;
-int cmd ;
+static void ecm_fsm(struct s_smc *smc, int cmd)
 {
 	int ls_a ;			/* current line state PHY A */
 	int ls_b ;			/* current line state PHY B */
@@ -429,8 +424,7 @@
 /*
  * trace propagation actions for SAS & DAS
  */
-static void prop_actions(smc)
-struct s_smc *smc ;
+static void prop_actions(struct s_smc *smc)
 {
 	int	port_in = 0 ;
 	int	port_out = 0 ;
@@ -480,8 +474,7 @@
 /*
  * trace propagation actions for Concentrator
  */
-static void prop_actions(smc)
-struct s_smc *smc ;
+static void prop_actions(struct s_smc *smc)
 {
 	int	initiator ;
 	int	upstream ;
@@ -527,10 +520,7 @@
  * SMT timer interface
  *	start ECM timer
  */
-static void start_ecm_timer(smc,value,event)
-struct s_smc *smc ;
-u_long value;
-int event ;
+static void start_ecm_timer(struct s_smc *smc, u_long value, int event)
 {
 	smt_timer_start(smc,&smc->e.ecm_timer,value,EV_TOKEN(EVENT_ECM,event));
 }
@@ -539,8 +529,7 @@
  * SMT timer interface
  *	stop ECM timer
  */
-static void stop_ecm_timer(smc)
-struct s_smc *smc ;
+static void stop_ecm_timer(struct s_smc *smc)
 {
 	if (smc->e.ecm_timer.tm_active)
 		smt_timer_stop(smc,&smc->e.ecm_timer) ;
--- diff/drivers/net/skfp/ess.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/ess.c	2004-07-01 21:32:39.000000000 +0100
@@ -80,8 +80,11 @@
 	-------------------------------------------------------------
 */
 
-static	void	ess_send_response(),		ess_config_fifo(),
-		ess_send_alc_req(),		ess_send_frame() ;
+static void ess_send_response(struct s_smc *smc, struct smt_header *sm,
+			      int sba_cmd);
+static void ess_config_fifo(struct s_smc *smc);
+static void ess_send_alc_req(struct s_smc *smc);
+static void ess_send_frame(struct s_smc *smc, SMbuf *mb);
 
 /*
 	-------------------------------------------------------------
@@ -89,26 +92,17 @@
 	-------------------------------------------------------------
 */
 
-extern	void	*sm_to_para() ;
-
-extern	void	smt_send_frame(),	smt_free_mbuf(),
-		set_formac_tsync(),	formac_reinit_tx() ;
-
-extern	int	smt_check_para() ;
-
-extern	SMbuf	*smt_get_mbuf(),	*smt_build_frame() ;
-
-extern	u_long	smt_get_tid() ;
-
 /*
 	-------------------------------------------------------------
 	PUBLIC FUNCTIONS:
 	-------------------------------------------------------------
 */
 
-	void	ess_timer_poll(),		ess_para_change() ;
-
-	int	ess_raf_received_pack(),	process_bw_alloc() ;
+void ess_timer_poll(struct s_smc *smc);
+void ess_para_change(struct s_smc *smc);
+int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm,
+			  int fs);
+int process_bw_alloc(struct s_smc *smc, long int payload, long int overhead);
 
 
 /*
@@ -120,11 +114,8 @@
 /*
  * evaluate the RAF frame
  */
-int ess_raf_received_pack(smc,mb,sm,fs)
-struct s_smc *smc ;
-SMbuf *mb ;
-struct smt_header *sm ;
-int fs ;
+int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm,
+			  int fs)
 {
 	void			*p ;		/* universal pointer */
 	struct smt_p_0016	*cmd ;		/* para: command for the ESS */
@@ -384,10 +375,7 @@
  * determines the synchronous bandwidth, set the TSYNC register and the
  * mib variables SBAPayload, SBAOverhead and fddiMACT-NEG.
  */
-int process_bw_alloc(smc,payload,overhead)
-struct s_smc *smc ;
-long payload ;
-long overhead ;
+int process_bw_alloc(struct s_smc *smc, long int payload, long int overhead)
 {
 	/*
 	 * determine the synchronous bandwidth (sync_bw) in bytes per T-NEG,
@@ -483,10 +471,8 @@
 	return(TRUE) ;
 }
 
-static void ess_send_response(smc,sm,sba_cmd)
-struct s_smc *smc ;
-struct smt_header *sm ;
-int sba_cmd ;
+static void ess_send_response(struct s_smc *smc, struct smt_header *sm,
+			      int sba_cmd)
 {
 	struct smt_sba_chg	*chg ;
 	SMbuf			*mb ;
@@ -550,9 +536,7 @@
 	ess_send_frame(smc,mb) ;
 }
 
-
-void ess_timer_poll(smc)
-struct s_smc *smc ;
+void ess_timer_poll(struct s_smc *smc)
 {
 	if (!smc->ess.raf_act_timer_poll)
 		return ;
@@ -566,8 +550,7 @@
 	}
 }
 
-static void ess_send_alc_req(smc)
-struct s_smc *smc ;
+static void ess_send_alc_req(struct s_smc *smc)
 {
 	struct smt_sba_alc_req *req ;
 	SMbuf	*mb ;
@@ -675,9 +658,7 @@
 	ess_send_frame(smc,mb) ;
 }
 
-static void ess_send_frame(smc,mb)
-struct s_smc *smc ;
-SMbuf *mb ;
+static void ess_send_frame(struct s_smc *smc, SMbuf *mb)
 {
 	/*
 	 * check if the frame must be send to the own ESS
@@ -703,15 +684,13 @@
 	}
 }
 
-void ess_para_change(smc)
-struct s_smc *smc ;
+void ess_para_change(struct s_smc *smc)
 {
 	(void)process_bw_alloc(smc,(long)smc->mib.a[PATH0].fddiPATHSbaPayload,
 		(long)smc->mib.a[PATH0].fddiPATHSbaOverhead) ;
 }
 
-static void ess_config_fifo(smc)
-struct s_smc *smc ;
+static void ess_config_fifo(struct s_smc *smc)
 {
 	/*
 	 * if nothing to do exit 
@@ -738,3 +717,4 @@
 #endif /* ESS */
 
 #endif	/* no SLIM_SMT */
+
--- diff/drivers/net/skfp/fplustm.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/fplustm.c	2004-07-01 21:32:39.000000000 +0100
@@ -43,10 +43,10 @@
 /*
  * prototypes for static function
  */
-static void build_claim_beacon() ;
-static int init_mac() ;
-static void rtm_init() ;
-static void smt_split_up_fifo() ;
+static void build_claim_beacon(struct s_smc *smc, u_long t_request);
+static int init_mac(struct s_smc *smc, int all);
+static void rtm_init(struct s_smc *smc);
+static void smt_split_up_fifo(struct s_smc *smc);
 
 #if (!defined(NO_SMT_PANIC) || defined(DEBUG))
 static	char write_mdr_warning [] = "E350 write_mdr() FM_SNPPND is set\n";
@@ -107,8 +107,7 @@
 			FM_SLOCLM | FM_SHICLM | FM_SMYCLM | FM_SCLM ;
 
 
-static u_long mac_get_tneg(smc)
-struct s_smc *smc ;
+static u_long mac_get_tneg(struct s_smc *smc)
 {
 	u_long	tneg ;
 
@@ -117,8 +116,7 @@
 		0xffe00000L)) ;
 }
 
-void mac_update_counter(smc)
-struct s_smc *smc ;
+void mac_update_counter(struct s_smc *smc)
 {
 	smc->mib.m[MAC0].fddiMACFrame_Ct =
 		(smc->mib.m[MAC0].fddiMACFrame_Ct & 0xffff0000L)
@@ -143,9 +141,7 @@
 /*
  * write long value into buffer memory over memory data register (MDR),
  */
-void	write_mdr(smc,val)
-struct s_smc *smc ;
-u_long val;
+void	write_mdr(struct s_smc *smc, u_long val)
 {
 	CHECK_NPP() ;
 	MDRW(val) ;
@@ -154,9 +150,7 @@
 /*
  * read long value from buffer memory over memory data register (MDR),
  */
-u_long read_mdr(smc,addr)
-struct s_smc *smc ;
-unsigned int addr;
+u_long read_mdr(struct s_smc *smc, unsigned int addr)
 {
 	long p ;
 	CHECK_NPP() ;
@@ -173,8 +167,7 @@
 /*
  * clear buffer memory
  */
-static void init_ram(smc)
-struct s_smc *smc ;
+static void init_ram(struct s_smc *smc)
 {
 	u_short i ;
 
@@ -193,8 +186,7 @@
 /*
  * set receive FIFO pointer
  */
-static void set_recvptr(smc)
-struct s_smc *smc ;
+static void set_recvptr(struct s_smc *smc)
 {
 	/*
 	 * initialize the pointer for receive queue 1
@@ -224,8 +216,7 @@
 /*
  * set transmit FIFO pointer
  */
-static void set_txptr(smc)
-struct s_smc *smc ;
+static void set_txptr(struct s_smc *smc)
 {
 	outpw(FM_A(FM_CMDREG2),FM_IRSTQ) ;	/* reset transmit queues */
 
@@ -257,8 +248,7 @@
 /*
  * init memory buffer management registers
  */
-static void init_rbc(smc)
-struct s_smc *smc ;
+static void init_rbc(struct s_smc *smc)
 {
 	u_short	rbc_ram_addr ;
 
@@ -279,8 +269,7 @@
 /*
  * init rx pointer
  */
-static void init_rx(smc)
-struct s_smc *smc ;
+static void init_rx(struct s_smc *smc)
 {
 	struct s_smt_rx_queue	*queue ;
 
@@ -302,9 +291,7 @@
 /*
  * set the TSYNC register of the FORMAC to regulate synchronous transmission
  */
-void set_formac_tsync(smc,sync_bw)
-struct s_smc *smc ;
-long sync_bw ;
+void set_formac_tsync(struct s_smc *smc, long sync_bw)
 {
 	outpw(FM_A(FM_TSYNC),(unsigned int) (((-sync_bw) >> 5) & 0xffff) ) ;
 }
@@ -312,8 +299,7 @@
 /*
  * init all tx data structures
  */
-static void init_tx(smc)
-struct s_smc *smc ;
+static void init_tx(struct s_smc *smc)
 {
 	struct s_smt_tx_queue	*queue ;
 
@@ -339,8 +325,7 @@
 	llc_recover_tx(smc) ;
 }
 
-static void mac_counter_init(smc)
-struct s_smc *smc ;
+static void mac_counter_init(struct s_smc *smc)
 {
 	int i ;
 	u_long *ec ;
@@ -363,8 +348,7 @@
 /*
  * set FORMAC address, and t_request
  */
-static	void set_formac_addr(smc)
-struct s_smc *smc ;
+static	void set_formac_addr(struct s_smc *smc)
 {
 	long	t_requ = smc->mib.m[MAC0].fddiMACT_Req ;
 
@@ -390,9 +374,7 @@
 	outpw(FM_A(FM_TREQ0),(unsigned)t_requ) ;
 }
 
-static void set_int(p,l)
-char *p;
-int l;
+static void set_int(char *p, int l)
 {
 	p[0] = (char)(l >> 24) ;
 	p[1] = (char)(l >> 16) ;
@@ -408,12 +390,12 @@
  * else
  *	append 'end of chain' pointer
  */
-static void copy_tx_mac(smc,td,mac,off,len)
-struct s_smc *smc ;
-u_long td;		/* transmit descriptor */
-struct fddi_mac *mac;	/* mac frame pointer */
-unsigned off;		/* start address within buffer memory */
-int len ;		/* lenght of the frame including the FC */
+static void copy_tx_mac(struct s_smc *smc, u_long td, struct fddi_mac *mac,
+			unsigned off, int len)
+/* u_long td;		 transmit descriptor */
+/* struct fddi_mac *mac; mac frame pointer */
+/* unsigned off;	 start address within buffer memory */
+/* int len ;		 lenght of the frame including the FC */
 {
 	int	i ;
 	u_int	*p ;
@@ -457,8 +439,7 @@
 
 	END_MANUAL_ENTRY
  */
-static void directed_beacon(smc)
-struct s_smc *smc ;
+static void directed_beacon(struct s_smc *smc)
 {
 	SK_LOC_DECL(u_int,a[2]) ;
 
@@ -487,9 +468,7 @@
 		special frame packets end with a pointer to their own
 		descriptor, and the MORE bit is set in the descriptor
 */
-static void build_claim_beacon(smc,t_request)
-struct s_smc *smc ;
-u_long t_request;
+static void build_claim_beacon(struct s_smc *smc, u_long t_request)
 {
 	u_int	td ;
 	int	len ;
@@ -550,8 +529,7 @@
 	outpw(FM_A(FM_RPXSF),0) ;
 }
 
-void formac_rcv_restart(smc)
-struct s_smc *smc ;
+void formac_rcv_restart(struct s_smc *smc)
 {
 	/* enable receive function */
 	SETMASK(FM_A(FM_MDREG1),smc->hw.fp.rx_mode,FM_ADDRX) ;
@@ -559,15 +537,13 @@
 	outpw(FM_A(FM_CMDREG1),FM_ICLLR) ;	/* clear receive lock */
 }
 
-void formac_tx_restart(smc)
-struct s_smc *smc ;
+void formac_tx_restart(struct s_smc *smc)
 {
 	outpw(FM_A(FM_CMDREG1),FM_ICLLS) ;	/* clear s-frame lock */
 	outpw(FM_A(FM_CMDREG1),FM_ICLLA0) ;	/* clear a-frame lock */
 }
 
-static void enable_formac(smc)
-struct s_smc *smc ;
+static void enable_formac(struct s_smc *smc)
 {
 	/* set formac IMSK : 0 enables irq */
 	outpw(FM_A(FM_IMSK1U),~mac_imsk1u) ;
@@ -607,9 +583,8 @@
 
 	END_MANUAL_ENTRY
  */
-void enable_tx_irq(smc, queue)
-struct s_smc *smc ;
-u_short	queue ;		/* 0 = synchronous queue, 1 = asynchronous queue 0 */
+void enable_tx_irq(struct s_smc *smc, u_short queue)
+/* u_short queue; 0 = synchronous queue, 1 = asynchronous queue 0 */
 {
 	u_short	imask ;
 
@@ -643,9 +618,8 @@
 
 	END_MANUAL_ENTRY
  */
-void disable_tx_irq(smc, queue)
-struct s_smc *smc ;
-u_short	queue ;		/* 0 = synchronous queue, 1 = asynchronous queue 0 */
+void disable_tx_irq(struct s_smc *smc, u_short queue)
+/* u_short queue; 0 = synchronous queue, 1 = asynchronous queue 0 */
 {
 	u_short	imask ;
 
@@ -660,8 +634,7 @@
 }
 #endif
 
-static void disable_formac(smc)
-struct s_smc *smc ;
+static void disable_formac(struct s_smc *smc)
 {
 	/* clear formac IMSK : 1 disables irq */
 	outpw(FM_A(FM_IMSK1U),MW) ;
@@ -673,9 +646,7 @@
 }
 
 
-static void mac_ring_up(smc,up)
-struct s_smc *smc ;
-int up;
+static void mac_ring_up(struct s_smc *smc, int up)
 {
 	if (up) {
 		formac_rcv_restart(smc) ;	/* enable receive function */
@@ -702,10 +673,7 @@
  * mac2_irq:	status bits for the receive queue 1, and ring status
  * 		ring status indication bits
  */
-void mac2_irq(smc,code_s2u,code_s2l)
-struct s_smc *smc ;
-u_short code_s2u ;
-u_short code_s2l ;
+void mac2_irq(struct s_smc *smc, u_short code_s2u, u_short code_s2l)
 {
 	u_short	change_s2l ;
 	u_short	change_s2u ;
@@ -831,10 +799,7 @@
 /*
  * mac3_irq:	receive queue 2 bits and address detection bits
  */
-void mac3_irq(smc,code_s3u,code_s3l)
-struct s_smc *smc ;
-u_short code_s3u ;
-u_short code_s3l ;
+void mac3_irq(struct s_smc *smc, u_short code_s3u, u_short code_s3l)
 {
 	UNUSED(code_s3l) ;
 
@@ -857,8 +822,7 @@
 /*
  * take formac offline
  */
-static void formac_offline(smc)
-struct s_smc *smc ;
+static void formac_offline(struct s_smc *smc)
 {
 	outpw(FM_A(FM_CMDREG2),FM_IACTR) ;/* abort current transmit activity */
 
@@ -876,8 +840,7 @@
 /*
  * bring formac online
  */
-static void formac_online(smc)
-struct s_smc *smc ;
+static void formac_online(struct s_smc *smc)
 {
 	enable_formac(smc) ;
 	SETMASK(FM_A(FM_MDREG1),FM_MONLINE | FM_SELRA | MDR1INIT |
@@ -887,8 +850,7 @@
 /*
  * FORMAC+ full init. (tx, rx, timer, counter, claim & beacon)
  */
-int init_fplus(smc)
-struct s_smc *smc ;
+int init_fplus(struct s_smc *smc)
 {
 	smc->hw.fp.nsa_mode = FM_MRNNSAFNMA ;
 	smc->hw.fp.rx_mode = FM_MDAMA ;
@@ -926,9 +888,7 @@
 	/* enable_formac(smc) ; */
 }
 
-static int init_mac(smc,all)
-struct s_smc *smc ;
-int all ;
+static int init_mac(struct s_smc *smc, int all)
 {
 	u_short	t_max,x ;
 	u_long	time=0 ;
@@ -1033,9 +993,7 @@
 /*
  * called by CFM
  */
-void config_mux(smc,mux)
-struct s_smc *smc ;
-int mux;
+void config_mux(struct s_smc *smc, int mux)
 {
 	plc_config_mux(smc,mux) ;
 
@@ -1049,8 +1007,7 @@
  * the interrupt must not be permanently enabled
  * RMT calls this function periodically (timer driven polling)
  */
-void sm_mac_check_beacon_claim(smc)
-struct s_smc *smc ;
+void sm_mac_check_beacon_claim(struct s_smc *smc)
 {
 	/* set formac IMSK : 0 enables irq */
 	outpw(FM_A(FM_IMSK2U),~(mac_imsk2u | mac_beacon_imsk2u)) ;
@@ -1063,9 +1020,7 @@
 /*
  * control ODL output
  */
-void sm_pm_control(smc,mode)
-struct s_smc *smc ;
-int mode;
+void sm_pm_control(struct s_smc *smc, int mode)
 {
 	SK_UNUSED(smc) ;
 
@@ -1084,9 +1039,7 @@
 /*
  * control MAC layer	(called by RMT)
  */
-void sm_ma_control(smc,mode)
-struct s_smc *smc ;
-int mode;
+void sm_ma_control(struct s_smc *smc, int mode)
 {
 	switch(mode) {
 	case MA_OFFLINE :
@@ -1110,8 +1063,7 @@
 	}
 }
 
-int sm_mac_get_tx_state(smc)
-struct s_smc *smc ;
+int sm_mac_get_tx_state(struct s_smc *smc)
 {
 	return((inpw(FM_A(FM_STMCHN))>>4)&7) ;
 }
@@ -1120,12 +1072,10 @@
  * multicast functions
  */
 
-static struct s_fpmc	*mac_get_mc_table(smc,user,own,del,can)
-struct s_smc *smc ;
-struct fddi_addr *user ;
-struct fddi_addr *own ;
-int del ;
-int can ;
+static struct s_fpmc* mac_get_mc_table(struct s_smc *smc,
+				       struct fddi_addr *user,
+				       struct fddi_addr *own,
+				       int del, int can)
 {
 	struct s_fpmc	*tb ;
 	struct s_fpmc	*slot ;
@@ -1166,8 +1116,7 @@
 
 	END_MANUAL_ENTRY()
  */
-void mac_clear_multicast(smc)
-struct s_smc *smc ;
+void mac_clear_multicast(struct s_smc *smc)
 {
 	struct s_fpmc	*tb ;
 	int i ;
@@ -1198,9 +1147,7 @@
 
 	END_MANUAL_ENTRY()
  */
-int mac_set_func_addr(smc,f_addr)
-struct s_smc *smc ;
-u_long f_addr ;
+int mac_set_func_addr(struct s_smc *smc, u_long f_addr)
 {
 	smc->hw.fp.func_addr = f_addr ;
 	return(0) ;
@@ -1235,10 +1182,7 @@
 
 	END_MANUAL_ENTRY()
  */
-int mac_add_multicast(smc,addr,can)
-struct s_smc *smc ;
-struct fddi_addr *addr ;
-int can ;
+int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can)
 {
 	SK_LOC_DECL(struct fddi_addr,own) ;
 	struct s_fpmc	*tb ;
@@ -1292,10 +1236,7 @@
 
 	END_MANUAL_ENTRY()
  */
-void mac_del_multicast(smc,addr,can)
-struct s_smc *smc ;
-struct fddi_addr *addr ;
-int can ;
+void mac_del_multicast(struct s_smc *smc, struct fddi_addr *addr, int can)
 {
 	SK_LOC_DECL(struct fddi_addr,own) ;
 	struct s_fpmc	*tb ;
@@ -1341,8 +1282,7 @@
 
 	END_MANUAL_ENTRY()
  */
-void mac_update_multicast(smc)
-struct s_smc *smc ;
+void mac_update_multicast(struct s_smc *smc)
 {
 	struct s_fpmc	*tb ;
 	u_char	*fu ;
@@ -1418,9 +1358,7 @@
 
 	END_MANUAL_ENTRY
  */
-void mac_set_rx_mode(smc,mode)
-struct s_smc *smc ;
-int mode ;
+void mac_set_rx_mode(struct s_smc *smc, int mode)
 {
 	switch (mode) {
 	case RX_ENABLE_ALLMULTI :
@@ -1476,8 +1414,7 @@
 
 	END_MANUAL_ENTRY
  */
-void rtm_irq(smc)
-struct s_smc *smc ;
+void rtm_irq(struct s_smc *smc)
 {
 	outpw(ADDR(B2_RTM_CRTL),TIM_CL_IRQ) ;		/* clear IRQ */
 	if (inpw(ADDR(B2_RTM_CRTL)) & TIM_RES_TOK) {
@@ -1490,15 +1427,13 @@
 	outpw(ADDR(B2_RTM_CRTL),TIM_START) ;	/* enable RTM monitoring */
 }
 
-static void rtm_init(smc)
-struct s_smc *smc ;
+static void rtm_init(struct s_smc *smc)
 {
 	outpd(ADDR(B2_RTM_INI),0) ;		/* timer = 0 */
 	outpw(ADDR(B2_RTM_CRTL),TIM_START) ;	/* enable IRQ */
 }
 
-void rtm_set_timer(smc)
-struct s_smc *smc ;
+void rtm_set_timer(struct s_smc *smc)
 {
 	/*
 	 * MIB timer and hardware timer have the same resolution of 80nS
@@ -1508,8 +1443,7 @@
 	outpd(ADDR(B2_RTM_INI),smc->mib.a[PATH0].fddiPATHT_Rmode) ;
 }
 
-static void smt_split_up_fifo(smc)
-struct s_smc *smc ;
+static void smt_split_up_fifo(struct s_smc *smc)
 {
 
 /*
@@ -1629,8 +1563,7 @@
 		smc->hw.fp.fifo.tx_a0_start, smc->hw.fp.fifo.rx2_fifo_start) ;
 }
 
-void formac_reinit_tx(smc)
-struct s_smc *smc ;
+void formac_reinit_tx(struct s_smc *smc)
 {
 	/*
 	 * Split up the FIFO and reinitialize the MAC if synchronous
@@ -1642,4 +1575,3 @@
 	}
 }
 
-
--- diff/drivers/net/skfp/h/cmtdef.h	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/h/cmtdef.h	2004-07-01 21:32:39.000000000 +0100
@@ -418,7 +418,6 @@
 	void	*pc_p ;
 } ;
 
-
 /*
  * link error monitor
  */
@@ -444,7 +443,6 @@
 
 #define NUMBITS	10
 
-
 #ifdef	AMDPLC
 
 /*
@@ -480,216 +478,184 @@
  * function prototypes
  */
 #include "h/mbuf.h"	/* Type definitions for MBUFs */
-void hwt_restart(                       /* hwt.c */
-#ifdef ANSIC
-        struct s_smc *smc
-#endif
-	) ;
-
-SMbuf *smt_build_frame(                 /* smt.c */
-#ifdef ANSIC
-        struct s_smc *smc,
-        int class,
-        int type,
-        int length
-#endif
-	) ;
-
-SMbuf *smt_get_mbuf(                     /* drvsr.c */
-#ifdef ANSIC
-        struct s_smc *smc
-#endif
-	) ;
-
-void *sm_to_para(                       /* smt.c */
-#ifdef ANSIC
-	struct s_smc *smc,
-        struct smt_header *sm,
-        int para
-#endif
-	) ;
+#include "h/smtstate.h"	/* struct smt_state */
+
+void hwt_restart(struct s_smc *smc);	/* hwt.c */
+SMbuf *smt_build_frame(struct s_smc *smc, int class, int type,
+		       int length);	/* smt.c */
+SMbuf *smt_get_mbuf(struct s_smc *smc);	/* drvsr.c */
+void *sm_to_para(struct s_smc *smc, struct smt_header *sm,
+		 int para);		/* smt.c */
 
 #ifndef SK_UNUSED
 #define SK_UNUSED(var)		(void)(var)
 #endif
 
-void queue_event() ;
-void ecm() ;
-void ecm_init() ;
-void rmt() ;
-void rmt_init() ;
-void pcm() ;
-void pcm_init() ;
-void cfm() ;
-void cfm_init() ;
-void smt_timer_start() ;
-void smt_timer_stop() ;
-void pcm_status_state() ;
-void plc_config_mux() ;
-void sm_lem_evaluate() ;
-void smt_clear_una_dna() ;
-void mac_status_para() ;
-void mac_update_counter() ;
-void sm_pm_ls_latch() ;
-void sm_ma_control() ;
-void sm_mac_check_beacon_claim() ;
-void config_mux() ;
-void smt_agent_init() ;
-void smt_timer_init() ;
-void smt_received_pack() ;
-void smt_add_para() ;
-void smt_swap_para() ;
-void ev_init() ;
-void hwt_init() ;
-u_long hwt_read() ;
-void hwt_stop() ;
-void hwt_start() ;
-void smt_send_mbuf() ;
-void smt_free_mbuf() ;
-void sm_pm_bypass_req() ;
-void rmt_indication() ;
-void cfm_state_change() ;
-void rx_indication() ;
-void tx_indication() ;
-#ifndef NO_SMT_PANIC
-void smt_panic() ;
-#else
-#ifdef	DEBUG
-void smt_panic() ;
+void queue_event(struct s_smc *smc, int class, int event);
+void ecm(struct s_smc *smc, int event);
+void ecm_init(struct s_smc *smc);
+void rmt(struct s_smc *smc, int event);
+void rmt_init(struct s_smc *smc);
+void pcm(struct s_smc *smc, const int np, int event);
+void pcm_init(struct s_smc *smc);
+void cfm(struct s_smc *smc, int event);
+void cfm_init(struct s_smc *smc);
+void smt_timer_start(struct s_smc *smc, struct smt_timer *timer, u_long time,
+		     u_long token);
+void smt_timer_stop(struct s_smc *smc, struct smt_timer *timer);
+void pcm_status_state(struct s_smc *smc, int np, int *type, int *state,
+		      int *remote, int *mac);
+void plc_config_mux(struct s_smc *smc, int mux);
+void sm_lem_evaluate(struct s_smc *smc);
+void smt_clear_una_dna(struct s_smc *smc);
+void mac_update_counter(struct s_smc *smc);
+void sm_pm_ls_latch(struct s_smc *smc, int phy, int on_off);
+void sm_ma_control(struct s_smc *smc, int mode);
+void sm_mac_check_beacon_claim(struct s_smc *smc);
+void config_mux(struct s_smc *smc, int mux);
+void smt_agent_init(struct s_smc *smc);
+void smt_timer_init(struct s_smc *smc);
+void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs);
+void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para,
+		  int index, int local);
+void smt_swap_para(struct smt_header *sm, int len, int direction);
+void ev_init(struct s_smc *smc);
+void hwt_init(struct s_smc *smc);
+u_long hwt_read(struct s_smc *smc);
+void hwt_stop(struct s_smc *smc);
+void hwt_start(struct s_smc *smc, u_long time);
+void smt_send_mbuf(struct s_smc *smc, SMbuf *mb, int fc);
+void smt_free_mbuf(struct s_smc *smc, SMbuf *mb);
+void sm_pm_bypass_req(struct s_smc *smc, int mode);
+void rmt_indication(struct s_smc *smc, int i);
+void cfm_state_change(struct s_smc *smc, int c_state);
+
+#if defined(DEBUG) || !defined(NO_SMT_PANIC)
+void smt_panic(struct s_smc *smc, char *text);
 #else
 #define	smt_panic(smc,text)
-#endif	/* DEBUG */
-#endif	/* NO_SMT_PANIC */
-void smt_stat_counter() ;
-void smt_timer_poll() ;
-u_long smt_get_time() ;
-u_long smt_get_tid() ;
-void smt_timer_done() ;
-void smt_set_defaults() ;
-void smt_fixup_mib() ;
-void smt_reset_defaults() ;
-void smt_agent_task() ;
-void smt_please_reconnect() ;
-int smt_check_para() ;
-void driver_get_bia() ;
-#ifdef	SUPERNET_3
-void drv_reset_indication() ;
+#endif /* DEBUG || !NO_SMT_PANIC */
+
+void smt_stat_counter(struct s_smc *smc, int stat);
+void smt_timer_poll(struct s_smc *smc);
+u_long smt_get_time(void);
+u_long smt_get_tid(struct s_smc *smc);
+void smt_timer_done(struct s_smc *smc);
+void smt_set_defaults(struct s_smc *smc);
+void smt_fixup_mib(struct s_smc *smc);
+void smt_reset_defaults(struct s_smc *smc, int level);
+void smt_agent_task(struct s_smc *smc);
+void smt_please_reconnect(struct s_smc *smc, int reconn_time);
+int smt_check_para(struct s_smc *smc, struct smt_header *sm,
+		   const u_short list[]);
+void driver_get_bia(struct s_smc *smc, struct fddi_addr *bia_addr);
+
+#ifdef SUPERNET_3
+void drv_reset_indication(struct s_smc *smc);
 #endif	/* SUPERNET_3 */
-void smt_start_watchdog() ;
 
-void smt_event() ;
-void pcm_event() ;
-void rmt_event() ;
-void cfm_event() ;
-void timer_event() ;
-void ev_dispatcher() ;
-
-void smt_get_state() ;
-void ecm_get_state() ;
-void pcm_get_state() ;
-void rmt_get_state() ;
-
-void ecm_state_change() ;
-int sm_pm_bypass_present() ;
-void pcm_state_change() ;
-void rmt_state_change() ;
-int sm_pm_get_ls() ;
-int pcm_get_s_port() ;
-int pcm_rooted_station() ;
-int cfm_get_mac_input() ;
-int cfm_get_mac_output() ;
-int port_to_mib() ;
-int cem_build_path() ;
-int sm_mac_get_tx_state() ;
-int is_individual() ;
-int is_my_addr() ;
-int is_broadcast() ;
-int is_equal() ;
-char *get_pcmstate() ;
-
-int smt_action() ;
-u_short smt_online() ;
-void smt_force_irq() ;
-void smt_pmf_received_pack() ;
-void smt_send_frame() ;
-void smt_set_timestamp() ;
-void mac_set_rx_mode() ;
-int mac_add_multicast() ;
-int mac_set_func_addr() ;
-void mac_del_multicast() ;
-void mac_update_multicast() ;
-void mac_clear_multicast() ;
-void mac_rx_directed_beacon() ;
-void set_formac_tsync() ;
-void formac_reinit_tx() ;
-void formac_tx_restart() ;
-void process_receive() ;
-void init_driver_fplus() ;
-
-void rtm_irq() ;
-void rtm_set_timer() ;
-void ring_status_indication() ;
-void llc_recover_tx() ;
-void llc_restart_tx() ;
-void plc_clear_irq() ;
-void plc_irq() ;
-int smt_set_mac_opvalues() ;
-#ifdef	TAG_MODE
-void mac_drv_pci_fix() ;
-void mac_do_pci_fix() ;
-void mac_drv_clear_tx_queue() ;
-void mac_drv_repair_descr() ;
-u_long hwt_quick_read() ;
-void hwt_wait_time() ;
+void smt_start_watchdog(struct s_smc *smc);
+void smt_event(struct s_smc *smc, int event);
+void timer_event(struct s_smc *smc, u_long token);
+void ev_dispatcher(struct s_smc *smc);
+void pcm_get_state(struct s_smc *smc, struct smt_state *state);
+void ecm_state_change(struct s_smc *smc, int e_state);
+int sm_pm_bypass_present(struct s_smc *smc);
+void pcm_state_change(struct s_smc *smc, int plc, int p_state);
+void rmt_state_change(struct s_smc *smc, int r_state);
+int sm_pm_get_ls(struct s_smc *smc, int phy);
+int pcm_get_s_port(struct s_smc *smc);
+int pcm_rooted_station(struct s_smc *smc);
+int cfm_get_mac_input(struct s_smc *smc);
+int cfm_get_mac_output(struct s_smc *smc);
+int port_to_mib(struct s_smc *smc, int p);
+int cem_build_path(struct s_smc *smc, char *to, int path_index);
+int sm_mac_get_tx_state(struct s_smc *smc);
+int is_individual(struct fddi_addr *addr);
+int is_my_addr(struct s_smc *smc, struct fddi_addr *addr);
+int is_broadcast(struct fddi_addr *addr);
+int is_equal(struct fddi_addr *addr1, struct fddi_addr *addr2);
+char *get_pcmstate(struct s_smc *smc, int np);
+int smt_action(struct s_smc *smc, int class, int code, int index);
+u_short smt_online(struct s_smc *smc, int on);
+void smt_force_irq(struct s_smc *smc);
+void smt_pmf_received_pack(struct s_smc *smc, SMbuf *mb, int local);
+void smt_send_frame(struct s_smc *smc, SMbuf *mb, int fc, int local);
+void smt_set_timestamp(struct s_smc *smc, u_char *p);
+void mac_set_rx_mode(struct s_smc *smc,	int mode);
+int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can);
+int mac_set_func_addr(struct s_smc *smc, u_long f_addr);
+void mac_del_multicast(struct s_smc *smc, struct fddi_addr *addr, int can);
+void mac_update_multicast(struct s_smc *smc);
+void mac_clear_multicast(struct s_smc *smc);
+void set_formac_tsync(struct s_smc *smc, long sync_bw);
+void formac_reinit_tx(struct s_smc *smc);
+void formac_tx_restart(struct s_smc *smc);
+void process_receive(struct s_smc *smc);
+void init_driver_fplus(struct s_smc *smc);
+void rtm_irq(struct s_smc *smc);
+void rtm_set_timer(struct s_smc *smc);
+void ring_status_indication(struct s_smc *smc, u_long status);
+void llc_recover_tx(struct s_smc *smc);
+void llc_restart_tx(struct s_smc *smc);
+void plc_clear_irq(struct s_smc *smc, int p);
+void plc_irq(struct s_smc *smc,	int np,	unsigned int cmd);
+int smt_set_mac_opvalues(struct s_smc *smc);
+
+#ifdef TAG_MODE
+void mac_drv_pci_fix(struct s_smc *smc, u_long fix_value);
+void mac_do_pci_fix(struct s_smc *smc);
+void mac_drv_clear_tx_queue(struct s_smc *smc);
+void mac_drv_repair_descr(struct s_smc *smc);
+u_long hwt_quick_read(struct s_smc *smc);
+void hwt_wait_time(struct s_smc *smc, u_long start, long duration);
 #endif
 
 #ifdef SMT_PNMI
-#ifdef ANSIC
-int pnmi_init (struct s_smc* smc);
-int pnmi_process_ndis_id (struct s_smc* smc, u_long ndis_oid, void* buf,
-		int len, int* BytesAccessed, int* BytesNeeded, u_char action);
-#else
-int pnmi_init ();
-int pnmi_process_ndis_id ();
-#endif
+int pnmi_init(struct s_smc* smc);
+int pnmi_process_ndis_id(struct s_smc *smc, u_long ndis_oid, void *buf, int len,
+			 int *BytesAccessed, int *BytesNeeded, u_char action);
 #endif
 
 #ifdef	SBA
 #ifndef _H2INC
-void sba() ;
+void sba();
 #endif
-void sba_raf_received_pack() ;
-void sba_timer_poll() ;
-void smt_init_sba() ;
+void sba_raf_received_pack();
+void sba_timer_poll();
+void smt_init_sba();
 #endif
+
 #ifdef	ESS
-int ess_raf_received_pack() ;
-void ess_timer_poll() ;
-void ess_para_change() ;
+int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm,
+			  int fs);
+void ess_timer_poll(struct s_smc *smc);
+void ess_para_change(struct s_smc *smc);
 #endif
 
-#ifdef	BOOT
-#define smt_srf_event(a,b,c,d)
-#define smt_init_evc(a)
+#ifndef	BOOT
+void smt_init_evc(struct s_smc *smc);
+void smt_srf_event(struct s_smc *smc, int code, int index, int cond);
 #else
-void smt_init_evc() ;
-void smt_srf_event() ;
+#define smt_init_evc(smc)
+#define smt_srf_event(smc,code,index,cond)
 #endif
 
 #ifndef SMT_REAL_TOKEN_CT
-void smt_emulate_token_ct();
+void smt_emulate_token_ct(struct s_smc *smc, int mac_index);
 #endif
 
 #if defined(DEBUG) && !defined(BOOT)
-void dump_smt() ;
+void dump_smt(struct s_smc *smc, struct smt_header *sm, char *text);
 #else
 #define	dump_smt(smc,sm,text)
 #endif
 
 #ifdef	DEBUG
-char	*addr_to_string() ;
-void	dump_hex() ;
+char* addr_to_string(struct fddi_addr *addr);
+void dump_hex(char *p, int len);
 #endif
+
 #endif	/* PROTOTYP_INC */
 
 /* PNMI default defines */
--- diff/drivers/net/skfp/h/smtstate.h	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/h/smtstate.h	2004-07-01 21:32:39.000000000 +0100
@@ -12,6 +12,9 @@
  *
  ******************************************************************************/
 
+#ifndef _SKFP_H_SMTSTATE_H_
+#define _SKFP_H_SMTSTATE_H_
+
 /*
  *	SMT state definitions
  */
@@ -98,3 +101,6 @@
 struct smt_state {
 	struct pcm_state pcm_state[NUMPHYS] ;	/* port A & port B */
 } ;
+
+#endif
+
--- diff/drivers/net/skfp/hwmtm.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/hwmtm.c	2004-07-01 21:32:39.000000000 +0100
@@ -75,15 +75,17 @@
 	-------------------------------------------------------------
 */
 
-static	void	queue_llc_rx(),		smt_to_llc(),
-		init_txd_ring(),	init_rxd_ring(),
-		queue_txd_mb() ;
-
-static	u_long	init_descr_ring(),	repair_txd_ring(),
-		repair_rxd_ring() ;
-
-static	SMbuf	*get_llc_rx(),		*get_txd_mb() ;
-
+static void queue_llc_rx(struct s_smc *smc, SMbuf *mb);
+static void smt_to_llc(struct s_smc *smc, SMbuf *mb);
+static void init_txd_ring(struct s_smc *smc);
+static void init_rxd_ring(struct s_smc *smc);
+static void queue_txd_mb(struct s_smc *smc, SMbuf *mb);
+static u_long init_descr_ring(struct s_smc *smc, union s_fp_descr volatile *start,
+			      int count);
+static u_long repair_txd_ring(struct s_smc *smc, struct s_smt_tx_queue *queue);
+static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue);
+static SMbuf* get_llc_rx(struct s_smc *smc);
+static SMbuf* get_txd_mb(struct s_smc *smc);
 
 /*
 	-------------------------------------------------------------
@@ -92,55 +94,81 @@
 */
 /*	The external SMT functions are listed in cmtdef.h */
 
-extern	void	*mac_drv_get_space(),	*mac_drv_get_desc_mem(),
-		init_board(),		mac_drv_fill_rxd(),
-		plc1_irq(),		mac_drv_tx_complete(),
-		plc2_irq(),		mac1_irq(),
-		mac2_irq(),		mac3_irq(),
-		timer_irq(),		mac_drv_rx_complete(),
-		mac_drv_requeue_rxd(),	init_plc(),
-		mac_drv_clear_rxd(),	llc_restart_tx(),
-		ev_dispatcher(),	smt_force_irq() ;
+extern void* mac_drv_get_space(struct s_smc *smc, unsigned int size);
+extern void* mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size);
+extern void init_board(struct s_smc *smc, u_char *mac_addr);
+extern void mac_drv_fill_rxd(struct s_smc *smc);
+extern void plc1_irq(struct s_smc *smc);
+extern void mac_drv_tx_complete(struct s_smc *smc,
+				volatile struct s_smt_fp_txd *txd);
+extern void plc2_irq(struct s_smc *smc);
+extern void mac1_irq(struct s_smc *smc, u_short stu, u_short stl);
+extern void mac2_irq(struct s_smc *smc, u_short code_s2u, u_short code_s2l);
+extern void mac3_irq(struct s_smc *smc, u_short code_s3u, u_short code_s3l);
+extern void timer_irq(struct s_smc *smc);
+extern void mac_drv_rx_complete(struct s_smc *smc,
+				volatile struct s_smt_fp_rxd *rxd,
+				int frag_count, int len);
+extern void mac_drv_requeue_rxd(struct s_smc *smc, 
+				volatile struct s_smt_fp_rxd *rxd,
+				int frag_count);
+extern void init_plc(struct s_smc *smc);
+extern void mac_drv_clear_rxd(struct s_smc *smc,
+			      volatile struct s_smt_fp_rxd *rxd, int frag_count);
 
 #ifdef	USE_OS_CPY
-extern	void	hwm_cpy_rxd2mb(),	hwm_cpy_txd2mb() ;
+extern void hwm_cpy_rxd2mb(void);
+extern void hwm_cpy_txd2mb(void);
 #endif
+
 #ifdef	ALL_RX_COMPLETE
-extern	void	mac_drv_all_receives_complete() ;
+extern void mac_drv_all_receives_complete(void);
 #endif
 
-extern	u_long	mac_drv_virt2phys(),	dma_master() ;
+extern u_long mac_drv_virt2phys(struct s_smc *smc, void *virt);
+extern u_long dma_master(struct s_smc *smc, void *virt, int len, int flag);
 
 #ifdef	NDIS_OS2
-extern	void	post_proc() ;
+extern void post_proc(void);
 #else
-extern	void	dma_complete() ;
+extern void dma_complete(struct s_smc *smc, volatile union s_fp_descr *descr,
+			 int flag);
 #endif
 
-extern	int	init_fplus(),		mac_drv_rx_init() ;
+extern int init_fplus(struct s_smc *smc);
+extern int mac_drv_rx_init(struct s_smc *smc, int len, int fc, char *look_ahead,
+			   int la_len);
 
 /*
 	-------------------------------------------------------------
 	PUBLIC FUNCTIONS:
 	-------------------------------------------------------------
 */
-	void	process_receive(),	smt_send_mbuf(),
-		fddi_isr(),		mac_drv_clear_txd(),
-		smt_free_mbuf(),	init_driver_fplus(),
-		mac_drv_rx_mode(),	init_fddi_driver(),
-		mac_drv_clear_tx_queue(),
-		mac_drv_clear_rx_queue(),
-		hwm_tx_frag(),		hwm_rx_frag() ;
-
-	int	mac_drv_rx_frag(),	mac_drv_init(),
-		hwm_tx_init() ;
+void process_receive(struct s_smc *smc);
+void fddi_isr(struct s_smc *smc);
+void mac_drv_clear_txd(struct s_smc *smc);
+void smt_free_mbuf(struct s_smc *smc, SMbuf *mb);
+void init_driver_fplus(struct s_smc *smc);
+void mac_drv_rx_mode(struct s_smc *smc, int mode);
+void init_fddi_driver(struct s_smc *smc, u_char *mac_addr);
+void mac_drv_clear_tx_queue(struct s_smc *smc);
+void mac_drv_clear_rx_queue(struct s_smc *smc);
+void hwm_tx_frag(struct s_smc *smc, char far *virt, u_long phys, int len,
+		 int frame_status);
+void hwm_rx_frag(struct s_smc *smc, char far *virt, u_long phys, int len,
+		 int frame_status);
+
+int mac_drv_rx_frag(struct s_smc *smc, void far *virt, int len);
+int mac_drv_init(struct s_smc *smc);
+int hwm_tx_init(struct s_smc *smc, u_char fc, int frag_count, int frame_len,
+		int frame_status);
 
-	u_int	mac_drv_check_space() ;
+u_int mac_drv_check_space(void);
 
-	SMbuf 	*smt_get_mbuf() ;
+SMbuf* smt_get_mbuf(struct s_smc *smc);
 
 #ifdef DEBUG
-	void	mac_drv_debug_lev() ;
+	void mac_drv_debug_lev(void);
 #endif
 
 /*
@@ -208,7 +236,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-u_int mac_drv_check_space()
+u_int mac_drv_check_space(void)
 {
 #ifdef	MB_OUTSIDE_SMC
 #ifdef	COMMON_MB_POOL
@@ -238,8 +266,7 @@
  *			mac_drv_init once, after the adatper is detected.
  *	END_MANUAL_ENTRY
  */
-int mac_drv_init(smc)
-struct s_smc *smc ;
+int mac_drv_init(struct s_smc *smc)
 {
 	if (sizeof(struct s_smt_fp_rxd) % 16) {
 		SMT_PANIC(smc,HWM_E0001,HWM_E0001_MSG) ;
@@ -289,8 +316,7 @@
  *	 least significant byte etc.)
  *	END_MANUAL_ENTRY
  */
-void init_driver_fplus(smc)
-struct s_smc *smc ;
+void init_driver_fplus(struct s_smc *smc)
 {
 	smc->hw.fp.mdr2init = FM_LSB | FM_BMMODE | FM_ENNPRQ | FM_ENHSRQ | 3 ;
 
@@ -305,10 +331,9 @@
 #endif
 }
 
-static u_long init_descr_ring(smc,start,count)
-struct s_smc *smc ;
-union s_fp_descr volatile *start;
-int count ;
+static u_long init_descr_ring(struct s_smc *smc,
+			      union s_fp_descr volatile *start,
+			      int count)
 {
 	int i ;
 	union s_fp_descr volatile *d1 ;
@@ -337,8 +362,7 @@
 	return(phys) ;
 }
 
-static void init_txd_ring(smc)
-struct s_smc *smc ;
+static void init_txd_ring(struct s_smc *smc)
 {
 	struct s_smt_fp_txd volatile *ds ;
 	struct s_smt_tx_queue *queue ;
@@ -375,8 +399,7 @@
 	outpd(ADDR(B5_XS_DA),phys) ;
 }
 
-static void init_rxd_ring(smc)
-struct s_smc *smc ;
+static void init_rxd_ring(struct s_smc *smc)
 {
 	struct s_smt_fp_rxd volatile *ds ;
 	struct s_smt_rx_queue *queue ;
@@ -406,9 +429,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-void init_fddi_driver(smc,mac_addr)
-struct	s_smc	*smc ;
-u_char		*mac_addr ;	/* canonical address */
+void init_fddi_driver(struct s_smc *smc, u_char *mac_addr)
 {
 	SMbuf	*mb ;
 	int	i ;
@@ -472,8 +493,7 @@
 }
 
 
-SMbuf *smt_get_mbuf(smc)
-struct s_smc *smc ;
+SMbuf *smt_get_mbuf(struct s_smc *smc)
 {
 	register SMbuf	*mb ;
 
@@ -495,9 +515,7 @@
 	return (mb) ;	/* May be NULL */
 }
 
-void smt_free_mbuf(smc, mb)
-struct s_smc	*smc ;
-SMbuf		*mb;
+void smt_free_mbuf(struct s_smc *smc, SMbuf *mb)
 {
 
 	if (mb) {
@@ -543,8 +561,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-void mac_drv_repair_descr(smc)
-struct s_smc *smc ;
+void mac_drv_repair_descr(struct s_smc *smc)
 {
 	u_long	phys ;
 
@@ -576,9 +593,7 @@
 	outpd(ADDR(B0_R1_CSR),CSR_START) ;
 }
 
-static u_long repair_txd_ring(smc,queue)
-struct s_smc *smc ;
-struct s_smt_tx_queue *queue ;
+static u_long repair_txd_ring(struct s_smc *smc, struct s_smt_tx_queue *queue)
 {
 	int i ;
 	int tx_used ;
@@ -630,9 +645,7 @@
  *	  RxDs with an OWN bit set but with a reset STF bit should be
  *	  skipped and owned by the driver (OWN = 0). 
  */
-static u_long repair_rxd_ring(smc,queue)
-struct s_smc *smc ;
-struct s_smt_rx_queue *queue ;
+static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue)
 {
 	int i ;
 	int rx_used ;
@@ -703,8 +716,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-void fddi_isr(smc)
-struct s_smc *smc ;
+void fddi_isr(struct s_smc *smc)
 {
 	u_long		is ;		/* ISR source */
 	u_short		stu, stl ;
@@ -987,9 +999,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-void mac_drv_rx_mode(smc,mode)
-struct s_smc *smc ;
-int mode ;
+void mac_drv_rx_mode(struct s_smc *smc, int mode)
 {
 	switch(mode) {
 	case RX_ENABLE_PASS_SMT:
@@ -1038,8 +1048,7 @@
 /*
  * process receive queue
  */
-void process_receive(smc)
-struct s_smc *smc ;
+void process_receive(struct s_smc *smc)
 {
 	int i ;
 	int n ;
@@ -1379,9 +1388,7 @@
 	return ;	/* lint bug: needs return detect end of function */
 }
 
-static void smt_to_llc(smc,mb)
-struct s_smc *smc ;
-SMbuf *mb ;
+static void smt_to_llc(struct s_smc *smc, SMbuf *mb)
 {
 	u_char	fc ;
 
@@ -1416,12 +1423,8 @@
  *
  *	END_MANUAL_ENTRY
  */
-void hwm_rx_frag(smc,virt,phys,len,frame_status)
-struct s_smc *smc ;
-char far *virt ;
-u_long phys ;
-int len ;
-int frame_status ;
+void hwm_rx_frag(struct s_smc *smc, char far *virt, u_long phys, int len,
+		 int frame_status)
 {
 	struct s_smt_fp_rxd volatile *r ;
 	u_int	rbctrl ;
@@ -1460,10 +1463,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-int mac_drv_rx_frag(smc,virt,len)
-struct s_smc *smc ;
-void far *virt ;
-int len ;
+int mac_drv_rx_frag(struct s_smc *smc, void far *virt, int len)
 {
 	NDD_TRACE("RHSB",virt,len,smc->os.hwm.r.mb_pos) ;
 
@@ -1500,8 +1500,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-void mac_drv_clear_rx_queue(smc)
-struct s_smc *smc ;
+void mac_drv_clear_rx_queue(struct s_smc *smc)
 {
 	struct s_smt_fp_rxd volatile *r ;
 	struct s_smt_fp_rxd volatile *next_rxd ;
@@ -1588,12 +1587,8 @@
  *
  *	END_MANUAL_ENTRY
  */
-int hwm_tx_init(smc,fc,frag_count,frame_len,frame_status)
-struct	s_smc *smc ;
-u_char fc ;
-int frag_count ;
-int frame_len ;
-int frame_status ;
+int hwm_tx_init(struct s_smc *smc, u_char fc, int frag_count, int frame_len,
+		int frame_status)
 {
 	NDD_TRACE("THiB",fc,frag_count,frame_len) ;
 	smc->os.hwm.tx_p = smc->hw.fp.tx[frame_status & QUEUE_A0] ;
@@ -1670,12 +1665,8 @@
  *
  *	END_MANUAL_ENTRY
  */
-void hwm_tx_frag(smc,virt,phys,len,frame_status)
-struct	s_smc *smc ;
-char far *virt ;
-u_long phys ;
-int len ;
-int frame_status ;
+void hwm_tx_frag(struct s_smc *smc, char far *virt, u_long phys, int len,
+		 int frame_status)
 {
 	struct s_smt_fp_txd volatile *t ;
 	struct s_smt_tx_queue *queue ;
@@ -1780,9 +1771,7 @@
 /*
  * queues a receive for later send
  */
-static void queue_llc_rx(smc,mb)
-struct	s_smc *smc ;
-SMbuf	*mb ;
+static void queue_llc_rx(struct s_smc *smc, SMbuf *mb)
 {
 	DB_GEN("queue_llc_rx: mb = %x",(void *)mb,0,4) ;
 	smc->os.hwm.queued_rx_frames++ ;
@@ -1806,8 +1795,7 @@
 /*
  * get a SMbuf from the llc_rx_queue
  */
-static SMbuf *get_llc_rx(smc)
-struct	s_smc *smc ;
+static SMbuf *get_llc_rx(struct s_smc *smc)
 {
 	SMbuf	*mb ;
 
@@ -1823,9 +1811,7 @@
  * queues a transmit SMT MBuf during the time were the MBuf is
  * queued the TxD ring
  */
-static void queue_txd_mb(smc,mb)
-struct	s_smc *smc ;
-SMbuf	*mb ;
+static void queue_txd_mb(struct s_smc *smc, SMbuf *mb)
 {
 	DB_GEN("_rx: queue_txd_mb = %x",(void *)mb,0,4) ;
 	smc->os.hwm.queued_txd_mb++ ;
@@ -1842,8 +1828,7 @@
 /*
  * get a SMbuf from the txd_tx_queue
  */
-static SMbuf *get_txd_mb(smc)
-struct	s_smc *smc ;
+static SMbuf *get_txd_mb(struct s_smc *smc)
 {
 	SMbuf *mb ;
 
@@ -1858,10 +1843,7 @@
 /*
  *	SMT Send function
  */
-void smt_send_mbuf(smc,mb,fc)
-struct s_smc	*smc;
-SMbuf		*mb;
-int		fc;
+void smt_send_mbuf(struct s_smc *smc, SMbuf *mb, int fc)
 {
 	char far *data ;
 	int	len ;
@@ -1995,8 +1977,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-void mac_drv_clear_txd(smc)
-struct s_smc *smc ;
+void mac_drv_clear_txd(struct s_smc *smc)
 {
 	struct s_smt_tx_queue *queue ;
 	struct s_smt_fp_txd volatile *t1 ;
@@ -2087,8 +2068,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-void mac_drv_clear_tx_queue(smc)
-struct s_smc *smc ;
+void mac_drv_clear_tx_queue(struct s_smc *smc)
 {
 	struct s_smt_fp_txd volatile *t ;
 	struct s_smt_tx_queue *queue ;
@@ -2180,10 +2160,7 @@
  *
  *	END_MANUAL_ENTRY
  */
-void mac_drv_debug_lev(smc,flag,lev)
-struct s_smc *smc ;
-int flag ;
-int lev ;
+void mac_drv_debug_lev(struct s_smc *smc, int flag, int lev)
 {
 	switch(flag) {
 	case (int)NULL:
--- diff/drivers/net/skfp/hwt.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/hwt.c	2004-07-01 21:32:39.000000000 +0100
@@ -39,7 +39,7 @@
  * Prototypes of local functions.
  */
 /* 28-Jun-1994 sw - Note: hwt_restart() is also used in module 'drvfbi.c'. */
-/*static*/ void hwt_restart() ;
+/*static void hwt_restart() ; */
 
 /************************
  *
@@ -60,9 +60,7 @@
  ************************/
 #define	HWT_MAX	(65000)
 
-void hwt_start(smc, time)
-struct s_smc *smc ;
-u_long time ;
+void hwt_start(struct s_smc *smc, u_long time)
 {
 	u_short	cnt ;
 
@@ -115,8 +113,7 @@
  *	Nothing.
  *
  ************************/
-void hwt_stop(smc)
-struct s_smc *smc ;
+void hwt_stop(struct s_smc *smc)
 {
 #ifndef PCI
 	/* stop counter 0 by switching to mode 0 */
@@ -145,8 +142,7 @@
  *	Nothing.
  *
  ************************/
-void hwt_init(smc)
-struct s_smc *smc ;
+void hwt_init(struct s_smc *smc)
 {
 	smc->hw.t_start = 0 ;
 	smc->hw.t_stop	= 0 ;
@@ -169,8 +165,7 @@
  *	Nothing.
  *
  ************************/
-void hwt_restart(smc)
-struct s_smc *smc ;
+void hwt_restart(struct s_smc *smc)
 {
 	hwt_stop(smc) ;
 #ifndef	PCI
@@ -193,8 +188,7 @@
  *	The elapsed time since last start in units of 16us.
  *
  ************************/
-u_long hwt_read(smc)
-struct s_smc *smc ;
+u_long hwt_read(struct s_smc *smc)
 {
 	u_short	tr ;
 #ifndef	PCI
@@ -238,8 +232,7 @@
  *	current timer value in units of 80ns.
  *
  ************************/
-u_long hwt_quick_read(smc)
-struct s_smc *smc ;
+u_long hwt_quick_read(struct s_smc *smc)
 {
 	u_long interval ;
 	u_long time ;
@@ -267,10 +260,7 @@
  * NOTE: The fuction will return immediately, if the timer is not 
  *	 started
  ************************/
-void hwt_wait_time(smc,start,duration)
-struct s_smc *smc ;
-u_long	start ;
-long	duration ;
+void hwt_wait_time(struct s_smc *smc, u_long start, long int duration)
 {
 	long	diff ;
 	long	interval ;
@@ -312,3 +302,4 @@
 	}
 }
 #endif
+
--- diff/drivers/net/skfp/lnkstat.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/lnkstat.c	2004-07-01 21:32:39.000000000 +0100
@@ -52,8 +52,7 @@
 
 	END_MANUAL_ENTRY()
  */
-u_long smt_get_error_word(smc)
-struct s_smc *smc ;
+u_long smt_get_error_word(struct s_smc *smc)
 {
 	u_long	st;
 
@@ -92,8 +91,7 @@
 
 	END_MANUAL_ENTRY()
  */
-u_long smt_get_event_word(smc)
-struct s_smc *smc ;
+u_long smt_get_event_word(struct s_smc *smc)
 {
 	return (u_long) 0;
 }
@@ -111,8 +109,7 @@
 
 	END_MANUAL_ENTRY()
  */
-u_long smt_get_port_event_word(smc)
-struct s_smc *smc ;
+u_long smt_get_port_event_word(struct s_smc *smc)
 {
 	return (u_long) 0;
 }
@@ -135,10 +132,7 @@
 
 	END_MANUAL_ENTRY()
  */
-int smt_read_errorlog(smc,p,len)
-struct s_smc *smc ;
-char _far *p ;
-int len ;
+int smt_read_errorlog(struct s_smc *smc, char _far *p, int len)
 {
 	int			i ;
 	int			st ;
@@ -207,3 +201,4 @@
 		er->ucode_version_level = 0x0101 ;
 	return(len) ;
 }
+
--- diff/drivers/net/skfp/pcmplc.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/pcmplc.c	2004-07-01 21:32:39.000000000 +0100
@@ -199,28 +199,25 @@
 			PL_PCM_ENABLED | PL_SELF_TEST | PL_EBUF_ERR;
 
 /* external functions */
-void	all_selection_criteria ();
+void all_selection_criteria(struct s_smc *smc);
 
 /* internal functions */
-static void pcm_fsm() ;
-static void pc_rcode_actions() ;
-static void pc_tcode_actions() ;
-static void reset_lem_struct() ;
-static void plc_init() ;
-static void sm_ph_lem_start() ;
-static void sm_ph_lem_stop() ;
-static void sm_ph_linestate() ;
-static void real_init_plc() ;
+static void pcm_fsm(struct s_smc *smc, struct s_phy *phy, int cmd);
+static void pc_rcode_actions(struct s_smc *smc, int bit, struct s_phy *phy);
+static void pc_tcode_actions(struct s_smc *smc, const int bit, struct s_phy *phy);
+static void reset_lem_struct(struct s_phy *phy);
+static void plc_init(struct s_smc *smc, int p);
+static void sm_ph_lem_start(struct s_smc *smc, int np, int threshold);
+static void sm_ph_lem_stop(struct s_smc *smc, int np);
+static void sm_ph_linestate(struct s_smc *smc, int phy, int ls);
+static void real_init_plc(struct s_smc *smc);
 
 /*
  * SMT timer interface
  *      start PCM timer 0
  */
-static void start_pcm_timer0(smc,value,event,phy)
-struct s_smc *smc ;
-u_long value;
-int event;
-struct s_phy *phy;
+static void start_pcm_timer0(struct s_smc *smc, u_long value, int event,
+			     struct s_phy *phy)
 {
 	phy->timer0_exp = FALSE ;       /* clear timer event flag */
 	smt_timer_start(smc,&phy->pcm_timer0,value,
@@ -230,9 +227,7 @@
  * SMT timer interface
  *      stop PCM timer 0
  */
-static void stop_pcm_timer0(smc,phy)
-struct s_smc *smc ;
-struct s_phy *phy;
+static void stop_pcm_timer0(struct s_smc *smc, struct s_phy *phy)
 {
 	if (phy->pcm_timer0.tm_active)
 		smt_timer_stop(smc,&phy->pcm_timer0) ;
@@ -242,8 +237,7 @@
 	init PCM state machine (called by driver)
 	clear all PCM vars and flags
 */
-void pcm_init(smc)
-struct s_smc *smc ;
+void pcm_init(struct s_smc *smc)
 {
 	int		i ;
 	int		np ;
@@ -407,8 +401,7 @@
 	real_init_plc(smc) ;
 }
 
-void init_plc(smc)
-struct s_smc *smc ;
+void init_plc(struct s_smc *smc)
 {
 	SK_UNUSED(smc) ;
 
@@ -421,8 +414,7 @@
 	 */
 }
 
-static void real_init_plc(smc)
-struct s_smc *smc ;
+static void real_init_plc(struct s_smc *smc)
 {
 	int	p ;
 
@@ -430,9 +422,7 @@
 		plc_init(smc,p) ;
 }
 
-static void plc_init(smc,p)
-struct s_smc *smc ;
-int p;
+static void plc_init(struct s_smc *smc, int p)
 {
 	int	i ;
 #ifndef	MOT_ELM
@@ -495,10 +485,7 @@
 /*
  * control PCM state machine
  */
-static void plc_go_state(smc,p,state)
-struct s_smc *smc ;
-int p;
-int state;
+static void plc_go_state(struct s_smc *smc, int p, int state)
 {
 	HW_PTR port ;
 	int val ;
@@ -514,9 +501,7 @@
 /*
  * read current line state (called by ECM & PCM)
  */
-int sm_pm_get_ls(smc,phy)
-struct s_smc *smc ;
-int phy;
+int sm_pm_get_ls(struct s_smc *smc, int phy)
 {
 	int	state ;
 
@@ -549,10 +534,7 @@
 	return(state) ;
 }
 
-static int plc_send_bits(smc,phy,len)
-struct s_smc *smc ;
-struct s_phy *phy;
-int len;
+static int plc_send_bits(struct s_smc *smc, struct s_phy *phy, int len)
 {
 	int np = phy->np ;		/* PHY index */
 	int	n ;
@@ -589,9 +571,7 @@
 /*
  * config plc muxes
  */
-void plc_config_mux(smc,mux)
-struct s_smc *smc ;
-int mux ;
+void plc_config_mux(struct s_smc *smc, int mux)
 {
 	if (smc->s.sas != SMT_DAS)
 		return ;
@@ -615,10 +595,7 @@
 		process event
 	until SM is stable
 */
-void pcm(smc,np,event)
-struct s_smc *smc ;
-const int np;
-int event;
+void pcm(struct s_smc *smc, const int np, int event)
 {
 	int	state ;
 	int	oldstate ;
@@ -697,10 +674,7 @@
 /*
  * PCM state machine
  */
-static void pcm_fsm(smc,phy,cmd)
-struct s_smc *smc ;
-struct s_phy *phy;
-int cmd;
+static void pcm_fsm(struct s_smc *smc, struct s_phy *phy, int cmd)
 {
 	int	i ;
 	int	np = phy->np ;		/* PHY index */
@@ -1063,10 +1037,7 @@
 /*
  * force line state on a PHY output	(only in MAINT state)
  */
-static void sm_ph_linestate(smc,phy,ls)
-struct s_smc *smc ;
-int phy;
-int ls;
+static void sm_ph_linestate(struct s_smc *smc, int phy, int ls)
 {
 	int	cntrl ;
 
@@ -1095,9 +1066,7 @@
 	outpw(PLC(phy,PL_CNTRL_B),cntrl) ;
 }
 
-
-static void reset_lem_struct(phy)
-struct s_phy *phy;
+static void reset_lem_struct(struct s_phy *phy)
 {
 	struct lem_counter *lem = &phy->lem ;
 
@@ -1108,9 +1077,7 @@
 /*
  * link error monitor
  */
-static void lem_evaluate(smc,phy)
-struct s_smc *smc ;
-struct s_phy *phy;
+static void lem_evaluate(struct s_smc *smc, struct s_phy *phy)
 {
 	int ber ;
 	u_long errors ;
@@ -1210,8 +1177,7 @@
 /*
  * called by SMT to calculate LEM bit error rate
  */
-void sm_lem_evaluate(smc)
-struct s_smc *smc ;
+void sm_lem_evaluate(struct s_smc *smc)
 {
 	int np ;
 
@@ -1219,9 +1185,7 @@
 		lem_evaluate(smc,&smc->y[np]) ;
 }
 
-static void lem_check_lct(smc,phy)
-struct s_smc *smc ;
-struct s_phy	*phy ;
+static void lem_check_lct(struct s_smc *smc, struct s_phy *phy)
 {
 	struct lem_counter	*lem = &phy->lem ;
 	struct fddi_mib_p	*mib ;
@@ -1265,10 +1229,7 @@
 /*
  * LEM functions
  */
-static void sm_ph_lem_start(smc,np,threshold)
-struct s_smc *smc ;
-int np;
-int threshold;
+static void sm_ph_lem_start(struct s_smc *smc, int np, int threshold)
 {
 	struct lem_counter *lem = &smc->y[np].lem ;
 
@@ -1286,9 +1247,7 @@
 	SETMASK(PLC(np,PL_INTR_MASK),PL_LE_CTR,PL_LE_CTR) ;
 }
 
-static void sm_ph_lem_stop(smc,np)
-struct s_smc *smc ;
-int np;
+static void sm_ph_lem_stop(struct s_smc *smc, int np)
 {
 	struct lem_counter *lem = &smc->y[np].lem ;
 
@@ -1297,10 +1256,8 @@
 }
 
 /* ARGSUSED */
-void sm_pm_ls_latch(smc,phy,on_off)
-struct s_smc *smc ;
-int phy;
-int on_off;		/* en- or disable ident. ls */
+void sm_pm_ls_latch(struct s_smc *smc, int phy, int on_off)
+/* int on_off;	en- or disable ident. ls */
 {
 	SK_UNUSED(smc) ;
 
@@ -1317,10 +1274,7 @@
 /*
  * PCM pseudo code 5.1 .. 6.1
  */
-static void pc_rcode_actions(smc,bit,phy)
-struct s_smc *smc ;
-int bit;
-struct s_phy *phy;
+static void pc_rcode_actions(struct s_smc *smc, int bit, struct s_phy *phy)
 {
 	struct fddi_mib_p	*mib ;
 
@@ -1456,10 +1410,7 @@
 /*
  * PCM pseudo code 5.1 .. 6.1
  */
-static void pc_tcode_actions(smc,bit,phy)
-struct s_smc *smc ;
-const int bit;
-struct s_phy *phy;
+static void pc_tcode_actions(struct s_smc *smc, const int bit, struct s_phy *phy)
 {
 	int	np = phy->np ;
 	struct fddi_mib_p	*mib ;
@@ -1638,8 +1589,7 @@
 /*
  * return status twisted (called by SMT)
  */
-int pcm_status_twisted(smc)
-struct s_smc *smc ;
+int pcm_status_twisted(struct s_smc *smc)
 {
 	int	twist = 0 ;
 	if (smc->s.sas != SMT_DAS)
@@ -1658,13 +1608,8 @@
  *	remote phy type
  *	remote mac yes/no
  */
-void pcm_status_state(smc,np,type,state,remote,mac)
-struct s_smc *smc ;
-int np;
-int *type;
-int *state;
-int *remote;
-int *mac;
+void pcm_status_state(struct s_smc *smc, int np, int *type, int *state,
+		      int *remote, int *mac)
 {
 	struct s_phy	*phy = &smc->y[np] ;
 	struct fddi_mib_p	*mib ;
@@ -1687,8 +1632,7 @@
 /*
  * return rooted station status (called by SMT)
  */
-int pcm_rooted_station(smc)
-struct s_smc *smc ;
+int pcm_rooted_station(struct s_smc *smc)
 {
 	int	n ;
 
@@ -1703,10 +1647,8 @@
 /*
  * Interrupt actions for PLC & PCM events
  */
-void plc_irq(smc,np,cmd)
-struct s_smc *smc ;
-int np;			/* PHY index */
-unsigned int cmd;
+void plc_irq(struct s_smc *smc, int np, unsigned int cmd)
+/* int np;	PHY index */
 {
 	struct s_phy *phy = &smc->y[np] ;
 	struct s_plc *plc = &phy->plc ;
@@ -1919,9 +1861,7 @@
 #endif
 }
 
-void pcm_set_lct_short(smc,n)
-struct s_smc *smc ;
-int n ;
+void pcm_set_lct_short(struct s_smc *smc, int n)
 {
 	if (n <= 0 || n > 1000)
 		return ;
@@ -1932,9 +1872,7 @@
 /*
  * fill state struct
  */
-void pcm_get_state(smc,state)
-struct s_smc *smc ;
-struct smt_state *state ;
+void pcm_get_state(struct s_smc *smc, struct smt_state *state)
 {
 	struct s_phy	*phy ;
 	struct pcm_state *pcs ;
@@ -1968,9 +1906,7 @@
 	}
 }
 
-int get_pcm_state(smc,np)
-struct s_smc *smc ;
-int np;
+int get_pcm_state(struct s_smc *smc, int np)
 {
 	int pcs ;
 
@@ -1992,9 +1928,7 @@
 	return(pcs) ;
 }
 
-char *get_linestate(smc,np)
-struct s_smc *smc ;
-int np;
+char *get_linestate(struct s_smc *smc, int np)
 {
 	char *ls = "" ;
 
@@ -2016,9 +1950,7 @@
 	return(ls) ;
 }
 
-char *get_pcmstate(smc,np)
-struct s_smc *smc ;
-int np;
+char *get_pcmstate(struct s_smc *smc, int np)
 {
 	char *pcs ;
 	
@@ -2040,8 +1972,7 @@
 	return(pcs) ;
 }
 
-void list_phy(smc)
-struct s_smc *smc ;
+void list_phy(struct s_smc *smc)
 {
 	struct s_plc *plc ;
 	int np ;
@@ -2069,8 +2000,7 @@
 
 
 #ifdef	CONCENTRATOR
-void pcm_lem_dump(smc)
-struct s_smc *smc ;
+void pcm_lem_dump(struct s_smc *smc)
 {
 	int		i ;
 	struct s_phy	*phy ;
--- diff/drivers/net/skfp/pmf.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/pmf.c	2004-07-01 21:32:39.000000000 +0100
@@ -32,12 +32,16 @@
 static const char ID_sccs[] = "@(#)pmf.c	1.37 97/08/04 (C) SK " ;
 #endif
 
-static int smt_authorize() ;
-static int smt_check_set_count() ;
-static const struct s_p_tab *smt_get_ptab() ;
-static int smt_mib_phys() ;
-int smt_set_para() ;
-void smt_add_para() ;
+static int smt_authorize(struct s_smc *smc, struct smt_header *sm);
+static int smt_check_set_count(struct s_smc *smc, struct smt_header *sm);
+static const struct s_p_tab* smt_get_ptab(u_short para);
+static int smt_mib_phys(struct s_smc *smc);
+int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, int local,
+		 int set);
+void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para,
+		  int index, int local);
+static SMbuf *smt_build_pmf_response(struct s_smc *smc, struct smt_header *req,
+				     int set, int local);
 
 #define MOFFSS(e)	((int)&(((struct fddi_mib *)0)->e))
 #define MOFFSA(e)	((int) (((struct fddi_mib *)0)->e))
@@ -280,13 +284,7 @@
 	{ 0 }
 } ;
 
-
-static SMbuf *smt_build_pmf_response() ;
-
-void smt_pmf_received_pack(smc,mb,local)
-struct s_smc *smc ;
-SMbuf *mb ;
-int local ;
+void smt_pmf_received_pack(struct s_smc *smc, SMbuf *mb, int local)
 {
 	struct smt_header	*sm ;
 	SMbuf		*reply ;
@@ -316,13 +314,8 @@
 	}
 }
 
-extern	SMbuf	*smt_get_mbuf() ;
-
-static SMbuf *smt_build_pmf_response(smc,req,set,local)
-struct s_smc *smc ;
-struct smt_header *req ;
-int	set ;
-int	local ;
+static SMbuf *smt_build_pmf_response(struct s_smc *smc, struct smt_header *req,
+				     int set, int local)
 {
 	SMbuf			*mb ;
 	struct smt_header	*smt ;
@@ -509,11 +502,7 @@
 	return(mb) ;
 }
 
-extern void *sm_to_para() ;
-
-static int smt_authorize(smc,sm)
-struct s_smc *smc ;
-struct smt_header *sm ;
+static int smt_authorize(struct s_smc *smc, struct smt_header *sm)
 {
 	struct smt_para	*pa ;
 	int		i ;
@@ -548,9 +537,7 @@
 	return(0) ;
 }
 
-static int smt_check_set_count(smc,sm)
-struct s_smc *smc ;
-struct smt_header *sm ;
+static int smt_check_set_count(struct s_smc *smc, struct smt_header *sm)
 {
 	struct smt_para	*pa ;
 	struct smt_p_setcount	*sc ;
@@ -566,12 +553,8 @@
 	return(0) ;
 }
 
-void smt_add_para(smc,pcon,para,index,local)
-struct s_smc *smc ;
-struct s_pcon *pcon ;
-u_short para ;
-int index ;
-int local ;
+void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para,
+		  int index, int local)
 {
 	struct smt_para	*pa ;
 	const struct s_p_tab	*pt ;
@@ -1095,12 +1078,8 @@
 /*
  * set parameter
  */
-int smt_set_para(smc,pa,index,local,set)
-struct s_smc *smc ;
-struct smt_para	*pa ;
-int index ;
-int local ;
-int set ;
+int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, int local,
+		 int set)
 {
 #define IFSET(x)	if (set) (x)
 
@@ -1549,8 +1528,7 @@
 #endif
 }
 
-static const struct s_p_tab *smt_get_ptab(para)
-u_short para ;
+static const struct s_p_tab *smt_get_ptab(u_short para)
 {
 	const struct s_p_tab	*pt ;
 	for (pt = p_tab ; pt->p_num && pt->p_num != para ; pt++)
@@ -1558,8 +1536,7 @@
 	return(pt->p_num ? pt : 0) ;
 }
 
-static int smt_mib_phys(smc)
-struct s_smc *smc ;
+static int smt_mib_phys(struct s_smc *smc)
 {
 #ifdef	CONCENTRATOR
 	SK_UNUSED(smc) ;
@@ -1572,9 +1549,7 @@
 #endif
 }
 
-int port_to_mib(smc,p)
-struct s_smc *smc ;
-int p ;
+int port_to_mib(struct s_smc *smc, int p)
 {
 #ifdef	CONCENTRATOR
 	SK_UNUSED(smc) ;
@@ -1590,10 +1565,7 @@
 
 #ifdef	DEBUG
 #ifndef	BOOT
-void dump_smt(smc,sm,text)
-struct s_smc *smc ;
-struct smt_header *sm ;
-char *text ;
+void dump_smt(struct s_smc *smc, struct smt_header *sm, char *text)
 {
 	int	len ;
 	struct smt_para	*pa ;
@@ -1680,9 +1652,7 @@
 	printf("-------------------------------------------------\n\n") ;
 }
 
-void dump_hex(p,len)
-char *p ;
-int len ;
+void dump_hex(char *p, int len)
 {
 	int	n = 0 ;
 	while (len--) {
--- diff/drivers/net/skfp/queue.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/queue.c	2004-07-01 21:32:39.000000000 +0100
@@ -31,8 +31,7 @@
 /*
  * init event queue management
  */
-void ev_init(smc)
-struct s_smc *smc ;
+void ev_init(struct s_smc *smc)
 {
 	smc->q.ev_put = smc->q.ev_get = smc->q.ev_queue ;
 }
@@ -40,10 +39,7 @@
 /*
  * add event to queue
  */
-void queue_event(smc,class,event)
-struct s_smc *smc ;
-int class ;
-int event ;
+void queue_event(struct s_smc *smc, int class, int event)
 {
 	PRINTF("queue class %d event %d\n",class,event) ;
 	smc->q.ev_put->class = class ;
@@ -59,9 +55,7 @@
 /*
  * timer_event is called from HW timer package.
  */
-void timer_event(smc,token)
-struct s_smc *smc ;
-u_long token ;
+void timer_event(struct s_smc *smc, u_long token)
 {
 	PRINTF("timer event class %d token %d\n",
 		EV_T_CLASS(token),
@@ -76,8 +70,7 @@
  *		send command to state machine
  *	end
  */
-void ev_dispatcher(smc)
-struct s_smc *smc ;
+void ev_dispatcher(struct s_smc *smc)
 {
 	struct event_queue *ev ;	/* pointer into queue */
 	int		class ;
@@ -131,9 +124,7 @@
  *	on	0	disconnect
  *	on	1	connect
  */
-u_short smt_online(smc,on)
-struct s_smc *smc ;
-int on ;
+u_short smt_online(struct s_smc *smc, int on)
 {
 	queue_event(smc,EVENT_ECM,on ? EC_CONNECT : EC_DISCONNECT) ;
 	ev_dispatcher(smc) ;
@@ -147,10 +138,7 @@
  * dump current flag setting
  */
 #ifdef	CONCENTRATOR
-void do_smt_flag(smc,flag,value)
-struct s_smc *smc ;
-char *flag ;
-int value ;
+void do_smt_flag(struct s_smc *smc, char *flag, int value)
 {
 #ifdef	DEBUG
 	struct smt_debug	*deb;
--- diff/drivers/net/skfp/rmt.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/rmt.c	2004-07-01 21:32:39.000000000 +0100
@@ -102,17 +102,17 @@
 /*
  * function declarations
  */
-static void rmt_fsm() ;
-static void start_rmt_timer0() ;
-static void start_rmt_timer1() ;
-static void start_rmt_timer2() ;
-static void stop_rmt_timer0() ;
-static void stop_rmt_timer1() ;
-static void stop_rmt_timer2() ;
-static void rmt_dup_actions() ;
-static void rmt_reinsert_actions() ;
-static void rmt_leave_actions() ;
-static void rmt_new_dup_actions() ;
+static void rmt_fsm(struct s_smc *smc, int cmd);
+static void start_rmt_timer0(struct s_smc *smc, u_long value, int event);
+static void start_rmt_timer1(struct s_smc *smc, u_long value, int event);
+static void start_rmt_timer2(struct s_smc *smc, u_long value, int event);
+static void stop_rmt_timer0(struct s_smc *smc);
+static void stop_rmt_timer1(struct s_smc *smc);
+static void stop_rmt_timer2(struct s_smc *smc);
+static void rmt_dup_actions(struct s_smc *smc);
+static void rmt_reinsert_actions(struct s_smc *smc);
+static void rmt_leave_actions(struct s_smc *smc);
+static void rmt_new_dup_actions(struct s_smc *smc);
 
 #ifndef SUPERNET_3
 extern void restart_trt_for_dbcn() ;
@@ -122,8 +122,7 @@
 	init RMT state machine
 	clear all RMT vars and flags
 */
-void rmt_init(smc)
-struct s_smc *smc ;
+void rmt_init(struct s_smc *smc)
 {
 	smc->mib.m[MAC0].fddiMACRMTState = ACTIONS(RM0_ISOLATED) ;
 	smc->r.dup_addr_test = DA_NONE ;
@@ -145,9 +144,7 @@
 		process event
 	until SM is stable
 */
-void rmt(smc,event)
-struct s_smc *smc ;
-int event ;
+void rmt(struct s_smc *smc, int event)
 {
 	int	state ;
 
@@ -166,9 +163,7 @@
 /*
 	process RMT event
 */
-static void rmt_fsm(smc,cmd)
-struct s_smc *smc ;
-int cmd ;
+static void rmt_fsm(struct s_smc *smc, int cmd)
 {
 	/*
 	 * RM00-RM70 : from all states
@@ -535,8 +530,7 @@
  * (jd) RMT duplicate address actions
  * leave the ring or reinsert just as configured
  */
-static void rmt_dup_actions(smc)
-struct s_smc *smc ;
+static void rmt_dup_actions(struct s_smc *smc)
 {
 	if (smc->r.jm_flag) {
 	}
@@ -555,8 +549,7 @@
 /*
  * Reconnect to the Ring
  */
-static void rmt_reinsert_actions(smc)
-struct s_smc *smc ;
+static void rmt_reinsert_actions(struct s_smc *smc)
 {
 	queue_event(smc,EVENT_ECM,EC_DISCONNECT) ;
 	queue_event(smc,EVENT_ECM,EC_CONNECT) ;
@@ -565,8 +558,7 @@
 /*
  * duplicate address detected
  */
-static void rmt_new_dup_actions(smc)
-struct s_smc *smc ;
+static void rmt_new_dup_actions(struct s_smc *smc)
 {
 	smc->r.da_flag = TRUE ;
 	smc->r.bn_flag = FALSE ;
@@ -591,8 +583,7 @@
 /*
  * leave the ring
  */
-static void rmt_leave_actions(smc)
-struct s_smc *smc ;
+static void rmt_leave_actions(struct s_smc *smc)
 {
 	queue_event(smc,EVENT_ECM,EC_DISCONNECT) ;
 	/*
@@ -605,10 +596,7 @@
  * SMT timer interface
  *	start RMT timer 0
  */
-static void start_rmt_timer0(smc,value,event)
-struct s_smc *smc ;
-u_long value ;
-int event ;
+static void start_rmt_timer0(struct s_smc *smc, u_long value, int event)
 {
 	smc->r.timer0_exp = FALSE ;		/* clear timer event flag */
 	smt_timer_start(smc,&smc->r.rmt_timer0,value,EV_TOKEN(EVENT_RMT,event));
@@ -618,10 +606,7 @@
  * SMT timer interface
  *	start RMT timer 1
  */
-static void start_rmt_timer1(smc,value,event)
-struct s_smc *smc ;
-u_long value ;
-int event ;
+static void start_rmt_timer1(struct s_smc *smc, u_long value, int event)
 {
 	smc->r.timer1_exp = FALSE ;	/* clear timer event flag */
 	smt_timer_start(smc,&smc->r.rmt_timer1,value,EV_TOKEN(EVENT_RMT,event));
@@ -631,10 +616,7 @@
  * SMT timer interface
  *	start RMT timer 2
  */
-static void start_rmt_timer2(smc,value,event)
-struct s_smc *smc ;
-u_long value ;
-int event ;
+static void start_rmt_timer2(struct s_smc *smc, u_long value, int event)
 {
 	smc->r.timer2_exp = FALSE ;		/* clear timer event flag */
 	smt_timer_start(smc,&smc->r.rmt_timer2,value,EV_TOKEN(EVENT_RMT,event));
@@ -644,8 +626,7 @@
  * SMT timer interface
  *	stop RMT timer 0
  */
-static void stop_rmt_timer0(smc)
-struct s_smc *smc ;
+static void stop_rmt_timer0(struct s_smc *smc)
 {
 	if (smc->r.rmt_timer0.tm_active)
 		smt_timer_stop(smc,&smc->r.rmt_timer0) ;
@@ -655,8 +636,7 @@
  * SMT timer interface
  *	stop RMT timer 1
  */
-static void stop_rmt_timer1(smc)
-struct s_smc *smc ;
+static void stop_rmt_timer1(struct s_smc *smc)
 {
 	if (smc->r.rmt_timer1.tm_active)
 		smt_timer_stop(smc,&smc->r.rmt_timer1) ;
@@ -666,9 +646,9 @@
  * SMT timer interface
  *	stop RMT timer 2
  */
-static void stop_rmt_timer2(smc)
-struct s_smc *smc ;
+static void stop_rmt_timer2(struct s_smc *smc)
 {
 	if (smc->r.rmt_timer2.tm_active)
 		smt_timer_stop(smc,&smc->r.rmt_timer2) ;
 }
+
--- diff/drivers/net/skfp/skfddi.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/skfddi.c	2004-07-01 21:32:39.000000000 +0100
@@ -131,20 +131,10 @@
 		       int frag_count);
 int mac_drv_rx_init(struct s_smc *smc, int len, int fc, char *look_ahead,
 		    int la_len);
-void smt_timer_poll(struct s_smc *smc);
-void ring_status_indication(struct s_smc *smc, u_long status);
-unsigned long smt_get_time(void);
-void smt_stat_counter(struct s_smc *smc, int stat);
-void cfm_state_change(struct s_smc *smc, int c_state);
-void ecm_state_change(struct s_smc *smc, int e_state);
-void pcm_state_change(struct s_smc *smc, int plc, int p_state);
-void rmt_state_change(struct s_smc *smc, int r_state);
-void drv_reset_indication(struct s_smc *smc);
 void dump_data(unsigned char *Data, int length);
 
-
 // External functions from the hardware module
-extern u_int mac_drv_check_space();
+extern u_int mac_drv_check_space(void);
 extern void read_address(struct s_smc *smc, u_char * mac_addr);
 extern void card_stop(struct s_smc *smc);
 extern int mac_drv_init(struct s_smc *smc);
@@ -157,9 +147,7 @@
 extern void hwm_rx_frag(struct s_smc *smc, char far * virt, u_long phys,
 			int len, int frame_status);
 extern void mac_drv_rx_mode(struct s_smc *smc, int mode);
-extern void mac_drv_clear_tx_queue(struct s_smc *smc);
 extern void mac_drv_clear_rx_queue(struct s_smc *smc);
-extern void mac_clear_multicast(struct s_smc *smc);
 extern void enable_tx_irq(struct s_smc *smc, u_short queue);
 extern void mac_drv_clear_txd(struct s_smc *smc);
 
@@ -921,8 +909,7 @@
 				dmi = dev->mc_list;
 
 				for (i = 0; i < dev->mc_count; i++) {
-					mac_add_multicast(smc,
-							  dmi->dmi_addr, 1);
+					mac_add_multicast(smc, dmi->dmi_addr, 1);
 					PRINTK(KERN_INFO "ENABLE MC ADDRESS:");
 					PRINTK(" %02x %02x %02x ",
 					       dmi->dmi_addr[0],
--- diff/drivers/net/skfp/smt.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/smt.c	2004-07-01 21:32:39.000000000 +0100
@@ -62,68 +62,63 @@
 /*
  * external functions
  */
-int pcm_status_twisted() ;
-void pcm_status_state() ;
-int pcm_status_type() ;
+int pcm_status_twisted(struct s_smc *smc);
 
-extern SMbuf *smt_get_mbuf() ;
-
-#define EXPORT_PMF
 /*
  * function prototypes
  */
-u_long smt_get_tid() ;
-EXPORT_PMF SMbuf *smt_build_frame() ;
-EXPORT_PMF void *sm_to_para() ;
 #ifdef	LITTLE_ENDIAN
-static int smt_swap_short() ;
+static int smt_swap_short(u_short s);
 #endif
-static int mac_index() ;
-static int phy_index() ;
-static int mac_con_resource_index() ;
-static int phy_con_resource_index() ;
-EXPORT_PMF void smt_send_frame() ;
-EXPORT_PMF void smt_set_timestamp() ;
-static void smt_send_rdf() ;
-static void smt_send_nif() ;
-static void smt_send_ecf() ;
-static void smt_echo_test() ;
-static void smt_send_sif_config() ;
-static void smt_send_sif_operation() ;
-EXPORT_PMF void smt_swap_para() ;
+static int mac_index(struct s_smc *smc, int mac);
+static int phy_index(struct s_smc *smc, int phy);
+static int mac_con_resource_index(struct s_smc *smc, int mac);
+static int phy_con_resource_index(struct s_smc *smc, int phy);
+static void smt_send_rdf(struct s_smc *smc, SMbuf *rej, int fc, int reason,
+			 int local);
+static void smt_send_nif(struct s_smc *smc, struct fddi_addr *dest, int fc,
+			 u_long tid, int type, int local);
+static void smt_send_ecf(struct s_smc *smc, struct fddi_addr *dest, int fc,
+                         u_long tid, int type, int len);
+static void smt_echo_test(struct s_smc *smc, int dna);
+static void smt_send_sif_config(struct s_smc *smc, struct fddi_addr *dest,
+				u_long tid, int local);
+static void smt_send_sif_operation(struct s_smc *smc, struct fddi_addr *dest,
+				   u_long tid, int local);
 #ifdef LITTLE_ENDIAN
-static void smt_string_swap() ;
+static void smt_string_swap(void);
 #endif
-static void smt_add_frame_len() ;
-static void smt_fill_una() ;
-static void smt_fill_sde() ;
-static void smt_fill_state() ;
-static void smt_fill_timestamp() ;
-static void smt_fill_policy() ;
-static void smt_fill_latency() ;
-static void smt_fill_neighbor() ;
-static int  smt_fill_path() ;
-static void smt_fill_mac_status() ;
-static void smt_fill_lem() ;
-static void smt_fill_version() ;
-static void smt_fill_fsc() ;
-static void smt_fill_mac_counter() ;
-static void smt_fill_mac_fnc() ;
-static void smt_fill_manufacturer() ;
-static void smt_fill_user() ;
-static void smt_fill_setcount() ;
-static void smt_fill_echo() ;
-int smt_check_para() ;
+static void smt_add_frame_len(SMbuf *mb, int len);
+static void smt_fill_una(struct s_smc *smc, struct smt_p_una *una);
+static void smt_fill_sde(struct s_smc *smc, struct smt_p_sde *sde);
+static void smt_fill_state(struct s_smc *smc, struct smt_p_state *state);
+static void smt_fill_timestamp(struct s_smc *smc, struct smt_p_timestamp *ts);
+static void smt_fill_policy(struct s_smc *smc, struct smt_p_policy *policy);
+static void smt_fill_latency(struct s_smc *smc, struct smt_p_latency *latency);
+static void smt_fill_neighbor(struct s_smc *smc, struct smt_p_neighbor *neighbor);
+static int smt_fill_path(struct s_smc *smc, struct smt_p_path *path);
+static void smt_fill_mac_status(struct s_smc *smc, struct smt_p_mac_status *st);
+static void smt_fill_lem(struct s_smc *smc, struct smt_p_lem *lem, int phy);
+static void smt_fill_version(struct s_smc *smc, struct smt_p_version *vers);
+static void smt_fill_fsc(struct s_smc *smc, struct smt_p_fsc *fsc);
+static void smt_fill_mac_counter(struct s_smc *smc, struct smt_p_mac_counter *mc);
+static void smt_fill_mac_fnc(struct s_smc *smc, struct smt_p_mac_fnc *fnc);
+static void smt_fill_manufacturer(struct s_smc *smc, 
+				  struct smp_p_manufacturer *man);
+static void smt_fill_user(struct s_smc *smc, struct smp_p_user *user);
+static void smt_fill_setcount(struct s_smc *smc, struct smt_p_setcount *setcount);
+static void smt_fill_echo(struct s_smc *smc, struct smt_p_echo *echo, u_long seed,
+			  int len);
 
-void smt_clear_una_dna() ;
-static void smt_clear_old_una_dna() ;
+void smt_clear_una_dna(struct s_smc *smc);
+static void smt_clear_old_una_dna(struct s_smc *smc);
 #ifdef	CONCENTRATOR
-static int entity_to_index() ;
+static int entity_to_index(void);
 #endif
-static void update_dac() ;
-static int div_ratio() ;
+static void update_dac(struct s_smc *smc, int report);
+static int div_ratio(u_long upper, u_long lower);
 #ifdef  USE_CAN_ADDR
-void	hwm_conv_can() ;
+void	hwm_conv_can(struct s_smc *smc, char *data, int len);
 #else
 #define		hwm_conv_can(smc,data,len)
 #endif
@@ -136,8 +131,7 @@
 /*
  * init SMT agent
  */
-void smt_agent_init(smc)
-struct s_smc *smc ;
+void smt_agent_init(struct s_smc *smc)
 {
 	int		i ;
 
@@ -183,17 +177,16 @@
  *	check tvu & tvd
  * end
  */
-void smt_agent_task(smc)
-struct s_smc *smc ;
+void smt_agent_task(struct s_smc *smc)
 {
 	smt_timer_start(smc,&smc->sm.smt_timer, (u_long)1000000L,
 		EV_TOKEN(EVENT_SMT,SM_TIMER)) ;
 	DB_SMT("SMT agent task\n",0,0) ;
 }
 
-void smt_please_reconnect(smc,reconn_time)
-struct s_smc	*smc ;		/* Pointer to SMT context */
-int		reconn_time ;	/* Wait for reconnect time in seconds */
+void smt_please_reconnect(struct s_smc *smc, int reconn_time)
+/* struct s_smc	*smc;  Pointer to SMT context */
+/* int reconn_time;    Wait for reconnect time in seconds */
 {
 	/*
 	 * The please reconnect variable is used as a timer.
@@ -210,9 +203,7 @@
 }
 
 #ifndef SMT_REAL_TOKEN_CT
-void smt_emulate_token_ct(smc, mac_index)
-struct s_smc	*smc;
-int		mac_index;
+void smt_emulate_token_ct(struct s_smc *smc, int mac_index)
 {
 	u_long	count;
 	u_long	time;
@@ -239,9 +230,7 @@
 #endif
 
 /*ARGSUSED1*/
-void smt_event(smc,event)
-struct s_smc *smc ;
-int event ;
+void smt_event(struct s_smc *smc, int event)
 {
 	u_long		time ;
 #ifndef SMT_REAL_TOKEN_CT
@@ -457,9 +446,7 @@
 		EV_TOKEN(EVENT_SMT,SM_TIMER)) ;
 }
 
-static int div_ratio(upper,lower)
-u_long upper ;
-u_long lower ;
+static int div_ratio(u_long upper, u_long lower)
 {
 	if ((upper<<16L) < upper)
 		upper = 0xffff0000L ;
@@ -475,10 +462,8 @@
 /*
  * receive packet handler
  */
-void smt_received_pack(smc,mb,fs)
-struct s_smc *smc ;
-SMbuf *mb ;
-int fs ;			/* frame status */
+void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
+/* int fs;  frame status */
 {
 	struct smt_header	*sm ;
 	int			local ;
@@ -823,9 +808,7 @@
 	smt_free_mbuf(smc,mb) ;
 }
 
-static void update_dac(smc,report)
-struct s_smc *smc ;
-int report ;
+static void update_dac(struct s_smc *smc, int report)
 {
 	int	cond ;
 
@@ -843,11 +826,9 @@
  *	set station ID
  *	send frame
  */
-EXPORT_PMF void smt_send_frame(smc,mb,fc,local)
-struct s_smc *smc ;
-SMbuf *mb ;			/* buffer to send */
-int fc ;			/* FC value */
-int local ;
+void smt_send_frame(struct s_smc *smc, SMbuf *mb, int fc, int local)
+/* SMbuf *mb;	buffer to send */
+/* int fc;	FC value */
 {
 	struct smt_header	*sm ;
 
@@ -868,12 +849,11 @@
 /*
  * generate and send RDF
  */
-static void smt_send_rdf(smc,rej,fc,reason,local)
-struct s_smc *smc ;
-SMbuf	*rej ;			/* mbuf of offending frame */
-int	fc ;			/* FC of denied frame */
-int reason ;			/* reason code */
-int local ;
+static void smt_send_rdf(struct s_smc *smc, SMbuf *rej, int fc, int reason,
+			 int local)
+/* SMbuf *rej;	mbuf of offending frame */
+/* int fc;	FC of denied frame */
+/* int reason;	reason code */
 {
 	SMbuf	*mb ;
 	struct smt_header	*sm ;	/* header of offending frame */
@@ -946,13 +926,12 @@
 /*
  * generate and send NIF
  */
-static void smt_send_nif(smc,dest,fc,tid,type,local)
-struct s_smc *smc ;
-struct fddi_addr *dest ;		/* dest address */
-int fc ;				/* frame control */
-u_long tid ;				/* transaction id */
-int type ;				/* frame type */
-int local ;
+static void smt_send_nif(struct s_smc *smc, struct fddi_addr *dest, int fc,
+			 u_long tid, int type, int local)
+/* struct fddi_addr *dest;	dest address */
+/* int fc;			frame control */
+/* u_long tid;			transaction id */
+/* int type;			frame type */
 {
 	struct smt_nif	*nif ;
 	SMbuf		*mb ;
@@ -976,9 +955,7 @@
 /*
  * send NIF request (test purpose)
  */
-static void smt_send_nif_request(smc,dest)
-struct s_smc *smc ;
-struct fddi_addr *dest ;
+static void smt_send_nif_request(struct s_smc *smc, struct fddi_addr *dest)
 {
 	smc->sm.pend[SMT_TID_NIF_TEST] = smt_get_tid(smc) ;
 	smt_send_nif(smc,dest, FC_SMT_INFO, smc->sm.pend[SMT_TID_NIF_TEST],
@@ -988,10 +965,8 @@
 /*
  * send ECF request (test purpose)
  */
-static void smt_send_ecf_request(smc,dest,len)
-struct s_smc *smc ;
-struct fddi_addr *dest ;
-int len ;
+static void smt_send_ecf_request(struct s_smc *smc, struct fddi_addr *dest,
+				 int len)
 {
 	smc->sm.pend[SMT_TID_ECF] = smt_get_tid(smc) ;
 	smt_send_ecf(smc,dest, FC_SMT_INFO, smc->sm.pend[SMT_TID_ECF],
@@ -1002,9 +977,7 @@
 /*
  * echo test
  */
-static void smt_echo_test(smc,dna)
-struct s_smc *smc ;
-int dna ;
+static void smt_echo_test(struct s_smc *smc, int dna)
 {
 	u_long	tid ;
 
@@ -1019,13 +992,13 @@
 /*
  * generate and send ECF
  */
-static void smt_send_ecf(smc,dest,fc,tid,type,len)
-struct s_smc *smc ;
-struct fddi_addr *dest ;		/* dest address */
-int fc ;				/* frame control */
-u_long tid ;				/* transaction id */
-int type ;				/* frame type */
-int len ;				/* frame length */
+static void smt_send_ecf(struct s_smc *smc, struct fddi_addr *dest, int fc,
+			 u_long tid, int type, int len)
+/* struct fddi_addr *dest;	dest address */
+/* int fc;			frame control */
+/* u_long tid;			transaction id */
+/* int type;			frame type */
+/* int len;			frame length */
 {
 	struct smt_ecf	*ecf ;
 	SMbuf		*mb ;
@@ -1045,11 +1018,10 @@
  * generate and send SIF config response
  */
 
-static void smt_send_sif_config(smc,dest,tid,local)
-struct s_smc *smc ;
-struct fddi_addr *dest ;		/* dest address */
-u_long tid ;				/* transaction id */
-int local ;
+static void smt_send_sif_config(struct s_smc *smc, struct fddi_addr *dest,
+				u_long tid, int local)
+/* struct fddi_addr *dest;	dest address */
+/* u_long tid;			transaction id */
 {
 	struct smt_sif_config	*sif ;
 	SMbuf			*mb ;
@@ -1079,11 +1051,10 @@
  * generate and send SIF operation response
  */
 
-static void smt_send_sif_operation(smc,dest,tid,local)
-struct s_smc *smc ;
-struct fddi_addr *dest ;		/* dest address */
-u_long tid ;				/* transaction id */
-int local ;
+static void smt_send_sif_operation(struct s_smc *smc, struct fddi_addr *dest,
+				   u_long tid, int local)
+/* struct fddi_addr *dest;	dest address */
+/* u_long tid;			transaction id */
 {
 	struct smt_sif_operation *sif ;
 	SMbuf			*mb ;
@@ -1128,11 +1099,8 @@
 /*
  * get and initialize SMT frame
  */
-EXPORT_PMF SMbuf *smt_build_frame(smc,class,type,length)
-struct s_smc *smc ;
-int class ;
-int type ;
-int length ;
+SMbuf *smt_build_frame(struct s_smc *smc, int class, int type,
+				  int length)
 {
 	SMbuf			*mb ;
 	struct smt_header	*smt ;
@@ -1167,9 +1135,7 @@
 	return(mb) ;
 }
 
-static void smt_add_frame_len(mb,len)
-SMbuf *mb ;
-int len ;
+static void smt_add_frame_len(SMbuf *mb, int len)
 {
 	struct smt_header	*smt ;
 
@@ -1183,9 +1149,7 @@
 /*
  * fill values in UNA parameter
  */
-static void smt_fill_una(smc,una)
-struct s_smc *smc ;
-struct smt_p_una *una ;
+static void smt_fill_una(struct s_smc *smc, struct smt_p_una *una)
 {
 	SMTSETPARA(una,SMT_P_UNA) ;
 	una->una_pad = 0 ;
@@ -1195,9 +1159,7 @@
 /*
  * fill values in SDE parameter
  */
-static void smt_fill_sde(smc,sde)
-struct s_smc *smc ;
-struct smt_p_sde *sde ;
+static void smt_fill_sde(struct s_smc *smc, struct smt_p_sde *sde)
 {
 	SMTSETPARA(sde,SMT_P_SDE) ;
 	sde->sde_non_master = smc->mib.fddiSMTNonMaster_Ct ;
@@ -1213,9 +1175,7 @@
 /*
  * fill in values in station state parameter
  */
-static void smt_fill_state(smc,state)
-struct s_smc *smc ;
-struct smt_p_state *state ;
+static void smt_fill_state(struct s_smc *smc, struct smt_p_state *state)
 {
 	int	top ;
 	int	twist ;
@@ -1255,18 +1215,14 @@
 /*
  * fill values in timestamp parameter
  */
-static void smt_fill_timestamp(smc,ts)
-struct s_smc *smc ;
-struct smt_p_timestamp *ts ;
+static void smt_fill_timestamp(struct s_smc *smc, struct smt_p_timestamp *ts)
 {
 
 	SMTSETPARA(ts,SMT_P_TIMESTAMP) ;
 	smt_set_timestamp(smc,ts->ts_time) ;
 }
 
-EXPORT_PMF void smt_set_timestamp(smc,p)
-struct s_smc *smc ;
-u_char *p ;
+void smt_set_timestamp(struct s_smc *smc, u_char *p)
 {
 	u_long	time ;
 	u_long	utime ;
@@ -1300,9 +1256,7 @@
 /*
  * fill values in station policy parameter
  */
-static void smt_fill_policy(smc,policy)
-struct s_smc *smc ;
-struct smt_p_policy *policy ;
+static void smt_fill_policy(struct s_smc *smc, struct smt_p_policy *policy)
 {
 	int	i ;
 	u_char	*map ;
@@ -1333,9 +1287,7 @@
 /*
  * fill values in latency equivalent parameter
  */
-static void smt_fill_latency(smc,latency)
-struct s_smc *smc ;
-struct smt_p_latency *latency ;
+static void smt_fill_latency(struct s_smc *smc, struct smt_p_latency *latency)
 {
 	SMTSETPARA(latency,SMT_P_LATENCY) ;
 
@@ -1358,9 +1310,7 @@
 /*
  * fill values in MAC neighbors parameter
  */
-static void smt_fill_neighbor(smc,neighbor)
-struct s_smc *smc ;
-struct smt_p_neighbor *neighbor ;
+static void smt_fill_neighbor(struct s_smc *smc, struct smt_p_neighbor *neighbor)
 {
 	SMTSETPARA(neighbor,SMT_P_NEIGHBORS) ;
 
@@ -1379,9 +1329,7 @@
 #define ALLPHYS	((smc->s.sas == SMT_SAS) ? 1 : 2)
 #endif
 
-static int smt_fill_path(smc,path)
-struct s_smc *smc ;
-struct smt_p_path *path ;
+static int smt_fill_path(struct s_smc *smc, struct smt_p_path *path)
 {
 	SK_LOC_DECL(int,type) ;
 	SK_LOC_DECL(int,state) ;
@@ -1429,9 +1377,7 @@
 /*
  * fill values in mac status
  */
-static void smt_fill_mac_status(smc,st)
-struct s_smc *smc ;
-struct smt_p_mac_status *st ;
+static void smt_fill_mac_status(struct s_smc *smc, struct smt_p_mac_status *st)
 {
 	SMTSETPARA(st,SMT_P_MAC_STATUS) ;
 
@@ -1458,11 +1404,7 @@
 /*
  * fill values in LEM status
  */
-
-static void smt_fill_lem(smc,lem,phy)
-struct s_smc *smc ;
-struct smt_p_lem *lem ;
-int phy ;
+static void smt_fill_lem(struct s_smc *smc, struct smt_p_lem *lem, int phy)
 {
 	struct fddi_mib_p	*mib ;
 
@@ -1484,9 +1426,7 @@
 /*
  * fill version parameter
  */
-static void smt_fill_version(smc,vers)
-struct s_smc *smc ;
-struct smt_p_version *vers ;
+static void smt_fill_version(struct s_smc *smc, struct smt_p_version *vers)
 {
 	SK_UNUSED(smc) ;
 	SMTSETPARA(vers,SMT_P_VERSION) ;
@@ -1505,9 +1445,7 @@
  * note: this para 200B is NOT in swap table, because it's also set in
  * PMF add_para
  */
-static void smt_fill_fsc(smc,fsc)
-struct s_smc *smc ;
-struct smt_p_fsc *fsc ;
+static void smt_fill_fsc(struct s_smc *smc, struct smt_p_fsc *fsc)
 {
 	SK_UNUSED(smc) ;
 	SMTSETPARA(fsc,SMT_P_FSC) ;
@@ -1527,9 +1465,7 @@
 /*
  * fill mac counter field
  */
-static void smt_fill_mac_counter(smc,mc)
-struct s_smc *smc ;
-struct smt_p_mac_counter *mc ;
+static void smt_fill_mac_counter(struct s_smc *smc, struct smt_p_mac_counter *mc)
 {
 	SMTSETPARA(mc,SMT_P_MAC_COUNTER) ;
 	mc->mc_mib_index = INDEX_MAC ;
@@ -1541,9 +1477,7 @@
 /*
  * fill mac frame not copied counter
  */
-static void smt_fill_mac_fnc(smc,fnc)
-struct s_smc *smc ;
-struct smt_p_mac_fnc *fnc ;
+static void smt_fill_mac_fnc(struct s_smc *smc, struct smt_p_mac_fnc *fnc)
 {
 	SMTSETPARA(fnc,SMT_P_MAC_FNC) ;
 	fnc->nc_mib_index = INDEX_MAC ;
@@ -1555,9 +1489,8 @@
 /*
  * fill manufacturer field
  */
-static void smt_fill_manufacturer(smc,man)
-struct s_smc *smc ;
-struct smp_p_manufacturer *man ;
+static void smt_fill_manufacturer(struct s_smc *smc, 
+				  struct smp_p_manufacturer *man)
 {
 	SMTSETPARA(man,SMT_P_MANUFACTURER) ;
 	memcpy((char *) man->mf_data,
@@ -1568,9 +1501,7 @@
 /*
  * fill user field
  */
-static void smt_fill_user(smc,user)
-struct s_smc *smc ;
-struct smp_p_user *user ;
+static void smt_fill_user(struct s_smc *smc, struct smp_p_user *user)
 {
 	SMTSETPARA(user,SMT_P_USER) ;
 	memcpy((char *) user->us_data,
@@ -1578,14 +1509,10 @@
 		sizeof(user->us_data)) ;
 }
 
-
-
 /*
  * fill set count
  */
-static void smt_fill_setcount(smc,setcount)
-struct s_smc *smc ;
-struct smt_p_setcount *setcount ;
+static void smt_fill_setcount(struct s_smc *smc, struct smt_p_setcount *setcount)
 {
 	SK_UNUSED(smc) ;
 	SMTSETPARA(setcount,SMT_P_SETCOUNT) ;
@@ -1597,13 +1524,9 @@
 /*
  * fill echo data
  */
-static void smt_fill_echo(smc,echo,seed,len)
-struct s_smc *smc ;
-struct smt_p_echo *echo ;
-u_long seed ;
-int len ;
+static void smt_fill_echo(struct s_smc *smc, struct smt_p_echo *echo, u_long seed,
+			  int len)
 {
-
 	u_char	*p ;
 
 	SK_UNUSED(smc) ;
@@ -1619,22 +1542,19 @@
  * clear DNA and UNA
  * called from CFM if configuration changes
  */
-void smt_clear_una_dna(smc)
-struct s_smc *smc ;
+void smt_clear_una_dna(struct s_smc *smc)
 {
 	smc->mib.m[MAC0].fddiMACUpstreamNbr = SMT_Unknown ;
 	smc->mib.m[MAC0].fddiMACDownstreamNbr = SMT_Unknown ;
 }
 
-static void smt_clear_old_una_dna(smc)
-struct s_smc *smc ;
+static void smt_clear_old_una_dna(struct s_smc *smc)
 {
 	smc->mib.m[MAC0].fddiMACOldUpstreamNbr = SMT_Unknown ;
 	smc->mib.m[MAC0].fddiMACOldDownstreamNbr = SMT_Unknown ;
 }
 
-u_long smt_get_tid(smc)
-struct s_smc *smc ;
+u_long smt_get_tid(struct s_smc *smc)
 {
 	u_long	tid ;
 	while ((tid = ++(smc->sm.smt_tid) ^ SMT_TID_MAGIC) == 0)
@@ -1723,10 +1643,8 @@
 
 #define N_SMT_PLEN	(sizeof(smt_pdef)/sizeof(smt_pdef[0]))
 
-int smt_check_para(smc,sm,list)
-struct s_smc *smc ;
-struct smt_header	*sm ;
-const u_short		list[] ;
+int smt_check_para(struct s_smc *smc, struct smt_header	*sm,
+		   const u_short list[])
 {
 	const u_short		*p = list ;
 	while (*p) {
@@ -1739,10 +1657,7 @@
 	return(0) ;
 }
 
-EXPORT_PMF void *sm_to_para(smc,sm,para)
-struct s_smc *smc ;
-struct smt_header	*sm ;
-int para ;
+void *sm_to_para(struct s_smc *smc, struct smt_header *sm, int para)
 {
 	char	*p ;
 	int	len ;
@@ -1773,9 +1688,7 @@
 	return(0) ;
 }
 
-int is_my_addr(smc,addr)
-struct s_smc *smc ;
-struct fddi_addr *addr ;
+int is_my_addr(struct s_smc *smc, struct fddi_addr *addr)
 {
 	return(*(short *)(&addr->a[0]) ==
 		*(short *)(&smc->mib.m[MAC0].fddiMACSMTAddress.a[0])
@@ -1785,31 +1698,26 @@
 		*(short *)(&smc->mib.m[MAC0].fddiMACSMTAddress.a[4])) ;
 }
 
-int is_zero(addr)
-struct fddi_addr *addr ;
+int is_zero(struct fddi_addr *addr)
 {
 	return(*(short *)(&addr->a[0]) == 0 &&
 	       *(short *)(&addr->a[2]) == 0 &&
 	       *(short *)(&addr->a[4]) == 0 ) ;
 }
 
-int is_broadcast(addr)
-struct fddi_addr *addr ;
+int is_broadcast(struct fddi_addr *addr)
 {
 	return(*(u_short *)(&addr->a[0]) == 0xffff &&
 	       *(u_short *)(&addr->a[2]) == 0xffff &&
 	       *(u_short *)(&addr->a[4]) == 0xffff ) ;
 }
 
-int is_individual(addr)
-struct fddi_addr *addr ;
+int is_individual(struct fddi_addr *addr)
 {
 	return(!(addr->a[0] & GROUP_ADDR)) ;
 }
 
-int is_equal(addr1,addr2)
-struct fddi_addr *addr1 ;
-struct fddi_addr *addr2 ;
+int is_equal(struct fddi_addr *addr1, struct fddi_addr *addr2)
 {
 	return(*(u_short *)(&addr1->a[0]) == *(u_short *)(&addr2->a[0]) &&
 	       *(u_short *)(&addr1->a[2]) == *(u_short *)(&addr2->a[2]) &&
@@ -1821,9 +1729,7 @@
 /*
  * send ANTC data test frame
  */
-void fddi_send_antc(smc,dest)
-struct s_smc *smc ;
-struct fddi_addr *dest ;
+void fddi_send_antc(struct s_smc *smc, struct fddi_addr *dest)
 {
 	SK_UNUSED(smc) ;
 	SK_UNUSED(dest) ;
@@ -1850,8 +1756,7 @@
 #ifdef	DEBUG
 #define hextoasc(x)	"0123456789abcdef"[x]
 
-char *addr_to_string(addr)
-struct fddi_addr *addr ;
+char *addr_to_string(struct fddi_addr *addr)
 {
 	int	i ;
 	static char	string[6*3] = "****" ;
@@ -1867,9 +1772,7 @@
 #endif
 
 #ifdef	AM29K
-smt_ifconfig(argc,argv)
-int argc ;
-char *argv[] ;
+smt_ifconfig(int argc, char *argv[])
 {
 	if (argc >= 2 && !strcmp(argv[0],"opt_bypass") &&
 	    !strcmp(argv[1],"yes")) {
@@ -1883,9 +1786,7 @@
 /*
  * return static mac index
  */
-static int mac_index(smc,mac)
-struct s_smc *smc ;
-int mac ;
+static int mac_index(struct s_smc *smc, int mac)
 {
 	SK_UNUSED(mac) ;
 #ifdef	CONCENTRATOR
@@ -1899,9 +1800,7 @@
 /*
  * return static phy index
  */
-static int phy_index(smc,phy)
-struct s_smc *smc ;
-int phy ;
+static int phy_index(struct s_smc *smc, int phy)
 {
 	SK_UNUSED(smc) ;
 	return(phy+1);
@@ -1910,9 +1809,7 @@
 /*
  * return dynamic mac connection resource index
  */
-static int mac_con_resource_index(smc,mac)
-struct s_smc *smc ;
-int mac ;
+static int mac_con_resource_index(struct s_smc *smc, int mac)
 {
 #ifdef	CONCENTRATOR
 	SK_UNUSED(smc) ;
@@ -1936,9 +1833,7 @@
 /*
  * return dynamic phy connection resource index
  */
-static int phy_con_resource_index(smc,phy)
-struct s_smc *smc ;
-int phy ;
+static int phy_con_resource_index(struct s_smc *smc, int phy)
 {
 #ifdef	CONCENTRATOR
 	return(entity_to_index(smc,cem_get_downstream(smc,ENTITY_PHY(phy)))) ;
@@ -1960,9 +1855,7 @@
 }
 
 #ifdef	CONCENTRATOR
-static int entity_to_index(smc,e)
-struct s_smc *smc ;
-int e ;
+static int entity_to_index(struct s_smc *smc, int e)
 {
 	if (e == ENTITY_MAC)
 		return(mac_index(smc,1)) ;
@@ -1972,16 +1865,13 @@
 #endif
 
 #ifdef	LITTLE_ENDIAN
-static int smt_swap_short(s)
-u_short s ;
+static int smt_swap_short(u_short s)
 {
 	return(((s>>8)&0xff)|((s&0xff)<<8)) ;
 }
 
-void smt_swap_para(sm,len,direction)
-struct smt_header *sm ;
-int len ;
-int direction ;			/* 0 encode 1 decode */
+void smt_swap_para(struct smt_header *sm, int len, int direction)
+/* int direction;	0 encode 1 decode */
 {
 	struct smt_para	*pa ;
 	const  struct smt_pdef	*pd ;
@@ -2027,10 +1917,7 @@
 	}
 }
 
-static void smt_string_swap(data,format,len)
-char *data ;
-const char *format ;
-int len ;
+static void smt_string_swap(char *data, const char *format, int len)
 {
 	const char	*open_paren = 0 ;
 	int	x ;
@@ -2081,10 +1968,8 @@
 	}
 }
 #else
-void smt_swap_para(sm,len,direction)
-struct smt_header *sm ;
-int len ;
-int direction ;			/* 0 encode 1 decode */
+void smt_swap_para(struct smt_header *sm, int len, int direction)
+/* int direction;	0 encode 1 decode */
 {
 	SK_UNUSED(sm) ;
 	SK_UNUSED(len) ;
@@ -2095,11 +1980,7 @@
 /*
  * PMF actions
  */
-int smt_action(smc,class,code,index)
-struct s_smc *smc ;
-int class ;
-int code ;
-int index ;
+int smt_action(struct s_smc *smc, int class, int code, int index)
 {
 	int	event ;
 	int	port ;
@@ -2190,9 +2071,7 @@
  *		set reconnect
  *	end
  */
-void smt_change_t_neg(smc,tneg)
-struct s_smc *smc ;
-u_long tneg ;
+void smt_change_t_neg(struct s_smc *smc, u_long tneg)
 {
 	smc->mib.a[PATH0].fddiPATHMaxT_Req = tneg ;
 
@@ -2207,10 +2086,7 @@
  * canonical conversion of <len> bytes beginning form *data
  */
 #ifdef  USE_CAN_ADDR
-void hwm_conv_can(smc,data,len)
-struct s_smc *smc ;
-char *data ;
-int len ;
+void hwm_conv_can(struct s_smc *smc, char *data, int len)
 {
 	int i ;
 
@@ -2223,3 +2099,4 @@
 #endif
 
 #endif	/* no SLIM_SMT */
+
--- diff/drivers/net/skfp/smtdef.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/smtdef.c	2004-07-01 21:32:39.000000000 +0100
@@ -72,13 +72,11 @@
 #define DEFAULT_LCT_EXTEND	50
 
 /* Forward declarations */
-extern  void	smt_reset_defaults ();
-static	void	smt_init_mib ();
+void smt_reset_defaults(struct s_smc *smc, int level);
+static void smt_init_mib(struct s_smc *smc, int level);
+static int set_min_max(int maxflag, u_long mib, u_long limit, u_long *oper);
 
-static int set_min_max() ;
-
-void smt_set_defaults(smc)
-struct s_smc *smc ;
+void smt_set_defaults(struct s_smc *smc)
 {
 	smt_reset_defaults(smc,0) ;
 }
@@ -86,9 +84,7 @@
 #define MS2BCLK(x)	((x)*12500L)
 #define US2BCLK(x)	((x)*1250L)
 
-void smt_reset_defaults(smc,level)
-struct s_smc *smc ;
-int level ;
+void smt_reset_defaults(struct s_smc *smc, int level)
 {
 	struct smt_config	*smt ;
 	int			i ;
@@ -170,9 +166,7 @@
 /*	 01234567890123456789012345678901	*/
 	"xxxSK-NET FDDI SMT 7.3 - V2.8.8" ;
 
-static void smt_init_mib(smc,level)
-struct s_smc *smc ;
-int level ;
+static void smt_init_mib(struct s_smc *smc, int level)
 {
 	struct fddi_mib		*mib ;
 	struct fddi_mib_p	*pm ;
@@ -292,8 +286,7 @@
 	(void) smt_set_mac_opvalues(smc) ;
 }
 
-int smt_set_mac_opvalues(smc)
-struct s_smc *smc ;
+int smt_set_mac_opvalues(struct s_smc *smc)
 {
 	int	st ;
 	int	st2 ;
@@ -318,8 +311,7 @@
 	return(st) ;
 }
 
-void smt_fixup_mib(smc)
-struct s_smc *smc ;
+void smt_fixup_mib(struct s_smc *smc)
 {
 #ifdef	CONCENTRATOR
 	switch (smc->s.sas) {
@@ -355,11 +347,7 @@
  *	use mib
  * NOTE : numbers are negative, negate comparison !
  */
-static int set_min_max(maxflag,mib,limit,oper)
-int maxflag ;
-u_long mib ;
-u_long limit ;
-u_long *oper ;
+static int set_min_max(int maxflag, u_long mib, u_long limit, u_long *oper)
 {
 	u_long	old ;
 	old = *oper ;
@@ -369,3 +357,4 @@
 		*oper = mib ;
 	return(old != *oper) ;
 }
+
--- diff/drivers/net/skfp/smtinit.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/smtinit.c	2004-07-01 21:32:39.000000000 +0100
@@ -27,7 +27,7 @@
 static const char ID_sccs[] = "@(#)smtinit.c	1.15 97/05/06 (C) SK " ;
 #endif
 
-extern void init_fddi_driver() ;
+void init_fddi_driver(struct s_smc *smc, u_char *mac_addr);
 
 /* define global debug variable */
 #if defined(DEBUG) && !defined(DEBUG_BRD)
@@ -48,8 +48,7 @@
  * Can not be called in smt_reset_defaults, because it is not sure that
  * the OEM ID is already defined.
  */
-static void set_oem_spec_val(smc)
-struct s_smc *smc ;
+static void set_oem_spec_val(struct s_smc *smc)
 {
 	struct fddi_mib *mib ;
 
@@ -66,9 +65,8 @@
 /*
  * Init SMT
  */
-int init_smt(smc,mac_addr)
-struct s_smc *smc ;
-u_char *mac_addr ;		/* canonical address or NULL */
+int init_smt(struct s_smc *smc, u_char *mac_addr)
+/* u_char *mac_addr;	canonical address or NULL */
 {
 	int	p ;
 
@@ -124,3 +122,4 @@
 
 	return(0) ;
 }
+
--- diff/drivers/net/skfp/smtparse.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/smtparse.c	2004-07-01 21:32:39.000000000 +0100
@@ -82,8 +82,9 @@
 /*
  * local function declarations
  */
-static u_long parse_num() ;
-static int parse_word() ;
+static u_long parse_num(int type, char _far *value, char *v, u_long mn,
+			u_long mx, int scale);
+static int parse_word(char *buf, char _far *text);
 
 #ifdef SIM
 #define DB_MAIN(a,b,c)	printf(a,b,c)
@@ -117,11 +118,8 @@
  *
  * END_MANUAL_ENTRY()
  */
-int smt_parse_arg(smc,keyword,type,value)
-struct s_smc *smc ;
-char _far *keyword ;
-int type ;
-char _far *value ;
+int smt_parse_arg(struct s_smc *smc, char _far *keyword, int type,
+		  char _far *value)
 {
 	char		keybuf[MAX_VAL+1];
 	char		valbuf[MAX_VAL+1];
@@ -287,9 +285,7 @@
 	return(0) ;
 }
 
-static int parse_word(buf,text)
-char *buf ;
-char _far *text ;
+static int parse_word(char *buf, char _far *text)
 {
 	char		c ;
 	char 		*p ;
@@ -364,13 +360,8 @@
 	return(0) ;
 }
 
-static u_long parse_num(type,value,v,mn,mx,scale)
-int type ;
-char _far *value ;
-char *v ;
-u_long mn ;
-u_long mx ;
-int scale ;
+static u_long parse_num(int type, char _far *value, char *v, u_long mn,
+			u_long mx, int scale)
 {
 	u_long	x = 0 ;
 	char	c ;
@@ -473,3 +464,4 @@
 	exit(0) ;
 }
 #endif
+
--- diff/drivers/net/skfp/smttimer.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/smttimer.c	2004-07-01 21:32:39.000000000 +0100
@@ -26,18 +26,9 @@
 static const char ID_sccs[] = "@(#)smttimer.c	2.4 97/08/04 (C) SK " ;
 #endif
 
-/*
- * external function declarations
- */
-extern u_long hwt_read() ;
-extern void hwt_stop() ;
-extern void hwt_start() ;
+static void timer_done(struct s_smc *smc, int restart);
 
-static void timer_done() ;
-
-
-void smt_timer_init(smc)
-struct s_smc *smc ;
+void smt_timer_init(struct s_smc *smc)
 {
 	smc->t.st_queue = 0 ;
 	smc->t.st_fast.tm_active = FALSE ;
@@ -45,9 +36,7 @@
 	hwt_init(smc) ;
 }
 
-void smt_timer_stop(smc,timer)
-struct s_smc *smc ;
-struct smt_timer *timer ;
+void smt_timer_stop(struct s_smc *smc, struct smt_timer *timer)
 {
 	struct smt_timer	**prev ;
 	struct smt_timer	*tm ;
@@ -70,11 +59,8 @@
 	}
 }
 
-void smt_timer_start(smc,timer,time,token)
-struct s_smc *smc ;
-struct smt_timer *timer ;
-u_long		time ;
-u_long		token ;
+void smt_timer_start(struct s_smc *smc, struct smt_timer *timer, u_long time,
+		     u_long token)
 {
 	struct smt_timer	**prev ;
 	struct smt_timer	*tm ;
@@ -121,21 +107,17 @@
 	hwt_start(smc,smc->t.st_queue->tm_delta) ;
 }
 
-void smt_force_irq(smc)
-struct s_smc *smc ;
+void smt_force_irq(struct s_smc *smc)
 {
 	smt_timer_start(smc,&smc->t.st_fast,32L, EV_TOKEN(EVENT_SMT,SM_FAST)); 
 }
 
-void smt_timer_done(smc)
-struct s_smc *smc ;
+void smt_timer_done(struct s_smc *smc)
 {
 	timer_done(smc,1) ;
 }
 
-static void timer_done(smc,restart)
-struct s_smc *smc ;
-int restart ;
+static void timer_done(struct s_smc *smc, int restart)
 {
 	u_long			delta ;
 	struct smt_timer	*tm ;
@@ -171,3 +153,4 @@
 	if (restart && smc->t.st_queue)
 		hwt_start(smc,smc->t.st_queue->tm_delta) ;
 }
+
--- diff/drivers/net/skfp/srf.c	2004-05-19 22:11:58.000000000 +0100
+++ source/drivers/net/skfp/srf.c	2004-07-01 21:32:39.000000000 +0100
@@ -38,10 +38,10 @@
 /*
  * function declarations
  */
-static void clear_all_rep() ;
-static void clear_reported() ;
-static void smt_send_srf() ;
-static struct s_srf_evc *smt_get_evc() ;
+static void clear_all_rep(struct s_smc *smc);
+static void clear_reported(struct s_smc *smc);
+static void smt_send_srf(struct s_smc *smc);
+static struct s_srf_evc *smt_get_evc(struct s_smc *smc, int code, int index);
 
 #define MAX_EVCS	(sizeof(smc->evcs)/sizeof(smc->evcs[0]))
 
@@ -69,8 +69,7 @@
 
 #define MAX_INIT_EVC	(sizeof(evc_inits)/sizeof(evc_inits[0]))
 
-void smt_init_evc(smc)
-struct s_smc *smc ;
+void smt_init_evc(struct s_smc *smc)
 {
 	struct s_srf_evc	*evc ;
 	const struct evc_init 	*init ;
@@ -159,10 +158,7 @@
 	smc->srf.sr_state = SR0_WAIT ;
 }
 
-static struct s_srf_evc *smt_get_evc(smc,code,index)
-struct s_smc *smc ;
-int code ;
-int index ;
+static struct s_srf_evc *smt_get_evc(struct s_smc *smc, int code, int index)
 {
 	int			i ;
 	struct s_srf_evc	*evc ;
@@ -188,11 +184,7 @@
 } ;
 #endif
 
-void smt_srf_event(smc,code,index,cond)
-struct s_smc *smc ;
-int code ;
-int index ;
-int cond ;
+void smt_srf_event(struct s_smc *smc, int code, int index, int cond)
 {
 	struct s_srf_evc	*evc ;
 	int			cond_asserted = 0 ;
@@ -340,8 +332,7 @@
 	}
 }
 
-static void clear_all_rep(smc)
-struct s_smc *smc ;
+static void clear_all_rep(struct s_smc *smc)
 {
 	struct s_srf_evc	*evc ;
 	int			i ;
@@ -354,8 +345,7 @@
 	smc->srf.any_report = FALSE ;
 }
 
-static void clear_reported(smc)
-struct s_smc *smc ;
+static void clear_reported(struct s_smc *smc)
 {
 	struct s_srf_evc	*evc ;
 	int			i ;
@@ -375,13 +365,10 @@
 	}
 }
 
-extern SMbuf *smt_build_frame() ;
-
 /*
  * build and send SMT SRF frame
  */
-static void smt_send_srf(smc)
-struct s_smc *smc ;
+static void smt_send_srf(struct s_smc *smc)
 {
 
 	struct smt_header	*smt ;
@@ -439,3 +426,4 @@
 
 #endif	/* no BOOT */
 #endif	/* no SLIM_SMT */
+
--- diff/drivers/net/smc-mca.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/smc-mca.c	2004-07-01 21:32:39.000000000 +0100
@@ -51,6 +51,8 @@
 #include "8390.h"
 #include "smc-mca.h"
 
+#define DRV_NAME "smc-mca"
+
 static int ultramca_open(struct net_device *dev);
 static void ultramca_reset_8390(struct net_device *dev);
 static void ultramca_get_8390_hdr(struct net_device *dev,
@@ -265,7 +267,7 @@
 		goto err_unclaim;
 	}
 
-	if (!request_region(ioaddr, ULTRA_IO_EXTENT, dev->name)) {
+	if (!request_region(ioaddr, ULTRA_IO_EXTENT, DRV_NAME)) {
 		rc = -ENODEV;
 		goto err_unclaim;
 	}
--- diff/drivers/net/smc-ultra.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/smc-ultra.c	2004-07-01 21:32:39.000000000 +0100
@@ -72,6 +72,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "smc-ultra"
+
 /* A zero-terminated list of I/O addresses to be probed. */
 static unsigned int ultra_portlist[] __initdata =
 {0x200, 0x220, 0x240, 0x280, 0x300, 0x340, 0x380, 0};
@@ -178,6 +180,7 @@
 	release_region(dev->base_addr - ULTRA_NIC_OFFSET, ULTRA_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init ultra_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -202,6 +205,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init ultra_probe1(struct net_device *dev, int ioaddr)
 {
@@ -215,7 +219,7 @@
 	unsigned char idreg = inb(ioaddr + 7);
 	unsigned char reg4 = inb(ioaddr + 4) & 0x7f;
 
-	if (!request_region(ioaddr, ULTRA_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, ULTRA_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	/* Check the ID nibble. */
--- diff/drivers/net/smc-ultra32.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/smc-ultra32.c	2004-07-01 21:32:39.000000000 +0100
@@ -61,6 +61,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "smc-ultra32"
+
 static int ultra32_probe1(struct net_device *dev, int ioaddr);
 static int ultra32_open(struct net_device *dev);
 static void ultra32_reset_8390(struct net_device *dev);
@@ -163,7 +165,7 @@
 	unsigned char reg4;
 	const char *ifmap[] = {"UTP No Link", "", "UTP/AUI", "UTP/BNC"};
 
-	if (!request_region(ioaddr, ULTRA32_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, ULTRA32_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	if (inb(ioaddr + ULTRA32_IDPORT) == 0xff ||
--- diff/drivers/net/smc9194.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/smc9194.c	2004-07-01 21:32:39.000000000 +0100
@@ -78,6 +78,8 @@
 
 #include "smc9194.h"
 
+#define DRV_NAME "smc9194"
+
 /*------------------------------------------------------------------------
  .
  . Configuration options, for the experienced user to change.
@@ -94,16 +96,51 @@
 #define USE_32_BIT 1
 #endif
 
+#if defined(__H8300H__) || defined(__H8300S__)
+#define NO_AUTOPROBE
+#undef insl
+#undef outsl
+#define insl(a,b,l)  io_insl_noswap(a,b,l)
+#define outsl(a,b,l) io_outsl_noswap(a,b,l)
+#endif
+
 /*
  .the SMC9194 can be at any of the following port addresses.  To change,
  .for a slightly different card, you can add it to the array.  Keep in
  .mind that the array must end in zero.
 */
-static unsigned int smc_portlist[] __initdata = { 
-	0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
-	0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, 0
+
+struct devlist {
+	unsigned int port;
+	unsigned int irq;
 };
 
+#if defined(CONFIG_H8S_EDOSK2674)
+static struct devlist smc_devlist[] __initdata = {
+	{.port = 0xf80000, .irq = 16},
+	{.port = 0,        .irq = 0 },
+};
+#else
+static struct devlist smc_devlist[] __initdata = {
+	{.port = 0x200, .irq = 0},
+	{.port = 0x220, .irq = 0},
+	{.port = 0x240, .irq = 0},
+	{.port = 0x260, .irq = 0},
+	{.port = 0x280, .irq = 0},
+	{.port = 0x2A0, .irq = 0},
+	{.port = 0x2C0, .irq = 0},
+	{.port = 0x2E0, .irq = 0},
+	{.port = 0x300, .irq = 0},
+	{.port = 0x320, .irq = 0},
+	{.port = 0x340, .irq = 0},
+	{.port = 0x360, .irq = 0},
+	{.port = 0x380, .irq = 0},
+	{.port = 0x3A0, .irq = 0},
+	{.port = 0x3C0, .irq = 0},
+	{.port = 0x3E0, .irq = 0},
+	{.port = 0,     .irq = 0},
+};
+#endif
 /*
  . Wait time for memory to be free.  This probably shouldn't be
  . tuned that much, as waiting for this means nothing else happens
@@ -466,7 +503,7 @@
 static int smc_wait_to_send_packet( struct sk_buff * skb, struct net_device * dev )
 {
 	struct smc_local *lp = netdev_priv(dev);
-	unsigned short ioaddr 	= dev->base_addr;
+	unsigned int ioaddr 	= dev->base_addr;
 	word 			length;
 	unsigned short 		numPages;
 	word			time_out;
@@ -580,7 +617,7 @@
 	byte	 		packet_no;
 	struct sk_buff * 	skb = lp->saved_skb;
 	word			length;
-	unsigned short		ioaddr;
+	unsigned int		ioaddr;
 	byte			* buf;
 
 	ioaddr = dev->base_addr;
@@ -635,7 +672,11 @@
 #ifdef USE_32_BIT
 	if ( length & 0x2  ) {
 		outsl(ioaddr + DATA_1, buf,  length >> 2 );
+#if !defined(__H8300H__) && !defined(__H8300S__)
 		outw( *((word *)(buf + (length & 0xFFFFFFFC))),ioaddr +DATA_1);
+#else
+		ctrl_outw( *((word *)(buf + (length & 0xFFFFFFFC))),ioaddr +DATA_1);
+#endif
 	}
 	else
 		outsl(ioaddr + DATA_1, buf,  length >> 2 );
@@ -691,9 +732,12 @@
 struct net_device * __init smc_init(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(struct smc_local));
-	unsigned *port;
+	static struct devlist *smcdev = smc_devlist;
 	int err = 0;
 
+#ifndef NO_AUTOPROBE
+	smcdev = smc_devlist;
+#endif
 	if (!dev)
 		return ERR_PTR(-ENODEV);
 
@@ -711,11 +755,11 @@
 	} else if (io != 0) {	/* Don't probe at all. */
 		err = -ENXIO;
 	} else {
-		for (port = smc_portlist; *port; port++) {
-			if (smc_probe(dev, *port) == 0)
+		for (;smcdev->port; smcdev++) {
+			if (smc_probe(dev, smcdev->port) == 0)
 				break;
 		}
-		if (!*port)
+		if (!smcdev->port)
 			err = -ENODEV;
 	}
 	if (err)
@@ -741,6 +785,7 @@
 */
 int __init smc_findirq( int ioaddr )
 {
+#ifndef NO_AUTOPROBE
 	int	timeout = 20;
 	unsigned long cookie;
 
@@ -795,6 +840,14 @@
 
 	/* and return what I found */
 	return probe_irq_off(cookie);
+#else /* NO_AUTOPROBE */
+	struct devlist *smcdev;
+	for (smcdev = smc_devlist; smcdev->port; smcdev++) {
+		if (smcdev->port == ioaddr)
+			return smcdev->irq;
+	}
+	return 0;
+#endif
 }
 
 /*----------------------------------------------------------------------
@@ -843,7 +896,7 @@
 	word memory_cfg_register;
 
 	/* Grab the region so that no one else tries to probe our ioports. */
-	if (!request_region(ioaddr, SMC_IO_EXTENT, dev->name))
+	if (!request_region(ioaddr, SMC_IO_EXTENT, DRV_NAME))
 		return -EBUSY;
 
 	dev->irq = irq;
@@ -863,6 +916,7 @@
 		retval = -ENODEV;
 		goto err_out;
 	}
+#if !defined(CONFIG_H8S_EDOSK2674)
 	/* well, we've already written once, so hopefully another time won't
  	   hurt.  This time, I need to switch the bank register to bank 1,
 	   so I can access the base address register */
@@ -877,6 +931,10 @@
 		retval = -ENODEV;
 		goto err_out;
 	}
+#else
+	(void)base_address_register; /* Warning suppression */
+#endif
+
 
 	/*  check if the revision register is something that I recognize.
 	    These might need to be added to later, as future revisions
@@ -1001,9 +1059,9 @@
 	memset(dev->priv, 0, sizeof(struct smc_local));
 
 	/* Grab the IRQ */
-      	retval = request_irq(dev->irq, &smc_interrupt, 0, dev->name, dev);
+      	retval = request_irq(dev->irq, &smc_interrupt, 0, DRV_NAME, dev);
       	if (retval) {
-		printk("%s: unable to get IRQ %d (irqval=%d).\n", dev->name,
+		printk("%s: unable to get IRQ %d (irqval=%d).\n", DRV_NAME,
 			dev->irq, retval);
   	  	goto err_out;
       	}
--- diff/drivers/net/starfire.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/starfire.c	2004-07-01 21:32:39.000000000 +0100
@@ -880,7 +880,7 @@
 
 	irq = pdev->irq;
 
-	if (pci_request_regions (pdev, dev->name)) {
+	if (pci_request_regions (pdev, DRV_NAME)) {
 		printk(KERN_ERR DRV_NAME " %d: cannot reserve PCI resources, aborting\n", card_idx);
 		goto err_out_free_netdev;
 	}
--- diff/drivers/net/stnic.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/stnic.c	2004-07-01 21:32:39.000000000 +0100
@@ -28,6 +28,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "stnic"
+
 #define byte	unsigned char
 #define half	unsigned short
 #define word	unsigned int
@@ -130,7 +132,7 @@
 
   /* Snarf the interrupt now.  There's no point in waiting since we cannot
      share and the board will usually be enabled. */
-  err = request_irq (dev->irq, ei_interrupt, 0, dev->name, dev);
+  err = request_irq (dev->irq, ei_interrupt, 0, DRV_NAME, dev);
   if (err)  {
       printk (KERN_EMERG " unable to get IRQ %d.\n", dev->irq);
       free_netdev(dev);
--- diff/drivers/net/sun3_82586.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/sun3_82586.c	2004-07-01 21:32:39.000000000 +0100
@@ -53,6 +53,8 @@
 
 #include "sun3_82586.h"
 
+#define DRV_NAME "sun3_82586"
+
 #define DEBUG       /* debug on */
 #define SYSBUSVAL 0 /* 16 Bit */
 #define SUN3_82586_TOTAL_SIZE	PAGE_SIZE
@@ -336,7 +338,7 @@
 {
 	int i, size, retval;
 
-	if (!request_region(ioaddr, SUN3_82586_TOTAL_SIZE, dev->name))
+	if (!request_region(ioaddr, SUN3_82586_TOTAL_SIZE, DRV_NAME))
 		return -EBUSY;
 
 	/* copy in the ethernet address from the prom */
--- diff/drivers/net/sun3lance.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/sun3lance.c	2004-07-01 21:32:39.000000000 +0100
@@ -42,7 +42,6 @@
 #include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/pgtable.h>
-#include <asm/pgalloc.h>
 #include <asm/dvma.h>
 #include <asm/idprom.h>
 #include <asm/machines.h>
--- diff/drivers/net/sungem.c	2004-06-30 14:25:48.000000000 +0100
+++ source/drivers/net/sungem.c	2004-07-01 21:32:39.000000000 +0100
@@ -33,6 +33,7 @@
 #include <linux/crc32.h>
 #include <linux/random.h>
 #include <linux/workqueue.h>
+#include <linux/if_vlan.h>
 
 #include <asm/system.h>
 #include <asm/bitops.h>
@@ -742,7 +743,7 @@
 				       PCI_DMA_FROMDEVICE);
 			gp->rx_skbs[entry] = new_skb;
 			new_skb->dev = gp->dev;
-			skb_put(new_skb, (ETH_FRAME_LEN + RX_OFFSET));
+			skb_put(new_skb, (gp->rx_buf_sz + RX_OFFSET));
 			rxd->buffer = cpu_to_le64(pci_map_page(gp->pdev,
 							       virt_to_page(new_skb->data),
 							       offset_in_page(new_skb->data),
@@ -1482,6 +1483,9 @@
 
 	gem_clean_rings(gp);
 
+	gp->rx_buf_sz = max(dev->mtu + ETH_HLEN + VLAN_HLEN,
+			    (unsigned)VLAN_ETH_FRAME_LEN);
+
 	for (i = 0; i < RX_RING_SIZE; i++) {
 		struct sk_buff *skb;
 		struct gem_rxd *rxd = &gb->rxd[i];
@@ -1495,7 +1499,7 @@
 
 		gp->rx_skbs[i] = skb;
 		skb->dev = dev;
-		skb_put(skb, (ETH_FRAME_LEN + RX_OFFSET));
+		skb_put(skb, (gp->rx_buf_sz + RX_OFFSET));
 		dma_addr = pci_map_page(gp->pdev,
 					virt_to_page(skb->data),
 					offset_in_page(skb->data),
@@ -1750,7 +1754,7 @@
 	writel(0x40, gp->regs + MAC_MINFSZ);
 
 	/* Ethernet payload + header + FCS + optional VLAN tag. */
-	writel(0x20000000 | (gp->dev->mtu + ETH_HLEN + 4 + 4), gp->regs + MAC_MAXFSZ);
+	writel(0x20000000 | (gp->rx_buf_sz + 4), gp->regs + MAC_MAXFSZ);
 
 	writel(0x07, gp->regs + MAC_PASIZE);
 	writel(0x04, gp->regs + MAC_JAMSIZE);
@@ -1827,7 +1831,7 @@
 	if (gp->rx_fifo_sz <= (2 * 1024)) {
 		gp->rx_pause_off = gp->rx_pause_on = gp->rx_fifo_sz;
 	} else {
-		int max_frame = (gp->dev->mtu + ETH_HLEN + 4 + 4 + 64) & ~63;
+		int max_frame = (gp->rx_buf_sz + 4 + 64) & ~63;
 		int off = (gp->rx_fifo_sz - (max_frame * 2));
 		int on = off - max_frame;
 
@@ -2717,7 +2721,7 @@
 
 	gp = dev->priv;
 
-	err = pci_request_regions(pdev, dev->name);
+	err = pci_request_regions(pdev, DRV_NAME);
 	if (err) {
 		printk(KERN_ERR PFX "Cannot obtain PCI resources, "
 		       "aborting.\n");
--- diff/drivers/net/sungem.h	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/sungem.h	2004-07-01 21:32:39.000000000 +0100
@@ -911,7 +911,7 @@
 	  (GP)->tx_old - (GP)->tx_new - 1)
 
 #define RX_OFFSET          2
-#define RX_BUF_ALLOC_SIZE(gp)	((gp)->dev->mtu + 46 + RX_OFFSET + 64)
+#define RX_BUF_ALLOC_SIZE(gp)	((gp)->rx_buf_sz + 28 + RX_OFFSET + 64)
 
 #define RX_COPY_THRESHOLD  256
 
@@ -979,6 +979,7 @@
 	int			rx_fifo_sz;
 	int			rx_pause_off;
 	int			rx_pause_on;
+	int			rx_buf_sz;
 	int			mii_phy_addr;
 
 	u32			mac_rx_cfg;
--- diff/drivers/net/sunhme.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/sunhme.c	2004-07-01 21:32:39.000000000 +0100
@@ -68,6 +68,8 @@
 #include "sunhme.h"
 
 
+#define DRV_NAME "sunhme"
+
 static int macaddr[6];
 
 /* accept MAC address of the form macaddr=0x08,0x00,0x20,0x30,0x40,0x50 */
@@ -526,8 +528,10 @@
 	ASD(("happy_meal_tcvr_write: reg=0x%02x value=%04x\n", reg, value));
 
 	/* Welcome to Sun Microsystems, can I take your order please? */
-	if (!(hp->happy_flags & HFLAG_FENABLE))
-		return happy_meal_bb_write(hp, tregs, reg, value);
+	if (!(hp->happy_flags & HFLAG_FENABLE)) {
+		happy_meal_bb_write(hp, tregs, reg, value);
+		return;
+	}
 
 	/* Would you like fries with that? */
 	hme_write32(hp, tregs + TCVR_FRAME,
@@ -2920,7 +2924,8 @@
 	struct list_head *tmp;
 	int n_hmes;
 
-	if (busdev->vendor != PCI_VENDOR_ID_DEC ||
+	if (busdev == NULL ||
+	    busdev->vendor != PCI_VENDOR_ID_DEC ||
 	    busdev->device != PCI_DEVICE_ID_DEC_21153)
 		return 0;
 
@@ -3085,7 +3090,7 @@
 		printk(KERN_ERR "happymeal(PCI): Cannot find proper PCI device base address.\n");
 		goto err_out_clear_quattro;
 	}
-	if (pci_request_regions(pdev, dev->name)) {
+	if (pci_request_regions(pdev, DRV_NAME)) {
 		printk(KERN_ERR "happymeal(PCI): Cannot obtain PCI resources, "
 		       "aborting.\n");
 		goto err_out_clear_quattro;
--- diff/drivers/net/tc35815.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/tc35815.c	2004-07-01 21:32:39.000000000 +0100
@@ -1717,7 +1717,7 @@
 }
 
 static struct pci_driver tc35815_driver = {
-	.name =TC35815_MODULE_NAME,
+	.name = TC35815_MODULE_NAME,
 	.probe = tc35815_probe,
 	.remove = NULL,
 	.id_table = tc35815_pci_tbl,
--- diff/drivers/net/tokenring/ibmtr.c	2004-05-19 22:11:59.000000000 +0100
+++ source/drivers/net/tokenring/ibmtr.c	2004-07-01 21:32:39.000000000 +0100
@@ -127,6 +127,7 @@
 
 #include <linux/ioport.h>
 #include <linux/netdevice.h>
+#include <linux/ip.h>
 #include <linux/trdevice.h>
 #include <linux/ibmtr.h>
 
--- diff/drivers/net/tulip/Kconfig	2004-05-19 22:11:59.000000000 +0100
+++ source/drivers/net/tulip/Kconfig	2004-07-01 21:32:39.000000000 +0100
@@ -71,10 +71,17 @@
 config TULIP_NAPI
 	bool "Use NAPI RX polling "
 	depends on TULIP
-	---help---
-	  This is of useful for servers and routers dealing with high network loads.
- 
-	  See <file:Documentation/networking/NAPI_HOWTO.txt>.
+	help
+	  NAPI is a new driver API designed to reduce CPU and interrupt load
+	  when the driver is receiving lots of packets from the card. It is
+	  still somewhat experimental and thus not yet enabled by default.
+
+	  If your estimated Rx load is 10kpps or more, or if the card will be
+	  deployed on potentially unfriendly networks (e.g. in a firewall),
+	  then say Y here.
+
+	  See <file:Documentation/networking/NAPI_HOWTO.txt> for more
+	  information.
 
 	  If in doubt, say N.
 
--- diff/drivers/net/tulip/tulip_core.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/tulip/tulip_core.c	2004-07-01 21:32:39.000000000 +0100
@@ -1535,7 +1535,7 @@
 		}
 	}
 	/* Lite-On boards have the address byte-swapped. */
-	if ((dev->dev_addr[0] == 0xA0  ||  dev->dev_addr[0] == 0xC0)
+	if ((dev->dev_addr[0] == 0xA0  ||  dev->dev_addr[0] == 0xC0 || dev->dev_addr[0] == 0x02)
 		&&  dev->dev_addr[1] == 0x00)
 		for (i = 0; i < 6; i+=2) {
 			char tmp = dev->dev_addr[i];
--- diff/drivers/net/tulip/winbond-840.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/tulip/winbond-840.c	2004-07-01 21:32:39.000000000 +0100
@@ -1292,14 +1292,8 @@
 				pci_dma_sync_single_for_cpu(np->pci_dev,np->rx_addr[entry],
 							    np->rx_skbuff[entry]->len,
 							    PCI_DMA_FROMDEVICE);
-				/* Call copy + cksum if available. */
-#if HAS_IP_COPYSUM
 				eth_copy_and_sum(skb, np->rx_skbuff[entry]->tail, pkt_len, 0);
 				skb_put(skb, pkt_len);
-#else
-				memcpy(skb_put(skb, pkt_len), np->rx_skbuff[entry]->tail,
-					   pkt_len);
-#endif
 				pci_dma_sync_single_for_device(np->pci_dev,np->rx_addr[entry],
 							       np->rx_skbuff[entry]->len,
 							       PCI_DMA_FROMDEVICE);
--- diff/drivers/net/via-rhine.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/via-rhine.c	2004-07-01 21:32:39.000000000 +0100
@@ -125,11 +125,16 @@
 	LK1.1.19 (Roger Luethi)
 	- Increase Tx threshold for unspecified errors
 
+	LK1.2.0-2.6 (Roger Luethi)
+	- Massive clean-up
+	- Rewrite PHY, media handling (remove options, full_duplex, backoff)
+	- Fix Tx engine race for good
+
 */
 
 #define DRV_NAME	"via-rhine"
-#define DRV_VERSION	"1.1.20-2.6"
-#define DRV_RELDATE	"May-23-2004"
+#define DRV_VERSION	"1.2.0-2.6"
+#define DRV_RELDATE	"June-10-2004"
 
 
 /* A few user-configurable values.
@@ -142,22 +147,10 @@
    Setting to > 1518 effectively disables this feature. */
 static int rx_copybreak;
 
-/* Select a backoff algorithm (Ethernet capture effect) */
-static int backoff;
-
-/* Used to pass the media type, etc.
-   Both 'options[]' and 'full_duplex[]' should exist for driver
-   interoperability.
-   The media type is usually passed in 'options[]'.
-   The default is autonegotiation for speed and duplex.
-     This should rarely be overridden.
-   Use option values 0x10/0x20 for 10Mbps, 0x100,0x200 for 100Mbps.
-   Use option values 0x10 and 0x100 for forcing half duplex fixed speed.
-   Use option values 0x20 and 0x200 for forcing full duplex operation.
-*/
-#define MAX_UNITS	8	/* More are supported, limit only on options */
-static int options[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
-static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
+/*
+ * In case you are looking for 'options[]' or 'full_duplex[]', they
+ * are gone. Use ethtool(8) instead.
+ */
 
 /* Maximum number of multicast addresses to filter (vs. rx-all-multicast).
    The Rhine has a 64 element 8390-like hash table. */
@@ -216,9 +209,6 @@
 static char version[] __devinitdata =
 KERN_INFO DRV_NAME ".c:v1.10-LK" DRV_VERSION " " DRV_RELDATE " Written by Donald Becker\n";
 
-static char shortname[] = DRV_NAME;
-
-
 /* This driver was written to use PCI memory space. Some early versions
    of the Rhine may only work correctly with I/O space accesses. */
 #ifdef CONFIG_VIA_RHINE_MMIO
@@ -245,15 +235,9 @@
 MODULE_PARM(max_interrupt_work, "i");
 MODULE_PARM(debug, "i");
 MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(backoff, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
 MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt");
 MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)");
 MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");
-MODULE_PARM_DESC(backoff, "VIA Rhine: Bits 0-3: backoff algorithm");
-MODULE_PARM_DESC(options, "VIA Rhine: Bits 0-3: media type, bit 17: full duplex");
-MODULE_PARM_DESC(full_duplex, "VIA Rhine full duplex setting(s) (1)");
 
 /*
 		Theory of Operation
@@ -354,59 +338,46 @@
    second only the 1234 card.
 */
 
-enum pci_flags_bit {
-	PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4,
-	PCI_ADDR0=0x10<<0, PCI_ADDR1=0x10<<1, PCI_ADDR2=0x10<<2, PCI_ADDR3=0x10<<3,
+enum rhine_revs {
+	VT86C100A	= 0x00,
+	VTunknown0	= 0x20,
+	VT6102		= 0x40,
+	VT8231		= 0x50,	/* Integrated MAC */
+	VT8233		= 0x60,	/* Integrated MAC */
+	VT8235		= 0x74,	/* Integrated MAC */
+	VT8237		= 0x78,	/* Integrated MAC */
+	VTunknown1	= 0x7C,
+	VT6105		= 0x80,
+	VT6105_B0	= 0x83,
+	VT6105L		= 0x8A,
+	VT6107		= 0x8C,
+	VTunknown2	= 0x8E,
+	VT6105M		= 0x90,
 };
 
-enum rhine_chips {
-	VT86C100A = 0,
-	VT6102,
-	VT6105,
-	VT6105M
-};
-
-struct rhine_chip_info {
-	const char *name;
-	u16 pci_flags;
-	int io_size;
-	int drv_flags;
-};
-
-
-enum chip_capability_flags {
-	CanHaveMII=1, HasESIPhy=2, HasDavicomPhy=4,
-	ReqTxAlign=0x10, HasWOL=0x20,
+enum rhine_quirks {
+	rqWOL		= 0x0001,	/* Wake-On-LAN support */
+	rqForceReset	= 0x0002,
+	rq6patterns	= 0x0040,	/* 6 instead of 4 patterns for WOL */
+	rqStatusWBRace	= 0x0080,	/* Tx Status Writeback Error possible */
+	rqRhineI	= 0x0100,	/* See comment below */
 };
+/*
+ * rqRhineI: VT86C100A (aka Rhine-I) uses different bits to enable
+ * MMIO as well as for the collision counter and the Tx FIFO underflow
+ * indicator. In addition, Tx and Rx buffers need to 4 byte aligned.
+ */
 
-#ifdef USE_MMIO
-#define RHINE_IOTYPE (PCI_USES_MEM | PCI_USES_MASTER | PCI_ADDR1)
-#else
-#define RHINE_IOTYPE (PCI_USES_IO  | PCI_USES_MASTER | PCI_ADDR0)
-#endif
 /* Beware of PCI posted writes */
 #define IOSYNC	do { readb(dev->base_addr + StationAddr); } while (0)
 
-/* directly indexed by enum rhine_chips, above */
-static struct rhine_chip_info rhine_chip_info[] __devinitdata =
-{
-	{ "VIA VT86C100A Rhine", RHINE_IOTYPE, 128,
-	  CanHaveMII | ReqTxAlign | HasDavicomPhy },
-	{ "VIA VT6102 Rhine-II", RHINE_IOTYPE, 256,
-	  CanHaveMII | HasWOL },
-	{ "VIA VT6105 Rhine-III", RHINE_IOTYPE, 256,
-	  CanHaveMII | HasWOL },
-	{ "VIA VT6105M Rhine-III", RHINE_IOTYPE, 256,
-	  CanHaveMII | HasWOL },
-};
-
 static struct pci_device_id rhine_pci_tbl[] =
 {
-	{0x1106, 0x3043, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VT86C100A},
-	{0x1106, 0x3065, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VT6102},
-	{0x1106, 0x3106, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VT6105}, /* 6105{,L,LOM} */
-	{0x1106, 0x3053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VT6105M},
-	{0,}	/* terminate list */
+	{0x1106, 0x3043, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* VT86C100A */
+	{0x1106, 0x3065, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* VT6102 */
+	{0x1106, 0x3106, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* 6105{,L,LOM} */
+	{0x1106, 0x3053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* VT6105M */
+	{ }	/* terminate list */
 };
 MODULE_DEVICE_TABLE(pci, rhine_pci_tbl);
 
@@ -414,6 +385,7 @@
 /* Offsets to the device registers. */
 enum register_offsets {
 	StationAddr=0x00, RxConfig=0x06, TxConfig=0x07, ChipCmd=0x08,
+	ChipCmd1=0x09,
 	IntrStatus=0x0C, IntrEnable=0x0E,
 	MulticastFilter0=0x10, MulticastFilter1=0x14,
 	RxRingPtr=0x18, TxRingPtr=0x1C, GFIFOTest=0x54,
@@ -421,8 +393,10 @@
 	MIICmd=0x70, MIIRegAddr=0x71, MIIData=0x72, MACRegEEcsr=0x74,
 	ConfigA=0x78, ConfigB=0x79, ConfigC=0x7A, ConfigD=0x7B,
 	RxMissed=0x7C, RxCRCErrs=0x7E, MiscCmd=0x81,
-	StickyHW=0x83, IntrStatus2=0x84, WOLcrClr=0xA4, WOLcgClr=0xA7,
-	PwrcsrClr=0xAC,
+	StickyHW=0x83, IntrStatus2=0x84,
+	WOLcrSet=0xA0, PwcfgSet=0xA1, WOLcgSet=0xA3, WOLcrClr=0xA4,
+	WOLcrClr1=0xA6, WOLcgClr=0xA7,
+	PwrcsrSet=0xA8, PwrcsrSet1=0xA9, PwrcsrClr=0xAC, PwrcsrClr1=0xAD,
 };
 
 /* Bits in ConfigD */
@@ -453,6 +427,15 @@
 	IntrTxErrSummary=0x082218,
 };
 
+/* Bits in WOLcrSet/WOLcrClr and PwrcsrSet/PwrcsrClr */
+enum wol_bits {
+	WOLucast	= 0x10,
+	WOLmagic	= 0x20,
+	WOLbmcast	= 0x30,
+	WOLlnkon	= 0x40,
+	WOLlnkoff	= 0x80,
+};
+
 /* The Rx and Tx buffer descriptors. */
 struct rx_desc {
 	s32 rx_status;
@@ -481,13 +464,12 @@
 
 /* Bits in ChipCmd. */
 enum chip_cmd_bits {
-	CmdInit=0x0001, CmdStart=0x0002, CmdStop=0x0004, CmdRxOn=0x0008,
-	CmdTxOn=0x0010, CmdTxDemand=0x0020, CmdRxDemand=0x0040,
-	CmdEarlyRx=0x0100, CmdEarlyTx=0x0200, CmdFDuplex=0x0400,
-	CmdNoTxPoll=0x0800, CmdReset=0x8000,
+	CmdInit=0x01, CmdStart=0x02, CmdStop=0x04, CmdRxOn=0x08,
+	CmdTxOn=0x10, Cmd1TxDemand=0x20, CmdRxDemand=0x40,
+	Cmd1EarlyRx=0x01, Cmd1EarlyTx=0x02, Cmd1FDuplex=0x04,
+	Cmd1NoTxPoll=0x08, Cmd1Reset=0x80,
 };
 
-#define MAX_MII_CNT	4
 struct rhine_private {
 	/* Descriptor rings */
 	struct rx_desc *rx_ring;
@@ -510,33 +492,24 @@
 
 	struct pci_dev *pdev;
 	struct net_device_stats stats;
-	struct timer_list timer;	/* Media monitoring timer. */
 	spinlock_t lock;
 
 	/* Frequently used values: keep some adjacent for cache effect. */
-	int chip_id, drv_flags;
+	u32 quirks;
 	struct rx_desc *rx_head_desc;
 	unsigned int cur_rx, dirty_rx;	/* Producer/consumer ring indices */
 	unsigned int cur_tx, dirty_tx;
 	unsigned int rx_buf_sz;		/* Based on MTU+slack. */
-	u16 chip_cmd;			/* Current setting for ChipCmd */
+	u8 wolopts;
 
-	/* These values are keep track of the transceiver/media in use. */
-	unsigned int default_port:4;	/* Last dev->if_port value. */
 	u8 tx_thresh, rx_thresh;
 
-	/* MII transceiver section. */
-	unsigned char phys[MAX_MII_CNT];	/* MII device addresses. */
-	unsigned int mii_cnt;		/* number of MIIs found, but only the first one is used */
-	u16 mii_status;			/* last read MII status */
 	struct mii_if_info mii_if;
 };
 
 static int  mdio_read(struct net_device *dev, int phy_id, int location);
 static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
 static int  rhine_open(struct net_device *dev);
-static void rhine_check_duplex(struct net_device *dev);
-static void rhine_timer(unsigned long data);
 static void rhine_tx_timeout(struct net_device *dev);
 static int  rhine_start_tx(struct sk_buff *skb, struct net_device *dev);
 static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
@@ -548,6 +521,16 @@
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static struct ethtool_ops netdev_ethtool_ops;
 static int  rhine_close(struct net_device *dev);
+static void rhine_shutdown (struct device *gdev);
+
+#define RHINE_WAIT_FOR(condition) do {					\
+	int i=1024;							\
+	while (!(condition) && --i)					\
+		;							\
+	if (debug > 1 && i < 512)					\
+		printk(KERN_INFO "%s: %4d cycles used @ %s:%d\n",	\
+				DRV_NAME, 1024-i, __func__, __LINE__);	\
+} while(0)
 
 static inline u32 get_intr_status(struct net_device *dev)
 {
@@ -557,61 +540,137 @@
 
 	intr_status = readw(ioaddr + IntrStatus);
 	/* On Rhine-II, Bit 3 indicates Tx descriptor write-back race. */
-	if (rp->chip_id == VT6102)
+	if (rp->quirks & rqStatusWBRace)
 		intr_status |= readb(ioaddr + IntrStatus2) << 16;
 	return intr_status;
 }
 
-static void wait_for_reset(struct net_device *dev, int chip_id, char *name)
+/*
+ * Get power related registers into sane state.
+ * Notify user about past WOL event.
+ */
+static void rhine_power_init(struct net_device *dev)
 {
 	long ioaddr = dev->base_addr;
-	int boguscnt = 20;
+	struct rhine_private *rp = netdev_priv(dev);
+	u16 wolstat;
+
+	if (rp->quirks & rqWOL) {
+		/* Make sure chip is in power state D0 */
+		writeb(readb(ioaddr + StickyHW) & 0xFC, ioaddr + StickyHW);
+
+		/* Disable "force PME-enable" */
+		writeb(0x80, ioaddr + WOLcgClr);
 
+		/* Clear power-event config bits (WOL) */
+		writeb(0xFF, ioaddr + WOLcrClr);
+		/* More recent cards can manage two additional patterns */
+		if (rp->quirks & rq6patterns)
+			writeb(0x03, ioaddr + WOLcrClr1);
+
+		/* Save power-event status bits */
+		wolstat = readb(ioaddr + PwrcsrSet);
+		if (rp->quirks & rq6patterns)
+			wolstat |= (readb(ioaddr + PwrcsrSet1) & 0x03) << 8;
+
+		/* Clear power-event status bits */
+		writeb(0xFF, ioaddr + PwrcsrClr);
+		if (rp->quirks & rq6patterns)
+			writeb(0x03, ioaddr + PwrcsrClr1);
+
+		if (wolstat) {
+			char *reason;
+			switch (wolstat) {
+			case WOLmagic:
+				reason = "Magic packet";
+				break;
+			case WOLlnkon:
+				reason = "Link went up";
+				break;
+			case WOLlnkoff:
+				reason = "Link went down";
+				break;
+			case WOLucast:
+				reason = "Unicast packet";
+				break;
+			case WOLbmcast:
+				reason = "Multicast/broadcast packet";
+				break;
+			default:
+				reason = "Unknown";
+			}
+			printk("%s: Woke system up. Reason: %s.\n",
+			       DRV_NAME, reason);
+		}
+	}
+}
+
+static void rhine_chip_reset(struct net_device *dev)
+{
+	long ioaddr = dev->base_addr;
+	struct rhine_private *rp = netdev_priv(dev);
+
+	writeb(Cmd1Reset, ioaddr + ChipCmd1);
 	IOSYNC;
 
-	if (readw(ioaddr + ChipCmd) & CmdReset) {
+	if (readb(ioaddr + ChipCmd1) & Cmd1Reset) {
 		printk(KERN_INFO "%s: Reset not complete yet. "
-			"Trying harder.\n", name);
+			"Trying harder.\n", DRV_NAME);
 
-		/* Rhine-II needs to be forced sometimes */
-		if (chip_id == VT6102)
+		/* Force reset */
+		if (rp->quirks & rqForceReset)
 			writeb(0x40, ioaddr + MiscCmd);
 
-		/* VT86C100A may need long delay after reset (dlink) */
-		/* Seen on Rhine-II as well (rl) */
-		while ((readw(ioaddr + ChipCmd) & CmdReset) && --boguscnt)
-			udelay(5);
-
+		/* Reset can take somewhat longer (rare) */
+		RHINE_WAIT_FOR(!(readb(ioaddr + ChipCmd1) & Cmd1Reset));
 	}
 
 	if (debug > 1)
-		printk(KERN_INFO "%s: Reset %s.\n", name,
-			boguscnt ? "succeeded" : "failed");
+		printk(KERN_INFO "%s: Reset %s.\n", dev->name,
+			(readb(ioaddr + ChipCmd1) & Cmd1Reset) ?
+			"failed" : "succeeded");
 }
 
 #ifdef USE_MMIO
-static void __devinit enable_mmio(long ioaddr, int chip_id)
+static void __devinit enable_mmio(long pioaddr, u32 quirks)
 {
 	int n;
-	if (chip_id == VT86C100A) {
+	if (quirks & rqRhineI) {
 		/* More recent docs say that this bit is reserved ... */
-		n = inb(ioaddr + ConfigA) | 0x20;
-		outb(n, ioaddr + ConfigA);
+		n = inb(pioaddr + ConfigA) | 0x20;
+		outb(n, pioaddr + ConfigA);
 	} else {
-		n = inb(ioaddr + ConfigD) | 0x80;
-		outb(n, ioaddr + ConfigD);
+		n = inb(pioaddr + ConfigD) | 0x80;
+		outb(n, pioaddr + ConfigD);
 	}
 }
 #endif
 
-static void __devinit reload_eeprom(long ioaddr)
+/*
+ * Loads bytes 0x00-0x05, 0x6E-0x6F, 0x78-0x7B from EEPROM
+ * (plus 0x6C for Rhine-I/II)
+ */
+static void __devinit rhine_reload_eeprom(long pioaddr, struct net_device *dev)
 {
-	int i;
-	outb(0x20, ioaddr + MACRegEEcsr);
-	/* Typically 2 cycles to reload. */
-	for (i = 0; i < 150; i++)
-		if (! (inb(ioaddr + MACRegEEcsr) & 0x20))
-			break;
+	long ioaddr = dev->base_addr;
+	struct rhine_private *rp = netdev_priv(dev);
+
+	outb(0x20, pioaddr + MACRegEEcsr);
+	RHINE_WAIT_FOR(!(inb(pioaddr + MACRegEEcsr) & 0x20));
+
+#ifdef USE_MMIO
+	/*
+	 * Reloading from EEPROM overwrites ConfigA-D, so we must re-enable
+	 * MMIO. If reloading EEPROM was done first this could be avoided, but
+	 * it is not known if that still works with the "win98-reboot" problem.
+	 */
+	enable_mmio(pioaddr, rp->quirks);
+#endif
+
+	/* Turn off EEPROM-controlled wake-up (magic packet) */
+	if (rp->quirks & rqWOL)
+		writeb(readb(ioaddr + ConfigA) & 0xFE, ioaddr + ConfigA);
+
 }
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
@@ -623,21 +682,34 @@
 }
 #endif
 
+static void rhine_hw_init(struct net_device *dev, long pioaddr)
+{
+	struct rhine_private *rp = netdev_priv(dev);
+
+	/* Reset the chip to erase previous misconfiguration. */
+	rhine_chip_reset(dev);
+
+	/* Rhine-I needs extra time to recuperate before EEPROM reload */
+	if (rp->quirks & rqRhineI)
+		msleep(5);
+
+	/* Reload EEPROM controlled bytes cleared by soft reset */
+	rhine_reload_eeprom(pioaddr, dev);
+}
+
 static int __devinit rhine_init_one(struct pci_dev *pdev,
 				    const struct pci_device_id *ent)
 {
 	struct net_device *dev;
 	struct rhine_private *rp;
-	int i, option;
-	int chip_id = (int) ent->driver_data;
-	static int card_idx = -1;
-	long ioaddr;
+	int i, rc;
+	u8 pci_rev;
+	u32 quirks;
+	long pioaddr;
 	long memaddr;
-	int io_size;
-	int pci_flags;
-#ifdef USE_MMIO
-	long ioaddr0;
-#endif
+	long ioaddr;
+	int io_size, phy_id;
+	const char *name, *mname;
 
 /* when built into the kernel, we only print version if device is found */
 #ifndef MODULE
@@ -646,16 +718,57 @@
 		printk(version);
 #endif
 
-	card_idx++;
-	option = card_idx < MAX_UNITS ? options[card_idx] : 0;
-	io_size = rhine_chip_info[chip_id].io_size;
-	pci_flags = rhine_chip_info[chip_id].pci_flags;
+	pci_read_config_byte(pdev, PCI_REVISION_ID, &pci_rev);
+
+	io_size = 256;
+	phy_id = 0;
+	quirks = 0;
+	name = "Rhine";
+	mname = "unknown";
+	if (pci_rev < VTunknown0) {
+		quirks = rqRhineI;
+		io_size = 128;
+		mname = "VT86C100A";
+	}
+	else if (pci_rev >= VT6102) {
+		quirks = rqWOL | rqForceReset;
+		if (pci_rev < VT6105) {
+			name = "Rhine II";
+			quirks |= rqStatusWBRace;	/* Rhine-II exclusive */
+			if (pci_rev < VT8231)
+				mname = "VT6102";
+			else if (pci_rev < VT8233)
+				mname = "VT8231";
+			else if (pci_rev < VT8235)
+				mname = "VT8233";
+			else if (pci_rev < VT8237)
+				mname = "VT8235";
+			else if (pci_rev < VTunknown1)
+				mname = "VT8237";
+		}
+		else {
+			name = "Rhine III";
+			phy_id = 1;	/* Integrated PHY, phy_id fixed to 1 */
+			if (pci_rev >= VT6105_B0)
+				quirks |= rq6patterns;
+			if (pci_rev < VT6105L)
+				mname = "VT6105";
+			else if (pci_rev < VT6107)
+				mname = "VT6105L";
+			else if (pci_rev < VT6105M)
+				mname = "VT6107";
+			else if (pci_rev >= VT6105M)
+				mname = "Management Adapter VT6105M";
+		}
+	}
 
-	if (pci_enable_device(pdev))
+	rc = pci_enable_device(pdev);
+	if (rc)
 		goto err_out;
 
 	/* this should always be supported */
-	if (pci_set_dma_mask(pdev, 0xffffffff)) {
+	rc = pci_set_dma_mask(pdev, 0xffffffff);
+	if (rc) {
 		printk(KERN_ERR "32-bit PCI DMA addresses not supported by "
 		       "the card!?\n");
 		goto err_out;
@@ -664,34 +777,35 @@
 	/* sanity check */
 	if ((pci_resource_len(pdev, 0) < io_size) ||
 	    (pci_resource_len(pdev, 1) < io_size)) {
+		rc = -EIO;
 		printk(KERN_ERR "Insufficient PCI resources, aborting\n");
 		goto err_out;
 	}
 
-	ioaddr = pci_resource_start(pdev, 0);
+	pioaddr = pci_resource_start(pdev, 0);
 	memaddr = pci_resource_start(pdev, 1);
 
-	if (pci_flags & PCI_USES_MASTER)
-		pci_set_master(pdev);
+	pci_set_master(pdev);
 
-	dev = alloc_etherdev(sizeof(*rp));
-	if (dev == NULL) {
-		printk(KERN_ERR "init_ethernet failed for card #%d\n",
-		       card_idx);
+	dev = alloc_etherdev(sizeof(struct rhine_private));
+	if (!dev) {
+		rc = -ENOMEM;
+		printk(KERN_ERR "alloc_etherdev failed\n");
 		goto err_out;
 	}
 	SET_MODULE_OWNER(dev);
 	SET_NETDEV_DEV(dev, &pdev->dev);
 
-	if (pci_request_regions(pdev, shortname))
+	rc = pci_request_regions(pdev, DRV_NAME);
+	if (rc)
 		goto err_out_free_netdev;
 
 #ifdef USE_MMIO
-	ioaddr0 = ioaddr;
-	enable_mmio(ioaddr0, chip_id);
+	enable_mmio(pioaddr, quirks);
 
 	ioaddr = (long) ioremap(memaddr, io_size);
 	if (!ioaddr) {
+		rc = -EIO;
 		printk(KERN_ERR "ioremap failed for device %s, region 0x%X "
 		       "@ 0x%lX\n", pci_name(pdev), io_size, memaddr);
 		goto err_out_free_res;
@@ -701,79 +815,43 @@
 	i = 0;
 	while (mmio_verify_registers[i]) {
 		int reg = mmio_verify_registers[i++];
-		unsigned char a = inb(ioaddr0+reg);
+		unsigned char a = inb(pioaddr+reg);
 		unsigned char b = readb(ioaddr+reg);
 		if (a != b) {
+			rc = -EIO;
 			printk(KERN_ERR "MMIO do not match PIO [%02x] "
 			       "(%02x != %02x)\n", reg, a, b);
 			goto err_out_unmap;
 		}
 	}
+#else
+	ioaddr = pioaddr;
 #endif /* USE_MMIO */
 
-	/* D-Link provided reset code (with comment additions) */
-	if (rhine_chip_info[chip_id].drv_flags & HasWOL) {
-		unsigned char byOrgValue;
-
-		/* clear sticky bit before reset & read ethernet address */
-		byOrgValue = readb(ioaddr + StickyHW);
-		byOrgValue = byOrgValue & 0xFC;
-		writeb(byOrgValue, ioaddr + StickyHW);
-
-		/* (bits written are cleared?) */
-		/* disable force PME-enable */
-		writeb(0x80, ioaddr + WOLcgClr);
-		/* disable power-event config bit */
-		writeb(0xFF, ioaddr + WOLcrClr);
-		/* clear power status (undocumented in vt6102 docs?) */
-		writeb(0xFF, ioaddr + PwrcsrClr);
-	}
-
-	/* Reset the chip to erase previous misconfiguration. */
-	writew(CmdReset, ioaddr + ChipCmd);
-
 	dev->base_addr = ioaddr;
-	wait_for_reset(dev, chip_id, shortname);
+	rp = netdev_priv(dev);
+	rp->quirks = quirks;
 
-	/* Reload the station address from the EEPROM. */
-#ifdef USE_MMIO
-	reload_eeprom(ioaddr0);
-	/* Reloading from eeprom overwrites cfgA-D, so we must re-enable MMIO.
-	   If reload_eeprom() was done first this could be avoided, but it is
-	   not known if that still works with the "win98-reboot" problem. */
-	enable_mmio(ioaddr0, chip_id);
-#else
-	reload_eeprom(ioaddr);
-#endif
+	/* Get chip registers into a sane state */
+	rhine_power_init(dev);
+	rhine_hw_init(dev, pioaddr);
 
 	for (i = 0; i < 6; i++)
 		dev->dev_addr[i] = readb(ioaddr + StationAddr + i);
 
 	if (!is_valid_ether_addr(dev->dev_addr)) {
-		printk(KERN_ERR "Invalid MAC address for card #%d\n", card_idx);
+		rc = -EIO;
+		printk(KERN_ERR "Invalid MAC address\n");
 		goto err_out_unmap;
 	}
 
-	if (chip_id == VT6102) {
-		/*
-		 * for 3065D, EEPROM reloaded will cause bit 0 in MAC_REG_CFGA
-		 * turned on. it makes MAC receive magic packet
-		 * automatically. So, we turn it off. (D-Link)
-		 */
-		writeb(readb(ioaddr + ConfigA) & 0xFE, ioaddr + ConfigA);
-	}
-
-	/* Select backoff algorithm */
-	if (backoff)
-		writeb(readb(ioaddr + ConfigD) & (0xF0 | backoff),
-		       ioaddr + ConfigD);
+	/* For Rhine-I/II, phy_id is loaded from EEPROM */
+	if (!phy_id)
+		phy_id = readb(ioaddr + 0x6C);
 
 	dev->irq = pdev->irq;
 
-	rp = netdev_priv(dev);
 	spin_lock_init(&rp->lock);
-	rp->chip_id = chip_id;
-	rp->drv_flags = rhine_chip_info[chip_id].drv_flags;
 	rp->pdev = pdev;
 	rp->mii_if.dev = dev;
 	rp->mii_if.mdio_read = mdio_read;
@@ -781,9 +859,6 @@
 	rp->mii_if.phy_id_mask = 0x1f;
 	rp->mii_if.reg_num_mask = 0x1f;
 
-	if (dev->mem_start)
-		option = dev->mem_start;
-
 	/* The chip-specific entries in the device structure. */
 	dev->open = rhine_open;
 	dev->hard_start_xmit = rhine_start_tx;
@@ -797,32 +872,22 @@
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	dev->poll_controller = rhine_poll;
 #endif
-	if (rp->drv_flags & ReqTxAlign)
+	if (rp->quirks & rqRhineI)
 		dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM;
 
 	/* dev->name not defined before register_netdev()! */
-	i = register_netdev(dev);
-	if (i)
+	rc = register_netdev(dev);
+	if (rc)
 		goto err_out_unmap;
 
-	/* The lower four bits are the media type. */
-	if (option > 0) {
-		if (option & 0x220)
-			rp->mii_if.full_duplex = 1;
-		rp->default_port = option & 15;
-	}
-	if (card_idx < MAX_UNITS && full_duplex[card_idx] > 0)
-		rp->mii_if.full_duplex = 1;
-
-	if (rp->mii_if.full_duplex) {
-		printk(KERN_INFO "%s: Set to forced full duplex, "
-		       "autonegotiation disabled.\n", dev->name);
-		rp->mii_if.force_media = 1;
-	}
-
-	printk(KERN_INFO "%s: %s at 0x%lx, ",
-	       dev->name, rhine_chip_info[chip_id].name,
-	       (pci_flags & PCI_USES_IO) ? ioaddr : memaddr);
+	printk(KERN_INFO "%s: VIA %s (%s) at 0x%lx, ",
+	       dev->name, name, mname,
+#ifdef USE_MMIO
+		memaddr
+#else
+		ioaddr
+#endif
+		 );
 
 	for (i = 0; i < 5; i++)
 		printk("%2.2x:", dev->dev_addr[i]);
@@ -830,51 +895,25 @@
 
 	pci_set_drvdata(pdev, dev);
 
-	if (rp->drv_flags & CanHaveMII) {
-		int phy, phy_idx = 0;
-		rp->phys[0] = 1;		/* Standard for this chip. */
-		for (phy = 1; phy < 32 && phy_idx < MAX_MII_CNT; phy++) {
-			int mii_status = mdio_read(dev, phy, 1);
-			if (mii_status != 0xffff && mii_status != 0x0000) {
-				rp->phys[phy_idx++] = phy;
-				rp->mii_if.advertising = mdio_read(dev, phy, 4);
-				printk(KERN_INFO "%s: MII PHY found at address "
-				       "%d, status 0x%4.4x advertising %4.4x "
-				       "Link %4.4x.\n", dev->name, phy,
-				       mii_status, rp->mii_if.advertising,
-				       mdio_read(dev, phy, 5));
-
-				/* set IFF_RUNNING */
-				if (mii_status & BMSR_LSTATUS)
-					netif_carrier_on(dev);
-				else
-					netif_carrier_off(dev);
-
-				break;
-			}
-		}
-		rp->mii_cnt = phy_idx;
-		rp->mii_if.phy_id = rp->phys[0];
-	}
+	{
+		int mii_status = mdio_read(dev, phy_id, 1);
+		if (mii_status != 0xffff && mii_status != 0x0000) {
+			rp->mii_if.advertising = mdio_read(dev, phy_id, 4);
+			printk(KERN_INFO "%s: MII PHY found at address "
+			       "%d, status 0x%4.4x advertising %4.4x "
+			       "Link %4.4x.\n", dev->name, phy_id,
+			       mii_status, rp->mii_if.advertising,
+			       mdio_read(dev, phy_id, 5));
+
+			/* set IFF_RUNNING */
+			if (mii_status & BMSR_LSTATUS)
+				netif_carrier_on(dev);
+			else
+				netif_carrier_off(dev);
 
-	/* Allow forcing the media type. */
-	if (option > 0) {
-		if (option & 0x220)
-			rp->mii_if.full_duplex = 1;
-		rp->default_port = option & 0x3ff;
-		if (option & 0x330) {
-			/* FIXME: shouldn't someone check this variable? */
-			/* rp->medialock = 1; */
-			printk(KERN_INFO " Forcing %dMbs %s-duplex "
-				"operation.\n",
-			       (option & 0x300 ? 100 : 10),
-			       (option & 0x220 ? "full" : "half"));
-			if (rp->mii_cnt)
-				mdio_write(dev, rp->phys[0], MII_BMCR,
-					   ((option & 0x300) ? 0x2000 : 0) | /* 100mbps? */
-					   ((option & 0x220) ? 0x0100 : 0)); /* Full duplex? */
 		}
 	}
+	rp->mii_if.phy_id = phy_id;
 
 	return 0;
 
@@ -887,7 +926,7 @@
 err_out_free_netdev:
 	free_netdev(dev);
 err_out:
-	return -ENODEV;
+	return rc;
 }
 
 static int alloc_ring(struct net_device* dev)
@@ -904,7 +943,7 @@
 		printk(KERN_ERR "Could not allocate DMA memory.\n");
 		return -ENOMEM;
 	}
-	if (rp->drv_flags & ReqTxAlign) {
+	if (rp->quirks & rqRhineI) {
 		rp->tx_bufs = pci_alloc_consistent(rp->pdev,
 						   PKT_BUF_SZ * TX_RING_SIZE,
 						   &rp->tx_bufs_dma);
@@ -1046,6 +1085,21 @@
 	}
 }
 
+static void rhine_check_media(struct net_device *dev, unsigned int init_media)
+{
+	struct rhine_private *rp = netdev_priv(dev);
+	long ioaddr = dev->base_addr;
+
+	mii_check_media(&rp->mii_if, debug, init_media);
+
+	if (rp->mii_if.full_duplex)
+	    writeb(readb(ioaddr + ChipCmd1) | Cmd1FDuplex,
+		   ioaddr + ChipCmd1);
+	else
+	    writeb(readb(ioaddr + ChipCmd1) & ~Cmd1FDuplex,
+		   ioaddr + ChipCmd1);
+}
+
 static void init_registers(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
@@ -1061,10 +1115,6 @@
 	writeb(0x20, ioaddr + TxConfig);
 	rp->tx_thresh = 0x20;
 	rp->rx_thresh = 0x60;		/* Written in rhine_set_rx_mode(). */
-	rp->mii_if.full_duplex = 0;
-
-	if (dev->if_port == 0)
-		dev->if_port = rp->default_port;
 
 	writel(rp->rx_ring_dma, ioaddr + RxRingPtr);
 	writel(rp->tx_ring_dma, ioaddr + TxRingPtr);
@@ -1078,18 +1128,44 @@
 	       IntrPCIErr | IntrStatsMax | IntrLinkChange,
 	       ioaddr + IntrEnable);
 
-	rp->chip_cmd = CmdStart|CmdTxOn|CmdRxOn|CmdNoTxPoll;
-	if (rp->mii_if.force_media)
-		rp->chip_cmd |= CmdFDuplex;
-	writew(rp->chip_cmd, ioaddr + ChipCmd);
-
-	rhine_check_duplex(dev);
-
-	/* The LED outputs of various MII xcvrs should be configured. */
-	/* For NS or Mison phys, turn on bit 1 in register 0x17 */
-	/* For ESI phys, turn on bit 7 in register 0x17. */
-	mdio_write(dev, rp->phys[0], 0x17, mdio_read(dev, rp->phys[0], 0x17) |
-		   (rp->drv_flags & HasESIPhy) ? 0x0080 : 0x0001);
+	writew(CmdStart | CmdTxOn | CmdRxOn | (Cmd1NoTxPoll << 8),
+	       ioaddr + ChipCmd);
+	rhine_check_media(dev, 1);
+}
+
+/* Enable MII link status auto-polling (required for IntrLinkChange) */
+static void rhine_enable_linkmon(long ioaddr)
+{
+	writeb(0, ioaddr + MIICmd);
+	writeb(MII_BMSR, ioaddr + MIIRegAddr);
+	writeb(0x80, ioaddr + MIICmd);
+
+	RHINE_WAIT_FOR((readb(ioaddr + MIIRegAddr) & 0x20));
+
+	writeb(MII_BMSR | 0x40, ioaddr + MIIRegAddr);
+}
+
+/* Disable MII link status auto-polling (required for MDIO access) */
+static void rhine_disable_linkmon(long ioaddr, u32 quirks)
+{
+	writeb(0, ioaddr + MIICmd);
+
+	if (quirks & rqRhineI) {
+		writeb(0x01, ioaddr + MIIRegAddr);	// MII_BMSR
+
+		/* Can be called from ISR. Evil. */
+		mdelay(1);
+
+		/* 0x80 must be set immediately before turning it off */
+		writeb(0x80, ioaddr + MIICmd);
+
+		RHINE_WAIT_FOR(readb(ioaddr + MIIRegAddr) & 0x20);
+
+		/* Heh. Now clear 0x80 again. */
+		writeb(0, ioaddr + MIICmd);
+	}
+	else
+		RHINE_WAIT_FOR(readb(ioaddr + MIIRegAddr) & 0x80);
 }
 
 /* Read and write over the MII Management Data I/O (MDIO) interface. */
@@ -1097,156 +1173,72 @@
 static int mdio_read(struct net_device *dev, int phy_id, int regnum)
 {
 	long ioaddr = dev->base_addr;
-	int boguscnt = 1024;
+	struct rhine_private *rp = netdev_priv(dev);
+	int result;
+
+	rhine_disable_linkmon(ioaddr, rp->quirks);
 
-	/* Wait for a previous command to complete. */
-	while ((readb(ioaddr + MIICmd) & 0x60) && --boguscnt > 0)
-		;
-	writeb(0x00, ioaddr + MIICmd);
+	writeb(0, ioaddr + MIICmd);
 	writeb(phy_id, ioaddr + MIIPhyAddr);
 	writeb(regnum, ioaddr + MIIRegAddr);
 	writeb(0x40, ioaddr + MIICmd);		/* Trigger read */
-	boguscnt = 1024;
-	while ((readb(ioaddr + MIICmd) & 0x40) && --boguscnt > 0)
-		;
-	return readw(ioaddr + MIIData);
+	RHINE_WAIT_FOR(!(readb(ioaddr + MIICmd) & 0x40));
+	result = readw(ioaddr + MIIData);
+
+	rhine_enable_linkmon(ioaddr);
+	return result;
 }
 
 static void mdio_write(struct net_device *dev, int phy_id, int regnum, int value)
 {
 	struct rhine_private *rp = netdev_priv(dev);
 	long ioaddr = dev->base_addr;
-	int boguscnt = 1024;
 
-	if (phy_id == rp->phys[0]) {
-		switch (regnum) {
-		case MII_BMCR:		/* Is user forcing speed/duplex? */
-			if (value & 0x9000)	/* Autonegotiation. */
-				rp->mii_if.force_media = 0;
-			else
-				rp->mii_if.full_duplex = (value & 0x0100) ? 1 : 0;
-			break;
-		case MII_ADVERTISE:
-			rp->mii_if.advertising = value;
-			break;
-		}
-	}
+	rhine_disable_linkmon(ioaddr, rp->quirks);
 
-	/* Wait for a previous command to complete. */
-	while ((readb(ioaddr + MIICmd) & 0x60) && --boguscnt > 0)
-		;
-	writeb(0x00, ioaddr + MIICmd);
+	writeb(0, ioaddr + MIICmd);
 	writeb(phy_id, ioaddr + MIIPhyAddr);
 	writeb(regnum, ioaddr + MIIRegAddr);
 	writew(value, ioaddr + MIIData);
-	writeb(0x20, ioaddr + MIICmd);		/* Trigger write. */
-}
+	writeb(0x20, ioaddr + MIICmd);		/* Trigger write */
+	RHINE_WAIT_FOR(!(readb(ioaddr + MIICmd) & 0x20));
 
+	rhine_enable_linkmon(ioaddr);
+}
 
 static int rhine_open(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
 	long ioaddr = dev->base_addr;
-	int i;
-
-	/* Reset the chip. */
-	writew(CmdReset, ioaddr + ChipCmd);
+	int rc;
 
-	i = request_irq(rp->pdev->irq, &rhine_interrupt, SA_SHIRQ, dev->name,
+	rc = request_irq(rp->pdev->irq, &rhine_interrupt, SA_SHIRQ, dev->name,
 			dev);
-	if (i)
-		return i;
+	if (rc)
+		return rc;
 
 	if (debug > 1)
 		printk(KERN_DEBUG "%s: rhine_open() irq %d.\n",
 		       dev->name, rp->pdev->irq);
 
-	i = alloc_ring(dev);
-	if (i)
-		return i;
+	rc = alloc_ring(dev);
+	if (rc)
+		return rc;
 	alloc_rbufs(dev);
 	alloc_tbufs(dev);
-	wait_for_reset(dev, rp->chip_id, dev->name);
+	rhine_chip_reset(dev);
 	init_registers(dev);
 	if (debug > 2)
 		printk(KERN_DEBUG "%s: Done rhine_open(), status %4.4x "
 		       "MII status: %4.4x.\n",
 		       dev->name, readw(ioaddr + ChipCmd),
-		       mdio_read(dev, rp->phys[0], MII_BMSR));
+		       mdio_read(dev, rp->mii_if.phy_id, MII_BMSR));
 
 	netif_start_queue(dev);
 
-	/* Set the timer to check for link beat. */
-	init_timer(&rp->timer);
-	rp->timer.expires = jiffies + 2 * HZ/100;
-	rp->timer.data = (unsigned long)dev;
-	rp->timer.function = &rhine_timer;		/* timer handler */
-	add_timer(&rp->timer);
-
 	return 0;
 }
 
-static void rhine_check_duplex(struct net_device *dev)
-{
-	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
-	int mii_lpa = mdio_read(dev, rp->phys[0], MII_LPA);
-	int negotiated = mii_lpa & rp->mii_if.advertising;
-	int duplex;
-
-	if (rp->mii_if.force_media || mii_lpa == 0xffff)
-		return;
-	duplex = (negotiated & 0x0100) || (negotiated & 0x01C0) == 0x0040;
-	if (rp->mii_if.full_duplex != duplex) {
-		rp->mii_if.full_duplex = duplex;
-		if (debug)
-			printk(KERN_INFO "%s: Setting %s-duplex based on "
-			       "MII #%d link partner capability of %4.4x.\n",
-			       dev->name, duplex ? "full" : "half",
-			       rp->phys[0], mii_lpa);
-		if (duplex)
-			rp->chip_cmd |= CmdFDuplex;
-		else
-			rp->chip_cmd &= ~CmdFDuplex;
-		writew(rp->chip_cmd, ioaddr + ChipCmd);
-	}
-}
-
-
-static void rhine_timer(unsigned long data)
-{
-	struct net_device *dev = (struct net_device *)data;
-	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
-	int next_tick = 10*HZ;
-	int mii_status;
-
-	if (debug > 3) {
-		printk(KERN_DEBUG "%s: VIA Rhine monitor tick, status %4.4x.\n",
-		       dev->name, readw(ioaddr + IntrStatus));
-	}
-
-	spin_lock_irq (&rp->lock);
-
-	rhine_check_duplex(dev);
-
-	/* make IFF_RUNNING follow the MII status bit "Link established" */
-	mii_status = mdio_read(dev, rp->phys[0], MII_BMSR);
-	if ((mii_status & BMSR_LSTATUS) != (rp->mii_status & BMSR_LSTATUS)) {
-		if (mii_status & BMSR_LSTATUS)
-			netif_carrier_on(dev);
-		else
-			netif_carrier_off(dev);
-	}
-	rp->mii_status = mii_status;
-
-	spin_unlock_irq(&rp->lock);
-
-	rp->timer.expires = jiffies + next_tick;
-	add_timer(&rp->timer);
-}
-
-
 static void rhine_tx_timeout(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
@@ -1255,18 +1247,13 @@
 	printk(KERN_WARNING "%s: Transmit timed out, status %4.4x, PHY status "
 	       "%4.4x, resetting...\n",
 	       dev->name, readw(ioaddr + IntrStatus),
-	       mdio_read(dev, rp->phys[0], MII_BMSR));
-
-	dev->if_port = 0;
+	       mdio_read(dev, rp->mii_if.phy_id, MII_BMSR));
 
 	/* protect against concurrent rx interrupts */
 	disable_irq(rp->pdev->irq);
 
 	spin_lock(&rp->lock);
 
-	/* Reset the chip. */
-	writew(CmdReset, ioaddr + ChipCmd);
-
 	/* clear all descriptors */
 	free_tbufs(dev);
 	free_rbufs(dev);
@@ -1274,7 +1261,7 @@
 	alloc_rbufs(dev);
 
 	/* Reinitialize the hardware. */
-	wait_for_reset(dev, rp->chip_id, dev->name);
+	rhine_chip_reset(dev);
 	init_registers(dev);
 
 	spin_unlock(&rp->lock);
@@ -1288,8 +1275,8 @@
 static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
+	long ioaddr = dev->base_addr;
 	unsigned entry;
-	u32 intr_status;
 
 	/* Caution: the write order is important here, set the field
 	   with the "ownership" bits last. */
@@ -1305,7 +1292,7 @@
 
 	rp->tx_skbuff[entry] = skb;
 
-	if ((rp->drv_flags & ReqTxAlign) &&
+	if ((rp->quirks & rqRhineI) &&
 	    (((long)skb->data & 3) || skb_shinfo(skb)->nr_frags != 0 || skb->ip_summed == CHECKSUM_HW)) {
 		/* Must use alignment buffer. */
 		if (skb->len > PKT_BUF_SZ) {
@@ -1340,14 +1327,9 @@
 
 	/* Non-x86 Todo: explicitly flush cache lines here. */
 
-	/*
-	 * Wake the potentially-idle transmit channel unless errors are
-	 * pending (the ISR must sort them out first).
-	 */
-	intr_status = get_intr_status(dev);
-	if ((intr_status & IntrTxErrSummary) == 0) {
-		writew(CmdTxDemand | rp->chip_cmd, dev->base_addr + ChipCmd);
-	}
+	/* Wake the potentially-idle transmit channel */
+	writeb(readb(ioaddr + ChipCmd1) | Cmd1TxDemand,
+	       ioaddr + ChipCmd1);
 	IOSYNC;
 
 	if (rp->cur_tx == rp->dirty_tx + TX_QUEUE_LEN)
@@ -1395,11 +1377,10 @@
 
 		if (intr_status & (IntrTxErrSummary | IntrTxDone)) {
 			if (intr_status & IntrTxErrSummary) {
-				int cnt = 20;
 				/* Avoid scavenging before Tx engine turned off */
-				while ((readw(ioaddr+ChipCmd) & CmdTxOn) && --cnt)
-					udelay(5);
-				if (debug > 2 && !cnt)
+				RHINE_WAIT_FOR(!(readb(ioaddr+ChipCmd) & CmdTxOn));
+				if (debug > 2 &&
+				    readb(ioaddr+ChipCmd) & CmdTxOn)
 					printk(KERN_WARNING "%s: "
 					       "rhine_interrupt() Tx engine"
 					       "still on.\n", dev->name);
@@ -1454,7 +1435,7 @@
 			if (txstatus & 0x0200) rp->stats.tx_window_errors++;
 			if (txstatus & 0x0100) rp->stats.tx_aborted_errors++;
 			if (txstatus & 0x0080) rp->stats.tx_heartbeat_errors++;
-			if (((rp->chip_id == VT86C100A) && txstatus & 0x0002) ||
+			if (((rp->quirks & rqRhineI) && txstatus & 0x0002) ||
 			    (txstatus & 0x0800) || (txstatus & 0x1000)) {
 				rp->stats.tx_fifo_errors++;
 				rp->tx_ring[entry].tx_status = cpu_to_le32(DescOwn);
@@ -1462,7 +1443,7 @@
 			}
 			/* Transmitter restarted in 'abnormal' handler. */
 		} else {
-			if (rp->chip_id == VT86C100A)
+			if (rp->quirks & rqRhineI)
 				rp->stats.collisions += (txstatus >> 3) & 0x0F;
 			else
 				rp->stats.collisions += txstatus & 0x0F;
@@ -1559,19 +1540,10 @@
 							    rp->rx_buf_sz,
 							    PCI_DMA_FROMDEVICE);
 
-				/* *_IP_COPYSUM isn't defined anywhere and
-				   eth_copy_and_sum is memcpy for all archs so
-				   this is kind of pointless right now
-				   ... or? */
-#if HAS_IP_COPYSUM		/* Call copy + cksum if available. */
 				eth_copy_and_sum(skb,
 						 rp->rx_skbuff[entry]->tail,
 						 pkt_len, 0);
 				skb_put(skb, pkt_len);
-#else
-				memcpy(skb_put(skb, pkt_len),
-				       rp->rx_skbuff[entry]->tail, pkt_len);
-#endif
 				pci_dma_sync_single_for_device(rp->pdev,
 							       rp->rx_skbuff_dma[entry],
 							       rp->rx_buf_sz,
@@ -1619,10 +1591,6 @@
 		}
 		rp->rx_ring[entry].rx_status = cpu_to_le32(DescOwn);
 	}
-
-	/* Pre-emptively restart Rx engine. */
-	writew(readw(dev->base_addr + ChipCmd) | CmdRxOn | CmdRxDemand,
-	       dev->base_addr + ChipCmd);
 }
 
 /*
@@ -1656,7 +1624,10 @@
 		writel(rp->tx_ring_dma + entry * sizeof(struct tx_desc),
 		       ioaddr + TxRingPtr);
 
-		writew(CmdTxDemand | rp->chip_cmd, ioaddr + ChipCmd);
+		writeb(readb(ioaddr + ChipCmd) | CmdTxOn,
+		       ioaddr + ChipCmd);
+		writeb(readb(ioaddr + ChipCmd1) | Cmd1TxDemand,
+		       ioaddr + ChipCmd1);
 		IOSYNC;
 	}
 	else {
@@ -1676,20 +1647,8 @@
 
 	spin_lock(&rp->lock);
 
-	if (intr_status & (IntrLinkChange)) {
-		if (readb(ioaddr + MIIStatus) & 0x02) {
-			/* Link failed, restart autonegotiation. */
-			if (rp->drv_flags & HasDavicomPhy)
-				mdio_write(dev, rp->phys[0], MII_BMCR, 0x3300);
-		} else
-			rhine_check_duplex(dev);
-		if (debug)
-			printk(KERN_ERR "%s: MII status changed: "
-			       "Autonegotiation advertising %4.4x partner "
-			       "%4.4x.\n", dev->name,
-			       mdio_read(dev, rp->phys[0], MII_ADVERTISE),
-			       mdio_read(dev, rp->phys[0], MII_LPA));
-	}
+	if (intr_status & IntrLinkChange)
+		rhine_check_media(dev, 0);
 	if (intr_status & IntrStatsMax) {
 		rp->stats.rx_crc_errors += readw(ioaddr + RxCRCErrs);
 		rp->stats.rx_missed_errors += readw(ioaddr + RxMissed);
@@ -1782,7 +1741,7 @@
 		     i++, mclist = mclist->next) {
 			int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
 
-			mc_filter[bit_nr >> 5] |= cpu_to_le32(1 << (bit_nr & 31));
+			mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
 		}
 		writel(mc_filter[0], ioaddr + MulticastFilter0);
 		writel(mc_filter[1], ioaddr + MulticastFilter1);
@@ -1805,9 +1764,6 @@
 	struct rhine_private *rp = netdev_priv(dev);
 	int rc;
 
-	if (!(rp->drv_flags & CanHaveMII))
-		return -EINVAL;
-
 	spin_lock_irq(&rp->lock);
 	rc = mii_ethtool_gset(&rp->mii_if, cmd);
 	spin_unlock_irq(&rp->lock);
@@ -1820,9 +1776,6 @@
 	struct rhine_private *rp = netdev_priv(dev);
 	int rc;
 
-	if (!(rp->drv_flags & CanHaveMII))
-		return -EINVAL;
-
 	spin_lock_irq(&rp->lock);
 	rc = mii_ethtool_sset(&rp->mii_if, cmd);
 	spin_unlock_irq(&rp->lock);
@@ -1834,9 +1787,6 @@
 {
 	struct rhine_private *rp = netdev_priv(dev);
 
-	if (!(rp->drv_flags & CanHaveMII))
-		return -EINVAL;
-
 	return mii_nway_restart(&rp->mii_if);
 }
 
@@ -1844,9 +1794,6 @@
 {
 	struct rhine_private *rp = netdev_priv(dev);
 
-	if (!(rp->drv_flags & CanHaveMII))
-		return 0;	/* -EINVAL */
-
 	return mii_link_ok(&rp->mii_if);
 }
 
@@ -1860,6 +1807,39 @@
 	debug = value;
 }
 
+static void rhine_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
+{
+	struct rhine_private *rp = netdev_priv(dev);
+
+	if (!(rp->quirks & rqWOL))
+		return;
+
+	spin_lock_irq(&rp->lock);
+	wol->supported = WAKE_PHY | WAKE_MAGIC |
+			 WAKE_UCAST | WAKE_MCAST | WAKE_BCAST;	/* Untested */
+	wol->wolopts = rp->wolopts;
+	spin_unlock_irq(&rp->lock);
+}
+
+static int rhine_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
+{
+	struct rhine_private *rp = netdev_priv(dev);
+	u32 support = WAKE_PHY | WAKE_MAGIC |
+		      WAKE_UCAST | WAKE_MCAST | WAKE_BCAST;	/* Untested */
+
+	if (!(rp->quirks & rqWOL))
+		return -EINVAL;
+
+	if (wol->wolopts & ~support)
+		return -EINVAL;
+
+	spin_lock_irq(&rp->lock);
+	rp->wolopts = wol->wolopts;
+	spin_unlock_irq(&rp->lock);
+
+	return 0;
+}
+
 static struct ethtool_ops netdev_ethtool_ops = {
 	.get_drvinfo		= netdev_get_drvinfo,
 	.get_settings		= netdev_get_settings,
@@ -1868,6 +1848,8 @@
 	.get_link		= netdev_get_link,
 	.get_msglevel		= netdev_get_msglevel,
 	.set_msglevel		= netdev_set_msglevel,
+	.get_wol		= rhine_get_wol,
+	.set_wol		= rhine_set_wol,
 	.get_sg			= ethtool_op_get_sg,
 	.get_tx_csum		= ethtool_op_get_tx_csum,
 };
@@ -1892,8 +1874,6 @@
 	long ioaddr = dev->base_addr;
 	struct rhine_private *rp = netdev_priv(dev);
 
-	del_timer_sync(&rp->timer);
-
 	spin_lock_irq(&rp->lock);
 
 	netif_stop_queue(dev);
@@ -1940,12 +1920,51 @@
 	pci_set_drvdata(pdev, NULL);
 }
 
+static void rhine_shutdown (struct device *gendev)
+{
+	struct pci_dev *pdev = to_pci_dev(gendev);
+	struct net_device *dev = pci_get_drvdata(pdev);
+	struct rhine_private *rp = netdev_priv(dev);
+
+	long ioaddr = dev->base_addr;
+
+	rhine_power_init(dev);
+
+	/* Make sure we use pattern 0, 1 and not 4, 5 */
+	if (rp->quirks & rq6patterns)
+		writeb(0x04, ioaddr + 0xA7);
+
+	if (rp->wolopts & WAKE_MAGIC)
+		writeb(WOLmagic, ioaddr + WOLcrSet);
+
+	if (rp->wolopts & (WAKE_BCAST|WAKE_MCAST))
+		writeb(WOLbmcast, ioaddr + WOLcgSet);
+
+	if (rp->wolopts & WAKE_PHY)
+		writeb(WOLlnkon | WOLlnkoff, ioaddr + WOLcrSet);
+
+	if (rp->wolopts & WAKE_UCAST)
+		writeb(WOLucast, ioaddr + WOLcrSet);
+
+	/* Enable legacy WOL (for old motherboards) */
+	writeb(0x01, ioaddr + PwcfgSet);
+	writeb(readb(ioaddr + StickyHW) | 0x04, ioaddr + StickyHW);
+
+	/* Hit power state D3 (sleep) */
+	writeb(readb(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
+
+	/* TODO: Check use of pci_enable_wake() */
+
+}
 
 static struct pci_driver rhine_driver = {
-	.name		= "via-rhine",
+	.name		= DRV_NAME,
 	.id_table	= rhine_pci_tbl,
 	.probe		= rhine_init_one,
 	.remove		= __devexit_p(rhine_remove_one),
+	.driver = {
+		.shutdown = rhine_shutdown,
+	}
 };
 
 
--- diff/drivers/net/wan/Kconfig	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wan/Kconfig	2004-07-01 21:32:39.000000000 +0100
@@ -248,7 +248,7 @@
 
 config WANXL_BUILD_FIRMWARE
 	bool "rebuild wanXL firmware"
-	depends on WANXL
+	depends on WANXL && !PREVENT_FIRMWARE_BUILD
 	help
 	  Allows you to rebuild firmware run by the QUICC processor.
 	  It requires as68k, ld68k and hexdump programs.
--- diff/drivers/net/wan/c101.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wan/c101.c	2004-07-01 21:32:39.000000000 +0100
@@ -220,7 +220,8 @@
 static int c101_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
 	const size_t size = sizeof(sync_serial_settings);
-	sync_serial_settings new_line, *line = ifr->ifr_settings.ifs_ifsu.sync;
+	sync_serial_settings new_line;
+	sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync;
 	port_t *port = dev_to_port(dev);
 
 #ifdef DEBUG_RINGS
--- diff/drivers/net/wan/cosa.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wan/cosa.c	2004-07-01 21:32:39.000000000 +0100
@@ -301,9 +301,9 @@
 static int chrdev_rx_done(struct channel_data *channel);
 static int chrdev_tx_done(struct channel_data *channel, int size);
 static ssize_t cosa_read(struct file *file,
-	char *buf, size_t count, loff_t *ppos);
+	char __user *buf, size_t count, loff_t *ppos);
 static ssize_t cosa_write(struct file *file,
-	const char *buf, size_t count, loff_t *ppos);
+	const char __user *buf, size_t count, loff_t *ppos);
 static unsigned int cosa_poll(struct file *file, poll_table *poll);
 static int cosa_open(struct inode *inode, struct file *file);
 static int cosa_release(struct inode *inode, struct file *file);
@@ -330,13 +330,13 @@
 /* Ioctls */
 static int cosa_start(struct cosa_data *cosa, int address);
 static int cosa_reset(struct cosa_data *cosa);
-static int cosa_download(struct cosa_data *cosa, unsigned long a);
-static int cosa_readmem(struct cosa_data *cosa, unsigned long a);
+static int cosa_download(struct cosa_data *cosa, void __user *a);
+static int cosa_readmem(struct cosa_data *cosa, void __user *a);
 
 /* COSA/SRP ROM monitor */
-static int download(struct cosa_data *cosa, const char *data, int addr, int len);
+static int download(struct cosa_data *cosa, const char __user *data, int addr, int len);
 static int startmicrocode(struct cosa_data *cosa, int address);
-static int readmem(struct cosa_data *cosa, char *data, int addr, int len);
+static int readmem(struct cosa_data *cosa, char __user *data, int addr, int len);
 static int cosa_reset_and_read_id(struct cosa_data *cosa, char *id);
 
 /* Auxilliary functions */
@@ -830,7 +830,7 @@
 }
 
 static ssize_t cosa_read(struct file *file,
-	char *buf, size_t count, loff_t *ppos)
+	char __user *buf, size_t count, loff_t *ppos)
 {
 	DECLARE_WAITQUEUE(wait, current);
 	unsigned long flags;
@@ -905,7 +905,7 @@
 
 
 static ssize_t cosa_write(struct file *file,
-	const char *buf, size_t count, loff_t *ppos)
+	const char __user *buf, size_t count, loff_t *ppos)
 {
 	DECLARE_WAITQUEUE(wait, current);
 	struct channel_data *chan = file->private_data;
@@ -1066,7 +1066,7 @@
 }
 
 /* High-level function to download data into COSA memory. Calls download() */
-static inline int cosa_download(struct cosa_data *cosa, unsigned long arg)
+static inline int cosa_download(struct cosa_data *cosa, void __user *arg)
 {
 	struct cosa_download d;
 	int i;
@@ -1080,7 +1080,7 @@
 		return -EPERM;
 	}
 	
-	if (copy_from_user(&d, (void __user *) arg, sizeof(d)))
+	if (copy_from_user(&d, arg, sizeof(d)))
 		return -EFAULT;
 
 	if (d.addr < 0 || d.addr > COSA_MAX_FIRMWARE_SIZE)
@@ -1105,7 +1105,7 @@
 }
 
 /* High-level function to read COSA memory. Calls readmem() */
-static inline int cosa_readmem(struct cosa_data *cosa, unsigned long arg)
+static inline int cosa_readmem(struct cosa_data *cosa, void __user *arg)
 {
 	struct cosa_download d;
 	int i;
@@ -1120,7 +1120,7 @@
 		return -EPERM;
 	}
 
-	if (copy_from_user(&d, (void __user *) arg, sizeof(d)))
+	if (copy_from_user(&d, arg, sizeof(d)))
 		return -EFAULT;
 
 	/* If something fails, force the user to reset the card */
@@ -1167,7 +1167,7 @@
 }
 		
 /* Buffer of size at least COSA_MAX_ID_STRING is expected */
-static inline int cosa_getidstr(struct cosa_data *cosa, char *string)
+static inline int cosa_getidstr(struct cosa_data *cosa, char __user *string)
 {
 	int l = strlen(cosa->id_string)+1;
 	if (copy_to_user(string, cosa->id_string, l))
@@ -1176,7 +1176,7 @@
 }
 
 /* Buffer of size at least COSA_MAX_ID_STRING is expected */
-static inline int cosa_gettype(struct cosa_data *cosa, char *string)
+static inline int cosa_gettype(struct cosa_data *cosa, char __user *string)
 {
 	int l = strlen(cosa->type)+1;
 	if (copy_to_user(string, cosa->type, l))
@@ -1187,6 +1187,7 @@
 static int cosa_ioctl_common(struct cosa_data *cosa,
 	struct channel_data *channel, unsigned int cmd, unsigned long arg)
 {
+	void __user *argp = (void __user *)arg;
 	switch(cmd) {
 	case COSAIORSET:	/* Reset the device */
 		if (!capable(CAP_NET_ADMIN))
@@ -1200,15 +1201,15 @@
 		if (!capable(CAP_SYS_RAWIO))
 			return -EACCES;
 		
-		return cosa_download(cosa, arg);
+		return cosa_download(cosa, argp);
 	case COSAIORMEM:
 		if (!capable(CAP_SYS_RAWIO))
 			return -EACCES;
-		return cosa_readmem(cosa, arg);
+		return cosa_readmem(cosa, argp);
 	case COSAIORTYPE:
-		return cosa_gettype(cosa, (char *)arg);
+		return cosa_gettype(cosa, argp);
 	case COSAIORIDSTR:
-		return cosa_getidstr(cosa, (char *)arg);
+		return cosa_getidstr(cosa, argp);
 	case COSAIONRCARDS:
 		return nr_cards;
 	case COSAIONRCHANS:
@@ -1434,7 +1435,7 @@
  * by a single space. Monitor has to reply with a space. Now the download
  * begins. After the download monitor replies with "\r\n." (CR LF dot).
  */
-static int download(struct cosa_data *cosa, const char *microcode, int length, int address)
+static int download(struct cosa_data *cosa, const char __user *microcode, int length, int address)
 {
 	int i;
 
@@ -1508,7 +1509,7 @@
  * This routine is not needed during the normal operation and serves
  * for debugging purposes only.
  */
-static int readmem(struct cosa_data *cosa, char *microcode, int length, int address)
+static int readmem(struct cosa_data *cosa, char __user *microcode, int length, int address)
 {
 	if (put_wait_data(cosa, 'r') == -1) return -1;
 	if ((get_wait_data(cosa)) != 'r') return -2;
--- diff/drivers/net/wan/cosa.h	2004-05-19 22:12:00.000000000 +0100
+++ source/drivers/net/wan/cosa.h	2004-07-01 21:32:39.000000000 +0100
@@ -66,7 +66,7 @@
 /* ioctls */
 struct cosa_download {
 	int addr, len;
-	char *code;
+	char __user *code;
 };
 
 /* Reset the device */
--- diff/drivers/net/wan/dscc4.c	2004-05-19 22:12:00.000000000 +0100
+++ source/drivers/net/wan/dscc4.c	2004-07-01 21:32:39.000000000 +0100
@@ -1296,7 +1296,7 @@
 
 static int dscc4_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
-	sync_serial_settings *line = ifr->ifr_settings.ifs_ifsu.sync;
+	sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync;
 	struct dscc4_dev_priv *dpriv = dscc4_priv(dev);
 	const size_t size = sizeof(dpriv->settings);
 	int ret = 0;
--- diff/drivers/net/wan/farsync.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wan/farsync.c	2004-07-01 21:32:39.000000000 +0100
@@ -1636,7 +1636,7 @@
 			 */
 			dbg(DBG_TX, "Tx underflow port %d\n", port->index);
                         hdlc_stats(port_to_dev(port))->tx_errors++;
-                        hdlc_stats(port_to_dev(port))->tx_fifo_errors;
+                        hdlc_stats(port_to_dev(port))->tx_fifo_errors++;
 			dbg(DBG_ASS, "Tx underflow on card %d port %d\n",
 			    card->card_no, port->index);
 			break;
--- diff/drivers/net/wan/hdlc_cisco.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wan/hdlc_cisco.c	2004-07-01 21:32:39.000000000 +0100
@@ -272,7 +272,7 @@
 
 int hdlc_cisco_ioctl(struct net_device *dev, struct ifreq *ifr)
 {
-	cisco_proto *cisco_s = ifr->ifr_settings.ifs_ifsu.cisco;
+	cisco_proto __user *cisco_s = ifr->ifr_settings.ifs_ifsu.cisco;
 	const size_t size = sizeof(cisco_proto);
 	cisco_proto new_settings;
 	hdlc_device *hdlc = dev_to_hdlc(dev);
--- diff/drivers/net/wan/hdlc_fr.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wan/hdlc_fr.c	2004-07-01 21:32:39.000000000 +0100
@@ -1137,7 +1137,7 @@
 
 int hdlc_fr_ioctl(struct net_device *dev, struct ifreq *ifr)
 {
-	fr_proto *fr_s = ifr->ifr_settings.ifs_ifsu.fr;
+	fr_proto __user *fr_s = ifr->ifr_settings.ifs_ifsu.fr;
 	const size_t size = sizeof(fr_proto);
 	fr_proto new_settings;
 	hdlc_device *hdlc = dev_to_hdlc(dev);
--- diff/drivers/net/wan/hdlc_raw.c	2004-05-19 22:12:00.000000000 +0100
+++ source/drivers/net/wan/hdlc_raw.c	2004-07-01 21:32:39.000000000 +0100
@@ -34,7 +34,7 @@
 
 int hdlc_raw_ioctl(struct net_device *dev, struct ifreq *ifr)
 {
-	raw_hdlc_proto *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc;
+	raw_hdlc_proto __user *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc;
 	const size_t size = sizeof(raw_hdlc_proto);
 	raw_hdlc_proto new_settings;
 	hdlc_device *hdlc = dev_to_hdlc(dev);
--- diff/drivers/net/wan/hdlc_raw_eth.c	2004-05-19 22:12:00.000000000 +0100
+++ source/drivers/net/wan/hdlc_raw_eth.c	2004-07-01 21:32:39.000000000 +0100
@@ -46,7 +46,7 @@
 
 int hdlc_raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
 {
-	raw_hdlc_proto *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc;
+	raw_hdlc_proto __user *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc;
 	const size_t size = sizeof(raw_hdlc_proto);
 	raw_hdlc_proto new_settings;
 	hdlc_device *hdlc = dev_to_hdlc(dev);
--- diff/drivers/net/wan/lmc/lmc_ioctl.h	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wan/lmc/lmc_ioctl.h	2004-07-01 21:32:39.000000000 +0100
@@ -234,7 +234,7 @@
   int command;
   int address;
   int value;
-  char *data;
+  char __user *data;
 } lmc_t1f_control;
 
 enum lmc_xilinx_c {
@@ -246,7 +246,7 @@
 struct lmc_xilinx_control {
     enum lmc_xilinx_c command;
     int len;
-    char *data;
+    char __user *data;
 };
 
 /* ------------------ end T1 defs ------------------- */
--- diff/drivers/net/wan/n2.c	2004-05-19 22:12:00.000000000 +0100
+++ source/drivers/net/wan/n2.c	2004-07-01 21:32:39.000000000 +0100
@@ -254,7 +254,8 @@
 static int n2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
 	const size_t size = sizeof(sync_serial_settings);
-	sync_serial_settings new_line, *line = ifr->ifr_settings.ifs_ifsu.sync;
+	sync_serial_settings new_line;
+	sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync;
 	port_t *port = dev_to_port(dev);
 
 #ifdef DEBUG_RINGS
--- diff/drivers/net/wan/pci200syn.c	2004-05-19 22:12:00.000000000 +0100
+++ source/drivers/net/wan/pci200syn.c	2004-07-01 21:32:39.000000000 +0100
@@ -204,7 +204,8 @@
 static int pci200_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
 	const size_t size = sizeof(sync_serial_settings);
-	sync_serial_settings new_line, *line = ifr->ifr_settings.ifs_ifsu.sync;
+	sync_serial_settings new_line;
+	sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync;
 	port_t *port = dev_to_port(dev);
 
 #ifdef DEBUG_RINGS
--- diff/drivers/net/wan/x25_asy.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wan/x25_asy.c	2004-07-01 21:32:39.000000000 +0100
@@ -733,7 +733,7 @@
 
 	switch(cmd) {
 	case SIOCGIFNAME:
-		if (copy_to_user((void *)arg, sl->dev->name,
+		if (copy_to_user((void __user *)arg, sl->dev->name,
 					strlen(sl->dev->name) + 1))
 			return -EFAULT;
 		return 0;
--- diff/drivers/net/wd.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/wd.c	2004-07-01 21:32:39.000000000 +0100
@@ -43,6 +43,8 @@
 
 #include "8390.h"
 
+#define DRV_NAME "wd"
+
 /* A zero-terminated list of I/O addresses to be probed. */
 static unsigned int wd_portlist[] __initdata =
 {0x300, 0x280, 0x380, 0x240, 0};
@@ -131,6 +133,7 @@
 	release_region(dev->base_addr - WD_NIC_OFFSET, WD_IO_EXTENT);
 }
 
+#ifndef MODULE
 struct net_device * __init wd_probe(int unit)
 {
 	struct net_device *dev = alloc_ei_netdev();
@@ -155,6 +158,7 @@
 	free_netdev(dev);
 	return ERR_PTR(err);
 }
+#endif
 
 static int __init wd_probe1(struct net_device *dev, int ioaddr)
 {
@@ -300,7 +304,7 @@
 
 	/* Snarf the interrupt now.  There's no point in waiting since we cannot
 	   share and the board will usually be enabled. */
-	i = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev);
+	i = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev);
 	if (i) {
 		printk (" unable to get IRQ %d.\n", dev->irq);
 		return i;
--- diff/drivers/net/wireless/airo.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/airo.c	2004-07-01 21:32:39.000000000 +0100
@@ -1209,6 +1209,7 @@
 	SsidRid			*SSID;
 	APListRid		*APList;
 #define	PCI_SHARED_LEN		2*MPI_MAX_FIDS*PKTSIZE+RIDSIZE
+	u32			pci_state[16];
 };
 
 static inline int bap_read(struct airo_info *ai, u16 *pu16Dst, int bytelen,
@@ -1963,7 +1964,7 @@
 
 	if ((skb = skb_dequeue(&ai->txq)) == 0) {
 		printk (KERN_ERR
-			"airo_mpi: %s: Dequeue'd zero in send_packet()\n",
+			"airo: %s: Dequeue'd zero in send_packet()\n",
 			__FUNCTION__);
 		return 0;
 	}
@@ -2679,7 +2680,8 @@
 }
 
 struct net_device *_init_airo_card( unsigned short irq, int port,
-				    int is_pcmcia, struct pci_dev *pci )
+				    int is_pcmcia, struct pci_dev *pci,
+				    struct device *dmdev )
 {
 	struct net_device *dev;
 	struct airo_info *ai;
@@ -2740,10 +2742,11 @@
 	dev->irq = irq;
 	dev->base_addr = port;
 
-	/* what is with PCMCIA ??? */
-	if (pci) {
-		SET_NETDEV_DEV(dev, &pci->dev);
-	}
+	SET_NETDEV_DEV(dev, dmdev);
+
+
+	if (test_bit(FLAG_MPI,&ai->flags))
+		reset_card (dev, 1);
 
 	rc = request_irq( dev->irq, airo_interrupt, SA_SHIRQ, dev->name, dev );
 	if (rc) {
@@ -2822,9 +2825,9 @@
 	return NULL;
 }
 
-struct net_device *init_airo_card( unsigned short irq, int port, int is_pcmcia )
+struct net_device *init_airo_card( unsigned short irq, int port, int is_pcmcia, struct device *dmdev )
 {
-	return _init_airo_card ( irq, port, is_pcmcia, 0);
+	return _init_airo_card ( irq, port, is_pcmcia, 0, dmdev);
 }
 
 EXPORT_SYMBOL(init_airo_card);
@@ -4047,7 +4050,8 @@
 		Resp rsp;
 
 		if (test_bit(FLAG_ENABLED, &ai->flags))
-			printk(KERN_ERR "%s: MAC should be disabled (rid=%d)\n",
+			printk(KERN_ERR
+				"%s: MAC should be disabled (rid=%04x)\n",
 				__FUNCTION__, rid);
 		memset(&cmd, 0, sizeof(cmd));
 		memset(&rsp, 0, sizeof(rsp));
@@ -4500,6 +4504,8 @@
 		len = priv->readlen - pos;
 	if (copy_to_user(buffer, priv->rbuffer + pos, len))
 		return -EFAULT;
+	if (pos + len > priv->writelen)
+		priv->writelen = pos + len;
 	*offset = pos + len;
 	return len;
 }
@@ -4527,6 +4533,8 @@
 		len = priv->maxwritelen - pos;
 	if (copy_from_user(priv->wbuffer + pos, buffer, len))
 		return -EFAULT;
+	if ( pos + len > priv->writelen )
+		priv->writelen = len + file->f_pos;
 	*offset = pos + len;
 	return len;
 }
@@ -5449,9 +5457,9 @@
 	pci_set_master(pdev);
 
 	if (pdev->device == 0x5000 || pdev->device == 0xa504)
-			dev = _init_airo_card(pdev->irq, pdev->resource[0].start, 0, pdev);
+			dev = _init_airo_card(pdev->irq, pdev->resource[0].start, 0, pdev, &pdev->dev);
 	else
-			dev = _init_airo_card(pdev->irq, pdev->resource[2].start, 0, pdev);
+			dev = _init_airo_card(pdev->irq, pdev->resource[2].start, 0, pdev, &pdev->dev);
 	if (!dev)
 		return -ENODEV;
 
@@ -5470,9 +5478,6 @@
 	Cmd cmd;
 	Resp rsp;
 
-	printk(KERN_DEBUG "%s: airo_mpi entering sleep mode (state=%d)\n",
-	       dev->name, state);
-
 	if ((ai->APList == NULL) &&
 		(ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL)) == NULL)
 		return -ENOMEM;
@@ -5490,7 +5495,10 @@
 	ai->power = state;
 	cmd.cmd=HOSTSLEEP;
 	issuecommand(ai, &cmd, &rsp);
-	return 0;
+
+	pci_enable_wake(pdev, state, 1);
+	pci_save_state(pdev, ai->pci_state);
+	return pci_set_power_state(pdev, state);
 }
 
 static int airo_pci_resume(struct pci_dev *pdev)
@@ -5499,12 +5507,12 @@
 	struct airo_info *ai = dev->priv;
 	Resp rsp;
 
-	printk(KERN_DEBUG "%s: airo_mpi waking up\n", dev->name);
-
-	if (!ai->power)
-		return 0;
+	pci_set_power_state(pdev, 0);
+	pci_restore_state(pdev, ai->pci_state);
+	pci_enable_wake(pdev, ai->power, 0);
 
 	if (ai->power > 1) {
+		reset_card(dev, 0);
 		mpi_init_descriptors(ai);
 		setup_card(ai, dev->dev_addr, 0);
 		clear_bit(FLAG_RADIO_OFF, &ai->flags);
@@ -5554,7 +5562,7 @@
 		printk( KERN_INFO
 			"airo:  Trying to configure ISA adapter at irq=%d io=0x%x\n",
 			irq[i], io[i] );
-		if (init_airo_card( irq[i], io[i], 0 ))
+		if (init_airo_card( irq[i], io[i], 0, NULL ))
 			have_isa_dev = 1;
 	}
 
@@ -7166,6 +7174,7 @@
 	unsigned char *iobuf;
 	int len;
 	struct airo_info *ai = dev->priv;
+	Resp rsp;
 
 	if (test_bit(FLAG_FLASHING, &ai->flags))
 		return -EIO;
@@ -7173,8 +7182,11 @@
 	switch(comp->command)
 	{
 	case AIROGCAP:      ridcode = RID_CAPABILITIES; break;
-	case AIROGCFG: writeConfigRid (ai, 1);
-			    ridcode = RID_CONFIG;       break;
+	case AIROGCFG:      ridcode = RID_CONFIG;
+		disable_MAC (ai, 1);
+		writeConfigRid (ai, 1);
+		enable_MAC (ai, &rsp, 1);
+		break;
 	case AIROGSLIST:    ridcode = RID_SSID;         break;
 	case AIROGVLIST:    ridcode = RID_APLIST;       break;
 	case AIROGDRVNAM:   ridcode = RID_DRVNAME;      break;
@@ -7562,6 +7574,11 @@
 	set_current_state (TASK_UNINTERRUPTIBLE);
 	schedule_timeout (HZ);          /* Added 12/7/00 */
 	clear_bit (FLAG_FLASHING, &ai->flags);
+	if (test_bit(FLAG_MPI, &ai->flags)) {
+		status = mpi_init_descriptors(ai);
+		if (status != SUCCESS)
+			return status;
+	}
 	status = setup_card(ai, dev->dev_addr, 1);
 
 	if (!test_bit(FLAG_MPI,&ai->flags))
--- diff/drivers/net/wireless/airo_cs.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wireless/airo_cs.c	2004-07-01 21:32:39.000000000 +0100
@@ -89,7 +89,7 @@
    event handler. 
 */
 
-struct net_device *init_airo_card( int, int, int );
+struct net_device *init_airo_card( int, int, int, struct device * );
 void stop_airo_card( struct net_device *, int );
 int reset_airo_card( struct net_device * );
 
@@ -450,7 +450,7 @@
 	CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link->handle, &link->conf));
 	((local_info_t*)link->priv)->eth_dev = 
 		init_airo_card( link->irq.AssignedIRQ,
-				link->io.BasePort1, 1 );
+				link->io.BasePort1, 1, pcmcia_lookup_device(handle) );
 	if (!((local_info_t*)link->priv)->eth_dev) goto cs_failed;
 	
 	/*
--- diff/drivers/net/wireless/arlan-proc.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wireless/arlan-proc.c	2004-07-01 21:32:39.000000000 +0100
@@ -399,7 +399,7 @@
 static char arlan_drive_info[ARLAN_STR_SIZE] = "A655\n\0";
 
 static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp,
-		      void *buffer, size_t * lenp)
+		      void __user *buffer, size_t * lenp)
 {
 	int i;
 	int retv, pos, devnum;
@@ -636,7 +636,7 @@
 
 
 static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp,
-			    void *buffer, size_t * lenp)
+			    void __user *buffer, size_t * lenp)
 {
 	int i;
 	int retv, pos, devnum;
@@ -670,7 +670,7 @@
 }
 
 static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp,
-			    void *buffer, size_t * lenp)
+			    void __user *buffer, size_t * lenp)
 {
 	int i;
 	int retv, pos, devnum;
@@ -699,7 +699,7 @@
 }
 
 static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp,
-			    void *buffer, size_t * lenp)
+			    void __user *buffer, size_t * lenp)
 {
 	int i;
 	int retv, pos, devnum;
@@ -727,7 +727,7 @@
 }
 
 static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp,
-			void *buffer, size_t * lenp)
+			void __user *buffer, size_t * lenp)
 {
 	int i;
 	int retv, pos, devnum;
@@ -763,7 +763,7 @@
 static char conf_reset_result[200];
 
 static int arlan_configure(ctl_table * ctl, int write, struct file *filp,
-		    void *buffer, size_t * lenp)
+		    void __user *buffer, size_t * lenp)
 {
 	int pos = 0;
 	int devnum = ctl->procname[6] - '0';
@@ -788,7 +788,7 @@
 }
 
 static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp,
-		       void *buffer, size_t * lenp)
+		       void __user *buffer, size_t * lenp)
 {
 	int pos = 0;
 	int devnum = ctl->procname[5] - '0';
--- diff/drivers/net/wireless/atmel.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wireless/atmel.c	2004-07-01 21:32:39.000000000 +0100
@@ -2360,7 +2360,7 @@
 
 typedef struct atmel_priv_ioctl {
 	char id[32];
-	unsigned char *data;		
+	unsigned char __user *data;		
 	unsigned short len;		
 } atmel_priv_ioctl;
 
--- diff/drivers/net/wireless/atmel_cs.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wireless/atmel_cs.c	2004-07-01 21:32:39.000000000 +0100
@@ -347,11 +347,6 @@
 	{ 0, 0, "11WAVE/11WP611AL-E", "atmel_at76c502e%s.bin", "11WAVE WaveBuddy" } 
 };
 
-/* This is strictly temporary, until PCMCIA devices get integrated into the device model. */
-static struct device atmel_device = {
-        .bus_id    = "pcmcia",
-};
-
 static void atmel_config(dev_link_t *link)
 {
 	client_handle_t handle;
@@ -542,7 +537,7 @@
 		init_atmel_card(link->irq.AssignedIRQ,
 				link->io.BasePort1,
 				card_index == -1 ? NULL :  card_table[card_index].firmware,
-				&atmel_device,
+				pcmcia_lookup_device(handle),
 				card_present, 
 				link);
 	if (!((local_info_t*)link->priv)->eth_dev) 
--- diff/drivers/net/wireless/netwave_cs.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wireless/netwave_cs.c	2004-07-01 21:32:39.000000000 +0100
@@ -1075,6 +1075,8 @@
 
     dev->irq = link->irq.AssignedIRQ;
     dev->base_addr = link->io.BasePort1;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
+
     if (register_netdev(dev) != 0) {
 	printk(KERN_DEBUG "netwave_cs: register_netdev() failed\n");
 	goto failed;
--- diff/drivers/net/wireless/orinoco.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wireless/orinoco.c	2004-07-01 21:32:39.000000000 +0100
@@ -1519,7 +1519,8 @@
 
 static void __orinoco_ev_infdrop(struct net_device *dev, hermes_t *hw)
 {
-	printk(KERN_WARNING "%s: Information frame lost.\n", dev->name);
+	if (net_ratelimit())
+		printk(KERN_WARNING "%s: Information frame lost.\n", dev->name);
 }
 
 static void print_linkstatus(struct net_device *dev, u16 status)
--- diff/drivers/net/wireless/orinoco_cs.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wireless/orinoco_cs.c	2004-07-01 21:32:39.000000000 +0100
@@ -461,6 +461,7 @@
 
 	/* register_netdev will give us an ethX name */
 	dev->name[0] = '\0';
+	SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 	/* Tell the stack we exist */
 	if (register_netdev(dev) != 0) {
 		printk(KERN_ERR "orinoco_cs: register_netdev() failed\n");
--- diff/drivers/net/wireless/orinoco_pci.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/orinoco_pci.c	2004-07-01 21:32:39.000000000 +0100
@@ -384,7 +384,7 @@
 	return pci_module_init(&orinoco_pci_driver);
 }
 
-extern void __exit orinoco_pci_exit(void)
+void __exit orinoco_pci_exit(void)
 {
 	pci_unregister_driver(&orinoco_pci_driver);
 }
--- diff/drivers/net/wireless/orinoco_plx.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/orinoco_plx.c	2004-07-01 21:32:39.000000000 +0100
@@ -341,7 +341,7 @@
 	return pci_module_init(&orinoco_plx_driver);
 }
 
-extern void __exit orinoco_plx_exit(void)
+void __exit orinoco_plx_exit(void)
 {
 	pci_unregister_driver(&orinoco_plx_driver);
 	current->state = TASK_UNINTERRUPTIBLE;
--- diff/drivers/net/wireless/orinoco_tmd.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/orinoco_tmd.c	2004-07-01 21:32:39.000000000 +0100
@@ -219,7 +219,7 @@
 	return pci_module_init(&orinoco_tmd_driver);
 }
 
-extern void __exit orinoco_tmd_exit(void)
+void __exit orinoco_tmd_exit(void)
 {
 	pci_unregister_driver(&orinoco_tmd_driver);
 	current->state = TASK_UNINTERRUPTIBLE;
--- diff/drivers/net/wireless/prism54/isl_38xx.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/isl_38xx.c	2004-07-01 21:32:39.000000000 +0100
@@ -25,17 +25,11 @@
 #include <linux/types.h>
 #include <linux/delay.h>
 
-#include "isl_38xx.h"
-#include <linux/firmware.h>
-
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
-#include <linux/config.h>
-#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE)
-#error No Firmware Loading configured in the kernel !
-#endif
-
+#include "prismcompat.h"
+#include "isl_38xx.h"
 #include "islpci_dev.h"
 #include "islpci_mgt.h"
 
@@ -236,130 +230,6 @@
 }
 
 int
-isl38xx_upload_firmware(char *fw_id, _REQ_FW_DEV_T dev, void *device_base,
-			dma_addr_t host_address)
-{
-	u32 reg, rc;
-
-#if VERBOSE > SHOW_ERROR_MESSAGES
-	DEBUG(SHOW_ERROR_MESSAGES, "isl38xx_upload_firmware(0x%lx, 0x%lx)\n",
-	      (long) device_base, (long) host_address);
-#endif
-
-	/* clear the RAMBoot and the Reset bit */
-	reg = readl(device_base + ISL38XX_CTRL_STAT_REG);
-	reg &= ~ISL38XX_CTRL_STAT_RESET;
-	reg &= ~ISL38XX_CTRL_STAT_RAMBOOT;
-	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
-	wmb();
-	udelay(ISL38XX_WRITEIO_DELAY);
-
-	/* set the Reset bit without reading the register ! */
-	reg |= ISL38XX_CTRL_STAT_RESET;
-	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
-	wmb();
-	udelay(ISL38XX_WRITEIO_DELAY);
-
-	/* clear the Reset bit */
-	reg &= ~ISL38XX_CTRL_STAT_RESET;
-	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
-	wmb();
-
-	/* wait a while for the device to reboot */
-	mdelay(50);
-
-	{
-		const struct firmware *fw_entry = 0;
-		long fw_len;
-		const u32 *fw_ptr;
-
-		rc = request_firmware(&fw_entry, fw_id, dev);
-		if (rc) {
-			printk(KERN_ERR
-			       "%s: request_firmware() failed for '%s'\n",
-			       "prism54", fw_id);
-			return rc;
-		}
-		/* prepare the Direct Memory Base register */
-		reg = ISL38XX_DEV_FIRMWARE_ADDRES;
-
-		fw_ptr = (u32 *) fw_entry->data;
-		fw_len = fw_entry->size;
-
-		if (fw_len % 4) {
-			printk(KERN_ERR
-			       "%s: firmware '%s' size is not multiple of 32bit, aborting!\n",
-			       "prism54", fw_id);
-			release_firmware(fw_entry);
-			return EILSEQ; /* Illegal byte sequence  */;
-		}
-
-		while (fw_len > 0) {
-			long _fw_len =
-			    (fw_len >
-			     ISL38XX_MEMORY_WINDOW_SIZE) ?
-			    ISL38XX_MEMORY_WINDOW_SIZE : fw_len;
-			u32 *dev_fw_ptr = device_base + ISL38XX_DIRECT_MEM_WIN;
-
-			/* set the cards base address for writting the data */
-			isl38xx_w32_flush(device_base, reg,
-					  ISL38XX_DIR_MEM_BASE_REG);
-			wmb();	/* be paranoid */
-
-			/* increment the write address for next iteration */
-			reg += _fw_len;
-			fw_len -= _fw_len;
-
-			/* write the data to the Direct Memory Window 32bit-wise */
-			/* memcpy_toio() doesn't guarantee 32bit writes :-| */
-			while (_fw_len > 0) {
-				/* use non-swapping writel() */
-				__raw_writel(*fw_ptr, dev_fw_ptr);
-				fw_ptr++, dev_fw_ptr++;
-				_fw_len -= 4;
-			}
-
-			/* flush PCI posting */
-			(void) readl(device_base + ISL38XX_PCI_POSTING_FLUSH);
-			wmb();	/* be paranoid again */
-
-			BUG_ON(_fw_len != 0);
-		}
-
-		BUG_ON(fw_len != 0);
-
-		release_firmware(fw_entry);
-	}
-
-	/* now reset the device
-	 * clear the Reset & ClkRun bit, set the RAMBoot bit */
-	reg = readl(device_base + ISL38XX_CTRL_STAT_REG);
-	reg &= ~ISL38XX_CTRL_STAT_CLKRUN;
-	reg &= ~ISL38XX_CTRL_STAT_RESET;
-	reg |= ISL38XX_CTRL_STAT_RAMBOOT;
-	isl38xx_w32_flush(device_base, reg, ISL38XX_CTRL_STAT_REG);
-	wmb();
-	udelay(ISL38XX_WRITEIO_DELAY);
-
-	/* set the reset bit latches the host override and RAMBoot bits
-	 * into the device for operation when the reset bit is reset */
-	reg |= ISL38XX_CTRL_STAT_RESET;
-	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
-	/* don't do flush PCI posting here! */
-	wmb();
-	udelay(ISL38XX_WRITEIO_DELAY);
-
-	/* clear the reset bit should start the whole circus */
-	reg &= ~ISL38XX_CTRL_STAT_RESET;
-	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
-	/* don't do flush PCI posting here! */
-	wmb();
-	udelay(ISL38XX_WRITEIO_DELAY);
-
-	return 0;
-}
-
-int
 isl38xx_in_queue(isl38xx_control_block *cb, int queue)
 {
 	const s32 delta = (le32_to_cpu(cb->driver_curr_frag[queue]) -
--- diff/drivers/net/wireless/prism54/isl_38xx.h	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/isl_38xx.h	2004-07-01 21:32:39.000000000 +0100
@@ -22,14 +22,6 @@
 
 #include <linux/version.h>
 #include <asm/io.h>
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,75))
-#include <linux/device.h>
-# define _REQ_FW_DEV_T struct device *
-#else
-# define _REQ_FW_DEV_T char *
-#endif
-
 #include <asm/byteorder.h>
 
 #define ISL38XX_CB_RX_QSIZE                     8
@@ -174,6 +166,4 @@
 void isl38xx_trigger_device(int, void *);
 void isl38xx_interface_reset(void *, dma_addr_t);
 
-int isl38xx_upload_firmware(char *, _REQ_FW_DEV_T, void *, dma_addr_t);
-
 #endif				/* _ISL_38XX_H */
--- diff/drivers/net/wireless/prism54/isl_ioctl.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/isl_ioctl.c	2004-07-01 21:32:39.000000000 +0100
@@ -25,10 +25,10 @@
 #include <linux/kernel.h>
 #include <linux/if_arp.h>
 #include <linux/pci.h>
-#include <linux/moduleparam.h>
 
 #include <asm/uaccess.h>
 
+#include "prismcompat.h"
 #include "isl_ioctl.h"
 #include "islpci_mgt.h"
 #include "isl_oid.h"		/* additional types and defs for isl38xx fw */
@@ -166,21 +166,13 @@
 	 * for it save old values */
 	if (init_mode > IW_MODE_MONITOR || init_mode < IW_MODE_AUTO) {
 		printk(KERN_DEBUG "%s(): You passed a non-valid init_mode. "
-				"Using default mode\n", __FUNCTION__);
+		       "Using default mode\n", __FUNCTION__);
 		init_mode = CARD_DEFAULT_IW_MODE;
 	}
 	/* This sets all of the mode-dependent values */
 	prism54_mib_mode_helper(priv, init_mode);
 }
 
-void
-prism54_mib_init_work(islpci_private *priv)
-{
-	down_write(&priv->mib_sem);
-	mgt_commit(priv);
-	up_write(&priv->mib_sem);
-}
-
 /* this will be executed outside of atomic context thanks to
  * schedule_work(), thus we can as well use sleeping semaphore
  * locking */
@@ -195,16 +187,9 @@
 	if (down_interruptible(&priv->stats_sem))
 		return;
 
-/* missing stats are :
- *  iwstatistics.qual.updated
- *  iwstatistics.discard.nwid	    
- *  iwstatistics.discard.fragment	    
- *  iwstatistics.discard.misc
- *  iwstatistics.miss.beacon */
-
 /* Noise floor.
  * I'm not sure if the unit is dBm.
- * Note : If we are not connected, this value seems to be irrevelant. */
+ * Note : If we are not connected, this value seems to be irrelevant. */
 
 	mgt_get_request(priv, DOT11_OID_NOISEFLOOR, 0, NULL, &r);
 	priv->local_iwstatistics.qual.noise = r.u;
@@ -216,8 +201,7 @@
 	data = r.ptr;
 
 	/* copy this MAC to the bss */
-	for (j = 0; j < 6; j++)
-		bss.address[j] = data[j];
+	memcpy(bss.address, data, 6);
 	kfree(data);
 
 	/* now ask for the corresponding bss */
@@ -426,7 +410,6 @@
 	/* by default  the card sets this to 20. */
 	sens = vwrq->disabled ? 20 : vwrq->value;
 
-	/* set the ed threshold. */
 	return mgt_set_request(priv, DOT11_OID_EDTHRESHOLD, 0, &sens);
 }
 
@@ -505,7 +488,7 @@
 		return 0;
 
 	/* Request the device for the supported frequencies
-	 * not really revelant since some devices will report the 5 GHz band
+	 * not really relevant since some devices will report the 5 GHz band
 	 * frequencies even if they don't support them.
 	 */
 	rvalue =
@@ -515,21 +498,12 @@
 	range->num_channels = freq->nr;
 	range->num_frequency = freq->nr;
 
-	/* Frequencies are not listed in the right order. The reordering is probably
-	 * firmware dependant and thus should work for everyone.
-	 */
 	m = min(IW_MAX_FREQUENCIES, (int) freq->nr);
-	for (i = 0; i < m - 12; i++) {
-		range->freq[i].m = freq->mhz[12 + i];
+	for (i = 0; i < m; i++) {
+		range->freq[i].m = freq->mhz[i];
 		range->freq[i].e = 6;
-		range->freq[i].i = i + 1;
+		range->freq[i].i = channel_of_freq(freq->mhz[i]);
 	}
-	for (i = m - 12; i < m; i++) {
-		range->freq[i].m = freq->mhz[i - m + 12];
-		range->freq[i].e = 6;
-		range->freq[i].i = i + 23;
-	}
-
 	kfree(freq);
 
 	rvalue |= mgt_get_request(priv, DOT11_OID_SUPPORTEDRATES, 0, NULL, &r);
@@ -544,9 +518,7 @@
 		i++;
 		data++;
 	}
-
 	range->num_bitrates = i;
-
 	kfree(r.ptr);
 
 	return rvalue;
@@ -585,7 +557,6 @@
 	int rvalue;
 
 	rvalue = mgt_get_request(priv, DOT11_OID_BSSID, 0, NULL, &r);
-
 	memcpy(awrq->sa_data, r.ptr, 6);
 	awrq->sa_family = ARPHRD_ETHER;
 	kfree(r.ptr);
@@ -658,8 +629,8 @@
 	current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, NULL);
 
 	/* Add frequency. (short) bss->channel is the frequency in MHz */
-	iwe.u.freq.m = bss->channel;
-	iwe.u.freq.e = 6;
+	iwe.u.freq.m = channel_of_freq(bss->channel);
+	iwe.u.freq.e = 0;
 	iwe.cmd = SIOCGIWFREQ;
 	current_ev =
 	    iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);
@@ -695,7 +666,6 @@
 			kfree(buf);
 		}
 	}
-
 	return current_ev;
 }
 
@@ -722,7 +692,7 @@
 
 	/* Ask the device for a list of known bss. We can report at most
 	 * IW_MAX_AP=64 to the range struct. But the device won't repport anything
-	 * if you change the value of MAXBSS=24. Anyway 24 AP It is probably enough.
+	 * if you change the value of IWMAX_BSS=24.
 	 */
 	rvalue |= mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r);
 	bsslist = r.ptr;
@@ -757,7 +727,7 @@
 		memcpy(essid.octets, extra, dwrq->length);
 	} else
 		essid.length = 0;
-	
+
 	if (priv->iw_mode != IW_MODE_MONITOR)
 		return mgt_set_request(priv, DOT11_OID_SSID, 0, &essid);
 
@@ -843,21 +813,21 @@
 	char *data;
 	int ret, i;
 	union oid_res_t r;
-	
+
 	if (vwrq->value == -1) {
 		/* auto mode. No limit. */
 		profile = 1;
 		return mgt_set_request(priv, DOT11_OID_PROFILES, 0, &profile);
 	}
-	
+
 	if ((ret =
 	     mgt_get_request(priv, DOT11_OID_SUPPORTEDRATES, 0, NULL, &r)))
 		return ret;
-		
+
 	rate = (u32) (vwrq->value / 500000);
 	data = r.ptr;
 	i = 0;
-	
+
 	while (data[i]) {
 		if (rate && (data[i] == rate)) {
 			break;
@@ -868,14 +838,14 @@
 		data[i] |= 0x80;
 		i++;
 	}
-		
+
 	if (!data[i]) {
 		return -EINVAL;
 	}
-	
+
 	data[i] |= 0x80;
 	data[i + 1] = 0;
-	
+
 	/* Now, check if we want a fixed or auto value */
 	if (vwrq->fixed) {
 		data[0] = data[i];
@@ -890,14 +860,14 @@
 		i++;
 	}
 	printk("0\n");
-*/	
+*/
 	profile = -1;
 	ret = mgt_set_request(priv, DOT11_OID_PROFILES, 0, &profile);
 	ret |= mgt_set_request(priv, DOT11_OID_EXTENDEDRATES, 0, data);
 	ret |= mgt_set_request(priv, DOT11_OID_RATES, 0, data);
-	
+
 	kfree(r.ptr);
-	
+
 	return ret;
 }
 
@@ -923,7 +893,7 @@
 	data = r.ptr;
 	vwrq->fixed = (data[0] != 0) && (data[1] == 0);
 	kfree(r.ptr);
-	
+
 	return 0;
 }
 
@@ -979,8 +949,6 @@
  * small frame <=>  smaller than the rts threshold
  * This is not really the behavior expected by the wireless tool but it seems
  * to be a common behavior in other drivers.
- * 
- * It seems that playing with this tends to hang the card -> DISABLED
  */
 
 static int
@@ -1012,18 +980,16 @@
 		lifetime = vwrq->value / 1024;
 
 	/* now set what is requested */
-
-	if (slimit != 0)
+	if (slimit)
 		rvalue =
 		    mgt_set_request(priv, DOT11_OID_SHORTRETRIES, 0, &slimit);
-	if (llimit != 0)
+	if (llimit)
 		rvalue |=
 		    mgt_set_request(priv, DOT11_OID_LONGRETRIES, 0, &llimit);
-	if (lifetime != 0)
+	if (lifetime)
 		rvalue |=
 		    mgt_set_request(priv, DOT11_OID_MAXTXLIFETIME, 0,
 				    &lifetime);
-
 	return rvalue;
 }
 
@@ -1119,8 +1085,7 @@
 			}
 		}
 	}
-
-	/* now read the flags     */
+	/* now read the flags */
 	if (dwrq->flags & IW_ENCODE_DISABLED) {
 		/* Encoding disabled, 
 		 * authen = DOT11_AUTH_OS;
@@ -1269,13 +1234,8 @@
 
 static int
 prism54_set_u32(struct net_device *ndev, struct iw_request_info *info,
-		   __u32 * uwrq, char *extra)
+		__u32 * uwrq, char *extra)
 {
-	/*
-	   u32 *i = (int *) extra;
-	   int param = *i;
-	   int u = *(i + 1);
-	 */
 	u32 oid = uwrq[0], u = uwrq[1];
 
 	return mgt_set_request((islpci_private *) ndev->priv, oid, 0, &u);
@@ -1846,9 +1806,7 @@
 				     0);
 		break;
 
-		/* Note : the following should never happen since we don't run the card in
-		 * extended mode.
-		 * Note : "mlme" is actually a "struct obj_mlmeex *" here, but this
+		/* Note : "mlme" is actually a "struct obj_mlmeex *" here, but this
 		 * is backward compatible layout-wise with "struct obj_mlme".
 		 */
 
@@ -1893,7 +1851,8 @@
 	struct net_device *ndev = frame->ndev;
 	enum oid_num_t n = mgt_oidtonum(frame->header->oid);
 
-	prism54_process_trap_helper(netdev_priv(ndev), n, frame->data);
+	if (n != OID_NUM_LAST)
+		prism54_process_trap_helper(netdev_priv(ndev), n, frame->data);
 	islpci_mgt_release(frame);
 }
 
@@ -1966,65 +1925,11 @@
 }
 
 int
-prism54_set_maxframeburst(struct net_device *ndev, struct iw_request_info *info,
-			  __u32 * uwrq, char *extra)
-{
-	islpci_private *priv = netdev_priv(ndev);
-	u32 max_burst;
-
-	max_burst = (*uwrq) ? *uwrq : CARD_DEFAULT_MAXFRAMEBURST;
-	mgt_set_request(priv, DOT11_OID_MAXFRAMEBURST, 0, &max_burst);
-
-	return -EINPROGRESS; /* Call commit handler */
-}
-
-int
-prism54_get_maxframeburst(struct net_device *ndev, struct iw_request_info *info,
-			  __u32 * uwrq, char *extra)
-{
-	islpci_private *priv = netdev_priv(ndev);
-	union oid_res_t r;
-	int rvalue;
-	
-	rvalue = mgt_get_request(priv, DOT11_OID_MAXFRAMEBURST, 0, NULL, &r);
-	*uwrq = r.u;
-	
-	return rvalue;
-}
-
-int
-prism54_set_profile(struct net_device *ndev, struct iw_request_info *info,
-		    __u32 * uwrq, char *extra)
-{
-	islpci_private *priv = netdev_priv(ndev);
-	u32 profile;
-
-	profile = (*uwrq) ? *uwrq : CARD_DEFAULT_PROFILE;
-	mgt_set_request(priv, DOT11_OID_PROFILES, 0, &profile);
-	
-	return -EINPROGRESS; /* Call commit handler */
-}
-
-int
-prism54_get_profile(struct net_device *ndev, struct iw_request_info *info,
-		    __u32 * uwrq, char *extra)
-{
-	islpci_private *priv = netdev_priv(ndev);
-	union oid_res_t r;
-	int rvalue;
-
-	rvalue = mgt_get_request(priv, DOT11_OID_PROFILES, 0, NULL, &r);
-	*uwrq = r.u;
-
-	return rvalue;
-}
-
-int
 prism54_debug_oid(struct net_device *ndev, struct iw_request_info *info,
 		  __u32 * uwrq, char *extra)
 {
 	islpci_private *priv = netdev_priv(ndev);
-	
+
 	priv->priv_oid = *uwrq;
 	printk("%s: oid 0x%08X\n", ndev->name, *uwrq);
 
@@ -2033,15 +1938,15 @@
 
 int
 prism54_debug_get_oid(struct net_device *ndev, struct iw_request_info *info,
-		struct iw_point *data, char *extra)
+		      struct iw_point *data, char *extra)
 {
 	islpci_private *priv = netdev_priv(ndev);
 	struct islpci_mgmtframe *response = NULL;
 	int ret = -EIO, response_op = PIMFOR_OP_ERROR;
-	
+
 	printk("%s: get_oid 0x%08X\n", ndev->name, priv->priv_oid);
 	data->length = 0;
-	
+
 	if (islpci_get_state(priv) >= PRV_STATE_INIT) {
 		ret =
 		    islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
@@ -2065,21 +1970,21 @@
 			printk("%s: len: %i\n", ndev->name, data->length);
 		}
 	}
-	
+
 	return ret;
 }
 
 int
 prism54_debug_set_oid(struct net_device *ndev, struct iw_request_info *info,
-		struct iw_point *data, char *extra)
+		      struct iw_point *data, char *extra)
 {
 	islpci_private *priv = netdev_priv(ndev);
 	struct islpci_mgmtframe *response = NULL;
 	int ret = 0, response_op = PIMFOR_OP_ERROR;
-	
+
 	printk("%s: set_oid 0x%08X\tlen: %d\n", ndev->name, priv->priv_oid,
 	       data->length);
-	
+
 	if (islpci_get_state(priv) >= PRV_STATE_INIT) {
 		ret =
 		    islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET,
@@ -2094,11 +1999,11 @@
 		}
 		if (ret || response_op == PIMFOR_OP_ERROR) {
 			printk("%s: EIO\n", ndev->name);
-		        ret = -EIO;
+			ret = -EIO;
 		}
 	}
-	
-	return ret;
+
+	return (ret ? ret : -EINPROGRESS);
 }
 
 static int
@@ -2196,7 +2101,7 @@
 #define PRISM54_DBG_GET_OID	SIOCIWFIRSTPRIV+15
 #define PRISM54_DBG_SET_OID	SIOCIWFIRSTPRIV+16
 
-#define PRISM54_GET_OID	   SIOCIWFIRSTPRIV+17
+#define PRISM54_GET_OID		SIOCIWFIRSTPRIV+17
 #define PRISM54_SET_OID_U32	SIOCIWFIRSTPRIV+18
 #define	PRISM54_SET_OID_STR	SIOCIWFIRSTPRIV+20
 #define	PRISM54_SET_OID_ADDR	SIOCIWFIRSTPRIV+22
@@ -2204,16 +2109,16 @@
 #define PRISM54_GET_PRISMHDR	SIOCIWFIRSTPRIV+23
 #define PRISM54_SET_PRISMHDR	SIOCIWFIRSTPRIV+24
 
-#define IWPRIV_SET_U32(n,x)	{ n, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "set_"x }
-#define IWPRIV_SET_SSID(n,x)	{ n, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | 1, 0, "set_"x }
-#define IWPRIV_SET_ADDR(n,x)	{ n, IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1, 0, "set_"x }
-#define IWPRIV_GET(n,x)	{ n, 0, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | PRIV_STR_SIZE, "get_"x }
+#define IWPRIV_SET_U32(n,x)	{ n, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "s_"x }
+#define IWPRIV_SET_SSID(n,x)	{ n, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | 1, 0, "s_"x }
+#define IWPRIV_SET_ADDR(n,x)	{ n, IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1, 0, "s_"x }
+#define IWPRIV_GET(n,x)	{ n, 0, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | PRIV_STR_SIZE, "g_"x }
 
 #define IWPRIV_U32(n,x)		IWPRIV_SET_U32(n,x), IWPRIV_GET(n,x)
 #define IWPRIV_SSID(n,x)	IWPRIV_SET_SSID(n,x), IWPRIV_GET(n,x)
 #define IWPRIV_ADDR(n,x)	IWPRIV_SET_ADDR(n,x), IWPRIV_GET(n,x)
 
-/* Note : limited to 128 private ioctls */
+/* Note : limited to 128 private ioctls (wireless tools 26) */
 
 static const struct iw_priv_args prism54_private_args[] = {
 /*{ cmd, set_args, get_args, name } */
@@ -2241,7 +2146,7 @@
 	{PRISM54_DBG_OID, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0,
 	 "dbg_oid"},
 	{PRISM54_DBG_GET_OID, 0, IW_PRIV_TYPE_BYTE | 256, "dbg_get_oid"},
-	{PRISM54_DBG_SET_OID, IW_PRIV_TYPE_BYTE | 256, 0, "dbg_get_oid"},
+	{PRISM54_DBG_SET_OID, IW_PRIV_TYPE_BYTE | 256, 0, "dbg_set_oid"},
 	/* --- sub-ioctls handlers --- */
 	{PRISM54_GET_OID,
 	 0, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | PRIV_STR_SIZE, ""},
@@ -2268,7 +2173,7 @@
 	IWPRIV_U32(DOT11_OID_AUTHENABLE, "authenable"),
 	IWPRIV_U32(DOT11_OID_PRIVACYINVOKED, "privinvok"),
 	IWPRIV_U32(DOT11_OID_EXUNENCRYPTED, "exunencrypt"),
-	
+
 	IWPRIV_U32(DOT11_OID_REKEYTHRESHOLD, "rekeythresh"),
 
 	IWPRIV_U32(DOT11_OID_MAXTXLIFETIME, "maxtxlife"),
@@ -2351,5 +2256,6 @@
 int
 prism54_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
 {
+
 	return -EOPNOTSUPP;
 }
--- diff/drivers/net/wireless/prism54/isl_ioctl.h	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/isl_ioctl.h	2004-07-01 21:32:39.000000000 +0100
@@ -30,7 +30,6 @@
 #define SUPPORTED_WIRELESS_EXT                  16
 
 void prism54_mib_init(islpci_private *);
-void prism54_mib_init_work(islpci_private *);
 
 struct iw_statistics *prism54_get_wireless_stats(struct net_device *);
 void prism54_update_stats(islpci_private *);
--- diff/drivers/net/wireless/prism54/islpci_dev.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/islpci_dev.c	2004-07-01 21:32:39.000000000 +0100
@@ -30,6 +30,7 @@
 
 #include <asm/io.h>
 
+#include "prismcompat.h"
 #include "isl_38xx.h"
 #include "isl_ioctl.h"
 #include "islpci_dev.h"
@@ -37,12 +38,6 @@
 #include "islpci_eth.h"
 #include "oid_mgt.h"
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-#define prism54_synchronize_irq(irq) synchronize_irq()
-#else
-#define prism54_synchronize_irq(irq) synchronize_irq(irq)
-#endif
-
 #define ISL3877_IMAGE_FILE	"isl3877"
 #define ISL3890_IMAGE_FILE	"isl3890"
 
@@ -55,6 +50,125 @@
  * ndev->set_mac_address. Jean II */
 const unsigned char	dummy_mac[6] = { 0x00, 0x30, 0xB4, 0x00, 0x00, 0x00 };
 
+static int
+isl_upload_firmware(islpci_private *priv)
+{
+	u32 reg, rc;
+	void *device_base = priv->device_base;
+
+	/* clear the RAMBoot and the Reset bit */
+	reg = readl(device_base + ISL38XX_CTRL_STAT_REG);
+	reg &= ~ISL38XX_CTRL_STAT_RESET;
+	reg &= ~ISL38XX_CTRL_STAT_RAMBOOT;
+	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
+	wmb();
+	udelay(ISL38XX_WRITEIO_DELAY);
+
+	/* set the Reset bit without reading the register ! */
+	reg |= ISL38XX_CTRL_STAT_RESET;
+	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
+	wmb();
+	udelay(ISL38XX_WRITEIO_DELAY);
+
+	/* clear the Reset bit */
+	reg &= ~ISL38XX_CTRL_STAT_RESET;
+	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
+	wmb();
+
+	/* wait a while for the device to reboot */
+	mdelay(50);
+
+	{
+		const struct firmware *fw_entry = 0;
+		long fw_len;
+		const u32 *fw_ptr;
+
+		rc = request_firmware(&fw_entry, priv->firmware, PRISM_FW_PDEV);
+		if (rc) {
+			printk(KERN_ERR
+			       "%s: request_firmware() failed for '%s'\n",
+			       "prism54", priv->firmware);
+			return rc;
+		}
+		/* prepare the Direct Memory Base register */
+		reg = ISL38XX_DEV_FIRMWARE_ADDRES;
+
+		fw_ptr = (u32 *) fw_entry->data;
+		fw_len = fw_entry->size;
+
+		if (fw_len % 4) {
+			printk(KERN_ERR
+			       "%s: firmware '%s' size is not multiple of 32bit, aborting!\n",
+			       "prism54", priv->firmware);
+			release_firmware(fw_entry);
+			return EILSEQ; /* Illegal byte sequence  */;
+		}
+
+		while (fw_len > 0) {
+			long _fw_len =
+			    (fw_len >
+			     ISL38XX_MEMORY_WINDOW_SIZE) ?
+			    ISL38XX_MEMORY_WINDOW_SIZE : fw_len;
+			u32 *dev_fw_ptr = device_base + ISL38XX_DIRECT_MEM_WIN;
+
+			/* set the cards base address for writting the data */
+			isl38xx_w32_flush(device_base, reg,
+					  ISL38XX_DIR_MEM_BASE_REG);
+			wmb();	/* be paranoid */
+
+			/* increment the write address for next iteration */
+			reg += _fw_len;
+			fw_len -= _fw_len;
+
+			/* write the data to the Direct Memory Window 32bit-wise */
+			/* memcpy_toio() doesn't guarantee 32bit writes :-| */
+			while (_fw_len > 0) {
+				/* use non-swapping writel() */
+				__raw_writel(*fw_ptr, dev_fw_ptr);
+				fw_ptr++, dev_fw_ptr++;
+				_fw_len -= 4;
+			}
+
+			/* flush PCI posting */
+			(void) readl(device_base + ISL38XX_PCI_POSTING_FLUSH);
+			wmb();	/* be paranoid again */
+
+			BUG_ON(_fw_len != 0);
+		}
+
+		BUG_ON(fw_len != 0);
+
+		release_firmware(fw_entry);
+	}
+
+	/* now reset the device
+	 * clear the Reset & ClkRun bit, set the RAMBoot bit */
+	reg = readl(device_base + ISL38XX_CTRL_STAT_REG);
+	reg &= ~ISL38XX_CTRL_STAT_CLKRUN;
+	reg &= ~ISL38XX_CTRL_STAT_RESET;
+	reg |= ISL38XX_CTRL_STAT_RAMBOOT;
+	isl38xx_w32_flush(device_base, reg, ISL38XX_CTRL_STAT_REG);
+	wmb();
+	udelay(ISL38XX_WRITEIO_DELAY);
+
+	/* set the reset bit latches the host override and RAMBoot bits
+	 * into the device for operation when the reset bit is reset */
+	reg |= ISL38XX_CTRL_STAT_RESET;
+	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
+	/* don't do flush PCI posting here! */
+	wmb();
+	udelay(ISL38XX_WRITEIO_DELAY);
+
+	/* clear the reset bit should start the whole circus */
+	reg &= ~ISL38XX_CTRL_STAT_RESET;
+	writel(reg, device_base + ISL38XX_CTRL_STAT_REG);
+	/* don't do flush PCI posting here! */
+	wmb();
+	udelay(ISL38XX_WRITEIO_DELAY);
+
+	return 0;
+}
+
 /******************************************************************************
     Device Interrupt Handler
 ******************************************************************************/
@@ -74,7 +188,9 @@
 	if (reg & ISL38XX_CTRL_STAT_SLEEPMODE)
 		/* device is in sleep mode, IRQ was generated by someone else */
 	{
-		printk(KERN_DEBUG "Assuming someone else called the IRQ\n");
+#if VERBOSE > SHOW_ERROR_MESSAGES
+		DEBUG(SHOW_TRACING, "Assuming someone else called the IRQ\n");
+#endif
 		return IRQ_NONE;
 	}
 
@@ -324,14 +440,7 @@
 
 	printk(KERN_DEBUG "%s: uploading firmware...\n", priv->ndev->name);
 
-	rc = isl38xx_upload_firmware(priv->firmware,
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,75))
-		&priv->pdev->dev,
-#else
-		pci_name(priv->pdev),
-#endif
-		priv->device_base,
-		priv->device_host_address);
+	rc = isl_upload_firmware(priv);
 	if (rc) {
 		/* error uploading the firmware */
 		printk(KERN_ERR "%s: could not upload firmware ('%s')\n",
@@ -357,15 +466,8 @@
 	int result = -ETIME;
 	int count;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-	/* This is 2.6 specific, nicer, shorter, but not in 2.4 yet */
 	DEFINE_WAIT(wait);
 	prepare_to_wait(&priv->reset_done, &wait, TASK_UNINTERRUPTIBLE);
-#else
-	DECLARE_WAITQUEUE(wait, current);
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	add_wait_queue(&priv->reset_done, &wait);
-#endif
 	
 	/* now the last step is to reset the interface */
 	isl38xx_interface_reset(priv->device_base, priv->device_host_address);
@@ -390,13 +492,7 @@
 
 	}
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-	/* 2.6 specific too */
 	finish_wait(&priv->reset_done, &wait);
-#else
-	remove_wait_queue(&priv->reset_done, &wait);
-	set_current_state(TASK_RUNNING);
-#endif
 
 	if(result)
 		return result;
@@ -410,7 +506,9 @@
 	 * the IRQ line until we know for sure the reset went through */
 	isl38xx_enable_common_interrupts(priv->device_base);
 
-	prism54_mib_init_work(priv);
+	down_write(&priv->mib_sem);
+	mgt_commit(priv);
+	up_write(&priv->mib_sem);
 
 	islpci_set_state(priv, PRV_STATE_READY);
 
@@ -448,9 +546,9 @@
 	/* reset the mgmt receive queue */
 	for (counter = 0; counter < ISL38XX_CB_MGMT_QSIZE; counter++) {
 		isl38xx_fragment *frag = &cb->rx_data_mgmt[counter];
-		frag->size = MGMT_FRAME_SIZE;
+		frag->size = cpu_to_le16(MGMT_FRAME_SIZE);
 		frag->flags = 0;
-		frag->address = priv->mgmt_rx[counter].pci_addr;
+		frag->address = cpu_to_le32(priv->mgmt_rx[counter].pci_addr);
 	}
 
 	for (counter = 0; counter < ISL38XX_CB_RX_QSIZE; counter++) {
@@ -580,6 +678,7 @@
 			skb = NULL;
 			goto out_free;
 		}
+		skb_reserve(skb, (4 - (long) skb->data) & 0x03);
 		/* add the new allocated sk_buff to the buffer array */
 		priv->data_low_rx[counter] = skb;
 
--- diff/drivers/net/wireless/prism54/islpci_dev.h	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/islpci_dev.h	2004-07-01 21:32:39.000000000 +0100
@@ -29,20 +29,6 @@
 #include <net/iw_handler.h>
 #include <linux/list.h>
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41)
-# include <linux/workqueue.h>
-#else
-# include <linux/tqueue.h>
-# define work_struct tq_struct
-# define INIT_WORK INIT_TQUEUE
-# define schedule_work schedule_task
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23)
-#define free_netdev(x) kfree(x) 
-#define pci_name(x) x->slot_name 
-#endif
-
 #include "isl_38xx.h"
 #include "isl_oid.h"
 #include "islpci_mgt.h"
@@ -187,7 +173,7 @@
 	islpci_state_t state;
 	int state_off;		/* enumeration of off-state, if 0 then
 				 * we're not in any off-state */
-	
+
 	/* WPA stuff */
 	int wpa; /* WPA mode enabled */
 	struct list_head bss_wpa_list;
@@ -210,12 +196,6 @@
 
 #define ISLPCI_TX_TIMEOUT               (2*HZ)
 
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,75))
-# define irqreturn_t void
-# define IRQ_HANDLED
-# define IRQ_NONE
-#endif
-
 irqreturn_t islpci_interrupt(int, void *, struct pt_regs *);
 
 int prism54_post_setup(islpci_private *, int);
--- diff/drivers/net/wireless/prism54/islpci_eth.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/islpci_eth.c	2004-07-01 21:32:39.000000000 +0100
@@ -26,6 +26,7 @@
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
 
+#include "prismcompat.h"
 #include "isl_38xx.h"
 #include "islpci_eth.h"
 #include "islpci_mgt.h"
@@ -104,7 +105,7 @@
 
 	/* check whether the destination queue has enough fragments for the frame */
 	curr_frag = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_TX_DATA_LQ]);
-	if (curr_frag - priv->free_data_tx >= ISL38XX_CB_TX_QSIZE) {
+	if (unlikely(curr_frag - priv->free_data_tx >= ISL38XX_CB_TX_QSIZE)) {
 		printk(KERN_ERR "%s: transmit device queue full when awake\n",
 		       ndev->name);
 		netif_stop_queue(ndev);
@@ -120,7 +121,7 @@
 	/* Check alignment and WDS frame formatting. The start of the packet should
 	 * be aligned on a 4-byte boundary. If WDS is enabled add another 6 bytes
 	 * and add WDS address information */
-	if (((long) skb->data & 0x03) | init_wds) {
+	if (unlikely(((long) skb->data & 0x03) | init_wds)) {
 		/* get the number of bytes to add and re-allign */
 		offset = (4 - (long) skb->data) & 0x03;
 		offset += init_wds ? 6 : 0;
@@ -191,7 +192,7 @@
 	pci_map_address = pci_map_single(priv->pdev,
 					 (void *) skb->data, skb->len,
 					 PCI_DMA_TODEVICE);
-	if (pci_map_address == 0) {
+	if (unlikely(pci_map_address == 0)) {
 		printk(KERN_WARNING "%s: cannot map buffer to PCI\n",
 		       ndev->name);
 
@@ -207,7 +208,7 @@
 	priv->data_low_tx[index] = skb;
 	/* set the proper fragment start address and size information */
 	fragment->size = cpu_to_le16(frame_size);
-	fragment->flags = cpu_to_le16(0);  /* set to 1 if more fragments */
+	fragment->flags = cpu_to_le16(0);	/* set to 1 if more fragments */
 	fragment->address = cpu_to_le32(pci_map_address);
 	curr_frag++;
 
@@ -217,7 +218,7 @@
 	cb->driver_curr_frag[ISL38XX_CB_TX_DATA_LQ] = cpu_to_le32(curr_frag);
 
 	if (curr_frag - priv->free_data_tx + ISL38XX_MIN_QTHRESHOLD
-	                                           > ISL38XX_CB_TX_QSIZE) {
+	    > ISL38XX_CB_TX_QSIZE) {
 		/* stop sends from upper layers */
 		netif_stop_queue(ndev);
 
@@ -238,7 +239,7 @@
 
 	return 0;
 
- drop_free:
+      drop_free:
 	/* free the skbuf structure before aborting */
 	dev_kfree_skb(skb);
 	skb = NULL;
@@ -261,9 +262,9 @@
 	if (priv->ndev->type == ARPHRD_IEEE80211_PRISM) {
 		struct avs_80211_1_header *avs;
 		/* extract the relevant data from the header */
-		u32 clock = hdr->clock;
+		u32 clock = le32_to_cpu(hdr->clock);
 		u8 rate = hdr->rate;
-		u16 freq = be16_to_cpu(hdr->freq);
+		u16 freq = le16_to_cpu(hdr->freq);
 		u8 rssi = hdr->rssi;
 
 		skb_pull(*skb, sizeof (struct rfmon_header));
@@ -274,7 +275,7 @@
 									 avs_80211_1_header),
 								 0, GFP_ATOMIC);
 			if (newskb) {
-				kfree_skb(*skb);
+				dev_kfree_skb_irq(*skb);
 				*skb = newskb;
 			} else
 				return -1;
@@ -286,21 +287,21 @@
 		    (struct avs_80211_1_header *) skb_push(*skb,
 							   sizeof (struct
 								   avs_80211_1_header));
-
-		avs->version = htonl(P80211CAPTURE_VERSION);
-		avs->length = htonl(sizeof (struct avs_80211_1_header));
-		avs->mactime = __cpu_to_be64(clock);
-		avs->hosttime = __cpu_to_be64(jiffies);
-		avs->phytype = htonl(6);	/*OFDM: 6 for (g), 8 for (a) */
-		avs->channel = htonl(channel_of_freq(freq));
-		avs->datarate = htonl(rate * 5);
-		avs->antenna = htonl(0);	/*unknown */
-		avs->priority = htonl(0);	/*unknown */
-		avs->ssi_type = htonl(2);	/*2: dBm, 3: raw RSSI */
-		avs->ssi_signal = htonl(rssi);
-		avs->ssi_noise = htonl(priv->local_iwstatistics.qual.noise);	/*better than 'undefined', I assume */
-		avs->preamble = htonl(0);	/*unknown */
-		avs->encoding = htonl(0);	/*unknown */
+		
+		avs->version = cpu_to_be32(P80211CAPTURE_VERSION);
+		avs->length = cpu_to_be32(sizeof (struct avs_80211_1_header));
+		avs->mactime = cpu_to_be64(le64_to_cpu(clock));
+		avs->hosttime = cpu_to_be64(jiffies);
+		avs->phytype = cpu_to_be32(6);	/*OFDM: 6 for (g), 8 for (a) */
+		avs->channel = cpu_to_be32(channel_of_freq(freq));
+		avs->datarate = cpu_to_be32(rate * 5);
+		avs->antenna = cpu_to_be32(0);	/*unknown */
+		avs->priority = cpu_to_be32(0);	/*unknown */
+		avs->ssi_type = cpu_to_be32(3);	/*2: dBm, 3: raw RSSI */
+		avs->ssi_signal = cpu_to_be32(rssi & 0x7f);
+		avs->ssi_noise = cpu_to_be32(priv->local_iwstatistics.qual.noise);	/*better than 'undefined', I assume */
+		avs->preamble = cpu_to_be32(0);	/*unknown */
+		avs->encoding = cpu_to_be32(0);	/*unknown */
 	} else
 		skb_pull(*skb, sizeof (struct rfmon_header));
 
@@ -381,10 +382,10 @@
 	skb->dev = ndev;
 
 	/* take care of monitor mode and spy monitoring. */
-	if (priv->iw_mode == IW_MODE_MONITOR)
+	if (unlikely(priv->iw_mode == IW_MODE_MONITOR))
 		discard = islpci_monitor_rx(priv, &skb);
 	else {
-		if (skb->data[2 * ETH_ALEN] == 0) {
+		if (unlikely(skb->data[2 * ETH_ALEN] == 0)) {
 			/* The packet has a rx_annex. Read it for spy monitoring, Then
 			 * remove it, while keeping the 2 leading MAC addr.
 			 */
@@ -417,8 +418,8 @@
 	     skb->data[0], skb->data[1], skb->data[2], skb->data[3],
 	     skb->data[4], skb->data[5]);
 #endif
-	if (discard) {
-		dev_kfree_skb(skb);
+	if (unlikely(discard)) {
+		dev_kfree_skb_irq(skb);
 		skb = NULL;
 	} else
 		netif_rx(skb);
@@ -433,11 +434,13 @@
 	       index - priv->free_data_rx < ISL38XX_CB_RX_QSIZE) {
 		/* allocate an sk_buff for received data frames storage
 		 * include any required allignment operations */
-		if (skb = dev_alloc_skb(MAX_FRAGMENT_SIZE_RX + 2), skb == NULL) {
+		skb = dev_alloc_skb(MAX_FRAGMENT_SIZE_RX + 2);
+		if (unlikely(skb == NULL)) {
 			/* error allocating an sk_buff structure elements */
 			DEBUG(SHOW_ERROR_MESSAGES, "Error allocating skb \n");
 			break;
 		}
+		skb_reserve(skb, (4 - (long) skb->data) & 0x03);
 		/* store the new skb structure pointer */
 		index = index % ISL38XX_CB_RX_QSIZE;
 		priv->data_low_rx[index] = skb;
@@ -453,13 +456,13 @@
 		    pci_map_single(priv->pdev, (void *) skb->data,
 				   MAX_FRAGMENT_SIZE_RX + 2,
 				   PCI_DMA_FROMDEVICE);
-		if (priv->pci_map_rx_address[index] == (dma_addr_t) NULL) {
+		if (unlikely(priv->pci_map_rx_address[index] == (dma_addr_t) NULL)) {
 			/* error mapping the buffer to device accessable memory address */
 			DEBUG(SHOW_ERROR_MESSAGES,
 			      "Error mapping DMA address\n");
 
 			/* free the skbuf structure before aborting */
-			dev_kfree_skb((struct sk_buff *) skb);
+			dev_kfree_skb_irq((struct sk_buff *) skb);
 			skb = NULL;
 			break;
 		}
@@ -484,10 +487,10 @@
 void
 islpci_do_reset_and_wake(void *data)
 {
-       islpci_private *priv = (islpci_private *) data;
-       islpci_reset(priv, 1);
-       netif_wake_queue(priv->ndev);
-       priv->reset_task_pending = 0;
+	islpci_private *priv = (islpci_private *) data;
+	islpci_reset(priv, 1);
+	netif_wake_queue(priv->ndev);
+	priv->reset_task_pending = 0;
 }
 
 void
--- diff/drivers/net/wireless/prism54/islpci_hotplug.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/islpci_hotplug.c	2004-07-01 21:32:39.000000000 +0100
@@ -24,12 +24,13 @@
 #include <linux/delay.h>
 #include <linux/init.h> /* For __init, __exit */
 
+#include "prismcompat.h"
 #include "islpci_dev.h"
 #include "islpci_mgt.h"		/* for pc_debug */
 #include "isl_oid.h"
 
 #define DRV_NAME	"prism54"
-#define DRV_VERSION	"1.1"
+#define DRV_VERSION	"1.2"
 
 MODULE_AUTHOR("[Intersil] R.Bastings and W.Termorshuizen, The prism54.org Development Team <prism54-devel@prism54.org>");
 MODULE_DESCRIPTION("The Prism54 802.11 Wireless LAN adapter");
--- diff/drivers/net/wireless/prism54/islpci_mgt.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/islpci_mgt.c	2004-07-01 21:32:39.000000000 +0100
@@ -22,12 +22,12 @@
 #include <linux/netdevice.h>
 #include <linux/module.h>
 #include <linux/pci.h>
-#include <linux/moduleparam.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
 #include <linux/if_arp.h>
 
+#include "prismcompat.h"
 #include "isl_38xx.h"
 #include "islpci_mgt.h"
 #include "isl_oid.h"		/* additional types and defs for isl38xx fw */
@@ -63,7 +63,6 @@
     Queue handling for management frames
 ******************************************************************************/
 
-  
 /*
  * Helper function to create a PIMFOR management frame header.
  */
@@ -86,8 +85,8 @@
 {
 	pimfor_header_t *h = data;
 
-        while ((void *) h < data + len) {
-		if(h->flags & PIMFOR_FLAG_LITTLE_ENDIAN) {
+	while ((void *) h < data + len) {
+		if (h->flags & PIMFOR_FLAG_LITTLE_ENDIAN) {
 			le32_to_cpus(&h->oid);
 			le32_to_cpus(&h->length);
 		} else {
@@ -108,8 +107,8 @@
 islpci_mgmt_rx_fill(struct net_device *ndev)
 {
 	islpci_private *priv = netdev_priv(ndev);
-	isl38xx_control_block *cb =    /* volatile not needed */
-		(isl38xx_control_block *) priv->control_block;
+	isl38xx_control_block *cb =	/* volatile not needed */
+	    (isl38xx_control_block *) priv->control_block;
 	u32 curr = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_RX_MGMTQ]);
 
 #if VERBOSE > SHOW_ERROR_MESSAGES
@@ -124,7 +123,8 @@
 		if (buf->mem == NULL) {
 			buf->mem = kmalloc(MGMT_FRAME_SIZE, GFP_ATOMIC);
 			if (!buf->mem) {
-				printk(KERN_WARNING "Error allocating management frame.\n");
+				printk(KERN_WARNING
+				       "Error allocating management frame.\n");
 				return -ENOMEM;
 			}
 			buf->size = MGMT_FRAME_SIZE;
@@ -133,24 +133,24 @@
 			buf->pci_addr = pci_map_single(priv->pdev, buf->mem,
 						       MGMT_FRAME_SIZE,
 						       PCI_DMA_FROMDEVICE);
-			if(!buf->pci_addr) {
-				printk(KERN_WARNING "Failed to make memory DMA'able\n.");
+			if (!buf->pci_addr) {
+				printk(KERN_WARNING
+				       "Failed to make memory DMA'able\n.");
 				return -ENOMEM;
 			}
 		}
 
-                /* be safe: always reset control block information */
+		/* be safe: always reset control block information */
 		frag->size = cpu_to_le16(MGMT_FRAME_SIZE);
 		frag->flags = 0;
 		frag->address = cpu_to_le32(buf->pci_addr);
 		curr++;
 
-                /* The fragment address in the control block must have
-                 * been written before announcing the frame buffer to
-                 * device */
+		/* The fragment address in the control block must have
+		 * been written before announcing the frame buffer to
+		 * device */
 		wmb();
-		cb->driver_curr_frag[ISL38XX_CB_RX_MGMTQ] =
-			cpu_to_le32(curr);
+		cb->driver_curr_frag[ISL38XX_CB_RX_MGMTQ] = cpu_to_le32(curr);
 	}
 	return 0;
 }
@@ -168,7 +168,7 @@
 {
 	islpci_private *priv = netdev_priv(ndev);
 	isl38xx_control_block *cb =
-		(isl38xx_control_block *) priv->control_block;
+	    (isl38xx_control_block *) priv->control_block;
 	void *p;
 	int err = -EINVAL;
 	unsigned long flags;
@@ -242,25 +242,25 @@
 	priv->mgmt_tx[index] = buf;
 	frag = &cb->tx_data_mgmt[index];
 	frag->size = cpu_to_le16(frag_len);
-	frag->flags = 0;   /* for any other than the last fragment, set to 1 */
+	frag->flags = 0;	/* for any other than the last fragment, set to 1 */
 	frag->address = cpu_to_le32(buf.pci_addr);
 
 	/* The fragment address in the control block must have
 	 * been written before announcing the frame buffer to
 	 * device */
 	wmb();
-	cb->driver_curr_frag[ISL38XX_CB_TX_MGMTQ] = cpu_to_le32(curr_frag+1);
+	cb->driver_curr_frag[ISL38XX_CB_TX_MGMTQ] = cpu_to_le32(curr_frag + 1);
 	spin_unlock_irqrestore(&priv->slock, flags);
 
 	/* trigger the device */
 	islpci_trigger(priv);
 	return 0;
 
- error_unlock:
+      error_unlock:
 	spin_unlock_irqrestore(&priv->slock, flags);
- error_free:
+      error_free:
 	kfree(buf.mem);
- error:
+      error:
 	return err;
 }
 
@@ -274,50 +274,49 @@
 {
 	islpci_private *priv = netdev_priv(ndev);
 	isl38xx_control_block *cb =
-		(isl38xx_control_block *) priv->control_block;
+	    (isl38xx_control_block *) priv->control_block;
 	u32 curr_frag;
 
 #if VERBOSE > SHOW_ERROR_MESSAGES
 	DEBUG(SHOW_FUNCTION_CALLS, "islpci_mgt_receive \n");
 #endif
 
-
-        /* Only once per interrupt, determine fragment range to
-         * process.  This avoids an endless loop (i.e. lockup) if
-         * frames come in faster than we can process them. */
+	/* Only once per interrupt, determine fragment range to
+	 * process.  This avoids an endless loop (i.e. lockup) if
+	 * frames come in faster than we can process them. */
 	curr_frag = le32_to_cpu(cb->device_curr_frag[ISL38XX_CB_RX_MGMTQ]);
 	barrier();
 
-	for ( ; priv->index_mgmt_rx < curr_frag; priv->index_mgmt_rx++) {
+	for (; priv->index_mgmt_rx < curr_frag; priv->index_mgmt_rx++) {
 		pimfor_header_t *header;
 		u32 index = priv->index_mgmt_rx % ISL38XX_CB_MGMT_QSIZE;
 		struct islpci_membuf *buf = &priv->mgmt_rx[index];
 		u16 frag_len;
 		int size;
 		struct islpci_mgmtframe *frame;
-              
-                /* I have no idea (and no documentation) if flags != 0
-                 * is possible.  Drop the frame, reuse the buffer. */
-                if(le16_to_cpu(cb->rx_data_mgmt[index].flags) != 0) {
-                        printk(KERN_WARNING "%s: unknown flags 0x%04x\n",
-                               ndev->name,
-                               le16_to_cpu(cb->rx_data_mgmt[index].flags));
-                        continue;
-                }
+
+		/* I have no idea (and no documentation) if flags != 0
+		 * is possible.  Drop the frame, reuse the buffer. */
+		if (le16_to_cpu(cb->rx_data_mgmt[index].flags) != 0) {
+			printk(KERN_WARNING "%s: unknown flags 0x%04x\n",
+			       ndev->name,
+			       le16_to_cpu(cb->rx_data_mgmt[index].flags));
+			continue;
+		}
 
 		/* The device only returns the size of the header(s) here. */
 		frag_len = le16_to_cpu(cb->rx_data_mgmt[index].size);
 
 		/*
-                 * We appear to have no way to tell the device the
-                 * size of a receive buffer.  Thus, if this check
-                 * triggers, we likely have kernel heap corruption. */
-                if (frag_len > MGMT_FRAME_SIZE) {
-                        printk(KERN_WARNING "%s: Bogus packet size of %d (%#x).\
-n",
-                               ndev->name, frag_len, frag_len);
-                        frag_len = MGMT_FRAME_SIZE;
-                }
+		 * We appear to have no way to tell the device the
+		 * size of a receive buffer.  Thus, if this check
+		 * triggers, we likely have kernel heap corruption. */
+		if (frag_len > MGMT_FRAME_SIZE) {
+			printk(KERN_WARNING
+				"%s: Bogus packet size of %d (%#x).\n",
+				ndev->name, frag_len, frag_len);
+			frag_len = MGMT_FRAME_SIZE;
+		}
 
 		/* Ensure the results of device DMA are visible to the CPU. */
 		pci_dma_sync_single(priv->pdev, buf->pci_addr,
@@ -339,30 +338,32 @@
 #if VERBOSE > SHOW_ERROR_MESSAGES
 		DEBUG(SHOW_PIMFOR_FRAMES,
 		      "PIMFOR: op %i, oid 0x%08x, device %i, flags 0x%x length 0x%x \n",
-		      header->operation, header->oid, header->device_id, 
+		      header->operation, header->oid, header->device_id,
 		      header->flags, header->length);
 
 		/* display the buffer contents for debugging */
 		display_buffer((char *) header, PIMFOR_HEADER_SIZE);
-		display_buffer((char *) header + PIMFOR_HEADER_SIZE, header->length);
+		display_buffer((char *) header + PIMFOR_HEADER_SIZE,
+			       header->length);
 #endif
 
 		/* nobody sends these */
 		if (header->flags & PIMFOR_FLAG_APPLIC_ORIGIN) {
-			printk(KERN_DEBUG "%s: errant PIMFOR application frame\n",
+			printk(KERN_DEBUG
+			       "%s: errant PIMFOR application frame\n",
 			       ndev->name);
 			continue;
 		}
 
 		/* Determine frame size, skipping OID_INL_TUNNEL headers. */
 		size = PIMFOR_HEADER_SIZE + header->length;
-		frame = kmalloc(sizeof(struct islpci_mgmtframe) + size,
+		frame = kmalloc(sizeof (struct islpci_mgmtframe) + size,
 				GFP_ATOMIC);
 		if (!frame) {
-			printk(KERN_WARNING "%s: Out of memory, cannot handle oid 0x%08x\n",
-
+			printk(KERN_WARNING
+			       "%s: Out of memory, cannot handle oid 0x%08x\n",
 			       ndev->name, header->oid);
-			continue;        
+			continue;
 		}
 		frame->ndev = ndev;
 		memcpy(&frame->buf, header, size);
@@ -382,7 +383,7 @@
 			       header->oid, header->device_id, header->flags,
 			       header->length);
 #endif
-                      
+
 			/* Create work to handle trap out of interrupt
 			 * context. */
 			INIT_WORK(&frame->ws, prism54_process_trap, frame);
@@ -392,14 +393,13 @@
 			/* Signal the one waiting process that a response
 			 * has been received. */
 			if ((frame = xchg(&priv->mgmt_received, frame)) != NULL) {
-				printk(KERN_WARNING "%s: mgmt response not collected\n",
+				printk(KERN_WARNING
+				       "%s: mgmt response not collected\n",
 				       ndev->name);
 				kfree(frame);
 			}
-                              
 #if VERBOSE > SHOW_ERROR_MESSAGES
-			DEBUG(SHOW_TRACING,
-			      "Wake up Mgmt Queue\n");
+			DEBUG(SHOW_TRACING, "Wake up Mgmt Queue\n");
 #endif
 			wake_up(&priv->mgmt_wqueue);
 		}
@@ -416,22 +416,22 @@
 islpci_mgt_cleanup_transmit(struct net_device *ndev)
 {
 	islpci_private *priv = netdev_priv(ndev);
-	isl38xx_control_block *cb =    /* volatile not needed */
-		(isl38xx_control_block *) priv->control_block;
+	isl38xx_control_block *cb =	/* volatile not needed */
+	    (isl38xx_control_block *) priv->control_block;
 	u32 curr_frag;
 
 #if VERBOSE > SHOW_ERROR_MESSAGES
-        DEBUG(SHOW_FUNCTION_CALLS, "islpci_mgt_cleanup_transmit\n");
+	DEBUG(SHOW_FUNCTION_CALLS, "islpci_mgt_cleanup_transmit\n");
 #endif
 
 	/* Only once per cleanup, determine fragment range to
 	 * process.  This avoids an endless loop (i.e. lockup) if
 	 * the device became confused, incrementing device_curr_frag
 	 * rapidly. */
-	curr_frag = le32_to_cpu(cb->device_curr_frag[ISL38XX_CB_TX_MGMTQ]); 
+	curr_frag = le32_to_cpu(cb->device_curr_frag[ISL38XX_CB_TX_MGMTQ]);
 	barrier();
 
-	for ( ; priv->index_mgmt_tx < curr_frag; priv->index_mgmt_tx++) {
+	for (; priv->index_mgmt_tx < curr_frag; priv->index_mgmt_tx++) {
 		int index = priv->index_mgmt_tx % ISL38XX_CB_MGMT_QSIZE;
 		struct islpci_membuf *buf = &priv->mgmt_tx[index];
 		pci_unmap_single(priv->pdev, buf->pci_addr, buf->size,
@@ -456,23 +456,14 @@
 	const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000;
 	long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies;
 	int err;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 	DEFINE_WAIT(wait);
-#else
-	DECLARE_WAITQUEUE(wait, current);
-#endif
 
 	if (down_interruptible(&priv->mgmt_sem))
 		return -ERESTARTSYS;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 	prepare_to_wait(&priv->mgmt_wqueue, &wait, TASK_UNINTERRUPTIBLE);
-#else
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	add_wait_queue(&priv->mgmt_wqueue, &wait);
-#endif
 	err = islpci_mgt_transmit(ndev, operation, oid, senddata, sendlen);
-	if(err)
+	if (err)
 		goto out;
 
 	err = -ETIMEDOUT;
@@ -483,13 +474,24 @@
 		timeleft = schedule_timeout(wait_cycle_jiffies);
 		frame = xchg(&priv->mgmt_received, NULL);
 		if (frame) {
-			*recvframe = frame;
-			err = 0;
-			goto out;
-		}
-		if(timeleft == 0) {
-			printk(KERN_DEBUG "%s: timeout waiting for mgmt response %lu, trigging device\n",
-			       ndev->name, timeout_left);
+			if (frame->header->oid == oid) {
+				*recvframe = frame;
+				err = 0;
+				goto out;
+			} else {
+				printk(KERN_DEBUG
+				       "%s: expecting oid 0x%x, received 0x%x.\n",
+				       ndev->name, (unsigned int) oid,
+				       frame->header->oid);
+				kfree(frame);
+				frame = NULL;
+			}
+		}
+		if (timeleft == 0) {
+			printk(KERN_DEBUG
+				"%s: timeout waiting for mgmt response %lu, "
+				"triggering device\n",
+				ndev->name, timeout_left);
 			islpci_trigger(priv);
 		}
 		timeout_left += timeleft - wait_cycle_jiffies;
@@ -499,12 +501,7 @@
 
 	/* TODO: we should reset the device here */     
  out:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 	finish_wait(&priv->mgmt_wqueue, &wait);
-#else
-	remove_wait_queue(&priv->mgmt_wqueue, &wait);
-	set_current_state(TASK_RUNNING);
-#endif
 	up(&priv->mgmt_sem);
 	return err;
 }
--- diff/drivers/net/wireless/prism54/islpci_mgt.h	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/islpci_mgt.h	2004-07-01 21:32:39.000000000 +0100
@@ -24,15 +24,6 @@
 #include <linux/wireless.h>
 #include <linux/skbuff.h>
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41)
-# include <linux/workqueue.h>
-#else
-# include <linux/tqueue.h>
-# define work_struct tq_struct
-# define INIT_WORK INIT_TQUEUE
-# define schedule_work schedule_task
-#endif
-
 /*
  *  Function definitions
  */
@@ -43,7 +34,7 @@
 #define TRACE(devname)   K_DEBUG(SHOW_TRACING, VERBOSE, "%s:  -> " __FUNCTION__ "()\n", devname)
 
 extern int pc_debug;
-static const int init_wds = 0;	/* help compiler optimize away dead code */
+#define init_wds 0	/* help compiler optimize away dead code */
 
 
 /* General driver definitions */
--- diff/drivers/net/wireless/prism54/oid_mgt.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/oid_mgt.c	2004-07-01 21:32:39.000000000 +0100
@@ -16,6 +16,7 @@
  *
  */
 
+#include "prismcompat.h"
 #include "islpci_dev.h"
 #include "islpci_mgt.h"
 #include "isl_oid.h"
@@ -39,17 +40,13 @@
 	if ((f >= 2412) && (f <= 2484)) {
 		while ((c < 14) && (f != frequency_list_bg[c]))
 			c++;
-		if (c >= 14)
-			return 0;
+		return (c >= 14) ? 0 : ++c;
 	} else if ((f >= (int) 5170) && (f <= (int) 5320)) {
 		while ((c < 12) && (f != frequency_list_a[c]))
 			c++;
-		if (c >= 12)
-			return 0;
+		return (c >= 12) ? 0 : (c + 37);
 	} else
 		return 0;
-
-	return ++c;
 }
 
 #define OID_STRUCT(name,oid,s,t) [name] = {oid, 0, sizeof(s), t}
@@ -449,7 +446,7 @@
 	if (cache)
 		down_write(&priv->mib_sem);
 
-	if (islpci_get_state(priv) >= PRV_STATE_INIT) {
+	if (islpci_get_state(priv) >= PRV_STATE_READY) {
 		ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET, oid,
 					     _data, dlen, &response);
 		if (!ret) {
@@ -457,7 +454,7 @@
 			islpci_mgt_release(response);
 		}
 		if (ret || response_op == PIMFOR_OP_ERROR)
-		        ret = -EIO;
+			ret = -EIO;
 	} else if (!cache)
 		ret = -EIO;
 
@@ -482,7 +479,7 @@
 	int ret = -EIO;
 	int reslen = 0;
 	struct islpci_mgmtframe *response = NULL;
-	
+
 	int dlen;
 	void *cache, *_res = NULL;
 	u32 oid;
@@ -503,11 +500,11 @@
 	if (cache)
 		down_read(&priv->mib_sem);
 
-	if (islpci_get_state(priv) >= PRV_STATE_INIT) {
+	if (islpci_get_state(priv) >= PRV_STATE_READY) {
 		ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
 					     oid, data, dlen, &response);
 		if (ret || !response ||
-			response->header->operation == PIMFOR_OP_ERROR) {
+		    response->header->operation == PIMFOR_OP_ERROR) {
 			if (response)
 				islpci_mgt_release(response);
 			ret = -EIO;
@@ -542,9 +539,9 @@
 	if (reslen > isl_oid[n].size)
 		printk(KERN_DEBUG
 		       "mgt_get_request(0x%x): received data length was bigger "
-		       "than expected (%d > %d). Memory is probably corrupted... ",
+		       "than expected (%d > %d). Memory is probably corrupted...",
 		       oid, reslen, isl_oid[n].size);
-	
+
 	return ret;
 }
 
@@ -564,11 +561,11 @@
 		while (j <= t->range) {
 			response = NULL;
 			ret |= islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET,
-			                              oid, data, t->size,
+						      oid, data, t->size,
 						      &response);
 			if (response) {
 				ret |= (response->header->operation ==
-				        PIMFOR_OP_ERROR);
+					PIMFOR_OP_ERROR);
 				islpci_mgt_release(response);
 			}
 			j++;
@@ -625,12 +622,32 @@
 	OID_INL_OUTPUTPOWER,
 };
 
+/* update the MAC addr. */
+static int
+mgt_update_addr(islpci_private *priv)
+{
+	struct islpci_mgmtframe *res;
+	int ret;
+
+	ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
+				     isl_oid[GEN_OID_MACADDRESS].oid, NULL,
+				     isl_oid[GEN_OID_MACADDRESS].size, &res);
+
+	if ((ret == 0) && res && (res->header->operation != PIMFOR_OP_ERROR))
+		memcpy(priv->ndev->dev_addr, res->data, 6);
+	else
+		ret = -EIO;
+	if (res)
+		islpci_mgt_release(res);
+
+	return ret;
+}
+
 void
 mgt_commit(islpci_private *priv)
 {
 	int rvalue;
 	u32 u;
-	union oid_res_t r;
 
 	if (islpci_get_state(priv) < PRV_STATE_INIT)
 		return;
@@ -646,21 +663,14 @@
 
 	u = OID_INL_MODE;
 	rvalue |= mgt_commit_list(priv, &u, 1);
+	rvalue |= mgt_update_addr(priv);
 
 	if (rvalue) {
 		/* some request have failed. The device might be in an
 		   incoherent state. We should reset it ! */
 		printk(KERN_DEBUG "%s: mgt_commit has failed. Restart the "
-                "device \n", priv->ndev->name);
+		       "device \n", priv->ndev->name);
 	}
-
-	/* update the MAC addr. As it's not cached, no lock will be acquired by
-	 * the mgt_get_request
-	 */
-	mgt_get_request(priv, GEN_OID_MACADDRESS, 0, NULL, &r);
-	memcpy(priv->ndev->dev_addr, r.ptr, 6);
-	kfree(r.ptr);
-
 }
 
 /* This will tell you if you are allowed to answer a mlme(ex) request .*/
@@ -687,13 +697,13 @@
 {
 	int i;
 
-	for (i = 0; i < OID_NUM_LAST - 1; i++)
+	for (i = 0; i < OID_NUM_LAST; i++)
 		if (isl_oid[i].oid == oid)
 			return i;
 
 	printk(KERN_DEBUG "looking for an unknown oid 0x%x", oid);
 
-	return 0;
+	return OID_NUM_LAST;
 }
 
 int
@@ -713,8 +723,11 @@
 	case OID_TYPE_BSS:{
 			struct obj_bss *bss = r->ptr;
 			return snprintf(str, PRIV_STR_SIZE,
-					"age=%u\nchannel=%u\n\
-				        capinfo=0x%X\nrates=0x%X\nbasic_rates=0x%X\n", bss->age, bss->channel, bss->capinfo, bss->rates, bss->basic_rates);
+					"age=%u\nchannel=%u\n"
+					"capinfo=0x%X\nrates=0x%X\n"
+					"basic_rates=0x%X\n", bss->age,
+					bss->channel, bss->capinfo,
+					bss->rates, bss->basic_rates);
 		}
 		break;
 	case OID_TYPE_BSSLIST:{
@@ -723,7 +736,9 @@
 			k = snprintf(str, PRIV_STR_SIZE, "nr=%u\n", list->nr);
 			for (i = 0; i < list->nr; i++)
 				k += snprintf(str + k, PRIV_STR_SIZE - k,
-					      "bss[%u] : \nage=%u\nchannel=%u\ncapinfo=0x%X\nrates=0x%X\nbasic_rates=0x%X\n",
+					      "bss[%u] : \nage=%u\nchannel=%u\n"
+					      "capinfo=0x%X\nrates=0x%X\n"
+					      "basic_rates=0x%X\n",
 					      i, list->bsslist[i].age,
 					      list->bsslist[i].channel,
 					      list->bsslist[i].capinfo,
@@ -745,16 +760,17 @@
 		break;
 	case OID_TYPE_MLME:{
 			struct obj_mlme *mlme = r->ptr;
-			return snprintf(str, PRIV_STR_SIZE, "id=0x%X\nstate=0x%X\n\
-			         code=0x%X\n", mlme->id, mlme->state,
-					mlme->code);
+			return snprintf(str, PRIV_STR_SIZE,
+					"id=0x%X\nstate=0x%X\ncode=0x%X\n",
+					mlme->id, mlme->state, mlme->code);
 		}
 		break;
 	case OID_TYPE_MLMEEX:{
 			struct obj_mlmeex *mlme = r->ptr;
-			return snprintf(str, PRIV_STR_SIZE, "id=0x%X\nstate=0x%X\n\
-			         code=0x%X\nsize=0x%X\n", mlme->id, mlme->state,
-					mlme->code, mlme->size);
+			return snprintf(str, PRIV_STR_SIZE,
+					"id=0x%X\nstate=0x%X\n"
+					"code=0x%X\nsize=0x%X\n", mlme->id,
+					mlme->state, mlme->code, mlme->size);
 		}
 		break;
 	case OID_TYPE_SSID:{
--- diff/drivers/net/wireless/prism54/oid_mgt.h	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/prism54/oid_mgt.h	2004-07-01 21:32:39.000000000 +0100
@@ -38,7 +38,7 @@
 int mgt_set_request(islpci_private *, enum oid_num_t, int, void *);
 
 int mgt_get_request(islpci_private *, enum oid_num_t, int, void *,
-                    union oid_res_t *);
+		    union oid_res_t *);
 
 int mgt_commit_list(islpci_private *, enum oid_num_t *, int);
 
--- diff/drivers/net/wireless/ray_cs.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wireless/ray_cs.c	2004-07-01 21:32:39.000000000 +0100
@@ -570,6 +570,7 @@
         return;
     }
 
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
     i = register_netdev(dev);
     if (i != 0) {
         printk("ray_config register_netdev() failed\n");
@@ -2854,7 +2855,7 @@
 	}
 }
 
-static int write_essid(struct file *file, const char *buffer, unsigned long count, void *data)
+static int write_essid(struct file *file, const char __user *buffer, unsigned long count, void *data)
 {
 	static char proc_essid[33];
 	int len = count;
@@ -2868,7 +2869,7 @@
 	return count;
 }
 
-static int write_int(struct file *file, const char *buffer, unsigned long count, void *data)
+static int write_int(struct file *file, const char __user *buffer, unsigned long count, void *data)
 {
 	static char proc_number[10];
 	char *p;
--- diff/drivers/net/wireless/strip.c	2004-05-19 22:12:01.000000000 +0100
+++ source/drivers/net/wireless/strip.c	2004-07-01 21:32:39.000000000 +0100
@@ -409,12 +409,12 @@
 static const MetricomAddress broadcast_address =
     { {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} };
 
-static const MetricomKey SIP0Key = { {"SIP0"} };
-static const MetricomKey ARP0Key = { {"ARP0"} };
-static const MetricomKey ATR_Key = { {"ATR "} };
-static const MetricomKey ACK_Key = { {"ACK_"} };
-static const MetricomKey INF_Key = { {"INF_"} };
-static const MetricomKey ERR_Key = { {"ERR_"} };
+static const MetricomKey SIP0Key = { "SIP0" };
+static const MetricomKey ARP0Key = { "ARP0" };
+static const MetricomKey ATR_Key = { "ATR " };
+static const MetricomKey ACK_Key = { "ACK_" };
+static const MetricomKey INF_Key = { "INF_" };
+static const MetricomKey ERR_Key = { "ERR_" };
 
 static const long MaxARPInterval = 60 * HZ;	/* One minute */
 
@@ -2733,14 +2733,14 @@
 
 	switch (cmd) {
 	case SIOCGIFNAME:
-		if(copy_to_user((void *) arg, strip_info->dev->name, strlen(strip_info->dev->name) + 1))
+		if(copy_to_user((void __user *) arg, strip_info->dev->name, strlen(strip_info->dev->name) + 1))
 			return -EFAULT;
 		break;
 	case SIOCSIFHWADDR:
 	{
 		MetricomAddress addr;
 		//printk(KERN_INFO "%s: SIOCSIFHWADDR\n", strip_info->dev->name);
-		if(copy_from_user(&addr, (void *) arg, sizeof(MetricomAddress)))
+		if(copy_from_user(&addr, (void __user *) arg, sizeof(MetricomAddress)))
 			return -EFAULT;
 		return set_mac_address(strip_info, &addr);
 	}
@@ -2750,7 +2750,7 @@
 
 	case TCGETS:
 	case TCGETA:
-		return n_tty_ioctl(tty, (struct file *) file, cmd, (unsigned long) arg);
+		return n_tty_ioctl(tty, file, cmd, arg);
 		break;
 	default:
 		return -ENOIOCTLCMD;
--- diff/drivers/net/wireless/wavelan_cs.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/wavelan_cs.c	2004-07-01 21:32:39.000000000 +0100
@@ -4112,6 +4112,7 @@
 	     (u_int) dev->mem_start, dev->irq, (u_int) dev->base_addr);
 #endif
 
+      SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
       i = register_netdev(dev);
       if(i != 0)
 	{
--- diff/drivers/net/wireless/wl3501_cs.c	2004-06-30 14:25:49.000000000 +0100
+++ source/drivers/net/wireless/wl3501_cs.c	2004-07-01 21:32:39.000000000 +0100
@@ -2146,6 +2146,7 @@
 
 	dev->irq = link->irq.AssignedIRQ;
 	dev->base_addr = link->io.BasePort1;
+	SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 	if (register_netdev(dev)) {
 		printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n");
 		goto failed;
--- diff/drivers/net/yellowfin.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/net/yellowfin.c	2004-07-01 21:32:39.000000000 +0100
@@ -448,7 +448,7 @@
 
 	np = dev->priv;
 
-	if (pci_request_regions(pdev, dev->name))
+	if (pci_request_regions(pdev, DRV_NAME))
 		goto err_out_free_netdev;
 
 	pci_set_master (pdev);
@@ -1201,13 +1201,8 @@
 					break;
 				skb->dev = dev;
 				skb_reserve(skb, 2);	/* 16 byte align the IP header */
-#if HAS_IP_COPYSUM
 				eth_copy_and_sum(skb, rx_skb->tail, pkt_len, 0);
 				skb_put(skb, pkt_len);
-#else
-				memcpy(skb_put(skb, pkt_len), 
-					rx_skb->tail, pkt_len);
-#endif
 				pci_dma_sync_single_for_device(yp->pci_dev, desc->addr,
 											   yp->rx_buf_sz,
 											   PCI_DMA_FROMDEVICE);
--- diff/drivers/net/zorro8390.c	2004-05-19 22:11:56.000000000 +0100
+++ source/drivers/net/zorro8390.c	2004-07-01 21:32:39.000000000 +0100
@@ -36,6 +36,8 @@
 #include "8390.h"
 
 
+#define DRV_NAME	"zorro8390"
+
 #define NE_BASE		(dev->base_addr)
 #define NE_CMD		(0x00*2)
 #define NE_DATAPORT	(0x10*2)	/* NatSemi-defined port window offset. */
@@ -115,7 +117,7 @@
     if (!dev)
 	return -ENOMEM;
     SET_MODULE_OWNER(dev);
-    if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, dev->name)) {
+    if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) {
 	free_netdev(dev);
 	return -EBUSY;
     }
@@ -198,7 +200,7 @@
     dev->irq = IRQ_AMIGA_PORTS;
 
     /* Install the Interrupt handler */
-    i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, dev->name, dev);
+    i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, DRV_NAME, dev);
     if (i) return i;
 
     for(i = 0; i < ETHER_ADDR_LEN; i++) {
--- diff/drivers/oprofile/oprofile_files.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/oprofile/oprofile_files.c	2004-07-01 21:32:39.000000000 +0100
@@ -90,7 +90,7 @@
 void oprofile_create_files(struct super_block * sb, struct dentry * root)
 {
 	oprofilefs_create_file(sb, root, "enable", &enable_fops);
-	oprofilefs_create_file(sb, root, "dump", &dump_fops);
+	oprofilefs_create_file_perm(sb, root, "dump", &dump_fops, 0666);
 	oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops);
 	oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size);
 	oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed);
--- diff/drivers/oprofile/oprofilefs.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/oprofile/oprofilefs.c	2004-07-01 21:32:40.000000000 +0100
@@ -165,7 +165,8 @@
 
 
 static struct dentry * __oprofilefs_create_file(struct super_block * sb,
-	struct dentry * root, char const * name, struct file_operations * fops)
+	struct dentry * root, char const * name, struct file_operations * fops,
+	int perm)
 {
 	struct dentry * dentry;
 	struct inode * inode;
@@ -176,7 +177,7 @@
 	dentry = d_alloc(root, &qname);
 	if (!dentry)
 		return 0;
-	inode = oprofilefs_get_inode(sb, S_IFREG | 0644);
+	inode = oprofilefs_get_inode(sb, S_IFREG | perm);
 	if (!inode) {
 		dput(dentry);
 		return 0;
@@ -190,7 +191,8 @@
 int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root,
 	char const * name, unsigned long * val)
 {
-	struct dentry * d = __oprofilefs_create_file(sb, root, name, &ulong_fops);
+	struct dentry * d = __oprofilefs_create_file(sb, root, name,
+						     &ulong_fops, 0644);
 	if (!d)
 		return -EFAULT;
 
@@ -202,7 +204,8 @@
 int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root,
 	char const * name, unsigned long * val)
 {
-	struct dentry * d = __oprofilefs_create_file(sb, root, name, &ulong_ro_fops);
+	struct dentry * d = __oprofilefs_create_file(sb, root, name,
+						     &ulong_ro_fops, 0444);
 	if (!d)
 		return -EFAULT;
 
@@ -227,7 +230,8 @@
 int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root,
 	char const * name, atomic_t * val)
 {
-	struct dentry * d = __oprofilefs_create_file(sb, root, name, &atomic_ro_fops);
+	struct dentry * d = __oprofilefs_create_file(sb, root, name,
+						     &atomic_ro_fops, 0444);
 	if (!d)
 		return -EFAULT;
 
@@ -239,7 +243,16 @@
 int oprofilefs_create_file(struct super_block * sb, struct dentry * root,
 	char const * name, struct file_operations * fops)
 {
-	if (!__oprofilefs_create_file(sb, root, name, fops))
+	if (!__oprofilefs_create_file(sb, root, name, fops, 0644))
+		return -EFAULT;
+	return 0;
+}
+
+
+int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root,
+	char const * name, struct file_operations * fops, int perm)
+{
+	if (!__oprofilefs_create_file(sb, root, name, fops, perm))
 		return -EFAULT;
 	return 0;
 }
--- diff/drivers/parisc/ccio-dma.c	2004-05-19 22:12:02.000000000 +0100
+++ source/drivers/parisc/ccio-dma.c	2004-07-01 21:32:40.000000000 +0100
@@ -44,7 +44,6 @@
 #include <asm/byteorder.h>
 #include <asm/cache.h>		/* for L1_CACHE_BYTES */
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/page.h>
 #include <asm/dma.h>
 #include <asm/io.h>
--- diff/drivers/parisc/ccio-rm-dma.c	2004-05-19 22:12:02.000000000 +0100
+++ source/drivers/parisc/ccio-rm-dma.c	2004-07-01 21:32:40.000000000 +0100
@@ -40,7 +40,6 @@
 #include <linux/pci.h>
 
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 
 #include <asm/io.h>
 #include <asm/hardware.h>
--- diff/drivers/parport/ChangeLog	2004-05-19 22:12:02.000000000 +0100
+++ source/drivers/parport/ChangeLog	2004-07-01 21:32:40.000000000 +0100
@@ -1,3 +1,7 @@
+2001-10-11  Tim Waugh  <twaugh@redhat.com>
+	* parport_pc.c, parport_serial.c: Support for NetMos cards.
+	+ Patch originally from Michael Reinelt <reinelt@eunet.at>.
+
 2002-04-25  Tim Waugh  <twaugh@redhat.com>
 
 	* parport_serial.c, parport_pc.c: Move some SIIG cards around.
--- diff/drivers/parport/parport_pc.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/parport/parport_pc.c	2004-07-01 21:32:40.000000000 +0100
@@ -2632,6 +2632,10 @@
 	oxsemi_840,
 	aks_0100,
 	mobility_pp,
+	netmos_9705,
+	netmos_9805,
+	netmos_9815,
+	netmos_9855,
 };
 
 
@@ -2701,6 +2705,10 @@
 	/* oxsemi_840 */		{ 1, { { 0, -1 }, } },
 	/* aks_0100 */                  { 1, { { 0, -1 }, } },
 	/* mobility_pp */		{ 1, { { 0, 1 }, } },
+	/* netmos_9705 */               { 1, { { 0, -1 }, } }, /* untested */
+	/* netmos_9805 */               { 1, { { 0, -1 }, } }, /* untested */
+	/* netmos_9815 */               { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */
+	/* netmos_9855 */               { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */
 };
 
 static struct pci_device_id parport_pc_pci_tbl[] = {
@@ -2769,6 +2777,15 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, oxsemi_840 },
 	{ PCI_VENDOR_ID_AKS, PCI_DEVICE_ID_AKS_ALADDINCARD,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, aks_0100 },
+	/* NetMos communication controllers */
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9705,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9705 },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9805,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9805 },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9815,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9815 },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9855 },
 	{ 0, } /* terminate list */
 };
 MODULE_DEVICE_TABLE(pci,parport_pc_pci_tbl);
--- diff/drivers/parport/parport_serial.c	2004-05-19 22:12:02.000000000 +0100
+++ source/drivers/parport/parport_serial.c	2004-07-01 21:32:40.000000000 +0100
@@ -33,6 +33,8 @@
 enum parport_pc_pci_cards {
 	titan_110l = 0,
 	titan_210l,
+	netmos_9735,
+	netmos_9835,
 	avlab_1s1p,
 	avlab_1s1p_650,
 	avlab_1s1p_850,
@@ -71,6 +73,8 @@
 } cards[] __devinitdata = {
 	/* titan_110l */		{ 1, { { 3, -1 }, } },
 	/* titan_210l */		{ 1, { { 3, -1 }, } },
+	/* netmos_9735 (not tested) */	{ 1, { { 2, -1 }, } },
+	/* netmos_9835 */		{ 1, { { 2, -1 }, } },
 	/* avlab_1s1p     */		{ 1, { { 1, 2}, } },
 	/* avlab_1s1p_650 */		{ 1, { { 1, 2}, } },
 	/* avlab_1s1p_850 */		{ 1, { { 1, 2}, } },
@@ -93,6 +97,10 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_110l },
 	{ PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_210L,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_210l },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9735,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9735 },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9835 },
 	/* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
 	{ 0x14db, 0x2110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p},
 	{ 0x14db, 0x2111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p_650},
@@ -172,6 +180,8 @@
 
 /* titan_110l */	{ SPCI_FL_BASE1 | SPCI_FL_BASE_TABLE, 1, 921600 },
 /* titan_210l */	{ SPCI_FL_BASE1 | SPCI_FL_BASE_TABLE, 2, 921600 },
+/* netmos_9735 (n/t)*/	{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 },
+/* netmos_9835 */	{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 },
 /* avlab_1s1p (n/t) */	{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 },
 /* avlab_1s1p_650 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 },
 /* avlab_1s1p_850 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 },
--- diff/drivers/pci/Kconfig	2004-05-19 22:12:02.000000000 +0100
+++ source/drivers/pci/Kconfig	2004-07-01 21:32:40.000000000 +0100
@@ -3,7 +3,7 @@
 #
 config PCI_USE_VECTOR
 	bool "Vector-based interrupt indexing (MSI)"
-	depends on (X86_LOCAL_APIC && X86_IO_APIC && !X86_64) || IA64
+	depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64
 	default n
 	help
 	   This replaces the current existing IRQ-based index interrupt scheme
--- diff/drivers/pci/hotplug/pciehp_ctrl.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/pciehp_ctrl.c	2004-07-01 21:32:40.000000000 +0100
@@ -1058,6 +1058,34 @@
    hotplug controller logic
  */
 
+static void set_slot_off(struct controller *ctrl, struct slot * pslot)
+{
+	/* Wait for exclusive access to hardware */
+	down(&ctrl->crit_sect);
+
+	/* turn off slot, turn on Amber LED, turn off Green LED */
+	if (pslot->hpc_ops->power_off_slot(pslot)) {   
+		err("%s: Issue of Slot Power Off command failed\n", __FUNCTION__);
+		up(&ctrl->crit_sect);
+		return;
+	}
+	wait_for_ctrl_irq (ctrl);
+
+	pslot->hpc_ops->green_led_off(pslot);   
+	
+	wait_for_ctrl_irq (ctrl);
+
+	/* turn on Amber LED */
+	if (pslot->hpc_ops->set_attention_status(pslot, 1)) {   
+		err("%s: Issue of Set Attention Led command failed\n", __FUNCTION__);
+		up(&ctrl->crit_sect);
+		return;
+	}
+	wait_for_ctrl_irq (ctrl);
+
+	/* Done with exclusive hardware access */
+	up(&ctrl->crit_sect);
+}
 
 /**
  * board_added - Called after a board has been added to the system.
@@ -1071,7 +1099,7 @@
 	u8 hp_slot;
 	int index;
 	u32 temp_register = 0xFFFFFFFF;
-	u32 retval, rc = 0;
+	u32 rc = 0;
 	struct pci_func *new_func = NULL;
 	struct slot *p_slot;
 	struct resource_lists res_lists;
@@ -1086,8 +1114,10 @@
 
 	/* Power on slot */
 	rc = p_slot->hpc_ops->power_on_slot(p_slot);
-	if (rc)
+	if (rc) {
+		up(&ctrl->crit_sect);
 		return -1;
+	}
 
 	/* Wait for the command to complete */
 	wait_for_ctrl_irq (ctrl);
@@ -1105,11 +1135,12 @@
 	wait_for_ctrl_irq (ctrl);
 	dbg("%s: afterlong_delay\n", __FUNCTION__);
 
-	/*  Make this to check for link training status */
+	/*  Check link training status */
 	rc = p_slot->hpc_ops->check_lnk_status(ctrl);  
 	if (rc) {
 		err("%s: Failed to check link status\n", __FUNCTION__);
-		return -1;
+		set_slot_off(ctrl, p_slot);
+		return rc;
 	}
 
 	dbg("%s: func status = %x\n", __FUNCTION__, func->status);
@@ -1159,36 +1190,7 @@
 		pciehp_resource_sort_and_combine(&(ctrl->bus_head));
 
 		if (rc) {
-			/* Wait for exclusive access to hardware */
-			down(&ctrl->crit_sect);
-
-			/* turn off slot, turn on Amber LED, turn off Green LED */
-			retval = p_slot->hpc_ops->power_off_slot(p_slot);   
-			/* In PCI Express, just power off slot */
-			if (retval) {
-				err("%s: Issue of Slot Power Off command failed\n", __FUNCTION__);
-				return retval;
-			}
-			/* Wait for the command to complete */
-			wait_for_ctrl_irq (ctrl);
-
-			p_slot->hpc_ops->green_led_off(p_slot);   
-			
-			/* Wait for the command to complete */
-			wait_for_ctrl_irq (ctrl);
-
-			/* turn on Amber LED */
-			retval = p_slot->hpc_ops->set_attention_status(p_slot, 1);   
-			if (retval) {
-				err("%s: Issue of Set Attention Led command failed\n", __FUNCTION__);
-				return retval;
-			}
-			/* Wait for the command to complete */
-			wait_for_ctrl_irq (ctrl);
-
-			/* Done with exclusive hardware access */
-			up(&ctrl->crit_sect);
-
+			set_slot_off(ctrl, p_slot);
 			return rc;
 		}
 		pciehp_save_slot_config(ctrl, func);
@@ -1223,37 +1225,8 @@
 		up(&ctrl->crit_sect);
 
 	} else {
-		/* Wait for exclusive access to hardware */
-		down(&ctrl->crit_sect);
-
-		/* turn off slot, turn on Amber LED, turn off Green LED */
-		retval = p_slot->hpc_ops->power_off_slot(p_slot);   
-		/* In PCI Express, just power off slot */
-		if (retval) {
-			err("%s: Issue of Slot Power Off command failed\n", __FUNCTION__);
-			return retval;
-		}
-		/* Wait for the command to complete */
-		wait_for_ctrl_irq (ctrl);
-
-		p_slot->hpc_ops->green_led_off(p_slot);   
-		
-		/* Wait for the command to complete */
-		wait_for_ctrl_irq (ctrl);
-
-		/* turn on Amber LED */
-		retval = p_slot->hpc_ops->set_attention_status(p_slot, 1);   
-		if (retval) {
-			err("%s: Issue of Set Attention Led command failed\n", __FUNCTION__);
-			return retval;
-		}
-		/* Wait for the command to complete */
-		wait_for_ctrl_irq (ctrl);
-
-		/* Done with exclusive hardware access */
-		up(&ctrl->crit_sect);
-
-		return rc;
+		set_slot_off(ctrl, p_slot);
+		return -1;
 	}
 	return 0;
 }
@@ -1320,6 +1293,7 @@
 	rc = p_slot->hpc_ops->power_off_slot(p_slot);
 	if (rc) {
 		err("%s: Issue of Slot Disable command failed\n", __FUNCTION__);
+		up(&ctrl->crit_sect);
 		return rc;
 	}
 	/* Wait for the command to complete */
@@ -1406,7 +1380,6 @@
 {
 	struct slot *p_slot = (struct slot *) slot;
 	u8 getstatus;
-	int rc;
 	
 	pushbutton_pending = 0;
 
@@ -1420,23 +1393,7 @@
 		p_slot->state = POWEROFF_STATE;
 		dbg("In power_down_board, b:d(%x:%x)\n", p_slot->bus, p_slot->device);
 
-		if (pciehp_disable_slot(p_slot)) {
-			/* Wait for exclusive access to hardware */
-			down(&p_slot->ctrl->crit_sect);
-
-			/* Turn on the Attention LED */
-			rc = p_slot->hpc_ops->set_attention_status(p_slot, 1);
-			if (rc) {
-				err("%s: Issue of Set Atten Indicator On command failed\n", __FUNCTION__);
-				return;
-			}
-	
-			/* Wait for the command to complete */
-			wait_for_ctrl_irq (p_slot->ctrl);
-
-			/* Done with exclusive hardware access */
-			up(&p_slot->ctrl->crit_sect);
-		}
+		pciehp_disable_slot(p_slot);
 		p_slot->state = STATIC_STATE;
 	} else {
 		p_slot->state = POWERON_STATE;
@@ -1446,15 +1403,6 @@
 			/* Wait for exclusive access to hardware */
 			down(&p_slot->ctrl->crit_sect);
 
-			/* Turn off the green LED */
-			rc = p_slot->hpc_ops->set_attention_status(p_slot, 1);
-			if (rc) {
-				err("%s: Issue of Set Atten Indicator On command failed\n", __FUNCTION__);
-				return;
-			}
-			/* Wait for the command to complete */
-			wait_for_ctrl_irq (p_slot->ctrl);
-			
 			p_slot->hpc_ops->green_led_off(p_slot);
 
 			/* Wait for the command to complete */
@@ -1664,7 +1612,10 @@
 					down(&ctrl->crit_sect);
 
 					p_slot->hpc_ops->set_attention_status(p_slot, 1);
+					wait_for_ctrl_irq (ctrl);
+						
 					p_slot->hpc_ops->green_led_off(p_slot);
+					wait_for_ctrl_irq (ctrl);
 
 					/* Done with exclusive hardware access */
 					up(&ctrl->crit_sect);
@@ -1701,21 +1652,21 @@
 	if (rc || !getstatus) {
 		info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 0;
+		return 1;
 	}
 	
 	rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
 	if (rc || getstatus) {
 		info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 0;
+		return 1;
 	}
 	
 	rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
 	if (rc || getstatus) {
 		info("%s: already enabled on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 0;
+		return 1;
 	}
 	up(&p_slot->ctrl->crit_sect);
 
@@ -1788,21 +1739,21 @@
 	if (ret || !getstatus) {
 		info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 0;
+		return 1;
 	}
 
 	ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
 	if (ret || getstatus) {
 		info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 0;
+		return 1;
 	}
 
 	ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
 	if (ret || !getstatus) {
 		info("%s: already disabled slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 0;
+		return 1;
 	}
 	up(&p_slot->ctrl->crit_sect);
 
--- diff/drivers/pci/hotplug/pciehp_hpc.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/pciehp_hpc.c	2004-07-01 21:32:40.000000000 +0100
@@ -349,7 +349,9 @@
 		return retval;
 	}
 
-	if ( (lnk_status & (LNK_TRN | LNK_TRN_ERR)) == 0x0C00) {
+	dbg("%s: lnk_status = %x\n", __FUNCTION__, lnk_status);
+	if ( (lnk_status & LNK_TRN) || (lnk_status & LNK_TRN_ERR) || 
+		!(lnk_status & NEG_LINK_WD)) {
 		err("%s : Link Training Error occurs \n", __FUNCTION__);
 		retval = -1;
 		return retval;
--- diff/drivers/pci/hotplug/pciehprm_acpi.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/pciehprm_acpi.c	2004-07-01 21:32:40.000000000 +0100
@@ -218,6 +218,10 @@
 	}
 
 	ab->_hpp = kmalloc (sizeof (struct acpi__hpp), GFP_KERNEL);
+	if (!ab->_hpp) {
+		err ("acpi_pciehprm:%s alloc for _HPP failed\n", path_name);
+		goto free_and_return;
+	}
 	memset(ab->_hpp, 0, sizeof(struct acpi__hpp));
 
 	ab->_hpp->cache_line_size	= nui[0];
@@ -1393,7 +1397,7 @@
 
 static int bind_pci_resources_to_slots ( struct controller *ctrl)
 {
-	struct pci_func *func;
+	struct pci_func *func, new_func;
 	int busn = ctrl->slot_bus;
 	int devn, funn;
 	u32	vid;
@@ -1411,11 +1415,19 @@
 			if (vid != 0xFFFFFFFF) {
 				dbg("%s: vid = %x\n", __FUNCTION__, vid);
 				func = pciehp_slot_find(busn, devn, funn);
-				if (!func)
-					continue;
-				configure_existing_function(ctrl, func);
+				if (!func) {
+					memset(&new_func, 0, sizeof(struct pci_func));
+					new_func.bus = busn;
+					new_func.device = devn;
+					new_func.function = funn;
+					new_func.is_a_board = 1;
+					configure_existing_function(ctrl, &new_func);
+					pciehprm_dump_func_res(&new_func);
+				} else {
+					configure_existing_function(ctrl, func);
+					pciehprm_dump_func_res(func);
+				}
 				dbg("aCCF:existing PCI 0x%x Func ResourceDump\n", ctrl->bus);
-				pciehprm_dump_func_res(func);
 			}
 		}
 	}
--- diff/drivers/pci/hotplug/pciehprm_nonacpi.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/pciehprm_nonacpi.c	2004-07-01 21:32:40.000000000 +0100
@@ -276,7 +276,7 @@
 
 static int bind_pci_resources_to_slots ( struct controller *ctrl)
 {
-	struct pci_func *func;
+	struct pci_func *func, new_func;
 	int busn = ctrl->slot_bus;
 	int devn, funn;
 	u32	vid;
@@ -297,11 +297,19 @@
 				vid, busn, devn, funn);
 				func = pciehp_slot_find(busn, devn, funn);
 				dbg("%s: func = %p\n", __FUNCTION__,func);
-				if (!func)
-					continue;
-				configure_existing_function(ctrl, func);
+				if (!func) {
+					memset(&new_func, 0, sizeof(struct pci_func));
+					new_func.bus = busn;
+					new_func.device = devn;
+					new_func.function = funn;
+					new_func.is_a_board = 1;
+					configure_existing_function(ctrl, &new_func);
+					phprm_dump_func_res(&new_func);
+				} else {
+					configure_existing_function(ctrl, func);
+					phprm_dump_func_res(func);
+				}
 				dbg("aCCF:existing PCI 0x%x Func ResourceDump\n", ctrl->bus);
-				phprm_dump_func_res(func);
 			}
 		}
 	}
--- diff/drivers/pci/hotplug/rpadlpar_core.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/rpadlpar_core.c	2004-07-01 21:32:40.000000000 +0100
@@ -24,25 +24,6 @@
 
 static DECLARE_MUTEX(rpadlpar_sem);
 
-static inline int is_hotplug_capable(struct device_node *dn)
-{
-	unsigned char *ptr = get_property(dn, "ibm,fw-pci-hot-plug-ctrl", NULL);
-
-	return (int) (ptr != NULL);
-}
-
-static char *get_node_drc_name(struct device_node *dn)
-{
-	char *ptr = NULL;
-	int *drc_names;
-
-	drc_names = (int *) get_property(dn, "ibm,drc-names", NULL);
-	if (drc_names)
-		ptr = (char *) &drc_names[1];
-
-	return ptr;
-}
-
 static struct device_node *find_php_slot_vio_node(char *drc_name)
 {
 	struct device_node *child;
@@ -53,9 +34,9 @@
 		return NULL;
 
 	for (child = of_get_next_child(parent, NULL);
-	     child; child = of_get_next_child(parent, child)) {
+		child; child = of_get_next_child(parent, child)) {
 		loc_code = get_property(child, "ibm,loc-code", NULL);
-		if (loc_code && !strcmp(loc_code, drc_name))
+		if (loc_code && !strncmp(loc_code, drc_name, strlen(drc_name)))
 			return child;
 	}
 
@@ -69,7 +50,7 @@
 
 	while ((np = of_find_node_by_type(np, "pci")))
 		if (is_hotplug_capable(np)) {
-			name = get_node_drc_name(np);
+			name = rpaphp_get_drc_name(np);
 			if (name && (!strcmp(drc_name, name)))
 				break;
 		}
@@ -324,6 +305,7 @@
 	}
 
 	/* Remove pci bus */
+
 	if (dlpar_pci_remove_bus(bridge_dev)) {
 		printk(KERN_ERR "%s: unable to remove pci bus %s\n",
 			__FUNCTION__, drc_name);
@@ -364,7 +346,7 @@
 		rc = -EINVAL;
 		goto exit;
 	}
-
+	
 	switch (slot->dev_type) {
 		case PCI_DEV:
 			rc = dlpar_remove_pci_slot(slot, drc_name);
--- diff/drivers/pci/hotplug/rpaphp.h	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/rpaphp.h	2004-07-01 21:32:40.000000000 +0100
@@ -30,6 +30,9 @@
 #include <linux/pci.h>
 #include "pci_hotplug.h"
 
+#define	HOTPLUG	1
+#define	EMBEDDED 0
+
 #define DR_INDICATOR 9002
 #define DR_ENTITY_SENSE 9003
 
@@ -73,6 +76,11 @@
 #define	CONFIGURED	1
 #define	EMPTY		0
 
+struct rpaphp_pci_func {
+	struct pci_dev *pci_dev;
+	struct list_head sibling;
+};
+
 /*
  * struct slot - slot information for each *physical* slot
  */
@@ -83,14 +91,13 @@
 	u32 power_domain;
 	char *name;
 	char *location;
+	u8 removable;
 	struct device_node *dn;	/* slot's device_node in OFDT */
-	/* dn has phb info */
+				/* dn has phb info */
 	struct pci_dev *bridge;	/* slot's pci_dev in pci_devices */
 	union {
-		struct pci_dev *pci_dev;	/* pci_dev of device in this slot */
-		/* it will be used for unconfig */
-		/* NULL if slot is empty */
-		struct vio_dev *vio_dev;	/* vio_dev of the device in this slot */
+		struct list_head pci_funcs; /* pci_devs in PCI slot */ 
+		struct vio_dev *vio_dev; /* vio_dev in VIO slot */
 	} dev;
 	u8 dev_type;		/* VIO or PCI */
 	struct hotplug_slot *hotplug_slot;
@@ -101,6 +108,13 @@
 extern struct list_head rpaphp_slot_head;
 extern int num_slots;
 
+static inline int is_hotplug_capable(struct device_node *dn)
+{
+	unsigned char *ptr = get_property(dn, "ibm,fw-pci-hot-plug-ctrl", NULL);
+
+	return (int) (ptr != NULL);
+}
+
 /* function prototypes */
 
 /* rpaphp_pci.c */
@@ -110,10 +124,12 @@
 extern int register_pci_slot(struct slot *slot);
 extern int rpaphp_unconfig_pci_adapter(struct slot *slot);
 extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value);
+extern struct hotplug_slot *rpaphp_find_hotplug_slot(struct pci_dev *dev);
 
 /* rpaphp_core.c */
 extern int rpaphp_add_slot(struct device_node *dn);
 extern int rpaphp_remove_slot(struct slot *slot);
+extern char *rpaphp_get_drc_name(struct device_node *dn);
 
 /* rpaphp_vio.c */
 extern int rpaphp_get_vio_adapter_status(struct slot *slot, int is_init, u8 * value);
@@ -125,8 +141,8 @@
 extern void dealloc_slot_struct(struct slot *slot);
 extern struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, int power_domain);
 extern int register_slot(struct slot *slot);
+extern int deregister_slot(struct slot *slot);
 extern int rpaphp_get_power_status(struct slot *slot, u8 * value);
 extern int rpaphp_set_attention_status(struct slot *slot, u8 status);
-extern void rpaphp_sysfs_remove_attr_location(struct hotplug_slot *slot);
 	
 #endif				/* _PPC64PHP_H */
--- diff/drivers/pci/hotplug/rpaphp_core.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/rpaphp_core.c	2004-07-01 21:32:40.000000000 +0100
@@ -54,6 +54,8 @@
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
+void eeh_register_disable_func(int (*)(struct pci_dev *));
+
 module_param(debug, bool, 0644);
 
 static int enable_slot(struct hotplug_slot *slot);
@@ -63,6 +65,7 @@
 static int get_attention_status(struct hotplug_slot *slot, u8 * value);
 static int get_adapter_status(struct hotplug_slot *slot, u8 * value);
 static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value);
+static int rpaphp_disable_slot(struct pci_dev *dev);
 
 struct hotplug_slot_ops rpaphp_hotplug_slot_ops = {
 	.owner = THIS_MODULE,
@@ -89,7 +92,7 @@
  */
 static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)
 {
-	int retval;
+	int retval = 0;
 	struct slot *slot = (struct slot *)hotplug_slot->private;
 
 	down(&rpaphp_sem);
@@ -208,47 +211,53 @@
 
 int rpaphp_remove_slot(struct slot *slot)
 {
-	int retval = 0;
-	struct hotplug_slot *php_slot = slot->hotplug_slot;
-
-	list_del(&slot->rpaphp_slot_list);
-	
-	/* remove "php_location" file */
-	rpaphp_sysfs_remove_attr_location(php_slot);
-
-	retval = pci_hp_deregister(php_slot);
-	if (retval)
-		err("Problem unregistering a slot %s\n", slot->name);
-
-	num_slots--;
-
-	dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
-	return retval;
+	return deregister_slot(slot);
 }
 
-static int is_php_dn(struct device_node *dn, int **indexes, int **names, int **types,
-	  int **power_domains)
+static int get_dn_properties(struct device_node *dn, int **indexes, int **names, 
+	int **types, int **power_domains)
 {
 	*indexes = (int *) get_property(dn, "ibm,drc-indexes", NULL);
-	if (!*indexes)
-		return 0;
+
 	/* &names[1] contains NULL terminated slot names */
 	*names = (int *) get_property(dn, "ibm,drc-names", NULL);
-	if (!*names)
-		return 0;
+
 	/* &types[1] contains NULL terminated slot types */
 	*types = (int *) get_property(dn, "ibm,drc-types", NULL);
-	if (!*types)
-		return 0;
+
 	/* power_domains[1...n] are the slot power domains */
-	*power_domains = (int *) get_property(dn,
-					      "ibm,drc-power-domains", NULL);
-	if (!*power_domains)
-		return 0;
-	if (strcmp(dn->name, "pci") == 0 &&
-			!get_property(dn, "ibm,fw-pci-hot-plug-ctrl", NULL))
-		return 0;
-	return 1;
+	*power_domains = (int *) get_property(dn, "ibm,drc-power-domains", NULL);
+	
+	if (*indexes && *names && *types && *power_domains) 
+		return (1);
+	
+	return (0);
+}
+
+static int is_php_dn(struct device_node *dn, int **indexes, int **names, int **types,
+	  int **power_domains)
+{
+	if (!is_hotplug_capable(dn))
+		return (0);
+	if (!get_dn_properties(dn, indexes, names, types, power_domains))
+		return (0);
+	return (1);
+}
+
+static int is_dr_dn(struct device_node *dn, int **indexes, int **names, int **types,
+	  int **power_domains, int **my_drc_index)
+{
+	if (!is_hotplug_capable(dn))
+		return (0);
+
+	*my_drc_index = (int *) get_property(dn, "ibm,my-drc-index", NULL);
+	if(!*my_drc_index) 		
+		return (0);
+
+	if (!dn->parent)
+		return (0);
+
+	return get_dn_properties(dn->parent, indexes, names, types, power_domains);
 }
 
 static inline int is_vdevice_root(struct device_node *dn)
@@ -256,15 +265,48 @@
 	return !strcmp(dn->name, "vdevice");
 }
 
-/**
- * rpaphp_add_slot: Add  Hot Plug slot(s) to sysfs
- *
- */
+char *rpaphp_get_drc_name(struct device_node *dn)
+{
+	char *name, *ptr = NULL;
+	int *drc_names, *drc_indexes, i;
+	struct device_node *parent = dn->parent;	
+	u32 *my_drc_index;
+
+	if (!parent)
+		return NULL;
+
+	my_drc_index = (u32 *) get_property(dn, "ibm,my-drc-index", NULL);
+	if (!my_drc_index)
+		return NULL;	
+
+	drc_names = (int *) get_property(parent, "ibm,drc-names", NULL);
+	drc_indexes = (int *) get_property(parent, "ibm,drc-indexes", NULL);
+	if (!drc_names || !drc_indexes)
+		return NULL;
+
+	name = (char *) &drc_names[1];
+	for (i = 0; i < drc_indexes[0]; i++, name += (strlen(name) + 1)) {
+		if (drc_indexes[i + 1] == *my_drc_index) {
+			ptr = (char *) name;
+			break;
+		}
+	}
+
+	return ptr;
+}
+
+/****************************************************************
+ *	rpaphp not only registers PCI hotplug slots(HOTPLUG), 
+ *	but also logical DR slots(EMBEDDED).
+ *	HOTPLUG slot: An adapter can be physically added/removed. 
+ *	EMBEDDED slot: An adapter can be logically removed/added
+ *		  from/to a partition with the slot.
+ ***************************************************************/
 int rpaphp_add_slot(struct device_node *dn)
 {
 	struct slot *slot;
 	int retval = 0;
-	int i;
+	int i, *my_drc_index, slot_type;
 	int *indexes, *names, *types, *power_domains;
 	char *name, *type;
 
@@ -277,42 +319,65 @@
 	}
 
 	/* register PCI devices */
-	if (dn->name != 0 && strcmp(dn->name, "pci") == 0 &&
-	    is_php_dn(dn, &indexes, &names, &types, &power_domains)) {
+	if (dn->name != 0 && strcmp(dn->name, "pci") == 0) {
+		if (is_php_dn(dn, &indexes, &names, &types, &power_domains))  
+			slot_type = HOTPLUG;
+		else if (is_dr_dn(dn, &indexes, &names, &types, &power_domains, &my_drc_index)) 
+			slot_type = EMBEDDED;
+		else goto exit;
 
 		name = (char *) &names[1];
 		type = (char *) &types[1];
-		for (i = 0; i < indexes[0];
-					i++,
-					name += (strlen(name) + 1),
-					type += (strlen(type) + 1)) {
-			if (!(slot = alloc_slot_struct(dn, indexes[i + 1], name,
-						       power_domains[i + 1]))) {
-				retval = -ENOMEM;
-				goto exit;
-			}
-			slot->type = simple_strtoul(type, NULL, 10);
-			if (slot->type < 1 || slot->type > 16)
-				slot->type = 0;
-			retval = register_pci_slot(slot);
+		for (i = 0; i < indexes[0]; i++,
+	     		name += (strlen(name) + 1), type += (strlen(type) + 1)) {
 
-		}		/* for indexes */
-	}			/* end of PCI device_node */
+			if ( slot_type == HOTPLUG || 
+				(slot_type == EMBEDDED && indexes[i + 1] == my_drc_index[0])) {
+				
+				if (!(slot = alloc_slot_struct(dn, indexes[i + 1], name,
+					       power_domains[i + 1]))) {
+					retval = -ENOMEM;
+					goto exit;
+				}
+				if (slot_type == EMBEDDED)
+					slot->type = EMBEDDED;
+				else
+					slot->type = simple_strtoul(type, NULL, 10);
+				
+				dbg("    Found drc-index:0x%x drc-name:%s drc-type:%s\n",
+					indexes[i + 1], name, type);
+
+				retval = register_pci_slot(slot);
+				if (slot_type == EMBEDDED)
+					goto exit;
+			}
+		}
+	}
 exit:
 	dbg("%s - Exit: num_slots=%d rc[%d]\n",
 	    __FUNCTION__, num_slots, retval);
 	return retval;
 }
 
-static int __init init_rpa(void)
+/*
+ * init_slots - initialize 'struct slot' structures for each slot
+ *
+ */
+static void init_slots(void)
 {
 	struct device_node *dn;
 
+	for (dn = find_all_nodes(); dn; dn = dn->next)
+		rpaphp_add_slot(dn);
+}
+
+static int __init init_rpa(void)
+{
+
 	init_MUTEX(&rpaphp_sem);
 
 	/* initialize internal data structure etc. */
-	for (dn = find_all_nodes(); dn; dn = dn->next)
-		rpaphp_add_slot(dn);
+	init_slots();
 	if (!num_slots)
 		return -ENODEV;
 
@@ -342,12 +407,18 @@
 {
 	info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
 
+	/* let EEH know they can use hotplug */
+	eeh_register_disable_func(&rpaphp_disable_slot);
+
 	/* read all the PRA info from the system */
 	return init_rpa();
 }
 
 static void __exit rpaphp_exit(void)
 {
+	/* let EEH know we are going away */
+	eeh_register_disable_func(NULL);
+
 	cleanup_slots();
 }
 
@@ -374,11 +445,16 @@
 		retval = -EINVAL;
 	}
 	up(&rpaphp_sem);
-      exit:
+exit:
 	dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
 	return retval;
 }
 
+static int rpaphp_disable_slot(struct pci_dev *dev)
+{
+	return disable_slot(rpaphp_find_hotplug_slot(dev));
+}
+
 static int disable_slot(struct hotplug_slot *hotplug_slot)
 {
 	int retval;
@@ -395,9 +471,7 @@
 	down(&rpaphp_sem);
 	switch (slot->dev_type) {
 	case PCI_DEV:
-		rpaphp_set_attention_status(slot, LED_ID);
 		retval = rpaphp_unconfig_pci_adapter(slot);
-		rpaphp_set_attention_status(slot, LED_OFF);
 		break;
 	case VIO_DEV:
 		retval = rpaphp_unconfig_vio_adapter(slot);
@@ -406,7 +480,7 @@
 		retval = -ENODEV;
 	}
 	up(&rpaphp_sem);
-      exit:
+exit:
 	dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
 	return retval;
 }
@@ -417,3 +491,4 @@
 EXPORT_SYMBOL_GPL(rpaphp_add_slot);
 EXPORT_SYMBOL_GPL(rpaphp_remove_slot);
 EXPORT_SYMBOL_GPL(rpaphp_slot_head);
+EXPORT_SYMBOL_GPL(rpaphp_get_drc_name);
--- diff/drivers/pci/hotplug/rpaphp_pci.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/rpaphp_pci.c	2004-07-01 21:32:40.000000000 +0100
@@ -30,24 +30,18 @@
 
 struct pci_dev *rpaphp_find_pci_dev(struct device_node *dn)
 {
-	struct pci_dev *retval_dev = NULL, *dev;
+	struct pci_dev *retval_dev = NULL, *dev = NULL;
 	char bus_id[BUS_ID_SIZE];
 
 	sprintf(bus_id, "%04x:%02x:%02x.%d",dn->phb->global_number,
 		dn->busno, PCI_SLOT(dn->devfn), PCI_FUNC(dn->devfn));
-
-	dbg("Enter rpaphp_find_pci_dev() full_name=%s bus_id=%s\n", 
-		dn->full_name, bus_id);
-	
 	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
-               if (!strcmp(pci_name(dev), bus_id)) {
+		if (!strcmp(pci_name(dev), bus_id)) {
 			retval_dev = dev;
-			dbg("rpaphp_find_pci_dev(): found dev=%p\n\n", dev);
 			break;
 		}
 	}
 	return retval_dev;
-
 }
 
 EXPORT_SYMBOL_GPL(rpaphp_find_pci_dev);
@@ -79,11 +73,6 @@
 	return rpaphp_find_pci_dev(slot->dn);
 }
 
-static struct pci_dev *rpaphp_find_adapter_pdev(struct slot *slot)
-{
-	return rpaphp_find_pci_dev(slot->dn->child);
-}
-
 static int rpaphp_get_sensor_state(struct slot *slot, int *state)
 {
 	int rc;
@@ -144,7 +133,8 @@
 			else if (rpaphp_find_pci_dev(slot->dn->child))
 				*value = CONFIGURED;
 			else {
-				dbg("%s: can't find pdev of adapter in slot[%s]\n", __FUNCTION__, slot->name);
+				err("%s: can't find pdev of adapter in slot[%s]\n", 
+					__FUNCTION__, slot->dn->full_name);
 				*value = NOT_CONFIGURED;
 			}
 		}
@@ -158,7 +148,8 @@
 }
 
 /* Must be called before pci_bus_add_devices */
-static void rpaphp_fixup_new_pci_devices(struct pci_bus *bus)
+static void 
+rpaphp_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
 {
 	struct pci_dev *dev;
 
@@ -169,8 +160,9 @@
 		 */
 		if (list_empty(&dev->global_list)) {
 			int i;
-
-			pcibios_fixup_device_resources(dev, bus);
+			
+			if(fix_bus)
+				pcibios_fixup_device_resources(dev, bus);
 			pci_read_irq_line(dev);
 			for (i = 0; i < PCI_NUM_RESOURCES; i++) {
 				struct resource *r = &dev->resource[i];
@@ -183,69 +175,139 @@
 	}
 }
 
-static void
-rpaphp_pci_config_device(struct pci_bus *pci_bus, struct device_node *dn)
-{
-	int num;
-
-	num = pci_scan_slot(pci_bus, PCI_DEVFN(PCI_SLOT(dn->devfn), 0));
-	if (num) {
-		rpaphp_fixup_new_pci_devices(pci_bus);
-		pci_bus_add_devices(pci_bus);
-	}
-}
-
-static int rpaphp_pci_config_bridge(struct pci_dev *dev, struct device_node *dn);
+static int rpaphp_pci_config_bridge(struct pci_dev *dev);
 
 /*****************************************************************************
- rpaphp_pci_config_dn() will recursively configure all devices under the 
- given slot->dn and return the dn's pci_dev.
+ rpaphp_pci_config_slot() will  configure all devices under the 
+ given slot->dn and return the the first pci_dev.
  *****************************************************************************/
 static struct pci_dev *
-rpaphp_pci_config_dn(struct device_node *dn, struct pci_bus *bus)
+rpaphp_pci_config_slot(struct device_node *dn, struct pci_bus *bus)
 {
-	struct device_node *local;
+	struct device_node *eads_first_child = dn->child;
 	struct pci_dev *dev;
+	int num;
+	
+	dbg("Enter %s: dn=%s bus=%s\n", __FUNCTION__, dn->full_name, bus->name);
 
-	for (local = dn->child; local; local = local->sibling) {
-		rpaphp_pci_config_device(bus, local);
-		dev = rpaphp_find_pci_dev(local);
-		if (!rpaphp_pci_config_bridge(dev, local))
+	if (eads_first_child) {
+		/* pci_scan_slot should find all children of EADs */
+		num = pci_scan_slot(bus, PCI_DEVFN(PCI_SLOT(eads_first_child->devfn), 0));
+		if (num) {
+			rpaphp_fixup_new_pci_devices(bus, 1); 
+			pci_bus_add_devices(bus);
+		}
+		dev = rpaphp_find_pci_dev(eads_first_child);
+		if (!dev) {
+			err("No new device found\n");
 			return NULL;
+		}
+		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) 
+			rpaphp_pci_config_bridge(dev);
 	}
-
 	return dev;
 }
 
-static int rpaphp_pci_config_bridge(struct pci_dev *dev, struct device_node *dn)
+static int rpaphp_pci_config_bridge(struct pci_dev *dev)
 {
-	if (dev && dn->child) {	/* dn is a PCI bridge node */
-		struct pci_bus *child;
-		u8 sec_busno;
-
-		/* get busno of downstream bus */
-		pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno);
-
-		/* add to children of PCI bridge dev->bus */
-		child = pci_add_new_bus(dev->bus, dev, sec_busno);
-		if (!child) {
-			err("%s: could not add second bus\n", __FUNCTION__);
-			return 0;
-		}
-		sprintf(child->name, "PCI Bus #%02x", child->number);
-		/* Fixup subordinate bridge bases and resureces */
-		pcibios_fixup_bus(child);
+	u8 sec_busno;
+	struct pci_bus *child_bus;
+	struct pci_dev *child_dev;
+
+	dbg("Enter %s:  BRIDGE dev=%s\n", __FUNCTION__, pci_name(dev));
 
-		/* may need do more stuff here */
-		rpaphp_pci_config_dn(dn, dev->subordinate);
+	/* get busno of downstream bus */
+	pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno);
+		
+	/* add to children of PCI bridge dev->bus */
+	child_bus = pci_add_new_bus(dev->bus, dev, sec_busno);
+	if (!child_bus) {
+		err("%s: could not add second bus\n", __FUNCTION__);
+		return -EIO;
 	}
-	return 1;
+	sprintf(child_bus->name, "PCI Bus #%02x", child_bus->number);
+	/* do pci_scan_child_bus */
+	pci_scan_child_bus(child_bus);
+
+	list_for_each_entry(child_dev, &child_bus->devices, bus_list) {
+		eeh_add_device_late(child_dev);
+	}
+
+	 /* fixup new pci devices without touching bus struct */
+	rpaphp_fixup_new_pci_devices(child_bus, 0);
+
+	/* Make the discovered devices available */
+	pci_bus_add_devices(child_bus);
+	return 0;
+}
+
+static void enable_eeh(struct device_node *dn)
+{
+	struct device_node *sib;
+
+	for (sib = dn->child; sib; sib = sib->sibling) 
+		enable_eeh(sib);
+	eeh_add_device_early(dn);
+	return;
+	
+}
+
+#ifdef DEBUG
+static void print_slot_pci_funcs(struct slot *slot)
+{
+	struct list_head *l;
+
+	if (slot->dev_type == PCI_DEV) {
+		printk("pci_funcs of slot[%s]\n", slot->name);
+		if (list_empty(&slot->dev.pci_funcs))
+			printk("	pci_funcs is EMPTY\n");
+
+		list_for_each (l, &slot->dev.pci_funcs) {
+			struct rpaphp_pci_func *func =
+				list_entry(l, struct rpaphp_pci_func, sibling);
+			printk("	FOUND dev=%s\n", pci_name(func->pci_dev));
+		}
+	}
+	return;
+}
+#else
+static void print_slot_pci_funcs(struct slot *slot)
+{
+	return;
+}
+#endif
+
+static int init_slot_pci_funcs(struct slot *slot)
+{
+	struct device_node *child;
+
+	for (child = slot->dn->child; child != NULL; child = child->sibling) {
+		struct pci_dev *pdev = rpaphp_find_pci_dev(child);
+
+		if (pdev) {
+			struct rpaphp_pci_func *func;
+			func = kmalloc(sizeof(struct rpaphp_pci_func), GFP_KERNEL);
+			if (!func) 
+				return -ENOMEM;
+			memset(func, 0, sizeof(struct rpaphp_pci_func));
+			INIT_LIST_HEAD(&func->sibling);
+			func->pci_dev = pdev;
+			list_add_tail(&func->sibling, &slot->dev.pci_funcs);
+			print_slot_pci_funcs(slot);
+		} else {
+			err("%s: dn=%s has no pci_dev\n", 
+				__FUNCTION__, child->full_name);
+			return -EIO;
+		}
+	}
+	return 0;
 }
 
-static struct pci_dev *rpaphp_config_pci_adapter(struct slot *slot)
+static int rpaphp_config_pci_adapter(struct slot *slot)
 {
 	struct pci_bus *pci_bus;
-	struct pci_dev *dev = NULL;
+	struct pci_dev *dev;
+	int rc = -ENODEV;
 
 	dbg("Entry %s: slot[%s]\n", __FUNCTION__, slot->name);
 
@@ -256,38 +318,74 @@
 			err("%s: can't find bus structure\n", __FUNCTION__);
 			goto exit;
 		}
-
-		eeh_add_device_early(slot->dn->child);
-		dev = rpaphp_pci_config_dn(slot->dn, pci_bus);
-		eeh_add_device_late(dev);
+		enable_eeh(slot->dn);
+		dev = rpaphp_pci_config_slot(slot->dn, pci_bus);
+		if (!dev) {
+			err("%s: can't find any devices.\n", __FUNCTION__);
+			goto exit;
+		}
+		/* associate corresponding pci_dev */	
+		rc = init_slot_pci_funcs(slot);
+		if (rc)
+			goto exit;
+		print_slot_pci_funcs(slot);
+		if (!list_empty(&slot->dev.pci_funcs)) 
+			rc = 0;
 	} else {
 		/* slot is not enabled */
 		err("slot doesn't have pci_dev structure\n");
-		dev = NULL;
 	}
-
 exit:
-	dbg("Exit %s: pci_dev %s\n", __FUNCTION__, dev ? "found" : "not found");
-	return dev;
+	dbg("Exit %s:  rc=%d\n", __FUNCTION__, rc);
+	return rc;
+}
+
+
+static void rpaphp_eeh_remove_bus_device(struct pci_dev *dev)
+{
+	eeh_remove_device(dev);
+	if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
+		struct pci_bus *bus = dev->subordinate;
+		struct list_head *ln;
+		if (!bus)
+			return; 
+		for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
+			struct pci_dev *pdev = pci_dev_b(ln);
+			if (pdev)
+				rpaphp_eeh_remove_bus_device(pdev);
+		}
+
+	}
+	return;
 }
 
 int rpaphp_unconfig_pci_adapter(struct slot *slot)
 {
 	int retval = 0;
+	struct list_head *ln;
 
 	dbg("Entry %s: slot[%s]\n", __FUNCTION__, slot->name);
-	if (!slot->dev.pci_dev) {
-		info("%s: no card in slot[%s]\n", __FUNCTION__, slot->name);
+	if (list_empty(&slot->dev.pci_funcs)) {
+		err("%s: slot[%s] doesn't have any devices.\n", __FUNCTION__, 
+			slot->name);
 
 		retval = -EINVAL;
 		goto exit;
 	}
-	/* remove the device from the pci core */
-	eeh_remove_device(slot->dev.pci_dev);
-	pci_remove_bus_device(slot->dev.pci_dev);
-
+	/* remove the devices from the pci core */
+	list_for_each (ln, &slot->dev.pci_funcs) {
+		struct rpaphp_pci_func *func;
+	
+		func = list_entry(ln, struct rpaphp_pci_func, sibling);
+		if (func->pci_dev) {
+			rpaphp_eeh_remove_bus_device(func->pci_dev);
+			pci_remove_bus_device(func->pci_dev); 
+		}
+		kfree(func);
+	}
+	INIT_LIST_HEAD(&slot->dev.pci_funcs);
 	slot->state = NOT_CONFIGURED;
-	info("%s: adapter in slot[%s] unconfigured.\n", __FUNCTION__,
+	info("%s: devices in slot[%s] unconfigured.\n", __FUNCTION__,
 	     slot->name);
 exit:
 	dbg("Exit %s, rc=0x%x\n", __FUNCTION__, retval);
@@ -303,7 +401,7 @@
 				      &slot->hotplug_slot->info->
 				      adapter_status);
 	if (slot->hotplug_slot->info->adapter_status == NOT_VALID) {
-		dbg("%s: NOT_VALID: skip dn->full_name=%s\n",
+		err("%s: NOT_VALID: skip dn->full_name=%s\n",
 		    __FUNCTION__, slot->dn->full_name);
 		return -1;
 	}
@@ -314,35 +412,41 @@
 {
 	slot->bridge = rpaphp_find_bridge_pdev(slot);
 	if (!slot->bridge) {	/* slot being added doesn't have pci_dev yet */
-		dbg("%s: no pci_dev for bridge dn %s\n", __FUNCTION__, slot->name);
-		dealloc_slot_struct(slot);
-		return 1;
+		err("%s: no pci_dev for bridge dn %s\n", __FUNCTION__, slot->name);
+		goto exit_rc;
 	}
-	
+	dbg("%s set slot->name to %s\n",  __FUNCTION__, pci_name(slot->bridge));
 	strcpy(slot->name, pci_name(slot->bridge));
+
 	/* find slot's pci_dev if it's not empty */
 	if (slot->hotplug_slot->info->adapter_status == EMPTY) {
 		slot->state = EMPTY;	/* slot is empty */
-		slot->dev.pci_dev = NULL;
 	} else {
 		/* slot is occupied */
 		if (!(slot->dn->child)) {
 			/* non-empty slot has to have child */
-			err("%s: slot[%s]'s device_node doesn't have child for adapter\n", __FUNCTION__, slot->name);
-			dealloc_slot_struct(slot);
-			return 1;
+			err("%s: slot[%s]'s device_node doesn't have child for adapter\n", 
+				__FUNCTION__, slot->name);
+			goto exit_rc;
+		}
+		if (init_slot_pci_funcs(slot)) {
+			err("%s: init_slot_pci_funcs failed\n", __FUNCTION__);
+			goto exit_rc;
 		}
-		slot->dev.pci_dev = rpaphp_find_adapter_pdev(slot);
-		if (slot->dev.pci_dev) {
+		print_slot_pci_funcs(slot);
+		if (!list_empty(&slot->dev.pci_funcs)) {
 			slot->state = CONFIGURED;
-		
+	
 		} else {
 			/* DLPAR add as opposed to 
-			 * boot time */
+		 	 * boot time */
 			slot->state = NOT_CONFIGURED;
 		}
 	}
 	return 0;
+exit_rc:
+	dealloc_slot_struct(slot);
+	return 1;
 }
 
 int register_pci_slot(struct slot *slot)
@@ -350,14 +454,17 @@
 	int rc = 1;
 
 	slot->dev_type = PCI_DEV;
+	if (slot->type == EMBEDDED)
+		slot->removable = EMBEDDED;
+	else
+		slot->removable = HOTPLUG;
+	INIT_LIST_HEAD(&slot->dev.pci_funcs);
 	if (setup_pci_hotplug_slot_info(slot))
 		goto exit_rc;
 	if (setup_pci_slot(slot))
 		goto exit_rc;
 	rc = register_slot(slot);
 exit_rc:
-	if (rc)
-		dealloc_slot_struct(slot);
 	return rc;
 }
 
@@ -371,12 +478,12 @@
 	dbg("%s: sensor state[%d]\n", __FUNCTION__, state);
 	/* if slot is not empty, enable the adapter */
 	if (state == PRESENT) {
-		dbg("%s : slot[%s] is occupid.\n", __FUNCTION__, slot->name);
-		if ((slot->dev.pci_dev =
-		     rpaphp_config_pci_adapter(slot)) != NULL) {
+		dbg("%s : slot[%s] is occupied.\n", __FUNCTION__, slot->name);
+		retval = rpaphp_config_pci_adapter(slot);
+		if (!retval) {
 			slot->state = CONFIGURED;
-			dbg("%s: PCI adapter %s in slot[%s] has been configured\n", 
-				__FUNCTION__, pci_name(slot->dev.pci_dev), slot->name);
+			dbg("%s: PCI devices in slot[%s] has been configured\n", 
+				__FUNCTION__, slot->name);
 		} else {
 			slot->state = NOT_CONFIGURED;
 			dbg("%s: no pci_dev struct for adapter in slot[%s]\n",
@@ -392,10 +499,31 @@
 		retval = -EINVAL;
 	}
 exit:
-	if (slot->state != NOT_VALID)
-		rpaphp_set_attention_status(slot, LED_ON);
-	else
-		rpaphp_set_attention_status(slot, LED_ID);
 	dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
 	return retval;
 }
+
+struct hotplug_slot *rpaphp_find_hotplug_slot(struct pci_dev *dev)
+{
+	struct list_head	*tmp, *n;
+	struct slot		*slot;
+
+	list_for_each_safe(tmp, n, &rpaphp_slot_head) {
+		struct pci_bus *bus;
+		struct list_head *ln;
+
+		slot = list_entry(tmp, struct slot, rpaphp_slot_list);
+		bus = slot->bridge->subordinate;
+		if (!bus)
+			return NULL; /* shouldn't be here */
+		for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
+                                struct pci_dev *pdev = pci_dev_b(ln);
+				if (pdev == dev)
+					return slot->hotplug_slot;
+		}
+	}
+
+	return NULL;
+}
+
+EXPORT_SYMBOL_GPL(rpaphp_find_hotplug_slot);
--- diff/drivers/pci/hotplug/rpaphp_slot.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/rpaphp_slot.c	2004-07-01 21:32:40.000000000 +0100
@@ -29,6 +29,35 @@
 #include <linux/pci.h>
 #include "rpaphp.h"
 
+static ssize_t removable_read_file (struct hotplug_slot *php_slot, char *buf)
+{
+	u8 value;
+	int retval = -ENOENT;
+	struct slot *slot = (struct slot *)php_slot->private;
+
+	if (!slot)
+		return retval;
+
+	value = slot->removable;
+	retval = sprintf (buf, "%d\n", value);
+	return retval;
+}
+
+static struct hotplug_slot_attribute hotplug_slot_attr_removable = {
+	.attr = {.name = "phy_removable", .mode = S_IFREG | S_IRUGO},
+	.show = removable_read_file,
+};
+
+static void rpaphp_sysfs_add_attr_removable (struct hotplug_slot *slot)
+{
+	sysfs_create_file(&slot->kobj, &hotplug_slot_attr_removable.attr);
+}
+
+static void rpaphp_sysfs_remove_attr_removable (struct hotplug_slot *slot)
+{
+	sysfs_remove_file(&slot->kobj, &hotplug_slot_attr_removable.attr);
+}
+
 static ssize_t location_read_file (struct hotplug_slot *php_slot, char *buf)
 {
         char *value;
@@ -53,7 +82,7 @@
 	sysfs_create_file(&slot->kobj, &hotplug_slot_attr_location.attr);
 }
 
-void rpaphp_sysfs_remove_attr_location (struct hotplug_slot *slot)
+static void rpaphp_sysfs_remove_attr_location (struct hotplug_slot *slot)
 {
 	sysfs_remove_file(&slot->kobj, &hotplug_slot_attr_location.attr);
 }
@@ -68,6 +97,17 @@
 
 void dealloc_slot_struct(struct slot *slot)
 {
+	struct list_head *ln, *n;
+
+	if (slot->dev_type == PCI_DEV) {
+		list_for_each_safe (ln, n, &slot->dev.pci_funcs) {
+			struct rpaphp_pci_func *func;
+
+			func = list_entry(ln, struct rpaphp_pci_func, sibling);
+			kfree(func);
+		}
+	}
+
 	kfree(slot->hotplug_slot->info);
 	kfree(slot->hotplug_slot->name);
 	kfree(slot->hotplug_slot);
@@ -86,7 +126,7 @@
 	memset(slot, 0, sizeof (struct slot));
 	slot->hotplug_slot = kmalloc(sizeof (struct hotplug_slot), GFP_KERNEL);
 	if (!slot->hotplug_slot)
-		goto error_slot;
+		goto error_slot;	
 	memset(slot->hotplug_slot, 0, sizeof (struct hotplug_slot));
 	slot->hotplug_slot->info = kmalloc(sizeof (struct hotplug_slot_info),
 					   GFP_KERNEL);
@@ -95,7 +135,7 @@
 	memset(slot->hotplug_slot->info, 0, sizeof (struct hotplug_slot_info));
 	slot->hotplug_slot->name = kmalloc(BUS_ID_SIZE + 1, GFP_KERNEL);
 	if (!slot->hotplug_slot->name)
-		goto error_info;
+		goto error_info;	
 	slot->location = kmalloc(strlen(drc_name) + 1, GFP_KERNEL);
 	if (!slot->location)
 		goto error_name;
@@ -107,9 +147,8 @@
 	slot->hotplug_slot->private = slot;
 	slot->hotplug_slot->ops = &rpaphp_hotplug_slot_ops;
 	slot->hotplug_slot->release = &rpaphp_release_slot;
-	slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;
-
-	return slot;
+	
+	return (slot);
 
 error_name:
 	kfree(slot->hotplug_slot->name);
@@ -123,15 +162,56 @@
 	return NULL;
 }
 
+static int is_registered(struct slot *slot)
+{
+	struct slot             *tmp_slot;
+
+	list_for_each_entry(tmp_slot, &rpaphp_slot_head, rpaphp_slot_list) {
+		if (!strcmp(tmp_slot->name, slot->name))
+			return 1;
+	}	
+	return 0;
+}
+
+int deregister_slot(struct slot *slot)
+{
+	int retval = 0;
+	struct hotplug_slot *php_slot = slot->hotplug_slot;
+
+	 dbg("%s - Entry: deregistering slot=%s\n",
+		__FUNCTION__, slot->name);
+
+	list_del(&slot->rpaphp_slot_list);
+	
+	/* remove "phy_location" file */
+	rpaphp_sysfs_remove_attr_location(php_slot);
+
+	/* remove "phy_removable" file */
+	rpaphp_sysfs_remove_attr_removable(php_slot);
+
+	retval = pci_hp_deregister(php_slot);
+	if (retval)
+		err("Problem unregistering a slot %s\n", slot->name);
+	else
+		num_slots--;
+
+	dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
+	return retval;
+}
+
 int register_slot(struct slot *slot)
 {
 	int retval;
-	char *vio_uni_addr = NULL;
 
-	dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n",
-		__FUNCTION__, slot->dn->full_name, slot->index, slot->name,
+	dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n", 
+		__FUNCTION__, slot->dn->full_name, slot->index, slot->name, 
 		slot->power_domain, slot->type);
-
+	/* should not try to register the same slot twice */
+	if (is_registered(slot)) { /* should't be here */
+		err("register_slot: slot[%s] is already registered\n", slot->name);
+		rpaphp_release_slot(slot->hotplug_slot);
+		return 1;
+	}	
 	retval = pci_hp_register(slot->hotplug_slot);
 	if (retval) {
 		err("pci_hp_register failed with error %d\n", retval);
@@ -142,30 +222,40 @@
 	/* create "phy_locatoin" file */
 	rpaphp_sysfs_add_attr_location(slot->hotplug_slot);	
 
+	/* create "phy_removable" file */
+	rpaphp_sysfs_add_attr_removable(slot->hotplug_slot);	
+
 	/* add slot to our internal list */
 	dbg("%s adding slot[%s] to rpaphp_slot_list\n",
 	    __FUNCTION__, slot->name);
 
 	list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head);
 
-	if (vio_uni_addr)
-		info("Slot [%s](vio_uni_addr=%s) registered\n",
-		     slot->name, vio_uni_addr);
+	if (slot->dev_type == VIO_DEV)
+		info("Slot [%s](VIO location=%s) registered\n",
+		     slot->name, slot->location);
 	else
-		info("Slot [%s](bus_id=%s) registered\n",
-		     slot->name, pci_name(slot->bridge));
+		info("Slot [%s](PCI location=%s) registered\n",
+		     slot->name, slot->location);
 	num_slots++;
 	return 0;
 }
 
 int rpaphp_get_power_status(struct slot *slot, u8 * value)
 {
-	int rc;
-
-	rc = rtas_get_power_level(slot->power_domain, (int *) value);
-	if (rc)
-		err("failed to get power-level for slot(%s), rc=0x%x\n",
-		    slot->name, rc);
+	int rc = 0;
+	
+	if (slot->type == EMBEDDED) {
+		dbg("%s set to POWER_ON for EMBEDDED slot %s\n",
+			__FUNCTION__, slot->location);
+		*value = POWER_ON;
+	}
+	else {
+		rc = rtas_get_power_level(slot->power_domain, (int *) value);
+		if (rc)
+			err("failed to get power-level for slot(%s), rc=0x%x\n",
+		    		slot->location, rc);
+	}
 
 	return rc;
 }
@@ -177,8 +267,8 @@
 	/* status: LED_OFF or LED_ON */
 	rc = rtas_set_indicator(DR_INDICATOR, slot->index, status);
 	if (rc)
-		err("slot(%s) set attention-status(%d) failed! rc=0x%x\n",
-		    slot->name, status, rc);
+		err("slot(name=%s location=%s index=0x%x) set attention-status(%d) failed! rc=0x%x\n",
+		    slot->name, slot->location, slot->index, status, rc);
 
 	return rc;
 }
--- diff/drivers/pci/hotplug/rpaphp_vio.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/rpaphp_vio.c	2004-07-01 21:32:40.000000000 +0100
@@ -74,12 +74,12 @@
 	int rc = 1;
 	struct slot *slot = NULL;
 	
+	name = rpaphp_get_drc_name(dn);
+	if (!name)
+		goto exit_rc;
 	index = (u32 *) get_property(dn, "ibm,my-drc-index", NULL);
 	if (!index)
 		goto exit_rc;
-	name = get_property(dn, "ibm,loc-code", NULL);
-	if (!name)
-		goto exit_rc;
 	if (!(slot = alloc_slot_struct(dn, *index, name, 0))) {
 		rc = -ENOMEM;
 		goto exit_rc;
@@ -87,7 +87,7 @@
 	slot->dev_type = VIO_DEV;
 	slot->dev.vio_dev = vio_find_node(dn);
 	if (!slot->dev.vio_dev)
-		slot->dev.vio_dev = vio_register_device(dn);
+		slot->dev.vio_dev = vio_register_device_node(dn);
 	if (slot->dev.vio_dev)
 		slot->state = CONFIGURED;
 	else
@@ -108,7 +108,7 @@
 {
 	int retval = 0;
 
-	if ((slot->dev.vio_dev = vio_register_device(slot->dn))) {
+	if ((slot->dev.vio_dev = vio_register_device_node(slot->dn))) {
 		info("%s: VIO adapter %s in slot[%s] has been configured\n",
 			__FUNCTION__, slot->dn->name, slot->name);
 		slot->state = CONFIGURED;
--- diff/drivers/pci/hotplug/shpchp.h	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/shpchp.h	2004-07-01 21:32:40.000000000 +0100
@@ -61,6 +61,7 @@
 	u8 configured;
 	u8 switch_save;
 	u8 presence_save;
+	u8 pwr_save;
 	u32 base_length[0x06];
 	u8 base_type[0x06];
 	u16 reserved2;
--- diff/drivers/pci/hotplug/shpchp_ctrl.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/shpchp_ctrl.c	2004-07-01 21:32:40.000000000 +0100
@@ -137,6 +137,8 @@
 	p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
 	p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save));
 	p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
+	dbg("%s: Card present %x Power status %x\n", __FUNCTION__,
+		func->presence_save, func->pwr_save);
 
 	if (getstatus) {
 		/*
@@ -145,6 +147,10 @@
 		info("Latch open on Slot(%d)\n", ctrl->first_slot + hp_slot);
 		func->switch_save = 0;
 		taskInfo->event_type = INT_SWITCH_OPEN;
+		if (func->pwr_save && func->presence_save) {
+			taskInfo->event_type = INT_POWER_FAULT;
+			err("Surprise Removal of card\n");
+		}
 	} else {
 		/*
 		 *  Switch closed
@@ -1427,6 +1433,7 @@
 					rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, adapter_speed);
 					if (rc) {
 						err("%s: Issue of set bus speed mode command failed\n", __FUNCTION__);
+						up(&ctrl->crit_sect);
 						return WRONG_BUS_FREQUENCY;
 					}
 				
@@ -1438,6 +1445,7 @@
 						err("%s: Can't set bus speed/mode in the case of adapter & bus mismatch\n",
 								  __FUNCTION__);
 						err("%s: Error code (%d)\n", __FUNCTION__, rc);
+						up(&ctrl->crit_sect);
 						return WRONG_BUS_FREQUENCY;
 					}
 					/* Done with exclusive hardware access */
@@ -1589,8 +1597,9 @@
 		func->status = 0;
 		func->switch_save = 0x10;
 		func->is_a_board = 0x01;
+		func->pwr_save = 1;
 
-		/* next, we will instantiate the linux pci_dev structures 
+		/* Next, we will instantiate the linux pci_dev structures 
 		 * (with appropriate driver notification, if already present) 
 		 */
 		index = 0;
@@ -1781,6 +1790,7 @@
 		func->function = 0;
 		func->configured = 0;
 		func->switch_save = 0x10;
+		func->pwr_save = 0;
 		func->is_a_board = 0;
 	}
 
@@ -1807,7 +1817,6 @@
 {
 	struct slot *p_slot = (struct slot *) slot;
 	u8 getstatus;
-	int rc;
 	
 	pushbutton_pending = 0;
 
@@ -1821,23 +1830,7 @@
 		p_slot->state = POWEROFF_STATE;
 		dbg("In power_down_board, b:d(%x:%x)\n", p_slot->bus, p_slot->device);
 
-		if (shpchp_disable_slot(p_slot)) {
-			/* Wait for exclusive access to hardware */
-			down(&p_slot->ctrl->crit_sect);
-
-			/* Turn on the Attention LED */
-			rc = p_slot->hpc_ops->set_attention_status(p_slot, 1);
-			if (rc) {
-				err("%s: Issue of Set Atten Indicator On command failed\n", __FUNCTION__);
-				return;
-			}
-	
-			/* Wait for the command to complete */
-			wait_for_ctrl_irq (p_slot->ctrl);
-
-			/* Done with exclusive hardware access */
-			up(&p_slot->ctrl->crit_sect);
-		}
+		shpchp_disable_slot(p_slot);
 		p_slot->state = STATIC_STATE;
 	} else {
 		p_slot->state = POWERON_STATE;
@@ -1847,15 +1840,6 @@
 			/* Wait for exclusive access to hardware */
 			down(&p_slot->ctrl->crit_sect);
 
-			/* Turn off the green LED */
-			rc = p_slot->hpc_ops->set_attention_status(p_slot, 1);
-			if (rc) {
-				err("%s: Issue of Set Atten Indicator On command failed\n", __FUNCTION__);
-				return;
-			}
-			/* Wait for the command to complete */
-			wait_for_ctrl_irq (p_slot->ctrl);
-			
 			p_slot->hpc_ops->green_led_off(p_slot);
 
 			/* Wait for the command to complete */
@@ -2096,7 +2080,7 @@
 	func = shpchp_slot_find(p_slot->bus, p_slot->device, 0);
 	if (!func) {
 		dbg("%s: Error! slot NULL\n", __FUNCTION__);
-		return (1);
+		return 1;
 	}
 
 	/* Check to see if (latch closed, card present, power off) */
@@ -2105,19 +2089,19 @@
 	if (rc || !getstatus) {
 		info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return (0);
+		return 1;
 	}
 	rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
 	if (rc || getstatus) {
 		info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return (0);
+		return 1;
 	}
 	rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
 	if (rc || getstatus) {
 		info("%s: already enabled on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return (0);
+		return 1;
 	}
 	up(&p_slot->ctrl->crit_sect);
 
@@ -2125,7 +2109,7 @@
 
 	func = shpchp_slot_create(p_slot->bus);
 	if (func == NULL)
-		return (1);
+		return 1;
 
 	func->bus = p_slot->bus;
 	func->device = p_slot->device;
@@ -2135,6 +2119,8 @@
 
 	/* We have to save the presence info for these slots */
 	p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save));
+	p_slot->hpc_ops->get_power_status(p_slot, &(func->pwr_save));
+	dbg("%s: func->pwr_save %x\n", __FUNCTION__, func->pwr_save);
 	p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
 	func->switch_save = !getstatus? 0x10:0;
 
@@ -2181,7 +2167,7 @@
 	struct pci_func *func;
 
 	if (!p_slot->ctrl)
-		return (1);
+		return 1;
 
 	/* Check to see if (latch closed, card present, power on) */
 	down(&p_slot->ctrl->crit_sect);
@@ -2190,19 +2176,19 @@
 	if (ret || !getstatus) {
 		info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return (0);
+		return 1;
 	}
 	ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
 	if (ret || getstatus) {
 		info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return (0);
+		return 1;
 	}
 	ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
 	if (ret || !getstatus) {
 		info("%s: already disabled slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return (0);
+		return 1;
 	}
 	up(&p_slot->ctrl->crit_sect);
 
--- diff/drivers/pci/hotplug/shpchp_pci.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/shpchp_pci.c	2004-07-01 21:32:40.000000000 +0100
@@ -263,6 +263,7 @@
 				new_slot->function = (u8) function;
 				new_slot->is_a_board = 1;
 				new_slot->switch_save = 0x10;
+				new_slot->pwr_save = 1;
 				/* In case of unsupported board */
 				new_slot->status = DevError;
 				new_slot->pci_dev = pci_find_slot(new_slot->bus,
--- diff/drivers/pci/hotplug/shpchprm_acpi.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/shpchprm_acpi.c	2004-07-01 21:32:40.000000000 +0100
@@ -218,6 +218,10 @@
 	}
 
 	ab->_hpp = kmalloc (sizeof (struct acpi__hpp), GFP_KERNEL);
+	if (!ab->_hpp) {
+		err ("acpi_shpchprm:%s alloc for _HPP failed\n", path_name);
+		goto free_and_return;
+	}
 	memset(ab->_hpp, 0, sizeof(struct acpi__hpp));
 
 	ab->_hpp->cache_line_size	= nui[0];
@@ -1391,7 +1395,7 @@
 
 static int bind_pci_resources_to_slots ( struct controller *ctrl)
 {
-	struct pci_func *func;
+	struct pci_func *func, new_func;
 	int busn = ctrl->bus;
 	int devn, funn;
 	u32	vid;
@@ -1406,11 +1410,19 @@
 
 			if (vid != 0xFFFFFFFF) {
 				func = shpchp_slot_find(busn, devn, funn);
-				if (!func)
-					continue;
-				configure_existing_function(ctrl, func);
+				if (!func) {
+					memset(&new_func, 0, sizeof(struct pci_func));
+					new_func.bus = busn;
+					new_func.device = devn;
+					new_func.function = funn;
+					new_func.is_a_board = 1;
+					configure_existing_function(ctrl, &new_func);
+					shpchprm_dump_func_res(&new_func);
+				} else {
+					configure_existing_function(ctrl, func);
+					shpchprm_dump_func_res(func);
+				}
 				dbg("aCCF:existing PCI 0x%x Func ResourceDump\n", ctrl->bus);
-				shpchprm_dump_func_res(func);
 			}
 		}
 	}
--- diff/drivers/pci/hotplug/shpchprm_nonacpi.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/hotplug/shpchprm_nonacpi.c	2004-07-01 21:32:40.000000000 +0100
@@ -208,7 +208,7 @@
 
 static int bind_pci_resources_to_slots ( struct controller *ctrl)
 {
-	struct pci_func *func;
+	struct pci_func *func, new_func;
 	int busn = ctrl->slot_bus;
 	int devn, funn;
 	u32	vid;
@@ -226,11 +226,19 @@
 
 			if (vid != 0xFFFFFFFF) {
 				func = shpchp_slot_find(busn, devn, funn);
-				if (!func)
-					continue;
-				configure_existing_function(ctrl, func);
+				if (!func) {
+					memset(&new_func, 0, sizeof(struct pci_func));
+					new_func.bus = busn;
+					new_func.device = devn;
+					new_func.function = funn;
+					new_func.is_a_board = 1;
+					configure_existing_function(ctrl, &new_func);
+					phprm_dump_func_res(&new_func);
+				} else {
+					configure_existing_function(ctrl, func);
+					phprm_dump_func_res(func);
+				}
 				dbg("aCCF:existing PCI 0x%x Func ResourceDump\n", ctrl->bus);
-				phprm_dump_func_res(func);
 			}
 		}
 	}
--- diff/drivers/pci/msi.c	2004-05-19 22:12:02.000000000 +0100
+++ source/drivers/pci/msi.c	2004-07-01 21:32:40.000000000 +0100
@@ -569,7 +569,7 @@
 	struct msi_desc *entry;
 	struct msg_address address;
 	struct msg_data data;
-	int vector = 0, pos, dev_msi_cap;
+	int vector = 0, pos, dev_msi_cap, i;
 	u32 phys_addr, table_offset;
 	u32 control;
 	u8 bir;
@@ -629,12 +629,12 @@
 	writel(address.hi_address, base + PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET);
 	writel(*(u32*)&data, base + PCI_MSIX_ENTRY_DATA_OFFSET);
 	/* Initialize all entries from 1 up to 0 */
-	for (pos = 1; pos < dev_msi_cap; pos++) {
-		writel(0, base + pos * PCI_MSIX_ENTRY_SIZE +
+	for (i = 1; i < dev_msi_cap; i++) {
+		writel(0, base + i * PCI_MSIX_ENTRY_SIZE +
 			PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET);
-		writel(0, base + pos * PCI_MSIX_ENTRY_SIZE +
+		writel(0, base + i * PCI_MSIX_ENTRY_SIZE +
 			PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET);
-		writel(0, base + pos * PCI_MSIX_ENTRY_SIZE +
+		writel(0, base + i * PCI_MSIX_ENTRY_SIZE +
 			PCI_MSIX_ENTRY_DATA_OFFSET);
 	}
 	attach_msi_entry(entry, vector);
--- diff/drivers/pci/pci-driver.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/pci-driver.c	2004-07-01 21:32:40.000000000 +0100
@@ -539,6 +539,7 @@
 	.hotplug	= pci_hotplug,
 	.suspend	= pci_device_suspend,
 	.resume		= pci_device_resume,
+	.dev_attrs	= pci_dev_attrs,
 };
 
 static int __init pci_driver_init(void)
--- diff/drivers/pci/pci-sysfs.c	2004-05-19 22:12:02.000000000 +0100
+++ source/drivers/pci/pci-sysfs.c	2004-07-01 21:32:40.000000000 +0100
@@ -23,14 +23,13 @@
 /* show configuration fields */
 #define pci_config_attr(field, format_string)				\
 static ssize_t								\
-show_##field (struct device *dev, char *buf)				\
+field##_show(struct device *dev, char *buf)				\
 {									\
 	struct pci_dev *pdev;						\
 									\
 	pdev = to_pci_dev (dev);					\
 	return sprintf (buf, format_string, pdev->field);		\
-}									\
-static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
+}
 
 pci_config_attr(vendor, "0x%04x\n");
 pci_config_attr(device, "0x%04x\n");
@@ -41,7 +40,7 @@
 
 /* show resources */
 static ssize_t
-pci_show_resources(struct device * dev, char * buf)
+resource_show(struct device * dev, char * buf)
 {
 	struct pci_dev * pci_dev = to_pci_dev(dev);
 	char * str = buf;
@@ -60,7 +59,16 @@
 	return (str - buf);
 }
 
-static DEVICE_ATTR(resource,S_IRUGO,pci_show_resources,NULL);
+struct device_attribute pci_dev_attrs[] = {
+	__ATTR_RO(resource),
+	__ATTR_RO(vendor),
+	__ATTR_RO(device),
+	__ATTR_RO(subsystem_vendor),
+	__ATTR_RO(subsystem_device),
+	__ATTR_RO(class),
+	__ATTR_RO(irq),
+	__ATTR_NULL,
+};
 
 static ssize_t
 pci_read_config(struct kobject *kobj, char *buf, loff_t off, size_t count)
@@ -180,21 +188,10 @@
 
 void pci_create_sysfs_dev_files (struct pci_dev *pdev)
 {
-	struct device *dev = &pdev->dev;
-
-	/* current configuration's attributes */
-	device_create_file (dev, &dev_attr_vendor);
-	device_create_file (dev, &dev_attr_device);
-	device_create_file (dev, &dev_attr_subsystem_vendor);
-	device_create_file (dev, &dev_attr_subsystem_device);
-	device_create_file (dev, &dev_attr_class);
-	device_create_file (dev, &dev_attr_irq);
-	device_create_file (dev, &dev_attr_resource);
-
 	if (pdev->cfg_size < 4096)
-		sysfs_create_bin_file(&dev->kobj, &pci_config_attr);
+		sysfs_create_bin_file(&pdev->dev.kobj, &pci_config_attr);
 	else
-		sysfs_create_bin_file(&dev->kobj, &pcie_config_attr);
+		sysfs_create_bin_file(&pdev->dev.kobj, &pcie_config_attr);
 
 	/* add platform-specific attributes */
 	pcibios_add_platform_entries(pdev);
--- diff/drivers/pci/pci.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pci/pci.c	2004-07-01 21:32:40.000000000 +0100
@@ -442,7 +442,7 @@
 	pci_read_config_word(dev,pm+PCI_PM_PMC,&value);
 
 	value &= PCI_PM_CAP_PME_MASK;
-	value >>= ffs(value);   /* First bit of mask */
+	value >>= ffs(PCI_PM_CAP_PME_MASK) - 1;   /* First bit of mask */
 
 	/* Check if it can generate PME# from requested state. */
 	if (!value || !(value & (1 << state))) 
--- diff/drivers/pci/pci.h	2004-05-19 22:12:02.000000000 +0100
+++ source/drivers/pci/pci.h	2004-07-01 21:32:40.000000000 +0100
@@ -62,3 +62,4 @@
 extern spinlock_t pci_bus_lock;
 
 extern int pciehp_msi_quirk;
+extern struct device_attribute pci_dev_attrs[];
--- diff/drivers/pci/quirks.c	2004-05-19 22:12:02.000000000 +0100
+++ source/drivers/pci/quirks.c	2004-07-01 21:32:40.000000000 +0100
@@ -705,6 +705,7 @@
 		}
 	if (dev->device == PCI_DEVICE_ID_INTEL_82845G_HB)
 		switch(dev->subsystem_device) {
+ 		case 0x80b1: /* P4GE-V */
 		case 0x80b2: /* P4PE */
  		case 0x8093: /* P4B533-V */
 			asus_hides_smbus = 1;
--- diff/drivers/pcmcia/Kconfig	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pcmcia/Kconfig	2004-07-01 21:32:40.000000000 +0100
@@ -69,6 +69,13 @@
 	depends on YENTA
 	default y if YENTA
 
+config PD6729
+	tristate "Cirrus PD6729 compatible bridge support"
+	depends on PCMCIA && PCI
+	help
+	  This provides support for the Cirrus PD6729 PCI-to-PCMCIA bridge
+	  device, found in some older laptops and PCMCIA card readers.
+
 config I82092
 	tristate "i82092 compatible bridge support"
 	depends on PCMCIA && PCI
--- diff/drivers/pcmcia/Makefile	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pcmcia/Makefile	2004-07-01 21:32:40.000000000 +0100
@@ -9,6 +9,7 @@
 obj-$(CONFIG_PCMCIA)				+= pcmcia_core.o ds.o
 obj-$(CONFIG_YENTA) 				+= yenta_socket.o
 
+obj-$(CONFIG_PD6729)				+= pd6729.o
 obj-$(CONFIG_I82365)				+= i82365.o
 obj-$(CONFIG_I82092)				+= i82092.o
 obj-$(CONFIG_TCIC)				+= tcic.o
--- diff/drivers/pcmcia/cistpl.c	2004-05-19 22:12:04.000000000 +0100
+++ source/drivers/pcmcia/cistpl.c	2004-07-01 21:32:40.000000000 +0100
@@ -85,13 +85,15 @@
 
 void release_cis_mem(struct pcmcia_socket *s)
 {
-    if (s->cis_mem.sys_start != 0) {
+    if (s->cis_mem.flags & MAP_ACTIVE) {
 	s->cis_mem.flags &= ~MAP_ACTIVE;
 	s->ops->set_mem_map(s, &s->cis_mem);
-	if (!(s->features & SS_CAP_STATIC_MAP))
-	    release_mem_region(s->cis_mem.sys_start, s->map_size);
+	if (s->cis_mem.res) {
+	    release_resource(s->cis_mem.res);
+	    kfree(s->cis_mem.res);
+	    s->cis_mem.res = NULL;
+	}
 	iounmap(s->cis_virt);
-	s->cis_mem.sys_start = 0;
 	s->cis_virt = NULL;
     }
 }
@@ -105,17 +107,16 @@
 set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flags)
 {
     pccard_mem_map *mem = &s->cis_mem;
-    if (!(s->features & SS_CAP_STATIC_MAP) &&
-	mem->sys_start == 0) {
-	validate_mem(s);
-	mem->sys_start = 0;
-	if (find_mem_region(&mem->sys_start, s->map_size,
-			    s->map_size, 0, "card services", s)) {
+    if (!(s->features & SS_CAP_STATIC_MAP) && mem->res == NULL) {
+	mem->res = find_mem_region(0, s->map_size, s->map_size, 0,
+				   "card services", s);
+	if (mem->res == NULL) {
 	    printk(KERN_NOTICE "cs: unable to map card memory!\n");
 	    return NULL;
 	}
-	mem->sys_stop = mem->sys_start+s->map_size-1;
-	s->cis_virt = ioremap(mem->sys_start, s->map_size);
+	mem->sys_start = mem->res->start;
+	mem->sys_stop = mem->res->end;
+	s->cis_virt = ioremap(mem->res->start, s->map_size);
     }
     mem->card_start = card_offset;
     mem->flags = flags;
--- diff/drivers/pcmcia/cs.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pcmcia/cs.c	2004-07-01 21:32:40.000000000 +0100
@@ -1100,8 +1100,8 @@
     if (w == MAX_WIN)
 	return CS_NO_MORE_ITEMS;
     win = &s->win[w];
-    req->Base = win->ctl.sys_start;
-    req->Size = win->ctl.sys_stop - win->ctl.sys_start + 1;
+    req->Base = win->ctl.res->start;
+    req->Size = win->ctl.res->end - win->ctl.res->start + 1;
     req->AccessSpeed = win->ctl.speed;
     req->Attributes = 0;
     if (win->ctl.flags & MAP_ATTRIB)
@@ -1155,6 +1155,22 @@
 
 #endif
 
+/*=====================================================================
+
+    Return the driver model device associated with a card..
+
+======================================================================*/
+
+struct device *pcmcia_lookup_device(client_handle_t handle)
+{
+	if (CHECK_HANDLE(handle))
+		return NULL;
+
+	return handle->device;
+}
+
+EXPORT_SYMBOL(pcmcia_lookup_device);
+
 /*======================================================================
 
     Get the current socket state bits.  We don't support the latched
@@ -1548,8 +1564,11 @@
     s->state &= ~SOCKET_WIN_REQ(win->index);
 
     /* Release system memory */
-    if(!(s->features & SS_CAP_STATIC_MAP))
-	release_mem_region(win->base, win->size);
+    if (win->ctl.res) {
+	release_resource(win->ctl.res);
+	kfree(win->ctl.res);
+	win->ctl.res = NULL;
+    }
     win->handle->state &= ~CLIENT_WIN_REQ(win->index);
 
     win->magic = 0;
@@ -1871,14 +1890,19 @@
     win->index = w;
     win->handle = *handle;
     win->sock = s;
-    win->base = req->Base;
-    win->size = req->Size;
 
-    if (!(s->features & SS_CAP_STATIC_MAP) &&
-	find_mem_region(&win->base, win->size, align,
-			(req->Attributes & WIN_MAP_BELOW_1MB),
-			(*handle)->dev_info, s))
-	return CS_IN_USE;
+    if (!(s->features & SS_CAP_STATIC_MAP)) {
+	win->ctl.res = find_mem_region(req->Base, req->Size, align,
+				       (req->Attributes & WIN_MAP_BELOW_1MB),
+				       (*handle)->dev_info, s);
+	if (!win->ctl.res)
+	    return CS_IN_USE;
+	win->ctl.sys_start = win->ctl.res->start;
+	win->ctl.sys_stop = win->ctl.res->end;
+    } else {
+	win->ctl.sys_start = req->Base;
+	win->ctl.sys_stop = req->Base + req->Size - 1;
+    }
     (*handle)->state |= CLIENT_WIN_REQ(w);
 
     /* Configure the socket controller */
@@ -1893,8 +1917,6 @@
 	win->ctl.flags |= MAP_16BIT;
     if (req->Attributes & WIN_USE_WAIT)
 	win->ctl.flags |= MAP_USE_WAIT;
-    win->ctl.sys_start = win->base;
-    win->ctl.sys_stop = win->base + win->size-1;
     win->ctl.card_start = 0;
     if (s->ops->set_mem_map(s, &win->ctl) != 0)
 	return CS_BAD_ARGS;
@@ -2141,6 +2163,7 @@
 EXPORT_SYMBOL(pcmcia_suspend_card);
 EXPORT_SYMBOL(pcmcia_validate_cis);
 EXPORT_SYMBOL(pcmcia_write_memory);
+EXPORT_SYMBOL(read_tuple);
 
 EXPORT_SYMBOL(dead_socket);
 EXPORT_SYMBOL(MTDHelperEntry);
--- diff/drivers/pcmcia/cs_internal.h	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pcmcia/cs_internal.h	2004-07-01 21:32:40.000000000 +0100
@@ -33,6 +33,7 @@
 typedef struct client_t {
     u_short		client_magic;
     struct pcmcia_socket *Socket;
+    struct device      *device;
     u_char		Function;
     dev_info_t		dev_info;
     u_int		Attributes;
@@ -180,12 +181,12 @@
 int copy_memory(memory_handle_t handle, copy_op_t *req);
 
 /* In rsrc_mgr */
-void validate_mem(struct pcmcia_socket *s);
+void pcmcia_validate_mem(struct pcmcia_socket *s);
 struct resource *find_io_region(unsigned long base, int num, unsigned long align,
 		   char *name, struct pcmcia_socket *s);
 int adjust_io_region(struct resource *res, unsigned long r_start,
 		     unsigned long r_end, struct pcmcia_socket *s);
-int find_mem_region(u_long *base, u_long num, u_long align,
+struct resource *find_mem_region(u_long base, u_long num, u_long align,
 		    int low, char *name, struct pcmcia_socket *s);
 int try_irq(u_int Attributes, int irq, int specific);
 void undo_irq(u_int Attributes, int irq);
--- diff/drivers/pcmcia/ds.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pcmcia/ds.c	2004-07-01 21:32:40.000000000 +0100
@@ -108,6 +108,9 @@
     struct pcmcia_bus_socket *socket;
 } user_info_t;
 
+static LIST_HEAD(pcmcia_sockets);
+static DECLARE_MUTEX(pcmcia_socket_mutex);
+
 /* Socket state information */
 struct pcmcia_bus_socket {
 	atomic_t		refcount;
@@ -119,6 +122,9 @@
 	struct work_struct	removal;
 	socket_bind_t		*bind;
 	struct pcmcia_socket	*parent;
+	struct list_head	devices;
+	struct semaphore	device_mutex;
+	struct list_head	socket_list;
 };
 
 #define DS_SOCKET_PRESENT		0x01
@@ -135,6 +141,8 @@
 
 extern struct proc_dir_entry *proc_pccard;
 
+static int resources_ready;
+
 /*====================================================================*/
 
 /* code which was in cs.c before */
@@ -164,6 +172,7 @@
 	client->client_magic = CLIENT_MAGIC;
 	strlcpy(client->dev_info, (char *)req->dev_info, DEV_NAME_LEN);
 	client->Socket = s;
+	client->device = &req->device->dev;
 	client->Function = req->Function;
 	client->state = CLIENT_UNBOUND;
 	client->erase_busy.next = &client->erase_busy;
@@ -354,6 +363,8 @@
 
 /*======================================================================*/
 
+static struct pcmcia_device * get_pcmcia_device (struct pcmcia_bus_socket *s, int function);
+static void put_pcmcia_device(struct pcmcia_device *dev);
 static struct pcmcia_driver * get_pcmcia_driver (dev_info_t *dev_info);
 static struct pcmcia_bus_socket * get_socket_info_by_nr(unsigned int nr);
 
@@ -430,6 +441,218 @@
 
 /*======================================================================
 
+    sysfs support
+
+======================================================================*/
+
+static ssize_t
+pcmcia_show_product_string(struct pcmcia_device *dev, char *buf, int index)
+{
+	char *str = buf;
+
+	if (dev->id_mask & DEVICE_HAS_VERSION_INFO && index < dev->vers_1.ns)
+		str += sprintf(str,"%s\n",
+			       dev->vers_1.str+dev->vers_1.ofs[index]);
+	else
+		str += sprintf(str,"\n");
+	return (str - buf);
+}
+
+#define pcmcia_prod_str_attr(field, index)				\
+static ssize_t								\
+show_##field (struct device *dmdev, char *buf)				\
+{									\
+	struct pcmcia_device *dev;					\
+									\
+	dev = to_pcmcia_device (dmdev);					\
+	return pcmcia_show_product_string(dev,buf,index);		\
+}									\
+static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
+
+pcmcia_prod_str_attr(prod_str0,0);
+pcmcia_prod_str_attr(prod_str1,1);
+pcmcia_prod_str_attr(prod_str2,2);
+pcmcia_prod_str_attr(prod_str3,3);
+
+static ssize_t
+pcmcia_show_manfid(struct device *dmdev, char *buf)
+{
+	struct pcmcia_device *dev = to_pcmcia_device(dmdev);
+	char *str = buf;
+
+	if (dev->id_mask & DEVICE_HAS_MANF_INFO)
+		str += sprintf(str,"0x%04x, 0x%04x\n",
+			       dev->manfid.manf,
+			       dev->manfid.card);
+	else
+		str += sprintf(str,"\n");
+	return (str - buf);
+}
+
+static DEVICE_ATTR(manfid,S_IRUGO,pcmcia_show_manfid,NULL);
+
+static void pcmcia_sysfs_attach(struct pcmcia_device *dev)
+{
+	device_create_file (&dev->dev, &dev_attr_prod_str0);
+	device_create_file (&dev->dev, &dev_attr_prod_str1);
+	device_create_file (&dev->dev, &dev_attr_prod_str2);
+	device_create_file (&dev->dev, &dev_attr_prod_str3);
+	device_create_file (&dev->dev, &dev_attr_manfid);
+}
+
+/*======================================================================
+
+    device addition, removal, and hotplug functions for the driver model
+
+======================================================================*/
+
+static void pcmcia_bus_release_device(struct device *pdev)
+{
+	struct pcmcia_device *dev = to_pcmcia_device(pdev);
+	kfree(dev);
+}
+
+static int pcmcia_bus_insert_card(struct pcmcia_bus_socket *s)
+{
+	struct pcmcia_device *dev;
+	int i, ret, function_count = 0, has_cis = 0;
+	cisinfo_t cisinfo;
+
+	if (!(s->state & DS_SOCKET_PRESENT))
+		return CS_NO_CARD;
+
+	if (!resources_ready && !(s->parent->features & SS_CAP_STATIC_MAP))
+		return CS_NO_CARD;
+
+	down(&s->device_mutex);
+	if (!list_empty(&s->devices)) {
+		ret = -EBUSY;
+		goto out;
+	}
+
+	ret = pcmcia_validate_cis(s->handle, &cisinfo);
+	if (ret)
+		goto out;
+
+	if (cisinfo.Chains) {
+		cistpl_longlink_mfc_t mfc;
+
+		has_cis = 1;
+		if (!read_tuple(s->handle, CISTPL_LONGLINK_MFC, &mfc))
+			function_count = mfc.nfn;
+	}
+
+	for (i=0; i<=function_count; i++) {
+		dev = kmalloc(sizeof(struct pcmcia_device), GFP_KERNEL);
+		if (!dev)
+			continue;
+
+		memset(dev, 0, sizeof(struct pcmcia_device));
+		dev->socket = s;
+		dev->dev.parent = s->parent->dev.dev;
+		dev->dev.bus = &pcmcia_bus_type;
+		dev->dev.release = &pcmcia_bus_release_device;
+		snprintf(dev->dev.bus_id, BUS_ID_SIZE, "%u:%u", s->parent->sock, i);
+
+		dev->function = i;
+		if (has_cis) {
+			if (!read_tuple(s->handle, CISTPL_VERS_1, &dev->vers_1))
+				dev->id_mask |= DEVICE_HAS_VERSION_INFO;
+			if (!read_tuple(s->handle, CISTPL_MANFID, &dev->manfid))
+				dev->id_mask |= DEVICE_HAS_MANF_INFO;
+		}
+
+		ret = device_register(&dev->dev);
+		if (!ret) {
+			list_add_tail(&dev->device_list, &s->devices);
+			pcmcia_sysfs_attach(dev);
+		} else
+			kfree(dev);
+	}
+
+out:
+	up(&s->device_mutex);
+	return ret;
+}
+
+static void pcmcia_bus_remove_card(struct pcmcia_bus_socket *s)
+{
+	struct pcmcia_device *dev, *tmp;
+	down(&s->device_mutex);
+	list_for_each_entry_safe(dev, tmp, &s->devices, device_list) {
+		list_del(&dev->device_list);
+		device_unregister(&dev->dev);
+	}
+	up(&s->device_mutex);
+}
+
+#ifdef	CONFIG_HOTPLUG
+
+int pcmcia_bus_hotplug(struct device *pdev, char **envp, int num_envp,
+		 char *buffer, int buffer_size)
+{
+	struct pcmcia_device *dev;
+	char *scratch;
+	int i = 0;
+	int length = 0;
+
+	if (!pdev)
+		return -ENODEV;
+
+	dev = to_pcmcia_device(pdev);
+
+	scratch = buffer;
+
+	/* stuff we want to pass to /sbin/hotplug */
+	envp[i++] = scratch;
+	length += snprintf (scratch, buffer_size - length, "PRODUCT=");
+	for (i = 0; i < dev->vers_1.ns; i++) {
+		length += snprintf(scratch,buffer_size - length, "%s\"%s\"", (i>0) ? "," : "",
+			       dev->vers_1.str+dev->vers_1.ofs[i]);
+	}
+
+	if ((buffer_size - length <= 0) || (i >= num_envp))
+		return -ENOMEM;
+	++length;
+	scratch += length;
+
+	envp [i++] = scratch;
+	length += snprintf (scratch, buffer_size - length, "MANFID=0x%04x,0x%04x",
+			    dev->manfid.manf, dev->manfid.card);
+	if ((buffer_size - length <= 0) || (i >= num_envp))
+		return -ENOMEM;
+	++length;
+	scratch += length;
+
+	envp[i] = 0;
+
+	return 0;
+}
+
+#else /* CONFIG_HOTPLUG */
+
+int pcmcia_bus_hotplug(struct device *pdev, char **envp, int num_envp,
+		 char *buffer, int buffer_size)
+{
+	return -ENODEV;
+}
+
+#endif /* CONFIG_HOTPLUG */
+
+static void pcmcia_rescan_sockets(void)
+{
+	struct pcmcia_bus_socket *s;
+
+	down(&pcmcia_socket_mutex);
+
+	list_for_each_entry(s, &pcmcia_sockets, socket_list)
+		pcmcia_bus_insert_card(s);
+
+	up(&pcmcia_socket_mutex);
+}
+
+/*======================================================================
+
     These manage a ring buffer of events pending for one user process
     
 ======================================================================*/
@@ -501,6 +724,7 @@
 	
     case CS_EVENT_CARD_REMOVAL:
 	s->state &= ~DS_SOCKET_PRESENT;
+	pcmcia_bus_remove_card(s);
 	if (!(s->state & DS_SOCKET_REMOVAL_PENDING)) {
 		s->state |= DS_SOCKET_REMOVAL_PENDING;
 		schedule_delayed_work(&s->removal,  HZ/10);
@@ -509,6 +733,7 @@
 	
     case CS_EVENT_CARD_INSERTION:
 	s->state |= DS_SOCKET_PRESENT;
+	pcmcia_bus_insert_card(s);
 	handle_event(s, event);
 	break;
 
@@ -562,6 +787,7 @@
 static int bind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info)
 {
     struct pcmcia_driver *driver;
+    struct pcmcia_device *device;
     socket_bind_t *b;
     bind_req_t bind_req;
     int ret;
@@ -587,7 +813,12 @@
     if (!try_module_get(driver->owner))
 	    return -EINVAL;
 
+    device = get_pcmcia_device(s, bind_info->function);
+    if (!device)
+	    return -EINVAL;
+
     bind_req.Socket = s->parent;
+    bind_req.device = device;
     bind_req.Function = bind_info->function;
     bind_req.dev_info = (dev_info_t *) driver->drv.name;
     ret = pcmcia_bind_device(&bind_req);
@@ -614,16 +845,25 @@
     b->next = s->bind;
     s->bind = b;
     
+    down_write(&device->dev.bus->subsys.rwsem);
+    device->dev.driver = &driver->drv;
+
     if (driver->attach) {
 	b->instance = driver->attach();
 	if (b->instance == NULL) {
 	    printk(KERN_NOTICE "ds: unable to create instance "
 		   "of '%s'!\n", (char *)bind_info->dev_info);
 	    module_put(driver->owner);
+	    device->dev.driver = NULL;
+	    up_write(&device->dev.bus->subsys.rwsem);
 	    return -ENODEV;
 	}
     }
     
+    device_bind_driver(&device->dev);
+    up_write(&device->dev.bus->subsys.rwsem);
+    put_pcmcia_device(device);
+
     return 0;
 } /* bind_request */
 
@@ -699,6 +939,7 @@
 static int unbind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info)
 {
     socket_bind_t **b, *c;
+    struct pcmcia_device *device;
 
     ds_dbg(2, "unbind_request(%d, '%s')\n", s->parent->sock,
 	  (char *)bind_info->dev_info);
@@ -710,6 +951,14 @@
     if (*b == NULL)
 	return -ENODEV;
     
+    device = get_pcmcia_device(s, bind_info->function);
+    if (device) {
+	    down_write(&device->dev.bus->subsys.rwsem);
+	    device_release_driver(&device->dev);
+	    up_write(&device->dev.bus->subsys.rwsem);
+	    put_pcmcia_device(device);
+    }
+
     c = *b;
     c->driver->use_count--;
     if (c->driver->detach) {
@@ -933,6 +1182,12 @@
     switch (cmd) {
     case DS_ADJUST_RESOURCE_INFO:
 	ret = pcmcia_adjust_resource_info(s->handle, &buf.adjust);
+	/*
+	 * We can't read CIS information until user space has given us the
+	 * memory resource locations.  Therefore, we wait until now.
+	 */
+	if ((ret == CS_SUCCESS) && (buf.adjust.Resource == RES_MEMORY_RANGE))
+		resources_ready = 1;
 	break;
     case DS_GET_CARD_SERVICES_INFO:
 	ret = pcmcia_get_card_services_info(&buf.servinfo);
@@ -941,6 +1196,7 @@
 	ret = pcmcia_get_configuration_info(s->handle, &buf.config);
 	break;
     case DS_GET_FIRST_TUPLE:
+	pcmcia_validate_mem(s->parent);
 	ret = pcmcia_get_first_tuple(s->handle, &buf.tuple);
 	break;
     case DS_GET_NEXT_TUPLE:
@@ -962,6 +1218,7 @@
 	ret = pcmcia_get_status(s->handle, &buf.status);
 	break;
     case DS_VALIDATE_CIS:
+	pcmcia_validate_mem(s->parent);
 	ret = pcmcia_validate_cis(s->handle, &buf.cisinfo);
 	break;
     case DS_SUSPEND_CARD:
@@ -1003,6 +1260,7 @@
 	break;
     case DS_BIND_REQUEST:
 	if (!capable(CAP_SYS_ADMIN)) return -EPERM;
+	pcmcia_rescan_sockets();
 	err = bind_request(s, &buf.bind_info);
 	break;
     case DS_GET_DEVICE_INFO:
@@ -1073,7 +1331,11 @@
 		return -ENOMEM;
 	memset(s, 0, sizeof(struct pcmcia_bus_socket));
 	atomic_set(&s->refcount, 1);
-    
+
+	down(&pcmcia_socket_mutex);
+	list_add_tail(&s->socket_list, &pcmcia_sockets);
+	up(&pcmcia_socket_mutex);
+
 	/*
 	 * Ugly. But we want to wait for the socket threads to have started up.
 	 * We really should let the drivers themselves drive some of this..
@@ -1085,6 +1347,8 @@
 	init_waitqueue_head(&s->request);
 
 	/* initialize data */
+	INIT_LIST_HEAD(&s->devices);
+	init_MUTEX(&s->device_mutex);
 	INIT_WORK(&s->removal, handle_removal, s);
 	s->parent = socket;
 
@@ -1133,6 +1397,11 @@
 
 	pcmcia_deregister_client(socket->pcmcia->handle);
 
+	down(&pcmcia_socket_mutex);
+	pcmcia_bus_remove_card(socket->pcmcia);
+	list_del(&socket->pcmcia->socket_list);
+	up(&pcmcia_socket_mutex);
+
 	socket->pcmcia->state |= DS_SOCKET_DEAD;
 	pcmcia_put_bus_socket(socket->pcmcia);
 	socket->pcmcia = NULL;
@@ -1151,7 +1420,9 @@
 
 struct bus_type pcmcia_bus_type = {
 	.name = "pcmcia",
+	.hotplug = pcmcia_bus_hotplug,
 };
+
 EXPORT_SYMBOL(pcmcia_bus_type);
 
 
@@ -1178,13 +1449,12 @@
 
 	return 0;
 }
-fs_initcall(init_pcmcia_bus); /* one level after subsys_initcall so that 
+fs_initcall(init_pcmcia_bus); /* one level after subsys_initcall so that
 			       * pcmcia_socket_class is already registered */
 
 
 static void __exit exit_pcmcia_bus(void)
 {
-	class_interface_unregister(&pcmcia_bus_interface);
 
 #ifdef CONFIG_PROC_FS
 	if (proc_pccard) {
@@ -1195,6 +1465,7 @@
 	if (major_dev != -1)
 		unregister_chrdev(major_dev, "pcmcia");
 
+	class_interface_unregister(&pcmcia_bus_interface);
 	bus_unregister(&pcmcia_bus_type);
 }
 module_exit(exit_pcmcia_bus);
@@ -1236,9 +1507,30 @@
 	struct cmp_data cmp = {
 		.dev_info = dev_info,
 	};
-	
+
 	ret = bus_for_each_drv(&pcmcia_bus_type, NULL, &cmp, cmp_drv_callback);
 	if (ret)
 		return cmp.drv;
 	return NULL;
 }
+
+static struct pcmcia_device * get_pcmcia_device (struct pcmcia_bus_socket *s, int function)
+{
+	struct pcmcia_device *dev, *tmp;
+	down(&s->device_mutex);
+	list_for_each_entry_safe(dev, tmp, &s->devices, device_list) {
+		if (dev->function == function) {
+			if (!get_device(&dev->dev))
+				break;
+			up(&s->device_mutex);
+			return dev;
+		}
+	}
+	up(&s->device_mutex);
+	return NULL;
+}
+
+static void put_pcmcia_device(struct pcmcia_device *dev)
+{
+	put_device(&dev->dev);
+}
--- diff/drivers/pcmcia/i82092.c	2004-05-19 22:12:04.000000000 +0100
+++ source/drivers/pcmcia/i82092.c	2004-07-01 21:32:40.000000000 +0100
@@ -420,12 +420,12 @@
 static int i82092aa_init(struct pcmcia_socket *sock)
 {
 	int i;
+	struct resource res = { .start = 0, .end = 0x0fff };
         pccard_io_map io = { 0, 0, 0, 0, 1 };
-        pccard_mem_map mem = { 0, 0, 0, 0, 0, 0 };
+	pccard_mem_map mem = { .res = &res, .sys_stop = 0x0fff, };
         
         enter("i82092aa_init");
                         
-        mem.sys_stop = 0x0fff;
         for (i = 0; i < 2; i++) {
         	io.map = i;
                 i82092aa_set_io_map(sock, &io);
--- diff/drivers/pcmcia/i82365.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pcmcia/i82365.c	2004-07-01 21:32:40.000000000 +0100
@@ -65,7 +65,6 @@
 #include "cirrus.h"
 #include "vg468.h"
 #include "ricoh.h"
-#include "o2micro.h"
 
 #ifdef DEBUG
 static const char version[] =
@@ -1308,10 +1307,10 @@
 static int pcic_init(struct pcmcia_socket *s)
 {
 	int i;
+	struct resource res = { .start = 0, .end = 0x1000 };
 	pccard_io_map io = { 0, 0, 0, 0, 1 };
-	pccard_mem_map mem = { 0, 0, 0, 0, 0, 0 };
+	pccard_mem_map mem = { .res = &res, .sys_stop = 0x1000, };
 
-	mem.sys_stop = 0x1000;
 	for (i = 0; i < 2; i++) {
 		io.map = i;
 		pcic_set_io_map(s, &io);
@@ -1372,8 +1371,15 @@
 {
     int i, ret;
 
-    if (driver_register(&i82365_driver))
-	return -1;
+    ret = driver_register(&i82365_driver);
+    if (ret)
+	return ret;
+
+    ret = platform_device_register(&i82365_device);
+    if (ret) {
+	driver_unregister(&i82365_driver);
+	return ret;
+    }
 
     printk(KERN_INFO "Intel ISA PCIC probe: ");
     sockets = 0;
@@ -1382,12 +1388,11 @@
 
     if (sockets == 0) {
 	printk("not found.\n");
+	platform_device_unregister(&i82365_device);
 	driver_unregister(&i82365_driver);
 	return -ENODEV;
     }
 
-    platform_device_register(&i82365_device);
-
     /* Set up interrupt handler(s) */
     if (grab_irq != 0)
 	request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt);
--- diff/drivers/pcmcia/o2micro.h	2004-05-19 22:12:04.000000000 +0100
+++ source/drivers/pcmcia/o2micro.h	2004-07-01 21:32:40.000000000 +0100
@@ -120,4 +120,30 @@
 #define  O2_MODE_E_LED_OUT	0x08
 #define  O2_MODE_E_SKTA_ACTV	0x10
 
+static int o2micro_override(struct yenta_socket *socket)
+{
+	/*
+	 * 'reserved' register at 0x94/D4. chaning it to 0xCA (8 bit) enables
+	 * read prefetching which for example makes the RME Hammerfall DSP
+	 * working. for some bridges it is at 0x94, for others at 0xD4. it's
+	 * ok to write to both registers on all O2 bridges.
+	 * from Eric Still, 02Micro.
+	 */
+	if (PCI_FUNC(socket->dev->devfn) == 0) {
+		config_writeb(socket, 0x94, 0xCA);
+		config_writeb(socket, 0xD4, 0xCA);
+	}
+
+	return 0;
+}
+
+static void o2micro_restore_state(struct yenta_socket *socket)
+{
+	/*
+	 * as long as read prefetch is the only thing in
+	 * o2micro_override, it's safe to call it from here
+	 */
+	o2micro_override(socket);
+}
+
 #endif /* _LINUX_O2MICRO_H */
--- diff/drivers/pcmcia/rsrc_mgr.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pcmcia/rsrc_mgr.c	2004-07-01 21:32:40.000000000 +0100
@@ -118,7 +118,7 @@
 		res->name = name;
 		res->start = b;
 		res->end = b + n - 1;
-		res->flags = flags | IORESOURCE_BUSY;
+		res->flags = flags;
 	}
 	return res;
 }
@@ -303,6 +303,7 @@
 
 	s->cis_mem.sys_start = res->start;
 	s->cis_mem.sys_stop = res->end;
+	s->cis_mem.res = res;
 	s->cis_virt = ioremap(res->start, s->map_size);
 	if (s->cis_virt) {
 		ret = pcmcia_validate_cis(s->clients, info);
@@ -313,6 +314,7 @@
 	}
 	s->cis_mem.sys_start = 0;
 	s->cis_mem.sys_stop = 0;
+	s->cis_mem.res = NULL;
 	if ((ret != 0) || (info->Chains == 0))
 		return 0;
 	return 1;
@@ -332,6 +334,7 @@
 		map.speed = 0;
 		map.sys_start = res->start;
 		map.sys_stop = res->end;
+		map.res = res;
 		map.card_start = 0;
 		s->ops->set_mem_map(s, &map);
 
@@ -454,7 +457,7 @@
     return do_mem_probe(m->base, m->num, s);
 }
 
-void validate_mem(struct pcmcia_socket *s)
+static void validate_mem(struct pcmcia_socket *s)
 {
     resource_map_t *m, mm;
     static u_char order[] = { 0xd0, 0xe0, 0xc0, 0xf0 };
@@ -462,9 +465,6 @@
     u_long b, i, ok = 0;
     int force_low = !(s->features & SS_CAP_PAGE_REGS);
 
-    if (!probe_mem)
-	return;
-
     down(&rsrc_sem);
     /* We do up to four passes through the list */
     if (!force_low) {
@@ -500,12 +500,12 @@
 
 #else /* CONFIG_PCMCIA_PROBE */
 
-void validate_mem(struct pcmcia_socket *s)
+static void validate_mem(struct pcmcia_socket *s)
 {
     resource_map_t *m, mm;
     static int done = 0;
     
-    if (probe_mem && done++ == 0) {
+    if (done++ == 0) {
 	down(&rsrc_sem);
 	for (m = mem_db.next; m != &mem_db; m = mm.next) {
 	    mm = *m;
@@ -518,6 +518,18 @@
 
 #endif /* CONFIG_PCMCIA_PROBE */
 
+void pcmcia_validate_mem(struct pcmcia_socket *s)
+{
+	down(&s->skt_sem);
+
+	if (probe_mem && s->state & SOCKET_PRESENT)
+		validate_mem(s);
+
+	up(&s->skt_sem);
+}
+
+EXPORT_SYMBOL(pcmcia_validate_mem);
+
 struct pcmcia_align_data {
 	unsigned long	mask;
 	unsigned long	offset;
@@ -622,7 +634,7 @@
 struct resource *find_io_region(unsigned long base, int num,
 		   unsigned long align, char *name, struct pcmcia_socket *s)
 {
-	struct resource *res = make_resource(0, num, IORESOURCE_IO, name);
+	struct resource *res = make_resource(0, num, IORESOURCE_IO, s->dev.class_id);
 	struct pcmcia_align_data data;
 	unsigned long min = base;
 	int ret;
@@ -641,8 +653,8 @@
 					     min, 0, pcmcia_align, &data);
 	} else
 #endif
-		ret = allocate_resource(&ioport_resource, res, num, min, ~0UL, 0,
-					pcmcia_align, &data);
+		ret = allocate_resource(&ioport_resource, res, num, min, ~0UL,
+					1, pcmcia_align, &data);
 	up(&rsrc_sem);
 
 	if (ret != 0) {
@@ -652,10 +664,10 @@
 	return res;
 }
 
-int find_mem_region(u_long *base, u_long num, u_long align,
-		    int low, char *name, struct pcmcia_socket *s)
+struct resource *find_mem_region(u_long base, u_long num, u_long align,
+				 int low, char *name, struct pcmcia_socket *s)
 {
-	struct resource *res = make_resource(0, num, IORESOURCE_MEM, name);
+	struct resource *res = make_resource(0, num, IORESOURCE_MEM, s->dev.class_id);
 	struct pcmcia_align_data data;
 	unsigned long min, max;
 	int ret, i;
@@ -663,16 +675,16 @@
 	low = low || !(s->features & SS_CAP_PAGE_REGS);
 
 	data.mask = align - 1;
-	data.offset = *base & data.mask;
+	data.offset = base & data.mask;
 	data.map = &mem_db;
 
 	for (i = 0; i < 2; i++) {
 		if (low) {
 			max = 0x100000UL;
-			min = *base < max ? *base : 0;
+			min = base < max ? base : 0;
 		} else {
 			max = ~0UL;
-			min = 0x100000UL + *base;
+			min = 0x100000UL + base;
 		}
 
 		down(&rsrc_sem);
@@ -684,7 +696,7 @@
 		} else
 #endif
 			ret = allocate_resource(&iomem_resource, res, num, min,
-						max, 0, pcmcia_align, &data);
+						max, 1, pcmcia_align, &data);
 		up(&rsrc_sem);
 		if (ret == 0 || low)
 			break;
@@ -693,10 +705,9 @@
 
 	if (ret != 0) {
 		kfree(res);
-	} else {
-		*base = res->start;
+		res = NULL;
 	}
-	return ret;
+	return res;
 }
 
 /*======================================================================
--- diff/drivers/pcmcia/tcic.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pcmcia/tcic.c	2004-07-01 21:32:40.000000000 +0100
@@ -868,10 +868,10 @@
 static int tcic_init(struct pcmcia_socket *s)
 {
 	int i;
+	struct resource res = { .start = 0, .end = 0x1000 };
 	pccard_io_map io = { 0, 0, 0, 0, 1 };
-	pccard_mem_map mem = { 0, 0, 0, 0, 0, 0 };
+	pccard_mem_map mem = { .res = &res, .sys_stop = 0x1000, };
 
-	mem.sys_stop = 0x1000;
 	for (i = 0; i < 2; i++) {
 		io.map = i;
 		tcic_set_io_map(s, &io);
--- diff/drivers/pcmcia/yenta_socket.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pcmcia/yenta_socket.c	2004-07-01 21:32:40.000000000 +0100
@@ -445,10 +445,10 @@
 static void yenta_clear_maps(struct yenta_socket *socket)
 {
 	int i;
+	struct resource res = { .start = 0, .end = 0x0fff };
 	pccard_io_map io = { 0, 0, 0, 0, 1 };
-	pccard_mem_map mem = { 0, 0, 0, 0, 0, 0 };
+	pccard_mem_map mem = { .res = &res, .sys_stop = 0x0fff, };
 
-	mem.sys_stop = 0x0fff;
 	yenta_set_socket(&socket->socket, &dead_socket);
 	for (i = 0; i < 2; i++) {
 		io.map = i;
@@ -668,6 +668,7 @@
 #include "ti113x.h"
 #include "ricoh.h"
 #include "topic.h"
+#include "o2micro.h"
 
 enum {
 	CARDBUS_TYPE_DEFAULT = -1,
@@ -676,7 +677,8 @@
 	CARDBUS_TYPE_TI12XX,
 	CARDBUS_TYPE_TI1250,
 	CARDBUS_TYPE_RICOH,
-	CARDBUS_TYPE_TOPIC97
+	CARDBUS_TYPE_TOPIC97,
+	CARDBUS_TYPE_O2MICRO,
 };
 
 /*
@@ -716,6 +718,10 @@
 	[CARDBUS_TYPE_TOPIC97]	= {
 		.override	= topic97_override,
 	},
+	[CARDBUS_TYPE_O2MICRO]	= {
+		.override	= o2micro_override,
+		.restore_state	= o2micro_restore_state,
+	},
 };
 
 
@@ -1100,6 +1106,8 @@
 	CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC97, TOPIC97),
 	CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC100, TOPIC97),
 
+	CB_ID(PCI_VENDOR_ID_O2, PCI_ANY_ID, O2MICRO),
+
 	/* match any cardbus bridge */
 	CB_ID(PCI_ANY_ID, PCI_ANY_ID, DEFAULT),
 	{ /* all zeroes */ }
--- diff/drivers/pnp/driver.c	2004-05-19 22:12:04.000000000 +0100
+++ source/drivers/pnp/driver.c	2004-07-01 21:32:40.000000000 +0100
@@ -50,6 +50,11 @@
 	return 0;
 }
 
+static struct pnp_device_id generic_id = {
+	.id		= "ANYDEVS",
+	.driver_data	= 0,
+};
+
 static const struct pnp_device_id * match_device(struct pnp_driver *drv, struct pnp_dev *dev)
 {
 	const struct pnp_device_id *drv_id = drv->id_table;
@@ -61,6 +66,8 @@
 			return drv_id;
 		drv_id++;
 	}
+	if ((drv->match && !drv->match(dev)))
+		return &generic_id;
 	return NULL;
 }
 
--- diff/drivers/pnp/isapnp/core.c	2004-05-19 22:12:04.000000000 +0100
+++ source/drivers/pnp/isapnp/core.c	2004-07-01 21:32:40.000000000 +0100
@@ -68,13 +68,8 @@
 MODULE_PARM_DESC(isapnp_verbose, "ISA Plug & Play verbose mode");
 MODULE_LICENSE("GPL");
 
-#ifdef CONFIG_X86_PC9800
-#define _PIDXR		0x259
-#define _PNPWRP		0xa59
-#else
 #define _PIDXR		0x279
 #define _PNPWRP		0xa79
-#endif
 
 /* short tags */
 #define _STAG_PNPVERNO		0x01
--- diff/drivers/pnp/pnpbios/core.c	2004-06-30 14:25:50.000000000 +0100
+++ source/drivers/pnp/pnpbios/core.c	2004-07-01 21:32:40.000000000 +0100
@@ -59,6 +59,7 @@
 #include <linux/kmod.h>
 #include <linux/completion.h>
 #include <linux/spinlock.h>
+#include <linux/dmi.h>
 
 #include <asm/page.h>
 #include <asm/desc.h>
@@ -498,10 +499,39 @@
 	return 0;
 }
 
+static int __init exploding_pnp_bios(struct dmi_system_id *d)
+{
+	printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident);
+	return 0;
+}
+
+static struct dmi_system_id pnpbios_dmi_table[] = {
+	{	/* PnPBIOS GPF on boot */
+		.callback = exploding_pnp_bios,
+		.ident = "Higraded P14H",
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+			DMI_MATCH(DMI_BIOS_VERSION, "07.00T"),
+			DMI_MATCH(DMI_SYS_VENDOR, "Higraded"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "P14H"),
+		},
+	},
+	{	/* PnPBIOS GPF on boot */
+		.callback = exploding_pnp_bios,
+		.ident = "ASUS P4P800",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
+			DMI_MATCH(DMI_BOARD_NAME, "P4P800"),
+		},
+	},
+	{ }
+};
+
 int __init pnpbios_init(void)
 {
 	int ret;
-	if(pnpbios_disabled || (dmi_broken & BROKEN_PNP_BIOS)) {
+
+	if (pnpbios_disabled || dmi_check_system(pnpbios_dmi_table)) {
 		printk(KERN_INFO "PnPBIOS: Disabled\n");
 		return -ENODEV;
 	}
--- diff/drivers/sbus/char/openprom.c	2004-05-19 22:12:07.000000000 +0100
+++ source/drivers/sbus/char/openprom.c	2004-07-01 21:32:40.000000000 +0100
@@ -149,7 +149,6 @@
 	char buffer[OPROMMAXPARAM+1], *buf;
 	struct openpromio *opp;
 	int bufsize, len, error = 0;
-	extern char saved_command_line[];
 	static int cnt;
 
 	if (cmd == OPROMSETOPT)
--- diff/drivers/scsi/3w-xxxx.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/3w-xxxx.c	2004-07-01 21:32:41.000000000 +0100
@@ -220,7 +220,7 @@
 #define __3W_C			/* let 3w-xxxx.h know it is use */
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "3w-xxxx.h"
 
--- diff/drivers/scsi/53c700.c	2004-05-19 22:12:07.000000000 +0100
+++ source/drivers/scsi/53c700.c	2004-07-01 21:32:41.000000000 +0100
@@ -125,18 +125,21 @@
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
+#include <linux/blkdev.h>
+#include <linux/module.h>
+#include <linux/interrupt.h>
 #include <asm/dma.h>
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/byteorder.h>
-#include <linux/blkdev.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-
-#include "scsi.h"
-#include "hosts.h"
 
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>
 #include <scsi/scsi_transport.h>
 #include <scsi/scsi_transport_spi.h>
 
@@ -164,15 +167,15 @@
 #include "53c700_d.h"
 
 
-STATIC int NCR_700_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-STATIC int NCR_700_abort(Scsi_Cmnd * SCpnt);
-STATIC int NCR_700_bus_reset(Scsi_Cmnd * SCpnt);
-STATIC int NCR_700_dev_reset(Scsi_Cmnd * SCpnt);
-STATIC int NCR_700_host_reset(Scsi_Cmnd * SCpnt);
+STATIC int NCR_700_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt);
+STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt);
+STATIC int NCR_700_dev_reset(struct scsi_cmnd * SCpnt);
+STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt);
 STATIC void NCR_700_chip_setup(struct Scsi_Host *host);
 STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
-STATIC int NCR_700_slave_configure(Scsi_Device *SDpnt);
-STATIC void NCR_700_slave_destroy(Scsi_Device *SDpnt);
+STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt);
+STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt);
 
 STATIC struct device_attribute *NCR_700_dev_attrs[];
 
@@ -279,7 +282,7 @@
 }
 
 static inline __u8
-NCR_700_get_SXFER(Scsi_Device *SDp)
+NCR_700_get_SXFER(struct scsi_device *SDp)
 {
 	struct NCR_700_Host_Parameters *hostdata = 
 		(struct NCR_700_Host_Parameters *)SDp->host->hostdata[0];
@@ -289,7 +292,7 @@
 }
 
 struct Scsi_Host *
-NCR_700_detect(Scsi_Host_Template *tpnt,
+NCR_700_detect(struct scsi_host_template *tpnt,
 	       struct NCR_700_Host_Parameters *hostdata)
 {
 	dma_addr_t pScript, pSlots;
@@ -329,7 +332,7 @@
 	tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST;
 	tpnt->sg_tablesize = NCR_700_SG_SEGMENTS;
 	tpnt->cmd_per_lun = NCR_700_CMD_PER_LUN;
-	tpnt->use_clustering = DISABLE_CLUSTERING;
+	tpnt->use_clustering = ENABLE_CLUSTERING;
 	tpnt->slave_configure = NCR_700_slave_configure;
 	tpnt->slave_destroy = NCR_700_slave_destroy;
 	
@@ -561,7 +564,7 @@
    the ITL and (if tagged) the ITLQ lists in _queuecommand */
 STATIC void
 save_for_reselection(struct NCR_700_Host_Parameters *hostdata,
-		     Scsi_Cmnd *SCp, __u32 dsp)
+		     struct scsi_cmnd *SCp, __u32 dsp)
 {
 	/* Its just possible that this gets executed twice */
 	if(SCp != NULL) {
@@ -575,27 +578,25 @@
 }
 
 STATIC inline void
-NCR_700_unmap(struct NCR_700_Host_Parameters *hostdata, Scsi_Cmnd *SCp,
+NCR_700_unmap(struct NCR_700_Host_Parameters *hostdata, struct scsi_cmnd *SCp,
 	      struct NCR_700_command_slot *slot)
 {
-	if(SCp->sc_data_direction != SCSI_DATA_NONE &&
-	   SCp->sc_data_direction != SCSI_DATA_UNKNOWN) {
-		enum dma_data_direction direction = SCp->sc_data_direction;
+	if(SCp->sc_data_direction != DMA_NONE &&
+	   SCp->sc_data_direction != DMA_BIDIRECTIONAL) {
 		if(SCp->use_sg) {
 			dma_unmap_sg(hostdata->dev, SCp->buffer,
-				     SCp->use_sg, direction);
+				     SCp->use_sg, SCp->sc_data_direction);
 		} else {
-			dma_unmap_single(hostdata->dev,
-					 slot->dma_handle,
+			dma_unmap_single(hostdata->dev, slot->dma_handle,
 					 SCp->request_bufflen,
-					 direction);
+					 SCp->sc_data_direction);
 		}
 	}
 }
 
 STATIC inline void
 NCR_700_scsi_done(struct NCR_700_Host_Parameters *hostdata,
-	       Scsi_Cmnd *SCp, int result)
+	       struct scsi_cmnd *SCp, int result)
 {
 	hostdata->state = NCR_700_HOST_FREE;
 	hostdata->cmd = NULL;
@@ -611,7 +612,7 @@
 #ifdef NCR_700_DEBUG
 			printk(" ORIGINAL CMD %p RETURNED %d, new return is %d sense is\n",
 			       SCp, SCp->cmnd[7], result);
-			print_sense("53c700", SCp);
+			scsi_print_sense("53c700", SCp);
 
 #endif
 			/* restore the old result if the request sense was
@@ -780,7 +781,7 @@
 STATIC __u32
 process_extended_message(struct Scsi_Host *host, 
 			 struct NCR_700_Host_Parameters *hostdata,
-			 Scsi_Cmnd *SCp, __u32 dsp, __u32 dsps)
+			 struct scsi_cmnd *SCp, __u32 dsp, __u32 dsps)
 {
 	__u32 resume_offset = dsp, temp = dsp + 8;
 	__u8 pun = 0xff, lun = 0xff;
@@ -849,7 +850,7 @@
 		printk(KERN_INFO "scsi%d (%d:%d): Unexpected message %s: ",
 		       host->host_no, pun, lun,
 		       NCR_700_phase[(dsps & 0xf00) >> 8]);
-		print_msg(hostdata->msgin);
+		scsi_print_msg(hostdata->msgin);
 		printk("\n");
 		/* just reject it */
 		hostdata->msgout[0] = A_REJECT_MSG;
@@ -865,7 +866,7 @@
 
 STATIC __u32
 process_message(struct Scsi_Host *host,	struct NCR_700_Host_Parameters *hostdata,
-		Scsi_Cmnd *SCp, __u32 dsp, __u32 dsps)
+		struct scsi_cmnd *SCp, __u32 dsp, __u32 dsps)
 {
 	/* work out where to return to */
 	__u32 temp = dsp + 8, resume_offset = dsp;
@@ -879,7 +880,7 @@
 #ifdef NCR_700_DEBUG
 	printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun,
 	       NCR_700_phase[(dsps & 0xf00) >> 8]);
-	print_msg(hostdata->msgin);
+	scsi_print_msg(hostdata->msgin);
 	printk("\n");
 #endif
 
@@ -927,7 +928,7 @@
 		       host->host_no, pun, lun,
 		       NCR_700_phase[(dsps & 0xf00) >> 8]);
 
-		print_msg(hostdata->msgin);
+		scsi_print_msg(hostdata->msgin);
 		printk("\n");
 		/* just reject it */
 		hostdata->msgout[0] = A_REJECT_MSG;
@@ -946,7 +947,7 @@
 }
 
 STATIC __u32
-process_script_interrupt(__u32 dsps, __u32 dsp, Scsi_Cmnd *SCp,
+process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp,
 			 struct Scsi_Host *host,
 			 struct NCR_700_Host_Parameters *hostdata)
 {
@@ -975,7 +976,7 @@
 				NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]);
 			} else {
 #ifdef NCR_DEBUG
-				print_command(SCp->cmnd);
+				scsi_print_command(SCp);
 				printk("  cmd %p has status %d, requesting sense\n",
 				       SCp, hostdata->status[0]);
 #endif
@@ -1004,7 +1005,7 @@
 				SCp->cmnd[6] = NCR_700_INTERNAL_SENSE_MAGIC;
 				SCp->cmnd[7] = hostdata->status[0];
 				SCp->use_sg = 0;
-				SCp->sc_data_direction = SCSI_DATA_READ;
+				SCp->sc_data_direction = DMA_FROM_DEVICE;
 				dma_sync_single_for_device(hostdata->dev, slot->pCmd,
 							   SCp->cmd_len, DMA_TO_DEVICE);
 				SCp->request_bufflen = sizeof(SCp->sense_buffer);
@@ -1053,7 +1054,7 @@
 		       NCR_700_phase[i],
 		       sbcl_to_string(NCR_700_readb(host, SBCL_REG)));
 		printk(KERN_ERR "         len = %d, cmd =", SCp->cmd_len);
-		print_command(SCp->cmnd);
+		scsi_print_command(SCp);
 
 		NCR_700_internal_bus_reset(host);
 	} else if((dsps & 0xfffff000) == A_FATAL) {
@@ -1080,7 +1081,7 @@
 		__u8 lun;
 		struct NCR_700_command_slot *slot;
 		__u8 reselection_id = hostdata->reselection_id;
-		Scsi_Device *SDp;
+		struct scsi_device *SDp;
 
 		lun = hostdata->msgin[0] & 0x1f;
 
@@ -1095,7 +1096,7 @@
 			BUG();
 		}
 		if(hostdata->msgin[1] == A_SIMPLE_TAG_MSG) {
-			Scsi_Cmnd *SCp = scsi_find_tag(SDp, hostdata->msgin[2]);
+			struct scsi_cmnd *SCp = scsi_find_tag(SDp, hostdata->msgin[2]);
 			if(unlikely(SCp == NULL)) {
 				printk(KERN_ERR "scsi%d: (%d:%d) no saved request for tag %d\n", 
 				       host->host_no, reselection_id, lun, hostdata->msgin[2]);
@@ -1107,7 +1108,7 @@
 			       host->host_no, SDp->id, SDp->lun,
 			       hostdata->msgin[2], slot, slot->tag));
 		} else {
-			Scsi_Cmnd *SCp = scsi_find_tag(SDp, SCSI_NO_TAG);
+			struct scsi_cmnd *SCp = scsi_find_tag(SDp, SCSI_NO_TAG);
 			if(unlikely(SCp == NULL)) {
 				printk(KERN_ERR "scsi%d: (%d:%d) no saved request for untagged cmd\n", 
 				       host->host_no, reselection_id, lun);
@@ -1234,7 +1235,7 @@
 		       host->host_no, pun, lun, NCR_700_condition[i],
 		       NCR_700_phase[j], dsp - hostdata->pScript);
 		if(SCp != NULL) {
-			print_command(SCp->cmnd);
+			scsi_print_command(SCp);
 
 			if(SCp->use_sg) {
 				for(i = 0; i < SCp->use_sg + 1; i++) {
@@ -1270,7 +1271,7 @@
 	__u32 resume_offset = 0;
 	struct NCR_700_Host_Parameters *hostdata =
 		(struct NCR_700_Host_Parameters *)host->hostdata[0];
-	Scsi_Cmnd *SCp = hostdata->cmd;
+	struct scsi_cmnd *SCp = hostdata->cmd;
 	__u8 sbcl;
 
 	for(count = 0; count < 5; count++) {
@@ -1373,7 +1374,7 @@
 /* The queue lock with interrupts disabled must be held on entry to
  * this function */
 STATIC int
-NCR_700_start_command(Scsi_Cmnd *SCp)
+NCR_700_start_command(struct scsi_cmnd *SCp)
 {
 	struct NCR_700_command_slot *slot =
 		(struct NCR_700_command_slot *)SCp->host_scribble;
@@ -1481,7 +1482,7 @@
 		__u32 dsps;
 		__u8 sstat0 = 0, dstat = 0;
 		__u32 dsp;
-		Scsi_Cmnd *SCp = hostdata->cmd;
+		struct scsi_cmnd *SCp = hostdata->cmd;
 		enum NCR_700_Host_State state;
 
 		handled = 1;
@@ -1514,7 +1515,7 @@
 		}
 
 		if(sstat0 & SCSI_RESET_DETECTED) {
-			Scsi_Device *SDp;
+			struct scsi_device *SDp;
 			int i;
 
 			hostdata->state = NCR_700_HOST_BUSY;
@@ -1530,7 +1531,7 @@
 			
 			/* clear all the slots and their pending commands */
 			for(i = 0; i < NCR_700_COMMAND_SLOTS_PER_HOST; i++) {
-				Scsi_Cmnd *SCp;
+				struct scsi_cmnd *SCp;
 				struct NCR_700_command_slot *slot =
 					&hostdata->slots[i];
 
@@ -1590,7 +1591,7 @@
 				printk("scsi%d: (%d:%d) Expected phase mismatch in slot->SG[%d], transferred 0x%x\n",
 				       host->host_no, pun, lun,
 				       SGcount, data_transfer);
-				print_command(SCp->cmnd);
+				scsi_print_command(SCp);
 				if(residual) {
 					printk("scsi%d: (%d:%d) Expected phase mismatch in slot->SG[%d], transferred 0x%x, residual %d\n",
 				       host->host_no, pun, lun,
@@ -1731,7 +1732,7 @@
 }
 
 STATIC int
-NCR_700_queuecommand(Scsi_Cmnd *SCp, void (*done)(Scsi_Cmnd *))
+NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *))
 {
 	struct NCR_700_Host_Parameters *hostdata = 
 		(struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0];
@@ -1781,7 +1782,7 @@
 
 #ifdef NCR_700_DEBUG
 	printk("53c700: scsi%d, command ", SCp->device->host->host_no);
-	print_command(SCp->cmnd);
+	scsi_print_command(SCp);
 #endif
 	if(SCp->device->tagged_supported && !SCp->device->simple_tags
 	   && (hostdata->tag_negotiated &(1<<SCp->device->id)) == 0
@@ -1827,13 +1828,13 @@
 	/* sanity check: some of the commands generated by the mid-layer
 	 * have an eccentric idea of their sc_data_direction */
 	if(!SCp->use_sg && !SCp->request_bufflen 
-	   && SCp->sc_data_direction != SCSI_DATA_NONE) {
+	   && SCp->sc_data_direction != DMA_NONE) {
 #ifdef NCR_700_DEBUG
 		printk("53c700: Command");
-		print_command(SCp->cmnd);
+		scsi_print_command(SCp);
 		printk("Has wrong data direction %d\n", SCp->sc_data_direction);
 #endif
-		SCp->sc_data_direction = SCSI_DATA_NONE;
+		SCp->sc_data_direction = DMA_NONE;
 	}
 
 	switch (SCp->cmnd[0]) {
@@ -1844,20 +1845,20 @@
 	default:
 		/* OK, get it from the command */
 		switch(SCp->sc_data_direction) {
-		case SCSI_DATA_UNKNOWN:
+		case DMA_BIDIRECTIONAL:
 		default:
 			printk(KERN_ERR "53c700: Unknown command for data direction ");
-			print_command(SCp->cmnd);
+			scsi_print_command(SCp);
 			
 			move_ins = 0;
 			break;
-		case SCSI_DATA_NONE:
+		case DMA_NONE:
 			move_ins = 0;
 			break;
-		case SCSI_DATA_READ:
+		case DMA_FROM_DEVICE:
 			move_ins = SCRIPT_MOVE_DATA_IN;
 			break;
-		case SCSI_DATA_WRITE:
+		case DMA_TO_DEVICE:
 			move_ins = SCRIPT_MOVE_DATA_OUT;
 			break;
 		}
@@ -1914,13 +1915,13 @@
 }
 
 STATIC int
-NCR_700_abort(Scsi_Cmnd * SCp)
+NCR_700_abort(struct scsi_cmnd * SCp)
 {
 	struct NCR_700_command_slot *slot;
 
 	printk(KERN_INFO "scsi%d (%d:%d) New error handler wants to abort command\n\t",
 	       SCp->device->host->host_no, SCp->device->id, SCp->device->lun);
-	print_command(SCp->cmnd);
+	scsi_print_command(SCp);
 
 	slot = (struct NCR_700_command_slot *)SCp->host_scribble;
 
@@ -1946,7 +1947,7 @@
 }
 
 STATIC int
-NCR_700_bus_reset(Scsi_Cmnd * SCp)
+NCR_700_bus_reset(struct scsi_cmnd * SCp)
 {
 	DECLARE_COMPLETION(complete);
 	struct NCR_700_Host_Parameters *hostdata = 
@@ -1954,7 +1955,7 @@
 
 	printk(KERN_INFO "scsi%d (%d:%d) New error handler wants BUS reset, cmd %p\n\t",
 	       SCp->device->host->host_no, SCp->device->id, SCp->device->lun, SCp);
-	print_command(SCp->cmnd);
+	scsi_print_command(SCp);
 	/* In theory, eh_complete should always be null because the
 	 * eh is single threaded, but just in case we're handling a
 	 * reset via sg or something */
@@ -1976,21 +1977,21 @@
 }
 
 STATIC int
-NCR_700_dev_reset(Scsi_Cmnd * SCp)
+NCR_700_dev_reset(struct scsi_cmnd * SCp)
 {
 	printk(KERN_INFO "scsi%d (%d:%d) New error handler wants device reset\n\t",
 	       SCp->device->host->host_no, SCp->device->id, SCp->device->lun);
-	print_command(SCp->cmnd);
+	scsi_print_command(SCp);
 	
 	return FAILED;
 }
 
 STATIC int
-NCR_700_host_reset(Scsi_Cmnd * SCp)
+NCR_700_host_reset(struct scsi_cmnd * SCp)
 {
 	printk(KERN_INFO "scsi%d (%d:%d) New error handler wants HOST reset\n\t",
 	       SCp->device->host->host_no, SCp->device->id, SCp->device->lun);
-	print_command(SCp->cmnd);
+	scsi_print_command(SCp);
 
 	NCR_700_internal_bus_reset(SCp->device->host);
 	NCR_700_chip_reset(SCp->device->host);
@@ -2043,7 +2044,7 @@
 
 
 STATIC int
-NCR_700_slave_configure(Scsi_Device *SDp)
+NCR_700_slave_configure(struct scsi_device *SDp)
 {
 	struct NCR_700_Host_Parameters *hostdata = 
 		(struct NCR_700_Host_Parameters *)SDp->host->hostdata[0];
@@ -2066,7 +2067,7 @@
 }
 
 STATIC void
-NCR_700_slave_destroy(Scsi_Device *SDp)
+NCR_700_slave_destroy(struct scsi_device *SDp)
 {
 	/* to do here: deallocate memory */
 }
--- diff/drivers/scsi/53c700.h	2004-05-19 22:12:07.000000000 +0100
+++ source/drivers/scsi/53c700.h	2004-07-01 21:32:41.000000000 +0100
@@ -9,9 +9,11 @@
 #define _53C700_H
 
 #include <linux/interrupt.h>
-
 #include <asm/io.h>
 
+#include <scsi/scsi_device.h>
+
+
 #if defined(CONFIG_53C700_MEM_MAPPED) && defined(CONFIG_53C700_IO_MAPPED)
 #define CONFIG_53C700_BOTH_MAPPED
 #endif
@@ -57,7 +59,8 @@
 struct NCR_700_Host_Parameters;
 
 /* These are the externally used routines */
-struct Scsi_Host *NCR_700_detect(Scsi_Host_Template *, struct NCR_700_Host_Parameters *);
+struct Scsi_Host *NCR_700_detect(struct scsi_host_template *,
+		struct NCR_700_Host_Parameters *);
 int NCR_700_release(struct Scsi_Host *host);
 irqreturn_t NCR_700_intr(int, void *, struct pt_regs *);
 
@@ -102,7 +105,7 @@
 #define NCR_700_DEV_PRINT_SYNC_NEGOTIATION (1<<19)
 
 static inline void
-NCR_700_set_depth(Scsi_Device *SDp, __u8 depth)
+NCR_700_set_depth(struct scsi_device *SDp, __u8 depth)
 {
 	long l = (long)SDp->hostdata;
 
@@ -111,27 +114,27 @@
 	SDp->hostdata = (void *)l;
 }
 static inline __u8
-NCR_700_get_depth(Scsi_Device *SDp)
+NCR_700_get_depth(struct scsi_device *SDp)
 {
 	return ((((unsigned long)SDp->hostdata) & 0xff00)>>8);
 }
 static inline int
-NCR_700_is_flag_set(Scsi_Device *SDp, __u32 flag)
+NCR_700_is_flag_set(struct scsi_device *SDp, __u32 flag)
 {
 	return (((unsigned long)SDp->hostdata) & flag) == flag;
 }
 static inline int
-NCR_700_is_flag_clear(Scsi_Device *SDp, __u32 flag)
+NCR_700_is_flag_clear(struct scsi_device *SDp, __u32 flag)
 {
 	return (((unsigned long)SDp->hostdata) & flag) == 0;
 }
 static inline void
-NCR_700_set_flag(Scsi_Device *SDp, __u32 flag)
+NCR_700_set_flag(struct scsi_device *SDp, __u32 flag)
 {
 	SDp->hostdata = (void *)((long)SDp->hostdata | (flag & 0xffff0000));
 }
 static inline void
-NCR_700_clear_flag(Scsi_Device *SDp, __u32 flag)
+NCR_700_clear_flag(struct scsi_device *SDp, __u32 flag)
 {
 	SDp->hostdata = (void *)((long)SDp->hostdata & ~(flag & 0xffff0000));
 }
@@ -147,7 +150,7 @@
 	__u8	state;
 	int	tag;
 	__u32	resume_offset;
-	Scsi_Cmnd	*cmnd;
+	struct scsi_cmnd *cmnd;
 	/* The pci_mapped address of the actual command in cmnd */
 	dma_addr_t	pCmd;
 	__u32		temp;
@@ -185,7 +188,7 @@
 	__u32	pScript;		/* physical mem addr of script */
 
 	enum NCR_700_Host_State state; /* protected by state lock */
-	Scsi_Cmnd *cmd;
+	struct scsi_cmnd *cmd;
 	/* Note: pScript contains the single consistent block of
 	 * memory.  All the msgin, msgout and status are allocated in
 	 * this memory too (at separate cache lines).  TOTAL_MEM_SIZE
--- diff/drivers/scsi/53c7xx.c	2004-05-19 22:12:07.000000000 +0100
+++ source/drivers/scsi/53c7xx.c	2004-07-01 21:32:41.000000000 +0100
@@ -280,7 +280,7 @@
 #endif
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "53c7xx.h"
 #include <linux/stat.h>
 #include <linux/stddef.h>
--- diff/drivers/scsi/BusLogic.c	2004-05-19 22:12:07.000000000 +0100
+++ source/drivers/scsi/BusLogic.c	2004-07-01 21:32:41.000000000 +0100
@@ -48,7 +48,7 @@
 #include <asm/system.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "BusLogic.h"
 #include "FlashPoint.c"
 
--- diff/drivers/scsi/Kconfig	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/Kconfig	2004-07-01 21:32:41.000000000 +0100
@@ -227,7 +227,7 @@
 	depends on DECSTATION && SCSI
 
 config BLK_DEV_3W_XXXX_RAID
-	tristate "3ware Hardware ATA-RAID support"
+	tristate "3ware 5/6/7/8xxx ATA-RAID support"
 	depends on PCI && SCSI
 	help
 	  3ware is the only hardware ATA-Raid product in Linux to date.
@@ -239,6 +239,17 @@
 	  Please read the comments at the top of
 	  <file:drivers/scsi/3w-xxxx.c>.
 
+config SCSI_3W_9XXX
+	tristate "3ware 9xxx SATA-RAID support"
+	depends on PCI && SCSI
+	help
+	  This driver supports the 9000 series 3ware SATA-RAID cards.
+
+	  <http://www.amcc.com>
+
+	  Please read the comments at the top of
+	  <file:drivers/scsi/3w-9xxx.c>.
+
 config SCSI_7000FASST
 	tristate "7000FASST SCSI support"
 	depends on ISA && SCSI
@@ -363,7 +374,7 @@
 
 config SCSI_ADVANSYS
 	tristate "AdvanSys SCSI support"
-	depends on (ISA || EISA || PCI) && SCSI
+	depends on (ISA || EISA || PCI) && SCSI && BROKEN
 	help
 	  This is a driver for all SCSI host adapters manufactured by
 	  AdvanSys. It is documented in the kernel source in
@@ -422,6 +433,14 @@
 
 	  If unsure, say N.
 
+config SCSI_SATA_NV
+	tristate "NVIDIA SATA support"
+	depends on SCSI_SATA && PCI && EXPERIMENTAL
+	help
+	  This option enables support for NVIDIA Serial ATA.
+
+	  If unsure, say N.
+
 config SCSI_SATA_PROMISE
 	tristate "Promise SATA TX2/TX4 support"
 	depends on SCSI_SATA && PCI
@@ -478,9 +497,7 @@
 	  Adapters. Consult the SCSI-HOWTO, available from
 	  <http://www.tldp.org/docs.html#howto>, and the files
 	  <file:Documentation/scsi/BusLogic.txt> and
-	  <file:Documentation/scsi/FlashPoint.txt> for more information. If this
-	  driver does not work correctly without modification, please contact
-	  the author, Leonard N. Zubkoff, by email to lnz@dandelion.com.
+	  <file:Documentation/scsi/FlashPoint.txt> for more information.
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called BusLogic.
@@ -984,7 +1001,7 @@
 
 config SCSI_IPR
 	tristate "IBM Power Linux RAID adapter support"
-	depends on PCI && SCSI
+	depends on PCI && SCSI && PPC
 	select FW_LOADER
 	---help---
 	  This driver supports the IBM Power Linux family RAID adapters.
@@ -1716,18 +1733,6 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called esp.
 
-config SCSI_PC980155
-	tristate "NEC PC-9801-55 SCSI support"
-	depends on X86_PC9800 && SCSI
-	help
-	  If you have the NEC PC-9801-55 SCSI interface card or compatibles
-	  for NEC PC-9801/PC-9821, say Y.
-
-config WD33C93_PIO
-	bool
-	depends on SCSI_PC980155
-	default y
-
 #      bool 'Cyberstorm Mk III SCSI support (EXPERIMENTAL)' CONFIG_CYBERSTORMIII_SCSI
 
 config ZFCP
--- diff/drivers/scsi/Makefile	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/Makefile	2004-07-01 21:32:41.000000000 +0100
@@ -34,7 +34,6 @@
 obj-$(CONFIG_A3000_SCSI)	+= a3000.o	wd33c93.o
 obj-$(CONFIG_A2091_SCSI)	+= a2091.o	wd33c93.o
 obj-$(CONFIG_GVP11_SCSI)	+= gvp11.o	wd33c93.o
-obj-$(CONFIG_SCSI_PC980155)	+= pc980155.o	wd33c93.o
 obj-$(CONFIG_MVME147_SCSI)	+= mvme147.o	wd33c93.o
 obj-$(CONFIG_SGIWD93_SCSI)	+= sgiwd93.o	wd33c93.o
 obj-$(CONFIG_CYBERSTORM_SCSI)	+= NCR53C9x.o	cyberstorm.o
@@ -109,6 +108,7 @@
 obj-$(CONFIG_SCSI_PLUTO)	+= pluto.o
 obj-$(CONFIG_SCSI_DECNCR)	+= NCR53C9x.o	dec_esp.o
 obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o
+obj-$(CONFIG_SCSI_3W_9XXX)	+= 3w-9xxx.o
 obj-$(CONFIG_SCSI_PPA)		+= ppa.o
 obj-$(CONFIG_SCSI_IMM)		+= imm.o
 obj-$(CONFIG_JAZZ_ESP)		+= NCR53C9x.o	jazz_esp.o
@@ -127,6 +127,7 @@
 obj-$(CONFIG_SCSI_SATA_VITESSE)	+= libata.o sata_vsc.o
 obj-$(CONFIG_SCSI_SATA_SIS)	+= libata.o sata_sis.o
 obj-$(CONFIG_SCSI_SATA_SX4)	+= libata.o sata_sx4.o
+obj-$(CONFIG_SCSI_SATA_NV)	+= libata.o sata_nv.o
 
 obj-$(CONFIG_ARM)		+= arm/
 
@@ -142,20 +143,14 @@
 				   scsi_devinfo.o
 scsi_mod-$(CONFIG_SYSCTL)	+= scsi_sysctl.o
 scsi_mod-$(CONFIG_SCSI_PROC_FS)	+= scsi_proc.o
-scsi_mod-$(CONFIG_X86_PC9800)	+= scsi_pc98.o
 
 sd_mod-objs	:= sd.o
 sr_mod-objs	:= sr.o sr_ioctl.o sr_vendor.o
 initio-objs	:= ini9100u.o i91uscsi.o
 a100u2w-objs	:= inia100.o i60uscsi.o
 ncr53c8xx-flags-$(CONFIG_SCSI_ZALON) \
-		:= -DCONFIG_NCR53C8XX_PREFETCH \
-			-DCONFIG_SCSI_NCR53C8XX_NO_WORD_TRANSFERS \
-			-DCONFIG_SCSI_NCR53C8XX_NO_NVRAM \
-			-DSCSI_NCR_BIG_ENDIAN -DSIMULATED_INTFLY
-ncr53c8xx-flags-$(CONFIG_SCSI_NCR_Q720) \
-		:= -DCONFIG_SCSI_NCR53C8XX_NO_NVRAM \
-			-DSIMULATED_INTFLY
+		:= -DCONFIG_NCR53C8XX_PREFETCH -DSCSI_NCR_BIG_ENDIAN \
+			-DCONFIG_SCSI_NCR53C8XX_NO_WORD_TRANSFERS
 CFLAGS_ncr53c8xx.o	:= $(ncr53c8xx-flags-y) $(ncr53c8xx-flags-m)
 zalon7xx-objs	:= zalon.o ncr53c8xx.o
 NCR_Q720_mod-objs	:= NCR_Q720.o ncr53c8xx.o
--- diff/drivers/scsi/NCR53C9x.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/NCR53C9x.c	2004-07-01 21:32:41.000000000 +0100
@@ -36,7 +36,7 @@
 #include <linux/init.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <asm/system.h>
@@ -3646,4 +3646,15 @@
 }
 #endif
 
+EXPORT_SYMBOL(esp_abort);
+EXPORT_SYMBOL(esp_allocate);
+EXPORT_SYMBOL(esp_deallocate);
+EXPORT_SYMBOL(esp_initialize);
+EXPORT_SYMBOL(esp_intr);
+EXPORT_SYMBOL(esp_queue);
+EXPORT_SYMBOL(esp_reset);
+EXPORT_SYMBOL(esp_slave_alloc);
+EXPORT_SYMBOL(esp_slave_destroy);
+EXPORT_SYMBOL(esps_in_use);
+
 MODULE_LICENSE("GPL");
--- diff/drivers/scsi/NCR53c406a.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/NCR53c406a.c	2004-07-01 21:32:41.000000000 +0100
@@ -54,7 +54,7 @@
 #include <linux/blkdev.h>
 #include <linux/spinlock.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 /* ============================================================= */
 
--- diff/drivers/scsi/NCR_D700.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/NCR_D700.c	2004-07-01 21:32:41.000000000 +0100
@@ -98,9 +98,7 @@
 #include <linux/module.h>
 #include <linux/mca.h>
 #include <asm/io.h>
-
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "53c700.h"
 #include "NCR_D700.h"
@@ -156,7 +154,7 @@
 
 /* Host template.  The 53c700 routine NCR_700_detect will
  * fill in all of the missing routines */
-static Scsi_Host_Template NCR_D700_driver_template = {
+static struct scsi_host_template NCR_D700_driver_template = {
 	.module			= THIS_MODULE,
 	.name			= "NCR Dual 700 MCA",
 	.proc_name		= "NCR_D700",
--- diff/drivers/scsi/NCR_Q720.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/NCR_Q720.c	2004-07-01 21:32:41.000000000 +0100
@@ -16,16 +16,14 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "ncr53c8xx.h"
 
 #include "NCR_Q720.h"
 
-static ncr_chip q720_chip __initdata = {
-	.device_id =	PSEUDO_720_ID,
+static struct ncr_chip q720_chip __initdata = {
 	.revision_id =	0x0f,
-	.name =		"720",
 	.burst_max =	3,
 	.offset_max =	8,
 	.nr_divisor =	4,
@@ -50,7 +48,7 @@
 	struct Scsi_Host	*hosts[4];
 };
 
-Scsi_Host_Template NCR_Q720_tpnt = {
+struct scsi_host_template NCR_Q720_tpnt = {
 	.module			= THIS_MODULE,
 	.proc_name		= "NCR_Q720",
 };
--- diff/drivers/scsi/a2091.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/a2091.c	2004-07-01 21:32:41.000000000 +0100
@@ -16,7 +16,7 @@
 #include <linux/spinlock.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "wd33c93.h"
 #include "a2091.h"
 
--- diff/drivers/scsi/a3000.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/a3000.c	2004-07-01 21:32:41.000000000 +0100
@@ -15,7 +15,7 @@
 #include <asm/irq.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "wd33c93.h"
 #include "a3000.h"
 
--- diff/drivers/scsi/aacraid/README	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aacraid/README	2004-07-01 21:32:41.000000000 +0100
@@ -10,20 +10,22 @@
 
 Supported Cards/Chipsets
 -------------------------
+	AAR-2410SA SATA
+	Adaptec 2120S
+	Adaptec 2200S
+	Adaptec 2230S
+	Adaptec 3230S
+	Adaptec 3240S
+	Adaptec 5400S
+	ASR-2020S PCI-X
 	Dell PERC 2 Quad Channel
 	Dell PERC 2/Si
 	Dell PERC 3/Si
 	Dell PERC 3/Di
+	Dell CERC 2
 	HP NetRAID-4M
-	ADAPTEC 2120S
-	ADAPTEC 2200S
-	ADAPTEC 5400S
 	Legend S220
 	Legend S230
-	Adaptec 3230S
-	Adaptec 3240S
-	ASR-2020S PCI-X
-	AAR-2410SA SATA
 
 People
 -------------------------
@@ -46,7 +48,7 @@
 
 Mailing List
 -------------------------
-linux-aacraid-devel@dell.com (Interested parties troll here)
+linux-scsi@vger.kernel.org (Interested parties troll here)
 http://mbserver.adaptec.com/ (Currently more Community Support than Devel Support)
 Also note this is very different to Brian's original driver
 so don't expect him to support it.
--- diff/drivers/scsi/aacraid/TODO	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/aacraid/TODO	2004-07-01 21:32:41.000000000 +0100
@@ -2,3 +2,5 @@
 o	More testing
 o	Feature request: display the firmware/bios/etc revisions in the
 	/proc info
+o	Drop irq_mask, basically unused
+o	I/O size increase
--- diff/drivers/scsi/aacraid/aachba.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/aacraid/aachba.c	2004-07-01 21:32:41.000000000 +0100
@@ -53,35 +53,11 @@
 #define	INQD_PDT_DMASK	0x1F	/* Peripheral Device Type Mask */
 #define	INQD_PDT_QMASK	0xE0	/* Peripheral Device Qualifer Mask */
 
-#define	TARGET_LUN_TO_CONTAINER(target, lun)	(target)
-#define CONTAINER_TO_TARGET(cont)		((cont))
-#define CONTAINER_TO_LUN(cont)			(0)
-
 #define MAX_FIB_DATA (sizeof(struct hw_fib) - sizeof(FIB_HEADER))
 
 #define MAX_DRIVER_SG_SEGMENT_COUNT 17
 
 /*
- *	Sense keys
- */
-#define SENKEY_NO_SENSE      0x00	
-#define SENKEY_UNDEFINED     0x01	
-#define SENKEY_NOT_READY     0x02	
-#define SENKEY_MEDIUM_ERR    0x03	
-#define SENKEY_HW_ERR        0x04	
-#define SENKEY_ILLEGAL       0x05	
-#define SENKEY_ATTENTION     0x06	
-#define SENKEY_PROTECTED     0x07	
-#define SENKEY_BLANK         0x08	
-#define SENKEY_V_UNIQUE      0x09	
-#define SENKEY_CPY_ABORT     0x0A	
-#define SENKEY_ABORT         0x0B	
-#define SENKEY_EQUAL         0x0C	
-#define SENKEY_VOL_OVERFLOW  0x0D	
-#define SENKEY_MISCOMP       0x0E	
-#define SENKEY_RESERVED      0x0F	
-
-/*
  *	Sense codes
  */
  
@@ -195,7 +171,6 @@
  *              M O D U L E   G L O B A L S
  */
  
-static struct fsa_scsi_hba *fsa_dev[MAXIMUM_NUM_ADAPTERS];	/*  SCSI Device Instance Pointers */
 static struct sense_data sense_data[MAXIMUM_NUM_CONTAINERS];
 static unsigned long aac_build_sg(struct scsi_cmnd* scsicmd, struct sgmap* sgmap);
 static unsigned long aac_build_sg64(struct scsi_cmnd* scsicmd, struct sgmap64* psg);
@@ -264,7 +239,6 @@
 		}
 	}
 	fib_free(fibptr);
-	fsa_dev[instance] = fsa_dev_ptr;
 	return status;
 }
 
@@ -424,14 +398,14 @@
 	} else
 		sense_buf[2] = sense_key;	/* Sense key */
 
-	if (sense_key == SENKEY_ILLEGAL)
+	if (sense_key == ILLEGAL_REQUEST)
 		sense_buf[7] = 10;	/* Additional sense length */
 	else
 		sense_buf[7] = 6;	/* Additional sense length */
 
 	sense_buf[12] = sense_code;	/* Additional sense code */
 	sense_buf[13] = a_sense_code;	/* Additional sense code qualifier */
-	if (sense_key == SENKEY_ILLEGAL) {
+	if (sense_key == ILLEGAL_REQUEST) {
 		sense_buf[15] = 0;
 
 		if (sense_code == SENCODE_INVALID_PARAM_FIELD)
@@ -514,11 +488,12 @@
 		dev->nondasd_support = (nondasd!=0);
 	}
 	if(dev->nondasd_support != 0){
-		printk(KERN_INFO"%s%d: Non-DASD support enabled\n",dev->name, dev->id);
+		printk(KERN_INFO "%s%d: Non-DASD support enabled.\n",dev->name, dev->id);
 	}
 
 	dev->pae_support = 0;
 	if( (sizeof(dma_addr_t) > 4) && (dev->adapter_info.options & AAC_OPT_SGMAP_HOST64)){
+		printk(KERN_INFO "%s%d: 64bit support enabled.\n", dev->name, dev->id);
 		dev->pae_support = 1;
 	}
 
@@ -548,7 +523,7 @@
 	scsicmd = (struct scsi_cmnd *) context;
 
 	dev = (struct aac_dev *)scsicmd->device->host->hostdata;
-	cid =TARGET_LUN_TO_CONTAINER(scsicmd->device->id, scsicmd->device->lun);
+	cid = ID_LUN_TO_CONTAINER(scsicmd->device->id, scsicmd->device->lun);
 
 	lba = ((scsicmd->cmnd[1] & 0x1F) << 16) | (scsicmd->cmnd[2] << 8) | scsicmd->cmnd[3];
 	dprintk((KERN_DEBUG "read_callback[cpu %d]: lba = %u, t = %ld.\n", smp_processor_id(), lba, jiffies));
@@ -572,10 +547,11 @@
 		printk(KERN_WARNING "read_callback: read failed, status = %d\n", readreply->status);
 		scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_CHECK_CONDITION;
 		set_sense((u8 *) &sense_data[cid],
-				    SENKEY_HW_ERR,
+				    HARDWARE_ERROR,
 				    SENCODE_INTERNAL_TARGET_FAILURE,
 				    ASENCODE_INTERNAL_TARGET_FAILURE, 0, 0,
 				    0, 0);
+		memcpy(scsicmd->sense_buffer, &sense_data[cid], sizeof(struct sense_data));
 	}
 	fib_complete(fibptr);
 	fib_free(fibptr);
@@ -593,7 +569,7 @@
 
 	scsicmd = (struct scsi_cmnd *) context;
 	dev = (struct aac_dev *)scsicmd->device->host->hostdata;
-	cid = TARGET_LUN_TO_CONTAINER(scsicmd->device->id, scsicmd->device->lun);
+	cid = ID_LUN_TO_CONTAINER(scsicmd->device->id, scsicmd->device->lun);
 
 	lba = ((scsicmd->cmnd[1] & 0x1F) << 16) | (scsicmd->cmnd[2] << 8) | scsicmd->cmnd[3];
 	dprintk((KERN_DEBUG "write_callback[cpu %d]: lba = %u, t = %ld.\n", smp_processor_id(), lba, jiffies));
@@ -617,10 +593,11 @@
 		printk(KERN_WARNING "write_callback: write failed, status = %d\n", writereply->status);
 		scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_CHECK_CONDITION;
 		set_sense((u8 *) &sense_data[cid],
-				    SENKEY_HW_ERR,
+				    HARDWARE_ERROR,
 				    SENCODE_INTERNAL_TARGET_FAILURE,
 				    ASENCODE_INTERNAL_TARGET_FAILURE, 0, 0,
 				    0, 0);
+		memcpy(scsicmd->sense_buffer, &sense_data[cid], sizeof(struct sense_data));
 	}
 
 	fib_complete(fibptr);
@@ -644,7 +621,7 @@
 	 */
 	if (scsicmd->cmnd[0] == READ_6)	/* 6 byte command */
 	{
-		dprintk((KERN_DEBUG "aachba: received a read(6) command on target %d.\n", cid));
+		dprintk((KERN_DEBUG "aachba: received a read(6) command on id %d.\n", cid));
 
 		lba = ((scsicmd->cmnd[1] & 0x1F) << 16) | (scsicmd->cmnd[2] << 8) | scsicmd->cmnd[3];
 		count = scsicmd->cmnd[4];
@@ -652,7 +629,7 @@
 		if (count == 0)
 			count = 256;
 	} else {
-		dprintk((KERN_DEBUG "aachba: received a read(10) command on target %d.\n", cid));
+		dprintk((KERN_DEBUG "aachba: received a read(10) command on id %d.\n", cid));
 
 		lba = (scsicmd->cmnd[2] << 24) | (scsicmd->cmnd[3] << 16) | (scsicmd->cmnd[4] << 8) | scsicmd->cmnd[5];
 		count = (scsicmd->cmnd[7] << 8) | scsicmd->cmnd[8];
@@ -662,9 +639,7 @@
 	 *	Alocate and initialize a Fib
 	 */
 	if (!(cmd_fibcontext = fib_alloc(dev))) {
-		scsicmd->result = DID_ERROR << 16;
-		aac_io_done(scsicmd);
-		return (-1);
+		return -1;
 	}
 
 	fib_init(cmd_fibcontext);
@@ -726,7 +701,10 @@
 	 *	Check that the command queued to the controller
 	 */
 	if (status == -EINPROGRESS) 
+	{
+		dprintk("read queued.\n");
 		return 0;
+	}
 		
 	printk(KERN_WARNING "aac_read: fib_send failed with status: %d.\n", status);
 	/*
@@ -759,7 +737,7 @@
 		if (count == 0)
 			count = 256;
 	} else {
-		dprintk((KERN_DEBUG "aachba: received a write(10) command on target %d.\n", cid));
+		dprintk((KERN_DEBUG "aachba: received a write(10) command on id %d.\n", cid));
 		lba = (scsicmd->cmnd[2] << 24) | (scsicmd->cmnd[3] << 16) | (scsicmd->cmnd[4] << 8) | scsicmd->cmnd[5];
 		count = (scsicmd->cmnd[7] << 8) | scsicmd->cmnd[8];
 	}
@@ -832,7 +810,10 @@
 	 *	Check that the command queued to the controller
 	 */
 	if (status == -EINPROGRESS)
+	{
+		dprintk("write queued.\n");
 		return 0;
+	}
 
 	printk(KERN_WARNING "aac_write: fib_send failed with status: %d\n", status);
 	/*
@@ -850,7 +831,6 @@
 /**
  *	aac_scsi_cmd()		-	Process SCSI command
  *	@scsicmd:		SCSI command block
- *	@wait:			1 if the user wants to await completion
  *
  *	Emulate a SCSI command and queue the required request for the
  *	aacraid firmware.
@@ -859,29 +839,25 @@
 int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
 {
 	u32 cid = 0;
-	struct fsa_scsi_hba *fsa_dev_ptr;
-	int cardtype;
 	int ret;
 	struct Scsi_Host *host = scsicmd->device->host;
 	struct aac_dev *dev = (struct aac_dev *)host->hostdata;
+	struct fsa_scsi_hba *fsa_dev_ptr = &dev->fsa_dev;
+	int cardtype = dev->cardtype;
 	
-	cardtype = dev->cardtype;
-
-	fsa_dev_ptr = fsa_dev[host->unique_id];
-
 	/*
-	 *	If the bus, target or lun is out of range, return fail
+	 *	If the bus, id or lun is out of range, return fail
 	 *	Test does not apply to ID 16, the pseudo id for the controller
 	 *	itself.
 	 */
 	if (scsicmd->device->id != host->this_id) {
 		if ((scsicmd->device->channel == 0) ){
-			if( (scsicmd->device->id >= AAC_MAX_TARGET) || (scsicmd->device->lun != 0)){ 
+			if( (scsicmd->device->id >= MAXIMUM_NUM_CONTAINERS) || (scsicmd->device->lun != 0)){ 
 				scsicmd->result = DID_NO_CONNECT << 16;
 				__aac_io_done(scsicmd);
 				return 0;
 			}
-			cid = TARGET_LUN_TO_CONTAINER(scsicmd->device->id, scsicmd->device->lun);
+			cid = ID_LUN_TO_CONTAINER(scsicmd->device->id, scsicmd->device->lun);
 
 			/*
 			 *	If the target container doesn't exist, it may have
@@ -911,7 +887,7 @@
 			if (fsa_dev_ptr->valid[cid] == 0) {
 				scsicmd->result = DID_BAD_TARGET << 16;
 				__aac_io_done(scsicmd);
-				return -1;
+				return 0;
 			}
 		} else {  /* check for physical non-dasd devices */
 			if(dev->nondasd_support == 1){
@@ -932,11 +908,12 @@
 		dprintk((KERN_WARNING "Only INQUIRY & TUR command supported for controller, rcvd = 0x%x.\n", scsicmd->cmnd[0]));
 		scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_CHECK_CONDITION;
 		set_sense((u8 *) &sense_data[cid],
-			    SENKEY_ILLEGAL,
+			    ILLEGAL_REQUEST,
 			    SENCODE_INVALID_COMMAND,
 			    ASENCODE_INVALID_COMMAND, 0, 0, 0, 0);
 		__aac_io_done(scsicmd);
-		return -1;
+		memcpy(scsicmd->sense_buffer, &sense_data[cid], sizeof(struct sense_data));
+		return 0;
 	}
 
 
@@ -1034,7 +1011,7 @@
 		memset(&sense_data[cid], 0, sizeof (struct sense_data));
 		scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD;
 		__aac_io_done(scsicmd);
-		return (0);
+		return 0;
 
 	case ALLOW_MEDIUM_REMOVAL:
 		dprintk((KERN_DEBUG "LOCK command.\n"));
@@ -1058,7 +1035,7 @@
 	case START_STOP:
 		scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD;
 		__aac_io_done(scsicmd);
-		return (0);
+		return 0;
 	}
 
 	switch (scsicmd->cmnd[0]) 
@@ -1094,10 +1071,12 @@
 			printk(KERN_WARNING "Unhandled SCSI Command: 0x%x.\n", scsicmd->cmnd[0]);
 			scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_CHECK_CONDITION;
 			set_sense((u8 *) &sense_data[cid],
-				SENKEY_ILLEGAL, SENCODE_INVALID_COMMAND,
+				ILLEGAL_REQUEST, SENCODE_INVALID_COMMAND,
 			ASENCODE_INVALID_COMMAND, 0, 0, 0, 0);
+			memcpy(scsicmd->sense_buffer, &sense_data[cid],
+				sizeof(struct sense_data));
 			__aac_io_done(scsicmd);
-			return -1;
+			return 0;
 	}
 }
 
@@ -1110,14 +1089,14 @@
 	if (copy_from_user(&qd, arg, sizeof (struct aac_query_disk)))
 		return -EFAULT;
 	if (qd.cnum == -1)
-		qd.cnum = TARGET_LUN_TO_CONTAINER(qd.target, qd.lun);
-	else if ((qd.bus == -1) && (qd.target == -1) && (qd.lun == -1)) 
+		qd.cnum = ID_LUN_TO_CONTAINER(qd.id, qd.lun);
+	else if ((qd.bus == -1) && (qd.id == -1) && (qd.lun == -1)) 
 	{
 		if (qd.cnum < 0 || qd.cnum >= MAXIMUM_NUM_CONTAINERS)
 			return -EINVAL;
 		qd.instance = dev->scsi_host_ptr->host_no;
 		qd.bus = 0;
-		qd.target = CONTAINER_TO_TARGET(qd.cnum);
+		qd.id = CONTAINER_TO_ID(qd.cnum);
 		qd.lun = CONTAINER_TO_LUN(qd.cnum);
 	}
 	else return -EINVAL;
@@ -1197,7 +1176,7 @@
 		return delete_disk(dev, arg);
 	case FSACTL_FORCE_DELETE_DISK:
 		return force_delete_disk(dev, arg);
-	case 2131:
+	case FSACTL_GET_CONTAINERS:
 		return aac_get_containers(dev);
 	default:
 		return -ENOTTY;
@@ -1228,8 +1207,11 @@
 
 	srbreply = (struct aac_srb_reply *) fib_data(fibptr);
 
-	scsicmd->sense_buffer[0] = '\0';  // initialize sense valid flag to false
-	// calculate resid for sg 
+	scsicmd->sense_buffer[0] = '\0';  /* Initialize sense valid flag to false */
+	/*
+	 *	Calculate resid for sg 
+	 */
+	 
 	scsicmd->resid = scsicmd->request_bufflen - srbreply->data_xfer_length;
 
 	if(scsicmd->use_sg)
@@ -1376,7 +1358,7 @@
 		scsicmd->result |= SAM_STAT_CHECK_CONDITION;
 		len = (srbreply->sense_data_size > sizeof(scsicmd->sense_buffer))?
 				sizeof(scsicmd->sense_buffer):srbreply->sense_data_size;
-		printk(KERN_WARNING "aac_srb_callback: check condition, status = %d len=%d\n", le32_to_cpu(srbreply->status), len);
+		dprintk((KERN_WARNING "aac_srb_callback: check condition, status = %d len=%d\n", le32_to_cpu(srbreply->status), len));
 		memcpy(scsicmd->sense_buffer, srbreply->sense_data, len);
 		
 	}
@@ -1437,8 +1419,6 @@
 	 *	Allocate and initialize a Fib then setup a BlockWrite command
 	 */
 	if (!(cmd_fibcontext = fib_alloc(dev))) {
-		scsicmd->result = DID_ERROR << 16;
-		__aac_io_done(scsicmd);
 		return -1;
 	}
 	fib_init(cmd_fibcontext);
@@ -1446,7 +1426,7 @@
 	srbcmd = (struct aac_srb*) fib_data(cmd_fibcontext);
 	srbcmd->function = cpu_to_le32(SRBF_ExecuteScsi);
 	srbcmd->channel  = cpu_to_le32(aac_logical_to_phys(scsicmd->device->channel));
-	srbcmd->target   = cpu_to_le32(scsicmd->device->id);
+	srbcmd->id   = cpu_to_le32(scsicmd->device->id);
 	srbcmd->lun      = cpu_to_le32(scsicmd->device->lun);
 	srbcmd->flags    = cpu_to_le32(flag);
 	timeout = (scsicmd->timeout-jiffies)/HZ;
@@ -1498,12 +1478,6 @@
 	}
 
 	printk(KERN_WARNING "aac_srb: fib_send failed with status: %d\n", status);
-	/*
-	 *	For some reason, the Fib didn't queue, return QUEUE_FULL
-	 */
-	scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL;
-	__aac_io_done(scsicmd);
-
 	fib_complete(cmd_fibcontext);
 	fib_free(cmd_fibcontext);
 
--- diff/drivers/scsi/aacraid/aacraid.h	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aacraid/aacraid.h	2004-07-01 21:32:41.000000000 +0100
@@ -6,14 +6,12 @@
  *              D E F I N E S
  *----------------------------------------------------------------------------*/
 
-#define MAXIMUM_NUM_CONTAINERS	31
+#define MAXIMUM_NUM_CONTAINERS	32
 #define MAXIMUM_NUM_ADAPTERS	8
 
-#define AAC_NUM_FIB		578
-//#define AAC_NUM_IO_FIB	512
+#define AAC_NUM_FIB		(256 + 64)
 #define AAC_NUM_IO_FIB		100
 
-#define AAC_MAX_TARGET 		(MAXIMUM_NUM_CONTAINERS+1)
 #define AAC_MAX_LUN		(8)
 
 #define AAC_MAX_HOSTPHYSMEMPAGES (0xfffff)
@@ -21,7 +19,12 @@
 /*
  * These macros convert from physical channels to virtual channels
  */
-#define CONTAINER_CHANNEL	(0)
+#define CONTAINER_CHANNEL		(0)
+#define ID_LUN_TO_CONTAINER(id, lun)	(id)
+#define CONTAINER_TO_CHANNEL(cont)	(CONTAINER_CHANNEL)
+#define CONTAINER_TO_ID(cont)		(cont)
+#define CONTAINER_TO_LUN(cont)		(0)
+
 #define aac_phys_to_logical(x)  (x+1)
 #define aac_logical_to_phys(x)  (x?x-1:0)
 
@@ -73,7 +76,7 @@
 #define		FT_SOCK		6	/* socket */
 #define		FT_FIFO		7	/* fifo */
 #define		FT_FILESYS	8	/* ADAPTEC's "FSA"(tm) filesystem */
-#define		FT_DRIVE	9	/* physical disk - addressable in scsi by bus/target/lun */
+#define		FT_DRIVE	9	/* physical disk - addressable in scsi by bus/id/lun */
 #define		FT_SLICE	10	/* virtual disk - raw volume - slice */
 #define		FT_PARTITION	11	/* FSA partition - carved out of a slice - building block for containers */
 #define		FT_VOLUME	12	/* Container - Volume Set */
@@ -433,7 +436,7 @@
 
 struct aac_driver_ident
 {
-	int 	(*init)(struct aac_dev *dev, unsigned long num);
+	int 	(*init)(struct aac_dev *dev);
 	char *	name;
 	char *	vname;
 	char *	model;
@@ -596,6 +599,9 @@
 #define	InboundMailbox2		IndexRegs.Mailbox[2]
 #define	InboundMailbox3		IndexRegs.Mailbox[3]
 #define	InboundMailbox4		IndexRegs.Mailbox[4]
+#define	InboundMailbox5		IndexRegs.Mailbox[5]
+#define	InboundMailbox6		IndexRegs.Mailbox[6]
+#define	InboundMailbox7		IndexRegs.Mailbox[7]
 
 #define	INBOUNDDOORBELL_0	cpu_to_le32(0x00000001)
 #define INBOUNDDOORBELL_1	cpu_to_le32(0x00000002)
@@ -650,6 +656,7 @@
 struct aac_fib_context {
 	s16	 		type;		// used for verification of structure	
 	s16	 		size;
+	u32			unique;		// unique value representing this context
 	ulong			jiffies;	// used for cleanup - dmb changed to ulong
 	struct list_head	next;		// used to link context's into a linked list
 	struct semaphore 	wait_sem;	// this is used to wait for the next fib to arrive.
@@ -825,9 +832,8 @@
 	} regs;
 	u32			OIMR; /* Mask Register Cache */
 	/*
-	 *	The following is the number of the individual adapter
+	 *	AIF thread states
 	 */
-	u32			devnum;
 	u32			aif_thread;
 	struct completion	aif_completion;
 	struct aac_adapter_info adapter_info;
@@ -839,19 +845,19 @@
 };
 
 #define AllocateAndMapFibSpace(dev, MapFibContext) \
-	dev->a_ops.AllocateAndMapFibSpace(dev, MapFibContext)
+	(dev)->a_ops.AllocateAndMapFibSpace(dev, MapFibContext)
 
 #define UnmapAndFreeFibSpace(dev, MapFibContext) \
-	dev->a_ops.UnmapAndFreeFibSpace(dev, MapFibContext)
+	(dev)->a_ops.UnmapAndFreeFibSpace(dev, MapFibContext)
 
 #define aac_adapter_interrupt(dev) \
-	dev->a_ops.adapter_interrupt(dev)
+	(dev)->a_ops.adapter_interrupt(dev)
 
 #define aac_adapter_notify(dev, event) \
-	dev->a_ops.adapter_notify(dev, event)
+	(dev)->a_ops.adapter_notify(dev, event)
 
 #define aac_adapter_enable_int(dev, event) \
-	dev->a_ops.adapter_enable_int(dev, event)
+	(dev)->a_ops.adapter_enable_int(dev, event)
 
 #define aac_adapter_disable_int(dev, event) \
 	dev->a_ops.adapter_disable_int(dev, event)
@@ -1023,7 +1029,7 @@
 {
 	u32		function;
 	u32		channel;
-	u32		target;
+	u32		id;
 	u32		lun;
 	u32		timeout;
 	u32		flags;
@@ -1212,7 +1218,7 @@
 {
 	s32	cnum;
 	s32	bus;
-	s32	target;
+	s32	id;
 	s32	lun;
 	u32	valid;
 	u32	locked;
@@ -1226,11 +1232,11 @@
 	u32	disknum;
 	u32	cnum;
 };
-
+ 
 struct fib_ioctl
 {
-	char	*fibctx;
-	int	wait;
+	u32	fibctx;
+	s32	wait;
 	char	*fib;
 };
 
@@ -1271,6 +1277,7 @@
 #define FSACTL_MINIPORT_REV_CHECK               CTL_CODE(2107, METHOD_BUFFERED)
 #define FSACTL_GET_PCI_INFO               	CTL_CODE(2119, METHOD_BUFFERED)
 #define FSACTL_FORCE_DELETE_DISK		CTL_CODE(2120, METHOD_NEITHER)
+#define FSACTL_GET_CONTAINERS			2131
 
 
 struct aac_common
@@ -1323,6 +1330,7 @@
 #define WRITE_PERMANENT_PARAMETERS	cpu_to_le32(0x0000000b)
 #define HOST_CRASHING			cpu_to_le32(0x0000000d)
 #define	SEND_SYNCHRONOUS_FIB		cpu_to_le32(0x0000000c)
+#define	COMMAND_POST_RESULTS		cpu_to_le32(0x00000014)
 #define GET_ADAPTER_PROPERTIES		cpu_to_le32(0x00000019)
 #define RE_INIT_ADAPTER			cpu_to_le32(0x000000ee)
 
@@ -1347,14 +1355,16 @@
  *	Phases are bit oriented.  It is NOT valid  to have multiple bits set						
  */					
 
-#define	SELF_TEST_FAILED		cpu_to_le32(0x00000004)
-#define	KERNEL_UP_AND_RUNNING		cpu_to_le32(0x00000080)
-#define	KERNEL_PANIC			cpu_to_le32(0x00000100)
+#define	SELF_TEST_FAILED		(cpu_to_le32(0x00000004))
+#define MONITOR_PANIC			(cpu_to_le32(0x00000020))
+#define	KERNEL_UP_AND_RUNNING		(cpu_to_le32(0x00000080))
+#define	KERNEL_PANIC			(cpu_to_le32(0x00000100))
 
 /*
  *	Doorbell bit defines
  */
 
+#define DoorBellSyncCmdAvailable	cpu_to_le32(1<<0)	// Host -> Adapter
 #define DoorBellPrintfDone		cpu_to_le32(1<<5)	// Host -> Adapter
 #define DoorBellAdapterNormCmdReady	cpu_to_le32(1<<1)	// Adapter -> Host
 #define DoorBellAdapterNormRespReady	cpu_to_le32(1<<2)	// Adapter -> Host
@@ -1368,9 +1378,22 @@
  */
  
 #define 	AifCmdEventNotify	1	/* Notify of event */
+#define			AifEnConfigChange	3	/* Adapter configuration change */
+#define			AifEnContainerChange	4	/* Container configuration change */
+#define			AifEnDeviceFailure	5	/* SCSI device failed */
+#define			AifEnAddContainer	15	/* A new array was created */
+#define			AifEnDeleteContainer	16	/* A container was deleted */
+#define			AifEnExpEvent		23	/* Firmware Event Log */
+#define			AifExeFirmwarePanic	3	/* Firmware Event Panic */
+#define			AifHighPriority		3	/* Highest Priority Event */
+
 #define		AifCmdJobProgress	2	/* Progress report */
+#define			AifJobCtrZero	101	/* Array Zero progress */
+#define			AifJobStsSuccess 1	/* Job completes */
 #define		AifCmdAPIReport		3	/* Report from other user of API */
 #define		AifCmdDriverNotify	4	/* Notify host driver of event */
+#define			AifDenMorphComplete 200	/* A morph operation completed */
+#define			AifDenVolumeExtendComplete 201 /* A volume extend completed */
 #define		AifReqJobList		100	/* Gets back complete job list */
 #define		AifReqJobsForCtr	101	/* Gets back jobs for specific container */
 #define		AifReqJobsForScsi	102	/* Gets back jobs for specific SCSI device */ 
@@ -1427,9 +1450,9 @@
 int aac_scsi_cmd(struct scsi_cmnd *cmd);
 int aac_dev_ioctl(struct aac_dev *dev, int cmd, void *arg);
 int aac_do_ioctl(struct aac_dev * dev, int cmd, void *arg);
-int aac_rx_init(struct aac_dev *dev, unsigned long devNumber);
-int aac_rkt_init(struct aac_dev *dev, unsigned long devNumber);
-int aac_sa_init(struct aac_dev *dev, unsigned long devNumber);
+int aac_rx_init(struct aac_dev *dev);
+int aac_rkt_init(struct aac_dev *dev);
+int aac_sa_init(struct aac_dev *dev);
 unsigned int aac_response_normal(struct aac_queue * q);
 unsigned int aac_command_normal(struct aac_queue * q);
 int aac_command_thread(struct aac_dev * dev);
--- diff/drivers/scsi/aacraid/commctrl.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aacraid/commctrl.c	2004-07-01 21:32:41.000000000 +0100
@@ -92,11 +92,12 @@
 		 */
 		kfib->header.XferState = 0;
 	} else {
-		if (fib_send(kfib->header.Command, fibptr, le32_to_cpu(kfib->header.Size) , FsaNormal,
-			1, 1, NULL, NULL) != 0) 
-		{
+		int retval = fib_send(kfib->header.Command, fibptr,
+				le32_to_cpu(kfib->header.Size) , FsaNormal,
+				1, 1, NULL, NULL);
+		if (retval) {
 			fib_free(fibptr);
-			return -EINVAL;
+			return retval;
 		}
 		if (fib_complete(fibptr) != 0) {
 			fib_free(fibptr);
@@ -130,14 +131,24 @@
 {
 	struct aac_fib_context * fibctx;
 	int status;
-	unsigned long flags;
 
 	fibctx = kmalloc(sizeof(struct aac_fib_context), GFP_KERNEL);
 	if (fibctx == NULL) {
 		status = -ENOMEM;
 	} else {
+		unsigned long flags;
+		struct list_head * entry;
+		struct aac_fib_context * context;
+
 		fibctx->type = FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT;
 		fibctx->size = sizeof(struct aac_fib_context);
+ 		/*
+		 *	Yes yes, I know this could be an index, but we have a
+		 * better guarantee of uniqueness for the locked loop below.
+		 * Without the aid of a persistent history, this also helps
+		 * reduce the chance that the opaque context would be reused.
+		 */
+		fibctx->unique = (u32)((ulong)fibctx & 0xFFFFFFFF);
 		/*
 		 *	Initialize the mutex used to wait for the next AIF.
 		 */
@@ -155,9 +166,22 @@
 		 *	AdapterFibContext list.
 		 */
 		spin_lock_irqsave(&dev->fib_lock, flags);
+		/* Ensure that we have a unique identifier */
+		entry = dev->fib_list.next;
+		while (entry != &dev->fib_list) {
+			context = list_entry(entry, struct aac_fib_context, next);
+			if (context->unique == fibctx->unique) {
+				/* Not unique (32 bits) */
+				fibctx->unique++;
+				entry = dev->fib_list.next;
+			} else {
+				entry = entry->next;
+			}
+		}
 		list_add_tail(&fibctx->next, &dev->fib_list);
 		spin_unlock_irqrestore(&dev->fib_lock, flags);
-		if (copy_to_user(arg,  &fibctx, sizeof(struct aac_fib_context *))) {
+		if (copy_to_user(arg,  &fibctx->unique, 
+						sizeof(fibctx->unique))) {
 			status = -EFAULT;
 		} else {
 			status = 0;
@@ -178,43 +202,44 @@
 static int next_getadapter_fib(struct aac_dev * dev, void *arg)
 {
 	struct fib_ioctl f;
-	struct aac_fib_context *fibctx, *aifcp;
 	struct fib *fib;
+	struct aac_fib_context *fibctx;
 	int status;
 	struct list_head * entry;
-	int found;
 	unsigned long flags;
 	
 	if(copy_from_user((void *)&f, arg, sizeof(struct fib_ioctl)))
 		return -EFAULT;
 	/*
-	 *	Extract the AdapterFibContext from the Input parameters.
-	 */
-	fibctx = (struct aac_fib_context *) f.fibctx;
-
-	/*
 	 *	Verify that the HANDLE passed in was a valid AdapterFibContext
 	 *
 	 *	Search the list of AdapterFibContext addresses on the adapter
 	 *	to be sure this is a valid address
 	 */
-	found = 0;
 	entry = dev->fib_list.next;
+	fibctx = NULL;
 
-	while(entry != &dev->fib_list) {
-		aifcp = list_entry(entry, struct aac_fib_context, next);
-		if(fibctx == aifcp) {   /* We found a winner */
-			found = 1;
+	while (entry != &dev->fib_list) {
+		fibctx = list_entry(entry, struct aac_fib_context, next);
+		/*
+		 *	Extract the AdapterFibContext from the Input parameters.
+		 */
+		if (fibctx->unique == f.fibctx) {   /* We found a winner */
 			break;
 		}
 		entry = entry->next;
+		fibctx = NULL;
 	}
-	if (found == 0)
+	if (!fibctx) {
+		dprintk ((KERN_INFO "Fib Context not found\n"));
 		return -EINVAL;
+	}
 
 	if((fibctx->type != FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT) ||
-		 (fibctx->size != sizeof(struct aac_fib_context)))
+		 (fibctx->size != sizeof(struct aac_fib_context))) {
+		dprintk ((KERN_INFO "Fib Context corrupt?\n"));
 		return -EINVAL;
+	}
 	status = 0;
 	spin_lock_irqsave(&dev->fib_lock, flags);
 	/*
@@ -309,16 +334,10 @@
  
 static int close_getadapter_fib(struct aac_dev * dev, void *arg)
 {
-	struct aac_fib_context *fibctx, *aifcp;
+	struct aac_fib_context *fibctx;
 	int status;
 	unsigned long flags;
 	struct list_head * entry;
-	int found;
-
-	/*
-	 *	Extract the fibctx from the input parameters
-	 */
-	fibctx = arg;
 
 	/*
 	 *	Verify that the HANDLE passed in was a valid AdapterFibContext
@@ -327,19 +346,23 @@
 	 *	to be sure this is a valid address
 	 */
 
-	found = 0;
 	entry = dev->fib_list.next;
+	fibctx = NULL;
 
 	while(entry != &dev->fib_list) {
-		aifcp = list_entry(entry, struct aac_fib_context, next);
-		if(fibctx == aifcp) {   /* We found a winner */
-			found = 1;
+		fibctx = list_entry(entry, struct aac_fib_context, next);
+		/*
+		 *	Extract the fibctx from the input parameters
+		 */
+		if (fibctx->unique == (u32)(unsigned long)arg) {   
+			/* We found a winner */
 			break;
 		}
 		entry = entry->next;
+		fibctx = NULL;
 	}
 
-	if(found == 0)
+	if (!fibctx)
 		return 0; /* Already gone */
 
 	if((fibctx->type != FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT) ||
@@ -356,8 +379,9 @@
  *	@dev: adapter
  *	@arg: ioctl arguments
  *
- *	This routine returns the firmware version.
- *      Under Linux, there have been no version incompatibilities, so this is simple!
+ *	This routine returns the driver version.
+ *      Under Linux, there have been no version incompatibilities, so this is 
+ *      simple!
  */
 
 static int check_revision(struct aac_dev *dev, void *arg)
@@ -419,6 +443,11 @@
 		goto cleanup;
 	}
 
+	if (fibsize > FIB_DATA_SIZE_IN_BYTES) {
+		rcode = -EINVAL;
+		goto cleanup;
+	}
+
 	if(copy_from_user(srbcmd, user_srb,fibsize)){
 		printk(KERN_DEBUG"aacraid: Could not copy srb from user\n"); 
 		rcode = -EFAULT;
@@ -431,14 +460,14 @@
 	// Fix up srb for endian and force some values
 	srbcmd->function = cpu_to_le32(SRBF_ExecuteScsi);	// Force this
 	srbcmd->channel  = cpu_to_le32(srbcmd->channel);
-	srbcmd->target   = cpu_to_le32(srbcmd->target);
+	srbcmd->id	 = cpu_to_le32(srbcmd->id);
 	srbcmd->lun      = cpu_to_le32(srbcmd->lun);
 	srbcmd->flags    = cpu_to_le32(srbcmd->flags);
 	srbcmd->timeout  = cpu_to_le32(srbcmd->timeout);
 	srbcmd->retry_limit =cpu_to_le32(0); // Obsolete parameter
 	srbcmd->cdb_size = cpu_to_le32(srbcmd->cdb_size);
 	
-	switch(srbcmd->flags){
+	switch (srbcmd->flags & (SRB_DataIn | SRB_DataOut)) {
 	case SRB_DataOut:
 		data_dir = DMA_TO_DEVICE;
 		break;
@@ -451,17 +480,26 @@
 	default:
 		data_dir = DMA_NONE;
 	}
-	if( dev->pae_support ==1 ) {
+	if (dev->pae_support == 1) {
 		struct sgmap64* psg = (struct sgmap64*)&srbcmd->sg;
 		byte_count = 0;
 
-		// This should also catch if user used the 32 bit sgmap
-		actual_fibsize = sizeof (struct aac_srb) + (((srbcmd->sg.count & 0xff) - 1) * sizeof (struct sgentry64));
+		/*
+		 * This should also catch if user used the 32 bit sgmap
+		 */
+		actual_fibsize = sizeof(struct aac_srb) - 
+			sizeof(struct sgentry) + ((srbcmd->sg.count & 0xff) * 
+			 	sizeof(struct sgentry64));
 		if(actual_fibsize != fibsize){ // User made a mistake - should not continue
 			printk(KERN_DEBUG"aacraid: Bad Size specified in Raw SRB command\n");
 			rcode = -EINVAL;
 			goto cleanup;
 		}
+		if ((data_dir == DMA_NONE) && psg->count) { 
+			printk(KERN_DEBUG"aacraid: SG with no direction specified in Raw SRB command\n");
+			rcode = -EINVAL;
+			goto cleanup;
+		}
 
 		for (i = 0; i < psg->count; i++) {
 			dma_addr_t addr; 
@@ -506,6 +544,11 @@
 			rcode = -EINVAL;
 			goto cleanup;
 		}
+		if ((data_dir == DMA_NONE) && psg->count) {
+			printk(KERN_DEBUG"aacraid: SG with no direction specified in Raw SRB command\n");
+			rcode = -EINVAL;
+			goto cleanup;
+		}
 		for (i = 0; i < psg->count; i++) {
 			dma_addr_t addr; 
 			void* p;
--- diff/drivers/scsi/aacraid/comminit.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aacraid/comminit.c	2004-07-01 21:32:41.000000000 +0100
@@ -95,13 +95,18 @@
 	 * with the math overloading past 32 bits, thus we must limit this
 	 * field.
 	 *
-	 * FIXME: this assumes the memory is mapped zero->n, which isnt
-	 * always true on real computers.
+	 * This assumes the memory is mapped zero->n, which isnt
+	 * always true on real computers. It also has some slight problems
+	 * with the GART on x86-64. I've btw never tried DMA from PCI space
+	 * on this platform but don't be suprised if its problematic.
 	 */
+#ifndef CONFIG_GART_IOMMU
 	if ((num_physpages << (PAGE_SHIFT - 12)) <= AAC_MAX_HOSTPHYSMEMPAGES) {
 		init->HostPhysMemPages = 
 			cpu_to_le32(num_physpages << (PAGE_SHIFT-12));
-	} else {
+	} else 
+#endif	
+	{
 		init->HostPhysMemPages = cpu_to_le32(AAC_MAX_HOSTPHYSMEMPAGES);
 	}
 
--- diff/drivers/scsi/aacraid/linit.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aacraid/linit.c	2004-07-01 21:32:41.000000000 +0100
@@ -27,10 +27,11 @@
  * Abstract: Linux Driver entry module for Adaptec RAID Array Controller
  */
 
-#define AAC_DRIVER_VERSION		"1.1.2-lk1"
+#define AAC_DRIVER_VERSION		"1.1.2-lk2"
 #define AAC_DRIVER_BUILD_DATE		__DATE__
 #define AAC_DRIVERNAME			"aacraid"
 
+#include <linux/compat.h>
 #include <linux/blkdev.h>
 #include <linux/completion.h>
 #include <linux/init.h>
@@ -41,6 +42,8 @@
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/syscalls.h>
+#include <linux/ioctl32.h>
 #include <asm/semaphore.h>
 
 #include <scsi/scsi.h>
@@ -168,6 +171,29 @@
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2025SA      ", 1 }, /* ASR-2025SA      (ZCR DIMM SATA) */
 };
 
+#ifdef CONFIG_COMPAT
+/* 
+ * Promote 32 bit apps that call get_next_adapter_fib_ioctl to 64 bit version 
+ */
+static int aac_get_next_adapter_fib_ioctl(unsigned int fd, unsigned int cmd, 
+		unsigned long arg, struct file *file)
+{
+	struct fib_ioctl *f;
+
+	f = compat_alloc_user_space(sizeof(*f));
+	if (!access_ok(VERIFY_WRITE, f, sizeof(*f)))
+		return -EFAULT;
+
+	clear_user(f, sizeof(*f));
+	if (copy_from_user((void *)f, (void *)arg, 
+				sizeof(struct fib_ioctl) - sizeof(u32)))
+		return -EFAULT;
+
+	return sys_ioctl(fd, cmd, (unsigned long)f);
+}
+#endif
+
+
 /**
  *	aac_queuecommand	-	queue a SCSI command
  *	@cmd:		SCSI command to queue
@@ -355,13 +381,15 @@
 	struct Scsi_Host * host = dev->host;
 	struct scsi_cmnd * command;
 	int count;
+	struct aac_dev * aac;
 	unsigned long flags;
 
 	printk(KERN_ERR "%s: Host adapter reset request. SCSI hang ?\n", 
 					AAC_DRIVERNAME);
 
 
-	if (aac_adapter_check_health((struct aac_dev *)host->hostdata)) {
+	aac = (struct aac_dev *)host->hostdata;
+	if (aac_adapter_check_health(aac)) {
 		printk(KERN_ERR "%s: Host adapter appears dead\n", 
 				AAC_DRIVERNAME);
 		return -ENODEV;
@@ -381,15 +409,13 @@
 				}
 			}
 			spin_unlock_irqrestore(&dev->list_lock, flags);
-			if (active)
-				break;
 
+			/*
+			 * We can exit If all the commands are complete
+			 */
+			if (active == 0)
+				return SUCCESS;
 		}
-		/*
-		 * We can exit If all the commands are complete
-		 */
-		if (active == 0)
-			return SUCCESS;
 		spin_unlock_irq(host->host_lock);
 		scsi_sleep(HZ);
 		spin_lock_irq(host->host_lock);
@@ -461,7 +487,11 @@
 	.this_id        		= 16,
 	.sg_tablesize   		= 16,
 	.max_sectors    		= 128,
+#if (AAC_NUM_IO_FIB > 256)
+	.cmd_per_lun			= 256,
+#else		
 	.cmd_per_lun    		= AAC_NUM_IO_FIB, 
+#endif	
 	.use_clustering			= ENABLE_CLUSTERING,
 };
 
@@ -521,7 +551,7 @@
 	for (container = 0; container < MAXIMUM_NUM_CONTAINERS; container++)
 		fsa_dev_ptr->devname[container][0] = '\0';
 
-	if ((*aac_drivers[index].init)(aac , shost->unique_id))
+	if ((*aac_drivers[index].init)(aac))
 		goto out_free_fibs;
 
 	/*
@@ -552,7 +582,7 @@
 	 * dmb - we may need to move the setting of these parms somewhere else once
 	 * we get a fib that can report the actual numbers
 	 */
-	shost->max_id = AAC_MAX_TARGET;
+	shost->max_id = MAXIMUM_NUM_CONTAINERS;
 	shost->max_lun = AAC_MAX_LUN;
 
 	error = scsi_add_host(shost, &pdev->dev);
@@ -643,12 +673,39 @@
 		printk(KERN_WARNING
 		       "aacraid: unable to register \"aac\" device.\n");
 	}
+#ifdef CONFIG_COMPAT
+	register_ioctl32_conversion(FSACTL_MINIPORT_REV_CHECK, NULL);
+	register_ioctl32_conversion(FSACTL_SENDFIB, NULL);
+	register_ioctl32_conversion(FSACTL_OPEN_GET_ADAPTER_FIB, NULL);
+	register_ioctl32_conversion(FSACTL_GET_NEXT_ADAPTER_FIB, 
+		aac_get_next_adapter_fib_ioctl);
+	register_ioctl32_conversion(FSACTL_CLOSE_GET_ADAPTER_FIB, NULL);
+	register_ioctl32_conversion(FSACTL_SEND_RAW_SRB, NULL);
+	register_ioctl32_conversion(FSACTL_GET_PCI_INFO, NULL);
+	register_ioctl32_conversion(FSACTL_QUERY_DISK, NULL);
+	register_ioctl32_conversion(FSACTL_DELETE_DISK, NULL);
+	register_ioctl32_conversion(FSACTL_FORCE_DELETE_DISK, NULL);
+	register_ioctl32_conversion(FSACTL_GET_CONTAINERS, NULL);
+#endif
 
 	return 0;
 }
 
 static void __exit aac_exit(void)
 {
+#ifdef CONFIG_COMPAT
+	unregister_ioctl32_conversion(FSACTL_MINIPORT_REV_CHECK);
+	unregister_ioctl32_conversion(FSACTL_SENDFIB);
+	unregister_ioctl32_conversion(FSACTL_OPEN_GET_ADAPTER_FIB);
+	unregister_ioctl32_conversion(FSACTL_GET_NEXT_ADAPTER_FIB);
+	unregister_ioctl32_conversion(FSACTL_CLOSE_GET_ADAPTER_FIB);
+	unregister_ioctl32_conversion(FSACTL_SEND_RAW_SRB);
+	unregister_ioctl32_conversion(FSACTL_GET_PCI_INFO);
+	unregister_ioctl32_conversion(FSACTL_QUERY_DISK);
+	unregister_ioctl32_conversion(FSACTL_DELETE_DISK);
+	unregister_ioctl32_conversion(FSACTL_FORCE_DELETE_DISK);
+	unregister_ioctl32_conversion(FSACTL_GET_CONTAINERS);
+#endif
 	unregister_chrdev(aac_cfg_major, "aac");
 	pci_unregister_driver(&aac_pci_driver);
 }
--- diff/drivers/scsi/aacraid/rkt.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/aacraid/rkt.c	2004-07-01 21:32:41.000000000 +0100
@@ -38,6 +38,7 @@
 #include <linux/blkdev.h>
 #include <linux/delay.h>
 #include <linux/completion.h>
+#include <linux/time.h>
 #include <linux/interrupt.h>
 #include <asm/semaphore.h>
 
@@ -67,8 +68,8 @@
 			rkt_writel(dev, InboundDoorbellReg,DoorBellPrintfDone);
 		}
 		else if (bellbits & DoorBellAdapterNormCmdReady) {
-			aac_command_normal(&dev->queues->queue[HostNormCmdQueue]);
 			rkt_writel(dev, MUnit.ODR, DoorBellAdapterNormCmdReady);
+			aac_command_normal(&dev->queues->queue[HostNormCmdQueue]);
 		}
 		else if (bellbits & DoorBellAdapterNormRespReady) {
 			aac_response_normal(&dev->queues->queue[HostNormRespQueue]);
@@ -305,7 +306,7 @@
 	struct aac_init *init;
 
 	init = dev->init;
-	init->HostElapsedSeconds = cpu_to_le32(jiffies/HZ);
+	init->HostElapsedSeconds = cpu_to_le32(get_seconds());
 	/*
 	 *	Tell the adapter we are back and up and running so it will scan
 	 *	its command queues and enable our interrupts
@@ -341,12 +342,38 @@
 	if (status & SELF_TEST_FAILED)
 		return -1;
 	/*
-	 *	Check to see if the board panic'd while booting.
+	 *	Check to see if the board panic'd.
 	 */
 	if (status & KERNEL_PANIC)
-		return -2;
+	{
+		char * buffer = kmalloc(512, GFP_KERNEL|__GFP_DMA);
+		struct POSTSTATUS {
+			u32 Post_Command;
+			u32 Post_Address;
+		} * post = kmalloc(sizeof(struct POSTSTATUS), GFP_KERNEL);
+		dma_addr_t paddr = pci_map_single(dev->pdev, post, sizeof(struct POSTSTATUS), 2);
+		dma_addr_t baddr = pci_map_single(dev->pdev, buffer, 512, 1);
+		u32 status = -1;
+		int ret = -2;
+		
+		memset(buffer, 0, 512);
+		post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS);
+		post->Post_Address = cpu_to_le32(baddr);
+		rkt_writel(dev, MUnit.IMRx[0], cpu_to_le32(paddr));
+		rkt_sync_cmd(dev, COMMAND_POST_RESULTS, baddr, &status);
+		pci_unmap_single(dev->pdev, paddr, sizeof(struct POSTSTATUS),2);
+		kfree(post);
+		if ((buffer[0] == '0') && (buffer[1] == 'x')) {
+			ret = (buffer[2] <= '9') ? (buffer[2] - '0') : (buffer[2] - 'A' + 10);
+			ret <<= 4;
+			ret += (buffer[3] <= '9') ? (buffer[3] - '0') : (buffer[3] - 'A' + 10);
+		}
+		pci_unmap_single(dev->pdev, baddr, 512, 1);
+		kfree(buffer);
+		return ret;
+	}
 	/*
-	 *	Wait for the adapter to be up and running. Wait up to 3 minutes
+	 *	Wait for the adapter to be up and running.
 	 */
 	if (!(status & KERNEL_UP_AND_RUNNING))
 		return -3;
@@ -354,26 +381,24 @@
 	 *	Everything is OK
 	 */
 	return 0;
-} /* aac_rkt_check_health */
+}
 
 /**
  *	aac_rkt_init	-	initialize an i960 based AAC card
  *	@dev: device to configure
- *	@devnum: adapter number
  *
  *	Allocate and set up resources for the i960 based AAC variants. The 
  *	device_interface in the commregion will be allocated and linked 
  *	to the comm region.
  */
 
-int aac_rkt_init(struct aac_dev *dev, unsigned long num)
+int aac_rkt_init(struct aac_dev *dev)
 {
 	unsigned long start;
 	unsigned long status;
 	int instance;
 	const char * name;
 
-	dev->devnum = num;
 	instance = dev->id;
 	name     = dev->name;
 
@@ -383,33 +408,40 @@
 	if((dev->regs.rkt = (struct rkt_registers *)ioremap((unsigned long)dev->scsi_host_ptr->base, 8192))==NULL)
 	{	
 		printk(KERN_WARNING "aacraid: unable to map i960.\n" );
-		return -1;
+		goto error_iounmap;
 	}
 	/*
 	 *	Check to see if the board failed any self tests.
 	 */
-	if (rkt_readl(dev, IndexRegs.Mailbox[7]) & SELF_TEST_FAILED) {
+	if (rkt_readl(dev, MUnit.OMRx[0]) & SELF_TEST_FAILED) {
 		printk(KERN_ERR "%s%d: adapter self-test failed.\n", dev->name, instance);
-		return -1;
+		goto error_iounmap;
+	}
+	/*
+	 *	Check to see if the monitor panic'd while booting.
+	 */
+	if (rkt_readl(dev, MUnit.OMRx[0]) & MONITOR_PANIC) {
+		printk(KERN_ERR "%s%d: adapter monitor panic.\n", dev->name, instance);
+		goto error_iounmap;
 	}
 	/*
 	 *	Check to see if the board panic'd while booting.
 	 */
-	if (rkt_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_PANIC) {
+	if (rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC) {
 		printk(KERN_ERR "%s%d: adapter kernel panic'd.\n", dev->name, instance);
-		return -1;
+		goto error_iounmap;
 	}
 	start = jiffies;
 	/*
 	 *	Wait for the adapter to be up and running. Wait up to 3 minutes
 	 */
-	while (!(rkt_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_UP_AND_RUNNING)) 
+	while (!(rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING))
 	{
 		if(time_after(jiffies, start+180*HZ))
 		{
 			status = rkt_readl(dev, IndexRegs.Mailbox[7]) >> 16;
 			printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %ld.\n", dev->name, instance, status);
-			return -1;
+			goto error_iounmap;
 		}
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout(1);
@@ -417,7 +449,7 @@
 	if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) 
 	{
 		printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance);
-		return -1;
+		goto error_iounmap;
 	}
 	/*
 	 *	Fill in the function dispatch table.
@@ -430,7 +462,7 @@
 	dev->a_ops.adapter_check_health = aac_rkt_check_health;
 
 	if (aac_init_adapter(dev) == NULL)
-		return -1;
+		goto error_irq;
 	/*
 	 *	Start any kernel threads needed
 	 */
@@ -438,7 +470,7 @@
 	if(dev->thread_pid < 0)
 	{
 		printk(KERN_ERR "aacraid: Unable to create rkt thread.\n");
-		return -1;
+		goto error_kfree;
 	}	
 	/*
 	 *	Tell the adapter that all is configured, and it can start
@@ -446,4 +478,15 @@
 	 */
 	aac_rkt_start_adapter(dev);
 	return 0;
+
+error_kfree:
+	kfree(dev->queues);
+
+error_irq:
+	free_irq(dev->scsi_host_ptr->irq, (void *)dev);
+
+error_iounmap:
+	iounmap(dev->regs.rkt);
+
+	return -1;
 }
--- diff/drivers/scsi/aacraid/rx.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/aacraid/rx.c	2004-07-01 21:32:41.000000000 +0100
@@ -38,6 +38,7 @@
 #include <linux/blkdev.h>
 #include <linux/delay.h>
 #include <linux/completion.h>
+#include <linux/time.h>
 #include <linux/interrupt.h>
 #include <asm/semaphore.h>
 
@@ -67,8 +68,8 @@
 			rx_writel(dev, InboundDoorbellReg,DoorBellPrintfDone);
 		}
 		else if (bellbits & DoorBellAdapterNormCmdReady) {
-			aac_command_normal(&dev->queues->queue[HostNormCmdQueue]);
 			rx_writel(dev, MUnit.ODR, DoorBellAdapterNormCmdReady);
+			aac_command_normal(&dev->queues->queue[HostNormCmdQueue]);
 		}
 		else if (bellbits & DoorBellAdapterNormRespReady) {
 			aac_response_normal(&dev->queues->queue[HostNormRespQueue]);
@@ -305,7 +306,7 @@
 	struct aac_init *init;
 
 	init = dev->init;
-	init->HostElapsedSeconds = cpu_to_le32(jiffies/HZ);
+	init->HostElapsedSeconds = cpu_to_le32(get_seconds());
 	/*
 	 *	Tell the adapter we are back and up and running so it will scan
 	 *	its command queues and enable our interrupts
@@ -341,12 +342,36 @@
 	if (status & SELF_TEST_FAILED)
 		return -1;
 	/*
-	 *	Check to see if the board panic'd while booting.
+	 *	Check to see if the board panic'd.
 	 */
-	if (status & KERNEL_PANIC)
-		return -2;
+	if (status & KERNEL_PANIC) {
+		char * buffer = kmalloc(512, GFP_KERNEL);
+		struct POSTSTATUS {
+			u32 Post_Command;
+			u32 Post_Address;
+		} * post = kmalloc(sizeof(struct POSTSTATUS), GFP_KERNEL);
+		dma_addr_t paddr = pci_map_single(dev->pdev, post, sizeof(struct POSTSTATUS), 2);
+		dma_addr_t baddr = pci_map_single(dev->pdev, buffer, 512, 1);
+		u32 status = -1;
+		int ret = -2;
+		memset(buffer, 0, 512);
+		post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS);
+		post->Post_Address = cpu_to_le32(baddr);
+		rx_writel(dev, MUnit.IMRx[0], cpu_to_le32(paddr));
+		rx_sync_cmd(dev, COMMAND_POST_RESULTS, baddr, &status);
+		pci_unmap_single(dev->pdev, paddr, sizeof(struct POSTSTATUS), 2);
+		kfree(post);
+		if ((buffer[0] == '0') && (buffer[1] == 'x')) {
+			ret = (buffer[2] <= '9') ? (buffer[2] - '0') : (buffer[2] - 'A' + 10);
+			ret <<= 4;
+			ret += (buffer[3] <= '9') ? (buffer[3] - '0') : (buffer[3] - 'A' + 10);
+		}
+		pci_unmap_single(dev->pdev, baddr, 512, 1);
+		kfree(buffer);
+		return ret;
+	}
 	/*
-	 *	Wait for the adapter to be up and running. Wait up to 3 minutes
+	 *	Wait for the adapter to be up and running.
 	 */
 	if (!(status & KERNEL_UP_AND_RUNNING))
 		return -3;
@@ -359,21 +384,19 @@
 /**
  *	aac_rx_init	-	initialize an i960 based AAC card
  *	@dev: device to configure
- *	@devnum: adapter number
  *
  *	Allocate and set up resources for the i960 based AAC variants. The 
  *	device_interface in the commregion will be allocated and linked 
  *	to the comm region.
  */
 
-int aac_rx_init(struct aac_dev *dev, unsigned long num)
+int aac_rx_init(struct aac_dev *dev)
 {
 	unsigned long start;
 	unsigned long status;
 	int instance;
 	const char * name;
 
-	dev->devnum = num;
 	instance = dev->id;
 	name     = dev->name;
 
@@ -388,28 +411,36 @@
 	/*
 	 *	Check to see if the board failed any self tests.
 	 */
-	if (rx_readl(dev, IndexRegs.Mailbox[7]) & SELF_TEST_FAILED) {
+	if (rx_readl(dev, MUnit.OMRx[0]) & SELF_TEST_FAILED) {
 		printk(KERN_ERR "%s%d: adapter self-test failed.\n", dev->name, instance);
-		return -1;
+		goto error_iounmap;
 	}
 	/*
 	 *	Check to see if the board panic'd while booting.
 	 */
-	if (rx_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_PANIC) {
-		printk(KERN_ERR "%s%d: adapter kernel panic'd.\n", dev->name, instance);
-		return -1;
+	if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC) {
+		printk(KERN_ERR "%s%d: adapter kernel panic.\n", dev->name, instance);
+		goto error_iounmap;
+	}
+	/*
+	 *	Check to see if the monitor panic'd while booting.
+	 */
+	if (rx_readl(dev, MUnit.OMRx[0]) & MONITOR_PANIC) {
+		printk(KERN_ERR "%s%d: adapter monitor panic.\n", dev->name, instance);
+		goto error_iounmap;
 	}
 	start = jiffies;
 	/*
 	 *	Wait for the adapter to be up and running. Wait up to 3 minutes
 	 */
-	while (!(rx_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_UP_AND_RUNNING)) 
+	while ((!(rx_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_UP_AND_RUNNING))
+		|| (!(rx_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING)))
 	{
 		if(time_after(jiffies, start+180*HZ))
 		{
 			status = rx_readl(dev, IndexRegs.Mailbox[7]) >> 16;
 			printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %ld.\n", dev->name, instance, status);
-			return -1;
+			goto error_iounmap;
 		}
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout(1);
@@ -417,7 +448,7 @@
 	if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) 
 	{
 		printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance);
-		return -1;
+		goto error_iounmap;
 	}
 	/*
 	 *	Fill in the function dispatch table.
@@ -430,15 +461,31 @@
 	dev->a_ops.adapter_check_health = aac_rx_check_health;
 
 	if (aac_init_adapter(dev) == NULL)
-		return -1;
+		goto error_irq;
 	/*
 	 *	Start any kernel threads needed
 	 */
 	dev->thread_pid = kernel_thread((int (*)(void *))aac_command_thread, dev, 0);
+	if(dev->thread_pid < 0)
+	{
+		printk(KERN_ERR "aacraid: Unable to create rx thread.\n");
+		goto error_kfree;
+	}
 	/*
 	 *	Tell the adapter that all is configured, and it can start
 	 *	accepting requests
 	 */
 	aac_rx_start_adapter(dev);
 	return 0;
+
+error_kfree:
+	kfree(dev->queues);
+
+error_irq:
+	free_irq(dev->scsi_host_ptr->irq, (void *)dev);
+
+error_iounmap:
+	iounmap(dev->regs.rx);
+
+	return -1;
 }
--- diff/drivers/scsi/aacraid/sa.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aacraid/sa.c	2004-07-01 21:32:41.000000000 +0100
@@ -38,6 +38,7 @@
 #include <linux/blkdev.h>
 #include <linux/delay.h>
 #include <linux/completion.h>
+#include <linux/time.h>
 #include <linux/interrupt.h>
 #include <asm/semaphore.h>
 
@@ -329,27 +330,24 @@
 	 *	Everything is OK
 	 */
 	return 0;
-} /* aac_sa_check_health */
+}
 
 /**
  *	aac_sa_init	-	initialize an ARM based AAC card
  *	@dev: device to configure
- *	@devnum: adapter number
  *
  *	Allocate and set up resources for the ARM based AAC variants. The 
  *	device_interface in the commregion will be allocated and linked 
  *	to the comm region.
  */
 
-int aac_sa_init(struct aac_dev *dev, unsigned long devnum)
+int aac_sa_init(struct aac_dev *dev)
 {
 	unsigned long start;
 	unsigned long status;
 	int instance;
 	const char *name;
 
-	dev->devnum = devnum;
-
 	dprintk(("PREINST\n"));
 	instance = dev->id;
 	name     = dev->name;
@@ -362,21 +360,21 @@
 	if((dev->regs.sa = (struct sa_registers *)ioremap((unsigned long)dev->scsi_host_ptr->base, 8192))==NULL)
 	{	
 		printk(KERN_WARNING "aacraid: unable to map ARM.\n" );
-		return -1;
+		goto error_iounmap;
 	}
 	/*
 	 *	Check to see if the board failed any self tests.
 	 */
 	if (sa_readl(dev, Mailbox7) & SELF_TEST_FAILED) {
 		printk(KERN_WARNING "%s%d: adapter self-test failed.\n", name, instance);
-		return -1;
+		goto error_iounmap;
 	}
 	/*
 	 *	Check to see if the board panic'd while booting.
 	 */
 	if (sa_readl(dev, Mailbox7) & KERNEL_PANIC) {
 		printk(KERN_WARNING "%s%d: adapter kernel panic'd.\n", name, instance);
-		return -1;
+		goto error_iounmap;
 	}
 	start = jiffies;
 	/*
@@ -386,7 +384,7 @@
 		if (time_after(jiffies, start+180*HZ)) {
 			status = sa_readl(dev, Mailbox7) >> 16;
 			printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %d.\n", name, instance, le32_to_cpu(status));
-			return -1;
+			goto error_iounmap;
 		}
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout(1);
@@ -395,7 +393,7 @@
 	dprintk(("ATIRQ\n"));
 	if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) {
 		printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", name, instance);
-		return -1;
+		goto error_iounmap;
 	}
 
 	/*
@@ -412,7 +410,7 @@
 	dprintk(("FUNCDONE\n"));
 
 	if(aac_init_adapter(dev) == NULL)
-		return -1;
+		goto error_irq;
 
 	dprintk(("NEWADAPTDONE\n"));
 	/*
@@ -421,7 +419,7 @@
 	dev->thread_pid = kernel_thread((int (*)(void *))aac_command_thread, dev, 0);
 	if (dev->thread_pid < 0) {
 		printk(KERN_ERR "aacraid: Unable to create command thread.\n");
-		return -1;
+		goto error_kfree;
 	}
 
 	/*
@@ -432,5 +430,17 @@
 	aac_sa_start_adapter(dev);
 	dprintk(("STARTED\n"));
 	return 0;
+
+
+error_kfree:
+	kfree(dev->queues);
+
+error_irq:
+	free_irq(dev->scsi_host_ptr->irq, (void *)dev);
+
+error_iounmap:
+	iounmap(dev->regs.sa);
+
+	return -1;
 }
 
--- diff/drivers/scsi/advansys.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/advansys.c	2004-07-01 21:32:41.000000000 +0100
@@ -1,4 +1,4 @@
-#define ASC_VERSION "3.3GJ"    /* AdvanSys Driver Version */
+#define ASC_VERSION "3.3K"    /* AdvanSys Driver Version */
 
 /*
  * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters
@@ -677,6 +677,11 @@
          1. change select_queue_depths to slave_configure
 	 2. make cmd_per_lun be sane again
 
+     3.3K [2004/06/24]:
+         1. continuing cleanup for lk 2.6 series
+         2. Fix problem in lk 2.6.7-bk2 that broke PCI wide cards
+         3. Fix problem that oopsed ISA cards
+
   I. Known Problems/Fix List (XXX)
 
      1. Need to add memory mapping workaround. Test the memory mapping.
@@ -756,27 +761,6 @@
 
 */
 
-
-/*
- * --- Linux Version
- */
-
-#ifndef LINUX_VERSION_CODE
-#include <linux/version.h>
-#endif /* LINUX_VERSION_CODE */
-
-/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
-#define ASC_LINUX_VERSION(V, P, S)    (((V) * 65536) + ((P) * 256) + (S))
-#define ASC_LINUX_KERNEL22 (LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
-#define ASC_LINUX_KERNEL24 (LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,4,0))
-
-/* Driver supported only in version 2.2 and version >= 2.4. */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,2,0) || \
-    (LINUX_VERSION_CODE > ASC_LINUX_VERSION(2,3,0) && \
-     LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
-#error "AdvanSys driver supported only in 2.2 and 2.4 or greater kernels."
-#endif
-
 /*
  * --- Linux Include Files
  */
@@ -801,13 +785,30 @@
 #include <linux/blkdev.h>
 #include <linux/stat.h>
 #include <linux/spinlock.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/dma.h>
 
-#include "scsi.h"
-#include "hosts.h"
+/* FIXME: (by jejb@steeleye.com) This warning is present for two
+ * reasons:
+ *
+ * 1) This driver badly needs converting to the correct driver model
+ *    probing API
+ *
+ * 2) Although all of the necessary command mapping places have the
+ * appropriate dma_map.. APIs, the driver still processes its internal
+ * queue using bus_to_virt() and virt_to_bus() which are illegal under
+ * the API.  The entire queue processing structure will need to be
+ * altered to fix this.
+ */
+#warning this driver is still not properly converted to the DMA API
+
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi.h>
+#include <scsi/scsi_host.h>
 #include "advansys.h"
 #ifdef CONFIG_PCI
 #include <linux/pci.h>
@@ -874,9 +875,6 @@
 
 typedef unsigned char uchar;
 
-#ifndef NULL
-#define NULL     (0)
-#endif
 #ifndef TRUE
 #define TRUE     (1)
 #endif
@@ -986,49 +984,6 @@
 #define ASC_MIN_SENSE_LEN   14
 #define ASC_MAX_CDB_LEN     12
 #define ASC_SCSI_RESET_HOLD_TIME_US  60
-#define SCSICMD_TestUnitReady     0x00
-#define SCSICMD_Rewind            0x01
-#define SCSICMD_Rezero            0x01
-#define SCSICMD_RequestSense      0x03
-#define SCSICMD_Format            0x04
-#define SCSICMD_FormatUnit        0x04
-#define SCSICMD_Read6             0x08
-#define SCSICMD_Write6            0x0A
-#define SCSICMD_Seek6             0x0B
-#define SCSICMD_Inquiry           0x12
-#define SCSICMD_Verify6           0x13
-#define SCSICMD_ModeSelect6       0x15
-#define SCSICMD_ModeSense6        0x1A
-#define SCSICMD_StartStopUnit     0x1B
-#define SCSICMD_LoadUnloadTape    0x1B
-#define SCSICMD_ReadCapacity      0x25
-#define SCSICMD_Read10            0x28
-#define SCSICMD_Write10           0x2A
-#define SCSICMD_Seek10            0x2B
-#define SCSICMD_Erase10           0x2C
-#define SCSICMD_WriteAndVerify10  0x2E
-#define SCSICMD_Verify10          0x2F
-#define SCSICMD_WriteBuffer       0x3B
-#define SCSICMD_ReadBuffer        0x3C
-#define SCSICMD_ReadLong          0x3E
-#define SCSICMD_WriteLong         0x3F
-#define SCSICMD_ReadTOC           0x43
-#define SCSICMD_ReadHeader        0x44
-#define SCSICMD_ModeSelect10      0x55
-#define SCSICMD_ModeSense10       0x5A
-
-/* Inquiry Data Peripheral Device Types */
-#define SCSI_TYPE_DASD     0x00
-#define SCSI_TYPE_SASD     0x01
-#define SCSI_TYPE_PRN      0x02
-#define SCSI_TYPE_PROC     0x03
-#define SCSI_TYPE_WORM     0x04
-#define SCSI_TYPE_CDROM    0x05
-#define SCSI_TYPE_SCANNER  0x06
-#define SCSI_TYPE_OPTMEM   0x07
-#define SCSI_TYPE_MED_CHG  0x08
-#define SCSI_TYPE_COMM     0x09
-#define SCSI_TYPE_UNKNOWN  0x1F
 
 #define ADV_INQ_CLOCKING_ST_ONLY    0x0
 #define ADV_INQ_CLOCKING_DT_ONLY    0x1
@@ -1047,36 +1002,11 @@
 #define ASC_SCSIDIR_T2H      0x08
 #define ASC_SCSIDIR_H2T      0x10
 #define ASC_SCSIDIR_NODATA   0x18
-#define SCSI_SENKEY_NO_SENSE      0x00
-#define SCSI_SENKEY_UNDEFINED     0x01
-#define SCSI_SENKEY_NOT_READY     0x02
-#define SCSI_SENKEY_MEDIUM_ERR    0x03
-#define SCSI_SENKEY_HW_ERR        0x04
-#define SCSI_SENKEY_ILLEGAL       0x05
-#define SCSI_SENKEY_ATTENTION     0x06
-#define SCSI_SENKEY_PROTECTED     0x07
-#define SCSI_SENKEY_BLANK         0x08
-#define SCSI_SENKEY_V_UNIQUE      0x09
-#define SCSI_SENKEY_CPY_ABORT     0x0A
-#define SCSI_SENKEY_ABORT         0x0B
-#define SCSI_SENKEY_EQUAL         0x0C
-#define SCSI_SENKEY_VOL_OVERFLOW  0x0D
-#define SCSI_SENKEY_MISCOMP       0x0E
-#define SCSI_SENKEY_RESERVED      0x0F
 #define SCSI_ASC_NOMEDIA          0x3A
 #define ASC_SRB_HOST(x)  ((uchar)((uchar)(x) >> 4))
 #define ASC_SRB_TID(x)   ((uchar)((uchar)(x) & (uchar)0x0F))
 #define ASC_SRB_LUN(x)   ((uchar)((uint)(x) >> 13))
 #define PUT_CDB1(x)   ((uchar)((uint)(x) >> 8))
-#define SS_GOOD              0x00
-#define SS_CHK_CONDITION     0x02
-#define SS_CONDITION_MET     0x04
-#define SS_TARGET_BUSY       0x08
-#define SS_INTERMID          0x10
-#define SS_INTERMID_COND_MET 0x14
-#define SS_RSERV_CONFLICT    0x18
-#define SS_CMD_TERMINATED    0x22
-#define SS_QUEUE_FULL        0x28
 #define MS_CMD_DONE    0x00
 #define MS_EXTEND      0x01
 #define MS_SDTR_LEN    0x03
@@ -1085,26 +1015,6 @@
 #define MS_WDTR_CODE   0x03
 #define MS_MDP_LEN    0x05
 #define MS_MDP_CODE   0x00
-#define M1_SAVE_DATA_PTR        0x02
-#define M1_RESTORE_PTRS         0x03
-#define M1_DISCONNECT           0x04
-#define M1_INIT_DETECTED_ERR    0x05
-#define M1_ABORT                0x06
-#define M1_MSG_REJECT           0x07
-#define M1_NO_OP                0x08
-#define M1_MSG_PARITY_ERR       0x09
-#define M1_LINK_CMD_DONE        0x0A
-#define M1_LINK_CMD_DONE_WFLAG  0x0B
-#define M1_BUS_DVC_RESET        0x0C
-#define M1_ABORT_TAG            0x0D
-#define M1_CLR_QUEUE            0x0E
-#define M1_INIT_RECOVERY        0x0F
-#define M1_RELEASE_RECOVERY     0x10
-#define M1_KILL_IO_PROC         0x11
-#define M2_QTAG_MSG_SIMPLE      0x20
-#define M2_QTAG_MSG_HEAD        0x21
-#define M2_QTAG_MSG_ORDERED     0x22
-#define M2_IGNORE_WIDE_RESIDUE  0x23
 
 /*
  * Inquiry data structure and bitfield macros
@@ -1576,7 +1486,7 @@
     uchar               sdtr_period_offset[ASC_MAX_TID + 1];
     ushort              pci_slot_info;
     uchar               adapter_info[6];
-    struct pci_dev	*pci_dev;
+    struct device	*dev;
 } ASC_DVC_CFG;
 
 #define ASC_DEF_DVC_CNTL       0xFFFF
@@ -3082,7 +2992,7 @@
   ushort serial1;           /* EEPROM serial number word 1 */
   ushort serial2;           /* EEPROM serial number word 2 */
   ushort serial3;           /* EEPROM serial number word 3 */
-  struct pci_dev *pci_dev;  /* pointer to the pci dev structure for this board */
+  struct device *dev;  /* pointer to the pci dev structure for this board */
 } ADV_DVC_CFG;
 
 struct adv_dvc_var;
@@ -3581,19 +3491,6 @@
 
 #define NO_ISA_DMA              0xff        /* No ISA DMA Channel Used */
 
-/*
- * If the Linux kernel version supports freeing initialization code
- * and data after loading, define macros for this purpose. These macros
- * are not used when the driver is built as a module, cf. linux/init.h.
- */
-#if ASC_LINUX_KERNEL24
-#define ASC_INITFUNC(type, func)        type __init func
-#elif ASC_LINUX_KERNEL22
-#define ASC_INITFUNC(type, func)        __initfunc(type func)
-#endif
-#define ASC_INITDATA                    __initdata
-#define ASC_INIT                        __init
-
 #define ASC_INFO_SIZE           128            /* advansys_info() line size */
 
 #ifdef CONFIG_PROC_FS
@@ -3610,8 +3507,6 @@
         } \
         cp += len; \
     }
-
-#define ASC_MIN(a, b) (((a) < (b)) ? (a) : (b))
 #endif /* CONFIG_PROC_FS */
 
 /* Asc Library return codes */
@@ -3621,7 +3516,7 @@
 #define ASC_BUSY        0
 #define ASC_ERROR       (-1)
 
-/* Scsi_Cmnd function return codes */
+/* struct scsi_cmnd function return codes */
 #define STATUS_BYTE(byte)   (byte)
 #define MSG_BYTE(byte)      ((byte) << 8)
 #define HOST_BYTE(byte)     ((byte) << 16)
@@ -3638,7 +3533,7 @@
  *  REQPTIME(reqp) - reqp's time stamp value
  *  REQTIMESTAMP() - system time stamp value
  */
-typedef Scsi_Cmnd            REQ, *REQP;
+typedef struct scsi_cmnd     REQ, *REQP;
 #define REQPNEXT(reqp)       ((REQP) ((reqp)->host_scribble))
 #define REQPNEXTP(reqp)      ((REQP *) &((reqp)->host_scribble))
 #define REQPTID(reqp)        ((reqp)->device->id)
@@ -3685,53 +3580,6 @@
 /* Return non-zero, if the queue is empty. */
 #define ASC_QUEUE_EMPTY(ascq)    ((ascq)->q_tidmask == 0)
 
-/* PCI configuration declarations */
-
-#define PCI_BASE_CLASS_PREDEFINED               0x00
-#define PCI_BASE_CLASS_MASS_STORAGE             0x01
-#define PCI_BASE_CLASS_NETWORK                  0x02
-#define PCI_BASE_CLASS_DISPLAY                  0x03
-#define PCI_BASE_CLASS_MULTIMEDIA               0x04
-#define PCI_BASE_CLASS_MEMORY_CONTROLLER        0x05
-#define PCI_BASE_CLASS_BRIDGE_DEVICE            0x06
-
-/* MASS STORAGE */
-#define PCI_SUB_CLASS_SCSI_CONTROLLER           0x00
-#define PCI_SUB_CLASS_IDE_CONTROLLER            0x01
-#define PCI_SUB_CLASS_FLOPPY_DISK_CONTROLLER    0x02
-#define PCI_SUB_CLASS_IPI_BUS_CONTROLLER        0x03
-#define PCI_SUB_CLASS_OTHER_MASS_CONTROLLER     0x80
-
-/* NETWORK CONTROLLER */
-#define PCI_SUB_CLASS_ETHERNET_CONTROLLER       0x00
-#define PCI_SUB_CLASS_TOKEN_RING_CONTROLLER     0x01
-#define PCI_SUB_CLASS_FDDI_CONTROLLER           0x02
-#define PCI_SUB_CLASS_OTHER_NETWORK_CONTROLLER  0x80
-
-/* DISPLAY CONTROLLER */
-#define PCI_SUB_CLASS_VGA_CONTROLLER            0x00
-#define PCI_SUB_CLASS_XGA_CONTROLLER            0x01
-#define PCI_SUB_CLASS_OTHER_DISPLAY_CONTROLLER  0x80
-
-/* MULTIMEDIA CONTROLLER */
-#define PCI_SUB_CLASS_VIDEO_DEVICE              0x00
-#define PCI_SUB_CLASS_AUDIO_DEVICE              0x01
-#define PCI_SUB_CLASS_OTHER_MULTIMEDIA_DEVICE   0x80
-
-/* MEMORY CONTROLLER */
-#define PCI_SUB_CLASS_RAM_CONTROLLER            0x00
-#define PCI_SUB_CLASS_FLASH_CONTROLLER          0x01
-#define PCI_SUB_CLASS_OTHER_MEMORY_CONTROLLER   0x80
-
-/* BRIDGE CONTROLLER */
-#define PCI_SUB_CLASS_HOST_BRIDGE_CONTROLLER    0x00
-#define PCI_SUB_CLASS_ISA_BRIDGE_CONTROLLER     0x01
-#define PCI_SUB_CLASS_EISA_BRIDGE_CONTROLLER    0x02
-#define PCI_SUB_CLASS_MC_BRIDGE_CONTROLLER      0x03
-#define PCI_SUB_CLASS_PCI_TO_PCI_BRIDGE_CONTROLLER    0x04
-#define PCI_SUB_CLASS_PCMCIA_BRIDGE_CONTROLLER  0x05
-#define PCI_SUB_CLASS_OTHER_BRIDGE_CONTROLLER   0x80
-
 #define PCI_MAX_SLOT            0x1F
 #define PCI_MAX_BUS             0xFF
 #define PCI_IOADDRESS_MASK      0xFFFE
@@ -3744,25 +3592,6 @@
 #define ASC_PCI_DEVICE_ID_2500  0x2500  /* ASC-38C0800 */
 #define ASC_PCI_DEVICE_ID_2700  0x2700  /* ASC-38C1600 */
 
-/* PCI IO Port Addresses to generate special cycle */
-
-#define PCI_CONFIG_ADDRESS_MECH1          0x0CF8
-#define PCI_CONFIG_DATA_MECH1             0x0CFC
-
-#define PCI_CONFIG_FORWARD_REGISTER       0x0CFA    /* 0=type 0; 1=type 1; */
-
-#define PCI_CONFIG_BUS_NUMBER_MASK        0x00FF0000
-#define PCI_CONFIG_DEVICE_FUNCTION_MASK   0x0000FF00
-#define PCI_CONFIG_REGISTER_NUMBER_MASK   0x000000F8
-
-#define PCI_DEVICE_FOUND                0x0000
-#define PCI_DEVICE_NOT_FOUND            0xffff
-
-#define SUBCLASS_OFFSET         0x0A
-#define CLASSCODE_OFFSET        0x0B
-#define VENDORID_OFFSET         0x00
-#define DEVICEID_OFFSET         0x02
-
 #ifndef ADVANSYS_STATS
 #define ASC_STATS(shp, counter)
 #define ASC_STATS_ADD(shp, counter, count)
@@ -4019,7 +3848,7 @@
 typedef struct adv_req {
     ADV_SCSI_REQ_Q      scsi_req_q;   /* Adv Library request structure. */
     uchar               align[32];    /* Request structure padding. */
-    Scsi_Cmnd           *cmndp;       /* Mid-Level SCSI command pointer. */
+    struct scsi_cmnd	*cmndp;       /* Mid-Level SCSI command pointer. */
     adv_sgblk_t         *sgblkp;      /* Adv Library scatter-gather pointer. */
     struct adv_req      *next_reqp;   /* Next Request Structure. */
 } adv_req_t;
@@ -4047,7 +3876,7 @@
     asc_queue_t          waiting;               /* Waiting command queue */
     asc_queue_t          done;                  /* Done command queue */
     ADV_SCSI_BIT_ID_TYPE init_tidmask;          /* Target init./valid mask */
-    Scsi_Device          *device[ADV_MAX_TID+1]; /* Mid-Level Scsi Device */
+    struct scsi_device	*device[ADV_MAX_TID+1]; /* Mid-Level Scsi Device */
     ushort               reqcnt[ADV_MAX_TID+1]; /* Starvation request count */
     ADV_SCSI_BIT_ID_TYPE queue_full;            /* Queue full mask */
     ushort               queue_full_cnt[ADV_MAX_TID+1]; /* Queue full count */
@@ -4145,19 +3974,6 @@
 
 /* Note: All driver global data should be initialized. */
 
-#if ASC_LINUX_KERNEL22
-#ifdef CONFIG_PROC_FS
-struct proc_dir_entry proc_scsi_advansys =
-{
-    PROC_SCSI_ADVANSYS,              /* unsigned short low_ino */
-    8,                               /* unsigned short namelen */
-    "advansys",                      /* const char *name */
-    S_IFDIR | S_IRUGO | S_IXUGO,     /* mode_t mode */
-    2                                /* nlink_t nlink */
-};
-#endif /* CONFIG_PROC_FS */
-#endif /* ASC_LINUX_KERNEL22 */
-
 /* Number of boards detected in system. */
 STATIC int asc_board_count = 0;
 STATIC struct Scsi_Host    *asc_host[ASC_NUM_BOARD_SUPPORTED] = { 0 };
@@ -4172,7 +3988,7 @@
 STATIC ASC_SG_HEAD asc_sg_head = { 0 };
 
 /* List of supported bus types. */
-STATIC ushort asc_bus[ASC_NUM_BUS] ASC_INITDATA = {
+STATIC ushort asc_bus[ASC_NUM_BUS] __initdata = {
     ASC_IS_ISA,
     ASC_IS_VL,
     ASC_IS_EISA,
@@ -4209,12 +4025,12 @@
  */
 
 STATIC irqreturn_t advansys_interrupt(int, void *, struct pt_regs *);
-STATIC int	  advansys_slave_configure(Scsi_Device *);
-STATIC void       asc_scsi_done_list(Scsi_Cmnd *, int from_isr);
-STATIC int        asc_execute_scsi_cmnd(Scsi_Cmnd *);
-STATIC int        asc_build_req(asc_board_t *, Scsi_Cmnd *);
-STATIC int        adv_build_req(asc_board_t *, Scsi_Cmnd *, ADV_SCSI_REQ_Q **);
-STATIC int        adv_get_sglist(asc_board_t *, adv_req_t *, Scsi_Cmnd *);
+STATIC int	  advansys_slave_configure(struct scsi_device *);
+STATIC void       asc_scsi_done_list(struct scsi_cmnd *);
+STATIC int        asc_execute_scsi_cmnd(struct scsi_cmnd *);
+STATIC int        asc_build_req(asc_board_t *, struct scsi_cmnd *);
+STATIC int        adv_build_req(asc_board_t *, struct scsi_cmnd *, ADV_SCSI_REQ_Q **);
+STATIC int        adv_get_sglist(asc_board_t *, adv_req_t *, struct scsi_cmnd *, int);
 STATIC void       asc_isr_callback(ASC_DVC_VAR *, ASC_QDONE_INFO *);
 STATIC void       adv_isr_callback(ADV_DVC_VAR *, ADV_SCSI_REQ_Q *);
 STATIC void       adv_async_callback(ADV_DVC_VAR *, uchar);
@@ -4251,7 +4067,7 @@
 /* Debug function prototypes. */
 #ifdef ADVANSYS_DEBUG
 STATIC void         asc_prt_scsi_host(struct Scsi_Host *);
-STATIC void         asc_prt_scsi_cmnd(Scsi_Cmnd *);
+STATIC void         asc_prt_scsi_cmnd(struct scsi_cmnd *);
 STATIC void         asc_prt_asc_dvc_cfg(ASC_DVC_CFG *);
 STATIC void         asc_prt_asc_dvc_var(ASC_DVC_VAR *);
 STATIC void         asc_prt_asc_scsi_q(ASC_SCSI_Q *);
@@ -4505,10 +4321,8 @@
  * it must not call SCSI mid-level functions including scsi_malloc()
  * and scsi_free().
  */
-ASC_INITFUNC(
-int,
-advansys_detect(Scsi_Host_Template *tpnt)
-)
+int __init
+advansys_detect(struct scsi_host_template *tpnt)
 {
     static int          detect_called = ASC_FALSE;
     int                 iop;
@@ -4526,6 +4340,7 @@
     struct pci_dev      *pci_devicep[ASC_NUM_BOARD_SUPPORTED];
     int                 pci_card_cnt_max = 0;
     int                 pci_card_cnt = 0;
+    struct device	*dev = NULL;
     struct pci_dev      *pci_devp = NULL;
     int                 pci_device_id_cnt = 0;
     unsigned int        pci_device_id[ASC_PCI_DEVICE_ID_CNT] = {
@@ -4550,12 +4365,6 @@
 
     ASC_DBG(1, "advansys_detect: begin\n");
 
-#if ASC_LINUX_KERNEL24
-    tpnt->proc_name = "advansys";
-#elif ASC_LINUX_KERNEL22
-    tpnt->proc_dir = &proc_scsi_advansys;
-#endif
-
     asc_board_count = 0;
 
     /*
@@ -4681,13 +4490,9 @@
                             NULL) {
                             pci_device_id_cnt++;
                         } else {
-#if ASC_LINUX_KERNEL24
                             if (pci_enable_device(pci_devp) == 0) {
                                 pci_devicep[pci_card_cnt_max++] = pci_devp;
                             }
-#elif ASC_LINUX_KERNEL22
-                            pci_devicep[pci_card_cnt_max++] = pci_devp;
-#endif
                         }
                     }
 
@@ -4724,17 +4529,16 @@
                     ASC_DBG2(2,
                         "advansys_detect: devfn %d, bus number %d\n",
                         pci_devp->devfn, pci_devp->bus->number);
-#if ASC_LINUX_KERNEL24
                     iop = pci_resource_start(pci_devp, 0);
-#elif ASC_LINUX_KERNEL22
-                    iop = pci_devp->base_address[0] & PCI_IOADDRESS_MASK;
-#endif
                     ASC_DBG2(1,
                         "advansys_detect: vendorID %X, deviceID %X\n",
                         pci_devp->vendor, pci_devp->device);
                     ASC_DBG2(2, "advansys_detect: iop %X, irqLine %d\n",
                         iop, pci_devp->irq);
                 }
+		if(pci_devp)
+		    dev = &pci_devp->dev;
+
 #endif /* CONFIG_PCI */
                 break;
 
@@ -4765,7 +4569,7 @@
                 continue;
             }
 
-	    scsi_set_device(shp, &pci_devp->dev);
+	    scsi_set_device(shp, dev);
 
             /* Save a pointer to the Scsi_Host of each board found. */
             asc_host[asc_board_count++] = shp;
@@ -4849,11 +4653,7 @@
                     iolen = ADV_38C1600_IOLEN;
                 }
 #ifdef CONFIG_PCI
-#if ASC_LINUX_KERNEL24
                 pci_memory_address = pci_resource_start(pci_devp, 1);
-#elif ASC_LINUX_KERNEL22
-                pci_memory_address = pci_devp->base_address[1];
-#endif
                 ASC_DBG1(1, "advansys_detect: pci_memory_address: 0x%lx\n",
                     (ulong) pci_memory_address);
                 if ((boardp->ioremap_addr =
@@ -4904,7 +4704,8 @@
 #endif /* CONFIG_PROC_FS */
 
             if (ASC_NARROW_BOARD(boardp)) {
-                /*
+		asc_dvc_varp->cfg->dev = dev;
+		/*
                  * Set the board bus type and PCI IRQ before
                  * calling AscInitGetConfig().
                  */
@@ -4926,7 +4727,6 @@
 #ifdef CONFIG_PCI
                 case ASC_IS_PCI:
                     shp->irq = asc_dvc_varp->irq_no = pci_devp->irq;
-                    asc_dvc_varp->cfg->pci_dev = pci_devp;
                     asc_dvc_varp->cfg->pci_slot_info =
                         ASC_PCI_MKID(pci_devp->bus->number,
                             PCI_SLOT(pci_devp->devfn),
@@ -4944,13 +4744,13 @@
                     break;
                 }
             } else {
+                adv_dvc_varp->cfg->dev = dev;
                 /*
                  * For Wide boards set PCI information before calling
                  * AdvInitGetConfig().
                  */
 #ifdef CONFIG_PCI
                 shp->irq = adv_dvc_varp->irq_no = pci_devp->irq;
-                adv_dvc_varp->cfg->pci_dev = pci_devp;
                 adv_dvc_varp->cfg->pci_slot_info =
                     ASC_PCI_MKID(pci_devp->bus->number,
                         PCI_SLOT(pci_devp->devfn),
@@ -5321,11 +5121,7 @@
 
             /* BIOS start address. */
             if (ASC_NARROW_BOARD(boardp)) {
-#if ASC_LINUX_KERNEL24
                 shp->base =
-#elif ASC_LINUX_KERNEL22
-                shp->base = (char *)
-#endif
                         ((ulong) AscGetChipBiosAddress(
                             asc_dvc_varp->iop_base,
                             asc_dvc_varp->bus_type));
@@ -5360,11 +5156,7 @@
                      * Convert x86 realmode code segment to a linear
                      * address by shifting left 4.
                      */
-                    shp->base =
-#if ASC_LINUX_KERNEL22
-                        (char *)
-#endif
-                        ((ulong) boardp->bios_codeseg << 4);
+                    shp->base = ((ulong) boardp->bios_codeseg << 4);
                 } else {
                     shp->base = 0;
                 }
@@ -5385,7 +5177,6 @@
             ASC_DBG2(2,
                 "advansys_detect: request_region port 0x%lx, len 0x%x\n",
                 (ulong) shp->io_port, boardp->asc_n_io_port);
-#if ASC_LINUX_KERNEL24
             if (request_region(shp->io_port, boardp->asc_n_io_port,
                                "advansys") == NULL) {
                 ASC_PRINT3(
@@ -5398,9 +5189,6 @@
                 asc_board_count--;
                 continue;
             }
-#elif ASC_LINUX_KERNEL22
-            request_region(shp->io_port, boardp->asc_n_io_port, "advansys");
-#endif
 
             /* Register DMA Channel for Narrow boards. */
             shp->dma_channel = NO_ISA_DMA; /* Default to no ISA DMA. */
@@ -5810,12 +5598,12 @@
  * in the 'scp' result field.
  */
 int
-advansys_queuecommand(Scsi_Cmnd *scp, void (*done)(Scsi_Cmnd *))
+advansys_queuecommand(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *))
 {
     struct Scsi_Host    *shp;
     asc_board_t         *boardp;
     ulong               flags;
-    Scsi_Cmnd           *done_scp;
+    struct scsi_cmnd           *done_scp;
 
     shp = scp->device->host;
     boardp = ASC_BOARDP(shp);
@@ -5880,7 +5668,7 @@
     default:
         done_scp = asc_dequeue_list(&boardp->done, NULL, ASC_TID_ALL);
         /* Interrupts could be enabled here. */
-        asc_scsi_done_list(done_scp, 0);
+        asc_scsi_done_list(done_scp);
         break;
     }
     spin_unlock_irqrestore(&boardp->lock, flags);
@@ -5898,15 +5686,15 @@
  * required. Returns SUCCESS or FAILED.
  */
 int
-advansys_reset(Scsi_Cmnd *scp)
+advansys_reset(struct scsi_cmnd *scp)
 {
     struct Scsi_Host     *shp;
     asc_board_t          *boardp;
     ASC_DVC_VAR          *asc_dvc_varp;
     ADV_DVC_VAR          *adv_dvc_varp;
     ulong                flags;
-    Scsi_Cmnd            *done_scp = NULL, *last_scp = NULL;
-    Scsi_Cmnd            *tscp, *new_last_scp;
+    struct scsi_cmnd            *done_scp = NULL, *last_scp = NULL;
+    struct scsi_cmnd            *tscp, *new_last_scp;
     int                  status;
     int                  ret = SUCCESS;
 
@@ -6063,7 +5851,7 @@
      * Complete all the 'done_scp' requests.
      */
     if (done_scp != NULL) {
-        asc_scsi_done_list(done_scp, 0);
+        asc_scsi_done_list(done_scp);
     }
 
     ASC_DBG1(1, "advansys_reset: ret %d\n", ret);
@@ -6149,10 +5937,8 @@
  * ints[2] - second argument
  * ...
  */
-ASC_INITFUNC(
-void,
+void __init
 advansys_setup(char *str, int *ints)
-)
 {
     int    i;
 
@@ -6197,7 +5983,7 @@
  * --- Loadable Driver Support
  */
 
-static Scsi_Host_Template driver_template = {
+static struct scsi_host_template driver_template = {
     .proc_name                  = "advansys",
 #ifdef CONFIG_PROC_FS
     .proc_info                  = advansys_proc_info,
@@ -6247,8 +6033,8 @@
     ulong           flags;
     int             i;
     asc_board_t     *boardp;
-    Scsi_Cmnd       *done_scp = NULL, *last_scp = NULL;
-    Scsi_Cmnd       *new_last_scp;
+    struct scsi_cmnd       *done_scp = NULL, *last_scp = NULL;
+    struct scsi_cmnd       *new_last_scp;
     struct Scsi_Host *shp;
 
     ASC_DBG(1, "advansys_interrupt: begin\n");
@@ -6328,7 +6114,7 @@
      * Complete all requests on the done list.
      */
 
-    asc_scsi_done_list(done_scp, 1);
+    asc_scsi_done_list(done_scp);
 
     ASC_DBG(1, "advansys_interrupt: end\n");
     return IRQ_HANDLED;
@@ -6339,7 +6125,7 @@
  * specified host adapter.
  */
 STATIC int
-advansys_slave_configure(Scsi_Device *device)
+advansys_slave_configure(struct scsi_device *device)
 {
     asc_board_t        *boardp;
 
@@ -6374,23 +6160,38 @@
  * Interrupts can be enabled on entry.
  */
 STATIC void
-asc_scsi_done_list(Scsi_Cmnd *scp, int from_isr)
+asc_scsi_done_list(struct scsi_cmnd *scp)
 {
-    Scsi_Cmnd    *tscp;
-    ulong	  flags = 0;
+    struct scsi_cmnd    *tscp;
 
     ASC_DBG(2, "asc_scsi_done_list: begin\n");
     while (scp != NULL) {
+	asc_board_t *boardp;
+	struct device *dev;
+
         ASC_DBG1(3, "asc_scsi_done_list: scp 0x%lx\n", (ulong) scp);
         tscp = REQPNEXT(scp);
         scp->host_scribble = NULL;
+
+	boardp = ASC_BOARDP(scp->device->host);
+
+	if (ASC_NARROW_BOARD(boardp))
+	    dev = boardp->dvc_cfg.asc_dvc_cfg.dev;
+	else
+	    dev = boardp->dvc_cfg.adv_dvc_cfg.dev;
+
+	if (scp->use_sg)
+	    dma_unmap_sg(dev, (struct scatterlist *)scp->request_buffer,
+			 scp->use_sg, scp->sc_data_direction);
+	else if (scp->request_bufflen)
+	    dma_unmap_single(dev, scp->SCp.dma_handle,
+			     scp->request_bufflen, scp->sc_data_direction);
+
         ASC_STATS(scp->device->host, done);
         ASC_ASSERT(scp->scsi_done != NULL);
-	if (from_isr)
-	    spin_lock_irqsave(scp->device->host->host_lock, flags);
+
         scp->scsi_done(scp);
-	if (from_isr)
-	    spin_unlock_irqrestore(scp->device->host->host_lock, flags);
+
         scp = tscp;
     }
     ASC_DBG(2, "asc_scsi_done_list: done\n");
@@ -6431,7 +6232,7 @@
  *  host driver fields:
  *    SCp - Scsi_Pointer used for command processing status
  *    scsi_done - used to save caller's done function
- *    host_scribble - used for pointer to another Scsi_Cmnd
+ *    host_scribble - used for pointer to another struct scsi_cmnd
  *
  * If this function returns ASC_NOERROR the request has been enqueued
  * on the board's 'active' queue and will be completed from the
@@ -6444,13 +6245,13 @@
  * caller on the target's waiting queue and re-tried later.
  */
 STATIC int
-asc_execute_scsi_cmnd(Scsi_Cmnd *scp)
+asc_execute_scsi_cmnd(struct scsi_cmnd *scp)
 {
     asc_board_t        *boardp;
     ASC_DVC_VAR        *asc_dvc_varp;
     ADV_DVC_VAR        *adv_dvc_varp;
     ADV_SCSI_REQ_Q     *adv_scsiqp;
-    Scsi_Device        *device;
+    struct scsi_device *device;
     int                ret;
 
     ASC_DBG2(1, "asc_execute_scsi_cmnd: scp 0x%lx, done 0x%lx\n",
@@ -6617,8 +6418,10 @@
  * queue and return ASC_ERROR.
  */
 STATIC int
-asc_build_req(asc_board_t *boardp, Scsi_Cmnd *scp)
+asc_build_req(asc_board_t *boardp, struct scsi_cmnd *scp)
 {
+    struct device *dev = boardp->dvc_cfg.asc_dvc_cfg.dev;
+
     /*
      * Mutually exclusive access is required to 'asc_scsi_q' and
      * 'asc_sg_head' until after the request is started.
@@ -6626,7 +6429,7 @@
     memset(&asc_scsi_q, 0, sizeof(ASC_SCSI_Q));
 
     /*
-     * Point the ASC_SCSI_Q to the 'Scsi_Cmnd'.
+     * Point the ASC_SCSI_Q to the 'struct scsi_cmnd'.
      */
     asc_scsi_q.q2.srb_ptr = ASC_VADDR_TO_U32(scp);
 
@@ -6665,9 +6468,9 @@
      */
     if ((boardp->dvc_var.asc_dvc_var.cur_dvc_qng[scp->device->id] > 0) &&
         (boardp->reqcnt[scp->device->id] % 255) == 0) {
-        asc_scsi_q.q2.tag_code = M2_QTAG_MSG_ORDERED;
+        asc_scsi_q.q2.tag_code = MSG_ORDERED_TAG;
     } else {
-        asc_scsi_q.q2.tag_code = M2_QTAG_MSG_SIMPLE;
+        asc_scsi_q.q2.tag_code = MSG_SIMPLE_TAG;
     }
 
     /*
@@ -6679,8 +6482,10 @@
          * CDB request of single contiguous buffer.
          */
         ASC_STATS(scp->device->host, cont_cnt);
-        asc_scsi_q.q1.data_addr =
-            cpu_to_le32(virt_to_bus(scp->request_buffer));
+	scp->SCp.dma_handle = scp->request_bufflen ?
+	    dma_map_single(dev, scp->request_buffer,
+			   scp->request_bufflen, scp->sc_data_direction) : 0;
+	asc_scsi_q.q1.data_addr = cpu_to_le32(scp->SCp.dma_handle);
         asc_scsi_q.q1.data_cnt = cpu_to_le32(scp->request_bufflen);
         ASC_STATS_ADD(scp->device->host, cont_xfer,
                       ASC_CEILING(scp->request_bufflen, 512));
@@ -6691,12 +6496,17 @@
          * CDB scatter-gather request list.
          */
         int                     sgcnt;
+	int			use_sg;
         struct scatterlist      *slp;
 
-        if (scp->use_sg > scp->device->host->sg_tablesize) {
+	slp = (struct scatterlist *)scp->request_buffer;
+	use_sg = dma_map_sg(dev, slp, scp->use_sg, scp->sc_data_direction);
+
+	if (use_sg > scp->device->host->sg_tablesize) {
             ASC_PRINT3(
 "asc_build_req: board %d: use_sg %d > sg_tablesize %d\n",
-                boardp->id, scp->use_sg, scp->device->host->sg_tablesize);
+		boardp->id, use_sg, scp->device->host->sg_tablesize);
+	    dma_unmap_sg(dev, slp, scp->use_sg, scp->sc_data_direction);
             scp->result = HOST_BYTE(DID_ERROR);
             asc_enqueue(&boardp->done, scp, ASC_BACK);
             return ASC_ERROR;
@@ -6715,19 +6525,16 @@
         asc_scsi_q.q1.data_cnt = 0;
         asc_scsi_q.q1.data_addr = 0;
         /* This is a byte value, otherwise it would need to be swapped. */
-        asc_sg_head.entry_cnt = asc_scsi_q.q1.sg_queue_cnt = scp->use_sg;
+	asc_sg_head.entry_cnt = asc_scsi_q.q1.sg_queue_cnt = use_sg;
         ASC_STATS_ADD(scp->device->host, sg_elem, asc_sg_head.entry_cnt);
 
         /*
          * Convert scatter-gather list into ASC_SG_HEAD list.
          */
-        slp = (struct scatterlist *) scp->request_buffer;
-        for (sgcnt = 0; sgcnt < scp->use_sg; sgcnt++, slp++) {
-            asc_sg_head.sg_list[sgcnt].addr =
-                cpu_to_le32(virt_to_bus(
-		(unsigned char *)page_address(slp->page) + slp->offset));
-            asc_sg_head.sg_list[sgcnt].bytes = cpu_to_le32(slp->length);
-            ASC_STATS_ADD(scp->device->host, sg_xfer, ASC_CEILING(slp->length, 512));
+	for (sgcnt = 0; sgcnt < use_sg; sgcnt++, slp++) {
+	    asc_sg_head.sg_list[sgcnt].addr = cpu_to_le32(sg_dma_address(slp));
+	    asc_sg_head.sg_list[sgcnt].bytes = cpu_to_le32(sg_dma_len(slp));
+	    ASC_STATS_ADD(scp->device->host, sg_xfer, ASC_CEILING(sg_dma_len(slp), 512));
         }
     }
 
@@ -6748,13 +6555,14 @@
  * to little-endian order.
  */
 STATIC int
-adv_build_req(asc_board_t *boardp, Scsi_Cmnd *scp,
+adv_build_req(asc_board_t *boardp, struct scsi_cmnd *scp,
     ADV_SCSI_REQ_Q **adv_scsiqpp)
 {
     adv_req_t           *reqp;
     ADV_SCSI_REQ_Q      *scsiqp;
     int                 i;
     int                 ret;
+    struct device	*dev = boardp->dvc_cfg.adv_dvc_cfg.dev;
 
     /*
      * Allocate an adv_req_t structure from the board to execute
@@ -6786,7 +6594,7 @@
     scsiqp->srb_ptr = ASC_VADDR_TO_U32(reqp);
 
     /*
-     * Set the adv_req_t 'cmndp' to point to the Scsi_Cmnd structure.
+     * Set the adv_req_t 'cmndp' to point to the struct scsi_cmnd structure.
      */
     reqp->cmndp = scp;
 
@@ -6827,6 +6635,7 @@
      * Build ADV_SCSI_REQ_Q for a contiguous buffer or a scatter-gather
      * buffer command.
      */
+
     scsiqp->data_cnt = cpu_to_le32(scp->request_bufflen);
     scsiqp->vdata_addr = scp->request_buffer;
     scsiqp->data_addr = cpu_to_le32(virt_to_bus(scp->request_buffer));
@@ -6836,6 +6645,17 @@
          * CDB request of single contiguous buffer.
          */
         reqp->sgblkp = NULL;
+	scsiqp->data_cnt = cpu_to_le32(scp->request_bufflen);
+	if (scp->request_bufflen) {
+	    scsiqp->vdata_addr = scp->request_buffer;
+	    scp->SCp.dma_handle =
+	        dma_map_single(dev, scp->request_buffer,
+			       scp->request_bufflen, scp->sc_data_direction);
+	} else {
+	    scsiqp->vdata_addr = 0;
+	    scp->SCp.dma_handle = 0;
+	}
+	scsiqp->data_addr = cpu_to_le32(scp->SCp.dma_handle);
         scsiqp->sg_list_ptr = NULL;
         scsiqp->sg_real_addr = 0;
         ASC_STATS(scp->device->host, cont_cnt);
@@ -6845,10 +6665,17 @@
         /*
          * CDB scatter-gather request list.
          */
-        if (scp->use_sg > ADV_MAX_SG_LIST) {
+	struct scatterlist *slp;
+	int use_sg;
+
+	slp = (struct scatterlist *)scp->request_buffer;
+	use_sg = dma_map_sg(dev, slp, scp->use_sg, scp->sc_data_direction);
+
+	if (use_sg > ADV_MAX_SG_LIST) {
             ASC_PRINT3(
 "adv_build_req: board %d: use_sg %d > ADV_MAX_SG_LIST %d\n",
-                boardp->id, scp->use_sg, scp->device->host->sg_tablesize);
+		boardp->id, use_sg, scp->device->host->sg_tablesize);
+	    dma_unmap_sg(dev, slp, scp->use_sg, scp->sc_data_direction);
             scp->result = HOST_BYTE(DID_ERROR);
             asc_enqueue(&boardp->done, scp, ASC_BACK);
 
@@ -6862,7 +6689,7 @@
             return ASC_ERROR;
         }
 
-        if ((ret = adv_get_sglist(boardp, reqp, scp)) != ADV_SUCCESS) {
+	if ((ret = adv_get_sglist(boardp, reqp, scp, use_sg)) != ADV_SUCCESS) {
             /*
              * Free the adv_req_t structure by adding it back to the
              * board free list.
@@ -6874,7 +6701,7 @@
         }
 
         ASC_STATS(scp->device->host, sg_cnt);
-        ASC_STATS_ADD(scp->device->host, sg_elem, scp->use_sg);
+	ASC_STATS_ADD(scp->device->host, sg_elem, use_sg);
     }
 
     ASC_DBG_PRT_ADV_SCSI_REQ_Q(2, scsiqp);
@@ -6898,7 +6725,7 @@
  *      ADV_ERROR(-1) - SG List creation failed
  */
 STATIC int
-adv_get_sglist(asc_board_t *boardp, adv_req_t *reqp, Scsi_Cmnd *scp)
+adv_get_sglist(asc_board_t *boardp, adv_req_t *reqp, struct scsi_cmnd *scp, int use_sg)
 {
     adv_sgblk_t         *sgblkp;
     ADV_SCSI_REQ_Q      *scsiqp;
@@ -6910,7 +6737,7 @@
 
     scsiqp = (ADV_SCSI_REQ_Q *) ADV_32BALIGN(&reqp->scsi_req_q);
     slp = (struct scatterlist *) scp->request_buffer;
-    sg_elem_cnt = scp->use_sg;
+    sg_elem_cnt = use_sg;
     prev_sg_block = NULL;
     reqp->sgblkp = NULL;
 
@@ -6982,11 +6809,9 @@
 
         for (i = 0; i < NO_OF_SG_PER_BLOCK; i++)
         {
-            sg_block->sg_list[i].sg_addr =
-                cpu_to_le32(virt_to_bus(
-                   (unsigned char *)page_address(slp->page) + slp->offset));
-            sg_block->sg_list[i].sg_count = cpu_to_le32(slp->length);
-            ASC_STATS_ADD(scp->device->host, sg_xfer, ASC_CEILING(slp->length, 512));
+	    sg_block->sg_list[i].sg_addr = cpu_to_le32(sg_dma_address(slp));
+	    sg_block->sg_list[i].sg_count = cpu_to_le32(sg_dma_len(slp));
+	    ASC_STATS_ADD(scp->device->host, sg_xfer, ASC_CEILING(sg_dma_len(slp), 512));
 
             if (--sg_elem_cnt == 0)
             {   /* Last ADV_SG_BLOCK and scatter-gather entry. */
@@ -7012,7 +6837,7 @@
 asc_isr_callback(ASC_DVC_VAR *asc_dvc_varp, ASC_QDONE_INFO *qdonep)
 {
     asc_board_t         *boardp;
-    Scsi_Cmnd           *scp;
+    struct scsi_cmnd           *scp;
     struct Scsi_Host    *shp;
     int                 i;
 
@@ -7021,10 +6846,10 @@
     ASC_DBG_PRT_ASC_QDONE_INFO(2, qdonep);
 
     /*
-     * Get the Scsi_Cmnd structure and Scsi_Host structure for the
+     * Get the struct scsi_cmnd structure and Scsi_Host structure for the
      * command that has been completed.
      */
-    scp = (Scsi_Cmnd *) ASC_U32_TO_VADDR(qdonep->d2.srb_ptr);
+    scp = (struct scsi_cmnd *) ASC_U32_TO_VADDR(qdonep->d2.srb_ptr);
     ASC_DBG1(1, "asc_isr_callback: scp 0x%lx\n", (ulong) scp);
 
     if (scp == NULL) {
@@ -7079,14 +6904,13 @@
          * If an INQUIRY command completed successfully, then call
          * the AscInquiryHandling() function to set-up the device.
          */
-        if (scp->cmnd[0] == SCSICMD_Inquiry && scp->device->lun == 0 &&
+        if (scp->cmnd[0] == INQUIRY && scp->device->lun == 0 &&
             (scp->request_bufflen - qdonep->remain_bytes) >= 8)
         {
             AscInquiryHandling(asc_dvc_varp, scp->device->id & 0x7,
                 (ASC_SCSI_INQUIRY *) scp->request_buffer);
         }
 
-#if ASC_LINUX_KERNEL24
         /*
          * Check for an underrun condition.
          *
@@ -7099,15 +6923,14 @@
             (unsigned) qdonep->remain_bytes);
             scp->resid = qdonep->remain_bytes;
         }
-#endif
         break;
 
     case QD_WITH_ERROR:
         ASC_DBG(2, "asc_isr_callback: QD_WITH_ERROR\n");
         switch (qdonep->d3.host_stat) {
         case QHSTA_NO_ERROR:
-            if (qdonep->d3.scsi_stat == SS_CHK_CONDITION) {
-                ASC_DBG(2, "asc_isr_callback: SS_CHK_CONDITION\n");
+            if (qdonep->d3.scsi_stat == SAM_STAT_CHECK_CONDITION) {
+                ASC_DBG(2, "asc_isr_callback: SAM_STAT_CHECK_CONDITION\n");
                 ASC_DBG_PRT_SENSE(2, scp->sense_buffer,
                     sizeof(scp->sense_buffer));
                 /*
@@ -7161,7 +6984,7 @@
     }
 
     /*
-     * Because interrupts may be enabled by the 'Scsi_Cmnd' done
+     * Because interrupts may be enabled by the 'struct scsi_cmnd' done
      * function, add the command to the end of the board's done queue.
      * The done function for the command will be called from
      * advansys_interrupt().
@@ -7182,12 +7005,10 @@
     asc_board_t         *boardp;
     adv_req_t           *reqp;
     adv_sgblk_t         *sgblkp;
-    Scsi_Cmnd           *scp;
+    struct scsi_cmnd           *scp;
     struct Scsi_Host    *shp;
     int                 i;
-#if ASC_LINUX_KERNEL24
     ADV_DCNT            resid_cnt;
-#endif
 
 
     ASC_DBG2(1, "adv_isr_callback: adv_dvc_varp 0x%lx, scsiqp 0x%lx\n",
@@ -7207,7 +7028,7 @@
     }
 
     /*
-     * Get the Scsi_Cmnd structure and Scsi_Host structure for the
+     * Get the struct scsi_cmnd structure and Scsi_Host structure for the
      * command that has been completed.
      *
      * Note: The adv_req_t request structure and adv_sgblk_t structure,
@@ -7270,7 +7091,6 @@
         ASC_DBG(2, "adv_isr_callback: QD_NO_ERROR\n");
         scp->result = 0;
 
-#if ASC_LINUX_KERNEL24
         /*
          * Check for an underrun condition.
          *
@@ -7284,15 +7104,14 @@
                 (ulong) resid_cnt);
             scp->resid = resid_cnt;
         }
-#endif
         break;
 
     case QD_WITH_ERROR:
         ASC_DBG(2, "adv_isr_callback: QD_WITH_ERROR\n");
         switch (scsiqp->host_status) {
         case QHSTA_NO_ERROR:
-            if (scsiqp->scsi_status == SS_CHK_CONDITION) {
-                ASC_DBG(2, "adv_isr_callback: SS_CHK_CONDITION\n");
+            if (scsiqp->scsi_status == SAM_STAT_CHECK_CONDITION) {
+                ASC_DBG(2, "adv_isr_callback: SAM_STAT_CHECK_CONDITION\n");
                 ASC_DBG_PRT_SENSE(2, scp->sense_buffer,
                     sizeof(scp->sense_buffer));
                 /*
@@ -7344,7 +7163,7 @@
     }
 
     /*
-     * Because interrupts may be enabled by the 'Scsi_Cmnd' done
+     * Because interrupts may be enabled by the 'struct scsi_cmnd' done
      * function, add the command to the end of the board's done queue.
      * The done function for the command will be called from
      * advansys_interrupt().
@@ -7668,7 +7487,7 @@
 /*
  * Execute as many queued requests as possible for the specified queue.
  *
- * Calls asc_execute_scsi_cmnd() to execute a REQP/Scsi_Cmnd.
+ * Calls asc_execute_scsi_cmnd() to execute a REQP/struct scsi_cmnd.
  */
 STATIC void
 asc_execute_queue(asc_queue_t *ascq)
@@ -7688,7 +7507,7 @@
             if (scan_tidmask & ADV_TID_TO_TIDMASK(i)) {
                 if ((reqp = asc_dequeue(ascq, i)) == NULL) {
                     scan_tidmask &= ~ADV_TID_TO_TIDMASK(i);
-                } else if (asc_execute_scsi_cmnd((Scsi_Cmnd *) reqp)
+                } else if (asc_execute_scsi_cmnd((struct scsi_cmnd *) reqp)
                             == ASC_BUSY) {
                     scan_tidmask &= ~ADV_TID_TO_TIDMASK(i);
                     /*
@@ -8858,7 +8677,7 @@
             (unsigned) offset, (unsigned) advoffset, cplen);
     if (offset <= advoffset) {
         /* Read offset below current offset, copy everything. */
-        cnt = ASC_MIN(cplen, leftlen);
+        cnt = min(cplen, leftlen);
         ASC_DBG3(2, "asc_proc_copy: curbuf 0x%lx, cp 0x%lx, cnt %d\n",
                 (ulong) curbuf, (ulong) cp, cnt);
         memcpy(curbuf, cp, cnt);
@@ -8866,7 +8685,7 @@
         /* Read offset within current range, partial copy. */
         cnt = (advoffset + cplen) - offset;
         cp = (cp + cplen) - cnt;
-        cnt = ASC_MIN(cnt, leftlen);
+        cnt = min(cnt, leftlen);
         ASC_DBG3(2, "asc_proc_copy: curbuf 0x%lx, cp 0x%lx, cnt %d\n",
                 (ulong) curbuf, (ulong) cp, cnt);
         memcpy(curbuf, cp, cnt);
@@ -8899,7 +8718,7 @@
         (void) printk(s);
         ret = 0;
     } else {
-        ret = ASC_MIN(buflen, ret);
+        ret = min(buflen, ret);
         memcpy(buf, s, ret);
     }
     va_end(args);
@@ -9002,16 +8821,14 @@
 /*
  * Read a PCI configuration byte.
  */
-ASC_INITFUNC(
-STATIC uchar,
+STATIC uchar __init
 DvcReadPCIConfigByte(
         ASC_DVC_VAR *asc_dvc,
         ushort offset)
-)
 {
 #ifdef CONFIG_PCI
     uchar byte_data;
-    pci_read_config_byte(asc_dvc->cfg->pci_dev, offset, &byte_data);
+    pci_read_config_byte(to_pci_dev(asc_dvc->cfg->dev), offset, &byte_data);
     return byte_data;
 #else /* !defined(CONFIG_PCI) */
     return 0;
@@ -9021,16 +8838,14 @@
 /*
  * Write a PCI configuration byte.
  */
-ASC_INITFUNC(
-STATIC void,
+STATIC void __init
 DvcWritePCIConfigByte(
         ASC_DVC_VAR *asc_dvc,
         ushort offset,
         uchar  byte_data)
-)
 {
 #ifdef CONFIG_PCI
-    pci_write_config_byte(asc_dvc->cfg->pci_dev, offset, byte_data);
+    pci_write_config_byte(to_pci_dev(asc_dvc->cfg->dev), offset, byte_data);
 #endif /* CONFIG_PCI */
 }
 
@@ -9038,13 +8853,10 @@
  * Return the BIOS address of the adapter at the specified
  * I/O port and with the specified bus type.
  */
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscGetChipBiosAddress(
         PortAddr iop_base,
-        ushort bus_type
-)
-)
+        ushort bus_type)
 {
     ushort  cfg_lsw;
     ushort  bios_addr;
@@ -9119,16 +8931,14 @@
 /*
  * Read a PCI configuration byte.
  */
-ASC_INITFUNC(
-STATIC uchar,
+STATIC uchar __init
 DvcAdvReadPCIConfigByte(
         ADV_DVC_VAR *asc_dvc,
         ushort offset)
-)
 {
 #ifdef CONFIG_PCI
     uchar byte_data;
-    pci_read_config_byte(asc_dvc->cfg->pci_dev, offset, &byte_data);
+    pci_read_config_byte(to_pci_dev(asc_dvc->cfg->dev), offset, &byte_data);
     return byte_data;
 #else /* CONFIG_PCI */
     return 0;
@@ -9138,16 +8948,14 @@
 /*
  * Write a PCI configuration byte.
  */
-ASC_INITFUNC(
-STATIC void,
+STATIC void __init
 DvcAdvWritePCIConfigByte(
         ADV_DVC_VAR *asc_dvc,
         ushort offset,
         uchar  byte_data)
-)
 {
 #ifdef CONFIG_PCI
-    pci_write_config_byte(asc_dvc->cfg->pci_dev, offset, byte_data);
+    pci_write_config_byte(to_pci_dev(asc_dvc->cfg->dev), offset, byte_data);
 #else /* CONFIG_PCI */
     return 0;
 #endif /* CONFIG_PCI */
@@ -9358,16 +9166,6 @@
         s->host_busy, s->host_no,
         (unsigned) s->last_reset);
 
-#if ASC_LINUX_KERNEL24
-    printk(
-" hostt 0x%lx\n",
-        (ulong) s->hostt);
-#elif ASC_LINUX_KERNEL22
-    printk(
-" host_queue 0x%lx, hostt 0x%lx, block 0x%lx,\n",
-        (ulong) s->host_queue, (ulong) s->hostt, (ulong) s->block);
-#endif
-
     printk(
 " base 0x%lx, io_port 0x%lx, n_io_port %u, irq 0x%x,\n",
         (ulong) s->base, (ulong) s->io_port, s->n_io_port, s->irq);
@@ -9393,9 +9191,9 @@
  * asc_prt_scsi_cmnd()
  */
 STATIC void
-asc_prt_scsi_cmnd(Scsi_Cmnd *s)
+asc_prt_scsi_cmnd(struct scsi_cmnd *s)
 {
-    printk("Scsi_Cmnd at addr 0x%lx\n", (ulong) s);
+    printk("struct scsi_cmnd at addr 0x%lx\n", (ulong) s);
 
     printk(
 " host 0x%lx, device 0x%lx, target %u, lun %u, channel %u,\n",
@@ -9404,11 +9202,9 @@
 
     asc_prt_hex(" CDB", s->cmnd, s->cmd_len);
 
-#if ASC_LINUX_KERNEL24
     printk (
 "sc_data_direction %u, resid %d\n",
         s->sc_data_direction, s->resid);
-#endif
 
     printk(
 " use_sg %u, sglist_len %u, abort_reason 0x%x\n",
@@ -9423,15 +9219,7 @@
 " timeout_per_command %d, timeout_total %d, timeout %d\n",
         s->timeout_per_command, s->timeout_total, s->timeout);
 
-#if ASC_LINUX_KERNEL24
-    printk(
-" internal_timeout %u, flags %u\n",
-        s->internal_timeout, s->flags);
-#elif ASC_LINUX_KERNEL22
-    printk(
-" internal_timeout %u, flags %u, this_count %d\n",
-        s->internal_timeout, s->flags,s->this_count);
-#endif
+    printk(" internal_timeout %u\n", s->internal_timeout);
 
     printk(
 " scsi_done 0x%lx, done 0x%lx, host_scribble 0x%lx, result 0x%x\n",
@@ -9507,7 +9295,8 @@
 
     printk(
 " pci_device_id %d, lib_serial_no %u, lib_version %u, mcode_date 0x%x,\n",
-          h->pci_dev->device, h->lib_serial_no, h->lib_version, h->mcode_date);
+	   to_pci_dev(h->dev)->device, h->lib_serial_no, h->lib_version,
+	   h->mcode_date);
 
     printk(
 " mcode_version %d, overrun_buf 0x%lx\n",
@@ -9632,7 +9421,7 @@
 
     printk(
 "  mcode_version 0x%x, pci_device_id 0x%x, lib_version %u\n",
-       h->mcode_version, h->pci_dev->device, h->lib_version);
+       h->mcode_version, to_pci_dev(h->dev)->device, h->lib_version);
 
     printk(
 "  control_flag 0x%x, pci_slot_info 0x%x\n",
@@ -9787,12 +9576,9 @@
  * --- Asc Library Functions
  */
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscGetEisaChipCfg(
-                     PortAddr iop_base
-)
-)
+                     PortAddr iop_base)
 {
     PortAddr            eisa_cfg_iop;
 
@@ -9801,13 +9587,11 @@
     return (inpw(eisa_cfg_iop));
 }
 
-ASC_INITFUNC(
-STATIC uchar,
+STATIC uchar __init
 AscSetChipScsiID(
                     PortAddr iop_base,
                     uchar new_host_id
 )
-)
 {
     ushort              cfg_lsw;
 
@@ -9821,12 +9605,9 @@
     return (AscGetChipScsiID(iop_base));
 }
 
-ASC_INITFUNC(
-STATIC uchar,
+STATIC uchar __init
 AscGetChipScsiCtrl(
-                      PortAddr iop_base
-)
-)
+		PortAddr iop_base)
 {
     uchar               sc;
 
@@ -9836,13 +9617,11 @@
     return (sc);
 }
 
-ASC_INITFUNC(
-STATIC uchar,
+STATIC uchar __init
 AscGetChipVersion(
                      PortAddr iop_base,
                      ushort bus_type
 )
-)
 {
     if ((bus_type & ASC_IS_EISA) != 0) {
         PortAddr            eisa_iop;
@@ -9855,12 +9634,9 @@
     return (AscGetChipVerNo(iop_base));
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscGetChipBusType(
-                     PortAddr iop_base
-)
-)
+                     PortAddr iop_base)
 {
     ushort              chip_ver;
 
@@ -9940,22 +9716,19 @@
     return (0);
 }
 
-STATIC PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] ASC_INITDATA =
+STATIC PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] __initdata =
 {
     0x100, ASC_IOADR_1, 0x120, ASC_IOADR_2, 0x140, ASC_IOADR_3, ASC_IOADR_4,
     ASC_IOADR_5, ASC_IOADR_6, ASC_IOADR_7, ASC_IOADR_8
 };
 
 #ifdef CONFIG_ISA
-STATIC uchar _isa_pnp_inited ASC_INITDATA = 0;
+STATIC uchar _isa_pnp_inited __initdata = 0;
 
-ASC_INITFUNC(
-STATIC PortAddr,
+STATIC PortAddr __init
 AscSearchIOPortAddr(
                        PortAddr iop_beg,
-                       ushort bus_type
-)
-)
+                       ushort bus_type)
 {
     if (bus_type & ASC_IS_VL) {
         while ((iop_beg = AscSearchIOPortAddr11(iop_beg)) != 0) {
@@ -9986,12 +9759,10 @@
     return (0);
 }
 
-ASC_INITFUNC(
-STATIC PortAddr,
+STATIC PortAddr __init
 AscSearchIOPortAddr11(
                          PortAddr s_addr
 )
-)
 {
     int                 i;
     PortAddr            iop_base;
@@ -10017,11 +9788,8 @@
     return (0);
 }
 
-ASC_INITFUNC(
-STATIC void,
-AscSetISAPNPWaitForKey(
-    void)
-)
+STATIC void __init
+AscSetISAPNPWaitForKey(void)
 {
     outp(ASC_ISA_PNP_PORT_ADDR, 0x02);
     outp(ASC_ISA_PNP_PORT_WRITE, 0x02);
@@ -10029,25 +9797,20 @@
 }
 #endif /* CONFIG_ISA */
 
-ASC_INITFUNC(
-STATIC void,
+STATIC void __init
 AscToggleIRQAct(
                    PortAddr iop_base
 )
-)
 {
     AscSetChipStatus(iop_base, CIW_IRQ_ACT);
     AscSetChipStatus(iop_base, 0);
     return;
 }
 
-ASC_INITFUNC(
-STATIC uchar,
+STATIC uchar __init
 AscGetChipIRQ(
                  PortAddr iop_base,
-                 ushort bus_type
-)
-)
+                 ushort bus_type)
 {
     ushort              cfg_lsw;
     uchar               chip_irq;
@@ -10077,14 +9840,11 @@
     return ((uchar) (chip_irq + ASC_MIN_IRQ_NO));
 }
 
-ASC_INITFUNC(
-STATIC uchar,
+STATIC uchar __init
 AscSetChipIRQ(
                  PortAddr iop_base,
                  uchar irq_no,
-                 ushort bus_type
-)
-)
+                 ushort bus_type)
 {
     ushort              cfg_lsw;
 
@@ -10119,12 +9879,9 @@
 }
 
 #ifdef CONFIG_ISA
-ASC_INITFUNC(
-STATIC void,
+STATIC void __init
 AscEnableIsaDma(
-                   uchar dma_channel
-)
-)
+                   uchar dma_channel)
 {
     if (dma_channel < 4) {
         outp(0x000B, (ushort) (0xC0 | dma_channel));
@@ -10285,7 +10042,7 @@
             return (0);
         } else {
 
-            ext_msg.msg_type = M1_MSG_REJECT;
+            ext_msg.msg_type = MESSAGE_REJECT;
             AscMemWordCopyPtrToLram(iop_base,
                                  ASCV_MSGOUT_BEG,
                                  (uchar *) &ext_msg,
@@ -10385,7 +10142,7 @@
                              (ushort) ASCV_SCSIBUSY_B, scsi_busy);
             asc_dvc->queue_full_or_busy |= target_id;
 
-            if (scsi_status == SS_QUEUE_FULL) {
+            if (scsi_status == SAM_STAT_TASK_SET_FULL) {
                 if (cur_dvc_qng > ASC_MIN_TAGGED_CMD) {
                     cur_dvc_qng -= 1;
                     asc_dvc->max_dvc_qng[tid_no] = cur_dvc_qng;
@@ -10732,7 +10489,7 @@
             } else {
                 if ((AscReadLramByte(iop_base,
                           (ushort) (q_addr + (ushort) ASC_SCSIQ_CDB_BEG)) ==
-                     SCSICMD_StartStopUnit)) {
+                     START_STOP)) {
                     asc_dvc->unit_not_ready &= ~target_id;
                     if (scsiq->d3.done_stat != QD_NO_ERROR) {
                         asc_dvc->start_motor &= ~target_id;
@@ -11005,14 +10762,14 @@
 #define ASC_SYN_OFFSET_ONE_DISABLE_LIST  16
 STATIC uchar _syn_offset_one_disable_cmd[ASC_SYN_OFFSET_ONE_DISABLE_LIST] =
 {
-    SCSICMD_Inquiry,
-    SCSICMD_RequestSense,
-    SCSICMD_ReadCapacity,
-    SCSICMD_ReadTOC,
-    SCSICMD_ModeSelect6,
-    SCSICMD_ModeSense6,
-    SCSICMD_ModeSelect10,
-    SCSICMD_ModeSense10,
+    INQUIRY,
+    REQUEST_SENSE,
+    READ_CAPACITY,
+    READ_TOC,
+    MODE_SELECT,
+    MODE_SENSE,
+    MODE_SELECT_10,
+    MODE_SENSE_10,
     0xFF,
     0xFF,
     0xFF,
@@ -11065,7 +10822,7 @@
     target_ix = scsiq->q2.target_ix;
     tid_no = ASC_TIX_TO_TID(target_ix);
     n_q_required = 1;
-    if (scsiq->cdbptr[0] == SCSICMD_RequestSense) {
+    if (scsiq->cdbptr[0] == REQUEST_SENSE) {
         if ((asc_dvc->init_sdtr & scsiq->q1.target_id) != 0) {
             asc_dvc->sdtr_done &= ~scsiq->q1.target_id;
             sdtr_data = AscGetMCodeInitSDTRAtID(iop_base, tid_no);
@@ -11134,7 +10891,7 @@
         }
     }
     if (disable_syn_offset_one_fix) {
-        scsiq->q2.tag_code &= ~M2_QTAG_MSG_SIMPLE;
+        scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG;
         scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX |
                                ASC_TAG_FLAG_DISABLE_DISCONNECT);
     } else {
@@ -11143,8 +10900,8 @@
     if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) {
         if (asc_dvc->bug_fix_cntl) {
             if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_IF_NOT_DWB) {
-                if ((scsi_cmd == SCSICMD_Read6) ||
-                    (scsi_cmd == SCSICMD_Read10)) {
+                if ((scsi_cmd == READ_6) ||
+                    (scsi_cmd == READ_10)) {
                     addr =
                         (ADV_PADDR) le32_to_cpu(
                             sg_head->sg_list[sg_entry_cnt_minus_one].addr) +
@@ -11193,8 +10950,8 @@
     } else {
         if (asc_dvc->bug_fix_cntl) {
             if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_IF_NOT_DWB) {
-                if ((scsi_cmd == SCSICMD_Read6) ||
-                    (scsi_cmd == SCSICMD_Read10)) {
+                if ((scsi_cmd == READ_6) ||
+                    (scsi_cmd == READ_10)) {
                     addr = le32_to_cpu(scsiq->q1.data_addr) +
                         le32_to_cpu(scsiq->q1.data_cnt);
                     extra_bytes = (uchar) ((ushort) addr & 0x0003);
@@ -11365,7 +11122,7 @@
     }
     q_addr = ASC_QNO_TO_QADDR(q_no);
     if ((scsiq->q1.target_id & asc_dvc->use_tagged_qng) == 0) {
-        scsiq->q2.tag_code &= ~M2_QTAG_MSG_SIMPLE;
+        scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG ;
     }
     scsiq->q1.status = QS_FREE;
     AscMemWordCopyPtrToLram(iop_base,
@@ -11862,12 +11619,9 @@
 }
 
 #ifdef CONFIG_ISA
-ASC_INITFUNC(
-STATIC ASC_DCNT,
+STATIC ASC_DCNT __init
 AscGetEisaProductID(
-                       PortAddr iop_base
-)
-)
+                       PortAddr iop_base)
 {
     PortAddr            eisa_iop;
     ushort              product_id_high, product_id_low;
@@ -11881,12 +11635,9 @@
     return (product_id);
 }
 
-ASC_INITFUNC(
-STATIC PortAddr,
+STATIC PortAddr __init
 AscSearchIOPortAddrEISA(
-                           PortAddr iop_base
-)
-)
+                           PortAddr iop_base)
 {
     ASC_DCNT            eisa_product_id;
 
@@ -12080,12 +11831,9 @@
     return (AscIsChipHalted(iop_base));
 }
 
-ASC_INITFUNC(
-STATIC ASC_DCNT,
+STATIC ASC_DCNT __init
 AscGetMaxDmaCount(
-                     ushort bus_type
-)
-)
+                     ushort bus_type)
 {
     if (bus_type & ASC_IS_ISA)
         return (ASC_MAX_ISA_DMA_COUNT);
@@ -12095,12 +11843,9 @@
 }
 
 #ifdef CONFIG_ISA
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscGetIsaDmaChannel(
-                       PortAddr iop_base
-)
-)
+                       PortAddr iop_base)
 {
     ushort              channel;
 
@@ -12112,13 +11857,10 @@
     return (channel + 4);
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscSetIsaDmaChannel(
                        PortAddr iop_base,
-                       ushort dma_channel
-)
-)
+                       ushort dma_channel)
 {
     ushort              cfg_lsw;
     uchar               value;
@@ -12136,13 +11878,10 @@
     return (0);
 }
 
-ASC_INITFUNC(
-STATIC uchar,
+STATIC uchar __init
 AscSetIsaDmaSpeed(
                      PortAddr iop_base,
-                     uchar speed_value
-)
-)
+                     uchar speed_value)
 {
     speed_value &= 0x07;
     AscSetBank(iop_base, 1);
@@ -12151,12 +11890,10 @@
     return (AscGetIsaDmaSpeed(iop_base));
 }
 
-ASC_INITFUNC(
-STATIC uchar,
+STATIC uchar __init
 AscGetIsaDmaSpeed(
                      PortAddr iop_base
 )
-)
 {
     uchar               speed_value;
 
@@ -12168,12 +11905,10 @@
 }
 #endif /* CONFIG_ISA */
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscReadPCIConfigWord(
     ASC_DVC_VAR *asc_dvc,
     ushort pci_config_offset)
-)
 {
     uchar       lsb, msb;
 
@@ -12182,12 +11917,10 @@
     return ((ushort) ((msb << 8) | lsb));
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscInitGetConfig(
         ASC_DVC_VAR *asc_dvc
 )
-)
 {
     ushort              warn_code;
     PortAddr            iop_base;
@@ -12267,12 +12000,10 @@
     return(warn_code);
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscInitSetConfig(
                     ASC_DVC_VAR *asc_dvc
 )
-)
 {
     ushort              warn_code = 0;
 
@@ -12288,12 +12019,10 @@
     return (warn_code);
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscInitFromAscDvcVar(
                         ASC_DVC_VAR *asc_dvc
 )
-)
 {
     PortAddr            iop_base;
     ushort              cfg_msw;
@@ -12301,7 +12030,10 @@
     ushort              pci_device_id;
 
     iop_base = asc_dvc->iop_base;
-    pci_device_id = asc_dvc->cfg->pci_dev->device;
+    if (asc_dvc->cfg->dev)
+        pci_device_id = to_pci_dev(asc_dvc->cfg->dev)->device;
+    else
+	pci_device_id = 0;
     warn_code = 0;
     cfg_msw = AscGetChipCfgMsw(iop_base);
     if ((cfg_msw & ASC_CFG_MSW_CLR_MASK) != 0) {
@@ -12393,12 +12125,9 @@
     return (warn_code);
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscInitAscDvcVar(
-                    ASC_DVC_VAR *asc_dvc
-)
-)
+                    ASC_DVC_VAR *asc_dvc)
 {
     int                 i;
     PortAddr            iop_base;
@@ -12508,12 +12237,8 @@
     return (warn_code);
 }
 
-ASC_INITFUNC(
-STATIC ushort,
-AscInitFromEEP(
-                  ASC_DVC_VAR *asc_dvc
-)
-)
+STATIC ushort __init
+AscInitFromEEP(ASC_DVC_VAR *asc_dvc)
 {
     ASCEEP_CONFIG       eep_config_buf;
     ASCEEP_CONFIG       *eep_config;
@@ -12729,12 +12454,9 @@
     return (warn_code);
 }
 
-ASC_INITFUNC(
-STATIC int,
+STATIC int __init
 AscTestExternalLram(
-                       ASC_DVC_VAR *asc_dvc
-)
-)
+                       ASC_DVC_VAR *asc_dvc)
 {
     PortAddr            iop_base;
     ushort              q_addr;
@@ -12756,13 +12478,11 @@
     return (sta);
 }
 
-ASC_INITFUNC(
-STATIC int,
+STATIC int __init
 AscWriteEEPCmdReg(
                      PortAddr iop_base,
                      uchar cmd_reg
 )
-)
 {
     uchar               read_back;
     int                 retry;
@@ -12781,13 +12501,11 @@
     }
 }
 
-ASC_INITFUNC(
-STATIC int,
+STATIC int __init
 AscWriteEEPDataReg(
                       PortAddr iop_base,
                       ushort data_reg
 )
-)
 {
     ushort              read_back;
     int                 retry;
@@ -12806,35 +12524,24 @@
     }
 }
 
-ASC_INITFUNC(
-STATIC void,
-AscWaitEEPRead(
-                  void
-)
-)
+STATIC void __init
+AscWaitEEPRead(void)
 {
     DvcSleepMilliSecond(1);
     return;
 }
 
-ASC_INITFUNC(
-STATIC void,
-AscWaitEEPWrite(
-                   void
-)
-)
+STATIC void __init
+AscWaitEEPWrite(void)
 {
     DvcSleepMilliSecond(20);
     return;
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscReadEEPWord(
                   PortAddr iop_base,
-                  uchar addr
-)
-)
+                  uchar addr)
 {
     ushort              read_wval;
     uchar               cmd_reg;
@@ -12849,14 +12556,11 @@
     return (read_wval);
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscWriteEEPWord(
                    PortAddr iop_base,
                    uchar addr,
-                   ushort word_val
-)
-)
+                   ushort word_val)
 {
     ushort              read_wval;
 
@@ -12876,13 +12580,10 @@
     return (read_wval);
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AscGetEEPConfig(
                    PortAddr iop_base,
-                   ASCEEP_CONFIG * cfg_buf, ushort bus_type
-)
-)
+                   ASCEEP_CONFIG * cfg_buf, ushort bus_type)
 {
     ushort              wval;
     ushort              sum;
@@ -12928,13 +12629,10 @@
     return (sum);
 }
 
-ASC_INITFUNC(
-STATIC int,
+STATIC int __init
 AscSetEEPConfigOnce(
                        PortAddr iop_base,
-                       ASCEEP_CONFIG * cfg_buf, ushort bus_type
-)
-)
+                       ASCEEP_CONFIG * cfg_buf, ushort bus_type)
 {
     int                 n_error;
     ushort              *wbuf;
@@ -13026,13 +12724,11 @@
     return (n_error);
 }
 
-ASC_INITFUNC(
-STATIC int,
+STATIC int __init
 AscSetEEPConfig(
                    PortAddr iop_base,
                    ASCEEP_CONFIG * cfg_buf, ushort bus_type
 )
-)
 {
     int            retry;
     int            n_error;
@@ -13066,17 +12762,17 @@
     {
         if (!(asc_dvc->init_sdtr & tid_bits))
         {
-            if ((dvc_type == SCSI_TYPE_CDROM) &&
+            if ((dvc_type == TYPE_ROM) &&
                 (AscCompareString((uchar *) inq->vendor_id,
                     (uchar *) "HP ", 3) == 0))
             {
                 asc_dvc->pci_fix_asyn_xfer_always |= tid_bits;
             }
             asc_dvc->pci_fix_asyn_xfer |= tid_bits;
-            if ((dvc_type == SCSI_TYPE_PROC) ||
-                (dvc_type == SCSI_TYPE_SCANNER) ||
-                (dvc_type == SCSI_TYPE_CDROM) ||
-                (dvc_type == SCSI_TYPE_SASD))
+            if ((dvc_type == TYPE_PROCESSOR) ||
+                (dvc_type == TYPE_SCANNER) ||
+                (dvc_type == TYPE_ROM) ||
+                (dvc_type == TYPE_TAPE))
             {
                 asc_dvc->pci_fix_asyn_xfer &= ~tid_bits;
             }
@@ -14470,7 +14166,7 @@
  * unswapped on big-endian platforms.
  */
 STATIC ADVEEP_3550_CONFIG
-Default_3550_EEPROM_Config ASC_INITDATA = {
+Default_3550_EEPROM_Config __initdata = {
     ADV_EEPROM_BIOS_ENABLE,     /* cfg_lsw */
     0x0000,                     /* cfg_msw */
     0xFFFF,                     /* disc_enable */
@@ -14508,7 +14204,7 @@
 };
 
 STATIC ADVEEP_3550_CONFIG
-ADVEEP_3550_Config_Field_IsChar ASC_INITDATA = {
+ADVEEP_3550_Config_Field_IsChar __initdata = {
     0,                          /* cfg_lsw */
     0,                          /* cfg_msw */
     0,                          /* -disc_enable */
@@ -14546,7 +14242,7 @@
 };
 
 STATIC ADVEEP_38C0800_CONFIG
-Default_38C0800_EEPROM_Config ASC_INITDATA = {
+Default_38C0800_EEPROM_Config __initdata = {
     ADV_EEPROM_BIOS_ENABLE,     /* 00 cfg_lsw */
     0x0000,                     /* 01 cfg_msw */
     0xFFFF,                     /* 02 disc_enable */
@@ -14611,7 +14307,7 @@
 };
 
 STATIC ADVEEP_38C0800_CONFIG
-ADVEEP_38C0800_Config_Field_IsChar ASC_INITDATA = {
+ADVEEP_38C0800_Config_Field_IsChar __initdata = {
     0,                          /* 00 cfg_lsw */
     0,                          /* 01 cfg_msw */
     0,                          /* 02 disc_enable */
@@ -14676,7 +14372,7 @@
 };
 
 STATIC ADVEEP_38C1600_CONFIG
-Default_38C1600_EEPROM_Config ASC_INITDATA = {
+Default_38C1600_EEPROM_Config __initdata = {
     ADV_EEPROM_BIOS_ENABLE,     /* 00 cfg_lsw */
     0x0000,                     /* 01 cfg_msw */
     0xFFFF,                     /* 02 disc_enable */
@@ -14741,7 +14437,7 @@
 };
 
 STATIC ADVEEP_38C1600_CONFIG
-ADVEEP_38C1600_Config_Field_IsChar ASC_INITDATA = {
+ADVEEP_38C1600_Config_Field_IsChar __initdata = {
     0,                          /* 00 cfg_lsw */
     0,                          /* 01 cfg_msw */
     0,                          /* 02 disc_enable */
@@ -14813,10 +14509,8 @@
  * For a non-fatal error return a warning code. If there are no warnings
  * then 0 is returned.
  */
-ASC_INITFUNC(
-STATIC int,
+STATIC int __init
 AdvInitGetConfig(ADV_DVC_VAR *asc_dvc)
-)
 {
     ushort      warn_code;
     AdvPortAddr iop_base;
@@ -16800,10 +16494,8 @@
  *
  * Note: Chip is stopped on entry.
  */
-ASC_INITFUNC(
-STATIC int,
+STATIC int __init
 AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc)
-)
 {
     AdvPortAddr         iop_base;
     ushort              warn_code;
@@ -16974,10 +16666,8 @@
  *
  * Note: Chip is stopped on entry.
  */
-ASC_INITFUNC(
-STATIC int,
+STATIC int __init
 AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc)
-)
 {
     AdvPortAddr              iop_base;
     ushort                   warn_code;
@@ -17209,10 +16899,8 @@
  *
  * Note: Chip is stopped on entry.
  */
-ASC_INITFUNC(
-STATIC int,
+STATIC int __init
 AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc)
-)
 {
     AdvPortAddr              iop_base;
     ushort                   warn_code;
@@ -17477,10 +17165,8 @@
  *
  * Return a checksum based on the EEPROM configuration read.
  */
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AdvGet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf)
-)
 {
     ushort              wval, chksum;
     ushort              *wbuf;
@@ -17525,11 +17211,9 @@
  *
  * Return a checksum based on the EEPROM configuration read.
  */
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AdvGet38C0800EEPConfig(AdvPortAddr iop_base,
                        ADVEEP_38C0800_CONFIG *cfg_buf)
-)
 {
     ushort              wval, chksum;
     ushort              *wbuf;
@@ -17574,11 +17258,9 @@
  *
  * Return a checksum based on the EEPROM configuration read.
  */
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AdvGet38C1600EEPConfig(AdvPortAddr iop_base,
                        ADVEEP_38C1600_CONFIG *cfg_buf)
-)
 {
     ushort              wval, chksum;
     ushort              *wbuf;
@@ -17621,10 +17303,8 @@
 /*
  * Read the EEPROM from specified location
  */
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort __init
 AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr)
-)
 {
     AdvWriteWordRegister(iop_base, IOPW_EE_CMD,
         ASC_EEP_CMD_READ | eep_word_addr);
@@ -17635,10 +17315,8 @@
 /*
  * Wait for EEPROM command to complete
  */
-ASC_INITFUNC(
-STATIC void,
+STATIC void __init
 AdvWaitEEPCmd(AdvPortAddr iop_base)
-)
 {
     int eep_delay_ms;
 
@@ -18290,7 +17968,7 @@
          * the device, otherwise may erroneously set *_able bits.
          */
         if (scsiq->done_status == QD_NO_ERROR &&
-            scsiq->cdb[0] == SCSICMD_Inquiry &&
+            scsiq->cdb[0] == INQUIRY &&
             scsiq->target_lun == 0 &&
             (scsiq->cdb[1] & ADV_INQ_RTN_VPD_AND_CMDDT)
                 == ADV_INQ_RTN_STD_INQUIRY_DATA)
--- diff/drivers/scsi/advansys.h	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/advansys.h	2004-07-01 21:32:41.000000000 +0100
@@ -47,14 +47,14 @@
 /*
  * Scsi_Host_Template function prototypes.
  */
-int advansys_detect(Scsi_Host_Template *);
+int advansys_detect(struct scsi_host_template *);
 int advansys_release(struct Scsi_Host *);
 const char *advansys_info(struct Scsi_Host *);
-int advansys_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
-int advansys_reset(Scsi_Cmnd *);
+int advansys_queuecommand(struct scsi_cmnd *, void (* done)(struct scsi_cmnd *));
+int advansys_reset(struct scsi_cmnd *);
 int advansys_biosparam(struct scsi_device *, struct block_device *,
 		sector_t, int[]);
-static int advansys_slave_configure(Scsi_Device *);
+static int advansys_slave_configure(struct scsi_device *);
 
 /* init/main.c setup function */
 void advansys_setup(char *, int *);
--- diff/drivers/scsi/aha152x.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aha152x.c	2004-07-01 21:32:42.000000000 +0100
@@ -257,7 +257,7 @@
 #include <scsi/scsicam.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "aha152x.h"
 
 
--- diff/drivers/scsi/aha1542.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/aha1542.c	2004-07-01 21:32:42.000000000 +0100
@@ -47,7 +47,7 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "aha1542.h"
 
 #define SCSI_BUF_PA(address)	isa_virt_to_bus(address)
--- diff/drivers/scsi/aha1740.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/aha1740.c	2004-07-01 21:32:42.000000000 +0100
@@ -56,7 +56,7 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "aha1740.h"
 
 /* IF YOU ARE HAVING PROBLEMS WITH THIS DRIVER, AND WANT TO WATCH
--- diff/drivers/scsi/aic7xxx/aic79xx_osm.h	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/aic7xxx/aic79xx_osm.h	2004-07-01 21:32:42.000000000 +0100
@@ -68,7 +68,7 @@
 /* Core SCSI definitions */
 #define AIC_LIB_PREFIX ahd
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 /* Name space conflict with BSD queue macros */
 #ifdef LIST_HEAD
--- diff/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aic7xxx/aic7xxx_osm.c	2004-07-01 21:32:42.000000000 +0100
@@ -844,7 +844,6 @@
 {
 	struct	ahc_softc *ahc;
 	int     found = 0;
-	int	eisa_err, pci_err;
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 	/*
@@ -892,13 +891,10 @@
 	 */
 	ahc_list_lockinit();
 
-	pci_err = ahc_linux_pci_init();
-	eisa_err = ahc_linux_eisa_init();
-
-	if(pci_err && eisa_err)
-		goto out;
-
-
+	found = ahc_linux_pci_init();
+	if (!ahc_linux_eisa_init())
+		found++;
+	
 	/*
 	 * Register with the SCSI layer all
 	 * controllers we've found.
@@ -908,7 +904,6 @@
 		if (ahc_linux_register_host(ahc, template) == 0)
 			found++;
 	}
-out:
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 	spin_lock_irq(&io_request_lock);
--- diff/drivers/scsi/aic7xxx/aic7xxx_osm.h	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aic7xxx/aic7xxx_osm.h	2004-07-01 21:32:42.000000000 +0100
@@ -85,7 +85,7 @@
 /* Core SCSI definitions */
 #define AIC_LIB_PREFIX ahc
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 /* Name space conflict with BSD queue macros */
 #ifdef LIST_HEAD
@@ -940,7 +940,7 @@
 }
 #else
 static inline int ahc_linux_pci_init(void) {
-	return -ENODEV;
+	return 0;
 }
 static inline void ahc_linux_pci_exit(void) {
 }
--- diff/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	2004-07-01 21:32:42.000000000 +0100
@@ -198,7 +198,8 @@
 ahc_linux_pci_init(void)
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
-	return (pci_module_init(&aic7xxx_pci_driver));
+	/* Translate error or zero return into zero or one */
+	return pci_module_init(&aic7xxx_pci_driver) ? 0 : 1;
 #else
 	struct pci_dev *pdev;
 	u_int class;
--- diff/drivers/scsi/aic7xxx/aiclib.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/aic7xxx/aiclib.c	2004-07-01 21:32:42.000000000 +0100
@@ -36,7 +36,7 @@
 
 /* Core SCSI definitions */
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "aiclib.h"
 #include "cam.h"
 
--- diff/drivers/scsi/aic7xxx_old.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/aic7xxx_old.c	2004-07-01 21:32:42.000000000 +0100
@@ -239,7 +239,7 @@
 #include <linux/smp.h>
 #include <linux/interrupt.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "aic7xxx_old/aic7xxx.h"
 
 #include "aic7xxx_old/sequencer.h"
--- diff/drivers/scsi/amiga7xx.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/amiga7xx.c	2004-07-01 21:32:42.000000000 +0100
@@ -25,7 +25,7 @@
 #include <asm/irq.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "53c7xx.h"
 #include "amiga7xx.h"
 
--- diff/drivers/scsi/arm/acornscsi.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/arm/acornscsi.c	2004-07-01 21:32:42.000000000 +0100
@@ -150,7 +150,7 @@
 #include <asm/ecard.h>
 
 #include "../scsi.h"
-#include "../hosts.h"
+#include <scsi/scsi_host.h>
 #include "acornscsi.h"
 #include "msgqueue.h"
 #include "scsi.h"
--- diff/drivers/scsi/arm/arxescsi.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/arm/arxescsi.c	2004-07-01 21:32:42.000000000 +0100
@@ -37,7 +37,7 @@
 #include <asm/ecard.h>
 
 #include "../scsi.h"
-#include "../hosts.h"
+#include <scsi/scsi_host.h>
 #include "fas216.h"
 
 struct arxescsi_info {
--- diff/drivers/scsi/arm/cumana_1.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/arm/cumana_1.c	2004-07-01 21:32:42.000000000 +0100
@@ -17,7 +17,7 @@
 #include <asm/system.h>
 
 #include "../scsi.h"
-#include "../hosts.h"
+#include <scsi/scsi_host.h>
 
 #include <scsi/scsicam.h>
 
--- diff/drivers/scsi/arm/cumana_2.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/arm/cumana_2.c	2004-07-01 21:32:42.000000000 +0100
@@ -35,7 +35,7 @@
 #include <asm/pgtable.h>
 
 #include "../scsi.h"
-#include "../hosts.h"
+#include <scsi/scsi_host.h>
 #include "fas216.h"
 #include "scsi.h"
 
--- diff/drivers/scsi/arm/ecoscsi.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/arm/ecoscsi.c	2004-07-01 21:32:42.000000000 +0100
@@ -33,7 +33,7 @@
 #include <asm/system.h>
 
 #include "../scsi.h"
-#include "../hosts.h"
+#include <scsi/scsi_host.h>
 
 #define NCR5380_implementation_fields	int port, ctrl
 #define NCR5380_local_declare()		struct Scsi_Host *_instance
--- diff/drivers/scsi/arm/eesox.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/arm/eesox.c	2004-07-01 21:32:42.000000000 +0100
@@ -41,7 +41,7 @@
 #include <asm/pgtable.h>
 
 #include "../scsi.h"
-#include "../hosts.h"
+#include <scsi/scsi_host.h>
 #include "fas216.h"
 #include "scsi.h"
 
--- diff/drivers/scsi/arm/fas216.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/arm/fas216.c	2004-07-01 21:32:42.000000000 +0100
@@ -52,7 +52,7 @@
 #include <asm/ecard.h>
 
 #include "../scsi.h"
-#include "../hosts.h"
+#include <scsi/scsi_host.h>
 #include "fas216.h"
 #include "scsi.h"
 
--- diff/drivers/scsi/arm/oak.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/arm/oak.c	2004-07-01 21:32:42.000000000 +0100
@@ -17,7 +17,7 @@
 #include <asm/system.h>
 
 #include "../scsi.h"
-#include "../hosts.h"
+#include <scsi/scsi_host.h>
 
 #define AUTOSENSE
 /*#define PSEUDO_DMA*/
--- diff/drivers/scsi/arm/powertec.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/arm/powertec.c	2004-07-01 21:32:42.000000000 +0100
@@ -26,7 +26,7 @@
 #include <asm/pgtable.h>
 
 #include "../scsi.h"
-#include "../hosts.h"
+#include <scsi/scsi_host.h>
 #include "fas216.h"
 #include "scsi.h"
 
--- diff/drivers/scsi/ata_piix.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/ata_piix.c	2004-07-01 21:32:42.000000000 +0100
@@ -57,6 +57,7 @@
 	ich5_pata		= 0,
 	ich5_sata		= 1,
 	piix4_pata		= 2,
+	ich6_sata		= 3,
 };
 
 static int piix_init_one (struct pci_dev *pdev,
@@ -91,10 +92,8 @@
 	 * and enhanced mode, with queueing and other fancy stuff.
 	 * This is distinguished by PCI class code.
 	 */
-	{ 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID,
-	  PCI_CLASS_STORAGE_IDE << 8, 0xffff00, ich5_sata },
-	{ 0x8086, 0x2652, PCI_ANY_ID, PCI_ANY_ID,
-	  PCI_CLASS_STORAGE_IDE << 8, 0xffff00, ich5_sata },
+	{ 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
+	{ 0x8086, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
 
 	{ }	/* terminate list */
 };
@@ -138,7 +137,7 @@
 
 	.bmdma_setup		= ata_bmdma_setup_pio,
 	.bmdma_start		= ata_bmdma_start_pio,
-	.fill_sg		= ata_fill_sg,
+	.qc_prep		= ata_qc_prep,
 	.eng_timeout		= ata_eng_timeout,
 
 	.irq_handler		= ata_interrupt,
@@ -161,7 +160,7 @@
 
 	.bmdma_setup		= ata_bmdma_setup_pio,
 	.bmdma_start		= ata_bmdma_start_pio,
-	.fill_sg		= ata_fill_sg,
+	.qc_prep		= ata_qc_prep,
 	.eng_timeout		= ata_eng_timeout,
 
 	.irq_handler		= ata_interrupt,
@@ -199,6 +198,17 @@
 		.udma_mask	= ATA_UDMA_MASK_40C, /* FIXME: cbl det */
 		.port_ops	= &piix_pata_ops,
 	},
+
+	/* ich6_sata */
+	{
+		.sht		= &piix_sht,
+		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_SRST |
+				  PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR |
+				  ATA_FLAG_SLAVE_POSS,
+		.pio_mask	= 0x03,	/* pio3-4 */
+		.udma_mask	= 0x7f,	/* udma0-6 ; FIXME */
+		.port_ops	= &piix_sata_ops,
+	},
 };
 
 static struct pci_bits piix_enable_bits[] = {
@@ -327,13 +337,6 @@
 
 static void piix_sata_phy_reset(struct ata_port *ap)
 {
-	if (!pci_test_config_bits(ap->host_set->pdev,
-				  &piix_enable_bits[ap->port_no])) {
-		ata_port_disable(ap);
-		printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
-		return;
-	}
-
 	if (!piix_sata_probe(ap)) {
 		ata_port_disable(ap);
 		printk(KERN_INFO "ata%u: SATA port has no device.\n", ap->id);
--- diff/drivers/scsi/atari_scsi.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/atari_scsi.c	2004-07-01 21:32:42.000000000 +0100
@@ -102,7 +102,7 @@
 #include <asm/bitops.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "atari_scsi.h"
 #include "NCR5380.h"
 #include <asm/atari_stdma.h>
--- diff/drivers/scsi/atp870u.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/atp870u.c	2004-07-01 21:32:42.000000000 +0100
@@ -1,6 +1,4 @@
-/* $Id: atp870u.c,v 1.0 1997/05/07 15:22:00 root Exp root $
- *  linux/kernel/atp870u.c
- *
+/*
  *  Copyright (C) 1997	Wu Ching Chen
  *  2.1.x update (C) 1998  Krzysztof G. Baranowski
  *  2.5.x update (C) 2002  Red Hat <alan@redhat.com>
@@ -29,20 +27,19 @@
 #include <linux/spinlock.h>
 #include <linux/pci.h>
 #include <linux/blkdev.h>
-#include <linux/stat.h>
-
 #include <asm/system.h>
 #include <asm/io.h>
 
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+
 #include "atp870u.h"
 
-/*
- *   static const char RCSid[] = "$Header: /usr/src/linux/kernel/blk_drv/scsi/RCS/atp870u.c,v 1.0 1997/05/07 15:22:00 root Exp root $";
- */
+static struct scsi_host_template atp870u_template;
+static void send_s870(struct Scsi_Host *host);
 
-static unsigned short int sync_idu;
 
 static irqreturn_t atp870u_intr_handle(int irq, void *dev_id,
 					struct pt_regs *regs)
@@ -51,7 +48,7 @@
 	unsigned short int tmpcip, id;
 	unsigned char i, j, target_id, lun;
 	unsigned char *prd;
-	Scsi_Cmnd *workrequ;
+	struct scsi_cmnd *workrequ;
 	unsigned int workportu, tmport;
 	unsigned long adrcntu, k;
 	int errstus;
@@ -348,10 +345,18 @@
 			 *      Complete the command
 			 */
 			 
-			if(workrequ->use_sg)
-				pci_unmap_sg(dev->pdev, (struct scatterlist *)workrequ->buffer, workrequ->use_sg, scsi_to_pci_dma_dir(workrequ->sc_data_direction));
-			else if(workrequ->request_bufflen && workrequ->sc_data_direction != SCSI_DATA_NONE)
-				pci_unmap_single(dev->pdev, workrequ->SCp.dma_handle, workrequ->request_bufflen, scsi_to_pci_dma_dir(workrequ->sc_data_direction));
+			if (workrequ->use_sg) {
+				pci_unmap_sg(dev->pdev,
+					(struct scatterlist *)workrequ->buffer,
+					workrequ->use_sg,
+					workrequ->sc_data_direction);
+			} else if (workrequ->request_bufflen &&
+					workrequ->sc_data_direction != DMA_NONE) {
+				pci_unmap_single(dev->pdev,
+					workrequ->SCp.dma_handle,
+					workrequ->request_bufflen,
+					workrequ->sc_data_direction);
+			}
 			spin_lock_irqsave(dev->host->host_lock, flags);
 			(*workrequ->scsi_done) (workrequ);
 
@@ -456,7 +461,8 @@
  *	Queue a command to the ATP queue. Called with the host lock held.
  */
  
-static int atp870u_queuecommand(Scsi_Cmnd * req_p, void (*done) (Scsi_Cmnd *))
+static int atp870u_queuecommand(struct scsi_cmnd *req_p,
+		void (*done) (struct scsi_cmnd *))
 {
 	unsigned short int m;
 	unsigned int tmport;
@@ -533,7 +539,7 @@
 static void send_s870(struct Scsi_Host *host)
 {
 	unsigned int tmport;
-	Scsi_Cmnd *workrequ;
+	struct scsi_cmnd *workrequ;
 	unsigned int i;
 	unsigned char j, target_id;
 	unsigned char *prd;
@@ -648,7 +654,8 @@
 	if (workrequ->use_sg) {
 		l = 0;
 		sgpnt = (struct scatterlist *) workrequ->request_buffer;
-		sg_count = pci_map_sg(dev->pdev, sgpnt, workrequ->use_sg, scsi_to_pci_dma_dir(workrequ->sc_data_direction));
+		sg_count = pci_map_sg(dev->pdev, sgpnt, workrequ->use_sg,
+				workrequ->sc_data_direction);
 		for (i = 0; i < workrequ->use_sg; i++) {
 			if (sgpnt[i].length == 0 || workrequ->use_sg > ATP870U_SCATTER) {
 				panic("Foooooooood fight!");
@@ -656,7 +663,10 @@
 			l += sgpnt[i].length;
 		}
 	} else if(workrequ->request_bufflen && workrequ->sc_data_direction != PCI_DMA_NONE) {
-		workrequ->SCp.dma_handle = pci_map_single(dev->pdev, workrequ->request_buffer, workrequ->request_bufflen, scsi_to_pci_dma_dir(workrequ->sc_data_direction));
+		workrequ->SCp.dma_handle = pci_map_single(dev->pdev,
+				workrequ->request_buffer,
+				workrequ->request_bufflen,
+				workrequ->sc_data_direction);
 		l = workrequ->request_bufflen;
 	}
 	else l = 0;
@@ -678,7 +688,7 @@
 	/*
 	 *      Check transfer direction
 	 */
-	if (workrequ->sc_data_direction == SCSI_DATA_WRITE) {
+	if (workrequ->sc_data_direction == DMA_TO_DEVICE) {
 		outb((unsigned char) (j | 0x20), tmport++);
 	} else {
 		outb(j, tmport++);
@@ -770,7 +780,7 @@
 	}
 	tmport = workportu + 0x1c;
 
-	if (workrequ->sc_data_direction == SCSI_DATA_WRITE) {
+	if (workrequ->sc_data_direction == DMA_TO_DEVICE) {
 		dev->id[target_id].dirctu = 0x20;
 		if (inb(tmport) == 0) {
 			tmport = workportu + 0x18;
@@ -1089,7 +1099,6 @@
 	static unsigned char wide[6] = { 0x80, 1, 2, 3, 1, 0 };
 	struct atp_unit *dev = (struct atp_unit *)&host->hostdata;
 
-	sync_idu = 0;
 	tmport = wkport + 0x3a;
 	outb((unsigned char) (inb(tmport) | 0x10), tmport);
 
@@ -1583,7 +1592,6 @@
 	static unsigned char u3[9] = { 0x80, 1, 6, 4, 0x09, 00, 0x0e, 0x01, 0x02 };
 	struct atp_unit *dev = (struct atp_unit *)&host->hostdata;
 
-	sync_idu = 0;
 	lvdmode = inb(wkport + 0x3f) & 0x40;
 
 	for (i = 0; i < 16; i++) {
@@ -2262,7 +2270,7 @@
 		dev->sp[k] = 0x04;
 	}
 	return 0;
-}			
+}
 
 /* return non-zero on detection */
 static int atp870u_probe(struct pci_dev *dev, const struct pci_device_id *ent)
@@ -2555,10 +2563,10 @@
    it is available to be used again.  Until this gets worked out, we will
    leave it commented out.  */
 
-int atp870u_abort(Scsi_Cmnd * SCpnt)
+static int atp870u_abort(struct scsi_cmnd * SCpnt)
 {
 	unsigned char j, k;
-	Scsi_Cmnd *workrequ;
+	struct scsi_cmnd *workrequ;
 	unsigned int tmport;
 	struct atp_unit *dev = (struct atp_unit *)&SCpnt->device->host->hostdata;
 
@@ -2594,7 +2602,7 @@
 	return SUCCESS;
 }
 
-const char *atp870u_info(struct Scsi_Host *notused)
+static const char *atp870u_info(struct Scsi_Host *notused)
 {
 	static char buffer[128];
 
@@ -2603,13 +2611,9 @@
 	return buffer;
 }
 
-int atp870u_set_info(char *buffer, int length, struct Scsi_Host *HBAptr)
-{
-	return -ENOSYS;		/* Currently this is a no-op */
-}
-
 #define BLS buffer + len + size
-int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer, char **start, off_t offset, int length, int inout)
+static int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer,
+		char **start, off_t offset, int length, int inout)
 {
 	static u8 buff[512];
 	int size = 0;
@@ -2617,9 +2621,8 @@
 	off_t begin = 0;
 	off_t pos = 0;
 
-	if (inout == TRUE) {	/* Has data been written to the file? */
-		return (atp870u_set_info(buffer, length, HBAptr));
-	}
+	if (inout)
+		return -ENOSYS;
 	if (offset == 0) {
 		memset(buff, 0, sizeof(buff));
 	}
@@ -2679,7 +2682,7 @@
 
 MODULE_LICENSE("GPL");
 
-static Scsi_Host_Template atp870u_template = {
+static struct scsi_host_template atp870u_template = {
 	.module			= THIS_MODULE,
 	.name			= "atp870u",
 	.proc_name		= "atp870u",
@@ -2718,8 +2721,7 @@
 
 static int __init atp870u_init(void)
 {
-	pci_register_driver(&atp870u_driver);
-	return 0;
+	return pci_module_init(&atp870u_driver);
 }
 
 static void __exit atp870u_exit(void)
--- diff/drivers/scsi/atp870u.h	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/atp870u.h	2004-07-01 21:32:42.000000000 +0100
@@ -1,16 +1,6 @@
 #ifndef _ATP870U_H
 #define _ATP870U_H
 
-/* $Id: atp870u.h,v 1.0 1997/05/07 15:09:00 root Exp root $
-
- * Header file for the ACARD 870U/W driver for Linux
- *
- * $Log: atp870u.h,v $
- * Revision 1.0  1997/05/07  15:09:00  root
- * Initial revision
- *
- */
-
 #include <linux/types.h>
 
 /* I/O Port */
@@ -41,7 +31,7 @@
 	unsigned short deviceid;
 	unsigned char ata_cdbu[16];
 	unsigned char sp[16];
-	Scsi_Cmnd *querequ[qcnt];
+	struct scsi_cmnd *querequ[qcnt];
 	struct atp_id {
 		unsigned char dirctu;
 		unsigned char devspu;
@@ -52,20 +42,11 @@
 		unsigned char *prd_posu;
 		unsigned char *prd_tableu;
 		dma_addr_t prd_phys;
-		Scsi_Cmnd *curr_req;
+		struct scsi_cmnd *curr_req;
 	} id[16];
 	struct Scsi_Host *host;
 	struct pci_dev *pdev;
 	unsigned int unit;
 };
 
-static int atp870u_queuecommand(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
-static int atp870u_abort(Scsi_Cmnd *);
-static int atp870u_biosparam(struct scsi_device *, struct block_device *,
-		sector_t, int *);
-static void send_s870(struct Scsi_Host *);
-
-extern const char *atp870u_info(struct Scsi_Host *);
-static Scsi_Host_Template atp870u_template;
-
 #endif
--- diff/drivers/scsi/blz1230.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/blz1230.c	2004-07-01 21:32:42.000000000 +0100
@@ -28,7 +28,7 @@
 #include <linux/interrupt.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <linux/zorro.h>
--- diff/drivers/scsi/blz2060.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/blz2060.c	2004-07-01 21:32:42.000000000 +0100
@@ -28,7 +28,7 @@
 #include <linux/interrupt.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <linux/zorro.h>
--- diff/drivers/scsi/bvme6000.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/bvme6000.c	2004-07-01 21:32:42.000000000 +0100
@@ -17,7 +17,7 @@
 #include <asm/irq.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "53c7xx.h"
 #include "bvme6000.h"
 
--- diff/drivers/scsi/constants.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/constants.c	2004-07-01 21:32:42.000000000 +0100
@@ -6,13 +6,16 @@
  *   by D. Gilbert and aeb (20020609)
  */
 
-#include <linux/module.h>
-
 #include <linux/config.h>
 #include <linux/blkdev.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
-#include "scsi.h"
-#include "hosts.h"
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_request.h>
+
 
 #define CONST_COMMAND   0x01
 #define CONST_STATUS    0x02
@@ -154,7 +157,7 @@
 }
 #endif  
 
-void print_command (unsigned char *command) {
+void __scsi_print_command (unsigned char *command) {
     int i,s;
     print_opcode(command[0]);
     for ( i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i) 
@@ -173,7 +176,7 @@
  *	(e.g. "0x2" for Check Condition).
  **/
 void
-print_status(unsigned char scsi_status) {
+scsi_print_status(unsigned char scsi_status) {
 #if (CONSTANTS & CONST_STATUS)
 	const char * ccp;
 
@@ -1014,12 +1017,12 @@
 #endif
 }
 
-void print_sense(const char *devclass, struct scsi_cmnd *cmd)
+void scsi_print_sense(const char *devclass, struct scsi_cmnd *cmd)
 {
 	print_sense_internal(devclass, cmd->sense_buffer, cmd->request);
 }
 
-void print_req_sense(const char *devclass, struct scsi_request *sreq)
+void scsi_print_req_sense(const char *devclass, struct scsi_request *sreq)
 {
 	print_sense_internal(devclass, sreq->sr_sense_buffer, sreq->sr_request);
 }
@@ -1051,7 +1054,7 @@
 #define NO_EXTENDED_MSGS (sizeof(two_byte_msgs)  / sizeof (const char *))
 #endif /* (CONSTANTS & CONST_MSG) */
 
-int print_msg (const unsigned char *msg) {
+int scsi_print_msg (const unsigned char *msg) {
     int len = 0, i;
     if (msg[0] == EXTENDED_MESSAGE) {
 	len = 3 + msg[1];
@@ -1124,13 +1127,13 @@
     return len;
 }
 
-void print_Scsi_Cmnd(struct scsi_cmnd *cmd) {
+void scsi_print_command(struct scsi_cmnd *cmd) {
     printk("scsi%d : destination target %d, lun %d\n", 
 	   cmd->device->host->host_no, 
 	   cmd->device->id, 
 	   cmd->device->lun);
     printk("        command = ");
-    print_command(cmd->cmnd);
+    __scsi_print_command(cmd->cmnd);
 }
 
 #if (CONSTANTS & CONST_HOST)
@@ -1139,7 +1142,7 @@
 "DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
 "DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY", NULL};
 
-void print_hostbyte(int scsiresult)
+void scsi_print_hostbyte(int scsiresult)
 {   static int maxcode=0;
     int i;
    
@@ -1155,7 +1158,7 @@
     printk("(%s) ",hostbyte_table[host_byte(scsiresult)]);
 }
 #else
-void print_hostbyte(int scsiresult)
+void scsi_print_hostbyte(int scsiresult)
 {   printk("Hostbyte=0x%02x ",host_byte(scsiresult));
 }
 #endif
@@ -1170,7 +1173,7 @@
 unknown,unknown,unknown, "SUGGEST_SENSE",NULL};
 
 
-void print_driverbyte(int scsiresult)
+void scsi_print_driverbyte(int scsiresult)
 {   static int driver_max=0,suggest_max=0;
     int i,dr=driver_byte(scsiresult)&DRIVER_MASK, 
 	su=(driver_byte(scsiresult)&SUGGEST_MASK)>>4;
@@ -1187,7 +1190,7 @@
 	su<suggest_max ? driversuggest_table[su]:"invalid");
 }
 #else
-void print_driverbyte(int scsiresult)
+void scsi_print_driverbyte(int scsiresult)
 {   printk("Driverbyte=0x%02x ",driver_byte(scsiresult));
 }
 #endif
--- diff/drivers/scsi/cpqfcTScontrol.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/cpqfcTScontrol.c	2004-07-01 21:32:42.000000000 +0100
@@ -45,7 +45,7 @@
 #include <linux/spinlock.h>
 
 #include "scsi.h"
-#include "hosts.h"   // Scsi_Host definition for INT handler
+#include <scsi/scsi_host.h>   // Scsi_Host definition for INT handler
 #include "cpqfcTSchip.h"
 #include "cpqfcTSstructs.h"
 
--- diff/drivers/scsi/cpqfcTSinit.c	2004-05-19 22:12:08.000000000 +0100
+++ source/drivers/scsi/cpqfcTSinit.c	2004-07-01 21:32:42.000000000 +0100
@@ -51,7 +51,7 @@
 #include <asm/irq.h>
 #include <linux/spinlock.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
 #include "cpqfcTSchip.h"
 #include "cpqfcTSstructs.h"
@@ -1266,7 +1266,7 @@
 
 
 
-// The file "hosts.h" says not to call scsi_done from
+// The file <scsi/scsi_host.h> says not to call scsi_done from
 // inside _queuecommand, so we'll do it from the heartbeat timer
 // (clarification: Turns out it's ok to call scsi_done from queuecommand 
 // for cases that don't go to the hardware like scsi cmds destined
--- diff/drivers/scsi/cpqfcTSworker.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/cpqfcTSworker.c	2004-07-01 21:32:42.000000000 +0100
@@ -39,7 +39,7 @@
 #include <asm/dma.h>
 
 #include "scsi.h"
-#include "hosts.h"   // struct Scsi_Host definition for T handler
+#include <scsi/scsi_host.h>   // struct Scsi_Host definition for T handler
 #include "cpqfcTSchip.h"
 #include "cpqfcTSstructs.h"
 #include "cpqfcTStrigger.h"
--- diff/drivers/scsi/cyberstorm.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/cyberstorm.c	2004-07-01 21:32:42.000000000 +0100
@@ -31,7 +31,7 @@
 #include <linux/interrupt.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <linux/zorro.h>
--- diff/drivers/scsi/cyberstormII.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/cyberstormII.c	2004-07-01 21:32:42.000000000 +0100
@@ -27,7 +27,7 @@
 #include <linux/interrupt.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <linux/zorro.h>
--- diff/drivers/scsi/dc390.h	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/dc390.h	2004-07-01 21:32:42.000000000 +0100
@@ -14,12 +14,9 @@
 #define DC390_H
 
 #include <linux/version.h>
-#ifndef KERNEL_VERSION
-# define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-#endif
 
 #define DC390_BANNER "Tekram DC390/AM53C974"
-#define DC390_VERSION "2.1b 2004-04-13"
+#define DC390_VERSION "2.1d 2004-05-27"
 
 /* We don't have eh_abort_handler, eh_device_reset_handler, 
  * eh_bus_reset_handler, eh_host_reset_handler yet! 
@@ -32,14 +29,4 @@
 # define NEW_EH use_new_eh_code: 1,
 # define USE_NEW_EH
 #endif
-
-static int DC390_detect(Scsi_Host_Template *psht);
-static int DC390_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *));
-static int DC390_abort(Scsi_Cmnd *cmd);
-static int DC390_reset(Scsi_Cmnd *cmd);
-static int DC390_bios_param(struct scsi_device *sdev, struct block_device *dev,
-		sector_t capacity, int geom[]);
-
-static int DC390_release(struct Scsi_Host *);
-
 #endif /* DC390_H */
--- diff/drivers/scsi/dc395x.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/dc395x.c	2004-07-01 21:32:42.000000000 +0100
@@ -51,16 +51,20 @@
 #include <linux/delay.h>
 #include <linux/ctype.h>
 #include <linux/blkdev.h>
-#include <asm/io.h>
-#include "scsi.h"
-#include "hosts.h"
-#include "dc395x.h"
-#include <scsi/scsicam.h>	/* needed for scsicam_bios_param */
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/pci.h>
 #include <linux/list.h>
+#include <asm/io.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsicam.h>	/* needed for scsicam_bios_param */
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+
+#include "dc395x.h"
 
 #define DC395X_NAME	"dc395x"
 #define DC395X_BANNER	"Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040"
@@ -222,7 +226,7 @@
 struct ScsiReqBlk {
 	struct list_head list;		/* next/prev ptrs for srb lists */
 	struct DeviceCtlBlk *dcb;
-	Scsi_Cmnd *cmd;
+	struct scsi_cmnd *cmd;
 
 	struct SGentry *segment_x;	/* Linear array of hw sg entries (up to 64 entries) */
 	u32 sg_bus_addr;	        /* Bus address of sg list (ie, of segment_x) */
@@ -372,10 +376,10 @@
 static void reselect(struct AdapterCtlBlk *acb);
 static u8 start_scsi(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
 		struct ScsiReqBlk *srb);
-static void build_srb(Scsi_Cmnd *cmd, struct DeviceCtlBlk *dcb,
+static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb,
 		struct ScsiReqBlk *srb);
 static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_code,
-		Scsi_Cmnd *cmd, u8 force);
+		struct scsi_cmnd *cmd, u8 force);
 static void scsi_reset_detect(struct AdapterCtlBlk *acb);
 static void pci_unmap_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb);
 static void pci_unmap_srb_sense(struct AdapterCtlBlk *acb,
@@ -738,7 +742,7 @@
 
 
 /* Find cmd in SRB list */
-inline static struct ScsiReqBlk *find_cmd(Scsi_Cmnd *cmd, 
+inline static struct ScsiReqBlk *find_cmd(struct scsi_cmnd *cmd, 
 		struct list_head *head)
 {
 	struct ScsiReqBlk *i;
@@ -973,10 +977,10 @@
 
 
 /* Prepare SRB for being sent to Device DCB w/ command *cmd */
-static void build_srb(Scsi_Cmnd *cmd, struct DeviceCtlBlk *dcb,
+static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb,
 		struct ScsiReqBlk *srb)
 {
-	int dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+	enum dma_data_direction dir = cmd->sc_data_direction;
 	dprintkdbg(DBG_0, "build_srb: (pid#%li) <%02i-%i>\n",
 		cmd->pid, dcb->target_id, dcb->target_lun);
 
@@ -1089,7 +1093,7 @@
  *        and is expected to be held on return.
  *
  **/
-static int dc395x_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
+static int dc395x_queue_command(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
 {
 	struct DeviceCtlBlk *dcb;
 	struct ScsiReqBlk *srb;
@@ -1304,7 +1308,7 @@
  * @cmd - some command for this host (for fetching hooks)
  * Returns: SUCCESS (0x2002) on success, else FAILED (0x2003).
  */
-static int dc395x_eh_bus_reset(Scsi_Cmnd *cmd)
+static int dc395x_eh_bus_reset(struct scsi_cmnd *cmd)
 {
 	struct AdapterCtlBlk *acb =
 		(struct AdapterCtlBlk *)cmd->device->host->hostdata;
@@ -1356,7 +1360,7 @@
  * @cmd - command to be aborted
  * Returns: SUCCESS (0x2002) on success, else FAILED (0x2003).
  */
-static int dc395x_eh_abort(Scsi_Cmnd *cmd)
+static int dc395x_eh_abort(struct scsi_cmnd *cmd)
 {
 	/*
 	 * Look into our command queues: If it has not been sent already,
@@ -1939,7 +1943,7 @@
 {
 	u8 idx;
 	struct scatterlist *sg;
-	Scsi_Cmnd *cmd = srb->cmd;
+	struct scsi_cmnd *cmd = srb->cmd;
 	int segment = cmd->use_sg;
 	u32 xferred = srb->total_xfer_length - left; /* bytes transfered */
 	struct SGentry *psge = srb->segment_x + srb->sg_index;
@@ -3249,8 +3253,8 @@
 /* unmap mapped pci regions from SRB */
 static void pci_unmap_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb)
 {
-	Scsi_Cmnd *cmd = srb->cmd;
-	int dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+	struct scsi_cmnd *cmd = srb->cmd;
+	enum dma_data_direction dir = cmd->sc_data_direction;
 	if (cmd->use_sg && dir != PCI_DMA_NONE) {
 		/* unmap DC395x SG list */
 		dprintkdbg(DBG_SG, "pci_unmap_srb: list=%08x(%05x)\n",
@@ -3301,11 +3305,10 @@
 		struct ScsiReqBlk *srb)
 {
 	u8 tempcnt, status;
-	Scsi_Cmnd *cmd = srb->cmd;
+	struct scsi_cmnd *cmd = srb->cmd;
 	struct ScsiInqData *ptr;
-	int dir;
+	enum dma_data_direction dir = cmd->sc_data_direction;
 
-	dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
 	if (cmd->use_sg) {
 		struct scatterlist* sg = (struct scatterlist *)cmd->request_buffer;
 		ptr = (struct ScsiInqData *)(page_address(sg->page) + sg->offset);
@@ -3510,7 +3513,7 @@
 
 /* abort all cmds in our queues */
 static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_flag,
-		Scsi_Cmnd *cmd, u8 force)
+		struct scsi_cmnd *cmd, u8 force)
 {
 	struct DeviceCtlBlk *dcb;
 	dprintkl(KERN_INFO, "doing_srb_done: pids ");
@@ -3518,14 +3521,14 @@
 	list_for_each_entry(dcb, &acb->dcb_list, list) {
 		struct ScsiReqBlk *srb;
 		struct ScsiReqBlk *tmp;
-		Scsi_Cmnd *p;
+		struct scsi_cmnd *p;
 
 		list_for_each_entry_safe(srb, tmp, &dcb->srb_going_list, list) {
+			enum dma_data_direction dir;
 			int result;
-			int dir;
 
 			p = srb->cmd;
-			dir = scsi_to_pci_dma_dir(p->sc_data_direction);
+			dir = p->sc_data_direction;
 			result = MK_RES(0, did_flag, 0, 0);
 			printk("G:%li(%02i-%i) ", p->pid,
 			       p->device->id, p->device->lun);
@@ -3665,7 +3668,7 @@
 static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
 		struct ScsiReqBlk *srb)
 {
-	Scsi_Cmnd *cmd = srb->cmd;
+	struct scsi_cmnd *cmd = srb->cmd;
 	dprintkdbg(DBG_1, "request_sense: (pid#%li) <%02i-%i>\n",
 		cmd->pid, cmd->device->id, cmd->device->lun);
 
@@ -4738,7 +4741,7 @@
 }
 
 
-static Scsi_Host_Template dc395x_driver_template = {
+static struct scsi_host_template dc395x_driver_template = {
 	.module                 = THIS_MODULE,
 	.proc_name              = DC395X_NAME,
 	.proc_info              = dc395x_proc_info,
--- diff/drivers/scsi/dec_esp.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/dec_esp.c	2004-07-01 21:32:42.000000000 +0100
@@ -29,7 +29,7 @@
 #include <linux/stat.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <asm/irq.h>
--- diff/drivers/scsi/dmx3191d.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/dmx3191d.c	2004-07-01 21:32:42.000000000 +0100
@@ -34,7 +34,7 @@
 #include <linux/delay.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "dmx3191d.h"
 
--- diff/drivers/scsi/dpt_i2o.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/dpt_i2o.c	2004-07-01 21:32:42.000000000 +0100
@@ -68,8 +68,11 @@
 #include <asm/pgtable.h>
 #include <asm/io.h>		/* for virt_to_bus, etc. */
 
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>
 
 #include "dpt/dptsig.h"
 #include "dpti.h"
@@ -86,9 +89,9 @@
 #elif defined(__ia64__)
 	PROC_INTEL, PROC_IA64,
 #elif defined(__sparc__)
-	PROC_ULTRASPARC,
+	PROC_ULTRASPARC, PROC_ULTRASPARC,
 #elif defined(__alpha__)
-	PROC_ALPHA ,
+	PROC_ALPHA, PROC_ALPHA,
 #else
 	(-1),(-1),
 #endif
@@ -173,7 +176,7 @@
 };
 MODULE_DEVICE_TABLE(pci,dptids);
 
-static int adpt_detect(Scsi_Host_Template* sht)
+static int adpt_detect(struct scsi_host_template* sht)
 {
 	struct pci_dev *pDev = NULL;
 	adpt_hba* pHba;
@@ -362,7 +365,7 @@
 }
 
 
-static int adpt_slave_configure(Scsi_Device * device)
+static int adpt_slave_configure(struct scsi_device * device)
 {
 	struct Scsi_Host *host = device->host;
 	adpt_hba* pHba;
@@ -378,7 +381,7 @@
 	return 0;
 }
 
-static int adpt_queue(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+static int adpt_queue(struct scsi_cmnd * cmd, void (*done) (struct scsi_cmnd *))
 {
 	adpt_hba* pHba = NULL;
 	struct adpt_device* pDev = NULL;	/* dpt per device information */
@@ -643,7 +646,7 @@
  *===========================================================================
  */
 
-static int adpt_abort(Scsi_Cmnd * cmd)
+static int adpt_abort(struct scsi_cmnd * cmd)
 {
 	adpt_hba* pHba = NULL;	/* host bus adapter structure */
 	struct adpt_device* dptdevice;	/* dpt per device information */
@@ -683,7 +686,7 @@
 // This is the same for BLK and SCSI devices
 // NOTE this is wrong in the i2o.h definitions
 // This is not currently supported by our adapter but we issue it anyway
-static int adpt_device_reset(Scsi_Cmnd* cmd)
+static int adpt_device_reset(struct scsi_cmnd* cmd)
 {
 	adpt_hba* pHba;
 	u32 msg[4];
@@ -723,7 +726,7 @@
 
 #define I2O_HBA_BUS_RESET 0x87
 // This version of bus reset is called by the eh_error handler
-static int adpt_bus_reset(Scsi_Cmnd* cmd)
+static int adpt_bus_reset(struct scsi_cmnd* cmd)
 {
 	adpt_hba* pHba;
 	u32 msg[4];
@@ -745,7 +748,7 @@
 }
 
 // This version of reset is called by the eh_error_handler
-static int adpt_reset(Scsi_Cmnd* cmd)
+static int adpt_reset(struct scsi_cmnd* cmd)
 {
 	adpt_hba* pHba;
 	int rcode;
@@ -860,7 +863,7 @@
 #endif
 
 
-static int adpt_install_hba(Scsi_Host_Template* sht, struct pci_dev* pDev) 
+static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev) 
 {
 
 	adpt_hba* pHba = NULL;
@@ -1997,7 +2000,7 @@
 
 static irqreturn_t adpt_isr(int irq, void *dev_id, struct pt_regs *regs)
 {
-	Scsi_Cmnd* cmd;
+	struct scsi_cmnd* cmd;
 	adpt_hba* pHba = dev_id;
 	u32 m;
 	ulong reply;
@@ -2059,14 +2062,14 @@
 				status = I2O_POST_WAIT_OK;
 			}
 			if(!(context & 0x40000000)) {
-				cmd = (Scsi_Cmnd*) readl(reply+12); 
+				cmd = (struct scsi_cmnd*) readl(reply+12); 
 				if(cmd != NULL) {
 					printk(KERN_WARNING"%s: Apparent SCSI cmd in Post Wait Context - cmd=%p context=%x\n", pHba->name, cmd, context);
 				}
 			}
 			adpt_i2o_post_wait_complete(context, status);
 		} else { // SCSI message
-			cmd = (Scsi_Cmnd*) readl(reply+12); 
+			cmd = (struct scsi_cmnd*) readl(reply+12); 
 			if(cmd != NULL){
 				if(cmd->serial_number != 0) { // If not timedout
 					adpt_i2o_to_scsi(reply, cmd);
@@ -2083,7 +2086,7 @@
 	return IRQ_RETVAL(handled);
 }
 
-static s32 adpt_scsi_to_i2o(adpt_hba* pHba, Scsi_Cmnd* cmd, struct adpt_device* d)
+static s32 adpt_scsi_to_i2o(adpt_hba* pHba, struct scsi_cmnd* cmd, struct adpt_device* d)
 {
 	int i;
 	u32 msg[MAX_MESSAGE_SIZE];
@@ -2108,16 +2111,16 @@
 		 * cmd->cmnd[0] is an unsigned char
 		 */
 		switch(cmd->sc_data_direction){
-		case SCSI_DATA_READ:
+		case DMA_FROM_DEVICE:
 			scsidir  =0x40000000;	// DATA IN  (iop<--dev)
 			break;
-		case SCSI_DATA_WRITE:
+		case DMA_TO_DEVICE:
 			direction=0x04000000;	// SGL OUT
 			scsidir  =0x80000000;	// DATA OUT (iop-->dev)
 			break;
-		case SCSI_DATA_NONE:
+		case DMA_NONE:
 			break;
-		case SCSI_DATA_UNKNOWN:
+		case DMA_BIDIRECTIONAL:
 			scsidir  =0x40000000;	// DATA IN  (iop<--dev)
 			// Assume In - and continue;
 			break;
@@ -2156,7 +2159,7 @@
 	if(cmd->use_sg) {
 		struct scatterlist *sg = (struct scatterlist *)cmd->request_buffer;
 		int sg_count = pci_map_sg(pHba->pDev, sg, cmd->use_sg,
-                        scsi_to_pci_dma_dir(cmd->sc_data_direction));
+				cmd->sc_data_direction);
 
 
 		len = 0;
@@ -2184,7 +2187,7 @@
 			*mptr++ = pci_map_single(pHba->pDev,
 				cmd->request_buffer,
 				cmd->request_bufflen,
-				scsi_to_pci_dma_dir(cmd->sc_data_direction));
+				cmd->sc_data_direction);
 		}
 	}
 	
@@ -2200,7 +2203,7 @@
 }
 
 
-static s32 adpt_scsi_register(adpt_hba* pHba,Scsi_Host_Template * sht)
+static s32 adpt_scsi_register(adpt_hba* pHba,struct scsi_host_template * sht)
 {
 	struct Scsi_Host *host = NULL;
 
@@ -2231,7 +2234,7 @@
 }
 
 
-static s32 adpt_i2o_to_scsi(ulong reply, Scsi_Cmnd* cmd)
+static s32 adpt_i2o_to_scsi(ulong reply, struct scsi_cmnd* cmd)
 {
 	adpt_hba* pHba;
 	u32 hba_status;
@@ -2533,8 +2536,8 @@
 
 static void adpt_fail_posted_scbs(adpt_hba* pHba)
 {
-	Scsi_Cmnd* 	cmd = NULL;
-	Scsi_Device* 	d = NULL;
+	struct scsi_cmnd* 	cmd = NULL;
+	struct scsi_device* 	d = NULL;
 
 	shost_for_each_device(d, pHba->host) {
 		unsigned long flags;
@@ -3358,7 +3361,7 @@
 
 #endif
 
-static Scsi_Host_Template driver_template = {
+static struct scsi_host_template driver_template = {
 	.name			= "dpt_i2o",
 	.proc_name		= "dpt_i2o",
 	.proc_info		= adpt_proc_info,
--- diff/drivers/scsi/dpti.h	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/dpti.h	2004-07-01 21:32:42.000000000 +0100
@@ -37,19 +37,19 @@
  * SCSI interface function Prototypes
  */
 
-static int adpt_detect(Scsi_Host_Template * sht);
-static int adpt_queue(Scsi_Cmnd * cmd, void (*cmdcomplete) (Scsi_Cmnd *));
-static int adpt_abort(Scsi_Cmnd * cmd);
-static int adpt_reset(Scsi_Cmnd* cmd);
+static int adpt_detect(struct scsi_host_template * sht);
+static int adpt_queue(struct scsi_cmnd * cmd, void (*cmdcomplete) (struct scsi_cmnd *));
+static int adpt_abort(struct scsi_cmnd * cmd);
+static int adpt_reset(struct scsi_cmnd* cmd);
 static int adpt_release(struct Scsi_Host *host);
-static int adpt_slave_configure(Scsi_Device *);
+static int adpt_slave_configure(struct scsi_device *);
 
 static const char *adpt_info(struct Scsi_Host *pSHost);
 static int adpt_bios_param(struct scsi_device * sdev, struct block_device *dev,
 		sector_t, int geom[]);
 
-static int adpt_bus_reset(Scsi_Cmnd* cmd);
-static int adpt_device_reset(Scsi_Cmnd* cmd);
+static int adpt_bus_reset(struct scsi_cmnd* cmd);
+static int adpt_device_reset(struct scsi_cmnd* cmd);
 
 
 /*
@@ -198,7 +198,7 @@
 	u8	state;
 	u16	tid;
 	struct i2o_device* pI2o_dev;
-	Scsi_Device *pScsi_dev;
+	struct scsi_device *pScsi_dev;
 };
 
 struct adpt_channel {
@@ -296,9 +296,9 @@
 static s32 adpt_i2o_status_get(adpt_hba* pHba);
 static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba);
 static s32 adpt_i2o_hrt_get(adpt_hba* pHba);
-static s32 adpt_scsi_to_i2o(adpt_hba* pHba, Scsi_Cmnd* cmd, struct adpt_device* dptdevice);
-static s32 adpt_i2o_to_scsi(ulong reply, Scsi_Cmnd* cmd);
-static s32 adpt_scsi_register(adpt_hba* pHba,Scsi_Host_Template * sht);
+static s32 adpt_scsi_to_i2o(adpt_hba* pHba, struct scsi_cmnd* cmd, struct adpt_device* dptdevice);
+static s32 adpt_i2o_to_scsi(ulong reply, struct scsi_cmnd* cmd);
+static s32 adpt_scsi_register(adpt_hba* pHba,struct scsi_host_template * sht);
 static s32 adpt_hba_reset(adpt_hba* pHba);
 static s32 adpt_i2o_reset_hba(adpt_hba* pHba);
 static s32 adpt_rescan(adpt_hba* pHba);
@@ -308,7 +308,7 @@
 static void adpt_inquiry(adpt_hba* pHba);
 static void adpt_fail_posted_scbs(adpt_hba* pHba);
 static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u32 lun);
-static int adpt_install_hba(Scsi_Host_Template* sht, struct pci_dev* pDev) ;
+static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev) ;
 static int adpt_i2o_online_hba(adpt_hba* pHba);
 static void adpt_i2o_post_wait_complete(u32, int);
 static int adpt_i2o_systab_send(adpt_hba* pHba);
--- diff/drivers/scsi/dtc.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/dtc.c	2004-07-01 21:32:42.000000000 +0100
@@ -84,7 +84,7 @@
 #include <linux/interrupt.h>
 #include <asm/io.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "dtc.h"
 #define AUTOPROBE_IRQ
 #include "NCR5380.h"
--- diff/drivers/scsi/eata.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/eata.c	2004-07-01 21:32:42.000000000 +0100
@@ -495,7 +495,7 @@
 #include <linux/spinlock.h>
 #include <scsi/scsicam.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <asm/dma.h>
 #include <asm/irq.h>
 
--- diff/drivers/scsi/eata_generic.h	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/eata_generic.h	2004-07-01 21:32:42.000000000 +0100
@@ -317,7 +317,7 @@
     __u8 rw_latency;
     __u8 retries;
     __u8 status;	      /* status of this queueslot		*/
-    Scsi_Cmnd *cmd;	      /* address of cmd				*/
+    struct scsi_cmnd *cmd;    /* address of cmd				*/
     struct eata_sg_list *sg_list;
 };
 
--- diff/drivers/scsi/eata_pio.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/eata_pio.c	2004-07-01 21:32:42.000000000 +0100
@@ -46,6 +46,7 @@
  *  last change: 2002/11/02               OS: Linux 2.5.45  *
  ************************************************************/
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -56,15 +57,14 @@
 #include <linux/pci.h>
 #include <linux/proc_fs.h>
 #include <linux/interrupt.h>
-#include <linux/stat.h>
-#include <linux/config.h>
 #include <linux/blkdev.h>
 #include <linux/spinlock.h>
 #include <asm/io.h>
 
-#include "scsi.h"
-#include "hosts.h"
-#include <scsi/scsicam.h>
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
 
 #include "eata_generic.h"
 #include "eata_pio.h"
@@ -91,6 +91,8 @@
 static unsigned long int_counter;
 static unsigned long queue_counter;
 
+static struct scsi_host_template driver_template;
+
 /*
  * eata_proc_info
  * inout : decides on the direction of the dataflow and the meaning of the 
@@ -170,15 +172,15 @@
 		if (sh->io_port && sh->n_io_port)
 			release_region(sh->io_port, sh->n_io_port);
 	}
-	return (TRUE);
+	return 1;
 }
 
-static void IncStat(Scsi_Pointer * SCp, uint Increment)
+static void IncStat(struct scsi_pointer *SCp, uint Increment)
 {
 	SCp->ptr += Increment;
 	if ((SCp->this_residual -= Increment) == 0) {
 		if ((--SCp->buffers_residual) == 0)
-			SCp->Status = FALSE;
+			SCp->Status = 0;
 		else {
 			SCp->buffer++;
 			SCp->ptr = page_address(SCp->buffer->page) + SCp->buffer->offset;
@@ -204,7 +206,7 @@
 static void eata_pio_int_handler(int irq, void *dev_id, struct pt_regs *regs)
 {
 	uint eata_stat = 0xfffff;
-	Scsi_Cmnd *cmd;
+	struct scsi_cmnd *cmd;
 	hostdata *hd;
 	struct eata_ccb *cp;
 	uint base;
@@ -233,12 +235,12 @@
 			if (stat & HA_SDRQ) {
 				if (cp->DataIn) {
 					z = 256;
-					odd = FALSE;
+					odd = 0;
 					while ((cmd->SCp.Status) && ((z > 0) || (odd))) {
 						if (odd) {
 							*(cmd->SCp.ptr) = zwickel >> 8;
 							IncStat(&cmd->SCp, 1);
-							odd = FALSE;
+							odd = 0;
 						}
 						x = min_t(unsigned int, z, cmd->SCp.this_residual / 2);
 						insw(base + HA_RDATA, cmd->SCp.ptr, x);
@@ -249,7 +251,7 @@
 							*(cmd->SCp.ptr) = zwickel & 0xff;
 							IncStat(&cmd->SCp, 1);
 							z--;
-							odd = TRUE;
+							odd = 1;
 						}
 					}
 					while (z > 0) {
@@ -258,7 +260,7 @@
 					}
 				} else {	/* cp->DataOut */
 
-					odd = FALSE;
+					odd = 0;
 					z = 256;
 					while ((cmd->SCp.Status) && ((z > 0) || (odd))) {
 						if (odd) {
@@ -266,7 +268,7 @@
 							IncStat(&cmd->SCp, 1);
 							outw(zwickel, base + HA_RDATA);
 							z--;
-							odd = FALSE;
+							odd = 0;
 						}
 						x = min_t(unsigned int, z, cmd->SCp.this_residual / 2);
 						outsw(base + HA_RDATA, cmd->SCp.ptr, x);
@@ -276,13 +278,13 @@
 							zwickel = *(cmd->SCp.ptr);
 							zwickel &= 0xff;
 							IncStat(&cmd->SCp, 1);
-							odd = TRUE;
+							odd = 1;
 						}
 					}
 					while (z > 0 || odd) {
 						outw(zwickel, base + HA_RDATA);
 						z--;
-						odd = FALSE;
+						odd = 0;
 					}
 				}
 			}
@@ -331,7 +333,7 @@
 
 	while (inb(base + HA_RSTATUS) & HA_SBUSY)
 		if (--loop == 0)
-			return (TRUE);
+			return 1;
 
 	/* Enable interrupts for HBA.  It is not the best way to do it at this
 	 * place, but I hope that it doesn't interfere with the IDE driver 
@@ -340,10 +342,11 @@
 	outb(HA_CTRL_8HEADS, base + HA_CTRLREG);
 
 	outb(command, base + HA_WCOMMAND);
-	return (FALSE);
+	return 0;
 }
 
-static int eata_pio_queue(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+static int eata_pio_queue(struct scsi_cmnd *cmd,
+		void (*done)(struct scsi_cmnd *))
 {
 	uint x, y;
 	uint base;
@@ -383,21 +386,21 @@
 
 	cmd->scsi_done = (void *) done;
 
-	if(cmd->sc_data_direction == SCSI_DATA_WRITE)
-		cp->DataOut = TRUE;	/* Output mode */
+	if (cmd->sc_data_direction == DMA_TO_DEVICE)
+		cp->DataOut = 1;	/* Output mode */
 	else
-		cp->DataIn = TRUE;	/* Input mode  */
+		cp->DataIn = 0;	/* Input mode  */
 
 	cp->Interpret = (cmd->device->id == hd->hostid);
 	cp->cp_datalen = htonl((unsigned long) cmd->request_bufflen);
-	cp->Auto_Req_Sen = FALSE;
+	cp->Auto_Req_Sen = 0;
 	cp->cp_reqDMA = htonl(0);
 	cp->reqlen = 0;
 
 	cp->cp_id = cmd->device->id;
 	cp->cp_lun = cmd->device->lun;
-	cp->cp_dispri = FALSE;
-	cp->cp_identify = TRUE;
+	cp->cp_dispri = 0;
+	cp->cp_identify = 1;
 	memcpy(cp->cp_cdb, cmd->cmnd, COMMAND_SIZE(*cmd->cmnd));
 
 	cp->cp_statDMA = htonl(0);
@@ -440,7 +443,7 @@
 	return (0);
 }
 
-static int eata_pio_abort(Scsi_Cmnd * cmd)
+static int eata_pio_abort(struct scsi_cmnd *cmd)
 {
 	uint loop = HZ;
 
@@ -472,11 +475,11 @@
 	panic("eata_pio: abort: invalid slot status\n");
 }
 
-static int eata_pio_host_reset(Scsi_Cmnd * cmd)
+static int eata_pio_host_reset(struct scsi_cmnd *cmd)
 {
 	uint x, limit = 0;
-	unsigned char success = FALSE;
-	Scsi_Cmnd *sp;
+	unsigned char success = 0;
+	struct scsi_cmnd *sp;
 	struct Scsi_Host *host = cmd->device->host;
 
 	DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset called pid:%ld target:" " %x lun: %x reason %x\n", cmd->pid, cmd->device->id, cmd->device->lun, cmd->abort_reason));
@@ -530,7 +533,7 @@
 		sp->scsi_done(sp);
 	}
 
-	HD(cmd)->state = FALSE;
+	HD(cmd)->state = 0;
 
 	if (success) {		/* hmmm... */
 		DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: exit, success.\n"));
@@ -550,8 +553,8 @@
 	memset(&cp, 0, sizeof(struct eata_ccb));
 	memset(buff, 0, sizeof(buff));
 
-	cp.DataIn = TRUE;
-	cp.Interpret = TRUE;	/* Interpret command */
+	cp.DataIn = 1;
+	cp.Interpret = 1;	/* Interpret command */
 
 	cp.cp_datalen = htonl(254);
 	cp.cp_dataDMA = htonl(0);
@@ -593,14 +596,14 @@
 	int z;
 	unsigned short *p;
 
-	if (check_region(base, 9))
-		return (FALSE);
+	if (!request_region(base, 9, "eata_pio"))
+		return 0;
 
 	memset(buf, 0, sizeof(struct get_conf));
 
 	while (inb(base + HA_RSTATUS) & HA_SBUSY)
 		if (--loop == 0)
-			return (FALSE);
+			goto fail;
 
 	DBG(DBG_PIO && DBG_PROBE, printk(KERN_DEBUG "Issuing PIO READ CONFIG to HBA at %#x\n", base));
 	eata_pio_send_command(base, EATA_CMD_PIO_READ_CONFIG);
@@ -609,30 +612,40 @@
 	for (p = (unsigned short *) buf; (long) p <= ((long) buf + (sizeof(struct get_conf) / 2)); p++) {
 		while (!(inb(base + HA_RSTATUS) & HA_SDRQ))
 			if (--loop == 0)
-				return (FALSE);
+				goto fail;
 
 		loop = HZ / 2;
 		*p = inw(base + HA_RDATA);
 	}
-	if (!(inb(base + HA_RSTATUS) & HA_SERROR)) {	/* Error ? */
-		if (htonl(EATA_SIGNATURE) == buf->signature) {
-			DBG(DBG_PIO && DBG_PROBE, printk(KERN_NOTICE "EATA Controller found " "at %#4x EATA Level: %x\n", base, (uint) (buf->version)));
-
-			while (inb(base + HA_RSTATUS) & HA_SDRQ)
-				inw(base + HA_RDATA);
-			if (ALLOW_DMA_BOARDS == FALSE) {
-				for (z = 0; z < MAXISA; z++)
-					if (base == ISAbases[z]) {
-						buf->IRQ = ISAirqs[z];
-						break;
-					}
+	if (inb(base + HA_RSTATUS) & HA_SERROR) {
+		DBG(DBG_PROBE, printk("eata_dma: get_conf_PIO, error during "
+					"transfer for HBA at %x\n", base));
+		goto fail;
+	}
+
+	if (htonl(EATA_SIGNATURE) != buf->signature)
+		goto fail;
+
+	DBG(DBG_PIO && DBG_PROBE, printk(KERN_NOTICE "EATA Controller found "
+				"at %#4x EATA Level: %x\n",
+				base, (uint) (buf->version)));
+
+	while (inb(base + HA_RSTATUS) & HA_SDRQ)
+		inw(base + HA_RDATA);
+
+	if (!ALLOW_DMA_BOARDS) {
+		for (z = 0; z < MAXISA; z++)
+			if (base == ISAbases[z]) {
+				buf->IRQ = ISAirqs[z];
+				break;
 			}
-			return (TRUE);
-		}
-	} else {
-		DBG(DBG_PROBE, printk("eata_dma: get_conf_PIO, error during transfer " "for HBA at %x\n", base));
 	}
-	return (FALSE);
+
+	return 1;
+
+ fail:
+	release_region(base, 9);
+	return 0;
 }
 
 static void print_pio_config(struct get_conf *gc)
@@ -670,7 +683,7 @@
 	return (!(inb(base + HA_RSTATUS) & HA_SERROR));
 }
 
-static int register_pio_HBA(long base, struct get_conf *gc, Scsi_Host_Template * tpnt)
+static int register_pio_HBA(long base, struct get_conf *gc)
 {
 	unsigned long size = 0;
 	char *buff;
@@ -681,47 +694,41 @@
 
 	DBG(DBG_REGISTER, print_pio_config(gc));
 
-	if (gc->DMA_support == TRUE) {
+	if (gc->DMA_support) {
 		printk("HBA at %#.4lx supports DMA. Please use EATA-DMA driver.\n", base);
-		if (ALLOW_DMA_BOARDS == FALSE)
-			return (FALSE);
+		if (!ALLOW_DMA_BOARDS)
+			return 0;
 	}
 
 	if ((buff = get_pio_board_data((uint) base, gc->IRQ, gc->scsi_id[3], cplen = (htonl(gc->cplen) + 1) / 2, cppadlen = (htons(gc->cppadlen) + 1) / 2)) == NULL) {
 		printk("HBA at %#lx didn't react on INQUIRY. Sorry.\n", (unsigned long) base);
-		return (FALSE);
+		return 0;
 	}
 
-	if (print_selftest(base) == FALSE && ALLOW_DMA_BOARDS == FALSE) {
+	if (!print_selftest(base) && !ALLOW_DMA_BOARDS) {
 		printk("HBA at %#lx failed while performing self test & setup.\n", (unsigned long) base);
-		return (FALSE);
+		return 0;
 	}
 
-	request_region(base, 8, "eata_pio");
-
 	size = sizeof(hostdata) + (sizeof(struct eata_ccb) * ntohs(gc->queuesiz));
 
-	sh = scsi_register(tpnt, size);
-	if (sh == NULL) {
-		release_region(base, 8);
-		return FALSE;
-	}
+	sh = scsi_register(&driver_template, size);
+	if (sh == NULL)
+		return 0;
 
 	if (!reg_IRQ[gc->IRQ]) {	/* Interrupt already registered ? */
 		if (!request_irq(gc->IRQ, do_eata_pio_int_handler, SA_INTERRUPT, "EATA-PIO", sh)) {
 			reg_IRQ[gc->IRQ]++;
 			if (!gc->IRQ_TR)
-				reg_IRQL[gc->IRQ] = TRUE;	/* IRQ is edge triggered */
+				reg_IRQL[gc->IRQ] = 1;	/* IRQ is edge triggered */
 		} else {
 			printk("Couldn't allocate IRQ %d, Sorry.\n", gc->IRQ);
-			release_region(base, 8);
-			return (FALSE);
+			return 0;
 		}
 	} else {		/* More than one HBA on this IRQ */
-		if (reg_IRQL[gc->IRQ] == TRUE) {
+		if (reg_IRQL[gc->IRQ]) {
 			printk("Can't support more than one HBA on this IRQ,\n" "  if the IRQ is edge triggered. Sorry.\n");
-			release_region(base, 8);
-			return (FALSE);
+			return 0;
 		} else
 			reg_IRQ[gc->IRQ]++;
 	}
@@ -757,9 +764,9 @@
 	}
 
 	if (ntohl(gc->len) >= 0x22) {
-		if (gc->is_PCI == TRUE)
+		if (gc->is_PCI)
 			hd->bustype = IS_PCI;
-		else if (gc->is_EISA == TRUE)
+		else if (gc->is_EISA)
 			hd->bustype = IS_EISA;
 		else
 			hd->bustype = IS_ISA;
@@ -780,7 +787,7 @@
 	sh->unique_id = base;
 	sh->base = base;
 	sh->io_port = base;
-	sh->n_io_port = 8;
+	sh->n_io_port = 9;
 	sh->irq = gc->IRQ;
 	sh->dma_channel = PIO;
 	sh->this_id = gc->scsi_id[3];
@@ -794,11 +801,11 @@
 	sh->max_lun = 8;
 
 	if (gc->SECOND)
-		hd->primary = FALSE;
+		hd->primary = 0;
 	else
-		hd->primary = TRUE;
+		hd->primary = 1;
 
-	sh->unchecked_isa_dma = FALSE;	/* We can only do PIO */
+	sh->unchecked_isa_dma = 0;	/* We can only do PIO */
 
 	hd->next = NULL;	/* build a linked list of all HBAs */
 	hd->prev = last_HBA;
@@ -811,22 +818,24 @@
 	return (1);
 }
 
-static void find_pio_ISA(struct get_conf *buf, Scsi_Host_Template * tpnt)
+static void find_pio_ISA(struct get_conf *buf)
 {
 	int i;
 
 	for (i = 0; i < MAXISA; i++) {
-		if (ISAbases[i]) {
-			if (get_pio_conf_PIO(ISAbases[i], buf) == TRUE) {
-				register_pio_HBA(ISAbases[i], buf, tpnt);
-			}
+		if (!ISAbases[i])
+			continue;
+		if (!get_pio_conf_PIO(ISAbases[i], buf))
+			continue;
+		if (!register_pio_HBA(ISAbases[i], buf))
+			release_region(ISAbases[i], 9);
+		else
 			ISAbases[i] = 0;
-		}
 	}
 	return;
 }
 
-static void find_pio_EISA(struct get_conf *buf, Scsi_Host_Template * tpnt)
+static void find_pio_EISA(struct get_conf *buf)
 {
 	u32 base;
 	int i;
@@ -836,7 +845,7 @@
 #endif
 
 	for (i = 0; i < MAXEISA; i++) {
-		if (EISAbases[i] == TRUE) {	/* Still a possibility ?          */
+		if (EISAbases[i]) {	/* Still a possibility ?          */
 
 			base = 0x1c88 + (i * 0x1000);
 #if CHECKPAL
@@ -847,12 +856,15 @@
 			if (((pal1 == 0x12) && (pal2 == 0x14)) || ((pal1 == 0x38) && (pal2 == 0xa3) && (pal3 == 0x82)) || ((pal1 == 0x06) && (pal2 == 0x94) && (pal3 == 0x24))) {
 				DBG(DBG_PROBE, printk(KERN_NOTICE "EISA EATA id tags found: " "%x %x %x \n", (int) pal1, (int) pal2, (int) pal3));
 #endif
-				if (get_pio_conf_PIO(base, buf) == TRUE) {
+				if (get_pio_conf_PIO(base, buf)) {
 					DBG(DBG_PROBE && DBG_EISA, print_pio_config(buf));
 					if (buf->IRQ) {
-						register_pio_HBA(base, buf, tpnt);
-					} else
+						if (!register_pio_HBA(base, buf))
+							release_region(base, 9);
+					} else {
 						printk(KERN_NOTICE "eata_dma: No valid IRQ. HBA " "removed from list\n");
+						release_region(base, 9);
+					}
 				}
 				/* Nothing found here so we take it from the list */
 				EISAbases[i] = 0;
@@ -864,7 +876,7 @@
 	return;
 }
 
-static void find_pio_PCI(struct get_conf *buf, Scsi_Host_Template * tpnt)
+static void find_pio_PCI(struct get_conf *buf)
 {
 #ifndef CONFIG_PCI
 	printk("eata_dma: kernel PCI support not enabled. Skipping scan for PCI HBAs.\n");
@@ -889,16 +901,21 @@
 		base += 0x10;	/* Now, THIS is the real address */
 		if (base != 0x1f8) {
 			/* We didn't find it in the primary search */
-			if (get_pio_conf_PIO(base, buf) == TRUE) {
-				if (buf->FORCADR)	/* If the address is forced */
+			if (get_pio_conf_PIO(base, buf)) {
+				if (buf->FORCADR) {	/* If the address is forced */
+					release_region(base, 9);
 					continue;	/* we'll find it later      */
+				}
 
 				/* OK. We made it till here, so we can go now  
 				 * and register it. We  only have to check and 
 				 * eventually remove it from the EISA and ISA list 
 				 */
 
-				register_pio_HBA(base, buf, tpnt);
+				if (!register_pio_HBA(base, buf)) {
+					release_region(base, 9);
+					continue;
+				}
 
 				if (base < 0x1000) {
 					for (x = 0; x < MAXISA; ++x) {
@@ -913,7 +930,7 @@
 				}
 			}
 #if CHECK_BLINK
-			else if (check_blink_state(base) == TRUE) {
+			else if (check_blink_state(base)) {
 				printk("eata_pio: HBA is in BLINK state.\n" "Consult your HBAs manual to correct this.\n");
 			}
 #endif
@@ -922,20 +939,15 @@
 #endif				/* #ifndef CONFIG_PCI */
 }
 
-
-static int eata_pio_detect(Scsi_Host_Template * tpnt)
+static int eata_pio_detect(struct scsi_host_template *tpnt)
 {
 	struct Scsi_Host *HBA_ptr;
 	struct get_conf gc;
 	int i;
 
-	tpnt->proc_name = "eata_pio";
-
-	find_pio_PCI(&gc, tpnt);
-
-	find_pio_EISA(&gc, tpnt);
-
-	find_pio_ISA(&gc, tpnt);
+	find_pio_PCI(&gc);
+	find_pio_EISA(&gc);
+	find_pio_ISA(&gc);
 
 	for (i = 0; i <= MAXIRQ; i++)
 		if (reg_IRQ[i])
@@ -955,16 +967,19 @@
 			       HBA_ptr->host_no, SD(HBA_ptr)->name, SD(HBA_ptr)->revision,
 			       SD(HBA_ptr)->EATA_revision, (SD(HBA_ptr)->bustype == 'P') ?
 			       "PCI " : (SD(HBA_ptr)->bustype == 'E') ? "EISA" : "ISA ",
-			       (uint) HBA_ptr->base, HBA_ptr->irq, SD(HBA_ptr)->channel, HBA_ptr->this_id, (SD(HBA_ptr)->primary == TRUE) ? 'Y' : 'N', HBA_ptr->can_queue, HBA_ptr->sg_tablesize, HBA_ptr->cmd_per_lun);
+			       (uint) HBA_ptr->base, HBA_ptr->irq, SD(HBA_ptr)->channel, HBA_ptr->this_id,
+			       SD(HBA_ptr)->primary ? 'Y' : 'N', HBA_ptr->can_queue,
+			       HBA_ptr->sg_tablesize, HBA_ptr->cmd_per_lun);
 			HBA_ptr = SD(HBA_ptr)->next;
 		}
 	}
 	return (registered_HBAs);
 }
 
-static Scsi_Host_Template driver_template = {
-	.proc_info         	= eata_pio_proc_info,
+static struct scsi_host_template driver_template = {
+	.proc_name		= "eata_pio",
 	.name              	= "EATA (Extended Attachment) PIO driver",
+	.proc_info         	= eata_pio_proc_info,
 	.detect            	= eata_pio_detect,
 	.release           	= eata_pio_release,
 	.queuecommand      	= eata_pio_queue,
--- diff/drivers/scsi/esp.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/esp.c	2004-07-01 21:32:42.000000000 +0100
@@ -27,6 +27,8 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 
+#include "scsi.h"
+#include <scsi/scsi_host.h>
 #include "esp.h"
 
 #include <asm/sbus.h>
--- diff/drivers/scsi/fastlane.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/fastlane.c	2004-07-01 21:32:42.000000000 +0100
@@ -36,7 +36,7 @@
 #include <linux/interrupt.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <linux/zorro.h>
--- diff/drivers/scsi/fcal.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/fcal.c	2004-07-01 21:32:42.000000000 +0100
@@ -21,7 +21,7 @@
 #include <asm/irq.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "../fc4/fcp_impl.h"
 #include "fcal.h"
 
--- diff/drivers/scsi/fd_mcs.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/fd_mcs.c	2004-07-01 21:32:42.000000000 +0100
@@ -87,13 +87,14 @@
 #include <linux/delay.h>
 #include <linux/mca.h>
 #include <linux/spinlock.h>
+#include <scsi/scsicam.h>
 #include <linux/mca-legacy.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "fd_mcs.h"
 
 #define DRIVER_VERSION "v0.2 by ZP Gu<zpg@castle.net>"
@@ -1337,23 +1338,14 @@
 static int fd_mcs_biosparam(struct scsi_device * disk, struct block_device *bdev,
 			    sector_t capacity, int *info_array) 
 {
-	unsigned char buf[512 + sizeof(int) * 2];
+	unsigned char *p = scsi_bios_ptable(bdev);
 	int size = capacity;
-	int *sizes = (int *) buf;
-	unsigned char *data = (unsigned char *) (sizes + 2);
-	unsigned char do_read[] = { READ_6, 0, 0, 0, 1, 0 };
-	int retcode;
 
 	/* BIOS >= 3.4 for MCA cards */
 	/* This algorithm was provided by Future Domain (much thanks!). */
 
-	sizes[0] = 0;	/* zero bytes out */
-	sizes[1] = 512;	/* one sector in */
-	memcpy(data, do_read, sizeof(do_read));
-	retcode = kernel_scsi_ioctl(disk, SCSI_IOCTL_SEND_COMMAND, (void *) buf);
-	if (!retcode	/* SCSI command ok */
-	    && data[511] == 0xaa && data[510] == 0x55	/* Partition table valid */
-	    && data[0x1c2]) {	/* Partition type */
+	if (p && p[65] == 0xaa && p[64] == 0x55	/* Partition table valid */
+	    && p[4]) {	/* Partition type */
 		/* The partition table layout is as follows:
 
 		   Start: 0x1b3h
@@ -1383,8 +1375,8 @@
 		   Future Domain algorithm, but it seemed to be a reasonable thing
 		   to do, especially in the Linux and BSD worlds. */
 
-		info_array[0] = data[0x1c3] + 1;	/* heads */
-		info_array[1] = data[0x1c4] & 0x3f;	/* sectors */
+		info_array[0] = p[5] + 1;	/* heads */
+		info_array[1] = p[6] & 0x3f;	/* sectors */
 	} else {
 		/* Note that this new method guarantees that there will always be
 		   less than 1024 cylinders on a platter.  This is good for drives
@@ -1403,6 +1395,7 @@
 	}
 	/* For both methods, compute the cylinders */
 	info_array[2] = (unsigned int) size / (info_array[0] * info_array[1]);
+	kfree(p);
 	return 0;
 }
 
--- diff/drivers/scsi/fdomain.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/fdomain.c	2004-07-01 21:32:42.000000000 +0100
@@ -279,12 +279,17 @@
 #include <linux/pci.h>
 #include <linux/stat.h>
 #include <linux/delay.h>
+#include <scsi/scsicam.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
 
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_ioctl.h>
+#include "fdomain.h"
 
 MODULE_AUTHOR("Rickard E. Faith");
 MODULE_DESCRIPTION("Future domain SCSI driver");
@@ -385,7 +390,7 @@
 static int               Quantum;	/* Quantum board variant */
 static int               interrupt_level;
 static volatile int      in_command;
-static Scsi_Cmnd         *current_SC;
+static struct scsi_cmnd  *current_SC;
 static enum chip_type    chip              = unknown;
 static int               adapter_mask;
 static int               this_id;
@@ -414,8 +419,6 @@
 
 static irqreturn_t       do_fdomain_16x0_intr( int irq, void *dev_id,
 					    struct pt_regs * regs );
-int		 	fdomain_16x0_bus_reset(Scsi_Cmnd *SCpnt);
-
 /* Allow insmod parameters to be like LILO parameters.  For example:
    insmod fdomain fdomain=0x140,11 */
 static char * fdomain = NULL;
@@ -551,7 +554,7 @@
    printk( "\n" );
 }
 
-int __init fdomain_setup(char *str)
+int fdomain_setup(char *str)
 {
 	int ints[4];
 
@@ -852,7 +855,7 @@
 }
 #endif
 
-struct Scsi_Host *__fdomain_16x0_detect( Scsi_Host_Template *tpnt )
+struct Scsi_Host *__fdomain_16x0_detect(struct scsi_host_template *tpnt )
 {
    int              retcode;
    struct Scsi_Host *shpnt;
@@ -901,7 +904,7 @@
    Write_FIFO_port       = port_base + Write_FIFO;
    Write_SCSI_Data_port  = port_base + Write_SCSI_Data;
 
-   fdomain_16x0_bus_reset( NULL);
+   fdomain_16x0_bus_reset(NULL);
 
    if (fdomain_test_loopback()) {
       printk(KERN_ERR  "scsi: <fdomain> Detection failed (loopback test failed at port base 0x%x)\n", port_base);
@@ -970,7 +973,7 @@
    return shpnt;
 }
 
-static int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
+static int fdomain_16x0_detect(struct scsi_host_template *tpnt)
 {
 	if (fdomain)
 		fdomain_setup(fdomain);
@@ -1254,7 +1257,7 @@
    if (chip == tmc1800 && !current_SC->SCp.have_data_in
        && (current_SC->SCp.sent_command >= current_SC->cmd_len)) {
       
-      if(scsi_to_pci_dma_dir(current_SC->sc_data_direction)	== PCI_DMA_TODEVICE)
+      if(current_SC->sc_data_direction == DMA_TO_DEVICE)
       {
 	 current_SC->SCp.have_data_in = -1;
 	 outb( 0xd0 | PARITY_MASK, TMC_Cntl_port );
@@ -1387,7 +1390,8 @@
    return IRQ_HANDLED;
 }
 
-static int fdomain_16x0_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
+static int fdomain_16x0_queue(struct scsi_cmnd *SCpnt,
+		void (*done)(struct scsi_cmnd *))
 {
    if (in_command) {
       panic( "scsi: <fdomain> fdomain_16x0_queue() NOT REENTRANT!\n" );
@@ -1439,7 +1443,7 @@
 }
 
 #if DEBUG_ABORT
-static void print_info(Scsi_Cmnd *SCpnt)
+static void print_info(struct scsi_cmnd *SCpnt)
 {
    unsigned int imr;
    unsigned int irr;
@@ -1510,7 +1514,7 @@
 }
 #endif
 
-static int fdomain_16x0_abort( Scsi_Cmnd *SCpnt)
+static int fdomain_16x0_abort(struct scsi_cmnd *SCpnt)
 {
 #if EVERY_ACCESS || ERRORS_ONLY || DEBUG_ABORT
    printk( "scsi: <fdomain> abort " );
@@ -1536,7 +1540,7 @@
    return SUCCESS;
 }
 
-int fdomain_16x0_bus_reset(Scsi_Cmnd *SCpnt)
+int fdomain_16x0_bus_reset(struct scsi_cmnd *SCpnt)
 {
    outb( 1, SCSI_Cntl_port );
    do_pause( 2 );
@@ -1547,29 +1551,12 @@
    return SUCCESS;
 }
 
-static int fdomain_16x0_host_reset(Scsi_Cmnd *SCpnt)
-{
-  return FAILED;
-}
-
-static int fdomain_16x0_device_reset(Scsi_Cmnd *SCpnt)
-{
-  return FAILED;
-}
-
-#include <scsi/scsi_ioctl.h>
-
 static int fdomain_16x0_biosparam(struct scsi_device *sdev,
 		struct block_device *bdev,
 		sector_t capacity, int *info_array)
 {
    int              drive;
-   unsigned char    buf[512 + sizeof (Scsi_Ioctl_Command)];
-   Scsi_Ioctl_Command *sic = (Scsi_Ioctl_Command *) buf;
    int		    size      = capacity;
-   unsigned char    *data     = sic->data;
-   unsigned char    do_read[] = { READ_6, 0, 0, 0, 1, 0 };
-   int              retcode;
    unsigned long    offset;
    struct drive_info {
       unsigned short cylinders;
@@ -1657,16 +1644,10 @@
       info_array[2] = i.cylinders;
    } else {			/* 3.4 BIOS (and up?) */
       /* This algorithm was provided by Future Domain (much thanks!). */
+      unsigned char *p = scsi_bios_ptable(bdev);
 
-      sic->inlen  = 0;		/* zero bytes out */
-      sic->outlen = 512;		/* one sector in */
-      memcpy( data, do_read, sizeof( do_read ) );
-      retcode = kernel_scsi_ioctl( sdev,
-				   SCSI_IOCTL_SEND_COMMAND,
-				   sic );
-      if (!retcode				    /* SCSI command ok */
-	  && data[511] == 0xaa && data[510] == 0x55 /* Partition table valid */
-	  && data[0x1c2]) {			    /* Partition type */
+      if (p && p[65] == 0xaa && p[64] == 0x55 /* Partition table valid */
+	  && p[4]) {			    /* Partition type */
 
 	 /* The partition table layout is as follows:
 
@@ -1697,8 +1678,8 @@
 	    Future Domain algorithm, but it seemed to be a reasonable thing
 	    to do, especially in the Linux and BSD worlds. */
 
-	 info_array[0] = data[0x1c3] + 1;	    /* heads */
-	 info_array[1] = data[0x1c4] & 0x3f;	    /* sectors */
+	 info_array[0] = p[5] + 1;	    /* heads */
+	 info_array[1] = p[6] & 0x3f;	    /* sectors */
       } else {
 
  	 /* Note that this new method guarantees that there will always be
@@ -1718,6 +1699,7 @@
       }
 				/* For both methods, compute the cylinders */
       info_array[2] = (unsigned int)size / (info_array[0] * info_array[1] );
+      kfree(p);
    }
    
    return 0;
@@ -1732,7 +1714,7 @@
 	return 0;
 }
 
-Scsi_Host_Template fdomain_driver_template = {
+struct scsi_host_template fdomain_driver_template = {
 	.module			= THIS_MODULE,
 	.name			= "fdomain",
 	.proc_name		= "fdomain",
@@ -1741,8 +1723,6 @@
 	.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,
--- diff/drivers/scsi/g_NCR5380.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/g_NCR5380.c	2004-07-01 21:32:42.000000000 +0100
@@ -107,7 +107,7 @@
 #include <linux/sched.h>
 #include <linux/blkdev.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "g_NCR5380.h"
 #include "NCR5380.h"
 #include <linux/stat.h>
--- diff/drivers/scsi/gdth.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/gdth.c	2004-07-01 21:32:42.000000000 +0100
@@ -410,7 +410,7 @@
 #endif
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "gdth.h"
 
 static void gdth_delay(int milliseconds);
--- diff/drivers/scsi/gvp11.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/gvp11.c	2004-07-01 21:32:42.000000000 +0100
@@ -16,7 +16,7 @@
 #include <linux/spinlock.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "wd33c93.h"
 #include "gvp11.h"
 
--- diff/drivers/scsi/hosts.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/hosts.c	2004-07-01 21:32:42.000000000 +0100
@@ -27,13 +27,11 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/init.h>
-#include <linux/list.h>
 #include <linux/completion.h>
-#include <linux/unistd.h>
 
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_transport.h>
-#include "scsi.h"
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
--- diff/drivers/scsi/hosts.h	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/hosts.h	2004-07-01 21:32:42.000000000 +0100
@@ -1,2 +1,2 @@
-// #warning "This file is obsolete, please use <scsi/scsi_host.h> instead"
+#warning "This file is obsolete, please use <scsi/scsi_host.h> instead"
 #include <scsi/scsi_host.h>
--- diff/drivers/scsi/i60uscsi.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/i60uscsi.c	2004-07-01 21:32:42.000000000 +0100
@@ -81,7 +81,7 @@
 #include <asm/io.h>
 #include <linux/blkdev.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "inia100.h"
 
 #define JIFFIES_TO_MS(t) ((t) * 1000 / HZ)
--- diff/drivers/scsi/ibmmca.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/ibmmca.c	2004-07-01 21:32:42.000000000 +0100
@@ -45,7 +45,7 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "ibmmca.h"
 
 /* current version of this driver-source: */
--- diff/drivers/scsi/ide-scsi.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/ide-scsi.c	2004-07-01 21:32:42.000000000 +0100
@@ -51,7 +51,7 @@
 #include <asm/uaccess.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <scsi/sg.h>
 
 #define IDESCSI_DEBUG_LOG		0
--- diff/drivers/scsi/imm.h	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/imm.h	2004-07-01 21:32:42.000000000 +0100
@@ -79,7 +79,7 @@
 #include  <linux/interrupt.h>
 
 #include  <asm/io.h>
-#include  "hosts.h"
+#include  <scsi/scsi_host.h>
 /* batteries not included :-) */
 
 /*
--- diff/drivers/scsi/in2000.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/in2000.c	2004-07-01 21:32:42.000000000 +0100
@@ -126,7 +126,7 @@
 #include <asm/system.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #define IN2000_VERSION    "1.33-2.5"
 #define IN2000_DATE       "2002/11/03"
--- diff/drivers/scsi/ini9100u.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/ini9100u.c	2004-07-01 21:32:42.000000000 +0100
@@ -136,7 +136,7 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "ini9100u.h"
 
 #ifdef DEBUG_i91u
--- diff/drivers/scsi/ipr.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/ipr.c	2004-07-01 21:32:42.000000000 +0100
@@ -448,6 +448,7 @@
 {
 	ipr_reinit_ipr_cmnd(ipr_cmd);
 	ipr_cmd->u.scratch = 0;
+	ipr_cmd->sibling = NULL;
 	init_timer(&ipr_cmd->timer);
 }
 
@@ -676,8 +677,8 @@
  **/
 static void ipr_internal_cmd_done(struct ipr_cmnd *ipr_cmd)
 {
-	if (ipr_cmd->u.sibling)
-		ipr_cmd->u.sibling = NULL;
+	if (ipr_cmd->sibling)
+		ipr_cmd->sibling = NULL;
 	else
 		complete(&ipr_cmd->completion);
 }
@@ -2884,6 +2885,7 @@
 		    (res->cfgte.res_addr.lun == sdev->lun)) {
 			res->sdev = sdev;
 			res->add_to_ml = 0;
+			res->in_erp = 0;
 			sdev->hostdata = res;
 			res->needs_sync_complete = 1;
 			break;
@@ -3014,10 +3016,10 @@
 	 * If abort has not completed, indicate the reset has, else call the
 	 * abort's done function to wake the sleeping eh thread
 	 */
-	if (ipr_cmd->u.sibling->u.sibling)
-		ipr_cmd->u.sibling->u.sibling = NULL;
+	if (ipr_cmd->sibling->sibling)
+		ipr_cmd->sibling->sibling = NULL;
 	else
-		ipr_cmd->u.sibling->done(ipr_cmd->u.sibling);
+		ipr_cmd->sibling->done(ipr_cmd->sibling);
 
 	list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q);
 	LEAVE;
@@ -3050,8 +3052,8 @@
 
 	ipr_sdev_err(ipr_cmd->u.sdev, "Abort timed out. Resetting bus\n");
 	reset_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
-	ipr_cmd->u.sibling = reset_cmd;
-	reset_cmd->u.sibling = ipr_cmd;
+	ipr_cmd->sibling = reset_cmd;
+	reset_cmd->sibling = ipr_cmd;
 	reset_cmd->ioarcb.res_handle = ipr_cmd->ioarcb.res_handle;
 	cmd_pkt = &reset_cmd->ioarcb.cmd_pkt;
 	cmd_pkt->request_type = IPR_RQTYPE_IOACMD;
@@ -3435,8 +3437,10 @@
 		       SCSI_SENSE_BUFFERSIZE);
 	}
 
-	if (res)
+	if (res) {
 		res->needs_sync_complete = 1;
+		res->in_erp = 0;
+	}
 	ipr_unmap_sglist(ioa_cfg, ipr_cmd);
 	list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q);
 	scsi_cmd->scsi_done(scsi_cmd);
@@ -3479,6 +3483,12 @@
 static void ipr_erp_request_sense(struct ipr_cmnd *ipr_cmd)
 {
 	struct ipr_cmd_pkt *cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt;
+	u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
+
+	if (IPR_IOASC_SENSE_KEY(ioasc) > 0) {
+		ipr_erp_done(ipr_cmd);
+		return;
+	}
 
 	ipr_reinit_ipr_cmnd_for_erp(ipr_cmd);
 
@@ -3525,6 +3535,11 @@
 
 	ipr_reinit_ipr_cmnd_for_erp(ipr_cmd);
 
+	if (!res->tcq_active) {
+		ipr_erp_request_sense(ipr_cmd);
+		return;
+	}
+
 	cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt;
 	cmd_pkt->request_type = IPR_RQTYPE_IOACMD;
 	cmd_pkt->cdb[0] = IPR_CANCEL_ALL_REQUESTS;
@@ -3756,6 +3771,7 @@
 			ipr_erp_cancel_all(ipr_cmd);
 			return;
 		}
+		res->needs_sync_complete = 1;
 		break;
 	case IPR_IOASC_NR_INIT_CMD_REQUIRED:
 		break;
@@ -4808,6 +4824,7 @@
 	ipr_cmd->timer.data = (unsigned long) ipr_cmd;
 	ipr_cmd->timer.expires = jiffies + IPR_OPERATIONAL_TIMEOUT;
 	ipr_cmd->timer.function = (void (*)(unsigned long))ipr_timeout;
+	ipr_cmd->done = ipr_reset_ioa_job;
 	add_timer(&ipr_cmd->timer);
 	list_add_tail(&ipr_cmd->queue, &ioa_cfg->pending_q);
 
--- diff/drivers/scsi/ipr.h	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/ipr.h	2004-07-01 21:32:42.000000000 +0100
@@ -36,8 +36,8 @@
 /*
  * Literals
  */
-#define IPR_DRIVER_VERSION "2.0.7"
-#define IPR_DRIVER_DATE "(May 21, 2004)"
+#define IPR_DRIVER_VERSION "2.0.10"
+#define IPR_DRIVER_DATE "(June 7, 2004)"
 
 /*
  * IPR_DBG_TRACE: Setting this to 1 will turn on some general function tracing
@@ -932,13 +932,13 @@
 	dma_addr_t sense_buffer_dma;
 	unsigned short dma_use_sg;
 	dma_addr_t dma_handle;
+	struct ipr_cmnd *sibling;
 	union {
 		enum ipr_shutdown_type shutdown_type;
 		struct ipr_hostrcb *hostrcb;
 		unsigned long time_left;
 		unsigned long scratch;
 		struct ipr_resource_entry *res;
-		struct ipr_cmnd *sibling;
 		struct scsi_device *sdev;
 	} u;
 
--- diff/drivers/scsi/ips.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/ips.c	2004-07-01 21:32:42.000000000 +0100
@@ -176,7 +176,7 @@
 #include <scsi/sg.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "ips.h"
 
 #include <linux/module.h>
--- diff/drivers/scsi/jazz_esp.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/jazz_esp.c	2004-07-01 21:32:42.000000000 +0100
@@ -16,7 +16,7 @@
 #include <linux/stat.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <asm/irq.h>
--- diff/drivers/scsi/lasi700.c	2004-05-19 22:12:09.000000000 +0100
+++ source/drivers/scsi/lasi700.c	2004-07-01 21:32:42.000000000 +0100
@@ -49,8 +49,7 @@
 #include <asm/parisc-device.h>
 #include <asm/delay.h>
 
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "lasi700.h"
 #include "53c700.h"
@@ -65,7 +64,7 @@
 	{ 0 }
 };
 
-static Scsi_Host_Template lasi700_template = {
+static struct scsi_host_template lasi700_template = {
 	.name		= "LASI SCSI 53c700",
 	.proc_name	= "lasi700",
 	.this_id	= 7,
--- diff/drivers/scsi/libata-core.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/libata-core.c	2004-07-01 21:32:42.000000000 +0100
@@ -50,7 +50,6 @@
 				    unsigned long tmout_pat,
 			    	    unsigned long tmout);
 static void __ata_dev_select (struct ata_port *ap, unsigned int device);
-static void ata_dma_complete(struct ata_queued_cmd *qc, u8 host_stat);
 static void ata_host_set_pio(struct ata_port *ap);
 static void ata_host_set_udma(struct ata_port *ap);
 static void ata_dev_set_pio(struct ata_port *ap, unsigned int device);
@@ -65,37 +64,6 @@
 MODULE_DESCRIPTION("Library module for ATA devices");
 MODULE_LICENSE("GPL");
 
-static const char * thr_state_name[] = {
-	"THR_UNKNOWN",
-	"THR_PORT_RESET",
-	"THR_AWAIT_DEATH",
-	"THR_PROBE_FAILED",
-	"THR_IDLE",
-	"THR_PROBE_SUCCESS",
-	"THR_PROBE_START",
-};
-
-/**
- *	ata_thr_state_name - convert thread state enum to string
- *	@thr_state: thread state to be converted to string
- *
- *	Converts the specified thread state id to a constant C string.
- *
- *	LOCKING:
- *	None.
- *
- *	RETURNS:
- *	The THR_xxx-prefixed string naming the specified thread
- *	state id, or the string "<invalid THR_xxx state>".
- */
-
-static const char *ata_thr_state_name(unsigned int thr_state)
-{
-	if (thr_state < ARRAY_SIZE(thr_state_name))
-		return thr_state_name[thr_state];
-	return "<invalid THR_xxx state>";
-}
-
 /**
  *	ata_tf_load_pio - send taskfile registers to host controller
  *	@ap: Port to which output is sent
@@ -1150,13 +1118,16 @@
 }
 
 /**
- *	ata_port_reset -
- *	@ap:
+ *	ata_bus_probe - Reset and probe ATA bus
+ *	@ap: Bus to probe
  *
  *	LOCKING:
+ *
+ *	RETURNS:
+ *	Zero on success, non-zero on error.
  */
 
-static void ata_port_reset(struct ata_port *ap)
+static int ata_bus_probe(struct ata_port *ap)
 {
 	unsigned int i, found = 0;
 
@@ -1180,14 +1151,12 @@
 	if (ap->flags & ATA_FLAG_PORT_DISABLED)
 		goto err_out_disable;
 
-	ap->thr_state = THR_PROBE_SUCCESS;
-
-	return;
+	return 0;
 
 err_out_disable:
 	ap->ops->port_disable(ap);
 err_out:
-	ap->thr_state = THR_PROBE_FAILED;
+	return -1;
 }
 
 /**
@@ -1806,13 +1775,13 @@
 }
 
 /**
- *	ata_fill_sg -
- *	@qc:
+ *	ata_fill_sg - Fill PCI IDE PRD table
+ *	@qc: Metadata associated with taskfile to be transferred
  *
  *	LOCKING:
  *
  */
-void ata_fill_sg(struct ata_queued_cmd *qc)
+static void ata_fill_sg(struct ata_queued_cmd *qc)
 {
 	struct scatterlist *sg = qc->sg;
 	struct ata_port *ap = qc->ap;
@@ -1854,6 +1823,21 @@
 }
 
 /**
+ *	ata_qc_prep - Prepare taskfile for submission
+ *	@qc: Metadata associated with taskfile to be prepared
+ *
+ *	LOCKING:
+ *	spin_lock_irqsave(host_set lock)
+ */
+void ata_qc_prep(struct ata_queued_cmd *qc)
+{
+	if (!(qc->flags & ATA_QCFLAG_SG))
+		return;
+
+	ata_fill_sg(qc);
+}
+
+/**
  *	ata_sg_setup_one -
  *	@qc:
  *
@@ -1870,7 +1854,6 @@
 	struct scsi_cmnd *cmd = qc->scsicmd;
 	int dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
 	struct scatterlist *sg = qc->sg;
-	unsigned int have_sg = (qc->flags & ATA_QCFLAG_SG);
 	dma_addr_t dma_address;
 
 	assert(sg == &qc->sgent);
@@ -1880,9 +1863,6 @@
 	sg->offset = (unsigned long) cmd->request_buffer & ~PAGE_MASK;
 	sg_dma_len(sg) = cmd->request_bufflen;
 
-	if (!have_sg)
-		return 0;
-
 	dma_address = pci_map_single(ap->host_set->pdev, cmd->request_buffer,
 				     cmd->request_bufflen, dir);
 	if (pci_dma_mapping_error(dma_address))
@@ -1912,22 +1892,19 @@
 	struct ata_port *ap = qc->ap;
 	struct scsi_cmnd *cmd = qc->scsicmd;
 	struct scatterlist *sg;
-	int n_elem;
-	unsigned int have_sg = (qc->flags & ATA_QCFLAG_SG);
+	int n_elem, dir;
 
 	VPRINTK("ENTER, ata%u, use_sg %d\n", ap->id, cmd->use_sg);
 	assert(cmd->use_sg > 0);
 
 	sg = (struct scatterlist *)cmd->request_buffer;
-	if (have_sg) {
-		int dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
-		n_elem = pci_map_sg(ap->host_set->pdev, sg, cmd->use_sg, dir);
-		if (n_elem < 1)
-			return -1;
-		DPRINTK("%d sg elements mapped\n", n_elem);
-	} else {
-		n_elem = cmd->use_sg;
-	}
+	dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+	n_elem = pci_map_sg(ap->host_set->pdev, sg, cmd->use_sg, dir);
+	if (n_elem < 1)
+		return -1;
+
+	DPRINTK("%d sg elements mapped\n", n_elem);
+
 	qc->n_elem = n_elem;
 
 	return 0;
@@ -2146,8 +2123,8 @@
 }
 
 /**
- *	ata_eng_timeout - Handle timeout of queued command
- *	@ap: Port on which timed-out command is active
+ *	ata_qc_timeout - Handle timeout of queued command
+ *	@qc: Command that timed out
  *
  *	Some part of the kernel (currently, only the SCSI layer)
  *	has noticed that the active command on port @ap has not
@@ -2161,23 +2138,15 @@
  *	transaction completed successfully.
  *
  *	LOCKING:
- *	Inherited from SCSI layer (none, can sleep)
  */
 
-void ata_eng_timeout(struct ata_port *ap)
+static void ata_qc_timeout(struct ata_queued_cmd *qc)
 {
-	u8 host_stat, drv_stat;
-	struct ata_queued_cmd *qc;
+	struct ata_port *ap = qc->ap;
+	u8 host_stat = 0, drv_stat;
 
 	DPRINTK("ENTER\n");
 
-	qc = ata_qc_from_tag(ap, ap->active_tag);
-	if (!qc) {
-		printk(KERN_ERR "ata%u: BUG: timeout without command\n",
-		       ap->id);
-		goto out;
-	}
-
 	/* hack alert!  We cannot use the supplied completion
 	 * function from inside the ->eh_strategy_handler() thread.
 	 * libata is the only user of ->eh_strategy_handler() in
@@ -2187,38 +2156,69 @@
 	qc->scsidone = scsi_finish_command;
 
 	switch (qc->tf.protocol) {
+
 	case ATA_PROT_DMA:
-		if (ap->flags & ATA_FLAG_MMIO) {
-			void *mmio = (void *) ap->ioaddr.bmdma_addr;
-			host_stat = readb(mmio + ATA_DMA_STATUS);
-		} else
-			host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+	case ATA_PROT_ATAPI_DMA:
+		host_stat = ata_bmdma_status(ap);
 
-		printk(KERN_ERR "ata%u: DMA timeout, stat 0x%x\n",
-		       ap->id, host_stat);
+		/* before we do anything else, clear DMA-Start bit */
+		ata_bmdma_stop(ap);
 
-		ata_dma_complete(qc, host_stat);
-		break;
+		/* fall through */
 
 	case ATA_PROT_NODATA:
-		drv_stat = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
+	default:
+		ata_altstatus(ap);
+		drv_stat = ata_chk_status(ap);
+
+		/* ack bmdma irq events */
+		ata_bmdma_ack_irq(ap);
 
-		printk(KERN_ERR "ata%u: command 0x%x timeout, stat 0x%x\n",
-		       ap->id, qc->tf.command, drv_stat);
+		printk(KERN_ERR "ata%u: command 0x%x timeout, stat 0x%x host_stat 0x%x\n",
+		       ap->id, qc->tf.command, drv_stat, host_stat);
 
+		/* complete taskfile transaction */
 		ata_qc_complete(qc, drv_stat);
 		break;
+	}
 
-	default:
-		drv_stat = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
+	DPRINTK("EXIT\n");
+}
 
-		printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n",
-		       ap->id, qc->tf.command, drv_stat);
+/**
+ *	ata_eng_timeout - Handle timeout of queued command
+ *	@ap: Port on which timed-out command is active
+ *
+ *	Some part of the kernel (currently, only the SCSI layer)
+ *	has noticed that the active command on port @ap has not
+ *	completed after a specified length of time.  Handle this
+ *	condition by disabling DMA (if necessary) and completing
+ *	transactions, with error if necessary.
+ *
+ *	This also handles the case of the "lost interrupt", where
+ *	for some reason (possibly hardware bug, possibly driver bug)
+ *	an interrupt was not delivered to the driver, even though the
+ *	transaction completed successfully.
+ *
+ *	LOCKING:
+ *	Inherited from SCSI layer (none, can sleep)
+ */
 
-		ata_qc_complete(qc, drv_stat);
-		break;
+void ata_eng_timeout(struct ata_port *ap)
+{
+	struct ata_queued_cmd *qc;
+
+	DPRINTK("ENTER\n");
+
+	qc = ata_qc_from_tag(ap, ap->active_tag);
+	if (!qc) {
+		printk(KERN_ERR "ata%u: BUG: timeout without command\n",
+		       ap->id);
+		goto out;
 	}
 
+	ata_qc_timeout(qc);
+
 out:
 	DPRINTK("EXIT\n");
 }
@@ -2316,7 +2316,7 @@
 		qc->scsidone(cmd);
 	}
 
-	qc->flags &= ~ATA_QCFLAG_ACTIVE;
+	qc->flags = 0;
 	tag = qc->tag;
 	if (likely(ata_tag_valid(tag))) {
 		if (tag == ap->active_tag)
@@ -2362,10 +2362,10 @@
 			if (ata_sg_setup_one(qc))
 				goto err_out;
 		}
-
-		ap->ops->fill_sg(qc);
 	}
 
+	ap->ops->qc_prep(qc);
+
 	qc->ap->active_tag = qc->tag;
 	qc->flags |= ATA_QCFLAG_ACTIVE;
 
@@ -2446,7 +2446,7 @@
 {
 	struct ata_port *ap = qc->ap;
 	unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE);
-	u8 host_stat, dmactl;
+	u8 dmactl;
 	void *mmio = (void *) ap->ioaddr.bmdma_addr;
 
 	/* load PRD table addr. */
@@ -2460,10 +2460,6 @@
 		dmactl |= ATA_DMA_WR;
 	writeb(dmactl, mmio + ATA_DMA_CMD);
 
-	/* clear interrupt, error bits */
-	host_stat = readb(mmio + ATA_DMA_STATUS);
-	writeb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR, mmio + ATA_DMA_STATUS);
-
 	/* issue r/w command */
 	ap->ops->exec_command(ap, &qc->tf);
 }
@@ -2511,7 +2507,7 @@
 {
 	struct ata_port *ap = qc->ap;
 	unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE);
-	u8 host_stat, dmactl;
+	u8 dmactl;
 
 	/* load PRD table addr. */
 	outl(ap->prd_dma, ap->ioaddr.bmdma_addr + ATA_DMA_TABLE_OFS);
@@ -2523,11 +2519,6 @@
 		dmactl |= ATA_DMA_WR;
 	outb(dmactl, ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
 
-	/* clear interrupt, error bits */
-	host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
-	outb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR,
-	     ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
-
 	/* issue r/w command */
 	ap->ops->exec_command(ap, &qc->tf);
 }
@@ -2552,50 +2543,6 @@
 }
 
 /**
- *	ata_dma_complete - Complete an active ATA BMDMA command
- *	@qc: Command to complete
- *	@host_stat: BMDMA status register contents
- *
- *	LOCKING:
- */
-
-static void ata_dma_complete(struct ata_queued_cmd *qc, u8 host_stat)
-{
-	struct ata_port *ap = qc->ap;
-	VPRINTK("ENTER\n");
-
-	if (ap->flags & ATA_FLAG_MMIO) {
-		void *mmio = (void *) ap->ioaddr.bmdma_addr;
-
-		/* clear start/stop bit */
-		writeb(readb(mmio + ATA_DMA_CMD) & ~ATA_DMA_START,
-		       mmio + ATA_DMA_CMD);
-
-		/* ack intr, err bits */
-		writeb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR,
-		       mmio + ATA_DMA_STATUS);
-	} else {
-		/* clear start/stop bit */
-		outb(inb(ap->ioaddr.bmdma_addr + ATA_DMA_CMD) & ~ATA_DMA_START,
-		     ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
-
-		/* ack intr, err bits */
-		outb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR,
-		     ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
-	}
-
-
-	/* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
-	ata_altstatus(ap);		/* dummy read */
-
-	DPRINTK("host %u, host_stat==0x%X, drv_stat==0x%X\n",
-		ap->id, (u32) host_stat, (u32) ata_chk_status(ap));
-
-	/* get drive status; clear intr; complete txn */
-	ata_qc_complete(qc, ata_wait_idle(ap));
-}
-
-/**
  *	ata_host_intr - Handle host interrupt for given (port, task)
  *	@ap: Port on which interrupt arrived (possibly...)
  *	@qc: Taskfile currently active in engine
@@ -2615,59 +2562,60 @@
 				   struct ata_queued_cmd *qc)
 {
 	u8 status, host_stat;
-	unsigned int handled = 0;
 
 	switch (qc->tf.protocol) {
 
-	/* BMDMA completion */
 	case ATA_PROT_DMA:
 	case ATA_PROT_ATAPI_DMA:
-		if (ap->flags & ATA_FLAG_MMIO) {
-			void *mmio = (void *) ap->ioaddr.bmdma_addr;
-			host_stat = readb(mmio + ATA_DMA_STATUS);
-		} else
-			host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+		/* check status of DMA engine */
+		host_stat = ata_bmdma_status(ap);
 		VPRINTK("BUS_DMA (host_stat 0x%X)\n", host_stat);
 
-		if (!(host_stat & ATA_DMA_INTR)) {
-			ap->stats.idle_irq++;
-			break;
-		}
+		/* if it's not our irq... */
+		if (!(host_stat & ATA_DMA_INTR))
+			goto idle_irq;
 
-		ata_dma_complete(qc, host_stat);
-		handled = 1;
-		break;
+		/* before we do anything else, clear DMA-Start bit */
+		ata_bmdma_stop(ap);
+
+		/* fall through */
 
-	/* command completion, but no data xfer */
-	/* FIXME: a shared interrupt _will_ cause a non-data command
-	 * to be completed prematurely, with an error.
-	 *
-	 * This doesn't matter right now, since we aren't sending
-	 * non-data commands down this pipe except in development
-	 * situations.
-	 */
-	case ATA_PROT_ATAPI:
 	case ATA_PROT_NODATA:
-		status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
-		DPRINTK("BUS_NODATA (drv_stat 0x%X)\n", status);
+		/* check altstatus */
+		status = ata_altstatus(ap);
+		if (status & ATA_BUSY)
+			goto idle_irq;
+
+		/* check main status, clearing INTRQ */
+		status = ata_chk_status(ap);
+		if (unlikely(status & ATA_BUSY))
+			goto idle_irq;
+		DPRINTK("BUS_NODATA (dev_stat 0x%X)\n", status);
+
+		/* ack bmdma irq events */
+		ata_bmdma_ack_irq(ap);
+
+		/* complete taskfile transaction */
 		ata_qc_complete(qc, status);
-		handled = 1;
 		break;
 
 	default:
-		ap->stats.idle_irq++;
+		goto idle_irq;
+	}
+
+	return 1;	/* irq handled */
+
+idle_irq:
+	ap->stats.idle_irq++;
 
 #ifdef ATA_IRQ_TRAP
-		if ((ap->stats.idle_irq % 1000) == 0) {
-			handled = 1;
-			ata_irq_ack(ap, 0); /* debug trap */
-			printk(KERN_WARNING "ata%d: irq trap\n", ap->id);
-		}
-#endif
-		break;
+	if ((ap->stats.idle_irq % 1000) == 0) {
+		handled = 1;
+		ata_irq_ack(ap, 0); /* debug trap */
+		printk(KERN_WARNING "ata%d: irq trap\n", ap->id);
 	}
-
-	return handled;
+#endif
+	return 0;	/* irq not handled */
 }
 
 /**
@@ -2701,7 +2649,7 @@
 
 			qc = ata_qc_from_tag(ap, ap->active_tag);
 			if (qc && (!(qc->tf.ctl & ATA_NIEN)))
-				handled += ata_host_intr(ap, qc);
+				handled |= ata_host_intr(ap, qc);
 		}
 	}
 
@@ -2711,62 +2659,6 @@
 }
 
 /**
- *	ata_thread_iter -
- *	@ap:
- *
- *	LOCKING:
- *
- *	RETURNS:
- *
- */
-
-static unsigned long ata_thread_iter(struct ata_port *ap)
-{
-	long timeout = 0;
-
-	DPRINTK("ata%u: thr_state %s\n",
-		ap->id, ata_thr_state_name(ap->thr_state));
-
-	switch (ap->thr_state) {
-	case THR_UNKNOWN:
-		ap->thr_state = THR_PORT_RESET;
-		break;
-
-	case THR_PROBE_START:
-		ap->thr_state = THR_PORT_RESET;
-		break;
-
-	case THR_PORT_RESET:
-		ata_port_reset(ap);
-		break;
-
-	case THR_PROBE_SUCCESS:
-		up(&ap->probe_sem);
-		ap->thr_state = THR_IDLE;
-		break;
-
-	case THR_PROBE_FAILED:
-		up(&ap->probe_sem);
-		ap->thr_state = THR_AWAIT_DEATH;
-		break;
-
-	case THR_AWAIT_DEATH:
-	case THR_IDLE:
-		timeout = -1;
-		break;
-
-	default:
-		printk(KERN_DEBUG "ata%u: unknown thr state %s\n",
-		       ap->id, ata_thr_state_name(ap->thr_state));
-		break;
-	}
-
-	DPRINTK("ata%u: new thr_state %s, returning %ld\n",
-		ap->id, ata_thr_state_name(ap->thr_state), timeout);
-	return timeout;
-}
-
-/**
  *	atapi_packet_task - Write CDB bytes to hardware
  *	@_data: Port to which ATAPI device is attached.
  *
@@ -2847,21 +2739,6 @@
 	pci_free_consistent(pdev, ATA_PRD_TBL_SZ, ap->prd, ap->prd_dma);
 }
 
-static void ata_probe_task(void *_data)
-{
-	struct ata_port *ap = _data;
-	long timeout;
-
-	timeout = ata_thread_iter(ap);
-	if (timeout < 0)
-		return;
-
-	if (timeout > 0)
-		queue_delayed_work(ata_wq, &ap->probe_task, timeout);
-	else
-		queue_work(ata_wq, &ap->probe_task);
-}
-
 /**
  *	ata_host_remove - Unregister SCSI host structure with upper layers
  *	@ap: Port to unregister
@@ -2918,7 +2795,6 @@
 	ap->udma_mask = ent->udma_mask;
 	ap->flags |= ent->host_flags;
 	ap->ops = ent->port_ops;
-	ap->thr_state = THR_PROBE_START;
 	ap->cbl = ATA_CBL_NONE;
 	ap->device[0].flags = ATA_DFLAG_MASTER;
 	ap->active_tag = ATA_TAG_POISON;
@@ -2926,13 +2802,10 @@
 
 	INIT_WORK(&ap->packet_task, atapi_packet_task, ap);
 	INIT_WORK(&ap->pio_task, ata_pio_task, ap);
-	INIT_WORK(&ap->probe_task, ata_probe_task, ap);
 
 	for (i = 0; i < ATA_MAX_DEVICES; i++)
 		ap->device[i].devno = i;
 
-	init_MUTEX_LOCKED(&ap->probe_sem);
-
 #ifdef ATA_IRQ_TRAP
 	ap->stats.unhandled_irq = 1;
 	ap->stats.idle_irq = 1;
@@ -3041,6 +2914,10 @@
 		return 0;
 	}
 
+	/* TODO: ack irq here, to ensure it won't scream
+	 * when we enable it?
+	 */
+
 	/* obtain irq, that is shared between channels */
 	if (request_irq(ent->irq, ent->port_ops->irq_handler, ent->irq_flags,
 			DRV_NAME, host_set))
@@ -3055,12 +2932,17 @@
 		ap = host_set->ports[i];
 
 		DPRINTK("ata%u: probe begin\n", ap->id);
-		queue_work(ata_wq, &ap->probe_task);	/* start probe */
-
-		DPRINTK("ata%u: probe-wait begin\n", ap->id);
-		down(&ap->probe_sem);	/* wait for end */
+		rc = ata_bus_probe(ap);
+		DPRINTK("ata%u: probe end\n", ap->id);
 
-		DPRINTK("ata%u: probe-wait end\n", ap->id);
+		if (rc) {
+			/* FIXME: do something useful here?
+			 * Current libata behavior will
+			 * tear down everything when
+			 * the module is removed
+			 * or the h/w is unplugged.
+			 */
+		}
 
 		rc = scsi_add_host(ap->host, &pdev->dev);
 		if (rc) {
@@ -3480,7 +3362,7 @@
 EXPORT_SYMBOL_GPL(ata_port_start);
 EXPORT_SYMBOL_GPL(ata_port_stop);
 EXPORT_SYMBOL_GPL(ata_interrupt);
-EXPORT_SYMBOL_GPL(ata_fill_sg);
+EXPORT_SYMBOL_GPL(ata_qc_prep);
 EXPORT_SYMBOL_GPL(ata_bmdma_setup_pio);
 EXPORT_SYMBOL_GPL(ata_bmdma_start_pio);
 EXPORT_SYMBOL_GPL(ata_bmdma_setup_mmio);
--- diff/drivers/scsi/libata-scsi.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/libata-scsi.c	2004-07-01 21:32:42.000000000 +0100
@@ -182,7 +182,8 @@
 		 * 65534 when Jens Axboe's patch for dynamically
 		 * determining max_sectors is merged.
 		 */
-		if (dev->flags & ATA_DFLAG_LBA48) {
+		if ((dev->flags & ATA_DFLAG_LBA48) &&
+		    ((dev->flags & ATA_DFLAG_LOCK_SECTORS) == 0)) {
 			sdev->host->max_sectors = 2048;
 			blk_queue_max_sectors(sdev->request_queue, 2048);
 		}
--- diff/drivers/scsi/mac_esp.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/mac_esp.c	2004-07-01 21:32:42.000000000 +0100
@@ -26,7 +26,7 @@
 #include <linux/interrupt.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <asm/io.h>
--- diff/drivers/scsi/mac_scsi.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/mac_scsi.c	2004-07-01 21:32:42.000000000 +0100
@@ -52,7 +52,7 @@
 #include <asm/mac_via.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "mac_scsi.h"
 #include "NCR5380.h"
 
--- diff/drivers/scsi/mca_53c9x.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/mca_53c9x.c	2004-07-01 21:32:42.000000000 +0100
@@ -43,7 +43,7 @@
 #include <linux/mca-legacy.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <asm/dma.h>
--- diff/drivers/scsi/megaraid.c	2004-06-30 14:25:51.000000000 +0100
+++ source/drivers/scsi/megaraid.c	2004-07-01 21:32:42.000000000 +0100
@@ -49,7 +49,7 @@
 #include <scsi/scsicam.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "megaraid.h"
 
@@ -3815,7 +3815,8 @@
 
 			umc = MBOX_P(uiocp);
 
-			upthru = (mega_passthru *)umc->xferaddr;
+			if (get_user(upthru, (mega_passthru **)&umc->xferaddr))
+				return (-EFAULT);
 
 			if( put_user(mc->status, (u8 *)&upthru->scsistatus) )
 				return (-EFAULT);
@@ -3831,7 +3832,8 @@
 
 			umc = (megacmd_t *)uioc_mimd->mbox;
 
-			upthru = (mega_passthru *)umc->xferaddr;
+			if (get_user(upthru, (mega_passthru **)&umc->xferaddr))
+				return (-EFAULT);
 
 			if( put_user(mc->status, (u8 *)&upthru->scsistatus) )
 				return (-EFAULT);
@@ -4068,7 +4070,6 @@
 static int
 mega_del_logdrv(adapter_t *adapter, int logdrv)
 {
-	DECLARE_WAIT_QUEUE_HEAD(wq);
 	unsigned long flags;
 	scb_t *scb;
 	int rval;
@@ -4083,11 +4084,9 @@
 	 * Wait till all the issued commands are complete and there are no
 	 * commands in the pending queue
 	 */
-	while( atomic_read(&adapter->pend_cmds) > 0 ||
-			!list_empty(&adapter->pending_list) ) {
-
-		sleep_on_timeout( &wq, 1*HZ );	/* sleep for 1s */
-	}
+	while (atomic_read(&adapter->pend_cmds) > 0 ||
+	       !list_empty(&adapter->pending_list))
+		msleep(1000);	/* sleep for 1s */
 
 	rval = mega_do_del_logdrv(adapter, logdrv);
 
@@ -4612,6 +4611,26 @@
 	pci_dev_func = pdev->devfn;
 
 	/*
+	 * The megaraid3 stuff reports the ID of the Intel part which is not
+	 * remotely specific to the megaraid
+	 */
+	if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
+		u16 magic;
+		/*
+		 * Don't fall over the Compaq management cards using the same
+		 * PCI identifier
+		 */
+		if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ &&
+		    pdev->subsystem_device == 0xC000)
+		   	return -ENODEV;
+		/* Now check the magic signature byte */
+		pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
+		if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
+			return -ENODEV;
+		/* Ok it is probably a megaraid */
+	}
+
+	/*
 	 * For these vendor and device ids, signature offsets are not
 	 * valid and 64 bit is implicit
 	 */
--- diff/drivers/scsi/mvme147.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/mvme147.c	2004-07-01 21:32:42.000000000 +0100
@@ -11,7 +11,7 @@
 #include <asm/irq.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "wd33c93.h"
 #include "mvme147.h"
 
--- diff/drivers/scsi/mvme16x.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/mvme16x.c	2004-07-01 21:32:42.000000000 +0100
@@ -15,7 +15,7 @@
 #include <asm/irq.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "53c7xx.h"
 #include "mvme16x.h"
 
--- diff/drivers/scsi/ncr53c8xx.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/ncr53c8xx.c	2004-07-01 21:32:42.000000000 +0100
@@ -83,17 +83,6 @@
 **
 **	Supported NCR/SYMBIOS chips:
 **		53C720		(Wide,   Fast SCSI-2, intfly problems)
-**		53C810		(8 bits, Fast SCSI-2, no rom BIOS) 
-**		53C815		(8 bits, Fast SCSI-2, on board rom BIOS)
-**		53C820		(Wide,   Fast SCSI-2, no rom BIOS)
-**		53C825		(Wide,   Fast SCSI-2, on board rom BIOS)
-**		53C860		(8 bits, Fast 20,     no rom BIOS)
-**		53C875		(Wide,   Fast 20,     on board rom BIOS)
-**		53C895		(Wide,   Fast 40,     on board rom BIOS)
-**		53C895A		(Wide,   Fast 40,     on board rom BIOS)
-**		53C896		(Wide,   Fast 40,     on board rom BIOS)
-**		53C897		(Wide,   Fast 40,     on board rom BIOS)
-**		53C1510D	(Wide,   Fast 40,     on board rom BIOS)
 **
 **	Other features:
 **		Memory mapped IO (linux-1.3.X and above only)
@@ -101,10 +90,8 @@
 **		Shared IRQ (since linux-1.3.72)
 */
 
-/*
-**	Name and version of the driver
-*/
-#define SCSI_NCR_DRIVER_NAME	"ncr53c8xx-3.4.3b-20010512"
+/* Name and version of the driver */
+#define SCSI_NCR_DRIVER_NAME	"ncr53c8xx-3.4.3f"
 
 #define SCSI_NCR_DEBUG_FLAGS	(0)
 
@@ -138,7 +125,7 @@
 #include <asm/system.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "ncr53c8xx.h"
 
@@ -157,11 +144,6 @@
 
 #include "sym53c8xx_comm.h"
 
-int ncr53c8xx_slave_configure(Scsi_Device *device);
-int ncr53c8xx_bus_reset(Scsi_Cmnd *cmd);
-int ncr53c8xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *));
-const char *ncr53c8xx_info (struct Scsi_Host *host);
-
 
 /*==========================================================
 **
@@ -341,11 +323,6 @@
 #define initverbose (driver_setup.verbose)
 #define bootverbose (np->verbose)
 
-#ifdef SCSI_NCR_NVRAM_SUPPORT
-static u_char Tekram_sync[16] __initdata =
-	{25,31,37,43, 50,62,75,125, 12,15,18,21, 6,7,9,10};
-#endif /* SCSI_NCR_NVRAM_SUPPORT */
-
 /*==========================================================
 **
 **	Command control block states.
@@ -483,11 +460,6 @@
 struct ncb;
 struct script;
 
-typedef struct ncb * ncb_p;
-typedef struct tcb * tcb_p;
-typedef struct lcb * lcb_p;
-typedef struct ccb * ccb_p;
-
 struct link {
 	ncrcmd	l_cmd;
 	ncrcmd	l_paddr;
@@ -558,7 +530,7 @@
 	**----------------------------------------------------------------
 	*/
 	struct link     jump_lcb[4];	/* JUMPs for reselection	*/
-	lcb_p		lp[MAX_LUN];	/* The lcb's of this tcb	*/
+	struct lcb *	lp[MAX_LUN];	/* The lcb's of this tcb	*/
 	u_char		inq_done;	/* Target capabilities received	*/
 	u_char		inq_byte7;	/* Contains these capabilities	*/
 
@@ -568,7 +540,7 @@
 	**	when tagged command queuing is enabled.
 	**----------------------------------------------------------------
 	*/
-	ccb_p   nego_cp;
+	struct ccb *   nego_cp;
 
 	/*----------------------------------------------------------------
 	**	statistical data
@@ -582,7 +554,7 @@
 	**----------------------------------------------------------------
 	*/
 #ifdef SCSI_NCR_BIG_ENDIAN
-/*0*/	u_short	period;
+/*0*/	u16	period;
 /*2*/	u_char	sval;
 /*3*/	u_char	minsync;
 /*0*/	u_char	wval;
@@ -592,7 +564,7 @@
 #else
 /*0*/	u_char	minsync;
 /*1*/	u_char	sval;
-/*2*/	u_short	period;
+/*2*/	u16	period;
 /*0*/	u_char	maxoffs;
 /*1*/	u_char	quirks;
 /*2*/	u_char	widedone;
@@ -606,11 +578,7 @@
 	u_char 	ic_done;
 #endif
 
-	/*----------------------------------------------------------------
-	**	User settable limits and options.
-	**	These limits are read from the NVRAM if present.
-	**----------------------------------------------------------------
-	*/
+	/* User settable limits and options.  */
 	u_char	usrsync;
 	u_char	usrwide;
 	u_char	usrtags;
@@ -691,11 +659,11 @@
 	**	QUEUE FULL and ORDERED tag control.
 	**----------------------------------------------------------------
 	*/
-	u_short		num_good;	/* Nr of GOOD since QUEUE FULL	*/
+	u16		num_good;	/* Nr of GOOD since QUEUE FULL	*/
 	tagmap_t	tags_umap;	/* Used tags bitmap		*/
 	tagmap_t	tags_smap;	/* Tags in use at 'tag_stime'	*/
 	u_long		tags_stime;	/* Last time we set smap=umap	*/
-	ccb_p		held_ccb;	/* CCB held for QUEUE FULL	*/
+	struct ccb *	held_ccb;	/* CCB held for QUEUE FULL	*/
 };
 
 /*========================================================================
@@ -761,7 +729,7 @@
 	**	The virtual address of the ccb containing this header.
 	**----------------------------------------------------------------
 	*/
-	ccb_p	cp;
+	struct ccb *	cp;
 
 	/*----------------------------------------------------------------
 	**	Status fields.
@@ -871,7 +839,7 @@
 	struct scr_tblmove smsg  ;
 	struct scr_tblmove cmd   ;
 	struct scr_tblmove sense ;
-	struct scr_tblmove data [MAX_SCATTER];
+	struct scr_tblmove data[MAX_SCATTER];
 };
 
 
@@ -921,7 +889,7 @@
 	**	pointer to a control block.
 	**----------------------------------------------------------------
 	*/
-	Scsi_Cmnd	*cmd;		/* SCSI command 		*/
+	struct scsi_cmnd	*cmd;		/* SCSI command 		*/
 	u_char		cdb_buf[16];	/* Copy of CDB			*/
 	u_char		sense_buf[64];
 	int		data_len;	/* Total data length		*/
@@ -951,7 +919,7 @@
 	u_char		lun;
 	u_char		queued;
 	u_char		auto_sense;
-	ccb_p		link_ccb;	/* Host adapter CCB chain	*/
+	struct ccb *	link_ccb;	/* Host adapter CCB chain	*/
 	XPT_QUEHEAD	link_ccbq;	/* Link to unit CCB queue	*/
 	u32		startp;		/* Initial data pointer		*/
 	u_long		magic;		/* Free / busy  CCB flag	*/
@@ -980,9 +948,9 @@
 	**	CCBs management queues.
 	**----------------------------------------------------------------
 	*/
-	Scsi_Cmnd	*waiting_list;	/* Commands waiting for a CCB	*/
+	struct scsi_cmnd	*waiting_list;	/* Commands waiting for a CCB	*/
 					/*  when lcb is not allocated.	*/
-	Scsi_Cmnd	*done_list;	/* Commands waiting for done()  */
+	struct scsi_cmnd	*done_list;	/* Commands waiting for done()  */
 					/* callback to be invoked.      */ 
 	spinlock_t	smp_lock;	/* Lock for SMP threading       */
 
@@ -991,7 +959,6 @@
 	**----------------------------------------------------------------
 	*/
 	int		unit;		/* Unit number			*/
-	char		chip_name[8];	/* Chip name			*/
 	char		inst_name[16];	/* ncb instance name		*/
 
 	/*----------------------------------------------------------------
@@ -1053,13 +1020,9 @@
 	**----------------------------------------------------------------
 	*/
 	struct device	*dev;
-	u_short		device_id;	/* PCI device id		*/
 	u_char		revision_id;	/* PCI device revision id	*/
-	u_char		bus;		/* PCI BUS number		*/
-	u_char		device_fn;	/* PCI BUS device and function	*/
-	u_long		base_io;	/* IO space base address	*/
-	u_int		irq;		/* IRQ level			*/
-	u_int		features;	/* Chip features map		*/
+	u32		irq;		/* IRQ level			*/
+	u32		features;	/* Chip features map		*/
 	u_char		myaddr;		/* SCSI id of the adapter	*/
 	u_char		maxburst;	/* log base 2 of dwords burst	*/
 	u_char		maxwide;	/* Maximum transfer width	*/
@@ -1076,10 +1039,10 @@
 	**	SCRIPTS processor in order to start SCSI commands.
 	**----------------------------------------------------------------
 	*/
-	u_short		squeueput;	/* Next free slot of the queue	*/
-	u_short		actccbs;	/* Number of allocated CCBs	*/
-	u_short		queuedccbs;	/* Number of CCBs in start queue*/
-	u_short		queuedepth;	/* Start queue depth		*/
+	u16		squeueput;	/* Next free slot of the queue	*/
+	u16		actccbs;	/* Number of allocated CCBs	*/
+	u16		queuedccbs;	/* Number of CCBs in start queue*/
+	u16		queuedepth;	/* Start queue depth		*/
 
 	/*----------------------------------------------------------------
 	**	Timeout handler.
@@ -1304,65 +1267,59 @@
 **==========================================================
 */
 
-static	void	ncr_alloc_ccb	(ncb_p np, u_char tn, u_char ln);
-static	void	ncr_complete	(ncb_p np, ccb_p cp);
-static	void	ncr_exception	(ncb_p np);
-static	void	ncr_free_ccb	(ncb_p np, ccb_p cp);
-static	void	ncr_init_ccb	(ncb_p np, ccb_p cp);
-static	void	ncr_init_tcb	(ncb_p np, u_char tn);
-static	lcb_p	ncr_alloc_lcb	(ncb_p np, u_char tn, u_char ln);
-static	lcb_p	ncr_setup_lcb	(ncb_p np, u_char tn, u_char ln,
+static	void	ncr_alloc_ccb	(struct ncb *np, u_char tn, u_char ln);
+static	void	ncr_complete	(struct ncb *np, struct ccb *cp);
+static	void	ncr_exception	(struct ncb *np);
+static	void	ncr_free_ccb	(struct ncb *np, struct ccb *cp);
+static	void	ncr_init_ccb	(struct ncb *np, struct ccb *cp);
+static	void	ncr_init_tcb	(struct ncb *np, u_char tn);
+static	struct lcb *	ncr_alloc_lcb	(struct ncb *np, u_char tn, u_char ln);
+static	struct lcb *	ncr_setup_lcb	(struct ncb *np, u_char tn, u_char ln,
 				 u_char *inq_data);
-static	void	ncr_getclock	(ncb_p np, int mult);
-static	void	ncr_selectclock	(ncb_p np, u_char scntl3);
-static	ccb_p	ncr_get_ccb	(ncb_p np, u_char tn, u_char ln);
-static	void	ncr_chip_reset	(ncb_p np, int delay);
-static	void	ncr_init	(ncb_p np, int reset, char * msg, u_long code);
-static	int	ncr_int_sbmc	(ncb_p np);
-static	int	ncr_int_par	(ncb_p np);
-static	void	ncr_int_ma	(ncb_p np);
-static	void	ncr_int_sir	(ncb_p np);
-static  void    ncr_int_sto     (ncb_p np);
+static	void	ncr_getclock	(struct ncb *np, int mult);
+static	void	ncr_selectclock	(struct ncb *np, u_char scntl3);
+static	struct ccb *ncr_get_ccb	(struct ncb *np, u_char tn, u_char ln);
+static	void	ncr_chip_reset	(struct ncb *np, int delay);
+static	void	ncr_init	(struct ncb *np, int reset, char * msg, u_long code);
+static	int	ncr_int_sbmc	(struct ncb *np);
+static	int	ncr_int_par	(struct ncb *np);
+static	void	ncr_int_ma	(struct ncb *np);
+static	void	ncr_int_sir	(struct ncb *np);
+static  void    ncr_int_sto     (struct ncb *np);
 static	u_long	ncr_lookup	(char* id);
 static	void	ncr_negotiate	(struct ncb* np, struct tcb* tp);
-static	int	ncr_prepare_nego(ncb_p np, ccb_p cp, u_char *msgptr);
+static	int	ncr_prepare_nego(struct ncb *np, struct ccb *cp, u_char *msgptr);
 #ifdef SCSI_NCR_INTEGRITY_CHECKING
-static	int	ncr_ic_nego(ncb_p np, ccb_p cp, Scsi_Cmnd *cmd, u_char *msgptr);
+static	int	ncr_ic_nego(struct ncb *np, struct ccb *cp, struct scsi_cmnd *cmd, u_char *msgptr);
 #endif
 
 static	void	ncr_script_copy_and_bind
-				(ncb_p np, ncrcmd *src, ncrcmd *dst, int len);
+				(struct ncb *np, ncrcmd *src, ncrcmd *dst, int len);
 static  void    ncr_script_fill (struct script * scr, struct scripth * scripth);
-static	int	ncr_scatter	(ncb_p np, ccb_p cp, Scsi_Cmnd *cmd);
-static	void	ncr_getsync	(ncb_p np, u_char sfac, u_char *fakp, u_char *scntl3p);
-static	void	ncr_setsync	(ncb_p np, ccb_p cp, u_char scntl3, u_char sxfer);
-static	void	ncr_setup_tags	(ncb_p np, u_char tn, u_char ln);
-static	void	ncr_setwide	(ncb_p np, ccb_p cp, u_char wide, u_char ack);
+static	int	ncr_scatter	(struct ncb *np, struct ccb *cp, struct scsi_cmnd *cmd);
+static	void	ncr_getsync	(struct ncb *np, u_char sfac, u_char *fakp, u_char *scntl3p);
+static	void	ncr_setsync	(struct ncb *np, struct ccb *cp, u_char scntl3, u_char sxfer);
+static	void	ncr_setup_tags	(struct ncb *np, u_char tn, u_char ln);
+static	void	ncr_setwide	(struct ncb *np, struct ccb *cp, u_char wide, u_char ack);
 static	int	ncr_show_msg	(u_char * msg);
-static  void    ncr_print_msg   (ccb_p cp, char *label, u_char *msg);
-static	int	ncr_snooptest	(ncb_p np);
-static	void	ncr_timeout	(ncb_p np);
-static  void    ncr_wakeup      (ncb_p np, u_long code);
-static  void    ncr_wakeup_done (ncb_p np);
-static	void	ncr_start_next_ccb (ncb_p np, lcb_p lp, int maxn);
-static	void	ncr_put_start_queue(ncb_p np, ccb_p cp);
-static	void	ncr_start_reset	(ncb_p np);
-static	int	ncr_reset_scsi_bus (ncb_p np, int enab_int, int settle_delay);
-
-#ifdef SCSI_NCR_USER_COMMAND_SUPPORT
-static	void	ncr_usercmd	(ncb_p np);
-#endif
-
-static void insert_into_waiting_list(ncb_p np, Scsi_Cmnd *cmd);
-static Scsi_Cmnd *retrieve_from_waiting_list(int to_remove, ncb_p np, Scsi_Cmnd *cmd);
-static void process_waiting_list(ncb_p np, int sts);
+static  void    ncr_print_msg   (struct ccb *cp, char *label, u_char *msg);
+static	int	ncr_snooptest	(struct ncb *np);
+static	void	ncr_timeout	(struct ncb *np);
+static  void    ncr_wakeup      (struct ncb *np, u_long code);
+static  void    ncr_wakeup_done (struct ncb *np);
+static	void	ncr_start_next_ccb (struct ncb *np, struct lcb * lp, int maxn);
+static	void	ncr_put_start_queue(struct ncb *np, struct ccb *cp);
+
+static void insert_into_waiting_list(struct ncb *np, struct scsi_cmnd *cmd);
+static struct scsi_cmnd *retrieve_from_waiting_list(int to_remove, struct ncb *np, struct scsi_cmnd *cmd);
+static void process_waiting_list(struct ncb *np, int sts);
 
 #define remove_from_waiting_list(np, cmd) \
 		retrieve_from_waiting_list(1, (np), (cmd))
 #define requeue_waiting_list(np) process_waiting_list((np), DID_OK)
 #define reset_waiting_list(np) process_waiting_list((np), DID_RESET)
 
-static inline char *ncr_name (ncb_p np)
+static inline char *ncr_name (struct ncb *np)
 {
 	return np->inst_name;
 }
@@ -1851,13 +1808,8 @@
 	/*
 	**	... signal completion to the host
 	*/
-#ifdef SIMULATED_INTFLY
 	SCR_INT,
 		SIR_INTFLY,
-#else
-	SCR_INT_FLY,
-		0,
-#endif
 	/*
 	**	Auf zu neuen Schandtaten!
 	*/
@@ -1876,13 +1828,8 @@
 	SCR_INT,
 		SIR_DONE_OVERFLOW,
 }/*------------------------< DONE_END >---------------------*/,{
-#ifdef SIMULATED_INTFLY
 	SCR_INT,
 		SIR_INTFLY,
-#else
-	SCR_INT_FLY,
-		0,
-#endif
 	SCR_COPY (4),
 		RADDR (temp),
 		PADDR (done_pos),
@@ -2226,7 +2173,7 @@
 **-----------------------------------------------------------
 **
 **  ##===========< I=0; i<MAX_DONE >===========
-**  ||	SCR_COPY (sizeof(ccb_p)),
+**  ||	SCR_COPY (sizeof(struct ccb *),
 **  ||		NADDR (header.cp),
 **  ||		NADDR (ccb_done[i]),
 **  ||	SCR_CALL,
@@ -2885,7 +2832,7 @@
 
 	p = scrh->done_queue;
 	for (i = 0; i<MAX_DONE; i++) {
-		*p++ =SCR_COPY (sizeof(ccb_p));
+		*p++ =SCR_COPY (sizeof(struct ccb *));
 		*p++ =NADDR (header.cp);
 		*p++ =NADDR (ccb_done[i]);
 		*p++ =SCR_CALL;
@@ -2944,7 +2891,7 @@
 */
 
 static void __init 
-ncr_script_copy_and_bind (ncb_p np, ncrcmd *src, ncrcmd *dst, int len)
+ncr_script_copy_and_bind (struct ncb *np, ncrcmd *src, ncrcmd *dst, int len)
 {
 	ncrcmd  opcode, new, old, tmp1, tmp2;
 	ncrcmd	*start, *end;
@@ -3115,17 +3062,17 @@
 **	target, lun concerned by a kernel message.
 */
 
-static void PRINT_TARGET(ncb_p np, int target)
+static void PRINT_TARGET(struct ncb *np, int target)
 {
 	printk(KERN_INFO "%s-<%d,*>: ", ncr_name(np), target);
 }
 
-static void PRINT_LUN(ncb_p np, int target, int lun)
+static void PRINT_LUN(struct ncb *np, int target, int lun)
 {
 	printk(KERN_INFO "%s-<%d,%d>: ", ncr_name(np), target, lun);
 }
 
-static void PRINT_ADDR(Scsi_Cmnd *cmd)
+static void PRINT_ADDR(struct scsi_cmnd *cmd)
 {
 	struct host_data *host_data = (struct host_data *) cmd->device->host->hostdata;
 	PRINT_LUN(host_data->ncb, cmd->device->id, cmd->device->lun);
@@ -3164,90 +3111,31 @@
 #define burst_length(bc) (!(bc))? 0 : 1 << (bc)
 
 /*
- *	Burst code from io register bits.  Burst enable is ctest0 for c720,
- *	ctest4 for others.
+ *	Burst code from io register bits.  Burst enable is ctest0 for c720
  */
-#define burst_code(dmode, ctest0, ctest4, ctest5) \
-	(np->device_id == PSEUDO_720_ID) ? \
-	(ctest0) & 0x80? 0 : (((dmode) & 0xc0) >> 6) + 1 : \
-	(ctest4) & 0x80? 0 : (((dmode) & 0xc0) >> 6) + ((ctest5) & 0x04) + 1
+#define burst_code(dmode, ctest0) \
+	(ctest0) & 0x80 ? 0 : (((dmode) & 0xc0) >> 6) + 1
 
 /*
  *	Set initial io register bits from burst code.
  */
-static inline void ncr_init_burst(ncb_p np, u_char bc)
+static inline void ncr_init_burst(struct ncb *np, u_char bc)
 {
-	u_char *be = (np->device_id == PSEUDO_720_ID) ?
-		&np->rv_ctest0 : &np->rv_ctest4;
+	u_char *be = &np->rv_ctest0;
 	*be		&= ~0x80;
 	np->rv_dmode	&= ~(0x3 << 6);
 	np->rv_ctest5	&= ~0x4;
 
 	if (!bc) {
 		*be		|= 0x80;
-	}
-	else {
+	} else {
 		--bc;
 		np->rv_dmode	|= ((bc & 0x3) << 6);
 		np->rv_ctest5	|= (bc & 0x4);
 	}
 }
 
-#ifdef SCSI_NCR_NVRAM_SUPPORT
-
-/*
-**	Get target set-up from Symbios format NVRAM.
-*/
-
-static void __init 
-ncr_Symbios_setup_target(ncb_p np, int target, Symbios_nvram *nvram)
-{
-	tcb_p tp = &np->target[target];
-	Symbios_target *tn = &nvram->target[target];
-
-	tp->usrsync = tn->sync_period ? (tn->sync_period + 3) / 4 : 255;
-	tp->usrwide = tn->bus_width == 0x10 ? 1 : 0;
-	tp->usrtags =
-		(tn->flags & SYMBIOS_QUEUE_TAGS_ENABLED)? MAX_TAGS : 0;
-
-	if (!(tn->flags & SYMBIOS_DISCONNECT_ENABLE))
-		tp->usrflag |= UF_NODISC;
-	if (!(tn->flags & SYMBIOS_SCAN_AT_BOOT_TIME))
-		tp->usrflag |= UF_NOSCAN;
-}
-
-/*
-**	Get target set-up from Tekram format NVRAM.
-*/
-
-static void __init 
-ncr_Tekram_setup_target(ncb_p np, int target, Tekram_nvram *nvram)
-{
-	tcb_p tp = &np->target[target];
-	struct Tekram_target *tn = &nvram->target[target];
-	int i;
-
-	if (tn->flags & TEKRAM_SYNC_NEGO) {
-		i = tn->sync_index & 0xf;
-		tp->usrsync = Tekram_sync[i];
-	}
-
-	tp->usrwide = (tn->flags & TEKRAM_WIDE_NEGO) ? 1 : 0;
-
-	if (tn->flags & TEKRAM_TAGGED_COMMANDS) {
-		tp->usrtags = 2 << nvram->max_tags_index;
-	}
-
-	if (!(tn->flags & TEKRAM_DISCONNECT_ENABLE))
-		tp->usrflag = UF_NODISC;
- 
-	/* If any device does not support parity, we will not use this option */
-	if (!(tn->flags & TEKRAM_PARITY_CHECK))
-		np->rv_scntl0  &= ~0x0a; /* SCSI parity checking disabled */
-}
-#endif /* SCSI_NCR_NVRAM_SUPPORT */
-
-static int __init ncr_prepare_setting(ncb_p np, ncr_nvram *nvram)
+static void __init ncr_prepare_setting(struct ncb *np)
 {
 	u_char	burst_max;
 	u_long	period;
@@ -3278,9 +3166,7 @@
  	/*
 	 *  Guess the frequency of the chip's clock.
 	 */
-	if	(np->features & (FE_ULTRA3 | FE_ULTRA2))
-		np->clock_khz = 160000;
-	else if	(np->features & FE_ULTRA)
+	if (np->features & FE_ULTRA)
 		np->clock_khz = 80000;
 	else
 		np->clock_khz = 40000;
@@ -3329,10 +3215,8 @@
 	 * Check against chip SCSI standard support (SCSI-2,ULTRA,ULTRA2).
 	 */
 
-	if	(np->minsync < 25 && !(np->features & (FE_ULTRA|FE_ULTRA2)))
+	if	(np->minsync < 25 && !(np->features & FE_ULTRA))
 		np->minsync = 25;
-	else if	(np->minsync < 12 && !(np->features & FE_ULTRA2))
-		np->minsync = 12;
 
 	/*
 	 * Maximum synchronous period factor supported by the chip.
@@ -3352,7 +3236,7 @@
 	np->rv_ctest3	= np->sv_ctest3;
 	np->rv_ctest4	= np->sv_ctest4;
 	np->rv_ctest5	= np->sv_ctest5;
-	burst_max	= burst_code(np->sv_dmode, np->sv_ctest0, np->sv_ctest4, np->sv_ctest5);
+	burst_max	= burst_code(np->sv_dmode, np->sv_ctest0);
 #else
 
 	/*
@@ -3360,7 +3244,7 @@
 	*/
 	burst_max	= driver_setup.burst_max;
 	if (burst_max == 255)
-		burst_max = burst_code(np->sv_dmode, np->sv_ctest0, np->sv_ctest4, np->sv_ctest5);
+		burst_max = burst_code(np->sv_dmode, np->sv_ctest0);
 	if (burst_max > 7)
 		burst_max = 7;
 	if (burst_max > np->maxburst)
@@ -3398,25 +3282,6 @@
 	if (driver_setup.scsi_parity)
 		np->rv_scntl0	|= 0x0a;	/*  full arb., ena parity, par->ATN  */
 
-#ifdef SCSI_NCR_NVRAM_SUPPORT
-	/*
-	**	Get parity checking, host ID and verbose mode from NVRAM
-	**/
-	if (nvram) {
-		switch(nvram->type) {
-		case SCSI_NCR_TEKRAM_NVRAM:
-			np->myaddr = nvram->data.Tekram.host_id & 0x0f;
-			break;
-		case SCSI_NCR_SYMBIOS_NVRAM:
-			if (!(nvram->data.Symbios.flags & SYMBIOS_PARITY_ENABLE))
-				np->rv_scntl0  &= ~0x0a;
-			np->myaddr = nvram->data.Symbios.host_id & 0x0f;
-			if (nvram->data.Symbios.flags & SYMBIOS_VERBOSE_MSGS)
-				np->verbose += 1;
-			break;
-		}
-	}
-#endif
 	/*
 	**  Get SCSI addr of host adapter (set by bios?).
 	*/
@@ -3443,9 +3308,7 @@
 	**	  since a 100% safe algorithm is not possible.
 	*/
 	np->scsi_mode = SMODE_SE;
-	if	(np->features & FE_ULTRA2)
-		np->scsi_mode = (np->sv_stest4 & SMODE);
-	else if	(np->features & FE_DIFF) {
+	if (np->features & FE_DIFF) {
 		switch(driver_setup.diff_support) {
 		case 4:	/* Trust previous settings if present, then GPIO3 */
 			if (np->sv_scntl3) {
@@ -3454,8 +3317,6 @@
 				break;
 			}
 		case 3:	/* SYMBIOS controllers report HVD through GPIO3 */
-			if (nvram && nvram->type != SCSI_NCR_SYMBIOS_NVRAM)
-				break;
 			if (INB(nc_gpreg) & 0x08)
 				break;
 		case 2:	/* Set HVD unconditionally */
@@ -3478,8 +3339,7 @@
 	**	that drive the LED directly.
 	**	Also probe initial setting of GPIO0 as output.
 	*/
-	if ((driver_setup.led_pin ||
-	     (nvram && nvram->type == SCSI_NCR_SYMBIOS_NVRAM)) &&
+	if ((driver_setup.led_pin) &&
 	    !(np->features & FE_LEDC) && !(np->sv_gpcntl & 0x01))
 		np->features |= FE_LED0;
 
@@ -3499,51 +3359,24 @@
 
 	/*
 	**	Configure targets according to driver setup.
-	**	If NVRAM present get targets setup from NVRAM.
 	**	Allow to override sync, wide and NOSCAN from 
 	**	boot command line.
 	*/
 	for (i = 0 ; i < MAX_TARGET ; i++) {
-		tcb_p tp = &np->target[i];
+		struct tcb *tp = &np->target[i];
 
-		tp->usrsync = 255;
-#ifdef SCSI_NCR_NVRAM_SUPPORT
-		if (nvram) {
-			switch(nvram->type) {
-			case SCSI_NCR_TEKRAM_NVRAM:
-				ncr_Tekram_setup_target(np, i, &nvram->data.Tekram);
-				break;
-			case SCSI_NCR_SYMBIOS_NVRAM:
-				ncr_Symbios_setup_target(np, i, &nvram->data.Symbios);
-				break;
-			}
-			if (driver_setup.use_nvram & 0x2)
-				tp->usrsync = driver_setup.default_sync;
-			if (driver_setup.use_nvram & 0x4)
-				tp->usrwide = driver_setup.max_wide;
-			if (driver_setup.use_nvram & 0x8)
-				tp->usrflag &= ~UF_NOSCAN;
-		}
-		else {
-#else
-		if (1) {
-#endif
-			tp->usrsync = driver_setup.default_sync;
-			tp->usrwide = driver_setup.max_wide;
-			tp->usrtags = MAX_TAGS;
-			if (!driver_setup.disconnection)
-				np->target[i].usrflag = UF_NODISC;
-		}
+		tp->usrsync = driver_setup.default_sync;
+		tp->usrwide = driver_setup.max_wide;
+		tp->usrtags = MAX_TAGS;
+		if (!driver_setup.disconnection)
+			np->target[i].usrflag = UF_NODISC;
 	}
 
 	/*
 	**	Announce all that stuff to user.
 	*/
 
-	i = nvram ? nvram->type : 0;
-	printk(KERN_INFO "%s: %sID %d, Fast-%d%s%s\n", ncr_name(np),
-		i  == SCSI_NCR_SYMBIOS_NVRAM ? "Symbios format NVRAM, " :
-		(i == SCSI_NCR_TEKRAM_NVRAM  ? "Tekram format NVRAM, " : ""),
+	printk(KERN_INFO "%s: ID %d, Fast-%d%s%s\n", ncr_name(np),
 		np->myaddr,
 		np->minsync < 12 ? 40 : (np->minsync < 25 ? 20 : 10),
 		(np->rv_scntl0 & 0xa)	? ", Parity Checking"	: ", NO Parity",
@@ -3564,354 +3397,8 @@
 	if (bootverbose && np->paddr2)
 		printk (KERN_INFO "%s: on-chip RAM at 0x%lx\n",
 			ncr_name(np), np->paddr2);
-
-	return 0;
-}
-
-/*
-**	Host attach and initialisations.
-**
-**	Allocate host data and ncb structure.
-**	Request IO region and remap MMIO region.
-**	Do chip initialization.
-**	If all is OK, install interrupt handling and
-**	start the timer daemon.
-*/
-
-struct Scsi_Host * __init 
-ncr_attach (Scsi_Host_Template *tpnt, int unit, struct ncr_device *device)
-{
-        struct host_data *host_data;
-	ncb_p np = 0;
-        struct Scsi_Host *instance = 0;
-	u_long flags = 0;
-	ncr_nvram *nvram = device->nvram;
-	int i;
-
-#ifdef SCSI_NCR_PROC_INFO_SUPPORT
-	tpnt->proc_info		= ncr53c8xx_proc_info,
-#endif
-	tpnt->info 		= ncr53c8xx_info;
-	tpnt->queuecommand	= ncr53c8xx_queue_command;
-	tpnt->slave_configure	= ncr53c8xx_slave_configure;
-	tpnt->eh_bus_reset_handler	= ncr53c8xx_bus_reset;
-	tpnt->can_queue		= SCSI_NCR_CAN_QUEUE;
-	tpnt->this_id		= 7;
-	tpnt->sg_tablesize	= SCSI_NCR_SG_TABLESIZE;
-	tpnt->cmd_per_lun	= SCSI_NCR_CMD_PER_LUN;
-	tpnt->use_clustering	= DISABLE_CLUSTERING;
-
-	if(device->differential)
-		driver_setup.diff_support = device->differential;
-
-	printk(KERN_INFO "ncr53c%s-%d: rev 0x%x on bus %d device %d function %d irq %d\n",
-		device->chip.name, unit, device->chip.revision_id,
-		device->slot.bus, (device->slot.device_fn & 0xf8) >> 3,
-		device->slot.device_fn & 7,
-		device->slot.irq);
-
-	/*
-	**	Allocate host_data structure
-	*/
-        if (!(instance = scsi_host_alloc(tpnt, sizeof(*host_data))))
-	        goto attach_error;
-	host_data = (struct host_data *) instance->hostdata;
-
-	/*
-	**	Allocate the host control block.
-	*/
-	np = __m_calloc_dma(device->dev, sizeof(struct ncb), "NCB");
-	if (!np)
-		goto attach_error;
-	NCR_INIT_LOCK_NCB(np);
-	np->dev  = device->dev;
-	np->p_ncb = vtobus(np);
-	host_data->ncb = np;
-
-	/*
-	**	Allocate the default CCB.
-	*/
-	np->ccb = (ccb_p) m_calloc_dma(sizeof(struct ccb), "CCB");
-	if (!np->ccb)
-		goto attach_error;
-
-	/*
-	**	Store input informations in the host data structure.
-	*/
-	strlcpy(np->chip_name, device->chip.name, sizeof(np->chip_name));
-	np->unit	= unit;
-	np->verbose	= driver_setup.verbose;
-	sprintf(np->inst_name, "ncr53c%s-%d", np->chip_name, np->unit);
-	np->device_id	= device->chip.device_id;
-	np->revision_id	= device->chip.revision_id;
-	np->bus		= device->slot.bus;
-	np->device_fn	= device->slot.device_fn;
-	np->features	= device->chip.features;
-	np->clock_divn	= device->chip.nr_divisor;
-	np->maxoffs	= device->chip.offset_max;
-	np->maxburst	= device->chip.burst_max;
-	np->myaddr	= device->host_id;
-
-	/*
-	**	Allocate SCRIPTS areas.
-	*/
-	np->script0  = (struct script *)
-			m_calloc_dma(sizeof(struct script), "SCRIPT");
-	if (!np->script0)
-		goto attach_error;
-	np->scripth0  = (struct scripth *)
-			m_calloc_dma(sizeof(struct scripth), "SCRIPTH");
-	if (!np->scripth0)
-		goto attach_error;
-
-	/*
-	**    Initialize timer structure
-        **
-        */
-	init_timer(&np->timer);
-	np->timer.data     = (unsigned long) np;
-	np->timer.function = ncr53c8xx_timeout;
-
-	/*
-	**	Try to map the controller chip to
-	**	virtual and physical memory.
-	*/
-
-	np->paddr	= device->slot.base;
-	np->paddr2	= (np->features & FE_RAM)? device->slot.base_2 : 0;
-
-#ifndef SCSI_NCR_IOMAPPED
-	if(device->slot.base_v)
-		np->vaddr = device->slot.base_v;
-	else
-		np->vaddr = (unsigned long)ioremap(device->slot.base_c, 128);
-
-	if (!np->vaddr) {
-		printk(KERN_ERR
-			"%s: can't map memory mapped IO region\n",ncr_name(np));
-		goto attach_error;
-	}
-	else
-		if (bootverbose > 1)
-			printk(KERN_INFO
-				"%s: using memory mapped IO at virtual address 0x%lx\n", ncr_name(np), (u_long) np->vaddr);
-
-	/*
-	**	Make the controller's registers available.
-	**	Now the INB INW INL OUTB OUTW OUTL macros
-	**	can be used safely.
-	*/
-
-	np->reg = (struct ncr_reg*) np->vaddr;
-
-#else
-
-	/*
-	**	Try to map the controller chip into iospace.
-	*/
-
-	np->base_io = device->slot.io_port;
-#endif /* !defined SCSI_NCR_IOMAPPED */
-
-#ifdef SCSI_NCR_NVRAM_SUPPORT
-	if (nvram) {
-		switch(nvram->type) {
-		case SCSI_NCR_SYMBIOS_NVRAM:
-#ifdef SCSI_NCR_DEBUG_NVRAM
-			ncr_display_Symbios_nvram(&nvram->data.Symbios);
-#endif
-			break;
-		case SCSI_NCR_TEKRAM_NVRAM:
-#ifdef SCSI_NCR_DEBUG_NVRAM
-			ncr_display_Tekram_nvram(&nvram->data.Tekram);
-#endif
-			break;
-		default:
-			nvram = 0;
-#ifdef SCSI_NCR_DEBUG_NVRAM
-			printk(KERN_DEBUG "%s: NVRAM: None or invalid data.\n", ncr_name(np));
-#endif
-		}
-	}
-#endif
-
-	/*
-	**	Do chip dependent initialization.
-	*/
-	(void)ncr_prepare_setting(np, nvram);
-
-	if (np->paddr2 && sizeof(struct script) > 4096) {
-		np->paddr2 = 0;
-		printk(KERN_WARNING "%s: script too large, NOT using on chip RAM.\n",
-			ncr_name(np));
-	}
-
-	/*
-	**	Fill Linux host instance structure
-	*/
-	instance->max_channel	= 0;
-	instance->this_id       = np->myaddr;
-	instance->max_id	= np->maxwide ? 16 : 8;
-	instance->max_lun	= SCSI_NCR_MAX_LUN;
-#ifndef SCSI_NCR_IOMAPPED
-	instance->base		= (unsigned long) np->reg;
-#endif
-	instance->irq		= device->slot.irq;
-	instance->unique_id	= device->slot.io_port;
-	instance->io_port	= device->slot.io_port;
-	instance->n_io_port	= 128;
-	instance->dma_channel	= 0;
-	instance->cmd_per_lun	= MAX_TAGS;
-	instance->can_queue	= (MAX_START-4);
-	scsi_set_device(instance, device->dev);
-
-#ifdef SCSI_NCR_INTEGRITY_CHECKING
-	np->check_integrity	  = 0;
-	instance->check_integrity = 0;
-
-#ifdef SCSI_NCR_ENABLE_INTEGRITY_CHECK
-	if ( !(driver_setup.bus_check & 0x04) ) {
-		np->check_integrity	  = 1;
-		instance->check_integrity = 1;
-	}
-#endif
-#endif
-	/*
-	**	Patch script to physical addresses
-	*/
-	ncr_script_fill (&script0, &scripth0);
-
-	np->scripth	= np->scripth0;
-	np->p_scripth	= vtobus(np->scripth);
-
-	np->p_script	= (np->paddr2) ?  np->paddr2 : vtobus(np->script0);
-
-	ncr_script_copy_and_bind (np, (ncrcmd *) &script0, (ncrcmd *) np->script0, sizeof(struct script));
-	ncr_script_copy_and_bind (np, (ncrcmd *) &scripth0, (ncrcmd *) np->scripth0, sizeof(struct scripth));
-	np->ccb->p_ccb		= vtobus (np->ccb);
-
-	/*
-	**    Patch the script for LED support.
-	*/
-
-	if (np->features & FE_LED0) {
-		np->script0->idle[0]  =
-				cpu_to_scr(SCR_REG_REG(gpreg, SCR_OR,  0x01));
-		np->script0->reselected[0] =
-				cpu_to_scr(SCR_REG_REG(gpreg, SCR_AND, 0xfe));
-		np->script0->start[0] =
-				cpu_to_scr(SCR_REG_REG(gpreg, SCR_AND, 0xfe));
-	}
-
-	/*
-	**	Look for the target control block of this nexus.
-	**	For i = 0 to 3
-	**		JUMP ^ IFTRUE (MASK (i, 3)), @(next_lcb)
-	*/
-	for (i = 0 ; i < 4 ; i++) {
-		np->jump_tcb[i].l_cmd   =
-				cpu_to_scr((SCR_JUMP ^ IFTRUE (MASK (i, 3))));
-		np->jump_tcb[i].l_paddr =
-				cpu_to_scr(NCB_SCRIPTH_PHYS (np, bad_target));
-	}
-
-	/*
-	**	Reset chip.
-	*/
-	ncr_chip_reset(np, 100);
-
-	/*
-	**	Now check the cache handling of the chipset.
-	*/
-
-	if (ncr_snooptest (np)) {
-		printk (KERN_ERR "CACHE INCORRECTLY CONFIGURED.\n");
-		goto attach_error;
-	};
-
-	/*
-	**	Install the interrupt handler.
-	*/
-
-	np->irq = device->slot.irq;
-
-	/*
-	**	Initialize the fixed part of the default ccb.
-	*/
-	ncr_init_ccb(np, np->ccb);
-
-	/*
-	**	After SCSI devices have been opened, we cannot
-	**	reset the bus safely, so we do it here.
-	**	Interrupt handler does the real work.
-	**	Process the reset exception,
-	**	if interrupts are not enabled yet.
-	**	Then enable disconnects.
-	*/
-	NCR_LOCK_NCB(np, flags);
-	if (ncr_reset_scsi_bus(np, 0, driver_setup.settle_delay) != 0) {
-		printk(KERN_ERR "%s: FATAL ERROR: CHECK SCSI BUS - CABLES, TERMINATION, DEVICE POWER etc.!\n", ncr_name(np));
-
-		NCR_UNLOCK_NCB(np, flags);
-		goto attach_error;
-	}
-	ncr_exception (np);
-
-	np->disc = 1;
-
-	/*
-	**	The middle-level SCSI driver does not
-	**	wait for devices to settle.
-	**	Wait synchronously if more than 2 seconds.
-	*/
-	if (driver_setup.settle_delay > 2) {
-		printk(KERN_INFO "%s: waiting %d seconds for scsi devices to settle...\n",
-			ncr_name(np), driver_setup.settle_delay);
-		MDELAY (1000 * driver_setup.settle_delay);
-	}
-
-	/*
-	**	Now let the generic SCSI driver
-	**	look for the SCSI devices on the bus ..
-	*/
-
-	/*
-	**	start the timeout daemon
-	*/
-	np->lasttime=0;
-	ncr_timeout (np);
-
-	/*
-	**  use SIMPLE TAG messages by default
-	*/
-#ifdef SCSI_NCR_ALWAYS_SIMPLE_TAG
-	np->order = M_SIMPLE_TAG;
-#endif
-
-	NCR_UNLOCK_NCB(np, flags);
-
-	return instance;
-
-attach_error:
-	if (!instance) return NULL;
-	printk(KERN_INFO "%s: detaching...\n", ncr_name(np));
-	if (!np)
-		goto unregister;
-	if (np->scripth0)
-		m_free_dma(np->scripth0, sizeof(struct scripth), "SCRIPTH");
-	if (np->script0)
-		m_free_dma(np->script0, sizeof(struct script), "SCRIPT");
-	if (np->ccb)
-		m_free_dma(np->ccb, sizeof(struct ccb), "CCB");
-	m_free_dma(np, sizeof(struct ncb), "NCB");
-
-unregister:
-	scsi_host_put(instance);
-
-        return NULL;
 }
 
-
 /*==========================================================
 **
 **
@@ -3931,20 +3418,20 @@
 **
 **==========================================================
 */
-static inline void ncr_queue_done_cmd(ncb_p np, Scsi_Cmnd *cmd)
+static inline void ncr_queue_done_cmd(struct ncb *np, struct scsi_cmnd *cmd)
 {
 	unmap_scsi_data(np, cmd);
 	cmd->host_scribble = (char *) np->done_list;
 	np->done_list = cmd;
 }
 
-static inline void ncr_flush_done_cmds(Scsi_Cmnd *lcmd)
+static inline void ncr_flush_done_cmds(struct scsi_cmnd *lcmd)
 {
-	Scsi_Cmnd *cmd;
+	struct scsi_cmnd *cmd;
 
 	while (lcmd) {
 		cmd = lcmd;
-		lcmd = (Scsi_Cmnd *) cmd->host_scribble;
+		lcmd = (struct scsi_cmnd *) cmd->host_scribble;
 		cmd->scsi_done(cmd);
 	}
 }
@@ -3964,9 +3451,9 @@
 */
 
 #ifdef SCSI_NCR_INTEGRITY_CHECKING
-static int ncr_ic_nego(ncb_p np, ccb_p cp, Scsi_Cmnd *cmd, u_char *msgptr)
+static int ncr_ic_nego(struct ncb *np, struct ccb *cp, struct scsi_cmnd *cmd, u_char *msgptr)
 {
-	tcb_p tp = &np->target[cp->target];
+	struct tcb *tp = &np->target[cp->target];
 	int msglen = 0;
 	int nego = 0;
 	u_char no_increase;
@@ -4018,7 +3505,7 @@
 		}
 		
 		/* In case of a bus reset, ncr_negotiate will reset 
-                 * the flags tp->widedone and tp->period to 0, forcing
+		 * the flags tp->widedone and tp->period to 0, forcing
 		 * a new negotiation. 
 		 */
 		no_increase = 0;
@@ -4050,7 +3537,7 @@
 			}
 			else
 				cmd->ic_nego_width &= tp->ic_max_width;
-              
+
 			break;
 
 		case NS_SYNC:
@@ -4139,9 +3626,9 @@
 */
 
 
-static int ncr_prepare_nego(ncb_p np, ccb_p cp, u_char *msgptr)
+static int ncr_prepare_nego(struct ncb *np, struct ccb *cp, u_char *msgptr)
 {
-	tcb_p tp = &np->target[cp->target];
+	struct tcb *tp = &np->target[cp->target];
 	int msglen = 0;
 	int nego = 0;
 
@@ -4223,16 +3710,16 @@
 **
 **==========================================================
 */
-static int ncr_queue_command (ncb_p np, Scsi_Cmnd *cmd)
+static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd)
 {
-/*	Scsi_Device        *device    = cmd->device; */
-	tcb_p tp                      = &np->target[cmd->device->id];
-	lcb_p lp		      = tp->lp[cmd->device->lun];
-	ccb_p cp;
+/*	struct scsi_device        *device    = cmd->device; */
+	struct tcb *tp                      = &np->target[cmd->device->id];
+	struct lcb *lp		      = tp->lp[cmd->device->lun];
+	struct ccb *cp;
 
 	int	segments;
 	u_char	idmsg, *msgptr;
-	u_int  msglen;
+	u32	msglen;
 	int	direction;
 	u32	lastp, goalp;
 
@@ -4246,7 +3733,7 @@
 		(cmd->device->id >= MAX_TARGET) ||
 		(cmd->device->lun    >= MAX_LUN   )) {
 		return(DID_BAD_TARGET);
-        }
+	}
 
 	/*---------------------------------------------
 	**
@@ -4284,7 +3771,7 @@
 			np->settle_time = tlimit;
 	}
 
-        if (np->settle_time || !(cp=ncr_get_ccb (np, cmd->device->id, cmd->device->lun))) {
+	if (np->settle_time || !(cp=ncr_get_ccb (np, cmd->device->id, cmd->device->lun))) {
 		insert_into_waiting_list(np, cmd);
 		return(DID_OK);
 	}
@@ -4358,7 +3845,7 @@
 
 	direction = scsi_data_direction(cmd);
 	if (direction != SCSI_DATA_NONE) {
-		segments = ncr_scatter (np, cp, cp->cmd);
+		segments = ncr_scatter(np, cp, cp->cmd);
 		if (segments < 0) {
 			ncr_free_ccb(np, cp);
 			return(DID_ERROR);
@@ -4388,13 +3875,13 @@
 	}
 	else if (np->check_integrity && (cmd->ic_in_progress)) { 
 		msglen += ncr_ic_nego (np, cp, cmd, msgptr + msglen);
-        }
+	}
 	else if (np->check_integrity && cmd->ic_complete) {
-                /*
-                 * Midlayer signal to the driver that all of the scsi commands
-                 * for the integrity check have completed. Save the negotiated
-                 * parameters (extracted from sval and wval). 
-                 */ 
+		/*
+		 * Midlayer signal to the driver that all of the scsi commands
+		 * for the integrity check have completed. Save the negotiated
+		 * parameters (extracted from sval and wval). 
+		 */ 
 
 		{
 			u_char idiv;
@@ -4417,8 +3904,8 @@
 
 
 		/*
-                 * Negotiation for this target it complete.
-                 */
+		 * Negotiation for this target it complete.
+		 */
 		tp->ic_max_width =  (tp->wval & EWS) ? 1: 0;
 		tp->ic_done = 1;
 		tp->widedone = 1;
@@ -4430,17 +3917,17 @@
 				tp->ic_max_width?"WIDE":"NARROW");
 
 		if (tp->sval&0x1f) {
-                        u_long mbs = 10000 * (tp->ic_max_width + 1);
+			u_long mbs = 10000 * (tp->ic_max_width + 1);
 
-                        printk(" %d.%d  MB/s", 
-                                (int) (mbs / tp->period), (int) (mbs % tp->period));
+			printk(" %d.%d  MB/s", (int) (mbs / tp->period),
+					(int) (mbs % tp->period));
 
 			printk(" (%d ns, %d offset)\n", 
 				  tp->period/10, tp->sval&0x1f);
+		} else {
+			printk(" %d MB/s. \n ", (tp->ic_max_width+1)*5);
 		}
-		else
-                        printk(" %d MB/s. \n ", (tp->ic_max_width+1)*5);
-        }
+	}
 #else
 	if ((!tp->widedone || !tp->period) && !tp->nego_cp && lp) {
 		msglen += ncr_prepare_nego (np, cp, msgptr + msglen);
@@ -4600,10 +4087,10 @@
 **==========================================================
 */
 
-static void ncr_start_next_ccb(ncb_p np, lcb_p lp, int maxn)
+static void ncr_start_next_ccb(struct ncb *np, struct lcb *lp, int maxn)
 {
 	XPT_QUEHEAD *qp;
-	ccb_p cp;
+	struct ccb *cp;
 
 	if (lp->held_ccb)
 		return;
@@ -4621,9 +4108,9 @@
 	}
 }
 
-static void ncr_put_start_queue(ncb_p np, ccb_p cp)
+static void ncr_put_start_queue(struct ncb *np, struct ccb *cp)
 {
-	u_short	qidx;
+	u16	qidx;
 
 	/*
 	**	insert into start queue.
@@ -4646,32 +4133,13 @@
 	/*
 	**	Script processor may be waiting for reselect.
 	**	Wake it up.
-	*/
-	MEMORY_BARRIER();
-	OUTB (nc_istat, SIGP);
-}
-
-
-/*==========================================================
-**
-**
-**	Start reset process.
-**	If reset in progress do nothing.
-**	The interrupt handler will reinitialize the chip.
-**	The timeout handler will wait for settle_time before 
-**	clearing it and so resuming command processing.
-**
-**
-**==========================================================
-*/
-static void ncr_start_reset(ncb_p np)
-{
-	if (!np->settle_time) {
-		(void) ncr_reset_scsi_bus(np, 1, driver_setup.settle_delay);
- 	}
- }
- 
-static int ncr_reset_scsi_bus(ncb_p np, int enab_int, int settle_delay)
+	*/
+	MEMORY_BARRIER();
+	OUTB (nc_istat, SIGP);
+}
+
+
+static int ncr_reset_scsi_bus(struct ncb *np, int enab_int, int settle_delay)
 {
 	u32 term;
 	int retv = 0;
@@ -4692,8 +4160,6 @@
 	**	properly set IRQ mode, prior to resetting the bus.
 	*/
 	OUTB (nc_stest3, TE);
-	if (np->device_id != PSEUDO_720_ID)
-		OUTB (nc_dcntl, (np->rv_dcntl & IRQM));
 	OUTB (nc_scntl1, CRST);
 	UDELAY (200);
 
@@ -4732,6 +4198,20 @@
 	return retv;
 }
 
+/*
+ * Start reset process.
+ * If reset in progress do nothing.
+ * The interrupt handler will reinitialize the chip.
+ * The timeout handler will wait for settle_time before 
+ * clearing it and so resuming command processing.
+ */
+static void ncr_start_reset(struct ncb *np)
+{
+	if (!np->settle_time) {
+		ncr_reset_scsi_bus(np, 1, driver_setup.settle_delay);
+ 	}
+}
+ 
 /*==========================================================
 **
 **
@@ -4741,10 +4221,10 @@
 **
 **==========================================================
 */
-static int ncr_reset_bus (ncb_p np, Scsi_Cmnd *cmd, int sync_reset)
+static int ncr_reset_bus (struct ncb *np, struct scsi_cmnd *cmd, int sync_reset)
 {
-/*	Scsi_Device        *device    = cmd->device; */
-	ccb_p cp;
+/*	struct scsi_device        *device    = cmd->device; */
+	struct ccb *cp;
 	int found;
 
 /*
@@ -4809,10 +4289,10 @@
 **
 **==========================================================
 */
-static int ncr_abort_command (ncb_p np, Scsi_Cmnd *cmd)
+static int ncr_abort_command (struct ncb *np, struct scsi_cmnd *cmd)
 {
-/*	Scsi_Device        *device    = cmd->device; */
-	ccb_p cp;
+/*	struct scsi_device        *device    = cmd->device; */
+	struct ccb *cp;
 	int found;
 	int retv;
 
@@ -4892,11 +4372,11 @@
 **==========================================================
 */
 
-static int ncr_detach(ncb_p np)
+static void ncr_detach(struct ncb *np)
 {
-	ccb_p cp;
-	tcb_p tp;
-	lcb_p lp;
+	struct ccb *cp;
+	struct tcb *tp;
+	struct lcb *lp;
 	int target, lun;
 	int i;
 	char inst_name[16];
@@ -4965,9 +4445,7 @@
 		m_free_dma(cp, sizeof(*cp), "CCB");
 	}
 
-	/*
-	**	Free allocated tp(s)
-	*/
+	/* Free allocated tp(s) */
 
 	for (target = 0; target < MAX_TARGET ; target++) {
 		tp=&np->target[target];
@@ -4993,8 +4471,6 @@
 	m_free_dma(np, sizeof(struct ncb), "NCB");
 
 	printk("%s: host resources successfully released\n", inst_name);
-
-	return 1;
 }
 
 /*==========================================================
@@ -5007,11 +4483,11 @@
 **==========================================================
 */
 
-void ncr_complete (ncb_p np, ccb_p cp)
+void ncr_complete (struct ncb *np, struct ccb *cp)
 {
-	Scsi_Cmnd *cmd;
-	tcb_p tp;
-	lcb_p lp;
+	struct scsi_cmnd *cmd;
+	struct tcb *tp;
+	struct lcb *lp;
 
 	/*
 	**	Sanity check
@@ -5113,11 +4589,11 @@
 	if (   (cp->host_status == HS_COMPLETE)
 		&& (cp->scsi_status == S_GOOD ||
 		    cp->scsi_status == S_COND_MET)) {
-                /*
-		**	All went well (GOOD status).
-		**	CONDITION MET status is returned on 
-                **	`Pre-Fetch' or `Search data' success.
-                */
+		/*
+		 *	All went well (GOOD status).
+		 *	CONDITION MET status is returned on 
+		 *	`Pre-Fetch' or `Search data' success.
+		 */
 		cmd->result = ScsiResult(DID_OK, cp->scsi_status);
 
 		/*
@@ -5300,10 +4776,10 @@
 **	This CCB has been skipped by the NCR.
 **	Queue it in the correponding unit queue.
 */
-static void ncr_ccb_skipped(ncb_p np, ccb_p cp)
+static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp)
 {
-	tcb_p tp = &np->target[cp->target];
-	lcb_p lp = tp->lp[cp->lun];
+	struct tcb *tp = &np->target[cp->target];
+	struct lcb *lp = tp->lp[cp->lun];
 
 	if (lp && cp != np->ccb) {
 		cp->host_status &= ~HS_SKIPMASK;
@@ -5325,9 +4801,9 @@
 **	The NCR has completed CCBs.
 **	Look at the DONE QUEUE if enabled, otherwise scan all CCBs
 */
-void ncr_wakeup_done (ncb_p np)
+void ncr_wakeup_done (struct ncb *np)
 {
-	ccb_p cp;
+	struct ccb *cp;
 #ifdef SCSI_NCR_CCB_DONE_SUPPORT
 	int i, j;
 
@@ -5341,7 +4817,7 @@
 		if (!CCB_DONE_VALID(cp))
 			break;
 
-		np->ccb_done[j] = (ccb_p) CCB_DONE_EMPTY;
+		np->ccb_done[j] = (struct ccb *)CCB_DONE_EMPTY;
 		np->scripth->done_queue[5*j + 4] =
 				cpu_to_scr(NCB_SCRIPT_PHYS (np, done_plug));
 		MEMORY_BARRIER();
@@ -5371,9 +4847,9 @@
 /*
 **	Complete all active CCBs.
 */
-void ncr_wakeup (ncb_p np, u_long code)
+void ncr_wakeup (struct ncb *np, u_long code)
 {
-	ccb_p cp = np->ccb;
+	struct ccb *cp = np->ccb;
 
 	while (cp) {
 		if (cp->host_status != HS_IDLE) {
@@ -5392,7 +4868,7 @@
  * at least.  EA (dcntl bit 5) isn't set here as it is set once only in
  * the _detect function.
  */
-static void ncr_chip_reset(ncb_p np, int delay)
+static void ncr_chip_reset(struct ncb *np, int delay)
 {
 	OUTB (nc_istat,  SRST);
 	UDELAY (delay);
@@ -5414,7 +4890,7 @@
 **==========================================================
 */
 
-void ncr_init (ncb_p np, int reset, char * msg, u_long code)
+void ncr_init (struct ncb *np, int reset, char * msg, u_long code)
 {
  	int	i;
 
@@ -5456,7 +4932,7 @@
 	**	Clear Done Queue
 	*/
 	for (i = 0; i < MAX_DONE; i++) {
-		np->ccb_done[i] = (ccb_p) CCB_DONE_EMPTY;
+		np->ccb_done[i] = (struct ccb *)CCB_DONE_EMPTY;
 		np->scripth0->done_queue[5*i + 4] =
 			cpu_to_scr(NCB_SCRIPT_PHYS (np, done_end));
 	}
@@ -5528,24 +5004,6 @@
 	OUTB (nc_dien , MDPE|BF|ABRT|SSI|SIR|IID);
 
 	/*
-	**	For 895/6 enable SBMC interrupt and save current SCSI bus mode.
-	*/
-	if (np->features & FE_ULTRA2) {
-		OUTONW (nc_sien, SBMC);
-		np->scsi_mode = INB (nc_stest4) & SMODE;
-	}
-
-	/*
-	**	DEL 441 - 53C876 Rev 5 - Part Number 609-0392787/2788 - ITEM 2.
-	**	Disable overlapped arbitration.
-	**	All 896 chips are also affected by this errata.
-	*/
-	if (np->device_id == PCI_DEVICE_ID_NCR_53C875)
-		OUTB (nc_ctest0, (1<<5));
-	else if (np->device_id == PCI_DEVICE_ID_NCR_53C896)
-		OUTB (nc_ccntl0, DPR);
-
-	/*
 	**	Fill in target structure.
 	**	Reinitialize usrsync.
 	**	Reinitialize usrwide.
@@ -5553,7 +5011,7 @@
 	*/
 
 	for (i=0;i<MAX_TARGET;i++) {
-		tcb_p tp = &np->target[i];
+		struct tcb *tp = &np->target[i];
 
 		tp->sval    = 0;
 		tp->wval    = np->rv_scntl3;
@@ -5651,7 +5109,7 @@
 **==========================================================
 */
 
-static void ncr_getsync(ncb_p np, u_char sfac, u_char *fakp, u_char *scntl3p)
+static void ncr_getsync(struct ncb *np, u_char sfac, u_char *fakp, u_char *scntl3p)
 {
 	u_long	clk = np->clock_khz;	/* SCSI clock frequency in kHz	*/
 	int	div = np->clock_divn;	/* Number of divisors supported	*/
@@ -5720,10 +5178,10 @@
 **==========================================================
 */
 
-static void ncr_set_sync_wide_status (ncb_p np, u_char target)
+static void ncr_set_sync_wide_status (struct ncb *np, u_char target)
 {
-	ccb_p cp;
-	tcb_p tp = &np->target[target];
+	struct ccb *cp;
+	struct tcb *tp = &np->target[target];
 
 	/*
 	**	set actual value and sync_status
@@ -5755,10 +5213,10 @@
 **==========================================================
 */
 
-static void ncr_setsync (ncb_p np, ccb_p cp, u_char scntl3, u_char sxfer)
+static void ncr_setsync (struct ncb *np, struct ccb *cp, u_char scntl3, u_char sxfer)
 {
-	Scsi_Cmnd *cmd;
-	tcb_p tp;
+	struct scsi_cmnd *cmd;
+	struct tcb *tp;
 	u_char target = INB (nc_sdid) & 0x0f;
 	u_char idiv;
 
@@ -5839,11 +5297,11 @@
 **==========================================================
 */
 
-static void ncr_setwide (ncb_p np, ccb_p cp, u_char wide, u_char ack)
+static void ncr_setwide (struct ncb *np, struct ccb *cp, u_char wide, u_char ack)
 {
-	Scsi_Cmnd *cmd;
-	u_short target = INB (nc_sdid) & 0x0f;
-	tcb_p tp;
+	struct scsi_cmnd *cmd;
+	u16 target = INB (nc_sdid) & 0x0f;
+	struct tcb *tp;
 	u_char	scntl3;
 	u_char	sxfer;
 
@@ -5893,10 +5351,10 @@
 **==========================================================
 */
 
-static void ncr_setup_tags (ncb_p np, u_char tn, u_char ln)
+static void ncr_setup_tags (struct ncb *np, u_char tn, u_char ln)
 {
-	tcb_p tp = &np->target[tn];
-	lcb_p lp = tp->lp[ln];
+	struct tcb *tp = &np->target[tn];
+	struct lcb *lp = tp->lp[ln];
 	u_char   reqtags, maxdepth;
 
 	/*
@@ -5989,10 +5447,10 @@
 
 #ifdef SCSI_NCR_USER_COMMAND_SUPPORT
 
-static void ncr_usercmd (ncb_p np)
+static void ncr_usercmd (struct ncb *np)
 {
 	u_char t;
-	tcb_p tp;
+	struct tcb *tp;
 
 	switch (np->user.cmd) {
 
@@ -6013,7 +5471,7 @@
 			if (!((np->user.target>>t)&1)) continue;
 			np->target[t].usrtags = np->user.data;
 			for (ln = 0; ln < MAX_LUN; ln++) {
-				lcb_p lp = np->target[t].lp[ln];
+				struct lcb *lp = np->target[t].lp[ln];
 				if (!lp)
 					continue;
 				lp->maxtags = lp->numtags = np->user.data;
@@ -6074,7 +5532,7 @@
 **----------------------------------------------------------
 */
 
-static void ncr_timeout (ncb_p np)
+static void ncr_timeout (struct ncb *np)
 {
 	u_long	thistime = ktime_get(0);
 
@@ -6162,7 +5620,7 @@
 **==========================================================
 */
 
-static void ncr_log_hard_error(ncb_p np, u_short sist, u_char dstat)
+static void ncr_log_hard_error(struct ncb *np, u16 sist, u_char dstat)
 {
 	u32	dsp;
 	int	script_ofs;
@@ -6204,10 +5662,10 @@
 			scr_to_cpu((int) *(ncrcmd *)(script_base + script_ofs)));
 	}
 
-        printk ("%s: regdump:", ncr_name(np));
-        for (i=0; i<16;i++)
+	printk ("%s: regdump:", ncr_name(np));
+	for (i=0; i<16;i++)
             printk (" %02x", (unsigned)INB_OFF(i));
-        printk (".\n");
+	printk (".\n");
 }
 
 /*============================================================
@@ -6242,10 +5700,10 @@
 **============================================================
 */
 
-void ncr_exception (ncb_p np)
+void ncr_exception (struct ncb *np)
 {
 	u_char	istat, dstat;
-	u_short	sist;
+	u16	sist;
 	int	i;
 
 	/*
@@ -6425,10 +5883,10 @@
 **----------------------------------------------------------
 */
 
-void ncr_int_sto (ncb_p np)
+void ncr_int_sto (struct ncb *np)
 {
 	u_long dsa;
-	ccb_p cp;
+	struct ccb *cp;
 	if (DEBUG_FLAGS & DEBUG_TINY) printk ("T");
 
 	/*
@@ -6470,7 +5928,7 @@
 **----------------------------------------------------------
 */
 
-static int ncr_int_sbmc (ncb_p np)
+static int ncr_int_sbmc (struct ncb *np)
 {
 	u_char scsi_mode = INB (nc_stest4) & SMODE;
 
@@ -6502,7 +5960,7 @@
 **----------------------------------------------------------
 */
 
-static int ncr_int_par (ncb_p np)
+static int ncr_int_par (struct ncb *np)
 {
 	u_char	hsts	= INB (HS_PRT);
 	u32	dbc	= INL (nc_dbc);
@@ -6589,7 +6047,7 @@
 **----------------------------------------------------------
 */
 
-static void ncr_int_ma (ncb_p np)
+static void ncr_int_ma (struct ncb *np)
 {
 	u32	dbc;
 	u32	rest;
@@ -6600,9 +6058,9 @@
 	u32	*vdsp;
 	u32	oadr, olen;
 	u32	*tblp;
-        ncrcmd *newcmd;
+	ncrcmd *newcmd;
 	u_char	cmd, sbcl;
-	ccb_p	cp;
+	struct ccb *cp;
 
 	dsp	= INL (nc_dsp);
 	dbc	= INL (nc_dbc);
@@ -6618,7 +6076,7 @@
 
 	if ((cmd & 1) == 0) {
 		u_char	ctest5, ss0, ss2;
-		u_short	delta;
+		u16	delta;
 
 		ctest5 = (np->rv_ctest5 & DFS) ? INB (nc_ctest5) : 0;
 		if (ctest5 & DFS)
@@ -6890,13 +6348,13 @@
 }
 
 
-static void ncr_sir_to_redo(ncb_p np, int num, ccb_p cp)
+static void ncr_sir_to_redo(struct ncb *np, int num, struct ccb *cp)
 {
-	Scsi_Cmnd *cmd	= cp->cmd;
-	tcb_p tp	= &np->target[cmd->device->id];
-	lcb_p lp	= tp->lp[cmd->device->lun];
+	struct scsi_cmnd *cmd	= cp->cmd;
+	struct tcb *tp	= &np->target[cmd->device->id];
+	struct lcb *lp	= tp->lp[cmd->device->lun];
 	XPT_QUEHEAD	*qp;
-	ccb_p		cp2;
+	struct ccb *	cp2;
 	int		disc_cnt = 0;
 	int		busy_cnt = 0;
 	u32		startp;
@@ -7059,7 +6517,7 @@
 	return (1);
 }
 
-static void ncr_print_msg ( ccb_p cp, char *label, u_char *msg)
+static void ncr_print_msg ( struct ccb *cp, char *label, u_char *msg)
 {
 	if (cp)
 		PRINT_ADDR(cp->cmd);
@@ -7070,15 +6528,15 @@
 	printk(".\n");
 }
 
-void ncr_int_sir (ncb_p np)
+void ncr_int_sir (struct ncb *np)
 {
 	u_char scntl3;
 	u_char chg, ofs, per, fak, wide;
 	u_char num = INB (nc_dsps);
-	ccb_p	cp=0;
+	struct ccb *cp=0;
 	u_long	dsa    = INL (nc_dsa);
 	u_char	target = INB (nc_sdid) & 0x0f;
-	tcb_p	tp     = &np->target[target];
+	struct tcb *tp     = &np->target[target];
 
 	if (DEBUG_FLAGS & DEBUG_TINY) printk ("I#%d", num);
 
@@ -7548,12 +7006,12 @@
 **==========================================================
 */
 
-static	ccb_p ncr_get_ccb (ncb_p np, u_char tn, u_char ln)
+static	struct ccb *ncr_get_ccb (struct ncb *np, u_char tn, u_char ln)
 {
-	tcb_p tp = &np->target[tn];
-	lcb_p lp = tp->lp[ln];
+	struct tcb *tp = &np->target[tn];
+	struct lcb *lp = tp->lp[ln];
 	u_char tag = NO_TAG;
-	ccb_p cp = (ccb_p) 0;
+	struct ccb *cp = NULL;
 
 	/*
 	**	Lun structure available ?
@@ -7564,7 +7022,7 @@
 		**	Keep from using more tags than we can handle.
 		*/
 		if (lp->usetags && lp->busyccbs >= lp->maxnxs)
-			return (ccb_p) 0;
+			return NULL;
 
 		/*
 		**	Allocate a new CCB if needed.
@@ -7605,7 +7063,7 @@
 				tag = lp->cb_tags[lp->ia_tag];
 		}
 		else if (lp->actccbs > 0)
-			return (ccb_p) 0;
+			return NULL;
 	}
 
 	/*
@@ -7626,7 +7084,7 @@
 #endif
 
 	if (cp->magic)
-		return ((ccb_p) 0);
+		return NULL;
 
 	cp->magic = 1;
 
@@ -7666,10 +7124,10 @@
 **==========================================================
 */
 
-static void ncr_free_ccb (ncb_p np, ccb_p cp)
+static void ncr_free_ccb (struct ncb *np, struct ccb *cp)
 {
-	tcb_p tp = &np->target[cp->target];
-	lcb_p lp = tp->lp[cp->lun];
+	struct tcb *tp = &np->target[cp->target];
+	struct lcb *lp = tp->lp[cp->lun];
 
 	if (DEBUG_FLAGS & DEBUG_TAGS) {
 		PRINT_LUN(np, cp->target, cp->lun);
@@ -7731,7 +7189,7 @@
 **------------------------------------------------------------------------
 **------------------------------------------------------------------------
 */
-static void ncr_init_ccb(ncb_p np, ccb_p cp)
+static void ncr_init_ccb(struct ncb *np, struct ccb *cp)
 {
 	ncrcmd copy_4 = np->features & FE_PFEN ? SCR_COPY(4) : SCR_COPY_F(4);
 
@@ -7770,11 +7228,11 @@
 **------------------------------------------------------------------------
 **------------------------------------------------------------------------
 */
-static void ncr_alloc_ccb(ncb_p np, u_char tn, u_char ln)
+static void ncr_alloc_ccb(struct ncb *np, u_char tn, u_char ln)
 {
-	tcb_p tp = &np->target[tn];
-	lcb_p lp = tp->lp[ln];
-	ccb_p cp = 0;
+	struct tcb *tp = &np->target[tn];
+	struct lcb *lp = tp->lp[ln];
+	struct ccb *cp = 0;
 
 	/*
 	**	Allocate memory for this CCB.
@@ -7820,9 +7278,9 @@
 **	It contains a SCRIPT that is called on target reselection.
 **------------------------------------------------------------------------
 */
-static void ncr_init_tcb (ncb_p np, u_char tn)
+static void ncr_init_tcb (struct ncb *np, u_char tn)
 {
-	tcb_p tp = &np->target[tn];
+	struct tcb *tp = &np->target[tn];
 	ncrcmd copy_1 = np->features & FE_PFEN ? SCR_COPY(1) : SCR_COPY_F(1);
 	int th = tn & 3;
 	int i;
@@ -7907,10 +7365,10 @@
 **	command has been successfully completed for this target/lun.
 **------------------------------------------------------------------------
 */
-static lcb_p ncr_alloc_lcb (ncb_p np, u_char tn, u_char ln)
+static struct lcb *ncr_alloc_lcb (struct ncb *np, u_char tn, u_char ln)
 {
-	tcb_p tp = &np->target[tn];
-	lcb_p lp = tp->lp[ln];
+	struct tcb *tp = &np->target[tn];
+	struct lcb *lp = tp->lp[ln];
 	ncrcmd copy_4 = np->features & FE_PFEN ? SCR_COPY(4) : SCR_COPY_F(4);
 	int lh = ln & 3;
 
@@ -7997,10 +7455,10 @@
 **	will play with CHANGE DEFINITION commands. :-)
 **------------------------------------------------------------------------
 */
-static lcb_p ncr_setup_lcb (ncb_p np, u_char tn, u_char ln, u_char *inq_data)
+static struct lcb *ncr_setup_lcb (struct ncb *np, u_char tn, u_char ln, u_char *inq_data)
 {
-	tcb_p tp = &np->target[tn];
-	lcb_p lp = tp->lp[ln];
+	struct tcb *tp = &np->target[tn];
+	struct lcb *lp = tp->lp[ln];
 	u_char inq_byte7;
 
 	/*
@@ -8117,44 +7575,57 @@
 **	sizes to the data segment array.
 */
 
-static	int	ncr_scatter(ncb_p np, ccb_p cp, Scsi_Cmnd *cmd)
+static int ncr_scatter_no_sglist(struct ncb *np, struct ccb *cp, struct scsi_cmnd *cmd)
 {
-	struct scr_tblmove *data;
-	int segment	= 0;
-	int use_sg	= (int) cmd->use_sg;
+	struct scr_tblmove *data = &cp->phys.data[MAX_SCATTER - 1];
+	int segment;
 
-	data		= cp->phys.data;
-	cp->data_len	= 0;
+	cp->data_len = cmd->request_bufflen;
 
-	if (!use_sg) {
-		if (cmd->request_bufflen) {
-			u_long baddr = map_scsi_single_data(np, cmd);
-
-			data = &data[MAX_SCATTER - 1];
-			data[0].addr = cpu_to_scr(baddr);
-			data[0].size = cpu_to_scr(cmd->request_bufflen);
-			cp->data_len = cmd->request_bufflen;
+	if (cmd->request_bufflen) {
+		dma_addr_t baddr = map_scsi_single_data(np, cmd);
+		if (baddr) {
+			ncr_build_sge(np, data, baddr, cmd->request_bufflen);
 			segment = 1;
+		} else {
+			segment = -2;
 		}
+	} else {
+		segment = 0;
 	}
-	else if (use_sg <= MAX_SCATTER) {
+
+	return segment;
+}
+
+static int ncr_scatter(struct ncb *np, struct ccb *cp, struct scsi_cmnd *cmd)
+{
+	int segment	= 0;
+	int use_sg	= (int) cmd->use_sg;
+
+	cp->data_len	= 0;
+
+	if (!use_sg)
+		segment = ncr_scatter_no_sglist(np, cp, cmd);
+	else if ((use_sg = map_scsi_sg_data(np, cmd)) > 0) {
 		struct scatterlist *scatter = (struct scatterlist *)cmd->buffer;
+		struct scr_tblmove *data;
+
+		if (use_sg > MAX_SCATTER) {
+			unmap_scsi_data(np, cmd);
+			return -1;
+		}
+
+		data = &cp->phys.data[MAX_SCATTER - use_sg];
 
-		use_sg = map_scsi_sg_data(np, cmd);
-		data = &data[MAX_SCATTER - use_sg];
+		for (segment = 0; segment < use_sg; segment++) {
+			dma_addr_t baddr = sg_dma_address(&scatter[segment]);
+			unsigned int len = sg_dma_len(&scatter[segment]);
 
-		while (segment < use_sg) {
-			u_long baddr = scsi_sg_dma_address(&scatter[segment]);
-			unsigned int len = scsi_sg_dma_len(&scatter[segment]);
-
-			data[segment].addr = cpu_to_scr(baddr);
-			data[segment].size = cpu_to_scr(len);
-			cp->data_len	  += len;
-			++segment;
+			ncr_build_sge(np, &data[segment], baddr, len);
+			cp->data_len += len;
 		}
-	}
-	else {
-		return -1;
+	} else {
+		segment = -2;
 	}
 
 	return segment;
@@ -8171,7 +7642,6 @@
 **==========================================================
 */
 
-#ifndef SCSI_NCR_IOMAPPED
 static int __init ncr_regtest (struct ncb* np)
 {
 	register volatile u32 data;
@@ -8194,21 +7664,18 @@
 	};
 	return (0);
 }
-#endif
 
 static int __init ncr_snooptest (struct ncb* np)
 {
 	u32	ncr_rd, ncr_wr, ncr_bk, host_rd, host_wr, pc;
 	int	i, err=0;
-#ifndef SCSI_NCR_IOMAPPED
 	if (np->reg) {
-            err |= ncr_regtest (np);
-            if (err) return (err);
+		err |= ncr_regtest (np);
+		if (err)
+			return (err);
 	}
-#endif
-	/*
-	**	init
-	*/
+
+	/* init */
 	pc  = NCB_SCRIPTH_PHYS (np, snooptest);
 	host_wr = 1;
 	ncr_wr  = 2;
@@ -8361,7 +7828,7 @@
 /*
  *	Select NCR SCSI clock frequency
  */
-static void ncr_selectclock(ncb_p np, u_char scntl3)
+static void ncr_selectclock(struct ncb *np, u_char scntl3)
 {
 	if (np->multiplier < 2) {
 		OUTB(nc_scntl3,	scntl3);
@@ -8390,7 +7857,7 @@
 /*
  *	calculate NCR SCSI clock frequency (in KHz)
  */
-static unsigned __init ncrgetfreq (ncb_p np, int gen)
+static unsigned __init ncrgetfreq (struct ncb *np, int gen)
 {
 	unsigned ms = 0;
 	char count = 0;
@@ -8441,7 +7908,7 @@
 /*
  *	Get/probe NCR SCSI clock frequency
  */
-static void __init ncr_getclock (ncb_p np, int mult)
+static void __init ncr_getclock (struct ncb *np, int mult)
 {
 	unsigned char scntl3 = INB(nc_scntl3);
 	unsigned char stest1 = INB(nc_stest1);
@@ -8508,12 +7975,12 @@
 **   Linux select queue depths function
 */
 
-int ncr53c8xx_slave_configure(Scsi_Device *device)
+int ncr53c8xx_slave_configure(struct scsi_device *device)
 {
 	struct Scsi_Host *host = device->host;
-	ncb_p np;
-	tcb_p tp;
-	lcb_p lp;
+	struct ncb *np;
+	struct tcb *tp;
+	struct lcb *lp;
 	int numtags, depth_to_use;
 
 	np = ((struct host_data *) host->hostdata)->ncb;
@@ -8565,9 +8032,9 @@
 **   Linux entry point of queuecommand() function
 */
 
-int ncr53c8xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *))
+int ncr53c8xx_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *))
 {
-     ncb_p np = ((struct host_data *) cmd->device->host->hostdata)->ncb;
+     struct ncb *np = ((struct host_data *) cmd->device->host->hostdata)->ncb;
      unsigned long flags;
      int sts;
 
@@ -8577,10 +8044,8 @@
 
      cmd->scsi_done     = done;
      cmd->host_scribble = NULL;
-#ifdef SCSI_NCR_DYNAMIC_DMA_MAPPING
      cmd->__data_mapped = 0;
      cmd->__data_mapping = 0;
-#endif
 
      NCR_LOCK_NCB(np, flags);
 
@@ -8618,8 +8083,8 @@
      unsigned long flags;
      struct Scsi_Host *shost = (struct Scsi_Host *)dev_id;
      struct host_data *host_data = (struct host_data *)shost->hostdata;
-     ncb_p np = host_data->ncb;
-     Scsi_Cmnd *done_list;
+     struct ncb *np = host_data->ncb;
+     struct scsi_cmnd *done_list;
 
 #ifdef DEBUG_NCR53C8XX
      printk("ncr53c8xx : interrupt received\n");
@@ -8649,12 +8114,12 @@
 
 static void ncr53c8xx_timeout(unsigned long npref)
 {
-     ncb_p np = (ncb_p) npref;
+     struct ncb *np = (struct ncb *) npref;
      unsigned long flags;
-     Scsi_Cmnd *done_list;
+     struct scsi_cmnd *done_list;
 
      NCR_LOCK_NCB(np, flags);
-     ncr_timeout((ncb_p) np);
+     ncr_timeout(np);
      done_list     = np->done_list;
      np->done_list = 0;
      NCR_UNLOCK_NCB(np, flags);
@@ -8670,12 +8135,12 @@
 **   Linux entry point of reset() function
 */
 
-int ncr53c8xx_bus_reset(Scsi_Cmnd *cmd)
+int ncr53c8xx_bus_reset(struct scsi_cmnd *cmd)
 {
-	ncb_p np = ((struct host_data *) cmd->device->host->hostdata)->ncb;
+	struct ncb *np = ((struct host_data *) cmd->device->host->hostdata)->ncb;
 	int sts;
 	unsigned long flags;
-	Scsi_Cmnd *done_list;
+	struct scsi_cmnd *done_list;
 
 	NCR_LOCK_NCB(np, flags);
 
@@ -8701,12 +8166,12 @@
 **   Linux entry point of abort() function
 */
 
-int ncr53c8xx_abort(Scsi_Cmnd *cmd)
+int ncr53c8xx_abort(struct scsi_cmnd *cmd)
 {
-	ncb_p np = ((struct host_data *) cmd->device->host->hostdata)->ncb;
+	struct ncb *np = ((struct host_data *) cmd->device->host->hostdata)->ncb;
 	int sts;
 	unsigned long flags;
-	Scsi_Cmnd *done_list;
+	struct scsi_cmnd *done_list;
 
 #if defined SCSI_RESET_SYNCHRONOUS && defined SCSI_RESET_ASYNCHRONOUS
 	printk("ncr53c8xx_abort: pid=%lu serial_number=%ld serial_number_at_timeout=%ld\n",
@@ -8739,17 +8204,6 @@
 }
 
 
-int ncr53c8xx_release(struct Scsi_Host *host)
-{
-#ifdef DEBUG_NCR53C8XX
-printk("ncr53c8xx : release\n");
-#endif
-     ncr_detach(((struct host_data *) host->hostdata)->ncb);
-
-     return 1;
-}
-
-
 /*
 **	Scsi command waiting list management.
 **
@@ -8765,9 +8219,9 @@
 
 #define next_wcmd host_scribble
 
-static void insert_into_waiting_list(ncb_p np, Scsi_Cmnd *cmd)
+static void insert_into_waiting_list(struct ncb *np, struct scsi_cmnd *cmd)
 {
-	Scsi_Cmnd *wcmd;
+	struct scsi_cmnd *wcmd;
 
 #ifdef DEBUG_WAITING_LIST
 	printk("%s: cmd %lx inserted into waiting list\n", ncr_name(np), (u_long) cmd);
@@ -8776,19 +8230,19 @@
 	if (!(wcmd = np->waiting_list)) np->waiting_list = cmd;
 	else {
 		while ((wcmd->next_wcmd) != 0)
-			wcmd = (Scsi_Cmnd *) wcmd->next_wcmd;
+			wcmd = (struct scsi_cmnd *) wcmd->next_wcmd;
 		wcmd->next_wcmd = (char *) cmd;
 	}
 }
 
-static Scsi_Cmnd *retrieve_from_waiting_list(int to_remove, ncb_p np, Scsi_Cmnd *cmd)
+static struct scsi_cmnd *retrieve_from_waiting_list(int to_remove, struct ncb *np, struct scsi_cmnd *cmd)
 {
-	Scsi_Cmnd **pcmd = &np->waiting_list;
+	struct scsi_cmnd **pcmd = &np->waiting_list;
 
 	while (*pcmd) {
 		if (cmd == *pcmd) {
 			if (to_remove) {
-				*pcmd = (Scsi_Cmnd *) cmd->next_wcmd;
+				*pcmd = (struct scsi_cmnd *) cmd->next_wcmd;
 				cmd->next_wcmd = 0;
 			}
 #ifdef DEBUG_WAITING_LIST
@@ -8796,14 +8250,14 @@
 #endif
 			return cmd;
 		}
-		pcmd = (Scsi_Cmnd **) &(*pcmd)->next_wcmd;
+		pcmd = (struct scsi_cmnd **) &(*pcmd)->next_wcmd;
 	}
 	return 0;
 }
 
-static void process_waiting_list(ncb_p np, int sts)
+static void process_waiting_list(struct ncb *np, int sts)
 {
-	Scsi_Cmnd *waiting_list, *wcmd;
+	struct scsi_cmnd *waiting_list, *wcmd;
 
 	waiting_list = np->waiting_list;
 	np->waiting_list = 0;
@@ -8812,7 +8266,7 @@
 	if (waiting_list) printk("%s: waiting_list=%lx processing sts=%d\n", ncr_name(np), (u_long) waiting_list, sts);
 #endif
 	while ((wcmd = waiting_list) != 0) {
-		waiting_list = (Scsi_Cmnd *) wcmd->next_wcmd;
+		waiting_list = (struct scsi_cmnd *) wcmd->next_wcmd;
 		wcmd->next_wcmd = 0;
 		if (sts == DID_OK) {
 #ifdef DEBUG_WAITING_LIST
@@ -8900,7 +8354,7 @@
 **	Parse a control command
 */
 
-static int ncr_user_command(ncb_p np, char *buffer, int length)
+static int ncr_user_command(struct ncb *np, char *buffer, int length)
 {
 	char *ptr	= buffer;
 	int len		= length;
@@ -9046,7 +8500,7 @@
 **	Copy formatted information into the input buffer.
 */
 
-static int ncr_host_info(ncb_p np, char *ptr, off_t offset, int len)
+static int ncr_host_info(struct ncb *np, char *ptr, off_t offset, int len)
 {
 	struct info_str info;
 
@@ -9055,12 +8509,8 @@
 	info.offset	= offset;
 	info.pos	= 0;
 
-	copy_info(&info, "  Chip NCR53C%s, device id 0x%x, "
-			 "revision id 0x%x\n",
-			 np->chip_name, np->device_id,	np->revision_id);
-	copy_info(&info, "  On PCI bus %d, device %d, function %d, IRQ %d\n",
-		np->bus, (np->device_fn & 0xf8) >> 3, np->device_fn & 7,
-		(int) np->irq);
+	copy_info(&info, "  Chip NCR53C720, revision id 0x%x, IRQ %d\n",
+			 np->revision_id, (int) np->irq);
 	copy_info(&info, "  Synchronous period factor %d, "
 			 "max commands per lun %d\n",
 			 (int) np->minsync, MAX_TAGS);
@@ -9085,7 +8535,7 @@
 			int length, int func)
 {
 	struct host_data *host_data;
-	ncb_p ncb = 0;
+	struct ncb *ncb = 0;
 	int retv;
 
 #ifdef DEBUG_PROC_INFO
@@ -9152,3 +8602,267 @@
 {
 	return SCSI_NCR_DRIVER_NAME;
 }
+
+
+/*
+ *	Host attach and initialisations.
+ *
+ *	Allocate host data and ncb structure.
+ *	Request IO region and remap MMIO region.
+ *	Do chip initialization.
+ *	If all is OK, install interrupt handling and
+ *	start the timer daemon.
+ */
+struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt,
+					int unit, struct ncr_device *device)
+{
+	struct host_data *host_data;
+	struct ncb *np = 0;
+	struct Scsi_Host *instance = 0;
+	u_long flags = 0;
+	int i;
+
+#ifdef SCSI_NCR_PROC_INFO_SUPPORT
+	tpnt->proc_info		= ncr53c8xx_proc_info,
+#endif
+	tpnt->info 		= ncr53c8xx_info;
+	tpnt->queuecommand	= ncr53c8xx_queue_command;
+	tpnt->slave_configure	= ncr53c8xx_slave_configure;
+	tpnt->eh_bus_reset_handler	= ncr53c8xx_bus_reset;
+	tpnt->can_queue		= SCSI_NCR_CAN_QUEUE;
+	tpnt->this_id		= 7;
+	tpnt->sg_tablesize	= SCSI_NCR_SG_TABLESIZE;
+	tpnt->cmd_per_lun	= SCSI_NCR_CMD_PER_LUN;
+	tpnt->use_clustering	= ENABLE_CLUSTERING;
+
+	if (device->differential)
+		driver_setup.diff_support = device->differential;
+
+	printk(KERN_INFO "ncr53c720-%d: rev 0x%x irq %d\n",
+		unit, device->chip.revision_id, device->slot.irq);
+
+	instance = scsi_host_alloc(tpnt, sizeof(*host_data));
+	if (!instance)
+	        goto attach_error;
+	host_data = (struct host_data *) instance->hostdata;
+
+	np = __m_calloc_dma(device->dev, sizeof(struct ncb), "NCB");
+	if (!np)
+		goto attach_error;
+	NCR_INIT_LOCK_NCB(np);
+	np->dev = device->dev;
+	np->p_ncb = vtobus(np);
+	host_data->ncb = np;
+
+	np->ccb = m_calloc_dma(sizeof(struct ccb), "CCB");
+	if (!np->ccb)
+		goto attach_error;
+
+	/* Store input information in the host data structure.  */
+	np->unit	= unit;
+	np->verbose	= driver_setup.verbose;
+	sprintf(np->inst_name, "ncr53c720-%d", np->unit);
+	np->revision_id	= device->chip.revision_id;
+	np->features	= device->chip.features;
+	np->clock_divn	= device->chip.nr_divisor;
+	np->maxoffs	= device->chip.offset_max;
+	np->maxburst	= device->chip.burst_max;
+	np->myaddr	= device->host_id;
+
+	/* Allocate SCRIPTS areas.  */
+	np->script0 = m_calloc_dma(sizeof(struct script), "SCRIPT");
+	if (!np->script0)
+		goto attach_error;
+	np->scripth0 = m_calloc_dma(sizeof(struct scripth), "SCRIPTH");
+	if (!np->scripth0)
+		goto attach_error;
+
+	init_timer(&np->timer);
+	np->timer.data     = (unsigned long) np;
+	np->timer.function = ncr53c8xx_timeout;
+
+	/* Try to map the controller chip to virtual and physical memory. */
+
+	np->paddr	= device->slot.base;
+	np->paddr2	= (np->features & FE_RAM) ? device->slot.base_2 : 0;
+
+	if (device->slot.base_v)
+		np->vaddr = device->slot.base_v;
+	else
+		np->vaddr = (unsigned long)ioremap(device->slot.base_c, 128);
+
+	if (!np->vaddr) {
+		printk(KERN_ERR
+			"%s: can't map memory mapped IO region\n",ncr_name(np));
+		goto attach_error;
+	} else {
+		if (bootverbose > 1)
+			printk(KERN_INFO
+				"%s: using memory mapped IO at virtual address 0x%lx\n", ncr_name(np), (u_long) np->vaddr);
+	}
+
+	/* Make the controller's registers available.  Now the INB INW INL
+	 * OUTB OUTW OUTL macros can be used safely.
+	 */
+
+	np->reg = (struct ncr_reg*) np->vaddr;
+
+	/* Do chip dependent initialization.  */
+	ncr_prepare_setting(np);
+
+	if (np->paddr2 && sizeof(struct script) > 4096) {
+		np->paddr2 = 0;
+		printk(KERN_WARNING "%s: script too large, NOT using on chip RAM.\n",
+			ncr_name(np));
+	}
+
+	/* Fill Linux host instance structure */
+	instance->max_channel	= 0;
+	instance->this_id       = np->myaddr;
+	instance->max_id	= np->maxwide ? 16 : 8;
+	instance->max_lun	= SCSI_NCR_MAX_LUN;
+	instance->base		= (unsigned long) np->reg;
+	instance->irq		= device->slot.irq;
+	instance->unique_id	= device->slot.base;
+	instance->dma_channel	= 0;
+	instance->cmd_per_lun	= MAX_TAGS;
+	instance->can_queue	= (MAX_START-4);
+	scsi_set_device(instance, device->dev);
+
+#ifdef SCSI_NCR_INTEGRITY_CHECKING
+	np->check_integrity	  = 0;
+	instance->check_integrity = 0;
+
+#ifdef SCSI_NCR_ENABLE_INTEGRITY_CHECK
+	if ( !(driver_setup.bus_check & 0x04) ) {
+		np->check_integrity	  = 1;
+		instance->check_integrity = 1;
+	}
+#endif
+#endif
+	/* Patch script to physical addresses */
+	ncr_script_fill(&script0, &scripth0);
+
+	np->scripth	= np->scripth0;
+	np->p_scripth	= vtobus(np->scripth);
+	np->p_script	= (np->paddr2) ?  np->paddr2 : vtobus(np->script0);
+
+	ncr_script_copy_and_bind(np, (ncrcmd *) &script0,
+			(ncrcmd *) np->script0, sizeof(struct script));
+	ncr_script_copy_and_bind(np, (ncrcmd *) &scripth0,
+			(ncrcmd *) np->scripth0, sizeof(struct scripth));
+	np->ccb->p_ccb	= vtobus (np->ccb);
+
+	/* Patch the script for LED support.  */
+
+	if (np->features & FE_LED0) {
+		np->script0->idle[0]  =
+				cpu_to_scr(SCR_REG_REG(gpreg, SCR_OR,  0x01));
+		np->script0->reselected[0] =
+				cpu_to_scr(SCR_REG_REG(gpreg, SCR_AND, 0xfe));
+		np->script0->start[0] =
+				cpu_to_scr(SCR_REG_REG(gpreg, SCR_AND, 0xfe));
+	}
+
+	/*
+	 * Look for the target control block of this nexus.
+	 * For i = 0 to 3
+	 *   JUMP ^ IFTRUE (MASK (i, 3)), @(next_lcb)
+	 */
+	for (i = 0 ; i < 4 ; i++) {
+		np->jump_tcb[i].l_cmd   =
+				cpu_to_scr((SCR_JUMP ^ IFTRUE (MASK (i, 3))));
+		np->jump_tcb[i].l_paddr =
+				cpu_to_scr(NCB_SCRIPTH_PHYS (np, bad_target));
+	}
+
+	ncr_chip_reset(np, 100);
+
+	/* Now check the cache handling of the chipset.  */
+
+	if (ncr_snooptest(np)) {
+		printk(KERN_ERR "CACHE INCORRECTLY CONFIGURED.\n");
+		goto attach_error;
+	};
+
+	/* Install the interrupt handler.  */
+	np->irq = device->slot.irq;
+
+	/* Initialize the fixed part of the default ccb.  */
+	ncr_init_ccb(np, np->ccb);
+
+	/*
+	 * After SCSI devices have been opened, we cannot reset the bus
+	 * safely, so we do it here.  Interrupt handler does the real work.
+	 * Process the reset exception if interrupts are not enabled yet.
+	 * Then enable disconnects.
+	 */
+	NCR_LOCK_NCB(np, flags);
+	if (ncr_reset_scsi_bus(np, 0, driver_setup.settle_delay) != 0) {
+		printk(KERN_ERR "%s: FATAL ERROR: CHECK SCSI BUS - CABLES, TERMINATION, DEVICE POWER etc.!\n", ncr_name(np));
+
+		NCR_UNLOCK_NCB(np, flags);
+		goto attach_error;
+	}
+	ncr_exception(np);
+
+	np->disc = 1;
+
+	/*
+	 * The middle-level SCSI driver does not wait for devices to settle.
+	 * Wait synchronously if more than 2 seconds.
+	 */
+	if (driver_setup.settle_delay > 2) {
+		printk(KERN_INFO "%s: waiting %d seconds for scsi devices to settle...\n",
+			ncr_name(np), driver_setup.settle_delay);
+		MDELAY (1000 * driver_setup.settle_delay);
+	}
+
+	/* start the timeout daemon */
+	np->lasttime=0;
+	ncr_timeout (np);
+
+	/* use SIMPLE TAG messages by default */
+#ifdef SCSI_NCR_ALWAYS_SIMPLE_TAG
+	np->order = M_SIMPLE_TAG;
+#endif
+
+	NCR_UNLOCK_NCB(np, flags);
+
+	return instance;
+
+ attach_error:
+	if (!instance)
+		return NULL;
+	printk(KERN_INFO "%s: detaching...\n", ncr_name(np));
+	if (!np)
+		goto unregister;
+	if (np->scripth0)
+		m_free_dma(np->scripth0, sizeof(struct scripth), "SCRIPTH");
+	if (np->script0)
+		m_free_dma(np->script0, sizeof(struct script), "SCRIPT");
+	if (np->ccb)
+		m_free_dma(np->ccb, sizeof(struct ccb), "CCB");
+	m_free_dma(np, sizeof(struct ncb), "NCB");
+	host_data->ncb = NULL;
+
+ unregister:
+	scsi_host_put(instance);
+
+	return NULL;
+}
+
+
+int ncr53c8xx_release(struct Scsi_Host *host)
+{
+	struct host_data *host_data;
+#ifdef DEBUG_NCR53C8XX
+	printk("ncr53c8xx: release\n");
+#endif
+	if (!host)
+		return 1;
+	host_data = (struct host_data *)host->hostdata;
+	if (host_data && host_data->ncb)
+		ncr_detach(host_data->ncb);
+	return 1;
+}
--- diff/drivers/scsi/ncr53c8xx.h	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/ncr53c8xx.h	2004-07-01 21:32:42.000000000 +0100
@@ -42,10 +42,24 @@
 #ifndef NCR53C8XX_H
 #define NCR53C8XX_H
 
+#include <scsi/scsi_host.h>
+
 typedef	u_long		vm_offset_t;
 
 #include "sym53c8xx_defs.h"
 
+/*
+	Build a scatter/gather entry.
+	see sym53c8xx_2/sym_hipd.h for more detailed sym_build_sge()
+	implementation ;)
+ */
+
+#define ncr_build_sge(np, data, badd, len)	\
+do {						\
+	(data)->addr = cpu_to_scr(badd);	\
+	(data)->size = cpu_to_scr(len);		\
+} while (0)
+
 /*==========================================================
 **
 **	Structures used by the detection routine to transmit 
@@ -53,39 +67,17 @@
 **
 **==========================================================
 */
-typedef struct {
-	int	bus;
-	u_char	device_fn;
+struct ncr_slot {
 	u_long	base;
 	u_long	base_2;
-	u_long	io_port;
 	u_long	base_c;
 	u_long	base_2_c;
 	u_long	base_v;
 	u_long	base_2_v;
 	int	irq;
 /* port and reg fields to use INB, OUTB macros */
-	u_long	base_io;
 	volatile struct ncr_reg	*reg;
-} ncr_slot;
-
-/*==========================================================
-**
-**	Structure used to store the NVRAM content.
-**
-**==========================================================
-*/
-typedef struct {
-	int type;
-#define	SCSI_NCR_SYMBIOS_NVRAM	(1)
-#define	SCSI_NCR_TEKRAM_NVRAM	(2)
-#ifdef	SCSI_NCR_NVRAM_SUPPORT
-	union {
-		Symbios_nvram Symbios;
-		Tekram_nvram Tekram;
-	} data;
-#endif
-} ncr_nvram;
+};
 
 /*==========================================================
 **
@@ -96,18 +88,13 @@
 */
 struct ncr_device {
 	struct device  *dev;
-	ncr_slot  slot;
-	ncr_chip  chip;
-	ncr_nvram *nvram;
+	struct ncr_slot  slot;
+	struct ncr_chip  chip;
 	u_char host_id;
-#ifdef	SCSI_NCR_PQS_PDS_SUPPORT
-	u_char pqs_pds;
-#endif
-	__u8 differential;
-	int attach_done;
+	u8 differential;
 };
 
-extern struct Scsi_Host *ncr_attach (Scsi_Host_Template *tpnt, int unit, struct ncr_device *device);
+extern struct Scsi_Host *ncr_attach(struct scsi_host_template *tpnt, int unit, struct ncr_device *device);
 extern int ncr53c8xx_release(struct Scsi_Host *host);
 irqreturn_t ncr53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs);
 
--- diff/drivers/scsi/nsp32.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/nsp32.c	2004-07-01 21:32:42.000000000 +0100
@@ -44,7 +44,7 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
 #include <scsi/scsi.h>
 
--- diff/drivers/scsi/oktagon_esp.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/oktagon_esp.c	2004-07-01 21:32:42.000000000 +0100
@@ -29,7 +29,7 @@
 
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <linux/zorro.h>
--- diff/drivers/scsi/osst.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/osst.c	2004-07-01 21:32:42.000000000 +0100
@@ -61,7 +61,7 @@
 #define OSST_DEB_MSG  KERN_NOTICE
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>
 
--- diff/drivers/scsi/pas16.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/pas16.c	2004-07-01 21:32:42.000000000 +0100
@@ -125,7 +125,7 @@
 #include <linux/init.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "pas16.h"
 #define AUTOPROBE_IRQ
 #include "NCR5380.h"
--- diff/drivers/scsi/pci2000.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/pci2000.c	2004-07-01 21:32:42.000000000 +0100
@@ -54,7 +54,7 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "pci2000.h"
 #include "psi_roy.h"
 
--- diff/drivers/scsi/pci2220i.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/pci2220i.c	2004-07-01 21:32:42.000000000 +0100
@@ -59,7 +59,7 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "pci2220i.h"
 #include "psi_dale.h"
 
--- diff/drivers/scsi/pcmcia/aha152x_stub.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/pcmcia/aha152x_stub.c	2004-07-01 21:32:43.000000000 +0100
@@ -47,7 +47,7 @@
 #include <scsi/scsi_ioctl.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "aha152x.h"
 
 #include <pcmcia/version.h>
--- diff/drivers/scsi/pcmcia/fdomain_stub.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/pcmcia/fdomain_stub.c	2004-07-01 21:32:43.000000000 +0100
@@ -44,7 +44,8 @@
 #include <scsi/scsi_ioctl.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
+#include "fdomain.h"
 
 #include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
@@ -84,10 +85,6 @@
     struct Scsi_Host	*host;
 } scsi_info_t;
 
-extern Scsi_Host_Template fdomain_driver_template;
-extern void fdomain_setup(char *str, int *ints);
-extern struct Scsi_Host *__fdomain_16x0_detect( Scsi_Host_Template *tpnt );
-extern int fdomain_16x0_bus_reset(Scsi_Cmnd *SCpnt);
 
 static void fdomain_release(dev_link_t *link);
 static int fdomain_event(event_t event, int priority,
@@ -189,7 +186,7 @@
     scsi_info_t *info = link->priv;
     tuple_t tuple;
     cisparse_t parse;
-    int i, last_ret, last_fn, ints[3];
+    int i, last_ret, last_fn;
     u_char tuple_data[64];
     char str[16];
     struct Scsi_Host *host;
@@ -229,11 +226,8 @@
     release_region(link->io.BasePort1, link->io.NumPorts1);
 
     /* Set configuration options for the fdomain driver */
-    ints[0] = 2;
-    ints[1] = link->io.BasePort1;
-    ints[2] = link->irq.AssignedIRQ;
     sprintf(str, "%d,%d", link->io.BasePort1, link->irq.AssignedIRQ);
-    fdomain_setup(str, ints);
+    fdomain_setup(str);
     
     host = __fdomain_16x0_detect(&fdomain_driver_template);
     if (!host) {
--- diff/drivers/scsi/pcmcia/nsp_cs.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/pcmcia/nsp_cs.c	2004-07-01 21:32:43.000000000 +0100
@@ -46,7 +46,7 @@
 #include <asm/irq.h>
 
 #include <../drivers/scsi/scsi.h>
-#include <../drivers/scsi/hosts.h>
+#include <scsi/scsi_host.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_ioctl.h>
@@ -1936,10 +1936,10 @@
 	nsp_dbg(NSP_DEBUG_INIT, "host=0x%p", host);
 
 	for (dev = host->host_queue; dev != NULL; dev = dev->next) {
-		unsigned long arg[2], id;
-		kernel_scsi_ioctl(dev, SCSI_IOCTL_GET_IDLUN, arg);
-		id = (arg[0] & 0x0f) + ((arg[0] >> 4) & 0xf0) +
-			((arg[0] >> 8) & 0xf00) + ((arg[0] >> 12) & 0xf000);
+		unsigned long id;
+		id = (dev->id & 0x0f) + ((dev->lun & 0x0f) << 4) +
+			((dev->channel & 0x0f) << 8) +
+			((dev->host->host_no & 0x0f) << 12);
 		node = &info->node[info->ndev];
 		node->minor = 0;
 		switch (dev->type) {
--- diff/drivers/scsi/pcmcia/qlogic_stub.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/pcmcia/qlogic_stub.c	2004-07-01 21:32:43.000000000 +0100
@@ -46,7 +46,7 @@
 #include <linux/interrupt.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "../qlogicfas408.h"
 
 #include <pcmcia/version.h>
--- diff/drivers/scsi/pluto.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/pluto.c	2004-07-01 21:32:43.000000000 +0100
@@ -21,7 +21,7 @@
 #include <asm/irq.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "../fc4/fcp_impl.h"
 #include "pluto.h"
 
--- diff/drivers/scsi/ppa.h	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/ppa.h	2004-07-01 21:32:43.000000000 +0100
@@ -86,7 +86,7 @@
 #include  <linux/interrupt.h>
 
 #include  <asm/io.h>
-#include  "hosts.h"
+#include  <scsi/scsi_host.h>
 /* batteries not included :-) */
 
 /*
--- diff/drivers/scsi/psi240i.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/psi240i.c	2004-07-01 21:32:43.000000000 +0100
@@ -41,7 +41,7 @@
 #include <asm/system.h>
 #include <asm/io.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "psi240i.h"
 #include "psi_chip.h"
--- diff/drivers/scsi/qla1280.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla1280.c	2004-07-01 21:32:43.000000000 +0100
@@ -4,7 +4,7 @@
 * QLogic  QLA1280 (Ultra2)  and  QLA12160 (Ultra3) SCSI driver
 * Copyright (C) 2000 Qlogic Corporation (www.qlogic.com)
 * Copyright (C) 2001-2004 Jes Sorensen, Wild Open Source Inc.
-* Copyright (C) 2003 Christoph Hellwig
+* Copyright (C) 2003-2004 Christoph Hellwig
 *
 * 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
@@ -17,9 +17,12 @@
 * General Public License for more details.
 *
 ******************************************************************************/
-#define QLA1280_VERSION      "3.24.3"
+#define QLA1280_VERSION      "3.24.4"
 /*****************************************************************************
     Revision History:
+    Rev  3.24.4 June 7, 2004 Christoph Hellwig
+	- restructure firmware loading, cleanup initialization code
+	- prepare support for ISP1020/1040 chips
     Rev  3.24.3 January 19, 2004, Jes Sorensen
 	- Handle PCI DMA mask settings correctly
 	- Correct order of error handling in probe_one, free_irq should not
@@ -357,7 +360,7 @@
 #else
 #include <linux/blk.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "sd.h"
 #endif
 
@@ -485,6 +488,14 @@
 #define ia64_platform_is(foo)		(!strcmp(x, platform_name))
 #endif
 
+
+#define IS_ISP1040(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020)
+#define IS_ISP1x40(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020 || \
+			ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1240)
+#define IS_ISP1x160(ha)        (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160 || \
+				ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160)
+
+
 static int qla1280_probe_one(struct pci_dev *, const struct pci_device_id *);
 static void qla1280_remove_one(struct pci_dev *);
 
@@ -501,9 +512,7 @@
 /*
  *  QLogic ISP1280 Hardware Support Function Prototypes.
  */
-static int qla1280_isp_firmware(struct scsi_qla_host *);
-static int qla1280_chip_diag(struct scsi_qla_host *);
-static int qla1280_setup_chip(struct scsi_qla_host *);
+static int qla1280_load_firmware(struct scsi_qla_host *);
 static int qla1280_init_rings(struct scsi_qla_host *);
 static int qla1280_nvram_config(struct scsi_qla_host *);
 static int qla1280_mailbox_command(struct scsi_qla_host *,
@@ -1384,16 +1393,10 @@
 	uint8_t mr;
 	uint16_t mb[MAILBOX_REGISTER_COUNT];
 	struct nvram *nv;
-	int is1x160, status;
+	int status;
 
 	nv = &ha->nvram;
 
-	if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 ||
-	    ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160)
-		is1x160 = 1;
-	else
-		is1x160 = 0;
-
 	mr = BIT_3 | BIT_2 | BIT_1 | BIT_0;
 
 	/* Set Target Parameters. */
@@ -1403,17 +1406,16 @@
 
 	mb[2] = (nv->bus[bus].target[target].parameter.c << 8);
 
-	if (is1x160)
-		mb[3] =	nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8;
-	else
-		mb[3] =	nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8;
-	mb[3] |= nv->bus[bus].target[target].sync_period;
-
-	if (is1x160) {
+	if (IS_ISP1x160(ha)) {
 		mb[2] |= nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr << 5;
-		mb[6] =	nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8;
-		mb[6] |= nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width;
+		mb[3] =	(nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8) |
+			 nv->bus[bus].target[target].sync_period;
+		mb[6] =	(nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8) |
+			 nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width;
 		mr |= BIT_6;
+	} else {
+		mb[3] =	(nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8) |
+			 nv->bus[bus].target[target].sync_period;
 	}
 
 	status = qla1280_mailbox_command(ha, mr, &mb[0]);
@@ -1476,8 +1478,7 @@
 	    (driver_setup.wide_mask &&
 	     (~driver_setup.wide_mask & (1 << target))))
 		nv->bus[bus].target[target].parameter.f.enable_wide = 0;
-	if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 ||
-	    ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160) {
+	if (IS_ISP1x160(ha)) {
 		if (driver_setup.no_ppr ||
 		    (driver_setup.ppr_mask &&
 		     (~driver_setup.ppr_mask & (1 << target))))
@@ -1802,17 +1803,8 @@
 	 */
 	spin_lock_irqsave(HOST_LOCK, flags);
 #endif
-	/* If firmware needs to be loaded */
-	if (qla1280_isp_firmware(ha)) {
-		if (!(status = qla1280_chip_diag(ha))) {
-			status = qla1280_setup_chip(ha);
-		}
-	} else {
-		printk(KERN_ERR "scsi(%li): isp_firmware() failed!\n",
-		       ha->host_no);
-		status = 1;
-	}
 
+	status = qla1280_load_firmware(ha);
 	if (status) {
 		printk(KERN_ERR "scsi(%li): initialize: pci probe failed!\n",
 		       ha->host_no);
@@ -1823,36 +1815,24 @@
 	dprintk(1, "scsi(%ld): Configure NVRAM parameters\n", ha->host_no);
 	qla1280_nvram_config(ha);
 
-	if (!ha->flags.disable_host_adapter && !qla1280_init_rings(ha)) {
-		/* Issue SCSI reset. */
-		/* dg 03/13 if we can't reset twice then bus is dead */
-		for (bus = 0; bus < ha->ports; bus++) {
-			if (!ha->bus_settings[bus].disable_scsi_reset){
-				if (qla1280_bus_reset(ha, bus)) {
-					if (qla1280_bus_reset(ha, bus)) {
-						ha->bus_settings[bus].scsi_bus_dead = 1;
-					}
-				}
-			}
-		}
+	if (ha->flags.disable_host_adapter) {
+		status = 1;
+		goto out;
+	}
 
-		/*
-		 * qla1280_bus_reset() will take care of issueing markers,
-		 * no need to do that here as well!
-		 */
-#if 0
-		/* Issue marker command. */
-		ha->flags.reset_marker = 0;
-		for (bus = 0; bus < ha->ports; bus++) {
-			ha->bus_settings[bus].reset_marker = 0;
-			qla1280_marker(ha, bus, 0, 0, MK_SYNC_ALL);
-		}
-#endif
+	status = qla1280_init_rings(ha);
+	if (status)
+		goto out;
 
-		ha->flags.online = 1;
-	} else
-		status = 1;
+	/* Issue SCSI reset, if we can't reset twice then bus is dead */
+	for (bus = 0; bus < ha->ports; bus++) {
+		if (!ha->bus_settings[bus].disable_scsi_reset &&
+		    qla1280_bus_reset(ha, bus) &&
+		    qla1280_bus_reset(ha, bus))
+			ha->bus_settings[bus].scsi_bus_dead = 1;
+	}
 
+	ha->flags.online = 1;
  out:
 #if LINUX_VERSION_CODE >= 0x020500
 	spin_unlock_irqrestore(HOST_LOCK, flags);
@@ -1945,13 +1925,13 @@
 	int status = 0;
 	int cnt;
 	uint16_t data;
-
 	dprintk(3, "qla1280_chip_diag: testing device at 0x%p \n", &reg->id_l);
 
 	dprintk(1, "scsi(%ld): Verifying chip\n", ha->host_no);
 
 	/* Soft reset chip and wait for it to finish. */
 	WRT_REG_WORD(&reg->ictrl, ISP_RESET);
+
 	/*
 	 * We can't do a traditional PCI write flush here by reading
 	 * back the register. The card will not respond once the reset
@@ -1969,145 +1949,138 @@
 		data = RD_REG_WORD(&reg->ictrl);
 	}
 
-	if (cnt) {
-		/* Reset register cleared by chip reset. */
-		dprintk(3, "qla1280_chip_diag: reset register cleared by "
-			"chip reset\n");
+	if (!cnt)
+		goto fail;
 
-		WRT_REG_WORD(&reg->cfg_1, 0);
+	/* Reset register cleared by chip reset. */
+	dprintk(3, "qla1280_chip_diag: reset register cleared by chip reset\n");
 
-		/* Reset RISC and disable BIOS which
-		   allows RISC to execute out of RAM. */
-#if 0
-		WRT_REG_WORD(&reg->host_cmd, HC_RESET_RISC);
-		RD_REG_WORD(&reg->id_l);	/* Flush PCI write */
-		WRT_REG_WORD(&reg->host_cmd, HC_RELEASE_RISC);
-		RD_REG_WORD(&reg->id_l);	/* Flush PCI write */
-		WRT_REG_WORD(&reg->host_cmd, HC_DISABLE_BIOS);
-#else
-		WRT_REG_WORD(&reg->host_cmd, HC_RESET_RISC |
-			     HC_RELEASE_RISC | HC_DISABLE_BIOS);
-#endif
-		RD_REG_WORD(&reg->id_l);	/* Flush PCI write */
-		data = qla1280_debounce_register(&reg->mailbox0);
-		/*
-		 * I *LOVE* this code!
-		 */
-		for (cnt = 1000000; cnt && data == MBS_BUSY; cnt--) {
-			udelay(5);
-			data = RD_REG_WORD(&reg->mailbox0);
-		}
+	WRT_REG_WORD(&reg->cfg_1, 0);
 
-		if (cnt) {
-			/* Check product ID of chip */
-			dprintk(3, "qla1280_chip_diag: Checking product "
-				"ID of chip\n");
-
-			if (RD_REG_WORD(&reg->mailbox1) != PROD_ID_1 ||
-			    (RD_REG_WORD(&reg->mailbox2) != PROD_ID_2 &&
-			     RD_REG_WORD(&reg->mailbox2) != PROD_ID_2a) ||
-			    RD_REG_WORD(&reg->mailbox3) != PROD_ID_3 ||
-			    RD_REG_WORD(&reg->mailbox4) != PROD_ID_4) {
-				printk(KERN_INFO "qla1280: Wrong product ID = "
-				       "0x%x,0x%x,0x%x,0x%x\n",
-				       RD_REG_WORD(&reg->mailbox1),
-				       RD_REG_WORD(&reg->mailbox2),
-				       RD_REG_WORD(&reg->mailbox3),
-				       RD_REG_WORD(&reg->mailbox4));
-				status = 1;
-			} else {
-				/*
-				 * Enable ints early!!!
-				 */
-				qla1280_enable_intrs(ha);
-
-				dprintk(1, "qla1280_chip_diag: Checking "
-					"mailboxes of chip\n");
-				/* Wrap Incoming Mailboxes Test. */
-				mb[0] = MBC_MAILBOX_REGISTER_TEST;
-				mb[1] = 0xAAAA;
-				mb[2] = 0x5555;
-				mb[3] = 0xAA55;
-				mb[4] = 0x55AA;
-				mb[5] = 0xA5A5;
-				mb[6] = 0x5A5A;
-				mb[7] = 0x2525;
-				if (!(status = qla1280_mailbox_command(ha,
-								       0xff,
-								       &mb
-								       [0]))) {
-					if (mb[1] != 0xAAAA ||
-					    mb[2] != 0x5555 ||
-					    mb[3] != 0xAA55 ||
-					    mb[4] != 0x55AA ||
-					    mb[5] != 0xA5A5 ||
-					    mb[6] != 0x5A5A ||
-					    mb[7] != 0x2525) {
-						status = 1;
-						printk(KERN_INFO "qla1280: "
-						       "Failed mbox check\n");
-					}
-				}
-			}
-		} else
-			status = 1;
-	} else
-		status = 1;
+	/* Reset RISC and disable BIOS which
+	   allows RISC to execute out of RAM. */
+	WRT_REG_WORD(&reg->host_cmd, HC_RESET_RISC |
+		     HC_RELEASE_RISC | HC_DISABLE_BIOS);
+
+	RD_REG_WORD(&reg->id_l);	/* Flush PCI write */
+	data = qla1280_debounce_register(&reg->mailbox0);
+
+	/*
+	 * I *LOVE* this code!
+	 */
+	for (cnt = 1000000; cnt && data == MBS_BUSY; cnt--) {
+		udelay(5);
+		data = RD_REG_WORD(&reg->mailbox0);
+	}
+
+	if (!cnt)
+		goto fail;
+
+	/* Check product ID of chip */
+	dprintk(3, "qla1280_chip_diag: Checking product ID of chip\n");
+
+	if (RD_REG_WORD(&reg->mailbox1) != PROD_ID_1 ||
+	    (RD_REG_WORD(&reg->mailbox2) != PROD_ID_2 &&
+	     RD_REG_WORD(&reg->mailbox2) != PROD_ID_2a) ||
+	    RD_REG_WORD(&reg->mailbox3) != PROD_ID_3 ||
+	    RD_REG_WORD(&reg->mailbox4) != PROD_ID_4) {
+		printk(KERN_INFO "qla1280: Wrong product ID = "
+		       "0x%x,0x%x,0x%x,0x%x\n",
+		       RD_REG_WORD(&reg->mailbox1),
+		       RD_REG_WORD(&reg->mailbox2),
+		       RD_REG_WORD(&reg->mailbox3),
+		       RD_REG_WORD(&reg->mailbox4));
+		goto fail;
+	}
+
+	/*
+	 * Enable ints early!!!
+	 */
+	qla1280_enable_intrs(ha);
+
+	dprintk(1, "qla1280_chip_diag: Checking mailboxes of chip\n");
+	/* Wrap Incoming Mailboxes Test. */
+	mb[0] = MBC_MAILBOX_REGISTER_TEST;
+	mb[1] = 0xAAAA;
+	mb[2] = 0x5555;
+	mb[3] = 0xAA55;
+	mb[4] = 0x55AA;
+	mb[5] = 0xA5A5;
+	mb[6] = 0x5A5A;
+	mb[7] = 0x2525;
 
+	status = qla1280_mailbox_command(ha, 0xff, mb);
 	if (status)
-		dprintk(2, "qla1280_chip_diag: **** FAILED ****\n");
-	else
-		dprintk(3, "qla1280_chip_diag: exiting normally\n");
+		goto fail;
 
+	if (mb[1] != 0xAAAA || mb[2] != 0x5555 || mb[3] != 0xAA55 ||
+	    mb[4] != 0x55AA || mb[5] != 0xA5A5 || mb[6] != 0x5A5A ||
+	    mb[7] != 0x2525) {
+		printk(KERN_INFO "qla1280: Failed mbox check\n");
+		goto fail;
+	}
+
+	dprintk(3, "qla1280_chip_diag: exiting normally\n");
+	return 0;
+ fail:
+	dprintk(2, "qla1280_chip_diag: **** FAILED ****\n");
 	return status;
 }
 
-/*
- * Setup chip
- *      Load and start RISC firmware.
- *
- * Input:
- *      ha = adapter block pointer.
- *
- * Returns:
- *      0 = success.
- */
-#define DUMP_IT_BACK 0		/* for debug of RISC loading */
 static int
-qla1280_setup_chip(struct scsi_qla_host *ha)
+qla1280_load_firmware_pio(struct scsi_qla_host *ha)
 {
-	int status = 0;
-	uint16_t risc_address;
-	uint16_t *risc_code_address;
-	int risc_code_size;
-	uint16_t mb[MAILBOX_REGISTER_COUNT];
-	uint16_t cnt;
-	int num, i;
-#if DUMP_IT_BACK
-	uint8_t *sp;
-	uint8_t *tbuf;
-	dma_addr_t p_tbuf;
-#endif
+	uint16_t risc_address, *risc_code_address, risc_code_size;
+	uint16_t mb[MAILBOX_REGISTER_COUNT], i;
+	int err;
 
-	ENTER("qla1280_setup_chip");
+	/* Load RISC code. */
+	risc_address = *ql1280_board_tbl[ha->devnum].fwstart;
+	risc_code_address = ql1280_board_tbl[ha->devnum].fwcode;
+	risc_code_size = *ql1280_board_tbl[ha->devnum].fwlen;
 
-	dprintk(1, "scsi(%ld): Setup chip\n", ha->host_no);
+	for (i = 0; i < risc_code_size; i++) {
+		mb[0] = MBC_WRITE_RAM_WORD;
+		mb[1] = risc_address + i;
+		mb[2] = risc_code_address[i];
+
+		err = qla1280_mailbox_command(ha, BIT_0 | BIT_1 | BIT_2, mb);
+		if (err) {
+			printk(KERN_ERR "scsi(%li): Failed to load firmware\n",
+					ha->host_no);
+			return err;
+		}
+	}
 
+	return 0;
+}
+
+#define DUMP_IT_BACK 0		/* for debug of RISC loading */
+static int
+qla1280_load_firmware_dma(struct scsi_qla_host *ha)
+{
+	uint16_t risc_address, *risc_code_address, risc_code_size;
+	uint16_t mb[MAILBOX_REGISTER_COUNT], cnt;
+	int err = 0, num, i;
 #if DUMP_IT_BACK
-	/* get consistent memory allocated for setup_chip */
+	uint8_t *sp, *tbuf;
+	dma_addr_t p_tbuf;
+
 	tbuf = pci_alloc_consistent(ha->pdev, 8000, &p_tbuf);
+	if (!tbuf)
+		return -ENOMEM;
 #endif
 
 	/* Load RISC code. */
 	risc_address = *ql1280_board_tbl[ha->devnum].fwstart;
 	risc_code_address = ql1280_board_tbl[ha->devnum].fwcode;
-	risc_code_size = (int) *ql1280_board_tbl[ha->devnum].fwlen;
+	risc_code_size = *ql1280_board_tbl[ha->devnum].fwlen;
 
-	dprintk(1, "qla1280_setup_chip: DMA RISC code (%i) words\n",
-		risc_code_size);
+	dprintk(1, "%s: DMA RISC code (%i) words\n",
+			__FUNCTION__, risc_code_size);
 
 	num = 0;
-	while (risc_code_size > 0 && !status) {
+	while (risc_code_size > 0) {
 		int warn __attribute__((unused)) = 0;
 
 		cnt = 2000 >> 1;
@@ -2129,15 +2102,16 @@
 		mb[2] = (ha->request_dma >> 16) & 0xffff;
 		mb[7] = pci_dma_hi32(ha->request_dma) & 0xffff;
 		mb[6] = pci_dma_hi32(ha->request_dma) >> 16;
-		dprintk(2, "qla1280_setup_chip: op=%d  0x%p = 0x%4x,0x%4x,"
-			"0x%4x,0x%4x\n", mb[0], (void *)(long)ha->request_dma,
-			mb[6], mb[7], mb[2], mb[3]);
-		if ((status = qla1280_mailbox_command(ha, BIT_4 | BIT_3 |
-						      BIT_2 | BIT_1 | BIT_0,
-						      &mb[0]))) {
+		dprintk(2, "%s: op=%d  0x%p = 0x%4x,0x%4x,0x%4x,0x%4x\n",
+				__FUNCTION__, mb[0],
+				(void *)(long)ha->request_dma,
+				mb[6], mb[7], mb[2], mb[3]);
+		err = qla1280_mailbox_command(ha, BIT_4 | BIT_3 | BIT_2 |
+				BIT_1 | BIT_0, mb);
+		if (err) {
 			printk(KERN_ERR "scsi(%li): Failed to load partial "
 			       "segment of f\n", ha->host_no);
-			break;
+			goto out;
 		}
 
 #if DUMP_IT_BACK
@@ -2149,22 +2123,22 @@
 		mb[7] = pci_dma_hi32(p_tbuf) & 0xffff;
 		mb[6] = pci_dma_hi32(p_tbuf) >> 16;
 
-		if ((status = qla1280_mailbox_command(ha,
-						      BIT_4 | BIT_3 | BIT_2 |
-						      BIT_1 | BIT_0,
-						      &mb[0]))) {
+		err = qla1280_mailbox_command(ha, BIT_4 | BIT_3 | BIT_2 |
+				BIT_1 | BIT_0, mb);
+		if (err) {
 			printk(KERN_ERR
 			       "Failed to dump partial segment of f/w\n");
-			break;
+			goto out;
 		}
 		sp = (uint8_t *)ha->request_ring;
 		for (i = 0; i < (cnt << 1); i++) {
 			if (tbuf[i] != sp[i] && warn++ < 10) {
-				printk(KERN_ERR "qla1280_setup_chip: FW "
-				       "compare error @ byte(0x%x) loop#=%x\n",
-				       i, num);
-				printk(KERN_ERR "setup_chip: FWbyte=%x  "
-				       "FWfromChip=%x\n", sp[i], tbuf[i]);
+				printk(KERN_ERR "%s: FW compare error @ "
+						"byte(0x%x) loop#=%x\n",
+						__FUNCTION__, i, num);
+				printk(KERN_ERR "%s: FWbyte=%x  "
+						"FWfromChip=%x\n",
+						__FUNCTION__, sp[i], tbuf[i]);
 				/*break; */
 			}
 		}
@@ -2175,37 +2149,69 @@
 		num++;
 	}
 
-	/* Verify checksum of loaded RISC code. */
-	if (!status) {
-		dprintk(1, "qla1280_setup_chip: Verifying checksum of "
-			"loaded RISC code.\n");
-		mb[0] = MBC_VERIFY_CHECKSUM;
-		/* mb[1] = ql12_risc_code_addr01; */
-		mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
-
-		if (!(status =
-		      qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]))) {
-			/* Start firmware execution. */
-			dprintk(1,
-				"qla1280_setup_chip: start firmware running.\n");
-			mb[0] = MBC_EXECUTE_FIRMWARE;
-			mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
-			qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
-		} else
-			printk(KERN_ERR "scsi(%li): qla1280_setup_chip: "
-			       "Failed checksum\n", ha->host_no);
-	}
-
+ out:
 #if DUMP_IT_BACK
-	/* free consistent memory allocated for setup_chip */
 	pci_free_consistent(ha->pdev, 8000, tbuf, p_tbuf);
 #endif
+	return err;
+}
 
-	if (status)
-		dprintk(2, "qla1280_setup_chip: **** FAILED ****\n");
+static int
+qla1280_start_firmware(struct scsi_qla_host *ha)
+{
+	uint16_t mb[MAILBOX_REGISTER_COUNT];
+	int err;
 
-	LEAVE("qla1280_setup_chip");
-	return status;
+	dprintk(1, "%s: Verifying checksum of loaded RISC code.\n",
+			__FUNCTION__);
+
+	/* Verify checksum of loaded RISC code. */
+	mb[0] = MBC_VERIFY_CHECKSUM;
+	/* mb[1] = ql12_risc_code_addr01; */
+	mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
+	err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb);
+	if (err) {
+		printk(KERN_ERR "scsi(%li): Failed checksum\n", ha->host_no);
+		return err;
+	}
+
+	/* Start firmware execution. */
+	dprintk(1, "%s: start firmware running.\n", __FUNCTION__);
+	mb[0] = MBC_EXECUTE_FIRMWARE;
+	mb[1] = *ql1280_board_tbl[ha->devnum].fwstart;
+	err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
+	if (err) {
+		printk(KERN_ERR "scsi(%li): Failed to start firmware\n",
+				ha->host_no);
+	}
+
+	return err;
+}
+
+static int
+qla1280_load_firmware(struct scsi_qla_host *ha)
+{
+	int err = -ENODEV;
+
+	/* If firmware needs to be loaded */
+	if (!qla1280_isp_firmware(ha)) {
+		printk(KERN_ERR "scsi(%li): isp_firmware() failed!\n",
+				ha->host_no);
+		goto out;
+	}
+
+	err = qla1280_chip_diag(ha);
+	if (err)
+		goto out;
+	if (IS_ISP1040(ha))
+		err = qla1280_load_firmware_pio(ha);
+	else
+		err = qla1280_load_firmware_dma(ha);
+	if (err)
+		goto out;
+	err = qla1280_start_firmware(ha);
+ out:
+	return err;
 }
 
 /*
@@ -2271,123 +2277,9 @@
 	return status;
 }
 
-/*
- * NVRAM configuration.
- *
- * Input:
- *      ha                = adapter block pointer.
- *      ha->request_ring  = request ring virtual address
- *
- * Output:
- *      host adapters parameters in host adapter block
- *
- * Returns:
- *      0 = success.
- */
-static int
-qla1280_nvram_config(struct scsi_qla_host *ha)
+static void
+qla1280_print_settings(struct nvram *nv)
 {
-	struct device_reg *reg = ha->iobase;
-	struct nvram *nv;
-	int is1x160, status = 0;
-	int bus, target, lun;
-	uint16_t mb[MAILBOX_REGISTER_COUNT];
-	uint16_t mask;
-
-	ENTER("qla1280_nvram_config");
-
-	if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 ||
-	    ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160)
-		is1x160 = 1;
-	else
-		is1x160 = 0;
-
-	nv = &ha->nvram;
-	if (!ha->nvram_valid) {
-		dprintk(1, "Using defaults for NVRAM: \n");
-		memset(nv, 0, sizeof(struct nvram));
-
-		/* nv->cntr_flags_1.disable_loading_risc_code = 1; */
-		nv->firmware_feature.f.enable_fast_posting = 1;
-		nv->firmware_feature.f.disable_synchronous_backoff = 1;
-
-		nv->termination.f.scsi_bus_0_control = 3;
-		nv->termination.f.scsi_bus_1_control = 3;
-		nv->termination.f.auto_term_support = 1;
-
-		/*
-		 * Set default FIFO magic - What appropriate values
-		 * would be here is unknown. This is what I have found
-		 * testing with 12160s.
-		 * Now, I would love the magic decoder ring for this one,
-		 * the header file provided by QLogic seems to be bogus
-		 * or incomplete at best.
-		 */
-		nv->isp_config.c = 0x44;
-
-		if (is1x160)
-			nv->isp_parameter = 0x01;
-
-		for (bus = 0; bus < MAX_BUSES; bus++) {
-			nv->bus[bus].config_1.initiator_id = 7;
-			nv->bus[bus].bus_reset_delay = 5;
-			/* 8 = 5.0 clocks */
-			nv->bus[bus].config_2.async_data_setup_time = 8;
-			nv->bus[bus].config_2.req_ack_active_negation = 1;
-			nv->bus[bus].config_2.data_line_active_negation = 1;
-			nv->bus[bus].selection_timeout = 250;
-			nv->bus[bus].max_queue_depth = 256;
-
-			for (target = 0; target < MAX_TARGETS; target++) {
-				nv->bus[bus].target[target].parameter.f.
-					renegotiate_on_error = 1;
-				nv->bus[bus].target[target].parameter.f.
-					auto_request_sense = 1;
-				nv->bus[bus].target[target].parameter.f.
-					tag_queuing = 1;
-				nv->bus[bus].target[target].parameter.f.
-					enable_sync = 1;
-#if 1	/* Some SCSI Processors do not seem to like this */
-				nv->bus[bus].target[target].parameter.f.
-					enable_wide = 1;
-#endif
-				nv->bus[bus].target[target].parameter.f.
-					parity_checking = 1;
-				nv->bus[bus].target[target].parameter.f.
-					disconnect_allowed = 1;
-				nv->bus[bus].target[target].execution_throttle=
-					nv->bus[bus].max_queue_depth - 1;
-				if (is1x160) {
-					nv->bus[bus].target[target].flags.
-						flags1x160.device_enable = 1;
-					nv->bus[bus].target[target].flags.
-						flags1x160.sync_offset = 0x0e;
-					nv->bus[bus].target[target].
-						sync_period = 9;
-					nv->bus[bus].target[target].
-						ppr_1x160.flags.enable_ppr = 1;
-					nv->bus[bus].target[target].ppr_1x160.
-						flags.ppr_options = 2;
-					nv->bus[bus].target[target].ppr_1x160.
-						flags.ppr_bus_width = 1;
-				} else {
-					nv->bus[bus].target[target].flags.
-						flags1x80.device_enable = 1;
-					nv->bus[bus].target[target].flags.
-						flags1x80.sync_offset = 0x8;
-					nv->bus[bus].target[target].
-						sync_period = 10;
-				}
-			}
-		}
-	} else {
-		/* Always force AUTO sense for LINUX SCSI */
-		for (bus = 0; bus < MAX_BUSES; bus++)
-			for (target = 0; target < MAX_TARGETS; target++) {
-				nv->bus[bus].target[target].parameter.f.
-					auto_request_sense = 1;
-			}
-	}
 	dprintk(1, "qla1280 : initiator scsi id bus[0]=%d\n",
 		nv->bus[0].config_1.initiator_id);
 	dprintk(1, "qla1280 : initiator scsi id bus[1]=%d\n",
@@ -2433,36 +2325,264 @@
 		nv->bus[0].max_queue_depth);
 	dprintk(1, "qla1280 : max queue depth[1]=%d\n",
 		nv->bus[1].max_queue_depth);
+}
+
+static void
+qla1280_set_target_defaults(struct scsi_qla_host *ha, int bus, int target)
+{
+	struct nvram *nv = &ha->nvram;
+
+	nv->bus[bus].target[target].parameter.f.renegotiate_on_error = 1;
+	nv->bus[bus].target[target].parameter.f.auto_request_sense = 1;
+	nv->bus[bus].target[target].parameter.f.tag_queuing = 1;
+	nv->bus[bus].target[target].parameter.f.enable_sync = 1;
+#if 1	/* Some SCSI Processors do not seem to like this */
+	nv->bus[bus].target[target].parameter.f.enable_wide = 1;
+#endif
+	if (!IS_ISP1040(ha))
+		nv->bus[bus].target[target].parameter.f.parity_checking = 1;
+
+	nv->bus[bus].target[target].parameter.f.disconnect_allowed = 1;
+	nv->bus[bus].target[target].execution_throttle =
+		nv->bus[bus].max_queue_depth - 1;
+
+	if (IS_ISP1x160(ha)) {
+		nv->bus[bus].target[target].flags.flags1x160.device_enable = 1;
+		nv->bus[bus].target[target].flags.flags1x160.sync_offset = 0x0e;
+		nv->bus[bus].target[target].sync_period = 9;
+		nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr = 1;
+		nv->bus[bus].target[target].ppr_1x160.flags.ppr_options = 2;
+		nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width = 1;
+	} else {
+		nv->bus[bus].target[target].flags.flags1x80.device_enable = 1;
+		nv->bus[bus].target[target].flags.flags1x80.sync_offset = 12;
+		nv->bus[bus].target[target].sync_period = 10;
+	}
+}
+
+static void
+qla1280_set_defaults(struct scsi_qla_host *ha)
+{
+	struct nvram *nv = &ha->nvram;
+	int bus, target;
+
+	dprintk(1, "Using defaults for NVRAM: \n");
+	memset(nv, 0, sizeof(struct nvram));
+
+	/* nv->cntr_flags_1.disable_loading_risc_code = 1; */
+	nv->firmware_feature.f.enable_fast_posting = 1;
+	nv->firmware_feature.f.disable_synchronous_backoff = 1;
+	nv->termination.f.scsi_bus_0_control = 3;
+	nv->termination.f.scsi_bus_1_control = 3;
+	nv->termination.f.auto_term_support = 1;
+
+	/*
+	 * Set default FIFO magic - What appropriate values would be here
+	 * is unknown. This is what I have found testing with 12160s.
+	 *
+	 * Now, I would love the magic decoder ring for this one, the
+	 * header file provided by QLogic seems to be bogus or incomplete
+	 * at best.
+	 */
+	nv->isp_config.c = ISP_CFG1_BENAB|ISP_CFG1_F128;
+	if (IS_ISP1x160(ha))
+		nv->isp_parameter = 0x01; /* fast memory enable */
+
+	for (bus = 0; bus < MAX_BUSES; bus++) {
+		nv->bus[bus].config_1.initiator_id = 7;
+		nv->bus[bus].config_2.req_ack_active_negation = 1;
+		nv->bus[bus].config_2.data_line_active_negation = 1;
+		nv->bus[bus].selection_timeout = 250;
+		nv->bus[bus].max_queue_depth = 256;
+
+		if (IS_ISP1040(ha)) {
+			nv->bus[bus].bus_reset_delay = 3;
+			nv->bus[bus].config_2.async_data_setup_time = 6;
+			nv->bus[bus].retry_delay = 1;
+		} else {
+			nv->bus[bus].bus_reset_delay = 5;
+			nv->bus[bus].config_2.async_data_setup_time = 8;
+		}
+
+		for (target = 0; target < MAX_TARGETS; target++)
+			qla1280_set_target_defaults(ha, bus, target);
+	}
+}
+
+static int
+qla1280_config_target(struct scsi_qla_host *ha, int bus, int target)
+{
+	struct nvram *nv = &ha->nvram;
+	uint16_t mb[MAILBOX_REGISTER_COUNT];
+	int status, lun;
+
+	/* Set Target Parameters. */
+	mb[0] = MBC_SET_TARGET_PARAMETERS;
+	mb[1] = (uint16_t) (bus ? target | BIT_7 : target);
+	mb[1] <<= 8;
+
+	/*
+	 * Do not enable wide, sync, and ppr for the initial
+	 * INQUIRY run. We enable this later if we determine
+	 * the target actually supports it.
+	 */
+	nv->bus[bus].target[target].parameter.f.
+		auto_request_sense = 1;
+	nv->bus[bus].target[target].parameter.f.
+		stop_queue_on_check = 0;
+
+	if (IS_ISP1x160(ha))
+		nv->bus[bus].target[target].ppr_1x160.
+			flags.enable_ppr = 0;
+
+	/*
+	 * No sync, wide, etc. while probing
+	 */
+	mb[2] = (nv->bus[bus].target[target].parameter.c << 8) &
+		~(TP_SYNC /*| TP_WIDE | TP_PPR*/);
+
+	if (IS_ISP1x160(ha))
+		mb[3] =	nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8;
+	else
+		mb[3] =	nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8;
+	mb[3] |= nv->bus[bus].target[target].sync_period;
+
+	status = qla1280_mailbox_command(ha, BIT_3 | BIT_2 | BIT_1 | BIT_0, &mb[0]);
+
+	/* Save Tag queuing enable flag. */
+	mb[0] = BIT_0 << target;
+	if (nv->bus[bus].target[target].parameter.f.tag_queuing)
+		ha->bus_settings[bus].qtag_enables |= mb[0];
+
+	/* Save Device enable flag. */
+	if (IS_ISP1x160(ha)) {
+		if (nv->bus[bus].target[target].flags.flags1x160.device_enable)
+			ha->bus_settings[bus].device_enables |= mb[0];
+		ha->bus_settings[bus].lun_disables |= 0;
+	} else {
+		if (nv->bus[bus].target[target].flags.flags1x80.device_enable)
+			ha->bus_settings[bus].device_enables |= mb[0];
+		/* Save LUN disable flag. */
+		if (nv->bus[bus].target[target].flags.flags1x80.lun_disable)
+			ha->bus_settings[bus].lun_disables |= mb[0];
+	}
+
+	/* Set Device Queue Parameters. */
+	for (lun = 0; lun < MAX_LUNS; lun++) {
+		mb[0] = MBC_SET_DEVICE_QUEUE;
+		mb[1] = (uint16_t)(bus ? target | BIT_7 : target);
+		mb[1] = mb[1] << 8 | lun;
+		mb[2] = nv->bus[bus].max_queue_depth;
+		mb[3] = nv->bus[bus].target[target].execution_throttle;
+		status |= qla1280_mailbox_command(ha, 0x0f, &mb[0]);
+	}
+
+	return status;
+}
+
+static int
+qla1280_config_bus(struct scsi_qla_host *ha, int bus)
+{
+	struct nvram *nv = &ha->nvram;
+	uint16_t mb[MAILBOX_REGISTER_COUNT];
+	int target, status;
+
+	/* SCSI Reset Disable. */
+	ha->bus_settings[bus].disable_scsi_reset =
+		nv->bus[bus].config_1.scsi_reset_disable;
+
+	/* Initiator ID. */
+	ha->bus_settings[bus].id = nv->bus[bus].config_1.initiator_id;
+	mb[0] = MBC_SET_INITIATOR_ID;
+	mb[1] = bus ? ha->bus_settings[bus].id | BIT_7 :
+		ha->bus_settings[bus].id;
+	status = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
+
+	/* Reset Delay. */
+	ha->bus_settings[bus].bus_reset_delay =
+		nv->bus[bus].bus_reset_delay;
+
+	/* Command queue depth per device. */
+	ha->bus_settings[bus].hiwat = nv->bus[bus].max_queue_depth - 1;
+
+	/* Set target parameters. */
+	for (target = 0; target < MAX_TARGETS; target++)
+		status |= qla1280_config_target(ha, bus, target);
+
+	return status;
+}
+
+static int
+qla1280_nvram_config(struct scsi_qla_host *ha)
+{
+	struct device_reg *reg = ha->iobase;
+	struct nvram *nv = &ha->nvram;
+	int bus, target, status = 0;
+	uint16_t mb[MAILBOX_REGISTER_COUNT];
+	uint16_t mask;
+
+	ENTER("qla1280_nvram_config");
+
+	if (ha->nvram_valid) {
+		/* Always force AUTO sense for LINUX SCSI */
+		for (bus = 0; bus < MAX_BUSES; bus++)
+			for (target = 0; target < MAX_TARGETS; target++) {
+				nv->bus[bus].target[target].parameter.f.
+					auto_request_sense = 1;
+			}
+	} else {
+		qla1280_set_defaults(ha);
+	}
+
+	qla1280_print_settings(nv);
 
 	/* Disable RISC load of firmware. */
 	ha->flags.disable_risc_code_load =
 		nv->cntr_flags_1.disable_loading_risc_code;
 
-	/* Set ISP hardware DMA burst */
-	mb[0] = nv->isp_config.c;
-	/* Enable DMA arbitration on dual channel controllers */
-	if (ha->ports > 1)
-		mb[0] |= BIT_13;
-	WRT_REG_WORD(&reg->cfg_1, mb[0]);
-
-#if 1	/* Is this safe? */
-	/* Set SCSI termination. */
-	WRT_REG_WORD(&reg->gpio_enable, (BIT_3 + BIT_2 + BIT_1 + BIT_0));
-	mb[0] = nv->termination.c & (BIT_3 + BIT_2 + BIT_1 + BIT_0);
-	WRT_REG_WORD(&reg->gpio_data, mb[0]);
-#endif
+	if (IS_ISP1040(ha)) {
+		uint16_t hwrev, cfg1, cdma_conf, ddma_conf;
+
+		hwrev = RD_REG_WORD(&reg->cfg_0) & ISP_CFG0_HWMSK;
+
+		cfg1 = RD_REG_WORD(&reg->cfg_1);
+		cdma_conf = RD_REG_WORD(&reg->cdma_cfg);
+		ddma_conf = RD_REG_WORD(&reg->ddma_cfg);
+
+		/* Busted fifo, says mjacob. */
+		if (hwrev == ISP_CFG0_1040A)
+			WRT_REG_WORD(&reg->cfg_1, cfg1 | ISP_CFG1_F64);
+		else
+			WRT_REG_WORD(&reg->cfg_1, cfg1 | ISP_CFG1_F64 | ISP_CFG1_BENAB);
+
+		WRT_REG_WORD(&reg->cdma_cfg, cdma_conf | CDMA_CONF_BENAB);
+		WRT_REG_WORD(&reg->ddma_cfg, cdma_conf | DDMA_CONF_BENAB);
+	} else {
+		/* Set ISP hardware DMA burst */
+		mb[0] = nv->isp_config.c;
+		/* Enable DMA arbitration on dual channel controllers */
+		if (ha->ports > 1)
+			mb[0] |= BIT_13;
+		WRT_REG_WORD(&reg->cfg_1, mb[0]);
+
+		/* Set SCSI termination. */
+		WRT_REG_WORD(&reg->gpio_enable, (BIT_3 + BIT_2 + BIT_1 + BIT_0));
+		mb[0] = nv->termination.c & (BIT_3 + BIT_2 + BIT_1 + BIT_0);
+		WRT_REG_WORD(&reg->gpio_data, mb[0]);
+	}
 
 	/* ISP parameter word. */
 	mb[0] = MBC_SET_SYSTEM_PARAMETER;
 	mb[1] = nv->isp_parameter;
 	status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
 
-#if 0
-	/* clock rate - for qla1240 and older, only */
-	mb[0] = MBC_SET_CLOCK_RATE;
-	mb[1] = 0x50;
- 	status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
-#endif
+	if (IS_ISP1x40(ha)) {
+		/* clock rate - for qla1240 and older, only */
+		mb[0] = MBC_SET_CLOCK_RATE;
+		mb[1] = 40;
+	 	status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb);
+	}
+
 	/* Firmware feature word. */
 	mb[0] = MBC_SET_FIRMWARE_FEATURES;
 	mask = BIT_5 | BIT_1 | BIT_0;
@@ -2515,112 +2635,18 @@
 	mb[2] = 2;	/* Command DMA Channel Burst Enable */
 	status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]);
 
+	mb[0] = MBC_SET_TAG_AGE_LIMIT;
+	mb[1] = 8;
+	status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
+
 	/* Selection timeout. */
 	mb[0] = MBC_SET_SELECTION_TIMEOUT;
 	mb[1] = nv->bus[0].selection_timeout;
 	mb[2] = nv->bus[1].selection_timeout;
 	status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]);
 
-	for (bus = 0; bus < ha->ports; bus++) {
-		/* SCSI Reset Disable. */
-		ha->bus_settings[bus].disable_scsi_reset =
-			nv->bus[bus].config_1.scsi_reset_disable;
-
-		/* Initiator ID. */
-		ha->bus_settings[bus].id = nv->bus[bus].config_1.initiator_id;
-		mb[0] = MBC_SET_INITIATOR_ID;
-		mb[1] = bus ? ha->bus_settings[bus].id | BIT_7 :
-			ha->bus_settings[bus].id;
-		status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]);
-
-		/* Reset Delay. */
-		ha->bus_settings[bus].bus_reset_delay =
-			nv->bus[bus].bus_reset_delay;
-
-		/* Command queue depth per device. */
-		ha->bus_settings[bus].hiwat = nv->bus[bus].max_queue_depth - 1;
-
-		/* Set target parameters. */
-		for (target = 0; target < MAX_TARGETS; target++) {
-			uint8_t mr = BIT_2 | BIT_1 | BIT_0;
-
-			/* Set Target Parameters. */
-			mb[0] = MBC_SET_TARGET_PARAMETERS;
-			mb[1] = (uint16_t) (bus ? target | BIT_7 : target);
-			mb[1] <<= 8;
-			/*
-			 * Do not enable wide, sync, and ppr for the initial
-			 * INQUIRY run. We enable this later if we determine
-			 * the target actually supports it.
-			 */
-			nv->bus[bus].target[target].parameter.f.
-				auto_request_sense = 1;
-			nv->bus[bus].target[target].parameter.f.
-				stop_queue_on_check = 0;
-
-			if (is1x160)
-				nv->bus[bus].target[target].ppr_1x160.
-					flags.enable_ppr = 0;
-			/*
-			 * No sync, wide, etc. while probing
-			 */
-			mb[2] = (nv->bus[bus].target[target].parameter.c << 8)&
-				~(TP_SYNC /*| TP_WIDE | TP_PPR*/);
-
-			if (is1x160)
-				mb[3] =	nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8;
-			else
-				mb[3] =	nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8;
-			mb[3] |= nv->bus[bus].target[target].sync_period;
-			mr |= BIT_3;
-
-			/*
-			 * We don't want to enable ppr etc. before we have 
-			 * determined that the target actually supports it
-			 */
-#if 0
-			if (is1x160) {
-				mb[2] |= nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr << 5;
-
-				mb[6] =	nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8;
-				mb[6] |= nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width;
-				mr |= BIT_6;
-			}
-#endif
-
-			status = qla1280_mailbox_command(ha, mr, &mb[0]);
-
-			/* Save Tag queuing enable flag. */
-			mb[0] = BIT_0 << target;
-			if (nv->bus[bus].target[target].parameter.f.tag_queuing)
-				ha->bus_settings[bus].qtag_enables |= mb[0];
-
-			/* Save Device enable flag. */
-			if (is1x160) {
-				if (nv->bus[bus].target[target].flags.flags1x160.device_enable)
-					ha->bus_settings[bus].device_enables |= mb[0];
-				ha->bus_settings[bus].lun_disables |= 0;
-			} else {
-				if (nv->bus[bus].target[target].flags.flags1x80.device_enable)
-					ha->bus_settings[bus].device_enables |= mb[0];
-				/* Save LUN disable flag. */
-				if (nv->bus[bus].target[target].flags.flags1x80.lun_disable)
-				ha->bus_settings[bus].lun_disables |= mb[0];
-			}
-
-
-			/* Set Device Queue Parameters. */
-			for (lun = 0; lun < MAX_LUNS; lun++) {
-				mb[0] = MBC_SET_DEVICE_QUEUE;
-				mb[1] = (uint16_t)(bus ? target | BIT_7 : target);
-				mb[1] = mb[1] << 8 | lun;
-				mb[2] = nv->bus[bus].max_queue_depth;
-				mb[3] = nv->bus[bus].target[target].execution_throttle;
-				status |= qla1280_mailbox_command(ha, 0x0f,
-								  &mb[0]);
-			}
-		}
-	}
+	for (bus = 0; bus < ha->ports; bus++)
+		status |= qla1280_config_bus(ha, bus);
 
 	if (status)
 		dprintk(2, "qla1280_nvram_config: **** FAILED ****\n");
@@ -3119,6 +3145,7 @@
  * Returns:
  *      0 = success, was able to issue command.
  */
+#ifdef QLA_64BIT_PTR
 static int
 qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
 {
@@ -3381,9 +3408,8 @@
 
 	return status;
 }
+#else /* !QLA_64BIT_PTR */
 
-
-#ifndef QLA_64BIT_PTR
 /*
  * qla1280_32bit_start_scsi
  *      The start SCSI is responsible for building request packets on
@@ -4231,6 +4257,7 @@
 static int
 qla1280_abort_isp(struct scsi_qla_host *ha)
 {
+	struct device_reg *reg = ha->iobase;
 	struct srb *sp;
 	int status = 0;
 	int cnt;
@@ -4238,69 +4265,53 @@
 
 	ENTER("qla1280_abort_isp");
 
-	if (!ha->flags.abort_isp_active && ha->flags.online) {
-		struct device_reg *reg = ha->iobase;
-		ha->flags.abort_isp_active = 1;
+	if (ha->flags.abort_isp_active || !ha->flags.online)
+		goto out;
+	
+	ha->flags.abort_isp_active = 1;
 
-		/* Disable ISP interrupts. */
-		qla1280_disable_intrs(ha);
-		WRT_REG_WORD(&reg->host_cmd, HC_PAUSE_RISC);
-		RD_REG_WORD(&reg->id_l);
+	/* Disable ISP interrupts. */
+	qla1280_disable_intrs(ha);
+	WRT_REG_WORD(&reg->host_cmd, HC_PAUSE_RISC);
+	RD_REG_WORD(&reg->id_l);
 
-		printk(KERN_INFO "scsi(%li): dequeuing outstanding commands\n",
-		       ha->host_no);
-		/* Dequeue all commands in outstanding command list. */
-		for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {
-			struct scsi_cmnd *cmd;
-			sp = ha->outstanding_cmds[cnt];
-			if (sp) {
+	printk(KERN_INFO "scsi(%li): dequeuing outstanding commands\n",
+	       ha->host_no);
+	/* Dequeue all commands in outstanding command list. */
+	for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {
+		struct scsi_cmnd *cmd;
+		sp = ha->outstanding_cmds[cnt];
+		if (sp) {
 
-				cmd = sp->cmd;
-				CMD_RESULT(cmd) = DID_RESET << 16;
+			cmd = sp->cmd;
+			CMD_RESULT(cmd) = DID_RESET << 16;
 
-				sp->cmd = NULL;
-				ha->outstanding_cmds[cnt] = NULL;
+			sp->cmd = NULL;
+			ha->outstanding_cmds[cnt] = NULL;
 
-				(*cmd->scsi_done)(cmd);
+			(*cmd->scsi_done)(cmd);
 
-				sp->flags = 0;
-			}
+			sp->flags = 0;
 		}
+	}
 
-		/* If firmware needs to be loaded */
-		if (qla1280_isp_firmware (ha)) {
-			if (!(status = qla1280_chip_diag(ha)))
-				status = qla1280_setup_chip(ha);
-		}
+	status = qla1280_load_firmware(ha);
+	if (status)
+		goto out;
 
-		if (!status) {
-			/* Setup adapter based on NVRAM parameters. */
-			qla1280_nvram_config (ha);
-
-			if (!(status = qla1280_init_rings(ha))) {
-				/* Issue SCSI reset. */
-				for (bus = 0; bus < ha->ports; bus++) {
-					qla1280_bus_reset(ha, bus);
-				}
-				/*
-				 * qla1280_bus_reset() will do the marker
-				 * dance - no reason to repeat here!
-				 */
-#if  0
-				/* Issue marker command. */
-				ha->flags.reset_marker = 0;
-				for (bus = 0; bus < ha->ports; bus++) {
-					ha->bus_settings[bus].
-						reset_marker = 0;
-					qla1280_marker(ha, bus, 0, 0,
-						       MK_SYNC_ALL);
-				}
-#endif
-				ha->flags.abort_isp_active = 0;
-			}
-		}
-	}
+	/* Setup adapter based on NVRAM parameters. */
+	qla1280_nvram_config (ha);
 
+	status = qla1280_init_rings(ha);
+	if (status)
+		goto out;
+		
+	/* Issue SCSI reset. */
+	for (bus = 0; bus < ha->ports; bus++)
+		qla1280_bus_reset(ha, bus);
+		
+	ha->flags.abort_isp_active = 0;
+ out:
 	if (status) {
 		printk(KERN_WARNING
 		       "qla1280: ISP error recovery failed, board disabled");
--- diff/drivers/scsi/qla1280.h	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla1280.h	2004-07-01 21:32:43.000000000 +0100
@@ -126,7 +126,20 @@
 	uint16_t id_l;		/* ID low */
 	uint16_t id_h;		/* ID high */
 	uint16_t cfg_0;		/* Configuration 0 */
+#define ISP_CFG0_HWMSK   0x000f	/* Hardware revision mask */
+#define ISP_CFG0_1020    BIT_0	/* ISP1020 */
+#define ISP_CFG0_1020A	 BIT_1	/* ISP1020A */
+#define ISP_CFG0_1040	 BIT_2	/* ISP1040 */
+#define ISP_CFG0_1040A	 BIT_3	/* ISP1040A */
+#define ISP_CFG0_1040B	 BIT_4	/* ISP1040B */
+#define ISP_CFG0_1040C	 BIT_5	/* ISP1040C */
 	uint16_t cfg_1;		/* Configuration 1 */
+#define ISP_CFG1_F128    BIT_6  /* 128-byte FIFO threshold */
+#define ISP_CFG1_F64     BIT_4|BIT_5 /* 128-byte FIFO threshold */
+#define ISP_CFG1_F32     BIT_5  /* 128-byte FIFO threshold */
+#define ISP_CFG1_F16     BIT_4  /* 128-byte FIFO threshold */
+#define ISP_CFG1_BENAB   BIT_2  /* Global Bus burst enable */
+#define ISP_CFG1_SXP     BIT_0  /* SXP register select */
 	uint16_t ictrl;		/* Interface control */
 #define ISP_RESET        BIT_0	/* ISP soft reset */
 #define ISP_EN_INT       BIT_1	/* ISP enable interrupts. */
@@ -147,7 +160,42 @@
 	uint16_t flash_data;	/* Flash BIOS data */
 	uint16_t flash_address;	/* Flash BIOS address */
 
-	uint16_t unused_1[0x2e];	/* 0x14-0x6f Gap */
+	uint16_t unused_1[0x06];
+	
+	/* cdma_* and ddma_* are 1040 only */
+	uint16_t cdma_cfg;
+#define CDMA_CONF_SENAB  BIT_3	/* SXP to DMA Data enable */
+#define CDMA_CONF_RIRQ   BIT_2	/* RISC interrupt enable */
+#define CDMA_CONF_BENAB  BIT_1	/* Bus burst enable */
+#define CDMA_CONF_DIR    BIT_0	/* DMA direction (0=fifo->host 1=host->fifo) */
+	uint16_t cdma_ctrl; 
+	uint16_t cdma_status;   
+	uint16_t cdma_fifo_status;
+	uint16_t cdma_count;
+	uint16_t cdma_reserved;
+	uint16_t cdma_address_count_0;
+	uint16_t cdma_address_count_1;
+	uint16_t cdma_address_count_2;
+	uint16_t cdma_address_count_3;
+
+	uint16_t unused_2[0x06];
+
+	uint16_t ddma_cfg;
+#define DDMA_CONF_SENAB  BIT_3	/* SXP to DMA Data enable */
+#define DDMA_CONF_RIRQ   BIT_2	/* RISC interrupt enable */
+#define DDMA_CONF_BENAB  BIT_1	/* Bus burst enable */
+#define DDMA_CONF_DIR    BIT_0	/* DMA direction (0=fifo->host 1=host->fifo) */
+	uint16_t ddma_ctrl;
+	uint16_t ddma_status; 
+	uint16_t ddma_fifo_status;
+	uint16_t ddma_xfer_count_low;
+	uint16_t ddma_xfer_count_high;
+	uint16_t ddma_addr_count_0;
+	uint16_t ddma_addr_count_1;
+	uint16_t ddma_addr_count_2;
+	uint16_t ddma_addr_count_3; 
+
+	uint16_t unused_3[0x0e];
 
 	uint16_t mailbox0;	/* Mailbox 0 */
 	uint16_t mailbox1;	/* Mailbox 1 */
@@ -158,18 +206,18 @@
 	uint16_t mailbox6;	/* Mailbox 6 */
 	uint16_t mailbox7;	/* Mailbox 7 */
 
-	uint16_t unused_2[0x20];/* 0x80-0xbf Gap */
+	uint16_t unused_4[0x20];/* 0x80-0xbf Gap */
 
 	uint16_t host_cmd;	/* Host command and control */
 #define HOST_INT      BIT_7	/* host interrupt bit */
 #define BIOS_ENABLE   BIT_0
 
-	uint16_t unused_6[0x5];	/* 0xc2-0xcb Gap */
+	uint16_t unused_5[0x5];	/* 0xc2-0xcb Gap */
 
 	uint16_t gpio_data;
 	uint16_t gpio_enable;
 
-	uint16_t unused_7[0x11];	/* d0-f0 */
+	uint16_t unused_6[0x11];	/* d0-f0 */
 	uint16_t scsiControlPins;	/* f2 */
 };
 
--- diff/drivers/scsi/qla2xxx/Makefile	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/qla2xxx/Makefile	2004-07-01 21:32:43.000000000 +0100
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS += -Idrivers/scsi -DUNIQUE_FW_NAME
+EXTRA_CFLAGS += -DUNIQUE_FW_NAME
 
 qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
 		qla_dbg.o qla_sup.o qla_rscn.o
--- diff/drivers/scsi/qla2xxx/ql2100.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql2100.c	2004-07-01 21:32:43.000000000 +0100
@@ -10,7 +10,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 
-#include "qla_os.h"
 #include "qla_def.h"
 
 static char qla_driver_name[] = "qla2100";
--- diff/drivers/scsi/qla2xxx/ql2200.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql2200.c	2004-07-01 21:32:43.000000000 +0100
@@ -10,7 +10,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 
-#include "qla_os.h"
 #include "qla_def.h"
 
 static char qla_driver_name[] = "qla2200";
--- diff/drivers/scsi/qla2xxx/ql2300.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql2300.c	2004-07-01 21:32:43.000000000 +0100
@@ -10,7 +10,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 
-#include "qla_os.h"
 #include "qla_def.h"
 
 static char qla_driver_name[] = "qla2300";
--- diff/drivers/scsi/qla2xxx/ql2300_fw.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql2300_fw.c	2004-07-01 21:32:43.000000000 +0100
@@ -18,7 +18,7 @@
  *************************************************************************/
 
 /*
- *	Firmware Version 3.02.28 (13:56 Apr 03, 2004)
+ *	Firmware Version 3.02.30 (07:51 Jun 16, 2004)
  */
 
 #ifdef UNIQUE_FW_NAME
@@ -28,15 +28,15 @@
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned char fw2300ipx_version_str[] = {3, 2,28};
+unsigned char fw2300ipx_version_str[] = {3, 2,30};
 #else
-unsigned char firmware_version[] = {3, 2,28};
+unsigned char firmware_version[] = {3, 2,30};
 #endif
 
 #ifdef UNIQUE_FW_NAME
-#define fw2300ipx_VERSION_STRING "3.02.28"
+#define fw2300ipx_VERSION_STRING "3.02.30"
 #else
-#define FW_VERSION_STRING "3.02.28"
+#define FW_VERSION_STRING "3.02.30"
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -50,12 +50,12 @@
 #else
 unsigned short risc_code01[] = { 
 #endif
-	0x0470, 0x0000, 0x0000, 0xe9c7, 0x0000, 0x0003, 0x0002, 0x001c,
+	0x0470, 0x0000, 0x0000, 0xe9e8, 0x0000, 0x0003, 0x0002, 0x001e,
 	0x0137, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
 	0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
 	0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972,
 	0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-	0x332e, 0x3032, 0x2e32, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9,
+	0x332e, 0x3032, 0x2e33, 0x3020, 0x2020, 0x2020, 0x2400, 0x20a9,
 	0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f,
 	0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001,
 	0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000,
@@ -64,175 +64,175 @@
 	0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00,
 	0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001,
 	0x0000, 0x20c1, 0x0004, 0x20c9, 0x1bff, 0x2059, 0x0000, 0x2b78,
-	0x7883, 0x0004, 0x2089, 0x2d29, 0x2051, 0x1800, 0x2a70, 0x20e1,
+	0x7883, 0x0004, 0x2089, 0x2d2b, 0x2051, 0x1800, 0x2a70, 0x20e1,
 	0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e51, 0x2029,
 	0x4d00, 0x2031, 0xffff, 0x2039, 0x4cd0, 0x2021, 0x0200, 0x20e9,
 	0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9,
 	0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff,
 	0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8,
 	0x4104, 0x8001, 0x1de0, 0x756e, 0x7672, 0x776a, 0x7476, 0x747a,
-	0x00e6, 0x2071, 0x1ac8, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x7170,
+	0x00e6, 0x2071, 0x1ac7, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x7170,
 	0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001,
 	0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x7170, 0x3400,
 	0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009,
 	0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f,
 	0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e,
 	0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f17, 0x080c,
-	0x6028, 0x080c, 0xadf7, 0x080c, 0x10ce, 0x080c, 0x12ed, 0x080c,
-	0x1ba4, 0x080c, 0x0d69, 0x080c, 0x1053, 0x080c, 0x3425, 0x080c,
-	0x76b8, 0x080c, 0x6996, 0x080c, 0x86f6, 0x080c, 0x842a, 0x080c,
-	0x2478, 0x080c, 0x8f98, 0x080c, 0x7d82, 0x080c, 0x22b1, 0x080c,
-	0x23e5, 0x080c, 0x246d, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004,
+	0x6031, 0x080c, 0xae07, 0x080c, 0x10ce, 0x080c, 0x12ed, 0x080c,
+	0x1ba6, 0x080c, 0x0d69, 0x080c, 0x1053, 0x080c, 0x3427, 0x080c,
+	0x76a1, 0x080c, 0x699f, 0x080c, 0x86df, 0x080c, 0x8413, 0x080c,
+	0x247a, 0x080c, 0x8f81, 0x080c, 0x7d6b, 0x080c, 0x22b3, 0x080c,
+	0x23e7, 0x080c, 0x246f, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004,
 	0x091f, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837,
 	0x4000, 0x7833, 0x0010, 0x0e04, 0x0913, 0x2091, 0x5000, 0x2091,
 	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2071,
 	0x1800, 0x7003, 0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003,
-	0x1178, 0x080c, 0x4bc9, 0x080c, 0x344c, 0x080c, 0x7729, 0x080c,
-	0x6ed7, 0x080c, 0x87d4, 0x080c, 0x8453, 0x080c, 0x2c93, 0x0c58,
+	0x1178, 0x080c, 0x4bd9, 0x080c, 0x344e, 0x080c, 0x7712, 0x080c,
+	0x6ed0, 0x080c, 0x87bd, 0x080c, 0x843c, 0x080c, 0x2c95, 0x0c58,
 	0x000b, 0x0c78, 0x0944, 0x0945, 0x0ae7, 0x0942, 0x0bae, 0x0d68,
 	0x0d68, 0x0d68, 0x080c, 0x0dd5, 0x0005, 0x0126, 0x00f6, 0x2091,
-	0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0aba, 0x080c, 0x56de,
+	0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0aba, 0x080c, 0x56e7,
 	0x1130, 0x0026, 0x2011, 0x0080, 0x080c, 0x0edf, 0x002e, 0x080c,
-	0x73bc, 0x0150, 0x080c, 0x73df, 0x15a0, 0x2079, 0x0100, 0x7828,
-	0x9085, 0x1800, 0x782a, 0x0468, 0x080c, 0x72ee, 0x7000, 0x9086,
+	0x73a5, 0x0150, 0x080c, 0x73c8, 0x15a0, 0x2079, 0x0100, 0x7828,
+	0x9085, 0x1800, 0x782a, 0x0468, 0x080c, 0x72d7, 0x7000, 0x9086,
 	0x0001, 0x1904, 0x0aba, 0x7098, 0x9086, 0x0028, 0x1904, 0x0aba,
-	0x080c, 0x8422, 0x080c, 0x8414, 0x2001, 0x0161, 0x2003, 0x0001,
+	0x080c, 0x840b, 0x080c, 0x83fd, 0x2001, 0x0161, 0x2003, 0x0001,
 	0x2079, 0x0100, 0x7827, 0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a,
-	0x2011, 0x7252, 0x080c, 0x84f3, 0x2011, 0x7245, 0x080c, 0x85cd,
-	0x2011, 0x5e83, 0x080c, 0x84f3, 0x2011, 0x8030, 0x901e, 0x7396,
-	0x04d0, 0x080c, 0x5730, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904,
-	0x0aba, 0x2011, 0x5e83, 0x080c, 0x84f3, 0x2011, 0x7252, 0x080c,
-	0x84f3, 0x2011, 0x7245, 0x080c, 0x85cd, 0x2001, 0x0265, 0x2001,
+	0x2011, 0x723b, 0x080c, 0x84dc, 0x2011, 0x722e, 0x080c, 0x85b6,
+	0x2011, 0x5e8c, 0x080c, 0x84dc, 0x2011, 0x8030, 0x901e, 0x7396,
+	0x04d0, 0x080c, 0x5739, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904,
+	0x0aba, 0x2011, 0x5e8c, 0x080c, 0x84dc, 0x2011, 0x723b, 0x080c,
+	0x84dc, 0x2011, 0x722e, 0x080c, 0x85b6, 0x2001, 0x0265, 0x2001,
 	0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, 0x2001,
-	0x19a6, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c,
-	0x5fd0, 0x00ce, 0x0804, 0x0aba, 0x780f, 0x006b, 0x7a28, 0x080c,
-	0x73c4, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a,
-	0x2011, 0x8010, 0x73d8, 0x2001, 0x19a7, 0x2003, 0x0001, 0x080c,
-	0x2b59, 0x080c, 0x4b04, 0x7248, 0xc284, 0x724a, 0x2001, 0x180c,
-	0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0xa51d, 0x2011, 0x0004,
-	0x080c, 0xcb45, 0x080c, 0x6822, 0x080c, 0x73bc, 0x1120, 0x080c,
-	0x2b9d, 0x02e0, 0x0400, 0x080c, 0x5fd7, 0x0140, 0x7097, 0x0001,
-	0x70d3, 0x0000, 0x080c, 0x58fd, 0x0804, 0x0aba, 0x080c, 0x56cf,
+	0x19a5, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c,
+	0x5fd9, 0x00ce, 0x0804, 0x0aba, 0x780f, 0x006b, 0x7a28, 0x080c,
+	0x73ad, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a,
+	0x2011, 0x8010, 0x73d8, 0x2001, 0x19a6, 0x2003, 0x0001, 0x080c,
+	0x2b5b, 0x080c, 0x4b14, 0x7248, 0xc284, 0x724a, 0x2001, 0x180c,
+	0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0xa51e, 0x2011, 0x0004,
+	0x080c, 0xcb5a, 0x080c, 0x682b, 0x080c, 0x73a5, 0x1120, 0x080c,
+	0x2b9f, 0x02e0, 0x0400, 0x080c, 0x5fe0, 0x0140, 0x7097, 0x0001,
+	0x70d3, 0x0000, 0x080c, 0x5906, 0x0804, 0x0aba, 0x080c, 0x56d8,
 	0xd094, 0x0188, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c,
-	0x56d3, 0xd0d4, 0x1118, 0x080c, 0x2b9d, 0x1270, 0x2011, 0x180c,
-	0x2204, 0xc0bc, 0x00a8, 0x080c, 0x56d3, 0xd0d4, 0x1db8, 0x2011,
+	0x56dc, 0xd0d4, 0x1118, 0x080c, 0x2b9f, 0x1270, 0x2011, 0x180c,
+	0x2204, 0xc0bc, 0x00a8, 0x080c, 0x56dc, 0xd0d4, 0x1db8, 0x2011,
 	0x180c, 0x2204, 0xc0bd, 0x0060, 0x2011, 0x180c, 0x2204, 0xc0bd,
-	0x2012, 0x080c, 0x696a, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd,
-	0x2012, 0x080c, 0x6930, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8,
-	0x707f, 0x0000, 0x080c, 0x73bc, 0x1130, 0x70b0, 0x9005, 0x1168,
-	0x080c, 0xcf81, 0x0050, 0x080c, 0xcf81, 0x70dc, 0xd09c, 0x1128,
-	0x70b0, 0x9005, 0x0110, 0x080c, 0x5fad, 0x70e7, 0x0000, 0x70e3,
-	0x0000, 0x70a7, 0x0000, 0x080c, 0x2ba5, 0x0228, 0x2011, 0x0101,
-	0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x73bc, 0x1178, 0x9016,
-	0x0016, 0x080c, 0x2956, 0x2019, 0x196d, 0x211a, 0x001e, 0x705f,
-	0xffff, 0x7063, 0x00ef, 0x7083, 0x0000, 0x0020, 0x2019, 0x196d,
+	0x2012, 0x080c, 0x6973, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd,
+	0x2012, 0x080c, 0x6939, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8,
+	0x707f, 0x0000, 0x080c, 0x73a5, 0x1130, 0x70b0, 0x9005, 0x1168,
+	0x080c, 0xcf9b, 0x0050, 0x080c, 0xcf9b, 0x70dc, 0xd09c, 0x1128,
+	0x70b0, 0x9005, 0x0110, 0x080c, 0x5fb6, 0x70e7, 0x0000, 0x70e3,
+	0x0000, 0x70a7, 0x0000, 0x080c, 0x2ba7, 0x0228, 0x2011, 0x0101,
+	0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x73a5, 0x1178, 0x9016,
+	0x0016, 0x080c, 0x2958, 0x2019, 0x196c, 0x211a, 0x001e, 0x705f,
+	0xffff, 0x7063, 0x00ef, 0x7083, 0x0000, 0x0020, 0x2019, 0x196c,
 	0x201b, 0x0000, 0x2079, 0x1847, 0x7804, 0xd0ac, 0x0108, 0xc295,
-	0x72de, 0x080c, 0x73bc, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011,
-	0x0001, 0x080c, 0xcb45, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003,
+	0x72de, 0x080c, 0x73a5, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011,
+	0x0001, 0x080c, 0xcb5a, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003,
 	0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003,
-	0x782a, 0x00fe, 0x080c, 0x2f96, 0x2011, 0x0005, 0x080c, 0xa653,
-	0x080c, 0x968d, 0x080c, 0x73bc, 0x0148, 0x00c6, 0x2061, 0x0100,
-	0x0016, 0x080c, 0x2956, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420,
+	0x782a, 0x00fe, 0x080c, 0x2f98, 0x2011, 0x0005, 0x080c, 0xa654,
+	0x080c, 0x9687, 0x080c, 0x73a5, 0x0148, 0x00c6, 0x2061, 0x0100,
+	0x0016, 0x080c, 0x2958, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420,
 	0x70ab, 0x0000, 0x70af, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079,
 	0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe,
-	0x2011, 0x0005, 0x080c, 0xa653, 0x080c, 0x968d, 0x080c, 0x73bc,
-	0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2956, 0x61e2,
+	0x2011, 0x0005, 0x080c, 0xa654, 0x080c, 0x9687, 0x080c, 0x73a5,
+	0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2958, 0x61e2,
 	0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6, 0x080c,
-	0x73bc, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c,
-	0x73bc, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138,
+	0x73a5, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c,
+	0x73a5, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138,
 	0x9180, 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc, 0x090c,
-	0x32bb, 0x8108, 0x1f04, 0x0ace, 0x707f, 0x0000, 0x7080, 0x9084,
+	0x32bd, 0x8108, 0x1f04, 0x0ace, 0x707f, 0x0000, 0x7080, 0x9084,
 	0x00ff, 0x7082, 0x70b3, 0x0000, 0x00be, 0x00ce, 0x0005, 0x00b6,
 	0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904, 0x0bab,
-	0x70ac, 0x9086, 0xffff, 0x0130, 0x080c, 0x2f96, 0x080c, 0x968d,
+	0x70ac, 0x9086, 0xffff, 0x0130, 0x080c, 0x2f98, 0x080c, 0x9687,
 	0x0804, 0x0bab, 0x70dc, 0xd0ac, 0x1110, 0xd09c, 0x0558, 0xd084,
 	0x0548, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c,
-	0x0508, 0x080c, 0x331e, 0x11d0, 0x70e0, 0x9086, 0xffff, 0x01b0,
-	0x080c, 0x312b, 0x080c, 0x968d, 0x70dc, 0xd094, 0x1904, 0x0bab,
-	0x2011, 0x0001, 0x080c, 0xd230, 0x0110, 0x2011, 0x0003, 0x901e,
-	0x080c, 0x3165, 0x080c, 0x968d, 0x0804, 0x0bab, 0x70e4, 0x9005,
+	0x0508, 0x080c, 0x3320, 0x11d0, 0x70e0, 0x9086, 0xffff, 0x01b0,
+	0x080c, 0x312d, 0x080c, 0x9687, 0x70dc, 0xd094, 0x1904, 0x0bab,
+	0x2011, 0x0001, 0x080c, 0xd24a, 0x0110, 0x2011, 0x0003, 0x901e,
+	0x080c, 0x3167, 0x080c, 0x9687, 0x0804, 0x0bab, 0x70e4, 0x9005,
 	0x1904, 0x0bab, 0x70a8, 0x9005, 0x1904, 0x0bab, 0x70dc, 0xd0a4,
-	0x0118, 0xd0b4, 0x0904, 0x0bab, 0x080c, 0x6930, 0x1904, 0x0bab,
-	0x080c, 0x6983, 0x1904, 0x0bab, 0x080c, 0x696a, 0x01c0, 0x0156,
-	0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x65ff, 0x1118,
+	0x0118, 0xd0b4, 0x0904, 0x0bab, 0x080c, 0x6939, 0x1904, 0x0bab,
+	0x080c, 0x698c, 0x1904, 0x0bab, 0x080c, 0x6973, 0x01c0, 0x0156,
+	0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6608, 0x1118,
 	0xb800, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b44, 0x00ce,
 	0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0bab, 0x0006,
-	0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0x2011, 0x19b3, 0x080c,
-	0x0f87, 0x2011, 0x19cd, 0x080c, 0x0f87, 0x7030, 0xc08c, 0x7032,
-	0x7003, 0x0003, 0x70af, 0xffff, 0x080c, 0x56de, 0x1130, 0x0026,
-	0x2011, 0x0040, 0x080c, 0x0edf, 0x002e, 0x9006, 0x080c, 0x27ea,
-	0x080c, 0x331e, 0x0118, 0x080c, 0x4ca1, 0x0050, 0x0036, 0x0046,
-	0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4cbb, 0x004e, 0x003e,
-	0x00f6, 0x2079, 0x0100, 0x080c, 0x73df, 0x0150, 0x080c, 0x73bc,
+	0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0x2011, 0x19b2, 0x080c,
+	0x0f87, 0x2011, 0x19cc, 0x080c, 0x0f87, 0x7030, 0xc08c, 0x7032,
+	0x7003, 0x0003, 0x70af, 0xffff, 0x080c, 0x56e7, 0x1130, 0x0026,
+	0x2011, 0x0040, 0x080c, 0x0edf, 0x002e, 0x9006, 0x080c, 0x27ec,
+	0x080c, 0x3320, 0x0118, 0x080c, 0x4cb1, 0x0050, 0x0036, 0x0046,
+	0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4ccb, 0x004e, 0x003e,
+	0x00f6, 0x2079, 0x0100, 0x080c, 0x73c8, 0x0150, 0x080c, 0x73a5,
 	0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a,
-	0x00fe, 0x2001, 0x19e8, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011,
-	0x0000, 0x080c, 0xa653, 0x2011, 0x0000, 0x080c, 0xa65d, 0x080c,
-	0x968d, 0x080c, 0x97b9, 0x012e, 0x00be, 0x0005, 0x0016, 0x0046,
+	0x00fe, 0x2001, 0x19e7, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011,
+	0x0000, 0x080c, 0xa654, 0x2011, 0x0000, 0x080c, 0xa65e, 0x080c,
+	0x9687, 0x080c, 0x97b5, 0x012e, 0x00be, 0x0005, 0x0016, 0x0046,
 	0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c,
-	0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5f96, 0x7940, 0x918c,
+	0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5f9f, 0x7940, 0x918c,
 	0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c,
 	0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954, 0xd1ac,
-	0x1904, 0x0c3b, 0x2001, 0x19a7, 0x2004, 0x9005, 0x1518, 0x080c,
-	0x2c20, 0x1148, 0x2001, 0x0001, 0x080c, 0x2b88, 0x2001, 0x0001,
-	0x080c, 0x2b6b, 0x00b8, 0x080c, 0x2c28, 0x1138, 0x9006, 0x080c,
-	0x2b88, 0x9006, 0x080c, 0x2b6b, 0x0068, 0x080c, 0x2c30, 0x1d50,
-	0x2001, 0x1998, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x2982,
-	0x0804, 0x0d1a, 0x080c, 0x73cd, 0x0148, 0x080c, 0x73df, 0x1118,
-	0x080c, 0x76b3, 0x0050, 0x080c, 0x73c4, 0x0dd0, 0x080c, 0x76ae,
-	0x080c, 0x76a4, 0x080c, 0x72ee, 0x0058, 0x080c, 0x73bc, 0x0140,
-	0x2009, 0x00f8, 0x080c, 0x5f96, 0x7843, 0x0090, 0x7843, 0x0010,
-	0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x73bc, 0x0138,
+	0x1904, 0x0c3b, 0x2001, 0x19a6, 0x2004, 0x9005, 0x1518, 0x080c,
+	0x2c22, 0x1148, 0x2001, 0x0001, 0x080c, 0x2b8a, 0x2001, 0x0001,
+	0x080c, 0x2b6d, 0x00b8, 0x080c, 0x2c2a, 0x1138, 0x9006, 0x080c,
+	0x2b8a, 0x9006, 0x080c, 0x2b6d, 0x0068, 0x080c, 0x2c32, 0x1d50,
+	0x2001, 0x1997, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x2984,
+	0x0804, 0x0d1a, 0x080c, 0x73b6, 0x0148, 0x080c, 0x73c8, 0x1118,
+	0x080c, 0x769c, 0x0050, 0x080c, 0x73ad, 0x0dd0, 0x080c, 0x7697,
+	0x080c, 0x768d, 0x080c, 0x72d7, 0x0058, 0x080c, 0x73a5, 0x0140,
+	0x2009, 0x00f8, 0x080c, 0x5f9f, 0x7843, 0x0090, 0x7843, 0x0010,
+	0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x73a5, 0x0138,
 	0x7824, 0xd0ac, 0x1904, 0x0d1f, 0x1f04, 0x0c1a, 0x0070, 0x7824,
-	0x080c, 0x73d6, 0x0118, 0xd0ac, 0x1904, 0x0d1f, 0x9084, 0x1800,
+	0x080c, 0x73bf, 0x0118, 0xd0ac, 0x1904, 0x0d1f, 0x9084, 0x1800,
 	0x0d98, 0x7003, 0x0001, 0x0804, 0x0d1f, 0x2001, 0x0001, 0x080c,
-	0x27ea, 0x0804, 0x0d32, 0x2001, 0x19a7, 0x2004, 0x9005, 0x1518,
-	0x080c, 0x2c20, 0x1148, 0x2001, 0x0001, 0x080c, 0x2b88, 0x2001,
-	0x0001, 0x080c, 0x2b6b, 0x00b8, 0x080c, 0x2c28, 0x1138, 0x9006,
-	0x080c, 0x2b88, 0x9006, 0x080c, 0x2b6b, 0x0068, 0x080c, 0x2c30,
-	0x1d50, 0x2001, 0x1998, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c,
-	0x2982, 0x0804, 0x0d1a, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938,
-	0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2c38, 0x9085, 0x2000,
-	0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c74, 0x080c, 0x85ad,
+	0x27ec, 0x0804, 0x0d32, 0x2001, 0x19a6, 0x2004, 0x9005, 0x1518,
+	0x080c, 0x2c22, 0x1148, 0x2001, 0x0001, 0x080c, 0x2b8a, 0x2001,
+	0x0001, 0x080c, 0x2b6d, 0x00b8, 0x080c, 0x2c2a, 0x1138, 0x9006,
+	0x080c, 0x2b8a, 0x9006, 0x080c, 0x2b6d, 0x0068, 0x080c, 0x2c32,
+	0x1d50, 0x2001, 0x1997, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c,
+	0x2984, 0x0804, 0x0d1a, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938,
+	0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2c3a, 0x9085, 0x2000,
+	0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c74, 0x080c, 0x8596,
 	0x1f04, 0x0c74, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852,
-	0x793a, 0x080c, 0x73cd, 0x0148, 0x080c, 0x73df, 0x1118, 0x080c,
-	0x76b3, 0x0050, 0x080c, 0x73c4, 0x0dd0, 0x080c, 0x76ae, 0x080c,
-	0x76a4, 0x080c, 0x72ee, 0x0020, 0x2009, 0x00f8, 0x080c, 0x5f96,
+	0x793a, 0x080c, 0x73b6, 0x0148, 0x080c, 0x73c8, 0x1118, 0x080c,
+	0x769c, 0x0050, 0x080c, 0x73ad, 0x0dd0, 0x080c, 0x7697, 0x080c,
+	0x768d, 0x080c, 0x72d7, 0x0020, 0x2009, 0x00f8, 0x080c, 0x5f9f,
 	0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c9a, 0x7850, 0x9085, 0x1400,
-	0x7852, 0x080c, 0x73bc, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010,
-	0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x85ad, 0x7820, 0xd09c,
-	0x1580, 0x080c, 0x73bc, 0x0904, 0x0cff, 0x7824, 0xd0ac, 0x1904,
-	0x0d1f, 0x080c, 0x73df, 0x1528, 0x0046, 0x2021, 0x0320, 0x8421,
-	0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2c38, 0x7824, 0x9084,
+	0x7852, 0x080c, 0x73a5, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010,
+	0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x8596, 0x7820, 0xd09c,
+	0x1580, 0x080c, 0x73a5, 0x0904, 0x0cff, 0x7824, 0xd0ac, 0x1904,
+	0x0d1f, 0x080c, 0x73c8, 0x1528, 0x0046, 0x2021, 0x0320, 0x8421,
+	0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2c3a, 0x7824, 0x9084,
 	0x1800, 0x1160, 0x9484, 0x0fff, 0x1138, 0x2001, 0x1810, 0x2004,
 	0xd0fc, 0x0110, 0x080c, 0x0d45, 0x8421, 0x1158, 0x1d04, 0x0cda,
-	0x080c, 0x85ad, 0x080c, 0x76ae, 0x080c, 0x76a4, 0x7003, 0x0001,
-	0x04f0, 0x8319, 0x1948, 0x1d04, 0x0ce7, 0x080c, 0x85ad, 0x2009,
-	0x199b, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, 0x200b,
-	0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x2c19, 0x7924,
-	0x080c, 0x2c38, 0xd19c, 0x0110, 0x080c, 0x2b59, 0x00d8, 0x080c,
-	0x73cd, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x7394, 0x7003,
-	0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2c38, 0x7824, 0x080c,
-	0x73d6, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, 0x7003,
-	0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x27ea, 0x0078, 0x2009,
+	0x080c, 0x8596, 0x080c, 0x7697, 0x080c, 0x768d, 0x7003, 0x0001,
+	0x04f0, 0x8319, 0x1948, 0x1d04, 0x0ce7, 0x080c, 0x8596, 0x2009,
+	0x199a, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, 0x200b,
+	0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x2c1b, 0x7924,
+	0x080c, 0x2c3a, 0xd19c, 0x0110, 0x080c, 0x2b5b, 0x00d8, 0x080c,
+	0x73b6, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x737d, 0x7003,
+	0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2c3a, 0x7824, 0x080c,
+	0x73bf, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, 0x7003,
+	0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x27ec, 0x0078, 0x2009,
 	0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, 0x0002, 0x7906,
 	0x7827, 0x0048, 0x7828, 0x9085, 0x0028, 0x782a, 0x7850, 0x9085,
-	0x0400, 0x7852, 0x2001, 0x19a7, 0x2003, 0x0000, 0x9006, 0x78f2,
-	0x015e, 0x003e, 0x000e, 0x080c, 0x56de, 0x1110, 0x080c, 0x0e62,
+	0x0400, 0x7852, 0x2001, 0x19a6, 0x2003, 0x0000, 0x9006, 0x78f2,
+	0x015e, 0x003e, 0x000e, 0x080c, 0x56e7, 0x1110, 0x080c, 0x0e62,
 	0x012e, 0x00fe, 0x004e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0036,
 	0x0046, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0069,
-	0x0d0c, 0x85ad, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
+	0x0d0c, 0x8596, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
 	0x004e, 0x003e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x189e,
-	0x7004, 0x9086, 0x0001, 0x1110, 0x080c, 0x344c, 0x00ee, 0x0005,
-	0x0005, 0x2a70, 0x2061, 0x19ab, 0x2063, 0x0003, 0x6007, 0x0002,
-	0x600b, 0x001c, 0x600f, 0x0137, 0x2001, 0x197c, 0x900e, 0x2102,
+	0x7004, 0x9086, 0x0001, 0x1110, 0x080c, 0x344e, 0x00ee, 0x0005,
+	0x0005, 0x2a70, 0x2061, 0x19aa, 0x2063, 0x0003, 0x6007, 0x0002,
+	0x600b, 0x001e, 0x600f, 0x0137, 0x2001, 0x197b, 0x900e, 0x2102,
 	0x7196, 0x2001, 0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705f,
 	0xffff, 0x0008, 0x715e, 0x7067, 0xffff, 0x717e, 0x7182, 0x080c,
-	0xcf81, 0x2061, 0x196c, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
+	0xcf9b, 0x2061, 0x196b, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
 	0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x001f, 0x611a, 0x601f,
-	0x07d0, 0x2061, 0x1974, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f,
+	0x07d0, 0x2061, 0x1973, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f,
 	0x0200, 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061,
-	0x1989, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f,
-	0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x65ff,
+	0x1988, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f,
+	0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x6608,
 	0x1178, 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4,
 	0xff00, 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210,
 	0x8108, 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000,
@@ -240,22 +240,22 @@
 	0x0dd7, 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000,
 	0x000e, 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e,
 	0x7886, 0x3900, 0x789a, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156,
-	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1aa2, 0x7a08,
-	0x226a, 0x2069, 0x1aa3, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
-	0x782c, 0x2019, 0x1ab0, 0x201a, 0x2019, 0x1ab3, 0x9016, 0x7808,
-	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1ac8,
+	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1aa1, 0x7a08,
+	0x226a, 0x2069, 0x1aa2, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
+	0x782c, 0x2019, 0x1aaf, 0x201a, 0x2019, 0x1ab2, 0x9016, 0x7808,
+	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1ac7,
 	0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019,
-	0x1ab1, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
-	0x1a82, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
+	0x1ab0, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
+	0x1a81, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
 	0x8318, 0x1f04, 0x0e24, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079,
 	0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x0180, 0x2001, 0x1a19, 0x2004, 0x9005, 0x0128, 0x2001,
+	0xd084, 0x0180, 0x2001, 0x1a18, 0x2004, 0x9005, 0x0128, 0x2001,
 	0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002,
-	0x2003, 0x1001, 0x080c, 0x56de, 0x1110, 0x080c, 0x0e99, 0x0cd0,
+	0x2003, 0x1001, 0x080c, 0x56e7, 0x1110, 0x080c, 0x0e99, 0x0cd0,
 	0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, 0x9084, 0x0600,
 	0x1118, 0x918d, 0x2800, 0x0010, 0x918d, 0x2000, 0x2001, 0x017f,
 	0x2102, 0x0005, 0x00f6, 0x0006, 0x2079, 0x1827, 0x2f04, 0x8000,
-	0x207a, 0x080c, 0x2c30, 0x1150, 0x0006, 0x2001, 0x1998, 0x2004,
+	0x207a, 0x080c, 0x2c32, 0x1150, 0x0006, 0x2001, 0x1997, 0x2004,
 	0xd0fc, 0x000e, 0x1118, 0x9082, 0x7530, 0x0010, 0x9082, 0x000f,
 	0x0258, 0x9006, 0x207a, 0x2079, 0x182a, 0x2f04, 0x9084, 0x0001,
 	0x9086, 0x0001, 0x207a, 0x0090, 0x2079, 0x182a, 0x2f7c, 0x8fff,
@@ -266,8 +266,8 @@
 	0x080c, 0x0f00, 0x0c80, 0x7038, 0xd0b4, 0x1128, 0x0026, 0x2011,
 	0x0040, 0x0469, 0x002e, 0x0005, 0x7038, 0xd0b4, 0x1128, 0x0026,
 	0x2011, 0x0080, 0x0421, 0x002e, 0x0005, 0x0026, 0x70ef, 0x0000,
-	0x0459, 0x1148, 0x080c, 0x2c30, 0x1118, 0x2011, 0x8484, 0x0058,
-	0x2011, 0x8282, 0x0040, 0x080c, 0x2c30, 0x1118, 0x2011, 0xcdc5,
+	0x0459, 0x1148, 0x080c, 0x2c32, 0x1118, 0x2011, 0x8484, 0x0058,
+	0x2011, 0x8282, 0x0040, 0x080c, 0x2c32, 0x1118, 0x2011, 0xcdc5,
 	0x0010, 0x2011, 0xcac2, 0x00e9, 0x002e, 0x0005, 0xd0b4, 0x0130,
 	0x0006, 0x3b00, 0x9084, 0xff3f, 0x20d8, 0x000e, 0x0005, 0x0016,
 	0x3b08, 0x3a00, 0x9104, 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f,
@@ -315,7 +315,7 @@
 	0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e,
 	0x810f, 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e,
 	0x0020, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8414,
+	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x83fd,
 	0x012e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000,
 	0x2049, 0x0400, 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e,
 	0xa863, 0x0001, 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188,
@@ -332,20 +332,20 @@
 	0x9982, 0x0534, 0x0288, 0x9982, 0x0800, 0x1270, 0x0040, 0x9982,
 	0x0800, 0x0250, 0x2071, 0x188d, 0x7010, 0x9902, 0x1228, 0x9085,
 	0x0001, 0x001e, 0x00ee, 0x0005, 0x9006, 0x0cd8, 0x00e6, 0x2071,
-	0x1a18, 0x7007, 0x0000, 0x9006, 0x701e, 0x7022, 0x7002, 0x2071,
+	0x1a17, 0x7007, 0x0000, 0x9006, 0x701e, 0x7022, 0x7002, 0x2071,
 	0x0000, 0x7010, 0x9085, 0x8044, 0x7012, 0x2071, 0x0080, 0x9006,
 	0x20a9, 0x0040, 0x7022, 0x1f04, 0x10e2, 0x702b, 0x0020, 0x00ee,
 	0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0xa06f, 0x0000, 0x2071,
-	0x1a18, 0x701c, 0x9088, 0x1a22, 0x280a, 0x8000, 0x9084, 0x003f,
+	0x1a17, 0x701c, 0x9088, 0x1a21, 0x280a, 0x8000, 0x9084, 0x003f,
 	0x701e, 0x7120, 0x9106, 0x090c, 0x0dd5, 0x7004, 0x9005, 0x1128,
 	0x00f6, 0x2079, 0x0080, 0x00a9, 0x00fe, 0x00ee, 0x012e, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x00e6, 0x2071, 0x1a18, 0x7004, 0x9005,
+	0x0126, 0x2091, 0x8000, 0x00e6, 0x2071, 0x1a17, 0x7004, 0x9005,
 	0x1128, 0x00f6, 0x2079, 0x0080, 0x0021, 0x00fe, 0x00ee, 0x012e,
 	0x0005, 0x7004, 0x9086, 0x0000, 0x1110, 0x7007, 0x0006, 0x7000,
 	0x0002, 0x112b, 0x12ae, 0x1129, 0x1129, 0x12a2, 0x12a2, 0x12a2,
 	0x12a2, 0x080c, 0x0dd5, 0x701c, 0x7120, 0x9106, 0x1148, 0x792c,
 	0x9184, 0x0001, 0x1120, 0xd1fc, 0x1110, 0x7007, 0x0000, 0x0005,
-	0x0096, 0x9180, 0x1a22, 0x2004, 0x700a, 0x2048, 0x8108, 0x918c,
+	0x0096, 0x9180, 0x1a21, 0x2004, 0x700a, 0x2048, 0x8108, 0x918c,
 	0x003f, 0x7122, 0x782b, 0x0026, 0xa88c, 0x7802, 0xa890, 0x7806,
 	0xa894, 0x780a, 0xa898, 0x780e, 0xa878, 0x700e, 0xa870, 0x7016,
 	0xa874, 0x701a, 0xa868, 0x009e, 0xd084, 0x0120, 0x7007, 0x0001,
@@ -357,8 +357,8 @@
 	0x782b, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, 0x0040, 0x1210,
 	0x2110, 0x9006, 0x700e, 0x22a8, 0x4006, 0x8203, 0x7812, 0x782b,
 	0x0020, 0x3300, 0x701a, 0x782b, 0x0001, 0x015e, 0x014e, 0x013e,
-	0x002e, 0x001e, 0x0005, 0x2009, 0x1a18, 0x2104, 0xc095, 0x200a,
-	0x080c, 0x1108, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1a18, 0x00f6,
+	0x002e, 0x001e, 0x0005, 0x2009, 0x1a17, 0x2104, 0xc095, 0x200a,
+	0x080c, 0x1108, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1a17, 0x00f6,
 	0x2079, 0x0080, 0x792c, 0xd1bc, 0x190c, 0x0dce, 0x782b, 0x0002,
 	0xd1fc, 0x0120, 0x918c, 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee,
 	0x001e, 0x0005, 0x1119, 0x11c1, 0x11f5, 0x12cd, 0x0dd5, 0x12e8,
@@ -380,15 +380,15 @@
 	0x080c, 0x1108, 0x0005, 0x00de, 0x009e, 0x080c, 0x1108, 0x0005,
 	0xa8a8, 0xd08c, 0x0005, 0x0096, 0xa0a0, 0x904d, 0x090c, 0x0dd5,
 	0xa06c, 0x908e, 0x0100, 0x0130, 0xa87b, 0x0030, 0xa883, 0x0000,
-	0xa897, 0x4002, 0x080c, 0x6c75, 0xa09f, 0x0000, 0xa0a3, 0x0000,
+	0xa897, 0x4002, 0x080c, 0x6c7a, 0xa09f, 0x0000, 0xa0a3, 0x0000,
 	0x2848, 0x080c, 0x1031, 0x009e, 0x0005, 0x00a6, 0xa0a0, 0x904d,
 	0x090c, 0x0dd5, 0xa06c, 0x908e, 0x0100, 0x0128, 0xa87b, 0x0001,
 	0xa883, 0x0000, 0x00c0, 0xa80c, 0x2050, 0xb004, 0x9005, 0x0198,
 	0xa80e, 0x2050, 0x8006, 0x8006, 0x8007, 0x908c, 0x003f, 0x9084,
 	0xffc0, 0x9080, 0x0002, 0xa076, 0xa172, 0xb000, 0xa07a, 0x2810,
 	0x080c, 0x10e9, 0x00e8, 0xa97c, 0xa894, 0x0016, 0x0006, 0x080c,
-	0x6c75, 0x000e, 0x001e, 0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6,
-	0x2060, 0x080c, 0xae61, 0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000,
+	0x6c7a, 0x000e, 0x001e, 0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6,
+	0x2060, 0x080c, 0xae71, 0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000,
 	0xa8a3, 0x0000, 0x080c, 0x1031, 0x7007, 0x0000, 0x080c, 0x1108,
 	0x00ae, 0x0005, 0x0126, 0x2091, 0x8000, 0x782b, 0x1001, 0x7007,
 	0x0005, 0x7000, 0xc094, 0x7002, 0x012e, 0x0005, 0x0096, 0x2001,
@@ -397,1811 +397,1813 @@
 	0x8000, 0x782b, 0x0041, 0x7007, 0x0003, 0x7000, 0xc084, 0x7002,
 	0x2900, 0x700a, 0x012e, 0x009e, 0x0005, 0x20e1, 0x0000, 0x2099,
 	0x0088, 0x782b, 0x0040, 0x0096, 0x2001, 0x192e, 0x204c, 0xaa7c,
-	0x009e, 0x080c, 0x8a0c, 0x2009, 0x188c, 0x2104, 0x9084, 0xfffc,
-	0x200a, 0x080c, 0x887f, 0x7007, 0x0000, 0x080c, 0x1119, 0x0005,
+	0x009e, 0x080c, 0x89f5, 0x2009, 0x188c, 0x2104, 0x9084, 0xfffc,
+	0x200a, 0x080c, 0x8868, 0x7007, 0x0000, 0x080c, 0x1119, 0x0005,
 	0x7007, 0x0000, 0x080c, 0x1119, 0x0005, 0x0126, 0x2091, 0x2200,
-	0x2079, 0x0300, 0x2071, 0x1a62, 0x7003, 0x0000, 0x78bf, 0x00f6,
+	0x2079, 0x0300, 0x2071, 0x1a61, 0x7003, 0x0000, 0x78bf, 0x00f6,
 	0x781b, 0x4800, 0x00c1, 0x7803, 0x0003, 0x780f, 0x0000, 0x20a9,
-	0x03d0, 0x2061, 0xea18, 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002,
+	0x03d0, 0x2061, 0xea39, 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002,
 	0x7916, 0x1f04, 0x1303, 0x7807, 0x0007, 0x7803, 0x0000, 0x7803,
 	0x0001, 0x012e, 0x0005, 0x00c6, 0x7803, 0x0000, 0x7808, 0xd09c,
-	0x0120, 0x7820, 0x080c, 0x1362, 0x0cc8, 0x2001, 0x1a63, 0x2003,
+	0x0120, 0x7820, 0x080c, 0x1362, 0x0cc8, 0x2001, 0x1a62, 0x2003,
 	0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002,
 	0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, 0x0031,
-	0x782b, 0x1a82, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, 0x0200,
-	0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a82, 0x602f,
+	0x782b, 0x1a81, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, 0x0200,
+	0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a81, 0x602f,
 	0x1cd0, 0x2001, 0x181a, 0x2004, 0x9082, 0x1cd0, 0x6032, 0x603b,
-	0x2090, 0x2001, 0x3325, 0xd0fc, 0x190c, 0x0dd5, 0x2001, 0x0003,
-	0x2004, 0xd0d4, 0x1118, 0x783f, 0x3325, 0x0020, 0x9084, 0xc000,
-	0x783f, 0xb325, 0x604f, 0x193c, 0x2001, 0x1927, 0x2004, 0x6042,
+	0x2092, 0x2001, 0x3327, 0xd0fc, 0x190c, 0x0dd5, 0x2001, 0x0003,
+	0x2004, 0xd0d4, 0x1118, 0x783f, 0x3327, 0x0020, 0x9084, 0xc000,
+	0x783f, 0xb327, 0x604f, 0x193c, 0x2001, 0x1927, 0x2004, 0x6042,
 	0x00ce, 0x0005, 0x9086, 0x000d, 0x11d0, 0x7808, 0xd09c, 0x01b8,
-	0x7820, 0x0026, 0x2010, 0x080c, 0xcb23, 0x0180, 0x2260, 0x6000,
+	0x7820, 0x0026, 0x2010, 0x080c, 0xcb38, 0x0180, 0x2260, 0x6000,
 	0x9086, 0x0004, 0x1158, 0x0016, 0x6120, 0x9186, 0x0009, 0x0108,
-	0x0020, 0x2009, 0x004c, 0x080c, 0xaedc, 0x001e, 0x002e, 0x0005,
+	0x0020, 0x2009, 0x004c, 0x080c, 0xaeec, 0x001e, 0x002e, 0x0005,
 	0x0126, 0x2091, 0x2200, 0x7908, 0x9184, 0x0070, 0x190c, 0x0dce,
 	0xd19c, 0x0158, 0x7820, 0x908c, 0xf000, 0x15e8, 0x908a, 0x0024,
 	0x1a0c, 0x0dd5, 0x0023, 0x012e, 0x0005, 0x012e, 0x0005, 0x13bb,
 	0x13bb, 0x13d2, 0x13d7, 0x13db, 0x13e0, 0x1408, 0x140c, 0x141a,
-	0x141e, 0x13bb, 0x14e9, 0x14ed, 0x1552, 0x1559, 0x13bb, 0x155a,
-	0x155b, 0x1566, 0x156d, 0x13bb, 0x13bb, 0x13bb, 0x13bb, 0x13bb,
+	0x141e, 0x13bb, 0x14eb, 0x14ef, 0x1554, 0x155b, 0x13bb, 0x155c,
+	0x155d, 0x1568, 0x156f, 0x13bb, 0x13bb, 0x13bb, 0x13bb, 0x13bb,
 	0x13bb, 0x13bb, 0x13e2, 0x13bb, 0x13bb, 0x13bb, 0x13bb, 0x13bb,
 	0x13bb, 0x13bf, 0x13bd, 0x080c, 0x0dd5, 0x080c, 0x0dce, 0x080c,
-	0x1578, 0x2009, 0x1a7b, 0x2104, 0x8000, 0x200a, 0x080c, 0x7e56,
-	0x080c, 0x1aa9, 0x0005, 0x2009, 0x0048, 0x2060, 0x080c, 0xaedc,
+	0x157a, 0x2009, 0x1a7a, 0x2104, 0x8000, 0x200a, 0x080c, 0x7e3f,
+	0x080c, 0x1aab, 0x0005, 0x2009, 0x0048, 0x2060, 0x080c, 0xaeec,
 	0x012e, 0x0005, 0x7004, 0xc085, 0xc0b5, 0x7006, 0x0005, 0x7004,
-	0xc085, 0x7006, 0x0005, 0x080c, 0x1578, 0x080c, 0x16bb, 0x0005,
-	0x080c, 0x0dd5, 0x080c, 0x1578, 0x2060, 0x6014, 0x0096, 0x2048,
-	0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xaedc, 0x2001,
+	0xc085, 0x7006, 0x0005, 0x080c, 0x157a, 0x080c, 0x16bd, 0x0005,
+	0x080c, 0x0dd5, 0x080c, 0x157a, 0x2060, 0x6014, 0x0096, 0x2048,
+	0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xaeec, 0x2001,
 	0x015d, 0x2003, 0x0000, 0x2009, 0x03e8, 0x8109, 0x0160, 0x2001,
 	0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec,
-	0x1110, 0x080c, 0x157d, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005,
-	0x7004, 0xc095, 0x7006, 0x0005, 0x080c, 0x1578, 0x2060, 0x6014,
+	0x1110, 0x080c, 0x157f, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005,
+	0x7004, 0xc095, 0x7006, 0x0005, 0x080c, 0x157a, 0x2060, 0x6014,
 	0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c,
-	0xaedc, 0x0005, 0x080c, 0x1578, 0x080c, 0x0dd5, 0x080c, 0x1578,
-	0x080c, 0x14d4, 0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0904, 0x1487,
+	0xaeec, 0x0005, 0x080c, 0x157a, 0x080c, 0x0dd5, 0x080c, 0x157a,
+	0x080c, 0x14d6, 0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0904, 0x1487,
 	0x7827, 0x0015, 0x7828, 0x782b, 0x0000, 0x9065, 0x0140, 0x2001,
 	0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0804, 0x148d, 0x7004,
 	0x9005, 0x01c8, 0x1188, 0x78ab, 0x0004, 0x7827, 0x0018, 0x782b,
 	0x0000, 0xd1bc, 0x090c, 0x0dd5, 0x2001, 0x020d, 0x2003, 0x0050,
-	0x2003, 0x0020, 0x0804, 0x14b9, 0x78ab, 0x0004, 0x7803, 0x0001,
-	0x080c, 0x14ed, 0x0005, 0x7827, 0x0018, 0xa001, 0x7828, 0x7827,
+	0x2003, 0x0020, 0x0804, 0x14bb, 0x78ab, 0x0004, 0x7803, 0x0001,
+	0x080c, 0x14ef, 0x0005, 0x7827, 0x0018, 0xa001, 0x7828, 0x7827,
 	0x0011, 0xa001, 0x7928, 0x9106, 0x0110, 0x79ac, 0x08e0, 0x00e6,
-	0x2071, 0x0200, 0x702c, 0xd0c4, 0x0140, 0x00ee, 0x080c, 0x1aa9,
+	0x2071, 0x0200, 0x702c, 0xd0c4, 0x0140, 0x00ee, 0x080c, 0x1aab,
 	0x080c, 0x1313, 0x7803, 0x0001, 0x0005, 0x7037, 0x0001, 0xa001,
 	0x7150, 0x00ee, 0x918c, 0xff00, 0x9186, 0x0500, 0x0110, 0x79ac,
 	0x0810, 0x7004, 0xc09d, 0x7006, 0x78ab, 0x0004, 0x7803, 0x0001,
-	0x080c, 0x14ed, 0x2001, 0x020d, 0x2003, 0x0020, 0x0005, 0x7828,
+	0x080c, 0x14ef, 0x2001, 0x020d, 0x2003, 0x0020, 0x0005, 0x7828,
 	0x782b, 0x0000, 0x9065, 0x090c, 0x0dd5, 0x6014, 0x2048, 0x78ab,
-	0x0004, 0x918c, 0x0700, 0x0198, 0x080c, 0x7e56, 0x080c, 0x1aa9,
-	0x080c, 0xcb35, 0x0158, 0xa9ac, 0xa936, 0xa9b0, 0xa93a, 0xa83f,
-	0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd, 0xa882, 0x0005, 0x6020,
-	0x9086, 0x0009, 0x1128, 0x2009, 0x004c, 0x080c, 0xaedc, 0x0048,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c,
-	0xcf1a, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, 0x2004,
-	0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xe9c1, 0xd5a4, 0x1118, 0x080c,
-	0x157d, 0x0005, 0x080c, 0x7e56, 0x080c, 0x1aa9, 0x0005, 0x781f,
-	0x0300, 0x7803, 0x0001, 0x0005, 0x0016, 0x0066, 0x0076, 0x00f6,
-	0x2079, 0x0300, 0x7908, 0x918c, 0x0007, 0x9186, 0x0003, 0x0120,
-	0x2001, 0x0016, 0x080c, 0x15ee, 0x00fe, 0x007e, 0x006e, 0x001e,
-	0x0005, 0x7004, 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, 0x0004,
-	0x190c, 0x0dd5, 0xd184, 0x1189, 0xd19c, 0x0158, 0xc19c, 0x7106,
-	0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x080c, 0x157d,
-	0x0005, 0x81ff, 0x190c, 0x0dd5, 0x0005, 0xc184, 0xd1b4, 0xc1b4,
-	0x7106, 0x0016, 0x00e6, 0x15f0, 0x2071, 0x0200, 0x080c, 0x16a8,
-	0x05c8, 0x6014, 0x9005, 0x05b0, 0x0096, 0x2048, 0xa864, 0x009e,
-	0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, 0x0048, 0x1550,
-	0x601c, 0xd084, 0x11e0, 0x00f6, 0x2c78, 0x080c, 0x1725, 0x00fe,
-	0x00b0, 0x00f6, 0x2c78, 0x080c, 0x18ac, 0x00fe, 0x2009, 0x01f4,
-	0x8109, 0x0168, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001,
-	0x0218, 0x2004, 0xd0ec, 0x1118, 0x080c, 0x157d, 0x0040, 0x2001,
-	0x020d, 0x2003, 0x0020, 0x080c, 0x1313, 0x7803, 0x0001, 0x00ee,
-	0x001e, 0x0005, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
-	0x0461, 0x0ca8, 0x0429, 0x2060, 0x2009, 0x0053, 0x080c, 0xaedc,
-	0x0005, 0x0005, 0x0005, 0x00e1, 0x2008, 0x00d1, 0x0006, 0x7004,
-	0xc09d, 0x7006, 0x000e, 0x080c, 0x8d69, 0x0005, 0x0089, 0x9005,
-	0x0118, 0x080c, 0x896c, 0x0cd0, 0x0005, 0x2001, 0x0036, 0x2009,
-	0x1820, 0x210c, 0x2011, 0x181f, 0x2214, 0x080c, 0x15ee, 0x0005,
-	0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c, 0x14d4, 0x00d6,
-	0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0510, 0x6804, 0x9005,
-	0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1528,
-	0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841, 0x1268, 0x9188,
-	0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c, 0x080c, 0x15e0,
-	0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827, 0x0002, 0x04c1,
-	0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500, 0x6804, 0x9005,
-	0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c, 0x7e56, 0x080c,
-	0x1aa9, 0x0090, 0x7827, 0x0015, 0x782b, 0x0000, 0x7827, 0x0018,
-	0x782b, 0x0000, 0x2001, 0x020d, 0x2003, 0x0020, 0x2001, 0x0307,
-	0x2003, 0x0300, 0x7803, 0x0001, 0x00de, 0x0005, 0x682c, 0x9084,
-	0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015, 0x782b, 0x0000,
-	0x7803, 0x0001, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0005,
-	0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, 0x2001, 0x0030, 0x2c08,
-	0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005, 0x00f6, 0x2079,
-	0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016, 0x0026, 0x00c6,
-	0x080c, 0x1380, 0x00ce, 0x002e, 0x001e, 0x000e, 0x0006, 0x7832,
-	0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118, 0x000e, 0x00fe,
-	0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0dd5,
-	0x2009, 0x180c, 0x2104, 0xc0f4, 0x200a, 0x2009, 0xff00, 0x8109,
-	0x0904, 0x166c, 0x7a18, 0x9284, 0x0030, 0x0904, 0x1667, 0x9284,
-	0x0048, 0x9086, 0x0008, 0x1904, 0x1667, 0x2001, 0x0109, 0x2004,
-	0xd08c, 0x01f0, 0x0006, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x0126, 0x2091, 0x2800, 0x00f6, 0x0026, 0x0016, 0x2009, 0x1a7d,
-	0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x90a2, 0x001e, 0x002e,
-	0x00fe, 0x012e, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x000e,
-	0x2001, 0x009b, 0x2004, 0xd0fc, 0x01d0, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x00f6, 0x0016, 0x2009, 0x1a7e,
-	0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x1eb4, 0x001e, 0x00fe,
-	0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x7818,
-	0xd0bc, 0x1904, 0x1617, 0x0005, 0x2001, 0x180c, 0x2004, 0xd0f4,
-	0x1528, 0x7a18, 0x9284, 0x0030, 0x0508, 0x9284, 0x0048, 0x9086,
-	0x0008, 0x11e0, 0x2001, 0x19f6, 0x2004, 0x9005, 0x01b8, 0x2001,
-	0x1a66, 0x2004, 0x9086, 0x0000, 0x0188, 0x2009, 0x1a7c, 0x2104,
-	0x8000, 0x0208, 0x200a, 0x080c, 0xa2f7, 0x2009, 0x180c, 0x2104,
-	0xc0f5, 0x200a, 0x2009, 0xff00, 0x0804, 0x1617, 0x9085, 0x0001,
-	0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x080c, 0x1610,
-	0x1108, 0x0005, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0dd5,
-	0x7037, 0x0001, 0x7150, 0x7037, 0x0002, 0x7050, 0x2060, 0xd1bc,
-	0x1110, 0x7054, 0x2060, 0x918c, 0xff00, 0x9186, 0x0500, 0x0110,
-	0x9085, 0x0001, 0x0005, 0x00e6, 0x0016, 0x2071, 0x0200, 0x0c41,
-	0x6124, 0xd1dc, 0x01f8, 0x701c, 0xd08c, 0x0904, 0x171a, 0x7017,
-	0x0000, 0x2001, 0x0264, 0x2004, 0xd0bc, 0x0904, 0x171a, 0x2001,
-	0x0268, 0x00c6, 0x2064, 0x6104, 0x6038, 0x00ce, 0x918e, 0x0039,
-	0x1904, 0x171a, 0x9c06, 0x15f0, 0x0126, 0x2091, 0x2600, 0x080c,
-	0x7d9d, 0x012e, 0x7358, 0x745c, 0x6014, 0x905d, 0x0598, 0x2b48,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x190c, 0xcef5,
-	0xab42, 0xac3e, 0x2001, 0x1869, 0x2004, 0xd0b4, 0x1170, 0x601c,
-	0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x1120, 0xa83b, 0x7fff, 0xa837, 0xffff, 0x080c, 0x20b0, 0x1190,
-	0x080c, 0x1907, 0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05,
-	0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020, 0x781f, 0x0300, 0x001e,
-	0x00ee, 0x0005, 0x7037, 0x0050, 0x7037, 0x0020, 0x001e, 0x00ee,
-	0x080c, 0x157d, 0x0005, 0x080c, 0x0dd5, 0x2ff0, 0x0126, 0x2091,
-	0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730,
-	0xa864, 0x2068, 0xa81a, 0x9d84, 0x000f, 0x9088, 0x2090, 0x2165,
-	0x0002, 0x1750, 0x17be, 0x1750, 0x1750, 0x1754, 0x179f, 0x1750,
-	0x1774, 0x1749, 0x17b5, 0x1750, 0x1750, 0x1759, 0x18aa, 0x1788,
-	0x177e, 0xa964, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0904, 0x17b5,
-	0x9085, 0x0001, 0x0804, 0x18a1, 0xa87c, 0xd0ac, 0x0dc8, 0x0804,
-	0x17c5, 0xa87c, 0xd0ac, 0x0da0, 0x0804, 0x1830, 0xa898, 0x901d,
-	0x1108, 0xab9c, 0x9016, 0xaab2, 0xaa3e, 0xaa42, 0x3e00, 0x9080,
-	0x0008, 0x2004, 0x9080, 0x8f30, 0x2005, 0x9005, 0x090c, 0x0dd5,
-	0x2004, 0xa8ae, 0x0804, 0x1889, 0xa87c, 0xd0bc, 0x09c8, 0xa890,
-	0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x17c5, 0xa87c, 0xd0bc,
-	0x0978, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x1830,
-	0xa87c, 0xd0bc, 0x0928, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804,
-	0x9045, 0x090c, 0x0dd5, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80,
-	0x2090, 0x2065, 0xa888, 0xd19c, 0x1904, 0x1830, 0x0430, 0xa87c,
-	0xd0ac, 0x0904, 0x1750, 0xa804, 0x9045, 0x090c, 0x0dd5, 0xa164,
-	0xa91a, 0x91ec, 0x000f, 0x9d80, 0x2090, 0x2065, 0x9006, 0xa842,
-	0xa83e, 0xd19c, 0x1904, 0x1830, 0x0080, 0xa87c, 0xd0ac, 0x0904,
-	0x1750, 0x9006, 0xa842, 0xa83e, 0x0804, 0x1830, 0xa87c, 0xd0ac,
-	0x0904, 0x1750, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0036,
-	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x17e8, 0x17e8, 0x17ea,
-	0x17e8, 0x17e8, 0x17e8, 0x17f4, 0x17e8, 0x17e8, 0x17e8, 0x17fe,
-	0x17e8, 0x17e8, 0x17e8, 0x1808, 0x17e8, 0x17e8, 0x17e8, 0x1812,
-	0x17e8, 0x17e8, 0x17e8, 0x181c, 0x17e8, 0x17e8, 0x17e8, 0x1826,
-	0x080c, 0x0dd5, 0xa574, 0xa478, 0x9d86, 0x0024, 0x0904, 0x175e,
-	0xa37c, 0xa280, 0x0804, 0x1889, 0xa584, 0xa488, 0x9d86, 0x0024,
-	0x0904, 0x175e, 0xa38c, 0xa290, 0x0804, 0x1889, 0xa594, 0xa498,
-	0x9d86, 0x0024, 0x0904, 0x175e, 0xa39c, 0xa2a0, 0x0804, 0x1889,
-	0xa5a4, 0xa4a8, 0x9d86, 0x0024, 0x0904, 0x175e, 0xa3ac, 0xa2b0,
-	0x0804, 0x1889, 0xa5b4, 0xa4b8, 0x9d86, 0x0024, 0x0904, 0x175e,
-	0xa3bc, 0xa2c0, 0x0804, 0x1889, 0xa5c4, 0xa4c8, 0x9d86, 0x0024,
-	0x0904, 0x175e, 0xa3cc, 0xa2d0, 0x0804, 0x1889, 0xa5d4, 0xa4d8,
-	0x9d86, 0x0024, 0x0904, 0x175e, 0xa3dc, 0xa2e0, 0x0804, 0x1889,
-	0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002,
-	0x1853, 0x1851, 0x1851, 0x1851, 0x1851, 0x1851, 0x185e, 0x1851,
-	0x1851, 0x1851, 0x1851, 0x1851, 0x1869, 0x1851, 0x1851, 0x1851,
-	0x1851, 0x1851, 0x1874, 0x1851, 0x1851, 0x1851, 0x1851, 0x1851,
-	0x187f, 0x080c, 0x0dd5, 0xa56c, 0xa470, 0xa774, 0xa678, 0x9d86,
-	0x002c, 0x0904, 0x175e, 0xa37c, 0xa280, 0x0458, 0xa584, 0xa488,
-	0xa78c, 0xa690, 0x9d86, 0x002c, 0x0904, 0x175e, 0xa394, 0xa298,
-	0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86, 0x002c, 0x0904,
-	0x175e, 0xa3ac, 0xa2b0, 0x00a8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0,
-	0x9d86, 0x002c, 0x0904, 0x175e, 0xa3c4, 0xa2c8, 0x0050, 0xa5cc,
-	0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x002c, 0x0904, 0x175e, 0xa3dc,
-	0xa2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988,
-	0x8c60, 0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x8109, 0xa916,
-	0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e,
-	0x9006, 0x00ce, 0x012e, 0x0005, 0x2800, 0xa80e, 0xab0a, 0x2c00,
-	0xa812, 0x0c78, 0x0804, 0x1750, 0x2ff0, 0x0126, 0x2091, 0x2200,
-	0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e, 0x2061, 0x208b,
-	0xa813, 0x208b, 0x2c05, 0xa80a, 0xa964, 0xa91a, 0xa87c, 0xd0ac,
-	0x090c, 0x0dd5, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0034,
-	0x1a0c, 0x0dd5, 0xadcc, 0xacd0, 0xafd4, 0xaed8, 0xabdc, 0xaae0,
-	0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa8ac, 0xaab0,
-	0xa836, 0xaa3a, 0xa988, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0008,
-	0x1120, 0x8109, 0xa916, 0x0128, 0x0078, 0x918a, 0x0002, 0xa916,
-	0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e,
-	0x9006, 0x00ce, 0x012e, 0x0005, 0xa804, 0x9045, 0x090c, 0x0dd5,
-	0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f, 0x9080, 0x2090, 0x2015,
-	0x82ff, 0x090c, 0x0dd5, 0xaa12, 0x2205, 0xa80a, 0x0c10, 0x903e,
-	0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1a31, 0x195e,
-	0x195e, 0x1a31, 0x195e, 0x1a2b, 0x1a31, 0x195e, 0x19ce, 0x19ce,
-	0x19ce, 0x1a31, 0x19ce, 0x1a31, 0x1a28, 0x19ce, 0xc0fc, 0xa882,
-	0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1a33, 0x2c05,
-	0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x194a,
-	0x1948, 0x1948, 0x1948, 0x1948, 0x1948, 0x194e, 0x1948, 0x1948,
-	0x1948, 0x1948, 0x1948, 0x1952, 0x1948, 0x1948, 0x1948, 0x1948,
-	0x1948, 0x1956, 0x1948, 0x1948, 0x1948, 0x1948, 0x1948, 0x195a,
-	0x080c, 0x0dd5, 0xa774, 0xa678, 0x0804, 0x1a33, 0xa78c, 0xa690,
-	0x0804, 0x1a33, 0xa7a4, 0xa6a8, 0x0804, 0x1a33, 0xa7bc, 0xa6c0,
-	0x0804, 0x1a33, 0xa7d4, 0xa6d8, 0x0804, 0x1a33, 0xa898, 0x901d,
-	0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dd5,
-	0x9082, 0x001b, 0x0002, 0x1986, 0x1986, 0x1988, 0x1986, 0x1986,
-	0x1986, 0x1992, 0x1986, 0x1986, 0x1986, 0x199c, 0x1986, 0x1986,
-	0x1986, 0x19a6, 0x1986, 0x1986, 0x1986, 0x19b0, 0x1986, 0x1986,
-	0x1986, 0x19ba, 0x1986, 0x1986, 0x1986, 0x19c4, 0x080c, 0x0dd5,
-	0xa574, 0xa478, 0x9d86, 0x0004, 0x0904, 0x1a33, 0xa37c, 0xa280,
-	0x0804, 0x1a33, 0xa584, 0xa488, 0x9d86, 0x0004, 0x0904, 0x1a33,
-	0xa38c, 0xa290, 0x0804, 0x1a33, 0xa594, 0xa498, 0x9d86, 0x0004,
-	0x0904, 0x1a33, 0xa39c, 0xa2a0, 0x0804, 0x1a33, 0xa5a4, 0xa4a8,
-	0x9d86, 0x0004, 0x0904, 0x1a33, 0xa3ac, 0xa2b0, 0x0804, 0x1a33,
-	0xa5b4, 0xa4b8, 0x9d86, 0x0004, 0x0904, 0x1a33, 0xa3bc, 0xa2c0,
-	0x0804, 0x1a33, 0xa5c4, 0xa4c8, 0x9d86, 0x0004, 0x0904, 0x1a33,
-	0xa3cc, 0xa2d0, 0x0804, 0x1a33, 0xa5d4, 0xa4d8, 0x9d86, 0x0004,
-	0x0904, 0x1a33, 0xa3dc, 0xa2e0, 0x0804, 0x1a33, 0xa898, 0x901d,
-	0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5,
-	0x9082, 0x001b, 0x0002, 0x19f6, 0x19f4, 0x19f4, 0x19f4, 0x19f4,
-	0x19f4, 0x1a00, 0x19f4, 0x19f4, 0x19f4, 0x19f4, 0x19f4, 0x1a0a,
-	0x19f4, 0x19f4, 0x19f4, 0x19f4, 0x19f4, 0x1a14, 0x19f4, 0x19f4,
-	0x19f4, 0x19f4, 0x19f4, 0x1a1e, 0x080c, 0x0dd5, 0xa56c, 0xa470,
-	0xa774, 0xa678, 0x9d86, 0x000c, 0x05b0, 0xa37c, 0xa280, 0x0498,
-	0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86, 0x000c, 0x0560, 0xa394,
-	0xa298, 0x0448, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86, 0x000c,
-	0x0510, 0xa3ac, 0xa2b0, 0x00f8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0,
-	0x9d86, 0x000c, 0x01c0, 0xa3c4, 0xa2c8, 0x00a8, 0xa5cc, 0xa4d0,
-	0xa7d4, 0xa6d8, 0x9d86, 0x000c, 0x0170, 0xa3dc, 0xa2e0, 0x0058,
-	0x9d86, 0x000e, 0x1130, 0x080c, 0x2048, 0x1904, 0x1907, 0x900e,
-	0x0050, 0x080c, 0x0dd5, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26,
-	0xae2a, 0x080c, 0x2048, 0x0005, 0x6014, 0x2048, 0x6118, 0x810c,
-	0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, 0x0001, 0x0008, 0xa986,
-	0x601b, 0x0002, 0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934, 0xa88c,
-	0x9106, 0x1158, 0xa938, 0xa890, 0x9106, 0x1138, 0x601c, 0xc084,
-	0x601e, 0x2009, 0x0048, 0x0804, 0xaedc, 0x0005, 0x0126, 0x00c6,
-	0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, 0x0007, 0x9186, 0x0000,
-	0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, 0x6023, 0x0000, 0x0006,
-	0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c, 0x0120,
-	0x080c, 0x1380, 0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800, 0x2031,
-	0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, 0x1380, 0x00ce, 0x2001,
-	0x0038, 0x080c, 0x1b36, 0x7930, 0x9186, 0x0040, 0x0160, 0x9186,
-	0x0042, 0x190c, 0x0dd5, 0x2001, 0x001e, 0x8001, 0x1df0, 0x8631,
-	0x1d40, 0x080c, 0x1b45, 0x000e, 0x6022, 0x012e, 0x0005, 0x080c,
-	0x1b32, 0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b, 0x0000,
-	0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, 0x0000, 0x78ab, 0x0004,
-	0x00fe, 0x080c, 0x73bc, 0x11b0, 0x2001, 0x0138, 0x2003, 0x0000,
-	0x2001, 0x0160, 0x2003, 0x0000, 0x2011, 0x012c, 0xa001, 0xa001,
-	0x8211, 0x1de0, 0x0081, 0x0066, 0x2031, 0x0000, 0x080c, 0x746c,
-	0x006e, 0x0005, 0x0479, 0x0039, 0x2001, 0x0160, 0x2502, 0x2001,
-	0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, 0x0200, 0x080c, 0x2c44,
-	0x2009, 0x003c, 0x080c, 0x23d2, 0x2001, 0x015d, 0x2003, 0x0000,
-	0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, 0x8414, 0x70a0, 0x70a2,
-	0x7098, 0x709a, 0x709c, 0x709e, 0x2001, 0x020d, 0x2003, 0x0020,
-	0x00f6, 0x2079, 0x0300, 0x080c, 0x1313, 0x7803, 0x0001, 0x00fe,
-	0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2001,
-	0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x73bc, 0x1108, 0x0005,
-	0x2021, 0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168, 0x2001,
-	0x0109, 0x201c, 0x939c, 0x0048, 0x1160, 0x2001, 0x0111, 0x201c,
-	0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, 0x015d, 0x2003, 0x0000,
-	0x0005, 0x0046, 0x2021, 0x0019, 0x2003, 0x0048, 0xa001, 0xa001,
-	0x201c, 0x939c, 0x0048, 0x0120, 0x8421, 0x1db0, 0x004e, 0x0c60,
-	0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, 0x0005, 0x2c08, 0x621c,
-	0x080c, 0x15ee, 0x7930, 0x0005, 0x2c08, 0x621c, 0x080c, 0x1699,
-	0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, 0x2031, 0x0005, 0x781c,
-	0x9084, 0x0007, 0x0170, 0x2001, 0x0038, 0x0c41, 0x9186, 0x0040,
-	0x0904, 0x1ba3, 0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80, 0x080c,
-	0x0dd5, 0x781f, 0x0202, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001,
-	0x0b10, 0x0c01, 0x781c, 0xd084, 0x0110, 0x0861, 0x04e0, 0x2001,
-	0x0030, 0x0891, 0x9186, 0x0040, 0x0568, 0x781c, 0xd084, 0x1da8,
-	0x781f, 0x0101, 0x2001, 0x0014, 0x0869, 0x2001, 0x0037, 0x0821,
-	0x9186, 0x0040, 0x0140, 0x2001, 0x0030, 0x080c, 0x1b3c, 0x9186,
-	0x0040, 0x190c, 0x0dd5, 0x00d6, 0x2069, 0x0200, 0x692c, 0xd1f4,
-	0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800, 0x9085, 0x1800,
-	0x6802, 0x00de, 0x0080, 0x6908, 0x9184, 0x0007, 0x1db0, 0x00de,
-	0x781f, 0x0100, 0x791c, 0x9184, 0x0007, 0x090c, 0x0dd5, 0xa001,
-	0xa001, 0x781f, 0x0200, 0x0005, 0x0126, 0x2091, 0x2400, 0x2071,
-	0x1a66, 0x2079, 0x0090, 0x012e, 0x0005, 0x9280, 0x0005, 0x2004,
-	0x2048, 0xa97c, 0xd1dc, 0x1904, 0x1c45, 0xa964, 0x9184, 0x0007,
-	0x0002, 0x1bc1, 0x1c30, 0x1bd8, 0x1bda, 0x1bd8, 0x1c18, 0x1bf8,
-	0x1be7, 0x918c, 0x00ff, 0x9186, 0x0008, 0x1170, 0xa87c, 0xd0b4,
-	0x0904, 0x1e6f, 0x9006, 0xa842, 0xa83e, 0xa988, 0x2900, 0xa85a,
-	0xa813, 0x208b, 0x0804, 0x1c41, 0x9186, 0x0048, 0x0904, 0x1c30,
-	0x080c, 0x0dd5, 0x9184, 0x00ff, 0x9086, 0x0013, 0x0904, 0x1c30,
-	0x9184, 0x00ff, 0x9086, 0x001b, 0x0904, 0x1c30, 0x0c88, 0xa87c,
-	0xd0b4, 0x0904, 0x1e6f, 0xa890, 0xa842, 0xa83a, 0xa88c, 0xa83e,
-	0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa988, 0x0804, 0x1c38,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x19d0, 0xa87c, 0xd0b4,
-	0x0904, 0x1e6f, 0xa890, 0xa842, 0xa83a, 0xa88c, 0xa83e, 0xa836,
-	0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa804, 0xa85a, 0x2040, 0xa064,
-	0x9084, 0x000f, 0x9080, 0x2090, 0x2005, 0xa812, 0xa988, 0x0448,
-	0x918c, 0x00ff, 0x9186, 0x0015, 0x1540, 0xa87c, 0xd0b4, 0x0904,
-	0x1e6f, 0xa804, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080,
-	0x2090, 0x2005, 0xa812, 0xa988, 0x9006, 0xa842, 0xa83e, 0x0088,
-	0xa87c, 0xd0b4, 0x0904, 0x1e6f, 0xa988, 0x9006, 0xa842, 0xa83e,
-	0x2900, 0xa85a, 0xa864, 0x9084, 0x000f, 0x9080, 0x2090, 0x2005,
-	0xa812, 0xa916, 0xa87c, 0xc0dd, 0xa87e, 0x0005, 0x00f6, 0x2079,
-	0x0090, 0x782c, 0xd0fc, 0x190c, 0x1eb4, 0x00e6, 0x2071, 0x1a66,
-	0x7000, 0x9005, 0x1904, 0x1cae, 0x7206, 0x9280, 0x0005, 0x204c,
-	0x9280, 0x0004, 0x2004, 0x782b, 0x0004, 0x00f6, 0x2079, 0x0200,
-	0x7803, 0x0040, 0x00fe, 0x00b6, 0x2058, 0xb86c, 0x7836, 0xb890,
-	0x00be, 0x00f6, 0x2079, 0x0200, 0x7803, 0x0040, 0xa001, 0xa001,
-	0xa001, 0xa001, 0xa001, 0xa001, 0x781a, 0x2079, 0x0100, 0x8004,
-	0x78d6, 0x00fe, 0xa814, 0x2050, 0xa858, 0x2040, 0xa810, 0x2060,
-	0xa064, 0x90ec, 0x000f, 0xa944, 0x791a, 0x7116, 0xa848, 0x781e,
-	0x701a, 0x9006, 0x700e, 0x7012, 0x7004, 0xa940, 0xa838, 0x9106,
-	0x1500, 0xa93c, 0xa834, 0x9106, 0x11e0, 0x0006, 0x0016, 0xa938,
-	0xa834, 0x9105, 0x0118, 0x001e, 0x000e, 0x0098, 0x001e, 0x000e,
-	0x8aff, 0x01c8, 0x0126, 0x2091, 0x8000, 0x2009, 0x0306, 0x200b,
-	0x0808, 0x00d9, 0x0108, 0x00c9, 0x012e, 0x9006, 0x00ee, 0x00fe,
-	0x0005, 0x0036, 0x0046, 0xab38, 0xac34, 0x080c, 0x20b0, 0x004e,
-	0x003e, 0x0d30, 0x0c98, 0x9085, 0x0001, 0x0c80, 0x2009, 0x0306,
-	0x200b, 0x4800, 0x7027, 0x0000, 0x0005, 0x0076, 0x0066, 0x0056,
-	0x0046, 0x0036, 0x0026, 0x8aff, 0x0904, 0x1e68, 0x700c, 0x7214,
-	0x923a, 0x7010, 0x7218, 0x9203, 0x0a04, 0x1e67, 0x9705, 0x0904,
-	0x1e67, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002,
-	0x1df1, 0x1d30, 0x1d30, 0x1df1, 0x1df1, 0x1dce, 0x1df1, 0x1d30,
-	0x1dd5, 0x1d7f, 0x1d7f, 0x1df1, 0x1df1, 0x1df1, 0x1dc8, 0x1d7f,
+	0x0004, 0x918c, 0x0700, 0x01a8, 0x080c, 0x7e3f, 0x080c, 0x1aab,
+	0x080c, 0xcb4a, 0x0158, 0xa9ac, 0xa936, 0xa9b0, 0xa93a, 0xa83f,
+	0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd, 0xa882, 0x080c, 0xc77b,
+	0x0005, 0x6020, 0x9086, 0x0009, 0x1128, 0x2009, 0x004c, 0x080c,
+	0xaeec, 0x0048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
+	0x6024, 0x190c, 0xcf34, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001,
+	0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xe9e2, 0xd5a4,
+	0x1118, 0x080c, 0x157f, 0x0005, 0x080c, 0x7e3f, 0x080c, 0x1aab,
+	0x0005, 0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016, 0x0066,
+	0x0076, 0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007, 0x9186,
+	0x0003, 0x0120, 0x2001, 0x0016, 0x080c, 0x15f0, 0x00fe, 0x007e,
+	0x006e, 0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005, 0x7104,
+	0x9184, 0x0004, 0x190c, 0x0dd5, 0xd184, 0x1189, 0xd19c, 0x0158,
+	0xc19c, 0x7106, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
+	0x080c, 0x157f, 0x0005, 0x81ff, 0x190c, 0x0dd5, 0x0005, 0xc184,
+	0xd1b4, 0xc1b4, 0x7106, 0x0016, 0x00e6, 0x15f0, 0x2071, 0x0200,
+	0x080c, 0x16aa, 0x05c8, 0x6014, 0x9005, 0x05b0, 0x0096, 0x2048,
+	0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e,
+	0x0048, 0x1550, 0x601c, 0xd084, 0x11e0, 0x00f6, 0x2c78, 0x080c,
+	0x1727, 0x00fe, 0x00b0, 0x00f6, 0x2c78, 0x080c, 0x18ae, 0x00fe,
+	0x2009, 0x01f4, 0x8109, 0x0168, 0x2001, 0x0201, 0x2004, 0x9005,
+	0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1118, 0x080c, 0x157f,
+	0x0040, 0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x1313, 0x7803,
+	0x0001, 0x00ee, 0x001e, 0x0005, 0x2001, 0x020d, 0x2003, 0x0050,
+	0x2003, 0x0020, 0x0461, 0x0ca8, 0x0429, 0x2060, 0x2009, 0x0053,
+	0x080c, 0xaeec, 0x0005, 0x0005, 0x0005, 0x00e1, 0x2008, 0x00d1,
+	0x0006, 0x7004, 0xc09d, 0x7006, 0x000e, 0x080c, 0x8d52, 0x0005,
+	0x0089, 0x9005, 0x0118, 0x080c, 0x8955, 0x0cd0, 0x0005, 0x2001,
+	0x0036, 0x2009, 0x1820, 0x210c, 0x2011, 0x181f, 0x2214, 0x080c,
+	0x15f0, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c,
+	0x14d6, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0510,
+	0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc,
+	0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841,
+	0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c,
+	0x080c, 0x15e2, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827,
+	0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500,
+	0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c,
+	0x7e3f, 0x080c, 0x1aab, 0x0090, 0x7827, 0x0015, 0x782b, 0x0000,
+	0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, 0x2003, 0x0020,
+	0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, 0x00de, 0x0005,
+	0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015,
+	0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, 0x1800, 0x6802,
+	0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, 0x2001,
+	0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005,
+	0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016,
+	0x0026, 0x00c6, 0x080c, 0x1380, 0x00ce, 0x002e, 0x001e, 0x000e,
+	0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118,
+	0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004,
+	0x080c, 0x0dd5, 0x2009, 0x180c, 0x2104, 0xc0f4, 0x200a, 0x2009,
+	0xff00, 0x8109, 0x0904, 0x166e, 0x7a18, 0x9284, 0x0030, 0x0904,
+	0x1669, 0x9284, 0x0048, 0x9086, 0x0008, 0x1904, 0x1669, 0x2001,
+	0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x0126, 0x2091, 0x2800, 0x00f6, 0x0026, 0x0016,
+	0x2009, 0x1a7c, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x908b,
+	0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, 0x014e, 0x013e, 0x01de,
+	0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x01d0, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x00f6, 0x0016,
+	0x2009, 0x1a7d, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x1eb6,
+	0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e,
+	0x000e, 0x7818, 0xd0bc, 0x1904, 0x1619, 0x0005, 0x2001, 0x180c,
+	0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, 0x0030, 0x0508, 0x9284,
+	0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, 0x19f5, 0x2004, 0x9005,
+	0x01b8, 0x2001, 0x1a65, 0x2004, 0x9086, 0x0000, 0x0188, 0x2009,
+	0x1a7b, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0xa2f8, 0x2009,
+	0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, 0xff00, 0x0804, 0x1619,
+	0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080,
+	0x080c, 0x1612, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, 0x2004,
+	0x080c, 0x0dd5, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, 0x7050,
+	0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x918c, 0xff00, 0x9186,
+	0x0500, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x0016, 0x2071,
+	0x0200, 0x0c41, 0x6124, 0xd1dc, 0x01f8, 0x701c, 0xd08c, 0x0904,
+	0x171c, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004, 0xd0bc, 0x0904,
+	0x171c, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, 0x6038, 0x00ce,
+	0x918e, 0x0039, 0x1904, 0x171c, 0x9c06, 0x15f0, 0x0126, 0x2091,
+	0x2600, 0x080c, 0x7d86, 0x012e, 0x7358, 0x745c, 0x6014, 0x905d,
+	0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
+	0x190c, 0xcf0f, 0xab42, 0xac3e, 0x2001, 0x1869, 0x2004, 0xd0b4,
+	0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837, 0xffff, 0x080c,
+	0x20b2, 0x1190, 0x080c, 0x1909, 0x2a00, 0xa816, 0x0130, 0x2800,
+	0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020, 0x781f,
+	0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050, 0x7037, 0x0020,
+	0x001e, 0x00ee, 0x080c, 0x157f, 0x0005, 0x080c, 0x0dd5, 0x2ff0,
+	0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940,
+	0x903e, 0x2730, 0xa864, 0x2068, 0xa81a, 0x9d84, 0x000f, 0x9088,
+	0x2092, 0x2165, 0x0002, 0x1752, 0x17c0, 0x1752, 0x1752, 0x1756,
+	0x17a1, 0x1752, 0x1776, 0x174b, 0x17b7, 0x1752, 0x1752, 0x175b,
+	0x18ac, 0x178a, 0x1780, 0xa964, 0x918c, 0x00ff, 0x918e, 0x0048,
+	0x0904, 0x17b7, 0x9085, 0x0001, 0x0804, 0x18a3, 0xa87c, 0xd0ac,
+	0x0dc8, 0x0804, 0x17c7, 0xa87c, 0xd0ac, 0x0da0, 0x0804, 0x1832,
+	0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0xaab2, 0xaa3e, 0xaa42,
+	0x3e00, 0x9080, 0x0008, 0x2004, 0x9080, 0x8f19, 0x2005, 0x9005,
+	0x090c, 0x0dd5, 0x2004, 0xa8ae, 0x0804, 0x188b, 0xa87c, 0xd0bc,
+	0x09c8, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x17c7,
+	0xa87c, 0xd0bc, 0x0978, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888,
+	0x0804, 0x1832, 0xa87c, 0xd0bc, 0x0928, 0xa890, 0xa842, 0xa88c,
+	0xa83e, 0xa804, 0x9045, 0x090c, 0x0dd5, 0xa164, 0xa91a, 0x91ec,
+	0x000f, 0x9d80, 0x2092, 0x2065, 0xa888, 0xd19c, 0x1904, 0x1832,
+	0x0430, 0xa87c, 0xd0ac, 0x0904, 0x1752, 0xa804, 0x9045, 0x090c,
+	0x0dd5, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x2092, 0x2065,
+	0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x1832, 0x0080, 0xa87c,
+	0xd0ac, 0x0904, 0x1752, 0x9006, 0xa842, 0xa83e, 0x0804, 0x1832,
+	0xa87c, 0xd0ac, 0x0904, 0x1752, 0x9006, 0xa842, 0xa83e, 0x2c05,
+	0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x17ea,
+	0x17ea, 0x17ec, 0x17ea, 0x17ea, 0x17ea, 0x17f6, 0x17ea, 0x17ea,
+	0x17ea, 0x1800, 0x17ea, 0x17ea, 0x17ea, 0x180a, 0x17ea, 0x17ea,
+	0x17ea, 0x1814, 0x17ea, 0x17ea, 0x17ea, 0x181e, 0x17ea, 0x17ea,
+	0x17ea, 0x1828, 0x080c, 0x0dd5, 0xa574, 0xa478, 0x9d86, 0x0024,
+	0x0904, 0x1760, 0xa37c, 0xa280, 0x0804, 0x188b, 0xa584, 0xa488,
+	0x9d86, 0x0024, 0x0904, 0x1760, 0xa38c, 0xa290, 0x0804, 0x188b,
+	0xa594, 0xa498, 0x9d86, 0x0024, 0x0904, 0x1760, 0xa39c, 0xa2a0,
+	0x0804, 0x188b, 0xa5a4, 0xa4a8, 0x9d86, 0x0024, 0x0904, 0x1760,
+	0xa3ac, 0xa2b0, 0x0804, 0x188b, 0xa5b4, 0xa4b8, 0x9d86, 0x0024,
+	0x0904, 0x1760, 0xa3bc, 0xa2c0, 0x0804, 0x188b, 0xa5c4, 0xa4c8,
+	0x9d86, 0x0024, 0x0904, 0x1760, 0xa3cc, 0xa2d0, 0x0804, 0x188b,
+	0xa5d4, 0xa4d8, 0x9d86, 0x0024, 0x0904, 0x1760, 0xa3dc, 0xa2e0,
+	0x0804, 0x188b, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082,
+	0x001b, 0x0002, 0x1855, 0x1853, 0x1853, 0x1853, 0x1853, 0x1853,
+	0x1860, 0x1853, 0x1853, 0x1853, 0x1853, 0x1853, 0x186b, 0x1853,
+	0x1853, 0x1853, 0x1853, 0x1853, 0x1876, 0x1853, 0x1853, 0x1853,
+	0x1853, 0x1853, 0x1881, 0x080c, 0x0dd5, 0xa56c, 0xa470, 0xa774,
+	0xa678, 0x9d86, 0x002c, 0x0904, 0x1760, 0xa37c, 0xa280, 0x0458,
+	0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86, 0x002c, 0x0904, 0x1760,
+	0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86,
+	0x002c, 0x0904, 0x1760, 0xa3ac, 0xa2b0, 0x00a8, 0xa5b4, 0xa4b8,
+	0xa7bc, 0xa6c0, 0x9d86, 0x002c, 0x0904, 0x1760, 0xa3c4, 0xa2c8,
+	0x0050, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x002c, 0x0904,
+	0x1760, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26,
+	0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a,
+	0x8109, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c,
+	0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005, 0x2800, 0xa80e,
+	0xab0a, 0x2c00, 0xa812, 0x0c78, 0x0804, 0x1752, 0x2ff0, 0x0126,
+	0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e,
+	0x2061, 0x208d, 0xa813, 0x208d, 0x2c05, 0xa80a, 0xa964, 0xa91a,
+	0xa87c, 0xd0ac, 0x090c, 0x0dd5, 0x9006, 0xa842, 0xa83e, 0x2c05,
+	0x908a, 0x0034, 0x1a0c, 0x0dd5, 0xadcc, 0xacd0, 0xafd4, 0xaed8,
+	0xabdc, 0xaae0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a,
+	0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0xa988, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0008, 0x1120, 0x8109, 0xa916, 0x0128, 0x0078, 0x918a,
+	0x0002, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c,
+	0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005, 0xa804, 0x9045,
+	0x090c, 0x0dd5, 0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f, 0x9080,
+	0x2092, 0x2015, 0x82ff, 0x090c, 0x0dd5, 0xaa12, 0x2205, 0xa80a,
+	0x0c10, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002,
+	0x1a33, 0x1960, 0x1960, 0x1a33, 0x1960, 0x1a2d, 0x1a33, 0x1960,
+	0x19d0, 0x19d0, 0x19d0, 0x1a33, 0x19d0, 0x1a33, 0x1a2a, 0x19d0,
 	0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904,
-	0x1dfe, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b,
-	0x0002, 0x1d1c, 0x1d1a, 0x1d1a, 0x1d1a, 0x1d1a, 0x1d1a, 0x1d20,
-	0x1d1a, 0x1d1a, 0x1d1a, 0x1d1a, 0x1d1a, 0x1d24, 0x1d1a, 0x1d1a,
-	0x1d1a, 0x1d1a, 0x1d1a, 0x1d28, 0x1d1a, 0x1d1a, 0x1d1a, 0x1d1a,
-	0x1d1a, 0x1d2c, 0x080c, 0x0dd5, 0xa774, 0xa678, 0x0804, 0x1dfe,
-	0xa78c, 0xa690, 0x0804, 0x1dfe, 0xa7a4, 0xa6a8, 0x0804, 0x1dfe,
-	0xa7bc, 0xa6c0, 0x0804, 0x1dfe, 0xa7d4, 0xa6d8, 0x0804, 0x1dfe,
-	0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002,
-	0x1d53, 0x1d53, 0x1d55, 0x1d53, 0x1d53, 0x1d53, 0x1d5b, 0x1d53,
-	0x1d53, 0x1d53, 0x1d61, 0x1d53, 0x1d53, 0x1d53, 0x1d67, 0x1d53,
-	0x1d53, 0x1d53, 0x1d6d, 0x1d53, 0x1d53, 0x1d53, 0x1d73, 0x1d53,
-	0x1d53, 0x1d53, 0x1d79, 0x080c, 0x0dd5, 0xa574, 0xa478, 0xa37c,
-	0xa280, 0x0804, 0x1dfe, 0xa584, 0xa488, 0xa38c, 0xa290, 0x0804,
-	0x1dfe, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1dfe, 0xa5a4,
-	0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1dfe, 0xa5b4, 0xa4b8, 0xa3bc,
-	0xa2c0, 0x0804, 0x1dfe, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804,
-	0x1dfe, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1dfe, 0x2c05,
-	0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1da2,
-	0x1da0, 0x1da0, 0x1da0, 0x1da0, 0x1da0, 0x1daa, 0x1da0, 0x1da0,
-	0x1da0, 0x1da0, 0x1da0, 0x1db2, 0x1da0, 0x1da0, 0x1da0, 0x1da0,
-	0x1da0, 0x1dba, 0x1da0, 0x1da0, 0x1da0, 0x1da0, 0x1da0, 0x1dc1,
-	0x080c, 0x0dd5, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, 0xa280,
-	0x0804, 0x1dfe, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298,
-	0x0804, 0x1dfe, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0,
-	0x0804, 0x1dfe, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8,
-	0x04e8, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0x04b0,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x1518, 0x080c, 0x2048,
-	0x1904, 0x1ccb, 0x900e, 0x0804, 0x1e68, 0xab64, 0x939c, 0x00ff,
-	0x9386, 0x0048, 0x1180, 0x00c6, 0x7004, 0x2060, 0x6004, 0x9086,
-	0x0043, 0x00ce, 0x0904, 0x1d7f, 0xab9c, 0x9016, 0xad8c, 0xac90,
-	0xaf94, 0xae98, 0x0098, 0x9386, 0x0008, 0x0904, 0x1d7f, 0x080c,
-	0x0dd5, 0xa964, 0x918c, 0x00ff, 0x9186, 0x0013, 0x0904, 0x1d30,
-	0x9186, 0x001b, 0x0904, 0x1d7f, 0x080c, 0x0dd5, 0x2009, 0x030f,
-	0x2104, 0xd0fc, 0x0530, 0x0066, 0x2009, 0x0306, 0x2104, 0x9084,
-	0x0030, 0x15c8, 0x2031, 0x1000, 0x200b, 0x4000, 0x2600, 0x9302,
-	0x928b, 0x0000, 0xa82e, 0xa932, 0x0278, 0x9105, 0x0168, 0x2011,
-	0x0000, 0x2618, 0x2600, 0x9500, 0xa81e, 0x9481, 0x0000, 0xa822,
-	0xa880, 0xc0fd, 0xa882, 0x0020, 0xa82f, 0x0000, 0xa833, 0x0000,
-	0x006e, 0x7b12, 0x7a16, 0x7d02, 0x7c06, 0x7f0a, 0x7e0e, 0x782b,
-	0x0001, 0x7000, 0x8000, 0x7002, 0xa83c, 0x9300, 0xa83e, 0xa840,
-	0x9201, 0xa842, 0x700c, 0x9300, 0x700e, 0x7010, 0x9201, 0x7012,
-	0x080c, 0x2048, 0x0428, 0x2031, 0x0080, 0x9584, 0x007f, 0x0108,
-	0x9632, 0x7124, 0x7000, 0x9086, 0x0000, 0x1198, 0xc185, 0x7126,
-	0x2009, 0x0306, 0x2104, 0xd0b4, 0x1904, 0x1e0e, 0x200b, 0x4040,
-	0x2009, 0x1a7f, 0x2104, 0x8000, 0x0a04, 0x1e0e, 0x200a, 0x0804,
-	0x1e0e, 0xc18d, 0x7126, 0xd184, 0x1d58, 0x0804, 0x1e0e, 0x9006,
-	0x002e, 0x003e, 0x004e, 0x005e, 0x006e, 0x007e, 0x0005, 0x080c,
-	0x0dd5, 0x0026, 0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004,
-	0x7003, 0x0000, 0x7004, 0x0016, 0x080c, 0x1cbe, 0x001e, 0x2060,
-	0x6014, 0x2048, 0x080c, 0xcb35, 0x0118, 0xa880, 0xc0bd, 0xa882,
-	0x6020, 0x9086, 0x0006, 0x1180, 0x2061, 0x0100, 0x62c8, 0x2001,
-	0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a,
-	0x60c8, 0xa896, 0x7004, 0x2060, 0x00c6, 0x080c, 0xc768, 0x00ce,
-	0x2001, 0x19f6, 0x2004, 0x9c06, 0x1160, 0x2009, 0x0040, 0x080c,
-	0x23d2, 0x080c, 0xa7cc, 0x2011, 0x0000, 0x080c, 0xa65d, 0x080c,
-	0x97b9, 0x002e, 0x0804, 0x1ff8, 0x0126, 0x2091, 0x2400, 0xa858,
-	0x2040, 0x792c, 0x782b, 0x0002, 0x9184, 0x0700, 0x1904, 0x1e71,
-	0x7000, 0x0002, 0x1ff8, 0x1ec6, 0x1f46, 0x1ff6, 0x8001, 0x7002,
-	0x7027, 0x0000, 0xd19c, 0x1158, 0x8aff, 0x0904, 0x1f13, 0x080c,
-	0x1cc5, 0x0904, 0x1ff8, 0x080c, 0x1cc5, 0x0804, 0x1ff8, 0x782b,
-	0x0004, 0xd194, 0x0148, 0xa880, 0xc0fc, 0xa882, 0x8aff, 0x1518,
-	0xa87c, 0xc0f5, 0xa87e, 0x00f8, 0x0026, 0x0036, 0xab3c, 0xaa40,
-	0x0016, 0x7910, 0xa82c, 0x9100, 0xa82e, 0x7914, 0xa830, 0x9101,
-	0xa832, 0x001e, 0x7810, 0x931a, 0x7814, 0x9213, 0x7800, 0xa81e,
-	0x7804, 0xa822, 0xab3e, 0xaa42, 0x003e, 0x002e, 0x080c, 0x2063,
-	0xa880, 0xc0fd, 0xa882, 0x2a00, 0xa816, 0x2800, 0xa85a, 0x2c00,
-	0xa812, 0x7003, 0x0000, 0x2009, 0x0306, 0x200b, 0x4800, 0x7027,
-	0x0000, 0x0804, 0x1ff8, 0x00f6, 0x0026, 0x781c, 0x0006, 0x7818,
-	0x0006, 0x2079, 0x0100, 0x7a14, 0x9284, 0x1984, 0x9085, 0x0012,
-	0x7816, 0x0036, 0x2019, 0x1000, 0x8319, 0x090c, 0x0dd5, 0x7820,
-	0xd0bc, 0x1dd0, 0x003e, 0x79c8, 0x000e, 0x9102, 0x001e, 0x0006,
-	0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284,
-	0x1984, 0x9085, 0x0012, 0x7816, 0x002e, 0x00fe, 0x782b, 0x0008,
-	0x7003, 0x0000, 0x080c, 0x1cbe, 0x0804, 0x1ff8, 0x8001, 0x7002,
-	0x7024, 0x8004, 0x7026, 0xd194, 0x0170, 0x782c, 0xd0fc, 0x1904,
-	0x1eb9, 0xd19c, 0x1904, 0x1ff4, 0x8aff, 0x0904, 0x1ff8, 0x080c,
-	0x1cc5, 0x0804, 0x1ff8, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x080c,
-	0x2063, 0xdd9c, 0x1904, 0x1fb3, 0x2c05, 0x908a, 0x0036, 0x1a0c,
-	0x0dd5, 0x9082, 0x001b, 0x0002, 0x1f87, 0x1f87, 0x1f89, 0x1f87,
-	0x1f87, 0x1f87, 0x1f8f, 0x1f87, 0x1f87, 0x1f87, 0x1f95, 0x1f87,
-	0x1f87, 0x1f87, 0x1f9b, 0x1f87, 0x1f87, 0x1f87, 0x1fa1, 0x1f87,
-	0x1f87, 0x1f87, 0x1fa7, 0x1f87, 0x1f87, 0x1f87, 0x1fad, 0x080c,
-	0x0dd5, 0xa07c, 0x931a, 0xa080, 0x9213, 0x0804, 0x1ee8, 0xa08c,
-	0x931a, 0xa090, 0x9213, 0x0804, 0x1ee8, 0xa09c, 0x931a, 0xa0a0,
-	0x9213, 0x0804, 0x1ee8, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804,
-	0x1ee8, 0xa0bc, 0x931a, 0xa0c0, 0x9213, 0x0804, 0x1ee8, 0xa0cc,
-	0x931a, 0xa0d0, 0x9213, 0x0804, 0x1ee8, 0xa0dc, 0x931a, 0xa0e0,
-	0x9213, 0x0804, 0x1ee8, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5,
-	0x9082, 0x001b, 0x0002, 0x1fd6, 0x1fd4, 0x1fd4, 0x1fd4, 0x1fd4,
-	0x1fd4, 0x1fdc, 0x1fd4, 0x1fd4, 0x1fd4, 0x1fd4, 0x1fd4, 0x1fe2,
-	0x1fd4, 0x1fd4, 0x1fd4, 0x1fd4, 0x1fd4, 0x1fe8, 0x1fd4, 0x1fd4,
-	0x1fd4, 0x1fd4, 0x1fd4, 0x1fee, 0x080c, 0x0dd5, 0xa07c, 0x931a,
-	0xa080, 0x9213, 0x0804, 0x1ee8, 0xa094, 0x931a, 0xa098, 0x9213,
-	0x0804, 0x1ee8, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1ee8,
-	0xa0c4, 0x931a, 0xa0c8, 0x9213, 0x0804, 0x1ee8, 0xa0dc, 0x931a,
-	0xa0e0, 0x9213, 0x0804, 0x1ee8, 0x0804, 0x1ee4, 0x080c, 0x0dd5,
-	0x012e, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a66, 0x7000, 0x9086,
-	0x0000, 0x0904, 0x2043, 0x2079, 0x0090, 0x2009, 0x0207, 0x210c,
-	0xd194, 0x01b8, 0x2009, 0x020c, 0x210c, 0x9184, 0x0003, 0x0188,
-	0x080c, 0xea0a, 0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0dd5,
-	0x0016, 0x2009, 0x0040, 0x080c, 0x23d2, 0x001e, 0x2001, 0x020c,
-	0x2102, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106,
-	0x1120, 0x2009, 0x0040, 0x080c, 0x23d2, 0x782c, 0xd0fc, 0x09a8,
-	0x080c, 0x1eb4, 0x7000, 0x9086, 0x0000, 0x1978, 0x782b, 0x0004,
-	0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x23d2, 0x782b,
-	0x0002, 0x7003, 0x0000, 0x080c, 0x1cbe, 0x00ee, 0x00fe, 0x0005,
-	0xa880, 0xd0fc, 0x11a8, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51,
-	0x0005, 0xa004, 0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084,
-	0x000f, 0x9080, 0x2090, 0x2065, 0x8cff, 0x090c, 0x0dd5, 0x8a51,
-	0x0005, 0x2050, 0x0005, 0xa880, 0xd0fc, 0x11b8, 0x8a50, 0x8c61,
-	0x2c05, 0x9005, 0x1190, 0x2800, 0x9906, 0x0120, 0xa000, 0x9005,
-	0x1108, 0x2900, 0x2040, 0xa85a, 0xa064, 0x9084, 0x000f, 0x9080,
-	0x20a0, 0x2065, 0x8cff, 0x090c, 0x0dd5, 0x0005, 0x0000, 0x001d,
-	0x0021, 0x0025, 0x0029, 0x002d, 0x0031, 0x0035, 0x0000, 0x001b,
-	0x0021, 0x0027, 0x002d, 0x0033, 0x0000, 0x0000, 0x0023, 0x0000,
-	0x0000, 0x2083, 0x207f, 0x2083, 0x2083, 0x208d, 0x0000, 0x2083,
-	0x208a, 0x208a, 0x2087, 0x208a, 0x208a, 0x0000, 0x208d, 0x208a,
-	0x0000, 0x2085, 0x2085, 0x0000, 0x2085, 0x208d, 0x0000, 0x2085,
-	0x208b, 0x208b, 0x208b, 0x0000, 0x208b, 0x0000, 0x208d, 0x208b,
-	0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888, 0x9055, 0x0904,
-	0x228f, 0x2940, 0xa064, 0x90ec, 0x000f, 0x9084, 0x00ff, 0x9086,
-	0x0008, 0x1118, 0x2061, 0x208b, 0x00d0, 0x9de0, 0x2090, 0x9d86,
-	0x0007, 0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86, 0x000f, 0x1120,
-	0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05, 0x9065, 0x1140, 0x0310,
-	0x0804, 0x228f, 0xa004, 0x9045, 0x0904, 0x228f, 0x08d8, 0x2c05,
-	0x9005, 0x0904, 0x2177, 0xdd9c, 0x1904, 0x2133, 0x908a, 0x0036,
-	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x2108, 0x2108, 0x210a,
-	0x2108, 0x2108, 0x2108, 0x2110, 0x2108, 0x2108, 0x2108, 0x2116,
-	0x2108, 0x2108, 0x2108, 0x211c, 0x2108, 0x2108, 0x2108, 0x2122,
-	0x2108, 0x2108, 0x2108, 0x2128, 0x2108, 0x2108, 0x2108, 0x212e,
-	0x080c, 0x0dd5, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0804, 0x216d,
-	0xa08c, 0x9422, 0xa090, 0x931b, 0x0804, 0x216d, 0xa09c, 0x9422,
-	0xa0a0, 0x931b, 0x0804, 0x216d, 0xa0ac, 0x9422, 0xa0b0, 0x931b,
-	0x0804, 0x216d, 0xa0bc, 0x9422, 0xa0c0, 0x931b, 0x0804, 0x216d,
-	0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804, 0x216d, 0xa0dc, 0x9422,
-	0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082,
-	0x001b, 0x0002, 0x2155, 0x2153, 0x2153, 0x2153, 0x2153, 0x2153,
-	0x215a, 0x2153, 0x2153, 0x2153, 0x2153, 0x2153, 0x215f, 0x2153,
-	0x2153, 0x2153, 0x2153, 0x2153, 0x2164, 0x2153, 0x2153, 0x2153,
-	0x2153, 0x2153, 0x2169, 0x080c, 0x0dd5, 0xa07c, 0x9422, 0xa080,
-	0x931b, 0x0098, 0xa094, 0x9422, 0xa098, 0x931b, 0x0070, 0xa0ac,
-	0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422, 0xa0c8, 0x931b,
-	0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630, 0x2300, 0x9405,
-	0x0160, 0x8a51, 0x0904, 0x228f, 0x8c60, 0x0804, 0x20df, 0xa004,
-	0x9045, 0x0904, 0x228f, 0x0804, 0x20ba, 0x8a51, 0x0904, 0x228f,
-	0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004, 0x9045, 0x0904, 0x228f,
-	0xa064, 0x90ec, 0x000f, 0x9de0, 0x2090, 0x2c05, 0x2060, 0xa880,
-	0xc0fc, 0xa882, 0x0804, 0x2284, 0x2c05, 0x8422, 0x8420, 0x831a,
-	0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904, 0x2221, 0x9082,
-	0x001b, 0x0002, 0x21bd, 0x21bd, 0x21bf, 0x21bd, 0x21bd, 0x21bd,
-	0x21cd, 0x21bd, 0x21bd, 0x21bd, 0x21db, 0x21bd, 0x21bd, 0x21bd,
-	0x21e9, 0x21bd, 0x21bd, 0x21bd, 0x21f7, 0x21bd, 0x21bd, 0x21bd,
-	0x2205, 0x21bd, 0x21bd, 0x21bd, 0x2213, 0x080c, 0x0dd5, 0xa17c,
-	0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa074,
-	0x9420, 0xa078, 0x9319, 0x0804, 0x227f, 0xa18c, 0x2400, 0x9122,
-	0xa190, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa084, 0x9420, 0xa088,
-	0x9319, 0x0804, 0x227f, 0xa19c, 0x2400, 0x9122, 0xa1a0, 0x2300,
-	0x911b, 0x0a0c, 0x0dd5, 0xa094, 0x9420, 0xa098, 0x9319, 0x0804,
-	0x227f, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c,
-	0x0dd5, 0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804, 0x227f, 0xa1bc,
-	0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0b4,
-	0x9420, 0xa0b8, 0x9319, 0x0804, 0x227f, 0xa1cc, 0x2400, 0x9122,
-	0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0c4, 0x9420, 0xa0c8,
-	0x9319, 0x0804, 0x227f, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300,
-	0x911b, 0x0a0c, 0x0dd5, 0xa0d4, 0x9420, 0xa0d8, 0x9319, 0x0804,
-	0x227f, 0x9082, 0x001b, 0x0002, 0x223f, 0x223d, 0x223d, 0x223d,
-	0x223d, 0x223d, 0x224c, 0x223d, 0x223d, 0x223d, 0x223d, 0x223d,
-	0x2259, 0x223d, 0x223d, 0x223d, 0x223d, 0x223d, 0x2266, 0x223d,
-	0x223d, 0x223d, 0x223d, 0x223d, 0x2273, 0x080c, 0x0dd5, 0xa17c,
-	0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa06c,
-	0x9420, 0xa070, 0x9319, 0x0498, 0xa194, 0x2400, 0x9122, 0xa198,
-	0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa084, 0x9420, 0xa088, 0x9319,
-	0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c,
-	0x0dd5, 0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8, 0xa1c4, 0x2400,
-	0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0b4, 0x9420,
-	0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300,
-	0x911b, 0x0a0c, 0x0dd5, 0xa0cc, 0x9420, 0xa0d0, 0x9319, 0xac1e,
-	0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a, 0x2c00, 0xa812,
-	0x2a00, 0xa816, 0x000e, 0x000e, 0x000e, 0x9006, 0x0028, 0x008e,
-	0x00de, 0x00ce, 0x9085, 0x0001, 0x0005, 0x2001, 0x0005, 0x2004,
-	0xd0bc, 0x190c, 0x0dce, 0x9084, 0x0007, 0x0002, 0x22b0, 0x1eb4,
-	0x22b0, 0x22a6, 0x22a9, 0x22ac, 0x22a9, 0x22ac, 0x080c, 0x1eb4,
-	0x0005, 0x080c, 0x11a3, 0x0005, 0x080c, 0x1eb4, 0x080c, 0x11a3,
-	0x0005, 0x0126, 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260,
-	0x2069, 0x1800, 0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406,
-	0x789f, 0x0410, 0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002,
-	0x783b, 0x001f, 0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005,
-	0x2091, 0x2600, 0x781c, 0xd0a4, 0x190c, 0x23cf, 0x7900, 0xd1dc,
-	0x1118, 0x9084, 0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x22f7,
-	0x22ef, 0x7d9d, 0x22ef, 0x22f1, 0x22f1, 0x22f1, 0x22f1, 0x7d83,
-	0x22ef, 0x22f3, 0x22ef, 0x22f1, 0x22ef, 0x22f1, 0x22ef, 0x080c,
-	0x0dd5, 0x0031, 0x0020, 0x080c, 0x7d83, 0x080c, 0x7d9d, 0x0005,
-	0x0006, 0x0016, 0x0026, 0x080c, 0xea0a, 0x7930, 0x9184, 0x0003,
-	0x01c0, 0x2001, 0x19f6, 0x2004, 0x9005, 0x0170, 0x2001, 0x0133,
-	0x2004, 0x9005, 0x090c, 0x0dd5, 0x00c6, 0x2001, 0x19f6, 0x2064,
-	0x080c, 0xc768, 0x00ce, 0x00f8, 0x2009, 0x0040, 0x080c, 0x23d2,
-	0x00d0, 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160,
-	0x080c, 0x73bc, 0x1138, 0x080c, 0x76a4, 0x080c, 0x601a, 0x080c,
-	0x72ee, 0x0010, 0x080c, 0x5ed9, 0x080c, 0x7e4c, 0x0041, 0x0018,
-	0x9184, 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6,
-	0x0036, 0x0046, 0x0056, 0x2071, 0x1a62, 0x080c, 0x1aa9, 0x005e,
-	0x004e, 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071,
-	0x1800, 0x7128, 0x2001, 0x196f, 0x2102, 0x2001, 0x1977, 0x2102,
-	0x2001, 0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e,
-	0x78a3, 0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398,
-	0x0005, 0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423,
-	0x8423, 0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007,
-	0x8403, 0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc,
-	0x1238, 0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0,
-	0x9182, 0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420,
-	0x0098, 0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423,
-	0x0058, 0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420,
-	0x0018, 0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020,
-	0x8301, 0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405,
-	0x789a, 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814,
-	0x9084, 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6,
-	0x2069, 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4,
-	0x6812, 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810,
-	0x9084, 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938,
-	0x080c, 0x0dce, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001,
-	0xa001, 0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001,
-	0xa001, 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800,
-	0x2061, 0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2c3e,
-	0x080c, 0x2b59, 0x6054, 0x8004, 0x8004, 0x8004, 0x8004, 0x9084,
-	0x000c, 0x6150, 0x918c, 0xfff3, 0x9105, 0x6052, 0x6050, 0x9084,
-	0xb17f, 0x9085, 0x2000, 0x6052, 0x2009, 0x199d, 0x2011, 0x199e,
-	0x6358, 0x939c, 0x38f0, 0x2320, 0x080c, 0x2b9d, 0x1238, 0x939d,
-	0x4003, 0x94a5, 0x8603, 0x230a, 0x2412, 0x0030, 0x939d, 0x0203,
-	0x94a5, 0x8603, 0x230a, 0x2412, 0x9006, 0x080c, 0x2b88, 0x9006,
-	0x080c, 0x2b6b, 0x20a9, 0x0012, 0x1d04, 0x2424, 0x2091, 0x6000,
-	0x1f04, 0x2424, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085,
-	0x0400, 0x9084, 0xdfff, 0x6052, 0x6024, 0x6026, 0x080c, 0x2877,
-	0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x2887, 0x60e7, 0x0000,
-	0x61ea, 0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f,
-	0x0080, 0x602f, 0x0000, 0x6007, 0x349f, 0x60bb, 0x0000, 0x20a9,
-	0x0018, 0x60bf, 0x0000, 0x1f04, 0x2451, 0x60bb, 0x0000, 0x60bf,
-	0x0108, 0x60bf, 0x0012, 0x60bf, 0x0405, 0x60bf, 0x0014, 0x60bf,
-	0x0320, 0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f,
-	0x006b, 0x602b, 0x402f, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140,
-	0x78c3, 0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005,
-	0x2001, 0x1835, 0x2003, 0x0000, 0x2001, 0x1834, 0x2003, 0x0001,
-	0x0005, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124,
-	0x0066, 0x2031, 0x1837, 0x2634, 0x96b4, 0x0028, 0x006e, 0x1138,
-	0x6020, 0xd1bc, 0x0120, 0xd0bc, 0x1168, 0xd0b4, 0x1198, 0x9184,
-	0x5e2c, 0x1118, 0x9184, 0x0007, 0x00aa, 0x9195, 0x0004, 0x9284,
-	0x0007, 0x0082, 0x0016, 0x2001, 0x188b, 0x200c, 0xd184, 0x001e,
-	0x0d70, 0x0c98, 0x0016, 0x2001, 0x188b, 0x200c, 0xd194, 0x001e,
-	0x0d30, 0x0c58, 0x24d4, 0x24ba, 0x24bd, 0x24c0, 0x24c5, 0x24c7,
-	0x24cb, 0x24cf, 0x080c, 0x8fd5, 0x00b8, 0x080c, 0x90a2, 0x00a0,
-	0x080c, 0x90a2, 0x080c, 0x8fd5, 0x0078, 0x0099, 0x0068, 0x080c,
-	0x8fd5, 0x0079, 0x0048, 0x080c, 0x90a2, 0x0059, 0x0028, 0x080c,
-	0x90a2, 0x080c, 0x8fd5, 0x0029, 0x002e, 0x001e, 0x000e, 0x012e,
-	0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c, 0x0118, 0xd19c, 0x1904,
-	0x273c, 0xd1f4, 0x190c, 0x0dce, 0x080c, 0x73bc, 0x0904, 0x252f,
-	0x080c, 0xd230, 0x1120, 0x7000, 0x9086, 0x0003, 0x0570, 0x6024,
-	0x9084, 0x1800, 0x0550, 0x080c, 0x73df, 0x0118, 0x080c, 0x73cd,
-	0x1520, 0x6027, 0x0020, 0x6043, 0x0000, 0x080c, 0xd230, 0x0168,
-	0x080c, 0x73df, 0x1150, 0x2001, 0x19a7, 0x2003, 0x0001, 0x6027,
-	0x1800, 0x080c, 0x7252, 0x0804, 0x273f, 0x70a4, 0x9005, 0x1150,
-	0x70a7, 0x0001, 0x00d6, 0x2069, 0x0140, 0x080c, 0x7413, 0x00de,
-	0x1904, 0x273f, 0x080c, 0x76ae, 0x0428, 0x080c, 0x73df, 0x1590,
-	0x6024, 0x9084, 0x1800, 0x1108, 0x0468, 0x080c, 0x76ae, 0x080c,
-	0x76a4, 0x080c, 0x601a, 0x080c, 0x72ee, 0x0804, 0x273c, 0xd1ac,
-	0x1508, 0x6024, 0xd0dc, 0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190,
-	0xd0cc, 0x0130, 0x7098, 0x9086, 0x0028, 0x1110, 0x080c, 0x7591,
-	0x0804, 0x273c, 0x080c, 0x76a9, 0x0048, 0x2001, 0x197d, 0x2003,
-	0x0002, 0x0020, 0x080c, 0x74f6, 0x0804, 0x273c, 0x080c, 0x762c,
-	0x0804, 0x273c, 0x6220, 0xd1bc, 0x0138, 0xd2bc, 0x1904, 0x27af,
-	0xd2b4, 0x1904, 0x27c2, 0x0000, 0xd1ac, 0x0904, 0x2651, 0x0036,
-	0x6328, 0xc3bc, 0x632a, 0x003e, 0x080c, 0x73bc, 0x11c0, 0x6027,
-	0x0020, 0x0006, 0x0026, 0x0036, 0x080c, 0x73d6, 0x1158, 0x080c,
-	0x76a4, 0x080c, 0x601a, 0x080c, 0x72ee, 0x003e, 0x002e, 0x000e,
-	0x00ae, 0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x7394, 0x0016,
-	0x0046, 0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100,
-	0x644a, 0x6043, 0x0090, 0x6043, 0x0010, 0x74da, 0x948c, 0xff00,
-	0x7038, 0xd084, 0x0178, 0x9186, 0xf800, 0x1160, 0x7048, 0xd084,
-	0x1148, 0xc085, 0x704a, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c,
-	0x4b04, 0x003e, 0x080c, 0xd229, 0x1904, 0x262e, 0x9196, 0xff00,
-	0x05a8, 0x7060, 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116,
-	0x0568, 0x7130, 0xd184, 0x1550, 0x080c, 0x3319, 0x0128, 0xc18d,
-	0x7132, 0x080c, 0x696a, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130,
-	0x6248, 0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c,
-	0x0904, 0x262e, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c,
-	0xd1ac, 0x1904, 0x262e, 0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011,
-	0x8013, 0x080c, 0x4b04, 0x003e, 0x0804, 0x262e, 0x7038, 0xd08c,
-	0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x262e, 0xc1ad,
-	0x2102, 0x0036, 0x73d8, 0x2011, 0x8013, 0x080c, 0x4b04, 0x003e,
-	0x7130, 0xc185, 0x7132, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x01f0,
-	0x0016, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x86dd, 0x2019,
-	0x000e, 0x00c6, 0x2061, 0x0000, 0x080c, 0xe522, 0x00ce, 0x9484,
-	0x00ff, 0x9080, 0x3325, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120,
-	0x9006, 0x2009, 0x000e, 0x080c, 0xe5ae, 0x001e, 0x0016, 0x2009,
-	0x0002, 0x2019, 0x0004, 0x080c, 0x318a, 0x001e, 0x0078, 0x0156,
-	0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x65ff, 0x1110, 0x080c,
-	0x6034, 0x8108, 0x1f04, 0x2624, 0x00be, 0x015e, 0x00ce, 0x004e,
-	0x080c, 0xadd2, 0x60e3, 0x0000, 0x001e, 0x2001, 0x1800, 0x2014,
-	0x9296, 0x0004, 0x1170, 0xd19c, 0x11a0, 0x2011, 0x180c, 0x2214,
-	0xd29c, 0x1120, 0x6204, 0x9295, 0x0002, 0x6206, 0x6228, 0xc29d,
-	0x622a, 0x2003, 0x0001, 0x2001, 0x1826, 0x2003, 0x0000, 0x6027,
-	0x0020, 0xd194, 0x0904, 0x273c, 0x0016, 0x6220, 0xd2b4, 0x0904,
-	0x26d9, 0x080c, 0x8579, 0x080c, 0xa273, 0x6027, 0x0004, 0x00f6,
-	0x2019, 0x19f0, 0x2304, 0x907d, 0x0904, 0x26a8, 0x7804, 0x9086,
-	0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069, 0x0140,
-	0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002, 0x2001, 0x0003,
-	0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c, 0x8001, 0x1df0,
-	0x080c, 0x2cff, 0x2001, 0x001e, 0x8001, 0x0240, 0x20a9, 0x0009,
-	0x080c, 0x2c19, 0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001, 0x0100,
-	0x080c, 0x2cef, 0x9006, 0x080c, 0x2cef, 0x080c, 0x9588, 0x080c,
-	0x968d, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60, 0x080c, 0xae61,
-	0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae, 0x0005,
-	0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110,
-	0x080c, 0x2cff, 0x00de, 0x00c6, 0x2061, 0x19e7, 0x6028, 0x080c,
-	0xd230, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018, 0x909a, 0x00c8,
-	0x1238, 0x8000, 0x602a, 0x00ce, 0x080c, 0xa24f, 0x0804, 0x273b,
-	0x2061, 0x0100, 0x62c0, 0x080c, 0xac5d, 0x2019, 0x19f0, 0x2304,
-	0x9065, 0x0120, 0x2009, 0x0027, 0x080c, 0xaedc, 0x00ce, 0x0804,
-	0x273b, 0xd2bc, 0x0904, 0x2722, 0x080c, 0x8586, 0x6014, 0x9084,
-	0x1984, 0x9085, 0x0010, 0x6016, 0x6027, 0x0004, 0x00d6, 0x2069,
-	0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2cff, 0x00de,
-	0x00c6, 0x2061, 0x19e7, 0x6044, 0x080c, 0xd230, 0x0120, 0x909a,
-	0x0003, 0x1658, 0x0018, 0x909a, 0x00c8, 0x1638, 0x8000, 0x6046,
-	0x603c, 0x00ce, 0x9005, 0x05b8, 0x2009, 0x07d0, 0x080c, 0x857e,
-	0x9080, 0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x6114, 0x918c,
-	0x1984, 0x918d, 0x0012, 0x6116, 0x0430, 0x9080, 0x0008, 0x2004,
-	0x9086, 0x0009, 0x0d98, 0x6114, 0x918c, 0x1984, 0x918d, 0x0016,
-	0x6116, 0x00c8, 0x6027, 0x0004, 0x00b0, 0x0036, 0x2019, 0x0001,
-	0x080c, 0xa5b6, 0x003e, 0x2019, 0x19f6, 0x2304, 0x9065, 0x0150,
-	0x2009, 0x004f, 0x6020, 0x9086, 0x0009, 0x1110, 0x2009, 0x004f,
-	0x080c, 0xaedc, 0x00ce, 0x001e, 0xd19c, 0x0904, 0x27aa, 0x7038,
-	0xd0ac, 0x1904, 0x2783, 0x0016, 0x0156, 0x6027, 0x0008, 0x6050,
-	0x9085, 0x0040, 0x6052, 0x6050, 0x9084, 0xfbcf, 0x6052, 0x080c,
-	0x2c38, 0x9085, 0x2000, 0x6052, 0x20a9, 0x0012, 0x1d04, 0x2756,
-	0x080c, 0x85ad, 0x1f04, 0x2756, 0x6050, 0x9085, 0x0400, 0x9084,
-	0xdfbf, 0x6052, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x2764, 0x6150,
-	0x9185, 0x1400, 0x6052, 0x20a9, 0x0366, 0x1d04, 0x276d, 0x080c,
-	0x85ad, 0x6020, 0xd09c, 0x1130, 0x015e, 0x6152, 0x001e, 0x6027,
-	0x0008, 0x0480, 0x080c, 0x2c00, 0x1f04, 0x276d, 0x015e, 0x6152,
-	0x001e, 0x6027, 0x0008, 0x0016, 0x6028, 0xc09c, 0x602a, 0x080c,
-	0xadd2, 0x60e3, 0x0000, 0x080c, 0xe9e9, 0x080c, 0xea04, 0x080c,
-	0x56d3, 0xd0fc, 0x1138, 0x080c, 0xd229, 0x1120, 0x9085, 0x0001,
-	0x080c, 0x7403, 0x9006, 0x080c, 0x2cef, 0x2009, 0x0002, 0x080c,
-	0x2c3e, 0x2001, 0x1800, 0x2003, 0x0004, 0x6027, 0x0008, 0x080c,
-	0x0bae, 0x001e, 0x918c, 0xffd0, 0x6126, 0x00ae, 0x0005, 0x0016,
-	0x2001, 0x188b, 0x200c, 0xd184, 0x001e, 0x0904, 0x255c, 0x0016,
-	0x2009, 0x27bb, 0x00d0, 0x2001, 0x188b, 0x200c, 0xc184, 0x2102,
-	0x001e, 0x0c40, 0x0016, 0x2001, 0x188b, 0x200c, 0xd194, 0x001e,
-	0x0904, 0x255c, 0x0016, 0x2009, 0x27ce, 0x0038, 0x2001, 0x188b,
-	0x200c, 0xc194, 0x2102, 0x001e, 0x08a8, 0x6028, 0xc0bc, 0x602a,
-	0x2001, 0x0156, 0x2003, 0xbc91, 0x8000, 0x2003, 0xffff, 0x6043,
-	0x0001, 0x080c, 0x2c38, 0x6027, 0x0080, 0x6017, 0x0000, 0x6043,
-	0x0000, 0x0817, 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x71d0, 0x70d2, 0x9116,
-	0x05e8, 0x81ff, 0x01a0, 0x2009, 0x0000, 0x080c, 0x2c3e, 0x2011,
-	0x8011, 0x2019, 0x010e, 0x231c, 0x939e, 0x0007, 0x1118, 0x2019,
-	0x0001, 0x0010, 0x2019, 0x0000, 0x080c, 0x4b04, 0x0438, 0x2001,
-	0x19a8, 0x200c, 0x81ff, 0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4,
-	0x0118, 0x2019, 0x0003, 0x0008, 0x2118, 0x2011, 0x8012, 0x080c,
-	0x4b04, 0x080c, 0x56d3, 0xd0fc, 0x1188, 0x080c, 0xd229, 0x1170,
-	0x00c6, 0x080c, 0x28d2, 0x080c, 0xa51d, 0x2061, 0x0100, 0x2019,
-	0x0028, 0x2009, 0x0002, 0x080c, 0x318a, 0x00ce, 0x012e, 0x00fe,
-	0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x2028, 0x918c,
-	0x00ff, 0x2130, 0x9094, 0xff00, 0x11f0, 0x2011, 0x1837, 0x2214,
-	0xd2ac, 0x11c8, 0x81ff, 0x01e8, 0x2011, 0x181f, 0x2204, 0x9106,
-	0x1190, 0x2011, 0x1820, 0x2214, 0x9294, 0xff00, 0x9584, 0xff00,
-	0x9206, 0x1148, 0x2011, 0x1820, 0x2214, 0x9294, 0x00ff, 0x9584,
-	0x00ff, 0x9206, 0x1120, 0x2500, 0x080c, 0x80be, 0x0048, 0x9584,
-	0x00ff, 0x9080, 0x3325, 0x200d, 0x918c, 0xff00, 0x810f, 0x9006,
-	0x0005, 0x9080, 0x3325, 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6,
-	0x2069, 0x0140, 0x2001, 0x1818, 0x2003, 0x00ef, 0x20a9, 0x0010,
-	0x9006, 0x6852, 0x6856, 0x1f04, 0x2882, 0x00de, 0x0005, 0x0006,
-	0x00d6, 0x0026, 0x2069, 0x0140, 0x2001, 0x1818, 0x2102, 0x8114,
-	0x8214, 0x8214, 0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006,
-	0x82ff, 0x1128, 0x9184, 0x000f, 0x9080, 0xf1b6, 0x2005, 0x6856,
-	0x8211, 0x1f04, 0x2897, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6,
-	0x2061, 0x1800, 0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032,
-	0x00ce, 0x0005, 0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069,
-	0x0140, 0x6980, 0x9116, 0x0180, 0x9112, 0x1230, 0x8212, 0x8210,
-	0x22a8, 0x2001, 0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e,
-	0x1f04, 0x28c7, 0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de,
-	0x015e, 0x0005, 0x080c, 0x56cf, 0xd0c4, 0x0150, 0xd0a4, 0x0140,
-	0x9006, 0x0046, 0x2020, 0x2009, 0x002e, 0x080c, 0xe5ae, 0x004e,
-	0x0005, 0x00f6, 0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc,
-	0x0904, 0x293e, 0x080c, 0x2b9d, 0x0660, 0x9084, 0x0700, 0x908e,
-	0x0600, 0x1120, 0x2011, 0x4000, 0x900e, 0x0458, 0x908e, 0x0500,
-	0x1120, 0x2011, 0x8000, 0x900e, 0x0420, 0x908e, 0x0400, 0x1120,
-	0x9016, 0x2009, 0x0001, 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016,
-	0x2009, 0x0002, 0x00b0, 0x908e, 0x0200, 0x1120, 0x9016, 0x2009,
-	0x0004, 0x0078, 0x908e, 0x0100, 0x1548, 0x9016, 0x2009, 0x0008,
-	0x0040, 0x9084, 0x0700, 0x908e, 0x0300, 0x1500, 0x2011, 0x0030,
-	0x0058, 0x2300, 0x9080, 0x0020, 0x2018, 0x080c, 0x8f68, 0x928c,
-	0xff00, 0x0110, 0x2011, 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c,
-	0x78c2, 0x2009, 0x0138, 0x220a, 0x080c, 0x73bc, 0x1118, 0x2009,
-	0x196d, 0x220a, 0x002e, 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000,
-	0x0cc8, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x2001,
-	0x0170, 0x200c, 0x8000, 0x2014, 0x9184, 0x0003, 0x0110, 0x080c,
-	0x0dce, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x2001, 0x0171,
-	0x2004, 0xd0dc, 0x0168, 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff,
-	0x918e, 0x004c, 0x1128, 0x200c, 0x918c, 0xff00, 0x810f, 0x0005,
-	0x900e, 0x2001, 0x0227, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004,
-	0x9108, 0x2001, 0x0226, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004,
-	0x9108, 0x0005, 0x0018, 0x000c, 0x0018, 0x0020, 0x1000, 0x0800,
-	0x1000, 0x1800, 0x0156, 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001,
-	0x1990, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0dd5, 0x0033, 0x00ee,
-	0x002e, 0x001e, 0x000e, 0x015e, 0x0005, 0x299c, 0x29ba, 0x29de,
-	0x29e0, 0x2a09, 0x2a0b, 0x2a0d, 0x2001, 0x0001, 0x080c, 0x27ea,
-	0x080c, 0x2bfb, 0x2001, 0x1992, 0x2003, 0x0000, 0x7828, 0x9084,
-	0xe1d7, 0x782a, 0x9006, 0x20a9, 0x0009, 0x080c, 0x2bb9, 0x2001,
-	0x1990, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2a0e, 0x080c,
-	0x858b, 0x0005, 0x2009, 0x1995, 0x200b, 0x0000, 0x2001, 0x199a,
-	0x2003, 0x0036, 0x2001, 0x1999, 0x2003, 0x002a, 0x2001, 0x1992,
-	0x2003, 0x0001, 0x9006, 0x080c, 0x2b6b, 0x2001, 0xffff, 0x20a9,
-	0x0009, 0x080c, 0x2bb9, 0x2001, 0x1990, 0x2003, 0x0006, 0x2009,
-	0x001e, 0x2011, 0x2a0e, 0x080c, 0x858b, 0x0005, 0x080c, 0x0dd5,
-	0x2001, 0x199a, 0x2003, 0x0036, 0x2001, 0x1992, 0x2003, 0x0003,
-	0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010,
-	0x2001, 0x0001, 0x080c, 0x2b6b, 0x2001, 0x1996, 0x2003, 0x0000,
-	0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x2bb9, 0x2001, 0x1990,
-	0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2a0e, 0x080c, 0x858b,
-	0x0005, 0x080c, 0x0dd5, 0x080c, 0x0dd5, 0x0005, 0x0006, 0x0016,
-	0x0026, 0x00e6, 0x00f6, 0x0156, 0x0126, 0x2091, 0x8000, 0x2079,
-	0x0100, 0x2001, 0x1992, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0dd5,
-	0x0043, 0x012e, 0x015e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e,
-	0x0005, 0x2a30, 0x2a50, 0x2a90, 0x2ac0, 0x2ae4, 0x2af4, 0x2af6,
-	0x080c, 0x2bad, 0x11b0, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009,
-	0x1998, 0x2104, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110,
-	0xc08d, 0x0008, 0xc085, 0x200a, 0x2001, 0x1990, 0x2003, 0x0001,
-	0x0030, 0x080c, 0x2b1a, 0x2001, 0xffff, 0x080c, 0x29ab, 0x0005,
-	0x080c, 0x2af8, 0x05e0, 0x2009, 0x1999, 0x2104, 0x8001, 0x200a,
-	0x080c, 0x2bad, 0x1178, 0x7850, 0x9084, 0xefff, 0x7852, 0x7a38,
-	0x9294, 0x0005, 0x9296, 0x0005, 0x0518, 0x2009, 0x1998, 0x2104,
-	0xc085, 0x200a, 0x2009, 0x1995, 0x2104, 0x8000, 0x200a, 0x9086,
-	0x0005, 0x0118, 0x080c, 0x2b00, 0x00c0, 0x200b, 0x0000, 0x7a38,
-	0x9294, 0x0006, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001,
-	0x0001, 0x080c, 0x2b88, 0x2001, 0x1992, 0x2003, 0x0002, 0x0028,
-	0x2001, 0x1990, 0x2003, 0x0003, 0x0010, 0x080c, 0x29cd, 0x0005,
-	0x080c, 0x2af8, 0x0560, 0x2009, 0x1999, 0x2104, 0x8001, 0x200a,
-	0x080c, 0x2bad, 0x1168, 0x7850, 0x9084, 0xefff, 0x7852, 0x2001,
-	0x1990, 0x2003, 0x0003, 0x2001, 0x1991, 0x2003, 0x0000, 0x00b8,
-	0x2009, 0x1999, 0x2104, 0x9005, 0x1118, 0x080c, 0x2b3d, 0x0010,
-	0x080c, 0x2b0d, 0x080c, 0x2b00, 0x2009, 0x1995, 0x200b, 0x0000,
-	0x2001, 0x1992, 0x2003, 0x0001, 0x080c, 0x29cd, 0x0000, 0x0005,
-	0x04b9, 0x0508, 0x080c, 0x2bad, 0x11b8, 0x7850, 0x9084, 0xefff,
-	0x7852, 0x2009, 0x1996, 0x2104, 0x8000, 0x200a, 0x9086, 0x0007,
-	0x0108, 0x0078, 0x2001, 0x199b, 0x2003, 0x000a, 0x2009, 0x1998,
-	0x2104, 0xc0fd, 0x200a, 0x0038, 0x0419, 0x2001, 0x1992, 0x2003,
-	0x0004, 0x080c, 0x29f8, 0x0005, 0x0099, 0x0168, 0x080c, 0x2bad,
-	0x1138, 0x7850, 0x9084, 0xefff, 0x7852, 0x080c, 0x29e4, 0x0018,
-	0x0079, 0x080c, 0x29f8, 0x0005, 0x080c, 0x0dd5, 0x080c, 0x0dd5,
-	0x2009, 0x199a, 0x2104, 0x8001, 0x200a, 0x090c, 0x2b59, 0x0005,
-	0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010,
-	0x2001, 0x0001, 0x080c, 0x2b88, 0x0005, 0x7a38, 0x9294, 0x0006,
-	0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x2b6b, 0x0005, 0x2009, 0x1995, 0x2104, 0x8000, 0x200a, 0x9086,
-	0x0005, 0x0108, 0x0068, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006,
-	0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x04d9,
-	0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010,
-	0x2001, 0x0001, 0x080c, 0x2b88, 0x0005, 0x0086, 0x2001, 0x1998,
-	0x2004, 0x9084, 0x7fff, 0x090c, 0x0dd5, 0x2009, 0x1997, 0x2144,
-	0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120,
-	0x080c, 0x0dd5, 0x9006, 0x0010, 0x2001, 0x0001, 0x00a1, 0x008e,
-	0x0005, 0x0006, 0x0156, 0x2001, 0x1990, 0x20a9, 0x0009, 0x2003,
-	0x0000, 0x8000, 0x1f04, 0x2b5f, 0x2001, 0x1997, 0x2003, 0x8000,
-	0x015e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000,
-	0x0158, 0x7838, 0x9084, 0xfff9, 0x9085, 0x0004, 0x783a, 0x2009,
-	0x199d, 0x210c, 0x795a, 0x0050, 0x7838, 0x9084, 0xfffb, 0x9085,
-	0x0006, 0x783a, 0x2009, 0x199e, 0x210c, 0x795a, 0x00fe, 0x0005,
-	0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0138, 0x7838, 0x9084,
-	0xfffa, 0x9085, 0x0004, 0x783a, 0x0030, 0x7838, 0x9084, 0xfffb,
-	0x9085, 0x0005, 0x783a, 0x00fe, 0x0005, 0x0006, 0x2001, 0x0100,
-	0x2004, 0x9082, 0x0007, 0x000e, 0x0005, 0x0006, 0x2001, 0x0100,
-	0x2004, 0x9082, 0x0009, 0x000e, 0x0005, 0x0156, 0x20a9, 0x0064,
-	0x7820, 0x080c, 0x2c38, 0xd09c, 0x1110, 0x1f04, 0x2bb0, 0x015e,
-	0x0005, 0x0126, 0x0016, 0x0006, 0x2091, 0x8000, 0x7850, 0x9085,
-	0x0040, 0x7852, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2c38,
-	0x9085, 0x2000, 0x7852, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118,
-	0x783b, 0x0007, 0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006,
-	0x0060, 0x9186, 0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186,
-	0x0003, 0x1118, 0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x2be6,
-	0x080c, 0x85ad, 0x1f04, 0x2be6, 0x7850, 0x9085, 0x0400, 0x9084,
-	0xdfbf, 0x7852, 0x080c, 0x2c38, 0x9085, 0x1000, 0x7852, 0x000e,
-	0x001e, 0x012e, 0x0005, 0x7850, 0x9084, 0xffcf, 0x7852, 0x0005,
-	0x0006, 0x0156, 0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854,
-	0xd0ac, 0x1130, 0x7820, 0xd0e4, 0x1140, 0x1f04, 0x2c0a, 0x0028,
-	0x7854, 0xd08c, 0x1110, 0x1f04, 0x2c10, 0x00fe, 0x015e, 0x000e,
-	0x0005, 0x1d04, 0x2c19, 0x080c, 0x85ad, 0x1f04, 0x2c19, 0x0005,
-	0x0006, 0x2001, 0x199c, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005,
-	0x0006, 0x2001, 0x199c, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005,
-	0x0006, 0x2001, 0x199c, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005,
-	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001,
-	0x19a8, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc,
-	0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001,
-	0x200a, 0x0005, 0x0036, 0x0046, 0x2001, 0x0141, 0x200c, 0x918c,
-	0xff00, 0x9186, 0x2000, 0x0118, 0x9186, 0x0100, 0x1588, 0x2009,
-	0x00a2, 0x080c, 0x0e51, 0x2019, 0x0160, 0x2324, 0x2011, 0x0003,
-	0x2009, 0x0169, 0x2104, 0x9084, 0x0007, 0x210c, 0x918c, 0x0007,
-	0x910e, 0x1db0, 0x9086, 0x0003, 0x11b8, 0x2304, 0x9402, 0x02a0,
-	0x1d60, 0x8211, 0x1d68, 0x84ff, 0x0170, 0x2001, 0x0141, 0x200c,
-	0x918c, 0xff00, 0x9186, 0x0100, 0x0130, 0x2009, 0x180c, 0x2104,
-	0xc0dd, 0x200a, 0x0008, 0x0419, 0x2009, 0x0000, 0x080c, 0x0e51,
-	0x004e, 0x003e, 0x0005, 0x2001, 0x180c, 0x2004, 0xd0dc, 0x01b0,
-	0x2001, 0x0160, 0x2004, 0x9005, 0x0140, 0x2001, 0x0141, 0x2004,
-	0x9084, 0xff00, 0x9086, 0x0100, 0x1148, 0x0126, 0x2091, 0x8000,
-	0x0016, 0x0026, 0x0021, 0x002e, 0x001e, 0x012e, 0x0005, 0x00c6,
-	0x2061, 0x0100, 0x6014, 0x0006, 0x2001, 0x0161, 0x2003, 0x0000,
-	0x6017, 0x0018, 0xa001, 0xa001, 0x602f, 0x0008, 0x6104, 0x918e,
-	0x0010, 0x6106, 0x918e, 0x0010, 0x6106, 0x6017, 0x0040, 0x04b9,
-	0x001e, 0x9184, 0x0003, 0x01e0, 0x0036, 0x0016, 0x2019, 0x0141,
-	0x6124, 0x918c, 0x0028, 0x1120, 0x2304, 0x9084, 0x2800, 0x0dc0,
-	0x001e, 0x919c, 0xffe4, 0x9184, 0x0001, 0x0118, 0x9385, 0x0009,
-	0x6016, 0x9184, 0x0002, 0x0118, 0x9385, 0x0012, 0x6016, 0x003e,
-	0x2001, 0x180c, 0x200c, 0xc1dc, 0x2102, 0x00ce, 0x0005, 0x0016,
-	0x0026, 0x080c, 0x73d6, 0x0108, 0xc0bc, 0x2009, 0x0140, 0x2114,
-	0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016,
-	0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9285, 0x1000,
-	0x200a, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x2009,
+	0x1a35, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b,
+	0x0002, 0x194c, 0x194a, 0x194a, 0x194a, 0x194a, 0x194a, 0x1950,
+	0x194a, 0x194a, 0x194a, 0x194a, 0x194a, 0x1954, 0x194a, 0x194a,
+	0x194a, 0x194a, 0x194a, 0x1958, 0x194a, 0x194a, 0x194a, 0x194a,
+	0x194a, 0x195c, 0x080c, 0x0dd5, 0xa774, 0xa678, 0x0804, 0x1a35,
+	0xa78c, 0xa690, 0x0804, 0x1a35, 0xa7a4, 0xa6a8, 0x0804, 0x1a35,
+	0xa7bc, 0xa6c0, 0x0804, 0x1a35, 0xa7d4, 0xa6d8, 0x0804, 0x1a35,
+	0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a, 0x0036,
+	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1988, 0x1988, 0x198a,
+	0x1988, 0x1988, 0x1988, 0x1994, 0x1988, 0x1988, 0x1988, 0x199e,
+	0x1988, 0x1988, 0x1988, 0x19a8, 0x1988, 0x1988, 0x1988, 0x19b2,
+	0x1988, 0x1988, 0x1988, 0x19bc, 0x1988, 0x1988, 0x1988, 0x19c6,
+	0x080c, 0x0dd5, 0xa574, 0xa478, 0x9d86, 0x0004, 0x0904, 0x1a35,
+	0xa37c, 0xa280, 0x0804, 0x1a35, 0xa584, 0xa488, 0x9d86, 0x0004,
+	0x0904, 0x1a35, 0xa38c, 0xa290, 0x0804, 0x1a35, 0xa594, 0xa498,
+	0x9d86, 0x0004, 0x0904, 0x1a35, 0xa39c, 0xa2a0, 0x0804, 0x1a35,
+	0xa5a4, 0xa4a8, 0x9d86, 0x0004, 0x0904, 0x1a35, 0xa3ac, 0xa2b0,
+	0x0804, 0x1a35, 0xa5b4, 0xa4b8, 0x9d86, 0x0004, 0x0904, 0x1a35,
+	0xa3bc, 0xa2c0, 0x0804, 0x1a35, 0xa5c4, 0xa4c8, 0x9d86, 0x0004,
+	0x0904, 0x1a35, 0xa3cc, 0xa2d0, 0x0804, 0x1a35, 0xa5d4, 0xa4d8,
+	0x9d86, 0x0004, 0x0904, 0x1a35, 0xa3dc, 0xa2e0, 0x0804, 0x1a35,
+	0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a, 0x0034,
+	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x19f8, 0x19f6, 0x19f6,
+	0x19f6, 0x19f6, 0x19f6, 0x1a02, 0x19f6, 0x19f6, 0x19f6, 0x19f6,
+	0x19f6, 0x1a0c, 0x19f6, 0x19f6, 0x19f6, 0x19f6, 0x19f6, 0x1a16,
+	0x19f6, 0x19f6, 0x19f6, 0x19f6, 0x19f6, 0x1a20, 0x080c, 0x0dd5,
+	0xa56c, 0xa470, 0xa774, 0xa678, 0x9d86, 0x000c, 0x05b0, 0xa37c,
+	0xa280, 0x0498, 0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86, 0x000c,
+	0x0560, 0xa394, 0xa298, 0x0448, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8,
+	0x9d86, 0x000c, 0x0510, 0xa3ac, 0xa2b0, 0x00f8, 0xa5b4, 0xa4b8,
+	0xa7bc, 0xa6c0, 0x9d86, 0x000c, 0x01c0, 0xa3c4, 0xa2c8, 0x00a8,
+	0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x000c, 0x0170, 0xa3dc,
+	0xa2e0, 0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x204a, 0x1904,
+	0x1909, 0x900e, 0x0050, 0x080c, 0x0dd5, 0xab2e, 0xaa32, 0xad1e,
+	0xac22, 0xaf26, 0xae2a, 0x080c, 0x204a, 0x0005, 0x6014, 0x2048,
+	0x6118, 0x810c, 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, 0x0001,
+	0x0008, 0xa986, 0x601b, 0x0002, 0xa974, 0xd1dc, 0x1108, 0x0005,
+	0xa934, 0xa88c, 0x9106, 0x1158, 0xa938, 0xa890, 0x9106, 0x1138,
+	0x601c, 0xc084, 0x601e, 0x2009, 0x0048, 0x0804, 0xaeec, 0x0005,
+	0x0126, 0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, 0x0007,
+	0x9186, 0x0000, 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, 0x6023,
+	0x0000, 0x0006, 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, 0x7808,
+	0xd09c, 0x0120, 0x080c, 0x1380, 0x8631, 0x1db8, 0x00ce, 0x781f,
+	0x0800, 0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, 0x1380,
+	0x00ce, 0x2001, 0x0038, 0x080c, 0x1b38, 0x7930, 0x9186, 0x0040,
+	0x0160, 0x9186, 0x0042, 0x190c, 0x0dd5, 0x2001, 0x001e, 0x8001,
+	0x1df0, 0x8631, 0x1d40, 0x080c, 0x1b47, 0x000e, 0x6022, 0x012e,
+	0x0005, 0x080c, 0x1b34, 0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8,
+	0x782b, 0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, 0x0000,
+	0x78ab, 0x0004, 0x00fe, 0x080c, 0x73a5, 0x11b0, 0x2001, 0x0138,
+	0x2003, 0x0000, 0x2001, 0x0160, 0x2003, 0x0000, 0x2011, 0x012c,
+	0xa001, 0xa001, 0x8211, 0x1de0, 0x0081, 0x0066, 0x2031, 0x0000,
+	0x080c, 0x7455, 0x006e, 0x0005, 0x0479, 0x0039, 0x2001, 0x0160,
+	0x2502, 0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, 0x0200,
+	0x080c, 0x2c46, 0x2009, 0x003c, 0x080c, 0x23d4, 0x2001, 0x015d,
+	0x2003, 0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, 0x83fd,
+	0x70a0, 0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001, 0x020d,
+	0x2003, 0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x1313, 0x7803,
+	0x0001, 0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003,
+	0x0000, 0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x73a5,
+	0x1108, 0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc,
+	0x1168, 0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160, 0x2001,
+	0x0111, 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, 0x015d,
+	0x2003, 0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003, 0x0048,
+	0xa001, 0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421, 0x1db0,
+	0x004e, 0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, 0x0005,
+	0x2c08, 0x621c, 0x080c, 0x15f0, 0x7930, 0x0005, 0x2c08, 0x621c,
+	0x080c, 0x169b, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, 0x2031,
+	0x0005, 0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038, 0x0c41,
+	0x9186, 0x0040, 0x0904, 0x1ba5, 0x2001, 0x001e, 0x0c69, 0x8631,
+	0x1d80, 0x080c, 0x0dd5, 0x781f, 0x0202, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x2001, 0x0b10, 0x0c01, 0x781c, 0xd084, 0x0110, 0x0861,
+	0x04e0, 0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568, 0x781c,
+	0xd084, 0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869, 0x2001,
+	0x0037, 0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030, 0x080c,
+	0x1b3e, 0x9186, 0x0040, 0x190c, 0x0dd5, 0x00d6, 0x2069, 0x0200,
+	0x692c, 0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800,
+	0x9085, 0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184, 0x0007,
+	0x1db0, 0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007, 0x090c,
+	0x0dd5, 0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126, 0x2091,
+	0x2400, 0x2071, 0x1a65, 0x2079, 0x0090, 0x012e, 0x0005, 0x9280,
+	0x0005, 0x2004, 0x2048, 0xa97c, 0xd1dc, 0x1904, 0x1c47, 0xa964,
+	0x9184, 0x0007, 0x0002, 0x1bc3, 0x1c32, 0x1bda, 0x1bdc, 0x1bda,
+	0x1c1a, 0x1bfa, 0x1be9, 0x918c, 0x00ff, 0x9186, 0x0008, 0x1170,
+	0xa87c, 0xd0b4, 0x0904, 0x1e71, 0x9006, 0xa842, 0xa83e, 0xa988,
+	0x2900, 0xa85a, 0xa813, 0x208d, 0x0804, 0x1c43, 0x9186, 0x0048,
+	0x0904, 0x1c32, 0x080c, 0x0dd5, 0x9184, 0x00ff, 0x9086, 0x0013,
+	0x0904, 0x1c32, 0x9184, 0x00ff, 0x9086, 0x001b, 0x0904, 0x1c32,
+	0x0c88, 0xa87c, 0xd0b4, 0x0904, 0x1e71, 0xa890, 0xa842, 0xa83a,
+	0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa988,
+	0x0804, 0x1c3a, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x19d0,
+	0xa87c, 0xd0b4, 0x0904, 0x1e71, 0xa890, 0xa842, 0xa83a, 0xa88c,
+	0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa804, 0xa85a,
+	0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x2092, 0x2005, 0xa812,
+	0xa988, 0x0448, 0x918c, 0x00ff, 0x9186, 0x0015, 0x1540, 0xa87c,
+	0xd0b4, 0x0904, 0x1e71, 0xa804, 0xa85a, 0x2040, 0xa064, 0x9084,
+	0x000f, 0x9080, 0x2092, 0x2005, 0xa812, 0xa988, 0x9006, 0xa842,
+	0xa83e, 0x0088, 0xa87c, 0xd0b4, 0x0904, 0x1e71, 0xa988, 0x9006,
+	0xa842, 0xa83e, 0x2900, 0xa85a, 0xa864, 0x9084, 0x000f, 0x9080,
+	0x2092, 0x2005, 0xa812, 0xa916, 0xa87c, 0xc0dd, 0xa87e, 0x0005,
+	0x00f6, 0x2079, 0x0090, 0x782c, 0xd0fc, 0x190c, 0x1eb6, 0x00e6,
+	0x2071, 0x1a65, 0x7000, 0x9005, 0x1904, 0x1cb0, 0x7206, 0x9280,
+	0x0005, 0x204c, 0x9280, 0x0004, 0x2004, 0x782b, 0x0004, 0x00f6,
+	0x2079, 0x0200, 0x7803, 0x0040, 0x00fe, 0x00b6, 0x2058, 0xb86c,
+	0x7836, 0xb890, 0x00be, 0x00f6, 0x2079, 0x0200, 0x7803, 0x0040,
+	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x781a, 0x2079,
+	0x0100, 0x8004, 0x78d6, 0x00fe, 0xa814, 0x2050, 0xa858, 0x2040,
+	0xa810, 0x2060, 0xa064, 0x90ec, 0x000f, 0xa944, 0x791a, 0x7116,
+	0xa848, 0x781e, 0x701a, 0x9006, 0x700e, 0x7012, 0x7004, 0xa940,
+	0xa838, 0x9106, 0x1500, 0xa93c, 0xa834, 0x9106, 0x11e0, 0x0006,
+	0x0016, 0xa938, 0xa834, 0x9105, 0x0118, 0x001e, 0x000e, 0x0098,
+	0x001e, 0x000e, 0x8aff, 0x01c8, 0x0126, 0x2091, 0x8000, 0x2009,
+	0x0306, 0x200b, 0x0808, 0x00d9, 0x0108, 0x00c9, 0x012e, 0x9006,
+	0x00ee, 0x00fe, 0x0005, 0x0036, 0x0046, 0xab38, 0xac34, 0x080c,
+	0x20b2, 0x004e, 0x003e, 0x0d30, 0x0c98, 0x9085, 0x0001, 0x0c80,
+	0x2009, 0x0306, 0x200b, 0x4800, 0x7027, 0x0000, 0x0005, 0x0076,
+	0x0066, 0x0056, 0x0046, 0x0036, 0x0026, 0x8aff, 0x0904, 0x1e6a,
+	0x700c, 0x7214, 0x923a, 0x7010, 0x7218, 0x9203, 0x0a04, 0x1e69,
+	0x9705, 0x0904, 0x1e69, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190,
+	0x2d00, 0x0002, 0x1df3, 0x1d32, 0x1d32, 0x1df3, 0x1df3, 0x1dd0,
+	0x1df3, 0x1d32, 0x1dd7, 0x1d81, 0x1d81, 0x1df3, 0x1df3, 0x1df3,
+	0x1dca, 0x1d81, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20,
+	0xdd9c, 0x0904, 0x1e00, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5,
+	0x9082, 0x001b, 0x0002, 0x1d1e, 0x1d1c, 0x1d1c, 0x1d1c, 0x1d1c,
+	0x1d1c, 0x1d22, 0x1d1c, 0x1d1c, 0x1d1c, 0x1d1c, 0x1d1c, 0x1d26,
+	0x1d1c, 0x1d1c, 0x1d1c, 0x1d1c, 0x1d1c, 0x1d2a, 0x1d1c, 0x1d1c,
+	0x1d1c, 0x1d1c, 0x1d1c, 0x1d2e, 0x080c, 0x0dd5, 0xa774, 0xa678,
+	0x0804, 0x1e00, 0xa78c, 0xa690, 0x0804, 0x1e00, 0xa7a4, 0xa6a8,
+	0x0804, 0x1e00, 0xa7bc, 0xa6c0, 0x0804, 0x1e00, 0xa7d4, 0xa6d8,
+	0x0804, 0x1e00, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082,
+	0x001b, 0x0002, 0x1d55, 0x1d55, 0x1d57, 0x1d55, 0x1d55, 0x1d55,
+	0x1d5d, 0x1d55, 0x1d55, 0x1d55, 0x1d63, 0x1d55, 0x1d55, 0x1d55,
+	0x1d69, 0x1d55, 0x1d55, 0x1d55, 0x1d6f, 0x1d55, 0x1d55, 0x1d55,
+	0x1d75, 0x1d55, 0x1d55, 0x1d55, 0x1d7b, 0x080c, 0x0dd5, 0xa574,
+	0xa478, 0xa37c, 0xa280, 0x0804, 0x1e00, 0xa584, 0xa488, 0xa38c,
+	0xa290, 0x0804, 0x1e00, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804,
+	0x1e00, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1e00, 0xa5b4,
+	0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x1e00, 0xa5c4, 0xa4c8, 0xa3cc,
+	0xa2d0, 0x0804, 0x1e00, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804,
+	0x1e00, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b,
+	0x0002, 0x1da4, 0x1da2, 0x1da2, 0x1da2, 0x1da2, 0x1da2, 0x1dac,
+	0x1da2, 0x1da2, 0x1da2, 0x1da2, 0x1da2, 0x1db4, 0x1da2, 0x1da2,
+	0x1da2, 0x1da2, 0x1da2, 0x1dbc, 0x1da2, 0x1da2, 0x1da2, 0x1da2,
+	0x1da2, 0x1dc3, 0x080c, 0x0dd5, 0xa56c, 0xa470, 0xa774, 0xa678,
+	0xa37c, 0xa280, 0x0804, 0x1e00, 0xa584, 0xa488, 0xa78c, 0xa690,
+	0xa394, 0xa298, 0x0804, 0x1e00, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8,
+	0xa3ac, 0xa2b0, 0x0804, 0x1e00, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0,
+	0xa3c4, 0xa2c8, 0x04e8, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc,
+	0xa2e0, 0x04b0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x1518,
+	0x080c, 0x204a, 0x1904, 0x1ccd, 0x900e, 0x0804, 0x1e6a, 0xab64,
+	0x939c, 0x00ff, 0x9386, 0x0048, 0x1180, 0x00c6, 0x7004, 0x2060,
+	0x6004, 0x9086, 0x0043, 0x00ce, 0x0904, 0x1d81, 0xab9c, 0x9016,
+	0xad8c, 0xac90, 0xaf94, 0xae98, 0x0098, 0x9386, 0x0008, 0x0904,
+	0x1d81, 0x080c, 0x0dd5, 0xa964, 0x918c, 0x00ff, 0x9186, 0x0013,
+	0x0904, 0x1d32, 0x9186, 0x001b, 0x0904, 0x1d81, 0x080c, 0x0dd5,
+	0x2009, 0x030f, 0x2104, 0xd0fc, 0x0530, 0x0066, 0x2009, 0x0306,
+	0x2104, 0x9084, 0x0030, 0x15c8, 0x2031, 0x1000, 0x200b, 0x4000,
+	0x2600, 0x9302, 0x928b, 0x0000, 0xa82e, 0xa932, 0x0278, 0x9105,
+	0x0168, 0x2011, 0x0000, 0x2618, 0x2600, 0x9500, 0xa81e, 0x9481,
+	0x0000, 0xa822, 0xa880, 0xc0fd, 0xa882, 0x0020, 0xa82f, 0x0000,
+	0xa833, 0x0000, 0x006e, 0x7b12, 0x7a16, 0x7d02, 0x7c06, 0x7f0a,
+	0x7e0e, 0x782b, 0x0001, 0x7000, 0x8000, 0x7002, 0xa83c, 0x9300,
+	0xa83e, 0xa840, 0x9201, 0xa842, 0x700c, 0x9300, 0x700e, 0x7010,
+	0x9201, 0x7012, 0x080c, 0x204a, 0x0428, 0x2031, 0x0080, 0x9584,
+	0x007f, 0x0108, 0x9632, 0x7124, 0x7000, 0x9086, 0x0000, 0x1198,
+	0xc185, 0x7126, 0x2009, 0x0306, 0x2104, 0xd0b4, 0x1904, 0x1e10,
+	0x200b, 0x4040, 0x2009, 0x1a7e, 0x2104, 0x8000, 0x0a04, 0x1e10,
+	0x200a, 0x0804, 0x1e10, 0xc18d, 0x7126, 0xd184, 0x1d58, 0x0804,
+	0x1e10, 0x9006, 0x002e, 0x003e, 0x004e, 0x005e, 0x006e, 0x007e,
+	0x0005, 0x080c, 0x0dd5, 0x0026, 0x2001, 0x0105, 0x2003, 0x0010,
+	0x782b, 0x0004, 0x7003, 0x0000, 0x7004, 0x0016, 0x080c, 0x1cc0,
+	0x001e, 0x2060, 0x6014, 0x2048, 0x080c, 0xcb4a, 0x0118, 0xa880,
+	0xc0bd, 0xa882, 0x6020, 0x9086, 0x0006, 0x1180, 0x2061, 0x0100,
+	0x62c8, 0x2001, 0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0,
+	0x60c4, 0xa89a, 0x60c8, 0xa896, 0x7004, 0x2060, 0x00c6, 0x080c,
+	0xc77b, 0x00ce, 0x2001, 0x19f5, 0x2004, 0x9c06, 0x1160, 0x2009,
+	0x0040, 0x080c, 0x23d4, 0x080c, 0xa7cd, 0x2011, 0x0000, 0x080c,
+	0xa65e, 0x080c, 0x97b5, 0x002e, 0x0804, 0x1ffa, 0x0126, 0x2091,
+	0x2400, 0xa858, 0x2040, 0x792c, 0x782b, 0x0002, 0x9184, 0x0700,
+	0x1904, 0x1e73, 0x7000, 0x0002, 0x1ffa, 0x1ec8, 0x1f48, 0x1ff8,
+	0x8001, 0x7002, 0x7027, 0x0000, 0xd19c, 0x1158, 0x8aff, 0x0904,
+	0x1f15, 0x080c, 0x1cc7, 0x0904, 0x1ffa, 0x080c, 0x1cc7, 0x0804,
+	0x1ffa, 0x782b, 0x0004, 0xd194, 0x0148, 0xa880, 0xc0fc, 0xa882,
+	0x8aff, 0x1518, 0xa87c, 0xc0f5, 0xa87e, 0x00f8, 0x0026, 0x0036,
+	0xab3c, 0xaa40, 0x0016, 0x7910, 0xa82c, 0x9100, 0xa82e, 0x7914,
+	0xa830, 0x9101, 0xa832, 0x001e, 0x7810, 0x931a, 0x7814, 0x9213,
+	0x7800, 0xa81e, 0x7804, 0xa822, 0xab3e, 0xaa42, 0x003e, 0x002e,
+	0x080c, 0x2065, 0xa880, 0xc0fd, 0xa882, 0x2a00, 0xa816, 0x2800,
+	0xa85a, 0x2c00, 0xa812, 0x7003, 0x0000, 0x2009, 0x0306, 0x200b,
+	0x4800, 0x7027, 0x0000, 0x0804, 0x1ffa, 0x00f6, 0x0026, 0x781c,
+	0x0006, 0x7818, 0x0006, 0x2079, 0x0100, 0x7a14, 0x9284, 0x1984,
+	0x9085, 0x0012, 0x7816, 0x0036, 0x2019, 0x1000, 0x8319, 0x090c,
+	0x0dd5, 0x7820, 0xd0bc, 0x1dd0, 0x003e, 0x79c8, 0x000e, 0x9102,
+	0x001e, 0x0006, 0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e,
+	0x78ca, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x002e, 0x00fe,
+	0x782b, 0x0008, 0x7003, 0x0000, 0x080c, 0x1cc0, 0x0804, 0x1ffa,
+	0x8001, 0x7002, 0x7024, 0x8004, 0x7026, 0xd194, 0x0170, 0x782c,
+	0xd0fc, 0x1904, 0x1ebb, 0xd19c, 0x1904, 0x1ff6, 0x8aff, 0x0904,
+	0x1ffa, 0x080c, 0x1cc7, 0x0804, 0x1ffa, 0x0026, 0x0036, 0xab3c,
+	0xaa40, 0x080c, 0x2065, 0xdd9c, 0x1904, 0x1fb5, 0x2c05, 0x908a,
+	0x0036, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1f89, 0x1f89,
+	0x1f8b, 0x1f89, 0x1f89, 0x1f89, 0x1f91, 0x1f89, 0x1f89, 0x1f89,
+	0x1f97, 0x1f89, 0x1f89, 0x1f89, 0x1f9d, 0x1f89, 0x1f89, 0x1f89,
+	0x1fa3, 0x1f89, 0x1f89, 0x1f89, 0x1fa9, 0x1f89, 0x1f89, 0x1f89,
+	0x1faf, 0x080c, 0x0dd5, 0xa07c, 0x931a, 0xa080, 0x9213, 0x0804,
+	0x1eea, 0xa08c, 0x931a, 0xa090, 0x9213, 0x0804, 0x1eea, 0xa09c,
+	0x931a, 0xa0a0, 0x9213, 0x0804, 0x1eea, 0xa0ac, 0x931a, 0xa0b0,
+	0x9213, 0x0804, 0x1eea, 0xa0bc, 0x931a, 0xa0c0, 0x9213, 0x0804,
+	0x1eea, 0xa0cc, 0x931a, 0xa0d0, 0x9213, 0x0804, 0x1eea, 0xa0dc,
+	0x931a, 0xa0e0, 0x9213, 0x0804, 0x1eea, 0x2c05, 0x908a, 0x0034,
+	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1fd8, 0x1fd6, 0x1fd6,
+	0x1fd6, 0x1fd6, 0x1fd6, 0x1fde, 0x1fd6, 0x1fd6, 0x1fd6, 0x1fd6,
+	0x1fd6, 0x1fe4, 0x1fd6, 0x1fd6, 0x1fd6, 0x1fd6, 0x1fd6, 0x1fea,
+	0x1fd6, 0x1fd6, 0x1fd6, 0x1fd6, 0x1fd6, 0x1ff0, 0x080c, 0x0dd5,
+	0xa07c, 0x931a, 0xa080, 0x9213, 0x0804, 0x1eea, 0xa094, 0x931a,
+	0xa098, 0x9213, 0x0804, 0x1eea, 0xa0ac, 0x931a, 0xa0b0, 0x9213,
+	0x0804, 0x1eea, 0xa0c4, 0x931a, 0xa0c8, 0x9213, 0x0804, 0x1eea,
+	0xa0dc, 0x931a, 0xa0e0, 0x9213, 0x0804, 0x1eea, 0x0804, 0x1ee6,
+	0x080c, 0x0dd5, 0x012e, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a65,
+	0x7000, 0x9086, 0x0000, 0x0904, 0x2045, 0x2079, 0x0090, 0x2009,
+	0x0207, 0x210c, 0xd194, 0x01b8, 0x2009, 0x020c, 0x210c, 0x9184,
+	0x0003, 0x0188, 0x080c, 0xea2b, 0x2001, 0x0133, 0x2004, 0x9005,
+	0x090c, 0x0dd5, 0x0016, 0x2009, 0x0040, 0x080c, 0x23d4, 0x001e,
+	0x2001, 0x020c, 0x2102, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203,
+	0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x23d4, 0x782c,
+	0xd0fc, 0x09a8, 0x080c, 0x1eb6, 0x7000, 0x9086, 0x0000, 0x1978,
+	0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c,
+	0x23d4, 0x782b, 0x0002, 0x7003, 0x0000, 0x080c, 0x1cc0, 0x00ee,
+	0x00fe, 0x0005, 0xa880, 0xd0fc, 0x11a8, 0x8c60, 0x2c05, 0x9005,
+	0x0110, 0x8a51, 0x0005, 0xa004, 0x9005, 0x0168, 0xa85a, 0x2040,
+	0xa064, 0x9084, 0x000f, 0x9080, 0x2092, 0x2065, 0x8cff, 0x090c,
+	0x0dd5, 0x8a51, 0x0005, 0x2050, 0x0005, 0xa880, 0xd0fc, 0x11b8,
+	0x8a50, 0x8c61, 0x2c05, 0x9005, 0x1190, 0x2800, 0x9906, 0x0120,
+	0xa000, 0x9005, 0x1108, 0x2900, 0x2040, 0xa85a, 0xa064, 0x9084,
+	0x000f, 0x9080, 0x20a2, 0x2065, 0x8cff, 0x090c, 0x0dd5, 0x0005,
+	0x0000, 0x001d, 0x0021, 0x0025, 0x0029, 0x002d, 0x0031, 0x0035,
+	0x0000, 0x001b, 0x0021, 0x0027, 0x002d, 0x0033, 0x0000, 0x0000,
+	0x0023, 0x0000, 0x0000, 0x2085, 0x2081, 0x2085, 0x2085, 0x208f,
+	0x0000, 0x2085, 0x208c, 0x208c, 0x2089, 0x208c, 0x208c, 0x0000,
+	0x208f, 0x208c, 0x0000, 0x2087, 0x2087, 0x0000, 0x2087, 0x208f,
+	0x0000, 0x2087, 0x208d, 0x208d, 0x208d, 0x0000, 0x208d, 0x0000,
+	0x208f, 0x208d, 0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888,
+	0x9055, 0x0904, 0x2291, 0x2940, 0xa064, 0x90ec, 0x000f, 0x9084,
+	0x00ff, 0x9086, 0x0008, 0x1118, 0x2061, 0x208d, 0x00d0, 0x9de0,
+	0x2092, 0x9d86, 0x0007, 0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86,
+	0x000f, 0x1120, 0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05, 0x9065,
+	0x1140, 0x0310, 0x0804, 0x2291, 0xa004, 0x9045, 0x0904, 0x2291,
+	0x08d8, 0x2c05, 0x9005, 0x0904, 0x2179, 0xdd9c, 0x1904, 0x2135,
+	0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x210a,
+	0x210a, 0x210c, 0x210a, 0x210a, 0x210a, 0x2112, 0x210a, 0x210a,
+	0x210a, 0x2118, 0x210a, 0x210a, 0x210a, 0x211e, 0x210a, 0x210a,
+	0x210a, 0x2124, 0x210a, 0x210a, 0x210a, 0x212a, 0x210a, 0x210a,
+	0x210a, 0x2130, 0x080c, 0x0dd5, 0xa07c, 0x9422, 0xa080, 0x931b,
+	0x0804, 0x216f, 0xa08c, 0x9422, 0xa090, 0x931b, 0x0804, 0x216f,
+	0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804, 0x216f, 0xa0ac, 0x9422,
+	0xa0b0, 0x931b, 0x0804, 0x216f, 0xa0bc, 0x9422, 0xa0c0, 0x931b,
+	0x0804, 0x216f, 0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804, 0x216f,
+	0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c,
+	0x0dd5, 0x9082, 0x001b, 0x0002, 0x2157, 0x2155, 0x2155, 0x2155,
+	0x2155, 0x2155, 0x215c, 0x2155, 0x2155, 0x2155, 0x2155, 0x2155,
+	0x2161, 0x2155, 0x2155, 0x2155, 0x2155, 0x2155, 0x2166, 0x2155,
+	0x2155, 0x2155, 0x2155, 0x2155, 0x216b, 0x080c, 0x0dd5, 0xa07c,
+	0x9422, 0xa080, 0x931b, 0x0098, 0xa094, 0x9422, 0xa098, 0x931b,
+	0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422,
+	0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630,
+	0x2300, 0x9405, 0x0160, 0x8a51, 0x0904, 0x2291, 0x8c60, 0x0804,
+	0x20e1, 0xa004, 0x9045, 0x0904, 0x2291, 0x0804, 0x20bc, 0x8a51,
+	0x0904, 0x2291, 0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004, 0x9045,
+	0x0904, 0x2291, 0xa064, 0x90ec, 0x000f, 0x9de0, 0x2092, 0x2c05,
+	0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804, 0x2286, 0x2c05, 0x8422,
+	0x8420, 0x831a, 0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904,
+	0x2223, 0x9082, 0x001b, 0x0002, 0x21bf, 0x21bf, 0x21c1, 0x21bf,
+	0x21bf, 0x21bf, 0x21cf, 0x21bf, 0x21bf, 0x21bf, 0x21dd, 0x21bf,
+	0x21bf, 0x21bf, 0x21eb, 0x21bf, 0x21bf, 0x21bf, 0x21f9, 0x21bf,
+	0x21bf, 0x21bf, 0x2207, 0x21bf, 0x21bf, 0x21bf, 0x2215, 0x080c,
+	0x0dd5, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c,
+	0x0dd5, 0xa074, 0x9420, 0xa078, 0x9319, 0x0804, 0x2281, 0xa18c,
+	0x2400, 0x9122, 0xa190, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa084,
+	0x9420, 0xa088, 0x9319, 0x0804, 0x2281, 0xa19c, 0x2400, 0x9122,
+	0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa094, 0x9420, 0xa098,
+	0x9319, 0x0804, 0x2281, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300,
+	0x911b, 0x0a0c, 0x0dd5, 0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804,
+	0x2281, 0xa1bc, 0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c,
+	0x0dd5, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0804, 0x2281, 0xa1cc,
+	0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0c4,
+	0x9420, 0xa0c8, 0x9319, 0x0804, 0x2281, 0xa1dc, 0x2400, 0x9122,
+	0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0d4, 0x9420, 0xa0d8,
+	0x9319, 0x0804, 0x2281, 0x9082, 0x001b, 0x0002, 0x2241, 0x223f,
+	0x223f, 0x223f, 0x223f, 0x223f, 0x224e, 0x223f, 0x223f, 0x223f,
+	0x223f, 0x223f, 0x225b, 0x223f, 0x223f, 0x223f, 0x223f, 0x223f,
+	0x2268, 0x223f, 0x223f, 0x223f, 0x223f, 0x223f, 0x2275, 0x080c,
+	0x0dd5, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c,
+	0x0dd5, 0xa06c, 0x9420, 0xa070, 0x9319, 0x0498, 0xa194, 0x2400,
+	0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa084, 0x9420,
+	0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300,
+	0x911b, 0x0a0c, 0x0dd5, 0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8,
+	0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0dd5,
+	0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122,
+	0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0cc, 0x9420, 0xa0d0,
+	0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a,
+	0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e, 0x000e, 0x000e, 0x9006,
+	0x0028, 0x008e, 0x00de, 0x00ce, 0x9085, 0x0001, 0x0005, 0x2001,
+	0x0005, 0x2004, 0xd0bc, 0x190c, 0x0dce, 0x9084, 0x0007, 0x0002,
+	0x22b2, 0x1eb6, 0x22b2, 0x22a8, 0x22ab, 0x22ae, 0x22ab, 0x22ae,
+	0x080c, 0x1eb6, 0x0005, 0x080c, 0x11a3, 0x0005, 0x080c, 0x1eb6,
+	0x080c, 0x11a3, 0x0005, 0x0126, 0x2091, 0x2600, 0x2079, 0x0200,
+	0x2071, 0x0260, 0x2069, 0x1800, 0x7817, 0x0000, 0x789b, 0x0814,
+	0x78a3, 0x0406, 0x789f, 0x0410, 0x2009, 0x013b, 0x200b, 0x0400,
+	0x781b, 0x0002, 0x783b, 0x001f, 0x7837, 0x0020, 0x7803, 0x1600,
+	0x012e, 0x0005, 0x2091, 0x2600, 0x781c, 0xd0a4, 0x190c, 0x23d1,
+	0x7900, 0xd1dc, 0x1118, 0x9084, 0x0006, 0x001a, 0x9084, 0x000e,
+	0x0002, 0x22f9, 0x22f1, 0x7d86, 0x22f1, 0x22f3, 0x22f3, 0x22f3,
+	0x22f3, 0x7d6c, 0x22f1, 0x22f5, 0x22f1, 0x22f3, 0x22f1, 0x22f3,
+	0x22f1, 0x080c, 0x0dd5, 0x0031, 0x0020, 0x080c, 0x7d6c, 0x080c,
+	0x7d86, 0x0005, 0x0006, 0x0016, 0x0026, 0x080c, 0xea2b, 0x7930,
+	0x9184, 0x0003, 0x01c0, 0x2001, 0x19f5, 0x2004, 0x9005, 0x0170,
+	0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0dd5, 0x00c6, 0x2001,
+	0x19f5, 0x2064, 0x080c, 0xc77b, 0x00ce, 0x00f8, 0x2009, 0x0040,
+	0x080c, 0x23d4, 0x00d0, 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286,
+	0x0003, 0x0160, 0x080c, 0x73a5, 0x1138, 0x080c, 0x768d, 0x080c,
+	0x6023, 0x080c, 0x72d7, 0x0010, 0x080c, 0x5ee2, 0x080c, 0x7e35,
+	0x0041, 0x0018, 0x9184, 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e,
+	0x0005, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a61, 0x080c,
+	0x1aab, 0x005e, 0x004e, 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091,
+	0x2e00, 0x2071, 0x1800, 0x7128, 0x2001, 0x196e, 0x2102, 0x2001,
+	0x1976, 0x2102, 0x2001, 0x013b, 0x2102, 0x2079, 0x0200, 0x2001,
+	0x0201, 0x789e, 0x78a3, 0x0200, 0x9198, 0x0007, 0x831c, 0x831c,
+	0x831c, 0x9398, 0x0005, 0x2320, 0x9182, 0x0204, 0x1230, 0x2011,
+	0x0008, 0x8423, 0x8423, 0x8423, 0x0488, 0x9182, 0x024c, 0x1240,
+	0x2011, 0x0007, 0x8403, 0x8003, 0x9400, 0x9400, 0x9420, 0x0430,
+	0x9182, 0x02bc, 0x1238, 0x2011, 0x0006, 0x8403, 0x8003, 0x9400,
+	0x9420, 0x00e0, 0x9182, 0x034c, 0x1230, 0x2011, 0x0005, 0x8403,
+	0x8003, 0x9420, 0x0098, 0x9182, 0x042c, 0x1228, 0x2011, 0x0004,
+	0x8423, 0x8423, 0x0058, 0x9182, 0x059c, 0x1228, 0x2011, 0x0003,
+	0x8403, 0x9420, 0x0018, 0x2011, 0x0002, 0x8423, 0x9482, 0x0228,
+	0x8002, 0x8020, 0x8301, 0x9402, 0x0110, 0x0208, 0x8321, 0x8217,
+	0x8203, 0x9405, 0x789a, 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069,
+	0x0200, 0x6814, 0x9084, 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e,
+	0x0005, 0x00d6, 0x2069, 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5,
+	0x0008, 0xc0a4, 0x6812, 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069,
+	0x0200, 0x6810, 0x9084, 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e,
+	0x0005, 0x7938, 0x080c, 0x0dce, 0x00f6, 0x2079, 0x0200, 0x7902,
+	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x7902, 0xa001,
+	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126,
+	0x2091, 0x2800, 0x2061, 0x0100, 0x2071, 0x1800, 0x2009, 0x0000,
+	0x080c, 0x2c40, 0x080c, 0x2b5b, 0x6054, 0x8004, 0x8004, 0x8004,
+	0x8004, 0x9084, 0x000c, 0x6150, 0x918c, 0xfff3, 0x9105, 0x6052,
+	0x6050, 0x9084, 0xb17f, 0x9085, 0x2000, 0x6052, 0x2009, 0x199c,
+	0x2011, 0x199d, 0x6358, 0x939c, 0x38f0, 0x2320, 0x080c, 0x2b9f,
+	0x1238, 0x939d, 0x4003, 0x94a5, 0x8603, 0x230a, 0x2412, 0x0030,
+	0x939d, 0x0203, 0x94a5, 0x8603, 0x230a, 0x2412, 0x9006, 0x080c,
+	0x2b8a, 0x9006, 0x080c, 0x2b6d, 0x20a9, 0x0012, 0x1d04, 0x2426,
+	0x2091, 0x6000, 0x1f04, 0x2426, 0x602f, 0x0100, 0x602f, 0x0000,
+	0x6050, 0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x6024, 0x6026,
+	0x080c, 0x2879, 0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x2889,
+	0x60e7, 0x0000, 0x61ea, 0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043,
+	0x0000, 0x602f, 0x0080, 0x602f, 0x0000, 0x6007, 0x349f, 0x60bb,
+	0x0000, 0x20a9, 0x0018, 0x60bf, 0x0000, 0x1f04, 0x2453, 0x60bb,
+	0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x60bf, 0x0405, 0x60bf,
+	0x0014, 0x60bf, 0x0320, 0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f,
+	0x001e, 0x600f, 0x006b, 0x602b, 0x402f, 0x012e, 0x0005, 0x00f6,
+	0x2079, 0x0140, 0x78c3, 0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000,
+	0x00fe, 0x0005, 0x2001, 0x1835, 0x2003, 0x0000, 0x2001, 0x1834,
+	0x2003, 0x0001, 0x0005, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016,
+	0x0026, 0x6124, 0x0066, 0x2031, 0x1837, 0x2634, 0x96b4, 0x0028,
+	0x006e, 0x1138, 0x6020, 0xd1bc, 0x0120, 0xd0bc, 0x1168, 0xd0b4,
+	0x1198, 0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, 0x00aa, 0x9195,
+	0x0004, 0x9284, 0x0007, 0x0082, 0x0016, 0x2001, 0x188b, 0x200c,
+	0xd184, 0x001e, 0x0d70, 0x0c98, 0x0016, 0x2001, 0x188b, 0x200c,
+	0xd194, 0x001e, 0x0d30, 0x0c58, 0x24d6, 0x24bc, 0x24bf, 0x24c2,
+	0x24c7, 0x24c9, 0x24cd, 0x24d1, 0x080c, 0x8fbe, 0x00b8, 0x080c,
+	0x908b, 0x00a0, 0x080c, 0x908b, 0x080c, 0x8fbe, 0x0078, 0x0099,
+	0x0068, 0x080c, 0x8fbe, 0x0079, 0x0048, 0x080c, 0x908b, 0x0059,
+	0x0028, 0x080c, 0x908b, 0x080c, 0x8fbe, 0x0029, 0x002e, 0x001e,
+	0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c, 0x0118,
+	0xd19c, 0x1904, 0x273e, 0xd1f4, 0x190c, 0x0dce, 0x080c, 0x73a5,
+	0x0904, 0x2531, 0x080c, 0xd24a, 0x1120, 0x7000, 0x9086, 0x0003,
+	0x0570, 0x6024, 0x9084, 0x1800, 0x0550, 0x080c, 0x73c8, 0x0118,
+	0x080c, 0x73b6, 0x1520, 0x6027, 0x0020, 0x6043, 0x0000, 0x080c,
+	0xd24a, 0x0168, 0x080c, 0x73c8, 0x1150, 0x2001, 0x19a6, 0x2003,
+	0x0001, 0x6027, 0x1800, 0x080c, 0x723b, 0x0804, 0x2741, 0x70a4,
+	0x9005, 0x1150, 0x70a7, 0x0001, 0x00d6, 0x2069, 0x0140, 0x080c,
+	0x73fc, 0x00de, 0x1904, 0x2741, 0x080c, 0x7697, 0x0428, 0x080c,
+	0x73c8, 0x1590, 0x6024, 0x9084, 0x1800, 0x1108, 0x0468, 0x080c,
+	0x7697, 0x080c, 0x768d, 0x080c, 0x6023, 0x080c, 0x72d7, 0x0804,
+	0x273e, 0xd1ac, 0x1508, 0x6024, 0xd0dc, 0x1170, 0xd0e4, 0x1178,
+	0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7098, 0x9086, 0x0028, 0x1110,
+	0x080c, 0x757a, 0x0804, 0x273e, 0x080c, 0x7692, 0x0048, 0x2001,
+	0x197c, 0x2003, 0x0002, 0x0020, 0x080c, 0x74df, 0x0804, 0x273e,
+	0x080c, 0x7615, 0x0804, 0x273e, 0x6220, 0xd1bc, 0x0138, 0xd2bc,
+	0x1904, 0x27b1, 0xd2b4, 0x1904, 0x27c4, 0x0000, 0xd1ac, 0x0904,
+	0x2653, 0x0036, 0x6328, 0xc3bc, 0x632a, 0x003e, 0x080c, 0x73a5,
+	0x11c0, 0x6027, 0x0020, 0x0006, 0x0026, 0x0036, 0x080c, 0x73bf,
+	0x1158, 0x080c, 0x768d, 0x080c, 0x6023, 0x080c, 0x72d7, 0x003e,
+	0x002e, 0x000e, 0x00ae, 0x0005, 0x003e, 0x002e, 0x000e, 0x080c,
+	0x737d, 0x0016, 0x0046, 0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138,
+	0x2061, 0x0100, 0x644a, 0x6043, 0x0090, 0x6043, 0x0010, 0x74da,
+	0x948c, 0xff00, 0x7038, 0xd084, 0x0178, 0x9186, 0xf800, 0x1160,
+	0x7048, 0xd084, 0x1148, 0xc085, 0x704a, 0x0036, 0x2418, 0x2011,
+	0x8016, 0x080c, 0x4b14, 0x003e, 0x080c, 0xd243, 0x1904, 0x2630,
+	0x9196, 0xff00, 0x05a8, 0x7060, 0x9084, 0x00ff, 0x810f, 0x81ff,
+	0x0110, 0x9116, 0x0568, 0x7130, 0xd184, 0x1550, 0x080c, 0x331b,
+	0x0128, 0xc18d, 0x7132, 0x080c, 0x6973, 0x1510, 0x6240, 0x9294,
+	0x0010, 0x0130, 0x6248, 0x9294, 0xff00, 0x9296, 0xff00, 0x01c0,
+	0x7030, 0xd08c, 0x0904, 0x2630, 0x7038, 0xd08c, 0x1140, 0x2001,
+	0x180c, 0x200c, 0xd1ac, 0x1904, 0x2630, 0xc1ad, 0x2102, 0x0036,
+	0x73d8, 0x2011, 0x8013, 0x080c, 0x4b14, 0x003e, 0x0804, 0x2630,
+	0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904,
+	0x2630, 0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011, 0x8013, 0x080c,
+	0x4b14, 0x003e, 0x7130, 0xc185, 0x7132, 0x2011, 0x1848, 0x220c,
+	0xd1a4, 0x01f0, 0x0016, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c,
+	0x86c6, 0x2019, 0x000e, 0x00c6, 0x2061, 0x0000, 0x080c, 0xe543,
+	0x00ce, 0x9484, 0x00ff, 0x9080, 0x3327, 0x200d, 0x918c, 0xff00,
+	0x810f, 0x2120, 0x9006, 0x2009, 0x000e, 0x080c, 0xe5cf, 0x001e,
+	0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x318c, 0x001e,
+	0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x6608,
+	0x1110, 0x080c, 0x603d, 0x8108, 0x1f04, 0x2626, 0x00be, 0x015e,
+	0x00ce, 0x004e, 0x080c, 0xade2, 0x60e3, 0x0000, 0x001e, 0x2001,
+	0x1800, 0x2014, 0x9296, 0x0004, 0x1170, 0xd19c, 0x11a0, 0x2011,
+	0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, 0x9295, 0x0002, 0x6206,
+	0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001, 0x1826, 0x2003,
+	0x0000, 0x6027, 0x0020, 0xd194, 0x0904, 0x273e, 0x0016, 0x6220,
+	0xd2b4, 0x0904, 0x26db, 0x080c, 0x8562, 0x080c, 0xa274, 0x6027,
+	0x0004, 0x00f6, 0x2019, 0x19ef, 0x2304, 0x907d, 0x0904, 0x26aa,
+	0x7804, 0x9086, 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096,
+	0x2069, 0x0140, 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002,
+	0x2001, 0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c,
+	0x8001, 0x1df0, 0x080c, 0x2d01, 0x2001, 0x001e, 0x8001, 0x0240,
+	0x20a9, 0x0009, 0x080c, 0x2c1b, 0x6904, 0xd1dc, 0x1140, 0x0cb0,
+	0x2001, 0x0100, 0x080c, 0x2cf1, 0x9006, 0x080c, 0x2cf1, 0x080c,
+	0x957b, 0x080c, 0x9687, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60,
+	0x080c, 0xae71, 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e,
+	0x00ae, 0x0005, 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084,
+	0x4000, 0x0110, 0x080c, 0x2d01, 0x00de, 0x00c6, 0x2061, 0x19e6,
+	0x6028, 0x080c, 0xd24a, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018,
+	0x909a, 0x00c8, 0x1238, 0x8000, 0x602a, 0x00ce, 0x080c, 0xa250,
+	0x0804, 0x273d, 0x2061, 0x0100, 0x62c0, 0x080c, 0xac68, 0x2019,
+	0x19ef, 0x2304, 0x9065, 0x0120, 0x2009, 0x0027, 0x080c, 0xaeec,
+	0x00ce, 0x0804, 0x273d, 0xd2bc, 0x0904, 0x2724, 0x080c, 0x856f,
+	0x6014, 0x9084, 0x1984, 0x9085, 0x0010, 0x6016, 0x6027, 0x0004,
+	0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c,
+	0x2d01, 0x00de, 0x00c6, 0x2061, 0x19e6, 0x6044, 0x080c, 0xd24a,
+	0x0120, 0x909a, 0x0003, 0x1658, 0x0018, 0x909a, 0x00c8, 0x1638,
+	0x8000, 0x6046, 0x603c, 0x00ce, 0x9005, 0x05b8, 0x2009, 0x07d0,
+	0x080c, 0x8567, 0x9080, 0x0008, 0x2004, 0x9086, 0x0006, 0x1138,
+	0x6114, 0x918c, 0x1984, 0x918d, 0x0012, 0x6116, 0x0430, 0x9080,
+	0x0008, 0x2004, 0x9086, 0x0009, 0x0d98, 0x6114, 0x918c, 0x1984,
+	0x918d, 0x0016, 0x6116, 0x00c8, 0x6027, 0x0004, 0x00b0, 0x0036,
+	0x2019, 0x0001, 0x080c, 0xa5b7, 0x003e, 0x2019, 0x19f5, 0x2304,
+	0x9065, 0x0150, 0x2009, 0x004f, 0x6020, 0x9086, 0x0009, 0x1110,
+	0x2009, 0x004f, 0x080c, 0xaeec, 0x00ce, 0x001e, 0xd19c, 0x0904,
+	0x27ac, 0x7038, 0xd0ac, 0x1904, 0x2785, 0x0016, 0x0156, 0x6027,
+	0x0008, 0x6050, 0x9085, 0x0040, 0x6052, 0x6050, 0x9084, 0xfbcf,
+	0x6052, 0x080c, 0x2c3a, 0x9085, 0x2000, 0x6052, 0x20a9, 0x0012,
+	0x1d04, 0x2758, 0x080c, 0x8596, 0x1f04, 0x2758, 0x6050, 0x9085,
+	0x0400, 0x9084, 0xdfbf, 0x6052, 0x20a9, 0x0028, 0xa001, 0x1f04,
+	0x2766, 0x6150, 0x9185, 0x1400, 0x6052, 0x20a9, 0x0366, 0x1d04,
+	0x276f, 0x080c, 0x8596, 0x6020, 0xd09c, 0x1130, 0x015e, 0x6152,
+	0x001e, 0x6027, 0x0008, 0x0480, 0x080c, 0x2c02, 0x1f04, 0x276f,
+	0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x0016, 0x6028, 0xc09c,
+	0x602a, 0x080c, 0xade2, 0x60e3, 0x0000, 0x080c, 0xea0a, 0x080c,
+	0xea25, 0x080c, 0x56dc, 0xd0fc, 0x1138, 0x080c, 0xd243, 0x1120,
+	0x9085, 0x0001, 0x080c, 0x73ec, 0x9006, 0x080c, 0x2cf1, 0x2009,
+	0x0002, 0x080c, 0x2c40, 0x2001, 0x1800, 0x2003, 0x0004, 0x6027,
+	0x0008, 0x080c, 0x0bae, 0x001e, 0x918c, 0xffd0, 0x6126, 0x00ae,
+	0x0005, 0x0016, 0x2001, 0x188b, 0x200c, 0xd184, 0x001e, 0x0904,
+	0x255e, 0x0016, 0x2009, 0x27bd, 0x00d0, 0x2001, 0x188b, 0x200c,
+	0xc184, 0x2102, 0x001e, 0x0c40, 0x0016, 0x2001, 0x188b, 0x200c,
+	0xd194, 0x001e, 0x0904, 0x255e, 0x0016, 0x2009, 0x27d0, 0x0038,
+	0x2001, 0x188b, 0x200c, 0xc194, 0x2102, 0x001e, 0x08a8, 0x6028,
+	0xc0bc, 0x602a, 0x2001, 0x0156, 0x2003, 0xbc91, 0x8000, 0x2003,
+	0xffff, 0x6043, 0x0001, 0x080c, 0x2c3a, 0x6027, 0x0080, 0x6017,
+	0x0000, 0x6043, 0x0000, 0x0817, 0x0006, 0x0016, 0x0026, 0x0036,
+	0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x71d0,
+	0x70d2, 0x9116, 0x05e8, 0x81ff, 0x01a0, 0x2009, 0x0000, 0x080c,
+	0x2c40, 0x2011, 0x8011, 0x2019, 0x010e, 0x231c, 0x939e, 0x0007,
+	0x1118, 0x2019, 0x0001, 0x0010, 0x2019, 0x0000, 0x080c, 0x4b14,
+	0x0438, 0x2001, 0x19a7, 0x200c, 0x81ff, 0x1140, 0x2001, 0x0109,
+	0x2004, 0xd0b4, 0x0118, 0x2019, 0x0003, 0x0008, 0x2118, 0x2011,
+	0x8012, 0x080c, 0x4b14, 0x080c, 0x56dc, 0xd0fc, 0x1188, 0x080c,
+	0xd243, 0x1170, 0x00c6, 0x080c, 0x28d4, 0x080c, 0xa51e, 0x2061,
+	0x0100, 0x2019, 0x0028, 0x2009, 0x0002, 0x080c, 0x318c, 0x00ce,
+	0x012e, 0x00fe, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005,
+	0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x11f0, 0x2011,
+	0x1837, 0x2214, 0xd2ac, 0x11c8, 0x81ff, 0x01e8, 0x2011, 0x181f,
+	0x2204, 0x9106, 0x1190, 0x2011, 0x1820, 0x2214, 0x9294, 0xff00,
+	0x9584, 0xff00, 0x9206, 0x1148, 0x2011, 0x1820, 0x2214, 0x9294,
+	0x00ff, 0x9584, 0x00ff, 0x9206, 0x1120, 0x2500, 0x080c, 0x80a7,
+	0x0048, 0x9584, 0x00ff, 0x9080, 0x3327, 0x200d, 0x918c, 0xff00,
+	0x810f, 0x9006, 0x0005, 0x9080, 0x3327, 0x200d, 0x918c, 0x00ff,
+	0x0005, 0x00d6, 0x2069, 0x0140, 0x2001, 0x1818, 0x2003, 0x00ef,
+	0x20a9, 0x0010, 0x9006, 0x6852, 0x6856, 0x1f04, 0x2884, 0x00de,
+	0x0005, 0x0006, 0x00d6, 0x0026, 0x2069, 0x0140, 0x2001, 0x1818,
+	0x2102, 0x8114, 0x8214, 0x8214, 0x8214, 0x20a9, 0x0010, 0x6853,
+	0x0000, 0x9006, 0x82ff, 0x1128, 0x9184, 0x000f, 0x9080, 0xf1d7,
+	0x2005, 0x6856, 0x8211, 0x1f04, 0x2899, 0x002e, 0x00de, 0x000e,
+	0x0005, 0x00c6, 0x2061, 0x1800, 0x6030, 0x0110, 0xc09d, 0x0008,
+	0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156, 0x00d6, 0x0026, 0x0016,
+	0x0006, 0x2069, 0x0140, 0x6980, 0x9116, 0x0180, 0x9112, 0x1230,
+	0x8212, 0x8210, 0x22a8, 0x2001, 0x0402, 0x0018, 0x22a8, 0x2001,
+	0x0404, 0x680e, 0x1f04, 0x28c9, 0x680f, 0x0000, 0x000e, 0x001e,
+	0x002e, 0x00de, 0x015e, 0x0005, 0x080c, 0x56d8, 0xd0c4, 0x0150,
+	0xd0a4, 0x0140, 0x9006, 0x0046, 0x2020, 0x2009, 0x002e, 0x080c,
+	0xe5cf, 0x004e, 0x0005, 0x00f6, 0x0016, 0x0026, 0x2079, 0x0140,
+	0x78c4, 0xd0dc, 0x0904, 0x2940, 0x080c, 0x2b9f, 0x0660, 0x9084,
+	0x0700, 0x908e, 0x0600, 0x1120, 0x2011, 0x4000, 0x900e, 0x0458,
+	0x908e, 0x0500, 0x1120, 0x2011, 0x8000, 0x900e, 0x0420, 0x908e,
+	0x0400, 0x1120, 0x9016, 0x2009, 0x0001, 0x00e8, 0x908e, 0x0300,
+	0x1120, 0x9016, 0x2009, 0x0002, 0x00b0, 0x908e, 0x0200, 0x1120,
+	0x9016, 0x2009, 0x0004, 0x0078, 0x908e, 0x0100, 0x1548, 0x9016,
+	0x2009, 0x0008, 0x0040, 0x9084, 0x0700, 0x908e, 0x0300, 0x1500,
+	0x2011, 0x0030, 0x0058, 0x2300, 0x9080, 0x0020, 0x2018, 0x080c,
+	0x8f51, 0x928c, 0xff00, 0x0110, 0x2011, 0x00ff, 0x2200, 0x8007,
+	0x9085, 0x004c, 0x78c2, 0x2009, 0x0138, 0x220a, 0x080c, 0x73a5,
+	0x1118, 0x2009, 0x196c, 0x220a, 0x002e, 0x001e, 0x00fe, 0x0005,
+	0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016,
+	0x0026, 0x2001, 0x0170, 0x200c, 0x8000, 0x2014, 0x9184, 0x0003,
+	0x0110, 0x080c, 0x0dce, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005,
+	0x2001, 0x0171, 0x2004, 0xd0dc, 0x0168, 0x2001, 0x0170, 0x200c,
+	0x918c, 0x00ff, 0x918e, 0x004c, 0x1128, 0x200c, 0x918c, 0xff00,
+	0x810f, 0x0005, 0x900e, 0x2001, 0x0227, 0x2004, 0x8007, 0x9084,
+	0x00ff, 0x8004, 0x9108, 0x2001, 0x0226, 0x2004, 0x8007, 0x9084,
+	0x00ff, 0x8004, 0x9108, 0x0005, 0x0018, 0x000c, 0x0018, 0x0020,
+	0x1000, 0x0800, 0x1000, 0x1800, 0x0156, 0x0006, 0x0016, 0x0026,
+	0x00e6, 0x2001, 0x198f, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0dd5,
+	0x0033, 0x00ee, 0x002e, 0x001e, 0x000e, 0x015e, 0x0005, 0x299e,
+	0x29bc, 0x29e0, 0x29e2, 0x2a0b, 0x2a0d, 0x2a0f, 0x2001, 0x0001,
+	0x080c, 0x27ec, 0x080c, 0x2bfd, 0x2001, 0x1991, 0x2003, 0x0000,
+	0x7828, 0x9084, 0xe1d7, 0x782a, 0x9006, 0x20a9, 0x0009, 0x080c,
+	0x2bbb, 0x2001, 0x198f, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011,
+	0x2a10, 0x080c, 0x8574, 0x0005, 0x2009, 0x1994, 0x200b, 0x0000,
+	0x2001, 0x1999, 0x2003, 0x0036, 0x2001, 0x1998, 0x2003, 0x002a,
+	0x2001, 0x1991, 0x2003, 0x0001, 0x9006, 0x080c, 0x2b6d, 0x2001,
+	0xffff, 0x20a9, 0x0009, 0x080c, 0x2bbb, 0x2001, 0x198f, 0x2003,
+	0x0006, 0x2009, 0x001e, 0x2011, 0x2a10, 0x080c, 0x8574, 0x0005,
+	0x080c, 0x0dd5, 0x2001, 0x1999, 0x2003, 0x0036, 0x2001, 0x1991,
+	0x2003, 0x0003, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110,
+	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2b6d, 0x2001, 0x1995,
+	0x2003, 0x0000, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x2bbb,
+	0x2001, 0x198f, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2a10,
+	0x080c, 0x8574, 0x0005, 0x080c, 0x0dd5, 0x080c, 0x0dd5, 0x0005,
+	0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6, 0x0156, 0x0126, 0x2091,
+	0x8000, 0x2079, 0x0100, 0x2001, 0x1991, 0x2004, 0x908a, 0x0007,
+	0x1a0c, 0x0dd5, 0x0043, 0x012e, 0x015e, 0x00fe, 0x00ee, 0x002e,
+	0x001e, 0x000e, 0x0005, 0x2a32, 0x2a52, 0x2a92, 0x2ac2, 0x2ae6,
+	0x2af6, 0x2af8, 0x080c, 0x2baf, 0x11b0, 0x7850, 0x9084, 0xefff,
+	0x7852, 0x2009, 0x1997, 0x2104, 0x7a38, 0x9294, 0x0005, 0x9296,
+	0x0004, 0x0110, 0xc08d, 0x0008, 0xc085, 0x200a, 0x2001, 0x198f,
+	0x2003, 0x0001, 0x0030, 0x080c, 0x2b1c, 0x2001, 0xffff, 0x080c,
+	0x29ad, 0x0005, 0x080c, 0x2afa, 0x05e0, 0x2009, 0x1998, 0x2104,
+	0x8001, 0x200a, 0x080c, 0x2baf, 0x1178, 0x7850, 0x9084, 0xefff,
+	0x7852, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0518, 0x2009,
+	0x1997, 0x2104, 0xc085, 0x200a, 0x2009, 0x1994, 0x2104, 0x8000,
+	0x200a, 0x9086, 0x0005, 0x0118, 0x080c, 0x2b02, 0x00c0, 0x200b,
+	0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0004, 0x0110, 0x9006,
+	0x0010, 0x2001, 0x0001, 0x080c, 0x2b8a, 0x2001, 0x1991, 0x2003,
+	0x0002, 0x0028, 0x2001, 0x198f, 0x2003, 0x0003, 0x0010, 0x080c,
+	0x29cf, 0x0005, 0x080c, 0x2afa, 0x0560, 0x2009, 0x1998, 0x2104,
+	0x8001, 0x200a, 0x080c, 0x2baf, 0x1168, 0x7850, 0x9084, 0xefff,
+	0x7852, 0x2001, 0x198f, 0x2003, 0x0003, 0x2001, 0x1990, 0x2003,
+	0x0000, 0x00b8, 0x2009, 0x1998, 0x2104, 0x9005, 0x1118, 0x080c,
+	0x2b3f, 0x0010, 0x080c, 0x2b0f, 0x080c, 0x2b02, 0x2009, 0x1994,
+	0x200b, 0x0000, 0x2001, 0x1991, 0x2003, 0x0001, 0x080c, 0x29cf,
+	0x0000, 0x0005, 0x04b9, 0x0508, 0x080c, 0x2baf, 0x11b8, 0x7850,
+	0x9084, 0xefff, 0x7852, 0x2009, 0x1995, 0x2104, 0x8000, 0x200a,
+	0x9086, 0x0007, 0x0108, 0x0078, 0x2001, 0x199a, 0x2003, 0x000a,
+	0x2009, 0x1997, 0x2104, 0xc0fd, 0x200a, 0x0038, 0x0419, 0x2001,
+	0x1991, 0x2003, 0x0004, 0x080c, 0x29fa, 0x0005, 0x0099, 0x0168,
+	0x080c, 0x2baf, 0x1138, 0x7850, 0x9084, 0xefff, 0x7852, 0x080c,
+	0x29e6, 0x0018, 0x0079, 0x080c, 0x29fa, 0x0005, 0x080c, 0x0dd5,
+	0x080c, 0x0dd5, 0x2009, 0x1999, 0x2104, 0x8001, 0x200a, 0x090c,
+	0x2b5b, 0x0005, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110,
+	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2b8a, 0x0005, 0x7a38,
+	0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x080c, 0x2b6d, 0x0005, 0x2009, 0x1994, 0x2104, 0x8000,
+	0x200a, 0x9086, 0x0005, 0x0108, 0x0068, 0x200b, 0x0000, 0x7a38,
+	0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x04d9, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110,
+	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2b8a, 0x0005, 0x0086,
+	0x2001, 0x1997, 0x2004, 0x9084, 0x7fff, 0x090c, 0x0dd5, 0x2009,
+	0x1996, 0x2144, 0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120,
+	0xd084, 0x1120, 0x080c, 0x0dd5, 0x9006, 0x0010, 0x2001, 0x0001,
+	0x00a1, 0x008e, 0x0005, 0x0006, 0x0156, 0x2001, 0x198f, 0x20a9,
+	0x0009, 0x2003, 0x0000, 0x8000, 0x1f04, 0x2b61, 0x2001, 0x1996,
+	0x2003, 0x8000, 0x015e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0100,
+	0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfff9, 0x9085, 0x0004,
+	0x783a, 0x2009, 0x199c, 0x210c, 0x795a, 0x0050, 0x7838, 0x9084,
+	0xfffb, 0x9085, 0x0006, 0x783a, 0x2009, 0x199d, 0x210c, 0x795a,
+	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0138,
+	0x7838, 0x9084, 0xfffa, 0x9085, 0x0004, 0x783a, 0x0030, 0x7838,
+	0x9084, 0xfffb, 0x9085, 0x0005, 0x783a, 0x00fe, 0x0005, 0x0006,
+	0x2001, 0x0100, 0x2004, 0x9082, 0x0007, 0x000e, 0x0005, 0x0006,
+	0x2001, 0x0100, 0x2004, 0x9082, 0x0009, 0x000e, 0x0005, 0x0156,
+	0x20a9, 0x0064, 0x7820, 0x080c, 0x2c3a, 0xd09c, 0x1110, 0x1f04,
+	0x2bb2, 0x015e, 0x0005, 0x0126, 0x0016, 0x0006, 0x2091, 0x8000,
+	0x7850, 0x9085, 0x0040, 0x7852, 0x7850, 0x9084, 0xfbcf, 0x7852,
+	0x080c, 0x2c3a, 0x9085, 0x2000, 0x7852, 0x000e, 0x2008, 0x9186,
+	0x0000, 0x1118, 0x783b, 0x0007, 0x0090, 0x9186, 0x0001, 0x1118,
+	0x783b, 0x0006, 0x0060, 0x9186, 0x0002, 0x1118, 0x783b, 0x0005,
+	0x0030, 0x9186, 0x0003, 0x1118, 0x783b, 0x0004, 0x0000, 0x0006,
+	0x1d04, 0x2be8, 0x080c, 0x8596, 0x1f04, 0x2be8, 0x7850, 0x9085,
+	0x0400, 0x9084, 0xdfbf, 0x7852, 0x080c, 0x2c3a, 0x9085, 0x1000,
+	0x7852, 0x000e, 0x001e, 0x012e, 0x0005, 0x7850, 0x9084, 0xffcf,
+	0x7852, 0x0005, 0x0006, 0x0156, 0x00f6, 0x2079, 0x0100, 0x20a9,
+	0x000a, 0x7854, 0xd0ac, 0x1130, 0x7820, 0xd0e4, 0x1140, 0x1f04,
+	0x2c0c, 0x0028, 0x7854, 0xd08c, 0x1110, 0x1f04, 0x2c12, 0x00fe,
+	0x015e, 0x000e, 0x0005, 0x1d04, 0x2c1b, 0x080c, 0x8596, 0x1f04,
+	0x2c1b, 0x0005, 0x0006, 0x2001, 0x199b, 0x2004, 0x9086, 0x0000,
+	0x000e, 0x0005, 0x0006, 0x2001, 0x199b, 0x2004, 0x9086, 0x0001,
+	0x000e, 0x0005, 0x0006, 0x2001, 0x199b, 0x2004, 0x9086, 0x0002,
+	0x000e, 0x0005, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005,
+	0x0006, 0x2001, 0x19a7, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171,
+	0x2104, 0xd0dc, 0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080,
+	0xa001, 0xa001, 0x200a, 0x0005, 0x0036, 0x0046, 0x2001, 0x0141,
+	0x200c, 0x918c, 0xff00, 0x9186, 0x2000, 0x0118, 0x9186, 0x0100,
+	0x1588, 0x2009, 0x00a2, 0x080c, 0x0e51, 0x2019, 0x0160, 0x2324,
+	0x2011, 0x0003, 0x2009, 0x0169, 0x2104, 0x9084, 0x0007, 0x210c,
+	0x918c, 0x0007, 0x910e, 0x1db0, 0x9086, 0x0003, 0x11b8, 0x2304,
+	0x9402, 0x02a0, 0x1d60, 0x8211, 0x1d68, 0x84ff, 0x0170, 0x2001,
+	0x0141, 0x200c, 0x918c, 0xff00, 0x9186, 0x0100, 0x0130, 0x2009,
+	0x180c, 0x2104, 0xc0dd, 0x200a, 0x0008, 0x0419, 0x2009, 0x0000,
+	0x080c, 0x0e51, 0x004e, 0x003e, 0x0005, 0x2001, 0x180c, 0x2004,
+	0xd0dc, 0x01b0, 0x2001, 0x0160, 0x2004, 0x9005, 0x0140, 0x2001,
+	0x0141, 0x2004, 0x9084, 0xff00, 0x9086, 0x0100, 0x1148, 0x0126,
+	0x2091, 0x8000, 0x0016, 0x0026, 0x0021, 0x002e, 0x001e, 0x012e,
+	0x0005, 0x00c6, 0x2061, 0x0100, 0x6014, 0x0006, 0x2001, 0x0161,
+	0x2003, 0x0000, 0x6017, 0x0018, 0xa001, 0xa001, 0x602f, 0x0008,
+	0x6104, 0x918e, 0x0010, 0x6106, 0x918e, 0x0010, 0x6106, 0x6017,
+	0x0040, 0x04b9, 0x001e, 0x9184, 0x0003, 0x01e0, 0x0036, 0x0016,
+	0x2019, 0x0141, 0x6124, 0x918c, 0x0028, 0x1120, 0x2304, 0x9084,
+	0x2800, 0x0dc0, 0x001e, 0x919c, 0xffe4, 0x9184, 0x0001, 0x0118,
+	0x9385, 0x0009, 0x6016, 0x9184, 0x0002, 0x0118, 0x9385, 0x0012,
+	0x6016, 0x003e, 0x2001, 0x180c, 0x200c, 0xc1dc, 0x2102, 0x00ce,
+	0x0005, 0x0016, 0x0026, 0x080c, 0x73bf, 0x0108, 0xc0bc, 0x2009,
 	0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e,
-	0x0005, 0x0006, 0x0016, 0x2009, 0x0140, 0x2104, 0x1128, 0x080c,
-	0x73d6, 0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a, 0x001e, 0x000e,
-	0x0005, 0x2f95, 0x2f95, 0x2db9, 0x2db9, 0x2dc5, 0x2dc5, 0x2dd1,
-	0x2dd1, 0x2ddf, 0x2ddf, 0x2deb, 0x2deb, 0x2df9, 0x2df9, 0x2e07,
-	0x2e07, 0x2e19, 0x2e19, 0x2e25, 0x2e25, 0x2e33, 0x2e33, 0x2e51,
-	0x2e51, 0x2e71, 0x2e71, 0x2e41, 0x2e41, 0x2e61, 0x2e61, 0x2e7f,
-	0x2e7f, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x2e91, 0x2e91, 0x2e9d, 0x2e9d, 0x2eab, 0x2eab, 0x2eb9,
-	0x2eb9, 0x2ec9, 0x2ec9, 0x2ed7, 0x2ed7, 0x2ee7, 0x2ee7, 0x2ef7,
-	0x2ef7, 0x2f09, 0x2f09, 0x2f17, 0x2f17, 0x2f27, 0x2f27, 0x2f49,
-	0x2f49, 0x2f6b, 0x2f6b, 0x2f37, 0x2f37, 0x2f5a, 0x2f5a, 0x2f7a,
-	0x2f7a, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17, 0x2e17,
-	0x2e17, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2481, 0x0804, 0x2f8d, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2295, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2295, 0x080c, 0x2481, 0x0804, 0x2f8d, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x22d0, 0x0804, 0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2481, 0x080c, 0x22d0, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2295, 0x080c, 0x22d0, 0x0804, 0x2f8d, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2295, 0x080c, 0x2481, 0x080c, 0x22d0, 0x0804, 0x2f8d, 0xa001,
-	0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x1380, 0x0804, 0x2f8d, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2481, 0x080c,
-	0x1380, 0x0804, 0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2295, 0x080c, 0x1380, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2481, 0x080c, 0x1380, 0x080c, 0x22d0, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2295, 0x080c, 0x2481, 0x080c, 0x1380, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2295, 0x080c, 0x1380, 0x080c, 0x22d0, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x1380, 0x080c, 0x22d0, 0x0804, 0x2f8d, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2295, 0x080c, 0x2481, 0x080c, 0x1380, 0x080c, 0x22d0, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2941, 0x0804, 0x2f8d, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2941, 0x080c,
-	0x2481, 0x0804, 0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2941, 0x080c, 0x2295, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2941, 0x080c, 0x2295, 0x080c, 0x2481, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2941, 0x080c, 0x22d0, 0x0804, 0x2f8d, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2941, 0x080c, 0x2481, 0x080c, 0x22d0, 0x0804, 0x2f8d, 0x0106,
+	0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001,
+	0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016,
+	0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a,
+	0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140, 0x2104,
+	0x1128, 0x080c, 0x73bf, 0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a,
+	0x001e, 0x000e, 0x0005, 0x2f97, 0x2f97, 0x2dbb, 0x2dbb, 0x2dc7,
+	0x2dc7, 0x2dd3, 0x2dd3, 0x2de1, 0x2de1, 0x2ded, 0x2ded, 0x2dfb,
+	0x2dfb, 0x2e09, 0x2e09, 0x2e1b, 0x2e1b, 0x2e27, 0x2e27, 0x2e35,
+	0x2e35, 0x2e53, 0x2e53, 0x2e73, 0x2e73, 0x2e43, 0x2e43, 0x2e63,
+	0x2e63, 0x2e81, 0x2e81, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x2e93, 0x2e93, 0x2e9f, 0x2e9f, 0x2ead,
+	0x2ead, 0x2ebb, 0x2ebb, 0x2ecb, 0x2ecb, 0x2ed9, 0x2ed9, 0x2ee9,
+	0x2ee9, 0x2ef9, 0x2ef9, 0x2f0b, 0x2f0b, 0x2f19, 0x2f19, 0x2f29,
+	0x2f29, 0x2f4b, 0x2f4b, 0x2f6d, 0x2f6d, 0x2f39, 0x2f39, 0x2f5c,
+	0x2f5c, 0x2f7c, 0x2f7c, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19, 0x2e19,
+	0x2e19, 0x2e19, 0x2e19, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2483, 0x0804, 0x2f8f, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2941, 0x080c, 0x2295, 0x080c, 0x22d0, 0x0804, 0x2f8d, 0x0106,
+	0x2297, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2297, 0x080c, 0x2483, 0x0804,
+	0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x22d2, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2483, 0x080c,
+	0x22d2, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2297, 0x080c, 0x22d2, 0x0804,
+	0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2297, 0x080c, 0x2483, 0x080c, 0x22d2, 0x0804,
+	0x2f8f, 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x1380, 0x0804, 0x2f8f, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2941, 0x080c, 0x2295, 0x080c, 0x2481, 0x080c, 0x22d0, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2941, 0x080c, 0x1380, 0x0804, 0x2f8d, 0x0106,
+	0x2483, 0x080c, 0x1380, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2297, 0x080c,
+	0x1380, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2483, 0x080c, 0x1380, 0x080c,
+	0x22d2, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2297, 0x080c, 0x2483, 0x080c,
+	0x1380, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2297, 0x080c, 0x1380, 0x080c,
+	0x22d2, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x1380, 0x080c, 0x22d2, 0x0804,
+	0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2297, 0x080c, 0x2483, 0x080c, 0x1380, 0x080c,
+	0x22d2, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2943, 0x0804, 0x2f8f, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2941, 0x080c, 0x2481, 0x080c, 0x1380, 0x0804, 0x2f8d, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2941, 0x080c, 0x2295, 0x080c, 0x1380, 0x0804, 0x2f8d, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2941, 0x080c, 0x2481, 0x080c, 0x1380, 0x080c, 0x22d0, 0x0804,
-	0x2f8d, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2941, 0x080c, 0x2295, 0x080c, 0x2481, 0x080c,
-	0x1380, 0x0498, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2941, 0x080c, 0x2295, 0x080c, 0x1380,
-	0x080c, 0x22d0, 0x0410, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2941, 0x080c, 0x1380, 0x080c,
-	0x22d0, 0x0098, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2941, 0x080c, 0x2295, 0x080c, 0x2481,
-	0x080c, 0x1380, 0x080c, 0x22d0, 0x0000, 0x015e, 0x014e, 0x013e,
-	0x01de, 0x01ce, 0x012e, 0x000e, 0x010e, 0x000d, 0x00b6, 0x00c6,
-	0x0026, 0x0046, 0x9026, 0x080c, 0x6930, 0x1904, 0x30a6, 0x72dc,
-	0x2001, 0x197c, 0x2004, 0x9005, 0x1110, 0xd29c, 0x0148, 0xd284,
-	0x1138, 0xd2bc, 0x1904, 0x30a6, 0x080c, 0x30ab, 0x0804, 0x30a6,
-	0xd2cc, 0x1904, 0x30a6, 0x080c, 0x73bc, 0x1120, 0x70af, 0xffff,
-	0x0804, 0x30a6, 0xd294, 0x0120, 0x70af, 0xffff, 0x0804, 0x30a6,
-	0x080c, 0x3314, 0x0160, 0x080c, 0xd230, 0x0128, 0x2001, 0x1818,
-	0x203c, 0x0804, 0x3033, 0x70af, 0xffff, 0x0804, 0x30a6, 0x2001,
-	0x1818, 0x203c, 0x7294, 0xd284, 0x0904, 0x3033, 0xd28c, 0x1904,
-	0x3033, 0x0036, 0x73ac, 0x938e, 0xffff, 0x1110, 0x2019, 0x0001,
-	0x8314, 0x92e0, 0x1c80, 0x2c04, 0x938c, 0x0001, 0x0120, 0x9084,
-	0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x970e, 0x05d0, 0x908e,
-	0x0000, 0x05b8, 0x908e, 0x00ff, 0x1150, 0x7230, 0xd284, 0x15b0,
-	0x7294, 0xc28d, 0x7296, 0x70af, 0xffff, 0x003e, 0x04a0, 0x900e,
-	0x080c, 0x283e, 0x080c, 0x659e, 0x1538, 0x9006, 0xb8bb, 0x0520,
-	0xb8ac, 0x9005, 0x0148, 0x00c6, 0x2060, 0x080c, 0x8981, 0x00ce,
-	0x090c, 0x8d25, 0xb8af, 0x0000, 0x080c, 0x6972, 0x1168, 0x7030,
-	0xd08c, 0x0130, 0xb800, 0xd0bc, 0x0138, 0x080c, 0x681f, 0x0120,
-	0x080c, 0x30c4, 0x0148, 0x0028, 0x080c, 0x3204, 0x080c, 0x30f0,
-	0x0118, 0x8318, 0x0804, 0x2fe0, 0x73ae, 0x0010, 0x70af, 0xffff,
-	0x003e, 0x0804, 0x30a6, 0x9780, 0x3325, 0x203d, 0x97bc, 0xff00,
-	0x873f, 0x2041, 0x007e, 0x70ac, 0x9096, 0xffff, 0x1118, 0x900e,
-	0x28a8, 0x0050, 0x9812, 0x0220, 0x2008, 0x9802, 0x20a8, 0x0020,
-	0x70af, 0xffff, 0x0804, 0x30a6, 0x2700, 0x0156, 0x0016, 0x9106,
-	0x0904, 0x309b, 0xc484, 0x080c, 0x65ff, 0x0148, 0x080c, 0xd230,
-	0x1904, 0x309b, 0x080c, 0x659e, 0x1904, 0x30a3, 0x0008, 0xc485,
+	0x2943, 0x080c, 0x2483, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2943, 0x080c,
+	0x2297, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2943, 0x080c, 0x2297, 0x080c,
+	0x2483, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2943, 0x080c, 0x22d2, 0x0804,
+	0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2943, 0x080c, 0x2483, 0x080c, 0x22d2, 0x0804,
+	0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2943, 0x080c, 0x2297, 0x080c, 0x22d2, 0x0804,
+	0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2943, 0x080c, 0x2297, 0x080c, 0x2483, 0x080c,
+	0x22d2, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2943, 0x080c, 0x1380, 0x0804,
+	0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2943, 0x080c, 0x2483, 0x080c, 0x1380, 0x0804,
+	0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2943, 0x080c, 0x2297, 0x080c, 0x1380, 0x0804,
+	0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2943, 0x080c, 0x2483, 0x080c, 0x1380, 0x080c,
+	0x22d2, 0x0804, 0x2f8f, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2943, 0x080c, 0x2297, 0x080c,
+	0x2483, 0x080c, 0x1380, 0x0498, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2943, 0x080c, 0x2297,
+	0x080c, 0x1380, 0x080c, 0x22d2, 0x0410, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2943, 0x080c,
+	0x1380, 0x080c, 0x22d2, 0x0098, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2943, 0x080c, 0x2297,
+	0x080c, 0x2483, 0x080c, 0x1380, 0x080c, 0x22d2, 0x0000, 0x015e,
+	0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x010e, 0x000d,
+	0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c, 0x6939, 0x1904,
+	0x30a8, 0x72dc, 0x2001, 0x197b, 0x2004, 0x9005, 0x1110, 0xd29c,
+	0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x30a8, 0x080c, 0x30ad,
+	0x0804, 0x30a8, 0xd2cc, 0x1904, 0x30a8, 0x080c, 0x73a5, 0x1120,
+	0x70af, 0xffff, 0x0804, 0x30a8, 0xd294, 0x0120, 0x70af, 0xffff,
+	0x0804, 0x30a8, 0x080c, 0x3316, 0x0160, 0x080c, 0xd24a, 0x0128,
+	0x2001, 0x1818, 0x203c, 0x0804, 0x3035, 0x70af, 0xffff, 0x0804,
+	0x30a8, 0x2001, 0x1818, 0x203c, 0x7294, 0xd284, 0x0904, 0x3035,
+	0xd28c, 0x1904, 0x3035, 0x0036, 0x73ac, 0x938e, 0xffff, 0x1110,
+	0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80, 0x2c04, 0x938c, 0x0001,
+	0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x970e,
+	0x05d0, 0x908e, 0x0000, 0x05b8, 0x908e, 0x00ff, 0x1150, 0x7230,
+	0xd284, 0x15b0, 0x7294, 0xc28d, 0x7296, 0x70af, 0xffff, 0x003e,
+	0x04a0, 0x900e, 0x080c, 0x2840, 0x080c, 0x65a7, 0x1538, 0x9006,
 	0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6, 0x2060, 0x080c,
-	0x8981, 0x00ce, 0x090c, 0x8d25, 0xb8af, 0x0000, 0x080c, 0x6972,
-	0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc, 0x11e0, 0x7294,
-	0xd28c, 0x0180, 0x080c, 0x6972, 0x9082, 0x0006, 0x02e0, 0xd484,
-	0x1118, 0x080c, 0x65c3, 0x0028, 0x080c, 0x3290, 0x01a0, 0x080c,
-	0x32bb, 0x0088, 0x080c, 0x3204, 0x080c, 0xd230, 0x1160, 0x080c,
-	0x30f0, 0x0188, 0x0040, 0x080c, 0xd230, 0x1118, 0x080c, 0x3290,
-	0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e, 0x1f04, 0x304c,
-	0x70af, 0xffff, 0x0018, 0x001e, 0x015e, 0x71ae, 0x004e, 0x002e,
-	0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70af, 0x0001, 0x2009,
-	0x007e, 0x080c, 0x659e, 0x1168, 0xb813, 0x00ff, 0xb817, 0xfffe,
-	0x080c, 0x3204, 0x04a9, 0x0128, 0x70dc, 0xc0bd, 0x70de, 0x080c,
-	0xcf81, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6,
-	0x2001, 0x184c, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0xaeaf,
-	0x01d0, 0x2b00, 0x6012, 0x080c, 0xcfaa, 0x6023, 0x0001, 0x9006,
-	0x080c, 0x653b, 0x2001, 0x0000, 0x080c, 0x654f, 0x0126, 0x2091,
-	0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009, 0x0004, 0x080c,
-	0xaedc, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005,
-	0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004, 0x9084,
-	0x00ff, 0xb842, 0x080c, 0xaeaf, 0x0548, 0x2b00, 0x6012, 0xb800,
-	0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140, 0xb804, 0x9084,
-	0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x31bf, 0x080c, 0xcfaa,
-	0x6023, 0x0001, 0x9006, 0x080c, 0x653b, 0x2001, 0x0002, 0x080c,
-	0x654f, 0x0126, 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e,
-	0x2009, 0x0002, 0x080c, 0xaedc, 0x9085, 0x0001, 0x00ce, 0x00de,
-	0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026, 0x2009, 0x0080,
-	0x080c, 0x659e, 0x1140, 0xb813, 0x00ff, 0xb817, 0xfffc, 0x0039,
-	0x0110, 0x70e3, 0xffff, 0x002e, 0x00ce, 0x00be, 0x0005, 0x0016,
-	0x0076, 0x00d6, 0x00c6, 0x080c, 0xae0b, 0x01d0, 0x2b00, 0x6012,
-	0x080c, 0xcfaa, 0x6023, 0x0001, 0x9006, 0x080c, 0x653b, 0x2001,
-	0x0002, 0x080c, 0x654f, 0x0126, 0x2091, 0x8000, 0x70e4, 0x8000,
-	0x70e6, 0x012e, 0x2009, 0x0002, 0x080c, 0xaedc, 0x9085, 0x0001,
-	0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0126,
-	0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x659e, 0x11b8, 0xb813,
-	0x00ff, 0xb817, 0xfffd, 0xb8cf, 0x0004, 0x080c, 0xae0b, 0x0170,
-	0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a, 0x080c, 0xcfaa,
-	0x2009, 0x0022, 0x080c, 0xaedc, 0x9085, 0x0001, 0x012e, 0x00de,
-	0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036, 0x0026, 0x00b6,
-	0x21f0, 0x080c, 0x9296, 0x080c, 0x921b, 0x080c, 0xaca4, 0x080c,
-	0xbd77, 0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e,
-	0x0018, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x65ff, 0x1140,
-	0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x6034,
-	0x001e, 0x8108, 0x1f04, 0x31a4, 0x9686, 0x0001, 0x190c, 0x32e8,
-	0x00be, 0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
-	0x00c6, 0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x6210, 0x2258,
-	0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x928b, 0x0076, 0x2039,
-	0x0000, 0x080c, 0x9168, 0x2c08, 0x080c, 0xe2eb, 0x007e, 0x001e,
-	0xba10, 0xbb14, 0xbcc0, 0x080c, 0x6034, 0xba12, 0xbb16, 0xbcc2,
-	0x00be, 0x001e, 0x002e, 0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005,
-	0x00e6, 0x0006, 0x00b6, 0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086,
-	0x0080, 0x0150, 0x2071, 0x1800, 0x70a8, 0x9005, 0x0110, 0x8001,
-	0x70aa, 0x000e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x70e4, 0x9005,
-	0x0dc0, 0x8001, 0x70e6, 0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005,
-	0x00f6, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x0036, 0x0026, 0x0016,
-	0x0156, 0x2178, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0078, 0x080c,
-	0x56cf, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2020, 0x2009,
-	0x002d, 0x080c, 0xe5ae, 0x20a9, 0x0800, 0x9016, 0x0026, 0x928e,
-	0x007e, 0x0904, 0x326f, 0x928e, 0x007f, 0x0904, 0x326f, 0x928e,
-	0x0080, 0x05e8, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c0, 0x8fff,
-	0x1148, 0x2001, 0x198e, 0x0006, 0x2003, 0x0001, 0x04f1, 0x000e,
-	0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001, 0x0001, 0x080c,
-	0x693c, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c, 0x928b, 0x0076,
-	0x2039, 0x0000, 0x080c, 0x9168, 0x00b6, 0x00c6, 0x0026, 0x2158,
-	0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118, 0xb807, 0x0404,
-	0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06, 0x002e, 0x00ce,
-	0x00be, 0x0016, 0x2c08, 0x080c, 0xe2eb, 0x001e, 0x007e, 0x002e,
-	0x8210, 0x1f04, 0x3226, 0x015e, 0x001e, 0x002e, 0x003e, 0x004e,
-	0x00be, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0046, 0x0026, 0x0016,
-	0x080c, 0x56cf, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2220,
-	0x2009, 0x0029, 0x080c, 0xe5ae, 0x001e, 0x002e, 0x004e, 0x0005,
-	0x0016, 0x0026, 0x0036, 0x00c6, 0x7294, 0x82ff, 0x01e8, 0x080c,
-	0x696a, 0x11d0, 0x2100, 0x080c, 0x2871, 0x81ff, 0x01b8, 0x2019,
-	0x0001, 0x8314, 0x92e0, 0x1c80, 0x2c04, 0xd384, 0x0120, 0x9084,
-	0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x9116, 0x0138, 0x9096,
-	0x00ff, 0x0110, 0x8318, 0x0c68, 0x9085, 0x0001, 0x00ce, 0x003e,
-	0x002e, 0x001e, 0x0005, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x0036, 0x2019, 0x0029, 0x00a9, 0x003e, 0x9180, 0x1000, 0x2004,
-	0x9065, 0x0158, 0x0016, 0x00c6, 0x2061, 0x1ab0, 0x001e, 0x6112,
-	0x080c, 0x31bf, 0x001e, 0x080c, 0x65c3, 0x012e, 0x00ce, 0x001e,
-	0x0005, 0x0016, 0x0026, 0x2110, 0x080c, 0xa808, 0x080c, 0xe917,
-	0x002e, 0x001e, 0x0005, 0x2001, 0x1837, 0x2004, 0xd0cc, 0x0005,
-	0x00c6, 0x00b6, 0x080c, 0x73bc, 0x1118, 0x20a9, 0x0800, 0x0010,
-	0x20a9, 0x0782, 0x080c, 0x73bc, 0x1110, 0x900e, 0x0010, 0x2009,
-	0x007e, 0x9180, 0x1000, 0x2004, 0x905d, 0x0130, 0x86ff, 0x0110,
-	0xb800, 0xd0bc, 0x090c, 0x65c3, 0x8108, 0x1f04, 0x32f9, 0x2061,
-	0x1800, 0x607f, 0x0000, 0x6080, 0x9084, 0x00ff, 0x6082, 0x60b3,
-	0x0000, 0x00be, 0x00ce, 0x0005, 0x2001, 0x1869, 0x2004, 0xd0bc,
-	0x0005, 0x2011, 0x1848, 0x2214, 0xd2ec, 0x0005, 0x0026, 0x2011,
-	0x1867, 0x2214, 0xd2dc, 0x002e, 0x0005, 0x7eef, 0x7de8, 0x7ce4,
-	0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9, 0x80d6, 0x80d5,
-	0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd, 0x80cc, 0x80cb,
-	0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3, 0x80bc, 0x80ba,
-	0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2, 0x80b1, 0x80ae,
-	0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7, 0x6da6, 0x6ca5,
-	0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098, 0x6797, 0x6690,
-	0x658f, 0x6488, 0x6384, 0x6282, 0x8081, 0x8080, 0x617c, 0x607a,
-	0x8079, 0x5f76, 0x8075, 0x8074, 0x8073, 0x8072, 0x8071, 0x806e,
-	0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067, 0x5a66, 0x5965,
-	0x5863, 0x575c, 0x565a, 0x5559, 0x8056, 0x8055, 0x5454, 0x5353,
-	0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b, 0x4e4a, 0x4d49,
-	0x8047, 0x4c46, 0x8045, 0x8043, 0x803c, 0x803a, 0x8039, 0x8036,
-	0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831, 0x802e, 0x472d, 0x462c,
-	0x452b, 0x442a, 0x4329, 0x4227, 0x8026, 0x8025, 0x4123, 0x401f,
-	0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010, 0x3b0f, 0x3a08,
-	0x8004, 0x3902, 0x8001, 0x8000, 0x8000, 0x3800, 0x3700, 0x3600,
-	0x8000, 0x3500, 0x8000, 0x8000, 0x8000, 0x3400, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x3300, 0x3200, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x3100, 0x3000, 0x8000, 0x8000,
-	0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000, 0x8000, 0x8000,
-	0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800, 0x8000, 0x2700, 0x2600,
-	0x2500, 0x2400, 0x2300, 0x2200, 0x8000, 0x8000, 0x2100, 0x2000,
-	0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000, 0x1b00, 0x1a00,
-	0x8000, 0x1900, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x1800, 0x8000, 0x1700, 0x1600, 0x1500, 0x8000, 0x1400, 0x1300,
-	0x1200, 0x1100, 0x1000, 0x0f00, 0x8000, 0x8000, 0x0e00, 0x0d00,
-	0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000, 0x0800, 0x0700,
-	0x8000, 0x0600, 0x8000, 0x8000, 0x8000, 0x0500, 0x0400, 0x0300,
-	0x8000, 0x0200, 0x8000, 0x8000, 0x8000, 0x0100, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x8000, 0x8000, 0x8000,
+	0x896a, 0x00ce, 0x090c, 0x8d0e, 0xb8af, 0x0000, 0x080c, 0x697b,
+	0x1168, 0x7030, 0xd08c, 0x0130, 0xb800, 0xd0bc, 0x0138, 0x080c,
+	0x6828, 0x0120, 0x080c, 0x30c6, 0x0148, 0x0028, 0x080c, 0x3206,
+	0x080c, 0x30f2, 0x0118, 0x8318, 0x0804, 0x2fe2, 0x73ae, 0x0010,
+	0x70af, 0xffff, 0x003e, 0x0804, 0x30a8, 0x9780, 0x3327, 0x203d,
+	0x97bc, 0xff00, 0x873f, 0x2041, 0x007e, 0x70ac, 0x9096, 0xffff,
+	0x1118, 0x900e, 0x28a8, 0x0050, 0x9812, 0x0220, 0x2008, 0x9802,
+	0x20a8, 0x0020, 0x70af, 0xffff, 0x0804, 0x30a8, 0x2700, 0x0156,
+	0x0016, 0x9106, 0x0904, 0x309d, 0xc484, 0x080c, 0x6608, 0x0148,
+	0x080c, 0xd24a, 0x1904, 0x309d, 0x080c, 0x65a7, 0x1904, 0x30a5,
+	0x0008, 0xc485, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6,
+	0x2060, 0x080c, 0x896a, 0x00ce, 0x090c, 0x8d0e, 0xb8af, 0x0000,
+	0x080c, 0x697b, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc,
+	0x11e0, 0x7294, 0xd28c, 0x0180, 0x080c, 0x697b, 0x9082, 0x0006,
+	0x02e0, 0xd484, 0x1118, 0x080c, 0x65cc, 0x0028, 0x080c, 0x3292,
+	0x01a0, 0x080c, 0x32bd, 0x0088, 0x080c, 0x3206, 0x080c, 0xd24a,
+	0x1160, 0x080c, 0x30f2, 0x0188, 0x0040, 0x080c, 0xd24a, 0x1118,
+	0x080c, 0x3292, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e,
+	0x1f04, 0x304e, 0x70af, 0xffff, 0x0018, 0x001e, 0x015e, 0x71ae,
+	0x004e, 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70af,
+	0x0001, 0x2009, 0x007e, 0x080c, 0x65a7, 0x1168, 0xb813, 0x00ff,
+	0xb817, 0xfffe, 0x080c, 0x3206, 0x04a9, 0x0128, 0x70dc, 0xc0bd,
+	0x70de, 0x080c, 0xcf9b, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076,
+	0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004, 0x9084, 0x00ff, 0xb842,
+	0x080c, 0xaebf, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xcfc4, 0x6023,
+	0x0001, 0x9006, 0x080c, 0x6544, 0x2001, 0x0000, 0x080c, 0x6558,
+	0x0126, 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009,
+	0x0004, 0x080c, 0xaeec, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e,
+	0x001e, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c,
+	0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0xaebf, 0x0548, 0x2b00,
+	0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140,
+	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x31c1,
+	0x080c, 0xcfc4, 0x6023, 0x0001, 0x9006, 0x080c, 0x6544, 0x2001,
+	0x0002, 0x080c, 0x6558, 0x0126, 0x2091, 0x8000, 0x70a8, 0x8000,
+	0x70aa, 0x012e, 0x2009, 0x0002, 0x080c, 0xaeec, 0x9085, 0x0001,
+	0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026,
+	0x2009, 0x0080, 0x080c, 0x65a7, 0x1140, 0xb813, 0x00ff, 0xb817,
+	0xfffc, 0x0039, 0x0110, 0x70e3, 0xffff, 0x002e, 0x00ce, 0x00be,
+	0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0xae1b, 0x01d0,
+	0x2b00, 0x6012, 0x080c, 0xcfc4, 0x6023, 0x0001, 0x9006, 0x080c,
+	0x6544, 0x2001, 0x0002, 0x080c, 0x6558, 0x0126, 0x2091, 0x8000,
+	0x70e4, 0x8000, 0x70e6, 0x012e, 0x2009, 0x0002, 0x080c, 0xaeec,
+	0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6,
+	0x00d6, 0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x65a7,
+	0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8cf, 0x0004, 0x080c,
+	0xae1b, 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a,
+	0x080c, 0xcfc4, 0x2009, 0x0022, 0x080c, 0xaeec, 0x9085, 0x0001,
+	0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036,
+	0x0026, 0x00b6, 0x21f0, 0x080c, 0x9289, 0x080c, 0x9209, 0x080c,
+	0xacaf, 0x080c, 0xbd8a, 0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9,
+	0x007e, 0x900e, 0x0018, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c,
+	0x6608, 0x1140, 0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110,
+	0x080c, 0x603d, 0x001e, 0x8108, 0x1f04, 0x31a6, 0x9686, 0x0001,
+	0x190c, 0x32ea, 0x00be, 0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee,
+	0x0005, 0x00e6, 0x00c6, 0x0046, 0x0036, 0x0026, 0x0016, 0x00b6,
+	0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x927e,
+	0x0076, 0x2039, 0x0000, 0x080c, 0x9151, 0x2c08, 0x080c, 0xe30c,
+	0x007e, 0x001e, 0xba10, 0xbb14, 0xbcc0, 0x080c, 0x603d, 0xba12,
+	0xbb16, 0xbcc2, 0x00be, 0x001e, 0x002e, 0x003e, 0x004e, 0x00ce,
+	0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6, 0x6010, 0x2058, 0xb8a0,
+	0x00be, 0x9086, 0x0080, 0x0150, 0x2071, 0x1800, 0x70a8, 0x9005,
+	0x0110, 0x8001, 0x70aa, 0x000e, 0x00ee, 0x0005, 0x2071, 0x1800,
+	0x70e4, 0x9005, 0x0dc0, 0x8001, 0x70e6, 0x0ca8, 0xb800, 0xc08c,
+	0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x0036,
+	0x0026, 0x0016, 0x0156, 0x2178, 0x81ff, 0x1118, 0x20a9, 0x0001,
+	0x0078, 0x080c, 0x56d8, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006,
+	0x2020, 0x2009, 0x002d, 0x080c, 0xe5cf, 0x20a9, 0x0800, 0x9016,
+	0x0026, 0x928e, 0x007e, 0x0904, 0x3271, 0x928e, 0x007f, 0x0904,
+	0x3271, 0x928e, 0x0080, 0x05e8, 0x9288, 0x1000, 0x210c, 0x81ff,
+	0x05c0, 0x8fff, 0x1148, 0x2001, 0x198d, 0x0006, 0x2003, 0x0001,
+	0x04f1, 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001,
+	0x0001, 0x080c, 0x6945, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c,
+	0x927e, 0x0076, 0x2039, 0x0000, 0x080c, 0x9151, 0x00b6, 0x00c6,
+	0x0026, 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118,
+	0xb807, 0x0404, 0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06,
+	0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c, 0xe30c, 0x001e,
+	0x007e, 0x002e, 0x8210, 0x1f04, 0x3228, 0x015e, 0x001e, 0x002e,
+	0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0046,
+	0x0026, 0x0016, 0x080c, 0x56d8, 0xd0c4, 0x0140, 0xd0a4, 0x0130,
+	0x9006, 0x2220, 0x2009, 0x0029, 0x080c, 0xe5cf, 0x001e, 0x002e,
+	0x004e, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x7294, 0x82ff,
+	0x01e8, 0x080c, 0x6973, 0x11d0, 0x2100, 0x080c, 0x2873, 0x81ff,
+	0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80, 0x2c04, 0xd384,
+	0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x9116,
+	0x0138, 0x9096, 0x00ff, 0x0110, 0x8318, 0x0c68, 0x9085, 0x0001,
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0016, 0x00c6, 0x0126,
+	0x2091, 0x8000, 0x0036, 0x2019, 0x0029, 0x00a9, 0x003e, 0x9180,
+	0x1000, 0x2004, 0x9065, 0x0158, 0x0016, 0x00c6, 0x2061, 0x1aaf,
+	0x001e, 0x6112, 0x080c, 0x31c1, 0x001e, 0x080c, 0x65cc, 0x012e,
+	0x00ce, 0x001e, 0x0005, 0x0016, 0x0026, 0x2110, 0x080c, 0xa80e,
+	0x080c, 0xe938, 0x002e, 0x001e, 0x0005, 0x2001, 0x1837, 0x2004,
+	0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x73a5, 0x1118, 0x20a9,
+	0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x73a5, 0x1110, 0x900e,
+	0x0010, 0x2009, 0x007e, 0x9180, 0x1000, 0x2004, 0x905d, 0x0130,
+	0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x65cc, 0x8108, 0x1f04,
+	0x32fb, 0x2061, 0x1800, 0x607f, 0x0000, 0x6080, 0x9084, 0x00ff,
+	0x6082, 0x60b3, 0x0000, 0x00be, 0x00ce, 0x0005, 0x2001, 0x1869,
+	0x2004, 0xd0bc, 0x0005, 0x2011, 0x1848, 0x2214, 0xd2ec, 0x0005,
+	0x0026, 0x2011, 0x1867, 0x2214, 0xd2dc, 0x002e, 0x0005, 0x7eef,
+	0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9,
+	0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd,
+	0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3,
+	0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2,
+	0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7,
+	0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098,
+	0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081, 0x8080,
+	0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073, 0x8072,
+	0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067,
+	0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056, 0x8055,
+	0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b,
+	0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c, 0x803a,
+	0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831, 0x802e,
+	0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026, 0x8025,
+	0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010,
+	0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000, 0x3800,
+	0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000, 0x3400,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300, 0x3200,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100, 0x3000,
+	0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000,
+	0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800, 0x8000,
+	0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000, 0x8000,
+	0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000,
+	0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500, 0x8000,
+	0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000, 0x8000,
+	0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000,
+	0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000, 0x0500,
+	0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000, 0x0100,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x8000,
 	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x2071, 0x189e, 0x7003,
-	0x0002, 0x9006, 0x7016, 0x701a, 0x704a, 0x704e, 0x700e, 0x7042,
-	0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba, 0x7007, 0x0001, 0x080c,
-	0x1018, 0x090c, 0x0dd5, 0x2900, 0x706a, 0xa867, 0x0002, 0xa8ab,
-	0xdcb0, 0x080c, 0x1018, 0x090c, 0x0dd5, 0x2900, 0x706e, 0xa867,
-	0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x189e, 0x7004, 0x0002,
-	0x3454, 0x3455, 0x3468, 0x347c, 0x0005, 0x1004, 0x3465, 0x0e04,
-	0x3465, 0x2079, 0x0000, 0x0126, 0x2091, 0x8000, 0x700c, 0x9005,
-	0x1128, 0x700f, 0x0001, 0x012e, 0x0468, 0x0005, 0x012e, 0x0ce8,
-	0x2079, 0x0000, 0x2061, 0x18b8, 0x2c4c, 0xa86c, 0x908e, 0x0100,
-	0x0128, 0x9086, 0x0200, 0x0904, 0x3550, 0x0005, 0x7018, 0x2048,
-	0x2061, 0x1800, 0x701c, 0x0807, 0x7014, 0x2048, 0xa864, 0x9094,
-	0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78, 0xd2fc, 0x0128, 0x0005,
-	0x9086, 0x0103, 0x0108, 0x0005, 0x2079, 0x0000, 0x2061, 0x1800,
-	0x701c, 0x0807, 0x2061, 0x1800, 0x7880, 0x908a, 0x0040, 0x1210,
-	0x61d0, 0x0042, 0x2100, 0x908a, 0x003f, 0x1a04, 0x354d, 0x61d0,
-	0x0804, 0x34e2, 0x3524, 0x355c, 0x3566, 0x356a, 0x3574, 0x357a,
-	0x357e, 0x358e, 0x3591, 0x359b, 0x35a0, 0x35a5, 0x35b0, 0x35bb,
-	0x35ca, 0x35d9, 0x35e7, 0x35fe, 0x3619, 0x354d, 0x36c2, 0x3700,
-	0x37a6, 0x37b7, 0x37da, 0x354d, 0x354d, 0x354d, 0x3812, 0x382e,
-	0x3837, 0x3866, 0x386c, 0x354d, 0x38b2, 0x354d, 0x354d, 0x354d,
-	0x354d, 0x354d, 0x38bd, 0x38c6, 0x38ce, 0x38d0, 0x354d, 0x354d,
-	0x354d, 0x354d, 0x354d, 0x354d, 0x38fc, 0x354d, 0x354d, 0x354d,
-	0x354d, 0x354d, 0x3919, 0x397a, 0x354d, 0x354d, 0x354d, 0x354d,
-	0x354d, 0x354d, 0x0002, 0x39a4, 0x39a7, 0x3a06, 0x3a1f, 0x3a4f,
-	0x3ced, 0x354d, 0x52a8, 0x354d, 0x354d, 0x354d, 0x354d, 0x354d,
-	0x354d, 0x354d, 0x354d, 0x359b, 0x35a0, 0x420e, 0x56f3, 0x422c,
-	0x5337, 0x5388, 0x548b, 0x354d, 0x54ed, 0x5529, 0x555a, 0x565e,
-	0x5587, 0x55de, 0x354d, 0x4230, 0x43f1, 0x4407, 0x442c, 0x4491,
-	0x4505, 0x4525, 0x459c, 0x45f8, 0x4654, 0x4657, 0x467c, 0x4719,
-	0x477f, 0x4787, 0x48b9, 0x4a2e, 0x4a62, 0x4cc6, 0x354d, 0x4ce4,
-	0x4d90, 0x4e72, 0x4ecc, 0x354d, 0x4f81, 0x354d, 0x4fe7, 0x5002,
-	0x4787, 0x5248, 0x714c, 0x0000, 0x2021, 0x4000, 0x080c, 0x4ae0,
-	0x0126, 0x2091, 0x8000, 0x0e04, 0x352e, 0x0010, 0x012e, 0x0cc0,
-	0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833,
-	0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x7007, 0x0001, 0x2091,
-	0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x2021, 0x4001, 0x08b0,
-	0x2021, 0x4002, 0x0898, 0x2021, 0x4003, 0x0880, 0x2021, 0x4005,
-	0x0868, 0x2021, 0x4006, 0x0850, 0x2039, 0x0001, 0x902e, 0x2520,
-	0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804, 0x4aed, 0x7883, 0x0004,
-	0x7884, 0x0807, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c,
-	0x7884, 0x7990, 0x0804, 0x4af0, 0x7984, 0x7888, 0x2114, 0x200a,
-	0x0804, 0x3524, 0x7984, 0x2114, 0x0804, 0x3524, 0x20e1, 0x0000,
-	0x2099, 0x0021, 0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f,
-	0x4003, 0x7984, 0x7a88, 0x7b8c, 0x0804, 0x3524, 0x7884, 0x2060,
-	0x04d8, 0x2009, 0x0003, 0x2011, 0x0002, 0x2019, 0x001c, 0x789b,
-	0x0137, 0x0804, 0x3524, 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0800,
-	0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0848, 0x79a0, 0x9182, 0x0040,
-	0x0210, 0x0804, 0x3559, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x3560,
-	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x3559, 0x2138, 0x7d98,
-	0x7c9c, 0x0804, 0x356e, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804,
-	0x3559, 0x21e8, 0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004,
-	0x0804, 0x3524, 0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200,
-	0x8c60, 0x8109, 0x1dd8, 0x2010, 0x9005, 0x0904, 0x3524, 0x0804,
-	0x3553, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x3559, 0x21e0,
-	0x20a9, 0x0001, 0x7984, 0x2198, 0x4012, 0x0804, 0x3524, 0x2069,
-	0x1847, 0x7884, 0x7990, 0x911a, 0x1a04, 0x3559, 0x8019, 0x0904,
-	0x3559, 0x684a, 0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006,
-	0x685a, 0x685e, 0x080c, 0x76d5, 0x0804, 0x3524, 0x2069, 0x1847,
-	0x7884, 0x7994, 0x911a, 0x1a04, 0x3559, 0x8019, 0x0904, 0x3559,
-	0x684e, 0x6946, 0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a,
-	0x686e, 0x0126, 0x2091, 0x8000, 0x080c, 0x69dc, 0x012e, 0x0804,
-	0x3524, 0x902e, 0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
-	0x3556, 0x7984, 0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001,
-	0x20a1, 0x18a6, 0x4101, 0x080c, 0x4aa4, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x3556, 0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60,
-	0x080c, 0x4aed, 0x701f, 0x363d, 0x0005, 0xa864, 0x2008, 0x9084,
-	0x00ff, 0x9096, 0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096,
-	0x0015, 0x0138, 0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904,
-	0x3556, 0x810f, 0x918c, 0x00ff, 0x0904, 0x3556, 0x7112, 0x7010,
-	0x8001, 0x0560, 0x7012, 0x080c, 0x4aa4, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x3556, 0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390,
-	0xa494, 0xa598, 0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000,
-	0x95a9, 0x0000, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4aed,
-	0x701f, 0x367b, 0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002,
-	0x0120, 0x9096, 0x000a, 0x1904, 0x3556, 0x0888, 0x7014, 0x2048,
-	0xa868, 0xc0fd, 0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029,
-	0x1160, 0xc2fd, 0xaa7a, 0x080c, 0x618b, 0x0150, 0x0126, 0x2091,
-	0x8000, 0xa87a, 0xa982, 0x012e, 0x0050, 0x080c, 0x64b4, 0x1128,
-	0x7007, 0x0003, 0x701f, 0x36a7, 0x0005, 0x080c, 0x6ec0, 0x0126,
-	0x2091, 0x8000, 0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x18a6,
-	0x400a, 0x2100, 0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9,
-	0x0000, 0xa85c, 0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60,
-	0x0804, 0x4af0, 0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010,
-	0x7883, 0x4000, 0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020,
-	0x2009, 0x017f, 0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100,
-	0x6200, 0x2061, 0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009,
-	0x04fd, 0x2104, 0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x0180, 0x2001, 0x1a19, 0x2004, 0x9005,
-	0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a,
-	0x2003, 0x0002, 0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427,
-	0x81ff, 0x1904, 0x3556, 0x7984, 0x080c, 0x65ff, 0x1904, 0x3559,
-	0x7e98, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x3559, 0x7c88,
-	0x7d8c, 0x080c, 0x6762, 0x080c, 0x6731, 0x0000, 0x1518, 0x2061,
-	0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148,
-	0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506,
-	0x0150, 0x012e, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02,
-	0x1a04, 0x3556, 0x0c30, 0x080c, 0xc768, 0x012e, 0x0904, 0x3556,
-	0x0804, 0x3524, 0x900e, 0x2001, 0x0005, 0x080c, 0x6ec0, 0x0126,
-	0x2091, 0x8000, 0x080c, 0xce2a, 0x080c, 0x6c81, 0x012e, 0x0804,
-	0x3524, 0x00a6, 0x2950, 0xb198, 0x080c, 0x65ff, 0x1904, 0x3793,
-	0xb6a4, 0x9684, 0x3fff, 0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0,
-	0x080c, 0x6762, 0x080c, 0x6731, 0x1520, 0x2061, 0x1cd0, 0x0126,
-	0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d,
-	0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0158, 0x012e,
-	0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x2009, 0x000d,
-	0x12b0, 0x0c28, 0x080c, 0xc768, 0x012e, 0x2009, 0x0003, 0x0178,
-	0x00e0, 0x900e, 0x2001, 0x0005, 0x080c, 0x6ec0, 0x0126, 0x2091,
-	0x8000, 0x080c, 0xce2a, 0x080c, 0x6c75, 0x012e, 0x0070, 0xb097,
-	0x4005, 0xb19a, 0x0010, 0xb097, 0x4006, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0030, 0x2a48, 0x00ae, 0x0005, 0xb097, 0x4000, 0x9006,
-	0x918d, 0x0001, 0x2008, 0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904,
-	0x3556, 0x080c, 0x4abb, 0x0904, 0x3559, 0x080c, 0x66c6, 0x0904,
-	0x3556, 0x080c, 0x6768, 0x0904, 0x3556, 0x0804, 0x451c, 0x81ff,
-	0x1904, 0x3556, 0x080c, 0x4ad7, 0x0904, 0x3559, 0x080c, 0x67f6,
-	0x0904, 0x3556, 0x2019, 0x0005, 0x79a8, 0x080c, 0x6783, 0x0904,
-	0x3556, 0x7888, 0x908a, 0x1000, 0x1a04, 0x3559, 0x8003, 0x800b,
-	0x810b, 0x9108, 0x080c, 0x8501, 0x7984, 0xd184, 0x1904, 0x3524,
-	0x0804, 0x451c, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009,
-	0x0001, 0x0450, 0x2029, 0x07ff, 0x645c, 0x2400, 0x9506, 0x01f8,
-	0x2508, 0x080c, 0x65ff, 0x11d8, 0x080c, 0x67f6, 0x1128, 0x2009,
-	0x0002, 0x62c0, 0x2518, 0x00c0, 0x2019, 0x0004, 0x900e, 0x080c,
-	0x6783, 0x1118, 0x2009, 0x0006, 0x0078, 0x7884, 0x908a, 0x1000,
-	0x1270, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x8501, 0x8529,
-	0x1ae0, 0x012e, 0x0804, 0x3524, 0x012e, 0x0804, 0x3556, 0x012e,
-	0x0804, 0x3559, 0x080c, 0x4abb, 0x0904, 0x3559, 0x080c, 0x66c6,
-	0x0904, 0x3556, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c,
-	0x928b, 0x0076, 0x903e, 0x080c, 0x9168, 0x900e, 0x080c, 0xe2eb,
-	0x007e, 0x00ce, 0x080c, 0x6762, 0x0804, 0x3524, 0x080c, 0x4abb,
-	0x0904, 0x3559, 0x080c, 0x6762, 0x2208, 0x0804, 0x3524, 0x0156,
-	0x00d6, 0x00e6, 0x2069, 0x1910, 0x6810, 0x6914, 0x910a, 0x1208,
-	0x900e, 0x6816, 0x9016, 0x901e, 0x20a9, 0x007e, 0x2069, 0x1000,
-	0x2d04, 0x905d, 0x0118, 0xb84c, 0x0059, 0x9210, 0x8d68, 0x1f04,
-	0x3848, 0x2300, 0x9218, 0x00ee, 0x00de, 0x015e, 0x0804, 0x3524,
-	0x00f6, 0x0016, 0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff,
-	0x0110, 0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1910,
-	0x6910, 0x62bc, 0x0804, 0x3524, 0x81ff, 0x0120, 0x2009, 0x0001,
-	0x0804, 0x3556, 0x0126, 0x2091, 0x8000, 0x080c, 0x56e3, 0x0128,
-	0x2009, 0x0007, 0x012e, 0x0804, 0x3556, 0x012e, 0x615c, 0x9190,
-	0x3325, 0x2215, 0x9294, 0x00ff, 0x637c, 0x83ff, 0x0108, 0x6280,
-	0x67dc, 0x97c4, 0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001,
-	0x00e8, 0x97c4, 0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003,
-	0x00a8, 0x97c4, 0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002,
-	0x0068, 0x080c, 0x73bc, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c,
-	0x0120, 0x2009, 0x0005, 0x0804, 0x3556, 0x9036, 0x7e9a, 0x7f9e,
-	0x0804, 0x3524, 0x614c, 0x6250, 0x2019, 0x1986, 0x231c, 0x2001,
-	0x1987, 0x2004, 0x789a, 0x0804, 0x3524, 0x0126, 0x2091, 0x8000,
-	0x6138, 0x623c, 0x6340, 0x012e, 0x0804, 0x3524, 0x080c, 0x4ad7,
-	0x0904, 0x3559, 0xba44, 0xbb38, 0x0804, 0x3524, 0x080c, 0x0dd5,
-	0x080c, 0x4ad7, 0x2110, 0x0904, 0x3559, 0xb804, 0x908c, 0x00ff,
-	0x918e, 0x0006, 0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009,
-	0x0009, 0x1904, 0x3556, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005,
-	0x00c6, 0x9066, 0x080c, 0xa808, 0x080c, 0x928b, 0x0076, 0x903e,
-	0x080c, 0x9168, 0x900e, 0x080c, 0xe2eb, 0x007e, 0x00ce, 0xb807,
-	0x0407, 0x012e, 0x0804, 0x3524, 0x614c, 0x6250, 0x7884, 0x604e,
-	0x7b88, 0x6352, 0x2069, 0x1847, 0x831f, 0x9305, 0x6816, 0x788c,
-	0x2069, 0x1986, 0x2d1c, 0x206a, 0x7e98, 0x9682, 0x0014, 0x1210,
-	0x2031, 0x07d0, 0x2069, 0x1987, 0x2d04, 0x266a, 0x789a, 0x0804,
-	0x3524, 0x0126, 0x2091, 0x8000, 0x7884, 0x603a, 0xd0c4, 0x01a8,
-	0x00d6, 0x78a8, 0x2009, 0x199d, 0x200a, 0x78ac, 0x2011, 0x199e,
-	0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214,
-	0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x7884, 0xd0b4, 0x0120,
-	0x3b00, 0x9084, 0xff3f, 0x20d8, 0x7888, 0x603e, 0x2011, 0x0114,
-	0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0080, 0x0010, 0x918c,
-	0xff7f, 0x2112, 0x788c, 0x6042, 0x9084, 0x0020, 0x0130, 0x78b4,
-	0x6046, 0x9084, 0x0001, 0x090c, 0x420e, 0x6040, 0xd0cc, 0x0120,
-	0x78b0, 0x2011, 0x0114, 0x2012, 0x012e, 0x0804, 0x3524, 0x00f6,
-	0x2079, 0x1800, 0x7a38, 0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c,
-	0x9084, 0xfebf, 0x8002, 0x9214, 0x7838, 0x9084, 0x0140, 0x9215,
-	0x7a3a, 0xa897, 0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
-	0x00fe, 0x0005, 0x7898, 0x9005, 0x01a8, 0x7888, 0x9025, 0x0904,
-	0x3559, 0x788c, 0x902d, 0x0904, 0x3559, 0x900e, 0x080c, 0x65ff,
-	0x1120, 0xba44, 0xbb38, 0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190,
-	0x8108, 0x0ca0, 0x080c, 0x4ad7, 0x0904, 0x3559, 0x7888, 0x900d,
-	0x0904, 0x3559, 0x788c, 0x9005, 0x0904, 0x3559, 0xba44, 0xb946,
-	0xbb38, 0xb83a, 0x0804, 0x3524, 0x2011, 0xbc09, 0x0010, 0x2011,
-	0xbc05, 0x080c, 0x56e3, 0x1904, 0x3556, 0x00c6, 0x2061, 0x0100,
-	0x7984, 0x9186, 0x00ff, 0x1130, 0x2001, 0x1818, 0x2004, 0x9085,
-	0xff00, 0x0088, 0x9182, 0x007f, 0x16e0, 0x9188, 0x3325, 0x210d,
-	0x918c, 0x00ff, 0x2001, 0x1818, 0x2004, 0x0026, 0x9116, 0x002e,
-	0x0580, 0x810f, 0x9105, 0x0126, 0x2091, 0x8000, 0x0006, 0x080c,
-	0xae0b, 0x000e, 0x0510, 0x602e, 0x620a, 0x7984, 0x00b6, 0x080c,
-	0x65a4, 0x2b08, 0x00be, 0x1500, 0x6112, 0x6023, 0x0001, 0x080c,
-	0x4aa4, 0x01d0, 0x9006, 0xa866, 0x7007, 0x0003, 0xa832, 0xa868,
-	0xc0fd, 0xa86a, 0x701f, 0x39ff, 0x2900, 0x6016, 0x2009, 0x0032,
-	0x080c, 0xaedc, 0x012e, 0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804,
-	0x3556, 0x00ce, 0x0804, 0x3559, 0x080c, 0xae61, 0x0cb0, 0xa830,
-	0x9086, 0x0100, 0x0904, 0x3556, 0x0804, 0x3524, 0x2061, 0x1a71,
-	0x0126, 0x2091, 0x8000, 0x6000, 0xd084, 0x0170, 0x6104, 0x6208,
-	0x2061, 0x1800, 0x6354, 0x6074, 0x789a, 0x60c0, 0x789e, 0x60bc,
-	0x78aa, 0x012e, 0x0804, 0x3524, 0x900e, 0x2110, 0x0c88, 0x81ff,
-	0x1904, 0x3556, 0x080c, 0x73bc, 0x0904, 0x3556, 0x0126, 0x2091,
-	0x8000, 0x6254, 0x6074, 0x9202, 0x0248, 0x9085, 0x0001, 0x080c,
-	0x28a7, 0x080c, 0x58fd, 0x012e, 0x0804, 0x3524, 0x012e, 0x0804,
-	0x3559, 0x0006, 0x0016, 0x00c6, 0x00e6, 0x2001, 0x19a9, 0x2070,
-	0x2061, 0x1847, 0x6008, 0x2072, 0x900e, 0x2011, 0x1400, 0x080c,
-	0x8f68, 0x7206, 0x00ee, 0x00ce, 0x001e, 0x000e, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804,
-	0x3526, 0x7884, 0xd0fc, 0x0148, 0x2001, 0x002a, 0x2004, 0x9082,
-	0x00e1, 0x0288, 0x012e, 0x0804, 0x3559, 0x2001, 0x002a, 0x2004,
-	0x2069, 0x1847, 0x6908, 0x9102, 0x1230, 0x012e, 0x0804, 0x3559,
-	0x012e, 0x0804, 0x3556, 0x080c, 0xadcb, 0x0dd0, 0x7884, 0xd0fc,
-	0x0904, 0x3aca, 0x00c6, 0x080c, 0x4aa4, 0x00ce, 0x0d88, 0xa867,
-	0x0000, 0x7884, 0xa80a, 0x7898, 0xa80e, 0x789c, 0xa812, 0x2001,
-	0x002e, 0x2004, 0xa81a, 0x2001, 0x002f, 0x2004, 0xa81e, 0x2001,
-	0x0030, 0x2004, 0xa822, 0x2001, 0x0031, 0x2004, 0xa826, 0x2001,
-	0x0034, 0x2004, 0xa82a, 0x2001, 0x0035, 0x2004, 0xa82e, 0x2001,
-	0x002a, 0x2004, 0x9080, 0x0003, 0x9084, 0x00fc, 0x8004, 0xa816,
-	0x080c, 0x3c50, 0x0928, 0x7014, 0x2048, 0xad2c, 0xac28, 0xab1c,
-	0xaa18, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x2071,
+	0x189e, 0x7003, 0x0002, 0x9006, 0x7016, 0x701a, 0x704a, 0x704e,
+	0x700e, 0x7042, 0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba, 0x7007,
+	0x0001, 0x080c, 0x1018, 0x090c, 0x0dd5, 0x2900, 0x706a, 0xa867,
+	0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x1018, 0x090c, 0x0dd5, 0x2900,
+	0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x189e,
+	0x7004, 0x0002, 0x3456, 0x3457, 0x346a, 0x347e, 0x0005, 0x1004,
+	0x3467, 0x0e04, 0x3467, 0x2079, 0x0000, 0x0126, 0x2091, 0x8000,
+	0x700c, 0x9005, 0x1128, 0x700f, 0x0001, 0x012e, 0x0468, 0x0005,
+	0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18b8, 0x2c4c, 0xa86c,
+	0x908e, 0x0100, 0x0128, 0x9086, 0x0200, 0x0904, 0x3552, 0x0005,
+	0x7018, 0x2048, 0x2061, 0x1800, 0x701c, 0x0807, 0x7014, 0x2048,
+	0xa864, 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78, 0xd2fc,
+	0x0128, 0x0005, 0x9086, 0x0103, 0x0108, 0x0005, 0x2079, 0x0000,
+	0x2061, 0x1800, 0x701c, 0x0807, 0x2061, 0x1800, 0x7880, 0x908a,
+	0x0040, 0x1210, 0x61d0, 0x0042, 0x2100, 0x908a, 0x003f, 0x1a04,
+	0x354f, 0x61d0, 0x0804, 0x34e4, 0x3526, 0x355e, 0x354f, 0x3568,
+	0x3572, 0x3578, 0x357c, 0x358c, 0x3590, 0x35a6, 0x35ac, 0x35b2,
+	0x35bd, 0x35c8, 0x35d7, 0x35e6, 0x35f4, 0x360b, 0x3626, 0x354f,
+	0x36cf, 0x370d, 0x37b3, 0x37c4, 0x37e7, 0x354f, 0x354f, 0x354f,
+	0x381f, 0x383b, 0x3844, 0x3873, 0x3879, 0x354f, 0x38bf, 0x354f,
+	0x354f, 0x354f, 0x354f, 0x354f, 0x38ca, 0x38d3, 0x38db, 0x38dd,
+	0x354f, 0x354f, 0x354f, 0x354f, 0x354f, 0x354f, 0x3909, 0x354f,
+	0x354f, 0x354f, 0x354f, 0x354f, 0x3926, 0x3987, 0x354f, 0x354f,
+	0x354f, 0x354f, 0x354f, 0x354f, 0x0002, 0x39b1, 0x39b4, 0x3a13,
+	0x3a2c, 0x3a5c, 0x3cfa, 0x354f, 0x52b1, 0x354f, 0x354f, 0x354f,
+	0x354f, 0x354f, 0x354f, 0x354f, 0x354f, 0x35a6, 0x35ac, 0x421b,
+	0x56fc, 0x4239, 0x5340, 0x5391, 0x5494, 0x354f, 0x54f6, 0x5532,
+	0x5563, 0x5667, 0x5590, 0x55e7, 0x354f, 0x423d, 0x43fe, 0x4414,
+	0x4439, 0x449e, 0x4512, 0x4532, 0x45a9, 0x4605, 0x4661, 0x4664,
+	0x4689, 0x4726, 0x478c, 0x4794, 0x48c6, 0x4a3e, 0x4a72, 0x4cd6,
+	0x354f, 0x4cf4, 0x4d99, 0x4e7b, 0x4ed5, 0x354f, 0x4f8a, 0x354f,
+	0x4ff0, 0x500b, 0x4794, 0x5251, 0x714c, 0x0000, 0x2021, 0x4000,
+	0x080c, 0x4af0, 0x0126, 0x2091, 0x8000, 0x0e04, 0x3530, 0x0010,
+	0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011,
+	0x0010, 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x7007,
+	0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x2021,
+	0x4001, 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021, 0x4003, 0x0880,
+	0x2021, 0x4005, 0x0868, 0x2021, 0x4006, 0x0850, 0x2039, 0x0001,
+	0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804, 0x4afd,
+	0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990,
+	0x0804, 0x4b00, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804, 0x3526,
+	0x7984, 0x2114, 0x0804, 0x3526, 0x20e1, 0x0000, 0x2099, 0x0021,
+	0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f, 0x4003, 0x7984,
+	0x7a88, 0x7b8c, 0x0804, 0x3526, 0x7884, 0x2060, 0x0804, 0x35d9,
+	0x2009, 0x0003, 0x2011, 0x0002, 0x2019, 0x001e, 0x789b, 0x0137,
+	0x7893, 0xffff, 0x2001, 0x188f, 0x2004, 0x9005, 0x0118, 0x7896,
+	0x0804, 0x3526, 0x7897, 0x0001, 0x0804, 0x3526, 0x2039, 0x0001,
+	0x7d98, 0x7c9c, 0x0804, 0x3562, 0x2039, 0x0001, 0x7d98, 0x7c9c,
+	0x0804, 0x356c, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x355b,
+	0x2138, 0x7d98, 0x7c9c, 0x0804, 0x3562, 0x79a0, 0x9182, 0x0040,
+	0x0210, 0x0804, 0x355b, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x356c,
+	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x355b, 0x21e8, 0x7984,
+	0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804, 0x3526, 0x2061,
+	0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109, 0x1dd8,
+	0x2010, 0x9005, 0x0904, 0x3526, 0x0804, 0x3555, 0x79a0, 0x9182,
+	0x0040, 0x0210, 0x0804, 0x355b, 0x21e0, 0x20a9, 0x0001, 0x7984,
+	0x2198, 0x4012, 0x0804, 0x3526, 0x2069, 0x1847, 0x7884, 0x7990,
+	0x911a, 0x1a04, 0x355b, 0x8019, 0x0904, 0x355b, 0x684a, 0x6942,
+	0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a, 0x685e, 0x080c,
+	0x76be, 0x0804, 0x3526, 0x2069, 0x1847, 0x7884, 0x7994, 0x911a,
+	0x1a04, 0x355b, 0x8019, 0x0904, 0x355b, 0x684e, 0x6946, 0x788c,
+	0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x69e1, 0x012e, 0x0804, 0x3526, 0x902e, 0x2520,
+	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3558, 0x7984, 0x7b88,
+	0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1, 0x18a6, 0x4101,
+	0x080c, 0x4ab4, 0x1120, 0x2009, 0x0002, 0x0804, 0x3558, 0x2009,
+	0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4afd, 0x701f,
+	0x364a, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff, 0x9096, 0x0011,
+	0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015, 0x0138, 0x9096,
+	0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x3558, 0x810f, 0x918c,
+	0x00ff, 0x0904, 0x3558, 0x7112, 0x7010, 0x8001, 0x0560, 0x7012,
+	0x080c, 0x4ab4, 0x1120, 0x2009, 0x0002, 0x0804, 0x3558, 0x2009,
+	0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, 0x9290,
+	0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c,
+	0x9080, 0x0019, 0xaf60, 0x080c, 0x4afd, 0x701f, 0x3688, 0x0005,
+	0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120, 0x9096, 0x000a,
+	0x1904, 0x3558, 0x0888, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a,
+	0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160, 0xc2fd, 0xaa7a,
+	0x080c, 0x6194, 0x0150, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982,
+	0x012e, 0x0050, 0x080c, 0x64bd, 0x1128, 0x7007, 0x0003, 0x701f,
+	0x36b4, 0x0005, 0x080c, 0x6eb9, 0x0126, 0x2091, 0x8000, 0x20a9,
+	0x0005, 0x20e1, 0x0001, 0x2099, 0x18a6, 0x400a, 0x2100, 0x9210,
+	0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080,
+	0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804, 0x4b00, 0x2091,
+	0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883, 0x4000, 0x7887,
+	0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009, 0x017f, 0x2104,
+	0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200, 0x2061, 0x0200,
+	0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd, 0x2104, 0x789e,
+	0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x0180, 0x2001, 0x1a18, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b,
+	0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003,
+	0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff, 0x1904, 0x3558,
+	0x7984, 0x080c, 0x6608, 0x1904, 0x355b, 0x7e98, 0x9684, 0x3fff,
+	0x9082, 0x4000, 0x1a04, 0x355b, 0x7c88, 0x7d8c, 0x080c, 0x676b,
+	0x080c, 0x673a, 0x0000, 0x1518, 0x2061, 0x1cd0, 0x0126, 0x2091,
+	0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130,
+	0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0,
+	0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a04, 0x3558, 0x0c30,
+	0x080c, 0xc77b, 0x012e, 0x0904, 0x3558, 0x0804, 0x3526, 0x900e,
+	0x2001, 0x0005, 0x080c, 0x6eb9, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xce44, 0x080c, 0x6c86, 0x012e, 0x0804, 0x3526, 0x00a6, 0x2950,
+	0xb198, 0x080c, 0x6608, 0x1904, 0x37a0, 0xb6a4, 0x9684, 0x3fff,
+	0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x676b, 0x080c,
+	0x673a, 0x1520, 0x2061, 0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000,
+	0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406,
+	0x1118, 0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, 0x0018, 0x2001,
+	0x181a, 0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c,
+	0xc77b, 0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, 0x900e, 0x2001,
+	0x0005, 0x080c, 0x6eb9, 0x0126, 0x2091, 0x8000, 0x080c, 0xce44,
+	0x080c, 0x6c7a, 0x012e, 0x0070, 0xb097, 0x4005, 0xb19a, 0x0010,
+	0xb097, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x2a48,
+	0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, 0x918d, 0x0001, 0x2008,
+	0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, 0x3558, 0x080c, 0x4acb,
+	0x0904, 0x355b, 0x080c, 0x66cf, 0x0904, 0x3558, 0x080c, 0x6771,
+	0x0904, 0x3558, 0x0804, 0x4529, 0x81ff, 0x1904, 0x3558, 0x080c,
+	0x4ae7, 0x0904, 0x355b, 0x080c, 0x67ff, 0x0904, 0x3558, 0x2019,
+	0x0005, 0x79a8, 0x080c, 0x678c, 0x0904, 0x3558, 0x7888, 0x908a,
+	0x1000, 0x1a04, 0x355b, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c,
+	0x84ea, 0x7984, 0xd184, 0x1904, 0x3526, 0x0804, 0x4529, 0x0126,
+	0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029,
+	0x07ff, 0x645c, 0x2400, 0x9506, 0x01f8, 0x2508, 0x080c, 0x6608,
+	0x11d8, 0x080c, 0x67ff, 0x1128, 0x2009, 0x0002, 0x62c0, 0x2518,
+	0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, 0x678c, 0x1118, 0x2009,
+	0x0006, 0x0078, 0x7884, 0x908a, 0x1000, 0x1270, 0x8003, 0x800b,
+	0x810b, 0x9108, 0x080c, 0x84ea, 0x8529, 0x1ae0, 0x012e, 0x0804,
+	0x3526, 0x012e, 0x0804, 0x3558, 0x012e, 0x0804, 0x355b, 0x080c,
+	0x4acb, 0x0904, 0x355b, 0x080c, 0x66cf, 0x0904, 0x3558, 0xbaa0,
+	0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x927e, 0x0076, 0x903e,
+	0x080c, 0x9151, 0x900e, 0x080c, 0xe30c, 0x007e, 0x00ce, 0x080c,
+	0x676b, 0x0804, 0x3526, 0x080c, 0x4acb, 0x0904, 0x355b, 0x080c,
+	0x676b, 0x2208, 0x0804, 0x3526, 0x0156, 0x00d6, 0x00e6, 0x2069,
+	0x1910, 0x6810, 0x6914, 0x910a, 0x1208, 0x900e, 0x6816, 0x9016,
+	0x901e, 0x20a9, 0x007e, 0x2069, 0x1000, 0x2d04, 0x905d, 0x0118,
+	0xb84c, 0x0059, 0x9210, 0x8d68, 0x1f04, 0x3855, 0x2300, 0x9218,
+	0x00ee, 0x00de, 0x015e, 0x0804, 0x3526, 0x00f6, 0x0016, 0x907d,
+	0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178, 0x0cd0,
+	0x001e, 0x00fe, 0x0005, 0x2069, 0x1910, 0x6910, 0x62bc, 0x0804,
+	0x3526, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3558, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x56ec, 0x0128, 0x2009, 0x0007, 0x012e,
+	0x0804, 0x3558, 0x012e, 0x615c, 0x9190, 0x3327, 0x2215, 0x9294,
+	0x00ff, 0x637c, 0x83ff, 0x0108, 0x6280, 0x67dc, 0x97c4, 0x000a,
+	0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8, 0x97c4, 0x0022,
+	0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8, 0x97c4, 0x0012,
+	0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068, 0x080c, 0x73a5,
+	0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120, 0x2009, 0x0005,
+	0x0804, 0x3558, 0x9036, 0x7e9a, 0x7f9e, 0x0804, 0x3526, 0x614c,
+	0x6250, 0x2019, 0x1985, 0x231c, 0x2001, 0x1986, 0x2004, 0x789a,
+	0x0804, 0x3526, 0x0126, 0x2091, 0x8000, 0x6138, 0x623c, 0x6340,
+	0x012e, 0x0804, 0x3526, 0x080c, 0x4ae7, 0x0904, 0x355b, 0xba44,
+	0xbb38, 0x0804, 0x3526, 0x080c, 0x0dd5, 0x080c, 0x4ae7, 0x2110,
+	0x0904, 0x355b, 0xb804, 0x908c, 0x00ff, 0x918e, 0x0006, 0x0140,
+	0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009, 0x1904, 0x3558,
+	0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c,
+	0xa80e, 0x080c, 0x927e, 0x0076, 0x903e, 0x080c, 0x9151, 0x900e,
+	0x080c, 0xe30c, 0x007e, 0x00ce, 0xb807, 0x0407, 0x012e, 0x0804,
+	0x3526, 0x614c, 0x6250, 0x7884, 0x604e, 0x7b88, 0x6352, 0x2069,
+	0x1847, 0x831f, 0x9305, 0x6816, 0x788c, 0x2069, 0x1985, 0x2d1c,
+	0x206a, 0x7e98, 0x9682, 0x0014, 0x1210, 0x2031, 0x07d0, 0x2069,
+	0x1986, 0x2d04, 0x266a, 0x789a, 0x0804, 0x3526, 0x0126, 0x2091,
+	0x8000, 0x7884, 0x603a, 0xd0c4, 0x01a8, 0x00d6, 0x78a8, 0x2009,
+	0x199c, 0x200a, 0x78ac, 0x2011, 0x199d, 0x2012, 0x2069, 0x0100,
+	0x6838, 0x9086, 0x0007, 0x1118, 0x2214, 0x6a5a, 0x0010, 0x210c,
+	0x695a, 0x00de, 0x7884, 0xd0b4, 0x0120, 0x3b00, 0x9084, 0xff3f,
+	0x20d8, 0x7888, 0x603e, 0x2011, 0x0114, 0x220c, 0x7888, 0xd08c,
+	0x0118, 0x918d, 0x0080, 0x0010, 0x918c, 0xff7f, 0x2112, 0x788c,
+	0x6042, 0x9084, 0x0020, 0x0130, 0x78b4, 0x6046, 0x9084, 0x0001,
+	0x090c, 0x421b, 0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114,
+	0x2012, 0x012e, 0x0804, 0x3526, 0x00f6, 0x2079, 0x1800, 0x7a38,
+	0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002,
+	0x9214, 0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, 0x7898,
+	0x9005, 0x01a8, 0x7888, 0x9025, 0x0904, 0x355b, 0x788c, 0x902d,
+	0x0904, 0x355b, 0x900e, 0x080c, 0x6608, 0x1120, 0xba44, 0xbb38,
+	0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c,
+	0x4ae7, 0x0904, 0x355b, 0x7888, 0x900d, 0x0904, 0x355b, 0x788c,
+	0x9005, 0x0904, 0x355b, 0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804,
+	0x3526, 0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, 0x56ec,
+	0x1904, 0x3558, 0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, 0x00ff,
+	0x1130, 0x2001, 0x1818, 0x2004, 0x9085, 0xff00, 0x0088, 0x9182,
+	0x007f, 0x16e0, 0x9188, 0x3327, 0x210d, 0x918c, 0x00ff, 0x2001,
+	0x1818, 0x2004, 0x0026, 0x9116, 0x002e, 0x0580, 0x810f, 0x9105,
+	0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0xae1b, 0x000e, 0x0510,
+	0x602e, 0x620a, 0x7984, 0x00b6, 0x080c, 0x65ad, 0x2b08, 0x00be,
+	0x1500, 0x6112, 0x6023, 0x0001, 0x080c, 0x4ab4, 0x01d0, 0x9006,
+	0xa866, 0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f,
+	0x3a0c, 0x2900, 0x6016, 0x2009, 0x0032, 0x080c, 0xaeec, 0x012e,
+	0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x3558, 0x00ce, 0x0804,
+	0x355b, 0x080c, 0xae71, 0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904,
+	0x3558, 0x0804, 0x3526, 0x2061, 0x1a70, 0x0126, 0x2091, 0x8000,
+	0x6000, 0xd084, 0x0170, 0x6104, 0x6208, 0x2061, 0x1800, 0x6354,
+	0x6074, 0x789a, 0x60c0, 0x789e, 0x60bc, 0x78aa, 0x012e, 0x0804,
+	0x3526, 0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, 0x3558, 0x080c,
+	0x73a5, 0x0904, 0x3558, 0x0126, 0x2091, 0x8000, 0x6254, 0x6074,
+	0x9202, 0x0248, 0x9085, 0x0001, 0x080c, 0x28a9, 0x080c, 0x5906,
+	0x012e, 0x0804, 0x3526, 0x012e, 0x0804, 0x355b, 0x0006, 0x0016,
+	0x00c6, 0x00e6, 0x2001, 0x19a8, 0x2070, 0x2061, 0x1847, 0x6008,
+	0x2072, 0x900e, 0x2011, 0x1400, 0x080c, 0x8f51, 0x7206, 0x00ee,
+	0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff,
+	0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3528, 0x7884, 0xd0fc,
+	0x0148, 0x2001, 0x002a, 0x2004, 0x9082, 0x00e1, 0x0288, 0x012e,
+	0x0804, 0x355b, 0x2001, 0x002a, 0x2004, 0x2069, 0x1847, 0x6908,
+	0x9102, 0x1230, 0x012e, 0x0804, 0x355b, 0x012e, 0x0804, 0x3558,
+	0x080c, 0xaddb, 0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x3ad7, 0x00c6,
+	0x080c, 0x4ab4, 0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a,
+	0x7898, 0xa80e, 0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a,
+	0x2001, 0x002f, 0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822,
+	0x2001, 0x0031, 0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a,
+	0x2001, 0x0035, 0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080,
+	0x0003, 0x9084, 0x00fc, 0x8004, 0xa816, 0x080c, 0x3c5d, 0x0928,
+	0x7014, 0x2048, 0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808,
+	0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c,
+	0x4afd, 0x701f, 0x3b9a, 0x7023, 0x0001, 0x012e, 0x0005, 0x0046,
+	0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
+	0x080c, 0x3a46, 0x2001, 0x199e, 0x2003, 0x0000, 0x2021, 0x000a,
+	0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1,
+	0x60bf, 0x0012, 0x080c, 0x3ccc, 0x080c, 0x3c8b, 0x00f6, 0x00e6,
+	0x0086, 0x2940, 0x2071, 0x1a65, 0x2079, 0x0090, 0x00d6, 0x2069,
+	0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035, 0x2004, 0x780e,
+	0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c,
+	0x405f, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3f8c, 0x080c, 0x3e91,
+	0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1db8, 0x080c,
+	0x40d3, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070,
+	0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050, 0x9084, 0xff00,
+	0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050, 0x9084, 0xff00,
+	0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054, 0x7037, 0x0000,
+	0x715c, 0x9106, 0x1190, 0x2001, 0x1820, 0x2004, 0x9106, 0x1168,
+	0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138,
+	0x080c, 0x3e9b, 0x080c, 0x3c86, 0x0058, 0x080c, 0x3c86, 0x080c,
+	0x3ff7, 0x080c, 0x3f82, 0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8,
+	0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002,
+	0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x60bb, 0x0000,
+	0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004, 0x200c, 0x918c,
+	0xfffd, 0x2102, 0x080c, 0x12ed, 0x2009, 0x0028, 0x080c, 0x23d4,
+	0x2001, 0x0227, 0x200c, 0x2102, 0x00fe, 0x00ee, 0x00de, 0x00ce,
+	0x00be, 0x00ae, 0x009e, 0x008e, 0x004e, 0x2001, 0x199e, 0x2004,
+	0x9005, 0x1118, 0x012e, 0x0804, 0x3526, 0x012e, 0x2021, 0x400c,
+	0x0804, 0x3528, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076,
+	0x0086, 0x0096, 0x00d6, 0x0156, 0x7014, 0x2048, 0x7020, 0x20a8,
+	0x8000, 0x7022, 0xa804, 0x9005, 0x0904, 0x3bf6, 0x2048, 0x1f04,
+	0x3baa, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, 0xa930,
+	0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x0096,
+	0x7014, 0x2048, 0xa864, 0x009e, 0x9086, 0x0103, 0x0170, 0x8906,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b,
+	0x080c, 0x4afd, 0x701f, 0x3b9a, 0x00b0, 0x8906, 0x8006, 0x8007,
+	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0,
+	0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f7c, 0x000e, 0x080c,
+	0x4b00, 0x701f, 0x3b9a, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e,
+	0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x7014, 0x2048,
+	0xa864, 0x9086, 0x0103, 0x1118, 0x701f, 0x3c5b, 0x0450, 0x7014,
+	0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009, 0x007f, 0x080c, 0x65a7,
+	0x0110, 0x9006, 0x0030, 0xb813, 0x00ff, 0xb817, 0xfffd, 0x080c,
+	0xd013, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e,
+	0x003e, 0x002e, 0x001e, 0x0904, 0x3558, 0x0016, 0x0026, 0x0036,
+	0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x701f,
+	0x3c2d, 0x7007, 0x0003, 0x0804, 0x3beb, 0xa830, 0x9086, 0x0100,
+	0x2021, 0x400c, 0x0904, 0x3528, 0x0076, 0xad10, 0xac0c, 0xab24,
+	0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021,
 	0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x001b, 0x080c, 0x4aed, 0x701f, 0x3b8d, 0x7023, 0x0001,
-	0x012e, 0x0005, 0x0046, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3a39, 0x2001, 0x199f, 0x2003,
-	0x0000, 0x2021, 0x000a, 0x2061, 0x0100, 0x6104, 0x0016, 0x60bb,
-	0x0000, 0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c, 0x3cbf, 0x080c,
-	0x3c7e, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x1a66, 0x2079,
-	0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001,
-	0x0035, 0x2004, 0x780e, 0x2001, 0x0034, 0x2004, 0x780a, 0x00de,
-	0x2011, 0x0001, 0x080c, 0x4052, 0x008e, 0x00ee, 0x00fe, 0x080c,
-	0x3f7f, 0x080c, 0x3e84, 0x05b8, 0x2001, 0x020b, 0x2004, 0x9084,
-	0x0140, 0x1db8, 0x080c, 0x40c6, 0x00f6, 0x2079, 0x0300, 0x78bc,
-	0x00fe, 0x908c, 0x0070, 0x1560, 0x2071, 0x0200, 0x7037, 0x0000,
-	0x7050, 0x9084, 0xff00, 0x9086, 0x3200, 0x1510, 0x7037, 0x0001,
-	0x7050, 0x9084, 0xff00, 0x9086, 0xe100, 0x11d0, 0x7037, 0x0000,
-	0x7054, 0x7037, 0x0000, 0x715c, 0x9106, 0x1190, 0x2001, 0x1820,
-	0x2004, 0x9106, 0x1168, 0x00c6, 0x2061, 0x0100, 0x6024, 0x9084,
-	0x1e00, 0x00ce, 0x0138, 0x080c, 0x3e8e, 0x080c, 0x3c79, 0x0058,
-	0x080c, 0x3c79, 0x080c, 0x3fea, 0x080c, 0x3f75, 0x2001, 0x020b,
-	0x2004, 0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061,
-	0x0100, 0x6027, 0x0002, 0x001e, 0x6106, 0x2011, 0x020d, 0x2013,
-	0x0020, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001,
-	0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x12ed, 0x2009,
-	0x0028, 0x080c, 0x23d2, 0x2001, 0x0227, 0x200c, 0x2102, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x004e,
-	0x2001, 0x199f, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804, 0x3524,
-	0x012e, 0x2021, 0x400c, 0x0804, 0x3526, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x7014,
-	0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005, 0x0904,
-	0x3be9, 0x2048, 0x1f04, 0x3b9d, 0x7068, 0x2040, 0xa28c, 0xa390,
-	0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000,
-	0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e, 0x9086,
-	0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
-	0xffc0, 0x9080, 0x001b, 0x080c, 0x4aed, 0x701f, 0x3b8d, 0x00b0,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c,
-	0x0f7c, 0x000e, 0x080c, 0x4af0, 0x701f, 0x3b8d, 0x015e, 0x00de,
-	0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118, 0x701f,
-	0x3c4e, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009,
-	0x007f, 0x080c, 0x659e, 0x0110, 0x9006, 0x0030, 0xb813, 0x00ff,
-	0xb817, 0xfffd, 0x080c, 0xcff9, 0x015e, 0x00de, 0x009e, 0x008e,
-	0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904, 0x3556,
-	0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096,
-	0x00d6, 0x0156, 0x701f, 0x3c20, 0x7007, 0x0003, 0x0804, 0x3bde,
-	0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x3526, 0x0076,
-	0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120,
-	0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098,
-	0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f7c, 0x000e, 0x080c, 0x4af0,
-	0x007e, 0x701f, 0x3b8d, 0x7023, 0x0001, 0x0005, 0x0804, 0x3524,
-	0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833, 0x001e,
-	0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c, 0x4aa4,
-	0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58,
-	0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005, 0x0006,
-	0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe, 0x000e,
-	0x0005, 0x2001, 0x199f, 0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6,
-	0x00c6, 0x2061, 0x0200, 0x2001, 0x19aa, 0x2004, 0x601a, 0x2061,
-	0x0100, 0x2001, 0x19a9, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106,
-	0x080c, 0x4aa4, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a,
-	0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a,
-	0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19a9, 0x2004, 0x6036,
-	0x2009, 0x0040, 0x080c, 0x23d2, 0x2001, 0x002a, 0x2004, 0x9084,
-	0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000, 0x78ca,
-	0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6,
-	0x080c, 0x4aa4, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800,
-	0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031, 0x2004,
-	0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873,
-	0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300, 0x2003,
-	0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c,
-	0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x81ff, 0x0148, 0x080c, 0x2c30, 0x1130, 0x9006, 0x080c, 0x2b88,
-	0x9006, 0x080c, 0x2b6b, 0x7884, 0x9084, 0x0007, 0x0002, 0x3d0a,
-	0x3d13, 0x3d1c, 0x3d07, 0x3d07, 0x3d07, 0x3d07, 0x3d07, 0x012e,
-	0x0804, 0x3559, 0x2009, 0x0114, 0x2104, 0x9085, 0x0800, 0x200a,
-	0x080c, 0x3ed8, 0x00c0, 0x2009, 0x0114, 0x2104, 0x9085, 0x4000,
-	0x200a, 0x080c, 0x3ed8, 0x0078, 0x080c, 0x73bc, 0x1128, 0x012e,
-	0x2009, 0x0016, 0x0804, 0x3556, 0x81ff, 0x0128, 0x012e, 0x2021,
-	0x400b, 0x0804, 0x3526, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3a39, 0x2009, 0x0101, 0x210c,
-	0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060, 0x2058, 0x080c,
-	0x41a1, 0x080c, 0x40f1, 0x903e, 0x2720, 0x00f6, 0x00e6, 0x0086,
-	0x2940, 0x2071, 0x1a66, 0x2079, 0x0090, 0x00d6, 0x2069, 0x0000,
-	0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0, 0x780a, 0x00de,
-	0x2011, 0x0001, 0x080c, 0x4052, 0x080c, 0x2c38, 0x080c, 0x2c38,
-	0x080c, 0x2c38, 0x080c, 0x2c38, 0x080c, 0x4052, 0x008e, 0x00ee,
-	0x00fe, 0x080c, 0x3f7f, 0x2009, 0x9c40, 0x8109, 0x11b0, 0x080c,
-	0x3e8e, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x001e,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e,
-	0x2009, 0x0017, 0x080c, 0x3556, 0x0cf8, 0x2001, 0x020b, 0x2004,
-	0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000, 0x7884, 0x00fe,
-	0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0150, 0x080c,
-	0x3f5d, 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c, 0x3e8e, 0x0804,
-	0x3e3b, 0x080c, 0x40c6, 0x080c, 0x3fea, 0x080c, 0x3f40, 0x080c,
-	0x3f75, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac, 0x0130, 0x8b58,
-	0x080c, 0x3e8e, 0x00fe, 0x0804, 0x3e3b, 0x00fe, 0x080c, 0x3e84,
-	0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001, 0x0033, 0x2502,
-	0x080c, 0x3e8e, 0x0080, 0x87ff, 0x0138, 0x2001, 0x0201, 0x2004,
-	0x9005, 0x1908, 0x8739, 0x0038, 0x2001, 0x1a62, 0x2004, 0x9086,
-	0x0000, 0x1904, 0x3d8b, 0x2001, 0x032f, 0x2003, 0x00f6, 0x8631,
-	0x1208, 0x8529, 0x2500, 0x9605, 0x0904, 0x3e3b, 0x7884, 0xd0bc,
-	0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3e3b, 0xa013, 0x0019,
-	0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1148, 0x2001,
-	0x1a62, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x0030,
-	0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016, 0x2800, 0xa05a,
-	0x2009, 0x0040, 0x080c, 0x23d2, 0x2900, 0xa85a, 0xa813, 0x0019,
-	0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6, 0x20a9, 0x0004,
-	0x2061, 0x0090, 0x602b, 0x0008, 0x2001, 0x0203, 0x2004, 0x1f04,
-	0x3e12, 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0, 0x9005, 0x0108,
-	0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061, 0x0090, 0x7827,
-	0x0002, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006,
-	0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x00ce,
-	0x00fe, 0x0804, 0x3d45, 0x001e, 0x00c6, 0x2001, 0x032a, 0x2003,
-	0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x6106, 0x2011, 0x020d,
-	0x2013, 0x0020, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102,
-	0x080c, 0x12ed, 0x7884, 0x9084, 0x0003, 0x9086, 0x0002, 0x01a0,
-	0x2009, 0x0028, 0x080c, 0x23d2, 0x2001, 0x0227, 0x200c, 0x2102,
-	0x6050, 0x9084, 0xb7ef, 0x6052, 0x602f, 0x0000, 0x604b, 0xf7f7,
-	0x6043, 0x0090, 0x6043, 0x0010, 0x00ce, 0x2d08, 0x2c10, 0x2b18,
-	0x2b00, 0x9c05, 0x9d05, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
-	0x00ae, 0x009e, 0x008e, 0x1118, 0x012e, 0x0804, 0x3524, 0x012e,
-	0x2021, 0x400c, 0x0804, 0x3526, 0x9085, 0x0001, 0x1d04, 0x3e8d,
-	0x2091, 0x6000, 0x8420, 0x9486, 0x0064, 0x0005, 0x2001, 0x0105,
-	0x2003, 0x0010, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x1a62,
-	0x2003, 0x0000, 0x0071, 0x2009, 0x0048, 0x080c, 0x23d2, 0x2001,
-	0x0227, 0x2024, 0x2402, 0x2001, 0x0109, 0x2003, 0x4000, 0x9026,
-	0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a66, 0x7000, 0x9086, 0x0000,
-	0x0520, 0x2079, 0x0090, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203,
-	0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x23d2, 0x782c,
-	0xd0fc, 0x0d88, 0x080c, 0x40c6, 0x7000, 0x9086, 0x0000, 0x1d58,
-	0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c,
-	0x23d2, 0x782b, 0x0002, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005,
-	0x00f6, 0x2079, 0x0100, 0x2001, 0x1818, 0x200c, 0x7932, 0x7936,
-	0x080c, 0x2887, 0x7850, 0x9084, 0xfbff, 0x9085, 0x0030, 0x7852,
-	0x2019, 0x01f4, 0x8319, 0x1df0, 0x9084, 0xffcf, 0x9085, 0x2000,
-	0x7852, 0x20a9, 0x0046, 0x1d04, 0x3ef3, 0x2091, 0x6000, 0x1f04,
-	0x3ef3, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfff, 0x7852, 0x2001,
-	0x0021, 0x2004, 0x9084, 0x0003, 0x9086, 0x0001, 0x1120, 0x7850,
-	0x9084, 0xdfff, 0x7852, 0x784b, 0xf7f7, 0x7843, 0x0090, 0x7843,
-	0x0010, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x3f13, 0x7850, 0x9085,
-	0x1400, 0x7852, 0x2019, 0x61a8, 0x7854, 0xa001, 0xa001, 0xd08c,
-	0x1110, 0x8319, 0x1dc8, 0x7827, 0x0048, 0x7850, 0x9085, 0x0400,
-	0x7852, 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001, 0xa001, 0x8319,
-	0x1de0, 0x2001, 0x0100, 0x080c, 0x2cef, 0x7827, 0x0020, 0x7843,
-	0x0000, 0x9006, 0x080c, 0x2cef, 0x7827, 0x0048, 0x00fe, 0x0005,
-	0x7884, 0xd0ac, 0x11c8, 0x00f6, 0x00e6, 0x2071, 0x1a62, 0x2079,
-	0x0320, 0x2001, 0x0201, 0x2004, 0x9005, 0x0160, 0x7000, 0x9086,
-	0x0000, 0x1140, 0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003,
-	0x782b, 0x0019, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300,
-	0x78bc, 0x00fe, 0x908c, 0x0070, 0x0178, 0x2009, 0x0032, 0x260a,
-	0x2009, 0x0033, 0x250a, 0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108,
-	0x8d68, 0xd0a4, 0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200,
-	0x781c, 0xd084, 0x0110, 0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6,
-	0x2071, 0x0100, 0x2001, 0x19aa, 0x2004, 0x70e2, 0x080c, 0x3c6f,
-	0x1188, 0x2001, 0x1820, 0x2004, 0x2009, 0x181f, 0x210c, 0x918c,
-	0x00ff, 0x706e, 0x716a, 0x7066, 0x918d, 0x3200, 0x7162, 0x7073,
-	0xe109, 0x0080, 0x702c, 0x9085, 0x0002, 0x702e, 0x2009, 0x1818,
-	0x210c, 0x716e, 0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000,
-	0x7073, 0x0809, 0x7077, 0x0008, 0x7078, 0x9080, 0x0100, 0x707a,
-	0x7080, 0x8000, 0x7082, 0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e,
-	0x707e, 0x70d6, 0x70ab, 0x0036, 0x70af, 0x95d5, 0x7014, 0x9084,
-	0x1984, 0x9085, 0x0092, 0x7016, 0x080c, 0x40c6, 0x00f6, 0x2071,
-	0x1a62, 0x2079, 0x0320, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4,
-	0x0120, 0x689c, 0x780e, 0x6898, 0x780a, 0x00de, 0x2009, 0x03e8,
-	0x8109, 0x1df0, 0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011,
-	0x0011, 0x080c, 0x4052, 0x2011, 0x0001, 0x080c, 0x4052, 0x00fe,
-	0x00ee, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a62, 0x2079, 0x0320,
-	0x792c, 0xd1fc, 0x0904, 0x404f, 0x782b, 0x0002, 0x9026, 0xd19c,
-	0x1904, 0x404b, 0x7000, 0x0002, 0x404f, 0x4000, 0x4030, 0x404b,
-	0xd1bc, 0x1170, 0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, 0x0001,
-	0x080c, 0x4052, 0x0904, 0x404f, 0x080c, 0x4052, 0x0804, 0x404f,
-	0x00f6, 0x2079, 0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914,
-	0x782b, 0x0004, 0x7812, 0x7916, 0x2001, 0x0201, 0x200c, 0x81ff,
-	0x0de8, 0x080c, 0x3f5d, 0x2009, 0x0001, 0x00f6, 0x2079, 0x0300,
-	0x78b8, 0x00fe, 0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, 0x00f8,
-	0x8001, 0x7002, 0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904,
-	0x3ff4, 0x2011, 0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, 0x0004,
-	0x9086, 0x0015, 0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, 0xa212,
-	0xd1dc, 0x1960, 0x0828, 0x782b, 0x0004, 0x7003, 0x0000, 0x00ee,
-	0x00fe, 0x0005, 0xa014, 0x9005, 0x0550, 0x8001, 0x0036, 0x0096,
-	0xa016, 0xa058, 0x2048, 0xa010, 0x2009, 0x0031, 0x911a, 0x831c,
-	0x831c, 0x938a, 0x0007, 0x1a0c, 0x0dd5, 0x9398, 0x4080, 0x231d,
-	0x083f, 0x9080, 0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e,
-	0x003e, 0x908a, 0x0035, 0x1140, 0x0096, 0xa058, 0x2048, 0xa804,
-	0xa05a, 0x2001, 0x0019, 0x009e, 0xa012, 0x9085, 0x0001, 0x0005,
-	0x40bd, 0x40b4, 0x40ab, 0x40a2, 0x4099, 0x4090, 0x4087, 0xa964,
-	0x7902, 0xa968, 0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, 0x0005,
-	0xa974, 0x7902, 0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, 0x7916,
-	0x0005, 0xa984, 0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, 0xa990,
-	0x7916, 0x0005, 0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, 0x7912,
-	0xa9a0, 0x7916, 0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac,
-	0x7912, 0xa9b0, 0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906,
-	0xa9bc, 0x7912, 0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8,
-	0x7906, 0xa9cc, 0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6,
-	0x0086, 0x2071, 0x1a66, 0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8,
-	0x782b, 0x0002, 0x2940, 0x9026, 0x7000, 0x0002, 0x40ed, 0x40d9,
-	0x40e4, 0x8001, 0x7002, 0xd19c, 0x1180, 0x2011, 0x0001, 0x080c,
-	0x4052, 0x190c, 0x4052, 0x0048, 0x8001, 0x7002, 0x782c, 0xd0fc,
-	0x1d38, 0x2011, 0x0001, 0x080c, 0x4052, 0x008e, 0x00ee, 0x00fe,
-	0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, 0x2001,
-	0x19aa, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x19a9, 0x2004,
-	0x60ce, 0x6104, 0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, 0x9005,
-	0x0520, 0x2038, 0x2001, 0x002e, 0x2024, 0x2001, 0x002f, 0x201c,
-	0x080c, 0x4aa4, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a,
-	0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e,
-	0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c,
-	0x4169, 0x1d68, 0x2900, 0xa85a, 0x00d0, 0x080c, 0x4aa4, 0xa813,
+	0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006,
+	0x080c, 0x0f7c, 0x000e, 0x080c, 0x4b00, 0x007e, 0x701f, 0x3b9a,
+	0x7023, 0x0001, 0x0005, 0x0804, 0x3526, 0x0156, 0x00c6, 0xa814,
+	0x908a, 0x001e, 0x0218, 0xa833, 0x001e, 0x0010, 0xa832, 0x0078,
+	0x81ff, 0x0168, 0x0016, 0x080c, 0x4ab4, 0x001e, 0x0130, 0xa800,
+	0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58, 0x9006, 0x0010, 0x9085,
+	0x0001, 0x00ce, 0x015e, 0x0005, 0x0006, 0x00f6, 0x2079, 0x0000,
+	0x7880, 0x9086, 0x0044, 0x00fe, 0x000e, 0x0005, 0x2001, 0x199e,
+	0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x2061, 0x0200,
+	0x2001, 0x19a9, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x19a8,
+	0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x080c, 0x4ab4, 0xa813,
 	0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004,
-	0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004,
-	0x9084, 0xfff8, 0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, 0x2061,
-	0x0090, 0x2079, 0x0100, 0x2001, 0x19a9, 0x2004, 0x6036, 0x2009,
-	0x0040, 0x080c, 0x23d2, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
-	0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e,
-	0x78ca, 0x9006, 0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe,
-	0x0005, 0x00e6, 0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1,
-	0x0000, 0x2099, 0x0088, 0x702b, 0x0026, 0x7402, 0x7306, 0x9006,
-	0x700a, 0x700e, 0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, 0x702b,
-	0x0041, 0x702c, 0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, 0x0040,
-	0x4005, 0x7400, 0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, 0x2940,
-	0x0086, 0x080c, 0x4aa4, 0x008e, 0xa058, 0x00a6, 0x2050, 0x2900,
-	0xb006, 0xa05a, 0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, 0x00ee,
-	0x0005, 0x00e6, 0x2001, 0x002d, 0x2004, 0x9005, 0x0528, 0x2038,
-	0x2001, 0x0030, 0x2024, 0x2001, 0x0031, 0x201c, 0x080c, 0x4aa4,
-	0x2940, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007,
-	0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096,
-	0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x4169,
-	0x1d68, 0x2900, 0xa85a, 0x00d8, 0x080c, 0x4aa4, 0x2940, 0xa013,
-	0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004,
-	0xa066, 0x2001, 0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, 0x2004,
-	0x9084, 0xfff8, 0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, 0x2001,
-	0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101,
-	0x200c, 0x918d, 0x0200, 0x2102, 0xa017, 0x0000, 0x2001, 0x1a62,
-	0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x2001, 0x0300,
-	0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004,
-	0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x20a9, 0x0007, 0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006,
-	0x4004, 0x20a9, 0x000c, 0x20a1, 0xfff4, 0x20e9, 0x0000, 0x9006,
-	0x4004, 0x2009, 0x013c, 0x200a, 0x012e, 0x7880, 0x9086, 0x0052,
-	0x0108, 0x0005, 0x0804, 0x3524, 0x7d98, 0x7c9c, 0x0804, 0x361b,
-	0x080c, 0x73bc, 0x190c, 0x5fdf, 0x6040, 0x9084, 0x0020, 0x09b1,
-	0x2069, 0x1847, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0x2039, 0x0001, 0x080c, 0x4aed, 0x701f, 0x4248, 0x0005,
-	0x080c, 0x56de, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8,
-	0x21d0, 0x2069, 0x1847, 0x6800, 0x9005, 0x0904, 0x3559, 0x6804,
-	0xd0ac, 0x0118, 0xd0a4, 0x0904, 0x3559, 0xd094, 0x00c6, 0x2061,
-	0x0100, 0x6104, 0x0138, 0x6200, 0x9292, 0x0005, 0x0218, 0x918c,
-	0xffdf, 0x0010, 0x918d, 0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6,
-	0x2061, 0x0100, 0x6104, 0x0118, 0x918d, 0x0010, 0x0010, 0x918c,
-	0xffef, 0x6106, 0x00ce, 0xd084, 0x0158, 0x6a28, 0x928a, 0x007f,
-	0x1a04, 0x3559, 0x9288, 0x3325, 0x210d, 0x918c, 0x00ff, 0x6166,
-	0xd0dc, 0x0130, 0x6828, 0x908a, 0x007f, 0x1a04, 0x3559, 0x605e,
-	0x6888, 0x9084, 0x0030, 0x8004, 0x8004, 0x8004, 0x8004, 0x0006,
-	0x2009, 0x19b1, 0x9080, 0x297a, 0x2005, 0x200a, 0x000e, 0x2009,
-	0x19b2, 0x9080, 0x297e, 0x2005, 0x200a, 0x6808, 0x908a, 0x0100,
-	0x0a04, 0x3559, 0x908a, 0x0841, 0x1a04, 0x3559, 0x9084, 0x0007,
-	0x1904, 0x3559, 0x680c, 0x9005, 0x0904, 0x3559, 0x6810, 0x9005,
-	0x0904, 0x3559, 0x6848, 0x6940, 0x910a, 0x1a04, 0x3559, 0x8001,
-	0x0904, 0x3559, 0x684c, 0x6944, 0x910a, 0x1a04, 0x3559, 0x8001,
-	0x0904, 0x3559, 0x2009, 0x1981, 0x200b, 0x0000, 0x2001, 0x1869,
-	0x2004, 0xd0c4, 0x0140, 0x7884, 0x200a, 0x2009, 0x017f, 0x200a,
-	0x3b00, 0xc085, 0x20d8, 0x6814, 0x908c, 0x00ff, 0x614e, 0x8007,
-	0x9084, 0x00ff, 0x6052, 0x080c, 0x76d5, 0x080c, 0x69a8, 0x080c,
-	0x69dc, 0x6808, 0x602a, 0x080c, 0x2344, 0x2009, 0x0170, 0x200b,
-	0x0080, 0xa001, 0xa001, 0x200b, 0x0000, 0x0036, 0x6b08, 0x080c,
-	0x28e1, 0x003e, 0x6000, 0x9086, 0x0000, 0x1904, 0x43df, 0x6818,
-	0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, 0x6016,
-	0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934,
-	0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, 0x0010, 0x9084,
-	0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, 0x8007, 0x810f, 0x8217,
-	0x831f, 0x20a9, 0x0004, 0x20a1, 0x19b3, 0x20e9, 0x0001, 0x4001,
-	0x20a9, 0x0004, 0x20a1, 0x19cd, 0x20e9, 0x0001, 0x4001, 0x080c,
-	0x85ef, 0x00c6, 0x900e, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x0510,
-	0x0068, 0x2009, 0x0100, 0x210c, 0x918e, 0x0008, 0x1110, 0x839d,
-	0x0010, 0x83f5, 0x3e18, 0x12b0, 0x3508, 0x8109, 0x080c, 0x7c8b,
-	0x6878, 0x6016, 0x6874, 0x2008, 0x9084, 0xff00, 0x8007, 0x600a,
-	0x9184, 0x00ff, 0x6006, 0x8108, 0x1118, 0x6003, 0x0003, 0x0010,
-	0x6003, 0x0001, 0x1f04, 0x4339, 0x00ce, 0x00c6, 0x2061, 0x199c,
-	0x6a88, 0x9284, 0xc000, 0x2010, 0x9286, 0x0000, 0x1158, 0x2063,
-	0x0000, 0x2001, 0x0001, 0x080c, 0x2b88, 0x2001, 0x0001, 0x080c,
-	0x2b6b, 0x0088, 0x9286, 0x4000, 0x1148, 0x2063, 0x0001, 0x9006,
-	0x080c, 0x2b88, 0x9006, 0x080c, 0x2b6b, 0x0028, 0x9286, 0x8000,
-	0x1d30, 0x2063, 0x0002, 0x00ce, 0x6888, 0xd0ec, 0x0130, 0x2011,
-	0x0114, 0x2204, 0x9085, 0x0100, 0x2012, 0x6a80, 0x9284, 0x0030,
-	0x9086, 0x0030, 0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82,
-	0x2001, 0x197c, 0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170,
-	0x928e, 0x0010, 0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa,
-	0x080c, 0x2956, 0x2001, 0x196d, 0x2102, 0x0008, 0x2102, 0x00c6,
-	0x2061, 0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c,
-	0x73bc, 0x0128, 0x080c, 0x4fdb, 0x0110, 0x080c, 0x28a7, 0x60d4,
-	0x9005, 0x01c0, 0x6003, 0x0001, 0x2009, 0x43c7, 0x00e0, 0x080c,
-	0x73bc, 0x1168, 0x2011, 0x7252, 0x080c, 0x84f3, 0x2011, 0x7245,
-	0x080c, 0x85cd, 0x080c, 0x76a9, 0x080c, 0x72ee, 0x0040, 0x080c,
-	0x5ed9, 0x0028, 0x6003, 0x0004, 0x2009, 0x43df, 0x0020, 0x080c,
-	0x68d4, 0x0804, 0x3524, 0x2001, 0x0170, 0x2004, 0x9084, 0x00ff,
-	0x9086, 0x004c, 0x1118, 0x2091, 0x30bd, 0x0817, 0x2091, 0x303d,
-	0x0817, 0x6000, 0x9086, 0x0000, 0x0904, 0x3556, 0x2069, 0x1847,
-	0x7890, 0x6842, 0x7894, 0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0804, 0x4af0, 0x9006,
-	0x080c, 0x28a7, 0x81ff, 0x1904, 0x3556, 0x080c, 0x73bc, 0x11b0,
-	0x080c, 0x76a4, 0x080c, 0x601a, 0x080c, 0x3319, 0x0118, 0x6130,
-	0xc18d, 0x6132, 0x080c, 0xd230, 0x0130, 0x080c, 0x73df, 0x1118,
-	0x080c, 0x7394, 0x0038, 0x080c, 0x72ee, 0x0020, 0x080c, 0x5fdf,
-	0x080c, 0x5ed9, 0x0804, 0x3524, 0x81ff, 0x1904, 0x3556, 0x080c,
-	0x73bc, 0x1110, 0x0804, 0x3556, 0x6194, 0x81ff, 0x01a8, 0x704f,
-	0x0000, 0x2001, 0x1c80, 0x2009, 0x0040, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0x0126, 0x2091, 0x8000, 0x2039, 0x0001, 0x080c, 0x4af0,
-	0x701f, 0x3522, 0x012e, 0x0005, 0x704f, 0x0001, 0x00d6, 0x2069,
-	0x1c80, 0x20a9, 0x0040, 0x20e9, 0x0001, 0x20a1, 0x1c80, 0x2019,
-	0xffff, 0x4304, 0x655c, 0x9588, 0x3325, 0x210d, 0x918c, 0x00ff,
-	0x216a, 0x900e, 0x2011, 0x0002, 0x2100, 0x9506, 0x01a8, 0x080c,
-	0x65ff, 0x1190, 0xb814, 0x821c, 0x0238, 0x9398, 0x1c80, 0x9085,
-	0xff00, 0x8007, 0x201a, 0x0038, 0x9398, 0x1c80, 0x2324, 0x94a4,
-	0xff00, 0x9405, 0x201a, 0x8210, 0x8108, 0x9182, 0x0080, 0x1208,
-	0x0c18, 0x8201, 0x8007, 0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9,
-	0x0040, 0x20a1, 0x1c80, 0x2099, 0x1c80, 0x080c, 0x5f6a, 0x0804,
-	0x4439, 0x080c, 0x4ad7, 0x0904, 0x3559, 0x080c, 0x4aa4, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x3556, 0x080c, 0x56cf, 0xd0b4, 0x0558,
-	0x7884, 0x908e, 0x007e, 0x0538, 0x908e, 0x007f, 0x0520, 0x908e,
-	0x0080, 0x0508, 0x080c, 0x3314, 0x1148, 0xb800, 0xd08c, 0x11d8,
-	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x11a8, 0xa867, 0x0000,
-	0xa868, 0xc0fd, 0xa86a, 0x080c, 0xccfe, 0x1120, 0x2009, 0x0003,
-	0x0804, 0x3556, 0x7007, 0x0003, 0x701f, 0x44c7, 0x0005, 0x080c,
-	0x4ad7, 0x0904, 0x3559, 0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8,
-	0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003,
-	0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8,
-	0x9080, 0x0006, 0x2098, 0x080c, 0x0f7c, 0x0070, 0x20a9, 0x0004,
-	0xa85c, 0x9080, 0x000a, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080,
-	0x000a, 0x2098, 0x080c, 0x0f7c, 0x8906, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4af0, 0x81ff, 0x1904, 0x3556,
-	0x080c, 0x4abb, 0x0904, 0x3559, 0x080c, 0x6771, 0x0904, 0x3556,
-	0x0058, 0xa878, 0x9005, 0x0120, 0x2009, 0x0004, 0x0804, 0x3556,
-	0xa974, 0xaa94, 0x0804, 0x3524, 0x080c, 0x56d7, 0x0904, 0x3524,
-	0x701f, 0x4511, 0x7007, 0x0003, 0x0005, 0x81ff, 0x1904, 0x3556,
-	0x7888, 0x908a, 0x1000, 0x1a04, 0x3559, 0x080c, 0x4ad7, 0x0904,
-	0x3559, 0x080c, 0x6972, 0x0120, 0x080c, 0x697a, 0x1904, 0x3559,
-	0x080c, 0x67f6, 0x0904, 0x3556, 0x2019, 0x0004, 0x900e, 0x080c,
-	0x6783, 0x0904, 0x3556, 0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c,
-	0x908a, 0x1000, 0x12f8, 0x080c, 0x4ad5, 0x01e0, 0x080c, 0x6972,
-	0x0118, 0x080c, 0x697a, 0x11b0, 0x080c, 0x67f6, 0x2009, 0x0002,
-	0x0168, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x6783, 0x2009,
-	0x0003, 0x0120, 0xa998, 0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005,
-	0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
-	0x0030, 0x0005, 0xa897, 0x4000, 0x080c, 0x56d7, 0x0110, 0x9006,
-	0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x9186,
-	0x00ff, 0x0110, 0x0071, 0x0060, 0x2029, 0x007e, 0x2061, 0x1800,
-	0x645c, 0x2400, 0x9506, 0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8,
-	0x0005, 0x080c, 0x65ff, 0x1138, 0x2200, 0x8003, 0x800b, 0x810b,
-	0x9108, 0x080c, 0x8501, 0x0005, 0x81ff, 0x1904, 0x3556, 0x798c,
-	0x2001, 0x1980, 0x918c, 0x8000, 0x2102, 0x080c, 0x4abb, 0x0904,
-	0x3559, 0x080c, 0x6972, 0x0120, 0x080c, 0x697a, 0x1904, 0x3559,
-	0x080c, 0x66c6, 0x0904, 0x3556, 0x080c, 0x677a, 0x0904, 0x3556,
-	0x2001, 0x1980, 0x2004, 0xd0fc, 0x1904, 0x3524, 0x0804, 0x451c,
-	0xa9a0, 0x2001, 0x1980, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c,
-	0x4ac8, 0x01a0, 0x080c, 0x6972, 0x0118, 0x080c, 0x697a, 0x1170,
-	0x080c, 0x66c6, 0x2009, 0x0002, 0x0128, 0x080c, 0x677a, 0x1170,
-	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0x2001, 0x1980, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x56d7, 0x0110,
-	0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005,
-	0x81ff, 0x1904, 0x3556, 0x798c, 0x2001, 0x197f, 0x918c, 0x8000,
-	0x2102, 0x080c, 0x4abb, 0x0904, 0x3559, 0x080c, 0x6972, 0x0120,
-	0x080c, 0x697a, 0x1904, 0x3559, 0x080c, 0x66c6, 0x0904, 0x3556,
-	0x080c, 0x6768, 0x0904, 0x3556, 0x2001, 0x197f, 0x2004, 0xd0fc,
-	0x1904, 0x3524, 0x0804, 0x451c, 0xa9a0, 0x2001, 0x197f, 0x918c,
-	0x8000, 0xc18d, 0x2102, 0x080c, 0x4ac8, 0x01a0, 0x080c, 0x6972,
-	0x0118, 0x080c, 0x697a, 0x1170, 0x080c, 0x66c6, 0x2009, 0x0002,
-	0x0128, 0x080c, 0x6768, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005,
-	0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
-	0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197f, 0x2004, 0xd0fc,
-	0x1128, 0x080c, 0x56d7, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0000, 0x0005, 0x6100, 0x0804, 0x3524, 0x080c,
-	0x4ad7, 0x0904, 0x3559, 0x080c, 0x56e3, 0x1904, 0x3556, 0x79a8,
-	0xd184, 0x1158, 0xb834, 0x8007, 0x789e, 0xb830, 0x8007, 0x789a,
-	0xbb2c, 0x831f, 0xba28, 0x8217, 0x0050, 0xb824, 0x8007, 0x789e,
-	0xb820, 0x8007, 0x789a, 0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900,
-	0x918c, 0x0200, 0x0804, 0x3524, 0x78a8, 0x909c, 0x0003, 0xd0b4,
-	0x1148, 0x939a, 0x0003, 0x1a04, 0x3556, 0x625c, 0x7884, 0x9206,
-	0x1904, 0x46c9, 0x080c, 0x85d9, 0x2001, 0xfff4, 0x2009, 0x000c,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0000, 0x0006, 0x78a8,
-	0x9084, 0x0080, 0x11c8, 0x0006, 0x0036, 0x2001, 0x1a7f, 0x201c,
-	0x7b9a, 0x2003, 0x0000, 0x2001, 0x1a80, 0x201c, 0x7b9e, 0x2003,
-	0x0000, 0x2001, 0x1a81, 0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e,
-	0x000e, 0x000e, 0x0804, 0x4af0, 0x000e, 0x2031, 0x0000, 0x2061,
-	0x18b8, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392,
-	0xa496, 0xa59a, 0x080c, 0x10e9, 0x7007, 0x0002, 0x701f, 0x46e9,
-	0x0005, 0x81ff, 0x1904, 0x3556, 0x080c, 0x4ad7, 0x0904, 0x3559,
-	0x080c, 0x6972, 0x1904, 0x3556, 0x00c6, 0x080c, 0x4aa4, 0x00ce,
-	0x0904, 0x3556, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8,
-	0x080c, 0xcca4, 0x0904, 0x3556, 0x7007, 0x0003, 0x701f, 0x4703,
-	0x0005, 0x080c, 0x420e, 0x0006, 0x0036, 0x2001, 0x1a7f, 0x201c,
-	0x7b9a, 0x2003, 0x0000, 0x2001, 0x1a80, 0x201c, 0x7b9e, 0x2003,
-	0x0000, 0x2001, 0x1a81, 0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e,
-	0x000e, 0x0804, 0x3524, 0xa830, 0x9086, 0x0100, 0x0904, 0x3556,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x001b, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804,
-	0x4af0, 0x9006, 0x080c, 0x28a7, 0x78a8, 0x9084, 0x00ff, 0x9086,
-	0x00ff, 0x0118, 0x81ff, 0x1904, 0x3556, 0x080c, 0x73bc, 0x0110,
-	0x080c, 0x5fdf, 0x7888, 0x908a, 0x1000, 0x1a04, 0x3559, 0x7984,
-	0x9186, 0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04, 0x3559, 0x2100,
-	0x080c, 0x2871, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061,
-	0x19fa, 0x601b, 0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077,
-	0x0000, 0x080c, 0x73bc, 0x1158, 0x080c, 0x76a4, 0x080c, 0x601a,
-	0x9085, 0x0001, 0x080c, 0x7403, 0x080c, 0x72ee, 0x00d0, 0x080c,
-	0xadd2, 0x2061, 0x0100, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff,
-	0x810f, 0x9105, 0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009,
-	0x1999, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5f05, 0x080c,
-	0x858b, 0x7984, 0x080c, 0x73bc, 0x1110, 0x2009, 0x00ff, 0x7a88,
-	0x080c, 0x457f, 0x012e, 0x00ce, 0x002e, 0x0804, 0x3524, 0x7984,
-	0x080c, 0x659e, 0x2b08, 0x1904, 0x3559, 0x0804, 0x3524, 0x81ff,
-	0x0120, 0x2009, 0x0001, 0x0804, 0x3556, 0x60dc, 0xd0ac, 0x1130,
-	0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x3556, 0x080c, 0x4aa4,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x3556, 0x7984, 0x9192, 0x0021,
-	0x1a04, 0x3559, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
-	0x0019, 0x702a, 0xaf60, 0x7736, 0x080c, 0x4aed, 0x701f, 0x47b7,
-	0x7880, 0x9086, 0x006e, 0x0110, 0x701f, 0x518d, 0x0005, 0x2009,
-	0x0080, 0x080c, 0x65ff, 0x1118, 0x080c, 0x6972, 0x0120, 0x2021,
-	0x400a, 0x0804, 0x3526, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70,
-	0xac74, 0xad78, 0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x4850,
-	0x90be, 0x0112, 0x0904, 0x4850, 0x90be, 0x0113, 0x0904, 0x4850,
-	0x90be, 0x0114, 0x0904, 0x4850, 0x90be, 0x0117, 0x0904, 0x4850,
-	0x90be, 0x011a, 0x0904, 0x4850, 0x90be, 0x011c, 0x0904, 0x4850,
-	0x90be, 0x0121, 0x0904, 0x4837, 0x90be, 0x0131, 0x0904, 0x4837,
-	0x90be, 0x0171, 0x0904, 0x4850, 0x90be, 0x0173, 0x0904, 0x4850,
-	0x90be, 0x01a1, 0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x485b,
-	0x90be, 0x0212, 0x0904, 0x4844, 0x90be, 0x0213, 0x05e8, 0x90be,
-	0x0214, 0x0500, 0x90be, 0x0217, 0x0188, 0x90be, 0x021a, 0x1120,
-	0xa89c, 0x8007, 0xa89e, 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be,
-	0x0300, 0x05b0, 0x009e, 0x00de, 0x0804, 0x3559, 0x7028, 0x9080,
-	0x0010, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007,
-	0x080c, 0x4899, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034,
-	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x4899, 0x00c8, 0x7028,
-	0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9,
-	0x0001, 0x080c, 0x48a6, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098,
-	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x48a6,
-	0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8,
-	0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c, 0x4aa4, 0x0550, 0xa868,
-	0xc0fd, 0xa86a, 0xa867, 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020,
-	0xa88b, 0x0001, 0x810b, 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe,
-	0xadc2, 0xa9c6, 0xa8ca, 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822,
-	0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c, 0xccbf, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x3556, 0x7007, 0x0003, 0x701f, 0x4890,
-	0x0005, 0x00ce, 0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x3556,
-	0xa820, 0x9086, 0x8001, 0x1904, 0x3524, 0x2009, 0x0004, 0x0804,
-	0x3556, 0x0016, 0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104,
-	0x4004, 0x8211, 0x1dc8, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
-	0x0036, 0x0046, 0x3520, 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204,
-	0x4104, 0x4004, 0x8421, 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3556, 0x60dc,
-	0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x3556,
-	0x7984, 0x78a8, 0x2040, 0x080c, 0xadcb, 0x1120, 0x9182, 0x007f,
-	0x0a04, 0x3559, 0x9186, 0x00ff, 0x0904, 0x3559, 0x9182, 0x0800,
-	0x1a04, 0x3559, 0x7a8c, 0x7b88, 0x607c, 0x9306, 0x1140, 0x6080,
-	0x924e, 0x0904, 0x3559, 0x99cc, 0xff00, 0x0904, 0x3559, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x49b7, 0x0904, 0x4937, 0x0086, 0x90c6,
+	0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2061, 0x0090, 0x2079,
+	0x0100, 0x2001, 0x19a8, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c,
+	0x23d4, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0x601a,
+	0xa873, 0x0000, 0x601f, 0x0000, 0x78ca, 0x9006, 0x600a, 0x600e,
+	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x080c, 0x4ab4, 0x2940,
+	0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030,
+	0x2004, 0xa866, 0x2001, 0x0031, 0x2004, 0xa86a, 0x2001, 0x002a,
+	0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873, 0x0000, 0x2001, 0x032a,
+	0x2003, 0x0004, 0x2001, 0x0300, 0x2003, 0x0000, 0x2001, 0x020d,
+	0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, 0x0002, 0x2102,
+	0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0148, 0x080c,
+	0x2c32, 0x1130, 0x9006, 0x080c, 0x2b8a, 0x9006, 0x080c, 0x2b6d,
+	0x7884, 0x9084, 0x0007, 0x0002, 0x3d17, 0x3d20, 0x3d29, 0x3d14,
+	0x3d14, 0x3d14, 0x3d14, 0x3d14, 0x012e, 0x0804, 0x355b, 0x2009,
+	0x0114, 0x2104, 0x9085, 0x0800, 0x200a, 0x080c, 0x3ee5, 0x00c0,
+	0x2009, 0x0114, 0x2104, 0x9085, 0x4000, 0x200a, 0x080c, 0x3ee5,
+	0x0078, 0x080c, 0x73a5, 0x1128, 0x012e, 0x2009, 0x0016, 0x0804,
+	0x3558, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3528,
+	0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
+	0x080c, 0x3a46, 0x2009, 0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc,
+	0x9006, 0x2068, 0x2060, 0x2058, 0x080c, 0x41ae, 0x080c, 0x40fe,
+	0x903e, 0x2720, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x1a65,
+	0x2079, 0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120,
+	0x68d4, 0x780e, 0x68d0, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c,
+	0x405f, 0x080c, 0x2c3a, 0x080c, 0x2c3a, 0x080c, 0x2c3a, 0x080c,
+	0x2c3a, 0x080c, 0x405f, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3f8c,
+	0x2009, 0x9c40, 0x8109, 0x11b0, 0x080c, 0x3e9b, 0x2001, 0x0004,
+	0x200c, 0x918c, 0xfffd, 0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x2009, 0x0017, 0x080c,
+	0x3558, 0x0cf8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1d10,
+	0x00f6, 0x2079, 0x0000, 0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001,
+	0x0201, 0x200c, 0x81ff, 0x0150, 0x080c, 0x3f6a, 0x2d00, 0x9c05,
+	0x9b05, 0x0120, 0x080c, 0x3e9b, 0x0804, 0x3e48, 0x080c, 0x40d3,
+	0x080c, 0x3ff7, 0x080c, 0x3f4d, 0x080c, 0x3f82, 0x00f6, 0x2079,
+	0x0100, 0x7824, 0xd0ac, 0x0130, 0x8b58, 0x080c, 0x3e9b, 0x00fe,
+	0x0804, 0x3e48, 0x00fe, 0x080c, 0x3e91, 0x1150, 0x8d68, 0x2001,
+	0x0032, 0x2602, 0x2001, 0x0033, 0x2502, 0x080c, 0x3e9b, 0x0080,
+	0x87ff, 0x0138, 0x2001, 0x0201, 0x2004, 0x9005, 0x1908, 0x8739,
+	0x0038, 0x2001, 0x1a61, 0x2004, 0x9086, 0x0000, 0x1904, 0x3d98,
+	0x2001, 0x032f, 0x2003, 0x00f6, 0x8631, 0x1208, 0x8529, 0x2500,
+	0x9605, 0x0904, 0x3e48, 0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05,
+	0x9b05, 0x1904, 0x3e48, 0xa013, 0x0019, 0x2001, 0x032a, 0x2003,
+	0x0004, 0x7884, 0xd0ac, 0x1148, 0x2001, 0x1a61, 0x2003, 0x0003,
+	0x2001, 0x032a, 0x2003, 0x0009, 0x0030, 0xa017, 0x0001, 0x78b4,
+	0x9005, 0x0108, 0xa016, 0x2800, 0xa05a, 0x2009, 0x0040, 0x080c,
+	0x23d4, 0x2900, 0xa85a, 0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180,
+	0xa817, 0x0000, 0x00c6, 0x20a9, 0x0004, 0x2061, 0x0090, 0x602b,
+	0x0008, 0x2001, 0x0203, 0x2004, 0x1f04, 0x3e1f, 0x00ce, 0x0030,
+	0xa817, 0x0001, 0x78b0, 0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6,
+	0x2079, 0x0100, 0x2061, 0x0090, 0x7827, 0x0002, 0x2001, 0x002a,
+	0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004,
+	0x601e, 0x78c6, 0x000e, 0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3d52,
+	0x001e, 0x00c6, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100,
+	0x6027, 0x0002, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x2001,
+	0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x12ed, 0x7884,
+	0x9084, 0x0003, 0x9086, 0x0002, 0x01a0, 0x2009, 0x0028, 0x080c,
+	0x23d4, 0x2001, 0x0227, 0x200c, 0x2102, 0x6050, 0x9084, 0xb7ef,
+	0x6052, 0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043,
+	0x0010, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05, 0x9d05,
+	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e,
+	0x1118, 0x012e, 0x0804, 0x3526, 0x012e, 0x2021, 0x400c, 0x0804,
+	0x3528, 0x9085, 0x0001, 0x1d04, 0x3e9a, 0x2091, 0x6000, 0x8420,
+	0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, 0x0010, 0x2001,
+	0x032a, 0x2003, 0x0004, 0x2001, 0x1a61, 0x2003, 0x0000, 0x0071,
+	0x2009, 0x0048, 0x080c, 0x23d4, 0x2001, 0x0227, 0x2024, 0x2402,
+	0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005, 0x00f6, 0x00e6,
+	0x2071, 0x1a65, 0x7000, 0x9086, 0x0000, 0x0520, 0x2079, 0x0090,
+	0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120,
+	0x2009, 0x0040, 0x080c, 0x23d4, 0x782c, 0xd0fc, 0x0d88, 0x080c,
+	0x40d3, 0x7000, 0x9086, 0x0000, 0x1d58, 0x782b, 0x0004, 0x782c,
+	0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x23d4, 0x782b, 0x0002,
+	0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100,
+	0x2001, 0x1818, 0x200c, 0x7932, 0x7936, 0x080c, 0x2889, 0x7850,
+	0x9084, 0xfbff, 0x9085, 0x0030, 0x7852, 0x2019, 0x01f4, 0x8319,
+	0x1df0, 0x9084, 0xffcf, 0x9085, 0x2000, 0x7852, 0x20a9, 0x0046,
+	0x1d04, 0x3f00, 0x2091, 0x6000, 0x1f04, 0x3f00, 0x7850, 0x9085,
+	0x0400, 0x9084, 0xdfff, 0x7852, 0x2001, 0x0021, 0x2004, 0x9084,
+	0x0003, 0x9086, 0x0001, 0x1120, 0x7850, 0x9084, 0xdfff, 0x7852,
+	0x784b, 0xf7f7, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x0028,
+	0xa001, 0x1f04, 0x3f20, 0x7850, 0x9085, 0x1400, 0x7852, 0x2019,
+	0x61a8, 0x7854, 0xa001, 0xa001, 0xd08c, 0x1110, 0x8319, 0x1dc8,
+	0x7827, 0x0048, 0x7850, 0x9085, 0x0400, 0x7852, 0x7843, 0x0040,
+	0x2019, 0x01f4, 0xa001, 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100,
+	0x080c, 0x2cf1, 0x7827, 0x0020, 0x7843, 0x0000, 0x9006, 0x080c,
+	0x2cf1, 0x7827, 0x0048, 0x00fe, 0x0005, 0x7884, 0xd0ac, 0x11c8,
+	0x00f6, 0x00e6, 0x2071, 0x1a61, 0x2079, 0x0320, 0x2001, 0x0201,
+	0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000, 0x1140, 0x0051,
+	0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b, 0x0019, 0x00ee,
+	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c,
+	0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009, 0x0033, 0x250a,
+	0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4, 0x0108,
+	0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084, 0x0110,
+	0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, 0x2001,
+	0x19a9, 0x2004, 0x70e2, 0x080c, 0x3c7c, 0x1188, 0x2001, 0x1820,
+	0x2004, 0x2009, 0x181f, 0x210c, 0x918c, 0x00ff, 0x706e, 0x716a,
+	0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109, 0x0080, 0x702c,
+	0x9085, 0x0002, 0x702e, 0x2009, 0x1818, 0x210c, 0x716e, 0x7063,
+	0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, 0x0809, 0x7077,
+	0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080, 0x8000, 0x7082,
+	0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab,
+	0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984, 0x9085, 0x0092,
+	0x7016, 0x080c, 0x40d3, 0x00f6, 0x2071, 0x1a61, 0x2079, 0x0320,
+	0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c, 0x780e,
+	0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109, 0x1df0, 0x792c,
+	0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011, 0x080c, 0x405f,
+	0x2011, 0x0001, 0x080c, 0x405f, 0x00fe, 0x00ee, 0x0005, 0x00f6,
+	0x00e6, 0x2071, 0x1a61, 0x2079, 0x0320, 0x792c, 0xd1fc, 0x0904,
+	0x405c, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904, 0x4058, 0x7000,
+	0x0002, 0x405c, 0x400d, 0x403d, 0x4058, 0xd1bc, 0x1170, 0xd1dc,
+	0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c, 0x405f, 0x0904,
+	0x405c, 0x080c, 0x405f, 0x0804, 0x405c, 0x00f6, 0x2079, 0x0300,
+	0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b, 0x0004, 0x7812,
+	0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c, 0x3f6a,
+	0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8, 0x00fe, 0xd0ec,
+	0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001, 0x7002, 0x9184,
+	0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x4001, 0x2011, 0x0001,
+	0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086, 0x0015, 0x1120,
+	0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc, 0x1960, 0x0828,
+	0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0xa014,
+	0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016, 0xa058, 0x2048,
+	0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c, 0x938a, 0x0007,
+	0x1a0c, 0x0dd5, 0x9398, 0x408d, 0x231d, 0x083f, 0x9080, 0x0004,
+	0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e, 0x908a, 0x0035,
+	0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a, 0x2001, 0x0019,
+	0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x40ca, 0x40c1, 0x40b8,
+	0x40af, 0x40a6, 0x409d, 0x4094, 0xa964, 0x7902, 0xa968, 0x7906,
+	0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974, 0x7902, 0xa978,
+	0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005, 0xa984, 0x7902,
+	0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916, 0x0005, 0xa994,
+	0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0, 0x7916, 0x0005,
+	0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912, 0xa9b0, 0x7916,
+	0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc, 0x7912, 0xa9c0,
+	0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906, 0xa9cc, 0x7912,
+	0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086, 0x2071, 0x1a65,
+	0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b, 0x0002, 0x2940,
+	0x9026, 0x7000, 0x0002, 0x40fa, 0x40e6, 0x40f1, 0x8001, 0x7002,
+	0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x405f, 0x190c, 0x405f,
+	0x0048, 0x8001, 0x7002, 0x782c, 0xd0fc, 0x1d38, 0x2011, 0x0001,
+	0x080c, 0x405f, 0x008e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6,
+	0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x19a9, 0x2004, 0x601a,
+	0x2061, 0x0100, 0x2001, 0x19a8, 0x2004, 0x60ce, 0x6104, 0xc1ac,
+	0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520, 0x2038, 0x2001,
+	0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c, 0x4ab4, 0xa813,
+	0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138,
+	0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048,
+	0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x4176, 0x1d68, 0x2900,
+	0xa85a, 0x00d0, 0x080c, 0x4ab4, 0xa813, 0x0019, 0xa817, 0x0001,
+	0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f,
+	0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e,
+	0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090, 0x2079, 0x0100,
+	0x2001, 0x19a8, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x23d4,
+	0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001,
+	0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x9006, 0x600a,
+	0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x2071,
+	0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088,
+	0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a, 0x700e, 0x810b,
+	0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041, 0x702c, 0xd0fc,
+	0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005, 0x7400, 0x7304,
+	0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086, 0x080c, 0x4ab4,
+	0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006, 0xa05a, 0x00ae,
+	0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x2001,
+	0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001, 0x0030, 0x2024,
+	0x2001, 0x0031, 0x201c, 0x080c, 0x4ab4, 0x2940, 0xa813, 0x0019,
+	0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, 0x2009,
+	0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c,
+	0x9080, 0x0019, 0x009e, 0x080c, 0x4176, 0x1d68, 0x2900, 0xa85a,
+	0x00d8, 0x080c, 0x4ab4, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001,
+	0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066, 0x2001, 0x0031,
+	0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa06e,
+	0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a, 0x2003, 0x0004,
+	0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c, 0x918d, 0x0200,
+	0x2102, 0xa017, 0x0000, 0x2001, 0x1a61, 0x2003, 0x0003, 0x2001,
+	0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003, 0x0000, 0x2001,
+	0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, 0x0002,
+	0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0007,
+	0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004, 0x20a9, 0x000c,
+	0x20a1, 0xfff4, 0x20e9, 0x0000, 0x9006, 0x4004, 0x2009, 0x013c,
+	0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108, 0x0005, 0x0804,
+	0x3526, 0x7d98, 0x7c9c, 0x0804, 0x3628, 0x080c, 0x73a5, 0x190c,
+	0x5fe8, 0x6040, 0x9084, 0x0020, 0x09b1, 0x2069, 0x1847, 0x2d00,
+	0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001,
+	0x080c, 0x4afd, 0x701f, 0x4255, 0x0005, 0x080c, 0x56e7, 0x1130,
+	0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8, 0x21d0, 0x2069, 0x1847,
+	0x6800, 0x9005, 0x0904, 0x355b, 0x6804, 0xd0ac, 0x0118, 0xd0a4,
+	0x0904, 0x355b, 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0138,
+	0x6200, 0x9292, 0x0005, 0x0218, 0x918c, 0xffdf, 0x0010, 0x918d,
+	0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104,
+	0x0118, 0x918d, 0x0010, 0x0010, 0x918c, 0xffef, 0x6106, 0x00ce,
+	0xd084, 0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04, 0x355b, 0x9288,
+	0x3327, 0x210d, 0x918c, 0x00ff, 0x6166, 0xd0dc, 0x0130, 0x6828,
+	0x908a, 0x007f, 0x1a04, 0x355b, 0x605e, 0x6888, 0x9084, 0x0030,
+	0x8004, 0x8004, 0x8004, 0x8004, 0x0006, 0x2009, 0x19b0, 0x9080,
+	0x297c, 0x2005, 0x200a, 0x000e, 0x2009, 0x19b1, 0x9080, 0x2980,
+	0x2005, 0x200a, 0x6808, 0x908a, 0x0100, 0x0a04, 0x355b, 0x908a,
+	0x0841, 0x1a04, 0x355b, 0x9084, 0x0007, 0x1904, 0x355b, 0x680c,
+	0x9005, 0x0904, 0x355b, 0x6810, 0x9005, 0x0904, 0x355b, 0x6848,
+	0x6940, 0x910a, 0x1a04, 0x355b, 0x8001, 0x0904, 0x355b, 0x684c,
+	0x6944, 0x910a, 0x1a04, 0x355b, 0x8001, 0x0904, 0x355b, 0x2009,
+	0x1980, 0x200b, 0x0000, 0x2001, 0x1869, 0x2004, 0xd0c4, 0x0140,
+	0x7884, 0x200a, 0x2009, 0x017f, 0x200a, 0x3b00, 0xc085, 0x20d8,
+	0x6814, 0x908c, 0x00ff, 0x614e, 0x8007, 0x9084, 0x00ff, 0x6052,
+	0x080c, 0x76be, 0x080c, 0x69ad, 0x080c, 0x69e1, 0x6808, 0x602a,
+	0x080c, 0x2346, 0x2009, 0x0170, 0x200b, 0x0080, 0xa001, 0xa001,
+	0x200b, 0x0000, 0x0036, 0x6b08, 0x080c, 0x28e3, 0x003e, 0x6000,
+	0x9086, 0x0000, 0x1904, 0x43ec, 0x6818, 0x691c, 0x6a20, 0x6b24,
+	0x8007, 0x810f, 0x8217, 0x831f, 0x6016, 0x611a, 0x621e, 0x6322,
+	0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007,
+	0x810f, 0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff, 0x6006, 0x610a,
+	0x620e, 0x6312, 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9, 0x0004,
+	0x20a1, 0x19b2, 0x20e9, 0x0001, 0x4001, 0x20a9, 0x0004, 0x20a1,
+	0x19cc, 0x20e9, 0x0001, 0x4001, 0x080c, 0x85d8, 0x00c6, 0x900e,
+	0x20a9, 0x0001, 0x6b70, 0xd384, 0x0510, 0x0068, 0x2009, 0x0100,
+	0x210c, 0x918e, 0x0008, 0x1110, 0x839d, 0x0010, 0x83f5, 0x3e18,
+	0x12b0, 0x3508, 0x8109, 0x080c, 0x7c74, 0x6878, 0x6016, 0x6874,
+	0x2008, 0x9084, 0xff00, 0x8007, 0x600a, 0x9184, 0x00ff, 0x6006,
+	0x8108, 0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x1f04,
+	0x4346, 0x00ce, 0x00c6, 0x2061, 0x199b, 0x6a88, 0x9284, 0xc000,
+	0x2010, 0x9286, 0x0000, 0x1158, 0x2063, 0x0000, 0x2001, 0x0001,
+	0x080c, 0x2b8a, 0x2001, 0x0001, 0x080c, 0x2b6d, 0x0088, 0x9286,
+	0x4000, 0x1148, 0x2063, 0x0001, 0x9006, 0x080c, 0x2b8a, 0x9006,
+	0x080c, 0x2b6d, 0x0028, 0x9286, 0x8000, 0x1d30, 0x2063, 0x0002,
+	0x00ce, 0x6888, 0xd0ec, 0x0130, 0x2011, 0x0114, 0x2204, 0x9085,
+	0x0100, 0x2012, 0x6a80, 0x9284, 0x0030, 0x9086, 0x0030, 0x1128,
+	0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82, 0x2001, 0x197b, 0x6a80,
+	0x9294, 0x0030, 0x928e, 0x0000, 0x0170, 0x928e, 0x0010, 0x0118,
+	0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c, 0x2958, 0x2001,
+	0x196c, 0x2102, 0x0008, 0x2102, 0x00c6, 0x2061, 0x0100, 0x602f,
+	0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, 0x73a5, 0x0128, 0x080c,
+	0x4fe4, 0x0110, 0x080c, 0x28a9, 0x60d4, 0x9005, 0x01c0, 0x6003,
+	0x0001, 0x2009, 0x43d4, 0x00e0, 0x080c, 0x73a5, 0x1168, 0x2011,
+	0x723b, 0x080c, 0x84dc, 0x2011, 0x722e, 0x080c, 0x85b6, 0x080c,
+	0x7692, 0x080c, 0x72d7, 0x0040, 0x080c, 0x5ee2, 0x0028, 0x6003,
+	0x0004, 0x2009, 0x43ec, 0x0020, 0x080c, 0x68dd, 0x0804, 0x3526,
+	0x2001, 0x0170, 0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, 0x1118,
+	0x2091, 0x30bd, 0x0817, 0x2091, 0x303d, 0x0817, 0x6000, 0x9086,
+	0x0000, 0x0904, 0x3558, 0x2069, 0x1847, 0x7890, 0x6842, 0x7894,
+	0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0x2039, 0x0001, 0x0804, 0x4b00, 0x9006, 0x080c, 0x28a9, 0x81ff,
+	0x1904, 0x3558, 0x080c, 0x73a5, 0x11b0, 0x080c, 0x768d, 0x080c,
+	0x6023, 0x080c, 0x331b, 0x0118, 0x6130, 0xc18d, 0x6132, 0x080c,
+	0xd24a, 0x0130, 0x080c, 0x73c8, 0x1118, 0x080c, 0x737d, 0x0038,
+	0x080c, 0x72d7, 0x0020, 0x080c, 0x5fe8, 0x080c, 0x5ee2, 0x0804,
+	0x3526, 0x81ff, 0x1904, 0x3558, 0x080c, 0x73a5, 0x1110, 0x0804,
+	0x3558, 0x6194, 0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, 0x1c80,
+	0x2009, 0x0040, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091,
+	0x8000, 0x2039, 0x0001, 0x080c, 0x4b00, 0x701f, 0x3524, 0x012e,
+	0x0005, 0x704f, 0x0001, 0x00d6, 0x2069, 0x1c80, 0x20a9, 0x0040,
+	0x20e9, 0x0001, 0x20a1, 0x1c80, 0x2019, 0xffff, 0x4304, 0x655c,
+	0x9588, 0x3327, 0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, 0x2011,
+	0x0002, 0x2100, 0x9506, 0x01a8, 0x080c, 0x6608, 0x1190, 0xb814,
+	0x821c, 0x0238, 0x9398, 0x1c80, 0x9085, 0xff00, 0x8007, 0x201a,
+	0x0038, 0x9398, 0x1c80, 0x2324, 0x94a4, 0xff00, 0x9405, 0x201a,
+	0x8210, 0x8108, 0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007,
+	0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0x1c80,
+	0x2099, 0x1c80, 0x080c, 0x5f73, 0x0804, 0x4446, 0x080c, 0x4ae7,
+	0x0904, 0x355b, 0x080c, 0x4ab4, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x3558, 0x080c, 0x56d8, 0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e,
+	0x0538, 0x908e, 0x007f, 0x0520, 0x908e, 0x0080, 0x0508, 0x080c,
+	0x3316, 0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff,
+	0x9086, 0x0006, 0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
+	0x080c, 0xcd13, 0x1120, 0x2009, 0x0003, 0x0804, 0x3558, 0x7007,
+	0x0003, 0x701f, 0x44d4, 0x0005, 0x080c, 0x4ae7, 0x0904, 0x355b,
+	0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080,
+	0x0006, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098,
+	0x080c, 0x0f7c, 0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a,
+	0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c,
+	0x0f7c, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0x0804, 0x4b00, 0x81ff, 0x1904, 0x3558, 0x080c, 0x4acb, 0x0904,
+	0x355b, 0x080c, 0x677a, 0x0904, 0x3558, 0x0058, 0xa878, 0x9005,
+	0x0120, 0x2009, 0x0004, 0x0804, 0x3558, 0xa974, 0xaa94, 0x0804,
+	0x3526, 0x080c, 0x56e0, 0x0904, 0x3526, 0x701f, 0x451e, 0x7007,
+	0x0003, 0x0005, 0x81ff, 0x1904, 0x3558, 0x7888, 0x908a, 0x1000,
+	0x1a04, 0x355b, 0x080c, 0x4ae7, 0x0904, 0x355b, 0x080c, 0x697b,
+	0x0120, 0x080c, 0x6983, 0x1904, 0x355b, 0x080c, 0x67ff, 0x0904,
+	0x3558, 0x2019, 0x0004, 0x900e, 0x080c, 0x678c, 0x0904, 0x3558,
+	0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8,
+	0x080c, 0x4ae5, 0x01e0, 0x080c, 0x697b, 0x0118, 0x080c, 0x6983,
+	0x11b0, 0x080c, 0x67ff, 0x2009, 0x0002, 0x0168, 0x2009, 0x0002,
+	0x2019, 0x0004, 0x080c, 0x678c, 0x2009, 0x0003, 0x0120, 0xa998,
+	0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
+	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
+	0x4000, 0x080c, 0x56e0, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, 0x0071,
+	0x0060, 0x2029, 0x007e, 0x2061, 0x1800, 0x645c, 0x2400, 0x9506,
+	0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x6608,
+	0x1138, 0x2200, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x84ea,
+	0x0005, 0x81ff, 0x1904, 0x3558, 0x798c, 0x2001, 0x197f, 0x918c,
+	0x8000, 0x2102, 0x080c, 0x4acb, 0x0904, 0x355b, 0x080c, 0x697b,
+	0x0120, 0x080c, 0x6983, 0x1904, 0x355b, 0x080c, 0x66cf, 0x0904,
+	0x3558, 0x080c, 0x6783, 0x0904, 0x3558, 0x2001, 0x197f, 0x2004,
+	0xd0fc, 0x1904, 0x3526, 0x0804, 0x4529, 0xa9a0, 0x2001, 0x197f,
+	0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4ad8, 0x01a0, 0x080c,
+	0x697b, 0x0118, 0x080c, 0x6983, 0x1170, 0x080c, 0x66cf, 0x2009,
+	0x0002, 0x0128, 0x080c, 0x6783, 0x1170, 0x2009, 0x0003, 0xa897,
+	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197f, 0x2004,
+	0xd0fc, 0x1128, 0x080c, 0x56e0, 0x0110, 0x9006, 0x0018, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, 0x3558,
+	0x798c, 0x2001, 0x197e, 0x918c, 0x8000, 0x2102, 0x080c, 0x4acb,
+	0x0904, 0x355b, 0x080c, 0x697b, 0x0120, 0x080c, 0x6983, 0x1904,
+	0x355b, 0x080c, 0x66cf, 0x0904, 0x3558, 0x080c, 0x6771, 0x0904,
+	0x3558, 0x2001, 0x197e, 0x2004, 0xd0fc, 0x1904, 0x3526, 0x0804,
+	0x4529, 0xa9a0, 0x2001, 0x197e, 0x918c, 0x8000, 0xc18d, 0x2102,
+	0x080c, 0x4ad8, 0x01a0, 0x080c, 0x697b, 0x0118, 0x080c, 0x6983,
+	0x1170, 0x080c, 0x66cf, 0x2009, 0x0002, 0x0128, 0x080c, 0x6771,
+	0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
+	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
+	0x4000, 0x2001, 0x197e, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x56e0,
+	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
+	0x0005, 0x6100, 0x0804, 0x3526, 0x080c, 0x4ae7, 0x0904, 0x355b,
+	0x080c, 0x56ec, 0x1904, 0x3558, 0x79a8, 0xd184, 0x1158, 0xb834,
+	0x8007, 0x789e, 0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28,
+	0x8217, 0x0050, 0xb824, 0x8007, 0x789e, 0xb820, 0x8007, 0x789a,
+	0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900, 0x918c, 0x0200, 0x0804,
+	0x3526, 0x78a8, 0x909c, 0x0003, 0xd0b4, 0x1148, 0x939a, 0x0003,
+	0x1a04, 0x3558, 0x625c, 0x7884, 0x9206, 0x1904, 0x46d6, 0x080c,
+	0x85c2, 0x2001, 0xfff4, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c,
+	0x7d98, 0x2039, 0x0000, 0x0006, 0x78a8, 0x9084, 0x0080, 0x11c8,
+	0x0006, 0x0036, 0x2001, 0x1a7e, 0x201c, 0x7b9a, 0x2003, 0x0000,
+	0x2001, 0x1a7f, 0x201c, 0x7b9e, 0x2003, 0x0000, 0x2001, 0x1a80,
+	0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e, 0x000e, 0x000e, 0x0804,
+	0x4b00, 0x000e, 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44, 0xa66a,
+	0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
+	0x10e9, 0x7007, 0x0002, 0x701f, 0x46f6, 0x0005, 0x81ff, 0x1904,
+	0x3558, 0x080c, 0x4ae7, 0x0904, 0x355b, 0x080c, 0x697b, 0x1904,
+	0x3558, 0x00c6, 0x080c, 0x4ab4, 0x00ce, 0x0904, 0x3558, 0xa867,
+	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8, 0x080c, 0xccb9, 0x0904,
+	0x3558, 0x7007, 0x0003, 0x701f, 0x4710, 0x0005, 0x080c, 0x421b,
+	0x0006, 0x0036, 0x2001, 0x1a7e, 0x201c, 0x7b9a, 0x2003, 0x0000,
+	0x2001, 0x1a7f, 0x201c, 0x7b9e, 0x2003, 0x0000, 0x2001, 0x1a80,
+	0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e, 0x000e, 0x0804, 0x3526,
+	0xa830, 0x9086, 0x0100, 0x0904, 0x3558, 0x8906, 0x8006, 0x8007,
+	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x2009, 0x000c,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b00, 0x9006, 0x080c,
+	0x28a9, 0x78a8, 0x9084, 0x00ff, 0x9086, 0x00ff, 0x0118, 0x81ff,
+	0x1904, 0x3558, 0x080c, 0x73a5, 0x0110, 0x080c, 0x5fe8, 0x7888,
+	0x908a, 0x1000, 0x1a04, 0x355b, 0x7984, 0x9186, 0x00ff, 0x0138,
+	0x9182, 0x007f, 0x1a04, 0x355b, 0x2100, 0x080c, 0x2873, 0x0026,
+	0x00c6, 0x0126, 0x2091, 0x8000, 0x2061, 0x19f9, 0x601b, 0x0000,
+	0x601f, 0x0000, 0x6073, 0x0000, 0x6077, 0x0000, 0x080c, 0x73a5,
+	0x1158, 0x080c, 0x768d, 0x080c, 0x6023, 0x9085, 0x0001, 0x080c,
+	0x73ec, 0x080c, 0x72d7, 0x00d0, 0x080c, 0xade2, 0x2061, 0x0100,
+	0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x810f, 0x9105, 0x604a,
+	0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1998, 0x200b, 0x0000,
+	0x2009, 0x002d, 0x2011, 0x5f0e, 0x080c, 0x8574, 0x7984, 0x080c,
+	0x73a5, 0x1110, 0x2009, 0x00ff, 0x7a88, 0x080c, 0x458c, 0x012e,
+	0x00ce, 0x002e, 0x0804, 0x3526, 0x7984, 0x080c, 0x65a7, 0x2b08,
+	0x1904, 0x355b, 0x0804, 0x3526, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x3558, 0x60dc, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009,
+	0x0005, 0x0804, 0x3558, 0x080c, 0x4ab4, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x3558, 0x7984, 0x9192, 0x0021, 0x1a04, 0x355b, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0x702a, 0xaf60,
+	0x7736, 0x080c, 0x4afd, 0x701f, 0x47c4, 0x7880, 0x9086, 0x006e,
+	0x0110, 0x701f, 0x5196, 0x0005, 0x2009, 0x0080, 0x080c, 0x6608,
+	0x1118, 0x080c, 0x697b, 0x0120, 0x2021, 0x400a, 0x0804, 0x3528,
+	0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70, 0xac74, 0xad78, 0xae7c,
+	0xa884, 0x90be, 0x0100, 0x0904, 0x485d, 0x90be, 0x0112, 0x0904,
+	0x485d, 0x90be, 0x0113, 0x0904, 0x485d, 0x90be, 0x0114, 0x0904,
+	0x485d, 0x90be, 0x0117, 0x0904, 0x485d, 0x90be, 0x011a, 0x0904,
+	0x485d, 0x90be, 0x011c, 0x0904, 0x485d, 0x90be, 0x0121, 0x0904,
+	0x4844, 0x90be, 0x0131, 0x0904, 0x4844, 0x90be, 0x0171, 0x0904,
+	0x485d, 0x90be, 0x0173, 0x0904, 0x485d, 0x90be, 0x01a1, 0x1128,
+	0xa894, 0x8007, 0xa896, 0x0804, 0x4868, 0x90be, 0x0212, 0x0904,
+	0x4851, 0x90be, 0x0213, 0x05e8, 0x90be, 0x0214, 0x0500, 0x90be,
+	0x0217, 0x0188, 0x90be, 0x021a, 0x1120, 0xa89c, 0x8007, 0xa89e,
+	0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be, 0x0300, 0x05b0, 0x009e,
+	0x00de, 0x0804, 0x355b, 0x7028, 0x9080, 0x0010, 0x2098, 0x20a0,
+	0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007, 0x080c, 0x48a6, 0x7028,
+	0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9,
+	0x0001, 0x080c, 0x48a6, 0x00c8, 0x7028, 0x9080, 0x000c, 0x2098,
+	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x48b3,
+	0x00b8, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0,
+	0x20e8, 0x20a9, 0x0001, 0x080c, 0x48b3, 0x7028, 0x9080, 0x000c,
+	0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x04f1,
+	0x00c6, 0x080c, 0x4ab4, 0x0550, 0xa868, 0xc0fd, 0xa86a, 0xa867,
+	0x0119, 0x9006, 0xa882, 0xa87f, 0x0020, 0xa88b, 0x0001, 0x810b,
+	0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe, 0xadc2, 0xa9c6, 0xa8ca,
+	0x00ce, 0x009e, 0x00de, 0xa866, 0xa822, 0xa868, 0xc0fd, 0xa86a,
+	0xa804, 0x2048, 0x080c, 0xccd4, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x3558, 0x7007, 0x0003, 0x701f, 0x489d, 0x0005, 0x00ce, 0x009e,
+	0x00de, 0x2009, 0x0002, 0x0804, 0x3558, 0xa820, 0x9086, 0x8001,
+	0x1904, 0x3526, 0x2009, 0x0004, 0x0804, 0x3558, 0x0016, 0x0026,
+	0x3510, 0x20a9, 0x0002, 0x4002, 0x4104, 0x4004, 0x8211, 0x1dc8,
+	0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0036, 0x0046, 0x3520,
+	0x20a9, 0x0004, 0x4002, 0x4304, 0x4204, 0x4104, 0x4004, 0x8421,
+	0x1db8, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x81ff, 0x0120,
+	0x2009, 0x0001, 0x0804, 0x3558, 0x60dc, 0xd0ac, 0x1130, 0xd09c,
+	0x1120, 0x2009, 0x0005, 0x0804, 0x3558, 0x7984, 0x78a8, 0x2040,
+	0x080c, 0xaddb, 0x1120, 0x9182, 0x007f, 0x0a04, 0x355b, 0x9186,
+	0x00ff, 0x0904, 0x355b, 0x9182, 0x0800, 0x1a04, 0x355b, 0x7a8c,
+	0x7b88, 0x607c, 0x9306, 0x1158, 0x6080, 0x924e, 0x0904, 0x355b,
+	0x080c, 0xaddb, 0x1120, 0x99cc, 0xff00, 0x0904, 0x355b, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x49c7, 0x0904, 0x4947, 0x0086, 0x90c6,
 	0x4000, 0x008e, 0x1538, 0x00c6, 0x0006, 0x0036, 0xb818, 0xbb1c,
 	0x9305, 0xbb20, 0x9305, 0xbb24, 0x9305, 0xbb28, 0x9305, 0xbb2c,
 	0x9305, 0xbb30, 0x9305, 0xbb34, 0x9305, 0x003e, 0x0570, 0xd88c,
-	0x1128, 0x080c, 0x6972, 0x0110, 0xc89d, 0x0438, 0x900e, 0x080c,
-	0x681f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x000e,
+	0x1128, 0x080c, 0x697b, 0x0110, 0xc89d, 0x0438, 0x900e, 0x080c,
+	0x6828, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x000e,
 	0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x0090, 0x90c6,
 	0x4008, 0x1118, 0x2708, 0x2610, 0x0060, 0x90c6, 0x4009, 0x1108,
 	0x0040, 0x90c6, 0x4006, 0x1108, 0x0020, 0x2001, 0x4005, 0x2009,
-	0x000a, 0x2020, 0x012e, 0x0804, 0x3526, 0x000e, 0x00ce, 0x2b00,
-	0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0xaeaf,
-	0x0904, 0x498c, 0x2b00, 0x6012, 0x080c, 0xcfaa, 0x2e58, 0x00ee,
-	0x00e6, 0x00c6, 0x080c, 0x4aa4, 0x00ce, 0x2b70, 0x1158, 0x080c,
-	0xae61, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002,
-	0x0804, 0x3556, 0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932,
+	0x000a, 0x2020, 0x012e, 0x0804, 0x3528, 0x000e, 0x00ce, 0x2b00,
+	0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0xaebf,
+	0x0904, 0x499c, 0x2b00, 0x6012, 0x080c, 0xcfc4, 0x2e58, 0x00ee,
+	0x00e6, 0x00c6, 0x080c, 0x4ab4, 0x00ce, 0x2b70, 0x1158, 0x080c,
+	0xae71, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002,
+	0x0804, 0x3558, 0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932,
 	0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0xd89c, 0x1110,
-	0x080c, 0x31bf, 0x6023, 0x0001, 0x9006, 0x080c, 0x653b, 0xd89c,
-	0x0138, 0x2001, 0x0004, 0x080c, 0x654f, 0x2009, 0x0003, 0x0030,
-	0x2001, 0x0002, 0x080c, 0x654f, 0x2009, 0x0002, 0x080c, 0xaedc,
+	0x080c, 0x31c1, 0x6023, 0x0001, 0x9006, 0x080c, 0x6544, 0xd89c,
+	0x0138, 0x2001, 0x0004, 0x080c, 0x6558, 0x2009, 0x0003, 0x0030,
+	0x2001, 0x0002, 0x080c, 0x6558, 0x2009, 0x0002, 0x080c, 0xaeec,
 	0x78a8, 0xd094, 0x0138, 0x00ee, 0x7024, 0x00e6, 0x2058, 0xb8cc,
 	0xc08d, 0xb8ce, 0x9085, 0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e,
-	0x012e, 0x1120, 0x2009, 0x0003, 0x0804, 0x3556, 0x7007, 0x0003,
-	0x701f, 0x499b, 0x0005, 0xa830, 0x9086, 0x0100, 0x7024, 0x2058,
-	0x1138, 0x2009, 0x0004, 0xba04, 0x9294, 0x00ff, 0x0804, 0x562c,
-	0x900e, 0xa868, 0xd0f4, 0x1904, 0x3524, 0x080c, 0x681f, 0x1108,
-	0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3524, 0x00e6,
-	0x00d6, 0x0096, 0x83ff, 0x0904, 0x4a06, 0x902e, 0x080c, 0xadcb,
+	0x012e, 0x1120, 0x2009, 0x0003, 0x0804, 0x3558, 0x7007, 0x0003,
+	0x701f, 0x49ab, 0x0005, 0xa830, 0x9086, 0x0100, 0x7024, 0x2058,
+	0x1138, 0x2009, 0x0004, 0xba04, 0x9294, 0x00ff, 0x0804, 0x5635,
+	0x900e, 0xa868, 0xd0f4, 0x1904, 0x3526, 0x080c, 0x6828, 0x1108,
+	0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3526, 0x00e6,
+	0x00d6, 0x0096, 0x83ff, 0x0904, 0x4a16, 0x902e, 0x080c, 0xaddb,
 	0x0130, 0x9026, 0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021,
 	0x007f, 0x20a9, 0x0781, 0x2071, 0x107f, 0x2e04, 0x9005, 0x11b8,
-	0x2100, 0x9406, 0x1904, 0x4a17, 0x2428, 0x94ce, 0x007f, 0x1120,
+	0x2100, 0x9406, 0x1904, 0x4a27, 0x2428, 0x94ce, 0x007f, 0x1120,
 	0x92ce, 0xfffd, 0x1558, 0x0030, 0x94ce, 0x0080, 0x1130, 0x92ce,
 	0xfffc, 0x1520, 0x93ce, 0x00ff, 0x1508, 0xc5fd, 0x0480, 0x2058,
 	0xbf10, 0x2700, 0x9306, 0x11e8, 0xbe14, 0x2600, 0x9206, 0x11c8,
 	0x2400, 0x9106, 0x1180, 0xd884, 0x0598, 0xd894, 0x1588, 0x080c,
-	0x6912, 0x1570, 0x2001, 0x4000, 0x0460, 0x080c, 0x6972, 0x1540,
+	0x691b, 0x1570, 0x2001, 0x4000, 0x0460, 0x080c, 0x697b, 0x1540,
 	0x2001, 0x4000, 0x0430, 0x2001, 0x4007, 0x0418, 0x2001, 0x4006,
 	0x0400, 0x2400, 0x9106, 0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff,
-	0x0918, 0x080c, 0xadcb, 0x1900, 0x2001, 0x4008, 0x0090, 0x8420,
-	0x8e70, 0x1f04, 0x49cd, 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048,
-	0x2001, 0x0001, 0x0030, 0x080c, 0x659e, 0x1dd0, 0xbb12, 0xba16,
+	0x0918, 0x080c, 0xaddb, 0x1900, 0x2001, 0x4008, 0x0090, 0x8420,
+	0x8e70, 0x1f04, 0x49dd, 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048,
+	0x2001, 0x0001, 0x0030, 0x080c, 0x65a7, 0x1dd0, 0xbb12, 0xba16,
 	0x9006, 0x9005, 0x009e, 0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x3556, 0x080c, 0x4aa4, 0x1120, 0x2009,
-	0x0002, 0x0804, 0x3556, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
-	0x7884, 0x9005, 0x0904, 0x3559, 0x9096, 0x00ff, 0x0120, 0x9092,
-	0x0004, 0x1a04, 0x3559, 0x2010, 0x2918, 0x080c, 0x3165, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x3556, 0x7007, 0x0003, 0x701f, 0x4a59,
-	0x0005, 0xa830, 0x9086, 0x0100, 0x1904, 0x3524, 0x2009, 0x0004,
-	0x0804, 0x3556, 0x7984, 0x080c, 0xadcb, 0x1120, 0x9182, 0x007f,
-	0x0a04, 0x3559, 0x9186, 0x00ff, 0x0904, 0x3559, 0x9182, 0x0800,
-	0x1a04, 0x3559, 0x2001, 0x9000, 0x080c, 0x5687, 0x1904, 0x3556,
-	0x0804, 0x3524, 0xa998, 0x080c, 0xadcb, 0x1118, 0x9182, 0x007f,
+	0x2009, 0x0001, 0x0804, 0x3558, 0x080c, 0x4ab4, 0x1120, 0x2009,
+	0x0002, 0x0804, 0x3558, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
+	0x7884, 0x9005, 0x0904, 0x355b, 0x9096, 0x00ff, 0x0120, 0x9092,
+	0x0004, 0x1a04, 0x355b, 0x2010, 0x2918, 0x080c, 0x3167, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x3558, 0x7007, 0x0003, 0x701f, 0x4a69,
+	0x0005, 0xa830, 0x9086, 0x0100, 0x1904, 0x3526, 0x2009, 0x0004,
+	0x0804, 0x3558, 0x7984, 0x080c, 0xaddb, 0x1120, 0x9182, 0x007f,
+	0x0a04, 0x355b, 0x9186, 0x00ff, 0x0904, 0x355b, 0x9182, 0x0800,
+	0x1a04, 0x355b, 0x2001, 0x9000, 0x080c, 0x5690, 0x1904, 0x3558,
+	0x0804, 0x3526, 0xa998, 0x080c, 0xaddb, 0x1118, 0x9182, 0x007f,
 	0x0280, 0x9186, 0x00ff, 0x0168, 0x9182, 0x0800, 0x1250, 0x2001,
-	0x9000, 0x080c, 0x5687, 0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a,
+	0x9000, 0x080c, 0x5690, 0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a,
 	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
 	0x0005, 0xa897, 0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
 	0x0005, 0x2009, 0x000a, 0x0c48, 0x080c, 0x0fff, 0x0198, 0x9006,
 	0xa802, 0x7014, 0x9005, 0x1120, 0x2900, 0x7016, 0x701a, 0x0040,
 	0x7018, 0xa802, 0x0086, 0x2040, 0x2900, 0xa006, 0x701a, 0x008e,
-	0x9085, 0x0001, 0x0005, 0x7984, 0x080c, 0x65ff, 0x1130, 0x7e88,
+	0x9085, 0x0001, 0x0005, 0x7984, 0x080c, 0x6608, 0x1130, 0x7e88,
 	0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005,
-	0xa998, 0x080c, 0x65ff, 0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082,
+	0xa998, 0x080c, 0x6608, 0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082,
 	0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84,
-	0x2608, 0x080c, 0x65ff, 0x1108, 0x0008, 0x905e, 0x8bff, 0x0005,
+	0x2608, 0x080c, 0x6608, 0x1108, 0x0008, 0x905e, 0x8bff, 0x0005,
 	0x0016, 0x7114, 0x81ff, 0x0128, 0x2148, 0xa904, 0x080c, 0x1031,
 	0x0cc8, 0x7116, 0x711a, 0x001e, 0x0005, 0x2031, 0x0001, 0x0010,
 	0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44, 0xa66a, 0xa17a, 0xa772,
 	0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10e9, 0x7007,
-	0x0002, 0x701f, 0x3524, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000,
+	0x0002, 0x701f, 0x3526, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000,
 	0x2079, 0x0000, 0x2001, 0x18b0, 0x2004, 0x9005, 0x1190, 0x0e04,
-	0x4b21, 0x7a36, 0x7833, 0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091,
+	0x4b31, 0x7a36, 0x7833, 0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091,
 	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x0804,
-	0x4b87, 0x0016, 0x0086, 0x0096, 0x00c6, 0x00e6, 0x2071, 0x189e,
+	0x4b97, 0x0016, 0x0086, 0x0096, 0x00c6, 0x00e6, 0x2071, 0x189e,
 	0x7044, 0x9005, 0x1540, 0x7148, 0x9182, 0x0010, 0x0288, 0x7038,
-	0x2060, 0x080c, 0x0fff, 0x0904, 0x4b7f, 0xa84b, 0x0000, 0x2900,
-	0x7046, 0x2001, 0x0002, 0x9080, 0x2090, 0x2005, 0xa846, 0x0098,
+	0x2060, 0x080c, 0x0fff, 0x0904, 0x4b8f, 0xa84b, 0x0000, 0x2900,
+	0x7046, 0x2001, 0x0002, 0x9080, 0x2092, 0x2005, 0xa846, 0x0098,
 	0x7038, 0x90e0, 0x0004, 0x2001, 0x18ba, 0x9c82, 0x18fa, 0x0210,
 	0x2061, 0x18ba, 0x2c00, 0x703a, 0x7148, 0x81ff, 0x1108, 0x703e,
 	0x8108, 0x714a, 0x0460, 0x7148, 0x8108, 0x714a, 0x7044, 0x2040,
@@ -2209,24 +2211,24 @@
 	0x001e, 0x8108, 0x2105, 0x9005, 0xa146, 0x1520, 0x080c, 0x0fff,
 	0x1130, 0x8109, 0xa946, 0x7148, 0x8109, 0x714a, 0x00d8, 0x9006,
 	0xa806, 0xa84a, 0xa046, 0x2800, 0xa802, 0x2900, 0xa006, 0x7046,
-	0x2001, 0x0002, 0x9080, 0x2090, 0x2005, 0xa846, 0x0058, 0x2262,
+	0x2001, 0x0002, 0x9080, 0x2092, 0x2005, 0xa846, 0x0058, 0x2262,
 	0x6306, 0x640a, 0x00ee, 0x00ce, 0x009e, 0x008e, 0x001e, 0x012e,
-	0x00fe, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4ba9, 0x4ba9,
-	0x4bab, 0x4ba9, 0x4ba9, 0x4ba9, 0x4baf, 0x4ba9, 0x4ba9, 0x4ba9,
-	0x4bb3, 0x4ba9, 0x4ba9, 0x4ba9, 0x4bb7, 0x4ba9, 0x4ba9, 0x4ba9,
-	0x4bbb, 0x4ba9, 0x4ba9, 0x4ba9, 0x4bbf, 0x4ba9, 0x4ba9, 0x4ba9,
-	0x4bc4, 0x080c, 0x0dd5, 0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286,
+	0x00fe, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4bb9, 0x4bb9,
+	0x4bbb, 0x4bb9, 0x4bb9, 0x4bb9, 0x4bbf, 0x4bb9, 0x4bb9, 0x4bb9,
+	0x4bc3, 0x4bb9, 0x4bb9, 0x4bb9, 0x4bc7, 0x4bb9, 0x4bb9, 0x4bb9,
+	0x4bcb, 0x4bb9, 0x4bb9, 0x4bb9, 0x4bcf, 0x4bb9, 0x4bb9, 0x4bb9,
+	0x4bd4, 0x080c, 0x0dd5, 0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286,
 	0xa38a, 0xa48e, 0x0878, 0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6,
 	0xa3aa, 0xa4ae, 0x0838, 0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6,
-	0xa3ca, 0xa4ce, 0x0804, 0x4b82, 0xa2d6, 0xa3da, 0xa4de, 0x0804,
-	0x4b82, 0x00e6, 0x2071, 0x189e, 0x7048, 0x9005, 0x0904, 0x4c5b,
-	0x0126, 0x2091, 0x8000, 0x0e04, 0x4c5a, 0x00f6, 0x2079, 0x0000,
+	0xa3ca, 0xa4ce, 0x0804, 0x4b92, 0xa2d6, 0xa3da, 0xa4de, 0x0804,
+	0x4b92, 0x00e6, 0x2071, 0x189e, 0x7048, 0x9005, 0x0904, 0x4c6b,
+	0x0126, 0x2091, 0x8000, 0x0e04, 0x4c6a, 0x00f6, 0x2079, 0x0000,
 	0x00c6, 0x0096, 0x0086, 0x0076, 0x9006, 0x2038, 0x7040, 0x2048,
 	0x9005, 0x0500, 0xa948, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c,
 	0x0dd5, 0x2060, 0x001e, 0x8108, 0x2105, 0x9005, 0xa94a, 0x1904,
-	0x4c5d, 0xa804, 0x9005, 0x090c, 0x0dd5, 0x7042, 0x2938, 0x2040,
-	0xa003, 0x0000, 0x2001, 0x0002, 0x9080, 0x2090, 0x2005, 0xa04a,
-	0x0804, 0x4c5d, 0x703c, 0x2060, 0x2c14, 0x6304, 0x6408, 0x650c,
+	0x4c6d, 0xa804, 0x9005, 0x090c, 0x0dd5, 0x7042, 0x2938, 0x2040,
+	0xa003, 0x0000, 0x2001, 0x0002, 0x9080, 0x2092, 0x2005, 0xa04a,
+	0x0804, 0x4c6d, 0x703c, 0x2060, 0x2c14, 0x6304, 0x6408, 0x650c,
 	0x2200, 0x7836, 0x7833, 0x0012, 0x7882, 0x2300, 0x7886, 0x2400,
 	0x788a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
 	0x119b, 0x87ff, 0x0118, 0x2748, 0x080c, 0x1031, 0x7048, 0x8001,
@@ -2236,3130 +2238,3130 @@
 	0x9c80, 0x0004, 0x90fa, 0x18fa, 0x0210, 0x2001, 0x18ba, 0x703e,
 	0x00a0, 0x9006, 0x703e, 0x703a, 0x7044, 0x9005, 0x090c, 0x0dd5,
 	0x2048, 0xa800, 0x9005, 0x1de0, 0x2900, 0x7042, 0x2001, 0x0002,
-	0x9080, 0x2090, 0x2005, 0xa84a, 0x0000, 0x007e, 0x008e, 0x009e,
+	0x9080, 0x2092, 0x2005, 0xa84a, 0x0000, 0x007e, 0x008e, 0x009e,
 	0x00ce, 0x00fe, 0x012e, 0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b,
-	0x0002, 0x4c7c, 0x4c7c, 0x4c7e, 0x4c7c, 0x4c7c, 0x4c7c, 0x4c83,
-	0x4c7c, 0x4c7c, 0x4c7c, 0x4c88, 0x4c7c, 0x4c7c, 0x4c7c, 0x4c8d,
-	0x4c7c, 0x4c7c, 0x4c7c, 0x4c92, 0x4c7c, 0x4c7c, 0x4c7c, 0x4c97,
-	0x4c7c, 0x4c7c, 0x4c7c, 0x4c9c, 0x080c, 0x0dd5, 0xaa74, 0xab78,
-	0xac7c, 0x0804, 0x4c08, 0xaa84, 0xab88, 0xac8c, 0x0804, 0x4c08,
-	0xaa94, 0xab98, 0xac9c, 0x0804, 0x4c08, 0xaaa4, 0xaba8, 0xacac,
-	0x0804, 0x4c08, 0xaab4, 0xabb8, 0xacbc, 0x0804, 0x4c08, 0xaac4,
-	0xabc8, 0xaccc, 0x0804, 0x4c08, 0xaad4, 0xabd8, 0xacdc, 0x0804,
-	0x4c08, 0x0016, 0x0026, 0x0036, 0x00b6, 0x00c6, 0x2009, 0x007e,
-	0x080c, 0x65ff, 0x2019, 0x0001, 0xb85c, 0xd0ac, 0x0110, 0x2019,
-	0x0000, 0x2011, 0x801b, 0x080c, 0x4b04, 0x00ce, 0x00be, 0x003e,
-	0x002e, 0x001e, 0x0005, 0x0026, 0x080c, 0x56cf, 0xd0c4, 0x0120,
-	0x2011, 0x8014, 0x080c, 0x4b04, 0x002e, 0x0005, 0x81ff, 0x1904,
-	0x3556, 0x0126, 0x2091, 0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac,
-	0x6032, 0x080c, 0x73bc, 0x1158, 0x080c, 0x76a4, 0x080c, 0x601a,
-	0x9085, 0x0001, 0x080c, 0x7403, 0x080c, 0x72ee, 0x0010, 0x080c,
-	0x5ed9, 0x012e, 0x0804, 0x3524, 0x81ff, 0x0120, 0x2009, 0x0001,
-	0x0804, 0x3556, 0x080c, 0x56e3, 0x0120, 0x2009, 0x0007, 0x0804,
-	0x3556, 0x080c, 0x696a, 0x0120, 0x2009, 0x0008, 0x0804, 0x3556,
-	0x080c, 0x3314, 0x0128, 0x7984, 0x080c, 0x659e, 0x1904, 0x3559,
-	0x080c, 0x4ad7, 0x0904, 0x3559, 0x2b00, 0x7026, 0x080c, 0x6972,
-	0x7888, 0x1170, 0x9084, 0x0005, 0x1158, 0x900e, 0x080c, 0x681f,
-	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3524,
-	0x080c, 0x4aa4, 0x0904, 0x3556, 0x9006, 0xa866, 0xa832, 0xa868,
-	0xc0fd, 0xa86a, 0x080c, 0xcd58, 0x0904, 0x3556, 0x7888, 0xd094,
-	0x0118, 0xb8cc, 0xc08d, 0xb8ce, 0x7007, 0x0003, 0x701f, 0x4d7d,
-	0x0005, 0x2061, 0x1800, 0x080c, 0x56e3, 0x2009, 0x0007, 0x1578,
-	0x080c, 0x696a, 0x0118, 0x2009, 0x0008, 0x0448, 0x080c, 0x3314,
-	0x0120, 0xa998, 0x080c, 0x659e, 0x1530, 0x080c, 0x4ad5, 0x0518,
-	0x080c, 0x6972, 0xa89c, 0x1168, 0x9084, 0x0005, 0x1150, 0x900e,
-	0x080c, 0x681f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c, 0xcd58, 0x11e0, 0xa89c,
-	0xd094, 0x0118, 0xb8cc, 0xc08d, 0xb8ce, 0x2009, 0x0003, 0xa897,
-	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0xa99a, 0x9006, 0x918d,
-	0x0001, 0x2008, 0x0005, 0x9006, 0x0005, 0xa830, 0x9086, 0x0100,
-	0x7024, 0x2058, 0x1110, 0x0804, 0x562c, 0x900e, 0x080c, 0x681f,
-	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3524,
-	0x080c, 0x56e3, 0x0120, 0x2009, 0x0007, 0x0804, 0x3556, 0x7f84,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4aa4, 0x1120, 0x2009,
-	0x0002, 0x0804, 0x3556, 0x900e, 0x2130, 0x7126, 0x7132, 0xa860,
-	0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005, 0x702a, 0x20a0, 0x080c,
-	0x65ff, 0x1904, 0x4e1f, 0x080c, 0x6972, 0x0138, 0x080c, 0x697a,
-	0x0120, 0x080c, 0x6912, 0x1904, 0x4e1f, 0xd794, 0x1110, 0xd784,
-	0x01a8, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x3400,
-	0xd794, 0x0160, 0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0, 0x3d00,
-	0x20e0, 0x20a9, 0x0002, 0x080c, 0x48a6, 0x0048, 0x20a9, 0x0004,
-	0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x48a6, 0x9186,
-	0x007e, 0x0170, 0x9186, 0x0080, 0x0158, 0x080c, 0x6972, 0x90c2,
-	0x0006, 0x1210, 0xc1fd, 0x0020, 0x080c, 0x681f, 0x1108, 0xc1fd,
-	0x4104, 0xc1fc, 0xd794, 0x0528, 0xb8c4, 0x20e0, 0xb8c8, 0x2060,
-	0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003,
-	0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400,
-	0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c,
-	0x4899, 0x9c80, 0x0026, 0x2098, 0xb8c4, 0x20e0, 0x20a9, 0x0002,
-	0x4003, 0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108,
-	0x080c, 0xadcb, 0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120,
-	0x9186, 0x0800, 0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794,
-	0x0118, 0x9686, 0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804,
-	0x4daf, 0x86ff, 0x1120, 0x7124, 0x810b, 0x0804, 0x3524, 0x7033,
-	0x0001, 0x7122, 0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18b8,
-	0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076,
-	0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10e9, 0x7007, 0x0002,
-	0x701f, 0x4e5b, 0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028,
-	0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44,
-	0xa28c, 0xa390, 0xa494, 0xa598, 0x0804, 0x4daf, 0x7124, 0x810b,
-	0x0804, 0x3524, 0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98,
-	0x9184, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x3559, 0x9502,
-	0x0a04, 0x3559, 0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x3559,
-	0x9502, 0x0a04, 0x3559, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020,
-	0x0a04, 0x3559, 0x9502, 0x0a04, 0x3559, 0x9284, 0x00ff, 0x90e2,
-	0x0020, 0x0a04, 0x3559, 0x9502, 0x0a04, 0x3559, 0x9384, 0xff00,
-	0x8007, 0x90e2, 0x0020, 0x0a04, 0x3559, 0x9502, 0x0a04, 0x3559,
-	0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x3559, 0x9502, 0x0a04,
-	0x3559, 0x9484, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x3559,
-	0x9502, 0x0a04, 0x3559, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04,
-	0x3559, 0x9502, 0x0a04, 0x3559, 0x2061, 0x1989, 0x6102, 0x6206,
-	0x630a, 0x640e, 0x0804, 0x3524, 0x080c, 0x4aa4, 0x0904, 0x3556,
-	0x2009, 0x0016, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
-	0x0019, 0xaf60, 0x080c, 0x4aed, 0x701f, 0x4edf, 0x0005, 0x2001,
-	0x0138, 0x2003, 0x0000, 0x00e6, 0x2071, 0x0300, 0x701c, 0xd0a4,
-	0x1de8, 0x00ee, 0x20a9, 0x0016, 0x896e, 0x8d6e, 0x8d6f, 0x9d84,
-	0xffc0, 0x9080, 0x0019, 0x2098, 0x9d84, 0x003f, 0x20e0, 0x2069,
-	0x1877, 0x20e9, 0x0001, 0x2da0, 0x4003, 0x6800, 0x9005, 0x0904,
-	0x4f60, 0x6804, 0x2008, 0x918c, 0xfff8, 0x1904, 0x4f60, 0x680c,
-	0x9005, 0x0904, 0x4f60, 0x9082, 0xff01, 0x1a04, 0x4f60, 0x6810,
-	0x9082, 0x005c, 0x0a04, 0x4f60, 0x6824, 0x2008, 0x9082, 0x0008,
-	0x0a04, 0x4f60, 0x9182, 0x0400, 0x1a04, 0x4f60, 0x0056, 0x2029,
-	0x0000, 0x080c, 0x8afb, 0x005e, 0x6944, 0x6820, 0x9102, 0x06c0,
-	0x6820, 0x9082, 0x0019, 0x16a0, 0x6828, 0x6944, 0x810c, 0x9102,
-	0x0678, 0x6840, 0x9082, 0x000f, 0x1658, 0x080c, 0x1018, 0x2900,
-	0x0904, 0x4f7a, 0x684e, 0x00e6, 0x2071, 0x1930, 0x00b6, 0x2059,
-	0x0000, 0x080c, 0x89b7, 0x00be, 0x00ee, 0x0558, 0x080c, 0x8711,
-	0x080c, 0x8757, 0x11e0, 0x6857, 0x0000, 0x00c6, 0x2061, 0x0100,
-	0x6104, 0x918d, 0x2000, 0x6106, 0x6b10, 0x2061, 0x1a62, 0x630a,
-	0x00ce, 0x080c, 0x2956, 0x2001, 0x0138, 0x2102, 0x0804, 0x3524,
-	0x080c, 0x2956, 0x2001, 0x0138, 0x2102, 0x0804, 0x3559, 0x00e6,
-	0x2071, 0x1930, 0x080c, 0x8b8c, 0x080c, 0x8b9b, 0x080c, 0x89a6,
-	0x00ee, 0x2001, 0x188a, 0x204c, 0x080c, 0x1031, 0x2001, 0x188a,
-	0x2003, 0x0000, 0x080c, 0x2956, 0x2001, 0x0138, 0x2102, 0x0804,
-	0x3556, 0x2001, 0x1924, 0x200c, 0x918e, 0x0000, 0x0904, 0x4fd9,
-	0x080c, 0x89a1, 0x0904, 0x4fd9, 0x2001, 0x0101, 0x200c, 0x918c,
-	0xdfff, 0x2102, 0x2001, 0x0138, 0x2003, 0x0000, 0x00e6, 0x2071,
-	0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee, 0x080c, 0x89a6, 0x2001,
-	0x0035, 0x080c, 0x15ee, 0x00c6, 0x2061, 0x193c, 0x6004, 0x6100,
-	0x9106, 0x1de0, 0x00ce, 0x080c, 0x2956, 0x2001, 0x0138, 0x2102,
-	0x00e6, 0x00f6, 0x2071, 0x1923, 0x080c, 0x88e2, 0x0120, 0x2f00,
-	0x080c, 0x896c, 0x0cc8, 0x00fe, 0x00ee, 0x0126, 0x2091, 0x8000,
-	0x2001, 0x188a, 0x200c, 0x81ff, 0x0138, 0x2148, 0x080c, 0x1031,
-	0x2001, 0x188a, 0x2003, 0x0000, 0x2001, 0x183c, 0x2003, 0x0020,
-	0x00e6, 0x2071, 0x1930, 0x080c, 0x8b8c, 0x080c, 0x8b9b, 0x00ee,
-	0x012e, 0x0804, 0x3524, 0x0006, 0x080c, 0x56cf, 0xd0cc, 0x000e,
-	0x0005, 0x0006, 0x080c, 0x56d3, 0xd0bc, 0x000e, 0x0005, 0x6174,
-	0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986, 0x0804, 0x3524, 0x83ff,
-	0x1904, 0x3559, 0x2001, 0xfff0, 0x9200, 0x1a04, 0x3559, 0x2019,
-	0xffff, 0x6078, 0x9302, 0x9200, 0x0a04, 0x3559, 0x7986, 0x6276,
-	0x0804, 0x3524, 0x080c, 0x56e3, 0x1904, 0x3556, 0x7c88, 0x7d84,
-	0x7e98, 0x7f8c, 0x080c, 0x4aa4, 0x0904, 0x3556, 0x900e, 0x901e,
-	0x7326, 0x7332, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0003,
-	0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c,
-	0x6972, 0x0118, 0x080c, 0x697a, 0x1148, 0x20a9, 0x0001, 0xb814,
+	0x0002, 0x4c8c, 0x4c8c, 0x4c8e, 0x4c8c, 0x4c8c, 0x4c8c, 0x4c93,
+	0x4c8c, 0x4c8c, 0x4c8c, 0x4c98, 0x4c8c, 0x4c8c, 0x4c8c, 0x4c9d,
+	0x4c8c, 0x4c8c, 0x4c8c, 0x4ca2, 0x4c8c, 0x4c8c, 0x4c8c, 0x4ca7,
+	0x4c8c, 0x4c8c, 0x4c8c, 0x4cac, 0x080c, 0x0dd5, 0xaa74, 0xab78,
+	0xac7c, 0x0804, 0x4c18, 0xaa84, 0xab88, 0xac8c, 0x0804, 0x4c18,
+	0xaa94, 0xab98, 0xac9c, 0x0804, 0x4c18, 0xaaa4, 0xaba8, 0xacac,
+	0x0804, 0x4c18, 0xaab4, 0xabb8, 0xacbc, 0x0804, 0x4c18, 0xaac4,
+	0xabc8, 0xaccc, 0x0804, 0x4c18, 0xaad4, 0xabd8, 0xacdc, 0x0804,
+	0x4c18, 0x0016, 0x0026, 0x0036, 0x00b6, 0x00c6, 0x2009, 0x007e,
+	0x080c, 0x6608, 0x2019, 0x0001, 0xb85c, 0xd0ac, 0x0110, 0x2019,
+	0x0000, 0x2011, 0x801b, 0x080c, 0x4b14, 0x00ce, 0x00be, 0x003e,
+	0x002e, 0x001e, 0x0005, 0x0026, 0x080c, 0x56d8, 0xd0c4, 0x0120,
+	0x2011, 0x8014, 0x080c, 0x4b14, 0x002e, 0x0005, 0x81ff, 0x1904,
+	0x3558, 0x0126, 0x2091, 0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac,
+	0x6032, 0x080c, 0x73a5, 0x1158, 0x080c, 0x768d, 0x080c, 0x6023,
+	0x9085, 0x0001, 0x080c, 0x73ec, 0x080c, 0x72d7, 0x0010, 0x080c,
+	0x5ee2, 0x012e, 0x0804, 0x3526, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x3558, 0x080c, 0x56ec, 0x0120, 0x2009, 0x0007, 0x0804,
+	0x3558, 0x080c, 0x6973, 0x0120, 0x2009, 0x0008, 0x0804, 0x3558,
+	0x7984, 0x080c, 0x65a7, 0x1904, 0x355b, 0x2b00, 0x7026, 0x080c,
+	0x697b, 0x7888, 0x1170, 0x9084, 0x0005, 0x1158, 0x900e, 0x080c,
+	0x6828, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804,
+	0x3526, 0x080c, 0x4ab4, 0x0904, 0x3558, 0x9006, 0xa866, 0xa832,
+	0xa868, 0xc0fd, 0xa86a, 0x080c, 0xcd72, 0x0904, 0x3558, 0x7888,
+	0xd094, 0x0118, 0xb8cc, 0xc08d, 0xb8ce, 0x7007, 0x0003, 0x701f,
+	0x4d86, 0x0005, 0x2061, 0x1800, 0x080c, 0x56ec, 0x2009, 0x0007,
+	0x1578, 0x080c, 0x6973, 0x0118, 0x2009, 0x0008, 0x0448, 0x080c,
+	0x3316, 0x0120, 0xa998, 0x080c, 0x65a7, 0x1530, 0x080c, 0x4ae5,
+	0x0518, 0x080c, 0x697b, 0xa89c, 0x1168, 0x9084, 0x0005, 0x1150,
+	0x900e, 0x080c, 0x6828, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
+	0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c, 0xcd72, 0x11e0,
+	0xa89c, 0xd094, 0x0118, 0xb8cc, 0xc08d, 0xb8ce, 0x2009, 0x0003,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0xa99a, 0x9006,
+	0x918d, 0x0001, 0x2008, 0x0005, 0x9006, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x7024, 0x2058, 0x1110, 0x0804, 0x5635, 0x900e, 0x080c,
+	0x6828, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804,
+	0x3526, 0x080c, 0x56ec, 0x0120, 0x2009, 0x0007, 0x0804, 0x3558,
+	0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4ab4, 0x1120,
+	0x2009, 0x0002, 0x0804, 0x3558, 0x900e, 0x2130, 0x7126, 0x7132,
+	0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005, 0x702a, 0x20a0,
+	0x080c, 0x6608, 0x1904, 0x4e28, 0x080c, 0x697b, 0x0138, 0x080c,
+	0x6983, 0x0120, 0x080c, 0x691b, 0x1904, 0x4e28, 0xd794, 0x1110,
+	0xd784, 0x01a8, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098,
+	0x3400, 0xd794, 0x0160, 0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0,
+	0x3d00, 0x20e0, 0x20a9, 0x0002, 0x080c, 0x48b3, 0x0048, 0x20a9,
+	0x0004, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x48b3,
+	0x9186, 0x007e, 0x0170, 0x9186, 0x0080, 0x0158, 0x080c, 0x697b,
+	0x90c2, 0x0006, 0x1210, 0xc1fd, 0x0020, 0x080c, 0x6828, 0x1108,
+	0xc1fd, 0x4104, 0xc1fc, 0xd794, 0x0528, 0xb8c4, 0x20e0, 0xb8c8,
+	0x2060, 0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80,
+	0x0003, 0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004, 0x2098,
+	0x3400, 0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0,
+	0x080c, 0x48a6, 0x9c80, 0x0026, 0x2098, 0xb8c4, 0x20e0, 0x20a9,
+	0x0002, 0x4003, 0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005,
+	0x8108, 0x080c, 0xaddb, 0x0118, 0x9186, 0x0800, 0x0040, 0xd78c,
+	0x0120, 0x9186, 0x0800, 0x0170, 0x0018, 0x9186, 0x007e, 0x0150,
+	0xd794, 0x0118, 0x9686, 0x0020, 0x0010, 0x9686, 0x0028, 0x0150,
+	0x0804, 0x4db8, 0x86ff, 0x1120, 0x7124, 0x810b, 0x0804, 0x3526,
+	0x7033, 0x0001, 0x7122, 0x7024, 0x9600, 0x7026, 0x772e, 0x2061,
+	0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072, 0x7028,
+	0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10e9, 0x7007,
+	0x0002, 0x701f, 0x4e64, 0x0005, 0x7030, 0x9005, 0x1180, 0x7120,
+	0x7028, 0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8, 0x2061, 0x18b8,
+	0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x0804, 0x4db8, 0x7124,
+	0x810b, 0x0804, 0x3526, 0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c,
+	0x7c98, 0x9184, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x355b,
+	0x9502, 0x0a04, 0x355b, 0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04,
+	0x355b, 0x9502, 0x0a04, 0x355b, 0x9284, 0xff00, 0x8007, 0x90e2,
+	0x0020, 0x0a04, 0x355b, 0x9502, 0x0a04, 0x355b, 0x9284, 0x00ff,
+	0x90e2, 0x0020, 0x0a04, 0x355b, 0x9502, 0x0a04, 0x355b, 0x9384,
+	0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x355b, 0x9502, 0x0a04,
+	0x355b, 0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x355b, 0x9502,
+	0x0a04, 0x355b, 0x9484, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04,
+	0x355b, 0x9502, 0x0a04, 0x355b, 0x9484, 0x00ff, 0x90e2, 0x0020,
+	0x0a04, 0x355b, 0x9502, 0x0a04, 0x355b, 0x2061, 0x1988, 0x6102,
+	0x6206, 0x630a, 0x640e, 0x0804, 0x3526, 0x080c, 0x4ab4, 0x0904,
+	0x3558, 0x2009, 0x0016, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c,
+	0x9080, 0x0019, 0xaf60, 0x080c, 0x4afd, 0x701f, 0x4ee8, 0x0005,
+	0x2001, 0x0138, 0x2003, 0x0000, 0x00e6, 0x2071, 0x0300, 0x701c,
+	0xd0a4, 0x1de8, 0x00ee, 0x20a9, 0x0016, 0x896e, 0x8d6e, 0x8d6f,
+	0x9d84, 0xffc0, 0x9080, 0x0019, 0x2098, 0x9d84, 0x003f, 0x20e0,
+	0x2069, 0x1877, 0x20e9, 0x0001, 0x2da0, 0x4003, 0x6800, 0x9005,
+	0x0904, 0x4f69, 0x6804, 0x2008, 0x918c, 0xfff8, 0x1904, 0x4f69,
+	0x680c, 0x9005, 0x0904, 0x4f69, 0x9082, 0xff01, 0x1a04, 0x4f69,
+	0x6810, 0x9082, 0x005c, 0x0a04, 0x4f69, 0x6824, 0x2008, 0x9082,
+	0x0008, 0x0a04, 0x4f69, 0x9182, 0x0400, 0x1a04, 0x4f69, 0x0056,
+	0x2029, 0x0000, 0x080c, 0x8ae4, 0x005e, 0x6944, 0x6820, 0x9102,
+	0x06c0, 0x6820, 0x9082, 0x0019, 0x16a0, 0x6828, 0x6944, 0x810c,
+	0x9102, 0x0678, 0x6840, 0x9082, 0x000f, 0x1658, 0x080c, 0x1018,
+	0x2900, 0x0904, 0x4f83, 0x684e, 0x00e6, 0x2071, 0x1930, 0x00b6,
+	0x2059, 0x0000, 0x080c, 0x89a0, 0x00be, 0x00ee, 0x0558, 0x080c,
+	0x86fa, 0x080c, 0x8740, 0x11e0, 0x6857, 0x0000, 0x00c6, 0x2061,
+	0x0100, 0x6104, 0x918d, 0x2000, 0x6106, 0x6b10, 0x2061, 0x1a61,
+	0x630a, 0x00ce, 0x080c, 0x2958, 0x2001, 0x0138, 0x2102, 0x0804,
+	0x3526, 0x080c, 0x2958, 0x2001, 0x0138, 0x2102, 0x0804, 0x355b,
+	0x00e6, 0x2071, 0x1930, 0x080c, 0x8b75, 0x080c, 0x8b84, 0x080c,
+	0x898f, 0x00ee, 0x2001, 0x188a, 0x204c, 0x080c, 0x1031, 0x2001,
+	0x188a, 0x2003, 0x0000, 0x080c, 0x2958, 0x2001, 0x0138, 0x2102,
+	0x0804, 0x3558, 0x2001, 0x1924, 0x200c, 0x918e, 0x0000, 0x0904,
+	0x4fe2, 0x080c, 0x898a, 0x0904, 0x4fe2, 0x2001, 0x0101, 0x200c,
+	0x918c, 0xdfff, 0x2102, 0x2001, 0x0138, 0x2003, 0x0000, 0x00e6,
+	0x2071, 0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee, 0x080c, 0x898f,
+	0x2001, 0x0035, 0x080c, 0x15f0, 0x00c6, 0x2061, 0x193c, 0x6004,
+	0x6100, 0x9106, 0x1de0, 0x00ce, 0x080c, 0x2958, 0x2001, 0x0138,
+	0x2102, 0x00e6, 0x00f6, 0x2071, 0x1923, 0x080c, 0x88cb, 0x0120,
+	0x2f00, 0x080c, 0x8955, 0x0cc8, 0x00fe, 0x00ee, 0x0126, 0x2091,
+	0x8000, 0x2001, 0x188a, 0x200c, 0x81ff, 0x0138, 0x2148, 0x080c,
+	0x1031, 0x2001, 0x188a, 0x2003, 0x0000, 0x2001, 0x183c, 0x2003,
+	0x0020, 0x00e6, 0x2071, 0x1930, 0x080c, 0x8b75, 0x080c, 0x8b84,
+	0x00ee, 0x012e, 0x0804, 0x3526, 0x0006, 0x080c, 0x56d8, 0xd0cc,
+	0x000e, 0x0005, 0x0006, 0x080c, 0x56dc, 0xd0bc, 0x000e, 0x0005,
+	0x6174, 0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986, 0x0804, 0x3526,
+	0x83ff, 0x1904, 0x355b, 0x2001, 0xfff0, 0x9200, 0x1a04, 0x355b,
+	0x2019, 0xffff, 0x6078, 0x9302, 0x9200, 0x0a04, 0x355b, 0x7986,
+	0x6276, 0x0804, 0x3526, 0x080c, 0x56ec, 0x1904, 0x3558, 0x7c88,
+	0x7d84, 0x7e98, 0x7f8c, 0x080c, 0x4ab4, 0x0904, 0x3558, 0x900e,
+	0x901e, 0x7326, 0x7332, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080,
+	0x0003, 0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178,
+	0x080c, 0x697b, 0x0118, 0x080c, 0x6983, 0x1148, 0x20a9, 0x0001,
+	0xb814, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108,
+	0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff,
+	0x1148, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x8f51, 0x2208,
+	0x0804, 0x3526, 0x7033, 0x0001, 0x7122, 0x7024, 0x9300, 0x7026,
+	0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076,
+	0x7034, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x10e9,
+	0x7007, 0x0002, 0x701f, 0x5065, 0x0005, 0x7030, 0x9005, 0x1178,
+	0x7120, 0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8, 0x2061, 0x18b8,
+	0x2c44, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0804, 0x5023, 0x7224,
+	0x900e, 0x2001, 0x0003, 0x080c, 0x8f51, 0x2208, 0x0804, 0x3526,
+	0x00f6, 0x00e6, 0x080c, 0x56ec, 0x2009, 0x0007, 0x1904, 0x50f8,
+	0x2071, 0x189e, 0x745c, 0x84ff, 0x2009, 0x000e, 0x1904, 0x50f8,
+	0xac9c, 0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c, 0x1018, 0x2009,
+	0x0002, 0x0904, 0x50f8, 0x2900, 0x705e, 0x900e, 0x901e, 0x7356,
+	0x7362, 0xa860, 0x7066, 0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0,
+	0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x697b, 0x0118,
+	0x080c, 0x6983, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810,
+	0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120,
+	0x9386, 0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e,
+	0x2001, 0x0003, 0x080c, 0x8f51, 0x2208, 0x009e, 0xa897, 0x4000,
+	0xa99a, 0x715c, 0x81ff, 0x090c, 0x0dd5, 0x2148, 0x080c, 0x1031,
+	0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0x0418, 0x7063, 0x0001,
+	0x7152, 0x7054, 0x9300, 0x7056, 0x2061, 0x18b9, 0x2c44, 0xa37a,
+	0x7058, 0xa076, 0x7064, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a,
+	0xa09f, 0x5104, 0x000e, 0xa0a2, 0x080c, 0x10e9, 0x9006, 0x0048,
+	0x009e, 0xa897, 0x4005, 0xa99a, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0030, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c,
+	0x0dd5, 0x00e6, 0x2071, 0x189e, 0xa06c, 0x908e, 0x0100, 0x0138,
+	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x00d8, 0x7060,
+	0x9005, 0x1158, 0x7150, 0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8,
+	0xa48c, 0xa590, 0xa694, 0xa798, 0x0428, 0xa87b, 0x0000, 0xa883,
+	0x0000, 0xa897, 0x4000, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c,
+	0x8f51, 0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0dd5, 0x2148, 0x080c,
+	0x1031, 0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6c86, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee,
+	0x00fe, 0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c,
+	0x697b, 0x0118, 0x080c, 0x6983, 0x1148, 0xb814, 0x20a9, 0x0001,
 	0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182,
-	0x0800, 0x0120, 0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff, 0x1148,
-	0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x8f68, 0x2208, 0x0804,
-	0x3524, 0x7033, 0x0001, 0x7122, 0x7024, 0x9300, 0x7026, 0x2061,
-	0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076, 0x7034,
-	0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x10e9, 0x7007,
-	0x0002, 0x701f, 0x505c, 0x0005, 0x7030, 0x9005, 0x1178, 0x7120,
-	0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44,
-	0xa48c, 0xa590, 0xa694, 0xa798, 0x0804, 0x501a, 0x7224, 0x900e,
-	0x2001, 0x0003, 0x080c, 0x8f68, 0x2208, 0x0804, 0x3524, 0x00f6,
-	0x00e6, 0x080c, 0x56e3, 0x2009, 0x0007, 0x1904, 0x50ef, 0x2071,
-	0x189e, 0x745c, 0x84ff, 0x2009, 0x000e, 0x1904, 0x50ef, 0xac9c,
-	0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c, 0x1018, 0x2009, 0x0002,
-	0x0904, 0x50ef, 0x2900, 0x705e, 0x900e, 0x901e, 0x7356, 0x7362,
-	0xa860, 0x7066, 0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0, 0x91d8,
-	0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6972, 0x0118, 0x080c,
-	0x697a, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004,
-	0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386,
-	0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e, 0x2001,
-	0x0003, 0x080c, 0x8f68, 0x2208, 0x009e, 0xa897, 0x4000, 0xa99a,
-	0x715c, 0x81ff, 0x090c, 0x0dd5, 0x2148, 0x080c, 0x1031, 0x9006,
-	0x705e, 0x918d, 0x0001, 0x2008, 0x0418, 0x7063, 0x0001, 0x7152,
-	0x7054, 0x9300, 0x7056, 0x2061, 0x18b9, 0x2c44, 0xa37a, 0x7058,
-	0xa076, 0x7064, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0xa09f,
-	0x50fb, 0x000e, 0xa0a2, 0x080c, 0x10e9, 0x9006, 0x0048, 0x009e,
-	0xa897, 0x4005, 0xa99a, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
-	0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c, 0x0dd5,
-	0x00e6, 0x2071, 0x189e, 0xa06c, 0x908e, 0x0100, 0x0138, 0xa87b,
-	0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x00d8, 0x7060, 0x9005,
-	0x1158, 0x7150, 0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8, 0xa48c,
-	0xa590, 0xa694, 0xa798, 0x0428, 0xa87b, 0x0000, 0xa883, 0x0000,
-	0xa897, 0x4000, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x8f68,
-	0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0dd5, 0x2148, 0x080c, 0x1031,
-	0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6c81, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee, 0x00fe,
-	0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6972,
-	0x0118, 0x080c, 0x697a, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004,
-	0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800,
-	0x0120, 0x9386, 0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0, 0x7154,
-	0x810c, 0xa99a, 0xa897, 0x4000, 0x715c, 0x81ff, 0x090c, 0x0dd5,
-	0x2148, 0x080c, 0x1031, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008,
-	0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c81, 0x012e,
-	0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001, 0x7152,
-	0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696, 0xa79a,
-	0x080c, 0x10e9, 0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c, 0x90be,
-	0x7000, 0x0148, 0x90be, 0x7100, 0x0130, 0x90be, 0x7200, 0x0118,
-	0x009e, 0x0804, 0x3559, 0xa884, 0xa988, 0x080c, 0x283e, 0x1518,
-	0x080c, 0x659e, 0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c, 0x080c,
-	0x4aa4, 0x01c8, 0x080c, 0x4aa4, 0x01b0, 0x009e, 0xa867, 0x0000,
-	0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000, 0xa804, 0x2048, 0x080c,
-	0xccdf, 0x1120, 0x2009, 0x0003, 0x0804, 0x3556, 0x7007, 0x0003,
-	0x701f, 0x51c8, 0x0005, 0x009e, 0x2009, 0x0002, 0x0804, 0x3556,
-	0x7124, 0x080c, 0x32bb, 0xa820, 0x9086, 0x8001, 0x1120, 0x2009,
-	0x0004, 0x0804, 0x3556, 0x2900, 0x7022, 0xa804, 0x0096, 0x2048,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x009e,
-	0x9080, 0x0002, 0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0, 0x27e8,
-	0x20a9, 0x002a, 0x080c, 0x0f7c, 0xaa6c, 0xab70, 0xac74, 0xad78,
-	0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c, 0x97c6,
-	0x7000, 0x0118, 0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004, 0x0600,
-	0x2009, 0x0004, 0x000e, 0x007e, 0x0804, 0x4af0, 0x97c6, 0x7200,
-	0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e, 0x007e, 0x2061, 0x18b8,
-	0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392, 0xa496,
-	0xa59a, 0x080c, 0x10e9, 0x7007, 0x0002, 0x701f, 0x5224, 0x0005,
-	0x000e, 0x007e, 0x0804, 0x3559, 0x7020, 0x2048, 0xa804, 0x2048,
-	0xa804, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
-	0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9,
-	0x002a, 0x080c, 0x0f7c, 0x2100, 0x2238, 0x2061, 0x18b8, 0x2c44,
-	0xa28c, 0xa390, 0xa494, 0xa598, 0x2009, 0x002a, 0x0804, 0x4af0,
-	0x81ff, 0x1904, 0x3556, 0x798c, 0x2001, 0x197e, 0x918c, 0x8000,
-	0x2102, 0x080c, 0x4abb, 0x0904, 0x3559, 0x080c, 0x6972, 0x0120,
-	0x080c, 0x697a, 0x1904, 0x3559, 0x080c, 0x66c6, 0x0904, 0x3556,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x678c, 0x012e, 0x0904, 0x3556,
-	0x2001, 0x197e, 0x2004, 0xd0fc, 0x1904, 0x3524, 0x0804, 0x451c,
-	0xa9a0, 0x2001, 0x197e, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c,
-	0x4ac8, 0x01a0, 0x080c, 0x6972, 0x0118, 0x080c, 0x697a, 0x1170,
-	0x080c, 0x66c6, 0x2009, 0x0002, 0x0128, 0x080c, 0x678c, 0x1170,
-	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0x2001, 0x197e, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x56d7, 0x0110,
-	0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005,
-	0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904, 0x4491, 0x080c, 0x4ad7,
-	0x0904, 0x3559, 0x080c, 0x4aa4, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x3556, 0x080c, 0x6972, 0x0130, 0x908e, 0x0004, 0x0118, 0x908e,
-	0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c, 0xb802,
-	0x0028, 0x080c, 0x56cf, 0xd0b4, 0x0904, 0x44cb, 0x7884, 0x908e,
-	0x007e, 0x0904, 0x44cb, 0x908e, 0x007f, 0x0904, 0x44cb, 0x908e,
-	0x0080, 0x0904, 0x44cb, 0xb800, 0xd08c, 0x1904, 0x44cb, 0xa867,
-	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xccfe, 0x1120, 0x2009,
-	0x0003, 0x0804, 0x3556, 0x7007, 0x0003, 0x701f, 0x52f0, 0x0005,
-	0x080c, 0x4ad7, 0x0904, 0x3559, 0x0804, 0x44cb, 0x080c, 0x3314,
-	0x0108, 0x0005, 0x2009, 0x1834, 0x210c, 0x81ff, 0x0120, 0x2009,
-	0x0001, 0x0804, 0x3556, 0x080c, 0x56e3, 0x0120, 0x2009, 0x0007,
-	0x0804, 0x3556, 0x080c, 0x696a, 0x0120, 0x2009, 0x0008, 0x0804,
-	0x3556, 0xb89c, 0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x44cb, 0x9006,
-	0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xcd58, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x3556, 0x7007, 0x0003, 0x701f, 0x5329,
-	0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804,
-	0x562c, 0x080c, 0x4ad7, 0x0904, 0x3559, 0x0804, 0x52c2, 0x81ff,
-	0x2009, 0x0001, 0x1904, 0x3556, 0x080c, 0x56e3, 0x2009, 0x0007,
-	0x1904, 0x3556, 0x080c, 0x696a, 0x0120, 0x2009, 0x0008, 0x0804,
-	0x3556, 0x080c, 0x4ad7, 0x0904, 0x3559, 0x080c, 0x6972, 0x2009,
-	0x0009, 0x1904, 0x3556, 0x080c, 0x4aa4, 0x2009, 0x0002, 0x0904,
-	0x3556, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x7988,
-	0x9194, 0xff00, 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128, 0xc0ed,
-	0xa952, 0x798c, 0xa956, 0x0038, 0x928e, 0x0100, 0x1904, 0x3559,
-	0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c, 0xcfab, 0x2009, 0x0003,
-	0x0904, 0x3556, 0x7007, 0x0003, 0x701f, 0x537f, 0x0005, 0xa830,
-	0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x3556, 0x0804, 0x3524,
-	0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c, 0x56e3,
-	0x1188, 0x2009, 0x0014, 0x0804, 0x3556, 0xd2dc, 0x1568, 0x81ff,
-	0x2009, 0x0001, 0x1904, 0x3556, 0x080c, 0x56e3, 0x2009, 0x0007,
-	0x1904, 0x3556, 0xd2f4, 0x0130, 0x9284, 0x5000, 0x080c, 0x56aa,
-	0x0804, 0x3524, 0xd2fc, 0x0158, 0x080c, 0x4ad7, 0x0904, 0x3559,
-	0x7984, 0x9284, 0x9000, 0x080c, 0x5687, 0x0804, 0x3524, 0x080c,
-	0x4ad7, 0x0904, 0x3559, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
-	0x2009, 0x0009, 0x1904, 0x5468, 0x080c, 0x4aa4, 0x2009, 0x0002,
-	0x0904, 0x5468, 0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009, 0x0008,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4aed, 0x701f, 0x53d9,
-	0x0005, 0xa86c, 0x9086, 0x0500, 0x1138, 0xa870, 0x9005, 0x1120,
-	0xa874, 0x9084, 0xff00, 0x0110, 0x1904, 0x3559, 0xa866, 0xa832,
-	0xa868, 0xc0fd, 0xa86a, 0x080c, 0x4ad7, 0x1110, 0x0804, 0x3559,
-	0x2009, 0x0043, 0x080c, 0xd013, 0x2009, 0x0003, 0x0904, 0x5468,
-	0x7007, 0x0003, 0x701f, 0x53fd, 0x0005, 0xa830, 0x9086, 0x0100,
-	0x2009, 0x0004, 0x0904, 0x5468, 0x7984, 0x7aa8, 0x9284, 0x1000,
-	0x080c, 0x5687, 0x0804, 0x3524, 0x00c6, 0xaab0, 0x9284, 0xc000,
-	0x0140, 0xd2ec, 0x0168, 0x080c, 0x56e3, 0x1150, 0x2009, 0x0014,
-	0x04f0, 0x2061, 0x1800, 0x080c, 0x56e3, 0x2009, 0x0007, 0x15b8,
-	0xd2f4, 0x0128, 0x9284, 0x5000, 0x080c, 0x56aa, 0x0050, 0xd2fc,
-	0x0178, 0x080c, 0x4ad5, 0x0588, 0xa998, 0x9284, 0x9000, 0x080c,
-	0x5687, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0438,
-	0x080c, 0x4ad5, 0x0510, 0x080c, 0x6972, 0x2009, 0x0009, 0x11b8,
-	0xa8c4, 0x9086, 0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0, 0xa8cc,
-	0x9084, 0xff00, 0x1190, 0x080c, 0x4ad5, 0x1108, 0x0070, 0x2009,
-	0x004b, 0x080c, 0xd013, 0x2009, 0x0003, 0x0108, 0x0078, 0x0429,
-	0x19c0, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0030, 0x00ce, 0x0005, 0x9006, 0x0ce0,
-	0x7aa8, 0xd2dc, 0x0904, 0x3556, 0x0016, 0x7984, 0x9284, 0x1000,
-	0xc0fd, 0x080c, 0x5687, 0x001e, 0x1904, 0x3556, 0x0804, 0x3524,
-	0x00f6, 0x2d78, 0x0011, 0x00fe, 0x0005, 0xaab0, 0xd2dc, 0x0150,
-	0x0016, 0xa998, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5687, 0x001e,
-	0x9085, 0x0001, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
-	0x3556, 0x080c, 0x56e3, 0x0120, 0x2009, 0x0007, 0x0804, 0x3556,
-	0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x65ff, 0x1904, 0x3559,
-	0x9186, 0x007f, 0x0138, 0x080c, 0x6972, 0x0120, 0x2009, 0x0009,
-	0x0804, 0x3556, 0x080c, 0x4aa4, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x3556, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001, 0x0100,
-	0x8007, 0xa80a, 0x080c, 0xcd18, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x3556, 0x7007, 0x0003, 0x701f, 0x54c6, 0x0005, 0xa808, 0x8007,
-	0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x3556, 0xa8e0,
-	0xa866, 0xa810, 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814, 0x8007,
-	0x9084, 0x00ff, 0x8004, 0x9080, 0x0002, 0x9108, 0x8906, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4af0, 0x080c, 0x4aa4, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x3556, 0x7984, 0x9194, 0xff00, 0x918c,
-	0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023, 0x19b3, 0x0040, 0x92c6,
-	0x0001, 0x1118, 0x7023, 0x19cd, 0x0010, 0x0804, 0x3559, 0x2009,
+	0x0800, 0x0120, 0x9386, 0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0,
+	0x7154, 0x810c, 0xa99a, 0xa897, 0x4000, 0x715c, 0x81ff, 0x090c,
+	0x0dd5, 0x2148, 0x080c, 0x1031, 0x9006, 0x705e, 0x918d, 0x0001,
+	0x2008, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c86,
+	0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001,
+	0x7152, 0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696,
+	0xa79a, 0x080c, 0x10e9, 0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c,
+	0x90be, 0x7000, 0x0148, 0x90be, 0x7100, 0x0130, 0x90be, 0x7200,
+	0x0118, 0x009e, 0x0804, 0x355b, 0xa884, 0xa988, 0x080c, 0x2840,
+	0x1518, 0x080c, 0x65a7, 0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c,
+	0x080c, 0x4ab4, 0x01c8, 0x080c, 0x4ab4, 0x01b0, 0x009e, 0xa867,
+	0x0000, 0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000, 0xa804, 0x2048,
+	0x080c, 0xccf4, 0x1120, 0x2009, 0x0003, 0x0804, 0x3558, 0x7007,
+	0x0003, 0x701f, 0x51d1, 0x0005, 0x009e, 0x2009, 0x0002, 0x0804,
+	0x3558, 0x7124, 0x080c, 0x32bd, 0xa820, 0x9086, 0x8001, 0x1120,
+	0x2009, 0x0004, 0x0804, 0x3558, 0x2900, 0x7022, 0xa804, 0x0096,
+	0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x009e, 0x9080, 0x0002, 0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0,
+	0x27e8, 0x20a9, 0x002a, 0x080c, 0x0f7c, 0xaa6c, 0xab70, 0xac74,
+	0xad78, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c,
+	0x97c6, 0x7000, 0x0118, 0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004,
+	0x0600, 0x2009, 0x0004, 0x000e, 0x007e, 0x0804, 0x4b00, 0x97c6,
+	0x7200, 0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e, 0x007e, 0x2061,
+	0x18b8, 0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392,
+	0xa496, 0xa59a, 0x080c, 0x10e9, 0x7007, 0x0002, 0x701f, 0x522d,
+	0x0005, 0x000e, 0x007e, 0x0804, 0x355b, 0x7020, 0x2048, 0xa804,
+	0x2048, 0xa804, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8,
+	0x20a9, 0x002a, 0x080c, 0x0f7c, 0x2100, 0x2238, 0x2061, 0x18b8,
+	0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x2009, 0x002a, 0x0804,
+	0x4b00, 0x81ff, 0x1904, 0x3558, 0x798c, 0x2001, 0x197d, 0x918c,
+	0x8000, 0x2102, 0x080c, 0x4acb, 0x0904, 0x355b, 0x080c, 0x697b,
+	0x0120, 0x080c, 0x6983, 0x1904, 0x355b, 0x080c, 0x66cf, 0x0904,
+	0x3558, 0x0126, 0x2091, 0x8000, 0x080c, 0x6795, 0x012e, 0x0904,
+	0x3558, 0x2001, 0x197d, 0x2004, 0xd0fc, 0x1904, 0x3526, 0x0804,
+	0x4529, 0xa9a0, 0x2001, 0x197d, 0x918c, 0x8000, 0xc18d, 0x2102,
+	0x080c, 0x4ad8, 0x01a0, 0x080c, 0x697b, 0x0118, 0x080c, 0x6983,
+	0x1170, 0x080c, 0x66cf, 0x2009, 0x0002, 0x0128, 0x080c, 0x6795,
+	0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
+	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
+	0x4000, 0x2001, 0x197d, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x56e0,
+	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
+	0x0005, 0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904, 0x449e, 0x080c,
+	0x4ae7, 0x0904, 0x355b, 0x080c, 0x4ab4, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x3558, 0x080c, 0x697b, 0x0130, 0x908e, 0x0004, 0x0118,
+	0x908e, 0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c,
+	0xb802, 0x0028, 0x080c, 0x56d8, 0xd0b4, 0x0904, 0x44d8, 0x7884,
+	0x908e, 0x007e, 0x0904, 0x44d8, 0x908e, 0x007f, 0x0904, 0x44d8,
+	0x908e, 0x0080, 0x0904, 0x44d8, 0xb800, 0xd08c, 0x1904, 0x44d8,
+	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xcd13, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x3558, 0x7007, 0x0003, 0x701f, 0x52f9,
+	0x0005, 0x080c, 0x4ae7, 0x0904, 0x355b, 0x0804, 0x44d8, 0x080c,
+	0x3316, 0x0108, 0x0005, 0x2009, 0x1834, 0x210c, 0x81ff, 0x0120,
+	0x2009, 0x0001, 0x0804, 0x3558, 0x080c, 0x56ec, 0x0120, 0x2009,
+	0x0007, 0x0804, 0x3558, 0x080c, 0x6973, 0x0120, 0x2009, 0x0008,
+	0x0804, 0x3558, 0xb89c, 0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x44d8,
+	0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xcd72,
+	0x1120, 0x2009, 0x0003, 0x0804, 0x3558, 0x7007, 0x0003, 0x701f,
+	0x5332, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004,
+	0x0804, 0x5635, 0x080c, 0x4ae7, 0x0904, 0x355b, 0x0804, 0x52cb,
+	0x81ff, 0x2009, 0x0001, 0x1904, 0x3558, 0x080c, 0x56ec, 0x2009,
+	0x0007, 0x1904, 0x3558, 0x080c, 0x6973, 0x0120, 0x2009, 0x0008,
+	0x0804, 0x3558, 0x080c, 0x4ae7, 0x0904, 0x355b, 0x080c, 0x697b,
+	0x2009, 0x0009, 0x1904, 0x3558, 0x080c, 0x4ab4, 0x2009, 0x0002,
+	0x0904, 0x3558, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
+	0x7988, 0x9194, 0xff00, 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128,
+	0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038, 0x928e, 0x0100, 0x1904,
+	0x355b, 0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c, 0xcfc5, 0x2009,
+	0x0003, 0x0904, 0x3558, 0x7007, 0x0003, 0x701f, 0x5388, 0x0005,
+	0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x3558, 0x0804,
+	0x3526, 0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c,
+	0x56ec, 0x1188, 0x2009, 0x0014, 0x0804, 0x3558, 0xd2dc, 0x1568,
+	0x81ff, 0x2009, 0x0001, 0x1904, 0x3558, 0x080c, 0x56ec, 0x2009,
+	0x0007, 0x1904, 0x3558, 0xd2f4, 0x0130, 0x9284, 0x5000, 0x080c,
+	0x56b3, 0x0804, 0x3526, 0xd2fc, 0x0158, 0x080c, 0x4ae7, 0x0904,
+	0x355b, 0x7984, 0x9284, 0x9000, 0x080c, 0x5690, 0x0804, 0x3526,
+	0x080c, 0x4ae7, 0x0904, 0x355b, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x2009, 0x0009, 0x1904, 0x5471, 0x080c, 0x4ab4, 0x2009,
+	0x0002, 0x0904, 0x5471, 0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009,
+	0x0008, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4afd, 0x701f,
+	0x53e2, 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138, 0xa870, 0x9005,
+	0x1120, 0xa874, 0x9084, 0xff00, 0x0110, 0x1904, 0x355b, 0xa866,
+	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x4ae7, 0x1110, 0x0804,
+	0x355b, 0x2009, 0x0043, 0x080c, 0xd02d, 0x2009, 0x0003, 0x0904,
+	0x5471, 0x7007, 0x0003, 0x701f, 0x5406, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x2009, 0x0004, 0x0904, 0x5471, 0x7984, 0x7aa8, 0x9284,
+	0x1000, 0x080c, 0x5690, 0x0804, 0x3526, 0x00c6, 0xaab0, 0x9284,
+	0xc000, 0x0140, 0xd2ec, 0x0168, 0x080c, 0x56ec, 0x1150, 0x2009,
+	0x0014, 0x04f0, 0x2061, 0x1800, 0x080c, 0x56ec, 0x2009, 0x0007,
+	0x15b8, 0xd2f4, 0x0128, 0x9284, 0x5000, 0x080c, 0x56b3, 0x0050,
+	0xd2fc, 0x0178, 0x080c, 0x4ae5, 0x0588, 0xa998, 0x9284, 0x9000,
+	0x080c, 0x5690, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
+	0x0438, 0x080c, 0x4ae5, 0x0510, 0x080c, 0x697b, 0x2009, 0x0009,
+	0x11b8, 0xa8c4, 0x9086, 0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0,
+	0xa8cc, 0x9084, 0xff00, 0x1190, 0x080c, 0x4ae5, 0x1108, 0x0070,
+	0x2009, 0x004b, 0x080c, 0xd02d, 0x2009, 0x0003, 0x0108, 0x0078,
+	0x0429, 0x19c0, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ce, 0x0005, 0x9006,
+	0x0ce0, 0x7aa8, 0xd2dc, 0x0904, 0x3558, 0x0016, 0x7984, 0x9284,
+	0x1000, 0xc0fd, 0x080c, 0x5690, 0x001e, 0x1904, 0x3558, 0x0804,
+	0x3526, 0x00f6, 0x2d78, 0x0011, 0x00fe, 0x0005, 0xaab0, 0xd2dc,
+	0x0150, 0x0016, 0xa998, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5690,
+	0x001e, 0x9085, 0x0001, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x3558, 0x080c, 0x56ec, 0x0120, 0x2009, 0x0007, 0x0804,
+	0x3558, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x6608, 0x1904,
+	0x355b, 0x9186, 0x007f, 0x0138, 0x080c, 0x697b, 0x0120, 0x2009,
+	0x0009, 0x0804, 0x3558, 0x080c, 0x4ab4, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x3558, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001,
+	0x0100, 0x8007, 0xa80a, 0x080c, 0xcd2d, 0x1120, 0x2009, 0x0003,
+	0x0804, 0x3558, 0x7007, 0x0003, 0x701f, 0x54cf, 0x0005, 0xa808,
+	0x8007, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x3558,
+	0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814,
+	0x8007, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0002, 0x9108, 0x8906,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b00, 0x080c, 0x4ab4,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x3558, 0x7984, 0x9194, 0xff00,
+	0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023, 0x19b2, 0x0040,
+	0x92c6, 0x0001, 0x1118, 0x7023, 0x19cc, 0x0010, 0x0804, 0x355b,
+	0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
+	0x0019, 0xaf60, 0x080c, 0x4afd, 0x701f, 0x551f, 0x0005, 0x2001,
+	0x182e, 0x2003, 0x0001, 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860,
+	0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003,
+	0x0804, 0x3526, 0x080c, 0x4ab4, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x3558, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff,
+	0x1118, 0x2099, 0x19b2, 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099,
+	0x19cc, 0x0010, 0x0804, 0x355b, 0xa85c, 0x9080, 0x0019, 0x20a0,
+	0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009,
 	0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019,
-	0xaf60, 0x080c, 0x4aed, 0x701f, 0x5516, 0x0005, 0x2001, 0x182e,
-	0x2003, 0x0001, 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860, 0x20e0,
-	0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003, 0x0804,
-	0x3524, 0x080c, 0x4aa4, 0x1120, 0x2009, 0x0002, 0x0804, 0x3556,
-	0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118,
-	0x2099, 0x19b3, 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099, 0x19cd,
-	0x0010, 0x0804, 0x3559, 0xa85c, 0x9080, 0x0019, 0x20a0, 0xa860,
-	0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009, 0x001a,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60,
-	0x0804, 0x4af0, 0x7884, 0x908a, 0x1000, 0x1a04, 0x3559, 0x0126,
-	0x2091, 0x8000, 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6, 0x2061,
-	0x19fa, 0x6142, 0x00ce, 0x012e, 0x0804, 0x3524, 0x00c6, 0x080c,
-	0x73bc, 0x1160, 0x080c, 0x76a4, 0x080c, 0x601a, 0x9085, 0x0001,
-	0x080c, 0x7403, 0x080c, 0x72ee, 0x080c, 0x0dd5, 0x2061, 0x1800,
-	0x6030, 0xc09d, 0x6032, 0x080c, 0x5ed9, 0x00ce, 0x0005, 0x00c6,
-	0x2001, 0x1800, 0x2004, 0x908e, 0x0000, 0x0904, 0x3556, 0x7884,
-	0x9005, 0x0188, 0x7888, 0x2061, 0x199c, 0x2c0c, 0x2062, 0x080c,
-	0x2c20, 0x01a0, 0x080c, 0x2c28, 0x0188, 0x080c, 0x2c30, 0x0170,
-	0x2162, 0x0804, 0x3559, 0x2061, 0x0100, 0x6038, 0x9086, 0x0007,
-	0x1118, 0x2009, 0x0001, 0x0010, 0x2009, 0x0000, 0x7884, 0x9086,
-	0x0002, 0x1548, 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a, 0x0026,
-	0x2011, 0x0003, 0x080c, 0xa653, 0x2011, 0x0002, 0x080c, 0xa65d,
-	0x002e, 0x080c, 0xa540, 0x0036, 0x901e, 0x080c, 0xa5b6, 0x003e,
-	0x60e3, 0x0000, 0x080c, 0xe9e9, 0x080c, 0xea04, 0x9085, 0x0001,
-	0x080c, 0x7403, 0x9006, 0x080c, 0x2cef, 0x2001, 0x1800, 0x2003,
-	0x0004, 0x6027, 0x0008, 0x00ce, 0x0804, 0x3524, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x3556, 0x080c, 0x56e3, 0x0120, 0x2009,
-	0x0007, 0x0804, 0x3556, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c,
-	0x65ff, 0x1904, 0x3559, 0x9186, 0x007f, 0x0138, 0x080c, 0x6972,
-	0x0120, 0x2009, 0x0009, 0x0804, 0x3556, 0x080c, 0x4aa4, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x3556, 0xa867, 0x0000, 0xa868, 0xc0fd,
-	0xa86a, 0x080c, 0xcd1b, 0x1120, 0x2009, 0x0003, 0x0804, 0x3556,
-	0x7007, 0x0003, 0x701f, 0x5615, 0x0005, 0xa830, 0x9086, 0x0100,
-	0x1120, 0x2009, 0x0004, 0x0804, 0x3556, 0xa8e0, 0xa866, 0xa834,
-	0x8007, 0x800c, 0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0xaf60, 0x0804, 0x4af0, 0xa898, 0x9086, 0x000d, 0x1904,
-	0x3556, 0x2021, 0x4005, 0x0126, 0x2091, 0x8000, 0x0e04, 0x5639,
-	0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833,
-	0x0011, 0x0010, 0x7833, 0x0010, 0x7883, 0x4005, 0xa998, 0x7986,
-	0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c, 0x4ae0, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x7007, 0x0001,
-	0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x00c6, 0x2061, 0x19fa, 0x7984, 0x6152, 0x614e, 0x6057,
-	0x0000, 0x604b, 0x0009, 0x7898, 0x606a, 0x789c, 0x6066, 0x7888,
-	0x6062, 0x788c, 0x605e, 0x2001, 0x1a08, 0x2044, 0x2001, 0x1a0f,
-	0xa076, 0xa060, 0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002, 0xa06b,
-	0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e, 0x0804, 0x3524, 0x0126,
-	0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0128, 0x0006,
-	0x080c, 0xcb82, 0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180, 0x1000,
-	0x2004, 0x905d, 0x0160, 0x080c, 0x6034, 0x080c, 0xadcb, 0x0110,
-	0xb817, 0x0000, 0x9006, 0x00ce, 0x00be, 0x012e, 0x0005, 0x9085,
-	0x0001, 0x0cc8, 0x0126, 0x2091, 0x8000, 0x0156, 0x2010, 0x900e,
-	0x20a9, 0x0800, 0x0016, 0x9180, 0x1000, 0x2004, 0x9005, 0x0180,
-	0x9186, 0x007e, 0x0168, 0x9186, 0x007f, 0x0150, 0x9186, 0x0080,
-	0x0138, 0x9186, 0x00ff, 0x0120, 0x0026, 0x2200, 0x0801, 0x002e,
-	0x001e, 0x8108, 0x1f04, 0x56b2, 0x015e, 0x012e, 0x0005, 0x2001,
-	0x1848, 0x2004, 0x0005, 0x2001, 0x1867, 0x2004, 0x0005, 0x0006,
-	0x2001, 0x1810, 0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, 0x180e,
-	0x2004, 0xd0b4, 0x0005, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003,
-	0x0005, 0x0016, 0x00e6, 0x2071, 0x189e, 0x7108, 0x910d, 0x710a,
-	0x00ee, 0x001e, 0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04, 0x3559,
-	0x810c, 0x0016, 0x080c, 0x4aa4, 0x080c, 0x0f07, 0x2100, 0x2238,
-	0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e, 0x080c, 0x4aed, 0x701f,
-	0x570a, 0x0005, 0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8, 0x7aac,
-	0x79a4, 0x810c, 0x2061, 0x18b8, 0x2c44, 0xa770, 0xa074, 0x2071,
-	0x189e, 0x080c, 0x4af0, 0x701f, 0x571e, 0x0005, 0x2061, 0x18b8,
-	0x2c44, 0x0016, 0x0026, 0xa270, 0xa174, 0x080c, 0x0f0f, 0x002e,
-	0x001e, 0x080c, 0x0fbc, 0x9006, 0xa802, 0xa806, 0x0804, 0x3524,
-	0x0126, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6,
-	0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, 0x2071, 0x1800,
-	0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, 0x58d9, 0x0068,
-	0xd08c, 0x0118, 0x080c, 0x57e2, 0x0040, 0xd094, 0x0118, 0x080c,
-	0x57b2, 0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x012e, 0x0005,
-	0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0c68,
-	0x0006, 0x7098, 0x9005, 0x000e, 0x0120, 0x709b, 0x0000, 0x7093,
-	0x0000, 0x624c, 0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086, 0xf0f0,
-	0x0130, 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0490, 0x9294,
-	0xff00, 0x9296, 0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160, 0x6240,
-	0x9295, 0x0100, 0x6242, 0x9294, 0x0010, 0x0128, 0x2009, 0x00f7,
-	0x080c, 0x5f96, 0x00f0, 0x6040, 0x9084, 0x0010, 0x9085, 0x0140,
-	0x6042, 0x6043, 0x0000, 0x7087, 0x0000, 0x70a3, 0x0001, 0x70c7,
-	0x0000, 0x70df, 0x0000, 0x2009, 0x1c80, 0x200b, 0x0000, 0x7097,
-	0x0000, 0x708b, 0x000f, 0x2009, 0x000f, 0x2011, 0x5e7c, 0x080c,
-	0x858b, 0x0005, 0x2001, 0x1869, 0x2004, 0xd08c, 0x0110, 0x705f,
-	0xffff, 0x7088, 0x9005, 0x1528, 0x2011, 0x5e7c, 0x080c, 0x84f3,
-	0x6040, 0x9094, 0x0010, 0x9285, 0x0020, 0x6042, 0x20a9, 0x00c8,
-	0x6044, 0xd08c, 0x1168, 0x1f04, 0x57c8, 0x6242, 0x709b, 0x0000,
-	0x6040, 0x9094, 0x0010, 0x9285, 0x0080, 0x6042, 0x6242, 0x0048,
-	0x6242, 0x709b, 0x0000, 0x708f, 0x0000, 0x9006, 0x080c, 0x601f,
-	0x0000, 0x0005, 0x708c, 0x908a, 0x0003, 0x1a0c, 0x0dd5, 0x000b,
-	0x0005, 0x57ec, 0x583d, 0x58d8, 0x00f6, 0x0016, 0x6900, 0x918c,
-	0x0800, 0x708f, 0x0001, 0x2001, 0x015d, 0x2003, 0x0000, 0x6803,
-	0x00fc, 0x20a9, 0x0004, 0x6800, 0x9084, 0x00fc, 0x0120, 0x1f04,
-	0x57fb, 0x080c, 0x0dd5, 0x68a0, 0x68a2, 0x689c, 0x689e, 0x6898,
-	0x689a, 0xa001, 0x918d, 0x1600, 0x6902, 0x001e, 0x6837, 0x0020,
-	0x080c, 0x5ffb, 0x2079, 0x1c00, 0x7833, 0x1101, 0x7837, 0x0000,
-	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1, 0x1c0e,
-	0x20a9, 0x0004, 0x4003, 0x080c, 0xab21, 0x20e1, 0x0001, 0x2099,
-	0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003,
-	0x60c3, 0x000c, 0x600f, 0x0000, 0x080c, 0x5ead, 0x00fe, 0x9006,
-	0x7092, 0x6043, 0x0008, 0x6042, 0x0005, 0x00f6, 0x7090, 0x7093,
-	0x0000, 0x9025, 0x0904, 0x58b5, 0x6020, 0xd0b4, 0x1904, 0x58b3,
-	0x71a0, 0x81ff, 0x0904, 0x58a1, 0x9486, 0x000c, 0x1904, 0x58ae,
-	0x9480, 0x0018, 0x8004, 0x20a8, 0x080c, 0x5ff4, 0x2011, 0x0260,
-	0x2019, 0x1c00, 0x220c, 0x2304, 0x9106, 0x11e8, 0x8210, 0x8318,
-	0x1f04, 0x585a, 0x6043, 0x0004, 0x2061, 0x0140, 0x605b, 0xbc94,
-	0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0006, 0x708f, 0x0002,
-	0x709b, 0x0002, 0x2009, 0x07d0, 0x2011, 0x5e83, 0x080c, 0x858b,
-	0x080c, 0x5ffb, 0x04c0, 0x080c, 0x5ff4, 0x2079, 0x0260, 0x7930,
-	0x918e, 0x1101, 0x1558, 0x7834, 0x9005, 0x1540, 0x7900, 0x918c,
-	0x00ff, 0x1118, 0x7804, 0x9005, 0x0190, 0x080c, 0x5ff4, 0x2011,
-	0x026e, 0x2019, 0x1805, 0x20a9, 0x0004, 0x220c, 0x2304, 0x9102,
-	0x0230, 0x11a0, 0x8210, 0x8318, 0x1f04, 0x5895, 0x0078, 0x70a3,
-	0x0000, 0x080c, 0x5ff4, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9,
-	0x0001, 0x20a1, 0x1c00, 0x20a9, 0x0014, 0x4003, 0x6043, 0x0008,
-	0x6043, 0x0000, 0x0010, 0x00fe, 0x0005, 0x6040, 0x9085, 0x0100,
-	0x6042, 0x6020, 0xd0b4, 0x1db8, 0x080c, 0xab21, 0x20e1, 0x0001,
+	0xaf60, 0x0804, 0x4b00, 0x7884, 0x908a, 0x1000, 0x1a04, 0x355b,
+	0x0126, 0x2091, 0x8000, 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6,
+	0x2061, 0x19f9, 0x6142, 0x00ce, 0x012e, 0x0804, 0x3526, 0x00c6,
+	0x080c, 0x73a5, 0x1160, 0x080c, 0x768d, 0x080c, 0x6023, 0x9085,
+	0x0001, 0x080c, 0x73ec, 0x080c, 0x72d7, 0x080c, 0x0dd5, 0x2061,
+	0x1800, 0x6030, 0xc09d, 0x6032, 0x080c, 0x5ee2, 0x00ce, 0x0005,
+	0x00c6, 0x2001, 0x1800, 0x2004, 0x908e, 0x0000, 0x0904, 0x3558,
+	0x7884, 0x9005, 0x0188, 0x7888, 0x2061, 0x199b, 0x2c0c, 0x2062,
+	0x080c, 0x2c22, 0x01a0, 0x080c, 0x2c2a, 0x0188, 0x080c, 0x2c32,
+	0x0170, 0x2162, 0x0804, 0x355b, 0x2061, 0x0100, 0x6038, 0x9086,
+	0x0007, 0x1118, 0x2009, 0x0001, 0x0010, 0x2009, 0x0000, 0x7884,
+	0x9086, 0x0002, 0x1548, 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a,
+	0x0026, 0x2011, 0x0003, 0x080c, 0xa654, 0x2011, 0x0002, 0x080c,
+	0xa65e, 0x002e, 0x080c, 0xa541, 0x0036, 0x901e, 0x080c, 0xa5b7,
+	0x003e, 0x60e3, 0x0000, 0x080c, 0xea0a, 0x080c, 0xea25, 0x9085,
+	0x0001, 0x080c, 0x73ec, 0x9006, 0x080c, 0x2cf1, 0x2001, 0x1800,
+	0x2003, 0x0004, 0x6027, 0x0008, 0x00ce, 0x0804, 0x3526, 0x81ff,
+	0x0120, 0x2009, 0x0001, 0x0804, 0x3558, 0x080c, 0x56ec, 0x0120,
+	0x2009, 0x0007, 0x0804, 0x3558, 0x7984, 0x7ea8, 0x96b4, 0x00ff,
+	0x080c, 0x6608, 0x1904, 0x355b, 0x9186, 0x007f, 0x0138, 0x080c,
+	0x697b, 0x0120, 0x2009, 0x0009, 0x0804, 0x3558, 0x080c, 0x4ab4,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x3558, 0xa867, 0x0000, 0xa868,
+	0xc0fd, 0xa86a, 0x080c, 0xcd30, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x3558, 0x7007, 0x0003, 0x701f, 0x561e, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x3558, 0xa8e0, 0xa866,
+	0xa834, 0x8007, 0x800c, 0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0xaf60, 0x0804, 0x4b00, 0xa898, 0x9086, 0x000d,
+	0x1904, 0x3558, 0x2021, 0x4005, 0x0126, 0x2091, 0x8000, 0x0e04,
+	0x5642, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118,
+	0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7883, 0x4005, 0xa998,
+	0x7986, 0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c, 0x4af0, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x7007,
+	0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x00c6, 0x2061, 0x19f9, 0x7984, 0x6152, 0x614e,
+	0x6057, 0x0000, 0x604b, 0x0009, 0x7898, 0x606a, 0x789c, 0x6066,
+	0x7888, 0x6062, 0x788c, 0x605e, 0x2001, 0x1a07, 0x2044, 0x2001,
+	0x1a0e, 0xa076, 0xa060, 0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002,
+	0xa06b, 0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e, 0x0804, 0x3526,
+	0x0126, 0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0128,
+	0x0006, 0x080c, 0xcb97, 0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180,
+	0x1000, 0x2004, 0x905d, 0x0160, 0x080c, 0x603d, 0x080c, 0xaddb,
+	0x0110, 0xb817, 0x0000, 0x9006, 0x00ce, 0x00be, 0x012e, 0x0005,
+	0x9085, 0x0001, 0x0cc8, 0x0126, 0x2091, 0x8000, 0x0156, 0x2010,
+	0x900e, 0x20a9, 0x0800, 0x0016, 0x9180, 0x1000, 0x2004, 0x9005,
+	0x0180, 0x9186, 0x007e, 0x0168, 0x9186, 0x007f, 0x0150, 0x9186,
+	0x0080, 0x0138, 0x9186, 0x00ff, 0x0120, 0x0026, 0x2200, 0x0801,
+	0x002e, 0x001e, 0x8108, 0x1f04, 0x56bb, 0x015e, 0x012e, 0x0005,
+	0x2001, 0x1848, 0x2004, 0x0005, 0x2001, 0x1867, 0x2004, 0x0005,
+	0x0006, 0x2001, 0x1810, 0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001,
+	0x180e, 0x2004, 0xd0b4, 0x0005, 0x2001, 0x1800, 0x2004, 0x9086,
+	0x0003, 0x0005, 0x0016, 0x00e6, 0x2071, 0x189e, 0x7108, 0x910d,
+	0x710a, 0x00ee, 0x001e, 0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04,
+	0x355b, 0x810c, 0x0016, 0x080c, 0x4ab4, 0x080c, 0x0f07, 0x2100,
+	0x2238, 0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e, 0x080c, 0x4afd,
+	0x701f, 0x5713, 0x0005, 0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8,
+	0x7aac, 0x79a4, 0x810c, 0x2061, 0x18b8, 0x2c44, 0xa770, 0xa074,
+	0x2071, 0x189e, 0x080c, 0x4b00, 0x701f, 0x5727, 0x0005, 0x2061,
+	0x18b8, 0x2c44, 0x0016, 0x0026, 0xa270, 0xa174, 0x080c, 0x0f0f,
+	0x002e, 0x001e, 0x080c, 0x0fbc, 0x9006, 0xa802, 0xa806, 0x0804,
+	0x3526, 0x0126, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, 0x2071,
+	0x1800, 0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, 0x58e2,
+	0x0068, 0xd08c, 0x0118, 0x080c, 0x57eb, 0x0040, 0xd094, 0x0118,
+	0x080c, 0x57bb, 0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x012e,
+	0x0005, 0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e,
+	0x0c68, 0x0006, 0x7098, 0x9005, 0x000e, 0x0120, 0x709b, 0x0000,
+	0x7093, 0x0000, 0x624c, 0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086,
+	0xf0f0, 0x0130, 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0490,
+	0x9294, 0xff00, 0x9296, 0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160,
+	0x6240, 0x9295, 0x0100, 0x6242, 0x9294, 0x0010, 0x0128, 0x2009,
+	0x00f7, 0x080c, 0x5f9f, 0x00f0, 0x6040, 0x9084, 0x0010, 0x9085,
+	0x0140, 0x6042, 0x6043, 0x0000, 0x7087, 0x0000, 0x70a3, 0x0001,
+	0x70c7, 0x0000, 0x70df, 0x0000, 0x2009, 0x1c80, 0x200b, 0x0000,
+	0x7097, 0x0000, 0x708b, 0x000f, 0x2009, 0x000f, 0x2011, 0x5e85,
+	0x080c, 0x8574, 0x0005, 0x2001, 0x1869, 0x2004, 0xd08c, 0x0110,
+	0x705f, 0xffff, 0x7088, 0x9005, 0x1528, 0x2011, 0x5e85, 0x080c,
+	0x84dc, 0x6040, 0x9094, 0x0010, 0x9285, 0x0020, 0x6042, 0x20a9,
+	0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04, 0x57d1, 0x6242, 0x709b,
+	0x0000, 0x6040, 0x9094, 0x0010, 0x9285, 0x0080, 0x6042, 0x6242,
+	0x0048, 0x6242, 0x709b, 0x0000, 0x708f, 0x0000, 0x9006, 0x080c,
+	0x6028, 0x0000, 0x0005, 0x708c, 0x908a, 0x0003, 0x1a0c, 0x0dd5,
+	0x000b, 0x0005, 0x57f5, 0x5846, 0x58e1, 0x00f6, 0x0016, 0x6900,
+	0x918c, 0x0800, 0x708f, 0x0001, 0x2001, 0x015d, 0x2003, 0x0000,
+	0x6803, 0x00fc, 0x20a9, 0x0004, 0x6800, 0x9084, 0x00fc, 0x0120,
+	0x1f04, 0x5804, 0x080c, 0x0dd5, 0x68a0, 0x68a2, 0x689c, 0x689e,
+	0x6898, 0x689a, 0xa001, 0x918d, 0x1600, 0x6902, 0x001e, 0x6837,
+	0x0020, 0x080c, 0x6004, 0x2079, 0x1c00, 0x7833, 0x1101, 0x7837,
+	0x0000, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1,
+	0x1c0e, 0x20a9, 0x0004, 0x4003, 0x080c, 0xab2c, 0x20e1, 0x0001,
 	0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014,
-	0x4003, 0x60c3, 0x000c, 0x2011, 0x19f1, 0x2013, 0x0000, 0x7093,
-	0x0000, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0xa26a, 0x08d8,
-	0x0005, 0x7098, 0x908a, 0x001d, 0x1a0c, 0x0dd5, 0x000b, 0x0005,
-	0x590a, 0x591d, 0x5946, 0x5966, 0x598c, 0x59bb, 0x59e1, 0x5a19,
-	0x5a3f, 0x5a6d, 0x5aa8, 0x5ae0, 0x5afe, 0x5b29, 0x5b4b, 0x5b66,
-	0x5b70, 0x5ba4, 0x5bca, 0x5bf9, 0x5c1f, 0x5c57, 0x5c9b, 0x5cd8,
-	0x5cf9, 0x5d52, 0x5d74, 0x5da2, 0x5da2, 0x00c6, 0x2061, 0x1800,
-	0x6003, 0x0007, 0x2061, 0x0100, 0x6004, 0x9084, 0xfff9, 0x6006,
-	0x00ce, 0x0005, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0,
-	0x2061, 0x0100, 0x6043, 0x0002, 0x709b, 0x0001, 0x2009, 0x07d0,
-	0x2011, 0x5e83, 0x080c, 0x858b, 0x0005, 0x00f6, 0x7090, 0x9086,
-	0x0014, 0x1510, 0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c, 0x5ff4,
-	0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834, 0x9005,
-	0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7,
-	0x0001, 0x2011, 0x5e83, 0x080c, 0x84f3, 0x709b, 0x0010, 0x080c,
-	0x5b70, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b,
-	0x0003, 0x6043, 0x0004, 0x2011, 0x5e83, 0x080c, 0x84f3, 0x080c,
-	0x5f78, 0x2079, 0x0240, 0x7833, 0x1102, 0x7837, 0x0000, 0x20a9,
-	0x0008, 0x9f88, 0x000e, 0x200b, 0x0000, 0x8108, 0x1f04, 0x595b,
-	0x60c3, 0x0014, 0x080c, 0x5ead, 0x00fe, 0x0005, 0x00f6, 0x7090,
-	0x9005, 0x0500, 0x2011, 0x5e83, 0x080c, 0x84f3, 0x9086, 0x0014,
-	0x11b8, 0x080c, 0x5ff4, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102,
-	0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4,
-	0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0004, 0x0029, 0x0010,
-	0x080c, 0x5fd0, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0005, 0x080c,
-	0x5f78, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c,
-	0x5ff4, 0x080c, 0x5fd7, 0x1170, 0x7084, 0x9005, 0x1158, 0x715c,
-	0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5e30, 0x0168,
-	0x080c, 0x5fad, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e,
-	0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c,
-	0x5ead, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011,
-	0x5e83, 0x080c, 0x84f3, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5ff4,
-	0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005,
-	0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7,
-	0x0001, 0x709b, 0x0006, 0x0029, 0x0010, 0x080c, 0x5fd0, 0x00fe,
-	0x0005, 0x00f6, 0x709b, 0x0007, 0x080c, 0x5f78, 0x2079, 0x0240,
-	0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x5ff4, 0x080c, 0x5fd7,
-	0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164, 0x9186, 0xffff, 0x0180,
-	0x9180, 0x3325, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008,
-	0x080c, 0x5e30, 0x0180, 0x080c, 0x4fe1, 0x0110, 0x080c, 0x28a7,
-	0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
-	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5ead, 0x00fe,
-	0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5e83, 0x080c,
-	0x84f3, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5ff4, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
-	0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b,
-	0x0008, 0x0029, 0x0010, 0x080c, 0x5fd0, 0x00fe, 0x0005, 0x00f6,
-	0x709b, 0x0009, 0x080c, 0x5f78, 0x2079, 0x0240, 0x7833, 0x1105,
-	0x7837, 0x0100, 0x080c, 0x5fd7, 0x1150, 0x7084, 0x9005, 0x1138,
-	0x080c, 0x5da3, 0x1188, 0x9085, 0x0001, 0x080c, 0x28a7, 0x20a9,
-	0x0008, 0x080c, 0x5ff4, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
-	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5ead,
-	0x0010, 0x080c, 0x58fd, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005,
-	0x05a8, 0x2011, 0x5e83, 0x080c, 0x84f3, 0x9086, 0x0014, 0x1560,
-	0x080c, 0x5ff4, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1520,
-	0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1160, 0x7a38,
-	0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b,
-	0x000a, 0x00b1, 0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc, 0x0128,
-	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x7097, 0x0000, 0x709b,
-	0x000e, 0x080c, 0x5b4b, 0x0010, 0x080c, 0x5fd0, 0x00fe, 0x0005,
-	0x00f6, 0x709b, 0x000b, 0x2011, 0x1c0e, 0x20e9, 0x0001, 0x22a0,
-	0x20a9, 0x0040, 0x2019, 0xffff, 0x4304, 0x080c, 0x5f78, 0x2079,
-	0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5fd7, 0x0118,
-	0x2013, 0x0000, 0x0020, 0x7060, 0x9085, 0x0100, 0x2012, 0x20a9,
-	0x0040, 0x2009, 0x024e, 0x2011, 0x1c0e, 0x220e, 0x8210, 0x8108,
-	0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240,
-	0x1f04, 0x5acd, 0x60c3, 0x0084, 0x080c, 0x5ead, 0x00fe, 0x0005,
-	0x00f6, 0x7090, 0x9005, 0x01c0, 0x2011, 0x5e83, 0x080c, 0x84f3,
-	0x9086, 0x0084, 0x1178, 0x080c, 0x5ff4, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1106, 0x1138, 0x7834, 0x9005, 0x1120, 0x709b, 0x000c,
-	0x0029, 0x0010, 0x080c, 0x5fd0, 0x00fe, 0x0005, 0x00f6, 0x709b,
-	0x000d, 0x080c, 0x5f78, 0x2079, 0x0240, 0x7833, 0x1107, 0x7837,
-	0x0000, 0x080c, 0x5ff4, 0x20a9, 0x0040, 0x2011, 0x026e, 0x2009,
-	0x024e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810,
-	0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011,
-	0x0260, 0x1f04, 0x5b11, 0x60c3, 0x0084, 0x080c, 0x5ead, 0x00fe,
-	0x0005, 0x00f6, 0x7090, 0x9005, 0x01e0, 0x2011, 0x5e83, 0x080c,
-	0x84f3, 0x9086, 0x0084, 0x1198, 0x080c, 0x5ff4, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7097,
-	0x0001, 0x080c, 0x5f4a, 0x709b, 0x000e, 0x0029, 0x0010, 0x080c,
-	0x5fd0, 0x00fe, 0x0005, 0x918d, 0x0001, 0x080c, 0x601f, 0x709b,
-	0x000f, 0x7093, 0x0000, 0x2061, 0x0140, 0x605b, 0xbc85, 0x605f,
-	0xb5b5, 0x2061, 0x0100, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009,
-	0x07d0, 0x2011, 0x5e83, 0x080c, 0x84e7, 0x0005, 0x7090, 0x9005,
-	0x0130, 0x2011, 0x5e83, 0x080c, 0x84f3, 0x709b, 0x0000, 0x0005,
-	0x709b, 0x0011, 0x080c, 0xab21, 0x080c, 0x5ff4, 0x20e1, 0x0000,
-	0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x7490, 0x9480,
-	0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x4003,
-	0x080c, 0x5fd7, 0x11a0, 0x717c, 0x81ff, 0x0188, 0x900e, 0x7080,
-	0x9084, 0x00ff, 0x0160, 0x080c, 0x283e, 0x9186, 0x007e, 0x0138,
-	0x9186, 0x0080, 0x0120, 0x2011, 0x0008, 0x080c, 0x5e30, 0x60c3,
-	0x0014, 0x080c, 0x5ead, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
-	0x2011, 0x5e83, 0x080c, 0x84f3, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x5ff4, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834,
+	0x4003, 0x60c3, 0x000c, 0x600f, 0x0000, 0x080c, 0x5eb6, 0x00fe,
+	0x9006, 0x7092, 0x6043, 0x0008, 0x6042, 0x0005, 0x00f6, 0x7090,
+	0x7093, 0x0000, 0x9025, 0x0904, 0x58be, 0x6020, 0xd0b4, 0x1904,
+	0x58bc, 0x71a0, 0x81ff, 0x0904, 0x58aa, 0x9486, 0x000c, 0x1904,
+	0x58b7, 0x9480, 0x0018, 0x8004, 0x20a8, 0x080c, 0x5ffd, 0x2011,
+	0x0260, 0x2019, 0x1c00, 0x220c, 0x2304, 0x9106, 0x11e8, 0x8210,
+	0x8318, 0x1f04, 0x5863, 0x6043, 0x0004, 0x2061, 0x0140, 0x605b,
+	0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0006, 0x708f,
+	0x0002, 0x709b, 0x0002, 0x2009, 0x07d0, 0x2011, 0x5e8c, 0x080c,
+	0x8574, 0x080c, 0x6004, 0x04c0, 0x080c, 0x5ffd, 0x2079, 0x0260,
+	0x7930, 0x918e, 0x1101, 0x1558, 0x7834, 0x9005, 0x1540, 0x7900,
+	0x918c, 0x00ff, 0x1118, 0x7804, 0x9005, 0x0190, 0x080c, 0x5ffd,
+	0x2011, 0x026e, 0x2019, 0x1805, 0x20a9, 0x0004, 0x220c, 0x2304,
+	0x9102, 0x0230, 0x11a0, 0x8210, 0x8318, 0x1f04, 0x589e, 0x0078,
+	0x70a3, 0x0000, 0x080c, 0x5ffd, 0x20e1, 0x0000, 0x2099, 0x0260,
+	0x20e9, 0x0001, 0x20a1, 0x1c00, 0x20a9, 0x0014, 0x4003, 0x6043,
+	0x0008, 0x6043, 0x0000, 0x0010, 0x00fe, 0x0005, 0x6040, 0x9085,
+	0x0100, 0x6042, 0x6020, 0xd0b4, 0x1db8, 0x080c, 0xab2c, 0x20e1,
+	0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
+	0x0014, 0x4003, 0x60c3, 0x000c, 0x2011, 0x19f0, 0x2013, 0x0000,
+	0x7093, 0x0000, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0xa26b,
+	0x08d8, 0x0005, 0x7098, 0x908a, 0x001d, 0x1a0c, 0x0dd5, 0x000b,
+	0x0005, 0x5913, 0x5926, 0x594f, 0x596f, 0x5995, 0x59c4, 0x59ea,
+	0x5a22, 0x5a48, 0x5a76, 0x5ab1, 0x5ae9, 0x5b07, 0x5b32, 0x5b54,
+	0x5b6f, 0x5b79, 0x5bad, 0x5bd3, 0x5c02, 0x5c28, 0x5c60, 0x5ca4,
+	0x5ce1, 0x5d02, 0x5d5b, 0x5d7d, 0x5dab, 0x5dab, 0x00c6, 0x2061,
+	0x1800, 0x6003, 0x0007, 0x2061, 0x0100, 0x6004, 0x9084, 0xfff9,
+	0x6006, 0x00ce, 0x0005, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f,
+	0xf0f0, 0x2061, 0x0100, 0x6043, 0x0002, 0x709b, 0x0001, 0x2009,
+	0x07d0, 0x2011, 0x5e8c, 0x080c, 0x8574, 0x0005, 0x00f6, 0x7090,
+	0x9086, 0x0014, 0x1510, 0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c,
+	0x5ffd, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834,
+	0x9005, 0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110,
+	0x70c7, 0x0001, 0x2011, 0x5e8c, 0x080c, 0x84dc, 0x709b, 0x0010,
+	0x080c, 0x5b79, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6,
+	0x709b, 0x0003, 0x6043, 0x0004, 0x2011, 0x5e8c, 0x080c, 0x84dc,
+	0x080c, 0x5f81, 0x2079, 0x0240, 0x7833, 0x1102, 0x7837, 0x0000,
+	0x20a9, 0x0008, 0x9f88, 0x000e, 0x200b, 0x0000, 0x8108, 0x1f04,
+	0x5964, 0x60c3, 0x0014, 0x080c, 0x5eb6, 0x00fe, 0x0005, 0x00f6,
+	0x7090, 0x9005, 0x0500, 0x2011, 0x5e8c, 0x080c, 0x84dc, 0x9086,
+	0x0014, 0x11b8, 0x080c, 0x5ffd, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x1102, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
+	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0004, 0x0029,
+	0x0010, 0x080c, 0x5fd9, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0005,
+	0x080c, 0x5f81, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000,
+	0x080c, 0x5ffd, 0x080c, 0x5fe0, 0x1170, 0x7084, 0x9005, 0x1158,
+	0x715c, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5e39,
+	0x0168, 0x080c, 0x5fb6, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
+	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
+	0x080c, 0x5eb6, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
+	0x2011, 0x5e8c, 0x080c, 0x84dc, 0x9086, 0x0014, 0x11b8, 0x080c,
+	0x5ffd, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834,
 	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110,
-	0x70c7, 0x0001, 0x709b, 0x0012, 0x0029, 0x0010, 0x7093, 0x0000,
-	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0013, 0x080c, 0x5f86, 0x2079,
-	0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5ff4, 0x080c,
-	0x5fd7, 0x1170, 0x7084, 0x9005, 0x1158, 0x715c, 0x9186, 0xffff,
-	0x0138, 0x2011, 0x0008, 0x080c, 0x5e30, 0x0168, 0x080c, 0x5fad,
-	0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
-	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5ead, 0x00fe,
-	0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5e83, 0x080c,
-	0x84f3, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5ff4, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
-	0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b,
-	0x0014, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6,
-	0x709b, 0x0015, 0x080c, 0x5f86, 0x2079, 0x0240, 0x7833, 0x1104,
-	0x7837, 0x0000, 0x080c, 0x5ff4, 0x080c, 0x5fd7, 0x11b8, 0x7084,
-	0x9005, 0x11a0, 0x7164, 0x9186, 0xffff, 0x0180, 0x9180, 0x3325,
-	0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5e30,
-	0x0180, 0x080c, 0x4fe1, 0x0110, 0x080c, 0x28a7, 0x20a9, 0x0008,
-	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
-	0x4003, 0x60c3, 0x0014, 0x080c, 0x5ead, 0x00fe, 0x0005, 0x00f6,
-	0x7090, 0x9005, 0x05f0, 0x2011, 0x5e83, 0x080c, 0x84f3, 0x9086,
-	0x0014, 0x15a8, 0x080c, 0x5ff4, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1105, 0x1568, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e,
-	0x1168, 0x9085, 0x0001, 0x080c, 0x601f, 0x7a38, 0xd2fc, 0x0128,
-	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x0080, 0x9005, 0x11b8,
+	0x70c7, 0x0001, 0x709b, 0x0006, 0x0029, 0x0010, 0x080c, 0x5fd9,
+	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0007, 0x080c, 0x5f81, 0x2079,
+	0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x5ffd, 0x080c,
+	0x5fe0, 0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164, 0x9186, 0xffff,
+	0x0180, 0x9180, 0x3327, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011,
+	0x0008, 0x080c, 0x5e39, 0x0180, 0x080c, 0x4fea, 0x0110, 0x080c,
+	0x28a9, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb6,
+	0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5e8c,
+	0x080c, 0x84dc, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5ffd, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160,
+	0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001,
+	0x709b, 0x0008, 0x0029, 0x0010, 0x080c, 0x5fd9, 0x00fe, 0x0005,
+	0x00f6, 0x709b, 0x0009, 0x080c, 0x5f81, 0x2079, 0x0240, 0x7833,
+	0x1105, 0x7837, 0x0100, 0x080c, 0x5fe0, 0x1150, 0x7084, 0x9005,
+	0x1138, 0x080c, 0x5dac, 0x1188, 0x9085, 0x0001, 0x080c, 0x28a9,
+	0x20a9, 0x0008, 0x080c, 0x5ffd, 0x20e1, 0x0000, 0x2099, 0x026e,
+	0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c,
+	0x5eb6, 0x0010, 0x080c, 0x5906, 0x00fe, 0x0005, 0x00f6, 0x7090,
+	0x9005, 0x05a8, 0x2011, 0x5e8c, 0x080c, 0x84dc, 0x9086, 0x0014,
+	0x1560, 0x080c, 0x5ffd, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105,
+	0x1520, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1160,
 	0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001,
-	0x9085, 0x0001, 0x080c, 0x601f, 0x7097, 0x0000, 0x7a38, 0xd2f4,
-	0x0110, 0x70df, 0x0008, 0x709b, 0x0016, 0x0029, 0x0010, 0x7093,
-	0x0000, 0x00fe, 0x0005, 0x080c, 0xab21, 0x080c, 0x5ff4, 0x20e1,
-	0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
-	0x000e, 0x4003, 0x2011, 0x026d, 0x2204, 0x9084, 0x0100, 0x2011,
-	0x024d, 0x2012, 0x2011, 0x026e, 0x709b, 0x0017, 0x080c, 0x5fd7,
-	0x1150, 0x7084, 0x9005, 0x1138, 0x080c, 0x5da3, 0x1188, 0x9085,
-	0x0001, 0x080c, 0x28a7, 0x20a9, 0x0008, 0x080c, 0x5ff4, 0x20e1,
-	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003,
-	0x60c3, 0x0014, 0x080c, 0x5ead, 0x0010, 0x080c, 0x58fd, 0x0005,
-	0x00f6, 0x7090, 0x9005, 0x01d8, 0x2011, 0x5e83, 0x080c, 0x84f3,
-	0x9086, 0x0084, 0x1190, 0x080c, 0x5ff4, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1106, 0x1150, 0x7834, 0x9005, 0x1138, 0x9006, 0x080c,
-	0x601f, 0x709b, 0x0018, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe,
-	0x0005, 0x00f6, 0x709b, 0x0019, 0x080c, 0x5f86, 0x2079, 0x0240,
-	0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5ff4, 0x2009, 0x026e,
-	0x2039, 0x1c0e, 0x20a9, 0x0040, 0x213e, 0x8738, 0x8108, 0x9186,
-	0x0280, 0x1128, 0x6814, 0x8000, 0x6816, 0x2009, 0x0260, 0x1f04,
-	0x5d0c, 0x2039, 0x1c0e, 0x080c, 0x5fd7, 0x11e8, 0x2728, 0x2514,
-	0x8207, 0x9084, 0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff, 0x8007,
-	0x9205, 0x202a, 0x7060, 0x2310, 0x8214, 0x92a0, 0x1c0e, 0x2414,
-	0x938c, 0x0001, 0x0118, 0x9294, 0xff00, 0x0018, 0x9294, 0x00ff,
-	0x8007, 0x9215, 0x2222, 0x20a9, 0x0040, 0x2009, 0x024e, 0x270e,
-	0x8738, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812,
-	0x2009, 0x0240, 0x1f04, 0x5d3f, 0x60c3, 0x0084, 0x080c, 0x5ead,
-	0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01e0, 0x2011, 0x5e83,
-	0x080c, 0x84f3, 0x9086, 0x0084, 0x1198, 0x080c, 0x5ff4, 0x2079,
+	0x709b, 0x000a, 0x00b1, 0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc,
+	0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x7097, 0x0000,
+	0x709b, 0x000e, 0x080c, 0x5b54, 0x0010, 0x080c, 0x5fd9, 0x00fe,
+	0x0005, 0x00f6, 0x709b, 0x000b, 0x2011, 0x1c0e, 0x20e9, 0x0001,
+	0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, 0x4304, 0x080c, 0x5f81,
+	0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5fe0,
+	0x0118, 0x2013, 0x0000, 0x0020, 0x7060, 0x9085, 0x0100, 0x2012,
+	0x20a9, 0x0040, 0x2009, 0x024e, 0x2011, 0x1c0e, 0x220e, 0x8210,
+	0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009,
+	0x0240, 0x1f04, 0x5ad6, 0x60c3, 0x0084, 0x080c, 0x5eb6, 0x00fe,
+	0x0005, 0x00f6, 0x7090, 0x9005, 0x01c0, 0x2011, 0x5e8c, 0x080c,
+	0x84dc, 0x9086, 0x0084, 0x1178, 0x080c, 0x5ffd, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1106, 0x1138, 0x7834, 0x9005, 0x1120, 0x709b,
+	0x000c, 0x0029, 0x0010, 0x080c, 0x5fd9, 0x00fe, 0x0005, 0x00f6,
+	0x709b, 0x000d, 0x080c, 0x5f81, 0x2079, 0x0240, 0x7833, 0x1107,
+	0x7837, 0x0000, 0x080c, 0x5ffd, 0x20a9, 0x0040, 0x2011, 0x026e,
+	0x2009, 0x024e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150,
+	0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816,
+	0x2011, 0x0260, 0x1f04, 0x5b1a, 0x60c3, 0x0084, 0x080c, 0x5eb6,
+	0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01e0, 0x2011, 0x5e8c,
+	0x080c, 0x84dc, 0x9086, 0x0084, 0x1198, 0x080c, 0x5ffd, 0x2079,
 	0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140,
-	0x7097, 0x0001, 0x080c, 0x5f4a, 0x709b, 0x001a, 0x0029, 0x0010,
-	0x7093, 0x0000, 0x00fe, 0x0005, 0x9085, 0x0001, 0x080c, 0x601f,
-	0x709b, 0x001b, 0x080c, 0xab21, 0x080c, 0x5ff4, 0x2011, 0x0260,
-	0x2009, 0x0240, 0x7490, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084,
-	0x03f8, 0x8004, 0x20a8, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260,
-	0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000,
-	0x6816, 0x2011, 0x0260, 0x1f04, 0x5d8b, 0x60c3, 0x0084, 0x080c,
-	0x5ead, 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0x1848, 0x252c,
-	0x20a9, 0x0008, 0x2041, 0x1c0e, 0x20e9, 0x0001, 0x28a0, 0x080c,
-	0x5ff4, 0x20e1, 0x0000, 0x2099, 0x026e, 0x4003, 0x20a9, 0x0008,
-	0x2011, 0x0007, 0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200, 0x200c,
-	0x91a6, 0xffff, 0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008, 0x8211,
-	0x1f04, 0x5dbd, 0x0804, 0x5e2c, 0x82ff, 0x1160, 0xd5d4, 0x0120,
-	0x91a6, 0x3fff, 0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904, 0x5e2c,
-	0x918d, 0xc000, 0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4, 0x0110,
-	0x2019, 0x0010, 0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008, 0x8424,
-	0x1240, 0xd5d4, 0x0110, 0x8319, 0x0008, 0x8318, 0x1f04, 0x5de3,
-	0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426, 0x8425, 0x1f04, 0x5df5,
-	0x2328, 0x8529, 0x92be, 0x0007, 0x0158, 0x0006, 0x2039, 0x0007,
-	0x2200, 0x973a, 0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04, 0x5e04,
-	0x755e, 0x95c8, 0x3325, 0x292d, 0x95ac, 0x00ff, 0x7582, 0x6532,
-	0x6536, 0x0016, 0x2508, 0x080c, 0x2887, 0x001e, 0x60e7, 0x0000,
-	0x65ea, 0x2018, 0x2304, 0x9405, 0x201a, 0x7087, 0x0001, 0x20e9,
-	0x0000, 0x20a1, 0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9, 0x0008,
-	0x4003, 0x9085, 0x0001, 0x0008, 0x9006, 0x009e, 0x008e, 0x0005,
-	0x0156, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1, 0x0000,
-	0x2099, 0x026e, 0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0, 0x4003,
-	0x014e, 0x013e, 0x01de, 0x01ce, 0x015e, 0x2118, 0x9026, 0x2001,
-	0x0007, 0x939a, 0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0, 0x2118,
-	0x84ff, 0x0120, 0x939a, 0x0010, 0x8421, 0x1de0, 0x2021, 0x0001,
-	0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8, 0x9238, 0x2029, 0x026e,
-	0x9528, 0x2504, 0x942c, 0x11b8, 0x9405, 0x203a, 0x715e, 0x91a0,
-	0x3325, 0x242d, 0x95ac, 0x00ff, 0x7582, 0x6532, 0x6536, 0x0016,
-	0x2508, 0x080c, 0x2887, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x7087,
-	0x0001, 0x9084, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1800, 0x708b,
-	0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, 0x2071,
-	0x0140, 0x080c, 0x5f39, 0x080c, 0xa273, 0x7004, 0x9084, 0x4000,
-	0x0110, 0x080c, 0x2cff, 0x0126, 0x2091, 0x8000, 0x2071, 0x1826,
-	0x2073, 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7, 0x080c,
-	0x5f96, 0x001e, 0x9094, 0x0010, 0x9285, 0x0080, 0x7842, 0x7a42,
-	0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x2ba5, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012,
-	0x2011, 0x19f1, 0x2013, 0x0000, 0x7093, 0x0000, 0x012e, 0x60a3,
-	0x0056, 0x60a7, 0x9575, 0x080c, 0xa26a, 0x6144, 0xd184, 0x0120,
-	0x7198, 0x918d, 0x2000, 0x0018, 0x718c, 0x918d, 0x1000, 0x2011,
-	0x1999, 0x2112, 0x2009, 0x07d0, 0x2011, 0x5e83, 0x080c, 0x858b,
-	0x0005, 0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xadd2, 0x2009, 0x00f7, 0x080c, 0x5f96, 0x2061, 0x19fa, 0x900e,
-	0x611a, 0x611e, 0x6172, 0x6176, 0x2061, 0x1800, 0x6003, 0x0001,
-	0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1999,
-	0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5f05, 0x080c, 0x84e7,
-	0x012e, 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x0471, 0x2071, 0x0100, 0x080c, 0xa273, 0x2071,
-	0x0140, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2cff, 0x080c,
-	0x73c4, 0x0188, 0x080c, 0x73df, 0x1170, 0x080c, 0x76ae, 0x0016,
-	0x080c, 0x2956, 0x2001, 0x196d, 0x2102, 0x001e, 0x080c, 0x76a9,
-	0x080c, 0x72ee, 0x0050, 0x2009, 0x0001, 0x080c, 0x2c3e, 0x2001,
-	0x0001, 0x080c, 0x27ea, 0x080c, 0x5ed9, 0x012e, 0x000e, 0x00ee,
-	0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158, 0x0026, 0x0036,
-	0x2011, 0x8017, 0x2001, 0x1999, 0x201c, 0x080c, 0x4b04, 0x003e,
-	0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001, 0x20a1, 0x1c80,
-	0x080c, 0x5ff4, 0x20e9, 0x0000, 0x2099, 0x026e, 0x0099, 0x20a9,
-	0x0020, 0x080c, 0x5fee, 0x2099, 0x0260, 0x20a1, 0x1c92, 0x0051,
-	0x20a9, 0x000e, 0x080c, 0x5ff1, 0x2099, 0x0260, 0x20a1, 0x1cb2,
-	0x0009, 0x0005, 0x0016, 0x0026, 0x3410, 0x3308, 0x2104, 0x8007,
-	0x2012, 0x8108, 0x8210, 0x1f04, 0x5f6e, 0x002e, 0x001e, 0x0005,
-	0x080c, 0xab21, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000,
-	0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x080c, 0xab21,
-	0x080c, 0x5ff4, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000,
-	0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x00c6, 0x0006,
-	0x2061, 0x0100, 0x810f, 0x2001, 0x1834, 0x2004, 0x9005, 0x1138,
-	0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x9105, 0x0010, 0x9185,
-	0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016, 0x0046, 0x080c,
-	0x696e, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xe5ae,
-	0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x900e,
-	0x080c, 0x318a, 0x080c, 0xd230, 0x0140, 0x0036, 0x2019, 0xffff,
-	0x2021, 0x0007, 0x080c, 0x4cbb, 0x003e, 0x004e, 0x001e, 0x0005,
-	0x080c, 0x5ed9, 0x709b, 0x0000, 0x7093, 0x0000, 0x0005, 0x0006,
-	0x2001, 0x180c, 0x2004, 0xd09c, 0x0100, 0x000e, 0x0005, 0x0006,
-	0x0016, 0x0126, 0x2091, 0x8000, 0x2001, 0x0101, 0x200c, 0x918d,
-	0x0006, 0x2102, 0x012e, 0x001e, 0x000e, 0x0005, 0x2009, 0x0001,
-	0x0020, 0x2009, 0x0002, 0x0008, 0x900e, 0x6814, 0x9084, 0xffc0,
-	0x910d, 0x6916, 0x0005, 0x00f6, 0x0156, 0x0146, 0x01d6, 0x9006,
-	0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1, 0x1c00, 0x4004, 0x2079,
-	0x1c00, 0x7803, 0x2200, 0x7807, 0x00ef, 0x780f, 0x00ef, 0x7813,
-	0x0138, 0x7823, 0xffff, 0x7827, 0xffff, 0x01de, 0x014e, 0x015e,
-	0x00fe, 0x0005, 0x2001, 0x1800, 0x2003, 0x0001, 0x0005, 0x2001,
-	0x19a6, 0x0118, 0x2003, 0x0001, 0x0010, 0x2003, 0x0000, 0x0005,
-	0x0156, 0x20a9, 0x0800, 0x2009, 0x1000, 0x9006, 0x200a, 0x8108,
-	0x1f04, 0x602e, 0x015e, 0x0005, 0x00d6, 0x0036, 0x0156, 0x0136,
-	0x0146, 0x2069, 0x1847, 0x9006, 0xb802, 0xb8ce, 0xb807, 0x0707,
-	0xb80a, 0xb80e, 0xb812, 0x9198, 0x3325, 0x231d, 0x939c, 0x00ff,
-	0xbb16, 0x0016, 0x0026, 0xb8c2, 0x080c, 0xadcb, 0x1120, 0x9192,
-	0x007e, 0x1208, 0xbbc2, 0x20a9, 0x0004, 0xb8c4, 0x20e8, 0xb9c8,
-	0x9198, 0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9, 0x0004, 0x9198,
-	0x000a, 0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e, 0xb842, 0xb84e,
-	0xb852, 0xb856, 0xb85a, 0xb85e, 0xb862, 0xb866, 0xb86a, 0xb86f,
-	0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893, 0x0008,
-	0xb896, 0xb89a, 0xb89e, 0xb8be, 0xb9a2, 0x0096, 0xb8a4, 0x904d,
-	0x0110, 0x080c, 0x1031, 0xb8a7, 0x0000, 0x009e, 0x9006, 0xb84a,
-	0x6810, 0xb83a, 0x680c, 0xb846, 0xb8bb, 0x0520, 0xb8ac, 0x9005,
-	0x0198, 0x00c6, 0x2060, 0x9c82, 0x1cd0, 0x0a0c, 0x0dd5, 0x2001,
-	0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0dd5, 0x080c, 0x8981, 0x00ce,
-	0x090c, 0x8d25, 0xb8af, 0x0000, 0x6814, 0x9084, 0x00ff, 0xb842,
-	0x014e, 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, 0x2091,
-	0x8000, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04,
-	0x611c, 0x9182, 0x0800, 0x1a04, 0x6120, 0x2001, 0x180c, 0x2004,
-	0x9084, 0x0003, 0x1904, 0x6126, 0x9188, 0x1000, 0x2104, 0x905d,
-	0x0518, 0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1508, 0xb8a4,
-	0x900d, 0x1904, 0x6138, 0xb850, 0x900d, 0x1148, 0xa802, 0x2900,
-	0xb852, 0xb84e, 0x080c, 0x910d, 0x9006, 0x012e, 0x0005, 0x00a6,
-	0x2150, 0x2900, 0xb002, 0xa803, 0x0000, 0x00ae, 0xb852, 0x0c90,
-	0x2001, 0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e, 0x0498,
-	0x9082, 0x0006, 0x1290, 0x080c, 0xadcb, 0x1160, 0xb8a0, 0x9084,
-	0xff80, 0x1140, 0xb900, 0xd1fc, 0x0990, 0x2001, 0x0029, 0x2009,
-	0x1000, 0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c, 0x210c,
-	0xd18c, 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118, 0x2001,
-	0x0004, 0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118, 0x2009,
-	0x1000, 0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
-	0x2001, 0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001, 0x180c,
-	0x2004, 0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x905d, 0x09a8,
-	0x080c, 0x6972, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804, 0x60cf,
-	0x080c, 0x679b, 0x0904, 0x60e8, 0x0804, 0x60d3, 0x00b6, 0x00e6,
-	0x0126, 0x2091, 0x8000, 0xa874, 0x908e, 0x00ff, 0x1120, 0x2001,
-	0x196b, 0x205c, 0x0060, 0xa974, 0x9182, 0x0800, 0x1690, 0x9188,
-	0x1000, 0x2104, 0x905d, 0x01d0, 0x080c, 0x6912, 0x11d0, 0x080c,
-	0xae0b, 0x0570, 0x2b00, 0x6012, 0x2900, 0x6016, 0x6023, 0x0009,
-	0x600b, 0x0000, 0xa874, 0x908e, 0x00ff, 0x1110, 0x600b, 0x8000,
-	0x2009, 0x0043, 0x080c, 0xaedc, 0x9006, 0x00b0, 0x2001, 0x0028,
-	0x0090, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004,
-	0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029,
-	0x0010, 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005,
-	0x2001, 0x002c, 0x0cc0, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000,
-	0xa974, 0x9182, 0x0800, 0x1a04, 0x6206, 0x9188, 0x1000, 0x2104,
-	0x905d, 0x0904, 0x61de, 0xb8a0, 0x9086, 0x007f, 0x0178, 0x080c,
-	0x697a, 0x0160, 0xa994, 0x81ff, 0x0130, 0x908e, 0x0004, 0x0130,
-	0x908e, 0x0005, 0x0118, 0x080c, 0x6972, 0x1598, 0xa87c, 0xd0fc,
-	0x01e0, 0xa894, 0x9005, 0x01c8, 0x2060, 0x0026, 0x2010, 0x080c,
-	0xcb23, 0x002e, 0x1120, 0x2001, 0x0008, 0x0804, 0x6208, 0x6020,
-	0x9086, 0x000a, 0x0120, 0x2001, 0x0008, 0x0804, 0x6208, 0x601a,
-	0x6003, 0x0008, 0x2900, 0x6016, 0x0058, 0x080c, 0xae0b, 0x05e8,
-	0x2b00, 0x6012, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a,
-	0x2009, 0x0003, 0x080c, 0xaedc, 0x9006, 0x0458, 0x2001, 0x0028,
-	0x0438, 0x9082, 0x0006, 0x1290, 0x080c, 0xadcb, 0x1160, 0xb8a0,
-	0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001, 0x0029,
-	0x2009, 0x1000, 0x00a8, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c,
-	0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0050, 0xd184, 0x0118,
-	0x2001, 0x0004, 0x0028, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029,
-	0x9005, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0,
-	0x00f6, 0x00b6, 0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005, 0x1550,
-	0xa8dc, 0x9082, 0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518, 0xa8c4,
-	0x9082, 0x0101, 0x12f8, 0xa974, 0x2079, 0x1800, 0x9182, 0x0800,
-	0x12e8, 0x7830, 0x9084, 0x0003, 0x1130, 0xaa98, 0xab94, 0xa878,
-	0x9084, 0x0007, 0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001, 0x0004,
-	0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029,
-	0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0029,
-	0x900e, 0x9006, 0x0008, 0x9005, 0x012e, 0x00be, 0x00fe, 0x0005,
-	0x629d, 0x6258, 0x626f, 0x629d, 0x629d, 0x629d, 0x629d, 0x629d,
-	0x2100, 0x9082, 0x007e, 0x1278, 0x080c, 0x659e, 0x0148, 0x9046,
-	0xb810, 0x9306, 0x1904, 0x62a5, 0xb814, 0x9206, 0x15f0, 0x0028,
-	0xbb12, 0xba16, 0x0010, 0x080c, 0x49b7, 0x0150, 0x04b0, 0x080c,
-	0x65ff, 0x1598, 0xb810, 0x9306, 0x1580, 0xb814, 0x9206, 0x1568,
-	0x080c, 0xae0b, 0x0530, 0x2b00, 0x6012, 0x080c, 0xcfaa, 0x2900,
-	0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0xa878, 0x9086, 0x0001,
-	0x1170, 0x080c, 0x31bf, 0x9006, 0x080c, 0x653b, 0x2001, 0x0002,
-	0x080c, 0x654f, 0x2001, 0x0200, 0xb86e, 0xb893, 0x0002, 0x2009,
-	0x0003, 0x080c, 0xaedc, 0x9006, 0x0068, 0x2001, 0x0001, 0x900e,
-	0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0028, 0x900e,
-	0x9005, 0x0000, 0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6, 0x00f6,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0xa894, 0x90c6, 0x0015, 0x0904,
-	0x648c, 0x90c6, 0x0056, 0x0904, 0x6490, 0x90c6, 0x0066, 0x0904,
-	0x6494, 0x90c6, 0x0067, 0x0904, 0x6498, 0x90c6, 0x0068, 0x0904,
-	0x649c, 0x90c6, 0x0071, 0x0904, 0x64a0, 0x90c6, 0x0074, 0x0904,
-	0x64a4, 0x90c6, 0x007c, 0x0904, 0x64a8, 0x90c6, 0x007e, 0x0904,
-	0x64ac, 0x90c6, 0x0037, 0x0904, 0x64b0, 0x9016, 0x2079, 0x1800,
-	0xa974, 0x9186, 0x00ff, 0x0904, 0x6487, 0x9182, 0x0800, 0x1a04,
-	0x6487, 0x080c, 0x65ff, 0x1198, 0xb804, 0x9084, 0x00ff, 0x9082,
-	0x0006, 0x1268, 0xa894, 0x90c6, 0x006f, 0x0148, 0x080c, 0xadcb,
-	0x1904, 0x6470, 0xb8a0, 0x9084, 0xff80, 0x1904, 0x6470, 0xa894,
-	0x90c6, 0x006f, 0x0158, 0x90c6, 0x005e, 0x0904, 0x63d0, 0x90c6,
-	0x0064, 0x0904, 0x63f9, 0x2008, 0x0804, 0x6392, 0xa998, 0xa8b0,
-	0x2040, 0x080c, 0xadcb, 0x1120, 0x9182, 0x007f, 0x0a04, 0x6392,
-	0x9186, 0x00ff, 0x0904, 0x6392, 0x9182, 0x0800, 0x1a04, 0x6392,
-	0xaaa0, 0xab9c, 0x787c, 0x9306, 0x1188, 0x7880, 0x0096, 0x924e,
-	0x1128, 0x2208, 0x2310, 0x009e, 0x0804, 0x6392, 0x99cc, 0xff00,
-	0x009e, 0x1120, 0x2208, 0x2310, 0x0804, 0x6392, 0x080c, 0x49b7,
-	0x0904, 0x639c, 0x900e, 0x9016, 0x90c6, 0x4000, 0x15e0, 0x0006,
-	0x080c, 0x681f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0,
-	0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0f7c,
-	0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0035, 0x20a0,
-	0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f7c,
-	0xa8c4, 0xabc8, 0x9305, 0xabcc, 0x9305, 0xabd0, 0x9305, 0xabd4,
-	0x9305, 0xabd8, 0x9305, 0xabdc, 0x9305, 0xabe0, 0x9305, 0x9005,
-	0x0510, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x00a0,
-	0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070, 0x90c6, 0x4009,
-	0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001, 0x4005, 0x2009,
-	0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e, 0x2001,
-	0x0030, 0x900e, 0x0478, 0x000e, 0x080c, 0xae0b, 0x1130, 0x2001,
-	0x4005, 0x2009, 0x0003, 0x9016, 0x0c78, 0x2b00, 0x6012, 0x080c,
-	0xcfaa, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c, 0x0108,
-	0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x31bf, 0x012e,
-	0x9006, 0x080c, 0x653b, 0x2001, 0x0002, 0x080c, 0x654f, 0x2009,
-	0x0002, 0x080c, 0xaedc, 0xa8b0, 0xd094, 0x0118, 0xb8cc, 0xc08d,
-	0xb8ce, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be, 0x0005,
-	0x080c, 0x56e3, 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998, 0xaeb0,
-	0x080c, 0x65ff, 0x1904, 0x638d, 0x9186, 0x007f, 0x0130, 0x080c,
-	0x6972, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096, 0x080c, 0x0fff,
-	0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900, 0x009e, 0xa806,
-	0x080c, 0xcd1b, 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804,
-	0x6394, 0xa998, 0xaeb0, 0x080c, 0x65ff, 0x1904, 0x638d, 0x0096,
-	0x080c, 0x0fff, 0x1128, 0x009e, 0x2009, 0x0002, 0x0804, 0x644d,
-	0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b, 0xb8c4,
-	0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002,
-	0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xbbc8,
-	0x9398, 0x0006, 0x2398, 0x080c, 0x0f7c, 0x009e, 0xa87b, 0x0000,
-	0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168, 0x080c, 0x56cf,
-	0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c, 0x0118,
-	0xa89b, 0x000c, 0x00b0, 0x080c, 0x6972, 0x0118, 0xa89b, 0x0009,
-	0x0080, 0x080c, 0x56e3, 0x0118, 0xa89b, 0x0007, 0x0050, 0x080c,
-	0xccfe, 0x1904, 0x63c9, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804,
-	0x6394, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804, 0x8006, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009,
-	0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041,
-	0x1243, 0x080c, 0xb37a, 0x1904, 0x63c9, 0x2009, 0x0002, 0x08e8,
-	0x2001, 0x0028, 0x900e, 0x0804, 0x63ca, 0x2009, 0x180c, 0x210c,
-	0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001,
-	0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804, 0x63ca, 0x2001,
-	0x0029, 0x900e, 0x0804, 0x63ca, 0x080c, 0x3749, 0x0804, 0x63cb,
-	0x080c, 0x540c, 0x0804, 0x63cb, 0x080c, 0x4547, 0x0804, 0x63cb,
-	0x080c, 0x45c0, 0x0804, 0x63cb, 0x080c, 0x461c, 0x0804, 0x63cb,
-	0x080c, 0x4a7a, 0x0804, 0x63cb, 0x080c, 0x4d31, 0x0804, 0x63cb,
-	0x080c, 0x5077, 0x0804, 0x63cb, 0x080c, 0x5270, 0x0804, 0x63cb,
-	0x080c, 0x395f, 0x0804, 0x63cb, 0x00b6, 0xa974, 0xae78, 0x9684,
-	0x3fff, 0x9082, 0x4000, 0x1618, 0x9182, 0x0800, 0x1268, 0x9188,
-	0x1000, 0x2104, 0x905d, 0x0140, 0x080c, 0x6972, 0x1148, 0x00e9,
-	0x080c, 0x672a, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e, 0x0090,
-	0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d88, 0x2001, 0x0029,
-	0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001,
-	0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000,
-	0xb850, 0x900d, 0x0150, 0x2900, 0x0096, 0x2148, 0xa802, 0x009e,
-	0xa803, 0x0000, 0xb852, 0x012e, 0x0005, 0x2900, 0xb852, 0xb84e,
-	0xa803, 0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000, 0xb84c, 0x9005,
-	0x0170, 0x00e6, 0x2071, 0x19e7, 0x7004, 0x9086, 0x0002, 0x0168,
-	0x00ee, 0xb84c, 0xa802, 0x2900, 0xb84e, 0x012e, 0x0005, 0x2900,
-	0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x701c, 0x9b06, 0x1d80,
-	0xb84c, 0x00a6, 0x2050, 0xb000, 0xa802, 0x2900, 0xb002, 0x00ae,
-	0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0xb84c, 0x904d,
-	0x0130, 0xa800, 0x9005, 0x1108, 0xb852, 0xb84e, 0x9905, 0x012e,
-	0x0005, 0xb84c, 0x904d, 0x0130, 0xa800, 0x9005, 0x1108, 0xb852,
-	0xb84e, 0x9905, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026, 0x2091,
-	0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285, 0x0008,
-	0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6,
-	0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006,
-	0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c, 0x696e,
-	0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110, 0x2011,
-	0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006, 0x9086,
-	0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0dd5, 0x000e, 0x00ce,
-	0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000,
-	0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168, 0xb89c,
-	0xd0a4, 0x0150, 0x080c, 0x696a, 0x1138, 0x9284, 0x00ff, 0x9086,
-	0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff, 0x8007,
-	0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182, 0x0800,
-	0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190, 0x1000,
-	0x2204, 0x905d, 0x1188, 0x0096, 0x080c, 0x0fff, 0x2958, 0x009e,
-	0x0168, 0x2b00, 0x2012, 0xb85c, 0xb8ca, 0xb860, 0xb8c6, 0x9006,
-	0xb8a6, 0xb8ae, 0x080c, 0x6034, 0x9006, 0x0010, 0x9085, 0x0001,
-	0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091, 0x8000,
-	0x0026, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458, 0x00d6,
-	0x9190, 0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4,
-	0x904d, 0x0110, 0x080c, 0x1031, 0x00d6, 0x00c6, 0xb8bc, 0x2060,
-	0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c, 0xcb35,
-	0x0110, 0x080c, 0x0fb1, 0x080c, 0xae61, 0x00ce, 0x0c88, 0x00ce,
-	0x00de, 0x2b48, 0xb8c8, 0xb85e, 0xb8c4, 0xb862, 0x080c, 0x1041,
-	0x00de, 0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005, 0x0016,
-	0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188, 0x1000,
-	0x2104, 0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156,
-	0x0136, 0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802,
-	0x080c, 0x73bc, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c,
-	0xadcb, 0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061,
-	0x1982, 0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a, 0x7054,
-	0x600e, 0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110, 0x2001,
-	0x0001, 0x6886, 0x2069, 0x1800, 0x68b6, 0x7040, 0xb85e, 0x7048,
-	0xb862, 0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8c4,
-	0x20e8, 0xb8c8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003,
-	0x2099, 0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003,
-	0x2069, 0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e,
-	0x7048, 0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817, 0x0000,
-	0xb8a0, 0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211,
-	0x1218, 0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218, 0x2009,
-	0x0007, 0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0,
-	0x9182, 0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182, 0x0421,
-	0x1218, 0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218, 0x2009,
-	0x0003, 0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e, 0x015e,
-	0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034,
-	0xb896, 0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbcc, 0xc384,
-	0xba00, 0x2009, 0x1867, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110,
-	0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd,
-	0xd0cc, 0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02,
-	0xbbce, 0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x0126,
-	0x2091, 0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0,
-	0xaa04, 0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6,
-	0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0,
-	0x9080, 0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002,
-	0x9086, 0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0dd5, 0x3c00,
-	0x20e8, 0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de,
-	0x01ce, 0x014e, 0x013e, 0x0060, 0x080c, 0x0fff, 0x0170, 0x2900,
-	0xb8a6, 0xa803, 0x0000, 0x080c, 0x67bb, 0xa807, 0x0001, 0xae12,
-	0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126,
-	0x2091, 0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005,
-	0x1150, 0x080c, 0x67ca, 0x1158, 0xa804, 0x908a, 0x0002, 0x0218,
-	0x8001, 0xa806, 0x0020, 0x080c, 0x1031, 0xb8a7, 0x0000, 0x009e,
-	0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x910d, 0x012e,
-	0x0005, 0x901e, 0x0010, 0x2019, 0x0001, 0x900e, 0x0126, 0x2091,
-	0x8000, 0xb84c, 0x2048, 0xb800, 0xd0dc, 0x1170, 0x89ff, 0x0500,
-	0x83ff, 0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406,
-	0x1118, 0xa870, 0x9506, 0x0120, 0x2908, 0xa800, 0x2048, 0x0c70,
-	0x080c, 0xa692, 0xaa00, 0xb84c, 0x9906, 0x1110, 0xba4e, 0x0020,
-	0x00a6, 0x2150, 0xb202, 0x00ae, 0x82ff, 0x1110, 0xb952, 0x89ff,
-	0x012e, 0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005,
-	0x080c, 0x681f, 0x0128, 0x080c, 0xcbf2, 0x0010, 0x9085, 0x0001,
-	0x0005, 0x080c, 0x681f, 0x0128, 0x080c, 0xcb97, 0x0010, 0x9085,
-	0x0001, 0x0005, 0x080c, 0x681f, 0x0128, 0x080c, 0xcbef, 0x0010,
-	0x9085, 0x0001, 0x0005, 0x080c, 0x681f, 0x0128, 0x080c, 0xcbb6,
-	0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x681f, 0x0128, 0x080c,
-	0xcc33, 0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118,
-	0x9085, 0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8,
+	0x7097, 0x0001, 0x080c, 0x5f53, 0x709b, 0x000e, 0x0029, 0x0010,
+	0x080c, 0x5fd9, 0x00fe, 0x0005, 0x918d, 0x0001, 0x080c, 0x6028,
+	0x709b, 0x000f, 0x7093, 0x0000, 0x2061, 0x0140, 0x605b, 0xbc85,
+	0x605f, 0xb5b5, 0x2061, 0x0100, 0x6043, 0x0005, 0x6043, 0x0004,
+	0x2009, 0x07d0, 0x2011, 0x5e8c, 0x080c, 0x84d0, 0x0005, 0x7090,
+	0x9005, 0x0130, 0x2011, 0x5e8c, 0x080c, 0x84dc, 0x709b, 0x0000,
+	0x0005, 0x709b, 0x0011, 0x080c, 0xab2c, 0x080c, 0x5ffd, 0x20e1,
+	0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x7490,
+	0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8,
+	0x4003, 0x080c, 0x5fe0, 0x11a0, 0x717c, 0x81ff, 0x0188, 0x900e,
+	0x7080, 0x9084, 0x00ff, 0x0160, 0x080c, 0x2840, 0x9186, 0x007e,
+	0x0138, 0x9186, 0x0080, 0x0120, 0x2011, 0x0008, 0x080c, 0x5e39,
+	0x60c3, 0x0014, 0x080c, 0x5eb6, 0x0005, 0x00f6, 0x7090, 0x9005,
+	0x0500, 0x2011, 0x5e8c, 0x080c, 0x84dc, 0x9086, 0x0014, 0x11b8,
+	0x080c, 0x5ffd, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178,
+	0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
+	0x1110, 0x70c7, 0x0001, 0x709b, 0x0012, 0x0029, 0x0010, 0x7093,
+	0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0013, 0x080c, 0x5f8f,
+	0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5ffd,
+	0x080c, 0x5fe0, 0x1170, 0x7084, 0x9005, 0x1158, 0x715c, 0x9186,
+	0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5e39, 0x0168, 0x080c,
+	0x5fb6, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb6,
+	0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5e8c,
+	0x080c, 0x84dc, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5ffd, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160,
+	0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001,
+	0x709b, 0x0014, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005,
+	0x00f6, 0x709b, 0x0015, 0x080c, 0x5f8f, 0x2079, 0x0240, 0x7833,
+	0x1104, 0x7837, 0x0000, 0x080c, 0x5ffd, 0x080c, 0x5fe0, 0x11b8,
+	0x7084, 0x9005, 0x11a0, 0x7164, 0x9186, 0xffff, 0x0180, 0x9180,
+	0x3327, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c,
+	0x5e39, 0x0180, 0x080c, 0x4fea, 0x0110, 0x080c, 0x28a9, 0x20a9,
+	0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1,
+	0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb6, 0x00fe, 0x0005,
+	0x00f6, 0x7090, 0x9005, 0x05f0, 0x2011, 0x5e8c, 0x080c, 0x84dc,
+	0x9086, 0x0014, 0x15a8, 0x080c, 0x5ffd, 0x2079, 0x0260, 0x7a30,
+	0x9296, 0x1105, 0x1568, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100,
+	0x921e, 0x1168, 0x9085, 0x0001, 0x080c, 0x6028, 0x7a38, 0xd2fc,
+	0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x0080, 0x9005,
+	0x11b8, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7,
+	0x0001, 0x9085, 0x0001, 0x080c, 0x6028, 0x7097, 0x0000, 0x7a38,
+	0xd2f4, 0x0110, 0x70df, 0x0008, 0x709b, 0x0016, 0x0029, 0x0010,
+	0x7093, 0x0000, 0x00fe, 0x0005, 0x080c, 0xab2c, 0x080c, 0x5ffd,
+	0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240,
+	0x20a9, 0x000e, 0x4003, 0x2011, 0x026d, 0x2204, 0x9084, 0x0100,
+	0x2011, 0x024d, 0x2012, 0x2011, 0x026e, 0x709b, 0x0017, 0x080c,
+	0x5fe0, 0x1150, 0x7084, 0x9005, 0x1138, 0x080c, 0x5dac, 0x1188,
+	0x9085, 0x0001, 0x080c, 0x28a9, 0x20a9, 0x0008, 0x080c, 0x5ffd,
+	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
+	0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb6, 0x0010, 0x080c, 0x5906,
+	0x0005, 0x00f6, 0x7090, 0x9005, 0x01d8, 0x2011, 0x5e8c, 0x080c,
+	0x84dc, 0x9086, 0x0084, 0x1190, 0x080c, 0x5ffd, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1106, 0x1150, 0x7834, 0x9005, 0x1138, 0x9006,
+	0x080c, 0x6028, 0x709b, 0x0018, 0x0029, 0x0010, 0x7093, 0x0000,
+	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0019, 0x080c, 0x5f8f, 0x2079,
+	0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5ffd, 0x2009,
+	0x026e, 0x2039, 0x1c0e, 0x20a9, 0x0040, 0x213e, 0x8738, 0x8108,
+	0x9186, 0x0280, 0x1128, 0x6814, 0x8000, 0x6816, 0x2009, 0x0260,
+	0x1f04, 0x5d15, 0x2039, 0x1c0e, 0x080c, 0x5fe0, 0x11e8, 0x2728,
+	0x2514, 0x8207, 0x9084, 0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff,
+	0x8007, 0x9205, 0x202a, 0x7060, 0x2310, 0x8214, 0x92a0, 0x1c0e,
+	0x2414, 0x938c, 0x0001, 0x0118, 0x9294, 0xff00, 0x0018, 0x9294,
+	0x00ff, 0x8007, 0x9215, 0x2222, 0x20a9, 0x0040, 0x2009, 0x024e,
+	0x270e, 0x8738, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000,
+	0x6812, 0x2009, 0x0240, 0x1f04, 0x5d48, 0x60c3, 0x0084, 0x080c,
+	0x5eb6, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01e0, 0x2011,
+	0x5e8c, 0x080c, 0x84dc, 0x9086, 0x0084, 0x1198, 0x080c, 0x5ffd,
+	0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005,
+	0x1140, 0x7097, 0x0001, 0x080c, 0x5f53, 0x709b, 0x001a, 0x0029,
+	0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x9085, 0x0001, 0x080c,
+	0x6028, 0x709b, 0x001b, 0x080c, 0xab2c, 0x080c, 0x5ffd, 0x2011,
+	0x0260, 0x2009, 0x0240, 0x7490, 0x9480, 0x0018, 0x9080, 0x0007,
+	0x9084, 0x03f8, 0x8004, 0x20a8, 0x220e, 0x8210, 0x8108, 0x9186,
+	0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814,
+	0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5d94, 0x60c3, 0x0084,
+	0x080c, 0x5eb6, 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0x1848,
+	0x252c, 0x20a9, 0x0008, 0x2041, 0x1c0e, 0x20e9, 0x0001, 0x28a0,
+	0x080c, 0x5ffd, 0x20e1, 0x0000, 0x2099, 0x026e, 0x4003, 0x20a9,
+	0x0008, 0x2011, 0x0007, 0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200,
+	0x200c, 0x91a6, 0xffff, 0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008,
+	0x8211, 0x1f04, 0x5dc6, 0x0804, 0x5e35, 0x82ff, 0x1160, 0xd5d4,
+	0x0120, 0x91a6, 0x3fff, 0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904,
+	0x5e35, 0x918d, 0xc000, 0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4,
+	0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008,
+	0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319, 0x0008, 0x8318, 0x1f04,
+	0x5dec, 0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426, 0x8425, 0x1f04,
+	0x5dfe, 0x2328, 0x8529, 0x92be, 0x0007, 0x0158, 0x0006, 0x2039,
+	0x0007, 0x2200, 0x973a, 0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04,
+	0x5e0d, 0x755e, 0x95c8, 0x3327, 0x292d, 0x95ac, 0x00ff, 0x7582,
+	0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x2889, 0x001e, 0x60e7,
+	0x0000, 0x65ea, 0x2018, 0x2304, 0x9405, 0x201a, 0x7087, 0x0001,
+	0x20e9, 0x0000, 0x20a1, 0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9,
+	0x0008, 0x4003, 0x9085, 0x0001, 0x0008, 0x9006, 0x009e, 0x008e,
+	0x0005, 0x0156, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1,
+	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0,
+	0x4003, 0x014e, 0x013e, 0x01de, 0x01ce, 0x015e, 0x2118, 0x9026,
+	0x2001, 0x0007, 0x939a, 0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0,
+	0x2118, 0x84ff, 0x0120, 0x939a, 0x0010, 0x8421, 0x1de0, 0x2021,
+	0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8, 0x9238, 0x2029,
+	0x026e, 0x9528, 0x2504, 0x942c, 0x11b8, 0x9405, 0x203a, 0x715e,
+	0x91a0, 0x3327, 0x242d, 0x95ac, 0x00ff, 0x7582, 0x6532, 0x6536,
+	0x0016, 0x2508, 0x080c, 0x2889, 0x001e, 0x60e7, 0x0000, 0x65ea,
+	0x7087, 0x0001, 0x9084, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x708b, 0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100,
+	0x2071, 0x0140, 0x080c, 0x5f42, 0x080c, 0xa274, 0x7004, 0x9084,
+	0x4000, 0x0110, 0x080c, 0x2d01, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x1826, 0x2073, 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7,
+	0x080c, 0x5f9f, 0x001e, 0x9094, 0x0010, 0x9285, 0x0080, 0x7842,
+	0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x2ba7, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5,
+	0x2012, 0x2011, 0x19f0, 0x2013, 0x0000, 0x7093, 0x0000, 0x012e,
+	0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0xa26b, 0x6144, 0xd184,
+	0x0120, 0x7198, 0x918d, 0x2000, 0x0018, 0x718c, 0x918d, 0x1000,
+	0x2011, 0x1998, 0x2112, 0x2009, 0x07d0, 0x2011, 0x5e8c, 0x080c,
+	0x8574, 0x0005, 0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xade2, 0x2009, 0x00f7, 0x080c, 0x5f9f, 0x2061, 0x19f9,
+	0x900e, 0x611a, 0x611e, 0x6172, 0x6176, 0x2061, 0x1800, 0x6003,
+	0x0001, 0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009,
+	0x1998, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5f0e, 0x080c,
+	0x84d0, 0x012e, 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006,
+	0x0126, 0x2091, 0x8000, 0x0471, 0x2071, 0x0100, 0x080c, 0xa274,
+	0x2071, 0x0140, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2d01,
+	0x080c, 0x73ad, 0x0188, 0x080c, 0x73c8, 0x1170, 0x080c, 0x7697,
+	0x0016, 0x080c, 0x2958, 0x2001, 0x196c, 0x2102, 0x001e, 0x080c,
+	0x7692, 0x080c, 0x72d7, 0x0050, 0x2009, 0x0001, 0x080c, 0x2c40,
+	0x2001, 0x0001, 0x080c, 0x27ec, 0x080c, 0x5ee2, 0x012e, 0x000e,
+	0x00ee, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158, 0x0026,
+	0x0036, 0x2011, 0x8017, 0x2001, 0x1998, 0x201c, 0x080c, 0x4b14,
+	0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001, 0x20a1,
+	0x1c80, 0x080c, 0x5ffd, 0x20e9, 0x0000, 0x2099, 0x026e, 0x0099,
+	0x20a9, 0x0020, 0x080c, 0x5ff7, 0x2099, 0x0260, 0x20a1, 0x1c92,
+	0x0051, 0x20a9, 0x000e, 0x080c, 0x5ffa, 0x2099, 0x0260, 0x20a1,
+	0x1cb2, 0x0009, 0x0005, 0x0016, 0x0026, 0x3410, 0x3308, 0x2104,
+	0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, 0x5f77, 0x002e, 0x001e,
+	0x0005, 0x080c, 0xab2c, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9,
+	0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x080c,
+	0xab2c, 0x080c, 0x5ffd, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9,
+	0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x00c6,
+	0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0x1834, 0x2004, 0x9005,
+	0x1138, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x9105, 0x0010,
+	0x9185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016, 0x0046,
+	0x080c, 0x6977, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c,
+	0xe5cf, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a,
+	0x900e, 0x080c, 0x318c, 0x080c, 0xd24a, 0x0140, 0x0036, 0x2019,
+	0xffff, 0x2021, 0x0007, 0x080c, 0x4ccb, 0x003e, 0x004e, 0x001e,
+	0x0005, 0x080c, 0x5ee2, 0x709b, 0x0000, 0x7093, 0x0000, 0x0005,
+	0x0006, 0x2001, 0x180c, 0x2004, 0xd09c, 0x0100, 0x000e, 0x0005,
+	0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001, 0x0101, 0x200c,
+	0x918d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e, 0x0005, 0x2009,
+	0x0001, 0x0020, 0x2009, 0x0002, 0x0008, 0x900e, 0x6814, 0x9084,
+	0xffc0, 0x910d, 0x6916, 0x0005, 0x00f6, 0x0156, 0x0146, 0x01d6,
+	0x9006, 0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1, 0x1c00, 0x4004,
+	0x2079, 0x1c00, 0x7803, 0x2200, 0x7807, 0x00ef, 0x780f, 0x00ef,
+	0x7813, 0x0138, 0x7823, 0xffff, 0x7827, 0xffff, 0x01de, 0x014e,
+	0x015e, 0x00fe, 0x0005, 0x2001, 0x1800, 0x2003, 0x0001, 0x0005,
+	0x2001, 0x19a5, 0x0118, 0x2003, 0x0001, 0x0010, 0x2003, 0x0000,
+	0x0005, 0x0156, 0x20a9, 0x0800, 0x2009, 0x1000, 0x9006, 0x200a,
+	0x8108, 0x1f04, 0x6037, 0x015e, 0x0005, 0x00d6, 0x0036, 0x0156,
+	0x0136, 0x0146, 0x2069, 0x1847, 0x9006, 0xb802, 0xb8ce, 0xb807,
+	0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, 0x3327, 0x231d, 0x939c,
+	0x00ff, 0xbb16, 0x0016, 0x0026, 0xb8c2, 0x080c, 0xaddb, 0x1120,
+	0x9192, 0x007e, 0x1208, 0xbbc2, 0x20a9, 0x0004, 0xb8c4, 0x20e8,
+	0xb9c8, 0x9198, 0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9, 0x0004,
+	0x9198, 0x000a, 0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e, 0xb842,
+	0xb84e, 0xb852, 0xb856, 0xb85a, 0xb85e, 0xb862, 0xb866, 0xb86a,
+	0xb86f, 0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893,
+	0x0008, 0xb896, 0xb89a, 0xb89e, 0xb8be, 0xb9a2, 0x0096, 0xb8a4,
+	0x904d, 0x0110, 0x080c, 0x1031, 0xb8a7, 0x0000, 0x009e, 0x9006,
+	0xb84a, 0x6810, 0xb83a, 0x680c, 0xb846, 0xb8bb, 0x0520, 0xb8ac,
+	0x9005, 0x0198, 0x00c6, 0x2060, 0x9c82, 0x1cd0, 0x0a0c, 0x0dd5,
+	0x2001, 0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0dd5, 0x080c, 0x896a,
+	0x00ce, 0x090c, 0x8d0e, 0xb8af, 0x0000, 0x6814, 0x9084, 0x00ff,
+	0xb842, 0x014e, 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126,
+	0x2091, 0x8000, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000,
+	0x1a04, 0x6125, 0x9182, 0x0800, 0x1a04, 0x6129, 0x2001, 0x180c,
+	0x2004, 0x9084, 0x0003, 0x1904, 0x612f, 0x9188, 0x1000, 0x2104,
+	0x905d, 0x0518, 0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1508,
+	0xb8a4, 0x900d, 0x1904, 0x6141, 0xb850, 0x900d, 0x1148, 0xa802,
+	0x2900, 0xb852, 0xb84e, 0x080c, 0x90f6, 0x9006, 0x012e, 0x0005,
+	0x00a6, 0x2150, 0x2900, 0xb002, 0xa803, 0x0000, 0x00ae, 0xb852,
+	0x0c90, 0x2001, 0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e,
+	0x0498, 0x9082, 0x0006, 0x1290, 0x080c, 0xaddb, 0x1160, 0xb8a0,
+	0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0990, 0x2001, 0x0029,
+	0x2009, 0x1000, 0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c,
+	0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118,
+	0x2001, 0x0004, 0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118,
+	0x2009, 0x1000, 0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e,
+	0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001,
+	0x180c, 0x2004, 0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x905d,
+	0x09a8, 0x080c, 0x697b, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804,
+	0x60d8, 0x080c, 0x67a4, 0x0904, 0x60f1, 0x0804, 0x60dc, 0x00b6,
+	0x00e6, 0x0126, 0x2091, 0x8000, 0xa874, 0x908e, 0x00ff, 0x1120,
+	0x2001, 0x196a, 0x205c, 0x0060, 0xa974, 0x9182, 0x0800, 0x1690,
+	0x9188, 0x1000, 0x2104, 0x905d, 0x01d0, 0x080c, 0x691b, 0x11d0,
+	0x080c, 0xae1b, 0x0570, 0x2b00, 0x6012, 0x2900, 0x6016, 0x6023,
+	0x0009, 0x600b, 0x0000, 0xa874, 0x908e, 0x00ff, 0x1110, 0x600b,
+	0x8000, 0x2009, 0x0043, 0x080c, 0xaeec, 0x9006, 0x00b0, 0x2001,
+	0x0028, 0x0090, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001,
+	0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001,
+	0x0029, 0x0010, 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be,
+	0x0005, 0x2001, 0x002c, 0x0cc0, 0x00b6, 0x00e6, 0x0126, 0x2091,
+	0x8000, 0xa974, 0x9182, 0x0800, 0x1a04, 0x620f, 0x9188, 0x1000,
+	0x2104, 0x905d, 0x0904, 0x61e7, 0xb8a0, 0x9086, 0x007f, 0x0178,
+	0x080c, 0x6983, 0x0160, 0xa994, 0x81ff, 0x0130, 0x908e, 0x0004,
+	0x0130, 0x908e, 0x0005, 0x0118, 0x080c, 0x697b, 0x1598, 0xa87c,
+	0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8, 0x2060, 0x0026, 0x2010,
+	0x080c, 0xcb38, 0x002e, 0x1120, 0x2001, 0x0008, 0x0804, 0x6211,
+	0x6020, 0x9086, 0x000a, 0x0120, 0x2001, 0x0008, 0x0804, 0x6211,
+	0x601a, 0x6003, 0x0008, 0x2900, 0x6016, 0x0058, 0x080c, 0xae1b,
+	0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023,
+	0x000a, 0x2009, 0x0003, 0x080c, 0xaeec, 0x9006, 0x0458, 0x2001,
+	0x0028, 0x0438, 0x9082, 0x0006, 0x1290, 0x080c, 0xaddb, 0x1160,
+	0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001,
+	0x0029, 0x2009, 0x1000, 0x00a8, 0x2001, 0x0028, 0x0090, 0x2009,
+	0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0050, 0xd184,
+	0x0118, 0x2001, 0x0004, 0x0028, 0x2001, 0x0029, 0x0010, 0x2001,
+	0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c,
+	0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005,
+	0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518,
+	0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974, 0x2079, 0x1800, 0x9182,
+	0x0800, 0x12e8, 0x7830, 0x9084, 0x0003, 0x1130, 0xaa98, 0xab94,
+	0xa878, 0x9084, 0x0007, 0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001,
+	0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001,
+	0x0029, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001,
+	0x0029, 0x900e, 0x9006, 0x0008, 0x9005, 0x012e, 0x00be, 0x00fe,
+	0x0005, 0x62a6, 0x6261, 0x6278, 0x62a6, 0x62a6, 0x62a6, 0x62a6,
+	0x62a6, 0x2100, 0x9082, 0x007e, 0x1278, 0x080c, 0x65a7, 0x0148,
+	0x9046, 0xb810, 0x9306, 0x1904, 0x62ae, 0xb814, 0x9206, 0x15f0,
+	0x0028, 0xbb12, 0xba16, 0x0010, 0x080c, 0x49c7, 0x0150, 0x04b0,
+	0x080c, 0x6608, 0x1598, 0xb810, 0x9306, 0x1580, 0xb814, 0x9206,
+	0x1568, 0x080c, 0xae1b, 0x0530, 0x2b00, 0x6012, 0x080c, 0xcfc4,
+	0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0xa878, 0x9086,
+	0x0001, 0x1170, 0x080c, 0x31c1, 0x9006, 0x080c, 0x6544, 0x2001,
+	0x0002, 0x080c, 0x6558, 0x2001, 0x0200, 0xb86e, 0xb893, 0x0002,
+	0x2009, 0x0003, 0x080c, 0xaeec, 0x9006, 0x0068, 0x2001, 0x0001,
+	0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0028,
+	0x900e, 0x9005, 0x0000, 0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6,
+	0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa894, 0x90c6, 0x0015,
+	0x0904, 0x6495, 0x90c6, 0x0056, 0x0904, 0x6499, 0x90c6, 0x0066,
+	0x0904, 0x649d, 0x90c6, 0x0067, 0x0904, 0x64a1, 0x90c6, 0x0068,
+	0x0904, 0x64a5, 0x90c6, 0x0071, 0x0904, 0x64a9, 0x90c6, 0x0074,
+	0x0904, 0x64ad, 0x90c6, 0x007c, 0x0904, 0x64b1, 0x90c6, 0x007e,
+	0x0904, 0x64b5, 0x90c6, 0x0037, 0x0904, 0x64b9, 0x9016, 0x2079,
+	0x1800, 0xa974, 0x9186, 0x00ff, 0x0904, 0x6490, 0x9182, 0x0800,
+	0x1a04, 0x6490, 0x080c, 0x6608, 0x1198, 0xb804, 0x9084, 0x00ff,
+	0x9082, 0x0006, 0x1268, 0xa894, 0x90c6, 0x006f, 0x0148, 0x080c,
+	0xaddb, 0x1904, 0x6479, 0xb8a0, 0x9084, 0xff80, 0x1904, 0x6479,
+	0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6, 0x005e, 0x0904, 0x63d9,
+	0x90c6, 0x0064, 0x0904, 0x6402, 0x2008, 0x0804, 0x639b, 0xa998,
+	0xa8b0, 0x2040, 0x080c, 0xaddb, 0x1120, 0x9182, 0x007f, 0x0a04,
+	0x639b, 0x9186, 0x00ff, 0x0904, 0x639b, 0x9182, 0x0800, 0x1a04,
+	0x639b, 0xaaa0, 0xab9c, 0x787c, 0x9306, 0x1188, 0x7880, 0x0096,
+	0x924e, 0x1128, 0x2208, 0x2310, 0x009e, 0x0804, 0x639b, 0x99cc,
+	0xff00, 0x009e, 0x1120, 0x2208, 0x2310, 0x0804, 0x639b, 0x080c,
+	0x49c7, 0x0904, 0x63a5, 0x900e, 0x9016, 0x90c6, 0x4000, 0x15e0,
+	0x0006, 0x080c, 0x6828, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
+	0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031,
+	0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c,
+	0x0f7c, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0035,
+	0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c,
+	0x0f7c, 0xa8c4, 0xabc8, 0x9305, 0xabcc, 0x9305, 0xabd0, 0x9305,
+	0xabd4, 0x9305, 0xabd8, 0x9305, 0xabdc, 0x9305, 0xabe0, 0x9305,
+	0x9005, 0x0510, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408,
+	0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070, 0x90c6,
+	0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001, 0x4005,
+	0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e,
+	0x2001, 0x0030, 0x900e, 0x0478, 0x000e, 0x080c, 0xae1b, 0x1130,
+	0x2001, 0x4005, 0x2009, 0x0003, 0x9016, 0x0c78, 0x2b00, 0x6012,
+	0x080c, 0xcfc4, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c,
+	0x0108, 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x31c1,
+	0x012e, 0x9006, 0x080c, 0x6544, 0x2001, 0x0002, 0x080c, 0x6558,
+	0x2009, 0x0002, 0x080c, 0xaeec, 0xa8b0, 0xd094, 0x0118, 0xb8cc,
+	0xc08d, 0xb8ce, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be,
+	0x0005, 0x080c, 0x56ec, 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998,
+	0xaeb0, 0x080c, 0x6608, 0x1904, 0x6396, 0x9186, 0x007f, 0x0130,
+	0x080c, 0x697b, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096, 0x080c,
+	0x0fff, 0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900, 0x009e,
+	0xa806, 0x080c, 0xcd30, 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005,
+	0x0804, 0x639d, 0xa998, 0xaeb0, 0x080c, 0x6608, 0x1904, 0x6396,
+	0x0096, 0x080c, 0x0fff, 0x1128, 0x009e, 0x2009, 0x0002, 0x0804,
+	0x6456, 0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b,
+	0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0,
+	0xbbc8, 0x9398, 0x0006, 0x2398, 0x080c, 0x0f7c, 0x009e, 0xa87b,
+	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168, 0x080c,
+	0x56d8, 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c,
+	0x0118, 0xa89b, 0x000c, 0x00b0, 0x080c, 0x697b, 0x0118, 0xa89b,
+	0x0009, 0x0080, 0x080c, 0x56ec, 0x0118, 0xa89b, 0x0007, 0x0050,
+	0x080c, 0xcd13, 0x1904, 0x63d2, 0x2009, 0x0003, 0x2001, 0x4005,
+	0x0804, 0x639d, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804, 0x8006,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002,
+	0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000,
+	0x2041, 0x1243, 0x080c, 0xb38b, 0x1904, 0x63d2, 0x2009, 0x0002,
+	0x08e8, 0x2001, 0x0028, 0x900e, 0x0804, 0x63d3, 0x2009, 0x180c,
+	0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118,
+	0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804, 0x63d3,
+	0x2001, 0x0029, 0x900e, 0x0804, 0x63d3, 0x080c, 0x3756, 0x0804,
+	0x63d4, 0x080c, 0x5415, 0x0804, 0x63d4, 0x080c, 0x4554, 0x0804,
+	0x63d4, 0x080c, 0x45cd, 0x0804, 0x63d4, 0x080c, 0x4629, 0x0804,
+	0x63d4, 0x080c, 0x4a8a, 0x0804, 0x63d4, 0x080c, 0x4d3a, 0x0804,
+	0x63d4, 0x080c, 0x5080, 0x0804, 0x63d4, 0x080c, 0x5279, 0x0804,
+	0x63d4, 0x080c, 0x396c, 0x0804, 0x63d4, 0x00b6, 0xa974, 0xae78,
+	0x9684, 0x3fff, 0x9082, 0x4000, 0x1618, 0x9182, 0x0800, 0x1268,
+	0x9188, 0x1000, 0x2104, 0x905d, 0x0140, 0x080c, 0x697b, 0x1148,
+	0x00e9, 0x080c, 0x6733, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e,
+	0x0090, 0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d88, 0x2001,
+	0x0029, 0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
+	0x2001, 0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0x0126, 0x2091,
+	0x8000, 0xb850, 0x900d, 0x0150, 0x2900, 0x0096, 0x2148, 0xa802,
+	0x009e, 0xa803, 0x0000, 0xb852, 0x012e, 0x0005, 0x2900, 0xb852,
+	0xb84e, 0xa803, 0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000, 0xb84c,
+	0x9005, 0x0170, 0x00e6, 0x2071, 0x19e6, 0x7004, 0x9086, 0x0002,
+	0x0168, 0x00ee, 0xb84c, 0xa802, 0x2900, 0xb84e, 0x012e, 0x0005,
+	0x2900, 0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x701c, 0x9b06,
+	0x1d80, 0xb84c, 0x00a6, 0x2050, 0xb000, 0xa802, 0x2900, 0xb002,
+	0x00ae, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0xb84c,
+	0x904d, 0x0130, 0xa800, 0x9005, 0x1108, 0xb852, 0xb84e, 0x9905,
+	0x012e, 0x0005, 0xb84c, 0x904d, 0x0130, 0xa800, 0x9005, 0x1108,
+	0xb852, 0xb84e, 0x9905, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026,
+	0x2091, 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285,
+	0x0008, 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005,
+	0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04,
+	0x0006, 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c,
+	0x6977, 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110,
+	0x2011, 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006,
+	0x9086, 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0dd5, 0x000e,
+	0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091,
+	0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168,
+	0xb89c, 0xd0a4, 0x0150, 0x080c, 0x6973, 0x1138, 0x9284, 0x00ff,
+	0x9086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff,
+	0x8007, 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182,
+	0x0800, 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190,
+	0x1000, 0x2204, 0x905d, 0x1188, 0x0096, 0x080c, 0x0fff, 0x2958,
+	0x009e, 0x0168, 0x2b00, 0x2012, 0xb85c, 0xb8ca, 0xb860, 0xb8c6,
+	0x9006, 0xb8a6, 0xb8ae, 0x080c, 0x603d, 0x9006, 0x0010, 0x9085,
+	0x0001, 0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091,
+	0x8000, 0x0026, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458,
+	0x00d6, 0x9190, 0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000,
+	0xb8a4, 0x904d, 0x0110, 0x080c, 0x1031, 0x00d6, 0x00c6, 0xb8bc,
+	0x2060, 0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c,
+	0xcb4a, 0x0110, 0x080c, 0x0fb1, 0x080c, 0xae71, 0x00ce, 0x0c88,
+	0x00ce, 0x00de, 0x2b48, 0xb8c8, 0xb85e, 0xb8c4, 0xb862, 0x080c,
+	0x1041, 0x00de, 0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005,
+	0x0016, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188,
+	0x1000, 0x2104, 0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6,
+	0x0156, 0x0136, 0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c,
+	0xb802, 0x080c, 0x73a5, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120,
+	0x080c, 0xaddb, 0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6,
+	0x2061, 0x1981, 0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a,
+	0x7054, 0x600e, 0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110,
+	0x2001, 0x0001, 0x6886, 0x2069, 0x1800, 0x68b6, 0x7040, 0xb85e,
+	0x7048, 0xb862, 0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276,
+	0xb8c4, 0x20e8, 0xb8c8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004,
+	0x4003, 0x2099, 0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004,
+	0x4003, 0x2069, 0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144,
+	0xb96e, 0x7048, 0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817,
+	0x0000, 0xb8a0, 0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182,
+	0x0211, 0x1218, 0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218,
+	0x2009, 0x0007, 0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006,
+	0x00a0, 0x9182, 0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182,
+	0x0421, 0x1218, 0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218,
+	0x2009, 0x0003, 0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e,
+	0x015e, 0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260,
+	0x7034, 0xb896, 0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbcc,
+	0xc384, 0xba00, 0x2009, 0x1867, 0x210c, 0xd0bc, 0x0120, 0xd1ec,
+	0x0110, 0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138,
+	0xc2bd, 0xd0cc, 0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc,
+	0xba02, 0xbbce, 0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096,
+	0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff,
+	0x15c0, 0xaa04, 0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6,
+	0x01d6, 0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084,
+	0xffc0, 0x9080, 0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001,
+	0x4002, 0x9086, 0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0dd5,
+	0x3c00, 0x20e8, 0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06,
+	0x01de, 0x01ce, 0x014e, 0x013e, 0x0060, 0x080c, 0x0fff, 0x0170,
+	0x2900, 0xb8a6, 0xa803, 0x0000, 0x080c, 0x67c4, 0xa807, 0x0001,
+	0xae12, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8,
+	0x0126, 0x2091, 0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800,
+	0x9005, 0x1150, 0x080c, 0x67d3, 0x1158, 0xa804, 0x908a, 0x0002,
+	0x0218, 0x8001, 0xa806, 0x0020, 0x080c, 0x1031, 0xb8a7, 0x0000,
+	0x009e, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x90f6,
+	0x012e, 0x0005, 0x901e, 0x0010, 0x2019, 0x0001, 0x900e, 0x0126,
+	0x2091, 0x8000, 0xb84c, 0x2048, 0xb800, 0xd0dc, 0x1170, 0x89ff,
+	0x0500, 0x83ff, 0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c,
+	0x9406, 0x1118, 0xa870, 0x9506, 0x0120, 0x2908, 0xa800, 0x2048,
+	0x0c70, 0x080c, 0xa693, 0xaa00, 0xb84c, 0x9906, 0x1110, 0xba4e,
+	0x0020, 0x00a6, 0x2150, 0xb202, 0x00ae, 0x82ff, 0x1110, 0xb952,
+	0x89ff, 0x012e, 0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001,
+	0x0005, 0x080c, 0x6828, 0x0128, 0x080c, 0xcc07, 0x0010, 0x9085,
+	0x0001, 0x0005, 0x080c, 0x6828, 0x0128, 0x080c, 0xcbac, 0x0010,
+	0x9085, 0x0001, 0x0005, 0x080c, 0x6828, 0x0128, 0x080c, 0xcc04,
+	0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6828, 0x0128, 0x080c,
+	0xcbcb, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6828, 0x0128,
+	0x080c, 0xcc48, 0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d,
+	0x1118, 0x9085, 0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005,
+	0x11b8, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184,
+	0xffc0, 0x9080, 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010,
+	0x4002, 0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008,
+	0x9006, 0x01ce, 0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff,
+	0x4104, 0x01de, 0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8,
 	0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0,
 	0x9080, 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002,
-	0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006,
-	0x01ce, 0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104,
-	0x01de, 0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
-	0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080,
-	0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606,
-	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6,
-	0x3300, 0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004,
-	0x01de, 0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126,
-	0x2091, 0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x0fff, 0x0168,
-	0x2900, 0xb8a6, 0x080c, 0x67bb, 0xa803, 0x0001, 0xa807, 0x0000,
-	0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096,
-	0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000,
-	0x080c, 0x1031, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c,
-	0xd0a4, 0x0005, 0x00b6, 0x00f6, 0x080c, 0x73bc, 0x01b0, 0x71c4,
-	0x81ff, 0x1198, 0x71dc, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080,
-	0x1000, 0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1847, 0x7804,
-	0xd0a4, 0x01d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c,
-	0x65ff, 0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004,
-	0x0118, 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e,
-	0x8108, 0x1f04, 0x6846, 0x015e, 0x080c, 0x6930, 0x0120, 0x2001,
-	0x1985, 0x200c, 0x0038, 0x2079, 0x1847, 0x7804, 0xd0a4, 0x0130,
-	0x2009, 0x07d0, 0x2011, 0x6871, 0x080c, 0x858b, 0x00fe, 0x00be,
-	0x0005, 0x00b6, 0x2011, 0x6871, 0x080c, 0x84f3, 0x080c, 0x6930,
-	0x01d8, 0x2001, 0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902,
-	0x080c, 0x696e, 0x0130, 0x2009, 0x07d0, 0x2011, 0x6871, 0x080c,
-	0x858b, 0x00e6, 0x2071, 0x1800, 0x9006, 0x707e, 0x7060, 0x7082,
-	0x080c, 0x2f96, 0x00ee, 0x04b0, 0x0156, 0x00c6, 0x20a9, 0x007f,
-	0x900e, 0x0016, 0x080c, 0x65ff, 0x1538, 0xb800, 0xd0ec, 0x0520,
-	0x0046, 0xbaa0, 0x2220, 0x9006, 0x2009, 0x0029, 0x080c, 0xe5ae,
-	0xb800, 0xc0e5, 0xc0ec, 0xb802, 0x080c, 0x696a, 0x2001, 0x0707,
-	0x1128, 0xb804, 0x9084, 0x00ff, 0x9085, 0x0700, 0xb806, 0x2019,
-	0x0029, 0x080c, 0x928b, 0x0076, 0x903e, 0x080c, 0x9168, 0x900e,
-	0x080c, 0xe2eb, 0x007e, 0x004e, 0x001e, 0x8108, 0x1f04, 0x6899,
-	0x00ce, 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010, 0x2058, 0xb800,
-	0xc0ec, 0xb802, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x0096, 0x080c,
-	0x1018, 0x090c, 0x0dd5, 0x2958, 0x009e, 0x2001, 0x196b, 0x2b02,
-	0x8b07, 0x8006, 0x8006, 0x908c, 0x003f, 0xb9c6, 0x908c, 0xffc0,
-	0xb9ca, 0xb8af, 0x0000, 0x2009, 0x00ff, 0x080c, 0x6034, 0xb807,
-	0x0006, 0xb813, 0x00ff, 0xb817, 0xffff, 0xb86f, 0x0200, 0xb86c,
-	0xb893, 0x0002, 0xb8bb, 0x0520, 0xb8a3, 0x00ff, 0xb8af, 0x0000,
-	0x00ce, 0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be,
-	0xd0bc, 0x0005, 0x0006, 0x0016, 0x0026, 0xb804, 0x908c, 0x00ff,
-	0x9196, 0x0006, 0x0188, 0x9196, 0x0004, 0x0170, 0x9196, 0x0005,
-	0x0158, 0x908c, 0xff00, 0x810f, 0x9196, 0x0006, 0x0128, 0x9196,
-	0x0004, 0x0110, 0x9196, 0x0005, 0x002e, 0x001e, 0x000e, 0x0005,
-	0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110, 0xb800,
-	0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091, 0x8000,
-	0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c, 0x0dd5,
-	0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, 0xba02,
-	0x002e, 0x012e, 0x0005, 0x2011, 0x1837, 0x2204, 0xd0cc, 0x0138,
-	0x2001, 0x1983, 0x200c, 0x2011, 0x6960, 0x080c, 0x858b, 0x0005,
-	0x2011, 0x6960, 0x080c, 0x84f3, 0x2011, 0x1837, 0x2204, 0xc0cc,
-	0x2012, 0x0005, 0x080c, 0x56cf, 0xd0ac, 0x0005, 0x080c, 0x56cf,
-	0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e, 0x0006,
-	0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007, 0x908e,
-	0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xd230, 0x0158,
-	0x70dc, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004, 0x905d,
-	0x0110, 0xb8cc, 0xd094, 0x00fe, 0x00be, 0x0005, 0x2071, 0x1910,
-	0x7003, 0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016, 0x701a,
-	0x701e, 0x700a, 0x7046, 0x2001, 0x1947, 0x2003, 0x0000, 0x0005,
-	0x0016, 0x00e6, 0x2071, 0x1948, 0x900e, 0x710a, 0x080c, 0x56cf,
-	0xd0fc, 0x1140, 0x080c, 0x56cf, 0x900e, 0xd09c, 0x0108, 0x8108,
-	0x7102, 0x00f8, 0x2001, 0x1867, 0x200c, 0x9184, 0x0007, 0x0002,
-	0x69b2, 0x69b2, 0x69b2, 0x69b2, 0x69b2, 0x69c8, 0x69d6, 0x69b2,
-	0x7003, 0x0003, 0x2009, 0x1868, 0x210c, 0x9184, 0xff00, 0x8007,
-	0x9005, 0x1110, 0x2001, 0x0002, 0x7006, 0x0018, 0x7003, 0x0005,
-	0x0c88, 0x00ee, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0050, 0x684c,
-	0x9005, 0x1150, 0x00e6, 0x2071, 0x1910, 0x7028, 0xc085, 0x702a,
-	0x00ee, 0x9085, 0x0001, 0x0488, 0x6844, 0x9005, 0x0158, 0x080c,
-	0x7716, 0x6a60, 0x9200, 0x7002, 0x6864, 0x9101, 0x7006, 0x9006,
-	0x7012, 0x7016, 0x6860, 0x7002, 0x6864, 0x7006, 0x6868, 0x700a,
-	0x686c, 0x700e, 0x6844, 0x9005, 0x1110, 0x7012, 0x7016, 0x684c,
-	0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x7037, 0x0019, 0x702b,
-	0x0001, 0x00e6, 0x2071, 0x1910, 0x7028, 0xc084, 0x702a, 0x7007,
-	0x0001, 0x700b, 0x0000, 0x00ee, 0x9006, 0x00ee, 0x0005, 0x00e6,
-	0x0026, 0x2071, 0x1948, 0x7000, 0x9015, 0x0904, 0x6c86, 0x9286,
-	0x0003, 0x0904, 0x6b1c, 0x9286, 0x0005, 0x0904, 0x6b1c, 0x2071,
-	0x1877, 0xa87c, 0x9005, 0x0904, 0x6a7d, 0x7140, 0xa868, 0x9102,
-	0x0a04, 0x6c86, 0xa878, 0xd084, 0x15d8, 0xa853, 0x0019, 0x2001,
-	0x8023, 0xa84e, 0x2071, 0x1910, 0x701c, 0x9005, 0x1904, 0x6e28,
-	0x0e04, 0x6e96, 0x2071, 0x0000, 0xa850, 0x7032, 0xa84c, 0x7082,
-	0xa870, 0x7086, 0xa86c, 0x708a, 0xa880, 0x708e, 0x7036, 0x0146,
-	0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a,
-	0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098,
-	0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x0804, 0x6aff,
-	0xa853, 0x001b, 0x2001, 0x8027, 0x0820, 0x7004, 0xd08c, 0x1904,
-	0x6c86, 0xa853, 0x001a, 0x2001, 0x8024, 0x0804, 0x6a41, 0x00e6,
-	0x0026, 0x2071, 0x1948, 0x7000, 0x9015, 0x0904, 0x6c86, 0x9286,
-	0x0003, 0x0904, 0x6b1c, 0x9286, 0x0005, 0x0904, 0x6b1c, 0xa84f,
-	0x8022, 0xa853, 0x0018, 0x0804, 0x6ae4, 0xa868, 0xd0fc, 0x11d8,
-	0x00e6, 0x0026, 0x2001, 0x1948, 0x2004, 0x9005, 0x0904, 0x6c86,
-	0xa87c, 0xd0bc, 0x1904, 0x6c86, 0xa978, 0xa874, 0x9105, 0x1904,
-	0x6c86, 0x2001, 0x1948, 0x2004, 0x0002, 0x6c86, 0x6ae0, 0x6b1c,
-	0x6b1c, 0x6c86, 0x6b1c, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6,
-	0x0026, 0x2009, 0x1948, 0x210c, 0x81ff, 0x0904, 0x6c86, 0xa87c,
-	0xd0cc, 0x0904, 0x6c86, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001,
-	0x1904, 0x6c86, 0x9186, 0x0003, 0x0904, 0x6b1c, 0x9186, 0x0005,
-	0x0904, 0x6b1c, 0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005,
-	0xa84f, 0x8020, 0xa853, 0x0016, 0x2071, 0x1910, 0x701c, 0x9005,
-	0x1904, 0x6e28, 0x0e04, 0x6e96, 0x2071, 0x0000, 0xa84c, 0x7082,
-	0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2071,
-	0x1800, 0x2011, 0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802,
-	0x2900, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8414, 0x002e,
-	0x00ee, 0x0005, 0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079,
-	0x0050, 0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904,
-	0x6c0b, 0x782c, 0x908c, 0x0780, 0x190c, 0x6fe2, 0x8004, 0x8004,
-	0x8004, 0x9084, 0x0003, 0x0002, 0x6b3a, 0x6c0b, 0x6b5f, 0x6ba6,
-	0x080c, 0x0dd5, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d,
-	0x1170, 0x2071, 0x19fa, 0x703c, 0x9005, 0x1328, 0x2001, 0x1949,
-	0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016,
-	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8414, 0x0c10, 0x2071,
-	0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1580, 0x7824, 0x00e6,
-	0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009, 0x1830, 0x210c,
-	0x918a, 0x0020, 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
-	0x8414, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe2, 0xd0a4, 0x19f0,
-	0x2071, 0x19fa, 0x703c, 0x9005, 0x1328, 0x2001, 0x1949, 0x2004,
-	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70c0, 0x9200, 0x70c2, 0x080c, 0x8414, 0x0800, 0x0096, 0x00e6,
-	0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e,
-	0x70c0, 0x8000, 0x70c2, 0x080c, 0x8414, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6fe2, 0xd0a4, 0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6fe2, 0xd09c, 0x11a0, 0x009e, 0x2900, 0x7822, 0xa804,
-	0x900d, 0x1560, 0x2071, 0x19fa, 0x703c, 0x9005, 0x1328, 0x2001,
-	0x1949, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
-	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1170,
-	0x2071, 0x19fa, 0x703c, 0x9005, 0x1328, 0x2001, 0x1949, 0x2004,
-	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800,
-	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8414, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
-	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
-	0x900d, 0x1904, 0x6c60, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe2,
-	0xd09c, 0x1198, 0x701c, 0x904d, 0x0180, 0x7010, 0x8001, 0x7012,
-	0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x6fe2, 0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6fe2, 0xd0a4, 0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071,
-	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2,
-	0x080c, 0x8414, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe2, 0xd0a4,
-	0x1d60, 0x00ee, 0x2071, 0x19fa, 0x703c, 0x9005, 0x1328, 0x2001,
-	0x1949, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
-	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2,
-	0x080c, 0x8414, 0x00ee, 0x0804, 0x6c1b, 0xa868, 0xd0fc, 0x1560,
-	0x0096, 0xa804, 0xa807, 0x0000, 0x904d, 0x190c, 0x0fb1, 0x009e,
-	0x0018, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026, 0xa84f, 0x0000,
-	0x00f6, 0x2079, 0x0050, 0x2071, 0x1910, 0xa803, 0x0000, 0x7010,
-	0x9005, 0x1904, 0x6da2, 0x782c, 0x908c, 0x0780, 0x190c, 0x6fe2,
-	0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x6ca5, 0x6da2,
-	0x6cc0, 0x6d31, 0x080c, 0x0dd5, 0x0005, 0x2071, 0x1800, 0x2900,
-	0x7822, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8414, 0x0c60,
-	0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1904, 0x6d20,
-	0x7830, 0x8007, 0x9084, 0x001f, 0x9082, 0x0005, 0x1220, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c,
+	0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146,
+	0x01d6, 0x3300, 0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff,
+	0x4004, 0x01de, 0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096,
+	0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x0fff,
+	0x0168, 0x2900, 0xb8a6, 0x080c, 0x67c4, 0xa803, 0x0001, 0xa807,
+	0x0000, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8,
+	0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7,
+	0x0000, 0x080c, 0x1031, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005,
+	0xb89c, 0xd0a4, 0x0005, 0x00b6, 0x00f6, 0x080c, 0x73a5, 0x01b0,
+	0x71c4, 0x81ff, 0x1198, 0x71dc, 0xd19c, 0x0180, 0x2001, 0x007e,
+	0x9080, 0x1000, 0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff,
+	0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1847,
+	0x7804, 0xd0a4, 0x01d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016,
+	0x080c, 0x6608, 0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096,
+	0x0004, 0x0118, 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802,
+	0x001e, 0x8108, 0x1f04, 0x684f, 0x015e, 0x080c, 0x6939, 0x0120,
+	0x2001, 0x1984, 0x200c, 0x0038, 0x2079, 0x1847, 0x7804, 0xd0a4,
+	0x0130, 0x2009, 0x07d0, 0x2011, 0x687a, 0x080c, 0x8574, 0x00fe,
+	0x00be, 0x0005, 0x00b6, 0x2011, 0x687a, 0x080c, 0x84dc, 0x080c,
+	0x6939, 0x01d8, 0x2001, 0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec,
+	0xb902, 0x080c, 0x6977, 0x0130, 0x2009, 0x07d0, 0x2011, 0x687a,
+	0x080c, 0x8574, 0x00e6, 0x2071, 0x1800, 0x9006, 0x707e, 0x7060,
+	0x7082, 0x080c, 0x2f98, 0x00ee, 0x04b0, 0x0156, 0x00c6, 0x20a9,
+	0x007f, 0x900e, 0x0016, 0x080c, 0x6608, 0x1538, 0xb800, 0xd0ec,
+	0x0520, 0x0046, 0xbaa0, 0x2220, 0x9006, 0x2009, 0x0029, 0x080c,
+	0xe5cf, 0xb800, 0xc0e5, 0xc0ec, 0xb802, 0x080c, 0x6973, 0x2001,
+	0x0707, 0x1128, 0xb804, 0x9084, 0x00ff, 0x9085, 0x0700, 0xb806,
+	0x2019, 0x0029, 0x080c, 0x927e, 0x0076, 0x903e, 0x080c, 0x9151,
+	0x900e, 0x080c, 0xe30c, 0x007e, 0x004e, 0x001e, 0x8108, 0x1f04,
+	0x68a2, 0x00ce, 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010, 0x2058,
+	0xb800, 0xc0ec, 0xb802, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x0096,
+	0x080c, 0x1018, 0x090c, 0x0dd5, 0x2958, 0x009e, 0x2001, 0x196a,
+	0x2b02, 0x8b07, 0x8006, 0x8006, 0x908c, 0x003f, 0xb9c6, 0x908c,
+	0xffc0, 0xb9ca, 0xb8af, 0x0000, 0x2009, 0x00ff, 0x080c, 0x603d,
+	0xb807, 0x0006, 0xb813, 0x00ff, 0xb817, 0xffff, 0xb86f, 0x0200,
+	0xb86c, 0xb893, 0x0002, 0xb8bb, 0x0520, 0xb8a3, 0x00ff, 0xb8af,
+	0x0000, 0x00ce, 0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800,
+	0x00be, 0xd0bc, 0x0005, 0x0006, 0x0016, 0x0026, 0xb804, 0x908c,
+	0x00ff, 0x9196, 0x0006, 0x0188, 0x9196, 0x0004, 0x0170, 0x9196,
+	0x0005, 0x0158, 0x908c, 0xff00, 0x810f, 0x9196, 0x0006, 0x0128,
+	0x9196, 0x0004, 0x0110, 0x9196, 0x0005, 0x002e, 0x001e, 0x000e,
+	0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110,
+	0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091,
+	0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c,
+	0x0dd5, 0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc,
+	0xba02, 0x002e, 0x012e, 0x0005, 0x2011, 0x1837, 0x2204, 0xd0cc,
+	0x0138, 0x2001, 0x1982, 0x200c, 0x2011, 0x6969, 0x080c, 0x8574,
+	0x0005, 0x2011, 0x6969, 0x080c, 0x84dc, 0x2011, 0x1837, 0x2204,
+	0xc0cc, 0x2012, 0x0005, 0x080c, 0x56d8, 0xd0ac, 0x0005, 0x080c,
+	0x56d8, 0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e,
+	0x0006, 0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007,
+	0x908e, 0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xd24a,
+	0x0158, 0x70dc, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004,
+	0x905d, 0x0110, 0xb8cc, 0xd094, 0x00fe, 0x00be, 0x0005, 0x2071,
+	0x1910, 0x7003, 0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016,
+	0x701a, 0x701e, 0x700a, 0x7046, 0x0005, 0x0016, 0x00e6, 0x2071,
+	0x1947, 0x900e, 0x710a, 0x080c, 0x56d8, 0xd0fc, 0x1140, 0x080c,
+	0x56d8, 0x900e, 0xd09c, 0x0108, 0x8108, 0x7102, 0x00f8, 0x2001,
+	0x1867, 0x200c, 0x9184, 0x0007, 0x0002, 0x69b7, 0x69b7, 0x69b7,
+	0x69b7, 0x69b7, 0x69cd, 0x69db, 0x69b7, 0x7003, 0x0003, 0x2009,
+	0x1868, 0x210c, 0x9184, 0xff00, 0x8007, 0x9005, 0x1110, 0x2001,
+	0x0002, 0x7006, 0x0018, 0x7003, 0x0005, 0x0c88, 0x00ee, 0x001e,
+	0x0005, 0x00e6, 0x2071, 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6,
+	0x2071, 0x1910, 0x7028, 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001,
+	0x0488, 0x6844, 0x9005, 0x0158, 0x080c, 0x76ff, 0x6a60, 0x9200,
+	0x7002, 0x6864, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6860,
+	0x7002, 0x6864, 0x7006, 0x6868, 0x700a, 0x686c, 0x700e, 0x6844,
+	0x9005, 0x1110, 0x7012, 0x7016, 0x684c, 0x701a, 0x701c, 0x9085,
+	0x0040, 0x701e, 0x7037, 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071,
+	0x1910, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700b, 0x0000,
+	0x00ee, 0x9006, 0x00ee, 0x0005, 0x00e6, 0x0026, 0x2071, 0x1947,
+	0x7000, 0x9015, 0x0904, 0x6c8b, 0x9286, 0x0003, 0x0904, 0x6b21,
+	0x9286, 0x0005, 0x0904, 0x6b21, 0x2071, 0x1877, 0xa87c, 0x9005,
+	0x0904, 0x6a82, 0x7140, 0xa868, 0x9102, 0x0a04, 0x6c8b, 0xa878,
+	0xd084, 0x15d8, 0xa853, 0x0019, 0x2001, 0x8023, 0xa84e, 0x2071,
+	0x1910, 0x701c, 0x9005, 0x1904, 0x6e21, 0x0e04, 0x6e8f, 0x2071,
+	0x0000, 0xa850, 0x7032, 0xa84c, 0x7082, 0xa870, 0x7086, 0xa86c,
+	0x708a, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6,
+	0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce,
+	0x013e, 0x01de, 0x014e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x190c, 0x119b, 0x0804, 0x6b04, 0xa853, 0x001b, 0x2001,
+	0x8027, 0x0820, 0x7004, 0xd08c, 0x1904, 0x6c8b, 0xa853, 0x001a,
+	0x2001, 0x8024, 0x0804, 0x6a46, 0x00e6, 0x0026, 0x2071, 0x1947,
+	0x7000, 0x9015, 0x0904, 0x6c8b, 0x9286, 0x0003, 0x0904, 0x6b21,
+	0x9286, 0x0005, 0x0904, 0x6b21, 0xa84f, 0x8022, 0xa853, 0x0018,
+	0x0804, 0x6ae9, 0xa868, 0xd0fc, 0x11d8, 0x00e6, 0x0026, 0x2001,
+	0x1947, 0x2004, 0x9005, 0x0904, 0x6c8b, 0xa87c, 0xd0bc, 0x1904,
+	0x6c8b, 0xa978, 0xa874, 0x9105, 0x1904, 0x6c8b, 0x2001, 0x1947,
+	0x2004, 0x0002, 0x6c8b, 0x6ae5, 0x6b21, 0x6b21, 0x6c8b, 0x6b21,
+	0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026, 0x2009, 0x1947,
+	0x210c, 0x81ff, 0x0904, 0x6c8b, 0xa87c, 0xd0cc, 0x0904, 0x6c8b,
+	0xa880, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x6c8b, 0x9186,
+	0x0003, 0x0904, 0x6b21, 0x9186, 0x0005, 0x0904, 0x6b21, 0xa84f,
+	0x8021, 0xa853, 0x0017, 0x0028, 0x0005, 0xa84f, 0x8020, 0xa853,
+	0x0016, 0x2071, 0x1910, 0x701c, 0x9005, 0x1904, 0x6e21, 0x0e04,
+	0x6e8f, 0x2071, 0x0000, 0xa84c, 0x7082, 0xa850, 0x7032, 0xa86c,
+	0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x119b, 0x2071, 0x1800, 0x2011, 0x0001,
+	0xa804, 0x900d, 0x702c, 0x1158, 0xa802, 0x2900, 0x702e, 0x70c0,
+	0x9200, 0x70c2, 0x080c, 0x83fd, 0x002e, 0x00ee, 0x0005, 0x0096,
+	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x009e,
+	0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071, 0x1910,
+	0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6c10, 0x782c, 0x908c,
+	0x0780, 0x190c, 0x6fdb, 0x8004, 0x8004, 0x8004, 0x9084, 0x0003,
+	0x0002, 0x6b3f, 0x6c10, 0x6b64, 0x6bab, 0x080c, 0x0dd5, 0x2071,
+	0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1170, 0x2071, 0x19f9,
+	0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e,
+	0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904,
+	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200,
+	0x70c2, 0x080c, 0x83fd, 0x0c10, 0x2071, 0x1800, 0x2900, 0x7822,
+	0xa804, 0x900d, 0x1580, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c,
 	0xd19c, 0x1148, 0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0218,
 	0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900,
-	0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8414, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x6fe2, 0xd0a4, 0x19f0, 0x0e04, 0x6d17, 0x7838,
-	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
-	0x0013, 0x00de, 0x2001, 0x1921, 0x200c, 0xc184, 0x2102, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2009,
-	0x1947, 0x200b, 0x0000, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2001,
-	0x1921, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x83fd, 0x782c, 0x9094,
+	0x0780, 0x190c, 0x6fdb, 0xd0a4, 0x19f0, 0x2071, 0x19f9, 0x703c,
+	0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
+	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2,
+	0x080c, 0x83fd, 0x0800, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2,
+	0x080c, 0x83fd, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd0a4,
+	0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd09c,
+	0x11a0, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x1560, 0x2071,
+	0x19f9, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e, 0x2908, 0x7010,
+	0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008,
+	0x711e, 0x2148, 0xa804, 0x900d, 0x1170, 0x2071, 0x19f9, 0x703c,
+	0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
+	0x9200, 0x70c2, 0x080c, 0x83fd, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6c65,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd09c, 0x1198, 0x701c,
+	0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800,
+	0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb,
+	0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd0a4,
+	0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802,
+	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x83fd, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x6fdb, 0xd0a4, 0x1d60, 0x00ee, 0x2071,
+	0x19f9, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800,
 	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8414, 0x0804,
-	0x6cd3, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8414,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6fe2, 0xd0a4, 0x1d60, 0x00ee,
-	0x0e04, 0x6d75, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
-	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084, 0x7046,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b,
-	0x2009, 0x1947, 0x200b, 0x0000, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6fe2, 0xd09c, 0x1170, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d,
-	0x11e0, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046,
-	0x0c58, 0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
-	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
-	0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016,
+	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x83fd, 0x00ee,
+	0x0804, 0x6c20, 0xa868, 0xd0fc, 0x1560, 0x0096, 0xa804, 0xa807,
+	0x0000, 0x904d, 0x190c, 0x0fb1, 0x009e, 0x0018, 0xa868, 0xd0fc,
+	0x1500, 0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050,
+	0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6d9f,
+	0x782c, 0x908c, 0x0780, 0x190c, 0x6fdb, 0x8004, 0x8004, 0x8004,
+	0x9084, 0x0003, 0x0002, 0x6caa, 0x6d9f, 0x6cc5, 0x6d32, 0x080c,
+	0x0dd5, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d,
+	0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
+	0x9200, 0x70c2, 0x080c, 0x83fd, 0x0c60, 0x2071, 0x1800, 0x2900,
+	0x7822, 0xa804, 0x900d, 0x1904, 0x6d21, 0x7830, 0x8007, 0x9084,
+	0x001f, 0x9082, 0x0001, 0x1220, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009,
+	0x1830, 0x210c, 0x918a, 0x0020, 0x0218, 0x7022, 0x00ee, 0x0058,
+	0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000,
+	0x70c2, 0x080c, 0x83fd, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb,
+	0xd0a4, 0x19f0, 0x0e04, 0x6d18, 0x7838, 0x7938, 0x910e, 0x1de0,
+	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2001,
+	0x1921, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x119b, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x2001, 0x1921, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
+	0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x83fd,
+	0x0804, 0x6cd8, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
+	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
+	0x83fd, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd0a4, 0x1d60,
+	0x00ee, 0x0e04, 0x6d72, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
+	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084,
+	0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x119b, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd09c, 0x1170,
+	0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e, 0x2908,
+	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
+	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
+	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200,
+	0x70c2, 0x080c, 0x83fd, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908,
+	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
+	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6e0c, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x6fdb, 0xd09c, 0x11b0, 0x701c, 0x904d,
+	0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001, 0x7012, 0x1108,
+	0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6fdb, 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6fdb, 0xd0a4, 0x05a8, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
+	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
+	0x83fd, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd0a4, 0x1d60,
+	0x00ee, 0x0e04, 0x6e05, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
+	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084,
+	0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x119b, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046,
+	0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016,
 	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8414, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
-	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
-	0x1904, 0x6e13, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe2, 0xd09c,
-	0x11b0, 0x701c, 0x904d, 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010,
-	0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6fe2, 0xd09c, 0x0d50, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6fe2, 0xd0a4, 0x05c8, 0x00e6, 0x7824,
-	0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
-	0x8000, 0x70c2, 0x080c, 0x8414, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6fe2, 0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x6e0c, 0x7838, 0x7938,
-	0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013,
-	0x00de, 0x7044, 0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x119b, 0x2009, 0x1947, 0x200b, 0x0000,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70c0, 0x9200, 0x70c2, 0x080c, 0x8414, 0x00ee, 0x0804, 0x6db2,
-	0x2071, 0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012,
-	0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148,
-	0xa804, 0x900d, 0x1128, 0x1e04, 0x6e53, 0x002e, 0x00ee, 0x0005,
-	0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
-	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c,
-	0x8414, 0x0e04, 0x6e3d, 0x2071, 0x1910, 0x701c, 0x2048, 0xa84c,
-	0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c,
-	0x7086, 0x7036, 0xa870, 0x708a, 0xa850, 0x9082, 0x0019, 0x1278,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b,
-	0x2071, 0x1910, 0x080c, 0x6fce, 0x002e, 0x00ee, 0x0005, 0xa850,
-	0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6,
-	0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868,
-	0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003,
-	0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2071, 0x1910,
-	0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
-	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
-	0x1118, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70c0, 0x9200, 0x70c2, 0x080c, 0x8414, 0x002e, 0x00ee, 0x0005,
-	0x0006, 0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860,
-	0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e,
-	0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071,
-	0x1910, 0x7004, 0x0002, 0x6ee1, 0x6ee2, 0x6fcd, 0x6ee2, 0x0dd5,
-	0x6fcd, 0x0005, 0x2001, 0x1948, 0x2004, 0x0002, 0x6eec, 0x6eec,
-	0x6f66, 0x6f67, 0x6eec, 0x6f67, 0x0126, 0x2091, 0x8000, 0x1e0c,
-	0x6fed, 0x701c, 0x904d, 0x0508, 0xa84c, 0x9005, 0x0904, 0x6f37,
-	0x0e04, 0x6f15, 0xa94c, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032,
+	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x83fd, 0x00ee, 0x0804,
+	0x6daf, 0x2071, 0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000,
+	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
+	0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6e4c, 0x002e, 0x00ee,
+	0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
+	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2,
+	0x080c, 0x83fd, 0x0e04, 0x6e36, 0x2071, 0x1910, 0x701c, 0x2048,
+	0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032,
 	0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0xa850, 0x9082, 0x0019,
 	0x1278, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x119b, 0x2071, 0x1910, 0x080c, 0x6fce, 0x012e, 0x0804, 0x6f65,
+	0x119b, 0x2071, 0x1910, 0x080c, 0x6fc7, 0x002e, 0x00ee, 0x0005,
 	0xa850, 0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146,
 	0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a,
 	0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098,
-	0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2001,
-	0x005b, 0x2004, 0x9094, 0x0780, 0x190c, 0x6fe2, 0xd09c, 0x2071,
-	0x1910, 0x1510, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964, 0x9184,
-	0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101,
-	0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de,
-	0x2071, 0x1910, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800,
-	0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x00d6,
-	0x2008, 0x2069, 0x19fa, 0x683c, 0x9005, 0x0760, 0x0158, 0x9186,
-	0x0003, 0x0540, 0x2001, 0x1815, 0x2004, 0x2009, 0x1ac8, 0x210c,
-	0x9102, 0x1500, 0x0126, 0x2091, 0x8000, 0x2069, 0x0050, 0x693c,
-	0x6838, 0x9106, 0x0190, 0x0e04, 0x6f99, 0x2069, 0x0000, 0x6837,
-	0x8040, 0x6833, 0x0012, 0x6883, 0x8040, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2069, 0x19fa, 0x683f,
-	0xffff, 0x012e, 0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x705e,
-	0x701c, 0x904d, 0x0540, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780,
-	0x15c9, 0xd09c, 0x1500, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964,
+	0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2071,
+	0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
+	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
+	0x900d, 0x1118, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016,
+	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
+	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x83fd, 0x002e, 0x00ee,
+	0x0005, 0x0006, 0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9, 0x001c,
+	0xa860, 0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006, 0x4004,
+	0x000e, 0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005,
+	0x2071, 0x1910, 0x7004, 0x0002, 0x6eda, 0x6edb, 0x6fc6, 0x6edb,
+	0x0dd5, 0x6fc6, 0x0005, 0x2001, 0x1947, 0x2004, 0x0002, 0x6ee5,
+	0x6ee5, 0x6f5f, 0x6f60, 0x6ee5, 0x6f60, 0x0126, 0x2091, 0x8000,
+	0x1e0c, 0x6fe6, 0x701c, 0x904d, 0x0508, 0xa84c, 0x9005, 0x0904,
+	0x6f30, 0x0e04, 0x6f0e, 0xa94c, 0x2071, 0x0000, 0x7182, 0xa850,
+	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0xa850, 0x9082,
+	0x0019, 0x1278, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x119b, 0x2071, 0x1910, 0x080c, 0x6fc7, 0x012e, 0x0804,
+	0x6f5e, 0xa850, 0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, 0x7036,
+	0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1,
+	0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021,
+	0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890,
+	0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd09c,
+	0x2071, 0x1910, 0x1510, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964,
 	0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff,
 	0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822,
-	0x00de, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e,
-	0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x701c, 0x904d, 0x0160, 0x7010, 0x8001, 0x7012, 0xa800,
-	0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x080c, 0x1031, 0x0005,
-	0x012e, 0x0005, 0x2091, 0x8000, 0x0e04, 0x6fe4, 0x0006, 0x0016,
-	0x2001, 0x8004, 0x0006, 0x0804, 0x0dde, 0x0096, 0x00f6, 0x2079,
-	0x0050, 0x7044, 0xd084, 0x01e0, 0xc084, 0x7046, 0x7838, 0x7938,
-	0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013,
-	0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x119b, 0x2009, 0x1947, 0x200b, 0x0000, 0x00fe, 0x009e, 0x0005,
-	0x782c, 0x9094, 0x0780, 0x1971, 0xd0a4, 0x0db8, 0x2009, 0x1947,
-	0x2104, 0x8000, 0x200a, 0x9082, 0x000f, 0x0e78, 0x00e6, 0x2071,
-	0x1800, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148,
-	0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0218, 0x7022, 0x00ee,
-	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
-	0x8000, 0x70c2, 0x080c, 0x8414, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6fe2, 0xd0a4, 0x19f0, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
-	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2009, 0x1947,
-	0x200b, 0x0000, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x00f6, 0x2079,
-	0x0050, 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046, 0x7838, 0x7938,
-	0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013,
-	0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x119b, 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe2,
-	0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x2048, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8414,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6fe2, 0xd0a4, 0x1d70, 0x00d6,
-	0x2069, 0x0050, 0x693c, 0x2069, 0x1948, 0x6808, 0x690a, 0x2069,
-	0x19fa, 0x9102, 0x1118, 0x683c, 0x9005, 0x1328, 0x2001, 0x1949,
-	0x200c, 0x810d, 0x693e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x7098,
-	0x908a, 0x0029, 0x1a0c, 0x0dd5, 0x9082, 0x001d, 0x001b, 0x6027,
-	0x1e00, 0x0005, 0x7186, 0x710c, 0x7128, 0x7152, 0x7175, 0x71b5,
-	0x71c7, 0x7128, 0x719d, 0x70c7, 0x70f5, 0x70c6, 0x0005, 0x00d6,
-	0x2069, 0x0200, 0x6804, 0x9005, 0x1180, 0x6808, 0x9005, 0x1518,
-	0x709b, 0x0028, 0x2069, 0x198f, 0x2d04, 0x7002, 0x080c, 0x74f6,
-	0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, 0x709b, 0x0028, 0x2069,
-	0x198f, 0x2d04, 0x7002, 0x6028, 0x9085, 0x0600, 0x602a, 0x00e6,
-	0x0036, 0x0046, 0x0056, 0x2071, 0x1a62, 0x080c, 0x1aa9, 0x005e,
-	0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069, 0x0200,
-	0x6804, 0x9005, 0x1178, 0x6808, 0x9005, 0x1160, 0x709b, 0x0028,
-	0x2069, 0x198f, 0x2d04, 0x7002, 0x080c, 0x7591, 0x6028, 0x9085,
-	0x0600, 0x602a, 0x00de, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c,
-	0x2cef, 0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x7234, 0xd1d4,
-	0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x709b, 0x0020, 0x080c,
-	0x7234, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005,
-	0x2001, 0x0088, 0x080c, 0x2cef, 0x6124, 0xd1cc, 0x11e8, 0xd1dc,
-	0x11c0, 0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c, 0x1ad3,
-	0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x73e8, 0x2001,
-	0x0080, 0x080c, 0x2cef, 0x709b, 0x0028, 0x0058, 0x709b, 0x001e,
-	0x0040, 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010, 0x709b,
-	0x001f, 0x0005, 0x080c, 0x1ad3, 0x60e3, 0x0001, 0x600c, 0xc0b4,
-	0x600e, 0x080c, 0x73e8, 0x2001, 0x0080, 0x080c, 0x2cef, 0x6124,
-	0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184, 0x1e00,
-	0x1158, 0x709b, 0x0028, 0x0040, 0x709b, 0x001e, 0x0028, 0x709b,
-	0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x2001, 0x00a0, 0x080c,
-	0x2cef, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c, 0x1ad3,
-	0x709b, 0x001e, 0x0010, 0x709b, 0x001d, 0x0005, 0x080c, 0x72b7,
-	0x6124, 0xd1dc, 0x1188, 0x080c, 0x7234, 0x0016, 0x080c, 0x1ad3,
-	0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x709b, 0x001e, 0x0020,
-	0x709b, 0x001f, 0x080c, 0x7234, 0x0005, 0x0006, 0x2001, 0x00a0,
-	0x080c, 0x2cef, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc, 0x1150,
-	0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028, 0x709b,
-	0x001d, 0x0010, 0x709b, 0x0021, 0x0005, 0x080c, 0x72b7, 0x6124,
-	0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e,
-	0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x0006,
-	0x2001, 0x0090, 0x080c, 0x2cef, 0x000e, 0x6124, 0xd1d4, 0x1178,
-	0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x709b, 0x001e,
-	0x0040, 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010, 0x709b,
-	0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061,
-	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x080c,
-	0x73bc, 0x11d8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01b0, 0xc1b4,
-	0x2102, 0x6027, 0x0200, 0x080c, 0x2c38, 0x6024, 0xd0cc, 0x0148,
-	0x2001, 0x00a0, 0x080c, 0x2cef, 0x080c, 0x76a4, 0x080c, 0x601a,
-	0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x73d6, 0x0150,
-	0x080c, 0x73cd, 0x1138, 0x2001, 0x0001, 0x080c, 0x27ea, 0x080c,
-	0x7394, 0x00a0, 0x080c, 0x72b4, 0x0178, 0x2001, 0x0001, 0x080c,
-	0x27ea, 0x7098, 0x9086, 0x001e, 0x0120, 0x7098, 0x9086, 0x0022,
-	0x1118, 0x709b, 0x0025, 0x0010, 0x709b, 0x0021, 0x012e, 0x00ee,
-	0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x7245, 0x080c,
-	0x85cd, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011, 0x7245,
-	0x080c, 0x85c4, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6, 0x0016,
-	0x080c, 0xa273, 0x2071, 0x1800, 0x080c, 0x71e2, 0x001e, 0x00fe,
-	0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6,
-	0x00f6, 0x0126, 0x080c, 0xa273, 0x2061, 0x0100, 0x2069, 0x0140,
-	0x2071, 0x1800, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a, 0x2011,
-	0x0003, 0x080c, 0xa653, 0x2011, 0x0002, 0x080c, 0xa65d, 0x080c,
-	0xa540, 0x080c, 0x8579, 0x0036, 0x901e, 0x080c, 0xa5b6, 0x003e,
-	0x60e3, 0x0000, 0x080c, 0xe9e9, 0x080c, 0xea04, 0x2009, 0x0004,
-	0x080c, 0x2c3e, 0x080c, 0x2b59, 0x2001, 0x1800, 0x2003, 0x0004,
-	0x6027, 0x0008, 0x2011, 0x7245, 0x080c, 0x85cd, 0x080c, 0x73d6,
-	0x0118, 0x9006, 0x080c, 0x2cef, 0x080c, 0x0bae, 0x2001, 0x0001,
-	0x080c, 0x27ea, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x003e,
-	0x002e, 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x7252, 0x2071,
-	0x19fa, 0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110, 0x9085,
-	0x0001, 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005, 0x6800,
-	0x9084, 0xfffe, 0x9086, 0x00c0, 0x0170, 0x2001, 0x00c0, 0x080c,
-	0x2cef, 0x0156, 0x20a9, 0x002d, 0x1d04, 0x72c4, 0x2091, 0x6000,
-	0x1f04, 0x72c4, 0x015e, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061,
-	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x76b3, 0x2001,
-	0x196d, 0x2003, 0x0000, 0x9006, 0x709a, 0x60e2, 0x6886, 0x080c,
-	0x28b2, 0x9006, 0x080c, 0x2cef, 0x080c, 0x5ed9, 0x6027, 0xffff,
-	0x602b, 0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6,
-	0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2001,
-	0x197d, 0x200c, 0x9186, 0x0000, 0x0158, 0x9186, 0x0001, 0x0158,
-	0x9186, 0x0002, 0x0158, 0x9186, 0x0003, 0x0158, 0x0804, 0x7384,
-	0x709b, 0x0022, 0x0040, 0x709b, 0x0021, 0x0028, 0x709b, 0x0023,
-	0x0010, 0x709b, 0x0024, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001,
-	0x0001, 0x080c, 0x28b2, 0x0026, 0x080c, 0xadd2, 0x002e, 0x7000,
-	0x908e, 0x0004, 0x0118, 0x602b, 0x0028, 0x0010, 0x602b, 0x0020,
-	0x0156, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac,
-	0x0150, 0x012e, 0x015e, 0x080c, 0xd230, 0x0118, 0x9006, 0x080c,
-	0x2d19, 0x0804, 0x7390, 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802,
-	0x080c, 0x2c38, 0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c,
-	0x2cef, 0x1f04, 0x732e, 0x080c, 0x7413, 0x012e, 0x015e, 0x080c,
-	0x73cd, 0x01a8, 0x6044, 0x9005, 0x0168, 0x6050, 0x0006, 0x9085,
-	0x0020, 0x6052, 0x080c, 0x7413, 0x9006, 0x8001, 0x1df0, 0x000e,
-	0x6052, 0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c, 0x7413, 0x080c,
-	0xd230, 0x0118, 0x9006, 0x080c, 0x2d19, 0x0016, 0x0026, 0x7000,
-	0x908e, 0x0004, 0x0130, 0x2009, 0x00c8, 0x2011, 0x7252, 0x080c,
-	0x858b, 0x002e, 0x001e, 0x080c, 0x840b, 0x7034, 0xc085, 0x7036,
-	0x2001, 0x197d, 0x2003, 0x0004, 0x080c, 0x70af, 0x080c, 0x73cd,
-	0x0138, 0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, 0x76a9,
-	0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061,
-	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x8422, 0x080c,
-	0x8414, 0x080c, 0x76b3, 0x2001, 0x196d, 0x2003, 0x0000, 0x9006,
-	0x709a, 0x60e2, 0x6886, 0x080c, 0x28b2, 0x9006, 0x080c, 0x2cef,
-	0x6043, 0x0090, 0x6043, 0x0010, 0x6027, 0xffff, 0x602b, 0x182f,
-	0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006, 0x2001, 0x197c, 0x2004,
-	0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c, 0x56d3, 0x9084,
-	0x0030, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x080c, 0x56d3,
-	0x9084, 0x0030, 0x9086, 0x0030, 0x000e, 0x0005, 0x0006, 0x080c,
-	0x56d3, 0x9084, 0x0030, 0x9086, 0x0010, 0x000e, 0x0005, 0x0006,
-	0x080c, 0x56d3, 0x9084, 0x0030, 0x9086, 0x0020, 0x000e, 0x0005,
-	0x0036, 0x0016, 0x2001, 0x180c, 0x2004, 0x908c, 0x0013, 0x0180,
-	0x0020, 0x080c, 0x28d2, 0x900e, 0x0028, 0x080c, 0x696a, 0x1dc8,
-	0x2009, 0x0002, 0x2019, 0x0028, 0x080c, 0x318a, 0x9006, 0x0019,
-	0x001e, 0x003e, 0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130,
-	0x080c, 0xd229, 0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef,
-	0x2072, 0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c,
-	0x0006, 0x6004, 0x0006, 0x6028, 0x0006, 0x0016, 0x6138, 0x6050,
-	0x9084, 0xfbff, 0x9085, 0x2000, 0x6052, 0x613a, 0x20a9, 0x0012,
-	0x1d04, 0x7428, 0x2091, 0x6000, 0x1f04, 0x7428, 0x602f, 0x0100,
-	0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfff, 0x6052,
-	0x613a, 0x001e, 0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x602a,
-	0x000e, 0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000,
-	0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x28b2, 0x2001, 0x00a0,
-	0x0006, 0x080c, 0xd230, 0x000e, 0x0130, 0x080c, 0x2d0d, 0x9006,
-	0x080c, 0x2d19, 0x0010, 0x080c, 0x2cef, 0x000e, 0x6052, 0x6050,
-	0x0006, 0xc0e5, 0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x2bad,
-	0x00fe, 0x000e, 0x6052, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036,
-	0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071,
-	0x1800, 0x6020, 0x9084, 0x0080, 0x0138, 0x2001, 0x180c, 0x200c,
-	0xc1c5, 0x2102, 0x0804, 0x74e8, 0x2001, 0x180c, 0x200c, 0xc1c4,
-	0x2102, 0x6028, 0x9084, 0xe1ff, 0x602a, 0x6027, 0x0200, 0x2001,
-	0x0090, 0x080c, 0x2cef, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1518,
-	0x1d04, 0x7495, 0x2091, 0x6000, 0x1f04, 0x7495, 0x2011, 0x0003,
-	0x080c, 0xa653, 0x2011, 0x0002, 0x080c, 0xa65d, 0x080c, 0xa540,
-	0x901e, 0x080c, 0xa5b6, 0x2001, 0x00a0, 0x080c, 0x2cef, 0x080c,
-	0x76a4, 0x080c, 0x601a, 0x080c, 0xd230, 0x0110, 0x080c, 0x0d45,
-	0x9085, 0x0001, 0x0498, 0x86ff, 0x1110, 0x080c, 0x1ad3, 0x60e3,
-	0x0000, 0x2001, 0x196d, 0x2004, 0x080c, 0x28b2, 0x60e2, 0x2001,
-	0x0080, 0x080c, 0x2cef, 0x20a9, 0x0366, 0x6027, 0x1e00, 0x2009,
-	0x1e00, 0x080c, 0x2c38, 0x6024, 0x910c, 0x0138, 0x1d04, 0x74cd,
-	0x2091, 0x6000, 0x1f04, 0x74cd, 0x0808, 0x6028, 0x9085, 0x1e00,
-	0x602a, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886,
-	0x080c, 0xd230, 0x0110, 0x080c, 0x0d45, 0x9006, 0x00ee, 0x00de,
-	0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016,
-	0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071,
-	0x1800, 0x7000, 0x9086, 0x0003, 0x1168, 0x2001, 0x020b, 0x2004,
-	0x9084, 0x5540, 0x9086, 0x5540, 0x1128, 0x2069, 0x1a79, 0x2d04,
-	0x8000, 0x206a, 0x2069, 0x0140, 0x6020, 0x9084, 0x00c0, 0x0120,
-	0x6884, 0x9005, 0x1904, 0x755b, 0x2001, 0x0088, 0x080c, 0x2cef,
-	0x9006, 0x60e2, 0x6886, 0x080c, 0x28b2, 0x2069, 0x0200, 0x6804,
-	0x9005, 0x1118, 0x6808, 0x9005, 0x01c0, 0x6028, 0x9084, 0xfbff,
-	0x602a, 0x6027, 0x0400, 0x2069, 0x198f, 0x7000, 0x206a, 0x709b,
-	0x0026, 0x7003, 0x0001, 0x20a9, 0x0002, 0x1d04, 0x753d, 0x2091,
-	0x6000, 0x1f04, 0x753d, 0x0804, 0x7589, 0x2069, 0x0140, 0x20a9,
-	0x0384, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c38, 0x6024,
-	0x910c, 0x0508, 0x9084, 0x1a00, 0x11f0, 0x1d04, 0x7549, 0x2091,
-	0x6000, 0x1f04, 0x7549, 0x2011, 0x0003, 0x080c, 0xa653, 0x2011,
-	0x0002, 0x080c, 0xa65d, 0x080c, 0xa540, 0x901e, 0x080c, 0xa5b6,
-	0x2001, 0x00a0, 0x080c, 0x2cef, 0x080c, 0x76a4, 0x080c, 0x601a,
-	0x9085, 0x0001, 0x00b0, 0x2001, 0x0080, 0x080c, 0x2cef, 0x2069,
+	0x00de, 0x2071, 0x1910, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012,
+	0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005,
+	0x00d6, 0x2008, 0x2069, 0x19f9, 0x683c, 0x9005, 0x0760, 0x0158,
+	0x9186, 0x0003, 0x0540, 0x2001, 0x1815, 0x2004, 0x2009, 0x1ac7,
+	0x210c, 0x9102, 0x1500, 0x0126, 0x2091, 0x8000, 0x2069, 0x0050,
+	0x693c, 0x6838, 0x9106, 0x0190, 0x0e04, 0x6f92, 0x2069, 0x0000,
+	0x6837, 0x8040, 0x6833, 0x0012, 0x6883, 0x8040, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2069, 0x19f9,
+	0x683f, 0xffff, 0x012e, 0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c,
+	0x7047, 0x701c, 0x904d, 0x0540, 0x2001, 0x005b, 0x2004, 0x9094,
+	0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071, 0x1910, 0x700f, 0x0001,
+	0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c,
+	0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050,
+	0x6822, 0x00de, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800,
+	0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x701c, 0x904d, 0x0160, 0x7010, 0x8001, 0x7012,
+	0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x080c, 0x1031,
+	0x0005, 0x012e, 0x0005, 0x2091, 0x8000, 0x0e04, 0x6fdd, 0x0006,
+	0x0016, 0x2001, 0x8004, 0x0006, 0x0804, 0x0dde, 0x0096, 0x00f6,
+	0x2079, 0x0050, 0x7044, 0xd084, 0x01c0, 0xc084, 0x7046, 0x7838,
+	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
+	0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x119b, 0x00fe, 0x009e, 0x0005, 0x782c, 0x9094, 0x0780,
+	0x1991, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x00e6,
+	0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009, 0x1830, 0x210c,
+	0x918a, 0x0020, 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048,
+	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
+	0x83fd, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd0a4, 0x19f0,
+	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
+	0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x190c, 0x119b, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x00f6,
+	0x2079, 0x0050, 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046, 0x7838,
+	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
+	0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x119b, 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6fdb, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x2048,
+	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
+	0x83fd, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fdb, 0xd0a4, 0x1d70,
+	0x00d6, 0x2069, 0x0050, 0x693c, 0x2069, 0x1947, 0x6808, 0x690a,
+	0x2069, 0x19f9, 0x9102, 0x1118, 0x683c, 0x9005, 0x1328, 0x2001,
+	0x1948, 0x200c, 0x810d, 0x693e, 0x00de, 0x00ee, 0x00fe, 0x0005,
+	0x7098, 0x908a, 0x0029, 0x1a0c, 0x0dd5, 0x9082, 0x001d, 0x001b,
+	0x6027, 0x1e00, 0x0005, 0x716f, 0x70f5, 0x7111, 0x713b, 0x715e,
+	0x719e, 0x71b0, 0x7111, 0x7186, 0x70b0, 0x70de, 0x70af, 0x0005,
+	0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1180, 0x6808, 0x9005,
+	0x1518, 0x709b, 0x0028, 0x2069, 0x198e, 0x2d04, 0x7002, 0x080c,
+	0x74df, 0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, 0x709b, 0x0028,
+	0x2069, 0x198e, 0x2d04, 0x7002, 0x6028, 0x9085, 0x0600, 0x602a,
+	0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a61, 0x080c, 0x1aab,
+	0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069,
+	0x0200, 0x6804, 0x9005, 0x1178, 0x6808, 0x9005, 0x1160, 0x709b,
+	0x0028, 0x2069, 0x198e, 0x2d04, 0x7002, 0x080c, 0x757a, 0x6028,
+	0x9085, 0x0600, 0x602a, 0x00de, 0x0005, 0x0006, 0x2001, 0x0090,
+	0x080c, 0x2cf1, 0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x721d,
+	0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x709b, 0x0020,
+	0x080c, 0x721d, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f,
+	0x0005, 0x2001, 0x0088, 0x080c, 0x2cf1, 0x6124, 0xd1cc, 0x11e8,
+	0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c,
+	0x1ad5, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x73d1,
+	0x2001, 0x0080, 0x080c, 0x2cf1, 0x709b, 0x0028, 0x0058, 0x709b,
+	0x001e, 0x0040, 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010,
+	0x709b, 0x001f, 0x0005, 0x080c, 0x1ad5, 0x60e3, 0x0001, 0x600c,
+	0xc0b4, 0x600e, 0x080c, 0x73d1, 0x2001, 0x0080, 0x080c, 0x2cf1,
+	0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184,
+	0x1e00, 0x1158, 0x709b, 0x0028, 0x0040, 0x709b, 0x001e, 0x0028,
+	0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x2001, 0x00a0,
+	0x080c, 0x2cf1, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c,
+	0x1ad5, 0x709b, 0x001e, 0x0010, 0x709b, 0x001d, 0x0005, 0x080c,
+	0x72a0, 0x6124, 0xd1dc, 0x1188, 0x080c, 0x721d, 0x0016, 0x080c,
+	0x1ad5, 0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x709b, 0x001e,
+	0x0020, 0x709b, 0x001f, 0x080c, 0x721d, 0x0005, 0x0006, 0x2001,
+	0x00a0, 0x080c, 0x2cf1, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc,
+	0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028,
+	0x709b, 0x001d, 0x0010, 0x709b, 0x0021, 0x0005, 0x080c, 0x72a0,
+	0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b,
+	0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005,
+	0x0006, 0x2001, 0x0090, 0x080c, 0x2cf1, 0x000e, 0x6124, 0xd1d4,
+	0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x709b,
+	0x001e, 0x0040, 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010,
+	0x709b, 0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000,
+	0x080c, 0x73a5, 0x11d8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01b0,
+	0xc1b4, 0x2102, 0x6027, 0x0200, 0x080c, 0x2c3a, 0x6024, 0xd0cc,
+	0x0148, 0x2001, 0x00a0, 0x080c, 0x2cf1, 0x080c, 0x768d, 0x080c,
+	0x6023, 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x73bf,
+	0x0150, 0x080c, 0x73b6, 0x1138, 0x2001, 0x0001, 0x080c, 0x27ec,
+	0x080c, 0x737d, 0x00a0, 0x080c, 0x729d, 0x0178, 0x2001, 0x0001,
+	0x080c, 0x27ec, 0x7098, 0x9086, 0x001e, 0x0120, 0x7098, 0x9086,
+	0x0022, 0x1118, 0x709b, 0x0025, 0x0010, 0x709b, 0x0021, 0x012e,
+	0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x722e,
+	0x080c, 0x85b6, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011,
+	0x722e, 0x080c, 0x85ad, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6,
+	0x0016, 0x080c, 0xa274, 0x2071, 0x1800, 0x080c, 0x71cb, 0x001e,
+	0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
+	0x00e6, 0x00f6, 0x0126, 0x080c, 0xa274, 0x2061, 0x0100, 0x2069,
+	0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a,
+	0x2011, 0x0003, 0x080c, 0xa654, 0x2011, 0x0002, 0x080c, 0xa65e,
+	0x080c, 0xa541, 0x080c, 0x8562, 0x0036, 0x901e, 0x080c, 0xa5b7,
+	0x003e, 0x60e3, 0x0000, 0x080c, 0xea0a, 0x080c, 0xea25, 0x2009,
+	0x0004, 0x080c, 0x2c40, 0x080c, 0x2b5b, 0x2001, 0x1800, 0x2003,
+	0x0004, 0x6027, 0x0008, 0x2011, 0x722e, 0x080c, 0x85b6, 0x080c,
+	0x73bf, 0x0118, 0x9006, 0x080c, 0x2cf1, 0x080c, 0x0bae, 0x2001,
+	0x0001, 0x080c, 0x27ec, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce,
+	0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x723b,
+	0x2071, 0x19f9, 0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110,
+	0x9085, 0x0001, 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005,
+	0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0, 0x0170, 0x2001, 0x00c0,
+	0x080c, 0x2cf1, 0x0156, 0x20a9, 0x002d, 0x1d04, 0x72ad, 0x2091,
+	0x6000, 0x1f04, 0x72ad, 0x015e, 0x0005, 0x00c6, 0x00d6, 0x00e6,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x769c,
+	0x2001, 0x196c, 0x2003, 0x0000, 0x9006, 0x709a, 0x60e2, 0x6886,
+	0x080c, 0x28b4, 0x9006, 0x080c, 0x2cf1, 0x080c, 0x5ee2, 0x6027,
+	0xffff, 0x602b, 0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6,
+	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800,
+	0x2001, 0x197c, 0x200c, 0x9186, 0x0000, 0x0158, 0x9186, 0x0001,
+	0x0158, 0x9186, 0x0002, 0x0158, 0x9186, 0x0003, 0x0158, 0x0804,
+	0x736d, 0x709b, 0x0022, 0x0040, 0x709b, 0x0021, 0x0028, 0x709b,
+	0x0023, 0x0010, 0x709b, 0x0024, 0x60e3, 0x0000, 0x6887, 0x0001,
+	0x2001, 0x0001, 0x080c, 0x28b4, 0x0026, 0x080c, 0xade2, 0x002e,
+	0x7000, 0x908e, 0x0004, 0x0118, 0x602b, 0x0028, 0x0010, 0x602b,
+	0x0020, 0x0156, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x6024,
+	0xd0ac, 0x0150, 0x012e, 0x015e, 0x080c, 0xd24a, 0x0118, 0x9006,
+	0x080c, 0x2d1b, 0x0804, 0x7379, 0x6800, 0x9084, 0x00a1, 0xc0bd,
+	0x6802, 0x080c, 0x2c3a, 0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100,
+	0x080c, 0x2cf1, 0x1f04, 0x7317, 0x080c, 0x73fc, 0x012e, 0x015e,
+	0x080c, 0x73b6, 0x01a8, 0x6044, 0x9005, 0x0168, 0x6050, 0x0006,
+	0x9085, 0x0020, 0x6052, 0x080c, 0x73fc, 0x9006, 0x8001, 0x1df0,
+	0x000e, 0x6052, 0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c, 0x73fc,
+	0x080c, 0xd24a, 0x0118, 0x9006, 0x080c, 0x2d1b, 0x0016, 0x0026,
+	0x7000, 0x908e, 0x0004, 0x0130, 0x2009, 0x00c8, 0x2011, 0x723b,
+	0x080c, 0x8574, 0x002e, 0x001e, 0x080c, 0x83f4, 0x7034, 0xc085,
+	0x7036, 0x2001, 0x197c, 0x2003, 0x0004, 0x080c, 0x7098, 0x080c,
+	0x73b6, 0x0138, 0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c,
+	0x7692, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x840b,
+	0x080c, 0x83fd, 0x080c, 0x769c, 0x2001, 0x196c, 0x2003, 0x0000,
+	0x9006, 0x709a, 0x60e2, 0x6886, 0x080c, 0x28b4, 0x9006, 0x080c,
+	0x2cf1, 0x6043, 0x0090, 0x6043, 0x0010, 0x6027, 0xffff, 0x602b,
+	0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006, 0x2001, 0x197b,
+	0x2004, 0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c, 0x56dc,
+	0x9084, 0x0030, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x080c,
+	0x56dc, 0x9084, 0x0030, 0x9086, 0x0030, 0x000e, 0x0005, 0x0006,
+	0x080c, 0x56dc, 0x9084, 0x0030, 0x9086, 0x0010, 0x000e, 0x0005,
+	0x0006, 0x080c, 0x56dc, 0x9084, 0x0030, 0x9086, 0x0020, 0x000e,
+	0x0005, 0x0036, 0x0016, 0x2001, 0x180c, 0x2004, 0x908c, 0x0013,
+	0x0180, 0x0020, 0x080c, 0x28d4, 0x900e, 0x0028, 0x080c, 0x6973,
+	0x1dc8, 0x2009, 0x0002, 0x2019, 0x0028, 0x080c, 0x318c, 0x9006,
+	0x0019, 0x001e, 0x003e, 0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04,
+	0x0130, 0x080c, 0xd243, 0x1128, 0x9085, 0x0010, 0x0010, 0x9084,
+	0xffef, 0x2072, 0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec, 0x0006,
+	0x600c, 0x0006, 0x6004, 0x0006, 0x6028, 0x0006, 0x0016, 0x6138,
+	0x6050, 0x9084, 0xfbff, 0x9085, 0x2000, 0x6052, 0x613a, 0x20a9,
+	0x0012, 0x1d04, 0x7411, 0x2091, 0x6000, 0x1f04, 0x7411, 0x602f,
+	0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfff,
+	0x6052, 0x613a, 0x001e, 0x602f, 0x0040, 0x602f, 0x0000, 0x000e,
+	0x602a, 0x000e, 0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3,
+	0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x28b4, 0x2001,
+	0x00a0, 0x0006, 0x080c, 0xd24a, 0x000e, 0x0130, 0x080c, 0x2d0f,
+	0x9006, 0x080c, 0x2d1b, 0x0010, 0x080c, 0x2cf1, 0x000e, 0x6052,
+	0x6050, 0x0006, 0xc0e5, 0x6052, 0x00f6, 0x2079, 0x0100, 0x080c,
+	0x2baf, 0x00fe, 0x000e, 0x6052, 0x0005, 0x0156, 0x0016, 0x0026,
+	0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140,
+	0x2071, 0x1800, 0x6020, 0x9084, 0x0080, 0x0138, 0x2001, 0x180c,
+	0x200c, 0xc1c5, 0x2102, 0x0804, 0x74d1, 0x2001, 0x180c, 0x200c,
+	0xc1c4, 0x2102, 0x6028, 0x9084, 0xe1ff, 0x602a, 0x6027, 0x0200,
+	0x2001, 0x0090, 0x080c, 0x2cf1, 0x20a9, 0x0366, 0x6024, 0xd0cc,
+	0x1518, 0x1d04, 0x747e, 0x2091, 0x6000, 0x1f04, 0x747e, 0x2011,
+	0x0003, 0x080c, 0xa654, 0x2011, 0x0002, 0x080c, 0xa65e, 0x080c,
+	0xa541, 0x901e, 0x080c, 0xa5b7, 0x2001, 0x00a0, 0x080c, 0x2cf1,
+	0x080c, 0x768d, 0x080c, 0x6023, 0x080c, 0xd24a, 0x0110, 0x080c,
+	0x0d45, 0x9085, 0x0001, 0x0498, 0x86ff, 0x1110, 0x080c, 0x1ad5,
+	0x60e3, 0x0000, 0x2001, 0x196c, 0x2004, 0x080c, 0x28b4, 0x60e2,
+	0x2001, 0x0080, 0x080c, 0x2cf1, 0x20a9, 0x0366, 0x6027, 0x1e00,
+	0x2009, 0x1e00, 0x080c, 0x2c3a, 0x6024, 0x910c, 0x0138, 0x1d04,
+	0x74b6, 0x2091, 0x6000, 0x1f04, 0x74b6, 0x0808, 0x6028, 0x9085,
+	0x1e00, 0x602a, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008,
+	0x6886, 0x080c, 0xd24a, 0x0110, 0x080c, 0x0d45, 0x9006, 0x00ee,
+	0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156,
+	0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
+	0x2071, 0x1800, 0x7000, 0x9086, 0x0003, 0x1168, 0x2001, 0x020b,
+	0x2004, 0x9084, 0x5540, 0x9086, 0x5540, 0x1128, 0x2069, 0x1a78,
+	0x2d04, 0x8000, 0x206a, 0x2069, 0x0140, 0x6020, 0x9084, 0x00c0,
+	0x0120, 0x6884, 0x9005, 0x1904, 0x7544, 0x2001, 0x0088, 0x080c,
+	0x2cf1, 0x9006, 0x60e2, 0x6886, 0x080c, 0x28b4, 0x2069, 0x0200,
+	0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x01c0, 0x6028, 0x9084,
+	0xfbff, 0x602a, 0x6027, 0x0400, 0x2069, 0x198e, 0x7000, 0x206a,
+	0x709b, 0x0026, 0x7003, 0x0001, 0x20a9, 0x0002, 0x1d04, 0x7526,
+	0x2091, 0x6000, 0x1f04, 0x7526, 0x0804, 0x7572, 0x2069, 0x0140,
+	0x20a9, 0x0384, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c3a,
+	0x6024, 0x910c, 0x0508, 0x9084, 0x1a00, 0x11f0, 0x1d04, 0x7532,
+	0x2091, 0x6000, 0x1f04, 0x7532, 0x2011, 0x0003, 0x080c, 0xa654,
+	0x2011, 0x0002, 0x080c, 0xa65e, 0x080c, 0xa541, 0x901e, 0x080c,
+	0xa5b7, 0x2001, 0x00a0, 0x080c, 0x2cf1, 0x080c, 0x768d, 0x080c,
+	0x6023, 0x9085, 0x0001, 0x00b0, 0x2001, 0x0080, 0x080c, 0x2cf1,
+	0x2069, 0x0140, 0x60e3, 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887,
+	0x0001, 0x0008, 0x6886, 0x2001, 0x196c, 0x2004, 0x080c, 0x28b4,
+	0x60e2, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e,
+	0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
+	0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0,
+	0x01c8, 0x2011, 0x0003, 0x080c, 0xa654, 0x2011, 0x0002, 0x080c,
+	0xa65e, 0x080c, 0xa541, 0x901e, 0x080c, 0xa5b7, 0x2069, 0x0140,
+	0x2001, 0x00a0, 0x080c, 0x2cf1, 0x080c, 0x768d, 0x080c, 0x6023,
+	0x0804, 0x760d, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x1160, 0xc1b5,
+	0x2102, 0x080c, 0x7223, 0x2069, 0x0140, 0x2001, 0x0080, 0x080c,
+	0x2cf1, 0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118,
+	0x6808, 0x9005, 0x0180, 0x6028, 0x9084, 0xfdff, 0x602a, 0x6027,
+	0x0200, 0x2069, 0x198e, 0x7000, 0x206a, 0x709b, 0x0027, 0x7003,
+	0x0001, 0x0804, 0x760d, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c,
+	0x2c3a, 0x6024, 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04,
+	0x75cb, 0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x843c,
+	0x00ee, 0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0x19f9,
+	0x7018, 0x00ee, 0x9005, 0x19f8, 0x0500, 0x0026, 0x2011, 0x723b,
+	0x080c, 0x84dc, 0x2011, 0x722e, 0x080c, 0x85b6, 0x002e, 0x2069,
 	0x0140, 0x60e3, 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001,
-	0x0008, 0x6886, 0x2001, 0x196d, 0x2004, 0x080c, 0x28b2, 0x60e2,
-	0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e,
-	0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6,
-	0x2061, 0x0100, 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0, 0x01c8,
-	0x2011, 0x0003, 0x080c, 0xa653, 0x2011, 0x0002, 0x080c, 0xa65d,
-	0x080c, 0xa540, 0x901e, 0x080c, 0xa5b6, 0x2069, 0x0140, 0x2001,
-	0x00a0, 0x080c, 0x2cef, 0x080c, 0x76a4, 0x080c, 0x601a, 0x0804,
-	0x7624, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102,
-	0x080c, 0x723a, 0x2069, 0x0140, 0x2001, 0x0080, 0x080c, 0x2cef,
-	0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808,
-	0x9005, 0x0180, 0x6028, 0x9084, 0xfdff, 0x602a, 0x6027, 0x0200,
-	0x2069, 0x198f, 0x7000, 0x206a, 0x709b, 0x0027, 0x7003, 0x0001,
-	0x0804, 0x7624, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c38,
-	0x6024, 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04, 0x75e2,
-	0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x8453, 0x00ee,
-	0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0x19fa, 0x7018,
-	0x00ee, 0x9005, 0x19f8, 0x0500, 0x0026, 0x2011, 0x7252, 0x080c,
-	0x84f3, 0x2011, 0x7245, 0x080c, 0x85cd, 0x002e, 0x2069, 0x0140,
-	0x60e3, 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008,
-	0x6886, 0x2001, 0x196d, 0x2004, 0x080c, 0x28b2, 0x60e2, 0x2001,
-	0x180c, 0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x080c,
-	0xd229, 0x1904, 0x7692, 0x7130, 0xd184, 0x1170, 0x080c, 0x3319,
-	0x0138, 0xc18d, 0x7132, 0x2011, 0x1848, 0x2214, 0xd2ac, 0x1120,
-	0x7030, 0xd08c, 0x0904, 0x7692, 0x2011, 0x1848, 0x220c, 0xd1a4,
-	0x0538, 0x0016, 0x2019, 0x000e, 0x080c, 0xe522, 0x0156, 0x00b6,
-	0x20a9, 0x007f, 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080,
-	0x0188, 0x080c, 0x65ff, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009,
-	0x000e, 0x080c, 0xe5ae, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c,
-	0x86dd, 0x001e, 0x8108, 0x1f04, 0x765b, 0x00be, 0x015e, 0x001e,
-	0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c,
-	0x318a, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e,
-	0x080c, 0x65ff, 0x1110, 0x080c, 0x6034, 0x8108, 0x1f04, 0x7688,
-	0x00be, 0x015e, 0x080c, 0x1ad3, 0x080c, 0xadd2, 0x60e3, 0x0000,
-	0x080c, 0x601a, 0x080c, 0x72ee, 0x00ee, 0x00ce, 0x004e, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x197d, 0x2003, 0x0001,
-	0x0005, 0x2001, 0x197d, 0x2003, 0x0000, 0x0005, 0x2001, 0x197c,
-	0x2003, 0xaaaa, 0x0005, 0x2001, 0x197c, 0x2003, 0x0000, 0x0005,
-	0x2071, 0x18fa, 0x7003, 0x0000, 0x7007, 0x0000, 0x080c, 0x1018,
-	0x090c, 0x0dd5, 0xa8ab, 0xdcb0, 0x2900, 0x704e, 0x080c, 0x1018,
-	0x090c, 0x0dd5, 0xa8ab, 0xdcb0, 0x2900, 0x7052, 0xa867, 0x0000,
-	0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005, 0x00e6, 0x2071, 0x0040,
-	0x6848, 0x9005, 0x1118, 0x9085, 0x0001, 0x04b0, 0x6840, 0x9005,
-	0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002, 0x6854, 0x9101, 0x7006,
-	0x9006, 0x7012, 0x7016, 0x6850, 0x7002, 0x6854, 0x7006, 0x6858,
-	0x700a, 0x685c, 0x700e, 0x6840, 0x9005, 0x1110, 0x7012, 0x7016,
-	0x6848, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x2001, 0x0019,
-	0x7036, 0x702b, 0x0001, 0x2001, 0x0004, 0x200c, 0x918c, 0xfff7,
-	0x918d, 0x8000, 0x2102, 0x00d6, 0x2069, 0x18fa, 0x6807, 0x0001,
-	0x00de, 0x080c, 0x7c90, 0x9006, 0x00ee, 0x0005, 0x900e, 0x0156,
-	0x20a9, 0x0006, 0x8003, 0x2011, 0x0100, 0x2214, 0x9296, 0x0008,
-	0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x1f04, 0x771a, 0x015e,
-	0x0005, 0x2079, 0x0040, 0x2071, 0x18fa, 0x7004, 0x0002, 0x7739,
-	0x773a, 0x7771, 0x77cc, 0x78dc, 0x7737, 0x7737, 0x7906, 0x080c,
-	0x0dd5, 0x0005, 0x2079, 0x0040, 0x782c, 0x908c, 0x0780, 0x190c,
-	0x7d72, 0xd0a4, 0x01f0, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806,
-	0xa864, 0x9084, 0x00ff, 0x908a, 0x0040, 0x0608, 0x00b8, 0x2001,
-	0x1800, 0x200c, 0x9186, 0x0003, 0x1160, 0x7104, 0x9186, 0x0004,
-	0x0140, 0x9186, 0x0007, 0x0128, 0x9186, 0x0003, 0x19e8, 0x080c,
-	0x77cc, 0x782c, 0xd09c, 0x090c, 0x7c90, 0x0005, 0x9082, 0x005a,
-	0x1218, 0x2100, 0x003b, 0x0c18, 0x080c, 0x7802, 0x0c90, 0x00e3,
-	0x08f0, 0x0005, 0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x7802,
-	0x7802, 0x7802, 0x7824, 0x7802, 0x7802, 0x7802, 0x7802, 0x7802,
-	0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x7802,
-	0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x780e, 0x7802,
-	0x79f7, 0x7802, 0x7802, 0x7802, 0x7824, 0x7802, 0x780e, 0x7a38,
-	0x7a79, 0x7ac0, 0x7ad4, 0x7802, 0x7802, 0x7824, 0x780e, 0x7838,
-	0x7802, 0x78b0, 0x7b7f, 0x7b9a, 0x7802, 0x7824, 0x7802, 0x7838,
-	0x7802, 0x7802, 0x78a6, 0x7b9a, 0x7802, 0x7802, 0x7802, 0x7802,
-	0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x784c, 0x7802, 0x7802,
-	0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x7802, 0x7d16,
-	0x7802, 0x7cc0, 0x7802, 0x7cc0, 0x7802, 0x7861, 0x7802, 0x7802,
-	0x7802, 0x7802, 0x7802, 0x7802, 0x2079, 0x0040, 0x7004, 0x9086,
-	0x0003, 0x1198, 0x782c, 0x080c, 0x7cb9, 0xd0a4, 0x0170, 0x7824,
-	0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a,
-	0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c, 0x7c90, 0x0005,
-	0x7802, 0x780e, 0x79e3, 0x7802, 0x780e, 0x7802, 0x780e, 0x780e,
-	0x7802, 0x780e, 0x79e3, 0x780e, 0x780e, 0x780e, 0x780e, 0x780e,
-	0x7802, 0x780e, 0x79e3, 0x7802, 0x7802, 0x780e, 0x7802, 0x7802,
-	0x7802, 0x780e, 0x00e6, 0x2071, 0x18fa, 0x2009, 0x0400, 0x0071,
-	0x00ee, 0x0005, 0x2009, 0x1000, 0x0049, 0x0005, 0x2009, 0x2000,
-	0x0029, 0x0005, 0x2009, 0x0800, 0x0009, 0x0005, 0x7007, 0x0001,
-	0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6c81, 0x012e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff,
-	0x0d08, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7985, 0x7007,
-	0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7985, 0x0005,
-	0xa864, 0x8007, 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120, 0x7007,
-	0x0001, 0x0804, 0x79a0, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016,
-	0x701a, 0x704b, 0x79a0, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff,
-	0x0904, 0x780a, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x79bc,
-	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x79bc,
-	0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904,
-	0x780a, 0x7007, 0x0001, 0x2009, 0x1834, 0x210c, 0x81ff, 0x11a8,
-	0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c, 0x62ae,
-	0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0xa87a,
-	0xa982, 0x080c, 0x6c81, 0x012e, 0x0ca0, 0xa994, 0x9186, 0x0071,
-	0x0d38, 0x9186, 0x0064, 0x0d20, 0x9186, 0x007c, 0x0d08, 0x9186,
-	0x0028, 0x09f0, 0x9186, 0x0038, 0x09d8, 0x9186, 0x0078, 0x09c0,
-	0x9186, 0x005f, 0x09a8, 0x9186, 0x0056, 0x0990, 0xa897, 0x4005,
-	0xa89b, 0x0001, 0x2001, 0x0030, 0x900e, 0x08a0, 0xa87c, 0x9084,
-	0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x7bb1,
-	0x2900, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x0030, 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8, 0xa05c,
-	0x9080, 0x0023, 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082, 0x0401,
-	0x1a04, 0x7812, 0xaab4, 0x928a, 0x0002, 0x1a04, 0x7812, 0x82ff,
-	0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001, 0x7943, 0x0018,
-	0x9280, 0x7939, 0x2005, 0x7056, 0x7010, 0x9015, 0x0904, 0x7924,
-	0x080c, 0x1018, 0x1118, 0x7007, 0x0004, 0x0005, 0x2900, 0x7022,
-	0x7054, 0x2060, 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c, 0xe004,
-	0x9100, 0xa076, 0xa860, 0xa072, 0xe008, 0x920a, 0x1210, 0x900e,
-	0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004, 0x0108,
-	0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c, 0x10e9, 0xa06c, 0x908e,
-	0x0100, 0x0170, 0x9086, 0x0200, 0x0118, 0x7007, 0x0007, 0x0005,
-	0x7020, 0x2048, 0x080c, 0x1031, 0x7014, 0x2048, 0x0804, 0x7812,
-	0x7020, 0x2048, 0x7018, 0xa802, 0xa807, 0x0000, 0x2908, 0x2048,
-	0xa906, 0x711a, 0x0804, 0x78dc, 0x7014, 0x2048, 0x7007, 0x0001,
-	0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108, 0x00b9,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x0904, 0x7bb1, 0x0804,
-	0x7985, 0x793b, 0x793f, 0x0002, 0x001d, 0x0007, 0x0004, 0x000a,
-	0x001b, 0x0005, 0x0006, 0x000a, 0x001d, 0x0005, 0x0004, 0x0076,
-	0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2, 0xb0bc,
-	0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6, 0xb0b0,
-	0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2,
-	0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2, 0xb094,
-	0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096, 0xb088,
-	0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082, 0xb07c,
-	0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776, 0xb004,
-	0x9055, 0x1958, 0x006e, 0x007e, 0x0005, 0x2009, 0x1834, 0x210c,
-	0x81ff, 0x1178, 0x080c, 0x60ae, 0x1108, 0x0005, 0x080c, 0x6ec0,
-	0x0126, 0x2091, 0x8000, 0x080c, 0xce24, 0x080c, 0x6c81, 0x012e,
-	0x0ca0, 0x080c, 0xd229, 0x1d70, 0x2001, 0x0028, 0x900e, 0x0c70,
-	0x2009, 0x1834, 0x210c, 0x81ff, 0x1188, 0xa888, 0x9005, 0x0188,
-	0xa883, 0x0000, 0x080c, 0x613e, 0x1108, 0x0005, 0xa87a, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6c81, 0x012e, 0x0cb8, 0x2001, 0x0028,
-	0x0ca8, 0x2001, 0x0000, 0x0c90, 0x2009, 0x1834, 0x210c, 0x81ff,
-	0x11d8, 0xa888, 0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4,
-	0x0120, 0x080c, 0x6210, 0x1138, 0x0005, 0x9006, 0xa87a, 0x080c,
-	0x618b, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982,
-	0x080c, 0x6c81, 0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98,
-	0x2001, 0x0000, 0x0c80, 0x7018, 0xa802, 0x2908, 0x2048, 0xa906,
-	0x711a, 0x7010, 0x8001, 0x7012, 0x0118, 0x7007, 0x0003, 0x0030,
-	0x7014, 0x2048, 0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x00b6,
-	0x7007, 0x0001, 0xa974, 0xa878, 0x9084, 0x00ff, 0x9096, 0x0004,
-	0x0540, 0x20a9, 0x0001, 0x9096, 0x0001, 0x0190, 0x900e, 0x20a9,
-	0x0800, 0x9096, 0x0002, 0x0160, 0x9005, 0x11d8, 0xa974, 0x080c,
-	0x65ff, 0x11b8, 0x0066, 0xae80, 0x080c, 0x670f, 0x006e, 0x0088,
-	0x0046, 0x2011, 0x180c, 0x2224, 0xc484, 0x2412, 0x004e, 0x00c6,
-	0x080c, 0x65ff, 0x1110, 0x080c, 0x680f, 0x8108, 0x1f04, 0x7a20,
-	0x00ce, 0xa87c, 0xd084, 0x1120, 0x080c, 0x1031, 0x00be, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x6c81, 0x012e, 0x00be, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x696e, 0x0580,
-	0x2061, 0x1a71, 0x6100, 0xd184, 0x0178, 0xa888, 0x9084, 0x00ff,
-	0x1550, 0x6000, 0xd084, 0x0520, 0x6004, 0x9005, 0x1538, 0x6003,
-	0x0000, 0x600b, 0x0000, 0x00c8, 0x2011, 0x0001, 0xa890, 0x9005,
-	0x1110, 0x2001, 0x001e, 0x8000, 0x6016, 0xa888, 0x9084, 0x00ff,
-	0x0178, 0x6006, 0xa888, 0x8007, 0x9084, 0x00ff, 0x0148, 0x600a,
-	0xa888, 0x8000, 0x1108, 0xc28d, 0x6202, 0x012e, 0x0804, 0x7c7a,
-	0x012e, 0x0804, 0x7c74, 0x012e, 0x0804, 0x7c6e, 0x012e, 0x0804,
-	0x7c71, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x696e,
-	0x05e0, 0x2061, 0x1a71, 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308,
-	0xd08c, 0x1530, 0xac78, 0x9484, 0x0003, 0x0170, 0xa988, 0x918c,
-	0x00ff, 0x8001, 0x1120, 0x2100, 0x9210, 0x0620, 0x0028, 0x8001,
-	0x1508, 0x2100, 0x9212, 0x02f0, 0x9484, 0x000c, 0x0188, 0xa988,
-	0x810f, 0x918c, 0x00ff, 0x9082, 0x0004, 0x1120, 0x2100, 0x9318,
-	0x0288, 0x0030, 0x9082, 0x0004, 0x1168, 0x2100, 0x931a, 0x0250,
-	0xa890, 0x9005, 0x0110, 0x8000, 0x6016, 0x6206, 0x630a, 0x012e,
-	0x0804, 0x7c7a, 0x012e, 0x0804, 0x7c77, 0x012e, 0x0804, 0x7c74,
-	0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x2061, 0x1a71, 0x6300,
-	0xd38c, 0x1120, 0x6308, 0x8318, 0x0220, 0x630a, 0x012e, 0x0804,
-	0x7c88, 0x012e, 0x0804, 0x7c77, 0x00b6, 0x0126, 0x00c6, 0x2091,
-	0x8000, 0x7007, 0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061,
-	0x1a71, 0x6000, 0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888,
-	0x9005, 0x05d8, 0xa88c, 0x9065, 0x0598, 0x2001, 0x1834, 0x2004,
-	0x9005, 0x0118, 0x080c, 0xae92, 0x0068, 0x6017, 0xf400, 0x605b,
-	0x0000, 0xa97c, 0xd1a4, 0x0110, 0xa980, 0x615a, 0x2009, 0x0041,
-	0x080c, 0xaedc, 0xa988, 0x918c, 0xff00, 0x9186, 0x2000, 0x1138,
-	0x0026, 0x900e, 0x2011, 0xfdff, 0x080c, 0x86dd, 0x002e, 0xa87c,
-	0xd0c4, 0x0148, 0x2061, 0x1a71, 0x6000, 0xd08c, 0x1120, 0x6008,
-	0x8000, 0x0208, 0x600a, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7c7a,
-	0x00ce, 0x012e, 0x00be, 0x0804, 0x7c74, 0xa984, 0x9186, 0x002e,
-	0x0d30, 0x9186, 0x002d, 0x0d18, 0x9186, 0x0045, 0x0510, 0x9186,
-	0x002a, 0x1130, 0x2001, 0x180c, 0x200c, 0xc194, 0x2102, 0x08b8,
-	0x9186, 0x0020, 0x0158, 0x9186, 0x0029, 0x1d10, 0xa974, 0x080c,
-	0x65ff, 0x1968, 0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065,
-	0x09b8, 0x6007, 0x0024, 0x2001, 0x1986, 0x2004, 0x601a, 0x0804,
-	0x7b0f, 0xa88c, 0x9065, 0x0960, 0x00e6, 0xa890, 0x9075, 0x2001,
-	0x1834, 0x2004, 0x9005, 0x0150, 0x080c, 0xae92, 0x8eff, 0x0118,
-	0x2e60, 0x080c, 0xae92, 0x00ee, 0x0804, 0x7b0f, 0x6024, 0xc0dc,
-	0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130,
-	0x6007, 0x003b, 0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001,
-	0x080c, 0x90f0, 0x080c, 0x968d, 0x00ee, 0x0804, 0x7b0f, 0x2061,
-	0x1a71, 0x6000, 0xd084, 0x0190, 0xd08c, 0x1904, 0x7c88, 0x0126,
-	0x2091, 0x8000, 0x6204, 0x8210, 0x0220, 0x6206, 0x012e, 0x0804,
-	0x7c88, 0x012e, 0xa883, 0x0016, 0x0804, 0x7c81, 0xa883, 0x0007,
-	0x0804, 0x7c81, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0130, 0x8001,
-	0x1138, 0x7007, 0x0001, 0x0069, 0x0005, 0x080c, 0x780a, 0x0040,
-	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7bb1,
-	0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x903e, 0x2061,
-	0x1800, 0x61d0, 0x81ff, 0x1904, 0x7c33, 0x6130, 0xd194, 0x1904,
-	0x7c5d, 0xa878, 0x2070, 0x9e82, 0x1cd0, 0x0a04, 0x7c27, 0x6068,
-	0x9e02, 0x1a04, 0x7c27, 0x7120, 0x9186, 0x0006, 0x1904, 0x7c19,
-	0x7010, 0x905d, 0x0904, 0x7c33, 0xb800, 0xd0e4, 0x1904, 0x7c57,
-	0x2061, 0x1a71, 0x6100, 0x9184, 0x0301, 0x9086, 0x0001, 0x15a0,
-	0x7024, 0xd0dc, 0x1904, 0x7c60, 0xa883, 0x0000, 0xa803, 0x0000,
-	0x2908, 0x7014, 0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904,
-	0x7c63, 0x080c, 0x56cf, 0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e,
-	0x2e60, 0x080c, 0x85fd, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2048,
-	0xa800, 0x9005, 0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904,
-	0x7c63, 0x012e, 0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee, 0xa883,
-	0x0006, 0x00be, 0x0804, 0x7c81, 0xd184, 0x0db8, 0xd1c4, 0x1190,
-	0x00a0, 0xa974, 0x080c, 0x65ff, 0x15d0, 0xb800, 0xd0e4, 0x15b8,
-	0x7120, 0x9186, 0x0007, 0x1118, 0xa883, 0x0002, 0x0490, 0xa883,
-	0x0008, 0x0478, 0xa883, 0x000e, 0x0460, 0xa883, 0x0017, 0x0448,
-	0xa883, 0x0035, 0x0430, 0x080c, 0x56d3, 0xd0fc, 0x01e8, 0xa878,
-	0x2070, 0x9e82, 0x1cd0, 0x02c0, 0x6068, 0x9e02, 0x12a8, 0x7120,
-	0x9186, 0x0006, 0x1188, 0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc,
-	0x0158, 0x2039, 0x0001, 0x7000, 0x9086, 0x0007, 0x1904, 0x7bbd,
-	0x7003, 0x0002, 0x0804, 0x7bbd, 0xa883, 0x0028, 0x0010, 0xa883,
-	0x0029, 0x012e, 0x00ee, 0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8,
-	0xa883, 0x0045, 0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b, 0x0014,
-	0x080c, 0xe134, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2009, 0x003e,
-	0x0058, 0x2009, 0x0004, 0x0040, 0x2009, 0x0006, 0x0028, 0x2009,
-	0x0016, 0x0010, 0x2009, 0x0001, 0xa884, 0x9084, 0xff00, 0x9105,
-	0xa886, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c81, 0x012e, 0x0005,
-	0x080c, 0x1031, 0x0005, 0x00d6, 0x080c, 0x85f4, 0x00de, 0x0005,
-	0x00d6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x0040, 0x702c,
-	0xd084, 0x01d8, 0x908c, 0x0780, 0x190c, 0x7d72, 0xd09c, 0x11a8,
-	0x2071, 0x1800, 0x70c0, 0x90ea, 0x0020, 0x0278, 0x8001, 0x70c2,
-	0x702c, 0x2048, 0xa800, 0x702e, 0x9006, 0xa802, 0xa806, 0x2071,
-	0x0040, 0x2900, 0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de,
-	0x0005, 0x0006, 0x9084, 0x0780, 0x190c, 0x7d72, 0x000e, 0x0005,
-	0xa898, 0x9084, 0x0003, 0x05a8, 0x080c, 0xae0b, 0x05d8, 0x2900,
-	0x6016, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0035, 0x1138, 0x6008,
-	0xc0fd, 0x600a, 0x2001, 0x196b, 0x2004, 0x0098, 0xa8a0, 0x9084,
-	0x00ff, 0xa99c, 0x918c, 0xff00, 0x9105, 0xa99c, 0x918c, 0x00ff,
-	0x080c, 0x283e, 0x1540, 0x00b6, 0x080c, 0x65ff, 0x2b00, 0x00be,
-	0x1510, 0x6012, 0x6023, 0x0001, 0x2009, 0x0040, 0xa864, 0x9084,
-	0x00ff, 0x9086, 0x0035, 0x0110, 0x2009, 0x0041, 0x080c, 0xaedc,
-	0x0005, 0xa87b, 0x0101, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c81,
-	0x012e, 0x0005, 0xa87b, 0x002c, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6c81, 0x012e, 0x0005, 0xa87b, 0x0028, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6c81, 0x012e, 0x080c, 0xae61, 0x0005, 0x00d6, 0x00c6,
-	0x0036, 0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74, 0x9282,
-	0x0004, 0x1a04, 0x7d63, 0xa97c, 0x9188, 0x1000, 0x2104, 0x905d,
-	0xb804, 0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff, 0x9084,
-	0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c, 0xae0b, 0x1118, 0x080c,
-	0xaeaf, 0x05a8, 0x6212, 0xa874, 0x0002, 0x7d41, 0x7d46, 0x7d49,
-	0x7d4f, 0x2019, 0x0002, 0x080c, 0xe522, 0x0060, 0x080c, 0xe4be,
-	0x0048, 0x2019, 0x0002, 0xa980, 0x080c, 0xe4d9, 0x0018, 0xa980,
-	0x080c, 0xe4be, 0x080c, 0xae61, 0xa887, 0x0000, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x6c81, 0x012e, 0x00be, 0x001e, 0x002e, 0x003e,
-	0x00ce, 0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887, 0x0002,
-	0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38, 0xa887,
-	0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04, 0x7d74, 0x0006, 0x0016,
-	0x2001, 0x8003, 0x0006, 0x0804, 0x0dde, 0x2001, 0x1834, 0x2004,
-	0x9005, 0x0005, 0x0005, 0x00f6, 0x2079, 0x0300, 0x2001, 0x0200,
-	0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c, 0xd1ec,
-	0x1120, 0x080c, 0x157d, 0x00fe, 0x0005, 0x2001, 0x020d, 0x2003,
-	0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c, 0x0904,
-	0x7df4, 0x68c0, 0x90aa, 0x0005, 0x0a04, 0x840b, 0x7d44, 0x7c40,
-	0x9584, 0x00f6, 0x1510, 0x9484, 0x7000, 0x0140, 0x908a, 0x2000,
-	0x1260, 0x9584, 0x0700, 0x8007, 0x0804, 0x7dfb, 0x7000, 0x9084,
-	0xff00, 0x9086, 0x8100, 0x0da8, 0x00b0, 0x9484, 0x0fff, 0x1130,
-	0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0, 0x080c, 0xe9c1,
-	0x080c, 0x8300, 0x7817, 0x0140, 0x00a8, 0x9584, 0x0076, 0x1118,
-	0x080c, 0x835e, 0x19c0, 0xd5a4, 0x0148, 0x0046, 0x0056, 0x080c,
-	0x7e56, 0x080c, 0x2337, 0x005e, 0x004e, 0x0020, 0x080c, 0xe9c1,
-	0x7817, 0x0140, 0x080c, 0x73bc, 0x0168, 0x2001, 0x0111, 0x2004,
-	0xd08c, 0x0140, 0x6893, 0x0000, 0x2001, 0x0110, 0x2003, 0x0008,
-	0x2003, 0x0000, 0x080c, 0x7e37, 0x2001, 0x19f0, 0x2004, 0x9005,
-	0x090c, 0x968d, 0x0005, 0x0002, 0x7e0d, 0x8122, 0x7e04, 0x7e04,
-	0x7e04, 0x7e04, 0x7e04, 0x7e04, 0x7817, 0x0140, 0x2001, 0x19f0,
-	0x2004, 0x9005, 0x090c, 0x968d, 0x0005, 0x7000, 0x908c, 0xff00,
-	0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x6892, 0x9286, 0x2000,
-	0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x5730, 0x0070,
-	0x080c, 0x7e76, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c, 0x805d,
-	0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x8230, 0x7817, 0x0140,
-	0x2001, 0x19f0, 0x2004, 0x9005, 0x090c, 0x968d, 0x0005, 0x2001,
-	0x1810, 0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, 0x2004, 0x9086,
-	0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048, 0x2518, 0x080c,
-	0x4b04, 0x003e, 0x002e, 0x0005, 0x0036, 0x0046, 0x0056, 0x00f6,
-	0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036, 0x0046,
-	0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019, 0xffff,
-	0x2001, 0x1810, 0x2004, 0xd08c, 0x0160, 0x2001, 0x1800, 0x2004,
-	0x9086, 0x0003, 0x1130, 0x0026, 0x2011, 0x8048, 0x080c, 0x4b04,
-	0x002e, 0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, 0x00b6, 0x00c6,
-	0x7010, 0x9084, 0xff00, 0x8007, 0x9096, 0x0001, 0x0120, 0x9096,
-	0x0023, 0x1904, 0x802e, 0x9186, 0x0023, 0x15c0, 0x080c, 0x82c5,
-	0x0904, 0x802e, 0x6120, 0x9186, 0x0001, 0x0150, 0x9186, 0x0004,
-	0x0138, 0x9186, 0x0008, 0x0120, 0x9186, 0x000a, 0x1904, 0x802e,
-	0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1130, 0x2009, 0x0015,
-	0x080c, 0xaedc, 0x0804, 0x802e, 0x908e, 0x0214, 0x0118, 0x908e,
-	0x0210, 0x1130, 0x2009, 0x0015, 0x080c, 0xaedc, 0x0804, 0x802e,
-	0x908e, 0x0100, 0x1904, 0x802e, 0x7034, 0x9005, 0x1904, 0x802e,
-	0x2009, 0x0016, 0x080c, 0xaedc, 0x0804, 0x802e, 0x9186, 0x0022,
-	0x1904, 0x802e, 0x7030, 0x908e, 0x0300, 0x1580, 0x68dc, 0xd0a4,
-	0x0528, 0xc0b5, 0x68de, 0x7100, 0x918c, 0x00ff, 0x697e, 0x7004,
-	0x6882, 0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006, 0x9084,
-	0x00ff, 0x0016, 0x2008, 0x080c, 0x2887, 0x7932, 0x7936, 0x001e,
-	0x000e, 0x00fe, 0x080c, 0x283e, 0x695e, 0x703c, 0x00e6, 0x2071,
-	0x0140, 0x7086, 0x2071, 0x1800, 0x70b6, 0x00ee, 0x7034, 0x9005,
-	0x1904, 0x802e, 0x2009, 0x0017, 0x0804, 0x7fde, 0x908e, 0x0400,
-	0x1190, 0x7034, 0x9005, 0x1904, 0x802e, 0x080c, 0x73bc, 0x0120,
-	0x2009, 0x001d, 0x0804, 0x7fde, 0x68dc, 0xc0a5, 0x68de, 0x2009,
-	0x0030, 0x0804, 0x7fde, 0x908e, 0x0500, 0x1140, 0x7034, 0x9005,
-	0x1904, 0x802e, 0x2009, 0x0018, 0x0804, 0x7fde, 0x908e, 0x2010,
-	0x1120, 0x2009, 0x0019, 0x0804, 0x7fde, 0x908e, 0x2110, 0x1120,
-	0x2009, 0x001a, 0x0804, 0x7fde, 0x908e, 0x5200, 0x1140, 0x7034,
-	0x9005, 0x1904, 0x802e, 0x2009, 0x001b, 0x0804, 0x7fde, 0x908e,
-	0x5000, 0x1140, 0x7034, 0x9005, 0x1904, 0x802e, 0x2009, 0x001c,
-	0x0804, 0x7fde, 0x908e, 0x1300, 0x1120, 0x2009, 0x0034, 0x0804,
-	0x7fde, 0x908e, 0x1200, 0x1140, 0x7034, 0x9005, 0x1904, 0x802e,
-	0x2009, 0x0024, 0x0804, 0x7fde, 0x908c, 0xff00, 0x918e, 0x2400,
-	0x1170, 0x2009, 0x002d, 0x2001, 0x1810, 0x2004, 0xd09c, 0x0904,
-	0x7fde, 0x080c, 0xd905, 0x1904, 0x802e, 0x0804, 0x7fdc, 0x908c,
-	0xff00, 0x918e, 0x5300, 0x1120, 0x2009, 0x002a, 0x0804, 0x7fde,
-	0x908e, 0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, 0x7fde, 0x908e,
-	0x6104, 0x1530, 0x2029, 0x0205, 0x2011, 0x026d, 0x8208, 0x2204,
-	0x9082, 0x0004, 0x8004, 0x8004, 0x20a8, 0x2011, 0x8015, 0x211c,
-	0x8108, 0x0046, 0x2124, 0x080c, 0x4b04, 0x004e, 0x8108, 0x0f04,
-	0x7f92, 0x9186, 0x0280, 0x1d88, 0x2504, 0x8000, 0x202a, 0x2009,
-	0x0260, 0x0c58, 0x202b, 0x0000, 0x2009, 0x0023, 0x0804, 0x7fde,
-	0x908e, 0x6000, 0x1120, 0x2009, 0x003f, 0x0804, 0x7fde, 0x908e,
-	0x5400, 0x1138, 0x080c, 0x83bb, 0x1904, 0x802e, 0x2009, 0x0046,
-	0x04a8, 0x908e, 0x5500, 0x1148, 0x080c, 0x83e3, 0x1118, 0x2009,
-	0x0041, 0x0460, 0x2009, 0x0042, 0x0448, 0x908e, 0x7800, 0x1118,
-	0x2009, 0x0045, 0x0418, 0x908e, 0x1000, 0x1118, 0x2009, 0x004e,
-	0x00e8, 0x908e, 0x6300, 0x1118, 0x2009, 0x004a, 0x00b8, 0x908c,
-	0xff00, 0x918e, 0x5600, 0x1118, 0x2009, 0x004f, 0x0078, 0x908c,
-	0xff00, 0x918e, 0x5700, 0x1118, 0x2009, 0x0050, 0x0038, 0x2009,
-	0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x283e, 0x1904, 0x8031,
-	0x080c, 0x659e, 0x1904, 0x8031, 0xbe12, 0xbd16, 0x001e, 0x0016,
-	0x080c, 0x73bc, 0x01c0, 0x68dc, 0xd08c, 0x1148, 0x7000, 0x9084,
-	0x00ff, 0x1188, 0x7004, 0x9084, 0xff00, 0x1168, 0x0040, 0x687c,
-	0x9606, 0x1148, 0x6880, 0x9506, 0x9084, 0xff00, 0x1120, 0x9584,
-	0x00ff, 0xb8c2, 0x0080, 0xb8c0, 0x9005, 0x1168, 0x9186, 0x0046,
-	0x1150, 0x687c, 0x9606, 0x1138, 0x6880, 0x9506, 0x9084, 0xff00,
-	0x1110, 0x001e, 0x0098, 0x080c, 0xae0b, 0x01a8, 0x2b08, 0x6112,
-	0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x9186, 0x004c, 0x1110,
-	0x6023, 0x000a, 0x0016, 0x001e, 0x080c, 0xaedc, 0x00ce, 0x00be,
-	0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120,
-	0x2011, 0x8049, 0x080c, 0x4b04, 0x080c, 0xaeaf, 0x0d90, 0x2b08,
-	0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x0016, 0x9186,
-	0x0017, 0x0118, 0x9186, 0x0030, 0x1128, 0x6007, 0x0009, 0x6017,
-	0x2900, 0x0020, 0x6007, 0x0051, 0x6017, 0x0000, 0x602f, 0x0009,
-	0x6003, 0x0001, 0x080c, 0x9138, 0x08a0, 0x080c, 0x32e3, 0x1140,
-	0x7010, 0x9084, 0xff00, 0x8007, 0x908e, 0x0008, 0x1108, 0x0009,
-	0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c, 0xff00, 0x810f,
-	0x9186, 0x0033, 0x11e8, 0x080c, 0x82c5, 0x0904, 0x80ba, 0x7124,
-	0x610a, 0x7030, 0x908e, 0x0200, 0x1140, 0x7034, 0x9005, 0x15d0,
-	0x2009, 0x0015, 0x080c, 0xaedc, 0x04a8, 0x908e, 0x0100, 0x1590,
-	0x7034, 0x9005, 0x1578, 0x2009, 0x0016, 0x080c, 0xaedc, 0x0450,
-	0x9186, 0x0032, 0x1538, 0x7030, 0x908e, 0x1400, 0x1518, 0x2009,
-	0x0038, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c,
-	0x283e, 0x11b8, 0x080c, 0x659e, 0x11a0, 0xbe12, 0xbd16, 0x080c,
-	0xae0b, 0x0178, 0x2b08, 0x6112, 0x080c, 0xcfaa, 0x6023, 0x0004,
-	0x7120, 0x610a, 0x001e, 0x080c, 0xaedc, 0x080c, 0x968d, 0x0010,
-	0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x0046,
-	0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8, 0x9592,
-	0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f, 0x0804,
-	0x811c, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804, 0x811c,
-	0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011, 0x0000,
-	0x2019, 0x1837, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9, 0x0800,
-	0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f, 0x2071,
-	0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0, 0x9496,
-	0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600, 0x9706,
-	0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745, 0x1148,
-	0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6, 0x0080,
-	0x1d20, 0x8420, 0x8e70, 0x1f04, 0x80f1, 0x82ff, 0x1118, 0x9085,
-	0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee, 0x004e,
-	0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184, 0x000f,
-	0x0002, 0x8139, 0x8139, 0x8139, 0x82d7, 0x8139, 0x8142, 0x816d,
-	0x81fb, 0x8139, 0x8139, 0x8139, 0x8139, 0x8139, 0x8139, 0x8139,
-	0x8139, 0x7817, 0x0140, 0x2001, 0x19f0, 0x2004, 0x9005, 0x090c,
-	0x968d, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160,
-	0x9c8c, 0x0007, 0x11c0, 0x9c8a, 0x1cd0, 0x02a8, 0x6868, 0x9c02,
-	0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106,
-	0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009,
-	0x0046, 0x080c, 0xaedc, 0x7817, 0x0140, 0x2001, 0x19f0, 0x2004,
-	0x9005, 0x090c, 0x968d, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484,
-	0x0fff, 0x0904, 0x81d1, 0x7110, 0xd1bc, 0x1904, 0x81d1, 0x7108,
-	0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x15b0,
-	0x81ff, 0x15a0, 0x9080, 0x3325, 0x200d, 0x918c, 0xff00, 0x810f,
-	0x2001, 0x0080, 0x9106, 0x0904, 0x81d1, 0x080c, 0x659e, 0x1904,
-	0x81d1, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15d8, 0xba04, 0x9294,
-	0xff00, 0x9286, 0x0600, 0x11a0, 0x080c, 0xae0b, 0x05e8, 0x2b08,
-	0x7028, 0x604a, 0x702c, 0x6046, 0x6112, 0x6023, 0x0006, 0x7120,
-	0x610a, 0x7130, 0x6156, 0x2009, 0x0044, 0x080c, 0xdb63, 0x0408,
-	0x080c, 0x6972, 0x1138, 0xb807, 0x0606, 0x0c30, 0x190c, 0x80be,
-	0x11c0, 0x0898, 0x080c, 0xae0b, 0x2b08, 0x0198, 0x6112, 0x6023,
-	0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007, 0x0005,
-	0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9138, 0x080c,
-	0x968d, 0x7817, 0x0140, 0x2001, 0x19f0, 0x2004, 0x9005, 0x090c,
-	0x968d, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0ec,
-	0x0120, 0x2011, 0x8049, 0x080c, 0x4b04, 0x080c, 0xaeaf, 0x0d48,
-	0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x6156,
-	0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x08b0, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7020,
-	0x2060, 0x9c84, 0x0007, 0x11c0, 0x9c82, 0x1cd0, 0x02a8, 0x6868,
+	0x0008, 0x6886, 0x2001, 0x196c, 0x2004, 0x080c, 0x28b4, 0x60e2,
+	0x2001, 0x180c, 0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce,
+	0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026,
+	0x0036, 0x0046, 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800,
+	0x080c, 0xd243, 0x1904, 0x767b, 0x7130, 0xd184, 0x1170, 0x080c,
+	0x331b, 0x0138, 0xc18d, 0x7132, 0x2011, 0x1848, 0x2214, 0xd2ac,
+	0x1120, 0x7030, 0xd08c, 0x0904, 0x767b, 0x2011, 0x1848, 0x220c,
+	0xd1a4, 0x0538, 0x0016, 0x2019, 0x000e, 0x080c, 0xe543, 0x0156,
+	0x00b6, 0x20a9, 0x007f, 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186,
+	0x0080, 0x0188, 0x080c, 0x6608, 0x1170, 0x2120, 0x9006, 0x0016,
+	0x2009, 0x000e, 0x080c, 0xe5cf, 0x2009, 0x0001, 0x2011, 0x0100,
+	0x080c, 0x86c6, 0x001e, 0x8108, 0x1f04, 0x7644, 0x00be, 0x015e,
+	0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004,
+	0x080c, 0x318c, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f,
+	0x900e, 0x080c, 0x6608, 0x1110, 0x080c, 0x603d, 0x8108, 0x1f04,
+	0x7671, 0x00be, 0x015e, 0x080c, 0x1ad5, 0x080c, 0xade2, 0x60e3,
+	0x0000, 0x080c, 0x6023, 0x080c, 0x72d7, 0x00ee, 0x00ce, 0x004e,
+	0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x197c, 0x2003,
+	0x0001, 0x0005, 0x2001, 0x197c, 0x2003, 0x0000, 0x0005, 0x2001,
+	0x197b, 0x2003, 0xaaaa, 0x0005, 0x2001, 0x197b, 0x2003, 0x0000,
+	0x0005, 0x2071, 0x18fa, 0x7003, 0x0000, 0x7007, 0x0000, 0x080c,
+	0x1018, 0x090c, 0x0dd5, 0xa8ab, 0xdcb0, 0x2900, 0x704e, 0x080c,
+	0x1018, 0x090c, 0x0dd5, 0xa8ab, 0xdcb0, 0x2900, 0x7052, 0xa867,
+	0x0000, 0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005, 0x00e6, 0x2071,
+	0x0040, 0x6848, 0x9005, 0x1118, 0x9085, 0x0001, 0x04b0, 0x6840,
+	0x9005, 0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002, 0x6854, 0x9101,
+	0x7006, 0x9006, 0x7012, 0x7016, 0x6850, 0x7002, 0x6854, 0x7006,
+	0x6858, 0x700a, 0x685c, 0x700e, 0x6840, 0x9005, 0x1110, 0x7012,
+	0x7016, 0x6848, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x2001,
+	0x0019, 0x7036, 0x702b, 0x0001, 0x2001, 0x0004, 0x200c, 0x918c,
+	0xfff7, 0x918d, 0x8000, 0x2102, 0x00d6, 0x2069, 0x18fa, 0x6807,
+	0x0001, 0x00de, 0x080c, 0x7c79, 0x9006, 0x00ee, 0x0005, 0x900e,
+	0x0156, 0x20a9, 0x0006, 0x8003, 0x2011, 0x0100, 0x2214, 0x9296,
+	0x0008, 0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x1f04, 0x7703,
+	0x015e, 0x0005, 0x2079, 0x0040, 0x2071, 0x18fa, 0x7004, 0x0002,
+	0x7722, 0x7723, 0x775a, 0x77b5, 0x78c5, 0x7720, 0x7720, 0x78ef,
+	0x080c, 0x0dd5, 0x0005, 0x2079, 0x0040, 0x782c, 0x908c, 0x0780,
+	0x190c, 0x7d5b, 0xd0a4, 0x01f0, 0x7824, 0x2048, 0x9006, 0xa802,
+	0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x0040, 0x0608, 0x00b8,
+	0x2001, 0x1800, 0x200c, 0x9186, 0x0003, 0x1160, 0x7104, 0x9186,
+	0x0004, 0x0140, 0x9186, 0x0007, 0x0128, 0x9186, 0x0003, 0x19e8,
+	0x080c, 0x77b5, 0x782c, 0xd09c, 0x090c, 0x7c79, 0x0005, 0x9082,
+	0x005a, 0x1218, 0x2100, 0x003b, 0x0c18, 0x080c, 0x77eb, 0x0c90,
+	0x00e3, 0x08f0, 0x0005, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb,
+	0x77eb, 0x77eb, 0x77eb, 0x780d, 0x77eb, 0x77eb, 0x77eb, 0x77eb,
+	0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb,
+	0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77f7,
+	0x77eb, 0x79e0, 0x77eb, 0x77eb, 0x77eb, 0x780d, 0x77eb, 0x77f7,
+	0x7a21, 0x7a62, 0x7aa9, 0x7abd, 0x77eb, 0x77eb, 0x780d, 0x77f7,
+	0x7821, 0x77eb, 0x7899, 0x7b68, 0x7b83, 0x77eb, 0x780d, 0x77eb,
+	0x7821, 0x77eb, 0x77eb, 0x788f, 0x7b83, 0x77eb, 0x77eb, 0x77eb,
+	0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x7835, 0x77eb,
+	0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb,
+	0x7cff, 0x77eb, 0x7ca9, 0x77eb, 0x7ca9, 0x77eb, 0x784a, 0x77eb,
+	0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x77eb, 0x2079, 0x0040, 0x7004,
+	0x9086, 0x0003, 0x1198, 0x782c, 0x080c, 0x7ca2, 0xd0a4, 0x0170,
+	0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff,
+	0x908a, 0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c, 0x7c79,
+	0x0005, 0x77eb, 0x77f7, 0x79cc, 0x77eb, 0x77f7, 0x77eb, 0x77f7,
+	0x77f7, 0x77eb, 0x77f7, 0x79cc, 0x77f7, 0x77f7, 0x77f7, 0x77f7,
+	0x77f7, 0x77eb, 0x77f7, 0x79cc, 0x77eb, 0x77eb, 0x77f7, 0x77eb,
+	0x77eb, 0x77eb, 0x77f7, 0x00e6, 0x2071, 0x18fa, 0x2009, 0x0400,
+	0x0071, 0x00ee, 0x0005, 0x2009, 0x1000, 0x0049, 0x0005, 0x2009,
+	0x2000, 0x0029, 0x0005, 0x2009, 0x0800, 0x0009, 0x0005, 0x7007,
+	0x0001, 0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6c86, 0x012e, 0x0005, 0xa864, 0x8007, 0x9084,
+	0x00ff, 0x0d08, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x796e,
+	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x796e,
+	0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120,
+	0x7007, 0x0001, 0x0804, 0x7989, 0x7007, 0x0003, 0x7012, 0x2900,
+	0x7016, 0x701a, 0x704b, 0x7989, 0x0005, 0xa864, 0x8007, 0x9084,
+	0x00ff, 0x0904, 0x77f3, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804,
+	0x79a5, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b,
+	0x79a5, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001,
+	0x1904, 0x77f3, 0x7007, 0x0001, 0x2009, 0x1834, 0x210c, 0x81ff,
+	0x11a8, 0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c,
+	0x62b7, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139,
+	0xa87a, 0xa982, 0x080c, 0x6c86, 0x012e, 0x0ca0, 0xa994, 0x9186,
+	0x0071, 0x0d38, 0x9186, 0x0064, 0x0d20, 0x9186, 0x007c, 0x0d08,
+	0x9186, 0x0028, 0x09f0, 0x9186, 0x0038, 0x09d8, 0x9186, 0x0078,
+	0x09c0, 0x9186, 0x005f, 0x09a8, 0x9186, 0x0056, 0x0990, 0xa897,
+	0x4005, 0xa89b, 0x0001, 0x2001, 0x0030, 0x900e, 0x08a0, 0xa87c,
+	0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804,
+	0x7b9a, 0x2900, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0,
+	0xa85c, 0x9080, 0x0030, 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8,
+	0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082,
+	0x0401, 0x1a04, 0x77fb, 0xaab4, 0x928a, 0x0002, 0x1a04, 0x77fb,
+	0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001, 0x792c,
+	0x0018, 0x9280, 0x7922, 0x2005, 0x7056, 0x7010, 0x9015, 0x0904,
+	0x790d, 0x080c, 0x1018, 0x1118, 0x7007, 0x0004, 0x0005, 0x2900,
+	0x7022, 0x7054, 0x2060, 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c,
+	0xe004, 0x9100, 0xa076, 0xa860, 0xa072, 0xe008, 0x920a, 0x1210,
+	0x900e, 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004,
+	0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c, 0x10e9, 0xa06c,
+	0x908e, 0x0100, 0x0170, 0x9086, 0x0200, 0x0118, 0x7007, 0x0007,
+	0x0005, 0x7020, 0x2048, 0x080c, 0x1031, 0x7014, 0x2048, 0x0804,
+	0x77fb, 0x7020, 0x2048, 0x7018, 0xa802, 0xa807, 0x0000, 0x2908,
+	0x2048, 0xa906, 0x711a, 0x0804, 0x78c5, 0x7014, 0x2048, 0x7007,
+	0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108,
+	0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x0904, 0x7b9a,
+	0x0804, 0x796e, 0x7924, 0x7928, 0x0002, 0x001d, 0x0007, 0x0004,
+	0x000a, 0x001b, 0x0005, 0x0006, 0x000a, 0x001d, 0x0005, 0x0004,
+	0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2,
+	0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6,
+	0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6,
+	0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2,
+	0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096,
+	0xb088, 0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082,
+	0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776,
+	0xb004, 0x9055, 0x1958, 0x006e, 0x007e, 0x0005, 0x2009, 0x1834,
+	0x210c, 0x81ff, 0x1178, 0x080c, 0x60b7, 0x1108, 0x0005, 0x080c,
+	0x6eb9, 0x0126, 0x2091, 0x8000, 0x080c, 0xce3e, 0x080c, 0x6c86,
+	0x012e, 0x0ca0, 0x080c, 0xd243, 0x1d70, 0x2001, 0x0028, 0x900e,
+	0x0c70, 0x2009, 0x1834, 0x210c, 0x81ff, 0x1188, 0xa888, 0x9005,
+	0x0188, 0xa883, 0x0000, 0x080c, 0x6147, 0x1108, 0x0005, 0xa87a,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6c86, 0x012e, 0x0cb8, 0x2001,
+	0x0028, 0x0ca8, 0x2001, 0x0000, 0x0c90, 0x2009, 0x1834, 0x210c,
+	0x81ff, 0x11d8, 0xa888, 0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c,
+	0xd0f4, 0x0120, 0x080c, 0x6219, 0x1138, 0x0005, 0x9006, 0xa87a,
+	0x080c, 0x6194, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa87a,
+	0xa982, 0x080c, 0x6c86, 0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e,
+	0x0c98, 0x2001, 0x0000, 0x0c80, 0x7018, 0xa802, 0x2908, 0x2048,
+	0xa906, 0x711a, 0x7010, 0x8001, 0x7012, 0x0118, 0x7007, 0x0003,
+	0x0030, 0x7014, 0x2048, 0x7007, 0x0001, 0x7048, 0x080f, 0x0005,
+	0x00b6, 0x7007, 0x0001, 0xa974, 0xa878, 0x9084, 0x00ff, 0x9096,
+	0x0004, 0x0540, 0x20a9, 0x0001, 0x9096, 0x0001, 0x0190, 0x900e,
+	0x20a9, 0x0800, 0x9096, 0x0002, 0x0160, 0x9005, 0x11d8, 0xa974,
+	0x080c, 0x6608, 0x11b8, 0x0066, 0xae80, 0x080c, 0x6718, 0x006e,
+	0x0088, 0x0046, 0x2011, 0x180c, 0x2224, 0xc484, 0x2412, 0x004e,
+	0x00c6, 0x080c, 0x6608, 0x1110, 0x080c, 0x6818, 0x8108, 0x1f04,
+	0x7a09, 0x00ce, 0xa87c, 0xd084, 0x1120, 0x080c, 0x1031, 0x00be,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c86, 0x012e, 0x00be,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6977,
+	0x0580, 0x2061, 0x1a70, 0x6100, 0xd184, 0x0178, 0xa888, 0x9084,
+	0x00ff, 0x1550, 0x6000, 0xd084, 0x0520, 0x6004, 0x9005, 0x1538,
+	0x6003, 0x0000, 0x600b, 0x0000, 0x00c8, 0x2011, 0x0001, 0xa890,
+	0x9005, 0x1110, 0x2001, 0x001e, 0x8000, 0x6016, 0xa888, 0x9084,
+	0x00ff, 0x0178, 0x6006, 0xa888, 0x8007, 0x9084, 0x00ff, 0x0148,
+	0x600a, 0xa888, 0x8000, 0x1108, 0xc28d, 0x6202, 0x012e, 0x0804,
+	0x7c63, 0x012e, 0x0804, 0x7c5d, 0x012e, 0x0804, 0x7c57, 0x012e,
+	0x0804, 0x7c5a, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c,
+	0x6977, 0x05e0, 0x2061, 0x1a70, 0x6000, 0xd084, 0x05b8, 0x6204,
+	0x6308, 0xd08c, 0x1530, 0xac78, 0x9484, 0x0003, 0x0170, 0xa988,
+	0x918c, 0x00ff, 0x8001, 0x1120, 0x2100, 0x9210, 0x0620, 0x0028,
+	0x8001, 0x1508, 0x2100, 0x9212, 0x02f0, 0x9484, 0x000c, 0x0188,
+	0xa988, 0x810f, 0x918c, 0x00ff, 0x9082, 0x0004, 0x1120, 0x2100,
+	0x9318, 0x0288, 0x0030, 0x9082, 0x0004, 0x1168, 0x2100, 0x931a,
+	0x0250, 0xa890, 0x9005, 0x0110, 0x8000, 0x6016, 0x6206, 0x630a,
+	0x012e, 0x0804, 0x7c63, 0x012e, 0x0804, 0x7c60, 0x012e, 0x0804,
+	0x7c5d, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x2061, 0x1a70,
+	0x6300, 0xd38c, 0x1120, 0x6308, 0x8318, 0x0220, 0x630a, 0x012e,
+	0x0804, 0x7c71, 0x012e, 0x0804, 0x7c60, 0x00b6, 0x0126, 0x00c6,
+	0x2091, 0x8000, 0x7007, 0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6,
+	0x2061, 0x1a70, 0x6000, 0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440,
+	0xa888, 0x9005, 0x05d8, 0xa88c, 0x9065, 0x0598, 0x2001, 0x1834,
+	0x2004, 0x9005, 0x0118, 0x080c, 0xaea2, 0x0068, 0x6017, 0xf400,
+	0x605b, 0x0000, 0xa97c, 0xd1a4, 0x0110, 0xa980, 0x615a, 0x2009,
+	0x0041, 0x080c, 0xaeec, 0xa988, 0x918c, 0xff00, 0x9186, 0x2000,
+	0x1138, 0x0026, 0x900e, 0x2011, 0xfdff, 0x080c, 0x86c6, 0x002e,
+	0xa87c, 0xd0c4, 0x0148, 0x2061, 0x1a70, 0x6000, 0xd08c, 0x1120,
+	0x6008, 0x8000, 0x0208, 0x600a, 0x00ce, 0x012e, 0x00be, 0x0804,
+	0x7c63, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7c5d, 0xa984, 0x9186,
+	0x002e, 0x0d30, 0x9186, 0x002d, 0x0d18, 0x9186, 0x0045, 0x0510,
+	0x9186, 0x002a, 0x1130, 0x2001, 0x180c, 0x200c, 0xc194, 0x2102,
+	0x08b8, 0x9186, 0x0020, 0x0158, 0x9186, 0x0029, 0x1d10, 0xa974,
+	0x080c, 0x6608, 0x1968, 0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c,
+	0x9065, 0x09b8, 0x6007, 0x0024, 0x2001, 0x1985, 0x2004, 0x601a,
+	0x0804, 0x7af8, 0xa88c, 0x9065, 0x0960, 0x00e6, 0xa890, 0x9075,
+	0x2001, 0x1834, 0x2004, 0x9005, 0x0150, 0x080c, 0xaea2, 0x8eff,
+	0x0118, 0x2e60, 0x080c, 0xaea2, 0x00ee, 0x0804, 0x7af8, 0x6024,
+	0xc0dc, 0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005,
+	0x0130, 0x6007, 0x003b, 0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003,
+	0x0001, 0x080c, 0x90d9, 0x080c, 0x9687, 0x00ee, 0x0804, 0x7af8,
+	0x2061, 0x1a70, 0x6000, 0xd084, 0x0190, 0xd08c, 0x1904, 0x7c71,
+	0x0126, 0x2091, 0x8000, 0x6204, 0x8210, 0x0220, 0x6206, 0x012e,
+	0x0804, 0x7c71, 0x012e, 0xa883, 0x0016, 0x0804, 0x7c6a, 0xa883,
+	0x0007, 0x0804, 0x7c6a, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0130,
+	0x8001, 0x1138, 0x7007, 0x0001, 0x0069, 0x0005, 0x080c, 0x77f3,
+	0x0040, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b,
+	0x7b9a, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x903e,
+	0x2061, 0x1800, 0x61d0, 0x81ff, 0x1904, 0x7c1c, 0x6130, 0xd194,
+	0x1904, 0x7c46, 0xa878, 0x2070, 0x9e82, 0x1cd0, 0x0a04, 0x7c10,
+	0x6068, 0x9e02, 0x1a04, 0x7c10, 0x7120, 0x9186, 0x0006, 0x1904,
+	0x7c02, 0x7010, 0x905d, 0x0904, 0x7c1c, 0xb800, 0xd0e4, 0x1904,
+	0x7c40, 0x2061, 0x1a70, 0x6100, 0x9184, 0x0301, 0x9086, 0x0001,
+	0x15a0, 0x7024, 0xd0dc, 0x1904, 0x7c49, 0xa883, 0x0000, 0xa803,
+	0x0000, 0x2908, 0x7014, 0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4,
+	0x1904, 0x7c4c, 0x080c, 0x56d8, 0xd09c, 0x1118, 0xa87c, 0xc0cc,
+	0xa87e, 0x2e60, 0x080c, 0x85e6, 0x012e, 0x00ee, 0x00be, 0x0005,
+	0x2048, 0xa800, 0x9005, 0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4,
+	0x1904, 0x7c4c, 0x012e, 0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee,
+	0xa883, 0x0006, 0x00be, 0x0804, 0x7c6a, 0xd184, 0x0db8, 0xd1c4,
+	0x1190, 0x00a0, 0xa974, 0x080c, 0x6608, 0x15d0, 0xb800, 0xd0e4,
+	0x15b8, 0x7120, 0x9186, 0x0007, 0x1118, 0xa883, 0x0002, 0x0490,
+	0xa883, 0x0008, 0x0478, 0xa883, 0x000e, 0x0460, 0xa883, 0x0017,
+	0x0448, 0xa883, 0x0035, 0x0430, 0x080c, 0x56dc, 0xd0fc, 0x01e8,
+	0xa878, 0x2070, 0x9e82, 0x1cd0, 0x02c0, 0x6068, 0x9e02, 0x12a8,
+	0x7120, 0x9186, 0x0006, 0x1188, 0x7010, 0x905d, 0x0170, 0xb800,
+	0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000, 0x9086, 0x0007, 0x1904,
+	0x7ba6, 0x7003, 0x0002, 0x0804, 0x7ba6, 0xa883, 0x0028, 0x0010,
+	0xa883, 0x0029, 0x012e, 0x00ee, 0x00be, 0x0420, 0xa883, 0x002a,
+	0x0cc8, 0xa883, 0x0045, 0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b,
+	0x0014, 0x080c, 0xe155, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2009,
+	0x003e, 0x0058, 0x2009, 0x0004, 0x0040, 0x2009, 0x0006, 0x0028,
+	0x2009, 0x0016, 0x0010, 0x2009, 0x0001, 0xa884, 0x9084, 0xff00,
+	0x9105, 0xa886, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c86, 0x012e,
+	0x0005, 0x080c, 0x1031, 0x0005, 0x00d6, 0x080c, 0x85dd, 0x00de,
+	0x0005, 0x00d6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x0040,
+	0x702c, 0xd084, 0x01d8, 0x908c, 0x0780, 0x190c, 0x7d5b, 0xd09c,
+	0x11a8, 0x2071, 0x1800, 0x70c0, 0x90ea, 0x0020, 0x0278, 0x8001,
+	0x70c2, 0x702c, 0x2048, 0xa800, 0x702e, 0x9006, 0xa802, 0xa806,
+	0x2071, 0x0040, 0x2900, 0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee,
+	0x00de, 0x0005, 0x0006, 0x9084, 0x0780, 0x190c, 0x7d5b, 0x000e,
+	0x0005, 0xa898, 0x9084, 0x0003, 0x05a8, 0x080c, 0xae1b, 0x05d8,
+	0x2900, 0x6016, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0035, 0x1138,
+	0x6008, 0xc0fd, 0x600a, 0x2001, 0x196a, 0x2004, 0x0098, 0xa8a0,
+	0x9084, 0x00ff, 0xa99c, 0x918c, 0xff00, 0x9105, 0xa99c, 0x918c,
+	0x00ff, 0x080c, 0x2840, 0x1540, 0x00b6, 0x080c, 0x6608, 0x2b00,
+	0x00be, 0x1510, 0x6012, 0x6023, 0x0001, 0x2009, 0x0040, 0xa864,
+	0x9084, 0x00ff, 0x9086, 0x0035, 0x0110, 0x2009, 0x0041, 0x080c,
+	0xaeec, 0x0005, 0xa87b, 0x0101, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6c86, 0x012e, 0x0005, 0xa87b, 0x002c, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6c86, 0x012e, 0x0005, 0xa87b, 0x0028, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6c86, 0x012e, 0x080c, 0xae71, 0x0005, 0x00d6,
+	0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74,
+	0x9282, 0x0004, 0x1a04, 0x7d4c, 0xa97c, 0x9188, 0x1000, 0x2104,
+	0x905d, 0xb804, 0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff,
+	0x9084, 0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c, 0xae1b, 0x1118,
+	0x080c, 0xaebf, 0x05a8, 0x6212, 0xa874, 0x0002, 0x7d2a, 0x7d2f,
+	0x7d32, 0x7d38, 0x2019, 0x0002, 0x080c, 0xe543, 0x0060, 0x080c,
+	0xe4df, 0x0048, 0x2019, 0x0002, 0xa980, 0x080c, 0xe4fa, 0x0018,
+	0xa980, 0x080c, 0xe4df, 0x080c, 0xae71, 0xa887, 0x0000, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x6c86, 0x012e, 0x00be, 0x001e, 0x002e,
+	0x003e, 0x00ce, 0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887,
+	0x0002, 0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38,
+	0xa887, 0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04, 0x7d5d, 0x0006,
+	0x0016, 0x2001, 0x8003, 0x0006, 0x0804, 0x0dde, 0x2001, 0x1834,
+	0x2004, 0x9005, 0x0005, 0x0005, 0x00f6, 0x2079, 0x0300, 0x2001,
+	0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c,
+	0xd1ec, 0x1120, 0x080c, 0x157f, 0x00fe, 0x0005, 0x2001, 0x020d,
+	0x2003, 0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c,
+	0x0904, 0x7ddd, 0x68c0, 0x90aa, 0x0005, 0x0a04, 0x83f4, 0x7d44,
+	0x7c40, 0x9584, 0x00f6, 0x1510, 0x9484, 0x7000, 0x0140, 0x908a,
+	0x2000, 0x1260, 0x9584, 0x0700, 0x8007, 0x0804, 0x7de4, 0x7000,
+	0x9084, 0xff00, 0x9086, 0x8100, 0x0da8, 0x00b0, 0x9484, 0x0fff,
+	0x1130, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0, 0x080c,
+	0xe9e2, 0x080c, 0x82e9, 0x7817, 0x0140, 0x00a8, 0x9584, 0x0076,
+	0x1118, 0x080c, 0x8347, 0x19c0, 0xd5a4, 0x0148, 0x0046, 0x0056,
+	0x080c, 0x7e3f, 0x080c, 0x2339, 0x005e, 0x004e, 0x0020, 0x080c,
+	0xe9e2, 0x7817, 0x0140, 0x080c, 0x73a5, 0x0168, 0x2001, 0x0111,
+	0x2004, 0xd08c, 0x0140, 0x6893, 0x0000, 0x2001, 0x0110, 0x2003,
+	0x0008, 0x2003, 0x0000, 0x080c, 0x7e20, 0x2001, 0x19ef, 0x2004,
+	0x9005, 0x090c, 0x9687, 0x0005, 0x0002, 0x7df6, 0x810b, 0x7ded,
+	0x7ded, 0x7ded, 0x7ded, 0x7ded, 0x7ded, 0x7817, 0x0140, 0x2001,
+	0x19ef, 0x2004, 0x9005, 0x090c, 0x9687, 0x0005, 0x7000, 0x908c,
+	0xff00, 0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x6892, 0x9286,
+	0x2000, 0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x5739,
+	0x0070, 0x080c, 0x7e5f, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c,
+	0x8046, 0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x8219, 0x7817,
+	0x0140, 0x2001, 0x19ef, 0x2004, 0x9005, 0x090c, 0x9687, 0x0005,
+	0x2001, 0x1810, 0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, 0x2004,
+	0x9086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048, 0x2518,
+	0x080c, 0x4b14, 0x003e, 0x002e, 0x0005, 0x0036, 0x0046, 0x0056,
+	0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036,
+	0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019,
+	0xffff, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0160, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0003, 0x1130, 0x0026, 0x2011, 0x8048, 0x080c,
+	0x4b14, 0x002e, 0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, 0x00b6,
+	0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, 0x9096, 0x0001, 0x0120,
+	0x9096, 0x0023, 0x1904, 0x8017, 0x9186, 0x0023, 0x15c0, 0x080c,
+	0x82ae, 0x0904, 0x8017, 0x6120, 0x9186, 0x0001, 0x0150, 0x9186,
+	0x0004, 0x0138, 0x9186, 0x0008, 0x0120, 0x9186, 0x000a, 0x1904,
+	0x8017, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1130, 0x2009,
+	0x0015, 0x080c, 0xaeec, 0x0804, 0x8017, 0x908e, 0x0214, 0x0118,
+	0x908e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c, 0xaeec, 0x0804,
+	0x8017, 0x908e, 0x0100, 0x1904, 0x8017, 0x7034, 0x9005, 0x1904,
+	0x8017, 0x2009, 0x0016, 0x080c, 0xaeec, 0x0804, 0x8017, 0x9186,
+	0x0022, 0x1904, 0x8017, 0x7030, 0x908e, 0x0300, 0x1580, 0x68dc,
+	0xd0a4, 0x0528, 0xc0b5, 0x68de, 0x7100, 0x918c, 0x00ff, 0x697e,
+	0x7004, 0x6882, 0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006,
+	0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x2889, 0x7932, 0x7936,
+	0x001e, 0x000e, 0x00fe, 0x080c, 0x2840, 0x695e, 0x703c, 0x00e6,
+	0x2071, 0x0140, 0x7086, 0x2071, 0x1800, 0x70b6, 0x00ee, 0x7034,
+	0x9005, 0x1904, 0x8017, 0x2009, 0x0017, 0x0804, 0x7fc7, 0x908e,
+	0x0400, 0x1190, 0x7034, 0x9005, 0x1904, 0x8017, 0x080c, 0x73a5,
+	0x0120, 0x2009, 0x001d, 0x0804, 0x7fc7, 0x68dc, 0xc0a5, 0x68de,
+	0x2009, 0x0030, 0x0804, 0x7fc7, 0x908e, 0x0500, 0x1140, 0x7034,
+	0x9005, 0x1904, 0x8017, 0x2009, 0x0018, 0x0804, 0x7fc7, 0x908e,
+	0x2010, 0x1120, 0x2009, 0x0019, 0x0804, 0x7fc7, 0x908e, 0x2110,
+	0x1120, 0x2009, 0x001a, 0x0804, 0x7fc7, 0x908e, 0x5200, 0x1140,
+	0x7034, 0x9005, 0x1904, 0x8017, 0x2009, 0x001b, 0x0804, 0x7fc7,
+	0x908e, 0x5000, 0x1140, 0x7034, 0x9005, 0x1904, 0x8017, 0x2009,
+	0x001c, 0x0804, 0x7fc7, 0x908e, 0x1300, 0x1120, 0x2009, 0x0034,
+	0x0804, 0x7fc7, 0x908e, 0x1200, 0x1140, 0x7034, 0x9005, 0x1904,
+	0x8017, 0x2009, 0x0024, 0x0804, 0x7fc7, 0x908c, 0xff00, 0x918e,
+	0x2400, 0x1170, 0x2009, 0x002d, 0x2001, 0x1810, 0x2004, 0xd09c,
+	0x0904, 0x7fc7, 0x080c, 0xd924, 0x1904, 0x8017, 0x0804, 0x7fc5,
+	0x908c, 0xff00, 0x918e, 0x5300, 0x1120, 0x2009, 0x002a, 0x0804,
+	0x7fc7, 0x908e, 0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, 0x7fc7,
+	0x908e, 0x6104, 0x1530, 0x2029, 0x0205, 0x2011, 0x026d, 0x8208,
+	0x2204, 0x9082, 0x0004, 0x8004, 0x8004, 0x20a8, 0x2011, 0x8015,
+	0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x4b14, 0x004e, 0x8108,
+	0x0f04, 0x7f7b, 0x9186, 0x0280, 0x1d88, 0x2504, 0x8000, 0x202a,
+	0x2009, 0x0260, 0x0c58, 0x202b, 0x0000, 0x2009, 0x0023, 0x0804,
+	0x7fc7, 0x908e, 0x6000, 0x1120, 0x2009, 0x003f, 0x0804, 0x7fc7,
+	0x908e, 0x5400, 0x1138, 0x080c, 0x83a4, 0x1904, 0x8017, 0x2009,
+	0x0046, 0x04a8, 0x908e, 0x5500, 0x1148, 0x080c, 0x83cc, 0x1118,
+	0x2009, 0x0041, 0x0460, 0x2009, 0x0042, 0x0448, 0x908e, 0x7800,
+	0x1118, 0x2009, 0x0045, 0x0418, 0x908e, 0x1000, 0x1118, 0x2009,
+	0x004e, 0x00e8, 0x908e, 0x6300, 0x1118, 0x2009, 0x004a, 0x00b8,
+	0x908c, 0xff00, 0x918e, 0x5600, 0x1118, 0x2009, 0x004f, 0x0078,
+	0x908c, 0xff00, 0x918e, 0x5700, 0x1118, 0x2009, 0x0050, 0x0038,
+	0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016,
+	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2840, 0x1904,
+	0x801a, 0x080c, 0x65a7, 0x1904, 0x801a, 0xbe12, 0xbd16, 0x001e,
+	0x0016, 0x080c, 0x73a5, 0x01c0, 0x68dc, 0xd08c, 0x1148, 0x7000,
+	0x9084, 0x00ff, 0x1188, 0x7004, 0x9084, 0xff00, 0x1168, 0x0040,
+	0x687c, 0x9606, 0x1148, 0x6880, 0x9506, 0x9084, 0xff00, 0x1120,
+	0x9584, 0x00ff, 0xb8c2, 0x0080, 0xb8c0, 0x9005, 0x1168, 0x9186,
+	0x0046, 0x1150, 0x687c, 0x9606, 0x1138, 0x6880, 0x9506, 0x9084,
+	0xff00, 0x1110, 0x001e, 0x0098, 0x080c, 0xae1b, 0x01a8, 0x2b08,
+	0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x9186, 0x004c,
+	0x1110, 0x6023, 0x000a, 0x0016, 0x001e, 0x080c, 0xaeec, 0x00ce,
+	0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec,
+	0x0120, 0x2011, 0x8049, 0x080c, 0x4b14, 0x080c, 0xaebf, 0x0d90,
+	0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x0016,
+	0x9186, 0x0017, 0x0118, 0x9186, 0x0030, 0x1128, 0x6007, 0x0009,
+	0x6017, 0x2900, 0x0020, 0x6007, 0x0051, 0x6017, 0x0000, 0x602f,
+	0x0009, 0x6003, 0x0001, 0x080c, 0x9121, 0x08a0, 0x080c, 0x32e5,
+	0x1140, 0x7010, 0x9084, 0xff00, 0x8007, 0x908e, 0x0008, 0x1108,
+	0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c, 0xff00,
+	0x810f, 0x9186, 0x0033, 0x11e8, 0x080c, 0x82ae, 0x0904, 0x80a3,
+	0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1140, 0x7034, 0x9005,
+	0x15d0, 0x2009, 0x0015, 0x080c, 0xaeec, 0x04a8, 0x908e, 0x0100,
+	0x1590, 0x7034, 0x9005, 0x1578, 0x2009, 0x0016, 0x080c, 0xaeec,
+	0x0450, 0x9186, 0x0032, 0x1538, 0x7030, 0x908e, 0x1400, 0x1518,
+	0x2009, 0x0038, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c,
+	0x080c, 0x2840, 0x11b8, 0x080c, 0x65a7, 0x11a0, 0xbe12, 0xbd16,
+	0x080c, 0xae1b, 0x0178, 0x2b08, 0x6112, 0x080c, 0xcfc4, 0x6023,
+	0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0xaeec, 0x080c, 0x9687,
+	0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6,
+	0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8,
+	0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f,
+	0x0804, 0x8105, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804,
+	0x8105, 0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011,
+	0x0000, 0x2019, 0x1837, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9,
+	0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f,
+	0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0,
+	0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600,
+	0x9706, 0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745,
+	0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6,
+	0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04, 0x80da, 0x82ff, 0x1118,
+	0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee,
+	0x004e, 0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184,
+	0x000f, 0x0002, 0x8122, 0x8122, 0x8122, 0x82c0, 0x8122, 0x812b,
+	0x8156, 0x81e4, 0x8122, 0x8122, 0x8122, 0x8122, 0x8122, 0x8122,
+	0x8122, 0x8122, 0x7817, 0x0140, 0x2001, 0x19ef, 0x2004, 0x9005,
+	0x090c, 0x9687, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120,
+	0x2160, 0x9c8c, 0x0007, 0x11c0, 0x9c8a, 0x1cd0, 0x02a8, 0x6868,
 	0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910,
 	0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a,
-	0x2009, 0x0045, 0x080c, 0xaedc, 0x7817, 0x0140, 0x2001, 0x19f0,
-	0x2004, 0x9005, 0x090c, 0x968d, 0x00be, 0x0005, 0x6120, 0x9186,
-	0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001, 0x0005,
-	0x080c, 0x32e3, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086,
-	0x0000, 0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b,
-	0x0005, 0x8247, 0x8248, 0x8247, 0x8247, 0x82a7, 0x82b6, 0x0005,
-	0x00b6, 0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904, 0x82a5,
-	0x700c, 0x7108, 0x080c, 0x283e, 0x1904, 0x82a5, 0x080c, 0x659e,
-	0x1904, 0x82a5, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8, 0x080c,
-	0x6972, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, 0x82c5,
-	0x00ce, 0x05d8, 0x080c, 0xae0b, 0x2b08, 0x05b8, 0x6112, 0x080c,
-	0xcfaa, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c,
-	0xaedc, 0x0458, 0x080c, 0x6972, 0x0148, 0x9086, 0x0004, 0x0130,
-	0x080c, 0x697a, 0x0118, 0x9086, 0x0004, 0x1180, 0x080c, 0xae0b,
-	0x2b08, 0x01d8, 0x6112, 0x080c, 0xcfaa, 0x6023, 0x0005, 0x7120,
-	0x610a, 0x2009, 0x0088, 0x080c, 0xaedc, 0x0078, 0x080c, 0xae0b,
-	0x2b08, 0x0158, 0x6112, 0x080c, 0xcfaa, 0x6023, 0x0004, 0x7120,
-	0x610a, 0x2009, 0x0001, 0x080c, 0xaedc, 0x00be, 0x0005, 0x7110,
-	0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x8226, 0x1130, 0x7124,
-	0x610a, 0x2009, 0x0089, 0x080c, 0xaedc, 0x0005, 0x7110, 0xd1bc,
-	0x0158, 0x0059, 0x0148, 0x080c, 0x8226, 0x1130, 0x7124, 0x610a,
-	0x2009, 0x008a, 0x080c, 0xaedc, 0x0005, 0x7020, 0x2060, 0x9c84,
-	0x0007, 0x1158, 0x9c82, 0x1cd0, 0x0240, 0x2001, 0x181a, 0x2004,
-	0x9c02, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x00b6,
-	0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84, 0x0007, 0x11b0,
-	0x9c82, 0x1cd0, 0x0298, 0x6868, 0x9c02, 0x1280, 0x7008, 0x9084,
-	0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1140, 0x700c, 0xb914,
-	0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0xaedc, 0x7817, 0x0140,
-	0x2001, 0x19f0, 0x2004, 0x9005, 0x090c, 0x968d, 0x00be, 0x0005,
-	0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049, 0x0005,
-	0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009, 0x0005,
-	0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086, 0xc000,
-	0x05d0, 0x080c, 0xae0b, 0x05b8, 0x0066, 0x00c6, 0x0046, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x283e, 0x15a0, 0x080c,
-	0x659e, 0x1588, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce, 0x6012,
-	0x080c, 0xcfaa, 0x080c, 0x0fff, 0x0510, 0x2900, 0x605a, 0x9006,
-	0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9, 0x000e,
-	0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003, 0x006e,
-	0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001, 0x080c,
-	0x9138, 0x080c, 0x968d, 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c,
-	0xae61, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6, 0x7000,
-	0x908c, 0xff00, 0x9184, 0xf000, 0x810f, 0x9086, 0x2000, 0x1904,
-	0x83b5, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005,
-	0x1904, 0x83b7, 0x7030, 0x908e, 0x0400, 0x0904, 0x83b7, 0x908e,
-	0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e, 0x0300, 0x11d8,
-	0x2009, 0x1837, 0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c,
-	0x6930, 0x0558, 0x68b0, 0x9084, 0x00ff, 0x7100, 0x918c, 0x00ff,
-	0x9106, 0x1518, 0x6880, 0x69b0, 0x918c, 0xff00, 0x9105, 0x7104,
-	0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4, 0x11a8,
-	0x908e, 0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e, 0x5000,
-	0x09b8, 0x0058, 0x9186, 0x0023, 0x1140, 0x080c, 0x82c5, 0x0128,
-	0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006, 0x0010, 0x9085,
-	0x0001, 0x00ce, 0x0005, 0x0156, 0x0046, 0x0016, 0x0036, 0x7038,
-	0x2020, 0x8427, 0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004,
-	0x2019, 0x1805, 0x2011, 0x027a, 0x080c, 0xbe09, 0x1178, 0xd48c,
-	0x0148, 0x20a9, 0x0004, 0x2019, 0x1801, 0x2011, 0x027e, 0x080c,
-	0xbe09, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001, 0x003e, 0x001e,
-	0x004e, 0x015e, 0x0005, 0x0156, 0x0046, 0x0016, 0x0036, 0x7038,
-	0x2020, 0x8427, 0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004,
-	0x2019, 0x1805, 0x2011, 0x0272, 0x080c, 0xbe09, 0x1178, 0xd48c,
-	0x0148, 0x20a9, 0x0004, 0x2019, 0x1801, 0x2011, 0x0276, 0x080c,
-	0xbe09, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001, 0x003e, 0x001e,
-	0x004e, 0x015e, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7800, 0xc0e5,
-	0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800, 0x7834,
-	0xd084, 0x1130, 0x2079, 0x0200, 0x7800, 0x9085, 0x1200, 0x7802,
-	0x00fe, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7034, 0xc084, 0x7036,
-	0x00ee, 0x0005, 0x2071, 0x19fa, 0x7003, 0x0003, 0x700f, 0x0361,
-	0x9006, 0x701a, 0x7072, 0x7012, 0x7017, 0x1cd0, 0x7007, 0x0000,
-	0x7026, 0x702b, 0xa289, 0x7032, 0x7037, 0xa2f7, 0x703f, 0xffff,
-	0x7042, 0x7047, 0x556e, 0x704a, 0x705b, 0x8594, 0x080c, 0x1018,
-	0x090c, 0x0dd5, 0x2900, 0x703a, 0xa867, 0x0003, 0xa86f, 0x0100,
-	0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19fa, 0x1d04, 0x84e2, 0x2091,
-	0x6000, 0x700c, 0x8001, 0x700e, 0x1530, 0x2001, 0x013c, 0x2004,
-	0x9005, 0x190c, 0x85d9, 0x2001, 0x1869, 0x2004, 0xd0c4, 0x0158,
-	0x3a00, 0xd08c, 0x1140, 0x20d1, 0x0000, 0x20d1, 0x0001, 0x20d1,
-	0x0000, 0x080c, 0x0dd5, 0x700f, 0x0361, 0x7007, 0x0001, 0x0126,
-	0x2091, 0x8000, 0x7040, 0x900d, 0x0148, 0x8109, 0x7142, 0x1130,
-	0x7044, 0x080f, 0x0018, 0x0126, 0x2091, 0x8000, 0x7024, 0x900d,
-	0x0188, 0x7020, 0x8001, 0x7022, 0x1168, 0x7023, 0x0009, 0x8109,
-	0x7126, 0x9186, 0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110,
-	0x7028, 0x080f, 0x7030, 0x900d, 0x0180, 0x702c, 0x8001, 0x702e,
-	0x1160, 0x702f, 0x0009, 0x8109, 0x7132, 0x0128, 0x9184, 0x007f,
-	0x090c, 0xa418, 0x0010, 0x7034, 0x080f, 0x703c, 0x9005, 0x0118,
-	0x0310, 0x8001, 0x703e, 0x704c, 0x900d, 0x0168, 0x7048, 0x8001,
-	0x704a, 0x1148, 0x704b, 0x0009, 0x8109, 0x714e, 0x1120, 0x7150,
-	0x714e, 0x7058, 0x080f, 0x7018, 0x900d, 0x01d8, 0x0016, 0x7070,
-	0x900d, 0x0158, 0x706c, 0x8001, 0x706e, 0x1138, 0x706f, 0x0009,
-	0x8109, 0x7172, 0x1110, 0x7074, 0x080f, 0x001e, 0x7008, 0x8001,
-	0x700a, 0x1138, 0x700b, 0x0009, 0x8109, 0x711a, 0x1110, 0x701c,
-	0x080f, 0x012e, 0x7004, 0x0002, 0x850a, 0x850b, 0x8527, 0x00e6,
-	0x2071, 0x19fa, 0x7018, 0x9005, 0x1120, 0x711a, 0x721e, 0x700b,
-	0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19fa, 0x701c,
-	0x9206, 0x1120, 0x701a, 0x701e, 0x7072, 0x7076, 0x000e, 0x00ee,
-	0x0005, 0x00e6, 0x2071, 0x19fa, 0xb888, 0x9102, 0x0208, 0xb98a,
-	0x00ee, 0x0005, 0x0005, 0x00b6, 0x7110, 0x080c, 0x65ff, 0x1168,
-	0xb888, 0x8001, 0x0250, 0xb88a, 0x1140, 0x0126, 0x2091, 0x8000,
-	0x0016, 0x080c, 0x968d, 0x001e, 0x012e, 0x8108, 0x9182, 0x0800,
-	0x0218, 0x900e, 0x7007, 0x0002, 0x7112, 0x00be, 0x0005, 0x7014,
-	0x2060, 0x0126, 0x2091, 0x8000, 0x6040, 0x9005, 0x0128, 0x8001,
-	0x6042, 0x1110, 0x080c, 0xce3b, 0x6018, 0x9005, 0x0558, 0x8001,
-	0x601a, 0x1540, 0x6120, 0x9186, 0x0003, 0x0148, 0x9186, 0x0006,
-	0x0130, 0x9186, 0x0009, 0x11e0, 0x611c, 0xd1c4, 0x1100, 0x080c,
-	0xcb35, 0x01b0, 0x6014, 0x2048, 0xa884, 0x908a, 0x199a, 0x0280,
-	0x9082, 0x1999, 0xa886, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999,
-	0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0xd0e4, 0x0110,
-	0x080c, 0xc833, 0x012e, 0x9c88, 0x0018, 0x7116, 0x2001, 0x181a,
-	0x2004, 0x9102, 0x0220, 0x7017, 0x1cd0, 0x7007, 0x0000, 0x0005,
-	0x00e6, 0x2071, 0x19fa, 0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee,
-	0x0005, 0x2001, 0x1a03, 0x2003, 0x0000, 0x0005, 0x00e6, 0x2071,
-	0x19fa, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, 0x1a06,
-	0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19fa, 0x711a, 0x721e,
-	0x700b, 0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, 0x7054, 0x8000,
-	0x7056, 0x2001, 0x1a08, 0x2044, 0xa06c, 0x9086, 0x0000, 0x0150,
-	0x7068, 0xa09a, 0x7064, 0xa096, 0x7060, 0xa092, 0x705c, 0xa08e,
-	0x080c, 0x10e9, 0x002e, 0x008e, 0x0005, 0x0006, 0x0016, 0x0096,
-	0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c,
-	0x8453, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae,
-	0x009e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x19fa, 0x7172,
-	0x7276, 0x706f, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071,
-	0x19fa, 0x7074, 0x9206, 0x1110, 0x7072, 0x7076, 0x000e, 0x00ee,
-	0x0005, 0x0016, 0x00c6, 0x2009, 0xfffc, 0x210d, 0x2061, 0x0100,
-	0x60f0, 0x9100, 0x60f3, 0x0000, 0x2009, 0xfffc, 0x200f, 0x1220,
-	0x8108, 0x2105, 0x8000, 0x200f, 0x00ce, 0x001e, 0x0005, 0x00c6,
-	0x2061, 0x1a71, 0x00ce, 0x0005, 0x9184, 0x000f, 0x8003, 0x8003,
-	0x8003, 0x9080, 0x1a71, 0x2060, 0x0005, 0xa884, 0x908a, 0x199a,
-	0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a71, 0x6014, 0x00ce,
-	0x9005, 0x1130, 0x2001, 0x001e, 0x0018, 0x908e, 0xffff, 0x01b0,
-	0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0x908c, 0x00c0,
-	0x918e, 0x00c0, 0x0904, 0x8687, 0xd0b4, 0x1168, 0xd0bc, 0x1904,
-	0x8660, 0x2009, 0x0006, 0x080c, 0x86b4, 0x0005, 0x900e, 0x0c60,
-	0x2001, 0x1999, 0x08b0, 0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120,
-	0x918e, 0x0003, 0x1904, 0x86ae, 0x908c, 0x2020, 0x918e, 0x2020,
-	0x01a8, 0x6024, 0xd0d4, 0x11e8, 0x2009, 0x1869, 0x2104, 0xd084,
-	0x1138, 0x87ff, 0x1120, 0x2009, 0x0043, 0x0804, 0xaedc, 0x0005,
-	0x87ff, 0x1de8, 0x2009, 0x0042, 0x0804, 0xaedc, 0x6110, 0x00b6,
-	0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd, 0x6026,
-	0x0c00, 0xc0d4, 0x6026, 0xa890, 0x602e, 0xa88c, 0x6032, 0x08e0,
-	0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904,
-	0x86ae, 0x908c, 0x2020, 0x918e, 0x2020, 0x0170, 0x0076, 0x00f6,
-	0x2c78, 0x080c, 0x1725, 0x00fe, 0x007e, 0x87ff, 0x1120, 0x2009,
-	0x0042, 0x080c, 0xaedc, 0x0005, 0x6110, 0x00b6, 0x2158, 0xb900,
-	0x00be, 0xd1ac, 0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38, 0xd0fc,
-	0x0188, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x9084, 0x0003,
-	0x908e, 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, 0x0041, 0x080c,
-	0xaedc, 0x0005, 0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009, 0x0043,
-	0x080c, 0xaedc, 0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be,
-	0xd1ac, 0x0d20, 0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009, 0x0004,
-	0x0019, 0x0005, 0x2009, 0x0001, 0x0096, 0x080c, 0xcb35, 0x0518,
-	0x6014, 0x2048, 0xa982, 0xa800, 0x6016, 0x9186, 0x0001, 0x1188,
-	0xa97c, 0x918c, 0x8100, 0x918e, 0x8100, 0x1158, 0x00c6, 0x2061,
-	0x1a71, 0x6200, 0xd28c, 0x1120, 0x6204, 0x8210, 0x0208, 0x6206,
-	0x00ce, 0x080c, 0x6abc, 0x6014, 0x904d, 0x0076, 0x2039, 0x0000,
-	0x190c, 0x85fd, 0x007e, 0x009e, 0x0005, 0x0156, 0x00c6, 0x2061,
-	0x1a71, 0x6000, 0x81ff, 0x0110, 0x9205, 0x0008, 0x9204, 0x6002,
-	0x00ce, 0x015e, 0x0005, 0x6800, 0xd08c, 0x1138, 0x6808, 0x9005,
-	0x0120, 0x8001, 0x680a, 0x9085, 0x0001, 0x0005, 0x2071, 0x1923,
-	0x7003, 0x0006, 0x7007, 0x0000, 0x700f, 0x0000, 0x7013, 0x0001,
-	0x080c, 0x1018, 0x090c, 0x0dd5, 0xa867, 0x0006, 0xa86b, 0x0001,
-	0xa8ab, 0xdcb0, 0xa89f, 0x0000, 0x2900, 0x702e, 0x7033, 0x0000,
-	0x0005, 0x0096, 0x00e6, 0x2071, 0x1923, 0x702c, 0x2048, 0x6a2c,
-	0x721e, 0x6b30, 0x7322, 0x6834, 0x7026, 0xa896, 0x6838, 0x702a,
-	0xa89a, 0x6824, 0x7016, 0x683c, 0x701a, 0x2009, 0x0028, 0x200a,
-	0x9005, 0x0148, 0x900e, 0x9188, 0x000c, 0x8001, 0x1de0, 0x2100,
-	0x9210, 0x1208, 0x8318, 0xaa8e, 0xab92, 0x7010, 0xd084, 0x0178,
-	0xc084, 0x7007, 0x0001, 0x700f, 0x0000, 0x0006, 0x2009, 0x181d,
-	0x2104, 0x9082, 0x0007, 0x2009, 0x1ac8, 0x200a, 0x000e, 0xc095,
-	0x7012, 0x2008, 0x2001, 0x003b, 0x080c, 0x15ee, 0x9006, 0x2071,
-	0x193c, 0x7002, 0x7006, 0x702a, 0x00ee, 0x009e, 0x0005, 0x00e6,
-	0x0126, 0x0156, 0x2091, 0x8000, 0x2071, 0x1800, 0x7154, 0x2001,
-	0x0008, 0x910a, 0x0638, 0x2001, 0x187d, 0x20ac, 0x9006, 0x9080,
-	0x0008, 0x1f04, 0x8767, 0x71c0, 0x9102, 0x02e0, 0x2071, 0x1877,
-	0x20a9, 0x0007, 0x00c6, 0x080c, 0xae0b, 0x6023, 0x0009, 0x6003,
-	0x0004, 0x601f, 0x0101, 0x0089, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x88ed, 0x012e, 0x1f04, 0x8773, 0x9006, 0x00ce, 0x015e, 0x012e,
-	0x00ee, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x00e6, 0x00b6, 0x0096,
-	0x0086, 0x0056, 0x0046, 0x0026, 0x7118, 0x720c, 0x7620, 0x7004,
-	0xd084, 0x1128, 0x2021, 0x0024, 0x2029, 0x0002, 0x0020, 0x2021,
-	0x002c, 0x2029, 0x000a, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0x2900,
-	0x6016, 0x2058, 0xac66, 0x9006, 0xa802, 0xa806, 0xa86a, 0xa87a,
-	0xa8aa, 0xa887, 0x0005, 0xa87f, 0x0020, 0x7008, 0xa89a, 0x7010,
-	0xa89e, 0xae8a, 0xa8af, 0xffff, 0xa8b3, 0x0000, 0x8109, 0x0160,
-	0x080c, 0x0fff, 0x090c, 0x0dd5, 0xad66, 0x2b00, 0xa802, 0x2900,
-	0xb806, 0x2058, 0x8109, 0x1da0, 0x002e, 0x004e, 0x005e, 0x008e,
-	0x009e, 0x00be, 0x00ee, 0x0005, 0x2079, 0x0000, 0x2071, 0x1923,
-	0x7004, 0x004b, 0x700c, 0x0002, 0x87df, 0x87d8, 0x87d8, 0x0005,
-	0x87e9, 0x884a, 0x884a, 0x884a, 0x884b, 0x885c, 0x885c, 0x700c,
-	0x0cba, 0x0126, 0x2091, 0x8000, 0x78a0, 0x79a0, 0x9106, 0x0128,
-	0x78a0, 0x79a0, 0x9106, 0x1904, 0x883d, 0x2001, 0x0005, 0x2004,
-	0xd0bc, 0x0130, 0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012, 0x0ca8,
-	0x012e, 0x7018, 0x910a, 0x1130, 0x7030, 0x9005, 0x05a8, 0x080c,
-	0x888b, 0x0490, 0x1210, 0x7114, 0x910a, 0x9192, 0x000a, 0x0210,
-	0x2009, 0x000a, 0x2001, 0x1888, 0x2014, 0x2001, 0x1935, 0x2004,
-	0x9100, 0x9202, 0x0e48, 0x080c, 0x89d7, 0x2200, 0x9102, 0x0208,
-	0x2208, 0x0096, 0x702c, 0x2048, 0xa873, 0x0001, 0xa976, 0x080c,
-	0x8ae0, 0x2100, 0xa87e, 0xa86f, 0x0000, 0x009e, 0x0126, 0x2091,
-	0x8000, 0x2009, 0x1a18, 0x2104, 0xc085, 0x200a, 0x700f, 0x0002,
-	0x012e, 0x080c, 0x1108, 0x1de8, 0x0005, 0x2001, 0x0005, 0x2004,
-	0xd0bc, 0x0130, 0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012, 0x0ca8,
-	0x012e, 0x0005, 0x0005, 0x700c, 0x0002, 0x8850, 0x8853, 0x8852,
-	0x080c, 0x87e7, 0x0005, 0x8001, 0x700e, 0x0096, 0x702c, 0x2048,
-	0xa974, 0x009e, 0x0011, 0x0ca0, 0x0005, 0x0096, 0x702c, 0x2048,
-	0x7018, 0x9100, 0x7214, 0x921a, 0x1130, 0x701c, 0xa88e, 0x7020,
-	0xa892, 0x9006, 0x0068, 0x0006, 0x080c, 0x8ae0, 0x2100, 0xaa8c,
-	0x9210, 0xaa8e, 0x1220, 0xa890, 0x9081, 0x0000, 0xa892, 0x000e,
-	0x009e, 0x2f08, 0x9188, 0x0028, 0x200a, 0x701a, 0x0005, 0x00e6,
-	0x2071, 0x1923, 0x700c, 0x0002, 0x8889, 0x8889, 0x8887, 0x700f,
-	0x0001, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x7030, 0x9005,
-	0x0508, 0x2078, 0x7814, 0x2048, 0xae88, 0x00b6, 0x2059, 0x0000,
-	0x080c, 0x88f6, 0x00be, 0x01b0, 0x00e6, 0x2071, 0x193c, 0x080c,
-	0x893d, 0x00ee, 0x0178, 0x0096, 0x080c, 0x1018, 0x2900, 0x009e,
-	0x0148, 0xa8aa, 0x04b9, 0x0041, 0x2001, 0x1946, 0x2003, 0x0000,
-	0x012e, 0x08c8, 0x012e, 0x0005, 0x00d6, 0x00c6, 0x0086, 0x00a6,
-	0x2940, 0x2650, 0x2600, 0x9005, 0x0180, 0xa864, 0x9084, 0x000f,
-	0x2068, 0x9d88, 0x2090, 0x2165, 0x0056, 0x2029, 0x0000, 0x080c,
-	0x8a65, 0x080c, 0x2048, 0x1dd8, 0x005e, 0x00ae, 0x2001, 0x187f,
-	0x2004, 0xa88a, 0x080c, 0x1725, 0x781f, 0x0101, 0x7813, 0x0000,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x894c, 0x012e, 0x008e, 0x00ce,
-	0x00de, 0x0005, 0x7030, 0x9005, 0x0138, 0x2078, 0x780c, 0x7032,
-	0x2001, 0x1946, 0x2003, 0x0001, 0x0005, 0x00e6, 0x2071, 0x1923,
-	0x7030, 0x600e, 0x2c00, 0x7032, 0x00ee, 0x0005, 0x00d6, 0x00c6,
-	0x0026, 0x9b80, 0x8bbf, 0x2005, 0x906d, 0x090c, 0x0dd5, 0x9b80,
-	0x8bb7, 0x2005, 0x9065, 0x090c, 0x0dd5, 0x6114, 0x2600, 0x9102,
-	0x0248, 0x6828, 0x9102, 0x02f0, 0x9085, 0x0001, 0x002e, 0x00ce,
-	0x00de, 0x0005, 0x6804, 0xd094, 0x0148, 0x6854, 0xd084, 0x1178,
-	0xc085, 0x6856, 0x2011, 0x8026, 0x080c, 0x4b04, 0x684c, 0x0096,
-	0x904d, 0x090c, 0x0dd5, 0xa804, 0x8000, 0xa806, 0x009e, 0x9006,
-	0x2030, 0x0c20, 0x6854, 0xd08c, 0x1d08, 0xc08d, 0x6856, 0x2011,
-	0x8025, 0x080c, 0x4b04, 0x684c, 0x0096, 0x904d, 0x090c, 0x0dd5,
-	0xa800, 0x8000, 0xa802, 0x009e, 0x0888, 0x7000, 0x2019, 0x0008,
-	0x8319, 0x7104, 0x9102, 0x1118, 0x2300, 0x9005, 0x0020, 0x0210,
-	0x9302, 0x0008, 0x8002, 0x0005, 0x00d6, 0x7814, 0x9005, 0x090c,
-	0x0dd5, 0x781c, 0x9084, 0x0101, 0x9086, 0x0101, 0x190c, 0x0dd5,
-	0x2069, 0x193c, 0x6804, 0x9080, 0x193e, 0x2f08, 0x2102, 0x6904,
-	0x8108, 0x9182, 0x0008, 0x0208, 0x900e, 0x6906, 0x9180, 0x193e,
-	0x2003, 0x0000, 0x00de, 0x0005, 0x0096, 0x00c6, 0x2060, 0x6014,
-	0x2048, 0xa8a8, 0x0096, 0x2048, 0x9005, 0x190c, 0x1031, 0x009e,
-	0xa8ab, 0x0000, 0x080c, 0x0fb1, 0x080c, 0xae61, 0x00ce, 0x009e,
-	0x0005, 0x6020, 0x9086, 0x0009, 0x1128, 0x601c, 0xd0c4, 0x0110,
-	0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x6000, 0x9086, 0x0000,
-	0x0178, 0x6010, 0x9005, 0x0150, 0x00b6, 0x2058, 0x080c, 0x8cf2,
-	0x00be, 0x6013, 0x0000, 0x601b, 0x0000, 0x0010, 0x2c00, 0x0861,
-	0x0005, 0x2009, 0x1927, 0x210c, 0xd194, 0x0005, 0x00e6, 0x2071,
-	0x1923, 0x7110, 0xc194, 0xd19c, 0x1118, 0xc185, 0x7007, 0x0000,
-	0x7112, 0x2001, 0x003b, 0x080c, 0x15ee, 0x00ee, 0x0005, 0x0096,
-	0x00d6, 0x9006, 0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x7016,
-	0x702a, 0x7026, 0x702f, 0x0000, 0x080c, 0x8b3f, 0x0170, 0x080c,
-	0x8b74, 0x0158, 0x2900, 0x7002, 0x700a, 0x701a, 0x7013, 0x0001,
-	0x701f, 0x000a, 0x00de, 0x009e, 0x0005, 0x900e, 0x0cd8, 0x00e6,
-	0x0096, 0x0086, 0x00d6, 0x00c6, 0x2071, 0x1930, 0x721c, 0x2100,
-	0x9202, 0x1618, 0x080c, 0x8b74, 0x090c, 0x0dd5, 0x7018, 0x9005,
-	0x1160, 0x2900, 0x7002, 0x700a, 0x701a, 0x9006, 0x7006, 0x700e,
-	0xa806, 0xa802, 0x7012, 0x701e, 0x0038, 0x2040, 0xa806, 0x2900,
-	0xa002, 0x701a, 0xa803, 0x0000, 0x7010, 0x8000, 0x7012, 0x701c,
-	0x9080, 0x000a, 0x701e, 0x721c, 0x08d0, 0x721c, 0x00ce, 0x00de,
-	0x008e, 0x009e, 0x00ee, 0x0005, 0x0096, 0x0156, 0x0136, 0x0146,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1930, 0x7300, 0x831f,
-	0x831e, 0x831e, 0x9384, 0x003f, 0x20e8, 0x939c, 0xffc0, 0x9398,
-	0x0003, 0x7104, 0x080c, 0x8ae0, 0x810c, 0x2100, 0x9318, 0x8003,
-	0x2228, 0x2021, 0x0078, 0x9402, 0x9532, 0x0208, 0x2028, 0x2500,
-	0x8004, 0x20a8, 0x23a0, 0xa001, 0xa001, 0x4005, 0x2508, 0x080c,
-	0x8ae9, 0x2130, 0x7014, 0x9600, 0x7016, 0x2600, 0x711c, 0x9102,
-	0x701e, 0x7004, 0x9600, 0x2008, 0x9082, 0x000a, 0x1190, 0x7000,
-	0x2048, 0xa800, 0x9005, 0x1148, 0x2009, 0x0001, 0x0026, 0x080c,
-	0x89d7, 0x002e, 0x7000, 0x2048, 0xa800, 0x7002, 0x7007, 0x0000,
-	0x0008, 0x7106, 0x2500, 0x9212, 0x1904, 0x8a16, 0x012e, 0x00ee,
-	0x014e, 0x013e, 0x015e, 0x009e, 0x0005, 0x0016, 0x0026, 0x00e6,
-	0x0126, 0x2091, 0x8000, 0x9580, 0x8bb7, 0x2005, 0x9075, 0x090c,
-	0x0dd5, 0x080c, 0x8abb, 0x012e, 0x9580, 0x8bb3, 0x2005, 0x9075,
-	0x090c, 0x0dd5, 0x0156, 0x0136, 0x01c6, 0x0146, 0x01d6, 0x831f,
-	0x831e, 0x831e, 0x9384, 0x003f, 0x20e0, 0x9384, 0xffc0, 0x9100,
-	0x2098, 0xa860, 0x20e8, 0xa95c, 0x2c05, 0x9100, 0x20a0, 0x20a9,
-	0x0002, 0x4003, 0x2e0c, 0x2d00, 0x0002, 0x8aa5, 0x8aa5, 0x8aa7,
-	0x8aa5, 0x8aa7, 0x8aa5, 0x8aa5, 0x8aa5, 0x8aa5, 0x8aa5, 0x8aad,
-	0x8aa5, 0x8aad, 0x8aa5, 0x8aa5, 0x8aa5, 0x080c, 0x0dd5, 0x4104,
-	0x20a9, 0x0002, 0x4002, 0x4003, 0x0028, 0x20a9, 0x0002, 0x4003,
-	0x4104, 0x4003, 0x01de, 0x014e, 0x01ce, 0x013e, 0x015e, 0x00ee,
-	0x002e, 0x001e, 0x0005, 0x0096, 0x7014, 0x8001, 0x7016, 0x710c,
-	0x2110, 0x00f1, 0x810c, 0x9188, 0x0003, 0x7308, 0x8210, 0x9282,
-	0x000a, 0x1198, 0x7008, 0x2048, 0xa800, 0x9005, 0x0158, 0x0006,
-	0x080c, 0x8b83, 0x009e, 0xa807, 0x0000, 0x2900, 0x700a, 0x7010,
-	0x8001, 0x7012, 0x700f, 0x0000, 0x0008, 0x720e, 0x009e, 0x0005,
-	0x0006, 0x810b, 0x810b, 0x2100, 0x810b, 0x9100, 0x2008, 0x000e,
-	0x0005, 0x0006, 0x0026, 0x2100, 0x9005, 0x0158, 0x9092, 0x000c,
-	0x0240, 0x900e, 0x8108, 0x9082, 0x000c, 0x1de0, 0x002e, 0x000e,
-	0x0005, 0x900e, 0x0cd8, 0x2d00, 0x90b8, 0x0008, 0x690c, 0x6810,
-	0x2019, 0x0001, 0x2031, 0x8b29, 0x9112, 0x0220, 0x0118, 0x8318,
-	0x2208, 0x0cd0, 0x6808, 0x9005, 0x0108, 0x8318, 0x233a, 0x6804,
-	0xd084, 0x2300, 0x2021, 0x0001, 0x1150, 0x9082, 0x0003, 0x0967,
-	0x0a67, 0x8420, 0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0, 0x9082,
-	0x0002, 0x0967, 0x0a67, 0x8420, 0x9082, 0x0005, 0x0967, 0x0a67,
-	0x0cd0, 0x6c1a, 0x2d00, 0x90b8, 0x0007, 0x00e6, 0x2071, 0x1800,
-	0x7128, 0x6810, 0x2019, 0x0001, 0x910a, 0x0118, 0x0210, 0x8318,
-	0x0cd8, 0x2031, 0x8b3c, 0x0870, 0x6c16, 0x00ee, 0x0005, 0x0096,
-	0x0046, 0x0126, 0x2091, 0x8000, 0x2b00, 0x9080, 0x8bbb, 0x2005,
-	0x9005, 0x090c, 0x0dd5, 0x2004, 0x90a0, 0x000a, 0x080c, 0x1018,
-	0x01d0, 0x2900, 0x7026, 0xa803, 0x0000, 0xa807, 0x0000, 0x080c,
-	0x1018, 0x0188, 0x7024, 0xa802, 0xa807, 0x0000, 0x2900, 0x7026,
-	0x94a2, 0x000a, 0x0110, 0x0208, 0x0c90, 0x9085, 0x0001, 0x012e,
-	0x004e, 0x009e, 0x0005, 0x7024, 0x9005, 0x0dc8, 0x2048, 0xac00,
-	0x080c, 0x1031, 0x2400, 0x0cc0, 0x0126, 0x2091, 0x8000, 0x7024,
-	0x2048, 0x9005, 0x0130, 0xa800, 0x7026, 0xa803, 0x0000, 0xa807,
-	0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x7024, 0xa802,
-	0x2900, 0x7026, 0x012e, 0x0005, 0x0096, 0x9e80, 0x0009, 0x2004,
-	0x9005, 0x0138, 0x2048, 0xa800, 0x0006, 0x080c, 0x1031, 0x000e,
-	0x0cb8, 0x009e, 0x0005, 0x0096, 0x7008, 0x9005, 0x0138, 0x2048,
-	0xa800, 0x0006, 0x080c, 0x1031, 0x000e, 0x0cb8, 0x9006, 0x7002,
-	0x700a, 0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x702a, 0x7026,
-	0x702e, 0x009e, 0x0005, 0x1a64, 0x0000, 0x0000, 0x0000, 0x1930,
-	0x0000, 0x0000, 0x0000, 0x1888, 0x0000, 0x0000, 0x0000, 0x1877,
-	0x0000, 0x0000, 0x0000, 0x00e6, 0x00c6, 0x00b6, 0x00a6, 0xa8a8,
-	0x2040, 0x2071, 0x1877, 0x080c, 0x8cdd, 0xa067, 0x0023, 0x6010,
-	0x905d, 0x0904, 0x8cb2, 0xb814, 0xa06e, 0xb910, 0xa172, 0xb9a0,
-	0xa176, 0x2001, 0x0003, 0xa07e, 0xa834, 0xa082, 0xa07b, 0x0000,
-	0xa898, 0x9005, 0x0118, 0xa078, 0xc085, 0xa07a, 0x2858, 0x2031,
-	0x0018, 0xa068, 0x908a, 0x0019, 0x1a0c, 0x0dd5, 0x2020, 0x2050,
-	0x2940, 0xa864, 0x90bc, 0x00ff, 0x908c, 0x000f, 0x91e0, 0x2090,
-	0x2c65, 0x9786, 0x0024, 0x2c05, 0x1590, 0x908a, 0x0036, 0x1a0c,
-	0x0dd5, 0x9082, 0x001b, 0x0002, 0x8c1f, 0x8c1f, 0x8c21, 0x8c1f,
-	0x8c1f, 0x8c1f, 0x8c23, 0x8c1f, 0x8c1f, 0x8c1f, 0x8c25, 0x8c1f,
-	0x8c1f, 0x8c1f, 0x8c27, 0x8c1f, 0x8c1f, 0x8c1f, 0x8c29, 0x8c1f,
-	0x8c1f, 0x8c1f, 0x8c2b, 0x8c1f, 0x8c1f, 0x8c1f, 0x8c2d, 0x080c,
-	0x0dd5, 0xa180, 0x04b8, 0xa190, 0x04a8, 0xa1a0, 0x0498, 0xa1b0,
-	0x0488, 0xa1c0, 0x0478, 0xa1d0, 0x0468, 0xa1e0, 0x0458, 0x908a,
-	0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x8c51, 0x8c4f,
-	0x8c4f, 0x8c4f, 0x8c4f, 0x8c4f, 0x8c53, 0x8c4f, 0x8c4f, 0x8c4f,
-	0x8c4f, 0x8c4f, 0x8c55, 0x8c4f, 0x8c4f, 0x8c4f, 0x8c4f, 0x8c4f,
-	0x8c57, 0x8c4f, 0x8c4f, 0x8c4f, 0x8c4f, 0x8c4f, 0x8c59, 0x080c,
-	0x0dd5, 0xa180, 0x0038, 0xa198, 0x0028, 0xa1b0, 0x0018, 0xa1c8,
-	0x0008, 0xa1e0, 0x2600, 0x0002, 0x8c75, 0x8c77, 0x8c79, 0x8c7b,
-	0x8c7d, 0x8c7f, 0x8c81, 0x8c83, 0x8c85, 0x8c87, 0x8c89, 0x8c8b,
-	0x8c8d, 0x8c8f, 0x8c91, 0x8c93, 0x8c95, 0x8c97, 0x8c99, 0x8c9b,
-	0x8c9d, 0x8c9f, 0x8ca1, 0x8ca3, 0x8ca5, 0x080c, 0x0dd5, 0xb9e2,
-	0x0468, 0xb9de, 0x0458, 0xb9da, 0x0448, 0xb9d6, 0x0438, 0xb9d2,
-	0x0428, 0xb9ce, 0x0418, 0xb9ca, 0x0408, 0xb9c6, 0x00f8, 0xb9c2,
-	0x00e8, 0xb9be, 0x00d8, 0xb9ba, 0x00c8, 0xb9b6, 0x00b8, 0xb9b2,
-	0x00a8, 0xb9ae, 0x0098, 0xb9aa, 0x0088, 0xb9a6, 0x0078, 0xb9a2,
-	0x0068, 0xb99e, 0x0058, 0xb99a, 0x0048, 0xb996, 0x0038, 0xb992,
-	0x0028, 0xb98e, 0x0018, 0xb98a, 0x0008, 0xb986, 0x8631, 0x8421,
-	0x0120, 0x080c, 0x2048, 0x0804, 0x8bf9, 0x00ae, 0x00be, 0x00ce,
-	0x00ee, 0x0005, 0xa86c, 0xa06e, 0xa870, 0xa072, 0xa077, 0x00ff,
-	0x9006, 0x0804, 0x8bdb, 0x0006, 0x0016, 0x00b6, 0x6010, 0x2058,
-	0xb810, 0x9005, 0x01b0, 0x2001, 0x1924, 0x2004, 0x9005, 0x0188,
-	0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046,
-	0xbba0, 0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4b04, 0x004e,
-	0x003e, 0x00be, 0x001e, 0x000e, 0x0005, 0x9016, 0x710c, 0xa834,
-	0x910a, 0xa936, 0x7008, 0x9005, 0x0120, 0x8210, 0x910a, 0x0238,
-	0x0130, 0x7010, 0x8210, 0x910a, 0x0210, 0x0108, 0x0cd8, 0xaa8a,
-	0xa26a, 0x0005, 0x00f6, 0x00d6, 0x0036, 0x2079, 0x0300, 0x781b,
-	0x0200, 0x7818, 0xd094, 0x1dd8, 0x781b, 0x0202, 0xa001, 0xa001,
-	0x7818, 0xd094, 0x1da0, 0xb8ac, 0x9005, 0x01b8, 0x2068, 0x2079,
-	0x0000, 0x2c08, 0x911e, 0x1118, 0x680c, 0xb8ae, 0x0060, 0x9106,
-	0x0140, 0x2d00, 0x2078, 0x680c, 0x9005, 0x090c, 0x0dd5, 0x2068,
-	0x0cb0, 0x6b0c, 0x7b0e, 0x600f, 0x0000, 0x2079, 0x0300, 0x781b,
-	0x0200, 0x003e, 0x00de, 0x00fe, 0x0005, 0x00e6, 0x00d6, 0x0096,
-	0x00c6, 0x0036, 0x0126, 0x2091, 0x8000, 0x0156, 0x20a9, 0x01ff,
-	0x2071, 0x0300, 0x701b, 0x0200, 0x7018, 0xd094, 0x0110, 0x1f04,
-	0x8d32, 0x701b, 0x0202, 0xa001, 0xa001, 0x7018, 0xd094, 0x1d90,
-	0xb8ac, 0x9005, 0x01d0, 0x2060, 0x600c, 0xb8ae, 0x6003, 0x0004,
-	0x601b, 0x0000, 0x6013, 0x0000, 0x601f, 0x0101, 0x6014, 0x2048,
-	0xa88b, 0x0000, 0xa8a8, 0xa8ab, 0x0000, 0x904d, 0x090c, 0x0dd5,
-	0x080c, 0x1031, 0x080c, 0x88ed, 0x0c18, 0x2071, 0x0300, 0x701b,
-	0x0200, 0x015e, 0x012e, 0x003e, 0x00ce, 0x009e, 0x00de, 0x00ee,
-	0x0005, 0x00c6, 0x00b6, 0x0016, 0x0006, 0x0156, 0x080c, 0x283e,
-	0x015e, 0x11b0, 0x080c, 0x659e, 0x190c, 0x0dd5, 0x000e, 0x001e,
-	0xb912, 0xb816, 0x080c, 0xae0b, 0x0140, 0x2b00, 0x6012, 0x6023,
-	0x0001, 0x2009, 0x0001, 0x080c, 0xaedc, 0x00be, 0x00ce, 0x0005,
-	0x000e, 0x001e, 0x0cd0, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
-	0x0dd5, 0x0013, 0x006e, 0x0005, 0x8da4, 0x8da4, 0x8da4, 0x8da6,
-	0x8df7, 0x8da4, 0x8da4, 0x8da4, 0x8e5a, 0x8da4, 0x8e97, 0x8da4,
-	0x8da4, 0x8da4, 0x8da4, 0x8da4, 0x080c, 0x0dd5, 0x9182, 0x0040,
-	0x0002, 0x8db9, 0x8db9, 0x8db9, 0x8db9, 0x8db9, 0x8db9, 0x8db9,
-	0x8db9, 0x8db9, 0x8dbb, 0x8dd0, 0x8db9, 0x8db9, 0x8db9, 0x8db9,
-	0x8de3, 0x080c, 0x0dd5, 0x0096, 0x080c, 0x963d, 0x080c, 0x97b9,
-	0x6114, 0x2148, 0xa87b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb,
-	0x0500, 0x00be, 0x080c, 0x6a87, 0x080c, 0xae61, 0x009e, 0x0005,
-	0x080c, 0x963d, 0x00d6, 0x6114, 0x080c, 0xcb35, 0x0130, 0x0096,
-	0x6114, 0x2148, 0x080c, 0x6c81, 0x009e, 0x00de, 0x080c, 0xae61,
-	0x080c, 0x97b9, 0x0005, 0x080c, 0x963d, 0x080c, 0x31bf, 0x6114,
-	0x0096, 0x2148, 0x080c, 0xcb35, 0x0120, 0xa87b, 0x0029, 0x080c,
-	0x6c81, 0x009e, 0x080c, 0xae61, 0x080c, 0x97b9, 0x0005, 0x601b,
-	0x0000, 0x9182, 0x0040, 0x0096, 0x0002, 0x8e12, 0x8e12, 0x8e12,
-	0x8e12, 0x8e12, 0x8e12, 0x8e12, 0x8e12, 0x8e14, 0x8e12, 0x8e12,
-	0x8e12, 0x8e56, 0x8e12, 0x8e12, 0x8e12, 0x8e12, 0x8e12, 0x8e12,
-	0x8e1a, 0x8e12, 0x080c, 0x0dd5, 0x6114, 0x2148, 0xa938, 0x918e,
-	0xffff, 0x05e0, 0x00e6, 0x6114, 0x2148, 0x080c, 0x8bc3, 0x0096,
-	0xa8a8, 0x2048, 0x080c, 0x6a1f, 0x009e, 0xa8ab, 0x0000, 0x6010,
-	0x9005, 0x0128, 0x00b6, 0x2058, 0x080c, 0x8cf2, 0x00be, 0xae88,
-	0x00b6, 0x2059, 0x0000, 0x080c, 0x88f6, 0x00be, 0x01e0, 0x2071,
-	0x193c, 0x080c, 0x893d, 0x01b8, 0x9086, 0x0001, 0x1128, 0x2001,
-	0x1946, 0x2004, 0x9005, 0x1178, 0x0096, 0x080c, 0x0fff, 0x2900,
-	0x009e, 0x0148, 0xa8aa, 0x00f6, 0x2c78, 0x080c, 0x88b4, 0x00fe,
-	0x00ee, 0x009e, 0x0005, 0x080c, 0x88ed, 0x0cd0, 0x080c, 0x8f04,
-	0x009e, 0x0005, 0x9182, 0x0040, 0x0096, 0x0002, 0x8e6e, 0x8e6e,
-	0x8e6e, 0x8e70, 0x8e6e, 0x8e6e, 0x8e6e, 0x8e95, 0x8e6e, 0x8e6e,
-	0x8e6e, 0x8e6e, 0x8e6e, 0x8e6e, 0x8e6e, 0x8e6e, 0x080c, 0x0dd5,
-	0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa8ac, 0xa846, 0xa8b0,
-	0xa84a, 0xa837, 0x0000, 0xa83b, 0x0000, 0xa884, 0x9092, 0x199a,
-	0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a,
-	0x2c10, 0x080c, 0x1bad, 0x080c, 0x9155, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x97b9, 0x012e, 0x009e, 0x0005, 0x080c, 0x0dd5, 0x080c,
-	0x963d, 0x080c, 0x97b9, 0x6114, 0x2148, 0xa87b, 0x0000, 0x6010,
-	0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6c81, 0x080c,
-	0xae61, 0x009e, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5,
-	0x0096, 0x0013, 0x009e, 0x0005, 0x8ec4, 0x8ec4, 0x8ec4, 0x8ec6,
-	0x8ed7, 0x8ec4, 0x8ec4, 0x8ec4, 0x8ec4, 0x8ec4, 0x8ec4, 0x8ec4,
-	0x8ec4, 0x8ec4, 0x8ec4, 0x8ec4, 0x080c, 0x0dd5, 0x080c, 0xa7cc,
-	0x6114, 0x2148, 0xa87b, 0x0006, 0x6010, 0x00b6, 0x2058, 0xb8bb,
-	0x0500, 0x00be, 0x080c, 0x6c81, 0x080c, 0xae61, 0x0005, 0x0461,
-	0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0096, 0x0013,
-	0x009e, 0x0005, 0x8ef2, 0x8ef2, 0x8ef2, 0x8ef4, 0x8f04, 0x8ef2,
-	0x8ef2, 0x8ef2, 0x8ef2, 0x8ef2, 0x8ef2, 0x8ef2, 0x8ef2, 0x8ef2,
-	0x8ef2, 0x8ef2, 0x080c, 0x0dd5, 0x0036, 0x00e6, 0x2071, 0x19e7,
-	0x703c, 0x9c06, 0x1120, 0x2019, 0x0000, 0x080c, 0xa5b6, 0x080c,
-	0xa7cc, 0x00ee, 0x003e, 0x0005, 0x00f6, 0x00e6, 0x601b, 0x0000,
-	0x6014, 0x2048, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, 0x080c,
-	0x8cf2, 0x00be, 0x2071, 0x193c, 0x080c, 0x893d, 0x0160, 0x2001,
-	0x187f, 0x2004, 0xa88a, 0x2031, 0x0000, 0x2c78, 0x080c, 0x88b4,
-	0x00ee, 0x00fe, 0x0005, 0x0096, 0xa88b, 0x0000, 0xa8a8, 0x2048,
-	0x080c, 0x1031, 0x009e, 0xa8ab, 0x0000, 0x080c, 0x88ed, 0x0c80,
-	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-	0x0000, 0x187a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-	0x0126, 0x2091, 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010, 0x9006,
-	0x8004, 0x2019, 0x0100, 0x231c, 0x93a6, 0x0008, 0x1118, 0x8086,
-	0x818e, 0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x1208, 0x9200,
-	0x1f04, 0x8f49, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e, 0x0020,
-	0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x004e, 0x003e, 0x012e, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005,
-	0x0510, 0x911a, 0x1600, 0x8213, 0x2039, 0x0100, 0x273c, 0x97be,
-	0x0008, 0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x0228, 0x911a,
-	0x1220, 0x1f04, 0x8f73, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04,
-	0x8f73, 0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e,
-	0x007e, 0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8,
-	0x0126, 0x2091, 0x2800, 0x2079, 0x19e7, 0x012e, 0x00d6, 0x2069,
-	0x19e7, 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000,
-	0x2069, 0x0200, 0x080c, 0xab21, 0x0401, 0x080c, 0xab0c, 0x00e9,
-	0x080c, 0xab0f, 0x00d1, 0x080c, 0xab12, 0x00b9, 0x080c, 0xab15,
-	0x00a1, 0x080c, 0xab18, 0x0089, 0x080c, 0xab1b, 0x0071, 0x080c,
-	0xab1e, 0x0059, 0x01de, 0x014e, 0x015e, 0x2069, 0x0004, 0x2d04,
-	0x9085, 0x8001, 0x206a, 0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1,
-	0x0240, 0x2001, 0x0000, 0x4004, 0x0005, 0x00c6, 0x6027, 0x0001,
-	0x7804, 0x9084, 0x0007, 0x0002, 0x8fe6, 0x900a, 0x9049, 0x8fec,
-	0x900a, 0x8fe6, 0x8fe4, 0x8fe4, 0x080c, 0x0dd5, 0x080c, 0x8579,
-	0x080c, 0x968d, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110, 0x00ce,
-	0x0005, 0x2011, 0x5e83, 0x080c, 0x84f3, 0x7828, 0x9092, 0x00c8,
-	0x1228, 0x8000, 0x782a, 0x080c, 0x5ec3, 0x0c88, 0x62c0, 0x080c,
-	0xac5d, 0x080c, 0x5e83, 0x7807, 0x0003, 0x7827, 0x0000, 0x782b,
-	0x0000, 0x0c28, 0x080c, 0x8579, 0x6220, 0xd2a4, 0x0160, 0x782b,
-	0x0000, 0x7824, 0x9065, 0x090c, 0x0dd5, 0x2009, 0x0013, 0x080c,
-	0xaedc, 0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c, 0x0dd5,
-	0x7828, 0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce, 0x080c,
-	0x2ba5, 0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d, 0x090c,
-	0x0dd5, 0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c, 0x968d,
-	0x0c00, 0x080c, 0xa24f, 0x08e8, 0x2011, 0x0130, 0x2214, 0x080c,
-	0xac5d, 0x080c, 0xe9fe, 0x2009, 0x0014, 0x080c, 0xaedc, 0x00ce,
-	0x0880, 0x2001, 0x1a03, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x1160,
+	0x2009, 0x0046, 0x080c, 0xaeec, 0x7817, 0x0140, 0x2001, 0x19ef,
+	0x2004, 0x9005, 0x090c, 0x9687, 0x00be, 0x0005, 0x00b6, 0x00c6,
+	0x9484, 0x0fff, 0x0904, 0x81ba, 0x7110, 0xd1bc, 0x1904, 0x81ba,
+	0x7108, 0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00,
+	0x15b0, 0x81ff, 0x15a0, 0x9080, 0x3327, 0x200d, 0x918c, 0xff00,
+	0x810f, 0x2001, 0x0080, 0x9106, 0x0904, 0x81ba, 0x080c, 0x65a7,
+	0x1904, 0x81ba, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15d8, 0xba04,
+	0x9294, 0xff00, 0x9286, 0x0600, 0x11a0, 0x080c, 0xae1b, 0x05e8,
+	0x2b08, 0x7028, 0x604a, 0x702c, 0x6046, 0x6112, 0x6023, 0x0006,
+	0x7120, 0x610a, 0x7130, 0x6156, 0x2009, 0x0044, 0x080c, 0xdb84,
+	0x0408, 0x080c, 0x697b, 0x1138, 0xb807, 0x0606, 0x0c30, 0x190c,
+	0x80a7, 0x11c0, 0x0898, 0x080c, 0xae1b, 0x2b08, 0x0198, 0x6112,
+	0x6023, 0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007,
+	0x0005, 0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9121,
+	0x080c, 0x9687, 0x7817, 0x0140, 0x2001, 0x19ef, 0x2004, 0x9005,
+	0x090c, 0x9687, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e, 0x2004,
+	0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b14, 0x080c, 0xaebf,
+	0x0d48, 0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130,
+	0x6156, 0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c,
+	0x90d9, 0x080c, 0x9687, 0x08b0, 0x00b6, 0x7110, 0xd1bc, 0x01e8,
+	0x7020, 0x2060, 0x9c84, 0x0007, 0x11c0, 0x9c82, 0x1cd0, 0x02a8,
+	0x6868, 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158,
+	0xb910, 0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124,
+	0x610a, 0x2009, 0x0045, 0x080c, 0xaeec, 0x7817, 0x0140, 0x2001,
+	0x19ef, 0x2004, 0x9005, 0x090c, 0x9687, 0x00be, 0x0005, 0x6120,
+	0x9186, 0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001,
+	0x0005, 0x080c, 0x32e5, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007,
+	0x9086, 0x0000, 0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208,
+	0x000b, 0x0005, 0x8230, 0x8231, 0x8230, 0x8230, 0x8290, 0x829f,
+	0x0005, 0x00b6, 0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904,
+	0x828e, 0x700c, 0x7108, 0x080c, 0x2840, 0x1904, 0x828e, 0x080c,
+	0x65a7, 0x1904, 0x828e, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8,
+	0x080c, 0x697b, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6, 0x080c,
+	0x82ae, 0x00ce, 0x05d8, 0x080c, 0xae1b, 0x2b08, 0x05b8, 0x6112,
+	0x080c, 0xcfc4, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009, 0x0088,
+	0x080c, 0xaeec, 0x0458, 0x080c, 0x697b, 0x0148, 0x9086, 0x0004,
+	0x0130, 0x080c, 0x6983, 0x0118, 0x9086, 0x0004, 0x1180, 0x080c,
+	0xae1b, 0x2b08, 0x01d8, 0x6112, 0x080c, 0xcfc4, 0x6023, 0x0005,
+	0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0xaeec, 0x0078, 0x080c,
+	0xae1b, 0x2b08, 0x0158, 0x6112, 0x080c, 0xcfc4, 0x6023, 0x0004,
+	0x7120, 0x610a, 0x2009, 0x0001, 0x080c, 0xaeec, 0x00be, 0x0005,
+	0x7110, 0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x820f, 0x1130,
+	0x7124, 0x610a, 0x2009, 0x0089, 0x080c, 0xaeec, 0x0005, 0x7110,
+	0xd1bc, 0x0158, 0x0059, 0x0148, 0x080c, 0x820f, 0x1130, 0x7124,
+	0x610a, 0x2009, 0x008a, 0x080c, 0xaeec, 0x0005, 0x7020, 0x2060,
+	0x9c84, 0x0007, 0x1158, 0x9c82, 0x1cd0, 0x0240, 0x2001, 0x181a,
+	0x2004, 0x9c02, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8,
+	0x00b6, 0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84, 0x0007,
+	0x11b0, 0x9c82, 0x1cd0, 0x0298, 0x6868, 0x9c02, 0x1280, 0x7008,
+	0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1140, 0x700c,
+	0xb914, 0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0xaeec, 0x7817,
+	0x0140, 0x2001, 0x19ef, 0x2004, 0x9005, 0x090c, 0x9687, 0x00be,
+	0x0005, 0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049,
+	0x0005, 0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009,
+	0x0005, 0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086,
+	0xc000, 0x05d0, 0x080c, 0xae1b, 0x05b8, 0x0066, 0x00c6, 0x0046,
+	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2840, 0x15a0,
+	0x080c, 0x65a7, 0x1588, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce,
+	0x6012, 0x080c, 0xcfc4, 0x080c, 0x0fff, 0x0510, 0x2900, 0x605a,
+	0x9006, 0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9,
+	0x000e, 0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003,
+	0x006e, 0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001,
+	0x080c, 0x9121, 0x080c, 0x9687, 0x00fe, 0x009e, 0x00ce, 0x0005,
+	0x080c, 0xae71, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6,
+	0x7000, 0x908c, 0xff00, 0x9184, 0xf000, 0x810f, 0x9086, 0x2000,
+	0x1904, 0x839e, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111, 0x2004,
+	0x9005, 0x1904, 0x83a0, 0x7030, 0x908e, 0x0400, 0x0904, 0x83a0,
+	0x908e, 0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e, 0x0300,
+	0x11d8, 0x2009, 0x1837, 0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580,
+	0x080c, 0x6939, 0x0558, 0x68b0, 0x9084, 0x00ff, 0x7100, 0x918c,
+	0x00ff, 0x9106, 0x1518, 0x6880, 0x69b0, 0x918c, 0xff00, 0x9105,
+	0x7104, 0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4,
+	0x11a8, 0x908e, 0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e,
+	0x5000, 0x09b8, 0x0058, 0x9186, 0x0023, 0x1140, 0x080c, 0x82ae,
+	0x0128, 0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006, 0x0010,
+	0x9085, 0x0001, 0x00ce, 0x0005, 0x0156, 0x0046, 0x0016, 0x0036,
+	0x7038, 0x2020, 0x8427, 0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9,
+	0x0004, 0x2019, 0x1805, 0x2011, 0x027a, 0x080c, 0xbe1c, 0x1178,
+	0xd48c, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1801, 0x2011, 0x027e,
+	0x080c, 0xbe1c, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001, 0x003e,
+	0x001e, 0x004e, 0x015e, 0x0005, 0x0156, 0x0046, 0x0016, 0x0036,
+	0x7038, 0x2020, 0x8427, 0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9,
+	0x0004, 0x2019, 0x1805, 0x2011, 0x0272, 0x080c, 0xbe1c, 0x1178,
+	0xd48c, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1801, 0x2011, 0x0276,
+	0x080c, 0xbe1c, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001, 0x003e,
+	0x001e, 0x004e, 0x015e, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7800,
+	0xc0e5, 0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800,
+	0x7834, 0xd084, 0x1130, 0x2079, 0x0200, 0x7800, 0x9085, 0x1200,
+	0x7802, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7034, 0xc084,
+	0x7036, 0x00ee, 0x0005, 0x2071, 0x19f9, 0x7003, 0x0003, 0x700f,
+	0x0361, 0x9006, 0x701a, 0x7072, 0x7012, 0x7017, 0x1cd0, 0x7007,
+	0x0000, 0x7026, 0x702b, 0xa28a, 0x7032, 0x7037, 0xa2f8, 0x703f,
+	0xffff, 0x7042, 0x7047, 0x5577, 0x704a, 0x705b, 0x857d, 0x080c,
+	0x1018, 0x090c, 0x0dd5, 0x2900, 0x703a, 0xa867, 0x0003, 0xa86f,
+	0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19f9, 0x1d04, 0x84cb,
+	0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x1530, 0x2001, 0x013c,
+	0x2004, 0x9005, 0x190c, 0x85c2, 0x2001, 0x1869, 0x2004, 0xd0c4,
+	0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1, 0x0000, 0x20d1, 0x0001,
+	0x20d1, 0x0000, 0x080c, 0x0dd5, 0x700f, 0x0361, 0x7007, 0x0001,
+	0x0126, 0x2091, 0x8000, 0x7040, 0x900d, 0x0148, 0x8109, 0x7142,
+	0x1130, 0x7044, 0x080f, 0x0018, 0x0126, 0x2091, 0x8000, 0x7024,
+	0x900d, 0x0188, 0x7020, 0x8001, 0x7022, 0x1168, 0x7023, 0x0009,
+	0x8109, 0x7126, 0x9186, 0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff,
+	0x1110, 0x7028, 0x080f, 0x7030, 0x900d, 0x0180, 0x702c, 0x8001,
+	0x702e, 0x1160, 0x702f, 0x0009, 0x8109, 0x7132, 0x0128, 0x9184,
+	0x007f, 0x090c, 0xa419, 0x0010, 0x7034, 0x080f, 0x703c, 0x9005,
+	0x0118, 0x0310, 0x8001, 0x703e, 0x704c, 0x900d, 0x0168, 0x7048,
+	0x8001, 0x704a, 0x1148, 0x704b, 0x0009, 0x8109, 0x714e, 0x1120,
+	0x7150, 0x714e, 0x7058, 0x080f, 0x7018, 0x900d, 0x01d8, 0x0016,
+	0x7070, 0x900d, 0x0158, 0x706c, 0x8001, 0x706e, 0x1138, 0x706f,
+	0x0009, 0x8109, 0x7172, 0x1110, 0x7074, 0x080f, 0x001e, 0x7008,
+	0x8001, 0x700a, 0x1138, 0x700b, 0x0009, 0x8109, 0x711a, 0x1110,
+	0x701c, 0x080f, 0x012e, 0x7004, 0x0002, 0x84f3, 0x84f4, 0x8510,
+	0x00e6, 0x2071, 0x19f9, 0x7018, 0x9005, 0x1120, 0x711a, 0x721e,
+	0x700b, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19f9,
+	0x701c, 0x9206, 0x1120, 0x701a, 0x701e, 0x7072, 0x7076, 0x000e,
+	0x00ee, 0x0005, 0x00e6, 0x2071, 0x19f9, 0xb888, 0x9102, 0x0208,
+	0xb98a, 0x00ee, 0x0005, 0x0005, 0x00b6, 0x7110, 0x080c, 0x6608,
+	0x1168, 0xb888, 0x8001, 0x0250, 0xb88a, 0x1140, 0x0126, 0x2091,
+	0x8000, 0x0016, 0x080c, 0x9687, 0x001e, 0x012e, 0x8108, 0x9182,
+	0x0800, 0x0218, 0x900e, 0x7007, 0x0002, 0x7112, 0x00be, 0x0005,
+	0x7014, 0x2060, 0x0126, 0x2091, 0x8000, 0x6040, 0x9005, 0x0128,
+	0x8001, 0x6042, 0x1110, 0x080c, 0xce55, 0x6018, 0x9005, 0x0558,
+	0x8001, 0x601a, 0x1540, 0x6120, 0x9186, 0x0003, 0x0148, 0x9186,
+	0x0006, 0x0130, 0x9186, 0x0009, 0x11e0, 0x611c, 0xd1c4, 0x1100,
+	0x080c, 0xcb4a, 0x01b0, 0x6014, 0x2048, 0xa884, 0x908a, 0x199a,
+	0x0280, 0x9082, 0x1999, 0xa886, 0x908a, 0x199a, 0x0210, 0x2001,
+	0x1999, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0xd0e4,
+	0x0110, 0x080c, 0xc846, 0x012e, 0x9c88, 0x0018, 0x7116, 0x2001,
+	0x181a, 0x2004, 0x9102, 0x0220, 0x7017, 0x1cd0, 0x7007, 0x0000,
+	0x0005, 0x00e6, 0x2071, 0x19f9, 0x7027, 0x07d0, 0x7023, 0x0009,
+	0x00ee, 0x0005, 0x2001, 0x1a02, 0x2003, 0x0000, 0x0005, 0x00e6,
+	0x2071, 0x19f9, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011,
+	0x1a05, 0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19f9, 0x711a,
+	0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, 0x7054,
+	0x8000, 0x7056, 0x2001, 0x1a07, 0x2044, 0xa06c, 0x9086, 0x0000,
+	0x0150, 0x7068, 0xa09a, 0x7064, 0xa096, 0x7060, 0xa092, 0x705c,
+	0xa08e, 0x080c, 0x10e9, 0x002e, 0x008e, 0x0005, 0x0006, 0x0016,
+	0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156,
+	0x080c, 0x843c, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
+	0x00ae, 0x009e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x19f9,
+	0x7172, 0x7276, 0x706f, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006,
+	0x2071, 0x19f9, 0x7074, 0x9206, 0x1110, 0x7072, 0x7076, 0x000e,
+	0x00ee, 0x0005, 0x0016, 0x00c6, 0x2009, 0xfffc, 0x210d, 0x2061,
+	0x0100, 0x60f0, 0x9100, 0x60f3, 0x0000, 0x2009, 0xfffc, 0x200f,
+	0x1220, 0x8108, 0x2105, 0x8000, 0x200f, 0x00ce, 0x001e, 0x0005,
+	0x00c6, 0x2061, 0x1a70, 0x00ce, 0x0005, 0x9184, 0x000f, 0x8003,
+	0x8003, 0x8003, 0x9080, 0x1a70, 0x2060, 0x0005, 0xa884, 0x908a,
+	0x199a, 0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a70, 0x6014,
+	0x00ce, 0x9005, 0x1130, 0x2001, 0x001e, 0x0018, 0x908e, 0xffff,
+	0x01b0, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0x908c,
+	0x00c0, 0x918e, 0x00c0, 0x0904, 0x8670, 0xd0b4, 0x1168, 0xd0bc,
+	0x1904, 0x8649, 0x2009, 0x0006, 0x080c, 0x869d, 0x0005, 0x900e,
+	0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc, 0x0160, 0x908c, 0x0003,
+	0x0120, 0x918e, 0x0003, 0x1904, 0x8697, 0x908c, 0x2020, 0x918e,
+	0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8, 0x2009, 0x1869, 0x2104,
+	0xd084, 0x1138, 0x87ff, 0x1120, 0x2009, 0x0043, 0x0804, 0xaeec,
+	0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042, 0x0804, 0xaeec, 0x6110,
+	0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd,
+	0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890, 0x602e, 0xa88c, 0x6032,
+	0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003,
+	0x1904, 0x8697, 0x908c, 0x2020, 0x918e, 0x2020, 0x0170, 0x0076,
+	0x00f6, 0x2c78, 0x080c, 0x1727, 0x00fe, 0x007e, 0x87ff, 0x1120,
+	0x2009, 0x0042, 0x080c, 0xaeec, 0x0005, 0x6110, 0x00b6, 0x2158,
+	0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38,
+	0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x9084,
+	0x0003, 0x908e, 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, 0x0041,
+	0x080c, 0xaeec, 0x0005, 0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009,
+	0x0043, 0x080c, 0xaeec, 0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900,
+	0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009,
+	0x0004, 0x0019, 0x0005, 0x2009, 0x0001, 0x0096, 0x080c, 0xcb4a,
+	0x0518, 0x6014, 0x2048, 0xa982, 0xa800, 0x6016, 0x9186, 0x0001,
+	0x1188, 0xa97c, 0x918c, 0x8100, 0x918e, 0x8100, 0x1158, 0x00c6,
+	0x2061, 0x1a70, 0x6200, 0xd28c, 0x1120, 0x6204, 0x8210, 0x0208,
+	0x6206, 0x00ce, 0x080c, 0x6ac1, 0x6014, 0x904d, 0x0076, 0x2039,
+	0x0000, 0x190c, 0x85e6, 0x007e, 0x009e, 0x0005, 0x0156, 0x00c6,
+	0x2061, 0x1a70, 0x6000, 0x81ff, 0x0110, 0x9205, 0x0008, 0x9204,
+	0x6002, 0x00ce, 0x015e, 0x0005, 0x6800, 0xd08c, 0x1138, 0x6808,
+	0x9005, 0x0120, 0x8001, 0x680a, 0x9085, 0x0001, 0x0005, 0x2071,
+	0x1923, 0x7003, 0x0006, 0x7007, 0x0000, 0x700f, 0x0000, 0x7013,
+	0x0001, 0x080c, 0x1018, 0x090c, 0x0dd5, 0xa867, 0x0006, 0xa86b,
+	0x0001, 0xa8ab, 0xdcb0, 0xa89f, 0x0000, 0x2900, 0x702e, 0x7033,
+	0x0000, 0x0005, 0x0096, 0x00e6, 0x2071, 0x1923, 0x702c, 0x2048,
+	0x6a2c, 0x721e, 0x6b30, 0x7322, 0x6834, 0x7026, 0xa896, 0x6838,
+	0x702a, 0xa89a, 0x6824, 0x7016, 0x683c, 0x701a, 0x2009, 0x0028,
+	0x200a, 0x9005, 0x0148, 0x900e, 0x9188, 0x000c, 0x8001, 0x1de0,
+	0x2100, 0x9210, 0x1208, 0x8318, 0xaa8e, 0xab92, 0x7010, 0xd084,
+	0x0178, 0xc084, 0x7007, 0x0001, 0x700f, 0x0000, 0x0006, 0x2009,
+	0x181d, 0x2104, 0x9082, 0x0007, 0x2009, 0x1ac7, 0x200a, 0x000e,
+	0xc095, 0x7012, 0x2008, 0x2001, 0x003b, 0x080c, 0x15f0, 0x9006,
+	0x2071, 0x193c, 0x7002, 0x7006, 0x702a, 0x00ee, 0x009e, 0x0005,
+	0x00e6, 0x0126, 0x0156, 0x2091, 0x8000, 0x2071, 0x1800, 0x7154,
+	0x2001, 0x0008, 0x910a, 0x0638, 0x2001, 0x187d, 0x20ac, 0x9006,
+	0x9080, 0x0008, 0x1f04, 0x8750, 0x71c0, 0x9102, 0x02e0, 0x2071,
+	0x1877, 0x20a9, 0x0007, 0x00c6, 0x080c, 0xae1b, 0x6023, 0x0009,
+	0x6003, 0x0004, 0x601f, 0x0101, 0x0089, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x88d6, 0x012e, 0x1f04, 0x875c, 0x9006, 0x00ce, 0x015e,
+	0x012e, 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x00e6, 0x00b6,
+	0x0096, 0x0086, 0x0056, 0x0046, 0x0026, 0x7118, 0x720c, 0x7620,
+	0x7004, 0xd084, 0x1128, 0x2021, 0x0024, 0x2029, 0x0002, 0x0020,
+	0x2021, 0x002c, 0x2029, 0x000a, 0x080c, 0x0fff, 0x090c, 0x0dd5,
+	0x2900, 0x6016, 0x2058, 0xac66, 0x9006, 0xa802, 0xa806, 0xa86a,
+	0xa87a, 0xa8aa, 0xa887, 0x0005, 0xa87f, 0x0020, 0x7008, 0xa89a,
+	0x7010, 0xa89e, 0xae8a, 0xa8af, 0xffff, 0xa8b3, 0x0000, 0x8109,
+	0x0160, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0xad66, 0x2b00, 0xa802,
+	0x2900, 0xb806, 0x2058, 0x8109, 0x1da0, 0x002e, 0x004e, 0x005e,
+	0x008e, 0x009e, 0x00be, 0x00ee, 0x0005, 0x2079, 0x0000, 0x2071,
+	0x1923, 0x7004, 0x004b, 0x700c, 0x0002, 0x87c8, 0x87c1, 0x87c1,
+	0x0005, 0x87d2, 0x8833, 0x8833, 0x8833, 0x8834, 0x8845, 0x8845,
+	0x700c, 0x0cba, 0x0126, 0x2091, 0x8000, 0x78a0, 0x79a0, 0x9106,
+	0x0128, 0x78a0, 0x79a0, 0x9106, 0x1904, 0x8826, 0x2001, 0x0005,
+	0x2004, 0xd0bc, 0x0130, 0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012,
+	0x0ca8, 0x012e, 0x7018, 0x910a, 0x1130, 0x7030, 0x9005, 0x05a8,
+	0x080c, 0x8874, 0x0490, 0x1210, 0x7114, 0x910a, 0x9192, 0x000a,
+	0x0210, 0x2009, 0x000a, 0x2001, 0x1888, 0x2014, 0x2001, 0x1935,
+	0x2004, 0x9100, 0x9202, 0x0e48, 0x080c, 0x89c0, 0x2200, 0x9102,
+	0x0208, 0x2208, 0x0096, 0x702c, 0x2048, 0xa873, 0x0001, 0xa976,
+	0x080c, 0x8ac9, 0x2100, 0xa87e, 0xa86f, 0x0000, 0x009e, 0x0126,
+	0x2091, 0x8000, 0x2009, 0x1a17, 0x2104, 0xc085, 0x200a, 0x700f,
+	0x0002, 0x012e, 0x080c, 0x1108, 0x1de8, 0x0005, 0x2001, 0x0005,
+	0x2004, 0xd0bc, 0x0130, 0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012,
+	0x0ca8, 0x012e, 0x0005, 0x0005, 0x700c, 0x0002, 0x8839, 0x883c,
+	0x883b, 0x080c, 0x87d0, 0x0005, 0x8001, 0x700e, 0x0096, 0x702c,
+	0x2048, 0xa974, 0x009e, 0x0011, 0x0ca0, 0x0005, 0x0096, 0x702c,
+	0x2048, 0x7018, 0x9100, 0x7214, 0x921a, 0x1130, 0x701c, 0xa88e,
+	0x7020, 0xa892, 0x9006, 0x0068, 0x0006, 0x080c, 0x8ac9, 0x2100,
+	0xaa8c, 0x9210, 0xaa8e, 0x1220, 0xa890, 0x9081, 0x0000, 0xa892,
+	0x000e, 0x009e, 0x2f08, 0x9188, 0x0028, 0x200a, 0x701a, 0x0005,
+	0x00e6, 0x2071, 0x1923, 0x700c, 0x0002, 0x8872, 0x8872, 0x8870,
+	0x700f, 0x0001, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x7030,
+	0x9005, 0x0508, 0x2078, 0x7814, 0x2048, 0xae88, 0x00b6, 0x2059,
+	0x0000, 0x080c, 0x88df, 0x00be, 0x01b0, 0x00e6, 0x2071, 0x193c,
+	0x080c, 0x8926, 0x00ee, 0x0178, 0x0096, 0x080c, 0x1018, 0x2900,
+	0x009e, 0x0148, 0xa8aa, 0x04b9, 0x0041, 0x2001, 0x1946, 0x2003,
+	0x0000, 0x012e, 0x08c8, 0x012e, 0x0005, 0x00d6, 0x00c6, 0x0086,
+	0x00a6, 0x2940, 0x2650, 0x2600, 0x9005, 0x0180, 0xa864, 0x9084,
+	0x000f, 0x2068, 0x9d88, 0x2092, 0x2165, 0x0056, 0x2029, 0x0000,
+	0x080c, 0x8a4e, 0x080c, 0x204a, 0x1dd8, 0x005e, 0x00ae, 0x2001,
+	0x187f, 0x2004, 0xa88a, 0x080c, 0x1727, 0x781f, 0x0101, 0x7813,
+	0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x8935, 0x012e, 0x008e,
+	0x00ce, 0x00de, 0x0005, 0x7030, 0x9005, 0x0138, 0x2078, 0x780c,
+	0x7032, 0x2001, 0x1946, 0x2003, 0x0001, 0x0005, 0x00e6, 0x2071,
+	0x1923, 0x7030, 0x600e, 0x2c00, 0x7032, 0x00ee, 0x0005, 0x00d6,
+	0x00c6, 0x0026, 0x9b80, 0x8ba8, 0x2005, 0x906d, 0x090c, 0x0dd5,
+	0x9b80, 0x8ba0, 0x2005, 0x9065, 0x090c, 0x0dd5, 0x6114, 0x2600,
+	0x9102, 0x0248, 0x6828, 0x9102, 0x02f0, 0x9085, 0x0001, 0x002e,
+	0x00ce, 0x00de, 0x0005, 0x6804, 0xd094, 0x0148, 0x6854, 0xd084,
+	0x1178, 0xc085, 0x6856, 0x2011, 0x8026, 0x080c, 0x4b14, 0x684c,
+	0x0096, 0x904d, 0x090c, 0x0dd5, 0xa804, 0x8000, 0xa806, 0x009e,
+	0x9006, 0x2030, 0x0c20, 0x6854, 0xd08c, 0x1d08, 0xc08d, 0x6856,
+	0x2011, 0x8025, 0x080c, 0x4b14, 0x684c, 0x0096, 0x904d, 0x090c,
+	0x0dd5, 0xa800, 0x8000, 0xa802, 0x009e, 0x0888, 0x7000, 0x2019,
+	0x0008, 0x8319, 0x7104, 0x9102, 0x1118, 0x2300, 0x9005, 0x0020,
+	0x0210, 0x9302, 0x0008, 0x8002, 0x0005, 0x00d6, 0x7814, 0x9005,
+	0x090c, 0x0dd5, 0x781c, 0x9084, 0x0101, 0x9086, 0x0101, 0x190c,
+	0x0dd5, 0x2069, 0x193c, 0x6804, 0x9080, 0x193e, 0x2f08, 0x2102,
+	0x6904, 0x8108, 0x9182, 0x0008, 0x0208, 0x900e, 0x6906, 0x9180,
+	0x193e, 0x2003, 0x0000, 0x00de, 0x0005, 0x0096, 0x00c6, 0x2060,
+	0x6014, 0x2048, 0xa8a8, 0x0096, 0x2048, 0x9005, 0x190c, 0x1031,
+	0x009e, 0xa8ab, 0x0000, 0x080c, 0x0fb1, 0x080c, 0xae71, 0x00ce,
+	0x009e, 0x0005, 0x6020, 0x9086, 0x0009, 0x1128, 0x601c, 0xd0c4,
+	0x0110, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x6000, 0x9086,
+	0x0000, 0x0178, 0x6010, 0x9005, 0x0150, 0x00b6, 0x2058, 0x080c,
+	0x8cdb, 0x00be, 0x6013, 0x0000, 0x601b, 0x0000, 0x0010, 0x2c00,
+	0x0861, 0x0005, 0x2009, 0x1927, 0x210c, 0xd194, 0x0005, 0x00e6,
+	0x2071, 0x1923, 0x7110, 0xc194, 0xd19c, 0x1118, 0xc185, 0x7007,
+	0x0000, 0x7112, 0x2001, 0x003b, 0x080c, 0x15f0, 0x00ee, 0x0005,
+	0x0096, 0x00d6, 0x9006, 0x7006, 0x700e, 0x701a, 0x701e, 0x7022,
+	0x7016, 0x702a, 0x7026, 0x702f, 0x0000, 0x080c, 0x8b28, 0x0170,
+	0x080c, 0x8b5d, 0x0158, 0x2900, 0x7002, 0x700a, 0x701a, 0x7013,
+	0x0001, 0x701f, 0x000a, 0x00de, 0x009e, 0x0005, 0x900e, 0x0cd8,
+	0x00e6, 0x0096, 0x0086, 0x00d6, 0x00c6, 0x2071, 0x1930, 0x721c,
+	0x2100, 0x9202, 0x1618, 0x080c, 0x8b5d, 0x090c, 0x0dd5, 0x7018,
+	0x9005, 0x1160, 0x2900, 0x7002, 0x700a, 0x701a, 0x9006, 0x7006,
+	0x700e, 0xa806, 0xa802, 0x7012, 0x701e, 0x0038, 0x2040, 0xa806,
+	0x2900, 0xa002, 0x701a, 0xa803, 0x0000, 0x7010, 0x8000, 0x7012,
+	0x701c, 0x9080, 0x000a, 0x701e, 0x721c, 0x08d0, 0x721c, 0x00ce,
+	0x00de, 0x008e, 0x009e, 0x00ee, 0x0005, 0x0096, 0x0156, 0x0136,
+	0x0146, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1930, 0x7300,
+	0x831f, 0x831e, 0x831e, 0x9384, 0x003f, 0x20e8, 0x939c, 0xffc0,
+	0x9398, 0x0003, 0x7104, 0x080c, 0x8ac9, 0x810c, 0x2100, 0x9318,
+	0x8003, 0x2228, 0x2021, 0x0078, 0x9402, 0x9532, 0x0208, 0x2028,
+	0x2500, 0x8004, 0x20a8, 0x23a0, 0xa001, 0xa001, 0x4005, 0x2508,
+	0x080c, 0x8ad2, 0x2130, 0x7014, 0x9600, 0x7016, 0x2600, 0x711c,
+	0x9102, 0x701e, 0x7004, 0x9600, 0x2008, 0x9082, 0x000a, 0x1190,
+	0x7000, 0x2048, 0xa800, 0x9005, 0x1148, 0x2009, 0x0001, 0x0026,
+	0x080c, 0x89c0, 0x002e, 0x7000, 0x2048, 0xa800, 0x7002, 0x7007,
+	0x0000, 0x0008, 0x7106, 0x2500, 0x9212, 0x1904, 0x89ff, 0x012e,
+	0x00ee, 0x014e, 0x013e, 0x015e, 0x009e, 0x0005, 0x0016, 0x0026,
+	0x00e6, 0x0126, 0x2091, 0x8000, 0x9580, 0x8ba0, 0x2005, 0x9075,
+	0x090c, 0x0dd5, 0x080c, 0x8aa4, 0x012e, 0x9580, 0x8b9c, 0x2005,
+	0x9075, 0x090c, 0x0dd5, 0x0156, 0x0136, 0x01c6, 0x0146, 0x01d6,
+	0x831f, 0x831e, 0x831e, 0x9384, 0x003f, 0x20e0, 0x9384, 0xffc0,
+	0x9100, 0x2098, 0xa860, 0x20e8, 0xa95c, 0x2c05, 0x9100, 0x20a0,
+	0x20a9, 0x0002, 0x4003, 0x2e0c, 0x2d00, 0x0002, 0x8a8e, 0x8a8e,
+	0x8a90, 0x8a8e, 0x8a90, 0x8a8e, 0x8a8e, 0x8a8e, 0x8a8e, 0x8a8e,
+	0x8a96, 0x8a8e, 0x8a96, 0x8a8e, 0x8a8e, 0x8a8e, 0x080c, 0x0dd5,
+	0x4104, 0x20a9, 0x0002, 0x4002, 0x4003, 0x0028, 0x20a9, 0x0002,
+	0x4003, 0x4104, 0x4003, 0x01de, 0x014e, 0x01ce, 0x013e, 0x015e,
+	0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x7014, 0x8001, 0x7016,
+	0x710c, 0x2110, 0x00f1, 0x810c, 0x9188, 0x0003, 0x7308, 0x8210,
+	0x9282, 0x000a, 0x1198, 0x7008, 0x2048, 0xa800, 0x9005, 0x0158,
+	0x0006, 0x080c, 0x8b6c, 0x009e, 0xa807, 0x0000, 0x2900, 0x700a,
+	0x7010, 0x8001, 0x7012, 0x700f, 0x0000, 0x0008, 0x720e, 0x009e,
+	0x0005, 0x0006, 0x810b, 0x810b, 0x2100, 0x810b, 0x9100, 0x2008,
+	0x000e, 0x0005, 0x0006, 0x0026, 0x2100, 0x9005, 0x0158, 0x9092,
+	0x000c, 0x0240, 0x900e, 0x8108, 0x9082, 0x000c, 0x1de0, 0x002e,
+	0x000e, 0x0005, 0x900e, 0x0cd8, 0x2d00, 0x90b8, 0x0008, 0x690c,
+	0x6810, 0x2019, 0x0001, 0x2031, 0x8b12, 0x9112, 0x0220, 0x0118,
+	0x8318, 0x2208, 0x0cd0, 0x6808, 0x9005, 0x0108, 0x8318, 0x233a,
+	0x6804, 0xd084, 0x2300, 0x2021, 0x0001, 0x1150, 0x9082, 0x0003,
+	0x0967, 0x0a67, 0x8420, 0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0,
+	0x9082, 0x0002, 0x0967, 0x0a67, 0x8420, 0x9082, 0x0005, 0x0967,
+	0x0a67, 0x0cd0, 0x6c1a, 0x2d00, 0x90b8, 0x0007, 0x00e6, 0x2071,
+	0x1800, 0x7128, 0x6810, 0x2019, 0x0001, 0x910a, 0x0118, 0x0210,
+	0x8318, 0x0cd8, 0x2031, 0x8b25, 0x0870, 0x6c16, 0x00ee, 0x0005,
+	0x0096, 0x0046, 0x0126, 0x2091, 0x8000, 0x2b00, 0x9080, 0x8ba4,
+	0x2005, 0x9005, 0x090c, 0x0dd5, 0x2004, 0x90a0, 0x000a, 0x080c,
+	0x1018, 0x01d0, 0x2900, 0x7026, 0xa803, 0x0000, 0xa807, 0x0000,
+	0x080c, 0x1018, 0x0188, 0x7024, 0xa802, 0xa807, 0x0000, 0x2900,
+	0x7026, 0x94a2, 0x000a, 0x0110, 0x0208, 0x0c90, 0x9085, 0x0001,
+	0x012e, 0x004e, 0x009e, 0x0005, 0x7024, 0x9005, 0x0dc8, 0x2048,
+	0xac00, 0x080c, 0x1031, 0x2400, 0x0cc0, 0x0126, 0x2091, 0x8000,
+	0x7024, 0x2048, 0x9005, 0x0130, 0xa800, 0x7026, 0xa803, 0x0000,
+	0xa807, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x7024,
+	0xa802, 0x2900, 0x7026, 0x012e, 0x0005, 0x0096, 0x9e80, 0x0009,
+	0x2004, 0x9005, 0x0138, 0x2048, 0xa800, 0x0006, 0x080c, 0x1031,
+	0x000e, 0x0cb8, 0x009e, 0x0005, 0x0096, 0x7008, 0x9005, 0x0138,
+	0x2048, 0xa800, 0x0006, 0x080c, 0x1031, 0x000e, 0x0cb8, 0x9006,
+	0x7002, 0x700a, 0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x702a,
+	0x7026, 0x702e, 0x009e, 0x0005, 0x1a63, 0x0000, 0x0000, 0x0000,
+	0x1930, 0x0000, 0x0000, 0x0000, 0x1888, 0x0000, 0x0000, 0x0000,
+	0x1877, 0x0000, 0x0000, 0x0000, 0x00e6, 0x00c6, 0x00b6, 0x00a6,
+	0xa8a8, 0x2040, 0x2071, 0x1877, 0x080c, 0x8cc6, 0xa067, 0x0023,
+	0x6010, 0x905d, 0x0904, 0x8c9b, 0xb814, 0xa06e, 0xb910, 0xa172,
+	0xb9a0, 0xa176, 0x2001, 0x0003, 0xa07e, 0xa834, 0xa082, 0xa07b,
+	0x0000, 0xa898, 0x9005, 0x0118, 0xa078, 0xc085, 0xa07a, 0x2858,
+	0x2031, 0x0018, 0xa068, 0x908a, 0x0019, 0x1a0c, 0x0dd5, 0x2020,
+	0x2050, 0x2940, 0xa864, 0x90bc, 0x00ff, 0x908c, 0x000f, 0x91e0,
+	0x2092, 0x2c65, 0x9786, 0x0024, 0x2c05, 0x1590, 0x908a, 0x0036,
+	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x8c08, 0x8c08, 0x8c0a,
+	0x8c08, 0x8c08, 0x8c08, 0x8c0c, 0x8c08, 0x8c08, 0x8c08, 0x8c0e,
+	0x8c08, 0x8c08, 0x8c08, 0x8c10, 0x8c08, 0x8c08, 0x8c08, 0x8c12,
+	0x8c08, 0x8c08, 0x8c08, 0x8c14, 0x8c08, 0x8c08, 0x8c08, 0x8c16,
+	0x080c, 0x0dd5, 0xa180, 0x04b8, 0xa190, 0x04a8, 0xa1a0, 0x0498,
+	0xa1b0, 0x0488, 0xa1c0, 0x0478, 0xa1d0, 0x0468, 0xa1e0, 0x0458,
+	0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x8c3a,
+	0x8c38, 0x8c38, 0x8c38, 0x8c38, 0x8c38, 0x8c3c, 0x8c38, 0x8c38,
+	0x8c38, 0x8c38, 0x8c38, 0x8c3e, 0x8c38, 0x8c38, 0x8c38, 0x8c38,
+	0x8c38, 0x8c40, 0x8c38, 0x8c38, 0x8c38, 0x8c38, 0x8c38, 0x8c42,
+	0x080c, 0x0dd5, 0xa180, 0x0038, 0xa198, 0x0028, 0xa1b0, 0x0018,
+	0xa1c8, 0x0008, 0xa1e0, 0x2600, 0x0002, 0x8c5e, 0x8c60, 0x8c62,
+	0x8c64, 0x8c66, 0x8c68, 0x8c6a, 0x8c6c, 0x8c6e, 0x8c70, 0x8c72,
+	0x8c74, 0x8c76, 0x8c78, 0x8c7a, 0x8c7c, 0x8c7e, 0x8c80, 0x8c82,
+	0x8c84, 0x8c86, 0x8c88, 0x8c8a, 0x8c8c, 0x8c8e, 0x080c, 0x0dd5,
+	0xb9e2, 0x0468, 0xb9de, 0x0458, 0xb9da, 0x0448, 0xb9d6, 0x0438,
+	0xb9d2, 0x0428, 0xb9ce, 0x0418, 0xb9ca, 0x0408, 0xb9c6, 0x00f8,
+	0xb9c2, 0x00e8, 0xb9be, 0x00d8, 0xb9ba, 0x00c8, 0xb9b6, 0x00b8,
+	0xb9b2, 0x00a8, 0xb9ae, 0x0098, 0xb9aa, 0x0088, 0xb9a6, 0x0078,
+	0xb9a2, 0x0068, 0xb99e, 0x0058, 0xb99a, 0x0048, 0xb996, 0x0038,
+	0xb992, 0x0028, 0xb98e, 0x0018, 0xb98a, 0x0008, 0xb986, 0x8631,
+	0x8421, 0x0120, 0x080c, 0x204a, 0x0804, 0x8be2, 0x00ae, 0x00be,
+	0x00ce, 0x00ee, 0x0005, 0xa86c, 0xa06e, 0xa870, 0xa072, 0xa077,
+	0x00ff, 0x9006, 0x0804, 0x8bc4, 0x0006, 0x0016, 0x00b6, 0x6010,
+	0x2058, 0xb810, 0x9005, 0x01b0, 0x2001, 0x1924, 0x2004, 0x9005,
+	0x0188, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036,
+	0x0046, 0xbba0, 0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4b14,
+	0x004e, 0x003e, 0x00be, 0x001e, 0x000e, 0x0005, 0x9016, 0x710c,
+	0xa834, 0x910a, 0xa936, 0x7008, 0x9005, 0x0120, 0x8210, 0x910a,
+	0x0238, 0x0130, 0x7010, 0x8210, 0x910a, 0x0210, 0x0108, 0x0cd8,
+	0xaa8a, 0xa26a, 0x0005, 0x00f6, 0x00d6, 0x0036, 0x2079, 0x0300,
+	0x781b, 0x0200, 0x7818, 0xd094, 0x1dd8, 0x781b, 0x0202, 0xa001,
+	0xa001, 0x7818, 0xd094, 0x1da0, 0xb8ac, 0x9005, 0x01b8, 0x2068,
+	0x2079, 0x0000, 0x2c08, 0x911e, 0x1118, 0x680c, 0xb8ae, 0x0060,
+	0x9106, 0x0140, 0x2d00, 0x2078, 0x680c, 0x9005, 0x090c, 0x0dd5,
+	0x2068, 0x0cb0, 0x6b0c, 0x7b0e, 0x600f, 0x0000, 0x2079, 0x0300,
+	0x781b, 0x0200, 0x003e, 0x00de, 0x00fe, 0x0005, 0x00e6, 0x00d6,
+	0x0096, 0x00c6, 0x0036, 0x0126, 0x2091, 0x8000, 0x0156, 0x20a9,
+	0x01ff, 0x2071, 0x0300, 0x701b, 0x0200, 0x7018, 0xd094, 0x0110,
+	0x1f04, 0x8d1b, 0x701b, 0x0202, 0xa001, 0xa001, 0x7018, 0xd094,
+	0x1d90, 0xb8ac, 0x9005, 0x01d0, 0x2060, 0x600c, 0xb8ae, 0x6003,
+	0x0004, 0x601b, 0x0000, 0x6013, 0x0000, 0x601f, 0x0101, 0x6014,
+	0x2048, 0xa88b, 0x0000, 0xa8a8, 0xa8ab, 0x0000, 0x904d, 0x090c,
+	0x0dd5, 0x080c, 0x1031, 0x080c, 0x88d6, 0x0c18, 0x2071, 0x0300,
+	0x701b, 0x0200, 0x015e, 0x012e, 0x003e, 0x00ce, 0x009e, 0x00de,
+	0x00ee, 0x0005, 0x00c6, 0x00b6, 0x0016, 0x0006, 0x0156, 0x080c,
+	0x2840, 0x015e, 0x11b0, 0x080c, 0x65a7, 0x190c, 0x0dd5, 0x000e,
+	0x001e, 0xb912, 0xb816, 0x080c, 0xae1b, 0x0140, 0x2b00, 0x6012,
+	0x6023, 0x0001, 0x2009, 0x0001, 0x080c, 0xaeec, 0x00be, 0x00ce,
+	0x0005, 0x000e, 0x001e, 0x0cd0, 0x0066, 0x6000, 0x90b2, 0x0016,
+	0x1a0c, 0x0dd5, 0x0013, 0x006e, 0x0005, 0x8d8d, 0x8d8d, 0x8d8d,
+	0x8d8f, 0x8de0, 0x8d8d, 0x8d8d, 0x8d8d, 0x8e43, 0x8d8d, 0x8e80,
+	0x8d8d, 0x8d8d, 0x8d8d, 0x8d8d, 0x8d8d, 0x080c, 0x0dd5, 0x9182,
+	0x0040, 0x0002, 0x8da2, 0x8da2, 0x8da2, 0x8da2, 0x8da2, 0x8da2,
+	0x8da2, 0x8da2, 0x8da2, 0x8da4, 0x8db9, 0x8da2, 0x8da2, 0x8da2,
+	0x8da2, 0x8dcc, 0x080c, 0x0dd5, 0x0096, 0x080c, 0x9637, 0x080c,
+	0x97b5, 0x6114, 0x2148, 0xa87b, 0x0000, 0x6010, 0x00b6, 0x2058,
+	0xb8bb, 0x0500, 0x00be, 0x080c, 0x6a8c, 0x080c, 0xae71, 0x009e,
+	0x0005, 0x080c, 0x9637, 0x00d6, 0x6114, 0x080c, 0xcb4a, 0x0130,
+	0x0096, 0x6114, 0x2148, 0x080c, 0x6c86, 0x009e, 0x00de, 0x080c,
+	0xae71, 0x080c, 0x97b5, 0x0005, 0x080c, 0x9637, 0x080c, 0x31c1,
+	0x6114, 0x0096, 0x2148, 0x080c, 0xcb4a, 0x0120, 0xa87b, 0x0029,
+	0x080c, 0x6c86, 0x009e, 0x080c, 0xae71, 0x080c, 0x97b5, 0x0005,
+	0x601b, 0x0000, 0x9182, 0x0040, 0x0096, 0x0002, 0x8dfb, 0x8dfb,
+	0x8dfb, 0x8dfb, 0x8dfb, 0x8dfb, 0x8dfb, 0x8dfb, 0x8dfd, 0x8dfb,
+	0x8dfb, 0x8dfb, 0x8e3f, 0x8dfb, 0x8dfb, 0x8dfb, 0x8dfb, 0x8dfb,
+	0x8dfb, 0x8e03, 0x8dfb, 0x080c, 0x0dd5, 0x6114, 0x2148, 0xa938,
+	0x918e, 0xffff, 0x05e0, 0x00e6, 0x6114, 0x2148, 0x080c, 0x8bac,
+	0x0096, 0xa8a8, 0x2048, 0x080c, 0x6a24, 0x009e, 0xa8ab, 0x0000,
+	0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, 0x080c, 0x8cdb, 0x00be,
+	0xae88, 0x00b6, 0x2059, 0x0000, 0x080c, 0x88df, 0x00be, 0x01e0,
+	0x2071, 0x193c, 0x080c, 0x8926, 0x01b8, 0x9086, 0x0001, 0x1128,
+	0x2001, 0x1946, 0x2004, 0x9005, 0x1178, 0x0096, 0x080c, 0x0fff,
+	0x2900, 0x009e, 0x0148, 0xa8aa, 0x00f6, 0x2c78, 0x080c, 0x889d,
+	0x00fe, 0x00ee, 0x009e, 0x0005, 0x080c, 0x88d6, 0x0cd0, 0x080c,
+	0x8eed, 0x009e, 0x0005, 0x9182, 0x0040, 0x0096, 0x0002, 0x8e57,
+	0x8e57, 0x8e57, 0x8e59, 0x8e57, 0x8e57, 0x8e57, 0x8e7e, 0x8e57,
+	0x8e57, 0x8e57, 0x8e57, 0x8e57, 0x8e57, 0x8e57, 0x8e57, 0x080c,
+	0x0dd5, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa8ac, 0xa846,
+	0xa8b0, 0xa84a, 0xa837, 0x0000, 0xa83b, 0x0000, 0xa884, 0x9092,
+	0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210,
+	0x621a, 0x2c10, 0x080c, 0x1baf, 0x080c, 0x913e, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x97b5, 0x012e, 0x009e, 0x0005, 0x080c, 0x0dd5,
+	0x080c, 0x9637, 0x080c, 0x97b5, 0x6114, 0x2148, 0xa87b, 0x0000,
+	0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6c86,
+	0x080c, 0xae71, 0x009e, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c,
+	0x0dd5, 0x0096, 0x0013, 0x009e, 0x0005, 0x8ead, 0x8ead, 0x8ead,
+	0x8eaf, 0x8ec0, 0x8ead, 0x8ead, 0x8ead, 0x8ead, 0x8ead, 0x8ead,
+	0x8ead, 0x8ead, 0x8ead, 0x8ead, 0x8ead, 0x080c, 0x0dd5, 0x080c,
+	0xa7cd, 0x6114, 0x2148, 0xa87b, 0x0006, 0x6010, 0x00b6, 0x2058,
+	0xb8bb, 0x0500, 0x00be, 0x080c, 0x6c86, 0x080c, 0xae71, 0x0005,
+	0x0461, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0096,
+	0x0013, 0x009e, 0x0005, 0x8edb, 0x8edb, 0x8edb, 0x8edd, 0x8eed,
+	0x8edb, 0x8edb, 0x8edb, 0x8edb, 0x8edb, 0x8edb, 0x8edb, 0x8edb,
+	0x8edb, 0x8edb, 0x8edb, 0x080c, 0x0dd5, 0x0036, 0x00e6, 0x2071,
+	0x19e6, 0x703c, 0x9c06, 0x1120, 0x2019, 0x0000, 0x080c, 0xa5b7,
+	0x080c, 0xa7cd, 0x00ee, 0x003e, 0x0005, 0x00f6, 0x00e6, 0x601b,
+	0x0000, 0x6014, 0x2048, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058,
+	0x080c, 0x8cdb, 0x00be, 0x2071, 0x193c, 0x080c, 0x8926, 0x0160,
+	0x2001, 0x187f, 0x2004, 0xa88a, 0x2031, 0x0000, 0x2c78, 0x080c,
+	0x889d, 0x00ee, 0x00fe, 0x0005, 0x0096, 0xa88b, 0x0000, 0xa8a8,
+	0x2048, 0x080c, 0x1031, 0x009e, 0xa8ab, 0x0000, 0x080c, 0x88d6,
+	0x0c80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x187a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0126, 0x2091, 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010,
+	0x9006, 0x8004, 0x2019, 0x0100, 0x231c, 0x93a6, 0x0008, 0x1118,
+	0x8086, 0x818e, 0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x1208,
+	0x9200, 0x1f04, 0x8f32, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e,
+	0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x004e, 0x003e, 0x012e,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010,
+	0x9005, 0x0510, 0x911a, 0x1600, 0x8213, 0x2039, 0x0100, 0x273c,
+	0x97be, 0x0008, 0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x0228,
+	0x911a, 0x1220, 0x1f04, 0x8f5c, 0x0028, 0x911a, 0x2308, 0x8210,
+	0x1f04, 0x8f5c, 0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e,
+	0x015e, 0x007e, 0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000,
+	0x0ca8, 0x0126, 0x2091, 0x2800, 0x2079, 0x19e6, 0x012e, 0x00d6,
+	0x2069, 0x19e6, 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9,
+	0x0000, 0x2069, 0x0200, 0x080c, 0xab2c, 0x0401, 0x080c, 0xab17,
+	0x00e9, 0x080c, 0xab1a, 0x00d1, 0x080c, 0xab1d, 0x00b9, 0x080c,
+	0xab20, 0x00a1, 0x080c, 0xab23, 0x0089, 0x080c, 0xab26, 0x0071,
+	0x080c, 0xab29, 0x0059, 0x01de, 0x014e, 0x015e, 0x2069, 0x0004,
+	0x2d04, 0x9085, 0x8001, 0x206a, 0x00de, 0x0005, 0x20a9, 0x0020,
+	0x20a1, 0x0240, 0x2001, 0x0000, 0x4004, 0x0005, 0x00c6, 0x6027,
+	0x0001, 0x7804, 0x9084, 0x0007, 0x0002, 0x8fcf, 0x8ff3, 0x9032,
+	0x8fd5, 0x8ff3, 0x8fcf, 0x8fcd, 0x8fcd, 0x080c, 0x0dd5, 0x080c,
+	0x8562, 0x080c, 0x9687, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110,
+	0x00ce, 0x0005, 0x2011, 0x5e8c, 0x080c, 0x84dc, 0x7828, 0x9092,
+	0x00c8, 0x1228, 0x8000, 0x782a, 0x080c, 0x5ecc, 0x0c88, 0x62c0,
+	0x080c, 0xac68, 0x080c, 0x5e8c, 0x7807, 0x0003, 0x7827, 0x0000,
+	0x782b, 0x0000, 0x0c28, 0x080c, 0x8562, 0x6220, 0xd2a4, 0x0160,
 	0x782b, 0x0000, 0x7824, 0x9065, 0x090c, 0x0dd5, 0x2009, 0x0013,
-	0x080c, 0xaf2e, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x7824,
-	0x9005, 0x090c, 0x0dd5, 0x7828, 0x9092, 0xc350, 0x1648, 0x8000,
-	0x782a, 0x00de, 0x00ce, 0x00be, 0x080c, 0x2ba5, 0x02f0, 0x00b6,
-	0x00c6, 0x00d6, 0x781c, 0x905d, 0x090c, 0x0dd5, 0xb800, 0xc0dc,
-	0xb802, 0x7924, 0x2160, 0x080c, 0xae61, 0xb93c, 0x81ff, 0x090c,
-	0x0dd5, 0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000, 0x00de,
-	0x00ce, 0x00be, 0x080c, 0x968d, 0x0868, 0x080c, 0xa24f, 0x0850,
-	0x2011, 0x0130, 0x2214, 0x080c, 0xac5d, 0x080c, 0xe9fe, 0x7824,
-	0x9065, 0x2009, 0x0014, 0x080c, 0xaedc, 0x00de, 0x00ce, 0x00be,
-	0x0804, 0x905a, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x190c,
-	0x1eb4, 0x6024, 0x6027, 0x0002, 0xd0f4, 0x15b8, 0x62c8, 0x60c4,
-	0x9205, 0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049, 0x080c,
-	0xaedc, 0x00ce, 0x0005, 0x2011, 0x1a06, 0x2013, 0x0000, 0x0cc8,
-	0x793c, 0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x1628, 0x8108,
-	0x7946, 0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006, 0x1138,
-	0x6014, 0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10, 0x793c,
-	0x9188, 0x0008, 0x210c, 0x918e, 0x0009, 0x0d90, 0x6014, 0x9084,
-	0x1984, 0x9085, 0x0016, 0x6016, 0x08a0, 0x793c, 0x2160, 0x2009,
-	0x004a, 0x080c, 0xaedc, 0x0868, 0x7848, 0xc085, 0x784a, 0x0848,
-	0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000,
-	0x2c08, 0x2061, 0x19e7, 0x6020, 0x8000, 0x6022, 0x6010, 0x9005,
-	0x0148, 0x9080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce, 0x001e,
-	0x000e, 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069, 0x19e7,
-	0xb800, 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0x9086, 0x0001,
-	0x1110, 0x2b00, 0x681e, 0x00de, 0x0804, 0x968d, 0x00de, 0x0005,
-	0xc0d5, 0xb802, 0x6818, 0x9005, 0x0168, 0xb856, 0xb85b, 0x0000,
-	0x0086, 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a, 0x008e, 0x2069,
-	0x19e7, 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a, 0x681e, 0x08d8,
-	0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000,
-	0x2c08, 0x2061, 0x19e7, 0x6020, 0x8000, 0x6022, 0x6008, 0x9005,
-	0x0148, 0x9080, 0x0003, 0x2102, 0x610a, 0x012e, 0x00ce, 0x001e,
-	0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6, 0x600f, 0x0000,
-	0x2c08, 0x2061, 0x19e7, 0x6034, 0x9005, 0x0130, 0x9080, 0x0003,
-	0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136, 0x00ce, 0x0005,
-	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066,
-	0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e, 0x2071,
-	0x19e7, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904,
-	0x91df, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x91da, 0x87ff,
-	0x0120, 0x6054, 0x9106, 0x1904, 0x91da, 0x703c, 0x9c06, 0x1178,
-	0x0036, 0x2019, 0x0001, 0x080c, 0xa5b6, 0x7033, 0x0000, 0x9006,
-	0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x2029, 0x0001, 0x7038,
-	0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00,
-	0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c,
-	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x080c, 0xcb35, 0x01c8, 0x6014, 0x2048, 0x6020, 0x9086,
-	0x0003, 0x1590, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016,
-	0x0036, 0x0076, 0x080c, 0xce24, 0x080c, 0xe908, 0x080c, 0x6c81,
-	0x007e, 0x003e, 0x001e, 0x080c, 0xcd1e, 0x080c, 0xae92, 0x00ce,
-	0x0804, 0x917e, 0x2c78, 0x600c, 0x2060, 0x0804, 0x917e, 0x85ff,
-	0x0120, 0x0036, 0x080c, 0x97b9, 0x003e, 0x012e, 0x000e, 0x001e,
-	0x002e, 0x003e, 0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce,
-	0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158,
-	0x0016, 0x0036, 0x0076, 0x080c, 0xe908, 0x080c, 0xe551, 0x007e,
-	0x003e, 0x001e, 0x0890, 0x6020, 0x9086, 0x0009, 0x1168, 0xa87b,
-	0x0006, 0x0016, 0x0036, 0x0076, 0x080c, 0x6c81, 0x080c, 0xae61,
-	0x007e, 0x003e, 0x001e, 0x0818, 0x6020, 0x9086, 0x000a, 0x0904,
-	0x91c4, 0x0804, 0x91c2, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6,
-	0x00f6, 0x9036, 0x0126, 0x2091, 0x8000, 0x2079, 0x19e7, 0x7838,
-	0x9065, 0x0904, 0x926b, 0x600c, 0x0006, 0x600f, 0x0000, 0x783c,
-	0x9c06, 0x1168, 0x0036, 0x2019, 0x0001, 0x080c, 0xa5b6, 0x7833,
-	0x0000, 0x901e, 0x7b3e, 0x7b42, 0x7b46, 0x7b4a, 0x003e, 0x080c,
-	0xcb35, 0x0520, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1568,
-	0x3e08, 0x918e, 0x0002, 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6040, 0x9005, 0x1180,
-	0x2001, 0x1988, 0x2004, 0x6042, 0x0058, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0x6c75, 0x080c, 0xcd1e, 0x080c, 0xae92,
-	0x000e, 0x0804, 0x9228, 0x7e3a, 0x7e36, 0x012e, 0x00fe, 0x00de,
-	0x00ce, 0x009e, 0x006e, 0x000e, 0x0005, 0x6020, 0x9086, 0x0006,
-	0x1118, 0x080c, 0xe551, 0x0c50, 0x6020, 0x9086, 0x0009, 0x1130,
-	0xab7a, 0x080c, 0x6c81, 0x080c, 0xae61, 0x0c10, 0x6020, 0x9086,
-	0x000a, 0x09a8, 0x0890, 0x0016, 0x0026, 0x0086, 0x9046, 0x0099,
-	0x080c, 0x9374, 0x008e, 0x002e, 0x001e, 0x0005, 0x00f6, 0x0126,
-	0x2079, 0x19e7, 0x2091, 0x8000, 0x080c, 0x940b, 0x080c, 0x9499,
-	0x012e, 0x00fe, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x00e6, 0x00d6,
-	0x00c6, 0x0066, 0x0016, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x19e7, 0x7614, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9339, 0x6010,
-	0x2058, 0xb8a0, 0x9206, 0x1904, 0x9334, 0x88ff, 0x0120, 0x6054,
-	0x9106, 0x1904, 0x9334, 0x7024, 0x9c06, 0x1558, 0x2069, 0x0100,
-	0x6820, 0xd0a4, 0x1508, 0x080c, 0x8579, 0x080c, 0xa273, 0x68c3,
-	0x0000, 0x080c, 0xa7bc, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140,
-	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2cef,
-	0x9006, 0x080c, 0x2cef, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
-	0x6827, 0x0001, 0x003e, 0x0028, 0x6003, 0x0009, 0x630a, 0x0804,
-	0x9334, 0x7014, 0x9c36, 0x1110, 0x660c, 0x7616, 0x7010, 0x9c36,
-	0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012, 0x0010, 0x7013,
-	0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
-	0x2678, 0x600f, 0x0000, 0x6014, 0x2048, 0x080c, 0xcb35, 0x01e8,
-	0x6020, 0x9086, 0x0003, 0x1580, 0x080c, 0xcd3b, 0x1118, 0x080c,
-	0xb813, 0x0098, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016,
-	0x0036, 0x0086, 0x080c, 0xce24, 0x080c, 0xe908, 0x080c, 0x6c81,
-	0x008e, 0x003e, 0x001e, 0x080c, 0xcd1e, 0x080c, 0xae92, 0x080c,
-	0xa692, 0x00ce, 0x0804, 0x92b4, 0x2c78, 0x600c, 0x2060, 0x0804,
-	0x92b4, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce, 0x00de, 0x00ee,
-	0x00fe, 0x009e, 0x00be, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158,
-	0x0016, 0x0036, 0x0086, 0x080c, 0xe908, 0x080c, 0xe551, 0x008e,
-	0x003e, 0x001e, 0x08d0, 0x080c, 0xb813, 0x6020, 0x9086, 0x0002,
-	0x1160, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0904, 0x931a,
-	0x9086, 0x008b, 0x0904, 0x931a, 0x0840, 0x6020, 0x9086, 0x0005,
-	0x1920, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x09c8, 0x9086,
-	0x008b, 0x09b0, 0x0804, 0x932d, 0x00b6, 0x00a6, 0x0096, 0x00c6,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x9280, 0x1000, 0x2004, 0x905d,
-	0x0904, 0x9404, 0x00f6, 0x00e6, 0x00d6, 0x0066, 0x2071, 0x19e7,
-	0xbe54, 0x7018, 0x9b06, 0x1108, 0x761a, 0x701c, 0x9b06, 0x1130,
-	0x86ff, 0x1118, 0x7018, 0x701e, 0x0008, 0x761e, 0xb858, 0x904d,
-	0x0108, 0xae56, 0x96d5, 0x0000, 0x0110, 0x2900, 0xb05a, 0xb857,
-	0x0000, 0xb85b, 0x0000, 0xb800, 0xc0d4, 0xc0dc, 0xb802, 0x080c,
-	0x6531, 0x0904, 0x9400, 0x7624, 0x86ff, 0x0904, 0x93ef, 0x9680,
-	0x0005, 0x2004, 0x9906, 0x15d8, 0x00d6, 0x2069, 0x0100, 0x68c0,
-	0x9005, 0x0560, 0x080c, 0x8579, 0x080c, 0xa273, 0x68c3, 0x0000,
-	0x080c, 0xa7bc, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
-	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2cef, 0x9006,
-	0x080c, 0x2cef, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
-	0x0001, 0x003e, 0x00de, 0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001,
-	0xb83e, 0x2660, 0x080c, 0xae92, 0x00ce, 0x0048, 0x00de, 0x00c6,
-	0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x93a7, 0x89ff,
-	0x0158, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xce24,
-	0x080c, 0xe908, 0x080c, 0x6c81, 0x080c, 0xa692, 0x0804, 0x93a7,
-	0x006e, 0x00de, 0x00ee, 0x00fe, 0x012e, 0x000e, 0x00ce, 0x009e,
-	0x00ae, 0x00be, 0x0005, 0x0096, 0x0006, 0x0066, 0x00c6, 0x00d6,
-	0x9036, 0x7814, 0x9065, 0x0904, 0x946c, 0x600c, 0x0006, 0x600f,
-	0x0000, 0x7824, 0x9c06, 0x1570, 0x2069, 0x0100, 0x6820, 0xd0a4,
-	0x1508, 0x080c, 0x8579, 0x080c, 0xa273, 0x68c3, 0x0000, 0x080c,
-	0xa7bc, 0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384,
-	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2cef, 0x9006, 0x080c,
-	0x2cef, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001,
-	0x003e, 0x0040, 0x080c, 0x690a, 0x1520, 0x6003, 0x0009, 0x630a,
-	0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c, 0xcb33, 0x01b0, 0x6020,
-	0x9086, 0x0003, 0x1508, 0x080c, 0xcd3b, 0x1118, 0x080c, 0xb813,
-	0x0060, 0x080c, 0x690a, 0x1168, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x080c, 0x6c81, 0x080c, 0xcd1e, 0x080c, 0xae92, 0x080c,
-	0xa692, 0x000e, 0x0804, 0x9412, 0x7e16, 0x7e12, 0x00de, 0x00ce,
-	0x006e, 0x000e, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1118,
-	0x080c, 0xe551, 0x0c50, 0x080c, 0xb813, 0x6020, 0x9086, 0x0002,
-	0x1150, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0990, 0x9086,
-	0x008b, 0x0978, 0x08d0, 0x6020, 0x9086, 0x0005, 0x19b0, 0x6004,
-	0x0006, 0x9086, 0x0085, 0x000e, 0x0d18, 0x9086, 0x008b, 0x0d00,
-	0x0860, 0x0006, 0x0066, 0x0096, 0x00b6, 0x00c6, 0x00d6, 0x7818,
-	0x905d, 0x0904, 0x9519, 0xb854, 0x0006, 0x9006, 0xb856, 0xb85a,
-	0xb800, 0xc0d4, 0xc0dc, 0xb802, 0x080c, 0x6531, 0x0904, 0x9516,
-	0x7e24, 0x86ff, 0x0904, 0x9509, 0x9680, 0x0005, 0x2004, 0x9906,
-	0x1904, 0x9509, 0x00d6, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904,
-	0x9500, 0x080c, 0x8579, 0x080c, 0xa273, 0x68c3, 0x0000, 0x080c,
-	0xa7bc, 0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384,
-	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2cef, 0x9006, 0x080c,
-	0x2cef, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001,
-	0x003e, 0x00de, 0x00c6, 0x3e08, 0x918e, 0x0002, 0x1168, 0xb800,
-	0xd0bc, 0x0150, 0x9680, 0x0010, 0x200c, 0x81ff, 0x1518, 0x2009,
-	0x1988, 0x210c, 0x2102, 0x00f0, 0xb83c, 0x9005, 0x0110, 0x8001,
-	0xb83e, 0x2660, 0x600f, 0x0000, 0x080c, 0xae92, 0x00ce, 0x0048,
-	0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804,
-	0x94ac, 0x89ff, 0x0138, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0x6c81, 0x080c, 0xa692, 0x0804, 0x94ac, 0x000e, 0x0804,
-	0x94a0, 0x781e, 0x781a, 0x00de, 0x00ce, 0x00be, 0x009e, 0x006e,
-	0x000e, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x0066, 0xb800, 0xd0dc,
-	0x01a0, 0xb84c, 0x904d, 0x0188, 0xa878, 0x9606, 0x1170, 0x2071,
-	0x19e7, 0x7024, 0x9035, 0x0148, 0x9080, 0x0005, 0x2004, 0x9906,
-	0x1120, 0xb800, 0xc0dc, 0xb802, 0x0029, 0x006e, 0x009e, 0x00de,
-	0x00ee, 0x0005, 0x00f6, 0x2079, 0x0100, 0x78c0, 0x9005, 0x1138,
-	0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x04b8, 0x080c,
-	0xa273, 0x78c3, 0x0000, 0x080c, 0xa7bc, 0x7027, 0x0000, 0x0036,
-	0x2079, 0x0140, 0x7b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
-	0x080c, 0x2cef, 0x9006, 0x080c, 0x2cef, 0x2079, 0x0100, 0x7824,
-	0xd084, 0x0110, 0x7827, 0x0001, 0x080c, 0xa7bc, 0x003e, 0x080c,
-	0x6531, 0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660,
-	0x080c, 0xae61, 0x00ce, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0xce24, 0x080c, 0x6c81, 0x080c, 0xa692, 0x00fe, 0x0005,
-	0x00b6, 0x00e6, 0x00c6, 0x2011, 0x0101, 0x2204, 0xc0c4, 0x2012,
-	0x2001, 0x180c, 0x2014, 0xc2e4, 0x2202, 0x2071, 0x19e7, 0x7004,
-	0x9084, 0x0007, 0x0002, 0x95a5, 0x95a9, 0x95c0, 0x95e9, 0x9627,
-	0x95a5, 0x95c0, 0x95a3, 0x080c, 0x0dd5, 0x00ce, 0x00ee, 0x00be,
-	0x0005, 0x7024, 0x9065, 0x0148, 0x7020, 0x8001, 0x7022, 0x600c,
-	0x9015, 0x0158, 0x7216, 0x600f, 0x0000, 0x7007, 0x0000, 0x7027,
-	0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7216, 0x7212, 0x0ca8,
-	0x6010, 0x2058, 0x080c, 0x6531, 0xb800, 0xc0dc, 0xb802, 0x7007,
-	0x0000, 0x7027, 0x0000, 0x7020, 0x8001, 0x7022, 0x1148, 0x2001,
-	0x180c, 0x2014, 0xd2ec, 0x1180, 0x00ce, 0x00ee, 0x00be, 0x0005,
-	0xb854, 0x9015, 0x0120, 0x721e, 0x080c, 0x968d, 0x0ca8, 0x7218,
-	0x721e, 0x080c, 0x968d, 0x0c80, 0xc2ec, 0x2202, 0x080c, 0x97b9,
-	0x0c58, 0x7024, 0x9065, 0x05b8, 0x700c, 0x9c06, 0x1160, 0x080c,
-	0xa692, 0x600c, 0x9015, 0x0120, 0x720e, 0x600f, 0x0000, 0x0448,
-	0x720e, 0x720a, 0x0430, 0x7014, 0x9c06, 0x1160, 0x080c, 0xa692,
-	0x600c, 0x9015, 0x0120, 0x7216, 0x600f, 0x0000, 0x00d0, 0x7216,
-	0x7212, 0x00b8, 0x6020, 0x9086, 0x0003, 0x1198, 0x6010, 0x2058,
-	0x080c, 0x6531, 0xb800, 0xc0dc, 0xb802, 0x080c, 0xa692, 0x701c,
-	0x9065, 0x0138, 0xb854, 0x9015, 0x0110, 0x721e, 0x0010, 0x7218,
-	0x721e, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024,
-	0x9065, 0x0140, 0x080c, 0xa692, 0x600c, 0x9015, 0x0158, 0x720e,
-	0x600f, 0x0000, 0x080c, 0xa7bc, 0x7027, 0x0000, 0x00ce, 0x00ee,
-	0x00be, 0x0005, 0x720e, 0x720a, 0x0ca8, 0x00d6, 0x2069, 0x19e7,
-	0x6830, 0x9084, 0x0003, 0x0002, 0x964a, 0x964c, 0x9670, 0x9648,
-	0x080c, 0x0dd5, 0x00de, 0x0005, 0x00c6, 0x6840, 0x9086, 0x0001,
-	0x01b8, 0x683c, 0x9065, 0x0130, 0x600c, 0x9015, 0x0170, 0x6a3a,
-	0x600f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x2011, 0x1a06,
-	0x2013, 0x0000, 0x00ce, 0x00de, 0x0005, 0x683a, 0x6836, 0x0c90,
-	0x6843, 0x0000, 0x6838, 0x9065, 0x0d68, 0x6003, 0x0003, 0x0c50,
-	0x00c6, 0x9006, 0x6842, 0x6846, 0x684a, 0x683c, 0x9065, 0x0160,
-	0x600c, 0x9015, 0x0130, 0x6a3a, 0x600f, 0x0000, 0x683f, 0x0000,
-	0x0018, 0x683e, 0x683a, 0x6836, 0x00ce, 0x00de, 0x0005, 0x2001,
-	0x180c, 0x200c, 0xc1e5, 0x2102, 0x0005, 0x2001, 0x180c, 0x200c,
-	0xd1ec, 0x0120, 0xc1ec, 0x2102, 0x080c, 0x97b9, 0x2001, 0x19f3,
-	0x2004, 0x9086, 0x0001, 0x0d58, 0x00d6, 0x2069, 0x19e7, 0x6804,
-	0x9084, 0x0007, 0x0006, 0x9005, 0x11c8, 0x2001, 0x1837, 0x2004,
-	0x9084, 0x0028, 0x1198, 0x2001, 0x197c, 0x2004, 0x9086, 0xaaaa,
-	0x0168, 0x2001, 0x188b, 0x2004, 0xd08c, 0x1118, 0xd084, 0x1118,
-	0x0028, 0x080c, 0x97b9, 0x000e, 0x00de, 0x0005, 0x000e, 0x0002,
-	0x96ca, 0x9787, 0x9787, 0x9787, 0x9787, 0x9789, 0x9787, 0x96c8,
-	0x080c, 0x0dd5, 0x6820, 0x9005, 0x1110, 0x00de, 0x0005, 0x00c6,
-	0x680c, 0x9065, 0x0520, 0x6114, 0x0096, 0x2148, 0xa964, 0x009e,
-	0x918c, 0x00ff, 0x918e, 0x0035, 0x1180, 0x2009, 0x1837, 0x210c,
-	0x918c, 0x0028, 0x1150, 0x080c, 0x73bc, 0x0138, 0x0006, 0x2009,
-	0x188b, 0x2104, 0xc095, 0x200a, 0x000e, 0x6807, 0x0004, 0x6826,
-	0x682b, 0x0000, 0x080c, 0x9861, 0x00ce, 0x00de, 0x0005, 0x6814,
-	0x9065, 0x0150, 0x6807, 0x0001, 0x6826, 0x682b, 0x0000, 0x080c,
-	0x9861, 0x00ce, 0x00de, 0x0005, 0x00b6, 0x00e6, 0x6a1c, 0x92dd,
-	0x0000, 0x0904, 0x9773, 0xb84c, 0x900d, 0x0118, 0xb888, 0x9005,
-	0x01a0, 0xb854, 0x905d, 0x0120, 0x920e, 0x0904, 0x9773, 0x0028,
-	0x6818, 0x920e, 0x0904, 0x9773, 0x2058, 0xb84c, 0x900d, 0x0d88,
-	0xb888, 0x9005, 0x1d70, 0x2b00, 0x681e, 0xbb3c, 0xb838, 0x9302,
-	0x1e40, 0x080c, 0xae38, 0x0904, 0x9773, 0x8318, 0xbb3e, 0x6116,
-	0x2b10, 0x6212, 0x0096, 0x2148, 0xa880, 0x9084, 0x00ff, 0x605e,
-	0xa883, 0x0000, 0xa884, 0x009e, 0x908a, 0x199a, 0x0210, 0x2001,
-	0x1999, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x6114, 0x0096,
-	0x2148, 0xa964, 0x009e, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0538,
-	0x00f6, 0x2c78, 0x2061, 0x0100, 0xbac0, 0x629a, 0x2069, 0x0200,
-	0x2071, 0x0240, 0x080c, 0x9dae, 0x2069, 0x19e7, 0xbb00, 0xc3dd,
-	0xbb02, 0x6807, 0x0002, 0x2f18, 0x6b26, 0x682b, 0x0000, 0x7823,
-	0x0003, 0x7803, 0x0001, 0x7807, 0x0040, 0x00fe, 0x00ee, 0x00be,
-	0x00ce, 0x00de, 0x0005, 0x00ee, 0x00be, 0x00ce, 0x0cd0, 0xbb00,
-	0xc3dd, 0xbb02, 0x6807, 0x0006, 0x2f18, 0x6b26, 0x682b, 0x0000,
-	0x080c, 0xac7d, 0x00ee, 0x00be, 0x00ce, 0x00de, 0x0005, 0x00de,
-	0x0005, 0x00c6, 0x680c, 0x9065, 0x0508, 0x6114, 0x0096, 0x2148,
+	0x080c, 0xaeec, 0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c,
+	0x0dd5, 0x7828, 0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce,
+	0x080c, 0x2ba7, 0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d,
+	0x090c, 0x0dd5, 0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c,
+	0x9687, 0x0c00, 0x080c, 0xa250, 0x08e8, 0x2011, 0x0130, 0x2214,
+	0x080c, 0xac68, 0x080c, 0xea1f, 0x2009, 0x0014, 0x080c, 0xaeec,
+	0x00ce, 0x0880, 0x2001, 0x1a02, 0x2003, 0x0000, 0x62c0, 0x82ff,
+	0x1160, 0x782b, 0x0000, 0x7824, 0x9065, 0x090c, 0x0dd5, 0x2009,
+	0x0013, 0x080c, 0xaf3e, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6,
+	0x7824, 0x9005, 0x090c, 0x0dd5, 0x7828, 0x9092, 0xc350, 0x1648,
+	0x8000, 0x782a, 0x00de, 0x00ce, 0x00be, 0x080c, 0x2ba7, 0x02f0,
+	0x00b6, 0x00c6, 0x00d6, 0x781c, 0x905d, 0x090c, 0x0dd5, 0xb800,
+	0xc0dc, 0xb802, 0x7924, 0x2160, 0x080c, 0xae71, 0xb93c, 0x81ff,
+	0x090c, 0x0dd5, 0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000,
+	0x00de, 0x00ce, 0x00be, 0x080c, 0x9687, 0x0868, 0x080c, 0xa250,
+	0x0850, 0x2011, 0x0130, 0x2214, 0x080c, 0xac68, 0x080c, 0xea1f,
+	0x7824, 0x9065, 0x2009, 0x0014, 0x080c, 0xaeec, 0x00de, 0x00ce,
+	0x00be, 0x0804, 0x9043, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc,
+	0x190c, 0x1eb6, 0x6024, 0x6027, 0x0002, 0xd0f4, 0x15b8, 0x62c8,
+	0x60c4, 0x9205, 0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049,
+	0x080c, 0xaeec, 0x00ce, 0x0005, 0x2011, 0x1a05, 0x2013, 0x0000,
+	0x0cc8, 0x793c, 0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x1628,
+	0x8108, 0x7946, 0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006,
+	0x1138, 0x6014, 0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10,
+	0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0009, 0x0d90, 0x6014,
+	0x9084, 0x1984, 0x9085, 0x0016, 0x6016, 0x08a0, 0x793c, 0x2160,
+	0x2009, 0x004a, 0x080c, 0xaeec, 0x0868, 0x7848, 0xc085, 0x784a,
+	0x0848, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19e6, 0x6020, 0x8000, 0x6022, 0x6010,
+	0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce,
+	0x001e, 0x000e, 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069,
+	0x19e6, 0xb800, 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0x9086,
+	0x0001, 0x1110, 0x2b00, 0x681e, 0x00de, 0x0804, 0x9687, 0x00de,
+	0x0005, 0xc0d5, 0xb802, 0x6818, 0x9005, 0x0168, 0xb856, 0xb85b,
+	0x0000, 0x0086, 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a, 0x008e,
+	0x2069, 0x19e6, 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a, 0x681e,
+	0x08d8, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19e6, 0x6020, 0x8000, 0x6022, 0x6008,
+	0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x610a, 0x012e, 0x00ce,
+	0x001e, 0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19e6, 0x6034, 0x9005, 0x0130, 0x9080,
+	0x0003, 0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136, 0x00ce,
+	0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076,
+	0x0066, 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e,
+	0x2071, 0x19e6, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff,
+	0x0904, 0x91cd, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x91c8,
+	0x87ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x91c8, 0x703c, 0x9c06,
+	0x1178, 0x0036, 0x2019, 0x0001, 0x080c, 0xa5b7, 0x7033, 0x0000,
+	0x9006, 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x2029, 0x0001,
+	0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140,
+	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000,
+	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
+	0x600f, 0x0000, 0x080c, 0xcb4a, 0x01f0, 0x6014, 0x2048, 0x6020,
+	0x9086, 0x0003, 0x15b8, 0x6004, 0x9086, 0x0040, 0x090c, 0xa7bd,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076,
+	0x080c, 0xce3e, 0x080c, 0xe929, 0x080c, 0x6c86, 0x007e, 0x003e,
+	0x001e, 0x080c, 0xcd33, 0x080c, 0xaea2, 0x00ce, 0x0804, 0x9167,
+	0x2c78, 0x600c, 0x2060, 0x0804, 0x9167, 0x85ff, 0x0120, 0x0036,
+	0x080c, 0x97b5, 0x003e, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e,
+	0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036,
+	0x0076, 0x080c, 0xe929, 0x080c, 0xe572, 0x007e, 0x003e, 0x001e,
+	0x0890, 0x6020, 0x9086, 0x0009, 0x1168, 0xa87b, 0x0006, 0x0016,
+	0x0036, 0x0076, 0x080c, 0x6c86, 0x080c, 0xae71, 0x007e, 0x003e,
+	0x001e, 0x0818, 0x6020, 0x9086, 0x000a, 0x0904, 0x91b2, 0x0804,
+	0x91ab, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036,
+	0x0126, 0x2091, 0x8000, 0x2079, 0x19e6, 0x7838, 0x9065, 0x0904,
+	0x925e, 0x600c, 0x0006, 0x600f, 0x0000, 0x783c, 0x9c06, 0x1168,
+	0x0036, 0x2019, 0x0001, 0x080c, 0xa5b7, 0x7833, 0x0000, 0x901e,
+	0x7b3e, 0x7b42, 0x7b46, 0x7b4a, 0x003e, 0x080c, 0xcb4a, 0x0548,
+	0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1590, 0x3e08, 0x918e,
+	0x0002, 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0140, 0x6040, 0x9005, 0x11a8, 0x2001, 0x1987,
+	0x2004, 0x6042, 0x0080, 0x6004, 0x9086, 0x0040, 0x090c, 0xa7bd,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6c7a, 0x080c,
+	0xcd33, 0x080c, 0xaea2, 0x000e, 0x0804, 0x9216, 0x7e3a, 0x7e36,
+	0x012e, 0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005,
+	0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xe572, 0x0c50, 0x6020,
+	0x9086, 0x0009, 0x1130, 0xab7a, 0x080c, 0x6c86, 0x080c, 0xae71,
+	0x0c10, 0x6020, 0x9086, 0x000a, 0x09a8, 0x0868, 0x0016, 0x0026,
+	0x0086, 0x9046, 0x0099, 0x080c, 0x9367, 0x008e, 0x002e, 0x001e,
+	0x0005, 0x00f6, 0x0126, 0x2079, 0x19e6, 0x2091, 0x8000, 0x080c,
+	0x93fe, 0x080c, 0x948c, 0x012e, 0x00fe, 0x0005, 0x00b6, 0x0096,
+	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x19e6, 0x7614, 0x2660, 0x2678, 0x8cff,
+	0x0904, 0x932c, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x9327,
+	0x88ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x9327, 0x7024, 0x9c06,
+	0x1558, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c, 0x8562,
+	0x080c, 0xa274, 0x68c3, 0x0000, 0x080c, 0xa7bd, 0x7027, 0x0000,
+	0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001,
+	0x0100, 0x080c, 0x2cf1, 0x9006, 0x080c, 0x2cf1, 0x2069, 0x0100,
+	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0028, 0x6003,
+	0x0009, 0x630a, 0x0804, 0x9327, 0x7014, 0x9c36, 0x1110, 0x660c,
+	0x7616, 0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
+	0x7012, 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06,
+	0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048,
+	0x080c, 0xcb4a, 0x01e8, 0x6020, 0x9086, 0x0003, 0x1580, 0x080c,
+	0xcd50, 0x1118, 0x080c, 0xb824, 0x0098, 0xa867, 0x0103, 0xab7a,
+	0xa877, 0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xce3e, 0x080c,
+	0xe929, 0x080c, 0x6c86, 0x008e, 0x003e, 0x001e, 0x080c, 0xcd33,
+	0x080c, 0xaea2, 0x080c, 0xa693, 0x00ce, 0x0804, 0x92a7, 0x2c78,
+	0x600c, 0x2060, 0x0804, 0x92a7, 0x012e, 0x000e, 0x001e, 0x006e,
+	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be, 0x0005, 0x6020,
+	0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0086, 0x080c, 0xe929,
+	0x080c, 0xe572, 0x008e, 0x003e, 0x001e, 0x08d0, 0x080c, 0xb824,
+	0x6020, 0x9086, 0x0002, 0x1160, 0x6004, 0x0006, 0x9086, 0x0085,
+	0x000e, 0x0904, 0x930d, 0x9086, 0x008b, 0x0904, 0x930d, 0x0840,
+	0x6020, 0x9086, 0x0005, 0x1920, 0x6004, 0x0006, 0x9086, 0x0085,
+	0x000e, 0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804, 0x9320, 0x00b6,
+	0x00a6, 0x0096, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x9280,
+	0x1000, 0x2004, 0x905d, 0x0904, 0x93f7, 0x00f6, 0x00e6, 0x00d6,
+	0x0066, 0x2071, 0x19e6, 0xbe54, 0x7018, 0x9b06, 0x1108, 0x761a,
+	0x701c, 0x9b06, 0x1130, 0x86ff, 0x1118, 0x7018, 0x701e, 0x0008,
+	0x761e, 0xb858, 0x904d, 0x0108, 0xae56, 0x96d5, 0x0000, 0x0110,
+	0x2900, 0xb05a, 0xb857, 0x0000, 0xb85b, 0x0000, 0xb800, 0xc0d4,
+	0xc0dc, 0xb802, 0x080c, 0x653a, 0x0904, 0x93f3, 0x7624, 0x86ff,
+	0x0904, 0x93e2, 0x9680, 0x0005, 0x2004, 0x9906, 0x15d8, 0x00d6,
+	0x2069, 0x0100, 0x68c0, 0x9005, 0x0560, 0x080c, 0x8562, 0x080c,
+	0xa274, 0x68c3, 0x0000, 0x080c, 0xa7bd, 0x7027, 0x0000, 0x0036,
+	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
+	0x080c, 0x2cf1, 0x9006, 0x080c, 0x2cf1, 0x2069, 0x0100, 0x6824,
+	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0xb83c,
+	0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x080c, 0xaea2, 0x00ce,
+	0x0048, 0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce,
+	0x0804, 0x939a, 0x89ff, 0x0158, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x080c, 0xce3e, 0x080c, 0xe929, 0x080c, 0x6c86, 0x080c,
+	0xa693, 0x0804, 0x939a, 0x006e, 0x00de, 0x00ee, 0x00fe, 0x012e,
+	0x000e, 0x00ce, 0x009e, 0x00ae, 0x00be, 0x0005, 0x0096, 0x0006,
+	0x0066, 0x00c6, 0x00d6, 0x9036, 0x7814, 0x9065, 0x0904, 0x945f,
+	0x600c, 0x0006, 0x600f, 0x0000, 0x7824, 0x9c06, 0x1570, 0x2069,
+	0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c, 0x8562, 0x080c, 0xa274,
+	0x68c3, 0x0000, 0x080c, 0xa7bd, 0x7827, 0x0000, 0x0036, 0x2069,
+	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2cf1, 0x9006, 0x080c, 0x2cf1, 0x2069, 0x0100, 0x6824, 0xd084,
+	0x0110, 0x6827, 0x0001, 0x003e, 0x0040, 0x080c, 0x6913, 0x1520,
+	0x6003, 0x0009, 0x630a, 0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c,
+	0xcb48, 0x01b0, 0x6020, 0x9086, 0x0003, 0x1508, 0x080c, 0xcd50,
+	0x1118, 0x080c, 0xb824, 0x0060, 0x080c, 0x6913, 0x1168, 0xa867,
+	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6c86, 0x080c, 0xcd33,
+	0x080c, 0xaea2, 0x080c, 0xa693, 0x000e, 0x0804, 0x9405, 0x7e16,
+	0x7e12, 0x00de, 0x00ce, 0x006e, 0x000e, 0x009e, 0x0005, 0x6020,
+	0x9086, 0x0006, 0x1118, 0x080c, 0xe572, 0x0c50, 0x080c, 0xb824,
+	0x6020, 0x9086, 0x0002, 0x1150, 0x6004, 0x0006, 0x9086, 0x0085,
+	0x000e, 0x0990, 0x9086, 0x008b, 0x0978, 0x08d0, 0x6020, 0x9086,
+	0x0005, 0x19b0, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0d18,
+	0x9086, 0x008b, 0x0d00, 0x0860, 0x0006, 0x0066, 0x0096, 0x00b6,
+	0x00c6, 0x00d6, 0x7818, 0x905d, 0x0904, 0x950c, 0xb854, 0x0006,
+	0x9006, 0xb856, 0xb85a, 0xb800, 0xc0d4, 0xc0dc, 0xb802, 0x080c,
+	0x653a, 0x0904, 0x9509, 0x7e24, 0x86ff, 0x0904, 0x94fc, 0x9680,
+	0x0005, 0x2004, 0x9906, 0x1904, 0x94fc, 0x00d6, 0x2069, 0x0100,
+	0x68c0, 0x9005, 0x0904, 0x94f3, 0x080c, 0x8562, 0x080c, 0xa274,
+	0x68c3, 0x0000, 0x080c, 0xa7bd, 0x7827, 0x0000, 0x0036, 0x2069,
+	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2cf1, 0x9006, 0x080c, 0x2cf1, 0x2069, 0x0100, 0x6824, 0xd084,
+	0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0x3e08, 0x918e,
+	0x0002, 0x1168, 0xb800, 0xd0bc, 0x0150, 0x9680, 0x0010, 0x200c,
+	0x81ff, 0x1518, 0x2009, 0x1987, 0x210c, 0x2102, 0x00f0, 0xb83c,
+	0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x600f, 0x0000, 0x080c,
+	0xaea2, 0x00ce, 0x0048, 0x00de, 0x00c6, 0x2660, 0x6003, 0x0009,
+	0x630a, 0x00ce, 0x0804, 0x949f, 0x89ff, 0x0138, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x080c, 0x6c86, 0x080c, 0xa693, 0x0804,
+	0x949f, 0x000e, 0x0804, 0x9493, 0x781e, 0x781a, 0x00de, 0x00ce,
+	0x00be, 0x009e, 0x006e, 0x000e, 0x0005, 0x00e6, 0x00d6, 0x0096,
+	0x0066, 0xb800, 0xd0dc, 0x01a0, 0xb84c, 0x904d, 0x0188, 0xa878,
+	0x9606, 0x1170, 0x2071, 0x19e6, 0x7024, 0x9035, 0x0148, 0x9080,
+	0x0005, 0x2004, 0x9906, 0x1120, 0xb800, 0xc0dc, 0xb802, 0x0029,
+	0x006e, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00f6, 0x2079, 0x0100,
+	0x78c0, 0x9005, 0x1138, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a,
+	0x00ce, 0x04b8, 0x080c, 0xa274, 0x78c3, 0x0000, 0x080c, 0xa7bd,
+	0x7027, 0x0000, 0x0036, 0x2079, 0x0140, 0x7b04, 0x9384, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2cf1, 0x9006, 0x080c, 0x2cf1,
+	0x2079, 0x0100, 0x7824, 0xd084, 0x0110, 0x7827, 0x0001, 0x080c,
+	0xa7bd, 0x003e, 0x080c, 0x653a, 0x00c6, 0xb83c, 0x9005, 0x0110,
+	0x8001, 0xb83e, 0x2660, 0x080c, 0xae71, 0x00ce, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x080c, 0xce3e, 0x080c, 0x6c86, 0x080c,
+	0xa693, 0x00fe, 0x0005, 0x00b6, 0x00e6, 0x00c6, 0x2011, 0x0101,
+	0x2204, 0xc0c4, 0x2012, 0x2001, 0x180c, 0x2014, 0xc2e4, 0x2202,
+	0x2071, 0x19e6, 0x7004, 0x9084, 0x0007, 0x0002, 0x9598, 0x959c,
+	0x95ba, 0x95e3, 0x9621, 0x9598, 0x95b3, 0x9596, 0x080c, 0x0dd5,
+	0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, 0x0148, 0x7020,
+	0x8001, 0x7022, 0x600c, 0x9015, 0x0158, 0x7216, 0x600f, 0x0000,
+	0x7007, 0x0000, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005,
+	0x7216, 0x7212, 0x0ca8, 0x7007, 0x0000, 0x7027, 0x0000, 0x7020,
+	0x9005, 0x0070, 0x6010, 0x2058, 0x080c, 0x653a, 0xb800, 0xc0dc,
+	0xb802, 0x7007, 0x0000, 0x7027, 0x0000, 0x7020, 0x8001, 0x7022,
+	0x1148, 0x2001, 0x180c, 0x2014, 0xd2ec, 0x1180, 0x00ce, 0x00ee,
+	0x00be, 0x0005, 0xb854, 0x9015, 0x0120, 0x721e, 0x080c, 0x9687,
+	0x0ca8, 0x7218, 0x721e, 0x080c, 0x9687, 0x0c80, 0xc2ec, 0x2202,
+	0x080c, 0x97b5, 0x0c58, 0x7024, 0x9065, 0x05b8, 0x700c, 0x9c06,
+	0x1160, 0x080c, 0xa693, 0x600c, 0x9015, 0x0120, 0x720e, 0x600f,
+	0x0000, 0x0448, 0x720e, 0x720a, 0x0430, 0x7014, 0x9c06, 0x1160,
+	0x080c, 0xa693, 0x600c, 0x9015, 0x0120, 0x7216, 0x600f, 0x0000,
+	0x00d0, 0x7216, 0x7212, 0x00b8, 0x6020, 0x9086, 0x0003, 0x1198,
+	0x6010, 0x2058, 0x080c, 0x653a, 0xb800, 0xc0dc, 0xb802, 0x080c,
+	0xa693, 0x701c, 0x9065, 0x0138, 0xb854, 0x9015, 0x0110, 0x721e,
+	0x0010, 0x7218, 0x721e, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be,
+	0x0005, 0x7024, 0x9065, 0x0140, 0x080c, 0xa693, 0x600c, 0x9015,
+	0x0158, 0x720e, 0x600f, 0x0000, 0x080c, 0xa7bd, 0x7027, 0x0000,
+	0x00ce, 0x00ee, 0x00be, 0x0005, 0x720e, 0x720a, 0x0ca8, 0x00d6,
+	0x2069, 0x19e6, 0x6830, 0x9084, 0x0003, 0x0002, 0x9644, 0x9646,
+	0x966a, 0x9642, 0x080c, 0x0dd5, 0x00de, 0x0005, 0x00c6, 0x6840,
+	0x9086, 0x0001, 0x01b8, 0x683c, 0x9065, 0x0130, 0x600c, 0x9015,
+	0x0170, 0x6a3a, 0x600f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000,
+	0x2011, 0x1a05, 0x2013, 0x0000, 0x00ce, 0x00de, 0x0005, 0x683a,
+	0x6836, 0x0c90, 0x6843, 0x0000, 0x6838, 0x9065, 0x0d68, 0x6003,
+	0x0003, 0x0c50, 0x00c6, 0x9006, 0x6842, 0x6846, 0x684a, 0x683c,
+	0x9065, 0x0160, 0x600c, 0x9015, 0x0130, 0x6a3a, 0x600f, 0x0000,
+	0x683f, 0x0000, 0x0018, 0x683e, 0x683a, 0x6836, 0x00ce, 0x00de,
+	0x0005, 0x2001, 0x180c, 0x200c, 0xc1e5, 0x2102, 0x0005, 0x2001,
+	0x180c, 0x200c, 0xd1ec, 0x0120, 0xc1ec, 0x2102, 0x080c, 0x97b5,
+	0x2001, 0x19f2, 0x2004, 0x9086, 0x0001, 0x0d58, 0x00d6, 0x2069,
+	0x19e6, 0x6804, 0x9084, 0x0007, 0x0006, 0x9005, 0x11c8, 0x2001,
+	0x1837, 0x2004, 0x9084, 0x0028, 0x1198, 0x2001, 0x197b, 0x2004,
+	0x9086, 0xaaaa, 0x0168, 0x2001, 0x188b, 0x2004, 0xd08c, 0x1118,
+	0xd084, 0x1118, 0x0028, 0x080c, 0x97b5, 0x000e, 0x00de, 0x0005,
+	0x000e, 0x0002, 0x96c4, 0x9783, 0x9783, 0x9783, 0x9783, 0x9785,
+	0x9783, 0x96c2, 0x080c, 0x0dd5, 0x6820, 0x9005, 0x1110, 0x00de,
+	0x0005, 0x00c6, 0x680c, 0x9065, 0x0520, 0x6114, 0x0096, 0x2148,
 	0xa964, 0x009e, 0x918c, 0x00ff, 0x918e, 0x0035, 0x1180, 0x2009,
-	0x1837, 0x210c, 0x918c, 0x0028, 0x1150, 0x080c, 0x73bc, 0x0138,
+	0x1837, 0x210c, 0x918c, 0x0028, 0x1150, 0x080c, 0x73a5, 0x0138,
 	0x0006, 0x2009, 0x188b, 0x2104, 0xc095, 0x200a, 0x000e, 0x6807,
-	0x0004, 0x6826, 0x682b, 0x0000, 0x080c, 0x9861, 0x00ce, 0x00de,
-	0x0005, 0x2001, 0x180c, 0x2014, 0xc2ed, 0x2202, 0x00de, 0x00fe,
-	0x0005, 0x00f6, 0x00d6, 0x2069, 0x19e7, 0x6830, 0x9086, 0x0000,
-	0x1570, 0x2001, 0x180c, 0x2014, 0xd2e4, 0x0130, 0xc2e4, 0x2202,
-	0x080c, 0x969c, 0x2069, 0x19e7, 0x2001, 0x180c, 0x200c, 0xd1c4,
-	0x1508, 0x6838, 0x907d, 0x01d8, 0x6a04, 0x9296, 0x0000, 0x1904,
-	0x985a, 0x7920, 0x918e, 0x0009, 0x0588, 0x6833, 0x0001, 0x683e,
+	0x0004, 0x6826, 0x682b, 0x0000, 0x080c, 0x9862, 0x00ce, 0x00de,
+	0x0005, 0x6814, 0x9065, 0x0150, 0x6807, 0x0001, 0x6826, 0x682b,
+	0x0000, 0x080c, 0x9862, 0x00ce, 0x00de, 0x0005, 0x00b6, 0x00e6,
+	0x6a1c, 0x92dd, 0x0000, 0x0904, 0x976d, 0xb84c, 0x900d, 0x0118,
+	0xb888, 0x9005, 0x01a0, 0xb854, 0x905d, 0x0120, 0x920e, 0x0904,
+	0x976d, 0x0028, 0x6818, 0x920e, 0x0904, 0x976d, 0x2058, 0xb84c,
+	0x900d, 0x0d88, 0xb888, 0x9005, 0x1d70, 0x2b00, 0x681e, 0xbb3c,
+	0xb838, 0x9302, 0x1e40, 0x080c, 0xae48, 0x0904, 0x976d, 0x8318,
+	0xbb3e, 0x6116, 0x2b10, 0x6212, 0x0096, 0x2148, 0xa880, 0x9084,
+	0x00ff, 0x605e, 0xa883, 0x0000, 0xa884, 0x009e, 0x908a, 0x199a,
+	0x0210, 0x2001, 0x1999, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a,
+	0x6114, 0x0096, 0x2148, 0xa964, 0x009e, 0x918c, 0x00ff, 0x918e,
+	0x0048, 0x0538, 0x00f6, 0x2c78, 0x2061, 0x0100, 0xbac0, 0x629a,
+	0x2069, 0x0200, 0x2071, 0x0240, 0x080c, 0x9daf, 0x2069, 0x19e6,
+	0xbb00, 0xc3dd, 0xbb02, 0x6807, 0x0002, 0x2f18, 0x6b26, 0x682b,
+	0x0000, 0x7823, 0x0003, 0x7803, 0x0001, 0x7807, 0x0040, 0x00fe,
+	0x00ee, 0x00be, 0x00ce, 0x00de, 0x0005, 0x00ee, 0x00be, 0x00ce,
+	0x0cd0, 0x6807, 0x0006, 0x2c18, 0x6b26, 0x6820, 0x8001, 0x6822,
+	0x682b, 0x0000, 0x080c, 0x653a, 0x080c, 0xac88, 0x00ee, 0x00be,
+	0x00ce, 0x00de, 0x0005, 0x00de, 0x0005, 0x00c6, 0x680c, 0x9065,
+	0x0508, 0x6114, 0x0096, 0x2148, 0xa964, 0x009e, 0x918c, 0x00ff,
+	0x918e, 0x0035, 0x1180, 0x2009, 0x1837, 0x210c, 0x918c, 0x0028,
+	0x1150, 0x080c, 0x73a5, 0x0138, 0x0006, 0x2009, 0x188b, 0x2104,
+	0xc095, 0x200a, 0x000e, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000,
+	0x080c, 0x9862, 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x2014,
+	0xc2ed, 0x2202, 0x00de, 0x00fe, 0x0005, 0x00f6, 0x00d6, 0x2069,
+	0x19e6, 0x6830, 0x9086, 0x0000, 0x1570, 0x2001, 0x180c, 0x2014,
+	0xd2e4, 0x0130, 0xc2e4, 0x2202, 0x080c, 0x9696, 0x2069, 0x19e6,
+	0x2001, 0x180c, 0x200c, 0xd1c4, 0x1508, 0x6838, 0x907d, 0x01d8,
+	0x6a04, 0x9296, 0x0000, 0x1904, 0x9856, 0x7920, 0x918e, 0x0009,
+	0x0588, 0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000,
+	0x0126, 0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1c48, 0x1178,
+	0x012e, 0x080c, 0xa0d1, 0x00de, 0x00fe, 0x0005, 0xc1c4, 0x2102,
+	0x0066, 0x2031, 0x0001, 0x080c, 0x7455, 0x006e, 0x08b0, 0x012e,
+	0x6843, 0x0000, 0x7803, 0x0002, 0x780c, 0x9015, 0x0140, 0x6a3a,
+	0x780f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x0c20, 0x683a,
+	0x6836, 0x0cc0, 0x7908, 0xd1fc, 0x1198, 0x6833, 0x0001, 0x683e,
 	0x6847, 0x0000, 0x684b, 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400,
-	0x002e, 0x080c, 0x1c46, 0x1178, 0x012e, 0x080c, 0xa0d0, 0x00de,
-	0x00fe, 0x0005, 0xc1c4, 0x2102, 0x0066, 0x2031, 0x0001, 0x080c,
-	0x746c, 0x006e, 0x08b0, 0x012e, 0x6843, 0x0000, 0x7803, 0x0002,
-	0x780c, 0x9015, 0x0140, 0x6a3a, 0x780f, 0x0000, 0x6833, 0x0000,
-	0x683f, 0x0000, 0x0c20, 0x683a, 0x6836, 0x0cc0, 0x7908, 0xd1fc,
-	0x1198, 0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000,
-	0x0126, 0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1c46, 0x19d8,
-	0x012e, 0x080c, 0xa051, 0x0858, 0x2001, 0x1837, 0x2004, 0x9084,
-	0x0028, 0x1188, 0x2001, 0x197c, 0x2004, 0x9086, 0xaaaa, 0x0158,
-	0x2001, 0x19e8, 0x2004, 0x9005, 0x11f0, 0x2001, 0x188b, 0x200c,
-	0xc185, 0xc18c, 0x2102, 0x2f00, 0x6833, 0x0001, 0x683e, 0x6847,
-	0x0000, 0x684b, 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400, 0x002e,
-	0x080c, 0x1c46, 0x1904, 0x97fb, 0x012e, 0x6a3c, 0x2278, 0x080c,
-	0x9fdb, 0x0804, 0x97ef, 0x2011, 0x188b, 0x2204, 0xc08d, 0x2012,
-	0x0804, 0x97ef, 0x6a04, 0x9296, 0x0006, 0x0904, 0x97d9, 0x0804,
-	0x97b1, 0x6020, 0x9084, 0x000f, 0x000b, 0x0005, 0x9875, 0x987a,
-	0x9ce8, 0x9d77, 0x987a, 0x9ce8, 0x9d77, 0x9875, 0x987a, 0x9875,
-	0x9875, 0x9875, 0x9875, 0x9875, 0x9875, 0x080c, 0x9588, 0x080c,
-	0x968d, 0x0005, 0x00b6, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6,
-	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240,
-	0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dd5, 0x6110, 0x2158, 0xb9c0,
-	0x2c78, 0x2061, 0x0100, 0x619a, 0x908a, 0x0040, 0x1a04, 0x98e6,
+	0x002e, 0x080c, 0x1c48, 0x19d8, 0x012e, 0x080c, 0xa052, 0x0858,
+	0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1188, 0x2001, 0x197b,
+	0x2004, 0x9086, 0xaaaa, 0x0158, 0x2001, 0x19e7, 0x2004, 0x9005,
+	0x11f0, 0x2001, 0x188b, 0x200c, 0xc185, 0xc18c, 0x2102, 0x2f00,
+	0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000, 0x0126,
+	0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1c48, 0x1904, 0x97f7,
+	0x012e, 0x6a3c, 0x2278, 0x080c, 0x9fdc, 0x0804, 0x97eb, 0x2011,
+	0x188b, 0x2204, 0xc08d, 0x2012, 0x0804, 0x97eb, 0x6a04, 0x9296,
+	0x0006, 0x1904, 0x97ad, 0x6a30, 0x9296, 0x0000, 0x0904, 0x97d5,
+	0x0804, 0x97ad, 0x6020, 0x9084, 0x000f, 0x000b, 0x0005, 0x9876,
+	0x987b, 0x9ce9, 0x9d78, 0x987b, 0x9ce9, 0x9d78, 0x9876, 0x987b,
+	0x9876, 0x9876, 0x9876, 0x9876, 0x9876, 0x9876, 0x080c, 0x957b,
+	0x080c, 0x9687, 0x0005, 0x00b6, 0x0156, 0x0136, 0x0146, 0x01c6,
+	0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071,
+	0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dd5, 0x6110, 0x2158,
+	0xb9c0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x908a, 0x0040, 0x1a04,
+	0x98e7, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce,
+	0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x9a6c, 0x9aa7, 0x9ad0,
+	0x9b78, 0x9b9a, 0x9ba0, 0x9bad, 0x9bb5, 0x9bc1, 0x9bc7, 0x9bd8,
+	0x9bc7, 0x9c30, 0x9bb5, 0x9c3c, 0x9c42, 0x9bc1, 0x9c42, 0x9c4e,
+	0x98e5, 0x98e5, 0x98e5, 0x98e5, 0x98e5, 0x98e5, 0x98e5, 0x98e5,
+	0x98e5, 0x98e5, 0x98e5, 0xa46e, 0xa491, 0xa4a2, 0xa4c2, 0xa4f4,
+	0x9bad, 0x98e5, 0x9bad, 0x9bc7, 0x98e5, 0x9ad0, 0x9b78, 0x98e5,
+	0xa8b4, 0x9bc7, 0x98e5, 0xa8d0, 0x9bc7, 0x98e5, 0x9bc1, 0x9a66,
+	0x9908, 0x98e5, 0xa8ec, 0xa959, 0xaa30, 0x98e5, 0xaa3d, 0x9baa,
+	0xaa68, 0x98e5, 0xa4fe, 0xaa95, 0x98e5, 0x080c, 0x0dd5, 0x2100,
 	0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e,
-	0x013e, 0x015e, 0x00be, 0x0005, 0x9a6b, 0x9aa6, 0x9acf, 0x9b77,
-	0x9b99, 0x9b9f, 0x9bac, 0x9bb4, 0x9bc0, 0x9bc6, 0x9bd7, 0x9bc6,
-	0x9c2f, 0x9bb4, 0x9c3b, 0x9c41, 0x9bc0, 0x9c41, 0x9c4d, 0x98e4,
-	0x98e4, 0x98e4, 0x98e4, 0x98e4, 0x98e4, 0x98e4, 0x98e4, 0x98e4,
-	0x98e4, 0x98e4, 0xa46d, 0xa490, 0xa4a1, 0xa4c1, 0xa4f3, 0x9bac,
-	0x98e4, 0x9bac, 0x9bc6, 0x98e4, 0x9acf, 0x9b77, 0x98e4, 0xa8a9,
-	0x9bc6, 0x98e4, 0xa8c5, 0x9bc6, 0x98e4, 0x9bc0, 0x9a65, 0x9907,
-	0x98e4, 0xa8e1, 0xa94e, 0xaa25, 0x98e4, 0xaa32, 0x9ba9, 0xaa5d,
-	0x98e4, 0xa4fd, 0xaa8a, 0x98e4, 0x080c, 0x0dd5, 0x2100, 0x005b,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e,
-	0x015e, 0x00be, 0x0005, 0xab25, 0xabd7, 0x9905, 0x992e, 0x99da,
-	0x99e5, 0x9905, 0x9bac, 0x9905, 0x9a2c, 0x9a38, 0x9949, 0x9905,
-	0x9964, 0x9998, 0xad3f, 0xad84, 0x9bc6, 0x080c, 0x0dd5, 0x00d6,
-	0x0096, 0x080c, 0x9c60, 0x7003, 0x2414, 0x7007, 0x0018, 0x700b,
-	0x0800, 0x7814, 0x2048, 0xa83c, 0x700e, 0xa850, 0x7022, 0xa854,
-	0x7026, 0x60c3, 0x0018, 0x080c, 0xa247, 0x009e, 0x00de, 0x0005,
-	0x7810, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x080c, 0xadcb, 0x1118,
-	0x9084, 0xff80, 0x0110, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0096,
-	0x080c, 0x9c60, 0x7003, 0x0500, 0x7814, 0x2048, 0xa874, 0x700a,
-	0xa878, 0x700e, 0xa87c, 0x7012, 0xa880, 0x7016, 0xa884, 0x701a,
-	0xa888, 0x701e, 0x60c3, 0x0010, 0x080c, 0xa247, 0x009e, 0x00de,
-	0x0005, 0x00d6, 0x0096, 0x080c, 0x9c60, 0x7003, 0x0500, 0x7814,
-	0x2048, 0xa8cc, 0x700a, 0xa8d0, 0x700e, 0xa8d4, 0x7012, 0xa8d8,
-	0x7016, 0xa8dc, 0x701a, 0xa8e0, 0x701e, 0x60c3, 0x0010, 0x080c,
-	0xa247, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x9c60, 0x20e9, 0x0000, 0x2001, 0x19a3, 0x2003,
-	0x0000, 0x7814, 0x2048, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8,
-	0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x19a3,
-	0x0016, 0x200c, 0x2001, 0x0001, 0x080c, 0x23b7, 0x080c, 0xd867,
-	0x9006, 0x080c, 0x23b7, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048,
-	0x0c28, 0x04d9, 0x080c, 0xa247, 0x012e, 0x009e, 0x00de, 0x0005,
-	0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x9cab, 0x20e9,
-	0x0000, 0x2001, 0x19a3, 0x2003, 0x0000, 0x7814, 0x2048, 0xa86f,
-	0x0200, 0xa873, 0x0000, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8,
-	0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x19a3,
-	0x0016, 0x200c, 0x080c, 0xd867, 0x001e, 0xa804, 0x9005, 0x0110,
-	0x2048, 0x0c60, 0x0051, 0x7814, 0x2048, 0x080c, 0x0fb1, 0x080c,
-	0xa247, 0x012e, 0x009e, 0x00de, 0x0005, 0x60c0, 0x8004, 0x9084,
-	0x0003, 0x9005, 0x0130, 0x9082, 0x0004, 0x20a3, 0x0000, 0x8000,
-	0x1de0, 0x0005, 0x080c, 0x9c60, 0x7003, 0x7800, 0x7808, 0x8007,
-	0x700a, 0x60c3, 0x0008, 0x0804, 0xa247, 0x00d6, 0x00e6, 0x080c,
-	0x9cab, 0x7814, 0x9084, 0xff00, 0x2073, 0x0200, 0x8e70, 0x8e70,
-	0x9095, 0x0010, 0x2272, 0x8e70, 0x2073, 0x0034, 0x8e70, 0x2069,
-	0x1805, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x99fb,
-	0x2069, 0x1801, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04,
-	0x9a04, 0x2069, 0x19b3, 0x9086, 0xdf00, 0x0110, 0x2069, 0x19cd,
-	0x20a9, 0x001a, 0x9e86, 0x0260, 0x1148, 0x00c6, 0x2061, 0x0200,
-	0x6010, 0x8000, 0x6012, 0x00ce, 0x2071, 0x0240, 0x2d04, 0x8007,
-	0x2072, 0x8d68, 0x8e70, 0x1f04, 0x9a12, 0x60c3, 0x004c, 0x080c,
-	0xa247, 0x00ee, 0x00de, 0x0005, 0x080c, 0x9c60, 0x7003, 0x6300,
-	0x7007, 0x0028, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa247,
-	0x00d6, 0x0026, 0x0016, 0x080c, 0x9cab, 0x7003, 0x0200, 0x7814,
-	0x700e, 0x00e6, 0x9ef0, 0x0004, 0x2009, 0x0001, 0x2011, 0x000c,
-	0x2069, 0x1923, 0x6810, 0xd084, 0x1148, 0x2073, 0x0500, 0x8e70,
-	0x2073, 0x0000, 0x8e70, 0x8108, 0x9290, 0x0004, 0x2073, 0x0800,
-	0x8e70, 0x2073, 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c,
-	0xa247, 0x001e, 0x002e, 0x00de, 0x0005, 0x2001, 0x1818, 0x2004,
-	0x609a, 0x0804, 0xa247, 0x080c, 0x9c60, 0x7003, 0x5200, 0x2069,
-	0x1847, 0x6804, 0xd084, 0x0130, 0x6828, 0x0016, 0x080c, 0x2871,
-	0x710e, 0x001e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805,
-	0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004, 0x2099,
-	0x1801, 0x20a1, 0x0254, 0x4003, 0x080c, 0xadcb, 0x1120, 0xb8a0,
-	0x9082, 0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x7032, 0x2001,
-	0x1820, 0x2004, 0x7036, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084,
-	0x00ff, 0x7036, 0x60c3, 0x001c, 0x0804, 0xa247, 0x080c, 0x9c60,
-	0x7003, 0x0500, 0x080c, 0xadcb, 0x1120, 0xb8a0, 0x9082, 0x007f,
-	0x0248, 0x2001, 0x181f, 0x2004, 0x700a, 0x2001, 0x1820, 0x2004,
-	0x700e, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x700e,
-	0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000,
-	0x20a1, 0x0250, 0x4003, 0x60c3, 0x0010, 0x0804, 0xa247, 0x080c,
-	0x9c60, 0x9006, 0x080c, 0x693c, 0xb8a0, 0x9086, 0x007e, 0x1130,
-	0x7003, 0x0400, 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096,
-	0x904d, 0x0120, 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003,
-	0x0300, 0xb8a0, 0x9086, 0x007e, 0x1904, 0x9b3e, 0x00d6, 0x2069,
-	0x196c, 0x2001, 0x1837, 0x2004, 0xd0a4, 0x0188, 0x6800, 0x700a,
-	0x6808, 0x9084, 0x2000, 0x7012, 0x080c, 0xade2, 0x680c, 0x7016,
-	0x701f, 0x2710, 0x6818, 0x7022, 0x681c, 0x7026, 0x0090, 0x6800,
-	0x700a, 0x6804, 0x700e, 0x6808, 0x080c, 0x73bc, 0x1118, 0x9084,
-	0x37ff, 0x0010, 0x9084, 0x3fff, 0x7012, 0x080c, 0xade2, 0x680c,
-	0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805,
-	0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099,
-	0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, 0xab0c, 0x2069,
-	0x1974, 0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, 0x080c, 0x56d3,
-	0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de, 0x04a8, 0x2001, 0x1837,
-	0x2004, 0xd0a4, 0x0170, 0x0016, 0x2001, 0x196d, 0x200c, 0x60e0,
-	0x9106, 0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x28b2, 0x61e2,
-	0x001e, 0x20e1, 0x0001, 0x2099, 0x196c, 0x20e9, 0x0000, 0x20a1,
-	0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1805,
-	0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1,
-	0x025a, 0x4003, 0x080c, 0xab0c, 0x20a1, 0x024e, 0x20a9, 0x0008,
-	0x2099, 0x1974, 0x4003, 0x60c3, 0x0074, 0x0804, 0xa247, 0x080c,
-	0x9c60, 0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800, 0x700f,
-	0x2000, 0x9006, 0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe, 0xd1ac,
-	0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010, 0x9085,
-	0x0002, 0x00d6, 0x0804, 0x9c10, 0x7026, 0x60c3, 0x0014, 0x0804,
-	0xa247, 0x080c, 0x9c60, 0x7003, 0x5000, 0x0804, 0x9ae9, 0x080c,
-	0x9c60, 0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014, 0x0804,
-	0xa247, 0x080c, 0x9ca2, 0x0010, 0x080c, 0x9cab, 0x7003, 0x0200,
-	0x60c3, 0x0004, 0x0804, 0xa247, 0x080c, 0x9cab, 0x7003, 0x0100,
-	0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0xa247,
-	0x080c, 0x9cab, 0x7003, 0x0200, 0x0804, 0x9ae9, 0x080c, 0x9cab,
-	0x7003, 0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010, 0x700b,
-	0x0003, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa247, 0x00d6,
-	0x080c, 0x9cab, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b, 0x0800,
-	0xb894, 0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030, 0x0190,
-	0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f, 0x2100,
-	0x0058, 0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028, 0x700f,
-	0x0700, 0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1847, 0x7904,
-	0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085,
-	0x0010, 0x2009, 0x1869, 0x210c, 0xd184, 0x1110, 0x9085, 0x0002,
-	0x0026, 0x2009, 0x1867, 0x210c, 0xd1e4, 0x0150, 0xc0c5, 0xbacc,
-	0xd28c, 0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010, 0x0140,
-	0xd1ec, 0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108, 0xc0bd,
-	0x002e, 0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0xa247, 0x080c,
-	0x9cab, 0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100, 0x60c3,
-	0x0014, 0x0804, 0xa247, 0x080c, 0x9cab, 0x7003, 0x0200, 0x0804,
-	0x9a6f, 0x080c, 0x9cab, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f,
-	0x2a00, 0x60c3, 0x0008, 0x0804, 0xa247, 0x080c, 0x9cab, 0x7003,
-	0x0100, 0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0xa247, 0x0026,
-	0x00d6, 0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800, 0x0040,
-	0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021, 0x0100,
-	0x080c, 0xab21, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069,
-	0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x9485, 0x0029, 0x7012,
-	0x004e, 0x003e, 0x00de, 0x080c, 0xa235, 0x721a, 0x9f95, 0x0000,
-	0x7222, 0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005, 0x0026,
-	0x080c, 0xab21, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6, 0x2069,
-	0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x00de, 0x7013, 0x2029,
-	0x0c10, 0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02, 0x700f,
-	0x0000, 0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3300,
-	0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019,
-	0x2300, 0x2021, 0x0100, 0x080c, 0xab21, 0xb810, 0x9305, 0x7002,
-	0xb814, 0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140, 0xb814,
-	0x9005, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020, 0x687c,
-	0x700a, 0x6880, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012, 0x004e,
-	0x003e, 0x00de, 0x080c, 0xa235, 0x721a, 0x7a08, 0x7222, 0x2f10,
-	0x7226, 0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0xa235, 0x721a,
-	0x7a08, 0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e, 0x0005,
-	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071,
-	0x0240, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0dd5, 0x908a, 0x0092,
-	0x1a0c, 0x0dd5, 0x6110, 0x2158, 0xb9c0, 0x2c78, 0x2061, 0x0100,
-	0x619a, 0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x00be, 0x0005, 0x9d19, 0x9d28, 0x9d33, 0x9d17, 0x9d17, 0x9d17,
-	0x9d19, 0x9d17, 0x9d17, 0x9d17, 0x9d17, 0x9d17, 0x9d17, 0x080c,
-	0x0dd5, 0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x2ba5, 0x0228,
-	0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804, 0xa247,
-	0x0431, 0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff, 0x60c3,
-	0x000c, 0x0804, 0xa247, 0x0479, 0x7003, 0x0003, 0x7007, 0x0300,
-	0x60c3, 0x0004, 0x0804, 0xa247, 0x0026, 0x080c, 0xab21, 0xb810,
-	0x9085, 0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c,
-	0x700a, 0x6880, 0x700e, 0x7013, 0x0009, 0x0804, 0x9c7b, 0x0026,
-	0x080c, 0xab21, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814, 0x7006,
-	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001, 0x0099,
-	0x7012, 0x0804, 0x9cdd, 0x0026, 0x080c, 0xab21, 0xb810, 0x9085,
-	0x8500, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a,
-	0x6880, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x9cdd, 0x00b6,
-	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200, 0x2071,
-	0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c, 0x0dd5, 0x908a, 0x0054,
-	0x1a0c, 0x0dd5, 0x7910, 0x2158, 0xb9c0, 0x2061, 0x0100, 0x619a,
-	0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
-	0x0005, 0x9dae, 0x9e6a, 0x9e3d, 0x9f8c, 0x9dac, 0x9dac, 0x9dac,
-	0x9dac, 0x9dac, 0x9dac, 0x9dac, 0xa66f, 0xa677, 0xa67f, 0xa687,
-	0x9dac, 0xaa69, 0x9dac, 0xa667, 0x080c, 0x0dd5, 0x0096, 0x780b,
-	0xffff, 0x080c, 0x9e19, 0x7914, 0x2148, 0xa978, 0x7956, 0xae64,
-	0x96b4, 0x00ff, 0x9686, 0x0008, 0x1148, 0xa8b4, 0x7032, 0xa8b8,
-	0x7036, 0xa8bc, 0x703a, 0xa8c0, 0x703e, 0x0008, 0x7132, 0xa97c,
-	0x9184, 0x000f, 0x1118, 0x2001, 0x0005, 0x0040, 0xd184, 0x0118,
-	0x2001, 0x0004, 0x0018, 0x9084, 0x0006, 0x8004, 0x2010, 0x785c,
-	0x9084, 0x00ff, 0x8007, 0x9205, 0x7042, 0xd1ac, 0x0158, 0x7047,
-	0x0002, 0x9686, 0x0008, 0x1118, 0x080c, 0x18ac, 0x0010, 0x080c,
-	0x1725, 0x0050, 0xd1b4, 0x0118, 0x7047, 0x0001, 0x0028, 0x7047,
-	0x0000, 0x9016, 0x2230, 0x0010, 0xaab0, 0xaeac, 0x726a, 0x766e,
-	0x20a9, 0x0008, 0x20e9, 0x0000, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0023, 0x2098, 0x20a1, 0x0252, 0x2069, 0x0200, 0x6813, 0x0018,
-	0x4003, 0x6813, 0x0008, 0x60c3, 0x0020, 0x6017, 0x0009, 0x2001,
-	0x1a03, 0x2003, 0x07d0, 0x2001, 0x1a02, 0x2003, 0x0009, 0x009e,
-	0x0005, 0x6813, 0x0008, 0xba8c, 0x8210, 0xb8cc, 0xd084, 0x0128,
-	0x7a46, 0x7b14, 0x7b4a, 0x722e, 0x732a, 0x9294, 0x00ff, 0xba8e,
-	0x8217, 0x721a, 0xba10, 0x9295, 0x0600, 0x7202, 0xba14, 0x7206,
-	0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013, 0x0829,
-	0x2f10, 0x7222, 0x7027, 0xffff, 0x0005, 0x00d6, 0x0096, 0x0081,
-	0x7814, 0x2048, 0xa890, 0x7002, 0xa88c, 0x7006, 0xa8b0, 0x700a,
-	0xa8ac, 0x700e, 0x60c3, 0x000c, 0x009e, 0x00de, 0x0804, 0xa247,
-	0x6813, 0x0008, 0xb810, 0x9085, 0x0500, 0x7002, 0xb814, 0x7006,
-	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x7013, 0x0889,
-	0x080c, 0xa235, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071,
-	0x024c, 0x0005, 0x00d6, 0x0096, 0x080c, 0x9f6a, 0x7814, 0x2048,
-	0x080c, 0xcb33, 0x1130, 0x7814, 0x9084, 0x0700, 0x8007, 0x0033,
-	0x0010, 0x9006, 0x001b, 0x009e, 0x00de, 0x0005, 0x9e88, 0x9ef1,
-	0x9f01, 0x9f27, 0x9f33, 0x9f44, 0x9f4c, 0x9e86, 0x080c, 0x0dd5,
-	0x0016, 0x0036, 0xa97c, 0x918c, 0x0003, 0x0118, 0x9186, 0x0003,
-	0x1198, 0xaba8, 0x7824, 0xd0cc, 0x1168, 0x7316, 0xa898, 0x701a,
-	0xa894, 0x701e, 0x003e, 0x001e, 0x2001, 0x19b1, 0x2004, 0x60c2,
-	0x0804, 0xa247, 0xc3e5, 0x0c88, 0x9186, 0x0001, 0x190c, 0x0dd5,
-	0xaba8, 0x7824, 0xd0cc, 0x1904, 0x9eee, 0x7316, 0xa898, 0x701a,
-	0xa894, 0x701e, 0xa8a4, 0x7026, 0xa8ac, 0x702e, 0x2009, 0x0018,
-	0x9384, 0x0300, 0x0570, 0xd3c4, 0x0110, 0xa8ac, 0x9108, 0xd3cc,
-	0x0110, 0xa8a4, 0x9108, 0x6810, 0x9085, 0x0010, 0x6812, 0x2011,
-	0x0258, 0x20e9, 0x0000, 0x22a0, 0x0156, 0x20a9, 0x0008, 0xa860,
-	0x20e0, 0xa85c, 0x9080, 0x002c, 0x2098, 0x4003, 0x6810, 0x8000,
-	0x6812, 0x2011, 0x0240, 0x22a0, 0x20a9, 0x0005, 0x4003, 0x6810,
-	0xc084, 0x6812, 0x015e, 0x9184, 0x0003, 0x0118, 0x2019, 0x0245,
-	0x201a, 0x61c2, 0x003e, 0x001e, 0x0804, 0xa247, 0xc3e5, 0x0804,
-	0x9ead, 0x2011, 0x0008, 0x2001, 0x180f, 0x2004, 0xd0a4, 0x0110,
-	0x2011, 0x0028, 0x7824, 0xd0cc, 0x1110, 0x7216, 0x0470, 0x0ce8,
-	0xc2e5, 0x2011, 0x0302, 0x0016, 0x782c, 0x701a, 0x7930, 0x711e,
-	0x9105, 0x0108, 0xc2dd, 0x001e, 0x7824, 0xd0cc, 0x0108, 0xc2e5,
-	0x7216, 0x7027, 0x0012, 0x702f, 0x0008, 0x7043, 0x7000, 0x7047,
-	0x0500, 0x704f, 0x000a, 0x2069, 0x0200, 0x6813, 0x0009, 0x2071,
-	0x0240, 0x700b, 0x2500, 0x60c3, 0x0032, 0x0804, 0xa247, 0x2011,
-	0x0028, 0x7824, 0xd0cc, 0x1128, 0x7216, 0x60c3, 0x0018, 0x0804,
-	0xa247, 0x0cd0, 0xc2e5, 0x2011, 0x0100, 0x7824, 0xd0cc, 0x0108,
-	0xc2e5, 0x7216, 0x702f, 0x0008, 0x7858, 0x9084, 0x00ff, 0x7036,
-	0x60c3, 0x0020, 0x0804, 0xa247, 0x2011, 0x0008, 0x7824, 0xd0cc,
-	0x0108, 0xc2e5, 0x7216, 0x0c08, 0x0036, 0x7b14, 0x9384, 0xff00,
-	0x7816, 0x9384, 0x00ff, 0x8001, 0x1138, 0x7824, 0xd0cc, 0x0108,
-	0xc2e5, 0x7216, 0x003e, 0x0888, 0x0046, 0x2021, 0x0800, 0x0006,
-	0x7824, 0xd0cc, 0x000e, 0x0108, 0xc4e5, 0x7416, 0x004e, 0x701e,
-	0x003e, 0x0818, 0x00d6, 0x6813, 0x0008, 0xb810, 0x9085, 0x0700,
-	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880,
-	0x700e, 0x7824, 0xd0cc, 0x1168, 0x7013, 0x0898, 0x080c, 0xa235,
-	0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x00de,
-	0x0005, 0x7013, 0x0889, 0x0c90, 0x0016, 0x7814, 0x9084, 0x0700,
-	0x8007, 0x0013, 0x001e, 0x0005, 0x9f9c, 0x9f9c, 0x9f9e, 0x9f9c,
-	0x9f9c, 0x9f9c, 0x9fb8, 0x9f9c, 0x080c, 0x0dd5, 0x7914, 0x918c,
-	0x08ff, 0x918d, 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9, 0x2069,
-	0x1847, 0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff, 0x8007,
-	0x7032, 0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804, 0xa247,
-	0x2009, 0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c,
-	0xab21, 0x001e, 0xb810, 0x9085, 0x0100, 0x7002, 0xb814, 0x7006,
-	0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013, 0x0888,
-	0x918d, 0x0008, 0x7116, 0x080c, 0xa235, 0x721a, 0x7a08, 0x7222,
-	0x2f10, 0x7226, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
-	0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7160,
-	0x7810, 0x2058, 0x76dc, 0x96b4, 0x0028, 0x0110, 0x737c, 0x7480,
-	0x2500, 0x76dc, 0x96b4, 0x0028, 0x0140, 0x2001, 0x04ff, 0x6062,
-	0x6067, 0xffff, 0x636a, 0x646e, 0x0050, 0x2001, 0x00ff, 0x9085,
-	0x0400, 0x6062, 0x6067, 0xffff, 0x606b, 0x0000, 0x616e, 0xb8b8,
-	0x6073, 0x0530, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff,
-	0xb88e, 0x8007, 0x9085, 0x0020, 0x607a, 0x607f, 0x0000, 0x2b00,
-	0x6082, 0x6087, 0xffff, 0x7814, 0x0096, 0x2048, 0xa838, 0x608a,
-	0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0x009e, 0xb86c,
-	0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x2001,
-	0x1837, 0x2004, 0x9084, 0x0028, 0x0128, 0x609f, 0x0000, 0x2001,
-	0x0092, 0x0048, 0x6028, 0xc0bd, 0x602a, 0x609f, 0x00ff, 0x6027,
-	0xffff, 0x2001, 0x00b2, 0x6016, 0x2009, 0x07d0, 0x080c, 0x857e,
-	0x003e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be,
-	0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046,
-	0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7160, 0x7810, 0x2058,
-	0xb8a0, 0x2028, 0x76dc, 0xd6ac, 0x1168, 0x9582, 0x007e, 0x1250,
-	0x2500, 0x9094, 0xff80, 0x1130, 0x9080, 0x3325, 0x2015, 0x9294,
-	0x00ff, 0x0020, 0xb910, 0xba14, 0x737c, 0x7480, 0x70dc, 0xd0ac,
-	0x1130, 0x9582, 0x007e, 0x1218, 0x9584, 0xff80, 0x0138, 0x9185,
-	0x0400, 0x6062, 0x6266, 0x636a, 0x646e, 0x0030, 0x6063, 0x0400,
-	0x6266, 0x606b, 0x0000, 0x616e, 0xb8b8, 0x6072, 0x6077, 0x0000,
-	0xb864, 0xd0a4, 0x0110, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084,
+	0x013e, 0x015e, 0x00be, 0x0005, 0xab30, 0xabe2, 0x9906, 0x992f,
+	0x99db, 0x99e6, 0x9906, 0x9bad, 0x9906, 0x9a2d, 0x9a39, 0x994a,
+	0x9906, 0x9965, 0x9999, 0xad4f, 0xad94, 0x9bc7, 0x080c, 0x0dd5,
+	0x00d6, 0x0096, 0x080c, 0x9c61, 0x7003, 0x2414, 0x7007, 0x0018,
+	0x700b, 0x0800, 0x7814, 0x2048, 0xa83c, 0x700e, 0xa850, 0x7022,
+	0xa854, 0x7026, 0x60c3, 0x0018, 0x080c, 0xa248, 0x009e, 0x00de,
+	0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x080c, 0xaddb,
+	0x1118, 0x9084, 0xff80, 0x0110, 0x9085, 0x0001, 0x0005, 0x00d6,
+	0x0096, 0x080c, 0x9c61, 0x7003, 0x0500, 0x7814, 0x2048, 0xa874,
+	0x700a, 0xa878, 0x700e, 0xa87c, 0x7012, 0xa880, 0x7016, 0xa884,
+	0x701a, 0xa888, 0x701e, 0x60c3, 0x0010, 0x080c, 0xa248, 0x009e,
+	0x00de, 0x0005, 0x00d6, 0x0096, 0x080c, 0x9c61, 0x7003, 0x0500,
+	0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0, 0x700e, 0xa8d4, 0x7012,
+	0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0, 0x701e, 0x60c3, 0x0010,
+	0x080c, 0xa248, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x9c61, 0x20e9, 0x0000, 0x2001, 0x19a2,
+	0x2003, 0x0000, 0x7814, 0x2048, 0xa814, 0x8003, 0x60c2, 0xa830,
+	0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001,
+	0x19a2, 0x0016, 0x200c, 0x2001, 0x0001, 0x080c, 0x23b9, 0x080c,
+	0xd886, 0x9006, 0x080c, 0x23b9, 0x001e, 0xa804, 0x9005, 0x0110,
+	0x2048, 0x0c28, 0x04d9, 0x080c, 0xa248, 0x012e, 0x009e, 0x00de,
+	0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x9cac,
+	0x20e9, 0x0000, 0x2001, 0x19a2, 0x2003, 0x0000, 0x7814, 0x2048,
+	0xa86f, 0x0200, 0xa873, 0x0000, 0xa814, 0x8003, 0x60c2, 0xa830,
+	0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001,
+	0x19a2, 0x0016, 0x200c, 0x080c, 0xd886, 0x001e, 0xa804, 0x9005,
+	0x0110, 0x2048, 0x0c60, 0x0051, 0x7814, 0x2048, 0x080c, 0x0fb1,
+	0x080c, 0xa248, 0x012e, 0x009e, 0x00de, 0x0005, 0x60c0, 0x8004,
+	0x9084, 0x0003, 0x9005, 0x0130, 0x9082, 0x0004, 0x20a3, 0x0000,
+	0x8000, 0x1de0, 0x0005, 0x080c, 0x9c61, 0x7003, 0x7800, 0x7808,
+	0x8007, 0x700a, 0x60c3, 0x0008, 0x0804, 0xa248, 0x00d6, 0x00e6,
+	0x080c, 0x9cac, 0x7814, 0x9084, 0xff00, 0x2073, 0x0200, 0x8e70,
+	0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70, 0x2073, 0x0034, 0x8e70,
+	0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04,
+	0x99fc, 0x2069, 0x1801, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70,
+	0x1f04, 0x9a05, 0x2069, 0x19b2, 0x9086, 0xdf00, 0x0110, 0x2069,
+	0x19cc, 0x20a9, 0x001a, 0x9e86, 0x0260, 0x1148, 0x00c6, 0x2061,
+	0x0200, 0x6010, 0x8000, 0x6012, 0x00ce, 0x2071, 0x0240, 0x2d04,
+	0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04, 0x9a13, 0x60c3, 0x004c,
+	0x080c, 0xa248, 0x00ee, 0x00de, 0x0005, 0x080c, 0x9c61, 0x7003,
+	0x6300, 0x7007, 0x0028, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804,
+	0xa248, 0x00d6, 0x0026, 0x0016, 0x080c, 0x9cac, 0x7003, 0x0200,
+	0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004, 0x2009, 0x0001, 0x2011,
+	0x000c, 0x2069, 0x1923, 0x6810, 0xd084, 0x1148, 0x2073, 0x0500,
+	0x8e70, 0x2073, 0x0000, 0x8e70, 0x8108, 0x9290, 0x0004, 0x2073,
+	0x0800, 0x8e70, 0x2073, 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2,
+	0x080c, 0xa248, 0x001e, 0x002e, 0x00de, 0x0005, 0x2001, 0x1818,
+	0x2004, 0x609a, 0x0804, 0xa248, 0x080c, 0x9c61, 0x7003, 0x5200,
+	0x2069, 0x1847, 0x6804, 0xd084, 0x0130, 0x6828, 0x0016, 0x080c,
+	0x2873, 0x710e, 0x001e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099,
+	0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004,
+	0x2099, 0x1801, 0x20a1, 0x0254, 0x4003, 0x080c, 0xaddb, 0x1120,
+	0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x7032,
+	0x2001, 0x1820, 0x2004, 0x7036, 0x0030, 0x2001, 0x1818, 0x2004,
+	0x9084, 0x00ff, 0x7036, 0x60c3, 0x001c, 0x0804, 0xa248, 0x080c,
+	0x9c61, 0x7003, 0x0500, 0x080c, 0xaddb, 0x1120, 0xb8a0, 0x9082,
+	0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x700a, 0x2001, 0x1820,
+	0x2004, 0x700e, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff,
+	0x700e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
+	0x0000, 0x20a1, 0x0250, 0x4003, 0x60c3, 0x0010, 0x0804, 0xa248,
+	0x080c, 0x9c61, 0x9006, 0x080c, 0x6945, 0xb8a0, 0x9086, 0x007e,
+	0x1130, 0x7003, 0x0400, 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814,
+	0x0096, 0x904d, 0x0120, 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e,
+	0x7003, 0x0300, 0xb8a0, 0x9086, 0x007e, 0x1904, 0x9b3f, 0x00d6,
+	0x2069, 0x196b, 0x2001, 0x1837, 0x2004, 0xd0a4, 0x0188, 0x6800,
+	0x700a, 0x6808, 0x9084, 0x2000, 0x7012, 0x080c, 0xadf2, 0x680c,
+	0x7016, 0x701f, 0x2710, 0x6818, 0x7022, 0x681c, 0x7026, 0x0090,
+	0x6800, 0x700a, 0x6804, 0x700e, 0x6808, 0x080c, 0x73a5, 0x1118,
+	0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff, 0x7012, 0x080c, 0xadf2,
+	0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099,
+	0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004,
+	0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, 0xab17,
+	0x2069, 0x1973, 0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, 0x080c,
+	0x56dc, 0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de, 0x04a8, 0x2001,
+	0x1837, 0x2004, 0xd0a4, 0x0170, 0x0016, 0x2001, 0x196c, 0x200c,
+	0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x28b4,
+	0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099, 0x196b, 0x20e9, 0x0000,
+	0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099,
+	0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801,
+	0x20a1, 0x025a, 0x4003, 0x080c, 0xab17, 0x20a1, 0x024e, 0x20a9,
+	0x0008, 0x2099, 0x1973, 0x4003, 0x60c3, 0x0074, 0x0804, 0xa248,
+	0x080c, 0x9c61, 0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800,
+	0x700f, 0x2000, 0x9006, 0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe,
+	0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010,
+	0x9085, 0x0002, 0x00d6, 0x0804, 0x9c11, 0x7026, 0x60c3, 0x0014,
+	0x0804, 0xa248, 0x080c, 0x9c61, 0x7003, 0x5000, 0x0804, 0x9aea,
+	0x080c, 0x9c61, 0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014,
+	0x0804, 0xa248, 0x080c, 0x9ca3, 0x0010, 0x080c, 0x9cac, 0x7003,
+	0x0200, 0x60c3, 0x0004, 0x0804, 0xa248, 0x080c, 0x9cac, 0x7003,
+	0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804,
+	0xa248, 0x080c, 0x9cac, 0x7003, 0x0200, 0x0804, 0x9aea, 0x080c,
+	0x9cac, 0x7003, 0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010,
+	0x700b, 0x0003, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa248,
+	0x00d6, 0x080c, 0x9cac, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b,
+	0x0800, 0xb894, 0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030,
+	0x0190, 0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f,
+	0x2100, 0x0058, 0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028,
+	0x700f, 0x0700, 0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1847,
+	0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110,
+	0x9085, 0x0010, 0x2009, 0x1869, 0x210c, 0xd184, 0x1110, 0x9085,
+	0x0002, 0x0026, 0x2009, 0x1867, 0x210c, 0xd1e4, 0x0150, 0xc0c5,
+	0xbacc, 0xd28c, 0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010,
+	0x0140, 0xd1ec, 0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108,
+	0xc0bd, 0x002e, 0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0xa248,
+	0x080c, 0x9cac, 0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100,
+	0x60c3, 0x0014, 0x0804, 0xa248, 0x080c, 0x9cac, 0x7003, 0x0200,
+	0x0804, 0x9a70, 0x080c, 0x9cac, 0x7003, 0x0100, 0x700b, 0x0003,
+	0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0xa248, 0x080c, 0x9cac,
+	0x7003, 0x0100, 0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0xa248,
+	0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800,
+	0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021,
+	0x0100, 0x080c, 0xab2c, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006,
+	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x9485, 0x0029,
+	0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0xa236, 0x721a, 0x9f95,
+	0x0000, 0x7222, 0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005,
+	0x0026, 0x080c, 0xab2c, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6,
+	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x00de, 0x7013,
+	0x2029, 0x0c10, 0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02,
+	0x700f, 0x0000, 0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019,
+	0x3300, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046,
+	0x2019, 0x2300, 0x2021, 0x0100, 0x080c, 0xab2c, 0xb810, 0x9305,
+	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140,
+	0xb814, 0x9005, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020,
+	0x687c, 0x700a, 0x6880, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012,
+	0x004e, 0x003e, 0x00de, 0x080c, 0xa236, 0x721a, 0x7a08, 0x7222,
+	0x2f10, 0x7226, 0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0xa236,
+	0x721a, 0x7a08, 0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e,
+	0x0005, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200,
+	0x2071, 0x0240, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0dd5, 0x908a,
+	0x0092, 0x1a0c, 0x0dd5, 0x6110, 0x2158, 0xb9c0, 0x2c78, 0x2061,
+	0x0100, 0x619a, 0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x00be, 0x0005, 0x9d1a, 0x9d29, 0x9d34, 0x9d18, 0x9d18,
+	0x9d18, 0x9d1a, 0x9d18, 0x9d18, 0x9d18, 0x9d18, 0x9d18, 0x9d18,
+	0x080c, 0x0dd5, 0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x2ba7,
+	0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804,
+	0xa248, 0x0431, 0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff,
+	0x60c3, 0x000c, 0x0804, 0xa248, 0x0479, 0x7003, 0x0003, 0x7007,
+	0x0300, 0x60c3, 0x0004, 0x0804, 0xa248, 0x0026, 0x080c, 0xab2c,
+	0xb810, 0x9085, 0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
+	0x687c, 0x700a, 0x6880, 0x700e, 0x7013, 0x0009, 0x0804, 0x9c7c,
+	0x0026, 0x080c, 0xab2c, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814,
+	0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001,
+	0x0099, 0x7012, 0x0804, 0x9cde, 0x0026, 0x080c, 0xab2c, 0xb810,
+	0x9085, 0x8500, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c,
+	0x700a, 0x6880, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x9cde,
+	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200,
+	0x2071, 0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c, 0x0dd5, 0x908a,
+	0x0054, 0x1a0c, 0x0dd5, 0x7910, 0x2158, 0xb9c0, 0x2061, 0x0100,
+	0x619a, 0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce,
+	0x00be, 0x0005, 0x9daf, 0x9e6b, 0x9e3e, 0x9f8d, 0x9dad, 0x9dad,
+	0x9dad, 0x9dad, 0x9dad, 0x9dad, 0x9dad, 0xa670, 0xa678, 0xa680,
+	0xa688, 0x9dad, 0xaa74, 0x9dad, 0xa668, 0x080c, 0x0dd5, 0x0096,
+	0x780b, 0xffff, 0x080c, 0x9e1a, 0x7914, 0x2148, 0xa978, 0x7956,
+	0xae64, 0x96b4, 0x00ff, 0x9686, 0x0008, 0x1148, 0xa8b4, 0x7032,
+	0xa8b8, 0x7036, 0xa8bc, 0x703a, 0xa8c0, 0x703e, 0x0008, 0x7132,
+	0xa97c, 0x9184, 0x000f, 0x1118, 0x2001, 0x0005, 0x0040, 0xd184,
+	0x0118, 0x2001, 0x0004, 0x0018, 0x9084, 0x0006, 0x8004, 0x2010,
+	0x785c, 0x9084, 0x00ff, 0x8007, 0x9205, 0x7042, 0xd1ac, 0x0158,
+	0x7047, 0x0002, 0x9686, 0x0008, 0x1118, 0x080c, 0x18ae, 0x0010,
+	0x080c, 0x1727, 0x0050, 0xd1b4, 0x0118, 0x7047, 0x0001, 0x0028,
+	0x7047, 0x0000, 0x9016, 0x2230, 0x0010, 0xaab0, 0xaeac, 0x726a,
+	0x766e, 0x20a9, 0x0008, 0x20e9, 0x0000, 0xa860, 0x20e0, 0xa85c,
+	0x9080, 0x0023, 0x2098, 0x20a1, 0x0252, 0x2069, 0x0200, 0x6813,
+	0x0018, 0x4003, 0x6813, 0x0008, 0x60c3, 0x0020, 0x6017, 0x0009,
+	0x2001, 0x1a02, 0x2003, 0x07d0, 0x2001, 0x1a01, 0x2003, 0x0009,
+	0x009e, 0x0005, 0x6813, 0x0008, 0xba8c, 0x8210, 0xb8cc, 0xd084,
+	0x0128, 0x7a46, 0x7b14, 0x7b4a, 0x722e, 0x732a, 0x9294, 0x00ff,
+	0xba8e, 0x8217, 0x721a, 0xba10, 0x9295, 0x0600, 0x7202, 0xba14,
+	0x7206, 0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013,
+	0x0829, 0x2f10, 0x7222, 0x7027, 0xffff, 0x0005, 0x00d6, 0x0096,
+	0x0081, 0x7814, 0x2048, 0xa890, 0x7002, 0xa88c, 0x7006, 0xa8b0,
+	0x700a, 0xa8ac, 0x700e, 0x60c3, 0x000c, 0x009e, 0x00de, 0x0804,
+	0xa248, 0x6813, 0x0008, 0xb810, 0x9085, 0x0500, 0x7002, 0xb814,
+	0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x7013,
+	0x0889, 0x080c, 0xa236, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226,
+	0x2071, 0x024c, 0x0005, 0x00d6, 0x0096, 0x080c, 0x9f6b, 0x7814,
+	0x2048, 0x080c, 0xcb48, 0x1130, 0x7814, 0x9084, 0x0700, 0x8007,
+	0x0033, 0x0010, 0x9006, 0x001b, 0x009e, 0x00de, 0x0005, 0x9e89,
+	0x9ef2, 0x9f02, 0x9f28, 0x9f34, 0x9f45, 0x9f4d, 0x9e87, 0x080c,
+	0x0dd5, 0x0016, 0x0036, 0xa97c, 0x918c, 0x0003, 0x0118, 0x9186,
+	0x0003, 0x1198, 0xaba8, 0x7824, 0xd0cc, 0x1168, 0x7316, 0xa898,
+	0x701a, 0xa894, 0x701e, 0x003e, 0x001e, 0x2001, 0x19b0, 0x2004,
+	0x60c2, 0x0804, 0xa248, 0xc3e5, 0x0c88, 0x9186, 0x0001, 0x190c,
+	0x0dd5, 0xaba8, 0x7824, 0xd0cc, 0x1904, 0x9eef, 0x7316, 0xa898,
+	0x701a, 0xa894, 0x701e, 0xa8a4, 0x7026, 0xa8ac, 0x702e, 0x2009,
+	0x0018, 0x9384, 0x0300, 0x0570, 0xd3c4, 0x0110, 0xa8ac, 0x9108,
+	0xd3cc, 0x0110, 0xa8a4, 0x9108, 0x6810, 0x9085, 0x0010, 0x6812,
+	0x2011, 0x0258, 0x20e9, 0x0000, 0x22a0, 0x0156, 0x20a9, 0x0008,
+	0xa860, 0x20e0, 0xa85c, 0x9080, 0x002c, 0x2098, 0x4003, 0x6810,
+	0x8000, 0x6812, 0x2011, 0x0240, 0x22a0, 0x20a9, 0x0005, 0x4003,
+	0x6810, 0xc084, 0x6812, 0x015e, 0x9184, 0x0003, 0x0118, 0x2019,
+	0x0245, 0x201a, 0x61c2, 0x003e, 0x001e, 0x0804, 0xa248, 0xc3e5,
+	0x0804, 0x9eae, 0x2011, 0x0008, 0x2001, 0x180f, 0x2004, 0xd0a4,
+	0x0110, 0x2011, 0x0028, 0x7824, 0xd0cc, 0x1110, 0x7216, 0x0470,
+	0x0ce8, 0xc2e5, 0x2011, 0x0302, 0x0016, 0x782c, 0x701a, 0x7930,
+	0x711e, 0x9105, 0x0108, 0xc2dd, 0x001e, 0x7824, 0xd0cc, 0x0108,
+	0xc2e5, 0x7216, 0x7027, 0x0012, 0x702f, 0x0008, 0x7043, 0x7000,
+	0x7047, 0x0500, 0x704f, 0x000a, 0x2069, 0x0200, 0x6813, 0x0009,
+	0x2071, 0x0240, 0x700b, 0x2500, 0x60c3, 0x0032, 0x0804, 0xa248,
+	0x2011, 0x0028, 0x7824, 0xd0cc, 0x1128, 0x7216, 0x60c3, 0x0018,
+	0x0804, 0xa248, 0x0cd0, 0xc2e5, 0x2011, 0x0100, 0x7824, 0xd0cc,
+	0x0108, 0xc2e5, 0x7216, 0x702f, 0x0008, 0x7858, 0x9084, 0x00ff,
+	0x7036, 0x60c3, 0x0020, 0x0804, 0xa248, 0x2011, 0x0008, 0x7824,
+	0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x0c08, 0x0036, 0x7b14, 0x9384,
+	0xff00, 0x7816, 0x9384, 0x00ff, 0x8001, 0x1138, 0x7824, 0xd0cc,
+	0x0108, 0xc2e5, 0x7216, 0x003e, 0x0888, 0x0046, 0x2021, 0x0800,
+	0x0006, 0x7824, 0xd0cc, 0x000e, 0x0108, 0xc4e5, 0x7416, 0x004e,
+	0x701e, 0x003e, 0x0818, 0x00d6, 0x6813, 0x0008, 0xb810, 0x9085,
+	0x0700, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a,
+	0x6880, 0x700e, 0x7824, 0xd0cc, 0x1168, 0x7013, 0x0898, 0x080c,
+	0xa236, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c,
+	0x00de, 0x0005, 0x7013, 0x0889, 0x0c90, 0x0016, 0x7814, 0x9084,
+	0x0700, 0x8007, 0x0013, 0x001e, 0x0005, 0x9f9d, 0x9f9d, 0x9f9f,
+	0x9f9d, 0x9f9d, 0x9f9d, 0x9fb9, 0x9f9d, 0x080c, 0x0dd5, 0x7914,
+	0x918c, 0x08ff, 0x918d, 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9,
+	0x2069, 0x1847, 0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff,
+	0x8007, 0x7032, 0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804,
+	0xa248, 0x2009, 0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016,
+	0x080c, 0xab2c, 0x001e, 0xb810, 0x9085, 0x0100, 0x7002, 0xb814,
+	0x7006, 0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013,
+	0x0888, 0x918d, 0x0008, 0x7116, 0x080c, 0xa236, 0x721a, 0x7a08,
+	0x7222, 0x2f10, 0x7226, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6,
+	0x0066, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800,
+	0x7160, 0x7810, 0x2058, 0x76dc, 0x96b4, 0x0028, 0x0110, 0x737c,
+	0x7480, 0x2500, 0x76dc, 0x96b4, 0x0028, 0x0140, 0x2001, 0x04ff,
+	0x6062, 0x6067, 0xffff, 0x636a, 0x646e, 0x0050, 0x2001, 0x00ff,
+	0x9085, 0x0400, 0x6062, 0x6067, 0xffff, 0x606b, 0x0000, 0x616e,
+	0xb8b8, 0x6073, 0x0530, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084,
 	0x00ff, 0xb88e, 0x8007, 0x9085, 0x0020, 0x607a, 0x607f, 0x0000,
 	0x2b00, 0x6082, 0x6087, 0xffff, 0x7814, 0x0096, 0x2048, 0xa838,
 	0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0x009e,
 	0xb86c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000,
-	0xbac0, 0x629e, 0x00f6, 0x2079, 0x0140, 0x7803, 0x0000, 0x00fe,
-	0x2009, 0x0092, 0x6116, 0x2009, 0x07d0, 0x080c, 0x857e, 0x003e,
-	0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005,
-	0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046, 0x0036,
-	0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058, 0xb8a0, 0x2028,
-	0xb910, 0xba14, 0x737c, 0x7480, 0x7820, 0x90be, 0x0006, 0x0904,
-	0xa1a4, 0x90be, 0x000a, 0x1904, 0xa160, 0xb8c0, 0x609e, 0x7814,
-	0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90, 0x9784, 0xff00, 0x9105,
-	0x6062, 0x873f, 0x9784, 0xff00, 0x0006, 0x7814, 0x2048, 0xa878,
-	0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94, 0x87ff, 0x0198, 0x2039,
-	0x0098, 0x9705, 0x6072, 0x7808, 0x6082, 0x2f00, 0x6086, 0x0038,
-	0x9185, 0x2200, 0x6062, 0x6073, 0x0129, 0x6077, 0x0000, 0xb8c0,
-	0x609e, 0x0050, 0x2039, 0x0029, 0x9705, 0x6072, 0x0cc0, 0x9185,
-	0x0200, 0x6062, 0x6073, 0x2029, 0xa87c, 0xd0fc, 0x0118, 0xaf94,
-	0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808, 0x6086, 0x6266, 0x636a,
-	0x646e, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e,
-	0x8007, 0x607a, 0x607f, 0x0000, 0xa838, 0x608a, 0xa834, 0x608e,
-	0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5,
-	0x60d7, 0x0000, 0x080c, 0xab06, 0x2009, 0x07d0, 0x60c4, 0x9084,
-	0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x857e, 0x003e,
-	0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005,
-	0x7804, 0x9086, 0x0040, 0x0904, 0xa1e0, 0x9185, 0x0100, 0x6062,
-	0x6266, 0x636a, 0x646e, 0x6073, 0x0809, 0x6077, 0x0008, 0x60af,
-	0x95d5, 0x60d7, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e,
-	0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808, 0x6086,
-	0x7814, 0x2048, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6,
-	0xa844, 0x60ca, 0xb86c, 0x60ce, 0xbac0, 0x629e, 0x080c, 0xab06,
-	0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009,
-	0x1b58, 0x080c, 0x857e, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de,
-	0x00ee, 0x009e, 0x00be, 0x0005, 0x7814, 0x2048, 0xa87c, 0x9084,
-	0x0003, 0x9086, 0x0002, 0x0904, 0xa1fc, 0x9185, 0x0100, 0x6062,
-	0x6266, 0x636a, 0x646e, 0x6073, 0x0880, 0x6077, 0x0008, 0xb88c,
-	0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x7838, 0x607e,
-	0x2f00, 0x6086, 0x7808, 0x6082, 0xa890, 0x608a, 0xa88c, 0x608e,
-	0xa8b0, 0x60c6, 0xa8ac, 0x60ca, 0xa8ac, 0x7930, 0x9108, 0x7932,
-	0xa8b0, 0x792c, 0x9109, 0x792e, 0xb86c, 0x60ce, 0x60af, 0x95d5,
-	0x60d7, 0x0000, 0xbac0, 0x629e, 0x080c, 0xaae3, 0x0804, 0xa190,
-	0xb8cc, 0xd084, 0x0148, 0xb88c, 0x7814, 0x2048, 0xb88c, 0x7846,
-	0xa836, 0x2900, 0xa83a, 0xb04a, 0x9185, 0x0600, 0x6062, 0x6266,
-	0x636a, 0x646e, 0x6073, 0x0829, 0x6077, 0x0000, 0x60af, 0x9575,
-	0x60d7, 0x0000, 0x0804, 0xa173, 0x9185, 0x0700, 0x6062, 0x6266,
-	0x636a, 0x646e, 0x7824, 0xd0cc, 0x7826, 0x0118, 0x6073, 0x0889,
-	0x0010, 0x6073, 0x0898, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084,
-	0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6086,
-	0x7808, 0x6082, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6,
-	0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000,
-	0xbac0, 0x629e, 0x7824, 0xd0cc, 0x0120, 0x080c, 0xab06, 0x0804,
-	0xa190, 0x080c, 0xaae3, 0x0804, 0xa190, 0x7a10, 0x00b6, 0x2258,
-	0xba8c, 0x8210, 0x9294, 0x00ff, 0xba8e, 0x00be, 0x8217, 0x0005,
-	0x00d6, 0x2069, 0x19e7, 0x6843, 0x0001, 0x00de, 0x0005, 0x60a3,
-	0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c, 0x8570, 0x0005, 0x0016,
-	0x2001, 0x180c, 0x200c, 0x9184, 0x0600, 0x9086, 0x0600, 0x0128,
-	0x0089, 0x080c, 0x8570, 0x001e, 0x0005, 0xc1e5, 0x2001, 0x180c,
-	0x2102, 0x2001, 0x19e8, 0x2003, 0x0000, 0x2001, 0x19f0, 0x2003,
-	0x0000, 0x0c88, 0x0006, 0x6014, 0x9084, 0x1804, 0x9085, 0x0009,
-	0x6016, 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x2061, 0x0100,
-	0x61a4, 0x60a7, 0x95f5, 0x6014, 0x9084, 0x1804, 0x9085, 0x0008,
-	0x6016, 0x000e, 0xa001, 0xa001, 0xa001, 0x61a6, 0x00ce, 0x001e,
-	0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x080c, 0x73bc, 0x11e8, 0x2001, 0x1a03, 0x2004, 0x9005,
-	0x1904, 0xa2d9, 0x0066, 0x2031, 0x0001, 0x080c, 0x746c, 0x006e,
-	0x1160, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084,
-	0x090c, 0x0dd5, 0x080c, 0x8570, 0x0460, 0x00c6, 0x2061, 0x19e7,
-	0x00d0, 0x6904, 0x9194, 0x4000, 0x0548, 0x080c, 0xa273, 0x080c,
-	0x2cff, 0x00c6, 0x2061, 0x19e7, 0x6128, 0x9192, 0x0008, 0x1258,
-	0x8108, 0x612a, 0x6124, 0x00ce, 0x81ff, 0x0198, 0x080c, 0x8570,
-	0x080c, 0xa26a, 0x0070, 0x6124, 0x91e5, 0x0000, 0x0140, 0x080c,
-	0xe9fe, 0x080c, 0x8579, 0x2009, 0x0014, 0x080c, 0xaedc, 0x00ce,
-	0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0x1a03,
-	0x2004, 0x9005, 0x1db0, 0x00c6, 0x2061, 0x19e7, 0x6128, 0x9192,
-	0x0003, 0x1e08, 0x8108, 0x612a, 0x00ce, 0x080c, 0x8570, 0x080c,
-	0x5ed9, 0x2009, 0x1846, 0x2114, 0x8210, 0x220a, 0x0c10, 0x0096,
-	0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c, 0x8586, 0x2071,
-	0x19e7, 0x713c, 0x81ff, 0x0904, 0xa37d, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x080c, 0x73bc, 0x1500, 0x0036, 0x2019, 0x0002, 0x080c,
-	0xa5b6, 0x003e, 0x713c, 0x2160, 0x080c, 0xe9fe, 0x2009, 0x004a,
-	0x6220, 0x9296, 0x0009, 0x1130, 0x6114, 0x2148, 0xa87b, 0x0006,
-	0x2009, 0x004a, 0x080c, 0xaedc, 0x0066, 0x2031, 0x0001, 0x080c,
-	0x746c, 0x006e, 0x0804, 0xa37d, 0x080c, 0xa389, 0x0904, 0xa37d,
-	0x6904, 0xd1f4, 0x0904, 0xa384, 0x080c, 0x2cff, 0x00c6, 0x703c,
-	0x9065, 0x090c, 0x0dd5, 0x6020, 0x00ce, 0x9086, 0x0006, 0x1528,
-	0x61c8, 0x60c4, 0x9105, 0x1508, 0x2009, 0x180c, 0x2104, 0xd0d4,
-	0x01e0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294, 0x0002,
-	0x1560, 0x0030, 0xc0d4, 0x200a, 0xd0cc, 0x0110, 0x080c, 0x2c52,
-	0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, 0x703c, 0x2060,
-	0x2009, 0x0049, 0x080c, 0xaedc, 0x00c0, 0x0036, 0x2019, 0x0001,
-	0x080c, 0xa5b6, 0x003e, 0x713c, 0x2160, 0x080c, 0xe9fe, 0x2009,
+	0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x0128, 0x609f, 0x0000,
+	0x2001, 0x0092, 0x0048, 0x6028, 0xc0bd, 0x602a, 0x609f, 0x00ff,
+	0x6027, 0xffff, 0x2001, 0x00b2, 0x6016, 0x2009, 0x07d0, 0x080c,
+	0x8567, 0x003e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee,
+	0x00be, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056,
+	0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7160, 0x7810,
+	0x2058, 0xb8a0, 0x2028, 0x76dc, 0xd6ac, 0x1168, 0x9582, 0x007e,
+	0x1250, 0x2500, 0x9094, 0xff80, 0x1130, 0x9080, 0x3327, 0x2015,
+	0x9294, 0x00ff, 0x0020, 0xb910, 0xba14, 0x737c, 0x7480, 0x70dc,
+	0xd0ac, 0x1130, 0x9582, 0x007e, 0x1218, 0x9584, 0xff80, 0x0138,
+	0x9185, 0x0400, 0x6062, 0x6266, 0x636a, 0x646e, 0x0030, 0x6063,
+	0x0400, 0x6266, 0x606b, 0x0000, 0x616e, 0xb8b8, 0x6072, 0x6077,
+	0x0000, 0xb864, 0xd0a4, 0x0110, 0x6077, 0x0008, 0xb88c, 0x8000,
+	0x9084, 0x00ff, 0xb88e, 0x8007, 0x9085, 0x0020, 0x607a, 0x607f,
+	0x0000, 0x2b00, 0x6082, 0x6087, 0xffff, 0x7814, 0x0096, 0x2048,
+	0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca,
+	0x009e, 0xb86c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7,
+	0x0000, 0xbac0, 0x629e, 0x00f6, 0x2079, 0x0140, 0x7803, 0x0000,
+	0x00fe, 0x2009, 0x0092, 0x6116, 0x2009, 0x07d0, 0x080c, 0x8567,
+	0x003e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be,
+	0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046,
+	0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058, 0xb8a0,
+	0x2028, 0xb910, 0xba14, 0x737c, 0x7480, 0x7820, 0x90be, 0x0006,
+	0x0904, 0xa1a5, 0x90be, 0x000a, 0x1904, 0xa161, 0xb8c0, 0x609e,
+	0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90, 0x9784, 0xff00,
+	0x9105, 0x6062, 0x873f, 0x9784, 0xff00, 0x0006, 0x7814, 0x2048,
+	0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94, 0x87ff, 0x0198,
+	0x2039, 0x0098, 0x9705, 0x6072, 0x7808, 0x6082, 0x2f00, 0x6086,
+	0x0038, 0x9185, 0x2200, 0x6062, 0x6073, 0x0129, 0x6077, 0x0000,
+	0xb8c0, 0x609e, 0x0050, 0x2039, 0x0029, 0x9705, 0x6072, 0x0cc0,
+	0x9185, 0x0200, 0x6062, 0x6073, 0x2029, 0xa87c, 0xd0fc, 0x0118,
+	0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808, 0x6086, 0x6266,
+	0x636a, 0x646e, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff,
+	0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0xa838, 0x608a, 0xa834,
+	0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af,
+	0x95d5, 0x60d7, 0x0000, 0x080c, 0xab11, 0x2009, 0x07d0, 0x60c4,
+	0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x8567,
+	0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be,
+	0x0005, 0x7804, 0x9086, 0x0040, 0x0904, 0xa1e1, 0x9185, 0x0100,
+	0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0809, 0x6077, 0x0008,
+	0x60af, 0x95d5, 0x60d7, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff,
+	0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808,
+	0x6086, 0x7814, 0x2048, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848,
+	0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0xbac0, 0x629e, 0x080c,
+	0xab11, 0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110,
+	0x2009, 0x1b58, 0x080c, 0x8567, 0x003e, 0x004e, 0x005e, 0x00ce,
+	0x00de, 0x00ee, 0x009e, 0x00be, 0x0005, 0x7814, 0x2048, 0xa87c,
+	0x9084, 0x0003, 0x9086, 0x0002, 0x0904, 0xa1fd, 0x9185, 0x0100,
+	0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0880, 0x6077, 0x0008,
+	0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x7838,
+	0x607e, 0x2f00, 0x6086, 0x7808, 0x6082, 0xa890, 0x608a, 0xa88c,
+	0x608e, 0xa8b0, 0x60c6, 0xa8ac, 0x60ca, 0xa8ac, 0x7930, 0x9108,
+	0x7932, 0xa8b0, 0x792c, 0x9109, 0x792e, 0xb86c, 0x60ce, 0x60af,
+	0x95d5, 0x60d7, 0x0000, 0xbac0, 0x629e, 0x080c, 0xaaee, 0x0804,
+	0xa191, 0xb8cc, 0xd084, 0x0148, 0xb88c, 0x7814, 0x2048, 0xb88c,
+	0x7846, 0xa836, 0x2900, 0xa83a, 0xb04a, 0x9185, 0x0600, 0x6062,
+	0x6266, 0x636a, 0x646e, 0x6073, 0x0829, 0x6077, 0x0000, 0x60af,
+	0x9575, 0x60d7, 0x0000, 0x0804, 0xa174, 0x9185, 0x0700, 0x6062,
+	0x6266, 0x636a, 0x646e, 0x7824, 0xd0cc, 0x7826, 0x0118, 0x6073,
+	0x0889, 0x0010, 0x6073, 0x0898, 0x6077, 0x0000, 0xb88c, 0x8000,
+	0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00,
+	0x6086, 0x7808, 0x6082, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848,
+	0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7,
+	0x0000, 0xbac0, 0x629e, 0x7824, 0xd0cc, 0x0120, 0x080c, 0xab11,
+	0x0804, 0xa191, 0x080c, 0xaaee, 0x0804, 0xa191, 0x7a10, 0x00b6,
+	0x2258, 0xba8c, 0x8210, 0x9294, 0x00ff, 0xba8e, 0x00be, 0x8217,
+	0x0005, 0x00d6, 0x2069, 0x19e6, 0x6843, 0x0001, 0x00de, 0x0005,
+	0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c, 0x8559, 0x0005,
+	0x0016, 0x2001, 0x180c, 0x200c, 0x9184, 0x0600, 0x9086, 0x0600,
+	0x0128, 0x0089, 0x080c, 0x8559, 0x001e, 0x0005, 0xc1e5, 0x2001,
+	0x180c, 0x2102, 0x2001, 0x19e7, 0x2003, 0x0000, 0x2001, 0x19ef,
+	0x2003, 0x0000, 0x0c88, 0x0006, 0x6014, 0x9084, 0x1804, 0x9085,
+	0x0009, 0x6016, 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x2061,
+	0x0100, 0x61a4, 0x60a7, 0x95f5, 0x6014, 0x9084, 0x1804, 0x9085,
+	0x0008, 0x6016, 0x000e, 0xa001, 0xa001, 0xa001, 0x61a6, 0x00ce,
+	0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100,
+	0x2069, 0x0140, 0x080c, 0x73a5, 0x11e8, 0x2001, 0x1a02, 0x2004,
+	0x9005, 0x1904, 0xa2da, 0x0066, 0x2031, 0x0001, 0x080c, 0x7455,
+	0x006e, 0x1160, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024,
+	0xd084, 0x090c, 0x0dd5, 0x080c, 0x8559, 0x0460, 0x00c6, 0x2061,
+	0x19e6, 0x00d0, 0x6904, 0x9194, 0x4000, 0x0548, 0x080c, 0xa274,
+	0x080c, 0x2d01, 0x00c6, 0x2061, 0x19e6, 0x6128, 0x9192, 0x0008,
+	0x1258, 0x8108, 0x612a, 0x6124, 0x00ce, 0x81ff, 0x0198, 0x080c,
+	0x8559, 0x080c, 0xa26b, 0x0070, 0x6124, 0x91e5, 0x0000, 0x0140,
+	0x080c, 0xea1f, 0x080c, 0x8562, 0x2009, 0x0014, 0x080c, 0xaeec,
+	0x00ce, 0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005, 0x2001,
+	0x1a02, 0x2004, 0x9005, 0x1db0, 0x00c6, 0x2061, 0x19e6, 0x6128,
+	0x9192, 0x0003, 0x1e08, 0x8108, 0x612a, 0x00ce, 0x080c, 0x8559,
+	0x080c, 0x5ee2, 0x2009, 0x1846, 0x2114, 0x8210, 0x220a, 0x0c10,
+	0x0096, 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c, 0x856f,
+	0x2071, 0x19e6, 0x713c, 0x81ff, 0x0904, 0xa37e, 0x2061, 0x0100,
+	0x2069, 0x0140, 0x080c, 0x73a5, 0x1500, 0x0036, 0x2019, 0x0002,
+	0x080c, 0xa5b7, 0x003e, 0x713c, 0x2160, 0x080c, 0xea1f, 0x2009,
 	0x004a, 0x6220, 0x9296, 0x0009, 0x1130, 0x6114, 0x2148, 0xa87b,
-	0x0006, 0x2009, 0x004a, 0x080c, 0xaedc, 0x002e, 0x001e, 0x00ee,
-	0x00de, 0x00ce, 0x009e, 0x0005, 0xd1ec, 0x1904, 0xa334, 0x0804,
-	0xa336, 0x00d6, 0x00c6, 0x0096, 0x703c, 0x9065, 0x090c, 0x0dd5,
-	0x2001, 0x1837, 0x2004, 0xd09c, 0x1904, 0xa415, 0x2001, 0x0306,
-	0x200c, 0x9184, 0x0030, 0x0904, 0xa415, 0x9184, 0x0048, 0x9086,
-	0x0008, 0x1904, 0xa415, 0x2001, 0x020b, 0x2004, 0xd0fc, 0x0904,
-	0xa415, 0xd08c, 0x0904, 0xa415, 0x2009, 0x1a80, 0x2104, 0x8000,
-	0x0208, 0x200a, 0x2069, 0x0100, 0x6914, 0x918c, 0x0184, 0x918d,
-	0x0010, 0x6916, 0x69c8, 0x2011, 0x0020, 0x68c8, 0x9106, 0x1570,
-	0x8211, 0x1dd8, 0x2001, 0x0306, 0x2003, 0x4800, 0x2001, 0x009a,
-	0x2003, 0x0004, 0x2001, 0x1a66, 0x2003, 0x0000, 0x2001, 0x1a6f,
-	0x2003, 0x0000, 0x6a88, 0x698c, 0x2200, 0x9105, 0x1120, 0x2c10,
-	0x080c, 0x1bad, 0x0040, 0x6014, 0x2048, 0xaa3a, 0xa936, 0x6ac4,
-	0x69c8, 0xa946, 0xaa4a, 0x0126, 0x00c6, 0x2091, 0x2400, 0x002e,
-	0x080c, 0x1c46, 0x190c, 0x0dd5, 0x012e, 0x0090, 0x2009, 0x1a81,
-	0x2104, 0x8000, 0x0208, 0x200a, 0x69c8, 0x2011, 0x0020, 0x8211,
-	0x1df0, 0x68c8, 0x9106, 0x1dc0, 0x69c4, 0x68c8, 0x9105, 0x0160,
-	0x6824, 0xd08c, 0x0110, 0x6827, 0x0002, 0x7048, 0xc085, 0x704a,
-	0x0079, 0x7048, 0xc084, 0x704a, 0x2009, 0x07d0, 0x080c, 0x857e,
-	0x9006, 0x009e, 0x00ce, 0x00de, 0x0005, 0x9085, 0x0001, 0x0cc8,
-	0x0026, 0x00e6, 0x2071, 0x19e7, 0x7048, 0xd084, 0x01d8, 0x713c,
-	0x81ff, 0x01c0, 0x2071, 0x0100, 0x9188, 0x0008, 0x2114, 0x928e,
-	0x0006, 0x1138, 0x7014, 0x9084, 0x1984, 0x9085, 0x0012, 0x7016,
-	0x0048, 0x928e, 0x0009, 0x0db0, 0x7014, 0x9084, 0x1984, 0x9085,
-	0x0016, 0x7016, 0x00ee, 0x002e, 0x0005, 0x00b6, 0x00e6, 0x00d6,
-	0x00c6, 0x0066, 0x0056, 0x0046, 0x0006, 0x0126, 0x2091, 0x8000,
-	0x6010, 0x2058, 0xbca0, 0x2071, 0x19e7, 0x7018, 0x2058, 0x8bff,
-	0x0190, 0xb8a0, 0x9406, 0x0118, 0xb854, 0x2058, 0x0cc0, 0x6014,
-	0x0096, 0x2048, 0xac6c, 0xad70, 0xae78, 0x009e, 0x080c, 0x6731,
-	0x0110, 0x9085, 0x0001, 0x012e, 0x000e, 0x004e, 0x005e, 0x006e,
-	0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x080c, 0x9c60, 0x7003,
-	0x1200, 0x7838, 0x7012, 0x783c, 0x7016, 0x00c6, 0x7820, 0x9086,
-	0x0004, 0x1148, 0x7810, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb810,
-	0xb914, 0x00be, 0x0020, 0x2061, 0x1800, 0x607c, 0x6180, 0x9084,
-	0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804, 0xa247,
-	0x080c, 0x9c60, 0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128, 0xb810,
-	0x9084, 0x00ff, 0x700a, 0xb814, 0x700e, 0x60c3, 0x0008, 0x0804,
-	0xa247, 0x0156, 0x080c, 0x9cab, 0x7003, 0x0200, 0x080c, 0x85d9,
-	0x20a9, 0x0006, 0x2011, 0xfff4, 0x2019, 0xfff5, 0x9ef0, 0x0002,
-	0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398, 0x0002,
-	0x9290, 0x0002, 0x1f04, 0xa4b0, 0x60c3, 0x001c, 0x015e, 0x0804,
-	0xa247, 0x0016, 0x0026, 0x080c, 0x9c87, 0x080c, 0x9c99, 0x9e80,
-	0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814, 0x0096, 0x2048, 0xa800,
-	0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x009e,
-	0x7808, 0x9088, 0x0002, 0x21a8, 0x9192, 0x0010, 0x1250, 0x4003,
-	0x9080, 0x0004, 0x8003, 0x60c2, 0x080c, 0xa247, 0x002e, 0x001e,
-	0x0005, 0x20a9, 0x0010, 0x4003, 0x080c, 0xab0c, 0x20a1, 0x0240,
-	0x22a8, 0x4003, 0x0c68, 0x080c, 0x9c60, 0x7003, 0x6200, 0x7808,
-	0x700e, 0x60c3, 0x0008, 0x0804, 0xa247, 0x0016, 0x0026, 0x080c,
-	0x9c60, 0x20e9, 0x0000, 0x20a1, 0x024c, 0x7814, 0x0096, 0x2048,
-	0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098,
-	0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x4003, 0x8003, 0x60c2,
-	0x080c, 0xa247, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6, 0x0006,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x19e7, 0x700c, 0x2060, 0x8cff,
-	0x0178, 0x080c, 0xcd3b, 0x1110, 0x080c, 0xb813, 0x600c, 0x0006,
-	0x080c, 0xcfa2, 0x080c, 0xae61, 0x080c, 0xa692, 0x00ce, 0x0c78,
-	0x2c00, 0x700e, 0x700a, 0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005,
-	0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026,
-	0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c,
-	0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19e7,
-	0x7024, 0x2060, 0x8cff, 0x01f8, 0x080c, 0xa273, 0x6ac0, 0x68c3,
-	0x0000, 0x080c, 0x8579, 0x00c6, 0x2061, 0x0100, 0x080c, 0xac5d,
-	0x00ce, 0x20a9, 0x01f4, 0x0461, 0x2009, 0x0013, 0x080c, 0xaedc,
-	0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x015e, 0x012e, 0x0005, 0x2001, 0x1800, 0x2004, 0x9096, 0x0001,
-	0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c, 0x8579, 0x6814, 0x9084,
-	0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000,
-	0x2011, 0x5e83, 0x080c, 0x84f3, 0x20a9, 0x01f4, 0x0009, 0x08c0,
-	0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000,
-	0x190c, 0x2cff, 0x0090, 0xd084, 0x0118, 0x6827, 0x0001, 0x0010,
-	0x1f04, 0xa598, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100,
-	0x080c, 0x2cef, 0x9006, 0x080c, 0x2cef, 0x0005, 0x0126, 0x0156,
-	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006,
-	0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xdbff, 0x2102,
-	0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19e7, 0x703c, 0x2060,
-	0x8cff, 0x0904, 0xa648, 0x9386, 0x0002, 0x1128, 0x6814, 0x9084,
-	0x0002, 0x0904, 0xa648, 0x68af, 0x95f5, 0x6817, 0x0010, 0x2009,
-	0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008, 0x080c, 0x8586,
-	0x080c, 0x1ffa, 0x0046, 0x2009, 0x00a5, 0x080c, 0x0e51, 0x2021,
-	0x0169, 0x2404, 0x9084, 0x000f, 0x9086, 0x0004, 0x11f8, 0x68af,
-	0x95f5, 0x68c6, 0x68cb, 0x0008, 0x00e6, 0x00f6, 0x2079, 0x0090,
-	0x2071, 0x1a66, 0x6814, 0x9084, 0x1984, 0x9085, 0x0012, 0x6816,
-	0x782b, 0x0008, 0x7003, 0x0000, 0x00fe, 0x00ee, 0x9386, 0x0002,
-	0x1128, 0x7884, 0x9005, 0x1110, 0x7887, 0x0001, 0x2001, 0x1981,
-	0x200c, 0x080c, 0x0e51, 0x004e, 0x20a9, 0x03e8, 0x6824, 0xd094,
-	0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2cff,
-	0x0090, 0xd08c, 0x0118, 0x6827, 0x0002, 0x0010, 0x1f04, 0xa61e,
-	0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2cef,
-	0x9006, 0x080c, 0x2cef, 0x6827, 0x4000, 0x6824, 0x83ff, 0x1140,
-	0x2009, 0x0049, 0x6020, 0x9086, 0x0009, 0x0110, 0x080c, 0xaedc,
-	0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069,
-	0x19e7, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, 0x2091,
-	0x8000, 0x2069, 0x19e7, 0x6a32, 0x012e, 0x00de, 0x0005, 0x080c,
-	0x9e19, 0x7854, 0x7032, 0x7042, 0x7047, 0x1000, 0x00f8, 0x080c,
-	0x9e19, 0x7854, 0x7032, 0x7042, 0x7047, 0x4000, 0x00b8, 0x080c,
-	0x9e19, 0x7854, 0x7032, 0x7042, 0x7047, 0x2000, 0x0078, 0x080c,
-	0x9e19, 0x7854, 0x7032, 0x7042, 0x7047, 0x0400, 0x0038, 0x080c,
-	0x9e19, 0x7854, 0x7032, 0x7042, 0x7047, 0x0200, 0x60c3, 0x0020,
-	0x0804, 0xa247, 0x00e6, 0x2071, 0x19e7, 0x7020, 0x9005, 0x0110,
-	0x8001, 0x7022, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
-	0x0076, 0x0066, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e7,
-	0x7614, 0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, 0x0904, 0xa737,
-	0x8cff, 0x0904, 0xa737, 0x6020, 0x9086, 0x0006, 0x1904, 0xa732,
-	0x88ff, 0x0138, 0x2800, 0x9c06, 0x1904, 0xa732, 0x2039, 0x0000,
-	0x0050, 0x6010, 0x9b06, 0x1904, 0xa732, 0x85ff, 0x0120, 0x6054,
-	0x9106, 0x1904, 0xa732, 0x7024, 0x9c06, 0x15b0, 0x2069, 0x0100,
-	0x68c0, 0x9005, 0x1160, 0x6824, 0xd084, 0x0148, 0x6827, 0x0001,
-	0x080c, 0x8579, 0x080c, 0xa7bc, 0x7027, 0x0000, 0x0428, 0x080c,
-	0x8579, 0x6820, 0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008,
-	0x68c3, 0x0000, 0x080c, 0xa7bc, 0x7027, 0x0000, 0x0036, 0x2069,
-	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
-	0x2cef, 0x9006, 0x080c, 0x2cef, 0x2069, 0x0100, 0x6824, 0xd084,
-	0x0110, 0x6827, 0x0001, 0x003e, 0x7014, 0x9c36, 0x1110, 0x660c,
-	0x7616, 0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
-	0x7012, 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06,
-	0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000,
-	0x6014, 0x0096, 0x2048, 0x080c, 0xcb33, 0x0110, 0x080c, 0xe551,
-	0x009e, 0x080c, 0xae92, 0x080c, 0xa692, 0x88ff, 0x1190, 0x00ce,
-	0x0804, 0xa6ad, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa6ad, 0x9006,
-	0x012e, 0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x0005, 0x601b, 0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6,
-	0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x2071, 0x19e7, 0x7638, 0x2660, 0x2678, 0x8cff,
-	0x0904, 0xa7ab, 0x6020, 0x9086, 0x0006, 0x1904, 0xa7a6, 0x87ff,
-	0x0128, 0x2700, 0x9c06, 0x1904, 0xa7a6, 0x0040, 0x6010, 0x9b06,
-	0x15e8, 0x85ff, 0x0118, 0x6054, 0x9106, 0x15c0, 0x703c, 0x9c06,
-	0x1168, 0x0036, 0x2019, 0x0001, 0x080c, 0xa5b6, 0x7033, 0x0000,
-	0x9006, 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x7038, 0x9c36,
-	0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36,
-	0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x0066,
-	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
-	0x6014, 0x2048, 0x080c, 0xcb33, 0x0110, 0x080c, 0xe551, 0x080c,
-	0xae92, 0x87ff, 0x1198, 0x00ce, 0x0804, 0xa757, 0x2c78, 0x600c,
-	0x2060, 0x0804, 0xa757, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e,
-	0x00ce, 0x009e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000,
-	0x00ce, 0x97bd, 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19e7, 0x2001,
-	0x1800, 0x2004, 0x9086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010,
-	0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066,
-	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e7, 0x2c10,
-	0x7638, 0x2660, 0x2678, 0x8cff, 0x0518, 0x2200, 0x9c06, 0x11e0,
-	0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140,
-	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000,
-	0x660c, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x9085, 0x0001, 0x0020, 0x2c78, 0x600c, 0x2060, 0x08d8,
-	0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005,
-	0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x19e7, 0x760c, 0x2660, 0x2678,
-	0x8cff, 0x0904, 0xa898, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be,
-	0x9206, 0x1904, 0xa893, 0x7024, 0x9c06, 0x1520, 0x2069, 0x0100,
-	0x68c0, 0x9005, 0x0904, 0xa86f, 0x080c, 0xa273, 0x68c3, 0x0000,
-	0x080c, 0xa7bc, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
-	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2cef, 0x9006,
-	0x080c, 0x2cef, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
-	0x0001, 0x003e, 0x700c, 0x9c36, 0x1110, 0x660c, 0x760e, 0x7008,
-	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010,
-	0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
-	0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xcd2a, 0x1158, 0x080c,
-	0x31e8, 0x080c, 0xcd3b, 0x11f0, 0x080c, 0xb813, 0x00d8, 0x080c,
-	0xa7bc, 0x08c0, 0x080c, 0xcd3b, 0x1118, 0x080c, 0xb813, 0x0090,
-	0x6014, 0x2048, 0x080c, 0xcb33, 0x0168, 0x6020, 0x9086, 0x0003,
-	0x1508, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6c75,
-	0x080c, 0xcd1e, 0x080c, 0xcfa2, 0x080c, 0xae92, 0x080c, 0xa692,
-	0x00ce, 0x0804, 0xa818, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa818,
-	0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20, 0x080c, 0xe551,
-	0x0c08, 0x00d6, 0x080c, 0x9cab, 0x7003, 0x0200, 0x7007, 0x0014,
-	0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099, 0x1989, 0x20e9, 0x0000,
-	0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023, 0x0004, 0x7027,
-	0x7878, 0x080c, 0xa247, 0x00de, 0x0005, 0x080c, 0x9cab, 0x700b,
-	0x0800, 0x7814, 0x9084, 0xff00, 0x700e, 0x7814, 0x9084, 0x00ff,
-	0x7022, 0x782c, 0x7026, 0x7858, 0x9084, 0x00ff, 0x9085, 0x0200,
-	0x7002, 0x7858, 0x9084, 0xff00, 0x8007, 0x7006, 0x60c2, 0x0804,
-	0xa247, 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68, 0x2009, 0x0035,
-	0x080c, 0xd1a8, 0x00de, 0x1904, 0xa946, 0x080c, 0x9c60, 0x7003,
-	0x1300, 0x782c, 0x080c, 0xaa48, 0x2068, 0x6820, 0x9086, 0x0003,
-	0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c, 0xadcb, 0x11d8, 0x9286,
-	0x007e, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0498, 0x9286,
-	0x007f, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd, 0x0458, 0x9284,
-	0xff80, 0x0180, 0x9286, 0x0080, 0x1128, 0x700b, 0x00ff, 0x700f,
-	0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810, 0x700a, 0xb814,
-	0x700e, 0x00c0, 0x6098, 0x700e, 0x00a8, 0x080c, 0xadcb, 0x1130,
-	0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250, 0x00d6, 0x2069,
-	0x181f, 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e, 0x00de, 0x0010,
-	0x6034, 0x700e, 0x7838, 0x7012, 0x783c, 0x7016, 0x60c3, 0x000c,
-	0x001e, 0x00de, 0x080c, 0xa247, 0x00be, 0x0005, 0x781b, 0x0001,
-	0x7803, 0x0006, 0x001e, 0x00de, 0x00be, 0x0005, 0x792c, 0x9180,
-	0x0008, 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186, 0x0003, 0x0904,
-	0xa9c0, 0x9186, 0x0005, 0x0904, 0xa9a9, 0x9186, 0x0004, 0x05d8,
-	0x9186, 0x0008, 0x0904, 0xa9b1, 0x7807, 0x0037, 0x782f, 0x0003,
-	0x7817, 0x1700, 0x080c, 0xaa25, 0x0005, 0x080c, 0xa9e6, 0x00d6,
-	0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6800, 0x0002, 0xa98a,
-	0xa995, 0xa98c, 0xa995, 0xa991, 0xa98a, 0xa98a, 0xa995, 0xa995,
-	0xa995, 0xa995, 0xa98a, 0xa98a, 0xa98a, 0xa98a, 0xa98a, 0xa995,
-	0xa98a, 0xa995, 0x080c, 0x0dd5, 0x6824, 0xd0e4, 0x0110, 0xd0cc,
-	0x0110, 0x900e, 0x0010, 0x2009, 0x2000, 0x682c, 0x7022, 0x6830,
-	0x7026, 0x0804, 0xa9df, 0x080c, 0xa9e6, 0x00d6, 0x0026, 0x792c,
-	0x2168, 0x2009, 0x4000, 0x6a00, 0x9286, 0x0002, 0x1108, 0x900e,
-	0x04b0, 0x04e1, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000,
-	0x0470, 0x04a1, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000,
-	0x9286, 0x0005, 0x0118, 0x9286, 0x0002, 0x1108, 0x900e, 0x00f8,
-	0x0429, 0x00d6, 0x0026, 0x792c, 0x2168, 0x6814, 0x0096, 0x2048,
-	0xa9ac, 0xa834, 0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022,
-	0x7226, 0x792c, 0x9180, 0x0000, 0x2004, 0x908e, 0x0002, 0x0130,
-	0x908e, 0x0004, 0x0118, 0x2009, 0x4000, 0x0008, 0x900e, 0x712a,
-	0x60c3, 0x0018, 0x002e, 0x00de, 0x0804, 0xa247, 0x00b6, 0x0036,
-	0x0046, 0x0056, 0x0066, 0x080c, 0x9cab, 0x9006, 0x7003, 0x0200,
-	0x7938, 0x710a, 0x793c, 0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c,
-	0xadcb, 0x1118, 0x9092, 0x007e, 0x0268, 0x00d6, 0x2069, 0x181f,
-	0x2d2c, 0x8d68, 0x2d34, 0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14,
-	0x00de, 0x0028, 0x901e, 0x6498, 0x2029, 0x0000, 0x6634, 0x782c,
-	0x9080, 0x0008, 0x2004, 0x9086, 0x0003, 0x1128, 0x7512, 0x7616,
-	0x731a, 0x741e, 0x0020, 0x7312, 0x7416, 0x751a, 0x761e, 0x006e,
-	0x005e, 0x004e, 0x003e, 0x00be, 0x0005, 0x080c, 0x9cab, 0x7003,
-	0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x700e, 0x60c3, 0x0008,
-	0x0804, 0xa247, 0x080c, 0x9c57, 0x7003, 0x1400, 0x7838, 0x700a,
-	0x0079, 0x783c, 0x700e, 0x782c, 0x7012, 0x7830, 0x7016, 0x7834,
-	0x9084, 0x00ff, 0x8007, 0x701a, 0x60c3, 0x0010, 0x0804, 0xa247,
-	0x00e6, 0x2071, 0x0240, 0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6,
-	0x2058, 0xb8cc, 0xd084, 0x0120, 0x7848, 0x702a, 0x7844, 0x702e,
-	0x00be, 0x00fe, 0x000e, 0x00ee, 0x0005, 0x080c, 0x9ca2, 0x7003,
-	0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804,
-	0xa247, 0x0021, 0x60c3, 0x0000, 0x0804, 0xa247, 0x00d6, 0x080c,
-	0xab21, 0xb810, 0x9085, 0x0300, 0x7002, 0xb814, 0x7006, 0x2069,
-	0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x7013, 0x0819, 0x080c,
-	0xa235, 0x721a, 0x2f10, 0x7222, 0x7a08, 0x7226, 0x2071, 0x024c,
-	0x00de, 0x0005, 0x00a9, 0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7,
-	0x9575, 0x0026, 0x080c, 0x2ba5, 0x0228, 0x2011, 0x0101, 0x2204,
-	0xc0c5, 0x2012, 0x002e, 0x080c, 0xa26a, 0x080c, 0x8570, 0x0005,
-	0x0036, 0x0096, 0x00d6, 0x00e6, 0x7858, 0x2048, 0xaa7c, 0x9296,
-	0x00c0, 0x9294, 0xfffd, 0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82,
-	0xa96c, 0x9194, 0x00ff, 0xab74, 0x9384, 0x00ff, 0x908d, 0xc200,
-	0xa96e, 0x9384, 0xff00, 0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a,
-	0xaa72, 0x00d6, 0x2069, 0x0200, 0x080c, 0xab21, 0x00de, 0x20e9,
-	0x0000, 0x20a1, 0x0240, 0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x001b, 0x2098, 0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294,
-	0x7000, 0x9286, 0x3000, 0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de,
-	0x009e, 0x003e, 0x0005, 0x900e, 0x7814, 0x0096, 0x2048, 0xa87c,
-	0xd0fc, 0x01c0, 0x9084, 0x0003, 0x11a8, 0x2001, 0x180c, 0x2004,
-	0xd0bc, 0x0180, 0x7824, 0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8,
-	0x9005, 0x1140, 0x2001, 0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009,
-	0x19b2, 0x210c, 0x009e, 0x918d, 0x0092, 0x0010, 0x2009, 0x0096,
-	0x60ab, 0x0036, 0x6116, 0x0005, 0x2009, 0x0009, 0x00a0, 0x2009,
-	0x000a, 0x0088, 0x2009, 0x000b, 0x0070, 0x2009, 0x000c, 0x0058,
-	0x2009, 0x000d, 0x0040, 0x2009, 0x000e, 0x0028, 0x2009, 0x000f,
-	0x0010, 0x2009, 0x0008, 0x6912, 0x0005, 0x080c, 0x9c60, 0x0016,
-	0x0026, 0x0096, 0x00d6, 0x7814, 0x2048, 0x7013, 0x0138, 0x2001,
-	0x1837, 0x2004, 0x9084, 0x0028, 0x1138, 0x2001, 0x197c, 0x2004,
-	0x9086, 0xaaaa, 0x1904, 0xabc6, 0x7003, 0x5400, 0x00c6, 0x2061,
-	0x1800, 0x607c, 0x9084, 0x00ff, 0xa998, 0x810f, 0x918c, 0xff00,
-	0x9105, 0x700a, 0x6080, 0x700e, 0xa998, 0x918c, 0xff00, 0x7112,
-	0x20a9, 0x0004, 0x2009, 0x1805, 0x2e10, 0x9290, 0x0006, 0x2104,
-	0x2012, 0x8108, 0x8210, 0x1f04, 0xab57, 0x20a9, 0x0004, 0x2009,
-	0x1801, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xab61, 0xa860,
-	0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098, 0x2009, 0x0006, 0x20a9,
-	0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x00d6,
-	0x2069, 0x0200, 0x080c, 0xab0c, 0x00de, 0x2071, 0x0240, 0x2011,
-	0x0240, 0x2009, 0x0002, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012,
-	0x8210, 0x8109, 0x1dc0, 0x2009, 0x0008, 0x20a9, 0x0001, 0x4002,
-	0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0xa85c, 0x9080, 0x0031,
-	0x2098, 0x2009, 0x0008, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012,
-	0x8210, 0x8109, 0x1dc0, 0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056,
-	0x60a7, 0x9575, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1168,
-	0x080c, 0x73bc, 0x0150, 0x6028, 0xc0bd, 0x602a, 0x6014, 0x9084,
-	0x1804, 0x9085, 0x0029, 0x6016, 0x0010, 0x080c, 0xa247, 0x080c,
-	0x8570, 0x00de, 0x009e, 0x002e, 0x001e, 0x0005, 0x00e6, 0x2071,
-	0x0240, 0x2001, 0x2200, 0x9085, 0x00ff, 0x7002, 0x7007, 0xffff,
-	0x2071, 0x0100, 0x709b, 0x00ff, 0x00ee, 0x0804, 0xab3c, 0x080c,
-	0x9c60, 0x0016, 0x0026, 0x0096, 0x00d6, 0x7814, 0x2048, 0x7013,
-	0x0138, 0x7003, 0x5500, 0x00c6, 0xa89c, 0x9084, 0x00ff, 0xa998,
-	0x810f, 0x918c, 0xff00, 0x9105, 0x700a, 0xa99c, 0x918c, 0xff00,
-	0xa8a0, 0x9084, 0x00ff, 0x9105, 0x700e, 0xa998, 0x918c, 0xff00,
-	0x2061, 0x1800, 0x607c, 0x9084, 0x00ff, 0x910d, 0x7112, 0x6180,
-	0x7116, 0x2009, 0x0008, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029,
-	0x2098, 0x2e10, 0x9290, 0x0006, 0x20a9, 0x0001, 0x4002, 0x8007,
-	0x2012, 0x8210, 0x8109, 0x1dc0, 0x20a9, 0x0004, 0x2009, 0x1805,
-	0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xac18, 0x20a9, 0x0002,
-	0x2009, 0x1801, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xac22,
-	0x00d6, 0x0016, 0x2069, 0x0200, 0x080c, 0xab0c, 0x001e, 0x00de,
-	0x2071, 0x0240, 0x20a9, 0x0002, 0x2009, 0x1803, 0x2011, 0x0240,
-	0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xac38, 0x2009, 0x0008,
-	0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dd0, 0x9006, 0x20a9,
-	0x0008, 0x2012, 0x8210, 0x1f04, 0xac49, 0x00ce, 0x60c3, 0x004c,
-	0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0xa247, 0x080c, 0x8570,
-	0x00de, 0x009e, 0x002e, 0x001e, 0x0005, 0x00d6, 0x9290, 0x0018,
-	0x8214, 0x20e9, 0x0000, 0x2069, 0x0200, 0x6813, 0x0000, 0x22a8,
-	0x9284, 0x00e0, 0x0128, 0x20a9, 0x0020, 0x9292, 0x0020, 0x0008,
-	0x9016, 0x20a1, 0x0240, 0x9006, 0x4004, 0x82ff, 0x0120, 0x6810,
-	0x8000, 0x6812, 0x0c60, 0x00de, 0x0005, 0x00d6, 0x0096, 0x6014,
-	0x2048, 0xa878, 0x6056, 0x9006, 0xa836, 0xa83a, 0xa99c, 0xa946,
-	0xa84a, 0x6023, 0x0003, 0x6007, 0x0040, 0x6003, 0x0003, 0x600b,
-	0xffff, 0xa817, 0x0001, 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa813,
-	0x208e, 0x080c, 0x9155, 0x0126, 0x2091, 0x8000, 0x080c, 0x97b9,
-	0x012e, 0x009e, 0x00de, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
-	0x00a6, 0x0096, 0x0066, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e7,
-	0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, 0xad2b, 0x7024, 0x9c06,
-	0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xad02, 0x080c,
-	0xa273, 0x68c3, 0x0000, 0x080c, 0xa7bc, 0x7027, 0x0000, 0x0036,
+	0x0006, 0x2009, 0x004a, 0x080c, 0xaeec, 0x0066, 0x2031, 0x0001,
+	0x080c, 0x7455, 0x006e, 0x0804, 0xa37e, 0x080c, 0xa38a, 0x0904,
+	0xa37e, 0x6904, 0xd1f4, 0x0904, 0xa385, 0x080c, 0x2d01, 0x00c6,
+	0x703c, 0x9065, 0x090c, 0x0dd5, 0x6020, 0x00ce, 0x9086, 0x0006,
+	0x1528, 0x61c8, 0x60c4, 0x9105, 0x1508, 0x2009, 0x180c, 0x2104,
+	0xd0d4, 0x01e0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294,
+	0x0002, 0x1560, 0x0030, 0xc0d4, 0x200a, 0xd0cc, 0x0110, 0x080c,
+	0x2c54, 0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, 0x703c,
+	0x2060, 0x2009, 0x0049, 0x080c, 0xaeec, 0x00c0, 0x0036, 0x2019,
+	0x0001, 0x080c, 0xa5b7, 0x003e, 0x713c, 0x2160, 0x080c, 0xea1f,
+	0x2009, 0x004a, 0x6220, 0x9296, 0x0009, 0x1130, 0x6114, 0x2148,
+	0xa87b, 0x0006, 0x2009, 0x004a, 0x080c, 0xaeec, 0x002e, 0x001e,
+	0x00ee, 0x00de, 0x00ce, 0x009e, 0x0005, 0xd1ec, 0x1904, 0xa335,
+	0x0804, 0xa337, 0x00d6, 0x00c6, 0x0096, 0x703c, 0x9065, 0x090c,
+	0x0dd5, 0x2001, 0x1837, 0x2004, 0xd09c, 0x1904, 0xa416, 0x2001,
+	0x0306, 0x200c, 0x9184, 0x0030, 0x0904, 0xa416, 0x9184, 0x0048,
+	0x9086, 0x0008, 0x1904, 0xa416, 0x2001, 0x020b, 0x2004, 0xd0fc,
+	0x0904, 0xa416, 0xd08c, 0x0904, 0xa416, 0x2009, 0x1a7f, 0x2104,
+	0x8000, 0x0208, 0x200a, 0x2069, 0x0100, 0x6914, 0x918c, 0x0184,
+	0x918d, 0x0010, 0x6916, 0x69c8, 0x2011, 0x0020, 0x68c8, 0x9106,
+	0x1570, 0x8211, 0x1dd8, 0x2001, 0x0306, 0x2003, 0x4800, 0x2001,
+	0x009a, 0x2003, 0x0004, 0x2001, 0x1a65, 0x2003, 0x0000, 0x2001,
+	0x1a6e, 0x2003, 0x0000, 0x6a88, 0x698c, 0x2200, 0x9105, 0x1120,
+	0x2c10, 0x080c, 0x1baf, 0x0040, 0x6014, 0x2048, 0xaa3a, 0xa936,
+	0x6ac4, 0x69c8, 0xa946, 0xaa4a, 0x0126, 0x00c6, 0x2091, 0x2400,
+	0x002e, 0x080c, 0x1c48, 0x190c, 0x0dd5, 0x012e, 0x0090, 0x2009,
+	0x1a80, 0x2104, 0x8000, 0x0208, 0x200a, 0x69c8, 0x2011, 0x0020,
+	0x8211, 0x1df0, 0x68c8, 0x9106, 0x1dc0, 0x69c4, 0x68c8, 0x9105,
+	0x0160, 0x6824, 0xd08c, 0x0110, 0x6827, 0x0002, 0x7048, 0xc085,
+	0x704a, 0x0079, 0x7048, 0xc084, 0x704a, 0x2009, 0x07d0, 0x080c,
+	0x8567, 0x9006, 0x009e, 0x00ce, 0x00de, 0x0005, 0x9085, 0x0001,
+	0x0cc8, 0x0026, 0x00e6, 0x2071, 0x19e6, 0x7048, 0xd084, 0x01d8,
+	0x713c, 0x81ff, 0x01c0, 0x2071, 0x0100, 0x9188, 0x0008, 0x2114,
+	0x928e, 0x0006, 0x1138, 0x7014, 0x9084, 0x1984, 0x9085, 0x0012,
+	0x7016, 0x0048, 0x928e, 0x0009, 0x0db0, 0x7014, 0x9084, 0x1984,
+	0x9085, 0x0016, 0x7016, 0x00ee, 0x002e, 0x0005, 0x00b6, 0x00e6,
+	0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x6010, 0x2058, 0xbca0, 0x2071, 0x19e6, 0x7018, 0x2058,
+	0x8bff, 0x0190, 0xb8a0, 0x9406, 0x0118, 0xb854, 0x2058, 0x0cc0,
+	0x6014, 0x0096, 0x2048, 0xac6c, 0xad70, 0xae78, 0x009e, 0x080c,
+	0x673a, 0x0110, 0x9085, 0x0001, 0x012e, 0x000e, 0x004e, 0x005e,
+	0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x080c, 0x9c61,
+	0x7003, 0x1200, 0x7838, 0x7012, 0x783c, 0x7016, 0x00c6, 0x7820,
+	0x9086, 0x0004, 0x1148, 0x7810, 0x9005, 0x0130, 0x00b6, 0x2058,
+	0xb810, 0xb914, 0x00be, 0x0020, 0x2061, 0x1800, 0x607c, 0x6180,
+	0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804,
+	0xa248, 0x080c, 0x9c61, 0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128,
+	0xb810, 0x9084, 0x00ff, 0x700a, 0xb814, 0x700e, 0x60c3, 0x0008,
+	0x0804, 0xa248, 0x0156, 0x080c, 0x9cac, 0x7003, 0x0200, 0x080c,
+	0x85c2, 0x20a9, 0x0006, 0x2011, 0xfff4, 0x2019, 0xfff5, 0x9ef0,
+	0x0002, 0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398,
+	0x0002, 0x9290, 0x0002, 0x1f04, 0xa4b1, 0x60c3, 0x001c, 0x015e,
+	0x0804, 0xa248, 0x0016, 0x0026, 0x080c, 0x9c88, 0x080c, 0x9c9a,
+	0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814, 0x0096, 0x2048,
+	0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098,
+	0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x9192, 0x0010, 0x1250,
+	0x4003, 0x9080, 0x0004, 0x8003, 0x60c2, 0x080c, 0xa248, 0x002e,
+	0x001e, 0x0005, 0x20a9, 0x0010, 0x4003, 0x080c, 0xab17, 0x20a1,
+	0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c, 0x9c61, 0x7003, 0x6200,
+	0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa248, 0x0016, 0x0026,
+	0x080c, 0x9c61, 0x20e9, 0x0000, 0x20a1, 0x024c, 0x7814, 0x0096,
+	0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023,
+	0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x4003, 0x8003,
+	0x60c2, 0x080c, 0xa248, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6,
+	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x700c, 0x2060,
+	0x8cff, 0x0178, 0x080c, 0xcd50, 0x1110, 0x080c, 0xb824, 0x600c,
+	0x0006, 0x080c, 0xcfbc, 0x080c, 0xae71, 0x080c, 0xa693, 0x00ce,
+	0x0c78, 0x2c00, 0x700e, 0x700a, 0x012e, 0x000e, 0x00ce, 0x00ee,
+	0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
+	0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c,
+	0x918c, 0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071,
+	0x19e6, 0x7024, 0x2060, 0x8cff, 0x01f8, 0x080c, 0xa274, 0x6ac0,
+	0x68c3, 0x0000, 0x080c, 0x8562, 0x00c6, 0x2061, 0x0100, 0x080c,
+	0xac68, 0x00ce, 0x20a9, 0x01f4, 0x0461, 0x2009, 0x0013, 0x080c,
+	0xaeec, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x015e, 0x012e, 0x0005, 0x2001, 0x1800, 0x2004, 0x9096,
+	0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c, 0x8562, 0x6814,
+	0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3,
+	0x0000, 0x2011, 0x5e8c, 0x080c, 0x84dc, 0x20a9, 0x01f4, 0x0009,
+	0x08c0, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084,
+	0x4000, 0x190c, 0x2d01, 0x0090, 0xd084, 0x0118, 0x6827, 0x0001,
+	0x0010, 0x1f04, 0xa599, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001,
+	0x0100, 0x080c, 0x2cf1, 0x9006, 0x080c, 0x2cf1, 0x0005, 0x0126,
+	0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016,
+	0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xdbff,
+	0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19e6, 0x703c,
+	0x2060, 0x8cff, 0x0904, 0xa649, 0x9386, 0x0002, 0x1128, 0x6814,
+	0x9084, 0x0002, 0x0904, 0xa649, 0x68af, 0x95f5, 0x6817, 0x0010,
+	0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008, 0x080c,
+	0x856f, 0x080c, 0x1ffc, 0x0046, 0x2009, 0x00a5, 0x080c, 0x0e51,
+	0x2021, 0x0169, 0x2404, 0x9084, 0x000f, 0x9086, 0x0004, 0x11f8,
+	0x68af, 0x95f5, 0x68c6, 0x68cb, 0x0008, 0x00e6, 0x00f6, 0x2079,
+	0x0090, 0x2071, 0x1a65, 0x6814, 0x9084, 0x1984, 0x9085, 0x0012,
+	0x6816, 0x782b, 0x0008, 0x7003, 0x0000, 0x00fe, 0x00ee, 0x9386,
+	0x0002, 0x1128, 0x7884, 0x9005, 0x1110, 0x7887, 0x0001, 0x2001,
+	0x1980, 0x200c, 0x080c, 0x0e51, 0x004e, 0x20a9, 0x03e8, 0x6824,
+	0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c,
+	0x2d01, 0x0090, 0xd08c, 0x0118, 0x6827, 0x0002, 0x0010, 0x1f04,
+	0xa61f, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2cf1, 0x9006, 0x080c, 0x2cf1, 0x6827, 0x4000, 0x6824, 0x83ff,
+	0x1140, 0x2009, 0x0049, 0x6020, 0x9086, 0x0009, 0x0110, 0x080c,
+	0xaeec, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000,
+	0x2069, 0x19e6, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126,
+	0x2091, 0x8000, 0x2069, 0x19e6, 0x6a32, 0x012e, 0x00de, 0x0005,
+	0x080c, 0x9e1a, 0x7854, 0x7032, 0x7042, 0x7047, 0x1000, 0x00f8,
+	0x080c, 0x9e1a, 0x7854, 0x7032, 0x7042, 0x7047, 0x4000, 0x00b8,
+	0x080c, 0x9e1a, 0x7854, 0x7032, 0x7042, 0x7047, 0x2000, 0x0078,
+	0x080c, 0x9e1a, 0x7854, 0x7032, 0x7042, 0x7047, 0x0400, 0x0038,
+	0x080c, 0x9e1a, 0x7854, 0x7032, 0x7042, 0x7047, 0x0200, 0x60c3,
+	0x0020, 0x0804, 0xa248, 0x00e6, 0x2071, 0x19e6, 0x7020, 0x9005,
+	0x0110, 0x8001, 0x7022, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6,
+	0x00c6, 0x0076, 0x0066, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x19e6, 0x7614, 0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, 0x0904,
+	0xa738, 0x8cff, 0x0904, 0xa738, 0x6020, 0x9086, 0x0006, 0x1904,
+	0xa733, 0x88ff, 0x0138, 0x2800, 0x9c06, 0x1904, 0xa733, 0x2039,
+	0x0000, 0x0050, 0x6010, 0x9b06, 0x1904, 0xa733, 0x85ff, 0x0120,
+	0x6054, 0x9106, 0x1904, 0xa733, 0x7024, 0x9c06, 0x15b0, 0x2069,
+	0x0100, 0x68c0, 0x9005, 0x1160, 0x6824, 0xd084, 0x0148, 0x6827,
+	0x0001, 0x080c, 0x8562, 0x080c, 0xa7bd, 0x7027, 0x0000, 0x0428,
+	0x080c, 0x8562, 0x6820, 0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817,
+	0x0008, 0x68c3, 0x0000, 0x080c, 0xa7bd, 0x7027, 0x0000, 0x0036,
 	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
-	0x080c, 0x2cef, 0x9006, 0x080c, 0x2cef, 0x2069, 0x0100, 0x6824,
-	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x700c, 0x9c36, 0x1110,
-	0x660c, 0x760e, 0x7008, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
-	0x2f00, 0x700a, 0x0010, 0x700b, 0x0000, 0x660c, 0x0066, 0x2c00,
-	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c,
-	0xcd2a, 0x1158, 0x080c, 0x31e8, 0x080c, 0xcd3b, 0x11f0, 0x080c,
-	0xb813, 0x00d8, 0x080c, 0xa7bc, 0x08c0, 0x080c, 0xcd3b, 0x1118,
-	0x080c, 0xb813, 0x0090, 0x6014, 0x2048, 0x080c, 0xcb33, 0x0168,
+	0x080c, 0x2cf1, 0x9006, 0x080c, 0x2cf1, 0x2069, 0x0100, 0x6824,
+	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7014, 0x9c36, 0x1110,
+	0x660c, 0x7616, 0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
+	0x2f00, 0x7012, 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00,
+	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1168, 0x600f,
+	0x0000, 0x6014, 0x0096, 0x2048, 0x080c, 0xcb48, 0x0110, 0x080c,
+	0xe572, 0x009e, 0x080c, 0xaea2, 0x080c, 0xa693, 0x88ff, 0x1190,
+	0x00ce, 0x0804, 0xa6ae, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa6ae,
+	0x9006, 0x012e, 0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88,
+	0x00f6, 0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0066, 0x0026, 0x0006,
+	0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7638, 0x2660, 0x2678,
+	0x8cff, 0x0904, 0xa7ac, 0x6020, 0x9086, 0x0006, 0x1904, 0xa7a7,
+	0x87ff, 0x0128, 0x2700, 0x9c06, 0x1904, 0xa7a7, 0x0040, 0x6010,
+	0x9b06, 0x15e8, 0x85ff, 0x0118, 0x6054, 0x9106, 0x15c0, 0x703c,
+	0x9c06, 0x1168, 0x0036, 0x2019, 0x0001, 0x080c, 0xa5b7, 0x7033,
+	0x0000, 0x9006, 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x7038,
+	0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00,
+	0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c,
+	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
+	0x0000, 0x6014, 0x2048, 0x080c, 0xcb48, 0x0110, 0x080c, 0xe572,
+	0x080c, 0xaea2, 0x87ff, 0x1198, 0x00ce, 0x0804, 0xa758, 0x2c78,
+	0x600c, 0x2060, 0x0804, 0xa758, 0x9006, 0x012e, 0x000e, 0x002e,
+	0x006e, 0x00ce, 0x009e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b,
+	0x0000, 0x00ce, 0x97bd, 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19e6,
+	0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1118, 0x7007, 0x0005,
+	0x0010, 0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6,
+	0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6,
+	0x2c10, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0540, 0x2200, 0x9c06,
+	0x1508, 0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36,
+	0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037,
+	0x0000, 0x660c, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
+	0x600f, 0x0000, 0x6004, 0x9086, 0x0040, 0x090c, 0x957b, 0x9085,
+	0x0001, 0x0020, 0x2c78, 0x600c, 0x2060, 0x08b0, 0x012e, 0x000e,
+	0x002e, 0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6,
+	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x19e6, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904,
+	0xa8a3, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904,
+	0xa89e, 0x7024, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005,
+	0x0904, 0xa875, 0x080c, 0xa274, 0x68c3, 0x0000, 0x080c, 0xa7bd,
+	0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2cf1, 0x9006, 0x080c, 0x2cf1,
+	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
+	0x700c, 0x9c36, 0x1110, 0x660c, 0x760e, 0x7008, 0x9c36, 0x1140,
+	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000,
+	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
+	0x600f, 0x0000, 0x080c, 0xcd3f, 0x1180, 0x080c, 0x31ea, 0x080c,
+	0xcd50, 0x1518, 0x080c, 0xb824, 0x0400, 0x080c, 0xa7bd, 0x6824,
+	0xd084, 0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, 0xcd50, 0x1118,
+	0x080c, 0xb824, 0x0090, 0x6014, 0x2048, 0x080c, 0xcb48, 0x0168,
+	0x6020, 0x9086, 0x0003, 0x1508, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x080c, 0x6c7a, 0x080c, 0xcd33, 0x080c, 0xcfbc, 0x080c,
+	0xaea2, 0x080c, 0xa693, 0x00ce, 0x0804, 0xa81e, 0x2c78, 0x600c,
+	0x2060, 0x0804, 0xa81e, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce,
+	0x00de, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006,
+	0x1d20, 0x080c, 0xe572, 0x0c08, 0x00d6, 0x080c, 0x9cac, 0x7003,
+	0x0200, 0x7007, 0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099,
+	0x1988, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003,
+	0x7023, 0x0004, 0x7027, 0x7878, 0x080c, 0xa248, 0x00de, 0x0005,
+	0x080c, 0x9cac, 0x700b, 0x0800, 0x7814, 0x9084, 0xff00, 0x700e,
+	0x7814, 0x9084, 0x00ff, 0x7022, 0x782c, 0x7026, 0x7858, 0x9084,
+	0x00ff, 0x9085, 0x0200, 0x7002, 0x7858, 0x9084, 0xff00, 0x8007,
+	0x7006, 0x60c2, 0x0804, 0xa248, 0x00b6, 0x00d6, 0x0016, 0x00d6,
+	0x2f68, 0x2009, 0x0035, 0x080c, 0xd1c2, 0x00de, 0x1904, 0xa951,
+	0x080c, 0x9c61, 0x7003, 0x1300, 0x782c, 0x080c, 0xaa53, 0x2068,
+	0x6820, 0x9086, 0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c,
+	0xaddb, 0x11d8, 0x9286, 0x007e, 0x1128, 0x700b, 0x00ff, 0x700f,
+	0xfffe, 0x0498, 0x9286, 0x007f, 0x1128, 0x700b, 0x00ff, 0x700f,
+	0xfffd, 0x0458, 0x9284, 0xff80, 0x0180, 0x9286, 0x0080, 0x1128,
+	0x700b, 0x00ff, 0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c,
+	0xb810, 0x700a, 0xb814, 0x700e, 0x00c0, 0x6098, 0x700e, 0x00a8,
+	0x080c, 0xaddb, 0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e,
+	0x0250, 0x00d6, 0x2069, 0x181f, 0x2d04, 0x700a, 0x8d68, 0x2d04,
+	0x700e, 0x00de, 0x0010, 0x6034, 0x700e, 0x7838, 0x7012, 0x783c,
+	0x7016, 0x60c3, 0x000c, 0x001e, 0x00de, 0x080c, 0xa248, 0x00be,
+	0x0005, 0x781b, 0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x00be,
+	0x0005, 0x792c, 0x9180, 0x0008, 0x200c, 0x9186, 0x0006, 0x01c0,
+	0x9186, 0x0003, 0x0904, 0xa9cb, 0x9186, 0x0005, 0x0904, 0xa9b4,
+	0x9186, 0x0004, 0x05d8, 0x9186, 0x0008, 0x0904, 0xa9bc, 0x7807,
+	0x0037, 0x782f, 0x0003, 0x7817, 0x1700, 0x080c, 0xaa30, 0x0005,
+	0x080c, 0xa9f1, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000,
+	0x6800, 0x0002, 0xa995, 0xa9a0, 0xa997, 0xa9a0, 0xa99c, 0xa995,
+	0xa995, 0xa9a0, 0xa9a0, 0xa9a0, 0xa9a0, 0xa995, 0xa995, 0xa995,
+	0xa995, 0xa995, 0xa9a0, 0xa995, 0xa9a0, 0x080c, 0x0dd5, 0x6824,
+	0xd0e4, 0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010, 0x2009, 0x2000,
+	0x682c, 0x7022, 0x6830, 0x7026, 0x0804, 0xa9ea, 0x080c, 0xa9f1,
+	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6a00, 0x9286,
+	0x0002, 0x1108, 0x900e, 0x04b0, 0x04e1, 0x00d6, 0x0026, 0x792c,
+	0x2168, 0x2009, 0x4000, 0x0470, 0x04a1, 0x00d6, 0x0026, 0x792c,
+	0x2168, 0x2009, 0x4000, 0x9286, 0x0005, 0x0118, 0x9286, 0x0002,
+	0x1108, 0x900e, 0x00f8, 0x0429, 0x00d6, 0x0026, 0x792c, 0x2168,
+	0x6814, 0x0096, 0x2048, 0xa9ac, 0xa834, 0x9112, 0xa9b0, 0xa838,
+	0x009e, 0x9103, 0x7022, 0x7226, 0x792c, 0x9180, 0x0000, 0x2004,
+	0x908e, 0x0002, 0x0130, 0x908e, 0x0004, 0x0118, 0x2009, 0x4000,
+	0x0008, 0x900e, 0x712a, 0x60c3, 0x0018, 0x002e, 0x00de, 0x0804,
+	0xa248, 0x00b6, 0x0036, 0x0046, 0x0056, 0x0066, 0x080c, 0x9cac,
+	0x9006, 0x7003, 0x0200, 0x7938, 0x710a, 0x793c, 0x710e, 0x7810,
+	0x2058, 0xb8a0, 0x080c, 0xaddb, 0x1118, 0x9092, 0x007e, 0x0268,
+	0x00d6, 0x2069, 0x181f, 0x2d2c, 0x8d68, 0x2d34, 0x90d8, 0x1000,
+	0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028, 0x901e, 0x6498, 0x2029,
+	0x0000, 0x6634, 0x782c, 0x9080, 0x0008, 0x2004, 0x9086, 0x0003,
+	0x1128, 0x7512, 0x7616, 0x731a, 0x741e, 0x0020, 0x7312, 0x7416,
+	0x751a, 0x761e, 0x006e, 0x005e, 0x004e, 0x003e, 0x00be, 0x0005,
+	0x080c, 0x9cac, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e,
+	0x700e, 0x60c3, 0x0008, 0x0804, 0xa248, 0x080c, 0x9c58, 0x7003,
+	0x1400, 0x7838, 0x700a, 0x0079, 0x783c, 0x700e, 0x782c, 0x7012,
+	0x7830, 0x7016, 0x7834, 0x9084, 0x00ff, 0x8007, 0x701a, 0x60c3,
+	0x0010, 0x0804, 0xa248, 0x00e6, 0x2071, 0x0240, 0x0006, 0x00f6,
+	0x2078, 0x7810, 0x00b6, 0x2058, 0xb8cc, 0xd084, 0x0120, 0x7848,
+	0x702a, 0x7844, 0x702e, 0x00be, 0x00fe, 0x000e, 0x00ee, 0x0005,
+	0x080c, 0x9ca3, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e,
+	0x60c3, 0x0008, 0x0804, 0xa248, 0x0021, 0x60c3, 0x0000, 0x0804,
+	0xa248, 0x00d6, 0x080c, 0xab2c, 0xb810, 0x9085, 0x0300, 0x7002,
+	0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e,
+	0x7013, 0x0819, 0x080c, 0xa236, 0x721a, 0x2f10, 0x7222, 0x7a08,
+	0x7226, 0x2071, 0x024c, 0x00de, 0x0005, 0x00a9, 0x7914, 0x712a,
+	0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026, 0x080c, 0x2ba7, 0x0228,
+	0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x080c, 0xa26b,
+	0x080c, 0x8559, 0x0005, 0x0036, 0x0096, 0x00d6, 0x00e6, 0x7858,
+	0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294, 0xfffd, 0xaa7e, 0xaa80,
+	0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff, 0xab74, 0x9384,
+	0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384, 0xff00, 0x9215, 0xaa76,
+	0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069, 0x0200, 0x080c,
+	0xab2c, 0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000a,
+	0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x4003, 0x60a3,
+	0x0035, 0xaa68, 0x9294, 0x7000, 0x9286, 0x3000, 0x0110, 0x60a3,
+	0x0037, 0x00ee, 0x00de, 0x009e, 0x003e, 0x0005, 0x900e, 0x7814,
+	0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084, 0x0003, 0x11a8,
+	0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824, 0xd0cc, 0x1168,
+	0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001, 0x180c, 0x200c,
+	0xc1d5, 0x2102, 0x2009, 0x19b1, 0x210c, 0x009e, 0x918d, 0x0092,
+	0x0010, 0x2009, 0x0096, 0x60ab, 0x0036, 0x6116, 0x0005, 0x2009,
+	0x0009, 0x00a0, 0x2009, 0x000a, 0x0088, 0x2009, 0x000b, 0x0070,
+	0x2009, 0x000c, 0x0058, 0x2009, 0x000d, 0x0040, 0x2009, 0x000e,
+	0x0028, 0x2009, 0x000f, 0x0010, 0x2009, 0x0008, 0x6912, 0x0005,
+	0x080c, 0x9c61, 0x0016, 0x0026, 0x0096, 0x00d6, 0x7814, 0x2048,
+	0x7013, 0x0138, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1138,
+	0x2001, 0x197b, 0x2004, 0x9086, 0xaaaa, 0x1904, 0xabd1, 0x7003,
+	0x5400, 0x00c6, 0x2061, 0x1800, 0x607c, 0x9084, 0x00ff, 0xa998,
+	0x810f, 0x918c, 0xff00, 0x9105, 0x700a, 0x6080, 0x700e, 0xa998,
+	0x918c, 0xff00, 0x7112, 0x20a9, 0x0004, 0x2009, 0x1805, 0x2e10,
+	0x9290, 0x0006, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xab62,
+	0x20a9, 0x0004, 0x2009, 0x1801, 0x2104, 0x2012, 0x8108, 0x8210,
+	0x1f04, 0xab6c, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098,
+	0x2009, 0x0006, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210,
+	0x8109, 0x1dc0, 0x00d6, 0x2069, 0x0200, 0x080c, 0xab17, 0x00de,
+	0x2071, 0x0240, 0x2011, 0x0240, 0x2009, 0x0002, 0x20a9, 0x0001,
+	0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x2009, 0x0008,
+	0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0,
+	0xa85c, 0x9080, 0x0031, 0x2098, 0x2009, 0x0008, 0x20a9, 0x0001,
+	0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x00ce, 0x60c3,
+	0x004c, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x2001, 0x1837, 0x2004,
+	0x9084, 0x0028, 0x1168, 0x080c, 0x73a5, 0x0150, 0x6028, 0xc0bd,
+	0x602a, 0x6014, 0x9084, 0x1804, 0x9085, 0x0029, 0x6016, 0x0010,
+	0x080c, 0xa248, 0x080c, 0x8559, 0x00de, 0x009e, 0x002e, 0x001e,
+	0x0005, 0x00e6, 0x2071, 0x0240, 0x2001, 0x2200, 0x9085, 0x00ff,
+	0x7002, 0x7007, 0xffff, 0x2071, 0x0100, 0x709b, 0x00ff, 0x00ee,
+	0x0804, 0xab47, 0x080c, 0x9c61, 0x0016, 0x0026, 0x0096, 0x00d6,
+	0x7814, 0x2048, 0x7013, 0x0138, 0x7003, 0x5500, 0x00c6, 0xa89c,
+	0x9084, 0x00ff, 0xa998, 0x810f, 0x918c, 0xff00, 0x9105, 0x700a,
+	0xa99c, 0x918c, 0xff00, 0xa8a0, 0x9084, 0x00ff, 0x9105, 0x700e,
+	0xa998, 0x918c, 0xff00, 0x2061, 0x1800, 0x607c, 0x9084, 0x00ff,
+	0x910d, 0x7112, 0x6180, 0x7116, 0x2009, 0x0008, 0xa860, 0x20e0,
+	0xa85c, 0x9080, 0x0029, 0x2098, 0x2e10, 0x9290, 0x0006, 0x20a9,
+	0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x20a9,
+	0x0004, 0x2009, 0x1805, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04,
+	0xac23, 0x20a9, 0x0002, 0x2009, 0x1801, 0x2104, 0x2012, 0x8108,
+	0x8210, 0x1f04, 0xac2d, 0x00d6, 0x0016, 0x2069, 0x0200, 0x080c,
+	0xab17, 0x001e, 0x00de, 0x2071, 0x0240, 0x20a9, 0x0002, 0x2009,
+	0x1803, 0x2011, 0x0240, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04,
+	0xac43, 0x2009, 0x0008, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109,
+	0x1dd0, 0x9006, 0x20a9, 0x0008, 0x2012, 0x8210, 0x1f04, 0xac54,
+	0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c,
+	0xa248, 0x080c, 0x8559, 0x00de, 0x009e, 0x002e, 0x001e, 0x0005,
+	0x00d6, 0x9290, 0x0018, 0x8214, 0x20e9, 0x0000, 0x2069, 0x0200,
+	0x6813, 0x0000, 0x22a8, 0x9284, 0x00e0, 0x0128, 0x20a9, 0x0020,
+	0x9292, 0x0020, 0x0008, 0x9016, 0x20a1, 0x0240, 0x9006, 0x4004,
+	0x82ff, 0x0120, 0x6810, 0x8000, 0x6812, 0x0c60, 0x00de, 0x0005,
+	0x00d6, 0x0096, 0x6014, 0x2048, 0xa878, 0x6056, 0x9006, 0xa836,
+	0xa83a, 0xa99c, 0xa946, 0xa84a, 0x6023, 0x0003, 0x6007, 0x0040,
+	0x6003, 0x0003, 0x600b, 0xffff, 0xa817, 0x0001, 0xa842, 0xa83e,
+	0x2900, 0xa85a, 0xa813, 0x2090, 0x080c, 0x913e, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x97b5, 0x012e, 0x009e, 0x00de, 0x0005, 0x00f6,
+	0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096, 0x0066, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x19e6, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904,
+	0xad3b, 0x7024, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005,
+	0x0904, 0xad0d, 0x080c, 0xa274, 0x68c3, 0x0000, 0x080c, 0xa7bd,
+	0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2cf1, 0x9006, 0x080c, 0x2cf1,
+	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
+	0x700c, 0x9c36, 0x1110, 0x660c, 0x760e, 0x7008, 0x9c36, 0x1140,
+	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000,
+	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
+	0x600f, 0x0000, 0x080c, 0xcd3f, 0x1180, 0x080c, 0x31ea, 0x080c,
+	0xcd50, 0x1518, 0x080c, 0xb824, 0x0400, 0x080c, 0xa7bd, 0x6824,
+	0xd084, 0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, 0xcd50, 0x1118,
+	0x080c, 0xb824, 0x0090, 0x6014, 0x2048, 0x080c, 0xcb48, 0x0168,
 	0x6020, 0x9086, 0x0003, 0x1520, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x080c, 0x6c81, 0x080c, 0xcd1e, 0x080c, 0xcfa2, 0x080c,
-	0xae92, 0x080c, 0xa692, 0x00ce, 0x0804, 0xacb3, 0x2c78, 0x600c,
-	0x2060, 0x0804, 0xacb3, 0x700f, 0x0000, 0x700b, 0x0000, 0x012e,
+	0x0000, 0x080c, 0x6c86, 0x080c, 0xcd33, 0x080c, 0xcfbc, 0x080c,
+	0xaea2, 0x080c, 0xa693, 0x00ce, 0x0804, 0xacbe, 0x2c78, 0x600c,
+	0x2060, 0x0804, 0xacbe, 0x700f, 0x0000, 0x700b, 0x0000, 0x012e,
 	0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005,
-	0x6020, 0x9086, 0x0006, 0x1d08, 0x080c, 0xe551, 0x08f0, 0x00d6,
-	0x0156, 0x080c, 0x9cab, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100,
+	0x6020, 0x9086, 0x0006, 0x1d08, 0x080c, 0xe572, 0x08f0, 0x00d6,
+	0x0156, 0x080c, 0x9cac, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100,
 	0x700b, 0x0003, 0x60c3, 0x0008, 0x0490, 0x7003, 0x0200, 0x7007,
 	0x0000, 0x2069, 0x1800, 0x901e, 0x6800, 0x9086, 0x0004, 0x1110,
-	0xc38d, 0x0060, 0x080c, 0x73bc, 0x1110, 0xc3ad, 0x0008, 0xc3a5,
+	0xc38d, 0x0060, 0x080c, 0x73a5, 0x1110, 0xc3ad, 0x0008, 0xc3a5,
 	0x6adc, 0xd29c, 0x1110, 0xd2ac, 0x0108, 0xc39d, 0x730e, 0x080c,
-	0x85d9, 0x20a9, 0x0006, 0x2011, 0xfff4, 0x2019, 0xfff5, 0x2071,
+	0x85c2, 0x20a9, 0x0006, 0x2011, 0xfff4, 0x2019, 0xfff5, 0x2071,
 	0x0250, 0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398,
-	0x0002, 0x9290, 0x0002, 0x1f04, 0xad71, 0x60c3, 0x0020, 0x080c,
-	0xa247, 0x015e, 0x00de, 0x0005, 0x0156, 0x080c, 0x9cab, 0x7a14,
+	0x0002, 0x9290, 0x0002, 0x1f04, 0xad81, 0x60c3, 0x0020, 0x080c,
+	0xa248, 0x015e, 0x00de, 0x0005, 0x0156, 0x080c, 0x9cac, 0x7a14,
 	0x82ff, 0x0168, 0x9286, 0xffff, 0x0118, 0x9282, 0x000e, 0x1238,
 	0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0488, 0x7003,
-	0x0200, 0x7007, 0x001c, 0x700f, 0x0001, 0x2011, 0x19bd, 0x2204,
+	0x0200, 0x7007, 0x001c, 0x700f, 0x0001, 0x2011, 0x19bc, 0x2204,
 	0x8007, 0x701a, 0x8210, 0x2204, 0x8007, 0x701e, 0x0421, 0x1120,
 	0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x7022,
 	0x2001, 0x1820, 0x2004, 0x7026, 0x0030, 0x2001, 0x1818, 0x2004,
 	0x9084, 0x00ff, 0x7026, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099,
 	0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x60c3, 0x001c,
-	0x015e, 0x0804, 0xa247, 0x0006, 0x2001, 0x1837, 0x2004, 0xd0ac,
-	0x000e, 0x0005, 0x2011, 0x0003, 0x080c, 0xa653, 0x2011, 0x0002,
-	0x080c, 0xa65d, 0x080c, 0xa540, 0x0036, 0x901e, 0x080c, 0xa5b6,
-	0x003e, 0x0005, 0x080c, 0x331e, 0x0188, 0x0016, 0x00b6, 0x00c6,
-	0x7010, 0x9085, 0x0020, 0x7012, 0x2009, 0x007e, 0x080c, 0x65ff,
+	0x015e, 0x0804, 0xa248, 0x0006, 0x2001, 0x1837, 0x2004, 0xd0ac,
+	0x000e, 0x0005, 0x2011, 0x0003, 0x080c, 0xa654, 0x2011, 0x0002,
+	0x080c, 0xa65e, 0x080c, 0xa541, 0x0036, 0x901e, 0x080c, 0xa5b7,
+	0x003e, 0x0005, 0x080c, 0x3320, 0x0188, 0x0016, 0x00b6, 0x00c6,
+	0x7010, 0x9085, 0x0020, 0x7012, 0x2009, 0x007e, 0x080c, 0x6608,
 	0xb85c, 0xc0ac, 0xb85e, 0x00ce, 0x00be, 0x001e, 0x0005, 0x2071,
 	0x188d, 0x7000, 0x9005, 0x0140, 0x2001, 0x0976, 0x2071, 0x1800,
 	0x7076, 0x707a, 0x706b, 0xffe0, 0x2071, 0x1800, 0x7074, 0x7056,
@@ -5379,42 +5381,42 @@
 	0x601a, 0x6012, 0x6023, 0x0000, 0x6003, 0x0000, 0x601e, 0x6056,
 	0x605a, 0x6026, 0x602a, 0x602e, 0x6032, 0x6036, 0x603a, 0x603e,
 	0x6042, 0x602a, 0x2061, 0x1800, 0x6054, 0x8000, 0x6056, 0x9086,
-	0x0001, 0x0108, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x968d,
+	0x0001, 0x0108, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x9687,
 	0x012e, 0x0cc0, 0x0006, 0x6000, 0x9086, 0x0000, 0x01b0, 0x601c,
-	0xd084, 0x190c, 0x1a5e, 0x6017, 0x0000, 0x6023, 0x0007, 0x2001,
-	0x1986, 0x2004, 0x0006, 0x9082, 0x0051, 0x000e, 0x0208, 0x8004,
-	0x601a, 0x080c, 0xe80b, 0x6043, 0x0000, 0x000e, 0x0005, 0x00e6,
+	0xd084, 0x190c, 0x1a60, 0x6017, 0x0000, 0x6023, 0x0007, 0x2001,
+	0x1985, 0x2004, 0x0006, 0x9082, 0x0051, 0x000e, 0x0208, 0x8004,
+	0x601a, 0x080c, 0xe82c, 0x6043, 0x0000, 0x000e, 0x0005, 0x00e6,
 	0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7554, 0x9582, 0x0001,
 	0x0608, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0,
 	0x0018, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98,
 	0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x0018, 0x7068, 0x9502,
 	0x1230, 0x755a, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x705b,
 	0x1cd0, 0x0cc0, 0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f, 0x0002,
-	0xaeef, 0xaef8, 0xaf13, 0xaf2e, 0xd256, 0xd273, 0xd28e, 0xaeef,
-	0xaef8, 0x8d8b, 0xaf4a, 0xaeef, 0xaeef, 0xaeef, 0xaeef, 0x9186,
-	0x0013, 0x1128, 0x080c, 0x9588, 0x080c, 0x968d, 0x0005, 0x0005,
+	0xaeff, 0xaf08, 0xaf23, 0xaf3e, 0xd270, 0xd28d, 0xd2a8, 0xaeff,
+	0xaf08, 0x8d74, 0xaf5a, 0xaeff, 0xaeff, 0xaeff, 0xaeff, 0x9186,
+	0x0013, 0x1128, 0x080c, 0x957b, 0x080c, 0x9687, 0x0005, 0x0005,
 	0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dd5, 0x0013, 0x006e,
-	0x0005, 0xaf11, 0xb67f, 0xb85a, 0xaf11, 0xb8f0, 0xb22d, 0xaf11,
-	0xaf11, 0xb601, 0xbe55, 0xaf11, 0xaf11, 0xaf11, 0xaf11, 0xaf11,
-	0xaf11, 0x080c, 0x0dd5, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
-	0x0dd5, 0x0013, 0x006e, 0x0005, 0xaf2c, 0xc529, 0xaf2c, 0xaf2c,
-	0xaf2c, 0xaf2c, 0xaf2c, 0xaf2c, 0xc4ce, 0xc6ab, 0xaf2c, 0xc56a,
-	0xc5e9, 0xc56a, 0xc5e9, 0xaf2c, 0x080c, 0x0dd5, 0x6000, 0x9082,
-	0x0016, 0x1a0c, 0x0dd5, 0x6000, 0x0002, 0xaf48, 0xbe9c, 0xbf81,
-	0xc0b1, 0xc25c, 0xaf48, 0xaf48, 0xaf48, 0xbe70, 0xc45a, 0xc45d,
-	0xaf48, 0xaf48, 0xaf48, 0xaf48, 0xc48c, 0xaf48, 0xaf48, 0xaf48,
+	0x0005, 0xaf21, 0xb690, 0xb86b, 0xaf21, 0xb901, 0xb23d, 0xaf21,
+	0xaf21, 0xb612, 0xbe68, 0xaf21, 0xaf21, 0xaf21, 0xaf21, 0xaf21,
+	0xaf21, 0x080c, 0x0dd5, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
+	0x0dd5, 0x0013, 0x006e, 0x0005, 0xaf3c, 0xc53c, 0xaf3c, 0xaf3c,
+	0xaf3c, 0xaf3c, 0xaf3c, 0xaf3c, 0xc4e1, 0xc6be, 0xaf3c, 0xc57d,
+	0xc5fc, 0xc57d, 0xc5fc, 0xaf3c, 0x080c, 0x0dd5, 0x6000, 0x9082,
+	0x0016, 0x1a0c, 0x0dd5, 0x6000, 0x0002, 0xaf58, 0xbeaf, 0xbf94,
+	0xc0c4, 0xc26f, 0xaf58, 0xaf58, 0xaf58, 0xbe83, 0xc46d, 0xc470,
+	0xaf58, 0xaf58, 0xaf58, 0xaf58, 0xc49f, 0xaf58, 0xaf58, 0xaf58,
 	0x080c, 0x0dd5, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dd5,
-	0x0013, 0x006e, 0x0005, 0xaf63, 0xaf63, 0xafa6, 0xb045, 0xb0da,
-	0xaf63, 0xaf63, 0xaf63, 0xaf65, 0xaf63, 0xaf63, 0xaf63, 0xaf63,
-	0xaf63, 0xaf63, 0xaf63, 0x080c, 0x0dd5, 0x9186, 0x004c, 0x0588,
+	0x0013, 0x006e, 0x0005, 0xaf73, 0xaf73, 0xafb6, 0xb055, 0xb0ea,
+	0xaf73, 0xaf73, 0xaf73, 0xaf75, 0xaf73, 0xaf73, 0xaf73, 0xaf73,
+	0xaf73, 0xaf73, 0xaf73, 0x080c, 0x0dd5, 0x9186, 0x004c, 0x0588,
 	0x9186, 0x0003, 0x190c, 0x0dd5, 0x0096, 0x601c, 0xc0ed, 0x601e,
 	0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa87c, 0x9084, 0xa000,
 	0xc0b5, 0xa87e, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0x9006, 0xa836,
 	0xa83a, 0xa884, 0x9092, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003,
-	0x8013, 0x8213, 0x9210, 0x621a, 0x009e, 0x2c10, 0x080c, 0x1bad,
-	0x080c, 0x9155, 0x0126, 0x2091, 0x8000, 0x080c, 0x97b9, 0x012e,
+	0x8013, 0x8213, 0x9210, 0x621a, 0x009e, 0x2c10, 0x080c, 0x1baf,
+	0x080c, 0x913e, 0x0126, 0x2091, 0x8000, 0x080c, 0x97b5, 0x012e,
 	0x0005, 0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c,
-	0xb0fc, 0x080c, 0xd248, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096,
+	0xb10c, 0x080c, 0xd262, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096,
 	0x00f6, 0x2079, 0x1800, 0x7a90, 0x6014, 0x2048, 0xa87c, 0xd0ec,
 	0x1110, 0x9290, 0x0018, 0xac78, 0xc4fc, 0x0046, 0xa8e0, 0x9005,
 	0x1140, 0xa8dc, 0x921a, 0x0140, 0x0220, 0xa87b, 0x0007, 0x2010,
@@ -5423,56 +5425,56 @@
 	0x00f6, 0x2400, 0x9005, 0x1108, 0x009a, 0x2100, 0x9086, 0x0015,
 	0x1118, 0x2001, 0x0001, 0x0038, 0x2100, 0x9086, 0x0016, 0x0118,
 	0x2001, 0x0001, 0x002a, 0x94a4, 0x0007, 0x8423, 0x9405, 0x0002,
-	0xb00d, 0xb00d, 0xb008, 0xb00b, 0xb00d, 0xb005, 0xaff8, 0xaff8,
-	0xaff8, 0xaff8, 0xaff8, 0xaff8, 0xaff8, 0xaff8, 0xaff8, 0xaff8,
+	0xb01d, 0xb01d, 0xb018, 0xb01b, 0xb01d, 0xb015, 0xb008, 0xb008,
+	0xb008, 0xb008, 0xb008, 0xb008, 0xb008, 0xb008, 0xb008, 0xb008,
 	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e, 0x000e, 0x004e,
-	0x00fe, 0x009e, 0x00de, 0x080c, 0x0dd5, 0x080c, 0xbaad, 0x0028,
-	0x080c, 0xbb92, 0x0010, 0x080c, 0xbc88, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0xb1ba,
+	0x00fe, 0x009e, 0x00de, 0x080c, 0x0dd5, 0x080c, 0xbac0, 0x0028,
+	0x080c, 0xbba5, 0x0010, 0x080c, 0xbc9b, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0xb1ca,
 	0x0530, 0xa804, 0xa80e, 0x00a6, 0x2050, 0xb100, 0x00ae, 0x8006,
 	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002,
 	0xaacc, 0xabd0, 0xacd4, 0xadd8, 0x2031, 0x0000, 0x2041, 0x125d,
-	0x080c, 0xb37a, 0x0160, 0x000e, 0x9005, 0x0120, 0x00fe, 0x009e,
-	0x00de, 0x0005, 0x00fe, 0x009e, 0x00de, 0x0804, 0xae61, 0x2001,
-	0x002c, 0x900e, 0x080c, 0xb220, 0x0c70, 0x91b6, 0x0015, 0x0170,
+	0x080c, 0xb38b, 0x0160, 0x000e, 0x9005, 0x0120, 0x00fe, 0x009e,
+	0x00de, 0x0005, 0x00fe, 0x009e, 0x00de, 0x0804, 0xae71, 0x2001,
+	0x002c, 0x900e, 0x080c, 0xb230, 0x0c70, 0x91b6, 0x0015, 0x0170,
 	0x91b6, 0x0016, 0x0158, 0x91b2, 0x0047, 0x0a0c, 0x0dd5, 0x91b2,
 	0x0050, 0x1a0c, 0x0dd5, 0x9182, 0x0047, 0x00ca, 0x2001, 0x0109,
 	0x2004, 0xd08c, 0x0198, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016,
-	0x0026, 0x080c, 0x90a2, 0x002e, 0x001e, 0x000e, 0x012e, 0xa001,
-	0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0xafa6, 0x0005, 0xb078,
-	0xb078, 0xb07a, 0xb0b0, 0xb078, 0xb078, 0xb078, 0xb078, 0xb0c3,
-	0x080c, 0x0dd5, 0x00d6, 0x0016, 0x0096, 0x080c, 0x963d, 0x080c,
-	0x97b9, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc, 0x01c0,
+	0x0026, 0x080c, 0x908b, 0x002e, 0x001e, 0x000e, 0x012e, 0xa001,
+	0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0xafb6, 0x0005, 0xb088,
+	0xb088, 0xb08a, 0xb0c0, 0xb088, 0xb088, 0xb088, 0xb088, 0xb0d3,
+	0x080c, 0x0dd5, 0x00d6, 0x0016, 0x0096, 0x080c, 0x9637, 0x080c,
+	0x97b5, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc, 0x01c0,
 	0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, 0x9005, 0x0140, 0x2001,
-	0x0000, 0x900e, 0x080c, 0xb220, 0x080c, 0xae61, 0x00a8, 0x6003,
+	0x0000, 0x900e, 0x080c, 0xb230, 0x080c, 0xae71, 0x00a8, 0x6003,
 	0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, 0xa8ae, 0xa8b2, 0x0c78,
 	0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, 0xa8ae, 0xa8a8, 0xa8b2,
 	0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, 0x001e, 0x00de, 0x0005,
-	0x080c, 0x963d, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xcb35,
-	0x0120, 0xa87b, 0x0006, 0x080c, 0x6c81, 0x009e, 0x00de, 0x080c,
-	0xae61, 0x0804, 0x97b9, 0x080c, 0x963d, 0x080c, 0x31bf, 0x080c,
-	0xd245, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xcb35, 0x0120,
-	0xa87b, 0x0029, 0x080c, 0x6c81, 0x009e, 0x00de, 0x080c, 0xae61,
-	0x0804, 0x97b9, 0x9182, 0x0047, 0x0002, 0xb0ea, 0xb0ec, 0xb0ea,
-	0xb0ea, 0xb0ea, 0xb0ea, 0xb0ea, 0xb0ea, 0xb0ea, 0xb0ea, 0xb0ea,
-	0xb0ea, 0xb0ec, 0x080c, 0x0dd5, 0x00d6, 0x0096, 0x601f, 0x0000,
-	0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, 0x080c, 0x6c81,
-	0x009e, 0x00de, 0x0804, 0xae61, 0x0026, 0x0036, 0x0056, 0x0066,
+	0x080c, 0x9637, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xcb4a,
+	0x0120, 0xa87b, 0x0006, 0x080c, 0x6c86, 0x009e, 0x00de, 0x080c,
+	0xae71, 0x0804, 0x97b5, 0x080c, 0x9637, 0x080c, 0x31c1, 0x080c,
+	0xd25f, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xcb4a, 0x0120,
+	0xa87b, 0x0029, 0x080c, 0x6c86, 0x009e, 0x00de, 0x080c, 0xae71,
+	0x0804, 0x97b5, 0x9182, 0x0047, 0x0002, 0xb0fa, 0xb0fc, 0xb0fa,
+	0xb0fa, 0xb0fa, 0xb0fa, 0xb0fa, 0xb0fa, 0xb0fa, 0xb0fa, 0xb0fa,
+	0xb0fa, 0xb0fc, 0x080c, 0x0dd5, 0x00d6, 0x0096, 0x601f, 0x0000,
+	0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, 0x080c, 0x6c86,
+	0x009e, 0x00de, 0x0804, 0xae71, 0x0026, 0x0036, 0x0056, 0x0066,
 	0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, 0x0fff, 0x000e, 0x090c,
 	0x0dd5, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e,
 	0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, 0x1800, 0x7990, 0x9188,
 	0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, 0x2950, 0x00a6, 0x2001,
 	0x0205, 0x2003, 0x0000, 0x901e, 0x2029, 0x0001, 0x9182, 0x0034,
-	0x1228, 0x2011, 0x001f, 0x080c, 0xc730, 0x04c0, 0x2130, 0x2009,
-	0x0034, 0x2011, 0x001f, 0x080c, 0xc730, 0x96b2, 0x0034, 0xb004,
+	0x1228, 0x2011, 0x001f, 0x080c, 0xc743, 0x04c0, 0x2130, 0x2009,
+	0x0034, 0x2011, 0x001f, 0x080c, 0xc743, 0x96b2, 0x0034, 0xb004,
 	0x904d, 0x0110, 0x080c, 0x0fb1, 0x080c, 0x0fff, 0x01d0, 0x8528,
 	0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d,
-	0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xc730, 0x00b8, 0x96b2,
-	0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x080c, 0xc730,
+	0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xc743, 0x00b8, 0x96b2,
+	0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x080c, 0xc743,
 	0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad,
 	0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, 0x0048, 0x2001, 0x0205,
 	0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566, 0x2a48,
-	0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6c81, 0x000e, 0x2048,
+	0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6c86, 0x000e, 0x2048,
 	0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, 0x006e, 0x005e, 0x003e,
 	0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, 0x0006, 0x080c, 0x0fff,
 	0x000e, 0x090c, 0x0dd5, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019,
@@ -5480,7 +5482,7 @@
 	0x1800, 0x7990, 0x810c, 0x9188, 0x000c, 0x9182, 0x001a, 0x0210,
 	0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, 0xac76, 0x2e98, 0xa85c,
 	0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080,
-	0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6c81, 0x009e, 0x00fe,
+	0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6c86, 0x009e, 0x00fe,
 	0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, 0x0096, 0x0016, 0x2001,
 	0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x001e, 0x2079, 0x0200,
 	0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, 0x000c, 0x2098, 0x2021,
@@ -5492,2049 +5494,2051 @@
 	0x2400, 0x9202, 0x2410, 0x9318, 0x9006, 0x2020, 0x22a8, 0xa800,
 	0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, 0x83ff, 0x0180, 0x3300,
 	0x9086, 0x0280, 0x1130, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816,
-	0x2e98, 0x2310, 0x84ff, 0x0904, 0xb1cf, 0x0804, 0xb1d1, 0x9085,
+	0x2e98, 0x2310, 0x84ff, 0x0904, 0xb1df, 0x0804, 0xb1e1, 0x9085,
 	0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, 0x00de, 0x001e, 0x0005,
 	0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x080c,
-	0x6c75, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015, 0x1118,
-	0x080c, 0xae61, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0dd5, 0x080c,
-	0xae61, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98, 0x6014,
+	0x6c7a, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015, 0x1118,
+	0x080c, 0xae71, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0dd5, 0x080c,
+	0xae71, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98, 0x6014,
 	0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x20a0, 0x009e, 0x4003,
-	0x0136, 0x9080, 0x001b, 0x2011, 0x0006, 0x20a9, 0x0001, 0x3418,
-	0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211, 0x1db8,
-	0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398, 0x4003,
-	0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c, 0xcb35,
-	0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0x009e,
-	0x0804, 0xae61, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386, 0x0200,
-	0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8cf, 0x0000, 0x00be, 0x6014,
-	0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xab32,
-	0x080c, 0xae61, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011, 0x1d48,
-	0x0cc8, 0x0006, 0x0016, 0x080c, 0xd230, 0x0188, 0x6014, 0x9005,
-	0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x6043, 0x0000, 0x2009,
-	0x0022, 0x080c, 0xb657, 0x9006, 0x001e, 0x000e, 0x0005, 0x9085,
-	0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80, 0x000c,
-	0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0001,
-	0x2099, 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a, 0xa804,
-	0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003,
-	0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9, 0x0020,
-	0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867,
-	0x0103, 0x080c, 0xae61, 0x001e, 0x009e, 0x0005, 0x0096, 0x0016,
-	0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084, 0x00ff,
-	0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004, 0x9108,
-	0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048, 0x080c,
-	0xc730, 0x080c, 0xcb35, 0x0140, 0x6014, 0x2048, 0xa807, 0x0000,
-	0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xae61, 0x001e, 0x009e,
-	0x0005, 0x0016, 0x2009, 0x0000, 0x7030, 0x9086, 0x0200, 0x0110,
-	0x2009, 0x0001, 0x0096, 0x6014, 0x904d, 0x090c, 0x0dd5, 0xa97a,
-	0x080c, 0x6c81, 0x009e, 0x080c, 0xae61, 0x001e, 0x0005, 0x0016,
-	0x0096, 0x7030, 0x9086, 0x0100, 0x1118, 0x2009, 0x0004, 0x0010,
-	0x7034, 0x800c, 0x810b, 0x2011, 0x000c, 0x2019, 0x000c, 0x6014,
-	0x2048, 0xa804, 0x0096, 0x9005, 0x0108, 0x2048, 0x080c, 0xc730,
-	0x009e, 0x080c, 0xcb35, 0x0148, 0xa804, 0x9005, 0x1158, 0xa807,
-	0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xae61, 0x009e,
-	0x001e, 0x0005, 0x0086, 0x2040, 0xa030, 0x8007, 0x9086, 0x0100,
-	0x1118, 0x080c, 0xb813, 0x00e0, 0xa034, 0x8007, 0x800c, 0x8806,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x000c,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xaaa0, 0xab9c,
-	0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x1243, 0x0019, 0x0d08,
-	0x008e, 0x0898, 0x0096, 0x0006, 0x080c, 0x0fff, 0x000e, 0x01b0,
-	0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006, 0xae6a, 0x2800,
-	0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96, 0xad9a, 0x0086,
-	0x2940, 0x080c, 0x10e9, 0x008e, 0x9085, 0x0001, 0x009e, 0x0005,
-	0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6,
-	0x2258, 0xba10, 0x00be, 0x9206, 0x1520, 0x700c, 0x6210, 0x00b6,
-	0x2258, 0xba14, 0x00be, 0x9206, 0x11e0, 0x6043, 0x0000, 0x2c68,
-	0x0016, 0x2009, 0x0035, 0x080c, 0xd1a8, 0x001e, 0x1158, 0x622c,
-	0x2268, 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003, 0x0130, 0x9386,
-	0x0006, 0x0128, 0x080c, 0xae61, 0x0020, 0x0039, 0x0010, 0x080c,
-	0xb48c, 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096, 0x6814, 0x2048,
-	0x9186, 0x0015, 0x0904, 0xb474, 0x918e, 0x0016, 0x1904, 0xb48a,
-	0x700c, 0x908c, 0xff00, 0x9186, 0x1700, 0x0120, 0x9186, 0x0300,
-	0x1904, 0xb44e, 0x89ff, 0x1138, 0x6800, 0x9086, 0x000f, 0x0904,
-	0xb431, 0x0804, 0xb488, 0x6808, 0x9086, 0xffff, 0x1904, 0xb476,
-	0xa87c, 0x9084, 0x0060, 0x9086, 0x0020, 0x1128, 0xa83c, 0xa940,
-	0x9105, 0x1904, 0xb476, 0x6824, 0xd0b4, 0x1904, 0xb476, 0x080c,
-	0xcd1e, 0x685c, 0xa882, 0xa87c, 0xc0dc, 0xc0f4, 0xc0d4, 0xa87e,
-	0x0026, 0x900e, 0x6a18, 0x2001, 0x000a, 0x080c, 0x8f68, 0xa884,
-	0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff, 0x002e, 0x1138, 0x00c6,
-	0x2d60, 0x080c, 0xc85a, 0x00ce, 0x0804, 0xb488, 0x00c6, 0xa868,
-	0xd0fc, 0x1118, 0x080c, 0x60ae, 0x0010, 0x080c, 0x64b4, 0x00ce,
-	0x1904, 0xb476, 0x00c6, 0x2d60, 0x080c, 0xae61, 0x00ce, 0x0804,
-	0xb488, 0x00c6, 0x080c, 0xaeaf, 0x0198, 0x6017, 0x0000, 0x6810,
-	0x6012, 0x080c, 0xcfaa, 0x6023, 0x0003, 0x6904, 0x00c6, 0x2d60,
-	0x080c, 0xae61, 0x00ce, 0x080c, 0xaedc, 0x00ce, 0x0804, 0xb488,
-	0x2001, 0x1988, 0x2004, 0x6842, 0x00ce, 0x04d0, 0x7008, 0x9086,
-	0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900, 0xc1bc, 0xb902,
-	0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c, 0xd1ea, 0x6007,
-	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x90f0, 0x080c,
-	0x968d, 0x00ce, 0x00e8, 0x700c, 0x9086, 0x2a00, 0x1138, 0x2001,
-	0x1988, 0x2004, 0x6842, 0x00a0, 0x0479, 0x00a0, 0x89ff, 0x090c,
-	0x0dd5, 0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103, 0xa87b, 0x0003,
-	0x080c, 0x6a9d, 0x080c, 0xcd1e, 0x080c, 0xae92, 0x00de, 0x00ce,
-	0x080c, 0xae61, 0x009e, 0x0005, 0x9186, 0x0015, 0x1128, 0x2001,
-	0x1988, 0x2004, 0x6842, 0x0068, 0x918e, 0x0016, 0x1160, 0x00c6,
-	0x2d00, 0x2060, 0x080c, 0xe80b, 0x080c, 0x86b2, 0x080c, 0xae61,
-	0x00ce, 0x080c, 0xae61, 0x0005, 0x0026, 0x0036, 0x0046, 0x7228,
-	0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001, 0x1988, 0x2004, 0x6842,
-	0x0804, 0xb506, 0x00c6, 0x2d60, 0x080c, 0xc75b, 0x00ce, 0x6804,
-	0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060, 0x6003, 0x0001,
-	0x6007, 0x0050, 0x080c, 0x90f0, 0x080c, 0x968d, 0x00ce, 0x04f0,
-	0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff, 0x090c, 0x0dd5, 0x6800,
-	0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac, 0x0178, 0xa843, 0x0fff,
-	0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882, 0x2001, 0x0001, 0x6832,
-	0x0400, 0x2001, 0x0007, 0x6832, 0x00e0, 0xa87c, 0xd0b4, 0x1150,
-	0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48, 0xa838, 0xa934, 0x9105,
-	0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024, 0x9306, 0x1118, 0x7020,
-	0x9406, 0x0d38, 0x7020, 0x683e, 0x7024, 0x683a, 0x2001, 0x0005,
-	0x6832, 0x080c, 0xcea1, 0x080c, 0x968d, 0x0010, 0x080c, 0xae61,
-	0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008,
-	0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206,
-	0x1904, 0xb571, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be,
-	0x9206, 0x1904, 0xb571, 0x6038, 0x2068, 0x6824, 0xc0dc, 0x6826,
-	0x6a20, 0x9286, 0x0007, 0x0904, 0xb571, 0x9286, 0x0002, 0x0904,
-	0xb571, 0x9286, 0x0000, 0x05e8, 0x6808, 0x633c, 0x9306, 0x15c8,
-	0x2071, 0x026c, 0x9186, 0x0015, 0x0570, 0x918e, 0x0016, 0x1100,
-	0x00c6, 0x6038, 0x2060, 0x6104, 0x9186, 0x004b, 0x01c0, 0x9186,
-	0x004c, 0x01a8, 0x9186, 0x004d, 0x0190, 0x9186, 0x004e, 0x0178,
-	0x9186, 0x0052, 0x0160, 0x6014, 0x0096, 0x2048, 0x080c, 0xcb35,
-	0x090c, 0x0dd5, 0xa87b, 0x0003, 0x009e, 0x080c, 0xd1ea, 0x6007,
-	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x90f0, 0x080c,
-	0x968d, 0x00ce, 0x0030, 0x6038, 0x2070, 0x2001, 0x1988, 0x2004,
-	0x7042, 0x080c, 0xae61, 0x002e, 0x00de, 0x00ee, 0x0005, 0x00b6,
-	0x0096, 0x00f6, 0x6014, 0x2048, 0x6010, 0x2058, 0x91b6, 0x0015,
-	0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c, 0xbc02, 0x0460, 0x0096,
-	0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0010, 0x2019, 0x000a,
-	0x20a9, 0x0004, 0x080c, 0xbe1d, 0x002e, 0x003e, 0x015e, 0x009e,
-	0x1904, 0xb5e0, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90,
-	0x0014, 0x2019, 0x0006, 0x20a9, 0x0004, 0x080c, 0xbe1d, 0x002e,
-	0x003e, 0x015e, 0x009e, 0x15a0, 0x7238, 0xba0a, 0x733c, 0xbb0e,
-	0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe, 0x009e,
-	0x00be, 0x0804, 0xb265, 0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a,
-	0x009e, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4,
-	0x2031, 0x0000, 0x2041, 0x1243, 0x080c, 0xb37a, 0x0130, 0x00fe,
-	0x009e, 0x080c, 0xae61, 0x00be, 0x0005, 0x080c, 0xb813, 0x0cb8,
-	0x2b78, 0x00f6, 0x080c, 0x31bf, 0x080c, 0xd245, 0x00fe, 0x00c6,
-	0x080c, 0xae0b, 0x2f00, 0x6012, 0x6017, 0x0000, 0x6023, 0x0001,
-	0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x080c, 0x654f,
-	0x080c, 0x657b, 0x080c, 0x9138, 0x080c, 0x968d, 0x00ce, 0x0804,
-	0xb5b3, 0x2100, 0x91b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b2, 0x0040,
-	0x1a04, 0xb669, 0x0002, 0xb657, 0xb657, 0xb64d, 0xb657, 0xb657,
-	0xb657, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b,
-	0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b,
-	0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b,
-	0xb64b, 0xb64b, 0xb657, 0xb64b, 0xb657, 0xb657, 0xb64b, 0xb64b,
-	0xb64b, 0xb64b, 0xb64b, 0xb64d, 0xb64b, 0xb64b, 0xb64b, 0xb64b,
-	0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb657, 0xb657, 0xb64b,
-	0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b, 0xb64b,
-	0xb657, 0xb64b, 0xb64b, 0x080c, 0x0dd5, 0x0066, 0x00b6, 0x6610,
-	0x2658, 0xb8cc, 0xc08c, 0xb8ce, 0x00be, 0x006e, 0x0000, 0x6003,
-	0x0001, 0x6106, 0x9186, 0x0032, 0x0118, 0x080c, 0x9138, 0x0010,
-	0x080c, 0x90f0, 0x0126, 0x2091, 0x8000, 0x080c, 0x968d, 0x012e,
-	0x0005, 0x2600, 0x0002, 0xb657, 0xb657, 0xb67d, 0xb657, 0xb657,
-	0xb67d, 0xb67d, 0xb67d, 0xb67d, 0xb657, 0xb67d, 0xb657, 0xb67d,
-	0xb657, 0xb67d, 0xb67d, 0xb67d, 0xb67d, 0x080c, 0x0dd5, 0x6004,
-	0x90b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b6, 0x0013, 0x0904, 0xb741,
-	0x91b6, 0x0027, 0x1904, 0xb6fc, 0x080c, 0x9588, 0x6004, 0x080c,
-	0xcd2a, 0x01b0, 0x080c, 0xcd3b, 0x01a8, 0x908e, 0x0021, 0x0904,
-	0xb6f9, 0x908e, 0x0022, 0x1130, 0x080c, 0xb291, 0x0904, 0xb6f5,
-	0x0804, 0xb6f6, 0x908e, 0x003d, 0x0904, 0xb6f9, 0x0804, 0xb6ef,
-	0x080c, 0x31e8, 0x2001, 0x0007, 0x080c, 0x654f, 0x6010, 0x00b6,
-	0x2058, 0xb9a0, 0x00be, 0x080c, 0xb813, 0x9186, 0x007e, 0x1148,
-	0x2001, 0x1837, 0x2014, 0xc285, 0x080c, 0x73bc, 0x1108, 0xc2ad,
-	0x2202, 0x0036, 0x0026, 0x2019, 0x0028, 0x2110, 0x080c, 0xe917,
-	0x002e, 0x003e, 0x0016, 0x0026, 0x0036, 0x2110, 0x2019, 0x0028,
-	0x080c, 0x928b, 0x0076, 0x903e, 0x080c, 0x9168, 0x6010, 0x00b6,
-	0x905d, 0x0100, 0x00be, 0x2c08, 0x080c, 0xe2eb, 0x007e, 0x003e,
-	0x002e, 0x001e, 0x080c, 0xd245, 0x0016, 0x080c, 0xcfa2, 0x080c,
-	0xae61, 0x001e, 0x080c, 0x32bb, 0x080c, 0x968d, 0x0030, 0x080c,
-	0xcfa2, 0x080c, 0xae61, 0x080c, 0x968d, 0x0005, 0x080c, 0xb813,
-	0x0cb0, 0x080c, 0xb84f, 0x0c98, 0x9186, 0x0014, 0x1db0, 0x080c,
-	0x9588, 0x6004, 0x908e, 0x0022, 0x1118, 0x080c, 0xb291, 0x0d68,
-	0x080c, 0x31bf, 0x080c, 0xd245, 0x080c, 0xcd2a, 0x1190, 0x080c,
-	0x31e8, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xb813,
-	0x9186, 0x007e, 0x1128, 0x2001, 0x1837, 0x200c, 0xc185, 0x2102,
-	0x0870, 0x080c, 0xcd3b, 0x1118, 0x080c, 0xb813, 0x0840, 0x6004,
-	0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079,
-	0x0000, 0x080c, 0x3556, 0x00fe, 0x00ee, 0x0804, 0xb6ef, 0x6004,
-	0x908e, 0x0021, 0x0d48, 0x908e, 0x0022, 0x090c, 0xb813, 0x0804,
-	0xb6ef, 0x90b2, 0x0040, 0x1a04, 0xb7ef, 0x2008, 0x0002, 0xb789,
-	0xb78a, 0xb78d, 0xb790, 0xb793, 0xb796, 0xb787, 0xb787, 0xb787,
-	0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787,
-	0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787,
-	0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb799, 0xb7a4, 0xb787,
-	0xb7a6, 0xb7a4, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb7a4,
-	0xb7a4, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787, 0xb787,
-	0xb787, 0xb7d6, 0xb7a4, 0xb787, 0xb7a0, 0xb787, 0xb787, 0xb787,
-	0xb7a1, 0xb787, 0xb787, 0xb787, 0xb7a4, 0xb7cd, 0xb787, 0x080c,
-	0x0dd5, 0x00d0, 0x2001, 0x000b, 0x0410, 0x2001, 0x0003, 0x00f8,
-	0x2001, 0x0005, 0x00e0, 0x2001, 0x0001, 0x00c8, 0x2001, 0x0009,
-	0x00b0, 0x080c, 0x9588, 0x6003, 0x0005, 0x080c, 0x968d, 0x0070,
-	0x0018, 0x0010, 0x080c, 0x654f, 0x0804, 0xb7e7, 0x080c, 0x9588,
-	0x080c, 0xd248, 0x6003, 0x0004, 0x080c, 0x968d, 0x0005, 0x080c,
-	0x654f, 0x080c, 0x9588, 0x6003, 0x0002, 0x0036, 0x2019, 0x1852,
-	0x2304, 0x9084, 0xff00, 0x1120, 0x2001, 0x1986, 0x201c, 0x0040,
-	0x8007, 0x909a, 0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b, 0x9318,
-	0x631a, 0x003e, 0x080c, 0x968d, 0x0c08, 0x080c, 0x9588, 0x080c,
-	0xcfa2, 0x080c, 0xae61, 0x080c, 0x968d, 0x08c0, 0x00e6, 0x00f6,
-	0x2071, 0x189e, 0x2079, 0x0000, 0x080c, 0x3556, 0x00fe, 0x00ee,
-	0x080c, 0x9588, 0x080c, 0xae61, 0x080c, 0x968d, 0x0838, 0x080c,
-	0x9588, 0x6003, 0x0002, 0x080c, 0xd248, 0x0804, 0x968d, 0x2600,
-	0x2008, 0x0002, 0xb806, 0xb7e7, 0xb804, 0xb7e7, 0xb7e7, 0xb804,
-	0xb804, 0xb804, 0xb804, 0xb7e7, 0xb804, 0xb7e7, 0xb804, 0xb7e7,
-	0xb804, 0xb804, 0xb804, 0xb804, 0x080c, 0x0dd5, 0x080c, 0x9588,
-	0x0096, 0x6014, 0x2048, 0x080c, 0x6c81, 0x009e, 0x080c, 0xae61,
-	0x080c, 0x968d, 0x0005, 0x00e6, 0x0096, 0x0026, 0x0016, 0x080c,
-	0xcb35, 0x0568, 0x6014, 0x2048, 0xa864, 0x9086, 0x0139, 0x11a8,
-	0xa894, 0x9086, 0x0056, 0x1148, 0x080c, 0x5478, 0x0130, 0x2001,
-	0x0000, 0x900e, 0x2011, 0x4000, 0x0028, 0x2001, 0x0030, 0x900e,
-	0x2011, 0x4005, 0x080c, 0xd10f, 0x0090, 0xa868, 0xd0fc, 0x0178,
-	0xa807, 0x0000, 0x0016, 0x6004, 0x908e, 0x0021, 0x0168, 0x908e,
-	0x003d, 0x0150, 0x001e, 0xa867, 0x0103, 0xa833, 0x0100, 0x001e,
-	0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0, 0x0096,
-	0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0xa823, 0x8001,
-	0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, 0xb804, 0x9084, 0x00ff,
-	0x90b2, 0x000c, 0x1a0c, 0x0dd5, 0x6604, 0x96b6, 0x004d, 0x1120,
-	0x080c, 0xd02e, 0x0804, 0xb8df, 0x6604, 0x96b6, 0x0043, 0x1120,
-	0x080c, 0xd077, 0x0804, 0xb8df, 0x6604, 0x96b6, 0x004b, 0x1120,
-	0x080c, 0xd0a3, 0x0804, 0xb8df, 0x6604, 0x96b6, 0x0033, 0x1120,
-	0x080c, 0xcfc4, 0x0804, 0xb8df, 0x6604, 0x96b6, 0x0028, 0x1120,
-	0x080c, 0xcd74, 0x0804, 0xb8df, 0x6604, 0x96b6, 0x0029, 0x1120,
-	0x080c, 0xcdb5, 0x0804, 0xb8df, 0x6604, 0x96b6, 0x001f, 0x1120,
-	0x080c, 0xb23a, 0x0804, 0xb8df, 0x6604, 0x96b6, 0x0000, 0x1118,
-	0x080c, 0xb577, 0x04e0, 0x6604, 0x96b6, 0x0022, 0x1118, 0x080c,
-	0xb272, 0x04a8, 0x6604, 0x96b6, 0x0035, 0x1118, 0x080c, 0xb398,
-	0x0470, 0x6604, 0x96b6, 0x0039, 0x1118, 0x080c, 0xb50c, 0x0438,
-	0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, 0xb2aa, 0x0400, 0x6604,
-	0x96b6, 0x0044, 0x1118, 0x080c, 0xb2e6, 0x00c8, 0x6604, 0x96b6,
-	0x0049, 0x1118, 0x080c, 0xb327, 0x0090, 0x6604, 0x96b6, 0x0041,
-	0x1118, 0x080c, 0xb311, 0x0058, 0x91b6, 0x0015, 0x1110, 0x0063,
-	0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, 0x0804, 0xbb39, 0x00be,
-	0x0005, 0x080c, 0xaef7, 0x0cd8, 0xb8fc, 0xb8ff, 0xb8fc, 0xb946,
-	0xb8fc, 0xbaad, 0xbb46, 0xb8fc, 0xb8fc, 0xbb0f, 0xb8fc, 0xbb25,
-	0x0096, 0x601f, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867,
-	0x0103, 0x009e, 0x0804, 0xae61, 0xa001, 0xa001, 0x0005, 0x00e6,
-	0x2071, 0x1800, 0x7090, 0x9086, 0x0074, 0x1540, 0x080c, 0xe2bc,
-	0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128, 0xb800,
-	0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00f9, 0x00be, 0x2001, 0x0006,
-	0x080c, 0x654f, 0x080c, 0x31e8, 0x080c, 0xae61, 0x0098, 0x2001,
-	0x000a, 0x080c, 0x654f, 0x080c, 0x31e8, 0x6003, 0x0001, 0x6007,
-	0x0001, 0x080c, 0x9138, 0x080c, 0x968d, 0x0020, 0x2001, 0x0001,
-	0x080c, 0xba7d, 0x00ee, 0x0005, 0x00d6, 0xb800, 0xd084, 0x0160,
-	0x9006, 0x080c, 0x653b, 0x2069, 0x1847, 0x6804, 0xd0a4, 0x0120,
-	0x2001, 0x0006, 0x080c, 0x657b, 0x00de, 0x0005, 0x00b6, 0x0096,
-	0x00d6, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074, 0x1904, 0xba54,
-	0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e, 0x1120, 0x080c, 0xbc93,
-	0x0804, 0xb9b8, 0x080c, 0xbc88, 0x6010, 0x2058, 0xbaa0, 0x9286,
-	0x0080, 0x1510, 0x6014, 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084,
-	0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011,
-	0x4000, 0x080c, 0xd10f, 0x0030, 0xa807, 0x0000, 0xa867, 0x0103,
-	0xa833, 0x0200, 0x2001, 0x0006, 0x080c, 0x654f, 0x080c, 0x31e8,
-	0x080c, 0xae61, 0x0804, 0xba57, 0x080c, 0xba65, 0x6014, 0x9005,
-	0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x0039, 0x1d08, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000,
-	0x080c, 0xd10f, 0x08f8, 0x080c, 0xba5b, 0x0160, 0x9006, 0x080c,
-	0x653b, 0x2001, 0x0004, 0x080c, 0x657b, 0x2001, 0x0007, 0x080c,
-	0x654f, 0x08a0, 0x2001, 0x0004, 0x080c, 0x654f, 0x6003, 0x0001,
-	0x6007, 0x0003, 0x080c, 0x9138, 0x080c, 0x968d, 0x0804, 0xba57,
-	0xb85c, 0xd0e4, 0x01d8, 0x080c, 0xcf44, 0x080c, 0x73bc, 0x0118,
-	0xd0dc, 0x1904, 0xb97a, 0x2011, 0x1837, 0x2204, 0xc0ad, 0x2012,
-	0x2001, 0x196d, 0x2004, 0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000,
-	0x080c, 0x28b2, 0x78e2, 0x00fe, 0x0804, 0xb97a, 0x080c, 0xcf81,
-	0x2011, 0x1837, 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xe441,
-	0x000e, 0x1904, 0xb97a, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c,
-	0x654f, 0x9006, 0x080c, 0x653b, 0x00c6, 0x2001, 0x180f, 0x2004,
-	0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, 0x1800,
-	0x700c, 0x9084, 0x00ff, 0x78e6, 0x707e, 0x7010, 0x78ea, 0x7082,
-	0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c,
-	0x2887, 0x00f6, 0x2100, 0x900e, 0x080c, 0x283e, 0x795e, 0x00fe,
-	0x9186, 0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8, 0x2009, 0x00ef,
-	0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932, 0x7936, 0x780c, 0xc0b5,
-	0x780e, 0x00fe, 0x080c, 0x2887, 0x00f6, 0x2079, 0x1800, 0x7982,
-	0x2100, 0x900e, 0x080c, 0x283e, 0x795e, 0x00fe, 0x8108, 0x080c,
-	0x659e, 0x2b00, 0x00ce, 0x1904, 0xb97a, 0x6012, 0x2009, 0x180f,
-	0x210c, 0xd19c, 0x0150, 0x2009, 0x027c, 0x210c, 0x918c, 0x00ff,
-	0xb912, 0x2009, 0x027d, 0x210c, 0xb916, 0x2001, 0x0002, 0x080c,
-	0x654f, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c,
-	0x9138, 0x080c, 0x968d, 0x0018, 0x2001, 0x0001, 0x0431, 0x00de,
-	0x009e, 0x00be, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0a4, 0x0120,
-	0x2001, 0x1848, 0x2004, 0xd0ac, 0x0005, 0x00e6, 0x080c, 0xe970,
-	0x0190, 0x2071, 0x0260, 0x7108, 0x720c, 0x918c, 0x00ff, 0x1118,
-	0x9284, 0xff00, 0x0140, 0x6010, 0x2058, 0xb8a0, 0x9084, 0xff80,
-	0x1110, 0xb912, 0xba16, 0x00ee, 0x0005, 0x2030, 0x9005, 0x0158,
-	0x2001, 0x0007, 0x080c, 0x654f, 0x080c, 0x56e3, 0x1120, 0x2001,
-	0x0007, 0x080c, 0x657b, 0x2600, 0x9005, 0x11b0, 0x6014, 0x0096,
-	0x2048, 0xa868, 0x009e, 0xd0fc, 0x1178, 0x0036, 0x0046, 0x6010,
-	0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0004, 0x2011, 0x8014,
-	0x080c, 0x4b04, 0x004e, 0x003e, 0x080c, 0x31e8, 0x6020, 0x9086,
-	0x000a, 0x1108, 0x0005, 0x0804, 0xae61, 0x00b6, 0x00e6, 0x0026,
-	0x0016, 0x2071, 0x1800, 0x7090, 0x9086, 0x0014, 0x1904, 0xbb05,
-	0x080c, 0x56e3, 0x1170, 0x6014, 0x9005, 0x1158, 0x0036, 0x0046,
-	0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4cbb, 0x004e,
-	0x003e, 0x00d6, 0x6010, 0x2058, 0x080c, 0x669a, 0x080c, 0xb934,
-	0x00de, 0x080c, 0xbd59, 0x1588, 0x6010, 0x2058, 0xb890, 0x9005,
-	0x0560, 0x2001, 0x0006, 0x080c, 0x654f, 0x0096, 0x6014, 0x904d,
-	0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001,
-	0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xd10f, 0x0060, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0029, 0x0130, 0xa807, 0x0000, 0xa867,
-	0x0103, 0xa833, 0x0200, 0x009e, 0x080c, 0x31e8, 0x6020, 0x9086,
-	0x000a, 0x0140, 0x080c, 0xae61, 0x0028, 0x080c, 0xb813, 0x9006,
-	0x080c, 0xba7d, 0x001e, 0x002e, 0x00ee, 0x00be, 0x0005, 0x2011,
-	0x1824, 0x2204, 0x9086, 0x0014, 0x1160, 0x2001, 0x0002, 0x080c,
-	0x654f, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9138, 0x0804,
-	0x968d, 0x2001, 0x0001, 0x0804, 0xba7d, 0x2030, 0x2011, 0x1824,
-	0x2204, 0x9086, 0x0004, 0x1148, 0x96b6, 0x000b, 0x1120, 0x2001,
-	0x0007, 0x080c, 0x654f, 0x0804, 0xae61, 0x2001, 0x0001, 0x0804,
-	0xba7d, 0x0002, 0xb8fc, 0xbb51, 0xb8fc, 0xbb92, 0xb8fc, 0xbc3f,
-	0xbb46, 0xb8fc, 0xb8fc, 0xbc53, 0xb8fc, 0xbc65, 0x6604, 0x9686,
-	0x0003, 0x0904, 0xbaad, 0x96b6, 0x001e, 0x1110, 0x080c, 0xae61,
-	0x0005, 0x00b6, 0x00d6, 0x00c6, 0x080c, 0xbc77, 0x11a0, 0x9006,
-	0x080c, 0x653b, 0x080c, 0x31bf, 0x080c, 0xd245, 0x2001, 0x0002,
-	0x080c, 0x654f, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9138,
-	0x080c, 0x968d, 0x0418, 0x2009, 0x026e, 0x2104, 0x9086, 0x0009,
-	0x1160, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0170,
-	0x8001, 0xb842, 0x601b, 0x000a, 0x0088, 0x2009, 0x026f, 0x2104,
-	0x9084, 0xff00, 0x9086, 0x1900, 0x1108, 0x08a0, 0x080c, 0x31bf,
-	0x080c, 0xd245, 0x2001, 0x0001, 0x080c, 0xba7d, 0x00ce, 0x00de,
-	0x00be, 0x0005, 0x0096, 0x00b6, 0x0026, 0x9016, 0x080c, 0xbc85,
-	0x00d6, 0x2069, 0x197c, 0x2d04, 0x9005, 0x0168, 0x6010, 0x2058,
-	0xb8a0, 0x9086, 0x007e, 0x1138, 0x2069, 0x1820, 0x2d04, 0x8000,
-	0x206a, 0x00de, 0x0010, 0x00de, 0x0088, 0x9006, 0x080c, 0x653b,
-	0x2001, 0x0002, 0x080c, 0x654f, 0x6003, 0x0001, 0x6007, 0x0002,
-	0x080c, 0x9138, 0x080c, 0x968d, 0x0804, 0xbc0f, 0x080c, 0xcb35,
-	0x01b0, 0x6014, 0x2048, 0xa864, 0x2010, 0x9086, 0x0139, 0x1138,
-	0x6007, 0x0016, 0x2001, 0x0002, 0x080c, 0xd169, 0x00b0, 0x6014,
-	0x2048, 0xa864, 0xd0fc, 0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001,
-	0x180e, 0x2004, 0xd0dc, 0x0148, 0x6010, 0x2058, 0xb840, 0x9084,
-	0x00ff, 0x9005, 0x1110, 0x9006, 0x0c38, 0x080c, 0xb813, 0x2009,
-	0x026e, 0x2134, 0x96b4, 0x00ff, 0x9686, 0x0005, 0x0520, 0x9686,
-	0x000b, 0x01c8, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x1118,
-	0x9686, 0x0009, 0x01c0, 0x9086, 0x1900, 0x1168, 0x9686, 0x0009,
-	0x0190, 0x2001, 0x0004, 0x080c, 0x654f, 0x2001, 0x0028, 0x601a,
-	0x6007, 0x0052, 0x0020, 0x2001, 0x0001, 0x080c, 0xba7d, 0x002e,
-	0x00be, 0x009e, 0x0005, 0x9286, 0x0139, 0x0160, 0x6014, 0x2048,
-	0x080c, 0xcb35, 0x0140, 0xa864, 0x9086, 0x0139, 0x0118, 0xa868,
-	0xd0fc, 0x0108, 0x0c40, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff,
-	0x9005, 0x0138, 0x8001, 0xb842, 0x601b, 0x000a, 0x6007, 0x0016,
-	0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x00e6, 0x2071, 0x1800,
-	0x080c, 0x5fad, 0x00ee, 0x0010, 0x080c, 0x31bf, 0x0860, 0x080c,
-	0xbc85, 0x1160, 0x2001, 0x0004, 0x080c, 0x654f, 0x6003, 0x0001,
-	0x6007, 0x0003, 0x080c, 0x9138, 0x0804, 0x968d, 0x080c, 0xb813,
-	0x9006, 0x0804, 0xba7d, 0x0489, 0x1160, 0x2001, 0x0008, 0x080c,
-	0x654f, 0x6003, 0x0001, 0x6007, 0x0005, 0x080c, 0x9138, 0x0804,
-	0x968d, 0x2001, 0x0001, 0x0804, 0xba7d, 0x00f9, 0x1160, 0x2001,
-	0x000a, 0x080c, 0x654f, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
-	0x9138, 0x0804, 0x968d, 0x2001, 0x0001, 0x0804, 0xba7d, 0x2009,
-	0x026e, 0x2104, 0x9086, 0x0003, 0x1138, 0x2009, 0x026f, 0x2104,
-	0x9084, 0xff00, 0x9086, 0x2a00, 0x0005, 0x9085, 0x0001, 0x0005,
-	0x00b6, 0x00c6, 0x0016, 0x6110, 0x2158, 0x080c, 0x660e, 0x001e,
-	0x00ce, 0x00be, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036,
-	0x0016, 0x6010, 0x2058, 0x2009, 0x1837, 0x2104, 0x9085, 0x0003,
-	0x200a, 0x080c, 0xbd2b, 0x0560, 0x2009, 0x1837, 0x2104, 0xc0cd,
-	0x200a, 0x080c, 0x696e, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a,
-	0x080c, 0xe5ae, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019,
-	0x002a, 0x2009, 0x0001, 0x080c, 0x318a, 0x00e6, 0x2071, 0x1800,
-	0x080c, 0x2f96, 0x00ee, 0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009,
-	0x007f, 0x080c, 0x32bb, 0x8108, 0x1f04, 0xbcc9, 0x015e, 0x00ce,
-	0x080c, 0xbc88, 0x2071, 0x0260, 0x2079, 0x0200, 0x7817, 0x0001,
-	0x2001, 0x1837, 0x200c, 0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc,
-	0x0118, 0x7038, 0xd0dc, 0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001,
-	0x1837, 0x2102, 0x2079, 0x0100, 0x2e04, 0x9084, 0x00ff, 0x2069,
-	0x181f, 0x206a, 0x78e6, 0x0006, 0x8e70, 0x2e04, 0x2069, 0x1820,
-	0x206a, 0x78ea, 0x7832, 0x7836, 0x2010, 0x9084, 0xff00, 0x001e,
-	0x9105, 0x2009, 0x182c, 0x200a, 0x2200, 0x9084, 0x00ff, 0x2008,
-	0x080c, 0x2887, 0x080c, 0x73bc, 0x0170, 0x2071, 0x0260, 0x2069,
-	0x1982, 0x7048, 0x206a, 0x704c, 0x6806, 0x7050, 0x680a, 0x7054,
-	0x680e, 0x080c, 0xcf44, 0x0040, 0x2001, 0x0006, 0x080c, 0x654f,
-	0x080c, 0x31e8, 0x080c, 0xae61, 0x001e, 0x003e, 0x00de, 0x00ee,
-	0x00fe, 0x00be, 0x0005, 0x0096, 0x0026, 0x0036, 0x00e6, 0x0156,
-	0x2019, 0x182c, 0x231c, 0x83ff, 0x01f0, 0x2071, 0x0260, 0x7200,
-	0x9294, 0x00ff, 0x7004, 0x9084, 0xff00, 0x9205, 0x9306, 0x1198,
-	0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48, 0x2019, 0x000a, 0x080c,
-	0xbe1d, 0x1148, 0x2011, 0x027a, 0x20a9, 0x0004, 0x2019, 0x0006,
-	0x080c, 0xbe1d, 0x1100, 0x015e, 0x00ee, 0x003e, 0x002e, 0x009e,
-	0x0005, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9086, 0x0014, 0x11a8,
-	0x7038, 0x9086, 0x0800, 0x1188, 0x703c, 0xd0ec, 0x0160, 0x9084,
-	0x0f00, 0x9086, 0x0100, 0x1138, 0x7054, 0xd0a4, 0x1110, 0xd0ac,
-	0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6,
-	0x0096, 0x00c6, 0x0076, 0x0056, 0x0046, 0x0026, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x2029, 0x19f0, 0x252c, 0x2021, 0x19f6, 0x2424,
-	0x2061, 0x1cd0, 0x2071, 0x1800, 0x7254, 0x7074, 0x9202, 0x1a04,
-	0xbde9, 0x080c, 0x8981, 0x0904, 0xbde2, 0x080c, 0xe5df, 0x0904,
-	0xbde2, 0x6720, 0x9786, 0x0007, 0x0904, 0xbde2, 0x2500, 0x9c06,
-	0x0904, 0xbde2, 0x2400, 0x9c06, 0x05e8, 0x3e08, 0x9186, 0x0002,
-	0x1148, 0x6010, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x1580, 0x00c6, 0x6000, 0x9086, 0x0004, 0x1110, 0x080c,
-	0x1a5e, 0x9786, 0x000a, 0x0148, 0x080c, 0xcd3b, 0x1130, 0x00ce,
-	0x080c, 0xb813, 0x080c, 0xae92, 0x00e8, 0x6014, 0x2048, 0x080c,
-	0xcb35, 0x01a8, 0x9786, 0x0003, 0x1530, 0xa867, 0x0103, 0xa87c,
-	0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fb1, 0x009e,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0x6c75, 0x080c, 0xcd1e, 0x080c,
-	0xae92, 0x00ce, 0x9ce0, 0x0018, 0x7068, 0x9c02, 0x1210, 0x0804,
-	0xbd8c, 0x012e, 0x000e, 0x002e, 0x004e, 0x005e, 0x007e, 0x00ce,
-	0x009e, 0x00ee, 0x0005, 0x9786, 0x0006, 0x1118, 0x080c, 0xe551,
-	0x0c30, 0x9786, 0x0009, 0x1148, 0x6000, 0x9086, 0x0004, 0x0d08,
-	0x2009, 0x004c, 0x080c, 0xaedc, 0x08e0, 0x9786, 0x000a, 0x0938,
-	0x0820, 0x220c, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04,
-	0xbe09, 0x9006, 0x0005, 0x2304, 0x9102, 0x0218, 0x2001, 0x0001,
-	0x0008, 0x9006, 0x918d, 0x0001, 0x0005, 0x0136, 0x01c6, 0x0016,
-	0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0,
-	0x9300, 0x2098, 0x3518, 0x20a9, 0x0001, 0x220c, 0x4002, 0x910e,
-	0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e,
-	0x0005, 0x220c, 0x9102, 0x0218, 0x2001, 0x0001, 0x0010, 0x2001,
-	0x0000, 0x918d, 0x0001, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c,
-	0x810f, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, 0xbe47,
-	0x9006, 0x0005, 0x918d, 0x0001, 0x0005, 0x6004, 0x908a, 0x0053,
-	0x1a0c, 0x0dd5, 0x080c, 0xcd2a, 0x0120, 0x080c, 0xcd3b, 0x0168,
-	0x0028, 0x080c, 0x31e8, 0x080c, 0xcd3b, 0x0138, 0x080c, 0x9588,
-	0x080c, 0xae61, 0x080c, 0x968d, 0x0005, 0x080c, 0xb813, 0x0cb0,
-	0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005,
-	0xbe8c, 0xbe8c, 0xbe8c, 0xbe8c, 0xbe8c, 0xbe8c, 0xbe8c, 0xbe8c,
-	0xbe8c, 0xbe8c, 0xbe8c, 0xbe8e, 0xbe8e, 0xbe8e, 0xbe8e, 0xbe8c,
-	0xbe8c, 0xbe8c, 0xbe8e, 0xbe8c, 0x080c, 0x0dd5, 0x600b, 0xffff,
-	0x6003, 0x0001, 0x6106, 0x080c, 0x90f0, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x968d, 0x012e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004,
-	0x9082, 0x0040, 0x0804, 0xbf43, 0x9186, 0x0027, 0x1520, 0x080c,
-	0x9588, 0x080c, 0x31bf, 0x080c, 0xd245, 0x0096, 0x6114, 0x2148,
-	0x080c, 0xcb35, 0x0198, 0x080c, 0xcd3b, 0x1118, 0x080c, 0xb813,
-	0x0068, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0xa97c,
-	0xc1c5, 0xa97e, 0x080c, 0x6c81, 0x080c, 0xcd1e, 0x009e, 0x080c,
-	0xae61, 0x0804, 0x968d, 0x9186, 0x0014, 0x1120, 0x6004, 0x9082,
-	0x0040, 0x04a0, 0x9186, 0x0046, 0x0150, 0x9186, 0x0045, 0x0138,
-	0x9186, 0x0053, 0x0120, 0x9186, 0x0048, 0x190c, 0x0dd5, 0x2001,
-	0x0109, 0x2004, 0xd084, 0x0508, 0x0126, 0x2091, 0x2800, 0x0006,
-	0x0016, 0x0026, 0x0036, 0x00f6, 0x00e6, 0x00c6, 0x2079, 0x19e7,
-	0x2071, 0x1800, 0x2061, 0x0100, 0x080c, 0x8fd5, 0x00ce, 0x00ee,
-	0x00fe, 0x003e, 0x002e, 0x001e, 0x000e, 0x012e, 0xa001, 0x6000,
-	0x9086, 0x0002, 0x1110, 0x0804, 0xbf81, 0x0005, 0x0002, 0xbf1d,
-	0xbf1b, 0xbf1b, 0xbf1b, 0xbf1b, 0xbf1b, 0xbf1b, 0xbf1b, 0xbf1b,
-	0xbf1b, 0xbf1b, 0xbf38, 0xbf38, 0xbf38, 0xbf38, 0xbf1b, 0xbf38,
-	0xbf1b, 0xbf38, 0xbf1b, 0x080c, 0x0dd5, 0x080c, 0x9588, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xcb35, 0x0168, 0xa867, 0x0103, 0xa87b,
-	0x0006, 0xa877, 0x0000, 0xa880, 0xc0ec, 0xa882, 0x080c, 0x6c81,
-	0x080c, 0xcd1e, 0x009e, 0x080c, 0xae61, 0x080c, 0x968d, 0x0005,
-	0x080c, 0x9588, 0x080c, 0xcd3b, 0x090c, 0xb813, 0x080c, 0xae61,
-	0x080c, 0x968d, 0x0005, 0x0002, 0xbf5a, 0xbf58, 0xbf58, 0xbf58,
-	0xbf58, 0xbf58, 0xbf58, 0xbf58, 0xbf58, 0xbf58, 0xbf58, 0xbf71,
-	0xbf71, 0xbf71, 0xbf71, 0xbf58, 0xbf7b, 0xbf58, 0xbf71, 0xbf58,
-	0x080c, 0x0dd5, 0x0096, 0x080c, 0x9588, 0x6014, 0x2048, 0x2001,
-	0x1988, 0x2004, 0x6042, 0xa97c, 0xd1ac, 0x0140, 0x6003, 0x0004,
-	0xa87c, 0x9085, 0x0400, 0xa87e, 0x009e, 0x0005, 0x6003, 0x0002,
-	0x0cb8, 0x080c, 0x9588, 0x080c, 0xd248, 0x080c, 0xd24d, 0x6003,
-	0x000f, 0x0804, 0x968d, 0x080c, 0x9588, 0x080c, 0xae61, 0x0804,
-	0x968d, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
-	0x0005, 0xbf9d, 0xbf9d, 0xbf9d, 0xbf9d, 0xbf9d, 0xbf9f, 0xc07c,
-	0xbf9d, 0xc0b0, 0xbf9d, 0xbf9d, 0xbf9d, 0xbf9d, 0xbf9d, 0xbf9d,
-	0xbf9d, 0xbf9d, 0xbf9d, 0xbf9d, 0xc0b0, 0x080c, 0x0dd5, 0x00b6,
-	0x0096, 0x6114, 0x2148, 0x7644, 0x96b4, 0x0fff, 0x86ff, 0x1528,
-	0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xc06b, 0xa87b, 0x0000,
-	0xa867, 0x0103, 0xae76, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xc245, 0x080c, 0x6a9d, 0x6210, 0x2258, 0xba3c,
-	0x82ff, 0x0110, 0x8211, 0xba3e, 0x7044, 0xd0e4, 0x1904, 0xc04f,
-	0x080c, 0xae61, 0x009e, 0x00be, 0x0005, 0x968c, 0x0c00, 0x0150,
-	0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xc053, 0x7348, 0xab92,
-	0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0508, 0x9186,
-	0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc, 0x01a0, 0xa87b,
-	0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34, 0x2100, 0x9205,
-	0x0148, 0x7048, 0x9106, 0x1118, 0x704c, 0x9206, 0x0118, 0xa992,
-	0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010,
-	0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0x901e, 0xd6c4, 0x01d8,
-	0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4, 0x0804,
-	0xbfa6, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210,
-	0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025,
-	0x080c, 0xc730, 0x003e, 0xd6cc, 0x0904, 0xbfbb, 0x7154, 0xa98a,
-	0x81ff, 0x0904, 0xbfbb, 0x9192, 0x0021, 0x1278, 0x8304, 0x9098,
-	0x0018, 0x2011, 0x0029, 0x080c, 0xc730, 0x2011, 0x0205, 0x2013,
-	0x0000, 0x080c, 0xd1d5, 0x0804, 0xbfbb, 0xa868, 0xd0fc, 0x0120,
-	0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950, 0x080c, 0xc6cf,
-	0x00ae, 0x080c, 0xd1d5, 0x080c, 0xc720, 0x0804, 0xbfbd, 0x080c,
-	0xce2e, 0x0804, 0xbfca, 0xa87c, 0xd0ac, 0x0904, 0xbfd6, 0xa880,
-	0xd0bc, 0x1904, 0xbfd6, 0x7348, 0xa838, 0x9306, 0x11c8, 0x734c,
-	0xa834, 0x931e, 0x0904, 0xbfd6, 0xd6d4, 0x0190, 0xab38, 0x9305,
-	0x0904, 0xbfd6, 0x0068, 0xa87c, 0xd0ac, 0x0904, 0xbfae, 0xa838,
-	0xa934, 0x9105, 0x0904, 0xbfae, 0xa880, 0xd0bc, 0x1904, 0xbfae,
-	0x080c, 0xce68, 0x0804, 0xbfca, 0x0096, 0x00f6, 0x6003, 0x0003,
-	0x6007, 0x0043, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08,
-	0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0140, 0x6003, 0x0002, 0x00fe,
-	0x009e, 0x0005, 0x2130, 0x2228, 0x0058, 0x2400, 0xa9ac, 0x910a,
-	0x2300, 0xaab0, 0x9213, 0x2600, 0x9102, 0x2500, 0x9203, 0x0e90,
-	0xac36, 0xab3a, 0xae46, 0xad4a, 0x00fe, 0x6043, 0x0000, 0x2c10,
-	0x080c, 0x1bad, 0x080c, 0x9155, 0x080c, 0x97b9, 0x009e, 0x0005,
-	0x0005, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
-	0x0005, 0xc0cd, 0xc0cd, 0xc0cd, 0xc0cd, 0xc0cd, 0xc0cf, 0xc165,
-	0xc0cd, 0xc0cd, 0xc17c, 0xc208, 0xc0cd, 0xc0cd, 0xc0cd, 0xc0cd,
-	0xc21d, 0xc0cd, 0xc0cd, 0xc0cd, 0xc0cd, 0x080c, 0x0dd5, 0x0076,
-	0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, 0x2150, 0x7644,
-	0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210, 0x00b6,
-	0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff,
-	0x0904, 0xc160, 0x9694, 0xff00, 0x9284, 0x0c00, 0x0120, 0x7048,
-	0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904, 0xc160, 0x080c,
-	0x0fff, 0x090c, 0x0dd5, 0x2900, 0xb07a, 0xb77c, 0xc7cd, 0xb77e,
-	0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872,
-	0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, 0x734c, 0xab8e,
-	0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, 0x0028, 0x1118,
-	0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015, 0x0038,
-	0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xaf7e,
-	0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190, 0x735c,
-	0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008,
-	0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xc730,
-	0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8, 0x9192,
-	0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c,
-	0xc730, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068, 0xd0fc,
-	0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c, 0xc6cf,
-	0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x00f6, 0x00a6, 0x6003,
-	0x0003, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x6014,
-	0x2050, 0xb436, 0xb33a, 0xb646, 0xb54a, 0x00ae, 0x00fe, 0x2c10,
-	0x080c, 0x1bad, 0x0804, 0xa240, 0x6003, 0x0002, 0x6004, 0x9086,
-	0x0040, 0x11c8, 0x0096, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0160,
-	0x601c, 0xd084, 0x1130, 0x00f6, 0x2c00, 0x2078, 0x080c, 0x1725,
-	0x00fe, 0x6003, 0x0004, 0x0010, 0x6003, 0x0002, 0x009e, 0x080c,
-	0x9588, 0x080c, 0x968d, 0x0096, 0x2001, 0x1988, 0x2004, 0x6042,
-	0x080c, 0x963d, 0x080c, 0x97b9, 0x6114, 0x2148, 0xa97c, 0xd1e4,
-	0x0904, 0xc203, 0xd1cc, 0x05a8, 0xa978, 0xa868, 0xd0fc, 0x0538,
-	0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0019, 0x20a0, 0x810e, 0x810e, 0x810f, 0x9184, 0x003f,
-	0x20e0, 0x9184, 0xffc0, 0x9080, 0x0019, 0x2098, 0x0156, 0x20a9,
-	0x0020, 0x4003, 0x015e, 0x000e, 0xa882, 0x000e, 0xa87e, 0x001e,
-	0xa874, 0x0006, 0x2148, 0x080c, 0x0fb1, 0x001e, 0x0440, 0x0016,
-	0x080c, 0x0fb1, 0x009e, 0xa974, 0x0016, 0x080c, 0xc720, 0x001e,
-	0x00f0, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002,
-	0x0180, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd1dc,
-	0x0118, 0xa87b, 0x0015, 0x0038, 0xd1d4, 0x0118, 0xa87b, 0x0007,
-	0x0010, 0xa87b, 0x0000, 0x0016, 0x080c, 0x6a9d, 0x001e, 0xd1e4,
-	0x1120, 0x080c, 0xae61, 0x009e, 0x0005, 0x080c, 0xce2e, 0x0cd8,
-	0x6004, 0x9086, 0x0040, 0x1120, 0x080c, 0x9588, 0x080c, 0x968d,
-	0x2019, 0x0001, 0x080c, 0xa5b6, 0x6003, 0x0002, 0x080c, 0xd24d,
-	0x080c, 0x963d, 0x080c, 0x97b9, 0x0005, 0x6004, 0x9086, 0x0040,
-	0x1120, 0x080c, 0x9588, 0x080c, 0x968d, 0x2019, 0x0001, 0x080c,
-	0xa5b6, 0x080c, 0x963d, 0x080c, 0x31bf, 0x080c, 0xd245, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xcb35, 0x0150, 0xa867, 0x0103, 0xa87b,
-	0x0029, 0xa877, 0x0000, 0x080c, 0x6c81, 0x080c, 0xcd1e, 0x009e,
-	0x080c, 0xae61, 0x080c, 0x97b9, 0x0005, 0xa87b, 0x0015, 0xd1fc,
-	0x0180, 0xa87b, 0x0007, 0x8002, 0x8000, 0x810a, 0x9189, 0x0000,
-	0x0006, 0x0016, 0x2009, 0x1a7a, 0x2104, 0x8000, 0x200a, 0x001e,
-	0x000e, 0xa992, 0xa88e, 0x0005, 0x9182, 0x0054, 0x1220, 0x9182,
-	0x0040, 0x0208, 0x000a, 0x0005, 0xc278, 0xc278, 0xc278, 0xc278,
-	0xc278, 0xc27a, 0xc278, 0xc278, 0xc320, 0xc278, 0xc278, 0xc278,
-	0xc278, 0xc278, 0xc278, 0xc278, 0xc278, 0xc278, 0xc278, 0xc451,
+	0x0136, 0x9080, 0x001b, 0x20a0, 0x2011, 0x0006, 0x20a9, 0x0001,
+	0x3418, 0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211,
+	0x1db8, 0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398,
+	0x4003, 0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c,
+	0xcb4a, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0x009e, 0x0804, 0xae71, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386,
+	0x0200, 0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8cf, 0x0000, 0x00be,
+	0x6014, 0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xab32, 0x080c, 0xae71, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011,
+	0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xd24a, 0x0188, 0x6014,
+	0x9005, 0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x6043, 0x0000,
+	0x2009, 0x0022, 0x080c, 0xb668, 0x9006, 0x001e, 0x000e, 0x0005,
+	0x9085, 0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80,
+	0x000c, 0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003,
+	0x0001, 0x2099, 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a,
+	0xa804, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0,
+	0x4003, 0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9,
+	0x0020, 0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048,
+	0xa867, 0x0103, 0x080c, 0xae71, 0x001e, 0x009e, 0x0005, 0x0096,
+	0x0016, 0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084,
+	0x00ff, 0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004,
+	0x9108, 0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048,
+	0x080c, 0xc743, 0x080c, 0xcb4a, 0x0140, 0x6014, 0x2048, 0xa807,
+	0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xae71, 0x001e,
+	0x009e, 0x0005, 0x0016, 0x2009, 0x0000, 0x7030, 0x9086, 0x0200,
+	0x0110, 0x2009, 0x0001, 0x0096, 0x6014, 0x904d, 0x090c, 0x0dd5,
+	0xa97a, 0x080c, 0x6c86, 0x009e, 0x080c, 0xae71, 0x001e, 0x0005,
+	0x0016, 0x0096, 0x7030, 0x9086, 0x0100, 0x1118, 0x2009, 0x0004,
+	0x0010, 0x7034, 0x800c, 0x810b, 0x2011, 0x000c, 0x2019, 0x000c,
+	0x6014, 0x2048, 0xa804, 0x0096, 0x9005, 0x0108, 0x2048, 0x080c,
+	0xc743, 0x009e, 0x080c, 0xcb4a, 0x0148, 0xa804, 0x9005, 0x1158,
+	0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xae71,
+	0x009e, 0x001e, 0x0005, 0x0086, 0x2040, 0xa030, 0x8007, 0x9086,
+	0x0100, 0x1118, 0x080c, 0xb824, 0x00e0, 0xa034, 0x8007, 0x800c,
+	0x8806, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x000c, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xaaa0,
+	0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x1243, 0x0019,
+	0x0d08, 0x008e, 0x0898, 0x0096, 0x0006, 0x080c, 0x0fff, 0x000e,
+	0x01b0, 0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006, 0xae6a,
+	0x2800, 0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96, 0xad9a,
+	0x0086, 0x2940, 0x080c, 0x10e9, 0x008e, 0x9085, 0x0001, 0x009e,
+	0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210,
+	0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1520, 0x700c, 0x6210,
+	0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x11e0, 0x6043, 0x0000,
+	0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xd1c2, 0x001e, 0x1158,
+	0x622c, 0x2268, 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003, 0x0130,
+	0x9386, 0x0006, 0x0128, 0x080c, 0xae71, 0x0020, 0x0039, 0x0010,
+	0x080c, 0xb49d, 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096, 0x6814,
+	0x2048, 0x9186, 0x0015, 0x0904, 0xb485, 0x918e, 0x0016, 0x1904,
+	0xb49b, 0x700c, 0x908c, 0xff00, 0x9186, 0x1700, 0x0120, 0x9186,
+	0x0300, 0x1904, 0xb45f, 0x89ff, 0x1138, 0x6800, 0x9086, 0x000f,
+	0x0904, 0xb442, 0x0804, 0xb499, 0x6808, 0x9086, 0xffff, 0x1904,
+	0xb487, 0xa87c, 0x9084, 0x0060, 0x9086, 0x0020, 0x1128, 0xa83c,
+	0xa940, 0x9105, 0x1904, 0xb487, 0x6824, 0xd0b4, 0x1904, 0xb487,
+	0x080c, 0xcd33, 0x685c, 0xa882, 0xa87c, 0xc0dc, 0xc0f4, 0xc0d4,
+	0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001, 0x000a, 0x080c, 0x8f51,
+	0xa884, 0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff, 0x002e, 0x1138,
+	0x00c6, 0x2d60, 0x080c, 0xc86d, 0x00ce, 0x0804, 0xb499, 0x00c6,
+	0xa868, 0xd0fc, 0x1118, 0x080c, 0x60b7, 0x0010, 0x080c, 0x64bd,
+	0x00ce, 0x1904, 0xb487, 0x00c6, 0x2d60, 0x080c, 0xae71, 0x00ce,
+	0x0804, 0xb499, 0x00c6, 0x080c, 0xaebf, 0x0198, 0x6017, 0x0000,
+	0x6810, 0x6012, 0x080c, 0xcfc4, 0x6023, 0x0003, 0x6904, 0x00c6,
+	0x2d60, 0x080c, 0xae71, 0x00ce, 0x080c, 0xaeec, 0x00ce, 0x0804,
+	0xb499, 0x2001, 0x1987, 0x2004, 0x6842, 0x00ce, 0x04d0, 0x7008,
+	0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900, 0xc1bc,
+	0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c, 0xd204,
+	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x90d9,
+	0x080c, 0x9687, 0x00ce, 0x00e8, 0x700c, 0x9086, 0x2a00, 0x1138,
+	0x2001, 0x1987, 0x2004, 0x6842, 0x00a0, 0x0479, 0x00a0, 0x89ff,
+	0x090c, 0x0dd5, 0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103, 0xa87b,
+	0x0003, 0x080c, 0x6aa2, 0x080c, 0xcd33, 0x080c, 0xaea2, 0x00de,
+	0x00ce, 0x080c, 0xae71, 0x009e, 0x0005, 0x9186, 0x0015, 0x1128,
+	0x2001, 0x1987, 0x2004, 0x6842, 0x0068, 0x918e, 0x0016, 0x1160,
+	0x00c6, 0x2d00, 0x2060, 0x080c, 0xe82c, 0x080c, 0x869b, 0x080c,
+	0xae71, 0x00ce, 0x080c, 0xae71, 0x0005, 0x0026, 0x0036, 0x0046,
+	0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001, 0x1987, 0x2004,
+	0x6842, 0x0804, 0xb517, 0x00c6, 0x2d60, 0x080c, 0xc76e, 0x00ce,
+	0x6804, 0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060, 0x6003,
+	0x0001, 0x6007, 0x0050, 0x080c, 0x90d9, 0x080c, 0x9687, 0x00ce,
+	0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff, 0x090c, 0x0dd5,
+	0x6800, 0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac, 0x0178, 0xa843,
+	0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882, 0x2001, 0x0001,
+	0x6832, 0x0400, 0x2001, 0x0007, 0x6832, 0x00e0, 0xa87c, 0xd0b4,
+	0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48, 0xa838, 0xa934,
+	0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024, 0x9306, 0x1118,
+	0x7020, 0x9406, 0x0d38, 0x7020, 0x683e, 0x7024, 0x683a, 0x2001,
+	0x0005, 0x6832, 0x080c, 0xcebb, 0x080c, 0x9687, 0x0010, 0x080c,
+	0xae71, 0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026,
+	0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be,
+	0x9206, 0x1904, 0xb582, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14,
+	0x00be, 0x9206, 0x1904, 0xb582, 0x6038, 0x2068, 0x6824, 0xc0dc,
+	0x6826, 0x6a20, 0x9286, 0x0007, 0x0904, 0xb582, 0x9286, 0x0002,
+	0x0904, 0xb582, 0x9286, 0x0000, 0x05e8, 0x6808, 0x633c, 0x9306,
+	0x15c8, 0x2071, 0x026c, 0x9186, 0x0015, 0x0570, 0x918e, 0x0016,
+	0x1100, 0x00c6, 0x6038, 0x2060, 0x6104, 0x9186, 0x004b, 0x01c0,
+	0x9186, 0x004c, 0x01a8, 0x9186, 0x004d, 0x0190, 0x9186, 0x004e,
+	0x0178, 0x9186, 0x0052, 0x0160, 0x6014, 0x0096, 0x2048, 0x080c,
+	0xcb4a, 0x090c, 0x0dd5, 0xa87b, 0x0003, 0x009e, 0x080c, 0xd204,
+	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x90d9,
+	0x080c, 0x9687, 0x00ce, 0x0030, 0x6038, 0x2070, 0x2001, 0x1987,
+	0x2004, 0x7042, 0x080c, 0xae71, 0x002e, 0x00de, 0x00ee, 0x0005,
+	0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048, 0x6010, 0x2058, 0x91b6,
+	0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c, 0xbc02, 0x0460,
+	0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0010, 0x2019,
+	0x000a, 0x20a9, 0x0004, 0x080c, 0xbe30, 0x002e, 0x003e, 0x015e,
+	0x009e, 0x1904, 0xb5f1, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48,
+	0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9, 0x0004, 0x080c, 0xbe30,
+	0x002e, 0x003e, 0x015e, 0x009e, 0x15a0, 0x7238, 0xba0a, 0x733c,
+	0xbb0e, 0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe,
+	0x009e, 0x00be, 0x0804, 0xb276, 0x0096, 0x2048, 0xaa12, 0xab16,
+	0xac0a, 0x009e, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8,
+	0xada4, 0x2031, 0x0000, 0x2041, 0x1243, 0x080c, 0xb38b, 0x0130,
+	0x00fe, 0x009e, 0x080c, 0xae71, 0x00be, 0x0005, 0x080c, 0xb824,
+	0x0cb8, 0x2b78, 0x00f6, 0x080c, 0x31c1, 0x080c, 0xd25f, 0x00fe,
+	0x00c6, 0x080c, 0xae1b, 0x2f00, 0x6012, 0x6017, 0x0000, 0x6023,
+	0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x080c,
+	0x6558, 0x080c, 0x6584, 0x080c, 0x9121, 0x080c, 0x9687, 0x00ce,
+	0x0804, 0xb5c4, 0x2100, 0x91b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b2,
+	0x0040, 0x1a04, 0xb67a, 0x0002, 0xb668, 0xb668, 0xb65e, 0xb668,
+	0xb668, 0xb668, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c,
+	0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c,
+	0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c,
+	0xb65c, 0xb65c, 0xb65c, 0xb668, 0xb65c, 0xb668, 0xb668, 0xb65c,
+	0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65e, 0xb65c, 0xb65c, 0xb65c,
+	0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb668, 0xb668,
+	0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c, 0xb65c,
+	0xb65c, 0xb668, 0xb65c, 0xb65c, 0x080c, 0x0dd5, 0x0066, 0x00b6,
+	0x6610, 0x2658, 0xb8cc, 0xc08c, 0xb8ce, 0x00be, 0x006e, 0x0000,
+	0x6003, 0x0001, 0x6106, 0x9186, 0x0032, 0x0118, 0x080c, 0x9121,
+	0x0010, 0x080c, 0x90d9, 0x0126, 0x2091, 0x8000, 0x080c, 0x9687,
+	0x012e, 0x0005, 0x2600, 0x0002, 0xb668, 0xb668, 0xb68e, 0xb668,
+	0xb668, 0xb68e, 0xb68e, 0xb68e, 0xb68e, 0xb668, 0xb68e, 0xb668,
+	0xb68e, 0xb668, 0xb68e, 0xb68e, 0xb68e, 0xb68e, 0x080c, 0x0dd5,
+	0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b6, 0x0013, 0x0904,
+	0xb752, 0x91b6, 0x0027, 0x1904, 0xb70d, 0x080c, 0x957b, 0x6004,
+	0x080c, 0xcd3f, 0x01b0, 0x080c, 0xcd50, 0x01a8, 0x908e, 0x0021,
+	0x0904, 0xb70a, 0x908e, 0x0022, 0x1130, 0x080c, 0xb2a2, 0x0904,
+	0xb706, 0x0804, 0xb707, 0x908e, 0x003d, 0x0904, 0xb70a, 0x0804,
+	0xb700, 0x080c, 0x31ea, 0x2001, 0x0007, 0x080c, 0x6558, 0x6010,
+	0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xb824, 0x9186, 0x007e,
+	0x1148, 0x2001, 0x1837, 0x2014, 0xc285, 0x080c, 0x73a5, 0x1108,
+	0xc2ad, 0x2202, 0x0036, 0x0026, 0x2019, 0x0028, 0x2110, 0x080c,
+	0xe938, 0x002e, 0x003e, 0x0016, 0x0026, 0x0036, 0x2110, 0x2019,
+	0x0028, 0x080c, 0x927e, 0x0076, 0x903e, 0x080c, 0x9151, 0x6010,
+	0x00b6, 0x905d, 0x0100, 0x00be, 0x2c08, 0x080c, 0xe30c, 0x007e,
+	0x003e, 0x002e, 0x001e, 0x080c, 0xd25f, 0x0016, 0x080c, 0xcfbc,
+	0x080c, 0xae71, 0x001e, 0x080c, 0x32bd, 0x080c, 0x9687, 0x0030,
+	0x080c, 0xcfbc, 0x080c, 0xae71, 0x080c, 0x9687, 0x0005, 0x080c,
+	0xb824, 0x0cb0, 0x080c, 0xb860, 0x0c98, 0x9186, 0x0014, 0x1db0,
+	0x080c, 0x957b, 0x6004, 0x908e, 0x0022, 0x1118, 0x080c, 0xb2a2,
+	0x0d68, 0x080c, 0x31c1, 0x080c, 0xd25f, 0x080c, 0xcd3f, 0x1190,
+	0x080c, 0x31ea, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c,
+	0xb824, 0x9186, 0x007e, 0x1128, 0x2001, 0x1837, 0x200c, 0xc185,
+	0x2102, 0x0870, 0x080c, 0xcd50, 0x1118, 0x080c, 0xb824, 0x0840,
+	0x6004, 0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071, 0x189e,
+	0x2079, 0x0000, 0x080c, 0x3558, 0x00fe, 0x00ee, 0x0804, 0xb700,
+	0x6004, 0x908e, 0x0021, 0x0d48, 0x908e, 0x0022, 0x090c, 0xb824,
+	0x0804, 0xb700, 0x90b2, 0x0040, 0x1a04, 0xb800, 0x2008, 0x0002,
+	0xb79a, 0xb79b, 0xb79e, 0xb7a1, 0xb7a4, 0xb7a7, 0xb798, 0xb798,
+	0xb798, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798,
+	0xb798, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798,
+	0xb798, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798, 0xb7aa, 0xb7b5,
+	0xb798, 0xb7b7, 0xb7b5, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798,
+	0xb7b5, 0xb7b5, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798, 0xb798,
+	0xb798, 0xb798, 0xb7e7, 0xb7b5, 0xb798, 0xb7b1, 0xb798, 0xb798,
+	0xb798, 0xb7b2, 0xb798, 0xb798, 0xb798, 0xb7b5, 0xb7de, 0xb798,
+	0x080c, 0x0dd5, 0x00d0, 0x2001, 0x000b, 0x0410, 0x2001, 0x0003,
+	0x00f8, 0x2001, 0x0005, 0x00e0, 0x2001, 0x0001, 0x00c8, 0x2001,
+	0x0009, 0x00b0, 0x080c, 0x957b, 0x6003, 0x0005, 0x080c, 0x9687,
+	0x0070, 0x0018, 0x0010, 0x080c, 0x6558, 0x0804, 0xb7f8, 0x080c,
+	0x957b, 0x080c, 0xd262, 0x6003, 0x0004, 0x080c, 0x9687, 0x0005,
+	0x080c, 0x6558, 0x080c, 0x957b, 0x6003, 0x0002, 0x0036, 0x2019,
+	0x1852, 0x2304, 0x9084, 0xff00, 0x1120, 0x2001, 0x1985, 0x201c,
+	0x0040, 0x8007, 0x909a, 0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b,
+	0x9318, 0x631a, 0x003e, 0x080c, 0x9687, 0x0c08, 0x080c, 0x957b,
+	0x080c, 0xcfbc, 0x080c, 0xae71, 0x080c, 0x9687, 0x08c0, 0x00e6,
+	0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c, 0x3558, 0x00fe,
+	0x00ee, 0x080c, 0x957b, 0x080c, 0xae71, 0x080c, 0x9687, 0x0838,
+	0x080c, 0x957b, 0x6003, 0x0002, 0x080c, 0xd262, 0x0804, 0x9687,
+	0x2600, 0x2008, 0x0002, 0xb817, 0xb7f8, 0xb815, 0xb7f8, 0xb7f8,
+	0xb815, 0xb815, 0xb815, 0xb815, 0xb7f8, 0xb815, 0xb7f8, 0xb815,
+	0xb7f8, 0xb815, 0xb815, 0xb815, 0xb815, 0x080c, 0x0dd5, 0x080c,
+	0x957b, 0x0096, 0x6014, 0x2048, 0x080c, 0x6c86, 0x009e, 0x080c,
+	0xae71, 0x080c, 0x9687, 0x0005, 0x00e6, 0x0096, 0x0026, 0x0016,
+	0x080c, 0xcb4a, 0x0568, 0x6014, 0x2048, 0xa864, 0x9086, 0x0139,
+	0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c, 0x5481, 0x0130,
+	0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028, 0x2001, 0x0030,
+	0x900e, 0x2011, 0x4005, 0x080c, 0xd129, 0x0090, 0xa868, 0xd0fc,
+	0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e, 0x0021, 0x0168,
+	0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103, 0xa833, 0x0100,
+	0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0,
+	0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0xa823,
+	0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, 0xb804, 0x9084,
+	0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0dd5, 0x6604, 0x96b6, 0x004d,
+	0x1120, 0x080c, 0xd048, 0x0804, 0xb8f0, 0x6604, 0x96b6, 0x0043,
+	0x1120, 0x080c, 0xd091, 0x0804, 0xb8f0, 0x6604, 0x96b6, 0x004b,
+	0x1120, 0x080c, 0xd0bd, 0x0804, 0xb8f0, 0x6604, 0x96b6, 0x0033,
+	0x1120, 0x080c, 0xcfde, 0x0804, 0xb8f0, 0x6604, 0x96b6, 0x0028,
+	0x1120, 0x080c, 0xcd8e, 0x0804, 0xb8f0, 0x6604, 0x96b6, 0x0029,
+	0x1120, 0x080c, 0xcdcf, 0x0804, 0xb8f0, 0x6604, 0x96b6, 0x001f,
+	0x1120, 0x080c, 0xb24a, 0x0804, 0xb8f0, 0x6604, 0x96b6, 0x0000,
+	0x1118, 0x080c, 0xb588, 0x04e0, 0x6604, 0x96b6, 0x0022, 0x1118,
+	0x080c, 0xb283, 0x04a8, 0x6604, 0x96b6, 0x0035, 0x1118, 0x080c,
+	0xb3a9, 0x0470, 0x6604, 0x96b6, 0x0039, 0x1118, 0x080c, 0xb51d,
+	0x0438, 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, 0xb2bb, 0x0400,
+	0x6604, 0x96b6, 0x0044, 0x1118, 0x080c, 0xb2f7, 0x00c8, 0x6604,
+	0x96b6, 0x0049, 0x1118, 0x080c, 0xb338, 0x0090, 0x6604, 0x96b6,
+	0x0041, 0x1118, 0x080c, 0xb322, 0x0058, 0x91b6, 0x0015, 0x1110,
+	0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, 0x0804, 0xbb4c,
+	0x00be, 0x0005, 0x080c, 0xaf07, 0x0cd8, 0xb90d, 0xb910, 0xb90d,
+	0xb957, 0xb90d, 0xbac0, 0xbb59, 0xb90d, 0xb90d, 0xbb22, 0xb90d,
+	0xbb38, 0x0096, 0x601f, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048,
+	0xa867, 0x0103, 0x009e, 0x0804, 0xae71, 0xa001, 0xa001, 0x0005,
+	0x00e6, 0x2071, 0x1800, 0x7090, 0x9086, 0x0074, 0x1540, 0x080c,
+	0xe2dd, 0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128,
+	0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00f9, 0x00be, 0x2001,
+	0x0006, 0x080c, 0x6558, 0x080c, 0x31ea, 0x080c, 0xae71, 0x0098,
+	0x2001, 0x000a, 0x080c, 0x6558, 0x080c, 0x31ea, 0x6003, 0x0001,
+	0x6007, 0x0001, 0x080c, 0x9121, 0x080c, 0x9687, 0x0020, 0x2001,
+	0x0001, 0x080c, 0xba90, 0x00ee, 0x0005, 0x00d6, 0xb800, 0xd084,
+	0x0160, 0x9006, 0x080c, 0x6544, 0x2069, 0x1847, 0x6804, 0xd0a4,
+	0x0120, 0x2001, 0x0006, 0x080c, 0x6584, 0x00de, 0x0005, 0x00b6,
+	0x0096, 0x00d6, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074, 0x1904,
+	0xba65, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e, 0x1120, 0x080c,
+	0xbca6, 0x0804, 0xb9c9, 0x080c, 0xbc9b, 0x6010, 0x2058, 0xbaa0,
+	0x9286, 0x0080, 0x1510, 0x6014, 0x9005, 0x01a8, 0x2048, 0xa864,
+	0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e,
+	0x2011, 0x4000, 0x080c, 0xd129, 0x0030, 0xa807, 0x0000, 0xa867,
+	0x0103, 0xa833, 0x0200, 0x2001, 0x0006, 0x080c, 0x6558, 0x080c,
+	0x31ea, 0x080c, 0xae71, 0x0804, 0xba6a, 0x080c, 0xba78, 0x6014,
+	0x9005, 0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084,
+	0x00ff, 0x9086, 0x0039, 0x1d08, 0x2001, 0x0000, 0x900e, 0x2011,
+	0x4000, 0x080c, 0xd129, 0x08f8, 0x080c, 0xba6e, 0x0160, 0x9006,
+	0x080c, 0x6544, 0x2001, 0x0004, 0x080c, 0x6584, 0x2001, 0x0007,
+	0x080c, 0x6558, 0x08a0, 0x2001, 0x0004, 0x080c, 0x6558, 0x6003,
+	0x0001, 0x6007, 0x0003, 0x080c, 0x9121, 0x080c, 0x9687, 0x0804,
+	0xba6a, 0xb85c, 0xd0e4, 0x01d8, 0x080c, 0xcf5e, 0x080c, 0x73a5,
+	0x0118, 0xd0dc, 0x1904, 0xb98b, 0x2011, 0x1837, 0x2204, 0xc0ad,
+	0x2012, 0x2001, 0x196c, 0x2004, 0x00f6, 0x2079, 0x0100, 0x78e3,
+	0x0000, 0x080c, 0x28b4, 0x78e2, 0x00fe, 0x0804, 0xb98b, 0x080c,
+	0xcf9b, 0x2011, 0x1837, 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c,
+	0xe462, 0x000e, 0x1904, 0xb98b, 0xc0b5, 0x2012, 0x2001, 0x0006,
+	0x080c, 0x6558, 0x9006, 0x080c, 0x6544, 0x00c6, 0x2001, 0x180f,
+	0x2004, 0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071,
+	0x1800, 0x700c, 0x9084, 0x00ff, 0x78e6, 0x707e, 0x7010, 0x78ea,
+	0x7082, 0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe,
+	0x080c, 0x2889, 0x00f6, 0x2100, 0x900e, 0x080c, 0x2840, 0x795e,
+	0x00fe, 0x9186, 0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8, 0x2009,
+	0x00ef, 0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932, 0x7936, 0x780c,
+	0xc0b5, 0x780e, 0x00fe, 0x080c, 0x2889, 0x00f6, 0x2079, 0x1800,
+	0x7982, 0x2100, 0x900e, 0x080c, 0x2840, 0x795e, 0x00fe, 0x8108,
+	0x080c, 0x65a7, 0x2b00, 0x00ce, 0x1904, 0xb98b, 0x6012, 0x2009,
+	0x180f, 0x210c, 0xd19c, 0x0150, 0x2009, 0x027c, 0x210c, 0x918c,
+	0x00ff, 0xb912, 0x2009, 0x027d, 0x210c, 0xb916, 0x2001, 0x0002,
+	0x080c, 0x6558, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002,
+	0x080c, 0x9121, 0x080c, 0x9687, 0x0028, 0x080c, 0xb824, 0x2001,
+	0x0001, 0x0431, 0x00de, 0x009e, 0x00be, 0x0005, 0x2001, 0x1810,
+	0x2004, 0xd0a4, 0x0120, 0x2001, 0x1848, 0x2004, 0xd0ac, 0x0005,
+	0x00e6, 0x080c, 0xe991, 0x0190, 0x2071, 0x0260, 0x7108, 0x720c,
+	0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, 0x6010, 0x2058,
+	0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, 0xba16, 0x00ee, 0x0005,
+	0x2030, 0x9005, 0x0158, 0x2001, 0x0007, 0x080c, 0x6558, 0x080c,
+	0x56ec, 0x1120, 0x2001, 0x0007, 0x080c, 0x6584, 0x2600, 0x9005,
+	0x11b0, 0x6014, 0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc, 0x1178,
+	0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021,
+	0x0004, 0x2011, 0x8014, 0x080c, 0x4b14, 0x004e, 0x003e, 0x080c,
+	0x31ea, 0x6020, 0x9086, 0x000a, 0x1108, 0x0005, 0x0804, 0xae71,
+	0x00b6, 0x00e6, 0x0026, 0x0016, 0x2071, 0x1800, 0x7090, 0x9086,
+	0x0014, 0x1904, 0xbb18, 0x080c, 0x56ec, 0x1170, 0x6014, 0x9005,
+	0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006,
+	0x080c, 0x4ccb, 0x004e, 0x003e, 0x00d6, 0x6010, 0x2058, 0x080c,
+	0x66a3, 0x080c, 0xb945, 0x00de, 0x080c, 0xbd6c, 0x1588, 0x6010,
+	0x2058, 0xb890, 0x9005, 0x0560, 0x2001, 0x0006, 0x080c, 0x6558,
+	0x0096, 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c,
+	0xd129, 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0029, 0x0130,
+	0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x009e, 0x080c,
+	0x31ea, 0x6020, 0x9086, 0x000a, 0x0140, 0x080c, 0xae71, 0x0028,
+	0x080c, 0xb824, 0x9006, 0x080c, 0xba90, 0x001e, 0x002e, 0x00ee,
+	0x00be, 0x0005, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014, 0x1160,
+	0x2001, 0x0002, 0x080c, 0x6558, 0x6003, 0x0001, 0x6007, 0x0001,
+	0x080c, 0x9121, 0x0804, 0x9687, 0x2001, 0x0001, 0x0804, 0xba90,
+	0x2030, 0x2011, 0x1824, 0x2204, 0x9086, 0x0004, 0x1148, 0x96b6,
+	0x000b, 0x1120, 0x2001, 0x0007, 0x080c, 0x6558, 0x0804, 0xae71,
+	0x2001, 0x0001, 0x0804, 0xba90, 0x0002, 0xb90d, 0xbb64, 0xb90d,
+	0xbba5, 0xb90d, 0xbc52, 0xbb59, 0xb90d, 0xb90d, 0xbc66, 0xb90d,
+	0xbc78, 0x6604, 0x9686, 0x0003, 0x0904, 0xbac0, 0x96b6, 0x001e,
+	0x1110, 0x080c, 0xae71, 0x0005, 0x00b6, 0x00d6, 0x00c6, 0x080c,
+	0xbc8a, 0x11a0, 0x9006, 0x080c, 0x6544, 0x080c, 0x31c1, 0x080c,
+	0xd25f, 0x2001, 0x0002, 0x080c, 0x6558, 0x6003, 0x0001, 0x6007,
+	0x0002, 0x080c, 0x9121, 0x080c, 0x9687, 0x0418, 0x2009, 0x026e,
+	0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058, 0xb840, 0x9084,
+	0x00ff, 0x9005, 0x0170, 0x8001, 0xb842, 0x601b, 0x000a, 0x0088,
+	0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x1900, 0x1108,
+	0x08a0, 0x080c, 0x31c1, 0x080c, 0xd25f, 0x2001, 0x0001, 0x080c,
+	0xba90, 0x00ce, 0x00de, 0x00be, 0x0005, 0x0096, 0x00b6, 0x0026,
+	0x9016, 0x080c, 0xbc98, 0x00d6, 0x2069, 0x197b, 0x2d04, 0x9005,
+	0x0168, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x2069,
+	0x1820, 0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, 0x00de, 0x0088,
+	0x9006, 0x080c, 0x6544, 0x2001, 0x0002, 0x080c, 0x6558, 0x6003,
+	0x0001, 0x6007, 0x0002, 0x080c, 0x9121, 0x080c, 0x9687, 0x0804,
+	0xbc22, 0x080c, 0xcb4a, 0x01b0, 0x6014, 0x2048, 0xa864, 0x2010,
+	0x9086, 0x0139, 0x1138, 0x6007, 0x0016, 0x2001, 0x0002, 0x080c,
+	0xd183, 0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc, 0x0118, 0x2001,
+	0x0001, 0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc, 0x0148, 0x6010,
+	0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x1110, 0x9006, 0x0c38,
+	0x080c, 0xb824, 0x2009, 0x026e, 0x2134, 0x96b4, 0x00ff, 0x9686,
+	0x0005, 0x0520, 0x9686, 0x000b, 0x01c8, 0x2009, 0x026f, 0x2104,
+	0x9084, 0xff00, 0x1118, 0x9686, 0x0009, 0x01c0, 0x9086, 0x1900,
+	0x1168, 0x9686, 0x0009, 0x0190, 0x2001, 0x0004, 0x080c, 0x6558,
+	0x2001, 0x0028, 0x601a, 0x6007, 0x0052, 0x0020, 0x2001, 0x0001,
+	0x080c, 0xba90, 0x002e, 0x00be, 0x009e, 0x0005, 0x9286, 0x0139,
+	0x0160, 0x6014, 0x2048, 0x080c, 0xcb4a, 0x0140, 0xa864, 0x9086,
+	0x0139, 0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c40, 0x6010, 0x2058,
+	0xb840, 0x9084, 0x00ff, 0x9005, 0x0138, 0x8001, 0xb842, 0x601b,
+	0x000a, 0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138,
+	0x00e6, 0x2071, 0x1800, 0x080c, 0x5fb6, 0x00ee, 0x0010, 0x080c,
+	0x31c1, 0x0860, 0x080c, 0xbc98, 0x1160, 0x2001, 0x0004, 0x080c,
+	0x6558, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x9121, 0x0804,
+	0x9687, 0x080c, 0xb824, 0x9006, 0x0804, 0xba90, 0x0489, 0x1160,
+	0x2001, 0x0008, 0x080c, 0x6558, 0x6003, 0x0001, 0x6007, 0x0005,
+	0x080c, 0x9121, 0x0804, 0x9687, 0x2001, 0x0001, 0x0804, 0xba90,
+	0x00f9, 0x1160, 0x2001, 0x000a, 0x080c, 0x6558, 0x6003, 0x0001,
+	0x6007, 0x0001, 0x080c, 0x9121, 0x0804, 0x9687, 0x2001, 0x0001,
+	0x0804, 0xba90, 0x2009, 0x026e, 0x2104, 0x9086, 0x0003, 0x1138,
+	0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x2a00, 0x0005,
+	0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016, 0x6110, 0x2158,
+	0x080c, 0x6617, 0x001e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x00f6,
+	0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010, 0x2058, 0x2009, 0x1837,
+	0x2104, 0x9085, 0x0003, 0x200a, 0x080c, 0xbd3e, 0x0560, 0x2009,
+	0x1837, 0x2104, 0xc0cd, 0x200a, 0x080c, 0x6977, 0x0158, 0x9006,
+	0x2020, 0x2009, 0x002a, 0x080c, 0xe5cf, 0x2001, 0x180c, 0x200c,
+	0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x080c, 0x318c,
+	0x00e6, 0x2071, 0x1800, 0x080c, 0x2f98, 0x00ee, 0x00c6, 0x0156,
+	0x20a9, 0x0781, 0x2009, 0x007f, 0x080c, 0x32bd, 0x8108, 0x1f04,
+	0xbcdc, 0x015e, 0x00ce, 0x080c, 0xbc9b, 0x2071, 0x0260, 0x2079,
+	0x0200, 0x7817, 0x0001, 0x2001, 0x1837, 0x200c, 0xc1c5, 0x7018,
+	0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc, 0x1108, 0xc1c4,
+	0x7817, 0x0000, 0x2001, 0x1837, 0x2102, 0x2079, 0x0100, 0x2e04,
+	0x9084, 0x00ff, 0x2069, 0x181f, 0x206a, 0x78e6, 0x0006, 0x8e70,
+	0x2e04, 0x2069, 0x1820, 0x206a, 0x78ea, 0x7832, 0x7836, 0x2010,
+	0x9084, 0xff00, 0x001e, 0x9105, 0x2009, 0x182c, 0x200a, 0x2200,
+	0x9084, 0x00ff, 0x2008, 0x080c, 0x2889, 0x080c, 0x73a5, 0x0170,
+	0x2071, 0x0260, 0x2069, 0x1981, 0x7048, 0x206a, 0x704c, 0x6806,
+	0x7050, 0x680a, 0x7054, 0x680e, 0x080c, 0xcf5e, 0x0040, 0x2001,
+	0x0006, 0x080c, 0x6558, 0x080c, 0x31ea, 0x080c, 0xae71, 0x001e,
+	0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096, 0x0026,
+	0x0036, 0x00e6, 0x0156, 0x2019, 0x182c, 0x231c, 0x83ff, 0x01f0,
+	0x2071, 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084, 0xff00,
+	0x9205, 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48,
+	0x2019, 0x000a, 0x080c, 0xbe30, 0x1148, 0x2011, 0x027a, 0x20a9,
+	0x0004, 0x2019, 0x0006, 0x080c, 0xbe30, 0x1100, 0x015e, 0x00ee,
+	0x003e, 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260, 0x7034,
+	0x9086, 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188, 0x703c,
+	0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138, 0x7054,
+	0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056, 0x0046,
+	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19ef, 0x252c,
+	0x2021, 0x19f5, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7254,
+	0x7074, 0x9202, 0x1a04, 0xbdfc, 0x080c, 0x896a, 0x0904, 0xbdf5,
+	0x080c, 0xe600, 0x0904, 0xbdf5, 0x6720, 0x9786, 0x0007, 0x0904,
+	0xbdf5, 0x2500, 0x9c06, 0x0904, 0xbdf5, 0x2400, 0x9c06, 0x05e8,
+	0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1580, 0x00c6, 0x6000, 0x9086,
+	0x0004, 0x1110, 0x080c, 0x1a60, 0x9786, 0x000a, 0x0148, 0x080c,
+	0xcd50, 0x1130, 0x00ce, 0x080c, 0xb824, 0x080c, 0xaea2, 0x00e8,
+	0x6014, 0x2048, 0x080c, 0xcb4a, 0x01a8, 0x9786, 0x0003, 0x1530,
+	0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048,
+	0x080c, 0x0fb1, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6c7a,
+	0x080c, 0xcd33, 0x080c, 0xaea2, 0x00ce, 0x9ce0, 0x0018, 0x7068,
+	0x9c02, 0x1210, 0x0804, 0xbd9f, 0x012e, 0x000e, 0x002e, 0x004e,
+	0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005, 0x9786, 0x0006,
+	0x1118, 0x080c, 0xe572, 0x0c30, 0x9786, 0x0009, 0x1148, 0x6000,
+	0x9086, 0x0004, 0x0d08, 0x2009, 0x004c, 0x080c, 0xaeec, 0x08e0,
+	0x9786, 0x000a, 0x0938, 0x0820, 0x220c, 0x2304, 0x9106, 0x1130,
+	0x8210, 0x8318, 0x1f04, 0xbe1c, 0x9006, 0x0005, 0x2304, 0x9102,
+	0x0218, 0x2001, 0x0001, 0x0008, 0x9006, 0x918d, 0x0001, 0x0005,
+	0x0136, 0x01c6, 0x0016, 0x8906, 0x8006, 0x8007, 0x908c, 0x003f,
+	0x21e0, 0x9084, 0xffc0, 0x9300, 0x2098, 0x3518, 0x20a9, 0x0001,
+	0x220c, 0x4002, 0x910e, 0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006,
+	0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x9102, 0x0218, 0x2001,
+	0x0001, 0x0010, 0x2001, 0x0000, 0x918d, 0x0001, 0x001e, 0x01ce,
+	0x013e, 0x0005, 0x220c, 0x810f, 0x2304, 0x9106, 0x1130, 0x8210,
+	0x8318, 0x1f04, 0xbe5a, 0x9006, 0x0005, 0x918d, 0x0001, 0x0005,
+	0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dd5, 0x080c, 0xcd3f, 0x0120,
+	0x080c, 0xcd50, 0x0168, 0x0028, 0x080c, 0x31ea, 0x080c, 0xcd50,
+	0x0138, 0x080c, 0x957b, 0x080c, 0xae71, 0x080c, 0x9687, 0x0005,
+	0x080c, 0xb824, 0x0cb0, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040,
+	0x0208, 0x000a, 0x0005, 0xbe9f, 0xbe9f, 0xbe9f, 0xbe9f, 0xbe9f,
+	0xbe9f, 0xbe9f, 0xbe9f, 0xbe9f, 0xbe9f, 0xbe9f, 0xbea1, 0xbea1,
+	0xbea1, 0xbea1, 0xbe9f, 0xbe9f, 0xbe9f, 0xbea1, 0xbe9f, 0x080c,
+	0x0dd5, 0x600b, 0xffff, 0x6003, 0x0001, 0x6106, 0x080c, 0x90d9,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x9687, 0x012e, 0x0005, 0x9186,
+	0x0013, 0x1128, 0x6004, 0x9082, 0x0040, 0x0804, 0xbf56, 0x9186,
+	0x0027, 0x1520, 0x080c, 0x957b, 0x080c, 0x31c1, 0x080c, 0xd25f,
+	0x0096, 0x6114, 0x2148, 0x080c, 0xcb4a, 0x0198, 0x080c, 0xcd50,
+	0x1118, 0x080c, 0xb824, 0x0068, 0xa867, 0x0103, 0xa87b, 0x0029,
+	0xa877, 0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c, 0x6c86, 0x080c,
+	0xcd33, 0x009e, 0x080c, 0xae71, 0x0804, 0x9687, 0x9186, 0x0014,
+	0x1120, 0x6004, 0x9082, 0x0040, 0x04a0, 0x9186, 0x0046, 0x0150,
+	0x9186, 0x0045, 0x0138, 0x9186, 0x0053, 0x0120, 0x9186, 0x0048,
+	0x190c, 0x0dd5, 0x2001, 0x0109, 0x2004, 0xd084, 0x0508, 0x0126,
+	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x0036, 0x00f6, 0x00e6,
+	0x00c6, 0x2079, 0x19e6, 0x2071, 0x1800, 0x2061, 0x0100, 0x080c,
+	0x8fbe, 0x00ce, 0x00ee, 0x00fe, 0x003e, 0x002e, 0x001e, 0x000e,
+	0x012e, 0xa001, 0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0xbf94,
+	0x0005, 0x0002, 0xbf30, 0xbf2e, 0xbf2e, 0xbf2e, 0xbf2e, 0xbf2e,
+	0xbf2e, 0xbf2e, 0xbf2e, 0xbf2e, 0xbf2e, 0xbf4b, 0xbf4b, 0xbf4b,
+	0xbf4b, 0xbf2e, 0xbf4b, 0xbf2e, 0xbf4b, 0xbf2e, 0x080c, 0x0dd5,
+	0x080c, 0x957b, 0x0096, 0x6114, 0x2148, 0x080c, 0xcb4a, 0x0168,
+	0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ec,
+	0xa882, 0x080c, 0x6c86, 0x080c, 0xcd33, 0x009e, 0x080c, 0xae71,
+	0x080c, 0x9687, 0x0005, 0x080c, 0x957b, 0x080c, 0xcd50, 0x090c,
+	0xb824, 0x080c, 0xae71, 0x080c, 0x9687, 0x0005, 0x0002, 0xbf6d,
+	0xbf6b, 0xbf6b, 0xbf6b, 0xbf6b, 0xbf6b, 0xbf6b, 0xbf6b, 0xbf6b,
+	0xbf6b, 0xbf6b, 0xbf84, 0xbf84, 0xbf84, 0xbf84, 0xbf6b, 0xbf8e,
+	0xbf6b, 0xbf84, 0xbf6b, 0x080c, 0x0dd5, 0x0096, 0x080c, 0x957b,
+	0x6014, 0x2048, 0x2001, 0x1987, 0x2004, 0x6042, 0xa97c, 0xd1ac,
+	0x0140, 0x6003, 0x0004, 0xa87c, 0x9085, 0x0400, 0xa87e, 0x009e,
+	0x0005, 0x6003, 0x0002, 0x0cb8, 0x080c, 0x957b, 0x080c, 0xd262,
+	0x080c, 0xd267, 0x6003, 0x000f, 0x0804, 0x9687, 0x080c, 0x957b,
+	0x080c, 0xae71, 0x0804, 0x9687, 0x9182, 0x0054, 0x1220, 0x9182,
+	0x0040, 0x0208, 0x000a, 0x0005, 0xbfb0, 0xbfb0, 0xbfb0, 0xbfb0,
+	0xbfb0, 0xbfb2, 0xc08f, 0xbfb0, 0xc0c3, 0xbfb0, 0xbfb0, 0xbfb0,
+	0xbfb0, 0xbfb0, 0xbfb0, 0xbfb0, 0xbfb0, 0xbfb0, 0xbfb0, 0xc0c3,
+	0x080c, 0x0dd5, 0x00b6, 0x0096, 0x6114, 0x2148, 0x7644, 0x96b4,
+	0x0fff, 0x86ff, 0x1528, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904,
+	0xc07e, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0xa87c, 0xd0ac,
+	0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xc258, 0x080c, 0x6aa2,
+	0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x7044,
+	0xd0e4, 0x1904, 0xc062, 0x080c, 0xae71, 0x009e, 0x00be, 0x0005,
+	0x968c, 0x0c00, 0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904,
+	0xc066, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186,
+	0x0002, 0x0508, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8,
+	0xd6dc, 0x01a0, 0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938,
+	0xaa34, 0x2100, 0x9205, 0x0148, 0x7048, 0x9106, 0x1118, 0x704c,
+	0x9206, 0x0118, 0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118,
+	0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76,
+	0x901e, 0xd6c4, 0x01d8, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005,
+	0x1118, 0xc6c4, 0x0804, 0xbfb9, 0x735c, 0xab86, 0x83ff, 0x0170,
+	0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019,
+	0x0018, 0x2011, 0x0025, 0x080c, 0xc743, 0x003e, 0xd6cc, 0x0904,
+	0xbfce, 0x7154, 0xa98a, 0x81ff, 0x0904, 0xbfce, 0x9192, 0x0021,
+	0x1278, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xc743,
+	0x2011, 0x0205, 0x2013, 0x0000, 0x080c, 0xd1ef, 0x0804, 0xbfce,
+	0xa868, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6,
+	0x2950, 0x080c, 0xc6e2, 0x00ae, 0x080c, 0xd1ef, 0x080c, 0xc733,
+	0x0804, 0xbfd0, 0x080c, 0xce48, 0x0804, 0xbfdd, 0xa87c, 0xd0ac,
+	0x0904, 0xbfe9, 0xa880, 0xd0bc, 0x1904, 0xbfe9, 0x7348, 0xa838,
+	0x9306, 0x11c8, 0x734c, 0xa834, 0x931e, 0x0904, 0xbfe9, 0xd6d4,
+	0x0190, 0xab38, 0x9305, 0x0904, 0xbfe9, 0x0068, 0xa87c, 0xd0ac,
+	0x0904, 0xbfc1, 0xa838, 0xa934, 0x9105, 0x0904, 0xbfc1, 0xa880,
+	0xd0bc, 0x1904, 0xbfc1, 0x080c, 0xce82, 0x0804, 0xbfdd, 0x0096,
+	0x00f6, 0x6003, 0x0003, 0x6007, 0x0043, 0x2079, 0x026c, 0x7c04,
+	0x7b00, 0x7e0c, 0x7d08, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0140,
+	0x6003, 0x0002, 0x00fe, 0x009e, 0x0005, 0x2130, 0x2228, 0x0058,
+	0x2400, 0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213, 0x2600, 0x9102,
+	0x2500, 0x9203, 0x0e90, 0xac36, 0xab3a, 0xae46, 0xad4a, 0x00fe,
+	0x6043, 0x0000, 0x2c10, 0x080c, 0x1baf, 0x080c, 0x913e, 0x080c,
+	0x97b5, 0x009e, 0x0005, 0x0005, 0x9182, 0x0054, 0x1220, 0x9182,
+	0x0040, 0x0208, 0x000a, 0x0005, 0xc0e0, 0xc0e0, 0xc0e0, 0xc0e0,
+	0xc0e0, 0xc0e2, 0xc178, 0xc0e0, 0xc0e0, 0xc18f, 0xc21b, 0xc0e0,
+	0xc0e0, 0xc0e0, 0xc0e0, 0xc230, 0xc0e0, 0xc0e0, 0xc0e0, 0xc0e0,
 	0x080c, 0x0dd5, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260,
 	0x6114, 0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5,
 	0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211,
-	0xba3e, 0x00be, 0x86ff, 0x0904, 0xc319, 0x9694, 0xff00, 0x9284,
+	0xba3e, 0x00be, 0x86ff, 0x0904, 0xc173, 0x9694, 0xff00, 0x9284,
 	0x0c00, 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300,
-	0x0904, 0xc319, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118,
-	0xc6c4, 0xb676, 0x0c38, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0x2900,
-	0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e, 0xa867, 0x0103, 0xb068,
-	0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872, 0x7044, 0x9084, 0xf000,
-	0x9635, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, 0x734c,
-	0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, 0x0028,
-	0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015,
-	0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000,
-	0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190,
-	0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019,
-	0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c,
-	0xc730, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8,
-	0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029,
-	0x080c, 0xc730, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068,
-	0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c,
-	0xc6cf, 0x080c, 0x1a3c, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005,
-	0x2001, 0x1988, 0x2004, 0x6042, 0x0096, 0x6114, 0x2148, 0xa83c,
-	0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc, 0xa87e, 0x6003, 0x0002,
-	0xa97c, 0xd1e4, 0x0904, 0xc44c, 0x6043, 0x0000, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904, 0xc41b,
-	0xa978, 0xa868, 0xd0fc, 0x0904, 0xc3dc, 0x0016, 0xa87c, 0x0006,
-	0xa880, 0x0006, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6,
-	0x0002, 0x0904, 0xc3aa, 0x9086, 0x0028, 0x1904, 0xc396, 0xa87b,
-	0x001c, 0xb07b, 0x001c, 0x0804, 0xc3b2, 0x6024, 0xd0f4, 0x11d0,
-	0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838, 0xaa90, 0x9206, 0x1120,
-	0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024, 0xd0d4, 0x1148, 0xa9ac,
-	0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838, 0x9103, 0x603e, 0x6024,
-	0xc0f5, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb83c, 0x8000, 0xb83e,
-	0x00be, 0x9006, 0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4, 0xa87e,
-	0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048, 0x080c,
-	0x0fb1, 0x009e, 0x080c, 0xce68, 0x0804, 0xc44c, 0xd1dc, 0x0158,
-	0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xd0f8, 0x0118, 0xb174,
-	0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b,
-	0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115,
-	0x190c, 0xc245, 0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c, 0xb08e,
-	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9, 0x0020,
-	0x8a06, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e0, 0x9084, 0xffc0,
-	0x9080, 0x0019, 0x2098, 0x4003, 0x00ae, 0x000e, 0xa882, 0x000e,
-	0xa87e, 0x080c, 0xd1d5, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c,
-	0x0fb1, 0x001e, 0x0804, 0xc448, 0x0016, 0x00a6, 0x2150, 0xb174,
-	0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028, 0x1128,
-	0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158, 0xa87b,
-	0x0015, 0xb07b, 0x0015, 0x080c, 0xd0f8, 0x0118, 0xb174, 0xc1dc,
-	0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007,
-	0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c,
-	0xc245, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e, 0x00ae,
-	0x080c, 0x0fb1, 0x009e, 0x080c, 0xd1d5, 0xa974, 0x0016, 0x080c,
-	0xc720, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff,
-	0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c,
-	0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c, 0xd0f8, 0x0118,
-	0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b, 0x0007,
-	0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xc245, 0xa974, 0x0016, 0x080c, 0x6a9d, 0x001e,
-	0xd1e4, 0x1120, 0x080c, 0xae61, 0x009e, 0x0005, 0x080c, 0xce2e,
-	0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0xd1e4, 0x190c, 0x1a4a,
-	0x009e, 0x0005, 0x080c, 0x9588, 0x0010, 0x080c, 0x963d, 0x080c,
-	0xcb35, 0x01f0, 0x0096, 0x6114, 0x2148, 0x080c, 0xcd3b, 0x1118,
-	0x080c, 0xb813, 0x00a0, 0xa867, 0x0103, 0x2009, 0x180c, 0x210c,
-	0xd18c, 0x11b8, 0xd184, 0x1190, 0x6108, 0xa97a, 0x918e, 0x0029,
-	0x1110, 0x080c, 0xe908, 0xa877, 0x0000, 0x080c, 0x6c81, 0x009e,
-	0x080c, 0xae61, 0x080c, 0x968d, 0x0804, 0x97b9, 0xa87b, 0x0004,
-	0x0c90, 0xa87b, 0x0004, 0x0c78, 0x9182, 0x0054, 0x1220, 0x9182,
-	0x0040, 0x0208, 0x000a, 0x0005, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8,
-	0xc4a8, 0xc4aa, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8,
-	0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8,
-	0x080c, 0x0dd5, 0x080c, 0x56d7, 0x01f8, 0x6014, 0x7144, 0x918c,
-	0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294, 0x00ff, 0x0096,
-	0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086, 0x0139, 0x0128,
-	0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897, 0x4000, 0xa99a,
-	0xaa9e, 0x080c, 0x6c81, 0x009e, 0x0804, 0xae61, 0x9182, 0x0085,
-	0x0002, 0xc4e0, 0xc4de, 0xc4de, 0xc4ec, 0xc4de, 0xc4de, 0xc4de,
-	0xc4de, 0xc4de, 0xc4de, 0xc4de, 0xc4de, 0xc4de, 0x080c, 0x0dd5,
-	0x6003, 0x0001, 0x6106, 0x080c, 0x90f0, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x968d, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6, 0x00e6,
-	0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c, 0xcb23, 0x01a0,
-	0x2268, 0x6800, 0x9086, 0x0000, 0x0178, 0x6010, 0x6d10, 0x952e,
-	0x1158, 0x00c6, 0x2d60, 0x080c, 0xc75b, 0x00ce, 0x0128, 0x6803,
-	0x0002, 0x6007, 0x0086, 0x0010, 0x6007, 0x0087, 0x6003, 0x0001,
-	0x080c, 0x90f0, 0x080c, 0x968d, 0x9280, 0x0004, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824, 0xd0ec, 0x0128, 0x00c6,
-	0x2260, 0x080c, 0xce68, 0x00ce, 0x00ee, 0x00de, 0x005e, 0x002e,
-	0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c,
-	0x0dd5, 0x908a, 0x0092, 0x1a0c, 0x0dd5, 0x9082, 0x0085, 0x00e2,
-	0x9186, 0x0027, 0x0120, 0x9186, 0x0014, 0x190c, 0x0dd5, 0x080c,
-	0x9588, 0x0096, 0x6014, 0x2048, 0x080c, 0xcb35, 0x0140, 0xa867,
-	0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6c81, 0x009e,
-	0x080c, 0xae92, 0x0804, 0x968d, 0xc561, 0xc563, 0xc563, 0xc561,
-	0xc561, 0xc561, 0xc561, 0xc561, 0xc561, 0xc561, 0xc561, 0xc561,
-	0xc561, 0x080c, 0x0dd5, 0x080c, 0x9588, 0x080c, 0xae92, 0x080c,
-	0x968d, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0085,
-	0x2008, 0x04b8, 0x9186, 0x0027, 0x11f8, 0x080c, 0x9588, 0x080c,
-	0x31bf, 0x080c, 0xd245, 0x0096, 0x6014, 0x2048, 0x080c, 0xcb35,
-	0x0150, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c,
-	0x6c81, 0x080c, 0xcd1e, 0x009e, 0x080c, 0xae61, 0x080c, 0x968d,
-	0x0005, 0x080c, 0xaef7, 0x0ce0, 0x9186, 0x0014, 0x1dd0, 0x080c,
-	0x9588, 0x0096, 0x6014, 0x2048, 0x080c, 0xcb35, 0x0d60, 0xa867,
-	0x0103, 0xa877, 0x0000, 0xa87b, 0x0006, 0xa880, 0xc0ec, 0xa882,
-	0x08f0, 0x0002, 0xc5b9, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7,
-	0xc5d1, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0x080c,
-	0x0dd5, 0x080c, 0x9588, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
-	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1986, 0x0010,
-	0x2001, 0x1987, 0x2004, 0x601a, 0x6003, 0x000c, 0x080c, 0x968d,
-	0x0005, 0x080c, 0x9588, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
-	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1986, 0x0010,
-	0x2001, 0x1987, 0x2004, 0x601a, 0x6003, 0x000e, 0x080c, 0x968d,
-	0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208, 0x0012,
-	0x0804, 0xaef7, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc601, 0xc64e,
-	0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0x080c,
-	0x0dd5, 0x0096, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x0168, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118,
-	0x9186, 0x0035, 0x1118, 0x009e, 0x0804, 0xc662, 0x080c, 0xcb35,
-	0x1118, 0x080c, 0xcd1e, 0x0068, 0x6014, 0x2048, 0xa87c, 0xd0e4,
-	0x1110, 0x080c, 0xcd1e, 0xa867, 0x0103, 0x080c, 0xd210, 0x080c,
-	0x6c81, 0x00d6, 0x2c68, 0x080c, 0xae0b, 0x01d0, 0x6003, 0x0001,
-	0x6007, 0x001e, 0x600b, 0xffff, 0x2009, 0x026e, 0x210c, 0x613a,
-	0x2009, 0x026f, 0x210c, 0x613e, 0x6910, 0x6112, 0x080c, 0xcfaa,
-	0x6954, 0x6156, 0x6023, 0x0001, 0x080c, 0x90f0, 0x080c, 0x968d,
-	0x2d60, 0x00de, 0x080c, 0xae61, 0x009e, 0x0005, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0035, 0x0130, 0x9186, 0x001e, 0x0118, 0x9186,
-	0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c, 0xd1a8, 0x11f0, 0x080c,
-	0xae0b, 0x01d8, 0x6106, 0x6003, 0x0001, 0x6023, 0x0001, 0x6910,
-	0x6112, 0x692c, 0x612e, 0x6930, 0x6132, 0x6934, 0x918c, 0x00ff,
-	0x6136, 0x6938, 0x613a, 0x693c, 0x613e, 0x6954, 0x6156, 0x080c,
-	0xcfaa, 0x080c, 0x90f0, 0x080c, 0x968d, 0x2d60, 0x00de, 0x0804,
-	0xae61, 0x0096, 0x6014, 0x2048, 0x080c, 0xcb35, 0x01c8, 0xa867,
-	0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec, 0xa882, 0xa87b, 0x0006,
-	0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005,
-	0x080c, 0xce2a, 0xa877, 0x0000, 0x080c, 0x6c81, 0x080c, 0xcd1e,
-	0x009e, 0x0804, 0xae61, 0x0016, 0x0096, 0x6014, 0x2048, 0x080c,
-	0xcb35, 0x0140, 0xa867, 0x0103, 0xa87b, 0x0028, 0xa877, 0x0000,
-	0x080c, 0x6c81, 0x009e, 0x001e, 0x9186, 0x0013, 0x0148, 0x9186,
-	0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0xaef7, 0x0030,
-	0x080c, 0x9588, 0x080c, 0xae92, 0x080c, 0x968d, 0x0005, 0x0056,
-	0x0066, 0x0096, 0x00a6, 0x2029, 0x0001, 0x9182, 0x0101, 0x1208,
-	0x0010, 0x2009, 0x0100, 0x2130, 0x8304, 0x9098, 0x0018, 0x2009,
-	0x0020, 0x2011, 0x0029, 0x080c, 0xc730, 0x96b2, 0x0020, 0xb004,
-	0x904d, 0x0110, 0x080c, 0x0fb1, 0x080c, 0x0fff, 0x0520, 0x8528,
-	0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d,
-	0x1228, 0x2608, 0x2011, 0x001b, 0x0499, 0x00a8, 0x96b2, 0x003c,
-	0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x0451, 0x0c28, 0x2001,
-	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566,
-	0x95ac, 0x0000, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae,
-	0x852f, 0x95ad, 0x0003, 0xb566, 0x009e, 0x006e, 0x005e, 0x0005,
-	0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055, 0x0130, 0xa807, 0x0000,
-	0x080c, 0x6c81, 0x2a48, 0x0cb8, 0x080c, 0x6c81, 0x00ae, 0x0005,
-	0x00f6, 0x2079, 0x0200, 0x7814, 0x9085, 0x0080, 0x7816, 0xd184,
-	0x0108, 0x8108, 0x810c, 0x20a9, 0x0001, 0xa860, 0x20e8, 0xa85c,
-	0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300, 0x9e00, 0x2098, 0x4003,
-	0x8318, 0x9386, 0x0020, 0x1148, 0x2018, 0x2300, 0x9e00, 0x2098,
-	0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x8109, 0x1d80, 0x7817,
-	0x0000, 0x00fe, 0x0005, 0x0066, 0x0126, 0x2091, 0x8000, 0x2031,
-	0x0001, 0x6020, 0x9084, 0x000f, 0x0083, 0x012e, 0x006e, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x0066, 0x2031, 0x0000, 0x6020, 0x9084,
-	0x000f, 0x001b, 0x006e, 0x012e, 0x0005, 0xc796, 0xc796, 0xc791,
-	0xc7b8, 0xc784, 0xc791, 0xc7b8, 0xc791, 0xc784, 0x8ed9, 0xc791,
-	0xc791, 0xc791, 0xc784, 0xc784, 0x080c, 0x0dd5, 0x0036, 0x2019,
-	0x0010, 0x080c, 0xe134, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e,
-	0x0005, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x0096, 0x86ff,
-	0x11d8, 0x6014, 0x2048, 0x080c, 0xcb35, 0x01c0, 0xa864, 0x9086,
-	0x0139, 0x1128, 0xa87b, 0x0005, 0xa883, 0x0000, 0x0028, 0x900e,
-	0x2001, 0x0005, 0x080c, 0x6ec0, 0x080c, 0xce2a, 0x080c, 0x6c75,
-	0x080c, 0xae92, 0x9085, 0x0001, 0x009e, 0x0005, 0x9006, 0x0ce0,
-	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0002, 0xc7ce, 0xc7fc,
-	0xc7d0, 0xc81d, 0xc7f7, 0xc7ce, 0xc791, 0xc796, 0xc796, 0xc791,
-	0xc791, 0xc791, 0xc791, 0xc791, 0xc791, 0xc791, 0x080c, 0x0dd5,
-	0x86ff, 0x1510, 0x6020, 0x9086, 0x0006, 0x01f0, 0x0096, 0x6014,
-	0x2048, 0x080c, 0xcb35, 0x0158, 0xa87c, 0xd0cc, 0x0130, 0x0096,
-	0xa878, 0x2048, 0x080c, 0x0fb1, 0x009e, 0x080c, 0xce2a, 0x009e,
-	0x080c, 0xd1ea, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002,
-	0x080c, 0x90f0, 0x080c, 0x968d, 0x9085, 0x0001, 0x0005, 0x0066,
-	0x080c, 0x1a5e, 0x006e, 0x08a0, 0x00e6, 0x2071, 0x19e7, 0x7024,
-	0x9c06, 0x1120, 0x080c, 0xa540, 0x00ee, 0x0850, 0x6020, 0x9084,
-	0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096, 0x2049, 0x0001,
-	0x2c40, 0x080c, 0xa69c, 0x009e, 0x008e, 0x0010, 0x080c, 0xa43d,
-	0x00ee, 0x1904, 0xc7d0, 0x0804, 0xc791, 0x0036, 0x00e6, 0x2071,
-	0x19e7, 0x703c, 0x9c06, 0x1138, 0x901e, 0x080c, 0xa5b6, 0x00ee,
-	0x003e, 0x0804, 0xc7d0, 0x080c, 0xa7cc, 0x00ee, 0x003e, 0x1904,
-	0xc7d0, 0x0804, 0xc791, 0x00c6, 0x6020, 0x9084, 0x000f, 0x0013,
-	0x00ce, 0x0005, 0xc850, 0xc919, 0xca80, 0xc85a, 0xae92, 0xc850,
-	0xe126, 0xd252, 0xc919, 0x8eab, 0xcaff, 0xc849, 0xc849, 0xc849,
-	0xc849, 0x080c, 0x0dd5, 0x080c, 0xcd3b, 0x1110, 0x080c, 0xb813,
-	0x0005, 0x080c, 0x9588, 0x080c, 0x968d, 0x0804, 0xae61, 0x601b,
-	0x0001, 0x0005, 0x080c, 0xcb35, 0x0130, 0x6014, 0x0096, 0x2048,
-	0x2c00, 0xa896, 0x009e, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5,
-	0x0002, 0xc879, 0xc87b, 0xc89f, 0xc8b3, 0xc8d7, 0xc879, 0xc850,
-	0xc850, 0xc850, 0xc8b3, 0xc8b3, 0xc879, 0xc879, 0xc879, 0xc879,
-	0xc8bd, 0x080c, 0x0dd5, 0x00e6, 0x6014, 0x0096, 0x2048, 0xa880,
-	0xc0b5, 0xa882, 0x009e, 0x2071, 0x19e7, 0x7024, 0x9c06, 0x01a0,
-	0x080c, 0xa43d, 0x080c, 0xd1ea, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0002, 0x2001, 0x1987, 0x2004, 0x601a, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x00ee, 0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096,
-	0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x080c, 0xd1ea,
-	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x0005, 0x0096, 0x601b, 0x0001, 0x6014, 0x2048,
-	0xa880, 0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c, 0x56d7, 0x01a8,
-	0x6014, 0x0096, 0x904d, 0x0180, 0xa864, 0xa867, 0x0103, 0xa87b,
-	0x0006, 0x9086, 0x0139, 0x1140, 0xa867, 0x0139, 0xa897, 0x4005,
-	0xa89b, 0x0004, 0x080c, 0x6c81, 0x009e, 0x0804, 0xae61, 0x6014,
-	0x0096, 0x904d, 0x05c8, 0xa97c, 0xd1e4, 0x05b0, 0x2001, 0x180f,
-	0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884, 0x009e, 0x8003,
-	0x800b, 0x810b, 0x9108, 0x611a, 0x2001, 0x0030, 0x2c08, 0x080c,
-	0x15ee, 0x2001, 0x030c, 0x2004, 0x9086, 0x0041, 0x11a0, 0x6014,
-	0x0096, 0x904d, 0x090c, 0x0dd5, 0xa880, 0xd0f4, 0x1130, 0xc0f5,
-	0xa882, 0x009e, 0x601b, 0x0002, 0x0070, 0x009e, 0x2001, 0x0037,
-	0x2c08, 0x080c, 0x15ee, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009,
-	0x0048, 0x080c, 0xaedc, 0x0005, 0x009e, 0x080c, 0x1a5e, 0x0804,
-	0xc89f, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x000b, 0x0005,
-	0xc930, 0xc857, 0xc932, 0xc930, 0xc932, 0xc932, 0xc851, 0xc930,
-	0xc84b, 0xc84b, 0xc930, 0xc930, 0xc930, 0xc930, 0xc930, 0xc930,
-	0x080c, 0x0dd5, 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084, 0x00ff,
-	0x00be, 0x908a, 0x000c, 0x1a0c, 0x0dd5, 0x00b6, 0x0013, 0x00be,
-	0x0005, 0xc94d, 0xca1a, 0xc94f, 0xc98f, 0xc94f, 0xc98f, 0xc94f,
-	0xc95d, 0xc94d, 0xc98f, 0xc94d, 0xc97e, 0x080c, 0x0dd5, 0x6004,
-	0x908e, 0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e, 0x0002,
-	0x0590, 0x908e, 0x0052, 0x0904, 0xca16, 0x6004, 0x080c, 0xcd3b,
-	0x0904, 0xca33, 0x908e, 0x0004, 0x1110, 0x080c, 0x31e8, 0x908e,
-	0x0021, 0x0904, 0xca37, 0x908e, 0x0022, 0x0904, 0xca7b, 0x908e,
-	0x003d, 0x0904, 0xca37, 0x908e, 0x0039, 0x0904, 0xca3b, 0x908e,
-	0x0035, 0x0904, 0xca3b, 0x908e, 0x001e, 0x0178, 0x908e, 0x0001,
-	0x1140, 0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
-	0x0110, 0x080c, 0x31bf, 0x080c, 0xb813, 0x0804, 0xae92, 0x00c6,
-	0x00d6, 0x6104, 0x9186, 0x0016, 0x0904, 0xca07, 0x9186, 0x0002,
-	0x1904, 0xc9dc, 0x2001, 0x1837, 0x2004, 0xd08c, 0x11c8, 0x080c,
-	0x73bc, 0x11b0, 0x080c, 0xd230, 0x0138, 0x080c, 0x73df, 0x1120,
-	0x080c, 0x72cc, 0x0804, 0xca64, 0x2001, 0x197d, 0x2003, 0x0001,
-	0x2001, 0x1800, 0x2003, 0x0001, 0x080c, 0x72ee, 0x0804, 0xca64,
-	0x6010, 0x2058, 0x2001, 0x1837, 0x2004, 0xd0ac, 0x1904, 0xca64,
-	0xb8a0, 0x9084, 0xff80, 0x1904, 0xca64, 0xb840, 0x9084, 0x00ff,
-	0x9005, 0x0190, 0x8001, 0xb842, 0x6017, 0x0000, 0x6023, 0x0007,
-	0x601b, 0x0398, 0x6043, 0x0000, 0x080c, 0xae0b, 0x0128, 0x2b00,
-	0x6012, 0x6023, 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004, 0x908e,
-	0x0002, 0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170,
-	0x2009, 0x1837, 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071, 0x1800,
-	0x080c, 0x5fad, 0x00ee, 0x080c, 0xb813, 0x0030, 0x080c, 0xb813,
-	0x080c, 0x31bf, 0x080c, 0xd245, 0x00e6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x31e8, 0x012e, 0x00ee, 0x080c, 0xae92, 0x0005, 0x2001,
-	0x0002, 0x080c, 0x654f, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c,
-	0x9138, 0x080c, 0x968d, 0x00de, 0x00ce, 0x0c80, 0x080c, 0x31e8,
-	0x0804, 0xc98b, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38,
-	0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904, 0xc9dc,
-	0x8001, 0xb842, 0x6003, 0x0001, 0x080c, 0x9138, 0x080c, 0x968d,
-	0x00de, 0x00ce, 0x0898, 0x080c, 0xb813, 0x0804, 0xc98d, 0x080c,
-	0xb84f, 0x0804, 0xc98d, 0x00d6, 0x2c68, 0x6104, 0x080c, 0xd1a8,
-	0x00de, 0x0118, 0x080c, 0xae61, 0x00f0, 0x6004, 0x8007, 0x6134,
-	0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0002, 0x603c, 0x600a, 0x2001, 0x1987, 0x2004, 0x601a,
-	0x602c, 0x2c08, 0x2060, 0x6024, 0xc0b5, 0x6026, 0x2160, 0x080c,
-	0x90f0, 0x080c, 0x968d, 0x0005, 0x00de, 0x00ce, 0x080c, 0xb813,
-	0x080c, 0x31bf, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x31e8,
-	0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x6043, 0x0000,
-	0x012e, 0x00ee, 0x0005, 0x080c, 0xb291, 0x1904, 0xca33, 0x0005,
-	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0096, 0x00d6, 0x001b,
-	0x00de, 0x009e, 0x0005, 0xca9b, 0xca9b, 0xca9b, 0xca9b, 0xca9b,
-	0xca9b, 0xca9b, 0xca9b, 0xca9b, 0xc850, 0xca9b, 0xc857, 0xca9d,
-	0xc857, 0xcaaa, 0xca9b, 0x080c, 0x0dd5, 0x6004, 0x9086, 0x008b,
-	0x0148, 0x6007, 0x008b, 0x6003, 0x000d, 0x080c, 0x90f0, 0x080c,
-	0x968d, 0x0005, 0x080c, 0xd224, 0x0118, 0x080c, 0xd237, 0x0010,
-	0x080c, 0xd245, 0x080c, 0xcd1e, 0x080c, 0xcb35, 0x0570, 0x080c,
-	0x31bf, 0x080c, 0xcb35, 0x0168, 0x6014, 0x2048, 0xa867, 0x0103,
-	0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c,
-	0x6c81, 0x2c68, 0x080c, 0xae0b, 0x0150, 0x6810, 0x6012, 0x080c,
-	0xcfaa, 0x00c6, 0x2d60, 0x080c, 0xae92, 0x00ce, 0x0008, 0x2d60,
-	0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001,
-	0x080c, 0x9138, 0x080c, 0x968d, 0x00c8, 0x080c, 0xd224, 0x0138,
-	0x6034, 0x9086, 0x4000, 0x1118, 0x080c, 0x31bf, 0x08d0, 0x6034,
-	0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035,
-	0x1118, 0x080c, 0x31bf, 0x0868, 0x080c, 0xae92, 0x0005, 0x6000,
-	0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0002, 0xcb15, 0xcb15, 0xcb17,
-	0xcb17, 0xcb17, 0xcb15, 0xcb15, 0xae92, 0xcb15, 0xcb15, 0xcb15,
-	0xcb15, 0xcb15, 0xcb15, 0xcb15, 0xcb15, 0x080c, 0x0dd5, 0x080c,
-	0xa7cc, 0x6114, 0x0096, 0x2148, 0xa87b, 0x0006, 0x080c, 0x6c81,
-	0x009e, 0x0804, 0xae61, 0x9284, 0x0007, 0x1158, 0x9282, 0x1cd0,
-	0x0240, 0x2001, 0x181a, 0x2004, 0x9202, 0x1218, 0x9085, 0x0001,
-	0x0005, 0x9006, 0x0ce8, 0x0096, 0x0028, 0x0096, 0x0006, 0x6014,
-	0x2048, 0x000e, 0x0006, 0x9984, 0xf000, 0x9086, 0xf000, 0x0110,
-	0x080c, 0x10aa, 0x000e, 0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x2061, 0x1cd0, 0x2071, 0x1800,
-	0x7354, 0x7074, 0x9302, 0x1640, 0x6020, 0x9206, 0x11f8, 0x080c,
-	0xd230, 0x0180, 0x9286, 0x0001, 0x1168, 0x6004, 0x9086, 0x0004,
-	0x1148, 0x080c, 0x31bf, 0x080c, 0xd245, 0x00c6, 0x080c, 0xae92,
-	0x00ce, 0x0060, 0x080c, 0xcf24, 0x0148, 0x080c, 0xcd3b, 0x1110,
-	0x080c, 0xb813, 0x00c6, 0x080c, 0xae61, 0x00ce, 0x9ce0, 0x0018,
-	0x7068, 0x9c02, 0x1208, 0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce,
-	0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016, 0x9188, 0x1000, 0x210c,
-	0x81ff, 0x0128, 0x2061, 0x1ab0, 0x6112, 0x080c, 0x31bf, 0x9006,
-	0x0010, 0x9085, 0x0001, 0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x080c, 0xae0b, 0x01b0, 0x6656, 0x2b00,
-	0x6012, 0x080c, 0x56d7, 0x0118, 0x080c, 0xcc62, 0x0168, 0x080c,
-	0xcfaa, 0x6023, 0x0003, 0x2009, 0x004b, 0x080c, 0xaedc, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0xbaa0, 0x080c, 0xaeaf, 0x0560, 0x6057, 0x0000,
-	0x2b00, 0x6012, 0x080c, 0xcfaa, 0x6023, 0x0003, 0x0016, 0x080c,
-	0x928b, 0x0076, 0x903e, 0x080c, 0x9168, 0x2c08, 0x080c, 0xe2eb,
-	0x007e, 0x001e, 0xd184, 0x0128, 0x080c, 0xae61, 0x9085, 0x0001,
-	0x0070, 0x080c, 0x56d7, 0x0128, 0xd18c, 0x1170, 0x080c, 0xcc62,
-	0x0148, 0x2009, 0x004c, 0x080c, 0xaedc, 0x9085, 0x0001, 0x012e,
-	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90, 0x2009,
-	0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046, 0x0016,
-	0x080c, 0xae0b, 0x2c78, 0x0590, 0x7e56, 0x2b00, 0x7812, 0x7823,
-	0x0003, 0x2021, 0x0005, 0x080c, 0xcc74, 0x9186, 0x004d, 0x0118,
-	0x9186, 0x004e, 0x0148, 0x2001, 0x1980, 0x200c, 0xd1fc, 0x0168,
-	0x2f60, 0x080c, 0xae61, 0x00d0, 0x2001, 0x197f, 0x200c, 0xd1fc,
-	0x0120, 0x2f60, 0x080c, 0xae61, 0x0088, 0x2f60, 0x080c, 0x56d7,
-	0x0138, 0xd18c, 0x1118, 0x04f1, 0x0148, 0x0010, 0x2900, 0x7816,
-	0x001e, 0x0016, 0x080c, 0xaedc, 0x9085, 0x0001, 0x001e, 0x004e,
-	0x00ce, 0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046, 0x080c, 0xae0b,
-	0x2c78, 0x0508, 0x7e56, 0x2b00, 0x7812, 0x7823, 0x0003, 0x0096,
-	0x2021, 0x0004, 0x0489, 0x009e, 0x2001, 0x197e, 0x200c, 0xd1fc,
-	0x0120, 0x2f60, 0x080c, 0xae61, 0x0060, 0x2f60, 0x080c, 0x56d7,
-	0x0120, 0xd18c, 0x1160, 0x0071, 0x0130, 0x2009, 0x0052, 0x080c,
-	0xaedc, 0x9085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900,
-	0x7816, 0x0c98, 0x00c6, 0x080c, 0x4aa4, 0x00ce, 0x1120, 0x080c,
-	0xae61, 0x9006, 0x0005, 0xa867, 0x0000, 0xa86b, 0x8000, 0x2900,
-	0x6016, 0x9085, 0x0001, 0x0005, 0x0096, 0x0076, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x6733, 0x0158, 0x2001, 0xcc79, 0x0006, 0x900e,
-	0x2400, 0x080c, 0x6ec0, 0x080c, 0x6c81, 0x000e, 0x0807, 0x2418,
-	0x080c, 0x9522, 0xbaa0, 0x0086, 0x2041, 0x0001, 0x2039, 0x0001,
-	0x2608, 0x080c, 0x92a3, 0x008e, 0x080c, 0x9168, 0x2f08, 0x2648,
-	0x080c, 0xe2eb, 0xb93c, 0x81ff, 0x090c, 0x9374, 0x080c, 0x968d,
-	0x012e, 0x007e, 0x009e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0xae0b, 0x0190, 0x660a, 0x2b08, 0x6112, 0x080c, 0xcfaa,
-	0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x001f, 0x080c, 0xaedc,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x080c, 0xaeaf, 0x01b8, 0x660a, 0x2b08,
-	0x6112, 0x080c, 0xcfaa, 0x6023, 0x0008, 0x2900, 0x6016, 0x00f6,
-	0x2c78, 0x080c, 0x1725, 0x00fe, 0x2009, 0x0021, 0x080c, 0xaedc,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009,
-	0x003d, 0x00c6, 0x0126, 0x0016, 0x2091, 0x8000, 0x080c, 0xae0b,
-	0x0198, 0x660a, 0x2b08, 0x6112, 0x080c, 0xcfaa, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x001e, 0x0016, 0x080c, 0xaedc, 0x9085, 0x0001,
-	0x001e, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x080c, 0xaeaf, 0x0188, 0x2b08, 0x6112, 0x080c,
-	0xcfaa, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0000, 0x080c,
-	0xaedc, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x2009, 0x0044, 0x0830, 0x2009, 0x0049, 0x0818, 0x0026, 0x00b6,
-	0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be,
-	0x002e, 0x0005, 0x0006, 0x0016, 0x6004, 0x908e, 0x0002, 0x0140,
-	0x908e, 0x0003, 0x0128, 0x908e, 0x0004, 0x0110, 0x9085, 0x0001,
-	0x001e, 0x000e, 0x0005, 0x0006, 0x0096, 0x6020, 0x9086, 0x0004,
-	0x0190, 0x6014, 0x904d, 0x080c, 0xcb35, 0x0168, 0xa864, 0x9086,
-	0x0139, 0x0158, 0x6020, 0x9086, 0x0003, 0x0128, 0xa868, 0xd0fc,
-	0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x000e, 0x0005,
-	0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xaeaf, 0x0198, 0x2b08,
-	0x6112, 0x080c, 0xcfaa, 0x6023, 0x0001, 0x2900, 0x6016, 0x080c,
-	0x31bf, 0x2009, 0x0028, 0x080c, 0xaedc, 0x9085, 0x0001, 0x012e,
-	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015, 0x11a8, 0x2011,
-	0x1824, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6, 0x080c, 0xba65,
-	0x00be, 0x080c, 0xbc88, 0x6003, 0x0001, 0x6007, 0x0029, 0x080c,
-	0x9138, 0x080c, 0x968d, 0x0078, 0x6014, 0x0096, 0x2048, 0xa868,
-	0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c, 0xd169, 0x080c,
-	0xb813, 0x080c, 0xae61, 0x0005, 0x0096, 0x6014, 0x904d, 0x090c,
-	0x0dd5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b,
-	0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c81,
-	0x012e, 0x009e, 0x080c, 0xae61, 0x0c30, 0x0096, 0x9186, 0x0016,
-	0x1128, 0x2001, 0x0004, 0x080c, 0x654f, 0x00e8, 0x9186, 0x0015,
-	0x1510, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014, 0x11e0, 0x6010,
-	0x00b6, 0x2058, 0x080c, 0x669a, 0x00be, 0x080c, 0xbd59, 0x1198,
-	0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005, 0x0160, 0x2001,
-	0x0006, 0x080c, 0x654f, 0x6014, 0x2048, 0xa868, 0xd0fc, 0x0170,
-	0x080c, 0xb265, 0x0048, 0x6014, 0x2048, 0xa868, 0xd0fc, 0x0528,
-	0x080c, 0xb813, 0x080c, 0xae61, 0x009e, 0x0005, 0x6014, 0x6310,
-	0x2358, 0x904d, 0x090c, 0x0dd5, 0xa87b, 0x0000, 0xa883, 0x0000,
-	0xa897, 0x4000, 0x900e, 0x080c, 0x681f, 0x1108, 0xc185, 0xb800,
-	0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6c81, 0x012e, 0x080c, 0xae61, 0x08f8, 0x6014, 0x904d, 0x090c,
-	0x0dd5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b,
-	0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c81,
-	0x012e, 0x080c, 0xae61, 0x0840, 0xa878, 0x9086, 0x0005, 0x1108,
-	0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005, 0x6043, 0x0000,
-	0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x0005, 0x00c6, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x0120, 0x6020, 0x9084, 0x000f, 0x0013, 0x00ce,
-	0x0005, 0xc850, 0xce5a, 0xce5a, 0xce5d, 0xe5fd, 0xe618, 0xe61b,
-	0xc850, 0xc850, 0xc850, 0xc850, 0xc850, 0xc850, 0xc850, 0xc850,
-	0x080c, 0x0dd5, 0xa001, 0xa001, 0x0005, 0x0096, 0x6014, 0x904d,
-	0x0118, 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010, 0x009e, 0x0005,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0550, 0x2001,
-	0x1834, 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78, 0x080c, 0xae0b,
-	0x0508, 0x7810, 0x6012, 0x080c, 0xcfaa, 0x7820, 0x9086, 0x0003,
-	0x0128, 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020, 0x7808, 0x603e,
-	0x2f00, 0x603a, 0x602e, 0x6023, 0x0001, 0x6007, 0x0035, 0x6003,
-	0x0001, 0x7954, 0x6156, 0x080c, 0x90f0, 0x080c, 0x968d, 0x2f60,
-	0x00fe, 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1988, 0x2004, 0x6042,
-	0x0005, 0x0016, 0x0096, 0x6814, 0x2048, 0xa87c, 0xd0e4, 0x0180,
-	0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000, 0xa88f, 0x0000,
-	0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048, 0x080c, 0x0fb1,
-	0x6830, 0x6036, 0x908e, 0x0001, 0x0148, 0x6803, 0x0002, 0x9086,
-	0x0005, 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0, 0x681c, 0xc085,
-	0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085, 0x0c00, 0x6826,
-	0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0, 0x693c, 0x9103,
-	0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc, 0x683a, 0x6032,
-	0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112, 0x6954, 0x6156,
-	0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x009e, 0x001e, 0x0005, 0x6024, 0xd0d4, 0x0510,
-	0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303, 0x0230, 0x9105,
-	0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a, 0x633e, 0xac3e,
-	0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402, 0xa836, 0x2300,
-	0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024, 0xc0d4, 0x0000,
-	0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a, 0xa840, 0x603e,
-	0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016, 0x6004, 0x908e,
-	0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e, 0x0036, 0x0188,
-	0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158, 0x908e, 0x0039,
-	0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b, 0x0110, 0x9085,
-	0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036,
-	0x00e6, 0x2001, 0x1982, 0x200c, 0x8000, 0x2014, 0x2001, 0x0032,
-	0x080c, 0x8f68, 0x2001, 0x1986, 0x82ff, 0x1110, 0x2011, 0x0014,
-	0x2202, 0x2001, 0x1984, 0x200c, 0x8000, 0x2014, 0x2071, 0x196c,
-	0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x8f68, 0x2001, 0x1987,
-	0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1988, 0x9288,
-	0x000a, 0x2102, 0x2001, 0x1a91, 0x2102, 0x2001, 0x0032, 0x080c,
-	0x15ee, 0x080c, 0x6953, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e,
-	0x0005, 0x0006, 0x0016, 0x00e6, 0x2001, 0x1986, 0x2003, 0x0028,
-	0x2001, 0x1987, 0x2003, 0x0014, 0x2071, 0x196c, 0x701b, 0x0000,
-	0x701f, 0x07d0, 0x2001, 0x1988, 0x2009, 0x001e, 0x2102, 0x2001,
-	0x1a91, 0x2102, 0x2001, 0x0032, 0x080c, 0x15ee, 0x00ee, 0x001e,
-	0x000e, 0x0005, 0x0096, 0x6058, 0x904d, 0x0110, 0x080c, 0x1031,
-	0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xae0b, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023, 0x0001, 0x2900,
-	0x6016, 0x2009, 0x0033, 0x080c, 0xaedc, 0x9085, 0x0001, 0x012e,
-	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6, 0x00f6, 0x2071,
-	0x1800, 0x9186, 0x0015, 0x1500, 0x7090, 0x9086, 0x0018, 0x11e0,
-	0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78, 0x080c, 0x9920,
-	0x01d8, 0x707c, 0xaa50, 0x9206, 0x1160, 0x7080, 0xaa54, 0x9206,
-	0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x900e, 0x080c,
-	0x3208, 0x080c, 0xb265, 0x0020, 0x080c, 0xb813, 0x080c, 0xae61,
-	0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa54, 0x9206, 0x0d48,
-	0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xae0b, 0x0188,
-	0x2b08, 0x6112, 0x080c, 0xcfaa, 0x6023, 0x0001, 0x2900, 0x6016,
-	0x2009, 0x004d, 0x080c, 0xaedc, 0x9085, 0x0001, 0x012e, 0x00ce,
-	0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0016,
-	0x080c, 0xae0b, 0x0180, 0x2b08, 0x6112, 0x080c, 0xcfaa, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0xaedc, 0x9085, 0x0001,
-	0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0, 0x0016, 0x0026,
-	0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6, 0x00f6, 0x2071,
-	0x1800, 0x9186, 0x0015, 0x1568, 0x7190, 0x6014, 0x2048, 0xa814,
-	0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001, 0x19a0, 0x2003,
-	0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906, 0x8006, 0x8007,
-	0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080, 0x001b, 0x20a0,
-	0x2001, 0x19a0, 0x0016, 0x200c, 0x080c, 0xd81b, 0x001e, 0xa804,
-	0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048, 0xa867, 0x0103,
-	0x0010, 0x080c, 0xb813, 0x080c, 0xae61, 0x00fe, 0x00ee, 0x009e,
-	0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x0096,
-	0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x11b8, 0x7090,
-	0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78, 0x080c, 0x9920,
-	0x01a8, 0x707c, 0xaa74, 0x9206, 0x1130, 0x7080, 0xaa78, 0x9206,
-	0x1110, 0x080c, 0x31bf, 0x080c, 0xb265, 0x0020, 0x080c, 0xb813,
-	0x080c, 0xae61, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa78,
-	0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800,
-	0x9186, 0x0015, 0x1550, 0x7090, 0x9086, 0x0004, 0x1530, 0x6014,
-	0x2048, 0x2c78, 0x080c, 0x9920, 0x05f0, 0x707c, 0xaacc, 0x9206,
-	0x1180, 0x7080, 0xaad0, 0x9206, 0x1160, 0x080c, 0x31bf, 0x0016,
-	0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5687, 0x001e,
-	0x0010, 0x080c, 0x5478, 0x080c, 0xcb35, 0x0508, 0xa87b, 0x0000,
-	0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c, 0xcb35, 0x01b8,
-	0x6014, 0x2048, 0x080c, 0x5478, 0x1d70, 0xa87b, 0x0030, 0xa883,
-	0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126, 0x2091, 0x8000,
-	0xa867, 0x0139, 0x080c, 0x6c81, 0x012e, 0x080c, 0xae61, 0x00fe,
-	0x00ee, 0x009e, 0x0005, 0x7060, 0xaad0, 0x9206, 0x0930, 0x0888,
-	0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938, 0xaa34, 0x2100,
-	0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c, 0x9206, 0x0120,
-	0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e, 0x0005, 0x00b6,
-	0x00d6, 0x0036, 0x080c, 0xcb35, 0x0904, 0xd165, 0x0096, 0x6314,
-	0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580, 0x6310, 0x00c6,
-	0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140, 0x080c, 0x681f,
-	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96, 0xa99a,
-	0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0,
-	0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0f7c,
-	0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8c8, 0x9080,
-	0x000a, 0x2098, 0x080c, 0x0f7c, 0x00ce, 0x0090, 0xaa96, 0x3918,
-	0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016, 0x0110, 0xa89b,
-	0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084, 0x00ff, 0xa89e,
-	0x080c, 0x6c75, 0x6017, 0x0000, 0x009e, 0x003e, 0x00de, 0x00be,
-	0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096, 0x00f6, 0x6214,
-	0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096, 0x0000, 0x11a0,
-	0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x283e, 0x2118, 0x831f,
-	0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d, 0x7c3c, 0x2011,
-	0x8018, 0x080c, 0x4b04, 0x00a8, 0x9096, 0x0001, 0x1148, 0x89ff,
-	0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x0048,
-	0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c,
-	0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e, 0x002e, 0x0005,
-	0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110, 0x6a38, 0x0008,
-	0x6a2c, 0x080c, 0xcb23, 0x01f0, 0x2260, 0x6120, 0x9186, 0x0003,
-	0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206, 0x0140, 0x683c,
-	0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140, 0x0020, 0x6008,
-	0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106, 0x001e, 0x002e,
-	0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974, 0xd1cc, 0x0188,
-	0x918c, 0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8, 0x918c, 0x0f00,
-	0x810f, 0x918e, 0x0001, 0x1128, 0xa834, 0xa938, 0x9115, 0x190c,
-	0xc245, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010, 0x0036, 0x901e,
-	0x0499, 0x01e0, 0x080c, 0xcb35, 0x01c8, 0x080c, 0xcd1e, 0x6037,
-	0x4000, 0x6014, 0x6017, 0x0000, 0x0096, 0x2048, 0xa87c, 0x080c,
-	0xcd3b, 0x1118, 0x080c, 0xb813, 0x0040, 0xa867, 0x0103, 0xa877,
-	0x0000, 0x83ff, 0x1129, 0x080c, 0x6c81, 0x009e, 0x003e, 0x0005,
-	0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec, 0xa882, 0x0048,
-	0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c,
-	0xce2a, 0xa877, 0x0000, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0ec,
-	0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4, 0x000e, 0x0005,
-	0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e, 0x0005, 0x0036,
-	0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0007,
-	0x080c, 0x4cbb, 0x004e, 0x003e, 0x0005, 0x0c51, 0x1d81, 0x0005,
-	0x2001, 0x1986, 0x2004, 0x601a, 0x0005, 0x2001, 0x1988, 0x2004,
-	0x6042, 0x0005, 0x080c, 0xae61, 0x0804, 0x968d, 0x00b6, 0x0066,
-	0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dd5, 0x001b, 0x006e, 0x00be,
-	0x0005, 0xd271, 0xd978, 0xdad5, 0xd271, 0xd271, 0xd271, 0xd271,
-	0xd271, 0xd2a8, 0xdb57, 0xd271, 0xd271, 0xd271, 0xd271, 0xd271,
-	0xd271, 0x080c, 0x0dd5, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
-	0x0dd5, 0x0013, 0x006e, 0x0005, 0xd28c, 0xe0bf, 0xd28c, 0xd28c,
-	0xd28c, 0xd28c, 0xd28c, 0xd28c, 0xe06c, 0xe113, 0xd28c, 0xe738,
-	0xe76e, 0xe738, 0xe76e, 0xd28c, 0x080c, 0x0dd5, 0x6000, 0x9082,
-	0x0016, 0x1a0c, 0x0dd5, 0x6000, 0x000a, 0x0005, 0xd2a6, 0xdd34,
-	0xde24, 0xde46, 0xdf05, 0xd2a6, 0xdfe3, 0xdf8d, 0xdb63, 0xe042,
-	0xe057, 0xd2a6, 0xd2a6, 0xd2a6, 0xd2a6, 0xd2a6, 0x080c, 0x0dd5,
-	0x91b2, 0x0053, 0x1a0c, 0x0dd5, 0x2100, 0x91b2, 0x0040, 0x1a04,
-	0xd6ec, 0x0002, 0xd2f2, 0xd4dd, 0xd2f2, 0xd2f2, 0xd2f2, 0xd4e6,
-	0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2,
-	0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2,
-	0xd2f2, 0xd2f4, 0xd357, 0xd366, 0xd3ca, 0xd3f5, 0xd46e, 0xd4c8,
-	0xd2f2, 0xd2f2, 0xd4e9, 0xd2f2, 0xd2f2, 0xd4fe, 0xd50b, 0xd2f2,
-	0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd58e, 0xd2f2, 0xd2f2, 0xd5a2,
-	0xd2f2, 0xd2f2, 0xd55d, 0xd2f2, 0xd2f2, 0xd2f2, 0xd5ba, 0xd2f2,
-	0xd2f2, 0xd2f2, 0xd637, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2,
-	0xd2f2, 0xd6b4, 0x080c, 0x0dd5, 0x080c, 0x6930, 0x1150, 0x2001,
-	0x1837, 0x2004, 0xd0cc, 0x1128, 0x9084, 0x0009, 0x9086, 0x0008,
-	0x1140, 0x6007, 0x0009, 0x602f, 0x0009, 0x6017, 0x0000, 0x0804,
-	0xd4d6, 0x080c, 0x68cc, 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016,
-	0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x928b,
-	0x0076, 0x903e, 0x080c, 0x9168, 0x2c08, 0x080c, 0xe2eb, 0x007e,
-	0x001e, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee, 0x6610, 0x2658,
-	0x080c, 0x660e, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1268,
-	0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x2c08,
-	0x080c, 0xe997, 0x002e, 0x001e, 0x1178, 0x080c, 0xe21d, 0x1904,
-	0xd3c2, 0x080c, 0xe1b9, 0x1120, 0x6007, 0x0008, 0x0804, 0xd4d6,
-	0x6007, 0x0009, 0x0804, 0xd4d6, 0x080c, 0xe441, 0x0128, 0x080c,
-	0xe21d, 0x0d78, 0x0804, 0xd3c2, 0x6017, 0x1900, 0x0c88, 0x080c,
-	0x32e3, 0x1904, 0xd6e9, 0x6106, 0x080c, 0xe16e, 0x6007, 0x0006,
-	0x0804, 0xd4d6, 0x6007, 0x0007, 0x0804, 0xd4d6, 0x080c, 0xe7aa,
-	0x1904, 0xd6e9, 0x080c, 0x32e3, 0x1904, 0xd6e9, 0x00d6, 0x6610,
-	0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1220, 0x2001,
-	0x0001, 0x080c, 0x653b, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006,
-	0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4, 0x00ff, 0x9686,
-	0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686, 0x0005, 0x0110,
-	0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9084, 0x0003,
-	0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030, 0x9084, 0x0003,
-	0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007, 0x00b0, 0x00ee,
-	0x080c, 0xe281, 0x1190, 0x9686, 0x0006, 0x1140, 0x0026, 0x6210,
-	0x2258, 0xbaa0, 0x900e, 0x080c, 0x3208, 0x002e, 0x080c, 0x669a,
-	0x6007, 0x000a, 0x00de, 0x0804, 0xd4d6, 0x6007, 0x000b, 0x00de,
-	0x0804, 0xd4d6, 0x080c, 0x31bf, 0x080c, 0xd245, 0x6007, 0x0001,
-	0x0804, 0xd4d6, 0x080c, 0xe7aa, 0x1904, 0xd6e9, 0x080c, 0x32e3,
-	0x1904, 0xd6e9, 0x2071, 0x0260, 0x7034, 0x90b4, 0x0003, 0x1948,
-	0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003, 0x1910, 0x6610,
-	0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026, 0x6210, 0x2258,
-	0xbaa0, 0x900e, 0x080c, 0x3208, 0x002e, 0x6007, 0x000c, 0x2001,
-	0x0001, 0x080c, 0xe977, 0x0804, 0xd4d6, 0x080c, 0x6930, 0x1140,
-	0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x1110,
-	0x0804, 0xd301, 0x080c, 0x68cc, 0x6610, 0x2658, 0xbe04, 0x9684,
-	0x00ff, 0x9082, 0x0006, 0x06c8, 0x1138, 0x0026, 0x2001, 0x0006,
-	0x080c, 0x657b, 0x002e, 0x0050, 0x96b4, 0xff00, 0x8637, 0x9686,
-	0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd3c2, 0x080c, 0xe28e,
-	0x1120, 0x6007, 0x000e, 0x0804, 0xd4d6, 0x0046, 0x6410, 0x2458,
-	0xbca0, 0x0046, 0x080c, 0x31bf, 0x080c, 0xd245, 0x004e, 0x0016,
-	0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029,
-	0x080c, 0xe5ae, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e,
-	0x004e, 0x6007, 0x0001, 0x0804, 0xd4d6, 0x2001, 0x0001, 0x080c,
-	0x653b, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019,
-	0x1805, 0x2011, 0x0270, 0x080c, 0xbe09, 0x003e, 0x002e, 0x001e,
-	0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637, 0x9682, 0x0004,
-	0x0a04, 0xd3c2, 0x9682, 0x0007, 0x0a04, 0xd41e, 0x0804, 0xd3c2,
-	0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xd4d6, 0x080c, 0x6930,
-	0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008,
-	0x1110, 0x0804, 0xd301, 0x080c, 0x68cc, 0x6610, 0x2658, 0xbe04,
-	0x9684, 0x00ff, 0x9082, 0x0006, 0x0698, 0x0150, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd3c2,
-	0x080c, 0xe2bc, 0x1130, 0x080c, 0xe1b9, 0x1118, 0x6007, 0x0010,
-	0x04e8, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x31bf,
-	0x080c, 0xd245, 0x004e, 0x0016, 0x9006, 0x2009, 0x1848, 0x210c,
-	0xd1a4, 0x0148, 0x2009, 0x0029, 0x080c, 0xe5ae, 0x6010, 0x2058,
-	0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0,
-	0x080c, 0xe441, 0x0140, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006,
-	0x0978, 0x0804, 0xd3c2, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070,
-	0x080c, 0x32e3, 0x1904, 0xd6e9, 0x080c, 0xe7aa, 0x1904, 0xd6e9,
-	0x080c, 0xd8b6, 0x1904, 0xd3c2, 0x6007, 0x0012, 0x6003, 0x0001,
-	0x080c, 0x9138, 0x080c, 0x968d, 0x0005, 0x6007, 0x0001, 0x6003,
-	0x0001, 0x080c, 0x9138, 0x080c, 0x968d, 0x0cb0, 0x6007, 0x0005,
-	0x0c68, 0x080c, 0xe7aa, 0x1904, 0xd6e9, 0x080c, 0x32e3, 0x1904,
-	0xd6e9, 0x080c, 0xd8b6, 0x1904, 0xd3c2, 0x6007, 0x0020, 0x6003,
-	0x0001, 0x080c, 0x9138, 0x080c, 0x968d, 0x0005, 0x080c, 0x32e3,
-	0x1904, 0xd6e9, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x9138,
-	0x080c, 0x968d, 0x0005, 0x080c, 0xe7aa, 0x1904, 0xd6e9, 0x080c,
-	0x32e3, 0x1904, 0xd6e9, 0x080c, 0xd8b6, 0x1904, 0xd3c2, 0x0016,
-	0x0026, 0x00e6, 0x2071, 0x0260, 0x7244, 0x9286, 0xffff, 0x0180,
-	0x2c08, 0x080c, 0xcb23, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206,
-	0x1188, 0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050,
-	0x7240, 0x2c08, 0x9006, 0x080c, 0xe578, 0x1180, 0x7244, 0x9286,
-	0xffff, 0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214,
-	0x9296, 0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086,
-	0x0007, 0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0xae61,
-	0x2160, 0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x9138, 0x080c,
-	0x968d, 0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c,
-	0x653b, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019,
-	0x1805, 0x2011, 0x0276, 0x080c, 0xbe09, 0x003e, 0x002e, 0x001e,
-	0x015e, 0x0120, 0x6007, 0x0031, 0x0804, 0xd4d6, 0x080c, 0xba7d,
-	0x080c, 0x73bc, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x73d6,
-	0x1138, 0x080c, 0x76a4, 0x080c, 0x601a, 0x080c, 0x72ee, 0x0010,
-	0x080c, 0x7394, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x32e3,
-	0x1904, 0xd6e9, 0x080c, 0xd8b6, 0x1904, 0xd3c2, 0x6106, 0x080c,
-	0xd8d2, 0x1120, 0x6007, 0x002b, 0x0804, 0xd4d6, 0x6007, 0x002c,
-	0x0804, 0xd4d6, 0x080c, 0xe7aa, 0x1904, 0xd6e9, 0x080c, 0x32e3,
-	0x1904, 0xd6e9, 0x080c, 0xd8b6, 0x1904, 0xd3c2, 0x6106, 0x080c,
-	0xd8d7, 0x1120, 0x6007, 0x002e, 0x0804, 0xd4d6, 0x6007, 0x002f,
-	0x0804, 0xd4d6, 0x080c, 0x32e3, 0x1904, 0xd6e9, 0x00e6, 0x00d6,
-	0x00c6, 0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006,
-	0x0158, 0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce,
-	0x00de, 0x00ee, 0x0804, 0xd4dd, 0x080c, 0x56d3, 0xd0e4, 0x0904,
-	0xd634, 0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108,
-	0x720c, 0x080c, 0x696e, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106,
-	0x1118, 0xb814, 0x9206, 0x0510, 0x080c, 0x696a, 0x15b8, 0x2069,
-	0x1800, 0x6880, 0x9206, 0x1590, 0x687c, 0x9106, 0x1578, 0x7210,
-	0x080c, 0xcb23, 0x0590, 0x080c, 0xd7a1, 0x0578, 0x080c, 0xe62a,
-	0x0560, 0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286,
-	0xffff, 0x0150, 0x080c, 0xcb23, 0x01c0, 0x9280, 0x0002, 0x2004,
-	0x7110, 0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001,
-	0x080c, 0xe578, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037,
-	0x602f, 0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f,
-	0x0003, 0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c,
-	0x32e3, 0x1904, 0xd6e9, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00,
-	0x8007, 0x9086, 0x0006, 0x1904, 0xd4dd, 0x00e6, 0x00d6, 0x00c6,
-	0x080c, 0x56d3, 0xd0e4, 0x0904, 0xd6ac, 0x2069, 0x1800, 0x2071,
-	0x026c, 0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150,
-	0x7208, 0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xe578, 0x2c10,
-	0x00ce, 0x05e8, 0x080c, 0xcb23, 0x05d0, 0x7108, 0x9280, 0x0002,
-	0x2004, 0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xc75b,
-	0x002e, 0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001,
-	0x0178, 0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280,
-	0x0005, 0x2004, 0x9005, 0x0170, 0x080c, 0xd7a1, 0x0904, 0xd62d,
-	0x0056, 0x7510, 0x7614, 0x080c, 0xe643, 0x005e, 0x00ce, 0x00de,
-	0x00ee, 0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00,
-	0x6003, 0x0001, 0x080c, 0x90f0, 0x080c, 0x968d, 0x0c78, 0x6007,
-	0x003b, 0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x080c,
-	0x90f0, 0x080c, 0x968d, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b,
-	0x6017, 0x0000, 0x0804, 0xd604, 0x00e6, 0x0026, 0x080c, 0x6930,
-	0x0550, 0x080c, 0x68cc, 0x080c, 0xe81c, 0x1518, 0x2071, 0x1800,
-	0x70dc, 0x9085, 0x0003, 0x70de, 0x00f6, 0x2079, 0x0100, 0x72b0,
-	0x9284, 0x00ff, 0x707e, 0x78e6, 0x9284, 0xff00, 0x7280, 0x9205,
-	0x7082, 0x78ea, 0x00fe, 0x70e7, 0x0000, 0x080c, 0x696e, 0x0120,
-	0x2011, 0x1a00, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2f96,
-	0x0010, 0x080c, 0xe84e, 0x002e, 0x00ee, 0x080c, 0xae61, 0x0804,
-	0xd4dc, 0x080c, 0xae61, 0x0005, 0x2600, 0x0002, 0xd700, 0xd731,
-	0xd742, 0xd700, 0xd700, 0xd702, 0xd753, 0xd700, 0xd700, 0xd700,
-	0xd71f, 0xd700, 0xd700, 0xd700, 0xd75e, 0xd76b, 0xd79c, 0xd700,
-	0x080c, 0x0dd5, 0x080c, 0xe7aa, 0x1d20, 0x080c, 0x32e3, 0x1d08,
-	0x080c, 0xd8b6, 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003,
-	0x0001, 0x080c, 0x9138, 0x0005, 0x080c, 0x31bf, 0x080c, 0xd245,
-	0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9138, 0x0005, 0x080c,
-	0xe7aa, 0x1938, 0x080c, 0x32e3, 0x1920, 0x080c, 0xd8b6, 0x1d60,
-	0x703c, 0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x9138,
-	0x0005, 0x080c, 0x32e3, 0x1904, 0xd6e9, 0x2009, 0x0041, 0x080c,
-	0xe857, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x9138, 0x080c,
-	0x968d, 0x0005, 0x080c, 0x32e3, 0x1904, 0xd6e9, 0x2009, 0x0042,
-	0x080c, 0xe857, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x9138,
-	0x080c, 0x968d, 0x0005, 0x080c, 0x32e3, 0x1904, 0xd6e9, 0x2009,
-	0x0046, 0x080c, 0xe857, 0x080c, 0xae61, 0x0005, 0x080c, 0xd7be,
-	0x0904, 0xd6e9, 0x6007, 0x004e, 0x6003, 0x0001, 0x080c, 0x9138,
-	0x080c, 0x968d, 0x0005, 0x6007, 0x004f, 0x6017, 0x0000, 0x7134,
-	0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, 0x1160, 0x7140,
-	0x2001, 0x19bd, 0x2004, 0x9106, 0x11b0, 0x7144, 0x2001, 0x19be,
-	0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168, 0x2011, 0x0276,
-	0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c,
-	0xbe1d, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003, 0x0001, 0x080c,
-	0x9138, 0x080c, 0x968d, 0x0005, 0x6007, 0x0050, 0x703c, 0x6016,
-	0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6, 0x2260,
-	0x6010, 0x2058, 0xb8cc, 0xd084, 0x0150, 0x7128, 0x6048, 0x9106,
-	0x1120, 0x712c, 0x6044, 0x9106, 0x0110, 0x9006, 0x0010, 0x9085,
-	0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005, 0x0016, 0x0096,
-	0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x1800, 0x7090, 0x908a, 0x00f9, 0x16e8, 0x20e1, 0x0000, 0x2001,
-	0x19a0, 0x2003, 0x0000, 0x080c, 0x1018, 0x05a0, 0x2900, 0x6016,
-	0x7090, 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0, 0xa833, 0x001e,
-	0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0,
-	0x2001, 0x19a0, 0x0016, 0x200c, 0x0471, 0x001e, 0x2940, 0x080c,
-	0x1018, 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff, 0x0180, 0x0c18,
-	0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0,
-	0x2001, 0x19a0, 0x0016, 0x200c, 0x00b1, 0x001e, 0x0000, 0x9085,
-	0x0001, 0x0048, 0x2071, 0x1800, 0x7093, 0x0000, 0x6014, 0x2048,
-	0x080c, 0x0fb1, 0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee, 0x008e,
-	0x009e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6,
-	0x918c, 0xffff, 0x11a8, 0x080c, 0x23ab, 0x2099, 0x026c, 0x2001,
-	0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x00f8, 0x20a8,
-	0x4003, 0x22a8, 0x8108, 0x080c, 0x23ab, 0x2099, 0x0260, 0x0ca8,
-	0x080c, 0x23ab, 0x2061, 0x19a0, 0x6004, 0x2098, 0x6008, 0x3518,
-	0x9312, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8,
-	0x8108, 0x080c, 0x23ab, 0x2099, 0x0260, 0x0ca8, 0x2061, 0x19a0,
-	0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001,
-	0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff,
-	0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006,
-	0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x23c3,
-	0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8,
-	0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108,
-	0x080c, 0x23c3, 0x20a1, 0x0240, 0x0c98, 0x080c, 0x23c3, 0x2061,
-	0x19a3, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8,
-	0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108,
-	0x080c, 0x23c3, 0x20a1, 0x0240, 0x0c98, 0x2061, 0x19a3, 0x2019,
-	0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0240,
+	0x0904, 0xc173, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0x2900, 0xb07a,
+	0xb77c, 0xc7cd, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c,
+	0xa86e, 0xb070, 0xa872, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348,
+	0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0180,
+	0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118,
+	0xa87b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010,
+	0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e,
+	0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009,
+	0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011,
+	0x0025, 0x080c, 0xc743, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a,
+	0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018,
+	0x2011, 0x0029, 0x080c, 0xc743, 0x2011, 0x0205, 0x2013, 0x0000,
+	0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68,
+	0x2950, 0x080c, 0xc6e2, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005,
+	0x00f6, 0x00a6, 0x6003, 0x0003, 0x2079, 0x026c, 0x7c04, 0x7b00,
+	0x7e0c, 0x7d08, 0x6014, 0x2050, 0xb436, 0xb33a, 0xb646, 0xb54a,
+	0x00ae, 0x00fe, 0x2c10, 0x080c, 0x1baf, 0x0804, 0xa241, 0x6003,
+	0x0002, 0x6004, 0x9086, 0x0040, 0x11c8, 0x0096, 0x6014, 0x2048,
+	0xa87c, 0xd0ac, 0x0160, 0x601c, 0xd084, 0x1130, 0x00f6, 0x2c00,
+	0x2078, 0x080c, 0x1727, 0x00fe, 0x6003, 0x0004, 0x0010, 0x6003,
+	0x0002, 0x009e, 0x080c, 0x957b, 0x080c, 0x9687, 0x0096, 0x2001,
+	0x1987, 0x2004, 0x6042, 0x080c, 0x9637, 0x080c, 0x97b5, 0x6114,
+	0x2148, 0xa97c, 0xd1e4, 0x0904, 0xc216, 0xd1cc, 0x05a8, 0xa978,
+	0xa868, 0xd0fc, 0x0538, 0x0016, 0xa87c, 0x0006, 0xa880, 0x0006,
+	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x810e, 0x810e,
+	0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0019,
+	0x2098, 0x0156, 0x20a9, 0x0020, 0x4003, 0x015e, 0x000e, 0xa882,
+	0x000e, 0xa87e, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0fb1,
+	0x001e, 0x0440, 0x0016, 0x080c, 0x0fb1, 0x009e, 0xa974, 0x0016,
+	0x080c, 0xc733, 0x001e, 0x00f0, 0xa867, 0x0103, 0xa974, 0x9184,
+	0x00ff, 0x90b6, 0x0002, 0x0180, 0x9086, 0x0028, 0x1118, 0xa87b,
+	0x001c, 0x0060, 0xd1dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd1d4,
+	0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0x0016, 0x080c,
+	0x6aa2, 0x001e, 0xd1e4, 0x1120, 0x080c, 0xae71, 0x009e, 0x0005,
+	0x080c, 0xce48, 0x0cd8, 0x6004, 0x9086, 0x0040, 0x1120, 0x080c,
+	0x957b, 0x080c, 0x9687, 0x2019, 0x0001, 0x080c, 0xa5b7, 0x6003,
+	0x0002, 0x080c, 0xd267, 0x080c, 0x9637, 0x080c, 0x97b5, 0x0005,
+	0x6004, 0x9086, 0x0040, 0x1120, 0x080c, 0x957b, 0x080c, 0x9687,
+	0x2019, 0x0001, 0x080c, 0xa5b7, 0x080c, 0x9637, 0x080c, 0x31c1,
+	0x080c, 0xd25f, 0x0096, 0x6114, 0x2148, 0x080c, 0xcb4a, 0x0150,
+	0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, 0x6c86,
+	0x080c, 0xcd33, 0x009e, 0x080c, 0xae71, 0x080c, 0x97b5, 0x0005,
+	0xa87b, 0x0015, 0xd1fc, 0x0180, 0xa87b, 0x0007, 0x8002, 0x8000,
+	0x810a, 0x9189, 0x0000, 0x0006, 0x0016, 0x2009, 0x1a79, 0x2104,
+	0x8000, 0x200a, 0x001e, 0x000e, 0xa992, 0xa88e, 0x0005, 0x9182,
+	0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xc28b,
+	0xc28b, 0xc28b, 0xc28b, 0xc28b, 0xc28d, 0xc28b, 0xc28b, 0xc333,
+	0xc28b, 0xc28b, 0xc28b, 0xc28b, 0xc28b, 0xc28b, 0xc28b, 0xc28b,
+	0xc28b, 0xc28b, 0xc464, 0x080c, 0x0dd5, 0x0076, 0x00a6, 0x00e6,
+	0x0096, 0x2071, 0x0260, 0x6114, 0x2150, 0x7644, 0xb676, 0x96b4,
+	0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c,
+	0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xc32c,
+	0x9694, 0xff00, 0x9284, 0x0c00, 0x0120, 0x7048, 0xb092, 0x704c,
+	0xb08e, 0x9284, 0x0300, 0x0904, 0xc32c, 0x9686, 0x0100, 0x1130,
+	0x7064, 0x9005, 0x1118, 0xc6c4, 0xb676, 0x0c38, 0x080c, 0x0fff,
+	0x090c, 0x0dd5, 0x2900, 0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e,
+	0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872,
+	0x7044, 0x9084, 0xf000, 0x9635, 0xae76, 0x968c, 0x0c00, 0x0120,
+	0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002,
+	0x0180, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc,
+	0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007,
+	0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886,
+	0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a,
+	0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018,
+	0x2011, 0x0025, 0x080c, 0xc743, 0x003e, 0xd6cc, 0x01e8, 0x7154,
+	0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098,
+	0x0018, 0x2011, 0x0029, 0x080c, 0xc743, 0x2011, 0x0205, 0x2013,
+	0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a,
+	0x0c68, 0x2950, 0x080c, 0xc6e2, 0x080c, 0x1a3e, 0x009e, 0x00ee,
+	0x00ae, 0x007e, 0x0005, 0x2001, 0x1987, 0x2004, 0x6042, 0x0096,
+	0x6114, 0x2148, 0xa83c, 0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc,
+	0xa87e, 0x6003, 0x0002, 0xa97c, 0xd1e4, 0x0904, 0xc45f, 0x6043,
+	0x0000, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500,
+	0xd1cc, 0x0904, 0xc42e, 0xa978, 0xa868, 0xd0fc, 0x0904, 0xc3ef,
+	0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0x00a6, 0x2150, 0xb174,
+	0x9184, 0x00ff, 0x90b6, 0x0002, 0x0904, 0xc3bd, 0x9086, 0x0028,
+	0x1904, 0xc3a9, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x0804, 0xc3c5,
+	0x6024, 0xd0f4, 0x11d0, 0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838,
+	0xaa90, 0x9206, 0x1120, 0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024,
+	0xd0d4, 0x1148, 0xa9ac, 0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838,
+	0x9103, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x6010, 0x00b6, 0x2058,
+	0xb83c, 0x8000, 0xb83e, 0x00be, 0x9006, 0xa876, 0xa892, 0xa88e,
+	0xa87c, 0xc0e4, 0xa87e, 0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096,
+	0xa878, 0x2048, 0x080c, 0x0fb1, 0x009e, 0x080c, 0xce82, 0x0804,
+	0xc45f, 0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c,
+	0xd112, 0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128,
+	0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128,
+	0xa834, 0xa938, 0x9115, 0x190c, 0xc258, 0xa87c, 0xb07e, 0xa890,
+	0xb092, 0xa88c, 0xb08e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019,
+	0x20a0, 0x20a9, 0x0020, 0x8a06, 0x8006, 0x8007, 0x9094, 0x003f,
+	0x22e0, 0x9084, 0xffc0, 0x9080, 0x0019, 0x2098, 0x4003, 0x00ae,
+	0x000e, 0xa882, 0x000e, 0xa87e, 0x080c, 0xd1ef, 0x001e, 0xa874,
+	0x0006, 0x2148, 0x080c, 0x0fb1, 0x001e, 0x0804, 0xc45b, 0x0016,
+	0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0,
+	0x9086, 0x0028, 0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0,
+	0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xd112,
+	0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b,
+	0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834,
+	0xa938, 0x9115, 0x190c, 0xc258, 0xa890, 0xb092, 0xa88c, 0xb08e,
+	0xa87c, 0xb07e, 0x00ae, 0x080c, 0x0fb1, 0x009e, 0x080c, 0xd1ef,
+	0xa974, 0x0016, 0x080c, 0xc733, 0x001e, 0x0468, 0xa867, 0x0103,
+	0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028,
+	0x1118, 0xa87b, 0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015,
+	0x080c, 0xd112, 0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4,
+	0x0118, 0xa87b, 0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac,
+	0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xc258, 0xa974, 0x0016,
+	0x080c, 0x6aa2, 0x001e, 0xd1e4, 0x1120, 0x080c, 0xae71, 0x009e,
+	0x0005, 0x080c, 0xce48, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c,
+	0xd1e4, 0x190c, 0x1a4c, 0x009e, 0x0005, 0x080c, 0x957b, 0x0010,
+	0x080c, 0x9637, 0x080c, 0xcb4a, 0x01f0, 0x0096, 0x6114, 0x2148,
+	0x080c, 0xcd50, 0x1118, 0x080c, 0xb824, 0x00a0, 0xa867, 0x0103,
+	0x2009, 0x180c, 0x210c, 0xd18c, 0x11b8, 0xd184, 0x1190, 0x6108,
+	0xa97a, 0x918e, 0x0029, 0x1110, 0x080c, 0xe929, 0xa877, 0x0000,
+	0x080c, 0x6c86, 0x009e, 0x080c, 0xae71, 0x080c, 0x9687, 0x0804,
+	0x97b5, 0xa87b, 0x0004, 0x0c90, 0xa87b, 0x0004, 0x0c78, 0x9182,
+	0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xc4bb,
+	0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bd, 0xc4bb, 0xc4bb, 0xc4bb,
+	0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb,
+	0xc4bb, 0xc4bb, 0xc4bb, 0x080c, 0x0dd5, 0x080c, 0x56e0, 0x01f8,
+	0x6014, 0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264,
+	0x9294, 0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b, 0x0000, 0xa864,
+	0x9086, 0x0139, 0x0128, 0xa867, 0x0103, 0xa976, 0xaa96, 0x0030,
+	0xa897, 0x4000, 0xa99a, 0xaa9e, 0x080c, 0x6c86, 0x009e, 0x0804,
+	0xae71, 0x9182, 0x0085, 0x0002, 0xc4f3, 0xc4f1, 0xc4f1, 0xc4ff,
+	0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1,
+	0xc4f1, 0x080c, 0x0dd5, 0x6003, 0x0001, 0x6106, 0x080c, 0x90d9,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x9687, 0x012e, 0x0005, 0x0026,
+	0x0056, 0x00d6, 0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220,
+	0x080c, 0xcb38, 0x01a0, 0x2268, 0x6800, 0x9086, 0x0000, 0x0178,
+	0x6010, 0x6d10, 0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c, 0xc76e,
+	0x00ce, 0x0128, 0x6803, 0x0002, 0x6007, 0x0086, 0x0010, 0x6007,
+	0x0087, 0x6003, 0x0001, 0x080c, 0x90d9, 0x080c, 0x9687, 0x9280,
+	0x0004, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824,
+	0xd0ec, 0x0128, 0x00c6, 0x2260, 0x080c, 0xce82, 0x00ce, 0x00ee,
+	0x00de, 0x005e, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004,
+	0x908a, 0x0085, 0x0a0c, 0x0dd5, 0x908a, 0x0092, 0x1a0c, 0x0dd5,
+	0x9082, 0x0085, 0x00e2, 0x9186, 0x0027, 0x0120, 0x9186, 0x0014,
+	0x190c, 0x0dd5, 0x080c, 0x957b, 0x0096, 0x6014, 0x2048, 0x080c,
+	0xcb4a, 0x0140, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029,
+	0x080c, 0x6c86, 0x009e, 0x080c, 0xaea2, 0x0804, 0x9687, 0xc574,
+	0xc576, 0xc576, 0xc574, 0xc574, 0xc574, 0xc574, 0xc574, 0xc574,
+	0xc574, 0xc574, 0xc574, 0xc574, 0x080c, 0x0dd5, 0x080c, 0x957b,
+	0x080c, 0xaea2, 0x080c, 0x9687, 0x0005, 0x9186, 0x0013, 0x1128,
+	0x6004, 0x9082, 0x0085, 0x2008, 0x04b8, 0x9186, 0x0027, 0x11f8,
+	0x080c, 0x957b, 0x080c, 0x31c1, 0x080c, 0xd25f, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xcb4a, 0x0150, 0xa867, 0x0103, 0xa877, 0x0000,
+	0xa87b, 0x0029, 0x080c, 0x6c86, 0x080c, 0xcd33, 0x009e, 0x080c,
+	0xae71, 0x080c, 0x9687, 0x0005, 0x080c, 0xaf07, 0x0ce0, 0x9186,
+	0x0014, 0x1dd0, 0x080c, 0x957b, 0x0096, 0x6014, 0x2048, 0x080c,
+	0xcb4a, 0x0d60, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0006,
+	0xa880, 0xc0ec, 0xa882, 0x08f0, 0x0002, 0xc5cc, 0xc5ca, 0xc5ca,
+	0xc5ca, 0xc5ca, 0xc5ca, 0xc5e4, 0xc5ca, 0xc5ca, 0xc5ca, 0xc5ca,
+	0xc5ca, 0xc5ca, 0x080c, 0x0dd5, 0x080c, 0x957b, 0x6034, 0x908c,
+	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
+	0x2001, 0x1985, 0x0010, 0x2001, 0x1986, 0x2004, 0x601a, 0x6003,
+	0x000c, 0x080c, 0x9687, 0x0005, 0x080c, 0x957b, 0x6034, 0x908c,
+	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
+	0x2001, 0x1985, 0x0010, 0x2001, 0x1986, 0x2004, 0x601a, 0x6003,
+	0x000e, 0x080c, 0x9687, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182,
+	0x0085, 0x0208, 0x0012, 0x0804, 0xaf07, 0xc612, 0xc612, 0xc612,
+	0xc612, 0xc614, 0xc661, 0xc612, 0xc612, 0xc612, 0xc612, 0xc612,
+	0xc612, 0xc612, 0x080c, 0x0dd5, 0x0096, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, 0xff00, 0x810f,
+	0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x009e, 0x0804,
+	0xc675, 0x080c, 0xcb4a, 0x1118, 0x080c, 0xcd33, 0x0068, 0x6014,
+	0x2048, 0xa87c, 0xd0e4, 0x1110, 0x080c, 0xcd33, 0xa867, 0x0103,
+	0x080c, 0xd22a, 0x080c, 0x6c86, 0x00d6, 0x2c68, 0x080c, 0xae1b,
+	0x01d0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b, 0xffff, 0x2009,
+	0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x6910,
+	0x6112, 0x080c, 0xcfc4, 0x6954, 0x6156, 0x6023, 0x0001, 0x080c,
+	0x90d9, 0x080c, 0x9687, 0x2d60, 0x00de, 0x080c, 0xae71, 0x009e,
+	0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0,
+	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x0130, 0x9186,
+	0x001e, 0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c,
+	0xd1c2, 0x11f0, 0x080c, 0xae1b, 0x01d8, 0x6106, 0x6003, 0x0001,
+	0x6023, 0x0001, 0x6910, 0x6112, 0x692c, 0x612e, 0x6930, 0x6132,
+	0x6934, 0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, 0x693c, 0x613e,
+	0x6954, 0x6156, 0x080c, 0xcfc4, 0x080c, 0x90d9, 0x080c, 0x9687,
+	0x2d60, 0x00de, 0x0804, 0xae71, 0x0096, 0x6014, 0x2048, 0x080c,
+	0xcb4a, 0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec,
+	0xa882, 0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002,
+	0x0020, 0xa87b, 0x0005, 0x080c, 0xce44, 0xa877, 0x0000, 0x080c,
+	0x6c86, 0x080c, 0xcd33, 0x009e, 0x0804, 0xae71, 0x0016, 0x0096,
+	0x6014, 0x2048, 0x080c, 0xcb4a, 0x0140, 0xa867, 0x0103, 0xa87b,
+	0x0028, 0xa877, 0x0000, 0x080c, 0x6c86, 0x009e, 0x001e, 0x9186,
+	0x0013, 0x0148, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118,
+	0x080c, 0xaf07, 0x0030, 0x080c, 0x957b, 0x080c, 0xaea2, 0x080c,
+	0x9687, 0x0005, 0x0056, 0x0066, 0x0096, 0x00a6, 0x2029, 0x0001,
+	0x9182, 0x0101, 0x1208, 0x0010, 0x2009, 0x0100, 0x2130, 0x8304,
+	0x9098, 0x0018, 0x2009, 0x0020, 0x2011, 0x0029, 0x080c, 0xc743,
+	0x96b2, 0x0020, 0xb004, 0x904d, 0x0110, 0x080c, 0x0fb1, 0x080c,
+	0x0fff, 0x0520, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920,
+	0xb406, 0x968a, 0x003d, 0x1228, 0x2608, 0x2011, 0x001b, 0x0499,
+	0x00a8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b,
+	0x0451, 0x0c28, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f,
+	0x95ad, 0x0003, 0xb566, 0x95ac, 0x0000, 0x0048, 0x2001, 0x0205,
+	0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x009e,
+	0x006e, 0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055,
+	0x0130, 0xa807, 0x0000, 0x080c, 0x6c86, 0x2a48, 0x0cb8, 0x080c,
+	0x6c86, 0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7814, 0x9085,
+	0x0080, 0x7816, 0xd184, 0x0108, 0x8108, 0x810c, 0x20a9, 0x0001,
+	0xa860, 0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300,
+	0x9e00, 0x2098, 0x4003, 0x8318, 0x9386, 0x0020, 0x1148, 0x2018,
+	0x2300, 0x9e00, 0x2098, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816,
+	0x8109, 0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005, 0x0066, 0x0126,
+	0x2091, 0x8000, 0x2031, 0x0001, 0x6020, 0x9084, 0x000f, 0x0083,
+	0x012e, 0x006e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031,
+	0x0000, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005,
+	0xc7a9, 0xc7a9, 0xc7a4, 0xc7cb, 0xc797, 0xc7a4, 0xc7cb, 0xc7a4,
+	0xc797, 0x8ec2, 0xc7a4, 0xc7a4, 0xc7a4, 0xc797, 0xc797, 0x080c,
+	0x0dd5, 0x0036, 0x2019, 0x0010, 0x080c, 0xe155, 0x6023, 0x0006,
+	0x6003, 0x0007, 0x003e, 0x0005, 0x9006, 0x0005, 0x9085, 0x0001,
+	0x0005, 0x0096, 0x86ff, 0x11d8, 0x6014, 0x2048, 0x080c, 0xcb4a,
+	0x01c0, 0xa864, 0x9086, 0x0139, 0x1128, 0xa87b, 0x0005, 0xa883,
+	0x0000, 0x0028, 0x900e, 0x2001, 0x0005, 0x080c, 0x6eb9, 0x080c,
+	0xce44, 0x080c, 0x6c7a, 0x080c, 0xaea2, 0x9085, 0x0001, 0x009e,
+	0x0005, 0x9006, 0x0ce0, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5,
+	0x0002, 0xc7e1, 0xc80f, 0xc7e3, 0xc830, 0xc80a, 0xc7e1, 0xc7a4,
+	0xc7a9, 0xc7a9, 0xc7a4, 0xc7a4, 0xc7a4, 0xc7a4, 0xc7a4, 0xc7a4,
+	0xc7a4, 0x080c, 0x0dd5, 0x86ff, 0x1510, 0x6020, 0x9086, 0x0006,
+	0x01f0, 0x0096, 0x6014, 0x2048, 0x080c, 0xcb4a, 0x0158, 0xa87c,
+	0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fb1, 0x009e,
+	0x080c, 0xce44, 0x009e, 0x080c, 0xd204, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x080c, 0x90d9, 0x080c, 0x9687, 0x9085,
+	0x0001, 0x0005, 0x0066, 0x080c, 0x1a60, 0x006e, 0x08a0, 0x00e6,
+	0x2071, 0x19e6, 0x7024, 0x9c06, 0x1120, 0x080c, 0xa541, 0x00ee,
+	0x0850, 0x6020, 0x9084, 0x000f, 0x9086, 0x0006, 0x1150, 0x0086,
+	0x0096, 0x2049, 0x0001, 0x2c40, 0x080c, 0xa69d, 0x009e, 0x008e,
+	0x0010, 0x080c, 0xa43e, 0x00ee, 0x1904, 0xc7e3, 0x0804, 0xc7a4,
+	0x0036, 0x00e6, 0x2071, 0x19e6, 0x703c, 0x9c06, 0x1138, 0x901e,
+	0x080c, 0xa5b7, 0x00ee, 0x003e, 0x0804, 0xc7e3, 0x080c, 0xa7cd,
+	0x00ee, 0x003e, 0x1904, 0xc7e3, 0x0804, 0xc7a4, 0x00c6, 0x6020,
+	0x9084, 0x000f, 0x0013, 0x00ce, 0x0005, 0xc863, 0xc92e, 0xca95,
+	0xc86d, 0xaea2, 0xc863, 0xe147, 0xd26c, 0xc92e, 0x8e94, 0xcb14,
+	0xc85c, 0xc85c, 0xc85c, 0xc85c, 0x080c, 0x0dd5, 0x080c, 0xcd50,
+	0x1110, 0x080c, 0xb824, 0x0005, 0x080c, 0x957b, 0x080c, 0x9687,
+	0x0804, 0xae71, 0x601b, 0x0001, 0x0005, 0x080c, 0xcb4a, 0x0130,
+	0x6014, 0x0096, 0x2048, 0x2c00, 0xa896, 0x009e, 0x6000, 0x908a,
+	0x0016, 0x1a0c, 0x0dd5, 0x0002, 0xc88c, 0xc88e, 0xc8b2, 0xc8c6,
+	0xc8ec, 0xc88c, 0xc863, 0xc863, 0xc863, 0xc8c6, 0xc8c6, 0xc88c,
+	0xc88c, 0xc88c, 0xc88c, 0xc8d0, 0x080c, 0x0dd5, 0x00e6, 0x6014,
+	0x0096, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x2071, 0x19e6,
+	0x7024, 0x9c06, 0x01a0, 0x080c, 0xa43e, 0x080c, 0xd204, 0x6007,
+	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2001, 0x1986, 0x2004,
+	0x601a, 0x080c, 0x90d9, 0x080c, 0x9687, 0x00ee, 0x0005, 0x601b,
+	0x0001, 0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882,
+	0x009e, 0x080c, 0xd204, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
+	0x0002, 0x080c, 0x90d9, 0x080c, 0x9687, 0x0005, 0x0096, 0x601b,
+	0x0001, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x0005,
+	0x080c, 0x56e0, 0x01b8, 0x6014, 0x0096, 0x904d, 0x0190, 0xa864,
+	0xa867, 0x0103, 0xa87b, 0x0006, 0x9086, 0x0139, 0x1150, 0xa867,
+	0x0139, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa89b, 0x0004, 0x080c,
+	0x6c86, 0x009e, 0x0804, 0xae71, 0x6014, 0x0096, 0x904d, 0x05c8,
+	0xa97c, 0xd1e4, 0x05b0, 0x2001, 0x180f, 0x2004, 0xd0c4, 0x0110,
+	0x009e, 0x0005, 0xa884, 0x009e, 0x8003, 0x800b, 0x810b, 0x9108,
+	0x611a, 0x2001, 0x0030, 0x2c08, 0x080c, 0x15f0, 0x2001, 0x030c,
+	0x2004, 0x9086, 0x0041, 0x11a0, 0x6014, 0x0096, 0x904d, 0x090c,
+	0x0dd5, 0xa880, 0xd0f4, 0x1130, 0xc0f5, 0xa882, 0x009e, 0x601b,
+	0x0002, 0x0070, 0x009e, 0x2001, 0x0037, 0x2c08, 0x080c, 0x15f0,
+	0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0xaeec,
+	0x0005, 0x009e, 0x080c, 0x1a60, 0x0804, 0xc8b2, 0x6000, 0x908a,
+	0x0016, 0x1a0c, 0x0dd5, 0x000b, 0x0005, 0xc945, 0xc86a, 0xc947,
+	0xc945, 0xc947, 0xc947, 0xc864, 0xc945, 0xc85e, 0xc85e, 0xc945,
+	0xc945, 0xc945, 0xc945, 0xc945, 0xc945, 0x080c, 0x0dd5, 0x6010,
+	0x00b6, 0x2058, 0xb804, 0x9084, 0x00ff, 0x00be, 0x908a, 0x000c,
+	0x1a0c, 0x0dd5, 0x00b6, 0x0013, 0x00be, 0x0005, 0xc962, 0xca2f,
+	0xc964, 0xc9a4, 0xc964, 0xc9a4, 0xc964, 0xc972, 0xc962, 0xc9a4,
+	0xc962, 0xc993, 0x080c, 0x0dd5, 0x6004, 0x908e, 0x0016, 0x05c0,
+	0x908e, 0x0004, 0x05a8, 0x908e, 0x0002, 0x0590, 0x908e, 0x0052,
+	0x0904, 0xca2b, 0x6004, 0x080c, 0xcd50, 0x0904, 0xca48, 0x908e,
+	0x0004, 0x1110, 0x080c, 0x31ea, 0x908e, 0x0021, 0x0904, 0xca4c,
+	0x908e, 0x0022, 0x0904, 0xca90, 0x908e, 0x003d, 0x0904, 0xca4c,
+	0x908e, 0x0039, 0x0904, 0xca50, 0x908e, 0x0035, 0x0904, 0xca50,
+	0x908e, 0x001e, 0x0178, 0x908e, 0x0001, 0x1140, 0x6010, 0x2058,
+	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0110, 0x080c, 0x31c1,
+	0x080c, 0xb824, 0x0804, 0xaea2, 0x00c6, 0x00d6, 0x6104, 0x9186,
+	0x0016, 0x0904, 0xca1c, 0x9186, 0x0002, 0x1904, 0xc9f1, 0x2001,
+	0x1837, 0x2004, 0xd08c, 0x11c8, 0x080c, 0x73a5, 0x11b0, 0x080c,
+	0xd24a, 0x0138, 0x080c, 0x73c8, 0x1120, 0x080c, 0x72b5, 0x0804,
+	0xca79, 0x2001, 0x197c, 0x2003, 0x0001, 0x2001, 0x1800, 0x2003,
+	0x0001, 0x080c, 0x72d7, 0x0804, 0xca79, 0x6010, 0x2058, 0x2001,
+	0x1837, 0x2004, 0xd0ac, 0x1904, 0xca79, 0xb8a0, 0x9084, 0xff80,
+	0x1904, 0xca79, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0190, 0x8001,
+	0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x6043,
+	0x0000, 0x080c, 0xae1b, 0x0128, 0x2b00, 0x6012, 0x6023, 0x0001,
+	0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002, 0x11a0, 0x6010,
+	0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009, 0x1837, 0x2104,
+	0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5fb6, 0x00ee,
+	0x080c, 0xb824, 0x0030, 0x080c, 0xb824, 0x080c, 0x31c1, 0x080c,
+	0xd25f, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x31ea, 0x012e,
+	0x00ee, 0x080c, 0xaea2, 0x0005, 0x2001, 0x0002, 0x080c, 0x6558,
+	0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9121, 0x080c, 0x9687,
+	0x00de, 0x00ce, 0x0c80, 0x080c, 0x31ea, 0x0804, 0xc9a0, 0x00c6,
+	0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010, 0x2058, 0xb840,
+	0x9084, 0x00ff, 0x9005, 0x0904, 0xc9f1, 0x8001, 0xb842, 0x6003,
+	0x0001, 0x080c, 0x9121, 0x080c, 0x9687, 0x00de, 0x00ce, 0x0898,
+	0x080c, 0xb824, 0x0804, 0xc9a2, 0x080c, 0xb860, 0x0804, 0xc9a2,
+	0x00d6, 0x2c68, 0x6104, 0x080c, 0xd1c2, 0x00de, 0x0118, 0x080c,
+	0xae71, 0x00f0, 0x6004, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105,
+	0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x603c,
+	0x600a, 0x2001, 0x1986, 0x2004, 0x601a, 0x602c, 0x2c08, 0x2060,
+	0x6024, 0xc0b5, 0x6026, 0x2160, 0x080c, 0x90d9, 0x080c, 0x9687,
+	0x0005, 0x00de, 0x00ce, 0x080c, 0xb824, 0x080c, 0x31c1, 0x00e6,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x31ea, 0x6017, 0x0000, 0x6023,
+	0x0007, 0x601b, 0x0398, 0x6043, 0x0000, 0x012e, 0x00ee, 0x0005,
+	0x080c, 0xb2a2, 0x1904, 0xca48, 0x0005, 0x6000, 0x908a, 0x0016,
+	0x1a0c, 0x0dd5, 0x0096, 0x00d6, 0x001b, 0x00de, 0x009e, 0x0005,
+	0xcab0, 0xcab0, 0xcab0, 0xcab0, 0xcab0, 0xcab0, 0xcab0, 0xcab0,
+	0xcab0, 0xc863, 0xcab0, 0xc86a, 0xcab2, 0xc86a, 0xcabf, 0xcab0,
+	0x080c, 0x0dd5, 0x6004, 0x9086, 0x008b, 0x0148, 0x6007, 0x008b,
+	0x6003, 0x000d, 0x080c, 0x90d9, 0x080c, 0x9687, 0x0005, 0x080c,
+	0xd23e, 0x0118, 0x080c, 0xd251, 0x0010, 0x080c, 0xd25f, 0x080c,
+	0xcd33, 0x080c, 0xcb4a, 0x0570, 0x080c, 0x31c1, 0x080c, 0xcb4a,
+	0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877,
+	0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x6c86, 0x2c68, 0x080c,
+	0xae1b, 0x0150, 0x6810, 0x6012, 0x080c, 0xcfc4, 0x00c6, 0x2d60,
+	0x080c, 0xaea2, 0x00ce, 0x0008, 0x2d60, 0x6017, 0x0000, 0x6023,
+	0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9121, 0x080c,
+	0x9687, 0x00c8, 0x080c, 0xd23e, 0x0138, 0x6034, 0x9086, 0x4000,
+	0x1118, 0x080c, 0x31c1, 0x08d0, 0x6034, 0x908c, 0xff00, 0x810f,
+	0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x080c, 0x31c1,
+	0x0868, 0x080c, 0xaea2, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c,
+	0x0dd5, 0x0002, 0xcb2a, 0xcb2a, 0xcb2c, 0xcb2c, 0xcb2c, 0xcb2a,
+	0xcb2a, 0xaea2, 0xcb2a, 0xcb2a, 0xcb2a, 0xcb2a, 0xcb2a, 0xcb2a,
+	0xcb2a, 0xcb2a, 0x080c, 0x0dd5, 0x080c, 0xa7cd, 0x6114, 0x0096,
+	0x2148, 0xa87b, 0x0006, 0x080c, 0x6c86, 0x009e, 0x0804, 0xae71,
+	0x9284, 0x0007, 0x1158, 0x9282, 0x1cd0, 0x0240, 0x2001, 0x181a,
+	0x2004, 0x9202, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8,
+	0x0096, 0x0028, 0x0096, 0x0006, 0x6014, 0x2048, 0x000e, 0x0006,
+	0x9984, 0xf000, 0x9086, 0xf000, 0x0110, 0x080c, 0x10aa, 0x000e,
+	0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7354, 0x7074, 0x9302,
+	0x1640, 0x6020, 0x9206, 0x11f8, 0x080c, 0xd24a, 0x0180, 0x9286,
+	0x0001, 0x1168, 0x6004, 0x9086, 0x0004, 0x1148, 0x080c, 0x31c1,
+	0x080c, 0xd25f, 0x00c6, 0x080c, 0xaea2, 0x00ce, 0x0060, 0x080c,
+	0xcf3e, 0x0148, 0x080c, 0xcd50, 0x1110, 0x080c, 0xb824, 0x00c6,
+	0x080c, 0xae71, 0x00ce, 0x9ce0, 0x0018, 0x7068, 0x9c02, 0x1208,
+	0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
+	0x00c6, 0x0016, 0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, 0x2061,
+	0x1aaf, 0x6112, 0x080c, 0x31c1, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xae1b, 0x01b0, 0x6656, 0x2b00, 0x6012, 0x080c, 0x56e0,
+	0x0118, 0x080c, 0xcc77, 0x0168, 0x080c, 0xcfc4, 0x6023, 0x0003,
+	0x2009, 0x004b, 0x080c, 0xaeec, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0,
+	0x080c, 0xaebf, 0x0560, 0x6057, 0x0000, 0x2b00, 0x6012, 0x080c,
+	0xcfc4, 0x6023, 0x0003, 0x0016, 0x080c, 0x927e, 0x0076, 0x903e,
+	0x080c, 0x9151, 0x2c08, 0x080c, 0xe30c, 0x007e, 0x001e, 0xd184,
+	0x0128, 0x080c, 0xae71, 0x9085, 0x0001, 0x0070, 0x080c, 0x56e0,
+	0x0128, 0xd18c, 0x1170, 0x080c, 0xcc77, 0x0148, 0x2009, 0x004c,
+	0x080c, 0xaeec, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006,
+	0x0cd8, 0x2900, 0x6016, 0x0c90, 0x2009, 0x004d, 0x0010, 0x2009,
+	0x004e, 0x00f6, 0x00c6, 0x0046, 0x0016, 0x080c, 0xae1b, 0x2c78,
+	0x0590, 0x7e56, 0x2b00, 0x7812, 0x7823, 0x0003, 0x2021, 0x0005,
+	0x080c, 0xcc89, 0x9186, 0x004d, 0x0118, 0x9186, 0x004e, 0x0148,
+	0x2001, 0x197f, 0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c, 0xae71,
+	0x00d0, 0x2001, 0x197e, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c,
+	0xae71, 0x0088, 0x2f60, 0x080c, 0x56e0, 0x0138, 0xd18c, 0x1118,
+	0x04f1, 0x0148, 0x0010, 0x2900, 0x7816, 0x001e, 0x0016, 0x080c,
+	0xaeec, 0x9085, 0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005,
+	0x00f6, 0x00c6, 0x0046, 0x080c, 0xae1b, 0x2c78, 0x0508, 0x7e56,
+	0x2b00, 0x7812, 0x7823, 0x0003, 0x0096, 0x2021, 0x0004, 0x0489,
+	0x009e, 0x2001, 0x197d, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c,
+	0xae71, 0x0060, 0x2f60, 0x080c, 0x56e0, 0x0120, 0xd18c, 0x1160,
+	0x0071, 0x0130, 0x2009, 0x0052, 0x080c, 0xaeec, 0x9085, 0x0001,
+	0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98, 0x00c6,
+	0x080c, 0x4ab4, 0x00ce, 0x1120, 0x080c, 0xae71, 0x9006, 0x0005,
+	0xa867, 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016, 0x9085, 0x0001,
+	0x0005, 0x0096, 0x0076, 0x0126, 0x2091, 0x8000, 0x080c, 0x673c,
+	0x0158, 0x2001, 0xcc8e, 0x0006, 0x900e, 0x2400, 0x080c, 0x6eb9,
+	0x080c, 0x6c86, 0x000e, 0x0807, 0x2418, 0x080c, 0x9515, 0xbaa0,
+	0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x080c, 0x9296,
+	0x008e, 0x080c, 0x9151, 0x2f08, 0x2648, 0x080c, 0xe30c, 0xb93c,
+	0x81ff, 0x090c, 0x9367, 0x080c, 0x9687, 0x012e, 0x007e, 0x009e,
+	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xae1b, 0x0190,
+	0x660a, 0x2b08, 0x6112, 0x080c, 0xcfc4, 0x6023, 0x0001, 0x2900,
+	0x6016, 0x2009, 0x001f, 0x080c, 0xaeec, 0x9085, 0x0001, 0x012e,
+	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xaebf, 0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c, 0xcfc4,
+	0x6023, 0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c, 0x1727,
+	0x00fe, 0x2009, 0x0021, 0x080c, 0xaeec, 0x9085, 0x0001, 0x012e,
+	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6, 0x0126,
+	0x0016, 0x2091, 0x8000, 0x080c, 0xae1b, 0x0198, 0x660a, 0x2b08,
+	0x6112, 0x080c, 0xcfc4, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e,
+	0x0016, 0x080c, 0xaeec, 0x9085, 0x0001, 0x001e, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xaebf, 0x0188, 0x2b08, 0x6112, 0x080c, 0xcfc4, 0x6023, 0x0001,
+	0x2900, 0x6016, 0x2009, 0x0000, 0x080c, 0xaeec, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044, 0x0830,
+	0x2009, 0x0049, 0x0818, 0x0026, 0x00b6, 0x6210, 0x2258, 0xba3c,
+	0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x002e, 0x0005, 0x0006,
+	0x0016, 0x6004, 0x908e, 0x0002, 0x0140, 0x908e, 0x0003, 0x0128,
+	0x908e, 0x0004, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005,
+	0x0006, 0x0086, 0x0096, 0x6020, 0x9086, 0x0004, 0x01a8, 0x6014,
+	0x904d, 0x080c, 0xcb4a, 0x0180, 0xa864, 0x9086, 0x0139, 0x0170,
+	0x6020, 0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002, 0x0128, 0xa868,
+	0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x008e,
+	0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xaebf,
+	0x0198, 0x2b08, 0x6112, 0x080c, 0xcfc4, 0x6023, 0x0001, 0x2900,
+	0x6016, 0x080c, 0x31c1, 0x2009, 0x0028, 0x080c, 0xaeec, 0x9085,
+	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015,
+	0x11a8, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6,
+	0x080c, 0xba78, 0x00be, 0x080c, 0xbc9b, 0x6003, 0x0001, 0x6007,
+	0x0029, 0x080c, 0x9121, 0x080c, 0x9687, 0x0078, 0x6014, 0x0096,
+	0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c,
+	0xd183, 0x080c, 0xb824, 0x080c, 0xae71, 0x0005, 0x0096, 0x6014,
+	0x904d, 0x090c, 0x0dd5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897,
+	0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6c86, 0x012e, 0x009e, 0x080c, 0xae71, 0x0c30, 0x0096,
+	0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x6558, 0x00e8,
+	0x9186, 0x0015, 0x1510, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014,
+	0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x66a3, 0x00be, 0x080c,
+	0xbd6c, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005,
+	0x0160, 0x2001, 0x0006, 0x080c, 0x6558, 0x6014, 0x2048, 0xa868,
+	0xd0fc, 0x0170, 0x080c, 0xb276, 0x0048, 0x6014, 0x2048, 0xa868,
+	0xd0fc, 0x0528, 0x080c, 0xb824, 0x080c, 0xae71, 0x009e, 0x0005,
+	0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0dd5, 0xa87b, 0x0000,
+	0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x6828, 0x1108,
+	0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6c86, 0x012e, 0x080c, 0xae71, 0x08f8, 0x6014,
+	0x904d, 0x090c, 0x0dd5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897,
+	0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6c86, 0x012e, 0x080c, 0xae71, 0x0840, 0xa878, 0x9086,
+	0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005,
+	0x6043, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050,
+	0x080c, 0x90d9, 0x080c, 0x9687, 0x0005, 0x00c6, 0x6010, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0120, 0x6020, 0x9084, 0x000f,
+	0x0013, 0x00ce, 0x0005, 0xc863, 0xce74, 0xce74, 0xce77, 0xe61e,
+	0xe639, 0xe63c, 0xc863, 0xc863, 0xc863, 0xc863, 0xc863, 0xc863,
+	0xc863, 0xc863, 0x080c, 0x0dd5, 0xa001, 0xa001, 0x0005, 0x0096,
+	0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010,
+	0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
+	0x0550, 0x2001, 0x1834, 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78,
+	0x080c, 0xae1b, 0x0508, 0x7810, 0x6012, 0x080c, 0xcfc4, 0x7820,
+	0x9086, 0x0003, 0x0128, 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020,
+	0x7808, 0x603e, 0x2f00, 0x603a, 0x602e, 0x6023, 0x0001, 0x6007,
+	0x0035, 0x6003, 0x0001, 0x7954, 0x6156, 0x080c, 0x90d9, 0x080c,
+	0x9687, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1987,
+	0x2004, 0x6042, 0x0005, 0x0016, 0x0096, 0x6814, 0x2048, 0xa87c,
+	0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000,
+	0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048,
+	0x080c, 0x0fb1, 0x6830, 0x6036, 0x908e, 0x0001, 0x0148, 0x6803,
+	0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0,
+	0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085,
+	0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0,
+	0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc,
+	0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112,
+	0x6954, 0x6156, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001,
+	0x080c, 0x90d9, 0x080c, 0x9687, 0x009e, 0x001e, 0x0005, 0x6024,
+	0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303,
+	0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a,
+	0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402,
+	0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024,
+	0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a,
+	0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016,
+	0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e,
+	0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158,
+	0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b,
+	0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016,
+	0x0026, 0x0036, 0x00e6, 0x2001, 0x1981, 0x200c, 0x8000, 0x2014,
+	0x2001, 0x0032, 0x080c, 0x8f51, 0x2001, 0x1985, 0x82ff, 0x1110,
+	0x2011, 0x0014, 0x2202, 0x2001, 0x1983, 0x200c, 0x8000, 0x2014,
+	0x2071, 0x196b, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x8f51,
+	0x2001, 0x1986, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001,
+	0x1987, 0x9288, 0x000a, 0x2102, 0x2001, 0x1a90, 0x2102, 0x2001,
+	0x0032, 0x080c, 0x15f0, 0x080c, 0x695c, 0x00ee, 0x003e, 0x002e,
+	0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x00e6, 0x2001, 0x1985,
+	0x2003, 0x0028, 0x2001, 0x1986, 0x2003, 0x0014, 0x2071, 0x196b,
+	0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0x1987, 0x2009, 0x001e,
+	0x2102, 0x2001, 0x1a90, 0x2102, 0x2001, 0x0032, 0x080c, 0x15f0,
+	0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6058, 0x904d, 0x0110,
+	0x080c, 0x1031, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091,
+	0x8000, 0x080c, 0xae1b, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023,
+	0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0xaeec, 0x9085,
+	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6,
+	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1500, 0x7090, 0x9086,
+	0x0018, 0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78,
+	0x080c, 0x9921, 0x01d8, 0x707c, 0xaa50, 0x9206, 0x1160, 0x7080,
+	0xaa54, 0x9206, 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be,
+	0x900e, 0x080c, 0x320a, 0x080c, 0xb276, 0x0020, 0x080c, 0xb824,
+	0x080c, 0xae71, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa54,
+	0x9206, 0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xae1b, 0x0188, 0x2b08, 0x6112, 0x080c, 0xcfc4, 0x6023, 0x0001,
+	0x2900, 0x6016, 0x2009, 0x004d, 0x080c, 0xaeec, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091,
+	0x8000, 0x0016, 0x080c, 0xae1b, 0x0180, 0x2b08, 0x6112, 0x080c,
+	0xcfc4, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0xaeec,
+	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0,
+	0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6,
+	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1568, 0x7190, 0x6014,
+	0x2048, 0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001,
+	0x199f, 0x2003, 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906,
+	0x8006, 0x8007, 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080,
+	0x001b, 0x20a0, 0x2001, 0x199f, 0x0016, 0x200c, 0x080c, 0xd83a,
+	0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048,
+	0xa867, 0x0103, 0x0010, 0x080c, 0xb824, 0x080c, 0xae71, 0x00fe,
+	0x00ee, 0x009e, 0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
+	0x0005, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015,
+	0x11b8, 0x7090, 0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78,
+	0x080c, 0x9921, 0x01a8, 0x707c, 0xaa74, 0x9206, 0x1130, 0x7080,
+	0xaa78, 0x9206, 0x1110, 0x080c, 0x31c1, 0x080c, 0xb276, 0x0020,
+	0x080c, 0xb824, 0x080c, 0xae71, 0x00fe, 0x00ee, 0x009e, 0x0005,
+	0x7060, 0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6,
+	0x2071, 0x1800, 0x9186, 0x0015, 0x1550, 0x7090, 0x9086, 0x0004,
+	0x1530, 0x6014, 0x2048, 0x2c78, 0x080c, 0x9921, 0x05f0, 0x707c,
+	0xaacc, 0x9206, 0x1180, 0x7080, 0xaad0, 0x9206, 0x1160, 0x080c,
+	0x31c1, 0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c,
+	0x5690, 0x001e, 0x0010, 0x080c, 0x5481, 0x080c, 0xcb4a, 0x0508,
+	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c,
+	0xcb4a, 0x01b8, 0x6014, 0x2048, 0x080c, 0x5481, 0x1d70, 0xa87b,
+	0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126,
+	0x2091, 0x8000, 0xa867, 0x0139, 0x080c, 0x6c86, 0x012e, 0x080c,
+	0xae71, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaad0, 0x9206,
+	0x0930, 0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938,
+	0xaa34, 0x2100, 0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c,
+	0x9206, 0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e,
+	0x0005, 0x00b6, 0x00d6, 0x0036, 0x080c, 0xcb4a, 0x0904, 0xd17f,
+	0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580,
+	0x6310, 0x00c6, 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140,
+	0x080c, 0x6828, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
+	0xaa96, 0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098,
+	0x080c, 0x0f7c, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0,
+	0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f7c, 0x00ce, 0x0090,
+	0xaa96, 0x3918, 0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016,
+	0x0110, 0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084,
+	0x00ff, 0xa89e, 0x080c, 0x6c7a, 0x6017, 0x0000, 0x009e, 0x003e,
+	0x00de, 0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096,
+	0x00f6, 0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096,
+	0x0000, 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x2840,
+	0x2118, 0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d,
+	0x7c3c, 0x2011, 0x8018, 0x080c, 0x4b14, 0x00a8, 0x9096, 0x0001,
+	0x1148, 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c,
+	0xa8aa, 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838,
+	0xa8a6, 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e,
+	0x002e, 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110,
+	0x6a38, 0x0008, 0x6a2c, 0x080c, 0xcb38, 0x01f0, 0x2260, 0x6120,
+	0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206,
+	0x0140, 0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140,
+	0x0020, 0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106,
+	0x001e, 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974,
+	0xd1cc, 0x0188, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8,
+	0x918c, 0x0f00, 0x810f, 0x918e, 0x0001, 0x1128, 0xa834, 0xa938,
+	0x9115, 0x190c, 0xc258, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010,
+	0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, 0xcb4a, 0x01c8, 0x080c,
+	0xcd33, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096, 0x2048,
+	0xa87c, 0x080c, 0xcd50, 0x1118, 0x080c, 0xb824, 0x0040, 0xa867,
+	0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x6c86, 0x009e,
+	0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec,
+	0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b,
+	0x0005, 0x080c, 0xce44, 0xa877, 0x0000, 0x0005, 0x2001, 0x1810,
+	0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4,
+	0x000e, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e,
+	0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be,
+	0x2021, 0x0007, 0x080c, 0x4ccb, 0x004e, 0x003e, 0x0005, 0x0c51,
+	0x1d81, 0x0005, 0x2001, 0x1985, 0x2004, 0x601a, 0x0005, 0x2001,
+	0x1987, 0x2004, 0x6042, 0x0005, 0x080c, 0xae71, 0x0804, 0x9687,
+	0x00b6, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dd5, 0x001b,
+	0x006e, 0x00be, 0x0005, 0xd28b, 0xd997, 0xdaf4, 0xd28b, 0xd28b,
+	0xd28b, 0xd28b, 0xd28b, 0xd2c2, 0xdb78, 0xd28b, 0xd28b, 0xd28b,
+	0xd28b, 0xd28b, 0xd28b, 0x080c, 0x0dd5, 0x0066, 0x6000, 0x90b2,
+	0x0016, 0x1a0c, 0x0dd5, 0x0013, 0x006e, 0x0005, 0xd2a6, 0xe0e0,
+	0xd2a6, 0xd2a6, 0xd2a6, 0xd2a6, 0xd2a6, 0xd2a6, 0xe08d, 0xe134,
+	0xd2a6, 0xe759, 0xe78f, 0xe759, 0xe78f, 0xd2a6, 0x080c, 0x0dd5,
+	0x6000, 0x9082, 0x0016, 0x1a0c, 0x0dd5, 0x6000, 0x000a, 0x0005,
+	0xd2c0, 0xdd55, 0xde45, 0xde67, 0xdf26, 0xd2c0, 0xe004, 0xdfae,
+	0xdb84, 0xe063, 0xe078, 0xd2c0, 0xd2c0, 0xd2c0, 0xd2c0, 0xd2c0,
+	0x080c, 0x0dd5, 0x91b2, 0x0053, 0x1a0c, 0x0dd5, 0x2100, 0x91b2,
+	0x0040, 0x1a04, 0xd70b, 0x0002, 0xd30c, 0xd4fc, 0xd30c, 0xd30c,
+	0xd30c, 0xd505, 0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd30c,
+	0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd30c,
+	0xd30c, 0xd30c, 0xd30c, 0xd30e, 0xd371, 0xd380, 0xd3e4, 0xd40f,
+	0xd488, 0xd4e7, 0xd30c, 0xd30c, 0xd508, 0xd30c, 0xd30c, 0xd51d,
+	0xd52a, 0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd5ad, 0xd30c,
+	0xd30c, 0xd5c1, 0xd30c, 0xd30c, 0xd57c, 0xd30c, 0xd30c, 0xd30c,
+	0xd5d9, 0xd30c, 0xd30c, 0xd30c, 0xd656, 0xd30c, 0xd30c, 0xd30c,
+	0xd30c, 0xd30c, 0xd30c, 0xd6d3, 0x080c, 0x0dd5, 0x080c, 0x6939,
+	0x1150, 0x2001, 0x1837, 0x2004, 0xd0cc, 0x1128, 0x9084, 0x0009,
+	0x9086, 0x0008, 0x1140, 0x6007, 0x0009, 0x602f, 0x0009, 0x6017,
+	0x0000, 0x0804, 0xd4f5, 0x080c, 0x68d5, 0x00e6, 0x00c6, 0x0036,
+	0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029,
+	0x080c, 0x927e, 0x0076, 0x903e, 0x080c, 0x9151, 0x2c08, 0x080c,
+	0xe30c, 0x007e, 0x001e, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee,
+	0x6610, 0x2658, 0x080c, 0x6617, 0xbe04, 0x9684, 0x00ff, 0x9082,
+	0x0006, 0x1268, 0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0,
+	0x00be, 0x2c08, 0x080c, 0xe9b8, 0x002e, 0x001e, 0x1178, 0x080c,
+	0xe23e, 0x1904, 0xd3dc, 0x080c, 0xe1da, 0x1120, 0x6007, 0x0008,
+	0x0804, 0xd4f5, 0x6007, 0x0009, 0x0804, 0xd4f5, 0x080c, 0xe462,
+	0x0128, 0x080c, 0xe23e, 0x0d78, 0x0804, 0xd3dc, 0x6017, 0x1900,
+	0x0c88, 0x080c, 0x32e5, 0x1904, 0xd708, 0x6106, 0x080c, 0xe18f,
+	0x6007, 0x0006, 0x0804, 0xd4f5, 0x6007, 0x0007, 0x0804, 0xd4f5,
+	0x080c, 0xe7cb, 0x1904, 0xd708, 0x080c, 0x32e5, 0x1904, 0xd708,
+	0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006,
+	0x1220, 0x2001, 0x0001, 0x080c, 0x6544, 0x96b4, 0xff00, 0x8637,
+	0x9686, 0x0006, 0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4,
+	0x00ff, 0x9686, 0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686,
+	0x0005, 0x0110, 0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034,
+	0x9084, 0x0003, 0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030,
+	0x9084, 0x0003, 0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007,
+	0x00b0, 0x00ee, 0x080c, 0xe2a2, 0x1190, 0x9686, 0x0006, 0x1140,
+	0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x320a, 0x002e,
+	0x080c, 0x66a3, 0x6007, 0x000a, 0x00de, 0x0804, 0xd4f5, 0x6007,
+	0x000b, 0x00de, 0x0804, 0xd4f5, 0x080c, 0x31c1, 0x080c, 0xd25f,
+	0x6007, 0x0001, 0x0804, 0xd4f5, 0x080c, 0xe7cb, 0x1904, 0xd708,
+	0x080c, 0x32e5, 0x1904, 0xd708, 0x2071, 0x0260, 0x7034, 0x90b4,
+	0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003,
+	0x1910, 0x6610, 0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026,
+	0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x320a, 0x002e, 0x6007,
+	0x000c, 0x2001, 0x0001, 0x080c, 0xe998, 0x0804, 0xd4f5, 0x080c,
+	0x6939, 0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086,
+	0x0008, 0x1110, 0x0804, 0xd31b, 0x080c, 0x68d5, 0x6610, 0x2658,
+	0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x06c8, 0x1138, 0x0026,
+	0x2001, 0x0006, 0x080c, 0x6584, 0x002e, 0x0050, 0x96b4, 0xff00,
+	0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd3dc,
+	0x080c, 0xe2af, 0x1120, 0x6007, 0x000e, 0x0804, 0xd4f5, 0x0046,
+	0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x31c1, 0x080c, 0xd25f,
+	0x004e, 0x0016, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0148,
+	0x2009, 0x0029, 0x080c, 0xe5cf, 0x6010, 0x2058, 0xb800, 0xc0e5,
+	0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x0804, 0xd4f5, 0x2001,
+	0x0001, 0x080c, 0x6544, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
+	0x0004, 0x2019, 0x1805, 0x2011, 0x0270, 0x080c, 0xbe1c, 0x003e,
+	0x002e, 0x001e, 0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637,
+	0x9682, 0x0004, 0x0a04, 0xd3dc, 0x9682, 0x0007, 0x0a04, 0xd438,
+	0x0804, 0xd3dc, 0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xd4f5,
+	0x080c, 0x6939, 0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009,
+	0x9086, 0x0008, 0x1110, 0x0804, 0xd31b, 0x080c, 0x68d5, 0x6610,
+	0x2658, 0xbe04, 0x9684, 0x00ff, 0x0006, 0x9086, 0x0001, 0x000e,
+	0x0170, 0x9082, 0x0006, 0x0698, 0x0150, 0x96b4, 0xff00, 0x8637,
+	0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd3dc, 0x080c,
+	0xe2dd, 0x1130, 0x080c, 0xe1da, 0x1118, 0x6007, 0x0010, 0x04e8,
+	0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x31c1, 0x080c,
+	0xd25f, 0x004e, 0x0016, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4,
+	0x0148, 0x2009, 0x0029, 0x080c, 0xe5cf, 0x6010, 0x2058, 0xb800,
+	0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c,
+	0xe462, 0x0140, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0978,
+	0x0804, 0xd3dc, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c,
+	0x32e5, 0x1904, 0xd708, 0x080c, 0xe7cb, 0x1904, 0xd708, 0x080c,
+	0xd8d5, 0x1904, 0xd3dc, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c,
+	0x9121, 0x080c, 0x9687, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001,
+	0x080c, 0x9121, 0x080c, 0x9687, 0x0cb0, 0x6007, 0x0005, 0x0c68,
+	0x080c, 0xe7cb, 0x1904, 0xd708, 0x080c, 0x32e5, 0x1904, 0xd708,
+	0x080c, 0xd8d5, 0x1904, 0xd3dc, 0x6007, 0x0020, 0x6003, 0x0001,
+	0x080c, 0x9121, 0x080c, 0x9687, 0x0005, 0x080c, 0x32e5, 0x1904,
+	0xd708, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x9121, 0x080c,
+	0x9687, 0x0005, 0x080c, 0xe7cb, 0x1904, 0xd708, 0x080c, 0x32e5,
+	0x1904, 0xd708, 0x080c, 0xd8d5, 0x1904, 0xd3dc, 0x0016, 0x0026,
+	0x00e6, 0x2071, 0x0260, 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08,
+	0x080c, 0xcb38, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206, 0x1188,
+	0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240,
+	0x2c08, 0x9006, 0x080c, 0xe599, 0x1180, 0x7244, 0x9286, 0xffff,
+	0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214, 0x9296,
+	0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086, 0x0007,
+	0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0xae71, 0x2160,
+	0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x9121, 0x080c, 0x9687,
+	0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x6544,
+	0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805,
+	0x2011, 0x0276, 0x080c, 0xbe1c, 0x003e, 0x002e, 0x001e, 0x015e,
+	0x0120, 0x6007, 0x0031, 0x0804, 0xd4f5, 0x080c, 0xba90, 0x080c,
+	0x73a5, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x73bf, 0x1138,
+	0x080c, 0x768d, 0x080c, 0x6023, 0x080c, 0x72d7, 0x0010, 0x080c,
+	0x737d, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x32e5, 0x1904,
+	0xd708, 0x080c, 0xd8d5, 0x1904, 0xd3dc, 0x6106, 0x080c, 0xd8f1,
+	0x1120, 0x6007, 0x002b, 0x0804, 0xd4f5, 0x6007, 0x002c, 0x0804,
+	0xd4f5, 0x080c, 0xe7cb, 0x1904, 0xd708, 0x080c, 0x32e5, 0x1904,
+	0xd708, 0x080c, 0xd8d5, 0x1904, 0xd3dc, 0x6106, 0x080c, 0xd8f6,
+	0x1120, 0x6007, 0x002e, 0x0804, 0xd4f5, 0x6007, 0x002f, 0x0804,
+	0xd4f5, 0x080c, 0x32e5, 0x1904, 0xd708, 0x00e6, 0x00d6, 0x00c6,
+	0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158,
+	0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de,
+	0x00ee, 0x0804, 0xd4fc, 0x080c, 0x56dc, 0xd0e4, 0x0904, 0xd653,
+	0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108, 0x720c,
+	0x080c, 0x6977, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106, 0x1118,
+	0xb814, 0x9206, 0x0510, 0x080c, 0x6973, 0x15b8, 0x2069, 0x1800,
+	0x6880, 0x9206, 0x1590, 0x687c, 0x9106, 0x1578, 0x7210, 0x080c,
+	0xcb38, 0x0590, 0x080c, 0xd7c0, 0x0578, 0x080c, 0xe64b, 0x0560,
+	0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x90d9, 0x080c,
+	0x9687, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff,
+	0x0150, 0x080c, 0xcb38, 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110,
+	0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c,
+	0xe599, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037, 0x602f,
+	0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003,
+	0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c, 0x32e5,
+	0x1904, 0xd708, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00, 0x8007,
+	0x9086, 0x0006, 0x1904, 0xd4fc, 0x00e6, 0x00d6, 0x00c6, 0x080c,
+	0x56dc, 0xd0e4, 0x0904, 0xd6cb, 0x2069, 0x1800, 0x2071, 0x026c,
+	0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150, 0x7208,
+	0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xe599, 0x2c10, 0x00ce,
+	0x05e8, 0x080c, 0xcb38, 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004,
+	0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xc76e, 0x002e,
+	0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001, 0x0178,
+	0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280, 0x0005,
+	0x2004, 0x9005, 0x0170, 0x080c, 0xd7c0, 0x0904, 0xd64c, 0x0056,
+	0x7510, 0x7614, 0x080c, 0xe664, 0x005e, 0x00ce, 0x00de, 0x00ee,
+	0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003,
+	0x0001, 0x080c, 0x90d9, 0x080c, 0x9687, 0x0c78, 0x6007, 0x003b,
+	0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x080c, 0x90d9,
+	0x080c, 0x9687, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b, 0x6017,
+	0x0000, 0x0804, 0xd623, 0x00e6, 0x0026, 0x080c, 0x6939, 0x0550,
+	0x080c, 0x68d5, 0x080c, 0xe83d, 0x1518, 0x2071, 0x1800, 0x70dc,
+	0x9085, 0x0003, 0x70de, 0x00f6, 0x2079, 0x0100, 0x72b0, 0x9284,
+	0x00ff, 0x707e, 0x78e6, 0x9284, 0xff00, 0x7280, 0x9205, 0x7082,
+	0x78ea, 0x00fe, 0x70e7, 0x0000, 0x080c, 0x6977, 0x0120, 0x2011,
+	0x19ff, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2f98, 0x0010,
+	0x080c, 0xe86f, 0x002e, 0x00ee, 0x080c, 0xae71, 0x0804, 0xd4fb,
+	0x080c, 0xae71, 0x0005, 0x2600, 0x0002, 0xd71f, 0xd750, 0xd761,
+	0xd71f, 0xd71f, 0xd721, 0xd772, 0xd71f, 0xd71f, 0xd71f, 0xd73e,
+	0xd71f, 0xd71f, 0xd71f, 0xd77d, 0xd78a, 0xd7bb, 0xd71f, 0x080c,
+	0x0dd5, 0x080c, 0xe7cb, 0x1d20, 0x080c, 0x32e5, 0x1d08, 0x080c,
+	0xd8d5, 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001,
+	0x080c, 0x9121, 0x0005, 0x080c, 0x31c1, 0x080c, 0xd25f, 0x6007,
+	0x0001, 0x6003, 0x0001, 0x080c, 0x9121, 0x0005, 0x080c, 0xe7cb,
+	0x1938, 0x080c, 0x32e5, 0x1920, 0x080c, 0xd8d5, 0x1d60, 0x703c,
+	0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x9121, 0x0005,
+	0x080c, 0x32e5, 0x1904, 0xd708, 0x2009, 0x0041, 0x080c, 0xe878,
+	0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x9121, 0x080c, 0x9687,
+	0x0005, 0x080c, 0x32e5, 0x1904, 0xd708, 0x2009, 0x0042, 0x080c,
+	0xe878, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x9121, 0x080c,
+	0x9687, 0x0005, 0x080c, 0x32e5, 0x1904, 0xd708, 0x2009, 0x0046,
+	0x080c, 0xe878, 0x080c, 0xae71, 0x0005, 0x080c, 0xd7dd, 0x0904,
+	0xd708, 0x6007, 0x004e, 0x6003, 0x0001, 0x080c, 0x9121, 0x080c,
+	0x9687, 0x0005, 0x6007, 0x004f, 0x6017, 0x0000, 0x7134, 0x918c,
+	0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, 0x1160, 0x7140, 0x2001,
+	0x19bc, 0x2004, 0x9106, 0x11b0, 0x7144, 0x2001, 0x19bd, 0x2004,
+	0x9106, 0x0190, 0x9186, 0x0002, 0x1168, 0x2011, 0x0276, 0x20a9,
+	0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xbe30,
+	0x009e, 0x0110, 0x6017, 0x0001, 0x6003, 0x0001, 0x080c, 0x9121,
+	0x080c, 0x9687, 0x0005, 0x6007, 0x0050, 0x703c, 0x6016, 0x0ca0,
+	0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6, 0x2260, 0x6010,
+	0x2058, 0xb8cc, 0xd084, 0x0150, 0x7128, 0x6048, 0x9106, 0x1120,
+	0x712c, 0x6044, 0x9106, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005, 0x0016, 0x0096, 0x0086,
+	0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800,
+	0x7090, 0x908a, 0x00f9, 0x16e8, 0x20e1, 0x0000, 0x2001, 0x199f,
+	0x2003, 0x0000, 0x080c, 0x1018, 0x05a0, 0x2900, 0x6016, 0x7090,
+	0x8004, 0xa816, 0x908a, 0x001e, 0x02d0, 0xa833, 0x001e, 0x20a9,
+	0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001,
+	0x199f, 0x0016, 0x200c, 0x0471, 0x001e, 0x2940, 0x080c, 0x1018,
+	0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff, 0x0180, 0x0c18, 0xa832,
+	0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001,
+	0x199f, 0x0016, 0x200c, 0x00b1, 0x001e, 0x0000, 0x9085, 0x0001,
+	0x0048, 0x2071, 0x1800, 0x7093, 0x0000, 0x6014, 0x2048, 0x080c,
+	0x0fb1, 0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee, 0x008e, 0x009e,
+	0x001e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x918c,
+	0xffff, 0x11a8, 0x080c, 0x23ad, 0x2099, 0x026c, 0x2001, 0x0014,
+	0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x00f8, 0x20a8, 0x4003,
+	0x22a8, 0x8108, 0x080c, 0x23ad, 0x2099, 0x0260, 0x0ca8, 0x080c,
+	0x23ad, 0x2061, 0x199f, 0x6004, 0x2098, 0x6008, 0x3518, 0x9312,
+	0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8, 0x8108,
+	0x080c, 0x23ad, 0x2099, 0x0260, 0x0ca8, 0x2061, 0x199f, 0x2019,
+	0x0280, 0x3300, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0260,
 	0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a,
-	0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066,
-	0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006,
-	0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686,
-	0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085, 0x0001, 0x006e,
-	0x00be, 0x0005, 0x00d6, 0x080c, 0xd94e, 0x00de, 0x0005, 0x00d6,
-	0x080c, 0xd95b, 0x1520, 0x680c, 0x908c, 0xff00, 0x6820, 0x9084,
-	0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006,
-	0x080c, 0xe977, 0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920,
-	0x918c, 0x00ff, 0x6824, 0x080c, 0x283e, 0x1148, 0x2001, 0x0001,
-	0x080c, 0xe977, 0x2110, 0x900e, 0x080c, 0x3208, 0x0018, 0x9085,
-	0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c,
-	0xaeaf, 0x05a8, 0x0016, 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204,
-	0x8211, 0x220c, 0x080c, 0x283e, 0x1578, 0x080c, 0x659e, 0x1560,
-	0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c,
-	0xe7aa, 0x11d8, 0x080c, 0x32e3, 0x11c0, 0x080c, 0xd8b6, 0x0510,
-	0x2001, 0x0007, 0x080c, 0x654f, 0x2001, 0x0007, 0x080c, 0x657b,
-	0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001,
-	0x080c, 0x9138, 0x080c, 0x968d, 0x0010, 0x080c, 0xae61, 0x9085,
-	0x0001, 0x00ce, 0x00be, 0x0005, 0x080c, 0xae61, 0x00ce, 0x002e,
-	0x001e, 0x0ca8, 0x080c, 0xae61, 0x9006, 0x0c98, 0x2069, 0x026d,
-	0x6800, 0x9082, 0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001,
-	0x0008, 0x9006, 0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808,
-	0x9084, 0xff00, 0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018,
-	0x0118, 0x9186, 0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff,
-	0x910d, 0x615a, 0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005,
-	0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b6, 0x0013, 0x1130,
-	0x2008, 0x91b2, 0x0040, 0x1a04, 0xdaa5, 0x0092, 0x91b6, 0x0027,
-	0x0120, 0x91b6, 0x0014, 0x190c, 0x0dd5, 0x2001, 0x0007, 0x080c,
-	0x657b, 0x080c, 0x9588, 0x080c, 0xae92, 0x080c, 0x968d, 0x0005,
-	0xd9d8, 0xd9da, 0xd9d8, 0xd9d8, 0xd9d8, 0xd9da, 0xd9e9, 0xda9e,
-	0xda3b, 0xda9e, 0xda4f, 0xda9e, 0xd9e9, 0xda9e, 0xda96, 0xda9e,
-	0xda96, 0xda9e, 0xda9e, 0xd9d8, 0xd9d8, 0xd9d8, 0xd9d8, 0xd9d8,
-	0xd9d8, 0xd9d8, 0xd9d8, 0xd9d8, 0xd9d8, 0xd9d8, 0xd9da, 0xd9d8,
-	0xda9e, 0xd9d8, 0xd9d8, 0xda9e, 0xd9d8, 0xda9b, 0xda9e, 0xd9d8,
-	0xd9d8, 0xd9d8, 0xd9d8, 0xda9e, 0xda9e, 0xd9d8, 0xda9e, 0xda9e,
-	0xd9d8, 0xd9e4, 0xd9d8, 0xd9d8, 0xd9d8, 0xd9d8, 0xda9a, 0xda9e,
-	0xd9d8, 0xd9d8, 0xda9e, 0xda9e, 0xd9d8, 0xd9d8, 0xd9d8, 0xd9d8,
-	0x080c, 0x0dd5, 0x080c, 0x9588, 0x080c, 0xd248, 0x6003, 0x0002,
-	0x080c, 0x968d, 0x0804, 0xdaa4, 0x9006, 0x080c, 0x653b, 0x0804,
-	0xda9e, 0x080c, 0x696a, 0x1904, 0xda9e, 0x9006, 0x080c, 0x653b,
-	0x6010, 0x2058, 0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6, 0x2079,
-	0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0428, 0x6010, 0x2058,
-	0xb8c0, 0x9005, 0x1178, 0x080c, 0xd230, 0x1904, 0xda9e, 0x0036,
-	0x0046, 0xbba0, 0x2021, 0x0007, 0x080c, 0x4cbb, 0x004e, 0x003e,
-	0x0804, 0xda9e, 0x080c, 0x3314, 0x1904, 0xda9e, 0x2001, 0x1800,
-	0x2004, 0x9086, 0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a8,
-	0x8000, 0x78aa, 0x00fe, 0x2001, 0x0002, 0x080c, 0x654f, 0x080c,
-	0x9588, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c,
-	0x9138, 0x080c, 0x968d, 0x6110, 0x2158, 0x2009, 0x0001, 0x080c,
-	0x8501, 0x0804, 0xdaa4, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0006, 0x0904, 0xda9e, 0x9686, 0x0004, 0x0904,
-	0xda9e, 0x080c, 0x8cbb, 0x2001, 0x0004, 0x0804, 0xda9c, 0x2001,
-	0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010,
-	0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4cbb, 0x004e, 0x003e,
-	0x2001, 0x0006, 0x080c, 0xdac2, 0x6610, 0x2658, 0xbe04, 0x0066,
-	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001,
-	0x0006, 0x080c, 0x657b, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120,
-	0x2001, 0x0006, 0x080c, 0x654f, 0x080c, 0x696a, 0x11f8, 0x2001,
-	0x1837, 0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686,
-	0x0006, 0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa,
-	0x00fe, 0x0804, 0xda23, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006,
-	0x0449, 0x0020, 0x0018, 0x0010, 0x080c, 0x657b, 0x080c, 0x9588,
-	0x080c, 0xae61, 0x080c, 0x968d, 0x0005, 0x2600, 0x0002, 0xdab9,
-	0xdab9, 0xdab9, 0xdab9, 0xdab9, 0xdabb, 0xdab9, 0xdabb, 0xdab9,
-	0xdab9, 0xdabb, 0xdab9, 0xdab9, 0xdab9, 0xdabb, 0xdabb, 0xdabb,
-	0xdabb, 0x080c, 0x0dd5, 0x080c, 0x9588, 0x080c, 0xae61, 0x080c,
-	0x968d, 0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900,
-	0xd184, 0x0138, 0x080c, 0x654f, 0x9006, 0x080c, 0x653b, 0x080c,
-	0x31e8, 0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804,
-	0x9084, 0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0dd5, 0x91b6,
-	0x0015, 0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0dd5,
-	0x006b, 0x0005, 0xb8fc, 0xb8fc, 0xb8fc, 0xb8fc, 0xb8fc, 0xb8fc,
-	0xdb41, 0xdb02, 0xb8fc, 0xb8fc, 0xb8fc, 0xb8fc, 0xb8fc, 0xb8fc,
-	0xb8fc, 0xb8fc, 0xb8fc, 0xb8fc, 0xdb41, 0xdb48, 0xb8fc, 0xb8fc,
-	0xb8fc, 0xb8fc, 0x00f6, 0x080c, 0x696a, 0x11d8, 0x080c, 0xd230,
-	0x11c0, 0x6010, 0x905d, 0x01a8, 0xb8c0, 0x9005, 0x0190, 0x9006,
-	0x080c, 0x653b, 0x2001, 0x0002, 0x080c, 0x654f, 0x6023, 0x0001,
-	0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9138, 0x080c, 0x968d,
-	0x00f0, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x283e,
-	0x11b0, 0x080c, 0x65ff, 0x0118, 0x080c, 0xae61, 0x0080, 0xb810,
-	0x0006, 0xb814, 0x0006, 0xb8c0, 0x0006, 0x080c, 0x6034, 0x000e,
-	0xb8c2, 0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0xae61, 0x00fe,
-	0x0005, 0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0xae61, 0x0005,
-	0x080c, 0xbc85, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
-	0x9138, 0x080c, 0x968d, 0x0010, 0x080c, 0xae61, 0x0005, 0x6004,
-	0x908a, 0x0053, 0x1a0c, 0x0dd5, 0x080c, 0x9588, 0x080c, 0xae92,
-	0x080c, 0x968d, 0x0005, 0x9182, 0x0040, 0x0002, 0xdb79, 0xdb79,
-	0xdb79, 0xdb79, 0xdb7b, 0xdb79, 0xdb79, 0xdb79, 0xdb79, 0xdb79,
-	0xdb79, 0xdb79, 0xdb79, 0xdb79, 0xdb79, 0xdb79, 0xdb79, 0xdb79,
-	0xdb79, 0x080c, 0x0dd5, 0x0096, 0x00b6, 0x00d6, 0x00e6, 0x00f6,
-	0x0046, 0x0026, 0x6210, 0x2258, 0xb8bc, 0x9005, 0x11a8, 0x6106,
-	0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xdbe1, 0x080c,
-	0xe96b, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001, 0x2011,
-	0x0200, 0x080c, 0x86dd, 0x0020, 0x9026, 0x080c, 0xe7ef, 0x0c38,
-	0x080c, 0x0fff, 0x090c, 0x0dd5, 0x6003, 0x0007, 0xa867, 0x010d,
-	0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008, 0xa8e2,
-	0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876, 0xa87f,
-	0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x6c81, 0x001e,
-	0x080c, 0xe96b, 0x1904, 0xdc41, 0x9486, 0x2000, 0x1130, 0x2019,
-	0x0017, 0x080c, 0xe522, 0x0804, 0xdc41, 0x9486, 0x0200, 0x1120,
-	0x080c, 0xe4be, 0x0804, 0xdc41, 0x9486, 0x0400, 0x0120, 0x9486,
-	0x1000, 0x1904, 0xdc41, 0x2019, 0x0002, 0x080c, 0xe4d9, 0x0804,
-	0xdc41, 0x2069, 0x1a71, 0x6a00, 0xd284, 0x0904, 0xdcab, 0x9284,
-	0x0300, 0x1904, 0xdca4, 0x6804, 0x9005, 0x0904, 0xdc8c, 0x2d78,
-	0x6003, 0x0007, 0x080c, 0x1018, 0x0904, 0xdc4d, 0x7800, 0xd08c,
-	0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000, 0x2001, 0x180f,
-	0x2004, 0xd084, 0x1904, 0xdcaf, 0x9006, 0xa802, 0xa867, 0x0116,
-	0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058, 0xb8a0,
-	0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be, 0xb930,
-	0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084, 0x0003,
-	0x9080, 0xdc49, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001, 0x0270,
-	0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b, 0x0080, 0x20e1,
-	0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b, 0x0000,
-	0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae, 0x080c,
-	0x6c81, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be, 0x009e,
-	0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001, 0x1810, 0x2004,
-	0xd084, 0x0120, 0x080c, 0x0fff, 0x1904, 0xdbf6, 0x6017, 0xf100,
-	0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x90f0, 0x080c, 0x968d,
-	0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086, 0x1200,
-	0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114, 0x918c, 0xf700,
-	0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043, 0x080c,
-	0x90f0, 0x080c, 0x968d, 0x0828, 0x6868, 0x602e, 0x686c, 0x6032,
-	0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x0804, 0xdc41, 0x2001, 0x180e, 0x2004, 0xd0ec,
-	0x0120, 0x2011, 0x8049, 0x080c, 0x4b04, 0x6017, 0xf300, 0x0010,
-	0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x0804, 0xdc41, 0x6017, 0xf500, 0x0c98, 0x6017,
-	0xf600, 0x0804, 0xdc61, 0x6017, 0xf200, 0x0804, 0xdc61, 0xa867,
-	0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a, 0x7044,
-	0x9084, 0x0003, 0x9080, 0xdc49, 0x2005, 0xa87e, 0x2928, 0x6010,
-	0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e, 0xb830,
-	0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009, 0x0205, 0x2104,
-	0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011, 0x0210, 0x2214,
-	0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0dd5, 0x8210,
-	0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0029, 0x20a0, 0x2011, 0xdd2b, 0x2041, 0x0001, 0x223d, 0x9784,
-	0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003, 0x931a, 0x0530,
-	0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260, 0x2098,
-	0x0c68, 0x2950, 0x080c, 0x1018, 0x0170, 0x2900, 0xb002, 0xa867,
-	0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b,
-	0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d, 0x0118, 0x080c,
-	0x1031, 0x0cc8, 0x080c, 0x1031, 0x0804, 0xdc4d, 0x2548, 0x8847,
-	0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b, 0x0000, 0x080c,
-	0xe551, 0x0804, 0xdc41, 0x8010, 0x0004, 0x801a, 0x0006, 0x8018,
-	0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013, 0x1160, 0x6004,
-	0x908a, 0x0054, 0x1a0c, 0x0dd5, 0x9082, 0x0040, 0x0a0c, 0x0dd5,
-	0x2008, 0x0804, 0xdddc, 0x9186, 0x0051, 0x0108, 0x00c0, 0x2001,
-	0x0109, 0x2004, 0xd084, 0x0904, 0xdd8d, 0x0126, 0x2091, 0x2800,
-	0x0006, 0x0016, 0x0026, 0x080c, 0x8fd5, 0x002e, 0x001e, 0x000e,
-	0x012e, 0x6000, 0x9086, 0x0002, 0x1580, 0x0804, 0xde24, 0x9186,
-	0x0027, 0x0530, 0x9186, 0x0048, 0x0128, 0x9186, 0x0014, 0x0500,
-	0x190c, 0x0dd5, 0x2001, 0x0109, 0x2004, 0xd084, 0x01f0, 0x00c6,
-	0x0126, 0x2091, 0x2800, 0x00c6, 0x2061, 0x0100, 0x0006, 0x0016,
-	0x0026, 0x080c, 0x8fd5, 0x002e, 0x001e, 0x000e, 0x00ce, 0x012e,
-	0x00ce, 0x6000, 0x9086, 0x0004, 0x190c, 0x0dd5, 0x0804, 0xdf05,
-	0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c, 0xaef7, 0x0005,
-	0xdda3, 0xdda5, 0xdda5, 0xddcc, 0xdda3, 0xdda3, 0xdda3, 0xdda3,
-	0xdda3, 0xdda3, 0xdda3, 0xdda3, 0xdda3, 0xdda3, 0xdda3, 0xdda3,
-	0xdda3, 0xdda3, 0xdda3, 0x080c, 0x0dd5, 0x080c, 0x9588, 0x080c,
-	0x968d, 0x0036, 0x0096, 0x6014, 0x904d, 0x01d8, 0x080c, 0xcb35,
-	0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c, 0xe551, 0x6017, 0x0000,
-	0x6018, 0x9005, 0x1120, 0x2001, 0x1987, 0x2004, 0x601a, 0x6003,
-	0x0007, 0x009e, 0x003e, 0x0005, 0x0096, 0x080c, 0x9588, 0x080c,
-	0x968d, 0x080c, 0xcb35, 0x0120, 0x6014, 0x2048, 0x080c, 0x1031,
-	0x080c, 0xae92, 0x009e, 0x0005, 0x0002, 0xddf0, 0xde07, 0xddf2,
-	0xde1e, 0xddf0, 0xddf0, 0xddf0, 0xddf0, 0xddf0, 0xddf0, 0xddf0,
-	0xddf0, 0xddf0, 0xddf0, 0xddf0, 0xddf0, 0xddf0, 0xddf0, 0xddf0,
-	0x080c, 0x0dd5, 0x0096, 0x080c, 0x9588, 0x6014, 0x2048, 0xa87c,
-	0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043, 0x080c, 0xaedc,
-	0x0010, 0x6003, 0x0004, 0x080c, 0x968d, 0x009e, 0x0005, 0x080c,
-	0x9588, 0x080c, 0xcb35, 0x0138, 0x6114, 0x0096, 0x2148, 0xa97c,
-	0x009e, 0xd1ec, 0x1138, 0x080c, 0x86b2, 0x080c, 0xae61, 0x080c,
-	0x968d, 0x0005, 0x080c, 0xe7b3, 0x0db0, 0x0cc8, 0x080c, 0x9588,
-	0x2009, 0x0041, 0x0804, 0xdf8d, 0x9182, 0x0040, 0x0002, 0xde3a,
-	0xde3c, 0xde3a, 0xde3a, 0xde3a, 0xde3a, 0xde3a, 0xde3a, 0xde3a,
-	0xde3a, 0xde3a, 0xde3a, 0xde3a, 0xde3a, 0xde3a, 0xde3a, 0xde3a,
-	0xde3d, 0xde3a, 0x080c, 0x0dd5, 0x0005, 0x00d6, 0x080c, 0x86b2,
-	0x00de, 0x080c, 0xe80b, 0x080c, 0xae61, 0x0005, 0x9182, 0x0040,
-	0x0002, 0xde5c, 0xde5c, 0xde5c, 0xde5c, 0xde5c, 0xde5c, 0xde5c,
-	0xde5c, 0xde5c, 0xde5e, 0xdecd, 0xde5c, 0xde5c, 0xde5c, 0xde5c,
-	0xdecd, 0xde5c, 0xde5c, 0xde5c, 0x080c, 0x0dd5, 0x2001, 0x0105,
-	0x2004, 0x9084, 0x1800, 0x01c8, 0x2001, 0x0132, 0x200c, 0x2001,
-	0x0131, 0x2004, 0x9105, 0x1904, 0xdecd, 0x2009, 0x180c, 0x2104,
-	0xd0d4, 0x0904, 0xdecd, 0xc0d4, 0x200a, 0x2009, 0x0105, 0x2104,
-	0x9084, 0xe7fd, 0x9085, 0x0010, 0x200a, 0x2001, 0x1867, 0x2004,
-	0xd0e4, 0x1528, 0x603b, 0x0000, 0x080c, 0x963d, 0x6014, 0x0096,
-	0x2048, 0xa87c, 0xd0fc, 0x0188, 0x908c, 0x0003, 0x918e, 0x0002,
-	0x0508, 0x2001, 0x180c, 0x2004, 0xd0d4, 0x11e0, 0x080c, 0x97b9,
-	0x2009, 0x0041, 0x009e, 0x0804, 0xdf8d, 0x080c, 0x97b9, 0x6003,
-	0x0007, 0x601b, 0x0000, 0x080c, 0x86b2, 0x009e, 0x0005, 0x2001,
-	0x0100, 0x2004, 0x9082, 0x0005, 0x0aa8, 0x2001, 0x011f, 0x2004,
-	0x603a, 0x0890, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102, 0xd1cc,
-	0x0110, 0x080c, 0x2c52, 0x080c, 0x97b9, 0x6014, 0x2048, 0xa97c,
-	0xd1ec, 0x1130, 0x080c, 0x86b2, 0x080c, 0xae61, 0x009e, 0x0005,
-	0x080c, 0xe7b3, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c,
-	0xc1d4, 0x2102, 0x0036, 0x080c, 0x963d, 0x080c, 0x97b9, 0x6014,
-	0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac,
-	0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003,
-	0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xe551, 0x6018, 0x9005,
-	0x1128, 0x2001, 0x1987, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000,
-	0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002,
-	0xdf1c, 0xdf1c, 0xdf1c, 0xdf1c, 0xdf1c, 0xdf1c, 0xdf1c, 0xdf1c,
-	0xdf1e, 0xdf1c, 0xdf1c, 0xdf1c, 0xdf1c, 0xdf1c, 0xdf1c, 0xdf1c,
-	0xdf1c, 0xdf1c, 0xdf1c, 0xdf69, 0x080c, 0x0dd5, 0x6014, 0x0096,
-	0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be,
-	0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009,
-	0x0041, 0x009e, 0x0804, 0xdf8d, 0x6003, 0x0007, 0x601b, 0x0000,
-	0x080c, 0x86b2, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006,
-	0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420,
-	0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110,
-	0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e,
-	0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006,
-	0x00e9, 0x080c, 0x86b4, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e,
-	0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x15e5, 0x1904, 0xdf1e,
-	0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105,
-	0x1120, 0x080c, 0x15e5, 0x1904, 0xdf1e, 0x0005, 0xd2fc, 0x0140,
-	0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010,
-	0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208,
-	0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0dd5,
-	0x6024, 0xd0dc, 0x090c, 0x0dd5, 0x0005, 0xdfb0, 0xdfbc, 0xdfc8,
-	0xdfd4, 0xdfb0, 0xdfb0, 0xdfb0, 0xdfb0, 0xdfb7, 0xdfb2, 0xdfb2,
-	0xdfb0, 0xdfb0, 0xdfb0, 0xdfb0, 0xdfb2, 0xdfb0, 0xdfb2, 0xdfb0,
-	0x080c, 0x0dd5, 0x6024, 0xd0dc, 0x090c, 0x0dd5, 0x0005, 0x6014,
-	0x9005, 0x190c, 0x0dd5, 0x0005, 0x6003, 0x0001, 0x6106, 0x080c,
-	0x90f0, 0x0126, 0x2091, 0x8000, 0x080c, 0x968d, 0x012e, 0x0005,
-	0x6003, 0x0001, 0x6106, 0x080c, 0x90f0, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x968d, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x2c10,
-	0x080c, 0x1bad, 0x0126, 0x2091, 0x8000, 0x080c, 0x9155, 0x080c,
-	0x97b9, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036, 0x0096,
-	0x9182, 0x0040, 0x0023, 0x009e, 0x003e, 0x012e, 0x0005, 0xdfff,
-	0xe001, 0xe013, 0xe02d, 0xdfff, 0xdfff, 0xdfff, 0xdfff, 0xdfff,
-	0xdfff, 0xdfff, 0xdfff, 0xdfff, 0xdfff, 0xdfff, 0xdfff, 0x080c,
-	0x0dd5, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x01f8, 0x909c, 0x0003,
-	0x939e, 0x0003, 0x01d0, 0x6003, 0x0001, 0x6106, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x0470, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0168,
-	0x909c, 0x0003, 0x939e, 0x0003, 0x0140, 0x6003, 0x0001, 0x6106,
-	0x080c, 0x90f0, 0x080c, 0x968d, 0x00e0, 0x901e, 0x6316, 0x631a,
-	0x2019, 0x0004, 0x080c, 0xe551, 0x00a0, 0x6014, 0x2048, 0xa87c,
-	0xd0fc, 0x0d98, 0x909c, 0x0003, 0x939e, 0x0003, 0x0d70, 0x6003,
-	0x0003, 0x6106, 0x2c10, 0x080c, 0x1bad, 0x080c, 0x9155, 0x080c,
-	0x97b9, 0x0005, 0x080c, 0x9588, 0x6114, 0x81ff, 0x0158, 0x0096,
-	0x2148, 0x080c, 0xe908, 0x0036, 0x2019, 0x0029, 0x080c, 0xe551,
-	0x003e, 0x009e, 0x080c, 0xae92, 0x080c, 0x968d, 0x0005, 0x080c,
-	0x963d, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xe908,
-	0x0036, 0x2019, 0x0029, 0x080c, 0xe551, 0x003e, 0x009e, 0x080c,
-	0xae92, 0x080c, 0x97b9, 0x0005, 0x9182, 0x0085, 0x0002, 0xe07e,
-	0xe07c, 0xe07c, 0xe08a, 0xe07c, 0xe07c, 0xe07c, 0xe07c, 0xe07c,
-	0xe07c, 0xe07c, 0xe07c, 0xe07c, 0x080c, 0x0dd5, 0x6003, 0x000b,
-	0x6106, 0x080c, 0x90f0, 0x0126, 0x2091, 0x8000, 0x080c, 0x968d,
-	0x012e, 0x0005, 0x0026, 0x00e6, 0x080c, 0xe7aa, 0x0118, 0x080c,
-	0xae61, 0x0450, 0x2071, 0x0260, 0x7224, 0x6216, 0x2001, 0x180e,
-	0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be,
-	0x2c00, 0x2011, 0x014e, 0x080c, 0xb182, 0x7220, 0x080c, 0xe3f7,
-	0x0118, 0x6007, 0x0086, 0x0040, 0x6007, 0x0087, 0x7224, 0x9296,
-	0xffff, 0x1110, 0x6007, 0x0086, 0x6003, 0x0001, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x080c, 0x97b9, 0x00ee, 0x002e, 0x0005, 0x9186,
-	0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0dd5, 0x908a,
-	0x0092, 0x1a0c, 0x0dd5, 0x9082, 0x0085, 0x00a2, 0x9186, 0x0027,
-	0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0xaef7, 0x0050, 0x2001,
-	0x0007, 0x080c, 0x657b, 0x080c, 0x9588, 0x080c, 0xae92, 0x080c,
-	0x968d, 0x0005, 0xe0ef, 0xe0f1, 0xe0f1, 0xe0ef, 0xe0ef, 0xe0ef,
-	0xe0ef, 0xe0ef, 0xe0ef, 0xe0ef, 0xe0ef, 0xe0ef, 0xe0ef, 0x080c,
-	0x0dd5, 0x080c, 0x9588, 0x080c, 0xae92, 0x080c, 0x968d, 0x0005,
-	0x9182, 0x0085, 0x0a0c, 0x0dd5, 0x9182, 0x0092, 0x1a0c, 0x0dd5,
-	0x9182, 0x0085, 0x0002, 0xe110, 0xe110, 0xe110, 0xe112, 0xe110,
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016,
+	0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x23c5, 0x20a1,
+	0x024c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
+	0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108, 0x080c,
+	0x23c5, 0x20a1, 0x0240, 0x0c98, 0x080c, 0x23c5, 0x2061, 0x19a2,
+	0x6004, 0x20a0, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
+	0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108, 0x080c,
+	0x23c5, 0x20a1, 0x0240, 0x0c98, 0x2061, 0x19a2, 0x2019, 0x0260,
+	0x3400, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0240, 0x6006,
+	0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, 0x00ce,
+	0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066, 0x6610,
+	0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0170,
+	0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006,
+	0x0128, 0x9686, 0x0004, 0x0110, 0x9085, 0x0001, 0x006e, 0x00be,
+	0x0005, 0x00d6, 0x080c, 0xd96d, 0x00de, 0x0005, 0x00d6, 0x080c,
+	0xd97a, 0x1520, 0x680c, 0x908c, 0xff00, 0x6820, 0x9084, 0x00ff,
+	0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006, 0x080c,
+	0xe998, 0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920, 0x918c,
+	0x00ff, 0x6824, 0x080c, 0x2840, 0x1148, 0x2001, 0x0001, 0x080c,
+	0xe998, 0x2110, 0x900e, 0x080c, 0x320a, 0x0018, 0x9085, 0x0001,
+	0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c, 0xaebf,
+	0x05a8, 0x0016, 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204, 0x8211,
+	0x220c, 0x080c, 0x2840, 0x1578, 0x080c, 0x65a7, 0x1560, 0xbe12,
+	0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c, 0xe7cb,
+	0x11d8, 0x080c, 0x32e5, 0x11c0, 0x080c, 0xd8d5, 0x0510, 0x2001,
+	0x0007, 0x080c, 0x6558, 0x2001, 0x0007, 0x080c, 0x6584, 0x6017,
+	0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
+	0x9121, 0x080c, 0x9687, 0x0010, 0x080c, 0xae71, 0x9085, 0x0001,
+	0x00ce, 0x00be, 0x0005, 0x080c, 0xae71, 0x00ce, 0x002e, 0x001e,
+	0x0ca8, 0x080c, 0xae71, 0x9006, 0x0c98, 0x2069, 0x026d, 0x6800,
+	0x9082, 0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001, 0x0008,
+	0x9006, 0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808, 0x9084,
+	0xff00, 0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018, 0x0118,
+	0x9186, 0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff, 0x910d,
+	0x615a, 0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005, 0x6004,
+	0x90b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b6, 0x0013, 0x1130, 0x2008,
+	0x91b2, 0x0040, 0x1a04, 0xdac4, 0x0092, 0x91b6, 0x0027, 0x0120,
+	0x91b6, 0x0014, 0x190c, 0x0dd5, 0x2001, 0x0007, 0x080c, 0x6584,
+	0x080c, 0x957b, 0x080c, 0xaea2, 0x080c, 0x9687, 0x0005, 0xd9f7,
+	0xd9f9, 0xd9f7, 0xd9f7, 0xd9f7, 0xd9f9, 0xda08, 0xdabd, 0xda5a,
+	0xdabd, 0xda6e, 0xdabd, 0xda08, 0xdabd, 0xdab5, 0xdabd, 0xdab5,
+	0xdabd, 0xdabd, 0xd9f7, 0xd9f7, 0xd9f7, 0xd9f7, 0xd9f7, 0xd9f7,
+	0xd9f7, 0xd9f7, 0xd9f7, 0xd9f7, 0xd9f7, 0xd9f9, 0xd9f7, 0xdabd,
+	0xd9f7, 0xd9f7, 0xdabd, 0xd9f7, 0xdaba, 0xdabd, 0xd9f7, 0xd9f7,
+	0xd9f7, 0xd9f7, 0xdabd, 0xdabd, 0xd9f7, 0xdabd, 0xdabd, 0xd9f7,
+	0xda03, 0xd9f7, 0xd9f7, 0xd9f7, 0xd9f7, 0xdab9, 0xdabd, 0xd9f7,
+	0xd9f7, 0xdabd, 0xdabd, 0xd9f7, 0xd9f7, 0xd9f7, 0xd9f7, 0x080c,
+	0x0dd5, 0x080c, 0x957b, 0x080c, 0xd262, 0x6003, 0x0002, 0x080c,
+	0x9687, 0x0804, 0xdac3, 0x9006, 0x080c, 0x6544, 0x0804, 0xdabd,
+	0x080c, 0x6973, 0x1904, 0xdabd, 0x9006, 0x080c, 0x6544, 0x6010,
+	0x2058, 0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6, 0x2079, 0x1800,
+	0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0428, 0x6010, 0x2058, 0xb8c0,
+	0x9005, 0x1178, 0x080c, 0xd24a, 0x1904, 0xdabd, 0x0036, 0x0046,
+	0xbba0, 0x2021, 0x0007, 0x080c, 0x4ccb, 0x004e, 0x003e, 0x0804,
+	0xdabd, 0x080c, 0x3316, 0x1904, 0xdabd, 0x2001, 0x1800, 0x2004,
+	0x9086, 0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000,
+	0x78aa, 0x00fe, 0x2001, 0x0002, 0x080c, 0x6558, 0x080c, 0x957b,
+	0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9121,
+	0x080c, 0x9687, 0x6110, 0x2158, 0x2009, 0x0001, 0x080c, 0x84ea,
+	0x0804, 0xdac3, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637,
+	0x9686, 0x0006, 0x0904, 0xdabd, 0x9686, 0x0004, 0x0904, 0xdabd,
+	0x080c, 0x8ca4, 0x2001, 0x0004, 0x0804, 0xdabb, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058,
+	0xbba0, 0x2021, 0x0006, 0x080c, 0x4ccb, 0x004e, 0x003e, 0x2001,
+	0x0006, 0x080c, 0xdae1, 0x6610, 0x2658, 0xbe04, 0x0066, 0x96b4,
+	0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001, 0x0006,
+	0x080c, 0x6584, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120, 0x2001,
+	0x0006, 0x080c, 0x6558, 0x080c, 0x6973, 0x11f8, 0x2001, 0x1837,
+	0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006,
+	0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe,
+	0x0804, 0xda42, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006, 0x0449,
+	0x0020, 0x0018, 0x0010, 0x080c, 0x6584, 0x080c, 0x957b, 0x080c,
+	0xae71, 0x080c, 0x9687, 0x0005, 0x2600, 0x0002, 0xdad8, 0xdad8,
+	0xdad8, 0xdad8, 0xdad8, 0xdada, 0xdad8, 0xdada, 0xdad8, 0xdad8,
+	0xdada, 0xdad8, 0xdad8, 0xdad8, 0xdada, 0xdada, 0xdada, 0xdada,
+	0x080c, 0x0dd5, 0x080c, 0x957b, 0x080c, 0xae71, 0x080c, 0x9687,
+	0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900, 0xd184,
+	0x0138, 0x080c, 0x6558, 0x9006, 0x080c, 0x6544, 0x080c, 0x31ea,
+	0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804, 0x9084,
+	0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0dd5, 0x91b6, 0x0015,
+	0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0dd5, 0x006b,
+	0x0005, 0xb90d, 0xb90d, 0xb90d, 0xb90d, 0xdb76, 0xb90d, 0xdb60,
+	0xdb21, 0xb90d, 0xb90d, 0xb90d, 0xb90d, 0xb90d, 0xb90d, 0xb90d,
+	0xb90d, 0xdb76, 0xb90d, 0xdb60, 0xdb67, 0xb90d, 0xb90d, 0xb90d,
+	0xb90d, 0x00f6, 0x080c, 0x6973, 0x11d8, 0x080c, 0xd24a, 0x11c0,
+	0x6010, 0x905d, 0x01a8, 0xb8c0, 0x9005, 0x0190, 0x9006, 0x080c,
+	0x6544, 0x2001, 0x0002, 0x080c, 0x6558, 0x6023, 0x0001, 0x6003,
+	0x0001, 0x6007, 0x0002, 0x080c, 0x9121, 0x080c, 0x9687, 0x00f0,
+	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2840, 0x11b0,
+	0x080c, 0x6608, 0x0118, 0x080c, 0xae71, 0x0080, 0xb810, 0x0006,
+	0xb814, 0x0006, 0xb8c0, 0x0006, 0x080c, 0x603d, 0x000e, 0xb8c2,
+	0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0xae71, 0x00fe, 0x0005,
+	0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0xae71, 0x0005, 0x080c,
+	0xbc98, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9121,
+	0x080c, 0x9687, 0x0010, 0x080c, 0xae71, 0x0005, 0x0804, 0xae71,
+	0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dd5, 0x080c, 0x957b, 0x080c,
+	0xaea2, 0x080c, 0x9687, 0x0005, 0x9182, 0x0040, 0x0002, 0xdb9a,
+	0xdb9a, 0xdb9a, 0xdb9a, 0xdb9c, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a,
+	0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a,
+	0xdb9a, 0xdb9a, 0x080c, 0x0dd5, 0x0096, 0x00b6, 0x00d6, 0x00e6,
+	0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8bc, 0x9005, 0x11a8,
+	0x6106, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xdc02,
+	0x080c, 0xe98c, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001,
+	0x2011, 0x0200, 0x080c, 0x86c6, 0x0020, 0x9026, 0x080c, 0xe810,
+	0x0c38, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0x6003, 0x0007, 0xa867,
+	0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008,
+	0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876,
+	0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x6c86,
+	0x001e, 0x080c, 0xe98c, 0x1904, 0xdc62, 0x9486, 0x2000, 0x1130,
+	0x2019, 0x0017, 0x080c, 0xe543, 0x0804, 0xdc62, 0x9486, 0x0200,
+	0x1120, 0x080c, 0xe4df, 0x0804, 0xdc62, 0x9486, 0x0400, 0x0120,
+	0x9486, 0x1000, 0x1904, 0xdc62, 0x2019, 0x0002, 0x080c, 0xe4fa,
+	0x0804, 0xdc62, 0x2069, 0x1a70, 0x6a00, 0xd284, 0x0904, 0xdccc,
+	0x9284, 0x0300, 0x1904, 0xdcc5, 0x6804, 0x9005, 0x0904, 0xdcad,
+	0x2d78, 0x6003, 0x0007, 0x080c, 0x1018, 0x0904, 0xdc6e, 0x7800,
+	0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000, 0x2001,
+	0x180f, 0x2004, 0xd084, 0x1904, 0xdcd0, 0x9006, 0xa802, 0xa867,
+	0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058,
+	0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be,
+	0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084,
+	0x0003, 0x9080, 0xdc6a, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001,
+	0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b, 0x0080,
+	0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b,
+	0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae,
+	0x080c, 0x6c86, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be,
+	0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001, 0x1810,
+	0x2004, 0xd084, 0x0120, 0x080c, 0x0fff, 0x1904, 0xdc17, 0x6017,
+	0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x90d9, 0x080c,
+	0x9687, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086,
+	0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114, 0x918c,
+	0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043,
+	0x080c, 0x90d9, 0x080c, 0x9687, 0x0828, 0x6868, 0x602e, 0x686c,
+	0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c,
+	0x90d9, 0x080c, 0x9687, 0x0804, 0xdc62, 0x2001, 0x180e, 0x2004,
+	0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b14, 0x6017, 0xf300,
+	0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c,
+	0x90d9, 0x080c, 0x9687, 0x0804, 0xdc62, 0x6017, 0xf500, 0x0c98,
+	0x6017, 0xf600, 0x0804, 0xdc82, 0x6017, 0xf200, 0x0804, 0xdc82,
+	0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a,
+	0x7044, 0x9084, 0x0003, 0x9080, 0xdc6a, 0x2005, 0xa87e, 0x2928,
+	0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e,
+	0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009, 0x0205,
+	0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011, 0x0210,
+	0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0dd5,
+	0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0029, 0x20a0, 0x2011, 0xdd4c, 0x2041, 0x0001, 0x223d,
+	0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003, 0x931a,
+	0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260,
+	0x2098, 0x0c68, 0x2950, 0x080c, 0x1018, 0x0170, 0x2900, 0xb002,
+	0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d, 0x0118,
+	0x080c, 0x1031, 0x0cc8, 0x080c, 0x1031, 0x0804, 0xdc6e, 0x2548,
+	0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b, 0x0000,
+	0x080c, 0xe572, 0x0804, 0xdc62, 0x8010, 0x0004, 0x801a, 0x0006,
+	0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013, 0x1160,
+	0x6004, 0x908a, 0x0054, 0x1a0c, 0x0dd5, 0x9082, 0x0040, 0x0a0c,
+	0x0dd5, 0x2008, 0x0804, 0xddfd, 0x9186, 0x0051, 0x0108, 0x00c0,
+	0x2001, 0x0109, 0x2004, 0xd084, 0x0904, 0xddae, 0x0126, 0x2091,
+	0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x8fbe, 0x002e, 0x001e,
+	0x000e, 0x012e, 0x6000, 0x9086, 0x0002, 0x1580, 0x0804, 0xde45,
+	0x9186, 0x0027, 0x0530, 0x9186, 0x0048, 0x0128, 0x9186, 0x0014,
+	0x0500, 0x190c, 0x0dd5, 0x2001, 0x0109, 0x2004, 0xd084, 0x01f0,
+	0x00c6, 0x0126, 0x2091, 0x2800, 0x00c6, 0x2061, 0x0100, 0x0006,
+	0x0016, 0x0026, 0x080c, 0x8fbe, 0x002e, 0x001e, 0x000e, 0x00ce,
+	0x012e, 0x00ce, 0x6000, 0x9086, 0x0004, 0x190c, 0x0dd5, 0x0804,
+	0xdf26, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c, 0xaf07,
+	0x0005, 0xddc4, 0xddc6, 0xddc6, 0xdded, 0xddc4, 0xddc4, 0xddc4,
+	0xddc4, 0xddc4, 0xddc4, 0xddc4, 0xddc4, 0xddc4, 0xddc4, 0xddc4,
+	0xddc4, 0xddc4, 0xddc4, 0xddc4, 0x080c, 0x0dd5, 0x080c, 0x957b,
+	0x080c, 0x9687, 0x0036, 0x0096, 0x6014, 0x904d, 0x01d8, 0x080c,
+	0xcb4a, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c, 0xe572, 0x6017,
+	0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1986, 0x2004, 0x601a,
+	0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096, 0x080c, 0x957b,
+	0x080c, 0x9687, 0x080c, 0xcb4a, 0x0120, 0x6014, 0x2048, 0x080c,
+	0x1031, 0x080c, 0xaea2, 0x009e, 0x0005, 0x0002, 0xde11, 0xde28,
+	0xde13, 0xde3f, 0xde11, 0xde11, 0xde11, 0xde11, 0xde11, 0xde11,
+	0xde11, 0xde11, 0xde11, 0xde11, 0xde11, 0xde11, 0xde11, 0xde11,
+	0xde11, 0x080c, 0x0dd5, 0x0096, 0x080c, 0x957b, 0x6014, 0x2048,
+	0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043, 0x080c,
+	0xaeec, 0x0010, 0x6003, 0x0004, 0x080c, 0x9687, 0x009e, 0x0005,
+	0x080c, 0x957b, 0x080c, 0xcb4a, 0x0138, 0x6114, 0x0096, 0x2148,
+	0xa97c, 0x009e, 0xd1ec, 0x1138, 0x080c, 0x869b, 0x080c, 0xae71,
+	0x080c, 0x9687, 0x0005, 0x080c, 0xe7d4, 0x0db0, 0x0cc8, 0x080c,
+	0x957b, 0x2009, 0x0041, 0x0804, 0xdfae, 0x9182, 0x0040, 0x0002,
+	0xde5b, 0xde5d, 0xde5b, 0xde5b, 0xde5b, 0xde5b, 0xde5b, 0xde5b,
+	0xde5b, 0xde5b, 0xde5b, 0xde5b, 0xde5b, 0xde5b, 0xde5b, 0xde5b,
+	0xde5b, 0xde5e, 0xde5b, 0x080c, 0x0dd5, 0x0005, 0x00d6, 0x080c,
+	0x869b, 0x00de, 0x080c, 0xe82c, 0x080c, 0xae71, 0x0005, 0x9182,
+	0x0040, 0x0002, 0xde7d, 0xde7d, 0xde7d, 0xde7d, 0xde7d, 0xde7d,
+	0xde7d, 0xde7d, 0xde7d, 0xde7f, 0xdeee, 0xde7d, 0xde7d, 0xde7d,
+	0xde7d, 0xdeee, 0xde7d, 0xde7d, 0xde7d, 0x080c, 0x0dd5, 0x2001,
+	0x0105, 0x2004, 0x9084, 0x1800, 0x01c8, 0x2001, 0x0132, 0x200c,
+	0x2001, 0x0131, 0x2004, 0x9105, 0x1904, 0xdeee, 0x2009, 0x180c,
+	0x2104, 0xd0d4, 0x0904, 0xdeee, 0xc0d4, 0x200a, 0x2009, 0x0105,
+	0x2104, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x200a, 0x2001, 0x1867,
+	0x2004, 0xd0e4, 0x1528, 0x603b, 0x0000, 0x080c, 0x9637, 0x6014,
+	0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0188, 0x908c, 0x0003, 0x918e,
+	0x0002, 0x0508, 0x2001, 0x180c, 0x2004, 0xd0d4, 0x11e0, 0x080c,
+	0x97b5, 0x2009, 0x0041, 0x009e, 0x0804, 0xdfae, 0x080c, 0x97b5,
+	0x6003, 0x0007, 0x601b, 0x0000, 0x080c, 0x869b, 0x009e, 0x0005,
+	0x2001, 0x0100, 0x2004, 0x9082, 0x0005, 0x0aa8, 0x2001, 0x011f,
+	0x2004, 0x603a, 0x0890, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102,
+	0xd1cc, 0x0110, 0x080c, 0x2c54, 0x080c, 0x97b5, 0x6014, 0x2048,
+	0xa97c, 0xd1ec, 0x1130, 0x080c, 0x869b, 0x080c, 0xae71, 0x009e,
+	0x0005, 0x080c, 0xe7d4, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c,
+	0x200c, 0xc1d4, 0x2102, 0x0036, 0x080c, 0x9637, 0x080c, 0x97b5,
+	0x6014, 0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
+	0xd0bc, 0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140,
+	0xa8ac, 0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e,
+	0x6003, 0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xe572, 0x6018,
+	0x9005, 0x1128, 0x2001, 0x1986, 0x2004, 0x8003, 0x601a, 0x6017,
+	0x0000, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040,
+	0x0002, 0xdf3d, 0xdf3d, 0xdf3d, 0xdf3d, 0xdf3d, 0xdf3d, 0xdf3d,
+	0xdf3d, 0xdf3f, 0xdf3d, 0xdf3d, 0xdf3d, 0xdf3d, 0xdf3d, 0xdf3d,
+	0xdf3d, 0xdf3d, 0xdf3d, 0xdf3d, 0xdf8a, 0x080c, 0x0dd5, 0x6014,
+	0x0096, 0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900,
+	0x00be, 0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128,
+	0x2009, 0x0041, 0x009e, 0x0804, 0xdfae, 0x6003, 0x0007, 0x601b,
+	0x0000, 0x080c, 0x869b, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58,
+	0x0006, 0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030,
+	0x9420, 0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8,
+	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009,
+	0x180e, 0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003,
+	0x0006, 0x00e9, 0x080c, 0x869d, 0x009e, 0x0005, 0x6003, 0x0002,
+	0x009e, 0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x15e7, 0x1904,
+	0xdf3f, 0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e,
+	0x9105, 0x1120, 0x080c, 0x15e7, 0x1904, 0xdf3f, 0x0005, 0xd2fc,
+	0x0140, 0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009,
+	0x0010, 0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040,
+	0x0208, 0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c,
+	0x0dd5, 0x6024, 0xd0dc, 0x090c, 0x0dd5, 0x0005, 0xdfd1, 0xdfdd,
+	0xdfe9, 0xdff5, 0xdfd1, 0xdfd1, 0xdfd1, 0xdfd1, 0xdfd8, 0xdfd3,
+	0xdfd3, 0xdfd1, 0xdfd1, 0xdfd1, 0xdfd1, 0xdfd3, 0xdfd1, 0xdfd3,
+	0xdfd1, 0x080c, 0x0dd5, 0x6024, 0xd0dc, 0x090c, 0x0dd5, 0x0005,
+	0x6014, 0x9005, 0x190c, 0x0dd5, 0x0005, 0x6003, 0x0001, 0x6106,
+	0x080c, 0x90d9, 0x0126, 0x2091, 0x8000, 0x080c, 0x9687, 0x012e,
+	0x0005, 0x6003, 0x0001, 0x6106, 0x080c, 0x90d9, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x9687, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106,
+	0x2c10, 0x080c, 0x1baf, 0x0126, 0x2091, 0x8000, 0x080c, 0x913e,
+	0x080c, 0x97b5, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036,
+	0x0096, 0x9182, 0x0040, 0x0023, 0x009e, 0x003e, 0x012e, 0x0005,
+	0xe020, 0xe022, 0xe034, 0xe04e, 0xe020, 0xe020, 0xe020, 0xe020,
+	0xe020, 0xe020, 0xe020, 0xe020, 0xe020, 0xe020, 0xe020, 0xe020,
+	0x080c, 0x0dd5, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x01f8, 0x909c,
+	0x0003, 0x939e, 0x0003, 0x01d0, 0x6003, 0x0001, 0x6106, 0x080c,
+	0x90d9, 0x080c, 0x9687, 0x0470, 0x6014, 0x2048, 0xa87c, 0xd0fc,
+	0x0168, 0x909c, 0x0003, 0x939e, 0x0003, 0x0140, 0x6003, 0x0001,
+	0x6106, 0x080c, 0x90d9, 0x080c, 0x9687, 0x00e0, 0x901e, 0x6316,
+	0x631a, 0x2019, 0x0004, 0x080c, 0xe572, 0x00a0, 0x6014, 0x2048,
+	0xa87c, 0xd0fc, 0x0d98, 0x909c, 0x0003, 0x939e, 0x0003, 0x0d70,
+	0x6003, 0x0003, 0x6106, 0x2c10, 0x080c, 0x1baf, 0x080c, 0x913e,
+	0x080c, 0x97b5, 0x0005, 0x080c, 0x957b, 0x6114, 0x81ff, 0x0158,
+	0x0096, 0x2148, 0x080c, 0xe929, 0x0036, 0x2019, 0x0029, 0x080c,
+	0xe572, 0x003e, 0x009e, 0x080c, 0xaea2, 0x080c, 0x9687, 0x0005,
+	0x080c, 0x9637, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c,
+	0xe929, 0x0036, 0x2019, 0x0029, 0x080c, 0xe572, 0x003e, 0x009e,
+	0x080c, 0xaea2, 0x080c, 0x97b5, 0x0005, 0x9182, 0x0085, 0x0002,
+	0xe09f, 0xe09d, 0xe09d, 0xe0ab, 0xe09d, 0xe09d, 0xe09d, 0xe09d,
+	0xe09d, 0xe09d, 0xe09d, 0xe09d, 0xe09d, 0x080c, 0x0dd5, 0x6003,
+	0x000b, 0x6106, 0x080c, 0x90d9, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x9687, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c, 0xe7cb, 0x0118,
+	0x080c, 0xae71, 0x0450, 0x2071, 0x0260, 0x7224, 0x6216, 0x2001,
+	0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6, 0x2058, 0xbca0,
+	0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0xb192, 0x7220, 0x080c,
+	0xe418, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007, 0x0087, 0x7224,
+	0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003, 0x0001, 0x080c,
+	0x90d9, 0x080c, 0x9687, 0x080c, 0x97b5, 0x00ee, 0x002e, 0x0005,
+	0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0dd5,
+	0x908a, 0x0092, 0x1a0c, 0x0dd5, 0x9082, 0x0085, 0x00a2, 0x9186,
+	0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0xaf07, 0x0050,
+	0x2001, 0x0007, 0x080c, 0x6584, 0x080c, 0x957b, 0x080c, 0xaea2,
+	0x080c, 0x9687, 0x0005, 0xe110, 0xe112, 0xe112, 0xe110, 0xe110,
 	0xe110, 0xe110, 0xe110, 0xe110, 0xe110, 0xe110, 0xe110, 0xe110,
-	0x080c, 0x0dd5, 0x0005, 0x9186, 0x0013, 0x0148, 0x9186, 0x0014,
-	0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0xaef7, 0x0030, 0x080c,
-	0x9588, 0x080c, 0xae92, 0x080c, 0x968d, 0x0005, 0x0036, 0x080c,
-	0xe80b, 0x6043, 0x0000, 0x2019, 0x000b, 0x0031, 0x6023, 0x0006,
-	0x6003, 0x0007, 0x003e, 0x0005, 0x0126, 0x0036, 0x2091, 0x8000,
-	0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0xa69c, 0x009e, 0x008e,
-	0x1550, 0x0076, 0x2c38, 0x080c, 0xa747, 0x007e, 0x1520, 0x6000,
-	0x9086, 0x0000, 0x0500, 0x6020, 0x9086, 0x0007, 0x01e0, 0x0096,
-	0x601c, 0xd084, 0x0140, 0x080c, 0xe80b, 0x080c, 0xd248, 0x080c,
-	0x1a5e, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xcb35, 0x0110,
-	0x080c, 0xe551, 0x009e, 0x6017, 0x0000, 0x080c, 0xe80b, 0x6023,
-	0x0007, 0x080c, 0xd248, 0x003e, 0x012e, 0x0005, 0x00f6, 0x00c6,
-	0x00b6, 0x0036, 0x0156, 0x2079, 0x0260, 0x7938, 0x783c, 0x080c,
-	0x283e, 0x15c8, 0x0016, 0x00c6, 0x080c, 0x65ff, 0x1590, 0x001e,
-	0x00c6, 0x2160, 0x080c, 0xd245, 0x00ce, 0x002e, 0x0026, 0x0016,
-	0x2019, 0x0029, 0x080c, 0xa808, 0x080c, 0x928b, 0x0076, 0x903e,
-	0x080c, 0x9168, 0x007e, 0x001e, 0x0076, 0x903e, 0x080c, 0xe2eb,
-	0x007e, 0x0026, 0xba04, 0x9294, 0xff00, 0x8217, 0x9286, 0x0006,
-	0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0, 0x080c, 0x327d, 0x002e,
-	0xbcc0, 0x001e, 0x080c, 0x6034, 0xbe12, 0xbd16, 0xbcc2, 0x9006,
-	0x0010, 0x00ce, 0x001e, 0x015e, 0x003e, 0x00be, 0x00ce, 0x00fe,
-	0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016, 0x2009, 0x1824, 0x2104,
-	0x9086, 0x0074, 0x1904, 0xe212, 0x2069, 0x0260, 0x6944, 0x9182,
-	0x0100, 0x06e0, 0x6940, 0x9184, 0x8000, 0x0904, 0xe20f, 0x2001,
-	0x197c, 0x2004, 0x9005, 0x1140, 0x6010, 0x2058, 0xb8c0, 0x9005,
-	0x0118, 0x9184, 0x0800, 0x0598, 0x6948, 0x918a, 0x0001, 0x0648,
-	0x080c, 0xe970, 0x0118, 0x6978, 0xd1fc, 0x11b8, 0x2009, 0x0205,
-	0x200b, 0x0001, 0x693c, 0x81ff, 0x1198, 0x6944, 0x9182, 0x0100,
-	0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948, 0x918a, 0x0001, 0x0288,
-	0x6950, 0x918a, 0x0001, 0x0298, 0x00d0, 0x6017, 0x0100, 0x00a0,
-	0x6017, 0x0300, 0x0088, 0x6017, 0x0500, 0x0070, 0x6017, 0x0700,
-	0x0058, 0x6017, 0x0900, 0x0040, 0x6017, 0x0b00, 0x0028, 0x6017,
-	0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085, 0x0001, 0x0008, 0x9006,
-	0x001e, 0x00be, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00b6, 0x0026,
-	0x0036, 0x0156, 0x6210, 0x2258, 0xbb04, 0x9394, 0x00ff, 0x9286,
-	0x0006, 0x0180, 0x9286, 0x0004, 0x0168, 0x9394, 0xff00, 0x8217,
-	0x9286, 0x0006, 0x0138, 0x9286, 0x0004, 0x0120, 0x080c, 0x660e,
-	0x0804, 0xe27a, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48,
-	0x2019, 0x000a, 0x080c, 0xbe1d, 0x009e, 0x15a8, 0x2011, 0x027a,
-	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xbe1d,
-	0x009e, 0x1548, 0x0046, 0x0016, 0xbaa0, 0x2220, 0x9006, 0x2009,
-	0x1848, 0x210c, 0xd1a4, 0x0138, 0x2009, 0x0029, 0x080c, 0xe5ae,
-	0xb800, 0xc0e5, 0xb802, 0x2019, 0x0029, 0x080c, 0x928b, 0x0076,
-	0x2039, 0x0000, 0x080c, 0x9168, 0x2c08, 0x080c, 0xe2eb, 0x007e,
-	0x2001, 0x0007, 0x080c, 0x657b, 0x2001, 0x0007, 0x080c, 0x654f,
-	0x001e, 0x004e, 0x9006, 0x015e, 0x003e, 0x002e, 0x00be, 0x00ce,
-	0x0005, 0x00d6, 0x2069, 0x026e, 0x6800, 0x9086, 0x0800, 0x0118,
-	0x6017, 0x0000, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00f6,
-	0x0016, 0x0026, 0x0036, 0x0156, 0x2079, 0x026c, 0x7930, 0x7834,
-	0x080c, 0x283e, 0x11d0, 0x080c, 0x65ff, 0x11b8, 0x2011, 0x0270,
-	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbe1d,
-	0x009e, 0x1158, 0x2011, 0x0274, 0x20a9, 0x0004, 0x0096, 0x2b48,
-	0x2019, 0x0006, 0x080c, 0xbe1d, 0x009e, 0x015e, 0x003e, 0x002e,
-	0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x0006, 0x0016, 0x0026,
-	0x0036, 0x0156, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c,
-	0x283e, 0x11d0, 0x080c, 0x65ff, 0x11b8, 0x2011, 0x0276, 0x20a9,
-	0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbe1d, 0x009e,
-	0x1158, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
-	0x0006, 0x080c, 0xbe1d, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e,
-	0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066,
-	0x0056, 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, 0x2740, 0x2029,
-	0x19f0, 0x252c, 0x2021, 0x19f6, 0x2424, 0x2061, 0x1cd0, 0x2071,
-	0x1800, 0x7654, 0x7074, 0x81ff, 0x0150, 0x0006, 0x9186, 0x1ab0,
-	0x000e, 0x0128, 0x8001, 0x9602, 0x1a04, 0xe388, 0x0018, 0x9606,
-	0x0904, 0xe388, 0x080c, 0x8981, 0x0904, 0xe37f, 0x2100, 0x9c06,
-	0x0904, 0xe37f, 0x080c, 0xe5ef, 0x1904, 0xe37f, 0x080c, 0xe98d,
-	0x0904, 0xe37f, 0x080c, 0xe5df, 0x0904, 0xe37f, 0x6720, 0x9786,
-	0x0001, 0x1148, 0x080c, 0x3314, 0x0904, 0xe3c7, 0x6004, 0x9086,
-	0x0000, 0x1904, 0xe3c7, 0x9786, 0x0004, 0x0904, 0xe3c7, 0x9786,
-	0x0007, 0x0904, 0xe37f, 0x2500, 0x9c06, 0x0904, 0xe37f, 0x2400,
-	0x9c06, 0x05e8, 0x88ff, 0x0118, 0x6054, 0x9906, 0x15c0, 0x0096,
-	0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1a5e, 0x001e,
-	0x9786, 0x000a, 0x0148, 0x080c, 0xcd3b, 0x1130, 0x080c, 0xb813,
-	0x009e, 0x080c, 0xae92, 0x0418, 0x6014, 0x2048, 0x080c, 0xcb35,
-	0x01d8, 0x9786, 0x0003, 0x1570, 0xa867, 0x0103, 0xa87c, 0xd0cc,
-	0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fb1, 0x009e, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0xe908, 0x0016, 0x080c, 0xce24, 0x080c,
-	0x6c75, 0x001e, 0x080c, 0xcd1e, 0x009e, 0x080c, 0xae92, 0x9ce0,
-	0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1210, 0x0804, 0xe2ff,
-	0x012e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x008e, 0x00ce,
-	0x00ee, 0x0005, 0x9786, 0x0006, 0x1150, 0x9386, 0x0005, 0x0128,
-	0x080c, 0xe908, 0x080c, 0xe551, 0x08f8, 0x009e, 0x0c00, 0x9786,
-	0x0009, 0x11f8, 0x6000, 0x9086, 0x0004, 0x01c0, 0x6000, 0x9086,
-	0x0003, 0x11a0, 0x080c, 0x963d, 0x0096, 0x6114, 0x2148, 0x080c,
-	0xcb35, 0x0118, 0x6010, 0x080c, 0x6c81, 0x009e, 0x00c6, 0x080c,
-	0xae61, 0x00ce, 0x0036, 0x080c, 0x97b9, 0x003e, 0x009e, 0x0804,
-	0xe37f, 0x9786, 0x000a, 0x0904, 0xe366, 0x0804, 0xe364, 0x81ff,
-	0x0904, 0xe37f, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018, 0x0138,
-	0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1904, 0xe37f, 0x6000,
-	0x9086, 0x0002, 0x1904, 0xe37f, 0x080c, 0xcd2a, 0x0138, 0x080c,
-	0xcd3b, 0x1904, 0xe37f, 0x080c, 0xb813, 0x0038, 0x080c, 0x31e8,
-	0x080c, 0xcd3b, 0x1110, 0x080c, 0xb813, 0x080c, 0xae92, 0x0804,
-	0xe37f, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6,
-	0x00e6, 0x0016, 0x2c08, 0x2170, 0x9006, 0x080c, 0xe578, 0x001e,
-	0x0120, 0x6020, 0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005,
-	0xe416, 0xe416, 0xe416, 0xe416, 0xe416, 0xe416, 0xe418, 0xe416,
-	0xe416, 0xe416, 0xe416, 0xae92, 0xae92, 0xe416, 0x9006, 0x0005,
-	0x0036, 0x0046, 0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be,
-	0x2c00, 0x2009, 0x0020, 0x080c, 0xe5ae, 0x001e, 0x004e, 0x2019,
-	0x0002, 0x080c, 0xe134, 0x003e, 0x9085, 0x0001, 0x0005, 0x0096,
-	0x080c, 0xcb35, 0x0140, 0x6014, 0x904d, 0x080c, 0xc768, 0x687b,
-	0x0005, 0x080c, 0x6c81, 0x009e, 0x080c, 0xae92, 0x9085, 0x0001,
-	0x0005, 0x2001, 0x0001, 0x080c, 0x653b, 0x0156, 0x0016, 0x0026,
-	0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c,
-	0xbe09, 0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0005, 0x00f6,
-	0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x00b6, 0x0126, 0x2091,
-	0x8000, 0x2740, 0x2061, 0x1cd0, 0x2079, 0x0001, 0x8fff, 0x0904,
-	0xe4b1, 0x2071, 0x1800, 0x7654, 0x7074, 0x8001, 0x9602, 0x1a04,
-	0xe4b1, 0x88ff, 0x0120, 0x2800, 0x9c06, 0x1590, 0x2078, 0x080c,
-	0xe5df, 0x0570, 0x2400, 0x9c06, 0x0558, 0x6720, 0x9786, 0x0006,
-	0x1538, 0x9786, 0x0007, 0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06,
-	0x11f8, 0x85ff, 0x0118, 0x6054, 0x9106, 0x11d0, 0x0096, 0x601c,
-	0xd084, 0x0140, 0x080c, 0xe80b, 0x080c, 0xd248, 0x080c, 0x1a5e,
-	0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xcb35, 0x0120, 0x0046,
-	0x080c, 0xe551, 0x004e, 0x009e, 0x080c, 0xae92, 0x88ff, 0x1198,
+	0x080c, 0x0dd5, 0x080c, 0x957b, 0x080c, 0xaea2, 0x080c, 0x9687,
+	0x0005, 0x9182, 0x0085, 0x0a0c, 0x0dd5, 0x9182, 0x0092, 0x1a0c,
+	0x0dd5, 0x9182, 0x0085, 0x0002, 0xe131, 0xe131, 0xe131, 0xe133,
+	0xe131, 0xe131, 0xe131, 0xe131, 0xe131, 0xe131, 0xe131, 0xe131,
+	0xe131, 0x080c, 0x0dd5, 0x0005, 0x9186, 0x0013, 0x0148, 0x9186,
+	0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0xaf07, 0x0030,
+	0x080c, 0x957b, 0x080c, 0xaea2, 0x080c, 0x9687, 0x0005, 0x0036,
+	0x080c, 0xe82c, 0x6043, 0x0000, 0x2019, 0x000b, 0x0031, 0x6023,
+	0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x0126, 0x0036, 0x2091,
+	0x8000, 0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0xa69d, 0x009e,
+	0x008e, 0x1550, 0x0076, 0x2c38, 0x080c, 0xa748, 0x007e, 0x1520,
+	0x6000, 0x9086, 0x0000, 0x0500, 0x6020, 0x9086, 0x0007, 0x01e0,
+	0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xe82c, 0x080c, 0xd262,
+	0x080c, 0x1a60, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xcb4a,
+	0x0110, 0x080c, 0xe572, 0x009e, 0x6017, 0x0000, 0x080c, 0xe82c,
+	0x6023, 0x0007, 0x080c, 0xd262, 0x003e, 0x012e, 0x0005, 0x00f6,
+	0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079, 0x0260, 0x7938, 0x783c,
+	0x080c, 0x2840, 0x15c8, 0x0016, 0x00c6, 0x080c, 0x6608, 0x1590,
+	0x001e, 0x00c6, 0x2160, 0x080c, 0xd25f, 0x00ce, 0x002e, 0x0026,
+	0x0016, 0x2019, 0x0029, 0x080c, 0xa80e, 0x080c, 0x927e, 0x0076,
+	0x903e, 0x080c, 0x9151, 0x007e, 0x001e, 0x0076, 0x903e, 0x080c,
+	0xe30c, 0x007e, 0x0026, 0xba04, 0x9294, 0xff00, 0x8217, 0x9286,
+	0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0, 0x080c, 0x327f,
+	0x002e, 0xbcc0, 0x001e, 0x080c, 0x603d, 0xbe12, 0xbd16, 0xbcc2,
+	0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e, 0x00be, 0x00ce,
+	0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016, 0x2009, 0x1824,
+	0x2104, 0x9086, 0x0074, 0x1904, 0xe233, 0x2069, 0x0260, 0x6944,
+	0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000, 0x0904, 0xe230,
+	0x2001, 0x197b, 0x2004, 0x9005, 0x1140, 0x6010, 0x2058, 0xb8c0,
+	0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948, 0x918a, 0x0001,
+	0x0648, 0x080c, 0xe991, 0x0118, 0x6978, 0xd1fc, 0x11b8, 0x2009,
+	0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198, 0x6944, 0x9182,
+	0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948, 0x918a, 0x0001,
+	0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0, 0x6017, 0x0100,
+	0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500, 0x0070, 0x6017,
+	0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017, 0x0b00, 0x0028,
+	0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085, 0x0001, 0x0008,
+	0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00b6,
+	0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04, 0x9394, 0x00ff,
+	0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168, 0x9394, 0xff00,
+	0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004, 0x0120, 0x080c,
+	0x6617, 0x0804, 0xe29b, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096,
+	0x2b48, 0x2019, 0x000a, 0x080c, 0xbe30, 0x009e, 0x15a8, 0x2011,
+	0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c,
+	0xbe30, 0x009e, 0x1548, 0x0046, 0x0016, 0xbaa0, 0x2220, 0x9006,
+	0x2009, 0x1848, 0x210c, 0xd1a4, 0x0138, 0x2009, 0x0029, 0x080c,
+	0xe5cf, 0xb800, 0xc0e5, 0xb802, 0x2019, 0x0029, 0x080c, 0x927e,
+	0x0076, 0x2039, 0x0000, 0x080c, 0x9151, 0x2c08, 0x080c, 0xe30c,
+	0x007e, 0x2001, 0x0007, 0x080c, 0x6584, 0x2001, 0x0007, 0x080c,
+	0x6558, 0x001e, 0x004e, 0x9006, 0x015e, 0x003e, 0x002e, 0x00be,
+	0x00ce, 0x0005, 0x00d6, 0x2069, 0x026e, 0x6800, 0x9086, 0x0800,
+	0x0118, 0x6017, 0x0000, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6,
+	0x00f6, 0x0016, 0x0026, 0x0036, 0x0156, 0x2079, 0x026c, 0x7930,
+	0x7834, 0x080c, 0x2840, 0x11d0, 0x080c, 0x6608, 0x11b8, 0x2011,
+	0x0270, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c,
+	0xbe30, 0x009e, 0x1158, 0x2011, 0x0274, 0x20a9, 0x0004, 0x0096,
+	0x2b48, 0x2019, 0x0006, 0x080c, 0xbe30, 0x009e, 0x015e, 0x003e,
+	0x002e, 0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x0006, 0x0016,
+	0x0026, 0x0036, 0x0156, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c,
+	0x080c, 0x2840, 0x11d0, 0x080c, 0x6608, 0x11b8, 0x2011, 0x0276,
+	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbe30,
+	0x009e, 0x1158, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48,
+	0x2019, 0x0006, 0x080c, 0xbe30, 0x009e, 0x015e, 0x003e, 0x002e,
+	0x001e, 0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076,
+	0x0066, 0x0056, 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, 0x2740,
+	0x2029, 0x19ef, 0x252c, 0x2021, 0x19f5, 0x2424, 0x2061, 0x1cd0,
+	0x2071, 0x1800, 0x7654, 0x7074, 0x81ff, 0x0150, 0x0006, 0x9186,
+	0x1aaf, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04, 0xe3a9, 0x0018,
+	0x9606, 0x0904, 0xe3a9, 0x080c, 0x896a, 0x0904, 0xe3a0, 0x2100,
+	0x9c06, 0x0904, 0xe3a0, 0x080c, 0xe610, 0x1904, 0xe3a0, 0x080c,
+	0xe9ae, 0x0904, 0xe3a0, 0x080c, 0xe600, 0x0904, 0xe3a0, 0x6720,
+	0x9786, 0x0001, 0x1148, 0x080c, 0x3316, 0x0904, 0xe3e8, 0x6004,
+	0x9086, 0x0000, 0x1904, 0xe3e8, 0x9786, 0x0004, 0x0904, 0xe3e8,
+	0x9786, 0x0007, 0x0904, 0xe3a0, 0x2500, 0x9c06, 0x0904, 0xe3a0,
+	0x2400, 0x9c06, 0x05e8, 0x88ff, 0x0118, 0x6054, 0x9906, 0x15c0,
+	0x0096, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1a60,
+	0x001e, 0x9786, 0x000a, 0x0148, 0x080c, 0xcd50, 0x1130, 0x080c,
+	0xb824, 0x009e, 0x080c, 0xaea2, 0x0418, 0x6014, 0x2048, 0x080c,
+	0xcb4a, 0x01d8, 0x9786, 0x0003, 0x1570, 0xa867, 0x0103, 0xa87c,
+	0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fb1, 0x009e,
+	0xab7a, 0xa877, 0x0000, 0x080c, 0xe929, 0x0016, 0x080c, 0xce3e,
+	0x080c, 0x6c7a, 0x001e, 0x080c, 0xcd33, 0x009e, 0x080c, 0xaea2,
 	0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1210, 0x0804,
-	0xe466, 0x9006, 0x012e, 0x00be, 0x006e, 0x007e, 0x008e, 0x00ce,
-	0x00ee, 0x00fe, 0x0005, 0x98c5, 0x0001, 0x0ca0, 0x00b6, 0x0076,
-	0x0056, 0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002,
-	0x6210, 0x2258, 0x0096, 0x904e, 0x080c, 0xa69c, 0x009e, 0x008e,
-	0x903e, 0x080c, 0xa747, 0x080c, 0xe457, 0x005e, 0x007e, 0x00be,
-	0x0005, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20,
-	0x2128, 0x20a9, 0x007f, 0x900e, 0x0016, 0x0036, 0x080c, 0x65ff,
-	0x1190, 0x0056, 0x0086, 0x9046, 0x2508, 0x2029, 0x0001, 0x0096,
-	0x904e, 0x080c, 0xa69c, 0x009e, 0x008e, 0x903e, 0x080c, 0xa747,
-	0x080c, 0xe457, 0x005e, 0x003e, 0x001e, 0x8108, 0x1f04, 0xe4e4,
-	0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x0005, 0x00b6,
-	0x0076, 0x0056, 0x6210, 0x2258, 0x0086, 0x9046, 0x2029, 0x0001,
-	0x2019, 0x0048, 0x0096, 0x904e, 0x080c, 0xa69c, 0x009e, 0x008e,
-	0x903e, 0x080c, 0xa747, 0x2c20, 0x080c, 0xe457, 0x005e, 0x007e,
+	0xe320, 0x012e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x008e,
+	0x00ce, 0x00ee, 0x0005, 0x9786, 0x0006, 0x1150, 0x9386, 0x0005,
+	0x0128, 0x080c, 0xe929, 0x080c, 0xe572, 0x08f8, 0x009e, 0x0c00,
+	0x9786, 0x0009, 0x11f8, 0x6000, 0x9086, 0x0004, 0x01c0, 0x6000,
+	0x9086, 0x0003, 0x11a0, 0x080c, 0x9637, 0x0096, 0x6114, 0x2148,
+	0x080c, 0xcb4a, 0x0118, 0x6010, 0x080c, 0x6c86, 0x009e, 0x00c6,
+	0x080c, 0xae71, 0x00ce, 0x0036, 0x080c, 0x97b5, 0x003e, 0x009e,
+	0x0804, 0xe3a0, 0x9786, 0x000a, 0x0904, 0xe387, 0x0804, 0xe385,
+	0x81ff, 0x0904, 0xe3a0, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018,
+	0x0138, 0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1904, 0xe3a0,
+	0x6000, 0x9086, 0x0002, 0x1904, 0xe3a0, 0x080c, 0xcd3f, 0x0138,
+	0x080c, 0xcd50, 0x1904, 0xe3a0, 0x080c, 0xb824, 0x0038, 0x080c,
+	0x31ea, 0x080c, 0xcd50, 0x1110, 0x080c, 0xb824, 0x080c, 0xaea2,
+	0x0804, 0xe3a0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x0005,
+	0x00c6, 0x00e6, 0x0016, 0x2c08, 0x2170, 0x9006, 0x080c, 0xe599,
+	0x001e, 0x0120, 0x6020, 0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce,
+	0x0005, 0xe437, 0xe437, 0xe437, 0xe437, 0xe437, 0xe437, 0xe439,
+	0xe437, 0xe437, 0xe437, 0xe437, 0xaea2, 0xaea2, 0xe437, 0x9006,
+	0x0005, 0x0036, 0x0046, 0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0,
+	0x00be, 0x2c00, 0x2009, 0x0020, 0x080c, 0xe5cf, 0x001e, 0x004e,
+	0x2019, 0x0002, 0x080c, 0xe155, 0x003e, 0x9085, 0x0001, 0x0005,
+	0x0096, 0x080c, 0xcb4a, 0x0140, 0x6014, 0x904d, 0x080c, 0xc77b,
+	0x687b, 0x0005, 0x080c, 0x6c86, 0x009e, 0x080c, 0xaea2, 0x9085,
+	0x0001, 0x0005, 0x2001, 0x0001, 0x080c, 0x6544, 0x0156, 0x0016,
+	0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276,
+	0x080c, 0xbe1c, 0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0005,
+	0x00f6, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x00b6, 0x0126,
+	0x2091, 0x8000, 0x2740, 0x2061, 0x1cd0, 0x2079, 0x0001, 0x8fff,
+	0x0904, 0xe4d2, 0x2071, 0x1800, 0x7654, 0x7074, 0x8001, 0x9602,
+	0x1a04, 0xe4d2, 0x88ff, 0x0120, 0x2800, 0x9c06, 0x1590, 0x2078,
+	0x080c, 0xe600, 0x0570, 0x2400, 0x9c06, 0x0558, 0x6720, 0x9786,
+	0x0006, 0x1538, 0x9786, 0x0007, 0x0520, 0x88ff, 0x1140, 0x6010,
+	0x9b06, 0x11f8, 0x85ff, 0x0118, 0x6054, 0x9106, 0x11d0, 0x0096,
+	0x601c, 0xd084, 0x0140, 0x080c, 0xe82c, 0x080c, 0xd262, 0x080c,
+	0x1a60, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xcb4a, 0x0120,
+	0x0046, 0x080c, 0xe572, 0x004e, 0x009e, 0x080c, 0xaea2, 0x88ff,
+	0x1198, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1210,
+	0x0804, 0xe487, 0x9006, 0x012e, 0x00be, 0x006e, 0x007e, 0x008e,
+	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x98c5, 0x0001, 0x0ca0, 0x00b6,
+	0x0076, 0x0056, 0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, 0x2019,
+	0x0002, 0x6210, 0x2258, 0x0096, 0x904e, 0x080c, 0xa69d, 0x009e,
+	0x008e, 0x903e, 0x080c, 0xa748, 0x080c, 0xe478, 0x005e, 0x007e,
 	0x00be, 0x0005, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156,
-	0x2c20, 0x20a9, 0x0800, 0x900e, 0x0016, 0x0036, 0x080c, 0x65ff,
-	0x11a0, 0x0086, 0x9046, 0x2828, 0x0046, 0x2021, 0x0001, 0x080c,
-	0xe7ef, 0x004e, 0x0096, 0x904e, 0x080c, 0xa69c, 0x009e, 0x008e,
-	0x903e, 0x080c, 0xa747, 0x080c, 0xe457, 0x003e, 0x001e, 0x8108,
-	0x1f04, 0xe52c, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be,
-	0x0005, 0x0016, 0x00f6, 0x080c, 0xcb33, 0x0198, 0xa864, 0x9084,
-	0x00ff, 0x9086, 0x0046, 0x0180, 0xa800, 0x907d, 0x0138, 0xa803,
-	0x0000, 0xab82, 0x080c, 0x6c81, 0x2f48, 0x0cb0, 0xab82, 0x080c,
-	0x6c81, 0x00fe, 0x001e, 0x0005, 0xa800, 0x907d, 0x0130, 0xa803,
-	0x0000, 0x080c, 0x6c81, 0x2f48, 0x0cb8, 0x080c, 0x6c81, 0x0c88,
-	0x00e6, 0x0046, 0x0036, 0x2061, 0x1cd0, 0x9005, 0x1138, 0x2071,
-	0x1800, 0x7454, 0x7074, 0x8001, 0x9402, 0x12f8, 0x2100, 0x9c06,
-	0x0188, 0x6000, 0x9086, 0x0000, 0x0168, 0x6008, 0x9206, 0x1150,
-	0x6320, 0x9386, 0x0009, 0x01b0, 0x6010, 0x91a0, 0x0004, 0x2424,
-	0x9406, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02,
-	0x1220, 0x0c20, 0x9085, 0x0001, 0x0008, 0x9006, 0x003e, 0x004e,
-	0x00ee, 0x0005, 0x631c, 0xd3c4, 0x1d68, 0x0c30, 0x0096, 0x0006,
-	0x080c, 0x0fff, 0x000e, 0x090c, 0x0dd5, 0xaae2, 0xa867, 0x010d,
-	0xa88e, 0x0026, 0x2010, 0x080c, 0xcb23, 0x2001, 0x0000, 0x0120,
-	0x2200, 0x9080, 0x0015, 0x2004, 0x002e, 0xa87a, 0x9186, 0x0020,
-	0x0110, 0xa8e3, 0xffff, 0xa986, 0xac76, 0xa87f, 0x0000, 0x2001,
-	0x198e, 0x2004, 0xa882, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6c81, 0x012e, 0x009e, 0x0005, 0x6700,
-	0x9786, 0x0000, 0x0158, 0x9786, 0x0001, 0x0140, 0x9786, 0x000a,
-	0x0128, 0x9786, 0x0009, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6,
-	0x6010, 0x9075, 0x0138, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206,
-	0x00ee, 0x0005, 0x9085, 0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e,
-	0x001e, 0x11a0, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036,
-	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0005, 0x2001, 0x1987,
-	0x2004, 0x601a, 0x080c, 0x90f0, 0x080c, 0x968d, 0x001e, 0x0005,
-	0xa001, 0xa001, 0x0005, 0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118,
-	0x080c, 0xce68, 0x0030, 0x080c, 0xe80b, 0x080c, 0x86b2, 0x080c,
-	0xae61, 0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002,
-	0xe63e, 0xe63e, 0xe63e, 0xe640, 0xe63e, 0xe640, 0xe640, 0xe63e,
-	0xe640, 0xe63e, 0xe63e, 0xe63e, 0xe63e, 0xe63e, 0x9006, 0x0005,
-	0x9085, 0x0001, 0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f,
-	0x0002, 0xe657, 0xe657, 0xe657, 0xe657, 0xe657, 0xe657, 0xe664,
-	0xe657, 0xe657, 0xe657, 0xe657, 0xe657, 0xe657, 0xe657, 0x6007,
-	0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x080c,
-	0x90f0, 0x080c, 0x968d, 0x0005, 0x0096, 0x00c6, 0x2260, 0x080c,
-	0xe80b, 0x6043, 0x0000, 0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b,
-	0x0000, 0x00ce, 0x00d6, 0x2268, 0x9186, 0x0007, 0x1904, 0xe6bd,
-	0x6814, 0x9005, 0x0138, 0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de,
-	0x009e, 0x08a8, 0x6007, 0x003a, 0x6003, 0x0001, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x1904,
-	0xe734, 0x6014, 0x9005, 0x1138, 0x6000, 0x9086, 0x0007, 0x190c,
-	0x0dd5, 0x0804, 0xe734, 0x2048, 0x080c, 0xcb35, 0x1130, 0x0028,
-	0x2048, 0xa800, 0x9005, 0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084,
-	0x0003, 0x9086, 0x0002, 0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e,
-	0xa880, 0xc0fc, 0xa882, 0x2009, 0x0043, 0x080c, 0xdf8d, 0x0804,
-	0xe734, 0x2009, 0x0041, 0x0804, 0xe72e, 0x9186, 0x0005, 0x15a0,
-	0x6814, 0x2048, 0xa87c, 0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804,
-	0xe657, 0xd0b4, 0x0128, 0xd0fc, 0x090c, 0x0dd5, 0x0804, 0xe678,
-	0x6007, 0x003a, 0x6003, 0x0001, 0x080c, 0x90f0, 0x080c, 0x968d,
-	0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x0120, 0x9186, 0x0004,
-	0x1904, 0xe734, 0x6814, 0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e,
-	0xa980, 0xc1fc, 0xc1bc, 0xa982, 0x00f6, 0x2c78, 0x080c, 0x1725,
-	0x00fe, 0x2009, 0x0042, 0x04d0, 0x0036, 0x080c, 0x0fff, 0x090c,
-	0x0dd5, 0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18,
-	0xab8e, 0xa887, 0x0045, 0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360,
-	0x6024, 0xc0dd, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be,
-	0x2004, 0x6354, 0xab7a, 0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a,
-	0xae96, 0xa89f, 0x0001, 0x080c, 0x6c81, 0x2019, 0x0045, 0x6008,
-	0x2068, 0x080c, 0xe134, 0x2d00, 0x600a, 0x6023, 0x0006, 0x6003,
-	0x0007, 0x901e, 0x631a, 0x6342, 0x003e, 0x0038, 0x6043, 0x0000,
-	0x6003, 0x0007, 0x080c, 0xdf8d, 0x00ce, 0x00de, 0x009e, 0x0005,
-	0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x00c2,
-	0x9186, 0x0027, 0x1178, 0x080c, 0x9588, 0x0036, 0x0096, 0x6014,
-	0x2048, 0x2019, 0x0004, 0x080c, 0xe551, 0x009e, 0x003e, 0x080c,
-	0x968d, 0x0005, 0x9186, 0x0014, 0x0d70, 0x080c, 0xaef7, 0x0005,
-	0xe767, 0xe765, 0xe765, 0xe765, 0xe765, 0xe765, 0xe767, 0xe765,
-	0xe765, 0xe765, 0xe765, 0xe765, 0xe765, 0x080c, 0x0dd5, 0x080c,
-	0x9588, 0x6003, 0x000c, 0x080c, 0x968d, 0x0005, 0x9182, 0x0092,
-	0x1220, 0x9182, 0x0085, 0x0208, 0x001a, 0x080c, 0xaef7, 0x0005,
-	0xe785, 0xe785, 0xe785, 0xe785, 0xe787, 0xe7a7, 0xe785, 0xe785,
-	0xe785, 0xe785, 0xe785, 0xe785, 0xe785, 0x080c, 0x0dd5, 0x00d6,
-	0x2c68, 0x080c, 0xae0b, 0x01b0, 0x6003, 0x0001, 0x6007, 0x001e,
-	0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e,
-	0x600b, 0xffff, 0x6910, 0x6112, 0x6023, 0x0004, 0x080c, 0x90f0,
-	0x080c, 0x968d, 0x2d60, 0x080c, 0xae61, 0x00de, 0x0005, 0x080c,
-	0xae61, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0ec, 0x00ee, 0x0005, 0x2009, 0x1867, 0x210c, 0xd1ec, 0x05b0,
-	0x6003, 0x0002, 0x6024, 0xc0e5, 0x6026, 0xd0cc, 0x0150, 0x2001,
-	0x1988, 0x2004, 0x6042, 0x2009, 0x1867, 0x210c, 0xd1f4, 0x1520,
-	0x00a0, 0x2009, 0x1867, 0x210c, 0xd1f4, 0x0128, 0x6024, 0xc0e4,
-	0x6026, 0x9006, 0x00d8, 0x2001, 0x1988, 0x200c, 0x2001, 0x1986,
-	0x2004, 0x9100, 0x9080, 0x000a, 0x6042, 0x6010, 0x00b6, 0x2058,
-	0xb8bc, 0x00be, 0x0008, 0x2104, 0x9005, 0x0118, 0x9088, 0x0003,
-	0x0cd0, 0x2c0a, 0x600f, 0x0000, 0x9085, 0x0001, 0x0005, 0x0016,
-	0x00c6, 0x00e6, 0x6154, 0xb8bc, 0x2060, 0x8cff, 0x0180, 0x84ff,
-	0x1118, 0x6054, 0x9106, 0x1138, 0x600c, 0x2072, 0x080c, 0x86b2,
-	0x080c, 0xae61, 0x0010, 0x9cf0, 0x0003, 0x2e64, 0x0c70, 0x00ee,
-	0x00ce, 0x001e, 0x0005, 0x00d6, 0x00b6, 0x6010, 0x2058, 0xb8bc,
-	0x2068, 0x9005, 0x0130, 0x9c06, 0x0110, 0x680c, 0x0cd0, 0x600c,
-	0x680e, 0x00be, 0x00de, 0x0005, 0x0026, 0x0036, 0x0156, 0x2011,
-	0x182c, 0x2204, 0x9084, 0x00ff, 0x2019, 0x026e, 0x2334, 0x9636,
-	0x1508, 0x8318, 0x2334, 0x2204, 0x9084, 0xff00, 0x9636, 0x11d0,
-	0x2011, 0x0270, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019,
-	0x000a, 0x080c, 0xbe1d, 0x009e, 0x1168, 0x2011, 0x0274, 0x20a9,
-	0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x0006, 0x080c, 0xbe1d,
-	0x009e, 0x1100, 0x015e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x2071,
-	0x1800, 0x080c, 0x5fad, 0x080c, 0x2f96, 0x00ee, 0x0005, 0x0096,
-	0x0026, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0xa85c, 0x9080, 0x001a,
-	0x20a0, 0x20a9, 0x000c, 0xa860, 0x20e8, 0x9006, 0x4004, 0x9186,
-	0x0046, 0x1118, 0xa867, 0x0136, 0x0038, 0xa867, 0x0138, 0x9186,
-	0x0041, 0x0110, 0xa87b, 0x0001, 0x7038, 0x9084, 0xff00, 0x7240,
-	0x9294, 0xff00, 0x8007, 0x9215, 0xaa9a, 0x9186, 0x0046, 0x1168,
-	0x7038, 0x9084, 0x00ff, 0x723c, 0x9294, 0xff00, 0x9215, 0xaa9e,
-	0x723c, 0x9294, 0x00ff, 0xaaa2, 0x0060, 0x7040, 0x9084, 0x00ff,
-	0x7244, 0x9294, 0xff00, 0x9215, 0xaa9e, 0x7244, 0x9294, 0x00ff,
-	0xaaa2, 0x9186, 0x0046, 0x1118, 0x9e90, 0x0012, 0x0010, 0x9e90,
-	0x001a, 0x2204, 0x8007, 0xa8a6, 0x8210, 0x2204, 0x8007, 0xa8aa,
-	0x8210, 0x2204, 0x8007, 0xa8ae, 0x8210, 0x2204, 0x8007, 0xa8b2,
-	0x8210, 0x9186, 0x0046, 0x11b8, 0x9e90, 0x0016, 0x2204, 0x8007,
-	0xa8b6, 0x8210, 0x2204, 0x8007, 0xa8ba, 0x8210, 0x2204, 0x8007,
-	0xa8be, 0x8210, 0x2204, 0x8007, 0xa8c2, 0x8210, 0x2011, 0x0205,
-	0x2013, 0x0001, 0x00b0, 0x9e90, 0x001e, 0x2204, 0x8007, 0xa8b6,
-	0x8210, 0x2204, 0x8007, 0xa8ba, 0x2011, 0x0205, 0x2013, 0x0001,
-	0x2011, 0x0260, 0x2204, 0x8007, 0xa8be, 0x8210, 0x2204, 0x8007,
-	0xa8c2, 0x9186, 0x0046, 0x1118, 0x2011, 0x0262, 0x0010, 0x2011,
-	0x026a, 0x0146, 0x01d6, 0x0036, 0x20a9, 0x0001, 0x2019, 0x0008,
-	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0x2204, 0x8007,
-	0x4004, 0x8210, 0x8319, 0x1dd0, 0x003e, 0x01ce, 0x013e, 0x2011,
-	0x0205, 0x2013, 0x0000, 0x002e, 0x080c, 0x6c81, 0x009e, 0x0005,
-	0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0fc, 0x0108,
-	0x0011, 0x00ee, 0x0005, 0xa880, 0xc0e5, 0xa882, 0x0005, 0x00e6,
-	0x00d6, 0x00c6, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0016,
-	0x0126, 0x2091, 0x8000, 0x2029, 0x19f0, 0x252c, 0x2021, 0x19f6,
-	0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7654, 0x7074, 0x9606,
-	0x0578, 0x6720, 0x9786, 0x0001, 0x0118, 0x9786, 0x0008, 0x1500,
-	0x2500, 0x9c06, 0x01e8, 0x2400, 0x9c06, 0x01d0, 0x080c, 0xe5df,
-	0x01b8, 0x080c, 0xe5ef, 0x11a0, 0x6000, 0x9086, 0x0004, 0x1120,
-	0x0016, 0x080c, 0x1a5e, 0x001e, 0x080c, 0xcd2a, 0x1110, 0x080c,
-	0x31e8, 0x080c, 0xcd3b, 0x1110, 0x080c, 0xb813, 0x080c, 0xae92,
-	0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1208, 0x0858,
-	0x012e, 0x001e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x00ce,
-	0x00de, 0x00ee, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0dc, 0x0005,
-	0x0006, 0x2001, 0x1837, 0x2004, 0xd09c, 0x000e, 0x0005, 0x0006,
-	0x0036, 0x0046, 0x080c, 0xd230, 0x0168, 0x2019, 0xffff, 0x9005,
-	0x0128, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0004,
-	0x080c, 0x4cbb, 0x004e, 0x003e, 0x000e, 0x6004, 0x9086, 0x0001,
-	0x1128, 0x080c, 0xa808, 0x080c, 0xae92, 0x9006, 0x0005, 0x00e6,
-	0x00c6, 0x00b6, 0x0046, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7454,
-	0x7074, 0x8001, 0x9402, 0x12b8, 0x2100, 0x9c06, 0x0148, 0x6000,
-	0x9086, 0x0000, 0x0128, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x0140,
-	0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1220, 0x0c60,
-	0x9085, 0x0001, 0x0008, 0x9006, 0x004e, 0x00be, 0x00ce, 0x00ee,
-	0x0005, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091, 0x8000, 0x2071,
-	0x1840, 0xd5a4, 0x0118, 0x7004, 0x8000, 0x7006, 0xd5b4, 0x0118,
-	0x7000, 0x8000, 0x7002, 0xd5ac, 0x0178, 0x2500, 0x9084, 0x0007,
-	0x908e, 0x0003, 0x0148, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005,
-	0x0118, 0x2071, 0xfffe, 0x0089, 0x001e, 0x00ee, 0x000e, 0x012e,
-	0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0xfff6,
-	0x0021, 0x00ee, 0x000e, 0x012e, 0x0005, 0x2e05, 0x8000, 0x2077,
-	0x1220, 0x8e70, 0x2e05, 0x8000, 0x2077, 0x0005, 0x00e6, 0x2071,
-	0xfff4, 0x0c99, 0x00ee, 0x0005, 0x00e6, 0x2071, 0xfff8, 0x0c69,
-	0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071,
-	0x1840, 0x7014, 0x8000, 0x7016, 0x00ee, 0x000e, 0x012e, 0x0005,
-	0x0003, 0x000b, 0x079e, 0x0000, 0xc000, 0x0001, 0x8064, 0x0008,
-	0x0010, 0x0000, 0x8066, 0x0000, 0x0101, 0x0008, 0x4407, 0x0003,
-	0x8060, 0x0000, 0x0400, 0x0000, 0x580d, 0x000b, 0x79a8, 0x000b,
-	0x50ee, 0x000b, 0x4c0a, 0x0003, 0xbac0, 0x0009, 0x008a, 0x0000,
-	0x0c0a, 0x000b, 0x15fe, 0x0008, 0x340a, 0x0003, 0xc4c0, 0x0009,
-	0x7000, 0x0000, 0xffa0, 0x0001, 0x2000, 0x0000, 0x1668, 0x000b,
-	0x808c, 0x0008, 0x0001, 0x0000, 0x0000, 0x0007, 0x4028, 0x0000,
-	0x4047, 0x000a, 0x808c, 0x0008, 0x0002, 0x0000, 0x0822, 0x0003,
-	0x4022, 0x0000, 0x0028, 0x000b, 0x4122, 0x0008, 0x94c0, 0x0009,
-	0xff00, 0x0008, 0xffe0, 0x0009, 0x0500, 0x0008, 0x0a93, 0x000b,
-	0x4447, 0x0002, 0x0e90, 0x0003, 0x0bfe, 0x0008, 0x11a0, 0x0001,
-	0x126e, 0x0003, 0x0ca0, 0x0001, 0x126e, 0x0003, 0x9180, 0x0001,
-	0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008,
-	0x8066, 0x0000, 0x0009, 0x0008, 0x4436, 0x000b, 0x808c, 0x0008,
-	0x0000, 0x0008, 0x0060, 0x0008, 0x8062, 0x0008, 0x0004, 0x0000,
-	0x8066, 0x0000, 0x0411, 0x0000, 0x443e, 0x0003, 0x03fe, 0x0000,
-	0x43e0, 0x0001, 0x0e6b, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008,
-	0x02e0, 0x0001, 0x0e6b, 0x000b, 0x9180, 0x0001, 0x0005, 0x0008,
-	0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000,
-	0x0019, 0x0000, 0x444d, 0x000b, 0x0240, 0x0002, 0x0a68, 0x0003,
-	0x00fe, 0x0000, 0x326b, 0x000b, 0x0248, 0x000a, 0x085c, 0x0003,
-	0x9180, 0x0001, 0x0006, 0x0008, 0x7f62, 0x0008, 0x8002, 0x0008,
-	0x0003, 0x0008, 0x8066, 0x0000, 0x020a, 0x0000, 0x445b, 0x0003,
-	0x112a, 0x0000, 0x002e, 0x0008, 0x022c, 0x0008, 0x3a44, 0x0002,
-	0x0c0a, 0x000b, 0x808c, 0x0008, 0x0002, 0x0000, 0x1760, 0x0008,
-	0x8062, 0x0008, 0x000f, 0x0008, 0x8066, 0x0000, 0x0011, 0x0008,
-	0x4468, 0x0003, 0x01fe, 0x0008, 0x42e0, 0x0009, 0x0e5c, 0x0003,
-	0x00fe, 0x0000, 0x43e0, 0x0001, 0x0e5c, 0x0003, 0x1734, 0x0000,
-	0x1530, 0x0000, 0x1632, 0x0008, 0x0d2a, 0x0008, 0x9880, 0x0001,
-	0x0010, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008,
-	0x8066, 0x0000, 0x1e0a, 0x0008, 0x447a, 0x0003, 0x808a, 0x0008,
-	0x0003, 0x0008, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002, 0x0000,
-	0x5880, 0x000b, 0x8066, 0x0000, 0x3679, 0x0000, 0x4483, 0x0003,
-	0x5884, 0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002, 0x088a, 0x000b,
-	0x0d00, 0x0000, 0x0092, 0x000c, 0x8054, 0x0008, 0x0011, 0x0008,
-	0x8074, 0x0000, 0x1010, 0x0008, 0x1efe, 0x0000, 0x300a, 0x000b,
-	0x00c8, 0x000c, 0x000a, 0x000b, 0x00fe, 0x0000, 0x349a, 0x0003,
-	0x1a60, 0x0000, 0x8062, 0x0008, 0x0007, 0x0000, 0x8066, 0x0000,
-	0x0231, 0x0008, 0x4499, 0x000b, 0x03fe, 0x0000, 0x04d0, 0x0001,
-	0x0cc0, 0x000b, 0x82c0, 0x0001, 0x1f00, 0x0000, 0xffa0, 0x0001,
-	0x0400, 0x0000, 0x08af, 0x0003, 0x14c0, 0x000b, 0x01fe, 0x0008,
-	0x0580, 0x0009, 0x7f06, 0x0000, 0x02fe, 0x0008, 0xffc0, 0x0001,
-	0x00ff, 0x0008, 0x0690, 0x0001, 0x10af, 0x0003, 0x7f08, 0x0008,
-	0x84c0, 0x0001, 0xff00, 0x0008, 0x08c0, 0x0003, 0x00fe, 0x0000,
-	0x34b6, 0x000b, 0x8072, 0x0000, 0x1010, 0x0008, 0x3944, 0x0002,
-	0x08b1, 0x0003, 0x00ba, 0x0003, 0x8072, 0x0000, 0x2020, 0x0008,
-	0x3945, 0x000a, 0x08b6, 0x000b, 0x3946, 0x000a, 0x0cc7, 0x0003,
-	0x0000, 0x0007, 0x3943, 0x000a, 0x08c7, 0x000b, 0x00ba, 0x0003,
-	0x00fe, 0x0000, 0x34c5, 0x0003, 0x8072, 0x0000, 0x1000, 0x0000,
-	0x00c7, 0x0003, 0x8072, 0x0000, 0x2000, 0x0000, 0x4000, 0x000f,
-	0x1c60, 0x0000, 0x1b62, 0x0000, 0x8066, 0x0000, 0x0231, 0x0008,
-	0x44cc, 0x000b, 0x58cd, 0x000b, 0x0140, 0x0008, 0x0242, 0x0000,
-	0x1f43, 0x0002, 0x0cdb, 0x000b, 0x0d44, 0x0000, 0x0d46, 0x0008,
-	0x0348, 0x0008, 0x044a, 0x0008, 0x030a, 0x0008, 0x040c, 0x0000,
-	0x0d06, 0x0000, 0x0d08, 0x0008, 0x00df, 0x0003, 0x0344, 0x0008,
-	0x0446, 0x0008, 0x0548, 0x0008, 0x064a, 0x0000, 0x1948, 0x000a,
-	0x08e2, 0x0003, 0x0d4a, 0x0008, 0x58e2, 0x0003, 0x3efe, 0x0008,
-	0x7f4f, 0x0002, 0x08e9, 0x000b, 0x8000, 0x0000, 0x0001, 0x0000,
-	0x0092, 0x000c, 0x8054, 0x0008, 0x0001, 0x0000, 0x8074, 0x0000,
-	0x2020, 0x0008, 0x4000, 0x000f, 0x3a40, 0x000a, 0x0c0d, 0x0003,
-	0x2b24, 0x0008, 0x2b24, 0x0008, 0x58f2, 0x000b, 0x8054, 0x0008,
-	0x0002, 0x0000, 0x1242, 0x0002, 0x0940, 0x0003, 0x3a45, 0x000a,
-	0x092f, 0x0003, 0x8072, 0x0000, 0x1000, 0x0000, 0x3945, 0x000a,
-	0x08ff, 0x0003, 0x8072, 0x0000, 0x3010, 0x0000, 0x1e10, 0x000a,
-	0x7f3c, 0x0000, 0x092a, 0x0003, 0x1d00, 0x0002, 0x7f3a, 0x0000,
-	0x0d60, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008,
-	0x4508, 0x000b, 0x00fe, 0x0000, 0x3527, 0x000b, 0x1c60, 0x0000,
-	0x8062, 0x0008, 0x0001, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008,
-	0x4510, 0x000b, 0x00fe, 0x0000, 0x3243, 0x000b, 0x0038, 0x0000,
-	0x0060, 0x0008, 0x8062, 0x0008, 0x0019, 0x0000, 0x8066, 0x0000,
-	0x0009, 0x0008, 0x4519, 0x000b, 0x80c0, 0x0009, 0x00ff, 0x0008,
-	0x7f3e, 0x0008, 0x0d60, 0x0000, 0x0efe, 0x0008, 0x1f80, 0x0001,
-	0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4523, 0x000b,
-	0x003a, 0x0008, 0x1dfe, 0x0000, 0x0104, 0x000b, 0x0036, 0x0008,
-	0x00c8, 0x000c, 0x0140, 0x000b, 0x8074, 0x0000, 0x2000, 0x0000,
-	0x8072, 0x0000, 0x2000, 0x0000, 0x0140, 0x000b, 0x3a44, 0x0002,
-	0x0a71, 0x000b, 0x8074, 0x0000, 0x1000, 0x0000, 0x8072, 0x0000,
-	0x1000, 0x0000, 0x2d0e, 0x0000, 0x2d0e, 0x0000, 0x3640, 0x0003,
-	0x26fe, 0x0008, 0x26fe, 0x0008, 0x2700, 0x0008, 0x2700, 0x0008,
-	0x00d0, 0x0009, 0x0d52, 0x000b, 0x8074, 0x0000, 0x4040, 0x0008,
-	0x5940, 0x0003, 0x50ee, 0x000b, 0x3a46, 0x000a, 0x0d52, 0x000b,
-	0x3a47, 0x0002, 0x094d, 0x000b, 0x8054, 0x0008, 0x0004, 0x0000,
-	0x8074, 0x0000, 0x8000, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008,
-	0x019c, 0x0003, 0x92c0, 0x0009, 0x0fc8, 0x0000, 0x080a, 0x0003,
-	0x1246, 0x000a, 0x0e3a, 0x0003, 0x1a60, 0x0000, 0x8062, 0x0008,
-	0x0002, 0x0000, 0x8066, 0x0000, 0x362a, 0x0000, 0x4557, 0x000b,
-	0x2000, 0x0000, 0x2000, 0x0000, 0x2102, 0x0000, 0x2102, 0x0000,
-	0x2204, 0x0000, 0x2204, 0x0000, 0x2306, 0x0000, 0x2306, 0x0000,
-	0x2408, 0x0000, 0x2408, 0x0000, 0x250a, 0x0000, 0x250a, 0x0000,
-	0x260c, 0x0000, 0x260c, 0x0000, 0x270e, 0x0000, 0x270e, 0x0000,
-	0x2810, 0x0000, 0x2810, 0x0000, 0x2912, 0x0000, 0x2912, 0x0000,
-	0x1a60, 0x0000, 0x8062, 0x0008, 0x0007, 0x0000, 0x8066, 0x0000,
-	0x0052, 0x0000, 0x4571, 0x0003, 0x92c0, 0x0009, 0x0780, 0x0008,
-	0x0e56, 0x0003, 0x124b, 0x0002, 0x097a, 0x0003, 0x2e4d, 0x0002,
-	0x2e4d, 0x0002, 0x0a40, 0x0003, 0x3a46, 0x000a, 0x0d8a, 0x000b,
-	0x597c, 0x0003, 0x8054, 0x0008, 0x0004, 0x0000, 0x1243, 0x000a,
-	0x0998, 0x0003, 0x8010, 0x0008, 0x000d, 0x0000, 0x021b, 0x000c,
-	0x1948, 0x000a, 0x0987, 0x000b, 0x0210, 0x0004, 0x1810, 0x0000,
-	0x021b, 0x000c, 0x0198, 0x000b, 0x1948, 0x000a, 0x098e, 0x000b,
-	0x1243, 0x000a, 0x0a43, 0x0003, 0x194d, 0x000a, 0x0992, 0x0003,
-	0x1243, 0x000a, 0x0a4a, 0x0003, 0x5992, 0x0003, 0x8054, 0x0008,
-	0x0004, 0x0000, 0x0210, 0x0004, 0x1810, 0x0000, 0x021b, 0x000c,
-	0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008,
-	0x0d30, 0x0000, 0x3a42, 0x0002, 0x0da2, 0x000b, 0x15fe, 0x0008,
-	0x3461, 0x000b, 0x000a, 0x000b, 0x8074, 0x0000, 0x0501, 0x0000,
-	0x8010, 0x0008, 0x000c, 0x0008, 0x021b, 0x000c, 0x000a, 0x000b,
-	0xbbe0, 0x0009, 0x0030, 0x0008, 0x0db8, 0x0003, 0x18fe, 0x0000,
-	0x3ce0, 0x0009, 0x09b5, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009,
-	0x09b5, 0x0003, 0x020b, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000,
-	0x0208, 0x000b, 0x8076, 0x0008, 0x0041, 0x0008, 0x0208, 0x000b,
-	0xbbe0, 0x0009, 0x0032, 0x0000, 0x0dbd, 0x0003, 0x3c1e, 0x0008,
-	0x0208, 0x000b, 0xbbe0, 0x0009, 0x003b, 0x0000, 0x0dc2, 0x000b,
-	0x3c20, 0x0000, 0x0208, 0x000b, 0xbbe0, 0x0009, 0x0035, 0x0008,
-	0x0dc8, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x0384, 0x000b,
-	0xbbe0, 0x0009, 0x0036, 0x0008, 0x0aa5, 0x000b, 0xbbe0, 0x0009,
-	0x0037, 0x0000, 0x0de9, 0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009,
-	0x0db5, 0x000b, 0x8076, 0x0008, 0x0040, 0x0000, 0x1a60, 0x0000,
-	0x8062, 0x0008, 0x000d, 0x0000, 0x2604, 0x0008, 0x2604, 0x0008,
-	0x2706, 0x0008, 0x2706, 0x0008, 0x2808, 0x0000, 0x2808, 0x0000,
-	0x290a, 0x0000, 0x290a, 0x0000, 0x8066, 0x0000, 0x0422, 0x0000,
-	0x45e0, 0x000b, 0x0210, 0x0004, 0x8054, 0x0008, 0x0004, 0x0000,
-	0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0xb000, 0x0000,
-	0x019c, 0x0003, 0xbbe0, 0x0009, 0x0038, 0x0000, 0x0dfb, 0x000b,
-	0x18fe, 0x0000, 0x3ce0, 0x0009, 0x09f8, 0x0003, 0x15fe, 0x0008,
-	0x3ce0, 0x0009, 0x0db1, 0x0003, 0x020b, 0x0004, 0x8076, 0x0008,
-	0x0040, 0x0000, 0x8072, 0x0000, 0x8000, 0x0000, 0x0268, 0x000b,
-	0x8076, 0x0008, 0x0042, 0x0008, 0x0208, 0x000b, 0xbbe0, 0x0009,
-	0x0016, 0x0000, 0x0e08, 0x000b, 0x8074, 0x0000, 0x0808, 0x0008,
-	0x3a44, 0x0002, 0x0c0c, 0x000b, 0x8074, 0x0000, 0x0800, 0x0000,
-	0x8072, 0x0000, 0x8000, 0x0000, 0x8000, 0x000f, 0x000a, 0x000b,
-	0x8072, 0x0000, 0x8000, 0x0000, 0x000a, 0x000b, 0x3d30, 0x000a,
-	0x7f00, 0x0000, 0xbc80, 0x0001, 0x0007, 0x0000, 0x0214, 0x0003,
-	0x1930, 0x000a, 0x7f00, 0x0000, 0x9880, 0x0001, 0x0007, 0x0000,
-	0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000,
-	0x000a, 0x0008, 0x4619, 0x000b, 0x4000, 0x000f, 0x221e, 0x000b,
-	0x0870, 0x0008, 0x4000, 0x000f, 0x7e1b, 0x000b, 0xbbe0, 0x0009,
-	0x0030, 0x0008, 0x0e1b, 0x0003, 0x18fe, 0x0000, 0x3ce0, 0x0009,
-	0x0a2c, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0a2c, 0x0003,
-	0x020b, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x022e, 0x0003,
-	0x8076, 0x0008, 0x0041, 0x0008, 0x8072, 0x0000, 0x8000, 0x0000,
-	0x021b, 0x0003, 0xbac0, 0x0009, 0x0090, 0x0008, 0x0a37, 0x0003,
-	0x8074, 0x0000, 0x0706, 0x0000, 0x0239, 0x0003, 0x8074, 0x0000,
-	0x0703, 0x0000, 0x4000, 0x000f, 0x8010, 0x0008, 0x0023, 0x0000,
-	0x0276, 0x000b, 0x8010, 0x0008, 0x0008, 0x0000, 0x0276, 0x000b,
-	0x8010, 0x0008, 0x0022, 0x0008, 0x0276, 0x000b, 0x0210, 0x0004,
-	0x8010, 0x0008, 0x0007, 0x0000, 0x021b, 0x000c, 0x1810, 0x0000,
-	0x021b, 0x000c, 0x0282, 0x0003, 0x0210, 0x0004, 0x8010, 0x0008,
-	0x001b, 0x0008, 0x021b, 0x000c, 0x1810, 0x0000, 0x021b, 0x000c,
-	0x8074, 0x0000, 0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008,
-	0x0d30, 0x0000, 0x000a, 0x000b, 0x8010, 0x0008, 0x0009, 0x0008,
-	0x0276, 0x000b, 0x8010, 0x0008, 0x0005, 0x0008, 0x0276, 0x000b,
-	0x1648, 0x000a, 0x0c6f, 0x000b, 0x808c, 0x0008, 0x0001, 0x0000,
-	0x8010, 0x0008, 0x0004, 0x0000, 0x4143, 0x000a, 0x086f, 0x0003,
-	0x3a44, 0x0002, 0x0c0a, 0x000b, 0x0d2a, 0x0008, 0x0276, 0x000b,
-	0x8010, 0x0008, 0x0003, 0x0008, 0x027a, 0x000b, 0x8010, 0x0008,
-	0x000b, 0x0000, 0x027a, 0x000b, 0x8010, 0x0008, 0x0002, 0x0000,
-	0x027a, 0x000b, 0x3a47, 0x0002, 0x0d40, 0x000b, 0x8010, 0x0008,
-	0x0006, 0x0008, 0x027a, 0x000b, 0x8074, 0x0000, 0xf000, 0x0008,
-	0x8072, 0x0000, 0x3000, 0x0008, 0x021b, 0x000c, 0x0231, 0x0004,
-	0x3a40, 0x000a, 0x080a, 0x0003, 0x8010, 0x0008, 0x000c, 0x0008,
-	0x021b, 0x000c, 0x000a, 0x000b, 0x8074, 0x0000, 0xf080, 0x0000,
-	0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x2e4d, 0x0002,
-	0x2e4d, 0x0002, 0x0a8d, 0x000b, 0x8054, 0x0008, 0x0019, 0x0000,
-	0x000a, 0x000b, 0x8054, 0x0008, 0x0009, 0x0008, 0x000a, 0x000b,
-	0x3a44, 0x0002, 0x0c0a, 0x000b, 0x026b, 0x000b, 0x808c, 0x0008,
-	0x0000, 0x0008, 0x4447, 0x0002, 0x0ab9, 0x0003, 0xc0c0, 0x0001,
-	0x00ff, 0x0008, 0xffe0, 0x0009, 0x00ff, 0x0008, 0x0e90, 0x0003,
-	0xc1e0, 0x0001, 0xffff, 0x0008, 0x0e90, 0x0003, 0x8010, 0x0008,
-	0x0013, 0x0000, 0x021b, 0x000c, 0x8074, 0x0000, 0x0202, 0x0008,
-	0x000a, 0x000b, 0x3a40, 0x000a, 0x0eb6, 0x000b, 0x8074, 0x0000,
-	0x0200, 0x0000, 0x3d00, 0x0000, 0x3cfe, 0x0000, 0x8072, 0x0000,
-	0x8000, 0x0000, 0x43e0, 0x0001, 0x0eb4, 0x0003, 0x42fe, 0x0000,
-	0xffc0, 0x0001, 0x00ff, 0x0008, 0x00e0, 0x0009, 0x0a90, 0x000b,
-	0x0d08, 0x0008, 0x0309, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000,
-	0x000a, 0x000b, 0x038d, 0x0004, 0x808c, 0x0008, 0x0001, 0x0000,
-	0x04fe, 0x0008, 0x3370, 0x0003, 0x0460, 0x0000, 0x8062, 0x0008,
-	0x0001, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x46c3, 0x0003,
-	0x0004, 0x0000, 0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f00, 0x0000,
-	0x80e0, 0x0001, 0x0004, 0x0000, 0x0add, 0x000b, 0x80e0, 0x0001,
-	0x0005, 0x0008, 0x0add, 0x000b, 0x80e0, 0x0001, 0x0006, 0x0008,
-	0x0add, 0x000b, 0x82c0, 0x0001, 0xff00, 0x0008, 0x7f04, 0x0008,
-	0x82e0, 0x0009, 0x0600, 0x0008, 0x0add, 0x000b, 0x82e0, 0x0009,
-	0x0500, 0x0008, 0x0add, 0x000b, 0x82e0, 0x0009, 0x0400, 0x0000,
-	0x0f70, 0x0003, 0xc4c0, 0x0009, 0x7000, 0x0000, 0xffe0, 0x0009,
-	0x1000, 0x0000, 0x0b09, 0x0003, 0x037e, 0x0004, 0x3941, 0x0002,
-	0x0ae8, 0x000b, 0x8072, 0x0000, 0x0400, 0x0000, 0x000a, 0x000b,
-	0x0460, 0x0000, 0x80fe, 0x0008, 0x002b, 0x0008, 0x7f62, 0x0008,
-	0x8066, 0x0000, 0x2209, 0x0008, 0x46ee, 0x0003, 0x11fe, 0x0000,
-	0x3304, 0x0003, 0x9180, 0x0001, 0x0002, 0x0000, 0x8060, 0x0000,
-	0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0609, 0x0008,
-	0x46f8, 0x000b, 0x42fe, 0x0000, 0xffc0, 0x0001, 0xff00, 0x0008,
-	0x03e0, 0x0009, 0x0f01, 0x0003, 0x8072, 0x0000, 0x0400, 0x0000,
-	0x0046, 0x0003, 0x9180, 0x0001, 0x0003, 0x0008, 0x02eb, 0x0003,
-	0x8072, 0x0000, 0x0400, 0x0000, 0x8010, 0x0008, 0x0010, 0x0000,
-	0x0361, 0x0003, 0x037e, 0x0004, 0x3941, 0x0002, 0x0b0f, 0x0003,
-	0x8072, 0x0000, 0x0400, 0x0000, 0x000a, 0x000b, 0x0346, 0x000c,
-	0x11fe, 0x0000, 0x3717, 0x0003, 0x8072, 0x0000, 0x0400, 0x0000,
-	0x8010, 0x0008, 0x000e, 0x0000, 0x0361, 0x0003, 0x8060, 0x0000,
-	0x0400, 0x0000, 0x04fe, 0x0008, 0x372c, 0x000b, 0x808c, 0x0008,
-	0x0000, 0x0008, 0x9180, 0x0001, 0x0005, 0x0008, 0x7f62, 0x0008,
-	0x8066, 0x0000, 0x0009, 0x0008, 0x4722, 0x000b, 0x0060, 0x0008,
-	0x8062, 0x0008, 0x001b, 0x0008, 0x4304, 0x0008, 0x4206, 0x0008,
-	0x8066, 0x0000, 0x0412, 0x0000, 0x472a, 0x0003, 0x0343, 0x0003,
-	0x808c, 0x0008, 0x0001, 0x0000, 0x0460, 0x0000, 0x8062, 0x0008,
-	0x002b, 0x0008, 0x8066, 0x0000, 0x0609, 0x0008, 0x4733, 0x000b,
-	0x8066, 0x0000, 0x220a, 0x0008, 0x4736, 0x000b, 0x42fe, 0x0000,
-	0xffc0, 0x0001, 0xff00, 0x0008, 0x7f04, 0x0008, 0x8060, 0x0000,
-	0x0400, 0x0000, 0x9180, 0x0001, 0x0002, 0x0000, 0x7f62, 0x0008,
-	0x8066, 0x0000, 0x041a, 0x0008, 0x4742, 0x000b, 0x8072, 0x0000,
-	0x0400, 0x0000, 0x0046, 0x0003, 0x8060, 0x0000, 0x0400, 0x0000,
-	0x1362, 0x0008, 0x8066, 0x0000, 0x0411, 0x0000, 0x474b, 0x000b,
-	0x02fe, 0x0008, 0x03e0, 0x0009, 0x0f51, 0x0003, 0x0d22, 0x0000,
-	0x4000, 0x000f, 0x8280, 0x0009, 0x0002, 0x0000, 0x1380, 0x0001,
-	0x7f62, 0x0008, 0x8066, 0x0000, 0x2209, 0x0008, 0x4757, 0x0003,
-	0x0200, 0x000a, 0xffc0, 0x0001, 0x0007, 0x0000, 0x7f06, 0x0000,
-	0x1362, 0x0008, 0x8066, 0x0000, 0x060a, 0x0008, 0x475f, 0x000b,
-	0x4000, 0x000f, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x2f44, 0x000a,
-	0x2f44, 0x000a, 0x0e6b, 0x000b, 0x808a, 0x0008, 0x0003, 0x0008,
-	0x8074, 0x0000, 0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008,
-	0x5b6c, 0x0003, 0x8054, 0x0008, 0x0019, 0x0000, 0x000a, 0x000b,
-	0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c, 0x0008, 0x0000, 0x0008,
-	0x8010, 0x0008, 0x0011, 0x0008, 0x021b, 0x000c, 0x42fe, 0x0000,
-	0xffc0, 0x0001, 0x00ff, 0x0008, 0x7f10, 0x0008, 0x021b, 0x000c,
-	0x4310, 0x0008, 0x027a, 0x000b, 0x3941, 0x0002, 0x0b81, 0x0003,
-	0x4000, 0x000f, 0x8072, 0x0000, 0x0404, 0x0008, 0x4000, 0x000f,
-	0x8010, 0x0008, 0x0012, 0x0008, 0x021b, 0x000c, 0x0346, 0x000c,
-	0x1110, 0x0000, 0x021b, 0x000c, 0x11fe, 0x0000, 0x3787, 0x0003,
-	0x000a, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008, 0x7f00, 0x0000,
-	0xc3c0, 0x0001, 0xff00, 0x0008, 0x00d0, 0x0009, 0x0bb2, 0x0003,
-	0x0d0a, 0x0000, 0x8580, 0x0001, 0x1000, 0x0000, 0x7f62, 0x0008,
-	0x8060, 0x0000, 0x0400, 0x0000, 0x8066, 0x0000, 0x0809, 0x0000,
-	0x479c, 0x000b, 0x04fe, 0x0008, 0x33ab, 0x0003, 0x0460, 0x0000,
-	0x8062, 0x0008, 0x0004, 0x0000, 0x8066, 0x0000, 0x0211, 0x0000,
-	0x47a4, 0x0003, 0x01fe, 0x0008, 0x00e0, 0x0009, 0x0fab, 0x0003,
-	0x02fe, 0x0008, 0x43e0, 0x0001, 0x0bb1, 0x0003, 0x0500, 0x0002,
-	0x7f0a, 0x0000, 0xffe0, 0x0009, 0x0800, 0x0000, 0x0f95, 0x000b,
-	0x0d08, 0x0008, 0x4000, 0x000f, 0x43fe, 0x0008, 0x3e80, 0x0001,
-	0xffc0, 0x0001, 0x7fff, 0x0000, 0x0d60, 0x0000, 0x7f62, 0x0008,
-	0x8066, 0x0000, 0x0809, 0x0000, 0x47ba, 0x0003, 0x8060, 0x0000,
-	0x0400, 0x0000, 0x84c0, 0x0001, 0xff00, 0x0008, 0x7f60, 0x000a,
-	0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a,
-	0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0xff80, 0x0009,
-	0x1000, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0809, 0x0000,
-	0x47cc, 0x000b, 0x4000, 0x000f, 0x5ff4, 0xebed, 0x0001, 0x0002,
-	0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,
-	0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, 0x2c40
+	0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e, 0x0016, 0x0036, 0x080c,
+	0x6608, 0x1190, 0x0056, 0x0086, 0x9046, 0x2508, 0x2029, 0x0001,
+	0x0096, 0x904e, 0x080c, 0xa69d, 0x009e, 0x008e, 0x903e, 0x080c,
+	0xa748, 0x080c, 0xe478, 0x005e, 0x003e, 0x001e, 0x8108, 0x1f04,
+	0xe505, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x0005,
+	0x00b6, 0x0076, 0x0056, 0x6210, 0x2258, 0x0086, 0x9046, 0x2029,
+	0x0001, 0x2019, 0x0048, 0x0096, 0x904e, 0x080c, 0xa69d, 0x009e,
+	0x008e, 0x903e, 0x080c, 0xa748, 0x2c20, 0x080c, 0xe478, 0x005e,
+	0x007e, 0x00be, 0x0005, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6,
+	0x0156, 0x2c20, 0x20a9, 0x0800, 0x900e, 0x0016, 0x0036, 0x080c,
+	0x6608, 0x11a0, 0x0086, 0x9046, 0x2828, 0x0046, 0x2021, 0x0001,
+	0x080c, 0xe810, 0x004e, 0x0096, 0x904e, 0x080c, 0xa69d, 0x009e,
+	0x008e, 0x903e, 0x080c, 0xa748, 0x080c, 0xe478, 0x003e, 0x001e,
+	0x8108, 0x1f04, 0xe54d, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e,
+	0x00be, 0x0005, 0x0016, 0x00f6, 0x080c, 0xcb48, 0x0198, 0xa864,
+	0x9084, 0x00ff, 0x9086, 0x0046, 0x0180, 0xa800, 0x907d, 0x0138,
+	0xa803, 0x0000, 0xab82, 0x080c, 0x6c86, 0x2f48, 0x0cb0, 0xab82,
+	0x080c, 0x6c86, 0x00fe, 0x001e, 0x0005, 0xa800, 0x907d, 0x0130,
+	0xa803, 0x0000, 0x080c, 0x6c86, 0x2f48, 0x0cb8, 0x080c, 0x6c86,
+	0x0c88, 0x00e6, 0x0046, 0x0036, 0x2061, 0x1cd0, 0x9005, 0x1138,
+	0x2071, 0x1800, 0x7454, 0x7074, 0x8001, 0x9402, 0x12f8, 0x2100,
+	0x9c06, 0x0188, 0x6000, 0x9086, 0x0000, 0x0168, 0x6008, 0x9206,
+	0x1150, 0x6320, 0x9386, 0x0009, 0x01b0, 0x6010, 0x91a0, 0x0004,
+	0x2424, 0x9406, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004,
+	0x9c02, 0x1220, 0x0c20, 0x9085, 0x0001, 0x0008, 0x9006, 0x003e,
+	0x004e, 0x00ee, 0x0005, 0x631c, 0xd3c4, 0x1d68, 0x0c30, 0x0096,
+	0x0006, 0x080c, 0x0fff, 0x000e, 0x090c, 0x0dd5, 0xaae2, 0xa867,
+	0x010d, 0xa88e, 0x0026, 0x2010, 0x080c, 0xcb38, 0x2001, 0x0000,
+	0x0120, 0x2200, 0x9080, 0x0015, 0x2004, 0x002e, 0xa87a, 0x9186,
+	0x0020, 0x0110, 0xa8e3, 0xffff, 0xa986, 0xac76, 0xa87f, 0x0000,
+	0x2001, 0x198d, 0x2004, 0xa882, 0x9006, 0xa802, 0xa86a, 0xa88a,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6c86, 0x012e, 0x009e, 0x0005,
+	0x6700, 0x9786, 0x0000, 0x0158, 0x9786, 0x0001, 0x0140, 0x9786,
+	0x000a, 0x0128, 0x9786, 0x0009, 0x0110, 0x9085, 0x0001, 0x0005,
+	0x00e6, 0x6010, 0x9075, 0x0138, 0x00b6, 0x2058, 0xb8a0, 0x00be,
+	0x9206, 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cd8, 0x0016, 0x6004,
+	0x908e, 0x001e, 0x11a0, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105,
+	0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0005, 0x2001,
+	0x1986, 0x2004, 0x601a, 0x080c, 0x90d9, 0x080c, 0x9687, 0x001e,
+	0x0005, 0xa001, 0xa001, 0x0005, 0x6024, 0xd0e4, 0x0158, 0xd0cc,
+	0x0118, 0x080c, 0xce82, 0x0030, 0x080c, 0xe82c, 0x080c, 0x869b,
+	0x080c, 0xae71, 0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f,
+	0x0002, 0xe65f, 0xe65f, 0xe65f, 0xe661, 0xe65f, 0xe661, 0xe661,
+	0xe65f, 0xe661, 0xe65f, 0xe65f, 0xe65f, 0xe65f, 0xe65f, 0x9006,
+	0x0005, 0x9085, 0x0001, 0x0005, 0x9280, 0x0008, 0x2004, 0x9084,
+	0x000f, 0x0002, 0xe678, 0xe678, 0xe678, 0xe678, 0xe678, 0xe678,
+	0xe685, 0xe678, 0xe678, 0xe678, 0xe678, 0xe678, 0xe678, 0xe678,
+	0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001,
+	0x080c, 0x90d9, 0x080c, 0x9687, 0x0005, 0x0096, 0x00c6, 0x2260,
+	0x080c, 0xe82c, 0x6043, 0x0000, 0x6024, 0xc0f4, 0xc0e4, 0x6026,
+	0x603b, 0x0000, 0x00ce, 0x00d6, 0x2268, 0x9186, 0x0007, 0x1904,
+	0xe6de, 0x6814, 0x9005, 0x0138, 0x2048, 0xa87c, 0xd0fc, 0x1118,
+	0x00de, 0x009e, 0x08a8, 0x6007, 0x003a, 0x6003, 0x0001, 0x080c,
+	0x90d9, 0x080c, 0x9687, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002,
+	0x1904, 0xe755, 0x6014, 0x9005, 0x1138, 0x6000, 0x9086, 0x0007,
+	0x190c, 0x0dd5, 0x0804, 0xe755, 0x2048, 0x080c, 0xcb4a, 0x1130,
+	0x0028, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900, 0x2048, 0xa87c,
+	0x9084, 0x0003, 0x9086, 0x0002, 0x1168, 0xa87c, 0xc0dc, 0xc0f4,
+	0xa87e, 0xa880, 0xc0fc, 0xa882, 0x2009, 0x0043, 0x080c, 0xdfae,
+	0x0804, 0xe755, 0x2009, 0x0041, 0x0804, 0xe74f, 0x9186, 0x0005,
+	0x15a0, 0x6814, 0x2048, 0xa87c, 0xd0bc, 0x1120, 0x00de, 0x009e,
+	0x0804, 0xe678, 0xd0b4, 0x0128, 0xd0fc, 0x090c, 0x0dd5, 0x0804,
+	0xe699, 0x6007, 0x003a, 0x6003, 0x0001, 0x080c, 0x90d9, 0x080c,
+	0x9687, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x0120, 0x9186,
+	0x0004, 0x1904, 0xe755, 0x6814, 0x2048, 0xa97c, 0xc1f4, 0xc1dc,
+	0xa97e, 0xa980, 0xc1fc, 0xc1bc, 0xa982, 0x00f6, 0x2c78, 0x080c,
+	0x1727, 0x00fe, 0x2009, 0x0042, 0x04d0, 0x0036, 0x080c, 0x0fff,
+	0x090c, 0x0dd5, 0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xa88a,
+	0x2d18, 0xab8e, 0xa887, 0x0045, 0x2c00, 0xa892, 0x6038, 0xa8a2,
+	0x2360, 0x6024, 0xc0dd, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb8a0,
+	0x00be, 0x2004, 0x6354, 0xab7a, 0xa876, 0x9006, 0xa87e, 0xa882,
+	0xad9a, 0xae96, 0xa89f, 0x0001, 0x080c, 0x6c86, 0x2019, 0x0045,
+	0x6008, 0x2068, 0x080c, 0xe155, 0x2d00, 0x600a, 0x6023, 0x0006,
+	0x6003, 0x0007, 0x901e, 0x631a, 0x6342, 0x003e, 0x0038, 0x6043,
+	0x0000, 0x6003, 0x0007, 0x080c, 0xdfae, 0x00ce, 0x00de, 0x009e,
+	0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0085, 0x2008,
+	0x00c2, 0x9186, 0x0027, 0x1178, 0x080c, 0x957b, 0x0036, 0x0096,
+	0x6014, 0x2048, 0x2019, 0x0004, 0x080c, 0xe572, 0x009e, 0x003e,
+	0x080c, 0x9687, 0x0005, 0x9186, 0x0014, 0x0d70, 0x080c, 0xaf07,
+	0x0005, 0xe788, 0xe786, 0xe786, 0xe786, 0xe786, 0xe786, 0xe788,
+	0xe786, 0xe786, 0xe786, 0xe786, 0xe786, 0xe786, 0x080c, 0x0dd5,
+	0x080c, 0x957b, 0x6003, 0x000c, 0x080c, 0x9687, 0x0005, 0x9182,
+	0x0092, 0x1220, 0x9182, 0x0085, 0x0208, 0x001a, 0x080c, 0xaf07,
+	0x0005, 0xe7a6, 0xe7a6, 0xe7a6, 0xe7a6, 0xe7a8, 0xe7c8, 0xe7a6,
+	0xe7a6, 0xe7a6, 0xe7a6, 0xe7a6, 0xe7a6, 0xe7a6, 0x080c, 0x0dd5,
+	0x00d6, 0x2c68, 0x080c, 0xae1b, 0x01b0, 0x6003, 0x0001, 0x6007,
+	0x001e, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c,
+	0x613e, 0x600b, 0xffff, 0x6910, 0x6112, 0x6023, 0x0004, 0x080c,
+	0x90d9, 0x080c, 0x9687, 0x2d60, 0x080c, 0xae71, 0x00de, 0x0005,
+	0x080c, 0xae71, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0ec, 0x00ee, 0x0005, 0x2009, 0x1867, 0x210c, 0xd1ec,
+	0x05b0, 0x6003, 0x0002, 0x6024, 0xc0e5, 0x6026, 0xd0cc, 0x0150,
+	0x2001, 0x1987, 0x2004, 0x6042, 0x2009, 0x1867, 0x210c, 0xd1f4,
+	0x1520, 0x00a0, 0x2009, 0x1867, 0x210c, 0xd1f4, 0x0128, 0x6024,
+	0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001, 0x1987, 0x200c, 0x2001,
+	0x1985, 0x2004, 0x9100, 0x9080, 0x000a, 0x6042, 0x6010, 0x00b6,
+	0x2058, 0xb8bc, 0x00be, 0x0008, 0x2104, 0x9005, 0x0118, 0x9088,
+	0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000, 0x9085, 0x0001, 0x0005,
+	0x0016, 0x00c6, 0x00e6, 0x6154, 0xb8bc, 0x2060, 0x8cff, 0x0180,
+	0x84ff, 0x1118, 0x6054, 0x9106, 0x1138, 0x600c, 0x2072, 0x080c,
+	0x869b, 0x080c, 0xae71, 0x0010, 0x9cf0, 0x0003, 0x2e64, 0x0c70,
+	0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6, 0x00b6, 0x6010, 0x2058,
+	0xb8bc, 0x2068, 0x9005, 0x0130, 0x9c06, 0x0110, 0x680c, 0x0cd0,
+	0x600c, 0x680e, 0x00be, 0x00de, 0x0005, 0x0026, 0x0036, 0x0156,
+	0x2011, 0x182c, 0x2204, 0x9084, 0x00ff, 0x2019, 0x026e, 0x2334,
+	0x9636, 0x1508, 0x8318, 0x2334, 0x2204, 0x9084, 0xff00, 0x9636,
+	0x11d0, 0x2011, 0x0270, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048,
+	0x2019, 0x000a, 0x080c, 0xbe30, 0x009e, 0x1168, 0x2011, 0x0274,
+	0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x0006, 0x080c,
+	0xbe30, 0x009e, 0x1100, 0x015e, 0x003e, 0x002e, 0x0005, 0x00e6,
+	0x2071, 0x1800, 0x080c, 0x5fb6, 0x080c, 0x2f98, 0x00ee, 0x0005,
+	0x0096, 0x0026, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0xa85c, 0x9080,
+	0x001a, 0x20a0, 0x20a9, 0x000c, 0xa860, 0x20e8, 0x9006, 0x4004,
+	0x9186, 0x0046, 0x1118, 0xa867, 0x0136, 0x0038, 0xa867, 0x0138,
+	0x9186, 0x0041, 0x0110, 0xa87b, 0x0001, 0x7038, 0x9084, 0xff00,
+	0x7240, 0x9294, 0xff00, 0x8007, 0x9215, 0xaa9a, 0x9186, 0x0046,
+	0x1168, 0x7038, 0x9084, 0x00ff, 0x723c, 0x9294, 0xff00, 0x9215,
+	0xaa9e, 0x723c, 0x9294, 0x00ff, 0xaaa2, 0x0060, 0x7040, 0x9084,
+	0x00ff, 0x7244, 0x9294, 0xff00, 0x9215, 0xaa9e, 0x7244, 0x9294,
+	0x00ff, 0xaaa2, 0x9186, 0x0046, 0x1118, 0x9e90, 0x0012, 0x0010,
+	0x9e90, 0x001a, 0x2204, 0x8007, 0xa8a6, 0x8210, 0x2204, 0x8007,
+	0xa8aa, 0x8210, 0x2204, 0x8007, 0xa8ae, 0x8210, 0x2204, 0x8007,
+	0xa8b2, 0x8210, 0x9186, 0x0046, 0x11b8, 0x9e90, 0x0016, 0x2204,
+	0x8007, 0xa8b6, 0x8210, 0x2204, 0x8007, 0xa8ba, 0x8210, 0x2204,
+	0x8007, 0xa8be, 0x8210, 0x2204, 0x8007, 0xa8c2, 0x8210, 0x2011,
+	0x0205, 0x2013, 0x0001, 0x00b0, 0x9e90, 0x001e, 0x2204, 0x8007,
+	0xa8b6, 0x8210, 0x2204, 0x8007, 0xa8ba, 0x2011, 0x0205, 0x2013,
+	0x0001, 0x2011, 0x0260, 0x2204, 0x8007, 0xa8be, 0x8210, 0x2204,
+	0x8007, 0xa8c2, 0x9186, 0x0046, 0x1118, 0x2011, 0x0262, 0x0010,
+	0x2011, 0x026a, 0x0146, 0x01d6, 0x0036, 0x20a9, 0x0001, 0x2019,
+	0x0008, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0x2204,
+	0x8007, 0x4004, 0x8210, 0x8319, 0x1dd0, 0x003e, 0x01ce, 0x013e,
+	0x2011, 0x0205, 0x2013, 0x0000, 0x002e, 0x080c, 0x6c86, 0x009e,
+	0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0fc,
+	0x0108, 0x0011, 0x00ee, 0x0005, 0xa880, 0xc0e5, 0xa882, 0x0005,
+	0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026,
+	0x0016, 0x0126, 0x2091, 0x8000, 0x2029, 0x19ef, 0x252c, 0x2021,
+	0x19f5, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7654, 0x7074,
+	0x9606, 0x0578, 0x6720, 0x9786, 0x0001, 0x0118, 0x9786, 0x0008,
+	0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400, 0x9c06, 0x01d0, 0x080c,
+	0xe600, 0x01b8, 0x080c, 0xe610, 0x11a0, 0x6000, 0x9086, 0x0004,
+	0x1120, 0x0016, 0x080c, 0x1a60, 0x001e, 0x080c, 0xcd3f, 0x1110,
+	0x080c, 0x31ea, 0x080c, 0xcd50, 0x1110, 0x080c, 0xb824, 0x080c,
+	0xaea2, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1208,
+	0x0858, 0x012e, 0x001e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e,
+	0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0dc,
+	0x0005, 0x0006, 0x2001, 0x1837, 0x2004, 0xd09c, 0x000e, 0x0005,
+	0x0006, 0x0036, 0x0046, 0x080c, 0xd24a, 0x0168, 0x2019, 0xffff,
+	0x9005, 0x0128, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021,
+	0x0004, 0x080c, 0x4ccb, 0x004e, 0x003e, 0x000e, 0x6004, 0x9086,
+	0x0001, 0x1128, 0x080c, 0xa80e, 0x080c, 0xaea2, 0x9006, 0x0005,
+	0x00e6, 0x00c6, 0x00b6, 0x0046, 0x2061, 0x1cd0, 0x2071, 0x1800,
+	0x7454, 0x7074, 0x8001, 0x9402, 0x12b8, 0x2100, 0x9c06, 0x0148,
+	0x6000, 0x9086, 0x0000, 0x0128, 0x6010, 0x2058, 0xb8a0, 0x9206,
+	0x0140, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1220,
+	0x0c60, 0x9085, 0x0001, 0x0008, 0x9006, 0x004e, 0x00be, 0x00ce,
+	0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091, 0x8000,
+	0x2071, 0x1840, 0xd5a4, 0x0118, 0x7004, 0x8000, 0x7006, 0xd5b4,
+	0x0118, 0x7000, 0x8000, 0x7002, 0xd5ac, 0x0178, 0x2500, 0x9084,
+	0x0007, 0x908e, 0x0003, 0x0148, 0x908e, 0x0004, 0x0130, 0x908e,
+	0x0005, 0x0118, 0x2071, 0xfffe, 0x0089, 0x001e, 0x00ee, 0x000e,
+	0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071,
+	0xfff6, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005, 0x2e05, 0x8000,
+	0x2077, 0x1220, 0x8e70, 0x2e05, 0x8000, 0x2077, 0x0005, 0x00e6,
+	0x2071, 0xfff4, 0x0c99, 0x00ee, 0x0005, 0x00e6, 0x2071, 0xfff8,
+	0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000,
+	0x2071, 0x1840, 0x7014, 0x8000, 0x7016, 0x00ee, 0x000e, 0x012e,
+	0x0005, 0x0003, 0x000b, 0x079e, 0x0000, 0xc000, 0x0001, 0x8064,
+	0x0008, 0x0010, 0x0000, 0x8066, 0x0000, 0x0101, 0x0008, 0x4407,
+	0x0003, 0x8060, 0x0000, 0x0400, 0x0000, 0x580d, 0x000b, 0x79a8,
+	0x000b, 0x50ee, 0x000b, 0x4c0a, 0x0003, 0xbac0, 0x0009, 0x008a,
+	0x0000, 0x0c0a, 0x000b, 0x15fe, 0x0008, 0x340a, 0x0003, 0xc4c0,
+	0x0009, 0x7000, 0x0000, 0xffa0, 0x0001, 0x2000, 0x0000, 0x1668,
+	0x000b, 0x808c, 0x0008, 0x0001, 0x0000, 0x0000, 0x0007, 0x4028,
+	0x0000, 0x4047, 0x000a, 0x808c, 0x0008, 0x0002, 0x0000, 0x0822,
+	0x0003, 0x4022, 0x0000, 0x0028, 0x000b, 0x4122, 0x0008, 0x94c0,
+	0x0009, 0xff00, 0x0008, 0xffe0, 0x0009, 0x0500, 0x0008, 0x0a93,
+	0x000b, 0x4447, 0x0002, 0x0e90, 0x0003, 0x0bfe, 0x0008, 0x11a0,
+	0x0001, 0x126e, 0x0003, 0x0ca0, 0x0001, 0x126e, 0x0003, 0x9180,
+	0x0001, 0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62,
+	0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4436, 0x000b, 0x808c,
+	0x0008, 0x0000, 0x0008, 0x0060, 0x0008, 0x8062, 0x0008, 0x0004,
+	0x0000, 0x8066, 0x0000, 0x0411, 0x0000, 0x443e, 0x0003, 0x03fe,
+	0x0000, 0x43e0, 0x0001, 0x0e6b, 0x000b, 0xc2c0, 0x0009, 0x00ff,
+	0x0008, 0x02e0, 0x0001, 0x0e6b, 0x000b, 0x9180, 0x0001, 0x0005,
+	0x0008, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066,
+	0x0000, 0x0019, 0x0000, 0x444d, 0x000b, 0x0240, 0x0002, 0x0a68,
+	0x0003, 0x00fe, 0x0000, 0x326b, 0x000b, 0x0248, 0x000a, 0x085c,
+	0x0003, 0x9180, 0x0001, 0x0006, 0x0008, 0x7f62, 0x0008, 0x8002,
+	0x0008, 0x0003, 0x0008, 0x8066, 0x0000, 0x020a, 0x0000, 0x445b,
+	0x0003, 0x112a, 0x0000, 0x002e, 0x0008, 0x022c, 0x0008, 0x3a44,
+	0x0002, 0x0c0a, 0x000b, 0x808c, 0x0008, 0x0002, 0x0000, 0x1760,
+	0x0008, 0x8062, 0x0008, 0x000f, 0x0008, 0x8066, 0x0000, 0x0011,
+	0x0008, 0x4468, 0x0003, 0x01fe, 0x0008, 0x42e0, 0x0009, 0x0e5c,
+	0x0003, 0x00fe, 0x0000, 0x43e0, 0x0001, 0x0e5c, 0x0003, 0x1734,
+	0x0000, 0x1530, 0x0000, 0x1632, 0x0008, 0x0d2a, 0x0008, 0x9880,
+	0x0001, 0x0010, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62,
+	0x0008, 0x8066, 0x0000, 0x1e0a, 0x0008, 0x447a, 0x0003, 0x808a,
+	0x0008, 0x0003, 0x0008, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002,
+	0x0000, 0x5880, 0x000b, 0x8066, 0x0000, 0x3679, 0x0000, 0x4483,
+	0x0003, 0x5884, 0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002, 0x088a,
+	0x000b, 0x0d00, 0x0000, 0x0092, 0x000c, 0x8054, 0x0008, 0x0011,
+	0x0008, 0x8074, 0x0000, 0x1010, 0x0008, 0x1efe, 0x0000, 0x300a,
+	0x000b, 0x00c8, 0x000c, 0x000a, 0x000b, 0x00fe, 0x0000, 0x349a,
+	0x0003, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0007, 0x0000, 0x8066,
+	0x0000, 0x0231, 0x0008, 0x4499, 0x000b, 0x03fe, 0x0000, 0x04d0,
+	0x0001, 0x0cc0, 0x000b, 0x82c0, 0x0001, 0x1f00, 0x0000, 0xffa0,
+	0x0001, 0x0400, 0x0000, 0x08af, 0x0003, 0x14c0, 0x000b, 0x01fe,
+	0x0008, 0x0580, 0x0009, 0x7f06, 0x0000, 0x02fe, 0x0008, 0xffc0,
+	0x0001, 0x00ff, 0x0008, 0x0690, 0x0001, 0x10af, 0x0003, 0x7f08,
+	0x0008, 0x84c0, 0x0001, 0xff00, 0x0008, 0x08c0, 0x0003, 0x00fe,
+	0x0000, 0x34b6, 0x000b, 0x8072, 0x0000, 0x1010, 0x0008, 0x3944,
+	0x0002, 0x08b1, 0x0003, 0x00ba, 0x0003, 0x8072, 0x0000, 0x2020,
+	0x0008, 0x3945, 0x000a, 0x08b6, 0x000b, 0x3946, 0x000a, 0x0cc7,
+	0x0003, 0x0000, 0x0007, 0x3943, 0x000a, 0x08c7, 0x000b, 0x00ba,
+	0x0003, 0x00fe, 0x0000, 0x34c5, 0x0003, 0x8072, 0x0000, 0x1000,
+	0x0000, 0x00c7, 0x0003, 0x8072, 0x0000, 0x2000, 0x0000, 0x4000,
+	0x000f, 0x1c60, 0x0000, 0x1b62, 0x0000, 0x8066, 0x0000, 0x0231,
+	0x0008, 0x44cc, 0x000b, 0x58cd, 0x000b, 0x0140, 0x0008, 0x0242,
+	0x0000, 0x1f43, 0x0002, 0x0cdb, 0x000b, 0x0d44, 0x0000, 0x0d46,
+	0x0008, 0x0348, 0x0008, 0x044a, 0x0008, 0x030a, 0x0008, 0x040c,
+	0x0000, 0x0d06, 0x0000, 0x0d08, 0x0008, 0x00df, 0x0003, 0x0344,
+	0x0008, 0x0446, 0x0008, 0x0548, 0x0008, 0x064a, 0x0000, 0x1948,
+	0x000a, 0x08e2, 0x0003, 0x0d4a, 0x0008, 0x58e2, 0x0003, 0x3efe,
+	0x0008, 0x7f4f, 0x0002, 0x08e9, 0x000b, 0x8000, 0x0000, 0x0001,
+	0x0000, 0x0092, 0x000c, 0x8054, 0x0008, 0x0001, 0x0000, 0x8074,
+	0x0000, 0x2020, 0x0008, 0x4000, 0x000f, 0x3a40, 0x000a, 0x0c0d,
+	0x0003, 0x2b24, 0x0008, 0x2b24, 0x0008, 0x58f2, 0x000b, 0x8054,
+	0x0008, 0x0002, 0x0000, 0x1242, 0x0002, 0x0940, 0x0003, 0x3a45,
+	0x000a, 0x092f, 0x0003, 0x8072, 0x0000, 0x1000, 0x0000, 0x3945,
+	0x000a, 0x08ff, 0x0003, 0x8072, 0x0000, 0x3010, 0x0000, 0x1e10,
+	0x000a, 0x7f3c, 0x0000, 0x092a, 0x0003, 0x1d00, 0x0002, 0x7f3a,
+	0x0000, 0x0d60, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009,
+	0x0008, 0x4508, 0x000b, 0x00fe, 0x0000, 0x3527, 0x000b, 0x1c60,
+	0x0000, 0x8062, 0x0008, 0x0001, 0x0000, 0x8066, 0x0000, 0x0009,
+	0x0008, 0x4510, 0x000b, 0x00fe, 0x0000, 0x3243, 0x000b, 0x0038,
+	0x0000, 0x0060, 0x0008, 0x8062, 0x0008, 0x0019, 0x0000, 0x8066,
+	0x0000, 0x0009, 0x0008, 0x4519, 0x000b, 0x80c0, 0x0009, 0x00ff,
+	0x0008, 0x7f3e, 0x0008, 0x0d60, 0x0000, 0x0efe, 0x0008, 0x1f80,
+	0x0001, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4523,
+	0x000b, 0x003a, 0x0008, 0x1dfe, 0x0000, 0x0104, 0x000b, 0x0036,
+	0x0008, 0x00c8, 0x000c, 0x0140, 0x000b, 0x8074, 0x0000, 0x2000,
+	0x0000, 0x8072, 0x0000, 0x2000, 0x0000, 0x0140, 0x000b, 0x3a44,
+	0x0002, 0x0a71, 0x000b, 0x8074, 0x0000, 0x1000, 0x0000, 0x8072,
+	0x0000, 0x1000, 0x0000, 0x2d0e, 0x0000, 0x2d0e, 0x0000, 0x3640,
+	0x0003, 0x26fe, 0x0008, 0x26fe, 0x0008, 0x2700, 0x0008, 0x2700,
+	0x0008, 0x00d0, 0x0009, 0x0d52, 0x000b, 0x8074, 0x0000, 0x4040,
+	0x0008, 0x5940, 0x0003, 0x50ee, 0x000b, 0x3a46, 0x000a, 0x0d52,
+	0x000b, 0x3a47, 0x0002, 0x094d, 0x000b, 0x8054, 0x0008, 0x0004,
+	0x0000, 0x8074, 0x0000, 0x8000, 0x0000, 0x8072, 0x0000, 0x3000,
+	0x0008, 0x019c, 0x0003, 0x92c0, 0x0009, 0x0fc8, 0x0000, 0x080a,
+	0x0003, 0x1246, 0x000a, 0x0e3a, 0x0003, 0x1a60, 0x0000, 0x8062,
+	0x0008, 0x0002, 0x0000, 0x8066, 0x0000, 0x362a, 0x0000, 0x4557,
+	0x000b, 0x2000, 0x0000, 0x2000, 0x0000, 0x2102, 0x0000, 0x2102,
+	0x0000, 0x2204, 0x0000, 0x2204, 0x0000, 0x2306, 0x0000, 0x2306,
+	0x0000, 0x2408, 0x0000, 0x2408, 0x0000, 0x250a, 0x0000, 0x250a,
+	0x0000, 0x260c, 0x0000, 0x260c, 0x0000, 0x270e, 0x0000, 0x270e,
+	0x0000, 0x2810, 0x0000, 0x2810, 0x0000, 0x2912, 0x0000, 0x2912,
+	0x0000, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0007, 0x0000, 0x8066,
+	0x0000, 0x0052, 0x0000, 0x4571, 0x0003, 0x92c0, 0x0009, 0x0780,
+	0x0008, 0x0e56, 0x0003, 0x124b, 0x0002, 0x097a, 0x0003, 0x2e4d,
+	0x0002, 0x2e4d, 0x0002, 0x0a40, 0x0003, 0x3a46, 0x000a, 0x0d8a,
+	0x000b, 0x597c, 0x0003, 0x8054, 0x0008, 0x0004, 0x0000, 0x1243,
+	0x000a, 0x0998, 0x0003, 0x8010, 0x0008, 0x000d, 0x0000, 0x021b,
+	0x000c, 0x1948, 0x000a, 0x0987, 0x000b, 0x0210, 0x0004, 0x1810,
+	0x0000, 0x021b, 0x000c, 0x0198, 0x000b, 0x1948, 0x000a, 0x098e,
+	0x000b, 0x1243, 0x000a, 0x0a43, 0x0003, 0x194d, 0x000a, 0x0992,
+	0x0003, 0x1243, 0x000a, 0x0a4a, 0x0003, 0x5992, 0x0003, 0x8054,
+	0x0008, 0x0004, 0x0000, 0x0210, 0x0004, 0x1810, 0x0000, 0x021b,
+	0x000c, 0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0x3000,
+	0x0008, 0x0d30, 0x0000, 0x3a42, 0x0002, 0x0da2, 0x000b, 0x15fe,
+	0x0008, 0x3461, 0x000b, 0x000a, 0x000b, 0x8074, 0x0000, 0x0501,
+	0x0000, 0x8010, 0x0008, 0x000c, 0x0008, 0x021b, 0x000c, 0x000a,
+	0x000b, 0xbbe0, 0x0009, 0x0030, 0x0008, 0x0db8, 0x0003, 0x18fe,
+	0x0000, 0x3ce0, 0x0009, 0x09b5, 0x0003, 0x15fe, 0x0008, 0x3ce0,
+	0x0009, 0x09b5, 0x0003, 0x020b, 0x0004, 0x8076, 0x0008, 0x0040,
+	0x0000, 0x0208, 0x000b, 0x8076, 0x0008, 0x0041, 0x0008, 0x0208,
+	0x000b, 0xbbe0, 0x0009, 0x0032, 0x0000, 0x0dbd, 0x0003, 0x3c1e,
+	0x0008, 0x0208, 0x000b, 0xbbe0, 0x0009, 0x003b, 0x0000, 0x0dc2,
+	0x000b, 0x3c20, 0x0000, 0x0208, 0x000b, 0xbbe0, 0x0009, 0x0035,
+	0x0008, 0x0dc8, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x0384,
+	0x000b, 0xbbe0, 0x0009, 0x0036, 0x0008, 0x0aa5, 0x000b, 0xbbe0,
+	0x0009, 0x0037, 0x0000, 0x0de9, 0x000b, 0x18fe, 0x0000, 0x3ce0,
+	0x0009, 0x0db5, 0x000b, 0x8076, 0x0008, 0x0040, 0x0000, 0x1a60,
+	0x0000, 0x8062, 0x0008, 0x000d, 0x0000, 0x2604, 0x0008, 0x2604,
+	0x0008, 0x2706, 0x0008, 0x2706, 0x0008, 0x2808, 0x0000, 0x2808,
+	0x0000, 0x290a, 0x0000, 0x290a, 0x0000, 0x8066, 0x0000, 0x0422,
+	0x0000, 0x45e0, 0x000b, 0x0210, 0x0004, 0x8054, 0x0008, 0x0004,
+	0x0000, 0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0xb000,
+	0x0000, 0x019c, 0x0003, 0xbbe0, 0x0009, 0x0038, 0x0000, 0x0dfb,
+	0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x09f8, 0x0003, 0x15fe,
+	0x0008, 0x3ce0, 0x0009, 0x0db1, 0x0003, 0x020b, 0x0004, 0x8076,
+	0x0008, 0x0040, 0x0000, 0x8072, 0x0000, 0x8000, 0x0000, 0x0268,
+	0x000b, 0x8076, 0x0008, 0x0042, 0x0008, 0x0208, 0x000b, 0xbbe0,
+	0x0009, 0x0016, 0x0000, 0x0e08, 0x000b, 0x8074, 0x0000, 0x0808,
+	0x0008, 0x3a44, 0x0002, 0x0c0c, 0x000b, 0x8074, 0x0000, 0x0800,
+	0x0000, 0x8072, 0x0000, 0x8000, 0x0000, 0x8000, 0x000f, 0x000a,
+	0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x000a, 0x000b, 0x3d30,
+	0x000a, 0x7f00, 0x0000, 0xbc80, 0x0001, 0x0007, 0x0000, 0x0214,
+	0x0003, 0x1930, 0x000a, 0x7f00, 0x0000, 0x9880, 0x0001, 0x0007,
+	0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066,
+	0x0000, 0x000a, 0x0008, 0x4619, 0x000b, 0x4000, 0x000f, 0x221e,
+	0x000b, 0x0870, 0x0008, 0x4000, 0x000f, 0x7e1b, 0x000b, 0xbbe0,
+	0x0009, 0x0030, 0x0008, 0x0e1b, 0x0003, 0x18fe, 0x0000, 0x3ce0,
+	0x0009, 0x0a2c, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0a2c,
+	0x0003, 0x020b, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x022e,
+	0x0003, 0x8076, 0x0008, 0x0041, 0x0008, 0x8072, 0x0000, 0x8000,
+	0x0000, 0x021b, 0x0003, 0xbac0, 0x0009, 0x0090, 0x0008, 0x0a37,
+	0x0003, 0x8074, 0x0000, 0x0706, 0x0000, 0x0239, 0x0003, 0x8074,
+	0x0000, 0x0703, 0x0000, 0x4000, 0x000f, 0x8010, 0x0008, 0x0023,
+	0x0000, 0x0276, 0x000b, 0x8010, 0x0008, 0x0008, 0x0000, 0x0276,
+	0x000b, 0x8010, 0x0008, 0x0022, 0x0008, 0x0276, 0x000b, 0x0210,
+	0x0004, 0x8010, 0x0008, 0x0007, 0x0000, 0x021b, 0x000c, 0x1810,
+	0x0000, 0x021b, 0x000c, 0x0282, 0x0003, 0x0210, 0x0004, 0x8010,
+	0x0008, 0x001b, 0x0008, 0x021b, 0x000c, 0x1810, 0x0000, 0x021b,
+	0x000c, 0x8074, 0x0000, 0xf080, 0x0000, 0x8072, 0x0000, 0x3000,
+	0x0008, 0x0d30, 0x0000, 0x000a, 0x000b, 0x8010, 0x0008, 0x0009,
+	0x0008, 0x0276, 0x000b, 0x8010, 0x0008, 0x0005, 0x0008, 0x0276,
+	0x000b, 0x1648, 0x000a, 0x0c6f, 0x000b, 0x808c, 0x0008, 0x0001,
+	0x0000, 0x8010, 0x0008, 0x0004, 0x0000, 0x4143, 0x000a, 0x086f,
+	0x0003, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x0d2a, 0x0008, 0x0276,
+	0x000b, 0x8010, 0x0008, 0x0003, 0x0008, 0x027a, 0x000b, 0x8010,
+	0x0008, 0x000b, 0x0000, 0x027a, 0x000b, 0x8010, 0x0008, 0x0002,
+	0x0000, 0x027a, 0x000b, 0x3a47, 0x0002, 0x0d40, 0x000b, 0x8010,
+	0x0008, 0x0006, 0x0008, 0x027a, 0x000b, 0x8074, 0x0000, 0xf000,
+	0x0008, 0x8072, 0x0000, 0x3000, 0x0008, 0x021b, 0x000c, 0x0231,
+	0x0004, 0x3a40, 0x000a, 0x080a, 0x0003, 0x8010, 0x0008, 0x000c,
+	0x0008, 0x021b, 0x000c, 0x000a, 0x000b, 0x8074, 0x0000, 0xf080,
+	0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x2e4d,
+	0x0002, 0x2e4d, 0x0002, 0x0a8d, 0x000b, 0x8054, 0x0008, 0x0019,
+	0x0000, 0x000a, 0x000b, 0x8054, 0x0008, 0x0009, 0x0008, 0x000a,
+	0x000b, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x026b, 0x000b, 0x808c,
+	0x0008, 0x0000, 0x0008, 0x4447, 0x0002, 0x0ab9, 0x0003, 0xc0c0,
+	0x0001, 0x00ff, 0x0008, 0xffe0, 0x0009, 0x00ff, 0x0008, 0x0e90,
+	0x0003, 0xc1e0, 0x0001, 0xffff, 0x0008, 0x0e90, 0x0003, 0x8010,
+	0x0008, 0x0013, 0x0000, 0x021b, 0x000c, 0x8074, 0x0000, 0x0202,
+	0x0008, 0x000a, 0x000b, 0x3a40, 0x000a, 0x0eb6, 0x000b, 0x8074,
+	0x0000, 0x0200, 0x0000, 0x3d00, 0x0000, 0x3cfe, 0x0000, 0x8072,
+	0x0000, 0x8000, 0x0000, 0x43e0, 0x0001, 0x0eb4, 0x0003, 0x42fe,
+	0x0000, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x00e0, 0x0009, 0x0a90,
+	0x000b, 0x0d08, 0x0008, 0x0309, 0x000b, 0x8072, 0x0000, 0x8000,
+	0x0000, 0x000a, 0x000b, 0x038d, 0x0004, 0x808c, 0x0008, 0x0001,
+	0x0000, 0x04fe, 0x0008, 0x3370, 0x0003, 0x0460, 0x0000, 0x8062,
+	0x0008, 0x0001, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x46c3,
+	0x0003, 0x0004, 0x0000, 0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f00,
+	0x0000, 0x80e0, 0x0001, 0x0004, 0x0000, 0x0add, 0x000b, 0x80e0,
+	0x0001, 0x0005, 0x0008, 0x0add, 0x000b, 0x80e0, 0x0001, 0x0006,
+	0x0008, 0x0add, 0x000b, 0x82c0, 0x0001, 0xff00, 0x0008, 0x7f04,
+	0x0008, 0x82e0, 0x0009, 0x0600, 0x0008, 0x0add, 0x000b, 0x82e0,
+	0x0009, 0x0500, 0x0008, 0x0add, 0x000b, 0x82e0, 0x0009, 0x0400,
+	0x0000, 0x0f70, 0x0003, 0xc4c0, 0x0009, 0x7000, 0x0000, 0xffe0,
+	0x0009, 0x1000, 0x0000, 0x0b09, 0x0003, 0x037e, 0x0004, 0x3941,
+	0x0002, 0x0ae8, 0x000b, 0x8072, 0x0000, 0x0400, 0x0000, 0x000a,
+	0x000b, 0x0460, 0x0000, 0x80fe, 0x0008, 0x002b, 0x0008, 0x7f62,
+	0x0008, 0x8066, 0x0000, 0x2209, 0x0008, 0x46ee, 0x0003, 0x11fe,
+	0x0000, 0x3304, 0x0003, 0x9180, 0x0001, 0x0002, 0x0000, 0x8060,
+	0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0609,
+	0x0008, 0x46f8, 0x000b, 0x42fe, 0x0000, 0xffc0, 0x0001, 0xff00,
+	0x0008, 0x03e0, 0x0009, 0x0f01, 0x0003, 0x8072, 0x0000, 0x0400,
+	0x0000, 0x0046, 0x0003, 0x9180, 0x0001, 0x0003, 0x0008, 0x02eb,
+	0x0003, 0x8072, 0x0000, 0x0400, 0x0000, 0x8010, 0x0008, 0x0010,
+	0x0000, 0x0361, 0x0003, 0x037e, 0x0004, 0x3941, 0x0002, 0x0b0f,
+	0x0003, 0x8072, 0x0000, 0x0400, 0x0000, 0x000a, 0x000b, 0x0346,
+	0x000c, 0x11fe, 0x0000, 0x3717, 0x0003, 0x8072, 0x0000, 0x0400,
+	0x0000, 0x8010, 0x0008, 0x000e, 0x0000, 0x0361, 0x0003, 0x8060,
+	0x0000, 0x0400, 0x0000, 0x04fe, 0x0008, 0x372c, 0x000b, 0x808c,
+	0x0008, 0x0000, 0x0008, 0x9180, 0x0001, 0x0005, 0x0008, 0x7f62,
+	0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4722, 0x000b, 0x0060,
+	0x0008, 0x8062, 0x0008, 0x001b, 0x0008, 0x4304, 0x0008, 0x4206,
+	0x0008, 0x8066, 0x0000, 0x0412, 0x0000, 0x472a, 0x0003, 0x0343,
+	0x0003, 0x808c, 0x0008, 0x0001, 0x0000, 0x0460, 0x0000, 0x8062,
+	0x0008, 0x002b, 0x0008, 0x8066, 0x0000, 0x0609, 0x0008, 0x4733,
+	0x000b, 0x8066, 0x0000, 0x220a, 0x0008, 0x4736, 0x000b, 0x42fe,
+	0x0000, 0xffc0, 0x0001, 0xff00, 0x0008, 0x7f04, 0x0008, 0x8060,
+	0x0000, 0x0400, 0x0000, 0x9180, 0x0001, 0x0002, 0x0000, 0x7f62,
+	0x0008, 0x8066, 0x0000, 0x041a, 0x0008, 0x4742, 0x000b, 0x8072,
+	0x0000, 0x0400, 0x0000, 0x0046, 0x0003, 0x8060, 0x0000, 0x0400,
+	0x0000, 0x1362, 0x0008, 0x8066, 0x0000, 0x0411, 0x0000, 0x474b,
+	0x000b, 0x02fe, 0x0008, 0x03e0, 0x0009, 0x0f51, 0x0003, 0x0d22,
+	0x0000, 0x4000, 0x000f, 0x8280, 0x0009, 0x0002, 0x0000, 0x1380,
+	0x0001, 0x7f62, 0x0008, 0x8066, 0x0000, 0x2209, 0x0008, 0x4757,
+	0x0003, 0x0200, 0x000a, 0xffc0, 0x0001, 0x0007, 0x0000, 0x7f06,
+	0x0000, 0x1362, 0x0008, 0x8066, 0x0000, 0x060a, 0x0008, 0x475f,
+	0x000b, 0x4000, 0x000f, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x2f44,
+	0x000a, 0x2f44, 0x000a, 0x0e6b, 0x000b, 0x808a, 0x0008, 0x0003,
+	0x0008, 0x8074, 0x0000, 0xf080, 0x0000, 0x8072, 0x0000, 0x3000,
+	0x0008, 0x5b6c, 0x0003, 0x8054, 0x0008, 0x0019, 0x0000, 0x000a,
+	0x000b, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c, 0x0008, 0x0000,
+	0x0008, 0x8010, 0x0008, 0x0011, 0x0008, 0x021b, 0x000c, 0x42fe,
+	0x0000, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x7f10, 0x0008, 0x021b,
+	0x000c, 0x4310, 0x0008, 0x027a, 0x000b, 0x3941, 0x0002, 0x0b81,
+	0x0003, 0x4000, 0x000f, 0x8072, 0x0000, 0x0404, 0x0008, 0x4000,
+	0x000f, 0x8010, 0x0008, 0x0012, 0x0008, 0x021b, 0x000c, 0x0346,
+	0x000c, 0x1110, 0x0000, 0x021b, 0x000c, 0x11fe, 0x0000, 0x3787,
+	0x0003, 0x000a, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008, 0x7f00,
+	0x0000, 0xc3c0, 0x0001, 0xff00, 0x0008, 0x00d0, 0x0009, 0x0bb2,
+	0x0003, 0x0d0a, 0x0000, 0x8580, 0x0001, 0x1000, 0x0000, 0x7f62,
+	0x0008, 0x8060, 0x0000, 0x0400, 0x0000, 0x8066, 0x0000, 0x0809,
+	0x0000, 0x479c, 0x000b, 0x04fe, 0x0008, 0x33ab, 0x0003, 0x0460,
+	0x0000, 0x8062, 0x0008, 0x0004, 0x0000, 0x8066, 0x0000, 0x0211,
+	0x0000, 0x47a4, 0x0003, 0x01fe, 0x0008, 0x00e0, 0x0009, 0x0fab,
+	0x0003, 0x02fe, 0x0008, 0x43e0, 0x0001, 0x0bb1, 0x0003, 0x0500,
+	0x0002, 0x7f0a, 0x0000, 0xffe0, 0x0009, 0x0800, 0x0000, 0x0f95,
+	0x000b, 0x0d08, 0x0008, 0x4000, 0x000f, 0x43fe, 0x0008, 0x3e80,
+	0x0001, 0xffc0, 0x0001, 0x7fff, 0x0000, 0x0d60, 0x0000, 0x7f62,
+	0x0008, 0x8066, 0x0000, 0x0809, 0x0000, 0x47ba, 0x0003, 0x8060,
+	0x0000, 0x0400, 0x0000, 0x84c0, 0x0001, 0xff00, 0x0008, 0x7f60,
+	0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60,
+	0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0xff80,
+	0x0009, 0x1000, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0809,
+	0x0000, 0x47cc, 0x000b, 0x4000, 0x000f, 0x5ff4, 0xebed, 0x0001,
+	0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100,
+	0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, 0x4464
 };
 #ifdef UNIQUE_FW_NAME
-unsigned short fw2300ipx_length01 = 0xe9c7;
+unsigned short fw2300ipx_length01 = 0xe9e8;
 #else
-unsigned short risc_code_length01 = 0xe9c7;
+unsigned short risc_code_length01 = 0xe9e8;
 #endif
 
--- diff/drivers/scsi/qla2xxx/ql2322.c	2004-05-19 22:12:13.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql2322.c	2004-07-01 21:32:43.000000000 +0100
@@ -9,7 +9,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 
-#include "qla_os.h"
 #include "qla_def.h"
 
 static char qla_driver_name[] = "qla2322";
--- diff/drivers/scsi/qla2xxx/ql2322_fw.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql2322_fw.c	2004-07-01 21:32:43.000000000 +0100
@@ -18,7 +18,7 @@
  *************************************************************************/
 
 /*
- *	Firmware Version 3.02.28 (14:05 Apr 03, 2004)
+ *	Firmware Version 3.02.30 (07:55 Jun 16, 2004)
  */
 
 #ifdef UNIQUE_FW_NAME
@@ -28,15 +28,15 @@
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned char fw2322ipx_version_str[] = {3, 2,28};
+unsigned char fw2322ipx_version_str[] = {3, 2,30};
 #else
-unsigned char firmware_version[] = {3, 2,28};
+unsigned char firmware_version[] = {3, 2,30};
 #endif
 
 #ifdef UNIQUE_FW_NAME
-#define fw2322ipx_VERSION_STRING "3.02.28"
+#define fw2322ipx_VERSION_STRING "3.02.30"
 #else
-#define FW_VERSION_STRING "3.02.28"
+#define FW_VERSION_STRING "3.02.30"
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -50,12 +50,12 @@
 #else
 unsigned short risc_code01[] = { 
 #endif
-	0x0470, 0x0000, 0x0000, 0xdf42, 0x0000, 0x0003, 0x0002, 0x001c,
+	0x0470, 0x0000, 0x0000, 0xdf52, 0x0000, 0x0003, 0x0002, 0x001e,
 	0x0137, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
 	0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
 	0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972,
 	0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-	0x332e, 0x3032, 0x2e32, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9,
+	0x332e, 0x3032, 0x2e33, 0x3020, 0x2020, 0x2020, 0x2400, 0x20a9,
 	0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f,
 	0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001,
 	0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000,
@@ -64,164 +64,164 @@
 	0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00,
 	0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001,
 	0x0000, 0x20c1, 0x0004, 0x20c9, 0x1cff, 0x2059, 0x0000, 0x2b78,
-	0x7883, 0x0004, 0x2089, 0x2ab5, 0x2051, 0x1800, 0x2a70, 0x20e1,
+	0x7883, 0x0004, 0x2089, 0x2ac3, 0x2051, 0x1800, 0x2a70, 0x20e1,
 	0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e55, 0x00f6,
-	0x7888, 0x9005, 0x11f8, 0x2061, 0xc000, 0x080c, 0x205a, 0x1170,
-	0x2079, 0x0300, 0x080c, 0x2070, 0x2061, 0xe000, 0x080c, 0x205a,
-	0x1128, 0x2079, 0x0380, 0x080c, 0x2070, 0x0060, 0x00fe, 0x7883,
+	0x7888, 0x9005, 0x11f8, 0x2061, 0xc000, 0x080c, 0x2067, 0x1170,
+	0x2079, 0x0300, 0x080c, 0x207d, 0x2061, 0xe000, 0x080c, 0x2067,
+	0x1128, 0x2079, 0x0380, 0x080c, 0x207d, 0x0060, 0x00fe, 0x7883,
 	0x4010, 0x7837, 0x4010, 0x7833, 0x0010, 0x2091, 0x5000, 0x2091,
 	0x4080, 0x0cf8, 0x00fe, 0x2029, 0x5600, 0x2031, 0xffff, 0x2039,
 	0x55dc, 0x2021, 0x0200, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9,
 	0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e,
 	0x2001, 0x0dc1, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000,
 	0x9086, 0x0000, 0x0120, 0x21a8, 0x4104, 0x8001, 0x1de0, 0x756e,
-	0x7672, 0x776a, 0x7476, 0x747a, 0x00e6, 0x2071, 0x1b4e, 0x2472,
+	0x7672, 0x776a, 0x7476, 0x747a, 0x00e6, 0x2071, 0x1b4d, 0x2472,
 	0x00ee, 0x20a1, 0x1ddc, 0x7170, 0x810d, 0x810d, 0x810d, 0x810d,
 	0x918c, 0x000f, 0x2001, 0x0001, 0x9112, 0x900e, 0x21a8, 0x4104,
 	0x8211, 0x1de0, 0x7170, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218,
 	0x20a8, 0x900e, 0x4104, 0x2009, 0x1800, 0x810d, 0x810d, 0x810d,
 	0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9,
 	0x0001, 0x20a1, 0x0800, 0x900e, 0x20a9, 0x0800, 0x4104, 0x8211,
-	0x1dd8, 0x080c, 0x0f52, 0x080c, 0x6037, 0x080c, 0xab83, 0x080c,
-	0x1109, 0x080c, 0x1328, 0x080c, 0x1bb0, 0x080c, 0x918d, 0x080c,
-	0x0d0f, 0x080c, 0x108e, 0x080c, 0x3474, 0x080c, 0x7801, 0x080c,
-	0x6a8f, 0x080c, 0x8905, 0x080c, 0x8569, 0x080c, 0x223f, 0x080c,
-	0x7ed6, 0x080c, 0x2089, 0x080c, 0x21c3, 0x080c, 0x2234, 0x2091,
+	0x1dd8, 0x080c, 0x0f52, 0x080c, 0x6032, 0x080c, 0xab75, 0x080c,
+	0x1109, 0x080c, 0x1333, 0x080c, 0x1bbd, 0x080c, 0x916f, 0x080c,
+	0x0d0f, 0x080c, 0x108e, 0x080c, 0x3468, 0x080c, 0x77e0, 0x080c,
+	0x6a8e, 0x080c, 0x88e7, 0x080c, 0x8548, 0x080c, 0x2258, 0x080c,
+	0x7eb5, 0x080c, 0x2096, 0x080c, 0x21d4, 0x080c, 0x224d, 0x2091,
 	0x3009, 0x7883, 0x0000, 0x1004, 0x0943, 0x7880, 0x9086, 0x0002,
 	0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833, 0x0010, 0x0e04,
 	0x0937, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x11d6, 0x2071, 0x1800, 0x7003, 0x0000, 0x780c,
+	0xd084, 0x190c, 0x11e1, 0x2071, 0x1800, 0x7003, 0x0000, 0x780c,
 	0x9084, 0x0030, 0x9086, 0x0000, 0x190c, 0x0d7d, 0x2071, 0x1800,
-	0x7000, 0x908e, 0x0003, 0x1168, 0x080c, 0x4bcc, 0x080c, 0x349b,
-	0x080c, 0x7869, 0x080c, 0x6fd7, 0x080c, 0x89e3, 0x080c, 0x8592,
+	0x7000, 0x908e, 0x0003, 0x1168, 0x080c, 0x4bce, 0x080c, 0x348f,
+	0x080c, 0x7848, 0x080c, 0x6fc6, 0x080c, 0x89c5, 0x080c, 0x8571,
 	0x0c68, 0x000b, 0x0c88, 0x096d, 0x096e, 0x0b09, 0x096b, 0x0bc3,
 	0x0d0e, 0x0d0e, 0x0d0e, 0x080c, 0x0d7d, 0x0005, 0x0126, 0x00f6,
 	0x2091, 0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0adc, 0x080c,
-	0x0ea5, 0x080c, 0x74e9, 0x0150, 0x080c, 0x750c, 0x15b0, 0x2079,
-	0x0100, 0x7828, 0x9085, 0x1800, 0x782a, 0x0478, 0x080c, 0x741a,
+	0x0ea5, 0x080c, 0x74c8, 0x0150, 0x080c, 0x74eb, 0x15b0, 0x2079,
+	0x0100, 0x7828, 0x9085, 0x1800, 0x782a, 0x0478, 0x080c, 0x73f9,
 	0x7000, 0x9086, 0x0001, 0x1904, 0x0adc, 0x7098, 0x9086, 0x0028,
-	0x1904, 0x0adc, 0x080c, 0x8561, 0x080c, 0x8553, 0x2001, 0x0161,
-	0x2003, 0x0001, 0x2079, 0x0100, 0x2011, 0xffff, 0x080c, 0x2a44,
-	0x7a28, 0x9295, 0x5e2c, 0x7a2a, 0x2011, 0x735f, 0x080c, 0x863e,
-	0x2011, 0x7352, 0x080c, 0x874a, 0x2011, 0x5e8e, 0x080c, 0x863e,
-	0x2011, 0x8030, 0x901e, 0x7396, 0x04d0, 0x080c, 0x573b, 0x2079,
-	0x0100, 0x7844, 0x9005, 0x1904, 0x0adc, 0x2011, 0x5e8e, 0x080c,
-	0x863e, 0x2011, 0x735f, 0x080c, 0x863e, 0x2011, 0x7352, 0x080c,
-	0x874a, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000, 0x7840,
-	0x9084, 0xfffb, 0x7842, 0x2001, 0x19a6, 0x2004, 0x9005, 0x1140,
-	0x00c6, 0x2061, 0x0100, 0x080c, 0x5fdf, 0x00ce, 0x0804, 0x0adc,
-	0x780f, 0x006b, 0x7a28, 0x080c, 0x74f1, 0x0118, 0x9295, 0x5e2c,
+	0x1904, 0x0adc, 0x080c, 0x8540, 0x080c, 0x8532, 0x2001, 0x0161,
+	0x2003, 0x0001, 0x2079, 0x0100, 0x2011, 0xffff, 0x080c, 0x2a63,
+	0x7a28, 0x9295, 0x5e2c, 0x7a2a, 0x2011, 0x733e, 0x080c, 0x861d,
+	0x2011, 0x7331, 0x080c, 0x8729, 0x2011, 0x5e89, 0x080c, 0x861d,
+	0x2011, 0x8030, 0x901e, 0x7396, 0x04d0, 0x080c, 0x5736, 0x2079,
+	0x0100, 0x7844, 0x9005, 0x1904, 0x0adc, 0x2011, 0x5e89, 0x080c,
+	0x861d, 0x2011, 0x733e, 0x080c, 0x861d, 0x2011, 0x7331, 0x080c,
+	0x8729, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000, 0x7840,
+	0x9084, 0xfffb, 0x7842, 0x2001, 0x19a5, 0x2004, 0x9005, 0x1140,
+	0x00c6, 0x2061, 0x0100, 0x080c, 0x5fda, 0x00ce, 0x0804, 0x0adc,
+	0x780f, 0x006b, 0x7a28, 0x080c, 0x74d0, 0x0118, 0x9295, 0x5e2c,
 	0x0010, 0x9295, 0x402c, 0x7a2a, 0x2011, 0x8010, 0x73d8, 0x2001,
-	0x19a7, 0x2003, 0x0001, 0x080c, 0x2916, 0x080c, 0x4b07, 0x7248,
+	0x19a6, 0x2003, 0x0001, 0x080c, 0x292f, 0x080c, 0x4b09, 0x7248,
 	0xc284, 0x724a, 0x2001, 0x180c, 0x200c, 0xc1ac, 0xc1cc, 0x2102,
-	0x2001, 0x0390, 0x2003, 0x0400, 0x080c, 0xa896, 0x080c, 0xa073,
-	0x2011, 0x0004, 0x080c, 0xc848, 0x080c, 0xa8b2, 0x080c, 0x6917,
-	0x080c, 0x74e9, 0x1120, 0x080c, 0x2971, 0x0600, 0x0420, 0x080c,
-	0x5fe6, 0x0140, 0x7097, 0x0001, 0x70d3, 0x0000, 0x080c, 0x5908,
-	0x0804, 0x0adc, 0x080c, 0x56da, 0xd094, 0x01a8, 0x2001, 0x0390,
+	0x2001, 0x0390, 0x2003, 0x0400, 0x080c, 0xa888, 0x080c, 0xa055,
+	0x2011, 0x0004, 0x080c, 0xc842, 0x080c, 0xa8a4, 0x080c, 0x6916,
+	0x080c, 0x74c8, 0x1120, 0x080c, 0x2990, 0x0600, 0x0420, 0x080c,
+	0x5fe1, 0x0140, 0x7097, 0x0001, 0x70d3, 0x0000, 0x080c, 0x5903,
+	0x0804, 0x0adc, 0x080c, 0x56d5, 0xd094, 0x01a8, 0x2001, 0x0390,
 	0x2003, 0x0404, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c,
-	0x56de, 0xd0d4, 0x1118, 0x080c, 0x2971, 0x1270, 0x2011, 0x180c,
-	0x2204, 0xc0bc, 0x00a8, 0x080c, 0x56de, 0xd0d4, 0x1db8, 0x2011,
+	0x56d9, 0xd0d4, 0x1118, 0x080c, 0x2990, 0x1270, 0x2011, 0x180c,
+	0x2204, 0xc0bc, 0x00a8, 0x080c, 0x56d9, 0xd0d4, 0x1db8, 0x2011,
 	0x180c, 0x2204, 0xc0bd, 0x0060, 0x2011, 0x180c, 0x2204, 0xc0bd,
-	0x2012, 0x080c, 0x6a63, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd,
-	0x2012, 0x080c, 0x6a29, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8,
-	0x707f, 0x0000, 0x080c, 0x74e9, 0x1130, 0x70b0, 0x9005, 0x1168,
-	0x080c, 0xcc9f, 0x0050, 0x080c, 0xcc9f, 0x70dc, 0xd09c, 0x1128,
-	0x70b0, 0x9005, 0x0110, 0x080c, 0x5fbc, 0x70e7, 0x0000, 0x70e3,
-	0x0000, 0x70a7, 0x0000, 0x080c, 0x2979, 0x0228, 0x2011, 0x0101,
-	0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x74e9, 0x1178, 0x9016,
-	0x0016, 0x080c, 0x2713, 0x2019, 0x196d, 0x211a, 0x001e, 0x705f,
-	0xffff, 0x7063, 0x00ef, 0x7083, 0x0000, 0x0020, 0x2019, 0x196d,
+	0x2012, 0x080c, 0x6a62, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd,
+	0x2012, 0x080c, 0x6a28, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8,
+	0x707f, 0x0000, 0x080c, 0x74c8, 0x1130, 0x70b0, 0x9005, 0x1168,
+	0x080c, 0xcc9e, 0x0050, 0x080c, 0xcc9e, 0x70dc, 0xd09c, 0x1128,
+	0x70b0, 0x9005, 0x0110, 0x080c, 0x5fb7, 0x70e7, 0x0000, 0x70e3,
+	0x0000, 0x70a7, 0x0000, 0x080c, 0x2998, 0x0228, 0x2011, 0x0101,
+	0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x74c8, 0x1178, 0x9016,
+	0x0016, 0x080c, 0x272c, 0x2019, 0x196c, 0x211a, 0x001e, 0x705f,
+	0xffff, 0x7063, 0x00ef, 0x7083, 0x0000, 0x0020, 0x2019, 0x196c,
 	0x201b, 0x0000, 0x2079, 0x1847, 0x7804, 0xd0ac, 0x0108, 0xc295,
-	0x72de, 0x080c, 0x74e9, 0x0118, 0x9296, 0x0004, 0x0518, 0x2011,
-	0x0001, 0x080c, 0xc848, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003,
-	0x0002, 0x00fe, 0x080c, 0x2fb2, 0x080c, 0xa896, 0x2011, 0x0005,
-	0x080c, 0xa1cf, 0x080c, 0xa8b2, 0x080c, 0x74e9, 0x0148, 0x00c6,
-	0x2061, 0x0100, 0x0016, 0x080c, 0x2713, 0x61e2, 0x001e, 0x00ce,
+	0x72de, 0x080c, 0x74c8, 0x0118, 0x9296, 0x0004, 0x0518, 0x2011,
+	0x0001, 0x080c, 0xc842, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003,
+	0x0002, 0x00fe, 0x080c, 0x2fc0, 0x080c, 0xa888, 0x2011, 0x0005,
+	0x080c, 0xa1b1, 0x080c, 0xa8a4, 0x080c, 0x74c8, 0x0148, 0x00c6,
+	0x2061, 0x0100, 0x0016, 0x080c, 0x272c, 0x61e2, 0x001e, 0x00ce,
 	0x012e, 0x00e0, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003, 0x0002,
-	0x080c, 0xa896, 0x2011, 0x0005, 0x080c, 0xa1cf, 0x080c, 0xa8b2,
-	0x080c, 0x74e9, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c,
-	0x2713, 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6,
-	0x00b6, 0x080c, 0x74e9, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9,
-	0x0782, 0x080c, 0x74e9, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e,
+	0x080c, 0xa888, 0x2011, 0x0005, 0x080c, 0xa1b1, 0x080c, 0xa8a4,
+	0x080c, 0x74c8, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c,
+	0x272c, 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6,
+	0x00b6, 0x080c, 0x74c8, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9,
+	0x0782, 0x080c, 0x74c8, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e,
 	0x86ff, 0x0138, 0x9180, 0x1000, 0x2004, 0x905d, 0x0110, 0xb800,
-	0xd0bc, 0x090c, 0x32fc, 0x8108, 0x1f04, 0x0af0, 0x707f, 0x0000,
+	0xd0bc, 0x090c, 0x32f8, 0x8108, 0x1f04, 0x0af0, 0x707f, 0x0000,
 	0x7080, 0x9084, 0x00ff, 0x7082, 0x70b3, 0x0000, 0x00be, 0x00ce,
 	0x0005, 0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002,
-	0x1904, 0x0bc0, 0x70ac, 0x9086, 0xffff, 0x0120, 0x080c, 0x2fb2,
+	0x1904, 0x0bc0, 0x70ac, 0x9086, 0xffff, 0x0120, 0x080c, 0x2fc0,
 	0x0804, 0x0bc0, 0x70dc, 0xd0ac, 0x1110, 0xd09c, 0x0538, 0xd084,
 	0x0528, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c,
-	0x01e8, 0x080c, 0x336d, 0x11b0, 0x70e0, 0x9086, 0xffff, 0x0190,
-	0x080c, 0x3147, 0x70dc, 0xd094, 0x1904, 0x0bc0, 0x2011, 0x0001,
-	0x080c, 0xcf52, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x3181,
+	0x01e8, 0x080c, 0x3361, 0x11b0, 0x70e0, 0x9086, 0xffff, 0x0190,
+	0x080c, 0x3155, 0x70dc, 0xd094, 0x1904, 0x0bc0, 0x2011, 0x0001,
+	0x080c, 0xcf51, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x318f,
 	0x0804, 0x0bc0, 0x70e4, 0x9005, 0x1904, 0x0bc0, 0x70a8, 0x9005,
 	0x1904, 0x0bc0, 0x70dc, 0xd0a4, 0x0118, 0xd0b4, 0x0904, 0x0bc0,
-	0x080c, 0x6a29, 0x1904, 0x0bc0, 0x080c, 0x6a7c, 0x1904, 0x0bc0,
-	0x080c, 0x6a63, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e,
-	0x0016, 0x080c, 0x6625, 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e,
+	0x080c, 0x6a28, 0x1904, 0x0bc0, 0x080c, 0x6a7b, 0x1904, 0x0bc0,
+	0x080c, 0x6a62, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e,
+	0x0016, 0x080c, 0x6620, 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e,
 	0x8108, 0x1f04, 0x0b60, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce,
 	0x015e, 0x0804, 0x0bc0, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b,
-	0x000e, 0x2011, 0x19b3, 0x080c, 0x0fc2, 0x2011, 0x19cd, 0x080c,
+	0x000e, 0x2011, 0x19b2, 0x080c, 0x0fc2, 0x2011, 0x19cc, 0x080c,
 	0x0fc2, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x70af, 0xffff,
-	0x080c, 0x0e79, 0x9006, 0x080c, 0x25a0, 0x080c, 0x336d, 0x0118,
-	0x080c, 0x4ca4, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021,
-	0x0006, 0x080c, 0x4cbe, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100,
-	0x080c, 0x750c, 0x0150, 0x080c, 0x74e9, 0x7828, 0x0118, 0x9084,
-	0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x080c, 0xa896,
-	0x2001, 0x19e8, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000,
-	0x080c, 0xa1cf, 0x2011, 0x0000, 0x080c, 0xa1d9, 0x080c, 0xa8b2,
+	0x080c, 0x0e79, 0x9006, 0x080c, 0x25b9, 0x080c, 0x3361, 0x0118,
+	0x080c, 0x4ca6, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021,
+	0x0006, 0x080c, 0x4cc0, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100,
+	0x080c, 0x74eb, 0x0150, 0x080c, 0x74c8, 0x7828, 0x0118, 0x9084,
+	0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x080c, 0xa888,
+	0x2001, 0x19e7, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000,
+	0x080c, 0xa1b1, 0x2011, 0x0000, 0x080c, 0xa1bb, 0x080c, 0xa8a4,
 	0x012e, 0x00be, 0x0005, 0x0016, 0x0026, 0x0046, 0x00f6, 0x0126,
 	0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, 0xfffd, 0x7906,
-	0x2009, 0x00f7, 0x080c, 0x5fa5, 0x7940, 0x918c, 0x0010, 0x7942,
-	0x7924, 0xd1b4, 0x0120, 0x2011, 0x0040, 0x080c, 0x2a44, 0xd19c,
-	0x0120, 0x2011, 0x0008, 0x080c, 0x2a44, 0x0006, 0x0036, 0x0156,
-	0x0000, 0x2001, 0x19a7, 0x2004, 0x9005, 0x1518, 0x080c, 0x29d8,
-	0x1148, 0x2001, 0x0001, 0x080c, 0x2945, 0x2001, 0x0001, 0x080c,
-	0x2928, 0x00b8, 0x080c, 0x29e0, 0x1138, 0x9006, 0x080c, 0x2945,
-	0x9006, 0x080c, 0x2928, 0x0068, 0x080c, 0x29e8, 0x1d50, 0x2001,
-	0x1998, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x273f, 0x0804,
-	0x0cc1, 0x080c, 0x2a67, 0x080c, 0x2aab, 0x20a9, 0x003a, 0x1d04,
-	0x0c17, 0x080c, 0x872a, 0x1f04, 0x0c17, 0x080c, 0x74fa, 0x0148,
-	0x080c, 0x750c, 0x1118, 0x080c, 0x77fc, 0x0050, 0x080c, 0x74f1,
-	0x0dd0, 0x080c, 0x77f7, 0x080c, 0x77ed, 0x080c, 0x741a, 0x0020,
-	0x2009, 0x00f8, 0x080c, 0x5fa5, 0x7850, 0xc0e5, 0x7852, 0x080c,
-	0x74e9, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678,
-	0x2019, 0xea60, 0x0d0c, 0x872a, 0x7820, 0xd09c, 0x15a0, 0x080c,
-	0x74e9, 0x0904, 0x0ca3, 0x7824, 0xd0ac, 0x1904, 0x0cc6, 0x080c,
-	0x750c, 0x1548, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e,
-	0x2011, 0x1800, 0x080c, 0x2a44, 0x080c, 0x29f0, 0x7824, 0x9084,
+	0x2009, 0x00f7, 0x080c, 0x5fa0, 0x7940, 0x918c, 0x0010, 0x7942,
+	0x7924, 0xd1b4, 0x0120, 0x2011, 0x0040, 0x080c, 0x2a63, 0xd19c,
+	0x0120, 0x2011, 0x0008, 0x080c, 0x2a63, 0x0006, 0x0036, 0x0156,
+	0x0000, 0x2001, 0x19a6, 0x2004, 0x9005, 0x1518, 0x080c, 0x29f7,
+	0x1148, 0x2001, 0x0001, 0x080c, 0x295e, 0x2001, 0x0001, 0x080c,
+	0x2941, 0x00b8, 0x080c, 0x29ff, 0x1138, 0x9006, 0x080c, 0x295e,
+	0x9006, 0x080c, 0x2941, 0x0068, 0x080c, 0x2a07, 0x1d50, 0x2001,
+	0x1997, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x2758, 0x0804,
+	0x0cc1, 0x080c, 0x2a86, 0x080c, 0x2ab9, 0x20a9, 0x003a, 0x1d04,
+	0x0c17, 0x080c, 0x8709, 0x1f04, 0x0c17, 0x080c, 0x74d9, 0x0148,
+	0x080c, 0x74eb, 0x1118, 0x080c, 0x77db, 0x0050, 0x080c, 0x74d0,
+	0x0dd0, 0x080c, 0x77d6, 0x080c, 0x77cc, 0x080c, 0x73f9, 0x0020,
+	0x2009, 0x00f8, 0x080c, 0x5fa0, 0x7850, 0xc0e5, 0x7852, 0x080c,
+	0x74c8, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678,
+	0x2019, 0xea60, 0x0d0c, 0x8709, 0x7820, 0xd09c, 0x15a0, 0x080c,
+	0x74c8, 0x0904, 0x0ca3, 0x7824, 0xd0ac, 0x1904, 0x0cc6, 0x080c,
+	0x74eb, 0x1548, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e,
+	0x2011, 0x1800, 0x080c, 0x2a63, 0x080c, 0x2a0f, 0x7824, 0x9084,
 	0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810, 0x2004,
 	0x9084, 0x9000, 0x0110, 0x080c, 0x0ce9, 0x8421, 0x1160, 0x1d04,
-	0x0c73, 0x080c, 0x872a, 0x080c, 0x77f7, 0x080c, 0x77ed, 0x7003,
+	0x0c73, 0x080c, 0x8709, 0x080c, 0x77d6, 0x080c, 0x77cc, 0x7003,
 	0x0001, 0x0804, 0x0cc6, 0x8319, 0x1928, 0x2001, 0x1810, 0x2004,
 	0x9084, 0x9000, 0x0110, 0x080c, 0x0ce9, 0x1d04, 0x0c89, 0x080c,
-	0x872a, 0x2009, 0x199b, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
-	0x1188, 0x200b, 0x000a, 0x2011, 0x0048, 0x080c, 0x2a44, 0x20a9,
-	0x0002, 0x080c, 0x29d1, 0x7924, 0x080c, 0x29f0, 0xd19c, 0x0110,
-	0x080c, 0x2916, 0x00f0, 0x080c, 0x74fa, 0x1140, 0x94a2, 0x03e8,
-	0x1128, 0x080c, 0x74bd, 0x7003, 0x0001, 0x00c0, 0x2011, 0x1800,
-	0x080c, 0x2a44, 0x080c, 0x29f0, 0x7824, 0x080c, 0x7503, 0x0110,
+	0x8709, 0x2009, 0x199a, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
+	0x1188, 0x200b, 0x000a, 0x2011, 0x0048, 0x080c, 0x2a63, 0x20a9,
+	0x0002, 0x080c, 0x29f0, 0x7924, 0x080c, 0x2a0f, 0xd19c, 0x0110,
+	0x080c, 0x292f, 0x00f0, 0x080c, 0x74d9, 0x1140, 0x94a2, 0x03e8,
+	0x1128, 0x080c, 0x749c, 0x7003, 0x0001, 0x00c0, 0x2011, 0x1800,
+	0x080c, 0x2a63, 0x080c, 0x2a0f, 0x7824, 0x080c, 0x74e2, 0x0110,
 	0xd0ac, 0x1160, 0x9084, 0x1800, 0x0904, 0x0c7b, 0x7003, 0x0001,
-	0x0028, 0x2001, 0x0001, 0x080c, 0x25a0, 0x00a0, 0x7850, 0xc0e4,
+	0x0028, 0x2001, 0x0001, 0x080c, 0x25b9, 0x00a0, 0x7850, 0xc0e4,
 	0x7852, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d,
-	0x0002, 0x7906, 0x2011, 0x0048, 0x080c, 0x2a44, 0x7828, 0x9085,
-	0x0028, 0x782a, 0x2001, 0x19a7, 0x2003, 0x0000, 0x9006, 0x78f2,
+	0x0002, 0x7906, 0x2011, 0x0048, 0x080c, 0x2a63, 0x7828, 0x9085,
+	0x0028, 0x782a, 0x2001, 0x19a6, 0x2003, 0x0000, 0x9006, 0x78f2,
 	0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, 0x002e, 0x001e,
 	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x0046, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0071, 0x0d0c, 0x872a, 0x015e,
+	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0071, 0x0d0c, 0x8709, 0x015e,
 	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x002e,
 	0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x189e, 0x7004, 0x9086,
-	0x0001, 0x1110, 0x080c, 0x349b, 0x00ee, 0x0005, 0x0005, 0x2a70,
-	0x2061, 0x19ab, 0x2063, 0x0003, 0x6007, 0x0002, 0x600b, 0x001c,
-	0x600f, 0x0137, 0x2001, 0x197c, 0x900e, 0x2102, 0x7196, 0x2001,
+	0x0001, 0x1110, 0x080c, 0x348f, 0x00ee, 0x0005, 0x0005, 0x2a70,
+	0x2061, 0x19aa, 0x2063, 0x0003, 0x6007, 0x0002, 0x600b, 0x001e,
+	0x600f, 0x0137, 0x2001, 0x197b, 0x900e, 0x2102, 0x7196, 0x2001,
 	0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705f, 0xffff, 0x0008,
-	0x715e, 0x7067, 0xffff, 0x717e, 0x7182, 0x080c, 0xcc9f, 0x70ef,
-	0x00c0, 0x2061, 0x196c, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
+	0x715e, 0x7067, 0xffff, 0x717e, 0x7182, 0x080c, 0xcc9e, 0x70ef,
+	0x00c0, 0x2061, 0x196b, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
 	0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x001f, 0x611a, 0x601f,
-	0x07d0, 0x2061, 0x1974, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f,
+	0x07d0, 0x2061, 0x1973, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f,
 	0x0200, 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061,
-	0x1989, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f,
-	0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x6625,
+	0x1988, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f,
+	0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x6620,
 	0x1178, 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4,
 	0xff00, 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210,
 	0x8108, 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000,
@@ -229,29 +229,29 @@
 	0x0d7f, 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000,
 	0x000e, 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e,
 	0x7886, 0x3900, 0x789a, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156,
-	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1b24, 0x7a08,
-	0x226a, 0x2069, 0x1b25, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
-	0x782c, 0x2019, 0x1b32, 0x201a, 0x2019, 0x1b35, 0x9016, 0x7808,
-	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1b4e,
+	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1b23, 0x7a08,
+	0x226a, 0x2069, 0x1b24, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
+	0x782c, 0x2019, 0x1b31, 0x201a, 0x2019, 0x1b34, 0x9016, 0x7808,
+	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1b4d,
 	0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019,
-	0x1b33, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
-	0x1a7a, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
+	0x1b32, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
+	0x1a79, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
 	0x8318, 0x1f04, 0x0dcc, 0x0491, 0x002e, 0x003e, 0x00de, 0x015e,
 	0x2079, 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x0180, 0x2001, 0x1a22, 0x2004, 0x9005, 0x0128,
+	0x2004, 0xd084, 0x0180, 0x2001, 0x1a21, 0x2004, 0x9005, 0x0128,
 	0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003,
-	0x0002, 0x2003, 0x1001, 0x080c, 0x56e9, 0x1170, 0x080c, 0x0f13,
-	0x0110, 0x080c, 0x0e66, 0x080c, 0x56e9, 0x1130, 0x2071, 0x1800,
+	0x0002, 0x2003, 0x1001, 0x080c, 0x56e4, 0x1170, 0x080c, 0x0f13,
+	0x0110, 0x080c, 0x0e66, 0x080c, 0x56e4, 0x1130, 0x2071, 0x1800,
 	0x2011, 0x8000, 0x080c, 0x0f27, 0x0c70, 0x0005, 0x2001, 0x0382,
 	0x2004, 0x9084, 0x0007, 0x9086, 0x0001, 0x1120, 0x2001, 0x0015,
-	0x080c, 0xa887, 0x2079, 0x0380, 0x2069, 0x1b04, 0x7818, 0x6802,
+	0x080c, 0xa879, 0x2079, 0x0380, 0x2069, 0x1b03, 0x7818, 0x6802,
 	0x781c, 0x6806, 0x7840, 0x680a, 0x7844, 0x680e, 0x782c, 0x6812,
-	0x2019, 0x1b0f, 0x9016, 0x7808, 0xd09c, 0x0150, 0x7820, 0x201a,
+	0x2019, 0x1b0e, 0x9016, 0x7808, 0xd09c, 0x0150, 0x7820, 0x201a,
 	0x8210, 0x8318, 0x8210, 0x9282, 0x0011, 0x0ea8, 0x2011, 0xdead,
 	0x6a2a, 0x7830, 0x681a, 0x7834, 0x681e, 0x7838, 0x6822, 0x783c,
-	0x6826, 0x7803, 0x0000, 0x2069, 0x1ac4, 0x901e, 0x20a9, 0x0020,
+	0x6826, 0x7803, 0x0000, 0x2069, 0x1ac3, 0x901e, 0x20a9, 0x0020,
 	0x7b26, 0x7828, 0x206a, 0x8d68, 0x8318, 0x1f04, 0x0e40, 0x2069,
-	0x1ae4, 0x2019, 0x00b0, 0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a,
+	0x1ae3, 0x2019, 0x00b0, 0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a,
 	0x8d68, 0x8318, 0x1f04, 0x0e4d, 0x0005, 0x918c, 0x03ff, 0x2001,
 	0x0003, 0x2004, 0x9084, 0x0600, 0x1118, 0x918d, 0x6c00, 0x0010,
 	0x918d, 0x6400, 0x2001, 0x017f, 0x2102, 0x0005, 0x0026, 0x0126,
@@ -266,7 +266,7 @@
 	0x0148, 0xd0a4, 0x1138, 0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080,
 	0x080c, 0x0f18, 0x002e, 0x0005, 0x0026, 0x70f3, 0x0000, 0x080c,
 	0x0f13, 0x1130, 0x2011, 0x8040, 0x080c, 0x0f27, 0x002e, 0x0005,
-	0x080c, 0x29e8, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2,
+	0x080c, 0x2a07, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2,
 	0x080c, 0x0f18, 0x002e, 0x0005, 0x00e6, 0x0016, 0x0006, 0x2071,
 	0x1800, 0xd0b4, 0x70ec, 0x71e8, 0x1118, 0xc0e4, 0xc1f4, 0x0050,
 	0x0006, 0x3b00, 0x9084, 0xff3e, 0x20d8, 0x000e, 0x70f3, 0x0000,
@@ -323,7 +323,7 @@
 	0x0016, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0xa862, 0x9184,
 	0xffc0, 0xa85e, 0x001e, 0x0020, 0x00e6, 0x0126, 0x2091, 0x8000,
 	0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000,
-	0x70c2, 0x080c, 0x8553, 0x012e, 0x00ee, 0x0005, 0x2071, 0x1800,
+	0x70c2, 0x080c, 0x8532, 0x012e, 0x00ee, 0x0005, 0x2071, 0x1800,
 	0x9026, 0x2009, 0x0000, 0x2049, 0x0400, 0x2900, 0x702e, 0x8940,
 	0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0440,
 	0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188d, 0x7000,
@@ -339,5007 +339,5005 @@
 	0x9982, 0x0440, 0x0278, 0x9982, 0x0558, 0x0288, 0x9982, 0x0800,
 	0x1270, 0x0040, 0x9982, 0x0800, 0x0250, 0x2071, 0x188d, 0x7010,
 	0x9902, 0x1228, 0x9085, 0x0001, 0x001e, 0x00ee, 0x0005, 0x9006,
-	0x0cd8, 0x00e6, 0x2071, 0x1a21, 0x7007, 0x0000, 0x9006, 0x701e,
+	0x0cd8, 0x00e6, 0x2071, 0x1a20, 0x7007, 0x0000, 0x9006, 0x701e,
 	0x7022, 0x7002, 0x2071, 0x0000, 0x7010, 0x9085, 0x8044, 0x7012,
-	0x2071, 0x0080, 0x9006, 0x20a9, 0x0040, 0x7022, 0x1f04, 0x111d,
-	0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6,
-	0xa06f, 0x0000, 0x2071, 0x1a21, 0x701c, 0x9088, 0x1a2b, 0x280a,
-	0x8000, 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, 0x090c, 0x0d7d,
-	0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x00a9, 0x00fe,
-	0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0x2071,
-	0x1a21, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x0021,
-	0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, 0x0000, 0x1110,
-	0x7007, 0x0006, 0x7000, 0x0002, 0x1166, 0x12e9, 0x1164, 0x1164,
-	0x12dd, 0x12dd, 0x12dd, 0x12dd, 0x080c, 0x0d7d, 0x701c, 0x7120,
-	0x9106, 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, 0xd1fc, 0x1110,
-	0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x1a2b, 0x2004, 0x700a,
-	0x2048, 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, 0x0026, 0xa88c,
-	0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898, 0x780e, 0xa878,
-	0x700e, 0xa870, 0x7016, 0xa874, 0x701a, 0xa868, 0x009e, 0xd084,
-	0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002, 0x00b1,
-	0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, 0x0040,
-	0x1210, 0x2110, 0x9006, 0x700e, 0x7212, 0x8203, 0x7812, 0x782b,
-	0x0020, 0x782b, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
-	0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018, 0x2098, 0x20e9,
-	0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c, 0x2011, 0x0040,
-	0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x22a8, 0x4006,
-	0x8203, 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, 0x782b, 0x0001,
-	0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x2009, 0x1a21,
-	0x2104, 0xc095, 0x200a, 0x080c, 0x1143, 0x0005, 0x0016, 0x00e6,
-	0x2071, 0x1a21, 0x00f6, 0x2079, 0x0080, 0x792c, 0xd1bc, 0x190c,
-	0x0d76, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c, 0x0700, 0x7004,
-	0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x1154, 0x11fc, 0x1230,
-	0x1308, 0x0d7d, 0x1323, 0x0d7d, 0x918c, 0x0700, 0x1550, 0x0136,
-	0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, 0x20a0, 0x20e1, 0x0000,
-	0x2099, 0x0088, 0x782b, 0x0040, 0x7010, 0x20a8, 0x4005, 0x3400,
-	0x701a, 0x015e, 0x014e, 0x013e, 0x700c, 0x9005, 0x0578, 0x7800,
-	0x7802, 0x7804, 0x7806, 0x080c, 0x1199, 0x0005, 0x7008, 0x0096,
-	0x2048, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, 0x080c, 0x1154,
-	0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x0ca0,
-	0x918c, 0x0700, 0x1150, 0x700c, 0x9005, 0x0180, 0x7800, 0x7802,
-	0x7804, 0x7806, 0x080c, 0x11ae, 0x0005, 0x7008, 0x0096, 0x2048,
-	0xa86f, 0x0200, 0x009e, 0x7007, 0x0000, 0x0080, 0x0096, 0x7008,
-	0x2048, 0x7800, 0xa88e, 0x7804, 0xa892, 0x7808, 0xa896, 0x780c,
-	0xa89a, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, 0x0096, 0x00d6,
-	0x7008, 0x2048, 0x2001, 0x18b9, 0x2004, 0x9906, 0x1128, 0xa89c,
-	0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, 0x009e, 0x0096, 0x00d6,
-	0x7008, 0x2048, 0x0081, 0x0150, 0xa89c, 0x0086, 0x2940, 0x080f,
-	0x008e, 0x00de, 0x009e, 0x080c, 0x1143, 0x0005, 0x00de, 0x009e,
-	0x080c, 0x1143, 0x0005, 0xa8a8, 0xd08c, 0x0005, 0x0096, 0xa0a0,
-	0x904d, 0x090c, 0x0d7d, 0xa06c, 0x908e, 0x0100, 0x0130, 0xa87b,
-	0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c, 0x6d74, 0xa09f,
-	0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c, 0x106c, 0x009e, 0x0005,
-	0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0d7d, 0xa06c, 0x908e, 0x0100,
-	0x0128, 0xa87b, 0x0001, 0xa883, 0x0000, 0x00c0, 0xa80c, 0x2050,
-	0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006, 0x8007,
-	0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xa076, 0xa172,
-	0xb000, 0xa07a, 0x2810, 0x080c, 0x1124, 0x00e8, 0xa97c, 0xa894,
-	0x0016, 0x0006, 0x080c, 0x6d74, 0x000e, 0x001e, 0xd1fc, 0x1138,
-	0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0xabed, 0x00ce, 0x7008,
-	0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000, 0x080c, 0x106c, 0x7007,
-	0x0000, 0x080c, 0x1143, 0x00ae, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094, 0x7002, 0x012e,
-	0x0005, 0x0096, 0x2001, 0x192e, 0x204c, 0xa87c, 0x7812, 0xa88c,
-	0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898, 0x780e, 0x782b,
-	0x0020, 0x0126, 0x2091, 0x8000, 0x782b, 0x0041, 0x7007, 0x0003,
-	0x7000, 0xc084, 0x7002, 0x2900, 0x700a, 0x012e, 0x009e, 0x0005,
-	0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x0096, 0x2001,
-	0x192e, 0x204c, 0xaa7c, 0x009e, 0x080c, 0x8c1b, 0x2009, 0x188c,
-	0x2104, 0x9084, 0xfffc, 0x200a, 0x080c, 0x8a8e, 0x7007, 0x0000,
-	0x080c, 0x1154, 0x0005, 0x7007, 0x0000, 0x080c, 0x1154, 0x0005,
-	0x0126, 0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a6b, 0x7003,
-	0x0000, 0x78bf, 0x00f6, 0x0041, 0x7807, 0x0007, 0x7803, 0x0000,
-	0x7803, 0x0001, 0x012e, 0x0005, 0x00c6, 0x7803, 0x0000, 0x2001,
-	0x0165, 0x2003, 0x4198, 0x7808, 0xd09c, 0x0118, 0x7820, 0x04e9,
-	0x0cd0, 0x2001, 0x1a6c, 0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac,
-	0xd0ac, 0x1de8, 0x78ab, 0x0002, 0x7807, 0x0007, 0x7827, 0x0030,
-	0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1a7a, 0x781f, 0xff00,
-	0x781b, 0xff00, 0x2001, 0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f,
-	0x0303, 0x2061, 0x1a7a, 0x602f, 0x1ddc, 0x2001, 0x181a, 0x2004,
-	0x9082, 0x1ddc, 0x6032, 0x603b, 0x1e55, 0x602b, 0x1aba, 0x6007,
-	0x1a9a, 0x2061, 0x1a9a, 0x60af, 0x193c, 0x2001, 0x1927, 0x2004,
-	0x60ba, 0x783f, 0x3374, 0x00ce, 0x0005, 0x9086, 0x000d, 0x11d0,
-	0x7808, 0xd09c, 0x01b8, 0x7820, 0x0026, 0x2010, 0x080c, 0xc826,
-	0x0180, 0x2260, 0x6000, 0x9086, 0x0004, 0x1158, 0x0016, 0x6120,
-	0x9186, 0x0009, 0x0108, 0x0020, 0x2009, 0x004c, 0x080c, 0xac8c,
-	0x001e, 0x002e, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908, 0x9184,
-	0x0070, 0x190c, 0x0d76, 0xd19c, 0x05a0, 0x7820, 0x908c, 0xf000,
-	0x0540, 0x2060, 0x6020, 0x9086, 0x0003, 0x1550, 0x6000, 0x9086,
-	0x0004, 0x1530, 0x6114, 0x2148, 0xa876, 0xa87a, 0xa867, 0x0103,
-	0x080c, 0x6b96, 0x00b6, 0x6010, 0x2058, 0xba3c, 0x8211, 0x0208,
-	0xba3e, 0xb8d0, 0x9005, 0x190c, 0x6750, 0x00be, 0x6044, 0xd0fc,
-	0x190c, 0xa8bf, 0x080c, 0xac16, 0x7808, 0xd09c, 0x19b0, 0x012e,
-	0x0005, 0x908a, 0x0024, 0x1a0c, 0x0d7d, 0x002b, 0x012e, 0x0005,
-	0x04b0, 0x012e, 0x0005, 0x1407, 0x142d, 0x145d, 0x1462, 0x1466,
-	0x146b, 0x1493, 0x1497, 0x14a5, 0x14a9, 0x1407, 0x1574, 0x1578,
-	0x15dd, 0x15e4, 0x1407, 0x15e5, 0x15e6, 0x15f1, 0x15f8, 0x1407,
-	0x1407, 0x1407, 0x1407, 0x1407, 0x1407, 0x1407, 0x146d, 0x1407,
-	0x1435, 0x145a, 0x1421, 0x1407, 0x1441, 0x140b, 0x1409, 0x080c,
-	0x0d7d, 0x080c, 0x0d76, 0x080c, 0x1603, 0x2009, 0x1a79, 0x2104,
-	0x8000, 0x200a, 0x080c, 0x7f99, 0x080c, 0x1ab5, 0x0005, 0x6044,
-	0xd0fc, 0x190c, 0xa8bf, 0x2009, 0x0055, 0x080c, 0xac8c, 0x012e,
-	0x0005, 0x080c, 0x1603, 0x2060, 0x6044, 0xd0fc, 0x190c, 0xa8bf,
-	0x2009, 0x0055, 0x080c, 0xac8c, 0x0005, 0x2009, 0x0048, 0x080c,
-	0x1603, 0x2060, 0x080c, 0xac8c, 0x0005, 0x2009, 0x0054, 0x080c,
-	0x1603, 0x2060, 0x6044, 0xd0fc, 0x190c, 0xa8bf, 0x080c, 0xac8c,
-	0x0005, 0x080c, 0x1603, 0x2060, 0x0056, 0x0066, 0x080c, 0x1603,
-	0x2028, 0x080c, 0x1603, 0x2030, 0x0036, 0x0046, 0x2021, 0x0000,
-	0x2418, 0x2009, 0x0056, 0x080c, 0xac8c, 0x004e, 0x003e, 0x006e,
-	0x005e, 0x0005, 0x080c, 0x1603, 0x0005, 0x7004, 0xc085, 0xc0b5,
-	0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, 0x1603,
-	0x080c, 0x16c7, 0x0005, 0x080c, 0x0d7d, 0x080c, 0x1603, 0x2060,
-	0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048,
-	0x080c, 0xac8c, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, 0x03e8,
-	0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001,
-	0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x1608, 0x2001, 0x0307,
-	0x2003, 0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005, 0x080c,
-	0x1603, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e,
-	0x2009, 0x0048, 0x080c, 0xac8c, 0x0005, 0x080c, 0x1603, 0x080c,
-	0x0d7d, 0x080c, 0x1603, 0x080c, 0x155f, 0x7827, 0x0018, 0x79ac,
-	0xd1dc, 0x0904, 0x1512, 0x7827, 0x0015, 0x7828, 0x782b, 0x0000,
-	0x9065, 0x0140, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
-	0x0804, 0x1518, 0x7004, 0x9005, 0x01c8, 0x1188, 0x78ab, 0x0004,
-	0x7827, 0x0018, 0x782b, 0x0000, 0xd1bc, 0x090c, 0x0d7d, 0x2001,
-	0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0804, 0x1544, 0x78ab,
-	0x0004, 0x7803, 0x0001, 0x080c, 0x1578, 0x0005, 0x7827, 0x0018,
-	0xa001, 0x7828, 0x7827, 0x0011, 0xa001, 0x7928, 0x9106, 0x0110,
-	0x79ac, 0x08e0, 0x00e6, 0x2071, 0x0200, 0x702c, 0xd0c4, 0x0140,
-	0x00ee, 0x080c, 0x1ab5, 0x080c, 0x133c, 0x7803, 0x0001, 0x0005,
-	0x7037, 0x0001, 0xa001, 0x7150, 0x00ee, 0x918c, 0xff00, 0x9186,
-	0x0500, 0x0110, 0x79ac, 0x0810, 0x7004, 0xc09d, 0x7006, 0x78ab,
-	0x0004, 0x7803, 0x0001, 0x080c, 0x1578, 0x2001, 0x020d, 0x2003,
-	0x0020, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c, 0x0d7d,
-	0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x0198, 0x080c,
-	0x7f99, 0x080c, 0x1ab5, 0x080c, 0xc838, 0x0158, 0xa9ac, 0xa936,
-	0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd,
-	0xa882, 0x0005, 0x6020, 0x9086, 0x0009, 0x1128, 0x2009, 0x004c,
-	0x080c, 0xac8c, 0x0048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x6024, 0x190c, 0xcc34, 0x2029, 0x00c8, 0x8529, 0x0128,
-	0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xe6da,
-	0xd5a4, 0x1118, 0x080c, 0x1608, 0x0005, 0x080c, 0x7f99, 0x080c,
-	0x1ab5, 0x0005, 0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016,
-	0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007,
-	0x9186, 0x0003, 0x0120, 0x2001, 0x0016, 0x080c, 0x1679, 0x00fe,
-	0x007e, 0x006e, 0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005,
-	0x7104, 0x9184, 0x0004, 0x190c, 0x0d7d, 0xd184, 0x1189, 0xd19c,
-	0x0158, 0xc19c, 0x7106, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003,
-	0x0020, 0x080c, 0x1608, 0x0005, 0x81ff, 0x190c, 0x0d7d, 0x0005,
-	0xc184, 0xd1b4, 0xc1b4, 0x7106, 0x0016, 0x00e6, 0x15f0, 0x2071,
-	0x0200, 0x080c, 0x16b4, 0x05c8, 0x6014, 0x9005, 0x05b0, 0x0096,
-	0x2048, 0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160,
-	0x908e, 0x0048, 0x1550, 0x601c, 0xd084, 0x11e0, 0x00f6, 0x2c78,
-	0x080c, 0x1731, 0x00fe, 0x00b0, 0x00f6, 0x2c78, 0x080c, 0x18b8,
-	0x00fe, 0x2009, 0x01f4, 0x8109, 0x0168, 0x2001, 0x0201, 0x2004,
-	0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1118, 0x080c,
-	0x1608, 0x0040, 0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x133c,
-	0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, 0x2001, 0x020d, 0x2003,
-	0x0050, 0x2003, 0x0020, 0x0461, 0x0ca8, 0x0429, 0x2060, 0x2009,
-	0x0053, 0x080c, 0xac8c, 0x0005, 0x0005, 0x0005, 0x00e1, 0x2008,
-	0x00d1, 0x0006, 0x7004, 0xc09d, 0x7006, 0x000e, 0x080c, 0x8f78,
-	0x0005, 0x0089, 0x9005, 0x0118, 0x080c, 0x8b7b, 0x0cd0, 0x0005,
-	0x2001, 0x0036, 0x2009, 0x1820, 0x210c, 0x2011, 0x181f, 0x2214,
-	0x080c, 0x1679, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005,
-	0x080c, 0x155f, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109,
-	0x0510, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000,
-	0x79bc, 0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182,
-	0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c,
-	0x810c, 0x080c, 0x166b, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9,
-	0x6827, 0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4,
-	0x1500, 0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0,
-	0x080c, 0x7f99, 0x080c, 0x1ab5, 0x0090, 0x7827, 0x0015, 0x782b,
-	0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, 0x2003,
-	0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, 0x00de,
-	0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, 0x7827,
-	0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, 0x1800,
-	0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, 0x0005,
-	0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041,
-	0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140,
-	0x0016, 0x0026, 0x00c6, 0x080c, 0x13a3, 0x00ce, 0x002e, 0x001e,
-	0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059,
-	0x1118, 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000,
-	0x2004, 0x080c, 0x0d7d, 0x2009, 0xff00, 0x8109, 0x0120, 0x7818,
-	0xd0bc, 0x1dd8, 0x0005, 0x9085, 0x0001, 0x0005, 0x7832, 0x7936,
-	0x7a3a, 0x781b, 0x8080, 0x0c79, 0x1108, 0x0005, 0x792c, 0x3900,
-	0x8000, 0x2004, 0x080c, 0x0d7d, 0x7037, 0x0001, 0x7150, 0x7037,
-	0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x918c,
-	0xff00, 0x9186, 0x0500, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6,
-	0x0016, 0x2071, 0x0200, 0x0c41, 0x6124, 0xd1dc, 0x01f8, 0x701c,
-	0xd08c, 0x0904, 0x1726, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004,
-	0xd0bc, 0x0904, 0x1726, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104,
-	0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x1726, 0x9c06, 0x15f0,
-	0x0126, 0x2091, 0x2600, 0x080c, 0x7ef1, 0x012e, 0x7358, 0x745c,
-	0x6014, 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x190c, 0xcc0f, 0xab42, 0xac3e, 0x2001, 0x1869,
-	0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837,
-	0xffff, 0x080c, 0x1e75, 0x1190, 0x080c, 0x1913, 0x2a00, 0xa816,
-	0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037,
-	0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050,
-	0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x1608, 0x0005, 0x080c,
-	0x0d7d, 0x2cf0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014,
-	0x2048, 0x2940, 0x903e, 0x2730, 0xa864, 0x2068, 0xa81a, 0x9d84,
-	0x000f, 0x9088, 0x1e55, 0x2165, 0x0002, 0x175c, 0x17ca, 0x175c,
-	0x175c, 0x1760, 0x17ab, 0x175c, 0x1780, 0x1755, 0x17c1, 0x175c,
-	0x175c, 0x1765, 0x18b6, 0x1794, 0x178a, 0xa964, 0x918c, 0x00ff,
-	0x918e, 0x0048, 0x0904, 0x17c1, 0x9085, 0x0001, 0x0804, 0x18ad,
-	0xa87c, 0xd0ac, 0x0dc8, 0x0804, 0x17d1, 0xa87c, 0xd0ac, 0x0da0,
-	0x0804, 0x183c, 0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0xaab2,
-	0xaa3e, 0xaa42, 0x3e00, 0x9080, 0x0008, 0x2004, 0x9080, 0x9141,
-	0x2005, 0x9005, 0x090c, 0x0d7d, 0x2004, 0xa8ae, 0x0804, 0x1895,
-	0xa87c, 0xd0bc, 0x09c8, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888,
-	0x0804, 0x17d1, 0xa87c, 0xd0bc, 0x0978, 0xa890, 0xa842, 0xa88c,
-	0xa83e, 0xa888, 0x0804, 0x183c, 0xa87c, 0xd0bc, 0x0928, 0xa890,
-	0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c, 0x0d7d, 0xa164,
-	0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1e55, 0x2065, 0xa888, 0xd19c,
-	0x1904, 0x183c, 0x0430, 0xa87c, 0xd0ac, 0x0904, 0x175c, 0xa804,
-	0x9045, 0x090c, 0x0d7d, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80,
-	0x1e55, 0x2065, 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x183c,
-	0x0080, 0xa87c, 0xd0ac, 0x0904, 0x175c, 0x9006, 0xa842, 0xa83e,
-	0x0804, 0x183c, 0xa87c, 0xd0ac, 0x0904, 0x175c, 0x9006, 0xa842,
-	0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b,
-	0x0002, 0x17f4, 0x17f4, 0x17f6, 0x17f4, 0x17f4, 0x17f4, 0x1800,
-	0x17f4, 0x17f4, 0x17f4, 0x180a, 0x17f4, 0x17f4, 0x17f4, 0x1814,
-	0x17f4, 0x17f4, 0x17f4, 0x181e, 0x17f4, 0x17f4, 0x17f4, 0x1828,
-	0x17f4, 0x17f4, 0x17f4, 0x1832, 0x080c, 0x0d7d, 0xa574, 0xa478,
-	0x9d86, 0x0024, 0x0904, 0x176a, 0xa37c, 0xa280, 0x0804, 0x1895,
-	0xa584, 0xa488, 0x9d86, 0x0024, 0x0904, 0x176a, 0xa38c, 0xa290,
-	0x0804, 0x1895, 0xa594, 0xa498, 0x9d86, 0x0024, 0x0904, 0x176a,
-	0xa39c, 0xa2a0, 0x0804, 0x1895, 0xa5a4, 0xa4a8, 0x9d86, 0x0024,
-	0x0904, 0x176a, 0xa3ac, 0xa2b0, 0x0804, 0x1895, 0xa5b4, 0xa4b8,
-	0x9d86, 0x0024, 0x0904, 0x176a, 0xa3bc, 0xa2c0, 0x0804, 0x1895,
-	0xa5c4, 0xa4c8, 0x9d86, 0x0024, 0x0904, 0x176a, 0xa3cc, 0xa2d0,
-	0x0804, 0x1895, 0xa5d4, 0xa4d8, 0x9d86, 0x0024, 0x0904, 0x176a,
-	0xa3dc, 0xa2e0, 0x0804, 0x1895, 0x2c05, 0x908a, 0x0034, 0x1a0c,
-	0x0d7d, 0x9082, 0x001b, 0x0002, 0x185f, 0x185d, 0x185d, 0x185d,
-	0x185d, 0x185d, 0x186a, 0x185d, 0x185d, 0x185d, 0x185d, 0x185d,
-	0x1875, 0x185d, 0x185d, 0x185d, 0x185d, 0x185d, 0x1880, 0x185d,
-	0x185d, 0x185d, 0x185d, 0x185d, 0x188b, 0x080c, 0x0d7d, 0xa56c,
-	0xa470, 0xa774, 0xa678, 0x9d86, 0x002c, 0x0904, 0x176a, 0xa37c,
-	0xa280, 0x0458, 0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86, 0x002c,
-	0x0904, 0x176a, 0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4,
-	0xa6a8, 0x9d86, 0x002c, 0x0904, 0x176a, 0xa3ac, 0xa2b0, 0x00a8,
-	0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0x9d86, 0x002c, 0x0904, 0x176a,
-	0xa3c4, 0xa2c8, 0x0050, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86,
-	0x002c, 0x0904, 0x176a, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e,
-	0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0,
-	0xa836, 0xaa3a, 0x8109, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085,
-	0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005,
-	0x2800, 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c78, 0x0804, 0x175c,
-	0x2ff0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048,
-	0x2940, 0xa80e, 0x2061, 0x1e50, 0xa813, 0x1e50, 0x2c05, 0xa80a,
-	0xa964, 0xa91a, 0xa87c, 0xd0ac, 0x090c, 0x0d7d, 0x9006, 0xa842,
-	0xa83e, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d7d, 0xadcc, 0xacd0,
-	0xafd4, 0xaed8, 0xabdc, 0xaae0, 0xab2e, 0xaa32, 0xad1e, 0xac22,
-	0xaf26, 0xae2a, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0xa988, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0008, 0x1120, 0x8109, 0xa916, 0x0128,
-	0x0078, 0x918a, 0x0002, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085,
-	0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005,
-	0xa804, 0x9045, 0x090c, 0x0d7d, 0xa80e, 0xa064, 0xa81a, 0x9084,
-	0x000f, 0x9080, 0x1e55, 0x2015, 0x82ff, 0x090c, 0x0d7d, 0xaa12,
-	0x2205, 0xa80a, 0x0c10, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190,
-	0x2d00, 0x0002, 0x1a3d, 0x196a, 0x196a, 0x1a3d, 0x196a, 0x1a37,
-	0x1a3d, 0x196a, 0x19da, 0x19da, 0x19da, 0x1a3d, 0x19da, 0x1a3d,
-	0x1a34, 0x19da, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20,
-	0xdd9c, 0x0904, 0x1a3f, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d7d,
-	0x9082, 0x001b, 0x0002, 0x1956, 0x1954, 0x1954, 0x1954, 0x1954,
-	0x1954, 0x195a, 0x1954, 0x1954, 0x1954, 0x1954, 0x1954, 0x195e,
-	0x1954, 0x1954, 0x1954, 0x1954, 0x1954, 0x1962, 0x1954, 0x1954,
-	0x1954, 0x1954, 0x1954, 0x1966, 0x080c, 0x0d7d, 0xa774, 0xa678,
-	0x0804, 0x1a3f, 0xa78c, 0xa690, 0x0804, 0x1a3f, 0xa7a4, 0xa6a8,
-	0x0804, 0x1a3f, 0xa7bc, 0xa6c0, 0x0804, 0x1a3f, 0xa7d4, 0xa6d8,
-	0x0804, 0x1a3f, 0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05,
-	0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1992,
-	0x1992, 0x1994, 0x1992, 0x1992, 0x1992, 0x199e, 0x1992, 0x1992,
-	0x1992, 0x19a8, 0x1992, 0x1992, 0x1992, 0x19b2, 0x1992, 0x1992,
-	0x1992, 0x19bc, 0x1992, 0x1992, 0x1992, 0x19c6, 0x1992, 0x1992,
-	0x1992, 0x19d0, 0x080c, 0x0d7d, 0xa574, 0xa478, 0x9d86, 0x0004,
-	0x0904, 0x1a3f, 0xa37c, 0xa280, 0x0804, 0x1a3f, 0xa584, 0xa488,
-	0x9d86, 0x0004, 0x0904, 0x1a3f, 0xa38c, 0xa290, 0x0804, 0x1a3f,
-	0xa594, 0xa498, 0x9d86, 0x0004, 0x0904, 0x1a3f, 0xa39c, 0xa2a0,
-	0x0804, 0x1a3f, 0xa5a4, 0xa4a8, 0x9d86, 0x0004, 0x0904, 0x1a3f,
-	0xa3ac, 0xa2b0, 0x0804, 0x1a3f, 0xa5b4, 0xa4b8, 0x9d86, 0x0004,
-	0x0904, 0x1a3f, 0xa3bc, 0xa2c0, 0x0804, 0x1a3f, 0xa5c4, 0xa4c8,
-	0x9d86, 0x0004, 0x0904, 0x1a3f, 0xa3cc, 0xa2d0, 0x0804, 0x1a3f,
-	0xa5d4, 0xa4d8, 0x9d86, 0x0004, 0x0904, 0x1a3f, 0xa3dc, 0xa2e0,
-	0x0804, 0x1a3f, 0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05,
-	0x908a, 0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1a02,
-	0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a0c, 0x1a00, 0x1a00,
-	0x1a00, 0x1a00, 0x1a00, 0x1a16, 0x1a00, 0x1a00, 0x1a00, 0x1a00,
-	0x1a00, 0x1a20, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a2a,
-	0x080c, 0x0d7d, 0xa56c, 0xa470, 0xa774, 0xa678, 0x9d86, 0x000c,
-	0x05b0, 0xa37c, 0xa280, 0x0498, 0xa584, 0xa488, 0xa78c, 0xa690,
-	0x9d86, 0x000c, 0x0560, 0xa394, 0xa298, 0x0448, 0xa59c, 0xa4a0,
-	0xa7a4, 0xa6a8, 0x9d86, 0x000c, 0x0510, 0xa3ac, 0xa2b0, 0x00f8,
-	0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0x9d86, 0x000c, 0x01c0, 0xa3c4,
-	0xa2c8, 0x00a8, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x000c,
-	0x0170, 0xa3dc, 0xa2e0, 0x0058, 0x9d86, 0x000e, 0x1130, 0x080c,
-	0x1e2b, 0x1904, 0x1913, 0x900e, 0x0050, 0x080c, 0x0d7d, 0xab2e,
-	0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0x080c, 0x1e2b, 0x0005,
-	0x6014, 0x2048, 0x6118, 0x810c, 0x810c, 0x810c, 0x81ff, 0x1118,
-	0xa887, 0x0001, 0x0008, 0xa986, 0x601b, 0x0002, 0xa974, 0xd1dc,
-	0x1108, 0x0005, 0xa934, 0xa88c, 0x9106, 0x1158, 0xa938, 0xa890,
-	0x9106, 0x1138, 0x601c, 0xc084, 0x601e, 0x2009, 0x0048, 0x0804,
-	0xac8c, 0x0005, 0x0126, 0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908,
-	0x918c, 0x0007, 0x9186, 0x0000, 0x05b0, 0x9186, 0x0003, 0x0598,
-	0x6020, 0x6023, 0x0000, 0x0006, 0x2031, 0x0008, 0x00c6, 0x781f,
-	0x0808, 0x7808, 0xd09c, 0x0120, 0x080c, 0x13a3, 0x8631, 0x1db8,
-	0x00ce, 0x781f, 0x0800, 0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c,
-	0x190c, 0x13a3, 0x00ce, 0x2001, 0x0038, 0x080c, 0x1b42, 0x7930,
-	0x9186, 0x0040, 0x0160, 0x9186, 0x0042, 0x190c, 0x0d7d, 0x2001,
-	0x001e, 0x8001, 0x1df0, 0x8631, 0x1d40, 0x080c, 0x1b51, 0x000e,
-	0x6022, 0x012e, 0x0005, 0x080c, 0x1b3e, 0x7827, 0x0015, 0x7828,
-	0x9c06, 0x1db8, 0x782b, 0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300,
-	0x7803, 0x0000, 0x78ab, 0x0004, 0x00fe, 0x080c, 0x74e9, 0x11b0,
-	0x2001, 0x0138, 0x2003, 0x0000, 0x2001, 0x0160, 0x2003, 0x0000,
-	0x2011, 0x012c, 0xa001, 0xa001, 0x8211, 0x1de0, 0x0081, 0x2001,
-	0x0386, 0x2003, 0x2020, 0x080c, 0x758a, 0x0005, 0x0479, 0x0039,
-	0x2001, 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0005, 0x00e6,
-	0x2071, 0x0200, 0x080c, 0x29fc, 0x2009, 0x003c, 0x080c, 0x21b0,
-	0x2001, 0x015d, 0x2003, 0x0000, 0x7000, 0x9084, 0x003c, 0x1de0,
-	0x080c, 0x8553, 0x70a0, 0x70a2, 0x7098, 0x709a, 0x709c, 0x709e,
-	0x2001, 0x020d, 0x2003, 0x0020, 0x00f6, 0x2079, 0x0300, 0x080c,
-	0x133c, 0x7803, 0x0001, 0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138,
-	0x2014, 0x2003, 0x0000, 0x2001, 0x0160, 0x202c, 0x2003, 0x0000,
-	0x080c, 0x74e9, 0x1108, 0x0005, 0x2021, 0x0260, 0x2001, 0x0141,
-	0x201c, 0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c, 0x939c, 0x0048,
-	0x1160, 0x2001, 0x0111, 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70,
-	0x2001, 0x015d, 0x2003, 0x0000, 0x0005, 0x0046, 0x2021, 0x0019,
-	0x2003, 0x0048, 0xa001, 0xa001, 0x201c, 0x939c, 0x0048, 0x0120,
-	0x8421, 0x1db0, 0x004e, 0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084,
-	0x601e, 0x0005, 0x2c08, 0x621c, 0x080c, 0x1679, 0x7930, 0x0005,
-	0x2c08, 0x621c, 0x080c, 0x16a6, 0x7930, 0x0005, 0x8001, 0x1df0,
-	0x0005, 0x2031, 0x0005, 0x781c, 0x9084, 0x0007, 0x0170, 0x2001,
-	0x0038, 0x0c41, 0x9186, 0x0040, 0x0904, 0x1baf, 0x2001, 0x001e,
-	0x0c69, 0x8631, 0x1d80, 0x080c, 0x0d7d, 0x781f, 0x0202, 0x2001,
-	0x015d, 0x2003, 0x0000, 0x2001, 0x0b10, 0x0c01, 0x781c, 0xd084,
-	0x0110, 0x0861, 0x04e0, 0x2001, 0x0030, 0x0891, 0x9186, 0x0040,
-	0x0568, 0x781c, 0xd084, 0x1da8, 0x781f, 0x0101, 0x2001, 0x0014,
-	0x0869, 0x2001, 0x0037, 0x0821, 0x9186, 0x0040, 0x0140, 0x2001,
-	0x0030, 0x080c, 0x1b48, 0x9186, 0x0040, 0x190c, 0x0d7d, 0x00d6,
-	0x2069, 0x0200, 0x692c, 0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c,
-	0x0130, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0080, 0x6908,
-	0x9184, 0x0007, 0x1db0, 0x00de, 0x781f, 0x0100, 0x791c, 0x9184,
-	0x0007, 0x090c, 0x0d7d, 0xa001, 0xa001, 0x781f, 0x0200, 0x0005,
-	0x0126, 0x2091, 0x2400, 0x2079, 0x0380, 0x2001, 0x19e7, 0x2070,
-	0x012e, 0x0005, 0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014,
-	0x2048, 0xa964, 0xa91a, 0x918c, 0x00ff, 0x9184, 0x000f, 0x0002,
-	0x1be4, 0x1be4, 0x1be4, 0x1be6, 0x1be4, 0x1be4, 0x1be4, 0x1be4,
-	0x1bd8, 0x1bee, 0x1be4, 0x1bea, 0x1be4, 0x1be4, 0x1be4, 0x1be4,
-	0x9086, 0x0008, 0x1148, 0xa87c, 0xd0b4, 0x0904, 0x1d5e, 0x2011,
-	0x1e50, 0x2205, 0xab88, 0x00a8, 0x080c, 0x0d7d, 0x9186, 0x0013,
-	0x0128, 0x0cd0, 0x9186, 0x001b, 0x0108, 0x0cb0, 0xa87c, 0xd0b4,
-	0x0904, 0x1d5e, 0x9184, 0x000f, 0x9080, 0x1e55, 0x2015, 0x2205,
-	0xab88, 0x2908, 0xa80a, 0xa90e, 0xaa12, 0xab16, 0x9006, 0xa842,
-	0xa83e, 0x012e, 0x0005, 0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60,
-	0x6014, 0x2048, 0xa88c, 0xa990, 0xaaac, 0xabb0, 0xaa36, 0xab3a,
-	0xa83e, 0xa942, 0xa846, 0xa94a, 0xa964, 0x918c, 0x00ff, 0x9186,
-	0x001e, 0x0198, 0x2940, 0xa064, 0xa81a, 0x90ec, 0x000f, 0x9d80,
-	0x1e55, 0x2065, 0x2c05, 0x2808, 0x2c10, 0xab88, 0xa80a, 0xa90e,
-	0xaa12, 0xab16, 0x012e, 0x3e60, 0x0005, 0xa804, 0x2040, 0x0c58,
-	0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa97c,
-	0x2950, 0xd1dc, 0x1904, 0x1d28, 0xc1dd, 0xa97e, 0x9006, 0xa842,
-	0xa83e, 0xa988, 0x8109, 0xa916, 0xa964, 0xa91a, 0x9184, 0x000f,
-	0x9088, 0x1e55, 0x2145, 0x0002, 0x1c5c, 0x1c6a, 0x1c5c, 0x1c5c,
-	0x1c5c, 0x1c5e, 0x1c5c, 0x1c5c, 0x1cbf, 0x1cbf, 0x1c5c, 0x1c5c,
-	0x1c5c, 0x1cbd, 0x1c5c, 0x1c5c, 0x080c, 0x0d7d, 0xa804, 0x2050,
-	0xb164, 0xa91a, 0x9184, 0x000f, 0x9080, 0x1e55, 0x2045, 0xd19c,
-	0x1904, 0x1cbf, 0x9036, 0x2638, 0x2805, 0x908a, 0x0036, 0x1a0c,
-	0x0d7d, 0x9082, 0x001b, 0x0002, 0x1c8f, 0x1c8f, 0x1c91, 0x1c8f,
-	0x1c8f, 0x1c8f, 0x1c97, 0x1c8f, 0x1c8f, 0x1c8f, 0x1c9d, 0x1c8f,
-	0x1c8f, 0x1c8f, 0x1ca3, 0x1c8f, 0x1c8f, 0x1c8f, 0x1ca9, 0x1c8f,
-	0x1c8f, 0x1c8f, 0x1caf, 0x1c8f, 0x1c8f, 0x1c8f, 0x1cb5, 0x080c,
-	0x0d7d, 0xb574, 0xb478, 0xb37c, 0xb280, 0x0804, 0x1d04, 0xb584,
-	0xb488, 0xb38c, 0xb290, 0x0804, 0x1d04, 0xb594, 0xb498, 0xb39c,
-	0xb2a0, 0x0804, 0x1d04, 0xb5a4, 0xb4a8, 0xb3ac, 0xb2b0, 0x0804,
-	0x1d04, 0xb5b4, 0xb4b8, 0xb3bc, 0xb2c0, 0x0804, 0x1d04, 0xb5c4,
-	0xb4c8, 0xb3cc, 0xb2d0, 0x0804, 0x1d04, 0xb5d4, 0xb4d8, 0xb3dc,
-	0xb2e0, 0x0804, 0x1d04, 0x0804, 0x1d04, 0x080c, 0x0d7d, 0x2805,
-	0x908a, 0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1ce2,
-	0x1ce0, 0x1ce0, 0x1ce0, 0x1ce0, 0x1ce0, 0x1ce9, 0x1ce0, 0x1ce0,
-	0x1ce0, 0x1ce0, 0x1ce0, 0x1cf0, 0x1ce0, 0x1ce0, 0x1ce0, 0x1ce0,
-	0x1ce0, 0x1cf7, 0x1ce0, 0x1ce0, 0x1ce0, 0x1ce0, 0x1ce0, 0x1cfe,
-	0x080c, 0x0d7d, 0xb56c, 0xb470, 0xb774, 0xb678, 0xb37c, 0xb280,
-	0x00d8, 0xb584, 0xb488, 0xb78c, 0xb690, 0xb394, 0xb298, 0x00a0,
-	0xb59c, 0xb4a0, 0xb7a4, 0xb6a8, 0xb3ac, 0xb2b0, 0x0068, 0xb5b4,
-	0xb4b8, 0xb7bc, 0xb6c0, 0xb3c4, 0xb2c8, 0x0030, 0xb5cc, 0xb4d0,
-	0xb7d4, 0xb6d8, 0xb3dc, 0xb2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22,
-	0xaf26, 0xae2a, 0xa988, 0x8109, 0xa916, 0x1118, 0x9006, 0x012e,
-	0x0005, 0x8840, 0x2805, 0x9005, 0x1168, 0xb004, 0x9005, 0x090c,
-	0x0d7d, 0x2050, 0xb164, 0xa91a, 0x9184, 0x000f, 0x9080, 0x1e55,
-	0x2045, 0x2805, 0x2810, 0x2a08, 0xa80a, 0xa90e, 0xaa12, 0x0c30,
-	0x3e60, 0x6344, 0xd3fc, 0x190c, 0x0d7d, 0xa93c, 0xaa40, 0xa844,
-	0x9106, 0x1118, 0xa848, 0x9206, 0x0508, 0x2958, 0xab48, 0xac44,
-	0x2940, 0x080c, 0x1e75, 0x1998, 0x2850, 0x2c40, 0xab14, 0xa880,
-	0xd0fc, 0x1140, 0xa810, 0x2005, 0xa80a, 0x2a00, 0xa80e, 0x2009,
-	0x8015, 0x0070, 0x00c6, 0x3e60, 0x6044, 0xc0a4, 0x9085, 0x8005,
-	0x6046, 0x00ce, 0x8319, 0xab16, 0x1904, 0x1d11, 0x2009, 0x8005,
-	0x3e60, 0x6044, 0x9105, 0x6046, 0x0804, 0x1d0e, 0x080c, 0x0d7d,
-	0x00f6, 0x00e6, 0x0096, 0x00c6, 0x0026, 0x704c, 0x9c06, 0x190c,
-	0x0d7d, 0x2079, 0x0090, 0x2001, 0x0105, 0x2003, 0x0010, 0x782b,
-	0x0004, 0x7057, 0x0000, 0x6014, 0x2048, 0x080c, 0xc838, 0x0118,
-	0xa880, 0xc0bd, 0xa882, 0x6020, 0x9086, 0x0006, 0x1170, 0x2061,
-	0x0100, 0x62c8, 0x2001, 0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206,
-	0x1dc0, 0x60c4, 0xa89a, 0x60c8, 0xa896, 0x704c, 0x2060, 0x00c6,
-	0x080c, 0xc443, 0x080c, 0xa896, 0x00ce, 0x704c, 0x9c06, 0x1150,
-	0x2009, 0x0040, 0x080c, 0x21b0, 0x080c, 0xa34e, 0x2011, 0x0000,
-	0x080c, 0xa1d9, 0x002e, 0x00ce, 0x009e, 0x00ee, 0x00fe, 0x0005,
-	0x00f6, 0x2079, 0x0090, 0x781c, 0x0006, 0x7818, 0x0006, 0x2079,
-	0x0100, 0x7a14, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x2019,
-	0x1000, 0x8319, 0x090c, 0x0d7d, 0x7820, 0xd0bc, 0x1dd0, 0x79c8,
-	0x000e, 0x9102, 0x001e, 0x0006, 0x0016, 0x79c4, 0x000e, 0x9103,
-	0x78c6, 0x000e, 0x78ca, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816,
-	0x2079, 0x0090, 0x782b, 0x0008, 0x7057, 0x0000, 0x00fe, 0x0005,
-	0x00f6, 0x00e6, 0x2071, 0x19e7, 0x7054, 0x9086, 0x0000, 0x0904,
-	0x1e26, 0x2079, 0x0090, 0x2009, 0x0207, 0x210c, 0xd194, 0x01b8,
-	0x2009, 0x020c, 0x210c, 0x9184, 0x0003, 0x0188, 0x080c, 0xe723,
-	0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0d7d, 0x0016, 0x2009,
-	0x0040, 0x080c, 0x21b0, 0x001e, 0x2001, 0x020c, 0x2102, 0x2009,
-	0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009,
-	0x0040, 0x080c, 0x21b0, 0x782c, 0xd0fc, 0x09a8, 0x080c, 0xa8b2,
-	0x782c, 0xd0fc, 0x1de8, 0x080c, 0xa896, 0x7054, 0x9086, 0x0000,
-	0x1950, 0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040,
-	0x080c, 0x21b0, 0x782b, 0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe,
-	0x0005, 0x080c, 0x0d7d, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51,
-	0x0005, 0xa004, 0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084,
-	0x000f, 0x9080, 0x1e55, 0x2065, 0x8cff, 0x090c, 0x0d7d, 0x8a51,
-	0x0005, 0x2050, 0x0005, 0x0000, 0x001d, 0x0021, 0x0025, 0x0029,
-	0x002d, 0x0031, 0x0035, 0x0000, 0x001b, 0x0021, 0x0027, 0x002d,
-	0x0033, 0x0000, 0x0000, 0x0023, 0x0000, 0x0000, 0x1e48, 0x1e44,
-	0x1e48, 0x1e48, 0x1e52, 0x0000, 0x1e48, 0x1e4f, 0x1e4f, 0x1e4c,
-	0x1e4f, 0x1e4f, 0x0000, 0x1e52, 0x1e4f, 0x0000, 0x1e4a, 0x1e4a,
-	0x0000, 0x1e4a, 0x1e52, 0x0000, 0x1e4a, 0x1e50, 0x1e50, 0x1e50,
-	0x0000, 0x1e50, 0x0000, 0x1e52, 0x1e50, 0x00c6, 0x00d6, 0x0086,
-	0xab42, 0xac3e, 0xa888, 0x9055, 0x0904, 0x2054, 0x2940, 0xa064,
-	0x90ec, 0x000f, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1118, 0x2061,
-	0x1e50, 0x00d0, 0x9de0, 0x1e55, 0x9d86, 0x0007, 0x0130, 0x9d86,
-	0x000e, 0x0118, 0x9d86, 0x000f, 0x1120, 0xa08c, 0x9422, 0xa090,
-	0x931b, 0x2c05, 0x9065, 0x1140, 0x0310, 0x0804, 0x2054, 0xa004,
-	0x9045, 0x0904, 0x2054, 0x08d8, 0x2c05, 0x9005, 0x0904, 0x1f3c,
-	0xdd9c, 0x1904, 0x1ef8, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082,
-	0x001b, 0x0002, 0x1ecd, 0x1ecd, 0x1ecf, 0x1ecd, 0x1ecd, 0x1ecd,
-	0x1ed5, 0x1ecd, 0x1ecd, 0x1ecd, 0x1edb, 0x1ecd, 0x1ecd, 0x1ecd,
-	0x1ee1, 0x1ecd, 0x1ecd, 0x1ecd, 0x1ee7, 0x1ecd, 0x1ecd, 0x1ecd,
-	0x1eed, 0x1ecd, 0x1ecd, 0x1ecd, 0x1ef3, 0x080c, 0x0d7d, 0xa07c,
-	0x9422, 0xa080, 0x931b, 0x0804, 0x1f32, 0xa08c, 0x9422, 0xa090,
-	0x931b, 0x0804, 0x1f32, 0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804,
-	0x1f32, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0804, 0x1f32, 0xa0bc,
-	0x9422, 0xa0c0, 0x931b, 0x0804, 0x1f32, 0xa0cc, 0x9422, 0xa0d0,
-	0x931b, 0x0804, 0x1f32, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0,
-	0x908a, 0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1f1a,
-	0x1f18, 0x1f18, 0x1f18, 0x1f18, 0x1f18, 0x1f1f, 0x1f18, 0x1f18,
-	0x1f18, 0x1f18, 0x1f18, 0x1f24, 0x1f18, 0x1f18, 0x1f18, 0x1f18,
-	0x1f18, 0x1f29, 0x1f18, 0x1f18, 0x1f18, 0x1f18, 0x1f18, 0x1f2e,
-	0x080c, 0x0d7d, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0098, 0xa094,
-	0x9422, 0xa098, 0x931b, 0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b,
-	0x0048, 0xa0c4, 0x9422, 0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422,
-	0xa0e0, 0x931b, 0x0630, 0x2300, 0x9405, 0x0160, 0x8a51, 0x0904,
-	0x2054, 0x8c60, 0x0804, 0x1ea4, 0xa004, 0x9045, 0x0904, 0x2054,
-	0x0804, 0x1e7f, 0x8a51, 0x0904, 0x2054, 0x8c60, 0x2c05, 0x9005,
-	0x1158, 0xa004, 0x9045, 0x0904, 0x2054, 0xa064, 0x90ec, 0x000f,
-	0x9de0, 0x1e55, 0x2c05, 0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804,
-	0x2049, 0x2c05, 0x8422, 0x8420, 0x831a, 0x9399, 0x0000, 0xac2e,
-	0xab32, 0xdd9c, 0x1904, 0x1fe6, 0x9082, 0x001b, 0x0002, 0x1f82,
-	0x1f82, 0x1f84, 0x1f82, 0x1f82, 0x1f82, 0x1f92, 0x1f82, 0x1f82,
-	0x1f82, 0x1fa0, 0x1f82, 0x1f82, 0x1f82, 0x1fae, 0x1f82, 0x1f82,
-	0x1f82, 0x1fbc, 0x1f82, 0x1f82, 0x1f82, 0x1fca, 0x1f82, 0x1f82,
-	0x1f82, 0x1fd8, 0x080c, 0x0d7d, 0xa17c, 0x2400, 0x9122, 0xa180,
-	0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa074, 0x9420, 0xa078, 0x9319,
-	0x0804, 0x2044, 0xa18c, 0x2400, 0x9122, 0xa190, 0x2300, 0x911b,
-	0x0a0c, 0x0d7d, 0xa084, 0x9420, 0xa088, 0x9319, 0x0804, 0x2044,
-	0xa19c, 0x2400, 0x9122, 0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0d7d,
-	0xa094, 0x9420, 0xa098, 0x9319, 0x0804, 0x2044, 0xa1ac, 0x2400,
-	0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0a4, 0x9420,
-	0xa0a8, 0x9319, 0x0804, 0x2044, 0xa1bc, 0x2400, 0x9122, 0xa1c0,
-	0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0b4, 0x9420, 0xa0b8, 0x9319,
-	0x0804, 0x2044, 0xa1cc, 0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b,
-	0x0a0c, 0x0d7d, 0xa0c4, 0x9420, 0xa0c8, 0x9319, 0x0804, 0x2044,
-	0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d7d,
-	0xa0d4, 0x9420, 0xa0d8, 0x9319, 0x0804, 0x2044, 0x9082, 0x001b,
-	0x0002, 0x2004, 0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0x2011,
-	0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0x201e, 0x2002, 0x2002,
-	0x2002, 0x2002, 0x2002, 0x202b, 0x2002, 0x2002, 0x2002, 0x2002,
-	0x2002, 0x2038, 0x080c, 0x0d7d, 0xa17c, 0x2400, 0x9122, 0xa180,
-	0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa06c, 0x9420, 0xa070, 0x9319,
-	0x0498, 0xa194, 0x2400, 0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c,
-	0x0d7d, 0xa084, 0x9420, 0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400,
-	0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa09c, 0x9420,
-	0xa0a0, 0x9319, 0x00c8, 0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300,
-	0x911b, 0x0a0c, 0x0d7d, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060,
-	0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d7d,
-	0xa0cc, 0x9420, 0xa0d0, 0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd,
-	0xa882, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e,
-	0x000e, 0x000e, 0x9006, 0x0028, 0x008e, 0x00de, 0x00ce, 0x9085,
-	0x0001, 0x0005, 0x00c6, 0x610c, 0x0016, 0x9026, 0x2410, 0x6004,
-	0x9420, 0x9291, 0x0000, 0x2c04, 0x9210, 0x9ce0, 0x0002, 0x918a,
-	0x0002, 0x1da8, 0x9284, 0x000f, 0x9405, 0x001e, 0x00ce, 0x0005,
-	0x7803, 0x0003, 0x780f, 0x0000, 0x6004, 0x7812, 0x2c04, 0x7816,
-	0x9ce0, 0x0002, 0x918a, 0x0002, 0x1db8, 0x0005, 0x2001, 0x0005,
-	0x2004, 0xd0bc, 0x190c, 0x0d76, 0xd094, 0x0110, 0x080c, 0x11de,
-	0x0005, 0x0126, 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260,
-	0x2069, 0x1800, 0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406,
-	0x789f, 0x0410, 0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002,
-	0x783b, 0x001f, 0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005,
-	0x2091, 0x2600, 0x781c, 0xd0a4, 0x190c, 0x21ad, 0x7900, 0xd1dc,
-	0x1118, 0x9084, 0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x20cf,
-	0x20c7, 0x7ef1, 0x20c7, 0x20c9, 0x20c9, 0x20c9, 0x20c9, 0x7ed7,
-	0x20c7, 0x20cb, 0x20c7, 0x20c9, 0x20c7, 0x20c9, 0x20c7, 0x080c,
-	0x0d7d, 0x0031, 0x0020, 0x080c, 0x7ed7, 0x080c, 0x7ef1, 0x0005,
-	0x0006, 0x0016, 0x0026, 0x080c, 0xe723, 0x7930, 0x9184, 0x0003,
-	0x01f0, 0x080c, 0xa896, 0x2001, 0x19fa, 0x2004, 0x9005, 0x0180,
-	0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0d7d, 0x00c6, 0x2001,
-	0x19fa, 0x2064, 0x080c, 0xa8b2, 0x080c, 0xc443, 0x00ce, 0x0408,
-	0x2009, 0x0040, 0x080c, 0x21b0, 0x080c, 0xa8b2, 0x00d0, 0x9184,
-	0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160, 0x080c, 0x74e9,
-	0x1138, 0x080c, 0x77ed, 0x080c, 0x6029, 0x080c, 0x741a, 0x0010,
-	0x080c, 0x5ee4, 0x080c, 0x7f8f, 0x0041, 0x0018, 0x9184, 0x9540,
-	0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x0036, 0x0046,
-	0x0056, 0x2071, 0x1a6b, 0x080c, 0x1ab5, 0x005e, 0x004e, 0x003e,
-	0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071, 0x1800, 0x7128,
-	0x2001, 0x196f, 0x2102, 0x2001, 0x1977, 0x2102, 0x2001, 0x013b,
-	0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e, 0x78a3, 0x0200,
-	0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398, 0x0005, 0x2320,
-	0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423, 0x8423, 0x8423,
-	0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007, 0x8403, 0x8003,
-	0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc, 0x1238, 0x2011,
-	0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0, 0x9182, 0x034c,
-	0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420, 0x0098, 0x9182,
-	0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423, 0x0058, 0x9182,
-	0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420, 0x0018, 0x2011,
-	0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020, 0x8301, 0x9402,
-	0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405, 0x789a, 0x012e,
-	0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814, 0x9084, 0xffc0,
-	0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6, 0x2069, 0x0200,
-	0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4, 0x6812, 0x00de,
-	0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810, 0x9084, 0xfff8,
-	0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938, 0x080c, 0x0d76,
-	0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001,
-	0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001,
-	0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061, 0x0100,
-	0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x29f6, 0x080c, 0x2916,
-	0x080c, 0x2a67, 0x9006, 0x080c, 0x2945, 0x9006, 0x080c, 0x2928,
-	0x20a9, 0x0012, 0x1d04, 0x21da, 0x2091, 0x6000, 0x1f04, 0x21da,
-	0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084,
-	0xdfff, 0x6052, 0x6224, 0x080c, 0x2a44, 0x080c, 0x2634, 0x2009,
-	0x00ef, 0x6132, 0x6136, 0x080c, 0x2644, 0x60e7, 0x0000, 0x61ea,
-	0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, 0x0080,
-	0x602f, 0x0000, 0x6007, 0x349f, 0x00c6, 0x2061, 0x0140, 0x608b,
-	0x000b, 0x608f, 0x10b8, 0x6093, 0x0000, 0x6097, 0x0198, 0x00ce,
-	0x6004, 0x9085, 0x8000, 0x6006, 0x60bb, 0x0000, 0x20a9, 0x0018,
-	0x60bf, 0x0000, 0x1f04, 0x2218, 0x60bb, 0x0000, 0x60bf, 0x0108,
-	0x60bf, 0x0012, 0x60bf, 0x0405, 0x60bf, 0x0014, 0x60bf, 0x0320,
-	0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b,
-	0x602b, 0x402c, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3,
-	0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001,
-	0x1835, 0x2003, 0x0000, 0x2001, 0x1834, 0x2003, 0x0001, 0x0005,
-	0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x6028,
-	0x910c, 0x0066, 0x2031, 0x1837, 0x2634, 0x96b4, 0x0028, 0x006e,
-	0x1138, 0x6020, 0xd1bc, 0x0120, 0xd0bc, 0x1168, 0xd0b4, 0x1198,
-	0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, 0x00aa, 0x9195, 0x0004,
-	0x9284, 0x0007, 0x0082, 0x0016, 0x2001, 0x0387, 0x200c, 0xd1a4,
-	0x001e, 0x0d70, 0x0c98, 0x0016, 0x2001, 0x0387, 0x200c, 0xd1b4,
-	0x001e, 0x0d30, 0x0c58, 0x2286, 0x2283, 0x2283, 0x2283, 0x2285,
-	0x2283, 0x2283, 0x2283, 0x080c, 0x0d7d, 0x0029, 0x002e, 0x001e,
-	0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c, 0x0118,
-	0xd19c, 0x1904, 0x2500, 0xd1f4, 0x190c, 0x0d76, 0x080c, 0x74e9,
-	0x0904, 0x22e3, 0x080c, 0xcf52, 0x1120, 0x7000, 0x9086, 0x0003,
-	0x0580, 0x6024, 0x9084, 0x1800, 0x0560, 0x080c, 0x750c, 0x0118,
-	0x080c, 0x74fa, 0x1530, 0x2011, 0x0020, 0x080c, 0x2a44, 0x6043,
-	0x0000, 0x080c, 0xcf52, 0x0168, 0x080c, 0x750c, 0x1150, 0x2001,
-	0x19a7, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x735f, 0x0804,
-	0x2503, 0x70a4, 0x9005, 0x1150, 0x70a7, 0x0001, 0x00d6, 0x2069,
-	0x0140, 0x080c, 0x7540, 0x00de, 0x1904, 0x2503, 0x080c, 0x77f7,
-	0x0428, 0x080c, 0x750c, 0x1590, 0x6024, 0x9084, 0x1800, 0x1108,
-	0x0468, 0x080c, 0x77f7, 0x080c, 0x77ed, 0x080c, 0x6029, 0x080c,
-	0x741a, 0x0804, 0x2500, 0xd1ac, 0x1508, 0x6024, 0xd0dc, 0x1170,
-	0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7098, 0x9086,
-	0x0028, 0x1110, 0x080c, 0x76ce, 0x0804, 0x2500, 0x080c, 0x77f2,
-	0x0048, 0x2001, 0x197d, 0x2003, 0x0002, 0x0020, 0x080c, 0x762b,
-	0x0804, 0x2500, 0x080c, 0x7771, 0x0804, 0x2500, 0x6220, 0xd1bc,
-	0x0138, 0xd2bc, 0x1904, 0x2565, 0xd2b4, 0x1904, 0x2577, 0x0000,
-	0xd1ac, 0x0904, 0x240d, 0x0036, 0x6328, 0xc3bc, 0x632a, 0x003e,
-	0x080c, 0x74e9, 0x11d0, 0x2011, 0x0020, 0x080c, 0x2a44, 0x0006,
-	0x0026, 0x0036, 0x080c, 0x7503, 0x1158, 0x080c, 0x77ed, 0x080c,
-	0x6029, 0x080c, 0x741a, 0x003e, 0x002e, 0x000e, 0x00ae, 0x0005,
-	0x003e, 0x002e, 0x000e, 0x080c, 0x74bd, 0x0016, 0x0046, 0x00c6,
-	0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, 0x6043,
-	0x0090, 0x6043, 0x0010, 0x74da, 0x948c, 0xff00, 0x7038, 0xd084,
-	0x0178, 0x9186, 0xf800, 0x1160, 0x7048, 0xd084, 0x1148, 0xc085,
-	0x704a, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x4b07, 0x003e,
-	0x080c, 0xcf4b, 0x1904, 0x23e4, 0x9196, 0xff00, 0x05a8, 0x7060,
-	0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568, 0x7130,
-	0xd184, 0x1550, 0x080c, 0x3368, 0x0128, 0xc18d, 0x7132, 0x080c,
-	0x6a63, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248, 0x9294,
-	0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904, 0x23e4,
-	0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904,
-	0x23e4, 0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011, 0x8013, 0x080c,
-	0x4b07, 0x003e, 0x0804, 0x23e4, 0x7038, 0xd08c, 0x1140, 0x2001,
-	0x180c, 0x200c, 0xd1ac, 0x1904, 0x23e4, 0xc1ad, 0x2102, 0x0036,
-	0x73d8, 0x2011, 0x8013, 0x080c, 0x4b07, 0x003e, 0x7130, 0xc185,
-	0x7132, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x01f0, 0x0016, 0x2009,
-	0x0001, 0x2011, 0x0100, 0x080c, 0x88ec, 0x2019, 0x000e, 0x00c6,
-	0x2061, 0x0000, 0x080c, 0xe239, 0x00ce, 0x9484, 0x00ff, 0x9080,
-	0x3374, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006, 0x2009,
-	0x000e, 0x080c, 0xe2c9, 0x001e, 0x0016, 0x2009, 0x0002, 0x2019,
-	0x0004, 0x080c, 0x31a6, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9,
-	0x007f, 0x900e, 0x080c, 0x6625, 0x1110, 0x080c, 0x6043, 0x8108,
-	0x1f04, 0x23da, 0x00be, 0x015e, 0x00ce, 0x004e, 0x080c, 0xa896,
-	0x080c, 0xab5e, 0x080c, 0xa8b2, 0x60e3, 0x0000, 0x001e, 0x2001,
-	0x1800, 0x2014, 0x9296, 0x0004, 0x1170, 0xd19c, 0x11b0, 0x2011,
-	0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, 0x9295, 0x0002, 0x6206,
-	0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001, 0x1826, 0x2003,
-	0x0000, 0x2011, 0x0020, 0x080c, 0x2a44, 0xd194, 0x0904, 0x2500,
-	0x0016, 0x080c, 0xa896, 0x6220, 0xd2b4, 0x0904, 0x249b, 0x080c,
-	0x86f6, 0x080c, 0x9e32, 0x2011, 0x0004, 0x080c, 0x2a44, 0x00f6,
-	0x2019, 0x19f3, 0x2304, 0x907d, 0x0904, 0x2468, 0x7804, 0x9086,
-	0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069, 0x0140,
-	0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002, 0x2001, 0x0003,
-	0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c, 0x8001, 0x1df0,
-	0x080c, 0x2a1a, 0x2001, 0x001e, 0x8001, 0x0240, 0x20a9, 0x0009,
-	0x080c, 0x29d1, 0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001, 0x0100,
-	0x080c, 0x2a0a, 0x9006, 0x080c, 0x2a0a, 0x080c, 0x95de, 0x080c,
-	0xa8b2, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60, 0x080c, 0xabed,
-	0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae, 0x0005,
-	0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110,
-	0x080c, 0x2a1a, 0x00de, 0x00c6, 0x2061, 0x19e7, 0x6034, 0x080c,
-	0xcf52, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018, 0x909a, 0x00c8,
-	0x1238, 0x8000, 0x6036, 0x00ce, 0x080c, 0x9e0a, 0x0804, 0x24fd,
-	0x2061, 0x0100, 0x62c0, 0x080c, 0xa7cc, 0x2019, 0x19f3, 0x2304,
-	0x9065, 0x0130, 0x6003, 0x0001, 0x2009, 0x0027, 0x080c, 0xac8c,
-	0x00ce, 0x0804, 0x24fd, 0xd2bc, 0x0904, 0x24e0, 0x080c, 0x8703,
-	0x2011, 0x0004, 0x080c, 0x2a44, 0x00d6, 0x2069, 0x0140, 0x6804,
-	0x9084, 0x4000, 0x0110, 0x080c, 0x2a1a, 0x00de, 0x00c6, 0x2061,
-	0x19e7, 0x6050, 0x080c, 0xcf52, 0x0120, 0x909a, 0x0003, 0x1668,
-	0x0018, 0x909a, 0x00c8, 0x1648, 0x8000, 0x6052, 0x604c, 0x00ce,
-	0x9005, 0x05d8, 0x2009, 0x07d0, 0x080c, 0x86fb, 0x9080, 0x0008,
-	0x2004, 0x9086, 0x0006, 0x1138, 0x2009, 0x1984, 0x2011, 0x0012,
-	0x080c, 0x2a53, 0x0450, 0x9080, 0x0008, 0x2004, 0x9086, 0x0009,
-	0x0d98, 0x2009, 0x1984, 0x2011, 0x0016, 0x080c, 0x2a53, 0x00e8,
-	0x2011, 0x0004, 0x080c, 0x2a44, 0x00c0, 0x0036, 0x2019, 0x0001,
-	0x080c, 0xa118, 0x003e, 0x2019, 0x19fa, 0x2304, 0x9065, 0x0160,
-	0x2009, 0x004f, 0x6020, 0x9086, 0x0009, 0x1110, 0x2009, 0x004f,
-	0x6003, 0x0003, 0x080c, 0xac8c, 0x00ce, 0x080c, 0xa8b2, 0x001e,
-	0xd19c, 0x0904, 0x255e, 0x7038, 0xd0ac, 0x1538, 0x0016, 0x0156,
-	0x2011, 0x0008, 0x080c, 0x2a44, 0x6050, 0xc0e5, 0x6052, 0x20a9,
-	0x0367, 0x1f04, 0x252b, 0x1d04, 0x2513, 0x080c, 0x872a, 0x6020,
-	0xd09c, 0x1db8, 0x00f6, 0x2079, 0x0100, 0x080c, 0x2981, 0x00fe,
-	0x1d80, 0x6050, 0xc0e4, 0x6052, 0x2011, 0x0008, 0x080c, 0x2a44,
-	0x015e, 0x001e, 0x0498, 0x015e, 0x001e, 0x0016, 0x6028, 0xc09c,
-	0x602a, 0x080c, 0xa896, 0x080c, 0xab5e, 0x080c, 0xa8b2, 0x60e3,
-	0x0000, 0x080c, 0xe702, 0x080c, 0xe71d, 0x080c, 0x56de, 0xd0fc,
-	0x1138, 0x080c, 0xcf4b, 0x1120, 0x9085, 0x0001, 0x080c, 0x7530,
-	0x9006, 0x080c, 0x2a0a, 0x2009, 0x0002, 0x080c, 0x29f6, 0x00e6,
-	0x2071, 0x1800, 0x7003, 0x0004, 0x080c, 0x0eb4, 0x00ee, 0x2011,
-	0x0008, 0x080c, 0x2a44, 0x080c, 0x0bc3, 0x001e, 0x918c, 0xffd0,
-	0x2110, 0x080c, 0x2a44, 0x00ae, 0x0005, 0x0016, 0x2001, 0x0387,
-	0x200c, 0xd1a4, 0x001e, 0x0904, 0x2310, 0x0016, 0x2009, 0x2571,
-	0x00c0, 0x2001, 0x0387, 0x2003, 0x1000, 0x001e, 0x0c38, 0x0016,
-	0x2001, 0x0387, 0x200c, 0xd1b4, 0x001e, 0x0904, 0x2310, 0x0016,
-	0x2009, 0x2583, 0x0030, 0x2001, 0x0387, 0x2003, 0x4000, 0x001e,
-	0x08a8, 0x6028, 0xc0bc, 0x602a, 0x2001, 0x0156, 0x2003, 0xbc91,
-	0x8000, 0x2003, 0xffff, 0x6043, 0x0001, 0x080c, 0x29f0, 0x2011,
-	0x0080, 0x080c, 0x2a44, 0x6017, 0x0000, 0x6043, 0x0000, 0x0817,
-	0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x1800, 0x71d0, 0x70d2, 0x9116, 0x0904, 0x25f3,
-	0x81ff, 0x01a0, 0x2009, 0x0000, 0x080c, 0x29f6, 0x2011, 0x8011,
-	0x2019, 0x010e, 0x231c, 0x939e, 0x0007, 0x1118, 0x2019, 0x0001,
-	0x0010, 0x2019, 0x0000, 0x080c, 0x4b07, 0x0468, 0x2001, 0x19a8,
-	0x200c, 0x81ff, 0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4, 0x0118,
-	0x2019, 0x0003, 0x0008, 0x2118, 0x2011, 0x8012, 0x080c, 0x4b07,
-	0x080c, 0x0eb4, 0x080c, 0x56de, 0xd0fc, 0x11a8, 0x080c, 0xcf4b,
-	0x1190, 0x00c6, 0x080c, 0x268f, 0x080c, 0xa896, 0x080c, 0xa073,
-	0x080c, 0xa8b2, 0x2061, 0x0100, 0x2019, 0x0028, 0x2009, 0x0002,
-	0x080c, 0x31a6, 0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e, 0x002e,
-	0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094,
-	0xff00, 0x11f0, 0x2011, 0x1837, 0x2214, 0xd2ac, 0x11c8, 0x81ff,
-	0x01e8, 0x2011, 0x181f, 0x2204, 0x9106, 0x1190, 0x2011, 0x1820,
-	0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206, 0x1148, 0x2011,
-	0x1820, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206, 0x1120,
-	0x2500, 0x080c, 0x81ff, 0x0048, 0x9584, 0x00ff, 0x9080, 0x3374,
-	0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005, 0x9080, 0x3374,
-	0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140, 0x2001,
-	0x1818, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852, 0x6856,
-	0x1f04, 0x263f, 0x00de, 0x0005, 0x0006, 0x00d6, 0x0026, 0x2069,
-	0x0140, 0x2001, 0x1818, 0x2102, 0x8114, 0x8214, 0x8214, 0x8214,
-	0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff, 0x1128, 0x9184,
-	0x000f, 0x9080, 0xe731, 0x2005, 0x6856, 0x8211, 0x1f04, 0x2654,
-	0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061, 0x1800, 0x6030,
-	0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156,
-	0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140, 0x6980, 0x9116,
-	0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8, 0x2001, 0x0402,
-	0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04, 0x2684, 0x680f,
-	0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e, 0x0005, 0x080c,
-	0x56da, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046, 0x2020,
-	0x2009, 0x002e, 0x080c, 0xe2c9, 0x004e, 0x0005, 0x00f6, 0x0016,
-	0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904, 0x26fb, 0x080c,
-	0x2971, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600, 0x1120, 0x2011,
-	0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120, 0x2011, 0x8000,
-	0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016, 0x2009, 0x0001,
-	0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009, 0x0002, 0x00b0,
-	0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004, 0x0078, 0x908e,
-	0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040, 0x9084, 0x0700,
-	0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058, 0x2300, 0x9080,
-	0x0020, 0x2018, 0x080c, 0x9166, 0x928c, 0xff00, 0x0110, 0x2011,
-	0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2, 0x2009, 0x0138,
-	0x220a, 0x080c, 0x74e9, 0x1118, 0x2009, 0x196d, 0x220a, 0x002e,
-	0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091,
-	0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170, 0x200c, 0x8000,
-	0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0d76, 0x002e, 0x001e,
-	0x000e, 0x012e, 0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc, 0x0168,
-	0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e, 0x004c, 0x1128,
-	0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e, 0x2001, 0x0227,
-	0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x2001, 0x0226,
-	0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x0005, 0x0018,
-	0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000, 0x1800, 0x0156,
-	0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x1990, 0x2004, 0x908a,
-	0x0007, 0x1a0c, 0x0d7d, 0x0033, 0x00ee, 0x002e, 0x001e, 0x000e,
-	0x015e, 0x0005, 0x2759, 0x2777, 0x279b, 0x279d, 0x27c6, 0x27c8,
-	0x27ca, 0x2001, 0x0001, 0x080c, 0x25a0, 0x080c, 0x29bb, 0x2001,
-	0x1992, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a, 0x9006,
-	0x20a9, 0x0009, 0x080c, 0x298d, 0x2001, 0x1990, 0x2003, 0x0006,
-	0x2009, 0x001e, 0x2011, 0x27cb, 0x080c, 0x8708, 0x0005, 0x2009,
-	0x1995, 0x200b, 0x0000, 0x2001, 0x199a, 0x2003, 0x0036, 0x2001,
-	0x1999, 0x2003, 0x002a, 0x2001, 0x1992, 0x2003, 0x0001, 0x9006,
-	0x080c, 0x2928, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x298d,
-	0x2001, 0x1990, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x27cb,
-	0x080c, 0x8708, 0x0005, 0x080c, 0x0d7d, 0x2001, 0x199a, 0x2003,
-	0x0036, 0x2001, 0x1992, 0x2003, 0x0003, 0x7a38, 0x9294, 0x0005,
+	0x2071, 0x0080, 0x9006, 0x702b, 0x0060, 0x20a9, 0x0040, 0x7022,
+	0x1f04, 0x111f, 0x702b, 0x0060, 0x702b, 0x0020, 0x20a9, 0x0040,
+	0x7022, 0x1f04, 0x1128, 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x00e6, 0xa06f, 0x0000, 0x2071, 0x1a20, 0x701c,
+	0x9088, 0x1a2a, 0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120,
+	0x9106, 0x090c, 0x0d7d, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079,
+	0x0080, 0x00a9, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x00e6, 0x2071, 0x1a20, 0x7004, 0x9005, 0x1128, 0x00f6,
+	0x2079, 0x0080, 0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004,
+	0x9086, 0x0000, 0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x1171,
+	0x12f4, 0x116f, 0x116f, 0x12e8, 0x12e8, 0x12e8, 0x12e8, 0x080c,
+	0x0d7d, 0x701c, 0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001,
+	0x1120, 0xd1fc, 0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180,
+	0x1a2a, 0x2004, 0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122,
+	0x782b, 0x0026, 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a,
+	0xa898, 0x780e, 0xa878, 0x700e, 0xa870, 0x7016, 0xa874, 0x701a,
+	0xa868, 0x009e, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005,
+	0x7007, 0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011,
+	0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x7212,
+	0x8203, 0x7812, 0x782b, 0x0020, 0x782b, 0x0041, 0x002e, 0x001e,
+	0x0005, 0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0,
+	0x7018, 0x2098, 0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026,
+	0x710c, 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006,
+	0x700e, 0x22a8, 0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300,
+	0x701a, 0x782b, 0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e,
+	0x0005, 0x2009, 0x1a20, 0x2104, 0xc095, 0x200a, 0x080c, 0x114e,
+	0x0005, 0x0016, 0x00e6, 0x2071, 0x1a20, 0x00f6, 0x2079, 0x0080,
+	0x792c, 0xd1bc, 0x190c, 0x0d76, 0x782b, 0x0002, 0xd1fc, 0x0120,
+	0x918c, 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005,
+	0x115f, 0x1207, 0x123b, 0x1313, 0x0d7d, 0x132e, 0x0d7d, 0x918c,
+	0x0700, 0x1550, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, 0x7018,
+	0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x7010,
+	0x20a8, 0x4005, 0x3400, 0x701a, 0x015e, 0x014e, 0x013e, 0x700c,
+	0x9005, 0x0578, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x11a4,
+	0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0100, 0x009e, 0x7007,
+	0x0000, 0x080c, 0x115f, 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f,
+	0x0200, 0x009e, 0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, 0x9005,
+	0x0180, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x11b9, 0x0005,
+	0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x7007, 0x0000,
+	0x0080, 0x0096, 0x7008, 0x2048, 0x7800, 0xa88e, 0x7804, 0xa892,
+	0x7808, 0xa896, 0x780c, 0xa89a, 0xa86f, 0x0100, 0x009e, 0x7007,
+	0x0000, 0x0096, 0x00d6, 0x7008, 0x2048, 0x2001, 0x18b9, 0x2004,
+	0x9906, 0x1128, 0xa89c, 0x080f, 0x00de, 0x009e, 0x00a0, 0x00de,
+	0x009e, 0x0096, 0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, 0xa89c,
+	0x0086, 0x2940, 0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x114e,
+	0x0005, 0x00de, 0x009e, 0x080c, 0x114e, 0x0005, 0xa8a8, 0xd08c,
+	0x0005, 0x0096, 0xa0a0, 0x904d, 0x090c, 0x0d7d, 0xa06c, 0x908e,
+	0x0100, 0x0130, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002,
+	0x080c, 0x6d6f, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c,
+	0x106c, 0x009e, 0x0005, 0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0d7d,
+	0xa06c, 0x908e, 0x0100, 0x0128, 0xa87b, 0x0001, 0xa883, 0x0000,
+	0x00c0, 0xa80c, 0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, 0x2050,
+	0x8006, 0x8006, 0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x0002, 0xa076, 0xa172, 0xb000, 0xa07a, 0x2810, 0x080c, 0x112f,
+	0x00e8, 0xa97c, 0xa894, 0x0016, 0x0006, 0x080c, 0x6d6f, 0x000e,
+	0x001e, 0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c,
+	0xabdf, 0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000,
+	0x080c, 0x106c, 0x7007, 0x0000, 0x080c, 0x114e, 0x00ae, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000,
+	0xc094, 0x7002, 0x012e, 0x0005, 0x0096, 0x2001, 0x192e, 0x204c,
+	0xa87c, 0x7812, 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a,
+	0xa898, 0x780e, 0x782b, 0x0020, 0x0126, 0x2091, 0x8000, 0x782b,
+	0x0041, 0x7007, 0x0003, 0x7000, 0xc084, 0x7002, 0x2900, 0x700a,
+	0x012e, 0x009e, 0x0005, 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b,
+	0x0040, 0x0096, 0x2001, 0x192e, 0x204c, 0xaa7c, 0x009e, 0x080c,
+	0x8bfd, 0x2009, 0x188c, 0x2104, 0x9084, 0xfffc, 0x200a, 0x080c,
+	0x8a70, 0x7007, 0x0000, 0x080c, 0x115f, 0x0005, 0x7007, 0x0000,
+	0x080c, 0x115f, 0x0005, 0x0126, 0x2091, 0x2200, 0x2079, 0x0300,
+	0x2071, 0x1a6a, 0x7003, 0x0000, 0x78bf, 0x00f6, 0x0041, 0x7807,
+	0x0007, 0x7803, 0x0000, 0x7803, 0x0001, 0x012e, 0x0005, 0x00c6,
+	0x7803, 0x0000, 0x2001, 0x0165, 0x2003, 0x4198, 0x7808, 0xd09c,
+	0x0118, 0x7820, 0x04e9, 0x0cd0, 0x2001, 0x1a6b, 0x2003, 0x0000,
+	0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002, 0x7807,
+	0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, 0x0031, 0x782b,
+	0x1a79, 0x781f, 0xff00, 0x781b, 0xff00, 0x2001, 0x0200, 0x2004,
+	0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a79, 0x602f, 0x1ddc,
+	0x2001, 0x181a, 0x2004, 0x9082, 0x1ddc, 0x6032, 0x603b, 0x1e62,
+	0x602b, 0x1ab9, 0x6007, 0x1a99, 0x2061, 0x1a99, 0x60af, 0x193c,
+	0x2001, 0x1927, 0x2004, 0x60ba, 0x783f, 0x3368, 0x00ce, 0x0005,
+	0x9086, 0x000d, 0x11d0, 0x7808, 0xd09c, 0x01b8, 0x7820, 0x0026,
+	0x2010, 0x080c, 0xc820, 0x0180, 0x2260, 0x6000, 0x9086, 0x0004,
+	0x1158, 0x0016, 0x6120, 0x9186, 0x0009, 0x0108, 0x0020, 0x2009,
+	0x004c, 0x080c, 0xac7c, 0x001e, 0x002e, 0x0005, 0x0126, 0x2091,
+	0x2200, 0x7908, 0x9184, 0x0070, 0x190c, 0x0d76, 0xd19c, 0x05a0,
+	0x7820, 0x908c, 0xf000, 0x0540, 0x2060, 0x6020, 0x9086, 0x0003,
+	0x1550, 0x6000, 0x9086, 0x0004, 0x1530, 0x6114, 0x2148, 0xa876,
+	0xa87a, 0xa867, 0x0103, 0x080c, 0x6b91, 0x00b6, 0x6010, 0x2058,
+	0xba3c, 0x8211, 0x0208, 0xba3e, 0xb8d0, 0x9005, 0x190c, 0x674b,
+	0x00be, 0x6044, 0xd0fc, 0x190c, 0xa8b1, 0x080c, 0xac08, 0x7808,
+	0xd09c, 0x19b0, 0x012e, 0x0005, 0x908a, 0x0024, 0x1a0c, 0x0d7d,
+	0x002b, 0x012e, 0x0005, 0x04b0, 0x012e, 0x0005, 0x1412, 0x1438,
+	0x1468, 0x146d, 0x1471, 0x1476, 0x149e, 0x14a2, 0x14b0, 0x14b4,
+	0x1412, 0x1581, 0x1585, 0x15ea, 0x15f1, 0x1412, 0x15f2, 0x15f3,
+	0x15fe, 0x1605, 0x1412, 0x1412, 0x1412, 0x1412, 0x1412, 0x1412,
+	0x1412, 0x1478, 0x1412, 0x1440, 0x1465, 0x142c, 0x1412, 0x144c,
+	0x1416, 0x1414, 0x080c, 0x0d7d, 0x080c, 0x0d76, 0x080c, 0x1610,
+	0x2009, 0x1a78, 0x2104, 0x8000, 0x200a, 0x080c, 0x7f78, 0x080c,
+	0x1ac2, 0x0005, 0x6044, 0xd0fc, 0x190c, 0xa8b1, 0x2009, 0x0055,
+	0x080c, 0xac7c, 0x012e, 0x0005, 0x080c, 0x1610, 0x2060, 0x6044,
+	0xd0fc, 0x190c, 0xa8b1, 0x2009, 0x0055, 0x080c, 0xac7c, 0x0005,
+	0x2009, 0x0048, 0x080c, 0x1610, 0x2060, 0x080c, 0xac7c, 0x0005,
+	0x2009, 0x0054, 0x080c, 0x1610, 0x2060, 0x6044, 0xd0fc, 0x190c,
+	0xa8b1, 0x080c, 0xac7c, 0x0005, 0x080c, 0x1610, 0x2060, 0x0056,
+	0x0066, 0x080c, 0x1610, 0x2028, 0x080c, 0x1610, 0x2030, 0x0036,
+	0x0046, 0x2021, 0x0000, 0x2418, 0x2009, 0x0056, 0x080c, 0xac7c,
+	0x004e, 0x003e, 0x006e, 0x005e, 0x0005, 0x080c, 0x1610, 0x0005,
+	0x7004, 0xc085, 0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, 0x7006,
+	0x0005, 0x080c, 0x1610, 0x080c, 0x16d4, 0x0005, 0x080c, 0x0d7d,
+	0x080c, 0x1610, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff,
+	0x009e, 0x2009, 0x0048, 0x080c, 0xac7c, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x2009, 0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004,
+	0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c,
+	0x1615, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005, 0x7004, 0xc095,
+	0x7006, 0x0005, 0x080c, 0x1610, 0x2060, 0x6014, 0x0096, 0x2048,
+	0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xac7c, 0x0005,
+	0x080c, 0x1610, 0x080c, 0x0d7d, 0x080c, 0x1610, 0x080c, 0x156c,
+	0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0904, 0x151d, 0x7827, 0x0015,
+	0x7828, 0x782b, 0x0000, 0x9065, 0x0140, 0x2001, 0x020d, 0x2003,
+	0x0050, 0x2003, 0x0020, 0x0804, 0x1523, 0x7004, 0x9005, 0x01c8,
+	0x1188, 0x78ab, 0x0004, 0x7827, 0x0018, 0x782b, 0x0000, 0xd1bc,
+	0x090c, 0x0d7d, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
+	0x0804, 0x1551, 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x1585,
+	0x0005, 0x7827, 0x0018, 0xa001, 0x7828, 0x7827, 0x0011, 0xa001,
+	0x7928, 0x9106, 0x0110, 0x79ac, 0x08e0, 0x00e6, 0x2071, 0x0200,
+	0x702c, 0xd0c4, 0x0140, 0x00ee, 0x080c, 0x1ac2, 0x080c, 0x1347,
+	0x7803, 0x0001, 0x0005, 0x7037, 0x0001, 0xa001, 0x7150, 0x00ee,
+	0x918c, 0xff00, 0x9186, 0x0500, 0x0110, 0x79ac, 0x0810, 0x7004,
+	0xc09d, 0x7006, 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x1585,
+	0x2001, 0x020d, 0x2003, 0x0020, 0x0005, 0x7828, 0x782b, 0x0000,
+	0x9065, 0x090c, 0x0d7d, 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c,
+	0x0700, 0x01a8, 0x080c, 0x7f78, 0x080c, 0x1ac2, 0x080c, 0xc832,
+	0x0158, 0xa9ac, 0xa936, 0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843,
+	0xffff, 0xa880, 0xc0bd, 0xa882, 0x080c, 0xc430, 0x0005, 0x6020,
+	0x9086, 0x0009, 0x1128, 0x2009, 0x004c, 0x080c, 0xac7c, 0x0048,
+	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c,
+	0xcc33, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, 0x2004,
+	0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xe6ea, 0xd5a4, 0x1118, 0x080c,
+	0x1615, 0x0005, 0x080c, 0x7f78, 0x080c, 0x1ac2, 0x0005, 0x781f,
+	0x0300, 0x7803, 0x0001, 0x0005, 0x0016, 0x0066, 0x0076, 0x00f6,
+	0x2079, 0x0300, 0x7908, 0x918c, 0x0007, 0x9186, 0x0003, 0x0120,
+	0x2001, 0x0016, 0x080c, 0x1686, 0x00fe, 0x007e, 0x006e, 0x001e,
+	0x0005, 0x7004, 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, 0x0004,
+	0x190c, 0x0d7d, 0xd184, 0x1189, 0xd19c, 0x0158, 0xc19c, 0x7106,
+	0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x080c, 0x1615,
+	0x0005, 0x81ff, 0x190c, 0x0d7d, 0x0005, 0xc184, 0xd1b4, 0xc1b4,
+	0x7106, 0x0016, 0x00e6, 0x15f0, 0x2071, 0x0200, 0x080c, 0x16c1,
+	0x05c8, 0x6014, 0x9005, 0x05b0, 0x0096, 0x2048, 0xa864, 0x009e,
+	0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, 0x0048, 0x1550,
+	0x601c, 0xd084, 0x11e0, 0x00f6, 0x2c78, 0x080c, 0x173e, 0x00fe,
+	0x00b0, 0x00f6, 0x2c78, 0x080c, 0x18c5, 0x00fe, 0x2009, 0x01f4,
+	0x8109, 0x0168, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001,
+	0x0218, 0x2004, 0xd0ec, 0x1118, 0x080c, 0x1615, 0x0040, 0x2001,
+	0x020d, 0x2003, 0x0020, 0x080c, 0x1347, 0x7803, 0x0001, 0x00ee,
+	0x001e, 0x0005, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
+	0x0461, 0x0ca8, 0x0429, 0x2060, 0x2009, 0x0053, 0x080c, 0xac7c,
+	0x0005, 0x0005, 0x0005, 0x00e1, 0x2008, 0x00d1, 0x0006, 0x7004,
+	0xc09d, 0x7006, 0x000e, 0x080c, 0x8f5a, 0x0005, 0x0089, 0x9005,
+	0x0118, 0x080c, 0x8b5d, 0x0cd0, 0x0005, 0x2001, 0x0036, 0x2009,
+	0x1820, 0x210c, 0x2011, 0x181f, 0x2214, 0x080c, 0x1686, 0x0005,
+	0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c, 0x156c, 0x00d6,
+	0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0510, 0x6804, 0x9005,
+	0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1528,
+	0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841, 0x1268, 0x9188,
+	0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c, 0x080c, 0x1678,
+	0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827, 0x0002, 0x04c1,
+	0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500, 0x6804, 0x9005,
+	0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c, 0x7f78, 0x080c,
+	0x1ac2, 0x0090, 0x7827, 0x0015, 0x782b, 0x0000, 0x7827, 0x0018,
+	0x782b, 0x0000, 0x2001, 0x020d, 0x2003, 0x0020, 0x2001, 0x0307,
+	0x2003, 0x0300, 0x7803, 0x0001, 0x00de, 0x0005, 0x682c, 0x9084,
+	0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015, 0x782b, 0x0000,
+	0x7803, 0x0001, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0005,
+	0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, 0x2001, 0x0030, 0x2c08,
+	0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005, 0x00f6, 0x2079,
+	0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016, 0x0026, 0x00c6,
+	0x080c, 0x13ae, 0x00ce, 0x002e, 0x001e, 0x000e, 0x0006, 0x7832,
+	0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118, 0x000e, 0x00fe,
+	0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0d7d,
+	0x2009, 0xff00, 0x8109, 0x0120, 0x7818, 0xd0bc, 0x1dd8, 0x0005,
+	0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080,
+	0x0c79, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c,
+	0x0d7d, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, 0x7050, 0x2060,
+	0xd1bc, 0x1110, 0x7054, 0x2060, 0x918c, 0xff00, 0x9186, 0x0500,
+	0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x0016, 0x2071, 0x0200,
+	0x0c41, 0x6124, 0xd1dc, 0x01f8, 0x701c, 0xd08c, 0x0904, 0x1733,
+	0x7017, 0x0000, 0x2001, 0x0264, 0x2004, 0xd0bc, 0x0904, 0x1733,
+	0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, 0x6038, 0x00ce, 0x918e,
+	0x0039, 0x1904, 0x1733, 0x9c06, 0x15f0, 0x0126, 0x2091, 0x2600,
+	0x080c, 0x7ed0, 0x012e, 0x7358, 0x745c, 0x6014, 0x905d, 0x0598,
+	0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x190c,
+	0xcc0e, 0xab42, 0xac3e, 0x2001, 0x1869, 0x2004, 0xd0b4, 0x1170,
+	0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
+	0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837, 0xffff, 0x080c, 0x1e82,
+	0x1190, 0x080c, 0x1920, 0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e,
+	0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020, 0x781f, 0x0300,
+	0x001e, 0x00ee, 0x0005, 0x7037, 0x0050, 0x7037, 0x0020, 0x001e,
+	0x00ee, 0x080c, 0x1615, 0x0005, 0x080c, 0x0d7d, 0x2cf0, 0x0126,
+	0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0x903e,
+	0x2730, 0xa864, 0x2068, 0xa81a, 0x9d84, 0x000f, 0x9088, 0x1e62,
+	0x2165, 0x0002, 0x1769, 0x17d7, 0x1769, 0x1769, 0x176d, 0x17b8,
+	0x1769, 0x178d, 0x1762, 0x17ce, 0x1769, 0x1769, 0x1772, 0x18c3,
+	0x17a1, 0x1797, 0xa964, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0904,
+	0x17ce, 0x9085, 0x0001, 0x0804, 0x18ba, 0xa87c, 0xd0ac, 0x0dc8,
+	0x0804, 0x17de, 0xa87c, 0xd0ac, 0x0da0, 0x0804, 0x1849, 0xa898,
+	0x901d, 0x1108, 0xab9c, 0x9016, 0xaab2, 0xaa3e, 0xaa42, 0x3e00,
+	0x9080, 0x0008, 0x2004, 0x9080, 0x9123, 0x2005, 0x9005, 0x090c,
+	0x0d7d, 0x2004, 0xa8ae, 0x0804, 0x18a2, 0xa87c, 0xd0bc, 0x09c8,
+	0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x17de, 0xa87c,
+	0xd0bc, 0x0978, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804,
+	0x1849, 0xa87c, 0xd0bc, 0x0928, 0xa890, 0xa842, 0xa88c, 0xa83e,
+	0xa804, 0x9045, 0x090c, 0x0d7d, 0xa164, 0xa91a, 0x91ec, 0x000f,
+	0x9d80, 0x1e62, 0x2065, 0xa888, 0xd19c, 0x1904, 0x1849, 0x0430,
+	0xa87c, 0xd0ac, 0x0904, 0x1769, 0xa804, 0x9045, 0x090c, 0x0d7d,
+	0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1e62, 0x2065, 0x9006,
+	0xa842, 0xa83e, 0xd19c, 0x1904, 0x1849, 0x0080, 0xa87c, 0xd0ac,
+	0x0904, 0x1769, 0x9006, 0xa842, 0xa83e, 0x0804, 0x1849, 0xa87c,
+	0xd0ac, 0x0904, 0x1769, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a,
+	0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1801, 0x1801,
+	0x1803, 0x1801, 0x1801, 0x1801, 0x180d, 0x1801, 0x1801, 0x1801,
+	0x1817, 0x1801, 0x1801, 0x1801, 0x1821, 0x1801, 0x1801, 0x1801,
+	0x182b, 0x1801, 0x1801, 0x1801, 0x1835, 0x1801, 0x1801, 0x1801,
+	0x183f, 0x080c, 0x0d7d, 0xa574, 0xa478, 0x9d86, 0x0024, 0x0904,
+	0x1777, 0xa37c, 0xa280, 0x0804, 0x18a2, 0xa584, 0xa488, 0x9d86,
+	0x0024, 0x0904, 0x1777, 0xa38c, 0xa290, 0x0804, 0x18a2, 0xa594,
+	0xa498, 0x9d86, 0x0024, 0x0904, 0x1777, 0xa39c, 0xa2a0, 0x0804,
+	0x18a2, 0xa5a4, 0xa4a8, 0x9d86, 0x0024, 0x0904, 0x1777, 0xa3ac,
+	0xa2b0, 0x0804, 0x18a2, 0xa5b4, 0xa4b8, 0x9d86, 0x0024, 0x0904,
+	0x1777, 0xa3bc, 0xa2c0, 0x0804, 0x18a2, 0xa5c4, 0xa4c8, 0x9d86,
+	0x0024, 0x0904, 0x1777, 0xa3cc, 0xa2d0, 0x0804, 0x18a2, 0xa5d4,
+	0xa4d8, 0x9d86, 0x0024, 0x0904, 0x1777, 0xa3dc, 0xa2e0, 0x0804,
+	0x18a2, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b,
+	0x0002, 0x186c, 0x186a, 0x186a, 0x186a, 0x186a, 0x186a, 0x1877,
+	0x186a, 0x186a, 0x186a, 0x186a, 0x186a, 0x1882, 0x186a, 0x186a,
+	0x186a, 0x186a, 0x186a, 0x188d, 0x186a, 0x186a, 0x186a, 0x186a,
+	0x186a, 0x1898, 0x080c, 0x0d7d, 0xa56c, 0xa470, 0xa774, 0xa678,
+	0x9d86, 0x002c, 0x0904, 0x1777, 0xa37c, 0xa280, 0x0458, 0xa584,
+	0xa488, 0xa78c, 0xa690, 0x9d86, 0x002c, 0x0904, 0x1777, 0xa394,
+	0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86, 0x002c,
+	0x0904, 0x1777, 0xa3ac, 0xa2b0, 0x00a8, 0xa5b4, 0xa4b8, 0xa7bc,
+	0xa6c0, 0x9d86, 0x002c, 0x0904, 0x1777, 0xa3c4, 0xa2c8, 0x0050,
+	0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x002c, 0x0904, 0x1777,
+	0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a,
+	0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x8109,
+	0xa916, 0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd,
+	0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005, 0x2800, 0xa80e, 0xab0a,
+	0x2c00, 0xa812, 0x0c78, 0x0804, 0x1769, 0x2ff0, 0x0126, 0x2091,
+	0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e, 0x2061,
+	0x1e5d, 0xa813, 0x1e5d, 0x2c05, 0xa80a, 0xa964, 0xa91a, 0xa87c,
+	0xd0ac, 0x090c, 0x0d7d, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a,
+	0x0034, 0x1a0c, 0x0d7d, 0xadcc, 0xacd0, 0xafd4, 0xaed8, 0xabdc,
+	0xaae0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa8ac,
+	0xaab0, 0xa836, 0xaa3a, 0xa988, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x0008, 0x1120, 0x8109, 0xa916, 0x0128, 0x0078, 0x918a, 0x0002,
+	0xa916, 0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd,
+	0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005, 0xa804, 0x9045, 0x090c,
+	0x0d7d, 0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f, 0x9080, 0x1e62,
+	0x2015, 0x82ff, 0x090c, 0x0d7d, 0xaa12, 0x2205, 0xa80a, 0x0c10,
+	0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1a4a,
+	0x1977, 0x1977, 0x1a4a, 0x1977, 0x1a44, 0x1a4a, 0x1977, 0x19e7,
+	0x19e7, 0x19e7, 0x1a4a, 0x19e7, 0x1a4a, 0x1a41, 0x19e7, 0xc0fc,
+	0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1a4c,
+	0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002,
+	0x1963, 0x1961, 0x1961, 0x1961, 0x1961, 0x1961, 0x1967, 0x1961,
+	0x1961, 0x1961, 0x1961, 0x1961, 0x196b, 0x1961, 0x1961, 0x1961,
+	0x1961, 0x1961, 0x196f, 0x1961, 0x1961, 0x1961, 0x1961, 0x1961,
+	0x1973, 0x080c, 0x0d7d, 0xa774, 0xa678, 0x0804, 0x1a4c, 0xa78c,
+	0xa690, 0x0804, 0x1a4c, 0xa7a4, 0xa6a8, 0x0804, 0x1a4c, 0xa7bc,
+	0xa6c0, 0x0804, 0x1a4c, 0xa7d4, 0xa6d8, 0x0804, 0x1a4c, 0xa898,
+	0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a, 0x0036, 0x1a0c,
+	0x0d7d, 0x9082, 0x001b, 0x0002, 0x199f, 0x199f, 0x19a1, 0x199f,
+	0x199f, 0x199f, 0x19ab, 0x199f, 0x199f, 0x199f, 0x19b5, 0x199f,
+	0x199f, 0x199f, 0x19bf, 0x199f, 0x199f, 0x199f, 0x19c9, 0x199f,
+	0x199f, 0x199f, 0x19d3, 0x199f, 0x199f, 0x199f, 0x19dd, 0x080c,
+	0x0d7d, 0xa574, 0xa478, 0x9d86, 0x0004, 0x0904, 0x1a4c, 0xa37c,
+	0xa280, 0x0804, 0x1a4c, 0xa584, 0xa488, 0x9d86, 0x0004, 0x0904,
+	0x1a4c, 0xa38c, 0xa290, 0x0804, 0x1a4c, 0xa594, 0xa498, 0x9d86,
+	0x0004, 0x0904, 0x1a4c, 0xa39c, 0xa2a0, 0x0804, 0x1a4c, 0xa5a4,
+	0xa4a8, 0x9d86, 0x0004, 0x0904, 0x1a4c, 0xa3ac, 0xa2b0, 0x0804,
+	0x1a4c, 0xa5b4, 0xa4b8, 0x9d86, 0x0004, 0x0904, 0x1a4c, 0xa3bc,
+	0xa2c0, 0x0804, 0x1a4c, 0xa5c4, 0xa4c8, 0x9d86, 0x0004, 0x0904,
+	0x1a4c, 0xa3cc, 0xa2d0, 0x0804, 0x1a4c, 0xa5d4, 0xa4d8, 0x9d86,
+	0x0004, 0x0904, 0x1a4c, 0xa3dc, 0xa2e0, 0x0804, 0x1a4c, 0xa898,
+	0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a, 0x0034, 0x1a0c,
+	0x0d7d, 0x9082, 0x001b, 0x0002, 0x1a0f, 0x1a0d, 0x1a0d, 0x1a0d,
+	0x1a0d, 0x1a0d, 0x1a19, 0x1a0d, 0x1a0d, 0x1a0d, 0x1a0d, 0x1a0d,
+	0x1a23, 0x1a0d, 0x1a0d, 0x1a0d, 0x1a0d, 0x1a0d, 0x1a2d, 0x1a0d,
+	0x1a0d, 0x1a0d, 0x1a0d, 0x1a0d, 0x1a37, 0x080c, 0x0d7d, 0xa56c,
+	0xa470, 0xa774, 0xa678, 0x9d86, 0x000c, 0x05b0, 0xa37c, 0xa280,
+	0x0498, 0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86, 0x000c, 0x0560,
+	0xa394, 0xa298, 0x0448, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86,
+	0x000c, 0x0510, 0xa3ac, 0xa2b0, 0x00f8, 0xa5b4, 0xa4b8, 0xa7bc,
+	0xa6c0, 0x9d86, 0x000c, 0x01c0, 0xa3c4, 0xa2c8, 0x00a8, 0xa5cc,
+	0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x000c, 0x0170, 0xa3dc, 0xa2e0,
+	0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x1e38, 0x1904, 0x1920,
+	0x900e, 0x0050, 0x080c, 0x0d7d, 0xab2e, 0xaa32, 0xad1e, 0xac22,
+	0xaf26, 0xae2a, 0x080c, 0x1e38, 0x0005, 0x6014, 0x2048, 0x6118,
+	0x810c, 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, 0x0001, 0x0008,
+	0xa986, 0x601b, 0x0002, 0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934,
+	0xa88c, 0x9106, 0x1158, 0xa938, 0xa890, 0x9106, 0x1138, 0x601c,
+	0xc084, 0x601e, 0x2009, 0x0048, 0x0804, 0xac7c, 0x0005, 0x0126,
+	0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, 0x0007, 0x9186,
+	0x0000, 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, 0x6023, 0x0000,
+	0x0006, 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c,
+	0x0120, 0x080c, 0x13ae, 0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800,
+	0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, 0x13ae, 0x00ce,
+	0x2001, 0x0038, 0x080c, 0x1b4f, 0x7930, 0x9186, 0x0040, 0x0160,
+	0x9186, 0x0042, 0x190c, 0x0d7d, 0x2001, 0x001e, 0x8001, 0x1df0,
+	0x8631, 0x1d40, 0x080c, 0x1b5e, 0x000e, 0x6022, 0x012e, 0x0005,
+	0x080c, 0x1b4b, 0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b,
+	0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, 0x0000, 0x78ab,
+	0x0004, 0x00fe, 0x080c, 0x74c8, 0x11b0, 0x2001, 0x0138, 0x2003,
+	0x0000, 0x2001, 0x0160, 0x2003, 0x0000, 0x2011, 0x012c, 0xa001,
+	0xa001, 0x8211, 0x1de0, 0x0081, 0x2001, 0x0386, 0x2003, 0x2020,
+	0x080c, 0x7569, 0x0005, 0x0479, 0x0039, 0x2001, 0x0160, 0x2502,
+	0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, 0x0200, 0x080c,
+	0x2a1b, 0x2009, 0x003c, 0x080c, 0x21c1, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, 0x8532, 0x70a0,
+	0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001, 0x020d, 0x2003,
+	0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x1347, 0x7803, 0x0001,
+	0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000,
+	0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x74c8, 0x1108,
+	0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168,
+	0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160, 0x2001, 0x0111,
+	0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003, 0x0048, 0xa001,
+	0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421, 0x1db0, 0x004e,
+	0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, 0x0005, 0x2c08,
+	0x621c, 0x080c, 0x1686, 0x7930, 0x0005, 0x2c08, 0x621c, 0x080c,
+	0x16b3, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, 0x2031, 0x0005,
+	0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038, 0x0c41, 0x9186,
+	0x0040, 0x0904, 0x1bbc, 0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80,
+	0x080c, 0x0d7d, 0x781f, 0x0202, 0x2001, 0x015d, 0x2003, 0x0000,
+	0x2001, 0x0b10, 0x0c01, 0x781c, 0xd084, 0x0110, 0x0861, 0x04e0,
+	0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568, 0x781c, 0xd084,
+	0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869, 0x2001, 0x0037,
+	0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030, 0x080c, 0x1b55,
+	0x9186, 0x0040, 0x190c, 0x0d7d, 0x00d6, 0x2069, 0x0200, 0x692c,
+	0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800, 0x9085,
+	0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184, 0x0007, 0x1db0,
+	0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007, 0x090c, 0x0d7d,
+	0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126, 0x2091, 0x2400,
+	0x2079, 0x0380, 0x2001, 0x19e6, 0x2070, 0x012e, 0x0005, 0x2cf0,
+	0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa964, 0xa91a,
+	0x918c, 0x00ff, 0x9184, 0x000f, 0x0002, 0x1bf1, 0x1bf1, 0x1bf1,
+	0x1bf3, 0x1bf1, 0x1bf1, 0x1bf1, 0x1bf1, 0x1be5, 0x1bfb, 0x1bf1,
+	0x1bf7, 0x1bf1, 0x1bf1, 0x1bf1, 0x1bf1, 0x9086, 0x0008, 0x1148,
+	0xa87c, 0xd0b4, 0x0904, 0x1d6b, 0x2011, 0x1e5d, 0x2205, 0xab88,
+	0x00a8, 0x080c, 0x0d7d, 0x9186, 0x0013, 0x0128, 0x0cd0, 0x9186,
+	0x001b, 0x0108, 0x0cb0, 0xa87c, 0xd0b4, 0x0904, 0x1d6b, 0x9184,
+	0x000f, 0x9080, 0x1e62, 0x2015, 0x2205, 0xab88, 0x2908, 0xa80a,
+	0xa90e, 0xaa12, 0xab16, 0x9006, 0xa842, 0xa83e, 0x012e, 0x0005,
+	0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa88c,
+	0xa990, 0xaaac, 0xabb0, 0xaa36, 0xab3a, 0xa83e, 0xa942, 0xa846,
+	0xa94a, 0xa964, 0x918c, 0x00ff, 0x9186, 0x001e, 0x0198, 0x2940,
+	0xa064, 0xa81a, 0x90ec, 0x000f, 0x9d80, 0x1e62, 0x2065, 0x2c05,
+	0x2808, 0x2c10, 0xab88, 0xa80a, 0xa90e, 0xaa12, 0xab16, 0x012e,
+	0x3e60, 0x0005, 0xa804, 0x2040, 0x0c58, 0x2cf0, 0x0126, 0x2091,
+	0x2400, 0x3e60, 0x6014, 0x2048, 0xa97c, 0x2950, 0xd1dc, 0x1904,
+	0x1d35, 0xc1dd, 0xa97e, 0x9006, 0xa842, 0xa83e, 0xa988, 0x8109,
+	0xa916, 0xa964, 0xa91a, 0x9184, 0x000f, 0x9088, 0x1e62, 0x2145,
+	0x0002, 0x1c69, 0x1c77, 0x1c69, 0x1c69, 0x1c69, 0x1c6b, 0x1c69,
+	0x1c69, 0x1ccc, 0x1ccc, 0x1c69, 0x1c69, 0x1c69, 0x1cca, 0x1c69,
+	0x1c69, 0x080c, 0x0d7d, 0xa804, 0x2050, 0xb164, 0xa91a, 0x9184,
+	0x000f, 0x9080, 0x1e62, 0x2045, 0xd19c, 0x1904, 0x1ccc, 0x9036,
+	0x2638, 0x2805, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b,
+	0x0002, 0x1c9c, 0x1c9c, 0x1c9e, 0x1c9c, 0x1c9c, 0x1c9c, 0x1ca4,
+	0x1c9c, 0x1c9c, 0x1c9c, 0x1caa, 0x1c9c, 0x1c9c, 0x1c9c, 0x1cb0,
+	0x1c9c, 0x1c9c, 0x1c9c, 0x1cb6, 0x1c9c, 0x1c9c, 0x1c9c, 0x1cbc,
+	0x1c9c, 0x1c9c, 0x1c9c, 0x1cc2, 0x080c, 0x0d7d, 0xb574, 0xb478,
+	0xb37c, 0xb280, 0x0804, 0x1d11, 0xb584, 0xb488, 0xb38c, 0xb290,
+	0x0804, 0x1d11, 0xb594, 0xb498, 0xb39c, 0xb2a0, 0x0804, 0x1d11,
+	0xb5a4, 0xb4a8, 0xb3ac, 0xb2b0, 0x0804, 0x1d11, 0xb5b4, 0xb4b8,
+	0xb3bc, 0xb2c0, 0x0804, 0x1d11, 0xb5c4, 0xb4c8, 0xb3cc, 0xb2d0,
+	0x0804, 0x1d11, 0xb5d4, 0xb4d8, 0xb3dc, 0xb2e0, 0x0804, 0x1d11,
+	0x0804, 0x1d11, 0x080c, 0x0d7d, 0x2805, 0x908a, 0x0034, 0x1a0c,
+	0x0d7d, 0x9082, 0x001b, 0x0002, 0x1cef, 0x1ced, 0x1ced, 0x1ced,
+	0x1ced, 0x1ced, 0x1cf6, 0x1ced, 0x1ced, 0x1ced, 0x1ced, 0x1ced,
+	0x1cfd, 0x1ced, 0x1ced, 0x1ced, 0x1ced, 0x1ced, 0x1d04, 0x1ced,
+	0x1ced, 0x1ced, 0x1ced, 0x1ced, 0x1d0b, 0x080c, 0x0d7d, 0xb56c,
+	0xb470, 0xb774, 0xb678, 0xb37c, 0xb280, 0x00d8, 0xb584, 0xb488,
+	0xb78c, 0xb690, 0xb394, 0xb298, 0x00a0, 0xb59c, 0xb4a0, 0xb7a4,
+	0xb6a8, 0xb3ac, 0xb2b0, 0x0068, 0xb5b4, 0xb4b8, 0xb7bc, 0xb6c0,
+	0xb3c4, 0xb2c8, 0x0030, 0xb5cc, 0xb4d0, 0xb7d4, 0xb6d8, 0xb3dc,
+	0xb2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988,
+	0x8109, 0xa916, 0x1118, 0x9006, 0x012e, 0x0005, 0x8840, 0x2805,
+	0x9005, 0x1168, 0xb004, 0x9005, 0x090c, 0x0d7d, 0x2050, 0xb164,
+	0xa91a, 0x9184, 0x000f, 0x9080, 0x1e62, 0x2045, 0x2805, 0x2810,
+	0x2a08, 0xa80a, 0xa90e, 0xaa12, 0x0c30, 0x3e60, 0x6344, 0xd3fc,
+	0x190c, 0x0d7d, 0xa93c, 0xaa40, 0xa844, 0x9106, 0x1118, 0xa848,
+	0x9206, 0x0508, 0x2958, 0xab48, 0xac44, 0x2940, 0x080c, 0x1e82,
+	0x1998, 0x2850, 0x2c40, 0xab14, 0xa880, 0xd0fc, 0x1140, 0xa810,
+	0x2005, 0xa80a, 0x2a00, 0xa80e, 0x2009, 0x8015, 0x0070, 0x00c6,
+	0x3e60, 0x6044, 0xc0a4, 0x9085, 0x8005, 0x6046, 0x00ce, 0x8319,
+	0xab16, 0x1904, 0x1d1e, 0x2009, 0x8005, 0x3e60, 0x6044, 0x9105,
+	0x6046, 0x0804, 0x1d1b, 0x080c, 0x0d7d, 0x00f6, 0x00e6, 0x0096,
+	0x00c6, 0x0026, 0x704c, 0x9c06, 0x190c, 0x0d7d, 0x2079, 0x0090,
+	0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004, 0x7057, 0x0000,
+	0x6014, 0x2048, 0x080c, 0xc832, 0x0118, 0xa880, 0xc0bd, 0xa882,
+	0x6020, 0x9086, 0x0006, 0x1170, 0x2061, 0x0100, 0x62c8, 0x2001,
+	0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a,
+	0x60c8, 0xa896, 0x704c, 0x2060, 0x00c6, 0x080c, 0xc430, 0x080c,
+	0xa888, 0x00ce, 0x704c, 0x9c06, 0x1150, 0x2009, 0x0040, 0x080c,
+	0x21c1, 0x080c, 0xa331, 0x2011, 0x0000, 0x080c, 0xa1bb, 0x002e,
+	0x00ce, 0x009e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0090,
+	0x781c, 0x0006, 0x7818, 0x0006, 0x2079, 0x0100, 0x7a14, 0x9284,
+	0x1984, 0x9085, 0x0012, 0x7816, 0x2019, 0x1000, 0x8319, 0x090c,
+	0x0d7d, 0x7820, 0xd0bc, 0x1dd0, 0x79c8, 0x000e, 0x9102, 0x001e,
+	0x0006, 0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca,
+	0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x2079, 0x0090, 0x782b,
+	0x0008, 0x7057, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x00e6, 0x2071,
+	0x19e6, 0x7054, 0x9086, 0x0000, 0x0904, 0x1e33, 0x2079, 0x0090,
+	0x2009, 0x0207, 0x210c, 0xd194, 0x01b8, 0x2009, 0x020c, 0x210c,
+	0x9184, 0x0003, 0x0188, 0x080c, 0xe733, 0x2001, 0x0133, 0x2004,
+	0x9005, 0x090c, 0x0d7d, 0x0016, 0x2009, 0x0040, 0x080c, 0x21c1,
+	0x001e, 0x2001, 0x020c, 0x2102, 0x2009, 0x0206, 0x2104, 0x2009,
+	0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x21c1,
+	0x782c, 0xd0fc, 0x09a8, 0x080c, 0xa8a4, 0x782c, 0xd0fc, 0x1de8,
+	0x080c, 0xa888, 0x7054, 0x9086, 0x0000, 0x1950, 0x782b, 0x0004,
+	0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x21c1, 0x782b,
+	0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x080c, 0x0d7d,
+	0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005, 0xa004, 0x9005,
+	0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1e62,
+	0x2065, 0x8cff, 0x090c, 0x0d7d, 0x8a51, 0x0005, 0x2050, 0x0005,
+	0x0000, 0x001d, 0x0021, 0x0025, 0x0029, 0x002d, 0x0031, 0x0035,
+	0x0000, 0x001b, 0x0021, 0x0027, 0x002d, 0x0033, 0x0000, 0x0000,
+	0x0023, 0x0000, 0x0000, 0x1e55, 0x1e51, 0x1e55, 0x1e55, 0x1e5f,
+	0x0000, 0x1e55, 0x1e5c, 0x1e5c, 0x1e59, 0x1e5c, 0x1e5c, 0x0000,
+	0x1e5f, 0x1e5c, 0x0000, 0x1e57, 0x1e57, 0x0000, 0x1e57, 0x1e5f,
+	0x0000, 0x1e57, 0x1e5d, 0x1e5d, 0x1e5d, 0x0000, 0x1e5d, 0x0000,
+	0x1e5f, 0x1e5d, 0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888,
+	0x9055, 0x0904, 0x2061, 0x2940, 0xa064, 0x90ec, 0x000f, 0x9084,
+	0x00ff, 0x9086, 0x0008, 0x1118, 0x2061, 0x1e5d, 0x00d0, 0x9de0,
+	0x1e62, 0x9d86, 0x0007, 0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86,
+	0x000f, 0x1120, 0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05, 0x9065,
+	0x1140, 0x0310, 0x0804, 0x2061, 0xa004, 0x9045, 0x0904, 0x2061,
+	0x08d8, 0x2c05, 0x9005, 0x0904, 0x1f49, 0xdd9c, 0x1904, 0x1f05,
+	0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1eda,
+	0x1eda, 0x1edc, 0x1eda, 0x1eda, 0x1eda, 0x1ee2, 0x1eda, 0x1eda,
+	0x1eda, 0x1ee8, 0x1eda, 0x1eda, 0x1eda, 0x1eee, 0x1eda, 0x1eda,
+	0x1eda, 0x1ef4, 0x1eda, 0x1eda, 0x1eda, 0x1efa, 0x1eda, 0x1eda,
+	0x1eda, 0x1f00, 0x080c, 0x0d7d, 0xa07c, 0x9422, 0xa080, 0x931b,
+	0x0804, 0x1f3f, 0xa08c, 0x9422, 0xa090, 0x931b, 0x0804, 0x1f3f,
+	0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804, 0x1f3f, 0xa0ac, 0x9422,
+	0xa0b0, 0x931b, 0x0804, 0x1f3f, 0xa0bc, 0x9422, 0xa0c0, 0x931b,
+	0x0804, 0x1f3f, 0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804, 0x1f3f,
+	0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c,
+	0x0d7d, 0x9082, 0x001b, 0x0002, 0x1f27, 0x1f25, 0x1f25, 0x1f25,
+	0x1f25, 0x1f25, 0x1f2c, 0x1f25, 0x1f25, 0x1f25, 0x1f25, 0x1f25,
+	0x1f31, 0x1f25, 0x1f25, 0x1f25, 0x1f25, 0x1f25, 0x1f36, 0x1f25,
+	0x1f25, 0x1f25, 0x1f25, 0x1f25, 0x1f3b, 0x080c, 0x0d7d, 0xa07c,
+	0x9422, 0xa080, 0x931b, 0x0098, 0xa094, 0x9422, 0xa098, 0x931b,
+	0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422,
+	0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630,
+	0x2300, 0x9405, 0x0160, 0x8a51, 0x0904, 0x2061, 0x8c60, 0x0804,
+	0x1eb1, 0xa004, 0x9045, 0x0904, 0x2061, 0x0804, 0x1e8c, 0x8a51,
+	0x0904, 0x2061, 0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004, 0x9045,
+	0x0904, 0x2061, 0xa064, 0x90ec, 0x000f, 0x9de0, 0x1e62, 0x2c05,
+	0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804, 0x2056, 0x2c05, 0x8422,
+	0x8420, 0x831a, 0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904,
+	0x1ff3, 0x9082, 0x001b, 0x0002, 0x1f8f, 0x1f8f, 0x1f91, 0x1f8f,
+	0x1f8f, 0x1f8f, 0x1f9f, 0x1f8f, 0x1f8f, 0x1f8f, 0x1fad, 0x1f8f,
+	0x1f8f, 0x1f8f, 0x1fbb, 0x1f8f, 0x1f8f, 0x1f8f, 0x1fc9, 0x1f8f,
+	0x1f8f, 0x1f8f, 0x1fd7, 0x1f8f, 0x1f8f, 0x1f8f, 0x1fe5, 0x080c,
+	0x0d7d, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c,
+	0x0d7d, 0xa074, 0x9420, 0xa078, 0x9319, 0x0804, 0x2051, 0xa18c,
+	0x2400, 0x9122, 0xa190, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa084,
+	0x9420, 0xa088, 0x9319, 0x0804, 0x2051, 0xa19c, 0x2400, 0x9122,
+	0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa094, 0x9420, 0xa098,
+	0x9319, 0x0804, 0x2051, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300,
+	0x911b, 0x0a0c, 0x0d7d, 0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804,
+	0x2051, 0xa1bc, 0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c,
+	0x0d7d, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0804, 0x2051, 0xa1cc,
+	0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0c4,
+	0x9420, 0xa0c8, 0x9319, 0x0804, 0x2051, 0xa1dc, 0x2400, 0x9122,
+	0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0d4, 0x9420, 0xa0d8,
+	0x9319, 0x0804, 0x2051, 0x9082, 0x001b, 0x0002, 0x2011, 0x200f,
+	0x200f, 0x200f, 0x200f, 0x200f, 0x201e, 0x200f, 0x200f, 0x200f,
+	0x200f, 0x200f, 0x202b, 0x200f, 0x200f, 0x200f, 0x200f, 0x200f,
+	0x2038, 0x200f, 0x200f, 0x200f, 0x200f, 0x200f, 0x2045, 0x080c,
+	0x0d7d, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c,
+	0x0d7d, 0xa06c, 0x9420, 0xa070, 0x9319, 0x0498, 0xa194, 0x2400,
+	0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa084, 0x9420,
+	0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300,
+	0x911b, 0x0a0c, 0x0d7d, 0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8,
+	0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0d7d,
+	0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122,
+	0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0cc, 0x9420, 0xa0d0,
+	0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a,
+	0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e, 0x000e, 0x000e, 0x9006,
+	0x0028, 0x008e, 0x00de, 0x00ce, 0x9085, 0x0001, 0x0005, 0x00c6,
+	0x610c, 0x0016, 0x9026, 0x2410, 0x6004, 0x9420, 0x9291, 0x0000,
+	0x2c04, 0x9210, 0x9ce0, 0x0002, 0x918a, 0x0002, 0x1da8, 0x9284,
+	0x000f, 0x9405, 0x001e, 0x00ce, 0x0005, 0x7803, 0x0003, 0x780f,
+	0x0000, 0x6004, 0x7812, 0x2c04, 0x7816, 0x9ce0, 0x0002, 0x918a,
+	0x0002, 0x1db8, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x190c,
+	0x0d76, 0xd094, 0x0110, 0x080c, 0x11e9, 0x0005, 0x0126, 0x2091,
+	0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069, 0x1800, 0x7817,
+	0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f, 0x0410, 0x2009,
+	0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b, 0x001f, 0x7837,
+	0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091, 0x2600, 0x781c,
+	0xd0a4, 0x190c, 0x21be, 0x7900, 0xd1dc, 0x1118, 0x9084, 0x0006,
+	0x001a, 0x9084, 0x000e, 0x0002, 0x20dc, 0x20d4, 0x7ed0, 0x20d4,
+	0x20d6, 0x20d6, 0x20d6, 0x20d6, 0x7eb6, 0x20d4, 0x20d8, 0x20d4,
+	0x20d6, 0x20d4, 0x20d6, 0x20d4, 0x080c, 0x0d7d, 0x0031, 0x0020,
+	0x080c, 0x7eb6, 0x080c, 0x7ed0, 0x0005, 0x0006, 0x0016, 0x0026,
+	0x080c, 0xe733, 0x7930, 0x9184, 0x0003, 0x0510, 0x080c, 0xa888,
+	0x2001, 0x19f9, 0x2004, 0x9005, 0x01a0, 0x2001, 0x0133, 0x2004,
+	0x9005, 0x090c, 0x0d7d, 0x00c6, 0x2001, 0x19f9, 0x2064, 0x080c,
+	0xa8a4, 0x080c, 0xc430, 0x2009, 0x0040, 0x080c, 0x21c1, 0x00ce,
+	0x0408, 0x2009, 0x0040, 0x080c, 0x21c1, 0x080c, 0xa8a4, 0x00d0,
+	0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160, 0x080c,
+	0x74c8, 0x1138, 0x080c, 0x77cc, 0x080c, 0x6024, 0x080c, 0x73f9,
+	0x0010, 0x080c, 0x5edf, 0x080c, 0x7f6e, 0x0041, 0x0018, 0x9184,
+	0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x0036,
+	0x0046, 0x0056, 0x2071, 0x1a6a, 0x080c, 0x1ac2, 0x005e, 0x004e,
+	0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071, 0x1800,
+	0x7128, 0x2001, 0x196e, 0x2102, 0x2001, 0x1976, 0x2102, 0x2001,
+	0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e, 0x78a3,
+	0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398, 0x0005,
+	0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423, 0x8423,
+	0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007, 0x8403,
+	0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc, 0x1238,
+	0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0, 0x9182,
+	0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420, 0x0098,
+	0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423, 0x0058,
+	0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420, 0x0018,
+	0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020, 0x8301,
+	0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405, 0x789a,
+	0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814, 0x9084,
+	0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6, 0x2069,
+	0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4, 0x6812,
+	0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810, 0x9084,
+	0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938, 0x080c,
+	0x0d76, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001, 0xa001,
+	0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001,
+	0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061,
+	0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2a15, 0x080c,
+	0x292f, 0x2001, 0x199c, 0x2003, 0x0000, 0x2001, 0x199d, 0x2003,
+	0x0000, 0x080c, 0x2a86, 0x9006, 0x080c, 0x295e, 0x9006, 0x080c,
+	0x2941, 0x20a9, 0x0012, 0x1d04, 0x21f3, 0x2091, 0x6000, 0x1f04,
+	0x21f3, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400,
+	0x9084, 0xdfff, 0x6052, 0x6224, 0x080c, 0x2a63, 0x080c, 0x264d,
+	0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x265d, 0x60e7, 0x0000,
+	0x61ea, 0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f,
+	0x0080, 0x602f, 0x0000, 0x6007, 0x349f, 0x00c6, 0x2061, 0x0140,
+	0x608b, 0x000b, 0x608f, 0x10b8, 0x6093, 0x0000, 0x6097, 0x0198,
+	0x00ce, 0x6004, 0x9085, 0x8000, 0x6006, 0x60bb, 0x0000, 0x20a9,
+	0x0018, 0x60bf, 0x0000, 0x1f04, 0x2231, 0x60bb, 0x0000, 0x60bf,
+	0x0108, 0x60bf, 0x0012, 0x60bf, 0x0405, 0x60bf, 0x0014, 0x60bf,
+	0x0320, 0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f,
+	0x006b, 0x602b, 0x402c, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140,
+	0x78c3, 0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005,
+	0x2001, 0x1835, 0x2003, 0x0000, 0x2001, 0x1834, 0x2003, 0x0001,
+	0x0005, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124,
+	0x6028, 0x910c, 0x0066, 0x2031, 0x1837, 0x2634, 0x96b4, 0x0028,
+	0x006e, 0x1138, 0x6020, 0xd1bc, 0x0120, 0xd0bc, 0x1168, 0xd0b4,
+	0x1198, 0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, 0x00aa, 0x9195,
+	0x0004, 0x9284, 0x0007, 0x0082, 0x0016, 0x2001, 0x0387, 0x200c,
+	0xd1a4, 0x001e, 0x0d70, 0x0c98, 0x0016, 0x2001, 0x0387, 0x200c,
+	0xd1b4, 0x001e, 0x0d30, 0x0c58, 0x229f, 0x229c, 0x229c, 0x229c,
+	0x229e, 0x229c, 0x229c, 0x229c, 0x080c, 0x0d7d, 0x0029, 0x002e,
+	0x001e, 0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c,
+	0x0118, 0xd19c, 0x1904, 0x2519, 0xd1f4, 0x190c, 0x0d76, 0x080c,
+	0x74c8, 0x0904, 0x22fc, 0x080c, 0xcf51, 0x1120, 0x7000, 0x9086,
+	0x0003, 0x0580, 0x6024, 0x9084, 0x1800, 0x0560, 0x080c, 0x74eb,
+	0x0118, 0x080c, 0x74d9, 0x1530, 0x2011, 0x0020, 0x080c, 0x2a63,
+	0x6043, 0x0000, 0x080c, 0xcf51, 0x0168, 0x080c, 0x74eb, 0x1150,
+	0x2001, 0x19a6, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x733e,
+	0x0804, 0x251c, 0x70a4, 0x9005, 0x1150, 0x70a7, 0x0001, 0x00d6,
+	0x2069, 0x0140, 0x080c, 0x751f, 0x00de, 0x1904, 0x251c, 0x080c,
+	0x77d6, 0x0428, 0x080c, 0x74eb, 0x1590, 0x6024, 0x9084, 0x1800,
+	0x1108, 0x0468, 0x080c, 0x77d6, 0x080c, 0x77cc, 0x080c, 0x6024,
+	0x080c, 0x73f9, 0x0804, 0x2519, 0xd1ac, 0x1508, 0x6024, 0xd0dc,
+	0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7098,
+	0x9086, 0x0028, 0x1110, 0x080c, 0x76ad, 0x0804, 0x2519, 0x080c,
+	0x77d1, 0x0048, 0x2001, 0x197c, 0x2003, 0x0002, 0x0020, 0x080c,
+	0x760a, 0x0804, 0x2519, 0x080c, 0x7750, 0x0804, 0x2519, 0x6220,
+	0xd1bc, 0x0138, 0xd2bc, 0x1904, 0x257e, 0xd2b4, 0x1904, 0x2590,
+	0x0000, 0xd1ac, 0x0904, 0x2426, 0x0036, 0x6328, 0xc3bc, 0x632a,
+	0x003e, 0x080c, 0x74c8, 0x11d0, 0x2011, 0x0020, 0x080c, 0x2a63,
+	0x0006, 0x0026, 0x0036, 0x080c, 0x74e2, 0x1158, 0x080c, 0x77cc,
+	0x080c, 0x6024, 0x080c, 0x73f9, 0x003e, 0x002e, 0x000e, 0x00ae,
+	0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x749c, 0x0016, 0x0046,
+	0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a,
+	0x6043, 0x0090, 0x6043, 0x0010, 0x74da, 0x948c, 0xff00, 0x7038,
+	0xd084, 0x0178, 0x9186, 0xf800, 0x1160, 0x7048, 0xd084, 0x1148,
+	0xc085, 0x704a, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x4b09,
+	0x003e, 0x080c, 0xcf4a, 0x1904, 0x23fd, 0x9196, 0xff00, 0x05a8,
+	0x7060, 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568,
+	0x7130, 0xd184, 0x1550, 0x080c, 0x335c, 0x0128, 0xc18d, 0x7132,
+	0x080c, 0x6a62, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248,
+	0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904,
+	0x23fd, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac,
+	0x1904, 0x23fd, 0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011, 0x8013,
+	0x080c, 0x4b09, 0x003e, 0x0804, 0x23fd, 0x7038, 0xd08c, 0x1140,
+	0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x23fd, 0xc1ad, 0x2102,
+	0x0036, 0x73d8, 0x2011, 0x8013, 0x080c, 0x4b09, 0x003e, 0x7130,
+	0xc185, 0x7132, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x01f0, 0x0016,
+	0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x88ce, 0x2019, 0x000e,
+	0x00c6, 0x2061, 0x0000, 0x080c, 0xe249, 0x00ce, 0x9484, 0x00ff,
+	0x9080, 0x3368, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006,
+	0x2009, 0x000e, 0x080c, 0xe2d9, 0x001e, 0x0016, 0x2009, 0x0002,
+	0x2019, 0x0004, 0x080c, 0x31b4, 0x001e, 0x0078, 0x0156, 0x00b6,
+	0x20a9, 0x007f, 0x900e, 0x080c, 0x6620, 0x1110, 0x080c, 0x603e,
+	0x8108, 0x1f04, 0x23f3, 0x00be, 0x015e, 0x00ce, 0x004e, 0x080c,
+	0xa888, 0x080c, 0xab50, 0x080c, 0xa8a4, 0x60e3, 0x0000, 0x001e,
+	0x2001, 0x1800, 0x2014, 0x9296, 0x0004, 0x1170, 0xd19c, 0x11b0,
+	0x2011, 0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, 0x9295, 0x0002,
+	0x6206, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001, 0x1826,
+	0x2003, 0x0000, 0x2011, 0x0020, 0x080c, 0x2a63, 0xd194, 0x0904,
+	0x2519, 0x0016, 0x080c, 0xa888, 0x6220, 0xd2b4, 0x0904, 0x24b4,
+	0x080c, 0x86d5, 0x080c, 0x9e16, 0x2011, 0x0004, 0x080c, 0x2a63,
+	0x00f6, 0x2019, 0x19f2, 0x2304, 0x907d, 0x0904, 0x2481, 0x7804,
+	0x9086, 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069,
+	0x0140, 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002, 0x2001,
+	0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c, 0x8001,
+	0x1df0, 0x080c, 0x2a39, 0x2001, 0x001e, 0x8001, 0x0240, 0x20a9,
+	0x0009, 0x080c, 0x29f0, 0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001,
+	0x0100, 0x080c, 0x2a29, 0x9006, 0x080c, 0x2a29, 0x080c, 0x95c6,
+	0x080c, 0xa8a4, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60, 0x080c,
+	0xabdf, 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae,
+	0x0005, 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000,
+	0x0110, 0x080c, 0x2a39, 0x00de, 0x00c6, 0x2061, 0x19e6, 0x6034,
+	0x080c, 0xcf51, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018, 0x909a,
+	0x00c8, 0x1238, 0x8000, 0x6036, 0x00ce, 0x080c, 0x9dee, 0x0804,
+	0x2516, 0x2061, 0x0100, 0x62c0, 0x080c, 0xa7b9, 0x2019, 0x19f2,
+	0x2304, 0x9065, 0x0130, 0x6003, 0x0001, 0x2009, 0x0027, 0x080c,
+	0xac7c, 0x00ce, 0x0804, 0x2516, 0xd2bc, 0x0904, 0x24f9, 0x080c,
+	0x86e2, 0x2011, 0x0004, 0x080c, 0x2a63, 0x00d6, 0x2069, 0x0140,
+	0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2a39, 0x00de, 0x00c6,
+	0x2061, 0x19e6, 0x6050, 0x080c, 0xcf51, 0x0120, 0x909a, 0x0003,
+	0x1668, 0x0018, 0x909a, 0x00c8, 0x1648, 0x8000, 0x6052, 0x604c,
+	0x00ce, 0x9005, 0x05d8, 0x2009, 0x07d0, 0x080c, 0x86da, 0x9080,
+	0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x2009, 0x1984, 0x2011,
+	0x0012, 0x080c, 0x2a72, 0x0450, 0x9080, 0x0008, 0x2004, 0x9086,
+	0x0009, 0x0d98, 0x2009, 0x1984, 0x2011, 0x0016, 0x080c, 0x2a72,
+	0x00e8, 0x2011, 0x0004, 0x080c, 0x2a63, 0x00c0, 0x0036, 0x2019,
+	0x0001, 0x080c, 0xa0fa, 0x003e, 0x2019, 0x19f9, 0x2304, 0x9065,
+	0x0160, 0x2009, 0x004f, 0x6020, 0x9086, 0x0009, 0x1110, 0x2009,
+	0x004f, 0x6003, 0x0003, 0x080c, 0xac7c, 0x00ce, 0x080c, 0xa8a4,
+	0x001e, 0xd19c, 0x0904, 0x2577, 0x7038, 0xd0ac, 0x1538, 0x0016,
+	0x0156, 0x2011, 0x0008, 0x080c, 0x2a63, 0x6050, 0xc0e5, 0x6052,
+	0x20a9, 0x0367, 0x1f04, 0x2544, 0x1d04, 0x252c, 0x080c, 0x8709,
+	0x6020, 0xd09c, 0x1db8, 0x00f6, 0x2079, 0x0100, 0x080c, 0x29a0,
+	0x00fe, 0x1d80, 0x6050, 0xc0e4, 0x6052, 0x2011, 0x0008, 0x080c,
+	0x2a63, 0x015e, 0x001e, 0x0498, 0x015e, 0x001e, 0x0016, 0x6028,
+	0xc09c, 0x602a, 0x080c, 0xa888, 0x080c, 0xab50, 0x080c, 0xa8a4,
+	0x60e3, 0x0000, 0x080c, 0xe712, 0x080c, 0xe72d, 0x080c, 0x56d9,
+	0xd0fc, 0x1138, 0x080c, 0xcf4a, 0x1120, 0x9085, 0x0001, 0x080c,
+	0x750f, 0x9006, 0x080c, 0x2a29, 0x2009, 0x0002, 0x080c, 0x2a15,
+	0x00e6, 0x2071, 0x1800, 0x7003, 0x0004, 0x080c, 0x0eb4, 0x00ee,
+	0x2011, 0x0008, 0x080c, 0x2a63, 0x080c, 0x0bc3, 0x001e, 0x918c,
+	0xffd0, 0x2110, 0x080c, 0x2a63, 0x00ae, 0x0005, 0x0016, 0x2001,
+	0x0387, 0x200c, 0xd1a4, 0x001e, 0x0904, 0x2329, 0x0016, 0x2009,
+	0x258a, 0x00c0, 0x2001, 0x0387, 0x2003, 0x1000, 0x001e, 0x0c38,
+	0x0016, 0x2001, 0x0387, 0x200c, 0xd1b4, 0x001e, 0x0904, 0x2329,
+	0x0016, 0x2009, 0x259c, 0x0030, 0x2001, 0x0387, 0x2003, 0x4000,
+	0x001e, 0x08a8, 0x6028, 0xc0bc, 0x602a, 0x2001, 0x0156, 0x2003,
+	0xbc91, 0x8000, 0x2003, 0xffff, 0x6043, 0x0001, 0x080c, 0x2a0f,
+	0x2011, 0x0080, 0x080c, 0x2a63, 0x6017, 0x0000, 0x6043, 0x0000,
+	0x0817, 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x1800, 0x71d0, 0x70d2, 0x9116, 0x0904,
+	0x260c, 0x81ff, 0x01a0, 0x2009, 0x0000, 0x080c, 0x2a15, 0x2011,
+	0x8011, 0x2019, 0x010e, 0x231c, 0x939e, 0x0007, 0x1118, 0x2019,
+	0x0001, 0x0010, 0x2019, 0x0000, 0x080c, 0x4b09, 0x0468, 0x2001,
+	0x19a7, 0x200c, 0x81ff, 0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4,
+	0x0118, 0x2019, 0x0003, 0x0008, 0x2118, 0x2011, 0x8012, 0x080c,
+	0x4b09, 0x080c, 0x0eb4, 0x080c, 0x56d9, 0xd0fc, 0x11a8, 0x080c,
+	0xcf4a, 0x1190, 0x00c6, 0x080c, 0x26a8, 0x080c, 0xa888, 0x080c,
+	0xa055, 0x080c, 0xa8a4, 0x2061, 0x0100, 0x2019, 0x0028, 0x2009,
+	0x0002, 0x080c, 0x31b4, 0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e,
+	0x002e, 0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff, 0x2130,
+	0x9094, 0xff00, 0x11f0, 0x2011, 0x1837, 0x2214, 0xd2ac, 0x11c8,
+	0x81ff, 0x01e8, 0x2011, 0x181f, 0x2204, 0x9106, 0x1190, 0x2011,
+	0x1820, 0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206, 0x1148,
+	0x2011, 0x1820, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206,
+	0x1120, 0x2500, 0x080c, 0x81de, 0x0048, 0x9584, 0x00ff, 0x9080,
+	0x3368, 0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005, 0x9080,
+	0x3368, 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140,
+	0x2001, 0x1818, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852,
+	0x6856, 0x1f04, 0x2658, 0x00de, 0x0005, 0x0006, 0x00d6, 0x0026,
+	0x2069, 0x0140, 0x2001, 0x1818, 0x2102, 0x8114, 0x8214, 0x8214,
+	0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff, 0x1128,
+	0x9184, 0x000f, 0x9080, 0xe741, 0x2005, 0x6856, 0x8211, 0x1f04,
+	0x266d, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061, 0x1800,
+	0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005,
+	0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140, 0x6980,
+	0x9116, 0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8, 0x2001,
+	0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04, 0x269d,
+	0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e, 0x0005,
+	0x080c, 0x56d5, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046,
+	0x2020, 0x2009, 0x002e, 0x080c, 0xe2d9, 0x004e, 0x0005, 0x00f6,
+	0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904, 0x2714,
+	0x080c, 0x2990, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600, 0x1120,
+	0x2011, 0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120, 0x2011,
+	0x8000, 0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016, 0x2009,
+	0x0001, 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009, 0x0002,
+	0x00b0, 0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004, 0x0078,
+	0x908e, 0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040, 0x9084,
+	0x0700, 0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058, 0x2300,
+	0x9080, 0x0020, 0x2018, 0x080c, 0x9148, 0x928c, 0xff00, 0x0110,
+	0x2011, 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2, 0x2009,
+	0x0138, 0x220a, 0x080c, 0x74c8, 0x1118, 0x2009, 0x196c, 0x220a,
+	0x002e, 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126,
+	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170, 0x200c,
+	0x8000, 0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0d76, 0x002e,
+	0x001e, 0x000e, 0x012e, 0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc,
+	0x0168, 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e, 0x004c,
+	0x1128, 0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e, 0x2001,
+	0x0227, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x2001,
+	0x0226, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x0005,
+	0x0018, 0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000, 0x1800,
+	0x0156, 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x198f, 0x2004,
+	0x908a, 0x0007, 0x1a0c, 0x0d7d, 0x0033, 0x00ee, 0x002e, 0x001e,
+	0x000e, 0x015e, 0x0005, 0x2772, 0x2790, 0x27b4, 0x27b6, 0x27df,
+	0x27e1, 0x27e3, 0x2001, 0x0001, 0x080c, 0x25b9, 0x080c, 0x29da,
+	0x2001, 0x1991, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a,
+	0x9006, 0x20a9, 0x0009, 0x080c, 0x29ac, 0x2001, 0x198f, 0x2003,
+	0x0006, 0x2009, 0x001e, 0x2011, 0x27e4, 0x080c, 0x86e7, 0x0005,
+	0x2009, 0x1994, 0x200b, 0x0000, 0x2001, 0x1999, 0x2003, 0x0036,
+	0x2001, 0x1998, 0x2003, 0x002a, 0x2001, 0x1991, 0x2003, 0x0001,
+	0x9006, 0x080c, 0x2941, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c,
+	0x29ac, 0x2001, 0x198f, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011,
+	0x27e4, 0x080c, 0x86e7, 0x0005, 0x080c, 0x0d7d, 0x2001, 0x1999,
+	0x2003, 0x0036, 0x2001, 0x1991, 0x2003, 0x0003, 0x7a38, 0x9294,
+	0x0005, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
+	0x080c, 0x2941, 0x2001, 0x1995, 0x2003, 0x0000, 0x2001, 0xffff,
+	0x20a9, 0x0009, 0x080c, 0x29ac, 0x2001, 0x198f, 0x2003, 0x0006,
+	0x2009, 0x001e, 0x2011, 0x27e4, 0x080c, 0x86e7, 0x0005, 0x080c,
+	0x0d7d, 0x080c, 0x0d7d, 0x0005, 0x0006, 0x0016, 0x0026, 0x00e6,
+	0x00f6, 0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2001,
+	0x1991, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0d7d, 0x0043, 0x012e,
+	0x015e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, 0x2806,
+	0x2826, 0x2866, 0x2896, 0x28ba, 0x28ca, 0x28cc, 0x080c, 0x29a0,
+	0x11b0, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1997, 0x2104,
+	0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0xc08d, 0x0008,
+	0xc085, 0x200a, 0x2001, 0x198f, 0x2003, 0x0001, 0x0030, 0x080c,
+	0x28f0, 0x2001, 0xffff, 0x080c, 0x2781, 0x0005, 0x080c, 0x28ce,
+	0x05e0, 0x2009, 0x1998, 0x2104, 0x8001, 0x200a, 0x080c, 0x29a0,
+	0x1178, 0x7850, 0x9084, 0xefff, 0x7852, 0x7a38, 0x9294, 0x0005,
+	0x9296, 0x0005, 0x0518, 0x2009, 0x1997, 0x2104, 0xc085, 0x200a,
+	0x2009, 0x1994, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0118,
+	0x080c, 0x28d6, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006,
 	0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x2928, 0x2001, 0x1996, 0x2003, 0x0000, 0x2001, 0xffff, 0x20a9,
-	0x0009, 0x080c, 0x298d, 0x2001, 0x1990, 0x2003, 0x0006, 0x2009,
-	0x001e, 0x2011, 0x27cb, 0x080c, 0x8708, 0x0005, 0x080c, 0x0d7d,
-	0x080c, 0x0d7d, 0x0005, 0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6,
-	0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2001, 0x1992,
-	0x2004, 0x908a, 0x0007, 0x1a0c, 0x0d7d, 0x0043, 0x012e, 0x015e,
-	0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, 0x27ed, 0x280d,
-	0x284d, 0x287d, 0x28a1, 0x28b1, 0x28b3, 0x080c, 0x2981, 0x11b0,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1998, 0x2104, 0x7a38,
-	0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0xc08d, 0x0008, 0xc085,
-	0x200a, 0x2001, 0x1990, 0x2003, 0x0001, 0x0030, 0x080c, 0x28d7,
-	0x2001, 0xffff, 0x080c, 0x2768, 0x0005, 0x080c, 0x28b5, 0x05e0,
-	0x2009, 0x1999, 0x2104, 0x8001, 0x200a, 0x080c, 0x2981, 0x1178,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x7a38, 0x9294, 0x0005, 0x9296,
-	0x0005, 0x0518, 0x2009, 0x1998, 0x2104, 0xc085, 0x200a, 0x2009,
-	0x1995, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0118, 0x080c,
-	0x28bd, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296,
-	0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2945,
-	0x2001, 0x1992, 0x2003, 0x0002, 0x0028, 0x2001, 0x1990, 0x2003,
-	0x0003, 0x0010, 0x080c, 0x278a, 0x0005, 0x080c, 0x28b5, 0x0560,
-	0x2009, 0x1999, 0x2104, 0x8001, 0x200a, 0x080c, 0x2981, 0x1168,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x2001, 0x1990, 0x2003, 0x0003,
-	0x2001, 0x1991, 0x2003, 0x0000, 0x00b8, 0x2009, 0x1999, 0x2104,
-	0x9005, 0x1118, 0x080c, 0x28fa, 0x0010, 0x080c, 0x28ca, 0x080c,
-	0x28bd, 0x2009, 0x1995, 0x200b, 0x0000, 0x2001, 0x1992, 0x2003,
-	0x0001, 0x080c, 0x278a, 0x0000, 0x0005, 0x04b9, 0x0508, 0x080c,
-	0x2981, 0x11b8, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1996,
-	0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108, 0x0078, 0x2001,
-	0x199b, 0x2003, 0x000a, 0x2009, 0x1998, 0x2104, 0xc0fd, 0x200a,
-	0x0038, 0x0419, 0x2001, 0x1992, 0x2003, 0x0004, 0x080c, 0x27b5,
-	0x0005, 0x0099, 0x0168, 0x080c, 0x2981, 0x1138, 0x7850, 0x9084,
-	0xefff, 0x7852, 0x080c, 0x27a1, 0x0018, 0x0079, 0x080c, 0x27b5,
-	0x0005, 0x080c, 0x0d7d, 0x080c, 0x0d7d, 0x2009, 0x199a, 0x2104,
-	0x8001, 0x200a, 0x090c, 0x2916, 0x0005, 0x7a38, 0x9294, 0x0005,
-	0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x2945, 0x0005, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2928, 0x0005, 0x2009,
-	0x1995, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0108, 0x0068,
-	0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x04d9, 0x7a38, 0x9294, 0x0005,
-	0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x2945, 0x0005, 0x0086, 0x2001, 0x1998, 0x2004, 0x9084, 0x7fff,
-	0x090c, 0x0d7d, 0x2009, 0x1997, 0x2144, 0x8846, 0x280a, 0x9844,
-	0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120, 0x080c, 0x0d7d, 0x9006,
-	0x0010, 0x2001, 0x0001, 0x00a1, 0x008e, 0x0005, 0x0006, 0x0156,
-	0x2001, 0x1990, 0x20a9, 0x0009, 0x2003, 0x0000, 0x8000, 0x1f04,
-	0x291c, 0x2001, 0x1997, 0x2003, 0x8000, 0x015e, 0x000e, 0x0005,
-	0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158, 0x7838, 0x9084,
-	0xfff9, 0x9085, 0x0004, 0x783a, 0x2009, 0x199d, 0x210c, 0x795a,
-	0x0050, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0006, 0x783a, 0x2009,
-	0x199e, 0x210c, 0x795a, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100,
-	0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfffa, 0x9085, 0x0004,
-	0x783a, 0x7850, 0x9084, 0xfff0, 0x7852, 0x00c8, 0x7838, 0x9084,
-	0xfffb, 0x9085, 0x0005, 0x783a, 0x7850, 0x9084, 0xfff0, 0x0016,
-	0x2009, 0x0003, 0x210c, 0x918c, 0x0600, 0x918e, 0x0400, 0x0118,
-	0x9085, 0x000a, 0x0010, 0x9085, 0x0000, 0x001e, 0x7852, 0x00fe,
-	0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0007, 0x000e,
-	0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0009, 0x000e,
-	0x0005, 0x0156, 0x20a9, 0x0064, 0x7820, 0x080c, 0x29f0, 0xd09c,
-	0x1110, 0x1f04, 0x2984, 0x015e, 0x0005, 0x0126, 0x0016, 0x0006,
-	0x2091, 0x8000, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b,
-	0x0007, 0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060,
-	0x9186, 0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003,
-	0x1118, 0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x29ad, 0x080c,
-	0x872a, 0x1f04, 0x29ad, 0x7850, 0x9085, 0x1000, 0x7852, 0x000e,
-	0x001e, 0x012e, 0x0005, 0x080c, 0x2aab, 0x0005, 0x0006, 0x0156,
-	0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1100,
-	0x7854, 0xd08c, 0x1110, 0x1f04, 0x29c8, 0x00fe, 0x015e, 0x000e,
-	0x0005, 0x1d04, 0x29d1, 0x080c, 0x872a, 0x1f04, 0x29d1, 0x0005,
-	0x0006, 0x2001, 0x199c, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005,
-	0x0006, 0x2001, 0x199c, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005,
-	0x0006, 0x2001, 0x199c, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005,
-	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001,
-	0x19a8, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc,
-	0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001,
-	0x200a, 0x0005, 0x0016, 0x0026, 0x080c, 0x7503, 0x0108, 0xc0bc,
-	0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e,
-	0x001e, 0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294,
-	0x0001, 0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005,
-	0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215,
-	0x220a, 0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140,
-	0x2104, 0x1128, 0x080c, 0x7503, 0x0110, 0xc0bc, 0x0008, 0xc0bd,
-	0x200a, 0x001e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843,
-	0x0101, 0x7844, 0xd084, 0x1de8, 0x2001, 0x0109, 0x2202, 0x7843,
-	0x0100, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0202,
-	0x7844, 0xd08c, 0x1de8, 0x2079, 0x0100, 0x7814, 0x9104, 0x9205,
-	0x7a16, 0x2079, 0x0380, 0x7843, 0x0200, 0x00fe, 0x0005, 0x0016,
-	0x0026, 0x0036, 0x00c6, 0x2061, 0x0100, 0x6050, 0x9084, 0xfbff,
-	0x9085, 0x0040, 0x6052, 0x20a9, 0x0002, 0x080c, 0x29d1, 0x6050,
-	0x9085, 0x0400, 0x9084, 0xff9f, 0x6052, 0x20a9, 0x0005, 0x080c,
-	0x29d1, 0x6054, 0xd0bc, 0x090c, 0x0d7d, 0x20a9, 0x0005, 0x080c,
-	0x29d1, 0x6054, 0xd0ac, 0x090c, 0x0d7d, 0x2009, 0x19af, 0x9084,
-	0x7e00, 0x8007, 0x8004, 0x8004, 0x200a, 0x9085, 0x0000, 0x605a,
-	0x2009, 0x199d, 0x2011, 0x199e, 0x6358, 0x939c, 0x38df, 0x2320,
-	0x939d, 0x0000, 0x94a5, 0x0000, 0x230a, 0x2412, 0x00ce, 0x003e,
-	0x002e, 0x001e, 0x0005, 0x0006, 0x00c6, 0x2061, 0x0100, 0x6050,
-	0xc0cd, 0x6052, 0x00ce, 0x000e, 0x0005, 0x2fb1, 0x2fb1, 0x2bb5,
-	0x2bb5, 0x2bc1, 0x2bc1, 0x2bcd, 0x2bcd, 0x2bdb, 0x2bdb, 0x2be7,
-	0x2be7, 0x2bf5, 0x2bf5, 0x2c03, 0x2c03, 0x2c15, 0x2c15, 0x2c21,
-	0x2c21, 0x2c2f, 0x2c2f, 0x2c4d, 0x2c4d, 0x2c6d, 0x2c6d, 0x2c3d,
-	0x2c3d, 0x2c5d, 0x2c5d, 0x2c7b, 0x2c7b, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c8d, 0x2c8d, 0x2c99,
-	0x2c99, 0x2ca7, 0x2ca7, 0x2cb5, 0x2cb5, 0x2cc5, 0x2cc5, 0x2cd3,
-	0x2cd3, 0x2ce3, 0x2ce3, 0x2cf3, 0x2cf3, 0x2d05, 0x2d05, 0x2d13,
-	0x2d13, 0x2d23, 0x2d23, 0x2d45, 0x2d45, 0x2d69, 0x2d69, 0x2d33,
-	0x2d33, 0x2d57, 0x2d57, 0x2d79, 0x2d79, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2d8d, 0x2d8d, 0x2d99,
-	0x2d99, 0x2da7, 0x2da7, 0x2db5, 0x2db5, 0x2dc5, 0x2dc5, 0x2dd3,
-	0x2dd3, 0x2de3, 0x2de3, 0x2df3, 0x2df3, 0x2e05, 0x2e05, 0x2e13,
-	0x2e13, 0x2e23, 0x2e23, 0x2e33, 0x2e33, 0x2e45, 0x2e45, 0x2e55,
-	0x2e55, 0x2e67, 0x2e67, 0x2e79, 0x2e79, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2e8d, 0x2e8d, 0x2e9b,
-	0x2e9b, 0x2eab, 0x2eab, 0x2ebb, 0x2ebb, 0x2ecd, 0x2ecd, 0x2edd,
-	0x2edd, 0x2eef, 0x2eef, 0x2f01, 0x2f01, 0x2f15, 0x2f15, 0x2f25,
-	0x2f25, 0x2f37, 0x2f37, 0x2f49, 0x2f49, 0x2f5d, 0x2f5d, 0x2f6e,
-	0x2f6e, 0x2f81, 0x2f81, 0x2f94, 0x2f94, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13,
-	0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x2c13, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2248, 0x0804,
-	0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x207e, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c,
-	0x2248, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106,
+	0x295e, 0x2001, 0x1991, 0x2003, 0x0002, 0x0028, 0x2001, 0x198f,
+	0x2003, 0x0003, 0x0010, 0x080c, 0x27a3, 0x0005, 0x080c, 0x28ce,
+	0x0560, 0x2009, 0x1998, 0x2104, 0x8001, 0x200a, 0x080c, 0x29a0,
+	0x1168, 0x7850, 0x9084, 0xefff, 0x7852, 0x2001, 0x198f, 0x2003,
+	0x0003, 0x2001, 0x1990, 0x2003, 0x0000, 0x00b8, 0x2009, 0x1998,
+	0x2104, 0x9005, 0x1118, 0x080c, 0x2913, 0x0010, 0x080c, 0x28e3,
+	0x080c, 0x28d6, 0x2009, 0x1994, 0x200b, 0x0000, 0x2001, 0x1991,
+	0x2003, 0x0001, 0x080c, 0x27a3, 0x0000, 0x0005, 0x04b9, 0x0508,
+	0x080c, 0x29a0, 0x11b8, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009,
+	0x1995, 0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108, 0x0078,
+	0x2001, 0x199a, 0x2003, 0x000a, 0x2009, 0x1997, 0x2104, 0xc0fd,
+	0x200a, 0x0038, 0x0419, 0x2001, 0x1991, 0x2003, 0x0004, 0x080c,
+	0x27ce, 0x0005, 0x0099, 0x0168, 0x080c, 0x29a0, 0x1138, 0x7850,
+	0x9084, 0xefff, 0x7852, 0x080c, 0x27ba, 0x0018, 0x0079, 0x080c,
+	0x27ce, 0x0005, 0x080c, 0x0d7d, 0x080c, 0x0d7d, 0x2009, 0x1999,
+	0x2104, 0x8001, 0x200a, 0x090c, 0x292f, 0x0005, 0x7a38, 0x9294,
+	0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
+	0x080c, 0x295e, 0x0005, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006,
+	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2941, 0x0005,
+	0x2009, 0x1994, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0108,
+	0x0068, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006,
+	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x04d9, 0x7a38, 0x9294,
+	0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
+	0x080c, 0x295e, 0x0005, 0x0086, 0x2001, 0x1997, 0x2004, 0x9084,
+	0x7fff, 0x090c, 0x0d7d, 0x2009, 0x1996, 0x2144, 0x8846, 0x280a,
+	0x9844, 0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120, 0x080c, 0x0d7d,
+	0x9006, 0x0010, 0x2001, 0x0001, 0x00a1, 0x008e, 0x0005, 0x0006,
+	0x0156, 0x2001, 0x198f, 0x20a9, 0x0009, 0x2003, 0x0000, 0x8000,
+	0x1f04, 0x2935, 0x2001, 0x1996, 0x2003, 0x8000, 0x015e, 0x000e,
+	0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158, 0x7838,
+	0x9084, 0xfff9, 0x9085, 0x0004, 0x783a, 0x2009, 0x199c, 0x210c,
+	0x795a, 0x0050, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0006, 0x783a,
+	0x2009, 0x199d, 0x210c, 0x795a, 0x00fe, 0x0005, 0x00f6, 0x2079,
+	0x0100, 0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfffa, 0x9085,
+	0x0004, 0x783a, 0x7850, 0x9084, 0xfff0, 0x7852, 0x00f8, 0x7838,
+	0x9084, 0xfffb, 0x9085, 0x0005, 0x783a, 0x7850, 0x9084, 0xfff0,
+	0x0016, 0x2009, 0x017f, 0x210c, 0x918e, 0x0005, 0x0140, 0x2009,
+	0x0003, 0x210c, 0x918c, 0x0600, 0x918e, 0x0400, 0x0118, 0x9085,
+	0x000a, 0x0010, 0x9085, 0x0000, 0x001e, 0x7852, 0x00fe, 0x0005,
+	0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0007, 0x000e, 0x0005,
+	0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0009, 0x000e, 0x0005,
+	0x0156, 0x20a9, 0x0064, 0x7820, 0x080c, 0x2a0f, 0xd09c, 0x1110,
+	0x1f04, 0x29a3, 0x015e, 0x0005, 0x0126, 0x0016, 0x0006, 0x2091,
+	0x8000, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b, 0x0007,
+	0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060, 0x9186,
+	0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003, 0x1118,
+	0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x29cc, 0x080c, 0x8709,
+	0x1f04, 0x29cc, 0x7850, 0x9085, 0x1000, 0x7852, 0x000e, 0x001e,
+	0x012e, 0x0005, 0x080c, 0x2ab9, 0x0005, 0x0006, 0x0156, 0x00f6,
+	0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1100, 0x7854,
+	0xd08c, 0x1110, 0x1f04, 0x29e7, 0x00fe, 0x015e, 0x000e, 0x0005,
+	0x1d04, 0x29f0, 0x080c, 0x8709, 0x1f04, 0x29f0, 0x0005, 0x0006,
+	0x2001, 0x199b, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006,
+	0x2001, 0x199b, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005, 0x0006,
+	0x2001, 0x199b, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005, 0xa001,
+	0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001, 0x19a7,
+	0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, 0x0140,
+	0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001, 0x200a,
+	0x0005, 0x0016, 0x0026, 0x080c, 0x74e2, 0x0108, 0xc0bc, 0x2009,
+	0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e,
+	0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001,
+	0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016,
+	0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a,
+	0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140, 0x2104,
+	0x1128, 0x080c, 0x74e2, 0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a,
+	0x001e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0101,
+	0x7844, 0xd084, 0x1de8, 0x2001, 0x0109, 0x2202, 0x7843, 0x0100,
+	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0202, 0x7844,
+	0xd08c, 0x1de8, 0x2079, 0x0100, 0x7814, 0x9104, 0x9205, 0x7a16,
+	0x2079, 0x0380, 0x7843, 0x0200, 0x00fe, 0x0005, 0x0016, 0x0026,
+	0x0036, 0x00c6, 0x2061, 0x0100, 0x6050, 0x9084, 0xfbff, 0x9085,
+	0x0040, 0x6052, 0x20a9, 0x0002, 0x080c, 0x29f0, 0x6050, 0x9085,
+	0x0400, 0x9084, 0xff9f, 0x6052, 0x20a9, 0x0005, 0x080c, 0x29f0,
+	0x6054, 0xd0bc, 0x090c, 0x0d7d, 0x20a9, 0x0005, 0x080c, 0x29f0,
+	0x6054, 0xd0ac, 0x090c, 0x0d7d, 0x2009, 0x19ae, 0x9084, 0x7e00,
+	0x8007, 0x8004, 0x8004, 0x200a, 0x00ce, 0x003e, 0x002e, 0x001e,
+	0x0005, 0x0006, 0x00c6, 0x2061, 0x0100, 0x6050, 0xc0cd, 0x6052,
+	0x00ce, 0x000e, 0x0005, 0x2fbf, 0x2fbf, 0x2bc3, 0x2bc3, 0x2bcf,
+	0x2bcf, 0x2bdb, 0x2bdb, 0x2be9, 0x2be9, 0x2bf5, 0x2bf5, 0x2c03,
+	0x2c03, 0x2c11, 0x2c11, 0x2c23, 0x2c23, 0x2c2f, 0x2c2f, 0x2c3d,
+	0x2c3d, 0x2c5b, 0x2c5b, 0x2c7b, 0x2c7b, 0x2c4b, 0x2c4b, 0x2c6b,
+	0x2c6b, 0x2c89, 0x2c89, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c9b, 0x2c9b, 0x2ca7, 0x2ca7, 0x2cb5,
+	0x2cb5, 0x2cc3, 0x2cc3, 0x2cd3, 0x2cd3, 0x2ce1, 0x2ce1, 0x2cf1,
+	0x2cf1, 0x2d01, 0x2d01, 0x2d13, 0x2d13, 0x2d21, 0x2d21, 0x2d31,
+	0x2d31, 0x2d53, 0x2d53, 0x2d77, 0x2d77, 0x2d41, 0x2d41, 0x2d65,
+	0x2d65, 0x2d87, 0x2d87, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2d9b, 0x2d9b, 0x2da7, 0x2da7, 0x2db5,
+	0x2db5, 0x2dc3, 0x2dc3, 0x2dd3, 0x2dd3, 0x2de1, 0x2de1, 0x2df1,
+	0x2df1, 0x2e01, 0x2e01, 0x2e13, 0x2e13, 0x2e21, 0x2e21, 0x2e31,
+	0x2e31, 0x2e41, 0x2e41, 0x2e53, 0x2e53, 0x2e63, 0x2e63, 0x2e75,
+	0x2e75, 0x2e87, 0x2e87, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2e9b, 0x2e9b, 0x2ea9, 0x2ea9, 0x2eb9,
+	0x2eb9, 0x2ec9, 0x2ec9, 0x2edb, 0x2edb, 0x2eeb, 0x2eeb, 0x2efd,
+	0x2efd, 0x2f0f, 0x2f0f, 0x2f23, 0x2f23, 0x2f33, 0x2f33, 0x2f45,
+	0x2f45, 0x2f57, 0x2f57, 0x2f6b, 0x2f6b, 0x2f7c, 0x2f7c, 0x2f8f,
+	0x2f8f, 0x2fa2, 0x2fa2, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21, 0x2c21,
+	0x2c21, 0x2c21, 0x2c21, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2261, 0x0804, 0x2fb7, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2248, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c,
-	0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c, 0x2248, 0x080c,
-	0x20a8, 0x0804, 0x2fa9, 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x13a3, 0x0804,
-	0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2248, 0x080c, 0x13a3, 0x0804, 0x2fa9, 0x0106,
+	0x208b, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x208b, 0x080c, 0x2261, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2261, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x208b, 0x080c, 0x20b5, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x208b, 0x080c, 0x2261, 0x080c, 0x20b5, 0x0804,
+	0x2fb7, 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x13ae, 0x0804, 0x2fb7, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x207e, 0x080c, 0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2248, 0x080c,
-	0x13a3, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c,
-	0x2248, 0x080c, 0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c,
-	0x13a3, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x13a3, 0x080c,
-	0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c, 0x2248, 0x080c,
-	0x13a3, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x0804,
-	0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x26fe, 0x080c, 0x2248, 0x0804, 0x2fa9, 0x0106,
+	0x2261, 0x080c, 0x13ae, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x208b, 0x080c,
+	0x13ae, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2261, 0x080c, 0x13ae, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x208b, 0x080c, 0x2261, 0x080c,
+	0x13ae, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x208b, 0x080c, 0x13ae, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x13ae, 0x080c, 0x20b5, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x208b, 0x080c, 0x2261, 0x080c, 0x13ae, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x0804, 0x2fb7, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x26fe, 0x080c, 0x207e, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0x207e, 0x080c, 0x2248, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0x2248, 0x080c,
-	0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0x207e, 0x080c,
-	0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0x207e, 0x080c,
-	0x2248, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0x2248, 0x080c,
-	0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0x207e, 0x080c,
-	0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0x2248, 0x080c,
-	0x13a3, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0x207e, 0x080c, 0x2248, 0x080c, 0x13a3, 0x0804, 0x2fa9, 0x0106,
+	0x2717, 0x080c, 0x2261, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c,
+	0x208b, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0x208b, 0x080c,
+	0x2261, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0x20b5, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2717, 0x080c, 0x2261, 0x080c, 0x20b5, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2717, 0x080c, 0x208b, 0x080c, 0x20b5, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2717, 0x080c, 0x208b, 0x080c, 0x2261, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0x13ae, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2717, 0x080c, 0x2261, 0x080c, 0x13ae, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2717, 0x080c, 0x208b, 0x080c, 0x13ae, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2717, 0x080c, 0x2261, 0x080c, 0x13ae, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0x208b, 0x080c,
+	0x2261, 0x080c, 0x13ae, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c,
+	0x208b, 0x080c, 0x13ae, 0x080c, 0x20b5, 0x0804, 0x2fb7, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x26fe, 0x080c, 0x207e, 0x080c, 0x13a3, 0x080c, 0x20a8, 0x0804,
-	0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x26fe, 0x080c, 0x13a3, 0x080c, 0x20a8, 0x0804,
-	0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x26fe, 0x080c, 0x207e, 0x080c, 0x2248, 0x080c,
-	0x13a3, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa8fc, 0x0804,
-	0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0xa8fc, 0x080c, 0x2248, 0x0804, 0x2fa9, 0x0106,
+	0x2717, 0x080c, 0x13ae, 0x080c, 0x20b5, 0x0804, 0x2fb7, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x207e, 0x080c, 0xa8fc, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c,
-	0xa8fc, 0x080c, 0x2248, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa8fc, 0x080c,
-	0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0xa8fc, 0x080c, 0x2248, 0x080c,
-	0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c, 0xa8fc, 0x080c,
-	0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c, 0xa8fc, 0x080c,
-	0x2248, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa8fc, 0x080c,
-	0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0xa8fc, 0x080c, 0x2248, 0x080c,
-	0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c, 0xa8fc, 0x080c,
-	0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x207e, 0x080c, 0xa8fc, 0x080c,
-	0x2248, 0x080c, 0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa8fc, 0x080c,
-	0x13a3, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa8fc, 0x080c,
-	0x2248, 0x080c, 0x13a3, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106,
+	0x2717, 0x080c, 0x208b, 0x080c, 0x2261, 0x080c, 0x13ae, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ee, 0x0804, 0x2fb7, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x207e, 0x080c, 0xa8fc, 0x080c, 0x13a3, 0x080c, 0x20a8, 0x0804,
-	0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x207e, 0x080c, 0xa8fc, 0x080c, 0x2248, 0x080c,
-	0x13a3, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0xa8fc, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0xa8fc, 0x080c,
-	0x2248, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0x207e, 0x080c,
-	0xa8fc, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0x207e, 0x080c,
-	0xa8fc, 0x080c, 0x2248, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0xa8fc, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0xa8fc, 0x080c, 0x2248, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106,
+	0xa8ee, 0x080c, 0x2261, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x208b, 0x080c,
+	0xa8ee, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x208b, 0x080c, 0xa8ee, 0x080c,
+	0x2261, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ee, 0x080c, 0x20b5, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0xa8ee, 0x080c, 0x2261, 0x080c, 0x20b5, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x208b, 0x080c, 0xa8ee, 0x080c, 0x20b5, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x208b, 0x080c, 0xa8ee, 0x080c, 0x2261, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ee, 0x080c, 0x13ae, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0xa8ee, 0x080c, 0x2261, 0x080c, 0x13ae, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x208b, 0x080c, 0xa8ee, 0x080c, 0x13ae, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x208b, 0x080c, 0xa8ee, 0x080c, 0x2261, 0x080c,
+	0x13ae, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ee, 0x080c, 0x13ae, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ee, 0x080c, 0x2261, 0x080c,
+	0x13ae, 0x080c, 0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x208b, 0x080c,
+	0xa8ee, 0x080c, 0x13ae, 0x080c, 0x20b5, 0x0804, 0x2fb7, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x26fe, 0x080c, 0x207e, 0x080c, 0xa8fc, 0x080c, 0x20a8, 0x0804,
-	0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x26fe, 0x080c, 0x207e, 0x080c, 0xa8fc, 0x080c,
-	0x2248, 0x080c, 0x20a8, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0xa8fc, 0x080c, 0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0xa8fc, 0x080c, 0x2248, 0x080c, 0x13a3, 0x0804, 0x2fa9, 0x0106,
+	0x208b, 0x080c, 0xa8ee, 0x080c, 0x2261, 0x080c, 0x13ae, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0xa8ee, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2717, 0x080c, 0xa8ee, 0x080c, 0x2261, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2717, 0x080c, 0x208b, 0x080c, 0xa8ee, 0x0804,
+	0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2717, 0x080c, 0x208b, 0x080c, 0xa8ee, 0x080c,
+	0x2261, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0xa8ee, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0xa8ee, 0x080c,
+	0x2261, 0x080c, 0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c,
+	0x208b, 0x080c, 0xa8ee, 0x080c, 0x20b5, 0x0804, 0x2fb7, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x26fe, 0x080c, 0x207e, 0x080c, 0xa8fc, 0x080c, 0x13a3, 0x0804,
-	0x2fa9, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x26fe, 0x080c, 0x207e, 0x080c, 0xa8fc, 0x080c,
-	0x2248, 0x080c, 0x13a3, 0x0804, 0x2fa9, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c,
-	0xa8fc, 0x080c, 0x13a3, 0x080c, 0x20a8, 0x04d8, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe,
-	0x080c, 0xa8fc, 0x080c, 0x2248, 0x080c, 0x13a3, 0x080c, 0x20a8,
-	0x0440, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x26fe, 0x080c, 0x207e, 0x080c, 0x13a3, 0x080c,
-	0xa8fc, 0x080c, 0x20a8, 0x00a8, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x26fe, 0x080c, 0x207e,
-	0x080c, 0xa8fc, 0x080c, 0x2248, 0x080c, 0x13a3, 0x080c, 0x20a8,
-	0x0000, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e,
-	0x010e, 0x000d, 0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c,
-	0x6a29, 0x1904, 0x30c2, 0x72dc, 0x2001, 0x197c, 0x2004, 0x9005,
-	0x1110, 0xd29c, 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x30c2,
-	0x080c, 0x30c7, 0x0804, 0x30c2, 0xd2cc, 0x1904, 0x30c2, 0x080c,
-	0x74e9, 0x1120, 0x70af, 0xffff, 0x0804, 0x30c2, 0xd294, 0x0120,
-	0x70af, 0xffff, 0x0804, 0x30c2, 0x080c, 0x3363, 0x0160, 0x080c,
-	0xcf52, 0x0128, 0x2001, 0x1818, 0x203c, 0x0804, 0x304f, 0x70af,
-	0xffff, 0x0804, 0x30c2, 0x2001, 0x1818, 0x203c, 0x7294, 0xd284,
-	0x0904, 0x304f, 0xd28c, 0x1904, 0x304f, 0x0036, 0x73ac, 0x938e,
-	0xffff, 0x1110, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04,
-	0x938c, 0x0001, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084,
-	0x00ff, 0x970e, 0x05d0, 0x908e, 0x0000, 0x05b8, 0x908e, 0x00ff,
-	0x1150, 0x7230, 0xd284, 0x15b0, 0x7294, 0xc28d, 0x7296, 0x70af,
-	0xffff, 0x003e, 0x04a0, 0x900e, 0x080c, 0x25fb, 0x080c, 0x65c4,
-	0x1538, 0x9006, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6,
-	0x2060, 0x080c, 0x8b90, 0x00ce, 0x090c, 0x8f34, 0xb8af, 0x0000,
-	0x080c, 0x6a6b, 0x1168, 0x7030, 0xd08c, 0x0130, 0xb800, 0xd0bc,
-	0x0138, 0x080c, 0x6914, 0x0120, 0x080c, 0x30e0, 0x0148, 0x0028,
-	0x080c, 0x3238, 0x080c, 0x310c, 0x0118, 0x8318, 0x0804, 0x2ffc,
-	0x73ae, 0x0010, 0x70af, 0xffff, 0x003e, 0x0804, 0x30c2, 0x9780,
-	0x3374, 0x203d, 0x97bc, 0xff00, 0x873f, 0x2041, 0x007e, 0x70ac,
-	0x9096, 0xffff, 0x1118, 0x900e, 0x28a8, 0x0050, 0x9812, 0x0220,
-	0x2008, 0x9802, 0x20a8, 0x0020, 0x70af, 0xffff, 0x0804, 0x30c2,
-	0x2700, 0x0156, 0x0016, 0x9106, 0x0904, 0x30b7, 0xc484, 0x080c,
-	0x6625, 0x0148, 0x080c, 0xcf52, 0x1904, 0x30b7, 0x080c, 0x65c4,
-	0x1904, 0x30bf, 0x0008, 0xc485, 0xb8bb, 0x0520, 0xb8ac, 0x9005,
-	0x0148, 0x00c6, 0x2060, 0x080c, 0x8b90, 0x00ce, 0x090c, 0x8f34,
-	0xb8af, 0x0000, 0x080c, 0x6a6b, 0x1130, 0x7030, 0xd08c, 0x01f8,
-	0xb800, 0xd0bc, 0x11e0, 0x7294, 0xd28c, 0x0180, 0x080c, 0x6a6b,
-	0x9082, 0x0006, 0x02e0, 0xd484, 0x1118, 0x080c, 0x65e9, 0x0028,
-	0x080c, 0x32d1, 0x01a0, 0x080c, 0x32fc, 0x0088, 0x080c, 0x3238,
-	0x080c, 0xcf52, 0x1160, 0x080c, 0x310c, 0x0188, 0x0040, 0x080c,
-	0xcf52, 0x1118, 0x080c, 0x32d1, 0x0110, 0x0451, 0x0140, 0x001e,
-	0x8108, 0x015e, 0x1f04, 0x3068, 0x70af, 0xffff, 0x0018, 0x001e,
-	0x015e, 0x71ae, 0x004e, 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6,
-	0x0016, 0x70af, 0x0001, 0x2009, 0x007e, 0x080c, 0x65c4, 0x1168,
-	0xb813, 0x00ff, 0xb817, 0xfffe, 0x080c, 0x3238, 0x04a9, 0x0128,
-	0x70dc, 0xc0bd, 0x70de, 0x080c, 0xcc9f, 0x001e, 0x00ce, 0x0005,
-	0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004, 0x9084,
-	0x00ff, 0xb842, 0x080c, 0xac5f, 0x01d0, 0x2b00, 0x6012, 0x080c,
-	0xcccc, 0x6023, 0x0001, 0x9006, 0x080c, 0x6561, 0x2001, 0x0000,
-	0x080c, 0x6575, 0x0126, 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa,
-	0x012e, 0x2009, 0x0004, 0x080c, 0xac8c, 0x9085, 0x0001, 0x00ce,
-	0x00de, 0x007e, 0x001e, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6,
-	0x2001, 0x184c, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0xac5f,
-	0x0548, 0x2b00, 0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086,
-	0x007e, 0x0140, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110,
-	0x080c, 0x31e7, 0x080c, 0xcccc, 0x6023, 0x0001, 0x9006, 0x080c,
-	0x6561, 0x2001, 0x0002, 0x080c, 0x6575, 0x0126, 0x2091, 0x8000,
-	0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009, 0x0002, 0x080c, 0xac8c,
-	0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6,
-	0x00c6, 0x0026, 0x2009, 0x0080, 0x080c, 0x65c4, 0x1140, 0xb813,
-	0x00ff, 0xb817, 0xfffc, 0x0039, 0x0110, 0x70e3, 0xffff, 0x002e,
-	0x00ce, 0x00be, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c,
-	0xab97, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xcccc, 0x6023, 0x0001,
-	0x9006, 0x080c, 0x6561, 0x2001, 0x0002, 0x080c, 0x6575, 0x0126,
-	0x2091, 0x8000, 0x70e4, 0x8000, 0x70e6, 0x012e, 0x2009, 0x0002,
-	0x080c, 0xac8c, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e,
-	0x0005, 0x00c6, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2009, 0x007f,
-	0x080c, 0x65c4, 0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8d7,
-	0x0004, 0x080c, 0xab97, 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023,
-	0x0001, 0x620a, 0x080c, 0xcccc, 0x2009, 0x0022, 0x080c, 0xac8c,
-	0x9085, 0x0001, 0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6,
-	0x0066, 0x0036, 0x0026, 0x00b6, 0x21f0, 0x9036, 0x080c, 0xa896,
-	0x1110, 0x2031, 0x0001, 0x0066, 0x080c, 0x93b0, 0x080c, 0x9326,
-	0x080c, 0xa7ec, 0x080c, 0xbb19, 0x006e, 0x86ff, 0x0110, 0x080c,
-	0xa8b2, 0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e,
-	0x0018, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6625, 0x1140,
-	0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x6043,
-	0x001e, 0x8108, 0x1f04, 0x31cc, 0x9686, 0x0001, 0x190c, 0x3337,
+	0x2717, 0x080c, 0x208b, 0x080c, 0xa8ee, 0x080c, 0x2261, 0x080c,
+	0x20b5, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0xa8ee, 0x080c,
+	0x13ae, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0xa8ee, 0x080c,
+	0x2261, 0x080c, 0x13ae, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c,
+	0x208b, 0x080c, 0xa8ee, 0x080c, 0x13ae, 0x0804, 0x2fb7, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x2717, 0x080c, 0x208b, 0x080c, 0xa8ee, 0x080c, 0x2261, 0x080c,
+	0x13ae, 0x0804, 0x2fb7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0xa8ee, 0x080c,
+	0x13ae, 0x080c, 0x20b5, 0x04d8, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0xa8ee,
+	0x080c, 0x2261, 0x080c, 0x13ae, 0x080c, 0x20b5, 0x0440, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x2717, 0x080c, 0x208b, 0x080c, 0x13ae, 0x080c, 0xa8ee, 0x080c,
+	0x20b5, 0x00a8, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2717, 0x080c, 0x208b, 0x080c, 0xa8ee,
+	0x080c, 0x2261, 0x080c, 0x13ae, 0x080c, 0x20b5, 0x0000, 0x015e,
+	0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x010e, 0x000d,
+	0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c, 0x6a28, 0x1904,
+	0x30d0, 0x72dc, 0x2001, 0x197b, 0x2004, 0x9005, 0x1110, 0xd29c,
+	0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x30d0, 0x080c, 0x30d5,
+	0x0804, 0x30d0, 0xd2cc, 0x1904, 0x30d0, 0x080c, 0x74c8, 0x1120,
+	0x70af, 0xffff, 0x0804, 0x30d0, 0xd294, 0x0120, 0x70af, 0xffff,
+	0x0804, 0x30d0, 0x080c, 0x3357, 0x0160, 0x080c, 0xcf51, 0x0128,
+	0x2001, 0x1818, 0x203c, 0x0804, 0x305d, 0x70af, 0xffff, 0x0804,
+	0x30d0, 0x2001, 0x1818, 0x203c, 0x7294, 0xd284, 0x0904, 0x305d,
+	0xd28c, 0x1904, 0x305d, 0x0036, 0x73ac, 0x938e, 0xffff, 0x1110,
+	0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04, 0x938c, 0x0001,
+	0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x970e,
+	0x05d0, 0x908e, 0x0000, 0x05b8, 0x908e, 0x00ff, 0x1150, 0x7230,
+	0xd284, 0x15b0, 0x7294, 0xc28d, 0x7296, 0x70af, 0xffff, 0x003e,
+	0x04a0, 0x900e, 0x080c, 0x2614, 0x080c, 0x65bf, 0x1538, 0x9006,
+	0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6, 0x2060, 0x080c,
+	0x8b72, 0x00ce, 0x090c, 0x8f16, 0xb8af, 0x0000, 0x080c, 0x6a6a,
+	0x1168, 0x7030, 0xd08c, 0x0130, 0xb800, 0xd0bc, 0x0138, 0x080c,
+	0x6913, 0x0120, 0x080c, 0x30ee, 0x0148, 0x0028, 0x080c, 0x323a,
+	0x080c, 0x311a, 0x0118, 0x8318, 0x0804, 0x300a, 0x73ae, 0x0010,
+	0x70af, 0xffff, 0x003e, 0x0804, 0x30d0, 0x9780, 0x3368, 0x203d,
+	0x97bc, 0xff00, 0x873f, 0x2041, 0x007e, 0x70ac, 0x9096, 0xffff,
+	0x1118, 0x900e, 0x28a8, 0x0050, 0x9812, 0x0220, 0x2008, 0x9802,
+	0x20a8, 0x0020, 0x70af, 0xffff, 0x0804, 0x30d0, 0x2700, 0x0156,
+	0x0016, 0x9106, 0x0904, 0x30c5, 0xc484, 0x080c, 0x6620, 0x0148,
+	0x080c, 0xcf51, 0x1904, 0x30c5, 0x080c, 0x65bf, 0x1904, 0x30cd,
+	0x0008, 0xc485, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6,
+	0x2060, 0x080c, 0x8b72, 0x00ce, 0x090c, 0x8f16, 0xb8af, 0x0000,
+	0x080c, 0x6a6a, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc,
+	0x11e0, 0x7294, 0xd28c, 0x0180, 0x080c, 0x6a6a, 0x9082, 0x0006,
+	0x02e0, 0xd484, 0x1118, 0x080c, 0x65e4, 0x0028, 0x080c, 0x32cd,
+	0x01a0, 0x080c, 0x32f8, 0x0088, 0x080c, 0x323a, 0x080c, 0xcf51,
+	0x1160, 0x080c, 0x311a, 0x0188, 0x0040, 0x080c, 0xcf51, 0x1118,
+	0x080c, 0x32cd, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e,
+	0x1f04, 0x3076, 0x70af, 0xffff, 0x0018, 0x001e, 0x015e, 0x71ae,
+	0x004e, 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70af,
+	0x0001, 0x2009, 0x007e, 0x080c, 0x65bf, 0x1168, 0xb813, 0x00ff,
+	0xb817, 0xfffe, 0x080c, 0x323a, 0x04a9, 0x0128, 0x70dc, 0xc0bd,
+	0x70de, 0x080c, 0xcc9e, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076,
+	0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004, 0x9084, 0x00ff, 0xb842,
+	0x080c, 0xac4f, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xcccb, 0x6023,
+	0x0001, 0x9006, 0x080c, 0x655c, 0x2001, 0x0000, 0x080c, 0x6570,
+	0x0126, 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009,
+	0x0004, 0x080c, 0xac7c, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e,
+	0x001e, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c,
+	0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0xac4f, 0x0548, 0x2b00,
+	0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140,
+	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x31ef,
+	0x080c, 0xcccb, 0x6023, 0x0001, 0x9006, 0x080c, 0x655c, 0x2001,
+	0x0002, 0x080c, 0x6570, 0x0126, 0x2091, 0x8000, 0x70a8, 0x8000,
+	0x70aa, 0x012e, 0x2009, 0x0002, 0x080c, 0xac7c, 0x9085, 0x0001,
+	0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026,
+	0x2009, 0x0080, 0x080c, 0x65bf, 0x1140, 0xb813, 0x00ff, 0xb817,
+	0xfffc, 0x0039, 0x0110, 0x70e3, 0xffff, 0x002e, 0x00ce, 0x00be,
+	0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0xab89, 0x01d0,
+	0x2b00, 0x6012, 0x080c, 0xcccb, 0x6023, 0x0001, 0x9006, 0x080c,
+	0x655c, 0x2001, 0x0002, 0x080c, 0x6570, 0x0126, 0x2091, 0x8000,
+	0x70e4, 0x8000, 0x70e6, 0x012e, 0x2009, 0x0002, 0x080c, 0xac7c,
+	0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6,
+	0x00d6, 0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x65bf,
+	0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8d7, 0x0004, 0x080c,
+	0xab89, 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a,
+	0x080c, 0xcccb, 0x2009, 0x0022, 0x080c, 0xac7c, 0x9085, 0x0001,
+	0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036,
+	0x0026, 0x00b6, 0x21f0, 0x080c, 0xa888, 0x0106, 0x080c, 0x9398,
+	0x080c, 0x9309, 0x080c, 0xa7d9, 0x080c, 0xbb0c, 0x010e, 0x090c,
+	0xa8a4, 0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e,
+	0x0018, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6620, 0x1140,
+	0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x603e,
+	0x001e, 0x8108, 0x1f04, 0x31d4, 0x9686, 0x0001, 0x190c, 0x332b,
 	0x00be, 0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
-	0x00c6, 0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x9016, 0x080c,
-	0xa896, 0x1110, 0x2011, 0x0001, 0x0026, 0x6210, 0x2258, 0xbaa0,
-	0x0026, 0x2019, 0x0029, 0x080c, 0x93a5, 0x0076, 0x2039, 0x0000,
-	0x080c, 0x9277, 0x2c08, 0x080c, 0xdfeb, 0x007e, 0x001e, 0x002e,
-	0x82ff, 0x0110, 0x080c, 0xa8b2, 0xba10, 0xbb14, 0xbc84, 0x080c,
-	0x6043, 0xba12, 0xbb16, 0xbc86, 0x00be, 0x001e, 0x002e, 0x003e,
-	0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6, 0x6010,
-	0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071, 0x1800,
-	0x70a8, 0x9005, 0x0110, 0x8001, 0x70aa, 0x000e, 0x00ee, 0x0005,
-	0x2071, 0x1800, 0x70e4, 0x9005, 0x0dc0, 0x8001, 0x70e6, 0x0ca8,
-	0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x00b6,
-	0x0046, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x9016, 0x080c,
-	0xa896, 0x1110, 0x2011, 0x0001, 0x0026, 0x81ff, 0x1118, 0x20a9,
-	0x0001, 0x0078, 0x080c, 0x56da, 0xd0c4, 0x0140, 0xd0a4, 0x0130,
-	0x9006, 0x2020, 0x2009, 0x002d, 0x080c, 0xe2c9, 0x20a9, 0x0800,
-	0x9016, 0x0026, 0x928e, 0x007e, 0x0904, 0x32ab, 0x928e, 0x007f,
-	0x0904, 0x32ab, 0x928e, 0x0080, 0x05f0, 0x9288, 0x1000, 0x210c,
-	0x81ff, 0x05c8, 0x8fff, 0x1150, 0x2001, 0x198e, 0x0006, 0x2003,
-	0x0001, 0x080c, 0x32be, 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6,
-	0x2158, 0x2001, 0x0001, 0x080c, 0x6a35, 0x00ce, 0x00be, 0x2019,
-	0x0029, 0x080c, 0x93a5, 0x0076, 0x2039, 0x0000, 0x080c, 0x9277,
-	0x00b6, 0x00c6, 0x0026, 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286,
-	0x0006, 0x1118, 0xb807, 0x0404, 0x0028, 0x2001, 0x0004, 0x8007,
-	0x9215, 0xba06, 0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c,
-	0xdfeb, 0x001e, 0x007e, 0x002e, 0x8210, 0x1f04, 0x3261, 0x002e,
-	0x82ff, 0x0110, 0x080c, 0xa8b2, 0x015e, 0x001e, 0x002e, 0x003e,
-	0x004e, 0x00be, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0046, 0x0026,
-	0x0016, 0x080c, 0x56da, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006,
-	0x2220, 0x2009, 0x0029, 0x080c, 0xe2c9, 0x001e, 0x002e, 0x004e,
-	0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x7294, 0x82ff, 0x01e8,
-	0x080c, 0x6a63, 0x11d0, 0x2100, 0x080c, 0x262e, 0x81ff, 0x01b8,
-	0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04, 0xd384, 0x0120,
-	0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x9116, 0x0138,
-	0x9096, 0x00ff, 0x0110, 0x8318, 0x0c68, 0x9085, 0x0001, 0x00ce,
-	0x003e, 0x002e, 0x001e, 0x0005, 0x0016, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x0066, 0x9036, 0x080c, 0xa896, 0x1110, 0x2031, 0x0001,
-	0x0066, 0x0036, 0x2019, 0x0029, 0x00d9, 0x003e, 0x006e, 0x86ff,
-	0x0110, 0x080c, 0xa8b2, 0x006e, 0x9180, 0x1000, 0x2004, 0x9065,
-	0x0158, 0x0016, 0x00c6, 0x2061, 0x1b32, 0x001e, 0x6112, 0x080c,
-	0x31e7, 0x001e, 0x080c, 0x65e9, 0x012e, 0x00ce, 0x001e, 0x0005,
-	0x0016, 0x0026, 0x2110, 0x080c, 0xa38a, 0x080c, 0xe630, 0x002e,
-	0x001e, 0x0005, 0x2001, 0x1837, 0x2004, 0xd0cc, 0x0005, 0x00c6,
-	0x00b6, 0x080c, 0x74e9, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9,
-	0x0782, 0x080c, 0x74e9, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e,
-	0x9180, 0x1000, 0x2004, 0x905d, 0x0130, 0x86ff, 0x0110, 0xb800,
-	0xd0bc, 0x090c, 0x65e9, 0x8108, 0x1f04, 0x3348, 0x2061, 0x1800,
-	0x607f, 0x0000, 0x6080, 0x9084, 0x00ff, 0x6082, 0x60b3, 0x0000,
-	0x00be, 0x00ce, 0x0005, 0x2001, 0x1869, 0x2004, 0xd0bc, 0x0005,
-	0x2011, 0x1848, 0x2214, 0xd2ec, 0x0005, 0x0026, 0x2011, 0x1867,
-	0x2214, 0xd2dc, 0x002e, 0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2,
-	0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4,
-	0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca,
-	0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9,
-	0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad,
-	0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3,
-	0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098, 0x6797, 0x6690, 0x658f,
-	0x6488, 0x6384, 0x6282, 0x8081, 0x8080, 0x617c, 0x607a, 0x8079,
-	0x5f76, 0x8075, 0x8074, 0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d,
-	0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863,
-	0x575c, 0x565a, 0x5559, 0x8056, 0x8055, 0x5454, 0x5353, 0x5252,
-	0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047,
-	0x4c46, 0x8045, 0x8043, 0x803c, 0x803a, 0x8039, 0x8036, 0x4b35,
-	0x8034, 0x4a33, 0x4932, 0x4831, 0x802e, 0x472d, 0x462c, 0x452b,
-	0x442a, 0x4329, 0x4227, 0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e,
-	0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004,
-	0x3902, 0x8001, 0x8000, 0x8000, 0x3800, 0x3700, 0x3600, 0x8000,
-	0x3500, 0x8000, 0x8000, 0x8000, 0x3400, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x3300, 0x3200, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x3100, 0x3000, 0x8000, 0x8000, 0x2f00,
-	0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00,
-	0x8000, 0x2a00, 0x2900, 0x2800, 0x8000, 0x2700, 0x2600, 0x2500,
-	0x2400, 0x2300, 0x2200, 0x8000, 0x8000, 0x2100, 0x2000, 0x1f00,
-	0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000,
-	0x1900, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x1800,
-	0x8000, 0x1700, 0x1600, 0x1500, 0x8000, 0x1400, 0x1300, 0x1200,
-	0x1100, 0x1000, 0x0f00, 0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00,
-	0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000, 0x0800, 0x0700, 0x8000,
-	0x0600, 0x8000, 0x8000, 0x8000, 0x0500, 0x0400, 0x0300, 0x8000,
-	0x0200, 0x8000, 0x8000, 0x8000, 0x0100, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x0000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x00c6, 0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x080c, 0xa888,
+	0x0106, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c,
+	0x938d, 0x0076, 0x2039, 0x0000, 0x080c, 0x9256, 0x2c08, 0x080c,
+	0xdffb, 0x007e, 0x001e, 0x010e, 0x090c, 0xa8a4, 0xba10, 0xbb14,
+	0xbc84, 0x080c, 0x603e, 0xba12, 0xbb16, 0xbc86, 0x00be, 0x001e,
+	0x002e, 0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006,
+	0x00b6, 0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150,
+	0x2071, 0x1800, 0x70a8, 0x9005, 0x0110, 0x8001, 0x70aa, 0x000e,
+	0x00ee, 0x0005, 0x2071, 0x1800, 0x70e4, 0x9005, 0x0dc0, 0x8001,
+	0x70e6, 0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6,
+	0x00c6, 0x00b6, 0x0046, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178,
+	0x080c, 0xa888, 0x0106, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0078,
+	0x080c, 0x56d5, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2020,
+	0x2009, 0x002d, 0x080c, 0xe2d9, 0x20a9, 0x0800, 0x9016, 0x0026,
+	0x928e, 0x007e, 0x0904, 0x32a9, 0x928e, 0x007f, 0x0904, 0x32a9,
+	0x928e, 0x0080, 0x05f0, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c8,
+	0x8fff, 0x1150, 0x2001, 0x198d, 0x0006, 0x2003, 0x0001, 0x080c,
+	0x32ba, 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001,
+	0x0001, 0x080c, 0x6a34, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c,
+	0x938d, 0x0076, 0x2039, 0x0000, 0x080c, 0x9256, 0x00b6, 0x00c6,
+	0x0026, 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118,
+	0xb807, 0x0404, 0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06,
+	0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c, 0xdffb, 0x001e,
+	0x007e, 0x002e, 0x8210, 0x1f04, 0x325f, 0x010e, 0x090c, 0xa8a4,
+	0x015e, 0x001e, 0x002e, 0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee,
+	0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, 0x080c, 0x56d5, 0xd0c4,
+	0x0140, 0xd0a4, 0x0130, 0x9006, 0x2220, 0x2009, 0x0029, 0x080c,
+	0xe2d9, 0x001e, 0x002e, 0x004e, 0x0005, 0x0016, 0x0026, 0x0036,
+	0x00c6, 0x7294, 0x82ff, 0x01e8, 0x080c, 0x6a62, 0x11d0, 0x2100,
+	0x080c, 0x2647, 0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0,
+	0x1d80, 0x2c04, 0xd384, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010,
+	0x9084, 0x00ff, 0x9116, 0x0138, 0x9096, 0x00ff, 0x0110, 0x8318,
+	0x0c68, 0x9085, 0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005,
+	0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa888, 0x0106,
+	0x0036, 0x2019, 0x0029, 0x00c1, 0x003e, 0x010e, 0x090c, 0xa8a4,
+	0x9180, 0x1000, 0x2004, 0x9065, 0x0158, 0x0016, 0x00c6, 0x2061,
+	0x1b31, 0x001e, 0x6112, 0x080c, 0x31ef, 0x001e, 0x080c, 0x65e4,
+	0x012e, 0x00ce, 0x001e, 0x0005, 0x0016, 0x0026, 0x2110, 0x080c,
+	0xa372, 0x080c, 0xe640, 0x002e, 0x001e, 0x0005, 0x2001, 0x1837,
+	0x2004, 0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x74c8, 0x1118,
+	0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x74c8, 0x1110,
+	0x900e, 0x0010, 0x2009, 0x007e, 0x9180, 0x1000, 0x2004, 0x905d,
+	0x0130, 0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x65e4, 0x8108,
+	0x1f04, 0x333c, 0x2061, 0x1800, 0x607f, 0x0000, 0x6080, 0x9084,
+	0x00ff, 0x6082, 0x60b3, 0x0000, 0x00be, 0x00ce, 0x0005, 0x2001,
+	0x1869, 0x2004, 0xd0bc, 0x0005, 0x2011, 0x1848, 0x2214, 0xd2ec,
+	0x0005, 0x0026, 0x2011, 0x1867, 0x2214, 0xd2dc, 0x002e, 0x0005,
+	0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da,
+	0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce,
+	0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5,
+	0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3,
+	0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9,
+	0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b,
+	0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081,
+	0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073,
+	0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69,
+	0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056,
+	0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c,
+	0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c,
+	0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831,
+	0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026,
+	0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017,
+	0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000,
+	0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000,
+	0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300,
+	0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100,
+	0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00,
+	0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800,
+	0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000,
+	0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000,
+	0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000,
+	0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500,
+	0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000,
+	0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000,
+	0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000,
+	0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000,
+	0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
 	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x2071, 0x189e, 0x7003, 0x0002,
-	0x9006, 0x7016, 0x701a, 0x704a, 0x704e, 0x700e, 0x7042, 0x7046,
-	0x703b, 0x18ba, 0x703f, 0x18ba, 0x7007, 0x0001, 0x080c, 0x1053,
-	0x090c, 0x0d7d, 0x2900, 0x706a, 0xa867, 0x0002, 0xa8ab, 0xdcb0,
-	0x080c, 0x1053, 0x090c, 0x0d7d, 0x2900, 0x706e, 0xa867, 0x0002,
-	0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x189e, 0x7004, 0x0002, 0x34a3,
-	0x34a4, 0x34b7, 0x34cb, 0x0005, 0x1004, 0x34b4, 0x0e04, 0x34b4,
-	0x2079, 0x0000, 0x0126, 0x2091, 0x8000, 0x700c, 0x9005, 0x1128,
-	0x700f, 0x0001, 0x012e, 0x0468, 0x0005, 0x012e, 0x0ce8, 0x2079,
-	0x0000, 0x2061, 0x18b8, 0x2c4c, 0xa86c, 0x908e, 0x0100, 0x0128,
-	0x9086, 0x0200, 0x0904, 0x359f, 0x0005, 0x7018, 0x2048, 0x2061,
-	0x1800, 0x701c, 0x0807, 0x7014, 0x2048, 0xa864, 0x9094, 0x00ff,
-	0x9296, 0x0029, 0x1120, 0xaa78, 0xd2fc, 0x0128, 0x0005, 0x9086,
-	0x0103, 0x0108, 0x0005, 0x2079, 0x0000, 0x2061, 0x1800, 0x701c,
-	0x0807, 0x2061, 0x1800, 0x7880, 0x908a, 0x0040, 0x1210, 0x61d0,
-	0x0042, 0x2100, 0x908a, 0x003f, 0x1a04, 0x359c, 0x61d0, 0x0804,
-	0x3531, 0x3573, 0x35ab, 0x35b5, 0x35b9, 0x35c3, 0x35c9, 0x35cd,
-	0x35dd, 0x35e0, 0x35ea, 0x35ef, 0x35f4, 0x35ff, 0x360a, 0x3619,
-	0x3628, 0x3636, 0x364d, 0x3668, 0x359c, 0x3711, 0x374f, 0x37f4,
-	0x3805, 0x3828, 0x359c, 0x359c, 0x359c, 0x3860, 0x3880, 0x3889,
-	0x38b5, 0x38bb, 0x359c, 0x3901, 0x359c, 0x359c, 0x359c, 0x359c,
-	0x359c, 0x390c, 0x3915, 0x391d, 0x391f, 0x359c, 0x359c, 0x359c,
-	0x359c, 0x359c, 0x359c, 0x394f, 0x359c, 0x359c, 0x359c, 0x359c,
-	0x359c, 0x396c, 0x39d0, 0x359c, 0x359c, 0x359c, 0x359c, 0x359c,
-	0x359c, 0x0002, 0x39fa, 0x39fd, 0x3a5c, 0x3a75, 0x3aa5, 0x3d47,
-	0x359c, 0x52ab, 0x359c, 0x359c, 0x359c, 0x359c, 0x359c, 0x359c,
-	0x359c, 0x359c, 0x35ea, 0x35ef, 0x4246, 0x56fe, 0x4264, 0x533a,
-	0x538b, 0x548e, 0x359c, 0x54f0, 0x552c, 0x555d, 0x5669, 0x558a,
-	0x55e9, 0x359c, 0x4268, 0x441d, 0x4433, 0x4458, 0x44bd, 0x4531,
-	0x4551, 0x45c8, 0x4624, 0x4680, 0x4683, 0x46a8, 0x4718, 0x4782,
-	0x478a, 0x48bc, 0x4a31, 0x4a65, 0x4cc9, 0x359c, 0x4ce7, 0x4d93,
-	0x4e75, 0x4ecf, 0x359c, 0x4f84, 0x359c, 0x4fea, 0x5005, 0x478a,
-	0x524b, 0x714c, 0x0000, 0x2021, 0x4000, 0x080c, 0x4ae3, 0x0126,
-	0x2091, 0x8000, 0x0e04, 0x357d, 0x0010, 0x012e, 0x0cc0, 0x7c36,
-	0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010,
-	0x7c82, 0x7986, 0x7a8a, 0x7b8e, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11d6, 0x7007, 0x0001, 0x2091, 0x5000,
-	0x700f, 0x0000, 0x012e, 0x0005, 0x2021, 0x4001, 0x08b0, 0x2021,
-	0x4002, 0x0898, 0x2021, 0x4003, 0x0880, 0x2021, 0x4005, 0x0868,
-	0x2021, 0x4006, 0x0850, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88,
-	0x7a8c, 0x7884, 0x7990, 0x0804, 0x4af0, 0x7883, 0x0004, 0x7884,
-	0x0807, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884,
-	0x7990, 0x0804, 0x4af3, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804,
-	0x3573, 0x7984, 0x2114, 0x0804, 0x3573, 0x20e1, 0x0000, 0x2099,
+	0x2071, 0x189e, 0x7003, 0x0002, 0x9006, 0x7016, 0x701a, 0x704a,
+	0x704e, 0x700e, 0x7042, 0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba,
+	0x7007, 0x0001, 0x080c, 0x1053, 0x090c, 0x0d7d, 0x2900, 0x706a,
+	0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x1053, 0x090c, 0x0d7d,
+	0x2900, 0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071,
+	0x189e, 0x7004, 0x0002, 0x3497, 0x3498, 0x34ab, 0x34bf, 0x0005,
+	0x1004, 0x34a8, 0x0e04, 0x34a8, 0x2079, 0x0000, 0x0126, 0x2091,
+	0x8000, 0x700c, 0x9005, 0x1128, 0x700f, 0x0001, 0x012e, 0x0468,
+	0x0005, 0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18b8, 0x2c4c,
+	0xa86c, 0x908e, 0x0100, 0x0128, 0x9086, 0x0200, 0x0904, 0x3593,
+	0x0005, 0x7018, 0x2048, 0x2061, 0x1800, 0x701c, 0x0807, 0x7014,
+	0x2048, 0xa864, 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78,
+	0xd2fc, 0x0128, 0x0005, 0x9086, 0x0103, 0x0108, 0x0005, 0x2079,
+	0x0000, 0x2061, 0x1800, 0x701c, 0x0807, 0x2061, 0x1800, 0x7880,
+	0x908a, 0x0040, 0x1210, 0x61d0, 0x0042, 0x2100, 0x908a, 0x003f,
+	0x1a04, 0x3590, 0x61d0, 0x0804, 0x3525, 0x3567, 0x359f, 0x3590,
+	0x35a9, 0x35b3, 0x35b9, 0x35bd, 0x35cd, 0x35d1, 0x35e7, 0x35ed,
+	0x35f3, 0x35fe, 0x3609, 0x3618, 0x3627, 0x3635, 0x364c, 0x3667,
+	0x3590, 0x3710, 0x374e, 0x37f3, 0x3804, 0x3827, 0x3590, 0x3590,
+	0x3590, 0x385f, 0x387f, 0x3888, 0x38b4, 0x38ba, 0x3590, 0x3900,
+	0x3590, 0x3590, 0x3590, 0x3590, 0x3590, 0x390b, 0x3914, 0x391c,
+	0x391e, 0x3590, 0x3590, 0x3590, 0x3590, 0x3590, 0x3590, 0x394e,
+	0x3590, 0x3590, 0x3590, 0x3590, 0x3590, 0x396b, 0x39cf, 0x3590,
+	0x3590, 0x3590, 0x3590, 0x3590, 0x3590, 0x0002, 0x39f9, 0x39fc,
+	0x3a5b, 0x3a74, 0x3aa4, 0x3d46, 0x3590, 0x52a6, 0x3590, 0x3590,
+	0x3590, 0x3590, 0x3590, 0x3590, 0x3590, 0x3590, 0x35e7, 0x35ed,
+	0x4245, 0x56f9, 0x4263, 0x5335, 0x5386, 0x5489, 0x3590, 0x54eb,
+	0x5527, 0x5558, 0x5664, 0x5585, 0x55e4, 0x3590, 0x4267, 0x441c,
+	0x4432, 0x4457, 0x44bc, 0x4530, 0x4550, 0x45c7, 0x4623, 0x467f,
+	0x4682, 0x46a7, 0x4717, 0x4781, 0x4789, 0x48bb, 0x4a33, 0x4a67,
+	0x4ccb, 0x3590, 0x4ce9, 0x4d8e, 0x4e70, 0x4eca, 0x3590, 0x4f7f,
+	0x3590, 0x4fe5, 0x5000, 0x4789, 0x5246, 0x714c, 0x0000, 0x2021,
+	0x4000, 0x080c, 0x4ae5, 0x0126, 0x2091, 0x8000, 0x0e04, 0x3571,
+	0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833,
+	0x0011, 0x0010, 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e,
+	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e1,
+	0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005,
+	0x2021, 0x4001, 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021, 0x4003,
+	0x0880, 0x2021, 0x4005, 0x0868, 0x2021, 0x4006, 0x0850, 0x2039,
+	0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804,
+	0x4af2, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884,
+	0x7990, 0x0804, 0x4af5, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804,
+	0x3567, 0x7984, 0x2114, 0x0804, 0x3567, 0x20e1, 0x0000, 0x2099,
 	0x0021, 0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f, 0x4003,
-	0x7984, 0x7a88, 0x7b8c, 0x0804, 0x3573, 0x7884, 0x2060, 0x04d8,
-	0x2009, 0x0003, 0x2011, 0x0002, 0x2019, 0x001c, 0x789b, 0x0137,
-	0x0804, 0x3573, 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0800, 0x2039,
-	0x0001, 0x7d98, 0x7c9c, 0x0848, 0x79a0, 0x9182, 0x0040, 0x0210,
-	0x0804, 0x35a8, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x35af, 0x79a0,
-	0x9182, 0x0040, 0x0210, 0x0804, 0x35a8, 0x2138, 0x7d98, 0x7c9c,
-	0x0804, 0x35bd, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x35a8,
-	0x21e8, 0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804,
-	0x3573, 0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60,
-	0x8109, 0x1dd8, 0x2010, 0x9005, 0x0904, 0x3573, 0x0804, 0x35a2,
-	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x35a8, 0x21e0, 0x20a9,
-	0x0001, 0x7984, 0x2198, 0x4012, 0x0804, 0x3573, 0x2069, 0x1847,
-	0x7884, 0x7990, 0x911a, 0x1a04, 0x35a8, 0x8019, 0x0904, 0x35a8,
-	0x684a, 0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a,
-	0x685e, 0x080c, 0x781e, 0x0804, 0x3573, 0x2069, 0x1847, 0x7884,
-	0x7994, 0x911a, 0x1a04, 0x35a8, 0x8019, 0x0904, 0x35a8, 0x684e,
-	0x6946, 0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x6ad5, 0x012e, 0x0804, 0x3573,
-	0x902e, 0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35a5,
-	0x7984, 0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1,
-	0x18a6, 0x4101, 0x080c, 0x4aa7, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x35a5, 0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c,
-	0x4af0, 0x701f, 0x368c, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff,
-	0x9096, 0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015,
-	0x0138, 0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x35a5,
-	0x810f, 0x918c, 0x00ff, 0x0904, 0x35a5, 0x7112, 0x7010, 0x8001,
-	0x0560, 0x7012, 0x080c, 0x4aa7, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x35a5, 0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494,
-	0xa598, 0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9,
-	0x0000, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4af0, 0x701f,
-	0x36ca, 0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120,
-	0x9096, 0x000a, 0x1904, 0x35a5, 0x0888, 0x7014, 0x2048, 0xa868,
-	0xc0fd, 0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160,
-	0xc2fd, 0xaa7a, 0x080c, 0x6196, 0x0150, 0x0126, 0x2091, 0x8000,
-	0xa87a, 0xa982, 0x012e, 0x0050, 0x080c, 0x64bf, 0x1128, 0x7007,
-	0x0003, 0x701f, 0x36f6, 0x0005, 0x080c, 0x6fc0, 0x0126, 0x2091,
-	0x8000, 0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x18a6, 0x400a,
-	0x2100, 0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000,
-	0xa85c, 0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804,
-	0x4af3, 0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883,
-	0x4000, 0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009,
-	0x017f, 0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200,
-	0x2061, 0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd,
-	0x2104, 0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x0180, 0x2001, 0x1a22, 0x2004, 0x9005, 0x0128,
-	0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003,
-	0x0002, 0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff,
-	0x1904, 0x35a5, 0x7984, 0x080c, 0x6625, 0x1904, 0x35a8, 0x7e98,
-	0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x35a8, 0x7c88, 0x7d8c,
-	0x080c, 0x6857, 0x080c, 0x67e8, 0x1518, 0x2061, 0x1ddc, 0x0126,
-	0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d,
-	0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0150, 0x012e,
-	0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a04, 0x35a5,
-	0x0c30, 0x080c, 0xc443, 0x012e, 0x0904, 0x35a5, 0x0804, 0x3573,
-	0x900e, 0x2001, 0x0005, 0x080c, 0x6fc0, 0x0126, 0x2091, 0x8000,
-	0x080c, 0xcb3c, 0x080c, 0x6d80, 0x012e, 0x0804, 0x3573, 0x00a6,
-	0x2950, 0xb198, 0x080c, 0x6625, 0x1904, 0x37e1, 0xb6a4, 0x9684,
-	0x3fff, 0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x6857,
-	0x080c, 0x6802, 0x1520, 0x2061, 0x1ddc, 0x0126, 0x2091, 0x8000,
-	0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c,
-	0x9406, 0x1118, 0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, 0x001c,
-	0x2001, 0x181a, 0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28,
-	0x080c, 0xc443, 0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, 0x900e,
-	0x2001, 0x0005, 0x080c, 0x6fc0, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xcb3c, 0x080c, 0x6d74, 0x012e, 0x0070, 0xb097, 0x4005, 0xb19a,
-	0x0010, 0xb097, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
-	0x2a48, 0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, 0x918d, 0x0001,
-	0x2008, 0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, 0x35a5, 0x080c,
-	0x4abe, 0x0904, 0x35a8, 0x080c, 0x66ec, 0x0904, 0x35a5, 0x080c,
-	0x685d, 0x0904, 0x35a5, 0x0804, 0x4548, 0x81ff, 0x1904, 0x35a5,
-	0x080c, 0x4ada, 0x0904, 0x35a8, 0x080c, 0x68eb, 0x0904, 0x35a5,
-	0x2019, 0x0005, 0x79a8, 0x080c, 0x6878, 0x0904, 0x35a5, 0x7888,
-	0x908a, 0x1000, 0x1a04, 0x35a8, 0x8003, 0x800b, 0x810b, 0x9108,
-	0x080c, 0x864c, 0x7984, 0xd184, 0x1904, 0x3573, 0x0804, 0x4548,
-	0x0126, 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450,
-	0x2029, 0x07ff, 0x645c, 0x2400, 0x9506, 0x01f8, 0x2508, 0x080c,
-	0x6625, 0x11d8, 0x080c, 0x68eb, 0x1128, 0x2009, 0x0002, 0x62c0,
-	0x2518, 0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, 0x6878, 0x1118,
-	0x2009, 0x0006, 0x0078, 0x7884, 0x908a, 0x1000, 0x1270, 0x8003,
-	0x800b, 0x810b, 0x9108, 0x080c, 0x864c, 0x8529, 0x1ae0, 0x012e,
-	0x0804, 0x3573, 0x012e, 0x0804, 0x35a5, 0x012e, 0x0804, 0x35a8,
-	0x080c, 0x4abe, 0x0904, 0x35a8, 0x080c, 0x66ec, 0x0904, 0x35a5,
-	0x080c, 0xa896, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c,
-	0x93a5, 0x0076, 0x903e, 0x080c, 0x9277, 0x900e, 0x080c, 0xdfeb,
-	0x007e, 0x00ce, 0x080c, 0xa8b2, 0x080c, 0x6857, 0x0804, 0x3573,
-	0x080c, 0x4abe, 0x0904, 0x35a8, 0x080c, 0x6857, 0x2208, 0x0804,
-	0x3573, 0x0156, 0x00d6, 0x00e6, 0x00c6, 0x2069, 0x1910, 0x6810,
-	0x6914, 0x910a, 0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x2071,
-	0x19e7, 0x7028, 0x9065, 0x0118, 0x8210, 0x600c, 0x0cd8, 0x2300,
-	0x9218, 0x00ce, 0x00ee, 0x00de, 0x015e, 0x0804, 0x3573, 0x00f6,
-	0x0016, 0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110,
-	0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1910, 0x6910,
-	0x62bc, 0x0804, 0x3573, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
-	0x35a5, 0x0126, 0x2091, 0x8000, 0x080c, 0x56ee, 0x0128, 0x2009,
-	0x0007, 0x012e, 0x0804, 0x35a5, 0x012e, 0x615c, 0x9190, 0x3374,
-	0x2215, 0x9294, 0x00ff, 0x637c, 0x83ff, 0x0108, 0x6280, 0x67dc,
-	0x97c4, 0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8,
-	0x97c4, 0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8,
-	0x97c4, 0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068,
-	0x080c, 0x74e9, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120,
-	0x2009, 0x0005, 0x0804, 0x35a5, 0x9036, 0x7e9a, 0x7f9e, 0x0804,
-	0x3573, 0x614c, 0x6250, 0x2019, 0x1986, 0x231c, 0x2001, 0x1987,
-	0x2004, 0x789a, 0x0804, 0x3573, 0x0126, 0x2091, 0x8000, 0x6138,
-	0x623c, 0x6340, 0x012e, 0x0804, 0x3573, 0x080c, 0x4ada, 0x0904,
-	0x35a8, 0xba44, 0xbb38, 0x0804, 0x3573, 0x080c, 0x0d7d, 0x080c,
-	0x4ada, 0x2110, 0x0904, 0x35a8, 0xb804, 0x908c, 0x00ff, 0x918e,
-	0x0006, 0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009,
-	0x1904, 0x35a5, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6,
-	0x9066, 0x080c, 0xa896, 0x080c, 0xa38a, 0x080c, 0x93a5, 0x0076,
-	0x903e, 0x080c, 0x9277, 0x900e, 0x080c, 0xdfeb, 0x007e, 0x00ce,
-	0x080c, 0xa8b2, 0xb807, 0x0407, 0x012e, 0x0804, 0x3573, 0x614c,
-	0x6250, 0x7884, 0x604e, 0x7b88, 0x6352, 0x2069, 0x1847, 0x831f,
-	0x9305, 0x6816, 0x788c, 0x2069, 0x1986, 0x2d1c, 0x206a, 0x7e98,
-	0x9682, 0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, 0x1987, 0x2d04,
-	0x266a, 0x789a, 0x0804, 0x3573, 0x0126, 0x2091, 0x8000, 0x6138,
-	0x7884, 0x603a, 0x910e, 0xd1b4, 0x190c, 0x0ecc, 0xd0c4, 0x01a8,
-	0x00d6, 0x78a8, 0x2009, 0x199d, 0x200a, 0x78ac, 0x2011, 0x199e,
-	0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214,
-	0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x7888, 0x603e, 0x2011,
-	0x0116, 0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0040, 0x0010,
-	0x918c, 0xff7f, 0x2112, 0x6140, 0x788c, 0x6042, 0x910e, 0xd1e4,
-	0x190c, 0x0ee7, 0x9084, 0x0020, 0x0130, 0x78b4, 0x6046, 0x9084,
-	0x0001, 0x090c, 0x4246, 0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011,
-	0x0114, 0x2012, 0x012e, 0x0804, 0x3573, 0x00f6, 0x2079, 0x1800,
-	0x7a38, 0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf,
-	0x8002, 0x9214, 0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897,
-	0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, 0x0005,
-	0x7898, 0x9005, 0x01a8, 0x7888, 0x9025, 0x0904, 0x35a8, 0x788c,
-	0x902d, 0x0904, 0x35a8, 0x900e, 0x080c, 0x6625, 0x1120, 0xba44,
-	0xbb38, 0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0,
-	0x080c, 0x4ada, 0x0904, 0x35a8, 0x7888, 0x900d, 0x0904, 0x35a8,
-	0x788c, 0x9005, 0x0904, 0x35a8, 0xba44, 0xb946, 0xbb38, 0xb83a,
-	0x0804, 0x3573, 0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c,
-	0x56ee, 0x1904, 0x35a5, 0x00c6, 0x2061, 0x0100, 0x7984, 0x9186,
-	0x00ff, 0x1130, 0x2001, 0x1818, 0x2004, 0x9085, 0xff00, 0x0088,
-	0x9182, 0x007f, 0x16e0, 0x9188, 0x3374, 0x210d, 0x918c, 0x00ff,
-	0x2001, 0x1818, 0x2004, 0x0026, 0x9116, 0x002e, 0x0580, 0x810f,
-	0x9105, 0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0xab97, 0x000e,
-	0x0510, 0x602e, 0x620a, 0x7984, 0x00b6, 0x080c, 0x65ca, 0x2b08,
-	0x00be, 0x1500, 0x6112, 0x6023, 0x0001, 0x080c, 0x4aa7, 0x01d0,
-	0x9006, 0xa866, 0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a,
-	0x701f, 0x3a55, 0x2900, 0x6016, 0x2009, 0x0032, 0x080c, 0xac8c,
-	0x012e, 0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x35a5, 0x00ce,
-	0x0804, 0x35a8, 0x080c, 0xabed, 0x0cb0, 0xa830, 0x9086, 0x0100,
-	0x0904, 0x35a5, 0x0804, 0x3573, 0x2061, 0x1a6f, 0x0126, 0x2091,
-	0x8000, 0x6000, 0xd084, 0x0170, 0x6104, 0x6208, 0x2061, 0x1800,
-	0x6354, 0x6074, 0x789a, 0x60c0, 0x789e, 0x60bc, 0x78aa, 0x012e,
-	0x0804, 0x3573, 0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, 0x35a5,
-	0x080c, 0x74e9, 0x0904, 0x35a5, 0x0126, 0x2091, 0x8000, 0x6254,
-	0x6074, 0x9202, 0x0248, 0x9085, 0x0001, 0x080c, 0x2664, 0x080c,
-	0x5908, 0x012e, 0x0804, 0x3573, 0x012e, 0x0804, 0x35a8, 0x0006,
-	0x0016, 0x00c6, 0x00e6, 0x2001, 0x19a9, 0x2070, 0x2061, 0x1847,
-	0x6008, 0x2072, 0x900e, 0x2011, 0x1400, 0x080c, 0x9166, 0x7206,
-	0x00ee, 0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3575, 0x7884,
-	0xd0fc, 0x0148, 0x2001, 0x002a, 0x2004, 0x9082, 0x00e1, 0x0288,
-	0x012e, 0x0804, 0x35a8, 0x2001, 0x002a, 0x2004, 0x2069, 0x1847,
-	0x6908, 0x9102, 0x1230, 0x012e, 0x0804, 0x35a8, 0x012e, 0x0804,
-	0x35a5, 0x080c, 0xab57, 0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x3b20,
-	0x00c6, 0x080c, 0x4aa7, 0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884,
-	0xa80a, 0x7898, 0xa80e, 0x789c, 0xa812, 0x2001, 0x002e, 0x2004,
-	0xa81a, 0x2001, 0x002f, 0x2004, 0xa81e, 0x2001, 0x0030, 0x2004,
-	0xa822, 0x2001, 0x0031, 0x2004, 0xa826, 0x2001, 0x0034, 0x2004,
-	0xa82a, 0x2001, 0x0035, 0x2004, 0xa82e, 0x2001, 0x002a, 0x2004,
-	0x9080, 0x0003, 0x9084, 0x00fc, 0x8004, 0xa816, 0x080c, 0x3caa,
-	0x0928, 0x7014, 0x2048, 0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930,
-	0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b,
-	0x080c, 0x4af0, 0x701f, 0x3be7, 0x7023, 0x0001, 0x012e, 0x0005,
-	0x080c, 0xa896, 0x0046, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3a8f, 0x2001, 0x199f, 0x2003,
-	0x0000, 0x2021, 0x000a, 0x2061, 0x0100, 0x6104, 0x0016, 0x60bb,
-	0x0000, 0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c, 0x3d19, 0x080c,
-	0x3cd8, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x19e7, 0x2079,
-	0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001,
-	0x0035, 0x2004, 0x780e, 0x2001, 0x0034, 0x2004, 0x780a, 0x00de,
-	0x2011, 0x0001, 0x080c, 0x408a, 0x008e, 0x00ee, 0x00fe, 0x080c,
-	0x3fb7, 0x080c, 0x3ee4, 0x05b8, 0x2001, 0x020b, 0x2004, 0x9084,
-	0x0140, 0x1db8, 0x080c, 0x40fe, 0x00f6, 0x2079, 0x0300, 0x78bc,
-	0x00fe, 0x908c, 0x0070, 0x1560, 0x2071, 0x0200, 0x7037, 0x0000,
-	0x7050, 0x9084, 0xff00, 0x9086, 0x3200, 0x1510, 0x7037, 0x0001,
-	0x7050, 0x9084, 0xff00, 0x9086, 0xe100, 0x11d0, 0x7037, 0x0000,
-	0x7054, 0x7037, 0x0000, 0x715c, 0x9106, 0x1190, 0x2001, 0x1820,
-	0x2004, 0x9106, 0x1168, 0x00c6, 0x2061, 0x0100, 0x6024, 0x9084,
-	0x1e00, 0x00ce, 0x0138, 0x080c, 0x3eee, 0x080c, 0x3cd3, 0x0058,
-	0x080c, 0x3cd3, 0x080c, 0x4022, 0x080c, 0x3fad, 0x2001, 0x020b,
-	0x2004, 0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061,
-	0x0100, 0x6027, 0x0002, 0x001e, 0x6106, 0x2011, 0x020d, 0x2013,
-	0x0020, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001,
-	0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x1328, 0x2009,
-	0x0028, 0x080c, 0x21b0, 0x2001, 0x0227, 0x200c, 0x2102, 0x080c,
-	0xa8b2, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
-	0x008e, 0x004e, 0x2001, 0x199f, 0x2004, 0x9005, 0x1118, 0x012e,
-	0x0804, 0x3573, 0x012e, 0x2021, 0x400c, 0x0804, 0x3575, 0x0016,
-	0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6,
-	0x0156, 0x7014, 0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804,
-	0x9005, 0x0904, 0x3c43, 0x2048, 0x1f04, 0x3bf7, 0x7068, 0x2040,
-	0xa28c, 0xa390, 0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120,
-	0x2029, 0x0000, 0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864,
-	0x009e, 0x9086, 0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4af0, 0x701f,
-	0x3be7, 0x00b0, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
-	0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0,
-	0x0006, 0x080c, 0x0fb7, 0x000e, 0x080c, 0x4af3, 0x701f, 0x3be7,
-	0x015e, 0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e,
-	0x002e, 0x001e, 0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103,
-	0x1118, 0x701f, 0x3ca8, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd,
-	0xa86a, 0x2009, 0x007f, 0x080c, 0x65c4, 0x0110, 0x9006, 0x0030,
-	0xb813, 0x00ff, 0xb817, 0xfffd, 0x080c, 0xcd1b, 0x015e, 0x00de,
-	0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0904, 0x35a5, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076,
-	0x0086, 0x0096, 0x00d6, 0x0156, 0x701f, 0x3c7a, 0x7007, 0x0003,
-	0x0804, 0x3c38, 0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904,
-	0x3575, 0x0076, 0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808,
+	0x7984, 0x7a88, 0x7b8c, 0x0804, 0x3567, 0x7884, 0x2060, 0x0804,
+	0x361a, 0x2009, 0x0003, 0x2011, 0x0002, 0x2019, 0x001e, 0x789b,
+	0x0137, 0x7893, 0xffff, 0x2001, 0x188f, 0x2004, 0x9005, 0x0118,
+	0x7896, 0x0804, 0x3567, 0x7897, 0x0001, 0x0804, 0x3567, 0x2039,
+	0x0001, 0x7d98, 0x7c9c, 0x0804, 0x35a3, 0x2039, 0x0001, 0x7d98,
+	0x7c9c, 0x0804, 0x35ad, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804,
+	0x359c, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x35a3, 0x79a0, 0x9182,
+	0x0040, 0x0210, 0x0804, 0x359c, 0x2138, 0x7d98, 0x7c9c, 0x0804,
+	0x35ad, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x359c, 0x21e8,
+	0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804, 0x3567,
+	0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109,
+	0x1dd8, 0x2010, 0x9005, 0x0904, 0x3567, 0x0804, 0x3596, 0x79a0,
+	0x9182, 0x0040, 0x0210, 0x0804, 0x359c, 0x21e0, 0x20a9, 0x0001,
+	0x7984, 0x2198, 0x4012, 0x0804, 0x3567, 0x2069, 0x1847, 0x7884,
+	0x7990, 0x911a, 0x1a04, 0x359c, 0x8019, 0x0904, 0x359c, 0x684a,
+	0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a, 0x685e,
+	0x080c, 0x77fd, 0x0804, 0x3567, 0x2069, 0x1847, 0x7884, 0x7994,
+	0x911a, 0x1a04, 0x359c, 0x8019, 0x0904, 0x359c, 0x684e, 0x6946,
+	0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x6ad0, 0x012e, 0x0804, 0x3567, 0x902e,
+	0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3599, 0x7984,
+	0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1, 0x18a6,
+	0x4101, 0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002, 0x0804, 0x3599,
+	0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4af2,
+	0x701f, 0x368b, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff, 0x9096,
+	0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015, 0x0138,
+	0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x3599, 0x810f,
+	0x918c, 0x00ff, 0x0904, 0x3599, 0x7112, 0x7010, 0x8001, 0x0560,
+	0x7012, 0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002, 0x0804, 0x3599,
+	0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598,
+	0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000,
+	0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4af2, 0x701f, 0x36c9,
+	0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120, 0x9096,
+	0x000a, 0x1904, 0x3599, 0x0888, 0x7014, 0x2048, 0xa868, 0xc0fd,
+	0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160, 0xc2fd,
+	0xaa7a, 0x080c, 0x6191, 0x0150, 0x0126, 0x2091, 0x8000, 0xa87a,
+	0xa982, 0x012e, 0x0050, 0x080c, 0x64ba, 0x1128, 0x7007, 0x0003,
+	0x701f, 0x36f5, 0x0005, 0x080c, 0x6faf, 0x0126, 0x2091, 0x8000,
+	0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x18a6, 0x400a, 0x2100,
+	0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c,
+	0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804, 0x4af5,
+	0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883, 0x4000,
+	0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009, 0x017f,
+	0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200, 0x2061,
+	0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd, 0x2104,
+	0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x0180, 0x2001, 0x1a21, 0x2004, 0x9005, 0x0128, 0x2001,
+	0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002,
+	0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff, 0x1904,
+	0x3599, 0x7984, 0x080c, 0x6620, 0x1904, 0x359c, 0x7e98, 0x9684,
+	0x3fff, 0x9082, 0x4000, 0x1a04, 0x359c, 0x7c88, 0x7d8c, 0x080c,
+	0x6856, 0x080c, 0x67e3, 0x1518, 0x2061, 0x1ddc, 0x0126, 0x2091,
+	0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130,
+	0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0,
+	0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a04, 0x3599, 0x0c30,
+	0x080c, 0xc430, 0x012e, 0x0904, 0x3599, 0x0804, 0x3567, 0x900e,
+	0x2001, 0x0005, 0x080c, 0x6faf, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xcb3b, 0x080c, 0x6d7b, 0x012e, 0x0804, 0x3567, 0x00a6, 0x2950,
+	0xb198, 0x080c, 0x6620, 0x1904, 0x37e0, 0xb6a4, 0x9684, 0x3fff,
+	0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x6856, 0x080c,
+	0x6800, 0x1520, 0x2061, 0x1ddc, 0x0126, 0x2091, 0x8000, 0x6000,
+	0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406,
+	0x1118, 0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, 0x001c, 0x2001,
+	0x181a, 0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c,
+	0xc430, 0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, 0x900e, 0x2001,
+	0x0005, 0x080c, 0x6faf, 0x0126, 0x2091, 0x8000, 0x080c, 0xcb3b,
+	0x080c, 0x6d6f, 0x012e, 0x0070, 0xb097, 0x4005, 0xb19a, 0x0010,
+	0xb097, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x2a48,
+	0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, 0x918d, 0x0001, 0x2008,
+	0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, 0x3599, 0x080c, 0x4ac0,
+	0x0904, 0x359c, 0x080c, 0x66e7, 0x0904, 0x3599, 0x080c, 0x685c,
+	0x0904, 0x3599, 0x0804, 0x4547, 0x81ff, 0x1904, 0x3599, 0x080c,
+	0x4adc, 0x0904, 0x359c, 0x080c, 0x68ea, 0x0904, 0x3599, 0x2019,
+	0x0005, 0x79a8, 0x080c, 0x6877, 0x0904, 0x3599, 0x7888, 0x908a,
+	0x1000, 0x1a04, 0x359c, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c,
+	0x862b, 0x7984, 0xd184, 0x1904, 0x3567, 0x0804, 0x4547, 0x0126,
+	0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029,
+	0x07ff, 0x645c, 0x2400, 0x9506, 0x01f8, 0x2508, 0x080c, 0x6620,
+	0x11d8, 0x080c, 0x68ea, 0x1128, 0x2009, 0x0002, 0x62c0, 0x2518,
+	0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, 0x6877, 0x1118, 0x2009,
+	0x0006, 0x0078, 0x7884, 0x908a, 0x1000, 0x1270, 0x8003, 0x800b,
+	0x810b, 0x9108, 0x080c, 0x862b, 0x8529, 0x1ae0, 0x012e, 0x0804,
+	0x3567, 0x012e, 0x0804, 0x3599, 0x012e, 0x0804, 0x359c, 0x080c,
+	0x4ac0, 0x0904, 0x359c, 0x080c, 0x66e7, 0x0904, 0x3599, 0x080c,
+	0xa888, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x938d,
+	0x0076, 0x903e, 0x080c, 0x9256, 0x900e, 0x080c, 0xdffb, 0x007e,
+	0x00ce, 0x080c, 0xa8a4, 0x080c, 0x6856, 0x0804, 0x3567, 0x080c,
+	0x4ac0, 0x0904, 0x359c, 0x080c, 0x6856, 0x2208, 0x0804, 0x3567,
+	0x0156, 0x00d6, 0x00e6, 0x00c6, 0x2069, 0x1910, 0x6810, 0x6914,
+	0x910a, 0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x2071, 0x19e6,
+	0x7028, 0x9065, 0x0118, 0x8210, 0x600c, 0x0cd8, 0x2300, 0x9218,
+	0x00ce, 0x00ee, 0x00de, 0x015e, 0x0804, 0x3567, 0x00f6, 0x0016,
+	0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178,
+	0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1910, 0x6910, 0x62bc,
+	0x0804, 0x3567, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3599,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x56e9, 0x0128, 0x2009, 0x0007,
+	0x012e, 0x0804, 0x3599, 0x012e, 0x615c, 0x9190, 0x3368, 0x2215,
+	0x9294, 0x00ff, 0x637c, 0x83ff, 0x0108, 0x6280, 0x67dc, 0x97c4,
+	0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8, 0x97c4,
+	0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8, 0x97c4,
+	0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068, 0x080c,
+	0x74c8, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120, 0x2009,
+	0x0005, 0x0804, 0x3599, 0x9036, 0x7e9a, 0x7f9e, 0x0804, 0x3567,
+	0x614c, 0x6250, 0x2019, 0x1985, 0x231c, 0x2001, 0x1986, 0x2004,
+	0x789a, 0x0804, 0x3567, 0x0126, 0x2091, 0x8000, 0x6138, 0x623c,
+	0x6340, 0x012e, 0x0804, 0x3567, 0x080c, 0x4adc, 0x0904, 0x359c,
+	0xba44, 0xbb38, 0x0804, 0x3567, 0x080c, 0x0d7d, 0x080c, 0x4adc,
+	0x2110, 0x0904, 0x359c, 0xb804, 0x908c, 0x00ff, 0x918e, 0x0006,
+	0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009, 0x1904,
+	0x3599, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6, 0x9066,
+	0x080c, 0xa888, 0x080c, 0xa372, 0x080c, 0x938d, 0x0076, 0x903e,
+	0x080c, 0x9256, 0x900e, 0x080c, 0xdffb, 0x007e, 0x00ce, 0x080c,
+	0xa8a4, 0xb807, 0x0407, 0x012e, 0x0804, 0x3567, 0x614c, 0x6250,
+	0x7884, 0x604e, 0x7b88, 0x6352, 0x2069, 0x1847, 0x831f, 0x9305,
+	0x6816, 0x788c, 0x2069, 0x1985, 0x2d1c, 0x206a, 0x7e98, 0x9682,
+	0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, 0x1986, 0x2d04, 0x266a,
+	0x789a, 0x0804, 0x3567, 0x0126, 0x2091, 0x8000, 0x6138, 0x7884,
+	0x603a, 0x910e, 0xd1b4, 0x190c, 0x0ecc, 0xd0c4, 0x01a8, 0x00d6,
+	0x78a8, 0x2009, 0x199c, 0x200a, 0x78ac, 0x2011, 0x199d, 0x2012,
+	0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214, 0x6a5a,
+	0x0010, 0x210c, 0x695a, 0x00de, 0x7888, 0x603e, 0x2011, 0x0116,
+	0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0040, 0x0010, 0x918c,
+	0xff7f, 0x2112, 0x6140, 0x788c, 0x6042, 0x910e, 0xd1e4, 0x190c,
+	0x0ee7, 0x9084, 0x0020, 0x0130, 0x78b4, 0x6046, 0x9084, 0x0001,
+	0x090c, 0x4245, 0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114,
+	0x2012, 0x012e, 0x0804, 0x3567, 0x00f6, 0x2079, 0x1800, 0x7a38,
+	0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002,
+	0x9214, 0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, 0x7898,
+	0x9005, 0x01a8, 0x7888, 0x9025, 0x0904, 0x359c, 0x788c, 0x902d,
+	0x0904, 0x359c, 0x900e, 0x080c, 0x6620, 0x1120, 0xba44, 0xbb38,
+	0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c,
+	0x4adc, 0x0904, 0x359c, 0x7888, 0x900d, 0x0904, 0x359c, 0x788c,
+	0x9005, 0x0904, 0x359c, 0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804,
+	0x3567, 0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, 0x56e9,
+	0x1904, 0x3599, 0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, 0x00ff,
+	0x1130, 0x2001, 0x1818, 0x2004, 0x9085, 0xff00, 0x0088, 0x9182,
+	0x007f, 0x16e0, 0x9188, 0x3368, 0x210d, 0x918c, 0x00ff, 0x2001,
+	0x1818, 0x2004, 0x0026, 0x9116, 0x002e, 0x0580, 0x810f, 0x9105,
+	0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0xab89, 0x000e, 0x0510,
+	0x602e, 0x620a, 0x7984, 0x00b6, 0x080c, 0x65c5, 0x2b08, 0x00be,
+	0x1500, 0x6112, 0x6023, 0x0001, 0x080c, 0x4aa9, 0x01d0, 0x9006,
+	0xa866, 0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f,
+	0x3a54, 0x2900, 0x6016, 0x2009, 0x0032, 0x080c, 0xac7c, 0x012e,
+	0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x3599, 0x00ce, 0x0804,
+	0x359c, 0x080c, 0xabdf, 0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904,
+	0x3599, 0x0804, 0x3567, 0x2061, 0x1a6e, 0x0126, 0x2091, 0x8000,
+	0x6000, 0xd084, 0x0170, 0x6104, 0x6208, 0x2061, 0x1800, 0x6354,
+	0x6074, 0x789a, 0x60c0, 0x789e, 0x60bc, 0x78aa, 0x012e, 0x0804,
+	0x3567, 0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, 0x3599, 0x080c,
+	0x74c8, 0x0904, 0x3599, 0x0126, 0x2091, 0x8000, 0x6254, 0x6074,
+	0x9202, 0x0248, 0x9085, 0x0001, 0x080c, 0x267d, 0x080c, 0x5903,
+	0x012e, 0x0804, 0x3567, 0x012e, 0x0804, 0x359c, 0x0006, 0x0016,
+	0x00c6, 0x00e6, 0x2001, 0x19a8, 0x2070, 0x2061, 0x1847, 0x6008,
+	0x2072, 0x900e, 0x2011, 0x1400, 0x080c, 0x9148, 0x7206, 0x00ee,
+	0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff,
+	0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3569, 0x7884, 0xd0fc,
+	0x0148, 0x2001, 0x002a, 0x2004, 0x9082, 0x00e1, 0x0288, 0x012e,
+	0x0804, 0x359c, 0x2001, 0x002a, 0x2004, 0x2069, 0x1847, 0x6908,
+	0x9102, 0x1230, 0x012e, 0x0804, 0x359c, 0x012e, 0x0804, 0x3599,
+	0x080c, 0xab49, 0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x3b1f, 0x00c6,
+	0x080c, 0x4aa9, 0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a,
+	0x7898, 0xa80e, 0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a,
+	0x2001, 0x002f, 0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822,
+	0x2001, 0x0031, 0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a,
+	0x2001, 0x0035, 0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080,
+	0x0003, 0x9084, 0x00fc, 0x8004, 0xa816, 0x080c, 0x3ca9, 0x0928,
+	0x7014, 0x2048, 0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808,
 	0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8,
-	0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0fb7, 0x000e,
-	0x080c, 0x4af3, 0x007e, 0x701f, 0x3be7, 0x7023, 0x0001, 0x0005,
-	0x0804, 0x3573, 0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218,
-	0xa833, 0x001e, 0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016,
-	0x080c, 0x4aa7, 0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a,
-	0x2100, 0x0c58, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e,
-	0x0005, 0x0006, 0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044,
-	0x00fe, 0x000e, 0x0005, 0x2001, 0x199f, 0x2003, 0x0001, 0x0005,
-	0x00f6, 0x00e6, 0x00c6, 0x2061, 0x0200, 0x2001, 0x19aa, 0x2004,
-	0x601a, 0x2061, 0x0100, 0x2001, 0x19a9, 0x2004, 0x60ce, 0x6104,
-	0xc1ac, 0x6106, 0x080c, 0x4aa7, 0xa813, 0x0019, 0xa817, 0x0001,
-	0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f,
-	0x2004, 0xa86a, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19a9,
-	0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x21b0, 0x2001, 0x002a,
-	0x2004, 0x9084, 0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f,
-	0x0000, 0x78ca, 0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe,
-	0x0005, 0x00e6, 0x080c, 0x4aa7, 0x2940, 0xa013, 0x0019, 0xa017,
-	0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001,
-	0x0031, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
-	0xa86e, 0xa873, 0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001,
-	0x0300, 0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001,
-	0x0004, 0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x81ff, 0x0148, 0x080c, 0x29e8, 0x1130, 0x9006,
-	0x080c, 0x2945, 0x9006, 0x080c, 0x2928, 0x7884, 0x9084, 0x0007,
-	0x0002, 0x3d64, 0x3d6d, 0x3d76, 0x3d61, 0x3d61, 0x3d61, 0x3d61,
-	0x3d61, 0x012e, 0x0804, 0x35a8, 0x2009, 0x0114, 0x2104, 0x9085,
-	0x0800, 0x200a, 0x080c, 0x3f38, 0x00c0, 0x2009, 0x0114, 0x2104,
-	0x9085, 0x4000, 0x200a, 0x080c, 0x3f38, 0x0078, 0x080c, 0x74e9,
-	0x1128, 0x012e, 0x2009, 0x0016, 0x0804, 0x35a5, 0x81ff, 0x0128,
-	0x012e, 0x2021, 0x400b, 0x0804, 0x3575, 0x080c, 0xa896, 0x0086,
-	0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c,
-	0x3a8f, 0x2009, 0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006,
-	0x2068, 0x2060, 0x2058, 0x080c, 0x41d9, 0x080c, 0x4129, 0x903e,
-	0x2720, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x19e7, 0x2079,
-	0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4,
-	0x780e, 0x68d0, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x408a,
-	0x080c, 0x29f0, 0x080c, 0x29f0, 0x080c, 0x29f0, 0x080c, 0x29f0,
-	0x080c, 0x408a, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3fb7, 0x2009,
-	0x9c40, 0x8109, 0x11b0, 0x080c, 0x3eee, 0x2001, 0x0004, 0x200c,
-	0x918c, 0xfffd, 0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x00be, 0x00ae, 0x009e, 0x008e, 0x2009, 0x0017, 0x080c, 0x35a5,
-	0x0cf8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6,
-	0x2079, 0x0000, 0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201,
-	0x200c, 0x81ff, 0x0150, 0x080c, 0x3f95, 0x2d00, 0x9c05, 0x9b05,
-	0x0120, 0x080c, 0x3eee, 0x0804, 0x3e97, 0x080c, 0x40fe, 0x080c,
-	0x4022, 0x080c, 0x3f78, 0x080c, 0x3fad, 0x00f6, 0x2079, 0x0100,
-	0x7824, 0xd0ac, 0x0130, 0x8b58, 0x080c, 0x3eee, 0x00fe, 0x0804,
-	0x3e97, 0x00fe, 0x080c, 0x3ee4, 0x1150, 0x8d68, 0x2001, 0x0032,
-	0x2602, 0x2001, 0x0033, 0x2502, 0x080c, 0x3eee, 0x0080, 0x87ff,
-	0x0138, 0x2001, 0x0201, 0x2004, 0x9005, 0x1908, 0x8739, 0x0038,
-	0x2001, 0x1a6b, 0x2004, 0x9086, 0x0000, 0x1904, 0x3de7, 0x2001,
-	0x032f, 0x2003, 0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0x9605,
-	0x0904, 0x3e97, 0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05,
-	0x1904, 0x3e97, 0xa013, 0x0019, 0x2001, 0x032a, 0x2003, 0x0004,
-	0x7884, 0xd0ac, 0x1148, 0x2001, 0x1a6b, 0x2003, 0x0003, 0x2001,
-	0x032a, 0x2003, 0x0009, 0x0030, 0xa017, 0x0001, 0x78b4, 0x9005,
-	0x0108, 0xa016, 0x2800, 0xa05a, 0x2009, 0x0040, 0x080c, 0x21b0,
-	0x2900, 0xa85a, 0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817,
-	0x0000, 0x00c6, 0x20a9, 0x0004, 0x2061, 0x0090, 0x602b, 0x0008,
-	0x2001, 0x0203, 0x2004, 0x1f04, 0x3e6e, 0x00ce, 0x0030, 0xa817,
-	0x0001, 0x78b0, 0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079,
-	0x0100, 0x2061, 0x0090, 0x7827, 0x0002, 0x2001, 0x002a, 0x2004,
-	0x9084, 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e,
-	0x78c6, 0x000e, 0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3da1, 0x001e,
-	0x00c6, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027,
-	0x0002, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x2001, 0x0004,
-	0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x1328, 0x7884, 0x9084,
-	0x0003, 0x9086, 0x0002, 0x01b0, 0x2009, 0x0028, 0x080c, 0x21b0,
-	0x2001, 0x0227, 0x200c, 0x2102, 0x6050, 0x9084, 0xb7ff, 0x080c,
-	0x2aab, 0x6052, 0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090,
-	0x6043, 0x0010, 0x080c, 0xa8b2, 0x00ce, 0x2d08, 0x2c10, 0x2b18,
-	0x2b00, 0x9c05, 0x9d05, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
-	0x00ae, 0x009e, 0x008e, 0x1118, 0x012e, 0x0804, 0x3573, 0x012e,
-	0x2021, 0x400c, 0x0804, 0x3575, 0x9085, 0x0001, 0x1d04, 0x3eed,
-	0x2091, 0x6000, 0x8420, 0x9486, 0x0064, 0x0005, 0x2001, 0x0105,
-	0x2003, 0x0010, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x1a6b,
-	0x2003, 0x0000, 0x0071, 0x2009, 0x0048, 0x080c, 0x21b0, 0x2001,
-	0x0227, 0x2024, 0x2402, 0x2001, 0x0109, 0x2003, 0x4000, 0x9026,
-	0x0005, 0x00f6, 0x00e6, 0x2071, 0x19e7, 0x7054, 0x9086, 0x0000,
-	0x0520, 0x2079, 0x0090, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203,
-	0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x21b0, 0x782c,
-	0xd0fc, 0x0d88, 0x080c, 0x40fe, 0x7054, 0x9086, 0x0000, 0x1d58,
-	0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c,
-	0x21b0, 0x782b, 0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005,
-	0x00f6, 0x2079, 0x0100, 0x2001, 0x1818, 0x200c, 0x7932, 0x7936,
-	0x080c, 0x2644, 0x080c, 0x2a67, 0x080c, 0x2aab, 0x784b, 0xf7f7,
-	0x7843, 0x0090, 0x7843, 0x0010, 0x7850, 0xc0e5, 0x7852, 0x2019,
-	0x61a8, 0x7820, 0xd09c, 0x0110, 0x8319, 0x1dd8, 0x7850, 0xc0e4,
-	0x7852, 0x2011, 0x0048, 0x080c, 0x2a44, 0x7843, 0x0040, 0x2019,
-	0x01f4, 0xa001, 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c,
-	0x2a0a, 0x2011, 0x0020, 0x080c, 0x2a44, 0x7843, 0x0000, 0x9006,
-	0x080c, 0x2a0a, 0x2011, 0x0048, 0x080c, 0x2a44, 0x00fe, 0x0005,
-	0x7884, 0xd0ac, 0x11c8, 0x00f6, 0x00e6, 0x2071, 0x1a6b, 0x2079,
-	0x0320, 0x2001, 0x0201, 0x2004, 0x9005, 0x0160, 0x7000, 0x9086,
-	0x0000, 0x1140, 0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003,
-	0x782b, 0x0019, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300,
-	0x78bc, 0x00fe, 0x908c, 0x0070, 0x0178, 0x2009, 0x0032, 0x260a,
-	0x2009, 0x0033, 0x250a, 0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108,
-	0x8d68, 0xd0a4, 0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200,
-	0x781c, 0xd084, 0x0110, 0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6,
-	0x2071, 0x0100, 0x2001, 0x19aa, 0x2004, 0x70e2, 0x080c, 0x3cc9,
-	0x1188, 0x2001, 0x1820, 0x2004, 0x2009, 0x181f, 0x210c, 0x918c,
-	0x00ff, 0x706e, 0x716a, 0x7066, 0x918d, 0x3200, 0x7162, 0x7073,
-	0xe109, 0x0080, 0x702c, 0x9085, 0x0002, 0x702e, 0x2009, 0x1818,
-	0x210c, 0x716e, 0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000,
-	0x7073, 0x0809, 0x7077, 0x0008, 0x7078, 0x9080, 0x0100, 0x707a,
-	0x7080, 0x8000, 0x7082, 0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e,
-	0x707e, 0x70d6, 0x70ab, 0x0036, 0x70af, 0x95d5, 0x7014, 0x9084,
-	0x1984, 0x9085, 0x0092, 0x7016, 0x080c, 0x40fe, 0x00f6, 0x2071,
-	0x1a6b, 0x2079, 0x0320, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4,
-	0x0120, 0x689c, 0x780e, 0x6898, 0x780a, 0x00de, 0x2009, 0x03e8,
-	0x8109, 0x1df0, 0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011,
-	0x0011, 0x080c, 0x408a, 0x2011, 0x0001, 0x080c, 0x408a, 0x00fe,
-	0x00ee, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a6b, 0x2079, 0x0320,
-	0x792c, 0xd1fc, 0x0904, 0x4087, 0x782b, 0x0002, 0x9026, 0xd19c,
-	0x1904, 0x4083, 0x7000, 0x0002, 0x4087, 0x4038, 0x4068, 0x4083,
-	0xd1bc, 0x1170, 0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, 0x0001,
-	0x080c, 0x408a, 0x0904, 0x4087, 0x080c, 0x408a, 0x0804, 0x4087,
-	0x00f6, 0x2079, 0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914,
-	0x782b, 0x0004, 0x7812, 0x7916, 0x2001, 0x0201, 0x200c, 0x81ff,
-	0x0de8, 0x080c, 0x3f95, 0x2009, 0x0001, 0x00f6, 0x2079, 0x0300,
-	0x78b8, 0x00fe, 0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, 0x00f8,
-	0x8001, 0x7002, 0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904,
-	0x402c, 0x2011, 0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, 0x0004,
-	0x9086, 0x0015, 0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, 0xa212,
-	0xd1dc, 0x1960, 0x0828, 0x782b, 0x0004, 0x7003, 0x0000, 0x00ee,
-	0x00fe, 0x0005, 0xa014, 0x9005, 0x0550, 0x8001, 0x0036, 0x0096,
-	0xa016, 0xa058, 0x2048, 0xa010, 0x2009, 0x0031, 0x911a, 0x831c,
-	0x831c, 0x938a, 0x0007, 0x1a0c, 0x0d7d, 0x9398, 0x40b8, 0x231d,
-	0x083f, 0x9080, 0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e,
-	0x003e, 0x908a, 0x0035, 0x1140, 0x0096, 0xa058, 0x2048, 0xa804,
-	0xa05a, 0x2001, 0x0019, 0x009e, 0xa012, 0x9085, 0x0001, 0x0005,
-	0x40f5, 0x40ec, 0x40e3, 0x40da, 0x40d1, 0x40c8, 0x40bf, 0xa964,
-	0x7902, 0xa968, 0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, 0x0005,
-	0xa974, 0x7902, 0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, 0x7916,
-	0x0005, 0xa984, 0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, 0xa990,
-	0x7916, 0x0005, 0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, 0x7912,
-	0xa9a0, 0x7916, 0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac,
-	0x7912, 0xa9b0, 0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906,
-	0xa9bc, 0x7912, 0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8,
-	0x7906, 0xa9cc, 0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6,
-	0x0086, 0x2071, 0x19e7, 0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8,
-	0x782b, 0x0002, 0x2940, 0x9026, 0x7054, 0x0002, 0x4125, 0x4111,
-	0x411c, 0x8001, 0x7056, 0xd19c, 0x1180, 0x2011, 0x0001, 0x080c,
-	0x408a, 0x190c, 0x408a, 0x0048, 0x8001, 0x7056, 0x782c, 0xd0fc,
-	0x1d38, 0x2011, 0x0001, 0x080c, 0x408a, 0x008e, 0x00ee, 0x00fe,
-	0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, 0x2001,
-	0x19aa, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x19a9, 0x2004,
-	0x60ce, 0x6104, 0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, 0x9005,
-	0x0520, 0x2038, 0x2001, 0x002e, 0x2024, 0x2001, 0x002f, 0x201c,
-	0x080c, 0x4aa7, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a,
-	0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e,
-	0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c,
-	0x41a1, 0x1d68, 0x2900, 0xa85a, 0x00d0, 0x080c, 0x4aa7, 0xa813,
-	0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004,
-	0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004,
-	0x9084, 0xfff8, 0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, 0x2061,
-	0x0090, 0x2079, 0x0100, 0x2001, 0x19a9, 0x2004, 0x6036, 0x2009,
-	0x0040, 0x080c, 0x21b0, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
-	0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e,
-	0x78ca, 0x9006, 0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe,
-	0x0005, 0x00e6, 0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1,
-	0x0000, 0x2099, 0x0088, 0x702b, 0x0026, 0x7402, 0x7306, 0x9006,
-	0x700a, 0x700e, 0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, 0x702b,
-	0x0041, 0x702c, 0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, 0x0040,
-	0x4005, 0x7400, 0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, 0x2940,
-	0x0086, 0x080c, 0x4aa7, 0x008e, 0xa058, 0x00a6, 0x2050, 0x2900,
-	0xb006, 0xa05a, 0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, 0x00ee,
-	0x0005, 0x00e6, 0x2001, 0x002d, 0x2004, 0x9005, 0x0528, 0x2038,
-	0x2001, 0x0030, 0x2024, 0x2001, 0x0031, 0x201c, 0x080c, 0x4aa7,
-	0x2940, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007,
-	0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096,
-	0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x41a1,
-	0x1d68, 0x2900, 0xa85a, 0x00d8, 0x080c, 0x4aa7, 0x2940, 0xa013,
-	0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004,
-	0xa066, 0x2001, 0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, 0x2004,
-	0x9084, 0xfff8, 0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, 0x2001,
-	0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101,
-	0x200c, 0x918d, 0x0200, 0x2102, 0xa017, 0x0000, 0x2001, 0x1a6b,
-	0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x2001, 0x0300,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c,
+	0x4af2, 0x701f, 0x3be6, 0x7023, 0x0001, 0x012e, 0x0005, 0x080c,
+	0xa888, 0x0046, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6,
+	0x00e6, 0x00f6, 0x080c, 0x3a8e, 0x2001, 0x199e, 0x2003, 0x0000,
+	0x2021, 0x000a, 0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000,
+	0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c, 0x3d18, 0x080c, 0x3cd7,
+	0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x19e6, 0x2079, 0x0090,
+	0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035,
+	0x2004, 0x780e, 0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011,
+	0x0001, 0x080c, 0x4089, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3fb6,
+	0x080c, 0x3ee3, 0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140,
+	0x1db8, 0x080c, 0x40fd, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe,
+	0x908c, 0x0070, 0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050,
+	0x9084, 0xff00, 0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050,
+	0x9084, 0xff00, 0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054,
+	0x7037, 0x0000, 0x715c, 0x9106, 0x1190, 0x2001, 0x1820, 0x2004,
+	0x9106, 0x1168, 0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00,
+	0x00ce, 0x0138, 0x080c, 0x3eed, 0x080c, 0x3cd2, 0x0058, 0x080c,
+	0x3cd2, 0x080c, 0x4021, 0x080c, 0x3fac, 0x2001, 0x020b, 0x2004,
+	0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100,
+	0x6027, 0x0002, 0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020,
+	0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004,
+	0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x1333, 0x2009, 0x0028,
+	0x080c, 0x21c1, 0x2001, 0x0227, 0x200c, 0x2102, 0x080c, 0xa8a4,
+	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e,
+	0x004e, 0x2001, 0x199e, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804,
+	0x3567, 0x012e, 0x2021, 0x400c, 0x0804, 0x3569, 0x0016, 0x0026,
+	0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156,
+	0x7014, 0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005,
+	0x0904, 0x3c42, 0x2048, 0x1f04, 0x3bf6, 0x7068, 0x2040, 0xa28c,
+	0xa390, 0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029,
+	0x0000, 0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e,
+	0x9086, 0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4af2, 0x701f, 0x3be6,
+	0x00b0, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006,
+	0x080c, 0x0fb7, 0x000e, 0x080c, 0x4af5, 0x701f, 0x3be6, 0x015e,
+	0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e,
+	0x001e, 0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118,
+	0x701f, 0x3ca7, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a,
+	0x2009, 0x007f, 0x080c, 0x65bf, 0x0110, 0x9006, 0x0030, 0xb813,
+	0x00ff, 0xb817, 0xfffd, 0x080c, 0xcd1a, 0x015e, 0x00de, 0x009e,
+	0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904,
+	0x3599, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086,
+	0x0096, 0x00d6, 0x0156, 0x701f, 0x3c79, 0x7007, 0x0003, 0x0804,
+	0x3c37, 0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x3569,
+	0x0076, 0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4,
+	0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007,
+	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0,
+	0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0fb7, 0x000e, 0x080c,
+	0x4af5, 0x007e, 0x701f, 0x3be6, 0x7023, 0x0001, 0x0005, 0x0804,
+	0x3567, 0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833,
+	0x001e, 0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c,
+	0x4aa9, 0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100,
+	0x0c58, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005,
+	0x0006, 0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe,
+	0x000e, 0x0005, 0x2001, 0x199e, 0x2003, 0x0001, 0x0005, 0x00f6,
+	0x00e6, 0x00c6, 0x2061, 0x0200, 0x2001, 0x19a9, 0x2004, 0x601a,
+	0x2061, 0x0100, 0x2001, 0x19a8, 0x2004, 0x60ce, 0x6104, 0xc1ac,
+	0x6106, 0x080c, 0x4aa9, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900,
+	0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004,
+	0xa86a, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19a8, 0x2004,
+	0x6036, 0x2009, 0x0040, 0x080c, 0x21c1, 0x2001, 0x002a, 0x2004,
+	0x9084, 0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000,
+	0x78ca, 0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005,
+	0x00e6, 0x080c, 0x4aa9, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001,
+	0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031,
+	0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e,
+	0xa873, 0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300,
 	0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004,
 	0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x20a9, 0x0007, 0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006,
-	0x4004, 0x20a9, 0x000c, 0x20a1, 0xfff4, 0x20e9, 0x0000, 0x9006,
-	0x4004, 0x2009, 0x013c, 0x200a, 0x012e, 0x7880, 0x9086, 0x0052,
-	0x0108, 0x0005, 0x0804, 0x3573, 0x7d98, 0x7c9c, 0x0804, 0x366a,
-	0x080c, 0x74e9, 0x190c, 0x5fee, 0x6040, 0x9084, 0x0020, 0x09b1,
-	0x2069, 0x1847, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0x2039, 0x0001, 0x080c, 0x4af0, 0x701f, 0x4280, 0x0005,
-	0x080c, 0x56e9, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8,
-	0x21d0, 0x2069, 0x1847, 0x6800, 0x9005, 0x0904, 0x35a8, 0x6804,
-	0xd0ac, 0x0118, 0xd0a4, 0x0904, 0x35a8, 0xd094, 0x00c6, 0x2061,
-	0x0100, 0x6104, 0x0138, 0x6200, 0x9292, 0x0005, 0x0218, 0x918c,
-	0xffdf, 0x0010, 0x918d, 0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6,
-	0x2061, 0x0100, 0x6104, 0x0118, 0x918d, 0x0010, 0x0010, 0x918c,
-	0xffef, 0x6106, 0x00ce, 0xd084, 0x0158, 0x6a28, 0x928a, 0x007f,
-	0x1a04, 0x35a8, 0x9288, 0x3374, 0x210d, 0x918c, 0x00ff, 0x6166,
-	0xd0dc, 0x0130, 0x6828, 0x908a, 0x007f, 0x1a04, 0x35a8, 0x605e,
-	0x6888, 0x9084, 0x0030, 0x8004, 0x8004, 0x8004, 0x8004, 0x0006,
-	0x2009, 0x19b1, 0x9080, 0x2737, 0x2005, 0x200a, 0x2008, 0x2001,
-	0x0018, 0x080c, 0xa887, 0x2009, 0x0390, 0x200b, 0x0400, 0x000e,
-	0x2009, 0x19b2, 0x9080, 0x273b, 0x2005, 0x200a, 0x6808, 0x908a,
-	0x0100, 0x0a04, 0x35a8, 0x908a, 0x0841, 0x1a04, 0x35a8, 0x9084,
-	0x0007, 0x1904, 0x35a8, 0x680c, 0x9005, 0x0904, 0x35a8, 0x6810,
-	0x9005, 0x0904, 0x35a8, 0x6848, 0x6940, 0x910a, 0x1a04, 0x35a8,
-	0x8001, 0x0904, 0x35a8, 0x684c, 0x6944, 0x910a, 0x1a04, 0x35a8,
-	0x8001, 0x0904, 0x35a8, 0x6814, 0x908c, 0x00ff, 0x614e, 0x8007,
-	0x9084, 0x00ff, 0x6052, 0x080c, 0x781e, 0x080c, 0x6aa1, 0x080c,
-	0x6ad5, 0x6808, 0x602a, 0x080c, 0x2122, 0x2009, 0x0170, 0x200b,
-	0x0080, 0xa001, 0xa001, 0x200b, 0x0000, 0x0036, 0x6b08, 0x080c,
-	0x269e, 0x003e, 0x6000, 0x9086, 0x0000, 0x1904, 0x440b, 0x6818,
-	0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, 0x6016,
-	0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934,
-	0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, 0x0010, 0x9084,
-	0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, 0x8007, 0x810f, 0x8217,
-	0x831f, 0x20a9, 0x0004, 0x20a1, 0x19b3, 0x20e9, 0x0001, 0x4001,
-	0x20a9, 0x0004, 0x20a1, 0x19cd, 0x20e9, 0x0001, 0x4001, 0x080c,
-	0x87d1, 0x00c6, 0x900e, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x01c8,
-	0x0020, 0x839d, 0x12b0, 0x3508, 0x8109, 0x080c, 0x7ddf, 0x6878,
-	0x6016, 0x6874, 0x2008, 0x9084, 0xff00, 0x8007, 0x600a, 0x9184,
-	0x00ff, 0x6006, 0x8108, 0x1118, 0x6003, 0x0003, 0x0010, 0x6003,
-	0x0001, 0x1f04, 0x4369, 0x00ce, 0x00c6, 0x2061, 0x199c, 0x6a88,
-	0x9284, 0xc000, 0x2010, 0x9286, 0x0000, 0x1158, 0x2063, 0x0000,
-	0x2001, 0x0001, 0x080c, 0x2945, 0x2001, 0x0001, 0x080c, 0x2928,
-	0x0088, 0x9286, 0x4000, 0x1148, 0x2063, 0x0001, 0x9006, 0x080c,
-	0x2945, 0x9006, 0x080c, 0x2928, 0x0028, 0x9286, 0x8000, 0x1d30,
-	0x2063, 0x0002, 0x00ce, 0x00e6, 0x2c70, 0x080c, 0x0eb4, 0x00ee,
-	0x6888, 0xd0ec, 0x0130, 0x2011, 0x0114, 0x2204, 0x9085, 0x0180,
-	0x2012, 0x6a80, 0x9284, 0x0030, 0x9086, 0x0030, 0x1128, 0x9294,
-	0xffcf, 0x9295, 0x0020, 0x6a82, 0x2001, 0x197c, 0x6a80, 0x9294,
-	0x0030, 0x928e, 0x0000, 0x0170, 0x928e, 0x0010, 0x0118, 0x928e,
-	0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c, 0x2713, 0x2001, 0x196d,
-	0x2102, 0x0008, 0x2102, 0x00c6, 0x2061, 0x0100, 0x602f, 0x0040,
-	0x602f, 0x0000, 0x00ce, 0x080c, 0x74e9, 0x0128, 0x080c, 0x4fde,
-	0x0110, 0x080c, 0x2664, 0x60d4, 0x9005, 0x01c0, 0x6003, 0x0001,
-	0x2009, 0x43f3, 0x00e0, 0x080c, 0x74e9, 0x1168, 0x2011, 0x735f,
-	0x080c, 0x863e, 0x2011, 0x7352, 0x080c, 0x874a, 0x080c, 0x77f2,
-	0x080c, 0x741a, 0x0040, 0x080c, 0x5ee4, 0x0028, 0x6003, 0x0004,
-	0x2009, 0x440b, 0x0020, 0x080c, 0x69cd, 0x0804, 0x3573, 0x2001,
-	0x0170, 0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, 0x1118, 0x2091,
-	0x31bd, 0x0817, 0x2091, 0x313d, 0x0817, 0x6000, 0x9086, 0x0000,
-	0x0904, 0x35a5, 0x2069, 0x1847, 0x7890, 0x6842, 0x7894, 0x6846,
-	0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039,
-	0x0001, 0x0804, 0x4af3, 0x9006, 0x080c, 0x2664, 0x81ff, 0x1904,
-	0x35a5, 0x080c, 0x74e9, 0x11b0, 0x080c, 0x77ed, 0x080c, 0x6029,
-	0x080c, 0x3368, 0x0118, 0x6130, 0xc18d, 0x6132, 0x080c, 0xcf52,
-	0x0130, 0x080c, 0x750c, 0x1118, 0x080c, 0x74bd, 0x0038, 0x080c,
-	0x741a, 0x0020, 0x080c, 0x5fee, 0x080c, 0x5ee4, 0x0804, 0x3573,
-	0x81ff, 0x1904, 0x35a5, 0x080c, 0x74e9, 0x1110, 0x0804, 0x35a5,
-	0x6194, 0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, 0x1d80, 0x2009,
-	0x0040, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091, 0x8000,
-	0x2039, 0x0001, 0x080c, 0x4af3, 0x701f, 0x3571, 0x012e, 0x0005,
-	0x704f, 0x0001, 0x00d6, 0x2069, 0x1d80, 0x20a9, 0x0040, 0x20e9,
-	0x0001, 0x20a1, 0x1d80, 0x2019, 0xffff, 0x4304, 0x655c, 0x9588,
-	0x3374, 0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, 0x2011, 0x0002,
-	0x2100, 0x9506, 0x01a8, 0x080c, 0x6625, 0x1190, 0xb814, 0x821c,
-	0x0238, 0x9398, 0x1d80, 0x9085, 0xff00, 0x8007, 0x201a, 0x0038,
-	0x9398, 0x1d80, 0x2324, 0x94a4, 0xff00, 0x9405, 0x201a, 0x8210,
-	0x8108, 0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007, 0x2d0c,
-	0x9105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0x1d80, 0x2099,
-	0x1d80, 0x080c, 0x5f79, 0x0804, 0x4465, 0x080c, 0x4ada, 0x0904,
-	0x35a8, 0x080c, 0x4aa7, 0x1120, 0x2009, 0x0002, 0x0804, 0x35a5,
-	0x080c, 0x56da, 0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e, 0x0538,
-	0x908e, 0x007f, 0x0520, 0x908e, 0x0080, 0x0508, 0x080c, 0x3363,
-	0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c,
-	0xca07, 0x1120, 0x2009, 0x0003, 0x0804, 0x35a5, 0x7007, 0x0003,
-	0x701f, 0x44f3, 0x0005, 0x080c, 0x4ada, 0x0904, 0x35a8, 0x20a9,
-	0x002b, 0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006,
-	0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c,
-	0x0fb7, 0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a, 0x20a0,
-	0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fb7,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804,
-	0x4af3, 0x81ff, 0x1904, 0x35a5, 0x080c, 0x4abe, 0x0904, 0x35a8,
-	0x080c, 0x6866, 0x0904, 0x35a5, 0x0058, 0xa878, 0x9005, 0x0120,
-	0x2009, 0x0004, 0x0804, 0x35a5, 0xa974, 0xaa94, 0x0804, 0x3573,
-	0x080c, 0x56e2, 0x0904, 0x3573, 0x701f, 0x453d, 0x7007, 0x0003,
-	0x0005, 0x81ff, 0x1904, 0x35a5, 0x7888, 0x908a, 0x1000, 0x1a04,
-	0x35a8, 0x080c, 0x4ada, 0x0904, 0x35a8, 0x080c, 0x6a6b, 0x0120,
-	0x080c, 0x6a73, 0x1904, 0x35a8, 0x080c, 0x68eb, 0x0904, 0x35a5,
-	0x2019, 0x0004, 0x900e, 0x080c, 0x6878, 0x0904, 0x35a5, 0x7984,
-	0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8, 0x080c,
-	0x4ad8, 0x01e0, 0x080c, 0x6a6b, 0x0118, 0x080c, 0x6a73, 0x11b0,
-	0x080c, 0x68eb, 0x2009, 0x0002, 0x0168, 0x2009, 0x0002, 0x2019,
-	0x0004, 0x080c, 0x6878, 0x2009, 0x0003, 0x0120, 0xa998, 0xaa9c,
-	0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0x080c, 0x56e2, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, 0x0071, 0x0060,
-	0x2029, 0x007e, 0x2061, 0x1800, 0x645c, 0x2400, 0x9506, 0x0110,
-	0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x6625, 0x1138,
-	0x2200, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x864c, 0x0005,
-	0x81ff, 0x1904, 0x35a5, 0x798c, 0x2001, 0x1980, 0x918c, 0x8000,
-	0x2102, 0x080c, 0x4abe, 0x0904, 0x35a8, 0x080c, 0x6a6b, 0x0120,
-	0x080c, 0x6a73, 0x1904, 0x35a8, 0x080c, 0x66ec, 0x0904, 0x35a5,
-	0x080c, 0x686f, 0x0904, 0x35a5, 0x2001, 0x1980, 0x2004, 0xd0fc,
-	0x1904, 0x3573, 0x0804, 0x4548, 0xa9a0, 0x2001, 0x1980, 0x918c,
-	0x8000, 0xc18d, 0x2102, 0x080c, 0x4acb, 0x01a0, 0x080c, 0x6a6b,
-	0x0118, 0x080c, 0x6a73, 0x1170, 0x080c, 0x66ec, 0x2009, 0x0002,
-	0x0128, 0x080c, 0x686f, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005,
-	0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
-	0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x1980, 0x2004, 0xd0fc,
-	0x1128, 0x080c, 0x56e2, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, 0x35a5, 0x798c,
-	0x2001, 0x197f, 0x918c, 0x8000, 0x2102, 0x080c, 0x4abe, 0x0904,
-	0x35a8, 0x080c, 0x6a6b, 0x0120, 0x080c, 0x6a73, 0x1904, 0x35a8,
-	0x080c, 0x66ec, 0x0904, 0x35a5, 0x080c, 0x685d, 0x0904, 0x35a5,
-	0x2001, 0x197f, 0x2004, 0xd0fc, 0x1904, 0x3573, 0x0804, 0x4548,
-	0xa9a0, 0x2001, 0x197f, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c,
-	0x4acb, 0x01a0, 0x080c, 0x6a6b, 0x0118, 0x080c, 0x6a73, 0x1170,
-	0x080c, 0x66ec, 0x2009, 0x0002, 0x0128, 0x080c, 0x685d, 0x1170,
-	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
+	0x8000, 0x81ff, 0x0148, 0x080c, 0x2a07, 0x1130, 0x9006, 0x080c,
+	0x295e, 0x9006, 0x080c, 0x2941, 0x7884, 0x9084, 0x0007, 0x0002,
+	0x3d63, 0x3d6c, 0x3d75, 0x3d60, 0x3d60, 0x3d60, 0x3d60, 0x3d60,
+	0x012e, 0x0804, 0x359c, 0x2009, 0x0114, 0x2104, 0x9085, 0x0800,
+	0x200a, 0x080c, 0x3f37, 0x00c0, 0x2009, 0x0114, 0x2104, 0x9085,
+	0x4000, 0x200a, 0x080c, 0x3f37, 0x0078, 0x080c, 0x74c8, 0x1128,
+	0x012e, 0x2009, 0x0016, 0x0804, 0x3599, 0x81ff, 0x0128, 0x012e,
+	0x2021, 0x400b, 0x0804, 0x3569, 0x080c, 0xa888, 0x0086, 0x0096,
+	0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3a8e,
+	0x2009, 0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068,
+	0x2060, 0x2058, 0x080c, 0x41d8, 0x080c, 0x4128, 0x903e, 0x2720,
+	0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x19e6, 0x2079, 0x0090,
+	0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e,
+	0x68d0, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x4089, 0x080c,
+	0x2a0f, 0x080c, 0x2a0f, 0x080c, 0x2a0f, 0x080c, 0x2a0f, 0x080c,
+	0x4089, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3fb6, 0x2009, 0x9c40,
+	0x8109, 0x11b0, 0x080c, 0x3eed, 0x2001, 0x0004, 0x200c, 0x918c,
+	0xfffd, 0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
+	0x00ae, 0x009e, 0x008e, 0x2009, 0x0017, 0x080c, 0x3599, 0x0cf8,
+	0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079,
+	0x0000, 0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c,
+	0x81ff, 0x0150, 0x080c, 0x3f94, 0x2d00, 0x9c05, 0x9b05, 0x0120,
+	0x080c, 0x3eed, 0x0804, 0x3e96, 0x080c, 0x40fd, 0x080c, 0x4021,
+	0x080c, 0x3f77, 0x080c, 0x3fac, 0x00f6, 0x2079, 0x0100, 0x7824,
+	0xd0ac, 0x0130, 0x8b58, 0x080c, 0x3eed, 0x00fe, 0x0804, 0x3e96,
+	0x00fe, 0x080c, 0x3ee3, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602,
+	0x2001, 0x0033, 0x2502, 0x080c, 0x3eed, 0x0080, 0x87ff, 0x0138,
+	0x2001, 0x0201, 0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001,
+	0x1a6a, 0x2004, 0x9086, 0x0000, 0x1904, 0x3de6, 0x2001, 0x032f,
+	0x2003, 0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904,
+	0x3e96, 0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904,
+	0x3e96, 0xa013, 0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884,
+	0xd0ac, 0x1148, 0x2001, 0x1a6a, 0x2003, 0x0003, 0x2001, 0x032a,
+	0x2003, 0x0009, 0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108,
+	0xa016, 0x2800, 0xa05a, 0x2009, 0x0040, 0x080c, 0x21c1, 0x2900,
+	0xa85a, 0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000,
+	0x00c6, 0x20a9, 0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001,
+	0x0203, 0x2004, 0x1f04, 0x3e6d, 0x00ce, 0x0030, 0xa817, 0x0001,
+	0x78b0, 0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100,
+	0x2061, 0x0090, 0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084,
+	0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6,
+	0x000e, 0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3da0, 0x001e, 0x00c6,
+	0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002,
+	0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c,
+	0x918c, 0xfffd, 0x2102, 0x080c, 0x1333, 0x7884, 0x9084, 0x0003,
+	0x9086, 0x0002, 0x01b0, 0x2009, 0x0028, 0x080c, 0x21c1, 0x2001,
+	0x0227, 0x200c, 0x2102, 0x6050, 0x9084, 0xb7ff, 0x080c, 0x2ab9,
+	0x6052, 0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043,
+	0x0010, 0x080c, 0xa8a4, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00,
+	0x9c05, 0x9d05, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae,
+	0x009e, 0x008e, 0x1118, 0x012e, 0x0804, 0x3567, 0x012e, 0x2021,
+	0x400c, 0x0804, 0x3569, 0x9085, 0x0001, 0x1d04, 0x3eec, 0x2091,
+	0x6000, 0x8420, 0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003,
+	0x0010, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x1a6a, 0x2003,
+	0x0000, 0x0071, 0x2009, 0x0048, 0x080c, 0x21c1, 0x2001, 0x0227,
+	0x2024, 0x2402, 0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005,
+	0x00f6, 0x00e6, 0x2071, 0x19e6, 0x7054, 0x9086, 0x0000, 0x0520,
+	0x2079, 0x0090, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c,
+	0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x21c1, 0x782c, 0xd0fc,
+	0x0d88, 0x080c, 0x40fd, 0x7054, 0x9086, 0x0000, 0x1d58, 0x782b,
+	0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x21c1,
+	0x782b, 0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6,
+	0x2079, 0x0100, 0x2001, 0x1818, 0x200c, 0x7932, 0x7936, 0x080c,
+	0x265d, 0x080c, 0x2a86, 0x080c, 0x2ab9, 0x784b, 0xf7f7, 0x7843,
+	0x0090, 0x7843, 0x0010, 0x7850, 0xc0e5, 0x7852, 0x2019, 0x61a8,
+	0x7820, 0xd09c, 0x0110, 0x8319, 0x1dd8, 0x7850, 0xc0e4, 0x7852,
+	0x2011, 0x0048, 0x080c, 0x2a63, 0x7843, 0x0040, 0x2019, 0x01f4,
+	0xa001, 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2a29,
+	0x2011, 0x0020, 0x080c, 0x2a63, 0x7843, 0x0000, 0x9006, 0x080c,
+	0x2a29, 0x2011, 0x0048, 0x080c, 0x2a63, 0x00fe, 0x0005, 0x7884,
+	0xd0ac, 0x11c8, 0x00f6, 0x00e6, 0x2071, 0x1a6a, 0x2079, 0x0320,
+	0x2001, 0x0201, 0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000,
+	0x1140, 0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b,
+	0x0019, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc,
+	0x00fe, 0x908c, 0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009,
+	0x0033, 0x250a, 0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68,
+	0xd0a4, 0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c,
+	0xd084, 0x0110, 0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071,
+	0x0100, 0x2001, 0x19a9, 0x2004, 0x70e2, 0x080c, 0x3cc8, 0x1188,
+	0x2001, 0x1820, 0x2004, 0x2009, 0x181f, 0x210c, 0x918c, 0x00ff,
+	0x706e, 0x716a, 0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109,
+	0x0080, 0x702c, 0x9085, 0x0002, 0x702e, 0x2009, 0x1818, 0x210c,
+	0x716e, 0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073,
+	0x0809, 0x7077, 0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080,
+	0x8000, 0x7082, 0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e,
+	0x70d6, 0x70ab, 0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984,
+	0x9085, 0x0092, 0x7016, 0x080c, 0x40fd, 0x00f6, 0x2071, 0x1a6a,
+	0x2079, 0x0320, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120,
+	0x689c, 0x780e, 0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109,
+	0x1df0, 0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011,
+	0x080c, 0x4089, 0x2011, 0x0001, 0x080c, 0x4089, 0x00fe, 0x00ee,
+	0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a6a, 0x2079, 0x0320, 0x792c,
+	0xd1fc, 0x0904, 0x4086, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904,
+	0x4082, 0x7000, 0x0002, 0x4086, 0x4037, 0x4067, 0x4082, 0xd1bc,
+	0x1170, 0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c,
+	0x4089, 0x0904, 0x4086, 0x080c, 0x4089, 0x0804, 0x4086, 0x00f6,
+	0x2079, 0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b,
+	0x0004, 0x7812, 0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8,
+	0x080c, 0x3f94, 0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8,
+	0x00fe, 0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001,
+	0x7002, 0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x402b,
+	0x2011, 0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086,
+	0x0015, 0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc,
+	0x1960, 0x0828, 0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe,
+	0x0005, 0xa014, 0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016,
+	0xa058, 0x2048, 0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c,
+	0x938a, 0x0007, 0x1a0c, 0x0d7d, 0x9398, 0x40b7, 0x231d, 0x083f,
+	0x9080, 0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e,
+	0x908a, 0x0035, 0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a,
+	0x2001, 0x0019, 0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x40f4,
+	0x40eb, 0x40e2, 0x40d9, 0x40d0, 0x40c7, 0x40be, 0xa964, 0x7902,
+	0xa968, 0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974,
+	0x7902, 0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005,
+	0xa984, 0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916,
+	0x0005, 0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0,
+	0x7916, 0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912,
+	0xa9b0, 0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc,
+	0x7912, 0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906,
+	0xa9cc, 0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086,
+	0x2071, 0x19e6, 0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b,
+	0x0002, 0x2940, 0x9026, 0x7054, 0x0002, 0x4124, 0x4110, 0x411b,
+	0x8001, 0x7056, 0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x4089,
+	0x190c, 0x4089, 0x0048, 0x8001, 0x7056, 0x782c, 0xd0fc, 0x1d38,
+	0x2011, 0x0001, 0x080c, 0x4089, 0x008e, 0x00ee, 0x00fe, 0x0005,
+	0x00f6, 0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x19a9,
+	0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x19a8, 0x2004, 0x60ce,
+	0x6104, 0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520,
+	0x2038, 0x2001, 0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c,
+	0x4aa9, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007,
+	0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096,
+	0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x41a0,
+	0x1d68, 0x2900, 0xa85a, 0x00d0, 0x080c, 0x4aa9, 0xa813, 0x0019,
+	0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866,
+	0x2001, 0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084,
+	0xfff8, 0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090,
+	0x2079, 0x0100, 0x2001, 0x19a8, 0x2004, 0x6036, 0x2009, 0x0040,
+	0x080c, 0x21c1, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a,
+	0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca,
+	0x9006, 0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005,
+	0x00e6, 0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000,
+	0x2099, 0x0088, 0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a,
+	0x700e, 0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041,
+	0x702c, 0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005,
+	0x7400, 0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086,
+	0x080c, 0x4aa9, 0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006,
+	0xa05a, 0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005,
+	0x00e6, 0x2001, 0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001,
+	0x0030, 0x2024, 0x2001, 0x0031, 0x201c, 0x080c, 0x4aa9, 0x2940,
+	0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220,
+	0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858,
+	0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x41a0, 0x1d68,
+	0x2900, 0xa85a, 0x00d8, 0x080c, 0x4aa9, 0x2940, 0xa013, 0x0019,
+	0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066,
+	0x2001, 0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084,
+	0xfff8, 0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a,
+	0x2003, 0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c,
+	0x918d, 0x0200, 0x2102, 0xa017, 0x0000, 0x2001, 0x1a6a, 0x2003,
+	0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003,
+	0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c,
+	0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x20a9, 0x0007, 0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004,
+	0x20a9, 0x000c, 0x20a1, 0xfff4, 0x20e9, 0x0000, 0x9006, 0x4004,
+	0x2009, 0x013c, 0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108,
+	0x0005, 0x0804, 0x3567, 0x7d98, 0x7c9c, 0x0804, 0x3669, 0x080c,
+	0x74c8, 0x190c, 0x5fe9, 0x6040, 0x9084, 0x0020, 0x09b1, 0x2069,
+	0x1847, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0x2039, 0x0001, 0x080c, 0x4af2, 0x701f, 0x427f, 0x0005, 0x080c,
+	0x56e4, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8, 0x21d0,
+	0x2069, 0x1847, 0x6800, 0x9005, 0x0904, 0x359c, 0x6804, 0xd0ac,
+	0x0118, 0xd0a4, 0x0904, 0x359c, 0xd094, 0x00c6, 0x2061, 0x0100,
+	0x6104, 0x0138, 0x6200, 0x9292, 0x0005, 0x0218, 0x918c, 0xffdf,
+	0x0010, 0x918d, 0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061,
+	0x0100, 0x6104, 0x0118, 0x918d, 0x0010, 0x0010, 0x918c, 0xffef,
+	0x6106, 0x00ce, 0xd084, 0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04,
+	0x359c, 0x9288, 0x3368, 0x210d, 0x918c, 0x00ff, 0x6166, 0xd0dc,
+	0x0130, 0x6828, 0x908a, 0x007f, 0x1a04, 0x359c, 0x605e, 0x6888,
+	0x9084, 0x0030, 0x8004, 0x8004, 0x8004, 0x8004, 0x0006, 0x2009,
+	0x19b0, 0x9080, 0x2750, 0x2005, 0x200a, 0x2008, 0x2001, 0x0018,
+	0x080c, 0xa879, 0x2009, 0x0390, 0x200b, 0x0400, 0x000e, 0x2009,
+	0x19b1, 0x9080, 0x2754, 0x2005, 0x200a, 0x6808, 0x908a, 0x0100,
+	0x0a04, 0x359c, 0x908a, 0x0841, 0x1a04, 0x359c, 0x9084, 0x0007,
+	0x1904, 0x359c, 0x680c, 0x9005, 0x0904, 0x359c, 0x6810, 0x9005,
+	0x0904, 0x359c, 0x6848, 0x6940, 0x910a, 0x1a04, 0x359c, 0x8001,
+	0x0904, 0x359c, 0x684c, 0x6944, 0x910a, 0x1a04, 0x359c, 0x8001,
+	0x0904, 0x359c, 0x6814, 0x908c, 0x00ff, 0x614e, 0x8007, 0x9084,
+	0x00ff, 0x6052, 0x080c, 0x77fd, 0x080c, 0x6a9c, 0x080c, 0x6ad0,
+	0x6808, 0x602a, 0x080c, 0x2133, 0x2009, 0x0170, 0x200b, 0x0080,
+	0xa001, 0xa001, 0x200b, 0x0000, 0x0036, 0x6b08, 0x080c, 0x26b7,
+	0x003e, 0x6000, 0x9086, 0x0000, 0x1904, 0x440a, 0x6818, 0x691c,
+	0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, 0x6016, 0x611a,
+	0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38,
+	0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff,
+	0x6006, 0x610a, 0x620e, 0x6312, 0x8007, 0x810f, 0x8217, 0x831f,
+	0x20a9, 0x0004, 0x20a1, 0x19b2, 0x20e9, 0x0001, 0x4001, 0x20a9,
+	0x0004, 0x20a1, 0x19cc, 0x20e9, 0x0001, 0x4001, 0x080c, 0x87b0,
+	0x00c6, 0x900e, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x01c8, 0x0020,
+	0x839d, 0x12b0, 0x3508, 0x8109, 0x080c, 0x7dbe, 0x6878, 0x6016,
+	0x6874, 0x2008, 0x9084, 0xff00, 0x8007, 0x600a, 0x9184, 0x00ff,
+	0x6006, 0x8108, 0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001,
+	0x1f04, 0x4368, 0x00ce, 0x00c6, 0x2061, 0x199b, 0x6a88, 0x9284,
+	0xc000, 0x2010, 0x9286, 0x0000, 0x1158, 0x2063, 0x0000, 0x2001,
+	0x0001, 0x080c, 0x295e, 0x2001, 0x0001, 0x080c, 0x2941, 0x0088,
+	0x9286, 0x4000, 0x1148, 0x2063, 0x0001, 0x9006, 0x080c, 0x295e,
+	0x9006, 0x080c, 0x2941, 0x0028, 0x9286, 0x8000, 0x1d30, 0x2063,
+	0x0002, 0x00ce, 0x00e6, 0x2c70, 0x080c, 0x0eb4, 0x00ee, 0x6888,
+	0xd0ec, 0x0130, 0x2011, 0x0114, 0x2204, 0x9085, 0x0180, 0x2012,
+	0x6a80, 0x9284, 0x0030, 0x9086, 0x0030, 0x1128, 0x9294, 0xffcf,
+	0x9295, 0x0020, 0x6a82, 0x2001, 0x197b, 0x6a80, 0x9294, 0x0030,
+	0x928e, 0x0000, 0x0170, 0x928e, 0x0010, 0x0118, 0x928e, 0x0020,
+	0x0140, 0x2003, 0xaaaa, 0x080c, 0x272c, 0x2001, 0x196c, 0x2102,
+	0x0008, 0x2102, 0x00c6, 0x2061, 0x0100, 0x602f, 0x0040, 0x602f,
+	0x0000, 0x00ce, 0x080c, 0x74c8, 0x0128, 0x080c, 0x4fd9, 0x0110,
+	0x080c, 0x267d, 0x60d4, 0x9005, 0x01c0, 0x6003, 0x0001, 0x2009,
+	0x43f2, 0x00e0, 0x080c, 0x74c8, 0x1168, 0x2011, 0x733e, 0x080c,
+	0x861d, 0x2011, 0x7331, 0x080c, 0x8729, 0x080c, 0x77d1, 0x080c,
+	0x73f9, 0x0040, 0x080c, 0x5edf, 0x0028, 0x6003, 0x0004, 0x2009,
+	0x440a, 0x0020, 0x080c, 0x69cc, 0x0804, 0x3567, 0x2001, 0x0170,
+	0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, 0x1118, 0x2091, 0x31bd,
+	0x0817, 0x2091, 0x313d, 0x0817, 0x6000, 0x9086, 0x0000, 0x0904,
+	0x3599, 0x2069, 0x1847, 0x7890, 0x6842, 0x7894, 0x6846, 0x2d00,
+	0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001,
+	0x0804, 0x4af5, 0x9006, 0x080c, 0x267d, 0x81ff, 0x1904, 0x3599,
+	0x080c, 0x74c8, 0x11b0, 0x080c, 0x77cc, 0x080c, 0x6024, 0x080c,
+	0x335c, 0x0118, 0x6130, 0xc18d, 0x6132, 0x080c, 0xcf51, 0x0130,
+	0x080c, 0x74eb, 0x1118, 0x080c, 0x749c, 0x0038, 0x080c, 0x73f9,
+	0x0020, 0x080c, 0x5fe9, 0x080c, 0x5edf, 0x0804, 0x3567, 0x81ff,
+	0x1904, 0x3599, 0x080c, 0x74c8, 0x1110, 0x0804, 0x3599, 0x6194,
+	0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, 0x1d80, 0x2009, 0x0040,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091, 0x8000, 0x2039,
+	0x0001, 0x080c, 0x4af5, 0x701f, 0x3565, 0x012e, 0x0005, 0x704f,
+	0x0001, 0x00d6, 0x2069, 0x1d80, 0x20a9, 0x0040, 0x20e9, 0x0001,
+	0x20a1, 0x1d80, 0x2019, 0xffff, 0x4304, 0x655c, 0x9588, 0x3368,
+	0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, 0x2011, 0x0002, 0x2100,
+	0x9506, 0x01a8, 0x080c, 0x6620, 0x1190, 0xb814, 0x821c, 0x0238,
+	0x9398, 0x1d80, 0x9085, 0xff00, 0x8007, 0x201a, 0x0038, 0x9398,
+	0x1d80, 0x2324, 0x94a4, 0xff00, 0x9405, 0x201a, 0x8210, 0x8108,
+	0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007, 0x2d0c, 0x9105,
+	0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0x1d80, 0x2099, 0x1d80,
+	0x080c, 0x5f74, 0x0804, 0x4464, 0x080c, 0x4adc, 0x0904, 0x359c,
+	0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002, 0x0804, 0x3599, 0x080c,
+	0x56d5, 0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e, 0x0538, 0x908e,
+	0x007f, 0x0520, 0x908e, 0x0080, 0x0508, 0x080c, 0x3357, 0x1148,
+	0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
+	0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xca01,
+	0x1120, 0x2009, 0x0003, 0x0804, 0x3599, 0x7007, 0x0003, 0x701f,
+	0x44f2, 0x0005, 0x080c, 0x4adc, 0x0904, 0x359c, 0x20a9, 0x002b,
+	0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0,
+	0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0fb7,
+	0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a, 0x20a0, 0xb8c4,
+	0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fb7, 0x8906,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002,
+	0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4af5,
+	0x81ff, 0x1904, 0x3599, 0x080c, 0x4ac0, 0x0904, 0x359c, 0x080c,
+	0x6865, 0x0904, 0x3599, 0x0058, 0xa878, 0x9005, 0x0120, 0x2009,
+	0x0004, 0x0804, 0x3599, 0xa974, 0xaa94, 0x0804, 0x3567, 0x080c,
+	0x56dd, 0x0904, 0x3567, 0x701f, 0x453c, 0x7007, 0x0003, 0x0005,
+	0x81ff, 0x1904, 0x3599, 0x7888, 0x908a, 0x1000, 0x1a04, 0x359c,
+	0x080c, 0x4adc, 0x0904, 0x359c, 0x080c, 0x6a6a, 0x0120, 0x080c,
+	0x6a72, 0x1904, 0x359c, 0x080c, 0x68ea, 0x0904, 0x3599, 0x2019,
+	0x0004, 0x900e, 0x080c, 0x6877, 0x0904, 0x3599, 0x7984, 0x7a88,
+	0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8, 0x080c, 0x4ada,
+	0x01e0, 0x080c, 0x6a6a, 0x0118, 0x080c, 0x6a72, 0x11b0, 0x080c,
+	0x68ea, 0x2009, 0x0002, 0x0168, 0x2009, 0x0002, 0x2019, 0x0004,
+	0x080c, 0x6877, 0x2009, 0x0003, 0x0120, 0xa998, 0xaa9c, 0x00d1,
+	0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x080c,
+	0x56dd, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, 0x0071, 0x0060, 0x2029,
+	0x007e, 0x2061, 0x1800, 0x645c, 0x2400, 0x9506, 0x0110, 0x2508,
+	0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x6620, 0x1138, 0x2200,
+	0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x862b, 0x0005, 0x81ff,
+	0x1904, 0x3599, 0x798c, 0x2001, 0x197f, 0x918c, 0x8000, 0x2102,
+	0x080c, 0x4ac0, 0x0904, 0x359c, 0x080c, 0x6a6a, 0x0120, 0x080c,
+	0x6a72, 0x1904, 0x359c, 0x080c, 0x66e7, 0x0904, 0x3599, 0x080c,
+	0x686e, 0x0904, 0x3599, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1904,
+	0x3567, 0x0804, 0x4547, 0xa9a0, 0x2001, 0x197f, 0x918c, 0x8000,
+	0xc18d, 0x2102, 0x080c, 0x4acd, 0x01a0, 0x080c, 0x6a6a, 0x0118,
+	0x080c, 0x6a72, 0x1170, 0x080c, 0x66e7, 0x2009, 0x0002, 0x0128,
+	0x080c, 0x686e, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a,
+	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
+	0x0005, 0xa897, 0x4000, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1128,
+	0x080c, 0x56dd, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, 0x3599, 0x798c, 0x2001,
+	0x197e, 0x918c, 0x8000, 0x2102, 0x080c, 0x4ac0, 0x0904, 0x359c,
+	0x080c, 0x6a6a, 0x0120, 0x080c, 0x6a72, 0x1904, 0x359c, 0x080c,
+	0x66e7, 0x0904, 0x3599, 0x080c, 0x685c, 0x0904, 0x3599, 0x2001,
+	0x197e, 0x2004, 0xd0fc, 0x1904, 0x3567, 0x0804, 0x4547, 0xa9a0,
+	0x2001, 0x197e, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4acd,
+	0x01a0, 0x080c, 0x6a6a, 0x0118, 0x080c, 0x6a72, 0x1170, 0x080c,
+	0x66e7, 0x2009, 0x0002, 0x0128, 0x080c, 0x685c, 0x1170, 0x2009,
+	0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001,
+	0x197e, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x56dd, 0x0110, 0x9006,
+	0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x6100,
+	0x0804, 0x3567, 0x080c, 0x4adc, 0x0904, 0x359c, 0x080c, 0x56e9,
+	0x1904, 0x3599, 0x79a8, 0xd184, 0x1158, 0xb834, 0x8007, 0x789e,
+	0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28, 0x8217, 0x0050,
+	0xb824, 0x8007, 0x789e, 0xb820, 0x8007, 0x789a, 0xbb1c, 0x831f,
+	0xba18, 0x8217, 0xb900, 0x918c, 0x0200, 0x0804, 0x3567, 0x78a8,
+	0x909c, 0x0003, 0xd0b4, 0x1140, 0x939a, 0x0003, 0x1a04, 0x3599,
+	0x625c, 0x7884, 0x9206, 0x1548, 0x080c, 0x879a, 0x2001, 0xfff4,
+	0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0000,
+	0x0006, 0x78a8, 0x9084, 0x0080, 0x1118, 0x000e, 0x0804, 0x4af5,
+	0x000e, 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44, 0xa66a, 0xa17a,
+	0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x112f,
+	0x7007, 0x0002, 0x701f, 0x46fd, 0x0005, 0x81ff, 0x1904, 0x3599,
+	0x080c, 0x4adc, 0x0904, 0x359c, 0x080c, 0x6a6a, 0x1904, 0x3599,
+	0x00c6, 0x080c, 0x4aa9, 0x00ce, 0x0904, 0x3599, 0xa867, 0x0000,
+	0xa868, 0xc0fd, 0xa86a, 0x7ea8, 0x080c, 0xc9a7, 0x0904, 0x3599,
+	0x7007, 0x0003, 0x701f, 0x4701, 0x0005, 0x080c, 0x4245, 0x0804,
+	0x3567, 0xa830, 0x9086, 0x0100, 0x0904, 0x3599, 0x8906, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x2009,
+	0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4af5, 0x9006,
+	0x080c, 0x267d, 0x78a8, 0x9084, 0x00ff, 0x9086, 0x00ff, 0x0118,
+	0x81ff, 0x1904, 0x3599, 0x080c, 0x74c8, 0x0110, 0x080c, 0x5fe9,
+	0x7888, 0x908a, 0x1000, 0x1a04, 0x359c, 0x7984, 0x9186, 0x00ff,
+	0x0138, 0x9182, 0x007f, 0x1a04, 0x359c, 0x2100, 0x080c, 0x2647,
+	0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061, 0x1a02, 0x601b,
+	0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077, 0x0000, 0x080c,
+	0x74c8, 0x1158, 0x080c, 0x77cc, 0x080c, 0x6024, 0x9085, 0x0001,
+	0x080c, 0x750f, 0x080c, 0x73f9, 0x00f0, 0x080c, 0xa888, 0x080c,
+	0xab50, 0x080c, 0xa8a4, 0x2061, 0x0100, 0x2001, 0x1818, 0x2004,
+	0x9084, 0x00ff, 0x810f, 0x9105, 0x604a, 0x6043, 0x0090, 0x6043,
+	0x0010, 0x2009, 0x1998, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011,
+	0x5f0f, 0x080c, 0x86e7, 0x7984, 0x080c, 0x74c8, 0x1110, 0x2009,
+	0x00ff, 0x7a88, 0x080c, 0x45aa, 0x012e, 0x00ce, 0x002e, 0x0804,
+	0x3567, 0x7984, 0x080c, 0x65bf, 0x2b08, 0x1904, 0x359c, 0x0804,
+	0x3567, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3599, 0x60dc,
+	0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x3599,
+	0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002, 0x0804, 0x3599, 0x7984,
+	0x9192, 0x0021, 0x1a04, 0x359c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0xa85c, 0x9080, 0x0019, 0x702a, 0xaf60, 0x7736, 0x080c, 0x4af2,
+	0x701f, 0x47b9, 0x7880, 0x9086, 0x006e, 0x0110, 0x701f, 0x518b,
+	0x0005, 0x2009, 0x0080, 0x080c, 0x6620, 0x1118, 0x080c, 0x6a6a,
+	0x0120, 0x2021, 0x400a, 0x0804, 0x3569, 0x00d6, 0x0096, 0xa964,
+	0xaa6c, 0xab70, 0xac74, 0xad78, 0xae7c, 0xa884, 0x90be, 0x0100,
+	0x0904, 0x4852, 0x90be, 0x0112, 0x0904, 0x4852, 0x90be, 0x0113,
+	0x0904, 0x4852, 0x90be, 0x0114, 0x0904, 0x4852, 0x90be, 0x0117,
+	0x0904, 0x4852, 0x90be, 0x011a, 0x0904, 0x4852, 0x90be, 0x011c,
+	0x0904, 0x4852, 0x90be, 0x0121, 0x0904, 0x4839, 0x90be, 0x0131,
+	0x0904, 0x4839, 0x90be, 0x0171, 0x0904, 0x4852, 0x90be, 0x0173,
+	0x0904, 0x4852, 0x90be, 0x01a1, 0x1128, 0xa894, 0x8007, 0xa896,
+	0x0804, 0x485d, 0x90be, 0x0212, 0x0904, 0x4846, 0x90be, 0x0213,
+	0x05e8, 0x90be, 0x0214, 0x0500, 0x90be, 0x0217, 0x0188, 0x90be,
+	0x021a, 0x1120, 0xa89c, 0x8007, 0xa89e, 0x04e0, 0x90be, 0x021f,
+	0x05c8, 0x90be, 0x0300, 0x05b0, 0x009e, 0x00de, 0x0804, 0x359c,
+	0x7028, 0x9080, 0x0010, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8,
+	0x20a9, 0x0007, 0x080c, 0x489b, 0x7028, 0x9080, 0x000e, 0x2098,
+	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x489b,
+	0x00c8, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0,
+	0x20e8, 0x20a9, 0x0001, 0x080c, 0x48a8, 0x00b8, 0x7028, 0x9080,
+	0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001,
+	0x080c, 0x48a8, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034,
+	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c, 0x4aa9,
+	0x0550, 0xa868, 0xc0fd, 0xa86a, 0xa867, 0x0119, 0x9006, 0xa882,
+	0xa87f, 0x0020, 0xa88b, 0x0001, 0x810b, 0xa9ae, 0xa8b2, 0xaab6,
+	0xabba, 0xacbe, 0xadc2, 0xa9c6, 0xa8ca, 0x00ce, 0x009e, 0x00de,
+	0xa866, 0xa822, 0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c,
+	0xc9c2, 0x1120, 0x2009, 0x0003, 0x0804, 0x3599, 0x7007, 0x0003,
+	0x701f, 0x4892, 0x0005, 0x00ce, 0x009e, 0x00de, 0x2009, 0x0002,
+	0x0804, 0x3599, 0xa820, 0x9086, 0x8001, 0x1904, 0x3567, 0x2009,
+	0x0004, 0x0804, 0x3599, 0x0016, 0x0026, 0x3510, 0x20a9, 0x0002,
+	0x4002, 0x4104, 0x4004, 0x8211, 0x1dc8, 0x002e, 0x001e, 0x0005,
+	0x0016, 0x0026, 0x0036, 0x0046, 0x3520, 0x20a9, 0x0004, 0x4002,
+	0x4304, 0x4204, 0x4104, 0x4004, 0x8421, 0x1db8, 0x004e, 0x003e,
+	0x002e, 0x001e, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
+	0x3599, 0x60dc, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005,
+	0x0804, 0x3599, 0x7984, 0x78a8, 0x2040, 0x080c, 0xab49, 0x1120,
+	0x9182, 0x007f, 0x0a04, 0x359c, 0x9186, 0x00ff, 0x0904, 0x359c,
+	0x9182, 0x0800, 0x1a04, 0x359c, 0x7a8c, 0x7b88, 0x607c, 0x9306,
+	0x1158, 0x6080, 0x924e, 0x0904, 0x359c, 0x080c, 0xab49, 0x1120,
+	0x99cc, 0xff00, 0x0904, 0x359c, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x49bc, 0x0904, 0x493c, 0x0086, 0x90c6, 0x4000, 0x008e, 0x1538,
+	0x00c6, 0x0006, 0x0036, 0xb818, 0xbb1c, 0x9305, 0xbb20, 0x9305,
+	0xbb24, 0x9305, 0xbb28, 0x9305, 0xbb2c, 0x9305, 0xbb30, 0x9305,
+	0xbb34, 0x9305, 0x003e, 0x0570, 0xd88c, 0x1128, 0x080c, 0x6a6a,
+	0x0110, 0xc89d, 0x0438, 0x900e, 0x080c, 0x6913, 0x1108, 0xc185,
+	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6,
+	0x4007, 0x1110, 0x2408, 0x0090, 0x90c6, 0x4008, 0x1118, 0x2708,
+	0x2610, 0x0060, 0x90c6, 0x4009, 0x1108, 0x0040, 0x90c6, 0x4006,
+	0x1108, 0x0020, 0x2001, 0x4005, 0x2009, 0x000a, 0x2020, 0x012e,
+	0x0804, 0x3569, 0x000e, 0x00ce, 0x2b00, 0x7026, 0x0016, 0x00b6,
+	0x00c6, 0x00e6, 0x2c70, 0x080c, 0xac4f, 0x0904, 0x4991, 0x2b00,
+	0x6012, 0x080c, 0xcccb, 0x2e58, 0x00ee, 0x00e6, 0x00c6, 0x080c,
+	0x4aa9, 0x00ce, 0x2b70, 0x1158, 0x080c, 0xabdf, 0x00ee, 0x00ce,
+	0x00be, 0x001e, 0x012e, 0x2009, 0x0002, 0x0804, 0x3599, 0x900e,
+	0xa966, 0xa96a, 0x2900, 0x6016, 0xa932, 0xa868, 0xc0fd, 0xd88c,
+	0x0108, 0xc0f5, 0xa86a, 0xd89c, 0x1110, 0x080c, 0x31ef, 0x6023,
+	0x0001, 0x9006, 0x080c, 0x655c, 0xd89c, 0x0138, 0x2001, 0x0004,
+	0x080c, 0x6570, 0x2009, 0x0003, 0x0030, 0x2001, 0x0002, 0x080c,
+	0x6570, 0x2009, 0x0002, 0x080c, 0xac7c, 0x78a8, 0xd094, 0x0138,
+	0x00ee, 0x7024, 0x00e6, 0x2058, 0xb8d4, 0xc08d, 0xb8d6, 0x9085,
+	0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009,
+	0x0003, 0x0804, 0x3599, 0x7007, 0x0003, 0x701f, 0x49a0, 0x0005,
+	0xa830, 0x9086, 0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004,
+	0xba04, 0x9294, 0x00ff, 0x0804, 0x5632, 0x900e, 0xa868, 0xd0f4,
+	0x1904, 0x3567, 0x080c, 0x6913, 0x1108, 0xc185, 0xb800, 0xd0bc,
+	0x0108, 0xc18d, 0x0804, 0x3567, 0x00e6, 0x00d6, 0x0096, 0x83ff,
+	0x0904, 0x4a0b, 0x902e, 0x080c, 0xab49, 0x0130, 0x9026, 0x20a9,
+	0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781,
+	0x2071, 0x107f, 0x2e04, 0x9005, 0x11b8, 0x2100, 0x9406, 0x1904,
+	0x4a1c, 0x2428, 0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd, 0x1558,
+	0x0030, 0x94ce, 0x0080, 0x1130, 0x92ce, 0xfffc, 0x1520, 0x93ce,
+	0x00ff, 0x1508, 0xc5fd, 0x0480, 0x2058, 0xbf10, 0x2700, 0x9306,
+	0x11e8, 0xbe14, 0x2600, 0x9206, 0x11c8, 0x2400, 0x9106, 0x1180,
+	0xd884, 0x0598, 0xd894, 0x1588, 0x080c, 0x6a0a, 0x1570, 0x2001,
+	0x4000, 0x0460, 0x080c, 0x6a6a, 0x1540, 0x2001, 0x4000, 0x0430,
+	0x2001, 0x4007, 0x0418, 0x2001, 0x4006, 0x0400, 0x2400, 0x9106,
+	0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0918, 0x080c, 0xab49,
+	0x1900, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x49d2,
+	0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001, 0x0030,
+	0x080c, 0x65bf, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, 0x009e,
+	0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
+	0x3599, 0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002, 0x0804, 0x3599,
+	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005, 0x0904,
+	0x359c, 0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, 0x359c,
+	0x2010, 0x2918, 0x080c, 0x318f, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x3599, 0x7007, 0x0003, 0x701f, 0x4a5e, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x1904, 0x3567, 0x2009, 0x0004, 0x0804, 0x3599, 0x7984,
+	0x080c, 0xab49, 0x1120, 0x9182, 0x007f, 0x0a04, 0x359c, 0x9186,
+	0x00ff, 0x0904, 0x359c, 0x9182, 0x0800, 0x1a04, 0x359c, 0x2001,
+	0x9000, 0x080c, 0x568d, 0x1904, 0x3599, 0x0804, 0x3567, 0xa998,
+	0x080c, 0xab49, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186, 0x00ff,
+	0x0168, 0x9182, 0x0800, 0x1250, 0x2001, 0x9000, 0x080c, 0x568d,
+	0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
 	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0x2001, 0x197f, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x56e2, 0x0110,
-	0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005,
-	0x6100, 0x0804, 0x3573, 0x080c, 0x4ada, 0x0904, 0x35a8, 0x080c,
-	0x56ee, 0x1904, 0x35a5, 0x79a8, 0xd184, 0x1158, 0xb834, 0x8007,
-	0x789e, 0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28, 0x8217,
-	0x0050, 0xb824, 0x8007, 0x789e, 0xb820, 0x8007, 0x789a, 0xbb1c,
-	0x831f, 0xba18, 0x8217, 0xb900, 0x918c, 0x0200, 0x0804, 0x3573,
-	0x78a8, 0x909c, 0x0003, 0xd0b4, 0x1140, 0x939a, 0x0003, 0x1a04,
-	0x35a5, 0x625c, 0x7884, 0x9206, 0x1548, 0x080c, 0x87bb, 0x2001,
-	0xfff4, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039,
-	0x0000, 0x0006, 0x78a8, 0x9084, 0x0080, 0x1118, 0x000e, 0x0804,
-	0x4af3, 0x000e, 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44, 0xa66a,
-	0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
-	0x1124, 0x7007, 0x0002, 0x701f, 0x46fe, 0x0005, 0x81ff, 0x1904,
-	0x35a5, 0x080c, 0x4ada, 0x0904, 0x35a8, 0x080c, 0x6a6b, 0x1904,
-	0x35a5, 0x00c6, 0x080c, 0x4aa7, 0x00ce, 0x0904, 0x35a5, 0xa867,
-	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8, 0x080c, 0xc9ad, 0x0904,
-	0x35a5, 0x7007, 0x0003, 0x701f, 0x4702, 0x0005, 0x080c, 0x4246,
-	0x0804, 0x3573, 0xa830, 0x9086, 0x0100, 0x0904, 0x35a5, 0x8906,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b,
-	0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4af3,
-	0x9006, 0x080c, 0x2664, 0x78a8, 0x9084, 0x00ff, 0x9086, 0x00ff,
-	0x0118, 0x81ff, 0x1904, 0x35a5, 0x080c, 0x74e9, 0x0110, 0x080c,
-	0x5fee, 0x7888, 0x908a, 0x1000, 0x1a04, 0x35a8, 0x7984, 0x9186,
-	0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04, 0x35a8, 0x2100, 0x080c,
-	0x262e, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061, 0x1a03,
-	0x601b, 0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077, 0x0000,
-	0x080c, 0x74e9, 0x1158, 0x080c, 0x77ed, 0x080c, 0x6029, 0x9085,
-	0x0001, 0x080c, 0x7530, 0x080c, 0x741a, 0x00f0, 0x080c, 0xa896,
-	0x080c, 0xab5e, 0x080c, 0xa8b2, 0x2061, 0x0100, 0x2001, 0x1818,
-	0x2004, 0x9084, 0x00ff, 0x810f, 0x9105, 0x604a, 0x6043, 0x0090,
-	0x6043, 0x0010, 0x2009, 0x1999, 0x200b, 0x0000, 0x2009, 0x002d,
-	0x2011, 0x5f14, 0x080c, 0x8708, 0x7984, 0x080c, 0x74e9, 0x1110,
-	0x2009, 0x00ff, 0x7a88, 0x080c, 0x45ab, 0x012e, 0x00ce, 0x002e,
-	0x0804, 0x3573, 0x7984, 0x080c, 0x65c4, 0x2b08, 0x1904, 0x35a8,
-	0x0804, 0x3573, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35a5,
-	0x60dc, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804,
-	0x35a5, 0x080c, 0x4aa7, 0x1120, 0x2009, 0x0002, 0x0804, 0x35a5,
-	0x7984, 0x9192, 0x0021, 0x1a04, 0x35a8, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0xa85c, 0x9080, 0x0019, 0x702a, 0xaf60, 0x7736, 0x080c,
-	0x4af0, 0x701f, 0x47ba, 0x7880, 0x9086, 0x006e, 0x0110, 0x701f,
-	0x5190, 0x0005, 0x2009, 0x0080, 0x080c, 0x6625, 0x1118, 0x080c,
-	0x6a6b, 0x0120, 0x2021, 0x400a, 0x0804, 0x3575, 0x00d6, 0x0096,
-	0xa964, 0xaa6c, 0xab70, 0xac74, 0xad78, 0xae7c, 0xa884, 0x90be,
-	0x0100, 0x0904, 0x4853, 0x90be, 0x0112, 0x0904, 0x4853, 0x90be,
-	0x0113, 0x0904, 0x4853, 0x90be, 0x0114, 0x0904, 0x4853, 0x90be,
-	0x0117, 0x0904, 0x4853, 0x90be, 0x011a, 0x0904, 0x4853, 0x90be,
-	0x011c, 0x0904, 0x4853, 0x90be, 0x0121, 0x0904, 0x483a, 0x90be,
-	0x0131, 0x0904, 0x483a, 0x90be, 0x0171, 0x0904, 0x4853, 0x90be,
-	0x0173, 0x0904, 0x4853, 0x90be, 0x01a1, 0x1128, 0xa894, 0x8007,
-	0xa896, 0x0804, 0x485e, 0x90be, 0x0212, 0x0904, 0x4847, 0x90be,
-	0x0213, 0x05e8, 0x90be, 0x0214, 0x0500, 0x90be, 0x0217, 0x0188,
-	0x90be, 0x021a, 0x1120, 0xa89c, 0x8007, 0xa89e, 0x04e0, 0x90be,
-	0x021f, 0x05c8, 0x90be, 0x0300, 0x05b0, 0x009e, 0x00de, 0x0804,
-	0x35a8, 0x7028, 0x9080, 0x0010, 0x2098, 0x20a0, 0x7034, 0x20e0,
-	0x20e8, 0x20a9, 0x0007, 0x080c, 0x489c, 0x7028, 0x9080, 0x000e,
-	0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c,
-	0x489c, 0x00c8, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034,
-	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x48a9, 0x00b8, 0x7028,
-	0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9,
-	0x0001, 0x080c, 0x48a9, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0,
-	0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c,
-	0x4aa7, 0x0550, 0xa868, 0xc0fd, 0xa86a, 0xa867, 0x0119, 0x9006,
-	0xa882, 0xa87f, 0x0020, 0xa88b, 0x0001, 0x810b, 0xa9ae, 0xa8b2,
-	0xaab6, 0xabba, 0xacbe, 0xadc2, 0xa9c6, 0xa8ca, 0x00ce, 0x009e,
-	0x00de, 0xa866, 0xa822, 0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048,
-	0x080c, 0xc9c8, 0x1120, 0x2009, 0x0003, 0x0804, 0x35a5, 0x7007,
-	0x0003, 0x701f, 0x4893, 0x0005, 0x00ce, 0x009e, 0x00de, 0x2009,
-	0x0002, 0x0804, 0x35a5, 0xa820, 0x9086, 0x8001, 0x1904, 0x3573,
-	0x2009, 0x0004, 0x0804, 0x35a5, 0x0016, 0x0026, 0x3510, 0x20a9,
-	0x0002, 0x4002, 0x4104, 0x4004, 0x8211, 0x1dc8, 0x002e, 0x001e,
-	0x0005, 0x0016, 0x0026, 0x0036, 0x0046, 0x3520, 0x20a9, 0x0004,
-	0x4002, 0x4304, 0x4204, 0x4104, 0x4004, 0x8421, 0x1db8, 0x004e,
-	0x003e, 0x002e, 0x001e, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001,
-	0x0804, 0x35a5, 0x60dc, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009,
-	0x0005, 0x0804, 0x35a5, 0x7984, 0x78a8, 0x2040, 0x080c, 0xab57,
-	0x1120, 0x9182, 0x007f, 0x0a04, 0x35a8, 0x9186, 0x00ff, 0x0904,
-	0x35a8, 0x9182, 0x0800, 0x1a04, 0x35a8, 0x7a8c, 0x7b88, 0x607c,
-	0x9306, 0x1140, 0x6080, 0x924e, 0x0904, 0x35a8, 0x99cc, 0xff00,
-	0x0904, 0x35a8, 0x0126, 0x2091, 0x8000, 0x080c, 0x49ba, 0x0904,
-	0x493a, 0x0086, 0x90c6, 0x4000, 0x008e, 0x1538, 0x00c6, 0x0006,
-	0x0036, 0xb818, 0xbb1c, 0x9305, 0xbb20, 0x9305, 0xbb24, 0x9305,
-	0xbb28, 0x9305, 0xbb2c, 0x9305, 0xbb30, 0x9305, 0xbb34, 0x9305,
-	0x003e, 0x0570, 0xd88c, 0x1128, 0x080c, 0x6a6b, 0x0110, 0xc89d,
-	0x0438, 0x900e, 0x080c, 0x6914, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110,
-	0x2408, 0x0090, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0060,
-	0x90c6, 0x4009, 0x1108, 0x0040, 0x90c6, 0x4006, 0x1108, 0x0020,
-	0x2001, 0x4005, 0x2009, 0x000a, 0x2020, 0x012e, 0x0804, 0x3575,
-	0x000e, 0x00ce, 0x2b00, 0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6,
-	0x2c70, 0x080c, 0xac5f, 0x0904, 0x498f, 0x2b00, 0x6012, 0x080c,
-	0xcccc, 0x2e58, 0x00ee, 0x00e6, 0x00c6, 0x080c, 0x4aa7, 0x00ce,
-	0x2b70, 0x1158, 0x080c, 0xabed, 0x00ee, 0x00ce, 0x00be, 0x001e,
-	0x012e, 0x2009, 0x0002, 0x0804, 0x35a5, 0x900e, 0xa966, 0xa96a,
-	0x2900, 0x6016, 0xa932, 0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5,
-	0xa86a, 0xd89c, 0x1110, 0x080c, 0x31e7, 0x6023, 0x0001, 0x9006,
-	0x080c, 0x6561, 0xd89c, 0x0138, 0x2001, 0x0004, 0x080c, 0x6575,
-	0x2009, 0x0003, 0x0030, 0x2001, 0x0002, 0x080c, 0x6575, 0x2009,
-	0x0002, 0x080c, 0xac8c, 0x78a8, 0xd094, 0x0138, 0x00ee, 0x7024,
-	0x00e6, 0x2058, 0xb8d4, 0xc08d, 0xb8d6, 0x9085, 0x0001, 0x00ee,
-	0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x35a5, 0x7007, 0x0003, 0x701f, 0x499e, 0x0005, 0xa830, 0x9086,
-	0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004, 0xba04, 0x9294,
-	0x00ff, 0x0804, 0x5637, 0x900e, 0xa868, 0xd0f4, 0x1904, 0x3573,
-	0x080c, 0x6914, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0x0804, 0x3573, 0x00e6, 0x00d6, 0x0096, 0x83ff, 0x0904, 0x4a09,
-	0x902e, 0x080c, 0xab57, 0x0130, 0x9026, 0x20a9, 0x0800, 0x2071,
-	0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781, 0x2071, 0x107f,
-	0x2e04, 0x9005, 0x11b8, 0x2100, 0x9406, 0x1904, 0x4a1a, 0x2428,
-	0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd, 0x1558, 0x0030, 0x94ce,
-	0x0080, 0x1130, 0x92ce, 0xfffc, 0x1520, 0x93ce, 0x00ff, 0x1508,
-	0xc5fd, 0x0480, 0x2058, 0xbf10, 0x2700, 0x9306, 0x11e8, 0xbe14,
-	0x2600, 0x9206, 0x11c8, 0x2400, 0x9106, 0x1180, 0xd884, 0x0598,
-	0xd894, 0x1588, 0x080c, 0x6a0b, 0x1570, 0x2001, 0x4000, 0x0460,
-	0x080c, 0x6a6b, 0x1540, 0x2001, 0x4000, 0x0430, 0x2001, 0x4007,
-	0x0418, 0x2001, 0x4006, 0x0400, 0x2400, 0x9106, 0x1158, 0xbe14,
-	0x87ff, 0x1128, 0x86ff, 0x0918, 0x080c, 0xab57, 0x1900, 0x2001,
-	0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x49d0, 0x85ff, 0x1130,
-	0x2001, 0x4009, 0x0048, 0x2001, 0x0001, 0x0030, 0x080c, 0x65c4,
-	0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, 0x009e, 0x00de, 0x00ee,
-	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35a5, 0x080c,
-	0x4aa7, 0x1120, 0x2009, 0x0002, 0x0804, 0x35a5, 0xa867, 0x0000,
-	0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005, 0x0904, 0x35a8, 0x9096,
-	0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, 0x35a8, 0x2010, 0x2918,
-	0x080c, 0x3181, 0x1120, 0x2009, 0x0003, 0x0804, 0x35a5, 0x7007,
-	0x0003, 0x701f, 0x4a5c, 0x0005, 0xa830, 0x9086, 0x0100, 0x1904,
-	0x3573, 0x2009, 0x0004, 0x0804, 0x35a5, 0x7984, 0x080c, 0xab57,
-	0x1120, 0x9182, 0x007f, 0x0a04, 0x35a8, 0x9186, 0x00ff, 0x0904,
-	0x35a8, 0x9182, 0x0800, 0x1a04, 0x35a8, 0x2001, 0x9000, 0x080c,
-	0x5692, 0x1904, 0x35a5, 0x0804, 0x3573, 0xa998, 0x080c, 0xab57,
-	0x1118, 0x9182, 0x007f, 0x0280, 0x9186, 0x00ff, 0x0168, 0x9182,
-	0x0800, 0x1250, 0x2001, 0x9000, 0x080c, 0x5692, 0x11a8, 0x0060,
-	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0000, 0x0005, 0x2009, 0x000a, 0x0c48, 0x080c,
-	0x103a, 0x0198, 0x9006, 0xa802, 0x7014, 0x9005, 0x1120, 0x2900,
-	0x7016, 0x701a, 0x0040, 0x7018, 0xa802, 0x0086, 0x2040, 0x2900,
-	0xa006, 0x701a, 0x008e, 0x9085, 0x0001, 0x0005, 0x7984, 0x080c,
-	0x6625, 0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208,
-	0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, 0x6625, 0x1130, 0xae9c,
-	0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005,
-	0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, 0x6625, 0x1108, 0x0008,
-	0x905e, 0x8bff, 0x0005, 0x0016, 0x7114, 0x81ff, 0x0128, 0x2148,
-	0xa904, 0x080c, 0x106c, 0x0cc8, 0x7116, 0x711a, 0x001e, 0x0005,
-	0x2031, 0x0001, 0x0010, 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44,
-	0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a,
-	0x080c, 0x1124, 0x7007, 0x0002, 0x701f, 0x3573, 0x0005, 0x00f6,
-	0x0126, 0x2091, 0x8000, 0x2079, 0x0000, 0x2001, 0x18b0, 0x2004,
-	0x9005, 0x1190, 0x0e04, 0x4b24, 0x7a36, 0x7833, 0x0012, 0x7a82,
-	0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x11d6, 0x0804, 0x4b8a, 0x0016, 0x0086, 0x0096, 0x00c6,
-	0x00e6, 0x2071, 0x189e, 0x7044, 0x9005, 0x1540, 0x7148, 0x9182,
-	0x0010, 0x0288, 0x7038, 0x2060, 0x080c, 0x103a, 0x0904, 0x4b82,
-	0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, 0x0002, 0x9080, 0x1e55,
-	0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, 0x0004, 0x2001, 0x18ba,
-	0x9c82, 0x18fa, 0x0210, 0x2061, 0x18ba, 0x2c00, 0x703a, 0x7148,
-	0x81ff, 0x1108, 0x703e, 0x8108, 0x714a, 0x0460, 0x7148, 0x8108,
-	0x714a, 0x7044, 0x2040, 0xa144, 0x2105, 0x0016, 0x908a, 0x0036,
-	0x1a0c, 0x0d7d, 0x2060, 0x001e, 0x8108, 0x2105, 0x9005, 0xa146,
-	0x1520, 0x080c, 0x103a, 0x1130, 0x8109, 0xa946, 0x7148, 0x8109,
-	0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a, 0xa046, 0x2800, 0xa802,
-	0x2900, 0xa006, 0x7046, 0x2001, 0x0002, 0x9080, 0x1e55, 0x2005,
-	0xa846, 0x0058, 0x2262, 0x6306, 0x640a, 0x00ee, 0x00ce, 0x009e,
-	0x008e, 0x001e, 0x012e, 0x00fe, 0x0005, 0x2c00, 0x9082, 0x001b,
-	0x0002, 0x4bac, 0x4bac, 0x4bae, 0x4bac, 0x4bac, 0x4bac, 0x4bb2,
-	0x4bac, 0x4bac, 0x4bac, 0x4bb6, 0x4bac, 0x4bac, 0x4bac, 0x4bba,
-	0x4bac, 0x4bac, 0x4bac, 0x4bbe, 0x4bac, 0x4bac, 0x4bac, 0x4bc2,
-	0x4bac, 0x4bac, 0x4bac, 0x4bc7, 0x080c, 0x0d7d, 0xa276, 0xa37a,
-	0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e, 0x0878, 0xa296, 0xa39a,
-	0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae, 0x0838, 0xa2b6, 0xa3ba,
-	0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce, 0x0804, 0x4b85, 0xa2d6,
-	0xa3da, 0xa4de, 0x0804, 0x4b85, 0x00e6, 0x2071, 0x189e, 0x7048,
-	0x9005, 0x0904, 0x4c5e, 0x0126, 0x2091, 0x8000, 0x0e04, 0x4c5d,
-	0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, 0x0086, 0x0076, 0x9006,
-	0x2038, 0x7040, 0x2048, 0x9005, 0x0500, 0xa948, 0x2105, 0x0016,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x2009, 0x000a,
+	0x0c48, 0x080c, 0x103a, 0x0198, 0x9006, 0xa802, 0x7014, 0x9005,
+	0x1120, 0x2900, 0x7016, 0x701a, 0x0040, 0x7018, 0xa802, 0x0086,
+	0x2040, 0x2900, 0xa006, 0x701a, 0x008e, 0x9085, 0x0001, 0x0005,
+	0x7984, 0x080c, 0x6620, 0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082,
+	0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, 0x6620,
+	0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e,
+	0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, 0x6620,
+	0x1108, 0x0008, 0x905e, 0x8bff, 0x0005, 0x0016, 0x7114, 0x81ff,
+	0x0128, 0x2148, 0xa904, 0x080c, 0x106c, 0x0cc8, 0x7116, 0x711a,
+	0x001e, 0x0005, 0x2031, 0x0001, 0x0010, 0x2031, 0x0000, 0x2061,
+	0x18b8, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392,
+	0xa496, 0xa59a, 0x080c, 0x112f, 0x7007, 0x0002, 0x701f, 0x3567,
+	0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0000, 0x2001,
+	0x18b0, 0x2004, 0x9005, 0x1190, 0x0e04, 0x4b26, 0x7a36, 0x7833,
+	0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x11e1, 0x0804, 0x4b8c, 0x0016, 0x0086,
+	0x0096, 0x00c6, 0x00e6, 0x2071, 0x189e, 0x7044, 0x9005, 0x1540,
+	0x7148, 0x9182, 0x0010, 0x0288, 0x7038, 0x2060, 0x080c, 0x103a,
+	0x0904, 0x4b84, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, 0x0002,
+	0x9080, 0x1e62, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, 0x0004,
+	0x2001, 0x18ba, 0x9c82, 0x18fa, 0x0210, 0x2061, 0x18ba, 0x2c00,
+	0x703a, 0x7148, 0x81ff, 0x1108, 0x703e, 0x8108, 0x714a, 0x0460,
+	0x7148, 0x8108, 0x714a, 0x7044, 0x2040, 0xa144, 0x2105, 0x0016,
 	0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x2060, 0x001e, 0x8108, 0x2105,
-	0x9005, 0xa94a, 0x1904, 0x4c60, 0xa804, 0x9005, 0x090c, 0x0d7d,
-	0x7042, 0x2938, 0x2040, 0xa003, 0x0000, 0x2001, 0x0002, 0x9080,
-	0x1e55, 0x2005, 0xa04a, 0x0804, 0x4c60, 0x703c, 0x2060, 0x2c14,
-	0x6304, 0x6408, 0x650c, 0x2200, 0x7836, 0x7833, 0x0012, 0x7882,
-	0x2300, 0x7886, 0x2400, 0x788a, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11d6, 0x87ff, 0x0118, 0x2748, 0x080c,
-	0x106c, 0x7048, 0x8001, 0x704a, 0x9005, 0x1170, 0x7040, 0x2048,
-	0x9005, 0x0128, 0x080c, 0x106c, 0x9006, 0x7042, 0x7046, 0x703b,
-	0x18ba, 0x703f, 0x18ba, 0x0420, 0x7040, 0x9005, 0x1508, 0x7238,
-	0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004, 0x90fa, 0x18fa, 0x0210,
-	0x2001, 0x18ba, 0x703e, 0x00a0, 0x9006, 0x703e, 0x703a, 0x7044,
-	0x9005, 0x090c, 0x0d7d, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900,
-	0x7042, 0x2001, 0x0002, 0x9080, 0x1e55, 0x2005, 0xa84a, 0x0000,
-	0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe, 0x012e, 0x00ee, 0x0005,
-	0x2c00, 0x9082, 0x001b, 0x0002, 0x4c7f, 0x4c7f, 0x4c81, 0x4c7f,
-	0x4c7f, 0x4c7f, 0x4c86, 0x4c7f, 0x4c7f, 0x4c7f, 0x4c8b, 0x4c7f,
-	0x4c7f, 0x4c7f, 0x4c90, 0x4c7f, 0x4c7f, 0x4c7f, 0x4c95, 0x4c7f,
-	0x4c7f, 0x4c7f, 0x4c9a, 0x4c7f, 0x4c7f, 0x4c7f, 0x4c9f, 0x080c,
-	0x0d7d, 0xaa74, 0xab78, 0xac7c, 0x0804, 0x4c0b, 0xaa84, 0xab88,
-	0xac8c, 0x0804, 0x4c0b, 0xaa94, 0xab98, 0xac9c, 0x0804, 0x4c0b,
-	0xaaa4, 0xaba8, 0xacac, 0x0804, 0x4c0b, 0xaab4, 0xabb8, 0xacbc,
-	0x0804, 0x4c0b, 0xaac4, 0xabc8, 0xaccc, 0x0804, 0x4c0b, 0xaad4,
-	0xabd8, 0xacdc, 0x0804, 0x4c0b, 0x0016, 0x0026, 0x0036, 0x00b6,
-	0x00c6, 0x2009, 0x007e, 0x080c, 0x6625, 0x2019, 0x0001, 0xb85c,
-	0xd0ac, 0x0110, 0x2019, 0x0000, 0x2011, 0x801b, 0x080c, 0x4b07,
-	0x00ce, 0x00be, 0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x080c,
-	0x56da, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x4b07, 0x002e,
-	0x0005, 0x81ff, 0x1904, 0x35a5, 0x0126, 0x2091, 0x8000, 0x6030,
-	0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x74e9, 0x1158, 0x080c,
-	0x77ed, 0x080c, 0x6029, 0x9085, 0x0001, 0x080c, 0x7530, 0x080c,
-	0x741a, 0x0010, 0x080c, 0x5ee4, 0x012e, 0x0804, 0x3573, 0x81ff,
-	0x0120, 0x2009, 0x0001, 0x0804, 0x35a5, 0x080c, 0x56ee, 0x0120,
-	0x2009, 0x0007, 0x0804, 0x35a5, 0x080c, 0x6a63, 0x0120, 0x2009,
-	0x0008, 0x0804, 0x35a5, 0x080c, 0x3363, 0x0128, 0x7984, 0x080c,
-	0x65c4, 0x1904, 0x35a8, 0x080c, 0x4ada, 0x0904, 0x35a8, 0x2b00,
-	0x7026, 0x080c, 0x6a6b, 0x7888, 0x1170, 0x9084, 0x0005, 0x1158,
-	0x900e, 0x080c, 0x6914, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0x0804, 0x3573, 0x080c, 0x4aa7, 0x0904, 0x35a5, 0x9006,
-	0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xca6a, 0x0904,
-	0x35a5, 0x7888, 0xd094, 0x0118, 0xb8d4, 0xc08d, 0xb8d6, 0x7007,
-	0x0003, 0x701f, 0x4d80, 0x0005, 0x2061, 0x1800, 0x080c, 0x56ee,
-	0x2009, 0x0007, 0x1578, 0x080c, 0x6a63, 0x0118, 0x2009, 0x0008,
-	0x0448, 0x080c, 0x3363, 0x0120, 0xa998, 0x080c, 0x65c4, 0x1530,
-	0x080c, 0x4ad8, 0x0518, 0x080c, 0x6a6b, 0xa89c, 0x1168, 0x9084,
-	0x0005, 0x1150, 0x900e, 0x080c, 0x6914, 0x1108, 0xc185, 0xb800,
-	0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c,
-	0xca6a, 0x11e0, 0xa89c, 0xd094, 0x0118, 0xb8d4, 0xc08d, 0xb8d6,
-	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0xa99a, 0x9006, 0x918d, 0x0001, 0x2008, 0x0005, 0x9006, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x7024, 0x2058, 0x1110, 0x0804, 0x5637,
-	0x900e, 0x080c, 0x6914, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0x0804, 0x3573, 0x080c, 0x56ee, 0x0120, 0x2009, 0x0007,
-	0x0804, 0x35a5, 0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c,
-	0x4aa7, 0x1120, 0x2009, 0x0002, 0x0804, 0x35a5, 0x900e, 0x2130,
-	0x7126, 0x7132, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005,
-	0x702a, 0x20a0, 0x080c, 0x6625, 0x1904, 0x4e22, 0x080c, 0x6a6b,
-	0x0138, 0x080c, 0x6a73, 0x0120, 0x080c, 0x6a0b, 0x1904, 0x4e22,
-	0xd794, 0x1110, 0xd784, 0x01a8, 0xb8c4, 0x20e0, 0xb8c8, 0x9080,
-	0x0006, 0x2098, 0x3400, 0xd794, 0x0160, 0x20a9, 0x0008, 0x4003,
-	0x2098, 0x20a0, 0x3d00, 0x20e0, 0x20a9, 0x0002, 0x080c, 0x48a9,
-	0x0048, 0x20a9, 0x0004, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0,
-	0x080c, 0x48a9, 0x9186, 0x007e, 0x0170, 0x9186, 0x0080, 0x0158,
-	0x080c, 0x6a6b, 0x90c2, 0x0006, 0x1210, 0xc1fd, 0x0020, 0x080c,
-	0x6914, 0x1108, 0xc1fd, 0x4104, 0xc1fc, 0xd794, 0x0528, 0xb8c4,
-	0x20e0, 0xb8c8, 0x2060, 0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002,
-	0x4003, 0x9c80, 0x0003, 0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80,
-	0x0004, 0x2098, 0x3400, 0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0,
-	0x3d00, 0x20e0, 0x080c, 0x489c, 0x9c80, 0x0026, 0x2098, 0xb8c4,
-	0x20e0, 0x20a9, 0x0002, 0x4003, 0xd794, 0x0110, 0x96b0, 0x000b,
-	0x96b0, 0x0005, 0x8108, 0x080c, 0xab57, 0x0118, 0x9186, 0x0800,
-	0x0040, 0xd78c, 0x0120, 0x9186, 0x0800, 0x0170, 0x0018, 0x9186,
-	0x007e, 0x0150, 0xd794, 0x0118, 0x9686, 0x0020, 0x0010, 0x9686,
-	0x0028, 0x0150, 0x0804, 0x4db2, 0x86ff, 0x1120, 0x7124, 0x810b,
-	0x0804, 0x3573, 0x7033, 0x0001, 0x7122, 0x7024, 0x9600, 0x7026,
-	0x772e, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034,
-	0xa072, 0x7028, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
-	0x1124, 0x7007, 0x0002, 0x701f, 0x4e5e, 0x0005, 0x7030, 0x9005,
-	0x1180, 0x7120, 0x7028, 0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8,
-	0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x0804,
-	0x4db2, 0x7124, 0x810b, 0x0804, 0x3573, 0x2029, 0x007e, 0x7984,
-	0x7a88, 0x7b8c, 0x7c98, 0x9184, 0xff00, 0x8007, 0x90e2, 0x0020,
-	0x0a04, 0x35a8, 0x9502, 0x0a04, 0x35a8, 0x9184, 0x00ff, 0x90e2,
-	0x0020, 0x0a04, 0x35a8, 0x9502, 0x0a04, 0x35a8, 0x9284, 0xff00,
-	0x8007, 0x90e2, 0x0020, 0x0a04, 0x35a8, 0x9502, 0x0a04, 0x35a8,
-	0x9284, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35a8, 0x9502, 0x0a04,
-	0x35a8, 0x9384, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x35a8,
-	0x9502, 0x0a04, 0x35a8, 0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04,
-	0x35a8, 0x9502, 0x0a04, 0x35a8, 0x9484, 0xff00, 0x8007, 0x90e2,
-	0x0020, 0x0a04, 0x35a8, 0x9502, 0x0a04, 0x35a8, 0x9484, 0x00ff,
-	0x90e2, 0x0020, 0x0a04, 0x35a8, 0x9502, 0x0a04, 0x35a8, 0x2061,
-	0x1989, 0x6102, 0x6206, 0x630a, 0x640e, 0x0804, 0x3573, 0x080c,
-	0x4aa7, 0x0904, 0x35a5, 0x2009, 0x0016, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4af0, 0x701f,
-	0x4ee2, 0x0005, 0x2001, 0x0138, 0x2003, 0x0000, 0x00e6, 0x2071,
-	0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee, 0x20a9, 0x0016, 0x896e,
-	0x8d6e, 0x8d6f, 0x9d84, 0xffc0, 0x9080, 0x0019, 0x2098, 0x9d84,
-	0x003f, 0x20e0, 0x2069, 0x1877, 0x20e9, 0x0001, 0x2da0, 0x4003,
-	0x6800, 0x9005, 0x0904, 0x4f63, 0x6804, 0x2008, 0x918c, 0xfff8,
-	0x1904, 0x4f63, 0x680c, 0x9005, 0x0904, 0x4f63, 0x9082, 0xff01,
-	0x1a04, 0x4f63, 0x6810, 0x9082, 0x005c, 0x0a04, 0x4f63, 0x6824,
-	0x2008, 0x9082, 0x0008, 0x0a04, 0x4f63, 0x9182, 0x0400, 0x1a04,
-	0x4f63, 0x0056, 0x2029, 0x0000, 0x080c, 0x8d0a, 0x005e, 0x6944,
-	0x6820, 0x9102, 0x06c0, 0x6820, 0x9082, 0x0019, 0x16a0, 0x6828,
-	0x6944, 0x810c, 0x9102, 0x0678, 0x6840, 0x9082, 0x000f, 0x1658,
-	0x080c, 0x1053, 0x2900, 0x0904, 0x4f7d, 0x684e, 0x00e6, 0x2071,
-	0x1930, 0x00b6, 0x2059, 0x0000, 0x080c, 0x8bc6, 0x00be, 0x00ee,
-	0x0558, 0x080c, 0x8920, 0x080c, 0x8966, 0x11e0, 0x6857, 0x0000,
-	0x00c6, 0x2061, 0x0100, 0x6104, 0x918d, 0x2000, 0x6106, 0x6b10,
-	0x2061, 0x1a6b, 0x630a, 0x00ce, 0x080c, 0x2713, 0x2001, 0x0138,
-	0x2102, 0x0804, 0x3573, 0x080c, 0x2713, 0x2001, 0x0138, 0x2102,
-	0x0804, 0x35a8, 0x00e6, 0x2071, 0x1930, 0x080c, 0x8d9b, 0x080c,
-	0x8daa, 0x080c, 0x8bb5, 0x00ee, 0x2001, 0x188a, 0x204c, 0x080c,
-	0x106c, 0x2001, 0x188a, 0x2003, 0x0000, 0x080c, 0x2713, 0x2001,
-	0x0138, 0x2102, 0x0804, 0x35a5, 0x2001, 0x1924, 0x200c, 0x918e,
-	0x0000, 0x0904, 0x4fdc, 0x080c, 0x8bb0, 0x0904, 0x4fdc, 0x2001,
-	0x0101, 0x200c, 0x918c, 0xdfff, 0x2102, 0x2001, 0x0138, 0x2003,
-	0x0000, 0x00e6, 0x2071, 0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee,
-	0x080c, 0x8bb5, 0x2001, 0x0035, 0x080c, 0x1679, 0x00c6, 0x2061,
-	0x193c, 0x6004, 0x6100, 0x9106, 0x1de0, 0x00ce, 0x080c, 0x2713,
-	0x2001, 0x0138, 0x2102, 0x00e6, 0x00f6, 0x2071, 0x1923, 0x080c,
-	0x8af1, 0x0120, 0x2f00, 0x080c, 0x8b7b, 0x0cc8, 0x00fe, 0x00ee,
-	0x0126, 0x2091, 0x8000, 0x2001, 0x188a, 0x200c, 0x81ff, 0x0138,
-	0x2148, 0x080c, 0x106c, 0x2001, 0x188a, 0x2003, 0x0000, 0x2001,
-	0x183d, 0x2003, 0x0020, 0x00e6, 0x2071, 0x1930, 0x080c, 0x8d9b,
-	0x080c, 0x8daa, 0x00ee, 0x012e, 0x0804, 0x3573, 0x0006, 0x080c,
-	0x56da, 0xd0cc, 0x000e, 0x0005, 0x0006, 0x080c, 0x56de, 0xd0bc,
-	0x000e, 0x0005, 0x6174, 0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986,
-	0x0804, 0x3573, 0x83ff, 0x1904, 0x35a8, 0x2001, 0xfff0, 0x9200,
-	0x1a04, 0x35a8, 0x2019, 0xffff, 0x6078, 0x9302, 0x9200, 0x0a04,
-	0x35a8, 0x7986, 0x6276, 0x0804, 0x3573, 0x080c, 0x56ee, 0x1904,
-	0x35a5, 0x7c88, 0x7d84, 0x7e98, 0x7f8c, 0x080c, 0x4aa7, 0x0904,
-	0x35a5, 0x900e, 0x901e, 0x7326, 0x7332, 0xa860, 0x20e8, 0x7036,
-	0xa85c, 0x9080, 0x0003, 0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c,
-	0x8bff, 0x0178, 0x080c, 0x6a6b, 0x0118, 0x080c, 0x6a73, 0x1148,
-	0x20a9, 0x0001, 0xb814, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398,
-	0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0170,
-	0x0c20, 0x83ff, 0x1148, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c,
-	0x9166, 0x2208, 0x0804, 0x3573, 0x7033, 0x0001, 0x7122, 0x7024,
-	0x9300, 0x7026, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa37a,
-	0x7028, 0xa076, 0x7034, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a,
-	0x080c, 0x1124, 0x7007, 0x0002, 0x701f, 0x505f, 0x0005, 0x7030,
-	0x9005, 0x1178, 0x7120, 0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8,
-	0x2061, 0x18b8, 0x2c44, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0804,
-	0x501d, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x9166, 0x2208,
-	0x0804, 0x3573, 0x00f6, 0x00e6, 0x080c, 0x56ee, 0x2009, 0x0007,
-	0x1904, 0x50f2, 0x2071, 0x189e, 0x745c, 0x84ff, 0x2009, 0x000e,
-	0x1904, 0x50f2, 0xac9c, 0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c,
-	0x1053, 0x2009, 0x0002, 0x0904, 0x50f2, 0x2900, 0x705e, 0x900e,
-	0x901e, 0x7356, 0x7362, 0xa860, 0x7066, 0xa85c, 0x9080, 0x0003,
-	0x705a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c,
-	0x6a6b, 0x0118, 0x080c, 0x6a73, 0x1148, 0xb814, 0x20a9, 0x0001,
-	0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182,
-	0x0800, 0x0120, 0x9386, 0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0,
-	0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x9166, 0x2208, 0x009e,
-	0xa897, 0x4000, 0xa99a, 0x715c, 0x81ff, 0x090c, 0x0d7d, 0x2148,
-	0x080c, 0x106c, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0x0418,
-	0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0x2061, 0x18b9,
-	0x2c44, 0xa37a, 0x7058, 0xa076, 0x7064, 0xa072, 0xa48e, 0xa592,
-	0xa696, 0xa79a, 0xa09f, 0x50fe, 0x000e, 0xa0a2, 0x080c, 0x1124,
-	0x9006, 0x0048, 0x009e, 0xa897, 0x4005, 0xa99a, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0030, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0,
-	0x904d, 0x090c, 0x0d7d, 0x00e6, 0x2071, 0x189e, 0xa06c, 0x908e,
-	0x0100, 0x0138, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002,
-	0x00d8, 0x7060, 0x9005, 0x1158, 0x7150, 0x7058, 0x20a0, 0x901e,
-	0x7064, 0x20e8, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0428, 0xa87b,
-	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x7254, 0x900e, 0x2001,
-	0x0003, 0x080c, 0x9166, 0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0d7d,
-	0x2148, 0x080c, 0x106c, 0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6d80, 0x012e, 0xa09f, 0x0000, 0xa0a3,
-	0x0000, 0x00ee, 0x00fe, 0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff,
-	0x0178, 0x080c, 0x6a6b, 0x0118, 0x080c, 0x6a73, 0x1148, 0xb814,
-	0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003,
-	0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0518, 0x0c20,
-	0x83ff, 0x11f0, 0x7154, 0x810c, 0xa99a, 0xa897, 0x4000, 0x715c,
-	0x81ff, 0x090c, 0x0d7d, 0x2148, 0x080c, 0x106c, 0x9006, 0x705e,
-	0x918d, 0x0001, 0x2008, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6d80, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070,
-	0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e,
-	0xa592, 0xa696, 0xa79a, 0x080c, 0x1124, 0x9006, 0x00ee, 0x0005,
-	0x0096, 0xa88c, 0x90be, 0x7000, 0x0148, 0x90be, 0x7100, 0x0130,
-	0x90be, 0x7200, 0x0118, 0x009e, 0x0804, 0x35a8, 0xa884, 0xa988,
-	0x080c, 0x25fb, 0x1518, 0x080c, 0x65c4, 0x1500, 0x7126, 0xbe12,
-	0xbd16, 0xae7c, 0x080c, 0x4aa7, 0x01c8, 0x080c, 0x4aa7, 0x01b0,
-	0x009e, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000,
-	0xa804, 0x2048, 0x080c, 0xc9e8, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x35a5, 0x7007, 0x0003, 0x701f, 0x51cb, 0x0005, 0x009e, 0x2009,
-	0x0002, 0x0804, 0x35a5, 0x7124, 0x080c, 0x32fc, 0xa820, 0x9086,
-	0x8001, 0x1120, 0x2009, 0x0004, 0x0804, 0x35a5, 0x2900, 0x7022,
-	0xa804, 0x0096, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
-	0x9084, 0xffc0, 0x009e, 0x9080, 0x0002, 0x0076, 0x0006, 0x2098,
-	0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0fb7, 0xaa6c,
-	0xab70, 0xac74, 0xad78, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000,
-	0xae64, 0xaf8c, 0x97c6, 0x7000, 0x0118, 0x97c6, 0x7100, 0x1148,
-	0x96c2, 0x0004, 0x0600, 0x2009, 0x0004, 0x000e, 0x007e, 0x0804,
-	0x4af3, 0x97c6, 0x7200, 0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e,
-	0x007e, 0x2061, 0x18b8, 0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a,
-	0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x1124, 0x7007, 0x0002,
-	0x701f, 0x5227, 0x0005, 0x000e, 0x007e, 0x0804, 0x35a8, 0x7020,
-	0x2048, 0xa804, 0x2048, 0xa804, 0x2048, 0x8906, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0,
-	0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0fb7, 0x2100, 0x2238,
-	0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x2009,
-	0x002a, 0x0804, 0x4af3, 0x81ff, 0x1904, 0x35a5, 0x798c, 0x2001,
-	0x197e, 0x918c, 0x8000, 0x2102, 0x080c, 0x4abe, 0x0904, 0x35a8,
-	0x080c, 0x6a6b, 0x0120, 0x080c, 0x6a73, 0x1904, 0x35a8, 0x080c,
-	0x66ec, 0x0904, 0x35a5, 0x0126, 0x2091, 0x8000, 0x080c, 0x6881,
-	0x012e, 0x0904, 0x35a5, 0x2001, 0x197e, 0x2004, 0xd0fc, 0x1904,
-	0x3573, 0x0804, 0x4548, 0xa9a0, 0x2001, 0x197e, 0x918c, 0x8000,
-	0xc18d, 0x2102, 0x080c, 0x4acb, 0x01a0, 0x080c, 0x6a6b, 0x0118,
-	0x080c, 0x6a73, 0x1170, 0x080c, 0x66ec, 0x2009, 0x0002, 0x0128,
-	0x080c, 0x6881, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a,
+	0x9005, 0xa146, 0x1520, 0x080c, 0x103a, 0x1130, 0x8109, 0xa946,
+	0x7148, 0x8109, 0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a, 0xa046,
+	0x2800, 0xa802, 0x2900, 0xa006, 0x7046, 0x2001, 0x0002, 0x9080,
+	0x1e62, 0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a, 0x00ee,
+	0x00ce, 0x009e, 0x008e, 0x001e, 0x012e, 0x00fe, 0x0005, 0x2c00,
+	0x9082, 0x001b, 0x0002, 0x4bae, 0x4bae, 0x4bb0, 0x4bae, 0x4bae,
+	0x4bae, 0x4bb4, 0x4bae, 0x4bae, 0x4bae, 0x4bb8, 0x4bae, 0x4bae,
+	0x4bae, 0x4bbc, 0x4bae, 0x4bae, 0x4bae, 0x4bc0, 0x4bae, 0x4bae,
+	0x4bae, 0x4bc4, 0x4bae, 0x4bae, 0x4bae, 0x4bc9, 0x080c, 0x0d7d,
+	0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e, 0x0878,
+	0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae, 0x0838,
+	0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce, 0x0804,
+	0x4b87, 0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x4b87, 0x00e6, 0x2071,
+	0x189e, 0x7048, 0x9005, 0x0904, 0x4c60, 0x0126, 0x2091, 0x8000,
+	0x0e04, 0x4c5f, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, 0x0086,
+	0x0076, 0x9006, 0x2038, 0x7040, 0x2048, 0x9005, 0x0500, 0xa948,
+	0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x2060, 0x001e,
+	0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, 0x4c62, 0xa804, 0x9005,
+	0x090c, 0x0d7d, 0x7042, 0x2938, 0x2040, 0xa003, 0x0000, 0x2001,
+	0x0002, 0x9080, 0x1e62, 0x2005, 0xa04a, 0x0804, 0x4c62, 0x703c,
+	0x2060, 0x2c14, 0x6304, 0x6408, 0x650c, 0x2200, 0x7836, 0x7833,
+	0x0012, 0x7882, 0x2300, 0x7886, 0x2400, 0x788a, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e1, 0x87ff, 0x0118,
+	0x2748, 0x080c, 0x106c, 0x7048, 0x8001, 0x704a, 0x9005, 0x1170,
+	0x7040, 0x2048, 0x9005, 0x0128, 0x080c, 0x106c, 0x9006, 0x7042,
+	0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba, 0x0420, 0x7040, 0x9005,
+	0x1508, 0x7238, 0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004, 0x90fa,
+	0x18fa, 0x0210, 0x2001, 0x18ba, 0x703e, 0x00a0, 0x9006, 0x703e,
+	0x703a, 0x7044, 0x9005, 0x090c, 0x0d7d, 0x2048, 0xa800, 0x9005,
+	0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1e62, 0x2005,
+	0xa84a, 0x0000, 0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe, 0x012e,
+	0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4c81, 0x4c81,
+	0x4c83, 0x4c81, 0x4c81, 0x4c81, 0x4c88, 0x4c81, 0x4c81, 0x4c81,
+	0x4c8d, 0x4c81, 0x4c81, 0x4c81, 0x4c92, 0x4c81, 0x4c81, 0x4c81,
+	0x4c97, 0x4c81, 0x4c81, 0x4c81, 0x4c9c, 0x4c81, 0x4c81, 0x4c81,
+	0x4ca1, 0x080c, 0x0d7d, 0xaa74, 0xab78, 0xac7c, 0x0804, 0x4c0d,
+	0xaa84, 0xab88, 0xac8c, 0x0804, 0x4c0d, 0xaa94, 0xab98, 0xac9c,
+	0x0804, 0x4c0d, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x4c0d, 0xaab4,
+	0xabb8, 0xacbc, 0x0804, 0x4c0d, 0xaac4, 0xabc8, 0xaccc, 0x0804,
+	0x4c0d, 0xaad4, 0xabd8, 0xacdc, 0x0804, 0x4c0d, 0x0016, 0x0026,
+	0x0036, 0x00b6, 0x00c6, 0x2009, 0x007e, 0x080c, 0x6620, 0x2019,
+	0x0001, 0xb85c, 0xd0ac, 0x0110, 0x2019, 0x0000, 0x2011, 0x801b,
+	0x080c, 0x4b09, 0x00ce, 0x00be, 0x003e, 0x002e, 0x001e, 0x0005,
+	0x0026, 0x080c, 0x56d5, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c,
+	0x4b09, 0x002e, 0x0005, 0x81ff, 0x1904, 0x3599, 0x0126, 0x2091,
+	0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x74c8,
+	0x1158, 0x080c, 0x77cc, 0x080c, 0x6024, 0x9085, 0x0001, 0x080c,
+	0x750f, 0x080c, 0x73f9, 0x0010, 0x080c, 0x5edf, 0x012e, 0x0804,
+	0x3567, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3599, 0x080c,
+	0x56e9, 0x0120, 0x2009, 0x0007, 0x0804, 0x3599, 0x080c, 0x6a62,
+	0x0120, 0x2009, 0x0008, 0x0804, 0x3599, 0x7984, 0x080c, 0x65bf,
+	0x1904, 0x359c, 0x2b00, 0x7026, 0x080c, 0x6a6a, 0x7888, 0x1170,
+	0x9084, 0x0005, 0x1158, 0x900e, 0x080c, 0x6913, 0x1108, 0xc185,
+	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3567, 0x080c, 0x4aa9,
+	0x0904, 0x3599, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
+	0x080c, 0xca69, 0x0904, 0x3599, 0x7888, 0xd094, 0x0118, 0xb8d4,
+	0xc08d, 0xb8d6, 0x7007, 0x0003, 0x701f, 0x4d7b, 0x0005, 0x2061,
+	0x1800, 0x080c, 0x56e9, 0x2009, 0x0007, 0x1578, 0x080c, 0x6a62,
+	0x0118, 0x2009, 0x0008, 0x0448, 0x080c, 0x3357, 0x0120, 0xa998,
+	0x080c, 0x65bf, 0x1530, 0x080c, 0x4ada, 0x0518, 0x080c, 0x6a6a,
+	0xa89c, 0x1168, 0x9084, 0x0005, 0x1150, 0x900e, 0x080c, 0x6913,
+	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868,
+	0xc0fc, 0xa86a, 0x080c, 0xca69, 0x11e0, 0xa89c, 0xd094, 0x0118,
+	0xb8d4, 0xc08d, 0xb8d6, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a,
 	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
-	0x0005, 0xa897, 0x4000, 0x2001, 0x197e, 0x2004, 0xd0fc, 0x1128,
-	0x080c, 0x56e2, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0000, 0x0005, 0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904,
-	0x44bd, 0x080c, 0x4ada, 0x0904, 0x35a8, 0x080c, 0x4aa7, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x35a5, 0x080c, 0x6a6b, 0x0130, 0x908e,
-	0x0004, 0x0118, 0x908e, 0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120,
-	0xb800, 0xc08c, 0xb802, 0x0028, 0x080c, 0x56da, 0xd0b4, 0x0904,
-	0x44f7, 0x7884, 0x908e, 0x007e, 0x0904, 0x44f7, 0x908e, 0x007f,
-	0x0904, 0x44f7, 0x908e, 0x0080, 0x0904, 0x44f7, 0xb800, 0xd08c,
-	0x1904, 0x44f7, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c,
-	0xca07, 0x1120, 0x2009, 0x0003, 0x0804, 0x35a5, 0x7007, 0x0003,
-	0x701f, 0x52f3, 0x0005, 0x080c, 0x4ada, 0x0904, 0x35a8, 0x0804,
-	0x44f7, 0x080c, 0x3363, 0x0108, 0x0005, 0x2009, 0x1834, 0x210c,
-	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35a5, 0x080c, 0x56ee,
-	0x0120, 0x2009, 0x0007, 0x0804, 0x35a5, 0x080c, 0x6a63, 0x0120,
-	0x2009, 0x0008, 0x0804, 0x35a5, 0xb89c, 0xd0a4, 0x1118, 0xd0ac,
-	0x1904, 0x44f7, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
-	0x080c, 0xca6a, 0x1120, 0x2009, 0x0003, 0x0804, 0x35a5, 0x7007,
-	0x0003, 0x701f, 0x532c, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120,
-	0x2009, 0x0004, 0x0804, 0x5637, 0x080c, 0x4ada, 0x0904, 0x35a8,
-	0x0804, 0x52c5, 0x81ff, 0x2009, 0x0001, 0x1904, 0x35a5, 0x080c,
-	0x56ee, 0x2009, 0x0007, 0x1904, 0x35a5, 0x080c, 0x6a63, 0x0120,
-	0x2009, 0x0008, 0x0804, 0x35a5, 0x080c, 0x4ada, 0x0904, 0x35a8,
-	0x080c, 0x6a6b, 0x2009, 0x0009, 0x1904, 0x35a5, 0x080c, 0x4aa7,
-	0x2009, 0x0002, 0x0904, 0x35a5, 0x9006, 0xa866, 0xa832, 0xa868,
-	0xc0fd, 0xa86a, 0x7988, 0x9194, 0xff00, 0x918c, 0x00ff, 0x9006,
-	0x82ff, 0x1128, 0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038, 0x928e,
-	0x0100, 0x1904, 0x35a8, 0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c,
-	0xcccd, 0x2009, 0x0003, 0x0904, 0x35a5, 0x7007, 0x0003, 0x701f,
-	0x5382, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904,
-	0x35a5, 0x0804, 0x3573, 0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec,
-	0x01a0, 0x080c, 0x56ee, 0x1188, 0x2009, 0x0014, 0x0804, 0x35a5,
-	0xd2dc, 0x1568, 0x81ff, 0x2009, 0x0001, 0x1904, 0x35a5, 0x080c,
-	0x56ee, 0x2009, 0x0007, 0x1904, 0x35a5, 0xd2f4, 0x0130, 0x9284,
-	0x5000, 0x080c, 0x56b5, 0x0804, 0x3573, 0xd2fc, 0x0158, 0x080c,
-	0x4ada, 0x0904, 0x35a8, 0x7984, 0x9284, 0x9000, 0x080c, 0x5692,
-	0x0804, 0x3573, 0x080c, 0x4ada, 0x0904, 0x35a8, 0xb804, 0x9084,
-	0x00ff, 0x9086, 0x0006, 0x2009, 0x0009, 0x1904, 0x546b, 0x080c,
-	0x4aa7, 0x2009, 0x0002, 0x0904, 0x546b, 0xa85c, 0x9080, 0x001b,
-	0xaf60, 0x2009, 0x0008, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c,
-	0x4af0, 0x701f, 0x53dc, 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138,
-	0xa870, 0x9005, 0x1120, 0xa874, 0x9084, 0xff00, 0x0110, 0x1904,
-	0x35a8, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x4ada,
-	0x1110, 0x0804, 0x35a8, 0x2009, 0x0043, 0x080c, 0xcd35, 0x2009,
-	0x0003, 0x0904, 0x546b, 0x7007, 0x0003, 0x701f, 0x5400, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x546b, 0x7984,
-	0x7aa8, 0x9284, 0x1000, 0x080c, 0x5692, 0x0804, 0x3573, 0x00c6,
-	0xaab0, 0x9284, 0xc000, 0x0140, 0xd2ec, 0x0168, 0x080c, 0x56ee,
-	0x1150, 0x2009, 0x0014, 0x04f0, 0x2061, 0x1800, 0x080c, 0x56ee,
-	0x2009, 0x0007, 0x15b8, 0xd2f4, 0x0128, 0x9284, 0x5000, 0x080c,
-	0x56b5, 0x0050, 0xd2fc, 0x0178, 0x080c, 0x4ad8, 0x0588, 0xa998,
-	0x9284, 0x9000, 0x080c, 0x5692, 0xa87b, 0x0000, 0xa883, 0x0000,
-	0xa897, 0x4000, 0x0438, 0x080c, 0x4ad8, 0x0510, 0x080c, 0x6a6b,
-	0x2009, 0x0009, 0x11b8, 0xa8c4, 0x9086, 0x0500, 0x11c8, 0xa8c8,
-	0x9005, 0x11b0, 0xa8cc, 0x9084, 0xff00, 0x1190, 0x080c, 0x4ad8,
-	0x1108, 0x0070, 0x2009, 0x004b, 0x080c, 0xcd35, 0x2009, 0x0003,
-	0x0108, 0x0078, 0x0429, 0x19c0, 0xa897, 0x4005, 0xa99a, 0x0010,
-	0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ce,
-	0x0005, 0x9006, 0x0ce0, 0x7aa8, 0xd2dc, 0x0904, 0x35a5, 0x0016,
-	0x7984, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5692, 0x001e, 0x1904,
-	0x35a5, 0x0804, 0x3573, 0x00f6, 0x2d78, 0x0011, 0x00fe, 0x0005,
-	0xaab0, 0xd2dc, 0x0150, 0x0016, 0xa998, 0x9284, 0x1000, 0xc0fd,
-	0x080c, 0x5692, 0x001e, 0x9085, 0x0001, 0x0005, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x35a5, 0x080c, 0x56ee, 0x0120, 0x2009,
-	0x0007, 0x0804, 0x35a5, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c,
-	0x6625, 0x1904, 0x35a8, 0x9186, 0x007f, 0x0138, 0x080c, 0x6a6b,
-	0x0120, 0x2009, 0x0009, 0x0804, 0x35a5, 0x080c, 0x4aa7, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x35a5, 0xa867, 0x0000, 0xa868, 0xc0fd,
-	0xa86a, 0x2001, 0x0100, 0x8007, 0xa80a, 0x080c, 0xca21, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x35a5, 0x7007, 0x0003, 0x701f, 0x54c9,
-	0x0005, 0xa808, 0x8007, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004,
-	0x0804, 0x35a5, 0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084, 0x00ff,
-	0x800c, 0xa814, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0002,
-	0x9108, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0004, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4af3,
-	0x080c, 0x4aa7, 0x1120, 0x2009, 0x0002, 0x0804, 0x35a5, 0x7984,
-	0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023,
-	0x19b3, 0x0040, 0x92c6, 0x0001, 0x1118, 0x7023, 0x19cd, 0x0010,
-	0x0804, 0x35a8, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4af0, 0x701f, 0x5519,
-	0x0005, 0x2001, 0x182e, 0x2003, 0x0001, 0xa85c, 0x9080, 0x0019,
-	0x2098, 0xa860, 0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9,
-	0x0001, 0x4003, 0x0804, 0x3573, 0x080c, 0x4aa7, 0x1120, 0x2009,
-	0x0002, 0x0804, 0x35a5, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff,
-	0x8217, 0x82ff, 0x1118, 0x2099, 0x19b3, 0x0040, 0x92c6, 0x0001,
-	0x1118, 0x2099, 0x19cd, 0x0010, 0x0804, 0x35a8, 0xa85c, 0x9080,
-	0x0019, 0x20a0, 0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001,
-	0x4003, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c,
-	0x9080, 0x0019, 0xaf60, 0x0804, 0x4af3, 0x7884, 0x908a, 0x1000,
-	0x1a04, 0x35a8, 0x0126, 0x2091, 0x8000, 0x8003, 0x800b, 0x810b,
-	0x9108, 0x00c6, 0x2061, 0x1a03, 0x6142, 0x00ce, 0x012e, 0x0804,
-	0x3573, 0x00c6, 0x080c, 0x74e9, 0x1160, 0x080c, 0x77ed, 0x080c,
-	0x6029, 0x9085, 0x0001, 0x080c, 0x7530, 0x080c, 0x741a, 0x080c,
-	0x0d7d, 0x2061, 0x1800, 0x6030, 0xc09d, 0x6032, 0x080c, 0x5ee4,
-	0x00ce, 0x0005, 0x00c6, 0x2001, 0x1800, 0x2004, 0x908e, 0x0000,
-	0x0904, 0x35a5, 0x7884, 0x9005, 0x0188, 0x7888, 0x2061, 0x199c,
-	0x2c0c, 0x2062, 0x080c, 0x29d8, 0x01a0, 0x080c, 0x29e0, 0x0188,
-	0x080c, 0x29e8, 0x0170, 0x2162, 0x0804, 0x35a8, 0x2061, 0x0100,
-	0x6038, 0x9086, 0x0007, 0x1118, 0x2009, 0x0001, 0x0010, 0x2009,
-	0x0000, 0x7884, 0x9086, 0x0002, 0x1588, 0x2061, 0x0100, 0x6028,
-	0xc09c, 0x602a, 0x080c, 0xa896, 0x0026, 0x2011, 0x0003, 0x080c,
-	0xa1cf, 0x2011, 0x0002, 0x080c, 0xa1d9, 0x002e, 0x080c, 0xa098,
-	0x0036, 0x901e, 0x080c, 0xa118, 0x003e, 0x080c, 0xa8b2, 0x60e3,
-	0x0000, 0x080c, 0xe702, 0x080c, 0xe71d, 0x9085, 0x0001, 0x080c,
-	0x7530, 0x9006, 0x080c, 0x2a0a, 0x2001, 0x1800, 0x2003, 0x0004,
-	0x0026, 0x2011, 0x0008, 0x080c, 0x2a44, 0x002e, 0x00ce, 0x0804,
-	0x3573, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35a5, 0x080c,
-	0x56ee, 0x0120, 0x2009, 0x0007, 0x0804, 0x35a5, 0x7984, 0x7ea8,
-	0x96b4, 0x00ff, 0x080c, 0x6625, 0x1904, 0x35a8, 0x9186, 0x007f,
-	0x0138, 0x080c, 0x6a6b, 0x0120, 0x2009, 0x0009, 0x0804, 0x35a5,
-	0x080c, 0x4aa7, 0x1120, 0x2009, 0x0002, 0x0804, 0x35a5, 0xa867,
-	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xca24, 0x1120, 0x2009,
-	0x0003, 0x0804, 0x35a5, 0x7007, 0x0003, 0x701f, 0x5620, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x35a5,
-	0xa8e0, 0xa866, 0xa834, 0x8007, 0x800c, 0xa85c, 0x9080, 0x000c,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60, 0x0804, 0x4af3, 0xa898,
-	0x9086, 0x000d, 0x1904, 0x35a5, 0x2021, 0x4005, 0x0126, 0x2091,
-	0x8000, 0x0e04, 0x5644, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486,
-	0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7883,
-	0x4005, 0xa998, 0x7986, 0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c,
-	0x4ae3, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x11d6, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x00c6, 0x2061, 0x1a03, 0x7984,
-	0x6152, 0x614e, 0x6057, 0x0000, 0x604b, 0x0009, 0x7898, 0x606a,
-	0x789c, 0x6066, 0x7888, 0x6062, 0x788c, 0x605e, 0x2001, 0x1a11,
-	0x2044, 0x2001, 0x1a18, 0xa076, 0xa060, 0xa072, 0xa07b, 0x0001,
-	0xa07f, 0x0002, 0xa06b, 0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e,
-	0x0804, 0x3573, 0x0126, 0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4,
-	0xc000, 0x0128, 0x0006, 0x080c, 0xc885, 0x000e, 0x1198, 0xd0e4,
-	0x0160, 0x9180, 0x1000, 0x2004, 0x905d, 0x0160, 0x080c, 0x6043,
-	0x080c, 0xab57, 0x0110, 0xb817, 0x0000, 0x9006, 0x00ce, 0x00be,
-	0x012e, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0126, 0x2091, 0x8000,
-	0x0156, 0x2010, 0x900e, 0x20a9, 0x0800, 0x0016, 0x9180, 0x1000,
-	0x2004, 0x9005, 0x0180, 0x9186, 0x007e, 0x0168, 0x9186, 0x007f,
-	0x0150, 0x9186, 0x0080, 0x0138, 0x9186, 0x00ff, 0x0120, 0x0026,
-	0x2200, 0x0801, 0x002e, 0x001e, 0x8108, 0x1f04, 0x56bd, 0x015e,
-	0x012e, 0x0005, 0x2001, 0x1848, 0x2004, 0x0005, 0x2001, 0x1867,
-	0x2004, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0d4, 0x000e,
-	0x0005, 0x2001, 0x180e, 0x2004, 0xd0b4, 0x0005, 0x2001, 0x1800,
-	0x2004, 0x9086, 0x0003, 0x0005, 0x0016, 0x00e6, 0x2071, 0x189e,
-	0x7108, 0x910d, 0x710a, 0x00ee, 0x001e, 0x0005, 0x79a4, 0x9182,
-	0x0081, 0x1a04, 0x35a8, 0x810c, 0x0016, 0x080c, 0x4aa7, 0x080c,
-	0x0f42, 0x2100, 0x2238, 0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e,
-	0x080c, 0x4af0, 0x701f, 0x5715, 0x0005, 0x2079, 0x0000, 0x7d94,
-	0x7c98, 0x7ba8, 0x7aac, 0x79a4, 0x810c, 0x2061, 0x18b8, 0x2c44,
-	0xa770, 0xa074, 0x2071, 0x189e, 0x080c, 0x4af3, 0x701f, 0x5729,
-	0x0005, 0x2061, 0x18b8, 0x2c44, 0x0016, 0x0026, 0xa270, 0xa174,
-	0x080c, 0x0f4a, 0x002e, 0x001e, 0x080c, 0x0ff7, 0x9006, 0xa802,
-	0xa806, 0x0804, 0x3573, 0x0126, 0x0156, 0x0136, 0x0146, 0x01c6,
-	0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069,
-	0x0200, 0x2071, 0x1800, 0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118,
-	0x080c, 0x58e4, 0x0068, 0xd08c, 0x0118, 0x080c, 0x57ed, 0x0040,
-	0xd094, 0x0118, 0x080c, 0x57bd, 0x0018, 0xd09c, 0x0108, 0x0099,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e,
-	0x015e, 0x012e, 0x0005, 0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d,
-	0x612a, 0x001e, 0x0c68, 0x0006, 0x7098, 0x9005, 0x000e, 0x0120,
-	0x709b, 0x0000, 0x7093, 0x0000, 0x624c, 0x9286, 0xf0f0, 0x1150,
-	0x6048, 0x9086, 0xf0f0, 0x0130, 0x624a, 0x6043, 0x0090, 0x6043,
-	0x0010, 0x0490, 0x9294, 0xff00, 0x9296, 0xf700, 0x0178, 0x7138,
-	0xd1a4, 0x1160, 0x6240, 0x9295, 0x0100, 0x6242, 0x9294, 0x0010,
-	0x0128, 0x2009, 0x00f7, 0x080c, 0x5fa5, 0x00f0, 0x6040, 0x9084,
-	0x0010, 0x9085, 0x0140, 0x6042, 0x6043, 0x0000, 0x7087, 0x0000,
-	0x70a3, 0x0001, 0x70c7, 0x0000, 0x70df, 0x0000, 0x2009, 0x1d80,
-	0x200b, 0x0000, 0x7097, 0x0000, 0x708b, 0x000f, 0x2009, 0x000f,
-	0x2011, 0x5e87, 0x080c, 0x8708, 0x0005, 0x2001, 0x1869, 0x2004,
-	0xd08c, 0x0110, 0x705f, 0xffff, 0x7088, 0x9005, 0x1528, 0x2011,
-	0x5e87, 0x080c, 0x863e, 0x6040, 0x9094, 0x0010, 0x9285, 0x0020,
-	0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04, 0x57d3,
-	0x6242, 0x709b, 0x0000, 0x6040, 0x9094, 0x0010, 0x9285, 0x0080,
-	0x6042, 0x6242, 0x0048, 0x6242, 0x709b, 0x0000, 0x708f, 0x0000,
-	0x9006, 0x080c, 0x602e, 0x0000, 0x0005, 0x708c, 0x908a, 0x0003,
-	0x1a0c, 0x0d7d, 0x000b, 0x0005, 0x57f7, 0x5848, 0x58e3, 0x00f6,
-	0x0016, 0x6900, 0x918c, 0x0800, 0x708f, 0x0001, 0x2001, 0x015d,
-	0x2003, 0x0000, 0x6803, 0x00fc, 0x20a9, 0x0004, 0x6800, 0x9084,
-	0x00fc, 0x0120, 0x1f04, 0x5806, 0x080c, 0x0d7d, 0x68a0, 0x68a2,
-	0x689c, 0x689e, 0x6898, 0x689a, 0xa001, 0x918d, 0x1600, 0x6902,
-	0x001e, 0x6837, 0x0020, 0x080c, 0x600a, 0x2079, 0x1d00, 0x7833,
-	0x1101, 0x7837, 0x0000, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
-	0x0001, 0x20a1, 0x1d0e, 0x20a9, 0x0004, 0x4003, 0x080c, 0xa690,
-	0x20e1, 0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1, 0x0240,
-	0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x600f, 0x0000, 0x080c,
-	0x5eb8, 0x00fe, 0x9006, 0x7092, 0x6043, 0x0008, 0x6042, 0x0005,
-	0x00f6, 0x7090, 0x7093, 0x0000, 0x9025, 0x0904, 0x58c0, 0x6020,
-	0xd0b4, 0x1904, 0x58be, 0x71a0, 0x81ff, 0x0904, 0x58ac, 0x9486,
-	0x000c, 0x1904, 0x58b9, 0x9480, 0x0018, 0x8004, 0x20a8, 0x080c,
-	0x6003, 0x2011, 0x0260, 0x2019, 0x1d00, 0x220c, 0x2304, 0x9106,
-	0x11e8, 0x8210, 0x8318, 0x1f04, 0x5865, 0x6043, 0x0004, 0x2061,
-	0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043,
-	0x0006, 0x708f, 0x0002, 0x709b, 0x0002, 0x2009, 0x07d0, 0x2011,
-	0x5e8e, 0x080c, 0x8708, 0x080c, 0x600a, 0x04c0, 0x080c, 0x6003,
-	0x2079, 0x0260, 0x7930, 0x918e, 0x1101, 0x1558, 0x7834, 0x9005,
-	0x1540, 0x7900, 0x918c, 0x00ff, 0x1118, 0x7804, 0x9005, 0x0190,
-	0x080c, 0x6003, 0x2011, 0x026e, 0x2019, 0x1805, 0x20a9, 0x0004,
-	0x220c, 0x2304, 0x9102, 0x0230, 0x11a0, 0x8210, 0x8318, 0x1f04,
-	0x58a0, 0x0078, 0x70a3, 0x0000, 0x080c, 0x6003, 0x20e1, 0x0000,
-	0x2099, 0x0260, 0x20e9, 0x0001, 0x20a1, 0x1d00, 0x20a9, 0x0014,
-	0x4003, 0x6043, 0x0008, 0x6043, 0x0000, 0x0010, 0x00fe, 0x0005,
-	0x6040, 0x9085, 0x0100, 0x6042, 0x6020, 0xd0b4, 0x1db8, 0x080c,
-	0xa690, 0x20e1, 0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x2011, 0x19f4,
-	0x2013, 0x0000, 0x7093, 0x0000, 0x60a3, 0x0056, 0x60a7, 0x9575,
-	0x080c, 0x9e25, 0x08d8, 0x0005, 0x7098, 0x908a, 0x001d, 0x1a0c,
-	0x0d7d, 0x000b, 0x0005, 0x5915, 0x5928, 0x5951, 0x5971, 0x5997,
-	0x59c6, 0x59ec, 0x5a24, 0x5a4a, 0x5a78, 0x5ab3, 0x5aeb, 0x5b09,
-	0x5b34, 0x5b56, 0x5b71, 0x5b7b, 0x5baf, 0x5bd5, 0x5c04, 0x5c2a,
-	0x5c62, 0x5ca6, 0x5ce3, 0x5d04, 0x5d5d, 0x5d7f, 0x5dad, 0x5dad,
-	0x00c6, 0x2061, 0x1800, 0x6003, 0x0007, 0x2061, 0x0100, 0x6004,
-	0x9084, 0xfff9, 0x6006, 0x00ce, 0x0005, 0x2061, 0x0140, 0x605b,
-	0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0002, 0x709b,
-	0x0001, 0x2009, 0x07d0, 0x2011, 0x5e8e, 0x080c, 0x8708, 0x0005,
-	0x00f6, 0x7090, 0x9086, 0x0014, 0x1510, 0x6042, 0x6020, 0xd0b4,
-	0x11f0, 0x080c, 0x6003, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102,
-	0x11a0, 0x7834, 0x9005, 0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70c4,
-	0x9005, 0x1110, 0x70c7, 0x0001, 0x2011, 0x5e8e, 0x080c, 0x863e,
-	0x709b, 0x0010, 0x080c, 0x5b7b, 0x0010, 0x7093, 0x0000, 0x00fe,
-	0x0005, 0x00f6, 0x709b, 0x0003, 0x6043, 0x0004, 0x2011, 0x5e8e,
-	0x080c, 0x863e, 0x080c, 0x5f87, 0x2079, 0x0240, 0x7833, 0x1102,
-	0x7837, 0x0000, 0x20a9, 0x0008, 0x9f88, 0x000e, 0x200b, 0x0000,
-	0x8108, 0x1f04, 0x5966, 0x60c3, 0x0014, 0x080c, 0x5eb8, 0x00fe,
-	0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5e8e, 0x080c,
-	0x863e, 0x9086, 0x0014, 0x11b8, 0x080c, 0x6003, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1102, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
-	0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b,
-	0x0004, 0x0029, 0x0010, 0x080c, 0x5fdf, 0x00fe, 0x0005, 0x00f6,
-	0x709b, 0x0005, 0x080c, 0x5f87, 0x2079, 0x0240, 0x7833, 0x1103,
-	0x7837, 0x0000, 0x080c, 0x6003, 0x080c, 0x5fe6, 0x1170, 0x7084,
-	0x9005, 0x1158, 0x715c, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008,
-	0x080c, 0x5e3b, 0x0168, 0x080c, 0x5fbc, 0x20a9, 0x0008, 0x20e1,
-	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003,
-	0x60c3, 0x0014, 0x080c, 0x5eb8, 0x00fe, 0x0005, 0x00f6, 0x7090,
-	0x9005, 0x0500, 0x2011, 0x5e8e, 0x080c, 0x863e, 0x9086, 0x0014,
-	0x11b8, 0x080c, 0x6003, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103,
-	0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4,
-	0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0006, 0x0029, 0x0010,
-	0x080c, 0x5fdf, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0007, 0x080c,
-	0x5f87, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c,
-	0x6003, 0x080c, 0x5fe6, 0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164,
-	0x9186, 0xffff, 0x0180, 0x9180, 0x3374, 0x200d, 0x918c, 0xff00,
-	0x810f, 0x2011, 0x0008, 0x080c, 0x5e3b, 0x0180, 0x080c, 0x4fe4,
-	0x0110, 0x080c, 0x2664, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
-	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
-	0x080c, 0x5eb8, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
-	0x2011, 0x5e8e, 0x080c, 0x863e, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x6003, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834,
+	0x0005, 0xa897, 0x4000, 0xa99a, 0x9006, 0x918d, 0x0001, 0x2008,
+	0x0005, 0x9006, 0x0005, 0xa830, 0x9086, 0x0100, 0x7024, 0x2058,
+	0x1110, 0x0804, 0x5632, 0x900e, 0x080c, 0x6913, 0x1108, 0xc185,
+	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3567, 0x080c, 0x56e9,
+	0x0120, 0x2009, 0x0007, 0x0804, 0x3599, 0x7f84, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x3599, 0x900e, 0x2130, 0x7126, 0x7132, 0xa860, 0x20e8, 0x7036,
+	0xa85c, 0x9080, 0x0005, 0x702a, 0x20a0, 0x080c, 0x6620, 0x1904,
+	0x4e1d, 0x080c, 0x6a6a, 0x0138, 0x080c, 0x6a72, 0x0120, 0x080c,
+	0x6a0a, 0x1904, 0x4e1d, 0xd794, 0x1110, 0xd784, 0x01a8, 0xb8c4,
+	0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x3400, 0xd794, 0x0160,
+	0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x20a9,
+	0x0002, 0x080c, 0x48a8, 0x0048, 0x20a9, 0x0004, 0x4003, 0x2098,
+	0x20a0, 0x3d00, 0x20e0, 0x080c, 0x48a8, 0x9186, 0x007e, 0x0170,
+	0x9186, 0x0080, 0x0158, 0x080c, 0x6a6a, 0x90c2, 0x0006, 0x1210,
+	0xc1fd, 0x0020, 0x080c, 0x6913, 0x1108, 0xc1fd, 0x4104, 0xc1fc,
+	0xd794, 0x0528, 0xb8c4, 0x20e0, 0xb8c8, 0x2060, 0x9c80, 0x0000,
+	0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003, 0x2098, 0x20a9,
+	0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400, 0x20a9, 0x0002,
+	0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x489b, 0x9c80,
+	0x0026, 0x2098, 0xb8c4, 0x20e0, 0x20a9, 0x0002, 0x4003, 0xd794,
+	0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108, 0x080c, 0xab49,
+	0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120, 0x9186, 0x0800,
+	0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794, 0x0118, 0x9686,
+	0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804, 0x4dad, 0x86ff,
+	0x1120, 0x7124, 0x810b, 0x0804, 0x3567, 0x7033, 0x0001, 0x7122,
+	0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18b8, 0x2c44, 0xa06b,
+	0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076, 0xa28e, 0xa392,
+	0xa496, 0xa59a, 0x080c, 0x112f, 0x7007, 0x0002, 0x701f, 0x4e59,
+	0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028, 0x20a0, 0x772c,
+	0x9036, 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390,
+	0xa494, 0xa598, 0x0804, 0x4dad, 0x7124, 0x810b, 0x0804, 0x3567,
+	0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98, 0x9184, 0xff00,
+	0x8007, 0x90e2, 0x0020, 0x0a04, 0x359c, 0x9502, 0x0a04, 0x359c,
+	0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x359c, 0x9502, 0x0a04,
+	0x359c, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x359c,
+	0x9502, 0x0a04, 0x359c, 0x9284, 0x00ff, 0x90e2, 0x0020, 0x0a04,
+	0x359c, 0x9502, 0x0a04, 0x359c, 0x9384, 0xff00, 0x8007, 0x90e2,
+	0x0020, 0x0a04, 0x359c, 0x9502, 0x0a04, 0x359c, 0x9384, 0x00ff,
+	0x90e2, 0x0020, 0x0a04, 0x359c, 0x9502, 0x0a04, 0x359c, 0x9484,
+	0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x359c, 0x9502, 0x0a04,
+	0x359c, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x359c, 0x9502,
+	0x0a04, 0x359c, 0x2061, 0x1988, 0x6102, 0x6206, 0x630a, 0x640e,
+	0x0804, 0x3567, 0x080c, 0x4aa9, 0x0904, 0x3599, 0x2009, 0x0016,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60,
+	0x080c, 0x4af2, 0x701f, 0x4edd, 0x0005, 0x2001, 0x0138, 0x2003,
+	0x0000, 0x00e6, 0x2071, 0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee,
+	0x20a9, 0x0016, 0x896e, 0x8d6e, 0x8d6f, 0x9d84, 0xffc0, 0x9080,
+	0x0019, 0x2098, 0x9d84, 0x003f, 0x20e0, 0x2069, 0x1877, 0x20e9,
+	0x0001, 0x2da0, 0x4003, 0x6800, 0x9005, 0x0904, 0x4f5e, 0x6804,
+	0x2008, 0x918c, 0xfff8, 0x1904, 0x4f5e, 0x680c, 0x9005, 0x0904,
+	0x4f5e, 0x9082, 0xff01, 0x1a04, 0x4f5e, 0x6810, 0x9082, 0x005c,
+	0x0a04, 0x4f5e, 0x6824, 0x2008, 0x9082, 0x0008, 0x0a04, 0x4f5e,
+	0x9182, 0x0400, 0x1a04, 0x4f5e, 0x0056, 0x2029, 0x0000, 0x080c,
+	0x8cec, 0x005e, 0x6944, 0x6820, 0x9102, 0x06c0, 0x6820, 0x9082,
+	0x0019, 0x16a0, 0x6828, 0x6944, 0x810c, 0x9102, 0x0678, 0x6840,
+	0x9082, 0x000f, 0x1658, 0x080c, 0x1053, 0x2900, 0x0904, 0x4f78,
+	0x684e, 0x00e6, 0x2071, 0x1930, 0x00b6, 0x2059, 0x0000, 0x080c,
+	0x8ba8, 0x00be, 0x00ee, 0x0558, 0x080c, 0x8902, 0x080c, 0x8948,
+	0x11e0, 0x6857, 0x0000, 0x00c6, 0x2061, 0x0100, 0x6104, 0x918d,
+	0x2000, 0x6106, 0x6b10, 0x2061, 0x1a6a, 0x630a, 0x00ce, 0x080c,
+	0x272c, 0x2001, 0x0138, 0x2102, 0x0804, 0x3567, 0x080c, 0x272c,
+	0x2001, 0x0138, 0x2102, 0x0804, 0x359c, 0x00e6, 0x2071, 0x1930,
+	0x080c, 0x8d7d, 0x080c, 0x8d8c, 0x080c, 0x8b97, 0x00ee, 0x2001,
+	0x188a, 0x204c, 0x080c, 0x106c, 0x2001, 0x188a, 0x2003, 0x0000,
+	0x080c, 0x272c, 0x2001, 0x0138, 0x2102, 0x0804, 0x3599, 0x2001,
+	0x1924, 0x200c, 0x918e, 0x0000, 0x0904, 0x4fd7, 0x080c, 0x8b92,
+	0x0904, 0x4fd7, 0x2001, 0x0101, 0x200c, 0x918c, 0xdfff, 0x2102,
+	0x2001, 0x0138, 0x2003, 0x0000, 0x00e6, 0x2071, 0x0300, 0x701c,
+	0xd0a4, 0x1de8, 0x00ee, 0x080c, 0x8b97, 0x2001, 0x0035, 0x080c,
+	0x1686, 0x00c6, 0x2061, 0x193c, 0x6004, 0x6100, 0x9106, 0x1de0,
+	0x00ce, 0x080c, 0x272c, 0x2001, 0x0138, 0x2102, 0x00e6, 0x00f6,
+	0x2071, 0x1923, 0x080c, 0x8ad3, 0x0120, 0x2f00, 0x080c, 0x8b5d,
+	0x0cc8, 0x00fe, 0x00ee, 0x0126, 0x2091, 0x8000, 0x2001, 0x188a,
+	0x200c, 0x81ff, 0x0138, 0x2148, 0x080c, 0x106c, 0x2001, 0x188a,
+	0x2003, 0x0000, 0x2001, 0x183d, 0x2003, 0x0020, 0x00e6, 0x2071,
+	0x1930, 0x080c, 0x8d7d, 0x080c, 0x8d8c, 0x00ee, 0x012e, 0x0804,
+	0x3567, 0x0006, 0x080c, 0x56d5, 0xd0cc, 0x000e, 0x0005, 0x0006,
+	0x080c, 0x56d9, 0xd0bc, 0x000e, 0x0005, 0x6174, 0x7a84, 0x6300,
+	0x82ff, 0x1118, 0x7986, 0x0804, 0x3567, 0x83ff, 0x1904, 0x359c,
+	0x2001, 0xfff0, 0x9200, 0x1a04, 0x359c, 0x2019, 0xffff, 0x6078,
+	0x9302, 0x9200, 0x0a04, 0x359c, 0x7986, 0x6276, 0x0804, 0x3567,
+	0x080c, 0x56e9, 0x1904, 0x3599, 0x7c88, 0x7d84, 0x7e98, 0x7f8c,
+	0x080c, 0x4aa9, 0x0904, 0x3599, 0x900e, 0x901e, 0x7326, 0x7332,
+	0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0003, 0x702a, 0x20a0,
+	0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6a6a, 0x0118,
+	0x080c, 0x6a72, 0x1148, 0x20a9, 0x0001, 0xb814, 0x4004, 0xb810,
+	0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120,
+	0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff, 0x1148, 0x7224, 0x900e,
+	0x2001, 0x0003, 0x080c, 0x9148, 0x2208, 0x0804, 0x3567, 0x7033,
+	0x0001, 0x7122, 0x7024, 0x9300, 0x7026, 0x2061, 0x18b8, 0x2c44,
+	0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076, 0x7034, 0xa072, 0xa48e,
+	0xa592, 0xa696, 0xa79a, 0x080c, 0x112f, 0x7007, 0x0002, 0x701f,
+	0x505a, 0x0005, 0x7030, 0x9005, 0x1178, 0x7120, 0x7028, 0x20a0,
+	0x901e, 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44, 0xa48c, 0xa590,
+	0xa694, 0xa798, 0x0804, 0x5018, 0x7224, 0x900e, 0x2001, 0x0003,
+	0x080c, 0x9148, 0x2208, 0x0804, 0x3567, 0x00f6, 0x00e6, 0x080c,
+	0x56e9, 0x2009, 0x0007, 0x1904, 0x50ed, 0x2071, 0x189e, 0x745c,
+	0x84ff, 0x2009, 0x000e, 0x1904, 0x50ed, 0xac9c, 0xad98, 0xaea4,
+	0xafa0, 0x0096, 0x080c, 0x1053, 0x2009, 0x0002, 0x0904, 0x50ed,
+	0x2900, 0x705e, 0x900e, 0x901e, 0x7356, 0x7362, 0xa860, 0x7066,
+	0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0, 0x91d8, 0x1000, 0x2b5c,
+	0x8bff, 0x0178, 0x080c, 0x6a6a, 0x0118, 0x080c, 0x6a72, 0x1148,
+	0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398,
+	0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x01e8,
+	0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c,
+	0x9148, 0x2208, 0x009e, 0xa897, 0x4000, 0xa99a, 0x715c, 0x81ff,
+	0x090c, 0x0d7d, 0x2148, 0x080c, 0x106c, 0x9006, 0x705e, 0x918d,
+	0x0001, 0x2008, 0x0418, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300,
+	0x7056, 0x2061, 0x18b9, 0x2c44, 0xa37a, 0x7058, 0xa076, 0x7064,
+	0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0xa09f, 0x50f9, 0x000e,
+	0xa0a2, 0x080c, 0x112f, 0x9006, 0x0048, 0x009e, 0xa897, 0x4005,
+	0xa99a, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ee, 0x00fe,
+	0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c, 0x0d7d, 0x00e6, 0x2071,
+	0x189e, 0xa06c, 0x908e, 0x0100, 0x0138, 0xa87b, 0x0030, 0xa883,
+	0x0000, 0xa897, 0x4002, 0x00d8, 0x7060, 0x9005, 0x1158, 0x7150,
+	0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8, 0xa48c, 0xa590, 0xa694,
+	0xa798, 0x0428, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
+	0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x9148, 0xaa9a, 0x715c,
+	0x81ff, 0x090c, 0x0d7d, 0x2148, 0x080c, 0x106c, 0x705f, 0x0000,
+	0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d7b, 0x012e,
+	0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x91d8,
+	0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6a6a, 0x0118, 0x080c,
+	0x6a72, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004,
+	0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386,
+	0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0, 0x7154, 0x810c, 0xa99a,
+	0xa897, 0x4000, 0x715c, 0x81ff, 0x090c, 0x0d7d, 0x2148, 0x080c,
+	0x106c, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0xa0a0, 0x2048,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6d7b, 0x012e, 0xa09f, 0x0000,
+	0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300,
+	0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x112f,
+	0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c, 0x90be, 0x7000, 0x0148,
+	0x90be, 0x7100, 0x0130, 0x90be, 0x7200, 0x0118, 0x009e, 0x0804,
+	0x359c, 0xa884, 0xa988, 0x080c, 0x2614, 0x1518, 0x080c, 0x65bf,
+	0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c, 0x080c, 0x4aa9, 0x01c8,
+	0x080c, 0x4aa9, 0x01b0, 0x009e, 0xa867, 0x0000, 0xa868, 0xc0fd,
+	0xa86a, 0xa823, 0x0000, 0xa804, 0x2048, 0x080c, 0xc9e2, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x3599, 0x7007, 0x0003, 0x701f, 0x51c6,
+	0x0005, 0x009e, 0x2009, 0x0002, 0x0804, 0x3599, 0x7124, 0x080c,
+	0x32f8, 0xa820, 0x9086, 0x8001, 0x1120, 0x2009, 0x0004, 0x0804,
+	0x3599, 0x2900, 0x7022, 0xa804, 0x0096, 0x2048, 0x8906, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x009e, 0x9080, 0x0002,
+	0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a,
+	0x080c, 0x0fb7, 0xaa6c, 0xab70, 0xac74, 0xad78, 0x2061, 0x18b8,
+	0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c, 0x97c6, 0x7000, 0x0118,
+	0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004, 0x0600, 0x2009, 0x0004,
+	0x000e, 0x007e, 0x0804, 0x4af5, 0x97c6, 0x7200, 0x11b8, 0x96c2,
+	0x0054, 0x02a0, 0x000e, 0x007e, 0x2061, 0x18b8, 0x2c44, 0xa076,
+	0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
+	0x112f, 0x7007, 0x0002, 0x701f, 0x5222, 0x0005, 0x000e, 0x007e,
+	0x0804, 0x359c, 0x7020, 0x2048, 0xa804, 0x2048, 0xa804, 0x2048,
+	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c,
+	0x0fb7, 0x2100, 0x2238, 0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390,
+	0xa494, 0xa598, 0x2009, 0x002a, 0x0804, 0x4af5, 0x81ff, 0x1904,
+	0x3599, 0x798c, 0x2001, 0x197d, 0x918c, 0x8000, 0x2102, 0x080c,
+	0x4ac0, 0x0904, 0x359c, 0x080c, 0x6a6a, 0x0120, 0x080c, 0x6a72,
+	0x1904, 0x359c, 0x080c, 0x66e7, 0x0904, 0x3599, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6880, 0x012e, 0x0904, 0x3599, 0x2001, 0x197d,
+	0x2004, 0xd0fc, 0x1904, 0x3567, 0x0804, 0x4547, 0xa9a0, 0x2001,
+	0x197d, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4acd, 0x01a0,
+	0x080c, 0x6a6a, 0x0118, 0x080c, 0x6a72, 0x1170, 0x080c, 0x66e7,
+	0x2009, 0x0002, 0x0128, 0x080c, 0x6880, 0x1170, 0x2009, 0x0003,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197d,
+	0x2004, 0xd0fc, 0x1128, 0x080c, 0x56dd, 0x0110, 0x9006, 0x0018,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x78a8, 0xd08c,
+	0x1118, 0xd084, 0x0904, 0x44bc, 0x080c, 0x4adc, 0x0904, 0x359c,
+	0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002, 0x0804, 0x3599, 0x080c,
+	0x6a6a, 0x0130, 0x908e, 0x0004, 0x0118, 0x908e, 0x0005, 0x15a0,
+	0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c, 0xb802, 0x0028, 0x080c,
+	0x56d5, 0xd0b4, 0x0904, 0x44f6, 0x7884, 0x908e, 0x007e, 0x0904,
+	0x44f6, 0x908e, 0x007f, 0x0904, 0x44f6, 0x908e, 0x0080, 0x0904,
+	0x44f6, 0xb800, 0xd08c, 0x1904, 0x44f6, 0xa867, 0x0000, 0xa868,
+	0xc0fd, 0xa86a, 0x080c, 0xca01, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x3599, 0x7007, 0x0003, 0x701f, 0x52ee, 0x0005, 0x080c, 0x4adc,
+	0x0904, 0x359c, 0x0804, 0x44f6, 0x080c, 0x3357, 0x0108, 0x0005,
+	0x2009, 0x1834, 0x210c, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
+	0x3599, 0x080c, 0x56e9, 0x0120, 0x2009, 0x0007, 0x0804, 0x3599,
+	0x080c, 0x6a62, 0x0120, 0x2009, 0x0008, 0x0804, 0x3599, 0xb89c,
+	0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x44f6, 0x9006, 0xa866, 0xa832,
+	0xa868, 0xc0fd, 0xa86a, 0x080c, 0xca69, 0x1120, 0x2009, 0x0003,
+	0x0804, 0x3599, 0x7007, 0x0003, 0x701f, 0x5327, 0x0005, 0xa830,
+	0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x5632, 0x080c,
+	0x4adc, 0x0904, 0x359c, 0x0804, 0x52c0, 0x81ff, 0x2009, 0x0001,
+	0x1904, 0x3599, 0x080c, 0x56e9, 0x2009, 0x0007, 0x1904, 0x3599,
+	0x080c, 0x6a62, 0x0120, 0x2009, 0x0008, 0x0804, 0x3599, 0x080c,
+	0x4adc, 0x0904, 0x359c, 0x080c, 0x6a6a, 0x2009, 0x0009, 0x1904,
+	0x3599, 0x080c, 0x4aa9, 0x2009, 0x0002, 0x0904, 0x3599, 0x9006,
+	0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x7988, 0x9194, 0xff00,
+	0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128, 0xc0ed, 0xa952, 0x798c,
+	0xa956, 0x0038, 0x928e, 0x0100, 0x1904, 0x359c, 0xc0e5, 0xa952,
+	0xa956, 0xa83e, 0x080c, 0xcccc, 0x2009, 0x0003, 0x0904, 0x3599,
+	0x7007, 0x0003, 0x701f, 0x537d, 0x0005, 0xa830, 0x9086, 0x0100,
+	0x2009, 0x0004, 0x0904, 0x3599, 0x0804, 0x3567, 0x7aa8, 0x9284,
+	0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c, 0x56e9, 0x1188, 0x2009,
+	0x0014, 0x0804, 0x3599, 0xd2dc, 0x1568, 0x81ff, 0x2009, 0x0001,
+	0x1904, 0x3599, 0x080c, 0x56e9, 0x2009, 0x0007, 0x1904, 0x3599,
+	0xd2f4, 0x0130, 0x9284, 0x5000, 0x080c, 0x56b0, 0x0804, 0x3567,
+	0xd2fc, 0x0158, 0x080c, 0x4adc, 0x0904, 0x359c, 0x7984, 0x9284,
+	0x9000, 0x080c, 0x568d, 0x0804, 0x3567, 0x080c, 0x4adc, 0x0904,
+	0x359c, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x2009, 0x0009,
+	0x1904, 0x5466, 0x080c, 0x4aa9, 0x2009, 0x0002, 0x0904, 0x5466,
+	0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009, 0x0008, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0x080c, 0x4af2, 0x701f, 0x53d7, 0x0005, 0xa86c,
+	0x9086, 0x0500, 0x1138, 0xa870, 0x9005, 0x1120, 0xa874, 0x9084,
+	0xff00, 0x0110, 0x1904, 0x359c, 0xa866, 0xa832, 0xa868, 0xc0fd,
+	0xa86a, 0x080c, 0x4adc, 0x1110, 0x0804, 0x359c, 0x2009, 0x0043,
+	0x080c, 0xcd34, 0x2009, 0x0003, 0x0904, 0x5466, 0x7007, 0x0003,
+	0x701f, 0x53fb, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004,
+	0x0904, 0x5466, 0x7984, 0x7aa8, 0x9284, 0x1000, 0x080c, 0x568d,
+	0x0804, 0x3567, 0x00c6, 0xaab0, 0x9284, 0xc000, 0x0140, 0xd2ec,
+	0x0168, 0x080c, 0x56e9, 0x1150, 0x2009, 0x0014, 0x04f0, 0x2061,
+	0x1800, 0x080c, 0x56e9, 0x2009, 0x0007, 0x15b8, 0xd2f4, 0x0128,
+	0x9284, 0x5000, 0x080c, 0x56b0, 0x0050, 0xd2fc, 0x0178, 0x080c,
+	0x4ada, 0x0588, 0xa998, 0x9284, 0x9000, 0x080c, 0x568d, 0xa87b,
+	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0438, 0x080c, 0x4ada,
+	0x0510, 0x080c, 0x6a6a, 0x2009, 0x0009, 0x11b8, 0xa8c4, 0x9086,
+	0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0, 0xa8cc, 0x9084, 0xff00,
+	0x1190, 0x080c, 0x4ada, 0x1108, 0x0070, 0x2009, 0x004b, 0x080c,
+	0xcd34, 0x2009, 0x0003, 0x0108, 0x0078, 0x0429, 0x19c0, 0xa897,
+	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0030, 0x00ce, 0x0005, 0x9006, 0x0ce0, 0x7aa8, 0xd2dc,
+	0x0904, 0x3599, 0x0016, 0x7984, 0x9284, 0x1000, 0xc0fd, 0x080c,
+	0x568d, 0x001e, 0x1904, 0x3599, 0x0804, 0x3567, 0x00f6, 0x2d78,
+	0x0011, 0x00fe, 0x0005, 0xaab0, 0xd2dc, 0x0150, 0x0016, 0xa998,
+	0x9284, 0x1000, 0xc0fd, 0x080c, 0x568d, 0x001e, 0x9085, 0x0001,
+	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3599, 0x080c,
+	0x56e9, 0x0120, 0x2009, 0x0007, 0x0804, 0x3599, 0x7984, 0x7ea8,
+	0x96b4, 0x00ff, 0x080c, 0x6620, 0x1904, 0x359c, 0x9186, 0x007f,
+	0x0138, 0x080c, 0x6a6a, 0x0120, 0x2009, 0x0009, 0x0804, 0x3599,
+	0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002, 0x0804, 0x3599, 0xa867,
+	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001, 0x0100, 0x8007, 0xa80a,
+	0x080c, 0xca1b, 0x1120, 0x2009, 0x0003, 0x0804, 0x3599, 0x7007,
+	0x0003, 0x701f, 0x54c4, 0x0005, 0xa808, 0x8007, 0x9086, 0x0100,
+	0x1120, 0x2009, 0x0004, 0x0804, 0x3599, 0xa8e0, 0xa866, 0xa810,
+	0x8007, 0x9084, 0x00ff, 0x800c, 0xa814, 0x8007, 0x9084, 0x00ff,
+	0x8004, 0x9080, 0x0002, 0x9108, 0x8906, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x0004, 0x7a8c, 0x7b88, 0x7c9c,
+	0x7d98, 0x0804, 0x4af5, 0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x3599, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217,
+	0x82ff, 0x1118, 0x7023, 0x19b2, 0x0040, 0x92c6, 0x0001, 0x1118,
+	0x7023, 0x19cc, 0x0010, 0x0804, 0x359c, 0x2009, 0x001a, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c,
+	0x4af2, 0x701f, 0x5514, 0x0005, 0x2001, 0x182e, 0x2003, 0x0001,
+	0xa85c, 0x9080, 0x0019, 0x2098, 0xa860, 0x20e0, 0x20a9, 0x001a,
+	0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003, 0x0804, 0x3567, 0x080c,
+	0x4aa9, 0x1120, 0x2009, 0x0002, 0x0804, 0x3599, 0x7984, 0x9194,
+	0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x2099, 0x19b2,
+	0x0040, 0x92c6, 0x0001, 0x1118, 0x2099, 0x19cc, 0x0010, 0x0804,
+	0x359c, 0xa85c, 0x9080, 0x0019, 0x20a0, 0xa860, 0x20e8, 0x20a9,
+	0x001a, 0x20e1, 0x0001, 0x4003, 0x2009, 0x001a, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x0804, 0x4af5,
+	0x7884, 0x908a, 0x1000, 0x1a04, 0x359c, 0x0126, 0x2091, 0x8000,
+	0x8003, 0x800b, 0x810b, 0x9108, 0x00c6, 0x2061, 0x1a02, 0x6142,
+	0x00ce, 0x012e, 0x0804, 0x3567, 0x00c6, 0x080c, 0x74c8, 0x1160,
+	0x080c, 0x77cc, 0x080c, 0x6024, 0x9085, 0x0001, 0x080c, 0x750f,
+	0x080c, 0x73f9, 0x080c, 0x0d7d, 0x2061, 0x1800, 0x6030, 0xc09d,
+	0x6032, 0x080c, 0x5edf, 0x00ce, 0x0005, 0x00c6, 0x2001, 0x1800,
+	0x2004, 0x908e, 0x0000, 0x0904, 0x3599, 0x7884, 0x9005, 0x0188,
+	0x7888, 0x2061, 0x199b, 0x2c0c, 0x2062, 0x080c, 0x29f7, 0x01a0,
+	0x080c, 0x29ff, 0x0188, 0x080c, 0x2a07, 0x0170, 0x2162, 0x0804,
+	0x359c, 0x2061, 0x0100, 0x6038, 0x9086, 0x0007, 0x1118, 0x2009,
+	0x0001, 0x0010, 0x2009, 0x0000, 0x7884, 0x9086, 0x0002, 0x1588,
+	0x2061, 0x0100, 0x6028, 0xc09c, 0x602a, 0x080c, 0xa888, 0x0026,
+	0x2011, 0x0003, 0x080c, 0xa1b1, 0x2011, 0x0002, 0x080c, 0xa1bb,
+	0x002e, 0x080c, 0xa07a, 0x0036, 0x901e, 0x080c, 0xa0fa, 0x003e,
+	0x080c, 0xa8a4, 0x60e3, 0x0000, 0x080c, 0xe712, 0x080c, 0xe72d,
+	0x9085, 0x0001, 0x080c, 0x750f, 0x9006, 0x080c, 0x2a29, 0x2001,
+	0x1800, 0x2003, 0x0004, 0x0026, 0x2011, 0x0008, 0x080c, 0x2a63,
+	0x002e, 0x00ce, 0x0804, 0x3567, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x3599, 0x080c, 0x56e9, 0x0120, 0x2009, 0x0007, 0x0804,
+	0x3599, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x6620, 0x1904,
+	0x359c, 0x9186, 0x007f, 0x0138, 0x080c, 0x6a6a, 0x0120, 0x2009,
+	0x0009, 0x0804, 0x3599, 0x080c, 0x4aa9, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x3599, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c,
+	0xca1e, 0x1120, 0x2009, 0x0003, 0x0804, 0x3599, 0x7007, 0x0003,
+	0x701f, 0x561b, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009,
+	0x0004, 0x0804, 0x3599, 0xa8e0, 0xa866, 0xa834, 0x8007, 0x800c,
+	0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60,
+	0x0804, 0x4af5, 0xa898, 0x9086, 0x000d, 0x1904, 0x3599, 0x2021,
+	0x4005, 0x0126, 0x2091, 0x8000, 0x0e04, 0x563f, 0x0010, 0x012e,
+	0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010,
+	0x7833, 0x0010, 0x7883, 0x4005, 0xa998, 0x7986, 0xa9a4, 0x799a,
+	0xa9a8, 0x799e, 0x080c, 0x4ae5, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x11e1, 0x7007, 0x0001, 0x2091, 0x5000,
+	0x700f, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00c6,
+	0x2061, 0x1a02, 0x7984, 0x6152, 0x614e, 0x6057, 0x0000, 0x604b,
+	0x0009, 0x7898, 0x606a, 0x789c, 0x6066, 0x7888, 0x6062, 0x788c,
+	0x605e, 0x2001, 0x1a10, 0x2044, 0x2001, 0x1a17, 0xa076, 0xa060,
+	0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002, 0xa06b, 0x0000, 0xa09f,
+	0x0000, 0x00ce, 0x012e, 0x0804, 0x3567, 0x0126, 0x2091, 0x8000,
+	0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0128, 0x0006, 0x080c, 0xc87f,
+	0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180, 0x1000, 0x2004, 0x905d,
+	0x0160, 0x080c, 0x603e, 0x080c, 0xab49, 0x0110, 0xb817, 0x0000,
+	0x9006, 0x00ce, 0x00be, 0x012e, 0x0005, 0x9085, 0x0001, 0x0cc8,
+	0x0126, 0x2091, 0x8000, 0x0156, 0x2010, 0x900e, 0x20a9, 0x0800,
+	0x0016, 0x9180, 0x1000, 0x2004, 0x9005, 0x0180, 0x9186, 0x007e,
+	0x0168, 0x9186, 0x007f, 0x0150, 0x9186, 0x0080, 0x0138, 0x9186,
+	0x00ff, 0x0120, 0x0026, 0x2200, 0x0801, 0x002e, 0x001e, 0x8108,
+	0x1f04, 0x56b8, 0x015e, 0x012e, 0x0005, 0x2001, 0x1848, 0x2004,
+	0x0005, 0x2001, 0x1867, 0x2004, 0x0005, 0x0006, 0x2001, 0x1810,
+	0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0b4,
+	0x0005, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x0005, 0x0016,
+	0x00e6, 0x2071, 0x189e, 0x7108, 0x910d, 0x710a, 0x00ee, 0x001e,
+	0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04, 0x359c, 0x810c, 0x0016,
+	0x080c, 0x4aa9, 0x080c, 0x0f42, 0x2100, 0x2238, 0x7d84, 0x7c88,
+	0x7b8c, 0x7a90, 0x001e, 0x080c, 0x4af2, 0x701f, 0x5710, 0x0005,
+	0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8, 0x7aac, 0x79a4, 0x810c,
+	0x2061, 0x18b8, 0x2c44, 0xa770, 0xa074, 0x2071, 0x189e, 0x080c,
+	0x4af5, 0x701f, 0x5724, 0x0005, 0x2061, 0x18b8, 0x2c44, 0x0016,
+	0x0026, 0xa270, 0xa174, 0x080c, 0x0f4a, 0x002e, 0x001e, 0x080c,
+	0x0ff7, 0x9006, 0xa802, 0xa806, 0x0804, 0x3567, 0x0126, 0x0156,
+	0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
+	0x2061, 0x0100, 0x2069, 0x0200, 0x2071, 0x1800, 0x6044, 0xd0a4,
+	0x11e8, 0xd084, 0x0118, 0x080c, 0x58df, 0x0068, 0xd08c, 0x0118,
+	0x080c, 0x57e8, 0x0040, 0xd094, 0x0118, 0x080c, 0x57b8, 0x0018,
+	0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de,
+	0x01ce, 0x014e, 0x013e, 0x015e, 0x012e, 0x0005, 0x0016, 0x6128,
+	0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0c68, 0x0006, 0x7098,
+	0x9005, 0x000e, 0x0120, 0x709b, 0x0000, 0x7093, 0x0000, 0x624c,
+	0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086, 0xf0f0, 0x0130, 0x624a,
+	0x6043, 0x0090, 0x6043, 0x0010, 0x0490, 0x9294, 0xff00, 0x9296,
+	0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160, 0x6240, 0x9295, 0x0100,
+	0x6242, 0x9294, 0x0010, 0x0128, 0x2009, 0x00f7, 0x080c, 0x5fa0,
+	0x00f0, 0x6040, 0x9084, 0x0010, 0x9085, 0x0140, 0x6042, 0x6043,
+	0x0000, 0x7087, 0x0000, 0x70a3, 0x0001, 0x70c7, 0x0000, 0x70df,
+	0x0000, 0x2009, 0x1d80, 0x200b, 0x0000, 0x7097, 0x0000, 0x708b,
+	0x000f, 0x2009, 0x000f, 0x2011, 0x5e82, 0x080c, 0x86e7, 0x0005,
+	0x2001, 0x1869, 0x2004, 0xd08c, 0x0110, 0x705f, 0xffff, 0x7088,
+	0x9005, 0x1528, 0x2011, 0x5e82, 0x080c, 0x861d, 0x6040, 0x9094,
+	0x0010, 0x9285, 0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c,
+	0x1168, 0x1f04, 0x57ce, 0x6242, 0x709b, 0x0000, 0x6040, 0x9094,
+	0x0010, 0x9285, 0x0080, 0x6042, 0x6242, 0x0048, 0x6242, 0x709b,
+	0x0000, 0x708f, 0x0000, 0x9006, 0x080c, 0x6029, 0x0000, 0x0005,
+	0x708c, 0x908a, 0x0003, 0x1a0c, 0x0d7d, 0x000b, 0x0005, 0x57f2,
+	0x5843, 0x58de, 0x00f6, 0x0016, 0x6900, 0x918c, 0x0800, 0x708f,
+	0x0001, 0x2001, 0x015d, 0x2003, 0x0000, 0x6803, 0x00fc, 0x20a9,
+	0x0004, 0x6800, 0x9084, 0x00fc, 0x0120, 0x1f04, 0x5801, 0x080c,
+	0x0d7d, 0x68a0, 0x68a2, 0x689c, 0x689e, 0x6898, 0x689a, 0xa001,
+	0x918d, 0x1600, 0x6902, 0x001e, 0x6837, 0x0020, 0x080c, 0x6005,
+	0x2079, 0x1d00, 0x7833, 0x1101, 0x7837, 0x0000, 0x20e1, 0x0001,
+	0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1, 0x1d0e, 0x20a9, 0x0004,
+	0x4003, 0x080c, 0xa67d, 0x20e1, 0x0001, 0x2099, 0x1d00, 0x20e9,
+	0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c,
+	0x600f, 0x0000, 0x080c, 0x5eb3, 0x00fe, 0x9006, 0x7092, 0x6043,
+	0x0008, 0x6042, 0x0005, 0x00f6, 0x7090, 0x7093, 0x0000, 0x9025,
+	0x0904, 0x58bb, 0x6020, 0xd0b4, 0x1904, 0x58b9, 0x71a0, 0x81ff,
+	0x0904, 0x58a7, 0x9486, 0x000c, 0x1904, 0x58b4, 0x9480, 0x0018,
+	0x8004, 0x20a8, 0x080c, 0x5ffe, 0x2011, 0x0260, 0x2019, 0x1d00,
+	0x220c, 0x2304, 0x9106, 0x11e8, 0x8210, 0x8318, 0x1f04, 0x5860,
+	0x6043, 0x0004, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0,
+	0x2061, 0x0100, 0x6043, 0x0006, 0x708f, 0x0002, 0x709b, 0x0002,
+	0x2009, 0x07d0, 0x2011, 0x5e89, 0x080c, 0x86e7, 0x080c, 0x6005,
+	0x04c0, 0x080c, 0x5ffe, 0x2079, 0x0260, 0x7930, 0x918e, 0x1101,
+	0x1558, 0x7834, 0x9005, 0x1540, 0x7900, 0x918c, 0x00ff, 0x1118,
+	0x7804, 0x9005, 0x0190, 0x080c, 0x5ffe, 0x2011, 0x026e, 0x2019,
+	0x1805, 0x20a9, 0x0004, 0x220c, 0x2304, 0x9102, 0x0230, 0x11a0,
+	0x8210, 0x8318, 0x1f04, 0x589b, 0x0078, 0x70a3, 0x0000, 0x080c,
+	0x5ffe, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0001, 0x20a1,
+	0x1d00, 0x20a9, 0x0014, 0x4003, 0x6043, 0x0008, 0x6043, 0x0000,
+	0x0010, 0x00fe, 0x0005, 0x6040, 0x9085, 0x0100, 0x6042, 0x6020,
+	0xd0b4, 0x1db8, 0x080c, 0xa67d, 0x20e1, 0x0001, 0x2099, 0x1d00,
+	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3,
+	0x000c, 0x2011, 0x19f3, 0x2013, 0x0000, 0x7093, 0x0000, 0x60a3,
+	0x0056, 0x60a7, 0x9575, 0x080c, 0x9e09, 0x08d8, 0x0005, 0x7098,
+	0x908a, 0x001d, 0x1a0c, 0x0d7d, 0x000b, 0x0005, 0x5910, 0x5923,
+	0x594c, 0x596c, 0x5992, 0x59c1, 0x59e7, 0x5a1f, 0x5a45, 0x5a73,
+	0x5aae, 0x5ae6, 0x5b04, 0x5b2f, 0x5b51, 0x5b6c, 0x5b76, 0x5baa,
+	0x5bd0, 0x5bff, 0x5c25, 0x5c5d, 0x5ca1, 0x5cde, 0x5cff, 0x5d58,
+	0x5d7a, 0x5da8, 0x5da8, 0x00c6, 0x2061, 0x1800, 0x6003, 0x0007,
+	0x2061, 0x0100, 0x6004, 0x9084, 0xfff9, 0x6006, 0x00ce, 0x0005,
+	0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100,
+	0x6043, 0x0002, 0x709b, 0x0001, 0x2009, 0x07d0, 0x2011, 0x5e89,
+	0x080c, 0x86e7, 0x0005, 0x00f6, 0x7090, 0x9086, 0x0014, 0x1510,
+	0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c, 0x5ffe, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834, 0x9005, 0x1188, 0x7a38,
+	0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x2011,
+	0x5e89, 0x080c, 0x861d, 0x709b, 0x0010, 0x080c, 0x5b76, 0x0010,
+	0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0003, 0x6043,
+	0x0004, 0x2011, 0x5e89, 0x080c, 0x861d, 0x080c, 0x5f82, 0x2079,
+	0x0240, 0x7833, 0x1102, 0x7837, 0x0000, 0x20a9, 0x0008, 0x9f88,
+	0x000e, 0x200b, 0x0000, 0x8108, 0x1f04, 0x5961, 0x60c3, 0x0014,
+	0x080c, 0x5eb3, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
+	0x2011, 0x5e89, 0x080c, 0x861d, 0x9086, 0x0014, 0x11b8, 0x080c,
+	0x5ffe, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x1178, 0x7834,
 	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110,
-	0x70c7, 0x0001, 0x709b, 0x0008, 0x0029, 0x0010, 0x080c, 0x5fdf,
-	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0009, 0x080c, 0x5f87, 0x2079,
-	0x0240, 0x7833, 0x1105, 0x7837, 0x0100, 0x080c, 0x5fe6, 0x1150,
-	0x7084, 0x9005, 0x1138, 0x080c, 0x5dae, 0x1188, 0x9085, 0x0001,
-	0x080c, 0x2664, 0x20a9, 0x0008, 0x080c, 0x6003, 0x20e1, 0x0000,
-	0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3,
-	0x0014, 0x080c, 0x5eb8, 0x0010, 0x080c, 0x5908, 0x00fe, 0x0005,
-	0x00f6, 0x7090, 0x9005, 0x05a8, 0x2011, 0x5e8e, 0x080c, 0x863e,
-	0x9086, 0x0014, 0x1560, 0x080c, 0x6003, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1105, 0x1520, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100,
-	0x921e, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110,
-	0x70c7, 0x0001, 0x709b, 0x000a, 0x00b1, 0x0098, 0x9005, 0x1178,
+	0x70c7, 0x0001, 0x709b, 0x0004, 0x0029, 0x0010, 0x080c, 0x5fda,
+	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0005, 0x080c, 0x5f82, 0x2079,
+	0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5ffe, 0x080c,
+	0x5fe1, 0x1170, 0x7084, 0x9005, 0x1158, 0x715c, 0x9186, 0xffff,
+	0x0138, 0x2011, 0x0008, 0x080c, 0x5e36, 0x0168, 0x080c, 0x5fb7,
+	0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
+	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb3, 0x00fe,
+	0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5e89, 0x080c,
+	0x861d, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5ffe, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
+	0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b,
+	0x0006, 0x0029, 0x0010, 0x080c, 0x5fda, 0x00fe, 0x0005, 0x00f6,
+	0x709b, 0x0007, 0x080c, 0x5f82, 0x2079, 0x0240, 0x7833, 0x1104,
+	0x7837, 0x0000, 0x080c, 0x5ffe, 0x080c, 0x5fe1, 0x11b8, 0x7084,
+	0x9005, 0x11a0, 0x7164, 0x9186, 0xffff, 0x0180, 0x9180, 0x3368,
+	0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5e36,
+	0x0180, 0x080c, 0x4fdf, 0x0110, 0x080c, 0x267d, 0x20a9, 0x0008,
+	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
+	0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb3, 0x00fe, 0x0005, 0x00f6,
+	0x7090, 0x9005, 0x0500, 0x2011, 0x5e89, 0x080c, 0x861d, 0x9086,
+	0x0014, 0x11b8, 0x080c, 0x5ffe, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
+	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0008, 0x0029,
+	0x0010, 0x080c, 0x5fda, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0009,
+	0x080c, 0x5f82, 0x2079, 0x0240, 0x7833, 0x1105, 0x7837, 0x0100,
+	0x080c, 0x5fe1, 0x1150, 0x7084, 0x9005, 0x1138, 0x080c, 0x5da9,
+	0x1188, 0x9085, 0x0001, 0x080c, 0x267d, 0x20a9, 0x0008, 0x080c,
+	0x5ffe, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1,
+	0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb3, 0x0010, 0x080c,
+	0x5903, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x05a8, 0x2011,
+	0x5e89, 0x080c, 0x861d, 0x9086, 0x0014, 0x1560, 0x080c, 0x5ffe,
+	0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1520, 0x7834, 0x9084,
+	0x0100, 0x2011, 0x0100, 0x921e, 0x1160, 0x7a38, 0xd2fc, 0x0128,
+	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x000a, 0x00b1,
+	0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
+	0x1110, 0x70c7, 0x0001, 0x7097, 0x0000, 0x709b, 0x000e, 0x080c,
+	0x5b51, 0x0010, 0x080c, 0x5fda, 0x00fe, 0x0005, 0x00f6, 0x709b,
+	0x000b, 0x2011, 0x1d0e, 0x20e9, 0x0001, 0x22a0, 0x20a9, 0x0040,
+	0x2019, 0xffff, 0x4304, 0x080c, 0x5f82, 0x2079, 0x0240, 0x7833,
+	0x1106, 0x7837, 0x0000, 0x080c, 0x5fe1, 0x0118, 0x2013, 0x0000,
+	0x0020, 0x7060, 0x9085, 0x0100, 0x2012, 0x20a9, 0x0040, 0x2009,
+	0x024e, 0x2011, 0x1d0e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260,
+	0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5ad3,
+	0x60c3, 0x0084, 0x080c, 0x5eb3, 0x00fe, 0x0005, 0x00f6, 0x7090,
+	0x9005, 0x01c0, 0x2011, 0x5e89, 0x080c, 0x861d, 0x9086, 0x0084,
+	0x1178, 0x080c, 0x5ffe, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106,
+	0x1138, 0x7834, 0x9005, 0x1120, 0x709b, 0x000c, 0x0029, 0x0010,
+	0x080c, 0x5fda, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x000d, 0x080c,
+	0x5f82, 0x2079, 0x0240, 0x7833, 0x1107, 0x7837, 0x0000, 0x080c,
+	0x5ffe, 0x20a9, 0x0040, 0x2011, 0x026e, 0x2009, 0x024e, 0x220e,
+	0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812,
+	0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04,
+	0x5b17, 0x60c3, 0x0084, 0x080c, 0x5eb3, 0x00fe, 0x0005, 0x00f6,
+	0x7090, 0x9005, 0x01e0, 0x2011, 0x5e89, 0x080c, 0x861d, 0x9086,
+	0x0084, 0x1198, 0x080c, 0x5ffe, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7097, 0x0001, 0x080c,
+	0x5f54, 0x709b, 0x000e, 0x0029, 0x0010, 0x080c, 0x5fda, 0x00fe,
+	0x0005, 0x918d, 0x0001, 0x080c, 0x6029, 0x709b, 0x000f, 0x7093,
+	0x0000, 0x2061, 0x0140, 0x605b, 0xbc85, 0x605f, 0xb5b5, 0x2061,
+	0x0100, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009, 0x07d0, 0x2011,
+	0x5e89, 0x080c, 0x8611, 0x0005, 0x7090, 0x9005, 0x0130, 0x2011,
+	0x5e89, 0x080c, 0x861d, 0x709b, 0x0000, 0x0005, 0x709b, 0x0011,
+	0x080c, 0xa67d, 0x080c, 0x5ffe, 0x20e1, 0x0000, 0x2099, 0x0260,
+	0x20e9, 0x0000, 0x20a1, 0x0240, 0x7490, 0x9480, 0x0018, 0x9080,
+	0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x4003, 0x080c, 0x5fe1,
+	0x11a0, 0x717c, 0x81ff, 0x0188, 0x900e, 0x7080, 0x9084, 0x00ff,
+	0x0160, 0x080c, 0x2614, 0x9186, 0x007e, 0x0138, 0x9186, 0x0080,
+	0x0120, 0x2011, 0x0008, 0x080c, 0x5e36, 0x60c3, 0x0014, 0x080c,
+	0x5eb3, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5e89,
+	0x080c, 0x861d, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5ffe, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160,
 	0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001,
-	0x7097, 0x0000, 0x709b, 0x000e, 0x080c, 0x5b56, 0x0010, 0x080c,
-	0x5fdf, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x000b, 0x2011, 0x1d0e,
-	0x20e9, 0x0001, 0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, 0x4304,
-	0x080c, 0x5f87, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000,
-	0x080c, 0x5fe6, 0x0118, 0x2013, 0x0000, 0x0020, 0x7060, 0x9085,
-	0x0100, 0x2012, 0x20a9, 0x0040, 0x2009, 0x024e, 0x2011, 0x1d0e,
-	0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000,
-	0x6812, 0x2009, 0x0240, 0x1f04, 0x5ad8, 0x60c3, 0x0084, 0x080c,
-	0x5eb8, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01c0, 0x2011,
-	0x5e8e, 0x080c, 0x863e, 0x9086, 0x0084, 0x1178, 0x080c, 0x6003,
-	0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1138, 0x7834, 0x9005,
-	0x1120, 0x709b, 0x000c, 0x0029, 0x0010, 0x080c, 0x5fdf, 0x00fe,
-	0x0005, 0x00f6, 0x709b, 0x000d, 0x080c, 0x5f87, 0x2079, 0x0240,
-	0x7833, 0x1107, 0x7837, 0x0000, 0x080c, 0x6003, 0x20a9, 0x0040,
-	0x2011, 0x026e, 0x2009, 0x024e, 0x220e, 0x8210, 0x8108, 0x9186,
-	0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814,
-	0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5b1c, 0x60c3, 0x0084,
-	0x080c, 0x5eb8, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01e0,
-	0x2011, 0x5e8e, 0x080c, 0x863e, 0x9086, 0x0084, 0x1198, 0x080c,
-	0x6003, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834,
-	0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x5f59, 0x709b, 0x000e,
-	0x0029, 0x0010, 0x080c, 0x5fdf, 0x00fe, 0x0005, 0x918d, 0x0001,
-	0x080c, 0x602e, 0x709b, 0x000f, 0x7093, 0x0000, 0x2061, 0x0140,
-	0x605b, 0xbc85, 0x605f, 0xb5b5, 0x2061, 0x0100, 0x6043, 0x0005,
-	0x6043, 0x0004, 0x2009, 0x07d0, 0x2011, 0x5e8e, 0x080c, 0x8632,
-	0x0005, 0x7090, 0x9005, 0x0130, 0x2011, 0x5e8e, 0x080c, 0x863e,
-	0x709b, 0x0000, 0x0005, 0x709b, 0x0011, 0x080c, 0xa690, 0x080c,
-	0x6003, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x7490, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8,
-	0x8004, 0x20a8, 0x4003, 0x080c, 0x5fe6, 0x11a0, 0x717c, 0x81ff,
-	0x0188, 0x900e, 0x7080, 0x9084, 0x00ff, 0x0160, 0x080c, 0x25fb,
-	0x9186, 0x007e, 0x0138, 0x9186, 0x0080, 0x0120, 0x2011, 0x0008,
-	0x080c, 0x5e3b, 0x60c3, 0x0014, 0x080c, 0x5eb8, 0x0005, 0x00f6,
-	0x7090, 0x9005, 0x0500, 0x2011, 0x5e8e, 0x080c, 0x863e, 0x9086,
-	0x0014, 0x11b8, 0x080c, 0x6003, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
-	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0012, 0x0029,
-	0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0013,
-	0x080c, 0x5f95, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000,
-	0x080c, 0x6003, 0x080c, 0x5fe6, 0x1170, 0x7084, 0x9005, 0x1158,
-	0x715c, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5e3b,
-	0x0168, 0x080c, 0x5fbc, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
+	0x709b, 0x0012, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005,
+	0x00f6, 0x709b, 0x0013, 0x080c, 0x5f90, 0x2079, 0x0240, 0x7833,
+	0x1103, 0x7837, 0x0000, 0x080c, 0x5ffe, 0x080c, 0x5fe1, 0x1170,
+	0x7084, 0x9005, 0x1158, 0x715c, 0x9186, 0xffff, 0x0138, 0x2011,
+	0x0008, 0x080c, 0x5e36, 0x0168, 0x080c, 0x5fb7, 0x20a9, 0x0008,
+	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
+	0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb3, 0x00fe, 0x0005, 0x00f6,
+	0x7090, 0x9005, 0x0500, 0x2011, 0x5e89, 0x080c, 0x861d, 0x9086,
+	0x0014, 0x11b8, 0x080c, 0x5ffe, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
+	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0014, 0x0029,
+	0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0015,
+	0x080c, 0x5f90, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000,
+	0x080c, 0x5ffe, 0x080c, 0x5fe1, 0x11b8, 0x7084, 0x9005, 0x11a0,
+	0x7164, 0x9186, 0xffff, 0x0180, 0x9180, 0x3368, 0x200d, 0x918c,
+	0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5e36, 0x0180, 0x080c,
+	0x4fdf, 0x0110, 0x080c, 0x267d, 0x20a9, 0x0008, 0x20e1, 0x0000,
+	0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3,
+	0x0014, 0x080c, 0x5eb3, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005,
+	0x05f0, 0x2011, 0x5e89, 0x080c, 0x861d, 0x9086, 0x0014, 0x15a8,
+	0x080c, 0x5ffe, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1568,
+	0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1168, 0x9085,
+	0x0001, 0x080c, 0x6029, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
+	0x1110, 0x70c7, 0x0001, 0x0080, 0x9005, 0x11b8, 0x7a38, 0xd2fc,
+	0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x9085, 0x0001,
+	0x080c, 0x6029, 0x7097, 0x0000, 0x7a38, 0xd2f4, 0x0110, 0x70df,
+	0x0008, 0x709b, 0x0016, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe,
+	0x0005, 0x080c, 0xa67d, 0x080c, 0x5ffe, 0x20e1, 0x0000, 0x2099,
+	0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000e, 0x4003,
+	0x2011, 0x026d, 0x2204, 0x9084, 0x0100, 0x2011, 0x024d, 0x2012,
+	0x2011, 0x026e, 0x709b, 0x0017, 0x080c, 0x5fe1, 0x1150, 0x7084,
+	0x9005, 0x1138, 0x080c, 0x5da9, 0x1188, 0x9085, 0x0001, 0x080c,
+	0x267d, 0x20a9, 0x0008, 0x080c, 0x5ffe, 0x20e1, 0x0000, 0x2099,
 	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
-	0x080c, 0x5eb8, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
-	0x2011, 0x5e8e, 0x080c, 0x863e, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x6003, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834,
-	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110,
-	0x70c7, 0x0001, 0x709b, 0x0014, 0x0029, 0x0010, 0x7093, 0x0000,
-	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0015, 0x080c, 0x5f95, 0x2079,
-	0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x6003, 0x080c,
-	0x5fe6, 0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164, 0x9186, 0xffff,
-	0x0180, 0x9180, 0x3374, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011,
-	0x0008, 0x080c, 0x5e3b, 0x0180, 0x080c, 0x4fe4, 0x0110, 0x080c,
-	0x2664, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
-	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb8,
-	0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x05f0, 0x2011, 0x5e8e,
-	0x080c, 0x863e, 0x9086, 0x0014, 0x15a8, 0x080c, 0x6003, 0x2079,
-	0x0260, 0x7a30, 0x9296, 0x1105, 0x1568, 0x7834, 0x9084, 0x0100,
-	0x2011, 0x0100, 0x921e, 0x1168, 0x9085, 0x0001, 0x080c, 0x602e,
-	0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001,
-	0x0080, 0x9005, 0x11b8, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
-	0x1110, 0x70c7, 0x0001, 0x9085, 0x0001, 0x080c, 0x602e, 0x7097,
-	0x0000, 0x7a38, 0xd2f4, 0x0110, 0x70df, 0x0008, 0x709b, 0x0016,
-	0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x080c, 0xa690,
-	0x080c, 0x6003, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000,
-	0x20a1, 0x0240, 0x20a9, 0x000e, 0x4003, 0x2011, 0x026d, 0x2204,
-	0x9084, 0x0100, 0x2011, 0x024d, 0x2012, 0x2011, 0x026e, 0x709b,
-	0x0017, 0x080c, 0x5fe6, 0x1150, 0x7084, 0x9005, 0x1138, 0x080c,
-	0x5dae, 0x1188, 0x9085, 0x0001, 0x080c, 0x2664, 0x20a9, 0x0008,
-	0x080c, 0x6003, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
-	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5eb8, 0x0010,
-	0x080c, 0x5908, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01d8, 0x2011,
-	0x5e8e, 0x080c, 0x863e, 0x9086, 0x0084, 0x1190, 0x080c, 0x6003,
-	0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1150, 0x7834, 0x9005,
-	0x1138, 0x9006, 0x080c, 0x602e, 0x709b, 0x0018, 0x0029, 0x0010,
-	0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0019, 0x080c,
-	0x5f95, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c,
-	0x6003, 0x2009, 0x026e, 0x2039, 0x1d0e, 0x20a9, 0x0040, 0x213e,
-	0x8738, 0x8108, 0x9186, 0x0280, 0x1128, 0x6814, 0x8000, 0x6816,
-	0x2009, 0x0260, 0x1f04, 0x5d17, 0x2039, 0x1d0e, 0x080c, 0x5fe6,
-	0x11e8, 0x2728, 0x2514, 0x8207, 0x9084, 0x00ff, 0x8000, 0x2018,
-	0x9294, 0x00ff, 0x8007, 0x9205, 0x202a, 0x7060, 0x2310, 0x8214,
-	0x92a0, 0x1d0e, 0x2414, 0x938c, 0x0001, 0x0118, 0x9294, 0xff00,
-	0x0018, 0x9294, 0x00ff, 0x8007, 0x9215, 0x2222, 0x20a9, 0x0040,
-	0x2009, 0x024e, 0x270e, 0x8738, 0x8108, 0x9186, 0x0260, 0x1128,
-	0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5d4a, 0x60c3,
-	0x0084, 0x080c, 0x5eb8, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005,
-	0x01e0, 0x2011, 0x5e8e, 0x080c, 0x863e, 0x9086, 0x0084, 0x1198,
-	0x080c, 0x6003, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158,
-	0x7834, 0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x5f59, 0x709b,
-	0x001a, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x9085,
-	0x0001, 0x080c, 0x602e, 0x709b, 0x001b, 0x080c, 0xa690, 0x080c,
-	0x6003, 0x2011, 0x0260, 0x2009, 0x0240, 0x7490, 0x9480, 0x0018,
-	0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x220e, 0x8210,
-	0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009,
-	0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5d96,
-	0x60c3, 0x0084, 0x080c, 0x5eb8, 0x0005, 0x0005, 0x0086, 0x0096,
-	0x2029, 0x1848, 0x252c, 0x20a9, 0x0008, 0x2041, 0x1d0e, 0x20e9,
-	0x0001, 0x28a0, 0x080c, 0x6003, 0x20e1, 0x0000, 0x2099, 0x026e,
-	0x4003, 0x20a9, 0x0008, 0x2011, 0x0007, 0xd5d4, 0x0108, 0x9016,
-	0x2800, 0x9200, 0x200c, 0x91a6, 0xffff, 0x1148, 0xd5d4, 0x0110,
-	0x8210, 0x0008, 0x8211, 0x1f04, 0x5dc8, 0x0804, 0x5e37, 0x82ff,
-	0x1160, 0xd5d4, 0x0120, 0x91a6, 0x3fff, 0x0d90, 0x0020, 0x91a6,
-	0x3fff, 0x0904, 0x5e37, 0x918d, 0xc000, 0x20a9, 0x0010, 0x2019,
-	0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4, 0x0110,
-	0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319, 0x0008,
-	0x8318, 0x1f04, 0x5dee, 0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426,
-	0x8425, 0x1f04, 0x5e00, 0x2328, 0x8529, 0x92be, 0x0007, 0x0158,
-	0x0006, 0x2039, 0x0007, 0x2200, 0x973a, 0x000e, 0x27a8, 0x95a8,
-	0x0010, 0x1f04, 0x5e0f, 0x755e, 0x95c8, 0x3374, 0x292d, 0x95ac,
-	0x00ff, 0x7582, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x2644,
-	0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018, 0x2304, 0x9405, 0x201a,
-	0x7087, 0x0001, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x20e1, 0x0001,
-	0x2898, 0x20a9, 0x0008, 0x4003, 0x9085, 0x0001, 0x0008, 0x9006,
-	0x009e, 0x008e, 0x0005, 0x0156, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x22a8, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x2011,
-	0x024e, 0x22a0, 0x4003, 0x014e, 0x013e, 0x01de, 0x01ce, 0x015e,
-	0x2118, 0x9026, 0x2001, 0x0007, 0x939a, 0x0010, 0x0218, 0x8420,
-	0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120, 0x939a, 0x0010, 0x8421,
-	0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8,
-	0x9238, 0x2029, 0x026e, 0x9528, 0x2504, 0x942c, 0x11b8, 0x9405,
-	0x203a, 0x715e, 0x91a0, 0x3374, 0x242d, 0x95ac, 0x00ff, 0x7582,
-	0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x2644, 0x001e, 0x60e7,
-	0x0000, 0x65ea, 0x7087, 0x0001, 0x9084, 0x0000, 0x0005, 0x00e6,
-	0x2071, 0x1800, 0x708b, 0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6,
-	0x2079, 0x0100, 0x2071, 0x0140, 0x080c, 0x5f48, 0x080c, 0x9e32,
-	0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2a1a, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x1826, 0x2073, 0x0000, 0x7840, 0x0026, 0x0016,
-	0x2009, 0x00f7, 0x080c, 0x5fa5, 0x001e, 0x9094, 0x0010, 0x9285,
-	0x0080, 0x7842, 0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x2979, 0x0228, 0x2011, 0x0101,
-	0x2204, 0xc0c5, 0x2012, 0x2011, 0x19f4, 0x2013, 0x0000, 0x7093,
-	0x0000, 0x012e, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x9e25,
-	0x6144, 0xd184, 0x0120, 0x7198, 0x918d, 0x2000, 0x0018, 0x718c,
-	0x918d, 0x1000, 0x2011, 0x1999, 0x2112, 0x2009, 0x07d0, 0x2011,
-	0x5e8e, 0x080c, 0x8708, 0x0005, 0x0016, 0x0026, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x080c, 0xa896, 0x080c, 0xab5e, 0x080c, 0xa8b2,
-	0x2009, 0x00f7, 0x080c, 0x5fa5, 0x2061, 0x1a03, 0x900e, 0x611a,
-	0x611e, 0x6172, 0x6176, 0x2061, 0x1800, 0x6003, 0x0001, 0x2061,
-	0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1999, 0x200b,
-	0x0000, 0x2009, 0x002d, 0x2011, 0x5f14, 0x080c, 0x8632, 0x012e,
-	0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x0471, 0x2071, 0x0100, 0x080c, 0x9e32, 0x2071, 0x0140,
-	0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2a1a, 0x080c, 0x74f1,
-	0x0188, 0x080c, 0x750c, 0x1170, 0x080c, 0x77f7, 0x0016, 0x080c,
-	0x2713, 0x2001, 0x196d, 0x2102, 0x001e, 0x080c, 0x77f2, 0x080c,
-	0x741a, 0x0050, 0x2009, 0x0001, 0x080c, 0x29f6, 0x2001, 0x0001,
-	0x080c, 0x25a0, 0x080c, 0x5ee4, 0x012e, 0x000e, 0x00ee, 0x0005,
-	0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158, 0x0026, 0x0036, 0x2011,
-	0x8017, 0x2001, 0x1999, 0x201c, 0x080c, 0x4b07, 0x003e, 0x002e,
-	0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001, 0x20a1, 0x1d80, 0x080c,
-	0x6003, 0x20e9, 0x0000, 0x2099, 0x026e, 0x0099, 0x20a9, 0x0020,
-	0x080c, 0x5ffd, 0x2099, 0x0260, 0x20a1, 0x1d92, 0x0051, 0x20a9,
-	0x000e, 0x080c, 0x6000, 0x2099, 0x0260, 0x20a1, 0x1db2, 0x0009,
-	0x0005, 0x0016, 0x0026, 0x3410, 0x3308, 0x2104, 0x8007, 0x2012,
-	0x8108, 0x8210, 0x1f04, 0x5f7d, 0x002e, 0x001e, 0x0005, 0x080c,
-	0xa690, 0x20e1, 0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x080c, 0xa690, 0x080c,
-	0x6003, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x00c6, 0x0006, 0x2061,
-	0x0100, 0x810f, 0x2001, 0x1834, 0x2004, 0x9005, 0x1138, 0x2001,
-	0x1818, 0x2004, 0x9084, 0x00ff, 0x9105, 0x0010, 0x9185, 0x00f7,
-	0x604a, 0x000e, 0x00ce, 0x0005, 0x0016, 0x0046, 0x080c, 0x6a67,
-	0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xe2c9, 0x2001,
-	0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x900e, 0x080c,
-	0x31a6, 0x080c, 0xcf52, 0x0140, 0x0036, 0x2019, 0xffff, 0x2021,
-	0x0007, 0x080c, 0x4cbe, 0x003e, 0x004e, 0x001e, 0x0005, 0x080c,
-	0x5ee4, 0x709b, 0x0000, 0x7093, 0x0000, 0x0005, 0x0006, 0x2001,
-	0x180c, 0x2004, 0xd09c, 0x0100, 0x000e, 0x0005, 0x0006, 0x0016,
-	0x0126, 0x2091, 0x8000, 0x2001, 0x0101, 0x200c, 0x918d, 0x0006,
-	0x2102, 0x012e, 0x001e, 0x000e, 0x0005, 0x2009, 0x0001, 0x0020,
-	0x2009, 0x0002, 0x0008, 0x900e, 0x6814, 0x9084, 0xffc0, 0x910d,
-	0x6916, 0x0005, 0x00f6, 0x0156, 0x0146, 0x01d6, 0x9006, 0x20a9,
-	0x0080, 0x20e9, 0x0001, 0x20a1, 0x1d00, 0x4004, 0x2079, 0x1d00,
-	0x7803, 0x2200, 0x7807, 0x00ef, 0x780f, 0x00ef, 0x7813, 0x0138,
-	0x7823, 0xffff, 0x7827, 0xffff, 0x01de, 0x014e, 0x015e, 0x00fe,
-	0x0005, 0x2001, 0x1800, 0x2003, 0x0001, 0x0005, 0x2001, 0x19a6,
-	0x0118, 0x2003, 0x0001, 0x0010, 0x2003, 0x0000, 0x0005, 0x0156,
-	0x20a9, 0x0800, 0x2009, 0x1000, 0x9006, 0x200a, 0x8108, 0x1f04,
-	0x603d, 0x015e, 0x0005, 0x00d6, 0x0036, 0x0156, 0x0136, 0x0146,
-	0x2069, 0x1847, 0x9006, 0xb802, 0xb8d6, 0xb807, 0x0707, 0xb80a,
-	0xb80e, 0xb812, 0x9198, 0x3374, 0x231d, 0x939c, 0x00ff, 0xbb16,
-	0x0016, 0x0026, 0xb886, 0x080c, 0xab57, 0x1120, 0x9192, 0x007e,
-	0x1208, 0xbb86, 0x20a9, 0x0004, 0xb8c4, 0x20e8, 0xb9c8, 0x9198,
-	0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9, 0x0004, 0x9198, 0x000a,
-	0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e, 0xb842, 0xb8ce, 0xb8d2,
-	0xb85e, 0xb862, 0xb866, 0xb86a, 0xb86f, 0x0100, 0xb872, 0xb876,
-	0xb87a, 0xb88a, 0xb88e, 0xb893, 0x0008, 0xb896, 0xb89a, 0xb89e,
-	0xb8be, 0xb9a2, 0x0096, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x106c,
-	0xb8a7, 0x0000, 0x009e, 0x9006, 0xb84a, 0x6810, 0xb83a, 0x680c,
-	0xb846, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0198, 0x00c6, 0x2060,
-	0x9c82, 0x1ddc, 0x0a0c, 0x0d7d, 0x2001, 0x181a, 0x2004, 0x9c02,
-	0x1a0c, 0x0d7d, 0x080c, 0x8b90, 0x00ce, 0x090c, 0x8f34, 0xb8af,
-	0x0000, 0x6814, 0x9084, 0x00ff, 0xb842, 0x014e, 0x013e, 0x015e,
-	0x003e, 0x00de, 0x0005, 0x0126, 0x2091, 0x8000, 0xa974, 0xae78,
-	0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x6119, 0x9182, 0x0800,
-	0x1a04, 0x611d, 0x2001, 0x180c, 0x2004, 0x9084, 0x0003, 0x1904,
-	0x6123, 0x9188, 0x1000, 0x2104, 0x905d, 0x0198, 0xb804, 0x9084,
-	0x00ff, 0x908e, 0x0006, 0x1188, 0xb8a4, 0x900d, 0x1904, 0x6135,
-	0x080c, 0x64ee, 0x9006, 0x012e, 0x0005, 0x2001, 0x0005, 0x900e,
-	0x04b8, 0x2001, 0x0028, 0x900e, 0x0498, 0x9082, 0x0006, 0x1290,
-	0x080c, 0xab57, 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900,
-	0xd1fc, 0x0d10, 0x2001, 0x0029, 0x2009, 0x1000, 0x0408, 0x2001,
-	0x0028, 0x00a8, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001,
-	0x0004, 0x0068, 0xd184, 0x0118, 0x2001, 0x0004, 0x0040, 0x2001,
-	0x0029, 0xb900, 0xd1fc, 0x0118, 0x2009, 0x1000, 0x0048, 0x900e,
-	0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e,
-	0x9005, 0x012e, 0x0005, 0x2001, 0x180c, 0x2004, 0xd084, 0x19d0,
-	0x9188, 0x1000, 0x2104, 0x9065, 0x09a8, 0x080c, 0x6a6b, 0x1990,
-	0xb800, 0xd0bc, 0x0978, 0x0804, 0x60dc, 0x080c, 0x6890, 0x0904,
-	0x60e5, 0x0804, 0x60e0, 0x00e6, 0x2071, 0x19e7, 0x7004, 0x9086,
-	0x0002, 0x1128, 0x7030, 0x9080, 0x0004, 0x2004, 0x9b06, 0x00ee,
-	0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa874, 0x908e,
-	0x00ff, 0x1120, 0x2001, 0x196b, 0x205c, 0x0060, 0xa974, 0x9182,
-	0x0800, 0x1690, 0x9188, 0x1000, 0x2104, 0x905d, 0x01d0, 0x080c,
-	0x6a0b, 0x11d0, 0x080c, 0xab97, 0x0570, 0x2b00, 0x6012, 0x2900,
-	0x6016, 0x6023, 0x0009, 0x602b, 0x0000, 0xa874, 0x908e, 0x00ff,
-	0x1110, 0x602b, 0x8000, 0x2009, 0x0043, 0x080c, 0xac8c, 0x9006,
-	0x00b0, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c, 0xd18c,
-	0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004,
-	0x0010, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005, 0x012e,
-	0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00b6, 0x00e6,
-	0x0126, 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04, 0x6211,
-	0x9188, 0x1000, 0x2104, 0x905d, 0x0904, 0x61e9, 0xb8a0, 0x9086,
-	0x007f, 0x0178, 0x080c, 0x6a73, 0x0160, 0xa994, 0x81ff, 0x0130,
-	0x908e, 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x080c, 0x6a6b,
-	0x1598, 0xa87c, 0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8, 0x2060,
-	0x0026, 0x2010, 0x080c, 0xc826, 0x002e, 0x1120, 0x2001, 0x0008,
-	0x0804, 0x6213, 0x6020, 0x9086, 0x000a, 0x0120, 0x2001, 0x0008,
-	0x0804, 0x6213, 0x601a, 0x6003, 0x0008, 0x2900, 0x6016, 0x0058,
-	0x080c, 0xab97, 0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016, 0x600b,
-	0xffff, 0x6023, 0x000a, 0x2009, 0x0003, 0x080c, 0xac8c, 0x9006,
-	0x0458, 0x2001, 0x0028, 0x0438, 0x9082, 0x0006, 0x1290, 0x080c,
-	0xab57, 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc,
-	0x0900, 0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, 0x2001, 0x0028,
-	0x0090, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004,
-	0x0050, 0xd184, 0x0118, 0x2001, 0x0004, 0x0028, 0x2001, 0x0029,
-	0x0010, 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005,
-	0x2001, 0x002c, 0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091, 0x8000,
-	0xa8e0, 0x9005, 0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630, 0xa8c8,
-	0x9005, 0x1518, 0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974, 0x2079,
-	0x1800, 0x9182, 0x0800, 0x12e8, 0x7830, 0x9084, 0x0003, 0x1130,
-	0xaa98, 0xab94, 0xa878, 0x9084, 0x0007, 0x00ea, 0x7930, 0xd18c,
-	0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004,
-	0x0010, 0x2001, 0x0029, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e,
-	0x0018, 0x2001, 0x0029, 0x900e, 0x9006, 0x0008, 0x9005, 0x012e,
-	0x00be, 0x00fe, 0x0005, 0x62a8, 0x6263, 0x627a, 0x62a8, 0x62a8,
-	0x62a8, 0x62a8, 0x62a8, 0x2100, 0x9082, 0x007e, 0x1278, 0x080c,
-	0x65c4, 0x0148, 0x9046, 0xb810, 0x9306, 0x1904, 0x62b0, 0xb814,
-	0x9206, 0x15f0, 0x0028, 0xbb12, 0xba16, 0x0010, 0x080c, 0x49ba,
-	0x0150, 0x04b0, 0x080c, 0x6625, 0x1598, 0xb810, 0x9306, 0x1580,
-	0xb814, 0x9206, 0x1568, 0x080c, 0xab97, 0x0530, 0x2b00, 0x6012,
-	0x080c, 0xcccc, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a,
-	0xa878, 0x9086, 0x0001, 0x1170, 0x080c, 0x31e7, 0x9006, 0x080c,
-	0x6561, 0x2001, 0x0002, 0x080c, 0x6575, 0x2001, 0x0200, 0xb86e,
-	0xb893, 0x0002, 0x2009, 0x0003, 0x080c, 0xac8c, 0x9006, 0x0068,
-	0x2001, 0x0001, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018,
-	0x2001, 0x0028, 0x900e, 0x9005, 0x0000, 0x012e, 0x00be, 0x00fe,
-	0x0005, 0x00b6, 0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa894,
-	0x90c6, 0x0015, 0x0904, 0x6497, 0x90c6, 0x0056, 0x0904, 0x649b,
-	0x90c6, 0x0066, 0x0904, 0x649f, 0x90c6, 0x0067, 0x0904, 0x64a3,
-	0x90c6, 0x0068, 0x0904, 0x64a7, 0x90c6, 0x0071, 0x0904, 0x64ab,
-	0x90c6, 0x0074, 0x0904, 0x64af, 0x90c6, 0x007c, 0x0904, 0x64b3,
-	0x90c6, 0x007e, 0x0904, 0x64b7, 0x90c6, 0x0037, 0x0904, 0x64bb,
-	0x9016, 0x2079, 0x1800, 0xa974, 0x9186, 0x00ff, 0x0904, 0x6492,
-	0x9182, 0x0800, 0x1a04, 0x6492, 0x080c, 0x6625, 0x1198, 0xb804,
-	0x9084, 0x00ff, 0x9082, 0x0006, 0x1268, 0xa894, 0x90c6, 0x006f,
-	0x0148, 0x080c, 0xab57, 0x1904, 0x647b, 0xb8a0, 0x9084, 0xff80,
-	0x1904, 0x647b, 0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6, 0x005e,
-	0x0904, 0x63db, 0x90c6, 0x0064, 0x0904, 0x6404, 0x2008, 0x0804,
-	0x639d, 0xa998, 0xa8b0, 0x2040, 0x080c, 0xab57, 0x1120, 0x9182,
-	0x007f, 0x0a04, 0x639d, 0x9186, 0x00ff, 0x0904, 0x639d, 0x9182,
-	0x0800, 0x1a04, 0x639d, 0xaaa0, 0xab9c, 0x787c, 0x9306, 0x1188,
-	0x7880, 0x0096, 0x924e, 0x1128, 0x2208, 0x2310, 0x009e, 0x0804,
-	0x639d, 0x99cc, 0xff00, 0x009e, 0x1120, 0x2208, 0x2310, 0x0804,
-	0x639d, 0x080c, 0x49ba, 0x0904, 0x63a7, 0x900e, 0x9016, 0x90c6,
-	0x4000, 0x15e0, 0x0006, 0x080c, 0x6914, 0x1108, 0xc185, 0xb800,
-	0xd0bc, 0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006,
-	0x2098, 0x080c, 0x0fb7, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0035, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a,
-	0x2098, 0x080c, 0x0fb7, 0xa8c4, 0xabc8, 0x9305, 0xabcc, 0x9305,
-	0xabd0, 0x9305, 0xabd4, 0x9305, 0xabd8, 0x9305, 0xabdc, 0x9305,
-	0xabe0, 0x9305, 0x9005, 0x0510, 0x000e, 0x00c8, 0x90c6, 0x4007,
-	0x1110, 0x2408, 0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610,
-	0x0070, 0x90c6, 0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138,
-	0x2001, 0x4005, 0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896,
-	0xa99a, 0xaa9e, 0x2001, 0x0030, 0x900e, 0x0478, 0x000e, 0x080c,
-	0xab97, 0x1130, 0x2001, 0x4005, 0x2009, 0x0003, 0x9016, 0x0c78,
-	0x2b00, 0x6012, 0x080c, 0xcccc, 0x2900, 0x6016, 0x6023, 0x0001,
-	0xa868, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x31e7, 0x012e, 0x9006, 0x080c, 0x6561, 0x2001, 0x0002,
-	0x080c, 0x6575, 0x2009, 0x0002, 0x080c, 0xac8c, 0xa8b0, 0xd094,
-	0x0118, 0xb8d4, 0xc08d, 0xb8d6, 0x9006, 0x9005, 0x012e, 0x00ee,
-	0x00fe, 0x00be, 0x0005, 0x080c, 0x56ee, 0x0118, 0x2009, 0x0007,
-	0x00f8, 0xa998, 0xaeb0, 0x080c, 0x6625, 0x1904, 0x6398, 0x9186,
-	0x007f, 0x0130, 0x080c, 0x6a6b, 0x0118, 0x2009, 0x0009, 0x0080,
-	0x0096, 0x080c, 0x103a, 0x1120, 0x009e, 0x2009, 0x0002, 0x0040,
-	0x2900, 0x009e, 0xa806, 0x080c, 0xca24, 0x19b0, 0x2009, 0x0003,
-	0x2001, 0x4005, 0x0804, 0x639f, 0xa998, 0xaeb0, 0x080c, 0x6625,
-	0x1904, 0x6398, 0x0096, 0x080c, 0x103a, 0x1128, 0x009e, 0x2009,
-	0x0002, 0x0804, 0x6458, 0x2900, 0x009e, 0xa806, 0x0096, 0x2048,
-	0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080,
-	0x0006, 0x20a0, 0xbbc8, 0x9398, 0x0006, 0x2398, 0x080c, 0x0fb7,
-	0x009e, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xd684,
-	0x1168, 0x080c, 0x56da, 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0,
-	0xb800, 0xd08c, 0x0118, 0xa89b, 0x000c, 0x00b0, 0x080c, 0x6a6b,
-	0x0118, 0xa89b, 0x0009, 0x0080, 0x080c, 0x56ee, 0x0118, 0xa89b,
-	0x0007, 0x0050, 0x080c, 0xca07, 0x1904, 0x63d4, 0x2009, 0x0003,
-	0x2001, 0x4005, 0x0804, 0x639f, 0xa87b, 0x0030, 0xa897, 0x4005,
-	0xa804, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4,
-	0x2031, 0x0000, 0x2041, 0x127e, 0x080c, 0xb112, 0x1904, 0x63d4,
-	0x2009, 0x0002, 0x08e8, 0x2001, 0x0028, 0x900e, 0x0804, 0x63d5,
-	0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038,
-	0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e,
-	0x0804, 0x63d5, 0x2001, 0x0029, 0x900e, 0x0804, 0x63d5, 0x080c,
-	0x3797, 0x0804, 0x63d6, 0x080c, 0x540f, 0x0804, 0x63d6, 0x080c,
-	0x4573, 0x0804, 0x63d6, 0x080c, 0x45ec, 0x0804, 0x63d6, 0x080c,
-	0x4648, 0x0804, 0x63d6, 0x080c, 0x4a7d, 0x0804, 0x63d6, 0x080c,
-	0x4d34, 0x0804, 0x63d6, 0x080c, 0x507a, 0x0804, 0x63d6, 0x080c,
-	0x5273, 0x0804, 0x63d6, 0x080c, 0x39b5, 0x0804, 0x63d6, 0x00b6,
-	0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1608, 0x9182,
-	0x0800, 0x1258, 0x9188, 0x1000, 0x2104, 0x905d, 0x0130, 0x080c,
-	0x6a6b, 0x1138, 0x00d9, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e,
-	0x0090, 0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d98, 0x2001,
-	0x0029, 0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
-	0x2001, 0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0xa877, 0x0000,
-	0xb8d0, 0x9005, 0x1904, 0x6555, 0xb888, 0x9005, 0x1904, 0x6555,
-	0xb838, 0xb93c, 0x9102, 0x1a04, 0x6555, 0x2b10, 0x080c, 0xabc4,
-	0x0904, 0x6551, 0x8108, 0xb93e, 0x6212, 0x2900, 0x6016, 0x6023,
-	0x0003, 0x600b, 0xffff, 0x6007, 0x0040, 0xa878, 0x605e, 0xa880,
-	0x9084, 0x00ff, 0x6066, 0xa883, 0x0000, 0xa87c, 0xd0ac, 0x0588,
-	0xc0dd, 0xa87e, 0xa888, 0x8001, 0x1530, 0xa816, 0xa864, 0x9094,
-	0x00f7, 0x9296, 0x0011, 0x11f8, 0x9084, 0x00ff, 0xc0bd, 0x601e,
-	0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x2001, 0x000f, 0x8001, 0x1df0,
-	0x2001, 0x8004, 0x6003, 0x0004, 0x6046, 0x00f6, 0x2079, 0x0380,
-	0x7818, 0xd0bc, 0x1de8, 0x7833, 0x0010, 0x2c00, 0x7836, 0x781b,
-	0x8080, 0x00fe, 0x0005, 0x080c, 0x1731, 0x601c, 0xc0bd, 0x601e,
-	0x0c38, 0xd0b4, 0x190c, 0x1c30, 0x2001, 0x8004, 0x6003, 0x0002,
-	0x0c18, 0x81ff, 0x1110, 0xb88b, 0x0001, 0x2908, 0xb8cc, 0xb9ce,
-	0x9005, 0x1110, 0xb9d2, 0x0020, 0x0096, 0x2048, 0xa902, 0x009e,
-	0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026, 0x2091, 0x8000, 0x6210,
-	0x2258, 0xba00, 0x9005, 0x0110, 0xc285, 0x0008, 0xc284, 0xba02,
-	0x002e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6,
-	0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006,
-	0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c, 0x6a67, 0x0140, 0x9284,
-	0xff00, 0x8007, 0x9086, 0x0007, 0x1110, 0x2011, 0x0600, 0x000e,
-	0x9294, 0xff00, 0x9215, 0xba06, 0x0006, 0x9086, 0x0006, 0x1120,
-	0xba90, 0x82ff, 0x090c, 0x0d7d, 0x000e, 0x00ce, 0x012e, 0x00be,
-	0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258,
-	0xba04, 0x0006, 0x9086, 0x0006, 0x1168, 0xb89c, 0xd0a4, 0x0150,
-	0x080c, 0x6a63, 0x1138, 0x9284, 0x00ff, 0x9086, 0x0007, 0x1110,
-	0x2011, 0x0006, 0x000e, 0x9294, 0x00ff, 0x8007, 0x9215, 0xba06,
-	0x00ce, 0x012e, 0x00be, 0x0005, 0x9182, 0x0800, 0x0218, 0x9085,
-	0x0001, 0x0005, 0x00d6, 0x0026, 0x9190, 0x1000, 0x2204, 0x905d,
-	0x1188, 0x0096, 0x080c, 0x103a, 0x2958, 0x009e, 0x0168, 0x2b00,
-	0x2012, 0xb85c, 0xb8ca, 0xb860, 0xb8c6, 0x9006, 0xb8a6, 0xb8ae,
-	0x080c, 0x6043, 0x9006, 0x0010, 0x9085, 0x0001, 0x002e, 0x00de,
-	0x0005, 0x00b6, 0x0096, 0x0126, 0x2091, 0x8000, 0x0026, 0x9182,
-	0x0800, 0x0218, 0x9085, 0x0001, 0x0458, 0x00d6, 0x9190, 0x1000,
-	0x2204, 0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4, 0x904d, 0x0110,
-	0x080c, 0x106c, 0x00d6, 0x00c6, 0xb8bc, 0x2060, 0x8cff, 0x0168,
-	0x600c, 0x0006, 0x6014, 0x2048, 0x080c, 0xc838, 0x0110, 0x080c,
-	0x0fec, 0x080c, 0xabed, 0x00ce, 0x0c88, 0x00ce, 0x00de, 0x2b48,
-	0xb8c8, 0xb85e, 0xb8c4, 0xb862, 0x080c, 0x107c, 0x00de, 0x9006,
-	0x002e, 0x012e, 0x009e, 0x00be, 0x0005, 0x0016, 0x9182, 0x0800,
-	0x0218, 0x9085, 0x0001, 0x0030, 0x9188, 0x1000, 0x2104, 0x905d,
-	0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156, 0x0136, 0x0146,
-	0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c, 0x74e9,
-	0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c, 0xab57, 0x11d8,
-	0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x1982, 0x7048,
-	0x2062, 0x704c, 0x6006, 0x7050, 0x600a, 0x7054, 0x600e, 0x00ce,
-	0x703c, 0x2069, 0x0140, 0x9005, 0x1110, 0x2001, 0x0001, 0x6886,
-	0x2069, 0x1800, 0x68b6, 0x7040, 0xb85e, 0x7048, 0xb862, 0x704c,
-	0xb866, 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8c4, 0x20e8, 0xb8c8,
-	0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099, 0x027a,
-	0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069, 0x0200,
-	0x6817, 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048, 0xb872,
-	0x7050, 0xb876, 0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0, 0x9086,
-	0x007e, 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211, 0x1218, 0x2009,
-	0x0008, 0x0400, 0x9182, 0x0259, 0x1218, 0x2009, 0x0007, 0x00d0,
-	0x9182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0, 0x9182, 0x0349,
-	0x1218, 0x2009, 0x0005, 0x0070, 0x9182, 0x0421, 0x1218, 0x2009,
-	0x0004, 0x0040, 0x9182, 0x0581, 0x1218, 0x2009, 0x0003, 0x0010,
-	0x2009, 0x0002, 0xb992, 0x014e, 0x013e, 0x015e, 0x00de, 0x0005,
-	0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034, 0xb896, 0x703c,
-	0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbd4, 0xc384, 0xba00, 0x2009,
-	0x1867, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad, 0x0008,
-	0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc, 0x0128,
-	0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbd6, 0x003e,
-	0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x0126, 0x2091, 0x8000,
-	0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04, 0x9282,
-	0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906, 0x8006,
-	0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080, 0x0004,
-	0x2098, 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002, 0x9086, 0xffff,
-	0x0120, 0x8109, 0x1dd0, 0x080c, 0x0d7d, 0x3c00, 0x20e8, 0x3300,
-	0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce, 0x014e,
-	0x013e, 0x0060, 0x080c, 0x103a, 0x0170, 0x2900, 0xb8a6, 0xa803,
-	0x0000, 0x080c, 0x68b0, 0xa807, 0x0001, 0xae12, 0x9085, 0x0001,
-	0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091, 0x8000,
-	0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005, 0x1150, 0x080c,
-	0x68bf, 0x1158, 0xa804, 0x908a, 0x0002, 0x0218, 0x8001, 0xa806,
-	0x0020, 0x080c, 0x106c, 0xb8a7, 0x0000, 0x009e, 0x012e, 0x0005,
-	0x0096, 0x00c6, 0xb888, 0x9005, 0x1904, 0x67a9, 0xb8d0, 0x904d,
-	0x0904, 0x67a9, 0x080c, 0xabc4, 0x0904, 0x67a5, 0x8210, 0xba3e,
-	0xa800, 0xb8d2, 0x9005, 0x1108, 0xb8ce, 0x2b00, 0x6012, 0x2900,
-	0x6016, 0x6023, 0x0003, 0x600b, 0xffff, 0x6007, 0x0040, 0xa878,
-	0x605e, 0xa880, 0x9084, 0x00ff, 0x6066, 0xa883, 0x0000, 0xa87c,
-	0xd0ac, 0x01c8, 0xc0dd, 0xa87e, 0xa888, 0x8001, 0x1568, 0xa816,
-	0xa864, 0x9094, 0x00f7, 0x9296, 0x0011, 0x1530, 0x9084, 0x00ff,
-	0xc0bd, 0x601e, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x2001, 0x8004,
-	0x6003, 0x0004, 0x0030, 0x080c, 0x1c30, 0x2001, 0x8004, 0x6003,
-	0x0002, 0x6046, 0x2001, 0x0010, 0x2c08, 0x080c, 0xa887, 0xb838,
-	0xba3c, 0x9202, 0x0a04, 0x6756, 0x0020, 0x82ff, 0x1110, 0xb88b,
-	0x0001, 0x00ce, 0x009e, 0x0005, 0x080c, 0x1731, 0x601c, 0xc0bd,
-	0x601e, 0x08e0, 0x00b6, 0x0096, 0x0016, 0x20a9, 0x0800, 0x900e,
-	0x0016, 0x080c, 0x6625, 0x1158, 0xb8d0, 0x904d, 0x0140, 0x3e00,
-	0x9086, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1108, 0x0041, 0x001e,
-	0x8108, 0x1f04, 0x67b8, 0x001e, 0x00be, 0x009e, 0x0005, 0x0096,
-	0x0016, 0xb8d0, 0x904d, 0x0188, 0xa800, 0xb8d2, 0x9005, 0x1108,
-	0xb8ce, 0x9006, 0xa802, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0xcb36, 0x080c, 0x6d80, 0x0c60, 0x001e, 0x009e, 0x0005,
-	0x0086, 0x9046, 0xb8d0, 0x904d, 0x0198, 0xa86c, 0x9406, 0x1118,
-	0xa870, 0x9506, 0x0128, 0x2940, 0xa800, 0x904d, 0x0148, 0x0ca8,
-	0xa800, 0x88ff, 0x1110, 0xb8d2, 0x0008, 0xa002, 0xa803, 0x0000,
-	0x008e, 0x0005, 0x901e, 0x0010, 0x2019, 0x0001, 0x00e6, 0x0096,
-	0x00c6, 0x0086, 0x0026, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e7,
-	0x9046, 0x7028, 0x9065, 0x01e8, 0x6014, 0x2068, 0x83ff, 0x0120,
-	0x605c, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118, 0xa870,
-	0x9506, 0x0120, 0x2c40, 0x600c, 0x2060, 0x0c60, 0x600c, 0x0006,
-	0x0066, 0x2830, 0x080c, 0x9fa2, 0x006e, 0x000e, 0x83ff, 0x0508,
-	0x0c08, 0x9046, 0xb8d0, 0x904d, 0x01e0, 0x83ff, 0x0120, 0xa878,
-	0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506,
-	0x0120, 0x2940, 0xa800, 0x2048, 0x0c70, 0xb8d0, 0xaa00, 0x0026,
-	0x9906, 0x1110, 0xbad2, 0x0008, 0xa202, 0x000e, 0x83ff, 0x0108,
-	0x0c10, 0x002e, 0x008e, 0x00ce, 0x009e, 0x00ee, 0x0005, 0x9016,
-	0x0489, 0x1110, 0x2011, 0x0001, 0x0005, 0x080c, 0x6914, 0x0128,
-	0x080c, 0xc8f9, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6914,
-	0x0128, 0x080c, 0xc89a, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c,
-	0x6914, 0x0128, 0x080c, 0xc8f6, 0x0010, 0x9085, 0x0001, 0x0005,
-	0x080c, 0x6914, 0x0128, 0x080c, 0xc8b9, 0x0010, 0x9085, 0x0001,
-	0x0005, 0x080c, 0x6914, 0x0128, 0x080c, 0xc93a, 0x0010, 0x9085,
-	0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085, 0x0001, 0x0005,
-	0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e, 0x810f,
-	0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004, 0x2098,
-	0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128, 0x8109,
-	0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006, 0x01ce, 0x013e, 0x0005,
-	0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0004, 0x20a0,
-	0x20a9, 0x0010, 0x2009, 0xffff, 0x4104, 0x01de, 0x014e, 0x0136,
+	0x080c, 0x5eb3, 0x0010, 0x080c, 0x5903, 0x0005, 0x00f6, 0x7090,
+	0x9005, 0x01d8, 0x2011, 0x5e89, 0x080c, 0x861d, 0x9086, 0x0084,
+	0x1190, 0x080c, 0x5ffe, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106,
+	0x1150, 0x7834, 0x9005, 0x1138, 0x9006, 0x080c, 0x6029, 0x709b,
+	0x0018, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6,
+	0x709b, 0x0019, 0x080c, 0x5f90, 0x2079, 0x0240, 0x7833, 0x1106,
+	0x7837, 0x0000, 0x080c, 0x5ffe, 0x2009, 0x026e, 0x2039, 0x1d0e,
+	0x20a9, 0x0040, 0x213e, 0x8738, 0x8108, 0x9186, 0x0280, 0x1128,
+	0x6814, 0x8000, 0x6816, 0x2009, 0x0260, 0x1f04, 0x5d12, 0x2039,
+	0x1d0e, 0x080c, 0x5fe1, 0x11e8, 0x2728, 0x2514, 0x8207, 0x9084,
+	0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff, 0x8007, 0x9205, 0x202a,
+	0x7060, 0x2310, 0x8214, 0x92a0, 0x1d0e, 0x2414, 0x938c, 0x0001,
+	0x0118, 0x9294, 0xff00, 0x0018, 0x9294, 0x00ff, 0x8007, 0x9215,
+	0x2222, 0x20a9, 0x0040, 0x2009, 0x024e, 0x270e, 0x8738, 0x8108,
+	0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240,
+	0x1f04, 0x5d45, 0x60c3, 0x0084, 0x080c, 0x5eb3, 0x00fe, 0x0005,
+	0x00f6, 0x7090, 0x9005, 0x01e0, 0x2011, 0x5e89, 0x080c, 0x861d,
+	0x9086, 0x0084, 0x1198, 0x080c, 0x5ffe, 0x2079, 0x0260, 0x7a30,
+	0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7097, 0x0001,
+	0x080c, 0x5f54, 0x709b, 0x001a, 0x0029, 0x0010, 0x7093, 0x0000,
+	0x00fe, 0x0005, 0x9085, 0x0001, 0x080c, 0x6029, 0x709b, 0x001b,
+	0x080c, 0xa67d, 0x080c, 0x5ffe, 0x2011, 0x0260, 0x2009, 0x0240,
+	0x7490, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004,
+	0x20a8, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810,
+	0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011,
+	0x0260, 0x1f04, 0x5d91, 0x60c3, 0x0084, 0x080c, 0x5eb3, 0x0005,
+	0x0005, 0x0086, 0x0096, 0x2029, 0x1848, 0x252c, 0x20a9, 0x0008,
+	0x2041, 0x1d0e, 0x20e9, 0x0001, 0x28a0, 0x080c, 0x5ffe, 0x20e1,
+	0x0000, 0x2099, 0x026e, 0x4003, 0x20a9, 0x0008, 0x2011, 0x0007,
+	0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200, 0x200c, 0x91a6, 0xffff,
+	0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008, 0x8211, 0x1f04, 0x5dc3,
+	0x0804, 0x5e32, 0x82ff, 0x1160, 0xd5d4, 0x0120, 0x91a6, 0x3fff,
+	0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904, 0x5e32, 0x918d, 0xc000,
+	0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010,
+	0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4,
+	0x0110, 0x8319, 0x0008, 0x8318, 0x1f04, 0x5de9, 0x04d8, 0x23a8,
+	0x2021, 0x0001, 0x8426, 0x8425, 0x1f04, 0x5dfb, 0x2328, 0x8529,
+	0x92be, 0x0007, 0x0158, 0x0006, 0x2039, 0x0007, 0x2200, 0x973a,
+	0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04, 0x5e0a, 0x755e, 0x95c8,
+	0x3368, 0x292d, 0x95ac, 0x00ff, 0x7582, 0x6532, 0x6536, 0x0016,
+	0x2508, 0x080c, 0x265d, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018,
+	0x2304, 0x9405, 0x201a, 0x7087, 0x0001, 0x20e9, 0x0000, 0x20a1,
+	0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9, 0x0008, 0x4003, 0x9085,
+	0x0001, 0x0008, 0x9006, 0x009e, 0x008e, 0x0005, 0x0156, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1, 0x0000, 0x2099, 0x026e,
+	0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0, 0x4003, 0x014e, 0x013e,
+	0x01de, 0x01ce, 0x015e, 0x2118, 0x9026, 0x2001, 0x0007, 0x939a,
+	0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120,
+	0x939a, 0x0010, 0x8421, 0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118,
+	0x8423, 0x8319, 0x1de8, 0x9238, 0x2029, 0x026e, 0x9528, 0x2504,
+	0x942c, 0x11b8, 0x9405, 0x203a, 0x715e, 0x91a0, 0x3368, 0x242d,
+	0x95ac, 0x00ff, 0x7582, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c,
+	0x265d, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x7087, 0x0001, 0x9084,
+	0x0000, 0x0005, 0x00e6, 0x2071, 0x1800, 0x708b, 0x0000, 0x00ee,
+	0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, 0x2071, 0x0140, 0x080c,
+	0x5f43, 0x080c, 0x9e16, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c,
+	0x2a39, 0x0126, 0x2091, 0x8000, 0x2071, 0x1826, 0x2073, 0x0000,
+	0x7840, 0x0026, 0x0016, 0x2009, 0x00f7, 0x080c, 0x5fa0, 0x001e,
+	0x9094, 0x0010, 0x9285, 0x0080, 0x7842, 0x7a42, 0x002e, 0x012e,
+	0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x2998,
+	0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x2011, 0x19f3,
+	0x2013, 0x0000, 0x7093, 0x0000, 0x012e, 0x60a3, 0x0056, 0x60a7,
+	0x9575, 0x080c, 0x9e09, 0x6144, 0xd184, 0x0120, 0x7198, 0x918d,
+	0x2000, 0x0018, 0x718c, 0x918d, 0x1000, 0x2011, 0x1998, 0x2112,
+	0x2009, 0x07d0, 0x2011, 0x5e89, 0x080c, 0x86e7, 0x0005, 0x0016,
+	0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa888, 0x080c,
+	0xab50, 0x080c, 0xa8a4, 0x2009, 0x00f7, 0x080c, 0x5fa0, 0x2061,
+	0x1a02, 0x900e, 0x611a, 0x611e, 0x6172, 0x6176, 0x2061, 0x1800,
+	0x6003, 0x0001, 0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010,
+	0x2009, 0x1998, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5f0f,
+	0x080c, 0x8611, 0x012e, 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6,
+	0x0006, 0x0126, 0x2091, 0x8000, 0x0471, 0x2071, 0x0100, 0x080c,
+	0x9e16, 0x2071, 0x0140, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c,
+	0x2a39, 0x080c, 0x74d0, 0x0188, 0x080c, 0x74eb, 0x1170, 0x080c,
+	0x77d6, 0x0016, 0x080c, 0x272c, 0x2001, 0x196c, 0x2102, 0x001e,
+	0x080c, 0x77d1, 0x080c, 0x73f9, 0x0050, 0x2009, 0x0001, 0x080c,
+	0x2a15, 0x2001, 0x0001, 0x080c, 0x25b9, 0x080c, 0x5edf, 0x012e,
+	0x000e, 0x00ee, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158,
+	0x0026, 0x0036, 0x2011, 0x8017, 0x2001, 0x1998, 0x201c, 0x080c,
+	0x4b09, 0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001,
+	0x20a1, 0x1d80, 0x080c, 0x5ffe, 0x20e9, 0x0000, 0x2099, 0x026e,
+	0x0099, 0x20a9, 0x0020, 0x080c, 0x5ff8, 0x2099, 0x0260, 0x20a1,
+	0x1d92, 0x0051, 0x20a9, 0x000e, 0x080c, 0x5ffb, 0x2099, 0x0260,
+	0x20a1, 0x1db2, 0x0009, 0x0005, 0x0016, 0x0026, 0x3410, 0x3308,
+	0x2104, 0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, 0x5f78, 0x002e,
+	0x001e, 0x0005, 0x080c, 0xa67d, 0x20e1, 0x0001, 0x2099, 0x1d00,
+	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005,
+	0x080c, 0xa67d, 0x080c, 0x5ffe, 0x20e1, 0x0000, 0x2099, 0x0260,
+	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005,
+	0x00c6, 0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0x1834, 0x2004,
+	0x9005, 0x1138, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x9105,
+	0x0010, 0x9185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016,
+	0x0046, 0x080c, 0x6a66, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a,
+	0x080c, 0xe2d9, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019,
+	0x002a, 0x900e, 0x080c, 0x31b4, 0x080c, 0xcf51, 0x0140, 0x0036,
+	0x2019, 0xffff, 0x2021, 0x0007, 0x080c, 0x4cc0, 0x003e, 0x004e,
+	0x001e, 0x0005, 0x080c, 0x5edf, 0x709b, 0x0000, 0x7093, 0x0000,
+	0x0005, 0x0006, 0x2001, 0x180c, 0x2004, 0xd09c, 0x0100, 0x000e,
+	0x0005, 0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001, 0x0101,
+	0x200c, 0x918d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e, 0x0005,
+	0x2009, 0x0001, 0x0020, 0x2009, 0x0002, 0x0008, 0x900e, 0x6814,
+	0x9084, 0xffc0, 0x910d, 0x6916, 0x0005, 0x00f6, 0x0156, 0x0146,
+	0x01d6, 0x9006, 0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1, 0x1d00,
+	0x4004, 0x2079, 0x1d00, 0x7803, 0x2200, 0x7807, 0x00ef, 0x780f,
+	0x00ef, 0x7813, 0x0138, 0x7823, 0xffff, 0x7827, 0xffff, 0x01de,
+	0x014e, 0x015e, 0x00fe, 0x0005, 0x2001, 0x1800, 0x2003, 0x0001,
+	0x0005, 0x2001, 0x19a5, 0x0118, 0x2003, 0x0001, 0x0010, 0x2003,
+	0x0000, 0x0005, 0x0156, 0x20a9, 0x0800, 0x2009, 0x1000, 0x9006,
+	0x200a, 0x8108, 0x1f04, 0x6038, 0x015e, 0x0005, 0x00d6, 0x0036,
+	0x0156, 0x0136, 0x0146, 0x2069, 0x1847, 0x9006, 0xb802, 0xb8d6,
+	0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, 0x3368, 0x231d,
+	0x939c, 0x00ff, 0xbb16, 0x0016, 0x0026, 0xb886, 0x080c, 0xab49,
+	0x1120, 0x9192, 0x007e, 0x1208, 0xbb86, 0x20a9, 0x0004, 0xb8c4,
+	0x20e8, 0xb9c8, 0x9198, 0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9,
+	0x0004, 0x9198, 0x000a, 0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e,
+	0xb842, 0xb8ce, 0xb8d2, 0xb85e, 0xb862, 0xb866, 0xb86a, 0xb86f,
+	0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893, 0x0008,
+	0xb896, 0xb89a, 0xb89e, 0xb8be, 0xb9a2, 0x0096, 0xb8a4, 0x904d,
+	0x0110, 0x080c, 0x106c, 0xb8a7, 0x0000, 0x009e, 0x9006, 0xb84a,
+	0x6810, 0xb83a, 0x680c, 0xb846, 0xb8bb, 0x0520, 0xb8ac, 0x9005,
+	0x0198, 0x00c6, 0x2060, 0x9c82, 0x1ddc, 0x0a0c, 0x0d7d, 0x2001,
+	0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0d7d, 0x080c, 0x8b72, 0x00ce,
+	0x090c, 0x8f16, 0xb8af, 0x0000, 0x6814, 0x9084, 0x00ff, 0xb842,
+	0x014e, 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, 0x2091,
+	0x8000, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04,
+	0x6114, 0x9182, 0x0800, 0x1a04, 0x6118, 0x2001, 0x180c, 0x2004,
+	0x9084, 0x0003, 0x1904, 0x611e, 0x9188, 0x1000, 0x2104, 0x905d,
+	0x0198, 0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1188, 0xb8a4,
+	0x900d, 0x1904, 0x6130, 0x080c, 0x64e9, 0x9006, 0x012e, 0x0005,
+	0x2001, 0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e, 0x0498,
+	0x9082, 0x0006, 0x1290, 0x080c, 0xab49, 0x1160, 0xb8a0, 0x9084,
+	0xff80, 0x1140, 0xb900, 0xd1fc, 0x0d10, 0x2001, 0x0029, 0x2009,
+	0x1000, 0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c, 0x210c,
+	0xd18c, 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118, 0x2001,
+	0x0004, 0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118, 0x2009,
+	0x1000, 0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
+	0x2001, 0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001, 0x180c,
+	0x2004, 0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x9065, 0x09a8,
+	0x080c, 0x6a6a, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804, 0x60d7,
+	0x080c, 0x688f, 0x0904, 0x60e0, 0x0804, 0x60db, 0x00e6, 0x2071,
+	0x19e6, 0x7004, 0x9086, 0x0002, 0x1128, 0x7030, 0x9080, 0x0004,
+	0x2004, 0x9b06, 0x00ee, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091,
+	0x8000, 0xa874, 0x908e, 0x00ff, 0x1120, 0x2001, 0x196a, 0x205c,
+	0x0060, 0xa974, 0x9182, 0x0800, 0x1690, 0x9188, 0x1000, 0x2104,
+	0x905d, 0x01d0, 0x080c, 0x6a0a, 0x11d0, 0x080c, 0xab89, 0x0570,
+	0x2b00, 0x6012, 0x2900, 0x6016, 0x6023, 0x0009, 0x602b, 0x0000,
+	0xa874, 0x908e, 0x00ff, 0x1110, 0x602b, 0x8000, 0x2009, 0x0043,
+	0x080c, 0xac7c, 0x9006, 0x00b0, 0x2001, 0x0028, 0x0090, 0x2009,
+	0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184,
+	0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x0010, 0x2001,
+	0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c,
+	0x0cc0, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa974, 0x9182,
+	0x0800, 0x1a04, 0x620c, 0x9188, 0x1000, 0x2104, 0x905d, 0x0904,
+	0x61e4, 0xb8a0, 0x9086, 0x007f, 0x0178, 0x080c, 0x6a72, 0x0160,
+	0xa994, 0x81ff, 0x0130, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005,
+	0x0118, 0x080c, 0x6a6a, 0x1598, 0xa87c, 0xd0fc, 0x01e0, 0xa894,
+	0x9005, 0x01c8, 0x2060, 0x0026, 0x2010, 0x080c, 0xc820, 0x002e,
+	0x1120, 0x2001, 0x0008, 0x0804, 0x620e, 0x6020, 0x9086, 0x000a,
+	0x0120, 0x2001, 0x0008, 0x0804, 0x620e, 0x601a, 0x6003, 0x0008,
+	0x2900, 0x6016, 0x0058, 0x080c, 0xab89, 0x05e8, 0x2b00, 0x6012,
+	0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0x2009, 0x0003,
+	0x080c, 0xac7c, 0x9006, 0x0458, 0x2001, 0x0028, 0x0438, 0x9082,
+	0x0006, 0x1290, 0x080c, 0xab49, 0x1160, 0xb8a0, 0x9084, 0xff80,
+	0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001, 0x0029, 0x2009, 0x1000,
+	0x00a8, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c, 0xd18c,
+	0x0118, 0x2001, 0x0004, 0x0050, 0xd184, 0x0118, 0x2001, 0x0004,
+	0x0028, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005, 0x012e,
+	0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00f6, 0x00b6,
+	0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005, 0x1550, 0xa8dc, 0x9082,
+	0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518, 0xa8c4, 0x9082, 0x0101,
+	0x12f8, 0xa974, 0x2079, 0x1800, 0x9182, 0x0800, 0x12e8, 0x7830,
+	0x9084, 0x0003, 0x1130, 0xaa98, 0xab94, 0xa878, 0x9084, 0x0007,
+	0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184,
+	0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0038,
+	0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9006,
+	0x0008, 0x9005, 0x012e, 0x00be, 0x00fe, 0x0005, 0x62a3, 0x625e,
+	0x6275, 0x62a3, 0x62a3, 0x62a3, 0x62a3, 0x62a3, 0x2100, 0x9082,
+	0x007e, 0x1278, 0x080c, 0x65bf, 0x0148, 0x9046, 0xb810, 0x9306,
+	0x1904, 0x62ab, 0xb814, 0x9206, 0x15f0, 0x0028, 0xbb12, 0xba16,
+	0x0010, 0x080c, 0x49bc, 0x0150, 0x04b0, 0x080c, 0x6620, 0x1598,
+	0xb810, 0x9306, 0x1580, 0xb814, 0x9206, 0x1568, 0x080c, 0xab89,
+	0x0530, 0x2b00, 0x6012, 0x080c, 0xcccb, 0x2900, 0x6016, 0x600b,
+	0xffff, 0x6023, 0x000a, 0xa878, 0x9086, 0x0001, 0x1170, 0x080c,
+	0x31ef, 0x9006, 0x080c, 0x655c, 0x2001, 0x0002, 0x080c, 0x6570,
+	0x2001, 0x0200, 0xb86e, 0xb893, 0x0002, 0x2009, 0x0003, 0x080c,
+	0xac7c, 0x9006, 0x0068, 0x2001, 0x0001, 0x900e, 0x0038, 0x2001,
+	0x002c, 0x900e, 0x0018, 0x2001, 0x0028, 0x900e, 0x9005, 0x0000,
+	0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x0126,
+	0x2091, 0x8000, 0xa894, 0x90c6, 0x0015, 0x0904, 0x6492, 0x90c6,
+	0x0056, 0x0904, 0x6496, 0x90c6, 0x0066, 0x0904, 0x649a, 0x90c6,
+	0x0067, 0x0904, 0x649e, 0x90c6, 0x0068, 0x0904, 0x64a2, 0x90c6,
+	0x0071, 0x0904, 0x64a6, 0x90c6, 0x0074, 0x0904, 0x64aa, 0x90c6,
+	0x007c, 0x0904, 0x64ae, 0x90c6, 0x007e, 0x0904, 0x64b2, 0x90c6,
+	0x0037, 0x0904, 0x64b6, 0x9016, 0x2079, 0x1800, 0xa974, 0x9186,
+	0x00ff, 0x0904, 0x648d, 0x9182, 0x0800, 0x1a04, 0x648d, 0x080c,
+	0x6620, 0x1198, 0xb804, 0x9084, 0x00ff, 0x9082, 0x0006, 0x1268,
+	0xa894, 0x90c6, 0x006f, 0x0148, 0x080c, 0xab49, 0x1904, 0x6476,
+	0xb8a0, 0x9084, 0xff80, 0x1904, 0x6476, 0xa894, 0x90c6, 0x006f,
+	0x0158, 0x90c6, 0x005e, 0x0904, 0x63d6, 0x90c6, 0x0064, 0x0904,
+	0x63ff, 0x2008, 0x0804, 0x6398, 0xa998, 0xa8b0, 0x2040, 0x080c,
+	0xab49, 0x1120, 0x9182, 0x007f, 0x0a04, 0x6398, 0x9186, 0x00ff,
+	0x0904, 0x6398, 0x9182, 0x0800, 0x1a04, 0x6398, 0xaaa0, 0xab9c,
+	0x787c, 0x9306, 0x1188, 0x7880, 0x0096, 0x924e, 0x1128, 0x2208,
+	0x2310, 0x009e, 0x0804, 0x6398, 0x99cc, 0xff00, 0x009e, 0x1120,
+	0x2208, 0x2310, 0x0804, 0x6398, 0x080c, 0x49bc, 0x0904, 0x63a2,
+	0x900e, 0x9016, 0x90c6, 0x4000, 0x15e0, 0x0006, 0x080c, 0x6913,
+	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x20a9, 0x0004,
+	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0xb8c4, 0x20e0,
+	0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0fb7, 0x20a9, 0x0004,
+	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8c4, 0x20e0,
+	0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fb7, 0xa8c4, 0xabc8,
+	0x9305, 0xabcc, 0x9305, 0xabd0, 0x9305, 0xabd4, 0x9305, 0xabd8,
+	0x9305, 0xabdc, 0x9305, 0xabe0, 0x9305, 0x9005, 0x0510, 0x000e,
+	0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x00a0, 0x90c6, 0x4008,
+	0x1118, 0x2708, 0x2610, 0x0070, 0x90c6, 0x4009, 0x1108, 0x0050,
+	0x90c6, 0x4006, 0x0138, 0x2001, 0x4005, 0x2009, 0x000a, 0x0010,
+	0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e, 0x2001, 0x0030, 0x900e,
+	0x0478, 0x000e, 0x080c, 0xab89, 0x1130, 0x2001, 0x4005, 0x2009,
+	0x0003, 0x9016, 0x0c78, 0x2b00, 0x6012, 0x080c, 0xcccb, 0x2900,
+	0x6016, 0x6023, 0x0001, 0xa868, 0xd88c, 0x0108, 0xc0f5, 0xa86a,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x31ef, 0x012e, 0x9006, 0x080c,
+	0x655c, 0x2001, 0x0002, 0x080c, 0x6570, 0x2009, 0x0002, 0x080c,
+	0xac7c, 0xa8b0, 0xd094, 0x0118, 0xb8d4, 0xc08d, 0xb8d6, 0x9006,
+	0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x080c, 0x56e9,
+	0x0118, 0x2009, 0x0007, 0x00f8, 0xa998, 0xaeb0, 0x080c, 0x6620,
+	0x1904, 0x6393, 0x9186, 0x007f, 0x0130, 0x080c, 0x6a6a, 0x0118,
+	0x2009, 0x0009, 0x0080, 0x0096, 0x080c, 0x103a, 0x1120, 0x009e,
+	0x2009, 0x0002, 0x0040, 0x2900, 0x009e, 0xa806, 0x080c, 0xca1e,
+	0x19b0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x639a, 0xa998,
+	0xaeb0, 0x080c, 0x6620, 0x1904, 0x6393, 0x0096, 0x080c, 0x103a,
+	0x1128, 0x009e, 0x2009, 0x0002, 0x0804, 0x6453, 0x2900, 0x009e,
+	0xa806, 0x0096, 0x2048, 0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8,
+	0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003,
+	0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xbbc8, 0x9398, 0x0006,
+	0x2398, 0x080c, 0x0fb7, 0x009e, 0xa87b, 0x0000, 0xa883, 0x0000,
+	0xa897, 0x4000, 0xd684, 0x1168, 0x080c, 0x56d5, 0xd0b4, 0x1118,
+	0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c, 0x0118, 0xa89b, 0x000c,
+	0x00b0, 0x080c, 0x6a6a, 0x0118, 0xa89b, 0x0009, 0x0080, 0x080c,
+	0x56e9, 0x0118, 0xa89b, 0x0007, 0x0050, 0x080c, 0xca01, 0x1904,
+	0x63cf, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x639a, 0xa87b,
+	0x0030, 0xa897, 0x4005, 0xa804, 0x8006, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0,
+	0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x1289, 0x080c,
+	0xb103, 0x1904, 0x63cf, 0x2009, 0x0002, 0x08e8, 0x2001, 0x0028,
+	0x900e, 0x0804, 0x63d0, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118,
+	0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010,
+	0x2001, 0x0029, 0x900e, 0x0804, 0x63d0, 0x2001, 0x0029, 0x900e,
+	0x0804, 0x63d0, 0x080c, 0x3796, 0x0804, 0x63d1, 0x080c, 0x540a,
+	0x0804, 0x63d1, 0x080c, 0x4572, 0x0804, 0x63d1, 0x080c, 0x45eb,
+	0x0804, 0x63d1, 0x080c, 0x4647, 0x0804, 0x63d1, 0x080c, 0x4a7f,
+	0x0804, 0x63d1, 0x080c, 0x4d2f, 0x0804, 0x63d1, 0x080c, 0x5075,
+	0x0804, 0x63d1, 0x080c, 0x526e, 0x0804, 0x63d1, 0x080c, 0x39b4,
+	0x0804, 0x63d1, 0x00b6, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082,
+	0x4000, 0x1608, 0x9182, 0x0800, 0x1258, 0x9188, 0x1000, 0x2104,
+	0x905d, 0x0130, 0x080c, 0x6a6a, 0x1138, 0x00d9, 0x9006, 0x00b0,
+	0x2001, 0x0028, 0x900e, 0x0090, 0x9082, 0x0006, 0x1240, 0xb900,
+	0xd1fc, 0x0d98, 0x2001, 0x0029, 0x2009, 0x1000, 0x0038, 0x2001,
+	0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x00be,
+	0x0005, 0xa877, 0x0000, 0xb8d0, 0x9005, 0x1904, 0x6550, 0xb888,
+	0x9005, 0x1904, 0x6550, 0xb838, 0xb93c, 0x9102, 0x1a04, 0x6550,
+	0x2b10, 0x080c, 0xabb6, 0x0904, 0x654c, 0x8108, 0xb93e, 0x6212,
+	0x2900, 0x6016, 0x6023, 0x0003, 0x600b, 0xffff, 0x6007, 0x0040,
+	0xa878, 0x605e, 0xa880, 0x9084, 0x00ff, 0x6066, 0xa883, 0x0000,
+	0xa87c, 0xd0ac, 0x0588, 0xc0dd, 0xa87e, 0xa888, 0x8001, 0x1530,
+	0xa816, 0xa864, 0x9094, 0x00f7, 0x9296, 0x0011, 0x11f8, 0x9084,
+	0x00ff, 0xc0bd, 0x601e, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x2001,
+	0x000f, 0x8001, 0x1df0, 0x2001, 0x8004, 0x6003, 0x0004, 0x6046,
+	0x00f6, 0x2079, 0x0380, 0x7818, 0xd0bc, 0x1de8, 0x7833, 0x0010,
+	0x2c00, 0x7836, 0x781b, 0x8080, 0x00fe, 0x0005, 0x080c, 0x173e,
+	0x601c, 0xc0bd, 0x601e, 0x0c38, 0xd0b4, 0x190c, 0x1c3d, 0x2001,
+	0x8004, 0x6003, 0x0002, 0x0c18, 0x81ff, 0x1110, 0xb88b, 0x0001,
+	0x2908, 0xb8cc, 0xb9ce, 0x9005, 0x1110, 0xb9d2, 0x0020, 0x0096,
+	0x2048, 0xa902, 0x009e, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026,
+	0x2091, 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285,
+	0x0008, 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005,
+	0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04,
+	0x0006, 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c,
+	0x6a66, 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110,
+	0x2011, 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006,
+	0x9086, 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0d7d, 0x000e,
+	0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091,
+	0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168,
+	0xb89c, 0xd0a4, 0x0150, 0x080c, 0x6a62, 0x1138, 0x9284, 0x00ff,
+	0x9086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff,
+	0x8007, 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182,
+	0x0800, 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190,
+	0x1000, 0x2204, 0x905d, 0x1188, 0x0096, 0x080c, 0x103a, 0x2958,
+	0x009e, 0x0168, 0x2b00, 0x2012, 0xb85c, 0xb8ca, 0xb860, 0xb8c6,
+	0x9006, 0xb8a6, 0xb8ae, 0x080c, 0x603e, 0x9006, 0x0010, 0x9085,
+	0x0001, 0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091,
+	0x8000, 0x0026, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458,
+	0x00d6, 0x9190, 0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000,
+	0xb8a4, 0x904d, 0x0110, 0x080c, 0x106c, 0x00d6, 0x00c6, 0xb8bc,
+	0x2060, 0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c,
+	0xc832, 0x0110, 0x080c, 0x0fec, 0x080c, 0xabdf, 0x00ce, 0x0c88,
+	0x00ce, 0x00de, 0x2b48, 0xb8c8, 0xb85e, 0xb8c4, 0xb862, 0x080c,
+	0x107c, 0x00de, 0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005,
+	0x0016, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188,
+	0x1000, 0x2104, 0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6,
+	0x0156, 0x0136, 0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c,
+	0xb802, 0x080c, 0x74c8, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120,
+	0x080c, 0xab49, 0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6,
+	0x2061, 0x1981, 0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a,
+	0x7054, 0x600e, 0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110,
+	0x2001, 0x0001, 0x6886, 0x2069, 0x1800, 0x68b6, 0x7040, 0xb85e,
+	0x7048, 0xb862, 0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276,
+	0xb8c4, 0x20e8, 0xb8c8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004,
+	0x4003, 0x2099, 0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004,
+	0x4003, 0x2069, 0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144,
+	0xb96e, 0x7048, 0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817,
+	0x0000, 0xb8a0, 0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182,
+	0x0211, 0x1218, 0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218,
+	0x2009, 0x0007, 0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006,
+	0x00a0, 0x9182, 0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182,
+	0x0421, 0x1218, 0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218,
+	0x2009, 0x0003, 0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e,
+	0x015e, 0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260,
+	0x7034, 0xb896, 0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbd4,
+	0xc384, 0xba00, 0x2009, 0x1867, 0x210c, 0xd0bc, 0x0120, 0xd1ec,
+	0x0110, 0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138,
+	0xc2bd, 0xd0cc, 0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc,
+	0xba02, 0xbbd6, 0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096,
+	0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff,
+	0x15c0, 0xaa04, 0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6,
+	0x01d6, 0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084,
+	0xffc0, 0x9080, 0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001,
+	0x4002, 0x9086, 0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0d7d,
+	0x3c00, 0x20e8, 0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06,
+	0x01de, 0x01ce, 0x014e, 0x013e, 0x0060, 0x080c, 0x103a, 0x0170,
+	0x2900, 0xb8a6, 0xa803, 0x0000, 0x080c, 0x68af, 0xa807, 0x0001,
+	0xae12, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8,
+	0x0126, 0x2091, 0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800,
+	0x9005, 0x1150, 0x080c, 0x68be, 0x1158, 0xa804, 0x908a, 0x0002,
+	0x0218, 0x8001, 0xa806, 0x0020, 0x080c, 0x106c, 0xb8a7, 0x0000,
+	0x009e, 0x012e, 0x0005, 0x0096, 0x00c6, 0xb888, 0x9005, 0x1904,
+	0x67a4, 0xb8d0, 0x904d, 0x0904, 0x67a4, 0x080c, 0xabb6, 0x0904,
+	0x67a0, 0x8210, 0xba3e, 0xa800, 0xb8d2, 0x9005, 0x1108, 0xb8ce,
+	0x2b00, 0x6012, 0x2900, 0x6016, 0x6023, 0x0003, 0x600b, 0xffff,
+	0x6007, 0x0040, 0xa878, 0x605e, 0xa880, 0x9084, 0x00ff, 0x6066,
+	0xa883, 0x0000, 0xa87c, 0xd0ac, 0x01c8, 0xc0dd, 0xa87e, 0xa888,
+	0x8001, 0x1568, 0xa816, 0xa864, 0x9094, 0x00f7, 0x9296, 0x0011,
+	0x1530, 0x9084, 0x00ff, 0xc0bd, 0x601e, 0xa8ac, 0xaab0, 0xa836,
+	0xaa3a, 0x2001, 0x8004, 0x6003, 0x0004, 0x0030, 0x080c, 0x1c3d,
+	0x2001, 0x8004, 0x6003, 0x0002, 0x6046, 0x2001, 0x0010, 0x2c08,
+	0x080c, 0xa879, 0xb838, 0xba3c, 0x9202, 0x0a04, 0x6751, 0x0020,
+	0x82ff, 0x1110, 0xb88b, 0x0001, 0x00ce, 0x009e, 0x0005, 0x080c,
+	0x173e, 0x601c, 0xc0bd, 0x601e, 0x08e0, 0x00b6, 0x0096, 0x0016,
+	0x20a9, 0x0800, 0x900e, 0x0016, 0x080c, 0x6620, 0x1158, 0xb8d0,
+	0x904d, 0x0140, 0x3e00, 0x9086, 0x0002, 0x1118, 0xb800, 0xd0bc,
+	0x1108, 0x0041, 0x001e, 0x8108, 0x1f04, 0x67b3, 0x001e, 0x00be,
+	0x009e, 0x0005, 0x0096, 0x0016, 0xb8d0, 0x904d, 0x0188, 0xa800,
+	0xb8d2, 0x9005, 0x1108, 0xb8ce, 0x9006, 0xa802, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x080c, 0xcb35, 0x080c, 0x6d7b, 0x0c60,
+	0x001e, 0x009e, 0x0005, 0x0086, 0x9046, 0xb8d0, 0x904d, 0x01b0,
+	0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0128, 0x2940, 0xa800,
+	0x904d, 0x0160, 0x0ca8, 0xa800, 0x88ff, 0x1128, 0xb8d2, 0x9005,
+	0x1118, 0xb8ce, 0x0008, 0xa002, 0xa803, 0x0000, 0x008e, 0x0005,
+	0x901e, 0x0010, 0x2019, 0x0001, 0x0126, 0x2091, 0x8000, 0x00e6,
+	0x0096, 0x00c6, 0x0086, 0x0026, 0x2071, 0x19e6, 0x9046, 0x7028,
+	0x9065, 0x01e8, 0x6014, 0x2068, 0x83ff, 0x0120, 0x605c, 0x9606,
+	0x0158, 0x0030, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0120,
+	0x2c40, 0x600c, 0x2060, 0x0c60, 0x600c, 0x0006, 0x0066, 0x2830,
+	0x080c, 0x9f84, 0x006e, 0x000e, 0x83ff, 0x0508, 0x0c08, 0x9046,
+	0xb8d0, 0x904d, 0x01e0, 0x83ff, 0x0120, 0xa878, 0x9606, 0x0158,
+	0x0030, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0120, 0x2940,
+	0xa800, 0x2048, 0x0c70, 0xb8d0, 0xaa00, 0x0026, 0x9906, 0x1110,
+	0xbad2, 0x0008, 0xa202, 0x000e, 0x83ff, 0x0108, 0x0c10, 0x002e,
+	0x008e, 0x00ce, 0x009e, 0x00ee, 0x012e, 0x0005, 0x9016, 0x0489,
+	0x1110, 0x2011, 0x0001, 0x0005, 0x080c, 0x6913, 0x0128, 0x080c,
+	0xc8f3, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6913, 0x0128,
+	0x080c, 0xc894, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6913,
+	0x0128, 0x080c, 0xc8f0, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c,
+	0x6913, 0x0128, 0x080c, 0xc8b3, 0x0010, 0x9085, 0x0001, 0x0005,
+	0x080c, 0x6913, 0x0128, 0x080c, 0xc934, 0x0010, 0x9085, 0x0001,
+	0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085, 0x0001, 0x0005, 0x0136,
 	0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e, 0x810f, 0x9184,
 	0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004, 0x2098, 0x20a9,
 	0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128, 0x8109, 0x1dd8,
-	0x9085, 0x0001, 0x0068, 0x0146, 0x01d6, 0x3300, 0x8001, 0x20a0,
-	0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004, 0x01de, 0x014e, 0x9006,
-	0x01ce, 0x013e, 0x0005, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4,
-	0x904d, 0x1128, 0x080c, 0x103a, 0x0168, 0x2900, 0xb8a6, 0x080c,
-	0x68b0, 0xa803, 0x0001, 0xa807, 0x0000, 0x9085, 0x0001, 0x012e,
-	0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126, 0x2091, 0x8000,
-	0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c, 0x106c, 0x9085,
-	0x0001, 0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4, 0x0005, 0x00b6,
-	0x00f6, 0x080c, 0x74e9, 0x01b0, 0x71c4, 0x81ff, 0x1198, 0x71dc,
-	0xd19c, 0x0180, 0x2001, 0x007e, 0x9080, 0x1000, 0x2004, 0x905d,
-	0x0148, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1118, 0xb800,
-	0xc0ed, 0xb802, 0x2079, 0x1847, 0x7804, 0xd0a4, 0x01d0, 0x0156,
-	0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6625, 0x1168, 0xb804,
-	0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118, 0x9086, 0x0006,
-	0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108, 0x1f04, 0x693b,
-	0x015e, 0x080c, 0x6a29, 0x0120, 0x2001, 0x1985, 0x200c, 0x0038,
-	0x2079, 0x1847, 0x7804, 0xd0a4, 0x0130, 0x2009, 0x07d0, 0x2011,
-	0x6966, 0x080c, 0x8708, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x2011,
-	0x6966, 0x080c, 0x863e, 0x080c, 0x6a29, 0x01d8, 0x2001, 0x107e,
-	0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c, 0x6a67, 0x0130,
-	0x2009, 0x07d0, 0x2011, 0x6966, 0x080c, 0x8708, 0x00e6, 0x2071,
-	0x1800, 0x9006, 0x707e, 0x7060, 0x7082, 0x080c, 0x2fb2, 0x00ee,
-	0x04d0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c,
-	0x6625, 0x1558, 0xb800, 0xd0ec, 0x0540, 0x0046, 0xbaa0, 0x2220,
-	0x9006, 0x2009, 0x0029, 0x080c, 0xe2c9, 0xb800, 0xc0e5, 0xc0ec,
-	0xb802, 0x080c, 0x6a63, 0x2001, 0x0707, 0x1128, 0xb804, 0x9084,
-	0x00ff, 0x9085, 0x0700, 0xb806, 0x080c, 0xa896, 0x2019, 0x0029,
-	0x080c, 0x93a5, 0x0076, 0x903e, 0x080c, 0x9277, 0x900e, 0x080c,
-	0xdfeb, 0x007e, 0x004e, 0x080c, 0xa8b2, 0x001e, 0x8108, 0x1f04,
-	0x698e, 0x00ce, 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010, 0x2058,
-	0xb800, 0xc0ec, 0xb802, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x0096,
-	0x080c, 0x1053, 0x090c, 0x0d7d, 0x2958, 0x009e, 0x2001, 0x196b,
-	0x2b02, 0x8b07, 0x8006, 0x8006, 0x908c, 0x003f, 0xb9c6, 0x908c,
-	0xffc0, 0xb9ca, 0xb8af, 0x0000, 0x2009, 0x00ff, 0x080c, 0x6043,
-	0xb807, 0x0006, 0xb813, 0x00ff, 0xb817, 0xffff, 0xb86f, 0x0200,
-	0xb86c, 0xb893, 0x0002, 0xb8bb, 0x0520, 0xb8a3, 0x00ff, 0xb8af,
-	0x0000, 0x00ce, 0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800,
-	0x00be, 0xd0bc, 0x0005, 0x0006, 0x0016, 0x0026, 0xb804, 0x908c,
-	0x00ff, 0x9196, 0x0006, 0x0188, 0x9196, 0x0004, 0x0170, 0x9196,
-	0x0005, 0x0158, 0x908c, 0xff00, 0x810f, 0x9196, 0x0006, 0x0128,
-	0x9196, 0x0004, 0x0110, 0x9196, 0x0005, 0x002e, 0x001e, 0x000e,
-	0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110,
-	0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091,
-	0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c,
-	0x0d7d, 0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc,
-	0xba02, 0x002e, 0x012e, 0x0005, 0x2011, 0x1837, 0x2204, 0xd0cc,
-	0x0138, 0x2001, 0x1983, 0x200c, 0x2011, 0x6a59, 0x080c, 0x8708,
-	0x0005, 0x2011, 0x6a59, 0x080c, 0x863e, 0x2011, 0x1837, 0x2204,
-	0xc0cc, 0x2012, 0x0005, 0x080c, 0x56da, 0xd0ac, 0x0005, 0x080c,
-	0x56da, 0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e,
-	0x0006, 0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007,
-	0x908e, 0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xcf52,
-	0x0158, 0x70dc, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004,
-	0x905d, 0x0110, 0xb8d4, 0xd094, 0x00fe, 0x00be, 0x0005, 0x2071,
-	0x1910, 0x7003, 0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016,
-	0x701a, 0x701e, 0x700a, 0x7046, 0x2001, 0x1947, 0x2003, 0x0000,
-	0x0005, 0x0016, 0x00e6, 0x2071, 0x1948, 0x900e, 0x710a, 0x080c,
-	0x56da, 0xd0fc, 0x1140, 0x080c, 0x56da, 0x900e, 0xd09c, 0x0108,
-	0x8108, 0x7102, 0x00f8, 0x2001, 0x1867, 0x200c, 0x9184, 0x0007,
-	0x0002, 0x6aab, 0x6aab, 0x6aab, 0x6aab, 0x6aab, 0x6ac1, 0x6acf,
-	0x6aab, 0x7003, 0x0003, 0x2009, 0x1868, 0x210c, 0x9184, 0xff00,
-	0x8007, 0x9005, 0x1110, 0x2001, 0x0002, 0x7006, 0x0018, 0x7003,
-	0x0005, 0x0c88, 0x00ee, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0050,
-	0x684c, 0x9005, 0x1150, 0x00e6, 0x2071, 0x1910, 0x7028, 0xc085,
-	0x702a, 0x00ee, 0x9085, 0x0001, 0x0488, 0x6844, 0x9005, 0x0158,
-	0x080c, 0x785f, 0x6a60, 0x9200, 0x7002, 0x6864, 0x9101, 0x7006,
-	0x9006, 0x7012, 0x7016, 0x6860, 0x7002, 0x6864, 0x7006, 0x6868,
-	0x700a, 0x686c, 0x700e, 0x6844, 0x9005, 0x1110, 0x7012, 0x7016,
-	0x684c, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x7037, 0x0019,
-	0x702b, 0x0001, 0x00e6, 0x2071, 0x1910, 0x7028, 0xc084, 0x702a,
-	0x7007, 0x0001, 0x700b, 0x0000, 0x00ee, 0x9006, 0x00ee, 0x0005,
-	0x00e6, 0x0026, 0x2071, 0x1948, 0x7000, 0x9015, 0x0904, 0x6d85,
-	0x9286, 0x0003, 0x0904, 0x6c15, 0x9286, 0x0005, 0x0904, 0x6c15,
-	0x2071, 0x1877, 0xa87c, 0x9005, 0x0904, 0x6b76, 0x7140, 0xa868,
-	0x9102, 0x0a04, 0x6d85, 0xa878, 0xd084, 0x15d8, 0xa853, 0x0019,
-	0x2001, 0x8023, 0xa84e, 0x2071, 0x1910, 0x701c, 0x9005, 0x1904,
-	0x6f28, 0x0e04, 0x6f96, 0x2071, 0x0000, 0xa850, 0x7032, 0xa84c,
-	0x7082, 0xa870, 0x7086, 0xa86c, 0x708a, 0xa880, 0x708e, 0x7036,
-	0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1,
-	0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021,
-	0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x0804,
-	0x6bf8, 0xa853, 0x001b, 0x2001, 0x8027, 0x0820, 0x7004, 0xd08c,
-	0x1904, 0x6d85, 0xa853, 0x001a, 0x2001, 0x8024, 0x0804, 0x6b3a,
-	0x00e6, 0x0026, 0x2071, 0x1948, 0x7000, 0x9015, 0x0904, 0x6d85,
-	0x9286, 0x0003, 0x0904, 0x6c15, 0x9286, 0x0005, 0x0904, 0x6c15,
-	0xa84f, 0x8022, 0xa853, 0x0018, 0x0804, 0x6bdd, 0xa868, 0xd0fc,
-	0x11d8, 0x00e6, 0x0026, 0x2001, 0x1948, 0x2004, 0x9005, 0x0904,
-	0x6d85, 0xa87c, 0xd0bc, 0x1904, 0x6d85, 0xa978, 0xa874, 0x9105,
-	0x1904, 0x6d85, 0x2001, 0x1948, 0x2004, 0x0002, 0x6d85, 0x6bd9,
-	0x6c15, 0x6c15, 0x6d85, 0x6c15, 0x0005, 0xa868, 0xd0fc, 0x1500,
-	0x00e6, 0x0026, 0x2009, 0x1948, 0x210c, 0x81ff, 0x0904, 0x6d85,
-	0xa87c, 0xd0cc, 0x0904, 0x6d85, 0xa880, 0x9084, 0x00ff, 0x9086,
-	0x0001, 0x1904, 0x6d85, 0x9186, 0x0003, 0x0904, 0x6c15, 0x9186,
-	0x0005, 0x0904, 0x6c15, 0xa84f, 0x8021, 0xa853, 0x0017, 0x0028,
-	0x0005, 0xa84f, 0x8020, 0xa853, 0x0016, 0x2071, 0x1910, 0x701c,
-	0x9005, 0x1904, 0x6f28, 0x0e04, 0x6f96, 0x2071, 0x0000, 0xa84c,
-	0x7082, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6,
-	0x2071, 0x1800, 0x2011, 0x0001, 0xa804, 0x900d, 0x702c, 0x1158,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8553,
-	0x002e, 0x00ee, 0x0005, 0x0096, 0x2148, 0xa904, 0xa802, 0x8210,
-	0x2900, 0x81ff, 0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6,
-	0x2079, 0x0050, 0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005,
-	0x1904, 0x6d0a, 0x782c, 0x908c, 0x0780, 0x190c, 0x70e2, 0x8004,
-	0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x6c33, 0x6d0a, 0x6c58,
-	0x6ca5, 0x080c, 0x0d7d, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804,
-	0x900d, 0x1170, 0x2071, 0x1a03, 0x703c, 0x9005, 0x1328, 0x2001,
-	0x1949, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8553, 0x0c10,
-	0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x15a8, 0x7824,
-	0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, 0x1830,
-	0x210c, 0x918a, 0x0020, 0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c,
-	0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8553, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x70e2, 0xd0a4, 0x19c8, 0x2071, 0x1a03,
-	0x703c, 0x9005, 0x1328, 0x2001, 0x1949, 0x2004, 0x8005, 0x703e,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904,
-	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200,
-	0x70c2, 0x080c, 0x8553, 0x0804, 0x6c5f, 0x0096, 0x00e6, 0x7824,
-	0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
-	0x8000, 0x70c2, 0x080c, 0x8553, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x70e2, 0xd0a4, 0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x70e2, 0xd09c, 0x11a0, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d,
-	0x1560, 0x2071, 0x1a03, 0x703c, 0x9005, 0x1328, 0x2001, 0x1949,
-	0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e,
-	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
-	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1170, 0x2071,
-	0x1a03, 0x703c, 0x9005, 0x1328, 0x2001, 0x1949, 0x2004, 0x8005,
-	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016,
+	0x9085, 0x0001, 0x0008, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0146,
+	0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0004, 0x20a0, 0x20a9,
+	0x0010, 0x2009, 0xffff, 0x4104, 0x01de, 0x014e, 0x0136, 0x01c6,
+	0xa800, 0x9005, 0x11b8, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f,
+	0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004, 0x2098, 0x20a9, 0x0001,
+	0x2009, 0x0010, 0x4002, 0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085,
+	0x0001, 0x0068, 0x0146, 0x01d6, 0x3300, 0x8001, 0x20a0, 0x3c00,
+	0x20e8, 0x2001, 0xffff, 0x4004, 0x01de, 0x014e, 0x9006, 0x01ce,
+	0x013e, 0x0005, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d,
+	0x1128, 0x080c, 0x103a, 0x0168, 0x2900, 0xb8a6, 0x080c, 0x68af,
+	0xa803, 0x0001, 0xa807, 0x0000, 0x9085, 0x0001, 0x012e, 0x009e,
+	0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4,
+	0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c, 0x106c, 0x9085, 0x0001,
+	0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4, 0x0005, 0x00b6, 0x00f6,
+	0x080c, 0x74c8, 0x01b0, 0x71c4, 0x81ff, 0x1198, 0x71dc, 0xd19c,
+	0x0180, 0x2001, 0x007e, 0x9080, 0x1000, 0x2004, 0x905d, 0x0148,
+	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed,
+	0xb802, 0x2079, 0x1847, 0x7804, 0xd0a4, 0x01d0, 0x0156, 0x20a9,
+	0x007f, 0x900e, 0x0016, 0x080c, 0x6620, 0x1168, 0xb804, 0x9084,
+	0xff00, 0x8007, 0x9096, 0x0004, 0x0118, 0x9086, 0x0006, 0x1118,
+	0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108, 0x1f04, 0x693a, 0x015e,
+	0x080c, 0x6a28, 0x0120, 0x2001, 0x1984, 0x200c, 0x0038, 0x2079,
+	0x1847, 0x7804, 0xd0a4, 0x0130, 0x2009, 0x07d0, 0x2011, 0x6965,
+	0x080c, 0x86e7, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x2011, 0x6965,
+	0x080c, 0x861d, 0x080c, 0x6a28, 0x01d8, 0x2001, 0x107e, 0x2004,
+	0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c, 0x6a66, 0x0130, 0x2009,
+	0x07d0, 0x2011, 0x6965, 0x080c, 0x86e7, 0x00e6, 0x2071, 0x1800,
+	0x9006, 0x707e, 0x7060, 0x7082, 0x080c, 0x2fc0, 0x00ee, 0x04d0,
+	0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6620,
+	0x1558, 0xb800, 0xd0ec, 0x0540, 0x0046, 0xbaa0, 0x2220, 0x9006,
+	0x2009, 0x0029, 0x080c, 0xe2d9, 0xb800, 0xc0e5, 0xc0ec, 0xb802,
+	0x080c, 0x6a62, 0x2001, 0x0707, 0x1128, 0xb804, 0x9084, 0x00ff,
+	0x9085, 0x0700, 0xb806, 0x080c, 0xa888, 0x2019, 0x0029, 0x080c,
+	0x938d, 0x0076, 0x903e, 0x080c, 0x9256, 0x900e, 0x080c, 0xdffb,
+	0x007e, 0x004e, 0x080c, 0xa8a4, 0x001e, 0x8108, 0x1f04, 0x698d,
+	0x00ce, 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010, 0x2058, 0xb800,
+	0xc0ec, 0xb802, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x0096, 0x080c,
+	0x1053, 0x090c, 0x0d7d, 0x2958, 0x009e, 0x2001, 0x196a, 0x2b02,
+	0x8b07, 0x8006, 0x8006, 0x908c, 0x003f, 0xb9c6, 0x908c, 0xffc0,
+	0xb9ca, 0xb8af, 0x0000, 0x2009, 0x00ff, 0x080c, 0x603e, 0xb807,
+	0x0006, 0xb813, 0x00ff, 0xb817, 0xffff, 0xb86f, 0x0200, 0xb86c,
+	0xb893, 0x0002, 0xb8bb, 0x0520, 0xb8a3, 0x00ff, 0xb8af, 0x0000,
+	0x00ce, 0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be,
+	0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be,
+	0xd0bc, 0x0005, 0x0006, 0x0016, 0x0026, 0xb804, 0x908c, 0x00ff,
+	0x9196, 0x0006, 0x0188, 0x9196, 0x0004, 0x0170, 0x9196, 0x0005,
+	0x0158, 0x908c, 0xff00, 0x810f, 0x9196, 0x0006, 0x0128, 0x9196,
+	0x0004, 0x0110, 0x9196, 0x0005, 0x002e, 0x001e, 0x000e, 0x0005,
+	0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110, 0xb800,
+	0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091, 0x8000,
+	0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c, 0x0d7d,
+	0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, 0xba02,
+	0x002e, 0x012e, 0x0005, 0x2011, 0x1837, 0x2204, 0xd0cc, 0x0138,
+	0x2001, 0x1982, 0x200c, 0x2011, 0x6a58, 0x080c, 0x86e7, 0x0005,
+	0x2011, 0x6a58, 0x080c, 0x861d, 0x2011, 0x1837, 0x2204, 0xc0cc,
+	0x2012, 0x0005, 0x080c, 0x56d5, 0xd0ac, 0x0005, 0x080c, 0x56d5,
+	0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e, 0x0006,
+	0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007, 0x908e,
+	0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xcf51, 0x0158,
+	0x70dc, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004, 0x905d,
+	0x0110, 0xb8d4, 0xd094, 0x00fe, 0x00be, 0x0005, 0x2071, 0x1910,
+	0x7003, 0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016, 0x701a,
+	0x701e, 0x700a, 0x7046, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1947,
+	0x900e, 0x710a, 0x080c, 0x56d5, 0xd0fc, 0x1140, 0x080c, 0x56d5,
+	0x900e, 0xd09c, 0x0108, 0x8108, 0x7102, 0x00f8, 0x2001, 0x1867,
+	0x200c, 0x9184, 0x0007, 0x0002, 0x6aa6, 0x6aa6, 0x6aa6, 0x6aa6,
+	0x6aa6, 0x6abc, 0x6aca, 0x6aa6, 0x7003, 0x0003, 0x2009, 0x1868,
+	0x210c, 0x9184, 0xff00, 0x8007, 0x9005, 0x1110, 0x2001, 0x0002,
+	0x7006, 0x0018, 0x7003, 0x0005, 0x0c88, 0x00ee, 0x001e, 0x0005,
+	0x00e6, 0x2071, 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6, 0x2071,
+	0x1910, 0x7028, 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001, 0x0488,
+	0x6844, 0x9005, 0x0158, 0x080c, 0x783e, 0x6a60, 0x9200, 0x7002,
+	0x6864, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6860, 0x7002,
+	0x6864, 0x7006, 0x6868, 0x700a, 0x686c, 0x700e, 0x6844, 0x9005,
+	0x1110, 0x7012, 0x7016, 0x684c, 0x701a, 0x701c, 0x9085, 0x0040,
+	0x701e, 0x7037, 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071, 0x1910,
+	0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700b, 0x0000, 0x00ee,
+	0x9006, 0x00ee, 0x0005, 0x00e6, 0x0026, 0x2071, 0x1947, 0x7000,
+	0x9015, 0x0904, 0x6d80, 0x9286, 0x0003, 0x0904, 0x6c10, 0x9286,
+	0x0005, 0x0904, 0x6c10, 0x2071, 0x1877, 0xa87c, 0x9005, 0x0904,
+	0x6b71, 0x7140, 0xa868, 0x9102, 0x0a04, 0x6d80, 0xa878, 0xd084,
+	0x15d8, 0xa853, 0x0019, 0x2001, 0x8023, 0xa84e, 0x2071, 0x1910,
+	0x701c, 0x9005, 0x1904, 0x6f17, 0x0e04, 0x6f85, 0x2071, 0x0000,
+	0xa850, 0x7032, 0xa84c, 0x7082, 0xa870, 0x7086, 0xa86c, 0x708a,
+	0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156,
+	0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0,
+	0xa85c, 0x9080, 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, 0x013e,
+	0x01de, 0x014e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x11e1, 0x0804, 0x6bf3, 0xa853, 0x001b, 0x2001, 0x8027,
+	0x0820, 0x7004, 0xd08c, 0x1904, 0x6d80, 0xa853, 0x001a, 0x2001,
+	0x8024, 0x0804, 0x6b35, 0x00e6, 0x0026, 0x2071, 0x1947, 0x7000,
+	0x9015, 0x0904, 0x6d80, 0x9286, 0x0003, 0x0904, 0x6c10, 0x9286,
+	0x0005, 0x0904, 0x6c10, 0xa84f, 0x8022, 0xa853, 0x0018, 0x0804,
+	0x6bd8, 0xa868, 0xd0fc, 0x11d8, 0x00e6, 0x0026, 0x2001, 0x1947,
+	0x2004, 0x9005, 0x0904, 0x6d80, 0xa87c, 0xd0bc, 0x1904, 0x6d80,
+	0xa978, 0xa874, 0x9105, 0x1904, 0x6d80, 0x2001, 0x1947, 0x2004,
+	0x0002, 0x6d80, 0x6bd4, 0x6c10, 0x6c10, 0x6d80, 0x6c10, 0x0005,
+	0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026, 0x2009, 0x1947, 0x210c,
+	0x81ff, 0x0904, 0x6d80, 0xa87c, 0xd0cc, 0x0904, 0x6d80, 0xa880,
+	0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x6d80, 0x9186, 0x0003,
+	0x0904, 0x6c10, 0x9186, 0x0005, 0x0904, 0x6c10, 0xa84f, 0x8021,
+	0xa853, 0x0017, 0x0028, 0x0005, 0xa84f, 0x8020, 0xa853, 0x0016,
+	0x2071, 0x1910, 0x701c, 0x9005, 0x1904, 0x6f17, 0x0e04, 0x6f85,
+	0x2071, 0x0000, 0xa84c, 0x7082, 0xa850, 0x7032, 0xa86c, 0x7086,
+	0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x190c, 0x11e1, 0x2071, 0x1800, 0x2011, 0x0001, 0xa804,
+	0x900d, 0x702c, 0x1158, 0xa802, 0x2900, 0x702e, 0x70c0, 0x9200,
+	0x70c2, 0x080c, 0x8532, 0x002e, 0x00ee, 0x0005, 0x0096, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x009e, 0x0c58,
+	0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071, 0x1910, 0xa803,
+	0x0000, 0x7010, 0x9005, 0x1904, 0x6d05, 0x782c, 0x908c, 0x0780,
+	0x190c, 0x70d1, 0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002,
+	0x6c2e, 0x6d05, 0x6c53, 0x6ca0, 0x080c, 0x0d7d, 0x2071, 0x1800,
+	0x2900, 0x7822, 0xa804, 0x900d, 0x1170, 0x2071, 0x1a02, 0x703c,
+	0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
+	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2,
+	0x080c, 0x8532, 0x0c10, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804,
+	0x900d, 0x15a8, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c,
+	0x1170, 0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0240, 0x7022,
+	0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee,
+	0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2,
+	0x080c, 0x8532, 0x782c, 0x9094, 0x0780, 0x190c, 0x70d1, 0xd0a4,
+	0x19c8, 0x2071, 0x1a02, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948,
+	0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016,
 	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8553, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
-	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
-	0x1904, 0x6d5f, 0x782c, 0x9094, 0x0780, 0x190c, 0x70e2, 0xd09c,
-	0x1198, 0x701c, 0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108,
-	0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x70e2, 0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x70e2, 0xd0a4, 0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
-	0x8553, 0x782c, 0x9094, 0x0780, 0x190c, 0x70e2, 0xd0a4, 0x1d60,
-	0x00ee, 0x2071, 0x1a03, 0x703c, 0x9005, 0x1328, 0x2001, 0x1949,
-	0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6,
+	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8532, 0x0804, 0x6c5a,
+	0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802,
+	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8532, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x70d1, 0xd0a4, 0x1d60, 0x00ee, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x70d1, 0xd09c, 0x11a0, 0x009e, 0x2900,
+	0x7822, 0xa804, 0x900d, 0x1560, 0x2071, 0x1a02, 0x703c, 0x9005,
+	0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
+	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
+	0x900d, 0x1170, 0x2071, 0x1a02, 0x703c, 0x9005, 0x1328, 0x2001,
+	0x1948, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005,
 	0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
 	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c,
-	0x8553, 0x00ee, 0x0804, 0x6d1a, 0xa868, 0xd0fc, 0x1560, 0x0096,
-	0xa804, 0xa807, 0x0000, 0x904d, 0x190c, 0x0fec, 0x009e, 0x0018,
-	0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6,
-	0x2079, 0x0050, 0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005,
-	0x1904, 0x6ea2, 0x782c, 0x908c, 0x0780, 0x190c, 0x70e2, 0x8004,
-	0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x6da4, 0x6ea2, 0x6dbf,
-	0x6e31, 0x080c, 0x0d7d, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822,
-	0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016,
-	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8553, 0x0c60, 0x2071,
-	0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1904, 0x6e20, 0x7830,
-	0xd0dc, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7824, 0x00e6,
-	0x2071, 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, 0x1830, 0x210c,
-	0x918a, 0x0020, 0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108,
-	0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900,
-	0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8553, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x70e2, 0xd0a4, 0x19c8, 0x0e04, 0x6e17, 0x7838,
-	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
-	0x0013, 0x00de, 0x2001, 0x1921, 0x200c, 0xc184, 0x2102, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x2009,
-	0x1947, 0x200b, 0x0000, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2001,
-	0x1921, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8553, 0x0804,
-	0x6dce, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8553,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x70e2, 0xd0a4, 0x1d60, 0x00ee,
-	0x0e04, 0x6e75, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
-	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084, 0x7046,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6,
-	0x2009, 0x1947, 0x200b, 0x0000, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x70e2, 0xd09c, 0x1170, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d,
-	0x11e0, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046,
-	0x0c58, 0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
-	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
-	0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016,
-	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8553, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
-	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
-	0x1904, 0x6f13, 0x782c, 0x9094, 0x0780, 0x190c, 0x70e2, 0xd09c,
-	0x11b0, 0x701c, 0x904d, 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010,
+	0x8532, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000,
+	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
+	0x2148, 0xa804, 0x900d, 0x1904, 0x6d5a, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x70d1, 0xd09c, 0x1198, 0x701c, 0x904d, 0x0180, 0x7010,
 	0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x70e2, 0xd09c, 0x0d50, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x70e2, 0xd0a4, 0x05c8, 0x00e6, 0x7824,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x70d1, 0xd09c, 0x0d68, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x70d1, 0xd0a4, 0x01b0, 0x00e6, 0x7824,
 	0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
-	0x8000, 0x70c2, 0x080c, 0x8553, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x70e2, 0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x6f0c, 0x7838, 0x7938,
-	0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013,
-	0x00de, 0x7044, 0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11d6, 0x2009, 0x1947, 0x200b, 0x0000,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70c0, 0x9200, 0x70c2, 0x080c, 0x8553, 0x00ee, 0x0804, 0x6eb2,
-	0x2071, 0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012,
-	0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148,
-	0xa804, 0x900d, 0x1128, 0x1e04, 0x6f53, 0x002e, 0x00ee, 0x0005,
+	0x8000, 0x70c2, 0x080c, 0x8532, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x70d1, 0xd0a4, 0x1d60, 0x00ee, 0x2071, 0x1a02, 0x703c, 0x9005,
+	0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
+	0x9200, 0x70c2, 0x080c, 0x8532, 0x00ee, 0x0804, 0x6d15, 0xa868,
+	0xd0fc, 0x1560, 0x0096, 0xa804, 0xa807, 0x0000, 0x904d, 0x190c,
+	0x0fec, 0x009e, 0x0018, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026,
+	0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071, 0x1910, 0xa803,
+	0x0000, 0x7010, 0x9005, 0x1904, 0x6e95, 0x782c, 0x908c, 0x0780,
+	0x190c, 0x70d1, 0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002,
+	0x6d9f, 0x6e95, 0x6dba, 0x6e28, 0x080c, 0x0d7d, 0x0005, 0x2071,
+	0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
+	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c,
+	0x8532, 0x0c60, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d,
+	0x1904, 0x6e17, 0x7830, 0xd0dc, 0x1120, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1170,
+	0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0240, 0x7022, 0x2001,
+	0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048,
+	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
+	0x8532, 0x782c, 0x9094, 0x0780, 0x190c, 0x70d1, 0xd0a4, 0x19c8,
+	0x0e04, 0x6e0e, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
+	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2001, 0x1921, 0x200c,
+	0xc184, 0x2102, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x11e1, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2001, 0x1921,
+	0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016,
+	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
+	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8532, 0x0804, 0x6dc9,
+	0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802,
+	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8532, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x70d1, 0xd0a4, 0x1d60, 0x00ee, 0x0e04,
+	0x6e68, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000,
+	0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e1, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x70d1, 0xd09c, 0x1170, 0x009e, 0x2900,
+	0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x7044, 0xc085, 0x7046, 0x0c58, 0x009e, 0x2908, 0x7010, 0x8000,
+	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
+	0x2148, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005,
 	0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
 	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c,
-	0x8553, 0x0e04, 0x6f3d, 0x2071, 0x1910, 0x701c, 0x2048, 0xa84c,
-	0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c,
+	0x8532, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000,
+	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
+	0x2148, 0xa804, 0x900d, 0x1904, 0x6f02, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x70d1, 0xd09c, 0x11b0, 0x701c, 0x904d, 0x0198, 0xa84c,
+	0x9005, 0x1180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800,
+	0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x70d1,
+	0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780, 0x190c, 0x70d1, 0xd0a4,
+	0x05a8, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802,
+	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8532, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x70d1, 0xd0a4, 0x1d60, 0x00ee, 0x0e04,
+	0x6efb, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000,
+	0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e1, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
+	0x9200, 0x70c2, 0x080c, 0x8532, 0x00ee, 0x0804, 0x6ea5, 0x2071,
+	0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
+	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
+	0x900d, 0x1128, 0x1e04, 0x6f42, 0x002e, 0x00ee, 0x0005, 0x2071,
+	0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
+	0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8532,
+	0x0e04, 0x6f2c, 0x2071, 0x1910, 0x701c, 0x2048, 0xa84c, 0x900d,
+	0x0d18, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086,
+	0x7036, 0xa870, 0x708a, 0xa850, 0x9082, 0x0019, 0x1278, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e1, 0x2071,
+	0x1910, 0x080c, 0x70bd, 0x002e, 0x00ee, 0x0005, 0xa850, 0x9082,
+	0x001c, 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136,
+	0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8,
+	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003, 0x015e,
+	0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2071, 0x1910, 0xa803,
+	0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
+	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1118,
+	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
+	0x9200, 0x70c2, 0x080c, 0x8532, 0x002e, 0x00ee, 0x0005, 0x0006,
+	0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e, 0x9084,
+	0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071, 0x1910,
+	0x7004, 0x0002, 0x6fd0, 0x6fd1, 0x70bc, 0x6fd1, 0x0d7d, 0x70bc,
+	0x0005, 0x2001, 0x1947, 0x2004, 0x0002, 0x6fdb, 0x6fdb, 0x7055,
+	0x7056, 0x6fdb, 0x7056, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x70dc,
+	0x701c, 0x904d, 0x0508, 0xa84c, 0x9005, 0x0904, 0x7026, 0x0e04,
+	0x7004, 0xa94c, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c,
 	0x7086, 0x7036, 0xa870, 0x708a, 0xa850, 0x9082, 0x0019, 0x1278,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6,
-	0x2071, 0x1910, 0x080c, 0x70ce, 0x002e, 0x00ee, 0x0005, 0xa850,
+	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e1,
+	0x2071, 0x1910, 0x080c, 0x70bd, 0x012e, 0x0804, 0x7054, 0xa850,
 	0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6,
 	0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868,
 	0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003,
-	0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2071, 0x1910,
-	0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
-	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
-	0x1118, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70c0, 0x9200, 0x70c2, 0x080c, 0x8553, 0x002e, 0x00ee, 0x0005,
-	0x0006, 0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860,
-	0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e,
-	0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071,
-	0x1910, 0x7004, 0x0002, 0x6fe1, 0x6fe2, 0x70cd, 0x6fe2, 0x0d7d,
-	0x70cd, 0x0005, 0x2001, 0x1948, 0x2004, 0x0002, 0x6fec, 0x6fec,
-	0x7066, 0x7067, 0x6fec, 0x7067, 0x0126, 0x2091, 0x8000, 0x1e0c,
-	0x70ed, 0x701c, 0x904d, 0x0508, 0xa84c, 0x9005, 0x0904, 0x7037,
-	0x0e04, 0x7015, 0xa94c, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032,
-	0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0xa850, 0x9082, 0x0019,
-	0x1278, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x11d6, 0x2071, 0x1910, 0x080c, 0x70ce, 0x012e, 0x0804, 0x7065,
-	0xa850, 0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146,
-	0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a,
-	0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098,
-	0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2001,
-	0x005b, 0x2004, 0x9094, 0x0780, 0x190c, 0x70e2, 0xd09c, 0x2071,
-	0x1910, 0x1510, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964, 0x9184,
+	0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2001, 0x005b,
+	0x2004, 0x9094, 0x0780, 0x190c, 0x70d1, 0xd09c, 0x2071, 0x1910,
+	0x1510, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff,
+	0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108,
+	0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x2071,
+	0x1910, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e,
+	0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x00d6, 0x2008,
+	0x2069, 0x1a02, 0x683c, 0x9005, 0x0760, 0x0158, 0x9186, 0x0003,
+	0x0540, 0x2001, 0x1815, 0x2004, 0x2009, 0x1b4d, 0x210c, 0x9102,
+	0x1500, 0x0126, 0x2091, 0x8000, 0x2069, 0x0050, 0x693c, 0x6838,
+	0x9106, 0x0190, 0x0e04, 0x7088, 0x2069, 0x0000, 0x6837, 0x8040,
+	0x6833, 0x0012, 0x6883, 0x8040, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x11e1, 0x2069, 0x1a02, 0x683f, 0xffff,
+	0x012e, 0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x7142, 0x701c,
+	0x904d, 0x0540, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x15c9,
+	0xd09c, 0x1500, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964, 0x9184,
 	0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101,
 	0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de,
-	0x2071, 0x1910, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800,
-	0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x00d6,
-	0x2008, 0x2069, 0x1a03, 0x683c, 0x9005, 0x0760, 0x0158, 0x9186,
-	0x0003, 0x0540, 0x2001, 0x1815, 0x2004, 0x2009, 0x1b4e, 0x210c,
-	0x9102, 0x1500, 0x0126, 0x2091, 0x8000, 0x2069, 0x0050, 0x693c,
-	0x6838, 0x9106, 0x0190, 0x0e04, 0x7099, 0x2069, 0x0000, 0x6837,
-	0x8040, 0x6833, 0x0012, 0x6883, 0x8040, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x2069, 0x1a03, 0x683f,
-	0xffff, 0x012e, 0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x7163,
-	0x701c, 0x904d, 0x0540, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780,
-	0x15c9, 0xd09c, 0x1500, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964,
-	0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff,
-	0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822,
-	0x00de, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e,
-	0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x701c, 0x904d, 0x0160, 0x7010, 0x8001, 0x7012, 0xa800,
-	0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x080c, 0x106c, 0x0005,
-	0x012e, 0x0005, 0x2091, 0x8000, 0x0e04, 0x70e4, 0x0006, 0x0016,
-	0x2001, 0x8004, 0x0006, 0x0804, 0x0d86, 0x0096, 0x00f6, 0x2079,
-	0x0050, 0x7044, 0xd084, 0x01e0, 0xc084, 0x7046, 0x7838, 0x7938,
-	0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013,
-	0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x11d6, 0x2009, 0x1947, 0x200b, 0x0000, 0x00fe, 0x009e, 0x0005,
-	0x782c, 0x9094, 0x0780, 0x1971, 0xd0a4, 0x0db8, 0x2009, 0x1947,
-	0x2104, 0x8000, 0x200a, 0x9082, 0x000f, 0x0e78, 0x00e6, 0x2071,
-	0x1800, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1170,
-	0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0240, 0x7022, 0x2001,
-	0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
-	0x8553, 0x782c, 0x9094, 0x0780, 0x190c, 0x70e2, 0xd0a4, 0x19c8,
-	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
-	0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x11d6, 0x2009, 0x1947, 0x200b, 0x0000, 0x00ee,
-	0x00fe, 0x009e, 0x0005, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084,
-	0x01b8, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
+	0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005,
+	0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x701c, 0x904d, 0x0160, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e,
+	0x9005, 0x1108, 0x701a, 0x012e, 0x080c, 0x106c, 0x0005, 0x012e,
+	0x0005, 0x2091, 0x8000, 0x0e04, 0x70d3, 0x0006, 0x0016, 0x2001,
+	0x8004, 0x0006, 0x0804, 0x0d86, 0x0096, 0x00f6, 0x2079, 0x0050,
+	0x7044, 0xd084, 0x01c0, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e,
+	0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de,
+	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e1,
+	0x00fe, 0x009e, 0x0005, 0x782c, 0x9094, 0x0780, 0x1991, 0xd0a4,
+	0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x00e6, 0x2071, 0x0040,
+	0x712c, 0xd19c, 0x1170, 0x2009, 0x1830, 0x210c, 0x918a, 0x0020,
+	0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee,
+	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
+	0x8000, 0x70c2, 0x080c, 0x8532, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x70d1, 0xd0a4, 0x19c8, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
 	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x00fe, 0x0005,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x70e2, 0xd0a4, 0x0db8, 0x00e6,
-	0x2071, 0x1800, 0x7824, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e,
-	0x70c0, 0x8000, 0x70c2, 0x080c, 0x8553, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x70e2, 0xd0a4, 0x1d70, 0x00d6, 0x2069, 0x0050, 0x693c,
-	0x2069, 0x1948, 0x6808, 0x690a, 0x2069, 0x1a03, 0x9102, 0x1118,
-	0x683c, 0x9005, 0x1328, 0x2001, 0x1949, 0x200c, 0x810d, 0x693e,
-	0x00de, 0x00ee, 0x00fe, 0x0005, 0x7098, 0x908a, 0x0029, 0x1a0c,
-	0x0d7d, 0x9082, 0x001d, 0x003b, 0x0026, 0x2011, 0x1e00, 0x080c,
-	0x2a44, 0x002e, 0x0005, 0x728f, 0x7215, 0x7231, 0x725b, 0x727e,
-	0x72be, 0x72d0, 0x7231, 0x72a6, 0x71d0, 0x71fe, 0x71cf, 0x0005,
-	0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1180, 0x6808, 0x9005,
-	0x1518, 0x709b, 0x0028, 0x2069, 0x198f, 0x2d04, 0x7002, 0x080c,
-	0x762b, 0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, 0x709b, 0x0028,
-	0x2069, 0x198f, 0x2d04, 0x7002, 0x6028, 0x9085, 0x0600, 0x602a,
-	0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a6b, 0x080c, 0x1ab5,
-	0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069,
-	0x0200, 0x6804, 0x9005, 0x1178, 0x6808, 0x9005, 0x1160, 0x709b,
-	0x0028, 0x2069, 0x198f, 0x2d04, 0x7002, 0x080c, 0x76ce, 0x6028,
-	0x9085, 0x0600, 0x602a, 0x00de, 0x0005, 0x0006, 0x2001, 0x0090,
-	0x080c, 0x2a0a, 0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x7341,
-	0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x709b, 0x0020,
-	0x080c, 0x7341, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f,
-	0x0005, 0x2001, 0x0088, 0x080c, 0x2a0a, 0x6124, 0xd1cc, 0x11e8,
-	0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c,
-	0x1adf, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x7515,
-	0x2001, 0x0080, 0x080c, 0x2a0a, 0x709b, 0x0028, 0x0058, 0x709b,
-	0x001e, 0x0040, 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010,
-	0x709b, 0x001f, 0x0005, 0x080c, 0x1adf, 0x60e3, 0x0001, 0x600c,
-	0xc0b4, 0x600e, 0x080c, 0x7515, 0x2001, 0x0080, 0x080c, 0x2a0a,
-	0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184,
-	0x1e00, 0x1158, 0x709b, 0x0028, 0x0040, 0x709b, 0x001e, 0x0028,
-	0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x2001, 0x00a0,
-	0x080c, 0x2a0a, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c,
-	0x1adf, 0x709b, 0x001e, 0x0010, 0x709b, 0x001d, 0x0005, 0x080c,
-	0x73ca, 0x6124, 0xd1dc, 0x1188, 0x080c, 0x7341, 0x0016, 0x080c,
-	0x1adf, 0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x709b, 0x001e,
-	0x0020, 0x709b, 0x001f, 0x080c, 0x7341, 0x0005, 0x0006, 0x2001,
-	0x00a0, 0x080c, 0x2a0a, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc,
-	0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028,
-	0x709b, 0x001d, 0x0010, 0x709b, 0x0021, 0x0005, 0x080c, 0x73ca,
-	0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b,
-	0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005,
-	0x0006, 0x2001, 0x0090, 0x080c, 0x2a0a, 0x000e, 0x6124, 0xd1d4,
-	0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x709b,
-	0x001e, 0x0040, 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010,
-	0x709b, 0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e1, 0x00ee, 0x00fe,
+	0x009e, 0x0005, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01b8,
+	0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
+	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11e1, 0x00fe, 0x0005, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x70d1, 0xd0a4, 0x0db8, 0x00e6, 0x2071,
+	0x1800, 0x7824, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
+	0x8000, 0x70c2, 0x080c, 0x8532, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x70d1, 0xd0a4, 0x1d70, 0x00d6, 0x2069, 0x0050, 0x693c, 0x2069,
+	0x1947, 0x6808, 0x690a, 0x2069, 0x1a02, 0x9102, 0x1118, 0x683c,
+	0x9005, 0x1328, 0x2001, 0x1948, 0x200c, 0x810d, 0x693e, 0x00de,
+	0x00ee, 0x00fe, 0x0005, 0x7098, 0x908a, 0x0029, 0x1a0c, 0x0d7d,
+	0x9082, 0x001d, 0x003b, 0x0026, 0x2011, 0x1e00, 0x080c, 0x2a63,
+	0x002e, 0x0005, 0x726e, 0x71f4, 0x7210, 0x723a, 0x725d, 0x729d,
+	0x72af, 0x7210, 0x7285, 0x71af, 0x71dd, 0x71ae, 0x0005, 0x00d6,
+	0x2069, 0x0200, 0x6804, 0x9005, 0x1180, 0x6808, 0x9005, 0x1518,
+	0x709b, 0x0028, 0x2069, 0x198e, 0x2d04, 0x7002, 0x080c, 0x760a,
+	0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, 0x709b, 0x0028, 0x2069,
+	0x198e, 0x2d04, 0x7002, 0x6028, 0x9085, 0x0600, 0x602a, 0x00e6,
+	0x0036, 0x0046, 0x0056, 0x2071, 0x1a6a, 0x080c, 0x1ac2, 0x005e,
+	0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069, 0x0200,
+	0x6804, 0x9005, 0x1178, 0x6808, 0x9005, 0x1160, 0x709b, 0x0028,
+	0x2069, 0x198e, 0x2d04, 0x7002, 0x080c, 0x76ad, 0x6028, 0x9085,
+	0x0600, 0x602a, 0x00de, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c,
+	0x2a29, 0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x7320, 0xd1d4,
+	0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x709b, 0x0020, 0x080c,
+	0x7320, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005,
+	0x2001, 0x0088, 0x080c, 0x2a29, 0x6124, 0xd1cc, 0x11e8, 0xd1dc,
+	0x11c0, 0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c, 0x1aec,
+	0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x74f4, 0x2001,
+	0x0080, 0x080c, 0x2a29, 0x709b, 0x0028, 0x0058, 0x709b, 0x001e,
+	0x0040, 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010, 0x709b,
+	0x001f, 0x0005, 0x080c, 0x1aec, 0x60e3, 0x0001, 0x600c, 0xc0b4,
+	0x600e, 0x080c, 0x74f4, 0x2001, 0x0080, 0x080c, 0x2a29, 0x6124,
+	0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184, 0x1e00,
+	0x1158, 0x709b, 0x0028, 0x0040, 0x709b, 0x001e, 0x0028, 0x709b,
+	0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x2001, 0x00a0, 0x080c,
+	0x2a29, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c, 0x1aec,
+	0x709b, 0x001e, 0x0010, 0x709b, 0x001d, 0x0005, 0x080c, 0x73a9,
+	0x6124, 0xd1dc, 0x1188, 0x080c, 0x7320, 0x0016, 0x080c, 0x1aec,
+	0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x709b, 0x001e, 0x0020,
+	0x709b, 0x001f, 0x080c, 0x7320, 0x0005, 0x0006, 0x2001, 0x00a0,
+	0x080c, 0x2a29, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc, 0x1150,
+	0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028, 0x709b,
+	0x001d, 0x0010, 0x709b, 0x0021, 0x0005, 0x080c, 0x73a9, 0x6124,
+	0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e,
+	0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x0006,
+	0x2001, 0x0090, 0x080c, 0x2a29, 0x000e, 0x6124, 0xd1d4, 0x1178,
+	0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x709b, 0x001e,
+	0x0040, 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010, 0x709b,
+	0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061,
+	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x080c,
+	0x74c8, 0x11f8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01d0, 0xc1b4,
+	0x2102, 0x0026, 0x2011, 0x0200, 0x080c, 0x2a63, 0x002e, 0x080c,
+	0x2a0f, 0x6024, 0xd0cc, 0x0148, 0x2001, 0x00a0, 0x080c, 0x2a29,
+	0x080c, 0x77cc, 0x080c, 0x6024, 0x0428, 0x6028, 0xc0cd, 0x602a,
+	0x0408, 0x080c, 0x74e2, 0x0150, 0x080c, 0x74d9, 0x1138, 0x2001,
+	0x0001, 0x080c, 0x25b9, 0x080c, 0x749c, 0x00a0, 0x080c, 0x73a6,
+	0x0178, 0x2001, 0x0001, 0x080c, 0x25b9, 0x7098, 0x9086, 0x001e,
+	0x0120, 0x7098, 0x9086, 0x0022, 0x1118, 0x709b, 0x0025, 0x0010,
+	0x709b, 0x0021, 0x012e, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005,
+	0x0026, 0x2011, 0x7331, 0x080c, 0x8729, 0x002e, 0x0016, 0x0026,
+	0x2009, 0x0064, 0x2011, 0x7331, 0x080c, 0x8720, 0x002e, 0x001e,
+	0x0005, 0x00e6, 0x00f6, 0x0016, 0x080c, 0x9e16, 0x2071, 0x1800,
+	0x080c, 0x72ca, 0x001e, 0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026,
+	0x0036, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0126, 0x080c, 0x9e16,
 	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000,
-	0x080c, 0x74e9, 0x11f8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01d0,
-	0xc1b4, 0x2102, 0x0026, 0x2011, 0x0200, 0x080c, 0x2a44, 0x002e,
-	0x080c, 0x29f0, 0x6024, 0xd0cc, 0x0148, 0x2001, 0x00a0, 0x080c,
-	0x2a0a, 0x080c, 0x77ed, 0x080c, 0x6029, 0x0428, 0x6028, 0xc0cd,
-	0x602a, 0x0408, 0x080c, 0x7503, 0x0150, 0x080c, 0x74fa, 0x1138,
-	0x2001, 0x0001, 0x080c, 0x25a0, 0x080c, 0x74bd, 0x00a0, 0x080c,
-	0x73c7, 0x0178, 0x2001, 0x0001, 0x080c, 0x25a0, 0x7098, 0x9086,
-	0x001e, 0x0120, 0x7098, 0x9086, 0x0022, 0x1118, 0x709b, 0x0025,
-	0x0010, 0x709b, 0x0021, 0x012e, 0x00ee, 0x00de, 0x00ce, 0x001e,
-	0x0005, 0x0026, 0x2011, 0x7352, 0x080c, 0x874a, 0x002e, 0x0016,
-	0x0026, 0x2009, 0x0064, 0x2011, 0x7352, 0x080c, 0x8741, 0x002e,
-	0x001e, 0x0005, 0x00e6, 0x00f6, 0x0016, 0x080c, 0x9e32, 0x2071,
-	0x1800, 0x080c, 0x72eb, 0x001e, 0x00fe, 0x00ee, 0x0005, 0x0016,
-	0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0126, 0x080c,
-	0x9e32, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091,
-	0x8000, 0x6028, 0xc09c, 0x602a, 0x080c, 0xa896, 0x2011, 0x0003,
-	0x080c, 0xa1cf, 0x2011, 0x0002, 0x080c, 0xa1d9, 0x080c, 0xa098,
-	0x080c, 0x86f6, 0x0036, 0x901e, 0x080c, 0xa118, 0x003e, 0x080c,
-	0xa8b2, 0x60e3, 0x0000, 0x080c, 0xe702, 0x080c, 0xe71d, 0x2009,
-	0x0004, 0x080c, 0x29f6, 0x080c, 0x2916, 0x2001, 0x1800, 0x2003,
-	0x0004, 0x2011, 0x0008, 0x080c, 0x2a44, 0x2011, 0x7352, 0x080c,
-	0x874a, 0x080c, 0x7503, 0x0118, 0x9006, 0x080c, 0x2a0a, 0x080c,
-	0x0bc3, 0x2001, 0x0001, 0x080c, 0x25a0, 0x012e, 0x00fe, 0x00ee,
-	0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x00e6,
-	0x2011, 0x735f, 0x2071, 0x1a03, 0x701c, 0x9206, 0x1118, 0x7018,
-	0x9005, 0x0110, 0x9085, 0x0001, 0x00ee, 0x002e, 0x0005, 0x6020,
-	0xd09c, 0x0005, 0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0, 0x01b8,
-	0x2001, 0x00c0, 0x080c, 0x2a0a, 0x0156, 0x20a9, 0x002d, 0x1d04,
-	0x73d7, 0x2091, 0x6000, 0x1f04, 0x73d7, 0x015e, 0x00d6, 0x2069,
-	0x1800, 0x689c, 0x8001, 0x0220, 0x0118, 0x689e, 0x00de, 0x0005,
-	0x689f, 0x0014, 0x68ec, 0xd0dc, 0x0dc8, 0x6800, 0x9086, 0x0001,
-	0x1da8, 0x080c, 0x8756, 0x0c90, 0x00c6, 0x00d6, 0x00e6, 0x2061,
-	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x77fc, 0x2001,
-	0x196d, 0x2003, 0x0000, 0x9006, 0x709a, 0x60e2, 0x6886, 0x080c,
-	0x266f, 0x9006, 0x080c, 0x2a0a, 0x080c, 0x5ee4, 0x0026, 0x2011,
-	0xffff, 0x080c, 0x2a44, 0x002e, 0x602b, 0x182c, 0x00ee, 0x00de,
-	0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x2071, 0x1800, 0x2001, 0x197d, 0x200c, 0x9186, 0x0000,
-	0x0158, 0x9186, 0x0001, 0x0158, 0x9186, 0x0002, 0x0158, 0x9186,
-	0x0003, 0x0158, 0x0804, 0x74ad, 0x709b, 0x0022, 0x0040, 0x709b,
-	0x0021, 0x0028, 0x709b, 0x0023, 0x0010, 0x709b, 0x0024, 0x60e3,
-	0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x266f, 0x080c,
-	0xa896, 0x0026, 0x080c, 0xab5e, 0x002e, 0x080c, 0xa8b2, 0x7000,
-	0x908e, 0x0004, 0x0118, 0x602b, 0x0028, 0x0010, 0x602b, 0x0020,
-	0x0156, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac,
-	0x0150, 0x012e, 0x015e, 0x080c, 0xcf52, 0x0118, 0x9006, 0x080c,
-	0x2a34, 0x0804, 0x74b9, 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802,
-	0x080c, 0x29f0, 0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c,
-	0x2a0a, 0x1f04, 0x745e, 0x080c, 0x7540, 0x012e, 0x015e, 0x080c,
-	0x74fa, 0x0170, 0x6044, 0x9005, 0x0130, 0x080c, 0x7540, 0x9006,
-	0x8001, 0x1df0, 0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c, 0x7540,
-	0x080c, 0xcf52, 0x0118, 0x9006, 0x080c, 0x2a34, 0x0016, 0x0026,
-	0x7000, 0x908e, 0x0004, 0x0130, 0x2009, 0x00c8, 0x2011, 0x735f,
-	0x080c, 0x8708, 0x002e, 0x001e, 0x080c, 0x854a, 0x7034, 0xc085,
-	0x7036, 0x2001, 0x197d, 0x2003, 0x0004, 0x080c, 0x71b4, 0x080c,
-	0x74fa, 0x0138, 0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c,
-	0x77f2, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6,
-	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x8561,
-	0x080c, 0x8553, 0x080c, 0x77fc, 0x2001, 0x196d, 0x2003, 0x0000,
-	0x9006, 0x709a, 0x60e2, 0x6886, 0x080c, 0x266f, 0x9006, 0x080c,
-	0x2a0a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0026, 0x2011, 0xffff,
-	0x080c, 0x2a44, 0x002e, 0x602b, 0x182c, 0x00ee, 0x00de, 0x00ce,
-	0x0005, 0x0006, 0x2001, 0x197c, 0x2004, 0x9086, 0xaaaa, 0x000e,
-	0x0005, 0x0006, 0x080c, 0x56de, 0x9084, 0x0030, 0x9086, 0x0000,
-	0x000e, 0x0005, 0x0006, 0x080c, 0x56de, 0x9084, 0x0030, 0x9086,
-	0x0030, 0x000e, 0x0005, 0x0006, 0x080c, 0x56de, 0x9084, 0x0030,
-	0x9086, 0x0010, 0x000e, 0x0005, 0x0006, 0x080c, 0x56de, 0x9084,
-	0x0030, 0x9086, 0x0020, 0x000e, 0x0005, 0x0036, 0x0016, 0x2001,
-	0x180c, 0x2004, 0x908c, 0x0013, 0x0180, 0x0020, 0x080c, 0x268f,
-	0x900e, 0x0028, 0x080c, 0x6a63, 0x1dc8, 0x2009, 0x0002, 0x2019,
-	0x0028, 0x080c, 0x31a6, 0x9006, 0x0019, 0x001e, 0x003e, 0x0005,
-	0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130, 0x080c, 0xcf4b, 0x1128,
-	0x9085, 0x0010, 0x0010, 0x9084, 0xffef, 0x2072, 0x00ee, 0x0005,
-	0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, 0x0006, 0x6004, 0x0006,
-	0x6028, 0x0006, 0x602f, 0x0100, 0x602f, 0x0000, 0x602f, 0x0040,
-	0x602f, 0x0000, 0x20a9, 0x0002, 0x080c, 0x29d1, 0x0026, 0x2011,
-	0x0040, 0x080c, 0x2a44, 0x002e, 0x000e, 0x602a, 0x000e, 0x6006,
-	0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001,
-	0x2001, 0x0001, 0x080c, 0x266f, 0x2001, 0x00a0, 0x0006, 0x080c,
-	0xcf52, 0x000e, 0x0130, 0x080c, 0x2a28, 0x9006, 0x080c, 0x2a34,
-	0x0010, 0x080c, 0x2a0a, 0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5,
-	0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x2981, 0x00fe, 0x000e,
-	0x6052, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
-	0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c,
-	0xa8f4, 0x0158, 0x2001, 0x0386, 0x2004, 0xd0b4, 0x1130, 0x2001,
-	0x0016, 0x080c, 0xa887, 0x0804, 0x761d, 0x2001, 0x180c, 0x200c,
-	0xc1c4, 0x2102, 0x6028, 0x9084, 0xe1ff, 0x602a, 0x2011, 0x0200,
-	0x080c, 0x2a44, 0x2001, 0x0090, 0x080c, 0x2a0a, 0x20a9, 0x0366,
-	0x6024, 0xd0cc, 0x1558, 0x1d04, 0x75b8, 0x2091, 0x6000, 0x1f04,
-	0x75b8, 0x080c, 0xa896, 0x2011, 0x0003, 0x080c, 0xa1cf, 0x2011,
-	0x0002, 0x080c, 0xa1d9, 0x080c, 0xa098, 0x901e, 0x080c, 0xa118,
-	0x2001, 0x0386, 0x2003, 0x7000, 0x080c, 0xa8b2, 0x2001, 0x00a0,
-	0x080c, 0x2a0a, 0x080c, 0x77ed, 0x080c, 0x6029, 0x080c, 0xcf52,
-	0x0110, 0x080c, 0x0ce9, 0x9085, 0x0001, 0x04e8, 0x2001, 0x0386,
-	0x2004, 0xd0ac, 0x0110, 0x080c, 0x1adf, 0x60e3, 0x0000, 0x2001,
-	0x196d, 0x2004, 0x080c, 0x266f, 0x60e2, 0x2001, 0x0080, 0x080c,
-	0x2a0a, 0x20a9, 0x0366, 0x2011, 0x1e00, 0x080c, 0x2a44, 0x2009,
-	0x1e00, 0x080c, 0x29f0, 0x6024, 0x910c, 0x0140, 0x1d04, 0x75fb,
-	0x2091, 0x6000, 0x1f04, 0x75fb, 0x0804, 0x75c1, 0x2001, 0x0386,
-	0x2003, 0x7000, 0x6028, 0x9085, 0x1e00, 0x602a, 0x70b4, 0x9005,
-	0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x080c, 0xcf52, 0x0110,
-	0x080c, 0x0ce9, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e,
-	0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6,
-	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x7000, 0x9086,
-	0x0003, 0x1168, 0x2001, 0x020b, 0x2004, 0x9084, 0x5540, 0x9086,
-	0x5540, 0x1128, 0x2069, 0x1a77, 0x2d04, 0x8000, 0x206a, 0x2069,
-	0x0140, 0x6020, 0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, 0x1904,
-	0x7694, 0x2001, 0x0088, 0x080c, 0x2a0a, 0x9006, 0x60e2, 0x6886,
-	0x080c, 0x266f, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808,
-	0x9005, 0x01d0, 0x6028, 0x9084, 0xfbff, 0x602a, 0x2011, 0x0400,
-	0x080c, 0x2a44, 0x2069, 0x198f, 0x7000, 0x206a, 0x709b, 0x0026,
-	0x7003, 0x0001, 0x20a9, 0x0002, 0x1d04, 0x7674, 0x2091, 0x6000,
-	0x1f04, 0x7674, 0x0804, 0x76c6, 0x2069, 0x0140, 0x20a9, 0x0384,
-	0x2011, 0x1e00, 0x080c, 0x2a44, 0x2009, 0x1e00, 0x080c, 0x29f0,
-	0x6024, 0x910c, 0x0528, 0x9084, 0x1a00, 0x1510, 0x1d04, 0x7680,
-	0x2091, 0x6000, 0x1f04, 0x7680, 0x080c, 0xa896, 0x2011, 0x0003,
-	0x080c, 0xa1cf, 0x2011, 0x0002, 0x080c, 0xa1d9, 0x080c, 0xa098,
-	0x901e, 0x080c, 0xa118, 0x080c, 0xa8b2, 0x2001, 0x00a0, 0x080c,
-	0x2a0a, 0x080c, 0x77ed, 0x080c, 0x6029, 0x9085, 0x0001, 0x00b0,
-	0x2001, 0x0080, 0x080c, 0x2a0a, 0x2069, 0x0140, 0x60e3, 0x0000,
-	0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001,
-	0x196d, 0x2004, 0x080c, 0x266f, 0x60e2, 0x9006, 0x00ee, 0x00de,
-	0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016,
-	0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071,
-	0x1800, 0x6020, 0x9084, 0x00c0, 0x01e8, 0x080c, 0xa896, 0x2011,
-	0x0003, 0x080c, 0xa1cf, 0x2011, 0x0002, 0x080c, 0xa1d9, 0x080c,
-	0xa098, 0x901e, 0x080c, 0xa118, 0x080c, 0xa8b2, 0x2069, 0x0140,
-	0x2001, 0x00a0, 0x080c, 0x2a0a, 0x080c, 0x77ed, 0x080c, 0x6029,
-	0x0804, 0x7769, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x1160, 0xc1b5,
-	0x2102, 0x080c, 0x7347, 0x2069, 0x0140, 0x2001, 0x0080, 0x080c,
-	0x2a0a, 0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118,
-	0x6808, 0x9005, 0x0190, 0x6028, 0x9084, 0xfdff, 0x602a, 0x2011,
-	0x0200, 0x080c, 0x2a44, 0x2069, 0x198f, 0x7000, 0x206a, 0x709b,
-	0x0027, 0x7003, 0x0001, 0x0804, 0x7769, 0x2011, 0x1e00, 0x080c,
-	0x2a44, 0x2009, 0x1e00, 0x080c, 0x29f0, 0x6024, 0x910c, 0x01c8,
-	0x9084, 0x1c00, 0x11b0, 0x1d04, 0x7725, 0x0006, 0x0016, 0x00c6,
-	0x00d6, 0x00e6, 0x080c, 0x8592, 0x00ee, 0x00de, 0x00ce, 0x001e,
-	0x000e, 0x00e6, 0x2071, 0x1a03, 0x7018, 0x00ee, 0x9005, 0x19e8,
-	0x0500, 0x0026, 0x2011, 0x735f, 0x080c, 0x863e, 0x2011, 0x7352,
-	0x080c, 0x874a, 0x002e, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b4,
-	0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x196d,
-	0x2004, 0x080c, 0x266f, 0x60e2, 0x2001, 0x180c, 0x200c, 0xc1b4,
-	0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e,
-	0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x0046, 0x00c6, 0x00e6,
-	0x2061, 0x0100, 0x2071, 0x1800, 0x080c, 0xcf4b, 0x1904, 0x77d7,
-	0x7130, 0xd184, 0x1170, 0x080c, 0x3368, 0x0138, 0xc18d, 0x7132,
-	0x2011, 0x1848, 0x2214, 0xd2ac, 0x1120, 0x7030, 0xd08c, 0x0904,
-	0x77d7, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x0538, 0x0016, 0x2019,
-	0x000e, 0x080c, 0xe239, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e,
-	0x9186, 0x007e, 0x01a0, 0x9186, 0x0080, 0x0188, 0x080c, 0x6625,
-	0x1170, 0x2120, 0x9006, 0x0016, 0x2009, 0x000e, 0x080c, 0xe2c9,
-	0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x88ec, 0x001e, 0x8108,
-	0x1f04, 0x77a0, 0x00be, 0x015e, 0x001e, 0xd1ac, 0x1148, 0x0016,
-	0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x31a6, 0x001e, 0x0078,
-	0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x6625, 0x1110,
-	0x080c, 0x6043, 0x8108, 0x1f04, 0x77cd, 0x00be, 0x015e, 0x080c,
-	0x1adf, 0x080c, 0xa896, 0x080c, 0xab5e, 0x080c, 0xa8b2, 0x60e3,
-	0x0000, 0x080c, 0x6029, 0x080c, 0x741a, 0x00ee, 0x00ce, 0x004e,
-	0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x197d, 0x2003,
-	0x0001, 0x0005, 0x2001, 0x197d, 0x2003, 0x0000, 0x0005, 0x2001,
-	0x197c, 0x2003, 0xaaaa, 0x0005, 0x2001, 0x197c, 0x2003, 0x0000,
-	0x0005, 0x2071, 0x18fa, 0x7003, 0x0000, 0x7007, 0x0000, 0x080c,
-	0x1053, 0x090c, 0x0d7d, 0xa8ab, 0xdcb0, 0x2900, 0x704e, 0x080c,
-	0x1053, 0x090c, 0x0d7d, 0xa8ab, 0xdcb0, 0x2900, 0x7052, 0xa867,
-	0x0000, 0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005, 0x00e6, 0x2071,
-	0x0040, 0x6848, 0x9005, 0x1118, 0x9085, 0x0001, 0x04b0, 0x6840,
-	0x9005, 0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002, 0x6854, 0x9101,
-	0x7006, 0x9006, 0x7012, 0x7016, 0x6850, 0x7002, 0x6854, 0x7006,
-	0x6858, 0x700a, 0x685c, 0x700e, 0x6840, 0x9005, 0x1110, 0x7012,
-	0x7016, 0x6848, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x2001,
-	0x0019, 0x7036, 0x702b, 0x0001, 0x2001, 0x0004, 0x200c, 0x918c,
-	0xfff7, 0x918d, 0x8000, 0x2102, 0x00d6, 0x2069, 0x18fa, 0x6807,
-	0x0001, 0x00de, 0x080c, 0x7de4, 0x9006, 0x00ee, 0x0005, 0x900e,
-	0x0156, 0x20a9, 0x0006, 0x8003, 0x818d, 0x1f04, 0x7863, 0x015e,
-	0x0005, 0x2079, 0x0040, 0x2071, 0x18fa, 0x7004, 0x0002, 0x7879,
-	0x787a, 0x78c5, 0x7920, 0x7a30, 0x7877, 0x7877, 0x7a5a, 0x080c,
-	0x0d7d, 0x0005, 0x2079, 0x0040, 0x2001, 0x1dc0, 0x2003, 0x0000,
-	0x782c, 0x908c, 0x0780, 0x190c, 0x7ec6, 0xd0a4, 0x0570, 0x2001,
-	0x1dc0, 0x2004, 0x9082, 0x0080, 0x1640, 0x1d04, 0x7897, 0x2001,
-	0x1a06, 0x200c, 0x8109, 0x0508, 0x2091, 0x6000, 0x2102, 0x7824,
-	0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a,
-	0x0040, 0x0608, 0x00b8, 0x2001, 0x1800, 0x200c, 0x9186, 0x0003,
-	0x1160, 0x7104, 0x9186, 0x0004, 0x0140, 0x9186, 0x0007, 0x0128,
-	0x9186, 0x0003, 0x1968, 0x080c, 0x7920, 0x782c, 0xd09c, 0x090c,
-	0x7de4, 0x0005, 0x9082, 0x005a, 0x1218, 0x2100, 0x003b, 0x0c18,
-	0x080c, 0x7956, 0x0c90, 0x00e3, 0x08f0, 0x0005, 0x7956, 0x7956,
-	0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7978, 0x7956,
-	0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956,
-	0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956,
-	0x7956, 0x7956, 0x7962, 0x7956, 0x7b4b, 0x7956, 0x7956, 0x7956,
-	0x7978, 0x7956, 0x7962, 0x7b8c, 0x7bcd, 0x7c14, 0x7c28, 0x7956,
-	0x7956, 0x7978, 0x7962, 0x798c, 0x7956, 0x7a04, 0x7cd3, 0x7cee,
-	0x7956, 0x7978, 0x7956, 0x798c, 0x7956, 0x7956, 0x79fa, 0x7cee,
-	0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956,
-	0x7956, 0x79a0, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956,
-	0x7956, 0x7956, 0x7956, 0x7e6a, 0x7956, 0x7e14, 0x7956, 0x7e14,
-	0x7956, 0x79b5, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956, 0x7956,
-	0x2079, 0x0040, 0x7004, 0x9086, 0x0003, 0x1198, 0x782c, 0x080c,
-	0x7e0d, 0xd0a4, 0x0170, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806,
-	0xa864, 0x9084, 0x00ff, 0x908a, 0x001a, 0x1210, 0x002b, 0x0c50,
-	0x00e9, 0x080c, 0x7de4, 0x0005, 0x7956, 0x7962, 0x7b37, 0x7956,
-	0x7962, 0x7956, 0x7962, 0x7962, 0x7956, 0x7962, 0x7b37, 0x7962,
-	0x7962, 0x7962, 0x7962, 0x7962, 0x7956, 0x7962, 0x7b37, 0x7956,
-	0x7956, 0x7962, 0x7956, 0x7956, 0x7956, 0x7962, 0x00e6, 0x2071,
-	0x18fa, 0x2009, 0x0400, 0x0071, 0x00ee, 0x0005, 0x2009, 0x1000,
-	0x0049, 0x0005, 0x2009, 0x2000, 0x0029, 0x0005, 0x2009, 0x0800,
-	0x0009, 0x0005, 0x7007, 0x0001, 0xa868, 0x9084, 0x00ff, 0x9105,
-	0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d80, 0x012e, 0x0005,
-	0xa864, 0x8007, 0x9084, 0x00ff, 0x0d08, 0x8001, 0x1120, 0x7007,
-	0x0001, 0x0804, 0x7ad9, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016,
-	0x701a, 0x704b, 0x7ad9, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff,
-	0x0968, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7af4, 0x7007,
-	0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7af4, 0x0005,
-	0xa864, 0x8007, 0x9084, 0x00ff, 0x0904, 0x795e, 0x8001, 0x1120,
-	0x7007, 0x0001, 0x0804, 0x7b10, 0x7007, 0x0003, 0x7012, 0x2900,
-	0x7016, 0x701a, 0x704b, 0x7b10, 0x0005, 0xa864, 0x8007, 0x9084,
-	0x00ff, 0x9086, 0x0001, 0x1904, 0x795e, 0x7007, 0x0001, 0x2009,
-	0x1834, 0x210c, 0x81ff, 0x11a8, 0xa868, 0x9084, 0x00ff, 0xa86a,
-	0xa883, 0x0000, 0x080c, 0x62b9, 0x1108, 0x0005, 0x0126, 0x2091,
-	0x8000, 0xa867, 0x0139, 0xa87a, 0xa982, 0x080c, 0x6d80, 0x012e,
-	0x0ca0, 0xa994, 0x9186, 0x0071, 0x0d38, 0x9186, 0x0064, 0x0d20,
-	0x9186, 0x007c, 0x0d08, 0x9186, 0x0028, 0x09f0, 0x9186, 0x0038,
-	0x09d8, 0x9186, 0x0078, 0x09c0, 0x9186, 0x005f, 0x09a8, 0x9186,
-	0x0056, 0x0990, 0xa897, 0x4005, 0xa89b, 0x0001, 0x2001, 0x0030,
-	0x900e, 0x08a0, 0xa87c, 0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120,
-	0x7007, 0x0001, 0x0804, 0x7d05, 0x2900, 0x7016, 0x701a, 0x20a9,
-	0x0004, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0030, 0x2098, 0x7050,
-	0x2040, 0xa060, 0x20e8, 0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003,
-	0xa888, 0x7012, 0x9082, 0x0401, 0x1a04, 0x7966, 0xaab4, 0x928a,
-	0x0002, 0x1a04, 0x7966, 0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105,
-	0x0118, 0x2001, 0x7a97, 0x0018, 0x9280, 0x7a8d, 0x2005, 0x7056,
-	0x7010, 0x9015, 0x0904, 0x7a78, 0x080c, 0x1053, 0x1118, 0x7007,
-	0x0004, 0x0005, 0x2900, 0x7022, 0x7054, 0x2060, 0xe000, 0xa866,
-	0x7050, 0x2040, 0xa95c, 0xe004, 0x9100, 0xa076, 0xa860, 0xa072,
-	0xe008, 0x920a, 0x1210, 0x900e, 0x2200, 0x7112, 0xe20c, 0x8003,
-	0x800b, 0x9296, 0x0004, 0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e,
-	0x080c, 0x1124, 0xa06c, 0x908e, 0x0100, 0x0170, 0x9086, 0x0200,
-	0x0118, 0x7007, 0x0007, 0x0005, 0x7020, 0x2048, 0x080c, 0x106c,
-	0x7014, 0x2048, 0x0804, 0x7966, 0x7020, 0x2048, 0x7018, 0xa802,
-	0xa807, 0x0000, 0x2908, 0x2048, 0xa906, 0x711a, 0x0804, 0x7a30,
-	0x7014, 0x2048, 0x7007, 0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8,
-	0xa9bc, 0x9105, 0x0108, 0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x001e, 0x0904, 0x7d05, 0x0804, 0x7ad9, 0x7a8f, 0x7a93, 0x0002,
-	0x001d, 0x0007, 0x0004, 0x000a, 0x001b, 0x0005, 0x0006, 0x000a,
-	0x001d, 0x0005, 0x0004, 0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804,
-	0x2050, 0xb0c0, 0xb0e2, 0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4,
-	0xb0ce, 0xb6da, 0xb7d6, 0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8,
-	0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c,
-	0xb0ae, 0xb098, 0xb0a2, 0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090,
-	0xb09a, 0xb08c, 0xb096, 0xb088, 0xb08a, 0xb084, 0xb086, 0xb692,
-	0xb78e, 0xb080, 0xb082, 0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074,
-	0xb06e, 0xb67a, 0xb776, 0xb004, 0x9055, 0x1958, 0x006e, 0x007e,
-	0x0005, 0x2009, 0x1834, 0x210c, 0x81ff, 0x1178, 0x080c, 0x60bb,
-	0x1108, 0x0005, 0x080c, 0x6fc0, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xcb36, 0x080c, 0x6d80, 0x012e, 0x0ca0, 0x080c, 0xcf4b, 0x1d70,
-	0x2001, 0x0028, 0x900e, 0x0c70, 0x2009, 0x1834, 0x210c, 0x81ff,
-	0x1188, 0xa888, 0x9005, 0x0188, 0xa883, 0x0000, 0x080c, 0x6149,
-	0x1108, 0x0005, 0xa87a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d80,
-	0x012e, 0x0cb8, 0x2001, 0x0028, 0x0ca8, 0x2001, 0x0000, 0x0c90,
-	0x2009, 0x1834, 0x210c, 0x81ff, 0x11d8, 0xa888, 0x9005, 0x01e0,
-	0xa883, 0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c, 0x621b, 0x1138,
-	0x0005, 0x9006, 0xa87a, 0x080c, 0x6196, 0x1108, 0x0005, 0x0126,
-	0x2091, 0x8000, 0xa87a, 0xa982, 0x080c, 0x6d80, 0x012e, 0x0cb0,
-	0x2001, 0x0028, 0x900e, 0x0c98, 0x2001, 0x0000, 0x0c80, 0x7018,
-	0xa802, 0x2908, 0x2048, 0xa906, 0x711a, 0x7010, 0x8001, 0x7012,
-	0x0118, 0x7007, 0x0003, 0x0030, 0x7014, 0x2048, 0x7007, 0x0001,
-	0x7048, 0x080f, 0x0005, 0x00b6, 0x7007, 0x0001, 0xa974, 0xa878,
-	0x9084, 0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9, 0x0001, 0x9096,
-	0x0001, 0x0190, 0x900e, 0x20a9, 0x0800, 0x9096, 0x0002, 0x0160,
-	0x9005, 0x11d8, 0xa974, 0x080c, 0x6625, 0x11b8, 0x0066, 0xae80,
-	0x080c, 0x6735, 0x006e, 0x0088, 0x0046, 0x2011, 0x180c, 0x2224,
-	0xc484, 0x2412, 0x004e, 0x00c6, 0x080c, 0x6625, 0x1110, 0x080c,
-	0x6904, 0x8108, 0x1f04, 0x7b74, 0x00ce, 0xa87c, 0xd084, 0x1120,
-	0x080c, 0x106c, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6d80, 0x012e, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x7007,
-	0x0001, 0x080c, 0x6a67, 0x0580, 0x2061, 0x1a6f, 0x6100, 0xd184,
-	0x0178, 0xa888, 0x9084, 0x00ff, 0x1550, 0x6000, 0xd084, 0x0520,
-	0x6004, 0x9005, 0x1538, 0x6003, 0x0000, 0x600b, 0x0000, 0x00c8,
-	0x2011, 0x0001, 0xa890, 0x9005, 0x1110, 0x2001, 0x001e, 0x8000,
-	0x6016, 0xa888, 0x9084, 0x00ff, 0x0178, 0x6006, 0xa888, 0x8007,
-	0x9084, 0x00ff, 0x0148, 0x600a, 0xa888, 0x8000, 0x1108, 0xc28d,
-	0x6202, 0x012e, 0x0804, 0x7dce, 0x012e, 0x0804, 0x7dc8, 0x012e,
-	0x0804, 0x7dc2, 0x012e, 0x0804, 0x7dc5, 0x0126, 0x2091, 0x8000,
-	0x7007, 0x0001, 0x080c, 0x6a67, 0x05e0, 0x2061, 0x1a6f, 0x6000,
-	0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530, 0xac78, 0x9484,
-	0x0003, 0x0170, 0xa988, 0x918c, 0x00ff, 0x8001, 0x1120, 0x2100,
-	0x9210, 0x0620, 0x0028, 0x8001, 0x1508, 0x2100, 0x9212, 0x02f0,
-	0x9484, 0x000c, 0x0188, 0xa988, 0x810f, 0x918c, 0x00ff, 0x9082,
-	0x0004, 0x1120, 0x2100, 0x9318, 0x0288, 0x0030, 0x9082, 0x0004,
-	0x1168, 0x2100, 0x931a, 0x0250, 0xa890, 0x9005, 0x0110, 0x8000,
-	0x6016, 0x6206, 0x630a, 0x012e, 0x0804, 0x7dce, 0x012e, 0x0804,
-	0x7dcb, 0x012e, 0x0804, 0x7dc8, 0x0126, 0x2091, 0x8000, 0x7007,
-	0x0001, 0x2061, 0x1a6f, 0x6300, 0xd38c, 0x1120, 0x6308, 0x8318,
-	0x0220, 0x630a, 0x012e, 0x0804, 0x7ddc, 0x012e, 0x0804, 0x7dcb,
-	0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x7007, 0x0001, 0xa87c,
-	0xd0ac, 0x0148, 0x00c6, 0x2061, 0x1a6f, 0x6000, 0x9084, 0xfcff,
-	0x6002, 0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8, 0xa88c, 0x9065,
-	0x0598, 0x2001, 0x1834, 0x2004, 0x9005, 0x0118, 0x080c, 0xac28,
-	0x0068, 0x6017, 0xf400, 0x6063, 0x0000, 0xa97c, 0xd1a4, 0x0110,
-	0xa980, 0x6162, 0x2009, 0x0041, 0x080c, 0xac8c, 0xa988, 0x918c,
-	0xff00, 0x9186, 0x2000, 0x1138, 0x0026, 0x900e, 0x2011, 0xfdff,
-	0x080c, 0x88ec, 0x002e, 0xa87c, 0xd0c4, 0x0148, 0x2061, 0x1a6f,
-	0x6000, 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208, 0x600a, 0x00ce,
-	0x012e, 0x00be, 0x0804, 0x7dce, 0x00ce, 0x012e, 0x00be, 0x0804,
-	0x7dc8, 0xa984, 0x9186, 0x002e, 0x0d30, 0x9186, 0x002d, 0x0d18,
-	0x9186, 0x0045, 0x0510, 0x9186, 0x002a, 0x1130, 0x2001, 0x180c,
-	0x200c, 0xc194, 0x2102, 0x08b8, 0x9186, 0x0020, 0x0158, 0x9186,
-	0x0029, 0x1d10, 0xa974, 0x080c, 0x6625, 0x1968, 0xb800, 0xc0e4,
-	0xb802, 0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007, 0x0024, 0x2001,
-	0x1986, 0x2004, 0x601a, 0x0804, 0x7c63, 0xa88c, 0x9065, 0x0960,
-	0x00e6, 0xa890, 0x9075, 0x2001, 0x1834, 0x2004, 0x9005, 0x0150,
-	0x080c, 0xac28, 0x8eff, 0x0118, 0x2e60, 0x080c, 0xac28, 0x00ee,
-	0x0804, 0x7c63, 0x6024, 0xc0dc, 0xc0d5, 0x6026, 0x2e60, 0x6007,
-	0x003a, 0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b, 0xa8a4, 0x602e,
-	0xa8a8, 0x6016, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x921e,
-	0x00ee, 0x0804, 0x7c63, 0x2061, 0x1a6f, 0x6000, 0xd084, 0x0190,
-	0xd08c, 0x1904, 0x7ddc, 0x0126, 0x2091, 0x8000, 0x6204, 0x8210,
-	0x0220, 0x6206, 0x012e, 0x0804, 0x7ddc, 0x012e, 0xa883, 0x0016,
-	0x0804, 0x7dd5, 0xa883, 0x0007, 0x0804, 0x7dd5, 0xa864, 0x8007,
-	0x9084, 0x00ff, 0x0130, 0x8001, 0x1138, 0x7007, 0x0001, 0x0069,
-	0x0005, 0x080c, 0x795e, 0x0040, 0x7007, 0x0003, 0x7012, 0x2900,
-	0x7016, 0x701a, 0x704b, 0x7d05, 0x0005, 0x00b6, 0x00e6, 0x0126,
-	0x2091, 0x8000, 0x903e, 0x2061, 0x1800, 0x61d0, 0x81ff, 0x1904,
-	0x7d87, 0x6130, 0xd194, 0x1904, 0x7db1, 0xa878, 0x2070, 0x9e82,
-	0x1ddc, 0x0a04, 0x7d7b, 0x6068, 0x9e02, 0x1a04, 0x7d7b, 0x7120,
-	0x9186, 0x0006, 0x1904, 0x7d6d, 0x7010, 0x905d, 0x0904, 0x7d87,
-	0xb800, 0xd0e4, 0x1904, 0x7dab, 0x2061, 0x1a6f, 0x6100, 0x9184,
-	0x0301, 0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc, 0x1904, 0x7db4,
-	0xa883, 0x0000, 0xa803, 0x0000, 0x2908, 0x7014, 0x9005, 0x1198,
-	0x7116, 0xa87c, 0xd0f4, 0x1904, 0x7db7, 0x080c, 0x56da, 0xd09c,
-	0x1118, 0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c, 0x87df, 0x012e,
-	0x00ee, 0x00be, 0x0005, 0x2048, 0xa800, 0x9005, 0x1de0, 0xa902,
-	0x2148, 0xa87c, 0xd0f4, 0x1904, 0x7db7, 0x012e, 0x00ee, 0x00be,
-	0x0005, 0x012e, 0x00ee, 0xa883, 0x0006, 0x00be, 0x0804, 0x7dd5,
-	0xd184, 0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974, 0x080c, 0x6625,
-	0x15d0, 0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186, 0x0007, 0x1118,
-	0xa883, 0x0002, 0x0490, 0xa883, 0x0008, 0x0478, 0xa883, 0x000e,
-	0x0460, 0xa883, 0x0017, 0x0448, 0xa883, 0x0035, 0x0430, 0x080c,
-	0x56de, 0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82, 0x1ddc, 0x02c0,
-	0x6068, 0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006, 0x1188, 0x7010,
-	0x905d, 0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000,
-	0x9086, 0x0007, 0x1904, 0x7d11, 0x7003, 0x0002, 0x0804, 0x7d11,
-	0xa883, 0x0028, 0x0010, 0xa883, 0x0029, 0x012e, 0x00ee, 0x00be,
-	0x0420, 0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045, 0x0cb0, 0x2e60,
-	0x2019, 0x0002, 0x601b, 0x0014, 0x080c, 0xde1b, 0x012e, 0x00ee,
-	0x00be, 0x0005, 0x2009, 0x003e, 0x0058, 0x2009, 0x0004, 0x0040,
-	0x2009, 0x0006, 0x0028, 0x2009, 0x0016, 0x0010, 0x2009, 0x0001,
-	0xa884, 0x9084, 0xff00, 0x9105, 0xa886, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6d80, 0x012e, 0x0005, 0x080c, 0x106c, 0x0005, 0x00d6,
-	0x080c, 0x87d6, 0x00de, 0x0005, 0x00d6, 0x00e6, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x0040, 0x702c, 0xd084, 0x01d8, 0x908c, 0x0780,
-	0x190c, 0x7ec6, 0xd09c, 0x11a8, 0x2071, 0x1800, 0x70c0, 0x90ea,
-	0x0020, 0x0278, 0x8001, 0x70c2, 0x702c, 0x2048, 0xa800, 0x702e,
-	0x9006, 0xa802, 0xa806, 0x2071, 0x0040, 0x2900, 0x7022, 0x702c,
-	0x0c28, 0x012e, 0x00ee, 0x00de, 0x0005, 0x0006, 0x9084, 0x0780,
-	0x190c, 0x7ec6, 0x000e, 0x0005, 0xa898, 0x9084, 0x0003, 0x05a8,
-	0x080c, 0xab97, 0x05d8, 0x2900, 0x6016, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x0035, 0x1138, 0x6028, 0xc0fd, 0x602a, 0x2001, 0x196b,
-	0x2004, 0x0098, 0xa8a0, 0x9084, 0x00ff, 0xa99c, 0x918c, 0xff00,
-	0x9105, 0xa99c, 0x918c, 0x00ff, 0x080c, 0x25fb, 0x1540, 0x00b6,
-	0x080c, 0x6625, 0x2b00, 0x00be, 0x1510, 0x6012, 0x6023, 0x0001,
-	0x2009, 0x0040, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0035, 0x0110,
-	0x2009, 0x0041, 0x080c, 0xac8c, 0x0005, 0xa87b, 0x0101, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6d80, 0x012e, 0x0005, 0xa87b, 0x002c,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x6d80, 0x012e, 0x0005, 0xa87b,
-	0x0028, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d80, 0x012e, 0x080c,
-	0xabed, 0x0005, 0x00d6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6,
-	0x7007, 0x0001, 0xaa74, 0x9282, 0x0004, 0x1a04, 0x7eb7, 0xa97c,
-	0x9188, 0x1000, 0x2104, 0x905d, 0xb804, 0xd284, 0x0140, 0x05e8,
-	0x8007, 0x9084, 0x00ff, 0x9084, 0x0006, 0x1108, 0x04b0, 0x2b10,
-	0x080c, 0xab97, 0x1118, 0x080c, 0xac5f, 0x05a8, 0x6212, 0xa874,
-	0x0002, 0x7e95, 0x7e9a, 0x7e9d, 0x7ea3, 0x2019, 0x0002, 0x080c,
-	0xe239, 0x0060, 0x080c, 0xe1c9, 0x0048, 0x2019, 0x0002, 0xa980,
-	0x080c, 0xe1e8, 0x0018, 0xa980, 0x080c, 0xe1c9, 0x080c, 0xabed,
-	0xa887, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d80, 0x012e,
-	0x00be, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00de, 0x0005, 0xa887,
-	0x0006, 0x0c80, 0xa887, 0x0002, 0x0c68, 0xa887, 0x0005, 0x0c50,
-	0xa887, 0x0004, 0x0c38, 0xa887, 0x0007, 0x0c20, 0x2091, 0x8000,
-	0x0e04, 0x7ec8, 0x0006, 0x0016, 0x2001, 0x8003, 0x0006, 0x0804,
-	0x0d86, 0x2001, 0x1834, 0x2004, 0x9005, 0x0005, 0x0005, 0x00f6,
-	0x2079, 0x0300, 0x2001, 0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102,
-	0x2009, 0x0218, 0x210c, 0xd1ec, 0x1120, 0x080c, 0x1608, 0x00fe,
-	0x0005, 0x2001, 0x020d, 0x2003, 0x0020, 0x781f, 0x0300, 0x00fe,
-	0x0005, 0x781c, 0xd08c, 0x0904, 0x7f49, 0x68c0, 0x90aa, 0x0005,
-	0x0a04, 0x854a, 0x7d44, 0x7c40, 0xd59c, 0x190c, 0x0d7d, 0x9584,
-	0x00f6, 0x1508, 0x9484, 0x7000, 0x0138, 0x908a, 0x2000, 0x1258,
-	0x9584, 0x0700, 0x8007, 0x04f0, 0x7000, 0x9084, 0xff00, 0x9086,
-	0x8100, 0x0db0, 0x00b0, 0x9484, 0x0fff, 0x1130, 0x7000, 0x9084,
-	0xff00, 0x9086, 0x8100, 0x11c0, 0x080c, 0xe6da, 0x080c, 0x8441,
-	0x7817, 0x0140, 0x00a8, 0x9584, 0x0076, 0x1118, 0x080c, 0x849d,
-	0x19c8, 0xd5a4, 0x0148, 0x0046, 0x0056, 0x080c, 0x7f99, 0x080c,
-	0x2115, 0x005e, 0x004e, 0x0020, 0x080c, 0xe6da, 0x7817, 0x0140,
-	0x080c, 0x74e9, 0x0168, 0x2001, 0x0111, 0x2004, 0xd08c, 0x0140,
-	0x6893, 0x0000, 0x2001, 0x0110, 0x2003, 0x0008, 0x2003, 0x0000,
-	0x0489, 0x0005, 0x0002, 0x7f56, 0x8263, 0x7f53, 0x7f53, 0x7f53,
-	0x7f53, 0x7f53, 0x7f53, 0x7817, 0x0140, 0x0005, 0x7000, 0x908c,
-	0xff00, 0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x6892, 0x9286,
-	0x2000, 0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x573b,
-	0x0070, 0x080c, 0x7fb9, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c,
-	0x81a0, 0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x8377, 0x7817,
-	0x0140, 0x0005, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0178, 0x2001,
-	0x1800, 0x2004, 0x9086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011,
-	0x8048, 0x2518, 0x080c, 0x4b07, 0x003e, 0x002e, 0x0005, 0x0036,
-	0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30,
-	0x0050, 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44,
-	0x7c40, 0x2019, 0xffff, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0160,
-	0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1130, 0x0026, 0x2011,
-	0x8048, 0x080c, 0x4b07, 0x002e, 0x00fe, 0x005e, 0x004e, 0x003e,
-	0x0005, 0x00b6, 0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, 0x9096,
-	0x0001, 0x0120, 0x9096, 0x0023, 0x1904, 0x8171, 0x9186, 0x0023,
-	0x15c0, 0x080c, 0x840c, 0x0904, 0x8171, 0x6120, 0x9186, 0x0001,
-	0x0150, 0x9186, 0x0004, 0x0138, 0x9186, 0x0008, 0x0120, 0x9186,
-	0x000a, 0x1904, 0x8171, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200,
-	0x1130, 0x2009, 0x0015, 0x080c, 0xac8c, 0x0804, 0x8171, 0x908e,
-	0x0214, 0x0118, 0x908e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c,
-	0xac8c, 0x0804, 0x8171, 0x908e, 0x0100, 0x1904, 0x8171, 0x7034,
-	0x9005, 0x1904, 0x8171, 0x2009, 0x0016, 0x080c, 0xac8c, 0x0804,
-	0x8171, 0x9186, 0x0022, 0x1904, 0x8171, 0x7030, 0x908e, 0x0300,
-	0x1580, 0x68dc, 0xd0a4, 0x0528, 0xc0b5, 0x68de, 0x7100, 0x918c,
-	0x00ff, 0x697e, 0x7004, 0x6882, 0x00f6, 0x2079, 0x0100, 0x79e6,
-	0x78ea, 0x0006, 0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x2644,
-	0x7932, 0x7936, 0x001e, 0x000e, 0x00fe, 0x080c, 0x25fb, 0x695e,
-	0x703c, 0x00e6, 0x2071, 0x0140, 0x7086, 0x2071, 0x1800, 0x70b6,
-	0x00ee, 0x7034, 0x9005, 0x1904, 0x8171, 0x2009, 0x0017, 0x0804,
-	0x8121, 0x908e, 0x0400, 0x1190, 0x7034, 0x9005, 0x1904, 0x8171,
-	0x080c, 0x74e9, 0x0120, 0x2009, 0x001d, 0x0804, 0x8121, 0x68dc,
-	0xc0a5, 0x68de, 0x2009, 0x0030, 0x0804, 0x8121, 0x908e, 0x0500,
-	0x1140, 0x7034, 0x9005, 0x1904, 0x8171, 0x2009, 0x0018, 0x0804,
-	0x8121, 0x908e, 0x2010, 0x1120, 0x2009, 0x0019, 0x0804, 0x8121,
-	0x908e, 0x2110, 0x1120, 0x2009, 0x001a, 0x0804, 0x8121, 0x908e,
-	0x5200, 0x1140, 0x7034, 0x9005, 0x1904, 0x8171, 0x2009, 0x001b,
-	0x0804, 0x8121, 0x908e, 0x5000, 0x1140, 0x7034, 0x9005, 0x1904,
-	0x8171, 0x2009, 0x001c, 0x0804, 0x8121, 0x908e, 0x1300, 0x1120,
-	0x2009, 0x0034, 0x0804, 0x8121, 0x908e, 0x1200, 0x1140, 0x7034,
-	0x9005, 0x1904, 0x8171, 0x2009, 0x0024, 0x0804, 0x8121, 0x908c,
-	0xff00, 0x918e, 0x2400, 0x1170, 0x2009, 0x002d, 0x2001, 0x1810,
-	0x2004, 0xd09c, 0x0904, 0x8121, 0x080c, 0xd64f, 0x1904, 0x8171,
-	0x0804, 0x811f, 0x908c, 0xff00, 0x918e, 0x5300, 0x1120, 0x2009,
-	0x002a, 0x0804, 0x8121, 0x908e, 0x0f00, 0x1120, 0x2009, 0x0020,
-	0x0804, 0x8121, 0x908e, 0x6104, 0x1530, 0x2029, 0x0205, 0x2011,
-	0x026d, 0x8208, 0x2204, 0x9082, 0x0004, 0x8004, 0x8004, 0x20a8,
-	0x2011, 0x8015, 0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x4b07,
-	0x004e, 0x8108, 0x0f04, 0x80d5, 0x9186, 0x0280, 0x1d88, 0x2504,
-	0x8000, 0x202a, 0x2009, 0x0260, 0x0c58, 0x202b, 0x0000, 0x2009,
-	0x0023, 0x0804, 0x8121, 0x908e, 0x6000, 0x1120, 0x2009, 0x003f,
-	0x0804, 0x8121, 0x908e, 0x5400, 0x1138, 0x080c, 0x84fa, 0x1904,
-	0x8171, 0x2009, 0x0046, 0x04a8, 0x908e, 0x5500, 0x1148, 0x080c,
-	0x8522, 0x1118, 0x2009, 0x0041, 0x0460, 0x2009, 0x0042, 0x0448,
-	0x908e, 0x7800, 0x1118, 0x2009, 0x0045, 0x0418, 0x908e, 0x1000,
-	0x1118, 0x2009, 0x004e, 0x00e8, 0x908e, 0x6300, 0x1118, 0x2009,
-	0x004a, 0x00b8, 0x908c, 0xff00, 0x918e, 0x5600, 0x1118, 0x2009,
-	0x004f, 0x0078, 0x908c, 0xff00, 0x918e, 0x5700, 0x1118, 0x2009,
-	0x0050, 0x0038, 0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009,
-	0x004c, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c,
-	0x25fb, 0x1904, 0x8174, 0x080c, 0x65c4, 0x1904, 0x8174, 0xbe12,
-	0xbd16, 0x001e, 0x0016, 0x080c, 0x74e9, 0x01c0, 0x68dc, 0xd08c,
-	0x1148, 0x7000, 0x9084, 0x00ff, 0x1188, 0x7004, 0x9084, 0xff00,
-	0x1168, 0x0040, 0x687c, 0x9606, 0x1148, 0x6880, 0x9506, 0x9084,
-	0xff00, 0x1120, 0x9584, 0x00ff, 0xb886, 0x0080, 0xb884, 0x9005,
-	0x1168, 0x9186, 0x0046, 0x1150, 0x687c, 0x9606, 0x1138, 0x6880,
-	0x9506, 0x9084, 0xff00, 0x1110, 0x001e, 0x0098, 0x080c, 0xab97,
-	0x01a8, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e,
-	0x9186, 0x004c, 0x1110, 0x6023, 0x000a, 0x0016, 0x001e, 0x080c,
-	0xac8c, 0x00ce, 0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e,
-	0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b07, 0x080c,
-	0xac5f, 0x0d90, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a,
-	0x001e, 0x0016, 0x9186, 0x0017, 0x0118, 0x9186, 0x0030, 0x1128,
-	0x6007, 0x0009, 0x6017, 0x2900, 0x0020, 0x6007, 0x0051, 0x6017,
-	0x0000, 0x602f, 0x0009, 0x6003, 0x0001, 0x080c, 0x9225, 0x08a0,
-	0x080c, 0x3332, 0x1140, 0x7010, 0x9084, 0xff00, 0x8007, 0x908e,
-	0x0008, 0x1108, 0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000,
-	0x908c, 0xff00, 0x810f, 0x9186, 0x0033, 0x11e8, 0x080c, 0x840c,
-	0x0904, 0x81fb, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1140,
-	0x7034, 0x9005, 0x15c0, 0x2009, 0x0015, 0x080c, 0xac8c, 0x0498,
-	0x908e, 0x0100, 0x1580, 0x7034, 0x9005, 0x1568, 0x2009, 0x0016,
-	0x080c, 0xac8c, 0x0440, 0x9186, 0x0032, 0x1528, 0x7030, 0x908e,
-	0x1400, 0x1508, 0x2009, 0x0038, 0x0016, 0x2011, 0x0263, 0x2204,
-	0x8211, 0x220c, 0x080c, 0x25fb, 0x11a8, 0x080c, 0x65c4, 0x1190,
-	0xbe12, 0xbd16, 0x080c, 0xab97, 0x0168, 0x2b08, 0x6112, 0x080c,
-	0xcccc, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0xac8c,
-	0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6,
-	0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8,
-	0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f,
-	0x0804, 0x825d, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804,
-	0x825d, 0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011,
-	0x0000, 0x2019, 0x1837, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9,
-	0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f,
-	0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0,
-	0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600,
-	0x9706, 0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745,
-	0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6,
-	0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04, 0x8232, 0x82ff, 0x1118,
-	0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee,
-	0x004e, 0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184,
-	0x000f, 0x0002, 0x827a, 0x827a, 0x827a, 0x841e, 0x827a, 0x827d,
-	0x82a2, 0x832b, 0x827a, 0x827a, 0x827a, 0x827a, 0x827a, 0x827a,
-	0x827a, 0x827a, 0x7817, 0x0140, 0x0005, 0x00b6, 0x7110, 0xd1bc,
-	0x01e8, 0x7120, 0x2160, 0x9c8c, 0x0003, 0x11c0, 0x9c8a, 0x1ddc,
-	0x02a8, 0x6868, 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110,
-	0x2158, 0xb910, 0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130,
-	0x7124, 0x610a, 0x2009, 0x0046, 0x080c, 0xac8c, 0x7817, 0x0140,
-	0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484, 0x0fff, 0x0904, 0x8307,
-	0x7110, 0xd1bc, 0x1904, 0x8307, 0x7108, 0x700c, 0x2028, 0x918c,
-	0x00ff, 0x2130, 0x9094, 0xff00, 0x15c8, 0x81ff, 0x15b8, 0x9080,
-	0x3374, 0x200d, 0x918c, 0xff00, 0x810f, 0x2001, 0x0080, 0x9106,
-	0x0904, 0x8307, 0x9182, 0x0801, 0x1a04, 0x8307, 0x9190, 0x1000,
-	0x2204, 0x905d, 0x05e0, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15b8,
-	0xba04, 0x9294, 0xff00, 0x9286, 0x0600, 0x1190, 0x080c, 0xab97,
-	0x0598, 0x2b08, 0x7028, 0x6052, 0x702c, 0x604e, 0x6112, 0x6023,
-	0x0006, 0x7120, 0x610a, 0x7130, 0x615e, 0x080c, 0xd8b5, 0x00f8,
-	0x080c, 0x6a6b, 0x1138, 0xb807, 0x0606, 0x0c40, 0x190c, 0x81ff,
-	0x11b0, 0x0880, 0x080c, 0xab97, 0x2b08, 0x0188, 0x6112, 0x6023,
-	0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007, 0x0005,
-	0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9225, 0x7817,
-	0x0140, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0ec,
-	0x0120, 0x2011, 0x8049, 0x080c, 0x4b07, 0x080c, 0xac5f, 0x0d78,
-	0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x615e,
-	0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022,
-	0x080c, 0x921e, 0x08e0, 0x00b6, 0x7110, 0xd1bc, 0x05d0, 0x7020,
-	0x2060, 0x9c84, 0x0003, 0x15a8, 0x9c82, 0x1ddc, 0x0690, 0x6868,
-	0x9c02, 0x1678, 0x9484, 0x0fff, 0x9082, 0x000c, 0x0650, 0x7008,
-	0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1510, 0x700c,
-	0xb914, 0x9106, 0x11f0, 0x7124, 0x610a, 0x601c, 0xd0fc, 0x11c8,
-	0x2001, 0x0271, 0x2004, 0x9005, 0x1180, 0x9484, 0x0fff, 0x9082,
-	0x000c, 0x0158, 0x0066, 0x2031, 0x0100, 0xa001, 0xa001, 0x8631,
-	0x1de0, 0x006e, 0x601c, 0xd0fc, 0x1120, 0x2009, 0x0045, 0x080c,
-	0xac8c, 0x7817, 0x0140, 0x00be, 0x0005, 0x6120, 0x9186, 0x0002,
-	0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001, 0x0005, 0x080c,
-	0x3332, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086, 0x0000,
-	0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b, 0x0005,
-	0x838e, 0x838f, 0x838e, 0x838e, 0x83ee, 0x83fd, 0x0005, 0x00b6,
-	0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904, 0x83ec, 0x700c,
-	0x7108, 0x080c, 0x25fb, 0x1904, 0x83ec, 0x080c, 0x65c4, 0x1904,
-	0x83ec, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8, 0x080c, 0x6a6b,
-	0x0118, 0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, 0x840c, 0x00ce,
-	0x05d8, 0x080c, 0xab97, 0x2b08, 0x05b8, 0x6112, 0x080c, 0xcccc,
-	0x6023, 0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0xac8c,
-	0x0458, 0x080c, 0x6a6b, 0x0148, 0x9086, 0x0004, 0x0130, 0x080c,
-	0x6a73, 0x0118, 0x9086, 0x0004, 0x1180, 0x080c, 0xab97, 0x2b08,
-	0x01d8, 0x6112, 0x080c, 0xcccc, 0x6023, 0x0005, 0x7120, 0x610a,
-	0x2009, 0x0088, 0x080c, 0xac8c, 0x0078, 0x080c, 0xab97, 0x2b08,
-	0x0158, 0x6112, 0x080c, 0xcccc, 0x6023, 0x0004, 0x7120, 0x610a,
-	0x2009, 0x0001, 0x080c, 0xac8c, 0x00be, 0x0005, 0x7110, 0xd1bc,
-	0x0158, 0x00d1, 0x0148, 0x080c, 0x836d, 0x1130, 0x7124, 0x610a,
-	0x2009, 0x0089, 0x080c, 0xac8c, 0x0005, 0x7110, 0xd1bc, 0x0158,
-	0x0059, 0x0148, 0x080c, 0x836d, 0x1130, 0x7124, 0x610a, 0x2009,
-	0x008a, 0x080c, 0xac8c, 0x0005, 0x7020, 0x2060, 0x9c84, 0x0003,
-	0x1158, 0x9c82, 0x1ddc, 0x0240, 0x2001, 0x181a, 0x2004, 0x9c02,
-	0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x00b6, 0x7110,
-	0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84, 0x0003, 0x11b0, 0x9c82,
-	0x1ddc, 0x0298, 0x6868, 0x9c02, 0x1280, 0x7008, 0x9084, 0x00ff,
-	0x6110, 0x2158, 0xb910, 0x9106, 0x1140, 0x700c, 0xb914, 0x9106,
-	0x1120, 0x2009, 0x0051, 0x080c, 0xac8c, 0x7817, 0x0140, 0x00be,
-	0x0005, 0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049,
-	0x0005, 0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009,
-	0x0005, 0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086,
-	0xc000, 0x05c0, 0x080c, 0xab97, 0x05a8, 0x0066, 0x00c6, 0x0046,
-	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x25fb, 0x1590,
-	0x080c, 0x65c4, 0x1578, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce,
-	0x6012, 0x080c, 0xcccc, 0x080c, 0x103a, 0x0500, 0x2900, 0x6062,
-	0x9006, 0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9,
-	0x000e, 0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003,
-	0x006e, 0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001,
-	0x080c, 0x9225, 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c, 0xabed,
-	0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6, 0x7000, 0x908c,
-	0xff00, 0x9184, 0xf000, 0x810f, 0x9086, 0x2000, 0x1904, 0x84f4,
-	0x9186, 0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005, 0x1904,
-	0x84f6, 0x7030, 0x908e, 0x0400, 0x0904, 0x84f6, 0x908e, 0x6000,
-	0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e, 0x0300, 0x11d8, 0x2009,
-	0x1837, 0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c, 0x6a29,
-	0x0558, 0x68b0, 0x9084, 0x00ff, 0x7100, 0x918c, 0x00ff, 0x9106,
-	0x1518, 0x6880, 0x69b0, 0x918c, 0xff00, 0x9105, 0x7104, 0x9106,
-	0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4, 0x11a8, 0x908e,
-	0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e, 0x5000, 0x09b8,
-	0x0058, 0x9186, 0x0023, 0x1140, 0x080c, 0x840c, 0x0128, 0x6004,
-	0x9086, 0x0002, 0x0118, 0x0000, 0x9006, 0x0010, 0x9085, 0x0001,
-	0x00ce, 0x0005, 0x0156, 0x0046, 0x0016, 0x0036, 0x7038, 0x2020,
-	0x8427, 0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004, 0x2019,
-	0x1805, 0x2011, 0x027a, 0x080c, 0xbbae, 0x1178, 0xd48c, 0x0148,
-	0x20a9, 0x0004, 0x2019, 0x1801, 0x2011, 0x027e, 0x080c, 0xbbae,
-	0x1120, 0xd494, 0x0110, 0x9085, 0x0001, 0x003e, 0x001e, 0x004e,
-	0x015e, 0x0005, 0x0156, 0x0046, 0x0016, 0x0036, 0x7038, 0x2020,
-	0x8427, 0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004, 0x2019,
-	0x1805, 0x2011, 0x0272, 0x080c, 0xbbae, 0x1178, 0xd48c, 0x0148,
-	0x20a9, 0x0004, 0x2019, 0x1801, 0x2011, 0x0276, 0x080c, 0xbbae,
-	0x1120, 0xd494, 0x0110, 0x9085, 0x0001, 0x003e, 0x001e, 0x004e,
-	0x015e, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7800, 0xc0e5, 0xc0cc,
-	0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800, 0x7834, 0xd084,
-	0x1130, 0x2079, 0x0200, 0x7800, 0x9085, 0x1200, 0x7802, 0x00fe,
-	0x0005, 0x00e6, 0x2071, 0x1800, 0x7034, 0xc084, 0x7036, 0x00ee,
-	0x0005, 0x2071, 0x1a03, 0x7003, 0x0003, 0x700f, 0x0361, 0x9006,
-	0x701a, 0x7072, 0x7012, 0x7017, 0x1ddc, 0x7007, 0x0000, 0x7026,
-	0x702b, 0x9e54, 0x7032, 0x7037, 0x9ed1, 0x703f, 0xffff, 0x7042,
-	0x7047, 0x5571, 0x704a, 0x705b, 0x8711, 0x080c, 0x1053, 0x090c,
-	0x0d7d, 0x2900, 0x703a, 0xa867, 0x0003, 0xa86f, 0x0100, 0xa8ab,
-	0xdcb0, 0x0005, 0x2071, 0x1a03, 0x1d04, 0x862d, 0x2091, 0x6000,
-	0x700c, 0x8001, 0x700e, 0x1590, 0x2001, 0x013c, 0x2004, 0x9005,
-	0x190c, 0x87bb, 0x2001, 0x1869, 0x2004, 0xd0c4, 0x0158, 0x3a00,
-	0xd08c, 0x1140, 0x20d1, 0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000,
-	0x080c, 0x0d7d, 0x700f, 0x0361, 0x7007, 0x0001, 0x0126, 0x2091,
-	0x8000, 0x2069, 0x1800, 0x69ec, 0xd1e4, 0x1138, 0xd1dc, 0x1118,
-	0x080c, 0x877f, 0x0010, 0x080c, 0x8756, 0x7040, 0x900d, 0x0148,
-	0x8109, 0x7142, 0x1130, 0x7044, 0x080f, 0x0018, 0x0126, 0x2091,
-	0x8000, 0x7024, 0x900d, 0x0188, 0x7020, 0x8001, 0x7022, 0x1168,
-	0x7023, 0x0009, 0x8109, 0x7126, 0x9186, 0x03e8, 0x1110, 0x7028,
-	0x080f, 0x81ff, 0x1110, 0x7028, 0x080f, 0x7030, 0x900d, 0x0180,
-	0x702c, 0x8001, 0x702e, 0x1160, 0x702f, 0x0009, 0x8109, 0x7132,
-	0x0128, 0x9184, 0x007f, 0x090c, 0x9f6d, 0x0010, 0x7034, 0x080f,
-	0x703c, 0x9005, 0x0118, 0x0310, 0x8001, 0x703e, 0x704c, 0x900d,
-	0x0168, 0x7048, 0x8001, 0x704a, 0x1148, 0x704b, 0x0009, 0x8109,
-	0x714e, 0x1120, 0x7150, 0x714e, 0x7058, 0x080f, 0x7018, 0x900d,
-	0x01d8, 0x0016, 0x7070, 0x900d, 0x0158, 0x706c, 0x8001, 0x706e,
-	0x1138, 0x706f, 0x0009, 0x8109, 0x7172, 0x1110, 0x7074, 0x080f,
-	0x001e, 0x7008, 0x8001, 0x700a, 0x1138, 0x700b, 0x0009, 0x8109,
-	0x711a, 0x1110, 0x701c, 0x080f, 0x012e, 0x7004, 0x0002, 0x8655,
-	0x8656, 0x8680, 0x00e6, 0x2071, 0x1a03, 0x7018, 0x9005, 0x1120,
-	0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006,
-	0x2071, 0x1a03, 0x701c, 0x9206, 0x1120, 0x701a, 0x701e, 0x7072,
-	0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1a03, 0xb888,
-	0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005, 0x0005, 0x00b6, 0x2031,
-	0x0010, 0x7110, 0x080c, 0x6625, 0x11a8, 0xb888, 0x8001, 0x0290,
-	0xb88a, 0x1180, 0x0126, 0x2091, 0x8000, 0x0066, 0xb8d0, 0x9005,
-	0x0138, 0x0026, 0xba3c, 0x0016, 0x080c, 0x6750, 0x001e, 0x002e,
-	0x006e, 0x012e, 0x8108, 0x9182, 0x0800, 0x1220, 0x8631, 0x0128,
-	0x7112, 0x0c00, 0x900e, 0x7007, 0x0002, 0x7112, 0x00be, 0x0005,
-	0x2031, 0x0010, 0x7014, 0x2060, 0x0126, 0x2091, 0x8000, 0x6048,
-	0x9005, 0x0128, 0x8001, 0x604a, 0x1110, 0x080c, 0xcb4d, 0x6018,
-	0x9005, 0x0904, 0x86d8, 0x00f6, 0x2079, 0x0300, 0x7918, 0xd1b4,
-	0x1904, 0x86eb, 0x781b, 0x2020, 0xa001, 0x7918, 0xd1b4, 0x0120,
-	0x781b, 0x2000, 0x0804, 0x86eb, 0x8001, 0x601a, 0x0106, 0x781b,
-	0x2000, 0xa001, 0x7918, 0xd1ac, 0x1dd0, 0x010e, 0x00fe, 0x1540,
-	0x6120, 0x9186, 0x0003, 0x0148, 0x9186, 0x0006, 0x0130, 0x9186,
-	0x0009, 0x11e0, 0x611c, 0xd1c4, 0x1100, 0x080c, 0xc838, 0x01b0,
-	0x6014, 0x2048, 0xa884, 0x908a, 0x199a, 0x0280, 0x9082, 0x1999,
-	0xa886, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x800b,
-	0x810b, 0x9108, 0x611a, 0x080c, 0xcf7e, 0x0110, 0x080c, 0xc536,
-	0x012e, 0x9c88, 0x001c, 0x7116, 0x2001, 0x181a, 0x2004, 0x9102,
-	0x1228, 0x8631, 0x0138, 0x2160, 0x0804, 0x8684, 0x7017, 0x1ddc,
-	0x7007, 0x0000, 0x0005, 0x00fe, 0x0c58, 0x00e6, 0x2071, 0x1a03,
-	0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005, 0x2001, 0x1a0c,
-	0x2003, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1a03, 0x7132, 0x702f,
-	0x0009, 0x00ee, 0x0005, 0x2011, 0x1a0f, 0x2013, 0x0000, 0x0005,
-	0x00e6, 0x2071, 0x1a03, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee,
-	0x0005, 0x0086, 0x0026, 0x7054, 0x8000, 0x7056, 0x2001, 0x1a11,
-	0x2044, 0xa06c, 0x9086, 0x0000, 0x0150, 0x7068, 0xa09a, 0x7064,
-	0xa096, 0x7060, 0xa092, 0x705c, 0xa08e, 0x080c, 0x1124, 0x002e,
-	0x008e, 0x0005, 0x0006, 0x0016, 0x0096, 0x00a6, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c, 0x8592, 0x015e, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x001e, 0x000e,
-	0x0005, 0x00e6, 0x2071, 0x1a03, 0x7172, 0x7276, 0x706f, 0x0009,
-	0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x1a03, 0x7074, 0x9206,
-	0x1110, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x2069, 0x1800,
-	0x69ec, 0xd1e4, 0x1518, 0x0026, 0xd1ec, 0x0140, 0x6a54, 0x6874,
-	0x9202, 0x0288, 0x8117, 0x9294, 0x00c1, 0x0088, 0x9184, 0x0007,
-	0x01a0, 0x8109, 0x9184, 0x0007, 0x0110, 0x69ee, 0x0070, 0x8107,
-	0x9084, 0x0007, 0x910d, 0x8107, 0x9106, 0x9094, 0x00c1, 0x9184,
-	0xff3e, 0x9205, 0x68ee, 0x080c, 0x0f05, 0x002e, 0x0005, 0x69e8,
-	0x9184, 0x003f, 0x05b8, 0x8109, 0x9184, 0x003f, 0x01a8, 0x6a54,
-	0x6874, 0x9202, 0x0220, 0xd1bc, 0x0168, 0xc1bc, 0x0018, 0xd1bc,
-	0x1148, 0xc1bd, 0x2110, 0x00e6, 0x2071, 0x1800, 0x080c, 0x0f27,
-	0x00ee, 0x0400, 0x69ea, 0x00f0, 0x0026, 0x8107, 0x9094, 0x0007,
-	0x0128, 0x8001, 0x8007, 0x9085, 0x0007, 0x0050, 0x2010, 0x8004,
-	0x8004, 0x8004, 0x9084, 0x0007, 0x9205, 0x8007, 0x9085, 0x0028,
-	0x9086, 0x0040, 0x2010, 0x00e6, 0x2071, 0x1800, 0x080c, 0x0f27,
-	0x00ee, 0x002e, 0x0005, 0x0016, 0x00c6, 0x2009, 0xfffc, 0x210d,
-	0x2061, 0x0100, 0x60f0, 0x9100, 0x60f3, 0x0000, 0x2009, 0xfffc,
-	0x200f, 0x1220, 0x8108, 0x2105, 0x8000, 0x200f, 0x00ce, 0x001e,
-	0x0005, 0x00c6, 0x2061, 0x1a6f, 0x00ce, 0x0005, 0x9184, 0x000f,
-	0x8003, 0x8003, 0x8003, 0x9080, 0x1a6f, 0x2060, 0x0005, 0xa884,
-	0x908a, 0x199a, 0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a6f,
-	0x6014, 0x00ce, 0x9005, 0x1130, 0x2001, 0x001e, 0x0018, 0x908e,
-	0xffff, 0x01b0, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c,
-	0x908c, 0x00c0, 0x918e, 0x00c0, 0x0904, 0x8896, 0xd0b4, 0x1168,
-	0xd0bc, 0x1904, 0x886f, 0x2009, 0x0006, 0x080c, 0x88c3, 0x0005,
-	0x900e, 0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc, 0x05c8, 0x908c,
-	0x2023, 0x1550, 0x87ff, 0x1540, 0x6124, 0x918c, 0x0500, 0x1520,
-	0x6100, 0x918e, 0x0007, 0x1500, 0x2009, 0x1869, 0x210c, 0xd184,
-	0x11d8, 0x6003, 0x0003, 0x6007, 0x0043, 0x6047, 0xb035, 0x080c,
-	0x1c03, 0xa87c, 0xc0dd, 0xa87e, 0x600f, 0x0000, 0x00f6, 0x2079,
-	0x0380, 0x7818, 0xd0bc, 0x1de8, 0x7833, 0x0013, 0x2c00, 0x7836,
-	0x781b, 0x8080, 0x00fe, 0x0005, 0x908c, 0x0003, 0x0120, 0x918e,
-	0x0003, 0x1904, 0x88bd, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8,
-	0x6024, 0xd0d4, 0x11e8, 0x2009, 0x1869, 0x2104, 0xd084, 0x1138,
-	0x87ff, 0x1120, 0x2009, 0x0043, 0x0804, 0xac8c, 0x0005, 0x87ff,
-	0x1de8, 0x2009, 0x0042, 0x0804, 0xac8c, 0x6110, 0x00b6, 0x2158,
-	0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd, 0x6026, 0x0c00,
-	0xc0d4, 0x6026, 0xa890, 0x602e, 0xa88c, 0x6032, 0x08e0, 0xd0fc,
-	0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x88bd,
-	0x908c, 0x2020, 0x918e, 0x2020, 0x0170, 0x0076, 0x00f6, 0x2c78,
-	0x080c, 0x1731, 0x00fe, 0x007e, 0x87ff, 0x1120, 0x2009, 0x0042,
-	0x080c, 0xac8c, 0x0005, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be,
-	0xd1ac, 0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38, 0xd0fc, 0x0188,
-	0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x9084, 0x0003, 0x908e,
-	0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, 0x0041, 0x080c, 0xac8c,
-	0x0005, 0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009, 0x0043, 0x080c,
-	0xac8c, 0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac,
-	0x0d20, 0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009, 0x0004, 0x0019,
-	0x0005, 0x2009, 0x0001, 0x0096, 0x080c, 0xc838, 0x0518, 0x6014,
-	0x2048, 0xa982, 0xa800, 0x6016, 0x9186, 0x0001, 0x1188, 0xa97c,
-	0x918c, 0x8100, 0x918e, 0x8100, 0x1158, 0x00c6, 0x2061, 0x1a6f,
-	0x6200, 0xd28c, 0x1120, 0x6204, 0x8210, 0x0208, 0x6206, 0x00ce,
-	0x080c, 0x6bb5, 0x6014, 0x904d, 0x0076, 0x2039, 0x0000, 0x190c,
-	0x87df, 0x007e, 0x009e, 0x0005, 0x0156, 0x00c6, 0x2061, 0x1a6f,
-	0x6000, 0x81ff, 0x0110, 0x9205, 0x0008, 0x9204, 0x6002, 0x00ce,
-	0x015e, 0x0005, 0x6800, 0xd08c, 0x1138, 0x6808, 0x9005, 0x0120,
-	0x8001, 0x680a, 0x9085, 0x0001, 0x0005, 0x2071, 0x1923, 0x7003,
-	0x0006, 0x7007, 0x0000, 0x700f, 0x0000, 0x7013, 0x0001, 0x080c,
-	0x1053, 0x090c, 0x0d7d, 0xa867, 0x0006, 0xa86b, 0x0001, 0xa8ab,
-	0xdcb0, 0xa89f, 0x0000, 0x2900, 0x702e, 0x7033, 0x0000, 0x0005,
-	0x0096, 0x00e6, 0x2071, 0x1923, 0x702c, 0x2048, 0x6a2c, 0x721e,
-	0x6b30, 0x7322, 0x6834, 0x7026, 0xa896, 0x6838, 0x702a, 0xa89a,
-	0x6824, 0x7016, 0x683c, 0x701a, 0x2009, 0x0028, 0x200a, 0x9005,
-	0x0148, 0x900e, 0x9188, 0x000c, 0x8001, 0x1de0, 0x2100, 0x9210,
-	0x1208, 0x8318, 0xaa8e, 0xab92, 0x7010, 0xd084, 0x0178, 0xc084,
-	0x7007, 0x0001, 0x700f, 0x0000, 0x0006, 0x2009, 0x181d, 0x2104,
-	0x9082, 0x0007, 0x2009, 0x1b4e, 0x200a, 0x000e, 0xc095, 0x7012,
-	0x2008, 0x2001, 0x003b, 0x080c, 0x1679, 0x9006, 0x2071, 0x193c,
-	0x7002, 0x7006, 0x702a, 0x00ee, 0x009e, 0x0005, 0x00e6, 0x0126,
-	0x0156, 0x2091, 0x8000, 0x2071, 0x1800, 0x7154, 0x2001, 0x0008,
-	0x910a, 0x0638, 0x2001, 0x187d, 0x20ac, 0x9006, 0x9080, 0x0008,
-	0x1f04, 0x8976, 0x71c0, 0x9102, 0x02e0, 0x2071, 0x1877, 0x20a9,
-	0x0007, 0x00c6, 0x080c, 0xab97, 0x6023, 0x0009, 0x6003, 0x0004,
-	0x601f, 0x0101, 0x0089, 0x0126, 0x2091, 0x8000, 0x080c, 0x8afc,
-	0x012e, 0x1f04, 0x8982, 0x9006, 0x00ce, 0x015e, 0x012e, 0x00ee,
-	0x0005, 0x9085, 0x0001, 0x0cc8, 0x00e6, 0x00b6, 0x0096, 0x0086,
-	0x0056, 0x0046, 0x0026, 0x7118, 0x720c, 0x7620, 0x7004, 0xd084,
-	0x1128, 0x2021, 0x0024, 0x2029, 0x0002, 0x0020, 0x2021, 0x002c,
-	0x2029, 0x000a, 0x080c, 0x103a, 0x090c, 0x0d7d, 0x2900, 0x6016,
-	0x2058, 0xac66, 0x9006, 0xa802, 0xa806, 0xa86a, 0xa87a, 0xa8aa,
-	0xa887, 0x0005, 0xa87f, 0x0020, 0x7008, 0xa89a, 0x7010, 0xa89e,
-	0xae8a, 0xa8af, 0xffff, 0xa8b3, 0x0000, 0x8109, 0x0160, 0x080c,
-	0x103a, 0x090c, 0x0d7d, 0xad66, 0x2b00, 0xa802, 0x2900, 0xb806,
-	0x2058, 0x8109, 0x1da0, 0x002e, 0x004e, 0x005e, 0x008e, 0x009e,
-	0x00be, 0x00ee, 0x0005, 0x2079, 0x0000, 0x2071, 0x1923, 0x7004,
-	0x004b, 0x700c, 0x0002, 0x89ee, 0x89e7, 0x89e7, 0x0005, 0x89f8,
-	0x8a59, 0x8a59, 0x8a59, 0x8a5a, 0x8a6b, 0x8a6b, 0x700c, 0x0cba,
-	0x0126, 0x2091, 0x8000, 0x78a0, 0x79a0, 0x9106, 0x0128, 0x78a0,
-	0x79a0, 0x9106, 0x1904, 0x8a4c, 0x2001, 0x0005, 0x2004, 0xd0bc,
-	0x0130, 0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012, 0x0ca8, 0x012e,
-	0x7018, 0x910a, 0x1130, 0x7030, 0x9005, 0x05a8, 0x080c, 0x8a9a,
-	0x0490, 0x1210, 0x7114, 0x910a, 0x9192, 0x000a, 0x0210, 0x2009,
-	0x000a, 0x2001, 0x1888, 0x2014, 0x2001, 0x1935, 0x2004, 0x9100,
-	0x9202, 0x0e48, 0x080c, 0x8be6, 0x2200, 0x9102, 0x0208, 0x2208,
-	0x0096, 0x702c, 0x2048, 0xa873, 0x0001, 0xa976, 0x080c, 0x8cef,
-	0x2100, 0xa87e, 0xa86f, 0x0000, 0x009e, 0x0126, 0x2091, 0x8000,
-	0x2009, 0x1a21, 0x2104, 0xc085, 0x200a, 0x700f, 0x0002, 0x012e,
-	0x080c, 0x1143, 0x1de8, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc,
-	0x0130, 0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012, 0x0ca8, 0x012e,
-	0x0005, 0x0005, 0x700c, 0x0002, 0x8a5f, 0x8a62, 0x8a61, 0x080c,
-	0x89f6, 0x0005, 0x8001, 0x700e, 0x0096, 0x702c, 0x2048, 0xa974,
-	0x009e, 0x0011, 0x0ca0, 0x0005, 0x0096, 0x702c, 0x2048, 0x7018,
-	0x9100, 0x7214, 0x921a, 0x1130, 0x701c, 0xa88e, 0x7020, 0xa892,
-	0x9006, 0x0068, 0x0006, 0x080c, 0x8cef, 0x2100, 0xaa8c, 0x9210,
-	0xaa8e, 0x1220, 0xa890, 0x9081, 0x0000, 0xa892, 0x000e, 0x009e,
-	0x2f08, 0x9188, 0x0028, 0x200a, 0x701a, 0x0005, 0x00e6, 0x2071,
-	0x1923, 0x700c, 0x0002, 0x8a98, 0x8a98, 0x8a96, 0x700f, 0x0001,
-	0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x7030, 0x9005, 0x0508,
-	0x2078, 0x7814, 0x2048, 0xae88, 0x00b6, 0x2059, 0x0000, 0x080c,
-	0x8b05, 0x00be, 0x01b0, 0x00e6, 0x2071, 0x193c, 0x080c, 0x8b4c,
-	0x00ee, 0x0178, 0x0096, 0x080c, 0x1053, 0x2900, 0x009e, 0x0148,
-	0xa8aa, 0x04b9, 0x0041, 0x2001, 0x1946, 0x2003, 0x0000, 0x012e,
-	0x08c8, 0x012e, 0x0005, 0x00d6, 0x00c6, 0x0086, 0x00a6, 0x2940,
-	0x2650, 0x2600, 0x9005, 0x0180, 0xa864, 0x9084, 0x000f, 0x2068,
-	0x9d88, 0x1e55, 0x2165, 0x0056, 0x2029, 0x0000, 0x080c, 0x8c74,
-	0x080c, 0x1e2b, 0x1dd8, 0x005e, 0x00ae, 0x2001, 0x187f, 0x2004,
-	0xa88a, 0x080c, 0x1731, 0x781f, 0x0101, 0x7813, 0x0000, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x8b5b, 0x012e, 0x008e, 0x00ce, 0x00de,
-	0x0005, 0x7030, 0x9005, 0x0138, 0x2078, 0x780c, 0x7032, 0x2001,
-	0x1946, 0x2003, 0x0001, 0x0005, 0x00e6, 0x2071, 0x1923, 0x7030,
-	0x600e, 0x2c00, 0x7032, 0x00ee, 0x0005, 0x00d6, 0x00c6, 0x0026,
-	0x9b80, 0x8dce, 0x2005, 0x906d, 0x090c, 0x0d7d, 0x9b80, 0x8dc6,
-	0x2005, 0x9065, 0x090c, 0x0d7d, 0x6114, 0x2600, 0x9102, 0x0248,
-	0x6828, 0x9102, 0x02f0, 0x9085, 0x0001, 0x002e, 0x00ce, 0x00de,
-	0x0005, 0x6804, 0xd094, 0x0148, 0x6854, 0xd084, 0x1178, 0xc085,
-	0x6856, 0x2011, 0x8026, 0x080c, 0x4b07, 0x684c, 0x0096, 0x904d,
-	0x090c, 0x0d7d, 0xa804, 0x8000, 0xa806, 0x009e, 0x9006, 0x2030,
-	0x0c20, 0x6854, 0xd08c, 0x1d08, 0xc08d, 0x6856, 0x2011, 0x8025,
-	0x080c, 0x4b07, 0x684c, 0x0096, 0x904d, 0x090c, 0x0d7d, 0xa800,
-	0x8000, 0xa802, 0x009e, 0x0888, 0x7000, 0x2019, 0x0008, 0x8319,
-	0x7104, 0x9102, 0x1118, 0x2300, 0x9005, 0x0020, 0x0210, 0x9302,
-	0x0008, 0x8002, 0x0005, 0x00d6, 0x7814, 0x9005, 0x090c, 0x0d7d,
-	0x781c, 0x9084, 0x0101, 0x9086, 0x0101, 0x190c, 0x0d7d, 0x2069,
-	0x193c, 0x6804, 0x9080, 0x193e, 0x2f08, 0x2102, 0x6904, 0x8108,
-	0x9182, 0x0008, 0x0208, 0x900e, 0x6906, 0x9180, 0x193e, 0x2003,
-	0x0000, 0x00de, 0x0005, 0x0096, 0x00c6, 0x2060, 0x6014, 0x2048,
-	0xa8a8, 0x0096, 0x2048, 0x9005, 0x190c, 0x106c, 0x009e, 0xa8ab,
-	0x0000, 0x080c, 0x0fec, 0x080c, 0xabed, 0x00ce, 0x009e, 0x0005,
-	0x6020, 0x9086, 0x0009, 0x1128, 0x601c, 0xd0c4, 0x0110, 0x9006,
-	0x0005, 0x9085, 0x0001, 0x0005, 0x6000, 0x9086, 0x0000, 0x0178,
-	0x6010, 0x9005, 0x0150, 0x00b6, 0x2058, 0x080c, 0x8f01, 0x00be,
-	0x6013, 0x0000, 0x601b, 0x0000, 0x0010, 0x2c00, 0x0861, 0x0005,
-	0x2009, 0x1927, 0x210c, 0xd194, 0x0005, 0x00e6, 0x2071, 0x1923,
-	0x7110, 0xc194, 0xd19c, 0x1118, 0xc185, 0x7007, 0x0000, 0x7112,
-	0x2001, 0x003b, 0x080c, 0x1679, 0x00ee, 0x0005, 0x0096, 0x00d6,
-	0x9006, 0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x7016, 0x702a,
-	0x7026, 0x702f, 0x0000, 0x080c, 0x8d4e, 0x0170, 0x080c, 0x8d83,
-	0x0158, 0x2900, 0x7002, 0x700a, 0x701a, 0x7013, 0x0001, 0x701f,
-	0x000a, 0x00de, 0x009e, 0x0005, 0x900e, 0x0cd8, 0x00e6, 0x0096,
-	0x0086, 0x00d6, 0x00c6, 0x2071, 0x1930, 0x721c, 0x2100, 0x9202,
-	0x1618, 0x080c, 0x8d83, 0x090c, 0x0d7d, 0x7018, 0x9005, 0x1160,
-	0x2900, 0x7002, 0x700a, 0x701a, 0x9006, 0x7006, 0x700e, 0xa806,
-	0xa802, 0x7012, 0x701e, 0x0038, 0x2040, 0xa806, 0x2900, 0xa002,
-	0x701a, 0xa803, 0x0000, 0x7010, 0x8000, 0x7012, 0x701c, 0x9080,
-	0x000a, 0x701e, 0x721c, 0x08d0, 0x721c, 0x00ce, 0x00de, 0x008e,
-	0x009e, 0x00ee, 0x0005, 0x0096, 0x0156, 0x0136, 0x0146, 0x00e6,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x1930, 0x7300, 0x831f, 0x831e,
-	0x831e, 0x9384, 0x003f, 0x20e8, 0x939c, 0xffc0, 0x9398, 0x0003,
-	0x7104, 0x080c, 0x8cef, 0x810c, 0x2100, 0x9318, 0x8003, 0x2228,
-	0x2021, 0x0078, 0x9402, 0x9532, 0x0208, 0x2028, 0x2500, 0x8004,
-	0x20a8, 0x23a0, 0xa001, 0xa001, 0x4005, 0x2508, 0x080c, 0x8cf8,
-	0x2130, 0x7014, 0x9600, 0x7016, 0x2600, 0x711c, 0x9102, 0x701e,
-	0x7004, 0x9600, 0x2008, 0x9082, 0x000a, 0x1190, 0x7000, 0x2048,
-	0xa800, 0x9005, 0x1148, 0x2009, 0x0001, 0x0026, 0x080c, 0x8be6,
-	0x002e, 0x7000, 0x2048, 0xa800, 0x7002, 0x7007, 0x0000, 0x0008,
-	0x7106, 0x2500, 0x9212, 0x1904, 0x8c25, 0x012e, 0x00ee, 0x014e,
-	0x013e, 0x015e, 0x009e, 0x0005, 0x0016, 0x0026, 0x00e6, 0x0126,
-	0x2091, 0x8000, 0x9580, 0x8dc6, 0x2005, 0x9075, 0x090c, 0x0d7d,
-	0x080c, 0x8cca, 0x012e, 0x9580, 0x8dc2, 0x2005, 0x9075, 0x090c,
-	0x0d7d, 0x0156, 0x0136, 0x01c6, 0x0146, 0x01d6, 0x831f, 0x831e,
-	0x831e, 0x9384, 0x003f, 0x20e0, 0x9384, 0xffc0, 0x9100, 0x2098,
-	0xa860, 0x20e8, 0xa95c, 0x2c05, 0x9100, 0x20a0, 0x20a9, 0x0002,
-	0x4003, 0x2e0c, 0x2d00, 0x0002, 0x8cb4, 0x8cb4, 0x8cb6, 0x8cb4,
-	0x8cb6, 0x8cb4, 0x8cb4, 0x8cb4, 0x8cb4, 0x8cb4, 0x8cbc, 0x8cb4,
-	0x8cbc, 0x8cb4, 0x8cb4, 0x8cb4, 0x080c, 0x0d7d, 0x4104, 0x20a9,
-	0x0002, 0x4002, 0x4003, 0x0028, 0x20a9, 0x0002, 0x4003, 0x4104,
-	0x4003, 0x01de, 0x014e, 0x01ce, 0x013e, 0x015e, 0x00ee, 0x002e,
-	0x001e, 0x0005, 0x0096, 0x7014, 0x8001, 0x7016, 0x710c, 0x2110,
-	0x00f1, 0x810c, 0x9188, 0x0003, 0x7308, 0x8210, 0x9282, 0x000a,
-	0x1198, 0x7008, 0x2048, 0xa800, 0x9005, 0x0158, 0x0006, 0x080c,
-	0x8d92, 0x009e, 0xa807, 0x0000, 0x2900, 0x700a, 0x7010, 0x8001,
-	0x7012, 0x700f, 0x0000, 0x0008, 0x720e, 0x009e, 0x0005, 0x0006,
-	0x810b, 0x810b, 0x2100, 0x810b, 0x9100, 0x2008, 0x000e, 0x0005,
-	0x0006, 0x0026, 0x2100, 0x9005, 0x0158, 0x9092, 0x000c, 0x0240,
-	0x900e, 0x8108, 0x9082, 0x000c, 0x1de0, 0x002e, 0x000e, 0x0005,
-	0x900e, 0x0cd8, 0x2d00, 0x90b8, 0x0008, 0x690c, 0x6810, 0x2019,
-	0x0001, 0x2031, 0x8d38, 0x9112, 0x0220, 0x0118, 0x8318, 0x2208,
-	0x0cd0, 0x6808, 0x9005, 0x0108, 0x8318, 0x233a, 0x6804, 0xd084,
-	0x2300, 0x2021, 0x0001, 0x1150, 0x9082, 0x0003, 0x0967, 0x0a67,
-	0x8420, 0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0, 0x9082, 0x0002,
-	0x0967, 0x0a67, 0x8420, 0x9082, 0x0005, 0x0967, 0x0a67, 0x0cd0,
-	0x6c1a, 0x2d00, 0x90b8, 0x0007, 0x00e6, 0x2071, 0x1800, 0x7128,
-	0x6810, 0x2019, 0x0001, 0x910a, 0x0118, 0x0210, 0x8318, 0x0cd8,
-	0x2031, 0x8d4b, 0x0870, 0x6c16, 0x00ee, 0x0005, 0x0096, 0x0046,
-	0x0126, 0x2091, 0x8000, 0x2b00, 0x9080, 0x8dca, 0x2005, 0x9005,
-	0x090c, 0x0d7d, 0x2004, 0x90a0, 0x000a, 0x080c, 0x1053, 0x01d0,
-	0x2900, 0x7026, 0xa803, 0x0000, 0xa807, 0x0000, 0x080c, 0x1053,
-	0x0188, 0x7024, 0xa802, 0xa807, 0x0000, 0x2900, 0x7026, 0x94a2,
-	0x000a, 0x0110, 0x0208, 0x0c90, 0x9085, 0x0001, 0x012e, 0x004e,
-	0x009e, 0x0005, 0x7024, 0x9005, 0x0dc8, 0x2048, 0xac00, 0x080c,
-	0x106c, 0x2400, 0x0cc0, 0x0126, 0x2091, 0x8000, 0x7024, 0x2048,
-	0x9005, 0x0130, 0xa800, 0x7026, 0xa803, 0x0000, 0xa807, 0x0000,
-	0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x7024, 0xa802, 0x2900,
-	0x7026, 0x012e, 0x0005, 0x0096, 0x9e80, 0x0009, 0x2004, 0x9005,
-	0x0138, 0x2048, 0xa800, 0x0006, 0x080c, 0x106c, 0x000e, 0x0cb8,
-	0x009e, 0x0005, 0x0096, 0x7008, 0x9005, 0x0138, 0x2048, 0xa800,
-	0x0006, 0x080c, 0x106c, 0x000e, 0x0cb8, 0x9006, 0x7002, 0x700a,
-	0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x702a, 0x7026, 0x702e,
-	0x009e, 0x0005, 0x1a6d, 0x0000, 0x0000, 0x0000, 0x1930, 0x0000,
-	0x0000, 0x0000, 0x1888, 0x0000, 0x0000, 0x0000, 0x1877, 0x0000,
-	0x0000, 0x0000, 0x00e6, 0x00c6, 0x00b6, 0x00a6, 0xa8a8, 0x2040,
-	0x2071, 0x1877, 0x080c, 0x8eec, 0xa067, 0x0023, 0x6010, 0x905d,
-	0x0904, 0x8ec1, 0xb814, 0xa06e, 0xb910, 0xa172, 0xb9a0, 0xa176,
-	0x2001, 0x0003, 0xa07e, 0xa834, 0xa082, 0xa07b, 0x0000, 0xa898,
-	0x9005, 0x0118, 0xa078, 0xc085, 0xa07a, 0x2858, 0x2031, 0x0018,
-	0xa068, 0x908a, 0x0019, 0x1a0c, 0x0d7d, 0x2020, 0x2050, 0x2940,
-	0xa864, 0x90bc, 0x00ff, 0x908c, 0x000f, 0x91e0, 0x1e55, 0x2c65,
-	0x9786, 0x0024, 0x2c05, 0x1590, 0x908a, 0x0036, 0x1a0c, 0x0d7d,
-	0x9082, 0x001b, 0x0002, 0x8e2e, 0x8e2e, 0x8e30, 0x8e2e, 0x8e2e,
-	0x8e2e, 0x8e32, 0x8e2e, 0x8e2e, 0x8e2e, 0x8e34, 0x8e2e, 0x8e2e,
-	0x8e2e, 0x8e36, 0x8e2e, 0x8e2e, 0x8e2e, 0x8e38, 0x8e2e, 0x8e2e,
-	0x8e2e, 0x8e3a, 0x8e2e, 0x8e2e, 0x8e2e, 0x8e3c, 0x080c, 0x0d7d,
-	0xa180, 0x04b8, 0xa190, 0x04a8, 0xa1a0, 0x0498, 0xa1b0, 0x0488,
-	0xa1c0, 0x0478, 0xa1d0, 0x0468, 0xa1e0, 0x0458, 0x908a, 0x0034,
-	0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x8e60, 0x8e5e, 0x8e5e,
-	0x8e5e, 0x8e5e, 0x8e5e, 0x8e62, 0x8e5e, 0x8e5e, 0x8e5e, 0x8e5e,
-	0x8e5e, 0x8e64, 0x8e5e, 0x8e5e, 0x8e5e, 0x8e5e, 0x8e5e, 0x8e66,
-	0x8e5e, 0x8e5e, 0x8e5e, 0x8e5e, 0x8e5e, 0x8e68, 0x080c, 0x0d7d,
-	0xa180, 0x0038, 0xa198, 0x0028, 0xa1b0, 0x0018, 0xa1c8, 0x0008,
-	0xa1e0, 0x2600, 0x0002, 0x8e84, 0x8e86, 0x8e88, 0x8e8a, 0x8e8c,
-	0x8e8e, 0x8e90, 0x8e92, 0x8e94, 0x8e96, 0x8e98, 0x8e9a, 0x8e9c,
-	0x8e9e, 0x8ea0, 0x8ea2, 0x8ea4, 0x8ea6, 0x8ea8, 0x8eaa, 0x8eac,
-	0x8eae, 0x8eb0, 0x8eb2, 0x8eb4, 0x080c, 0x0d7d, 0xb9e2, 0x0468,
-	0xb9de, 0x0458, 0xb9da, 0x0448, 0xb9d6, 0x0438, 0xb9d2, 0x0428,
-	0xb9ce, 0x0418, 0xb9ca, 0x0408, 0xb9c6, 0x00f8, 0xb9c2, 0x00e8,
-	0xb9be, 0x00d8, 0xb9ba, 0x00c8, 0xb9b6, 0x00b8, 0xb9b2, 0x00a8,
-	0xb9ae, 0x0098, 0xb9aa, 0x0088, 0xb9a6, 0x0078, 0xb9a2, 0x0068,
-	0xb99e, 0x0058, 0xb99a, 0x0048, 0xb996, 0x0038, 0xb992, 0x0028,
-	0xb98e, 0x0018, 0xb98a, 0x0008, 0xb986, 0x8631, 0x8421, 0x0120,
-	0x080c, 0x1e2b, 0x0804, 0x8e08, 0x00ae, 0x00be, 0x00ce, 0x00ee,
-	0x0005, 0xa86c, 0xa06e, 0xa870, 0xa072, 0xa077, 0x00ff, 0x9006,
-	0x0804, 0x8dea, 0x0006, 0x0016, 0x00b6, 0x6010, 0x2058, 0xb810,
-	0x9005, 0x01b0, 0x2001, 0x1924, 0x2004, 0x9005, 0x0188, 0x2001,
-	0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0xbba0,
-	0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4b07, 0x004e, 0x003e,
-	0x00be, 0x001e, 0x000e, 0x0005, 0x9016, 0x710c, 0xa834, 0x910a,
-	0xa936, 0x7008, 0x9005, 0x0120, 0x8210, 0x910a, 0x0238, 0x0130,
-	0x7010, 0x8210, 0x910a, 0x0210, 0x0108, 0x0cd8, 0xaa8a, 0xa26a,
-	0x0005, 0x00f6, 0x00d6, 0x0036, 0x2079, 0x0300, 0x781b, 0x0200,
-	0x7818, 0xd094, 0x1dd8, 0x781b, 0x0202, 0xa001, 0xa001, 0x7818,
-	0xd094, 0x1da0, 0xb8ac, 0x9005, 0x01b8, 0x2068, 0x2079, 0x0000,
-	0x2c08, 0x911e, 0x1118, 0x680c, 0xb8ae, 0x0060, 0x9106, 0x0140,
-	0x2d00, 0x2078, 0x680c, 0x9005, 0x090c, 0x0d7d, 0x2068, 0x0cb0,
-	0x6b0c, 0x7b0e, 0x600f, 0x0000, 0x2079, 0x0300, 0x781b, 0x0200,
-	0x003e, 0x00de, 0x00fe, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x00c6,
-	0x0036, 0x0126, 0x2091, 0x8000, 0x0156, 0x20a9, 0x01ff, 0x2071,
-	0x0300, 0x701b, 0x0200, 0x7018, 0xd094, 0x0110, 0x1f04, 0x8f41,
-	0x701b, 0x0202, 0xa001, 0xa001, 0x7018, 0xd094, 0x1d90, 0xb8ac,
-	0x9005, 0x01d0, 0x2060, 0x600c, 0xb8ae, 0x6003, 0x0004, 0x601b,
-	0x0000, 0x6013, 0x0000, 0x601f, 0x0101, 0x6014, 0x2048, 0xa88b,
-	0x0000, 0xa8a8, 0xa8ab, 0x0000, 0x904d, 0x090c, 0x0d7d, 0x080c,
-	0x106c, 0x080c, 0x8afc, 0x0c18, 0x2071, 0x0300, 0x701b, 0x0200,
-	0x015e, 0x012e, 0x003e, 0x00ce, 0x009e, 0x00de, 0x00ee, 0x0005,
-	0x00c6, 0x00b6, 0x0016, 0x0006, 0x0156, 0x080c, 0x25fb, 0x015e,
-	0x11b0, 0x080c, 0x65c4, 0x190c, 0x0d7d, 0x000e, 0x001e, 0xb912,
-	0xb816, 0x080c, 0xab97, 0x0140, 0x2b00, 0x6012, 0x6023, 0x0001,
-	0x2009, 0x0001, 0x080c, 0xac8c, 0x00be, 0x00ce, 0x0005, 0x000e,
-	0x001e, 0x0cd0, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d7d,
-	0x0013, 0x006e, 0x0005, 0x8fb3, 0x8fb3, 0x8fb3, 0x8fb5, 0x8ffe,
-	0x8fb3, 0x8fb3, 0x8fb3, 0x9061, 0x8fb3, 0x9099, 0x8fb3, 0x8fb3,
-	0x8fb3, 0x8fb3, 0x8fb3, 0x080c, 0x0d7d, 0x9182, 0x0040, 0x0002,
-	0x8fc8, 0x8fc8, 0x8fc8, 0x8fc8, 0x8fc8, 0x8fc8, 0x8fc8, 0x8fc8,
-	0x8fc8, 0x8fca, 0x8fdb, 0x8fc8, 0x8fc8, 0x8fc8, 0x8fc8, 0x8fec,
-	0x080c, 0x0d7d, 0x0096, 0x6114, 0x2148, 0xa87b, 0x0000, 0x6010,
-	0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6b80, 0x080c,
-	0xabed, 0x009e, 0x0005, 0x080c, 0x963b, 0x00d6, 0x6114, 0x080c,
-	0xc838, 0x0130, 0x0096, 0x6114, 0x2148, 0x080c, 0x6d80, 0x009e,
-	0x00de, 0x080c, 0xabed, 0x0005, 0x080c, 0x963b, 0x080c, 0x31e7,
-	0x6114, 0x0096, 0x2148, 0x080c, 0xc838, 0x0120, 0xa87b, 0x0029,
-	0x080c, 0x6d80, 0x009e, 0x080c, 0xabed, 0x0005, 0x601b, 0x0000,
-	0x9182, 0x0040, 0x0096, 0x0002, 0x9019, 0x9019, 0x9019, 0x9019,
-	0x9019, 0x9019, 0x9019, 0x9019, 0x901b, 0x9019, 0x9019, 0x9019,
-	0x905d, 0x9019, 0x9019, 0x9019, 0x9019, 0x9019, 0x9019, 0x9021,
-	0x9019, 0x080c, 0x0d7d, 0x6114, 0x2148, 0xa938, 0x918e, 0xffff,
-	0x05e0, 0x00e6, 0x6114, 0x2148, 0x080c, 0x8dd2, 0x0096, 0xa8a8,
-	0x2048, 0x080c, 0x6b18, 0x009e, 0xa8ab, 0x0000, 0x6010, 0x9005,
-	0x0128, 0x00b6, 0x2058, 0x080c, 0x8f01, 0x00be, 0xae88, 0x00b6,
-	0x2059, 0x0000, 0x080c, 0x8b05, 0x00be, 0x01e0, 0x2071, 0x193c,
-	0x080c, 0x8b4c, 0x01b8, 0x9086, 0x0001, 0x1128, 0x2001, 0x1946,
-	0x2004, 0x9005, 0x1178, 0x0096, 0x080c, 0x103a, 0x2900, 0x009e,
-	0x0148, 0xa8aa, 0x00f6, 0x2c78, 0x080c, 0x8ac3, 0x00fe, 0x00ee,
-	0x009e, 0x0005, 0x080c, 0x8afc, 0x0cd0, 0x080c, 0x9115, 0x009e,
-	0x0005, 0x9182, 0x0040, 0x0096, 0x0002, 0x9075, 0x9075, 0x9075,
-	0x9077, 0x9075, 0x9075, 0x9075, 0x9097, 0x9075, 0x9075, 0x9075,
-	0x9075, 0x9075, 0x9075, 0x9075, 0x9075, 0x080c, 0x0d7d, 0x6003,
-	0x0003, 0x6106, 0x6014, 0x2048, 0xa8ac, 0xa836, 0xa8b0, 0xa83a,
-	0xa847, 0x0000, 0xa84b, 0x0000, 0xa884, 0x9092, 0x199a, 0x0210,
-	0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a, 0x080c,
-	0x1bba, 0x2009, 0x8030, 0x080c, 0x9265, 0x009e, 0x0005, 0x080c,
-	0x0d7d, 0x080c, 0x963b, 0x6114, 0x2148, 0xa87b, 0x0000, 0x6010,
-	0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6d80, 0x080c,
-	0xabed, 0x009e, 0x0005, 0x080c, 0xa896, 0x6144, 0xd1fc, 0x0120,
-	0xd1ac, 0x1110, 0x6003, 0x0003, 0x6000, 0x908a, 0x0016, 0x1a0c,
-	0x0d7d, 0x0096, 0x0023, 0x009e, 0x080c, 0xa8b2, 0x0005, 0x90cf,
-	0x90cf, 0x90cf, 0x90d1, 0x90e2, 0x90cf, 0x90cf, 0x90cf, 0x90cf,
-	0x90cf, 0x90cf, 0x90cf, 0x90cf, 0x90cf, 0x90cf, 0x90cf, 0x080c,
-	0x0d7d, 0x080c, 0xaa2a, 0x6114, 0x2148, 0xa87b, 0x0006, 0x6010,
-	0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6d80, 0x080c,
-	0xabed, 0x0005, 0x0491, 0x0005, 0x080c, 0xa896, 0x6000, 0x6144,
-	0xd1fc, 0x0130, 0xd1ac, 0x1120, 0x6003, 0x0003, 0x2009, 0x0003,
-	0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0096, 0x0033, 0x009e, 0x0106,
-	0x080c, 0xa8b2, 0x010e, 0x0005, 0x910c, 0x910c, 0x910c, 0x910e,
-	0x9115, 0x910c, 0x910c, 0x910c, 0x910c, 0x910c, 0x910c, 0x910c,
-	0x910c, 0x910c, 0x910c, 0x910c, 0x080c, 0x0d7d, 0x0036, 0x00e6,
-	0x080c, 0xaa2a, 0x00ee, 0x003e, 0x0005, 0x00f6, 0x00e6, 0x601b,
-	0x0000, 0x6014, 0x2048, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058,
-	0x080c, 0x8f01, 0x00be, 0x2071, 0x193c, 0x080c, 0x8b4c, 0x0160,
-	0x2001, 0x187f, 0x2004, 0xa88a, 0x2031, 0x0000, 0x2c78, 0x080c,
-	0x8ac3, 0x00ee, 0x00fe, 0x0005, 0x0096, 0xa88b, 0x0000, 0xa8a8,
-	0x2048, 0x080c, 0x106c, 0x009e, 0xa8ab, 0x0000, 0x080c, 0x8afc,
-	0x0c80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-	0x0000, 0x0000, 0x187a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-	0x0000, 0x0126, 0x2091, 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010,
-	0x9006, 0x8004, 0x8086, 0x818e, 0x1208, 0x9200, 0x1f04, 0x915a,
-	0x8086, 0x818e, 0x004e, 0x003e, 0x012e, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005, 0x01c8, 0x911a,
-	0x12b8, 0x8213, 0x818d, 0x0228, 0x911a, 0x1220, 0x1f04, 0x9171,
-	0x0028, 0x911a, 0x2308, 0x8210, 0x1f04, 0x9171, 0x0006, 0x3200,
-	0x9084, 0xefff, 0x2080, 0x000e, 0x015e, 0x007e, 0x012e, 0x0005,
-	0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8, 0x0126, 0x2091, 0x2800,
-	0x2079, 0x19e7, 0x012e, 0x00d6, 0x2069, 0x19e7, 0x6803, 0x0005,
-	0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000, 0x2069, 0x0200, 0x080c,
-	0xa690, 0x04a9, 0x080c, 0xa67b, 0x0491, 0x080c, 0xa67e, 0x0479,
-	0x080c, 0xa681, 0x0461, 0x080c, 0xa684, 0x0449, 0x080c, 0xa687,
-	0x0431, 0x080c, 0xa68a, 0x0419, 0x080c, 0xa68d, 0x0401, 0x01de,
-	0x014e, 0x015e, 0x6857, 0x0000, 0x00f6, 0x2079, 0x0380, 0x00f9,
-	0x7807, 0x0003, 0x7803, 0x0000, 0x7803, 0x0001, 0x2069, 0x0004,
-	0x2d04, 0x9084, 0xfffe, 0x9085, 0x8000, 0x206a, 0x2069, 0x0100,
-	0x6828, 0x9084, 0xfffc, 0x682a, 0x00fe, 0x00de, 0x0005, 0x20a9,
-	0x0020, 0x20a1, 0x0240, 0x2001, 0x0000, 0x4004, 0x0005, 0x00c6,
-	0x7803, 0x0000, 0x9006, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827,
-	0x0031, 0x782b, 0x1aef, 0x781f, 0xff00, 0x781b, 0xff00, 0x2061,
-	0x1ae4, 0x602f, 0x19e7, 0x6033, 0x1800, 0x6037, 0x1a03, 0x603b,
-	0x1e55, 0x603f, 0x1e65, 0x6042, 0x6047, 0x1aba, 0x00ce, 0x0005,
-	0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001, 0x01b0,
-	0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08, 0x2061, 0x19e7, 0x602c,
-	0x8000, 0x602e, 0x601c, 0x9005, 0x0130, 0x9080, 0x0003, 0x2102,
-	0x611e, 0x00ce, 0x0005, 0x6122, 0x611e, 0x0cd8, 0x6146, 0x2c08,
-	0x2001, 0x0012, 0x080c, 0xa887, 0x0005, 0x0016, 0x2009, 0x8020,
-	0x6146, 0x2c08, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086,
-	0x0001, 0x1128, 0x2001, 0x0019, 0x080c, 0xa887, 0x0088, 0x00c6,
-	0x2061, 0x19e7, 0x602c, 0x8000, 0x602e, 0x600c, 0x9005, 0x0128,
-	0x9080, 0x0003, 0x2102, 0x610e, 0x0010, 0x6112, 0x610e, 0x00ce,
-	0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086,
-	0x0001, 0x0198, 0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08, 0x2061,
-	0x19e7, 0x6044, 0x9005, 0x0130, 0x9080, 0x0003, 0x2102, 0x6146,
-	0x00ce, 0x0005, 0x614a, 0x6146, 0x0cd8, 0x6146, 0x600f, 0x0000,
-	0x2c08, 0x2001, 0x0013, 0x080c, 0xa887, 0x0005, 0x6044, 0xd0dc,
-	0x0128, 0x9006, 0x7007, 0x0000, 0x700a, 0x7032, 0x0005, 0x00f6,
-	0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066, 0x0056,
-	0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e, 0x2071, 0x19e7,
-	0x7648, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904, 0x92f0,
-	0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x92eb, 0x87ff, 0x0120,
-	0x605c, 0x9106, 0x1904, 0x92eb, 0x704c, 0x9c06, 0x1178, 0x0036,
-	0x2019, 0x0001, 0x080c, 0xa118, 0x703f, 0x0000, 0x9006, 0x704e,
-	0x706a, 0x7052, 0x706e, 0x003e, 0x2029, 0x0001, 0x080c, 0x926e,
-	0x7048, 0x9c36, 0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140,
-	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000,
-	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
-	0x600f, 0x0000, 0x080c, 0xc838, 0x01c8, 0x6014, 0x2048, 0x6020,
-	0x9086, 0x0003, 0x1560, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x0016, 0x0036, 0x0076, 0x080c, 0xcb36, 0x080c, 0xe621, 0x080c,
-	0x6d80, 0x007e, 0x003e, 0x001e, 0x080c, 0xca27, 0x080c, 0xac28,
-	0x00ce, 0x0804, 0x928d, 0x2c78, 0x600c, 0x2060, 0x0804, 0x928d,
-	0x012e, 0x000e, 0x001e, 0x002e, 0x003e, 0x005e, 0x006e, 0x007e,
-	0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020,
-	0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0076, 0x080c, 0xe621,
-	0x080c, 0xe26c, 0x007e, 0x003e, 0x001e, 0x08c0, 0x6020, 0x9086,
-	0x0009, 0x1168, 0xa87b, 0x0006, 0x0016, 0x0036, 0x0076, 0x080c,
-	0x6d80, 0x080c, 0xabed, 0x007e, 0x003e, 0x001e, 0x0848, 0x6020,
-	0x9086, 0x000a, 0x0904, 0x92d5, 0x0804, 0x92d3, 0x0006, 0x0066,
-	0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036, 0x0126, 0x2091, 0x8000,
-	0x2079, 0x19e7, 0x7848, 0x9065, 0x0904, 0x9385, 0x600c, 0x0006,
-	0x600f, 0x0000, 0x784c, 0x9c06, 0x11a0, 0x0036, 0x2019, 0x0001,
-	0x080c, 0xa118, 0x783f, 0x0000, 0x901e, 0x7b4e, 0x7b6a, 0x7b52,
-	0x7b6e, 0x003e, 0x000e, 0x9005, 0x1118, 0x600c, 0x600f, 0x0000,
-	0x0006, 0x00e6, 0x2f70, 0x080c, 0x926e, 0x00ee, 0x080c, 0xc838,
-	0x0520, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1580, 0x3e08,
-	0x918e, 0x0002, 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x0140, 0x6048, 0x9005, 0x1198, 0x2001,
-	0x1988, 0x2004, 0x604a, 0x0070, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x080c, 0x6d74, 0x080c, 0xca27, 0x6044, 0xc0fc, 0x6046,
-	0x080c, 0xac28, 0x000e, 0x0804, 0x9333, 0x7e4a, 0x7e46, 0x012e,
+	0x6028, 0xc09c, 0x602a, 0x080c, 0xa888, 0x2011, 0x0003, 0x080c,
+	0xa1b1, 0x2011, 0x0002, 0x080c, 0xa1bb, 0x080c, 0xa07a, 0x080c,
+	0x86d5, 0x0036, 0x901e, 0x080c, 0xa0fa, 0x003e, 0x080c, 0xa8a4,
+	0x60e3, 0x0000, 0x080c, 0xe712, 0x080c, 0xe72d, 0x2009, 0x0004,
+	0x080c, 0x2a15, 0x080c, 0x292f, 0x2001, 0x1800, 0x2003, 0x0004,
+	0x2011, 0x0008, 0x080c, 0x2a63, 0x2011, 0x7331, 0x080c, 0x8729,
+	0x080c, 0x74e2, 0x0118, 0x9006, 0x080c, 0x2a29, 0x080c, 0x0bc3,
+	0x2001, 0x0001, 0x080c, 0x25b9, 0x012e, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011,
+	0x733e, 0x2071, 0x1a02, 0x701c, 0x9206, 0x1118, 0x7018, 0x9005,
+	0x0110, 0x9085, 0x0001, 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c,
+	0x0005, 0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0, 0x01b8, 0x2001,
+	0x00c0, 0x080c, 0x2a29, 0x0156, 0x20a9, 0x002d, 0x1d04, 0x73b6,
+	0x2091, 0x6000, 0x1f04, 0x73b6, 0x015e, 0x00d6, 0x2069, 0x1800,
+	0x689c, 0x8001, 0x0220, 0x0118, 0x689e, 0x00de, 0x0005, 0x689f,
+	0x0014, 0x68ec, 0xd0dc, 0x0dc8, 0x6800, 0x9086, 0x0001, 0x1da8,
+	0x080c, 0x8735, 0x0c90, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
+	0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x77db, 0x2001, 0x196c,
+	0x2003, 0x0000, 0x9006, 0x709a, 0x60e2, 0x6886, 0x080c, 0x2688,
+	0x9006, 0x080c, 0x2a29, 0x080c, 0x5edf, 0x0026, 0x2011, 0xffff,
+	0x080c, 0x2a63, 0x002e, 0x602b, 0x182c, 0x00ee, 0x00de, 0x00ce,
+	0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140,
+	0x2071, 0x1800, 0x2001, 0x197c, 0x200c, 0x9186, 0x0000, 0x0158,
+	0x9186, 0x0001, 0x0158, 0x9186, 0x0002, 0x0158, 0x9186, 0x0003,
+	0x0158, 0x0804, 0x748c, 0x709b, 0x0022, 0x0040, 0x709b, 0x0021,
+	0x0028, 0x709b, 0x0023, 0x0010, 0x709b, 0x0024, 0x60e3, 0x0000,
+	0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x2688, 0x080c, 0xa888,
+	0x0026, 0x080c, 0xab50, 0x002e, 0x080c, 0xa8a4, 0x7000, 0x908e,
+	0x0004, 0x0118, 0x602b, 0x0028, 0x0010, 0x602b, 0x0020, 0x0156,
+	0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150,
+	0x012e, 0x015e, 0x080c, 0xcf51, 0x0118, 0x9006, 0x080c, 0x2a53,
+	0x0804, 0x7498, 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c,
+	0x2a0f, 0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c, 0x2a29,
+	0x1f04, 0x743d, 0x080c, 0x751f, 0x012e, 0x015e, 0x080c, 0x74d9,
+	0x0170, 0x6044, 0x9005, 0x0130, 0x080c, 0x751f, 0x9006, 0x8001,
+	0x1df0, 0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c, 0x751f, 0x080c,
+	0xcf51, 0x0118, 0x9006, 0x080c, 0x2a53, 0x0016, 0x0026, 0x7000,
+	0x908e, 0x0004, 0x0130, 0x2009, 0x00c8, 0x2011, 0x733e, 0x080c,
+	0x86e7, 0x002e, 0x001e, 0x080c, 0x8529, 0x7034, 0xc085, 0x7036,
+	0x2001, 0x197c, 0x2003, 0x0004, 0x080c, 0x7193, 0x080c, 0x74d9,
+	0x0138, 0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, 0x77d1,
+	0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061,
+	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x8540, 0x080c,
+	0x8532, 0x080c, 0x77db, 0x2001, 0x196c, 0x2003, 0x0000, 0x9006,
+	0x709a, 0x60e2, 0x6886, 0x080c, 0x2688, 0x9006, 0x080c, 0x2a29,
+	0x6043, 0x0090, 0x6043, 0x0010, 0x0026, 0x2011, 0xffff, 0x080c,
+	0x2a63, 0x002e, 0x602b, 0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005,
+	0x0006, 0x2001, 0x197b, 0x2004, 0x9086, 0xaaaa, 0x000e, 0x0005,
+	0x0006, 0x080c, 0x56d9, 0x9084, 0x0030, 0x9086, 0x0000, 0x000e,
+	0x0005, 0x0006, 0x080c, 0x56d9, 0x9084, 0x0030, 0x9086, 0x0030,
+	0x000e, 0x0005, 0x0006, 0x080c, 0x56d9, 0x9084, 0x0030, 0x9086,
+	0x0010, 0x000e, 0x0005, 0x0006, 0x080c, 0x56d9, 0x9084, 0x0030,
+	0x9086, 0x0020, 0x000e, 0x0005, 0x0036, 0x0016, 0x2001, 0x180c,
+	0x2004, 0x908c, 0x0013, 0x0180, 0x0020, 0x080c, 0x26a8, 0x900e,
+	0x0028, 0x080c, 0x6a62, 0x1dc8, 0x2009, 0x0002, 0x2019, 0x0028,
+	0x080c, 0x31b4, 0x9006, 0x0019, 0x001e, 0x003e, 0x0005, 0x00e6,
+	0x2071, 0x180c, 0x2e04, 0x0130, 0x080c, 0xcf4a, 0x1128, 0x9085,
+	0x0010, 0x0010, 0x9084, 0xffef, 0x2072, 0x00ee, 0x0005, 0x6050,
+	0x0006, 0x60ec, 0x0006, 0x600c, 0x0006, 0x6004, 0x0006, 0x6028,
+	0x0006, 0x602f, 0x0100, 0x602f, 0x0000, 0x602f, 0x0040, 0x602f,
+	0x0000, 0x20a9, 0x0002, 0x080c, 0x29f0, 0x0026, 0x2011, 0x0040,
+	0x080c, 0x2a63, 0x002e, 0x000e, 0x602a, 0x000e, 0x6006, 0x000e,
+	0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001,
+	0x0001, 0x080c, 0x2688, 0x2001, 0x00a0, 0x0006, 0x080c, 0xcf51,
+	0x000e, 0x0130, 0x080c, 0x2a47, 0x9006, 0x080c, 0x2a53, 0x0010,
+	0x080c, 0x2a29, 0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5, 0x6052,
+	0x00f6, 0x2079, 0x0100, 0x080c, 0x29a0, 0x00fe, 0x000e, 0x6052,
+	0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0xa8e6,
+	0x0158, 0x2001, 0x0386, 0x2004, 0xd0b4, 0x1130, 0x2001, 0x0016,
+	0x080c, 0xa879, 0x0804, 0x75fc, 0x2001, 0x180c, 0x200c, 0xc1c4,
+	0x2102, 0x6028, 0x9084, 0xe1ff, 0x602a, 0x2011, 0x0200, 0x080c,
+	0x2a63, 0x2001, 0x0090, 0x080c, 0x2a29, 0x20a9, 0x0366, 0x6024,
+	0xd0cc, 0x1558, 0x1d04, 0x7597, 0x2091, 0x6000, 0x1f04, 0x7597,
+	0x080c, 0xa888, 0x2011, 0x0003, 0x080c, 0xa1b1, 0x2011, 0x0002,
+	0x080c, 0xa1bb, 0x080c, 0xa07a, 0x901e, 0x080c, 0xa0fa, 0x2001,
+	0x0386, 0x2003, 0x7000, 0x080c, 0xa8a4, 0x2001, 0x00a0, 0x080c,
+	0x2a29, 0x080c, 0x77cc, 0x080c, 0x6024, 0x080c, 0xcf51, 0x0110,
+	0x080c, 0x0ce9, 0x9085, 0x0001, 0x04e8, 0x2001, 0x0386, 0x2004,
+	0xd0ac, 0x0110, 0x080c, 0x1aec, 0x60e3, 0x0000, 0x2001, 0x196c,
+	0x2004, 0x080c, 0x2688, 0x60e2, 0x2001, 0x0080, 0x080c, 0x2a29,
+	0x20a9, 0x0366, 0x2011, 0x1e00, 0x080c, 0x2a63, 0x2009, 0x1e00,
+	0x080c, 0x2a0f, 0x6024, 0x910c, 0x0140, 0x1d04, 0x75da, 0x2091,
+	0x6000, 0x1f04, 0x75da, 0x0804, 0x75a0, 0x2001, 0x0386, 0x2003,
+	0x7000, 0x6028, 0x9085, 0x1e00, 0x602a, 0x70b4, 0x9005, 0x1118,
+	0x6887, 0x0001, 0x0008, 0x6886, 0x080c, 0xcf51, 0x0110, 0x080c,
+	0x0ce9, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e,
+	0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
+	0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x7000, 0x9086, 0x0003,
+	0x1168, 0x2001, 0x020b, 0x2004, 0x9084, 0x5540, 0x9086, 0x5540,
+	0x1128, 0x2069, 0x1a76, 0x2d04, 0x8000, 0x206a, 0x2069, 0x0140,
+	0x6020, 0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, 0x1904, 0x7673,
+	0x2001, 0x0088, 0x080c, 0x2a29, 0x9006, 0x60e2, 0x6886, 0x080c,
+	0x2688, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005,
+	0x01d0, 0x6028, 0x9084, 0xfbff, 0x602a, 0x2011, 0x0400, 0x080c,
+	0x2a63, 0x2069, 0x198e, 0x7000, 0x206a, 0x709b, 0x0026, 0x7003,
+	0x0001, 0x20a9, 0x0002, 0x1d04, 0x7653, 0x2091, 0x6000, 0x1f04,
+	0x7653, 0x0804, 0x76a5, 0x2069, 0x0140, 0x20a9, 0x0384, 0x2011,
+	0x1e00, 0x080c, 0x2a63, 0x2009, 0x1e00, 0x080c, 0x2a0f, 0x6024,
+	0x910c, 0x0528, 0x9084, 0x1a00, 0x1510, 0x1d04, 0x765f, 0x2091,
+	0x6000, 0x1f04, 0x765f, 0x080c, 0xa888, 0x2011, 0x0003, 0x080c,
+	0xa1b1, 0x2011, 0x0002, 0x080c, 0xa1bb, 0x080c, 0xa07a, 0x901e,
+	0x080c, 0xa0fa, 0x080c, 0xa8a4, 0x2001, 0x00a0, 0x080c, 0x2a29,
+	0x080c, 0x77cc, 0x080c, 0x6024, 0x9085, 0x0001, 0x00b0, 0x2001,
+	0x0080, 0x080c, 0x2a29, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b4,
+	0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x196c,
+	0x2004, 0x080c, 0x2688, 0x60e2, 0x9006, 0x00ee, 0x00de, 0x00ce,
+	0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026,
+	0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800,
+	0x6020, 0x9084, 0x00c0, 0x01e8, 0x080c, 0xa888, 0x2011, 0x0003,
+	0x080c, 0xa1b1, 0x2011, 0x0002, 0x080c, 0xa1bb, 0x080c, 0xa07a,
+	0x901e, 0x080c, 0xa0fa, 0x080c, 0xa8a4, 0x2069, 0x0140, 0x2001,
+	0x00a0, 0x080c, 0x2a29, 0x080c, 0x77cc, 0x080c, 0x6024, 0x0804,
+	0x7748, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102,
+	0x080c, 0x7326, 0x2069, 0x0140, 0x2001, 0x0080, 0x080c, 0x2a29,
+	0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808,
+	0x9005, 0x0190, 0x6028, 0x9084, 0xfdff, 0x602a, 0x2011, 0x0200,
+	0x080c, 0x2a63, 0x2069, 0x198e, 0x7000, 0x206a, 0x709b, 0x0027,
+	0x7003, 0x0001, 0x0804, 0x7748, 0x2011, 0x1e00, 0x080c, 0x2a63,
+	0x2009, 0x1e00, 0x080c, 0x2a0f, 0x6024, 0x910c, 0x01c8, 0x9084,
+	0x1c00, 0x11b0, 0x1d04, 0x7704, 0x0006, 0x0016, 0x00c6, 0x00d6,
+	0x00e6, 0x080c, 0x8571, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x000e,
+	0x00e6, 0x2071, 0x1a02, 0x7018, 0x00ee, 0x9005, 0x19e8, 0x0500,
+	0x0026, 0x2011, 0x733e, 0x080c, 0x861d, 0x2011, 0x7331, 0x080c,
+	0x8729, 0x002e, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b4, 0x9005,
+	0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x196c, 0x2004,
+	0x080c, 0x2688, 0x60e2, 0x2001, 0x180c, 0x200c, 0xc1b4, 0x2102,
+	0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005,
+	0x0156, 0x0016, 0x0026, 0x0036, 0x0046, 0x00c6, 0x00e6, 0x2061,
+	0x0100, 0x2071, 0x1800, 0x080c, 0xcf4a, 0x1904, 0x77b6, 0x7130,
+	0xd184, 0x1170, 0x080c, 0x335c, 0x0138, 0xc18d, 0x7132, 0x2011,
+	0x1848, 0x2214, 0xd2ac, 0x1120, 0x7030, 0xd08c, 0x0904, 0x77b6,
+	0x2011, 0x1848, 0x220c, 0xd1a4, 0x0538, 0x0016, 0x2019, 0x000e,
+	0x080c, 0xe249, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x9186,
+	0x007e, 0x01a0, 0x9186, 0x0080, 0x0188, 0x080c, 0x6620, 0x1170,
+	0x2120, 0x9006, 0x0016, 0x2009, 0x000e, 0x080c, 0xe2d9, 0x2009,
+	0x0001, 0x2011, 0x0100, 0x080c, 0x88ce, 0x001e, 0x8108, 0x1f04,
+	0x777f, 0x00be, 0x015e, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009,
+	0x0002, 0x2019, 0x0004, 0x080c, 0x31b4, 0x001e, 0x0078, 0x0156,
+	0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x6620, 0x1110, 0x080c,
+	0x603e, 0x8108, 0x1f04, 0x77ac, 0x00be, 0x015e, 0x080c, 0x1aec,
+	0x080c, 0xa888, 0x080c, 0xab50, 0x080c, 0xa8a4, 0x60e3, 0x0000,
+	0x080c, 0x6024, 0x080c, 0x73f9, 0x00ee, 0x00ce, 0x004e, 0x003e,
+	0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x197c, 0x2003, 0x0001,
+	0x0005, 0x2001, 0x197c, 0x2003, 0x0000, 0x0005, 0x2001, 0x197b,
+	0x2003, 0xaaaa, 0x0005, 0x2001, 0x197b, 0x2003, 0x0000, 0x0005,
+	0x2071, 0x18fa, 0x7003, 0x0000, 0x7007, 0x0000, 0x080c, 0x1053,
+	0x090c, 0x0d7d, 0xa8ab, 0xdcb0, 0x2900, 0x704e, 0x080c, 0x1053,
+	0x090c, 0x0d7d, 0xa8ab, 0xdcb0, 0x2900, 0x7052, 0xa867, 0x0000,
+	0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005, 0x00e6, 0x2071, 0x0040,
+	0x6848, 0x9005, 0x1118, 0x9085, 0x0001, 0x04b0, 0x6840, 0x9005,
+	0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002, 0x6854, 0x9101, 0x7006,
+	0x9006, 0x7012, 0x7016, 0x6850, 0x7002, 0x6854, 0x7006, 0x6858,
+	0x700a, 0x685c, 0x700e, 0x6840, 0x9005, 0x1110, 0x7012, 0x7016,
+	0x6848, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x2001, 0x0019,
+	0x7036, 0x702b, 0x0001, 0x2001, 0x0004, 0x200c, 0x918c, 0xfff7,
+	0x918d, 0x8000, 0x2102, 0x00d6, 0x2069, 0x18fa, 0x6807, 0x0001,
+	0x00de, 0x080c, 0x7dc3, 0x9006, 0x00ee, 0x0005, 0x900e, 0x0156,
+	0x20a9, 0x0006, 0x8003, 0x818d, 0x1f04, 0x7842, 0x015e, 0x0005,
+	0x2079, 0x0040, 0x2071, 0x18fa, 0x7004, 0x0002, 0x7858, 0x7859,
+	0x78a4, 0x78ff, 0x7a0f, 0x7856, 0x7856, 0x7a39, 0x080c, 0x0d7d,
+	0x0005, 0x2079, 0x0040, 0x2001, 0x1dc0, 0x2003, 0x0000, 0x782c,
+	0x908c, 0x0780, 0x190c, 0x7ea5, 0xd0a4, 0x0570, 0x2001, 0x1dc0,
+	0x2004, 0x9082, 0x0080, 0x1640, 0x1d04, 0x7876, 0x2001, 0x1a05,
+	0x200c, 0x8109, 0x0508, 0x2091, 0x6000, 0x2102, 0x7824, 0x2048,
+	0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x0040,
+	0x0608, 0x00b8, 0x2001, 0x1800, 0x200c, 0x9186, 0x0003, 0x1160,
+	0x7104, 0x9186, 0x0004, 0x0140, 0x9186, 0x0007, 0x0128, 0x9186,
+	0x0003, 0x1968, 0x080c, 0x78ff, 0x782c, 0xd09c, 0x090c, 0x7dc3,
+	0x0005, 0x9082, 0x005a, 0x1218, 0x2100, 0x003b, 0x0c18, 0x080c,
+	0x7935, 0x0c90, 0x00e3, 0x08f0, 0x0005, 0x7935, 0x7935, 0x7935,
+	0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7957, 0x7935, 0x7935,
+	0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935,
+	0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935,
+	0x7935, 0x7941, 0x7935, 0x7b2a, 0x7935, 0x7935, 0x7935, 0x7957,
+	0x7935, 0x7941, 0x7b6b, 0x7bac, 0x7bf3, 0x7c07, 0x7935, 0x7935,
+	0x7957, 0x7941, 0x796b, 0x7935, 0x79e3, 0x7cb2, 0x7ccd, 0x7935,
+	0x7957, 0x7935, 0x796b, 0x7935, 0x7935, 0x79d9, 0x7ccd, 0x7935,
+	0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935,
+	0x797f, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935,
+	0x7935, 0x7935, 0x7e49, 0x7935, 0x7df3, 0x7935, 0x7df3, 0x7935,
+	0x7994, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x7935, 0x2079,
+	0x0040, 0x7004, 0x9086, 0x0003, 0x1198, 0x782c, 0x080c, 0x7dec,
+	0xd0a4, 0x0170, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864,
+	0x9084, 0x00ff, 0x908a, 0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9,
+	0x080c, 0x7dc3, 0x0005, 0x7935, 0x7941, 0x7b16, 0x7935, 0x7941,
+	0x7935, 0x7941, 0x7941, 0x7935, 0x7941, 0x7b16, 0x7941, 0x7941,
+	0x7941, 0x7941, 0x7941, 0x7935, 0x7941, 0x7b16, 0x7935, 0x7935,
+	0x7941, 0x7935, 0x7935, 0x7935, 0x7941, 0x00e6, 0x2071, 0x18fa,
+	0x2009, 0x0400, 0x0071, 0x00ee, 0x0005, 0x2009, 0x1000, 0x0049,
+	0x0005, 0x2009, 0x2000, 0x0029, 0x0005, 0x2009, 0x0800, 0x0009,
+	0x0005, 0x7007, 0x0001, 0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6d7b, 0x012e, 0x0005, 0xa864,
+	0x8007, 0x9084, 0x00ff, 0x0d08, 0x8001, 0x1120, 0x7007, 0x0001,
+	0x0804, 0x7ab8, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a,
+	0x704b, 0x7ab8, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0968,
+	0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7ad3, 0x7007, 0x0003,
+	0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7ad3, 0x0005, 0xa864,
+	0x8007, 0x9084, 0x00ff, 0x0904, 0x793d, 0x8001, 0x1120, 0x7007,
+	0x0001, 0x0804, 0x7aef, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016,
+	0x701a, 0x704b, 0x7aef, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff,
+	0x9086, 0x0001, 0x1904, 0x793d, 0x7007, 0x0001, 0x2009, 0x1834,
+	0x210c, 0x81ff, 0x11a8, 0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883,
+	0x0000, 0x080c, 0x62b4, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000,
+	0xa867, 0x0139, 0xa87a, 0xa982, 0x080c, 0x6d7b, 0x012e, 0x0ca0,
+	0xa994, 0x9186, 0x0071, 0x0d38, 0x9186, 0x0064, 0x0d20, 0x9186,
+	0x007c, 0x0d08, 0x9186, 0x0028, 0x09f0, 0x9186, 0x0038, 0x09d8,
+	0x9186, 0x0078, 0x09c0, 0x9186, 0x005f, 0x09a8, 0x9186, 0x0056,
+	0x0990, 0xa897, 0x4005, 0xa89b, 0x0001, 0x2001, 0x0030, 0x900e,
+	0x08a0, 0xa87c, 0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007,
+	0x0001, 0x0804, 0x7ce4, 0x2900, 0x7016, 0x701a, 0x20a9, 0x0004,
+	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0030, 0x2098, 0x7050, 0x2040,
+	0xa060, 0x20e8, 0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003, 0xa888,
+	0x7012, 0x9082, 0x0401, 0x1a04, 0x7945, 0xaab4, 0x928a, 0x0002,
+	0x1a04, 0x7945, 0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118,
+	0x2001, 0x7a76, 0x0018, 0x9280, 0x7a6c, 0x2005, 0x7056, 0x7010,
+	0x9015, 0x0904, 0x7a57, 0x080c, 0x1053, 0x1118, 0x7007, 0x0004,
+	0x0005, 0x2900, 0x7022, 0x7054, 0x2060, 0xe000, 0xa866, 0x7050,
+	0x2040, 0xa95c, 0xe004, 0x9100, 0xa076, 0xa860, 0xa072, 0xe008,
+	0x920a, 0x1210, 0x900e, 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b,
+	0x9296, 0x0004, 0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c,
+	0x112f, 0xa06c, 0x908e, 0x0100, 0x0170, 0x9086, 0x0200, 0x0118,
+	0x7007, 0x0007, 0x0005, 0x7020, 0x2048, 0x080c, 0x106c, 0x7014,
+	0x2048, 0x0804, 0x7945, 0x7020, 0x2048, 0x7018, 0xa802, 0xa807,
+	0x0000, 0x2908, 0x2048, 0xa906, 0x711a, 0x0804, 0x7a0f, 0x7014,
+	0x2048, 0x7007, 0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc,
+	0x9105, 0x0108, 0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e,
+	0x0904, 0x7ce4, 0x0804, 0x7ab8, 0x7a6e, 0x7a72, 0x0002, 0x001d,
+	0x0007, 0x0004, 0x000a, 0x001b, 0x0005, 0x0006, 0x000a, 0x001d,
+	0x0005, 0x0004, 0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050,
+	0xb0c0, 0xb0e2, 0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce,
+	0xb6da, 0xb7d6, 0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba,
+	0xb0a4, 0xb0b6, 0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae,
+	0xb098, 0xb0a2, 0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a,
+	0xb08c, 0xb096, 0xb088, 0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e,
+	0xb080, 0xb082, 0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e,
+	0xb67a, 0xb776, 0xb004, 0x9055, 0x1958, 0x006e, 0x007e, 0x0005,
+	0x2009, 0x1834, 0x210c, 0x81ff, 0x1178, 0x080c, 0x60b6, 0x1108,
+	0x0005, 0x080c, 0x6faf, 0x0126, 0x2091, 0x8000, 0x080c, 0xcb35,
+	0x080c, 0x6d7b, 0x012e, 0x0ca0, 0x080c, 0xcf4a, 0x1d70, 0x2001,
+	0x0028, 0x900e, 0x0c70, 0x2009, 0x1834, 0x210c, 0x81ff, 0x1188,
+	0xa888, 0x9005, 0x0188, 0xa883, 0x0000, 0x080c, 0x6144, 0x1108,
+	0x0005, 0xa87a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d7b, 0x012e,
+	0x0cb8, 0x2001, 0x0028, 0x0ca8, 0x2001, 0x0000, 0x0c90, 0x2009,
+	0x1834, 0x210c, 0x81ff, 0x11d8, 0xa888, 0x9005, 0x01e0, 0xa883,
+	0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c, 0x6216, 0x1138, 0x0005,
+	0x9006, 0xa87a, 0x080c, 0x6191, 0x1108, 0x0005, 0x0126, 0x2091,
+	0x8000, 0xa87a, 0xa982, 0x080c, 0x6d7b, 0x012e, 0x0cb0, 0x2001,
+	0x0028, 0x900e, 0x0c98, 0x2001, 0x0000, 0x0c80, 0x7018, 0xa802,
+	0x2908, 0x2048, 0xa906, 0x711a, 0x7010, 0x8001, 0x7012, 0x0118,
+	0x7007, 0x0003, 0x0030, 0x7014, 0x2048, 0x7007, 0x0001, 0x7048,
+	0x080f, 0x0005, 0x00b6, 0x7007, 0x0001, 0xa974, 0xa878, 0x9084,
+	0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9, 0x0001, 0x9096, 0x0001,
+	0x0190, 0x900e, 0x20a9, 0x0800, 0x9096, 0x0002, 0x0160, 0x9005,
+	0x11d8, 0xa974, 0x080c, 0x6620, 0x11b8, 0x0066, 0xae80, 0x080c,
+	0x6730, 0x006e, 0x0088, 0x0046, 0x2011, 0x180c, 0x2224, 0xc484,
+	0x2412, 0x004e, 0x00c6, 0x080c, 0x6620, 0x1110, 0x080c, 0x6903,
+	0x8108, 0x1f04, 0x7b53, 0x00ce, 0xa87c, 0xd084, 0x1120, 0x080c,
+	0x106c, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d7b,
+	0x012e, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001,
+	0x080c, 0x6a66, 0x0580, 0x2061, 0x1a6e, 0x6100, 0xd184, 0x0178,
+	0xa888, 0x9084, 0x00ff, 0x1550, 0x6000, 0xd084, 0x0520, 0x6004,
+	0x9005, 0x1538, 0x6003, 0x0000, 0x600b, 0x0000, 0x00c8, 0x2011,
+	0x0001, 0xa890, 0x9005, 0x1110, 0x2001, 0x001e, 0x8000, 0x6016,
+	0xa888, 0x9084, 0x00ff, 0x0178, 0x6006, 0xa888, 0x8007, 0x9084,
+	0x00ff, 0x0148, 0x600a, 0xa888, 0x8000, 0x1108, 0xc28d, 0x6202,
+	0x012e, 0x0804, 0x7dad, 0x012e, 0x0804, 0x7da7, 0x012e, 0x0804,
+	0x7da1, 0x012e, 0x0804, 0x7da4, 0x0126, 0x2091, 0x8000, 0x7007,
+	0x0001, 0x080c, 0x6a66, 0x05e0, 0x2061, 0x1a6e, 0x6000, 0xd084,
+	0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530, 0xac78, 0x9484, 0x0003,
+	0x0170, 0xa988, 0x918c, 0x00ff, 0x8001, 0x1120, 0x2100, 0x9210,
+	0x0620, 0x0028, 0x8001, 0x1508, 0x2100, 0x9212, 0x02f0, 0x9484,
+	0x000c, 0x0188, 0xa988, 0x810f, 0x918c, 0x00ff, 0x9082, 0x0004,
+	0x1120, 0x2100, 0x9318, 0x0288, 0x0030, 0x9082, 0x0004, 0x1168,
+	0x2100, 0x931a, 0x0250, 0xa890, 0x9005, 0x0110, 0x8000, 0x6016,
+	0x6206, 0x630a, 0x012e, 0x0804, 0x7dad, 0x012e, 0x0804, 0x7daa,
+	0x012e, 0x0804, 0x7da7, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001,
+	0x2061, 0x1a6e, 0x6300, 0xd38c, 0x1120, 0x6308, 0x8318, 0x0220,
+	0x630a, 0x012e, 0x0804, 0x7dbb, 0x012e, 0x0804, 0x7daa, 0x00b6,
+	0x0126, 0x00c6, 0x2091, 0x8000, 0x7007, 0x0001, 0xa87c, 0xd0ac,
+	0x0148, 0x00c6, 0x2061, 0x1a6e, 0x6000, 0x9084, 0xfcff, 0x6002,
+	0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8, 0xa88c, 0x9065, 0x0598,
+	0x2001, 0x1834, 0x2004, 0x9005, 0x0118, 0x080c, 0xac1a, 0x0068,
+	0x6017, 0xf400, 0x6063, 0x0000, 0xa97c, 0xd1a4, 0x0110, 0xa980,
+	0x6162, 0x2009, 0x0041, 0x080c, 0xac7c, 0xa988, 0x918c, 0xff00,
+	0x9186, 0x2000, 0x1138, 0x0026, 0x900e, 0x2011, 0xfdff, 0x080c,
+	0x88ce, 0x002e, 0xa87c, 0xd0c4, 0x0148, 0x2061, 0x1a6e, 0x6000,
+	0xd08c, 0x1120, 0x6008, 0x8000, 0x0208, 0x600a, 0x00ce, 0x012e,
+	0x00be, 0x0804, 0x7dad, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7da7,
+	0xa984, 0x9186, 0x002e, 0x0d30, 0x9186, 0x002d, 0x0d18, 0x9186,
+	0x0045, 0x0510, 0x9186, 0x002a, 0x1130, 0x2001, 0x180c, 0x200c,
+	0xc194, 0x2102, 0x08b8, 0x9186, 0x0020, 0x0158, 0x9186, 0x0029,
+	0x1d10, 0xa974, 0x080c, 0x6620, 0x1968, 0xb800, 0xc0e4, 0xb802,
+	0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007, 0x0024, 0x2001, 0x1985,
+	0x2004, 0x601a, 0x0804, 0x7c42, 0xa88c, 0x9065, 0x0960, 0x00e6,
+	0xa890, 0x9075, 0x2001, 0x1834, 0x2004, 0x9005, 0x0150, 0x080c,
+	0xac1a, 0x8eff, 0x0118, 0x2e60, 0x080c, 0xac1a, 0x00ee, 0x0804,
+	0x7c42, 0x6024, 0xc0dc, 0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a,
+	0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b, 0xa8a4, 0x602e, 0xa8a8,
+	0x6016, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9200, 0x00ee,
+	0x0804, 0x7c42, 0x2061, 0x1a6e, 0x6000, 0xd084, 0x0190, 0xd08c,
+	0x1904, 0x7dbb, 0x0126, 0x2091, 0x8000, 0x6204, 0x8210, 0x0220,
+	0x6206, 0x012e, 0x0804, 0x7dbb, 0x012e, 0xa883, 0x0016, 0x0804,
+	0x7db4, 0xa883, 0x0007, 0x0804, 0x7db4, 0xa864, 0x8007, 0x9084,
+	0x00ff, 0x0130, 0x8001, 0x1138, 0x7007, 0x0001, 0x0069, 0x0005,
+	0x080c, 0x793d, 0x0040, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016,
+	0x701a, 0x704b, 0x7ce4, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091,
+	0x8000, 0x903e, 0x2061, 0x1800, 0x61d0, 0x81ff, 0x1904, 0x7d66,
+	0x6130, 0xd194, 0x1904, 0x7d90, 0xa878, 0x2070, 0x9e82, 0x1ddc,
+	0x0a04, 0x7d5a, 0x6068, 0x9e02, 0x1a04, 0x7d5a, 0x7120, 0x9186,
+	0x0006, 0x1904, 0x7d4c, 0x7010, 0x905d, 0x0904, 0x7d66, 0xb800,
+	0xd0e4, 0x1904, 0x7d8a, 0x2061, 0x1a6e, 0x6100, 0x9184, 0x0301,
+	0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc, 0x1904, 0x7d93, 0xa883,
+	0x0000, 0xa803, 0x0000, 0x2908, 0x7014, 0x9005, 0x1198, 0x7116,
+	0xa87c, 0xd0f4, 0x1904, 0x7d96, 0x080c, 0x56d5, 0xd09c, 0x1118,
+	0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c, 0x87be, 0x012e, 0x00ee,
+	0x00be, 0x0005, 0x2048, 0xa800, 0x9005, 0x1de0, 0xa902, 0x2148,
+	0xa87c, 0xd0f4, 0x1904, 0x7d96, 0x012e, 0x00ee, 0x00be, 0x0005,
+	0x012e, 0x00ee, 0xa883, 0x0006, 0x00be, 0x0804, 0x7db4, 0xd184,
+	0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974, 0x080c, 0x6620, 0x15d0,
+	0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186, 0x0007, 0x1118, 0xa883,
+	0x0002, 0x0490, 0xa883, 0x0008, 0x0478, 0xa883, 0x000e, 0x0460,
+	0xa883, 0x0017, 0x0448, 0xa883, 0x0035, 0x0430, 0x080c, 0x56d9,
+	0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82, 0x1ddc, 0x02c0, 0x6068,
+	0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006, 0x1188, 0x7010, 0x905d,
+	0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000, 0x9086,
+	0x0007, 0x1904, 0x7cf0, 0x7003, 0x0002, 0x0804, 0x7cf0, 0xa883,
+	0x0028, 0x0010, 0xa883, 0x0029, 0x012e, 0x00ee, 0x00be, 0x0420,
+	0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045, 0x0cb0, 0x2e60, 0x2019,
+	0x0002, 0x601b, 0x0014, 0x080c, 0xde2a, 0x012e, 0x00ee, 0x00be,
+	0x0005, 0x2009, 0x003e, 0x0058, 0x2009, 0x0004, 0x0040, 0x2009,
+	0x0006, 0x0028, 0x2009, 0x0016, 0x0010, 0x2009, 0x0001, 0xa884,
+	0x9084, 0xff00, 0x9105, 0xa886, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6d7b, 0x012e, 0x0005, 0x080c, 0x106c, 0x0005, 0x00d6, 0x080c,
+	0x87b5, 0x00de, 0x0005, 0x00d6, 0x00e6, 0x0126, 0x2091, 0x8000,
+	0x2071, 0x0040, 0x702c, 0xd084, 0x01d8, 0x908c, 0x0780, 0x190c,
+	0x7ea5, 0xd09c, 0x11a8, 0x2071, 0x1800, 0x70c0, 0x90ea, 0x0020,
+	0x0278, 0x8001, 0x70c2, 0x702c, 0x2048, 0xa800, 0x702e, 0x9006,
+	0xa802, 0xa806, 0x2071, 0x0040, 0x2900, 0x7022, 0x702c, 0x0c28,
+	0x012e, 0x00ee, 0x00de, 0x0005, 0x0006, 0x9084, 0x0780, 0x190c,
+	0x7ea5, 0x000e, 0x0005, 0xa898, 0x9084, 0x0003, 0x05a8, 0x080c,
+	0xab89, 0x05d8, 0x2900, 0x6016, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x0035, 0x1138, 0x6028, 0xc0fd, 0x602a, 0x2001, 0x196a, 0x2004,
+	0x0098, 0xa8a0, 0x9084, 0x00ff, 0xa99c, 0x918c, 0xff00, 0x9105,
+	0xa99c, 0x918c, 0x00ff, 0x080c, 0x2614, 0x1540, 0x00b6, 0x080c,
+	0x6620, 0x2b00, 0x00be, 0x1510, 0x6012, 0x6023, 0x0001, 0x2009,
+	0x0040, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0035, 0x0110, 0x2009,
+	0x0041, 0x080c, 0xac7c, 0x0005, 0xa87b, 0x0101, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6d7b, 0x012e, 0x0005, 0xa87b, 0x002c, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x6d7b, 0x012e, 0x0005, 0xa87b, 0x0028,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6d7b, 0x012e, 0x080c, 0xabdf,
+	0x0005, 0x00d6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6, 0x7007,
+	0x0001, 0xaa74, 0x9282, 0x0004, 0x1a04, 0x7e96, 0xa97c, 0x9188,
+	0x1000, 0x2104, 0x905d, 0xb804, 0xd284, 0x0140, 0x05e8, 0x8007,
+	0x9084, 0x00ff, 0x9084, 0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c,
+	0xab89, 0x1118, 0x080c, 0xac4f, 0x05a8, 0x6212, 0xa874, 0x0002,
+	0x7e74, 0x7e79, 0x7e7c, 0x7e82, 0x2019, 0x0002, 0x080c, 0xe249,
+	0x0060, 0x080c, 0xe1d9, 0x0048, 0x2019, 0x0002, 0xa980, 0x080c,
+	0xe1f8, 0x0018, 0xa980, 0x080c, 0xe1d9, 0x080c, 0xabdf, 0xa887,
+	0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d7b, 0x012e, 0x00be,
+	0x001e, 0x002e, 0x003e, 0x00ce, 0x00de, 0x0005, 0xa887, 0x0006,
+	0x0c80, 0xa887, 0x0002, 0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887,
+	0x0004, 0x0c38, 0xa887, 0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04,
+	0x7ea7, 0x0006, 0x0016, 0x2001, 0x8003, 0x0006, 0x0804, 0x0d86,
+	0x2001, 0x1834, 0x2004, 0x9005, 0x0005, 0x0005, 0x00f6, 0x2079,
+	0x0300, 0x2001, 0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009,
+	0x0218, 0x210c, 0xd1ec, 0x1120, 0x080c, 0x1615, 0x00fe, 0x0005,
+	0x2001, 0x020d, 0x2003, 0x0020, 0x781f, 0x0300, 0x00fe, 0x0005,
+	0x781c, 0xd08c, 0x0904, 0x7f28, 0x68c0, 0x90aa, 0x0005, 0x0a04,
+	0x8529, 0x7d44, 0x7c40, 0xd59c, 0x190c, 0x0d7d, 0x9584, 0x00f6,
+	0x1508, 0x9484, 0x7000, 0x0138, 0x908a, 0x2000, 0x1258, 0x9584,
+	0x0700, 0x8007, 0x04f0, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100,
+	0x0db0, 0x00b0, 0x9484, 0x0fff, 0x1130, 0x7000, 0x9084, 0xff00,
+	0x9086, 0x8100, 0x11c0, 0x080c, 0xe6ea, 0x080c, 0x8420, 0x7817,
+	0x0140, 0x00a8, 0x9584, 0x0076, 0x1118, 0x080c, 0x847c, 0x19c8,
+	0xd5a4, 0x0148, 0x0046, 0x0056, 0x080c, 0x7f78, 0x080c, 0x2126,
+	0x005e, 0x004e, 0x0020, 0x080c, 0xe6ea, 0x7817, 0x0140, 0x080c,
+	0x74c8, 0x0168, 0x2001, 0x0111, 0x2004, 0xd08c, 0x0140, 0x6893,
+	0x0000, 0x2001, 0x0110, 0x2003, 0x0008, 0x2003, 0x0000, 0x0489,
+	0x0005, 0x0002, 0x7f35, 0x8242, 0x7f32, 0x7f32, 0x7f32, 0x7f32,
+	0x7f32, 0x7f32, 0x7817, 0x0140, 0x0005, 0x7000, 0x908c, 0xff00,
+	0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x6892, 0x9286, 0x2000,
+	0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x5736, 0x0070,
+	0x080c, 0x7f98, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c, 0x817f,
+	0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x8356, 0x7817, 0x0140,
+	0x0005, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0178, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048,
+	0x2518, 0x080c, 0x4b09, 0x003e, 0x002e, 0x0005, 0x0036, 0x0046,
+	0x0056, 0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050,
+	0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40,
+	0x2019, 0xffff, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0160, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0003, 0x1130, 0x0026, 0x2011, 0x8048,
+	0x080c, 0x4b09, 0x002e, 0x00fe, 0x005e, 0x004e, 0x003e, 0x0005,
+	0x00b6, 0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, 0x9096, 0x0001,
+	0x0120, 0x9096, 0x0023, 0x1904, 0x8150, 0x9186, 0x0023, 0x15c0,
+	0x080c, 0x83eb, 0x0904, 0x8150, 0x6120, 0x9186, 0x0001, 0x0150,
+	0x9186, 0x0004, 0x0138, 0x9186, 0x0008, 0x0120, 0x9186, 0x000a,
+	0x1904, 0x8150, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1130,
+	0x2009, 0x0015, 0x080c, 0xac7c, 0x0804, 0x8150, 0x908e, 0x0214,
+	0x0118, 0x908e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c, 0xac7c,
+	0x0804, 0x8150, 0x908e, 0x0100, 0x1904, 0x8150, 0x7034, 0x9005,
+	0x1904, 0x8150, 0x2009, 0x0016, 0x080c, 0xac7c, 0x0804, 0x8150,
+	0x9186, 0x0022, 0x1904, 0x8150, 0x7030, 0x908e, 0x0300, 0x1580,
+	0x68dc, 0xd0a4, 0x0528, 0xc0b5, 0x68de, 0x7100, 0x918c, 0x00ff,
+	0x697e, 0x7004, 0x6882, 0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea,
+	0x0006, 0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x265d, 0x7932,
+	0x7936, 0x001e, 0x000e, 0x00fe, 0x080c, 0x2614, 0x695e, 0x703c,
+	0x00e6, 0x2071, 0x0140, 0x7086, 0x2071, 0x1800, 0x70b6, 0x00ee,
+	0x7034, 0x9005, 0x1904, 0x8150, 0x2009, 0x0017, 0x0804, 0x8100,
+	0x908e, 0x0400, 0x1190, 0x7034, 0x9005, 0x1904, 0x8150, 0x080c,
+	0x74c8, 0x0120, 0x2009, 0x001d, 0x0804, 0x8100, 0x68dc, 0xc0a5,
+	0x68de, 0x2009, 0x0030, 0x0804, 0x8100, 0x908e, 0x0500, 0x1140,
+	0x7034, 0x9005, 0x1904, 0x8150, 0x2009, 0x0018, 0x0804, 0x8100,
+	0x908e, 0x2010, 0x1120, 0x2009, 0x0019, 0x0804, 0x8100, 0x908e,
+	0x2110, 0x1120, 0x2009, 0x001a, 0x0804, 0x8100, 0x908e, 0x5200,
+	0x1140, 0x7034, 0x9005, 0x1904, 0x8150, 0x2009, 0x001b, 0x0804,
+	0x8100, 0x908e, 0x5000, 0x1140, 0x7034, 0x9005, 0x1904, 0x8150,
+	0x2009, 0x001c, 0x0804, 0x8100, 0x908e, 0x1300, 0x1120, 0x2009,
+	0x0034, 0x0804, 0x8100, 0x908e, 0x1200, 0x1140, 0x7034, 0x9005,
+	0x1904, 0x8150, 0x2009, 0x0024, 0x0804, 0x8100, 0x908c, 0xff00,
+	0x918e, 0x2400, 0x1170, 0x2009, 0x002d, 0x2001, 0x1810, 0x2004,
+	0xd09c, 0x0904, 0x8100, 0x080c, 0xd65c, 0x1904, 0x8150, 0x0804,
+	0x80fe, 0x908c, 0xff00, 0x918e, 0x5300, 0x1120, 0x2009, 0x002a,
+	0x0804, 0x8100, 0x908e, 0x0f00, 0x1120, 0x2009, 0x0020, 0x0804,
+	0x8100, 0x908e, 0x6104, 0x1530, 0x2029, 0x0205, 0x2011, 0x026d,
+	0x8208, 0x2204, 0x9082, 0x0004, 0x8004, 0x8004, 0x20a8, 0x2011,
+	0x8015, 0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x4b09, 0x004e,
+	0x8108, 0x0f04, 0x80b4, 0x9186, 0x0280, 0x1d88, 0x2504, 0x8000,
+	0x202a, 0x2009, 0x0260, 0x0c58, 0x202b, 0x0000, 0x2009, 0x0023,
+	0x0804, 0x8100, 0x908e, 0x6000, 0x1120, 0x2009, 0x003f, 0x0804,
+	0x8100, 0x908e, 0x5400, 0x1138, 0x080c, 0x84d9, 0x1904, 0x8150,
+	0x2009, 0x0046, 0x04a8, 0x908e, 0x5500, 0x1148, 0x080c, 0x8501,
+	0x1118, 0x2009, 0x0041, 0x0460, 0x2009, 0x0042, 0x0448, 0x908e,
+	0x7800, 0x1118, 0x2009, 0x0045, 0x0418, 0x908e, 0x1000, 0x1118,
+	0x2009, 0x004e, 0x00e8, 0x908e, 0x6300, 0x1118, 0x2009, 0x004a,
+	0x00b8, 0x908c, 0xff00, 0x918e, 0x5600, 0x1118, 0x2009, 0x004f,
+	0x0078, 0x908c, 0xff00, 0x918e, 0x5700, 0x1118, 0x2009, 0x0050,
+	0x0038, 0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c,
+	0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2614,
+	0x1904, 0x8153, 0x080c, 0x65bf, 0x1904, 0x8153, 0xbe12, 0xbd16,
+	0x001e, 0x0016, 0x080c, 0x74c8, 0x01c0, 0x68dc, 0xd08c, 0x1148,
+	0x7000, 0x9084, 0x00ff, 0x1188, 0x7004, 0x9084, 0xff00, 0x1168,
+	0x0040, 0x687c, 0x9606, 0x1148, 0x6880, 0x9506, 0x9084, 0xff00,
+	0x1120, 0x9584, 0x00ff, 0xb886, 0x0080, 0xb884, 0x9005, 0x1168,
+	0x9186, 0x0046, 0x1150, 0x687c, 0x9606, 0x1138, 0x6880, 0x9506,
+	0x9084, 0xff00, 0x1110, 0x001e, 0x0098, 0x080c, 0xab89, 0x01a8,
+	0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x9186,
+	0x004c, 0x1110, 0x6023, 0x000a, 0x0016, 0x001e, 0x080c, 0xac7c,
+	0x00ce, 0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004,
+	0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b09, 0x080c, 0xac4f,
+	0x0d90, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e,
+	0x0016, 0x9186, 0x0017, 0x0118, 0x9186, 0x0030, 0x1128, 0x6007,
+	0x0009, 0x6017, 0x2900, 0x0020, 0x6007, 0x0051, 0x6017, 0x0000,
+	0x602f, 0x0009, 0x6003, 0x0001, 0x080c, 0x9207, 0x08a0, 0x080c,
+	0x3326, 0x1140, 0x7010, 0x9084, 0xff00, 0x8007, 0x908e, 0x0008,
+	0x1108, 0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c,
+	0xff00, 0x810f, 0x9186, 0x0033, 0x11e8, 0x080c, 0x83eb, 0x0904,
+	0x81da, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1140, 0x7034,
+	0x9005, 0x15c0, 0x2009, 0x0015, 0x080c, 0xac7c, 0x0498, 0x908e,
+	0x0100, 0x1580, 0x7034, 0x9005, 0x1568, 0x2009, 0x0016, 0x080c,
+	0xac7c, 0x0440, 0x9186, 0x0032, 0x1528, 0x7030, 0x908e, 0x1400,
+	0x1508, 0x2009, 0x0038, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211,
+	0x220c, 0x080c, 0x2614, 0x11a8, 0x080c, 0x65bf, 0x1190, 0xbe12,
+	0xbd16, 0x080c, 0xab89, 0x0168, 0x2b08, 0x6112, 0x080c, 0xcccb,
+	0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0xac7c, 0x0010,
+	0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x0046,
+	0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8, 0x9592,
+	0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f, 0x0804,
+	0x823c, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804, 0x823c,
+	0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011, 0x0000,
+	0x2019, 0x1837, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9, 0x0800,
+	0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f, 0x2071,
+	0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0, 0x9496,
+	0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600, 0x9706,
+	0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745, 0x1148,
+	0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6, 0x0080,
+	0x1d20, 0x8420, 0x8e70, 0x1f04, 0x8211, 0x82ff, 0x1118, 0x9085,
+	0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee, 0x004e,
+	0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184, 0x000f,
+	0x0002, 0x8259, 0x8259, 0x8259, 0x83fd, 0x8259, 0x825c, 0x8281,
+	0x830a, 0x8259, 0x8259, 0x8259, 0x8259, 0x8259, 0x8259, 0x8259,
+	0x8259, 0x7817, 0x0140, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8,
+	0x7120, 0x2160, 0x9c8c, 0x0003, 0x11c0, 0x9c8a, 0x1ddc, 0x02a8,
+	0x6868, 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158,
+	0xb910, 0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124,
+	0x610a, 0x2009, 0x0046, 0x080c, 0xac7c, 0x7817, 0x0140, 0x00be,
+	0x0005, 0x00b6, 0x00c6, 0x9484, 0x0fff, 0x0904, 0x82e6, 0x7110,
+	0xd1bc, 0x1904, 0x82e6, 0x7108, 0x700c, 0x2028, 0x918c, 0x00ff,
+	0x2130, 0x9094, 0xff00, 0x15c8, 0x81ff, 0x15b8, 0x9080, 0x3368,
+	0x200d, 0x918c, 0xff00, 0x810f, 0x2001, 0x0080, 0x9106, 0x0904,
+	0x82e6, 0x9182, 0x0801, 0x1a04, 0x82e6, 0x9190, 0x1000, 0x2204,
+	0x905d, 0x05e0, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15b8, 0xba04,
+	0x9294, 0xff00, 0x9286, 0x0600, 0x1190, 0x080c, 0xab89, 0x0598,
+	0x2b08, 0x7028, 0x6052, 0x702c, 0x604e, 0x6112, 0x6023, 0x0006,
+	0x7120, 0x610a, 0x7130, 0x615e, 0x080c, 0xd8c4, 0x00f8, 0x080c,
+	0x6a6a, 0x1138, 0xb807, 0x0606, 0x0c40, 0x190c, 0x81de, 0x11b0,
+	0x0880, 0x080c, 0xab89, 0x2b08, 0x0188, 0x6112, 0x6023, 0x0004,
+	0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007, 0x0005, 0x0010,
+	0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9207, 0x7817, 0x0140,
+	0x00ce, 0x00be, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120,
+	0x2011, 0x8049, 0x080c, 0x4b09, 0x080c, 0xac4f, 0x0d78, 0x2b08,
+	0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x615e, 0x6017,
+	0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c,
+	0x9200, 0x08e0, 0x00b6, 0x7110, 0xd1bc, 0x05d0, 0x7020, 0x2060,
+	0x9c84, 0x0003, 0x15a8, 0x9c82, 0x1ddc, 0x0690, 0x6868, 0x9c02,
+	0x1678, 0x9484, 0x0fff, 0x9082, 0x000c, 0x0650, 0x7008, 0x9084,
+	0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1510, 0x700c, 0xb914,
+	0x9106, 0x11f0, 0x7124, 0x610a, 0x601c, 0xd0fc, 0x11c8, 0x2001,
+	0x0271, 0x2004, 0x9005, 0x1180, 0x9484, 0x0fff, 0x9082, 0x000c,
+	0x0158, 0x0066, 0x2031, 0x0100, 0xa001, 0xa001, 0x8631, 0x1de0,
+	0x006e, 0x601c, 0xd0fc, 0x1120, 0x2009, 0x0045, 0x080c, 0xac7c,
+	0x7817, 0x0140, 0x00be, 0x0005, 0x6120, 0x9186, 0x0002, 0x0128,
+	0x9186, 0x0005, 0x0110, 0x9085, 0x0001, 0x0005, 0x080c, 0x3326,
+	0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086, 0x0000, 0x1130,
+	0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b, 0x0005, 0x836d,
+	0x836e, 0x836d, 0x836d, 0x83cd, 0x83dc, 0x0005, 0x00b6, 0x7110,
+	0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904, 0x83cb, 0x700c, 0x7108,
+	0x080c, 0x2614, 0x1904, 0x83cb, 0x080c, 0x65bf, 0x1904, 0x83cb,
+	0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8, 0x080c, 0x6a6a, 0x0118,
+	0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, 0x83eb, 0x00ce, 0x05d8,
+	0x080c, 0xab89, 0x2b08, 0x05b8, 0x6112, 0x080c, 0xcccb, 0x6023,
+	0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0xac7c, 0x0458,
+	0x080c, 0x6a6a, 0x0148, 0x9086, 0x0004, 0x0130, 0x080c, 0x6a72,
+	0x0118, 0x9086, 0x0004, 0x1180, 0x080c, 0xab89, 0x2b08, 0x01d8,
+	0x6112, 0x080c, 0xcccb, 0x6023, 0x0005, 0x7120, 0x610a, 0x2009,
+	0x0088, 0x080c, 0xac7c, 0x0078, 0x080c, 0xab89, 0x2b08, 0x0158,
+	0x6112, 0x080c, 0xcccb, 0x6023, 0x0004, 0x7120, 0x610a, 0x2009,
+	0x0001, 0x080c, 0xac7c, 0x00be, 0x0005, 0x7110, 0xd1bc, 0x0158,
+	0x00d1, 0x0148, 0x080c, 0x834c, 0x1130, 0x7124, 0x610a, 0x2009,
+	0x0089, 0x080c, 0xac7c, 0x0005, 0x7110, 0xd1bc, 0x0158, 0x0059,
+	0x0148, 0x080c, 0x834c, 0x1130, 0x7124, 0x610a, 0x2009, 0x008a,
+	0x080c, 0xac7c, 0x0005, 0x7020, 0x2060, 0x9c84, 0x0003, 0x1158,
+	0x9c82, 0x1ddc, 0x0240, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1218,
+	0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x00b6, 0x7110, 0xd1bc,
+	0x11d8, 0x7024, 0x2060, 0x9c84, 0x0003, 0x11b0, 0x9c82, 0x1ddc,
+	0x0298, 0x6868, 0x9c02, 0x1280, 0x7008, 0x9084, 0x00ff, 0x6110,
+	0x2158, 0xb910, 0x9106, 0x1140, 0x700c, 0xb914, 0x9106, 0x1120,
+	0x2009, 0x0051, 0x080c, 0xac7c, 0x7817, 0x0140, 0x00be, 0x0005,
+	0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049, 0x0005,
+	0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009, 0x0005,
+	0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086, 0xc000,
+	0x05c0, 0x080c, 0xab89, 0x05a8, 0x0066, 0x00c6, 0x0046, 0x2011,
+	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2614, 0x1590, 0x080c,
+	0x65bf, 0x1578, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce, 0x6012,
+	0x080c, 0xcccb, 0x080c, 0x103a, 0x0500, 0x2900, 0x6062, 0x9006,
+	0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9, 0x000e,
+	0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003, 0x006e,
+	0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001, 0x080c,
+	0x9207, 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c, 0xabdf, 0x006e,
+	0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6, 0x7000, 0x908c, 0xff00,
+	0x9184, 0xf000, 0x810f, 0x9086, 0x2000, 0x1904, 0x84d3, 0x9186,
+	0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005, 0x1904, 0x84d5,
+	0x7030, 0x908e, 0x0400, 0x0904, 0x84d5, 0x908e, 0x6000, 0x05e8,
+	0x908e, 0x5400, 0x05d0, 0x908e, 0x0300, 0x11d8, 0x2009, 0x1837,
+	0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c, 0x6a28, 0x0558,
+	0x68b0, 0x9084, 0x00ff, 0x7100, 0x918c, 0x00ff, 0x9106, 0x1518,
+	0x6880, 0x69b0, 0x918c, 0xff00, 0x9105, 0x7104, 0x9106, 0x11d8,
+	0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4, 0x11a8, 0x908e, 0x5200,
+	0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e, 0x5000, 0x09b8, 0x0058,
+	0x9186, 0x0023, 0x1140, 0x080c, 0x83eb, 0x0128, 0x6004, 0x9086,
+	0x0002, 0x0118, 0x0000, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce,
+	0x0005, 0x0156, 0x0046, 0x0016, 0x0036, 0x7038, 0x2020, 0x8427,
+	0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1805,
+	0x2011, 0x027a, 0x080c, 0xbba1, 0x1178, 0xd48c, 0x0148, 0x20a9,
+	0x0004, 0x2019, 0x1801, 0x2011, 0x027e, 0x080c, 0xbba1, 0x1120,
+	0xd494, 0x0110, 0x9085, 0x0001, 0x003e, 0x001e, 0x004e, 0x015e,
+	0x0005, 0x0156, 0x0046, 0x0016, 0x0036, 0x7038, 0x2020, 0x8427,
+	0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1805,
+	0x2011, 0x0272, 0x080c, 0xbba1, 0x1178, 0xd48c, 0x0148, 0x20a9,
+	0x0004, 0x2019, 0x1801, 0x2011, 0x0276, 0x080c, 0xbba1, 0x1120,
+	0xd494, 0x0110, 0x9085, 0x0001, 0x003e, 0x001e, 0x004e, 0x015e,
+	0x0005, 0x00f6, 0x2079, 0x0200, 0x7800, 0xc0e5, 0xc0cc, 0x7802,
+	0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800, 0x7834, 0xd084, 0x1130,
+	0x2079, 0x0200, 0x7800, 0x9085, 0x1200, 0x7802, 0x00fe, 0x0005,
+	0x00e6, 0x2071, 0x1800, 0x7034, 0xc084, 0x7036, 0x00ee, 0x0005,
+	0x2071, 0x1a02, 0x7003, 0x0003, 0x700f, 0x0361, 0x9006, 0x701a,
+	0x7072, 0x7012, 0x7017, 0x1ddc, 0x7007, 0x0000, 0x7026, 0x702b,
+	0x9e36, 0x7032, 0x7037, 0x9eb3, 0x703f, 0xffff, 0x7042, 0x7047,
+	0x556c, 0x704a, 0x705b, 0x86f0, 0x080c, 0x1053, 0x090c, 0x0d7d,
+	0x2900, 0x703a, 0xa867, 0x0003, 0xa86f, 0x0100, 0xa8ab, 0xdcb0,
+	0x0005, 0x2071, 0x1a02, 0x1d04, 0x860c, 0x2091, 0x6000, 0x700c,
+	0x8001, 0x700e, 0x1590, 0x2001, 0x013c, 0x2004, 0x9005, 0x190c,
+	0x879a, 0x2001, 0x1869, 0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c,
+	0x1140, 0x20d1, 0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c,
+	0x0d7d, 0x700f, 0x0361, 0x7007, 0x0001, 0x0126, 0x2091, 0x8000,
+	0x2069, 0x1800, 0x69ec, 0xd1e4, 0x1138, 0xd1dc, 0x1118, 0x080c,
+	0x875e, 0x0010, 0x080c, 0x8735, 0x7040, 0x900d, 0x0148, 0x8109,
+	0x7142, 0x1130, 0x7044, 0x080f, 0x0018, 0x0126, 0x2091, 0x8000,
+	0x7024, 0x900d, 0x0188, 0x7020, 0x8001, 0x7022, 0x1168, 0x7023,
+	0x0009, 0x8109, 0x7126, 0x9186, 0x03e8, 0x1110, 0x7028, 0x080f,
+	0x81ff, 0x1110, 0x7028, 0x080f, 0x7030, 0x900d, 0x0180, 0x702c,
+	0x8001, 0x702e, 0x1160, 0x702f, 0x0009, 0x8109, 0x7132, 0x0128,
+	0x9184, 0x007f, 0x090c, 0x9f4f, 0x0010, 0x7034, 0x080f, 0x703c,
+	0x9005, 0x0118, 0x0310, 0x8001, 0x703e, 0x704c, 0x900d, 0x0168,
+	0x7048, 0x8001, 0x704a, 0x1148, 0x704b, 0x0009, 0x8109, 0x714e,
+	0x1120, 0x7150, 0x714e, 0x7058, 0x080f, 0x7018, 0x900d, 0x01d8,
+	0x0016, 0x7070, 0x900d, 0x0158, 0x706c, 0x8001, 0x706e, 0x1138,
+	0x706f, 0x0009, 0x8109, 0x7172, 0x1110, 0x7074, 0x080f, 0x001e,
+	0x7008, 0x8001, 0x700a, 0x1138, 0x700b, 0x0009, 0x8109, 0x711a,
+	0x1110, 0x701c, 0x080f, 0x012e, 0x7004, 0x0002, 0x8634, 0x8635,
+	0x865f, 0x00e6, 0x2071, 0x1a02, 0x7018, 0x9005, 0x1120, 0x711a,
+	0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071,
+	0x1a02, 0x701c, 0x9206, 0x1120, 0x701a, 0x701e, 0x7072, 0x7076,
+	0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1a02, 0xb888, 0x9102,
+	0x0208, 0xb98a, 0x00ee, 0x0005, 0x0005, 0x00b6, 0x2031, 0x0010,
+	0x7110, 0x080c, 0x6620, 0x11a8, 0xb888, 0x8001, 0x0290, 0xb88a,
+	0x1180, 0x0126, 0x2091, 0x8000, 0x0066, 0xb8d0, 0x9005, 0x0138,
+	0x0026, 0xba3c, 0x0016, 0x080c, 0x674b, 0x001e, 0x002e, 0x006e,
+	0x012e, 0x8108, 0x9182, 0x0800, 0x1220, 0x8631, 0x0128, 0x7112,
+	0x0c00, 0x900e, 0x7007, 0x0002, 0x7112, 0x00be, 0x0005, 0x2031,
+	0x0010, 0x7014, 0x2060, 0x0126, 0x2091, 0x8000, 0x6048, 0x9005,
+	0x0128, 0x8001, 0x604a, 0x1110, 0x080c, 0xcb4c, 0x6018, 0x9005,
+	0x0904, 0x86b7, 0x00f6, 0x2079, 0x0300, 0x7918, 0xd1b4, 0x1904,
+	0x86ca, 0x781b, 0x2020, 0xa001, 0x7918, 0xd1b4, 0x0120, 0x781b,
+	0x2000, 0x0804, 0x86ca, 0x8001, 0x601a, 0x0106, 0x781b, 0x2000,
+	0xa001, 0x7918, 0xd1ac, 0x1dd0, 0x010e, 0x00fe, 0x1540, 0x6120,
+	0x9186, 0x0003, 0x0148, 0x9186, 0x0006, 0x0130, 0x9186, 0x0009,
+	0x11e0, 0x611c, 0xd1c4, 0x1100, 0x080c, 0xc832, 0x01b0, 0x6014,
+	0x2048, 0xa884, 0x908a, 0x199a, 0x0280, 0x9082, 0x1999, 0xa886,
+	0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x800b, 0x810b,
+	0x9108, 0x611a, 0x080c, 0xcf7d, 0x0110, 0x080c, 0xc523, 0x012e,
+	0x9c88, 0x001c, 0x7116, 0x2001, 0x181a, 0x2004, 0x9102, 0x1228,
+	0x8631, 0x0138, 0x2160, 0x0804, 0x8663, 0x7017, 0x1ddc, 0x7007,
+	0x0000, 0x0005, 0x00fe, 0x0c58, 0x00e6, 0x2071, 0x1a02, 0x7027,
+	0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005, 0x2001, 0x1a0b, 0x2003,
+	0x0000, 0x0005, 0x00e6, 0x2071, 0x1a02, 0x7132, 0x702f, 0x0009,
+	0x00ee, 0x0005, 0x2011, 0x1a0e, 0x2013, 0x0000, 0x0005, 0x00e6,
+	0x2071, 0x1a02, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005,
+	0x0086, 0x0026, 0x7054, 0x8000, 0x7056, 0x2001, 0x1a10, 0x2044,
+	0xa06c, 0x9086, 0x0000, 0x0150, 0x7068, 0xa09a, 0x7064, 0xa096,
+	0x7060, 0xa092, 0x705c, 0xa08e, 0x080c, 0x112f, 0x002e, 0x008e,
+	0x0005, 0x0006, 0x0016, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6,
+	0x00e6, 0x00f6, 0x0156, 0x080c, 0x8571, 0x015e, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x001e, 0x000e, 0x0005,
+	0x00e6, 0x2071, 0x1a02, 0x7172, 0x7276, 0x706f, 0x0009, 0x00ee,
+	0x0005, 0x00e6, 0x0006, 0x2071, 0x1a02, 0x7074, 0x9206, 0x1110,
+	0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x2069, 0x1800, 0x69ec,
+	0xd1e4, 0x1518, 0x0026, 0xd1ec, 0x0140, 0x6a54, 0x6874, 0x9202,
+	0x0288, 0x8117, 0x9294, 0x00c1, 0x0088, 0x9184, 0x0007, 0x01a0,
+	0x8109, 0x9184, 0x0007, 0x0110, 0x69ee, 0x0070, 0x8107, 0x9084,
+	0x0007, 0x910d, 0x8107, 0x9106, 0x9094, 0x00c1, 0x9184, 0xff3e,
+	0x9205, 0x68ee, 0x080c, 0x0f05, 0x002e, 0x0005, 0x69e8, 0x9184,
+	0x003f, 0x05b8, 0x8109, 0x9184, 0x003f, 0x01a8, 0x6a54, 0x6874,
+	0x9202, 0x0220, 0xd1bc, 0x0168, 0xc1bc, 0x0018, 0xd1bc, 0x1148,
+	0xc1bd, 0x2110, 0x00e6, 0x2071, 0x1800, 0x080c, 0x0f27, 0x00ee,
+	0x0400, 0x69ea, 0x00f0, 0x0026, 0x8107, 0x9094, 0x0007, 0x0128,
+	0x8001, 0x8007, 0x9085, 0x0007, 0x0050, 0x2010, 0x8004, 0x8004,
+	0x8004, 0x9084, 0x0007, 0x9205, 0x8007, 0x9085, 0x0028, 0x9086,
+	0x0040, 0x2010, 0x00e6, 0x2071, 0x1800, 0x080c, 0x0f27, 0x00ee,
+	0x002e, 0x0005, 0x0016, 0x00c6, 0x2009, 0xfffc, 0x210d, 0x2061,
+	0x0100, 0x60f0, 0x9100, 0x60f3, 0x0000, 0x2009, 0xfffc, 0x200f,
+	0x1220, 0x8108, 0x2105, 0x8000, 0x200f, 0x00ce, 0x001e, 0x0005,
+	0x00c6, 0x2061, 0x1a6e, 0x00ce, 0x0005, 0x9184, 0x000f, 0x8003,
+	0x8003, 0x8003, 0x9080, 0x1a6e, 0x2060, 0x0005, 0xa884, 0x908a,
+	0x199a, 0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a6e, 0x6014,
+	0x00ce, 0x9005, 0x1130, 0x2001, 0x001e, 0x0018, 0x908e, 0xffff,
+	0x01b0, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0x908c,
+	0x00c0, 0x918e, 0x00c0, 0x0904, 0x8878, 0xd0b4, 0x1168, 0xd0bc,
+	0x1904, 0x8851, 0x2009, 0x0006, 0x080c, 0x88a5, 0x0005, 0x900e,
+	0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc, 0x05e0, 0x908c, 0x2023,
+	0x1568, 0x87ff, 0x1558, 0xa9a8, 0x81ff, 0x1540, 0x6124, 0x918c,
+	0x0500, 0x1520, 0x6100, 0x918e, 0x0007, 0x1500, 0x2009, 0x1869,
+	0x210c, 0xd184, 0x11d8, 0x6003, 0x0003, 0x6007, 0x0043, 0x6047,
+	0xb035, 0x080c, 0x1c10, 0xa87c, 0xc0dd, 0xa87e, 0x600f, 0x0000,
+	0x00f6, 0x2079, 0x0380, 0x7818, 0xd0bc, 0x1de8, 0x7833, 0x0013,
+	0x2c00, 0x7836, 0x781b, 0x8080, 0x00fe, 0x0005, 0x908c, 0x0003,
+	0x0120, 0x918e, 0x0003, 0x1904, 0x889f, 0x908c, 0x2020, 0x918e,
+	0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8, 0x2009, 0x1869, 0x2104,
+	0xd084, 0x1138, 0x87ff, 0x1120, 0x2009, 0x0043, 0x0804, 0xac7c,
+	0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042, 0x0804, 0xac7c, 0x6110,
+	0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd,
+	0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890, 0x602e, 0xa88c, 0x6032,
+	0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003,
+	0x1904, 0x889f, 0x908c, 0x2020, 0x918e, 0x2020, 0x0170, 0x0076,
+	0x00f6, 0x2c78, 0x080c, 0x173e, 0x00fe, 0x007e, 0x87ff, 0x1120,
+	0x2009, 0x0042, 0x080c, 0xac7c, 0x0005, 0x6110, 0x00b6, 0x2158,
+	0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38,
+	0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x9084,
+	0x0003, 0x908e, 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, 0x0041,
+	0x080c, 0xac7c, 0x0005, 0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009,
+	0x0043, 0x080c, 0xac7c, 0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900,
+	0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009,
+	0x0004, 0x0019, 0x0005, 0x2009, 0x0001, 0x0096, 0x080c, 0xc832,
+	0x0518, 0x6014, 0x2048, 0xa982, 0xa800, 0x6016, 0x9186, 0x0001,
+	0x1188, 0xa97c, 0x918c, 0x8100, 0x918e, 0x8100, 0x1158, 0x00c6,
+	0x2061, 0x1a6e, 0x6200, 0xd28c, 0x1120, 0x6204, 0x8210, 0x0208,
+	0x6206, 0x00ce, 0x080c, 0x6bb0, 0x6014, 0x904d, 0x0076, 0x2039,
+	0x0000, 0x190c, 0x87be, 0x007e, 0x009e, 0x0005, 0x0156, 0x00c6,
+	0x2061, 0x1a6e, 0x6000, 0x81ff, 0x0110, 0x9205, 0x0008, 0x9204,
+	0x6002, 0x00ce, 0x015e, 0x0005, 0x6800, 0xd08c, 0x1138, 0x6808,
+	0x9005, 0x0120, 0x8001, 0x680a, 0x9085, 0x0001, 0x0005, 0x2071,
+	0x1923, 0x7003, 0x0006, 0x7007, 0x0000, 0x700f, 0x0000, 0x7013,
+	0x0001, 0x080c, 0x1053, 0x090c, 0x0d7d, 0xa867, 0x0006, 0xa86b,
+	0x0001, 0xa8ab, 0xdcb0, 0xa89f, 0x0000, 0x2900, 0x702e, 0x7033,
+	0x0000, 0x0005, 0x0096, 0x00e6, 0x2071, 0x1923, 0x702c, 0x2048,
+	0x6a2c, 0x721e, 0x6b30, 0x7322, 0x6834, 0x7026, 0xa896, 0x6838,
+	0x702a, 0xa89a, 0x6824, 0x7016, 0x683c, 0x701a, 0x2009, 0x0028,
+	0x200a, 0x9005, 0x0148, 0x900e, 0x9188, 0x000c, 0x8001, 0x1de0,
+	0x2100, 0x9210, 0x1208, 0x8318, 0xaa8e, 0xab92, 0x7010, 0xd084,
+	0x0178, 0xc084, 0x7007, 0x0001, 0x700f, 0x0000, 0x0006, 0x2009,
+	0x181d, 0x2104, 0x9082, 0x0007, 0x2009, 0x1b4d, 0x200a, 0x000e,
+	0xc095, 0x7012, 0x2008, 0x2001, 0x003b, 0x080c, 0x1686, 0x9006,
+	0x2071, 0x193c, 0x7002, 0x7006, 0x702a, 0x00ee, 0x009e, 0x0005,
+	0x00e6, 0x0126, 0x0156, 0x2091, 0x8000, 0x2071, 0x1800, 0x7154,
+	0x2001, 0x0008, 0x910a, 0x0638, 0x2001, 0x187d, 0x20ac, 0x9006,
+	0x9080, 0x0008, 0x1f04, 0x8958, 0x71c0, 0x9102, 0x02e0, 0x2071,
+	0x1877, 0x20a9, 0x0007, 0x00c6, 0x080c, 0xab89, 0x6023, 0x0009,
+	0x6003, 0x0004, 0x601f, 0x0101, 0x0089, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x8ade, 0x012e, 0x1f04, 0x8964, 0x9006, 0x00ce, 0x015e,
+	0x012e, 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x00e6, 0x00b6,
+	0x0096, 0x0086, 0x0056, 0x0046, 0x0026, 0x7118, 0x720c, 0x7620,
+	0x7004, 0xd084, 0x1128, 0x2021, 0x0024, 0x2029, 0x0002, 0x0020,
+	0x2021, 0x002c, 0x2029, 0x000a, 0x080c, 0x103a, 0x090c, 0x0d7d,
+	0x2900, 0x6016, 0x2058, 0xac66, 0x9006, 0xa802, 0xa806, 0xa86a,
+	0xa87a, 0xa8aa, 0xa887, 0x0005, 0xa87f, 0x0020, 0x7008, 0xa89a,
+	0x7010, 0xa89e, 0xae8a, 0xa8af, 0xffff, 0xa8b3, 0x0000, 0x8109,
+	0x0160, 0x080c, 0x103a, 0x090c, 0x0d7d, 0xad66, 0x2b00, 0xa802,
+	0x2900, 0xb806, 0x2058, 0x8109, 0x1da0, 0x002e, 0x004e, 0x005e,
+	0x008e, 0x009e, 0x00be, 0x00ee, 0x0005, 0x2079, 0x0000, 0x2071,
+	0x1923, 0x7004, 0x004b, 0x700c, 0x0002, 0x89d0, 0x89c9, 0x89c9,
+	0x0005, 0x89da, 0x8a3b, 0x8a3b, 0x8a3b, 0x8a3c, 0x8a4d, 0x8a4d,
+	0x700c, 0x0cba, 0x0126, 0x2091, 0x8000, 0x78a0, 0x79a0, 0x9106,
+	0x0128, 0x78a0, 0x79a0, 0x9106, 0x1904, 0x8a2e, 0x2001, 0x0005,
+	0x2004, 0xd0bc, 0x0130, 0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012,
+	0x0ca8, 0x012e, 0x7018, 0x910a, 0x1130, 0x7030, 0x9005, 0x05a8,
+	0x080c, 0x8a7c, 0x0490, 0x1210, 0x7114, 0x910a, 0x9192, 0x000a,
+	0x0210, 0x2009, 0x000a, 0x2001, 0x1888, 0x2014, 0x2001, 0x1935,
+	0x2004, 0x9100, 0x9202, 0x0e48, 0x080c, 0x8bc8, 0x2200, 0x9102,
+	0x0208, 0x2208, 0x0096, 0x702c, 0x2048, 0xa873, 0x0001, 0xa976,
+	0x080c, 0x8cd1, 0x2100, 0xa87e, 0xa86f, 0x0000, 0x009e, 0x0126,
+	0x2091, 0x8000, 0x2009, 0x1a20, 0x2104, 0xc085, 0x200a, 0x700f,
+	0x0002, 0x012e, 0x080c, 0x114e, 0x1de8, 0x0005, 0x2001, 0x0005,
+	0x2004, 0xd0bc, 0x0130, 0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012,
+	0x0ca8, 0x012e, 0x0005, 0x0005, 0x700c, 0x0002, 0x8a41, 0x8a44,
+	0x8a43, 0x080c, 0x89d8, 0x0005, 0x8001, 0x700e, 0x0096, 0x702c,
+	0x2048, 0xa974, 0x009e, 0x0011, 0x0ca0, 0x0005, 0x0096, 0x702c,
+	0x2048, 0x7018, 0x9100, 0x7214, 0x921a, 0x1130, 0x701c, 0xa88e,
+	0x7020, 0xa892, 0x9006, 0x0068, 0x0006, 0x080c, 0x8cd1, 0x2100,
+	0xaa8c, 0x9210, 0xaa8e, 0x1220, 0xa890, 0x9081, 0x0000, 0xa892,
+	0x000e, 0x009e, 0x2f08, 0x9188, 0x0028, 0x200a, 0x701a, 0x0005,
+	0x00e6, 0x2071, 0x1923, 0x700c, 0x0002, 0x8a7a, 0x8a7a, 0x8a78,
+	0x700f, 0x0001, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x7030,
+	0x9005, 0x0508, 0x2078, 0x7814, 0x2048, 0xae88, 0x00b6, 0x2059,
+	0x0000, 0x080c, 0x8ae7, 0x00be, 0x01b0, 0x00e6, 0x2071, 0x193c,
+	0x080c, 0x8b2e, 0x00ee, 0x0178, 0x0096, 0x080c, 0x1053, 0x2900,
+	0x009e, 0x0148, 0xa8aa, 0x04b9, 0x0041, 0x2001, 0x1946, 0x2003,
+	0x0000, 0x012e, 0x08c8, 0x012e, 0x0005, 0x00d6, 0x00c6, 0x0086,
+	0x00a6, 0x2940, 0x2650, 0x2600, 0x9005, 0x0180, 0xa864, 0x9084,
+	0x000f, 0x2068, 0x9d88, 0x1e62, 0x2165, 0x0056, 0x2029, 0x0000,
+	0x080c, 0x8c56, 0x080c, 0x1e38, 0x1dd8, 0x005e, 0x00ae, 0x2001,
+	0x187f, 0x2004, 0xa88a, 0x080c, 0x173e, 0x781f, 0x0101, 0x7813,
+	0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x8b3d, 0x012e, 0x008e,
+	0x00ce, 0x00de, 0x0005, 0x7030, 0x9005, 0x0138, 0x2078, 0x780c,
+	0x7032, 0x2001, 0x1946, 0x2003, 0x0001, 0x0005, 0x00e6, 0x2071,
+	0x1923, 0x7030, 0x600e, 0x2c00, 0x7032, 0x00ee, 0x0005, 0x00d6,
+	0x00c6, 0x0026, 0x9b80, 0x8db0, 0x2005, 0x906d, 0x090c, 0x0d7d,
+	0x9b80, 0x8da8, 0x2005, 0x9065, 0x090c, 0x0d7d, 0x6114, 0x2600,
+	0x9102, 0x0248, 0x6828, 0x9102, 0x02f0, 0x9085, 0x0001, 0x002e,
+	0x00ce, 0x00de, 0x0005, 0x6804, 0xd094, 0x0148, 0x6854, 0xd084,
+	0x1178, 0xc085, 0x6856, 0x2011, 0x8026, 0x080c, 0x4b09, 0x684c,
+	0x0096, 0x904d, 0x090c, 0x0d7d, 0xa804, 0x8000, 0xa806, 0x009e,
+	0x9006, 0x2030, 0x0c20, 0x6854, 0xd08c, 0x1d08, 0xc08d, 0x6856,
+	0x2011, 0x8025, 0x080c, 0x4b09, 0x684c, 0x0096, 0x904d, 0x090c,
+	0x0d7d, 0xa800, 0x8000, 0xa802, 0x009e, 0x0888, 0x7000, 0x2019,
+	0x0008, 0x8319, 0x7104, 0x9102, 0x1118, 0x2300, 0x9005, 0x0020,
+	0x0210, 0x9302, 0x0008, 0x8002, 0x0005, 0x00d6, 0x7814, 0x9005,
+	0x090c, 0x0d7d, 0x781c, 0x9084, 0x0101, 0x9086, 0x0101, 0x190c,
+	0x0d7d, 0x2069, 0x193c, 0x6804, 0x9080, 0x193e, 0x2f08, 0x2102,
+	0x6904, 0x8108, 0x9182, 0x0008, 0x0208, 0x900e, 0x6906, 0x9180,
+	0x193e, 0x2003, 0x0000, 0x00de, 0x0005, 0x0096, 0x00c6, 0x2060,
+	0x6014, 0x2048, 0xa8a8, 0x0096, 0x2048, 0x9005, 0x190c, 0x106c,
+	0x009e, 0xa8ab, 0x0000, 0x080c, 0x0fec, 0x080c, 0xabdf, 0x00ce,
+	0x009e, 0x0005, 0x6020, 0x9086, 0x0009, 0x1128, 0x601c, 0xd0c4,
+	0x0110, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x6000, 0x9086,
+	0x0000, 0x0178, 0x6010, 0x9005, 0x0150, 0x00b6, 0x2058, 0x080c,
+	0x8ee3, 0x00be, 0x6013, 0x0000, 0x601b, 0x0000, 0x0010, 0x2c00,
+	0x0861, 0x0005, 0x2009, 0x1927, 0x210c, 0xd194, 0x0005, 0x00e6,
+	0x2071, 0x1923, 0x7110, 0xc194, 0xd19c, 0x1118, 0xc185, 0x7007,
+	0x0000, 0x7112, 0x2001, 0x003b, 0x080c, 0x1686, 0x00ee, 0x0005,
+	0x0096, 0x00d6, 0x9006, 0x7006, 0x700e, 0x701a, 0x701e, 0x7022,
+	0x7016, 0x702a, 0x7026, 0x702f, 0x0000, 0x080c, 0x8d30, 0x0170,
+	0x080c, 0x8d65, 0x0158, 0x2900, 0x7002, 0x700a, 0x701a, 0x7013,
+	0x0001, 0x701f, 0x000a, 0x00de, 0x009e, 0x0005, 0x900e, 0x0cd8,
+	0x00e6, 0x0096, 0x0086, 0x00d6, 0x00c6, 0x2071, 0x1930, 0x721c,
+	0x2100, 0x9202, 0x1618, 0x080c, 0x8d65, 0x090c, 0x0d7d, 0x7018,
+	0x9005, 0x1160, 0x2900, 0x7002, 0x700a, 0x701a, 0x9006, 0x7006,
+	0x700e, 0xa806, 0xa802, 0x7012, 0x701e, 0x0038, 0x2040, 0xa806,
+	0x2900, 0xa002, 0x701a, 0xa803, 0x0000, 0x7010, 0x8000, 0x7012,
+	0x701c, 0x9080, 0x000a, 0x701e, 0x721c, 0x08d0, 0x721c, 0x00ce,
+	0x00de, 0x008e, 0x009e, 0x00ee, 0x0005, 0x0096, 0x0156, 0x0136,
+	0x0146, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1930, 0x7300,
+	0x831f, 0x831e, 0x831e, 0x9384, 0x003f, 0x20e8, 0x939c, 0xffc0,
+	0x9398, 0x0003, 0x7104, 0x080c, 0x8cd1, 0x810c, 0x2100, 0x9318,
+	0x8003, 0x2228, 0x2021, 0x0078, 0x9402, 0x9532, 0x0208, 0x2028,
+	0x2500, 0x8004, 0x20a8, 0x23a0, 0xa001, 0xa001, 0x4005, 0x2508,
+	0x080c, 0x8cda, 0x2130, 0x7014, 0x9600, 0x7016, 0x2600, 0x711c,
+	0x9102, 0x701e, 0x7004, 0x9600, 0x2008, 0x9082, 0x000a, 0x1190,
+	0x7000, 0x2048, 0xa800, 0x9005, 0x1148, 0x2009, 0x0001, 0x0026,
+	0x080c, 0x8bc8, 0x002e, 0x7000, 0x2048, 0xa800, 0x7002, 0x7007,
+	0x0000, 0x0008, 0x7106, 0x2500, 0x9212, 0x1904, 0x8c07, 0x012e,
+	0x00ee, 0x014e, 0x013e, 0x015e, 0x009e, 0x0005, 0x0016, 0x0026,
+	0x00e6, 0x0126, 0x2091, 0x8000, 0x9580, 0x8da8, 0x2005, 0x9075,
+	0x090c, 0x0d7d, 0x080c, 0x8cac, 0x012e, 0x9580, 0x8da4, 0x2005,
+	0x9075, 0x090c, 0x0d7d, 0x0156, 0x0136, 0x01c6, 0x0146, 0x01d6,
+	0x831f, 0x831e, 0x831e, 0x9384, 0x003f, 0x20e0, 0x9384, 0xffc0,
+	0x9100, 0x2098, 0xa860, 0x20e8, 0xa95c, 0x2c05, 0x9100, 0x20a0,
+	0x20a9, 0x0002, 0x4003, 0x2e0c, 0x2d00, 0x0002, 0x8c96, 0x8c96,
+	0x8c98, 0x8c96, 0x8c98, 0x8c96, 0x8c96, 0x8c96, 0x8c96, 0x8c96,
+	0x8c9e, 0x8c96, 0x8c9e, 0x8c96, 0x8c96, 0x8c96, 0x080c, 0x0d7d,
+	0x4104, 0x20a9, 0x0002, 0x4002, 0x4003, 0x0028, 0x20a9, 0x0002,
+	0x4003, 0x4104, 0x4003, 0x01de, 0x014e, 0x01ce, 0x013e, 0x015e,
+	0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x7014, 0x8001, 0x7016,
+	0x710c, 0x2110, 0x00f1, 0x810c, 0x9188, 0x0003, 0x7308, 0x8210,
+	0x9282, 0x000a, 0x1198, 0x7008, 0x2048, 0xa800, 0x9005, 0x0158,
+	0x0006, 0x080c, 0x8d74, 0x009e, 0xa807, 0x0000, 0x2900, 0x700a,
+	0x7010, 0x8001, 0x7012, 0x700f, 0x0000, 0x0008, 0x720e, 0x009e,
+	0x0005, 0x0006, 0x810b, 0x810b, 0x2100, 0x810b, 0x9100, 0x2008,
+	0x000e, 0x0005, 0x0006, 0x0026, 0x2100, 0x9005, 0x0158, 0x9092,
+	0x000c, 0x0240, 0x900e, 0x8108, 0x9082, 0x000c, 0x1de0, 0x002e,
+	0x000e, 0x0005, 0x900e, 0x0cd8, 0x2d00, 0x90b8, 0x0008, 0x690c,
+	0x6810, 0x2019, 0x0001, 0x2031, 0x8d1a, 0x9112, 0x0220, 0x0118,
+	0x8318, 0x2208, 0x0cd0, 0x6808, 0x9005, 0x0108, 0x8318, 0x233a,
+	0x6804, 0xd084, 0x2300, 0x2021, 0x0001, 0x1150, 0x9082, 0x0003,
+	0x0967, 0x0a67, 0x8420, 0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0,
+	0x9082, 0x0002, 0x0967, 0x0a67, 0x8420, 0x9082, 0x0005, 0x0967,
+	0x0a67, 0x0cd0, 0x6c1a, 0x2d00, 0x90b8, 0x0007, 0x00e6, 0x2071,
+	0x1800, 0x7128, 0x6810, 0x2019, 0x0001, 0x910a, 0x0118, 0x0210,
+	0x8318, 0x0cd8, 0x2031, 0x8d2d, 0x0870, 0x6c16, 0x00ee, 0x0005,
+	0x0096, 0x0046, 0x0126, 0x2091, 0x8000, 0x2b00, 0x9080, 0x8dac,
+	0x2005, 0x9005, 0x090c, 0x0d7d, 0x2004, 0x90a0, 0x000a, 0x080c,
+	0x1053, 0x01d0, 0x2900, 0x7026, 0xa803, 0x0000, 0xa807, 0x0000,
+	0x080c, 0x1053, 0x0188, 0x7024, 0xa802, 0xa807, 0x0000, 0x2900,
+	0x7026, 0x94a2, 0x000a, 0x0110, 0x0208, 0x0c90, 0x9085, 0x0001,
+	0x012e, 0x004e, 0x009e, 0x0005, 0x7024, 0x9005, 0x0dc8, 0x2048,
+	0xac00, 0x080c, 0x106c, 0x2400, 0x0cc0, 0x0126, 0x2091, 0x8000,
+	0x7024, 0x2048, 0x9005, 0x0130, 0xa800, 0x7026, 0xa803, 0x0000,
+	0xa807, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x7024,
+	0xa802, 0x2900, 0x7026, 0x012e, 0x0005, 0x0096, 0x9e80, 0x0009,
+	0x2004, 0x9005, 0x0138, 0x2048, 0xa800, 0x0006, 0x080c, 0x106c,
+	0x000e, 0x0cb8, 0x009e, 0x0005, 0x0096, 0x7008, 0x9005, 0x0138,
+	0x2048, 0xa800, 0x0006, 0x080c, 0x106c, 0x000e, 0x0cb8, 0x9006,
+	0x7002, 0x700a, 0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x702a,
+	0x7026, 0x702e, 0x009e, 0x0005, 0x1a6c, 0x0000, 0x0000, 0x0000,
+	0x1930, 0x0000, 0x0000, 0x0000, 0x1888, 0x0000, 0x0000, 0x0000,
+	0x1877, 0x0000, 0x0000, 0x0000, 0x00e6, 0x00c6, 0x00b6, 0x00a6,
+	0xa8a8, 0x2040, 0x2071, 0x1877, 0x080c, 0x8ece, 0xa067, 0x0023,
+	0x6010, 0x905d, 0x0904, 0x8ea3, 0xb814, 0xa06e, 0xb910, 0xa172,
+	0xb9a0, 0xa176, 0x2001, 0x0003, 0xa07e, 0xa834, 0xa082, 0xa07b,
+	0x0000, 0xa898, 0x9005, 0x0118, 0xa078, 0xc085, 0xa07a, 0x2858,
+	0x2031, 0x0018, 0xa068, 0x908a, 0x0019, 0x1a0c, 0x0d7d, 0x2020,
+	0x2050, 0x2940, 0xa864, 0x90bc, 0x00ff, 0x908c, 0x000f, 0x91e0,
+	0x1e62, 0x2c65, 0x9786, 0x0024, 0x2c05, 0x1590, 0x908a, 0x0036,
+	0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x8e10, 0x8e10, 0x8e12,
+	0x8e10, 0x8e10, 0x8e10, 0x8e14, 0x8e10, 0x8e10, 0x8e10, 0x8e16,
+	0x8e10, 0x8e10, 0x8e10, 0x8e18, 0x8e10, 0x8e10, 0x8e10, 0x8e1a,
+	0x8e10, 0x8e10, 0x8e10, 0x8e1c, 0x8e10, 0x8e10, 0x8e10, 0x8e1e,
+	0x080c, 0x0d7d, 0xa180, 0x04b8, 0xa190, 0x04a8, 0xa1a0, 0x0498,
+	0xa1b0, 0x0488, 0xa1c0, 0x0478, 0xa1d0, 0x0468, 0xa1e0, 0x0458,
+	0x908a, 0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x8e42,
+	0x8e40, 0x8e40, 0x8e40, 0x8e40, 0x8e40, 0x8e44, 0x8e40, 0x8e40,
+	0x8e40, 0x8e40, 0x8e40, 0x8e46, 0x8e40, 0x8e40, 0x8e40, 0x8e40,
+	0x8e40, 0x8e48, 0x8e40, 0x8e40, 0x8e40, 0x8e40, 0x8e40, 0x8e4a,
+	0x080c, 0x0d7d, 0xa180, 0x0038, 0xa198, 0x0028, 0xa1b0, 0x0018,
+	0xa1c8, 0x0008, 0xa1e0, 0x2600, 0x0002, 0x8e66, 0x8e68, 0x8e6a,
+	0x8e6c, 0x8e6e, 0x8e70, 0x8e72, 0x8e74, 0x8e76, 0x8e78, 0x8e7a,
+	0x8e7c, 0x8e7e, 0x8e80, 0x8e82, 0x8e84, 0x8e86, 0x8e88, 0x8e8a,
+	0x8e8c, 0x8e8e, 0x8e90, 0x8e92, 0x8e94, 0x8e96, 0x080c, 0x0d7d,
+	0xb9e2, 0x0468, 0xb9de, 0x0458, 0xb9da, 0x0448, 0xb9d6, 0x0438,
+	0xb9d2, 0x0428, 0xb9ce, 0x0418, 0xb9ca, 0x0408, 0xb9c6, 0x00f8,
+	0xb9c2, 0x00e8, 0xb9be, 0x00d8, 0xb9ba, 0x00c8, 0xb9b6, 0x00b8,
+	0xb9b2, 0x00a8, 0xb9ae, 0x0098, 0xb9aa, 0x0088, 0xb9a6, 0x0078,
+	0xb9a2, 0x0068, 0xb99e, 0x0058, 0xb99a, 0x0048, 0xb996, 0x0038,
+	0xb992, 0x0028, 0xb98e, 0x0018, 0xb98a, 0x0008, 0xb986, 0x8631,
+	0x8421, 0x0120, 0x080c, 0x1e38, 0x0804, 0x8dea, 0x00ae, 0x00be,
+	0x00ce, 0x00ee, 0x0005, 0xa86c, 0xa06e, 0xa870, 0xa072, 0xa077,
+	0x00ff, 0x9006, 0x0804, 0x8dcc, 0x0006, 0x0016, 0x00b6, 0x6010,
+	0x2058, 0xb810, 0x9005, 0x01b0, 0x2001, 0x1924, 0x2004, 0x9005,
+	0x0188, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036,
+	0x0046, 0xbba0, 0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4b09,
+	0x004e, 0x003e, 0x00be, 0x001e, 0x000e, 0x0005, 0x9016, 0x710c,
+	0xa834, 0x910a, 0xa936, 0x7008, 0x9005, 0x0120, 0x8210, 0x910a,
+	0x0238, 0x0130, 0x7010, 0x8210, 0x910a, 0x0210, 0x0108, 0x0cd8,
+	0xaa8a, 0xa26a, 0x0005, 0x00f6, 0x00d6, 0x0036, 0x2079, 0x0300,
+	0x781b, 0x0200, 0x7818, 0xd094, 0x1dd8, 0x781b, 0x0202, 0xa001,
+	0xa001, 0x7818, 0xd094, 0x1da0, 0xb8ac, 0x9005, 0x01b8, 0x2068,
+	0x2079, 0x0000, 0x2c08, 0x911e, 0x1118, 0x680c, 0xb8ae, 0x0060,
+	0x9106, 0x0140, 0x2d00, 0x2078, 0x680c, 0x9005, 0x090c, 0x0d7d,
+	0x2068, 0x0cb0, 0x6b0c, 0x7b0e, 0x600f, 0x0000, 0x2079, 0x0300,
+	0x781b, 0x0200, 0x003e, 0x00de, 0x00fe, 0x0005, 0x00e6, 0x00d6,
+	0x0096, 0x00c6, 0x0036, 0x0126, 0x2091, 0x8000, 0x0156, 0x20a9,
+	0x01ff, 0x2071, 0x0300, 0x701b, 0x0200, 0x7018, 0xd094, 0x0110,
+	0x1f04, 0x8f23, 0x701b, 0x0202, 0xa001, 0xa001, 0x7018, 0xd094,
+	0x1d90, 0xb8ac, 0x9005, 0x01d0, 0x2060, 0x600c, 0xb8ae, 0x6003,
+	0x0004, 0x601b, 0x0000, 0x6013, 0x0000, 0x601f, 0x0101, 0x6014,
+	0x2048, 0xa88b, 0x0000, 0xa8a8, 0xa8ab, 0x0000, 0x904d, 0x090c,
+	0x0d7d, 0x080c, 0x106c, 0x080c, 0x8ade, 0x0c18, 0x2071, 0x0300,
+	0x701b, 0x0200, 0x015e, 0x012e, 0x003e, 0x00ce, 0x009e, 0x00de,
+	0x00ee, 0x0005, 0x00c6, 0x00b6, 0x0016, 0x0006, 0x0156, 0x080c,
+	0x2614, 0x015e, 0x11b0, 0x080c, 0x65bf, 0x190c, 0x0d7d, 0x000e,
+	0x001e, 0xb912, 0xb816, 0x080c, 0xab89, 0x0140, 0x2b00, 0x6012,
+	0x6023, 0x0001, 0x2009, 0x0001, 0x080c, 0xac7c, 0x00be, 0x00ce,
+	0x0005, 0x000e, 0x001e, 0x0cd0, 0x0066, 0x6000, 0x90b2, 0x0016,
+	0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0x8f95, 0x8f95, 0x8f95,
+	0x8f97, 0x8fe0, 0x8f95, 0x8f95, 0x8f95, 0x9043, 0x8f95, 0x907b,
+	0x8f95, 0x8f95, 0x8f95, 0x8f95, 0x8f95, 0x080c, 0x0d7d, 0x9182,
+	0x0040, 0x0002, 0x8faa, 0x8faa, 0x8faa, 0x8faa, 0x8faa, 0x8faa,
+	0x8faa, 0x8faa, 0x8faa, 0x8fac, 0x8fbd, 0x8faa, 0x8faa, 0x8faa,
+	0x8faa, 0x8fce, 0x080c, 0x0d7d, 0x0096, 0x6114, 0x2148, 0xa87b,
+	0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c,
+	0x6b7b, 0x080c, 0xabdf, 0x009e, 0x0005, 0x080c, 0x9621, 0x00d6,
+	0x6114, 0x080c, 0xc832, 0x0130, 0x0096, 0x6114, 0x2148, 0x080c,
+	0x6d7b, 0x009e, 0x00de, 0x080c, 0xabdf, 0x0005, 0x080c, 0x9621,
+	0x080c, 0x31ef, 0x6114, 0x0096, 0x2148, 0x080c, 0xc832, 0x0120,
+	0xa87b, 0x0029, 0x080c, 0x6d7b, 0x009e, 0x080c, 0xabdf, 0x0005,
+	0x601b, 0x0000, 0x9182, 0x0040, 0x0096, 0x0002, 0x8ffb, 0x8ffb,
+	0x8ffb, 0x8ffb, 0x8ffb, 0x8ffb, 0x8ffb, 0x8ffb, 0x8ffd, 0x8ffb,
+	0x8ffb, 0x8ffb, 0x903f, 0x8ffb, 0x8ffb, 0x8ffb, 0x8ffb, 0x8ffb,
+	0x8ffb, 0x9003, 0x8ffb, 0x080c, 0x0d7d, 0x6114, 0x2148, 0xa938,
+	0x918e, 0xffff, 0x05e0, 0x00e6, 0x6114, 0x2148, 0x080c, 0x8db4,
+	0x0096, 0xa8a8, 0x2048, 0x080c, 0x6b13, 0x009e, 0xa8ab, 0x0000,
+	0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, 0x080c, 0x8ee3, 0x00be,
+	0xae88, 0x00b6, 0x2059, 0x0000, 0x080c, 0x8ae7, 0x00be, 0x01e0,
+	0x2071, 0x193c, 0x080c, 0x8b2e, 0x01b8, 0x9086, 0x0001, 0x1128,
+	0x2001, 0x1946, 0x2004, 0x9005, 0x1178, 0x0096, 0x080c, 0x103a,
+	0x2900, 0x009e, 0x0148, 0xa8aa, 0x00f6, 0x2c78, 0x080c, 0x8aa5,
+	0x00fe, 0x00ee, 0x009e, 0x0005, 0x080c, 0x8ade, 0x0cd0, 0x080c,
+	0x90f7, 0x009e, 0x0005, 0x9182, 0x0040, 0x0096, 0x0002, 0x9057,
+	0x9057, 0x9057, 0x9059, 0x9057, 0x9057, 0x9057, 0x9079, 0x9057,
+	0x9057, 0x9057, 0x9057, 0x9057, 0x9057, 0x9057, 0x9057, 0x080c,
+	0x0d7d, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa8ac, 0xa836,
+	0xa8b0, 0xa83a, 0xa847, 0x0000, 0xa84b, 0x0000, 0xa884, 0x9092,
+	0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210,
+	0x621a, 0x080c, 0x1bc7, 0x2009, 0x8030, 0x080c, 0x9247, 0x009e,
+	0x0005, 0x080c, 0x0d7d, 0x080c, 0x9621, 0x6114, 0x2148, 0xa87b,
+	0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c,
+	0x6d7b, 0x080c, 0xabdf, 0x009e, 0x0005, 0x080c, 0xa888, 0x6144,
+	0xd1fc, 0x0120, 0xd1ac, 0x1110, 0x6003, 0x0003, 0x6000, 0x908a,
+	0x0016, 0x1a0c, 0x0d7d, 0x0096, 0x0023, 0x009e, 0x080c, 0xa8a4,
+	0x0005, 0x90b1, 0x90b1, 0x90b1, 0x90b3, 0x90c4, 0x90b1, 0x90b1,
+	0x90b1, 0x90b1, 0x90b1, 0x90b1, 0x90b1, 0x90b1, 0x90b1, 0x90b1,
+	0x90b1, 0x080c, 0x0d7d, 0x080c, 0xaa1c, 0x6114, 0x2148, 0xa87b,
+	0x0006, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c,
+	0x6d7b, 0x080c, 0xabdf, 0x0005, 0x0491, 0x0005, 0x080c, 0xa888,
+	0x6000, 0x6144, 0xd1fc, 0x0130, 0xd1ac, 0x1120, 0x6003, 0x0003,
+	0x2009, 0x0003, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0096, 0x0033,
+	0x009e, 0x0106, 0x080c, 0xa8a4, 0x010e, 0x0005, 0x90ee, 0x90ee,
+	0x90ee, 0x90f0, 0x90f7, 0x90ee, 0x90ee, 0x90ee, 0x90ee, 0x90ee,
+	0x90ee, 0x90ee, 0x90ee, 0x90ee, 0x90ee, 0x90ee, 0x080c, 0x0d7d,
+	0x0036, 0x00e6, 0x080c, 0xaa1c, 0x00ee, 0x003e, 0x0005, 0x00f6,
+	0x00e6, 0x601b, 0x0000, 0x6014, 0x2048, 0x6010, 0x9005, 0x0128,
+	0x00b6, 0x2058, 0x080c, 0x8ee3, 0x00be, 0x2071, 0x193c, 0x080c,
+	0x8b2e, 0x0160, 0x2001, 0x187f, 0x2004, 0xa88a, 0x2031, 0x0000,
+	0x2c78, 0x080c, 0x8aa5, 0x00ee, 0x00fe, 0x0005, 0x0096, 0xa88b,
+	0x0000, 0xa8a8, 0x2048, 0x080c, 0x106c, 0x009e, 0xa8ab, 0x0000,
+	0x080c, 0x8ade, 0x0c80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x187a, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0126, 0x2091, 0x8000, 0x0036, 0x0046,
+	0x20a9, 0x0010, 0x9006, 0x8004, 0x8086, 0x818e, 0x1208, 0x9200,
+	0x1f04, 0x913c, 0x8086, 0x818e, 0x004e, 0x003e, 0x012e, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005,
+	0x01c8, 0x911a, 0x12b8, 0x8213, 0x818d, 0x0228, 0x911a, 0x1220,
+	0x1f04, 0x9153, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04, 0x9153,
+	0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e, 0x007e,
+	0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8, 0x0126,
+	0x2091, 0x2800, 0x2079, 0x19e6, 0x012e, 0x00d6, 0x2069, 0x19e6,
+	0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000, 0x2069,
+	0x0200, 0x080c, 0xa67d, 0x04a9, 0x080c, 0xa668, 0x0491, 0x080c,
+	0xa66b, 0x0479, 0x080c, 0xa66e, 0x0461, 0x080c, 0xa671, 0x0449,
+	0x080c, 0xa674, 0x0431, 0x080c, 0xa677, 0x0419, 0x080c, 0xa67a,
+	0x0401, 0x01de, 0x014e, 0x015e, 0x6857, 0x0000, 0x00f6, 0x2079,
+	0x0380, 0x00f9, 0x7807, 0x0003, 0x7803, 0x0000, 0x7803, 0x0001,
+	0x2069, 0x0004, 0x2d04, 0x9084, 0xfffe, 0x9085, 0x8000, 0x206a,
+	0x2069, 0x0100, 0x6828, 0x9084, 0xfffc, 0x682a, 0x00fe, 0x00de,
+	0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240, 0x2001, 0x0000, 0x4004,
+	0x0005, 0x00c6, 0x7803, 0x0000, 0x9006, 0x7827, 0x0030, 0x782b,
+	0x0400, 0x7827, 0x0031, 0x782b, 0x1aee, 0x781f, 0xff00, 0x781b,
+	0xff00, 0x2061, 0x1ae3, 0x602f, 0x19e6, 0x6033, 0x1800, 0x6037,
+	0x1a02, 0x603b, 0x1e62, 0x603f, 0x1e72, 0x6042, 0x6047, 0x1ab9,
+	0x00ce, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086,
+	0x0001, 0x01b0, 0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08, 0x2061,
+	0x19e6, 0x602c, 0x8000, 0x602e, 0x601c, 0x9005, 0x0130, 0x9080,
+	0x0003, 0x2102, 0x611e, 0x00ce, 0x0005, 0x6122, 0x611e, 0x0cd8,
+	0x6146, 0x2c08, 0x2001, 0x0012, 0x080c, 0xa879, 0x0005, 0x0016,
+	0x2009, 0x8020, 0x6146, 0x2c08, 0x2001, 0x0382, 0x2004, 0x9084,
+	0x0007, 0x9086, 0x0001, 0x1128, 0x2001, 0x0019, 0x080c, 0xa879,
+	0x0088, 0x00c6, 0x2061, 0x19e6, 0x602c, 0x8000, 0x602e, 0x600c,
+	0x9005, 0x0128, 0x9080, 0x0003, 0x2102, 0x610e, 0x0010, 0x6112,
+	0x610e, 0x00ce, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084,
+	0x0007, 0x9086, 0x0001, 0x0198, 0x00c6, 0x6146, 0x600f, 0x0000,
+	0x2c08, 0x2061, 0x19e6, 0x6044, 0x9005, 0x0130, 0x9080, 0x0003,
+	0x2102, 0x6146, 0x00ce, 0x0005, 0x614a, 0x6146, 0x0cd8, 0x6146,
+	0x600f, 0x0000, 0x2c08, 0x2001, 0x0013, 0x080c, 0xa879, 0x0005,
+	0x6044, 0xd0dc, 0x0110, 0x080c, 0xa31a, 0x0005, 0x00f6, 0x00e6,
+	0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066, 0x0056, 0x0036,
+	0x0026, 0x0016, 0x0006, 0x0126, 0x902e, 0x2071, 0x19e6, 0x7648,
+	0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904, 0x92d3, 0x6010,
+	0x2058, 0xb8a0, 0x9206, 0x1904, 0x92ce, 0x87ff, 0x0120, 0x605c,
+	0x9106, 0x1904, 0x92ce, 0x704c, 0x9c06, 0x1178, 0x0036, 0x2019,
+	0x0001, 0x080c, 0xa0fa, 0x703f, 0x0000, 0x9006, 0x704e, 0x706a,
+	0x7052, 0x706e, 0x003e, 0x2029, 0x0001, 0x0811, 0x7048, 0x9c36,
+	0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36,
+	0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x0066,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x080c, 0xc832, 0x01f0, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003,
+	0x1588, 0x6004, 0x9086, 0x0040, 0x090c, 0xa31a, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076, 0x080c, 0xcb35,
+	0x080c, 0xe631, 0x080c, 0x6d7b, 0x007e, 0x003e, 0x001e, 0x080c,
+	0xca21, 0x080c, 0xac1a, 0x00ce, 0x0804, 0x926c, 0x2c78, 0x600c,
+	0x2060, 0x0804, 0x926c, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e,
+	0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036,
+	0x0076, 0x080c, 0xe631, 0x080c, 0xe27c, 0x007e, 0x003e, 0x001e,
+	0x08c0, 0x6020, 0x9086, 0x0009, 0x1168, 0xa87b, 0x0006, 0x0016,
+	0x0036, 0x0076, 0x080c, 0x6d7b, 0x080c, 0xabdf, 0x007e, 0x003e,
+	0x001e, 0x0848, 0x6020, 0x9086, 0x000a, 0x0904, 0x92b8, 0x0804,
+	0x92b1, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036,
+	0x0126, 0x2091, 0x8000, 0x2079, 0x19e6, 0x7848, 0x9065, 0x0904,
+	0x936d, 0x600c, 0x0006, 0x600f, 0x0000, 0x784c, 0x9c06, 0x11a0,
+	0x0036, 0x2019, 0x0001, 0x080c, 0xa0fa, 0x783f, 0x0000, 0x901e,
+	0x7b4e, 0x7b6a, 0x7b52, 0x7b6e, 0x003e, 0x000e, 0x9005, 0x1118,
+	0x600c, 0x600f, 0x0000, 0x0006, 0x00e6, 0x2f70, 0x080c, 0x9250,
+	0x00ee, 0x080c, 0xc832, 0x0548, 0x6014, 0x2048, 0x6020, 0x9086,
+	0x0003, 0x15a8, 0x3e08, 0x918e, 0x0002, 0x1188, 0x6010, 0x9005,
+	0x0170, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6048,
+	0x9005, 0x11c0, 0x2001, 0x1987, 0x2004, 0x604a, 0x0098, 0x6004,
+	0x9086, 0x0040, 0x090c, 0xa31a, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x080c, 0x6d6f, 0x080c, 0xca21, 0x6044, 0xc0fc, 0x6046,
+	0x080c, 0xac1a, 0x000e, 0x0804, 0x9316, 0x7e4a, 0x7e46, 0x012e,
 	0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005, 0x6020,
-	0x9086, 0x0006, 0x1118, 0x080c, 0xe26c, 0x0c38, 0x6020, 0x9086,
-	0x0009, 0x1130, 0xab7a, 0x080c, 0x6d80, 0x080c, 0xabed, 0x0c10,
-	0x6020, 0x9086, 0x000a, 0x0990, 0x0878, 0x0016, 0x0026, 0x0086,
-	0x9046, 0x00a9, 0x080c, 0x9496, 0x008e, 0x002e, 0x001e, 0x0005,
-	0x00f6, 0x0126, 0x2079, 0x19e7, 0x2091, 0x8000, 0x080c, 0x94df,
-	0x080c, 0x9573, 0x080c, 0x67b2, 0x012e, 0x00fe, 0x0005, 0x00b6,
+	0x9086, 0x0006, 0x1118, 0x080c, 0xe27c, 0x0c38, 0x6020, 0x9086,
+	0x0009, 0x1130, 0xab7a, 0x080c, 0x6d7b, 0x080c, 0xabdf, 0x0c10,
+	0x6020, 0x9086, 0x000a, 0x0990, 0x0850, 0x0016, 0x0026, 0x0086,
+	0x9046, 0x00a9, 0x080c, 0x947e, 0x008e, 0x002e, 0x001e, 0x0005,
+	0x00f6, 0x0126, 0x2079, 0x19e6, 0x2091, 0x8000, 0x080c, 0x94c7,
+	0x080c, 0x955b, 0x080c, 0x67ad, 0x012e, 0x00fe, 0x0005, 0x00b6,
 	0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x19e7, 0x7620, 0x2660, 0x2678,
-	0x8cff, 0x0904, 0x945b, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904,
-	0x9456, 0x88ff, 0x0120, 0x605c, 0x9106, 0x1904, 0x9456, 0x7030,
+	0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7620, 0x2660, 0x2678,
+	0x8cff, 0x0904, 0x9443, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904,
+	0x943e, 0x88ff, 0x0120, 0x605c, 0x9106, 0x1904, 0x943e, 0x7030,
 	0x9c06, 0x1570, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c,
-	0x86f6, 0x080c, 0x9e32, 0x68c3, 0x0000, 0x080c, 0xa338, 0x7033,
+	0x86d5, 0x080c, 0x9e16, 0x68c3, 0x0000, 0x080c, 0xa31a, 0x7033,
 	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2a0a, 0x9006, 0x080c, 0x2a0a, 0x2069,
+	0x2001, 0x0100, 0x080c, 0x2a29, 0x9006, 0x080c, 0x2a29, 0x2069,
 	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0040,
-	0x7008, 0xc0ad, 0x700a, 0x6003, 0x0009, 0x630a, 0x0804, 0x9456,
+	0x7008, 0xc0ad, 0x700a, 0x6003, 0x0009, 0x630a, 0x0804, 0x943e,
 	0x7020, 0x9c36, 0x1110, 0x660c, 0x7622, 0x701c, 0x9c36, 0x1140,
 	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x701e, 0x0010, 0x701f, 0x0000,
 	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
 	0x600f, 0x0000, 0x6044, 0xc0fc, 0x6046, 0x6014, 0x2048, 0x080c,
-	0xc838, 0x01e8, 0x6020, 0x9086, 0x0003, 0x1580, 0x080c, 0xca4d,
-	0x1118, 0x080c, 0xb5b5, 0x0098, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xcb36, 0x080c, 0xe621,
-	0x080c, 0x6d80, 0x008e, 0x003e, 0x001e, 0x080c, 0xca27, 0x080c,
-	0xac28, 0x080c, 0xa20e, 0x00ce, 0x0804, 0x93d0, 0x2c78, 0x600c,
-	0x2060, 0x0804, 0x93d0, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce,
+	0xc832, 0x01e8, 0x6020, 0x9086, 0x0003, 0x1580, 0x080c, 0xca47,
+	0x1118, 0x080c, 0xb5a6, 0x0098, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xcb35, 0x080c, 0xe631,
+	0x080c, 0x6d7b, 0x008e, 0x003e, 0x001e, 0x080c, 0xca21, 0x080c,
+	0xac1a, 0x080c, 0xa1f0, 0x00ce, 0x0804, 0x93b8, 0x2c78, 0x600c,
+	0x2060, 0x0804, 0x93b8, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce,
 	0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be, 0x0005, 0x6020, 0x9086,
-	0x0006, 0x1158, 0x0016, 0x0036, 0x0086, 0x080c, 0xe621, 0x080c,
-	0xe26c, 0x008e, 0x003e, 0x001e, 0x08d0, 0x080c, 0xb5b5, 0x6020,
+	0x0006, 0x1158, 0x0016, 0x0036, 0x0086, 0x080c, 0xe631, 0x080c,
+	0xe27c, 0x008e, 0x003e, 0x001e, 0x08d0, 0x080c, 0xb5a6, 0x6020,
 	0x9086, 0x0002, 0x1160, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e,
-	0x0904, 0x943c, 0x9086, 0x008b, 0x0904, 0x943c, 0x0840, 0x6020,
+	0x0904, 0x9424, 0x9086, 0x008b, 0x0904, 0x9424, 0x0840, 0x6020,
 	0x9086, 0x0005, 0x1920, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e,
-	0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804, 0x944f, 0x0006, 0x00f6,
+	0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804, 0x9437, 0x0006, 0x00f6,
 	0x00e6, 0x0096, 0x00b6, 0x00c6, 0x0066, 0x0016, 0x0126, 0x2091,
-	0x8000, 0x9280, 0x1000, 0x2004, 0x905d, 0x2079, 0x19e7, 0x9036,
+	0x8000, 0x9280, 0x1000, 0x2004, 0x905d, 0x2079, 0x19e6, 0x9036,
 	0x7828, 0x2060, 0x8cff, 0x0538, 0x6010, 0x9b06, 0x1500, 0x6043,
-	0xffff, 0x080c, 0xaa75, 0x01d8, 0x610c, 0x0016, 0x080c, 0x9fa2,
+	0xffff, 0x080c, 0xaa67, 0x01d8, 0x610c, 0x0016, 0x080c, 0x9f84,
 	0x6014, 0x2048, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016,
-	0x0036, 0x0086, 0x080c, 0xcb36, 0x080c, 0xe621, 0x080c, 0x6d80,
-	0x008e, 0x003e, 0x001e, 0x080c, 0xac28, 0x00ce, 0x08d8, 0x2c30,
-	0x600c, 0x2060, 0x08b8, 0x080c, 0x67cf, 0x012e, 0x001e, 0x006e,
+	0x0036, 0x0086, 0x080c, 0xcb35, 0x080c, 0xe631, 0x080c, 0x6d7b,
+	0x008e, 0x003e, 0x001e, 0x080c, 0xac1a, 0x00ce, 0x08d8, 0x2c30,
+	0x600c, 0x2060, 0x08b8, 0x080c, 0x67ca, 0x012e, 0x001e, 0x006e,
 	0x00ce, 0x00be, 0x009e, 0x00ee, 0x00fe, 0x000e, 0x0005, 0x0096,
 	0x0006, 0x0066, 0x00c6, 0x00d6, 0x9036, 0x7820, 0x9065, 0x0904,
-	0x9546, 0x600c, 0x0006, 0x6044, 0xc0fc, 0x6046, 0x600f, 0x0000,
+	0x952e, 0x600c, 0x0006, 0x6044, 0xc0fc, 0x6046, 0x600f, 0x0000,
 	0x7830, 0x9c06, 0x1588, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508,
-	0x080c, 0x86f6, 0x080c, 0x9e32, 0x68c3, 0x0000, 0x080c, 0xa338,
+	0x080c, 0x86d5, 0x080c, 0x9e16, 0x68c3, 0x0000, 0x080c, 0xa31a,
 	0x7833, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
-	0x0138, 0x2001, 0x0100, 0x080c, 0x2a0a, 0x9006, 0x080c, 0x2a0a,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2a29, 0x9006, 0x080c, 0x2a29,
 	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
-	0x0058, 0x080c, 0x6a03, 0x1538, 0x6003, 0x0009, 0x630a, 0x7808,
-	0xc0ad, 0x780a, 0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c, 0xc836,
-	0x01b0, 0x6020, 0x9086, 0x0003, 0x1508, 0x080c, 0xca4d, 0x1118,
-	0x080c, 0xb5b5, 0x0060, 0x080c, 0x6a03, 0x1168, 0xa867, 0x0103,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0x6d80, 0x080c, 0xca27, 0x080c,
-	0xac28, 0x080c, 0xa20e, 0x000e, 0x0804, 0x94e6, 0x7e22, 0x7e1e,
+	0x0058, 0x080c, 0x6a02, 0x1538, 0x6003, 0x0009, 0x630a, 0x7808,
+	0xc0ad, 0x780a, 0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c, 0xc830,
+	0x01b0, 0x6020, 0x9086, 0x0003, 0x1508, 0x080c, 0xca47, 0x1118,
+	0x080c, 0xb5a6, 0x0060, 0x080c, 0x6a02, 0x1168, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x080c, 0x6d7b, 0x080c, 0xca21, 0x080c,
+	0xac1a, 0x080c, 0xa1f0, 0x000e, 0x0804, 0x94ce, 0x7e22, 0x7e1e,
 	0x00de, 0x00ce, 0x006e, 0x000e, 0x009e, 0x0005, 0x6020, 0x9086,
-	0x0006, 0x1118, 0x080c, 0xe26c, 0x0c50, 0x080c, 0xb5b5, 0x6020,
+	0x0006, 0x1118, 0x080c, 0xe27c, 0x0c50, 0x080c, 0xb5a6, 0x6020,
 	0x9086, 0x0002, 0x1150, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e,
 	0x0990, 0x9086, 0x008b, 0x0978, 0x08d0, 0x6020, 0x9086, 0x0005,
 	0x19b0, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0d18, 0x9086,
 	0x008b, 0x0d00, 0x0860, 0x0006, 0x0096, 0x00b6, 0x00c6, 0x0066,
 	0x9036, 0x7828, 0x9065, 0x0510, 0x6010, 0x2058, 0x600c, 0x0006,
 	0x3e08, 0x918e, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x11a8, 0x6043,
-	0xffff, 0x080c, 0xaa75, 0x0180, 0x610c, 0x080c, 0x9fa2, 0x6014,
-	0x2048, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6d80,
-	0x080c, 0xac28, 0x000e, 0x08f0, 0x2c30, 0x0ce0, 0x006e, 0x00ce,
+	0xffff, 0x080c, 0xaa67, 0x0180, 0x610c, 0x080c, 0x9f84, 0x6014,
+	0x2048, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6d7b,
+	0x080c, 0xac1a, 0x000e, 0x08f0, 0x2c30, 0x0ce0, 0x006e, 0x00ce,
 	0x00be, 0x009e, 0x000e, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x0066,
-	0x080c, 0x613b, 0x11b0, 0x2071, 0x19e7, 0x7030, 0x9080, 0x0005,
-	0x2004, 0x904d, 0x0170, 0xa878, 0x9606, 0x1158, 0x2071, 0x19e7,
+	0x080c, 0x6136, 0x11b0, 0x2071, 0x19e6, 0x7030, 0x9080, 0x0005,
+	0x2004, 0x904d, 0x0170, 0xa878, 0x9606, 0x1158, 0x2071, 0x19e6,
 	0x7030, 0x9035, 0x0130, 0x9080, 0x0005, 0x2004, 0x9906, 0x1108,
 	0x0029, 0x006e, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00c6, 0x2660,
-	0x6043, 0xffff, 0x080c, 0xaa75, 0x0178, 0x080c, 0x9fa2, 0x6014,
-	0x2048, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xcb36,
-	0x080c, 0x6d80, 0x080c, 0xac28, 0x00ce, 0x0005, 0x00b6, 0x00e6,
-	0x00c6, 0x080c, 0xa8f4, 0x0106, 0x190c, 0xa896, 0x2071, 0x0101,
-	0x2e04, 0xc0c4, 0x2072, 0x6044, 0xd0fc, 0x1138, 0x010e, 0x190c,
-	0xa8b2, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x2071, 0x19e7, 0x7030,
-	0x9005, 0x0da0, 0x9c06, 0x190c, 0x0d7d, 0x7036, 0x080c, 0x86f6,
-	0x7004, 0x9084, 0x0007, 0x0002, 0x960e, 0x9610, 0x9617, 0x9621,
-	0x962f, 0x960e, 0x9617, 0x960c, 0x080c, 0x0d7d, 0x0428, 0x0005,
-	0x080c, 0xaa60, 0x7007, 0x0000, 0x7033, 0x0000, 0x00e8, 0x0066,
-	0x9036, 0x080c, 0x9fa2, 0x006e, 0x7007, 0x0000, 0x7033, 0x0000,
-	0x0098, 0x080c, 0xaa4b, 0x0140, 0x080c, 0xaa60, 0x0128, 0x0066,
-	0x9036, 0x080c, 0x9fa2, 0x006e, 0x7033, 0x0000, 0x0028, 0x080c,
-	0xaa4b, 0x080c, 0xa338, 0x0000, 0x010e, 0x190c, 0xa8b2, 0x00ce,
-	0x00ee, 0x00be, 0x0005, 0x00d6, 0x00c6, 0x080c, 0xa8f4, 0x0106,
-	0x190c, 0xa896, 0x6044, 0xd0fc, 0x1130, 0x010e, 0x190c, 0xa8b2,
-	0x00ce, 0x00de, 0x0005, 0x2069, 0x19e7, 0x684c, 0x9005, 0x0da8,
-	0x9c06, 0x190c, 0x0d7d, 0x6852, 0x00e6, 0x2d70, 0x080c, 0x926e,
-	0x00ee, 0x080c, 0x8703, 0x0016, 0x2009, 0x0040, 0x080c, 0x21b0,
-	0x001e, 0x683c, 0x9084, 0x0003, 0x0002, 0x966b, 0x966c, 0x968a,
-	0x9669, 0x080c, 0x0d7d, 0x0460, 0x6868, 0x9086, 0x0001, 0x0190,
-	0x600c, 0x9015, 0x0160, 0x6a4a, 0x600f, 0x0000, 0x6044, 0xc0fc,
-	0x6046, 0x9006, 0x7042, 0x684e, 0x683f, 0x0000, 0x00c8, 0x684a,
-	0x6846, 0x0ca0, 0x686b, 0x0000, 0x6848, 0x9065, 0x0d78, 0x6003,
-	0x0002, 0x0c60, 0x9006, 0x686a, 0x6852, 0x686e, 0x600c, 0x9015,
-	0x0120, 0x6a4a, 0x600f, 0x0000, 0x0018, 0x684e, 0x684a, 0x6846,
-	0x684f, 0x0000, 0x010e, 0x190c, 0xa8b2, 0x00ce, 0x00de, 0x0005,
-	0x0005, 0x6020, 0x9084, 0x000f, 0x000b, 0x0005, 0x96b6, 0x96b9,
-	0x9b27, 0x9bb6, 0x96b9, 0x9b27, 0x9bb6, 0x96b6, 0x96b9, 0x96b6,
-	0x96b6, 0x96b6, 0x96b6, 0x96b6, 0x96b6, 0x96b6, 0x080c, 0x95de,
-	0x0005, 0x00b6, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004,
-	0x908a, 0x0053, 0x1a0c, 0x0d7d, 0x6110, 0x2158, 0xb984, 0x2c78,
-	0x2061, 0x0100, 0x619a, 0x908a, 0x0040, 0x1a04, 0x9725, 0x005b,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e,
-	0x015e, 0x00be, 0x0005, 0x98aa, 0x98e5, 0x990e, 0x99b6, 0x99d8,
-	0x99de, 0x99eb, 0x99f3, 0x99ff, 0x9a05, 0x9a16, 0x9a05, 0x9a6e,
-	0x99f3, 0x9a7a, 0x9a80, 0x99ff, 0x9a80, 0x9a8c, 0x9723, 0x9723,
-	0x9723, 0x9723, 0x9723, 0x9723, 0x9723, 0x9723, 0x9723, 0x9723,
-	0x9723, 0x9fc3, 0x9fe6, 0x9ff7, 0xa017, 0xa049, 0x99eb, 0x9723,
-	0x99eb, 0x9a05, 0x9723, 0x990e, 0x99b6, 0x9723, 0xa42b, 0x9a05,
-	0x9723, 0xa447, 0x9a05, 0x9723, 0x99ff, 0x98a4, 0x9746, 0x9723,
-	0xa463, 0xa4d0, 0xa5b0, 0x9723, 0xa5bd, 0x99e8, 0xa5e8, 0x9723,
-	0xa053, 0xa5f4, 0x9723, 0x080c, 0x0d7d, 0x2100, 0x005b, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e,
-	0x00be, 0x0005, 0xa694, 0xa746, 0x9744, 0x976d, 0x9819, 0x9824,
-	0x9744, 0x99eb, 0x9744, 0x986b, 0x9877, 0x9788, 0x9744, 0x97a3,
-	0x97d7, 0xaacb, 0xab10, 0x9a05, 0x080c, 0x0d7d, 0x00d6, 0x0096,
-	0x080c, 0x9a9f, 0x7003, 0x2414, 0x7007, 0x0018, 0x700b, 0x0800,
-	0x7814, 0x2048, 0xa83c, 0x700e, 0xa850, 0x7022, 0xa854, 0x7026,
-	0x60c3, 0x0018, 0x080c, 0x9e02, 0x009e, 0x00de, 0x0005, 0x7810,
-	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x080c, 0xab57, 0x1118, 0x9084,
-	0xff80, 0x0110, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0096, 0x080c,
-	0x9a9f, 0x7003, 0x0500, 0x7814, 0x2048, 0xa874, 0x700a, 0xa878,
-	0x700e, 0xa87c, 0x7012, 0xa880, 0x7016, 0xa884, 0x701a, 0xa888,
-	0x701e, 0x60c3, 0x0010, 0x080c, 0x9e02, 0x009e, 0x00de, 0x0005,
-	0x00d6, 0x0096, 0x080c, 0x9a9f, 0x7003, 0x0500, 0x7814, 0x2048,
-	0xa8cc, 0x700a, 0xa8d0, 0x700e, 0xa8d4, 0x7012, 0xa8d8, 0x7016,
-	0xa8dc, 0x701a, 0xa8e0, 0x701e, 0x60c3, 0x0010, 0x080c, 0x9e02,
+	0x6043, 0xffff, 0x080c, 0xaa67, 0x0178, 0x080c, 0x9f84, 0x6014,
+	0x2048, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xcb35,
+	0x080c, 0x6d7b, 0x080c, 0xac1a, 0x00ce, 0x0005, 0x00b6, 0x00e6,
+	0x00c6, 0x080c, 0xa888, 0x0106, 0x2071, 0x0101, 0x2e04, 0xc0c4,
+	0x2072, 0x6044, 0xd0fc, 0x1138, 0x010e, 0x090c, 0xa8a4, 0x00ce,
+	0x00ee, 0x00be, 0x0005, 0x2071, 0x19e6, 0x7030, 0x9005, 0x0da0,
+	0x9c06, 0x190c, 0x0d7d, 0x7036, 0x080c, 0x86d5, 0x7004, 0x9084,
+	0x0007, 0x0002, 0x95f4, 0x95f6, 0x95fd, 0x9607, 0x9615, 0x95f4,
+	0x9602, 0x95f2, 0x080c, 0x0d7d, 0x0428, 0x0005, 0x080c, 0xaa52,
+	0x7007, 0x0000, 0x7033, 0x0000, 0x00e8, 0x0066, 0x9036, 0x080c,
+	0x9f84, 0x006e, 0x7007, 0x0000, 0x7033, 0x0000, 0x0098, 0x080c,
+	0xaa3d, 0x0140, 0x080c, 0xaa52, 0x0128, 0x0066, 0x9036, 0x080c,
+	0x9f84, 0x006e, 0x7033, 0x0000, 0x0028, 0x080c, 0xaa3d, 0x080c,
+	0xa31a, 0x0000, 0x010e, 0x190c, 0xa8a4, 0x00ce, 0x00ee, 0x00be,
+	0x0005, 0x00d6, 0x00c6, 0x080c, 0xa888, 0x0106, 0x6044, 0xd0fc,
+	0x1130, 0x010e, 0x090c, 0xa8a4, 0x00ce, 0x00de, 0x0005, 0x2069,
+	0x19e6, 0x684c, 0x9005, 0x0da8, 0x9c06, 0x190c, 0x0d7d, 0x6852,
+	0x00e6, 0x2d70, 0x080c, 0x9250, 0x00ee, 0x080c, 0x86e2, 0x0016,
+	0x2009, 0x0040, 0x080c, 0x21c1, 0x001e, 0x683c, 0x9084, 0x0003,
+	0x0002, 0x964f, 0x9650, 0x966e, 0x964d, 0x080c, 0x0d7d, 0x0460,
+	0x6868, 0x9086, 0x0001, 0x0190, 0x600c, 0x9015, 0x0160, 0x6a4a,
+	0x600f, 0x0000, 0x6044, 0xc0fc, 0x6046, 0x9006, 0x7042, 0x684e,
+	0x683f, 0x0000, 0x00c8, 0x684a, 0x6846, 0x0ca0, 0x686b, 0x0000,
+	0x6848, 0x9065, 0x0d78, 0x6003, 0x0002, 0x0c60, 0x9006, 0x686a,
+	0x6852, 0x686e, 0x600c, 0x9015, 0x0120, 0x6a4a, 0x600f, 0x0000,
+	0x0018, 0x684e, 0x684a, 0x6846, 0x684f, 0x0000, 0x010e, 0x190c,
+	0xa8a4, 0x00ce, 0x00de, 0x0005, 0x0005, 0x6020, 0x9084, 0x000f,
+	0x000b, 0x0005, 0x969a, 0x969d, 0x9b0b, 0x9b9a, 0x969d, 0x9b0b,
+	0x9b9a, 0x969a, 0x969d, 0x969a, 0x969a, 0x969a, 0x969a, 0x969a,
+	0x969a, 0x969a, 0x080c, 0x95c6, 0x0005, 0x00b6, 0x0156, 0x0136,
+	0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069,
+	0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d7d,
+	0x6110, 0x2158, 0xb984, 0x2c78, 0x2061, 0x0100, 0x619a, 0x908a,
+	0x0040, 0x1a04, 0x9709, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce,
+	0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x988e,
+	0x98c9, 0x98f2, 0x999a, 0x99bc, 0x99c2, 0x99cf, 0x99d7, 0x99e3,
+	0x99e9, 0x99fa, 0x99e9, 0x9a52, 0x99d7, 0x9a5e, 0x9a64, 0x99e3,
+	0x9a64, 0x9a70, 0x9707, 0x9707, 0x9707, 0x9707, 0x9707, 0x9707,
+	0x9707, 0x9707, 0x9707, 0x9707, 0x9707, 0x9fa5, 0x9fc8, 0x9fd9,
+	0x9ff9, 0xa02b, 0x99cf, 0x9707, 0x99cf, 0x99e9, 0x9707, 0x98f2,
+	0x999a, 0x9707, 0xa418, 0x99e9, 0x9707, 0xa434, 0x99e9, 0x9707,
+	0x99e3, 0x9888, 0x972a, 0x9707, 0xa450, 0xa4bd, 0xa59d, 0x9707,
+	0xa5aa, 0x99cc, 0xa5d5, 0x9707, 0xa035, 0xa5e1, 0x9707, 0x080c,
+	0x0d7d, 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de,
+	0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0xa681, 0xa733,
+	0x9728, 0x9751, 0x97fd, 0x9808, 0x9728, 0x99cf, 0x9728, 0x984f,
+	0x985b, 0x976c, 0x9728, 0x9787, 0x97bb, 0xaabd, 0xab02, 0x99e9,
+	0x080c, 0x0d7d, 0x00d6, 0x0096, 0x080c, 0x9a83, 0x7003, 0x2414,
+	0x7007, 0x0018, 0x700b, 0x0800, 0x7814, 0x2048, 0xa83c, 0x700e,
+	0xa850, 0x7022, 0xa854, 0x7026, 0x60c3, 0x0018, 0x080c, 0x9de6,
+	0x009e, 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0, 0x00be,
+	0x080c, 0xab49, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085, 0x0001,
+	0x0005, 0x00d6, 0x0096, 0x080c, 0x9a83, 0x7003, 0x0500, 0x7814,
+	0x2048, 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012, 0xa880,
+	0x7016, 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010, 0x080c,
+	0x9de6, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c, 0x9a83,
+	0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0, 0x700e,
+	0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0, 0x701e,
+	0x60c3, 0x0010, 0x080c, 0x9de6, 0x009e, 0x00de, 0x0005, 0x00d6,
+	0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x9a83, 0x20e9, 0x0000,
+	0x2001, 0x19a2, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814, 0x8003,
+	0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b,
+	0x2098, 0x2001, 0x19a2, 0x0016, 0x200c, 0x2001, 0x0001, 0x080c,
+	0x21a6, 0x080c, 0xd5be, 0x9006, 0x080c, 0x21a6, 0x001e, 0xa804,
+	0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0x9de6, 0x012e,
 	0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x9a9f, 0x20e9, 0x0000, 0x2001, 0x19a3, 0x2003, 0x0000,
-	0x7814, 0x2048, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860,
-	0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x19a3, 0x0016,
-	0x200c, 0x2001, 0x0001, 0x080c, 0x2195, 0x080c, 0xd5b1, 0x9006,
-	0x080c, 0x2195, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c28,
-	0x04d9, 0x080c, 0x9e02, 0x012e, 0x009e, 0x00de, 0x0005, 0x00d6,
-	0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x9aea, 0x20e9, 0x0000,
-	0x2001, 0x19a3, 0x2003, 0x0000, 0x7814, 0x2048, 0xa86f, 0x0200,
-	0xa873, 0x0000, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860,
-	0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x19a3, 0x0016,
-	0x200c, 0x080c, 0xd5b1, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048,
-	0x0c60, 0x0051, 0x7814, 0x2048, 0x080c, 0x0fec, 0x080c, 0x9e02,
-	0x012e, 0x009e, 0x00de, 0x0005, 0x60c0, 0x8004, 0x9084, 0x0003,
-	0x9005, 0x0130, 0x9082, 0x0004, 0x20a3, 0x0000, 0x8000, 0x1de0,
-	0x0005, 0x080c, 0x9a9f, 0x7003, 0x7800, 0x7808, 0x8007, 0x700a,
-	0x60c3, 0x0008, 0x0804, 0x9e02, 0x00d6, 0x00e6, 0x080c, 0x9aea,
-	0x7814, 0x9084, 0xff00, 0x2073, 0x0200, 0x8e70, 0x8e70, 0x9095,
-	0x0010, 0x2272, 0x8e70, 0x2073, 0x0034, 0x8e70, 0x2069, 0x1805,
-	0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x983a, 0x2069,
-	0x1801, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x9843,
-	0x2069, 0x19b3, 0x9086, 0xdf00, 0x0110, 0x2069, 0x19cd, 0x20a9,
-	0x001a, 0x9e86, 0x0260, 0x1148, 0x00c6, 0x2061, 0x0200, 0x6010,
-	0x8000, 0x6012, 0x00ce, 0x2071, 0x0240, 0x2d04, 0x8007, 0x2072,
-	0x8d68, 0x8e70, 0x1f04, 0x9851, 0x60c3, 0x004c, 0x080c, 0x9e02,
-	0x00ee, 0x00de, 0x0005, 0x080c, 0x9a9f, 0x7003, 0x6300, 0x7007,
-	0x0028, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9e02, 0x00d6,
-	0x0026, 0x0016, 0x080c, 0x9aea, 0x7003, 0x0200, 0x7814, 0x700e,
-	0x00e6, 0x9ef0, 0x0004, 0x2009, 0x0001, 0x2011, 0x000c, 0x2069,
-	0x1923, 0x6810, 0xd084, 0x1148, 0x2073, 0x0500, 0x8e70, 0x2073,
-	0x0000, 0x8e70, 0x8108, 0x9290, 0x0004, 0x2073, 0x0800, 0x8e70,
-	0x2073, 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c, 0x9e02,
-	0x001e, 0x002e, 0x00de, 0x0005, 0x2001, 0x1818, 0x2004, 0x609a,
-	0x0804, 0x9e02, 0x080c, 0x9a9f, 0x7003, 0x5200, 0x2069, 0x1847,
-	0x6804, 0xd084, 0x0130, 0x6828, 0x0016, 0x080c, 0x262e, 0x710e,
-	0x001e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
-	0x0000, 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801,
-	0x20a1, 0x0254, 0x4003, 0x080c, 0xab57, 0x1120, 0xb8a0, 0x9082,
-	0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x7032, 0x2001, 0x1820,
-	0x2004, 0x7036, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff,
-	0x7036, 0x60c3, 0x001c, 0x0804, 0x9e02, 0x080c, 0x9a9f, 0x7003,
-	0x0500, 0x080c, 0xab57, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248,
-	0x2001, 0x181f, 0x2004, 0x700a, 0x2001, 0x1820, 0x2004, 0x700e,
-	0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9,
-	0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1,
-	0x0250, 0x4003, 0x60c3, 0x0010, 0x0804, 0x9e02, 0x080c, 0x9a9f,
-	0x9006, 0x080c, 0x6a35, 0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003,
-	0x0400, 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096, 0x904d,
-	0x0120, 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300,
-	0xb8a0, 0x9086, 0x007e, 0x1904, 0x997d, 0x00d6, 0x2069, 0x196c,
-	0x2001, 0x1837, 0x2004, 0xd0a4, 0x0188, 0x6800, 0x700a, 0x6808,
-	0x9084, 0x2000, 0x7012, 0x080c, 0xab6e, 0x680c, 0x7016, 0x701f,
-	0x2710, 0x6818, 0x7022, 0x681c, 0x7026, 0x0090, 0x6800, 0x700a,
-	0x6804, 0x700e, 0x6808, 0x080c, 0x74e9, 0x1118, 0x9084, 0x37ff,
-	0x0010, 0x9084, 0x3fff, 0x7012, 0x080c, 0xab6e, 0x680c, 0x7016,
-	0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
-	0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801,
-	0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, 0xa67b, 0x2069, 0x1974,
-	0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, 0x080c, 0x56de, 0xd0e4,
-	0x0110, 0x680c, 0x700e, 0x00de, 0x04a8, 0x2001, 0x1837, 0x2004,
-	0xd0a4, 0x0170, 0x0016, 0x2001, 0x196d, 0x200c, 0x60e0, 0x9106,
-	0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x266f, 0x61e2, 0x001e,
-	0x20e1, 0x0001, 0x2099, 0x196c, 0x20e9, 0x0000, 0x20a1, 0x024e,
-	0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1805, 0x20a1,
-	0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a,
-	0x4003, 0x080c, 0xa67b, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x2099,
-	0x1974, 0x4003, 0x60c3, 0x0074, 0x0804, 0x9e02, 0x080c, 0x9a9f,
-	0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800, 0x700f, 0x2000,
-	0x9006, 0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe, 0xd1ac, 0x1110,
-	0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010, 0x9085, 0x0002,
-	0x00d6, 0x0804, 0x9a4f, 0x7026, 0x60c3, 0x0014, 0x0804, 0x9e02,
-	0x080c, 0x9a9f, 0x7003, 0x5000, 0x0804, 0x9928, 0x080c, 0x9a9f,
-	0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014, 0x0804, 0x9e02,
-	0x080c, 0x9ae1, 0x0010, 0x080c, 0x9aea, 0x7003, 0x0200, 0x60c3,
-	0x0004, 0x0804, 0x9e02, 0x080c, 0x9aea, 0x7003, 0x0100, 0x700b,
-	0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0x9e02, 0x080c,
-	0x9aea, 0x7003, 0x0200, 0x0804, 0x9928, 0x080c, 0x9aea, 0x7003,
-	0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010, 0x700b, 0x0003,
-	0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9e02, 0x00d6, 0x080c,
-	0x9aea, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b, 0x0800, 0xb894,
-	0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030, 0x0190, 0xb998,
-	0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f, 0x2100, 0x0058,
-	0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028, 0x700f, 0x0700,
-	0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe,
-	0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010,
-	0x2009, 0x1869, 0x210c, 0xd184, 0x1110, 0x9085, 0x0002, 0x0026,
-	0x2009, 0x1867, 0x210c, 0xd1e4, 0x0150, 0xc0c5, 0xbad4, 0xd28c,
-	0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010, 0x0140, 0xd1ec,
-	0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108, 0xc0bd, 0x002e,
-	0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0x9e02, 0x080c, 0x9aea,
-	0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100, 0x60c3, 0x0014,
-	0x0804, 0x9e02, 0x080c, 0x9aea, 0x7003, 0x0200, 0x0804, 0x98ae,
-	0x080c, 0x9aea, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00,
-	0x60c3, 0x0008, 0x0804, 0x9e02, 0x080c, 0x9aea, 0x7003, 0x0100,
-	0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0x9e02, 0x0026, 0x00d6,
-	0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800, 0x0040, 0x0026,
-	0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021, 0x0100, 0x080c,
-	0xa690, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
-	0x687c, 0x700a, 0x6880, 0x700e, 0x9485, 0x0029, 0x7012, 0x004e,
-	0x003e, 0x00de, 0x080c, 0x9df6, 0x721a, 0x9f95, 0x0000, 0x7222,
-	0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005, 0x0026, 0x080c,
-	0xa690, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6, 0x2069, 0x1800,
-	0x687c, 0x700a, 0x6880, 0x700e, 0x00de, 0x7013, 0x2029, 0x0c10,
-	0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02, 0x700f, 0x0000,
-	0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3300, 0x2021,
-	0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2300,
-	0x2021, 0x0100, 0x080c, 0xa690, 0xb810, 0x9305, 0x7002, 0xb814,
-	0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140, 0xb814, 0x9005,
-	0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020, 0x687c, 0x700a,
-	0x6880, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012, 0x004e, 0x003e,
-	0x00de, 0x080c, 0x9df6, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226,
-	0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0x9df6, 0x721a, 0x7a08,
-	0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e, 0x0005, 0x00b6,
-	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240,
-	0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d7d, 0x908a, 0x0092, 0x1a0c,
-	0x0d7d, 0x6110, 0x2158, 0xb984, 0x2c78, 0x2061, 0x0100, 0x619a,
-	0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
-	0x0005, 0x9b58, 0x9b67, 0x9b72, 0x9b56, 0x9b56, 0x9b56, 0x9b58,
-	0x9b56, 0x9b56, 0x9b56, 0x9b56, 0x9b56, 0x9b56, 0x080c, 0x0d7d,
-	0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x2979, 0x0228, 0x2011,
-	0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804, 0x9e02, 0x0431,
-	0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff, 0x60c3, 0x000c,
-	0x0804, 0x9e02, 0x0479, 0x7003, 0x0003, 0x7007, 0x0300, 0x60c3,
-	0x0004, 0x0804, 0x9e02, 0x0026, 0x080c, 0xa690, 0xb810, 0x9085,
-	0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a,
-	0x6880, 0x700e, 0x7013, 0x0009, 0x0804, 0x9aba, 0x0026, 0x080c,
-	0xa690, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814, 0x7006, 0x2069,
-	0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001, 0x0099, 0x7012,
-	0x0804, 0x9b1c, 0x0026, 0x080c, 0xa690, 0xb810, 0x9085, 0x8500,
+	0x080c, 0x9ace, 0x20e9, 0x0000, 0x2001, 0x19a2, 0x2003, 0x0000,
+	0x7814, 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814, 0x8003,
+	0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b,
+	0x2098, 0x2001, 0x19a2, 0x0016, 0x200c, 0x080c, 0xd5be, 0x001e,
+	0xa804, 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814, 0x2048,
+	0x080c, 0x0fec, 0x080c, 0x9de6, 0x012e, 0x009e, 0x00de, 0x0005,
+	0x60c0, 0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082, 0x0004,
+	0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0x9a83, 0x7003,
+	0x7800, 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804, 0x9de6,
+	0x00d6, 0x00e6, 0x080c, 0x9ace, 0x7814, 0x9084, 0xff00, 0x2073,
+	0x0200, 0x8e70, 0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70, 0x2073,
+	0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76, 0x8d68,
+	0x8e70, 0x1f04, 0x981e, 0x2069, 0x1801, 0x20a9, 0x0004, 0x2d76,
+	0x8d68, 0x8e70, 0x1f04, 0x9827, 0x2069, 0x19b2, 0x9086, 0xdf00,
+	0x0110, 0x2069, 0x19cc, 0x20a9, 0x001a, 0x9e86, 0x0260, 0x1148,
+	0x00c6, 0x2061, 0x0200, 0x6010, 0x8000, 0x6012, 0x00ce, 0x2071,
+	0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04, 0x9835,
+	0x60c3, 0x004c, 0x080c, 0x9de6, 0x00ee, 0x00de, 0x0005, 0x080c,
+	0x9a83, 0x7003, 0x6300, 0x7007, 0x0028, 0x7808, 0x700e, 0x60c3,
+	0x0008, 0x0804, 0x9de6, 0x00d6, 0x0026, 0x0016, 0x080c, 0x9ace,
+	0x7003, 0x0200, 0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004, 0x2009,
+	0x0001, 0x2011, 0x000c, 0x2069, 0x1923, 0x6810, 0xd084, 0x1148,
+	0x2073, 0x0500, 0x8e70, 0x2073, 0x0000, 0x8e70, 0x8108, 0x9290,
+	0x0004, 0x2073, 0x0800, 0x8e70, 0x2073, 0x0000, 0x00ee, 0x7206,
+	0x710a, 0x62c2, 0x080c, 0x9de6, 0x001e, 0x002e, 0x00de, 0x0005,
+	0x2001, 0x1818, 0x2004, 0x609a, 0x0804, 0x9de6, 0x080c, 0x9a83,
+	0x7003, 0x5200, 0x2069, 0x1847, 0x6804, 0xd084, 0x0130, 0x6828,
+	0x0016, 0x080c, 0x2647, 0x710e, 0x001e, 0x20a9, 0x0004, 0x20e1,
+	0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003,
+	0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x0254, 0x4003, 0x080c,
+	0xab49, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f,
+	0x2004, 0x7032, 0x2001, 0x1820, 0x2004, 0x7036, 0x0030, 0x2001,
+	0x1818, 0x2004, 0x9084, 0x00ff, 0x7036, 0x60c3, 0x001c, 0x0804,
+	0x9de6, 0x080c, 0x9a83, 0x7003, 0x0500, 0x080c, 0xab49, 0x1120,
+	0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x700a,
+	0x2001, 0x1820, 0x2004, 0x700e, 0x0030, 0x2001, 0x1818, 0x2004,
+	0x9084, 0x00ff, 0x700e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099,
+	0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x60c3, 0x0010,
+	0x0804, 0x9de6, 0x080c, 0x9a83, 0x9006, 0x080c, 0x6a34, 0xb8a0,
+	0x9086, 0x007e, 0x1130, 0x7003, 0x0400, 0x620c, 0xc2b4, 0x620e,
+	0x0058, 0x7814, 0x0096, 0x904d, 0x0120, 0x9006, 0xa89a, 0xa8a6,
+	0xa8aa, 0x009e, 0x7003, 0x0300, 0xb8a0, 0x9086, 0x007e, 0x1904,
+	0x9961, 0x00d6, 0x2069, 0x196b, 0x2001, 0x1837, 0x2004, 0xd0a4,
+	0x0188, 0x6800, 0x700a, 0x6808, 0x9084, 0x2000, 0x7012, 0x080c,
+	0xab60, 0x680c, 0x7016, 0x701f, 0x2710, 0x6818, 0x7022, 0x681c,
+	0x7026, 0x0090, 0x6800, 0x700a, 0x6804, 0x700e, 0x6808, 0x080c,
+	0x74c8, 0x1118, 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff, 0x7012,
+	0x080c, 0xab60, 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1,
+	0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003,
+	0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6,
+	0x080c, 0xa668, 0x2069, 0x1973, 0x2071, 0x024e, 0x6800, 0xc0dd,
+	0x7002, 0x080c, 0x56d9, 0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de,
+	0x04a8, 0x2001, 0x1837, 0x2004, 0xd0a4, 0x0170, 0x0016, 0x2001,
+	0x196c, 0x200c, 0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3, 0x0000,
+	0x080c, 0x2688, 0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099, 0x196b,
+	0x20e9, 0x0000, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9,
+	0x0004, 0x2099, 0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004,
+	0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x080c, 0xa668, 0x20a1,
+	0x024e, 0x20a9, 0x0008, 0x2099, 0x1973, 0x4003, 0x60c3, 0x0074,
+	0x0804, 0x9de6, 0x080c, 0x9a83, 0x7003, 0x2010, 0x7007, 0x0014,
+	0x700b, 0x0800, 0x700f, 0x2000, 0x9006, 0x00f6, 0x2079, 0x1847,
+	0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110,
+	0x9085, 0x0010, 0x9085, 0x0002, 0x00d6, 0x0804, 0x9a33, 0x7026,
+	0x60c3, 0x0014, 0x0804, 0x9de6, 0x080c, 0x9a83, 0x7003, 0x5000,
+	0x0804, 0x990c, 0x080c, 0x9a83, 0x7003, 0x2110, 0x7007, 0x0014,
+	0x60c3, 0x0014, 0x0804, 0x9de6, 0x080c, 0x9ac5, 0x0010, 0x080c,
+	0x9ace, 0x7003, 0x0200, 0x60c3, 0x0004, 0x0804, 0x9de6, 0x080c,
+	0x9ace, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3,
+	0x0008, 0x0804, 0x9de6, 0x080c, 0x9ace, 0x7003, 0x0200, 0x0804,
+	0x990c, 0x080c, 0x9ace, 0x7003, 0x0100, 0x782c, 0x9005, 0x0110,
+	0x700a, 0x0010, 0x700b, 0x0003, 0x7814, 0x700e, 0x60c3, 0x0008,
+	0x0804, 0x9de6, 0x00d6, 0x080c, 0x9ace, 0x7003, 0x0210, 0x7007,
+	0x0014, 0x700b, 0x0800, 0xb894, 0x9086, 0x0014, 0x1198, 0xb99c,
+	0x9184, 0x0030, 0x0190, 0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec,
+	0x0118, 0x700f, 0x2100, 0x0058, 0x700f, 0x0100, 0x0040, 0x700f,
+	0x0400, 0x0028, 0x700f, 0x0700, 0x0010, 0x700f, 0x0800, 0x00f6,
+	0x2079, 0x1847, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020,
+	0xd1a4, 0x0110, 0x9085, 0x0010, 0x2009, 0x1869, 0x210c, 0xd184,
+	0x1110, 0x9085, 0x0002, 0x0026, 0x2009, 0x1867, 0x210c, 0xd1e4,
+	0x0150, 0xc0c5, 0xbad4, 0xd28c, 0x1108, 0xc0cd, 0x9094, 0x0030,
+	0x9296, 0x0010, 0x0140, 0xd1ec, 0x0130, 0x9094, 0x0030, 0x9296,
+	0x0010, 0x0108, 0xc0bd, 0x002e, 0x7026, 0x60c3, 0x0014, 0x00de,
+	0x0804, 0x9de6, 0x080c, 0x9ace, 0x7003, 0x0210, 0x7007, 0x0014,
+	0x700f, 0x0100, 0x60c3, 0x0014, 0x0804, 0x9de6, 0x080c, 0x9ace,
+	0x7003, 0x0200, 0x0804, 0x9892, 0x080c, 0x9ace, 0x7003, 0x0100,
+	0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0x9de6,
+	0x080c, 0x9ace, 0x7003, 0x0100, 0x700b, 0x000b, 0x60c3, 0x0008,
+	0x0804, 0x9de6, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3200,
+	0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019,
+	0x2200, 0x2021, 0x0100, 0x080c, 0xa67d, 0xb810, 0x9305, 0x7002,
+	0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e,
+	0x9485, 0x0029, 0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0x9dda,
+	0x721a, 0x9f95, 0x0000, 0x7222, 0x7027, 0xffff, 0x2071, 0x024c,
+	0x002e, 0x0005, 0x0026, 0x080c, 0xa67d, 0x7003, 0x02ff, 0x7007,
+	0xfffc, 0x00d6, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e,
+	0x00de, 0x7013, 0x2029, 0x0c10, 0x7003, 0x0100, 0x7007, 0x0000,
+	0x700b, 0xfc02, 0x700f, 0x0000, 0x0005, 0x0026, 0x00d6, 0x0036,
+	0x0046, 0x2019, 0x3300, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6,
+	0x0036, 0x0046, 0x2019, 0x2300, 0x2021, 0x0100, 0x080c, 0xa67d,
+	0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0xb810,
+	0x9005, 0x1140, 0xb814, 0x9005, 0x1128, 0x700b, 0x00ff, 0x700f,
+	0xfffe, 0x0020, 0x687c, 0x700a, 0x6880, 0x700e, 0x0000, 0x9485,
+	0x0098, 0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0x9dda, 0x721a,
+	0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x002e, 0x0005,
+	0x080c, 0x9dda, 0x721a, 0x7a08, 0x7222, 0x7814, 0x7026, 0x2071,
+	0x024c, 0x002e, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
+	0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0085, 0x0a0c,
+	0x0d7d, 0x908a, 0x0092, 0x1a0c, 0x0d7d, 0x6110, 0x2158, 0xb984,
+	0x2c78, 0x2061, 0x0100, 0x619a, 0x9082, 0x0085, 0x0033, 0x00fe,
+	0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x9b3c, 0x9b4b, 0x9b56,
+	0x9b3a, 0x9b3a, 0x9b3a, 0x9b3c, 0x9b3a, 0x9b3a, 0x9b3a, 0x9b3a,
+	0x9b3a, 0x9b3a, 0x080c, 0x0d7d, 0x0411, 0x60c3, 0x0000, 0x0026,
+	0x080c, 0x2998, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012,
+	0x002e, 0x0804, 0x9de6, 0x0431, 0x7808, 0x700a, 0x7814, 0x700e,
+	0x7017, 0xffff, 0x60c3, 0x000c, 0x0804, 0x9de6, 0x0479, 0x7003,
+	0x0003, 0x7007, 0x0300, 0x60c3, 0x0004, 0x0804, 0x9de6, 0x0026,
+	0x080c, 0xa67d, 0xb810, 0x9085, 0x8100, 0x7002, 0xb814, 0x7006,
+	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x7013, 0x0009,
+	0x0804, 0x9a9e, 0x0026, 0x080c, 0xa67d, 0xb810, 0x9085, 0x8400,
 	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880,
-	0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x9b1c, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200, 0x2071, 0x0240,
-	0x7804, 0x908a, 0x0040, 0x0a0c, 0x0d7d, 0x908a, 0x0057, 0x1a0c,
-	0x0d7d, 0x7910, 0x2158, 0xb984, 0x2061, 0x0100, 0x619a, 0x9082,
-	0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005,
-	0x9beb, 0x9beb, 0x9beb, 0x9c11, 0x9beb, 0x9beb, 0x9beb, 0x9beb,
-	0x9beb, 0x9beb, 0x9beb, 0xa1eb, 0xa1f3, 0xa1fb, 0xa203, 0x9beb,
-	0x9beb, 0x9beb, 0xa1e3, 0x080c, 0x0d7d, 0x6813, 0x0008, 0xba8c,
-	0x8210, 0xb8d4, 0xd084, 0x0128, 0x7a4e, 0x7b14, 0x7b52, 0x722e,
-	0x732a, 0x9294, 0x00ff, 0xba8e, 0x8217, 0x721a, 0xba10, 0x9295,
-	0x0600, 0x7202, 0xba14, 0x7206, 0x2069, 0x1800, 0x6a7c, 0x720a,
-	0x6a80, 0x720e, 0x7013, 0x0829, 0x2f10, 0x7222, 0x7027, 0xffff,
-	0x0005, 0x0016, 0x7814, 0x9084, 0x0700, 0x8007, 0x0013, 0x001e,
-	0x0005, 0x9c21, 0x9c21, 0x9c23, 0x9c21, 0x9c21, 0x9c21, 0x9c3d,
-	0x9c21, 0x080c, 0x0d7d, 0x7914, 0x918c, 0x08ff, 0x918d, 0xf600,
-	0x7916, 0x2009, 0x0003, 0x00b9, 0x2069, 0x1847, 0x6804, 0xd0bc,
-	0x0130, 0x682c, 0x9084, 0x00ff, 0x8007, 0x7032, 0x0010, 0x7033,
-	0x3f00, 0x60c3, 0x0001, 0x0804, 0x9e02, 0x2009, 0x0003, 0x0019,
-	0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c, 0xa690, 0x001e, 0xb810,
-	0x9085, 0x0100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6a7c,
-	0x720a, 0x6a80, 0x720e, 0x7013, 0x0888, 0x918d, 0x0008, 0x7116,
-	0x080c, 0x9df6, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x0005,
-	0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0036,
-	0x2061, 0x0100, 0x2071, 0x1800, 0x7160, 0x7810, 0x2058, 0x76dc,
-	0x96b4, 0x0028, 0x0110, 0x737c, 0x7480, 0x2500, 0x76dc, 0x96b4,
-	0x0028, 0x0140, 0x2001, 0x04ff, 0x6062, 0x6067, 0xffff, 0x636a,
-	0x646e, 0x0050, 0x2001, 0x00ff, 0x9085, 0x0400, 0x6062, 0x6067,
-	0xffff, 0x606b, 0x0000, 0x616e, 0xb8b8, 0x6073, 0x0530, 0x6077,
-	0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x9085,
-	0x0020, 0x607a, 0x607f, 0x0000, 0x2b00, 0x6082, 0x6087, 0xffff,
-	0x7814, 0x0096, 0x2048, 0xa848, 0x608a, 0xa844, 0x608e, 0xa838,
-	0x60c6, 0xa834, 0x60ca, 0x009e, 0xb86c, 0x60ce, 0x60ab, 0x0036,
-	0x60af, 0x95d5, 0x60d7, 0x0000, 0x2001, 0x1837, 0x2004, 0x9084,
-	0x0028, 0x0128, 0x609f, 0x0000, 0x2001, 0x0092, 0x0058, 0x6028,
-	0xc0bd, 0x602a, 0x609f, 0x00ff, 0x2011, 0xffff, 0x080c, 0x2a44,
-	0x2001, 0x00b2, 0x2010, 0x900e, 0x080c, 0x2a53, 0x2009, 0x07d0,
-	0x080c, 0x86fb, 0x003e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de,
-	0x00ee, 0x00be, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
-	0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7160,
-	0x7810, 0x2058, 0xb8a0, 0x2028, 0x76dc, 0xd6ac, 0x1168, 0x9582,
-	0x007e, 0x1250, 0x2500, 0x9094, 0xff80, 0x1130, 0x9080, 0x3374,
-	0x2015, 0x9294, 0x00ff, 0x0020, 0xb910, 0xba14, 0x737c, 0x7480,
-	0x70dc, 0xd0ac, 0x1130, 0x9582, 0x007e, 0x1218, 0x9584, 0xff80,
-	0x0138, 0x9185, 0x0400, 0x6062, 0x6266, 0x636a, 0x646e, 0x0030,
-	0x6063, 0x0400, 0x6266, 0x606b, 0x0000, 0x616e, 0xb8b8, 0x6072,
-	0x6077, 0x0000, 0xb864, 0xd0a4, 0x0110, 0x6077, 0x0008, 0xb88c,
-	0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x9085, 0x0020, 0x607a,
-	0x607f, 0x0000, 0x2b00, 0x6082, 0x6087, 0xffff, 0x7814, 0x0096,
-	0x2048, 0xa848, 0x608a, 0xa844, 0x608e, 0xa838, 0x60c6, 0xa834,
-	0x60ca, 0x009e, 0xb86c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5,
-	0x60d7, 0x0000, 0xba84, 0x629e, 0x00f6, 0x2079, 0x0140, 0x7803,
-	0x0000, 0x00fe, 0x900e, 0x2011, 0x0092, 0x080c, 0x2a53, 0x2009,
-	0x07d0, 0x080c, 0x86fb, 0x003e, 0x004e, 0x005e, 0x006e, 0x00ce,
-	0x00de, 0x00ee, 0x00be, 0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6,
-	0x00c6, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800,
-	0x7810, 0x2058, 0xb8a0, 0x2028, 0xb910, 0xba14, 0x737c, 0x7480,
-	0x7820, 0x0002, 0x9d81, 0x9d81, 0x9d81, 0x9d81, 0x9d81, 0x9d81,
-	0x9d81, 0x9d81, 0x9d81, 0x9d81, 0x9d83, 0x9d81, 0x9d81, 0x9d81,
-	0x9d81, 0x080c, 0x0d7d, 0xb884, 0x609e, 0x7814, 0x2048, 0xa87c,
-	0xd0fc, 0x0558, 0xaf90, 0x9784, 0xff00, 0x9105, 0x6062, 0x873f,
-	0x9784, 0xff00, 0x0006, 0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005,
-	0x000e, 0x1160, 0xaf94, 0x87ff, 0x0198, 0x2039, 0x0098, 0x9705,
-	0x6072, 0x7808, 0x6082, 0x2f00, 0x6086, 0x0038, 0x9185, 0x2200,
-	0x6062, 0x6073, 0x0129, 0x6077, 0x0000, 0xb884, 0x609e, 0x0050,
-	0x2039, 0x0029, 0x9705, 0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062,
-	0x6073, 0x2029, 0xa87c, 0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120,
-	0x2f00, 0x6082, 0x7808, 0x6086, 0x6266, 0x636a, 0x646e, 0x6077,
-	0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a,
-	0x607f, 0x0000, 0xa848, 0x608a, 0xa844, 0x608e, 0xa838, 0x60c6,
-	0xa834, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000,
-	0x080c, 0xa670, 0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005,
-	0x0110, 0x2009, 0x1b58, 0x080c, 0x86fb, 0x003e, 0x004e, 0x005e,
-	0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005, 0x7a40, 0x9294,
-	0x00ff, 0x8217, 0x0005, 0x00d6, 0x2069, 0x19e7, 0x686b, 0x0001,
-	0x00de, 0x0005, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c,
-	0x86ed, 0x0005, 0x0016, 0x2001, 0x180c, 0x200c, 0x9184, 0x0600,
-	0x9086, 0x0600, 0x0128, 0x0089, 0x080c, 0x86ed, 0x001e, 0x0005,
-	0xc1e5, 0x2001, 0x180c, 0x2102, 0x2001, 0x19e8, 0x2003, 0x0000,
-	0x2001, 0x19f3, 0x2003, 0x0000, 0x0c88, 0x0006, 0x0016, 0x0026,
-	0x2009, 0x1804, 0x2011, 0x0009, 0x080c, 0x2a53, 0x002e, 0x001e,
-	0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x080c, 0xa8f4, 0x0106,
-	0x190c, 0xa896, 0x2061, 0x0100, 0x61a4, 0x60a7, 0x95f5, 0x0016,
-	0x0026, 0x2009, 0x1804, 0x2011, 0x0008, 0x080c, 0x2a53, 0x002e,
-	0x001e, 0x010e, 0x190c, 0xa8b2, 0x000e, 0xa001, 0xa001, 0xa001,
-	0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026,
-	0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x74e9, 0x1510, 0x2001,
-	0x1a0c, 0x2004, 0x9005, 0x1904, 0x9eb3, 0x080c, 0x758a, 0x11a8,
-	0x2069, 0x0380, 0x6843, 0x0101, 0x6844, 0xd084, 0x1de8, 0x2061,
-	0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084, 0x090c, 0x0d7d,
-	0x6843, 0x0100, 0x080c, 0x86ed, 0x04b0, 0x00c6, 0x2061, 0x19e7,
-	0x00f0, 0x6904, 0x9194, 0x4000, 0x0598, 0x080c, 0x9e32, 0x080c,
-	0x2a1a, 0x00c6, 0x2061, 0x19e7, 0x6134, 0x9192, 0x0008, 0x1278,
-	0x8108, 0x6136, 0x080c, 0xa896, 0x6130, 0x080c, 0xa8b2, 0x00ce,
-	0x81ff, 0x01c8, 0x080c, 0x86ed, 0x080c, 0x9e25, 0x00a0, 0x080c,
-	0xa896, 0x6130, 0x91e5, 0x0000, 0x0150, 0x080c, 0xe717, 0x080c,
-	0x86f6, 0x6003, 0x0001, 0x2009, 0x0014, 0x080c, 0xac8c, 0x080c,
-	0xa8b2, 0x00ce, 0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005,
-	0x2001, 0x1a0c, 0x2004, 0x9005, 0x1db0, 0x00c6, 0x2061, 0x19e7,
-	0x6134, 0x9192, 0x0003, 0x1ad8, 0x8108, 0x6136, 0x00ce, 0x080c,
-	0x86ed, 0x080c, 0x5ee4, 0x2009, 0x1846, 0x2114, 0x8210, 0x220a,
-	0x0c10, 0x0096, 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c,
-	0x8703, 0x080c, 0xa896, 0x2001, 0x0387, 0x2003, 0x0202, 0x2071,
-	0x19e7, 0x714c, 0x81ff, 0x0904, 0x9f5b, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x080c, 0x74e9, 0x1510, 0x0036, 0x2019, 0x0002, 0x080c,
-	0xa118, 0x003e, 0x714c, 0x2160, 0x080c, 0xe717, 0x2009, 0x004a,
-	0x6220, 0x9296, 0x0009, 0x1130, 0x6114, 0x2148, 0xa87b, 0x0006,
-	0x2009, 0x004a, 0x6003, 0x0003, 0x080c, 0xac8c, 0x2001, 0x0386,
-	0x2003, 0x5040, 0x080c, 0x758a, 0x0804, 0x9f5b, 0x6904, 0xd1f4,
-	0x0904, 0x9f68, 0x080c, 0x2a1a, 0x00c6, 0x704c, 0x9065, 0x090c,
-	0x0d7d, 0x6020, 0x00ce, 0x9086, 0x0006, 0x1518, 0x61c8, 0x60c4,
-	0x9105, 0x11f8, 0x2009, 0x180c, 0x2104, 0xd0d4, 0x01d0, 0x6214,
-	0x9294, 0x1800, 0x1128, 0x6224, 0x9294, 0x0002, 0x1560, 0x0010,
-	0xc0d4, 0x200a, 0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016,
-	0x704c, 0x2060, 0x080c, 0x963b, 0x2009, 0x0049, 0x080c, 0xac8c,
-	0x00d0, 0x0036, 0x2019, 0x0001, 0x080c, 0xa118, 0x003e, 0x714c,
-	0x2160, 0x080c, 0xe717, 0x2009, 0x004a, 0x6220, 0x9296, 0x0009,
-	0x1130, 0x6114, 0x2148, 0xa87b, 0x0006, 0x2009, 0x004a, 0x6003,
-	0x0003, 0x080c, 0xac8c, 0x2001, 0x0387, 0x2003, 0x0200, 0x080c,
-	0xa8b2, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce, 0x009e, 0x0005,
-	0xd1ec, 0x1904, 0x9f12, 0x0804, 0x9f14, 0x0026, 0x00e6, 0x2071,
-	0x19e7, 0x706c, 0xd084, 0x01e8, 0xc084, 0x706e, 0x714c, 0x81ff,
-	0x01c0, 0x2071, 0x0100, 0x9188, 0x0008, 0x2114, 0x928e, 0x0006,
-	0x1138, 0x2009, 0x1984, 0x2011, 0x0012, 0x080c, 0x2a53, 0x0048,
-	0x928e, 0x0009, 0x0db0, 0x2009, 0x1984, 0x2011, 0x0016, 0x080c,
-	0x2a53, 0x00ee, 0x002e, 0x0005, 0x9036, 0x2001, 0x19f1, 0x2004,
-	0x9005, 0x0128, 0x9c06, 0x0128, 0x2c30, 0x600c, 0x0cc8, 0x9085,
-	0x0001, 0x0005, 0x00f6, 0x2079, 0x19e7, 0x610c, 0x9006, 0x600e,
-	0x6044, 0xc0fc, 0x6046, 0x86ff, 0x1140, 0x7824, 0x9c06, 0x1118,
-	0x7826, 0x782a, 0x0050, 0x792a, 0x0040, 0x00c6, 0x2660, 0x610e,
-	0x00ce, 0x7824, 0x9c06, 0x1108, 0x7e26, 0x080c, 0xa20e, 0x080c,
-	0xca27, 0x00fe, 0x0005, 0x080c, 0x9a9f, 0x7003, 0x1200, 0x7838,
-	0x7012, 0x783c, 0x7016, 0x00c6, 0x7820, 0x9086, 0x0004, 0x1148,
-	0x7810, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb810, 0xb914, 0x00be,
-	0x0020, 0x2061, 0x1800, 0x607c, 0x6180, 0x9084, 0x00ff, 0x700a,
-	0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804, 0x9e02, 0x080c, 0x9a9f,
-	0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff,
-	0x700a, 0xb814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9e02, 0x0156,
-	0x080c, 0x9aea, 0x7003, 0x0200, 0x080c, 0x87bb, 0x20a9, 0x0006,
-	0x2011, 0xfff4, 0x2019, 0xfff5, 0x9ef0, 0x0002, 0x2305, 0x2072,
-	0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002,
-	0x1f04, 0xa006, 0x60c3, 0x001c, 0x015e, 0x0804, 0x9e02, 0x0016,
-	0x0026, 0x080c, 0x9ac6, 0x080c, 0x9ad8, 0x9e80, 0x0004, 0x20e9,
-	0x0000, 0x20a0, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860,
-	0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x009e, 0x7808, 0x9088,
-	0x0002, 0x21a8, 0x9192, 0x0010, 0x1250, 0x4003, 0x9080, 0x0004,
-	0x8003, 0x60c2, 0x080c, 0x9e02, 0x002e, 0x001e, 0x0005, 0x20a9,
-	0x0010, 0x4003, 0x080c, 0xa67b, 0x20a1, 0x0240, 0x22a8, 0x4003,
-	0x0c68, 0x080c, 0x9a9f, 0x7003, 0x6200, 0x7808, 0x700e, 0x60c3,
-	0x0008, 0x0804, 0x9e02, 0x0016, 0x0026, 0x080c, 0x9a9f, 0x20e9,
-	0x0000, 0x20a1, 0x024c, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048,
-	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098, 0x009e, 0x7808,
-	0x9088, 0x0002, 0x21a8, 0x4003, 0x8003, 0x60c2, 0x080c, 0x9e02,
-	0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x19e7, 0x7010, 0x2060, 0x8cff, 0x0188, 0x080c,
-	0xca4d, 0x1110, 0x080c, 0xb5b5, 0x600c, 0x0006, 0x080c, 0xccc4,
-	0x600f, 0x0000, 0x080c, 0xabed, 0x080c, 0xa20e, 0x00ce, 0x0c68,
-	0x2c00, 0x7012, 0x700e, 0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005,
-	0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026,
-	0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c,
-	0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19e7,
-	0x7030, 0x2060, 0x8cff, 0x0548, 0x080c, 0x9e32, 0x6ac0, 0x68c3,
-	0x0000, 0x080c, 0x86f6, 0x00c6, 0x2061, 0x0100, 0x080c, 0xa7cc,
-	0x00ce, 0x20a9, 0x01f4, 0x04b1, 0x080c, 0x95de, 0x6044, 0xd0ac,
-	0x1128, 0x2001, 0x1988, 0x2004, 0x604a, 0x0020, 0x2009, 0x0013,
-	0x080c, 0xac8c, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de,
-	0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x2001, 0x1800, 0x2004,
-	0x9096, 0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c, 0x86f6,
-	0x6814, 0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008,
-	0x68c3, 0x0000, 0x2011, 0x5e8e, 0x080c, 0x863e, 0x20a9, 0x01f4,
-	0x0009, 0x08c0, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804,
-	0x9084, 0x4000, 0x190c, 0x2a1a, 0x0090, 0xd084, 0x0118, 0x6827,
-	0x0001, 0x0010, 0x1f04, 0xa0fa, 0x7804, 0x9084, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2a0a, 0x9006, 0x080c, 0x2a0a, 0x0005,
-	0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026,
-	0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c,
-	0xdbff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x0380,
-	0x701c, 0x0006, 0x701f, 0x0202, 0x2071, 0x19e7, 0x704c, 0x2060,
-	0x8cff, 0x0904, 0xa1bd, 0x9386, 0x0002, 0x1128, 0x6814, 0x9084,
-	0x0002, 0x0904, 0xa1bd, 0x68af, 0x95f5, 0x6817, 0x0010, 0x2009,
-	0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008, 0x080c, 0x8703,
-	0x080c, 0x1dd8, 0x0046, 0x2009, 0x00a5, 0x080c, 0x0e55, 0x2021,
-	0x0169, 0x2404, 0x9084, 0x000f, 0x9086, 0x0004, 0x11f8, 0x68af,
-	0x95f5, 0x68c6, 0x68cb, 0x0008, 0x00e6, 0x00f6, 0x2079, 0x0090,
-	0x2071, 0x19e7, 0x6814, 0x9084, 0x1984, 0x9085, 0x0012, 0x6816,
-	0x782b, 0x0008, 0x7057, 0x0000, 0x00fe, 0x00ee, 0x9386, 0x0002,
-	0x1128, 0x7884, 0x9005, 0x1110, 0x7887, 0x0001, 0x0016, 0x2009,
-	0x0040, 0x080c, 0x21b0, 0x001e, 0x2009, 0x0000, 0x080c, 0x0e55,
-	0x004e, 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004,
-	0x7804, 0x9084, 0x4000, 0x190c, 0x2a1a, 0x0090, 0xd08c, 0x0118,
-	0x6827, 0x0002, 0x0010, 0x1f04, 0xa18b, 0x7804, 0x9084, 0x1000,
-	0x0138, 0x2001, 0x0100, 0x080c, 0x2a0a, 0x9006, 0x080c, 0x2a0a,
-	0x6827, 0x4000, 0x6824, 0x83ff, 0x1180, 0x2009, 0x0049, 0x6020,
-	0x9086, 0x0009, 0x0150, 0x080c, 0x963b, 0x6044, 0xd0ac, 0x1118,
-	0x6003, 0x0002, 0x0010, 0x080c, 0xac8c, 0x000e, 0x2071, 0x0380,
-	0xd08c, 0x1110, 0x701f, 0x0200, 0x000e, 0x001e, 0x002e, 0x006e,
-	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6,
-	0x0126, 0x2091, 0x8000, 0x2069, 0x19e7, 0x6a06, 0x012e, 0x00de,
-	0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19e7, 0x6a3e,
-	0x012e, 0x00de, 0x0005, 0x080c, 0x9bed, 0x785c, 0x7032, 0x7042,
-	0x7047, 0x1000, 0x00f8, 0x080c, 0x9bed, 0x785c, 0x7032, 0x7042,
-	0x7047, 0x4000, 0x00b8, 0x080c, 0x9bed, 0x785c, 0x7032, 0x7042,
-	0x7047, 0x2000, 0x0078, 0x080c, 0x9bed, 0x785c, 0x7032, 0x7042,
-	0x7047, 0x0400, 0x0038, 0x080c, 0x9bed, 0x785c, 0x7032, 0x7042,
-	0x7047, 0x0200, 0x60c3, 0x0020, 0x0804, 0x9e02, 0x00e6, 0x2071,
-	0x19e7, 0x702c, 0x9005, 0x0110, 0x8001, 0x702e, 0x00ee, 0x0005,
-	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x2071, 0x19e7, 0x7620, 0x2660, 0x2678, 0x2039,
-	0x0001, 0x87ff, 0x0904, 0xa2b3, 0x8cff, 0x0904, 0xa2b3, 0x6020,
-	0x9086, 0x0006, 0x1904, 0xa2ae, 0x88ff, 0x0138, 0x2800, 0x9c06,
-	0x1904, 0xa2ae, 0x2039, 0x0000, 0x0050, 0x6010, 0x9b06, 0x1904,
-	0xa2ae, 0x85ff, 0x0120, 0x605c, 0x9106, 0x1904, 0xa2ae, 0x7030,
-	0x9c06, 0x15b0, 0x2069, 0x0100, 0x68c0, 0x9005, 0x1160, 0x6824,
-	0xd084, 0x0148, 0x6827, 0x0001, 0x080c, 0x86f6, 0x080c, 0xa338,
-	0x7033, 0x0000, 0x0428, 0x080c, 0x86f6, 0x6820, 0xd0b4, 0x0110,
-	0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x080c, 0xa338,
-	0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
-	0x0138, 0x2001, 0x0100, 0x080c, 0x2a0a, 0x9006, 0x080c, 0x2a0a,
-	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
-	0x7020, 0x9c36, 0x1110, 0x660c, 0x7622, 0x701c, 0x9c36, 0x1140,
-	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x701e, 0x0010, 0x701f, 0x0000,
-	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
-	0x89ff, 0x1168, 0x600f, 0x0000, 0x6014, 0x0096, 0x2048, 0x080c,
-	0xc836, 0x0110, 0x080c, 0xe26c, 0x009e, 0x080c, 0xac28, 0x080c,
-	0xa20e, 0x88ff, 0x1190, 0x00ce, 0x0804, 0xa229, 0x2c78, 0x600c,
-	0x2060, 0x0804, 0xa229, 0x9006, 0x012e, 0x000e, 0x006e, 0x007e,
-	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce,
-	0x98c5, 0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6, 0x0096, 0x00c6,
-	0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e7,
-	0x7648, 0x2660, 0x2678, 0x8cff, 0x0904, 0xa327, 0x6020, 0x9086,
-	0x0006, 0x1904, 0xa322, 0x87ff, 0x0128, 0x2700, 0x9c06, 0x1904,
-	0xa322, 0x0040, 0x6010, 0x9b06, 0x15e8, 0x85ff, 0x0118, 0x605c,
-	0x9106, 0x15c0, 0x704c, 0x9c06, 0x1168, 0x0036, 0x2019, 0x0001,
-	0x080c, 0xa118, 0x703f, 0x0000, 0x9006, 0x704e, 0x706a, 0x7052,
-	0x706e, 0x003e, 0x7048, 0x9c36, 0x1110, 0x660c, 0x764a, 0x7044,
-	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010,
-	0x7047, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
-	0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048, 0x080c, 0xc836,
-	0x0110, 0x080c, 0xe26c, 0x080c, 0xac28, 0x87ff, 0x1198, 0x00ce,
-	0x0804, 0xa2d3, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa2d3, 0x9006,
-	0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x009e, 0x00de, 0x00ee,
-	0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x97bd, 0x0001, 0x0c80,
-	0x00e6, 0x2071, 0x19e7, 0x7033, 0x0000, 0x7004, 0x9086, 0x0003,
-	0x0158, 0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1118, 0x7007,
-	0x0005, 0x0010, 0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6,
-	0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x19e7, 0x2c10, 0x7648, 0x2660, 0x2678, 0x8cff, 0x0518, 0x2200,
-	0x9c06, 0x11e0, 0x7048, 0x9c36, 0x1110, 0x660c, 0x764a, 0x7044,
-	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010,
-	0x7047, 0x0000, 0x660c, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
-	0x2678, 0x600f, 0x0000, 0x9085, 0x0001, 0x0020, 0x2c78, 0x600c,
-	0x2060, 0x08d8, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00ee,
+	0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x9b00, 0x0026, 0x080c,
+	0xa67d, 0xb810, 0x9085, 0x8500, 0x7002, 0xb814, 0x7006, 0x2069,
+	0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001, 0x0099, 0x7012,
+	0x0804, 0x9b00, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78,
+	0x2069, 0x0200, 0x2071, 0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c,
+	0x0d7d, 0x908a, 0x0057, 0x1a0c, 0x0d7d, 0x7910, 0x2158, 0xb984,
+	0x2061, 0x0100, 0x619a, 0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x00be, 0x0005, 0x9bcf, 0x9bcf, 0x9bcf, 0x9bf5,
+	0x9bcf, 0x9bcf, 0x9bcf, 0x9bcf, 0x9bcf, 0x9bcf, 0x9bcf, 0xa1cd,
+	0xa1d5, 0xa1dd, 0xa1e5, 0x9bcf, 0x9bcf, 0x9bcf, 0xa1c5, 0x080c,
+	0x0d7d, 0x6813, 0x0008, 0xba8c, 0x8210, 0xb8d4, 0xd084, 0x0128,
+	0x7a4e, 0x7b14, 0x7b52, 0x722e, 0x732a, 0x9294, 0x00ff, 0xba8e,
+	0x8217, 0x721a, 0xba10, 0x9295, 0x0600, 0x7202, 0xba14, 0x7206,
+	0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013, 0x0829,
+	0x2f10, 0x7222, 0x7027, 0xffff, 0x0005, 0x0016, 0x7814, 0x9084,
+	0x0700, 0x8007, 0x0013, 0x001e, 0x0005, 0x9c05, 0x9c05, 0x9c07,
+	0x9c05, 0x9c05, 0x9c05, 0x9c21, 0x9c05, 0x080c, 0x0d7d, 0x7914,
+	0x918c, 0x08ff, 0x918d, 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9,
+	0x2069, 0x1847, 0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff,
+	0x8007, 0x7032, 0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804,
+	0x9de6, 0x2009, 0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016,
+	0x080c, 0xa67d, 0x001e, 0xb810, 0x9085, 0x0100, 0x7002, 0xb814,
+	0x7006, 0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013,
+	0x0888, 0x918d, 0x0008, 0x7116, 0x080c, 0x9dda, 0x721a, 0x7a08,
+	0x7222, 0x2f10, 0x7226, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6,
+	0x0066, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800,
+	0x7160, 0x7810, 0x2058, 0x76dc, 0x96b4, 0x0028, 0x0110, 0x737c,
+	0x7480, 0x2500, 0x76dc, 0x96b4, 0x0028, 0x0140, 0x2001, 0x04ff,
+	0x6062, 0x6067, 0xffff, 0x636a, 0x646e, 0x0050, 0x2001, 0x00ff,
+	0x9085, 0x0400, 0x6062, 0x6067, 0xffff, 0x606b, 0x0000, 0x616e,
+	0xb8b8, 0x6073, 0x0530, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084,
+	0x00ff, 0xb88e, 0x8007, 0x9085, 0x0020, 0x607a, 0x607f, 0x0000,
+	0x2b00, 0x6082, 0x6087, 0xffff, 0x7814, 0x0096, 0x2048, 0xa848,
+	0x608a, 0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca, 0x009e,
+	0xb86c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000,
+	0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x0128, 0x609f, 0x0000,
+	0x2001, 0x0092, 0x0058, 0x6028, 0xc0bd, 0x602a, 0x609f, 0x00ff,
+	0x2011, 0xffff, 0x080c, 0x2a63, 0x2001, 0x00b2, 0x2010, 0x900e,
+	0x080c, 0x2a72, 0x2009, 0x07d0, 0x080c, 0x86da, 0x003e, 0x004e,
+	0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x00b6,
+	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0036, 0x2061,
+	0x0100, 0x2071, 0x1800, 0x7160, 0x7810, 0x2058, 0xb8a0, 0x2028,
+	0x76dc, 0xd6ac, 0x1168, 0x9582, 0x007e, 0x1250, 0x2500, 0x9094,
+	0xff80, 0x1130, 0x9080, 0x3368, 0x2015, 0x9294, 0x00ff, 0x0020,
+	0xb910, 0xba14, 0x737c, 0x7480, 0x70dc, 0xd0ac, 0x1130, 0x9582,
+	0x007e, 0x1218, 0x9584, 0xff80, 0x0138, 0x9185, 0x0400, 0x6062,
+	0x6266, 0x636a, 0x646e, 0x0030, 0x6063, 0x0400, 0x6266, 0x606b,
+	0x0000, 0x616e, 0xb8b8, 0x6072, 0x6077, 0x0000, 0xb864, 0xd0a4,
+	0x0110, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e,
+	0x8007, 0x9085, 0x0020, 0x607a, 0x607f, 0x0000, 0x2b00, 0x6082,
+	0x6087, 0xffff, 0x7814, 0x0096, 0x2048, 0xa848, 0x608a, 0xa844,
+	0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca, 0x009e, 0xb86c, 0x60ce,
+	0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xba84, 0x629e,
+	0x00f6, 0x2079, 0x0140, 0x7803, 0x0000, 0x00fe, 0x900e, 0x2011,
+	0x0092, 0x080c, 0x2a72, 0x2009, 0x07d0, 0x080c, 0x86da, 0x003e,
+	0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005,
+	0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046, 0x0036,
+	0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058, 0xb8a0, 0x2028,
+	0xb910, 0xba14, 0x737c, 0x7480, 0x7820, 0x0002, 0x9d65, 0x9d65,
+	0x9d65, 0x9d65, 0x9d65, 0x9d65, 0x9d65, 0x9d65, 0x9d65, 0x9d65,
+	0x9d67, 0x9d65, 0x9d65, 0x9d65, 0x9d65, 0x080c, 0x0d7d, 0xb884,
+	0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90, 0x9784,
+	0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00, 0x0006, 0x7814,
+	0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94, 0x87ff,
+	0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808, 0x6082, 0x2f00,
+	0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073, 0x0129, 0x6077,
+	0x0000, 0xb884, 0x609e, 0x0050, 0x2039, 0x0029, 0x9705, 0x6072,
+	0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029, 0xa87c, 0xd0fc,
+	0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808, 0x6086,
+	0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084,
+	0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0xa848, 0x608a,
+	0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca, 0xb86c, 0x60ce,
+	0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0xa65d, 0x2009, 0x07d0,
+	0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c,
+	0x86da, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e,
+	0x00be, 0x0005, 0x7a40, 0x9294, 0x00ff, 0x8217, 0x0005, 0x00d6,
+	0x2069, 0x19e6, 0x686b, 0x0001, 0x00de, 0x0005, 0x60a3, 0x0056,
+	0x60a7, 0x9575, 0x00f1, 0x080c, 0x86cc, 0x0005, 0x0016, 0x2001,
+	0x180c, 0x200c, 0x9184, 0x0600, 0x9086, 0x0600, 0x0128, 0x0089,
+	0x080c, 0x86cc, 0x001e, 0x0005, 0xc1e5, 0x2001, 0x180c, 0x2102,
+	0x2001, 0x19e7, 0x2003, 0x0000, 0x2001, 0x19f2, 0x2003, 0x0000,
+	0x0c88, 0x0006, 0x0016, 0x0026, 0x2009, 0x1804, 0x2011, 0x0009,
+	0x080c, 0x2a72, 0x002e, 0x001e, 0x000e, 0x0005, 0x0016, 0x00c6,
+	0x0006, 0x080c, 0xa888, 0x0106, 0x2061, 0x0100, 0x61a4, 0x60a7,
+	0x95f5, 0x0016, 0x0026, 0x2009, 0x1804, 0x2011, 0x0008, 0x080c,
+	0x2a72, 0x002e, 0x001e, 0x010e, 0x090c, 0xa8a4, 0x000e, 0xa001,
+	0xa001, 0xa001, 0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x00d6,
+	0x0016, 0x0026, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x74c8,
+	0x1510, 0x2001, 0x1a0b, 0x2004, 0x9005, 0x1904, 0x9e95, 0x080c,
+	0x7569, 0x11a8, 0x2069, 0x0380, 0x6843, 0x0101, 0x6844, 0xd084,
+	0x1de8, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084,
+	0x090c, 0x0d7d, 0x6843, 0x0100, 0x080c, 0x86cc, 0x04b0, 0x00c6,
+	0x2061, 0x19e6, 0x00f0, 0x6904, 0x9194, 0x4000, 0x0598, 0x080c,
+	0x9e16, 0x080c, 0x2a39, 0x00c6, 0x2061, 0x19e6, 0x6134, 0x9192,
+	0x0008, 0x1278, 0x8108, 0x6136, 0x080c, 0xa888, 0x6130, 0x080c,
+	0xa8a4, 0x00ce, 0x81ff, 0x01c8, 0x080c, 0x86cc, 0x080c, 0x9e09,
+	0x00a0, 0x080c, 0xa888, 0x6130, 0x91e5, 0x0000, 0x0150, 0x080c,
+	0xe727, 0x080c, 0x86d5, 0x6003, 0x0001, 0x2009, 0x0014, 0x080c,
+	0xac7c, 0x080c, 0xa8a4, 0x00ce, 0x0000, 0x002e, 0x001e, 0x00de,
+	0x00ce, 0x0005, 0x2001, 0x1a0b, 0x2004, 0x9005, 0x1db0, 0x00c6,
+	0x2061, 0x19e6, 0x6134, 0x9192, 0x0003, 0x1ad8, 0x8108, 0x6136,
+	0x00ce, 0x080c, 0x86cc, 0x080c, 0x5edf, 0x2009, 0x1846, 0x2114,
+	0x8210, 0x220a, 0x0c10, 0x0096, 0x00c6, 0x00d6, 0x00e6, 0x0016,
+	0x0026, 0x080c, 0x86e2, 0x080c, 0xa888, 0x2001, 0x0387, 0x2003,
+	0x0202, 0x2071, 0x19e6, 0x714c, 0x81ff, 0x0904, 0x9f3d, 0x2061,
+	0x0100, 0x2069, 0x0140, 0x080c, 0x74c8, 0x1510, 0x0036, 0x2019,
+	0x0002, 0x080c, 0xa0fa, 0x003e, 0x714c, 0x2160, 0x080c, 0xe727,
+	0x2009, 0x004a, 0x6220, 0x9296, 0x0009, 0x1130, 0x6114, 0x2148,
+	0xa87b, 0x0006, 0x2009, 0x004a, 0x6003, 0x0003, 0x080c, 0xac7c,
+	0x2001, 0x0386, 0x2003, 0x5040, 0x080c, 0x7569, 0x0804, 0x9f3d,
+	0x6904, 0xd1f4, 0x0904, 0x9f4a, 0x080c, 0x2a39, 0x00c6, 0x704c,
+	0x9065, 0x090c, 0x0d7d, 0x6020, 0x00ce, 0x9086, 0x0006, 0x1518,
+	0x61c8, 0x60c4, 0x9105, 0x11f8, 0x2009, 0x180c, 0x2104, 0xd0d4,
+	0x01d0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294, 0x0002,
+	0x1560, 0x0010, 0xc0d4, 0x200a, 0x6014, 0x9084, 0xe7fd, 0x9085,
+	0x0010, 0x6016, 0x704c, 0x2060, 0x080c, 0x9621, 0x2009, 0x0049,
+	0x080c, 0xac7c, 0x00d0, 0x0036, 0x2019, 0x0001, 0x080c, 0xa0fa,
+	0x003e, 0x714c, 0x2160, 0x080c, 0xe727, 0x2009, 0x004a, 0x6220,
+	0x9296, 0x0009, 0x1130, 0x6114, 0x2148, 0xa87b, 0x0006, 0x2009,
+	0x004a, 0x6003, 0x0003, 0x080c, 0xac7c, 0x2001, 0x0387, 0x2003,
+	0x0200, 0x080c, 0xa8a4, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce,
+	0x009e, 0x0005, 0xd1ec, 0x1904, 0x9ef4, 0x0804, 0x9ef6, 0x0026,
+	0x00e6, 0x2071, 0x19e6, 0x706c, 0xd084, 0x01e8, 0xc084, 0x706e,
+	0x714c, 0x81ff, 0x01c0, 0x2071, 0x0100, 0x9188, 0x0008, 0x2114,
+	0x928e, 0x0006, 0x1138, 0x2009, 0x1984, 0x2011, 0x0012, 0x080c,
+	0x2a72, 0x0048, 0x928e, 0x0009, 0x0db0, 0x2009, 0x1984, 0x2011,
+	0x0016, 0x080c, 0x2a72, 0x00ee, 0x002e, 0x0005, 0x9036, 0x2001,
+	0x19f0, 0x2004, 0x9005, 0x0128, 0x9c06, 0x0128, 0x2c30, 0x600c,
+	0x0cc8, 0x9085, 0x0001, 0x0005, 0x00f6, 0x2079, 0x19e6, 0x610c,
+	0x9006, 0x600e, 0x6044, 0xc0fc, 0x6046, 0x86ff, 0x1140, 0x7824,
+	0x9c06, 0x1118, 0x7826, 0x782a, 0x0050, 0x792a, 0x0040, 0x00c6,
+	0x2660, 0x610e, 0x00ce, 0x7824, 0x9c06, 0x1108, 0x7e26, 0x080c,
+	0xa1f0, 0x080c, 0xca21, 0x00fe, 0x0005, 0x080c, 0x9a83, 0x7003,
+	0x1200, 0x7838, 0x7012, 0x783c, 0x7016, 0x00c6, 0x7820, 0x9086,
+	0x0004, 0x1148, 0x7810, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb810,
+	0xb914, 0x00be, 0x0020, 0x2061, 0x1800, 0x607c, 0x6180, 0x9084,
+	0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804, 0x9de6,
+	0x080c, 0x9a83, 0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128, 0xb810,
+	0x9084, 0x00ff, 0x700a, 0xb814, 0x700e, 0x60c3, 0x0008, 0x0804,
+	0x9de6, 0x0156, 0x080c, 0x9ace, 0x7003, 0x0200, 0x080c, 0x879a,
+	0x20a9, 0x0006, 0x2011, 0xfff4, 0x2019, 0xfff5, 0x9ef0, 0x0002,
+	0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398, 0x0002,
+	0x9290, 0x0002, 0x1f04, 0x9fe8, 0x60c3, 0x001c, 0x015e, 0x0804,
+	0x9de6, 0x0016, 0x0026, 0x080c, 0x9aaa, 0x080c, 0x9abc, 0x9e80,
+	0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814, 0x0096, 0x2048, 0xa800,
+	0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x009e,
+	0x7808, 0x9088, 0x0002, 0x21a8, 0x9192, 0x0010, 0x1250, 0x4003,
+	0x9080, 0x0004, 0x8003, 0x60c2, 0x080c, 0x9de6, 0x002e, 0x001e,
+	0x0005, 0x20a9, 0x0010, 0x4003, 0x080c, 0xa668, 0x20a1, 0x0240,
+	0x22a8, 0x4003, 0x0c68, 0x080c, 0x9a83, 0x7003, 0x6200, 0x7808,
+	0x700e, 0x60c3, 0x0008, 0x0804, 0x9de6, 0x0016, 0x0026, 0x080c,
+	0x9a83, 0x20e9, 0x0000, 0x20a1, 0x024c, 0x7814, 0x0096, 0x2048,
+	0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098,
+	0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x4003, 0x8003, 0x60c2,
+	0x080c, 0x9de6, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6, 0x0006,
+	0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7010, 0x2060, 0x8cff,
+	0x0188, 0x080c, 0xca47, 0x1110, 0x080c, 0xb5a6, 0x600c, 0x0006,
+	0x080c, 0xccc3, 0x600f, 0x0000, 0x080c, 0xabdf, 0x080c, 0xa1f0,
+	0x00ce, 0x0c68, 0x2c00, 0x7012, 0x700e, 0x012e, 0x000e, 0x00ce,
+	0x00ee, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
+	0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c,
+	0x200c, 0x918c, 0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140,
+	0x2071, 0x19e6, 0x7030, 0x2060, 0x8cff, 0x0548, 0x080c, 0x9e16,
+	0x6ac0, 0x68c3, 0x0000, 0x080c, 0x86d5, 0x00c6, 0x2061, 0x0100,
+	0x080c, 0xa7b9, 0x00ce, 0x20a9, 0x01f4, 0x04b1, 0x080c, 0x95c6,
+	0x6044, 0xd0ac, 0x1128, 0x2001, 0x1987, 0x2004, 0x604a, 0x0020,
+	0x2009, 0x0013, 0x080c, 0xac7c, 0x000e, 0x001e, 0x002e, 0x006e,
+	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x2001,
+	0x1800, 0x2004, 0x9096, 0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60,
+	0x080c, 0x86d5, 0x6814, 0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5,
+	0x6817, 0x0008, 0x68c3, 0x0000, 0x2011, 0x5e89, 0x080c, 0x861d,
+	0x20a9, 0x01f4, 0x0009, 0x08c0, 0x6824, 0xd094, 0x0140, 0x6827,
+	0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2a39, 0x0090, 0xd084,
+	0x0118, 0x6827, 0x0001, 0x0010, 0x1f04, 0xa0dc, 0x7804, 0x9084,
+	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2a29, 0x9006, 0x080c,
+	0x2a29, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
+	0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c,
+	0x200c, 0x918c, 0xdbff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140,
+	0x2071, 0x0380, 0x701c, 0x0006, 0x701f, 0x0202, 0x2071, 0x19e6,
+	0x704c, 0x2060, 0x8cff, 0x0904, 0xa19f, 0x9386, 0x0002, 0x1128,
+	0x6814, 0x9084, 0x0002, 0x0904, 0xa19f, 0x68af, 0x95f5, 0x6817,
+	0x0010, 0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008,
+	0x080c, 0x86e2, 0x080c, 0x1de5, 0x0046, 0x2009, 0x00a5, 0x080c,
+	0x0e55, 0x2021, 0x0169, 0x2404, 0x9084, 0x000f, 0x9086, 0x0004,
+	0x11f8, 0x68af, 0x95f5, 0x68c6, 0x68cb, 0x0008, 0x00e6, 0x00f6,
+	0x2079, 0x0090, 0x2071, 0x19e6, 0x6814, 0x9084, 0x1984, 0x9085,
+	0x0012, 0x6816, 0x782b, 0x0008, 0x7057, 0x0000, 0x00fe, 0x00ee,
+	0x9386, 0x0002, 0x1128, 0x7884, 0x9005, 0x1110, 0x7887, 0x0001,
+	0x0016, 0x2009, 0x0040, 0x080c, 0x21c1, 0x001e, 0x2009, 0x0000,
+	0x080c, 0x0e55, 0x004e, 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0140,
+	0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2a39, 0x0090,
+	0xd08c, 0x0118, 0x6827, 0x0002, 0x0010, 0x1f04, 0xa16d, 0x7804,
+	0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2a29, 0x9006,
+	0x080c, 0x2a29, 0x6827, 0x4000, 0x6824, 0x83ff, 0x1180, 0x2009,
+	0x0049, 0x6020, 0x9086, 0x0009, 0x0150, 0x080c, 0x9621, 0x6044,
+	0xd0ac, 0x1118, 0x6003, 0x0002, 0x0010, 0x080c, 0xac7c, 0x000e,
+	0x2071, 0x0380, 0xd08c, 0x1110, 0x701f, 0x0200, 0x000e, 0x001e,
+	0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e,
+	0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19e6, 0x6a06,
+	0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069,
+	0x19e6, 0x6a3e, 0x012e, 0x00de, 0x0005, 0x080c, 0x9bd1, 0x785c,
+	0x7032, 0x7042, 0x7047, 0x1000, 0x00f8, 0x080c, 0x9bd1, 0x785c,
+	0x7032, 0x7042, 0x7047, 0x4000, 0x00b8, 0x080c, 0x9bd1, 0x785c,
+	0x7032, 0x7042, 0x7047, 0x2000, 0x0078, 0x080c, 0x9bd1, 0x785c,
+	0x7032, 0x7042, 0x7047, 0x0400, 0x0038, 0x080c, 0x9bd1, 0x785c,
+	0x7032, 0x7042, 0x7047, 0x0200, 0x60c3, 0x0020, 0x0804, 0x9de6,
+	0x00e6, 0x2071, 0x19e6, 0x702c, 0x9005, 0x0110, 0x8001, 0x702e,
+	0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066,
+	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7620, 0x2660,
+	0x2678, 0x2039, 0x0001, 0x87ff, 0x0904, 0xa295, 0x8cff, 0x0904,
+	0xa295, 0x6020, 0x9086, 0x0006, 0x1904, 0xa290, 0x88ff, 0x0138,
+	0x2800, 0x9c06, 0x1904, 0xa290, 0x2039, 0x0000, 0x0050, 0x6010,
+	0x9b06, 0x1904, 0xa290, 0x85ff, 0x0120, 0x605c, 0x9106, 0x1904,
+	0xa290, 0x7030, 0x9c06, 0x15b0, 0x2069, 0x0100, 0x68c0, 0x9005,
+	0x1160, 0x6824, 0xd084, 0x0148, 0x6827, 0x0001, 0x080c, 0x86d5,
+	0x080c, 0xa31a, 0x7033, 0x0000, 0x0428, 0x080c, 0x86d5, 0x6820,
+	0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000,
+	0x080c, 0xa31a, 0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
+	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2a29, 0x9006,
+	0x080c, 0x2a29, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
+	0x0001, 0x003e, 0x7020, 0x9c36, 0x1110, 0x660c, 0x7622, 0x701c,
+	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x701e, 0x0010,
+	0x701f, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
+	0x0008, 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000, 0x6014, 0x0096,
+	0x2048, 0x080c, 0xc830, 0x0110, 0x080c, 0xe27c, 0x009e, 0x080c,
+	0xac1a, 0x080c, 0xa1f0, 0x88ff, 0x1190, 0x00ce, 0x0804, 0xa20b,
+	0x2c78, 0x600c, 0x2060, 0x0804, 0xa20b, 0x9006, 0x012e, 0x000e,
+	0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b,
+	0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6,
+	0x0096, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000,
+	0x2071, 0x19e6, 0x7648, 0x2660, 0x2678, 0x8cff, 0x0904, 0xa309,
+	0x6020, 0x9086, 0x0006, 0x1904, 0xa304, 0x87ff, 0x0128, 0x2700,
+	0x9c06, 0x1904, 0xa304, 0x0040, 0x6010, 0x9b06, 0x15e8, 0x85ff,
+	0x0118, 0x605c, 0x9106, 0x15c0, 0x704c, 0x9c06, 0x1168, 0x0036,
+	0x2019, 0x0001, 0x080c, 0xa0fa, 0x703f, 0x0000, 0x9006, 0x704e,
+	0x706a, 0x7052, 0x706e, 0x003e, 0x7048, 0x9c36, 0x1110, 0x660c,
+	0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
+	0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06,
+	0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048,
+	0x080c, 0xc830, 0x0110, 0x080c, 0xe27c, 0x080c, 0xac1a, 0x87ff,
+	0x1198, 0x00ce, 0x0804, 0xa2b5, 0x2c78, 0x600c, 0x2060, 0x0804,
+	0xa2b5, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x009e,
+	0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x97bd,
+	0x0001, 0x0c80, 0x00e6, 0x2071, 0x19e6, 0x9006, 0x7032, 0x700a,
+	0x7004, 0x9086, 0x0003, 0x0158, 0x2001, 0x1800, 0x2004, 0x9086,
+	0x0002, 0x1118, 0x7007, 0x0005, 0x0010, 0x7007, 0x0000, 0x00ee,
+	0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x19e6, 0x2c10, 0x7648, 0x2660, 0x2678,
+	0x8cff, 0x0540, 0x2200, 0x9c06, 0x1508, 0x7048, 0x9c36, 0x1110,
+	0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
+	0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x2c00, 0x9f06,
+	0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6004, 0x9086,
+	0x0040, 0x090c, 0x95c6, 0x9085, 0x0001, 0x0020, 0x2c78, 0x600c,
+	0x2060, 0x08b0, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00ee,
 	0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
-	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e7, 0x7610,
-	0x2660, 0x2678, 0x8cff, 0x0904, 0xa41a, 0x6010, 0x00b6, 0x2058,
-	0xb8a0, 0x00be, 0x9206, 0x1904, 0xa415, 0x7030, 0x9c06, 0x1520,
-	0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xa3f1, 0x080c, 0x9e32,
-	0x68c3, 0x0000, 0x080c, 0xa338, 0x7033, 0x0000, 0x0036, 0x2069,
+	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7610,
+	0x2660, 0x2678, 0x8cff, 0x0904, 0xa407, 0x6010, 0x00b6, 0x2058,
+	0xb8a0, 0x00be, 0x9206, 0x1904, 0xa402, 0x7030, 0x9c06, 0x1520,
+	0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xa3d9, 0x080c, 0x9e16,
+	0x68c3, 0x0000, 0x080c, 0xa31a, 0x7033, 0x0000, 0x0036, 0x2069,
 	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
-	0x2a0a, 0x9006, 0x080c, 0x2a0a, 0x2069, 0x0100, 0x6824, 0xd084,
+	0x2a29, 0x9006, 0x080c, 0x2a29, 0x2069, 0x0100, 0x6824, 0xd084,
 	0x0110, 0x6827, 0x0001, 0x003e, 0x7010, 0x9c36, 0x1110, 0x660c,
 	0x7612, 0x700c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
 	0x700e, 0x0010, 0x700f, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06,
-	0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xca3c,
-	0x1158, 0x080c, 0x321c, 0x080c, 0xca4d, 0x11f0, 0x080c, 0xb5b5,
-	0x00d8, 0x080c, 0xa338, 0x08c0, 0x080c, 0xca4d, 0x1118, 0x080c,
-	0xb5b5, 0x0090, 0x6014, 0x2048, 0x080c, 0xc836, 0x0168, 0x6020,
-	0x9086, 0x0003, 0x1508, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0x6d74, 0x080c, 0xca27, 0x080c, 0xccc4, 0x080c, 0xac28,
-	0x080c, 0xa20e, 0x00ce, 0x0804, 0xa39a, 0x2c78, 0x600c, 0x2060,
-	0x0804, 0xa39a, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de,
-	0x00ee, 0x00fe, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20,
-	0x080c, 0xe26c, 0x0c08, 0x00d6, 0x080c, 0x9aea, 0x7003, 0x0200,
-	0x7007, 0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099, 0x1989,
-	0x20e9, 0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023,
-	0x0004, 0x7027, 0x7878, 0x080c, 0x9e02, 0x00de, 0x0005, 0x080c,
-	0x9aea, 0x700b, 0x0800, 0x7814, 0x9084, 0xff00, 0x700e, 0x7814,
-	0x9084, 0x00ff, 0x7022, 0x782c, 0x7026, 0x7860, 0x9084, 0x00ff,
-	0x9085, 0x0200, 0x7002, 0x7860, 0x9084, 0xff00, 0x8007, 0x7006,
-	0x60c2, 0x0804, 0x9e02, 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68,
-	0x2009, 0x0035, 0x080c, 0xceca, 0x00de, 0x1904, 0xa4c8, 0x080c,
-	0x9a9f, 0x7003, 0x1300, 0x782c, 0x080c, 0xa5d3, 0x2068, 0x6820,
-	0x9086, 0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c, 0xab57,
-	0x11d8, 0x9286, 0x007e, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe,
-	0x0498, 0x9286, 0x007f, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd,
-	0x0458, 0x9284, 0xff80, 0x0180, 0x9286, 0x0080, 0x1128, 0x700b,
-	0x00ff, 0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810,
-	0x700a, 0xb814, 0x700e, 0x00c0, 0xb884, 0x700e, 0x00a8, 0x080c,
-	0xab57, 0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250,
-	0x00d6, 0x2069, 0x181f, 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e,
-	0x00de, 0x0010, 0x6034, 0x700e, 0x7838, 0x7012, 0x783c, 0x7016,
-	0x60c3, 0x000c, 0x001e, 0x00de, 0x080c, 0x9e02, 0x00be, 0x0005,
-	0x781b, 0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x00be, 0x0005,
-	0x792c, 0x9180, 0x0008, 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186,
-	0x0003, 0x0904, 0xa546, 0x9186, 0x0005, 0x0904, 0xa52e, 0x9186,
-	0x0004, 0x05f0, 0x9186, 0x0008, 0x0904, 0xa537, 0x7807, 0x0037,
-	0x782f, 0x0003, 0x7817, 0x1700, 0x080c, 0xa5b0, 0x0005, 0x080c,
-	0xa571, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6800,
-	0x6a44, 0xd2fc, 0x11f8, 0x0002, 0xa50f, 0xa51a, 0xa511, 0xa51a,
-	0xa516, 0xa50f, 0xa50f, 0xa51a, 0xa51a, 0xa51a, 0xa51a, 0xa50f,
-	0xa50f, 0xa50f, 0xa50f, 0xa50f, 0xa51a, 0xa50f, 0xa51a, 0x080c,
-	0x0d7d, 0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010,
-	0x2009, 0x2000, 0x682c, 0x7022, 0x6830, 0x7026, 0x0804, 0xa56a,
-	0x080c, 0xa571, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000,
-	0x6a00, 0x9286, 0x0002, 0x1108, 0x900e, 0x04e0, 0x080c, 0xa571,
-	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x0498, 0x04c9,
-	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x9286, 0x0005,
-	0x0118, 0x9286, 0x0002, 0x1108, 0x900e, 0x0420, 0x0451, 0x00d6,
-	0x0026, 0x792c, 0x2168, 0x6814, 0x0096, 0x2048, 0xa9ac, 0xa834,
-	0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022, 0x7226, 0x792c,
-	0x9180, 0x0011, 0x2004, 0xd0fc, 0x1148, 0x9180, 0x0000, 0x2004,
-	0x908e, 0x0002, 0x0130, 0x908e, 0x0004, 0x0118, 0x2009, 0x4000,
-	0x0008, 0x900e, 0x712a, 0x60c3, 0x0018, 0x002e, 0x00de, 0x0804,
-	0x9e02, 0x00b6, 0x0036, 0x0046, 0x0056, 0x0066, 0x080c, 0x9aea,
-	0x9006, 0x7003, 0x0200, 0x7938, 0x710a, 0x793c, 0x710e, 0x7810,
-	0x2058, 0xb8a0, 0x080c, 0xab57, 0x1118, 0x9092, 0x007e, 0x0268,
-	0x00d6, 0x2069, 0x181f, 0x2d2c, 0x8d68, 0x2d34, 0x90d8, 0x1000,
-	0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028, 0x901e, 0xbc84, 0x2029,
-	0x0000, 0x6634, 0x782c, 0x9080, 0x0008, 0x2004, 0x9086, 0x0003,
-	0x1128, 0x7512, 0x7616, 0x731a, 0x741e, 0x0020, 0x7312, 0x7416,
-	0x751a, 0x761e, 0x006e, 0x005e, 0x004e, 0x003e, 0x00be, 0x0005,
-	0x080c, 0x9aea, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e,
-	0x700e, 0x60c3, 0x0008, 0x0804, 0x9e02, 0x080c, 0x9a96, 0x7003,
-	0x1400, 0x7838, 0x700a, 0x0079, 0x783c, 0x700e, 0x782c, 0x7012,
-	0x7830, 0x7016, 0x7834, 0x9084, 0x00ff, 0x8007, 0x701a, 0x60c3,
-	0x0010, 0x0804, 0x9e02, 0x00e6, 0x2071, 0x0240, 0x0006, 0x00f6,
-	0x2078, 0x7810, 0x00b6, 0x2058, 0xb8d4, 0xd084, 0x0120, 0x7850,
-	0x702a, 0x784c, 0x702e, 0x00be, 0x00fe, 0x000e, 0x00ee, 0x0005,
-	0x080c, 0x9ae1, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e,
-	0x60c3, 0x0008, 0x0804, 0x9e02, 0x00a9, 0x7914, 0x712a, 0x60c3,
-	0x0000, 0x60a7, 0x9575, 0x0026, 0x080c, 0x2979, 0x0228, 0x2011,
-	0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x080c, 0x9e25, 0x080c,
-	0x86ed, 0x0005, 0x0036, 0x0096, 0x00d6, 0x00e6, 0x7860, 0x2048,
-	0xaa7c, 0x9296, 0x00c0, 0x9294, 0xfffd, 0xaa7e, 0xaa80, 0x9294,
-	0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff, 0xab74, 0x9384, 0x00ff,
-	0x908d, 0xc200, 0xa96e, 0x9384, 0xff00, 0x9215, 0xaa76, 0xa870,
-	0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069, 0x0200, 0x080c, 0xa690,
-	0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000a, 0xa860,
-	0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x4003, 0x60a3, 0x0035,
-	0xaa68, 0x9294, 0x7000, 0x9286, 0x3000, 0x0110, 0x60a3, 0x0037,
-	0x00ee, 0x00de, 0x009e, 0x003e, 0x0005, 0x900e, 0x7814, 0x0096,
-	0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084, 0x0003, 0x11a8, 0x2001,
-	0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824, 0xd0cc, 0x1168, 0xd0c4,
-	0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001, 0x180c, 0x200c, 0xc1d5,
-	0x2102, 0x2009, 0x19b2, 0x210c, 0x009e, 0x918d, 0x0092, 0x0010,
-	0x2009, 0x0096, 0x60ab, 0x0036, 0x0026, 0x2110, 0x900e, 0x080c,
-	0x2a53, 0x002e, 0x0005, 0x2009, 0x0009, 0x00a0, 0x2009, 0x000a,
-	0x0088, 0x2009, 0x000b, 0x0070, 0x2009, 0x000c, 0x0058, 0x2009,
-	0x000d, 0x0040, 0x2009, 0x000e, 0x0028, 0x2009, 0x000f, 0x0010,
-	0x2009, 0x0008, 0x6912, 0x0005, 0x080c, 0x9a9f, 0x0016, 0x0026,
-	0x0096, 0x00d6, 0x7814, 0x2048, 0x7013, 0x0138, 0x2001, 0x1837,
-	0x2004, 0x9084, 0x0028, 0x1138, 0x2001, 0x197c, 0x2004, 0x9086,
-	0xaaaa, 0x1904, 0xa735, 0x7003, 0x5400, 0x00c6, 0x2061, 0x1800,
-	0x607c, 0x9084, 0x00ff, 0xa998, 0x810f, 0x918c, 0xff00, 0x9105,
-	0x700a, 0x6080, 0x700e, 0xa998, 0x918c, 0xff00, 0x7112, 0x20a9,
-	0x0004, 0x2009, 0x1805, 0x2e10, 0x9290, 0x0006, 0x2104, 0x2012,
-	0x8108, 0x8210, 0x1f04, 0xa6c6, 0x20a9, 0x0004, 0x2009, 0x1801,
-	0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xa6d0, 0xa860, 0x20e0,
-	0xa85c, 0x9080, 0x0029, 0x2098, 0x2009, 0x0006, 0x20a9, 0x0001,
-	0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x00d6, 0x2069,
-	0x0200, 0x080c, 0xa67b, 0x00de, 0x2071, 0x0240, 0x2011, 0x0240,
-	0x2009, 0x0002, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210,
-	0x8109, 0x1dc0, 0x2009, 0x0008, 0x20a9, 0x0001, 0x4002, 0x8007,
-	0x2012, 0x8210, 0x8109, 0x1dc0, 0xa85c, 0x9080, 0x0031, 0x2098,
-	0x2009, 0x0008, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210,
-	0x8109, 0x1dc0, 0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7,
-	0x9575, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1168, 0x080c,
-	0x74e9, 0x0150, 0x6028, 0xc0bd, 0x602a, 0x2009, 0x1804, 0x2011,
-	0x0029, 0x080c, 0x2a53, 0x0010, 0x080c, 0x9e02, 0x080c, 0x86ed,
-	0x00de, 0x009e, 0x002e, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0240,
-	0x2001, 0x2200, 0x9085, 0x00ff, 0x7002, 0x7007, 0xffff, 0x2071,
-	0x0100, 0x709b, 0x00ff, 0x00ee, 0x0804, 0xa6ab, 0x080c, 0x9a9f,
-	0x0016, 0x0026, 0x0096, 0x00d6, 0x7814, 0x2048, 0x7013, 0x0138,
-	0x7003, 0x5500, 0x00c6, 0xa89c, 0x9084, 0x00ff, 0xa998, 0x810f,
-	0x918c, 0xff00, 0x9105, 0x700a, 0xa99c, 0x918c, 0xff00, 0xa8a0,
-	0x9084, 0x00ff, 0x9105, 0x700e, 0xa998, 0x918c, 0xff00, 0x2061,
-	0x1800, 0x607c, 0x9084, 0x00ff, 0x910d, 0x7112, 0x6180, 0x7116,
-	0x2009, 0x0008, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098,
-	0x2e10, 0x9290, 0x0006, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012,
-	0x8210, 0x8109, 0x1dc0, 0x20a9, 0x0004, 0x2009, 0x1805, 0x2104,
-	0x2012, 0x8108, 0x8210, 0x1f04, 0xa787, 0x20a9, 0x0002, 0x2009,
-	0x1801, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xa791, 0x00d6,
-	0x0016, 0x2069, 0x0200, 0x080c, 0xa67b, 0x001e, 0x00de, 0x2071,
-	0x0240, 0x20a9, 0x0002, 0x2009, 0x1803, 0x2011, 0x0240, 0x2104,
-	0x2012, 0x8108, 0x8210, 0x1f04, 0xa7a7, 0x2009, 0x0008, 0x4002,
-	0x8007, 0x2012, 0x8210, 0x8109, 0x1dd0, 0x9006, 0x20a9, 0x0008,
-	0x2012, 0x8210, 0x1f04, 0xa7b8, 0x00ce, 0x60c3, 0x004c, 0x60a3,
-	0x0056, 0x60a7, 0x9575, 0x080c, 0x9e02, 0x080c, 0x86ed, 0x00de,
-	0x009e, 0x002e, 0x001e, 0x0005, 0x00d6, 0x9290, 0x0018, 0x8214,
-	0x20e9, 0x0000, 0x2069, 0x0200, 0x6813, 0x0000, 0x22a8, 0x9284,
-	0x00e0, 0x0128, 0x20a9, 0x0020, 0x9292, 0x0020, 0x0008, 0x9016,
-	0x20a1, 0x0240, 0x9006, 0x4004, 0x82ff, 0x0120, 0x6810, 0x8000,
-	0x6812, 0x0c60, 0x00de, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
-	0x00a6, 0x0096, 0x0066, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e7,
-	0x7610, 0x2660, 0x2678, 0x8cff, 0x0904, 0xa873, 0x7030, 0x9c06,
-	0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xa84a, 0x080c,
-	0x9e32, 0x68c3, 0x0000, 0x080c, 0xa338, 0x7033, 0x0000, 0x0036,
-	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
-	0x080c, 0x2a0a, 0x9006, 0x080c, 0x2a0a, 0x2069, 0x0100, 0x6824,
-	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7010, 0x9c36, 0x1110,
-	0x660c, 0x7612, 0x700c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
-	0x2f00, 0x700e, 0x0010, 0x700f, 0x0000, 0x660c, 0x0066, 0x2c00,
-	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c,
-	0xca3c, 0x1158, 0x080c, 0x321c, 0x080c, 0xca4d, 0x11f0, 0x080c,
-	0xb5b5, 0x00d8, 0x080c, 0xa338, 0x08c0, 0x080c, 0xca4d, 0x1118,
-	0x080c, 0xb5b5, 0x0090, 0x6014, 0x2048, 0x080c, 0xc836, 0x0168,
-	0x6020, 0x9086, 0x0003, 0x1520, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x080c, 0x6d80, 0x080c, 0xca27, 0x080c, 0xccc4, 0x080c,
-	0xac28, 0x080c, 0xa20e, 0x00ce, 0x0804, 0xa7fb, 0x2c78, 0x600c,
-	0x2060, 0x0804, 0xa7fb, 0x7013, 0x0000, 0x700f, 0x0000, 0x012e,
-	0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005,
-	0x6020, 0x9086, 0x0006, 0x1d08, 0x080c, 0xe26c, 0x08f0, 0x00f6,
-	0x0036, 0x2079, 0x0380, 0x7b18, 0xd3bc, 0x1de8, 0x7832, 0x7936,
-	0x7a3a, 0x781b, 0x8080, 0x003e, 0x00fe, 0x0005, 0x0016, 0x2001,
-	0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001, 0x1188, 0x2001,
-	0x0015, 0x0c29, 0x2009, 0x1000, 0x2001, 0x0382, 0x2004, 0x9084,
-	0x0007, 0x9086, 0x0003, 0x0120, 0x8109, 0x1db0, 0x080c, 0x0d7d,
-	0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086,
-	0x0003, 0x1120, 0x2001, 0x0380, 0x2003, 0x0001, 0x0005, 0x0156,
-	0x0016, 0x0026, 0x00e6, 0x900e, 0x2071, 0x19e7, 0x0469, 0x0106,
-	0x0190, 0x7004, 0x9086, 0x0003, 0x0148, 0x20a9, 0x1000, 0x6044,
-	0xd0fc, 0x01d8, 0x1f04, 0xa8cf, 0x080c, 0x0d7d, 0x080c, 0xa896,
-	0x6044, 0xd0fc, 0x0190, 0x7030, 0x9c06, 0x1148, 0x080c, 0x95de,
-	0x6044, 0xd0dc, 0x0150, 0xc0dc, 0x6046, 0x700a, 0x7042, 0x704c,
-	0x9c06, 0x190c, 0x0d7d, 0x080c, 0x963b, 0x010e, 0x1919, 0x00ee,
-	0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084,
-	0x0007, 0x9086, 0x0003, 0x0005, 0x0126, 0x2091, 0x2400, 0x7808,
-	0xd0a4, 0x190c, 0x0d76, 0xd09c, 0x0128, 0x7820, 0x908c, 0xf000,
-	0x11b8, 0x0012, 0x012e, 0x0005, 0xa91c, 0xa95a, 0xa981, 0xa9b8,
-	0xa9c8, 0xa9d9, 0xa9e8, 0xa9f6, 0xaa23, 0xaa27, 0xa91c, 0xa91c,
-	0xa91c, 0xa91c, 0xa91c, 0xa91c, 0x080c, 0x0d7d, 0x012e, 0x0005,
-	0x2060, 0x6044, 0xd0bc, 0x0140, 0xc0bc, 0x6046, 0x6000, 0x908a,
-	0x0016, 0x1a0c, 0x0d7d, 0x0012, 0x012e, 0x0005, 0xa941, 0xa943,
-	0xa941, 0xa949, 0xa941, 0xa941, 0xa941, 0xa941, 0xa941, 0xa943,
-	0xa941, 0xa943, 0xa941, 0xa943, 0xa941, 0xa941, 0xa941, 0xa943,
-	0xa941, 0x080c, 0x0d7d, 0x2009, 0x0013, 0x080c, 0xac8c, 0x012e,
-	0x0005, 0x6014, 0x2048, 0xa87c, 0xd0dc, 0x0130, 0x080c, 0x88c1,
-	0x080c, 0xabed, 0x012e, 0x0005, 0x2009, 0x0049, 0x080c, 0xac8c,
-	0x012e, 0x0005, 0x080c, 0xa896, 0x2001, 0x1a0c, 0x2003, 0x0000,
-	0x7030, 0x9065, 0x090c, 0x0d7d, 0x7034, 0x9092, 0x00c8, 0x1258,
-	0x8000, 0x7036, 0x7004, 0x9086, 0x0003, 0x0110, 0x7007, 0x0000,
-	0x781f, 0x0808, 0x0040, 0x080c, 0xe717, 0x6003, 0x0001, 0x2009,
-	0x0014, 0x080c, 0xac8c, 0x781f, 0x0100, 0x080c, 0xa8b2, 0x012e,
-	0x0005, 0x080c, 0xa896, 0x714c, 0x81ff, 0x1128, 0x2011, 0x1a0f,
-	0x2013, 0x0000, 0x0438, 0x2061, 0x0100, 0x7150, 0x9192, 0x7530,
-	0x12f0, 0x8108, 0x7152, 0x714c, 0x9188, 0x0008, 0x210c, 0x918e,
-	0x0006, 0x1138, 0x6014, 0x9084, 0x1984, 0x9085, 0x0012, 0x6016,
-	0x0088, 0x714c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0009, 0x0d90,
-	0x6014, 0x9084, 0x1984, 0x9085, 0x0016, 0x6016, 0x0018, 0x706c,
-	0xc085, 0x706e, 0x781f, 0x0200, 0x080c, 0xa8b2, 0x012e, 0x0005,
-	0x080c, 0xa896, 0x714c, 0x2160, 0x6003, 0x0003, 0x2009, 0x004a,
-	0x080c, 0xac8c, 0x781f, 0x0200, 0x080c, 0xa8b2, 0x012e, 0x0005,
-	0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060, 0x6003, 0x0003, 0x080c,
-	0xa896, 0x080c, 0x1d60, 0x781f, 0x0400, 0x080c, 0xa8b2, 0x012e,
-	0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060, 0x080c, 0xa896,
-	0x080c, 0x1da8, 0x781f, 0x0400, 0x080c, 0xa8b2, 0x012e, 0x0005,
-	0x7030, 0x9065, 0x0148, 0x6044, 0xc0bc, 0x6046, 0x7104, 0x9186,
-	0x0003, 0x0110, 0x080c, 0x96a1, 0x012e, 0x0005, 0x00f6, 0x703c,
-	0x9086, 0x0002, 0x0528, 0x704c, 0x907d, 0x0510, 0x7844, 0xc0bc,
-	0x7846, 0x7820, 0x9086, 0x0009, 0x0118, 0x080c, 0x9d5c, 0x00c0,
-	0x7828, 0xd0fc, 0x1118, 0x080c, 0x9cdb, 0x0090, 0x2001, 0x1837,
-	0x2004, 0x9084, 0x0028, 0x1130, 0x2001, 0x197c, 0x2004, 0x9086,
-	0xaaaa, 0x1120, 0x2001, 0x0387, 0x2003, 0x1000, 0x080c, 0x9c60,
-	0x00fe, 0x012e, 0x0005, 0x080c, 0x758a, 0x012e, 0x0005, 0x080c,
-	0x0d7d, 0x0005, 0x00e6, 0x2071, 0x19e7, 0x6044, 0xc0bc, 0x6046,
-	0xd0fc, 0x01b8, 0x704c, 0x9c06, 0x1190, 0x2019, 0x0001, 0x080c,
-	0xa118, 0x704f, 0x0000, 0x2001, 0x0109, 0x2004, 0xd08c, 0x1138,
-	0x2001, 0x0108, 0x2004, 0xd0bc, 0x1110, 0x703f, 0x0000, 0x080c,
-	0xa34e, 0x00ee, 0x0005, 0x0026, 0x7010, 0x9c06, 0x1178, 0x080c,
-	0xa20e, 0x6044, 0xc0fc, 0x6046, 0x600c, 0x9015, 0x0120, 0x7212,
-	0x600f, 0x0000, 0x0010, 0x7212, 0x720e, 0x9006, 0x002e, 0x0005,
-	0x0026, 0x7020, 0x9c06, 0x1178, 0x080c, 0xa20e, 0x6044, 0xc0fc,
-	0x6046, 0x600c, 0x9015, 0x0120, 0x7222, 0x600f, 0x0000, 0x0010,
-	0x7222, 0x721e, 0x9006, 0x002e, 0x0005, 0x00d6, 0x0036, 0x7830,
-	0x9c06, 0x1558, 0x2069, 0x0100, 0x68c0, 0x9005, 0x01f8, 0x080c,
-	0x86f6, 0x080c, 0x9e32, 0x68c3, 0x0000, 0x080c, 0xa338, 0x2069,
-	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
-	0x2a0a, 0x9006, 0x080c, 0x2a0a, 0x2069, 0x0100, 0x6824, 0xd084,
-	0x0110, 0x6827, 0x0001, 0x9085, 0x0001, 0x0038, 0x7808, 0xc0ad,
-	0x780a, 0x6003, 0x0009, 0x630a, 0x9006, 0x003e, 0x00de, 0x0005,
-	0x0016, 0x0026, 0x0036, 0x6100, 0x2019, 0x0100, 0x2001, 0x0382,
-	0x2004, 0xd09c, 0x0190, 0x00c6, 0x0126, 0x2091, 0x2800, 0x0016,
-	0x0036, 0x080c, 0xa8fc, 0x003e, 0x001e, 0x012e, 0x00ce, 0x6200,
-	0x2200, 0x9106, 0x0d58, 0x2200, 0x0010, 0x8319, 0x1d38, 0x003e,
-	0x002e, 0x001e, 0x0005, 0x00d6, 0x0156, 0x080c, 0x9aea, 0x7a14,
-	0x82ff, 0x0138, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008,
-	0x0490, 0x7003, 0x0200, 0x7007, 0x0000, 0x2069, 0x1800, 0x901e,
-	0x6800, 0x9086, 0x0004, 0x1110, 0xc38d, 0x0060, 0x080c, 0x74e9,
-	0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6adc, 0xd29c, 0x1110, 0xd2ac,
-	0x0108, 0xc39d, 0x730e, 0x080c, 0x87bb, 0x20a9, 0x0006, 0x2011,
-	0xfff4, 0x2019, 0xfff5, 0x2071, 0x0250, 0x2305, 0x2072, 0x8e70,
-	0x2205, 0x2072, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04,
-	0xaafd, 0x60c3, 0x0020, 0x080c, 0x9e02, 0x015e, 0x00de, 0x0005,
-	0x0156, 0x080c, 0x9aea, 0x7a14, 0x82ff, 0x0168, 0x9286, 0xffff,
-	0x0118, 0x9282, 0x000e, 0x1238, 0x7003, 0x0100, 0x700b, 0x0003,
-	0x60c3, 0x0008, 0x0488, 0x7003, 0x0200, 0x7007, 0x001c, 0x700f,
-	0x0001, 0x2011, 0x19bd, 0x2204, 0x8007, 0x701a, 0x8210, 0x2204,
-	0x8007, 0x701e, 0x0421, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248,
-	0x2001, 0x181f, 0x2004, 0x7022, 0x2001, 0x1820, 0x2004, 0x7026,
-	0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x7026, 0x20a9,
-	0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1,
-	0x0256, 0x4003, 0x60c3, 0x001c, 0x015e, 0x0804, 0x9e02, 0x0006,
-	0x2001, 0x1837, 0x2004, 0xd0ac, 0x000e, 0x0005, 0x2011, 0x0003,
-	0x080c, 0xa1cf, 0x2011, 0x0002, 0x080c, 0xa1d9, 0x080c, 0xa098,
-	0x0036, 0x901e, 0x080c, 0xa118, 0x003e, 0x0005, 0x080c, 0x336d,
-	0x0188, 0x0016, 0x00b6, 0x00c6, 0x7010, 0x9085, 0x0020, 0x7012,
-	0x2009, 0x007e, 0x080c, 0x6625, 0xb85c, 0xc0ac, 0xb85e, 0x00ce,
-	0x00be, 0x001e, 0x0005, 0x2071, 0x188d, 0x7000, 0x9005, 0x0140,
-	0x2001, 0x0812, 0x2071, 0x1800, 0x7076, 0x707a, 0x706b, 0xffd4,
-	0x2071, 0x1800, 0x7074, 0x7056, 0x705b, 0x1ddc, 0x0005, 0x00e6,
-	0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7554, 0x9582, 0x0010,
-	0x0608, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0,
-	0x001c, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc, 0x0c98,
-	0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x001c, 0x7068, 0x9502,
-	0x1230, 0x755a, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x705b,
-	0x1ddc, 0x0cc0, 0x9006, 0x0cc0, 0x00e6, 0x2071, 0x1800, 0x7554,
-	0x9582, 0x0010, 0x0600, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000,
+	0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xca36,
+	0x1180, 0x080c, 0x321e, 0x080c, 0xca47, 0x1518, 0x080c, 0xb5a6,
+	0x0400, 0x080c, 0xa31a, 0x6824, 0xd084, 0x09b0, 0x6827, 0x0001,
+	0x0898, 0x080c, 0xca47, 0x1118, 0x080c, 0xb5a6, 0x0090, 0x6014,
+	0x2048, 0x080c, 0xc830, 0x0168, 0x6020, 0x9086, 0x0003, 0x1508,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6d6f, 0x080c,
+	0xca21, 0x080c, 0xccc3, 0x080c, 0xac1a, 0x080c, 0xa1f0, 0x00ce,
+	0x0804, 0xa382, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa382, 0x012e,
+	0x000e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e,
+	0x0005, 0x6020, 0x9086, 0x0006, 0x1d20, 0x080c, 0xe27c, 0x0c08,
+	0x00d6, 0x080c, 0x9ace, 0x7003, 0x0200, 0x7007, 0x0014, 0x60c3,
+	0x0014, 0x20e1, 0x0001, 0x2099, 0x1988, 0x20e9, 0x0000, 0x20a1,
+	0x0250, 0x20a9, 0x0004, 0x4003, 0x7023, 0x0004, 0x7027, 0x7878,
+	0x080c, 0x9de6, 0x00de, 0x0005, 0x080c, 0x9ace, 0x700b, 0x0800,
+	0x7814, 0x9084, 0xff00, 0x700e, 0x7814, 0x9084, 0x00ff, 0x7022,
+	0x782c, 0x7026, 0x7860, 0x9084, 0x00ff, 0x9085, 0x0200, 0x7002,
+	0x7860, 0x9084, 0xff00, 0x8007, 0x7006, 0x60c2, 0x0804, 0x9de6,
+	0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68, 0x2009, 0x0035, 0x080c,
+	0xcec9, 0x00de, 0x1904, 0xa4b5, 0x080c, 0x9a83, 0x7003, 0x1300,
+	0x782c, 0x080c, 0xa5c0, 0x2068, 0x6820, 0x9086, 0x0003, 0x0560,
+	0x7810, 0x2058, 0xbaa0, 0x080c, 0xab49, 0x11d8, 0x9286, 0x007e,
+	0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0498, 0x9286, 0x007f,
+	0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd, 0x0458, 0x9284, 0xff80,
+	0x0180, 0x9286, 0x0080, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffc,
+	0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810, 0x700a, 0xb814, 0x700e,
+	0x00c0, 0xb884, 0x700e, 0x00a8, 0x080c, 0xab49, 0x1130, 0x7810,
+	0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250, 0x00d6, 0x2069, 0x181f,
+	0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e, 0x00de, 0x0010, 0x6034,
+	0x700e, 0x7838, 0x7012, 0x783c, 0x7016, 0x60c3, 0x000c, 0x001e,
+	0x00de, 0x080c, 0x9de6, 0x00be, 0x0005, 0x781b, 0x0001, 0x7803,
+	0x0006, 0x001e, 0x00de, 0x00be, 0x0005, 0x792c, 0x9180, 0x0008,
+	0x200c, 0x9186, 0x0006, 0x01c0, 0x9186, 0x0003, 0x0904, 0xa533,
+	0x9186, 0x0005, 0x0904, 0xa51b, 0x9186, 0x0004, 0x05f0, 0x9186,
+	0x0008, 0x0904, 0xa524, 0x7807, 0x0037, 0x782f, 0x0003, 0x7817,
+	0x1700, 0x080c, 0xa59d, 0x0005, 0x080c, 0xa55e, 0x00d6, 0x0026,
+	0x792c, 0x2168, 0x2009, 0x4000, 0x6800, 0x6a44, 0xd2fc, 0x11f8,
+	0x0002, 0xa4fc, 0xa507, 0xa4fe, 0xa507, 0xa503, 0xa4fc, 0xa4fc,
+	0xa507, 0xa507, 0xa507, 0xa507, 0xa4fc, 0xa4fc, 0xa4fc, 0xa4fc,
+	0xa4fc, 0xa507, 0xa4fc, 0xa507, 0x080c, 0x0d7d, 0x6824, 0xd0e4,
+	0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010, 0x2009, 0x2000, 0x682c,
+	0x7022, 0x6830, 0x7026, 0x0804, 0xa557, 0x080c, 0xa55e, 0x00d6,
+	0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6a00, 0x9286, 0x0002,
+	0x1108, 0x900e, 0x04e0, 0x080c, 0xa55e, 0x00d6, 0x0026, 0x792c,
+	0x2168, 0x2009, 0x4000, 0x0498, 0x04c9, 0x00d6, 0x0026, 0x792c,
+	0x2168, 0x2009, 0x4000, 0x9286, 0x0005, 0x0118, 0x9286, 0x0002,
+	0x1108, 0x900e, 0x0420, 0x0451, 0x00d6, 0x0026, 0x792c, 0x2168,
+	0x6814, 0x0096, 0x2048, 0xa9ac, 0xa834, 0x9112, 0xa9b0, 0xa838,
+	0x009e, 0x9103, 0x7022, 0x7226, 0x792c, 0x9180, 0x0011, 0x2004,
+	0xd0fc, 0x1148, 0x9180, 0x0000, 0x2004, 0x908e, 0x0002, 0x0130,
+	0x908e, 0x0004, 0x0118, 0x2009, 0x4000, 0x0008, 0x900e, 0x712a,
+	0x60c3, 0x0018, 0x002e, 0x00de, 0x0804, 0x9de6, 0x00b6, 0x0036,
+	0x0046, 0x0056, 0x0066, 0x080c, 0x9ace, 0x9006, 0x7003, 0x0200,
+	0x7938, 0x710a, 0x793c, 0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c,
+	0xab49, 0x1118, 0x9092, 0x007e, 0x0268, 0x00d6, 0x2069, 0x181f,
+	0x2d2c, 0x8d68, 0x2d34, 0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14,
+	0x00de, 0x0028, 0x901e, 0xbc84, 0x2029, 0x0000, 0x6634, 0x782c,
+	0x9080, 0x0008, 0x2004, 0x9086, 0x0003, 0x1128, 0x7512, 0x7616,
+	0x731a, 0x741e, 0x0020, 0x7312, 0x7416, 0x751a, 0x761e, 0x006e,
+	0x005e, 0x004e, 0x003e, 0x00be, 0x0005, 0x080c, 0x9ace, 0x7003,
+	0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x700e, 0x60c3, 0x0008,
+	0x0804, 0x9de6, 0x080c, 0x9a7a, 0x7003, 0x1400, 0x7838, 0x700a,
+	0x0079, 0x783c, 0x700e, 0x782c, 0x7012, 0x7830, 0x7016, 0x7834,
+	0x9084, 0x00ff, 0x8007, 0x701a, 0x60c3, 0x0010, 0x0804, 0x9de6,
+	0x00e6, 0x2071, 0x0240, 0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6,
+	0x2058, 0xb8d4, 0xd084, 0x0120, 0x7850, 0x702a, 0x784c, 0x702e,
+	0x00be, 0x00fe, 0x000e, 0x00ee, 0x0005, 0x080c, 0x9ac5, 0x7003,
+	0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804,
+	0x9de6, 0x00a9, 0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7, 0x9575,
+	0x0026, 0x080c, 0x2998, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5,
+	0x2012, 0x002e, 0x080c, 0x9e09, 0x080c, 0x86cc, 0x0005, 0x0036,
+	0x0096, 0x00d6, 0x00e6, 0x7860, 0x2048, 0xaa7c, 0x9296, 0x00c0,
+	0x9294, 0xfffd, 0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82, 0xa96c,
+	0x9194, 0x00ff, 0xab74, 0x9384, 0x00ff, 0x908d, 0xc200, 0xa96e,
+	0x9384, 0xff00, 0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a, 0xaa72,
+	0x00d6, 0x2069, 0x0200, 0x080c, 0xa67d, 0x00de, 0x20e9, 0x0000,
+	0x20a1, 0x0240, 0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c, 0x9080,
+	0x001b, 0x2098, 0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294, 0x7000,
+	0x9286, 0x3000, 0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de, 0x009e,
+	0x003e, 0x0005, 0x900e, 0x7814, 0x0096, 0x2048, 0xa87c, 0xd0fc,
+	0x01c0, 0x9084, 0x0003, 0x11a8, 0x2001, 0x180c, 0x2004, 0xd0bc,
+	0x0180, 0x7824, 0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8, 0x9005,
+	0x1140, 0x2001, 0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009, 0x19b1,
+	0x210c, 0x009e, 0x918d, 0x0092, 0x0010, 0x2009, 0x0096, 0x60ab,
+	0x0036, 0x0026, 0x2110, 0x900e, 0x080c, 0x2a72, 0x002e, 0x0005,
+	0x2009, 0x0009, 0x00a0, 0x2009, 0x000a, 0x0088, 0x2009, 0x000b,
+	0x0070, 0x2009, 0x000c, 0x0058, 0x2009, 0x000d, 0x0040, 0x2009,
+	0x000e, 0x0028, 0x2009, 0x000f, 0x0010, 0x2009, 0x0008, 0x6912,
+	0x0005, 0x080c, 0x9a83, 0x0016, 0x0026, 0x0096, 0x00d6, 0x7814,
+	0x2048, 0x7013, 0x0138, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028,
+	0x1138, 0x2001, 0x197b, 0x2004, 0x9086, 0xaaaa, 0x1904, 0xa722,
+	0x7003, 0x5400, 0x00c6, 0x2061, 0x1800, 0x607c, 0x9084, 0x00ff,
+	0xa998, 0x810f, 0x918c, 0xff00, 0x9105, 0x700a, 0x6080, 0x700e,
+	0xa998, 0x918c, 0xff00, 0x7112, 0x20a9, 0x0004, 0x2009, 0x1805,
+	0x2e10, 0x9290, 0x0006, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04,
+	0xa6b3, 0x20a9, 0x0004, 0x2009, 0x1801, 0x2104, 0x2012, 0x8108,
+	0x8210, 0x1f04, 0xa6bd, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029,
+	0x2098, 0x2009, 0x0006, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012,
+	0x8210, 0x8109, 0x1dc0, 0x00d6, 0x2069, 0x0200, 0x080c, 0xa668,
+	0x00de, 0x2071, 0x0240, 0x2011, 0x0240, 0x2009, 0x0002, 0x20a9,
+	0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x2009,
+	0x0008, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109,
+	0x1dc0, 0xa85c, 0x9080, 0x0031, 0x2098, 0x2009, 0x0008, 0x20a9,
+	0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x00ce,
+	0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x2001, 0x1837,
+	0x2004, 0x9084, 0x0028, 0x1168, 0x080c, 0x74c8, 0x0150, 0x6028,
+	0xc0bd, 0x602a, 0x2009, 0x1804, 0x2011, 0x0029, 0x080c, 0x2a72,
+	0x0010, 0x080c, 0x9de6, 0x080c, 0x86cc, 0x00de, 0x009e, 0x002e,
+	0x001e, 0x0005, 0x00e6, 0x2071, 0x0240, 0x2001, 0x2200, 0x9085,
+	0x00ff, 0x7002, 0x7007, 0xffff, 0x2071, 0x0100, 0x709b, 0x00ff,
+	0x00ee, 0x0804, 0xa698, 0x080c, 0x9a83, 0x0016, 0x0026, 0x0096,
+	0x00d6, 0x7814, 0x2048, 0x7013, 0x0138, 0x7003, 0x5500, 0x00c6,
+	0xa89c, 0x9084, 0x00ff, 0xa998, 0x810f, 0x918c, 0xff00, 0x9105,
+	0x700a, 0xa99c, 0x918c, 0xff00, 0xa8a0, 0x9084, 0x00ff, 0x9105,
+	0x700e, 0xa998, 0x918c, 0xff00, 0x2061, 0x1800, 0x607c, 0x9084,
+	0x00ff, 0x910d, 0x7112, 0x6180, 0x7116, 0x2009, 0x0008, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098, 0x2e10, 0x9290, 0x0006,
+	0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0,
+	0x20a9, 0x0004, 0x2009, 0x1805, 0x2104, 0x2012, 0x8108, 0x8210,
+	0x1f04, 0xa774, 0x20a9, 0x0002, 0x2009, 0x1801, 0x2104, 0x2012,
+	0x8108, 0x8210, 0x1f04, 0xa77e, 0x00d6, 0x0016, 0x2069, 0x0200,
+	0x080c, 0xa668, 0x001e, 0x00de, 0x2071, 0x0240, 0x20a9, 0x0002,
+	0x2009, 0x1803, 0x2011, 0x0240, 0x2104, 0x2012, 0x8108, 0x8210,
+	0x1f04, 0xa794, 0x2009, 0x0008, 0x4002, 0x8007, 0x2012, 0x8210,
+	0x8109, 0x1dd0, 0x9006, 0x20a9, 0x0008, 0x2012, 0x8210, 0x1f04,
+	0xa7a5, 0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7, 0x9575,
+	0x080c, 0x9de6, 0x080c, 0x86cc, 0x00de, 0x009e, 0x002e, 0x001e,
+	0x0005, 0x00d6, 0x9290, 0x0018, 0x8214, 0x20e9, 0x0000, 0x2069,
+	0x0200, 0x6813, 0x0000, 0x22a8, 0x9284, 0x00e0, 0x0128, 0x20a9,
+	0x0020, 0x9292, 0x0020, 0x0008, 0x9016, 0x20a1, 0x0240, 0x9006,
+	0x4004, 0x82ff, 0x0120, 0x6810, 0x8000, 0x6812, 0x0c60, 0x00de,
+	0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096, 0x0066,
+	0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7610, 0x2660, 0x2678,
+	0x8cff, 0x0904, 0xa865, 0x7030, 0x9c06, 0x1520, 0x2069, 0x0100,
+	0x68c0, 0x9005, 0x0904, 0xa837, 0x080c, 0x9e16, 0x68c3, 0x0000,
+	0x080c, 0xa31a, 0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
+	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2a29, 0x9006,
+	0x080c, 0x2a29, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
+	0x0001, 0x003e, 0x7010, 0x9c36, 0x1110, 0x660c, 0x7612, 0x700c,
+	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700e, 0x0010,
+	0x700f, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
+	0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xca36, 0x1180, 0x080c,
+	0x321e, 0x080c, 0xca47, 0x1518, 0x080c, 0xb5a6, 0x0400, 0x080c,
+	0xa31a, 0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, 0x0898, 0x080c,
+	0xca47, 0x1118, 0x080c, 0xb5a6, 0x0090, 0x6014, 0x2048, 0x080c,
+	0xc830, 0x0168, 0x6020, 0x9086, 0x0003, 0x1520, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x080c, 0x6d7b, 0x080c, 0xca21, 0x080c,
+	0xccc3, 0x080c, 0xac1a, 0x080c, 0xa1f0, 0x00ce, 0x0804, 0xa7e8,
+	0x2c78, 0x600c, 0x2060, 0x0804, 0xa7e8, 0x7013, 0x0000, 0x700f,
+	0x0000, 0x012e, 0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d08, 0x080c, 0xe27c,
+	0x08f0, 0x00f6, 0x0036, 0x2079, 0x0380, 0x7b18, 0xd3bc, 0x1de8,
+	0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x003e, 0x00fe, 0x0005,
+	0x0016, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001,
+	0x1188, 0x2001, 0x0015, 0x0c29, 0x2009, 0x1000, 0x2001, 0x0382,
+	0x2004, 0x9084, 0x0007, 0x9086, 0x0003, 0x0120, 0x8109, 0x1db0,
+	0x080c, 0x0d7d, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084,
+	0x0007, 0x9086, 0x0003, 0x1120, 0x2001, 0x0380, 0x2003, 0x0001,
+	0x0005, 0x0156, 0x0016, 0x0026, 0x00e6, 0x900e, 0x2071, 0x19e6,
+	0x0469, 0x0106, 0x0190, 0x7004, 0x9086, 0x0003, 0x0148, 0x20a9,
+	0x1000, 0x6044, 0xd0fc, 0x01d8, 0x1f04, 0xa8c1, 0x080c, 0x0d7d,
+	0x080c, 0xa888, 0x6044, 0xd0fc, 0x0190, 0x7030, 0x9c06, 0x1148,
+	0x080c, 0x95c6, 0x6044, 0xd0dc, 0x0150, 0xc0dc, 0x6046, 0x700a,
+	0x7042, 0x704c, 0x9c06, 0x190c, 0x0d7d, 0x080c, 0x9621, 0x010e,
+	0x1919, 0x00ee, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x0382,
+	0x2004, 0x9084, 0x0007, 0x9086, 0x0003, 0x0005, 0x0126, 0x2091,
+	0x2400, 0x7808, 0xd0a4, 0x190c, 0x0d76, 0xd09c, 0x0128, 0x7820,
+	0x908c, 0xf000, 0x11b8, 0x0012, 0x012e, 0x0005, 0xa90e, 0xa94c,
+	0xa973, 0xa9aa, 0xa9ba, 0xa9cb, 0xa9da, 0xa9e8, 0xaa15, 0xaa19,
+	0xa90e, 0xa90e, 0xa90e, 0xa90e, 0xa90e, 0xa90e, 0x080c, 0x0d7d,
+	0x012e, 0x0005, 0x2060, 0x6044, 0xd0bc, 0x0140, 0xc0bc, 0x6046,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0012, 0x012e, 0x0005,
+	0xa933, 0xa935, 0xa933, 0xa93b, 0xa933, 0xa933, 0xa933, 0xa933,
+	0xa933, 0xa935, 0xa933, 0xa935, 0xa933, 0xa935, 0xa933, 0xa933,
+	0xa933, 0xa935, 0xa933, 0x080c, 0x0d7d, 0x2009, 0x0013, 0x080c,
+	0xac7c, 0x012e, 0x0005, 0x6014, 0x2048, 0xa87c, 0xd0dc, 0x0130,
+	0x080c, 0x88a3, 0x080c, 0xabdf, 0x012e, 0x0005, 0x2009, 0x0049,
+	0x080c, 0xac7c, 0x012e, 0x0005, 0x080c, 0xa888, 0x2001, 0x1a0b,
+	0x2003, 0x0000, 0x7030, 0x9065, 0x090c, 0x0d7d, 0x7034, 0x9092,
+	0x00c8, 0x1258, 0x8000, 0x7036, 0x7004, 0x9086, 0x0003, 0x0110,
+	0x7007, 0x0000, 0x781f, 0x0808, 0x0040, 0x080c, 0xe727, 0x6003,
+	0x0001, 0x2009, 0x0014, 0x080c, 0xac7c, 0x781f, 0x0100, 0x080c,
+	0xa8a4, 0x012e, 0x0005, 0x080c, 0xa888, 0x714c, 0x81ff, 0x1128,
+	0x2011, 0x1a0e, 0x2013, 0x0000, 0x0438, 0x2061, 0x0100, 0x7150,
+	0x9192, 0x7530, 0x12f0, 0x8108, 0x7152, 0x714c, 0x9188, 0x0008,
+	0x210c, 0x918e, 0x0006, 0x1138, 0x6014, 0x9084, 0x1984, 0x9085,
+	0x0012, 0x6016, 0x0088, 0x714c, 0x9188, 0x0008, 0x210c, 0x918e,
+	0x0009, 0x0d90, 0x6014, 0x9084, 0x1984, 0x9085, 0x0016, 0x6016,
+	0x0018, 0x706c, 0xc085, 0x706e, 0x781f, 0x0200, 0x080c, 0xa8a4,
+	0x012e, 0x0005, 0x080c, 0xa888, 0x714c, 0x2160, 0x6003, 0x0003,
+	0x2009, 0x004a, 0x080c, 0xac7c, 0x781f, 0x0200, 0x080c, 0xa8a4,
+	0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060, 0x6003,
+	0x0003, 0x080c, 0xa888, 0x080c, 0x1d6d, 0x781f, 0x0400, 0x080c,
+	0xa8a4, 0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060,
+	0x080c, 0xa888, 0x080c, 0x1db5, 0x781f, 0x0400, 0x080c, 0xa8a4,
+	0x012e, 0x0005, 0x7030, 0x9065, 0x0148, 0x6044, 0xc0bc, 0x6046,
+	0x7104, 0x9186, 0x0003, 0x0110, 0x080c, 0x9685, 0x012e, 0x0005,
+	0x00f6, 0x703c, 0x9086, 0x0002, 0x0528, 0x704c, 0x907d, 0x0510,
+	0x7844, 0xc0bc, 0x7846, 0x7820, 0x9086, 0x0009, 0x0118, 0x080c,
+	0x9d40, 0x00c0, 0x7828, 0xd0fc, 0x1118, 0x080c, 0x9cbf, 0x0090,
+	0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1130, 0x2001, 0x197b,
+	0x2004, 0x9086, 0xaaaa, 0x1120, 0x2001, 0x0387, 0x2003, 0x1000,
+	0x080c, 0x9c44, 0x00fe, 0x012e, 0x0005, 0x080c, 0x7569, 0x012e,
+	0x0005, 0x080c, 0x0d7d, 0x0005, 0x00e6, 0x2071, 0x19e6, 0x6044,
+	0xc0bc, 0x6046, 0xd0fc, 0x01b8, 0x704c, 0x9c06, 0x1190, 0x2019,
+	0x0001, 0x080c, 0xa0fa, 0x704f, 0x0000, 0x2001, 0x0109, 0x2004,
+	0xd08c, 0x1138, 0x2001, 0x0108, 0x2004, 0xd0bc, 0x1110, 0x703f,
+	0x0000, 0x080c, 0xa331, 0x00ee, 0x0005, 0x0026, 0x7010, 0x9c06,
+	0x1178, 0x080c, 0xa1f0, 0x6044, 0xc0fc, 0x6046, 0x600c, 0x9015,
+	0x0120, 0x7212, 0x600f, 0x0000, 0x0010, 0x7212, 0x720e, 0x9006,
+	0x002e, 0x0005, 0x0026, 0x7020, 0x9c06, 0x1178, 0x080c, 0xa1f0,
+	0x6044, 0xc0fc, 0x6046, 0x600c, 0x9015, 0x0120, 0x7222, 0x600f,
+	0x0000, 0x0010, 0x7222, 0x721e, 0x9006, 0x002e, 0x0005, 0x00d6,
+	0x0036, 0x7830, 0x9c06, 0x1558, 0x2069, 0x0100, 0x68c0, 0x9005,
+	0x01f8, 0x080c, 0x86d5, 0x080c, 0x9e16, 0x68c3, 0x0000, 0x080c,
+	0xa31a, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001,
+	0x0100, 0x080c, 0x2a29, 0x9006, 0x080c, 0x2a29, 0x2069, 0x0100,
+	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x9085, 0x0001, 0x0038,
+	0x7808, 0xc0ad, 0x780a, 0x6003, 0x0009, 0x630a, 0x9006, 0x003e,
+	0x00de, 0x0005, 0x0016, 0x0026, 0x0036, 0x6100, 0x2019, 0x0100,
+	0x2001, 0x0382, 0x2004, 0xd09c, 0x0190, 0x00c6, 0x0126, 0x2091,
+	0x2800, 0x0016, 0x0036, 0x080c, 0xa8ee, 0x003e, 0x001e, 0x012e,
+	0x00ce, 0x6200, 0x2200, 0x9106, 0x0d58, 0x2200, 0x0010, 0x8319,
+	0x1d38, 0x003e, 0x002e, 0x001e, 0x0005, 0x00d6, 0x0156, 0x080c,
+	0x9ace, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100, 0x700b, 0x0003,
+	0x60c3, 0x0008, 0x0490, 0x7003, 0x0200, 0x7007, 0x0000, 0x2069,
+	0x1800, 0x901e, 0x6800, 0x9086, 0x0004, 0x1110, 0xc38d, 0x0060,
+	0x080c, 0x74c8, 0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6adc, 0xd29c,
+	0x1110, 0xd2ac, 0x0108, 0xc39d, 0x730e, 0x080c, 0x879a, 0x20a9,
+	0x0006, 0x2011, 0xfff4, 0x2019, 0xfff5, 0x2071, 0x0250, 0x2305,
+	0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398, 0x0002, 0x9290,
+	0x0002, 0x1f04, 0xaaef, 0x60c3, 0x0020, 0x080c, 0x9de6, 0x015e,
+	0x00de, 0x0005, 0x0156, 0x080c, 0x9ace, 0x7a14, 0x82ff, 0x0168,
+	0x9286, 0xffff, 0x0118, 0x9282, 0x000e, 0x1238, 0x7003, 0x0100,
+	0x700b, 0x0003, 0x60c3, 0x0008, 0x0488, 0x7003, 0x0200, 0x7007,
+	0x001c, 0x700f, 0x0001, 0x2011, 0x19bc, 0x2204, 0x8007, 0x701a,
+	0x8210, 0x2204, 0x8007, 0x701e, 0x0421, 0x1120, 0xb8a0, 0x9082,
+	0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x7022, 0x2001, 0x1820,
+	0x2004, 0x7026, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff,
+	0x7026, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
+	0x0000, 0x20a1, 0x0256, 0x4003, 0x60c3, 0x001c, 0x015e, 0x0804,
+	0x9de6, 0x0006, 0x2001, 0x1837, 0x2004, 0xd0ac, 0x000e, 0x0005,
+	0x2011, 0x0003, 0x080c, 0xa1b1, 0x2011, 0x0002, 0x080c, 0xa1bb,
+	0x080c, 0xa07a, 0x0036, 0x901e, 0x080c, 0xa0fa, 0x003e, 0x0005,
+	0x080c, 0x3361, 0x0188, 0x0016, 0x00b6, 0x00c6, 0x7010, 0x9085,
+	0x0020, 0x7012, 0x2009, 0x007e, 0x080c, 0x6620, 0xb85c, 0xc0ac,
+	0xb85e, 0x00ce, 0x00be, 0x001e, 0x0005, 0x2071, 0x188d, 0x7000,
+	0x9005, 0x0140, 0x2001, 0x0812, 0x2071, 0x1800, 0x7076, 0x707a,
+	0x706b, 0xffd4, 0x2071, 0x1800, 0x7074, 0x7056, 0x705b, 0x1ddc,
+	0x0005, 0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7554,
+	0x9582, 0x0010, 0x0608, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000,
 	0x0148, 0x9ce0, 0x001c, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061,
 	0x1ddc, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x001c,
-	0x7068, 0x9502, 0x1228, 0x755a, 0x9085, 0x0001, 0x00ee, 0x0005,
-	0x705b, 0x1ddc, 0x0cc8, 0x9006, 0x0cc8, 0x9c82, 0x1ddc, 0x0a0c,
-	0x0d7d, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0d7d, 0x9006,
-	0x6006, 0x600a, 0x600e, 0x6016, 0x601a, 0x6012, 0x6023, 0x0000,
-	0x6003, 0x0000, 0x601e, 0x605e, 0x6062, 0x6026, 0x602a, 0x602e,
-	0x6032, 0x6036, 0x603a, 0x603e, 0x604a, 0x602a, 0x6046, 0x6042,
-	0x2061, 0x1800, 0x6054, 0x8000, 0x6056, 0x0005, 0x9006, 0x600e,
-	0x6016, 0x601a, 0x6012, 0x6022, 0x6002, 0x601e, 0x605e, 0x6062,
-	0x604a, 0x6046, 0x2061, 0x1800, 0x6054, 0x8000, 0x6056, 0x0005,
-	0x0006, 0x6000, 0x9086, 0x0000, 0x01d0, 0x601c, 0xd084, 0x190c,
-	0x1a6a, 0x6023, 0x0007, 0x2001, 0x1986, 0x2004, 0x0006, 0x9082,
-	0x0051, 0x000e, 0x0208, 0x8004, 0x601a, 0x080c, 0xe524, 0x604b,
-	0x0000, 0x6044, 0xd0fc, 0x1129, 0x9006, 0x6046, 0x6016, 0x000e,
-	0x0005, 0x080c, 0xa8f4, 0x0106, 0x190c, 0xa896, 0x2001, 0x19fa,
-	0x2004, 0x9c06, 0x1130, 0x0036, 0x2019, 0x0001, 0x080c, 0xa118,
-	0x003e, 0x080c, 0xa34e, 0x010e, 0x190c, 0xa8b2, 0x0005, 0x00e6,
+	0x7068, 0x9502, 0x1230, 0x755a, 0x9085, 0x0001, 0x012e, 0x00ee,
+	0x0005, 0x705b, 0x1ddc, 0x0cc0, 0x9006, 0x0cc0, 0x00e6, 0x2071,
+	0x1800, 0x7554, 0x9582, 0x0010, 0x0600, 0x7058, 0x2060, 0x6000,
+	0x9086, 0x0000, 0x0148, 0x9ce0, 0x001c, 0x7068, 0x9c02, 0x1208,
+	0x0cb0, 0x2061, 0x1ddc, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7556,
+	0x9ca8, 0x001c, 0x7068, 0x9502, 0x1228, 0x755a, 0x9085, 0x0001,
+	0x00ee, 0x0005, 0x705b, 0x1ddc, 0x0cc8, 0x9006, 0x0cc8, 0x9c82,
+	0x1ddc, 0x0a0c, 0x0d7d, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a0c,
+	0x0d7d, 0x9006, 0x6006, 0x600a, 0x600e, 0x6016, 0x601a, 0x6012,
+	0x6023, 0x0000, 0x6003, 0x0000, 0x601e, 0x605e, 0x6062, 0x6026,
+	0x602a, 0x602e, 0x6032, 0x6036, 0x603a, 0x603e, 0x604a, 0x602a,
+	0x6046, 0x6042, 0x2061, 0x1800, 0x6054, 0x8000, 0x6056, 0x0005,
+	0x9006, 0x600e, 0x6016, 0x601a, 0x6012, 0x6022, 0x6002, 0x601e,
+	0x605e, 0x6062, 0x604a, 0x6046, 0x2061, 0x1800, 0x6054, 0x8000,
+	0x6056, 0x0005, 0x0006, 0x6000, 0x9086, 0x0000, 0x01d0, 0x601c,
+	0xd084, 0x190c, 0x1a77, 0x6023, 0x0007, 0x2001, 0x1985, 0x2004,
+	0x0006, 0x9082, 0x0051, 0x000e, 0x0208, 0x8004, 0x601a, 0x080c,
+	0xe534, 0x604b, 0x0000, 0x6044, 0xd0fc, 0x1129, 0x9006, 0x6046,
+	0x6016, 0x000e, 0x0005, 0x080c, 0xa888, 0x0106, 0x2001, 0x19f9,
+	0x2004, 0x9c06, 0x1130, 0x0036, 0x2019, 0x0001, 0x080c, 0xa0fa,
+	0x003e, 0x080c, 0xa331, 0x010e, 0x090c, 0xa8a4, 0x0005, 0x00e6,
 	0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7554, 0x9582, 0x0001,
 	0x0608, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0,
 	0x001c, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc, 0x0c98,
 	0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x001c, 0x7068, 0x9502,
 	0x1230, 0x755a, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x705b,
 	0x1ddc, 0x0cc0, 0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f, 0x0002,
-	0xaca0, 0xacaa, 0xacc5, 0xace0, 0xcf9c, 0xcfb9, 0xcfd4, 0xaca0,
-	0xacaa, 0x8f9a, 0xacfc, 0xaca0, 0xaca0, 0xaca0, 0xaca0, 0xaca0,
-	0x9186, 0x0013, 0x1130, 0x6044, 0xd0fc, 0x0110, 0x080c, 0x95de,
+	0xac90, 0xac9a, 0xacb5, 0xacd0, 0xcfa4, 0xcfc1, 0xcfdc, 0xac90,
+	0xac9a, 0x8f7c, 0xacec, 0xac90, 0xac90, 0xac90, 0xac90, 0xac90,
+	0x9186, 0x0013, 0x1130, 0x6044, 0xd0fc, 0x0110, 0x080c, 0x95c6,
 	0x0005, 0x0005, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d7d,
-	0x0013, 0x006e, 0x0005, 0xacc3, 0xb421, 0xb5fc, 0xacc3, 0xb692,
-	0xafc5, 0xacc3, 0xacc3, 0xb3a3, 0xbbfa, 0xacc3, 0xacc3, 0xacc3,
-	0xacc3, 0xacc3, 0xacc3, 0x080c, 0x0d7d, 0x0066, 0x6000, 0x90b2,
-	0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0xacde, 0xc205,
-	0xacde, 0xacde, 0xacde, 0xacde, 0xacde, 0xacde, 0xc1aa, 0xc388,
-	0xacde, 0xc242, 0xc2c6, 0xc242, 0xc2c6, 0xacde, 0x080c, 0x0d7d,
-	0x6000, 0x9082, 0x0016, 0x1a0c, 0x0d7d, 0x6000, 0x0002, 0xacfa,
-	0xbc44, 0xbcdb, 0xbe5b, 0xbeca, 0xacfa, 0xacfa, 0xacfa, 0xbc13,
-	0xc12b, 0xc12e, 0xacfa, 0xacfa, 0xacfa, 0xacfa, 0xc15e, 0xacfa,
-	0xacfa, 0xacfa, 0x080c, 0x0d7d, 0x0066, 0x6000, 0x90b2, 0x0016,
-	0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0xad15, 0xad15, 0xad53,
-	0xadf2, 0xae72, 0xad15, 0xad15, 0xad15, 0xad17, 0xad15, 0xad15,
-	0xad15, 0xad15, 0xad15, 0xad15, 0xad15, 0x080c, 0x0d7d, 0x9186,
+	0x0013, 0x006e, 0x0005, 0xacb3, 0xb412, 0xb5ed, 0xacb3, 0xb683,
+	0xafb5, 0xacb3, 0xacb3, 0xb394, 0xbbed, 0xacb3, 0xacb3, 0xacb3,
+	0xacb3, 0xacb3, 0xacb3, 0x080c, 0x0d7d, 0x0066, 0x6000, 0x90b2,
+	0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0xacce, 0xc1f2,
+	0xacce, 0xacce, 0xacce, 0xacce, 0xacce, 0xacce, 0xc197, 0xc375,
+	0xacce, 0xc22f, 0xc2b3, 0xc22f, 0xc2b3, 0xacce, 0x080c, 0x0d7d,
+	0x6000, 0x9082, 0x0016, 0x1a0c, 0x0d7d, 0x6000, 0x0002, 0xacea,
+	0xbc37, 0xbcce, 0xbe4e, 0xbebd, 0xacea, 0xacea, 0xacea, 0xbc06,
+	0xc118, 0xc11b, 0xacea, 0xacea, 0xacea, 0xacea, 0xc14b, 0xacea,
+	0xacea, 0xacea, 0x080c, 0x0d7d, 0x0066, 0x6000, 0x90b2, 0x0016,
+	0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0xad05, 0xad05, 0xad43,
+	0xade2, 0xae62, 0xad05, 0xad05, 0xad05, 0xad07, 0xad05, 0xad05,
+	0xad05, 0xad05, 0xad05, 0xad05, 0xad05, 0x080c, 0x0d7d, 0x9186,
 	0x004c, 0x0560, 0x9186, 0x0003, 0x190c, 0x0d7d, 0x0096, 0x601c,
 	0xc0ed, 0x601e, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa87c,
 	0x9084, 0xa000, 0xc0b5, 0xa87e, 0xa8ac, 0xa836, 0xa8b0, 0xa83a,
 	0x9006, 0xa846, 0xa84a, 0xa884, 0x9092, 0x199a, 0x0210, 0x2001,
 	0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a, 0x009e, 0x080c,
-	0x1bba, 0x2009, 0x8030, 0x080c, 0x9265, 0x0005, 0x6010, 0x00b6,
-	0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c, 0xae94, 0x080c, 0xcf6a,
+	0x1bc7, 0x2009, 0x8030, 0x080c, 0x9247, 0x0005, 0x6010, 0x00b6,
+	0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c, 0xae84, 0x080c, 0xcf69,
 	0x6003, 0x0007, 0x0005, 0x00d6, 0x0096, 0x00f6, 0x2079, 0x1800,
 	0x7a90, 0x6014, 0x2048, 0xa87c, 0xd0ec, 0x1110, 0x9290, 0x0018,
 	0xac78, 0xc4fc, 0x0046, 0xa8e0, 0x9005, 0x1140, 0xa8dc, 0x921a,
@@ -5348,54 +5346,54 @@
 	0x0016, 0x0026, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2400, 0x9005,
 	0x1108, 0x009a, 0x2100, 0x9086, 0x0015, 0x1118, 0x2001, 0x0001,
 	0x0038, 0x2100, 0x9086, 0x0016, 0x0118, 0x2001, 0x0001, 0x002a,
-	0x94a4, 0x0007, 0x8423, 0x9405, 0x0002, 0xadba, 0xadba, 0xadb5,
-	0xadb8, 0xadba, 0xadb2, 0xada5, 0xada5, 0xada5, 0xada5, 0xada5,
-	0xada5, 0xada5, 0xada5, 0xada5, 0xada5, 0x00fe, 0x00ee, 0x00de,
+	0x94a4, 0x0007, 0x8423, 0x9405, 0x0002, 0xadaa, 0xadaa, 0xada5,
+	0xada8, 0xadaa, 0xada2, 0xad95, 0xad95, 0xad95, 0xad95, 0xad95,
+	0xad95, 0xad95, 0xad95, 0xad95, 0xad95, 0x00fe, 0x00ee, 0x00de,
 	0x00ce, 0x002e, 0x001e, 0x000e, 0x004e, 0x00fe, 0x009e, 0x00de,
-	0x080c, 0x0d7d, 0x080c, 0xb84f, 0x0028, 0x080c, 0xb934, 0x0010,
-	0x080c, 0xba2a, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e,
-	0x2c00, 0xa896, 0x000e, 0x080c, 0xaf52, 0x0530, 0xa804, 0xa80e,
+	0x080c, 0x0d7d, 0x080c, 0xb842, 0x0028, 0x080c, 0xb927, 0x0010,
+	0x080c, 0xba1d, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e,
+	0x2c00, 0xa896, 0x000e, 0x080c, 0xaf42, 0x0530, 0xa804, 0xa80e,
 	0x00a6, 0x2050, 0xb100, 0x00ae, 0x8006, 0x8006, 0x8007, 0x90bc,
 	0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xaacc, 0xabd0, 0xacd4,
-	0xadd8, 0x2031, 0x0000, 0x2041, 0x1298, 0x080c, 0xb112, 0x0160,
+	0xadd8, 0x2031, 0x0000, 0x2041, 0x12a3, 0x080c, 0xb103, 0x0160,
 	0x000e, 0x9005, 0x0120, 0x00fe, 0x009e, 0x00de, 0x0005, 0x00fe,
-	0x009e, 0x00de, 0x0804, 0xabed, 0x2001, 0x002c, 0x900e, 0x080c,
-	0xafb8, 0x0c70, 0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016, 0x0158,
+	0x009e, 0x00de, 0x0804, 0xabdf, 0x2001, 0x002c, 0x900e, 0x080c,
+	0xafa8, 0x0c70, 0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016, 0x0158,
 	0x91b2, 0x0047, 0x0a0c, 0x0d7d, 0x91b2, 0x0050, 0x1a0c, 0x0d7d,
-	0x9182, 0x0047, 0x0042, 0x080c, 0xaaa8, 0x0120, 0x9086, 0x0002,
-	0x0904, 0xad53, 0x0005, 0xae14, 0xae14, 0xae16, 0xae48, 0xae14,
-	0xae14, 0xae14, 0xae14, 0xae5b, 0x080c, 0x0d7d, 0x00d6, 0x0016,
+	0x9182, 0x0047, 0x0042, 0x080c, 0xaa9a, 0x0120, 0x9086, 0x0002,
+	0x0904, 0xad43, 0x0005, 0xae04, 0xae04, 0xae06, 0xae38, 0xae04,
+	0xae04, 0xae04, 0xae04, 0xae4b, 0x080c, 0x0d7d, 0x00d6, 0x0016,
 	0x0096, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc, 0x01c0,
 	0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, 0x9005, 0x0140, 0x2001,
-	0x0000, 0x900e, 0x080c, 0xafb8, 0x080c, 0xabed, 0x00a8, 0x6003,
+	0x0000, 0x900e, 0x080c, 0xafa8, 0x080c, 0xabdf, 0x00a8, 0x6003,
 	0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, 0xa8ae, 0xa8b2, 0x0c78,
 	0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, 0xa8ae, 0xa8a8, 0xa8b2,
 	0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, 0x001e, 0x00de, 0x0005,
-	0x080c, 0x963b, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xc838,
-	0x0120, 0xa87b, 0x0006, 0x080c, 0x6d80, 0x009e, 0x00de, 0x080c,
-	0xabed, 0x0804, 0x96a0, 0x080c, 0x963b, 0x080c, 0x31e7, 0x080c,
-	0xcf67, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xc838, 0x0120,
-	0xa87b, 0x0029, 0x080c, 0x6d80, 0x009e, 0x00de, 0x080c, 0xabed,
-	0x0804, 0x96a0, 0x9182, 0x0047, 0x0002, 0xae82, 0xae84, 0xae82,
-	0xae82, 0xae82, 0xae82, 0xae82, 0xae82, 0xae82, 0xae82, 0xae82,
-	0xae82, 0xae84, 0x080c, 0x0d7d, 0x00d6, 0x0096, 0x601f, 0x0000,
-	0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, 0x080c, 0x6d80,
-	0x009e, 0x00de, 0x0804, 0xabed, 0x0026, 0x0036, 0x0056, 0x0066,
+	0x080c, 0x9621, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xc832,
+	0x0120, 0xa87b, 0x0006, 0x080c, 0x6d7b, 0x009e, 0x00de, 0x080c,
+	0xabdf, 0x0804, 0x9684, 0x080c, 0x9621, 0x080c, 0x31ef, 0x080c,
+	0xcf66, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xc832, 0x0120,
+	0xa87b, 0x0029, 0x080c, 0x6d7b, 0x009e, 0x00de, 0x080c, 0xabdf,
+	0x0804, 0x9684, 0x9182, 0x0047, 0x0002, 0xae72, 0xae74, 0xae72,
+	0xae72, 0xae72, 0xae72, 0xae72, 0xae72, 0xae72, 0xae72, 0xae72,
+	0xae72, 0xae74, 0x080c, 0x0d7d, 0x00d6, 0x0096, 0x601f, 0x0000,
+	0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, 0x080c, 0x6d7b,
+	0x009e, 0x00de, 0x0804, 0xabdf, 0x0026, 0x0036, 0x0056, 0x0066,
 	0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, 0x103a, 0x000e, 0x090c,
 	0x0d7d, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e,
 	0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, 0x1800, 0x7990, 0x9188,
 	0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, 0x2950, 0x00a6, 0x2001,
 	0x0205, 0x2003, 0x0000, 0x901e, 0x2029, 0x0001, 0x9182, 0x0034,
-	0x1228, 0x2011, 0x001f, 0x080c, 0xc40b, 0x04c0, 0x2130, 0x2009,
-	0x0034, 0x2011, 0x001f, 0x080c, 0xc40b, 0x96b2, 0x0034, 0xb004,
+	0x1228, 0x2011, 0x001f, 0x080c, 0xc3f8, 0x04c0, 0x2130, 0x2009,
+	0x0034, 0x2011, 0x001f, 0x080c, 0xc3f8, 0x96b2, 0x0034, 0xb004,
 	0x904d, 0x0110, 0x080c, 0x0fec, 0x080c, 0x103a, 0x01d0, 0x8528,
 	0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d,
-	0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xc40b, 0x00b8, 0x96b2,
-	0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x080c, 0xc40b,
+	0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xc3f8, 0x00b8, 0x96b2,
+	0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x080c, 0xc3f8,
 	0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad,
 	0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, 0x0048, 0x2001, 0x0205,
 	0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566, 0x2a48,
-	0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6d80, 0x000e, 0x2048,
+	0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6d7b, 0x000e, 0x2048,
 	0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, 0x006e, 0x005e, 0x003e,
 	0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, 0x0006, 0x080c, 0x103a,
 	0x000e, 0x090c, 0x0d7d, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019,
@@ -5403,7 +5401,7 @@
 	0x1800, 0x7990, 0x810c, 0x9188, 0x000c, 0x9182, 0x001a, 0x0210,
 	0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, 0xac76, 0x2e98, 0xa85c,
 	0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080,
-	0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6d80, 0x009e, 0x00fe,
+	0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6d7b, 0x009e, 0x00fe,
 	0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, 0x0096, 0x0016, 0x2001,
 	0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x001e, 0x2079, 0x0200,
 	0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, 0x000c, 0x2098, 0x2021,
@@ -5415,1517 +5413,1521 @@
 	0x2400, 0x9202, 0x2410, 0x9318, 0x9006, 0x2020, 0x22a8, 0xa800,
 	0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, 0x83ff, 0x0180, 0x3300,
 	0x9086, 0x0280, 0x1130, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816,
-	0x2e98, 0x2310, 0x84ff, 0x0904, 0xaf67, 0x0804, 0xaf69, 0x9085,
+	0x2e98, 0x2310, 0x84ff, 0x0904, 0xaf57, 0x0804, 0xaf59, 0x9085,
 	0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, 0x00de, 0x001e, 0x0005,
 	0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x080c,
-	0x6d74, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015, 0x1118,
-	0x080c, 0xabed, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0d7d, 0x080c,
-	0xabed, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98, 0x6014,
+	0x6d6f, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015, 0x1118,
+	0x080c, 0xabdf, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0d7d, 0x080c,
+	0xabdf, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98, 0x6014,
 	0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x20a0, 0x009e, 0x4003,
-	0x0136, 0x9080, 0x001b, 0x2011, 0x0006, 0x20a9, 0x0001, 0x3418,
-	0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211, 0x1db8,
-	0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398, 0x4003,
-	0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c, 0xc838,
-	0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0x009e,
-	0x0804, 0xabed, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386, 0x0200,
-	0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8d7, 0x0000, 0x00be, 0x6014,
-	0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xab32,
-	0x080c, 0xabed, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011, 0x1d48,
-	0x0cc8, 0x0006, 0x0016, 0x080c, 0xcf52, 0x0188, 0x6014, 0x9005,
-	0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x604b, 0x0000, 0x2009,
-	0x0022, 0x080c, 0xb3f9, 0x9006, 0x001e, 0x000e, 0x0005, 0x9085,
-	0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80, 0x000c,
-	0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0001,
-	0x2099, 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a, 0xa804,
-	0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003,
-	0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9, 0x0020,
-	0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867,
-	0x0103, 0x080c, 0xabed, 0x001e, 0x009e, 0x0005, 0x0096, 0x0016,
-	0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084, 0x00ff,
-	0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004, 0x9108,
-	0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048, 0x080c,
-	0xc40b, 0x080c, 0xc838, 0x0140, 0x6014, 0x2048, 0xa807, 0x0000,
-	0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xabed, 0x001e, 0x009e,
-	0x0005, 0x0016, 0x2009, 0x0000, 0x7030, 0x9086, 0x0200, 0x0110,
-	0x2009, 0x0001, 0x0096, 0x6014, 0x904d, 0x090c, 0x0d7d, 0xa97a,
-	0x080c, 0x6d80, 0x009e, 0x080c, 0xabed, 0x001e, 0x0005, 0x0016,
-	0x0096, 0x7030, 0x9086, 0x0100, 0x1118, 0x2009, 0x0004, 0x0010,
-	0x7034, 0x800c, 0x810b, 0x2011, 0x000c, 0x2019, 0x000c, 0x6014,
-	0x2048, 0xa804, 0x0096, 0x9005, 0x0108, 0x2048, 0x080c, 0xc40b,
-	0x009e, 0x080c, 0xc838, 0x0148, 0xa804, 0x9005, 0x1158, 0xa807,
-	0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xabed, 0x009e,
-	0x001e, 0x0005, 0x0086, 0x2040, 0xa030, 0x8007, 0x9086, 0x0100,
-	0x1118, 0x080c, 0xb5b5, 0x00e0, 0xa034, 0x8007, 0x800c, 0x8806,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x000c,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xaaa0, 0xab9c,
-	0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x127e, 0x0019, 0x0d08,
-	0x008e, 0x0898, 0x0096, 0x0006, 0x080c, 0x103a, 0x000e, 0x01b0,
-	0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006, 0xae6a, 0x2800,
-	0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96, 0xad9a, 0x0086,
-	0x2940, 0x080c, 0x1124, 0x008e, 0x9085, 0x0001, 0x009e, 0x0005,
-	0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6,
-	0x2258, 0xba10, 0x00be, 0x9206, 0x1520, 0x700c, 0x6210, 0x00b6,
-	0x2258, 0xba14, 0x00be, 0x9206, 0x11e0, 0x604b, 0x0000, 0x2c68,
-	0x0016, 0x2009, 0x0035, 0x080c, 0xceca, 0x001e, 0x1158, 0x622c,
-	0x2268, 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003, 0x0130, 0x9386,
-	0x0006, 0x0128, 0x080c, 0xabed, 0x0020, 0x0039, 0x0010, 0x080c,
-	0xb22e, 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096, 0x6814, 0x2048,
-	0x9186, 0x0015, 0x0904, 0xb20d, 0x918e, 0x0016, 0x1904, 0xb22c,
-	0x700c, 0x908c, 0xff00, 0x9186, 0x1700, 0x0120, 0x9186, 0x0300,
-	0x1904, 0xb1e7, 0x89ff, 0x1138, 0x6800, 0x9086, 0x000f, 0x0904,
-	0xb1c9, 0x0804, 0xb22a, 0x6808, 0x9086, 0xffff, 0x1904, 0xb20f,
-	0xa87c, 0x9084, 0x0060, 0x9086, 0x0020, 0x1128, 0xa83c, 0xa940,
-	0x9105, 0x1904, 0xb20f, 0x6824, 0xd0b4, 0x1904, 0xb20f, 0x080c,
-	0xca27, 0x6864, 0xa882, 0xa87c, 0xc0dc, 0xc0f4, 0xc0d4, 0xa87e,
-	0x0026, 0x900e, 0x6a18, 0x2001, 0x000a, 0x080c, 0x9166, 0xa884,
-	0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff, 0x002e, 0x1138, 0x00c6,
-	0x2d60, 0x080c, 0xc55e, 0x00ce, 0x0804, 0xb22a, 0x00c6, 0xa868,
-	0xd0fc, 0x1118, 0x080c, 0x60bb, 0x0010, 0x080c, 0x64bf, 0x00ce,
-	0x1904, 0xb20f, 0x00c6, 0x2d60, 0x080c, 0xabed, 0x00ce, 0x0804,
-	0xb22a, 0x00c6, 0x080c, 0xac5f, 0x0198, 0x6017, 0x0000, 0x6810,
-	0x6012, 0x080c, 0xcccc, 0x6023, 0x0003, 0x6904, 0x00c6, 0x2d60,
-	0x080c, 0xabed, 0x00ce, 0x080c, 0xac8c, 0x00ce, 0x0804, 0xb22a,
-	0x2001, 0x1988, 0x2004, 0x684a, 0x00ce, 0x0804, 0xb22a, 0x7008,
-	0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900, 0xc1bc,
-	0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c, 0xcf0c,
-	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020,
-	0x080c, 0x921e, 0x00ce, 0x0430, 0x700c, 0x9086, 0x2a00, 0x1138,
-	0x2001, 0x1988, 0x2004, 0x684a, 0x00e8, 0x04c1, 0x00e8, 0x89ff,
-	0x090c, 0x0d7d, 0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103, 0xa87b,
-	0x0003, 0x080c, 0x6b96, 0x080c, 0xca27, 0x080c, 0xac28, 0x0026,
-	0x6010, 0x00b6, 0x2058, 0xba3c, 0x080c, 0x6750, 0x00be, 0x002e,
-	0x00de, 0x00ce, 0x080c, 0xabed, 0x009e, 0x0005, 0x9186, 0x0015,
-	0x1128, 0x2001, 0x1988, 0x2004, 0x684a, 0x0068, 0x918e, 0x0016,
-	0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c, 0xe524, 0x080c, 0x88c1,
-	0x080c, 0xabed, 0x00ce, 0x080c, 0xabed, 0x0005, 0x0026, 0x0036,
-	0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001, 0x1988,
-	0x2004, 0x684a, 0x0804, 0xb2a8, 0x00c6, 0x2d60, 0x080c, 0xc436,
-	0x00ce, 0x6804, 0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060,
-	0x6003, 0x0001, 0x6007, 0x0050, 0x2009, 0x8023, 0x080c, 0x921e,
-	0x00ce, 0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff, 0x090c,
-	0x0d7d, 0x6800, 0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac, 0x0178,
-	0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882, 0x2001,
-	0x0001, 0x6832, 0x0400, 0x2001, 0x0007, 0x6832, 0x00e0, 0xa87c,
-	0xd0b4, 0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48, 0xa838,
-	0xa934, 0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024, 0x9306,
-	0x1118, 0x7020, 0x9406, 0x0d38, 0x7020, 0x683e, 0x7024, 0x683a,
-	0x2001, 0x0005, 0x6832, 0x080c, 0xcbb6, 0x080c, 0x96a0, 0x0010,
-	0x080c, 0xabed, 0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6,
-	0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10,
-	0x00be, 0x9206, 0x1904, 0xb313, 0x700c, 0x6210, 0x00b6, 0x2258,
-	0xba14, 0x00be, 0x9206, 0x1904, 0xb313, 0x6038, 0x2068, 0x6824,
-	0xc0dc, 0x6826, 0x6a20, 0x9286, 0x0007, 0x0904, 0xb313, 0x9286,
-	0x0002, 0x0904, 0xb313, 0x9286, 0x0000, 0x05e8, 0x6808, 0x633c,
-	0x9306, 0x15c8, 0x2071, 0x026c, 0x9186, 0x0015, 0x0570, 0x918e,
-	0x0016, 0x1100, 0x00c6, 0x6038, 0x2060, 0x6104, 0x9186, 0x004b,
-	0x01c0, 0x9186, 0x004c, 0x01a8, 0x9186, 0x004d, 0x0190, 0x9186,
-	0x004e, 0x0178, 0x9186, 0x0052, 0x0160, 0x6014, 0x0096, 0x2048,
-	0x080c, 0xc838, 0x090c, 0x0d7d, 0xa87b, 0x0003, 0x009e, 0x080c,
-	0xcf0c, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009,
-	0x8020, 0x080c, 0x921e, 0x00ce, 0x0030, 0x6038, 0x2070, 0x2001,
-	0x1988, 0x2004, 0x704a, 0x080c, 0xabed, 0x002e, 0x00de, 0x00ee,
-	0x0005, 0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048, 0x6010, 0x2058,
-	0x91b6, 0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c, 0xbc02,
-	0x0460, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0010,
-	0x2019, 0x000a, 0x20a9, 0x0004, 0x080c, 0xbbc2, 0x002e, 0x003e,
-	0x015e, 0x009e, 0x1904, 0xb382, 0x0096, 0x0156, 0x0036, 0x0026,
-	0x2b48, 0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9, 0x0004, 0x080c,
-	0xbbc2, 0x002e, 0x003e, 0x015e, 0x009e, 0x15a0, 0x7238, 0xba0a,
-	0x733c, 0xbb0e, 0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005, 0x1128,
-	0x00fe, 0x009e, 0x00be, 0x0804, 0xaffd, 0x0096, 0x2048, 0xaa12,
-	0xab16, 0xac0a, 0x009e, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f,
-	0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c,
-	0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x127e, 0x080c, 0xb112,
-	0x0130, 0x00fe, 0x009e, 0x080c, 0xabed, 0x00be, 0x0005, 0x080c,
-	0xb5b5, 0x0cb8, 0x2b78, 0x00f6, 0x080c, 0x31e7, 0x080c, 0xcf67,
-	0x00fe, 0x00c6, 0x080c, 0xab97, 0x2f00, 0x6012, 0x6017, 0x0000,
-	0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007,
-	0x080c, 0x6575, 0x080c, 0x65a1, 0x080c, 0x9225, 0x080c, 0x96a0,
-	0x00ce, 0x0804, 0xb355, 0x2100, 0x91b2, 0x0053, 0x1a0c, 0x0d7d,
-	0x91b2, 0x0040, 0x1a04, 0xb40b, 0x0002, 0xb3f9, 0xb3f9, 0xb3ef,
-	0xb3f9, 0xb3f9, 0xb3f9, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed,
-	0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed,
-	0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed,
-	0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3f9, 0xb3ed, 0xb3f9, 0xb3f9,
-	0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ef, 0xb3ed, 0xb3ed,
-	0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3f9,
-	0xb3f9, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed, 0xb3ed,
-	0xb3ed, 0xb3ed, 0xb3f9, 0xb3ed, 0xb3ed, 0x080c, 0x0d7d, 0x0066,
-	0x00b6, 0x6610, 0x2658, 0xb8d4, 0xc08c, 0xb8d6, 0x00be, 0x006e,
-	0x0000, 0x6003, 0x0001, 0x6106, 0x9186, 0x0032, 0x0118, 0x080c,
-	0x9225, 0x0010, 0x080c, 0x921e, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x96a0, 0x012e, 0x0005, 0x2600, 0x0002, 0xb3f9, 0xb3f9, 0xb41f,
-	0xb3f9, 0xb3f9, 0xb41f, 0xb41f, 0xb41f, 0xb41f, 0xb3f9, 0xb41f,
-	0xb3f9, 0xb41f, 0xb3f9, 0xb41f, 0xb41f, 0xb41f, 0xb41f, 0x080c,
-	0x0d7d, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0d7d, 0x91b6, 0x0013,
-	0x0904, 0xb4f6, 0x91b6, 0x0027, 0x1904, 0xb4a2, 0x080c, 0x95de,
-	0x6004, 0x080c, 0xca3c, 0x01b0, 0x080c, 0xca4d, 0x01a8, 0x908e,
-	0x0021, 0x0904, 0xb49f, 0x908e, 0x0022, 0x1130, 0x080c, 0xb029,
-	0x0904, 0xb49b, 0x0804, 0xb49c, 0x908e, 0x003d, 0x0904, 0xb49f,
-	0x0804, 0xb495, 0x080c, 0x321c, 0x2001, 0x0007, 0x080c, 0x6575,
-	0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xb5b5, 0x9186,
-	0x007e, 0x1148, 0x2001, 0x1837, 0x2014, 0xc285, 0x080c, 0x74e9,
-	0x1108, 0xc2ad, 0x2202, 0x080c, 0xa896, 0x0036, 0x0026, 0x2019,
-	0x0028, 0x2110, 0x080c, 0xe630, 0x002e, 0x003e, 0x0016, 0x0026,
-	0x0036, 0x2110, 0x2019, 0x0028, 0x080c, 0x93a5, 0x0076, 0x903e,
-	0x080c, 0x9277, 0x6010, 0x00b6, 0x905d, 0x0100, 0x00be, 0x2c08,
-	0x080c, 0xdfeb, 0x007e, 0x003e, 0x002e, 0x001e, 0x080c, 0xa8b2,
-	0x080c, 0xcf67, 0x0016, 0x080c, 0xccc4, 0x080c, 0xabed, 0x001e,
-	0x080c, 0x32fc, 0x080c, 0x96a0, 0x0030, 0x080c, 0xccc4, 0x080c,
-	0xabed, 0x080c, 0x96a0, 0x0005, 0x080c, 0xb5b5, 0x0cb0, 0x080c,
-	0xb5f1, 0x0c98, 0x9186, 0x0015, 0x0118, 0x9186, 0x0016, 0x1140,
-	0x080c, 0xaaa8, 0x0d80, 0x9086, 0x0002, 0x0904, 0xb5fc, 0x0c58,
-	0x9186, 0x0014, 0x1d40, 0x080c, 0x95de, 0x6004, 0x908e, 0x0022,
-	0x1118, 0x080c, 0xb029, 0x09f8, 0x080c, 0x31e7, 0x080c, 0xcf67,
-	0x080c, 0xca3c, 0x1190, 0x080c, 0x321c, 0x6010, 0x00b6, 0x2058,
-	0xb9a0, 0x00be, 0x080c, 0xb5b5, 0x9186, 0x007e, 0x1128, 0x2001,
-	0x1837, 0x200c, 0xc185, 0x2102, 0x0800, 0x080c, 0xca4d, 0x1120,
-	0x080c, 0xb5b5, 0x0804, 0xb495, 0x6004, 0x908e, 0x0032, 0x1160,
-	0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c, 0x35a5,
-	0x00fe, 0x00ee, 0x0804, 0xb495, 0x6004, 0x908e, 0x0021, 0x0d40,
-	0x908e, 0x0022, 0x090c, 0xb5b5, 0x0804, 0xb495, 0x90b2, 0x0040,
-	0x1a04, 0xb595, 0x2008, 0x0002, 0xb53e, 0xb53f, 0xb542, 0xb545,
-	0xb548, 0xb54b, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c,
-	0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c,
-	0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c,
-	0xb53c, 0xb53c, 0xb54e, 0xb557, 0xb53c, 0xb558, 0xb557, 0xb53c,
-	0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb557, 0xb557, 0xb53c, 0xb53c,
-	0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb53c, 0xb580, 0xb557,
-	0xb53c, 0xb553, 0xb53c, 0xb53c, 0xb53c, 0xb554, 0xb53c, 0xb53c,
-	0xb53c, 0xb557, 0xb57b, 0xb53c, 0x080c, 0x0d7d, 0x00c0, 0x2001,
-	0x000b, 0x00e8, 0x2001, 0x0003, 0x00d0, 0x2001, 0x0005, 0x00b8,
-	0x2001, 0x0001, 0x00a0, 0x2001, 0x0009, 0x0088, 0x6003, 0x0005,
-	0x080c, 0x96a0, 0x0058, 0x0018, 0x0010, 0x080c, 0x6575, 0x04b8,
-	0x080c, 0xcf6a, 0x6003, 0x0004, 0x080c, 0x96a0, 0x0005, 0x080c,
-	0x6575, 0x6003, 0x0002, 0x0036, 0x2019, 0x1852, 0x2304, 0x9084,
-	0xff00, 0x1120, 0x2001, 0x1986, 0x201c, 0x0040, 0x8007, 0x909a,
-	0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x003e,
-	0x080c, 0x96a0, 0x0c18, 0x080c, 0xccc4, 0x080c, 0xabed, 0x08f0,
-	0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c, 0x35a5,
-	0x00fe, 0x00ee, 0x080c, 0x95de, 0x080c, 0xabed, 0x0878, 0x6003,
-	0x0002, 0x080c, 0xcf6a, 0x0804, 0x96a0, 0x2600, 0x2008, 0x0002,
-	0xb5ac, 0xb58f, 0xb5aa, 0xb58f, 0xb58f, 0xb5aa, 0xb5aa, 0xb5aa,
-	0xb5aa, 0xb58f, 0xb5aa, 0xb58f, 0xb5aa, 0xb58f, 0xb5aa, 0xb5aa,
-	0xb5aa, 0xb5aa, 0x080c, 0x0d7d, 0x0096, 0x6014, 0x2048, 0x080c,
-	0x6d80, 0x009e, 0x080c, 0xabed, 0x0005, 0x00e6, 0x0096, 0x0026,
-	0x0016, 0x080c, 0xc838, 0x0568, 0x6014, 0x2048, 0xa864, 0x9086,
-	0x0139, 0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c, 0x547b,
-	0x0130, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028, 0x2001,
-	0x0030, 0x900e, 0x2011, 0x4005, 0x080c, 0xce31, 0x0090, 0xa868,
-	0xd0fc, 0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e, 0x0021,
-	0x0168, 0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103, 0xa833,
-	0x0100, 0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, 0x0009,
-	0x0cc0, 0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103,
-	0xa823, 0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, 0xb804,
-	0x9084, 0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0d7d, 0x6604, 0x96b6,
-	0x004d, 0x1120, 0x080c, 0xcd50, 0x0804, 0xb681, 0x6604, 0x96b6,
-	0x0043, 0x1120, 0x080c, 0xcd99, 0x0804, 0xb681, 0x6604, 0x96b6,
-	0x004b, 0x1120, 0x080c, 0xcdc5, 0x0804, 0xb681, 0x6604, 0x96b6,
-	0x0033, 0x1120, 0x080c, 0xcce6, 0x0804, 0xb681, 0x6604, 0x96b6,
-	0x0028, 0x1120, 0x080c, 0xca86, 0x0804, 0xb681, 0x6604, 0x96b6,
-	0x0029, 0x1120, 0x080c, 0xcac7, 0x0804, 0xb681, 0x6604, 0x96b6,
-	0x001f, 0x1120, 0x080c, 0xafd2, 0x0804, 0xb681, 0x6604, 0x96b6,
-	0x0000, 0x1118, 0x080c, 0xb319, 0x04e0, 0x6604, 0x96b6, 0x0022,
-	0x1118, 0x080c, 0xb00a, 0x04a8, 0x6604, 0x96b6, 0x0035, 0x1118,
-	0x080c, 0xb130, 0x0470, 0x6604, 0x96b6, 0x0039, 0x1118, 0x080c,
-	0xb2ae, 0x0438, 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, 0xb042,
-	0x0400, 0x6604, 0x96b6, 0x0044, 0x1118, 0x080c, 0xb07e, 0x00c8,
-	0x6604, 0x96b6, 0x0049, 0x1118, 0x080c, 0xb0bf, 0x0090, 0x6604,
-	0x96b6, 0x0041, 0x1118, 0x080c, 0xb0a9, 0x0058, 0x91b6, 0x0015,
-	0x1110, 0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, 0x0804,
-	0xb8db, 0x00be, 0x0005, 0x080c, 0xaca9, 0x0cd8, 0xb69e, 0xb6a1,
-	0xb69e, 0xb6e8, 0xb69e, 0xb84f, 0xb8e8, 0xb69e, 0xb69e, 0xb8b1,
-	0xb69e, 0xb8c7, 0x0096, 0x601f, 0x0000, 0x6014, 0x2048, 0xa800,
-	0x2048, 0xa867, 0x0103, 0x009e, 0x0804, 0xabed, 0xa001, 0xa001,
-	0x0005, 0x00e6, 0x2071, 0x1800, 0x7090, 0x9086, 0x0074, 0x1540,
-	0x080c, 0xdfbc, 0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030, 0xd08c,
-	0x0128, 0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00f9, 0x00be,
-	0x2001, 0x0006, 0x080c, 0x6575, 0x080c, 0x321c, 0x080c, 0xabed,
-	0x0098, 0x2001, 0x000a, 0x080c, 0x6575, 0x080c, 0x321c, 0x6003,
-	0x0001, 0x6007, 0x0001, 0x080c, 0x9225, 0x080c, 0x96a0, 0x0020,
-	0x2001, 0x0001, 0x080c, 0xb81f, 0x00ee, 0x0005, 0x00d6, 0xb800,
-	0xd084, 0x0160, 0x9006, 0x080c, 0x6561, 0x2069, 0x1847, 0x6804,
-	0xd0a4, 0x0120, 0x2001, 0x0006, 0x080c, 0x65a1, 0x00de, 0x0005,
-	0x00b6, 0x0096, 0x00d6, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074,
-	0x1904, 0xb7f6, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e, 0x1120,
-	0x080c, 0xba35, 0x0804, 0xb75a, 0x080c, 0xba2a, 0x6010, 0x2058,
-	0xbaa0, 0x9286, 0x0080, 0x1510, 0x6014, 0x9005, 0x01a8, 0x2048,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000,
-	0x900e, 0x2011, 0x4000, 0x080c, 0xce31, 0x0030, 0xa807, 0x0000,
-	0xa867, 0x0103, 0xa833, 0x0200, 0x2001, 0x0006, 0x080c, 0x6575,
-	0x080c, 0x321c, 0x080c, 0xabed, 0x0804, 0xb7f9, 0x080c, 0xb807,
-	0x6014, 0x9005, 0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0039, 0x1d08, 0x2001, 0x0000, 0x900e,
-	0x2011, 0x4000, 0x080c, 0xce31, 0x08f8, 0x080c, 0xb7fd, 0x0160,
-	0x9006, 0x080c, 0x6561, 0x2001, 0x0004, 0x080c, 0x65a1, 0x2001,
-	0x0007, 0x080c, 0x6575, 0x08a0, 0x2001, 0x0004, 0x080c, 0x6575,
-	0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x9225, 0x080c, 0x96a0,
-	0x0804, 0xb7f9, 0xb85c, 0xd0e4, 0x01d8, 0x080c, 0xcc5e, 0x080c,
-	0x74e9, 0x0118, 0xd0dc, 0x1904, 0xb71c, 0x2011, 0x1837, 0x2204,
-	0xc0ad, 0x2012, 0x2001, 0x196d, 0x2004, 0x00f6, 0x2079, 0x0100,
-	0x78e3, 0x0000, 0x080c, 0x266f, 0x78e2, 0x00fe, 0x0804, 0xb71c,
-	0x080c, 0xcc9f, 0x2011, 0x1837, 0x2204, 0xc0a5, 0x2012, 0x0006,
-	0x080c, 0xe14c, 0x000e, 0x1904, 0xb71c, 0xc0b5, 0x2012, 0x2001,
-	0x0006, 0x080c, 0x6575, 0x9006, 0x080c, 0x6561, 0x00c6, 0x2001,
-	0x180f, 0x2004, 0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6,
-	0x2071, 0x1800, 0x700c, 0x9084, 0x00ff, 0x78e6, 0x707e, 0x7010,
-	0x78ea, 0x7082, 0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e,
-	0x00fe, 0x080c, 0x2644, 0x00f6, 0x2100, 0x900e, 0x080c, 0x25fb,
-	0x795e, 0x00fe, 0x9186, 0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8,
-	0x2009, 0x00ef, 0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932, 0x7936,
-	0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x2644, 0x00f6, 0x2079,
-	0x1800, 0x7982, 0x2100, 0x900e, 0x080c, 0x25fb, 0x795e, 0x00fe,
-	0x8108, 0x080c, 0x65c4, 0x2b00, 0x00ce, 0x1904, 0xb71c, 0x6012,
-	0x2009, 0x180f, 0x210c, 0xd19c, 0x0150, 0x2009, 0x027c, 0x210c,
-	0x918c, 0x00ff, 0xb912, 0x2009, 0x027d, 0x210c, 0xb916, 0x2001,
-	0x0002, 0x080c, 0x6575, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007,
-	0x0002, 0x080c, 0x9225, 0x080c, 0x96a0, 0x0018, 0x2001, 0x0001,
-	0x0431, 0x00de, 0x009e, 0x00be, 0x0005, 0x2001, 0x1810, 0x2004,
-	0xd0a4, 0x0120, 0x2001, 0x1848, 0x2004, 0xd0ac, 0x0005, 0x00e6,
-	0x080c, 0xe689, 0x0190, 0x2071, 0x0260, 0x7108, 0x720c, 0x918c,
-	0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, 0x6010, 0x2058, 0xb8a0,
-	0x9084, 0xff80, 0x1110, 0xb912, 0xba16, 0x00ee, 0x0005, 0x2030,
-	0x9005, 0x0158, 0x2001, 0x0007, 0x080c, 0x6575, 0x080c, 0x56ee,
-	0x1120, 0x2001, 0x0007, 0x080c, 0x65a1, 0x2600, 0x9005, 0x11b0,
-	0x6014, 0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc, 0x1178, 0x0036,
-	0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0004,
-	0x2011, 0x8014, 0x080c, 0x4b07, 0x004e, 0x003e, 0x080c, 0x321c,
-	0x6020, 0x9086, 0x000a, 0x1108, 0x0005, 0x0804, 0xabed, 0x00b6,
-	0x00e6, 0x0026, 0x0016, 0x2071, 0x1800, 0x7090, 0x9086, 0x0014,
-	0x1904, 0xb8a7, 0x080c, 0x56ee, 0x1170, 0x6014, 0x9005, 0x1158,
-	0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c,
-	0x4cbe, 0x004e, 0x003e, 0x00d6, 0x6010, 0x2058, 0x080c, 0x66c0,
-	0x080c, 0xb6d6, 0x00de, 0x080c, 0xbafb, 0x1588, 0x6010, 0x2058,
-	0xb890, 0x9005, 0x0560, 0x2001, 0x0006, 0x080c, 0x6575, 0x0096,
-	0x6014, 0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039,
-	0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xce31,
-	0x0060, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0029, 0x0130, 0xa807,
-	0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x009e, 0x080c, 0x321c,
-	0x6020, 0x9086, 0x000a, 0x0140, 0x080c, 0xabed, 0x0028, 0x080c,
-	0xb5b5, 0x9006, 0x080c, 0xb81f, 0x001e, 0x002e, 0x00ee, 0x00be,
-	0x0005, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014, 0x1160, 0x2001,
-	0x0002, 0x080c, 0x6575, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
-	0x9225, 0x0804, 0x96a0, 0x2001, 0x0001, 0x0804, 0xb81f, 0x2030,
-	0x2011, 0x1824, 0x2204, 0x9086, 0x0004, 0x1148, 0x96b6, 0x000b,
-	0x1120, 0x2001, 0x0007, 0x080c, 0x6575, 0x0804, 0xabed, 0x2001,
-	0x0001, 0x0804, 0xb81f, 0x0002, 0xb69e, 0xb8f3, 0xb69e, 0xb934,
-	0xb69e, 0xb9e1, 0xb8e8, 0xb69e, 0xb69e, 0xb9f5, 0xb69e, 0xba07,
-	0x6604, 0x9686, 0x0003, 0x0904, 0xb84f, 0x96b6, 0x001e, 0x1110,
-	0x080c, 0xabed, 0x0005, 0x00b6, 0x00d6, 0x00c6, 0x080c, 0xba19,
-	0x11a0, 0x9006, 0x080c, 0x6561, 0x080c, 0x31e7, 0x080c, 0xcf67,
-	0x2001, 0x0002, 0x080c, 0x6575, 0x6003, 0x0001, 0x6007, 0x0002,
-	0x080c, 0x9225, 0x080c, 0x96a0, 0x0418, 0x2009, 0x026e, 0x2104,
-	0x9086, 0x0009, 0x1160, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff,
-	0x9005, 0x0170, 0x8001, 0xb842, 0x601b, 0x000a, 0x0088, 0x2009,
-	0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x1900, 0x1108, 0x08a0,
-	0x080c, 0x31e7, 0x080c, 0xcf67, 0x2001, 0x0001, 0x080c, 0xb81f,
-	0x00ce, 0x00de, 0x00be, 0x0005, 0x0096, 0x00b6, 0x0026, 0x9016,
-	0x080c, 0xba27, 0x00d6, 0x2069, 0x197c, 0x2d04, 0x9005, 0x0168,
-	0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x2069, 0x1820,
-	0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, 0x00de, 0x0088, 0x9006,
-	0x080c, 0x6561, 0x2001, 0x0002, 0x080c, 0x6575, 0x6003, 0x0001,
-	0x6007, 0x0002, 0x080c, 0x9225, 0x080c, 0x96a0, 0x0804, 0xb9b1,
-	0x080c, 0xc838, 0x01b0, 0x6014, 0x2048, 0xa864, 0x2010, 0x9086,
-	0x0139, 0x1138, 0x6007, 0x0016, 0x2001, 0x0002, 0x080c, 0xce8b,
-	0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc, 0x0118, 0x2001, 0x0001,
-	0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc, 0x0148, 0x6010, 0x2058,
-	0xb840, 0x9084, 0x00ff, 0x9005, 0x1110, 0x9006, 0x0c38, 0x080c,
-	0xb5b5, 0x2009, 0x026e, 0x2134, 0x96b4, 0x00ff, 0x9686, 0x0005,
-	0x0520, 0x9686, 0x000b, 0x01c8, 0x2009, 0x026f, 0x2104, 0x9084,
-	0xff00, 0x1118, 0x9686, 0x0009, 0x01c0, 0x9086, 0x1900, 0x1168,
-	0x9686, 0x0009, 0x0190, 0x2001, 0x0004, 0x080c, 0x6575, 0x2001,
-	0x0028, 0x601a, 0x6007, 0x0052, 0x0020, 0x2001, 0x0001, 0x080c,
-	0xb81f, 0x002e, 0x00be, 0x009e, 0x0005, 0x9286, 0x0139, 0x0160,
-	0x6014, 0x2048, 0x080c, 0xc838, 0x0140, 0xa864, 0x9086, 0x0139,
-	0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c40, 0x6010, 0x2058, 0xb840,
-	0x9084, 0x00ff, 0x9005, 0x0138, 0x8001, 0xb842, 0x601b, 0x000a,
-	0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x00e6,
-	0x2071, 0x1800, 0x080c, 0x5fbc, 0x00ee, 0x0010, 0x080c, 0x31e7,
-	0x0860, 0x080c, 0xba27, 0x1160, 0x2001, 0x0004, 0x080c, 0x6575,
-	0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x9225, 0x0804, 0x96a0,
-	0x080c, 0xb5b5, 0x9006, 0x0804, 0xb81f, 0x0489, 0x1160, 0x2001,
-	0x0008, 0x080c, 0x6575, 0x6003, 0x0001, 0x6007, 0x0005, 0x080c,
-	0x9225, 0x0804, 0x96a0, 0x2001, 0x0001, 0x0804, 0xb81f, 0x00f9,
-	0x1160, 0x2001, 0x000a, 0x080c, 0x6575, 0x6003, 0x0001, 0x6007,
-	0x0001, 0x080c, 0x9225, 0x0804, 0x96a0, 0x2001, 0x0001, 0x0804,
-	0xb81f, 0x2009, 0x026e, 0x2104, 0x9086, 0x0003, 0x1138, 0x2009,
-	0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x2a00, 0x0005, 0x9085,
-	0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016, 0x6110, 0x2158, 0x080c,
-	0x6634, 0x001e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x00f6, 0x00e6,
-	0x00d6, 0x0036, 0x0016, 0x6010, 0x2058, 0x2009, 0x1837, 0x2104,
-	0x9085, 0x0003, 0x200a, 0x080c, 0xbacd, 0x0560, 0x2009, 0x1837,
-	0x2104, 0xc0cd, 0x200a, 0x080c, 0x6a67, 0x0158, 0x9006, 0x2020,
-	0x2009, 0x002a, 0x080c, 0xe2c9, 0x2001, 0x180c, 0x200c, 0xc195,
-	0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x080c, 0x31a6, 0x00e6,
-	0x2071, 0x1800, 0x080c, 0x2fb2, 0x00ee, 0x00c6, 0x0156, 0x20a9,
-	0x0781, 0x2009, 0x007f, 0x080c, 0x32fc, 0x8108, 0x1f04, 0xba6b,
-	0x015e, 0x00ce, 0x080c, 0xba2a, 0x2071, 0x0260, 0x2079, 0x0200,
-	0x7817, 0x0001, 0x2001, 0x1837, 0x200c, 0xc1c5, 0x7018, 0xd0fc,
-	0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc, 0x1108, 0xc1c4, 0x7817,
-	0x0000, 0x2001, 0x1837, 0x2102, 0x2079, 0x0100, 0x2e04, 0x9084,
-	0x00ff, 0x2069, 0x181f, 0x206a, 0x78e6, 0x0006, 0x8e70, 0x2e04,
-	0x2069, 0x1820, 0x206a, 0x78ea, 0x7832, 0x7836, 0x2010, 0x9084,
-	0xff00, 0x001e, 0x9105, 0x2009, 0x182c, 0x200a, 0x2200, 0x9084,
-	0x00ff, 0x2008, 0x080c, 0x2644, 0x080c, 0x74e9, 0x0170, 0x2071,
-	0x0260, 0x2069, 0x1982, 0x7048, 0x206a, 0x704c, 0x6806, 0x7050,
-	0x680a, 0x7054, 0x680e, 0x080c, 0xcc5e, 0x0040, 0x2001, 0x0006,
-	0x080c, 0x6575, 0x080c, 0x321c, 0x080c, 0xabed, 0x001e, 0x003e,
-	0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096, 0x0026, 0x0036,
-	0x00e6, 0x0156, 0x2019, 0x182c, 0x231c, 0x83ff, 0x01f0, 0x2071,
-	0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084, 0xff00, 0x9205,
-	0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48, 0x2019,
-	0x000a, 0x080c, 0xbbc2, 0x1148, 0x2011, 0x027a, 0x20a9, 0x0004,
-	0x2019, 0x0006, 0x080c, 0xbbc2, 0x1100, 0x015e, 0x00ee, 0x003e,
-	0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9086,
-	0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188, 0x703c, 0xd0ec,
-	0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138, 0x7054, 0xd0a4,
-	0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ee,
-	0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056, 0x0046, 0x0026,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19f3, 0x252c, 0x2021,
-	0x19fa, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7254, 0x7074,
-	0x9202, 0x1a04, 0xbb8e, 0x080c, 0x8b90, 0x0904, 0xbb87, 0x080c,
-	0xe2fa, 0x0904, 0xbb87, 0x6720, 0x9786, 0x0007, 0x0904, 0xbb87,
-	0x2500, 0x9c06, 0x0904, 0xbb87, 0x2400, 0x9c06, 0x0904, 0xbb87,
-	0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1590, 0x00c6, 0x6043, 0xffff,
-	0x6000, 0x9086, 0x0004, 0x1110, 0x080c, 0x1a6a, 0x9786, 0x000a,
-	0x0148, 0x080c, 0xca4d, 0x1130, 0x00ce, 0x080c, 0xb5b5, 0x080c,
-	0xac28, 0x00e8, 0x6014, 0x2048, 0x080c, 0xc838, 0x01a8, 0x9786,
-	0x0003, 0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096,
-	0xa878, 0x2048, 0x080c, 0x0fec, 0x009e, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0x6d74, 0x080c, 0xca27, 0x080c, 0xac28, 0x00ce, 0x9ce0,
-	0x001c, 0x7068, 0x9c02, 0x1210, 0x0804, 0xbb2e, 0x012e, 0x000e,
-	0x002e, 0x004e, 0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005,
-	0x9786, 0x0006, 0x1118, 0x080c, 0xe26c, 0x0c30, 0x9786, 0x0009,
-	0x1148, 0x6000, 0x9086, 0x0004, 0x0d08, 0x2009, 0x004c, 0x080c,
-	0xac8c, 0x08e0, 0x9786, 0x000a, 0x0938, 0x0820, 0x220c, 0x2304,
-	0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, 0xbbae, 0x9006, 0x0005,
-	0x2304, 0x9102, 0x0218, 0x2001, 0x0001, 0x0008, 0x9006, 0x918d,
-	0x0001, 0x0005, 0x0136, 0x01c6, 0x0016, 0x8906, 0x8006, 0x8007,
-	0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9300, 0x2098, 0x3518,
-	0x20a9, 0x0001, 0x220c, 0x4002, 0x910e, 0x1140, 0x8210, 0x8319,
-	0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x9102,
-	0x0218, 0x2001, 0x0001, 0x0010, 0x2001, 0x0000, 0x918d, 0x0001,
-	0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x810f, 0x2304, 0x9106,
-	0x1130, 0x8210, 0x8318, 0x1f04, 0xbbec, 0x9006, 0x0005, 0x918d,
-	0x0001, 0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d7d, 0x080c,
-	0xca3c, 0x0120, 0x080c, 0xca4d, 0x0158, 0x0028, 0x080c, 0x321c,
-	0x080c, 0xca4d, 0x0128, 0x080c, 0x95de, 0x080c, 0xabed, 0x0005,
-	0x080c, 0xb5b5, 0x0cc0, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040,
-	0x0208, 0x000a, 0x0005, 0xbc32, 0xbc32, 0xbc32, 0xbc32, 0xbc32,
-	0xbc32, 0xbc32, 0xbc32, 0xbc32, 0xbc32, 0xbc32, 0xbc34, 0xbc34,
-	0xbc34, 0xbc34, 0xbc32, 0xbc32, 0xbc32, 0xbc34, 0xbc32, 0xbc32,
-	0xbc32, 0xbc32, 0x080c, 0x0d7d, 0x600b, 0xffff, 0x6003, 0x000f,
-	0x6106, 0x0126, 0x2091, 0x8000, 0x080c, 0xcf6a, 0x2009, 0x8000,
-	0x080c, 0x921e, 0x012e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004,
-	0x9082, 0x0040, 0x0804, 0xbcb9, 0x9186, 0x0027, 0x1520, 0x080c,
-	0x95de, 0x080c, 0x31e7, 0x080c, 0xcf67, 0x0096, 0x6114, 0x2148,
-	0x080c, 0xc838, 0x0198, 0x080c, 0xca4d, 0x1118, 0x080c, 0xb5b5,
-	0x0068, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0xa97c,
-	0xc1c5, 0xa97e, 0x080c, 0x6d80, 0x080c, 0xca27, 0x009e, 0x080c,
-	0xabed, 0x0804, 0x96a0, 0x9186, 0x0014, 0x1120, 0x6004, 0x9082,
-	0x0040, 0x0018, 0x080c, 0x0d7d, 0x0005, 0x0002, 0xbc97, 0xbc95,
-	0xbc95, 0xbc95, 0xbc95, 0xbc95, 0xbc95, 0xbc95, 0xbc95, 0xbc95,
-	0xbc95, 0xbcb0, 0xbcb0, 0xbcb0, 0xbcb0, 0xbc95, 0xbcb0, 0xbc95,
-	0xbcb0, 0xbc95, 0xbc95, 0xbc95, 0xbc95, 0x080c, 0x0d7d, 0x080c,
-	0x95de, 0x0096, 0x6114, 0x2148, 0x080c, 0xc838, 0x0168, 0xa867,
-	0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ec, 0xa882,
-	0x080c, 0x6d80, 0x080c, 0xca27, 0x009e, 0x080c, 0xabed, 0x0005,
-	0x080c, 0x95de, 0x080c, 0xca4d, 0x090c, 0xb5b5, 0x080c, 0xabed,
-	0x0005, 0x0002, 0xbcd3, 0xbcd1, 0xbcd1, 0xbcd1, 0xbcd1, 0xbcd1,
-	0xbcd1, 0xbcd1, 0xbcd1, 0xbcd1, 0xbcd1, 0xbcd5, 0xbcd5, 0xbcd5,
-	0xbcd5, 0xbcd1, 0xbcd7, 0xbcd1, 0xbcd5, 0xbcd1, 0xbcd1, 0xbcd1,
-	0xbcd1, 0x080c, 0x0d7d, 0x080c, 0x0d7d, 0x080c, 0x0d7d, 0x080c,
-	0xabed, 0x0804, 0x96a0, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040,
-	0x0208, 0x000a, 0x0005, 0xbcfa, 0xbcfa, 0xbcfa, 0xbcfa, 0xbcfa,
-	0xbd33, 0xbe22, 0xbcfa, 0xbe2e, 0xbcfa, 0xbcfa, 0xbcfa, 0xbcfa,
-	0xbcfa, 0xbcfa, 0xbcfa, 0xbcfa, 0xbcfa, 0xbcfa, 0xbe2e, 0xbcfc,
-	0xbcfa, 0xbe2c, 0x080c, 0x0d7d, 0x00b6, 0x0096, 0x6114, 0x2148,
-	0x6010, 0x2058, 0xb800, 0xd0bc, 0x1508, 0xa87b, 0x0000, 0xa867,
-	0x0103, 0xa877, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xbeb3, 0x080c, 0x6b96, 0x6210, 0x2258, 0xba3c,
-	0x82ff, 0x0110, 0x8211, 0xba3e, 0xb8d0, 0x9005, 0x0110, 0x080c,
-	0x6750, 0x080c, 0xabed, 0x009e, 0x00be, 0x0005, 0xa87c, 0xd0ac,
-	0x09e0, 0xa838, 0xa934, 0x9105, 0x09c0, 0xa880, 0xd0bc, 0x19a8,
-	0x080c, 0xcb7d, 0x0c80, 0x00b6, 0x0096, 0x6114, 0x2148, 0x601c,
-	0xd0fc, 0x1110, 0x7644, 0x0008, 0x9036, 0x96b4, 0x0fff, 0x86ff,
-	0x1590, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xbe11, 0xa87b,
-	0x0000, 0xa867, 0x0103, 0xae76, 0xa87c, 0xd0ac, 0x0128, 0xa834,
-	0xa938, 0x9115, 0x190c, 0xbeb3, 0x080c, 0x6b96, 0x6210, 0x2258,
-	0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0xb8d0, 0x9005, 0x0110,
-	0x080c, 0x6750, 0x601c, 0xd0fc, 0x1148, 0x7044, 0xd0e4, 0x1904,
-	0xbdf5, 0x080c, 0xabed, 0x009e, 0x00be, 0x0005, 0x2009, 0x0211,
-	0x210c, 0x080c, 0x0d7d, 0x968c, 0x0c00, 0x0150, 0x6010, 0x2058,
-	0xb800, 0xd0bc, 0x1904, 0xbdf9, 0x7348, 0xab92, 0x734c, 0xab8e,
-	0x968c, 0x00ff, 0x9186, 0x0002, 0x0508, 0x9186, 0x0028, 0x1118,
-	0xa87b, 0x001c, 0x00e8, 0xd6dc, 0x01a0, 0xa87b, 0x0015, 0xa87c,
-	0xd0ac, 0x0170, 0xa938, 0xaa34, 0x2100, 0x9205, 0x0148, 0x7048,
-	0x9106, 0x1118, 0x704c, 0x9206, 0x0118, 0xa992, 0xaa8e, 0xc6dc,
-	0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000,
-	0xa867, 0x0103, 0xae76, 0x901e, 0xd6c4, 0x01d8, 0x9686, 0x0100,
-	0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4, 0x0804, 0xbd3f, 0x735c,
-	0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008,
-	0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xc40b,
-	0x003e, 0xd6cc, 0x0904, 0xbd54, 0x7154, 0xa98a, 0x81ff, 0x0904,
-	0xbd54, 0x9192, 0x0021, 0x1278, 0x8304, 0x9098, 0x0018, 0x2011,
-	0x0029, 0x080c, 0xc40b, 0x2011, 0x0205, 0x2013, 0x0000, 0x080c,
-	0xcef7, 0x0804, 0xbd54, 0xa868, 0xd0fc, 0x0120, 0x2009, 0x0020,
-	0xa98a, 0x0c50, 0x00a6, 0x2950, 0x080c, 0xc3aa, 0x00ae, 0x080c,
-	0xcef7, 0x080c, 0xc3fb, 0x0804, 0xbd56, 0x080c, 0xcb40, 0x0804,
-	0xbd6b, 0xa87c, 0xd0ac, 0x0904, 0xbd7c, 0xa880, 0xd0bc, 0x1904,
-	0xbd7c, 0x7348, 0xa838, 0x9306, 0x11c8, 0x734c, 0xa834, 0x931e,
-	0x0904, 0xbd7c, 0xd6d4, 0x0190, 0xab38, 0x9305, 0x0904, 0xbd7c,
-	0x0068, 0xa87c, 0xd0ac, 0x0904, 0xbd47, 0xa838, 0xa934, 0x9105,
-	0x0904, 0xbd47, 0xa880, 0xd0bc, 0x1904, 0xbd47, 0x080c, 0xcb7d,
-	0x0804, 0xbd6b, 0x00f6, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c,
-	0x7d08, 0x00fe, 0x0021, 0x0005, 0x0011, 0x0005, 0x0005, 0x0096,
-	0x6003, 0x0002, 0x6007, 0x0043, 0x6014, 0x2048, 0xa87c, 0xd0ac,
-	0x0128, 0x009e, 0x0005, 0x2130, 0x2228, 0x0058, 0x2400, 0xa9ac,
-	0x910a, 0x2300, 0xaab0, 0x9213, 0x2600, 0x9102, 0x2500, 0x9203,
-	0x0e90, 0xac46, 0xab4a, 0xae36, 0xad3a, 0x6044, 0xd0fc, 0x190c,
-	0xa8bf, 0x604b, 0x0000, 0x080c, 0x1c30, 0x1118, 0x6144, 0x080c,
-	0x924a, 0x009e, 0x0005, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040,
-	0x0208, 0x000a, 0x0005, 0xbe7a, 0xbe7a, 0xbe7a, 0xbe7a, 0xbe7a,
-	0xbe7a, 0xbe7a, 0xbe7a, 0xbe7a, 0xbe7a, 0xbe7c, 0xbe7a, 0xbe7a,
-	0xbe7a, 0xbe7a, 0xbe8d, 0xbe7a, 0xbe7a, 0xbe7a, 0xbe7a, 0xbeb1,
-	0xbe7a, 0xbe7a, 0x080c, 0x0d7d, 0x6004, 0x9086, 0x0040, 0x1110,
-	0x080c, 0x95de, 0x2019, 0x0001, 0x080c, 0xa118, 0x6003, 0x0002,
-	0x080c, 0xcf6f, 0x080c, 0x963b, 0x0005, 0x6004, 0x9086, 0x0040,
-	0x1110, 0x080c, 0x95de, 0x2019, 0x0001, 0x080c, 0xa118, 0x080c,
-	0x963b, 0x080c, 0x31e7, 0x080c, 0xcf67, 0x0096, 0x6114, 0x2148,
-	0x080c, 0xc838, 0x0150, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877,
-	0x0000, 0x080c, 0x6d80, 0x080c, 0xca27, 0x009e, 0x080c, 0xabed,
-	0x0005, 0x080c, 0x0d7d, 0xa87b, 0x0015, 0xd1fc, 0x0180, 0xa87b,
-	0x0007, 0x8002, 0x8000, 0x810a, 0x9189, 0x0000, 0x0006, 0x0016,
-	0x2009, 0x1a78, 0x2104, 0x8000, 0x200a, 0x001e, 0x000e, 0xa992,
-	0xa88e, 0x0005, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208,
-	0x000a, 0x0005, 0xbee9, 0xbee9, 0xbee9, 0xbee9, 0xbee9, 0xbeeb,
-	0xbee9, 0xbee9, 0xbfa8, 0xbee9, 0xbee9, 0xbee9, 0xbee9, 0xbee9,
-	0xbee9, 0xbee9, 0xbee9, 0xbee9, 0xbee9, 0xc0ec, 0xbee9, 0xc0f6,
-	0xbee9, 0x080c, 0x0d7d, 0x601c, 0xd0bc, 0x0178, 0xd084, 0x0168,
-	0xd0f4, 0x0120, 0xc084, 0x601e, 0x0804, 0xbcdb, 0x6114, 0x0096,
-	0x2148, 0xa87c, 0xc0e5, 0xa87e, 0x009e, 0x0076, 0x00a6, 0x00e6,
-	0x0096, 0x2071, 0x0260, 0x6114, 0x2150, 0x601c, 0xd0fc, 0x1110,
-	0x7644, 0x0008, 0x9036, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5,
-	0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211,
-	0xba3e, 0x00be, 0x86ff, 0x0904, 0xbfa1, 0x9694, 0xff00, 0x9284,
-	0x0c00, 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300,
-	0x0904, 0xbfa1, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118,
-	0xc6c4, 0xb676, 0x0c38, 0x080c, 0x103a, 0x090c, 0x0d7d, 0x2900,
-	0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e, 0xa867, 0x0103, 0xb068,
-	0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872, 0x7044, 0x9084, 0xf000,
-	0x9635, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, 0x734c,
-	0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, 0x0028,
-	0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015,
-	0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000,
-	0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190,
-	0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019,
-	0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c,
-	0xc40b, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8,
-	0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029,
-	0x080c, 0xc40b, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068,
-	0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c,
-	0xc3aa, 0x080c, 0x1a48, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005,
-	0x2001, 0x1988, 0x2004, 0x604a, 0x0096, 0x6114, 0x2148, 0xa83c,
-	0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc, 0xa87e, 0x6003, 0x0002,
-	0x080c, 0xcf78, 0x0904, 0xc0e7, 0x604b, 0x0000, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904, 0xc0a6,
-	0xa978, 0xa868, 0xd0fc, 0x0904, 0xc067, 0x0016, 0xa87c, 0x0006,
-	0xa880, 0x0006, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6,
-	0x0002, 0x0904, 0xc035, 0x9086, 0x0028, 0x1904, 0xc021, 0xa87b,
-	0x001c, 0xb07b, 0x001c, 0x0804, 0xc03d, 0x6024, 0xd0f4, 0x11d0,
-	0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838, 0xaa90, 0x9206, 0x1120,
-	0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024, 0xd0d4, 0x1148, 0xa9ac,
-	0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838, 0x9103, 0x603e, 0x6024,
-	0xc0f5, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb83c, 0x8000, 0xb83e,
-	0x00be, 0x601c, 0xc0fc, 0x601e, 0x9006, 0xa876, 0xa892, 0xa88e,
-	0xa87c, 0xc0e4, 0xa87e, 0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096,
-	0xa878, 0x2048, 0x080c, 0x0fec, 0x009e, 0x080c, 0xcb7d, 0x0804,
-	0xc0e7, 0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c,
-	0xce1a, 0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128,
-	0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128,
-	0xa834, 0xa938, 0x9115, 0x190c, 0xbeb3, 0xa87c, 0xb07e, 0xa890,
-	0xb092, 0xa88c, 0xb08e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019,
-	0x20a0, 0x20a9, 0x0020, 0x8a06, 0x8006, 0x8007, 0x9094, 0x003f,
-	0x22e0, 0x9084, 0xffc0, 0x9080, 0x0019, 0x2098, 0x4003, 0x00ae,
-	0x000e, 0xa882, 0x000e, 0xa87e, 0x080c, 0xcef7, 0x001e, 0xa874,
-	0x0006, 0x2148, 0x080c, 0x0fec, 0x001e, 0x0804, 0xc0d3, 0x0016,
-	0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0,
-	0x9086, 0x0028, 0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0,
-	0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xce1a,
-	0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b,
-	0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834,
-	0xa938, 0x9115, 0x190c, 0xbeb3, 0xa890, 0xb092, 0xa88c, 0xb08e,
-	0xa87c, 0xb07e, 0x00ae, 0x080c, 0x0fec, 0x009e, 0x080c, 0xcef7,
-	0xa974, 0x0016, 0x080c, 0xc3fb, 0x001e, 0x0468, 0xa867, 0x0103,
-	0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028,
-	0x1118, 0xa87b, 0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015,
-	0x080c, 0xce1a, 0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4,
-	0x0118, 0xa87b, 0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac,
-	0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbeb3, 0xa974, 0x0016,
-	0x080c, 0x6b96, 0x001e, 0x6010, 0x00b6, 0x2058, 0xba3c, 0x82ff,
-	0x0110, 0x8211, 0xba3e, 0xb8d0, 0x9005, 0x0120, 0x0016, 0x080c,
-	0x6750, 0x001e, 0x00be, 0xd1e4, 0x1120, 0x080c, 0xabed, 0x009e,
-	0x0005, 0x080c, 0xcb40, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c,
-	0x080c, 0xcf78, 0x190c, 0x1a56, 0x009e, 0x0005, 0x0096, 0x6114,
-	0x2148, 0xa83c, 0xa940, 0x9105, 0x01e8, 0xa877, 0x0000, 0xa87b,
-	0x0000, 0xa867, 0x0103, 0x00b6, 0x6010, 0x2058, 0xa834, 0xa938,
-	0x9115, 0x11a0, 0x080c, 0x6b96, 0xba3c, 0x8211, 0x0208, 0xba3e,
-	0xb8d0, 0x9005, 0x0110, 0x080c, 0x6750, 0x080c, 0xabed, 0x00be,
-	0x009e, 0x0005, 0xa87c, 0xc0dc, 0xa87e, 0x08f8, 0xb800, 0xd0bc,
-	0x1120, 0xa834, 0x080c, 0xbeb3, 0x0c28, 0xa880, 0xd0bc, 0x1dc8,
-	0x080c, 0xcb7d, 0x0c60, 0x080c, 0x95de, 0x0010, 0x080c, 0x963b,
-	0x601c, 0xd084, 0x0110, 0x080c, 0x1a6a, 0x080c, 0xc838, 0x01f0,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xca4d, 0x1118, 0x080c, 0xb5b5,
-	0x00a0, 0xa867, 0x0103, 0x2009, 0x180c, 0x210c, 0xd18c, 0x1198,
-	0xd184, 0x1170, 0x6108, 0xa97a, 0x918e, 0x0029, 0x1110, 0x080c,
-	0xe621, 0xa877, 0x0000, 0x080c, 0x6d80, 0x009e, 0x0804, 0xac28,
-	0xa87b, 0x0004, 0x0cb0, 0xa87b, 0x0004, 0x0c98, 0x9182, 0x0057,
-	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xc17d, 0xc17d,
-	0xc17d, 0xc17d, 0xc17d, 0xc17f, 0xc17d, 0xc17d, 0xc17d, 0xc17d,
-	0xc17d, 0xc17d, 0xc17d, 0xc17d, 0xc17d, 0xc17d, 0xc17d, 0xc17d,
-	0xc17d, 0xc17d, 0xc1a3, 0xc17d, 0xc17d, 0x080c, 0x0d7d, 0x080c,
-	0x56e2, 0x01f8, 0x6014, 0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4,
-	0x0118, 0x7264, 0x9294, 0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b,
-	0x0000, 0xa864, 0x9086, 0x0139, 0x0128, 0xa867, 0x0103, 0xa976,
-	0xaa96, 0x0030, 0xa897, 0x4000, 0xa99a, 0xaa9e, 0x080c, 0x6d80,
-	0x009e, 0x0804, 0xabed, 0x080c, 0x56e2, 0x0dd8, 0x6014, 0x900e,
-	0x9016, 0x0c10, 0x9182, 0x0085, 0x0002, 0xc1bc, 0xc1ba, 0xc1ba,
-	0xc1c8, 0xc1ba, 0xc1ba, 0xc1ba, 0xc1ba, 0xc1ba, 0xc1ba, 0xc1ba,
-	0xc1ba, 0xc1ba, 0x080c, 0x0d7d, 0x6003, 0x0001, 0x6106, 0x0126,
-	0x2091, 0x8000, 0x2009, 0x8020, 0x080c, 0x921e, 0x012e, 0x0005,
-	0x0026, 0x0056, 0x00d6, 0x00e6, 0x2071, 0x0260, 0x7224, 0x6216,
-	0x7220, 0x080c, 0xc826, 0x01a0, 0x2268, 0x6800, 0x9086, 0x0000,
-	0x0178, 0x6010, 0x6d10, 0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c,
-	0xc436, 0x00ce, 0x0128, 0x6803, 0x0002, 0x6007, 0x0086, 0x0010,
-	0x6007, 0x0087, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x921e,
-	0x9280, 0x0004, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140,
-	0x6824, 0xd0ec, 0x0128, 0x00c6, 0x2260, 0x080c, 0xcb7d, 0x00ce,
-	0x00ee, 0x00de, 0x005e, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160,
-	0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d7d, 0x908a, 0x0092, 0x1a0c,
-	0x0d7d, 0x9082, 0x0085, 0x00e2, 0x9186, 0x0027, 0x0120, 0x9186,
-	0x0014, 0x190c, 0x0d7d, 0x080c, 0x95de, 0x0096, 0x6014, 0x2048,
-	0x080c, 0xc838, 0x0140, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b,
-	0x0029, 0x080c, 0x6d80, 0x009e, 0x080c, 0xac28, 0x0804, 0x96a0,
-	0xc23d, 0xc23f, 0xc23f, 0xc23d, 0xc23d, 0xc23d, 0xc23d, 0xc23d,
-	0xc23d, 0xc23d, 0xc23d, 0xc23d, 0xc23d, 0x080c, 0x0d7d, 0x080c,
-	0xac28, 0x0005, 0x9186, 0x0013, 0x1130, 0x6004, 0x9082, 0x0085,
-	0x2008, 0x0804, 0xc28e, 0x9186, 0x0027, 0x1558, 0x080c, 0x95de,
-	0x080c, 0x31e7, 0x080c, 0xcf67, 0x0096, 0x6014, 0x2048, 0x080c,
-	0xc838, 0x0150, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029,
-	0x080c, 0x6d80, 0x080c, 0xca27, 0x009e, 0x080c, 0xabed, 0x0005,
-	0x9186, 0x0089, 0x0118, 0x9186, 0x008a, 0x1140, 0x080c, 0xaaa8,
-	0x0128, 0x9086, 0x000c, 0x0904, 0xc2c6, 0x0000, 0x080c, 0xaca9,
-	0x0c70, 0x9186, 0x0014, 0x1d60, 0x080c, 0x95de, 0x0096, 0x6014,
-	0x2048, 0x080c, 0xc838, 0x0d00, 0xa867, 0x0103, 0xa877, 0x0000,
-	0xa87b, 0x0006, 0xa880, 0xc0ec, 0xa882, 0x0890, 0x0002, 0xc29e,
-	0xc29c, 0xc29c, 0xc29c, 0xc29c, 0xc29c, 0xc2b2, 0xc29c, 0xc29c,
-	0xc29c, 0xc29c, 0xc29c, 0xc29c, 0x080c, 0x0d7d, 0x6034, 0x908c,
-	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
-	0x2001, 0x1986, 0x0010, 0x2001, 0x1987, 0x2004, 0x601a, 0x6003,
-	0x000c, 0x0005, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039,
-	0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1986, 0x0010, 0x2001,
-	0x1987, 0x2004, 0x601a, 0x6003, 0x000e, 0x0005, 0x9182, 0x0092,
-	0x1220, 0x9182, 0x0085, 0x0208, 0x0012, 0x0804, 0xaca9, 0xc2dc,
-	0xc2dc, 0xc2dc, 0xc2dc, 0xc2de, 0xc32b, 0xc2dc, 0xc2dc, 0xc2dc,
-	0xc2dc, 0xc2dc, 0xc2dc, 0xc2dc, 0x080c, 0x0d7d, 0x0096, 0x6010,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c,
-	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
-	0x009e, 0x0804, 0xc33f, 0x080c, 0xc838, 0x1118, 0x080c, 0xca27,
-	0x0068, 0x6014, 0x2048, 0x080c, 0xcf7e, 0x1110, 0x080c, 0xca27,
-	0xa867, 0x0103, 0x080c, 0xcf32, 0x080c, 0x6d80, 0x00d6, 0x2c68,
-	0x080c, 0xab97, 0x01d0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b,
-	0xffff, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c,
-	0x613e, 0x6910, 0x6112, 0x080c, 0xcccc, 0x695c, 0x615e, 0x6023,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x921e, 0x2d60, 0x00de, 0x080c,
-	0xabed, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x05a0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035,
-	0x0130, 0x9186, 0x001e, 0x0118, 0x9186, 0x0039, 0x1538, 0x00d6,
-	0x2c68, 0x080c, 0xceca, 0x11f0, 0x080c, 0xab97, 0x01d8, 0x6106,
-	0x6003, 0x0001, 0x6023, 0x0001, 0x6910, 0x6112, 0x692c, 0x612e,
-	0x6930, 0x6132, 0x6934, 0x918c, 0x00ff, 0x6136, 0x6938, 0x613a,
-	0x693c, 0x613e, 0x695c, 0x615e, 0x080c, 0xcccc, 0x2009, 0x8020,
-	0x080c, 0x921e, 0x2d60, 0x00de, 0x0804, 0xabed, 0x0096, 0x6014,
-	0x2048, 0x080c, 0xc838, 0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4,
-	0x0128, 0xc0ec, 0xa882, 0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118,
-	0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c, 0xcb3c, 0xa877,
-	0x0000, 0x080c, 0x6d80, 0x080c, 0xca27, 0x009e, 0x0804, 0xabed,
-	0x0016, 0x0096, 0x6014, 0x2048, 0x080c, 0xc838, 0x0140, 0xa867,
-	0x0103, 0xa87b, 0x0028, 0xa877, 0x0000, 0x080c, 0x6d80, 0x009e,
-	0x001e, 0x9186, 0x0013, 0x0158, 0x9186, 0x0014, 0x0130, 0x9186,
-	0x0027, 0x0118, 0x080c, 0xaca9, 0x0020, 0x080c, 0x95de, 0x080c,
-	0xac28, 0x0005, 0x0056, 0x0066, 0x0096, 0x00a6, 0x2029, 0x0001,
-	0x9182, 0x0101, 0x1208, 0x0010, 0x2009, 0x0100, 0x2130, 0x8304,
-	0x9098, 0x0018, 0x2009, 0x0020, 0x2011, 0x0029, 0x080c, 0xc40b,
-	0x96b2, 0x0020, 0xb004, 0x904d, 0x0110, 0x080c, 0x0fec, 0x080c,
-	0x103a, 0x0520, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920,
-	0xb406, 0x968a, 0x003d, 0x1228, 0x2608, 0x2011, 0x001b, 0x0499,
-	0x00a8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b,
-	0x0451, 0x0c28, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f,
-	0x95ad, 0x0003, 0xb566, 0x95ac, 0x0000, 0x0048, 0x2001, 0x0205,
-	0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x009e,
-	0x006e, 0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055,
-	0x0130, 0xa807, 0x0000, 0x080c, 0x6d80, 0x2a48, 0x0cb8, 0x080c,
-	0x6d80, 0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7814, 0x9085,
-	0x0080, 0x7816, 0xd184, 0x0108, 0x8108, 0x810c, 0x20a9, 0x0001,
-	0xa860, 0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300,
-	0x9e00, 0x2098, 0x4003, 0x8318, 0x9386, 0x0020, 0x1148, 0x2018,
-	0x2300, 0x9e00, 0x2098, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816,
-	0x8109, 0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005, 0x0066, 0x0126,
-	0x2091, 0x8000, 0x2031, 0x0001, 0x6020, 0x9084, 0x000f, 0x0083,
-	0x012e, 0x006e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031,
-	0x0000, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005,
-	0xc488, 0xc488, 0xc483, 0xc4ac, 0xc460, 0xc483, 0xc462, 0xc483,
-	0xc460, 0x90e4, 0xc483, 0xc483, 0xc483, 0xc460, 0xc460, 0xc460,
-	0x080c, 0x0d7d, 0x6010, 0x9080, 0x0000, 0x2004, 0xd0bc, 0x190c,
-	0xc4ac, 0x0036, 0x6014, 0x0096, 0x2048, 0xa880, 0x009e, 0xd0cc,
-	0x0118, 0x2019, 0x000c, 0x0038, 0xd094, 0x0118, 0x2019, 0x000d,
-	0x0010, 0x2019, 0x0010, 0x080c, 0xde1b, 0x6023, 0x0006, 0x6003,
-	0x0007, 0x003e, 0x0005, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005,
-	0x0096, 0x86ff, 0x11e8, 0x6014, 0x2048, 0x080c, 0xc838, 0x01d0,
-	0x6043, 0xffff, 0xa864, 0x9086, 0x0139, 0x1128, 0xa87b, 0x0005,
-	0xa883, 0x0000, 0x0028, 0x900e, 0x2001, 0x0005, 0x080c, 0x6fc0,
-	0x080c, 0xcb3c, 0x080c, 0x6d74, 0x080c, 0xac28, 0x9085, 0x0001,
-	0x009e, 0x0005, 0x9006, 0x0ce0, 0x080c, 0xa896, 0x080c, 0xcf8c,
-	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x002b, 0x0106, 0x080c,
-	0xa8b2, 0x010e, 0x0005, 0xc4cb, 0xc4f9, 0xc4cd, 0xc520, 0xc4f4,
-	0xc4cb, 0xc483, 0xc488, 0xc488, 0xc483, 0xc483, 0xc483, 0xc483,
-	0xc483, 0xc483, 0xc483, 0x080c, 0x0d7d, 0x86ff, 0x1510, 0x6020,
-	0x9086, 0x0006, 0x01f0, 0x0096, 0x6014, 0x2048, 0x080c, 0xc838,
-	0x0158, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c,
-	0x0fec, 0x009e, 0x080c, 0xcb3c, 0x009e, 0x080c, 0xcf0c, 0x6007,
-	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c,
-	0x9200, 0x9085, 0x0001, 0x0005, 0x0066, 0x080c, 0x1a6a, 0x006e,
-	0x08a0, 0x00e6, 0x2071, 0x19e7, 0x7030, 0x9c06, 0x1120, 0x080c,
-	0xa098, 0x00ee, 0x0850, 0x6020, 0x9084, 0x000f, 0x9086, 0x0006,
-	0x1150, 0x0086, 0x0096, 0x2049, 0x0001, 0x2c40, 0x080c, 0xa218,
-	0x009e, 0x008e, 0x0040, 0x0066, 0x080c, 0x9f94, 0x190c, 0x0d7d,
-	0x080c, 0x9fa2, 0x006e, 0x00ee, 0x1904, 0xc4cd, 0x0804, 0xc483,
-	0x0036, 0x00e6, 0x2071, 0x19e7, 0x704c, 0x9c06, 0x1138, 0x901e,
-	0x080c, 0xa118, 0x00ee, 0x003e, 0x0804, 0xc4cd, 0x080c, 0xa34e,
-	0x00ee, 0x003e, 0x1904, 0xc4cd, 0x0804, 0xc483, 0x00c6, 0x0066,
-	0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x00ce, 0x0005, 0xc556,
-	0xc618, 0xc77f, 0xc55e, 0xac28, 0xc556, 0xde0d, 0xcf74, 0xc618,
-	0x90ab, 0xc7fe, 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0x080c,
-	0x0d7d, 0x080c, 0xca4d, 0x1110, 0x080c, 0xb5b5, 0x0005, 0x080c,
-	0x95de, 0x0804, 0xabed, 0x601b, 0x0001, 0x0005, 0x080c, 0xc838,
-	0x0130, 0x6014, 0x0096, 0x2048, 0x2c00, 0xa896, 0x009e, 0x080c,
-	0xa896, 0x080c, 0xcf8c, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d,
-	0x0013, 0x0804, 0xa8b2, 0xc583, 0xc585, 0xc5af, 0xc5c3, 0xc5ee,
-	0xc583, 0xc556, 0xc556, 0xc556, 0xc5ca, 0xc5ca, 0xc583, 0xc583,
-	0xc583, 0xc583, 0xc5d4, 0x080c, 0x0d7d, 0x00e6, 0x6014, 0x0096,
-	0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x2071, 0x19e7, 0x7030,
-	0x9c06, 0x01d0, 0x0066, 0x080c, 0x9f94, 0x190c, 0x0d7d, 0x080c,
-	0x9fa2, 0x006e, 0x080c, 0xcf0c, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0002, 0x2001, 0x1987, 0x2004, 0x601a, 0x2009, 0x8020,
-	0x080c, 0x9200, 0x00ee, 0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096,
-	0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x080c, 0xcf0c,
-	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020,
-	0x080c, 0x9200, 0x0005, 0x080c, 0xa896, 0x080c, 0xaa2a, 0x080c,
-	0xa8b2, 0x0c28, 0x0096, 0x601b, 0x0001, 0x6014, 0x2048, 0xa880,
-	0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c, 0x56e2, 0x01a8, 0x6014,
-	0x0096, 0x904d, 0x0180, 0xa864, 0xa867, 0x0103, 0xa87b, 0x0006,
-	0x9086, 0x0139, 0x1140, 0xa867, 0x0139, 0xa897, 0x4005, 0xa89b,
-	0x0004, 0x080c, 0x6d80, 0x009e, 0x0804, 0xabed, 0x6014, 0x0096,
-	0x904d, 0x0508, 0x080c, 0xcf78, 0x01f0, 0x080c, 0xa8b2, 0x2001,
-	0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884, 0x009e,
-	0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001, 0x0037, 0x2c08,
-	0x080c, 0x1679, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048,
-	0x080c, 0xac8c, 0x0005, 0x009e, 0x080c, 0x1a6a, 0x0804, 0xc5af,
-	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x000b, 0x0005, 0xc62f,
-	0xc55b, 0xc631, 0xc62f, 0xc631, 0xc631, 0xc557, 0xc62f, 0xc551,
-	0xc551, 0xc62f, 0xc62f, 0xc62f, 0xc62f, 0xc62f, 0xc62f, 0x080c,
-	0x0d7d, 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084, 0x00ff, 0x00be,
-	0x908a, 0x000c, 0x1a0c, 0x0d7d, 0x00b6, 0x0013, 0x00be, 0x0005,
-	0xc64c, 0xc719, 0xc64e, 0xc68e, 0xc64e, 0xc68e, 0xc64e, 0xc65c,
-	0xc64c, 0xc68e, 0xc64c, 0xc67d, 0x080c, 0x0d7d, 0x6004, 0x908e,
-	0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e, 0x0002, 0x0590,
-	0x908e, 0x0052, 0x0904, 0xc715, 0x6004, 0x080c, 0xca4d, 0x0904,
-	0xc732, 0x908e, 0x0004, 0x1110, 0x080c, 0x321c, 0x908e, 0x0021,
-	0x0904, 0xc736, 0x908e, 0x0022, 0x0904, 0xc77a, 0x908e, 0x003d,
-	0x0904, 0xc736, 0x908e, 0x0039, 0x0904, 0xc73a, 0x908e, 0x0035,
-	0x0904, 0xc73a, 0x908e, 0x001e, 0x0178, 0x908e, 0x0001, 0x1140,
-	0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0110,
-	0x080c, 0x31e7, 0x080c, 0xb5b5, 0x0804, 0xac28, 0x00c6, 0x00d6,
-	0x6104, 0x9186, 0x0016, 0x0904, 0xc706, 0x9186, 0x0002, 0x1904,
-	0xc6db, 0x2001, 0x1837, 0x2004, 0xd08c, 0x11c8, 0x080c, 0x74e9,
-	0x11b0, 0x080c, 0xcf52, 0x0138, 0x080c, 0x750c, 0x1120, 0x080c,
-	0x73f4, 0x0804, 0xc763, 0x2001, 0x197d, 0x2003, 0x0001, 0x2001,
-	0x1800, 0x2003, 0x0001, 0x080c, 0x741a, 0x0804, 0xc763, 0x6010,
-	0x2058, 0x2001, 0x1837, 0x2004, 0xd0ac, 0x1904, 0xc763, 0xb8a0,
-	0x9084, 0xff80, 0x1904, 0xc763, 0xb840, 0x9084, 0x00ff, 0x9005,
-	0x0190, 0x8001, 0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b,
-	0x0398, 0x604b, 0x0000, 0x080c, 0xab97, 0x0128, 0x2b00, 0x6012,
-	0x6023, 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002,
-	0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009,
-	0x1837, 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c,
-	0x5fbc, 0x00ee, 0x080c, 0xb5b5, 0x0030, 0x080c, 0xb5b5, 0x080c,
-	0x31e7, 0x080c, 0xcf67, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x321c, 0x012e, 0x00ee, 0x080c, 0xac28, 0x0005, 0x2001, 0x0002,
-	0x080c, 0x6575, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9225,
-	0x080c, 0x96a0, 0x00de, 0x00ce, 0x0c80, 0x080c, 0x321c, 0x0804,
-	0xc68a, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010,
-	0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904, 0xc6db, 0x8001,
-	0xb842, 0x6003, 0x0001, 0x080c, 0x9225, 0x080c, 0x96a0, 0x00de,
-	0x00ce, 0x0898, 0x080c, 0xb5b5, 0x0804, 0xc68c, 0x080c, 0xb5f1,
-	0x0804, 0xc68c, 0x00d6, 0x2c68, 0x6104, 0x080c, 0xceca, 0x00de,
-	0x0118, 0x080c, 0xabed, 0x00f0, 0x6004, 0x8007, 0x6134, 0x918c,
-	0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0002, 0x603c, 0x600a, 0x2001, 0x1987, 0x2004, 0x601a, 0x602c,
-	0x2c08, 0x2060, 0x6024, 0xc0b5, 0x6026, 0x2160, 0x2009, 0x8020,
-	0x080c, 0x921e, 0x0005, 0x00de, 0x00ce, 0x080c, 0xb5b5, 0x080c,
-	0x31e7, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x321c, 0x6017,
-	0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x604b, 0x0000, 0x012e,
-	0x00ee, 0x0005, 0x080c, 0xb029, 0x1904, 0xc732, 0x0005, 0x6000,
-	0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0096, 0x00d6, 0x001b, 0x00de,
-	0x009e, 0x0005, 0xc79a, 0xc79a, 0xc79a, 0xc79a, 0xc79a, 0xc79a,
-	0xc79a, 0xc79a, 0xc79a, 0xc556, 0xc79a, 0xc55b, 0xc79c, 0xc55b,
-	0xc7a9, 0xc79a, 0x080c, 0x0d7d, 0x6004, 0x9086, 0x008b, 0x0148,
-	0x6007, 0x008b, 0x6003, 0x000d, 0x2009, 0x8020, 0x080c, 0x921e,
-	0x0005, 0x080c, 0xcf46, 0x0118, 0x080c, 0xcf59, 0x0010, 0x080c,
-	0xcf67, 0x080c, 0xca27, 0x080c, 0xc838, 0x0570, 0x080c, 0x31e7,
-	0x080c, 0xc838, 0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b,
-	0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x6d80,
-	0x2c68, 0x080c, 0xab97, 0x0150, 0x6810, 0x6012, 0x080c, 0xcccc,
-	0x00c6, 0x2d60, 0x080c, 0xac28, 0x00ce, 0x0008, 0x2d60, 0x6017,
-	0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
-	0x9225, 0x080c, 0x96a0, 0x00c8, 0x080c, 0xcf46, 0x0138, 0x6034,
-	0x9086, 0x4000, 0x1118, 0x080c, 0x31e7, 0x08d0, 0x6034, 0x908c,
-	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
-	0x080c, 0x31e7, 0x0868, 0x080c, 0xac28, 0x0005, 0x6000, 0x908a,
-	0x0016, 0x1a0c, 0x0d7d, 0x0002, 0xc814, 0xc814, 0xc816, 0xc816,
-	0xc816, 0xc814, 0xc814, 0xac28, 0xc814, 0xc814, 0xc814, 0xc814,
-	0xc814, 0xc814, 0xc814, 0xc814, 0x080c, 0x0d7d, 0x080c, 0xa896,
-	0x080c, 0xaa2a, 0x080c, 0xa8b2, 0x6114, 0x0096, 0x2148, 0xa87b,
-	0x0006, 0x080c, 0x6d80, 0x009e, 0x0804, 0xabed, 0x9284, 0x0003,
-	0x1158, 0x9282, 0x1ddc, 0x0240, 0x2001, 0x181a, 0x2004, 0x9202,
-	0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x0096, 0x0028,
-	0x0096, 0x0006, 0x6014, 0x2048, 0x000e, 0x0006, 0x9984, 0xf000,
-	0x9086, 0xf000, 0x0110, 0x080c, 0x10e5, 0x000e, 0x009e, 0x0005,
-	0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, 0x2091, 0x8000, 0x2061,
-	0x1ddc, 0x2071, 0x1800, 0x7354, 0x7074, 0x9302, 0x1640, 0x6020,
-	0x9206, 0x11f8, 0x080c, 0xcf52, 0x0180, 0x9286, 0x0001, 0x1168,
-	0x6004, 0x9086, 0x0004, 0x1148, 0x080c, 0x31e7, 0x080c, 0xcf67,
-	0x00c6, 0x080c, 0xac28, 0x00ce, 0x0060, 0x080c, 0xcc3e, 0x0148,
-	0x080c, 0xca4d, 0x1110, 0x080c, 0xb5b5, 0x00c6, 0x080c, 0xabed,
-	0x00ce, 0x9ce0, 0x001c, 0x7068, 0x9c02, 0x1208, 0x08a0, 0x012e,
-	0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016,
-	0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, 0x2061, 0x1b32, 0x6112,
-	0x080c, 0x31e7, 0x9006, 0x0010, 0x9085, 0x0001, 0x001e, 0x00ce,
-	0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xab97,
-	0x01b0, 0x665e, 0x2b00, 0x6012, 0x080c, 0x56e2, 0x0118, 0x080c,
-	0xc969, 0x0168, 0x080c, 0xcccc, 0x6023, 0x0003, 0x2009, 0x004b,
-	0x080c, 0xac8c, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006,
-	0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0, 0x080c, 0xac5f,
-	0x0580, 0x605f, 0x0000, 0x2b00, 0x6012, 0x080c, 0xcccc, 0x6023,
-	0x0003, 0x0016, 0x080c, 0xa896, 0x080c, 0x93a5, 0x0076, 0x903e,
-	0x080c, 0x9277, 0x2c08, 0x080c, 0xdfeb, 0x007e, 0x080c, 0xa8b2,
-	0x001e, 0xd184, 0x0128, 0x080c, 0xabed, 0x9085, 0x0001, 0x0070,
-	0x080c, 0x56e2, 0x0128, 0xd18c, 0x1170, 0x080c, 0xc969, 0x0148,
-	0x2009, 0x004c, 0x080c, 0xac8c, 0x9085, 0x0001, 0x012e, 0x00ce,
-	0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90, 0x2009, 0x004d,
-	0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046, 0x0016, 0x080c,
-	0xab97, 0x2c78, 0x0590, 0x7e5e, 0x2b00, 0x7812, 0x7823, 0x0003,
-	0x2021, 0x0005, 0x080c, 0xc97b, 0x9186, 0x004d, 0x0118, 0x9186,
-	0x004e, 0x0148, 0x2001, 0x1980, 0x200c, 0xd1fc, 0x0168, 0x2f60,
-	0x080c, 0xabed, 0x00d0, 0x2001, 0x197f, 0x200c, 0xd1fc, 0x0120,
-	0x2f60, 0x080c, 0xabed, 0x0088, 0x2f60, 0x080c, 0x56e2, 0x0138,
-	0xd18c, 0x1118, 0x04f1, 0x0148, 0x0010, 0x2900, 0x7816, 0x001e,
-	0x0016, 0x080c, 0xac8c, 0x9085, 0x0001, 0x001e, 0x004e, 0x00ce,
-	0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046, 0x080c, 0xab97, 0x2c78,
-	0x0508, 0x7e5e, 0x2b00, 0x7812, 0x7823, 0x0003, 0x0096, 0x2021,
-	0x0004, 0x0489, 0x009e, 0x2001, 0x197e, 0x200c, 0xd1fc, 0x0120,
-	0x2f60, 0x080c, 0xabed, 0x0060, 0x2f60, 0x080c, 0x56e2, 0x0120,
-	0xd18c, 0x1160, 0x0071, 0x0130, 0x2009, 0x0052, 0x080c, 0xac8c,
-	0x9085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816,
-	0x0c98, 0x00c6, 0x080c, 0x4aa7, 0x00ce, 0x1120, 0x080c, 0xabed,
-	0x9006, 0x0005, 0xa867, 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016,
-	0x9085, 0x0001, 0x0005, 0x0096, 0x0076, 0x0126, 0x2091, 0x8000,
-	0x080c, 0xa896, 0x080c, 0x6804, 0x0158, 0x2001, 0xc982, 0x0006,
-	0x900e, 0x2400, 0x080c, 0x6fc0, 0x080c, 0x6d80, 0x000e, 0x0807,
-	0x2418, 0x080c, 0x95a4, 0xbaa0, 0x0086, 0x2041, 0x0001, 0x2039,
-	0x0001, 0x2608, 0x080c, 0x93bf, 0x008e, 0x080c, 0x9277, 0x2f08,
-	0x2648, 0x080c, 0xdfeb, 0xb93c, 0x81ff, 0x090c, 0x9496, 0x080c,
-	0xa8b2, 0x012e, 0x007e, 0x009e, 0x0005, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x080c, 0xab97, 0x0190, 0x660a, 0x2b08, 0x6112, 0x080c,
-	0xcccc, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x001f, 0x080c,
-	0xac8c, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xac5f, 0x01b8, 0x660a,
-	0x2b08, 0x6112, 0x080c, 0xcccc, 0x6023, 0x0008, 0x2900, 0x6016,
-	0x00f6, 0x2c78, 0x080c, 0x1731, 0x00fe, 0x2009, 0x0021, 0x080c,
-	0xac8c, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x2009, 0x003d, 0x00c6, 0x0126, 0x0016, 0x2091, 0x8000, 0x080c,
-	0xab97, 0x0198, 0x660a, 0x2b08, 0x6112, 0x080c, 0xcccc, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x001e, 0x0016, 0x080c, 0xac8c, 0x9085,
-	0x0001, 0x001e, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd0, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x080c, 0xac5f, 0x0188, 0x2b08, 0x6112,
-	0x080c, 0xcccc, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0000,
-	0x080c, 0xac8c, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006,
-	0x0cd8, 0x2009, 0x0044, 0x0830, 0x2009, 0x0049, 0x0818, 0x0026,
-	0x00b6, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0118, 0x8211, 0xba3e,
-	0x1140, 0xb8d0, 0x9005, 0x0128, 0xb888, 0x9005, 0x1110, 0xb88b,
-	0x0001, 0x00be, 0x002e, 0x0005, 0x0006, 0x0016, 0x6004, 0x908e,
-	0x0002, 0x0140, 0x908e, 0x0003, 0x0128, 0x908e, 0x0004, 0x0110,
-	0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0096, 0x6020,
-	0x9086, 0x0004, 0x0190, 0x6014, 0x904d, 0x080c, 0xc838, 0x0168,
-	0xa864, 0x9086, 0x0139, 0x0158, 0x6020, 0x9086, 0x0003, 0x0128,
-	0xa868, 0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e,
-	0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xac5f,
-	0x0198, 0x2b08, 0x6112, 0x080c, 0xcccc, 0x6023, 0x0001, 0x2900,
-	0x6016, 0x080c, 0x31e7, 0x2009, 0x0028, 0x080c, 0xac8c, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015,
-	0x11a8, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6,
-	0x080c, 0xb807, 0x00be, 0x080c, 0xba2a, 0x6003, 0x0001, 0x6007,
-	0x0029, 0x080c, 0x9225, 0x080c, 0x96a0, 0x0078, 0x6014, 0x0096,
-	0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c,
-	0xce8b, 0x080c, 0xb5b5, 0x080c, 0xabed, 0x0005, 0x0096, 0x6014,
-	0x904d, 0x090c, 0x0d7d, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897,
-	0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6d80, 0x012e, 0x009e, 0x080c, 0xabed, 0x0c30, 0x0096,
-	0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x6575, 0x00e8,
-	0x9186, 0x0015, 0x1510, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014,
-	0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x66c0, 0x00be, 0x080c,
-	0xbafb, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005,
-	0x0160, 0x2001, 0x0006, 0x080c, 0x6575, 0x6014, 0x2048, 0xa868,
-	0xd0fc, 0x0170, 0x080c, 0xaffd, 0x0048, 0x6014, 0x2048, 0xa868,
-	0xd0fc, 0x0528, 0x080c, 0xb5b5, 0x080c, 0xabed, 0x009e, 0x0005,
-	0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0d7d, 0xa87b, 0x0000,
-	0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x6914, 0x1108,
-	0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x6d80, 0x012e, 0x080c, 0xabed, 0x08f8, 0x6014,
-	0x904d, 0x090c, 0x0d7d, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897,
-	0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6d80, 0x012e, 0x080c, 0xabed, 0x0840, 0xa878, 0x9086,
-	0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005,
-	0x604b, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050,
-	0x2009, 0x8023, 0x080c, 0x921e, 0x0005, 0x00c6, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0130, 0x0066, 0x6020, 0x9084,
-	0x000f, 0x001b, 0x006e, 0x00ce, 0x0005, 0xc556, 0xcb6f, 0xcb6f,
-	0xcb72, 0xe318, 0xe333, 0xe336, 0xc556, 0xc556, 0xc556, 0xc556,
-	0xc556, 0xc556, 0xc556, 0xc556, 0xc556, 0x080c, 0x0d7d, 0xa001,
-	0xa001, 0x0005, 0x0096, 0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4,
-	0x1110, 0x009e, 0x0010, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x0550, 0x2001, 0x1834, 0x2004, 0x9005,
-	0x1540, 0x00f6, 0x2c78, 0x080c, 0xab97, 0x0508, 0x7810, 0x6012,
-	0x080c, 0xcccc, 0x7820, 0x9086, 0x0003, 0x0128, 0x7808, 0x603a,
-	0x2f00, 0x603e, 0x0020, 0x7808, 0x603e, 0x2f00, 0x603a, 0x602e,
-	0x6023, 0x0001, 0x6007, 0x0035, 0x6003, 0x0001, 0x795c, 0x615e,
-	0x2009, 0x8020, 0x080c, 0x921e, 0x2f60, 0x00fe, 0x0005, 0x2f60,
-	0x00fe, 0x2001, 0x1988, 0x2004, 0x604a, 0x0005, 0x0016, 0x0096,
-	0x6814, 0x2048, 0x681c, 0xd0fc, 0xc0fc, 0x681e, 0xa87c, 0x1108,
-	0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000,
-	0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048,
-	0x080c, 0x0fec, 0x6830, 0x6036, 0x908e, 0x0001, 0x0148, 0x6803,
-	0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0,
-	0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085,
-	0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0,
-	0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc,
-	0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112,
-	0x695c, 0x615e, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001,
-	0x2009, 0x8020, 0x080c, 0x921e, 0x009e, 0x001e, 0x0005, 0x6024,
-	0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303,
-	0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a,
-	0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402,
-	0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024,
-	0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a,
-	0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016,
-	0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e,
-	0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158,
-	0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b,
-	0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016,
-	0x0026, 0x0036, 0x00e6, 0x2001, 0x1982, 0x200c, 0x8000, 0x2014,
-	0x2001, 0x0032, 0x080c, 0x9166, 0x2001, 0x1986, 0x82ff, 0x1110,
-	0x2011, 0x0014, 0x2202, 0x2001, 0x1984, 0x200c, 0x8000, 0x2014,
-	0x2071, 0x196c, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x9166,
-	0x2001, 0x1987, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001,
-	0x1988, 0x9288, 0x000a, 0x2102, 0x2001, 0x0017, 0x080c, 0xa887,
-	0x2001, 0x1a89, 0x2102, 0x2001, 0x0032, 0x080c, 0x1679, 0x080c,
-	0x6a4c, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006,
-	0x0016, 0x00e6, 0x2001, 0x1986, 0x2003, 0x0028, 0x2001, 0x1987,
-	0x2003, 0x0014, 0x2071, 0x196c, 0x701b, 0x0000, 0x701f, 0x07d0,
-	0x2001, 0x1988, 0x2009, 0x001e, 0x2102, 0x2001, 0x0017, 0x080c,
-	0xa887, 0x2001, 0x1a89, 0x2102, 0x2001, 0x0032, 0x080c, 0x1679,
-	0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6060, 0x904d, 0x0110,
-	0x080c, 0x106c, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x080c, 0xab97, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0xac8c, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6,
-	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1500, 0x7090, 0x9086,
-	0x0018, 0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78,
-	0x080c, 0x975f, 0x01d8, 0x707c, 0xaa50, 0x9206, 0x1160, 0x7080,
-	0xaa54, 0x9206, 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be,
-	0x900e, 0x080c, 0x323c, 0x080c, 0xaffd, 0x0020, 0x080c, 0xb5b5,
-	0x080c, 0xabed, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa54,
-	0x9206, 0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xab97, 0x0188, 0x2b08, 0x6112, 0x080c, 0xcccc, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x2009, 0x004d, 0x080c, 0xac8c, 0x9085, 0x0001,
-	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x0016, 0x080c, 0xab97, 0x0180, 0x2b08, 0x6112, 0x080c,
-	0xcccc, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0xac8c,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0,
-	0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6,
-	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1568, 0x7190, 0x6014,
-	0x2048, 0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001,
-	0x19a0, 0x2003, 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906,
-	0x8006, 0x8007, 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080,
-	0x001b, 0x20a0, 0x2001, 0x19a0, 0x0016, 0x200c, 0x080c, 0xd565,
-	0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048,
-	0xa867, 0x0103, 0x0010, 0x080c, 0xb5b5, 0x080c, 0xabed, 0x00fe,
-	0x00ee, 0x009e, 0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015,
-	0x11b8, 0x7090, 0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78,
-	0x080c, 0x975f, 0x01a8, 0x707c, 0xaa74, 0x9206, 0x1130, 0x7080,
-	0xaa78, 0x9206, 0x1110, 0x080c, 0x31e7, 0x080c, 0xaffd, 0x0020,
-	0x080c, 0xb5b5, 0x080c, 0xabed, 0x00fe, 0x00ee, 0x009e, 0x0005,
-	0x7060, 0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6,
-	0x2071, 0x1800, 0x9186, 0x0015, 0x1550, 0x7090, 0x9086, 0x0004,
-	0x1530, 0x6014, 0x2048, 0x2c78, 0x080c, 0x975f, 0x05f0, 0x707c,
-	0xaacc, 0x9206, 0x1180, 0x7080, 0xaad0, 0x9206, 0x1160, 0x080c,
-	0x31e7, 0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c,
-	0x5692, 0x001e, 0x0010, 0x080c, 0x547b, 0x080c, 0xc838, 0x0508,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c,
-	0xc838, 0x01b8, 0x6014, 0x2048, 0x080c, 0x547b, 0x1d70, 0xa87b,
-	0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126,
-	0x2091, 0x8000, 0xa867, 0x0139, 0x080c, 0x6d80, 0x012e, 0x080c,
-	0xabed, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaad0, 0x9206,
-	0x0930, 0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938,
-	0xaa34, 0x2100, 0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c,
-	0x9206, 0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e,
-	0x0005, 0x00b6, 0x00d6, 0x0036, 0x080c, 0xc838, 0x0904, 0xce87,
-	0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580,
-	0x6310, 0x00c6, 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140,
-	0x080c, 0x6914, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0xaa96, 0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098,
-	0x080c, 0x0fb7, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0,
-	0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fb7, 0x00ce, 0x0090,
-	0xaa96, 0x3918, 0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016,
-	0x0110, 0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084,
-	0x00ff, 0xa89e, 0x080c, 0x6d74, 0x6017, 0x0000, 0x009e, 0x003e,
-	0x00de, 0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096,
-	0x00f6, 0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096,
-	0x0000, 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x25fb,
-	0x2118, 0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d,
-	0x7c3c, 0x2011, 0x8018, 0x080c, 0x4b07, 0x00a8, 0x9096, 0x0001,
-	0x1148, 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c,
-	0xa8aa, 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838,
-	0xa8a6, 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e,
-	0x002e, 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110,
-	0x6a38, 0x0008, 0x6a2c, 0x080c, 0xc826, 0x01f0, 0x2260, 0x6120,
-	0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206,
-	0x0140, 0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140,
-	0x0020, 0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106,
-	0x001e, 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974,
-	0xd1cc, 0x0188, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8,
-	0x918c, 0x0f00, 0x810f, 0x918e, 0x0001, 0x1128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xbeb3, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010,
-	0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, 0xc838, 0x01c8, 0x080c,
-	0xca27, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096, 0x2048,
-	0xa87c, 0x080c, 0xca4d, 0x1118, 0x080c, 0xb5b5, 0x0040, 0xa867,
-	0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x6d80, 0x009e,
-	0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec,
-	0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b,
-	0x0005, 0x080c, 0xcb3c, 0xa877, 0x0000, 0x0005, 0x2001, 0x1810,
-	0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4,
-	0x000e, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e,
-	0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be,
-	0x2021, 0x0007, 0x080c, 0x4cbe, 0x004e, 0x003e, 0x0005, 0x0c51,
-	0x1d81, 0x0005, 0x2001, 0x1986, 0x2004, 0x601a, 0x0005, 0x2001,
-	0x1988, 0x2004, 0x604a, 0x0005, 0x080c, 0xabed, 0x0804, 0x96a0,
-	0x611c, 0xd1fc, 0xa97c, 0x1108, 0xd1e4, 0x0005, 0x601c, 0xd0fc,
-	0xa87c, 0x1108, 0xd0e4, 0x0005, 0x601c, 0xd0fc, 0xc0fc, 0x601e,
-	0xa87c, 0x1108, 0xd0e4, 0x0005, 0x6044, 0xd0fc, 0x0160, 0xd0dc,
+	0x0136, 0x9080, 0x001b, 0x20a0, 0x2011, 0x0006, 0x20a9, 0x0001,
+	0x3418, 0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211,
+	0x1db8, 0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398,
+	0x4003, 0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c,
+	0xc832, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0x009e, 0x0804, 0xabdf, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386,
+	0x0200, 0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8d7, 0x0000, 0x00be,
+	0x6014, 0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xab32, 0x080c, 0xabdf, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011,
+	0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xcf51, 0x0188, 0x6014,
+	0x9005, 0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x604b, 0x0000,
+	0x2009, 0x0022, 0x080c, 0xb3ea, 0x9006, 0x001e, 0x000e, 0x0005,
+	0x9085, 0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80,
+	0x000c, 0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003,
+	0x0001, 0x2099, 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a,
+	0xa804, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0,
+	0x4003, 0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9,
+	0x0020, 0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048,
+	0xa867, 0x0103, 0x080c, 0xabdf, 0x001e, 0x009e, 0x0005, 0x0096,
+	0x0016, 0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084,
+	0x00ff, 0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004,
+	0x9108, 0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048,
+	0x080c, 0xc3f8, 0x080c, 0xc832, 0x0140, 0x6014, 0x2048, 0xa807,
+	0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xabdf, 0x001e,
+	0x009e, 0x0005, 0x0016, 0x2009, 0x0000, 0x7030, 0x9086, 0x0200,
+	0x0110, 0x2009, 0x0001, 0x0096, 0x6014, 0x904d, 0x090c, 0x0d7d,
+	0xa97a, 0x080c, 0x6d7b, 0x009e, 0x080c, 0xabdf, 0x001e, 0x0005,
+	0x0016, 0x0096, 0x7030, 0x9086, 0x0100, 0x1118, 0x2009, 0x0004,
+	0x0010, 0x7034, 0x800c, 0x810b, 0x2011, 0x000c, 0x2019, 0x000c,
+	0x6014, 0x2048, 0xa804, 0x0096, 0x9005, 0x0108, 0x2048, 0x080c,
+	0xc3f8, 0x009e, 0x080c, 0xc832, 0x0148, 0xa804, 0x9005, 0x1158,
+	0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xabdf,
+	0x009e, 0x001e, 0x0005, 0x0086, 0x2040, 0xa030, 0x8007, 0x9086,
+	0x0100, 0x1118, 0x080c, 0xb5a6, 0x00e0, 0xa034, 0x8007, 0x800c,
+	0x8806, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x000c, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xaaa0,
+	0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x1289, 0x0019,
+	0x0d08, 0x008e, 0x0898, 0x0096, 0x0006, 0x080c, 0x103a, 0x000e,
+	0x01b0, 0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006, 0xae6a,
+	0x2800, 0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96, 0xad9a,
+	0x0086, 0x2940, 0x080c, 0x112f, 0x008e, 0x9085, 0x0001, 0x009e,
+	0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210,
+	0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1520, 0x700c, 0x6210,
+	0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x11e0, 0x604b, 0x0000,
+	0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xcec9, 0x001e, 0x1158,
+	0x622c, 0x2268, 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003, 0x0130,
+	0x9386, 0x0006, 0x0128, 0x080c, 0xabdf, 0x0020, 0x0039, 0x0010,
+	0x080c, 0xb21f, 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096, 0x6814,
+	0x2048, 0x9186, 0x0015, 0x0904, 0xb1fe, 0x918e, 0x0016, 0x1904,
+	0xb21d, 0x700c, 0x908c, 0xff00, 0x9186, 0x1700, 0x0120, 0x9186,
+	0x0300, 0x1904, 0xb1d8, 0x89ff, 0x1138, 0x6800, 0x9086, 0x000f,
+	0x0904, 0xb1ba, 0x0804, 0xb21b, 0x6808, 0x9086, 0xffff, 0x1904,
+	0xb200, 0xa87c, 0x9084, 0x0060, 0x9086, 0x0020, 0x1128, 0xa83c,
+	0xa940, 0x9105, 0x1904, 0xb200, 0x6824, 0xd0b4, 0x1904, 0xb200,
+	0x080c, 0xca21, 0x6864, 0xa882, 0xa87c, 0xc0dc, 0xc0f4, 0xc0d4,
+	0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001, 0x000a, 0x080c, 0x9148,
+	0xa884, 0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff, 0x002e, 0x1138,
+	0x00c6, 0x2d60, 0x080c, 0xc54b, 0x00ce, 0x0804, 0xb21b, 0x00c6,
+	0xa868, 0xd0fc, 0x1118, 0x080c, 0x60b6, 0x0010, 0x080c, 0x64ba,
+	0x00ce, 0x1904, 0xb200, 0x00c6, 0x2d60, 0x080c, 0xabdf, 0x00ce,
+	0x0804, 0xb21b, 0x00c6, 0x080c, 0xac4f, 0x0198, 0x6017, 0x0000,
+	0x6810, 0x6012, 0x080c, 0xcccb, 0x6023, 0x0003, 0x6904, 0x00c6,
+	0x2d60, 0x080c, 0xabdf, 0x00ce, 0x080c, 0xac7c, 0x00ce, 0x0804,
+	0xb21b, 0x2001, 0x1987, 0x2004, 0x684a, 0x00ce, 0x0804, 0xb21b,
+	0x7008, 0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900,
+	0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c,
+	0xcf0b, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009,
+	0x8020, 0x080c, 0x9200, 0x00ce, 0x0430, 0x700c, 0x9086, 0x2a00,
+	0x1138, 0x2001, 0x1987, 0x2004, 0x684a, 0x00e8, 0x04c1, 0x00e8,
+	0x89ff, 0x090c, 0x0d7d, 0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103,
+	0xa87b, 0x0003, 0x080c, 0x6b91, 0x080c, 0xca21, 0x080c, 0xac1a,
+	0x0026, 0x6010, 0x00b6, 0x2058, 0xba3c, 0x080c, 0x674b, 0x00be,
+	0x002e, 0x00de, 0x00ce, 0x080c, 0xabdf, 0x009e, 0x0005, 0x9186,
+	0x0015, 0x1128, 0x2001, 0x1987, 0x2004, 0x684a, 0x0068, 0x918e,
+	0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c, 0xe534, 0x080c,
+	0x88a3, 0x080c, 0xabdf, 0x00ce, 0x080c, 0xabdf, 0x0005, 0x0026,
+	0x0036, 0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001,
+	0x1987, 0x2004, 0x684a, 0x0804, 0xb299, 0x00c6, 0x2d60, 0x080c,
+	0xc423, 0x00ce, 0x6804, 0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00,
+	0x2060, 0x6003, 0x0001, 0x6007, 0x0050, 0x2009, 0x8023, 0x080c,
+	0x9200, 0x00ce, 0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff,
+	0x090c, 0x0d7d, 0x6800, 0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac,
+	0x0178, 0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882,
+	0x2001, 0x0001, 0x6832, 0x0400, 0x2001, 0x0007, 0x6832, 0x00e0,
+	0xa87c, 0xd0b4, 0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48,
+	0xa838, 0xa934, 0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024,
+	0x9306, 0x1118, 0x7020, 0x9406, 0x0d38, 0x7020, 0x683e, 0x7024,
+	0x683a, 0x2001, 0x0005, 0x6832, 0x080c, 0xcbb5, 0x080c, 0x9684,
+	0x0010, 0x080c, 0xabdf, 0x004e, 0x003e, 0x002e, 0x0005, 0x00e6,
+	0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258,
+	0xba10, 0x00be, 0x9206, 0x1904, 0xb304, 0x700c, 0x6210, 0x00b6,
+	0x2258, 0xba14, 0x00be, 0x9206, 0x1904, 0xb304, 0x6038, 0x2068,
+	0x6824, 0xc0dc, 0x6826, 0x6a20, 0x9286, 0x0007, 0x0904, 0xb304,
+	0x9286, 0x0002, 0x0904, 0xb304, 0x9286, 0x0000, 0x05e8, 0x6808,
+	0x633c, 0x9306, 0x15c8, 0x2071, 0x026c, 0x9186, 0x0015, 0x0570,
+	0x918e, 0x0016, 0x1100, 0x00c6, 0x6038, 0x2060, 0x6104, 0x9186,
+	0x004b, 0x01c0, 0x9186, 0x004c, 0x01a8, 0x9186, 0x004d, 0x0190,
+	0x9186, 0x004e, 0x0178, 0x9186, 0x0052, 0x0160, 0x6014, 0x0096,
+	0x2048, 0x080c, 0xc832, 0x090c, 0x0d7d, 0xa87b, 0x0003, 0x009e,
+	0x080c, 0xcf0b, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002,
+	0x2009, 0x8020, 0x080c, 0x9200, 0x00ce, 0x0030, 0x6038, 0x2070,
+	0x2001, 0x1987, 0x2004, 0x704a, 0x080c, 0xabdf, 0x002e, 0x00de,
+	0x00ee, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048, 0x6010,
+	0x2058, 0x91b6, 0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c,
+	0xbc02, 0x0460, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90,
+	0x0010, 0x2019, 0x000a, 0x20a9, 0x0004, 0x080c, 0xbbb5, 0x002e,
+	0x003e, 0x015e, 0x009e, 0x1904, 0xb373, 0x0096, 0x0156, 0x0036,
+	0x0026, 0x2b48, 0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9, 0x0004,
+	0x080c, 0xbbb5, 0x002e, 0x003e, 0x015e, 0x009e, 0x15a0, 0x7238,
+	0xba0a, 0x733c, 0xbb0e, 0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005,
+	0x1128, 0x00fe, 0x009e, 0x00be, 0x0804, 0xafee, 0x0096, 0x2048,
+	0xaa12, 0xab16, 0xac0a, 0x009e, 0x8006, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0,
+	0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x1289, 0x080c,
+	0xb103, 0x0130, 0x00fe, 0x009e, 0x080c, 0xabdf, 0x00be, 0x0005,
+	0x080c, 0xb5a6, 0x0cb8, 0x2b78, 0x00f6, 0x080c, 0x31ef, 0x080c,
+	0xcf66, 0x00fe, 0x00c6, 0x080c, 0xab89, 0x2f00, 0x6012, 0x6017,
+	0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001,
+	0x0007, 0x080c, 0x6570, 0x080c, 0x659c, 0x080c, 0x9207, 0x080c,
+	0x9684, 0x00ce, 0x0804, 0xb346, 0x2100, 0x91b2, 0x0053, 0x1a0c,
+	0x0d7d, 0x91b2, 0x0040, 0x1a04, 0xb3fc, 0x0002, 0xb3ea, 0xb3ea,
+	0xb3e0, 0xb3ea, 0xb3ea, 0xb3ea, 0xb3de, 0xb3de, 0xb3de, 0xb3de,
+	0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de,
+	0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de,
+	0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3ea, 0xb3de, 0xb3ea,
+	0xb3ea, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3e0, 0xb3de,
+	0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de,
+	0xb3ea, 0xb3ea, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de, 0xb3de,
+	0xb3de, 0xb3de, 0xb3de, 0xb3ea, 0xb3de, 0xb3de, 0x080c, 0x0d7d,
+	0x0066, 0x00b6, 0x6610, 0x2658, 0xb8d4, 0xc08c, 0xb8d6, 0x00be,
+	0x006e, 0x0000, 0x6003, 0x0001, 0x6106, 0x9186, 0x0032, 0x0118,
+	0x080c, 0x9207, 0x0010, 0x080c, 0x9200, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x9684, 0x012e, 0x0005, 0x2600, 0x0002, 0xb3ea, 0xb3ea,
+	0xb410, 0xb3ea, 0xb3ea, 0xb410, 0xb410, 0xb410, 0xb410, 0xb3ea,
+	0xb410, 0xb3ea, 0xb410, 0xb3ea, 0xb410, 0xb410, 0xb410, 0xb410,
+	0x080c, 0x0d7d, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0d7d, 0x91b6,
+	0x0013, 0x0904, 0xb4e7, 0x91b6, 0x0027, 0x1904, 0xb493, 0x080c,
+	0x95c6, 0x6004, 0x080c, 0xca36, 0x01b0, 0x080c, 0xca47, 0x01a8,
+	0x908e, 0x0021, 0x0904, 0xb490, 0x908e, 0x0022, 0x1130, 0x080c,
+	0xb01a, 0x0904, 0xb48c, 0x0804, 0xb48d, 0x908e, 0x003d, 0x0904,
+	0xb490, 0x0804, 0xb486, 0x080c, 0x321e, 0x2001, 0x0007, 0x080c,
+	0x6570, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xb5a6,
+	0x9186, 0x007e, 0x1148, 0x2001, 0x1837, 0x2014, 0xc285, 0x080c,
+	0x74c8, 0x1108, 0xc2ad, 0x2202, 0x080c, 0xa888, 0x0036, 0x0026,
+	0x2019, 0x0028, 0x2110, 0x080c, 0xe640, 0x002e, 0x003e, 0x0016,
+	0x0026, 0x0036, 0x2110, 0x2019, 0x0028, 0x080c, 0x938d, 0x0076,
+	0x903e, 0x080c, 0x9256, 0x6010, 0x00b6, 0x905d, 0x0100, 0x00be,
+	0x2c08, 0x080c, 0xdffb, 0x007e, 0x003e, 0x002e, 0x001e, 0x080c,
+	0xa8a4, 0x080c, 0xcf66, 0x0016, 0x080c, 0xccc3, 0x080c, 0xabdf,
+	0x001e, 0x080c, 0x32f8, 0x080c, 0x9684, 0x0030, 0x080c, 0xccc3,
+	0x080c, 0xabdf, 0x080c, 0x9684, 0x0005, 0x080c, 0xb5a6, 0x0cb0,
+	0x080c, 0xb5e2, 0x0c98, 0x9186, 0x0015, 0x0118, 0x9186, 0x0016,
+	0x1140, 0x080c, 0xaa9a, 0x0d80, 0x9086, 0x0002, 0x0904, 0xb5ed,
+	0x0c58, 0x9186, 0x0014, 0x1d40, 0x080c, 0x95c6, 0x6004, 0x908e,
+	0x0022, 0x1118, 0x080c, 0xb01a, 0x09f8, 0x080c, 0x31ef, 0x080c,
+	0xcf66, 0x080c, 0xca36, 0x1190, 0x080c, 0x321e, 0x6010, 0x00b6,
+	0x2058, 0xb9a0, 0x00be, 0x080c, 0xb5a6, 0x9186, 0x007e, 0x1128,
+	0x2001, 0x1837, 0x200c, 0xc185, 0x2102, 0x0800, 0x080c, 0xca47,
+	0x1120, 0x080c, 0xb5a6, 0x0804, 0xb486, 0x6004, 0x908e, 0x0032,
+	0x1160, 0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c,
+	0x3599, 0x00fe, 0x00ee, 0x0804, 0xb486, 0x6004, 0x908e, 0x0021,
+	0x0d40, 0x908e, 0x0022, 0x090c, 0xb5a6, 0x0804, 0xb486, 0x90b2,
+	0x0040, 0x1a04, 0xb586, 0x2008, 0x0002, 0xb52f, 0xb530, 0xb533,
+	0xb536, 0xb539, 0xb53c, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d,
+	0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d,
+	0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d,
+	0xb52d, 0xb52d, 0xb52d, 0xb53f, 0xb548, 0xb52d, 0xb549, 0xb548,
+	0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb548, 0xb548, 0xb52d,
+	0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb52d, 0xb571,
+	0xb548, 0xb52d, 0xb544, 0xb52d, 0xb52d, 0xb52d, 0xb545, 0xb52d,
+	0xb52d, 0xb52d, 0xb548, 0xb56c, 0xb52d, 0x080c, 0x0d7d, 0x00c0,
+	0x2001, 0x000b, 0x00e8, 0x2001, 0x0003, 0x00d0, 0x2001, 0x0005,
+	0x00b8, 0x2001, 0x0001, 0x00a0, 0x2001, 0x0009, 0x0088, 0x6003,
+	0x0005, 0x080c, 0x9684, 0x0058, 0x0018, 0x0010, 0x080c, 0x6570,
+	0x04b8, 0x080c, 0xcf69, 0x6003, 0x0004, 0x080c, 0x9684, 0x0005,
+	0x080c, 0x6570, 0x6003, 0x0002, 0x0036, 0x2019, 0x1852, 0x2304,
+	0x9084, 0xff00, 0x1120, 0x2001, 0x1985, 0x201c, 0x0040, 0x8007,
+	0x909a, 0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a,
+	0x003e, 0x080c, 0x9684, 0x0c18, 0x080c, 0xccc3, 0x080c, 0xabdf,
+	0x08f0, 0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c,
+	0x3599, 0x00fe, 0x00ee, 0x080c, 0x95c6, 0x080c, 0xabdf, 0x0878,
+	0x6003, 0x0002, 0x080c, 0xcf69, 0x0804, 0x9684, 0x2600, 0x2008,
+	0x0002, 0xb59d, 0xb580, 0xb59b, 0xb580, 0xb580, 0xb59b, 0xb59b,
+	0xb59b, 0xb59b, 0xb580, 0xb59b, 0xb580, 0xb59b, 0xb580, 0xb59b,
+	0xb59b, 0xb59b, 0xb59b, 0x080c, 0x0d7d, 0x0096, 0x6014, 0x2048,
+	0x080c, 0x6d7b, 0x009e, 0x080c, 0xabdf, 0x0005, 0x00e6, 0x0096,
+	0x0026, 0x0016, 0x080c, 0xc832, 0x0568, 0x6014, 0x2048, 0xa864,
+	0x9086, 0x0139, 0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c,
+	0x5476, 0x0130, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028,
+	0x2001, 0x0030, 0x900e, 0x2011, 0x4005, 0x080c, 0xce30, 0x0090,
+	0xa868, 0xd0fc, 0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e,
+	0x0021, 0x0168, 0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103,
+	0xa833, 0x0100, 0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e,
+	0x0009, 0x0cc0, 0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867,
+	0x0103, 0xa823, 0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658,
+	0xb804, 0x9084, 0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0d7d, 0x6604,
+	0x96b6, 0x004d, 0x1120, 0x080c, 0xcd4f, 0x0804, 0xb672, 0x6604,
+	0x96b6, 0x0043, 0x1120, 0x080c, 0xcd98, 0x0804, 0xb672, 0x6604,
+	0x96b6, 0x004b, 0x1120, 0x080c, 0xcdc4, 0x0804, 0xb672, 0x6604,
+	0x96b6, 0x0033, 0x1120, 0x080c, 0xcce5, 0x0804, 0xb672, 0x6604,
+	0x96b6, 0x0028, 0x1120, 0x080c, 0xca85, 0x0804, 0xb672, 0x6604,
+	0x96b6, 0x0029, 0x1120, 0x080c, 0xcac6, 0x0804, 0xb672, 0x6604,
+	0x96b6, 0x001f, 0x1120, 0x080c, 0xafc2, 0x0804, 0xb672, 0x6604,
+	0x96b6, 0x0000, 0x1118, 0x080c, 0xb30a, 0x04e0, 0x6604, 0x96b6,
+	0x0022, 0x1118, 0x080c, 0xaffb, 0x04a8, 0x6604, 0x96b6, 0x0035,
+	0x1118, 0x080c, 0xb121, 0x0470, 0x6604, 0x96b6, 0x0039, 0x1118,
+	0x080c, 0xb29f, 0x0438, 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c,
+	0xb033, 0x0400, 0x6604, 0x96b6, 0x0044, 0x1118, 0x080c, 0xb06f,
+	0x00c8, 0x6604, 0x96b6, 0x0049, 0x1118, 0x080c, 0xb0b0, 0x0090,
+	0x6604, 0x96b6, 0x0041, 0x1118, 0x080c, 0xb09a, 0x0058, 0x91b6,
+	0x0015, 0x1110, 0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be,
+	0x0804, 0xb8ce, 0x00be, 0x0005, 0x080c, 0xac99, 0x0cd8, 0xb68f,
+	0xb692, 0xb68f, 0xb6d9, 0xb68f, 0xb842, 0xb8db, 0xb68f, 0xb68f,
+	0xb8a4, 0xb68f, 0xb8ba, 0x0096, 0x601f, 0x0000, 0x6014, 0x2048,
+	0xa800, 0x2048, 0xa867, 0x0103, 0x009e, 0x0804, 0xabdf, 0xa001,
+	0xa001, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7090, 0x9086, 0x0074,
+	0x1540, 0x080c, 0xdfcc, 0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030,
+	0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00f9,
+	0x00be, 0x2001, 0x0006, 0x080c, 0x6570, 0x080c, 0x321e, 0x080c,
+	0xabdf, 0x0098, 0x2001, 0x000a, 0x080c, 0x6570, 0x080c, 0x321e,
+	0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9207, 0x080c, 0x9684,
+	0x0020, 0x2001, 0x0001, 0x080c, 0xb812, 0x00ee, 0x0005, 0x00d6,
+	0xb800, 0xd084, 0x0160, 0x9006, 0x080c, 0x655c, 0x2069, 0x1847,
+	0x6804, 0xd0a4, 0x0120, 0x2001, 0x0006, 0x080c, 0x659c, 0x00de,
+	0x0005, 0x00b6, 0x0096, 0x00d6, 0x2011, 0x1824, 0x2204, 0x9086,
+	0x0074, 0x1904, 0xb7e7, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e,
+	0x1120, 0x080c, 0xba28, 0x0804, 0xb74b, 0x080c, 0xba1d, 0x6010,
+	0x2058, 0xbaa0, 0x9286, 0x0080, 0x1510, 0x6014, 0x9005, 0x01a8,
+	0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001,
+	0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xce30, 0x0030, 0xa807,
+	0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x2001, 0x0006, 0x080c,
+	0x6570, 0x080c, 0x321e, 0x080c, 0xabdf, 0x0804, 0xb7ec, 0x080c,
+	0xb7fa, 0x6014, 0x9005, 0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8,
+	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1d08, 0x2001, 0x0000,
+	0x900e, 0x2011, 0x4000, 0x080c, 0xce30, 0x08f8, 0x080c, 0xb7f0,
+	0x0160, 0x9006, 0x080c, 0x655c, 0x2001, 0x0004, 0x080c, 0x659c,
+	0x2001, 0x0007, 0x080c, 0x6570, 0x08a0, 0x2001, 0x0004, 0x080c,
+	0x6570, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x9207, 0x080c,
+	0x9684, 0x0804, 0xb7ec, 0xb85c, 0xd0e4, 0x01d8, 0x080c, 0xcc5d,
+	0x080c, 0x74c8, 0x0118, 0xd0dc, 0x1904, 0xb70d, 0x2011, 0x1837,
+	0x2204, 0xc0ad, 0x2012, 0x2001, 0x196c, 0x2004, 0x00f6, 0x2079,
+	0x0100, 0x78e3, 0x0000, 0x080c, 0x2688, 0x78e2, 0x00fe, 0x0804,
+	0xb70d, 0x080c, 0xcc9e, 0x2011, 0x1837, 0x2204, 0xc0a5, 0x2012,
+	0x0006, 0x080c, 0xe15c, 0x000e, 0x1904, 0xb70d, 0xc0b5, 0x2012,
+	0x2001, 0x0006, 0x080c, 0x6570, 0x9006, 0x080c, 0x655c, 0x00c6,
+	0x2001, 0x180f, 0x2004, 0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100,
+	0x00e6, 0x2071, 0x1800, 0x700c, 0x9084, 0x00ff, 0x78e6, 0x707e,
+	0x7010, 0x78ea, 0x7082, 0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5,
+	0x780e, 0x00fe, 0x080c, 0x265d, 0x00f6, 0x2100, 0x900e, 0x080c,
+	0x2614, 0x795e, 0x00fe, 0x9186, 0x0081, 0x01d8, 0x2009, 0x0081,
+	0x00c8, 0x2009, 0x00ef, 0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932,
+	0x7936, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x265d, 0x00f6,
+	0x2079, 0x1800, 0x7982, 0x2100, 0x900e, 0x080c, 0x2614, 0x795e,
+	0x00fe, 0x8108, 0x080c, 0x65bf, 0x2b00, 0x00ce, 0x1904, 0xb70d,
+	0x6012, 0x2009, 0x180f, 0x210c, 0xd19c, 0x0150, 0x2009, 0x027c,
+	0x210c, 0x918c, 0x00ff, 0xb912, 0x2009, 0x027d, 0x210c, 0xb916,
+	0x2001, 0x0002, 0x080c, 0x6570, 0x6023, 0x0001, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x9207, 0x080c, 0x9684, 0x0028, 0x080c,
+	0xb5a6, 0x2001, 0x0001, 0x0431, 0x00de, 0x009e, 0x00be, 0x0005,
+	0x2001, 0x1810, 0x2004, 0xd0a4, 0x0120, 0x2001, 0x1848, 0x2004,
+	0xd0ac, 0x0005, 0x00e6, 0x080c, 0xe699, 0x0190, 0x2071, 0x0260,
+	0x7108, 0x720c, 0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, 0x0140,
+	0x6010, 0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, 0xba16,
+	0x00ee, 0x0005, 0x2030, 0x9005, 0x0158, 0x2001, 0x0007, 0x080c,
+	0x6570, 0x080c, 0x56e9, 0x1120, 0x2001, 0x0007, 0x080c, 0x659c,
+	0x2600, 0x9005, 0x11b0, 0x6014, 0x0096, 0x2048, 0xa868, 0x009e,
+	0xd0fc, 0x1178, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0,
+	0x00be, 0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4b09, 0x004e,
+	0x003e, 0x080c, 0x321e, 0x6020, 0x9086, 0x000a, 0x1108, 0x0005,
+	0x0804, 0xabdf, 0x00b6, 0x00e6, 0x0026, 0x0016, 0x2071, 0x1800,
+	0x7090, 0x9086, 0x0014, 0x1904, 0xb89a, 0x080c, 0x56e9, 0x1170,
+	0x6014, 0x9005, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0,
+	0x2021, 0x0006, 0x080c, 0x4cc0, 0x004e, 0x003e, 0x00d6, 0x6010,
+	0x2058, 0x080c, 0x66bb, 0x080c, 0xb6c7, 0x00de, 0x080c, 0xbaee,
+	0x1588, 0x6010, 0x2058, 0xb890, 0x9005, 0x0560, 0x2001, 0x0006,
+	0x080c, 0x6570, 0x0096, 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084,
+	0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011,
+	0x4000, 0x080c, 0xce30, 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x0029, 0x0130, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200,
+	0x009e, 0x080c, 0x321e, 0x6020, 0x9086, 0x000a, 0x0140, 0x080c,
+	0xabdf, 0x0028, 0x080c, 0xb5a6, 0x9006, 0x080c, 0xb812, 0x001e,
+	0x002e, 0x00ee, 0x00be, 0x0005, 0x2011, 0x1824, 0x2204, 0x9086,
+	0x0014, 0x1160, 0x2001, 0x0002, 0x080c, 0x6570, 0x6003, 0x0001,
+	0x6007, 0x0001, 0x080c, 0x9207, 0x0804, 0x9684, 0x2001, 0x0001,
+	0x0804, 0xb812, 0x2030, 0x2011, 0x1824, 0x2204, 0x9086, 0x0004,
+	0x1148, 0x96b6, 0x000b, 0x1120, 0x2001, 0x0007, 0x080c, 0x6570,
+	0x0804, 0xabdf, 0x2001, 0x0001, 0x0804, 0xb812, 0x0002, 0xb68f,
+	0xb8e6, 0xb68f, 0xb927, 0xb68f, 0xb9d4, 0xb8db, 0xb68f, 0xb68f,
+	0xb9e8, 0xb68f, 0xb9fa, 0x6604, 0x9686, 0x0003, 0x0904, 0xb842,
+	0x96b6, 0x001e, 0x1110, 0x080c, 0xabdf, 0x0005, 0x00b6, 0x00d6,
+	0x00c6, 0x080c, 0xba0c, 0x11a0, 0x9006, 0x080c, 0x655c, 0x080c,
+	0x31ef, 0x080c, 0xcf66, 0x2001, 0x0002, 0x080c, 0x6570, 0x6003,
+	0x0001, 0x6007, 0x0002, 0x080c, 0x9207, 0x080c, 0x9684, 0x0418,
+	0x2009, 0x026e, 0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058,
+	0xb840, 0x9084, 0x00ff, 0x9005, 0x0170, 0x8001, 0xb842, 0x601b,
+	0x000a, 0x0088, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086,
+	0x1900, 0x1108, 0x08a0, 0x080c, 0x31ef, 0x080c, 0xcf66, 0x2001,
+	0x0001, 0x080c, 0xb812, 0x00ce, 0x00de, 0x00be, 0x0005, 0x0096,
+	0x00b6, 0x0026, 0x9016, 0x080c, 0xba1a, 0x00d6, 0x2069, 0x197b,
+	0x2d04, 0x9005, 0x0168, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e,
+	0x1138, 0x2069, 0x1820, 0x2d04, 0x8000, 0x206a, 0x00de, 0x0010,
+	0x00de, 0x0088, 0x9006, 0x080c, 0x655c, 0x2001, 0x0002, 0x080c,
+	0x6570, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9207, 0x080c,
+	0x9684, 0x0804, 0xb9a4, 0x080c, 0xc832, 0x01b0, 0x6014, 0x2048,
+	0xa864, 0x2010, 0x9086, 0x0139, 0x1138, 0x6007, 0x0016, 0x2001,
+	0x0002, 0x080c, 0xce8a, 0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc,
+	0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc,
+	0x0148, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x1110,
+	0x9006, 0x0c38, 0x080c, 0xb5a6, 0x2009, 0x026e, 0x2134, 0x96b4,
+	0x00ff, 0x9686, 0x0005, 0x0520, 0x9686, 0x000b, 0x01c8, 0x2009,
+	0x026f, 0x2104, 0x9084, 0xff00, 0x1118, 0x9686, 0x0009, 0x01c0,
+	0x9086, 0x1900, 0x1168, 0x9686, 0x0009, 0x0190, 0x2001, 0x0004,
+	0x080c, 0x6570, 0x2001, 0x0028, 0x601a, 0x6007, 0x0052, 0x0020,
+	0x2001, 0x0001, 0x080c, 0xb812, 0x002e, 0x00be, 0x009e, 0x0005,
+	0x9286, 0x0139, 0x0160, 0x6014, 0x2048, 0x080c, 0xc832, 0x0140,
+	0xa864, 0x9086, 0x0139, 0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c40,
+	0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0138, 0x8001,
+	0xb842, 0x601b, 0x000a, 0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086,
+	0x007e, 0x1138, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5fb7, 0x00ee,
+	0x0010, 0x080c, 0x31ef, 0x0860, 0x080c, 0xba1a, 0x1160, 0x2001,
+	0x0004, 0x080c, 0x6570, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c,
+	0x9207, 0x0804, 0x9684, 0x080c, 0xb5a6, 0x9006, 0x0804, 0xb812,
+	0x0489, 0x1160, 0x2001, 0x0008, 0x080c, 0x6570, 0x6003, 0x0001,
+	0x6007, 0x0005, 0x080c, 0x9207, 0x0804, 0x9684, 0x2001, 0x0001,
+	0x0804, 0xb812, 0x00f9, 0x1160, 0x2001, 0x000a, 0x080c, 0x6570,
+	0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9207, 0x0804, 0x9684,
+	0x2001, 0x0001, 0x0804, 0xb812, 0x2009, 0x026e, 0x2104, 0x9086,
+	0x0003, 0x1138, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086,
+	0x2a00, 0x0005, 0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016,
+	0x6110, 0x2158, 0x080c, 0x662f, 0x001e, 0x00ce, 0x00be, 0x0005,
+	0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010, 0x2058,
+	0x2009, 0x1837, 0x2104, 0x9085, 0x0003, 0x200a, 0x080c, 0xbac0,
+	0x0560, 0x2009, 0x1837, 0x2104, 0xc0cd, 0x200a, 0x080c, 0x6a66,
+	0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xe2d9, 0x2001,
+	0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001,
+	0x080c, 0x31b4, 0x00e6, 0x2071, 0x1800, 0x080c, 0x2fc0, 0x00ee,
+	0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009, 0x007f, 0x080c, 0x32f8,
+	0x8108, 0x1f04, 0xba5e, 0x015e, 0x00ce, 0x080c, 0xba1d, 0x2071,
+	0x0260, 0x2079, 0x0200, 0x7817, 0x0001, 0x2001, 0x1837, 0x200c,
+	0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc,
+	0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001, 0x1837, 0x2102, 0x2079,
+	0x0100, 0x2e04, 0x9084, 0x00ff, 0x2069, 0x181f, 0x206a, 0x78e6,
+	0x0006, 0x8e70, 0x2e04, 0x2069, 0x1820, 0x206a, 0x78ea, 0x7832,
+	0x7836, 0x2010, 0x9084, 0xff00, 0x001e, 0x9105, 0x2009, 0x182c,
+	0x200a, 0x2200, 0x9084, 0x00ff, 0x2008, 0x080c, 0x265d, 0x080c,
+	0x74c8, 0x0170, 0x2071, 0x0260, 0x2069, 0x1981, 0x7048, 0x206a,
+	0x704c, 0x6806, 0x7050, 0x680a, 0x7054, 0x680e, 0x080c, 0xcc5d,
+	0x0040, 0x2001, 0x0006, 0x080c, 0x6570, 0x080c, 0x321e, 0x080c,
+	0xabdf, 0x001e, 0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005,
+	0x0096, 0x0026, 0x0036, 0x00e6, 0x0156, 0x2019, 0x182c, 0x231c,
+	0x83ff, 0x01f0, 0x2071, 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004,
+	0x9084, 0xff00, 0x9205, 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9,
+	0x0004, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbbb5, 0x1148, 0x2011,
+	0x027a, 0x20a9, 0x0004, 0x2019, 0x0006, 0x080c, 0xbbb5, 0x1100,
+	0x015e, 0x00ee, 0x003e, 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071,
+	0x0260, 0x7034, 0x9086, 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800,
+	0x1188, 0x703c, 0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100,
+	0x1138, 0x7054, 0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010,
+	0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076,
+	0x0056, 0x0046, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029,
+	0x19f2, 0x252c, 0x2021, 0x19f9, 0x2424, 0x2061, 0x1ddc, 0x2071,
+	0x1800, 0x7254, 0x7074, 0x9202, 0x1a04, 0xbb81, 0x080c, 0x8b72,
+	0x0904, 0xbb7a, 0x080c, 0xe30a, 0x0904, 0xbb7a, 0x6720, 0x9786,
+	0x0007, 0x0904, 0xbb7a, 0x2500, 0x9c06, 0x0904, 0xbb7a, 0x2400,
+	0x9c06, 0x0904, 0xbb7a, 0x3e08, 0x9186, 0x0002, 0x1148, 0x6010,
+	0x9005, 0x0130, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1590,
+	0x00c6, 0x6043, 0xffff, 0x6000, 0x9086, 0x0004, 0x1110, 0x080c,
+	0x1a77, 0x9786, 0x000a, 0x0148, 0x080c, 0xca47, 0x1130, 0x00ce,
+	0x080c, 0xb5a6, 0x080c, 0xac1a, 0x00e8, 0x6014, 0x2048, 0x080c,
+	0xc832, 0x01a8, 0x9786, 0x0003, 0x1530, 0xa867, 0x0103, 0xa87c,
+	0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fec, 0x009e,
+	0xab7a, 0xa877, 0x0000, 0x080c, 0x6d6f, 0x080c, 0xca21, 0x080c,
+	0xac1a, 0x00ce, 0x9ce0, 0x001c, 0x7068, 0x9c02, 0x1210, 0x0804,
+	0xbb21, 0x012e, 0x000e, 0x002e, 0x004e, 0x005e, 0x007e, 0x00ce,
+	0x009e, 0x00ee, 0x0005, 0x9786, 0x0006, 0x1118, 0x080c, 0xe27c,
+	0x0c30, 0x9786, 0x0009, 0x1148, 0x6000, 0x9086, 0x0004, 0x0d08,
+	0x2009, 0x004c, 0x080c, 0xac7c, 0x08e0, 0x9786, 0x000a, 0x0938,
+	0x0820, 0x220c, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04,
+	0xbba1, 0x9006, 0x0005, 0x2304, 0x9102, 0x0218, 0x2001, 0x0001,
+	0x0008, 0x9006, 0x918d, 0x0001, 0x0005, 0x0136, 0x01c6, 0x0016,
+	0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0,
+	0x9300, 0x2098, 0x3518, 0x20a9, 0x0001, 0x220c, 0x4002, 0x910e,
+	0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e,
+	0x0005, 0x220c, 0x9102, 0x0218, 0x2001, 0x0001, 0x0010, 0x2001,
+	0x0000, 0x918d, 0x0001, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c,
+	0x810f, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, 0xbbdf,
+	0x9006, 0x0005, 0x918d, 0x0001, 0x0005, 0x6004, 0x908a, 0x0053,
+	0x1a0c, 0x0d7d, 0x080c, 0xca36, 0x0120, 0x080c, 0xca47, 0x0158,
+	0x0028, 0x080c, 0x321e, 0x080c, 0xca47, 0x0128, 0x080c, 0x95c6,
+	0x080c, 0xabdf, 0x0005, 0x080c, 0xb5a6, 0x0cc0, 0x9182, 0x0057,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbc25, 0xbc25,
+	0xbc25, 0xbc25, 0xbc25, 0xbc25, 0xbc25, 0xbc25, 0xbc25, 0xbc25,
+	0xbc25, 0xbc27, 0xbc27, 0xbc27, 0xbc27, 0xbc25, 0xbc25, 0xbc25,
+	0xbc27, 0xbc25, 0xbc25, 0xbc25, 0xbc25, 0x080c, 0x0d7d, 0x600b,
+	0xffff, 0x6003, 0x000f, 0x6106, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xcf69, 0x2009, 0x8000, 0x080c, 0x9200, 0x012e, 0x0005, 0x9186,
+	0x0013, 0x1128, 0x6004, 0x9082, 0x0040, 0x0804, 0xbcac, 0x9186,
+	0x0027, 0x1520, 0x080c, 0x95c6, 0x080c, 0x31ef, 0x080c, 0xcf66,
+	0x0096, 0x6114, 0x2148, 0x080c, 0xc832, 0x0198, 0x080c, 0xca47,
+	0x1118, 0x080c, 0xb5a6, 0x0068, 0xa867, 0x0103, 0xa87b, 0x0029,
+	0xa877, 0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c, 0x6d7b, 0x080c,
+	0xca21, 0x009e, 0x080c, 0xabdf, 0x0804, 0x9684, 0x9186, 0x0014,
+	0x1120, 0x6004, 0x9082, 0x0040, 0x0018, 0x080c, 0x0d7d, 0x0005,
+	0x0002, 0xbc8a, 0xbc88, 0xbc88, 0xbc88, 0xbc88, 0xbc88, 0xbc88,
+	0xbc88, 0xbc88, 0xbc88, 0xbc88, 0xbca3, 0xbca3, 0xbca3, 0xbca3,
+	0xbc88, 0xbca3, 0xbc88, 0xbca3, 0xbc88, 0xbc88, 0xbc88, 0xbc88,
+	0x080c, 0x0d7d, 0x080c, 0x95c6, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xc832, 0x0168, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000,
+	0xa880, 0xc0ec, 0xa882, 0x080c, 0x6d7b, 0x080c, 0xca21, 0x009e,
+	0x080c, 0xabdf, 0x0005, 0x080c, 0x95c6, 0x080c, 0xca47, 0x090c,
+	0xb5a6, 0x080c, 0xabdf, 0x0005, 0x0002, 0xbcc6, 0xbcc4, 0xbcc4,
+	0xbcc4, 0xbcc4, 0xbcc4, 0xbcc4, 0xbcc4, 0xbcc4, 0xbcc4, 0xbcc4,
+	0xbcc8, 0xbcc8, 0xbcc8, 0xbcc8, 0xbcc4, 0xbcca, 0xbcc4, 0xbcc8,
+	0xbcc4, 0xbcc4, 0xbcc4, 0xbcc4, 0x080c, 0x0d7d, 0x080c, 0x0d7d,
+	0x080c, 0x0d7d, 0x080c, 0xabdf, 0x0804, 0x9684, 0x9182, 0x0057,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbced, 0xbced,
+	0xbced, 0xbced, 0xbced, 0xbd26, 0xbe15, 0xbced, 0xbe21, 0xbced,
+	0xbced, 0xbced, 0xbced, 0xbced, 0xbced, 0xbced, 0xbced, 0xbced,
+	0xbced, 0xbe21, 0xbcef, 0xbced, 0xbe1f, 0x080c, 0x0d7d, 0x00b6,
+	0x0096, 0x6114, 0x2148, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1508,
+	0xa87b, 0x0000, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87c, 0xd0ac,
+	0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbea6, 0x080c, 0x6b91,
+	0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0xb8d0,
+	0x9005, 0x0110, 0x080c, 0x674b, 0x080c, 0xabdf, 0x009e, 0x00be,
+	0x0005, 0xa87c, 0xd0ac, 0x09e0, 0xa838, 0xa934, 0x9105, 0x09c0,
+	0xa880, 0xd0bc, 0x19a8, 0x080c, 0xcb7c, 0x0c80, 0x00b6, 0x0096,
+	0x6114, 0x2148, 0x601c, 0xd0fc, 0x1110, 0x7644, 0x0008, 0x9036,
+	0x96b4, 0x0fff, 0x86ff, 0x1590, 0x6010, 0x2058, 0xb800, 0xd0bc,
+	0x1904, 0xbe04, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0xa87c,
+	0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbea6, 0x080c,
+	0x6b91, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e,
+	0xb8d0, 0x9005, 0x0110, 0x080c, 0x674b, 0x601c, 0xd0fc, 0x1148,
+	0x7044, 0xd0e4, 0x1904, 0xbde8, 0x080c, 0xabdf, 0x009e, 0x00be,
+	0x0005, 0x2009, 0x0211, 0x210c, 0x080c, 0x0d7d, 0x968c, 0x0c00,
+	0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xbdec, 0x7348,
+	0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0508,
+	0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc, 0x01a0,
+	0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34, 0x2100,
+	0x9205, 0x0148, 0x7048, 0x9106, 0x1118, 0x704c, 0x9206, 0x0118,
+	0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007,
+	0x0010, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0x901e, 0xd6c4,
+	0x01d8, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4,
+	0x0804, 0xbd32, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009,
+	0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011,
+	0x0025, 0x080c, 0xc3f8, 0x003e, 0xd6cc, 0x0904, 0xbd47, 0x7154,
+	0xa98a, 0x81ff, 0x0904, 0xbd47, 0x9192, 0x0021, 0x1278, 0x8304,
+	0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xc3f8, 0x2011, 0x0205,
+	0x2013, 0x0000, 0x080c, 0xcef6, 0x0804, 0xbd47, 0xa868, 0xd0fc,
+	0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950, 0x080c,
+	0xc397, 0x00ae, 0x080c, 0xcef6, 0x080c, 0xc3e8, 0x0804, 0xbd49,
+	0x080c, 0xcb3f, 0x0804, 0xbd5e, 0xa87c, 0xd0ac, 0x0904, 0xbd6f,
+	0xa880, 0xd0bc, 0x1904, 0xbd6f, 0x7348, 0xa838, 0x9306, 0x11c8,
+	0x734c, 0xa834, 0x931e, 0x0904, 0xbd6f, 0xd6d4, 0x0190, 0xab38,
+	0x9305, 0x0904, 0xbd6f, 0x0068, 0xa87c, 0xd0ac, 0x0904, 0xbd3a,
+	0xa838, 0xa934, 0x9105, 0x0904, 0xbd3a, 0xa880, 0xd0bc, 0x1904,
+	0xbd3a, 0x080c, 0xcb7c, 0x0804, 0xbd5e, 0x00f6, 0x2079, 0x026c,
+	0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x00fe, 0x0021, 0x0005, 0x0011,
+	0x0005, 0x0005, 0x0096, 0x6003, 0x0002, 0x6007, 0x0043, 0x6014,
+	0x2048, 0xa87c, 0xd0ac, 0x0128, 0x009e, 0x0005, 0x2130, 0x2228,
+	0x0058, 0x2400, 0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213, 0x2600,
+	0x9102, 0x2500, 0x9203, 0x0e90, 0xac46, 0xab4a, 0xae36, 0xad3a,
+	0x6044, 0xd0fc, 0x190c, 0xa8b1, 0x604b, 0x0000, 0x080c, 0x1c3d,
+	0x1118, 0x6144, 0x080c, 0x922c, 0x009e, 0x0005, 0x9182, 0x0057,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbe6d, 0xbe6d,
+	0xbe6d, 0xbe6d, 0xbe6d, 0xbe6d, 0xbe6d, 0xbe6d, 0xbe6d, 0xbe6d,
+	0xbe6f, 0xbe6d, 0xbe6d, 0xbe6d, 0xbe6d, 0xbe80, 0xbe6d, 0xbe6d,
+	0xbe6d, 0xbe6d, 0xbea4, 0xbe6d, 0xbe6d, 0x080c, 0x0d7d, 0x6004,
+	0x9086, 0x0040, 0x1110, 0x080c, 0x95c6, 0x2019, 0x0001, 0x080c,
+	0xa0fa, 0x6003, 0x0002, 0x080c, 0xcf6e, 0x080c, 0x9621, 0x0005,
+	0x6004, 0x9086, 0x0040, 0x1110, 0x080c, 0x95c6, 0x2019, 0x0001,
+	0x080c, 0xa0fa, 0x080c, 0x9621, 0x080c, 0x31ef, 0x080c, 0xcf66,
+	0x0096, 0x6114, 0x2148, 0x080c, 0xc832, 0x0150, 0xa867, 0x0103,
+	0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, 0x6d7b, 0x080c, 0xca21,
+	0x009e, 0x080c, 0xabdf, 0x0005, 0x080c, 0x0d7d, 0xa87b, 0x0015,
+	0xd1fc, 0x0180, 0xa87b, 0x0007, 0x8002, 0x8000, 0x810a, 0x9189,
+	0x0000, 0x0006, 0x0016, 0x2009, 0x1a77, 0x2104, 0x8000, 0x200a,
+	0x001e, 0x000e, 0xa992, 0xa88e, 0x0005, 0x9182, 0x0057, 0x1220,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbedc, 0xbedc, 0xbedc,
+	0xbedc, 0xbedc, 0xbede, 0xbedc, 0xbedc, 0xbf9b, 0xbedc, 0xbedc,
+	0xbedc, 0xbedc, 0xbedc, 0xbedc, 0xbedc, 0xbedc, 0xbedc, 0xbedc,
+	0xc0d9, 0xbedc, 0xc0e3, 0xbedc, 0x080c, 0x0d7d, 0x601c, 0xd0bc,
+	0x0178, 0xd084, 0x0168, 0xd0f4, 0x0120, 0xc084, 0x601e, 0x0804,
+	0xbcce, 0x6114, 0x0096, 0x2148, 0xa87c, 0xc0e5, 0xa87e, 0x009e,
+	0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, 0x2150,
+	0x601c, 0xd0fc, 0x1110, 0x7644, 0x0008, 0x9036, 0xb676, 0x96b4,
+	0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c,
+	0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xbf94,
+	0x9694, 0xff00, 0x9284, 0x0c00, 0x0120, 0x7048, 0xb092, 0x704c,
+	0xb08e, 0x9284, 0x0300, 0x0904, 0xbf94, 0x9686, 0x0100, 0x1130,
+	0x7064, 0x9005, 0x1118, 0xc6c4, 0xb676, 0x0c38, 0x080c, 0x103a,
+	0x090c, 0x0d7d, 0x2900, 0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e,
+	0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872,
+	0x7044, 0x9084, 0xf000, 0x9635, 0xae76, 0x968c, 0x0c00, 0x0120,
+	0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002,
+	0x0180, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc,
+	0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007,
+	0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886,
+	0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a,
+	0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018,
+	0x2011, 0x0025, 0x080c, 0xc3f8, 0x003e, 0xd6cc, 0x01e8, 0x7154,
+	0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098,
+	0x0018, 0x2011, 0x0029, 0x080c, 0xc3f8, 0x2011, 0x0205, 0x2013,
+	0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a,
+	0x0c68, 0x2950, 0x080c, 0xc397, 0x080c, 0x1a55, 0x009e, 0x00ee,
+	0x00ae, 0x007e, 0x0005, 0x2001, 0x1987, 0x2004, 0x604a, 0x0096,
+	0x6114, 0x2148, 0xa83c, 0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc,
+	0xa87e, 0x6003, 0x0002, 0x080c, 0xcf77, 0x0904, 0xc0d4, 0x604b,
+	0x0000, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500,
+	0xd1cc, 0x0904, 0xc099, 0xa978, 0xa868, 0xd0fc, 0x0904, 0xc05a,
+	0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0x00a6, 0x2150, 0xb174,
+	0x9184, 0x00ff, 0x90b6, 0x0002, 0x0904, 0xc028, 0x9086, 0x0028,
+	0x1904, 0xc014, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x0804, 0xc030,
+	0x6024, 0xd0f4, 0x11d0, 0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838,
+	0xaa90, 0x9206, 0x1120, 0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024,
+	0xd0d4, 0x1148, 0xa9ac, 0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838,
+	0x9103, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x6010, 0x00b6, 0x2058,
+	0xb83c, 0x8000, 0xb83e, 0x00be, 0x601c, 0xc0fc, 0x601e, 0x9006,
+	0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4, 0xa87e, 0xd0cc, 0x0140,
+	0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fec, 0x009e,
+	0x080c, 0xcb7c, 0x0804, 0xc0d4, 0xd1dc, 0x0158, 0xa87b, 0x0015,
+	0xb07b, 0x0015, 0x080c, 0xce19, 0x0118, 0xb174, 0xc1dc, 0xb176,
+	0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040,
+	0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbea6,
+	0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9, 0x0020, 0x8a06, 0x8006,
+	0x8007, 0x9094, 0x003f, 0x22e0, 0x9084, 0xffc0, 0x9080, 0x0019,
+	0x2098, 0x4003, 0x00ae, 0x000e, 0xa882, 0x000e, 0xa87e, 0x080c,
+	0xcef6, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0fec, 0x001e,
+	0x0804, 0xc0c6, 0x0016, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff,
+	0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028, 0x1128, 0xa87b, 0x001c,
+	0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b,
+	0x0015, 0x080c, 0xce19, 0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078,
+	0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c,
+	0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbea6, 0xa890,
+	0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e, 0x00ae, 0x080c, 0x0fec,
+	0x009e, 0x080c, 0xcef6, 0xa974, 0x0016, 0x080c, 0xc3e8, 0x001e,
+	0x0468, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002,
+	0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00d0, 0xd1dc,
+	0x0148, 0xa87b, 0x0015, 0x080c, 0xce19, 0x0118, 0xa974, 0xc1dc,
+	0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b, 0x0007, 0x0050, 0xa87b,
+	0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c,
+	0xbea6, 0xa974, 0x0016, 0x080c, 0x6b91, 0x001e, 0x6010, 0x00b6,
+	0x2058, 0xb8d0, 0x0016, 0x9005, 0x190c, 0x674b, 0x001e, 0x00be,
+	0xd1e4, 0x1120, 0x080c, 0xabdf, 0x009e, 0x0005, 0x080c, 0xcb3f,
+	0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0x080c, 0xcf77, 0x190c,
+	0x1a63, 0x009e, 0x0005, 0x0096, 0x6114, 0x2148, 0xa83c, 0xa940,
+	0x9105, 0x01e8, 0xa877, 0x0000, 0xa87b, 0x0000, 0xa867, 0x0103,
+	0x00b6, 0x6010, 0x2058, 0xa834, 0xa938, 0x9115, 0x11a0, 0x080c,
+	0x6b91, 0xba3c, 0x8211, 0x0208, 0xba3e, 0xb8d0, 0x9005, 0x0110,
+	0x080c, 0x674b, 0x080c, 0xabdf, 0x00be, 0x009e, 0x0005, 0xa87c,
+	0xc0dc, 0xa87e, 0x08f8, 0xb800, 0xd0bc, 0x1120, 0xa834, 0x080c,
+	0xbea6, 0x0c28, 0xa880, 0xd0bc, 0x1dc8, 0x080c, 0xcb7c, 0x0c60,
+	0x080c, 0x95c6, 0x0010, 0x080c, 0x9621, 0x601c, 0xd084, 0x0110,
+	0x080c, 0x1a77, 0x080c, 0xc832, 0x01f0, 0x0096, 0x6114, 0x2148,
+	0x080c, 0xca47, 0x1118, 0x080c, 0xb5a6, 0x00a0, 0xa867, 0x0103,
+	0x2009, 0x180c, 0x210c, 0xd18c, 0x1198, 0xd184, 0x1170, 0x6108,
+	0xa97a, 0x918e, 0x0029, 0x1110, 0x080c, 0xe631, 0xa877, 0x0000,
+	0x080c, 0x6d7b, 0x009e, 0x0804, 0xac1a, 0xa87b, 0x0004, 0x0cb0,
+	0xa87b, 0x0004, 0x0c98, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040,
+	0x0208, 0x000a, 0x0005, 0xc16a, 0xc16a, 0xc16a, 0xc16a, 0xc16a,
+	0xc16c, 0xc16a, 0xc16a, 0xc16a, 0xc16a, 0xc16a, 0xc16a, 0xc16a,
+	0xc16a, 0xc16a, 0xc16a, 0xc16a, 0xc16a, 0xc16a, 0xc16a, 0xc190,
+	0xc16a, 0xc16a, 0x080c, 0x0d7d, 0x080c, 0x56dd, 0x01f8, 0x6014,
+	0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294,
+	0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086,
+	0x0139, 0x0128, 0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897,
+	0x4000, 0xa99a, 0xaa9e, 0x080c, 0x6d7b, 0x009e, 0x0804, 0xabdf,
+	0x080c, 0x56dd, 0x0dd8, 0x6014, 0x900e, 0x9016, 0x0c10, 0x9182,
+	0x0085, 0x0002, 0xc1a9, 0xc1a7, 0xc1a7, 0xc1b5, 0xc1a7, 0xc1a7,
+	0xc1a7, 0xc1a7, 0xc1a7, 0xc1a7, 0xc1a7, 0xc1a7, 0xc1a7, 0x080c,
+	0x0d7d, 0x6003, 0x0001, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009,
+	0x8020, 0x080c, 0x9200, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6,
+	0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c, 0xc820,
+	0x01a0, 0x2268, 0x6800, 0x9086, 0x0000, 0x0178, 0x6010, 0x6d10,
+	0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c, 0xc423, 0x00ce, 0x0128,
+	0x6803, 0x0002, 0x6007, 0x0086, 0x0010, 0x6007, 0x0087, 0x6003,
+	0x0001, 0x2009, 0x8020, 0x080c, 0x9200, 0x9280, 0x0004, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824, 0xd0ec, 0x0128,
+	0x00c6, 0x2260, 0x080c, 0xcb7c, 0x00ce, 0x00ee, 0x00de, 0x005e,
+	0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085,
+	0x0a0c, 0x0d7d, 0x908a, 0x0092, 0x1a0c, 0x0d7d, 0x9082, 0x0085,
+	0x00e2, 0x9186, 0x0027, 0x0120, 0x9186, 0x0014, 0x190c, 0x0d7d,
+	0x080c, 0x95c6, 0x0096, 0x6014, 0x2048, 0x080c, 0xc832, 0x0140,
+	0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6d7b,
+	0x009e, 0x080c, 0xac1a, 0x0804, 0x9684, 0xc22a, 0xc22c, 0xc22c,
+	0xc22a, 0xc22a, 0xc22a, 0xc22a, 0xc22a, 0xc22a, 0xc22a, 0xc22a,
+	0xc22a, 0xc22a, 0x080c, 0x0d7d, 0x080c, 0xac1a, 0x0005, 0x9186,
+	0x0013, 0x1130, 0x6004, 0x9082, 0x0085, 0x2008, 0x0804, 0xc27b,
+	0x9186, 0x0027, 0x1558, 0x080c, 0x95c6, 0x080c, 0x31ef, 0x080c,
+	0xcf66, 0x0096, 0x6014, 0x2048, 0x080c, 0xc832, 0x0150, 0xa867,
+	0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6d7b, 0x080c,
+	0xca21, 0x009e, 0x080c, 0xabdf, 0x0005, 0x9186, 0x0089, 0x0118,
+	0x9186, 0x008a, 0x1140, 0x080c, 0xaa9a, 0x0128, 0x9086, 0x000c,
+	0x0904, 0xc2b3, 0x0000, 0x080c, 0xac99, 0x0c70, 0x9186, 0x0014,
+	0x1d60, 0x080c, 0x95c6, 0x0096, 0x6014, 0x2048, 0x080c, 0xc832,
+	0x0d00, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0006, 0xa880,
+	0xc0ec, 0xa882, 0x0890, 0x0002, 0xc28b, 0xc289, 0xc289, 0xc289,
+	0xc289, 0xc289, 0xc29f, 0xc289, 0xc289, 0xc289, 0xc289, 0xc289,
+	0xc289, 0x080c, 0x0d7d, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
+	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1985, 0x0010,
+	0x2001, 0x1986, 0x2004, 0x601a, 0x6003, 0x000c, 0x0005, 0x6034,
+	0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035,
+	0x1118, 0x2001, 0x1985, 0x0010, 0x2001, 0x1986, 0x2004, 0x601a,
+	0x6003, 0x000e, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085,
+	0x0208, 0x0012, 0x0804, 0xac99, 0xc2c9, 0xc2c9, 0xc2c9, 0xc2c9,
+	0xc2cb, 0xc318, 0xc2c9, 0xc2c9, 0xc2c9, 0xc2c9, 0xc2c9, 0xc2c9,
+	0xc2c9, 0x080c, 0x0d7d, 0x0096, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
+	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x009e, 0x0804, 0xc32c,
+	0x080c, 0xc832, 0x1118, 0x080c, 0xca21, 0x0068, 0x6014, 0x2048,
+	0x080c, 0xcf7d, 0x1110, 0x080c, 0xca21, 0xa867, 0x0103, 0x080c,
+	0xcf31, 0x080c, 0x6d7b, 0x00d6, 0x2c68, 0x080c, 0xab89, 0x01d0,
+	0x6003, 0x0001, 0x6007, 0x001e, 0x600b, 0xffff, 0x2009, 0x026e,
+	0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x6910, 0x6112,
+	0x080c, 0xcccb, 0x695c, 0x615e, 0x6023, 0x0001, 0x2009, 0x8020,
+	0x080c, 0x9200, 0x2d60, 0x00de, 0x080c, 0xabdf, 0x009e, 0x0005,
+	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0, 0x6034,
+	0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x0130, 0x9186, 0x001e,
+	0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c, 0xcec9,
+	0x11f0, 0x080c, 0xab89, 0x01d8, 0x6106, 0x6003, 0x0001, 0x6023,
+	0x0001, 0x6910, 0x6112, 0x692c, 0x612e, 0x6930, 0x6132, 0x6934,
+	0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, 0x693c, 0x613e, 0x695c,
+	0x615e, 0x080c, 0xcccb, 0x2009, 0x8020, 0x080c, 0x9200, 0x2d60,
+	0x00de, 0x0804, 0xabdf, 0x0096, 0x6014, 0x2048, 0x080c, 0xc832,
+	0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec, 0xa882,
+	0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020,
+	0xa87b, 0x0005, 0x080c, 0xcb3b, 0xa877, 0x0000, 0x080c, 0x6d7b,
+	0x080c, 0xca21, 0x009e, 0x0804, 0xabdf, 0x0016, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xc832, 0x0140, 0xa867, 0x0103, 0xa87b, 0x0028,
+	0xa877, 0x0000, 0x080c, 0x6d7b, 0x009e, 0x001e, 0x9186, 0x0013,
+	0x0158, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c,
+	0xac99, 0x0020, 0x080c, 0x95c6, 0x080c, 0xac1a, 0x0005, 0x0056,
+	0x0066, 0x0096, 0x00a6, 0x2029, 0x0001, 0x9182, 0x0101, 0x1208,
+	0x0010, 0x2009, 0x0100, 0x2130, 0x8304, 0x9098, 0x0018, 0x2009,
+	0x0020, 0x2011, 0x0029, 0x080c, 0xc3f8, 0x96b2, 0x0020, 0xb004,
+	0x904d, 0x0110, 0x080c, 0x0fec, 0x080c, 0x103a, 0x0520, 0x8528,
+	0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d,
+	0x1228, 0x2608, 0x2011, 0x001b, 0x0499, 0x00a8, 0x96b2, 0x003c,
+	0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x0451, 0x0c28, 0x2001,
+	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566,
+	0x95ac, 0x0000, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae,
+	0x852f, 0x95ad, 0x0003, 0xb566, 0x009e, 0x006e, 0x005e, 0x0005,
+	0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055, 0x0130, 0xa807, 0x0000,
+	0x080c, 0x6d7b, 0x2a48, 0x0cb8, 0x080c, 0x6d7b, 0x00ae, 0x0005,
+	0x00f6, 0x2079, 0x0200, 0x7814, 0x9085, 0x0080, 0x7816, 0xd184,
+	0x0108, 0x8108, 0x810c, 0x20a9, 0x0001, 0xa860, 0x20e8, 0xa85c,
+	0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300, 0x9e00, 0x2098, 0x4003,
+	0x8318, 0x9386, 0x0020, 0x1148, 0x2018, 0x2300, 0x9e00, 0x2098,
+	0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x8109, 0x1d80, 0x7817,
+	0x0000, 0x00fe, 0x0005, 0x0066, 0x0126, 0x2091, 0x8000, 0x2031,
+	0x0001, 0x6020, 0x9084, 0x000f, 0x0083, 0x012e, 0x006e, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x0066, 0x2031, 0x0000, 0x6020, 0x9084,
+	0x000f, 0x001b, 0x006e, 0x012e, 0x0005, 0xc475, 0xc475, 0xc470,
+	0xc499, 0xc44d, 0xc470, 0xc44f, 0xc470, 0xc44d, 0x90c6, 0xc470,
+	0xc470, 0xc470, 0xc44d, 0xc44d, 0xc44d, 0x080c, 0x0d7d, 0x6010,
+	0x9080, 0x0000, 0x2004, 0xd0bc, 0x190c, 0xc499, 0x0036, 0x6014,
+	0x0096, 0x2048, 0xa880, 0x009e, 0xd0cc, 0x0118, 0x2019, 0x000c,
+	0x0038, 0xd094, 0x0118, 0x2019, 0x000d, 0x0010, 0x2019, 0x0010,
+	0x080c, 0xde2a, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005,
+	0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x0096, 0x86ff, 0x11e8,
+	0x6014, 0x2048, 0x080c, 0xc832, 0x01d0, 0x6043, 0xffff, 0xa864,
+	0x9086, 0x0139, 0x1128, 0xa87b, 0x0005, 0xa883, 0x0000, 0x0028,
+	0x900e, 0x2001, 0x0005, 0x080c, 0x6faf, 0x080c, 0xcb3b, 0x080c,
+	0x6d6f, 0x080c, 0xac1a, 0x9085, 0x0001, 0x009e, 0x0005, 0x9006,
+	0x0ce0, 0x080c, 0xa888, 0x080c, 0xcf8b, 0x6000, 0x908a, 0x0016,
+	0x1a0c, 0x0d7d, 0x002b, 0x0106, 0x080c, 0xa8a4, 0x010e, 0x0005,
+	0xc4b8, 0xc4e6, 0xc4ba, 0xc50d, 0xc4e1, 0xc4b8, 0xc470, 0xc475,
+	0xc475, 0xc470, 0xc470, 0xc470, 0xc470, 0xc470, 0xc470, 0xc470,
+	0x080c, 0x0d7d, 0x86ff, 0x1510, 0x6020, 0x9086, 0x0006, 0x01f0,
+	0x0096, 0x6014, 0x2048, 0x080c, 0xc832, 0x0158, 0xa87c, 0xd0cc,
+	0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fec, 0x009e, 0x080c,
+	0xcb3b, 0x009e, 0x080c, 0xcf0b, 0x6007, 0x0085, 0x6003, 0x000b,
+	0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x91e2, 0x9085, 0x0001,
+	0x0005, 0x0066, 0x080c, 0x1a77, 0x006e, 0x08a0, 0x00e6, 0x2071,
+	0x19e6, 0x7030, 0x9c06, 0x1120, 0x080c, 0xa07a, 0x00ee, 0x0850,
+	0x6020, 0x9084, 0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096,
+	0x2049, 0x0001, 0x2c40, 0x080c, 0xa1fa, 0x009e, 0x008e, 0x0040,
+	0x0066, 0x080c, 0x9f76, 0x190c, 0x0d7d, 0x080c, 0x9f84, 0x006e,
+	0x00ee, 0x1904, 0xc4ba, 0x0804, 0xc470, 0x0036, 0x00e6, 0x2071,
+	0x19e6, 0x704c, 0x9c06, 0x1138, 0x901e, 0x080c, 0xa0fa, 0x00ee,
+	0x003e, 0x0804, 0xc4ba, 0x080c, 0xa331, 0x00ee, 0x003e, 0x1904,
+	0xc4ba, 0x0804, 0xc470, 0x00c6, 0x0066, 0x6020, 0x9084, 0x000f,
+	0x001b, 0x006e, 0x00ce, 0x0005, 0xc543, 0xc612, 0xc779, 0xc54b,
+	0xac1a, 0xc543, 0xde1c, 0xcf73, 0xc612, 0x908d, 0xc7f8, 0xc53c,
+	0xc53c, 0xc53c, 0xc53c, 0xc53c, 0x080c, 0x0d7d, 0x080c, 0xca47,
+	0x1110, 0x080c, 0xb5a6, 0x0005, 0x080c, 0x95c6, 0x0804, 0xabdf,
+	0x601b, 0x0001, 0x0005, 0x080c, 0xc832, 0x0130, 0x6014, 0x0096,
+	0x2048, 0x2c00, 0xa896, 0x009e, 0x080c, 0xa888, 0x080c, 0xcf8b,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x0804, 0xa8a4,
+	0xc570, 0xc572, 0xc59c, 0xc5b0, 0xc5dd, 0xc570, 0xc543, 0xc543,
+	0xc543, 0xc5b7, 0xc5b7, 0xc570, 0xc570, 0xc570, 0xc570, 0xc5c1,
+	0x080c, 0x0d7d, 0x00e6, 0x6014, 0x0096, 0x2048, 0xa880, 0xc0b5,
+	0xa882, 0x009e, 0x2071, 0x19e6, 0x7030, 0x9c06, 0x01d0, 0x0066,
+	0x080c, 0x9f76, 0x190c, 0x0d7d, 0x080c, 0x9f84, 0x006e, 0x080c,
+	0xcf0b, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2001,
+	0x1986, 0x2004, 0x601a, 0x2009, 0x8020, 0x080c, 0x91e2, 0x00ee,
+	0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880,
+	0xc0b5, 0xa882, 0x009e, 0x080c, 0xcf0b, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x91e2, 0x0005,
+	0x080c, 0xa888, 0x080c, 0xaa1c, 0x080c, 0xa8a4, 0x0c28, 0x0096,
+	0x601b, 0x0001, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e,
+	0x0005, 0x080c, 0x56dd, 0x01b8, 0x6014, 0x0096, 0x904d, 0x0190,
+	0xa864, 0xa867, 0x0103, 0xa87b, 0x0006, 0x9086, 0x0139, 0x1150,
+	0xa867, 0x0139, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa89b, 0x0004,
+	0x080c, 0x6d7b, 0x009e, 0x0804, 0xabdf, 0x6014, 0x0096, 0x904d,
+	0x0560, 0xa97c, 0xd1e4, 0x1158, 0x611c, 0xd1fc, 0x0530, 0x6110,
+	0x00b6, 0x2158, 0xb93c, 0x8109, 0x0208, 0xb93e, 0x00be, 0x080c,
+	0xa8a4, 0x2001, 0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005,
+	0xa884, 0x009e, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001,
+	0x0037, 0x2c08, 0x080c, 0x1686, 0x6000, 0x9086, 0x0004, 0x1120,
+	0x2009, 0x0048, 0x080c, 0xac7c, 0x0005, 0x009e, 0x080c, 0x1a77,
+	0x0804, 0xc59c, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x000b,
+	0x0005, 0xc629, 0xc548, 0xc62b, 0xc629, 0xc62b, 0xc62b, 0xc544,
+	0xc629, 0xc53e, 0xc53e, 0xc629, 0xc629, 0xc629, 0xc629, 0xc629,
+	0xc629, 0x080c, 0x0d7d, 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084,
+	0x00ff, 0x00be, 0x908a, 0x000c, 0x1a0c, 0x0d7d, 0x00b6, 0x0013,
+	0x00be, 0x0005, 0xc646, 0xc713, 0xc648, 0xc688, 0xc648, 0xc688,
+	0xc648, 0xc656, 0xc646, 0xc688, 0xc646, 0xc677, 0x080c, 0x0d7d,
+	0x6004, 0x908e, 0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e,
+	0x0002, 0x0590, 0x908e, 0x0052, 0x0904, 0xc70f, 0x6004, 0x080c,
+	0xca47, 0x0904, 0xc72c, 0x908e, 0x0004, 0x1110, 0x080c, 0x321e,
+	0x908e, 0x0021, 0x0904, 0xc730, 0x908e, 0x0022, 0x0904, 0xc774,
+	0x908e, 0x003d, 0x0904, 0xc730, 0x908e, 0x0039, 0x0904, 0xc734,
+	0x908e, 0x0035, 0x0904, 0xc734, 0x908e, 0x001e, 0x0178, 0x908e,
+	0x0001, 0x1140, 0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x0110, 0x080c, 0x31ef, 0x080c, 0xb5a6, 0x0804, 0xac1a,
+	0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0904, 0xc700, 0x9186,
+	0x0002, 0x1904, 0xc6d5, 0x2001, 0x1837, 0x2004, 0xd08c, 0x11c8,
+	0x080c, 0x74c8, 0x11b0, 0x080c, 0xcf51, 0x0138, 0x080c, 0x74eb,
+	0x1120, 0x080c, 0x73d3, 0x0804, 0xc75d, 0x2001, 0x197c, 0x2003,
+	0x0001, 0x2001, 0x1800, 0x2003, 0x0001, 0x080c, 0x73f9, 0x0804,
+	0xc75d, 0x6010, 0x2058, 0x2001, 0x1837, 0x2004, 0xd0ac, 0x1904,
+	0xc75d, 0xb8a0, 0x9084, 0xff80, 0x1904, 0xc75d, 0xb840, 0x9084,
+	0x00ff, 0x9005, 0x0190, 0x8001, 0xb842, 0x6017, 0x0000, 0x6023,
+	0x0007, 0x601b, 0x0398, 0x604b, 0x0000, 0x080c, 0xab89, 0x0128,
+	0x2b00, 0x6012, 0x6023, 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004,
+	0x908e, 0x0002, 0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e,
+	0x1170, 0x2009, 0x1837, 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071,
+	0x1800, 0x080c, 0x5fb7, 0x00ee, 0x080c, 0xb5a6, 0x0030, 0x080c,
+	0xb5a6, 0x080c, 0x31ef, 0x080c, 0xcf66, 0x00e6, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x321e, 0x012e, 0x00ee, 0x080c, 0xac1a, 0x0005,
+	0x2001, 0x0002, 0x080c, 0x6570, 0x6003, 0x0001, 0x6007, 0x0002,
+	0x080c, 0x9207, 0x080c, 0x9684, 0x00de, 0x00ce, 0x0c80, 0x080c,
+	0x321e, 0x0804, 0xc684, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016,
+	0x0d38, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904,
+	0xc6d5, 0x8001, 0xb842, 0x6003, 0x0001, 0x080c, 0x9207, 0x080c,
+	0x9684, 0x00de, 0x00ce, 0x0898, 0x080c, 0xb5a6, 0x0804, 0xc686,
+	0x080c, 0xb5e2, 0x0804, 0xc686, 0x00d6, 0x2c68, 0x6104, 0x080c,
+	0xcec9, 0x00de, 0x0118, 0x080c, 0xabdf, 0x00f0, 0x6004, 0x8007,
+	0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x603c, 0x600a, 0x2001, 0x1986, 0x2004,
+	0x601a, 0x602c, 0x2c08, 0x2060, 0x6024, 0xc0b5, 0x6026, 0x2160,
+	0x2009, 0x8020, 0x080c, 0x9200, 0x0005, 0x00de, 0x00ce, 0x080c,
+	0xb5a6, 0x080c, 0x31ef, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x321e, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x604b,
+	0x0000, 0x012e, 0x00ee, 0x0005, 0x080c, 0xb01a, 0x1904, 0xc72c,
+	0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0096, 0x00d6,
+	0x001b, 0x00de, 0x009e, 0x0005, 0xc794, 0xc794, 0xc794, 0xc794,
+	0xc794, 0xc794, 0xc794, 0xc794, 0xc794, 0xc543, 0xc794, 0xc548,
+	0xc796, 0xc548, 0xc7a3, 0xc794, 0x080c, 0x0d7d, 0x6004, 0x9086,
+	0x008b, 0x0148, 0x6007, 0x008b, 0x6003, 0x000d, 0x2009, 0x8020,
+	0x080c, 0x9200, 0x0005, 0x080c, 0xcf45, 0x0118, 0x080c, 0xcf58,
+	0x0010, 0x080c, 0xcf66, 0x080c, 0xca21, 0x080c, 0xc832, 0x0570,
+	0x080c, 0x31ef, 0x080c, 0xc832, 0x0168, 0x6014, 0x2048, 0xa867,
+	0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882,
+	0x080c, 0x6d7b, 0x2c68, 0x080c, 0xab89, 0x0150, 0x6810, 0x6012,
+	0x080c, 0xcccb, 0x00c6, 0x2d60, 0x080c, 0xac1a, 0x00ce, 0x0008,
+	0x2d60, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003,
+	0x0001, 0x080c, 0x9207, 0x080c, 0x9684, 0x00c8, 0x080c, 0xcf45,
+	0x0138, 0x6034, 0x9086, 0x4000, 0x1118, 0x080c, 0x31ef, 0x08d0,
+	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186,
+	0x0035, 0x1118, 0x080c, 0x31ef, 0x0868, 0x080c, 0xac1a, 0x0005,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0002, 0xc80e, 0xc80e,
+	0xc810, 0xc810, 0xc810, 0xc80e, 0xc80e, 0xac1a, 0xc80e, 0xc80e,
+	0xc80e, 0xc80e, 0xc80e, 0xc80e, 0xc80e, 0xc80e, 0x080c, 0x0d7d,
+	0x080c, 0xa888, 0x080c, 0xaa1c, 0x080c, 0xa8a4, 0x6114, 0x0096,
+	0x2148, 0xa87b, 0x0006, 0x080c, 0x6d7b, 0x009e, 0x0804, 0xabdf,
+	0x9284, 0x0003, 0x1158, 0x9282, 0x1ddc, 0x0240, 0x2001, 0x181a,
+	0x2004, 0x9202, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8,
+	0x0096, 0x0028, 0x0096, 0x0006, 0x6014, 0x2048, 0x000e, 0x0006,
+	0x9984, 0xf000, 0x9086, 0xf000, 0x0110, 0x080c, 0x10e5, 0x000e,
+	0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7354, 0x7074, 0x9302,
+	0x1640, 0x6020, 0x9206, 0x11f8, 0x080c, 0xcf51, 0x0180, 0x9286,
+	0x0001, 0x1168, 0x6004, 0x9086, 0x0004, 0x1148, 0x080c, 0x31ef,
+	0x080c, 0xcf66, 0x00c6, 0x080c, 0xac1a, 0x00ce, 0x0060, 0x080c,
+	0xcc3d, 0x0148, 0x080c, 0xca47, 0x1110, 0x080c, 0xb5a6, 0x00c6,
+	0x080c, 0xabdf, 0x00ce, 0x9ce0, 0x001c, 0x7068, 0x9c02, 0x1208,
+	0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
+	0x00c6, 0x0016, 0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, 0x2061,
+	0x1b31, 0x6112, 0x080c, 0x31ef, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xab89, 0x01b0, 0x665e, 0x2b00, 0x6012, 0x080c, 0x56dd,
+	0x0118, 0x080c, 0xc963, 0x0168, 0x080c, 0xcccb, 0x6023, 0x0003,
+	0x2009, 0x004b, 0x080c, 0xac7c, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0,
+	0x080c, 0xac4f, 0x0580, 0x605f, 0x0000, 0x2b00, 0x6012, 0x080c,
+	0xcccb, 0x6023, 0x0003, 0x0016, 0x080c, 0xa888, 0x080c, 0x938d,
+	0x0076, 0x903e, 0x080c, 0x9256, 0x2c08, 0x080c, 0xdffb, 0x007e,
+	0x080c, 0xa8a4, 0x001e, 0xd184, 0x0128, 0x080c, 0xabdf, 0x9085,
+	0x0001, 0x0070, 0x080c, 0x56dd, 0x0128, 0xd18c, 0x1170, 0x080c,
+	0xc963, 0x0148, 0x2009, 0x004c, 0x080c, 0xac7c, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90,
+	0x2009, 0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046,
+	0x0016, 0x080c, 0xab89, 0x2c78, 0x0590, 0x7e5e, 0x2b00, 0x7812,
+	0x7823, 0x0003, 0x2021, 0x0005, 0x080c, 0xc975, 0x9186, 0x004d,
+	0x0118, 0x9186, 0x004e, 0x0148, 0x2001, 0x197f, 0x200c, 0xd1fc,
+	0x0168, 0x2f60, 0x080c, 0xabdf, 0x00d0, 0x2001, 0x197e, 0x200c,
+	0xd1fc, 0x0120, 0x2f60, 0x080c, 0xabdf, 0x0088, 0x2f60, 0x080c,
+	0x56dd, 0x0138, 0xd18c, 0x1118, 0x04f1, 0x0148, 0x0010, 0x2900,
+	0x7816, 0x001e, 0x0016, 0x080c, 0xac7c, 0x9085, 0x0001, 0x001e,
+	0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046, 0x080c,
+	0xab89, 0x2c78, 0x0508, 0x7e5e, 0x2b00, 0x7812, 0x7823, 0x0003,
+	0x0096, 0x2021, 0x0004, 0x0489, 0x009e, 0x2001, 0x197d, 0x200c,
+	0xd1fc, 0x0120, 0x2f60, 0x080c, 0xabdf, 0x0060, 0x2f60, 0x080c,
+	0x56dd, 0x0120, 0xd18c, 0x1160, 0x0071, 0x0130, 0x2009, 0x0052,
+	0x080c, 0xac7c, 0x9085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005,
+	0x2900, 0x7816, 0x0c98, 0x00c6, 0x080c, 0x4aa9, 0x00ce, 0x1120,
+	0x080c, 0xabdf, 0x9006, 0x0005, 0xa867, 0x0000, 0xa86b, 0x8000,
+	0x2900, 0x6016, 0x9085, 0x0001, 0x0005, 0x0096, 0x0076, 0x0126,
+	0x2091, 0x8000, 0x080c, 0xa888, 0x080c, 0x6802, 0x0158, 0x2001,
+	0xc97c, 0x0006, 0x900e, 0x2400, 0x080c, 0x6faf, 0x080c, 0x6d7b,
+	0x000e, 0x0807, 0x2418, 0x080c, 0x958c, 0xbaa0, 0x0086, 0x2041,
+	0x0001, 0x2039, 0x0001, 0x2608, 0x080c, 0x93a7, 0x008e, 0x080c,
+	0x9256, 0x2f08, 0x2648, 0x080c, 0xdffb, 0xb93c, 0x81ff, 0x090c,
+	0x947e, 0x080c, 0xa8a4, 0x012e, 0x007e, 0x009e, 0x0005, 0x00c6,
+	0x0126, 0x2091, 0x8000, 0x080c, 0xab89, 0x0190, 0x660a, 0x2b08,
+	0x6112, 0x080c, 0xcccb, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009,
+	0x001f, 0x080c, 0xac7c, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
+	0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xac4f,
+	0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c, 0xcccb, 0x6023, 0x0008,
+	0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c, 0x173e, 0x00fe, 0x2009,
+	0x0021, 0x080c, 0xac7c, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
+	0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6, 0x0126, 0x0016, 0x2091,
+	0x8000, 0x080c, 0xab89, 0x0198, 0x660a, 0x2b08, 0x6112, 0x080c,
+	0xcccb, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x0016, 0x080c,
+	0xac7c, 0x9085, 0x0001, 0x001e, 0x012e, 0x00ce, 0x0005, 0x9006,
+	0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xac4f, 0x0188,
+	0x2b08, 0x6112, 0x080c, 0xcccb, 0x6023, 0x0001, 0x2900, 0x6016,
+	0x2009, 0x0000, 0x080c, 0xac7c, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044, 0x0830, 0x2009, 0x0049,
+	0x0818, 0x0026, 0x00b6, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0118,
+	0x8211, 0xba3e, 0x1140, 0xb8d0, 0x9005, 0x0128, 0xb888, 0x9005,
+	0x1110, 0xb88b, 0x0001, 0x00be, 0x002e, 0x0005, 0x0006, 0x0016,
+	0x6004, 0x908e, 0x0002, 0x0140, 0x908e, 0x0003, 0x0128, 0x908e,
+	0x0004, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006,
+	0x0086, 0x0096, 0x6020, 0x9086, 0x0004, 0x01a8, 0x6014, 0x904d,
+	0x080c, 0xc832, 0x0180, 0xa864, 0x9086, 0x0139, 0x0170, 0x6020,
+	0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002, 0x0128, 0xa868, 0xd0fc,
+	0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x008e, 0x000e,
+	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xac4f, 0x0198,
+	0x2b08, 0x6112, 0x080c, 0xcccb, 0x6023, 0x0001, 0x2900, 0x6016,
+	0x080c, 0x31ef, 0x2009, 0x0028, 0x080c, 0xac7c, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015, 0x11a8,
+	0x2011, 0x1824, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6, 0x080c,
+	0xb7fa, 0x00be, 0x080c, 0xba1d, 0x6003, 0x0001, 0x6007, 0x0029,
+	0x080c, 0x9207, 0x080c, 0x9684, 0x0078, 0x6014, 0x0096, 0x2048,
+	0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c, 0xce8a,
+	0x080c, 0xb5a6, 0x080c, 0xabdf, 0x0005, 0x0096, 0x6014, 0x904d,
+	0x090c, 0x0d7d, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005,
+	0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6d7b, 0x012e, 0x009e, 0x080c, 0xabdf, 0x0c30, 0x0096, 0x9186,
+	0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x6570, 0x00e8, 0x9186,
+	0x0015, 0x1510, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014, 0x11e0,
+	0x6010, 0x00b6, 0x2058, 0x080c, 0x66bb, 0x00be, 0x080c, 0xbaee,
+	0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005, 0x0160,
+	0x2001, 0x0006, 0x080c, 0x6570, 0x6014, 0x2048, 0xa868, 0xd0fc,
+	0x0170, 0x080c, 0xafee, 0x0048, 0x6014, 0x2048, 0xa868, 0xd0fc,
+	0x0528, 0x080c, 0xb5a6, 0x080c, 0xabdf, 0x009e, 0x0005, 0x6014,
+	0x6310, 0x2358, 0x904d, 0x090c, 0x0d7d, 0xa87b, 0x0000, 0xa883,
+	0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x6913, 0x1108, 0xc185,
+	0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6d7b, 0x012e, 0x080c, 0xabdf, 0x08f8, 0x6014, 0x904d,
+	0x090c, 0x0d7d, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005,
+	0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6d7b, 0x012e, 0x080c, 0xabdf, 0x0840, 0xa878, 0x9086, 0x0005,
+	0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005, 0x604b,
+	0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x2009,
+	0x8023, 0x080c, 0x9200, 0x0005, 0x00c6, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x0130, 0x0066, 0x6020, 0x9084, 0x000f,
+	0x001b, 0x006e, 0x00ce, 0x0005, 0xc543, 0xcb6e, 0xcb6e, 0xcb71,
+	0xe328, 0xe343, 0xe346, 0xc543, 0xc543, 0xc543, 0xc543, 0xc543,
+	0xc543, 0xc543, 0xc543, 0xc543, 0x080c, 0x0d7d, 0xa001, 0xa001,
+	0x0005, 0x0096, 0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110,
+	0x009e, 0x0010, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0550, 0x2001, 0x1834, 0x2004, 0x9005, 0x1540,
+	0x00f6, 0x2c78, 0x080c, 0xab89, 0x0508, 0x7810, 0x6012, 0x080c,
+	0xcccb, 0x7820, 0x9086, 0x0003, 0x0128, 0x7808, 0x603a, 0x2f00,
+	0x603e, 0x0020, 0x7808, 0x603e, 0x2f00, 0x603a, 0x602e, 0x6023,
+	0x0001, 0x6007, 0x0035, 0x6003, 0x0001, 0x795c, 0x615e, 0x2009,
+	0x8020, 0x080c, 0x9200, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe,
+	0x2001, 0x1987, 0x2004, 0x604a, 0x0005, 0x0016, 0x0096, 0x6814,
+	0x2048, 0x681c, 0xd0fc, 0xc0fc, 0x681e, 0xa87c, 0x1108, 0xd0e4,
+	0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000, 0xa88f,
+	0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048, 0x080c,
+	0x0fec, 0x6830, 0x6036, 0x908e, 0x0001, 0x0148, 0x6803, 0x0002,
+	0x9086, 0x0005, 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0, 0x681c,
+	0xc085, 0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085, 0x0c00,
+	0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0, 0x693c,
+	0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc, 0x683a,
+	0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112, 0x695c,
+	0x615e, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001, 0x2009,
+	0x8020, 0x080c, 0x9200, 0x009e, 0x001e, 0x0005, 0x6024, 0xd0d4,
+	0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303, 0x0230,
+	0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a, 0x633e,
+	0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402, 0xa836,
+	0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024, 0xc0d4,
+	0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a, 0xa840,
+	0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016, 0x6004,
+	0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e, 0x0036,
+	0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158, 0x908e,
+	0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b, 0x0110,
+	0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026,
+	0x0036, 0x00e6, 0x2001, 0x1981, 0x200c, 0x8000, 0x2014, 0x2001,
+	0x0032, 0x080c, 0x9148, 0x2001, 0x1985, 0x82ff, 0x1110, 0x2011,
+	0x0014, 0x2202, 0x2001, 0x1983, 0x200c, 0x8000, 0x2014, 0x2071,
+	0x196b, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x9148, 0x2001,
+	0x1986, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1987,
+	0x9288, 0x000a, 0x2102, 0x2001, 0x0017, 0x080c, 0xa879, 0x2001,
+	0x1a88, 0x2102, 0x2001, 0x0032, 0x080c, 0x1686, 0x080c, 0x6a4b,
+	0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016,
+	0x00e6, 0x2001, 0x1985, 0x2003, 0x0028, 0x2001, 0x1986, 0x2003,
+	0x0014, 0x2071, 0x196b, 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001,
+	0x1987, 0x2009, 0x001e, 0x2102, 0x2001, 0x0017, 0x080c, 0xa879,
+	0x2001, 0x1a88, 0x2102, 0x2001, 0x0032, 0x080c, 0x1686, 0x00ee,
+	0x001e, 0x000e, 0x0005, 0x0096, 0x6060, 0x904d, 0x0110, 0x080c,
+	0x106c, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xab89, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023, 0x0001,
+	0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0xac7c, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6, 0x00f6,
+	0x2071, 0x1800, 0x9186, 0x0015, 0x1500, 0x7090, 0x9086, 0x0018,
+	0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78, 0x080c,
+	0x9743, 0x01d8, 0x707c, 0xaa50, 0x9206, 0x1160, 0x7080, 0xaa54,
+	0x9206, 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x900e,
+	0x080c, 0x323e, 0x080c, 0xafee, 0x0020, 0x080c, 0xb5a6, 0x080c,
+	0xabdf, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa54, 0x9206,
+	0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xab89,
+	0x0188, 0x2b08, 0x6112, 0x080c, 0xcccb, 0x6023, 0x0001, 0x2900,
+	0x6016, 0x2009, 0x004d, 0x080c, 0xac7c, 0x9085, 0x0001, 0x012e,
+	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x0016, 0x080c, 0xab89, 0x0180, 0x2b08, 0x6112, 0x080c, 0xcccb,
+	0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0xac7c, 0x9085,
+	0x0001, 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0, 0x0016,
+	0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6, 0x00f6,
+	0x2071, 0x1800, 0x9186, 0x0015, 0x1568, 0x7190, 0x6014, 0x2048,
+	0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001, 0x199f,
+	0x2003, 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906, 0x8006,
+	0x8007, 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080, 0x001b,
+	0x20a0, 0x2001, 0x199f, 0x0016, 0x200c, 0x080c, 0xd572, 0x001e,
+	0xa804, 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048, 0xa867,
+	0x0103, 0x0010, 0x080c, 0xb5a6, 0x080c, 0xabdf, 0x00fe, 0x00ee,
+	0x009e, 0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005,
+	0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x11b8,
+	0x7090, 0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78, 0x080c,
+	0x9743, 0x01a8, 0x707c, 0xaa74, 0x9206, 0x1130, 0x7080, 0xaa78,
+	0x9206, 0x1110, 0x080c, 0x31ef, 0x080c, 0xafee, 0x0020, 0x080c,
+	0xb5a6, 0x080c, 0xabdf, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060,
+	0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6, 0x2071,
+	0x1800, 0x9186, 0x0015, 0x1550, 0x7090, 0x9086, 0x0004, 0x1530,
+	0x6014, 0x2048, 0x2c78, 0x080c, 0x9743, 0x05f0, 0x707c, 0xaacc,
+	0x9206, 0x1180, 0x7080, 0xaad0, 0x9206, 0x1160, 0x080c, 0x31ef,
+	0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x568d,
+	0x001e, 0x0010, 0x080c, 0x5476, 0x080c, 0xc832, 0x0508, 0xa87b,
+	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c, 0xc832,
+	0x01b8, 0x6014, 0x2048, 0x080c, 0x5476, 0x1d70, 0xa87b, 0x0030,
+	0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126, 0x2091,
+	0x8000, 0xa867, 0x0139, 0x080c, 0x6d7b, 0x012e, 0x080c, 0xabdf,
+	0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaad0, 0x9206, 0x0930,
+	0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938, 0xaa34,
+	0x2100, 0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c, 0x9206,
+	0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e, 0x0005,
+	0x00b6, 0x00d6, 0x0036, 0x080c, 0xc832, 0x0904, 0xce86, 0x0096,
+	0x6314, 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580, 0x6310,
+	0x00c6, 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140, 0x080c,
+	0x6913, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96,
+	0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031,
+	0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c,
+	0x0fb7, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8c8,
+	0x9080, 0x000a, 0x2098, 0x080c, 0x0fb7, 0x00ce, 0x0090, 0xaa96,
+	0x3918, 0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016, 0x0110,
+	0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084, 0x00ff,
+	0xa89e, 0x080c, 0x6d6f, 0x6017, 0x0000, 0x009e, 0x003e, 0x00de,
+	0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096, 0x00f6,
+	0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096, 0x0000,
+	0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x2614, 0x2118,
+	0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d, 0x7c3c,
+	0x2011, 0x8018, 0x080c, 0x4b09, 0x00a8, 0x9096, 0x0001, 0x1148,
+	0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa,
+	0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838, 0xa8a6,
+	0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e, 0x002e,
+	0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110, 0x6a38,
+	0x0008, 0x6a2c, 0x080c, 0xc820, 0x01f0, 0x2260, 0x6120, 0x9186,
+	0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206, 0x0140,
+	0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140, 0x0020,
+	0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106, 0x001e,
+	0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974, 0xd1cc,
+	0x0188, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8, 0x918c,
+	0x0f00, 0x810f, 0x918e, 0x0001, 0x1128, 0xa834, 0xa938, 0x9115,
+	0x190c, 0xbea6, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010, 0x0036,
+	0x901e, 0x0499, 0x01e0, 0x080c, 0xc832, 0x01c8, 0x080c, 0xca21,
+	0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096, 0x2048, 0xa87c,
+	0x080c, 0xca47, 0x1118, 0x080c, 0xb5a6, 0x0040, 0xa867, 0x0103,
+	0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x6d7b, 0x009e, 0x003e,
+	0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec, 0xa882,
+	0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005,
+	0x080c, 0xcb3b, 0xa877, 0x0000, 0x0005, 0x2001, 0x1810, 0x2004,
+	0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4, 0x000e,
+	0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e, 0x0005,
+	0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021,
+	0x0007, 0x080c, 0x4cc0, 0x004e, 0x003e, 0x0005, 0x0c51, 0x1d81,
+	0x0005, 0x2001, 0x1985, 0x2004, 0x601a, 0x0005, 0x2001, 0x1987,
+	0x2004, 0x604a, 0x0005, 0x080c, 0xabdf, 0x0804, 0x9684, 0x611c,
+	0xd1fc, 0xa97c, 0x1108, 0xd1e4, 0x0005, 0x601c, 0xd0fc, 0xa87c,
+	0x1108, 0xd0e4, 0x0005, 0x601c, 0xd0fc, 0xc0fc, 0x601e, 0xa87c,
+	0x1108, 0xd0e4, 0x0005, 0x6044, 0xd0fc, 0x1138, 0xd0bc, 0x0198,
+	0xc0bc, 0x6046, 0x6003, 0x0002, 0x0070, 0xd0ac, 0x1160, 0xd0dc,
 	0x1128, 0x908c, 0x000f, 0x9186, 0x0005, 0x1118, 0x6003, 0x0003,
 	0x0010, 0x6003, 0x0001, 0x0005, 0x00b6, 0x0066, 0x6000, 0x90b2,
-	0x0016, 0x1a0c, 0x0d7d, 0x001b, 0x006e, 0x00be, 0x0005, 0xcfb7,
-	0xd6c0, 0xd811, 0xcfb7, 0xcfb7, 0xcfb7, 0xcfb7, 0xcfb7, 0xcfee,
-	0xd893, 0xcfb7, 0xcfb7, 0xcfb7, 0xcfb7, 0xcfb7, 0xcfb7, 0x080c,
+	0x0016, 0x1a0c, 0x0d7d, 0x001b, 0x006e, 0x00be, 0x0005, 0xcfbf,
+	0xd6cd, 0xd81e, 0xcfbf, 0xcfbf, 0xcfbf, 0xcfbf, 0xcfbf, 0xcff6,
+	0xd8a2, 0xcfbf, 0xcfbf, 0xcfbf, 0xcfbf, 0xcfbf, 0xcfbf, 0x080c,
 	0x0d7d, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d7d, 0x0013,
-	0x006e, 0x0005, 0xcfd2, 0xddaa, 0xcfd2, 0xcfd2, 0xcfd2, 0xcfd2,
-	0xcfd2, 0xcfd2, 0xdd59, 0xddfc, 0xcfd2, 0xe453, 0xe487, 0xe453,
-	0xe487, 0xcfd2, 0x080c, 0x0d7d, 0x6000, 0x9082, 0x0016, 0x1a0c,
-	0x0d7d, 0x6000, 0x000a, 0x0005, 0xcfec, 0xda6f, 0xdb38, 0xdb5a,
-	0xdbd5, 0xcfec, 0xdccf, 0xdc5d, 0xd89d, 0xdd31, 0xdd46, 0xcfec,
-	0xcfec, 0xcfec, 0xcfec, 0xcfec, 0x080c, 0x0d7d, 0x91b2, 0x0053,
-	0x1a0c, 0x0d7d, 0x2100, 0x91b2, 0x0040, 0x1a04, 0xd436, 0x0002,
-	0xd038, 0xd227, 0xd038, 0xd038, 0xd038, 0xd230, 0xd038, 0xd038,
-	0xd038, 0xd038, 0xd038, 0xd038, 0xd038, 0xd038, 0xd038, 0xd038,
-	0xd038, 0xd038, 0xd038, 0xd038, 0xd038, 0xd038, 0xd038, 0xd03a,
-	0xd0a1, 0xd0b0, 0xd114, 0xd13f, 0xd1b8, 0xd212, 0xd038, 0xd038,
-	0xd233, 0xd038, 0xd038, 0xd248, 0xd255, 0xd038, 0xd038, 0xd038,
-	0xd038, 0xd038, 0xd2d8, 0xd038, 0xd038, 0xd2ec, 0xd038, 0xd038,
-	0xd2a7, 0xd038, 0xd038, 0xd038, 0xd304, 0xd038, 0xd038, 0xd038,
-	0xd381, 0xd038, 0xd038, 0xd038, 0xd038, 0xd038, 0xd038, 0xd3fe,
-	0x080c, 0x0d7d, 0x080c, 0x6a29, 0x1150, 0x2001, 0x1837, 0x2004,
+	0x006e, 0x0005, 0xcfda, 0xddb9, 0xcfda, 0xcfda, 0xcfda, 0xcfda,
+	0xcfda, 0xcfda, 0xdd68, 0xde0b, 0xcfda, 0xe463, 0xe497, 0xe463,
+	0xe497, 0xcfda, 0x080c, 0x0d7d, 0x6000, 0x9082, 0x0016, 0x1a0c,
+	0x0d7d, 0x6000, 0x000a, 0x0005, 0xcff4, 0xda7e, 0xdb47, 0xdb69,
+	0xdbe4, 0xcff4, 0xdcde, 0xdc6c, 0xd8ac, 0xdd40, 0xdd55, 0xcff4,
+	0xcff4, 0xcff4, 0xcff4, 0xcff4, 0x080c, 0x0d7d, 0x91b2, 0x0053,
+	0x1a0c, 0x0d7d, 0x2100, 0x91b2, 0x0040, 0x1a04, 0xd443, 0x0002,
+	0xd040, 0xd234, 0xd040, 0xd040, 0xd040, 0xd23d, 0xd040, 0xd040,
+	0xd040, 0xd040, 0xd040, 0xd040, 0xd040, 0xd040, 0xd040, 0xd040,
+	0xd040, 0xd040, 0xd040, 0xd040, 0xd040, 0xd040, 0xd040, 0xd042,
+	0xd0a9, 0xd0b8, 0xd11c, 0xd147, 0xd1c0, 0xd21f, 0xd040, 0xd040,
+	0xd240, 0xd040, 0xd040, 0xd255, 0xd262, 0xd040, 0xd040, 0xd040,
+	0xd040, 0xd040, 0xd2e5, 0xd040, 0xd040, 0xd2f9, 0xd040, 0xd040,
+	0xd2b4, 0xd040, 0xd040, 0xd040, 0xd311, 0xd040, 0xd040, 0xd040,
+	0xd38e, 0xd040, 0xd040, 0xd040, 0xd040, 0xd040, 0xd040, 0xd40b,
+	0x080c, 0x0d7d, 0x080c, 0x6a28, 0x1150, 0x2001, 0x1837, 0x2004,
 	0xd0cc, 0x1128, 0x9084, 0x0009, 0x9086, 0x0008, 0x1140, 0x6007,
-	0x0009, 0x602f, 0x0009, 0x6017, 0x0000, 0x0804, 0xd220, 0x080c,
-	0x69c5, 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x6210, 0x2258,
-	0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0xa896, 0x080c, 0x93a5,
-	0x0076, 0x903e, 0x080c, 0x9277, 0x2c08, 0x080c, 0xdfeb, 0x007e,
-	0x001e, 0x080c, 0xa8b2, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee,
-	0x6610, 0x2658, 0x080c, 0x6634, 0xbe04, 0x9684, 0x00ff, 0x9082,
+	0x0009, 0x602f, 0x0009, 0x6017, 0x0000, 0x0804, 0xd22d, 0x080c,
+	0x69c4, 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x6210, 0x2258,
+	0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0xa888, 0x080c, 0x938d,
+	0x0076, 0x903e, 0x080c, 0x9256, 0x2c08, 0x080c, 0xdffb, 0x007e,
+	0x001e, 0x080c, 0xa8a4, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee,
+	0x6610, 0x2658, 0x080c, 0x662f, 0xbe04, 0x9684, 0x00ff, 0x9082,
 	0x0006, 0x1268, 0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0,
-	0x00be, 0x2c08, 0x080c, 0xe6b0, 0x002e, 0x001e, 0x1178, 0x080c,
-	0xdf19, 0x1904, 0xd10c, 0x080c, 0xdeb5, 0x1120, 0x6007, 0x0008,
-	0x0804, 0xd220, 0x6007, 0x0009, 0x0804, 0xd220, 0x080c, 0xe14c,
-	0x0128, 0x080c, 0xdf19, 0x0d78, 0x0804, 0xd10c, 0x6017, 0x1900,
-	0x0c88, 0x080c, 0x3332, 0x1904, 0xd433, 0x6106, 0x080c, 0xde66,
-	0x6007, 0x0006, 0x0804, 0xd220, 0x6007, 0x0007, 0x0804, 0xd220,
-	0x080c, 0xe4c3, 0x1904, 0xd433, 0x080c, 0x3332, 0x1904, 0xd433,
+	0x00be, 0x2c08, 0x080c, 0xe6c0, 0x002e, 0x001e, 0x1178, 0x080c,
+	0xdf29, 0x1904, 0xd114, 0x080c, 0xdec5, 0x1120, 0x6007, 0x0008,
+	0x0804, 0xd22d, 0x6007, 0x0009, 0x0804, 0xd22d, 0x080c, 0xe15c,
+	0x0128, 0x080c, 0xdf29, 0x0d78, 0x0804, 0xd114, 0x6017, 0x1900,
+	0x0c88, 0x080c, 0x3326, 0x1904, 0xd440, 0x6106, 0x080c, 0xde76,
+	0x6007, 0x0006, 0x0804, 0xd22d, 0x6007, 0x0007, 0x0804, 0xd22d,
+	0x080c, 0xe4d3, 0x1904, 0xd440, 0x080c, 0x3326, 0x1904, 0xd440,
 	0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006,
-	0x1220, 0x2001, 0x0001, 0x080c, 0x6561, 0x96b4, 0xff00, 0x8637,
+	0x1220, 0x2001, 0x0001, 0x080c, 0x655c, 0x96b4, 0xff00, 0x8637,
 	0x9686, 0x0006, 0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4,
 	0x00ff, 0x9686, 0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686,
 	0x0005, 0x0110, 0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034,
 	0x9084, 0x0003, 0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030,
 	0x9084, 0x0003, 0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007,
-	0x00b0, 0x00ee, 0x080c, 0xdf81, 0x1190, 0x9686, 0x0006, 0x1140,
-	0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x323c, 0x002e,
-	0x080c, 0x66c0, 0x6007, 0x000a, 0x00de, 0x0804, 0xd220, 0x6007,
-	0x000b, 0x00de, 0x0804, 0xd220, 0x080c, 0x31e7, 0x080c, 0xcf67,
-	0x6007, 0x0001, 0x0804, 0xd220, 0x080c, 0xe4c3, 0x1904, 0xd433,
-	0x080c, 0x3332, 0x1904, 0xd433, 0x2071, 0x0260, 0x7034, 0x90b4,
+	0x00b0, 0x00ee, 0x080c, 0xdf91, 0x1190, 0x9686, 0x0006, 0x1140,
+	0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x323e, 0x002e,
+	0x080c, 0x66bb, 0x6007, 0x000a, 0x00de, 0x0804, 0xd22d, 0x6007,
+	0x000b, 0x00de, 0x0804, 0xd22d, 0x080c, 0x31ef, 0x080c, 0xcf66,
+	0x6007, 0x0001, 0x0804, 0xd22d, 0x080c, 0xe4d3, 0x1904, 0xd440,
+	0x080c, 0x3326, 0x1904, 0xd440, 0x2071, 0x0260, 0x7034, 0x90b4,
 	0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003,
 	0x1910, 0x6610, 0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026,
-	0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x323c, 0x002e, 0x6007,
-	0x000c, 0x2001, 0x0001, 0x080c, 0xe690, 0x0804, 0xd220, 0x080c,
-	0x6a29, 0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086,
-	0x0008, 0x1110, 0x0804, 0xd047, 0x080c, 0x69c5, 0x6610, 0x2658,
+	0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x323e, 0x002e, 0x6007,
+	0x000c, 0x2001, 0x0001, 0x080c, 0xe6a0, 0x0804, 0xd22d, 0x080c,
+	0x6a28, 0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086,
+	0x0008, 0x1110, 0x0804, 0xd04f, 0x080c, 0x69c4, 0x6610, 0x2658,
 	0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x06c8, 0x1138, 0x0026,
-	0x2001, 0x0006, 0x080c, 0x65a1, 0x002e, 0x0050, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd10c,
-	0x080c, 0xdf8e, 0x1120, 0x6007, 0x000e, 0x0804, 0xd220, 0x0046,
-	0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x31e7, 0x080c, 0xcf67,
+	0x2001, 0x0006, 0x080c, 0x659c, 0x002e, 0x0050, 0x96b4, 0xff00,
+	0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd114,
+	0x080c, 0xdf9e, 0x1120, 0x6007, 0x000e, 0x0804, 0xd22d, 0x0046,
+	0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x31ef, 0x080c, 0xcf66,
 	0x004e, 0x0016, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0148,
-	0x2009, 0x0029, 0x080c, 0xe2c9, 0x6010, 0x2058, 0xb800, 0xc0e5,
-	0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x0804, 0xd220, 0x2001,
-	0x0001, 0x080c, 0x6561, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
-	0x0004, 0x2019, 0x1805, 0x2011, 0x0270, 0x080c, 0xbbae, 0x003e,
+	0x2009, 0x0029, 0x080c, 0xe2d9, 0x6010, 0x2058, 0xb800, 0xc0e5,
+	0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x0804, 0xd22d, 0x2001,
+	0x0001, 0x080c, 0x655c, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
+	0x0004, 0x2019, 0x1805, 0x2011, 0x0270, 0x080c, 0xbba1, 0x003e,
 	0x002e, 0x001e, 0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637,
-	0x9682, 0x0004, 0x0a04, 0xd10c, 0x9682, 0x0007, 0x0a04, 0xd168,
-	0x0804, 0xd10c, 0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xd220,
-	0x080c, 0x6a29, 0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009,
-	0x9086, 0x0008, 0x1110, 0x0804, 0xd047, 0x080c, 0x69c5, 0x6610,
-	0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x0698, 0x0150,
-	0x96b4, 0xff00, 0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006,
-	0x1904, 0xd10c, 0x080c, 0xdfbc, 0x1130, 0x080c, 0xdeb5, 0x1118,
-	0x6007, 0x0010, 0x04e8, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046,
-	0x080c, 0x31e7, 0x080c, 0xcf67, 0x004e, 0x0016, 0x9006, 0x2009,
-	0x1848, 0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029, 0x080c, 0xe2c9,
-	0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007,
-	0x0001, 0x00f0, 0x080c, 0xe14c, 0x0140, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0006, 0x0978, 0x0804, 0xd10c, 0x6017, 0x1900, 0x6007,
-	0x0009, 0x0070, 0x080c, 0x3332, 0x1904, 0xd433, 0x080c, 0xe4c3,
-	0x1904, 0xd433, 0x080c, 0xd600, 0x1904, 0xd10c, 0x6007, 0x0012,
-	0x6003, 0x0001, 0x080c, 0x9225, 0x080c, 0x96a0, 0x0005, 0x6007,
-	0x0001, 0x6003, 0x0001, 0x080c, 0x9225, 0x080c, 0x96a0, 0x0cb0,
-	0x6007, 0x0005, 0x0c68, 0x080c, 0xe4c3, 0x1904, 0xd433, 0x080c,
-	0x3332, 0x1904, 0xd433, 0x080c, 0xd600, 0x1904, 0xd10c, 0x6007,
-	0x0020, 0x6003, 0x0001, 0x080c, 0x9225, 0x080c, 0x96a0, 0x0005,
-	0x080c, 0x3332, 0x1904, 0xd433, 0x6007, 0x0023, 0x6003, 0x0001,
-	0x080c, 0x9225, 0x080c, 0x96a0, 0x0005, 0x080c, 0xe4c3, 0x1904,
-	0xd433, 0x080c, 0x3332, 0x1904, 0xd433, 0x080c, 0xd600, 0x1904,
-	0xd10c, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7244, 0x9286,
-	0xffff, 0x0180, 0x2c08, 0x080c, 0xc826, 0x01b0, 0x2260, 0x7240,
-	0x6008, 0x9206, 0x1188, 0x6010, 0x9190, 0x0004, 0x2214, 0x9206,
-	0x01b8, 0x0050, 0x7240, 0x2c08, 0x9006, 0x080c, 0xe293, 0x1180,
-	0x7244, 0x9286, 0xffff, 0x01b0, 0x2160, 0x6007, 0x0026, 0x6017,
-	0x1700, 0x7214, 0x9296, 0xffff, 0x1180, 0x6007, 0x0025, 0x0068,
-	0x6020, 0x9086, 0x0007, 0x1d80, 0x6004, 0x9086, 0x0024, 0x1110,
-	0x080c, 0xabed, 0x2160, 0x6007, 0x0025, 0x6003, 0x0001, 0x080c,
-	0x9225, 0x080c, 0x96a0, 0x00ee, 0x002e, 0x001e, 0x0005, 0x2001,
-	0x0001, 0x080c, 0x6561, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
-	0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xbbae, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x0120, 0x6007, 0x0031, 0x0804, 0xd220,
-	0x080c, 0xb81f, 0x080c, 0x74e9, 0x1190, 0x0006, 0x0026, 0x0036,
-	0x080c, 0x7503, 0x1138, 0x080c, 0x77ed, 0x080c, 0x6029, 0x080c,
-	0x741a, 0x0010, 0x080c, 0x74bd, 0x003e, 0x002e, 0x000e, 0x0005,
-	0x080c, 0x3332, 0x1904, 0xd433, 0x080c, 0xd600, 0x1904, 0xd10c,
-	0x6106, 0x080c, 0xd61c, 0x1120, 0x6007, 0x002b, 0x0804, 0xd220,
-	0x6007, 0x002c, 0x0804, 0xd220, 0x080c, 0xe4c3, 0x1904, 0xd433,
-	0x080c, 0x3332, 0x1904, 0xd433, 0x080c, 0xd600, 0x1904, 0xd10c,
-	0x6106, 0x080c, 0xd621, 0x1120, 0x6007, 0x002e, 0x0804, 0xd220,
-	0x6007, 0x002f, 0x0804, 0xd220, 0x080c, 0x3332, 0x1904, 0xd433,
-	0x00e6, 0x00d6, 0x00c6, 0x6010, 0x2058, 0xb904, 0x9184, 0x00ff,
-	0x9086, 0x0006, 0x0158, 0x9184, 0xff00, 0x8007, 0x9086, 0x0006,
-	0x0128, 0x00ce, 0x00de, 0x00ee, 0x0804, 0xd227, 0x080c, 0x56de,
-	0xd0e4, 0x0904, 0xd37e, 0x2071, 0x026c, 0x7010, 0x603a, 0x7014,
-	0x603e, 0x7108, 0x720c, 0x080c, 0x6a67, 0x0140, 0x6010, 0x2058,
-	0xb810, 0x9106, 0x1118, 0xb814, 0x9206, 0x0510, 0x080c, 0x6a63,
-	0x15b8, 0x2069, 0x1800, 0x6880, 0x9206, 0x1590, 0x687c, 0x9106,
-	0x1578, 0x7210, 0x080c, 0xc826, 0x0590, 0x080c, 0xd4eb, 0x0578,
-	0x080c, 0xe345, 0x0560, 0x622e, 0x6007, 0x0036, 0x6003, 0x0001,
-	0x2009, 0x8020, 0x080c, 0x921e, 0x00ce, 0x00de, 0x00ee, 0x0005,
-	0x7214, 0x9286, 0xffff, 0x0150, 0x080c, 0xc826, 0x01c0, 0x9280,
-	0x0002, 0x2004, 0x7110, 0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08,
-	0x9085, 0x0001, 0x080c, 0xe293, 0x2c10, 0x2160, 0x0140, 0x0890,
-	0x6007, 0x0037, 0x602f, 0x0009, 0x6017, 0x1500, 0x08b8, 0x6007,
-	0x0037, 0x602f, 0x0003, 0x6017, 0x1700, 0x0880, 0x6007, 0x0012,
-	0x0868, 0x080c, 0x3332, 0x1904, 0xd433, 0x6010, 0x2058, 0xb804,
-	0x9084, 0xff00, 0x8007, 0x9086, 0x0006, 0x1904, 0xd227, 0x00e6,
-	0x00d6, 0x00c6, 0x080c, 0x56de, 0xd0e4, 0x0904, 0xd3f6, 0x2069,
-	0x1800, 0x2071, 0x026c, 0x7008, 0x603a, 0x720c, 0x623e, 0x9286,
-	0xffff, 0x1150, 0x7208, 0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c,
-	0xe293, 0x2c10, 0x00ce, 0x05e8, 0x080c, 0xc826, 0x05d0, 0x7108,
-	0x9280, 0x0002, 0x2004, 0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260,
-	0x080c, 0xc436, 0x002e, 0x00ce, 0x7118, 0x918c, 0xff00, 0x810f,
-	0x9186, 0x0001, 0x0178, 0x9186, 0x0005, 0x0118, 0x9186, 0x0007,
-	0x1198, 0x9280, 0x0005, 0x2004, 0x9005, 0x0170, 0x080c, 0xd4eb,
-	0x0904, 0xd377, 0x0056, 0x7510, 0x7614, 0x080c, 0xe35e, 0x005e,
-	0x00ce, 0x00de, 0x00ee, 0x0005, 0x6007, 0x003b, 0x602f, 0x0009,
-	0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x921e,
-	0x0c78, 0x6007, 0x003b, 0x602f, 0x0003, 0x6017, 0x0300, 0x6003,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x921e, 0x0c10, 0x6007, 0x003b,
-	0x602f, 0x000b, 0x6017, 0x0000, 0x0804, 0xd34e, 0x00e6, 0x0026,
-	0x080c, 0x6a29, 0x0550, 0x080c, 0x69c5, 0x080c, 0xe535, 0x1518,
-	0x2071, 0x1800, 0x70dc, 0x9085, 0x0003, 0x70de, 0x00f6, 0x2079,
-	0x0100, 0x72b0, 0x9284, 0x00ff, 0x707e, 0x78e6, 0x9284, 0xff00,
-	0x7280, 0x9205, 0x7082, 0x78ea, 0x00fe, 0x70e7, 0x0000, 0x080c,
-	0x6a67, 0x0120, 0x2011, 0x1a09, 0x2013, 0x07d0, 0xd0ac, 0x1128,
-	0x080c, 0x2fb2, 0x0010, 0x080c, 0xe567, 0x002e, 0x00ee, 0x080c,
-	0xabed, 0x0804, 0xd226, 0x080c, 0xabed, 0x0005, 0x2600, 0x0002,
-	0xd44a, 0xd47b, 0xd48c, 0xd44a, 0xd44a, 0xd44c, 0xd49d, 0xd44a,
-	0xd44a, 0xd44a, 0xd469, 0xd44a, 0xd44a, 0xd44a, 0xd4a8, 0xd4b5,
-	0xd4e6, 0xd44a, 0x080c, 0x0d7d, 0x080c, 0xe4c3, 0x1d20, 0x080c,
-	0x3332, 0x1d08, 0x080c, 0xd600, 0x1148, 0x7038, 0x6016, 0x6007,
-	0x0045, 0x6003, 0x0001, 0x080c, 0x9225, 0x0005, 0x080c, 0x31e7,
-	0x080c, 0xcf67, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9225,
-	0x0005, 0x080c, 0xe4c3, 0x1938, 0x080c, 0x3332, 0x1920, 0x080c,
-	0xd600, 0x1d60, 0x703c, 0x6016, 0x6007, 0x004a, 0x6003, 0x0001,
-	0x080c, 0x9225, 0x0005, 0x080c, 0x3332, 0x1904, 0xd433, 0x2009,
-	0x0041, 0x080c, 0xe570, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c,
-	0x9225, 0x080c, 0x96a0, 0x0005, 0x080c, 0x3332, 0x1904, 0xd433,
-	0x2009, 0x0042, 0x080c, 0xe570, 0x6007, 0x0047, 0x6003, 0x0001,
-	0x080c, 0x9225, 0x080c, 0x96a0, 0x0005, 0x080c, 0x3332, 0x1904,
-	0xd433, 0x2009, 0x0046, 0x080c, 0xe570, 0x080c, 0xabed, 0x0005,
-	0x080c, 0xd508, 0x0904, 0xd433, 0x6007, 0x004e, 0x6003, 0x0001,
-	0x080c, 0x9225, 0x080c, 0x96a0, 0x0005, 0x6007, 0x004f, 0x6017,
-	0x0000, 0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001,
-	0x1160, 0x7140, 0x2001, 0x19bd, 0x2004, 0x9106, 0x11b0, 0x7144,
-	0x2001, 0x19be, 0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168,
-	0x2011, 0x0276, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019,
-	0x000a, 0x080c, 0xbbc2, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003,
-	0x0001, 0x080c, 0x9225, 0x080c, 0x96a0, 0x0005, 0x6007, 0x0050,
-	0x703c, 0x6016, 0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6,
-	0x00c6, 0x2260, 0x6010, 0x2058, 0xb8d4, 0xd084, 0x0150, 0x7128,
-	0x6050, 0x9106, 0x1120, 0x712c, 0x604c, 0x9106, 0x0110, 0x9006,
-	0x0010, 0x9085, 0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005,
-	0x0016, 0x0096, 0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x1800, 0x7090, 0x908a, 0x00f9, 0x16e8, 0x20e1,
-	0x0000, 0x2001, 0x19a0, 0x2003, 0x0000, 0x080c, 0x1053, 0x05a0,
-	0x2900, 0x6016, 0x7090, 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0,
-	0xa833, 0x001e, 0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x001b, 0x20a0, 0x2001, 0x19a0, 0x0016, 0x200c, 0x0471, 0x001e,
-	0x2940, 0x080c, 0x1053, 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff,
-	0x0180, 0x0c18, 0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x001b, 0x20a0, 0x2001, 0x19a0, 0x0016, 0x200c, 0x00b1, 0x001e,
-	0x0000, 0x9085, 0x0001, 0x0048, 0x2071, 0x1800, 0x7093, 0x0000,
-	0x6014, 0x2048, 0x080c, 0x0fec, 0x9006, 0x012e, 0x01de, 0x01ce,
-	0x00ee, 0x008e, 0x009e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0026,
-	0x0036, 0x00c6, 0x918c, 0xffff, 0x11a8, 0x080c, 0x2189, 0x2099,
-	0x026c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
-	0x00f8, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x2189, 0x2099,
-	0x0260, 0x0ca8, 0x080c, 0x2189, 0x2061, 0x19a0, 0x6004, 0x2098,
-	0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8,
-	0x4003, 0x22a8, 0x8108, 0x080c, 0x2189, 0x2099, 0x0260, 0x0ca8,
-	0x2061, 0x19a0, 0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006,
-	0x0020, 0x2001, 0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021,
-	0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e,
-	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8,
-	0x080c, 0x21a1, 0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312,
-	0x1218, 0x23a8, 0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8,
-	0x22a8, 0x8108, 0x080c, 0x21a1, 0x20a1, 0x0240, 0x0c98, 0x080c,
-	0x21a1, 0x2061, 0x19a3, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312,
-	0x1218, 0x23a8, 0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138,
-	0x22a8, 0x8108, 0x080c, 0x21a1, 0x20a1, 0x0240, 0x0c98, 0x2061,
-	0x19a3, 0x2019, 0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020,
-	0x2001, 0x0240, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296,
-	0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005,
-	0x00b6, 0x0066, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0006, 0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4,
-	0x00ff, 0x9686, 0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085,
-	0x0001, 0x006e, 0x00be, 0x0005, 0x00d6, 0x080c, 0xd696, 0x00de,
-	0x0005, 0x00d6, 0x080c, 0xd6a3, 0x1520, 0x680c, 0x908c, 0xff00,
-	0x6820, 0x9084, 0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4,
-	0x0130, 0x9006, 0x080c, 0xe690, 0x2009, 0x0001, 0x0078, 0xd1ec,
-	0x0180, 0x6920, 0x918c, 0x00ff, 0x6824, 0x080c, 0x25fb, 0x1148,
-	0x2001, 0x0001, 0x080c, 0xe690, 0x2110, 0x900e, 0x080c, 0x323c,
-	0x0018, 0x9085, 0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6,
-	0x00c6, 0x080c, 0xac5f, 0x0598, 0x0016, 0x0026, 0x00c6, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x25fb, 0x1568, 0x080c,
-	0x65c4, 0x1550, 0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00,
-	0x6012, 0x080c, 0xe4c3, 0x11c8, 0x080c, 0x3332, 0x11b0, 0x080c,
-	0xd600, 0x0500, 0x2001, 0x0007, 0x080c, 0x6575, 0x2001, 0x0007,
-	0x080c, 0x65a1, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001,
-	0x6003, 0x0001, 0x080c, 0x9225, 0x0010, 0x080c, 0xabed, 0x9085,
-	0x0001, 0x00ce, 0x00be, 0x0005, 0x080c, 0xabed, 0x00ce, 0x002e,
-	0x001e, 0x0ca8, 0x080c, 0xabed, 0x9006, 0x0c98, 0x2069, 0x026d,
-	0x6800, 0x9082, 0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001,
-	0x0008, 0x9006, 0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808,
-	0x9084, 0xff00, 0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018,
-	0x0118, 0x9186, 0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff,
-	0x910d, 0x6162, 0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005,
-	0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0d7d, 0x91b6, 0x0013, 0x1130,
-	0x2008, 0x91b2, 0x0040, 0x1a04, 0xd7e5, 0x0092, 0x91b6, 0x0027,
-	0x0120, 0x91b6, 0x0014, 0x190c, 0x0d7d, 0x2001, 0x0007, 0x080c,
-	0x65a1, 0x080c, 0x95de, 0x080c, 0xac28, 0x080c, 0x96a0, 0x0005,
-	0xd720, 0xd722, 0xd720, 0xd720, 0xd720, 0xd722, 0xd72f, 0xd7e2,
-	0xd77f, 0xd7e2, 0xd793, 0xd7e2, 0xd72f, 0xd7e2, 0xd7da, 0xd7e2,
-	0xd7da, 0xd7e2, 0xd7e2, 0xd720, 0xd720, 0xd720, 0xd720, 0xd720,
-	0xd720, 0xd720, 0xd720, 0xd720, 0xd720, 0xd720, 0xd722, 0xd720,
-	0xd7e2, 0xd720, 0xd720, 0xd7e2, 0xd720, 0xd7df, 0xd7e2, 0xd720,
-	0xd720, 0xd720, 0xd720, 0xd7e2, 0xd7e2, 0xd720, 0xd7e2, 0xd7e2,
-	0xd720, 0xd72a, 0xd720, 0xd720, 0xd720, 0xd720, 0xd7de, 0xd7e2,
-	0xd720, 0xd720, 0xd7e2, 0xd7e2, 0xd720, 0xd720, 0xd720, 0xd720,
-	0x080c, 0x0d7d, 0x080c, 0xcf6a, 0x6003, 0x0002, 0x080c, 0x96a0,
-	0x0804, 0xd7e4, 0x9006, 0x080c, 0x6561, 0x0804, 0xd7e2, 0x080c,
-	0x6a63, 0x1904, 0xd7e2, 0x9006, 0x080c, 0x6561, 0x6010, 0x2058,
-	0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6, 0x2079, 0x1800, 0x78a8,
-	0x8000, 0x78aa, 0x00fe, 0x0428, 0x6010, 0x2058, 0xb884, 0x9005,
-	0x1178, 0x080c, 0xcf52, 0x1904, 0xd7e2, 0x0036, 0x0046, 0xbba0,
-	0x2021, 0x0007, 0x080c, 0x4cbe, 0x004e, 0x003e, 0x0804, 0xd7e2,
-	0x080c, 0x3363, 0x1904, 0xd7e2, 0x2001, 0x1800, 0x2004, 0x9086,
-	0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa,
-	0x00fe, 0x2001, 0x0002, 0x080c, 0x6575, 0x6023, 0x0001, 0x6003,
-	0x0001, 0x6007, 0x0002, 0x080c, 0x9225, 0x080c, 0x96a0, 0x6110,
-	0x2158, 0x2009, 0x0001, 0x080c, 0x864c, 0x0804, 0xd7e4, 0x6610,
-	0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0904,
-	0xd7e2, 0x9686, 0x0004, 0x0904, 0xd7e2, 0x080c, 0x8eca, 0x2001,
-	0x0004, 0x0804, 0xd7e0, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003,
-	0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006,
-	0x080c, 0x4cbe, 0x004e, 0x003e, 0x2001, 0x0006, 0x080c, 0xd7fe,
-	0x6610, 0x2658, 0xbe04, 0x0066, 0x96b4, 0xff00, 0x8637, 0x9686,
-	0x0006, 0x006e, 0x0168, 0x2001, 0x0006, 0x080c, 0x65a1, 0x9284,
-	0x00ff, 0x908e, 0x0007, 0x1120, 0x2001, 0x0006, 0x080c, 0x6575,
-	0x080c, 0x6a63, 0x11f8, 0x2001, 0x1837, 0x2004, 0xd0a4, 0x01d0,
-	0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x01a0, 0x00f6, 0x2079,
-	0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0804, 0xd769, 0x2001,
-	0x0004, 0x0030, 0x2001, 0x0006, 0x0409, 0x0020, 0x0018, 0x0010,
-	0x080c, 0x65a1, 0x080c, 0xabed, 0x0005, 0x2600, 0x0002, 0xd7f9,
-	0xd7f9, 0xd7f9, 0xd7f9, 0xd7f9, 0xd7fb, 0xd7f9, 0xd7fb, 0xd7f9,
-	0xd7f9, 0xd7fb, 0xd7f9, 0xd7f9, 0xd7f9, 0xd7fb, 0xd7fb, 0xd7fb,
-	0xd7fb, 0x080c, 0x0d7d, 0x080c, 0xabed, 0x0005, 0x0016, 0x00b6,
-	0x00d6, 0x6110, 0x2158, 0xb900, 0xd184, 0x0138, 0x080c, 0x6575,
-	0x9006, 0x080c, 0x6561, 0x080c, 0x321c, 0x00de, 0x00be, 0x001e,
-	0x0005, 0x6610, 0x2658, 0xb804, 0x9084, 0xff00, 0x8007, 0x90b2,
-	0x000c, 0x1a0c, 0x0d7d, 0x91b6, 0x0015, 0x1110, 0x003b, 0x0028,
-	0x91b6, 0x0016, 0x190c, 0x0d7d, 0x006b, 0x0005, 0xb69e, 0xb69e,
-	0xb69e, 0xb69e, 0xb69e, 0xb69e, 0xd87d, 0xd83e, 0xb69e, 0xb69e,
-	0xb69e, 0xb69e, 0xb69e, 0xb69e, 0xb69e, 0xb69e, 0xb69e, 0xb69e,
-	0xd87d, 0xd884, 0xb69e, 0xb69e, 0xb69e, 0xb69e, 0x00f6, 0x080c,
-	0x6a63, 0x11d8, 0x080c, 0xcf52, 0x11c0, 0x6010, 0x905d, 0x01a8,
-	0xb884, 0x9005, 0x0190, 0x9006, 0x080c, 0x6561, 0x2001, 0x0002,
-	0x080c, 0x6575, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002,
-	0x080c, 0x9225, 0x080c, 0x96a0, 0x00f0, 0x2011, 0x0263, 0x2204,
-	0x8211, 0x220c, 0x080c, 0x25fb, 0x11b0, 0x080c, 0x6625, 0x0118,
-	0x080c, 0xabed, 0x0080, 0xb810, 0x0006, 0xb814, 0x0006, 0xb884,
-	0x0006, 0x080c, 0x6043, 0x000e, 0xb886, 0x000e, 0xb816, 0x000e,
-	0xb812, 0x080c, 0xabed, 0x00fe, 0x0005, 0x6604, 0x96b6, 0x001e,
-	0x1110, 0x080c, 0xabed, 0x0005, 0x080c, 0xba27, 0x1148, 0x6003,
-	0x0001, 0x6007, 0x0001, 0x080c, 0x9225, 0x080c, 0x96a0, 0x0010,
-	0x080c, 0xabed, 0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d7d,
-	0x080c, 0x95de, 0x080c, 0xac28, 0x0005, 0x9182, 0x0040, 0x0002,
-	0xd8b3, 0xd8b3, 0xd8b3, 0xd8b3, 0xd8b5, 0xd8b3, 0xd8b3, 0xd8b3,
-	0xd8b3, 0xd8b3, 0xd8b3, 0xd8b3, 0xd8b3, 0xd8b3, 0xd8b3, 0xd8b3,
-	0xd8b3, 0xd8b3, 0xd8b3, 0x080c, 0x0d7d, 0x0096, 0x00b6, 0x00d6,
-	0x00e6, 0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8bc, 0x9005,
-	0x11b0, 0x6007, 0x0044, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00,
-	0x0904, 0xd91c, 0x080c, 0xe684, 0x1170, 0x9486, 0x2000, 0x1158,
-	0x2009, 0x0001, 0x2011, 0x0200, 0x080c, 0x88ec, 0x0020, 0x9026,
-	0x080c, 0xe508, 0x0c30, 0x080c, 0x103a, 0x090c, 0x0d7d, 0x6003,
-	0x0007, 0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00,
-	0xa88e, 0x6008, 0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a,
-	0x0016, 0xa876, 0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036,
-	0x080c, 0x6d80, 0x001e, 0x080c, 0xe684, 0x1904, 0xd97c, 0x9486,
-	0x2000, 0x1130, 0x2019, 0x0017, 0x080c, 0xe239, 0x0804, 0xd97c,
-	0x9486, 0x0200, 0x1120, 0x080c, 0xe1c9, 0x0804, 0xd97c, 0x9486,
-	0x0400, 0x0120, 0x9486, 0x1000, 0x1904, 0xd97c, 0x2019, 0x0002,
-	0x080c, 0xe1e8, 0x0804, 0xd97c, 0x2069, 0x1a6f, 0x6a00, 0xd284,
-	0x0904, 0xd9e6, 0x9284, 0x0300, 0x1904, 0xd9df, 0x6804, 0x9005,
-	0x0904, 0xd9c7, 0x2d78, 0x6003, 0x0007, 0x080c, 0x1053, 0x0904,
-	0xd988, 0x7800, 0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017,
-	0x0000, 0x2001, 0x180f, 0x2004, 0xd084, 0x1904, 0xd9ea, 0x9006,
-	0xa802, 0xa867, 0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a,
-	0x6010, 0x2058, 0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba,
-	0xb92c, 0xa9be, 0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d,
-	0x7044, 0x9084, 0x0003, 0x9080, 0xd984, 0x2005, 0xa87e, 0x20a9,
-	0x000a, 0x2001, 0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205,
-	0x200b, 0x0080, 0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0,
-	0x4003, 0x200b, 0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000,
-	0x200c, 0xa9ae, 0x080c, 0x6d83, 0x002e, 0x004e, 0x00fe, 0x00ee,
-	0x00de, 0x00be, 0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000,
-	0x2001, 0x1810, 0x2004, 0xd084, 0x0120, 0x080c, 0x103a, 0x1904,
-	0xd931, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009,
-	0xa022, 0x080c, 0x921e, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084,
-	0xff00, 0x9086, 0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016,
-	0x6114, 0x918c, 0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001,
-	0x6007, 0x0043, 0x2009, 0xa025, 0x080c, 0x921e, 0x0828, 0x6868,
-	0x602e, 0x686c, 0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007,
-	0x0041, 0x2009, 0xa022, 0x080c, 0x921e, 0x0804, 0xd97c, 0x2001,
-	0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b07,
-	0x6017, 0xf300, 0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007,
-	0x0041, 0x2009, 0xa022, 0x080c, 0x921e, 0x0804, 0xd97c, 0x6017,
-	0xf500, 0x0c98, 0x6017, 0xf600, 0x0804, 0xd99c, 0x6017, 0xf200,
-	0x0804, 0xd99c, 0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886,
-	0x2c00, 0xa87a, 0x7044, 0x9084, 0x0003, 0x9080, 0xd984, 0x2005,
-	0xa87e, 0x2928, 0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a,
-	0xb82c, 0xa88e, 0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d,
-	0x2009, 0x0205, 0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000,
-	0x2011, 0x0210, 0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111,
-	0x1a0c, 0x0d7d, 0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860,
-	0x20e8, 0xa85c, 0x9080, 0x0029, 0x20a0, 0x2011, 0xda66, 0x2041,
-	0x0001, 0x223d, 0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8,
-	0x4003, 0x931a, 0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a,
-	0x2001, 0x0260, 0x2098, 0x0c68, 0x2950, 0x080c, 0x1053, 0x0170,
-	0x2900, 0xb002, 0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800,
-	0x902d, 0x0118, 0x080c, 0x106c, 0x0cc8, 0x080c, 0x106c, 0x0804,
-	0xd988, 0x2548, 0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205,
-	0x200b, 0x0000, 0x080c, 0xe26c, 0x0804, 0xd97c, 0x8010, 0x0004,
-	0x801a, 0x0006, 0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186,
-	0x0013, 0x1160, 0x6004, 0x908a, 0x0057, 0x1a0c, 0x0d7d, 0x9082,
-	0x0040, 0x0a0c, 0x0d7d, 0x2008, 0x0804, 0xdaf1, 0x9186, 0x0051,
-	0x0108, 0x0040, 0x080c, 0xaaa8, 0x01e8, 0x9086, 0x0002, 0x0904,
-	0xdb38, 0x00c0, 0x9186, 0x0027, 0x0180, 0x9186, 0x0048, 0x0128,
-	0x9186, 0x0014, 0x0150, 0x190c, 0x0d7d, 0x080c, 0xaaa8, 0x0150,
-	0x9086, 0x0004, 0x0904, 0xdbd5, 0x0028, 0x6004, 0x9082, 0x0040,
-	0x2008, 0x001a, 0x080c, 0xaca9, 0x0005, 0xdab8, 0xdaba, 0xdaba,
-	0xdae1, 0xdab8, 0xdab8, 0xdab8, 0xdab8, 0xdab8, 0xdab8, 0xdab8,
-	0xdab8, 0xdab8, 0xdab8, 0xdab8, 0xdab8, 0xdab8, 0xdab8, 0xdab8,
-	0x080c, 0x0d7d, 0x080c, 0x95de, 0x080c, 0x96a0, 0x0036, 0x0096,
-	0x6014, 0x904d, 0x01d8, 0x080c, 0xc838, 0x01c0, 0x6003, 0x0002,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019,
-	0x0004, 0x080c, 0xe26c, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120,
-	0x2001, 0x1987, 0x2004, 0x601a, 0x6003, 0x0007, 0x009e, 0x003e,
-	0x0005, 0x0096, 0x080c, 0x95de, 0x080c, 0x96a0, 0x080c, 0xc838,
-	0x0120, 0x6014, 0x2048, 0x080c, 0x106c, 0x080c, 0xac28, 0x009e,
-	0x0005, 0x0002, 0xdb05, 0xdb1a, 0xdb07, 0xdb2f, 0xdb05, 0xdb05,
-	0xdb05, 0xdb05, 0xdb05, 0xdb05, 0xdb05, 0xdb05, 0xdb05, 0xdb05,
-	0xdb05, 0xdb05, 0xdb05, 0xdb05, 0xdb05, 0x080c, 0x0d7d, 0x0096,
-	0x6014, 0x2048, 0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009,
-	0x0043, 0x080c, 0xac8c, 0x0010, 0x6003, 0x0004, 0x080c, 0x96a0,
-	0x009e, 0x0005, 0x080c, 0xc838, 0x0138, 0x6114, 0x0096, 0x2148,
-	0xa97c, 0x009e, 0xd1ec, 0x1138, 0x080c, 0x88c1, 0x080c, 0xabed,
-	0x080c, 0x96a0, 0x0005, 0x080c, 0xe4cc, 0x0db0, 0x0cc8, 0x6003,
-	0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x921e, 0x0005,
-	0x9182, 0x0040, 0x0002, 0xdb4e, 0xdb50, 0xdb4e, 0xdb4e, 0xdb4e,
-	0xdb4e, 0xdb4e, 0xdb4e, 0xdb4e, 0xdb4e, 0xdb4e, 0xdb4e, 0xdb4e,
-	0xdb4e, 0xdb4e, 0xdb4e, 0xdb4e, 0xdb51, 0xdb4e, 0x080c, 0x0d7d,
-	0x0005, 0x00d6, 0x080c, 0x88c1, 0x00de, 0x080c, 0xe524, 0x080c,
-	0xabed, 0x0005, 0x9182, 0x0040, 0x0002, 0xdb70, 0xdb70, 0xdb70,
-	0xdb70, 0xdb70, 0xdb70, 0xdb70, 0xdb70, 0xdb70, 0xdb72, 0xdb9d,
-	0xdb70, 0xdb70, 0xdb70, 0xdb70, 0xdb9d, 0xdb70, 0xdb70, 0xdb70,
-	0x080c, 0x0d7d, 0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0168,
-	0x908c, 0x0003, 0x918e, 0x0002, 0x0180, 0x6144, 0xd1e4, 0x1168,
-	0x2009, 0x0041, 0x009e, 0x0804, 0xdc5d, 0x6003, 0x0007, 0x601b,
-	0x0000, 0x080c, 0x88c1, 0x009e, 0x0005, 0x6014, 0x2048, 0xa97c,
-	0xd1ec, 0x1130, 0x080c, 0x88c1, 0x080c, 0xabed, 0x009e, 0x0005,
-	0x080c, 0xe4cc, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c,
-	0xc1d4, 0x2102, 0x0036, 0x080c, 0x963b, 0x080c, 0x96a0, 0x6014,
-	0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac,
-	0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003,
-	0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xe26c, 0x6018, 0x9005,
-	0x1128, 0x2001, 0x1987, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000,
-	0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002,
-	0xdbec, 0xdbec, 0xdbec, 0xdbec, 0xdbec, 0xdbec, 0xdbec, 0xdbec,
-	0xdbee, 0xdbec, 0xdbec, 0xdbec, 0xdbec, 0xdbec, 0xdbec, 0xdbec,
-	0xdbec, 0xdbec, 0xdbec, 0xdc39, 0x080c, 0x0d7d, 0x6014, 0x0096,
-	0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be,
-	0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009,
-	0x0041, 0x009e, 0x0804, 0xdc5d, 0x6003, 0x0007, 0x601b, 0x0000,
-	0x080c, 0x88c1, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006,
-	0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420,
-	0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110,
-	0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e,
-	0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006,
-	0x00e9, 0x080c, 0x88c3, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e,
-	0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x1670, 0x1904, 0xdbee,
-	0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105,
-	0x1120, 0x080c, 0x1670, 0x1904, 0xdbee, 0x0005, 0xd2fc, 0x0140,
-	0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010,
-	0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208,
-	0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0d7d,
-	0x6024, 0xd0dc, 0x090c, 0x0d7d, 0x0005, 0xdc80, 0xdc8c, 0xdc98,
-	0xdca4, 0xdc80, 0xdc80, 0xdc80, 0xdc80, 0xdc87, 0xdc82, 0xdc82,
-	0xdc80, 0xdc80, 0xdc80, 0xdc80, 0xdc82, 0xdc80, 0xdc82, 0xdc80,
-	0x080c, 0x0d7d, 0x6024, 0xd0dc, 0x090c, 0x0d7d, 0x0005, 0x6014,
-	0x9005, 0x190c, 0x0d7d, 0x0005, 0x6003, 0x0001, 0x6106, 0x0126,
-	0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x9200, 0x012e, 0x0005,
-	0x6003, 0x0004, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa001,
-	0x080c, 0x921e, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x080c,
-	0x1c03, 0x0126, 0x2091, 0x8000, 0x6014, 0x0096, 0x2048, 0xa87c,
-	0xd0fc, 0x0188, 0x9084, 0x0003, 0x9086, 0x0002, 0x01a0, 0x6024,
-	0xd0cc, 0x1148, 0xd0c4, 0x1138, 0xa8a8, 0x9005, 0x1120, 0x6144,
-	0x918d, 0xb035, 0x0018, 0x6144, 0x918d, 0xa035, 0x009e, 0x080c,
-	0x9265, 0x012e, 0x0005, 0x6144, 0x918d, 0xa032, 0x0cb8, 0x0126,
-	0x2091, 0x8000, 0x0036, 0x0096, 0x9182, 0x0040, 0x0023, 0x009e,
-	0x003e, 0x012e, 0x0005, 0xdceb, 0xdced, 0xdd02, 0xdd1c, 0xdceb,
-	0xdceb, 0xdceb, 0xdceb, 0xdceb, 0xdceb, 0xdceb, 0xdceb, 0xdceb,
-	0xdceb, 0xdceb, 0xdceb, 0x080c, 0x0d7d, 0x6014, 0x2048, 0xa87c,
-	0xd0fc, 0x0510, 0x909c, 0x0003, 0x939e, 0x0003, 0x01e8, 0x6003,
-	0x0001, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c,
-	0x921e, 0x0470, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x909c,
-	0x0003, 0x939e, 0x0003, 0x0140, 0x6003, 0x0001, 0x6106, 0x2009,
-	0xa001, 0x080c, 0x921e, 0x00e0, 0x901e, 0x6316, 0x631a, 0x2019,
-	0x0004, 0x080c, 0xe26c, 0x00a0, 0x6014, 0x2048, 0xa87c, 0xd0fc,
-	0x0d98, 0x909c, 0x0003, 0x939e, 0x0003, 0x0d70, 0x6003, 0x0003,
-	0x6106, 0x080c, 0x1c03, 0x6144, 0x918d, 0xa035, 0x080c, 0x9265,
-	0x0005, 0x080c, 0x95de, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148,
-	0x080c, 0xe621, 0x0036, 0x2019, 0x0029, 0x080c, 0xe26c, 0x003e,
-	0x009e, 0x080c, 0xac28, 0x080c, 0x96a0, 0x0005, 0x080c, 0x963b,
-	0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xe621, 0x0036,
-	0x2019, 0x0029, 0x080c, 0xe26c, 0x003e, 0x009e, 0x080c, 0xac28,
-	0x0005, 0x9182, 0x0085, 0x0002, 0xdd6b, 0xdd69, 0xdd69, 0xdd77,
-	0xdd69, 0xdd69, 0xdd69, 0xdd69, 0xdd69, 0xdd69, 0xdd69, 0xdd69,
-	0xdd69, 0x080c, 0x0d7d, 0x6003, 0x000b, 0x6106, 0x0126, 0x2091,
-	0x8000, 0x2009, 0x8020, 0x080c, 0x921e, 0x012e, 0x0005, 0x0026,
-	0x00e6, 0x080c, 0xe4c3, 0x0118, 0x080c, 0xabed, 0x0440, 0x2071,
-	0x0260, 0x7224, 0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150,
-	0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e,
-	0x080c, 0xaf1a, 0x7220, 0x080c, 0xe102, 0x0118, 0x6007, 0x0086,
-	0x0040, 0x6007, 0x0087, 0x7224, 0x9296, 0xffff, 0x1110, 0x6007,
-	0x0086, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x921e, 0x00ee,
-	0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085,
-	0x0a0c, 0x0d7d, 0x908a, 0x0092, 0x1a0c, 0x0d7d, 0x9082, 0x0085,
-	0x00a2, 0x9186, 0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c,
-	0xaca9, 0x0050, 0x2001, 0x0007, 0x080c, 0x65a1, 0x080c, 0x95de,
-	0x080c, 0xac28, 0x080c, 0x96a0, 0x0005, 0xddda, 0xdddc, 0xdddc,
-	0xddda, 0xddda, 0xddda, 0xddda, 0xddda, 0xddda, 0xddda, 0xddda,
-	0xddda, 0xddda, 0x080c, 0x0d7d, 0x080c, 0xac28, 0x080c, 0x96a0,
-	0x0005, 0x9182, 0x0085, 0x0a0c, 0x0d7d, 0x9182, 0x0092, 0x1a0c,
-	0x0d7d, 0x9182, 0x0085, 0x0002, 0xddf9, 0xddf9, 0xddf9, 0xddfb,
-	0xddf9, 0xddf9, 0xddf9, 0xddf9, 0xddf9, 0xddf9, 0xddf9, 0xddf9,
-	0xddf9, 0x080c, 0x0d7d, 0x0005, 0x9186, 0x0013, 0x0148, 0x9186,
-	0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0xaca9, 0x0020,
-	0x080c, 0x95de, 0x080c, 0xac28, 0x0005, 0x0036, 0x080c, 0xe524,
-	0x604b, 0x0000, 0x2019, 0x000b, 0x0031, 0x6023, 0x0006, 0x6003,
-	0x0007, 0x003e, 0x0005, 0x0126, 0x0036, 0x2091, 0x8000, 0x2001,
-	0x0382, 0x2004, 0x9084, 0x0007, 0x0006, 0x9086, 0x0003, 0x0110,
-	0x080c, 0xa896, 0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0xa218,
-	0x009e, 0x008e, 0x1550, 0x0076, 0x2c38, 0x080c, 0xa2c3, 0x007e,
-	0x1520, 0x6000, 0x9086, 0x0000, 0x0500, 0x6020, 0x9086, 0x0007,
-	0x01e0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xe524, 0x080c,
-	0xcf6a, 0x080c, 0x1a6a, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c,
-	0xc838, 0x0110, 0x080c, 0xe26c, 0x009e, 0x6017, 0x0000, 0x080c,
-	0xe524, 0x6023, 0x0007, 0x080c, 0xcf6a, 0x000e, 0x9086, 0x0003,
-	0x0110, 0x080c, 0xa8b2, 0x003e, 0x012e, 0x0005, 0x00f6, 0x00c6,
+	0x9682, 0x0004, 0x0a04, 0xd114, 0x9682, 0x0007, 0x0a04, 0xd170,
+	0x0804, 0xd114, 0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xd22d,
+	0x080c, 0x6a28, 0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009,
+	0x9086, 0x0008, 0x1110, 0x0804, 0xd04f, 0x080c, 0x69c4, 0x6610,
+	0x2658, 0xbe04, 0x9684, 0x00ff, 0x0006, 0x9086, 0x0001, 0x000e,
+	0x0170, 0x9082, 0x0006, 0x0698, 0x0150, 0x96b4, 0xff00, 0x8637,
+	0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd114, 0x080c,
+	0xdfcc, 0x1130, 0x080c, 0xdec5, 0x1118, 0x6007, 0x0010, 0x04e8,
+	0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x31ef, 0x080c,
+	0xcf66, 0x004e, 0x0016, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4,
+	0x0148, 0x2009, 0x0029, 0x080c, 0xe2d9, 0x6010, 0x2058, 0xb800,
+	0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c,
+	0xe15c, 0x0140, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0978,
+	0x0804, 0xd114, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c,
+	0x3326, 0x1904, 0xd440, 0x080c, 0xe4d3, 0x1904, 0xd440, 0x080c,
+	0xd60d, 0x1904, 0xd114, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c,
+	0x9207, 0x080c, 0x9684, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001,
+	0x080c, 0x9207, 0x080c, 0x9684, 0x0cb0, 0x6007, 0x0005, 0x0c68,
+	0x080c, 0xe4d3, 0x1904, 0xd440, 0x080c, 0x3326, 0x1904, 0xd440,
+	0x080c, 0xd60d, 0x1904, 0xd114, 0x6007, 0x0020, 0x6003, 0x0001,
+	0x080c, 0x9207, 0x080c, 0x9684, 0x0005, 0x080c, 0x3326, 0x1904,
+	0xd440, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x9207, 0x080c,
+	0x9684, 0x0005, 0x080c, 0xe4d3, 0x1904, 0xd440, 0x080c, 0x3326,
+	0x1904, 0xd440, 0x080c, 0xd60d, 0x1904, 0xd114, 0x0016, 0x0026,
+	0x00e6, 0x2071, 0x0260, 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08,
+	0x080c, 0xc820, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206, 0x1188,
+	0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240,
+	0x2c08, 0x9006, 0x080c, 0xe2a3, 0x1180, 0x7244, 0x9286, 0xffff,
+	0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214, 0x9296,
+	0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086, 0x0007,
+	0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0xabdf, 0x2160,
+	0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x9207, 0x080c, 0x9684,
+	0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x655c,
+	0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805,
+	0x2011, 0x0276, 0x080c, 0xbba1, 0x003e, 0x002e, 0x001e, 0x015e,
+	0x0120, 0x6007, 0x0031, 0x0804, 0xd22d, 0x080c, 0xb812, 0x080c,
+	0x74c8, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x74e2, 0x1138,
+	0x080c, 0x77cc, 0x080c, 0x6024, 0x080c, 0x73f9, 0x0010, 0x080c,
+	0x749c, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x3326, 0x1904,
+	0xd440, 0x080c, 0xd60d, 0x1904, 0xd114, 0x6106, 0x080c, 0xd629,
+	0x1120, 0x6007, 0x002b, 0x0804, 0xd22d, 0x6007, 0x002c, 0x0804,
+	0xd22d, 0x080c, 0xe4d3, 0x1904, 0xd440, 0x080c, 0x3326, 0x1904,
+	0xd440, 0x080c, 0xd60d, 0x1904, 0xd114, 0x6106, 0x080c, 0xd62e,
+	0x1120, 0x6007, 0x002e, 0x0804, 0xd22d, 0x6007, 0x002f, 0x0804,
+	0xd22d, 0x080c, 0x3326, 0x1904, 0xd440, 0x00e6, 0x00d6, 0x00c6,
+	0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158,
+	0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de,
+	0x00ee, 0x0804, 0xd234, 0x080c, 0x56d9, 0xd0e4, 0x0904, 0xd38b,
+	0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108, 0x720c,
+	0x080c, 0x6a66, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106, 0x1118,
+	0xb814, 0x9206, 0x0510, 0x080c, 0x6a62, 0x15b8, 0x2069, 0x1800,
+	0x6880, 0x9206, 0x1590, 0x687c, 0x9106, 0x1578, 0x7210, 0x080c,
+	0xc820, 0x0590, 0x080c, 0xd4f8, 0x0578, 0x080c, 0xe355, 0x0560,
+	0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c,
+	0x9200, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff,
+	0x0150, 0x080c, 0xc820, 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110,
+	0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c,
+	0xe2a3, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037, 0x602f,
+	0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003,
+	0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c, 0x3326,
+	0x1904, 0xd440, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00, 0x8007,
+	0x9086, 0x0006, 0x1904, 0xd234, 0x00e6, 0x00d6, 0x00c6, 0x080c,
+	0x56d9, 0xd0e4, 0x0904, 0xd403, 0x2069, 0x1800, 0x2071, 0x026c,
+	0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150, 0x7208,
+	0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xe2a3, 0x2c10, 0x00ce,
+	0x05e8, 0x080c, 0xc820, 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004,
+	0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xc423, 0x002e,
+	0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001, 0x0178,
+	0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280, 0x0005,
+	0x2004, 0x9005, 0x0170, 0x080c, 0xd4f8, 0x0904, 0xd384, 0x0056,
+	0x7510, 0x7614, 0x080c, 0xe36e, 0x005e, 0x00ce, 0x00de, 0x00ee,
+	0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003,
+	0x0001, 0x2009, 0x8020, 0x080c, 0x9200, 0x0c78, 0x6007, 0x003b,
+	0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x2009, 0x8020,
+	0x080c, 0x9200, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b, 0x6017,
+	0x0000, 0x0804, 0xd35b, 0x00e6, 0x0026, 0x080c, 0x6a28, 0x0550,
+	0x080c, 0x69c4, 0x080c, 0xe545, 0x1518, 0x2071, 0x1800, 0x70dc,
+	0x9085, 0x0003, 0x70de, 0x00f6, 0x2079, 0x0100, 0x72b0, 0x9284,
+	0x00ff, 0x707e, 0x78e6, 0x9284, 0xff00, 0x7280, 0x9205, 0x7082,
+	0x78ea, 0x00fe, 0x70e7, 0x0000, 0x080c, 0x6a66, 0x0120, 0x2011,
+	0x1a08, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2fc0, 0x0010,
+	0x080c, 0xe577, 0x002e, 0x00ee, 0x080c, 0xabdf, 0x0804, 0xd233,
+	0x080c, 0xabdf, 0x0005, 0x2600, 0x0002, 0xd457, 0xd488, 0xd499,
+	0xd457, 0xd457, 0xd459, 0xd4aa, 0xd457, 0xd457, 0xd457, 0xd476,
+	0xd457, 0xd457, 0xd457, 0xd4b5, 0xd4c2, 0xd4f3, 0xd457, 0x080c,
+	0x0d7d, 0x080c, 0xe4d3, 0x1d20, 0x080c, 0x3326, 0x1d08, 0x080c,
+	0xd60d, 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001,
+	0x080c, 0x9207, 0x0005, 0x080c, 0x31ef, 0x080c, 0xcf66, 0x6007,
+	0x0001, 0x6003, 0x0001, 0x080c, 0x9207, 0x0005, 0x080c, 0xe4d3,
+	0x1938, 0x080c, 0x3326, 0x1920, 0x080c, 0xd60d, 0x1d60, 0x703c,
+	0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x9207, 0x0005,
+	0x080c, 0x3326, 0x1904, 0xd440, 0x2009, 0x0041, 0x080c, 0xe580,
+	0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x9207, 0x080c, 0x9684,
+	0x0005, 0x080c, 0x3326, 0x1904, 0xd440, 0x2009, 0x0042, 0x080c,
+	0xe580, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x9207, 0x080c,
+	0x9684, 0x0005, 0x080c, 0x3326, 0x1904, 0xd440, 0x2009, 0x0046,
+	0x080c, 0xe580, 0x080c, 0xabdf, 0x0005, 0x080c, 0xd515, 0x0904,
+	0xd440, 0x6007, 0x004e, 0x6003, 0x0001, 0x080c, 0x9207, 0x080c,
+	0x9684, 0x0005, 0x6007, 0x004f, 0x6017, 0x0000, 0x7134, 0x918c,
+	0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, 0x1160, 0x7140, 0x2001,
+	0x19bc, 0x2004, 0x9106, 0x11b0, 0x7144, 0x2001, 0x19bd, 0x2004,
+	0x9106, 0x0190, 0x9186, 0x0002, 0x1168, 0x2011, 0x0276, 0x20a9,
+	0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xbbb5,
+	0x009e, 0x0110, 0x6017, 0x0001, 0x6003, 0x0001, 0x080c, 0x9207,
+	0x080c, 0x9684, 0x0005, 0x6007, 0x0050, 0x703c, 0x6016, 0x0ca0,
+	0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6, 0x2260, 0x6010,
+	0x2058, 0xb8d4, 0xd084, 0x0150, 0x7128, 0x6050, 0x9106, 0x1120,
+	0x712c, 0x604c, 0x9106, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005, 0x0016, 0x0096, 0x0086,
+	0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800,
+	0x7090, 0x908a, 0x00f9, 0x16e8, 0x20e1, 0x0000, 0x2001, 0x199f,
+	0x2003, 0x0000, 0x080c, 0x1053, 0x05a0, 0x2900, 0x6016, 0x7090,
+	0x8004, 0xa816, 0x908a, 0x001e, 0x02d0, 0xa833, 0x001e, 0x20a9,
+	0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001,
+	0x199f, 0x0016, 0x200c, 0x0471, 0x001e, 0x2940, 0x080c, 0x1053,
+	0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff, 0x0180, 0x0c18, 0xa832,
+	0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001,
+	0x199f, 0x0016, 0x200c, 0x00b1, 0x001e, 0x0000, 0x9085, 0x0001,
+	0x0048, 0x2071, 0x1800, 0x7093, 0x0000, 0x6014, 0x2048, 0x080c,
+	0x0fec, 0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee, 0x008e, 0x009e,
+	0x001e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x918c,
+	0xffff, 0x11a8, 0x080c, 0x219a, 0x2099, 0x026c, 0x2001, 0x0014,
+	0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x00f8, 0x20a8, 0x4003,
+	0x22a8, 0x8108, 0x080c, 0x219a, 0x2099, 0x0260, 0x0ca8, 0x080c,
+	0x219a, 0x2061, 0x199f, 0x6004, 0x2098, 0x6008, 0x3518, 0x9312,
+	0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8, 0x8108,
+	0x080c, 0x219a, 0x2099, 0x0260, 0x0ca8, 0x2061, 0x199f, 0x2019,
+	0x0280, 0x3300, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0260,
+	0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a,
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016,
+	0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x21b2, 0x20a1,
+	0x024c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
+	0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108, 0x080c,
+	0x21b2, 0x20a1, 0x0240, 0x0c98, 0x080c, 0x21b2, 0x2061, 0x19a2,
+	0x6004, 0x20a0, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
+	0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108, 0x080c,
+	0x21b2, 0x20a1, 0x0240, 0x0c98, 0x2061, 0x19a2, 0x2019, 0x0260,
+	0x3400, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0240, 0x6006,
+	0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, 0x00ce,
+	0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066, 0x6610,
+	0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0170,
+	0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006,
+	0x0128, 0x9686, 0x0004, 0x0110, 0x9085, 0x0001, 0x006e, 0x00be,
+	0x0005, 0x00d6, 0x080c, 0xd6a3, 0x00de, 0x0005, 0x00d6, 0x080c,
+	0xd6b0, 0x1520, 0x680c, 0x908c, 0xff00, 0x6820, 0x9084, 0x00ff,
+	0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006, 0x080c,
+	0xe6a0, 0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920, 0x918c,
+	0x00ff, 0x6824, 0x080c, 0x2614, 0x1148, 0x2001, 0x0001, 0x080c,
+	0xe6a0, 0x2110, 0x900e, 0x080c, 0x323e, 0x0018, 0x9085, 0x0001,
+	0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c, 0xac4f,
+	0x0598, 0x0016, 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204, 0x8211,
+	0x220c, 0x080c, 0x2614, 0x1568, 0x080c, 0x65bf, 0x1550, 0xbe12,
+	0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c, 0xe4d3,
+	0x11c8, 0x080c, 0x3326, 0x11b0, 0x080c, 0xd60d, 0x0500, 0x2001,
+	0x0007, 0x080c, 0x6570, 0x2001, 0x0007, 0x080c, 0x659c, 0x6017,
+	0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
+	0x9207, 0x0010, 0x080c, 0xabdf, 0x9085, 0x0001, 0x00ce, 0x00be,
+	0x0005, 0x080c, 0xabdf, 0x00ce, 0x002e, 0x001e, 0x0ca8, 0x080c,
+	0xabdf, 0x9006, 0x0c98, 0x2069, 0x026d, 0x6800, 0x9082, 0x0010,
+	0x1228, 0x6017, 0x0000, 0x9085, 0x0001, 0x0008, 0x9006, 0x0005,
+	0x6017, 0x0000, 0x2069, 0x026c, 0x6808, 0x9084, 0xff00, 0x9086,
+	0x0800, 0x1190, 0x6904, 0x9186, 0x0018, 0x0118, 0x9186, 0x0014,
+	0x1158, 0x810f, 0x6800, 0x9084, 0x00ff, 0x910d, 0x6162, 0x908e,
+	0x0014, 0x0110, 0x908e, 0x0010, 0x0005, 0x6004, 0x90b2, 0x0053,
+	0x1a0c, 0x0d7d, 0x91b6, 0x0013, 0x1130, 0x2008, 0x91b2, 0x0040,
+	0x1a04, 0xd7f2, 0x0092, 0x91b6, 0x0027, 0x0120, 0x91b6, 0x0014,
+	0x190c, 0x0d7d, 0x2001, 0x0007, 0x080c, 0x659c, 0x080c, 0x95c6,
+	0x080c, 0xac1a, 0x080c, 0x9684, 0x0005, 0xd72d, 0xd72f, 0xd72d,
+	0xd72d, 0xd72d, 0xd72f, 0xd73c, 0xd7ef, 0xd78c, 0xd7ef, 0xd7a0,
+	0xd7ef, 0xd73c, 0xd7ef, 0xd7e7, 0xd7ef, 0xd7e7, 0xd7ef, 0xd7ef,
+	0xd72d, 0xd72d, 0xd72d, 0xd72d, 0xd72d, 0xd72d, 0xd72d, 0xd72d,
+	0xd72d, 0xd72d, 0xd72d, 0xd72f, 0xd72d, 0xd7ef, 0xd72d, 0xd72d,
+	0xd7ef, 0xd72d, 0xd7ec, 0xd7ef, 0xd72d, 0xd72d, 0xd72d, 0xd72d,
+	0xd7ef, 0xd7ef, 0xd72d, 0xd7ef, 0xd7ef, 0xd72d, 0xd737, 0xd72d,
+	0xd72d, 0xd72d, 0xd72d, 0xd7eb, 0xd7ef, 0xd72d, 0xd72d, 0xd7ef,
+	0xd7ef, 0xd72d, 0xd72d, 0xd72d, 0xd72d, 0x080c, 0x0d7d, 0x080c,
+	0xcf69, 0x6003, 0x0002, 0x080c, 0x9684, 0x0804, 0xd7f1, 0x9006,
+	0x080c, 0x655c, 0x0804, 0xd7ef, 0x080c, 0x6a62, 0x1904, 0xd7ef,
+	0x9006, 0x080c, 0x655c, 0x6010, 0x2058, 0xb810, 0x9086, 0x00ff,
+	0x1140, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe,
+	0x0428, 0x6010, 0x2058, 0xb884, 0x9005, 0x1178, 0x080c, 0xcf51,
+	0x1904, 0xd7ef, 0x0036, 0x0046, 0xbba0, 0x2021, 0x0007, 0x080c,
+	0x4cc0, 0x004e, 0x003e, 0x0804, 0xd7ef, 0x080c, 0x3357, 0x1904,
+	0xd7ef, 0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1138, 0x00f6,
+	0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x2001, 0x0002,
+	0x080c, 0x6570, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002,
+	0x080c, 0x9207, 0x080c, 0x9684, 0x6110, 0x2158, 0x2009, 0x0001,
+	0x080c, 0x862b, 0x0804, 0xd7f1, 0x6610, 0x2658, 0xbe04, 0x96b4,
+	0xff00, 0x8637, 0x9686, 0x0006, 0x0904, 0xd7ef, 0x9686, 0x0004,
+	0x0904, 0xd7ef, 0x080c, 0x8eac, 0x2001, 0x0004, 0x0804, 0xd7ed,
+	0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046,
+	0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4cc0, 0x004e,
+	0x003e, 0x2001, 0x0006, 0x080c, 0xd80b, 0x6610, 0x2658, 0xbe04,
+	0x0066, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168,
+	0x2001, 0x0006, 0x080c, 0x659c, 0x9284, 0x00ff, 0x908e, 0x0007,
+	0x1120, 0x2001, 0x0006, 0x080c, 0x6570, 0x080c, 0x6a62, 0x11f8,
+	0x2001, 0x1837, 0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff,
+	0x9686, 0x0006, 0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000,
+	0x78aa, 0x00fe, 0x0804, 0xd776, 0x2001, 0x0004, 0x0030, 0x2001,
+	0x0006, 0x0409, 0x0020, 0x0018, 0x0010, 0x080c, 0x659c, 0x080c,
+	0xabdf, 0x0005, 0x2600, 0x0002, 0xd806, 0xd806, 0xd806, 0xd806,
+	0xd806, 0xd808, 0xd806, 0xd808, 0xd806, 0xd806, 0xd808, 0xd806,
+	0xd806, 0xd806, 0xd808, 0xd808, 0xd808, 0xd808, 0x080c, 0x0d7d,
+	0x080c, 0xabdf, 0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158,
+	0xb900, 0xd184, 0x0138, 0x080c, 0x6570, 0x9006, 0x080c, 0x655c,
+	0x080c, 0x321e, 0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658,
+	0xb804, 0x9084, 0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0d7d,
+	0x91b6, 0x0015, 0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c,
+	0x0d7d, 0x006b, 0x0005, 0xb68f, 0xb68f, 0xb68f, 0xb68f, 0xd8a0,
+	0xb68f, 0xd88a, 0xd84b, 0xb68f, 0xb68f, 0xb68f, 0xb68f, 0xb68f,
+	0xb68f, 0xb68f, 0xb68f, 0xd8a0, 0xb68f, 0xd88a, 0xd891, 0xb68f,
+	0xb68f, 0xb68f, 0xb68f, 0x00f6, 0x080c, 0x6a62, 0x11d8, 0x080c,
+	0xcf51, 0x11c0, 0x6010, 0x905d, 0x01a8, 0xb884, 0x9005, 0x0190,
+	0x9006, 0x080c, 0x655c, 0x2001, 0x0002, 0x080c, 0x6570, 0x6023,
+	0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9207, 0x080c,
+	0x9684, 0x00f0, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c,
+	0x2614, 0x11b0, 0x080c, 0x6620, 0x0118, 0x080c, 0xabdf, 0x0080,
+	0xb810, 0x0006, 0xb814, 0x0006, 0xb884, 0x0006, 0x080c, 0x603e,
+	0x000e, 0xb886, 0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0xabdf,
+	0x00fe, 0x0005, 0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0xabdf,
+	0x0005, 0x080c, 0xba1a, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001,
+	0x080c, 0x9207, 0x080c, 0x9684, 0x0010, 0x080c, 0xabdf, 0x0005,
+	0x0804, 0xabdf, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d7d, 0x080c,
+	0x95c6, 0x080c, 0xac1a, 0x0005, 0x9182, 0x0040, 0x0002, 0xd8c2,
+	0xd8c2, 0xd8c2, 0xd8c2, 0xd8c4, 0xd8c2, 0xd8c2, 0xd8c2, 0xd8c2,
+	0xd8c2, 0xd8c2, 0xd8c2, 0xd8c2, 0xd8c2, 0xd8c2, 0xd8c2, 0xd8c2,
+	0xd8c2, 0xd8c2, 0x080c, 0x0d7d, 0x0096, 0x00b6, 0x00d6, 0x00e6,
+	0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8bc, 0x9005, 0x11b0,
+	0x6007, 0x0044, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904,
+	0xd92b, 0x080c, 0xe694, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009,
+	0x0001, 0x2011, 0x0200, 0x080c, 0x88ce, 0x0020, 0x9026, 0x080c,
+	0xe518, 0x0c30, 0x080c, 0x103a, 0x090c, 0x0d7d, 0x6003, 0x0007,
+	0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e,
+	0x6008, 0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016,
+	0xa876, 0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c,
+	0x6d7b, 0x001e, 0x080c, 0xe694, 0x1904, 0xd98b, 0x9486, 0x2000,
+	0x1130, 0x2019, 0x0017, 0x080c, 0xe249, 0x0804, 0xd98b, 0x9486,
+	0x0200, 0x1120, 0x080c, 0xe1d9, 0x0804, 0xd98b, 0x9486, 0x0400,
+	0x0120, 0x9486, 0x1000, 0x1904, 0xd98b, 0x2019, 0x0002, 0x080c,
+	0xe1f8, 0x0804, 0xd98b, 0x2069, 0x1a6e, 0x6a00, 0xd284, 0x0904,
+	0xd9f5, 0x9284, 0x0300, 0x1904, 0xd9ee, 0x6804, 0x9005, 0x0904,
+	0xd9d6, 0x2d78, 0x6003, 0x0007, 0x080c, 0x1053, 0x0904, 0xd997,
+	0x7800, 0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000,
+	0x2001, 0x180f, 0x2004, 0xd084, 0x1904, 0xd9f9, 0x9006, 0xa802,
+	0xa867, 0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010,
+	0x2058, 0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c,
+	0xa9be, 0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044,
+	0x9084, 0x0003, 0x9080, 0xd993, 0x2005, 0xa87e, 0x20a9, 0x000a,
+	0x2001, 0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b,
+	0x0080, 0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003,
+	0x200b, 0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c,
+	0xa9ae, 0x080c, 0x6d7e, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de,
+	0x00be, 0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001,
+	0x1810, 0x2004, 0xd084, 0x0120, 0x080c, 0x103a, 0x1904, 0xd940,
+	0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022,
+	0x080c, 0x9200, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00,
+	0x9086, 0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114,
+	0x918c, 0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007,
+	0x0043, 0x2009, 0xa025, 0x080c, 0x9200, 0x0828, 0x6868, 0x602e,
+	0x686c, 0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041,
+	0x2009, 0xa022, 0x080c, 0x9200, 0x0804, 0xd98b, 0x2001, 0x180e,
+	0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b09, 0x6017,
+	0xf300, 0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041,
+	0x2009, 0xa022, 0x080c, 0x9200, 0x0804, 0xd98b, 0x6017, 0xf500,
+	0x0c98, 0x6017, 0xf600, 0x0804, 0xd9ab, 0x6017, 0xf200, 0x0804,
+	0xd9ab, 0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00,
+	0xa87a, 0x7044, 0x9084, 0x0003, 0x9080, 0xd993, 0x2005, 0xa87e,
+	0x2928, 0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c,
+	0xa88e, 0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009,
+	0x0205, 0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011,
+	0x0210, 0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c,
+	0x0d7d, 0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0029, 0x20a0, 0x2011, 0xda75, 0x2041, 0x0001,
+	0x223d, 0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003,
+	0x931a, 0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001,
+	0x0260, 0x2098, 0x0c68, 0x2950, 0x080c, 0x1053, 0x0170, 0x2900,
+	0xb002, 0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d,
+	0x0118, 0x080c, 0x106c, 0x0cc8, 0x080c, 0x106c, 0x0804, 0xd997,
+	0x2548, 0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b,
+	0x0000, 0x080c, 0xe27c, 0x0804, 0xd98b, 0x8010, 0x0004, 0x801a,
+	0x0006, 0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013,
+	0x1160, 0x6004, 0x908a, 0x0057, 0x1a0c, 0x0d7d, 0x9082, 0x0040,
+	0x0a0c, 0x0d7d, 0x2008, 0x0804, 0xdb00, 0x9186, 0x0051, 0x0108,
+	0x0040, 0x080c, 0xaa9a, 0x01e8, 0x9086, 0x0002, 0x0904, 0xdb47,
+	0x00c0, 0x9186, 0x0027, 0x0180, 0x9186, 0x0048, 0x0128, 0x9186,
+	0x0014, 0x0150, 0x190c, 0x0d7d, 0x080c, 0xaa9a, 0x0150, 0x9086,
+	0x0004, 0x0904, 0xdbe4, 0x0028, 0x6004, 0x9082, 0x0040, 0x2008,
+	0x001a, 0x080c, 0xac99, 0x0005, 0xdac7, 0xdac9, 0xdac9, 0xdaf0,
+	0xdac7, 0xdac7, 0xdac7, 0xdac7, 0xdac7, 0xdac7, 0xdac7, 0xdac7,
+	0xdac7, 0xdac7, 0xdac7, 0xdac7, 0xdac7, 0xdac7, 0xdac7, 0x080c,
+	0x0d7d, 0x080c, 0x95c6, 0x080c, 0x9684, 0x0036, 0x0096, 0x6014,
+	0x904d, 0x01d8, 0x080c, 0xc832, 0x01c0, 0x6003, 0x0002, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004,
+	0x080c, 0xe27c, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001,
+	0x1986, 0x2004, 0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005,
+	0x0096, 0x080c, 0x95c6, 0x080c, 0x9684, 0x080c, 0xc832, 0x0120,
+	0x6014, 0x2048, 0x080c, 0x106c, 0x080c, 0xac1a, 0x009e, 0x0005,
+	0x0002, 0xdb14, 0xdb29, 0xdb16, 0xdb3e, 0xdb14, 0xdb14, 0xdb14,
+	0xdb14, 0xdb14, 0xdb14, 0xdb14, 0xdb14, 0xdb14, 0xdb14, 0xdb14,
+	0xdb14, 0xdb14, 0xdb14, 0xdb14, 0x080c, 0x0d7d, 0x0096, 0x6014,
+	0x2048, 0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043,
+	0x080c, 0xac7c, 0x0010, 0x6003, 0x0004, 0x080c, 0x9684, 0x009e,
+	0x0005, 0x080c, 0xc832, 0x0138, 0x6114, 0x0096, 0x2148, 0xa97c,
+	0x009e, 0xd1ec, 0x1138, 0x080c, 0x88a3, 0x080c, 0xabdf, 0x080c,
+	0x9684, 0x0005, 0x080c, 0xe4dc, 0x0db0, 0x0cc8, 0x6003, 0x0001,
+	0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x9200, 0x0005, 0x9182,
+	0x0040, 0x0002, 0xdb5d, 0xdb5f, 0xdb5d, 0xdb5d, 0xdb5d, 0xdb5d,
+	0xdb5d, 0xdb5d, 0xdb5d, 0xdb5d, 0xdb5d, 0xdb5d, 0xdb5d, 0xdb5d,
+	0xdb5d, 0xdb5d, 0xdb5d, 0xdb60, 0xdb5d, 0x080c, 0x0d7d, 0x0005,
+	0x00d6, 0x080c, 0x88a3, 0x00de, 0x080c, 0xe534, 0x080c, 0xabdf,
+	0x0005, 0x9182, 0x0040, 0x0002, 0xdb7f, 0xdb7f, 0xdb7f, 0xdb7f,
+	0xdb7f, 0xdb7f, 0xdb7f, 0xdb7f, 0xdb7f, 0xdb81, 0xdbac, 0xdb7f,
+	0xdb7f, 0xdb7f, 0xdb7f, 0xdbac, 0xdb7f, 0xdb7f, 0xdb7f, 0x080c,
+	0x0d7d, 0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x908c,
+	0x0003, 0x918e, 0x0002, 0x0180, 0x6144, 0xd1e4, 0x1168, 0x2009,
+	0x0041, 0x009e, 0x0804, 0xdc6c, 0x6003, 0x0007, 0x601b, 0x0000,
+	0x080c, 0x88a3, 0x009e, 0x0005, 0x6014, 0x2048, 0xa97c, 0xd1ec,
+	0x1130, 0x080c, 0x88a3, 0x080c, 0xabdf, 0x009e, 0x0005, 0x080c,
+	0xe4dc, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1d4,
+	0x2102, 0x0036, 0x080c, 0x9621, 0x080c, 0x9684, 0x6014, 0x0096,
+	0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0188,
+	0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac, 0x6330,
+	0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003, 0x0002,
+	0x0080, 0x2019, 0x0004, 0x080c, 0xe27c, 0x6018, 0x9005, 0x1128,
+	0x2001, 0x1986, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000, 0x6003,
+	0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002, 0xdbfb,
+	0xdbfb, 0xdbfb, 0xdbfb, 0xdbfb, 0xdbfb, 0xdbfb, 0xdbfb, 0xdbfd,
+	0xdbfb, 0xdbfb, 0xdbfb, 0xdbfb, 0xdbfb, 0xdbfb, 0xdbfb, 0xdbfb,
+	0xdbfb, 0xdbfb, 0xdc48, 0x080c, 0x0d7d, 0x6014, 0x0096, 0x2048,
+	0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc,
+	0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009, 0x0041,
+	0x009e, 0x0804, 0xdc6c, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c,
+	0x88a3, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006, 0x0046,
+	0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420, 0x6432,
+	0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110, 0x00b6,
+	0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e, 0x210c,
+	0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006, 0x00e9,
+	0x080c, 0x88a5, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e, 0x0005,
+	0x6024, 0xd0f4, 0x0128, 0x080c, 0x167d, 0x1904, 0xdbfd, 0x0005,
+	0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105, 0x1120,
+	0x080c, 0x167d, 0x1904, 0xdbfd, 0x0005, 0xd2fc, 0x0140, 0x8002,
+	0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010, 0x2009,
+	0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208, 0x0062,
+	0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0d7d, 0x6024,
+	0xd0dc, 0x090c, 0x0d7d, 0x0005, 0xdc8f, 0xdc9b, 0xdca7, 0xdcb3,
+	0xdc8f, 0xdc8f, 0xdc8f, 0xdc8f, 0xdc96, 0xdc91, 0xdc91, 0xdc8f,
+	0xdc8f, 0xdc8f, 0xdc8f, 0xdc91, 0xdc8f, 0xdc91, 0xdc8f, 0x080c,
+	0x0d7d, 0x6024, 0xd0dc, 0x090c, 0x0d7d, 0x0005, 0x6014, 0x9005,
+	0x190c, 0x0d7d, 0x0005, 0x6003, 0x0001, 0x6106, 0x0126, 0x2091,
+	0x8000, 0x2009, 0xa022, 0x080c, 0x91e2, 0x012e, 0x0005, 0x6003,
+	0x0004, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa001, 0x080c,
+	0x9200, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x080c, 0x1c10,
+	0x0126, 0x2091, 0x8000, 0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc,
+	0x0188, 0x9084, 0x0003, 0x9086, 0x0002, 0x01a0, 0x6024, 0xd0cc,
+	0x1148, 0xd0c4, 0x1138, 0xa8a8, 0x9005, 0x1120, 0x6144, 0x918d,
+	0xb035, 0x0018, 0x6144, 0x918d, 0xa035, 0x009e, 0x080c, 0x9247,
+	0x012e, 0x0005, 0x6144, 0x918d, 0xa032, 0x0cb8, 0x0126, 0x2091,
+	0x8000, 0x0036, 0x0096, 0x9182, 0x0040, 0x0023, 0x009e, 0x003e,
+	0x012e, 0x0005, 0xdcfa, 0xdcfc, 0xdd11, 0xdd2b, 0xdcfa, 0xdcfa,
+	0xdcfa, 0xdcfa, 0xdcfa, 0xdcfa, 0xdcfa, 0xdcfa, 0xdcfa, 0xdcfa,
+	0xdcfa, 0xdcfa, 0x080c, 0x0d7d, 0x6014, 0x2048, 0xa87c, 0xd0fc,
+	0x0510, 0x909c, 0x0003, 0x939e, 0x0003, 0x01e8, 0x6003, 0x0001,
+	0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x9200,
+	0x0470, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003,
+	0x939e, 0x0003, 0x0140, 0x6003, 0x0001, 0x6106, 0x2009, 0xa001,
+	0x080c, 0x9200, 0x00e0, 0x901e, 0x6316, 0x631a, 0x2019, 0x0004,
+	0x080c, 0xe27c, 0x00a0, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98,
+	0x909c, 0x0003, 0x939e, 0x0003, 0x0d70, 0x6003, 0x0003, 0x6106,
+	0x080c, 0x1c10, 0x6144, 0x918d, 0xa035, 0x080c, 0x9247, 0x0005,
+	0x080c, 0x95c6, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c,
+	0xe631, 0x0036, 0x2019, 0x0029, 0x080c, 0xe27c, 0x003e, 0x009e,
+	0x080c, 0xac1a, 0x080c, 0x9684, 0x0005, 0x080c, 0x9621, 0x6114,
+	0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xe631, 0x0036, 0x2019,
+	0x0029, 0x080c, 0xe27c, 0x003e, 0x009e, 0x080c, 0xac1a, 0x0005,
+	0x9182, 0x0085, 0x0002, 0xdd7a, 0xdd78, 0xdd78, 0xdd86, 0xdd78,
+	0xdd78, 0xdd78, 0xdd78, 0xdd78, 0xdd78, 0xdd78, 0xdd78, 0xdd78,
+	0x080c, 0x0d7d, 0x6003, 0x000b, 0x6106, 0x0126, 0x2091, 0x8000,
+	0x2009, 0x8020, 0x080c, 0x9200, 0x012e, 0x0005, 0x0026, 0x00e6,
+	0x080c, 0xe4d3, 0x0118, 0x080c, 0xabdf, 0x0440, 0x2071, 0x0260,
+	0x7224, 0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010,
+	0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c,
+	0xaf0a, 0x7220, 0x080c, 0xe112, 0x0118, 0x6007, 0x0086, 0x0040,
+	0x6007, 0x0087, 0x7224, 0x9296, 0xffff, 0x1110, 0x6007, 0x0086,
+	0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9200, 0x00ee, 0x002e,
+	0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c,
+	0x0d7d, 0x908a, 0x0092, 0x1a0c, 0x0d7d, 0x9082, 0x0085, 0x00a2,
+	0x9186, 0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0xac99,
+	0x0050, 0x2001, 0x0007, 0x080c, 0x659c, 0x080c, 0x95c6, 0x080c,
+	0xac1a, 0x080c, 0x9684, 0x0005, 0xdde9, 0xddeb, 0xddeb, 0xdde9,
+	0xdde9, 0xdde9, 0xdde9, 0xdde9, 0xdde9, 0xdde9, 0xdde9, 0xdde9,
+	0xdde9, 0x080c, 0x0d7d, 0x080c, 0xac1a, 0x080c, 0x9684, 0x0005,
+	0x9182, 0x0085, 0x0a0c, 0x0d7d, 0x9182, 0x0092, 0x1a0c, 0x0d7d,
+	0x9182, 0x0085, 0x0002, 0xde08, 0xde08, 0xde08, 0xde0a, 0xde08,
+	0xde08, 0xde08, 0xde08, 0xde08, 0xde08, 0xde08, 0xde08, 0xde08,
+	0x080c, 0x0d7d, 0x0005, 0x9186, 0x0013, 0x0148, 0x9186, 0x0014,
+	0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0xac99, 0x0020, 0x080c,
+	0x95c6, 0x080c, 0xac1a, 0x0005, 0x0036, 0x080c, 0xe534, 0x604b,
+	0x0000, 0x2019, 0x000b, 0x0031, 0x6023, 0x0006, 0x6003, 0x0007,
+	0x003e, 0x0005, 0x0126, 0x0036, 0x2091, 0x8000, 0x2001, 0x0382,
+	0x2004, 0x9084, 0x0007, 0x0006, 0x9086, 0x0003, 0x0110, 0x080c,
+	0xa888, 0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0xa1fa, 0x009e,
+	0x008e, 0x1558, 0x0076, 0x2c38, 0x080c, 0xa2a5, 0x007e, 0x1528,
+	0x6000, 0x9086, 0x0000, 0x0508, 0x6020, 0x9086, 0x0007, 0x01e8,
+	0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xe534, 0x080c, 0xcf69,
+	0x080c, 0x1a77, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xc832,
+	0x0110, 0x080c, 0xe27c, 0x009e, 0x9006, 0x6046, 0x6016, 0x080c,
+	0xe534, 0x6023, 0x0007, 0x080c, 0xcf69, 0x000e, 0x9086, 0x0003,
+	0x0110, 0x080c, 0xa8a4, 0x003e, 0x012e, 0x0005, 0x00f6, 0x00c6,
 	0x00b6, 0x0036, 0x0156, 0x2079, 0x0260, 0x7938, 0x783c, 0x080c,
-	0x25fb, 0x15e8, 0x0016, 0x00c6, 0x080c, 0x6625, 0x15b0, 0x001e,
-	0x00c6, 0x2160, 0x080c, 0xcf67, 0x00ce, 0x002e, 0x0026, 0x0016,
-	0x080c, 0xa896, 0x2019, 0x0029, 0x080c, 0xa38a, 0x080c, 0x93a5,
-	0x0076, 0x903e, 0x080c, 0x9277, 0x007e, 0x001e, 0x0076, 0x903e,
-	0x080c, 0xdfeb, 0x007e, 0x080c, 0xa8b2, 0x0026, 0xba04, 0x9294,
+	0x2614, 0x15e8, 0x0016, 0x00c6, 0x080c, 0x6620, 0x15b0, 0x001e,
+	0x00c6, 0x2160, 0x080c, 0xcf66, 0x00ce, 0x002e, 0x0026, 0x0016,
+	0x080c, 0xa888, 0x2019, 0x0029, 0x080c, 0xa372, 0x080c, 0x938d,
+	0x0076, 0x903e, 0x080c, 0x9256, 0x007e, 0x001e, 0x0076, 0x903e,
+	0x080c, 0xdffb, 0x007e, 0x080c, 0xa8a4, 0x0026, 0xba04, 0x9294,
 	0xff00, 0x8217, 0x9286, 0x0006, 0x0118, 0x9286, 0x0004, 0x1118,
-	0xbaa0, 0x080c, 0x32be, 0x002e, 0xbc84, 0x001e, 0x080c, 0x6043,
+	0xbaa0, 0x080c, 0x32ba, 0x002e, 0xbc84, 0x001e, 0x080c, 0x603e,
 	0xbe12, 0xbd16, 0xbc86, 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e,
 	0x003e, 0x00be, 0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6,
-	0x0016, 0x2009, 0x1824, 0x2104, 0x9086, 0x0074, 0x1904, 0xdf0e,
+	0x0016, 0x2009, 0x1824, 0x2104, 0x9086, 0x0074, 0x1904, 0xdf1e,
 	0x2069, 0x0260, 0x6944, 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184,
-	0x8000, 0x0904, 0xdf0b, 0x2001, 0x197c, 0x2004, 0x9005, 0x1140,
+	0x8000, 0x0904, 0xdf1b, 0x2001, 0x197b, 0x2004, 0x9005, 0x1140,
 	0x6010, 0x2058, 0xb884, 0x9005, 0x0118, 0x9184, 0x0800, 0x0598,
-	0x6948, 0x918a, 0x0001, 0x0648, 0x080c, 0xe689, 0x0118, 0x6978,
+	0x6948, 0x918a, 0x0001, 0x0648, 0x080c, 0xe699, 0x0118, 0x6978,
 	0xd1fc, 0x11b8, 0x2009, 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff,
 	0x1198, 0x6944, 0x9182, 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178,
 	0x6948, 0x918a, 0x0001, 0x0288, 0x6950, 0x918a, 0x0001, 0x0298,
@@ -6936,115 +6938,115 @@
 	0x0005, 0x00c6, 0x00b6, 0x0026, 0x0036, 0x0156, 0x6210, 0x2258,
 	0xbb04, 0x9394, 0x00ff, 0x9286, 0x0006, 0x0180, 0x9286, 0x0004,
 	0x0168, 0x9394, 0xff00, 0x8217, 0x9286, 0x0006, 0x0138, 0x9286,
-	0x0004, 0x0120, 0x080c, 0x6634, 0x0804, 0xdf7a, 0x2011, 0x0276,
-	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbbc2,
+	0x0004, 0x0120, 0x080c, 0x662f, 0x0804, 0xdf8a, 0x2011, 0x0276,
+	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbbb5,
 	0x009e, 0x15c8, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48,
-	0x2019, 0x0006, 0x080c, 0xbbc2, 0x009e, 0x1568, 0x0046, 0x0016,
+	0x2019, 0x0006, 0x080c, 0xbbb5, 0x009e, 0x1568, 0x0046, 0x0016,
 	0xbaa0, 0x2220, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0138,
-	0x2009, 0x0029, 0x080c, 0xe2c9, 0xb800, 0xc0e5, 0xb802, 0x080c,
-	0xa896, 0x2019, 0x0029, 0x080c, 0x93a5, 0x0076, 0x2039, 0x0000,
-	0x080c, 0x9277, 0x2c08, 0x080c, 0xdfeb, 0x007e, 0x080c, 0xa8b2,
-	0x2001, 0x0007, 0x080c, 0x65a1, 0x2001, 0x0007, 0x080c, 0x6575,
+	0x2009, 0x0029, 0x080c, 0xe2d9, 0xb800, 0xc0e5, 0xb802, 0x080c,
+	0xa888, 0x2019, 0x0029, 0x080c, 0x938d, 0x0076, 0x2039, 0x0000,
+	0x080c, 0x9256, 0x2c08, 0x080c, 0xdffb, 0x007e, 0x080c, 0xa8a4,
+	0x2001, 0x0007, 0x080c, 0x659c, 0x2001, 0x0007, 0x080c, 0x6570,
 	0x001e, 0x004e, 0x9006, 0x015e, 0x003e, 0x002e, 0x00be, 0x00ce,
 	0x0005, 0x00d6, 0x2069, 0x026e, 0x6800, 0x9086, 0x0800, 0x0118,
 	0x6017, 0x0000, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00f6,
 	0x0016, 0x0026, 0x0036, 0x0156, 0x2079, 0x026c, 0x7930, 0x7834,
-	0x080c, 0x25fb, 0x11d0, 0x080c, 0x6625, 0x11b8, 0x2011, 0x0270,
-	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbbc2,
+	0x080c, 0x2614, 0x11d0, 0x080c, 0x6620, 0x11b8, 0x2011, 0x0270,
+	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbbb5,
 	0x009e, 0x1158, 0x2011, 0x0274, 0x20a9, 0x0004, 0x0096, 0x2b48,
-	0x2019, 0x0006, 0x080c, 0xbbc2, 0x009e, 0x015e, 0x003e, 0x002e,
+	0x2019, 0x0006, 0x080c, 0xbbb5, 0x009e, 0x015e, 0x003e, 0x002e,
 	0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x0006, 0x0016, 0x0026,
 	0x0036, 0x0156, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c,
-	0x25fb, 0x11d0, 0x080c, 0x6625, 0x11b8, 0x2011, 0x0276, 0x20a9,
-	0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbbc2, 0x009e,
+	0x2614, 0x11d0, 0x080c, 0x6620, 0x11b8, 0x2011, 0x0276, 0x20a9,
+	0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbbb5, 0x009e,
 	0x1158, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
-	0x0006, 0x080c, 0xbbc2, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e,
+	0x0006, 0x080c, 0xbbb5, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e,
 	0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066,
-	0x0056, 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, 0x080c, 0xa8f4,
-	0x0106, 0x190c, 0xa896, 0x2740, 0x2029, 0x19f3, 0x252c, 0x2021,
-	0x19fa, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7654, 0x7074,
-	0x81ff, 0x0150, 0x0006, 0x9186, 0x1b32, 0x000e, 0x0128, 0x8001,
-	0x9602, 0x1a04, 0xe090, 0x0018, 0x9606, 0x0904, 0xe090, 0x080c,
-	0x8b90, 0x0904, 0xe087, 0x2100, 0x9c06, 0x0904, 0xe087, 0x080c,
-	0xe30a, 0x1904, 0xe087, 0x080c, 0xe6a6, 0x0904, 0xe087, 0x080c,
-	0xe2fa, 0x0904, 0xe087, 0x6720, 0x9786, 0x0001, 0x1148, 0x080c,
-	0x3363, 0x0904, 0xe0d2, 0x6004, 0x9086, 0x0000, 0x1904, 0xe0d2,
-	0x9786, 0x0004, 0x0904, 0xe0d2, 0x9786, 0x0007, 0x0904, 0xe087,
-	0x2500, 0x9c06, 0x0904, 0xe087, 0x2400, 0x9c06, 0x0904, 0xe087,
+	0x0056, 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, 0x080c, 0xa8e6,
+	0x0106, 0x190c, 0xa888, 0x2740, 0x2029, 0x19f2, 0x252c, 0x2021,
+	0x19f9, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7654, 0x7074,
+	0x81ff, 0x0150, 0x0006, 0x9186, 0x1b31, 0x000e, 0x0128, 0x8001,
+	0x9602, 0x1a04, 0xe0a0, 0x0018, 0x9606, 0x0904, 0xe0a0, 0x080c,
+	0x8b72, 0x0904, 0xe097, 0x2100, 0x9c06, 0x0904, 0xe097, 0x080c,
+	0xe31a, 0x1904, 0xe097, 0x080c, 0xe6b6, 0x0904, 0xe097, 0x080c,
+	0xe30a, 0x0904, 0xe097, 0x6720, 0x9786, 0x0001, 0x1148, 0x080c,
+	0x3357, 0x0904, 0xe0e2, 0x6004, 0x9086, 0x0000, 0x1904, 0xe0e2,
+	0x9786, 0x0004, 0x0904, 0xe0e2, 0x9786, 0x0007, 0x0904, 0xe097,
+	0x2500, 0x9c06, 0x0904, 0xe097, 0x2400, 0x9c06, 0x0904, 0xe097,
 	0x88ff, 0x0118, 0x605c, 0x9906, 0x15d0, 0x0096, 0x6043, 0xffff,
-	0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1a6a, 0x001e,
-	0x9786, 0x000a, 0x0148, 0x080c, 0xca4d, 0x1130, 0x080c, 0xb5b5,
-	0x009e, 0x080c, 0xac28, 0x0418, 0x6014, 0x2048, 0x080c, 0xc838,
+	0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1a77, 0x001e,
+	0x9786, 0x000a, 0x0148, 0x080c, 0xca47, 0x1130, 0x080c, 0xb5a6,
+	0x009e, 0x080c, 0xac1a, 0x0418, 0x6014, 0x2048, 0x080c, 0xc832,
 	0x01d8, 0x9786, 0x0003, 0x1588, 0xa867, 0x0103, 0xa87c, 0xd0cc,
 	0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fec, 0x009e, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0xe621, 0x0016, 0x080c, 0xcb36, 0x080c,
-	0x6d74, 0x001e, 0x080c, 0xca27, 0x009e, 0x080c, 0xac28, 0x9ce0,
-	0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1210, 0x0804, 0xe004,
-	0x010e, 0x190c, 0xa8b2, 0x012e, 0x002e, 0x004e, 0x005e, 0x006e,
+	0xa877, 0x0000, 0x080c, 0xe631, 0x0016, 0x080c, 0xcb35, 0x080c,
+	0x6d6f, 0x001e, 0x080c, 0xca21, 0x009e, 0x080c, 0xac1a, 0x9ce0,
+	0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1210, 0x0804, 0xe014,
+	0x010e, 0x190c, 0xa8a4, 0x012e, 0x002e, 0x004e, 0x005e, 0x006e,
 	0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, 0x9786, 0x0006, 0x1150,
-	0x9386, 0x0005, 0x0128, 0x080c, 0xe621, 0x080c, 0xe26c, 0x08e0,
+	0x9386, 0x0005, 0x0128, 0x080c, 0xe631, 0x080c, 0xe27c, 0x08e0,
 	0x009e, 0x08e8, 0x9786, 0x0009, 0x11f8, 0x6000, 0x9086, 0x0004,
-	0x01c0, 0x6000, 0x9086, 0x0003, 0x11a0, 0x080c, 0x963b, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xc838, 0x0118, 0x6010, 0x080c, 0x6d80,
-	0x009e, 0x00c6, 0x080c, 0xabed, 0x00ce, 0x0036, 0x080c, 0x96a0,
-	0x003e, 0x009e, 0x0804, 0xe087, 0x9786, 0x000a, 0x0904, 0xe06e,
-	0x0804, 0xe06c, 0x81ff, 0x0904, 0xe087, 0x9180, 0x0001, 0x2004,
+	0x01c0, 0x6000, 0x9086, 0x0003, 0x11a0, 0x080c, 0x9621, 0x0096,
+	0x6114, 0x2148, 0x080c, 0xc832, 0x0118, 0x6010, 0x080c, 0x6d7b,
+	0x009e, 0x00c6, 0x080c, 0xabdf, 0x00ce, 0x0036, 0x080c, 0x9684,
+	0x003e, 0x009e, 0x0804, 0xe097, 0x9786, 0x000a, 0x0904, 0xe07e,
+	0x0804, 0xe07c, 0x81ff, 0x0904, 0xe097, 0x9180, 0x0001, 0x2004,
 	0x9086, 0x0018, 0x0138, 0x9180, 0x0001, 0x2004, 0x9086, 0x002d,
-	0x1904, 0xe087, 0x6000, 0x9086, 0x0002, 0x1904, 0xe087, 0x080c,
-	0xca3c, 0x0138, 0x080c, 0xca4d, 0x1904, 0xe087, 0x080c, 0xb5b5,
-	0x0038, 0x080c, 0x321c, 0x080c, 0xca4d, 0x1110, 0x080c, 0xb5b5,
-	0x080c, 0xac28, 0x0804, 0xe087, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x1904, 0xe097, 0x6000, 0x9086, 0x0002, 0x1904, 0xe097, 0x080c,
+	0xca36, 0x0138, 0x080c, 0xca47, 0x1904, 0xe097, 0x080c, 0xb5a6,
+	0x0038, 0x080c, 0x321e, 0x080c, 0xca47, 0x1110, 0x080c, 0xb5a6,
+	0x080c, 0xac1a, 0x0804, 0xe097, 0xa864, 0x9084, 0x00ff, 0x9086,
 	0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016, 0x2c08, 0x2170, 0x9006,
-	0x080c, 0xe293, 0x001e, 0x0120, 0x6020, 0x9084, 0x000f, 0x001b,
-	0x00ee, 0x00ce, 0x0005, 0xe121, 0xe121, 0xe121, 0xe121, 0xe121,
-	0xe121, 0xe123, 0xe121, 0xe121, 0xe121, 0xe121, 0xac28, 0xac28,
-	0xe121, 0x9006, 0x0005, 0x0036, 0x0046, 0x0016, 0x7010, 0x00b6,
-	0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009, 0x0020, 0x080c, 0xe2c9,
-	0x001e, 0x004e, 0x2019, 0x0002, 0x080c, 0xde1b, 0x003e, 0x9085,
-	0x0001, 0x0005, 0x0096, 0x080c, 0xc838, 0x0140, 0x6014, 0x904d,
-	0x080c, 0xc443, 0x687b, 0x0005, 0x080c, 0x6d80, 0x009e, 0x080c,
-	0xac28, 0x9085, 0x0001, 0x0005, 0x2001, 0x0001, 0x080c, 0x6561,
+	0x080c, 0xe2a3, 0x001e, 0x0120, 0x6020, 0x9084, 0x000f, 0x001b,
+	0x00ee, 0x00ce, 0x0005, 0xe131, 0xe131, 0xe131, 0xe131, 0xe131,
+	0xe131, 0xe133, 0xe131, 0xe131, 0xe131, 0xe131, 0xac1a, 0xac1a,
+	0xe131, 0x9006, 0x0005, 0x0036, 0x0046, 0x0016, 0x7010, 0x00b6,
+	0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009, 0x0020, 0x080c, 0xe2d9,
+	0x001e, 0x004e, 0x2019, 0x0002, 0x080c, 0xde2a, 0x003e, 0x9085,
+	0x0001, 0x0005, 0x0096, 0x080c, 0xc832, 0x0140, 0x6014, 0x904d,
+	0x080c, 0xc430, 0x687b, 0x0005, 0x080c, 0x6d7b, 0x009e, 0x080c,
+	0xac1a, 0x9085, 0x0001, 0x0005, 0x2001, 0x0001, 0x080c, 0x655c,
 	0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805,
-	0x2011, 0x0276, 0x080c, 0xbbae, 0x003e, 0x002e, 0x001e, 0x015e,
+	0x2011, 0x0276, 0x080c, 0xbba1, 0x003e, 0x002e, 0x001e, 0x015e,
 	0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066,
 	0x00b6, 0x0126, 0x2091, 0x8000, 0x2740, 0x2061, 0x1ddc, 0x2079,
-	0x0001, 0x8fff, 0x0904, 0xe1bc, 0x2071, 0x1800, 0x7654, 0x7074,
-	0x8001, 0x9602, 0x1a04, 0xe1bc, 0x88ff, 0x0120, 0x2800, 0x9c06,
-	0x1590, 0x2078, 0x080c, 0xe2fa, 0x0570, 0x2400, 0x9c06, 0x0558,
+	0x0001, 0x8fff, 0x0904, 0xe1cc, 0x2071, 0x1800, 0x7654, 0x7074,
+	0x8001, 0x9602, 0x1a04, 0xe1cc, 0x88ff, 0x0120, 0x2800, 0x9c06,
+	0x1590, 0x2078, 0x080c, 0xe30a, 0x0570, 0x2400, 0x9c06, 0x0558,
 	0x6720, 0x9786, 0x0006, 0x1538, 0x9786, 0x0007, 0x0520, 0x88ff,
 	0x1140, 0x6010, 0x9b06, 0x11f8, 0x85ff, 0x0118, 0x605c, 0x9106,
-	0x11d0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xe524, 0x080c,
-	0xcf6a, 0x080c, 0x1a6a, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c,
-	0xc838, 0x0120, 0x0046, 0x080c, 0xe26c, 0x004e, 0x009e, 0x080c,
-	0xac28, 0x88ff, 0x1198, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004,
-	0x9c02, 0x1210, 0x0804, 0xe171, 0x9006, 0x012e, 0x00be, 0x006e,
+	0x11d0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xe534, 0x080c,
+	0xcf69, 0x080c, 0x1a77, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c,
+	0xc832, 0x0120, 0x0046, 0x080c, 0xe27c, 0x004e, 0x009e, 0x080c,
+	0xac1a, 0x88ff, 0x1198, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004,
+	0x9c02, 0x1210, 0x0804, 0xe181, 0x9006, 0x012e, 0x00be, 0x006e,
 	0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x98c5, 0x0001,
-	0x0ca0, 0x080c, 0xa896, 0x00b6, 0x0076, 0x0056, 0x0086, 0x9046,
+	0x0ca0, 0x080c, 0xa888, 0x00b6, 0x0076, 0x0056, 0x0086, 0x9046,
 	0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, 0x6210, 0x2258, 0x0096,
-	0x904e, 0x080c, 0xa218, 0x009e, 0x008e, 0x903e, 0x080c, 0xa2c3,
-	0x080c, 0xe162, 0x005e, 0x007e, 0x00be, 0x080c, 0xa8b2, 0x0005,
-	0x080c, 0xa896, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156,
+	0x904e, 0x080c, 0xa1fa, 0x009e, 0x008e, 0x903e, 0x080c, 0xa2a5,
+	0x080c, 0xe172, 0x005e, 0x007e, 0x00be, 0x080c, 0xa8a4, 0x0005,
+	0x080c, 0xa888, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156,
 	0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e, 0x0016, 0x0036, 0x080c,
-	0x6625, 0x1190, 0x0056, 0x0086, 0x9046, 0x2508, 0x2029, 0x0001,
-	0x0096, 0x904e, 0x080c, 0xa218, 0x009e, 0x008e, 0x903e, 0x080c,
-	0xa2c3, 0x080c, 0xe162, 0x005e, 0x003e, 0x001e, 0x8108, 0x1f04,
-	0xe1f5, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x080c,
-	0xa8b2, 0x0005, 0x080c, 0xa896, 0x00b6, 0x0076, 0x0056, 0x6210,
+	0x6620, 0x1190, 0x0056, 0x0086, 0x9046, 0x2508, 0x2029, 0x0001,
+	0x0096, 0x904e, 0x080c, 0xa1fa, 0x009e, 0x008e, 0x903e, 0x080c,
+	0xa2a5, 0x080c, 0xe172, 0x005e, 0x003e, 0x001e, 0x8108, 0x1f04,
+	0xe205, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x080c,
+	0xa8a4, 0x0005, 0x080c, 0xa888, 0x00b6, 0x0076, 0x0056, 0x6210,
 	0x2258, 0x0086, 0x9046, 0x2029, 0x0001, 0x2019, 0x0048, 0x0096,
-	0x904e, 0x080c, 0xa218, 0x009e, 0x008e, 0x903e, 0x080c, 0xa2c3,
-	0x2c20, 0x080c, 0xe162, 0x005e, 0x007e, 0x00be, 0x080c, 0xa8b2,
-	0x0005, 0x080c, 0xa896, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6,
+	0x904e, 0x080c, 0xa1fa, 0x009e, 0x008e, 0x903e, 0x080c, 0xa2a5,
+	0x2c20, 0x080c, 0xe172, 0x005e, 0x007e, 0x00be, 0x080c, 0xa8a4,
+	0x0005, 0x080c, 0xa888, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6,
 	0x0156, 0x2c20, 0x20a9, 0x0800, 0x900e, 0x0016, 0x0036, 0x080c,
-	0x6625, 0x11a0, 0x0086, 0x9046, 0x2828, 0x0046, 0x2021, 0x0001,
-	0x080c, 0xe508, 0x004e, 0x0096, 0x904e, 0x080c, 0xa218, 0x009e,
-	0x008e, 0x903e, 0x080c, 0xa2c3, 0x080c, 0xe162, 0x003e, 0x001e,
-	0x8108, 0x1f04, 0xe245, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e,
-	0x00be, 0x080c, 0xa8b2, 0x0005, 0x0016, 0x00f6, 0x080c, 0xc836,
+	0x6620, 0x11a0, 0x0086, 0x9046, 0x2828, 0x0046, 0x2021, 0x0001,
+	0x080c, 0xe518, 0x004e, 0x0096, 0x904e, 0x080c, 0xa1fa, 0x009e,
+	0x008e, 0x903e, 0x080c, 0xa2a5, 0x080c, 0xe172, 0x003e, 0x001e,
+	0x8108, 0x1f04, 0xe255, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e,
+	0x00be, 0x080c, 0xa8a4, 0x0005, 0x0016, 0x00f6, 0x080c, 0xc830,
 	0x0198, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0046, 0x0180, 0xa800,
-	0x907d, 0x0138, 0xa803, 0x0000, 0xab82, 0x080c, 0x6d80, 0x2f48,
-	0x0cb0, 0xab82, 0x080c, 0x6d80, 0x00fe, 0x001e, 0x0005, 0xa800,
-	0x907d, 0x0130, 0xa803, 0x0000, 0x080c, 0x6d80, 0x2f48, 0x0cb8,
-	0x080c, 0x6d80, 0x0c88, 0x00e6, 0x0046, 0x0036, 0x2061, 0x1ddc,
+	0x907d, 0x0138, 0xa803, 0x0000, 0xab82, 0x080c, 0x6d7b, 0x2f48,
+	0x0cb0, 0xab82, 0x080c, 0x6d7b, 0x00fe, 0x001e, 0x0005, 0xa800,
+	0x907d, 0x0130, 0xa803, 0x0000, 0x080c, 0x6d7b, 0x2f48, 0x0cb8,
+	0x080c, 0x6d7b, 0x0c88, 0x00e6, 0x0046, 0x0036, 0x2061, 0x1ddc,
 	0x9005, 0x1138, 0x2071, 0x1800, 0x7454, 0x7074, 0x8001, 0x9402,
 	0x12f8, 0x2100, 0x9c06, 0x0188, 0x6000, 0x9086, 0x0000, 0x0168,
 	0x6008, 0x9206, 0x1150, 0x6320, 0x9386, 0x0009, 0x01b0, 0x6010,
@@ -7052,90 +7054,90 @@
 	0x181a, 0x2004, 0x9c02, 0x1220, 0x0c20, 0x9085, 0x0001, 0x0008,
 	0x9006, 0x003e, 0x004e, 0x00ee, 0x0005, 0x631c, 0xd3c4, 0x1d68,
 	0x0c30, 0x0096, 0x0006, 0x080c, 0x103a, 0x000e, 0x090c, 0x0d7d,
-	0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026, 0x2010, 0x080c, 0xc826,
+	0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026, 0x2010, 0x080c, 0xc820,
 	0x2001, 0x0000, 0x0120, 0x2200, 0x9080, 0x0017, 0x2004, 0x002e,
 	0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3, 0xffff, 0xa986, 0xac76,
-	0xa87f, 0x0000, 0x2001, 0x198e, 0x2004, 0xa882, 0x9006, 0xa802,
-	0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d80, 0x012e,
+	0xa87f, 0x0000, 0x2001, 0x198d, 0x2004, 0xa882, 0x9006, 0xa802,
+	0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d7b, 0x012e,
 	0x009e, 0x0005, 0x6700, 0x9786, 0x0000, 0x0158, 0x9786, 0x0001,
 	0x0140, 0x9786, 0x000a, 0x0128, 0x9786, 0x0009, 0x0110, 0x9085,
 	0x0001, 0x0005, 0x00e6, 0x6010, 0x9075, 0x0138, 0x00b6, 0x2058,
 	0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cd8,
 	0x0016, 0x6004, 0x908e, 0x001e, 0x11a0, 0x8007, 0x6134, 0x918c,
 	0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0005, 0x2001, 0x1987, 0x2004, 0x601a, 0x2009, 0x8020, 0x080c,
-	0x921e, 0x001e, 0x0005, 0xa001, 0xa001, 0x0005, 0x6024, 0xd0e4,
-	0x0158, 0xd0cc, 0x0118, 0x080c, 0xcb7d, 0x0030, 0x080c, 0xe524,
-	0x080c, 0x88c1, 0x080c, 0xabed, 0x0005, 0x9280, 0x0008, 0x2004,
-	0x9084, 0x000f, 0x0002, 0xe359, 0xe359, 0xe359, 0xe35b, 0xe359,
-	0xe35b, 0xe35b, 0xe359, 0xe35b, 0xe359, 0xe359, 0xe359, 0xe359,
-	0xe359, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x9280, 0x0008,
-	0x2004, 0x9084, 0x000f, 0x0002, 0xe372, 0xe372, 0xe372, 0xe372,
-	0xe372, 0xe372, 0xe37f, 0xe372, 0xe372, 0xe372, 0xe372, 0xe372,
-	0xe372, 0xe372, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00,
-	0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x921e, 0x0005, 0x0096,
-	0x00c6, 0x2260, 0x080c, 0xe524, 0x604b, 0x0000, 0x6024, 0xc0f4,
+	0x0005, 0x2001, 0x1986, 0x2004, 0x601a, 0x2009, 0x8020, 0x080c,
+	0x9200, 0x001e, 0x0005, 0xa001, 0xa001, 0x0005, 0x6024, 0xd0e4,
+	0x0158, 0xd0cc, 0x0118, 0x080c, 0xcb7c, 0x0030, 0x080c, 0xe534,
+	0x080c, 0x88a3, 0x080c, 0xabdf, 0x0005, 0x9280, 0x0008, 0x2004,
+	0x9084, 0x000f, 0x0002, 0xe369, 0xe369, 0xe369, 0xe36b, 0xe369,
+	0xe36b, 0xe36b, 0xe369, 0xe36b, 0xe369, 0xe369, 0xe369, 0xe369,
+	0xe369, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x9280, 0x0008,
+	0x2004, 0x9084, 0x000f, 0x0002, 0xe382, 0xe382, 0xe382, 0xe382,
+	0xe382, 0xe382, 0xe38f, 0xe382, 0xe382, 0xe382, 0xe382, 0xe382,
+	0xe382, 0xe382, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00,
+	0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9200, 0x0005, 0x0096,
+	0x00c6, 0x2260, 0x080c, 0xe534, 0x604b, 0x0000, 0x6024, 0xc0f4,
 	0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce, 0x00d6, 0x2268, 0x9186,
-	0x0007, 0x1904, 0xe3d8, 0x6814, 0x9005, 0x0138, 0x2048, 0xa87c,
+	0x0007, 0x1904, 0xe3e8, 0x6814, 0x9005, 0x0138, 0x2048, 0xa87c,
 	0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8, 0x6007, 0x003a, 0x6003,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x921e, 0x00c6, 0x2d60, 0x6100,
-	0x9186, 0x0002, 0x1904, 0xe44f, 0x6014, 0x9005, 0x1138, 0x6000,
-	0x9086, 0x0007, 0x190c, 0x0d7d, 0x0804, 0xe44f, 0x2048, 0x080c,
-	0xc838, 0x1130, 0x0028, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900,
+	0x0001, 0x2009, 0x8020, 0x080c, 0x9200, 0x00c6, 0x2d60, 0x6100,
+	0x9186, 0x0002, 0x1904, 0xe45f, 0x6014, 0x9005, 0x1138, 0x6000,
+	0x9086, 0x0007, 0x190c, 0x0d7d, 0x0804, 0xe45f, 0x2048, 0x080c,
+	0xc832, 0x1130, 0x0028, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900,
 	0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x1168, 0xa87c,
 	0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc, 0xa882, 0x2009, 0x0043,
-	0x080c, 0xdc5d, 0x0804, 0xe44f, 0x2009, 0x0041, 0x0804, 0xe449,
+	0x080c, 0xdc6c, 0x0804, 0xe45f, 0x2009, 0x0041, 0x0804, 0xe459,
 	0x9186, 0x0005, 0x15a0, 0x6814, 0x2048, 0xa87c, 0xd0bc, 0x1120,
-	0x00de, 0x009e, 0x0804, 0xe372, 0xd0b4, 0x0128, 0xd0fc, 0x090c,
-	0x0d7d, 0x0804, 0xe393, 0x6007, 0x003a, 0x6003, 0x0001, 0x2009,
-	0x8020, 0x080c, 0x921e, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002,
-	0x0120, 0x9186, 0x0004, 0x1904, 0xe44f, 0x6814, 0x2048, 0xa97c,
+	0x00de, 0x009e, 0x0804, 0xe382, 0xd0b4, 0x0128, 0xd0fc, 0x090c,
+	0x0d7d, 0x0804, 0xe3a3, 0x6007, 0x003a, 0x6003, 0x0001, 0x2009,
+	0x8020, 0x080c, 0x9200, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002,
+	0x0120, 0x9186, 0x0004, 0x1904, 0xe45f, 0x6814, 0x2048, 0xa97c,
 	0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc, 0xc1bc, 0xa982, 0x00f6,
-	0x2c78, 0x080c, 0x1731, 0x00fe, 0x2009, 0x0042, 0x04d0, 0x0036,
+	0x2c78, 0x080c, 0x173e, 0x00fe, 0x2009, 0x0042, 0x04d0, 0x0036,
 	0x080c, 0x103a, 0x090c, 0x0d7d, 0xa867, 0x010d, 0x9006, 0xa802,
 	0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887, 0x0045, 0x2c00, 0xa892,
 	0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd, 0x6026, 0x6010, 0x00b6,
 	0x2058, 0xb8a0, 0x00be, 0x2004, 0x635c, 0xab7a, 0xa876, 0x9006,
-	0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f, 0x0001, 0x080c, 0x6d80,
-	0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xde1b, 0x2d00, 0x600a,
+	0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f, 0x0001, 0x080c, 0x6d7b,
+	0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xde2a, 0x2d00, 0x600a,
 	0x6023, 0x0006, 0x6003, 0x0007, 0x901e, 0x631a, 0x634a, 0x003e,
-	0x0038, 0x604b, 0x0000, 0x6003, 0x0007, 0x080c, 0xdc5d, 0x00ce,
+	0x0038, 0x604b, 0x0000, 0x6003, 0x0007, 0x080c, 0xdc6c, 0x00ce,
 	0x00de, 0x009e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082,
-	0x0085, 0x2008, 0x00c2, 0x9186, 0x0027, 0x1178, 0x080c, 0x95de,
-	0x0036, 0x0096, 0x6014, 0x2048, 0x2019, 0x0004, 0x080c, 0xe26c,
-	0x009e, 0x003e, 0x080c, 0x96a0, 0x0005, 0x9186, 0x0014, 0x0d70,
-	0x080c, 0xaca9, 0x0005, 0xe482, 0xe480, 0xe480, 0xe480, 0xe480,
-	0xe480, 0xe482, 0xe480, 0xe480, 0xe480, 0xe480, 0xe480, 0xe480,
-	0x080c, 0x0d7d, 0x6003, 0x000c, 0x080c, 0x96a0, 0x0005, 0x9182,
-	0x0092, 0x1220, 0x9182, 0x0085, 0x0208, 0x001a, 0x080c, 0xaca9,
-	0x0005, 0xe49e, 0xe49e, 0xe49e, 0xe49e, 0xe4a0, 0xe4c0, 0xe49e,
-	0xe49e, 0xe49e, 0xe49e, 0xe49e, 0xe49e, 0xe49e, 0x080c, 0x0d7d,
-	0x00d6, 0x2c68, 0x080c, 0xab97, 0x01b0, 0x6003, 0x0001, 0x6007,
+	0x0085, 0x2008, 0x00c2, 0x9186, 0x0027, 0x1178, 0x080c, 0x95c6,
+	0x0036, 0x0096, 0x6014, 0x2048, 0x2019, 0x0004, 0x080c, 0xe27c,
+	0x009e, 0x003e, 0x080c, 0x9684, 0x0005, 0x9186, 0x0014, 0x0d70,
+	0x080c, 0xac99, 0x0005, 0xe492, 0xe490, 0xe490, 0xe490, 0xe490,
+	0xe490, 0xe492, 0xe490, 0xe490, 0xe490, 0xe490, 0xe490, 0xe490,
+	0x080c, 0x0d7d, 0x6003, 0x000c, 0x080c, 0x9684, 0x0005, 0x9182,
+	0x0092, 0x1220, 0x9182, 0x0085, 0x0208, 0x001a, 0x080c, 0xac99,
+	0x0005, 0xe4ae, 0xe4ae, 0xe4ae, 0xe4ae, 0xe4b0, 0xe4d0, 0xe4ae,
+	0xe4ae, 0xe4ae, 0xe4ae, 0xe4ae, 0xe4ae, 0xe4ae, 0x080c, 0x0d7d,
+	0x00d6, 0x2c68, 0x080c, 0xab89, 0x01b0, 0x6003, 0x0001, 0x6007,
 	0x001e, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c,
 	0x613e, 0x600b, 0xffff, 0x6910, 0x6112, 0x6023, 0x0004, 0x2009,
-	0x8020, 0x080c, 0x921e, 0x2d60, 0x080c, 0xabed, 0x00de, 0x0005,
-	0x080c, 0xabed, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x8020, 0x080c, 0x9200, 0x2d60, 0x080c, 0xabdf, 0x00de, 0x0005,
+	0x080c, 0xabdf, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800,
 	0x00be, 0xd0ec, 0x00ee, 0x0005, 0x2009, 0x1867, 0x210c, 0xd1ec,
 	0x05b0, 0x6003, 0x0002, 0x6024, 0xc0e5, 0x6026, 0xd0cc, 0x0150,
-	0x2001, 0x1988, 0x2004, 0x604a, 0x2009, 0x1867, 0x210c, 0xd1f4,
+	0x2001, 0x1987, 0x2004, 0x604a, 0x2009, 0x1867, 0x210c, 0xd1f4,
 	0x1520, 0x00a0, 0x2009, 0x1867, 0x210c, 0xd1f4, 0x0128, 0x6024,
-	0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001, 0x1988, 0x200c, 0x2001,
-	0x1986, 0x2004, 0x9100, 0x9080, 0x000a, 0x604a, 0x6010, 0x00b6,
+	0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001, 0x1987, 0x200c, 0x2001,
+	0x1985, 0x2004, 0x9100, 0x9080, 0x000a, 0x604a, 0x6010, 0x00b6,
 	0x2058, 0xb8bc, 0x00be, 0x0008, 0x2104, 0x9005, 0x0118, 0x9088,
 	0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000, 0x9085, 0x0001, 0x0005,
 	0x0016, 0x00c6, 0x00e6, 0x615c, 0xb8bc, 0x2060, 0x8cff, 0x0180,
 	0x84ff, 0x1118, 0x605c, 0x9106, 0x1138, 0x600c, 0x2072, 0x080c,
-	0x88c1, 0x080c, 0xabed, 0x0010, 0x9cf0, 0x0003, 0x2e64, 0x0c70,
+	0x88a3, 0x080c, 0xabdf, 0x0010, 0x9cf0, 0x0003, 0x2e64, 0x0c70,
 	0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6, 0x00b6, 0x6010, 0x2058,
 	0xb8bc, 0x2068, 0x9005, 0x0130, 0x9c06, 0x0110, 0x680c, 0x0cd0,
 	0x600c, 0x680e, 0x00be, 0x00de, 0x0005, 0x0026, 0x0036, 0x0156,
 	0x2011, 0x182c, 0x2204, 0x9084, 0x00ff, 0x2019, 0x026e, 0x2334,
 	0x9636, 0x1508, 0x8318, 0x2334, 0x2204, 0x9084, 0xff00, 0x9636,
 	0x11d0, 0x2011, 0x0270, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048,
-	0x2019, 0x000a, 0x080c, 0xbbc2, 0x009e, 0x1168, 0x2011, 0x0274,
+	0x2019, 0x000a, 0x080c, 0xbbb5, 0x009e, 0x1168, 0x2011, 0x0274,
 	0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x0006, 0x080c,
-	0xbbc2, 0x009e, 0x1100, 0x015e, 0x003e, 0x002e, 0x0005, 0x00e6,
-	0x2071, 0x1800, 0x080c, 0x5fbc, 0x080c, 0x2fb2, 0x00ee, 0x0005,
+	0xbbb5, 0x009e, 0x1100, 0x015e, 0x003e, 0x002e, 0x0005, 0x00e6,
+	0x2071, 0x1800, 0x080c, 0x5fb7, 0x080c, 0x2fc0, 0x00ee, 0x0005,
 	0x0096, 0x0026, 0x080c, 0x103a, 0x090c, 0x0d7d, 0xa85c, 0x9080,
 	0x001a, 0x20a0, 0x20a9, 0x000c, 0xa860, 0x20e8, 0x9006, 0x4004,
 	0x9186, 0x0046, 0x1118, 0xa867, 0x0136, 0x0038, 0xa867, 0x0138,
@@ -7157,25 +7159,25 @@
 	0x2011, 0x026a, 0x0146, 0x01d6, 0x0036, 0x20a9, 0x0001, 0x2019,
 	0x0008, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0x2204,
 	0x8007, 0x4004, 0x8210, 0x8319, 0x1dd0, 0x003e, 0x01ce, 0x013e,
-	0x2011, 0x0205, 0x2013, 0x0000, 0x002e, 0x080c, 0x6d80, 0x009e,
+	0x2011, 0x0205, 0x2013, 0x0000, 0x002e, 0x080c, 0x6d7b, 0x009e,
 	0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0fc,
 	0x0108, 0x0011, 0x00ee, 0x0005, 0xa880, 0xc0e5, 0xa882, 0x0005,
 	0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026,
-	0x0016, 0x0126, 0x2091, 0x8000, 0x2029, 0x19f3, 0x252c, 0x2021,
-	0x19fa, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7654, 0x7074,
+	0x0016, 0x0126, 0x2091, 0x8000, 0x2029, 0x19f2, 0x252c, 0x2021,
+	0x19f9, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7654, 0x7074,
 	0x9606, 0x0578, 0x6720, 0x9786, 0x0001, 0x0118, 0x9786, 0x0008,
 	0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400, 0x9c06, 0x01d0, 0x080c,
-	0xe2fa, 0x01b8, 0x080c, 0xe30a, 0x11a0, 0x6000, 0x9086, 0x0004,
-	0x1120, 0x0016, 0x080c, 0x1a6a, 0x001e, 0x080c, 0xca3c, 0x1110,
-	0x080c, 0x321c, 0x080c, 0xca4d, 0x1110, 0x080c, 0xb5b5, 0x080c,
-	0xac28, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1208,
+	0xe30a, 0x01b8, 0x080c, 0xe31a, 0x11a0, 0x6000, 0x9086, 0x0004,
+	0x1120, 0x0016, 0x080c, 0x1a77, 0x001e, 0x080c, 0xca36, 0x1110,
+	0x080c, 0x321e, 0x080c, 0xca47, 0x1110, 0x080c, 0xb5a6, 0x080c,
+	0xac1a, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1208,
 	0x0858, 0x012e, 0x001e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e,
 	0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0dc,
 	0x0005, 0x0006, 0x2001, 0x1837, 0x2004, 0xd09c, 0x000e, 0x0005,
-	0x0006, 0x0036, 0x0046, 0x080c, 0xcf52, 0x0168, 0x2019, 0xffff,
+	0x0006, 0x0036, 0x0046, 0x080c, 0xcf51, 0x0168, 0x2019, 0xffff,
 	0x9005, 0x0128, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021,
-	0x0004, 0x080c, 0x4cbe, 0x004e, 0x003e, 0x000e, 0x6004, 0x9086,
-	0x0001, 0x1128, 0x080c, 0xa38a, 0x080c, 0xac28, 0x9006, 0x0005,
+	0x0004, 0x080c, 0x4cc0, 0x004e, 0x003e, 0x000e, 0x6004, 0x9086,
+	0x0001, 0x1128, 0x080c, 0xa372, 0x080c, 0xac1a, 0x9006, 0x0005,
 	0x00e6, 0x00c6, 0x00b6, 0x0046, 0x2061, 0x1ddc, 0x2071, 0x1800,
 	0x7454, 0x7074, 0x8001, 0x9402, 0x12b8, 0x2100, 0x9c06, 0x0148,
 	0x6000, 0x9086, 0x0000, 0x0128, 0x6010, 0x2058, 0xb8a0, 0x9206,
@@ -7194,12 +7196,12 @@
 	0x2071, 0x1840, 0x7014, 0x8000, 0x7016, 0x00ee, 0x000e, 0x012e,
 	0x0005, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040,
 	0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000,
-	0x8000, 0x7155
+	0x8000, 0x9d27
 };
 #ifdef UNIQUE_FW_NAME
-unsigned short fw2322ipx_length01 = 0xdf42;
+unsigned short fw2322ipx_length01 = 0xdf52;
 #else
-unsigned short risc_code_length01 = 0xdf42;
+unsigned short risc_code_length01 = 0xdf52;
 #endif
 
 /*
@@ -7208,30 +7210,30 @@
 
 unsigned long rseqipx_code_addr01 = 0x0001c000 ;
 unsigned short rseqipx_code01[] = { 
-0x000b, 0x0003, 0x0000, 0x09d8, 0x0001, 0xc000, 0x0008, 0x8064,
+0x000b, 0x0003, 0x0000, 0x09e6, 0x0001, 0xc000, 0x0008, 0x8064,
 	0x0000, 0x0010, 0x0000, 0x8066, 0x0008, 0x0101, 0x0003, 0xc007,
 	0x0008, 0x80e0, 0x0008, 0xff00, 0x0000, 0x80e2, 0x0008, 0xff00,
 	0x0008, 0x0162, 0x0000, 0x8066, 0x0008, 0xa101, 0x000b, 0xc00f,
 	0x0008, 0x0d02, 0x0000, 0x8060, 0x0000, 0x0400, 0x0003, 0x60c2,
-	0x0003, 0x5817, 0x000b, 0x7ae0, 0x000b, 0x521c, 0x000b, 0xc813,
+	0x0003, 0x5817, 0x000b, 0x7ae3, 0x000b, 0x521c, 0x000b, 0xc813,
 	0x0009, 0xbac0, 0x0000, 0x008a, 0x0003, 0x8813, 0x0000, 0x15fc,
 	0x000b, 0xb013, 0x0009, 0xc4c0, 0x0000, 0x7000, 0x0001, 0xffa0,
-	0x0000, 0x2000, 0x0003, 0x9394, 0x0008, 0x808c, 0x0000, 0x0001,
+	0x0000, 0x2000, 0x0003, 0x939b, 0x0008, 0x808c, 0x0000, 0x0001,
 	0x0007, 0x0000, 0x0007, 0x0000, 0x0000, 0x40d4, 0x000a, 0x4047,
 	0x0008, 0x808c, 0x0000, 0x0002, 0x0007, 0x0000, 0x0003, 0x082e,
 	0x0000, 0x4022, 0x0003, 0x0034, 0x0008, 0x4122, 0x0009, 0xeac0,
-	0x0008, 0xff00, 0x0009, 0xffe0, 0x0008, 0x0500, 0x0003, 0x0bbb,
-	0x0002, 0x4447, 0x000b, 0x8bb8, 0x0008, 0x0bfe, 0x0001, 0x11a0,
-	0x0003, 0x139a, 0x0001, 0x0ca0, 0x0003, 0x139a, 0x0001, 0x9180,
+	0x0008, 0xff00, 0x0009, 0xffe0, 0x0008, 0x0500, 0x000b, 0x0bc2,
+	0x0002, 0x4447, 0x0003, 0x8bbf, 0x0008, 0x0bfe, 0x0001, 0x11a0,
+	0x000b, 0x13a1, 0x0001, 0x0ca0, 0x000b, 0x13a1, 0x0001, 0x9180,
 	0x0000, 0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x7f62,
 	0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc042, 0x0008, 0x808c,
 	0x0008, 0x0000, 0x0008, 0x0060, 0x0008, 0x8062, 0x0000, 0x0004,
 	0x0000, 0x8066, 0x0000, 0x0411, 0x0003, 0xc04a, 0x0000, 0x03fe,
-	0x0001, 0x43e0, 0x0003, 0x8b97, 0x0009, 0xc2c0, 0x0008, 0x00ff,
-	0x0001, 0x02e0, 0x0003, 0x8b97, 0x0001, 0x9180, 0x0008, 0x0005,
+	0x0001, 0x43e0, 0x0003, 0x8b9e, 0x0009, 0xc2c0, 0x0008, 0x00ff,
+	0x0001, 0x02e0, 0x0003, 0x8b9e, 0x0001, 0x9180, 0x0008, 0x0005,
 	0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066,
-	0x0000, 0x0019, 0x000b, 0xc059, 0x0002, 0x0240, 0x000b, 0x0b94,
-	0x0008, 0x00fc, 0x0003, 0x3397, 0x000a, 0x0244, 0x000b, 0x086b,
+	0x0000, 0x0019, 0x000b, 0xc059, 0x0002, 0x0240, 0x000b, 0x0b9b,
+	0x0008, 0x00fc, 0x0003, 0x339e, 0x000a, 0x0244, 0x000b, 0x086b,
 	0x000c, 0x01f5, 0x0001, 0x9180, 0x0000, 0x0007, 0x0008, 0x7f62,
 	0x0000, 0x8060, 0x0000, 0x0400, 0x0002, 0x0234, 0x0008, 0x7f04,
 	0x0000, 0x8066, 0x0000, 0x040a, 0x000b, 0xc06a, 0x000a, 0x0248,
@@ -7241,7 +7243,7 @@
 	0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x808c, 0x0000, 0x0002,
 	0x0008, 0x1760, 0x0008, 0x8062, 0x0008, 0x000f, 0x0000, 0x8066,
 	0x0008, 0x0011, 0x000b, 0xc081, 0x0008, 0x01fe, 0x0009, 0x42e0,
-	0x000b, 0x8b87, 0x0000, 0x00fe, 0x0001, 0x43e0, 0x000b, 0x8b87,
+	0x000b, 0x8b8e, 0x0000, 0x00fe, 0x0001, 0x43e0, 0x000b, 0x8b8e,
 	0x0000, 0x1734, 0x0000, 0x1530, 0x0008, 0x1632, 0x0008, 0x0d2a,
 	0x0001, 0x9880, 0x0008, 0x0012, 0x0000, 0x8060, 0x0000, 0x0400,
 	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x1e0a, 0x000b, 0xc093,
@@ -7270,17 +7272,17 @@
 	0x000a, 0x0040, 0x0003, 0x0904, 0x0002, 0x004e, 0x0003, 0x0904,
 	0x0002, 0x0030, 0x0002, 0x7f2f, 0x0000, 0x7f00, 0x0000, 0x8066,
 	0x0008, 0x000a, 0x000b, 0xc0f5, 0x0008, 0x1010, 0x0004, 0x01dc,
-	0x000b, 0xb0fd, 0x000c, 0x035b, 0x000c, 0x01c6, 0x000b, 0x7814,
+	0x000b, 0xb0fd, 0x000c, 0x0362, 0x000c, 0x01c6, 0x000b, 0x7814,
 	0x0003, 0x0013, 0x0000, 0x0806, 0x0008, 0x8010, 0x0000, 0x001f,
-	0x000c, 0x035b, 0x0000, 0x0310, 0x000c, 0x035b, 0x0003, 0x00fb,
+	0x000c, 0x0362, 0x0000, 0x0310, 0x000c, 0x0362, 0x0003, 0x00fb,
 	0x000a, 0x002f, 0x0000, 0x7f00, 0x0000, 0x8066, 0x0008, 0x000a,
 	0x000b, 0xc108, 0x000c, 0x019f, 0x000a, 0x0040, 0x000b, 0x091d,
 	0x000c, 0x020c, 0x0000, 0x8000, 0x0000, 0x0002, 0x0000, 0x8060,
 	0x0000, 0x0400, 0x0009, 0x9080, 0x0008, 0x0006, 0x0008, 0x7f62,
 	0x0000, 0x8066, 0x0008, 0x000a, 0x000b, 0xc116, 0x0000, 0x8072,
 	0x0000, 0x4000, 0x0003, 0x00fb, 0x0008, 0x8010, 0x0008, 0x001e,
-	0x000b, 0x011f, 0x0008, 0x8010, 0x0008, 0x001d, 0x000c, 0x035b,
-	0x0008, 0x1010, 0x000c, 0x035b, 0x000b, 0x0014, 0x0002, 0x4b4e,
+	0x000b, 0x011f, 0x0008, 0x8010, 0x0008, 0x001d, 0x000c, 0x0362,
+	0x0008, 0x1010, 0x000c, 0x0362, 0x000b, 0x0014, 0x0002, 0x4b4e,
 	0x0003, 0x0929, 0x0008, 0x808a, 0x0000, 0x0004, 0x000b, 0x6129,
 	0x000f, 0x8000, 0x0008, 0x808a, 0x0000, 0x0004, 0x000b, 0x0014,
 	0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, 0x0008, 0x0011,
@@ -7309,8 +7311,8 @@
 	0x0008, 0x5006, 0x0008, 0x100e, 0x0004, 0x01b3, 0x000b, 0x7814,
 	0x0003, 0x0013, 0x0008, 0x0208, 0x0008, 0x030a, 0x0003, 0x0174,
 	0x000c, 0x019f, 0x0008, 0x808a, 0x0000, 0x0004, 0x0008, 0x8010,
-	0x0008, 0x0021, 0x000c, 0x035b, 0x0008, 0x1010, 0x000c, 0x035b,
-	0x0000, 0x4810, 0x000c, 0x035b, 0x0008, 0x4910, 0x000c, 0x035b,
+	0x0008, 0x0021, 0x000c, 0x0362, 0x0008, 0x1010, 0x000c, 0x0362,
+	0x0000, 0x4810, 0x000c, 0x0362, 0x0008, 0x4910, 0x000c, 0x0362,
 	0x0008, 0x808a, 0x0000, 0x0004, 0x000b, 0x0014, 0x0000, 0x8060,
 	0x0000, 0x0400, 0x0009, 0x9080, 0x0000, 0x0002, 0x0008, 0x7f62,
 	0x0000, 0x8066, 0x0008, 0xb40a, 0x0003, 0xc1a6, 0x000f, 0x4000,
@@ -7343,195 +7345,197 @@
 	0x0007, 0x0000, 0x000a, 0x3945, 0x0003, 0x8a14, 0x000f, 0x4000,
 	0x0000, 0x8072, 0x0000, 0x4000, 0x0007, 0x0000, 0x0007, 0x0000,
 	0x0007, 0x0000, 0x000a, 0x3945, 0x0003, 0x0a0e, 0x000b, 0x0216,
-	0x000a, 0x3a40, 0x000b, 0x8817, 0x0008, 0x2b24, 0x0008, 0x2b24,
-	0x0003, 0x5a20, 0x0008, 0x8054, 0x0000, 0x0002, 0x0002, 0x1242,
-	0x0003, 0x0a64, 0x000a, 0x3a45, 0x000b, 0x0a55, 0x000a, 0x1e10,
-	0x0000, 0x7f3c, 0x0003, 0x0a52, 0x0002, 0x1d00, 0x0000, 0x7f3a,
-	0x0000, 0x0d60, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009,
-	0x0003, 0xc230, 0x0008, 0x00fc, 0x0003, 0xb24f, 0x0000, 0x1c60,
-	0x0008, 0x8062, 0x0000, 0x0001, 0x0000, 0x8066, 0x0008, 0x0009,
-	0x000b, 0xc238, 0x0008, 0x00fc, 0x0003, 0x3370, 0x0000, 0x0038,
-	0x0008, 0x0060, 0x0008, 0x8062, 0x0000, 0x0019, 0x0000, 0x8066,
-	0x0008, 0x0009, 0x0003, 0xc241, 0x0009, 0x80c0, 0x0008, 0x00ff,
-	0x0008, 0x7f3e, 0x0000, 0x0d60, 0x0008, 0x0efe, 0x0001, 0x1f80,
-	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc24b,
-	0x0008, 0x003a, 0x0000, 0x1dfe, 0x000b, 0x022c, 0x0008, 0x0036,
-	0x0004, 0x00a6, 0x000b, 0x0264, 0x0000, 0x8074, 0x0000, 0x2000,
-	0x000b, 0x0264, 0x0002, 0x3a44, 0x000b, 0x0b9d, 0x0000, 0x8074,
-	0x0000, 0x1000, 0x0000, 0x2d0e, 0x0000, 0x2d0e, 0x000b, 0xb36d,
-	0x0008, 0x26fe, 0x0008, 0x26fe, 0x0008, 0x2700, 0x0008, 0x2700,
-	0x0009, 0x00d0, 0x0003, 0x8a74, 0x0000, 0x8074, 0x0008, 0x4040,
-	0x0003, 0x5a64, 0x000b, 0x521c, 0x000a, 0x3a46, 0x0003, 0x8a74,
-	0x0002, 0x3a47, 0x000b, 0x0a6f, 0x0008, 0x8054, 0x0000, 0x0004,
-	0x0000, 0x8074, 0x0000, 0x8000, 0x0003, 0x02d4, 0x0009, 0x92c0,
-	0x0000, 0x0fc8, 0x000b, 0x0813, 0x000a, 0x1246, 0x0003, 0x8b67,
-	0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x0002, 0x0000, 0x8066,
-	0x0000, 0x367a, 0x000b, 0xc279, 0x0009, 0x92c0, 0x0008, 0x0780,
-	0x000b, 0x8b81, 0x0002, 0x124b, 0x000b, 0x0a82, 0x0002, 0x2e4d,
-	0x0002, 0x2e4d, 0x000b, 0x0b6d, 0x000a, 0x3a46, 0x000b, 0x8a92,
-	0x000b, 0x5a84, 0x0008, 0x8054, 0x0000, 0x0004, 0x000a, 0x1243,
-	0x000b, 0x0ad2, 0x0008, 0x8010, 0x0000, 0x000d, 0x000c, 0x035b,
-	0x000a, 0x1948, 0x0003, 0x0a8f, 0x0004, 0x0350, 0x0000, 0x1810,
-	0x000c, 0x035b, 0x0003, 0x02d2, 0x000a, 0x1948, 0x000b, 0x0a96,
-	0x000a, 0x1243, 0x000b, 0x0b70, 0x000a, 0x194d, 0x000b, 0x0a9a,
-	0x000a, 0x1243, 0x0003, 0x0b77, 0x000b, 0x5a9a, 0x0008, 0x8054,
-	0x0000, 0x0004, 0x000a, 0x192e, 0x0008, 0x7f32, 0x000a, 0x1947,
-	0x000b, 0x0acc, 0x0002, 0x194f, 0x000b, 0x0aaa, 0x0004, 0x0350,
-	0x0000, 0x1810, 0x0004, 0x01dc, 0x000b, 0xb2c5, 0x000c, 0x035b,
-	0x000c, 0x01c6, 0x0003, 0x02d2, 0x0000, 0x1a60, 0x0008, 0x8062,
-	0x0000, 0x001f, 0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc2af,
-	0x000a, 0x004c, 0x0003, 0x8acc, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0001, 0x9880, 0x0000, 0x0007, 0x0008, 0x7f62, 0x0000, 0x8066,
-	0x0000, 0x320a, 0x000b, 0xc2b9, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0001, 0x9880, 0x0008, 0x0012, 0x0008, 0x7f62, 0x0000, 0x8066,
-	0x0008, 0x1e0a, 0x000b, 0xc2c1, 0x0000, 0x1826, 0x0000, 0x1928,
-	0x0003, 0x02d2, 0x0000, 0x0806, 0x0008, 0x8010, 0x0000, 0x001f,
-	0x000c, 0x035b, 0x0000, 0x0310, 0x000c, 0x035b, 0x0003, 0x02d2,
-	0x0004, 0x0350, 0x0008, 0x8010, 0x0000, 0x0001, 0x000c, 0x035b,
-	0x0000, 0x1810, 0x000c, 0x035b, 0x0000, 0x8074, 0x0008, 0xf000,
-	0x0000, 0x0d30, 0x0002, 0x3a42, 0x000b, 0x8ada, 0x0000, 0x15fc,
-	0x000b, 0xb07a, 0x0003, 0x0013, 0x0000, 0x8074, 0x0000, 0x0501,
-	0x0008, 0x8010, 0x0008, 0x000c, 0x000c, 0x035b, 0x0003, 0x0013,
-	0x0009, 0xbbe0, 0x0008, 0x0030, 0x0003, 0x8af6, 0x0000, 0x18fe,
-	0x0009, 0x3ce0, 0x000b, 0x0af3, 0x0008, 0x15fe, 0x0009, 0x3ce0,
-	0x000b, 0x0af3, 0x0008, 0x13fe, 0x0009, 0x3ce0, 0x000b, 0x8aef,
-	0x000c, 0x0349, 0x0008, 0x0d26, 0x0003, 0x02f0, 0x0004, 0x034b,
-	0x0008, 0x8076, 0x0000, 0x0040, 0x0003, 0x0346, 0x0008, 0x8076,
-	0x0008, 0x0041, 0x0003, 0x0346, 0x0009, 0xbbe0, 0x0000, 0x0032,
-	0x000b, 0x8afb, 0x0008, 0x3c1e, 0x0003, 0x0346, 0x0009, 0xbbe0,
-	0x0000, 0x003b, 0x000b, 0x8b00, 0x0000, 0x3cdc, 0x0003, 0x0346,
-	0x0009, 0xbbe0, 0x0008, 0x0035, 0x000b, 0x8b06, 0x0000, 0x8072,
-	0x0000, 0x8000, 0x0003, 0x04aa, 0x0009, 0xbbe0, 0x0008, 0x0036,
-	0x000b, 0x0bcd, 0x0009, 0xbbe0, 0x0000, 0x0037, 0x000b, 0x8b27,
-	0x0000, 0x18fe, 0x0009, 0x3ce0, 0x0003, 0x8af3, 0x0008, 0x8076,
-	0x0000, 0x0040, 0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x000d,
-	0x0008, 0x2604, 0x0008, 0x2604, 0x0008, 0x2706, 0x0008, 0x2706,
-	0x0000, 0x2808, 0x0000, 0x2808, 0x0000, 0x290a, 0x0000, 0x290a,
-	0x0000, 0x8066, 0x0000, 0x0422, 0x000b, 0xc31e, 0x0004, 0x0350,
-	0x0008, 0x8054, 0x0000, 0x0004, 0x0000, 0x8074, 0x0008, 0xf000,
-	0x0000, 0x8072, 0x0000, 0x8000, 0x0003, 0x02d4, 0x0009, 0xbbe0,
-	0x0000, 0x0038, 0x000b, 0x8b39, 0x0000, 0x18fe, 0x0009, 0x3ce0,
-	0x0003, 0x0b36, 0x0008, 0x15fe, 0x0009, 0x3ce0, 0x000b, 0x8ae9,
-	0x0004, 0x034b, 0x0008, 0x8076, 0x0000, 0x0040, 0x0000, 0x8072,
-	0x0000, 0x8000, 0x0003, 0x0394, 0x0008, 0x8076, 0x0008, 0x0042,
-	0x0003, 0x0346, 0x0009, 0xbbe0, 0x0000, 0x0016, 0x0003, 0x8b46,
-	0x0000, 0x8074, 0x0008, 0x0808, 0x0002, 0x3a44, 0x0003, 0x8816,
-	0x0000, 0x8074, 0x0000, 0x0800, 0x0000, 0x8072, 0x0000, 0x8000,
-	0x000f, 0x8000, 0x0003, 0x0013, 0x0000, 0x8072, 0x0000, 0x8000,
-	0x0003, 0x0013, 0x0002, 0x1430, 0x0003, 0x034c, 0x000a, 0x3d30,
-	0x0000, 0x7f00, 0x0001, 0xbc80, 0x0000, 0x0007, 0x0003, 0x0354,
-	0x000a, 0x1930, 0x0000, 0x7f00, 0x0001, 0x9880, 0x0000, 0x0007,
-	0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066,
-	0x0008, 0x000a, 0x000b, 0xc359, 0x000f, 0x4000, 0x000b, 0x235b,
-	0x0008, 0x0870, 0x000f, 0x4000, 0x0009, 0xbac0, 0x0008, 0x0090,
-	0x000b, 0x0b64, 0x0000, 0x8074, 0x0000, 0x0706, 0x000b, 0x0366,
-	0x0000, 0x8074, 0x0000, 0x0703, 0x000f, 0x4000, 0x0008, 0x8010,
-	0x0000, 0x0023, 0x0003, 0x03a2, 0x0008, 0x8010, 0x0000, 0x0008,
-	0x0003, 0x03a2, 0x0008, 0x8010, 0x0008, 0x0022, 0x0003, 0x03a2,
-	0x0004, 0x0350, 0x0008, 0x8010, 0x0000, 0x0007, 0x000c, 0x035b,
-	0x0000, 0x1810, 0x000c, 0x035b, 0x000b, 0x03ac, 0x0004, 0x0350,
-	0x0008, 0x8010, 0x0008, 0x001b, 0x000c, 0x035b, 0x0000, 0x1810,
-	0x000c, 0x035b, 0x0000, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30,
-	0x0003, 0x0013, 0x0008, 0x8010, 0x0008, 0x0009, 0x0003, 0x03a2,
-	0x0008, 0x8010, 0x0008, 0x0005, 0x0003, 0x03a2, 0x000a, 0x1648,
-	0x000b, 0x8888, 0x0008, 0x808c, 0x0000, 0x0001, 0x0007, 0x0000,
-	0x0008, 0x8010, 0x0000, 0x0004, 0x000a, 0x4143, 0x0003, 0x0888,
-	0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x0d2a, 0x0003, 0x03a2,
-	0x0008, 0x8010, 0x0008, 0x0003, 0x0003, 0x03a4, 0x0008, 0x8010,
-	0x0000, 0x000b, 0x0003, 0x03a4, 0x0008, 0x8010, 0x0000, 0x0002,
-	0x0003, 0x03a4, 0x0002, 0x3a47, 0x000b, 0x8a64, 0x0008, 0x8010,
-	0x0008, 0x0006, 0x0003, 0x03a4, 0x0000, 0x8074, 0x0008, 0xf000,
-	0x000c, 0x035b, 0x000c, 0x035e, 0x000a, 0x3a40, 0x000b, 0x0813,
-	0x0008, 0x8010, 0x0008, 0x000c, 0x000c, 0x035b, 0x0003, 0x0013,
-	0x0000, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30, 0x0002, 0x2e4d,
-	0x0002, 0x2e4d, 0x000b, 0x0bb5, 0x0008, 0x8054, 0x0000, 0x0019,
-	0x0003, 0x0013, 0x0008, 0x8054, 0x0008, 0x0009, 0x0003, 0x0013,
-	0x0002, 0x3a44, 0x0003, 0x8813, 0x0003, 0x0397, 0x0008, 0x808c,
-	0x0008, 0x0000, 0x0002, 0x4447, 0x0003, 0x0be1, 0x0001, 0xc0c0,
-	0x0008, 0x00ff, 0x0009, 0xffe0, 0x0008, 0x00ff, 0x000b, 0x8bb8,
-	0x0001, 0xc1e0, 0x0008, 0xffff, 0x000b, 0x8bb8, 0x0008, 0x8010,
-	0x0000, 0x0013, 0x000c, 0x035b, 0x0000, 0x8074, 0x0008, 0x0202,
-	0x0003, 0x0013, 0x000a, 0x3a40, 0x000b, 0x8bde, 0x0000, 0x8074,
-	0x0000, 0x0200, 0x0000, 0x3d00, 0x0000, 0x3cfe, 0x0000, 0x8072,
-	0x0000, 0x8000, 0x0001, 0x43e0, 0x0003, 0x8bdc, 0x0000, 0x42fe,
-	0x0001, 0xffc0, 0x0008, 0x00ff, 0x0009, 0x00e0, 0x0003, 0x0bb8,
-	0x0008, 0x0d08, 0x000b, 0x0431, 0x0000, 0x8072, 0x0000, 0x8000,
-	0x0003, 0x0013, 0x0004, 0x04b3, 0x0008, 0x808c, 0x0000, 0x0001,
-	0x0000, 0x04fc, 0x0003, 0x3496, 0x0000, 0x0460, 0x0008, 0x8062,
-	0x0000, 0x0001, 0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc3eb,
-	0x0000, 0x0004, 0x0009, 0x80c0, 0x0008, 0x00ff, 0x0000, 0x7f00,
-	0x0001, 0x80e0, 0x0000, 0x0004, 0x000b, 0x0c05, 0x0001, 0x80e0,
-	0x0008, 0x0005, 0x000b, 0x0c05, 0x0001, 0x80e0, 0x0008, 0x0006,
-	0x000b, 0x0c05, 0x0001, 0x82c0, 0x0008, 0xff00, 0x0008, 0x7f04,
-	0x0009, 0x82e0, 0x0008, 0x0600, 0x000b, 0x0c05, 0x0009, 0x82e0,
-	0x0008, 0x0500, 0x000b, 0x0c05, 0x0009, 0x82e0, 0x0000, 0x0400,
-	0x0003, 0x8c96, 0x0009, 0xc4c0, 0x0000, 0x7000, 0x0009, 0xffe0,
-	0x0000, 0x1000, 0x0003, 0x0c31, 0x0004, 0x04a4, 0x0002, 0x3941,
-	0x0003, 0x0c10, 0x0000, 0x8072, 0x0000, 0x0400, 0x0003, 0x0013,
-	0x0000, 0x0460, 0x0008, 0x80fe, 0x0008, 0x002b, 0x0008, 0x7f62,
-	0x0000, 0x8066, 0x0008, 0x2209, 0x000b, 0xc416, 0x0008, 0x11fc,
-	0x000b, 0x342c, 0x0001, 0x9180, 0x0000, 0x0002, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0609,
-	0x000b, 0xc420, 0x0000, 0x42fe, 0x0001, 0xffc0, 0x0008, 0xff00,
-	0x0009, 0x03e0, 0x000b, 0x8c29, 0x0000, 0x8072, 0x0000, 0x0400,
-	0x0003, 0x0052, 0x0001, 0x9180, 0x0008, 0x0003, 0x000b, 0x0413,
-	0x0000, 0x8072, 0x0000, 0x0400, 0x0008, 0x8010, 0x0000, 0x0010,
-	0x000b, 0x0489, 0x0004, 0x04a4, 0x0002, 0x3941, 0x0003, 0x0c37,
-	0x0000, 0x8072, 0x0000, 0x0400, 0x0003, 0x0013, 0x0004, 0x046e,
-	0x0008, 0x11fc, 0x000b, 0xb43f, 0x0000, 0x8072, 0x0000, 0x0400,
-	0x0008, 0x8010, 0x0000, 0x000e, 0x000b, 0x0489, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0000, 0x04fc, 0x0003, 0xb454, 0x0008, 0x808c,
-	0x0008, 0x0000, 0x0001, 0x9180, 0x0008, 0x0005, 0x0008, 0x7f62,
-	0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc44a, 0x0008, 0x0060,
-	0x0008, 0x8062, 0x0008, 0x001b, 0x0008, 0x4304, 0x0008, 0x4206,
-	0x0000, 0x8066, 0x0000, 0x0412, 0x000b, 0xc452, 0x000b, 0x046b,
-	0x0008, 0x808c, 0x0000, 0x0001, 0x0000, 0x0460, 0x0008, 0x8062,
-	0x0008, 0x002b, 0x0000, 0x8066, 0x0008, 0x0609, 0x000b, 0xc45b,
-	0x0000, 0x8066, 0x0008, 0x220a, 0x000b, 0xc45e, 0x0000, 0x42fe,
-	0x0001, 0xffc0, 0x0008, 0xff00, 0x0008, 0x7f04, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0001, 0x9180, 0x0000, 0x0002, 0x0008, 0x7f62,
-	0x0000, 0x8066, 0x0008, 0x041a, 0x0003, 0xc46a, 0x0000, 0x8072,
-	0x0000, 0x0400, 0x0003, 0x0052, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0008, 0x6b62, 0x0000, 0x8066, 0x0000, 0x0411, 0x000b, 0xc473,
-	0x0008, 0x02fe, 0x0009, 0x03e0, 0x000b, 0x8c79, 0x0000, 0x0d22,
-	0x000f, 0x4000, 0x0009, 0x8280, 0x0000, 0x0002, 0x0001, 0x6b80,
-	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x2209, 0x000b, 0xc47f,
-	0x000a, 0x0200, 0x0001, 0xffc0, 0x0000, 0x0007, 0x0000, 0x7f06,
-	0x0008, 0x6b62, 0x0000, 0x8066, 0x0008, 0x060a, 0x0003, 0xc487,
-	0x000f, 0x4000, 0x0002, 0x3a44, 0x0003, 0x8813, 0x000a, 0x2f44,
-	0x000a, 0x2f44, 0x0003, 0x8b97, 0x0008, 0x808a, 0x0008, 0x0003,
-	0x0000, 0x8074, 0x0000, 0xf080, 0x0003, 0x5c92, 0x0008, 0x8054,
-	0x0000, 0x0019, 0x0003, 0x0013, 0x0002, 0x3a44, 0x0003, 0x8813,
-	0x0008, 0x808c, 0x0008, 0x0000, 0x0008, 0x8010, 0x0008, 0x0011,
-	0x000c, 0x035b, 0x0000, 0x42fe, 0x0001, 0xffc0, 0x0008, 0x00ff,
-	0x0008, 0x7f10, 0x000c, 0x035b, 0x0008, 0x4310, 0x0003, 0x03a4,
-	0x0002, 0x3941, 0x0003, 0x0ca7, 0x000f, 0x4000, 0x0000, 0x8072,
-	0x0008, 0x0404, 0x000f, 0x4000, 0x0008, 0x8010, 0x0008, 0x0012,
-	0x000c, 0x035b, 0x0004, 0x046e, 0x0000, 0x1110, 0x000c, 0x035b,
-	0x0008, 0x11fc, 0x0003, 0xb4ad, 0x0003, 0x0013, 0x0009, 0xc2c0,
-	0x0008, 0x00ff, 0x0000, 0x7f00, 0x0001, 0xc3c0, 0x0008, 0xff00,
-	0x0009, 0x00d0, 0x000b, 0x0cd8, 0x0000, 0x0d0a, 0x0001, 0x8580,
-	0x0000, 0x1000, 0x0008, 0x7f62, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0000, 0x8066, 0x0000, 0x0809, 0x000b, 0xc4c2, 0x0000, 0x04fc,
-	0x0003, 0x34d1, 0x0000, 0x0460, 0x0008, 0x8062, 0x0000, 0x0004,
-	0x0000, 0x8066, 0x0000, 0x0211, 0x0003, 0xc4ca, 0x0008, 0x01fe,
-	0x0009, 0x00e0, 0x0003, 0x8cd1, 0x0008, 0x02fe, 0x0001, 0x43e0,
-	0x000b, 0x0cd7, 0x0002, 0x0500, 0x0000, 0x7f0a, 0x0009, 0xffe0,
-	0x0000, 0x0800, 0x0003, 0x8cbb, 0x0008, 0x0d08, 0x000f, 0x4000,
-	0x0008, 0x43fe, 0x0001, 0x3e80, 0x0000, 0x0d60, 0x0008, 0x7f62,
-	0x0000, 0x8066, 0x0000, 0x0809, 0x0003, 0xc4de, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0001, 0x84c0, 0x0008, 0xff00, 0x0002, 0x7f70,
-	0x0009, 0xff80, 0x0000, 0x1000, 0x0008, 0x7f62, 0x0000, 0x8066,
-	0x0000, 0x0809, 0x000b, 0xc4e9, 0x000f, 0x4000, 0xe55a, 0x71f6
+	0x000a, 0x3a40, 0x000b, 0x8817, 0x0001, 0xabd0, 0x0008, 0x0000,
+	0x0000, 0x7f24, 0x000b, 0x5a21, 0x0008, 0x8054, 0x0000, 0x0002,
+	0x0002, 0x1242, 0x0003, 0x0a67, 0x000a, 0x3a45, 0x000b, 0x0a56,
+	0x000a, 0x1e10, 0x0000, 0x7f3c, 0x000b, 0x0a53, 0x0002, 0x1d00,
+	0x0000, 0x7f3a, 0x0000, 0x0d60, 0x0008, 0x7f62, 0x0000, 0x8066,
+	0x0008, 0x0009, 0x000b, 0xc231, 0x0008, 0x00fc, 0x000b, 0xb250,
+	0x0000, 0x1c60, 0x0008, 0x8062, 0x0000, 0x0001, 0x0000, 0x8066,
+	0x0008, 0x0009, 0x0003, 0xc239, 0x0008, 0x00fc, 0x000b, 0x3377,
+	0x0000, 0x0038, 0x0008, 0x0060, 0x0008, 0x8062, 0x0000, 0x0019,
+	0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc242, 0x0009, 0x80c0,
+	0x0008, 0x00ff, 0x0008, 0x7f3e, 0x0000, 0x0d60, 0x0008, 0x0efe,
+	0x0001, 0x1f80, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009,
+	0x000b, 0xc24c, 0x0008, 0x003a, 0x0000, 0x1dfe, 0x0003, 0x022d,
+	0x0008, 0x0036, 0x0004, 0x00a6, 0x000b, 0x0267, 0x0000, 0x8074,
+	0x0000, 0x2000, 0x000b, 0x0267, 0x0002, 0x3a44, 0x000b, 0x0ba4,
+	0x0000, 0x8074, 0x0000, 0x1000, 0x0001, 0xadd0, 0x0008, 0x0000,
+	0x0008, 0x7f0e, 0x0003, 0xb374, 0x0001, 0xa7d0, 0x0008, 0x0000,
+	0x0000, 0x7f00, 0x0009, 0xa6d0, 0x0008, 0x0000, 0x0009, 0x00d0,
+	0x0003, 0x8a77, 0x0000, 0x8074, 0x0008, 0x4040, 0x0003, 0x5a67,
+	0x000b, 0x521c, 0x000a, 0x3a46, 0x0003, 0x8a77, 0x0002, 0x3a47,
+	0x000b, 0x0a72, 0x0008, 0x8054, 0x0000, 0x0004, 0x0000, 0x8074,
+	0x0000, 0x8000, 0x0003, 0x02d7, 0x0009, 0x92c0, 0x0000, 0x0fc8,
+	0x000b, 0x0813, 0x000a, 0x1246, 0x0003, 0x8b6e, 0x0000, 0x1a60,
+	0x0008, 0x8062, 0x0000, 0x0002, 0x0000, 0x8066, 0x0000, 0x367a,
+	0x000b, 0xc27c, 0x0009, 0x92c0, 0x0008, 0x0780, 0x000b, 0x8b88,
+	0x0002, 0x124b, 0x0003, 0x0a85, 0x0002, 0x2e4d, 0x0002, 0x2e4d,
+	0x0003, 0x0b74, 0x000a, 0x3a46, 0x0003, 0x8a95, 0x000b, 0x5a87,
+	0x0008, 0x8054, 0x0000, 0x0004, 0x000a, 0x1243, 0x0003, 0x0ad5,
+	0x0008, 0x8010, 0x0000, 0x000d, 0x000c, 0x0362, 0x000a, 0x1948,
+	0x0003, 0x0a92, 0x000c, 0x0357, 0x0000, 0x1810, 0x000c, 0x0362,
+	0x000b, 0x02d5, 0x000a, 0x1948, 0x000b, 0x0a99, 0x000a, 0x1243,
+	0x0003, 0x0b77, 0x000a, 0x194d, 0x0003, 0x0a9d, 0x000a, 0x1243,
+	0x0003, 0x0b7e, 0x0003, 0x5a9d, 0x0008, 0x8054, 0x0000, 0x0004,
+	0x000a, 0x192e, 0x0008, 0x7f32, 0x000a, 0x1947, 0x000b, 0x0acf,
+	0x0002, 0x194f, 0x0003, 0x0aad, 0x000c, 0x0357, 0x0000, 0x1810,
+	0x0004, 0x01dc, 0x0003, 0xb2c8, 0x000c, 0x0362, 0x000c, 0x01c6,
+	0x000b, 0x02d5, 0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x001f,
+	0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc2b2, 0x000a, 0x004c,
+	0x0003, 0x8acf, 0x0000, 0x8060, 0x0000, 0x0400, 0x0001, 0x9880,
+	0x0000, 0x0007, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0000, 0x320a,
+	0x000b, 0xc2bc, 0x0000, 0x8060, 0x0000, 0x0400, 0x0001, 0x9880,
+	0x0008, 0x0012, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x1e0a,
+	0x000b, 0xc2c4, 0x0000, 0x1826, 0x0000, 0x1928, 0x000b, 0x02d5,
+	0x0000, 0x0806, 0x0008, 0x8010, 0x0000, 0x001f, 0x000c, 0x0362,
+	0x0000, 0x0310, 0x000c, 0x0362, 0x000b, 0x02d5, 0x000c, 0x0357,
+	0x0008, 0x8010, 0x0000, 0x0001, 0x000c, 0x0362, 0x0000, 0x1810,
+	0x000c, 0x0362, 0x0000, 0x8074, 0x0008, 0xf000, 0x0000, 0x0d30,
+	0x0002, 0x3a42, 0x0003, 0x8add, 0x0000, 0x15fc, 0x000b, 0xb07a,
+	0x0003, 0x0013, 0x0000, 0x8074, 0x0000, 0x0501, 0x0008, 0x8010,
+	0x0008, 0x000c, 0x000c, 0x0362, 0x0003, 0x0013, 0x0009, 0xbbe0,
+	0x0008, 0x0030, 0x0003, 0x8af9, 0x0000, 0x18fe, 0x0009, 0x3ce0,
+	0x000b, 0x0af6, 0x0008, 0x15fe, 0x0009, 0x3ce0, 0x000b, 0x0af6,
+	0x0008, 0x13fe, 0x0009, 0x3ce0, 0x000b, 0x8af2, 0x0004, 0x0350,
+	0x0008, 0x0d26, 0x0003, 0x02f3, 0x000c, 0x0352, 0x0008, 0x8076,
+	0x0000, 0x0040, 0x000b, 0x034d, 0x0008, 0x8076, 0x0008, 0x0041,
+	0x000b, 0x034d, 0x0009, 0xbbe0, 0x0000, 0x0032, 0x000b, 0x8afe,
+	0x0008, 0x3c1e, 0x000b, 0x034d, 0x0009, 0xbbe0, 0x0000, 0x003b,
+	0x000b, 0x8b03, 0x0000, 0x3cdc, 0x000b, 0x034d, 0x0009, 0xbbe0,
+	0x0008, 0x0035, 0x000b, 0x8b09, 0x0000, 0x8072, 0x0000, 0x8000,
+	0x0003, 0x04b1, 0x0009, 0xbbe0, 0x0008, 0x0036, 0x0003, 0x0bd4,
+	0x0009, 0xbbe0, 0x0000, 0x0037, 0x000b, 0x8b2e, 0x0000, 0x18fe,
+	0x0009, 0x3ce0, 0x0003, 0x8af6, 0x0008, 0x8076, 0x0000, 0x0040,
+	0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x000d, 0x0009, 0xa6d0,
+	0x0008, 0x0000, 0x0008, 0x7f04, 0x0001, 0xa7d0, 0x0008, 0x0000,
+	0x0000, 0x7f06, 0x0001, 0xa8d0, 0x0008, 0x0000, 0x0008, 0x7f08,
+	0x0009, 0xa9d0, 0x0008, 0x0000, 0x0000, 0x7f0a, 0x0000, 0x8066,
+	0x0000, 0x0422, 0x0003, 0xc325, 0x000c, 0x0357, 0x0008, 0x8054,
+	0x0000, 0x0004, 0x0000, 0x8074, 0x0008, 0xf000, 0x0000, 0x8072,
+	0x0000, 0x8000, 0x0003, 0x02d7, 0x0009, 0xbbe0, 0x0000, 0x0038,
+	0x0003, 0x8b40, 0x0000, 0x18fe, 0x0009, 0x3ce0, 0x000b, 0x0b3d,
+	0x0008, 0x15fe, 0x0009, 0x3ce0, 0x000b, 0x8aec, 0x000c, 0x0352,
+	0x0008, 0x8076, 0x0000, 0x0040, 0x0000, 0x8072, 0x0000, 0x8000,
+	0x0003, 0x039b, 0x0008, 0x8076, 0x0008, 0x0042, 0x000b, 0x034d,
+	0x0009, 0xbbe0, 0x0000, 0x0016, 0x000b, 0x8b4d, 0x0000, 0x8074,
+	0x0008, 0x0808, 0x0002, 0x3a44, 0x0003, 0x8816, 0x0000, 0x8074,
+	0x0000, 0x0800, 0x0000, 0x8072, 0x0000, 0x8000, 0x000f, 0x8000,
+	0x0003, 0x0013, 0x0000, 0x8072, 0x0000, 0x8000, 0x0003, 0x0013,
+	0x0002, 0x1430, 0x000b, 0x0353, 0x000a, 0x3d30, 0x0000, 0x7f00,
+	0x0001, 0xbc80, 0x0000, 0x0007, 0x0003, 0x035b, 0x000a, 0x1930,
+	0x0000, 0x7f00, 0x0001, 0x9880, 0x0000, 0x0007, 0x0000, 0x8060,
+	0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x000a,
+	0x000b, 0xc360, 0x000f, 0x4000, 0x000b, 0x2362, 0x0008, 0x0870,
+	0x000f, 0x4000, 0x0009, 0xbac0, 0x0008, 0x0090, 0x000b, 0x0b6b,
+	0x0000, 0x8074, 0x0000, 0x0706, 0x0003, 0x036d, 0x0000, 0x8074,
+	0x0000, 0x0703, 0x000f, 0x4000, 0x0008, 0x8010, 0x0000, 0x0023,
+	0x000b, 0x03a9, 0x0008, 0x8010, 0x0000, 0x0008, 0x000b, 0x03a9,
+	0x0008, 0x8010, 0x0008, 0x0022, 0x000b, 0x03a9, 0x000c, 0x0357,
+	0x0008, 0x8010, 0x0000, 0x0007, 0x000c, 0x0362, 0x0000, 0x1810,
+	0x000c, 0x0362, 0x0003, 0x03b3, 0x000c, 0x0357, 0x0008, 0x8010,
+	0x0008, 0x001b, 0x000c, 0x0362, 0x0000, 0x1810, 0x000c, 0x0362,
+	0x0000, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30, 0x0003, 0x0013,
+	0x0008, 0x8010, 0x0008, 0x0009, 0x000b, 0x03a9, 0x0008, 0x8010,
+	0x0008, 0x0005, 0x000b, 0x03a9, 0x000a, 0x1648, 0x000b, 0x8888,
+	0x0008, 0x808c, 0x0000, 0x0001, 0x0007, 0x0000, 0x0008, 0x8010,
+	0x0000, 0x0004, 0x000a, 0x4143, 0x0003, 0x0888, 0x0002, 0x3a44,
+	0x0003, 0x8813, 0x0008, 0x0d2a, 0x000b, 0x03a9, 0x0008, 0x8010,
+	0x0008, 0x0003, 0x0003, 0x03ab, 0x0008, 0x8010, 0x0000, 0x000b,
+	0x0003, 0x03ab, 0x0008, 0x8010, 0x0000, 0x0002, 0x0003, 0x03ab,
+	0x0002, 0x3a47, 0x000b, 0x8a67, 0x0008, 0x8010, 0x0008, 0x0006,
+	0x0003, 0x03ab, 0x0000, 0x8074, 0x0008, 0xf000, 0x000c, 0x0362,
+	0x0004, 0x0365, 0x000a, 0x3a40, 0x000b, 0x0813, 0x0008, 0x8010,
+	0x0008, 0x000c, 0x000c, 0x0362, 0x0003, 0x0013, 0x0000, 0x8074,
+	0x0000, 0xf080, 0x0000, 0x0d30, 0x0002, 0x2e4d, 0x0002, 0x2e4d,
+	0x000b, 0x0bbc, 0x0008, 0x8054, 0x0000, 0x0019, 0x0003, 0x0013,
+	0x0008, 0x8054, 0x0008, 0x0009, 0x0003, 0x0013, 0x0002, 0x3a44,
+	0x0003, 0x8813, 0x0003, 0x039e, 0x0008, 0x808c, 0x0008, 0x0000,
+	0x0002, 0x4447, 0x0003, 0x0be8, 0x0001, 0xc0c0, 0x0008, 0x00ff,
+	0x0009, 0xffe0, 0x0008, 0x00ff, 0x0003, 0x8bbf, 0x0001, 0xc1e0,
+	0x0008, 0xffff, 0x0003, 0x8bbf, 0x0008, 0x8010, 0x0000, 0x0013,
+	0x000c, 0x0362, 0x0000, 0x8074, 0x0008, 0x0202, 0x0003, 0x0013,
+	0x000a, 0x3a40, 0x0003, 0x8be5, 0x0000, 0x8074, 0x0000, 0x0200,
+	0x0000, 0x3d00, 0x0000, 0x3cfe, 0x0000, 0x8072, 0x0000, 0x8000,
+	0x0001, 0x43e0, 0x0003, 0x8be3, 0x0000, 0x42fe, 0x0001, 0xffc0,
+	0x0008, 0x00ff, 0x0009, 0x00e0, 0x000b, 0x0bbf, 0x0008, 0x0d08,
+	0x000b, 0x0438, 0x0000, 0x8072, 0x0000, 0x8000, 0x0003, 0x0013,
+	0x0004, 0x04ba, 0x0008, 0x808c, 0x0000, 0x0001, 0x0000, 0x04fc,
+	0x000b, 0x349d, 0x0000, 0x0460, 0x0008, 0x8062, 0x0000, 0x0001,
+	0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc3f2, 0x0000, 0x0004,
+	0x0009, 0x80c0, 0x0008, 0x00ff, 0x0000, 0x7f00, 0x0001, 0x80e0,
+	0x0000, 0x0004, 0x000b, 0x0c0c, 0x0001, 0x80e0, 0x0008, 0x0005,
+	0x000b, 0x0c0c, 0x0001, 0x80e0, 0x0008, 0x0006, 0x000b, 0x0c0c,
+	0x0001, 0x82c0, 0x0008, 0xff00, 0x0008, 0x7f04, 0x0009, 0x82e0,
+	0x0008, 0x0600, 0x000b, 0x0c0c, 0x0009, 0x82e0, 0x0008, 0x0500,
+	0x000b, 0x0c0c, 0x0009, 0x82e0, 0x0000, 0x0400, 0x000b, 0x8c9d,
+	0x0009, 0xc4c0, 0x0000, 0x7000, 0x0009, 0xffe0, 0x0000, 0x1000,
+	0x0003, 0x0c38, 0x0004, 0x04ab, 0x0002, 0x3941, 0x000b, 0x0c17,
+	0x0000, 0x8072, 0x0000, 0x0400, 0x0003, 0x0013, 0x0000, 0x0460,
+	0x0008, 0x80fe, 0x0008, 0x002b, 0x0008, 0x7f62, 0x0000, 0x8066,
+	0x0008, 0x2209, 0x0003, 0xc41d, 0x0008, 0x11fc, 0x0003, 0x3433,
+	0x0001, 0x9180, 0x0000, 0x0002, 0x0000, 0x8060, 0x0000, 0x0400,
+	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0609, 0x0003, 0xc427,
+	0x0000, 0x42fe, 0x0001, 0xffc0, 0x0008, 0xff00, 0x0009, 0x03e0,
+	0x0003, 0x8c30, 0x0000, 0x8072, 0x0000, 0x0400, 0x0003, 0x0052,
+	0x0001, 0x9180, 0x0008, 0x0003, 0x000b, 0x041a, 0x0000, 0x8072,
+	0x0000, 0x0400, 0x0008, 0x8010, 0x0000, 0x0010, 0x0003, 0x0490,
+	0x0004, 0x04ab, 0x0002, 0x3941, 0x0003, 0x0c3e, 0x0000, 0x8072,
+	0x0000, 0x0400, 0x0003, 0x0013, 0x0004, 0x0475, 0x0008, 0x11fc,
+	0x0003, 0xb446, 0x0000, 0x8072, 0x0000, 0x0400, 0x0008, 0x8010,
+	0x0000, 0x000e, 0x0003, 0x0490, 0x0000, 0x8060, 0x0000, 0x0400,
+	0x0000, 0x04fc, 0x0003, 0xb45b, 0x0008, 0x808c, 0x0008, 0x0000,
+	0x0001, 0x9180, 0x0008, 0x0005, 0x0008, 0x7f62, 0x0000, 0x8066,
+	0x0008, 0x0009, 0x000b, 0xc451, 0x0008, 0x0060, 0x0008, 0x8062,
+	0x0008, 0x001b, 0x0008, 0x4304, 0x0008, 0x4206, 0x0000, 0x8066,
+	0x0000, 0x0412, 0x0003, 0xc459, 0x0003, 0x0472, 0x0008, 0x808c,
+	0x0000, 0x0001, 0x0000, 0x0460, 0x0008, 0x8062, 0x0008, 0x002b,
+	0x0000, 0x8066, 0x0008, 0x0609, 0x000b, 0xc462, 0x0000, 0x8066,
+	0x0008, 0x220a, 0x0003, 0xc465, 0x0000, 0x42fe, 0x0001, 0xffc0,
+	0x0008, 0xff00, 0x0008, 0x7f04, 0x0000, 0x8060, 0x0000, 0x0400,
+	0x0001, 0x9180, 0x0000, 0x0002, 0x0008, 0x7f62, 0x0000, 0x8066,
+	0x0008, 0x041a, 0x0003, 0xc471, 0x0000, 0x8072, 0x0000, 0x0400,
+	0x0003, 0x0052, 0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x6b62,
+	0x0000, 0x8066, 0x0000, 0x0411, 0x000b, 0xc47a, 0x0008, 0x02fe,
+	0x0009, 0x03e0, 0x000b, 0x8c80, 0x0000, 0x0d22, 0x000f, 0x4000,
+	0x0009, 0x8280, 0x0000, 0x0002, 0x0001, 0x6b80, 0x0008, 0x7f62,
+	0x0000, 0x8066, 0x0008, 0x2209, 0x000b, 0xc486, 0x000a, 0x0200,
+	0x0001, 0xffc0, 0x0000, 0x0007, 0x0000, 0x7f06, 0x0008, 0x6b62,
+	0x0000, 0x8066, 0x0008, 0x060a, 0x0003, 0xc48e, 0x000f, 0x4000,
+	0x0002, 0x3a44, 0x0003, 0x8813, 0x000a, 0x2f44, 0x000a, 0x2f44,
+	0x0003, 0x8b9e, 0x0008, 0x808a, 0x0008, 0x0003, 0x0000, 0x8074,
+	0x0000, 0xf080, 0x000b, 0x5c99, 0x0008, 0x8054, 0x0000, 0x0019,
+	0x0003, 0x0013, 0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x808c,
+	0x0008, 0x0000, 0x0008, 0x8010, 0x0008, 0x0011, 0x000c, 0x0362,
+	0x0000, 0x42fe, 0x0001, 0xffc0, 0x0008, 0x00ff, 0x0008, 0x7f10,
+	0x000c, 0x0362, 0x0008, 0x4310, 0x0003, 0x03ab, 0x0002, 0x3941,
+	0x0003, 0x0cae, 0x000f, 0x4000, 0x0000, 0x8072, 0x0008, 0x0404,
+	0x000f, 0x4000, 0x0008, 0x8010, 0x0008, 0x0012, 0x000c, 0x0362,
+	0x0004, 0x0475, 0x0000, 0x1110, 0x000c, 0x0362, 0x0008, 0x11fc,
+	0x000b, 0xb4b4, 0x0003, 0x0013, 0x0009, 0xc2c0, 0x0008, 0x00ff,
+	0x0000, 0x7f00, 0x0001, 0xc3c0, 0x0008, 0xff00, 0x0009, 0x00d0,
+	0x0003, 0x0cdf, 0x0000, 0x0d0a, 0x0001, 0x8580, 0x0000, 0x1000,
+	0x0008, 0x7f62, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x8066,
+	0x0000, 0x0809, 0x0003, 0xc4c9, 0x0000, 0x04fc, 0x0003, 0x34d8,
+	0x0000, 0x0460, 0x0008, 0x8062, 0x0000, 0x0004, 0x0000, 0x8066,
+	0x0000, 0x0211, 0x0003, 0xc4d1, 0x0008, 0x01fe, 0x0009, 0x00e0,
+	0x0003, 0x8cd8, 0x0008, 0x02fe, 0x0001, 0x43e0, 0x000b, 0x0cde,
+	0x0002, 0x0500, 0x0000, 0x7f0a, 0x0009, 0xffe0, 0x0000, 0x0800,
+	0x000b, 0x8cc2, 0x0008, 0x0d08, 0x000f, 0x4000, 0x0008, 0x43fe,
+	0x0001, 0x3e80, 0x0000, 0x0d60, 0x0008, 0x7f62, 0x0000, 0x8066,
+	0x0000, 0x0809, 0x000b, 0xc4e5, 0x0000, 0x8060, 0x0000, 0x0400,
+	0x0001, 0x84c0, 0x0008, 0xff00, 0x0002, 0x7f70, 0x0009, 0xff80,
+	0x0000, 0x1000, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0000, 0x0809,
+	0x0003, 0xc4f0, 0x000f, 0x4000, 0xe504, 0x3334
 };
-unsigned short rseqipx_code_length01 = 0x09d8;
+unsigned short rseqipx_code_length01 = 0x09e6;
 /*
  *
  */
 
 unsigned long xseqipx_code_addr01 = 0x0001e000 ;
 unsigned short xseqipx_code01[] = { 
-0x0013, 0x0003, 0x0000, 0x1082, 0x0001, 0xe000, 0x0005, 0x0032,
+0x0013, 0x0003, 0x0000, 0x10d6, 0x0001, 0xe000, 0x0005, 0x0032,
 	0x0000, 0x0010, 0x0015, 0x0033, 0x0010, 0xbb39, 0x000b, 0x8007,
 	0x0004, 0x010b, 0x0014, 0x011d, 0x0010, 0xc000, 0x0000, 0xc001,
 	0x0000, 0xc0b0, 0x0010, 0xc0b1, 0x0010, 0xc0b2, 0x0000, 0xc0b3,
@@ -7544,15 +7548,15 @@
 	0x0010, 0xff00, 0x0005, 0x00d0, 0x0010, 0xff00, 0x0015, 0x00d1,
 	0x0010, 0xff00, 0x0012, 0x3a40, 0x000b, 0x1031, 0x0002, 0x7940,
 	0x001b, 0x112f, 0x0002, 0x3a42, 0x001b, 0x1035, 0x0003, 0xb035,
-	0x0003, 0xa1d8, 0x0002, 0x3a41, 0x001b, 0x1039, 0x0012, 0x7941,
-	0x000b, 0x12f6, 0x0003, 0xe055, 0x0012, 0xd042, 0x0003, 0x103f,
+	0x0013, 0xa1dc, 0x0002, 0x3a41, 0x001b, 0x1039, 0x0012, 0x7941,
+	0x001b, 0x1311, 0x0003, 0xe055, 0x0012, 0xd042, 0x0003, 0x103f,
 	0x0000, 0x75ff, 0x0002, 0xff41, 0x001b, 0x1055, 0x0000, 0x0cfe,
 	0x0003, 0x6049, 0x0002, 0x3a44, 0x000b, 0x1049, 0x0011, 0x02e8,
-	0x0010, 0x0000, 0x0013, 0x1383, 0x0011, 0x02e8, 0x0010, 0x0005,
-	0x0003, 0x1413, 0x0012, 0x3a46, 0x001b, 0x1055, 0x0012, 0xd042,
+	0x0010, 0x0000, 0x0013, 0x13a2, 0x0011, 0x02e8, 0x0010, 0x0005,
+	0x0003, 0x1432, 0x0012, 0x3a46, 0x001b, 0x1055, 0x0012, 0xd042,
 	0x0003, 0x1050, 0x0000, 0x75ff, 0x0012, 0xff40, 0x001b, 0x1055,
 	0x0000, 0x12fe, 0x0013, 0x6055, 0x0001, 0x0fe8, 0x0010, 0x0000,
-	0x0013, 0x1619, 0x0015, 0x0030, 0x0000, 0x0400, 0x0010, 0xc131,
+	0x0003, 0x163f, 0x0015, 0x0030, 0x0000, 0x0400, 0x0010, 0xc131,
 	0x0015, 0x0033, 0x0010, 0xb211, 0x001b, 0x805a, 0x0010, 0xb2ff,
 	0x0001, 0xb3e0, 0x001c, 0x10cd, 0x000b, 0xf02d, 0x0011, 0x3be8,
 	0x0000, 0x0010, 0x001b, 0x1072, 0x0000, 0x0afe, 0x000b, 0x6066,
@@ -7577,11 +7581,11 @@
 	0x000b, 0x10bc, 0x0001, 0x0fe8, 0x0010, 0x0000, 0x0013, 0x10b6,
 	0x0001, 0x0fe8, 0x0000, 0x0002, 0x0013, 0x10b6, 0x0015, 0x0039,
 	0x0010, 0x1010, 0x0013, 0x00ca, 0x0015, 0x0039, 0x0000, 0x5040,
-	0x0015, 0x00b8, 0x0000, 0x0008, 0x0004, 0x083d, 0x0013, 0x00ca,
+	0x0015, 0x00b8, 0x0000, 0x0008, 0x0004, 0x0867, 0x0013, 0x00ca,
 	0x0011, 0x3be8, 0x0010, 0x0017, 0x000b, 0x10c1, 0x0010, 0x3cc3,
 	0x0013, 0x00ca, 0x0011, 0x3be8, 0x0010, 0x0018, 0x001b, 0x10c6,
 	0x0000, 0x3cc2, 0x0013, 0x00ca, 0x0005, 0x00ce, 0x0000, 0x0001,
-	0x0000, 0x3bcf, 0x0004, 0x0801, 0x0015, 0x0039, 0x0000, 0x8000,
+	0x0000, 0x3bcf, 0x0004, 0x0829, 0x0015, 0x0039, 0x0000, 0x8000,
 	0x0013, 0x002d, 0x0001, 0xb288, 0x0000, 0x0002, 0x0001, 0xc180,
 	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x80d3,
 	0x0002, 0xb200, 0x0011, 0xffc8, 0x0000, 0x0007, 0x0010, 0xffb2,
@@ -7610,455 +7614,465 @@
 	0x0012, 0xff40, 0x000b, 0x1031, 0x0015, 0x00d1, 0x0010, 0x0101,
 	0x0013, 0x9134, 0x0005, 0x0079, 0x0000, 0x0001, 0x0013, 0x9137,
 	0x0015, 0x00d1, 0x0000, 0x0100, 0x0011, 0x02e8, 0x0000, 0x0002,
-	0x0003, 0x115d, 0x0011, 0x02e8, 0x0000, 0x0001, 0x0003, 0x1175,
-	0x0011, 0x02e8, 0x0000, 0x0004, 0x0013, 0x1193, 0x0011, 0x02e8,
-	0x0010, 0x0003, 0x0003, 0x11c4, 0x0005, 0x0002, 0x0010, 0x0000,
+	0x0003, 0x1161, 0x0011, 0x02e8, 0x0000, 0x0001, 0x0003, 0x1179,
+	0x0011, 0x02e8, 0x0000, 0x0004, 0x0003, 0x1197, 0x0011, 0x02e8,
+	0x0010, 0x0003, 0x0003, 0x11c8, 0x0005, 0x0002, 0x0010, 0x0000,
 	0x0000, 0xc00e, 0x0000, 0xc00d, 0x0010, 0xc003, 0x0015, 0x0030,
 	0x0000, 0x0400, 0x0001, 0xbd88, 0x0010, 0x0009, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x8152, 0x0012, 0x3a45,
-	0x0013, 0x115a, 0x0015, 0x003a, 0x0000, 0x2000, 0x0015, 0x003a,
-	0x0010, 0x1010, 0x0004, 0x0829, 0x0012, 0xd042, 0x0013, 0x1031,
-	0x0013, 0x0050, 0x0012, 0x7849, 0x0013, 0x11d2, 0x0010, 0x0dfe,
+	0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x8152, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x8156, 0x0012, 0x3a45,
+	0x0003, 0x115e, 0x0015, 0x003a, 0x0000, 0x2000, 0x0015, 0x003a,
+	0x0010, 0x1010, 0x0014, 0x0853, 0x0012, 0xd042, 0x0013, 0x1031,
+	0x0013, 0x0050, 0x0012, 0x7849, 0x0003, 0x11d6, 0x0010, 0x0dfe,
 	0x0003, 0x6148, 0x0012, 0x0c10, 0x0010, 0xff0c, 0x0015, 0x0030,
 	0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0003, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x816a, 0x0010, 0xb3fe,
-	0x0003, 0x6172, 0x0010, 0xb30b, 0x0015, 0x0033, 0x0010, 0xc00a,
-	0x001b, 0x8170, 0x0013, 0x01c7, 0x0000, 0xc00b, 0x0010, 0xc00a,
-	0x0013, 0x01c7, 0x0000, 0x78b0, 0x0012, 0xb044, 0x0013, 0x11d2,
-	0x0002, 0xb049, 0x0013, 0x11d2, 0x0010, 0x71ff, 0x0012, 0xff38,
+	0x0015, 0x0033, 0x0000, 0xb309, 0x001b, 0x816e, 0x0010, 0xb3fe,
+	0x0013, 0x6176, 0x0010, 0xb30b, 0x0015, 0x0033, 0x0010, 0xc00a,
+	0x000b, 0x8174, 0x0013, 0x01cb, 0x0000, 0xc00b, 0x0010, 0xc00a,
+	0x0013, 0x01cb, 0x0000, 0x78b0, 0x0012, 0xb044, 0x0003, 0x11d6,
+	0x0002, 0xb049, 0x0003, 0x11d6, 0x0010, 0x71ff, 0x0012, 0xff38,
 	0x0010, 0xff71, 0x0010, 0x0dfe, 0x0013, 0x6146, 0x0012, 0x0c10,
 	0x0010, 0xff0c, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
 	0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309,
-	0x000b, 0x8188, 0x0010, 0xb3fe, 0x0003, 0x6190, 0x0000, 0xb309,
-	0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x818e, 0x0013, 0x01c7,
-	0x0010, 0xc009, 0x0000, 0xc008, 0x0013, 0x01c7, 0x0000, 0x78b0,
-	0x0012, 0xb044, 0x0013, 0x11d2, 0x0002, 0xb049, 0x0013, 0x11d2,
+	0x001b, 0x818c, 0x0010, 0xb3fe, 0x0013, 0x6194, 0x0000, 0xb309,
+	0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x8192, 0x0013, 0x01cb,
+	0x0010, 0xc009, 0x0000, 0xc008, 0x0013, 0x01cb, 0x0000, 0x78b0,
+	0x0012, 0xb044, 0x0003, 0x11d6, 0x0002, 0xb049, 0x0003, 0x11d6,
 	0x0010, 0x71ff, 0x0012, 0xff38, 0x0010, 0xff71, 0x0010, 0x0dfe,
 	0x0013, 0x6146, 0x0012, 0x0c10, 0x0010, 0xff0c, 0x0015, 0x0030,
 	0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0003, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x81a6, 0x0010, 0xb3fe,
-	0x0013, 0x61ae, 0x0000, 0xb305, 0x0015, 0x0033, 0x0010, 0xc00a,
-	0x000b, 0x81ac, 0x0013, 0x01b0, 0x0010, 0xc005, 0x0000, 0xc004,
-	0x0002, 0x033f, 0x0002, 0xff27, 0x0000, 0x0db8, 0x0004, 0x0378,
-	0x0000, 0x0db8, 0x0004, 0x083d, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x81aa, 0x0010, 0xb3fe,
+	0x0003, 0x61b2, 0x0000, 0xb305, 0x0015, 0x0033, 0x0010, 0xc00a,
+	0x001b, 0x81b0, 0x0003, 0x01b4, 0x0010, 0xc005, 0x0000, 0xc004,
+	0x0002, 0x033f, 0x0002, 0xff27, 0x0000, 0x0db8, 0x0014, 0x0397,
+	0x0000, 0x0db8, 0x0004, 0x0867, 0x0015, 0x0030, 0x0000, 0x0400,
 	0x0011, 0xbc88, 0x0010, 0x0000, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb309, 0x000b, 0x81bd, 0x0011, 0xb3e8, 0x0000, 0x0002,
+	0x0000, 0xb309, 0x001b, 0x81c1, 0x0011, 0xb3e8, 0x0000, 0x0002,
 	0x001b, 0x1146, 0x0005, 0x0002, 0x0010, 0x0005, 0x0003, 0x0148,
-	0x0012, 0x7849, 0x0013, 0x11d2, 0x0003, 0x0148, 0x0000, 0x0db8,
-	0x0012, 0x0345, 0x001b, 0x11cd, 0x0002, 0x033f, 0x0004, 0x0378,
-	0x0013, 0x0146, 0x0002, 0x033f, 0x0002, 0xff27, 0x0004, 0x0378,
-	0x0004, 0x083d, 0x0013, 0x0146, 0x0015, 0x00b8, 0x0000, 0x0001,
-	0x0015, 0x003a, 0x0010, 0x0101, 0x0004, 0x083d, 0x0003, 0x0153,
-	0x0000, 0x2bba, 0x0003, 0xb1d9, 0x0005, 0x002a, 0x0000, 0x0002,
-	0x0001, 0xbac8, 0x0000, 0x0700, 0x000b, 0x12b1, 0x0011, 0x15e8,
-	0x0000, 0x0002, 0x0003, 0x122c, 0x0011, 0x15e8, 0x0000, 0x0001,
-	0x0013, 0x11e8, 0x0005, 0x0015, 0x0010, 0x0000, 0x0003, 0x020f,
-	0x0005, 0x0015, 0x0010, 0x0000, 0x0002, 0xba43, 0x0003, 0x1210,
-	0x0003, 0xb1ec, 0x0005, 0x002a, 0x0000, 0x0004, 0x0012, 0xba42,
-	0x0003, 0x1216, 0x0012, 0x104b, 0x000b, 0x120f, 0x0000, 0x1a30,
-	0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b2a,
-	0x001b, 0x81f8, 0x0010, 0x20b0, 0x0010, 0x21b1, 0x0010, 0x22b2,
-	0x0010, 0x23b3, 0x0010, 0x24b4, 0x0010, 0x25b5, 0x0010, 0x28b8,
-	0x0010, 0x29b9, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0007,
-	0x0015, 0x0033, 0x0010, 0xb032, 0x000b, 0x8206, 0x0000, 0x1a30,
-	0x0005, 0x0031, 0x0010, 0x000f, 0x0015, 0x0033, 0x0010, 0xb812,
-	0x000b, 0x820c, 0x0005, 0x0015, 0x0010, 0x0000, 0x0013, 0x0035,
-	0x0000, 0x1efe, 0x0003, 0x6224, 0x0014, 0x0256, 0x0000, 0x1efe,
-	0x000c, 0x6256, 0x0003, 0x020f, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x0020, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x821b,
-	0x0002, 0xb02f, 0x0000, 0xffb0, 0x0005, 0x0031, 0x0000, 0x0020,
-	0x0015, 0x0033, 0x0000, 0xb00a, 0x000b, 0x8222, 0x0003, 0x01f3,
-	0x0015, 0x00b8, 0x0010, 0x0005, 0x0004, 0x083d, 0x0000, 0x13b8,
-	0x0015, 0x003a, 0x0010, 0x0404, 0x0004, 0x083d, 0x0003, 0x020f,
-	0x0005, 0x0015, 0x0000, 0x0001, 0x0012, 0xba42, 0x0013, 0x1239,
-	0x0013, 0xb230, 0x0010, 0x2bff, 0x0012, 0xff4f, 0x000b, 0x11d8,
-	0x0002, 0xba43, 0x001b, 0x1216, 0x0000, 0x1efe, 0x000c, 0x6256,
-	0x0003, 0x020f, 0x0010, 0x28b8, 0x0010, 0x29b9, 0x0004, 0x02c7,
-	0x0002, 0x3a42, 0x000b, 0x120f, 0x0000, 0x1c30, 0x0015, 0x00ff,
-	0x0000, 0x0002, 0x0002, 0x1f43, 0x001b, 0x1246, 0x0001, 0xff88,
-	0x0000, 0x0002, 0x0003, 0x0248, 0x0001, 0xff88, 0x0000, 0x0004,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x824b,
-	0x0000, 0xb0ff, 0x0011, 0x16a0, 0x0000, 0xff16, 0x000b, 0x24e2,
-	0x0002, 0xb100, 0x0003, 0x0253, 0x0010, 0xb1ff, 0x0001, 0x17a0,
-	0x0010, 0xff17, 0x0013, 0x0216, 0x0000, 0x16ff, 0x0001, 0x18a0,
-	0x0010, 0xff00, 0x001b, 0x225d, 0x0002, 0x1700, 0x0003, 0x12b0,
-	0x0013, 0x025e, 0x0010, 0x17ff, 0x0011, 0x19a0, 0x0003, 0x22b0,
-	0x0011, 0x00d0, 0x0003, 0x12b0, 0x0000, 0x1c30, 0x0000, 0x1b31,
-	0x0015, 0x0033, 0x0000, 0xb131, 0x000b, 0x8266, 0x0003, 0xb267,
-	0x0000, 0xb120, 0x0010, 0xb221, 0x0002, 0x1f43, 0x001b, 0x1273,
-	0x0010, 0xc022, 0x0000, 0xc023, 0x0000, 0xb324, 0x0000, 0xb425,
-	0x0010, 0xb3b5, 0x0000, 0xb4b6, 0x0003, 0x0277, 0x0000, 0xb322,
-	0x0000, 0xb423, 0x0000, 0xb524, 0x0010, 0xb625, 0x0013, 0xb277,
-	0x0005, 0x002a, 0x0000, 0x0001, 0x0012, 0x1500, 0x0000, 0xff15,
-	0x0000, 0x16ff, 0x0001, 0xb580, 0x0000, 0xff16, 0x000b, 0x2282,
-	0x0002, 0x1700, 0x0013, 0x0283, 0x0010, 0x17ff, 0x0001, 0xb680,
-	0x0010, 0xff17, 0x0012, 0x1e10, 0x0010, 0xff1e, 0x0013, 0x62b0,
-	0x0002, 0x1d00, 0x0010, 0xff1d, 0x0010, 0xc030, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x828e, 0x0010, 0xb0fe,
-	0x001b, 0x62af, 0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0001,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x8296, 0x0010, 0xb0fe,
-	0x001b, 0x629c, 0x0005, 0x00ce, 0x0010, 0x0005, 0x0013, 0x0801,
-	0x0010, 0xb01c, 0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0019,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82a2, 0x0001, 0xb0c8,
-	0x0010, 0x00ff, 0x0000, 0xff1f, 0x0010, 0xc030, 0x0011, 0xbe80,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82ab,
-	0x0000, 0xb01d, 0x0010, 0x1dff, 0x0013, 0x028a, 0x0000, 0xb01b,
-	0x0017, 0x4000, 0x0002, 0x3a41, 0x0003, 0x12b9, 0x0003, 0xb2b3,
-	0x0005, 0x002a, 0x0000, 0x0004, 0x0005, 0x0015, 0x0010, 0x0000,
-	0x0003, 0x020f, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002,
-	0x0015, 0x0033, 0x0000, 0x1b2a, 0x000b, 0x82be, 0x0015, 0x00b8,
-	0x0000, 0x0004, 0x0004, 0x083d, 0x0000, 0x13b8, 0x0015, 0x003a,
-	0x0010, 0x0404, 0x0004, 0x083d, 0x0013, 0x0039, 0x0002, 0x1e00,
-	0x0010, 0xff1e, 0x0012, 0x1d10, 0x0010, 0xff1d, 0x0010, 0xc030,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82cf,
-	0x0010, 0xb0fe, 0x000b, 0x62f4, 0x0000, 0x1cff, 0x0001, 0x1ae0,
-	0x0013, 0x12de, 0x0000, 0x1c30, 0x0005, 0x0031, 0x0010, 0x0000,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82da, 0x0010, 0xb0fe,
-	0x001b, 0x62de, 0x0000, 0x1aff, 0x0000, 0xff1c, 0x0000, 0x1c30,
-	0x0005, 0x0031, 0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x82e4, 0x0001, 0xb0c8, 0x0010, 0x000f, 0x0000, 0xff1f,
-	0x0001, 0xbf80, 0x0010, 0xff1d, 0x0010, 0xc030, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82ee, 0x0010, 0xb0fe,
-	0x000b, 0x62f4, 0x0005, 0x00ce, 0x0010, 0x0006, 0x0013, 0x0801,
-	0x0000, 0xb01b, 0x0017, 0x4000, 0x0010, 0x79b0, 0x0000, 0xd0ff,
-	0x0012, 0xff40, 0x001b, 0x1039, 0x0015, 0x00d1, 0x0010, 0x0101,
-	0x0003, 0x92fc, 0x0005, 0x0079, 0x0000, 0x0002, 0x0003, 0x92ff,
-	0x0015, 0x00d1, 0x0000, 0x0100, 0x0010, 0x13fe, 0x0003, 0x6334,
-	0x0012, 0xb04e, 0x001b, 0x1350, 0x0012, 0x784a, 0x0003, 0x1356,
-	0x0000, 0x75ff, 0x0011, 0xffc8, 0x0010, 0x1800, 0x001b, 0x1356,
-	0x0001, 0x0fe8, 0x0000, 0x0001, 0x001b, 0x1318, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000e, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0x8f0a, 0x000b, 0x8316, 0x0013, 0x035c,
-	0x0001, 0x0fe8, 0x0000, 0x0002, 0x000b, 0x1323, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0005, 0x0031, 0x0000, 0x001a, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x001b, 0x8321, 0x0013, 0x035c, 0x0001, 0x0fe8,
-	0x0010, 0x0000, 0x0013, 0x132a, 0x0005, 0x00ce, 0x0000, 0x0007,
-	0x0010, 0x0fcf, 0x0013, 0x07fb, 0x0000, 0x13b8, 0x0002, 0x1045,
-	0x0013, 0x1332, 0x0012, 0x103f, 0x0002, 0xff27, 0x0004, 0x0378,
-	0x0004, 0x083d, 0x0003, 0x0334, 0x0012, 0x103f, 0x0004, 0x0378,
-	0x0015, 0x000f, 0x0010, 0x0000, 0x0002, 0x3944, 0x0013, 0x133d,
-	0x0015, 0x0039, 0x0000, 0x5040, 0x0015, 0x00b8, 0x0000, 0x0008,
-	0x0004, 0x083d, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88,
-	0x0010, 0x000c, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a,
-	0x001b, 0x8344, 0x0010, 0xc014, 0x0000, 0xc013, 0x0000, 0xc010,
-	0x0002, 0x3a47, 0x0013, 0x134f, 0x0015, 0x003a, 0x0000, 0x8000,
-	0x0015, 0x003a, 0x0010, 0x4040, 0x0014, 0x0806, 0x0013, 0x0039,
-	0x0015, 0x00b8, 0x0010, 0x0003, 0x0015, 0x003a, 0x0010, 0x0202,
-	0x0004, 0x083d, 0x0013, 0x0348, 0x0015, 0x00b8, 0x0000, 0x0002,
-	0x0015, 0x003a, 0x0010, 0x0202, 0x0004, 0x083d, 0x0013, 0x0348,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8363,
-	0x0011, 0x1388, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x001b, 0x8369, 0x0010, 0xb0fe, 0x0003, 0x636e,
-	0x0000, 0xb012, 0x0003, 0x0370, 0x0010, 0xc012, 0x0010, 0xc011,
-	0x0012, 0x104b, 0x0013, 0x132a, 0x0002, 0x103b, 0x0010, 0xff03,
-	0x0005, 0x0002, 0x0010, 0x0000, 0x0000, 0xc00d, 0x0003, 0x032a,
-	0x0000, 0xffb0, 0x0010, 0xc3b1, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0001, 0xb888, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb012, 0x001b, 0x8381, 0x0017, 0x4000, 0x0012, 0x3a43,
-	0x0013, 0x1392, 0x0015, 0x003a, 0x0000, 0x0800, 0x0010, 0x0db0,
-	0x0003, 0x6392, 0x0000, 0x0bff, 0x0001, 0xb0e0, 0x0003, 0x13bb,
-	0x0010, 0x09ff, 0x0001, 0xb0e0, 0x0003, 0x139f, 0x0010, 0x05ff,
-	0x0001, 0xb0e0, 0x0003, 0x1396, 0x0000, 0xc00e, 0x0000, 0x05fe,
-	0x0013, 0x639c, 0x0000, 0x050d, 0x0005, 0x0002, 0x0000, 0x0004,
-	0x0014, 0x041d, 0x0002, 0x3a47, 0x001b, 0x141c, 0x0003, 0x03b6,
-	0x0000, 0x09fe, 0x0013, 0x63b8, 0x0000, 0x090d, 0x0005, 0x0002,
-	0x0000, 0x0001, 0x0014, 0x0436, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xba09, 0x001b, 0x83a9, 0x0011, 0x03c8, 0x0010, 0x000f,
-	0x0000, 0xffb6, 0x0011, 0xb6e8, 0x0000, 0x0001, 0x0013, 0x14ca,
-	0x0011, 0xb6e8, 0x0000, 0x0002, 0x0003, 0x14ec, 0x0011, 0xb6e8,
-	0x0010, 0x0003, 0x0003, 0x15d7, 0x0014, 0x0806, 0x0013, 0x041c,
-	0x0010, 0x0bfe, 0x0013, 0x641c, 0x0010, 0x0b0d, 0x0005, 0x0002,
-	0x0000, 0x0002, 0x0014, 0x0436, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xba09, 0x001b, 0x83c5, 0x0000, 0xb930, 0x0005, 0x0031,
-	0x0010, 0x0021, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x83cb,
-	0x0001, 0xb0a8, 0x0000, 0x199a, 0x0003, 0x23d1, 0x0005, 0x00b0,
-	0x0000, 0x1999, 0x0012, 0xb050, 0x0000, 0xffb0, 0x0002, 0xff50,
-	0x0002, 0xff50, 0x0001, 0xb080, 0x0000, 0xffb0, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0006, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb00a, 0x001b, 0x83de, 0x0000, 0xb930,
-	0x0005, 0x0031, 0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x001b, 0x83e4, 0x0001, 0xb0c8, 0x0010, 0x00ff, 0x0001, 0xffe8,
-	0x0010, 0x0048, 0x001b, 0x1445, 0x0005, 0x0002, 0x0010, 0x0006,
-	0x0012, 0x0c10, 0x0010, 0xff0c, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0xb109, 0x001b, 0x83f5, 0x0000, 0xb10b, 0x000b, 0x63f9,
-	0x0010, 0xb10a, 0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x83fb,
-	0x0002, 0x032b, 0x0010, 0xff03, 0x0011, 0x0d88, 0x0010, 0x0011,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x030a, 0x000b, 0x8403,
-	0x0000, 0x11fe, 0x000b, 0x6408, 0x0000, 0x0d12, 0x0003, 0x0411,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0x1188, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0010, 0x0db0, 0x0015, 0x0033, 0x0000, 0xb00a,
-	0x001b, 0x8410, 0x0000, 0x0d11, 0x0013, 0x041c, 0x0000, 0x05fe,
-	0x0013, 0x641c, 0x0005, 0x0002, 0x0000, 0x0004, 0x0000, 0x050d,
-	0x0014, 0x041d, 0x0002, 0x3a47, 0x001b, 0x141c, 0x0014, 0x0806,
-	0x0003, 0x0049, 0x0001, 0xc7c8, 0x0010, 0x0028, 0x000b, 0x1435,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x000a,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x8427,
-	0x0002, 0xb04f, 0x0013, 0x1435, 0x0001, 0x0fe8, 0x0010, 0x0000,
-	0x0013, 0x1433, 0x0001, 0x0fe8, 0x0000, 0x0002, 0x0013, 0x1433,
-	0x0015, 0x003a, 0x0010, 0x8080, 0x0003, 0x0435, 0x0015, 0x003a,
-	0x0010, 0x4040, 0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0x0309, 0x001b, 0x843d, 0x0011, 0x0d88, 0x0010, 0x0005,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb909, 0x001b, 0x8443,
-	0x0017, 0x4000, 0x0005, 0x00b6, 0x0010, 0x0600, 0x0014, 0x0607,
-	0x0014, 0x04b4, 0x0000, 0xb05a, 0x0000, 0xb15b, 0x0005, 0x0054,
-	0x0010, 0x0829, 0x0010, 0x0d58, 0x0015, 0x0059, 0x0010, 0xffff,
-	0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x001e, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x000b, 0x8455, 0x0000, 0xb05c, 0x0005, 0x0031,
-	0x0000, 0x001f, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x845b,
-	0x0001, 0xb0c8, 0x0010, 0x000f, 0x001b, 0x1462, 0x0015, 0x00ff,
-	0x0010, 0x0005, 0x0003, 0x046a, 0x0002, 0xb040, 0x0003, 0x1467,
-	0x0015, 0x00ff, 0x0000, 0x0004, 0x0003, 0x046a, 0x0001, 0xb0c8,
-	0x0010, 0x0006, 0x0002, 0xff60, 0x0010, 0xffb2, 0x0011, 0x0d88,
-	0x0000, 0x0019, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109,
-	0x001b, 0x8470, 0x0012, 0xb170, 0x0011, 0xffc8, 0x0010, 0xff00,
-	0x0011, 0xb2d0, 0x0010, 0xff60, 0x0002, 0xb045, 0x0013, 0x147b,
-	0x0015, 0x00b2, 0x0000, 0x0002, 0x0013, 0x0485, 0x0002, 0xb046,
-	0x0003, 0x1480, 0x0015, 0x00b2, 0x0000, 0x0001, 0x0013, 0x0485,
-	0x0015, 0x00b2, 0x0010, 0x0000, 0x0000, 0xc0b0, 0x0010, 0xc0b1,
-	0x0003, 0x048b, 0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x002b,
-	0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x848a, 0x0010, 0xb16a,
-	0x0010, 0xb06b, 0x0000, 0xb261, 0x0015, 0x0044, 0x0010, 0x0018,
-	0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0x6241,
-	0x001b, 0x8494, 0x0003, 0x9495, 0x0015, 0x00a0, 0x0000, 0x0020,
-	0x0012, 0xd041, 0x001b, 0x1498, 0x0015, 0x00d1, 0x0010, 0x0202,
-	0x0003, 0x949c, 0x0000, 0x75ff, 0x0011, 0xffc8, 0x0000, 0x1804,
-	0x0001, 0xffd8, 0x0010, 0x0009, 0x0013, 0x94a2, 0x0000, 0xff75,
-	0x0013, 0x94a4, 0x0015, 0x00d1, 0x0000, 0x0200, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0001, 0xbd88, 0x0000, 0x0008, 0x0000, 0xff31,
-	0x0015, 0x00b1, 0x0010, 0x07d0, 0x0005, 0x00b0, 0x0010, 0x0009,
-	0x0015, 0x0033, 0x0000, 0xb012, 0x000b, 0x84b2, 0x0013, 0x041c,
-	0x0000, 0xba30, 0x0005, 0x0031, 0x0010, 0x0035, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x001b, 0x84b9, 0x0002, 0xb040, 0x0003, 0x14c7,
-	0x0000, 0xb7b0, 0x0000, 0xb9b1, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0000, 0x0013, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb012, 0x000b, 0x84c5, 0x0003, 0x04c9, 0x0010, 0xc0b1,
-	0x0000, 0xc0b0, 0x0017, 0x4000, 0x0005, 0x00b6, 0x0010, 0x0500,
-	0x0014, 0x0607, 0x0005, 0x0054, 0x0010, 0x0889, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x84d6, 0x0010, 0xb058,
-	0x0000, 0x0d59, 0x0000, 0xb930, 0x0005, 0x0031, 0x0000, 0x0023,
-	0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x84de, 0x0010, 0xb15c,
-	0x0010, 0xb05d, 0x0005, 0x0031, 0x0010, 0x002b, 0x0015, 0x0033,
-	0x0000, 0xb011, 0x001b, 0x84e5, 0x0000, 0xb15e, 0x0000, 0xb05f,
-	0x0003, 0x94e8, 0x0015, 0x00a0, 0x0010, 0x000c, 0x0003, 0x05ec,
-	0x0005, 0x00b6, 0x0000, 0x0700, 0x0014, 0x0607, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0009, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xb709, 0x000b, 0x84f6, 0x0012, 0xb749,
-	0x0013, 0x14fc, 0x0005, 0x0054, 0x0010, 0x0889, 0x0013, 0x04fe,
-	0x0005, 0x0054, 0x0010, 0x0898, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x001b, 0x8505, 0x0010, 0xb058, 0x0000, 0x0d59,
-	0x0001, 0xb9a8, 0x0010, 0x00f0, 0x000b, 0x252a, 0x0011, 0x0d88,
+	0x0012, 0x7849, 0x0003, 0x11d6, 0x0003, 0x0148, 0x0000, 0x0db8,
+	0x0012, 0x0345, 0x000b, 0x11d1, 0x0002, 0x033f, 0x0014, 0x0397,
+	0x0013, 0x0146, 0x0002, 0x033f, 0x0002, 0xff27, 0x0014, 0x0397,
+	0x0004, 0x0867, 0x0013, 0x0146, 0x0015, 0x00b8, 0x0000, 0x0001,
+	0x0015, 0x003a, 0x0010, 0x0101, 0x0004, 0x0867, 0x0013, 0x0157,
+	0x0001, 0x2bd8, 0x0010, 0x0000, 0x0000, 0xffba, 0x0003, 0xb1df,
+	0x0005, 0x002a, 0x0000, 0x0002, 0x0001, 0xbac8, 0x0000, 0x0700,
+	0x000b, 0x12cc, 0x0011, 0x15e8, 0x0000, 0x0002, 0x0013, 0x1242,
+	0x0011, 0x15e8, 0x0000, 0x0001, 0x0013, 0x11ee, 0x0005, 0x0015,
+	0x0010, 0x0000, 0x0013, 0x0225, 0x0005, 0x0015, 0x0010, 0x0000,
+	0x0002, 0xba43, 0x0003, 0x1226, 0x0003, 0xb1f2, 0x0005, 0x002a,
+	0x0000, 0x0004, 0x0012, 0xba42, 0x0003, 0x122c, 0x0012, 0x104b,
+	0x001b, 0x1225, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002,
+	0x0015, 0x0033, 0x0000, 0x1b2a, 0x001b, 0x81fe, 0x0011, 0x20d8,
+	0x0010, 0x0000, 0x0000, 0xffb0, 0x0001, 0x21d8, 0x0010, 0x0000,
+	0x0010, 0xffb1, 0x0001, 0x22d8, 0x0010, 0x0000, 0x0010, 0xffb2,
+	0x0011, 0x23d8, 0x0010, 0x0000, 0x0000, 0xffb3, 0x0001, 0x24d8,
+	0x0010, 0x0000, 0x0010, 0xffb4, 0x0011, 0x25d8, 0x0010, 0x0000,
+	0x0000, 0xffb5, 0x0001, 0x28d8, 0x0010, 0x0000, 0x0010, 0xffb8,
+	0x0011, 0x29d8, 0x0010, 0x0000, 0x0000, 0xffb9, 0x0000, 0x1a30,
+	0x0005, 0x0031, 0x0000, 0x0007, 0x0015, 0x0033, 0x0010, 0xb032,
+	0x001b, 0x821c, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0010, 0x000f,
+	0x0015, 0x0033, 0x0010, 0xb812, 0x000b, 0x8222, 0x0005, 0x0015,
+	0x0010, 0x0000, 0x0013, 0x0035, 0x0000, 0x1efe, 0x0003, 0x623a,
+	0x0014, 0x0271, 0x0000, 0x1efe, 0x000c, 0x6271, 0x0013, 0x0225,
+	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0020, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x001b, 0x8231, 0x0002, 0xb02f, 0x0000, 0xffb0,
+	0x0005, 0x0031, 0x0000, 0x0020, 0x0015, 0x0033, 0x0000, 0xb00a,
+	0x001b, 0x8238, 0x0003, 0x01f9, 0x0015, 0x00b8, 0x0010, 0x0005,
+	0x0004, 0x0867, 0x0000, 0x13b8, 0x0015, 0x003a, 0x0010, 0x0404,
+	0x0004, 0x0867, 0x0013, 0x0225, 0x0005, 0x0015, 0x0000, 0x0001,
+	0x0012, 0xba42, 0x0013, 0x1250, 0x0003, 0xb246, 0x0001, 0x2bd8,
+	0x0010, 0x0000, 0x0012, 0xff4f, 0x001b, 0x11dc, 0x0002, 0xba43,
+	0x001b, 0x122c, 0x0000, 0x1efe, 0x000c, 0x6271, 0x0013, 0x0225,
+	0x0001, 0x28d8, 0x0010, 0x0000, 0x0010, 0xffb8, 0x0011, 0x29d8,
+	0x0010, 0x0000, 0x0000, 0xffb9, 0x0014, 0x02e2, 0x0002, 0x3a42,
+	0x001b, 0x1225, 0x0000, 0x1c30, 0x0015, 0x00ff, 0x0000, 0x0002,
+	0x0002, 0x1f43, 0x001b, 0x1261, 0x0001, 0xff88, 0x0000, 0x0002,
+	0x0003, 0x0263, 0x0001, 0xff88, 0x0000, 0x0004, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x8266, 0x0000, 0xb0ff,
+	0x0011, 0x16a0, 0x0000, 0xff16, 0x000b, 0x24e2, 0x0002, 0xb100,
+	0x0013, 0x026e, 0x0010, 0xb1ff, 0x0001, 0x17a0, 0x0010, 0xff17,
+	0x0013, 0x022c, 0x0000, 0x16ff, 0x0001, 0x18a0, 0x0010, 0xff00,
+	0x000b, 0x2278, 0x0002, 0x1700, 0x0003, 0x12cb, 0x0013, 0x0279,
+	0x0010, 0x17ff, 0x0011, 0x19a0, 0x0003, 0x22cb, 0x0011, 0x00d0,
+	0x0003, 0x12cb, 0x0000, 0x1c30, 0x0000, 0x1b31, 0x0015, 0x0033,
+	0x0000, 0xb131, 0x000b, 0x8281, 0x0013, 0xb282, 0x0000, 0xb120,
+	0x0010, 0xb221, 0x0002, 0x1f43, 0x000b, 0x128e, 0x0010, 0xc022,
+	0x0000, 0xc023, 0x0000, 0xb324, 0x0000, 0xb425, 0x0010, 0xb3b5,
+	0x0000, 0xb4b6, 0x0013, 0x0292, 0x0000, 0xb322, 0x0000, 0xb423,
+	0x0000, 0xb524, 0x0010, 0xb625, 0x0003, 0xb292, 0x0005, 0x002a,
+	0x0000, 0x0001, 0x0012, 0x1500, 0x0000, 0xff15, 0x0000, 0x16ff,
+	0x0001, 0xb580, 0x0000, 0xff16, 0x001b, 0x229d, 0x0002, 0x1700,
+	0x0013, 0x029e, 0x0010, 0x17ff, 0x0001, 0xb680, 0x0010, 0xff17,
+	0x0012, 0x1e10, 0x0010, 0xff1e, 0x0013, 0x62cb, 0x0002, 0x1d00,
+	0x0010, 0xff1d, 0x0010, 0xc030, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x000b, 0x82a9, 0x0010, 0xb0fe, 0x001b, 0x62ca,
+	0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0001, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x000b, 0x82b1, 0x0010, 0xb0fe, 0x001b, 0x62b7,
+	0x0005, 0x00ce, 0x0010, 0x0005, 0x0013, 0x0829, 0x0010, 0xb01c,
+	0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0019, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x000b, 0x82bd, 0x0001, 0xb0c8, 0x0010, 0x00ff,
+	0x0000, 0xff1f, 0x0010, 0xc030, 0x0011, 0xbe80, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82c6, 0x0000, 0xb01d,
+	0x0010, 0x1dff, 0x0003, 0x02a5, 0x0000, 0xb01b, 0x0017, 0x4000,
+	0x0002, 0x3a41, 0x0013, 0x12d4, 0x0003, 0xb2ce, 0x0005, 0x002a,
+	0x0000, 0x0004, 0x0005, 0x0015, 0x0010, 0x0000, 0x0013, 0x0225,
+	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033,
+	0x0000, 0x1b2a, 0x001b, 0x82d9, 0x0015, 0x00b8, 0x0000, 0x0004,
+	0x0004, 0x0867, 0x0000, 0x13b8, 0x0015, 0x003a, 0x0010, 0x0404,
+	0x0004, 0x0867, 0x0013, 0x0039, 0x0002, 0x1e00, 0x0010, 0xff1e,
+	0x0012, 0x1d10, 0x0010, 0xff1d, 0x0010, 0xc030, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82ea, 0x0010, 0xb0fe,
+	0x000b, 0x630f, 0x0000, 0x1cff, 0x0001, 0x1ae0, 0x0013, 0x12f9,
+	0x0000, 0x1c30, 0x0005, 0x0031, 0x0010, 0x0000, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x000b, 0x82f5, 0x0010, 0xb0fe, 0x001b, 0x62f9,
+	0x0000, 0x1aff, 0x0000, 0xff1c, 0x0000, 0x1c30, 0x0005, 0x0031,
+	0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82ff,
+	0x0001, 0xb0c8, 0x0010, 0x000f, 0x0000, 0xff1f, 0x0001, 0xbf80,
+	0x0010, 0xff1d, 0x0010, 0xc030, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x001b, 0x8309, 0x0010, 0xb0fe, 0x000b, 0x630f,
+	0x0005, 0x00ce, 0x0010, 0x0006, 0x0013, 0x0829, 0x0000, 0xb01b,
+	0x0017, 0x4000, 0x0010, 0x79b0, 0x0000, 0xd0ff, 0x0012, 0xff40,
+	0x001b, 0x1039, 0x0015, 0x00d1, 0x0010, 0x0101, 0x0013, 0x9317,
+	0x0005, 0x0079, 0x0000, 0x0002, 0x0003, 0x931a, 0x0015, 0x00d1,
+	0x0000, 0x0100, 0x0010, 0x13fe, 0x0003, 0x634f, 0x0012, 0xb04e,
+	0x001b, 0x136f, 0x0012, 0x784a, 0x0013, 0x1375, 0x0000, 0x75ff,
+	0x0011, 0xffc8, 0x0010, 0x1800, 0x000b, 0x1375, 0x0001, 0x0fe8,
+	0x0000, 0x0001, 0x001b, 0x1333, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x1388, 0x0000, 0x000e, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0x8f0a, 0x000b, 0x8331, 0x0013, 0x037b, 0x0001, 0x0fe8,
+	0x0000, 0x0002, 0x000b, 0x133e, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0005, 0x0031, 0x0000, 0x001a, 0x0015, 0x0033, 0x0010, 0xc00a,
+	0x001b, 0x833c, 0x0013, 0x037b, 0x0001, 0x0fe8, 0x0010, 0x0000,
+	0x0013, 0x1345, 0x0005, 0x00ce, 0x0000, 0x0007, 0x0010, 0x0fcf,
+	0x0013, 0x0823, 0x0000, 0x13b8, 0x0002, 0x1045, 0x0003, 0x134d,
+	0x0012, 0x103f, 0x0002, 0xff27, 0x0014, 0x0397, 0x0004, 0x0867,
+	0x0003, 0x034f, 0x0012, 0x103f, 0x0014, 0x0397, 0x0015, 0x000f,
+	0x0010, 0x0000, 0x0002, 0x3944, 0x0013, 0x1358, 0x0015, 0x0039,
+	0x0000, 0x5040, 0x0015, 0x00b8, 0x0000, 0x0008, 0x0004, 0x0867,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88, 0x0010, 0x000c,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x835f,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x8363,
+	0x0010, 0xc014, 0x0000, 0xc013, 0x0000, 0xc010, 0x0002, 0x3a47,
+	0x0013, 0x136e, 0x0015, 0x003a, 0x0000, 0x8000, 0x0015, 0x003a,
+	0x0010, 0x4040, 0x0014, 0x082e, 0x0013, 0x0039, 0x0015, 0x00b8,
+	0x0010, 0x0003, 0x0015, 0x003a, 0x0010, 0x0202, 0x0004, 0x0867,
+	0x0003, 0x0367, 0x0015, 0x00b8, 0x0000, 0x0002, 0x0015, 0x003a,
+	0x0010, 0x0202, 0x0004, 0x0867, 0x0003, 0x0367, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0003, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8382, 0x0011, 0x1388,
+	0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a,
+	0x001b, 0x8388, 0x0010, 0xb0fe, 0x0013, 0x638d, 0x0000, 0xb012,
+	0x0003, 0x038f, 0x0010, 0xc012, 0x0010, 0xc011, 0x0012, 0x104b,
+	0x0013, 0x1345, 0x0002, 0x103b, 0x0010, 0xff03, 0x0005, 0x0002,
+	0x0010, 0x0000, 0x0000, 0xc00d, 0x0003, 0x0345, 0x0000, 0xffb0,
+	0x0010, 0xc3b1, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xb888,
+	0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012,
+	0x001b, 0x83a0, 0x0017, 0x4000, 0x0012, 0x3a43, 0x0003, 0x13b1,
+	0x0015, 0x003a, 0x0000, 0x0800, 0x0010, 0x0db0, 0x0013, 0x63b1,
+	0x0000, 0x0bff, 0x0001, 0xb0e0, 0x0013, 0x13da, 0x0010, 0x09ff,
+	0x0001, 0xb0e0, 0x0003, 0x13be, 0x0010, 0x05ff, 0x0001, 0xb0e0,
+	0x0013, 0x13b5, 0x0000, 0xc00e, 0x0000, 0x05fe, 0x0013, 0x63bb,
+	0x0000, 0x050d, 0x0005, 0x0002, 0x0000, 0x0004, 0x0014, 0x043c,
+	0x0002, 0x3a47, 0x001b, 0x143b, 0x0003, 0x03d5, 0x0000, 0x09fe,
+	0x0013, 0x63d7, 0x0000, 0x090d, 0x0005, 0x0002, 0x0000, 0x0001,
+	0x0014, 0x0455, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09,
+	0x000b, 0x83c8, 0x0011, 0x03c8, 0x0010, 0x000f, 0x0000, 0xffb6,
+	0x0011, 0xb6e8, 0x0000, 0x0001, 0x0003, 0x14ec, 0x0011, 0xb6e8,
+	0x0000, 0x0002, 0x0013, 0x150e, 0x0011, 0xb6e8, 0x0010, 0x0003,
+	0x0013, 0x15fd, 0x0014, 0x082e, 0x0013, 0x043b, 0x0010, 0x0bfe,
+	0x0013, 0x643b, 0x0010, 0x0b0d, 0x0005, 0x0002, 0x0000, 0x0002,
+	0x0014, 0x0455, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09,
+	0x001b, 0x83e4, 0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x0021,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x83ea, 0x0001, 0xb0a8,
+	0x0000, 0x199a, 0x0003, 0x23f0, 0x0005, 0x00b0, 0x0000, 0x1999,
+	0x0012, 0xb050, 0x0000, 0xffb0, 0x0002, 0xff50, 0x0002, 0xff50,
+	0x0001, 0xb080, 0x0000, 0xffb0, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x0d88, 0x0010, 0x0006, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xb00a, 0x000b, 0x83fd, 0x0000, 0xb930, 0x0005, 0x0031,
+	0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x8403,
+	0x0001, 0xb0c8, 0x0010, 0x00ff, 0x0001, 0xffe8, 0x0010, 0x0048,
+	0x001b, 0x1464, 0x0005, 0x0002, 0x0010, 0x0006, 0x0012, 0x0c10,
+	0x0010, 0xff0c, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109,
+	0x000b, 0x8414, 0x0000, 0xb10b, 0x001b, 0x6418, 0x0010, 0xb10a,
+	0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x841a, 0x0002, 0x032b,
+	0x0010, 0xff03, 0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0010, 0x030a, 0x000b, 0x8422, 0x0000, 0x11fe,
+	0x001b, 0x6427, 0x0000, 0x0d12, 0x0003, 0x0430, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0001, 0x1188, 0x0010, 0x0003, 0x0000, 0xff31,
+	0x0010, 0x0db0, 0x0015, 0x0033, 0x0000, 0xb00a, 0x001b, 0x842f,
+	0x0000, 0x0d11, 0x0013, 0x043b, 0x0000, 0x05fe, 0x0013, 0x643b,
+	0x0005, 0x0002, 0x0000, 0x0004, 0x0000, 0x050d, 0x0014, 0x043c,
+	0x0002, 0x3a47, 0x001b, 0x143b, 0x0014, 0x082e, 0x0003, 0x0049,
+	0x0001, 0xc7c8, 0x0010, 0x0028, 0x001b, 0x1454, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x000a, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8446, 0x0002, 0xb04f,
+	0x0003, 0x1454, 0x0001, 0x0fe8, 0x0010, 0x0000, 0x0003, 0x1452,
+	0x0001, 0x0fe8, 0x0000, 0x0002, 0x0003, 0x1452, 0x0015, 0x003a,
+	0x0010, 0x8080, 0x0013, 0x0454, 0x0015, 0x003a, 0x0010, 0x4040,
+	0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x0309,
+	0x000b, 0x845c, 0x0011, 0x0d88, 0x0010, 0x0005, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb909, 0x001b, 0x8462, 0x0017, 0x4000,
+	0x0005, 0x00b6, 0x0010, 0x0600, 0x0004, 0x062d, 0x0004, 0x04d6,
+	0x0000, 0xb05a, 0x0000, 0xb15b, 0x0005, 0x0054, 0x0010, 0x0829,
+	0x0010, 0x0d58, 0x0015, 0x0059, 0x0010, 0xffff, 0x0000, 0xb930,
+	0x0005, 0x0031, 0x0010, 0x001e, 0x0015, 0x0033, 0x0000, 0xb009,
+	0x000b, 0x8474, 0x0000, 0xb05c, 0x0005, 0x0031, 0x0000, 0x001f,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x847a, 0x0001, 0xb0c8,
+	0x0010, 0x000f, 0x000b, 0x1481, 0x0015, 0x00ff, 0x0010, 0x0005,
+	0x0013, 0x0489, 0x0002, 0xb040, 0x0003, 0x1486, 0x0015, 0x00ff,
+	0x0000, 0x0004, 0x0013, 0x0489, 0x0001, 0xb0c8, 0x0010, 0x0006,
+	0x0002, 0xff60, 0x0010, 0xffb2, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x0d88, 0x0000, 0x0019, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0010, 0xb109, 0x001b, 0x8491, 0x0012, 0xb170, 0x0011, 0xffc8,
+	0x0010, 0xff00, 0x0011, 0xb2d0, 0x0010, 0xff60, 0x0002, 0xb045,
+	0x0013, 0x149c, 0x0015, 0x00b2, 0x0000, 0x0002, 0x0003, 0x04a6,
+	0x0002, 0xb046, 0x0003, 0x14a1, 0x0015, 0x00b2, 0x0000, 0x0001,
+	0x0003, 0x04a6, 0x0015, 0x00b2, 0x0010, 0x0000, 0x0000, 0xc0b0,
+	0x0010, 0xc0b1, 0x0003, 0x04ac, 0x0000, 0xb930, 0x0005, 0x0031,
+	0x0010, 0x002b, 0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x84ab,
+	0x0010, 0xb16a, 0x0010, 0xb06b, 0x0000, 0xb261, 0x0015, 0x0044,
+	0x0010, 0x0018, 0x0000, 0xb930, 0x0005, 0x0031, 0x0000, 0x0023,
+	0x0015, 0x0033, 0x0000, 0x6241, 0x001b, 0x84b6, 0x0003, 0x94b7,
+	0x0015, 0x00a0, 0x0000, 0x0020, 0x0012, 0xd041, 0x001b, 0x14ba,
+	0x0015, 0x00d1, 0x0010, 0x0202, 0x0003, 0x94be, 0x0000, 0x75ff,
+	0x0011, 0xffc8, 0x0000, 0x1804, 0x0001, 0xffd8, 0x0010, 0x0009,
+	0x0013, 0x94c4, 0x0000, 0xff75, 0x0003, 0x94c6, 0x0015, 0x00d1,
+	0x0000, 0x0200, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88,
+	0x0000, 0x0008, 0x0000, 0xff31, 0x0015, 0x00b1, 0x0010, 0x07d0,
+	0x0005, 0x00b0, 0x0010, 0x0009, 0x0015, 0x0033, 0x0000, 0xb012,
+	0x000b, 0x84d4, 0x0013, 0x043b, 0x0000, 0xba30, 0x0005, 0x0031,
+	0x0010, 0x0035, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x84db,
+	0x0002, 0xb040, 0x0003, 0x14e9, 0x0000, 0xb7b0, 0x0000, 0xb9b1,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0013,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012, 0x000b, 0x84e7,
+	0x0003, 0x04eb, 0x0010, 0xc0b1, 0x0000, 0xc0b0, 0x0017, 0x4000,
+	0x0005, 0x00b6, 0x0010, 0x0500, 0x0004, 0x062d, 0x0005, 0x0054,
+	0x0010, 0x0889, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
+	0x001b, 0x84f8, 0x0010, 0xb058, 0x0000, 0x0d59, 0x0000, 0xb930,
+	0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0xb011,
+	0x001b, 0x8500, 0x0010, 0xb15c, 0x0010, 0xb05d, 0x0005, 0x0031,
+	0x0010, 0x002b, 0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x8507,
+	0x0000, 0xb15e, 0x0000, 0xb05f, 0x0013, 0x950a, 0x0015, 0x00a0,
+	0x0010, 0x000c, 0x0013, 0x0612, 0x0005, 0x00b6, 0x0000, 0x0700,
+	0x0004, 0x062d, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0010, 0x0009, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb709,
+	0x001b, 0x8518, 0x0012, 0xb749, 0x0003, 0x151e, 0x0005, 0x0054,
+	0x0010, 0x0889, 0x0003, 0x0520, 0x0005, 0x0054, 0x0010, 0x0898,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8527,
+	0x0010, 0xb058, 0x0000, 0x0d59, 0x0001, 0xb9a8, 0x0010, 0x00f0,
+	0x001b, 0x254e, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
 	0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x8510, 0x0001, 0xb0c8, 0x0000, 0xf700, 0x0000, 0xffb0,
-	0x0011, 0xb0e8, 0x0000, 0xf100, 0x0003, 0x1571, 0x0011, 0xb0e8,
-	0x0000, 0xf200, 0x0013, 0x1576, 0x0011, 0xb0e8, 0x0010, 0xf300,
-	0x0003, 0x1599, 0x0011, 0xb0e8, 0x0000, 0xf400, 0x0013, 0x159e,
-	0x0011, 0xb0e8, 0x0010, 0xf500, 0x0003, 0x1571, 0x0011, 0xb0e8,
-	0x0010, 0xf600, 0x0003, 0x15af, 0x0005, 0x00ce, 0x0010, 0x0009,
-	0x0000, 0xb0cf, 0x0013, 0x07fb, 0x0000, 0xb930, 0x0005, 0x0031,
-	0x0000, 0x0025, 0x0015, 0x0033, 0x0000, 0xb039, 0x000b, 0x852f,
-	0x0012, 0xb749, 0x0013, 0x1534, 0x0002, 0xb52c, 0x0000, 0xffb5,
+	0x000b, 0x8534, 0x0001, 0xb0c8, 0x0000, 0xf700, 0x0000, 0xffb0,
+	0x0011, 0xb0e8, 0x0000, 0xf100, 0x0003, 0x1595, 0x0011, 0xb0e8,
+	0x0000, 0xf200, 0x0003, 0x159a, 0x0011, 0xb0e8, 0x0010, 0xf300,
+	0x0013, 0x15bf, 0x0011, 0xb0e8, 0x0000, 0xf400, 0x0013, 0x15c4,
+	0x0011, 0xb0e8, 0x0010, 0xf500, 0x0003, 0x1595, 0x0011, 0xb0e8,
+	0x0010, 0xf600, 0x0013, 0x15d5, 0x0005, 0x00ce, 0x0010, 0x0009,
+	0x0000, 0xb0cf, 0x0013, 0x0823, 0x0000, 0xb930, 0x0005, 0x0031,
+	0x0000, 0x0025, 0x0015, 0x0033, 0x0000, 0xb039, 0x001b, 0x8553,
+	0x0012, 0xb749, 0x0013, 0x1558, 0x0002, 0xb52c, 0x0000, 0xffb5,
 	0x0000, 0xb162, 0x0000, 0xb063, 0x0005, 0x0031, 0x0000, 0x001f,
-	0x0015, 0x0033, 0x0000, 0xb309, 0x001b, 0x853a, 0x0001, 0xb3c8,
-	0x0010, 0x0003, 0x0003, 0x1542, 0x0010, 0xffb2, 0x0001, 0xffe8,
-	0x0010, 0x0003, 0x001b, 0x1544, 0x0000, 0xc2b7, 0x0003, 0x05cb,
-	0x0001, 0xb2e8, 0x0000, 0x0001, 0x0003, 0x154b, 0x0005, 0x00ce,
-	0x0010, 0x000a, 0x0010, 0xb2cf, 0x0013, 0x07fb, 0x0010, 0xb465,
+	0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x855e, 0x0001, 0xb3c8,
+	0x0010, 0x0003, 0x0003, 0x1566, 0x0010, 0xffb2, 0x0001, 0xffe8,
+	0x0010, 0x0003, 0x000b, 0x1568, 0x0000, 0xc2b7, 0x0003, 0x05f1,
+	0x0001, 0xb2e8, 0x0000, 0x0001, 0x0003, 0x156f, 0x0005, 0x00ce,
+	0x0010, 0x000a, 0x0010, 0xb2cf, 0x0013, 0x0823, 0x0010, 0xb465,
 	0x0010, 0xb667, 0x0015, 0x00b7, 0x0010, 0x0018, 0x0001, 0xb5c8,
-	0x0010, 0x0300, 0x0013, 0x1570, 0x0012, 0xb548, 0x0013, 0x1557,
+	0x0010, 0x0300, 0x0013, 0x1594, 0x0012, 0xb548, 0x0003, 0x157b,
 	0x0000, 0xb6ff, 0x0011, 0xb780, 0x0010, 0xffb7, 0x0002, 0xb549,
-	0x0003, 0x155c, 0x0010, 0xb4ff, 0x0011, 0xb780, 0x0010, 0xffb7,
+	0x0013, 0x1580, 0x0010, 0xb4ff, 0x0011, 0xb780, 0x0010, 0xffb7,
 	0x0015, 0x0044, 0x0010, 0x0018, 0x0005, 0x0031, 0x0000, 0x002c,
-	0x0015, 0x0033, 0x0000, 0x6841, 0x000b, 0x8562, 0x0015, 0x0044,
+	0x0015, 0x0033, 0x0000, 0x6841, 0x000b, 0x8586, 0x0015, 0x0044,
 	0x0000, 0x0019, 0x0005, 0x0031, 0x0000, 0x0034, 0x0015, 0x0033,
-	0x0000, 0x5029, 0x001b, 0x8569, 0x0015, 0x0044, 0x0000, 0x0008,
-	0x0011, 0xb7c8, 0x0010, 0x0003, 0x0013, 0x1570, 0x0010, 0xff55,
-	0x0003, 0x05cb, 0x0005, 0x00b5, 0x0000, 0x0008, 0x0015, 0x00b7,
-	0x0010, 0x0018, 0x0003, 0x05cb, 0x0011, 0x0d88, 0x0000, 0x000b,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x857b,
-	0x0010, 0xb1ff, 0x0001, 0xb0d0, 0x0003, 0x1584, 0x0005, 0x00b5,
-	0x0010, 0x0b02, 0x0010, 0xb062, 0x0010, 0xb163, 0x0003, 0x0586,
-	0x0005, 0x00b5, 0x0000, 0x0302, 0x0015, 0x0065, 0x0010, 0x0012,
-	0x0005, 0x0067, 0x0000, 0x0008, 0x0015, 0x006c, 0x0000, 0x7000,
-	0x0005, 0x006d, 0x0010, 0x0500, 0x0015, 0x006f, 0x0010, 0x000a,
-	0x0015, 0x0044, 0x0000, 0x0001, 0x0005, 0x0052, 0x0000, 0x2500,
-	0x0015, 0x0044, 0x0000, 0x0008, 0x0015, 0x00b7, 0x0000, 0x0032,
-	0x0003, 0x05cb, 0x0005, 0x00b5, 0x0010, 0x0028, 0x0015, 0x00b7,
-	0x0010, 0x0018, 0x0003, 0x05cb, 0x0005, 0x00b5, 0x0000, 0x0100,
-	0x0005, 0x0067, 0x0000, 0x0008, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0010, 0x0018, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x001b, 0x85a9, 0x0001, 0xb0c8, 0x0010, 0x00ff,
-	0x0015, 0x00b7, 0x0000, 0x0020, 0x0003, 0x05cb, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0005, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb609, 0x000b, 0x85b6, 0x0001, 0xb6c8,
-	0x0010, 0xff00, 0x0000, 0xffb0, 0x0015, 0x0033, 0x0000, 0xb00a,
-	0x000b, 0x85bc, 0x0001, 0xb6c8, 0x0010, 0x00ff, 0x0012, 0xff10,
-	0x001b, 0x15c5, 0x0000, 0xffb5, 0x0015, 0x00b7, 0x0010, 0x0018,
-	0x0003, 0x05cb, 0x0010, 0xff63, 0x0005, 0x00b5, 0x0000, 0x0800,
-	0x0015, 0x00b7, 0x0010, 0x0018, 0x0003, 0x05cb, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0009, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x85d2, 0x0010, 0xb561,
-	0x0013, 0x95d4, 0x0010, 0xb7a0, 0x0003, 0x05ec, 0x0005, 0x00b6,
-	0x0010, 0x0300, 0x0014, 0x0607, 0x0005, 0x0054, 0x0010, 0x0819,
-	0x0010, 0x0d58, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x001b, 0x85e4, 0x0000, 0xb059, 0x0003, 0x95e6, 0x0010, 0xc0a0,
-	0x0010, 0x71ff, 0x0002, 0xff28, 0x0010, 0xff71, 0x0003, 0x05ec,
-	0x0012, 0xd041, 0x000b, 0x15ec, 0x0015, 0x00d1, 0x0010, 0x0202,
-	0x0000, 0x75ff, 0x0011, 0xffc8, 0x0000, 0x1804, 0x0001, 0xffd8,
-	0x0010, 0x0009, 0x0013, 0x95f5, 0x0000, 0xff75, 0x0003, 0x95f7,
-	0x0015, 0x00d1, 0x0000, 0x0200, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0001, 0xbd88, 0x0000, 0x0008, 0x0000, 0xff31, 0x0005, 0x00b0,
-	0x0010, 0x0009, 0x0015, 0x00b1, 0x0010, 0x07d0, 0x0015, 0x0033,
-	0x0000, 0xb012, 0x001b, 0x8605, 0x0013, 0x041c, 0x0015, 0x0044,
-	0x0000, 0x0008, 0x0005, 0x0098, 0x0010, 0x0056, 0x0015, 0x0099,
-	0x0000, 0x9575, 0x0004, 0x07c2, 0x0000, 0xb096, 0x0012, 0xb270,
-	0x0010, 0xff56, 0x0014, 0x07e4, 0x0010, 0xb052, 0x0010, 0xb153,
-	0x0000, 0xb6ff, 0x0011, 0xb2d0, 0x0010, 0xff50, 0x0010, 0xb351,
-	0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0x1288,
-	0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0x1009,
-	0x000b, 0x8620, 0x0015, 0x000f, 0x0000, 0x0001, 0x0010, 0xc014,
-	0x0000, 0x1213, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388,
-	0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09,
-	0x000b, 0x862c, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388,
-	0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0x1a09,
-	0x000b, 0x8634, 0x0012, 0x104b, 0x000b, 0x163d, 0x0000, 0x1a30,
-	0x0005, 0x0031, 0x0000, 0x000b, 0x0015, 0x0033, 0x0000, 0x1621,
-	0x001b, 0x863c, 0x0010, 0x15fe, 0x000b, 0x665c, 0x0014, 0x0683,
-	0x0002, 0x3a42, 0x001b, 0x1682, 0x0001, 0x10c8, 0x0010, 0x000f,
-	0x000b, 0x16e5, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388,
-	0x0000, 0x0008, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x864c, 0x0011, 0xb0e8, 0x0010, 0x0009, 0x0003, 0x1653,
-	0x0011, 0xb0e8, 0x0000, 0x0001, 0x001b, 0x1681, 0x0011, 0x1388,
-	0x0010, 0x000a, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x8658, 0x0002, 0xb04f, 0x001b, 0x1678, 0x0013, 0x0681,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8663,
-	0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x8666, 0x0010, 0xb0fe,
-	0x0003, 0x666b, 0x0000, 0xb012, 0x0003, 0x066d, 0x0010, 0xc012,
-	0x0010, 0xc011, 0x0015, 0x000f, 0x0010, 0x0000, 0x0002, 0x3944,
-	0x0013, 0x1676, 0x0015, 0x0039, 0x0000, 0x5040, 0x0015, 0x00b8,
-	0x0000, 0x0008, 0x0004, 0x083d, 0x0000, 0xc013, 0x0013, 0x0682,
-	0x0010, 0x02fe, 0x0013, 0x667d, 0x0015, 0x003a, 0x0010, 0x2020,
-	0x0013, 0x0682, 0x0015, 0x003a, 0x0000, 0x2000, 0x0015, 0x003a,
-	0x0010, 0x1010, 0x0004, 0x0829, 0x0013, 0x0055, 0x0013, 0xb683,
-	0x0005, 0x002a, 0x0000, 0x0004, 0x0000, 0xba30, 0x0005, 0x0031,
-	0x0010, 0x001b, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x868b,
-	0x0000, 0xc02c, 0x0000, 0xb02d, 0x0012, 0x104b, 0x0003, 0x16a6,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033,
-	0x0000, 0xb129, 0x001b, 0x8695, 0x0000, 0xb120, 0x0010, 0xb221,
-	0x0000, 0xb322, 0x0000, 0xb423, 0x0000, 0xb524, 0x0000, 0xc025,
-	0x0010, 0xb526, 0x0010, 0xc027, 0x0010, 0xb516, 0x0010, 0xc017,
-	0x0000, 0xb518, 0x0000, 0xc019, 0x0010, 0xc028, 0x0000, 0xc029,
-	0x0010, 0xc01e, 0x0003, 0x06dc, 0x0012, 0x1044, 0x0013, 0x16d6,
-	0x0002, 0x1034, 0x0000, 0xff10, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b29, 0x001b, 0x86af,
-	0x0000, 0x1c30, 0x0000, 0x1b31, 0x0015, 0x0033, 0x0000, 0xb131,
-	0x001b, 0x86b4, 0x0002, 0x1f43, 0x001b, 0x16bb, 0x0010, 0xb3b5,
-	0x0000, 0xb4b6, 0x0000, 0xc0b3, 0x0010, 0xc0b4, 0x0000, 0xb120,
-	0x0010, 0xb221, 0x0000, 0xb322, 0x0000, 0xb423, 0x0000, 0xb524,
-	0x0010, 0xb625, 0x0010, 0xb516, 0x0000, 0xb617, 0x0000, 0x1826,
-	0x0000, 0x1927, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0010, 0x000f,
-	0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x86ca, 0x0000, 0xb028,
-	0x0000, 0xb129, 0x0012, 0x1e10, 0x0010, 0xff1e, 0x0003, 0x66dc,
-	0x0002, 0x1d00, 0x0010, 0xff1d, 0x0004, 0x028a, 0x0002, 0x3a42,
-	0x0013, 0x16dc, 0x0013, 0x06e4, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b79, 0x001b, 0x86db,
-	0x0013, 0xb6dc, 0x0005, 0x002a, 0x0000, 0x0001, 0x0005, 0x0015,
-	0x0000, 0x0001, 0x0000, 0x1efe, 0x0013, 0x66e4, 0x0003, 0x0256,
-	0x0017, 0x4000, 0x0000, 0xba30, 0x0005, 0x0031, 0x0010, 0x001b,
-	0x0015, 0x0033, 0x0010, 0xb051, 0x000b, 0x86ea, 0x0000, 0xb0a3,
-	0x0010, 0xb697, 0x0010, 0xb946, 0x0015, 0x00a5, 0x0000, 0x0010,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x0002,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb509, 0x000b, 0x86f7,
-	0x0014, 0x07e4, 0x0004, 0x07d3, 0x0012, 0xb470, 0x0010, 0xffb4,
-	0x0010, 0xb48e, 0x0010, 0xb08a, 0x0010, 0xb18b, 0x0012, 0x104d,
-	0x0003, 0x1702, 0x0013, 0x072f, 0x0012, 0x104b, 0x0003, 0x1715,
-	0x0005, 0x008c, 0x0010, 0x0829, 0x0010, 0xc08d, 0x0001, 0xb2d8,
-	0x0010, 0x0600, 0x0010, 0xff88, 0x0010, 0xb389, 0x0000, 0x1390,
-	0x0010, 0xb591, 0x0000, 0xc08f, 0x0010, 0x1ab9, 0x0014, 0x04b4,
-	0x0013, 0x9710, 0x0010, 0xb092, 0x0010, 0xb193, 0x0013, 0x9713,
-	0x0013, 0x072a, 0x0005, 0x008c, 0x0000, 0x0809, 0x0015, 0x008d,
-	0x0000, 0x0008, 0x0001, 0xb2d8, 0x0000, 0x0100, 0x0010, 0xff88,
+	0x0000, 0x5029, 0x001b, 0x858d, 0x0015, 0x0044, 0x0000, 0x0008,
+	0x0011, 0xb7c8, 0x0010, 0x0003, 0x0013, 0x1594, 0x0010, 0xff55,
+	0x0003, 0x05f1, 0x0005, 0x00b5, 0x0000, 0x0008, 0x0015, 0x00b7,
+	0x0010, 0x0018, 0x0003, 0x05f1, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x0d88, 0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xb011, 0x000b, 0x85a1, 0x0010, 0xb1ff, 0x0001, 0xb0d0,
+	0x0003, 0x15aa, 0x0005, 0x00b5, 0x0010, 0x0b02, 0x0010, 0xb062,
+	0x0010, 0xb163, 0x0013, 0x05ac, 0x0005, 0x00b5, 0x0000, 0x0302,
+	0x0015, 0x0065, 0x0010, 0x0012, 0x0005, 0x0067, 0x0000, 0x0008,
+	0x0015, 0x006c, 0x0000, 0x7000, 0x0005, 0x006d, 0x0010, 0x0500,
+	0x0015, 0x006f, 0x0010, 0x000a, 0x0015, 0x0044, 0x0000, 0x0001,
+	0x0005, 0x0052, 0x0000, 0x2500, 0x0015, 0x0044, 0x0000, 0x0008,
+	0x0015, 0x00b7, 0x0000, 0x0032, 0x0003, 0x05f1, 0x0005, 0x00b5,
+	0x0010, 0x0028, 0x0015, 0x00b7, 0x0010, 0x0018, 0x0003, 0x05f1,
+	0x0005, 0x00b5, 0x0000, 0x0100, 0x0005, 0x0067, 0x0000, 0x0008,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0018,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x85cf,
+	0x0001, 0xb0c8, 0x0010, 0x00ff, 0x0015, 0x00b7, 0x0000, 0x0020,
+	0x0003, 0x05f1, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb609,
+	0x000b, 0x85dc, 0x0001, 0xb6c8, 0x0010, 0xff00, 0x0000, 0xffb0,
+	0x0015, 0x0033, 0x0000, 0xb00a, 0x001b, 0x85e2, 0x0001, 0xb6c8,
+	0x0010, 0x00ff, 0x0012, 0xff10, 0x001b, 0x15eb, 0x0000, 0xffb5,
+	0x0015, 0x00b7, 0x0010, 0x0018, 0x0003, 0x05f1, 0x0010, 0xff63,
+	0x0005, 0x00b5, 0x0000, 0x0800, 0x0015, 0x00b7, 0x0010, 0x0018,
+	0x0003, 0x05f1, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0010, 0x0009, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
+	0x000b, 0x85f8, 0x0010, 0xb561, 0x0013, 0x95fa, 0x0010, 0xb7a0,
+	0x0013, 0x0612, 0x0005, 0x00b6, 0x0010, 0x0300, 0x0004, 0x062d,
+	0x0005, 0x0054, 0x0010, 0x0819, 0x0010, 0x0d58, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x860a, 0x0000, 0xb059,
+	0x0013, 0x960c, 0x0010, 0xc0a0, 0x0010, 0x71ff, 0x0002, 0xff28,
+	0x0010, 0xff71, 0x0013, 0x0612, 0x0012, 0xd041, 0x001b, 0x1612,
+	0x0015, 0x00d1, 0x0010, 0x0202, 0x0000, 0x75ff, 0x0011, 0xffc8,
+	0x0000, 0x1804, 0x0001, 0xffd8, 0x0010, 0x0009, 0x0013, 0x961b,
+	0x0000, 0xff75, 0x0013, 0x961d, 0x0015, 0x00d1, 0x0000, 0x0200,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88, 0x0000, 0x0008,
+	0x0000, 0xff31, 0x0005, 0x00b0, 0x0010, 0x0009, 0x0015, 0x00b1,
+	0x0010, 0x07d0, 0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x862b,
+	0x0013, 0x043b, 0x0015, 0x0044, 0x0000, 0x0008, 0x0005, 0x0098,
+	0x0010, 0x0056, 0x0015, 0x0099, 0x0000, 0x9575, 0x0004, 0x07ea,
+	0x0000, 0xb096, 0x0012, 0xb270, 0x0010, 0xff56, 0x0014, 0x080c,
+	0x0010, 0xb052, 0x0010, 0xb153, 0x0000, 0xb6ff, 0x0011, 0xb2d0,
+	0x0010, 0xff50, 0x0010, 0xb351, 0x0017, 0x4000, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0001, 0x1288, 0x0010, 0x0011, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0x1009, 0x000b, 0x8646, 0x0015, 0x000f,
+	0x0000, 0x0001, 0x0010, 0xc014, 0x0000, 0x1213, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x0004, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xba09, 0x000b, 0x8652, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0005, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0x1a09, 0x001b, 0x865a, 0x0012, 0x104b,
+	0x001b, 0x1663, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x000b,
+	0x0015, 0x0033, 0x0000, 0x1621, 0x000b, 0x8662, 0x0010, 0x15fe,
+	0x000b, 0x6682, 0x0004, 0x06a9, 0x0002, 0x3a42, 0x000b, 0x16a8,
+	0x0001, 0x10c8, 0x0010, 0x000f, 0x001b, 0x170b, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x0008, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8672, 0x0011, 0xb0e8,
+	0x0010, 0x0009, 0x0013, 0x1679, 0x0011, 0xb0e8, 0x0000, 0x0001,
+	0x000b, 0x16a7, 0x0011, 0x1388, 0x0010, 0x000a, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x867e, 0x0002, 0xb04f,
+	0x000b, 0x169e, 0x0003, 0x06a7, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x1388, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x000b, 0x8689, 0x0015, 0x0033, 0x0010, 0xc00a,
+	0x000b, 0x868c, 0x0010, 0xb0fe, 0x0003, 0x6691, 0x0000, 0xb012,
+	0x0013, 0x0693, 0x0010, 0xc012, 0x0010, 0xc011, 0x0015, 0x000f,
+	0x0010, 0x0000, 0x0002, 0x3944, 0x0003, 0x169c, 0x0015, 0x0039,
+	0x0000, 0x5040, 0x0015, 0x00b8, 0x0000, 0x0008, 0x0004, 0x0867,
+	0x0000, 0xc013, 0x0003, 0x06a8, 0x0010, 0x02fe, 0x0013, 0x66a3,
+	0x0015, 0x003a, 0x0010, 0x2020, 0x0003, 0x06a8, 0x0015, 0x003a,
+	0x0000, 0x2000, 0x0015, 0x003a, 0x0010, 0x1010, 0x0014, 0x0853,
+	0x0013, 0x0055, 0x0003, 0xb6a9, 0x0005, 0x002a, 0x0000, 0x0004,
+	0x0000, 0xba30, 0x0005, 0x0031, 0x0010, 0x001b, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x001b, 0x86b1, 0x0000, 0xc02c, 0x0000, 0xb02d,
+	0x0012, 0x104b, 0x0003, 0x16cc, 0x0000, 0x1a30, 0x0005, 0x0031,
+	0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0xb129, 0x001b, 0x86bb,
+	0x0000, 0xb120, 0x0010, 0xb221, 0x0000, 0xb322, 0x0000, 0xb423,
+	0x0000, 0xb524, 0x0000, 0xc025, 0x0010, 0xb526, 0x0010, 0xc027,
+	0x0010, 0xb516, 0x0010, 0xc017, 0x0000, 0xb518, 0x0000, 0xc019,
+	0x0010, 0xc028, 0x0000, 0xc029, 0x0010, 0xc01e, 0x0013, 0x0702,
+	0x0012, 0x1044, 0x0003, 0x16fc, 0x0002, 0x1034, 0x0000, 0xff10,
+	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033,
+	0x0000, 0x1b29, 0x000b, 0x86d5, 0x0000, 0x1c30, 0x0000, 0x1b31,
+	0x0015, 0x0033, 0x0000, 0xb131, 0x000b, 0x86da, 0x0002, 0x1f43,
+	0x001b, 0x16e1, 0x0010, 0xb3b5, 0x0000, 0xb4b6, 0x0000, 0xc0b3,
+	0x0010, 0xc0b4, 0x0000, 0xb120, 0x0010, 0xb221, 0x0000, 0xb322,
+	0x0000, 0xb423, 0x0000, 0xb524, 0x0010, 0xb625, 0x0010, 0xb516,
+	0x0000, 0xb617, 0x0000, 0x1826, 0x0000, 0x1927, 0x0000, 0x1a30,
+	0x0005, 0x0031, 0x0010, 0x000f, 0x0015, 0x0033, 0x0000, 0xb011,
+	0x001b, 0x86f0, 0x0000, 0xb028, 0x0000, 0xb129, 0x0012, 0x1e10,
+	0x0010, 0xff1e, 0x0013, 0x6702, 0x0002, 0x1d00, 0x0010, 0xff1d,
+	0x0014, 0x02a5, 0x0002, 0x3a42, 0x0003, 0x1702, 0x0003, 0x070a,
+	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033,
+	0x0000, 0x1b79, 0x001b, 0x8701, 0x0003, 0xb702, 0x0005, 0x002a,
+	0x0000, 0x0001, 0x0005, 0x0015, 0x0000, 0x0001, 0x0000, 0x1efe,
+	0x0003, 0x670a, 0x0003, 0x0271, 0x0017, 0x4000, 0x0000, 0xba30,
+	0x0005, 0x0031, 0x0010, 0x001b, 0x0015, 0x0033, 0x0010, 0xb051,
+	0x001b, 0x8710, 0x0000, 0xb0a3, 0x0010, 0xb697, 0x0010, 0xb946,
+	0x0015, 0x00a5, 0x0000, 0x0010, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x1388, 0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xb509, 0x000b, 0x871d, 0x0014, 0x080c, 0x0004, 0x07fb,
+	0x0012, 0xb470, 0x0010, 0xffb4, 0x0010, 0xb48e, 0x0010, 0xb08a,
+	0x0010, 0xb18b, 0x0012, 0x104d, 0x0013, 0x1728, 0x0003, 0x0755,
+	0x0012, 0x104b, 0x0003, 0x173b, 0x0005, 0x008c, 0x0010, 0x0829,
+	0x0010, 0xc08d, 0x0001, 0xb2d8, 0x0010, 0x0600, 0x0010, 0xff88,
 	0x0010, 0xb389, 0x0000, 0x1390, 0x0010, 0xb591, 0x0000, 0xc08f,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0010, 0x000f, 0x0015, 0x0033,
-	0x0000, 0xb011, 0x001b, 0x8725, 0x0013, 0x9726, 0x0000, 0xb192,
-	0x0000, 0xb093, 0x0013, 0x9729, 0x0010, 0x19a1, 0x0000, 0x18a2,
-	0x0015, 0x00b1, 0x0010, 0x0096, 0x0013, 0x079e, 0x0000, 0xb590,
-	0x0010, 0x1391, 0x0001, 0x10c8, 0x0010, 0x000f, 0x0001, 0xffe8,
-	0x0010, 0x0005, 0x0013, 0x1756, 0x0001, 0xb2d8, 0x0000, 0x0700,
-	0x0010, 0xff88, 0x0010, 0xb389, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x1388, 0x0010, 0x0009, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x000b, 0x8741, 0x0002, 0xb049, 0x0003, 0x1749,
-	0x0005, 0x008c, 0x0010, 0x0889, 0x0015, 0x00b1, 0x0010, 0x0096,
-	0x0003, 0x074d, 0x0005, 0x008c, 0x0010, 0x0898, 0x0015, 0x00b1,
-	0x0000, 0x0092, 0x0010, 0xc08d, 0x0000, 0xc08f, 0x0013, 0x974f,
-	0x0000, 0xc092, 0x0010, 0xc093, 0x0013, 0x9752, 0x0010, 0x19a1,
-	0x0000, 0x18a2, 0x0013, 0x079e, 0x0001, 0xb2d8, 0x0000, 0x0100,
-	0x0010, 0xff88, 0x0010, 0xb389, 0x0005, 0x008c, 0x0010, 0x0880,
-	0x0015, 0x008d, 0x0000, 0x0008, 0x0011, 0x1388, 0x0000, 0x000e,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x8763,
+	0x0010, 0x1ab9, 0x0004, 0x04d6, 0x0003, 0x9736, 0x0010, 0xb092,
+	0x0010, 0xb193, 0x0003, 0x9739, 0x0003, 0x0750, 0x0005, 0x008c,
+	0x0000, 0x0809, 0x0015, 0x008d, 0x0000, 0x0008, 0x0001, 0xb2d8,
+	0x0000, 0x0100, 0x0010, 0xff88, 0x0010, 0xb389, 0x0000, 0x1390,
+	0x0010, 0xb591, 0x0000, 0xc08f, 0x0000, 0x1a30, 0x0005, 0x0031,
+	0x0010, 0x000f, 0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x874b,
+	0x0013, 0x974c, 0x0000, 0xb192, 0x0000, 0xb093, 0x0013, 0x974f,
+	0x0010, 0x19a1, 0x0000, 0x18a2, 0x0015, 0x00b1, 0x0010, 0x0096,
+	0x0003, 0x07c6, 0x0000, 0xb590, 0x0010, 0x1391, 0x0001, 0x10c8,
+	0x0010, 0x000f, 0x0001, 0xffe8, 0x0010, 0x0005, 0x0003, 0x177c,
+	0x0001, 0xb2d8, 0x0000, 0x0700, 0x0010, 0xff88, 0x0010, 0xb389,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0009,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8767,
+	0x0002, 0xb049, 0x0013, 0x176f, 0x0005, 0x008c, 0x0010, 0x0889,
+	0x0015, 0x00b1, 0x0010, 0x0096, 0x0013, 0x0773, 0x0005, 0x008c,
+	0x0010, 0x0898, 0x0015, 0x00b1, 0x0000, 0x0092, 0x0010, 0xc08d,
+	0x0000, 0xc08f, 0x0013, 0x9775, 0x0000, 0xc092, 0x0010, 0xc093,
+	0x0003, 0x9778, 0x0010, 0x19a1, 0x0000, 0x18a2, 0x0003, 0x07c6,
+	0x0001, 0xb2d8, 0x0000, 0x0100, 0x0010, 0xff88, 0x0010, 0xb389,
+	0x0005, 0x008c, 0x0010, 0x0880, 0x0015, 0x008d, 0x0000, 0x0008,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000e,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x878b,
 	0x0010, 0xb08f, 0x0000, 0xb590, 0x0010, 0x1391, 0x0000, 0x1a30,
 	0x0005, 0x0031, 0x0000, 0x000d, 0x0015, 0x0033, 0x0000, 0xb021,
-	0x000b, 0x876c, 0x0013, 0x976d, 0x0010, 0xb392, 0x0010, 0xb293,
-	0x0013, 0x9770, 0x0000, 0xb1a1, 0x0010, 0xb0a2, 0x0015, 0x0030,
+	0x001b, 0x8794, 0x0003, 0x9795, 0x0010, 0xb392, 0x0010, 0xb293,
+	0x0013, 0x9798, 0x0000, 0xb1a1, 0x0010, 0xb0a2, 0x0015, 0x0030,
 	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000b, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xb211, 0x001b, 0x877a, 0x0000, 0xb3ff,
-	0x0001, 0xb080, 0x0000, 0xffb3, 0x000b, 0x2781, 0x0002, 0xb200,
-	0x0003, 0x0782, 0x0010, 0xb2ff, 0x0011, 0xb180, 0x0010, 0xffb2,
+	0x0015, 0x0033, 0x0010, 0xb211, 0x001b, 0x87a2, 0x0000, 0xb3ff,
+	0x0001, 0xb080, 0x0000, 0xffb3, 0x000b, 0x27a9, 0x0002, 0xb200,
+	0x0003, 0x07aa, 0x0010, 0xb2ff, 0x0011, 0xb180, 0x0010, 0xffb2,
 	0x0011, 0x1388, 0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0xb212, 0x001b, 0x8789, 0x0015, 0x00b1, 0x0000, 0x0092,
-	0x0002, 0x104c, 0x0013, 0x179c, 0x0011, 0xc2e8, 0x0010, 0x000c,
-	0x001b, 0x1794, 0x0015, 0x00ff, 0x0000, 0x0800, 0x0003, 0x079c,
-	0x0011, 0xc2e8, 0x0000, 0x0020, 0x000b, 0x179a, 0x0015, 0x00ff,
-	0x0010, 0x1800, 0x0003, 0x079c, 0x0015, 0x00ff, 0x0000, 0x1000,
+	0x0010, 0xb212, 0x000b, 0x87b1, 0x0015, 0x00b1, 0x0000, 0x0092,
+	0x0002, 0x104c, 0x0003, 0x17c4, 0x0011, 0xc2e8, 0x0010, 0x000c,
+	0x001b, 0x17bc, 0x0015, 0x00ff, 0x0000, 0x0800, 0x0013, 0x07c4,
+	0x0011, 0xc2e8, 0x0000, 0x0020, 0x001b, 0x17c2, 0x0015, 0x00ff,
+	0x0010, 0x1800, 0x0013, 0x07c4, 0x0015, 0x00ff, 0x0000, 0x1000,
 	0x0011, 0xb1d0, 0x0010, 0xffb1, 0x0015, 0x009a, 0x0010, 0x0036,
-	0x0005, 0x009b, 0x0000, 0x95d5, 0x0012, 0xd041, 0x001b, 0x17a2,
-	0x0015, 0x00d1, 0x0010, 0x0202, 0x0003, 0x97a6, 0x0012, 0x104e,
-	0x0003, 0x17ab, 0x0012, 0xb12f, 0x0010, 0xffb1, 0x0000, 0xb175,
-	0x0003, 0x97ac, 0x0015, 0x00d1, 0x0000, 0x0200, 0x0001, 0x19c8,
-	0x0010, 0xfff0, 0x001b, 0x17b5, 0x0015, 0x00b1, 0x0010, 0x07d0,
-	0x0003, 0x07b7, 0x0015, 0x00b1, 0x0000, 0x1b58, 0x0005, 0x00b0,
+	0x0005, 0x009b, 0x0000, 0x95d5, 0x0012, 0xd041, 0x000b, 0x17ca,
+	0x0015, 0x00d1, 0x0010, 0x0202, 0x0013, 0x97ce, 0x0012, 0x104e,
+	0x0003, 0x17d3, 0x0012, 0xb12f, 0x0010, 0xffb1, 0x0000, 0xb175,
+	0x0003, 0x97d4, 0x0015, 0x00d1, 0x0000, 0x0200, 0x0001, 0x19c8,
+	0x0010, 0xfff0, 0x000b, 0x17dd, 0x0015, 0x00b1, 0x0010, 0x07d0,
+	0x0013, 0x07df, 0x0015, 0x00b1, 0x0000, 0x1b58, 0x0005, 0x00b0,
 	0x0010, 0x0009, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88,
 	0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012,
-	0x000b, 0x87c0, 0x0013, 0x0682, 0x0000, 0xba30, 0x0005, 0x0031,
-	0x0010, 0x0021, 0x0015, 0x0033, 0x0010, 0xb019, 0x001b, 0x87c7,
+	0x000b, 0x87e8, 0x0003, 0x06a8, 0x0000, 0xba30, 0x0005, 0x0031,
+	0x0010, 0x0021, 0x0015, 0x0033, 0x0010, 0xb019, 0x001b, 0x87ef,
 	0x0002, 0xb200, 0x0011, 0xffc8, 0x0010, 0x00ff, 0x0010, 0xffb2,
 	0x0010, 0xb2b7, 0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033,
-	0x0010, 0xb20a, 0x000b, 0x87d1, 0x0017, 0x4000, 0x0000, 0xba30,
+	0x0010, 0xb20a, 0x000b, 0x87f9, 0x0017, 0x4000, 0x0000, 0xba30,
 	0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033, 0x0010, 0xb409,
-	0x000b, 0x87d8, 0x0002, 0xb400, 0x0011, 0xffc8, 0x0010, 0x00ff,
+	0x000b, 0x8800, 0x0002, 0xb400, 0x0011, 0xffc8, 0x0010, 0x00ff,
 	0x0010, 0xffb4, 0x0010, 0xb4b7, 0x0005, 0x0031, 0x0000, 0x0023,
-	0x0015, 0x0033, 0x0010, 0xb40a, 0x000b, 0x87e2, 0x0017, 0x4000,
-	0x0000, 0xba30, 0x0001, 0xc7c8, 0x0000, 0x0020, 0x000b, 0x17f0,
+	0x0015, 0x0033, 0x0010, 0xb40a, 0x000b, 0x880a, 0x0017, 0x4000,
+	0x0000, 0xba30, 0x0001, 0xc7c8, 0x0000, 0x0020, 0x000b, 0x1818,
 	0x0005, 0x0031, 0x0010, 0x0028, 0x0015, 0x0033, 0x0010, 0xb209,
-	0x001b, 0x87ec, 0x0011, 0xb2c8, 0x0000, 0xff80, 0x0013, 0x17f3,
-	0x0010, 0xc4b0, 0x0010, 0xc5b1, 0x0003, 0x07f5, 0x0010, 0xc6b1,
+	0x000b, 0x8814, 0x0011, 0xb2c8, 0x0000, 0xff80, 0x0013, 0x181b,
+	0x0010, 0xc4b0, 0x0010, 0xc5b1, 0x0003, 0x081d, 0x0010, 0xc6b1,
 	0x0000, 0xc0b0, 0x0005, 0x0031, 0x0000, 0x0004, 0x0015, 0x0033,
-	0x0010, 0xb211, 0x000b, 0x87f9, 0x0017, 0x4000, 0x0015, 0x00b8,
-	0x0010, 0x0009, 0x0015, 0x003a, 0x0010, 0x0707, 0x0004, 0x083d,
+	0x0010, 0xb211, 0x000b, 0x8821, 0x0017, 0x4000, 0x0015, 0x00b8,
+	0x0010, 0x0009, 0x0015, 0x003a, 0x0010, 0x0707, 0x0004, 0x0867,
 	0x0013, 0x002d, 0x0015, 0x00b8, 0x0010, 0x0009, 0x0015, 0x003a,
-	0x0010, 0x0707, 0x0013, 0x083d, 0x0014, 0x0114, 0x0015, 0x0030,
+	0x0010, 0x0707, 0x0013, 0x0867, 0x0014, 0x0114, 0x0015, 0x0030,
 	0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0004, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xba09, 0x001b, 0x880e, 0x0004, 0x07c2,
+	0x0015, 0x0033, 0x0000, 0xba09, 0x000b, 0x8836, 0x0004, 0x07ea,
 	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0010,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a, 0x000b, 0x8817,
-	0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0x0309, 0x000b, 0x881d, 0x0002, 0x0327, 0x0010, 0xffb2,
-	0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0xb20a, 0x001b, 0x8825, 0x0015, 0x00b8, 0x0010, 0x0006,
-	0x0013, 0x083d, 0x0004, 0x0126, 0x0004, 0x07c2, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x0010, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xb20a, 0x001b, 0x8832, 0x0012, 0x1027,
-	0x0010, 0xffb2, 0x0011, 0x1388, 0x0010, 0x0011, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xb20a, 0x000b, 0x883a, 0x0015, 0x00b8,
-	0x0000, 0x0007, 0x0003, 0x483d, 0x0000, 0xb838, 0x0017, 0x4000,
-	0xa4bc, 0xa221
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a, 0x000b, 0x883f,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0011,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x0309, 0x000b, 0x8847,
+	0x0002, 0x0327, 0x0010, 0xffb2, 0x0011, 0x0d88, 0x0010, 0x0011,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a, 0x001b, 0x884f,
+	0x0015, 0x00b8, 0x0010, 0x0006, 0x0013, 0x0867, 0x0004, 0x0126,
+	0x0004, 0x07ea, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388,
+	0x0000, 0x0010, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a,
+	0x000b, 0x885c, 0x0012, 0x1027, 0x0010, 0xffb2, 0x0011, 0x1388,
+	0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a,
+	0x001b, 0x8864, 0x0015, 0x00b8, 0x0000, 0x0007, 0x0003, 0x4867,
+	0x0000, 0xb838, 0x0017, 0x4000, 0xa317, 0x2238
 };
-unsigned short xseqipx_code_length01 = 0x1082;
+unsigned short xseqipx_code_length01 = 0x10d6;
--- diff/drivers/scsi/qla2xxx/ql6312.c	2004-05-19 22:12:14.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql6312.c	2004-07-01 21:32:43.000000000 +0100
@@ -9,7 +9,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 
-#include "qla_os.h"
 #include "qla_def.h"
 
 static char qla_driver_name[] = "qla6312";
--- diff/drivers/scsi/qla2xxx/ql6312_fw.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql6312_fw.c	2004-07-01 21:32:43.000000000 +0100
@@ -18,7 +18,7 @@
  *************************************************************************/
 
 /*
- *	Firmware Version 3.02.28 (13:56 Apr 03, 2004)
+ *	Firmware Version 3.02.30 (07:52 Jun 16, 2004)
  */
 
 #ifdef UNIQUE_FW_NAME
@@ -28,15 +28,15 @@
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned char fw2300flx_version_str[] = {3, 2,28};
+unsigned char fw2300flx_version_str[] = {3, 2,30};
 #else
-unsigned char firmware_version[] = {3, 2,28};
+unsigned char firmware_version[] = {3, 2,30};
 #endif
 
 #ifdef UNIQUE_FW_NAME
-#define fw2300flx_VERSION_STRING "3.02.28"
+#define fw2300flx_VERSION_STRING "3.02.30"
 #else
-#define FW_VERSION_STRING "3.02.28"
+#define FW_VERSION_STRING "3.02.30"
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -50,12 +50,12 @@
 #else
 unsigned short risc_code01[] = { 
 #endif
-	0x0470, 0x0000, 0x0000, 0xd59a, 0x0000, 0x0003, 0x0002, 0x001c,
+	0x0470, 0x0000, 0x0000, 0xd5bb, 0x0000, 0x0003, 0x0002, 0x001e,
 	0x0317, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
 	0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
 	0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972,
 	0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-	0x332e, 0x3032, 0x2e32, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9,
+	0x332e, 0x3032, 0x2e33, 0x3020, 0x2020, 0x2020, 0x2400, 0x20a9,
 	0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f,
 	0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001,
 	0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000,
@@ -64,171 +64,171 @@
 	0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00,
 	0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001,
 	0x0000, 0x20c1, 0x0004, 0x20c9, 0x1bff, 0x2059, 0x0000, 0x2b78,
-	0x7883, 0x0004, 0x2089, 0x2b4e, 0x2051, 0x1800, 0x2a70, 0x20e1,
+	0x7883, 0x0004, 0x2089, 0x2b50, 0x2051, 0x1800, 0x2a70, 0x20e1,
 	0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e2f, 0x2029,
 	0x2480, 0x2031, 0xffff, 0x2039, 0x2450, 0x2021, 0x0050, 0x20e9,
 	0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9,
 	0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff,
 	0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8,
 	0x4104, 0x8001, 0x1de0, 0x756a, 0x766e, 0x7766, 0x7472, 0x7476,
-	0x00e6, 0x2071, 0x1a98, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x716c,
+	0x00e6, 0x2071, 0x1a97, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x716c,
 	0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001,
 	0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x716c, 0x3400,
 	0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009,
 	0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f,
 	0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e,
 	0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f03, 0x080c,
-	0x5cdf, 0x080c, 0x9dc8, 0x080c, 0x10ba, 0x080c, 0x129f, 0x080c,
-	0x1a53, 0x080c, 0x0d46, 0x080c, 0x103f, 0x080c, 0x3238, 0x080c,
-	0x72aa, 0x080c, 0x661d, 0x080c, 0x7f73, 0x080c, 0x230a, 0x080c,
-	0x82a0, 0x080c, 0x7933, 0x080c, 0x2147, 0x080c, 0x227b, 0x080c,
-	0x22ff, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880,
+	0x5ce8, 0x080c, 0x9dd8, 0x080c, 0x10ba, 0x080c, 0x129f, 0x080c,
+	0x1a55, 0x080c, 0x0d46, 0x080c, 0x103f, 0x080c, 0x323a, 0x080c,
+	0x7293, 0x080c, 0x6626, 0x080c, 0x7f5c, 0x080c, 0x230c, 0x080c,
+	0x8289, 0x080c, 0x791c, 0x080c, 0x2149, 0x080c, 0x227d, 0x080c,
+	0x2301, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880,
 	0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833,
 	0x0010, 0x0e04, 0x0911, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001,
 	0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2071, 0x1800, 0x7003,
 	0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, 0x1168, 0x080c,
-	0x499e, 0x080c, 0x325f, 0x080c, 0x731b, 0x080c, 0x6add, 0x080c,
-	0x7f9c, 0x080c, 0x2ab8, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941,
+	0x49ae, 0x080c, 0x3261, 0x080c, 0x7304, 0x080c, 0x6ad6, 0x080c,
+	0x7f85, 0x080c, 0x2aba, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941,
 	0x0ad8, 0x093e, 0x0b8f, 0x0d45, 0x0d45, 0x0d45, 0x080c, 0x0db4,
 	0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000, 0x9086, 0x0001,
-	0x1904, 0x0aab, 0x080c, 0x0e71, 0x080c, 0x6fb2, 0x0150, 0x080c,
-	0x6fd5, 0x15a0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a,
-	0x0468, 0x080c, 0x6ee4, 0x7000, 0x9086, 0x0001, 0x1904, 0x0aab,
-	0x7094, 0x9086, 0x0028, 0x1904, 0x0aab, 0x080c, 0x7f6b, 0x080c,
-	0x7f5d, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827,
-	0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, 0x2011, 0x6e33, 0x080c,
-	0x8038, 0x2011, 0x6e26, 0x080c, 0x810c, 0x2011, 0x5b3a, 0x080c,
-	0x8038, 0x2011, 0x8030, 0x901e, 0x7392, 0x04d0, 0x080c, 0x53e7,
-	0x2079, 0x0100, 0x7844, 0x9005, 0x1904, 0x0aab, 0x2011, 0x5b3a,
-	0x080c, 0x8038, 0x2011, 0x6e33, 0x080c, 0x8038, 0x2011, 0x6e26,
-	0x080c, 0x810c, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000,
-	0x7840, 0x9084, 0xfffb, 0x7842, 0x2001, 0x1977, 0x2004, 0x9005,
-	0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, 0x5c87, 0x00ce, 0x0804,
-	0x0aab, 0x780f, 0x006b, 0x7a28, 0x080c, 0x6fba, 0x0118, 0x9295,
+	0x1904, 0x0aab, 0x080c, 0x0e71, 0x080c, 0x6f9b, 0x0150, 0x080c,
+	0x6fbe, 0x15a0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a,
+	0x0468, 0x080c, 0x6ecd, 0x7000, 0x9086, 0x0001, 0x1904, 0x0aab,
+	0x7094, 0x9086, 0x0028, 0x1904, 0x0aab, 0x080c, 0x7f54, 0x080c,
+	0x7f46, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827,
+	0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, 0x2011, 0x6e1c, 0x080c,
+	0x8021, 0x2011, 0x6e0f, 0x080c, 0x80f5, 0x2011, 0x5b43, 0x080c,
+	0x8021, 0x2011, 0x8030, 0x901e, 0x7392, 0x04d0, 0x080c, 0x53f0,
+	0x2079, 0x0100, 0x7844, 0x9005, 0x1904, 0x0aab, 0x2011, 0x5b43,
+	0x080c, 0x8021, 0x2011, 0x6e1c, 0x080c, 0x8021, 0x2011, 0x6e0f,
+	0x080c, 0x80f5, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000,
+	0x7840, 0x9084, 0xfffb, 0x7842, 0x2001, 0x1976, 0x2004, 0x9005,
+	0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, 0x5c90, 0x00ce, 0x0804,
+	0x0aab, 0x780f, 0x006b, 0x7a28, 0x080c, 0x6fa3, 0x0118, 0x9295,
 	0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a, 0x2011, 0x8010, 0x73d4,
-	0x2001, 0x1978, 0x2003, 0x0001, 0x080c, 0x297e, 0x080c, 0x48d9,
+	0x2001, 0x1977, 0x2003, 0x0001, 0x080c, 0x2980, 0x080c, 0x48e9,
 	0x7244, 0xc284, 0x7246, 0x2001, 0x180c, 0x200c, 0xc1ac, 0xc1cc,
-	0x2102, 0x080c, 0x963f, 0x2011, 0x0004, 0x080c, 0xbb27, 0x080c,
-	0x6461, 0x080c, 0x6fb2, 0x1120, 0x080c, 0x29c2, 0x02e0, 0x0400,
-	0x080c, 0x5c8e, 0x0140, 0x7093, 0x0001, 0x70cf, 0x0000, 0x080c,
-	0x55b4, 0x0804, 0x0aab, 0x080c, 0x5386, 0xd094, 0x0188, 0x2011,
-	0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x538a, 0xd0d4, 0x1118,
-	0x080c, 0x29c2, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x0088,
-	0x080c, 0x538a, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd,
-	0x0040, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x655a,
-	0x0008, 0x2012, 0x080c, 0x6520, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e,
-	0x00a8, 0x707b, 0x0000, 0x080c, 0x6fb2, 0x1130, 0x70ac, 0x9005,
-	0x1168, 0x080c, 0xbf63, 0x0050, 0x080c, 0xbf63, 0x70d8, 0xd09c,
-	0x1128, 0x70ac, 0x9005, 0x0110, 0x080c, 0x5c64, 0x70e3, 0x0000,
-	0x70df, 0x0000, 0x70a3, 0x0000, 0x080c, 0x29ca, 0x0228, 0x2011,
-	0x0101, 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x6fb2, 0x1178,
-	0x9016, 0x0016, 0x2009, 0x0002, 0x2019, 0x193e, 0x211a, 0x001e,
+	0x2102, 0x080c, 0x9640, 0x2011, 0x0004, 0x080c, 0xbb3c, 0x080c,
+	0x646a, 0x080c, 0x6f9b, 0x1120, 0x080c, 0x29c4, 0x02e0, 0x0400,
+	0x080c, 0x5c97, 0x0140, 0x7093, 0x0001, 0x70cf, 0x0000, 0x080c,
+	0x55bd, 0x0804, 0x0aab, 0x080c, 0x538f, 0xd094, 0x0188, 0x2011,
+	0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x5393, 0xd0d4, 0x1118,
+	0x080c, 0x29c4, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x0088,
+	0x080c, 0x5393, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd,
+	0x0040, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x6563,
+	0x0008, 0x2012, 0x080c, 0x6529, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e,
+	0x00a8, 0x707b, 0x0000, 0x080c, 0x6f9b, 0x1130, 0x70ac, 0x9005,
+	0x1168, 0x080c, 0xbf7d, 0x0050, 0x080c, 0xbf7d, 0x70d8, 0xd09c,
+	0x1128, 0x70ac, 0x9005, 0x0110, 0x080c, 0x5c6d, 0x70e3, 0x0000,
+	0x70df, 0x0000, 0x70a3, 0x0000, 0x080c, 0x29cc, 0x0228, 0x2011,
+	0x0101, 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x6f9b, 0x1178,
+	0x9016, 0x0016, 0x2009, 0x0002, 0x2019, 0x193d, 0x211a, 0x001e,
 	0x705b, 0xffff, 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019,
-	0x193e, 0x201b, 0x0000, 0x2079, 0x1853, 0x7804, 0xd0ac, 0x0108,
-	0xc295, 0x72da, 0x080c, 0x6fb2, 0x0118, 0x9296, 0x0004, 0x0548,
-	0x2011, 0x0001, 0x080c, 0xbb27, 0x70a7, 0x0000, 0x70ab, 0xffff,
+	0x193d, 0x201b, 0x0000, 0x2079, 0x1853, 0x7804, 0xd0ac, 0x0108,
+	0xc295, 0x72da, 0x080c, 0x6f9b, 0x0118, 0x9296, 0x0004, 0x0548,
+	0x2011, 0x0001, 0x080c, 0xbb3c, 0x70a7, 0x0000, 0x70ab, 0xffff,
 	0x7003, 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085,
-	0x0003, 0x782a, 0x00fe, 0x080c, 0x2dbb, 0x2011, 0x0005, 0x080c,
-	0x9771, 0x080c, 0x8973, 0x080c, 0x6fb2, 0x0148, 0x00c6, 0x2061,
+	0x0003, 0x782a, 0x00fe, 0x080c, 0x2dbd, 0x2011, 0x0005, 0x080c,
+	0x9772, 0x080c, 0x896d, 0x080c, 0x6f9b, 0x0148, 0x00c6, 0x2061,
 	0x0100, 0x0016, 0x2009, 0x0002, 0x61e2, 0x001e, 0x00ce, 0x012e,
 	0x0420, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x00f6,
 	0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a,
-	0x00fe, 0x2011, 0x0005, 0x080c, 0x9771, 0x080c, 0x8973, 0x080c,
-	0x6fb2, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x2009, 0x0002,
+	0x00fe, 0x2011, 0x0005, 0x080c, 0x9772, 0x080c, 0x896d, 0x080c,
+	0x6f9b, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x2009, 0x0002,
 	0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6,
-	0x080c, 0x6fb2, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782,
-	0x080c, 0x6fb2, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff,
+	0x080c, 0x6f9b, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782,
+	0x080c, 0x6f9b, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff,
 	0x0138, 0x9180, 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc,
-	0x090c, 0x30d5, 0x8108, 0x1f04, 0x0abf, 0x707b, 0x0000, 0x707c,
+	0x090c, 0x30d7, 0x8108, 0x1f04, 0x0abf, 0x707b, 0x0000, 0x707c,
 	0x9084, 0x00ff, 0x707e, 0x70af, 0x0000, 0x00be, 0x00ce, 0x0005,
 	0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904,
-	0x0b8c, 0x70a8, 0x9086, 0xffff, 0x0130, 0x080c, 0x2dbb, 0x080c,
-	0x8973, 0x0804, 0x0b8c, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0540,
+	0x0b8c, 0x70a8, 0x9086, 0xffff, 0x0130, 0x080c, 0x2dbd, 0x080c,
+	0x896d, 0x0804, 0x0b8c, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0540,
 	0xd084, 0x0530, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e,
-	0xd08c, 0x01f0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, 0x2f46,
-	0x080c, 0x8973, 0x70d8, 0xd094, 0x1904, 0x0b8c, 0x2011, 0x0001,
-	0x080c, 0xc212, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2f80,
-	0x080c, 0x8973, 0x0804, 0x0b8c, 0x70e0, 0x9005, 0x1904, 0x0b8c,
+	0xd08c, 0x01f0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, 0x2f48,
+	0x080c, 0x896d, 0x70d8, 0xd094, 0x1904, 0x0b8c, 0x2011, 0x0001,
+	0x080c, 0xc22c, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2f82,
+	0x080c, 0x896d, 0x0804, 0x0b8c, 0x70e0, 0x9005, 0x1904, 0x0b8c,
 	0x70a4, 0x9005, 0x1904, 0x0b8c, 0x70d8, 0xd0a4, 0x0118, 0xd0b4,
-	0x0904, 0x0b8c, 0x080c, 0x6520, 0x1904, 0x0b8c, 0x080c, 0x6573,
-	0x1904, 0x0b8c, 0x080c, 0x655a, 0x01c0, 0x0156, 0x00c6, 0x20a9,
-	0x007f, 0x900e, 0x0016, 0x080c, 0x623e, 0x1118, 0xb800, 0xd0ec,
+	0x0904, 0x0b8c, 0x080c, 0x6529, 0x1904, 0x0b8c, 0x080c, 0x657c,
+	0x1904, 0x0b8c, 0x080c, 0x6563, 0x01c0, 0x0156, 0x00c6, 0x20a9,
+	0x007f, 0x900e, 0x0016, 0x080c, 0x6247, 0x1118, 0xb800, 0xd0ec,
 	0x1138, 0x001e, 0x8108, 0x1f04, 0x0b32, 0x00ce, 0x015e, 0x0028,
 	0x001e, 0x00ce, 0x015e, 0x0804, 0x0b8c, 0x0006, 0x2001, 0x0103,
-	0x2003, 0x006b, 0x000e, 0x2011, 0x1984, 0x080c, 0x0f73, 0x2011,
-	0x199e, 0x080c, 0x0f73, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003,
-	0x70ab, 0xffff, 0x080c, 0x0e53, 0x9006, 0x080c, 0x260c, 0x0036,
-	0x0046, 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4a76, 0x004e,
-	0x003e, 0x00f6, 0x2079, 0x0100, 0x080c, 0x6fd5, 0x0150, 0x080c,
-	0x6fb2, 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf,
-	0x782a, 0x00fe, 0x2001, 0x19b9, 0x2004, 0x9086, 0x0005, 0x1120,
-	0x2011, 0x0000, 0x080c, 0x9771, 0x2011, 0x0000, 0x080c, 0x977b,
-	0x080c, 0x8973, 0x080c, 0x8a4e, 0x012e, 0x00be, 0x0005, 0x0016,
+	0x2003, 0x006b, 0x000e, 0x2011, 0x1983, 0x080c, 0x0f73, 0x2011,
+	0x199d, 0x080c, 0x0f73, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003,
+	0x70ab, 0xffff, 0x080c, 0x0e53, 0x9006, 0x080c, 0x260e, 0x0036,
+	0x0046, 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4a86, 0x004e,
+	0x003e, 0x00f6, 0x2079, 0x0100, 0x080c, 0x6fbe, 0x0150, 0x080c,
+	0x6f9b, 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf,
+	0x782a, 0x00fe, 0x2001, 0x19b8, 0x2004, 0x9086, 0x0005, 0x1120,
+	0x2011, 0x0000, 0x080c, 0x9772, 0x2011, 0x0000, 0x080c, 0x977c,
+	0x080c, 0x896d, 0x080c, 0x8a4a, 0x012e, 0x00be, 0x0005, 0x0016,
 	0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904,
-	0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5c4d, 0x7940,
+	0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5c56, 0x7940,
 	0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040,
 	0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954,
-	0xd1ac, 0x1904, 0x0c1c, 0x2001, 0x1978, 0x2004, 0x9005, 0x1518,
-	0x080c, 0x2a45, 0x1148, 0x2001, 0x0001, 0x080c, 0x29ad, 0x2001,
-	0x0001, 0x080c, 0x2990, 0x00b8, 0x080c, 0x2a4d, 0x1138, 0x9006,
-	0x080c, 0x29ad, 0x9006, 0x080c, 0x2990, 0x0068, 0x080c, 0x2a55,
-	0x1d50, 0x2001, 0x1969, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c,
-	0x27a7, 0x0804, 0x0cfc, 0x080c, 0x6fc3, 0x0148, 0x080c, 0x6fd5,
-	0x1118, 0x080c, 0x72a5, 0x0050, 0x080c, 0x6fba, 0x0dd0, 0x080c,
-	0x72a0, 0x080c, 0x7296, 0x080c, 0x6ee4, 0x0058, 0x080c, 0x6fb2,
-	0x0140, 0x2009, 0x00f8, 0x080c, 0x5c4d, 0x7843, 0x0090, 0x7843,
-	0x0010, 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x6fb2,
+	0xd1ac, 0x1904, 0x0c1c, 0x2001, 0x1977, 0x2004, 0x9005, 0x1518,
+	0x080c, 0x2a47, 0x1148, 0x2001, 0x0001, 0x080c, 0x29af, 0x2001,
+	0x0001, 0x080c, 0x2992, 0x00b8, 0x080c, 0x2a4f, 0x1138, 0x9006,
+	0x080c, 0x29af, 0x9006, 0x080c, 0x2992, 0x0068, 0x080c, 0x2a57,
+	0x1d50, 0x2001, 0x1968, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c,
+	0x27a9, 0x0804, 0x0cfc, 0x080c, 0x6fac, 0x0148, 0x080c, 0x6fbe,
+	0x1118, 0x080c, 0x728e, 0x0050, 0x080c, 0x6fa3, 0x0dd0, 0x080c,
+	0x7289, 0x080c, 0x727f, 0x080c, 0x6ecd, 0x0058, 0x080c, 0x6f9b,
+	0x0140, 0x2009, 0x00f8, 0x080c, 0x5c56, 0x7843, 0x0090, 0x7843,
+	0x0010, 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x6f9b,
 	0x0138, 0x7824, 0xd0ac, 0x1904, 0x0d01, 0x1f04, 0x0bfb, 0x0070,
-	0x7824, 0x080c, 0x6fcc, 0x0118, 0xd0ac, 0x1904, 0x0d01, 0x9084,
+	0x7824, 0x080c, 0x6fb5, 0x0118, 0xd0ac, 0x1904, 0x0d01, 0x9084,
 	0x1800, 0x0d98, 0x7003, 0x0001, 0x0804, 0x0d01, 0x2001, 0x0001,
-	0x080c, 0x260c, 0x0804, 0x0d14, 0x2001, 0x1978, 0x2004, 0x9005,
-	0x1518, 0x080c, 0x2a45, 0x1148, 0x2001, 0x0001, 0x080c, 0x29ad,
-	0x2001, 0x0001, 0x080c, 0x2990, 0x00b8, 0x080c, 0x2a4d, 0x1138,
-	0x9006, 0x080c, 0x29ad, 0x9006, 0x080c, 0x2990, 0x0068, 0x080c,
-	0x2a55, 0x1d50, 0x2001, 0x1969, 0x2004, 0xd0fc, 0x0108, 0x0020,
-	0x080c, 0x27a7, 0x0804, 0x0cfc, 0x7850, 0x9085, 0x0040, 0x7852,
-	0x7938, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2a5d, 0x9085,
+	0x080c, 0x260e, 0x0804, 0x0d14, 0x2001, 0x1977, 0x2004, 0x9005,
+	0x1518, 0x080c, 0x2a47, 0x1148, 0x2001, 0x0001, 0x080c, 0x29af,
+	0x2001, 0x0001, 0x080c, 0x2992, 0x00b8, 0x080c, 0x2a4f, 0x1138,
+	0x9006, 0x080c, 0x29af, 0x9006, 0x080c, 0x2992, 0x0068, 0x080c,
+	0x2a57, 0x1d50, 0x2001, 0x1968, 0x2004, 0xd0fc, 0x0108, 0x0020,
+	0x080c, 0x27a9, 0x0804, 0x0cfc, 0x7850, 0x9085, 0x0040, 0x7852,
+	0x7938, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2a5f, 0x9085,
 	0x2000, 0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c55, 0x080c,
-	0x80ec, 0x1f04, 0x0c55, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf,
-	0x7852, 0x793a, 0x080c, 0x6fc3, 0x0148, 0x080c, 0x6fd5, 0x1118,
-	0x080c, 0x72a5, 0x0050, 0x080c, 0x6fba, 0x0dd0, 0x080c, 0x72a0,
-	0x080c, 0x7296, 0x080c, 0x6ee4, 0x0020, 0x2009, 0x00f8, 0x080c,
-	0x5c4d, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c7b, 0x7850, 0x9085,
-	0x1400, 0x7852, 0x080c, 0x6fb2, 0x0120, 0x7843, 0x0090, 0x7843,
-	0x0010, 0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x80ec, 0x7820,
-	0xd09c, 0x1588, 0x080c, 0x6fb2, 0x0904, 0x0ce1, 0x7824, 0xd0ac,
-	0x1904, 0x0d01, 0x080c, 0x6fd5, 0x1530, 0x0046, 0x2021, 0x0320,
-	0x8421, 0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2a5d, 0x7824,
+	0x80d5, 0x1f04, 0x0c55, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf,
+	0x7852, 0x793a, 0x080c, 0x6fac, 0x0148, 0x080c, 0x6fbe, 0x1118,
+	0x080c, 0x728e, 0x0050, 0x080c, 0x6fa3, 0x0dd0, 0x080c, 0x7289,
+	0x080c, 0x727f, 0x080c, 0x6ecd, 0x0020, 0x2009, 0x00f8, 0x080c,
+	0x5c56, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c7b, 0x7850, 0x9085,
+	0x1400, 0x7852, 0x080c, 0x6f9b, 0x0120, 0x7843, 0x0090, 0x7843,
+	0x0010, 0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x80d5, 0x7820,
+	0xd09c, 0x1588, 0x080c, 0x6f9b, 0x0904, 0x0ce1, 0x7824, 0xd0ac,
+	0x1904, 0x0d01, 0x080c, 0x6fbe, 0x1530, 0x0046, 0x2021, 0x0320,
+	0x8421, 0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2a5f, 0x7824,
 	0x9084, 0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810,
 	0x2004, 0x9084, 0x9000, 0x0110, 0x080c, 0x0d22, 0x8421, 0x1158,
-	0x1d04, 0x0cbc, 0x080c, 0x80ec, 0x080c, 0x72a0, 0x080c, 0x7296,
+	0x1d04, 0x0cbc, 0x080c, 0x80d5, 0x080c, 0x7289, 0x080c, 0x727f,
 	0x7003, 0x0001, 0x04f0, 0x8319, 0x1940, 0x1d04, 0x0cc9, 0x080c,
-	0x80ec, 0x2009, 0x196c, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
+	0x80d5, 0x2009, 0x196b, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
 	0x1178, 0x200b, 0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c,
-	0x2a3e, 0x7924, 0x080c, 0x2a5d, 0xd19c, 0x0110, 0x080c, 0x297e,
-	0x00d8, 0x080c, 0x6fc3, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c,
-	0x6f8a, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2a5d,
-	0x7824, 0x080c, 0x6fcc, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800,
-	0x0950, 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x260c,
+	0x2a40, 0x7924, 0x080c, 0x2a5f, 0xd19c, 0x0110, 0x080c, 0x2980,
+	0x00d8, 0x080c, 0x6fac, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c,
+	0x6f73, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2a5f,
+	0x7824, 0x080c, 0x6fb5, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800,
+	0x0950, 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x260e,
 	0x0078, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d,
 	0x0002, 0x7906, 0x7827, 0x0048, 0x7828, 0x9085, 0x0028, 0x782a,
-	0x7850, 0x9085, 0x0400, 0x7852, 0x2001, 0x1978, 0x2003, 0x0000,
+	0x7850, 0x9085, 0x0400, 0x7852, 0x2001, 0x1977, 0x2003, 0x0000,
 	0x9006, 0x78f2, 0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e,
 	0x001e, 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x80ec, 0x015e,
+	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x80d5, 0x015e,
 	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x001e,
 	0x000e, 0x0005, 0x00e6, 0x2071, 0x1894, 0x7004, 0x9086, 0x0001,
-	0x1110, 0x080c, 0x325f, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061,
-	0x197c, 0x2063, 0x0003, 0x6007, 0x0002, 0x600b, 0x001c, 0x600f,
-	0x0317, 0x2001, 0x194d, 0x900e, 0x2102, 0x7192, 0x2001, 0x0100,
+	0x1110, 0x080c, 0x3261, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061,
+	0x197b, 0x2063, 0x0003, 0x6007, 0x0002, 0x600b, 0x001e, 0x600f,
+	0x0317, 0x2001, 0x194c, 0x900e, 0x2102, 0x7192, 0x2001, 0x0100,
 	0x2004, 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, 0x0008, 0x715a,
-	0x7063, 0xffff, 0x717a, 0x717e, 0x080c, 0xbf63, 0x70e7, 0x00c0,
-	0x2061, 0x193d, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f,
+	0x7063, 0xffff, 0x717a, 0x717e, 0x080c, 0xbf7d, 0x70e7, 0x00c0,
+	0x2061, 0x193c, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f,
 	0x0200, 0x6013, 0x00ff, 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0,
-	0x2061, 0x1945, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200,
-	0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, 0x195a,
+	0x2061, 0x1944, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200,
+	0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, 0x1959,
 	0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020,
-	0x2001, 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x623e, 0x1178,
+	0x2001, 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x6247, 0x1178,
 	0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00,
 	0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, 0x8108,
 	0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x2079,
@@ -236,18 +236,18 @@
 	0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e,
 	0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, 0x7886,
 	0x3900, 0x789a, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156, 0x00d6,
-	0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1a72, 0x7a08, 0x226a,
-	0x2069, 0x1a73, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a, 0x782c,
-	0x2019, 0x1a80, 0x201a, 0x2019, 0x1a83, 0x9016, 0x7808, 0xd09c,
-	0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1a98, 0x0108,
-	0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019, 0x1a81,
-	0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069, 0x1a52,
+	0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1a71, 0x7a08, 0x226a,
+	0x2069, 0x1a72, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a, 0x782c,
+	0x2019, 0x1a7f, 0x201a, 0x2019, 0x1a82, 0x9016, 0x7808, 0xd09c,
+	0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1a97, 0x0108,
+	0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019, 0x1a80,
+	0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069, 0x1a51,
 	0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68, 0x8318,
 	0x1f04, 0x0e03, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079, 0x1800,
 	0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x0180, 0x2001, 0x19ea, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b,
+	0x0180, 0x2001, 0x19e9, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b,
 	0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003,
-	0x1001, 0x080c, 0x5395, 0x1108, 0x0099, 0x0cd8, 0x0005, 0x918c,
+	0x1001, 0x080c, 0x539e, 0x1108, 0x0099, 0x0cd8, 0x0005, 0x918c,
 	0x03ff, 0x2001, 0x0003, 0x2004, 0x9084, 0x0600, 0x1118, 0x918d,
 	0x2800, 0x0010, 0x918d, 0x2000, 0x2001, 0x017f, 0x2102, 0x0005,
 	0x0026, 0x0126, 0x2011, 0x0080, 0x080c, 0x0ecb, 0x20a9, 0x0900,
@@ -258,9 +258,9 @@
 	0x70eb, 0x0000, 0x1128, 0x70eb, 0x0fa0, 0x080c, 0x0edd, 0x002e,
 	0x0005, 0x0026, 0x080c, 0x0ed8, 0x0128, 0xd0a4, 0x1138, 0x2011,
 	0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, 0x0edd, 0x002e, 0x0005,
-	0x0026, 0x70eb, 0x0000, 0x080c, 0x0ed8, 0x1148, 0x080c, 0x2a55,
+	0x0026, 0x70eb, 0x0000, 0x080c, 0x0ed8, 0x1148, 0x080c, 0x2a57,
 	0x1118, 0x2011, 0x8484, 0x0058, 0x2011, 0x8282, 0x0040, 0x080c,
-	0x2a55, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2, 0x080c,
+	0x2a57, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2, 0x080c,
 	0x0edd, 0x002e, 0x0005, 0x00e6, 0x0006, 0x2071, 0x1800, 0xd0b4,
 	0x70e4, 0x1110, 0xc0e4, 0x0048, 0x0006, 0x3b00, 0x9084, 0xff3f,
 	0x20d8, 0x000e, 0x70eb, 0x0000, 0xc0e5, 0x0079, 0x000e, 0x00ee,
@@ -313,7 +313,7 @@
 	0x8000, 0x0016, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0xa862,
 	0x9184, 0xffc0, 0xa85e, 0x001e, 0x0020, 0x00e6, 0x0126, 0x2091,
 	0x8000, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
-	0x8000, 0x70be, 0x080c, 0x7f5d, 0x012e, 0x00ee, 0x0005, 0x2071,
+	0x8000, 0x70be, 0x080c, 0x7f46, 0x012e, 0x00ee, 0x0005, 0x2071,
 	0x1800, 0x9026, 0x2009, 0x0000, 0x2049, 0x0400, 0x2900, 0x702e,
 	0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886,
 	0x0440, 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x1883,
@@ -329,20 +329,20 @@
 	0x02b8, 0x9982, 0x0440, 0x0278, 0x9982, 0x0492, 0x0288, 0x9982,
 	0x0800, 0x1270, 0x0040, 0x9982, 0x0800, 0x0250, 0x2071, 0x1883,
 	0x7010, 0x9902, 0x1228, 0x9085, 0x0001, 0x001e, 0x00ee, 0x0005,
-	0x9006, 0x0cd8, 0x00e6, 0x2071, 0x19e9, 0x7007, 0x0000, 0x9006,
+	0x9006, 0x0cd8, 0x00e6, 0x2071, 0x19e8, 0x7007, 0x0000, 0x9006,
 	0x701e, 0x7022, 0x7002, 0x2071, 0x0000, 0x7010, 0x9085, 0x8044,
 	0x7012, 0x2071, 0x0080, 0x9006, 0x20a9, 0x0040, 0x7022, 0x1f04,
 	0x10ce, 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x00e6, 0xa06f, 0x0000, 0x2071, 0x19e9, 0x701c, 0x9088, 0x19f3,
+	0x00e6, 0xa06f, 0x0000, 0x2071, 0x19e8, 0x701c, 0x9088, 0x19f2,
 	0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, 0x090c,
 	0x0db4, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x00a9,
 	0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6,
-	0x2071, 0x19e9, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080,
+	0x2071, 0x19e8, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080,
 	0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, 0x0000,
 	0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x1117, 0x1115, 0x1115,
 	0x1115, 0x128e, 0x128e, 0x128e, 0x128e, 0x080c, 0x0db4, 0x701c,
 	0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, 0xd1fc,
-	0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x19f3, 0x2004,
+	0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x19f2, 0x2004,
 	0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, 0x0026,
 	0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898, 0x780e,
 	0xa878, 0x700e, 0xa870, 0x7016, 0xa874, 0x701a, 0xa868, 0x009e,
@@ -355,8 +355,8 @@
 	0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x22a8,
 	0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, 0x782b,
 	0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x2009,
-	0x19e9, 0x2104, 0xc095, 0x200a, 0x080c, 0x10f4, 0x0005, 0x0016,
-	0x00e6, 0x2071, 0x19e9, 0x00f6, 0x2079, 0x0080, 0x792c, 0xd1bc,
+	0x19e8, 0x2104, 0xc095, 0x200a, 0x080c, 0x10f4, 0x0005, 0x0016,
+	0x00e6, 0x2071, 0x19e8, 0x00f6, 0x2079, 0x0080, 0x792c, 0xd1bc,
 	0x190c, 0x0dad, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c, 0x0700,
 	0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x1105, 0x11ad,
 	0x11e1, 0x0db4, 0x0db4, 0x129a, 0x0db4, 0x918c, 0x0700, 0x1550,
@@ -377,1762 +377,1764 @@
 	0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x10f4, 0x0005, 0x00de,
 	0x009e, 0x080c, 0x10f4, 0x0005, 0xa8a8, 0xd08c, 0x0005, 0x0096,
 	0xa0a0, 0x904d, 0x090c, 0x0db4, 0xa06c, 0x908e, 0x0100, 0x0130,
-	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c, 0x687f,
+	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c, 0x6884,
 	0xa09f, 0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c, 0x101d, 0x009e,
 	0x0005, 0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0db4, 0xa06c, 0x908e,
 	0x0100, 0x0128, 0xa87b, 0x0001, 0xa883, 0x0000, 0x00c0, 0xa80c,
 	0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006,
 	0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xa076,
 	0xa172, 0xb000, 0xa07a, 0x2810, 0x080c, 0x10d5, 0x00e8, 0xa97c,
-	0xa894, 0x0016, 0x0006, 0x080c, 0x687f, 0x000e, 0x001e, 0xd1fc,
-	0x1138, 0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0x9e32, 0x00ce,
+	0xa894, 0x0016, 0x0006, 0x080c, 0x6884, 0x000e, 0x001e, 0xd1fc,
+	0x1138, 0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0x9e42, 0x00ce,
 	0x7008, 0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000, 0x080c, 0x101d,
 	0x7007, 0x0000, 0x080c, 0x10f4, 0x00ae, 0x0005, 0x0126, 0x2091,
 	0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094, 0x7002,
 	0x012e, 0x0005, 0x7007, 0x0000, 0x080c, 0x1105, 0x0005, 0x0126,
-	0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a33, 0x7003, 0x0000,
+	0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a32, 0x7003, 0x0000,
 	0x78bf, 0x00f6, 0x781b, 0x4800, 0x00c1, 0x7803, 0x0003, 0x780f,
-	0x0000, 0x20a9, 0x0254, 0x2061, 0xd8e3, 0x2c0d, 0x7912, 0xe104,
+	0x0000, 0x20a9, 0x0254, 0x2061, 0xd904, 0x2c0d, 0x7912, 0xe104,
 	0x9ce0, 0x0002, 0x7916, 0x1f04, 0x12b5, 0x7807, 0x0007, 0x7803,
 	0x0000, 0x7803, 0x0001, 0x012e, 0x0005, 0x00c6, 0x7803, 0x0000,
-	0x7808, 0xd09c, 0x0110, 0x7820, 0x0cd8, 0x2001, 0x1a34, 0x2003,
+	0x7808, 0xd09c, 0x0110, 0x7820, 0x0cd8, 0x2001, 0x1a33, 0x2003,
 	0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002,
 	0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, 0x0031,
-	0x782b, 0x1a52, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, 0x0200,
-	0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a52, 0x602f,
+	0x782b, 0x1a51, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, 0x0200,
+	0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a51, 0x602f,
 	0x1cd0, 0x2001, 0x1819, 0x2004, 0x9082, 0x1cd0, 0x6032, 0x603b,
-	0x1f26, 0x2001, 0x3138, 0xd0fc, 0x190c, 0x0db4, 0x2001, 0x0003,
-	0x2004, 0xd0d4, 0x1118, 0x783f, 0x3138, 0x0020, 0x9084, 0xc000,
-	0x783f, 0xb138, 0x00ce, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908,
+	0x1f28, 0x2001, 0x313a, 0xd0fc, 0x190c, 0x0db4, 0x2001, 0x0003,
+	0x2004, 0xd0d4, 0x1118, 0x783f, 0x313a, 0x0020, 0x9084, 0xc000,
+	0x783f, 0xb13a, 0x00ce, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908,
 	0x9184, 0x0070, 0x190c, 0x0dad, 0xd19c, 0x0158, 0x7820, 0x908c,
 	0xf000, 0x15e8, 0x908a, 0x0024, 0x1a0c, 0x0db4, 0x0023, 0x012e,
 	0x0005, 0x012e, 0x0005, 0x1347, 0x1347, 0x135e, 0x1363, 0x1367,
-	0x136c, 0x1394, 0x1398, 0x13a6, 0x13aa, 0x1347, 0x1434, 0x1438,
-	0x149b, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347,
+	0x136c, 0x1394, 0x1398, 0x13a6, 0x13aa, 0x1347, 0x1436, 0x143a,
+	0x149d, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347,
 	0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x136e, 0x1347,
 	0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x134b, 0x1349, 0x080c,
-	0x0db4, 0x080c, 0x0dad, 0x080c, 0x14a2, 0x2009, 0x1a4b, 0x2104,
-	0x8000, 0x200a, 0x080c, 0x7a07, 0x080c, 0x1958, 0x0005, 0x2009,
-	0x0048, 0x2060, 0x080c, 0x9eac, 0x012e, 0x0005, 0x7004, 0xc085,
+	0x0db4, 0x080c, 0x0dad, 0x080c, 0x14a4, 0x2009, 0x1a4a, 0x2104,
+	0x8000, 0x200a, 0x080c, 0x79f0, 0x080c, 0x195a, 0x0005, 0x2009,
+	0x0048, 0x2060, 0x080c, 0x9ebc, 0x012e, 0x0005, 0x7004, 0xc085,
 	0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c,
-	0x14a2, 0x080c, 0x15de, 0x0005, 0x080c, 0x0db4, 0x080c, 0x14a2,
+	0x14a4, 0x080c, 0x15e0, 0x0005, 0x080c, 0x0db4, 0x080c, 0x14a4,
 	0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009,
-	0x0048, 0x080c, 0x9eac, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009,
+	0x0048, 0x080c, 0x9ebc, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009,
 	0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8,
-	0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x14a7, 0x2001,
+	0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x14a9, 0x2001,
 	0x0307, 0x2003, 0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005,
-	0x080c, 0x14a2, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff,
-	0x009e, 0x2009, 0x0048, 0x080c, 0x9eac, 0x0005, 0x080c, 0x14a2,
-	0x080c, 0x0db4, 0x080c, 0x14a2, 0x080c, 0x141f, 0x7827, 0x0018,
+	0x080c, 0x14a4, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff,
+	0x009e, 0x2009, 0x0048, 0x080c, 0x9ebc, 0x0005, 0x080c, 0x14a4,
+	0x080c, 0x0db4, 0x080c, 0x14a4, 0x080c, 0x1421, 0x7827, 0x0018,
 	0x79ac, 0xd1dc, 0x0540, 0x7827, 0x0015, 0x7828, 0x782b, 0x0000,
 	0x9065, 0x0138, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
 	0x0400, 0x7004, 0x9005, 0x1180, 0x78ab, 0x0004, 0x7827, 0x0018,
 	0x782b, 0x0000, 0xd1bc, 0x090c, 0x0db4, 0x2001, 0x020d, 0x2003,
-	0x0050, 0x2003, 0x0020, 0x0480, 0x78ab, 0x0004, 0x7803, 0x0001,
-	0x080c, 0x1438, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c,
-	0x0db4, 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x0198,
-	0x080c, 0x7a07, 0x080c, 0x1958, 0x080c, 0xbb17, 0x0158, 0xa9ac,
+	0x0050, 0x2003, 0x0020, 0x0490, 0x78ab, 0x0004, 0x7803, 0x0001,
+	0x080c, 0x143a, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c,
+	0x0db4, 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x01a8,
+	0x080c, 0x79f0, 0x080c, 0x195a, 0x080c, 0xbb2c, 0x0158, 0xa9ac,
 	0xa936, 0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa880,
-	0xc0bd, 0xa882, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x6024, 0x190c, 0xbefc, 0x2029, 0x00c8, 0x8529, 0x0128,
-	0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xd88c,
-	0xd5a4, 0x1118, 0x080c, 0x14a7, 0x0005, 0x080c, 0x7a07, 0x080c,
-	0x1958, 0x0005, 0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016,
-	0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007,
-	0x9186, 0x0003, 0x0120, 0x2001, 0x0016, 0x080c, 0x1518, 0x00fe,
-	0x007e, 0x006e, 0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005,
-	0x7104, 0x9184, 0x0004, 0x190c, 0x0db4, 0xd184, 0x1189, 0xd19c,
-	0x0158, 0xc19c, 0x7106, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003,
-	0x0020, 0x080c, 0x14a7, 0x0005, 0x81ff, 0x190c, 0x0db4, 0x0005,
-	0xc184, 0xd1b4, 0xc1b4, 0x7106, 0x0016, 0x00e6, 0x15e0, 0x2071,
-	0x0200, 0x080c, 0x15d2, 0x6014, 0x9005, 0x05a8, 0x0096, 0x2048,
-	0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e,
-	0x0048, 0x1548, 0x601c, 0xd084, 0x11d8, 0x00f6, 0x2c78, 0x080c,
-	0x1648, 0x00fe, 0x00a8, 0x00f6, 0x2c78, 0x080c, 0x1790, 0x00fe,
-	0x2009, 0x01f4, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005,
-	0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x0401, 0x0040,
-	0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x12c5, 0x7803, 0x0001,
-	0x00ee, 0x001e, 0x0005, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003,
-	0x0020, 0x0069, 0x0ca8, 0x0031, 0x2060, 0x2009, 0x0053, 0x080c,
-	0x9eac, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c,
-	0x141f, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0510,
-	0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc,
-	0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841,
-	0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c,
-	0x080c, 0x150a, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827,
-	0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500,
-	0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c,
-	0x7a07, 0x080c, 0x1958, 0x0090, 0x7827, 0x0015, 0x782b, 0x0000,
-	0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, 0x2003, 0x0020,
-	0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, 0x00de, 0x0005,
-	0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015,
-	0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, 0x1800, 0x6802,
-	0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, 0x2001,
-	0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005,
-	0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016,
-	0x0026, 0x00c6, 0x080c, 0x130c, 0x00ce, 0x002e, 0x001e, 0x000e,
-	0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118,
-	0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004,
-	0x080c, 0x0db4, 0x2009, 0x180c, 0x2104, 0xc0f4, 0x200a, 0x2009,
-	0xff00, 0x8109, 0x0904, 0x1596, 0x7a18, 0x9284, 0x0030, 0x0904,
-	0x1591, 0x9284, 0x0048, 0x9086, 0x0008, 0x1904, 0x1591, 0x2001,
-	0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x0126, 0x2091, 0x2800, 0x00f6, 0x0026, 0x0016,
-	0x2009, 0x1a4d, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x83aa,
-	0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, 0x014e, 0x013e, 0x01de,
-	0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x01d0, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x00f6, 0x0016,
-	0x2009, 0x1a4e, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x1d4a,
-	0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e,
-	0x000e, 0x7818, 0xd0bc, 0x1904, 0x1541, 0x0005, 0x2001, 0x180c,
-	0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, 0x0030, 0x0508, 0x9284,
-	0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, 0x19c7, 0x2004, 0x9005,
-	0x01b8, 0x2001, 0x1a36, 0x2004, 0x9086, 0x0000, 0x0188, 0x2009,
-	0x1a4c, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x9430, 0x2009,
-	0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, 0xff00, 0x0804, 0x1541,
-	0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080,
-	0x080c, 0x153a, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, 0x2004,
-	0x080c, 0x0db4, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, 0x7050,
-	0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x0005, 0x00e6, 0x0016,
-	0x2071, 0x0200, 0x0c79, 0x6124, 0xd1dc, 0x01f8, 0x701c, 0xd08c,
-	0x0904, 0x163d, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004, 0xd0bc,
-	0x0904, 0x163d, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, 0x6038,
-	0x00ce, 0x918e, 0x0039, 0x1904, 0x163d, 0x9c06, 0x15f0, 0x0126,
-	0x2091, 0x2600, 0x080c, 0x794e, 0x012e, 0x7358, 0x745c, 0x6014,
-	0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x190c, 0xbed7, 0xab42, 0xac3e, 0x2001, 0x1875, 0x2004,
-	0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837, 0xffff,
-	0x080c, 0x1f46, 0x1190, 0x080c, 0x17eb, 0x2a00, 0xa816, 0x0130,
-	0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020,
-	0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050, 0x7037,
-	0x0020, 0x001e, 0x00ee, 0x080c, 0x14a7, 0x0005, 0x080c, 0x0db4,
-	0x0016, 0x2009, 0x00a0, 0x8109, 0xa001, 0xa001, 0xa001, 0x1dd8,
-	0x001e, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014,
-	0x2048, 0x2940, 0x903e, 0x2730, 0xa864, 0x2068, 0xa81a, 0x9d84,
-	0x000f, 0x9088, 0x1f26, 0x2165, 0x0002, 0x167c, 0x16c9, 0x167c,
-	0x167c, 0x167c, 0x16ab, 0x167c, 0x1680, 0x1675, 0x16c0, 0x167c,
-	0x167c, 0x167c, 0x1785, 0x1694, 0x168a, 0xa964, 0x918c, 0x00ff,
-	0x918e, 0x0048, 0x0904, 0x16c0, 0x9085, 0x0001, 0x0804, 0x177c,
-	0xa87c, 0xd0bc, 0x0dc8, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888,
-	0x0804, 0x16d0, 0xa87c, 0xd0bc, 0x0d78, 0xa890, 0xa842, 0xa88c,
-	0xa83e, 0xa888, 0x0804, 0x171f, 0xa87c, 0xd0bc, 0x0d28, 0xa890,
-	0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c, 0x0db4, 0xa164,
-	0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1f26, 0x2065, 0xa888, 0xd19c,
-	0x1904, 0x171f, 0x0428, 0xa87c, 0xd0ac, 0x0970, 0xa804, 0x9045,
-	0x090c, 0x0db4, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1f26,
-	0x2065, 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x171f, 0x0080,
-	0xa87c, 0xd0ac, 0x0904, 0x167c, 0x9006, 0xa842, 0xa83e, 0x0804,
-	0x171f, 0xa87c, 0xd0ac, 0x0904, 0x167c, 0x9006, 0xa842, 0xa83e,
-	0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002,
-	0x16f3, 0x16f3, 0x16f5, 0x16f3, 0x16f3, 0x16f3, 0x16fb, 0x16f3,
-	0x16f3, 0x16f3, 0x1701, 0x16f3, 0x16f3, 0x16f3, 0x1707, 0x16f3,
-	0x16f3, 0x16f3, 0x170d, 0x16f3, 0x16f3, 0x16f3, 0x1713, 0x16f3,
-	0x16f3, 0x16f3, 0x1719, 0x080c, 0x0db4, 0xa574, 0xa478, 0xa37c,
-	0xa280, 0x0804, 0x1764, 0xa584, 0xa488, 0xa38c, 0xa290, 0x0804,
-	0x1764, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1764, 0xa5a4,
-	0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1764, 0xa5b4, 0xa4b8, 0xa3bc,
-	0xa2c0, 0x0804, 0x1764, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804,
-	0x1764, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1764, 0x2c05,
-	0x908a, 0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1742,
-	0x1740, 0x1740, 0x1740, 0x1740, 0x1740, 0x1749, 0x1740, 0x1740,
-	0x1740, 0x1740, 0x1740, 0x1750, 0x1740, 0x1740, 0x1740, 0x1740,
-	0x1740, 0x1757, 0x1740, 0x1740, 0x1740, 0x1740, 0x1740, 0x175e,
-	0x080c, 0x0db4, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, 0xa280,
-	0x00d8, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, 0x00a0,
-	0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x0068, 0xa5b4,
-	0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0030, 0xa5cc, 0xa4d0,
-	0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22,
-	0xaf26, 0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0, 0xa836,
-	0xaa3a, 0x8109, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085, 0x601e,
-	0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005, 0x2800,
-	0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c78, 0x0804, 0x167c, 0x0016,
-	0x2009, 0x00a0, 0x8109, 0xa001, 0xa001, 0xa001, 0x1dd8, 0x001e,
-	0x2ff0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048,
-	0x2940, 0xa80e, 0x2061, 0x1f21, 0xa813, 0x1f21, 0x2c05, 0xa80a,
-	0xa964, 0xa91a, 0xa87c, 0xd0ac, 0x090c, 0x0db4, 0x9006, 0xa842,
-	0xa83e, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4, 0xadcc, 0xacd0,
-	0xafd4, 0xaed8, 0xabdc, 0xaae0, 0xab2e, 0xaa32, 0xad1e, 0xac22,
-	0xaf26, 0xae2a, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0xa988, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0008, 0x1120, 0x8109, 0xa916, 0x0128,
-	0x0078, 0x918a, 0x0002, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085,
-	0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005,
-	0xa804, 0x9045, 0x090c, 0x0db4, 0xa80e, 0xa064, 0xa81a, 0x9084,
-	0x000f, 0x9080, 0x1f26, 0x2015, 0x82ff, 0x090c, 0x0db4, 0xaa12,
-	0x2205, 0xa80a, 0x0c10, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190,
-	0x2d00, 0x0002, 0x18e0, 0x1842, 0x1842, 0x18e0, 0x18e0, 0x18da,
-	0x18e0, 0x1842, 0x1891, 0x1891, 0x1891, 0x18e0, 0x18e0, 0x18e0,
-	0x18d7, 0x1891, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20,
-	0xdd9c, 0x0904, 0x18e2, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4,
-	0x9082, 0x001b, 0x0002, 0x182e, 0x182c, 0x182c, 0x182c, 0x182c,
-	0x182c, 0x1832, 0x182c, 0x182c, 0x182c, 0x182c, 0x182c, 0x1836,
-	0x182c, 0x182c, 0x182c, 0x182c, 0x182c, 0x183a, 0x182c, 0x182c,
-	0x182c, 0x182c, 0x182c, 0x183e, 0x080c, 0x0db4, 0xa774, 0xa678,
-	0x0804, 0x18e2, 0xa78c, 0xa690, 0x0804, 0x18e2, 0xa7a4, 0xa6a8,
-	0x0804, 0x18e2, 0xa7bc, 0xa6c0, 0x0804, 0x18e2, 0xa7d4, 0xa6d8,
-	0x0804, 0x18e2, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0db4, 0x9082,
-	0x001b, 0x0002, 0x1865, 0x1865, 0x1867, 0x1865, 0x1865, 0x1865,
-	0x186d, 0x1865, 0x1865, 0x1865, 0x1873, 0x1865, 0x1865, 0x1865,
-	0x1879, 0x1865, 0x1865, 0x1865, 0x187f, 0x1865, 0x1865, 0x1865,
-	0x1885, 0x1865, 0x1865, 0x1865, 0x188b, 0x080c, 0x0db4, 0xa574,
-	0xa478, 0xa37c, 0xa280, 0x0804, 0x18e2, 0xa584, 0xa488, 0xa38c,
-	0xa290, 0x0804, 0x18e2, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804,
-	0x18e2, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x18e2, 0xa5b4,
-	0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x18e2, 0xa5c4, 0xa4c8, 0xa3cc,
-	0xa2d0, 0x0804, 0x18e2, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804,
-	0x18e2, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b,
-	0x0002, 0x18b4, 0x18b2, 0x18b2, 0x18b2, 0x18b2, 0x18b2, 0x18bb,
-	0x18b2, 0x18b2, 0x18b2, 0x18b2, 0x18b2, 0x18c2, 0x18b2, 0x18b2,
-	0x18b2, 0x18b2, 0x18b2, 0x18c9, 0x18b2, 0x18b2, 0x18b2, 0x18b2,
-	0x18b2, 0x18d0, 0x080c, 0x0db4, 0xa56c, 0xa470, 0xa774, 0xa678,
-	0xa37c, 0xa280, 0x0438, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394,
-	0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0,
-	0x00c8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0090,
-	0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0x0058, 0x9d86,
-	0x000e, 0x1130, 0x080c, 0x1ede, 0x1904, 0x17eb, 0x900e, 0x0050,
-	0x080c, 0x0db4, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a,
-	0x080c, 0x1ede, 0x0005, 0x6014, 0x2048, 0x6118, 0x810c, 0x810c,
-	0x810c, 0x81ff, 0x1118, 0xa887, 0x0001, 0x0008, 0xa986, 0x601b,
-	0x0002, 0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934, 0xa88c, 0x9106,
-	0x1158, 0xa938, 0xa890, 0x9106, 0x1138, 0x601c, 0xc084, 0x601e,
-	0x2009, 0x0048, 0x0804, 0x9eac, 0x0005, 0x0126, 0x00c6, 0x2091,
-	0x2200, 0x00ce, 0x7908, 0x918c, 0x0007, 0x9186, 0x0000, 0x05b0,
-	0x9186, 0x0003, 0x0598, 0x6020, 0x6023, 0x0000, 0x0006, 0x2031,
-	0x0008, 0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c, 0x0120, 0x080c,
-	0x130c, 0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800, 0x2031, 0x0168,
-	0x00c6, 0x7808, 0xd09c, 0x190c, 0x130c, 0x00ce, 0x2001, 0x0038,
-	0x080c, 0x19e5, 0x7930, 0x9186, 0x0040, 0x0160, 0x9186, 0x0042,
-	0x190c, 0x0db4, 0x2001, 0x001e, 0x8001, 0x1df0, 0x8631, 0x1d40,
-	0x080c, 0x19f4, 0x000e, 0x6022, 0x012e, 0x0005, 0x080c, 0x19e1,
-	0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b, 0x0000, 0x0ca0,
-	0x00f6, 0x2079, 0x0300, 0x7803, 0x0000, 0x78ab, 0x0004, 0x00fe,
-	0x080c, 0x6fb2, 0x11b0, 0x2001, 0x0138, 0x2003, 0x0000, 0x2001,
-	0x0160, 0x2003, 0x0000, 0x2011, 0x012c, 0xa001, 0xa001, 0x8211,
-	0x1de0, 0x0081, 0x0066, 0x2031, 0x0000, 0x080c, 0x7062, 0x006e,
-	0x0005, 0x0479, 0x0039, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138,
-	0x2202, 0x0005, 0x00e6, 0x2071, 0x0200, 0x080c, 0x2a69, 0x2009,
-	0x003c, 0x080c, 0x2268, 0x2001, 0x015d, 0x2003, 0x0000, 0x7000,
-	0x9084, 0x003c, 0x1de0, 0x080c, 0x7f5d, 0x70a0, 0x70a2, 0x7098,
-	0x709a, 0x709c, 0x709e, 0x2001, 0x020d, 0x2003, 0x0020, 0x00f6,
-	0x2079, 0x0300, 0x080c, 0x12c5, 0x7803, 0x0001, 0x00fe, 0x00ee,
-	0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2001, 0x0160,
-	0x202c, 0x2003, 0x0000, 0x080c, 0x6fb2, 0x1108, 0x0005, 0x2021,
-	0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168, 0x2001, 0x0109,
-	0x201c, 0x939c, 0x0048, 0x1160, 0x2001, 0x0111, 0x201c, 0x83ff,
-	0x1110, 0x8421, 0x1d70, 0x2001, 0x015d, 0x2003, 0x0000, 0x0005,
-	0x0046, 0x2021, 0x0019, 0x2003, 0x0048, 0xa001, 0xa001, 0x201c,
-	0x939c, 0x0048, 0x0120, 0x8421, 0x1db0, 0x004e, 0x0c60, 0x004e,
-	0x0c40, 0x601c, 0xc084, 0x601e, 0x0005, 0x2c08, 0x621c, 0x080c,
-	0x1518, 0x7930, 0x0005, 0x2c08, 0x621c, 0x080c, 0x15c3, 0x7930,
-	0x0005, 0x8001, 0x1df0, 0x0005, 0x2031, 0x0005, 0x781c, 0x9084,
-	0x0007, 0x0170, 0x2001, 0x0038, 0x0c41, 0x9186, 0x0040, 0x0904,
-	0x1a52, 0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80, 0x080c, 0x0db4,
-	0x781f, 0x0202, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, 0x0b10,
-	0x0c01, 0x781c, 0xd084, 0x0110, 0x0861, 0x04e0, 0x2001, 0x0030,
-	0x0891, 0x9186, 0x0040, 0x0568, 0x781c, 0xd084, 0x1da8, 0x781f,
-	0x0101, 0x2001, 0x0014, 0x0869, 0x2001, 0x0037, 0x0821, 0x9186,
-	0x0040, 0x0140, 0x2001, 0x0030, 0x080c, 0x19eb, 0x9186, 0x0040,
-	0x190c, 0x0db4, 0x00d6, 0x2069, 0x0200, 0x692c, 0xd1f4, 0x1170,
-	0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800, 0x9085, 0x1800, 0x6802,
-	0x00de, 0x0080, 0x6908, 0x9184, 0x0007, 0x1db0, 0x00de, 0x781f,
-	0x0100, 0x791c, 0x9184, 0x0007, 0x090c, 0x0db4, 0xa001, 0xa001,
-	0x781f, 0x0200, 0x0005, 0x0126, 0x2091, 0x2400, 0x2071, 0x1a36,
-	0x2079, 0x0090, 0x012e, 0x0005, 0x9280, 0x0005, 0x2004, 0x2048,
-	0xa97c, 0xd1dc, 0x1904, 0x1ae7, 0xa964, 0x9184, 0x0007, 0x0002,
-	0x1a70, 0x1ad2, 0x1a87, 0x1a87, 0x1a87, 0x1aba, 0x1a9a, 0x1a89,
-	0x918c, 0x00ff, 0x9186, 0x0008, 0x1170, 0xa87c, 0xd0b4, 0x0904,
-	0x1d05, 0x9006, 0xa842, 0xa83e, 0xa988, 0x2900, 0xa85a, 0xa813,
-	0x1f21, 0x0804, 0x1ae3, 0x9186, 0x0048, 0x0904, 0x1ad2, 0x080c,
-	0x0db4, 0xa87c, 0xd0b4, 0x0904, 0x1d05, 0xa890, 0xa842, 0xa83a,
-	0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa988,
-	0x0804, 0x1ada, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x1d38,
-	0xa87c, 0xd0b4, 0x0904, 0x1d05, 0xa890, 0xa842, 0xa83a, 0xa88c,
-	0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa804, 0xa85a,
-	0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1f26, 0x2005, 0xa812,
-	0xa988, 0x0448, 0x918c, 0x00ff, 0x9186, 0x0015, 0x1540, 0xa87c,
-	0xd0b4, 0x0904, 0x1d05, 0xa804, 0xa85a, 0x2040, 0xa064, 0x9084,
-	0x000f, 0x9080, 0x1f26, 0x2005, 0xa812, 0xa988, 0x9006, 0xa842,
-	0xa83e, 0x0088, 0xa87c, 0xd0b4, 0x0904, 0x1d05, 0xa988, 0x9006,
-	0xa842, 0xa83e, 0x2900, 0xa85a, 0xa864, 0x9084, 0x000f, 0x9080,
-	0x1f26, 0x2005, 0xa812, 0xa916, 0xa87c, 0xc0dd, 0xa87e, 0x0005,
-	0x00f6, 0x2079, 0x0090, 0x782c, 0xd0fc, 0x190c, 0x1d4a, 0x00e6,
-	0x2071, 0x1a36, 0x7000, 0x9005, 0x1904, 0x1b50, 0x7206, 0x9280,
-	0x0005, 0x204c, 0x9280, 0x0004, 0x2004, 0x782b, 0x0004, 0x00f6,
-	0x2079, 0x0200, 0x7803, 0x0040, 0x00fe, 0x00b6, 0x2058, 0xb86c,
-	0x7836, 0xb890, 0x00be, 0x00f6, 0x2079, 0x0200, 0x7803, 0x0040,
-	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x781a, 0x2079,
-	0x0100, 0x8004, 0x78d6, 0x00fe, 0xa814, 0x2050, 0xa858, 0x2040,
-	0xa810, 0x2060, 0xa064, 0x90ec, 0x000f, 0xa944, 0x791a, 0x7116,
-	0xa848, 0x781e, 0x701a, 0x9006, 0x700e, 0x7012, 0x7004, 0xa940,
-	0xa838, 0x9106, 0x1500, 0xa93c, 0xa834, 0x9106, 0x11e0, 0x0006,
-	0x0016, 0xa938, 0xa834, 0x9105, 0x0118, 0x001e, 0x000e, 0x0098,
-	0x001e, 0x000e, 0x8aff, 0x01c8, 0x0126, 0x2091, 0x8000, 0x2009,
-	0x0306, 0x200b, 0x0808, 0x00d9, 0x0108, 0x00c9, 0x012e, 0x9006,
-	0x00ee, 0x00fe, 0x0005, 0x0036, 0x0046, 0xab38, 0xac34, 0x080c,
-	0x1f46, 0x004e, 0x003e, 0x0d30, 0x0c98, 0x9085, 0x0001, 0x0c80,
-	0x2009, 0x0306, 0x200b, 0x4800, 0x7027, 0x0000, 0x0005, 0x0076,
-	0x0066, 0x0056, 0x0046, 0x0036, 0x0026, 0x8aff, 0x0904, 0x1cfe,
-	0x700c, 0x7214, 0x923a, 0x7010, 0x7218, 0x9203, 0x0a04, 0x1cfd,
-	0x9705, 0x0904, 0x1cfd, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190,
-	0x2d00, 0x0002, 0x1c92, 0x1bd2, 0x1bd2, 0x1c92, 0x1c92, 0x1c6f,
-	0x1c92, 0x1bd2, 0x1c76, 0x1c21, 0x1c21, 0x1c92, 0x1c92, 0x1c92,
-	0x1c69, 0x1c21, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20,
-	0xdd9c, 0x0904, 0x1c94, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4,
-	0x9082, 0x001b, 0x0002, 0x1bbe, 0x1bbc, 0x1bbc, 0x1bbc, 0x1bbc,
-	0x1bbc, 0x1bc2, 0x1bbc, 0x1bbc, 0x1bbc, 0x1bbc, 0x1bbc, 0x1bc6,
-	0x1bbc, 0x1bbc, 0x1bbc, 0x1bbc, 0x1bbc, 0x1bca, 0x1bbc, 0x1bbc,
-	0x1bbc, 0x1bbc, 0x1bbc, 0x1bce, 0x080c, 0x0db4, 0xa774, 0xa678,
-	0x0804, 0x1c94, 0xa78c, 0xa690, 0x0804, 0x1c94, 0xa7a4, 0xa6a8,
-	0x0804, 0x1c94, 0xa7bc, 0xa6c0, 0x0804, 0x1c94, 0xa7d4, 0xa6d8,
-	0x0804, 0x1c94, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0db4, 0x9082,
-	0x001b, 0x0002, 0x1bf5, 0x1bf5, 0x1bf7, 0x1bf5, 0x1bf5, 0x1bf5,
-	0x1bfd, 0x1bf5, 0x1bf5, 0x1bf5, 0x1c03, 0x1bf5, 0x1bf5, 0x1bf5,
-	0x1c09, 0x1bf5, 0x1bf5, 0x1bf5, 0x1c0f, 0x1bf5, 0x1bf5, 0x1bf5,
-	0x1c15, 0x1bf5, 0x1bf5, 0x1bf5, 0x1c1b, 0x080c, 0x0db4, 0xa574,
-	0xa478, 0xa37c, 0xa280, 0x0804, 0x1c94, 0xa584, 0xa488, 0xa38c,
-	0xa290, 0x0804, 0x1c94, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804,
-	0x1c94, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1c94, 0xa5b4,
-	0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x1c94, 0xa5c4, 0xa4c8, 0xa3cc,
-	0xa2d0, 0x0804, 0x1c94, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804,
-	0x1c94, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b,
-	0x0002, 0x1c44, 0x1c42, 0x1c42, 0x1c42, 0x1c42, 0x1c42, 0x1c4c,
-	0x1c42, 0x1c42, 0x1c42, 0x1c42, 0x1c42, 0x1c54, 0x1c42, 0x1c42,
-	0x1c42, 0x1c42, 0x1c42, 0x1c5b, 0x1c42, 0x1c42, 0x1c42, 0x1c42,
-	0x1c42, 0x1c62, 0x080c, 0x0db4, 0xa56c, 0xa470, 0xa774, 0xa678,
-	0xa37c, 0xa280, 0x0804, 0x1c94, 0xa584, 0xa488, 0xa78c, 0xa690,
-	0xa394, 0xa298, 0x0804, 0x1c94, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8,
-	0xa3ac, 0xa2b0, 0x04c8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4,
-	0xa2c8, 0x0490, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0,
-	0x0458, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x1518, 0x080c,
-	0x1ede, 0x1904, 0x1b6d, 0x900e, 0x0804, 0x1cfe, 0xab64, 0x939c,
-	0x00ff, 0x9386, 0x0048, 0x1180, 0x00c6, 0x7004, 0x2060, 0x6004,
-	0x9086, 0x0043, 0x00ce, 0x0904, 0x1c21, 0xab9c, 0x9016, 0xad8c,
-	0xac90, 0xaf94, 0xae98, 0x0040, 0x9386, 0x0008, 0x0904, 0x1c21,
-	0x080c, 0x0db4, 0x080c, 0x0db4, 0x2009, 0x030f, 0x2104, 0xd0fc,
-	0x0530, 0x0066, 0x2009, 0x0306, 0x2104, 0x9084, 0x0030, 0x15c8,
-	0x2031, 0x1000, 0x200b, 0x4000, 0x2600, 0x9302, 0x928b, 0x0000,
-	0xa82e, 0xa932, 0x0278, 0x9105, 0x0168, 0x2011, 0x0000, 0x2618,
-	0x2600, 0x9500, 0xa81e, 0x9481, 0x0000, 0xa822, 0xa880, 0xc0fd,
-	0xa882, 0x0020, 0xa82f, 0x0000, 0xa833, 0x0000, 0x006e, 0x7b12,
-	0x7a16, 0x7d02, 0x7c06, 0x7f0a, 0x7e0e, 0x782b, 0x0001, 0x7000,
-	0x8000, 0x7002, 0xa83c, 0x9300, 0xa83e, 0xa840, 0x9201, 0xa842,
-	0x700c, 0x9300, 0x700e, 0x7010, 0x9201, 0x7012, 0x080c, 0x1ede,
-	0x0428, 0x2031, 0x0080, 0x9584, 0x007f, 0x0108, 0x9632, 0x7124,
-	0x7000, 0x9086, 0x0000, 0x1198, 0xc185, 0x7126, 0x2009, 0x0306,
-	0x2104, 0xd0b4, 0x1904, 0x1ca4, 0x200b, 0x4040, 0x2009, 0x1a4f,
-	0x2104, 0x8000, 0x0a04, 0x1ca4, 0x200a, 0x0804, 0x1ca4, 0xc18d,
-	0x7126, 0xd184, 0x1d58, 0x0804, 0x1ca4, 0x9006, 0x002e, 0x003e,
-	0x004e, 0x005e, 0x006e, 0x007e, 0x0005, 0x080c, 0x0db4, 0x0026,
-	0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004, 0x7003, 0x0000,
-	0x7004, 0x0016, 0x080c, 0x1b60, 0x001e, 0x2060, 0x6014, 0x2048,
-	0x080c, 0xbb17, 0x0118, 0xa880, 0xc0bd, 0xa882, 0x6020, 0x9086,
-	0x0006, 0x1180, 0x2061, 0x0100, 0x62c8, 0x2001, 0x00fa, 0x8001,
-	0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a, 0x60c8, 0xa896,
-	0x7004, 0x2060, 0x00c6, 0x080c, 0xb74a, 0x00ce, 0x2001, 0x19c7,
-	0x2004, 0x9c06, 0x1160, 0x2009, 0x0040, 0x080c, 0x2268, 0x080c,
-	0x98ea, 0x2011, 0x0000, 0x080c, 0x977b, 0x080c, 0x8a4e, 0x002e,
-	0x0804, 0x1e8e, 0x0126, 0x2091, 0x2400, 0xa858, 0x2040, 0x792c,
-	0x782b, 0x0002, 0x9184, 0x0700, 0x1904, 0x1d07, 0x7000, 0x0002,
-	0x1e8e, 0x1d5c, 0x1ddc, 0x1e8c, 0x8001, 0x7002, 0x7027, 0x0000,
-	0xd19c, 0x1158, 0x8aff, 0x0904, 0x1da9, 0x080c, 0x1b67, 0x0904,
-	0x1e8e, 0x080c, 0x1b67, 0x0804, 0x1e8e, 0x782b, 0x0004, 0xd194,
-	0x0148, 0xa880, 0xc0fc, 0xa882, 0x8aff, 0x1518, 0xa87c, 0xc0f5,
-	0xa87e, 0x00f8, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x0016, 0x7910,
-	0xa82c, 0x9100, 0xa82e, 0x7914, 0xa830, 0x9101, 0xa832, 0x001e,
-	0x7810, 0x931a, 0x7814, 0x9213, 0x7800, 0xa81e, 0x7804, 0xa822,
-	0xab3e, 0xaa42, 0x003e, 0x002e, 0x080c, 0x1ef9, 0xa880, 0xc0fd,
-	0xa882, 0x2a00, 0xa816, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x7003,
-	0x0000, 0x2009, 0x0306, 0x200b, 0x4800, 0x7027, 0x0000, 0x0804,
-	0x1e8e, 0x00f6, 0x0026, 0x781c, 0x0006, 0x7818, 0x0006, 0x2079,
-	0x0100, 0x7a14, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x0036,
-	0x2019, 0x1000, 0x8319, 0x090c, 0x0db4, 0x7820, 0xd0bc, 0x1dd0,
-	0x003e, 0x79c8, 0x000e, 0x9102, 0x001e, 0x0006, 0x0016, 0x79c4,
-	0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284, 0x1984, 0x9085,
-	0x0012, 0x7816, 0x002e, 0x00fe, 0x782b, 0x0008, 0x7003, 0x0000,
-	0x080c, 0x1b60, 0x0804, 0x1e8e, 0x8001, 0x7002, 0x7024, 0x8004,
-	0x7026, 0xd194, 0x0170, 0x782c, 0xd0fc, 0x1904, 0x1d4f, 0xd19c,
-	0x1904, 0x1e8a, 0x8aff, 0x0904, 0x1e8e, 0x080c, 0x1b67, 0x0804,
-	0x1e8e, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x080c, 0x1ef9, 0xdd9c,
-	0x1904, 0x1e49, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0db4, 0x9082,
-	0x001b, 0x0002, 0x1e1d, 0x1e1d, 0x1e1f, 0x1e1d, 0x1e1d, 0x1e1d,
-	0x1e25, 0x1e1d, 0x1e1d, 0x1e1d, 0x1e2b, 0x1e1d, 0x1e1d, 0x1e1d,
-	0x1e31, 0x1e1d, 0x1e1d, 0x1e1d, 0x1e37, 0x1e1d, 0x1e1d, 0x1e1d,
-	0x1e3d, 0x1e1d, 0x1e1d, 0x1e1d, 0x1e43, 0x080c, 0x0db4, 0xa07c,
-	0x931a, 0xa080, 0x9213, 0x0804, 0x1d7e, 0xa08c, 0x931a, 0xa090,
-	0x9213, 0x0804, 0x1d7e, 0xa09c, 0x931a, 0xa0a0, 0x9213, 0x0804,
-	0x1d7e, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1d7e, 0xa0bc,
-	0x931a, 0xa0c0, 0x9213, 0x0804, 0x1d7e, 0xa0cc, 0x931a, 0xa0d0,
-	0x9213, 0x0804, 0x1d7e, 0xa0dc, 0x931a, 0xa0e0, 0x9213, 0x0804,
-	0x1d7e, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b,
-	0x0002, 0x1e6c, 0x1e6a, 0x1e6a, 0x1e6a, 0x1e6a, 0x1e6a, 0x1e72,
-	0x1e6a, 0x1e6a, 0x1e6a, 0x1e6a, 0x1e6a, 0x1e78, 0x1e6a, 0x1e6a,
-	0x1e6a, 0x1e6a, 0x1e6a, 0x1e7e, 0x1e6a, 0x1e6a, 0x1e6a, 0x1e6a,
-	0x1e6a, 0x1e84, 0x080c, 0x0db4, 0xa07c, 0x931a, 0xa080, 0x9213,
-	0x0804, 0x1d7e, 0xa094, 0x931a, 0xa098, 0x9213, 0x0804, 0x1d7e,
-	0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1d7e, 0xa0c4, 0x931a,
-	0xa0c8, 0x9213, 0x0804, 0x1d7e, 0xa0dc, 0x931a, 0xa0e0, 0x9213,
-	0x0804, 0x1d7e, 0x0804, 0x1d7a, 0x080c, 0x0db4, 0x012e, 0x0005,
-	0x00f6, 0x00e6, 0x2071, 0x1a36, 0x7000, 0x9086, 0x0000, 0x0904,
-	0x1ed9, 0x2079, 0x0090, 0x2009, 0x0207, 0x210c, 0xd194, 0x01b8,
-	0x2009, 0x020c, 0x210c, 0x9184, 0x0003, 0x0188, 0x080c, 0xd8d5,
-	0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0db4, 0x0016, 0x2009,
-	0x0040, 0x080c, 0x2268, 0x001e, 0x2001, 0x020c, 0x2102, 0x2009,
-	0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009,
-	0x0040, 0x080c, 0x2268, 0x782c, 0xd0fc, 0x09a8, 0x080c, 0x1d4a,
-	0x7000, 0x9086, 0x0000, 0x1978, 0x782b, 0x0004, 0x782c, 0xd0ac,
-	0x1de8, 0x2009, 0x0040, 0x080c, 0x2268, 0x782b, 0x0002, 0x7003,
-	0x0000, 0x080c, 0x1b60, 0x00ee, 0x00fe, 0x0005, 0xa880, 0xd0fc,
-	0x11a8, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005, 0xa004,
-	0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080,
-	0x1f26, 0x2065, 0x8cff, 0x090c, 0x0db4, 0x8a51, 0x0005, 0x2050,
-	0x0005, 0xa880, 0xd0fc, 0x11b8, 0x8a50, 0x8c61, 0x2c05, 0x9005,
-	0x1190, 0x2800, 0x9906, 0x0120, 0xa000, 0x9005, 0x1108, 0x2900,
-	0x2040, 0xa85a, 0xa064, 0x9084, 0x000f, 0x9080, 0x1f36, 0x2065,
-	0x8cff, 0x090c, 0x0db4, 0x0005, 0x0000, 0x001d, 0x0021, 0x0025,
-	0x0029, 0x002d, 0x0031, 0x0035, 0x0000, 0x001b, 0x0021, 0x0027,
-	0x002d, 0x0033, 0x0000, 0x0000, 0x0023, 0x0000, 0x0000, 0x1f19,
-	0x1f15, 0x0000, 0x0000, 0x1f23, 0x0000, 0x1f19, 0x1f20, 0x1f20,
-	0x1f1d, 0x0000, 0x0000, 0x0000, 0x1f23, 0x1f20, 0x0000, 0x1f1b,
-	0x1f1b, 0x0000, 0x0000, 0x1f23, 0x0000, 0x1f1b, 0x1f21, 0x1f21,
-	0x1f21, 0x0000, 0x0000, 0x0000, 0x1f23, 0x1f21, 0x00c6, 0x00d6,
-	0x0086, 0xab42, 0xac3e, 0xa888, 0x9055, 0x0904, 0x2125, 0x2940,
-	0xa064, 0x90ec, 0x000f, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1118,
-	0x2061, 0x1f21, 0x00d0, 0x9de0, 0x1f26, 0x9d86, 0x0007, 0x0130,
-	0x9d86, 0x000e, 0x0118, 0x9d86, 0x000f, 0x1120, 0xa08c, 0x9422,
-	0xa090, 0x931b, 0x2c05, 0x9065, 0x1140, 0x0310, 0x0804, 0x2125,
-	0xa004, 0x9045, 0x0904, 0x2125, 0x08d8, 0x2c05, 0x9005, 0x0904,
-	0x200d, 0xdd9c, 0x1904, 0x1fc9, 0x908a, 0x0036, 0x1a0c, 0x0db4,
-	0x9082, 0x001b, 0x0002, 0x1f9e, 0x1f9e, 0x1fa0, 0x1f9e, 0x1f9e,
-	0x1f9e, 0x1fa6, 0x1f9e, 0x1f9e, 0x1f9e, 0x1fac, 0x1f9e, 0x1f9e,
-	0x1f9e, 0x1fb2, 0x1f9e, 0x1f9e, 0x1f9e, 0x1fb8, 0x1f9e, 0x1f9e,
-	0x1f9e, 0x1fbe, 0x1f9e, 0x1f9e, 0x1f9e, 0x1fc4, 0x080c, 0x0db4,
-	0xa07c, 0x9422, 0xa080, 0x931b, 0x0804, 0x2003, 0xa08c, 0x9422,
-	0xa090, 0x931b, 0x0804, 0x2003, 0xa09c, 0x9422, 0xa0a0, 0x931b,
-	0x0804, 0x2003, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0804, 0x2003,
-	0xa0bc, 0x9422, 0xa0c0, 0x931b, 0x0804, 0x2003, 0xa0cc, 0x9422,
-	0xa0d0, 0x931b, 0x0804, 0x2003, 0xa0dc, 0x9422, 0xa0e0, 0x931b,
-	0x04d0, 0x908a, 0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002,
-	0x1feb, 0x1fe9, 0x1fe9, 0x1fe9, 0x1fe9, 0x1fe9, 0x1ff0, 0x1fe9,
-	0x1fe9, 0x1fe9, 0x1fe9, 0x1fe9, 0x1ff5, 0x1fe9, 0x1fe9, 0x1fe9,
-	0x1fe9, 0x1fe9, 0x1ffa, 0x1fe9, 0x1fe9, 0x1fe9, 0x1fe9, 0x1fe9,
-	0x1fff, 0x080c, 0x0db4, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0098,
-	0xa094, 0x9422, 0xa098, 0x931b, 0x0070, 0xa0ac, 0x9422, 0xa0b0,
-	0x931b, 0x0048, 0xa0c4, 0x9422, 0xa0c8, 0x931b, 0x0020, 0xa0dc,
-	0x9422, 0xa0e0, 0x931b, 0x0630, 0x2300, 0x9405, 0x0160, 0x8a51,
-	0x0904, 0x2125, 0x8c60, 0x0804, 0x1f75, 0xa004, 0x9045, 0x0904,
-	0x2125, 0x0804, 0x1f50, 0x8a51, 0x0904, 0x2125, 0x8c60, 0x2c05,
-	0x9005, 0x1158, 0xa004, 0x9045, 0x0904, 0x2125, 0xa064, 0x90ec,
-	0x000f, 0x9de0, 0x1f26, 0x2c05, 0x2060, 0xa880, 0xc0fc, 0xa882,
-	0x0804, 0x211a, 0x2c05, 0x8422, 0x8420, 0x831a, 0x9399, 0x0000,
-	0xac2e, 0xab32, 0xdd9c, 0x1904, 0x20b7, 0x9082, 0x001b, 0x0002,
-	0x2053, 0x2053, 0x2055, 0x2053, 0x2053, 0x2053, 0x2063, 0x2053,
-	0x2053, 0x2053, 0x2071, 0x2053, 0x2053, 0x2053, 0x207f, 0x2053,
-	0x2053, 0x2053, 0x208d, 0x2053, 0x2053, 0x2053, 0x209b, 0x2053,
-	0x2053, 0x2053, 0x20a9, 0x080c, 0x0db4, 0xa17c, 0x2400, 0x9122,
-	0xa180, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa074, 0x9420, 0xa078,
-	0x9319, 0x0804, 0x2115, 0xa18c, 0x2400, 0x9122, 0xa190, 0x2300,
-	0x911b, 0x0a0c, 0x0db4, 0xa084, 0x9420, 0xa088, 0x9319, 0x0804,
-	0x2115, 0xa19c, 0x2400, 0x9122, 0xa1a0, 0x2300, 0x911b, 0x0a0c,
-	0x0db4, 0xa094, 0x9420, 0xa098, 0x9319, 0x0804, 0x2115, 0xa1ac,
-	0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa0a4,
-	0x9420, 0xa0a8, 0x9319, 0x0804, 0x2115, 0xa1bc, 0x2400, 0x9122,
-	0xa1c0, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa0b4, 0x9420, 0xa0b8,
-	0x9319, 0x0804, 0x2115, 0xa1cc, 0x2400, 0x9122, 0xa1d0, 0x2300,
-	0x911b, 0x0a0c, 0x0db4, 0xa0c4, 0x9420, 0xa0c8, 0x9319, 0x0804,
-	0x2115, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c,
-	0x0db4, 0xa0d4, 0x9420, 0xa0d8, 0x9319, 0x0804, 0x2115, 0x9082,
-	0x001b, 0x0002, 0x20d5, 0x20d3, 0x20d3, 0x20d3, 0x20d3, 0x20d3,
-	0x20e2, 0x20d3, 0x20d3, 0x20d3, 0x20d3, 0x20d3, 0x20ef, 0x20d3,
-	0x20d3, 0x20d3, 0x20d3, 0x20d3, 0x20fc, 0x20d3, 0x20d3, 0x20d3,
-	0x20d3, 0x20d3, 0x2109, 0x080c, 0x0db4, 0xa17c, 0x2400, 0x9122,
-	0xa180, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa06c, 0x9420, 0xa070,
-	0x9319, 0x0498, 0xa194, 0x2400, 0x9122, 0xa198, 0x2300, 0x911b,
-	0x0a0c, 0x0db4, 0xa084, 0x9420, 0xa088, 0x9319, 0x0430, 0xa1ac,
-	0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa09c,
-	0x9420, 0xa0a0, 0x9319, 0x00c8, 0xa1c4, 0x2400, 0x9122, 0xa1c8,
-	0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa0b4, 0x9420, 0xa0b8, 0x9319,
-	0x0060, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c,
-	0x0db4, 0xa0cc, 0x9420, 0xa0d0, 0x9319, 0xac1e, 0xab22, 0xa880,
-	0xc0fd, 0xa882, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x2a00, 0xa816,
-	0x000e, 0x000e, 0x000e, 0x9006, 0x0028, 0x008e, 0x00de, 0x00ce,
-	0x9085, 0x0001, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x190c,
-	0x0dad, 0x9084, 0x0007, 0x0002, 0x2146, 0x1d4a, 0x2146, 0x213c,
-	0x213f, 0x2142, 0x213f, 0x2142, 0x080c, 0x1d4a, 0x0005, 0x080c,
-	0x118f, 0x0005, 0x080c, 0x1d4a, 0x080c, 0x118f, 0x0005, 0x0126,
-	0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069, 0x1800,
-	0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f, 0x0410,
-	0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b, 0x001f,
-	0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091, 0x2600,
-	0x781c, 0xd0a4, 0x190c, 0x2265, 0x7900, 0xd1dc, 0x1118, 0x9084,
-	0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x218d, 0x2185, 0x794e,
-	0x2185, 0x2187, 0x2187, 0x2187, 0x2187, 0x7934, 0x2185, 0x2189,
-	0x2185, 0x2187, 0x2185, 0x2187, 0x2185, 0x080c, 0x0db4, 0x0031,
-	0x0020, 0x080c, 0x7934, 0x080c, 0x794e, 0x0005, 0x0006, 0x0016,
-	0x0026, 0x080c, 0xd8d5, 0x7930, 0x9184, 0x0003, 0x01c0, 0x2001,
-	0x19c7, 0x2004, 0x9005, 0x0170, 0x2001, 0x0133, 0x2004, 0x9005,
-	0x090c, 0x0db4, 0x00c6, 0x2001, 0x19c7, 0x2064, 0x080c, 0xb74a,
-	0x00ce, 0x00f8, 0x2009, 0x0040, 0x080c, 0x2268, 0x00d0, 0x9184,
-	0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160, 0x080c, 0x6fb2,
-	0x1138, 0x080c, 0x7296, 0x080c, 0x5cd1, 0x080c, 0x6ee4, 0x0010,
-	0x080c, 0x5b90, 0x080c, 0x79fd, 0x0041, 0x0018, 0x9184, 0x9540,
-	0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x0036, 0x0046,
-	0x0056, 0x2071, 0x1a33, 0x080c, 0x1958, 0x005e, 0x004e, 0x003e,
-	0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071, 0x1800, 0x7128,
-	0x2001, 0x1940, 0x2102, 0x2001, 0x1948, 0x2102, 0x2001, 0x013b,
-	0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e, 0x78a3, 0x0200,
-	0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398, 0x0005, 0x2320,
-	0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423, 0x8423, 0x8423,
-	0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007, 0x8403, 0x8003,
-	0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc, 0x1238, 0x2011,
-	0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0, 0x9182, 0x034c,
-	0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420, 0x0098, 0x9182,
-	0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423, 0x0058, 0x9182,
-	0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420, 0x0018, 0x2011,
-	0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020, 0x8301, 0x9402,
-	0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405, 0x789a, 0x012e,
-	0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814, 0x9084, 0xffc0,
-	0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6, 0x2069, 0x0200,
-	0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4, 0x6812, 0x00de,
-	0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810, 0x9084, 0xfff8,
-	0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938, 0x080c, 0x0dad,
-	0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001,
-	0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001,
-	0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061, 0x0100,
-	0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2a63, 0x080c, 0x297e,
-	0x6054, 0x8004, 0x8004, 0x8004, 0x8004, 0x9084, 0x000c, 0x6150,
-	0x918c, 0xfff3, 0x9105, 0x6052, 0x6050, 0x9084, 0xb17f, 0x9085,
-	0x2000, 0x6052, 0x2009, 0x196e, 0x2011, 0x196f, 0x6358, 0x939c,
-	0x38f0, 0x2320, 0x080c, 0x29c2, 0x1238, 0x939d, 0x4003, 0x94a5,
-	0x8603, 0x230a, 0x2412, 0x0030, 0x939d, 0x0203, 0x94a5, 0x8603,
-	0x230a, 0x2412, 0x9006, 0x080c, 0x29ad, 0x9006, 0x080c, 0x2990,
-	0x20a9, 0x0012, 0x1d04, 0x22ba, 0x2091, 0x6000, 0x1f04, 0x22ba,
-	0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084,
-	0xdfff, 0x6052, 0x6024, 0x6026, 0x080c, 0x269c, 0x2009, 0x00ef,
-	0x6132, 0x6136, 0x080c, 0x26ac, 0x60e7, 0x0000, 0x61ea, 0x60e3,
-	0x0002, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, 0x0080, 0x602f,
-	0x0000, 0x6007, 0x149f, 0x60bb, 0x0000, 0x20a9, 0x0018, 0x60bf,
-	0x0000, 0x1f04, 0x22e7, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf,
-	0x0012, 0x60bf, 0x0320, 0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f,
-	0x001e, 0x600f, 0x006b, 0x602b, 0x402f, 0x012e, 0x0005, 0x00f6,
-	0x2079, 0x0140, 0x78c3, 0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000,
-	0x00fe, 0x0005, 0x2001, 0x1834, 0x2003, 0x0000, 0x2001, 0x1833,
-	0x2003, 0x0001, 0x0005, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016,
-	0x0026, 0x6124, 0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, 0x002a,
-	0x9195, 0x0004, 0x9284, 0x0007, 0x0002, 0x2347, 0x232d, 0x2330,
-	0x2333, 0x2338, 0x233a, 0x233e, 0x2342, 0x080c, 0x82dd, 0x00b8,
-	0x080c, 0x83aa, 0x00a0, 0x080c, 0x83aa, 0x080c, 0x82dd, 0x0078,
-	0x0099, 0x0068, 0x080c, 0x82dd, 0x0079, 0x0048, 0x080c, 0x83aa,
-	0x0059, 0x0028, 0x080c, 0x83aa, 0x080c, 0x82dd, 0x0029, 0x002e,
-	0x001e, 0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c,
-	0x0118, 0xd19c, 0x1904, 0x2595, 0xd1f4, 0x190c, 0x0dad, 0x080c,
-	0x6fb2, 0x0904, 0x23a2, 0x080c, 0xc212, 0x1120, 0x7000, 0x9086,
-	0x0003, 0x0570, 0x6024, 0x9084, 0x1800, 0x0550, 0x080c, 0x6fd5,
-	0x0118, 0x080c, 0x6fc3, 0x1520, 0x6027, 0x0020, 0x6043, 0x0000,
-	0x080c, 0xc212, 0x0168, 0x080c, 0x6fd5, 0x1150, 0x2001, 0x1978,
-	0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x6e33, 0x0804, 0x2598,
-	0x70a0, 0x9005, 0x1150, 0x70a3, 0x0001, 0x00d6, 0x2069, 0x0140,
-	0x080c, 0x7009, 0x00de, 0x1904, 0x2598, 0x080c, 0x72a0, 0x0428,
-	0x080c, 0x6fd5, 0x1590, 0x6024, 0x9084, 0x1800, 0x1108, 0x0468,
-	0x080c, 0x72a0, 0x080c, 0x7296, 0x080c, 0x5cd1, 0x080c, 0x6ee4,
-	0x0804, 0x2595, 0xd1ac, 0x1508, 0x6024, 0xd0dc, 0x1170, 0xd0e4,
-	0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7094, 0x9086, 0x0028,
-	0x1110, 0x080c, 0x7185, 0x0804, 0x2595, 0x080c, 0x729b, 0x0048,
-	0x2001, 0x194e, 0x2003, 0x0002, 0x0020, 0x080c, 0x70eb, 0x0804,
-	0x2595, 0x080c, 0x721f, 0x0804, 0x2595, 0xd1ac, 0x0904, 0x24b6,
-	0x080c, 0x6fb2, 0x11c0, 0x6027, 0x0020, 0x0006, 0x0026, 0x0036,
-	0x080c, 0x6fcc, 0x1158, 0x080c, 0x7296, 0x080c, 0x5cd1, 0x080c,
-	0x6ee4, 0x003e, 0x002e, 0x000e, 0x00ae, 0x0005, 0x003e, 0x002e,
-	0x000e, 0x080c, 0x6f8a, 0x0016, 0x0046, 0x00c6, 0x644c, 0x9486,
-	0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, 0x6043, 0x0090, 0x6043,
-	0x0010, 0x74d6, 0x948c, 0xff00, 0x7038, 0xd084, 0x0178, 0x9186,
-	0xf800, 0x1160, 0x7044, 0xd084, 0x1148, 0xc085, 0x7046, 0x0036,
-	0x2418, 0x2011, 0x8016, 0x080c, 0x48d9, 0x003e, 0x080c, 0xc20b,
-	0x1904, 0x2493, 0x9196, 0xff00, 0x05a8, 0x705c, 0x9084, 0x00ff,
-	0x810f, 0x81ff, 0x0110, 0x9116, 0x0568, 0x7130, 0xd184, 0x1550,
-	0x080c, 0x3133, 0x0128, 0xc18d, 0x7132, 0x080c, 0x655a, 0x1510,
-	0x6240, 0x9294, 0x0010, 0x0130, 0x6248, 0x9294, 0xff00, 0x9296,
-	0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904, 0x2493, 0x7038, 0xd08c,
-	0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x2493, 0xc1ad,
-	0x2102, 0x0036, 0x73d4, 0x2011, 0x8013, 0x080c, 0x48d9, 0x003e,
-	0x0804, 0x2493, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c,
-	0xd1ac, 0x1904, 0x2493, 0xc1ad, 0x2102, 0x0036, 0x73d4, 0x2011,
-	0x8013, 0x080c, 0x48d9, 0x003e, 0x7130, 0xc185, 0x7132, 0x2011,
-	0x1854, 0x220c, 0x00f0, 0x0016, 0x2009, 0x0001, 0x2011, 0x0100,
-	0x080c, 0x822f, 0x2019, 0x000e, 0x00c6, 0x2061, 0x0000, 0x080c,
-	0xd4a6, 0x00ce, 0x9484, 0x00ff, 0x9080, 0x3138, 0x200d, 0x918c,
-	0xff00, 0x810f, 0x2120, 0x9006, 0x2009, 0x000e, 0x080c, 0xd52a,
-	0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004,
-	0x080c, 0x2fa5, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f,
-	0x900e, 0x080c, 0x623e, 0x1110, 0x080c, 0x5ceb, 0x8108, 0x1f04,
-	0x2489, 0x00be, 0x015e, 0x00ce, 0x004e, 0x080c, 0x9db8, 0x60e3,
-	0x0000, 0x001e, 0x2001, 0x1800, 0x2014, 0x9296, 0x0004, 0x1170,
-	0xd19c, 0x11a0, 0x2011, 0x180c, 0x2214, 0xd29c, 0x1120, 0x6204,
-	0x9295, 0x0002, 0x6206, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001,
-	0x2001, 0x1825, 0x2003, 0x0000, 0x6027, 0x0020, 0xd194, 0x0904,
-	0x2595, 0x0016, 0x6220, 0xd2b4, 0x0904, 0x253e, 0x080c, 0x80b8,
-	0x080c, 0x93ac, 0x6027, 0x0004, 0x00f6, 0x2019, 0x19c1, 0x2304,
-	0x907d, 0x0904, 0x250d, 0x7804, 0x9086, 0x0032, 0x15f0, 0x00d6,
-	0x00c6, 0x00e6, 0x0096, 0x2069, 0x0140, 0x782c, 0x685e, 0x7808,
-	0x685a, 0x6043, 0x0002, 0x2001, 0x0003, 0x8001, 0x1df0, 0x6043,
-	0x0000, 0x2001, 0x003c, 0x8001, 0x1df0, 0x080c, 0x2b24, 0x2001,
-	0x001e, 0x8001, 0x0240, 0x20a9, 0x0009, 0x080c, 0x2a3e, 0x6904,
-	0xd1dc, 0x1140, 0x0cb0, 0x2001, 0x0100, 0x080c, 0x2b14, 0x9006,
-	0x080c, 0x2b14, 0x080c, 0x886e, 0x080c, 0x8973, 0x7814, 0x2048,
-	0xa867, 0x0103, 0x2f60, 0x080c, 0x9e32, 0x009e, 0x00ee, 0x00ce,
-	0x00de, 0x00fe, 0x001e, 0x00ae, 0x0005, 0x00fe, 0x00d6, 0x2069,
-	0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2b24, 0x00de,
-	0x00c6, 0x2061, 0x19b8, 0x6028, 0x080c, 0xc212, 0x0120, 0x909a,
-	0x0003, 0x1258, 0x0018, 0x909a, 0x00c8, 0x1238, 0x8000, 0x602a,
-	0x00ce, 0x080c, 0x9388, 0x0804, 0x2594, 0x2061, 0x0100, 0x62c0,
-	0x080c, 0x9c43, 0x2019, 0x19c1, 0x2304, 0x9065, 0x0120, 0x2009,
-	0x0027, 0x080c, 0x9eac, 0x00ce, 0x0804, 0x2594, 0xd2bc, 0x0904,
-	0x2581, 0x080c, 0x80c5, 0x6014, 0x9084, 0x1984, 0x9085, 0x0010,
-	0x6016, 0x6027, 0x0004, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084,
-	0x4000, 0x0110, 0x080c, 0x2b24, 0x00de, 0x00c6, 0x2061, 0x19b8,
-	0x6044, 0x080c, 0xc212, 0x0120, 0x909a, 0x0003, 0x1628, 0x0018,
-	0x909a, 0x00c8, 0x1608, 0x8000, 0x6046, 0x603c, 0x00ce, 0x9005,
-	0x0558, 0x2009, 0x07d0, 0x080c, 0x80bd, 0x9080, 0x0008, 0x2004,
-	0x9086, 0x0006, 0x1138, 0x6114, 0x918c, 0x1984, 0x918d, 0x0012,
-	0x6116, 0x00d0, 0x6114, 0x918c, 0x1984, 0x918d, 0x0016, 0x6116,
-	0x0098, 0x6027, 0x0004, 0x0080, 0x0036, 0x2019, 0x0001, 0x080c,
-	0x96d8, 0x003e, 0x2019, 0x19c7, 0x2304, 0x9065, 0x0120, 0x2009,
-	0x004f, 0x080c, 0x9eac, 0x00ce, 0x001e, 0xd19c, 0x0904, 0x2607,
-	0x7038, 0xd0ac, 0x1904, 0x25dc, 0x0016, 0x0156, 0x6027, 0x0008,
-	0x6050, 0x9085, 0x0040, 0x6052, 0x6050, 0x9084, 0xfbcf, 0x6052,
-	0x080c, 0x2a5d, 0x9085, 0x2000, 0x6052, 0x20a9, 0x0012, 0x1d04,
-	0x25af, 0x080c, 0x80ec, 0x1f04, 0x25af, 0x6050, 0x9085, 0x0400,
-	0x9084, 0xdfbf, 0x6052, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x25bd,
-	0x6150, 0x9185, 0x1400, 0x6052, 0x20a9, 0x0366, 0x1d04, 0x25c6,
-	0x080c, 0x80ec, 0x6020, 0xd09c, 0x1130, 0x015e, 0x6152, 0x001e,
-	0x6027, 0x0008, 0x04a0, 0x080c, 0x2a25, 0x1f04, 0x25c6, 0x015e,
-	0x6152, 0x001e, 0x6027, 0x0008, 0x0016, 0x6028, 0xc09c, 0x602a,
-	0x080c, 0x9db8, 0x60e3, 0x0000, 0x080c, 0xd8b4, 0x080c, 0xd8cf,
-	0x080c, 0x538a, 0xd0fc, 0x1138, 0x080c, 0xc20b, 0x1120, 0x9085,
-	0x0001, 0x080c, 0x6ff9, 0x9006, 0x080c, 0x2b14, 0x2009, 0x0002,
-	0x080c, 0x2a63, 0x00e6, 0x2071, 0x1800, 0x7003, 0x0004, 0x080c,
-	0x0e80, 0x00ee, 0x6027, 0x0008, 0x080c, 0x0b8f, 0x001e, 0x918c,
-	0xffd0, 0x6126, 0x00ae, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036,
-	0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x71cc,
-	0x70ce, 0x9116, 0x0904, 0x265b, 0x81ff, 0x01a0, 0x2009, 0x0000,
-	0x080c, 0x2a63, 0x2011, 0x8011, 0x2019, 0x010e, 0x231c, 0x939e,
-	0x0007, 0x1118, 0x2019, 0x0001, 0x0010, 0x2019, 0x0000, 0x080c,
-	0x48d9, 0x0448, 0x2001, 0x1979, 0x200c, 0x81ff, 0x1140, 0x2001,
-	0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019, 0x0003, 0x0008, 0x2118,
-	0x2011, 0x8012, 0x080c, 0x48d9, 0x080c, 0x0e80, 0x080c, 0x538a,
-	0xd0fc, 0x1188, 0x080c, 0xc20b, 0x1170, 0x00c6, 0x080c, 0x26f7,
-	0x080c, 0x963f, 0x2061, 0x0100, 0x2019, 0x0028, 0x2009, 0x0002,
-	0x080c, 0x2fa5, 0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e, 0x002e,
-	0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094,
-	0xff00, 0x11f0, 0x2011, 0x1836, 0x2214, 0xd2ac, 0x11c8, 0x81ff,
-	0x01e8, 0x2011, 0x181e, 0x2204, 0x9106, 0x1190, 0x2011, 0x181f,
-	0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206, 0x1148, 0x2011,
-	0x181f, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206, 0x1120,
-	0x2500, 0x080c, 0x7c57, 0x0048, 0x9584, 0x00ff, 0x9080, 0x3138,
-	0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005, 0x9080, 0x3138,
-	0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140, 0x2001,
-	0x1817, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852, 0x6856,
-	0x1f04, 0x26a7, 0x00de, 0x0005, 0x0006, 0x00d6, 0x0026, 0x2069,
-	0x0140, 0x2001, 0x1817, 0x2102, 0x8114, 0x8214, 0x8214, 0x8214,
-	0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff, 0x1128, 0x9184,
-	0x000f, 0x9080, 0xdd89, 0x2005, 0x6856, 0x8211, 0x1f04, 0x26bc,
-	0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061, 0x1800, 0x6030,
-	0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156,
-	0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140, 0x6980, 0x9116,
-	0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8, 0x2001, 0x0402,
-	0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04, 0x26ec, 0x680f,
-	0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e, 0x0005, 0x080c,
-	0x5386, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046, 0x2020,
-	0x2009, 0x002e, 0x080c, 0xd52a, 0x004e, 0x0005, 0x00f6, 0x0016,
-	0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904, 0x2763, 0x080c,
-	0x29c2, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600, 0x1120, 0x2011,
-	0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120, 0x2011, 0x8000,
-	0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016, 0x2009, 0x0001,
-	0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009, 0x0002, 0x00b0,
-	0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004, 0x0078, 0x908e,
-	0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040, 0x9084, 0x0700,
-	0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058, 0x2300, 0x9080,
-	0x0020, 0x2018, 0x080c, 0x8270, 0x928c, 0xff00, 0x0110, 0x2011,
-	0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2, 0x2009, 0x0138,
-	0x220a, 0x080c, 0x6fb2, 0x1118, 0x2009, 0x193e, 0x220a, 0x002e,
-	0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091,
-	0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170, 0x200c, 0x8000,
-	0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0dad, 0x002e, 0x001e,
-	0x000e, 0x012e, 0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc, 0x0168,
-	0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e, 0x004c, 0x1128,
-	0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e, 0x2001, 0x0227,
-	0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x2001, 0x0226,
-	0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x0005, 0x0018,
-	0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000, 0x1800, 0x0156,
-	0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x1961, 0x2004, 0x908a,
-	0x0007, 0x1a0c, 0x0db4, 0x0033, 0x00ee, 0x002e, 0x001e, 0x000e,
-	0x015e, 0x0005, 0x27c1, 0x27df, 0x2803, 0x2805, 0x282e, 0x2830,
-	0x2832, 0x2001, 0x0001, 0x080c, 0x260c, 0x080c, 0x2a20, 0x2001,
-	0x1963, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a, 0x9006,
-	0x20a9, 0x0009, 0x080c, 0x29de, 0x2001, 0x1961, 0x2003, 0x0006,
-	0x2009, 0x001e, 0x2011, 0x2833, 0x080c, 0x80ca, 0x0005, 0x2009,
-	0x1966, 0x200b, 0x0000, 0x2001, 0x196b, 0x2003, 0x0036, 0x2001,
-	0x196a, 0x2003, 0x002a, 0x2001, 0x1963, 0x2003, 0x0001, 0x9006,
-	0x080c, 0x2990, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x29de,
-	0x2001, 0x1961, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2833,
-	0x080c, 0x80ca, 0x0005, 0x080c, 0x0db4, 0x2001, 0x196b, 0x2003,
-	0x0036, 0x2001, 0x1963, 0x2003, 0x0003, 0x7a38, 0x9294, 0x0005,
-	0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x2990, 0x2001, 0x1967, 0x2003, 0x0000, 0x2001, 0xffff, 0x20a9,
-	0x0009, 0x080c, 0x29de, 0x2001, 0x1961, 0x2003, 0x0006, 0x2009,
-	0x001e, 0x2011, 0x2833, 0x080c, 0x80ca, 0x0005, 0x080c, 0x0db4,
-	0x080c, 0x0db4, 0x0005, 0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6,
-	0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2001, 0x1963,
-	0x2004, 0x908a, 0x0007, 0x1a0c, 0x0db4, 0x0043, 0x012e, 0x015e,
-	0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, 0x2855, 0x2875,
-	0x28b5, 0x28e5, 0x2909, 0x2919, 0x291b, 0x080c, 0x29d2, 0x11b0,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1969, 0x2104, 0x7a38,
-	0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0xc08d, 0x0008, 0xc085,
-	0x200a, 0x2001, 0x1961, 0x2003, 0x0001, 0x0030, 0x080c, 0x293f,
-	0x2001, 0xffff, 0x080c, 0x27d0, 0x0005, 0x080c, 0x291d, 0x05e0,
-	0x2009, 0x196a, 0x2104, 0x8001, 0x200a, 0x080c, 0x29d2, 0x1178,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x7a38, 0x9294, 0x0005, 0x9296,
-	0x0005, 0x0518, 0x2009, 0x1969, 0x2104, 0xc085, 0x200a, 0x2009,
-	0x1966, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0118, 0x080c,
-	0x2925, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296,
-	0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x29ad,
-	0x2001, 0x1963, 0x2003, 0x0002, 0x0028, 0x2001, 0x1961, 0x2003,
-	0x0003, 0x0010, 0x080c, 0x27f2, 0x0005, 0x080c, 0x291d, 0x0560,
-	0x2009, 0x196a, 0x2104, 0x8001, 0x200a, 0x080c, 0x29d2, 0x1168,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x2001, 0x1961, 0x2003, 0x0003,
-	0x2001, 0x1962, 0x2003, 0x0000, 0x00b8, 0x2009, 0x196a, 0x2104,
-	0x9005, 0x1118, 0x080c, 0x2962, 0x0010, 0x080c, 0x2932, 0x080c,
-	0x2925, 0x2009, 0x1966, 0x200b, 0x0000, 0x2001, 0x1963, 0x2003,
-	0x0001, 0x080c, 0x27f2, 0x0000, 0x0005, 0x04b9, 0x0508, 0x080c,
-	0x29d2, 0x11b8, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1967,
-	0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108, 0x0078, 0x2001,
-	0x196c, 0x2003, 0x000a, 0x2009, 0x1969, 0x2104, 0xc0fd, 0x200a,
-	0x0038, 0x0419, 0x2001, 0x1963, 0x2003, 0x0004, 0x080c, 0x281d,
-	0x0005, 0x0099, 0x0168, 0x080c, 0x29d2, 0x1138, 0x7850, 0x9084,
-	0xefff, 0x7852, 0x080c, 0x2809, 0x0018, 0x0079, 0x080c, 0x281d,
-	0x0005, 0x080c, 0x0db4, 0x080c, 0x0db4, 0x2009, 0x196b, 0x2104,
-	0x8001, 0x200a, 0x090c, 0x297e, 0x0005, 0x7a38, 0x9294, 0x0005,
-	0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x29ad, 0x0005, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2990, 0x0005, 0x2009,
-	0x1966, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0108, 0x0068,
-	0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x04d9, 0x7a38, 0x9294, 0x0005,
-	0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x29ad, 0x0005, 0x0086, 0x2001, 0x1969, 0x2004, 0x9084, 0x7fff,
-	0x090c, 0x0db4, 0x2009, 0x1968, 0x2144, 0x8846, 0x280a, 0x9844,
-	0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120, 0x080c, 0x0db4, 0x9006,
-	0x0010, 0x2001, 0x0001, 0x00a1, 0x008e, 0x0005, 0x0006, 0x0156,
-	0x2001, 0x1961, 0x20a9, 0x0009, 0x2003, 0x0000, 0x8000, 0x1f04,
-	0x2984, 0x2001, 0x1968, 0x2003, 0x8000, 0x015e, 0x000e, 0x0005,
-	0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158, 0x7838, 0x9084,
-	0xfff9, 0x9085, 0x0004, 0x783a, 0x2009, 0x196e, 0x210c, 0x795a,
-	0x0050, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0006, 0x783a, 0x2009,
-	0x196f, 0x210c, 0x795a, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100,
-	0x9085, 0x0000, 0x0138, 0x7838, 0x9084, 0xfffa, 0x9085, 0x0004,
-	0x783a, 0x0030, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0005, 0x783a,
-	0x00fe, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0007,
-	0x000e, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0009,
-	0x000e, 0x0005, 0x0156, 0x20a9, 0x0064, 0x7820, 0x080c, 0x2a5d,
-	0xd09c, 0x1110, 0x1f04, 0x29d5, 0x015e, 0x0005, 0x0126, 0x0016,
-	0x0006, 0x2091, 0x8000, 0x7850, 0x9085, 0x0040, 0x7852, 0x7850,
-	0x9084, 0xfbcf, 0x7852, 0x080c, 0x2a5d, 0x9085, 0x2000, 0x7852,
-	0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b, 0x0007, 0x0090,
-	0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060, 0x9186, 0x0002,
-	0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003, 0x1118, 0x783b,
-	0x0004, 0x0000, 0x0006, 0x1d04, 0x2a0b, 0x080c, 0x80ec, 0x1f04,
-	0x2a0b, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852, 0x080c,
-	0x2a5d, 0x9085, 0x1000, 0x7852, 0x000e, 0x001e, 0x012e, 0x0005,
-	0x7850, 0x9084, 0xffcf, 0x7852, 0x0005, 0x0006, 0x0156, 0x00f6,
-	0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1130, 0x7820,
-	0xd0e4, 0x1140, 0x1f04, 0x2a2f, 0x0028, 0x7854, 0xd08c, 0x1110,
-	0x1f04, 0x2a35, 0x00fe, 0x015e, 0x000e, 0x0005, 0x1d04, 0x2a3e,
-	0x080c, 0x80ec, 0x1f04, 0x2a3e, 0x0005, 0x0006, 0x2001, 0x196d,
-	0x2004, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x2001, 0x196d,
-	0x2004, 0x9086, 0x0001, 0x000e, 0x0005, 0x0006, 0x2001, 0x196d,
-	0x2004, 0x9086, 0x0002, 0x000e, 0x0005, 0xa001, 0xa001, 0xa001,
-	0xa001, 0xa001, 0x0005, 0x0006, 0x2001, 0x1979, 0x2102, 0x000e,
-	0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, 0x0140, 0x2009, 0x0170,
-	0x2104, 0x200b, 0x0080, 0xa001, 0xa001, 0x200a, 0x0005, 0x0036,
-	0x0046, 0x2001, 0x0141, 0x200c, 0x918c, 0xff00, 0x9186, 0x2000,
-	0x0118, 0x9186, 0x0100, 0x1588, 0x2009, 0x00a2, 0x080c, 0x0e2f,
-	0x2019, 0x0160, 0x2324, 0x2011, 0x0003, 0x2009, 0x0169, 0x2104,
-	0x9084, 0x0007, 0x210c, 0x918c, 0x0007, 0x910e, 0x1db0, 0x9086,
-	0x0003, 0x11b8, 0x2304, 0x9402, 0x02a0, 0x1d60, 0x8211, 0x1d68,
-	0x84ff, 0x0170, 0x2001, 0x0141, 0x200c, 0x918c, 0xff00, 0x9186,
-	0x0100, 0x0130, 0x2009, 0x180c, 0x2104, 0xc0dd, 0x200a, 0x0008,
-	0x0419, 0x2009, 0x0000, 0x080c, 0x0e2f, 0x004e, 0x003e, 0x0005,
-	0x2001, 0x180c, 0x2004, 0xd0dc, 0x01b0, 0x2001, 0x0160, 0x2004,
-	0x9005, 0x0140, 0x2001, 0x0141, 0x2004, 0x9084, 0xff00, 0x9086,
-	0x0100, 0x1148, 0x0126, 0x2091, 0x8000, 0x0016, 0x0026, 0x0021,
-	0x002e, 0x001e, 0x012e, 0x0005, 0x00c6, 0x2061, 0x0100, 0x6014,
-	0x0006, 0x2001, 0x0161, 0x2003, 0x0000, 0x6017, 0x0018, 0xa001,
-	0xa001, 0x602f, 0x0008, 0x6104, 0x918e, 0x0010, 0x6106, 0x918e,
-	0x0010, 0x6106, 0x6017, 0x0040, 0x04b9, 0x001e, 0x9184, 0x0003,
-	0x01e0, 0x0036, 0x0016, 0x2019, 0x0141, 0x6124, 0x918c, 0x0028,
-	0x1120, 0x2304, 0x9084, 0x2800, 0x0dc0, 0x001e, 0x919c, 0xffe4,
-	0x9184, 0x0001, 0x0118, 0x9385, 0x0009, 0x6016, 0x9184, 0x0002,
-	0x0118, 0x9385, 0x0012, 0x6016, 0x003e, 0x2001, 0x180c, 0x200c,
-	0xc1dc, 0x2102, 0x00ce, 0x0005, 0x0016, 0x0026, 0x080c, 0x6fcc,
-	0x0108, 0xc0bc, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215,
+	0xc0bd, 0xa882, 0x080c, 0xb75d, 0x0005, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xbf16, 0x2029, 0x00c8,
+	0x8529, 0x0128, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc,
+	0x080c, 0xd8ad, 0xd5a4, 0x1118, 0x080c, 0x14a9, 0x0005, 0x080c,
+	0x79f0, 0x080c, 0x195a, 0x0005, 0x781f, 0x0300, 0x7803, 0x0001,
+	0x0005, 0x0016, 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, 0x7908,
+	0x918c, 0x0007, 0x9186, 0x0003, 0x0120, 0x2001, 0x0016, 0x080c,
+	0x151a, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, 0xc09d,
+	0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0db4, 0xd184,
+	0x1189, 0xd19c, 0x0158, 0xc19c, 0x7106, 0x2001, 0x020d, 0x2003,
+	0x0050, 0x2003, 0x0020, 0x080c, 0x14a9, 0x0005, 0x81ff, 0x190c,
+	0x0db4, 0x0005, 0xc184, 0xd1b4, 0xc1b4, 0x7106, 0x0016, 0x00e6,
+	0x15e0, 0x2071, 0x0200, 0x080c, 0x15d4, 0x6014, 0x9005, 0x05a8,
+	0x0096, 0x2048, 0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029,
+	0x0160, 0x908e, 0x0048, 0x1548, 0x601c, 0xd084, 0x11d8, 0x00f6,
+	0x2c78, 0x080c, 0x164a, 0x00fe, 0x00a8, 0x00f6, 0x2c78, 0x080c,
+	0x1792, 0x00fe, 0x2009, 0x01f4, 0x8109, 0x0160, 0x2001, 0x0201,
+	0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110,
+	0x0401, 0x0040, 0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x12c5,
+	0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, 0x2001, 0x020d, 0x2003,
+	0x0050, 0x2003, 0x0020, 0x0069, 0x0ca8, 0x0031, 0x2060, 0x2009,
+	0x0053, 0x080c, 0x9ebc, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820,
+	0x0005, 0x080c, 0x1421, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4,
+	0x8109, 0x0510, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x79bc, 0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180,
+	0x9182, 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c,
+	0x810c, 0x810c, 0x080c, 0x150c, 0x6827, 0x0001, 0x8109, 0x1dd0,
+	0x04d9, 0x6827, 0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c,
+	0xd0e4, 0x1500, 0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130,
+	0x08c0, 0x080c, 0x79f0, 0x080c, 0x195a, 0x0090, 0x7827, 0x0015,
+	0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d,
+	0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001,
+	0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30,
+	0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085,
+	0x1800, 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0,
+	0x0005, 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086,
+	0x0041, 0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c,
+	0x0140, 0x0016, 0x0026, 0x00c6, 0x080c, 0x130c, 0x00ce, 0x002e,
+	0x001e, 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080,
+	0x0059, 0x1118, 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900,
+	0x8000, 0x2004, 0x080c, 0x0db4, 0x2009, 0x180c, 0x2104, 0xc0f4,
+	0x200a, 0x2009, 0xff00, 0x8109, 0x0904, 0x1598, 0x7a18, 0x9284,
+	0x0030, 0x0904, 0x1593, 0x9284, 0x0048, 0x9086, 0x0008, 0x1904,
+	0x1593, 0x2001, 0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x0126, 0x2091, 0x2800, 0x00f6,
+	0x0026, 0x0016, 0x2009, 0x1a4c, 0x2104, 0x8000, 0x0208, 0x200a,
+	0x080c, 0x8393, 0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, 0x014e,
+	0x013e, 0x01de, 0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, 0xd0fc,
+	0x01d0, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x00f6, 0x0016, 0x2009, 0x1a4d, 0x2104, 0x8000, 0x0208, 0x200a,
+	0x080c, 0x1d4c, 0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, 0x01de,
+	0x01ce, 0x012e, 0x000e, 0x7818, 0xd0bc, 0x1904, 0x1543, 0x0005,
+	0x2001, 0x180c, 0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, 0x0030,
+	0x0508, 0x9284, 0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, 0x19c6,
+	0x2004, 0x9005, 0x01b8, 0x2001, 0x1a35, 0x2004, 0x9086, 0x0000,
+	0x0188, 0x2009, 0x1a4b, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c,
+	0x9431, 0x2009, 0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, 0xff00,
+	0x0804, 0x1543, 0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a,
+	0x781b, 0x8080, 0x080c, 0x153c, 0x1108, 0x0005, 0x792c, 0x3900,
+	0x8000, 0x2004, 0x080c, 0x0db4, 0x7037, 0x0001, 0x7150, 0x7037,
+	0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x0005,
+	0x00e6, 0x0016, 0x2071, 0x0200, 0x0c79, 0x6124, 0xd1dc, 0x01f8,
+	0x701c, 0xd08c, 0x0904, 0x163f, 0x7017, 0x0000, 0x2001, 0x0264,
+	0x2004, 0xd0bc, 0x0904, 0x163f, 0x2001, 0x0268, 0x00c6, 0x2064,
+	0x6104, 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x163f, 0x9c06,
+	0x15f0, 0x0126, 0x2091, 0x2600, 0x080c, 0x7937, 0x012e, 0x7358,
+	0x745c, 0x6014, 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x190c, 0xbef1, 0xab42, 0xac3e, 0x2001,
+	0x1875, 0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff,
+	0xa837, 0xffff, 0x080c, 0x1f48, 0x1190, 0x080c, 0x17ed, 0x2a00,
+	0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812,
+	0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037,
+	0x0050, 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x14a9, 0x0005,
+	0x080c, 0x0db4, 0x0016, 0x2009, 0x00a0, 0x8109, 0xa001, 0xa001,
+	0xa001, 0x1dd8, 0x001e, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x00c6,
+	0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730, 0xa864, 0x2068,
+	0xa81a, 0x9d84, 0x000f, 0x9088, 0x1f28, 0x2165, 0x0002, 0x167e,
+	0x16cb, 0x167e, 0x167e, 0x167e, 0x16ad, 0x167e, 0x1682, 0x1677,
+	0x16c2, 0x167e, 0x167e, 0x167e, 0x1787, 0x1696, 0x168c, 0xa964,
+	0x918c, 0x00ff, 0x918e, 0x0048, 0x0904, 0x16c2, 0x9085, 0x0001,
+	0x0804, 0x177e, 0xa87c, 0xd0bc, 0x0dc8, 0xa890, 0xa842, 0xa88c,
+	0xa83e, 0xa888, 0x0804, 0x16d2, 0xa87c, 0xd0bc, 0x0d78, 0xa890,
+	0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x1721, 0xa87c, 0xd0bc,
+	0x0d28, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c,
+	0x0db4, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1f28, 0x2065,
+	0xa888, 0xd19c, 0x1904, 0x1721, 0x0428, 0xa87c, 0xd0ac, 0x0970,
+	0xa804, 0x9045, 0x090c, 0x0db4, 0xa164, 0xa91a, 0x91ec, 0x000f,
+	0x9d80, 0x1f28, 0x2065, 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904,
+	0x1721, 0x0080, 0xa87c, 0xd0ac, 0x0904, 0x167e, 0x9006, 0xa842,
+	0xa83e, 0x0804, 0x1721, 0xa87c, 0xd0ac, 0x0904, 0x167e, 0x9006,
+	0xa842, 0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0db4, 0x9082,
+	0x001b, 0x0002, 0x16f5, 0x16f5, 0x16f7, 0x16f5, 0x16f5, 0x16f5,
+	0x16fd, 0x16f5, 0x16f5, 0x16f5, 0x1703, 0x16f5, 0x16f5, 0x16f5,
+	0x1709, 0x16f5, 0x16f5, 0x16f5, 0x170f, 0x16f5, 0x16f5, 0x16f5,
+	0x1715, 0x16f5, 0x16f5, 0x16f5, 0x171b, 0x080c, 0x0db4, 0xa574,
+	0xa478, 0xa37c, 0xa280, 0x0804, 0x1766, 0xa584, 0xa488, 0xa38c,
+	0xa290, 0x0804, 0x1766, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804,
+	0x1766, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1766, 0xa5b4,
+	0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x1766, 0xa5c4, 0xa4c8, 0xa3cc,
+	0xa2d0, 0x0804, 0x1766, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804,
+	0x1766, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b,
+	0x0002, 0x1744, 0x1742, 0x1742, 0x1742, 0x1742, 0x1742, 0x174b,
+	0x1742, 0x1742, 0x1742, 0x1742, 0x1742, 0x1752, 0x1742, 0x1742,
+	0x1742, 0x1742, 0x1742, 0x1759, 0x1742, 0x1742, 0x1742, 0x1742,
+	0x1742, 0x1760, 0x080c, 0x0db4, 0xa56c, 0xa470, 0xa774, 0xa678,
+	0xa37c, 0xa280, 0x00d8, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394,
+	0xa298, 0x00a0, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0,
+	0x0068, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0030,
+	0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32,
+	0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac,
+	0xaab0, 0xa836, 0xaa3a, 0x8109, 0xa916, 0x1158, 0x3e60, 0x601c,
+	0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e,
+	0x0005, 0x2800, 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c78, 0x0804,
+	0x167e, 0x0016, 0x2009, 0x00a0, 0x8109, 0xa001, 0xa001, 0xa001,
+	0x1dd8, 0x001e, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60,
+	0x6014, 0x2048, 0x2940, 0xa80e, 0x2061, 0x1f23, 0xa813, 0x1f23,
+	0x2c05, 0xa80a, 0xa964, 0xa91a, 0xa87c, 0xd0ac, 0x090c, 0x0db4,
+	0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4,
+	0xadcc, 0xacd0, 0xafd4, 0xaed8, 0xabdc, 0xaae0, 0xab2e, 0xaa32,
+	0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa8ac, 0xaab0, 0xa836, 0xaa3a,
+	0xa988, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1120, 0x8109,
+	0xa916, 0x0128, 0x0078, 0x918a, 0x0002, 0xa916, 0x1158, 0x3e60,
+	0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce,
+	0x012e, 0x0005, 0xa804, 0x9045, 0x090c, 0x0db4, 0xa80e, 0xa064,
+	0xa81a, 0x9084, 0x000f, 0x9080, 0x1f28, 0x2015, 0x82ff, 0x090c,
+	0x0db4, 0xaa12, 0x2205, 0xa80a, 0x0c10, 0x903e, 0x2730, 0xa880,
+	0xd0fc, 0x1190, 0x2d00, 0x0002, 0x18e2, 0x1844, 0x1844, 0x18e2,
+	0x18e2, 0x18dc, 0x18e2, 0x1844, 0x1893, 0x1893, 0x1893, 0x18e2,
+	0x18e2, 0x18e2, 0x18d9, 0x1893, 0xc0fc, 0xa882, 0xab2c, 0xaa30,
+	0xad1c, 0xac20, 0xdd9c, 0x0904, 0x18e4, 0x2c05, 0x908a, 0x0034,
+	0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1830, 0x182e, 0x182e,
+	0x182e, 0x182e, 0x182e, 0x1834, 0x182e, 0x182e, 0x182e, 0x182e,
+	0x182e, 0x1838, 0x182e, 0x182e, 0x182e, 0x182e, 0x182e, 0x183c,
+	0x182e, 0x182e, 0x182e, 0x182e, 0x182e, 0x1840, 0x080c, 0x0db4,
+	0xa774, 0xa678, 0x0804, 0x18e4, 0xa78c, 0xa690, 0x0804, 0x18e4,
+	0xa7a4, 0xa6a8, 0x0804, 0x18e4, 0xa7bc, 0xa6c0, 0x0804, 0x18e4,
+	0xa7d4, 0xa6d8, 0x0804, 0x18e4, 0x2c05, 0x908a, 0x0036, 0x1a0c,
+	0x0db4, 0x9082, 0x001b, 0x0002, 0x1867, 0x1867, 0x1869, 0x1867,
+	0x1867, 0x1867, 0x186f, 0x1867, 0x1867, 0x1867, 0x1875, 0x1867,
+	0x1867, 0x1867, 0x187b, 0x1867, 0x1867, 0x1867, 0x1881, 0x1867,
+	0x1867, 0x1867, 0x1887, 0x1867, 0x1867, 0x1867, 0x188d, 0x080c,
+	0x0db4, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x18e4, 0xa584,
+	0xa488, 0xa38c, 0xa290, 0x0804, 0x18e4, 0xa594, 0xa498, 0xa39c,
+	0xa2a0, 0x0804, 0x18e4, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804,
+	0x18e4, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x18e4, 0xa5c4,
+	0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x18e4, 0xa5d4, 0xa4d8, 0xa3dc,
+	0xa2e0, 0x0804, 0x18e4, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4,
+	0x9082, 0x001b, 0x0002, 0x18b6, 0x18b4, 0x18b4, 0x18b4, 0x18b4,
+	0x18b4, 0x18bd, 0x18b4, 0x18b4, 0x18b4, 0x18b4, 0x18b4, 0x18c4,
+	0x18b4, 0x18b4, 0x18b4, 0x18b4, 0x18b4, 0x18cb, 0x18b4, 0x18b4,
+	0x18b4, 0x18b4, 0x18b4, 0x18d2, 0x080c, 0x0db4, 0xa56c, 0xa470,
+	0xa774, 0xa678, 0xa37c, 0xa280, 0x0438, 0xa584, 0xa488, 0xa78c,
+	0xa690, 0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8,
+	0xa3ac, 0xa2b0, 0x00c8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4,
+	0xa2c8, 0x0090, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0,
+	0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x1ee0, 0x1904, 0x17ed,
+	0x900e, 0x0050, 0x080c, 0x0db4, 0xab2e, 0xaa32, 0xad1e, 0xac22,
+	0xaf26, 0xae2a, 0x080c, 0x1ee0, 0x0005, 0x6014, 0x2048, 0x6118,
+	0x810c, 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, 0x0001, 0x0008,
+	0xa986, 0x601b, 0x0002, 0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934,
+	0xa88c, 0x9106, 0x1158, 0xa938, 0xa890, 0x9106, 0x1138, 0x601c,
+	0xc084, 0x601e, 0x2009, 0x0048, 0x0804, 0x9ebc, 0x0005, 0x0126,
+	0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, 0x0007, 0x9186,
+	0x0000, 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, 0x6023, 0x0000,
+	0x0006, 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c,
+	0x0120, 0x080c, 0x130c, 0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800,
+	0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, 0x130c, 0x00ce,
+	0x2001, 0x0038, 0x080c, 0x19e7, 0x7930, 0x9186, 0x0040, 0x0160,
+	0x9186, 0x0042, 0x190c, 0x0db4, 0x2001, 0x001e, 0x8001, 0x1df0,
+	0x8631, 0x1d40, 0x080c, 0x19f6, 0x000e, 0x6022, 0x012e, 0x0005,
+	0x080c, 0x19e3, 0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b,
+	0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, 0x0000, 0x78ab,
+	0x0004, 0x00fe, 0x080c, 0x6f9b, 0x11b0, 0x2001, 0x0138, 0x2003,
+	0x0000, 0x2001, 0x0160, 0x2003, 0x0000, 0x2011, 0x012c, 0xa001,
+	0xa001, 0x8211, 0x1de0, 0x0081, 0x0066, 0x2031, 0x0000, 0x080c,
+	0x704b, 0x006e, 0x0005, 0x0479, 0x0039, 0x2001, 0x0160, 0x2502,
+	0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, 0x0200, 0x080c,
+	0x2a6b, 0x2009, 0x003c, 0x080c, 0x226a, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, 0x7f46, 0x70a0,
+	0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001, 0x020d, 0x2003,
+	0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x12c5, 0x7803, 0x0001,
+	0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000,
+	0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x6f9b, 0x1108,
+	0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168,
+	0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160, 0x2001, 0x0111,
+	0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003, 0x0048, 0xa001,
+	0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421, 0x1db0, 0x004e,
+	0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, 0x0005, 0x2c08,
+	0x621c, 0x080c, 0x151a, 0x7930, 0x0005, 0x2c08, 0x621c, 0x080c,
+	0x15c5, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, 0x2031, 0x0005,
+	0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038, 0x0c41, 0x9186,
+	0x0040, 0x0904, 0x1a54, 0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80,
+	0x080c, 0x0db4, 0x781f, 0x0202, 0x2001, 0x015d, 0x2003, 0x0000,
+	0x2001, 0x0b10, 0x0c01, 0x781c, 0xd084, 0x0110, 0x0861, 0x04e0,
+	0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568, 0x781c, 0xd084,
+	0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869, 0x2001, 0x0037,
+	0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030, 0x080c, 0x19ed,
+	0x9186, 0x0040, 0x190c, 0x0db4, 0x00d6, 0x2069, 0x0200, 0x692c,
+	0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800, 0x9085,
+	0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184, 0x0007, 0x1db0,
+	0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007, 0x090c, 0x0db4,
+	0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126, 0x2091, 0x2400,
+	0x2071, 0x1a35, 0x2079, 0x0090, 0x012e, 0x0005, 0x9280, 0x0005,
+	0x2004, 0x2048, 0xa97c, 0xd1dc, 0x1904, 0x1ae9, 0xa964, 0x9184,
+	0x0007, 0x0002, 0x1a72, 0x1ad4, 0x1a89, 0x1a89, 0x1a89, 0x1abc,
+	0x1a9c, 0x1a8b, 0x918c, 0x00ff, 0x9186, 0x0008, 0x1170, 0xa87c,
+	0xd0b4, 0x0904, 0x1d07, 0x9006, 0xa842, 0xa83e, 0xa988, 0x2900,
+	0xa85a, 0xa813, 0x1f23, 0x0804, 0x1ae5, 0x9186, 0x0048, 0x0904,
+	0x1ad4, 0x080c, 0x0db4, 0xa87c, 0xd0b4, 0x0904, 0x1d07, 0xa890,
+	0xa842, 0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0,
+	0xa84a, 0xa988, 0x0804, 0x1adc, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x001e, 0x1d38, 0xa87c, 0xd0b4, 0x0904, 0x1d07, 0xa890, 0xa842,
+	0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a,
+	0xa804, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1f28,
+	0x2005, 0xa812, 0xa988, 0x0448, 0x918c, 0x00ff, 0x9186, 0x0015,
+	0x1540, 0xa87c, 0xd0b4, 0x0904, 0x1d07, 0xa804, 0xa85a, 0x2040,
+	0xa064, 0x9084, 0x000f, 0x9080, 0x1f28, 0x2005, 0xa812, 0xa988,
+	0x9006, 0xa842, 0xa83e, 0x0088, 0xa87c, 0xd0b4, 0x0904, 0x1d07,
+	0xa988, 0x9006, 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa864, 0x9084,
+	0x000f, 0x9080, 0x1f28, 0x2005, 0xa812, 0xa916, 0xa87c, 0xc0dd,
+	0xa87e, 0x0005, 0x00f6, 0x2079, 0x0090, 0x782c, 0xd0fc, 0x190c,
+	0x1d4c, 0x00e6, 0x2071, 0x1a35, 0x7000, 0x9005, 0x1904, 0x1b52,
+	0x7206, 0x9280, 0x0005, 0x204c, 0x9280, 0x0004, 0x2004, 0x782b,
+	0x0004, 0x00f6, 0x2079, 0x0200, 0x7803, 0x0040, 0x00fe, 0x00b6,
+	0x2058, 0xb86c, 0x7836, 0xb890, 0x00be, 0x00f6, 0x2079, 0x0200,
+	0x7803, 0x0040, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001,
+	0x781a, 0x2079, 0x0100, 0x8004, 0x78d6, 0x00fe, 0xa814, 0x2050,
+	0xa858, 0x2040, 0xa810, 0x2060, 0xa064, 0x90ec, 0x000f, 0xa944,
+	0x791a, 0x7116, 0xa848, 0x781e, 0x701a, 0x9006, 0x700e, 0x7012,
+	0x7004, 0xa940, 0xa838, 0x9106, 0x1500, 0xa93c, 0xa834, 0x9106,
+	0x11e0, 0x0006, 0x0016, 0xa938, 0xa834, 0x9105, 0x0118, 0x001e,
+	0x000e, 0x0098, 0x001e, 0x000e, 0x8aff, 0x01c8, 0x0126, 0x2091,
+	0x8000, 0x2009, 0x0306, 0x200b, 0x0808, 0x00d9, 0x0108, 0x00c9,
+	0x012e, 0x9006, 0x00ee, 0x00fe, 0x0005, 0x0036, 0x0046, 0xab38,
+	0xac34, 0x080c, 0x1f48, 0x004e, 0x003e, 0x0d30, 0x0c98, 0x9085,
+	0x0001, 0x0c80, 0x2009, 0x0306, 0x200b, 0x4800, 0x7027, 0x0000,
+	0x0005, 0x0076, 0x0066, 0x0056, 0x0046, 0x0036, 0x0026, 0x8aff,
+	0x0904, 0x1d00, 0x700c, 0x7214, 0x923a, 0x7010, 0x7218, 0x9203,
+	0x0a04, 0x1cff, 0x9705, 0x0904, 0x1cff, 0x903e, 0x2730, 0xa880,
+	0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1c94, 0x1bd4, 0x1bd4, 0x1c94,
+	0x1c94, 0x1c71, 0x1c94, 0x1bd4, 0x1c78, 0x1c23, 0x1c23, 0x1c94,
+	0x1c94, 0x1c94, 0x1c6b, 0x1c23, 0xc0fc, 0xa882, 0xab2c, 0xaa30,
+	0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1c96, 0x2c05, 0x908a, 0x0034,
+	0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1bc0, 0x1bbe, 0x1bbe,
+	0x1bbe, 0x1bbe, 0x1bbe, 0x1bc4, 0x1bbe, 0x1bbe, 0x1bbe, 0x1bbe,
+	0x1bbe, 0x1bc8, 0x1bbe, 0x1bbe, 0x1bbe, 0x1bbe, 0x1bbe, 0x1bcc,
+	0x1bbe, 0x1bbe, 0x1bbe, 0x1bbe, 0x1bbe, 0x1bd0, 0x080c, 0x0db4,
+	0xa774, 0xa678, 0x0804, 0x1c96, 0xa78c, 0xa690, 0x0804, 0x1c96,
+	0xa7a4, 0xa6a8, 0x0804, 0x1c96, 0xa7bc, 0xa6c0, 0x0804, 0x1c96,
+	0xa7d4, 0xa6d8, 0x0804, 0x1c96, 0x2c05, 0x908a, 0x0036, 0x1a0c,
+	0x0db4, 0x9082, 0x001b, 0x0002, 0x1bf7, 0x1bf7, 0x1bf9, 0x1bf7,
+	0x1bf7, 0x1bf7, 0x1bff, 0x1bf7, 0x1bf7, 0x1bf7, 0x1c05, 0x1bf7,
+	0x1bf7, 0x1bf7, 0x1c0b, 0x1bf7, 0x1bf7, 0x1bf7, 0x1c11, 0x1bf7,
+	0x1bf7, 0x1bf7, 0x1c17, 0x1bf7, 0x1bf7, 0x1bf7, 0x1c1d, 0x080c,
+	0x0db4, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x1c96, 0xa584,
+	0xa488, 0xa38c, 0xa290, 0x0804, 0x1c96, 0xa594, 0xa498, 0xa39c,
+	0xa2a0, 0x0804, 0x1c96, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804,
+	0x1c96, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x1c96, 0xa5c4,
+	0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x1c96, 0xa5d4, 0xa4d8, 0xa3dc,
+	0xa2e0, 0x0804, 0x1c96, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4,
+	0x9082, 0x001b, 0x0002, 0x1c46, 0x1c44, 0x1c44, 0x1c44, 0x1c44,
+	0x1c44, 0x1c4e, 0x1c44, 0x1c44, 0x1c44, 0x1c44, 0x1c44, 0x1c56,
+	0x1c44, 0x1c44, 0x1c44, 0x1c44, 0x1c44, 0x1c5d, 0x1c44, 0x1c44,
+	0x1c44, 0x1c44, 0x1c44, 0x1c64, 0x080c, 0x0db4, 0xa56c, 0xa470,
+	0xa774, 0xa678, 0xa37c, 0xa280, 0x0804, 0x1c96, 0xa584, 0xa488,
+	0xa78c, 0xa690, 0xa394, 0xa298, 0x0804, 0x1c96, 0xa59c, 0xa4a0,
+	0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x04c8, 0xa5b4, 0xa4b8, 0xa7bc,
+	0xa6c0, 0xa3c4, 0xa2c8, 0x0490, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8,
+	0xa3dc, 0xa2e0, 0x0458, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e,
+	0x1518, 0x080c, 0x1ee0, 0x1904, 0x1b6f, 0x900e, 0x0804, 0x1d00,
+	0xab64, 0x939c, 0x00ff, 0x9386, 0x0048, 0x1180, 0x00c6, 0x7004,
+	0x2060, 0x6004, 0x9086, 0x0043, 0x00ce, 0x0904, 0x1c23, 0xab9c,
+	0x9016, 0xad8c, 0xac90, 0xaf94, 0xae98, 0x0040, 0x9386, 0x0008,
+	0x0904, 0x1c23, 0x080c, 0x0db4, 0x080c, 0x0db4, 0x2009, 0x030f,
+	0x2104, 0xd0fc, 0x0530, 0x0066, 0x2009, 0x0306, 0x2104, 0x9084,
+	0x0030, 0x15c8, 0x2031, 0x1000, 0x200b, 0x4000, 0x2600, 0x9302,
+	0x928b, 0x0000, 0xa82e, 0xa932, 0x0278, 0x9105, 0x0168, 0x2011,
+	0x0000, 0x2618, 0x2600, 0x9500, 0xa81e, 0x9481, 0x0000, 0xa822,
+	0xa880, 0xc0fd, 0xa882, 0x0020, 0xa82f, 0x0000, 0xa833, 0x0000,
+	0x006e, 0x7b12, 0x7a16, 0x7d02, 0x7c06, 0x7f0a, 0x7e0e, 0x782b,
+	0x0001, 0x7000, 0x8000, 0x7002, 0xa83c, 0x9300, 0xa83e, 0xa840,
+	0x9201, 0xa842, 0x700c, 0x9300, 0x700e, 0x7010, 0x9201, 0x7012,
+	0x080c, 0x1ee0, 0x0428, 0x2031, 0x0080, 0x9584, 0x007f, 0x0108,
+	0x9632, 0x7124, 0x7000, 0x9086, 0x0000, 0x1198, 0xc185, 0x7126,
+	0x2009, 0x0306, 0x2104, 0xd0b4, 0x1904, 0x1ca6, 0x200b, 0x4040,
+	0x2009, 0x1a4e, 0x2104, 0x8000, 0x0a04, 0x1ca6, 0x200a, 0x0804,
+	0x1ca6, 0xc18d, 0x7126, 0xd184, 0x1d58, 0x0804, 0x1ca6, 0x9006,
+	0x002e, 0x003e, 0x004e, 0x005e, 0x006e, 0x007e, 0x0005, 0x080c,
+	0x0db4, 0x0026, 0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004,
+	0x7003, 0x0000, 0x7004, 0x0016, 0x080c, 0x1b62, 0x001e, 0x2060,
+	0x6014, 0x2048, 0x080c, 0xbb2c, 0x0118, 0xa880, 0xc0bd, 0xa882,
+	0x6020, 0x9086, 0x0006, 0x1180, 0x2061, 0x0100, 0x62c8, 0x2001,
+	0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a,
+	0x60c8, 0xa896, 0x7004, 0x2060, 0x00c6, 0x080c, 0xb75d, 0x00ce,
+	0x2001, 0x19c6, 0x2004, 0x9c06, 0x1160, 0x2009, 0x0040, 0x080c,
+	0x226a, 0x080c, 0x98eb, 0x2011, 0x0000, 0x080c, 0x977c, 0x080c,
+	0x8a4a, 0x002e, 0x0804, 0x1e90, 0x0126, 0x2091, 0x2400, 0xa858,
+	0x2040, 0x792c, 0x782b, 0x0002, 0x9184, 0x0700, 0x1904, 0x1d09,
+	0x7000, 0x0002, 0x1e90, 0x1d5e, 0x1dde, 0x1e8e, 0x8001, 0x7002,
+	0x7027, 0x0000, 0xd19c, 0x1158, 0x8aff, 0x0904, 0x1dab, 0x080c,
+	0x1b69, 0x0904, 0x1e90, 0x080c, 0x1b69, 0x0804, 0x1e90, 0x782b,
+	0x0004, 0xd194, 0x0148, 0xa880, 0xc0fc, 0xa882, 0x8aff, 0x1518,
+	0xa87c, 0xc0f5, 0xa87e, 0x00f8, 0x0026, 0x0036, 0xab3c, 0xaa40,
+	0x0016, 0x7910, 0xa82c, 0x9100, 0xa82e, 0x7914, 0xa830, 0x9101,
+	0xa832, 0x001e, 0x7810, 0x931a, 0x7814, 0x9213, 0x7800, 0xa81e,
+	0x7804, 0xa822, 0xab3e, 0xaa42, 0x003e, 0x002e, 0x080c, 0x1efb,
+	0xa880, 0xc0fd, 0xa882, 0x2a00, 0xa816, 0x2800, 0xa85a, 0x2c00,
+	0xa812, 0x7003, 0x0000, 0x2009, 0x0306, 0x200b, 0x4800, 0x7027,
+	0x0000, 0x0804, 0x1e90, 0x00f6, 0x0026, 0x781c, 0x0006, 0x7818,
+	0x0006, 0x2079, 0x0100, 0x7a14, 0x9284, 0x1984, 0x9085, 0x0012,
+	0x7816, 0x0036, 0x2019, 0x1000, 0x8319, 0x090c, 0x0db4, 0x7820,
+	0xd0bc, 0x1dd0, 0x003e, 0x79c8, 0x000e, 0x9102, 0x001e, 0x0006,
+	0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284,
+	0x1984, 0x9085, 0x0012, 0x7816, 0x002e, 0x00fe, 0x782b, 0x0008,
+	0x7003, 0x0000, 0x080c, 0x1b62, 0x0804, 0x1e90, 0x8001, 0x7002,
+	0x7024, 0x8004, 0x7026, 0xd194, 0x0170, 0x782c, 0xd0fc, 0x1904,
+	0x1d51, 0xd19c, 0x1904, 0x1e8c, 0x8aff, 0x0904, 0x1e90, 0x080c,
+	0x1b69, 0x0804, 0x1e90, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x080c,
+	0x1efb, 0xdd9c, 0x1904, 0x1e4b, 0x2c05, 0x908a, 0x0036, 0x1a0c,
+	0x0db4, 0x9082, 0x001b, 0x0002, 0x1e1f, 0x1e1f, 0x1e21, 0x1e1f,
+	0x1e1f, 0x1e1f, 0x1e27, 0x1e1f, 0x1e1f, 0x1e1f, 0x1e2d, 0x1e1f,
+	0x1e1f, 0x1e1f, 0x1e33, 0x1e1f, 0x1e1f, 0x1e1f, 0x1e39, 0x1e1f,
+	0x1e1f, 0x1e1f, 0x1e3f, 0x1e1f, 0x1e1f, 0x1e1f, 0x1e45, 0x080c,
+	0x0db4, 0xa07c, 0x931a, 0xa080, 0x9213, 0x0804, 0x1d80, 0xa08c,
+	0x931a, 0xa090, 0x9213, 0x0804, 0x1d80, 0xa09c, 0x931a, 0xa0a0,
+	0x9213, 0x0804, 0x1d80, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804,
+	0x1d80, 0xa0bc, 0x931a, 0xa0c0, 0x9213, 0x0804, 0x1d80, 0xa0cc,
+	0x931a, 0xa0d0, 0x9213, 0x0804, 0x1d80, 0xa0dc, 0x931a, 0xa0e0,
+	0x9213, 0x0804, 0x1d80, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4,
+	0x9082, 0x001b, 0x0002, 0x1e6e, 0x1e6c, 0x1e6c, 0x1e6c, 0x1e6c,
+	0x1e6c, 0x1e74, 0x1e6c, 0x1e6c, 0x1e6c, 0x1e6c, 0x1e6c, 0x1e7a,
+	0x1e6c, 0x1e6c, 0x1e6c, 0x1e6c, 0x1e6c, 0x1e80, 0x1e6c, 0x1e6c,
+	0x1e6c, 0x1e6c, 0x1e6c, 0x1e86, 0x080c, 0x0db4, 0xa07c, 0x931a,
+	0xa080, 0x9213, 0x0804, 0x1d80, 0xa094, 0x931a, 0xa098, 0x9213,
+	0x0804, 0x1d80, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1d80,
+	0xa0c4, 0x931a, 0xa0c8, 0x9213, 0x0804, 0x1d80, 0xa0dc, 0x931a,
+	0xa0e0, 0x9213, 0x0804, 0x1d80, 0x0804, 0x1d7c, 0x080c, 0x0db4,
+	0x012e, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a35, 0x7000, 0x9086,
+	0x0000, 0x0904, 0x1edb, 0x2079, 0x0090, 0x2009, 0x0207, 0x210c,
+	0xd194, 0x01b8, 0x2009, 0x020c, 0x210c, 0x9184, 0x0003, 0x0188,
+	0x080c, 0xd8f6, 0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0db4,
+	0x0016, 0x2009, 0x0040, 0x080c, 0x226a, 0x001e, 0x2001, 0x020c,
+	0x2102, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106,
+	0x1120, 0x2009, 0x0040, 0x080c, 0x226a, 0x782c, 0xd0fc, 0x09a8,
+	0x080c, 0x1d4c, 0x7000, 0x9086, 0x0000, 0x1978, 0x782b, 0x0004,
+	0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x226a, 0x782b,
+	0x0002, 0x7003, 0x0000, 0x080c, 0x1b62, 0x00ee, 0x00fe, 0x0005,
+	0xa880, 0xd0fc, 0x11a8, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51,
+	0x0005, 0xa004, 0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084,
+	0x000f, 0x9080, 0x1f28, 0x2065, 0x8cff, 0x090c, 0x0db4, 0x8a51,
+	0x0005, 0x2050, 0x0005, 0xa880, 0xd0fc, 0x11b8, 0x8a50, 0x8c61,
+	0x2c05, 0x9005, 0x1190, 0x2800, 0x9906, 0x0120, 0xa000, 0x9005,
+	0x1108, 0x2900, 0x2040, 0xa85a, 0xa064, 0x9084, 0x000f, 0x9080,
+	0x1f38, 0x2065, 0x8cff, 0x090c, 0x0db4, 0x0005, 0x0000, 0x001d,
+	0x0021, 0x0025, 0x0029, 0x002d, 0x0031, 0x0035, 0x0000, 0x001b,
+	0x0021, 0x0027, 0x002d, 0x0033, 0x0000, 0x0000, 0x0023, 0x0000,
+	0x0000, 0x1f1b, 0x1f17, 0x0000, 0x0000, 0x1f25, 0x0000, 0x1f1b,
+	0x1f22, 0x1f22, 0x1f1f, 0x0000, 0x0000, 0x0000, 0x1f25, 0x1f22,
+	0x0000, 0x1f1d, 0x1f1d, 0x0000, 0x0000, 0x1f25, 0x0000, 0x1f1d,
+	0x1f23, 0x1f23, 0x1f23, 0x0000, 0x0000, 0x0000, 0x1f25, 0x1f23,
+	0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888, 0x9055, 0x0904,
+	0x2127, 0x2940, 0xa064, 0x90ec, 0x000f, 0x9084, 0x00ff, 0x9086,
+	0x0008, 0x1118, 0x2061, 0x1f23, 0x00d0, 0x9de0, 0x1f28, 0x9d86,
+	0x0007, 0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86, 0x000f, 0x1120,
+	0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05, 0x9065, 0x1140, 0x0310,
+	0x0804, 0x2127, 0xa004, 0x9045, 0x0904, 0x2127, 0x08d8, 0x2c05,
+	0x9005, 0x0904, 0x200f, 0xdd9c, 0x1904, 0x1fcb, 0x908a, 0x0036,
+	0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1fa0, 0x1fa0, 0x1fa2,
+	0x1fa0, 0x1fa0, 0x1fa0, 0x1fa8, 0x1fa0, 0x1fa0, 0x1fa0, 0x1fae,
+	0x1fa0, 0x1fa0, 0x1fa0, 0x1fb4, 0x1fa0, 0x1fa0, 0x1fa0, 0x1fba,
+	0x1fa0, 0x1fa0, 0x1fa0, 0x1fc0, 0x1fa0, 0x1fa0, 0x1fa0, 0x1fc6,
+	0x080c, 0x0db4, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0804, 0x2005,
+	0xa08c, 0x9422, 0xa090, 0x931b, 0x0804, 0x2005, 0xa09c, 0x9422,
+	0xa0a0, 0x931b, 0x0804, 0x2005, 0xa0ac, 0x9422, 0xa0b0, 0x931b,
+	0x0804, 0x2005, 0xa0bc, 0x9422, 0xa0c0, 0x931b, 0x0804, 0x2005,
+	0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804, 0x2005, 0xa0dc, 0x9422,
+	0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c, 0x0db4, 0x9082,
+	0x001b, 0x0002, 0x1fed, 0x1feb, 0x1feb, 0x1feb, 0x1feb, 0x1feb,
+	0x1ff2, 0x1feb, 0x1feb, 0x1feb, 0x1feb, 0x1feb, 0x1ff7, 0x1feb,
+	0x1feb, 0x1feb, 0x1feb, 0x1feb, 0x1ffc, 0x1feb, 0x1feb, 0x1feb,
+	0x1feb, 0x1feb, 0x2001, 0x080c, 0x0db4, 0xa07c, 0x9422, 0xa080,
+	0x931b, 0x0098, 0xa094, 0x9422, 0xa098, 0x931b, 0x0070, 0xa0ac,
+	0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422, 0xa0c8, 0x931b,
+	0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630, 0x2300, 0x9405,
+	0x0160, 0x8a51, 0x0904, 0x2127, 0x8c60, 0x0804, 0x1f77, 0xa004,
+	0x9045, 0x0904, 0x2127, 0x0804, 0x1f52, 0x8a51, 0x0904, 0x2127,
+	0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004, 0x9045, 0x0904, 0x2127,
+	0xa064, 0x90ec, 0x000f, 0x9de0, 0x1f28, 0x2c05, 0x2060, 0xa880,
+	0xc0fc, 0xa882, 0x0804, 0x211c, 0x2c05, 0x8422, 0x8420, 0x831a,
+	0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904, 0x20b9, 0x9082,
+	0x001b, 0x0002, 0x2055, 0x2055, 0x2057, 0x2055, 0x2055, 0x2055,
+	0x2065, 0x2055, 0x2055, 0x2055, 0x2073, 0x2055, 0x2055, 0x2055,
+	0x2081, 0x2055, 0x2055, 0x2055, 0x208f, 0x2055, 0x2055, 0x2055,
+	0x209d, 0x2055, 0x2055, 0x2055, 0x20ab, 0x080c, 0x0db4, 0xa17c,
+	0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa074,
+	0x9420, 0xa078, 0x9319, 0x0804, 0x2117, 0xa18c, 0x2400, 0x9122,
+	0xa190, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa084, 0x9420, 0xa088,
+	0x9319, 0x0804, 0x2117, 0xa19c, 0x2400, 0x9122, 0xa1a0, 0x2300,
+	0x911b, 0x0a0c, 0x0db4, 0xa094, 0x9420, 0xa098, 0x9319, 0x0804,
+	0x2117, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c,
+	0x0db4, 0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804, 0x2117, 0xa1bc,
+	0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa0b4,
+	0x9420, 0xa0b8, 0x9319, 0x0804, 0x2117, 0xa1cc, 0x2400, 0x9122,
+	0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa0c4, 0x9420, 0xa0c8,
+	0x9319, 0x0804, 0x2117, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300,
+	0x911b, 0x0a0c, 0x0db4, 0xa0d4, 0x9420, 0xa0d8, 0x9319, 0x0804,
+	0x2117, 0x9082, 0x001b, 0x0002, 0x20d7, 0x20d5, 0x20d5, 0x20d5,
+	0x20d5, 0x20d5, 0x20e4, 0x20d5, 0x20d5, 0x20d5, 0x20d5, 0x20d5,
+	0x20f1, 0x20d5, 0x20d5, 0x20d5, 0x20d5, 0x20d5, 0x20fe, 0x20d5,
+	0x20d5, 0x20d5, 0x20d5, 0x20d5, 0x210b, 0x080c, 0x0db4, 0xa17c,
+	0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa06c,
+	0x9420, 0xa070, 0x9319, 0x0498, 0xa194, 0x2400, 0x9122, 0xa198,
+	0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa084, 0x9420, 0xa088, 0x9319,
+	0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c,
+	0x0db4, 0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8, 0xa1c4, 0x2400,
+	0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa0b4, 0x9420,
+	0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300,
+	0x911b, 0x0a0c, 0x0db4, 0xa0cc, 0x9420, 0xa0d0, 0x9319, 0xac1e,
+	0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a, 0x2c00, 0xa812,
+	0x2a00, 0xa816, 0x000e, 0x000e, 0x000e, 0x9006, 0x0028, 0x008e,
+	0x00de, 0x00ce, 0x9085, 0x0001, 0x0005, 0x2001, 0x0005, 0x2004,
+	0xd0bc, 0x190c, 0x0dad, 0x9084, 0x0007, 0x0002, 0x2148, 0x1d4c,
+	0x2148, 0x213e, 0x2141, 0x2144, 0x2141, 0x2144, 0x080c, 0x1d4c,
+	0x0005, 0x080c, 0x118f, 0x0005, 0x080c, 0x1d4c, 0x080c, 0x118f,
+	0x0005, 0x0126, 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260,
+	0x2069, 0x1800, 0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406,
+	0x789f, 0x0410, 0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002,
+	0x783b, 0x001f, 0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005,
+	0x2091, 0x2600, 0x781c, 0xd0a4, 0x190c, 0x2267, 0x7900, 0xd1dc,
+	0x1118, 0x9084, 0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x218f,
+	0x2187, 0x7937, 0x2187, 0x2189, 0x2189, 0x2189, 0x2189, 0x791d,
+	0x2187, 0x218b, 0x2187, 0x2189, 0x2187, 0x2189, 0x2187, 0x080c,
+	0x0db4, 0x0031, 0x0020, 0x080c, 0x791d, 0x080c, 0x7937, 0x0005,
+	0x0006, 0x0016, 0x0026, 0x080c, 0xd8f6, 0x7930, 0x9184, 0x0003,
+	0x01c0, 0x2001, 0x19c6, 0x2004, 0x9005, 0x0170, 0x2001, 0x0133,
+	0x2004, 0x9005, 0x090c, 0x0db4, 0x00c6, 0x2001, 0x19c6, 0x2064,
+	0x080c, 0xb75d, 0x00ce, 0x00f8, 0x2009, 0x0040, 0x080c, 0x226a,
+	0x00d0, 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160,
+	0x080c, 0x6f9b, 0x1138, 0x080c, 0x727f, 0x080c, 0x5cda, 0x080c,
+	0x6ecd, 0x0010, 0x080c, 0x5b99, 0x080c, 0x79e6, 0x0041, 0x0018,
+	0x9184, 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6,
+	0x0036, 0x0046, 0x0056, 0x2071, 0x1a32, 0x080c, 0x195a, 0x005e,
+	0x004e, 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071,
+	0x1800, 0x7128, 0x2001, 0x193f, 0x2102, 0x2001, 0x1947, 0x2102,
+	0x2001, 0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e,
+	0x78a3, 0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398,
+	0x0005, 0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423,
+	0x8423, 0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007,
+	0x8403, 0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc,
+	0x1238, 0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0,
+	0x9182, 0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420,
+	0x0098, 0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423,
+	0x0058, 0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420,
+	0x0018, 0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020,
+	0x8301, 0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405,
+	0x789a, 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814,
+	0x9084, 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6,
+	0x2069, 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4,
+	0x6812, 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810,
+	0x9084, 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938,
+	0x080c, 0x0dad, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001,
+	0xa001, 0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001,
+	0xa001, 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800,
+	0x2061, 0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2a65,
+	0x080c, 0x2980, 0x6054, 0x8004, 0x8004, 0x8004, 0x8004, 0x9084,
+	0x000c, 0x6150, 0x918c, 0xfff3, 0x9105, 0x6052, 0x6050, 0x9084,
+	0xb17f, 0x9085, 0x2000, 0x6052, 0x2009, 0x196d, 0x2011, 0x196e,
+	0x6358, 0x939c, 0x38f0, 0x2320, 0x080c, 0x29c4, 0x1238, 0x939d,
+	0x4003, 0x94a5, 0x8603, 0x230a, 0x2412, 0x0030, 0x939d, 0x0203,
+	0x94a5, 0x8603, 0x230a, 0x2412, 0x9006, 0x080c, 0x29af, 0x9006,
+	0x080c, 0x2992, 0x20a9, 0x0012, 0x1d04, 0x22bc, 0x2091, 0x6000,
+	0x1f04, 0x22bc, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085,
+	0x0400, 0x9084, 0xdfff, 0x6052, 0x6024, 0x6026, 0x080c, 0x269e,
+	0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x26ae, 0x60e7, 0x0000,
+	0x61ea, 0x60e3, 0x0002, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f,
+	0x0080, 0x602f, 0x0000, 0x6007, 0x149f, 0x60bb, 0x0000, 0x20a9,
+	0x0018, 0x60bf, 0x0000, 0x1f04, 0x22e9, 0x60bb, 0x0000, 0x60bf,
+	0x0108, 0x60bf, 0x0012, 0x60bf, 0x0320, 0x60bf, 0x0018, 0x601b,
+	0x00f0, 0x601f, 0x001e, 0x600f, 0x006b, 0x602b, 0x402f, 0x012e,
+	0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3, 0x0080, 0x78c3, 0x0083,
+	0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001, 0x1834, 0x2003, 0x0000,
+	0x2001, 0x1833, 0x2003, 0x0001, 0x0005, 0x0126, 0x2091, 0x2800,
+	0x0006, 0x0016, 0x0026, 0x6124, 0x9184, 0x5e2c, 0x1118, 0x9184,
+	0x0007, 0x002a, 0x9195, 0x0004, 0x9284, 0x0007, 0x0002, 0x2349,
+	0x232f, 0x2332, 0x2335, 0x233a, 0x233c, 0x2340, 0x2344, 0x080c,
+	0x82c6, 0x00b8, 0x080c, 0x8393, 0x00a0, 0x080c, 0x8393, 0x080c,
+	0x82c6, 0x0078, 0x0099, 0x0068, 0x080c, 0x82c6, 0x0079, 0x0048,
+	0x080c, 0x8393, 0x0059, 0x0028, 0x080c, 0x8393, 0x080c, 0x82c6,
+	0x0029, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x00a6, 0x6124,
+	0x6028, 0xd09c, 0x0118, 0xd19c, 0x1904, 0x2597, 0xd1f4, 0x190c,
+	0x0dad, 0x080c, 0x6f9b, 0x0904, 0x23a4, 0x080c, 0xc22c, 0x1120,
+	0x7000, 0x9086, 0x0003, 0x0570, 0x6024, 0x9084, 0x1800, 0x0550,
+	0x080c, 0x6fbe, 0x0118, 0x080c, 0x6fac, 0x1520, 0x6027, 0x0020,
+	0x6043, 0x0000, 0x080c, 0xc22c, 0x0168, 0x080c, 0x6fbe, 0x1150,
+	0x2001, 0x1977, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x6e1c,
+	0x0804, 0x259a, 0x70a0, 0x9005, 0x1150, 0x70a3, 0x0001, 0x00d6,
+	0x2069, 0x0140, 0x080c, 0x6ff2, 0x00de, 0x1904, 0x259a, 0x080c,
+	0x7289, 0x0428, 0x080c, 0x6fbe, 0x1590, 0x6024, 0x9084, 0x1800,
+	0x1108, 0x0468, 0x080c, 0x7289, 0x080c, 0x727f, 0x080c, 0x5cda,
+	0x080c, 0x6ecd, 0x0804, 0x2597, 0xd1ac, 0x1508, 0x6024, 0xd0dc,
+	0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7094,
+	0x9086, 0x0028, 0x1110, 0x080c, 0x716e, 0x0804, 0x2597, 0x080c,
+	0x7284, 0x0048, 0x2001, 0x194d, 0x2003, 0x0002, 0x0020, 0x080c,
+	0x70d4, 0x0804, 0x2597, 0x080c, 0x7208, 0x0804, 0x2597, 0xd1ac,
+	0x0904, 0x24b8, 0x080c, 0x6f9b, 0x11c0, 0x6027, 0x0020, 0x0006,
+	0x0026, 0x0036, 0x080c, 0x6fb5, 0x1158, 0x080c, 0x727f, 0x080c,
+	0x5cda, 0x080c, 0x6ecd, 0x003e, 0x002e, 0x000e, 0x00ae, 0x0005,
+	0x003e, 0x002e, 0x000e, 0x080c, 0x6f73, 0x0016, 0x0046, 0x00c6,
+	0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, 0x6043,
+	0x0090, 0x6043, 0x0010, 0x74d6, 0x948c, 0xff00, 0x7038, 0xd084,
+	0x0178, 0x9186, 0xf800, 0x1160, 0x7044, 0xd084, 0x1148, 0xc085,
+	0x7046, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x48e9, 0x003e,
+	0x080c, 0xc225, 0x1904, 0x2495, 0x9196, 0xff00, 0x05a8, 0x705c,
+	0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568, 0x7130,
+	0xd184, 0x1550, 0x080c, 0x3135, 0x0128, 0xc18d, 0x7132, 0x080c,
+	0x6563, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248, 0x9294,
+	0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904, 0x2495,
+	0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904,
+	0x2495, 0xc1ad, 0x2102, 0x0036, 0x73d4, 0x2011, 0x8013, 0x080c,
+	0x48e9, 0x003e, 0x0804, 0x2495, 0x7038, 0xd08c, 0x1140, 0x2001,
+	0x180c, 0x200c, 0xd1ac, 0x1904, 0x2495, 0xc1ad, 0x2102, 0x0036,
+	0x73d4, 0x2011, 0x8013, 0x080c, 0x48e9, 0x003e, 0x7130, 0xc185,
+	0x7132, 0x2011, 0x1854, 0x220c, 0x00f0, 0x0016, 0x2009, 0x0001,
+	0x2011, 0x0100, 0x080c, 0x8218, 0x2019, 0x000e, 0x00c6, 0x2061,
+	0x0000, 0x080c, 0xd4c7, 0x00ce, 0x9484, 0x00ff, 0x9080, 0x313a,
+	0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006, 0x2009, 0x000e,
+	0x080c, 0xd54b, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002,
+	0x2019, 0x0004, 0x080c, 0x2fa7, 0x001e, 0x0078, 0x0156, 0x00b6,
+	0x20a9, 0x007f, 0x900e, 0x080c, 0x6247, 0x1110, 0x080c, 0x5cf4,
+	0x8108, 0x1f04, 0x248b, 0x00be, 0x015e, 0x00ce, 0x004e, 0x080c,
+	0x9dc8, 0x60e3, 0x0000, 0x001e, 0x2001, 0x1800, 0x2014, 0x9296,
+	0x0004, 0x1170, 0xd19c, 0x11a0, 0x2011, 0x180c, 0x2214, 0xd29c,
+	0x1120, 0x6204, 0x9295, 0x0002, 0x6206, 0x6228, 0xc29d, 0x622a,
+	0x2003, 0x0001, 0x2001, 0x1825, 0x2003, 0x0000, 0x6027, 0x0020,
+	0xd194, 0x0904, 0x2597, 0x0016, 0x6220, 0xd2b4, 0x0904, 0x2540,
+	0x080c, 0x80a1, 0x080c, 0x93ad, 0x6027, 0x0004, 0x00f6, 0x2019,
+	0x19c0, 0x2304, 0x907d, 0x0904, 0x250f, 0x7804, 0x9086, 0x0032,
+	0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069, 0x0140, 0x782c,
+	0x685e, 0x7808, 0x685a, 0x6043, 0x0002, 0x2001, 0x0003, 0x8001,
+	0x1df0, 0x6043, 0x0000, 0x2001, 0x003c, 0x8001, 0x1df0, 0x080c,
+	0x2b26, 0x2001, 0x001e, 0x8001, 0x0240, 0x20a9, 0x0009, 0x080c,
+	0x2a40, 0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001, 0x0100, 0x080c,
+	0x2b16, 0x9006, 0x080c, 0x2b16, 0x080c, 0x8861, 0x080c, 0x896d,
+	0x7814, 0x2048, 0xa867, 0x0103, 0x2f60, 0x080c, 0x9e42, 0x009e,
+	0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae, 0x0005, 0x00fe,
+	0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c,
+	0x2b26, 0x00de, 0x00c6, 0x2061, 0x19b7, 0x6028, 0x080c, 0xc22c,
+	0x0120, 0x909a, 0x0003, 0x1258, 0x0018, 0x909a, 0x00c8, 0x1238,
+	0x8000, 0x602a, 0x00ce, 0x080c, 0x9389, 0x0804, 0x2596, 0x2061,
+	0x0100, 0x62c0, 0x080c, 0x9c4e, 0x2019, 0x19c0, 0x2304, 0x9065,
+	0x0120, 0x2009, 0x0027, 0x080c, 0x9ebc, 0x00ce, 0x0804, 0x2596,
+	0xd2bc, 0x0904, 0x2583, 0x080c, 0x80ae, 0x6014, 0x9084, 0x1984,
+	0x9085, 0x0010, 0x6016, 0x6027, 0x0004, 0x00d6, 0x2069, 0x0140,
+	0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2b26, 0x00de, 0x00c6,
+	0x2061, 0x19b7, 0x6044, 0x080c, 0xc22c, 0x0120, 0x909a, 0x0003,
+	0x1628, 0x0018, 0x909a, 0x00c8, 0x1608, 0x8000, 0x6046, 0x603c,
+	0x00ce, 0x9005, 0x0558, 0x2009, 0x07d0, 0x080c, 0x80a6, 0x9080,
+	0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x6114, 0x918c, 0x1984,
+	0x918d, 0x0012, 0x6116, 0x00d0, 0x6114, 0x918c, 0x1984, 0x918d,
+	0x0016, 0x6116, 0x0098, 0x6027, 0x0004, 0x0080, 0x0036, 0x2019,
+	0x0001, 0x080c, 0x96d9, 0x003e, 0x2019, 0x19c6, 0x2304, 0x9065,
+	0x0120, 0x2009, 0x004f, 0x080c, 0x9ebc, 0x00ce, 0x001e, 0xd19c,
+	0x0904, 0x2609, 0x7038, 0xd0ac, 0x1904, 0x25de, 0x0016, 0x0156,
+	0x6027, 0x0008, 0x6050, 0x9085, 0x0040, 0x6052, 0x6050, 0x9084,
+	0xfbcf, 0x6052, 0x080c, 0x2a5f, 0x9085, 0x2000, 0x6052, 0x20a9,
+	0x0012, 0x1d04, 0x25b1, 0x080c, 0x80d5, 0x1f04, 0x25b1, 0x6050,
+	0x9085, 0x0400, 0x9084, 0xdfbf, 0x6052, 0x20a9, 0x0028, 0xa001,
+	0x1f04, 0x25bf, 0x6150, 0x9185, 0x1400, 0x6052, 0x20a9, 0x0366,
+	0x1d04, 0x25c8, 0x080c, 0x80d5, 0x6020, 0xd09c, 0x1130, 0x015e,
+	0x6152, 0x001e, 0x6027, 0x0008, 0x04a0, 0x080c, 0x2a27, 0x1f04,
+	0x25c8, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x0016, 0x6028,
+	0xc09c, 0x602a, 0x080c, 0x9dc8, 0x60e3, 0x0000, 0x080c, 0xd8d5,
+	0x080c, 0xd8f0, 0x080c, 0x5393, 0xd0fc, 0x1138, 0x080c, 0xc225,
+	0x1120, 0x9085, 0x0001, 0x080c, 0x6fe2, 0x9006, 0x080c, 0x2b16,
+	0x2009, 0x0002, 0x080c, 0x2a65, 0x00e6, 0x2071, 0x1800, 0x7003,
+	0x0004, 0x080c, 0x0e80, 0x00ee, 0x6027, 0x0008, 0x080c, 0x0b8f,
+	0x001e, 0x918c, 0xffd0, 0x6126, 0x00ae, 0x0005, 0x0006, 0x0016,
+	0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x1800, 0x71cc, 0x70ce, 0x9116, 0x0904, 0x265d, 0x81ff, 0x01a0,
+	0x2009, 0x0000, 0x080c, 0x2a65, 0x2011, 0x8011, 0x2019, 0x010e,
+	0x231c, 0x939e, 0x0007, 0x1118, 0x2019, 0x0001, 0x0010, 0x2019,
+	0x0000, 0x080c, 0x48e9, 0x0448, 0x2001, 0x1978, 0x200c, 0x81ff,
+	0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019, 0x0003,
+	0x0008, 0x2118, 0x2011, 0x8012, 0x080c, 0x48e9, 0x080c, 0x0e80,
+	0x080c, 0x5393, 0xd0fc, 0x1188, 0x080c, 0xc225, 0x1170, 0x00c6,
+	0x080c, 0x26f9, 0x080c, 0x9640, 0x2061, 0x0100, 0x2019, 0x0028,
+	0x2009, 0x0002, 0x080c, 0x2fa7, 0x00ce, 0x012e, 0x00fe, 0x00ee,
+	0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff,
+	0x2130, 0x9094, 0xff00, 0x11f0, 0x2011, 0x1836, 0x2214, 0xd2ac,
+	0x11c8, 0x81ff, 0x01e8, 0x2011, 0x181e, 0x2204, 0x9106, 0x1190,
+	0x2011, 0x181f, 0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206,
+	0x1148, 0x2011, 0x181f, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff,
+	0x9206, 0x1120, 0x2500, 0x080c, 0x7c40, 0x0048, 0x9584, 0x00ff,
+	0x9080, 0x313a, 0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005,
+	0x9080, 0x313a, 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069,
+	0x0140, 0x2001, 0x1817, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006,
+	0x6852, 0x6856, 0x1f04, 0x26a9, 0x00de, 0x0005, 0x0006, 0x00d6,
+	0x0026, 0x2069, 0x0140, 0x2001, 0x1817, 0x2102, 0x8114, 0x8214,
+	0x8214, 0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff,
+	0x1128, 0x9184, 0x000f, 0x9080, 0xddaa, 0x2005, 0x6856, 0x8211,
+	0x1f04, 0x26be, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061,
+	0x1800, 0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce,
+	0x0005, 0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140,
+	0x6980, 0x9116, 0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8,
+	0x2001, 0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04,
+	0x26ee, 0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e,
+	0x0005, 0x080c, 0x538f, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006,
+	0x0046, 0x2020, 0x2009, 0x002e, 0x080c, 0xd54b, 0x004e, 0x0005,
+	0x00f6, 0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904,
+	0x2765, 0x080c, 0x29c4, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600,
+	0x1120, 0x2011, 0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120,
+	0x2011, 0x8000, 0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016,
+	0x2009, 0x0001, 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009,
+	0x0002, 0x00b0, 0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004,
+	0x0078, 0x908e, 0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040,
+	0x9084, 0x0700, 0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058,
+	0x2300, 0x9080, 0x0020, 0x2018, 0x080c, 0x8259, 0x928c, 0xff00,
+	0x0110, 0x2011, 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2,
+	0x2009, 0x0138, 0x220a, 0x080c, 0x6f9b, 0x1118, 0x2009, 0x193d,
+	0x220a, 0x002e, 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8,
+	0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170,
+	0x200c, 0x8000, 0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0dad,
+	0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x2001, 0x0171, 0x2004,
+	0xd0dc, 0x0168, 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e,
+	0x004c, 0x1128, 0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e,
+	0x2001, 0x0227, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108,
+	0x2001, 0x0226, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108,
+	0x0005, 0x0018, 0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000,
+	0x1800, 0x0156, 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x1960,
+	0x2004, 0x908a, 0x0007, 0x1a0c, 0x0db4, 0x0033, 0x00ee, 0x002e,
+	0x001e, 0x000e, 0x015e, 0x0005, 0x27c3, 0x27e1, 0x2805, 0x2807,
+	0x2830, 0x2832, 0x2834, 0x2001, 0x0001, 0x080c, 0x260e, 0x080c,
+	0x2a22, 0x2001, 0x1962, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7,
+	0x782a, 0x9006, 0x20a9, 0x0009, 0x080c, 0x29e0, 0x2001, 0x1960,
+	0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2835, 0x080c, 0x80b3,
+	0x0005, 0x2009, 0x1965, 0x200b, 0x0000, 0x2001, 0x196a, 0x2003,
+	0x0036, 0x2001, 0x1969, 0x2003, 0x002a, 0x2001, 0x1962, 0x2003,
+	0x0001, 0x9006, 0x080c, 0x2992, 0x2001, 0xffff, 0x20a9, 0x0009,
+	0x080c, 0x29e0, 0x2001, 0x1960, 0x2003, 0x0006, 0x2009, 0x001e,
+	0x2011, 0x2835, 0x080c, 0x80b3, 0x0005, 0x080c, 0x0db4, 0x2001,
+	0x196a, 0x2003, 0x0036, 0x2001, 0x1962, 0x2003, 0x0003, 0x7a38,
+	0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x080c, 0x2992, 0x2001, 0x1966, 0x2003, 0x0000, 0x2001,
+	0xffff, 0x20a9, 0x0009, 0x080c, 0x29e0, 0x2001, 0x1960, 0x2003,
+	0x0006, 0x2009, 0x001e, 0x2011, 0x2835, 0x080c, 0x80b3, 0x0005,
+	0x080c, 0x0db4, 0x080c, 0x0db4, 0x0005, 0x0006, 0x0016, 0x0026,
+	0x00e6, 0x00f6, 0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100,
+	0x2001, 0x1962, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0db4, 0x0043,
+	0x012e, 0x015e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005,
+	0x2857, 0x2877, 0x28b7, 0x28e7, 0x290b, 0x291b, 0x291d, 0x080c,
+	0x29d4, 0x11b0, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1968,
+	0x2104, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0xc08d,
+	0x0008, 0xc085, 0x200a, 0x2001, 0x1960, 0x2003, 0x0001, 0x0030,
+	0x080c, 0x2941, 0x2001, 0xffff, 0x080c, 0x27d2, 0x0005, 0x080c,
+	0x291f, 0x05e0, 0x2009, 0x1969, 0x2104, 0x8001, 0x200a, 0x080c,
+	0x29d4, 0x1178, 0x7850, 0x9084, 0xefff, 0x7852, 0x7a38, 0x9294,
+	0x0005, 0x9296, 0x0005, 0x0518, 0x2009, 0x1968, 0x2104, 0xc085,
+	0x200a, 0x2009, 0x1965, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005,
+	0x0118, 0x080c, 0x2927, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294,
+	0x0006, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
+	0x080c, 0x29af, 0x2001, 0x1962, 0x2003, 0x0002, 0x0028, 0x2001,
+	0x1960, 0x2003, 0x0003, 0x0010, 0x080c, 0x27f4, 0x0005, 0x080c,
+	0x291f, 0x0560, 0x2009, 0x1969, 0x2104, 0x8001, 0x200a, 0x080c,
+	0x29d4, 0x1168, 0x7850, 0x9084, 0xefff, 0x7852, 0x2001, 0x1960,
+	0x2003, 0x0003, 0x2001, 0x1961, 0x2003, 0x0000, 0x00b8, 0x2009,
+	0x1969, 0x2104, 0x9005, 0x1118, 0x080c, 0x2964, 0x0010, 0x080c,
+	0x2934, 0x080c, 0x2927, 0x2009, 0x1965, 0x200b, 0x0000, 0x2001,
+	0x1962, 0x2003, 0x0001, 0x080c, 0x27f4, 0x0000, 0x0005, 0x04b9,
+	0x0508, 0x080c, 0x29d4, 0x11b8, 0x7850, 0x9084, 0xefff, 0x7852,
+	0x2009, 0x1966, 0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108,
+	0x0078, 0x2001, 0x196b, 0x2003, 0x000a, 0x2009, 0x1968, 0x2104,
+	0xc0fd, 0x200a, 0x0038, 0x0419, 0x2001, 0x1962, 0x2003, 0x0004,
+	0x080c, 0x281f, 0x0005, 0x0099, 0x0168, 0x080c, 0x29d4, 0x1138,
+	0x7850, 0x9084, 0xefff, 0x7852, 0x080c, 0x280b, 0x0018, 0x0079,
+	0x080c, 0x281f, 0x0005, 0x080c, 0x0db4, 0x080c, 0x0db4, 0x2009,
+	0x196a, 0x2104, 0x8001, 0x200a, 0x090c, 0x2980, 0x0005, 0x7a38,
+	0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x080c, 0x29af, 0x0005, 0x7a38, 0x9294, 0x0006, 0x9296,
+	0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2992,
+	0x0005, 0x2009, 0x1965, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005,
+	0x0108, 0x0068, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296,
+	0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x04d9, 0x7a38,
+	0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x080c, 0x29af, 0x0005, 0x0086, 0x2001, 0x1968, 0x2004,
+	0x9084, 0x7fff, 0x090c, 0x0db4, 0x2009, 0x1967, 0x2144, 0x8846,
+	0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120, 0x080c,
+	0x0db4, 0x9006, 0x0010, 0x2001, 0x0001, 0x00a1, 0x008e, 0x0005,
+	0x0006, 0x0156, 0x2001, 0x1960, 0x20a9, 0x0009, 0x2003, 0x0000,
+	0x8000, 0x1f04, 0x2986, 0x2001, 0x1967, 0x2003, 0x8000, 0x015e,
+	0x000e, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158,
+	0x7838, 0x9084, 0xfff9, 0x9085, 0x0004, 0x783a, 0x2009, 0x196d,
+	0x210c, 0x795a, 0x0050, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0006,
+	0x783a, 0x2009, 0x196e, 0x210c, 0x795a, 0x00fe, 0x0005, 0x00f6,
+	0x2079, 0x0100, 0x9085, 0x0000, 0x0138, 0x7838, 0x9084, 0xfffa,
+	0x9085, 0x0004, 0x783a, 0x0030, 0x7838, 0x9084, 0xfffb, 0x9085,
+	0x0005, 0x783a, 0x00fe, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004,
+	0x9082, 0x0007, 0x000e, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004,
+	0x9082, 0x0009, 0x000e, 0x0005, 0x0156, 0x20a9, 0x0064, 0x7820,
+	0x080c, 0x2a5f, 0xd09c, 0x1110, 0x1f04, 0x29d7, 0x015e, 0x0005,
+	0x0126, 0x0016, 0x0006, 0x2091, 0x8000, 0x7850, 0x9085, 0x0040,
+	0x7852, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2a5f, 0x9085,
+	0x2000, 0x7852, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b,
+	0x0007, 0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060,
+	0x9186, 0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003,
+	0x1118, 0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x2a0d, 0x080c,
+	0x80d5, 0x1f04, 0x2a0d, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf,
+	0x7852, 0x080c, 0x2a5f, 0x9085, 0x1000, 0x7852, 0x000e, 0x001e,
+	0x012e, 0x0005, 0x7850, 0x9084, 0xffcf, 0x7852, 0x0005, 0x0006,
+	0x0156, 0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac,
+	0x1130, 0x7820, 0xd0e4, 0x1140, 0x1f04, 0x2a31, 0x0028, 0x7854,
+	0xd08c, 0x1110, 0x1f04, 0x2a37, 0x00fe, 0x015e, 0x000e, 0x0005,
+	0x1d04, 0x2a40, 0x080c, 0x80d5, 0x1f04, 0x2a40, 0x0005, 0x0006,
+	0x2001, 0x196c, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006,
+	0x2001, 0x196c, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005, 0x0006,
+	0x2001, 0x196c, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005, 0xa001,
+	0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001, 0x1978,
+	0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, 0x0140,
+	0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001, 0x200a,
+	0x0005, 0x0036, 0x0046, 0x2001, 0x0141, 0x200c, 0x918c, 0xff00,
+	0x9186, 0x2000, 0x0118, 0x9186, 0x0100, 0x1588, 0x2009, 0x00a2,
+	0x080c, 0x0e2f, 0x2019, 0x0160, 0x2324, 0x2011, 0x0003, 0x2009,
+	0x0169, 0x2104, 0x9084, 0x0007, 0x210c, 0x918c, 0x0007, 0x910e,
+	0x1db0, 0x9086, 0x0003, 0x11b8, 0x2304, 0x9402, 0x02a0, 0x1d60,
+	0x8211, 0x1d68, 0x84ff, 0x0170, 0x2001, 0x0141, 0x200c, 0x918c,
+	0xff00, 0x9186, 0x0100, 0x0130, 0x2009, 0x180c, 0x2104, 0xc0dd,
+	0x200a, 0x0008, 0x0419, 0x2009, 0x0000, 0x080c, 0x0e2f, 0x004e,
+	0x003e, 0x0005, 0x2001, 0x180c, 0x2004, 0xd0dc, 0x01b0, 0x2001,
+	0x0160, 0x2004, 0x9005, 0x0140, 0x2001, 0x0141, 0x2004, 0x9084,
+	0xff00, 0x9086, 0x0100, 0x1148, 0x0126, 0x2091, 0x8000, 0x0016,
+	0x0026, 0x0021, 0x002e, 0x001e, 0x012e, 0x0005, 0x00c6, 0x2061,
+	0x0100, 0x6014, 0x0006, 0x2001, 0x0161, 0x2003, 0x0000, 0x6017,
+	0x0018, 0xa001, 0xa001, 0x602f, 0x0008, 0x6104, 0x918e, 0x0010,
+	0x6106, 0x918e, 0x0010, 0x6106, 0x6017, 0x0040, 0x04b9, 0x001e,
+	0x9184, 0x0003, 0x01e0, 0x0036, 0x0016, 0x2019, 0x0141, 0x6124,
+	0x918c, 0x0028, 0x1120, 0x2304, 0x9084, 0x2800, 0x0dc0, 0x001e,
+	0x919c, 0xffe4, 0x9184, 0x0001, 0x0118, 0x9385, 0x0009, 0x6016,
+	0x9184, 0x0002, 0x0118, 0x9385, 0x0012, 0x6016, 0x003e, 0x2001,
+	0x180c, 0x200c, 0xc1dc, 0x2102, 0x00ce, 0x0005, 0x0016, 0x0026,
+	0x080c, 0x6fb5, 0x0108, 0xc0bc, 0x2009, 0x0140, 0x2114, 0x9294,
+	0x0001, 0x9215, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
+	0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9285, 0x1000, 0x200a,
 	0x220a, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x2009, 0x0140,
-	0x2114, 0x9294, 0x0001, 0x9285, 0x1000, 0x200a, 0x220a, 0x002e,
-	0x001e, 0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294,
-	0x0001, 0x9215, 0x220a, 0x002e, 0x001e, 0x0005, 0x0006, 0x0016,
-	0x2009, 0x0140, 0x2104, 0x1128, 0x080c, 0x6fcc, 0x0110, 0xc0bc,
-	0x0008, 0xc0bd, 0x200a, 0x001e, 0x000e, 0x0005, 0x2dba, 0x2dba,
-	0x2bde, 0x2bde, 0x2bea, 0x2bea, 0x2bf6, 0x2bf6, 0x2c04, 0x2c04,
-	0x2c10, 0x2c10, 0x2c1e, 0x2c1e, 0x2c2c, 0x2c2c, 0x2c3e, 0x2c3e,
-	0x2c4a, 0x2c4a, 0x2c58, 0x2c58, 0x2c76, 0x2c76, 0x2c96, 0x2c96,
-	0x2c66, 0x2c66, 0x2c86, 0x2c86, 0x2ca4, 0x2ca4, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2cb6, 0x2cb6,
-	0x2cc2, 0x2cc2, 0x2cd0, 0x2cd0, 0x2cde, 0x2cde, 0x2cee, 0x2cee,
-	0x2cfc, 0x2cfc, 0x2d0c, 0x2d0c, 0x2d1c, 0x2d1c, 0x2d2e, 0x2d2e,
-	0x2d3c, 0x2d3c, 0x2d4c, 0x2d4c, 0x2d6e, 0x2d6e, 0x2d90, 0x2d90,
-	0x2d5c, 0x2d5c, 0x2d7f, 0x2d7f, 0x2d9f, 0x2d9f, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c,
-	0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3c, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2313,
-	0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x212b, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x212b,
-	0x080c, 0x2313, 0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2166, 0x0804, 0x2db2,
+	0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e, 0x0005,
+	0x0006, 0x0016, 0x2009, 0x0140, 0x2104, 0x1128, 0x080c, 0x6fb5,
+	0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a, 0x001e, 0x000e, 0x0005,
+	0x2dbc, 0x2dbc, 0x2be0, 0x2be0, 0x2bec, 0x2bec, 0x2bf8, 0x2bf8,
+	0x2c06, 0x2c06, 0x2c12, 0x2c12, 0x2c20, 0x2c20, 0x2c2e, 0x2c2e,
+	0x2c40, 0x2c40, 0x2c4c, 0x2c4c, 0x2c5a, 0x2c5a, 0x2c78, 0x2c78,
+	0x2c98, 0x2c98, 0x2c68, 0x2c68, 0x2c88, 0x2c88, 0x2ca6, 0x2ca6,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
+	0x2cb8, 0x2cb8, 0x2cc4, 0x2cc4, 0x2cd2, 0x2cd2, 0x2ce0, 0x2ce0,
+	0x2cf0, 0x2cf0, 0x2cfe, 0x2cfe, 0x2d0e, 0x2d0e, 0x2d1e, 0x2d1e,
+	0x2d30, 0x2d30, 0x2d3e, 0x2d3e, 0x2d4e, 0x2d4e, 0x2d70, 0x2d70,
+	0x2d92, 0x2d92, 0x2d5e, 0x2d5e, 0x2d81, 0x2d81, 0x2da1, 0x2da1,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
+	0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3e,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x2313, 0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x212b,
-	0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x212b, 0x080c, 0x2313,
-	0x080c, 0x2166, 0x0804, 0x2db2, 0xa001, 0x0cf0, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x130c,
-	0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2313, 0x080c, 0x130c, 0x0804, 0x2db2,
+	0x080c, 0x2315, 0x0804, 0x2db4, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x212d, 0x0804, 0x2db4,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x212b, 0x080c, 0x130c, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2313,
-	0x080c, 0x130c, 0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x212b,
-	0x080c, 0x2313, 0x080c, 0x130c, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x212b,
-	0x080c, 0x130c, 0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x130c,
-	0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x212b, 0x080c, 0x2313,
-	0x080c, 0x130c, 0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766,
-	0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2766, 0x080c, 0x2313, 0x0804, 0x2db2,
+	0x080c, 0x212d, 0x080c, 0x2315, 0x0804, 0x2db4, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2168,
+	0x0804, 0x2db4, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2315, 0x080c, 0x2168, 0x0804, 0x2db4,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x2766, 0x080c, 0x212b, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766,
-	0x080c, 0x212b, 0x080c, 0x2313, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766,
-	0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766, 0x080c, 0x2313,
-	0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766, 0x080c, 0x212b,
-	0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766, 0x080c, 0x212b,
-	0x080c, 0x2313, 0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766,
-	0x080c, 0x130c, 0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766, 0x080c, 0x2313,
-	0x080c, 0x130c, 0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766, 0x080c, 0x212b,
-	0x080c, 0x130c, 0x0804, 0x2db2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766, 0x080c, 0x2313,
-	0x080c, 0x130c, 0x080c, 0x2166, 0x0804, 0x2db2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2766,
-	0x080c, 0x212b, 0x080c, 0x2313, 0x080c, 0x130c, 0x0498, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2766, 0x080c, 0x212b, 0x080c, 0x130c, 0x080c, 0x2166, 0x0410,
+	0x080c, 0x212d, 0x080c, 0x2168, 0x0804, 0x2db4, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x212d,
+	0x080c, 0x2315, 0x080c, 0x2168, 0x0804, 0x2db4, 0xa001, 0x0cf0,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x2766, 0x080c, 0x130c, 0x080c, 0x2166, 0x0098, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2766, 0x080c, 0x212b, 0x080c, 0x2313, 0x080c, 0x130c, 0x080c,
-	0x2166, 0x0000, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e,
-	0x000e, 0x010e, 0x000d, 0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026,
-	0x080c, 0x6520, 0x1904, 0x2ec1, 0x72d8, 0x2001, 0x194d, 0x2004,
-	0x9005, 0x1110, 0xd29c, 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904,
-	0x2ec1, 0x080c, 0x2ec6, 0x0804, 0x2ec1, 0xd2cc, 0x1904, 0x2ec1,
-	0x080c, 0x6fb2, 0x1120, 0x70ab, 0xffff, 0x0804, 0x2ec1, 0xd294,
-	0x0120, 0x70ab, 0xffff, 0x0804, 0x2ec1, 0x080c, 0x312e, 0x0160,
-	0x080c, 0xc212, 0x0128, 0x2001, 0x1817, 0x203c, 0x0804, 0x2e53,
-	0x70ab, 0xffff, 0x0804, 0x2ec1, 0x2001, 0x1817, 0x203c, 0x7290,
-	0xd284, 0x0904, 0x2e53, 0xd28c, 0x1904, 0x2e53, 0x0036, 0x73a8,
-	0x938e, 0xffff, 0x1110, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80,
-	0x2c04, 0x938c, 0x0001, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010,
-	0x9084, 0x00ff, 0x970e, 0x05a8, 0x908e, 0x0000, 0x0590, 0x908e,
-	0x00ff, 0x1150, 0x7230, 0xd284, 0x1588, 0x7290, 0xc28d, 0x7292,
-	0x70ab, 0xffff, 0x003e, 0x0478, 0x0026, 0x2011, 0x0010, 0x080c,
-	0x6586, 0x002e, 0x0118, 0x70ab, 0xffff, 0x0410, 0x900e, 0x080c,
-	0x2663, 0x080c, 0x61de, 0x11c0, 0x080c, 0x6562, 0x1168, 0x7030,
-	0xd08c, 0x0130, 0xb800, 0xd0bc, 0x0138, 0x080c, 0x645e, 0x0120,
-	0x080c, 0x2edf, 0x0148, 0x0028, 0x080c, 0x301f, 0x080c, 0x2f0b,
-	0x0118, 0x8318, 0x0804, 0x2e05, 0x73aa, 0x0010, 0x70ab, 0xffff,
-	0x003e, 0x0804, 0x2ec1, 0x9780, 0x3138, 0x203d, 0x97bc, 0xff00,
-	0x873f, 0x2041, 0x007e, 0x70a8, 0x9096, 0xffff, 0x1118, 0x900e,
-	0x28a8, 0x0050, 0x9812, 0x0220, 0x2008, 0x9802, 0x20a8, 0x0020,
-	0x70ab, 0xffff, 0x0804, 0x2ec1, 0x2700, 0x0156, 0x0016, 0x9106,
-	0x0904, 0x2eb6, 0x0026, 0x2011, 0x0010, 0x080c, 0x6586, 0x002e,
-	0x0120, 0x2009, 0xffff, 0x0804, 0x2ebe, 0xc484, 0x080c, 0x623e,
-	0x0138, 0x080c, 0xc212, 0x1590, 0x080c, 0x61de, 0x15b8, 0x0008,
-	0xc485, 0x080c, 0x6562, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800,
-	0xd0bc, 0x11e0, 0x7290, 0xd28c, 0x0180, 0x080c, 0x6562, 0x9082,
-	0x0006, 0x02e0, 0xd484, 0x1118, 0x080c, 0x6202, 0x0028, 0x080c,
-	0x30aa, 0x01a0, 0x080c, 0x30d5, 0x0088, 0x080c, 0x301f, 0x080c,
-	0xc212, 0x1160, 0x080c, 0x2f0b, 0x0188, 0x0040, 0x080c, 0xc212,
-	0x1118, 0x080c, 0x30aa, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108,
-	0x015e, 0x1f04, 0x2e6c, 0x70ab, 0xffff, 0x0018, 0x001e, 0x015e,
-	0x71aa, 0x004e, 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016,
-	0x70ab, 0x0001, 0x2009, 0x007e, 0x080c, 0x61de, 0x1168, 0xb813,
-	0x00ff, 0xb817, 0xfffe, 0x080c, 0x301f, 0x04a9, 0x0128, 0x70d8,
-	0xc0bd, 0x70da, 0x080c, 0xbf63, 0x001e, 0x00ce, 0x0005, 0x0016,
-	0x0076, 0x00d6, 0x00c6, 0x2001, 0x1858, 0x2004, 0x9084, 0x00ff,
-	0xb842, 0x080c, 0x9e7f, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xbf8c,
-	0x6023, 0x0001, 0x9006, 0x080c, 0x617b, 0x2001, 0x0000, 0x080c,
-	0x618f, 0x0126, 0x2091, 0x8000, 0x70a4, 0x8000, 0x70a6, 0x012e,
-	0x2009, 0x0004, 0x080c, 0x9eac, 0x9085, 0x0001, 0x00ce, 0x00de,
-	0x007e, 0x001e, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001,
-	0x1858, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0x9e7f, 0x0548,
-	0x2b00, 0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e,
-	0x0140, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c,
-	0x2fda, 0x080c, 0xbf8c, 0x6023, 0x0001, 0x9006, 0x080c, 0x617b,
-	0x2001, 0x0002, 0x080c, 0x618f, 0x0126, 0x2091, 0x8000, 0x70a4,
-	0x8000, 0x70a6, 0x012e, 0x2009, 0x0002, 0x080c, 0x9eac, 0x9085,
-	0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6,
-	0x0026, 0x2009, 0x0080, 0x080c, 0x61de, 0x1140, 0xb813, 0x00ff,
-	0xb817, 0xfffc, 0x0039, 0x0110, 0x70df, 0xffff, 0x002e, 0x00ce,
-	0x00be, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0x9ddc,
-	0x01d0, 0x2b00, 0x6012, 0x080c, 0xbf8c, 0x6023, 0x0001, 0x9006,
-	0x080c, 0x617b, 0x2001, 0x0002, 0x080c, 0x618f, 0x0126, 0x2091,
-	0x8000, 0x70e0, 0x8000, 0x70e2, 0x012e, 0x2009, 0x0002, 0x080c,
-	0x9eac, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005,
-	0x00c6, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c,
-	0x61de, 0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8bf, 0x0004,
-	0x080c, 0x9ddc, 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001,
-	0x620a, 0x080c, 0xbf8c, 0x2009, 0x0022, 0x080c, 0x9eac, 0x9085,
-	0x0001, 0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066,
-	0x0036, 0x0026, 0x00b6, 0x21f0, 0x080c, 0x857c, 0x080c, 0x850b,
-	0x080c, 0x9c8a, 0x080c, 0xad77, 0x3e08, 0x2130, 0x81ff, 0x0120,
-	0x20a9, 0x007e, 0x900e, 0x0018, 0x20a9, 0x007f, 0x900e, 0x0016,
-	0x080c, 0x623e, 0x1140, 0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc,
-	0x1110, 0x080c, 0x5ceb, 0x001e, 0x8108, 0x1f04, 0x2fbf, 0x9686,
-	0x0001, 0x190c, 0x3102, 0x00be, 0x002e, 0x003e, 0x006e, 0x00ce,
-	0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0046, 0x0036, 0x0026, 0x0016,
-	0x00b6, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c,
-	0x8571, 0x0076, 0x2039, 0x0000, 0x080c, 0x8469, 0x2c08, 0x080c,
-	0xd29b, 0x007e, 0x001e, 0xba10, 0xbb14, 0xbcb0, 0x080c, 0x5ceb,
-	0xba12, 0xbb16, 0xbcb2, 0x00be, 0x001e, 0x002e, 0x003e, 0x004e,
-	0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6, 0x6010, 0x2058,
-	0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071, 0x1800, 0x70a4,
-	0x9005, 0x0110, 0x8001, 0x70a6, 0x000e, 0x00ee, 0x0005, 0x2071,
-	0x1800, 0x70e0, 0x9005, 0x0dc0, 0x8001, 0x70e2, 0x0ca8, 0xb800,
-	0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x00b6, 0x0046,
-	0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x81ff, 0x1118, 0x20a9,
-	0x0001, 0x0070, 0x080c, 0x5386, 0xd0c4, 0x0138, 0x0030, 0x9006,
-	0x2020, 0x2009, 0x002d, 0x080c, 0xd52a, 0x20a9, 0x0800, 0x9016,
-	0x0026, 0x928e, 0x007e, 0x0904, 0x3089, 0x928e, 0x007f, 0x0904,
-	0x3089, 0x928e, 0x0080, 0x05e8, 0x9288, 0x1000, 0x210c, 0x81ff,
-	0x05c0, 0x8fff, 0x1148, 0x2001, 0x195f, 0x0006, 0x2003, 0x0001,
-	0x04f1, 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001,
-	0x0001, 0x080c, 0x652c, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c,
-	0x8571, 0x0076, 0x2039, 0x0000, 0x080c, 0x8469, 0x00b6, 0x00c6,
-	0x0026, 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118,
-	0xb807, 0x0404, 0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06,
-	0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c, 0xd29b, 0x001e,
-	0x007e, 0x002e, 0x8210, 0x1f04, 0x3040, 0x015e, 0x001e, 0x002e,
-	0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0046,
-	0x0026, 0x0016, 0x080c, 0x5386, 0xd0c4, 0x0140, 0xd0a4, 0x0130,
-	0x9006, 0x2220, 0x2009, 0x0029, 0x080c, 0xd52a, 0x001e, 0x002e,
-	0x004e, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x7290, 0x82ff,
-	0x01e8, 0x080c, 0x655a, 0x11d0, 0x2100, 0x080c, 0x2696, 0x81ff,
-	0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80, 0x2c04, 0xd384,
-	0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x9116,
-	0x0138, 0x9096, 0x00ff, 0x0110, 0x8318, 0x0c68, 0x9085, 0x0001,
-	0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0016, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x0036, 0x2019, 0x0029, 0x00a9, 0x003e, 0x9180,
-	0x1000, 0x2004, 0x9065, 0x0158, 0x0016, 0x00c6, 0x2061, 0x1a80,
-	0x001e, 0x6112, 0x080c, 0x2fda, 0x001e, 0x080c, 0x6202, 0x012e,
-	0x00ce, 0x001e, 0x0005, 0x0016, 0x0026, 0x2110, 0x080c, 0x9926,
-	0x080c, 0xd7e2, 0x002e, 0x001e, 0x0005, 0x2001, 0x1836, 0x2004,
-	0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x6fb2, 0x1118, 0x20a9,
-	0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x6fb2, 0x1110, 0x900e,
-	0x0010, 0x2009, 0x007e, 0x9180, 0x1000, 0x2004, 0x905d, 0x0130,
-	0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x6202, 0x8108, 0x1f04,
-	0x3113, 0x2061, 0x1800, 0x607b, 0x0000, 0x607c, 0x9084, 0x00ff,
-	0x607e, 0x60af, 0x0000, 0x00be, 0x00ce, 0x0005, 0x2001, 0x1875,
-	0x2004, 0xd0bc, 0x0005, 0x2011, 0x1854, 0x2214, 0xd2ec, 0x0005,
-	0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da,
-	0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce,
-	0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5,
-	0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3,
-	0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9,
-	0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b,
-	0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081,
-	0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073,
-	0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69,
-	0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056,
-	0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c,
-	0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c,
-	0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831,
-	0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026,
-	0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017,
-	0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000,
-	0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000,
-	0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300,
-	0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100,
-	0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00,
-	0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800,
-	0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000,
-	0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000,
-	0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500,
-	0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000,
-	0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000,
-	0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000,
-	0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000,
-	0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x080c, 0x130c, 0x0804, 0x2db4, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2315, 0x080c, 0x130c,
+	0x0804, 0x2db4, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x212d, 0x080c, 0x130c, 0x0804, 0x2db4,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2315, 0x080c, 0x130c, 0x080c, 0x2168, 0x0804, 0x2db4,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x212d, 0x080c, 0x2315, 0x080c, 0x130c, 0x0804, 0x2db4,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x212d, 0x080c, 0x130c, 0x080c, 0x2168, 0x0804, 0x2db4,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x130c, 0x080c, 0x2168, 0x0804, 0x2db4, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x212d,
+	0x080c, 0x2315, 0x080c, 0x130c, 0x080c, 0x2168, 0x0804, 0x2db4,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2768, 0x0804, 0x2db4, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2768, 0x080c, 0x2315,
+	0x0804, 0x2db4, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2768, 0x080c, 0x212d, 0x0804, 0x2db4,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2768, 0x080c, 0x212d, 0x080c, 0x2315, 0x0804, 0x2db4,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2768, 0x080c, 0x2168, 0x0804, 0x2db4, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2768,
+	0x080c, 0x2315, 0x080c, 0x2168, 0x0804, 0x2db4, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2768,
+	0x080c, 0x212d, 0x080c, 0x2168, 0x0804, 0x2db4, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2768,
+	0x080c, 0x212d, 0x080c, 0x2315, 0x080c, 0x2168, 0x0804, 0x2db4,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2768, 0x080c, 0x130c, 0x0804, 0x2db4, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2768,
+	0x080c, 0x2315, 0x080c, 0x130c, 0x0804, 0x2db4, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2768,
+	0x080c, 0x212d, 0x080c, 0x130c, 0x0804, 0x2db4, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2768,
+	0x080c, 0x2315, 0x080c, 0x130c, 0x080c, 0x2168, 0x0804, 0x2db4,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2768, 0x080c, 0x212d, 0x080c, 0x2315, 0x080c, 0x130c,
+	0x0498, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2768, 0x080c, 0x212d, 0x080c, 0x130c, 0x080c,
+	0x2168, 0x0410, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2768, 0x080c, 0x130c, 0x080c, 0x2168,
+	0x0098, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2768, 0x080c, 0x212d, 0x080c, 0x2315, 0x080c,
+	0x130c, 0x080c, 0x2168, 0x0000, 0x015e, 0x014e, 0x013e, 0x01de,
+	0x01ce, 0x012e, 0x000e, 0x010e, 0x000d, 0x00b6, 0x00c6, 0x0026,
+	0x0046, 0x9026, 0x080c, 0x6529, 0x1904, 0x2ec3, 0x72d8, 0x2001,
+	0x194c, 0x2004, 0x9005, 0x1110, 0xd29c, 0x0148, 0xd284, 0x1138,
+	0xd2bc, 0x1904, 0x2ec3, 0x080c, 0x2ec8, 0x0804, 0x2ec3, 0xd2cc,
+	0x1904, 0x2ec3, 0x080c, 0x6f9b, 0x1120, 0x70ab, 0xffff, 0x0804,
+	0x2ec3, 0xd294, 0x0120, 0x70ab, 0xffff, 0x0804, 0x2ec3, 0x080c,
+	0x3130, 0x0160, 0x080c, 0xc22c, 0x0128, 0x2001, 0x1817, 0x203c,
+	0x0804, 0x2e55, 0x70ab, 0xffff, 0x0804, 0x2ec3, 0x2001, 0x1817,
+	0x203c, 0x7290, 0xd284, 0x0904, 0x2e55, 0xd28c, 0x1904, 0x2e55,
+	0x0036, 0x73a8, 0x938e, 0xffff, 0x1110, 0x2019, 0x0001, 0x8314,
+	0x92e0, 0x1c80, 0x2c04, 0x938c, 0x0001, 0x0120, 0x9084, 0xff00,
+	0x8007, 0x0010, 0x9084, 0x00ff, 0x970e, 0x05a8, 0x908e, 0x0000,
+	0x0590, 0x908e, 0x00ff, 0x1150, 0x7230, 0xd284, 0x1588, 0x7290,
+	0xc28d, 0x7292, 0x70ab, 0xffff, 0x003e, 0x0478, 0x0026, 0x2011,
+	0x0010, 0x080c, 0x658f, 0x002e, 0x0118, 0x70ab, 0xffff, 0x0410,
+	0x900e, 0x080c, 0x2665, 0x080c, 0x61e7, 0x11c0, 0x080c, 0x656b,
+	0x1168, 0x7030, 0xd08c, 0x0130, 0xb800, 0xd0bc, 0x0138, 0x080c,
+	0x6467, 0x0120, 0x080c, 0x2ee1, 0x0148, 0x0028, 0x080c, 0x3021,
+	0x080c, 0x2f0d, 0x0118, 0x8318, 0x0804, 0x2e07, 0x73aa, 0x0010,
+	0x70ab, 0xffff, 0x003e, 0x0804, 0x2ec3, 0x9780, 0x313a, 0x203d,
+	0x97bc, 0xff00, 0x873f, 0x2041, 0x007e, 0x70a8, 0x9096, 0xffff,
+	0x1118, 0x900e, 0x28a8, 0x0050, 0x9812, 0x0220, 0x2008, 0x9802,
+	0x20a8, 0x0020, 0x70ab, 0xffff, 0x0804, 0x2ec3, 0x2700, 0x0156,
+	0x0016, 0x9106, 0x0904, 0x2eb8, 0x0026, 0x2011, 0x0010, 0x080c,
+	0x658f, 0x002e, 0x0120, 0x2009, 0xffff, 0x0804, 0x2ec0, 0xc484,
+	0x080c, 0x6247, 0x0138, 0x080c, 0xc22c, 0x1590, 0x080c, 0x61e7,
+	0x15b8, 0x0008, 0xc485, 0x080c, 0x656b, 0x1130, 0x7030, 0xd08c,
+	0x01f8, 0xb800, 0xd0bc, 0x11e0, 0x7290, 0xd28c, 0x0180, 0x080c,
+	0x656b, 0x9082, 0x0006, 0x02e0, 0xd484, 0x1118, 0x080c, 0x620b,
+	0x0028, 0x080c, 0x30ac, 0x01a0, 0x080c, 0x30d7, 0x0088, 0x080c,
+	0x3021, 0x080c, 0xc22c, 0x1160, 0x080c, 0x2f0d, 0x0188, 0x0040,
+	0x080c, 0xc22c, 0x1118, 0x080c, 0x30ac, 0x0110, 0x0451, 0x0140,
+	0x001e, 0x8108, 0x015e, 0x1f04, 0x2e6e, 0x70ab, 0xffff, 0x0018,
+	0x001e, 0x015e, 0x71aa, 0x004e, 0x002e, 0x00ce, 0x00be, 0x0005,
+	0x00c6, 0x0016, 0x70ab, 0x0001, 0x2009, 0x007e, 0x080c, 0x61e7,
+	0x1168, 0xb813, 0x00ff, 0xb817, 0xfffe, 0x080c, 0x3021, 0x04a9,
+	0x0128, 0x70d8, 0xc0bd, 0x70da, 0x080c, 0xbf7d, 0x001e, 0x00ce,
+	0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x1858, 0x2004,
+	0x9084, 0x00ff, 0xb842, 0x080c, 0x9e8f, 0x01d0, 0x2b00, 0x6012,
+	0x080c, 0xbfa6, 0x6023, 0x0001, 0x9006, 0x080c, 0x6184, 0x2001,
+	0x0000, 0x080c, 0x6198, 0x0126, 0x2091, 0x8000, 0x70a4, 0x8000,
+	0x70a6, 0x012e, 0x2009, 0x0004, 0x080c, 0x9ebc, 0x9085, 0x0001,
+	0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x0016, 0x0076, 0x00d6,
+	0x00c6, 0x2001, 0x1858, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c,
+	0x9e8f, 0x0548, 0x2b00, 0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0,
+	0x9086, 0x007e, 0x0140, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
+	0x1110, 0x080c, 0x2fdc, 0x080c, 0xbfa6, 0x6023, 0x0001, 0x9006,
+	0x080c, 0x6184, 0x2001, 0x0002, 0x080c, 0x6198, 0x0126, 0x2091,
+	0x8000, 0x70a4, 0x8000, 0x70a6, 0x012e, 0x2009, 0x0002, 0x080c,
+	0x9ebc, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005,
+	0x00b6, 0x00c6, 0x0026, 0x2009, 0x0080, 0x080c, 0x61e7, 0x1140,
+	0xb813, 0x00ff, 0xb817, 0xfffc, 0x0039, 0x0110, 0x70df, 0xffff,
+	0x002e, 0x00ce, 0x00be, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6,
+	0x080c, 0x9dec, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xbfa6, 0x6023,
+	0x0001, 0x9006, 0x080c, 0x6184, 0x2001, 0x0002, 0x080c, 0x6198,
+	0x0126, 0x2091, 0x8000, 0x70e0, 0x8000, 0x70e2, 0x012e, 0x2009,
+	0x0002, 0x080c, 0x9ebc, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e,
+	0x001e, 0x0005, 0x00c6, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2009,
+	0x007f, 0x080c, 0x61e7, 0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd,
+	0xb8bf, 0x0004, 0x080c, 0x9dec, 0x0170, 0x2b00, 0x6012, 0x6316,
+	0x6023, 0x0001, 0x620a, 0x080c, 0xbfa6, 0x2009, 0x0022, 0x080c,
+	0x9ebc, 0x9085, 0x0001, 0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6,
+	0x00c6, 0x0066, 0x0036, 0x0026, 0x00b6, 0x21f0, 0x080c, 0x856f,
+	0x080c, 0x84f9, 0x080c, 0x9c95, 0x080c, 0xad8a, 0x3e08, 0x2130,
+	0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e, 0x0018, 0x20a9, 0x007f,
+	0x900e, 0x0016, 0x080c, 0x6247, 0x1140, 0x9686, 0x0002, 0x1118,
+	0xb800, 0xd0bc, 0x1110, 0x080c, 0x5cf4, 0x001e, 0x8108, 0x1f04,
+	0x2fc1, 0x9686, 0x0001, 0x190c, 0x3104, 0x00be, 0x002e, 0x003e,
+	0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0046, 0x0036,
+	0x0026, 0x0016, 0x00b6, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019,
+	0x0029, 0x080c, 0x8564, 0x0076, 0x2039, 0x0000, 0x080c, 0x8452,
+	0x2c08, 0x080c, 0xd2bc, 0x007e, 0x001e, 0xba10, 0xbb14, 0xbcb0,
+	0x080c, 0x5cf4, 0xba12, 0xbb16, 0xbcb2, 0x00be, 0x001e, 0x002e,
+	0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6,
+	0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071,
+	0x1800, 0x70a4, 0x9005, 0x0110, 0x8001, 0x70a6, 0x000e, 0x00ee,
+	0x0005, 0x2071, 0x1800, 0x70e0, 0x9005, 0x0dc0, 0x8001, 0x70e2,
+	0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6,
+	0x00b6, 0x0046, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x81ff,
+	0x1118, 0x20a9, 0x0001, 0x0070, 0x080c, 0x538f, 0xd0c4, 0x0138,
+	0x0030, 0x9006, 0x2020, 0x2009, 0x002d, 0x080c, 0xd54b, 0x20a9,
+	0x0800, 0x9016, 0x0026, 0x928e, 0x007e, 0x0904, 0x308b, 0x928e,
+	0x007f, 0x0904, 0x308b, 0x928e, 0x0080, 0x05e8, 0x9288, 0x1000,
+	0x210c, 0x81ff, 0x05c0, 0x8fff, 0x1148, 0x2001, 0x195e, 0x0006,
+	0x2003, 0x0001, 0x04f1, 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6,
+	0x2158, 0x2001, 0x0001, 0x080c, 0x6535, 0x00ce, 0x00be, 0x2019,
+	0x0029, 0x080c, 0x8564, 0x0076, 0x2039, 0x0000, 0x080c, 0x8452,
+	0x00b6, 0x00c6, 0x0026, 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286,
+	0x0006, 0x1118, 0xb807, 0x0404, 0x0028, 0x2001, 0x0004, 0x8007,
+	0x9215, 0xba06, 0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c,
+	0xd2bc, 0x001e, 0x007e, 0x002e, 0x8210, 0x1f04, 0x3042, 0x015e,
+	0x001e, 0x002e, 0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee, 0x00fe,
+	0x0005, 0x0046, 0x0026, 0x0016, 0x080c, 0x538f, 0xd0c4, 0x0140,
+	0xd0a4, 0x0130, 0x9006, 0x2220, 0x2009, 0x0029, 0x080c, 0xd54b,
+	0x001e, 0x002e, 0x004e, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6,
+	0x7290, 0x82ff, 0x01e8, 0x080c, 0x6563, 0x11d0, 0x2100, 0x080c,
+	0x2698, 0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80,
+	0x2c04, 0xd384, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084,
+	0x00ff, 0x9116, 0x0138, 0x9096, 0x00ff, 0x0110, 0x8318, 0x0c68,
+	0x9085, 0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0016,
+	0x00c6, 0x0126, 0x2091, 0x8000, 0x0036, 0x2019, 0x0029, 0x00a9,
+	0x003e, 0x9180, 0x1000, 0x2004, 0x9065, 0x0158, 0x0016, 0x00c6,
+	0x2061, 0x1a7f, 0x001e, 0x6112, 0x080c, 0x2fdc, 0x001e, 0x080c,
+	0x620b, 0x012e, 0x00ce, 0x001e, 0x0005, 0x0016, 0x0026, 0x2110,
+	0x080c, 0x992c, 0x080c, 0xd803, 0x002e, 0x001e, 0x0005, 0x2001,
+	0x1836, 0x2004, 0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x6f9b,
+	0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x6f9b,
+	0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x9180, 0x1000, 0x2004,
+	0x905d, 0x0130, 0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x620b,
+	0x8108, 0x1f04, 0x3115, 0x2061, 0x1800, 0x607b, 0x0000, 0x607c,
+	0x9084, 0x00ff, 0x607e, 0x60af, 0x0000, 0x00be, 0x00ce, 0x0005,
+	0x2001, 0x1875, 0x2004, 0xd0bc, 0x0005, 0x2011, 0x1854, 0x2214,
+	0xd2ec, 0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0,
+	0x80dc, 0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2,
+	0x80d1, 0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7,
+	0x80c6, 0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5,
+	0x73b4, 0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab,
+	0x6faa, 0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e,
+	0x689d, 0x809b, 0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384,
+	0x6282, 0x8081, 0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075,
+	0x8074, 0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b,
+	0x5c6a, 0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a,
+	0x5559, 0x8056, 0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e,
+	0x4f4d, 0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045,
+	0x8043, 0x803c, 0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33,
+	0x4932, 0x4831, 0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329,
+	0x4227, 0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b,
+	0x3c18, 0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001,
+	0x8000, 0x8000, 0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000,
+	0x8000, 0x8000, 0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x8000, 0x3300, 0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x8000, 0x3100, 0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00,
+	0x2d00, 0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00,
+	0x2900, 0x2800, 0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300,
+	0x2200, 0x8000, 0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00,
+	0x1c00, 0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700,
+	0x1600, 0x1500, 0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000,
+	0x0f00, 0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00,
+	0x0900, 0x8000, 0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000,
+	0x8000, 0x8000, 0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000,
+	0x8000, 0x8000, 0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x8000, 0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
 	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x2071, 0x1894, 0x7003, 0x0002, 0x9006, 0x7016, 0x701a, 0x704a,
-	0x704e, 0x700e, 0x7042, 0x7046, 0x703b, 0x18b0, 0x703f, 0x18b0,
-	0x7007, 0x0001, 0x080c, 0x1004, 0x090c, 0x0db4, 0x2900, 0x706a,
-	0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x1004, 0x090c, 0x0db4,
-	0x2900, 0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071,
-	0x1894, 0x7004, 0x0002, 0x3267, 0x3268, 0x327b, 0x328f, 0x0005,
-	0x1004, 0x3278, 0x0e04, 0x3278, 0x2079, 0x0000, 0x0126, 0x2091,
-	0x8000, 0x700c, 0x9005, 0x1128, 0x700f, 0x0001, 0x012e, 0x0468,
-	0x0005, 0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18ae, 0x2c4c,
-	0xa86c, 0x908e, 0x0100, 0x0128, 0x9086, 0x0200, 0x0904, 0x3363,
-	0x0005, 0x7018, 0x2048, 0x2061, 0x1800, 0x701c, 0x0807, 0x7014,
-	0x2048, 0xa864, 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78,
-	0xd2fc, 0x0128, 0x0005, 0x9086, 0x0103, 0x0108, 0x0005, 0x2079,
-	0x0000, 0x2061, 0x1800, 0x701c, 0x0807, 0x2061, 0x1800, 0x7880,
-	0x908a, 0x0040, 0x1210, 0x61cc, 0x0042, 0x2100, 0x908a, 0x003f,
-	0x1a04, 0x3360, 0x61cc, 0x0804, 0x32f5, 0x3337, 0x336f, 0x3379,
-	0x337d, 0x3387, 0x338d, 0x3391, 0x33a1, 0x33a4, 0x33ae, 0x33b3,
-	0x33b8, 0x33c3, 0x33ce, 0x33dd, 0x33ec, 0x33fa, 0x3411, 0x342c,
-	0x3360, 0x34d5, 0x3513, 0x35b9, 0x35ca, 0x35ed, 0x3360, 0x3360,
-	0x3360, 0x3625, 0x3641, 0x364a, 0x3679, 0x367f, 0x3360, 0x36c5,
-	0x3360, 0x3360, 0x3360, 0x3360, 0x3360, 0x36d0, 0x36d9, 0x36e1,
-	0x36e3, 0x3360, 0x3360, 0x3360, 0x3360, 0x3360, 0x3360, 0x370f,
-	0x3360, 0x3360, 0x3360, 0x3360, 0x3360, 0x372c, 0x3787, 0x3360,
-	0x3360, 0x3360, 0x3360, 0x3360, 0x3360, 0x0002, 0x37b1, 0x37b4,
-	0x3813, 0x382c, 0x385c, 0x3afa, 0x3360, 0x4f5f, 0x3360, 0x3360,
-	0x3360, 0x3360, 0x3360, 0x3360, 0x3360, 0x3360, 0x33ae, 0x33b3,
-	0x401b, 0x53aa, 0x4031, 0x4fee, 0x503f, 0x5142, 0x3360, 0x51a4,
-	0x51e0, 0x5211, 0x5315, 0x523e, 0x5295, 0x3360, 0x4035, 0x41d6,
-	0x41ec, 0x4211, 0x4276, 0x42ea, 0x430a, 0x4381, 0x43dd, 0x4439,
-	0x443c, 0x4461, 0x4501, 0x4567, 0x456f, 0x46a1, 0x4803, 0x4837,
-	0x4a81, 0x3360, 0x4a9f, 0x4b62, 0x4c38, 0x3360, 0x3360, 0x3360,
-	0x3360, 0x4c9e, 0x4cb9, 0x456f, 0x4eff, 0x714c, 0x0000, 0x2021,
-	0x4000, 0x080c, 0x48b5, 0x0126, 0x2091, 0x8000, 0x0e04, 0x3341,
-	0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833,
-	0x0011, 0x0010, 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187,
-	0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005,
-	0x2021, 0x4001, 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021, 0x4003,
-	0x0880, 0x2021, 0x4005, 0x0868, 0x2021, 0x4006, 0x0850, 0x2039,
-	0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804,
-	0x48c2, 0x7883, 0x0004, 0x7884, 0x0807, 0x2039, 0x0001, 0x902e,
-	0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804, 0x48c5, 0x7984,
-	0x7888, 0x2114, 0x200a, 0x0804, 0x3337, 0x7984, 0x2114, 0x0804,
-	0x3337, 0x20e1, 0x0000, 0x2099, 0x0021, 0x20e9, 0x0000, 0x20a1,
-	0x0021, 0x20a9, 0x001f, 0x4003, 0x7984, 0x7a88, 0x7b8c, 0x0804,
-	0x3337, 0x7884, 0x2060, 0x04d8, 0x2009, 0x0003, 0x2011, 0x0002,
-	0x2019, 0x001c, 0x789b, 0x0317, 0x0804, 0x3337, 0x2039, 0x0001,
-	0x7d98, 0x7c9c, 0x0800, 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0848,
-	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x336c, 0x2138, 0x7d98,
-	0x7c9c, 0x0804, 0x3373, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804,
-	0x336c, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x3381, 0x79a0, 0x9182,
-	0x0040, 0x0210, 0x0804, 0x336c, 0x21e8, 0x7984, 0x7888, 0x20a9,
-	0x0001, 0x21a0, 0x4004, 0x0804, 0x3337, 0x2061, 0x0800, 0xe10c,
-	0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109, 0x1dd8, 0x2010, 0x9005,
-	0x0904, 0x3337, 0x0804, 0x3366, 0x79a0, 0x9182, 0x0040, 0x0210,
-	0x0804, 0x336c, 0x21e0, 0x20a9, 0x0001, 0x7984, 0x2198, 0x4012,
-	0x0804, 0x3337, 0x2069, 0x1853, 0x7884, 0x7990, 0x911a, 0x1a04,
-	0x336c, 0x8019, 0x0904, 0x336c, 0x684a, 0x6942, 0x788c, 0x6852,
-	0x7888, 0x6856, 0x9006, 0x685a, 0x685e, 0x080c, 0x72c7, 0x0804,
-	0x3337, 0x2069, 0x1853, 0x7884, 0x7994, 0x911a, 0x1a04, 0x336c,
-	0x8019, 0x0904, 0x336c, 0x684e, 0x6946, 0x788c, 0x6862, 0x7888,
-	0x6866, 0x9006, 0x686a, 0x686e, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6664, 0x012e, 0x0804, 0x3337, 0x902e, 0x2520, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x3369, 0x7984, 0x7b88, 0x7a8c, 0x20a9,
-	0x0005, 0x20e9, 0x0001, 0x20a1, 0x189c, 0x4101, 0x080c, 0x4879,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x3369, 0x2009, 0x0020, 0xa85c,
-	0x9080, 0x0019, 0xaf60, 0x080c, 0x48c2, 0x701f, 0x3450, 0x0005,
-	0xa864, 0x2008, 0x9084, 0x00ff, 0x9096, 0x0011, 0x0168, 0x9096,
-	0x0019, 0x0150, 0x9096, 0x0015, 0x0138, 0x9096, 0x0048, 0x0120,
-	0x9096, 0x0029, 0x1904, 0x3369, 0x810f, 0x918c, 0x00ff, 0x0904,
-	0x3369, 0x7112, 0x7010, 0x8001, 0x0560, 0x7012, 0x080c, 0x4879,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x3369, 0x2009, 0x0020, 0x7068,
-	0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, 0x9290, 0x0040, 0x9399,
-	0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080, 0x0019,
-	0xaf60, 0x080c, 0x48c2, 0x701f, 0x348e, 0x0005, 0xa864, 0x9084,
-	0x00ff, 0x9096, 0x0002, 0x0120, 0x9096, 0x000a, 0x1904, 0x3369,
-	0x0888, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0xa864, 0x9084,
-	0x00ff, 0x9096, 0x0029, 0x1160, 0xc2fd, 0xaa7a, 0x080c, 0x5ddd,
-	0x0150, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x012e, 0x0050,
-	0x080c, 0x60f4, 0x1128, 0x7007, 0x0003, 0x701f, 0x34ba, 0x0005,
-	0x080c, 0x6ac6, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x20e1,
-	0x0001, 0x2099, 0x189c, 0x400a, 0x2100, 0x9210, 0x9399, 0x0000,
-	0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080, 0x0019, 0x2009,
-	0x0020, 0x012e, 0xaf60, 0x0804, 0x48c5, 0x2091, 0x8000, 0x7837,
-	0x4000, 0x7833, 0x0010, 0x7883, 0x4000, 0x7887, 0x4953, 0x788b,
-	0x5020, 0x788f, 0x2020, 0x2009, 0x017f, 0x2104, 0x7892, 0x3f00,
-	0x7896, 0x2061, 0x0100, 0x6200, 0x2061, 0x0200, 0x603c, 0x8007,
-	0x9205, 0x789a, 0x2009, 0x04fd, 0x2104, 0x789e, 0x2091, 0x5000,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x0180, 0x2001,
-	0x19ea, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc,
-	0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003, 0x1001, 0x2071,
-	0x0080, 0x0804, 0x0427, 0x81ff, 0x1904, 0x3369, 0x7984, 0x080c,
-	0x623e, 0x1904, 0x336c, 0x7e98, 0x9684, 0x3fff, 0x9082, 0x4000,
-	0x1a04, 0x336c, 0x7c88, 0x7d8c, 0x080c, 0x63a1, 0x080c, 0x6370,
-	0x0000, 0x1518, 0x2061, 0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000,
-	0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406,
-	0x1118, 0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0, 0x0018, 0x2001,
-	0x1819, 0x2004, 0x9c02, 0x1a04, 0x3369, 0x0c30, 0x080c, 0xb74a,
-	0x012e, 0x0904, 0x3369, 0x0804, 0x3337, 0x900e, 0x2001, 0x0005,
-	0x080c, 0x6ac6, 0x0126, 0x2091, 0x8000, 0x080c, 0xbe0c, 0x080c,
-	0x688c, 0x012e, 0x0804, 0x3337, 0x00a6, 0x2950, 0xb198, 0x080c,
-	0x623e, 0x1904, 0x35a6, 0xb6a4, 0x9684, 0x3fff, 0x9082, 0x4000,
-	0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x63a1, 0x080c, 0x6370, 0x1520,
-	0x2061, 0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000, 0x9086, 0x0000,
-	0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118, 0xa870,
-	0x9506, 0x0158, 0x012e, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c, 0xb74a, 0x012e,
-	0x2009, 0x0003, 0x0178, 0x00e0, 0x900e, 0x2001, 0x0005, 0x080c,
-	0x6ac6, 0x0126, 0x2091, 0x8000, 0x080c, 0xbe0c, 0x080c, 0x687f,
-	0x012e, 0x0070, 0xb097, 0x4005, 0xb19a, 0x0010, 0xb097, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x2a48, 0x00ae, 0x0005,
-	0xb097, 0x4000, 0x9006, 0x918d, 0x0001, 0x2008, 0x2a48, 0x00ae,
-	0x0005, 0x81ff, 0x1904, 0x3369, 0x080c, 0x4890, 0x0904, 0x336c,
-	0x080c, 0x6305, 0x0904, 0x3369, 0x080c, 0x63a7, 0x0904, 0x3369,
-	0x0804, 0x4301, 0x81ff, 0x1904, 0x3369, 0x080c, 0x48ac, 0x0904,
-	0x336c, 0x080c, 0x6435, 0x0904, 0x3369, 0x2019, 0x0005, 0x79a8,
-	0x080c, 0x63c2, 0x0904, 0x3369, 0x7888, 0x908a, 0x1000, 0x1a04,
-	0x336c, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x8046, 0x7984,
-	0xd184, 0x1904, 0x3337, 0x0804, 0x4301, 0x0126, 0x2091, 0x8000,
-	0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029, 0x07ff, 0x6458,
-	0x2400, 0x9506, 0x01f8, 0x2508, 0x080c, 0x623e, 0x11d8, 0x080c,
-	0x6435, 0x1128, 0x2009, 0x0002, 0x62bc, 0x2518, 0x00c0, 0x2019,
-	0x0004, 0x900e, 0x080c, 0x63c2, 0x1118, 0x2009, 0x0006, 0x0078,
-	0x7884, 0x908a, 0x1000, 0x1270, 0x8003, 0x800b, 0x810b, 0x9108,
-	0x080c, 0x8046, 0x8529, 0x1ae0, 0x012e, 0x0804, 0x3337, 0x012e,
-	0x0804, 0x3369, 0x012e, 0x0804, 0x336c, 0x080c, 0x4890, 0x0904,
-	0x336c, 0x080c, 0x6305, 0x0904, 0x3369, 0xbaa0, 0x2019, 0x0005,
-	0x00c6, 0x9066, 0x080c, 0x8571, 0x0076, 0x903e, 0x080c, 0x8469,
-	0x900e, 0x080c, 0xd29b, 0x007e, 0x00ce, 0x080c, 0x63a1, 0x0804,
-	0x3337, 0x080c, 0x4890, 0x0904, 0x336c, 0x080c, 0x63a1, 0x2208,
-	0x0804, 0x3337, 0x0156, 0x00d6, 0x00e6, 0x2069, 0x1906, 0x6810,
-	0x6914, 0x910a, 0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x20a9,
-	0x007e, 0x2069, 0x1000, 0x2d04, 0x905d, 0x0118, 0xb84c, 0x0059,
-	0x9210, 0x8d68, 0x1f04, 0x365b, 0x2300, 0x9218, 0x00ee, 0x00de,
-	0x015e, 0x0804, 0x3337, 0x00f6, 0x0016, 0x907d, 0x0138, 0x9006,
-	0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178, 0x0cd0, 0x001e, 0x00fe,
-	0x0005, 0x2069, 0x1906, 0x6910, 0x62b8, 0x0804, 0x3337, 0x81ff,
-	0x0120, 0x2009, 0x0001, 0x0804, 0x3369, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x539a, 0x0128, 0x2009, 0x0007, 0x012e, 0x0804, 0x3369,
-	0x012e, 0x6158, 0x9190, 0x3138, 0x2215, 0x9294, 0x00ff, 0x6378,
-	0x83ff, 0x0108, 0x627c, 0x67d8, 0x97c4, 0x000a, 0x98c6, 0x000a,
-	0x1118, 0x2031, 0x0001, 0x00e8, 0x97c4, 0x0022, 0x98c6, 0x0022,
-	0x1118, 0x2031, 0x0003, 0x00a8, 0x97c4, 0x0012, 0x98c6, 0x0012,
-	0x1118, 0x2031, 0x0002, 0x0068, 0x080c, 0x6fb2, 0x1118, 0x2031,
-	0x0004, 0x0038, 0xd79c, 0x0120, 0x2009, 0x0005, 0x0804, 0x3369,
-	0x9036, 0x7e9a, 0x7f9e, 0x0804, 0x3337, 0x6148, 0x624c, 0x2019,
-	0x1957, 0x231c, 0x2001, 0x1958, 0x2004, 0x789a, 0x0804, 0x3337,
-	0x0126, 0x2091, 0x8000, 0x6138, 0x623c, 0x6340, 0x012e, 0x0804,
-	0x3337, 0x080c, 0x48ac, 0x0904, 0x336c, 0xba44, 0xbb38, 0x0804,
-	0x3337, 0x080c, 0x0db4, 0x080c, 0x48ac, 0x2110, 0x0904, 0x336c,
-	0xb804, 0x908c, 0x00ff, 0x918e, 0x0006, 0x0140, 0x9084, 0xff00,
-	0x9086, 0x0600, 0x2009, 0x0009, 0x1904, 0x3369, 0x0126, 0x2091,
-	0x8000, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x9926, 0x080c,
-	0x8571, 0x0076, 0x903e, 0x080c, 0x8469, 0x900e, 0x080c, 0xd29b,
-	0x007e, 0x00ce, 0xb807, 0x0407, 0x012e, 0x0804, 0x3337, 0x6148,
-	0x624c, 0x7884, 0x604a, 0x7b88, 0x634e, 0x2069, 0x1853, 0x831f,
-	0x9305, 0x6816, 0x788c, 0x2069, 0x1957, 0x2d1c, 0x206a, 0x7e98,
-	0x9682, 0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, 0x1958, 0x2d04,
-	0x266a, 0x789a, 0x0804, 0x3337, 0x0126, 0x2091, 0x8000, 0x6138,
-	0x7884, 0x603a, 0x910e, 0xd1b4, 0x190c, 0x0e9b, 0xd0c4, 0x01a8,
-	0x00d6, 0x78a8, 0x2009, 0x196e, 0x200a, 0x78ac, 0x2011, 0x196f,
-	0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214,
-	0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x7888, 0x603e, 0x2011,
-	0x0114, 0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0080, 0x0010,
-	0x918c, 0xff7f, 0x2112, 0x6140, 0x788c, 0x6042, 0x910e, 0xd1e4,
-	0x190c, 0x0eb1, 0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114,
-	0x2012, 0x012e, 0x0804, 0x3337, 0x00f6, 0x2079, 0x1800, 0x7a38,
-	0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002,
-	0x9214, 0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, 0x7898,
-	0x9005, 0x01a8, 0x7888, 0x9025, 0x0904, 0x336c, 0x788c, 0x902d,
-	0x0904, 0x336c, 0x900e, 0x080c, 0x623e, 0x1120, 0xba44, 0xbb38,
-	0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c,
-	0x48ac, 0x0904, 0x336c, 0x7888, 0x900d, 0x0904, 0x336c, 0x788c,
-	0x9005, 0x0904, 0x336c, 0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804,
-	0x3337, 0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, 0x539a,
-	0x1904, 0x3369, 0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, 0x00ff,
-	0x1130, 0x2001, 0x1817, 0x2004, 0x9085, 0xff00, 0x0088, 0x9182,
-	0x007f, 0x16e0, 0x9188, 0x3138, 0x210d, 0x918c, 0x00ff, 0x2001,
-	0x1817, 0x2004, 0x0026, 0x9116, 0x002e, 0x0580, 0x810f, 0x9105,
-	0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0x9ddc, 0x000e, 0x0510,
-	0x602e, 0x620a, 0x7984, 0x00b6, 0x080c, 0x61e4, 0x2b08, 0x00be,
-	0x1500, 0x6112, 0x6023, 0x0001, 0x080c, 0x4879, 0x01d0, 0x9006,
-	0xa866, 0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f,
-	0x380c, 0x2900, 0x6016, 0x2009, 0x0032, 0x080c, 0x9eac, 0x012e,
-	0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x3369, 0x00ce, 0x0804,
-	0x336c, 0x080c, 0x9e32, 0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904,
-	0x3369, 0x0804, 0x3337, 0x2061, 0x1a41, 0x0126, 0x2091, 0x8000,
-	0x6000, 0xd084, 0x0170, 0x6104, 0x6208, 0x2061, 0x1800, 0x6350,
-	0x6070, 0x789a, 0x60bc, 0x789e, 0x60b8, 0x78aa, 0x012e, 0x0804,
-	0x3337, 0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, 0x3369, 0x080c,
-	0x6fb2, 0x0904, 0x3369, 0x0126, 0x2091, 0x8000, 0x6250, 0x6070,
-	0x9202, 0x0248, 0x9085, 0x0001, 0x080c, 0x26cc, 0x080c, 0x55b4,
-	0x012e, 0x0804, 0x3337, 0x012e, 0x0804, 0x336c, 0x0006, 0x0016,
-	0x00c6, 0x00e6, 0x2001, 0x197a, 0x2070, 0x2061, 0x1853, 0x6008,
-	0x2072, 0x900e, 0x2011, 0x1400, 0x080c, 0x8270, 0x7206, 0x00ee,
-	0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff,
-	0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3339, 0x7884, 0xd0fc,
-	0x0148, 0x2001, 0x002a, 0x2004, 0x9082, 0x00e1, 0x0288, 0x012e,
-	0x0804, 0x336c, 0x2001, 0x002a, 0x2004, 0x2069, 0x1853, 0x6908,
-	0x9102, 0x1230, 0x012e, 0x0804, 0x336c, 0x012e, 0x0804, 0x3369,
-	0x080c, 0x9db1, 0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x38d7, 0x00c6,
-	0x080c, 0x4879, 0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a,
-	0x7898, 0xa80e, 0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a,
-	0x2001, 0x002f, 0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822,
-	0x2001, 0x0031, 0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a,
-	0x2001, 0x0035, 0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080,
-	0x0003, 0x9084, 0x00fc, 0x8004, 0xa816, 0x080c, 0x3a5d, 0x0928,
-	0x7014, 0x2048, 0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808,
+	0x8000, 0x8000, 0x2071, 0x1894, 0x7003, 0x0002, 0x9006, 0x7016,
+	0x701a, 0x704a, 0x704e, 0x700e, 0x7042, 0x7046, 0x703b, 0x18b0,
+	0x703f, 0x18b0, 0x7007, 0x0001, 0x080c, 0x1004, 0x090c, 0x0db4,
+	0x2900, 0x706a, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x1004,
+	0x090c, 0x0db4, 0x2900, 0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0,
+	0x0005, 0x2071, 0x1894, 0x7004, 0x0002, 0x3269, 0x326a, 0x327d,
+	0x3291, 0x0005, 0x1004, 0x327a, 0x0e04, 0x327a, 0x2079, 0x0000,
+	0x0126, 0x2091, 0x8000, 0x700c, 0x9005, 0x1128, 0x700f, 0x0001,
+	0x012e, 0x0468, 0x0005, 0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061,
+	0x18ae, 0x2c4c, 0xa86c, 0x908e, 0x0100, 0x0128, 0x9086, 0x0200,
+	0x0904, 0x3365, 0x0005, 0x7018, 0x2048, 0x2061, 0x1800, 0x701c,
+	0x0807, 0x7014, 0x2048, 0xa864, 0x9094, 0x00ff, 0x9296, 0x0029,
+	0x1120, 0xaa78, 0xd2fc, 0x0128, 0x0005, 0x9086, 0x0103, 0x0108,
+	0x0005, 0x2079, 0x0000, 0x2061, 0x1800, 0x701c, 0x0807, 0x2061,
+	0x1800, 0x7880, 0x908a, 0x0040, 0x1210, 0x61cc, 0x0042, 0x2100,
+	0x908a, 0x003f, 0x1a04, 0x3362, 0x61cc, 0x0804, 0x32f7, 0x3339,
+	0x3371, 0x3362, 0x337b, 0x3385, 0x338b, 0x338f, 0x339f, 0x33a3,
+	0x33b9, 0x33bf, 0x33c5, 0x33d0, 0x33db, 0x33ea, 0x33f9, 0x3407,
+	0x341e, 0x3439, 0x3362, 0x34e2, 0x3520, 0x35c6, 0x35d7, 0x35fa,
+	0x3362, 0x3362, 0x3362, 0x3632, 0x364e, 0x3657, 0x3686, 0x368c,
+	0x3362, 0x36d2, 0x3362, 0x3362, 0x3362, 0x3362, 0x3362, 0x36dd,
+	0x36e6, 0x36ee, 0x36f0, 0x3362, 0x3362, 0x3362, 0x3362, 0x3362,
+	0x3362, 0x371c, 0x3362, 0x3362, 0x3362, 0x3362, 0x3362, 0x3739,
+	0x3794, 0x3362, 0x3362, 0x3362, 0x3362, 0x3362, 0x3362, 0x0002,
+	0x37be, 0x37c1, 0x3820, 0x3839, 0x3869, 0x3b07, 0x3362, 0x4f68,
+	0x3362, 0x3362, 0x3362, 0x3362, 0x3362, 0x3362, 0x3362, 0x3362,
+	0x33b9, 0x33bf, 0x4028, 0x53b3, 0x403e, 0x4ff7, 0x5048, 0x514b,
+	0x3362, 0x51ad, 0x51e9, 0x521a, 0x531e, 0x5247, 0x529e, 0x3362,
+	0x4042, 0x41e3, 0x41f9, 0x421e, 0x4283, 0x42f7, 0x4317, 0x438e,
+	0x43ea, 0x4446, 0x4449, 0x446e, 0x450e, 0x4574, 0x457c, 0x46ae,
+	0x4813, 0x4847, 0x4a91, 0x3362, 0x4aaf, 0x4b6b, 0x4c41, 0x3362,
+	0x3362, 0x3362, 0x3362, 0x4ca7, 0x4cc2, 0x457c, 0x4f08, 0x714c,
+	0x0000, 0x2021, 0x4000, 0x080c, 0x48c5, 0x0126, 0x2091, 0x8000,
+	0x0e04, 0x3343, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000,
+	0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7c82, 0x7986,
+	0x7a8a, 0x7b8e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x1187, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000,
+	0x012e, 0x0005, 0x2021, 0x4001, 0x08b0, 0x2021, 0x4002, 0x0898,
+	0x2021, 0x4003, 0x0880, 0x2021, 0x4005, 0x0868, 0x2021, 0x4006,
+	0x0850, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884,
+	0x7990, 0x0804, 0x48d2, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88,
+	0x7a8c, 0x7884, 0x7990, 0x0804, 0x48d5, 0x7984, 0x7888, 0x2114,
+	0x200a, 0x0804, 0x3339, 0x7984, 0x2114, 0x0804, 0x3339, 0x20e1,
+	0x0000, 0x2099, 0x0021, 0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9,
+	0x001f, 0x4003, 0x7984, 0x7a88, 0x7b8c, 0x0804, 0x3339, 0x7884,
+	0x2060, 0x0804, 0x33ec, 0x2009, 0x0003, 0x2011, 0x0002, 0x2019,
+	0x001e, 0x789b, 0x0317, 0x7893, 0xffff, 0x2001, 0x1885, 0x2004,
+	0x9005, 0x0118, 0x7896, 0x0804, 0x3339, 0x7897, 0x0001, 0x0804,
+	0x3339, 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0804, 0x3375, 0x2039,
+	0x0001, 0x7d98, 0x7c9c, 0x0804, 0x337f, 0x79a0, 0x9182, 0x0040,
+	0x0210, 0x0804, 0x336e, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x3375,
+	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x336e, 0x2138, 0x7d98,
+	0x7c9c, 0x0804, 0x337f, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804,
+	0x336e, 0x21e8, 0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004,
+	0x0804, 0x3339, 0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200,
+	0x8c60, 0x8109, 0x1dd8, 0x2010, 0x9005, 0x0904, 0x3339, 0x0804,
+	0x3368, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x336e, 0x21e0,
+	0x20a9, 0x0001, 0x7984, 0x2198, 0x4012, 0x0804, 0x3339, 0x2069,
+	0x1853, 0x7884, 0x7990, 0x911a, 0x1a04, 0x336e, 0x8019, 0x0904,
+	0x336e, 0x684a, 0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006,
+	0x685a, 0x685e, 0x080c, 0x72b0, 0x0804, 0x3339, 0x2069, 0x1853,
+	0x7884, 0x7994, 0x911a, 0x1a04, 0x336e, 0x8019, 0x0904, 0x336e,
+	0x684e, 0x6946, 0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a,
+	0x686e, 0x0126, 0x2091, 0x8000, 0x080c, 0x6669, 0x012e, 0x0804,
+	0x3339, 0x902e, 0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
+	0x336b, 0x7984, 0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001,
+	0x20a1, 0x189c, 0x4101, 0x080c, 0x4889, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x336b, 0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60,
+	0x080c, 0x48d2, 0x701f, 0x345d, 0x0005, 0xa864, 0x2008, 0x9084,
+	0x00ff, 0x9096, 0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096,
+	0x0015, 0x0138, 0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904,
+	0x336b, 0x810f, 0x918c, 0x00ff, 0x0904, 0x336b, 0x7112, 0x7010,
+	0x8001, 0x0560, 0x7012, 0x080c, 0x4889, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x336b, 0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390,
+	0xa494, 0xa598, 0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000,
+	0x95a9, 0x0000, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x48d2,
+	0x701f, 0x349b, 0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002,
+	0x0120, 0x9096, 0x000a, 0x1904, 0x336b, 0x0888, 0x7014, 0x2048,
+	0xa868, 0xc0fd, 0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029,
+	0x1160, 0xc2fd, 0xaa7a, 0x080c, 0x5de6, 0x0150, 0x0126, 0x2091,
+	0x8000, 0xa87a, 0xa982, 0x012e, 0x0050, 0x080c, 0x60fd, 0x1128,
+	0x7007, 0x0003, 0x701f, 0x34c7, 0x0005, 0x080c, 0x6abf, 0x0126,
+	0x2091, 0x8000, 0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x189c,
+	0x400a, 0x2100, 0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9,
+	0x0000, 0xa85c, 0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60,
+	0x0804, 0x48d5, 0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010,
+	0x7883, 0x4000, 0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020,
+	0x2009, 0x017f, 0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100,
+	0x6200, 0x2061, 0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009,
+	0x04fd, 0x2104, 0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x0180, 0x2001, 0x19e9, 0x2004, 0x9005,
+	0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a,
+	0x2003, 0x0002, 0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427,
+	0x81ff, 0x1904, 0x336b, 0x7984, 0x080c, 0x6247, 0x1904, 0x336e,
+	0x7e98, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x336e, 0x7c88,
+	0x7d8c, 0x080c, 0x63aa, 0x080c, 0x6379, 0x0000, 0x1518, 0x2061,
+	0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148,
+	0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506,
+	0x0150, 0x012e, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004, 0x9c02,
+	0x1a04, 0x336b, 0x0c30, 0x080c, 0xb75d, 0x012e, 0x0904, 0x336b,
+	0x0804, 0x3339, 0x900e, 0x2001, 0x0005, 0x080c, 0x6abf, 0x0126,
+	0x2091, 0x8000, 0x080c, 0xbe26, 0x080c, 0x6891, 0x012e, 0x0804,
+	0x3339, 0x00a6, 0x2950, 0xb198, 0x080c, 0x6247, 0x1904, 0x35b3,
+	0xb6a4, 0x9684, 0x3fff, 0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0,
+	0x080c, 0x63aa, 0x080c, 0x6379, 0x1520, 0x2061, 0x1cd0, 0x0126,
+	0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d,
+	0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0158, 0x012e,
+	0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004, 0x9c02, 0x2009, 0x000d,
+	0x12b0, 0x0c28, 0x080c, 0xb75d, 0x012e, 0x2009, 0x0003, 0x0178,
+	0x00e0, 0x900e, 0x2001, 0x0005, 0x080c, 0x6abf, 0x0126, 0x2091,
+	0x8000, 0x080c, 0xbe26, 0x080c, 0x6884, 0x012e, 0x0070, 0xb097,
+	0x4005, 0xb19a, 0x0010, 0xb097, 0x4006, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0030, 0x2a48, 0x00ae, 0x0005, 0xb097, 0x4000, 0x9006,
+	0x918d, 0x0001, 0x2008, 0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904,
+	0x336b, 0x080c, 0x48a0, 0x0904, 0x336e, 0x080c, 0x630e, 0x0904,
+	0x336b, 0x080c, 0x63b0, 0x0904, 0x336b, 0x0804, 0x430e, 0x81ff,
+	0x1904, 0x336b, 0x080c, 0x48bc, 0x0904, 0x336e, 0x080c, 0x643e,
+	0x0904, 0x336b, 0x2019, 0x0005, 0x79a8, 0x080c, 0x63cb, 0x0904,
+	0x336b, 0x7888, 0x908a, 0x1000, 0x1a04, 0x336e, 0x8003, 0x800b,
+	0x810b, 0x9108, 0x080c, 0x802f, 0x7984, 0xd184, 0x1904, 0x3339,
+	0x0804, 0x430e, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009,
+	0x0001, 0x0450, 0x2029, 0x07ff, 0x6458, 0x2400, 0x9506, 0x01f8,
+	0x2508, 0x080c, 0x6247, 0x11d8, 0x080c, 0x643e, 0x1128, 0x2009,
+	0x0002, 0x62bc, 0x2518, 0x00c0, 0x2019, 0x0004, 0x900e, 0x080c,
+	0x63cb, 0x1118, 0x2009, 0x0006, 0x0078, 0x7884, 0x908a, 0x1000,
+	0x1270, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x802f, 0x8529,
+	0x1ae0, 0x012e, 0x0804, 0x3339, 0x012e, 0x0804, 0x336b, 0x012e,
+	0x0804, 0x336e, 0x080c, 0x48a0, 0x0904, 0x336e, 0x080c, 0x630e,
+	0x0904, 0x336b, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c,
+	0x8564, 0x0076, 0x903e, 0x080c, 0x8452, 0x900e, 0x080c, 0xd2bc,
+	0x007e, 0x00ce, 0x080c, 0x63aa, 0x0804, 0x3339, 0x080c, 0x48a0,
+	0x0904, 0x336e, 0x080c, 0x63aa, 0x2208, 0x0804, 0x3339, 0x0156,
+	0x00d6, 0x00e6, 0x2069, 0x1906, 0x6810, 0x6914, 0x910a, 0x1208,
+	0x900e, 0x6816, 0x9016, 0x901e, 0x20a9, 0x007e, 0x2069, 0x1000,
+	0x2d04, 0x905d, 0x0118, 0xb84c, 0x0059, 0x9210, 0x8d68, 0x1f04,
+	0x3668, 0x2300, 0x9218, 0x00ee, 0x00de, 0x015e, 0x0804, 0x3339,
+	0x00f6, 0x0016, 0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff,
+	0x0110, 0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1906,
+	0x6910, 0x62b8, 0x0804, 0x3339, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x336b, 0x0126, 0x2091, 0x8000, 0x080c, 0x53a3, 0x0128,
+	0x2009, 0x0007, 0x012e, 0x0804, 0x336b, 0x012e, 0x6158, 0x9190,
+	0x313a, 0x2215, 0x9294, 0x00ff, 0x6378, 0x83ff, 0x0108, 0x627c,
+	0x67d8, 0x97c4, 0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001,
+	0x00e8, 0x97c4, 0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003,
+	0x00a8, 0x97c4, 0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002,
+	0x0068, 0x080c, 0x6f9b, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c,
+	0x0120, 0x2009, 0x0005, 0x0804, 0x336b, 0x9036, 0x7e9a, 0x7f9e,
+	0x0804, 0x3339, 0x6148, 0x624c, 0x2019, 0x1956, 0x231c, 0x2001,
+	0x1957, 0x2004, 0x789a, 0x0804, 0x3339, 0x0126, 0x2091, 0x8000,
+	0x6138, 0x623c, 0x6340, 0x012e, 0x0804, 0x3339, 0x080c, 0x48bc,
+	0x0904, 0x336e, 0xba44, 0xbb38, 0x0804, 0x3339, 0x080c, 0x0db4,
+	0x080c, 0x48bc, 0x2110, 0x0904, 0x336e, 0xb804, 0x908c, 0x00ff,
+	0x918e, 0x0006, 0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009,
+	0x0009, 0x1904, 0x336b, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005,
+	0x00c6, 0x9066, 0x080c, 0x992c, 0x080c, 0x8564, 0x0076, 0x903e,
+	0x080c, 0x8452, 0x900e, 0x080c, 0xd2bc, 0x007e, 0x00ce, 0xb807,
+	0x0407, 0x012e, 0x0804, 0x3339, 0x6148, 0x624c, 0x7884, 0x604a,
+	0x7b88, 0x634e, 0x2069, 0x1853, 0x831f, 0x9305, 0x6816, 0x788c,
+	0x2069, 0x1956, 0x2d1c, 0x206a, 0x7e98, 0x9682, 0x0014, 0x1210,
+	0x2031, 0x07d0, 0x2069, 0x1957, 0x2d04, 0x266a, 0x789a, 0x0804,
+	0x3339, 0x0126, 0x2091, 0x8000, 0x6138, 0x7884, 0x603a, 0x910e,
+	0xd1b4, 0x190c, 0x0e9b, 0xd0c4, 0x01a8, 0x00d6, 0x78a8, 0x2009,
+	0x196d, 0x200a, 0x78ac, 0x2011, 0x196e, 0x2012, 0x2069, 0x0100,
+	0x6838, 0x9086, 0x0007, 0x1118, 0x2214, 0x6a5a, 0x0010, 0x210c,
+	0x695a, 0x00de, 0x7888, 0x603e, 0x2011, 0x0114, 0x220c, 0x7888,
+	0xd08c, 0x0118, 0x918d, 0x0080, 0x0010, 0x918c, 0xff7f, 0x2112,
+	0x6140, 0x788c, 0x6042, 0x910e, 0xd1e4, 0x190c, 0x0eb1, 0x6040,
+	0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114, 0x2012, 0x012e, 0x0804,
+	0x3339, 0x00f6, 0x2079, 0x1800, 0x7a38, 0xa898, 0x9084, 0xfebf,
+	0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002, 0x9214, 0x7838, 0x9084,
+	0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0000, 0x00fe, 0x0005, 0x7898, 0x9005, 0x01a8, 0x7888,
+	0x9025, 0x0904, 0x336e, 0x788c, 0x902d, 0x0904, 0x336e, 0x900e,
+	0x080c, 0x6247, 0x1120, 0xba44, 0xbb38, 0xbc46, 0xbd3a, 0x9186,
+	0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c, 0x48bc, 0x0904, 0x336e,
+	0x7888, 0x900d, 0x0904, 0x336e, 0x788c, 0x9005, 0x0904, 0x336e,
+	0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804, 0x3339, 0x2011, 0xbc09,
+	0x0010, 0x2011, 0xbc05, 0x080c, 0x53a3, 0x1904, 0x336b, 0x00c6,
+	0x2061, 0x0100, 0x7984, 0x9186, 0x00ff, 0x1130, 0x2001, 0x1817,
+	0x2004, 0x9085, 0xff00, 0x0088, 0x9182, 0x007f, 0x16e0, 0x9188,
+	0x313a, 0x210d, 0x918c, 0x00ff, 0x2001, 0x1817, 0x2004, 0x0026,
+	0x9116, 0x002e, 0x0580, 0x810f, 0x9105, 0x0126, 0x2091, 0x8000,
+	0x0006, 0x080c, 0x9dec, 0x000e, 0x0510, 0x602e, 0x620a, 0x7984,
+	0x00b6, 0x080c, 0x61ed, 0x2b08, 0x00be, 0x1500, 0x6112, 0x6023,
+	0x0001, 0x080c, 0x4889, 0x01d0, 0x9006, 0xa866, 0x7007, 0x0003,
+	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f, 0x3819, 0x2900, 0x6016,
+	0x2009, 0x0032, 0x080c, 0x9ebc, 0x012e, 0x00ce, 0x0005, 0x012e,
+	0x00ce, 0x0804, 0x336b, 0x00ce, 0x0804, 0x336e, 0x080c, 0x9e42,
+	0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904, 0x336b, 0x0804, 0x3339,
+	0x2061, 0x1a40, 0x0126, 0x2091, 0x8000, 0x6000, 0xd084, 0x0170,
+	0x6104, 0x6208, 0x2061, 0x1800, 0x6350, 0x6070, 0x789a, 0x60bc,
+	0x789e, 0x60b8, 0x78aa, 0x012e, 0x0804, 0x3339, 0x900e, 0x2110,
+	0x0c88, 0x81ff, 0x1904, 0x336b, 0x080c, 0x6f9b, 0x0904, 0x336b,
+	0x0126, 0x2091, 0x8000, 0x6250, 0x6070, 0x9202, 0x0248, 0x9085,
+	0x0001, 0x080c, 0x26ce, 0x080c, 0x55bd, 0x012e, 0x0804, 0x3339,
+	0x012e, 0x0804, 0x336e, 0x0006, 0x0016, 0x00c6, 0x00e6, 0x2001,
+	0x1979, 0x2070, 0x2061, 0x1853, 0x6008, 0x2072, 0x900e, 0x2011,
+	0x1400, 0x080c, 0x8259, 0x7206, 0x00ee, 0x00ce, 0x001e, 0x000e,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0128, 0x012e, 0x2021,
+	0x400b, 0x0804, 0x333b, 0x7884, 0xd0fc, 0x0148, 0x2001, 0x002a,
+	0x2004, 0x9082, 0x00e1, 0x0288, 0x012e, 0x0804, 0x336e, 0x2001,
+	0x002a, 0x2004, 0x2069, 0x1853, 0x6908, 0x9102, 0x1230, 0x012e,
+	0x0804, 0x336e, 0x012e, 0x0804, 0x336b, 0x080c, 0x9dc1, 0x0dd0,
+	0x7884, 0xd0fc, 0x0904, 0x38e4, 0x00c6, 0x080c, 0x4889, 0x00ce,
+	0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a, 0x7898, 0xa80e, 0x789c,
+	0xa812, 0x2001, 0x002e, 0x2004, 0xa81a, 0x2001, 0x002f, 0x2004,
+	0xa81e, 0x2001, 0x0030, 0x2004, 0xa822, 0x2001, 0x0031, 0x2004,
+	0xa826, 0x2001, 0x0034, 0x2004, 0xa82a, 0x2001, 0x0035, 0x2004,
+	0xa82e, 0x2001, 0x002a, 0x2004, 0x9080, 0x0003, 0x9084, 0x00fc,
+	0x8004, 0xa816, 0x080c, 0x3a6a, 0x0928, 0x7014, 0x2048, 0xad2c,
+	0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029,
+	0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x48d2, 0x701f, 0x39a7,
+	0x7023, 0x0001, 0x012e, 0x0005, 0x0046, 0x0086, 0x0096, 0x00a6,
+	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3853, 0x2001,
+	0x196f, 0x2003, 0x0000, 0x2021, 0x000a, 0x2061, 0x0100, 0x6104,
+	0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c,
+	0x3ad9, 0x080c, 0x3a98, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071,
+	0x1a35, 0x2079, 0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4,
+	0x0140, 0x2001, 0x0035, 0x2004, 0x780e, 0x2001, 0x0034, 0x2004,
+	0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x3e6c, 0x008e, 0x00ee,
+	0x00fe, 0x080c, 0x3d99, 0x080c, 0x3c9e, 0x05b8, 0x2001, 0x020b,
+	0x2004, 0x9084, 0x0140, 0x1db8, 0x080c, 0x3ee0, 0x00f6, 0x2079,
+	0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070, 0x1560, 0x2071, 0x0200,
+	0x7037, 0x0000, 0x7050, 0x9084, 0xff00, 0x9086, 0x3200, 0x1510,
+	0x7037, 0x0001, 0x7050, 0x9084, 0xff00, 0x9086, 0xe100, 0x11d0,
+	0x7037, 0x0000, 0x7054, 0x7037, 0x0000, 0x715c, 0x9106, 0x1190,
+	0x2001, 0x181f, 0x2004, 0x9106, 0x1168, 0x00c6, 0x2061, 0x0100,
+	0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138, 0x080c, 0x3ca8, 0x080c,
+	0x3a93, 0x0058, 0x080c, 0x3a93, 0x080c, 0x3e04, 0x080c, 0x3d8f,
+	0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003,
+	0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x001e, 0x6106, 0x2011,
+	0x020d, 0x2013, 0x0020, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf,
+	0x0012, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c,
+	0x129f, 0x2009, 0x0028, 0x080c, 0x226a, 0x2001, 0x0227, 0x200c,
+	0x2102, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
+	0x008e, 0x004e, 0x2001, 0x196f, 0x2004, 0x9005, 0x1118, 0x012e,
+	0x0804, 0x3339, 0x012e, 0x2021, 0x400c, 0x0804, 0x333b, 0x0016,
+	0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6,
+	0x0156, 0x7014, 0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804,
+	0x9005, 0x0904, 0x3a03, 0x2048, 0x1f04, 0x39b7, 0x7068, 0x2040,
+	0xa28c, 0xa390, 0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120,
+	0x2029, 0x0000, 0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864,
+	0x009e, 0x9086, 0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x48d2, 0x701f,
+	0x39a7, 0x00b0, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0,
+	0x0006, 0x080c, 0x0f68, 0x000e, 0x080c, 0x48d5, 0x701f, 0x39a7,
+	0x015e, 0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e,
+	0x002e, 0x001e, 0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103,
+	0x1118, 0x701f, 0x3a68, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd,
+	0xa86a, 0x2009, 0x007f, 0x080c, 0x61e7, 0x0110, 0x9006, 0x0030,
+	0xb813, 0x00ff, 0xb817, 0xfffd, 0x080c, 0xbff5, 0x015e, 0x00de,
+	0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
+	0x0904, 0x336b, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076,
+	0x0086, 0x0096, 0x00d6, 0x0156, 0x701f, 0x3a3a, 0x7007, 0x0003,
+	0x0804, 0x39f8, 0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904,
+	0x333b, 0x0076, 0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808,
 	0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c,
-	0x48c2, 0x701f, 0x399a, 0x7023, 0x0001, 0x012e, 0x0005, 0x0046,
-	0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x080c, 0x3846, 0x2001, 0x1970, 0x2003, 0x0000, 0x2021, 0x000a,
-	0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1,
-	0x60bf, 0x0012, 0x080c, 0x3acc, 0x080c, 0x3a8b, 0x00f6, 0x00e6,
-	0x0086, 0x2940, 0x2071, 0x1a36, 0x2079, 0x0090, 0x00d6, 0x2069,
-	0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035, 0x2004, 0x780e,
-	0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c,
-	0x3e5f, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3d8c, 0x080c, 0x3c91,
-	0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1db8, 0x080c,
-	0x3ed3, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070,
-	0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050, 0x9084, 0xff00,
-	0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050, 0x9084, 0xff00,
-	0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054, 0x7037, 0x0000,
-	0x715c, 0x9106, 0x1190, 0x2001, 0x181f, 0x2004, 0x9106, 0x1168,
-	0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138,
-	0x080c, 0x3c9b, 0x080c, 0x3a86, 0x0058, 0x080c, 0x3a86, 0x080c,
-	0x3df7, 0x080c, 0x3d82, 0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8,
-	0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002,
-	0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x60bb, 0x0000,
-	0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004, 0x200c, 0x918c,
-	0xfffd, 0x2102, 0x080c, 0x129f, 0x2009, 0x0028, 0x080c, 0x2268,
-	0x2001, 0x0227, 0x200c, 0x2102, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x00be, 0x00ae, 0x009e, 0x008e, 0x004e, 0x2001, 0x1970, 0x2004,
-	0x9005, 0x1118, 0x012e, 0x0804, 0x3337, 0x012e, 0x2021, 0x400c,
-	0x0804, 0x3339, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076,
-	0x0086, 0x0096, 0x00d6, 0x0156, 0x7014, 0x2048, 0x7020, 0x20a8,
-	0x8000, 0x7022, 0xa804, 0x9005, 0x0904, 0x39f6, 0x2048, 0x1f04,
-	0x39aa, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, 0xa930,
-	0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x0096,
-	0x7014, 0x2048, 0xa864, 0x009e, 0x9086, 0x0103, 0x0170, 0x8906,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b,
-	0x080c, 0x48c2, 0x701f, 0x399a, 0x00b0, 0x8906, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0,
-	0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f68, 0x000e, 0x080c,
-	0x48c5, 0x701f, 0x399a, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e,
-	0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x7014, 0x2048,
-	0xa864, 0x9086, 0x0103, 0x1118, 0x701f, 0x3a5b, 0x0450, 0x7014,
-	0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009, 0x007f, 0x080c, 0x61de,
-	0x0110, 0x9006, 0x0030, 0xb813, 0x00ff, 0xb817, 0xfffd, 0x080c,
-	0xbfdb, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e,
-	0x003e, 0x002e, 0x001e, 0x0904, 0x3369, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x701f,
-	0x3a2d, 0x7007, 0x0003, 0x0804, 0x39eb, 0xa830, 0x9086, 0x0100,
-	0x2021, 0x400c, 0x0904, 0x3339, 0x0076, 0xad10, 0xac0c, 0xab24,
-	0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021,
-	0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006,
-	0x080c, 0x0f68, 0x000e, 0x080c, 0x48c5, 0x007e, 0x701f, 0x399a,
-	0x7023, 0x0001, 0x0005, 0x0804, 0x3337, 0x0156, 0x00c6, 0xa814,
-	0x908a, 0x001e, 0x0218, 0xa833, 0x001e, 0x0010, 0xa832, 0x0078,
-	0x81ff, 0x0168, 0x0016, 0x080c, 0x4879, 0x001e, 0x0130, 0xa800,
-	0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58, 0x9006, 0x0010, 0x9085,
-	0x0001, 0x00ce, 0x015e, 0x0005, 0x0006, 0x00f6, 0x2079, 0x0000,
-	0x7880, 0x9086, 0x0044, 0x00fe, 0x000e, 0x0005, 0x2001, 0x1970,
-	0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x2061, 0x0200,
-	0x2001, 0x197b, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x197a,
-	0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x080c, 0x4879, 0xa813,
-	0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004,
-	0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2061, 0x0090, 0x2079,
-	0x0100, 0x2001, 0x197a, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c,
-	0x2268, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0x601a,
-	0xa873, 0x0000, 0x601f, 0x0000, 0x78ca, 0x9006, 0x600a, 0x600e,
-	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x080c, 0x4879, 0x2940,
-	0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030,
-	0x2004, 0xa866, 0x2001, 0x0031, 0x2004, 0xa86a, 0x2001, 0x002a,
-	0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873, 0x0000, 0x2001, 0x032a,
-	0x2003, 0x0004, 0x2001, 0x0300, 0x2003, 0x0000, 0x2001, 0x020d,
-	0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, 0x0002, 0x2102,
-	0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0148, 0x080c,
-	0x2a55, 0x1130, 0x9006, 0x080c, 0x29ad, 0x9006, 0x080c, 0x2990,
-	0x7884, 0x9084, 0x0007, 0x0002, 0x3b17, 0x3b20, 0x3b29, 0x3b14,
-	0x3b14, 0x3b14, 0x3b14, 0x3b14, 0x012e, 0x0804, 0x336c, 0x2009,
-	0x0114, 0x2104, 0x9085, 0x0800, 0x200a, 0x080c, 0x3ce5, 0x00c0,
-	0x2009, 0x0114, 0x2104, 0x9085, 0x4000, 0x200a, 0x080c, 0x3ce5,
-	0x0078, 0x080c, 0x6fb2, 0x1128, 0x012e, 0x2009, 0x0016, 0x0804,
-	0x3369, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3339,
-	0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x080c, 0x3846, 0x2009, 0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc,
-	0x9006, 0x2068, 0x2060, 0x2058, 0x080c, 0x3fae, 0x080c, 0x3efe,
-	0x903e, 0x2720, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x1a36,
-	0x2079, 0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120,
-	0x68d4, 0x780e, 0x68d0, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c,
-	0x3e5f, 0x080c, 0x2a5d, 0x080c, 0x2a5d, 0x080c, 0x2a5d, 0x080c,
-	0x2a5d, 0x080c, 0x3e5f, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3d8c,
-	0x2009, 0x9c40, 0x8109, 0x11b0, 0x080c, 0x3c9b, 0x2001, 0x0004,
-	0x200c, 0x918c, 0xfffd, 0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x2009, 0x0017, 0x080c,
-	0x3369, 0x0cf8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1d10,
-	0x00f6, 0x2079, 0x0000, 0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001,
-	0x0201, 0x200c, 0x81ff, 0x0150, 0x080c, 0x3d6a, 0x2d00, 0x9c05,
-	0x9b05, 0x0120, 0x080c, 0x3c9b, 0x0804, 0x3c48, 0x080c, 0x3ed3,
-	0x080c, 0x3df7, 0x080c, 0x3d4d, 0x080c, 0x3d82, 0x00f6, 0x2079,
-	0x0100, 0x7824, 0xd0ac, 0x0130, 0x8b58, 0x080c, 0x3c9b, 0x00fe,
-	0x0804, 0x3c48, 0x00fe, 0x080c, 0x3c91, 0x1150, 0x8d68, 0x2001,
-	0x0032, 0x2602, 0x2001, 0x0033, 0x2502, 0x080c, 0x3c9b, 0x0080,
-	0x87ff, 0x0138, 0x2001, 0x0201, 0x2004, 0x9005, 0x1908, 0x8739,
-	0x0038, 0x2001, 0x1a33, 0x2004, 0x9086, 0x0000, 0x1904, 0x3b98,
-	0x2001, 0x032f, 0x2003, 0x00f6, 0x8631, 0x1208, 0x8529, 0x2500,
-	0x9605, 0x0904, 0x3c48, 0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05,
-	0x9b05, 0x1904, 0x3c48, 0xa013, 0x0019, 0x2001, 0x032a, 0x2003,
-	0x0004, 0x7884, 0xd0ac, 0x1148, 0x2001, 0x1a33, 0x2003, 0x0003,
-	0x2001, 0x032a, 0x2003, 0x0009, 0x0030, 0xa017, 0x0001, 0x78b4,
-	0x9005, 0x0108, 0xa016, 0x2800, 0xa05a, 0x2009, 0x0040, 0x080c,
-	0x2268, 0x2900, 0xa85a, 0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180,
-	0xa817, 0x0000, 0x00c6, 0x20a9, 0x0004, 0x2061, 0x0090, 0x602b,
-	0x0008, 0x2001, 0x0203, 0x2004, 0x1f04, 0x3c1f, 0x00ce, 0x0030,
-	0xa817, 0x0001, 0x78b0, 0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6,
-	0x2079, 0x0100, 0x2061, 0x0090, 0x7827, 0x0002, 0x2001, 0x002a,
-	0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004,
-	0x601e, 0x78c6, 0x000e, 0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3b52,
-	0x001e, 0x00c6, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100,
-	0x6027, 0x0002, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x2001,
-	0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x129f, 0x7884,
-	0x9084, 0x0003, 0x9086, 0x0002, 0x01a0, 0x2009, 0x0028, 0x080c,
-	0x2268, 0x2001, 0x0227, 0x200c, 0x2102, 0x6050, 0x9084, 0xb7ef,
-	0x6052, 0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043,
-	0x0010, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05, 0x9d05,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e,
-	0x1118, 0x012e, 0x0804, 0x3337, 0x012e, 0x2021, 0x400c, 0x0804,
-	0x3339, 0x9085, 0x0001, 0x1d04, 0x3c9a, 0x2091, 0x6000, 0x8420,
-	0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, 0x0010, 0x2001,
-	0x032a, 0x2003, 0x0004, 0x2001, 0x1a33, 0x2003, 0x0000, 0x0071,
-	0x2009, 0x0048, 0x080c, 0x2268, 0x2001, 0x0227, 0x2024, 0x2402,
-	0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005, 0x00f6, 0x00e6,
-	0x2071, 0x1a36, 0x7000, 0x9086, 0x0000, 0x0520, 0x2079, 0x0090,
-	0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120,
-	0x2009, 0x0040, 0x080c, 0x2268, 0x782c, 0xd0fc, 0x0d88, 0x080c,
-	0x3ed3, 0x7000, 0x9086, 0x0000, 0x1d58, 0x782b, 0x0004, 0x782c,
-	0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x2268, 0x782b, 0x0002,
-	0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100,
-	0x2001, 0x1817, 0x200c, 0x7932, 0x7936, 0x080c, 0x26ac, 0x7850,
-	0x9084, 0xfbff, 0x9085, 0x0030, 0x7852, 0x2019, 0x01f4, 0x8319,
-	0x1df0, 0x9084, 0xffcf, 0x9085, 0x2000, 0x7852, 0x20a9, 0x0046,
-	0x1d04, 0x3d00, 0x2091, 0x6000, 0x1f04, 0x3d00, 0x7850, 0x9085,
-	0x0400, 0x9084, 0xdfff, 0x7852, 0x2001, 0x0021, 0x2004, 0x9084,
-	0x0003, 0x9086, 0x0001, 0x1120, 0x7850, 0x9084, 0xdfff, 0x7852,
-	0x784b, 0xf7f7, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x0028,
-	0xa001, 0x1f04, 0x3d20, 0x7850, 0x9085, 0x1400, 0x7852, 0x2019,
-	0x61a8, 0x7854, 0xa001, 0xa001, 0xd08c, 0x1110, 0x8319, 0x1dc8,
-	0x7827, 0x0048, 0x7850, 0x9085, 0x0400, 0x7852, 0x7843, 0x0040,
-	0x2019, 0x01f4, 0xa001, 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100,
-	0x080c, 0x2b14, 0x7827, 0x0020, 0x7843, 0x0000, 0x9006, 0x080c,
-	0x2b14, 0x7827, 0x0048, 0x00fe, 0x0005, 0x7884, 0xd0ac, 0x11c8,
-	0x00f6, 0x00e6, 0x2071, 0x1a33, 0x2079, 0x0320, 0x2001, 0x0201,
-	0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000, 0x1140, 0x0051,
-	0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b, 0x0019, 0x00ee,
-	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c,
-	0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009, 0x0033, 0x250a,
-	0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4, 0x0108,
-	0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084, 0x0110,
-	0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, 0x2001,
-	0x197b, 0x2004, 0x70e2, 0x080c, 0x3a7c, 0x1188, 0x2001, 0x181f,
-	0x2004, 0x2009, 0x181e, 0x210c, 0x918c, 0x00ff, 0x706e, 0x716a,
-	0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109, 0x0080, 0x702c,
-	0x9085, 0x0002, 0x702e, 0x2009, 0x1817, 0x210c, 0x716e, 0x7063,
-	0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, 0x0809, 0x7077,
-	0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080, 0x8000, 0x7082,
-	0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab,
-	0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984, 0x9085, 0x0092,
-	0x7016, 0x080c, 0x3ed3, 0x00f6, 0x2071, 0x1a33, 0x2079, 0x0320,
-	0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c, 0x780e,
-	0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109, 0x1df0, 0x792c,
-	0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011, 0x080c, 0x3e5f,
-	0x2011, 0x0001, 0x080c, 0x3e5f, 0x00fe, 0x00ee, 0x0005, 0x00f6,
-	0x00e6, 0x2071, 0x1a33, 0x2079, 0x0320, 0x792c, 0xd1fc, 0x0904,
-	0x3e5c, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904, 0x3e58, 0x7000,
-	0x0002, 0x3e5c, 0x3e0d, 0x3e3d, 0x3e58, 0xd1bc, 0x1170, 0xd1dc,
-	0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c, 0x3e5f, 0x0904,
-	0x3e5c, 0x080c, 0x3e5f, 0x0804, 0x3e5c, 0x00f6, 0x2079, 0x0300,
-	0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b, 0x0004, 0x7812,
-	0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c, 0x3d6a,
-	0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8, 0x00fe, 0xd0ec,
-	0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001, 0x7002, 0x9184,
-	0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x3e01, 0x2011, 0x0001,
-	0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086, 0x0015, 0x1120,
-	0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc, 0x1960, 0x0828,
-	0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0xa014,
-	0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016, 0xa058, 0x2048,
-	0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c, 0x938a, 0x0007,
-	0x1a0c, 0x0db4, 0x9398, 0x3e8d, 0x231d, 0x083f, 0x9080, 0x0004,
-	0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e, 0x908a, 0x0035,
-	0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a, 0x2001, 0x0019,
-	0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x3eca, 0x3ec1, 0x3eb8,
-	0x3eaf, 0x3ea6, 0x3e9d, 0x3e94, 0xa964, 0x7902, 0xa968, 0x7906,
-	0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974, 0x7902, 0xa978,
-	0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005, 0xa984, 0x7902,
-	0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916, 0x0005, 0xa994,
-	0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0, 0x7916, 0x0005,
-	0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912, 0xa9b0, 0x7916,
-	0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc, 0x7912, 0xa9c0,
-	0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906, 0xa9cc, 0x7912,
-	0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086, 0x2071, 0x1a36,
-	0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b, 0x0002, 0x2940,
-	0x9026, 0x7000, 0x0002, 0x3efa, 0x3ee6, 0x3ef1, 0x8001, 0x7002,
-	0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x3e5f, 0x190c, 0x3e5f,
-	0x0048, 0x8001, 0x7002, 0x782c, 0xd0fc, 0x1d38, 0x2011, 0x0001,
-	0x080c, 0x3e5f, 0x008e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6,
-	0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x197b, 0x2004, 0x601a,
-	0x2061, 0x0100, 0x2001, 0x197a, 0x2004, 0x60ce, 0x6104, 0xc1ac,
-	0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520, 0x2038, 0x2001,
-	0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c, 0x4879, 0xa813,
-	0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138,
-	0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048,
-	0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x3f76, 0x1d68, 0x2900,
-	0xa85a, 0x00d0, 0x080c, 0x4879, 0xa813, 0x0019, 0xa817, 0x0001,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8,
+	0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f68, 0x000e,
+	0x080c, 0x48d5, 0x007e, 0x701f, 0x39a7, 0x7023, 0x0001, 0x0005,
+	0x0804, 0x3339, 0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218,
+	0xa833, 0x001e, 0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016,
+	0x080c, 0x4889, 0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a,
+	0x2100, 0x0c58, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e,
+	0x0005, 0x0006, 0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044,
+	0x00fe, 0x000e, 0x0005, 0x2001, 0x196f, 0x2003, 0x0001, 0x0005,
+	0x00f6, 0x00e6, 0x00c6, 0x2061, 0x0200, 0x2001, 0x197a, 0x2004,
+	0x601a, 0x2061, 0x0100, 0x2001, 0x1979, 0x2004, 0x60ce, 0x6104,
+	0xc1ac, 0x6106, 0x080c, 0x4889, 0xa813, 0x0019, 0xa817, 0x0001,
 	0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f,
-	0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e,
-	0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090, 0x2079, 0x0100,
-	0x2001, 0x197a, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x2268,
-	0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001,
-	0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x9006, 0x600a,
-	0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x2071,
-	0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088,
-	0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a, 0x700e, 0x810b,
-	0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041, 0x702c, 0xd0fc,
-	0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005, 0x7400, 0x7304,
-	0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086, 0x080c, 0x4879,
-	0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006, 0xa05a, 0x00ae,
-	0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x2001,
-	0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001, 0x0030, 0x2024,
-	0x2001, 0x0031, 0x201c, 0x080c, 0x4879, 0x2940, 0xa813, 0x0019,
-	0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, 0x2009,
-	0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c,
-	0x9080, 0x0019, 0x009e, 0x080c, 0x3f76, 0x1d68, 0x2900, 0xa85a,
-	0x00d8, 0x080c, 0x4879, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001,
-	0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066, 0x2001, 0x0031,
-	0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa06e,
-	0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a, 0x2003, 0x0004,
-	0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c, 0x918d, 0x0200,
-	0x2102, 0xa017, 0x0000, 0x2001, 0x1a33, 0x2003, 0x0003, 0x2001,
-	0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003, 0x0000, 0x2001,
-	0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, 0x0002,
-	0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0013,
-	0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004, 0x2009, 0x013c,
-	0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108, 0x0005, 0x0804,
-	0x3337, 0x7d98, 0x7c9c, 0x0804, 0x342e, 0x080c, 0x6fb2, 0x190c,
-	0x5c96, 0x2069, 0x1853, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x48c2, 0x701f, 0x4049,
-	0x0005, 0x080c, 0x5395, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095,
-	0x20d8, 0x21d0, 0x2069, 0x1853, 0x6800, 0x9005, 0x0904, 0x336c,
-	0x6804, 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0138, 0x6200,
-	0x9292, 0x0005, 0x0218, 0x918c, 0xffdf, 0x0010, 0x918d, 0x0020,
-	0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0118,
-	0x918d, 0x0010, 0x0010, 0x918c, 0xffef, 0x6106, 0x00ce, 0xd084,
-	0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04, 0x336c, 0x9288, 0x3138,
-	0x210d, 0x918c, 0x00ff, 0x6162, 0xd0dc, 0x0130, 0x6828, 0x908a,
-	0x007f, 0x1a04, 0x336c, 0x605a, 0x6888, 0x9084, 0x0030, 0x8004,
-	0x8004, 0x8004, 0x8004, 0x0006, 0x2009, 0x1982, 0x9080, 0x279f,
-	0x2005, 0x200a, 0x000e, 0x2009, 0x1983, 0x9080, 0x27a3, 0x2005,
-	0x200a, 0x6808, 0x908a, 0x0100, 0x0a04, 0x336c, 0x908a, 0x0841,
-	0x1a04, 0x336c, 0x9084, 0x0007, 0x1904, 0x336c, 0x680c, 0x9005,
-	0x0904, 0x336c, 0x6810, 0x9005, 0x0904, 0x336c, 0x6848, 0x6940,
-	0x910a, 0x1a04, 0x336c, 0x8001, 0x0904, 0x336c, 0x684c, 0x6944,
-	0x910a, 0x1a04, 0x336c, 0x8001, 0x0904, 0x336c, 0x2009, 0x1952,
-	0x200b, 0x0000, 0x2001, 0x1875, 0x2004, 0xd0c4, 0x0140, 0x7884,
-	0x200a, 0x2009, 0x017f, 0x200a, 0x3b00, 0xc085, 0x20d8, 0x6814,
-	0x908c, 0x00ff, 0x614a, 0x8007, 0x9084, 0x00ff, 0x604e, 0x080c,
-	0x72c7, 0x080c, 0x662f, 0x080c, 0x6664, 0x6808, 0x602a, 0x080c,
-	0x21da, 0x2009, 0x0170, 0x200b, 0x0080, 0xa001, 0xa001, 0x200b,
-	0x0000, 0x0036, 0x6b08, 0x080c, 0x2706, 0x003e, 0x6000, 0x9086,
-	0x0000, 0x1904, 0x41c6, 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007,
-	0x810f, 0x8217, 0x831f, 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04,
-	0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f,
-	0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff, 0x6006, 0x610a, 0x620e,
-	0x6312, 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1,
-	0x1984, 0x20e9, 0x0001, 0x4001, 0x20a9, 0x0004, 0x20a1, 0x199e,
-	0x20e9, 0x0001, 0x4001, 0x080c, 0x8141, 0x00c6, 0x900e, 0x20a9,
-	0x0001, 0x6b70, 0xd384, 0x0510, 0x0068, 0x2009, 0x0100, 0x210c,
-	0x918e, 0x0008, 0x1110, 0x839d, 0x0010, 0x83f5, 0x3e18, 0x12b0,
-	0x3508, 0x8109, 0x080c, 0x7892, 0x6878, 0x6016, 0x6874, 0x2008,
-	0x9084, 0xff00, 0x8007, 0x600a, 0x9184, 0x00ff, 0x6006, 0x8108,
-	0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x1f04, 0x4135,
-	0x00ce, 0x00c6, 0x2061, 0x196d, 0x2063, 0x0001, 0x9006, 0x080c,
-	0x29ad, 0x9006, 0x080c, 0x2990, 0x0000, 0x00ce, 0x00e6, 0x2c70,
-	0x080c, 0x0e80, 0x00ee, 0x6888, 0xd0ec, 0x0130, 0x2011, 0x0114,
-	0x2204, 0x9085, 0x0100, 0x2012, 0x6a80, 0x9284, 0x0030, 0x9086,
-	0x0030, 0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82, 0x2001,
-	0x194d, 0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170, 0x928e,
-	0x0010, 0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c,
-	0x277b, 0x2001, 0x193e, 0x2102, 0x0008, 0x2102, 0x00c6, 0x2061,
-	0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, 0x6fb2,
-	0x0128, 0x080c, 0x4c92, 0x0110, 0x080c, 0x26cc, 0x60d0, 0x9005,
-	0x01c0, 0x6003, 0x0001, 0x2009, 0x41ae, 0x00d0, 0x080c, 0x6fb2,
-	0x1168, 0x2011, 0x6e33, 0x080c, 0x8038, 0x2011, 0x6e26, 0x080c,
-	0x810c, 0x080c, 0x729b, 0x080c, 0x6ee4, 0x0040, 0x080c, 0x5b90,
-	0x0028, 0x6003, 0x0004, 0x2009, 0x41c6, 0x0010, 0x0804, 0x3337,
-	0x2001, 0x0170, 0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, 0x1118,
-	0x2091, 0x30bd, 0x0817, 0x2091, 0x303d, 0x0817, 0x6000, 0x9086,
-	0x0000, 0x0904, 0x3369, 0x2069, 0x1853, 0x7890, 0x6842, 0x7894,
-	0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0x2039, 0x0001, 0x0804, 0x48c5, 0x9006, 0x080c, 0x26cc, 0x81ff,
-	0x1904, 0x3369, 0x080c, 0x6fb2, 0x11b0, 0x080c, 0x7296, 0x080c,
-	0x5cd1, 0x080c, 0x3133, 0x0118, 0x6130, 0xc18d, 0x6132, 0x080c,
-	0xc212, 0x0130, 0x080c, 0x6fd5, 0x1118, 0x080c, 0x6f8a, 0x0038,
-	0x080c, 0x6ee4, 0x0020, 0x080c, 0x5c96, 0x080c, 0x5b90, 0x0804,
-	0x3337, 0x81ff, 0x1904, 0x3369, 0x080c, 0x6fb2, 0x1110, 0x0804,
-	0x3369, 0x6190, 0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, 0x1c80,
-	0x2009, 0x0040, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091,
-	0x8000, 0x2039, 0x0001, 0x080c, 0x48c5, 0x701f, 0x3335, 0x012e,
-	0x0005, 0x704f, 0x0001, 0x00d6, 0x2069, 0x1c80, 0x20a9, 0x0040,
-	0x20e9, 0x0001, 0x20a1, 0x1c80, 0x2019, 0xffff, 0x4304, 0x6558,
-	0x9588, 0x3138, 0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, 0x2011,
-	0x0002, 0x2100, 0x9506, 0x01a8, 0x080c, 0x623e, 0x1190, 0xb814,
-	0x821c, 0x0238, 0x9398, 0x1c80, 0x9085, 0xff00, 0x8007, 0x201a,
-	0x0038, 0x9398, 0x1c80, 0x2324, 0x94a4, 0xff00, 0x9405, 0x201a,
-	0x8210, 0x8108, 0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007,
-	0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0x1c80,
-	0x2099, 0x1c80, 0x080c, 0x5c21, 0x0804, 0x421e, 0x080c, 0x48ac,
-	0x0904, 0x336c, 0x080c, 0x4879, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x3369, 0x080c, 0x5386, 0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e,
-	0x0538, 0x908e, 0x007f, 0x0520, 0x908e, 0x0080, 0x0508, 0x080c,
-	0x312e, 0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff,
-	0x9086, 0x0006, 0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
-	0x080c, 0xbce0, 0x1120, 0x2009, 0x0003, 0x0804, 0x3369, 0x7007,
-	0x0003, 0x701f, 0x42ac, 0x0005, 0x080c, 0x48ac, 0x0904, 0x336c,
-	0x20a9, 0x002b, 0xb8b4, 0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080,
-	0x0006, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098,
-	0x080c, 0x0f68, 0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a,
-	0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c,
-	0x0f68, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0x0804, 0x48c5, 0x81ff, 0x1904, 0x3369, 0x080c, 0x4890, 0x0904,
-	0x336c, 0x080c, 0x63b0, 0x0904, 0x3369, 0x0058, 0xa878, 0x9005,
-	0x0120, 0x2009, 0x0004, 0x0804, 0x3369, 0xa974, 0xaa94, 0x0804,
-	0x3337, 0x080c, 0x538e, 0x0904, 0x3337, 0x701f, 0x42f6, 0x7007,
-	0x0003, 0x0005, 0x81ff, 0x1904, 0x3369, 0x7888, 0x908a, 0x1000,
-	0x1a04, 0x336c, 0x080c, 0x48ac, 0x0904, 0x336c, 0x080c, 0x6562,
-	0x0120, 0x080c, 0x656a, 0x1904, 0x336c, 0x080c, 0x6435, 0x0904,
-	0x3369, 0x2019, 0x0004, 0x900e, 0x080c, 0x63c2, 0x0904, 0x3369,
-	0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8,
-	0x080c, 0x48aa, 0x01e0, 0x080c, 0x6562, 0x0118, 0x080c, 0x656a,
-	0x11b0, 0x080c, 0x6435, 0x2009, 0x0002, 0x0168, 0x2009, 0x0002,
-	0x2019, 0x0004, 0x080c, 0x63c2, 0x2009, 0x0003, 0x0120, 0xa998,
-	0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
-	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
-	0x4000, 0x080c, 0x538e, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, 0x0071,
-	0x0060, 0x2029, 0x007e, 0x2061, 0x1800, 0x6458, 0x2400, 0x9506,
-	0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x623e,
-	0x1138, 0x2200, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x8046,
-	0x0005, 0x81ff, 0x1904, 0x3369, 0x798c, 0x2001, 0x1951, 0x918c,
-	0x8000, 0x2102, 0x080c, 0x4890, 0x0904, 0x336c, 0x080c, 0x6562,
-	0x0120, 0x080c, 0x656a, 0x1904, 0x336c, 0x080c, 0x6305, 0x0904,
-	0x3369, 0x080c, 0x63b9, 0x0904, 0x3369, 0x2001, 0x1951, 0x2004,
-	0xd0fc, 0x1904, 0x3337, 0x0804, 0x4301, 0xa9a0, 0x2001, 0x1951,
-	0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x489d, 0x01a0, 0x080c,
-	0x6562, 0x0118, 0x080c, 0x656a, 0x1170, 0x080c, 0x6305, 0x2009,
-	0x0002, 0x0128, 0x080c, 0x63b9, 0x1170, 0x2009, 0x0003, 0xa897,
-	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x1951, 0x2004,
-	0xd0fc, 0x1128, 0x080c, 0x538e, 0x0110, 0x9006, 0x0018, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, 0x3369,
-	0x798c, 0x2001, 0x1950, 0x918c, 0x8000, 0x2102, 0x080c, 0x4890,
-	0x0904, 0x336c, 0x080c, 0x6562, 0x0120, 0x080c, 0x656a, 0x1904,
-	0x336c, 0x080c, 0x6305, 0x0904, 0x3369, 0x080c, 0x63a7, 0x0904,
-	0x3369, 0x2001, 0x1950, 0x2004, 0xd0fc, 0x1904, 0x3337, 0x0804,
-	0x4301, 0xa9a0, 0x2001, 0x1950, 0x918c, 0x8000, 0xc18d, 0x2102,
-	0x080c, 0x489d, 0x01a0, 0x080c, 0x6562, 0x0118, 0x080c, 0x656a,
-	0x1170, 0x080c, 0x6305, 0x2009, 0x0002, 0x0128, 0x080c, 0x63a7,
-	0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
-	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
-	0x4000, 0x2001, 0x1950, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x538e,
+	0x2004, 0xa86a, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x1979,
+	0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x226a, 0x2001, 0x002a,
+	0x2004, 0x9084, 0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f,
+	0x0000, 0x78ca, 0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe,
+	0x0005, 0x00e6, 0x080c, 0x4889, 0x2940, 0xa013, 0x0019, 0xa017,
+	0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001,
+	0x0031, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
+	0xa86e, 0xa873, 0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001,
+	0x0300, 0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001,
+	0x0004, 0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x81ff, 0x0148, 0x080c, 0x2a57, 0x1130, 0x9006,
+	0x080c, 0x29af, 0x9006, 0x080c, 0x2992, 0x7884, 0x9084, 0x0007,
+	0x0002, 0x3b24, 0x3b2d, 0x3b36, 0x3b21, 0x3b21, 0x3b21, 0x3b21,
+	0x3b21, 0x012e, 0x0804, 0x336e, 0x2009, 0x0114, 0x2104, 0x9085,
+	0x0800, 0x200a, 0x080c, 0x3cf2, 0x00c0, 0x2009, 0x0114, 0x2104,
+	0x9085, 0x4000, 0x200a, 0x080c, 0x3cf2, 0x0078, 0x080c, 0x6f9b,
+	0x1128, 0x012e, 0x2009, 0x0016, 0x0804, 0x336b, 0x81ff, 0x0128,
+	0x012e, 0x2021, 0x400b, 0x0804, 0x333b, 0x0086, 0x0096, 0x00a6,
+	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3853, 0x2009,
+	0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060,
+	0x2058, 0x080c, 0x3fbb, 0x080c, 0x3f0b, 0x903e, 0x2720, 0x00f6,
+	0x00e6, 0x0086, 0x2940, 0x2071, 0x1a35, 0x2079, 0x0090, 0x00d6,
+	0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0,
+	0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x3e6c, 0x080c, 0x2a5f,
+	0x080c, 0x2a5f, 0x080c, 0x2a5f, 0x080c, 0x2a5f, 0x080c, 0x3e6c,
+	0x008e, 0x00ee, 0x00fe, 0x080c, 0x3d99, 0x2009, 0x9c40, 0x8109,
+	0x11b0, 0x080c, 0x3ca8, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd,
+	0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae,
+	0x009e, 0x008e, 0x2009, 0x0017, 0x080c, 0x336b, 0x0cf8, 0x2001,
+	0x020b, 0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000,
+	0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff,
+	0x0150, 0x080c, 0x3d77, 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c,
+	0x3ca8, 0x0804, 0x3c55, 0x080c, 0x3ee0, 0x080c, 0x3e04, 0x080c,
+	0x3d5a, 0x080c, 0x3d8f, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac,
+	0x0130, 0x8b58, 0x080c, 0x3ca8, 0x00fe, 0x0804, 0x3c55, 0x00fe,
+	0x080c, 0x3c9e, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001,
+	0x0033, 0x2502, 0x080c, 0x3ca8, 0x0080, 0x87ff, 0x0138, 0x2001,
+	0x0201, 0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001, 0x1a32,
+	0x2004, 0x9086, 0x0000, 0x1904, 0x3ba5, 0x2001, 0x032f, 0x2003,
+	0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904, 0x3c55,
+	0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3c55,
+	0xa013, 0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac,
+	0x1148, 0x2001, 0x1a32, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003,
+	0x0009, 0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016,
+	0x2800, 0xa05a, 0x2009, 0x0040, 0x080c, 0x226a, 0x2900, 0xa85a,
+	0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6,
+	0x20a9, 0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001, 0x0203,
+	0x2004, 0x1f04, 0x3c2c, 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0,
+	0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061,
+	0x0090, 0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
+	0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e,
+	0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3b5f, 0x001e, 0x00c6, 0x2001,
+	0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x6106,
+	0x2011, 0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c, 0x918c,
+	0xfffd, 0x2102, 0x080c, 0x129f, 0x7884, 0x9084, 0x0003, 0x9086,
+	0x0002, 0x01a0, 0x2009, 0x0028, 0x080c, 0x226a, 0x2001, 0x0227,
+	0x200c, 0x2102, 0x6050, 0x9084, 0xb7ef, 0x6052, 0x602f, 0x0000,
+	0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010, 0x00ce, 0x2d08,
+	0x2c10, 0x2b18, 0x2b00, 0x9c05, 0x9d05, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x1118, 0x012e, 0x0804,
+	0x3339, 0x012e, 0x2021, 0x400c, 0x0804, 0x333b, 0x9085, 0x0001,
+	0x1d04, 0x3ca7, 0x2091, 0x6000, 0x8420, 0x9486, 0x0064, 0x0005,
+	0x2001, 0x0105, 0x2003, 0x0010, 0x2001, 0x032a, 0x2003, 0x0004,
+	0x2001, 0x1a32, 0x2003, 0x0000, 0x0071, 0x2009, 0x0048, 0x080c,
+	0x226a, 0x2001, 0x0227, 0x2024, 0x2402, 0x2001, 0x0109, 0x2003,
+	0x4000, 0x9026, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a35, 0x7000,
+	0x9086, 0x0000, 0x0520, 0x2079, 0x0090, 0x2009, 0x0206, 0x2104,
+	0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c,
+	0x226a, 0x782c, 0xd0fc, 0x0d88, 0x080c, 0x3ee0, 0x7000, 0x9086,
+	0x0000, 0x1d58, 0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009,
+	0x0040, 0x080c, 0x226a, 0x782b, 0x0002, 0x7003, 0x0000, 0x00ee,
+	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x2001, 0x1817, 0x200c,
+	0x7932, 0x7936, 0x080c, 0x26ae, 0x7850, 0x9084, 0xfbff, 0x9085,
+	0x0030, 0x7852, 0x2019, 0x01f4, 0x8319, 0x1df0, 0x9084, 0xffcf,
+	0x9085, 0x2000, 0x7852, 0x20a9, 0x0046, 0x1d04, 0x3d0d, 0x2091,
+	0x6000, 0x1f04, 0x3d0d, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfff,
+	0x7852, 0x2001, 0x0021, 0x2004, 0x9084, 0x0003, 0x9086, 0x0001,
+	0x1120, 0x7850, 0x9084, 0xdfff, 0x7852, 0x784b, 0xf7f7, 0x7843,
+	0x0090, 0x7843, 0x0010, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x3d2d,
+	0x7850, 0x9085, 0x1400, 0x7852, 0x2019, 0x61a8, 0x7854, 0xa001,
+	0xa001, 0xd08c, 0x1110, 0x8319, 0x1dc8, 0x7827, 0x0048, 0x7850,
+	0x9085, 0x0400, 0x7852, 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001,
+	0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2b16, 0x7827,
+	0x0020, 0x7843, 0x0000, 0x9006, 0x080c, 0x2b16, 0x7827, 0x0048,
+	0x00fe, 0x0005, 0x7884, 0xd0ac, 0x11c8, 0x00f6, 0x00e6, 0x2071,
+	0x1a32, 0x2079, 0x0320, 0x2001, 0x0201, 0x2004, 0x9005, 0x0160,
+	0x7000, 0x9086, 0x0000, 0x1140, 0x0051, 0xd0bc, 0x0108, 0x8738,
+	0x7003, 0x0003, 0x782b, 0x0019, 0x00ee, 0x00fe, 0x0005, 0x00f6,
+	0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070, 0x0178, 0x2009,
+	0x0032, 0x260a, 0x2009, 0x0033, 0x250a, 0xd0b4, 0x0108, 0x8c60,
+	0xd0ac, 0x0108, 0x8d68, 0xd0a4, 0x0108, 0x8b58, 0x0005, 0x00f6,
+	0x2079, 0x0200, 0x781c, 0xd084, 0x0110, 0x7837, 0x0050, 0x00fe,
+	0x0005, 0x00e6, 0x2071, 0x0100, 0x2001, 0x197a, 0x2004, 0x70e2,
+	0x080c, 0x3a89, 0x1188, 0x2001, 0x181f, 0x2004, 0x2009, 0x181e,
+	0x210c, 0x918c, 0x00ff, 0x706e, 0x716a, 0x7066, 0x918d, 0x3200,
+	0x7162, 0x7073, 0xe109, 0x0080, 0x702c, 0x9085, 0x0002, 0x702e,
+	0x2009, 0x1817, 0x210c, 0x716e, 0x7063, 0x0100, 0x7166, 0x719e,
+	0x706b, 0x0000, 0x7073, 0x0809, 0x7077, 0x0008, 0x7078, 0x9080,
+	0x0100, 0x707a, 0x7080, 0x8000, 0x7082, 0x7087, 0xaaaa, 0x9006,
+	0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab, 0x0036, 0x70af, 0x95d5,
+	0x7014, 0x9084, 0x1984, 0x9085, 0x0092, 0x7016, 0x080c, 0x3ee0,
+	0x00f6, 0x2071, 0x1a32, 0x2079, 0x0320, 0x00d6, 0x2069, 0x0000,
+	0x6884, 0xd0b4, 0x0120, 0x689c, 0x780e, 0x6898, 0x780a, 0x00de,
+	0x2009, 0x03e8, 0x8109, 0x1df0, 0x792c, 0xd1fc, 0x0110, 0x782b,
+	0x0004, 0x2011, 0x0011, 0x080c, 0x3e6c, 0x2011, 0x0001, 0x080c,
+	0x3e6c, 0x00fe, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a32,
+	0x2079, 0x0320, 0x792c, 0xd1fc, 0x0904, 0x3e69, 0x782b, 0x0002,
+	0x9026, 0xd19c, 0x1904, 0x3e65, 0x7000, 0x0002, 0x3e69, 0x3e1a,
+	0x3e4a, 0x3e65, 0xd1bc, 0x1170, 0xd1dc, 0x1190, 0x8001, 0x7002,
+	0x2011, 0x0001, 0x080c, 0x3e6c, 0x0904, 0x3e69, 0x080c, 0x3e6c,
+	0x0804, 0x3e69, 0x00f6, 0x2079, 0x0300, 0x78bf, 0x0000, 0x00fe,
+	0x7810, 0x7914, 0x782b, 0x0004, 0x7812, 0x7916, 0x2001, 0x0201,
+	0x200c, 0x81ff, 0x0de8, 0x080c, 0x3d77, 0x2009, 0x0001, 0x00f6,
+	0x2079, 0x0300, 0x78b8, 0x00fe, 0xd0ec, 0x0110, 0x2009, 0x0011,
+	0x792a, 0x00f8, 0x8001, 0x7002, 0x9184, 0x0880, 0x1140, 0x782c,
+	0xd0fc, 0x1904, 0x3e0e, 0x2011, 0x0001, 0x00b1, 0x0090, 0xa010,
+	0x9092, 0x0004, 0x9086, 0x0015, 0x1120, 0xa000, 0xa05a, 0x2011,
+	0x0031, 0xa212, 0xd1dc, 0x1960, 0x0828, 0x782b, 0x0004, 0x7003,
+	0x0000, 0x00ee, 0x00fe, 0x0005, 0xa014, 0x9005, 0x0550, 0x8001,
+	0x0036, 0x0096, 0xa016, 0xa058, 0x2048, 0xa010, 0x2009, 0x0031,
+	0x911a, 0x831c, 0x831c, 0x938a, 0x0007, 0x1a0c, 0x0db4, 0x9398,
+	0x3e9a, 0x231d, 0x083f, 0x9080, 0x0004, 0x7a2a, 0x7100, 0x8108,
+	0x7102, 0x009e, 0x003e, 0x908a, 0x0035, 0x1140, 0x0096, 0xa058,
+	0x2048, 0xa804, 0xa05a, 0x2001, 0x0019, 0x009e, 0xa012, 0x9085,
+	0x0001, 0x0005, 0x3ed7, 0x3ece, 0x3ec5, 0x3ebc, 0x3eb3, 0x3eaa,
+	0x3ea1, 0xa964, 0x7902, 0xa968, 0x7906, 0xa96c, 0x7912, 0xa970,
+	0x7916, 0x0005, 0xa974, 0x7902, 0xa978, 0x7906, 0xa97c, 0x7912,
+	0xa980, 0x7916, 0x0005, 0xa984, 0x7902, 0xa988, 0x7906, 0xa98c,
+	0x7912, 0xa990, 0x7916, 0x0005, 0xa994, 0x7902, 0xa998, 0x7906,
+	0xa99c, 0x7912, 0xa9a0, 0x7916, 0x0005, 0xa9a4, 0x7902, 0xa9a8,
+	0x7906, 0xa9ac, 0x7912, 0xa9b0, 0x7916, 0x0005, 0xa9b4, 0x7902,
+	0xa9b8, 0x7906, 0xa9bc, 0x7912, 0xa9c0, 0x7916, 0x0005, 0xa9c4,
+	0x7902, 0xa9c8, 0x7906, 0xa9cc, 0x7912, 0xa9d0, 0x7916, 0x0005,
+	0x00f6, 0x00e6, 0x0086, 0x2071, 0x1a35, 0x2079, 0x0090, 0x792c,
+	0xd1fc, 0x01e8, 0x782b, 0x0002, 0x2940, 0x9026, 0x7000, 0x0002,
+	0x3f07, 0x3ef3, 0x3efe, 0x8001, 0x7002, 0xd19c, 0x1180, 0x2011,
+	0x0001, 0x080c, 0x3e6c, 0x190c, 0x3e6c, 0x0048, 0x8001, 0x7002,
+	0x782c, 0xd0fc, 0x1d38, 0x2011, 0x0001, 0x080c, 0x3e6c, 0x008e,
+	0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x2061,
+	0x0200, 0x2001, 0x197a, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001,
+	0x1979, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x2001, 0x002c,
+	0x2004, 0x9005, 0x0520, 0x2038, 0x2001, 0x002e, 0x2024, 0x2001,
+	0x002f, 0x201c, 0x080c, 0x4889, 0xa813, 0x0019, 0xaf16, 0x2900,
+	0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010,
+	0x2708, 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019,
+	0x009e, 0x080c, 0x3f83, 0x1d68, 0x2900, 0xa85a, 0x00d0, 0x080c,
+	0x4889, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001,
+	0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2001,
+	0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0x2001, 0x002b, 0x2004,
+	0xa872, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x1979, 0x2004,
+	0x6036, 0x2009, 0x0040, 0x080c, 0x226a, 0x2001, 0x002a, 0x2004,
+	0x9084, 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e,
+	0x78c6, 0x000e, 0x78ca, 0x9006, 0x600a, 0x600e, 0x008e, 0x00ce,
+	0x00ee, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0080, 0xaa60, 0x22e8,
+	0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, 0x702b, 0x0026, 0x7402,
+	0x7306, 0x9006, 0x700a, 0x700e, 0x810b, 0x810b, 0x21a8, 0x810b,
+	0x7112, 0x702b, 0x0041, 0x702c, 0xd0fc, 0x0de8, 0x702b, 0x0002,
+	0x702b, 0x0040, 0x4005, 0x7400, 0x7304, 0x87ff, 0x0190, 0x0086,
+	0x0096, 0x2940, 0x0086, 0x080c, 0x4889, 0x008e, 0xa058, 0x00a6,
+	0x2050, 0x2900, 0xb006, 0xa05a, 0x00ae, 0x009e, 0x008e, 0x9085,
+	0x0001, 0x00ee, 0x0005, 0x00e6, 0x2001, 0x002d, 0x2004, 0x9005,
+	0x0528, 0x2038, 0x2001, 0x0030, 0x2024, 0x2001, 0x0031, 0x201c,
+	0x080c, 0x4889, 0x2940, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a,
+	0x978a, 0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708,
+	0x903e, 0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e,
+	0x080c, 0x3f83, 0x1d68, 0x2900, 0xa85a, 0x00d8, 0x080c, 0x4889,
+	0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001,
+	0x0030, 0x2004, 0xa066, 0x2001, 0x0031, 0x2004, 0xa06a, 0x2001,
+	0x002a, 0x2004, 0x9084, 0xfff8, 0xa06e, 0x2001, 0x002b, 0x2004,
+	0xa072, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1180,
+	0x2001, 0x0101, 0x200c, 0x918d, 0x0200, 0x2102, 0xa017, 0x0000,
+	0x2001, 0x1a32, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009,
+	0x2001, 0x0300, 0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000,
+	0x2001, 0x0004, 0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x20a9, 0x0013, 0x20a1, 0x1840, 0x20e9,
+	0x0001, 0x9006, 0x4004, 0x2009, 0x013c, 0x200a, 0x012e, 0x7880,
+	0x9086, 0x0052, 0x0108, 0x0005, 0x0804, 0x3339, 0x7d98, 0x7c9c,
+	0x0804, 0x343b, 0x080c, 0x6f9b, 0x190c, 0x5c9f, 0x2069, 0x1853,
+	0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039,
+	0x0001, 0x080c, 0x48d2, 0x701f, 0x4056, 0x0005, 0x080c, 0x539e,
+	0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8, 0x21d0, 0x2069,
+	0x1853, 0x6800, 0x9005, 0x0904, 0x336e, 0x6804, 0xd094, 0x00c6,
+	0x2061, 0x0100, 0x6104, 0x0138, 0x6200, 0x9292, 0x0005, 0x0218,
+	0x918c, 0xffdf, 0x0010, 0x918d, 0x0020, 0x6106, 0x00ce, 0xd08c,
+	0x00c6, 0x2061, 0x0100, 0x6104, 0x0118, 0x918d, 0x0010, 0x0010,
+	0x918c, 0xffef, 0x6106, 0x00ce, 0xd084, 0x0158, 0x6a28, 0x928a,
+	0x007f, 0x1a04, 0x336e, 0x9288, 0x313a, 0x210d, 0x918c, 0x00ff,
+	0x6162, 0xd0dc, 0x0130, 0x6828, 0x908a, 0x007f, 0x1a04, 0x336e,
+	0x605a, 0x6888, 0x9084, 0x0030, 0x8004, 0x8004, 0x8004, 0x8004,
+	0x0006, 0x2009, 0x1981, 0x9080, 0x27a1, 0x2005, 0x200a, 0x000e,
+	0x2009, 0x1982, 0x9080, 0x27a5, 0x2005, 0x200a, 0x6808, 0x908a,
+	0x0100, 0x0a04, 0x336e, 0x908a, 0x0841, 0x1a04, 0x336e, 0x9084,
+	0x0007, 0x1904, 0x336e, 0x680c, 0x9005, 0x0904, 0x336e, 0x6810,
+	0x9005, 0x0904, 0x336e, 0x6848, 0x6940, 0x910a, 0x1a04, 0x336e,
+	0x8001, 0x0904, 0x336e, 0x684c, 0x6944, 0x910a, 0x1a04, 0x336e,
+	0x8001, 0x0904, 0x336e, 0x2009, 0x1951, 0x200b, 0x0000, 0x2001,
+	0x1875, 0x2004, 0xd0c4, 0x0140, 0x7884, 0x200a, 0x2009, 0x017f,
+	0x200a, 0x3b00, 0xc085, 0x20d8, 0x6814, 0x908c, 0x00ff, 0x614a,
+	0x8007, 0x9084, 0x00ff, 0x604e, 0x080c, 0x72b0, 0x080c, 0x6634,
+	0x080c, 0x6669, 0x6808, 0x602a, 0x080c, 0x21dc, 0x2009, 0x0170,
+	0x200b, 0x0080, 0xa001, 0xa001, 0x200b, 0x0000, 0x0036, 0x6b08,
+	0x080c, 0x2708, 0x003e, 0x6000, 0x9086, 0x0000, 0x1904, 0x41d3,
+	0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f,
+	0x6016, 0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148, 0x6830,
+	0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, 0x0010,
+	0x9084, 0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, 0x8007, 0x810f,
+	0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1, 0x1983, 0x20e9, 0x0001,
+	0x4001, 0x20a9, 0x0004, 0x20a1, 0x199d, 0x20e9, 0x0001, 0x4001,
+	0x080c, 0x812a, 0x00c6, 0x900e, 0x20a9, 0x0001, 0x6b70, 0xd384,
+	0x0510, 0x0068, 0x2009, 0x0100, 0x210c, 0x918e, 0x0008, 0x1110,
+	0x839d, 0x0010, 0x83f5, 0x3e18, 0x12b0, 0x3508, 0x8109, 0x080c,
+	0x787b, 0x6878, 0x6016, 0x6874, 0x2008, 0x9084, 0xff00, 0x8007,
+	0x600a, 0x9184, 0x00ff, 0x6006, 0x8108, 0x1118, 0x6003, 0x0003,
+	0x0010, 0x6003, 0x0001, 0x1f04, 0x4142, 0x00ce, 0x00c6, 0x2061,
+	0x196c, 0x2063, 0x0001, 0x9006, 0x080c, 0x29af, 0x9006, 0x080c,
+	0x2992, 0x0000, 0x00ce, 0x00e6, 0x2c70, 0x080c, 0x0e80, 0x00ee,
+	0x6888, 0xd0ec, 0x0130, 0x2011, 0x0114, 0x2204, 0x9085, 0x0100,
+	0x2012, 0x6a80, 0x9284, 0x0030, 0x9086, 0x0030, 0x1128, 0x9294,
+	0xffcf, 0x9295, 0x0020, 0x6a82, 0x2001, 0x194c, 0x6a80, 0x9294,
+	0x0030, 0x928e, 0x0000, 0x0170, 0x928e, 0x0010, 0x0118, 0x928e,
+	0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c, 0x277d, 0x2001, 0x193d,
+	0x2102, 0x0008, 0x2102, 0x00c6, 0x2061, 0x0100, 0x602f, 0x0040,
+	0x602f, 0x0000, 0x00ce, 0x080c, 0x6f9b, 0x0128, 0x080c, 0x4c9b,
+	0x0110, 0x080c, 0x26ce, 0x60d0, 0x9005, 0x01c0, 0x6003, 0x0001,
+	0x2009, 0x41bb, 0x00d0, 0x080c, 0x6f9b, 0x1168, 0x2011, 0x6e1c,
+	0x080c, 0x8021, 0x2011, 0x6e0f, 0x080c, 0x80f5, 0x080c, 0x7284,
+	0x080c, 0x6ecd, 0x0040, 0x080c, 0x5b99, 0x0028, 0x6003, 0x0004,
+	0x2009, 0x41d3, 0x0010, 0x0804, 0x3339, 0x2001, 0x0170, 0x2004,
+	0x9084, 0x00ff, 0x9086, 0x004c, 0x1118, 0x2091, 0x30bd, 0x0817,
+	0x2091, 0x303d, 0x0817, 0x6000, 0x9086, 0x0000, 0x0904, 0x336b,
+	0x2069, 0x1853, 0x7890, 0x6842, 0x7894, 0x6846, 0x2d00, 0x2009,
+	0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0804,
+	0x48d5, 0x9006, 0x080c, 0x26ce, 0x81ff, 0x1904, 0x336b, 0x080c,
+	0x6f9b, 0x11b0, 0x080c, 0x727f, 0x080c, 0x5cda, 0x080c, 0x3135,
+	0x0118, 0x6130, 0xc18d, 0x6132, 0x080c, 0xc22c, 0x0130, 0x080c,
+	0x6fbe, 0x1118, 0x080c, 0x6f73, 0x0038, 0x080c, 0x6ecd, 0x0020,
+	0x080c, 0x5c9f, 0x080c, 0x5b99, 0x0804, 0x3339, 0x81ff, 0x1904,
+	0x336b, 0x080c, 0x6f9b, 0x1110, 0x0804, 0x336b, 0x6190, 0x81ff,
+	0x01a8, 0x704f, 0x0000, 0x2001, 0x1c80, 0x2009, 0x0040, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091, 0x8000, 0x2039, 0x0001,
+	0x080c, 0x48d5, 0x701f, 0x3337, 0x012e, 0x0005, 0x704f, 0x0001,
+	0x00d6, 0x2069, 0x1c80, 0x20a9, 0x0040, 0x20e9, 0x0001, 0x20a1,
+	0x1c80, 0x2019, 0xffff, 0x4304, 0x6558, 0x9588, 0x313a, 0x210d,
+	0x918c, 0x00ff, 0x216a, 0x900e, 0x2011, 0x0002, 0x2100, 0x9506,
+	0x01a8, 0x080c, 0x6247, 0x1190, 0xb814, 0x821c, 0x0238, 0x9398,
+	0x1c80, 0x9085, 0xff00, 0x8007, 0x201a, 0x0038, 0x9398, 0x1c80,
+	0x2324, 0x94a4, 0xff00, 0x9405, 0x201a, 0x8210, 0x8108, 0x9182,
+	0x0080, 0x1208, 0x0c18, 0x8201, 0x8007, 0x2d0c, 0x9105, 0x206a,
+	0x00de, 0x20a9, 0x0040, 0x20a1, 0x1c80, 0x2099, 0x1c80, 0x080c,
+	0x5c2a, 0x0804, 0x422b, 0x080c, 0x48bc, 0x0904, 0x336e, 0x080c,
+	0x4889, 0x1120, 0x2009, 0x0002, 0x0804, 0x336b, 0x080c, 0x538f,
+	0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e, 0x0538, 0x908e, 0x007f,
+	0x0520, 0x908e, 0x0080, 0x0508, 0x080c, 0x3130, 0x1148, 0xb800,
+	0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x11a8,
+	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbcf5, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x336b, 0x7007, 0x0003, 0x701f, 0x42b9,
+	0x0005, 0x080c, 0x48bc, 0x0904, 0x336e, 0x20a9, 0x002b, 0xb8b4,
+	0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002,
+	0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xb8b4,
+	0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0f68, 0x0070,
+	0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a, 0x20a0, 0xb8b4, 0x20e0,
+	0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f68, 0x8906, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009,
+	0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x48d5, 0x81ff,
+	0x1904, 0x336b, 0x080c, 0x48a0, 0x0904, 0x336e, 0x080c, 0x63b9,
+	0x0904, 0x336b, 0x0058, 0xa878, 0x9005, 0x0120, 0x2009, 0x0004,
+	0x0804, 0x336b, 0xa974, 0xaa94, 0x0804, 0x3339, 0x080c, 0x5397,
+	0x0904, 0x3339, 0x701f, 0x4303, 0x7007, 0x0003, 0x0005, 0x81ff,
+	0x1904, 0x336b, 0x7888, 0x908a, 0x1000, 0x1a04, 0x336e, 0x080c,
+	0x48bc, 0x0904, 0x336e, 0x080c, 0x656b, 0x0120, 0x080c, 0x6573,
+	0x1904, 0x336e, 0x080c, 0x643e, 0x0904, 0x336b, 0x2019, 0x0004,
+	0x900e, 0x080c, 0x63cb, 0x0904, 0x336b, 0x7984, 0x7a88, 0x04c9,
+	0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8, 0x080c, 0x48ba, 0x01e0,
+	0x080c, 0x656b, 0x0118, 0x080c, 0x6573, 0x11b0, 0x080c, 0x643e,
+	0x2009, 0x0002, 0x0168, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c,
+	0x63cb, 0x2009, 0x0003, 0x0120, 0xa998, 0xaa9c, 0x00d1, 0x0060,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x080c, 0x5397,
 	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
-	0x0005, 0x6100, 0x0804, 0x3337, 0x080c, 0x48ac, 0x0904, 0x336c,
-	0x080c, 0x539a, 0x1904, 0x3369, 0x79a8, 0xd184, 0x1158, 0xb834,
-	0x8007, 0x789e, 0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28,
-	0x8217, 0x0050, 0xb824, 0x8007, 0x789e, 0xb820, 0x8007, 0x789a,
-	0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900, 0x918c, 0x0200, 0x0804,
-	0x3337, 0x78a8, 0x909c, 0x0003, 0xd0b4, 0x1148, 0x939a, 0x0003,
-	0x1a04, 0x3369, 0x6258, 0x7884, 0x9206, 0x1904, 0x44b1, 0x2031,
-	0x1848, 0x2009, 0x013c, 0x2136, 0x2001, 0x1840, 0x2009, 0x000c,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0006, 0x78a8,
-	0x9084, 0x0080, 0x11c8, 0x0006, 0x0036, 0x2001, 0x1a4f, 0x201c,
-	0x7b9a, 0x2003, 0x0000, 0x2001, 0x1a50, 0x201c, 0x7b9e, 0x2003,
-	0x0000, 0x2001, 0x1a51, 0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e,
-	0x000e, 0x000e, 0x0804, 0x48c5, 0x000e, 0x2031, 0x0000, 0x2061,
-	0x18ae, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392,
-	0xa496, 0xa59a, 0x080c, 0x10d5, 0x7007, 0x0002, 0x701f, 0x44d1,
-	0x0005, 0x81ff, 0x1904, 0x3369, 0x080c, 0x48ac, 0x0904, 0x336c,
-	0x080c, 0x6562, 0x1904, 0x3369, 0x00c6, 0x080c, 0x4879, 0x00ce,
-	0x0904, 0x3369, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8,
-	0x080c, 0xbc86, 0x0904, 0x3369, 0x7007, 0x0003, 0x701f, 0x44eb,
-	0x0005, 0x080c, 0x401b, 0x0006, 0x0036, 0x2001, 0x1a4f, 0x201c,
-	0x7b9a, 0x2003, 0x0000, 0x2001, 0x1a50, 0x201c, 0x7b9e, 0x2003,
-	0x0000, 0x2001, 0x1a51, 0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e,
-	0x000e, 0x0804, 0x3337, 0xa830, 0x9086, 0x0100, 0x0904, 0x3369,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x001b, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804,
-	0x48c5, 0x9006, 0x080c, 0x26cc, 0x78a8, 0x9084, 0x00ff, 0x9086,
-	0x00ff, 0x0118, 0x81ff, 0x1904, 0x3369, 0x080c, 0x6fb2, 0x0110,
-	0x080c, 0x5c96, 0x7888, 0x908a, 0x1000, 0x1a04, 0x336c, 0x7984,
-	0x9186, 0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04, 0x336c, 0x2100,
-	0x080c, 0x2696, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061,
-	0x19cb, 0x601b, 0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077,
-	0x0000, 0x080c, 0x6fb2, 0x1158, 0x080c, 0x7296, 0x080c, 0x5cd1,
-	0x9085, 0x0001, 0x080c, 0x6ff9, 0x080c, 0x6ee4, 0x00d0, 0x080c,
-	0x9db8, 0x2061, 0x0100, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff,
-	0x810f, 0x9105, 0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009,
-	0x196a, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5bbc, 0x080c,
-	0x80ca, 0x7984, 0x080c, 0x6fb2, 0x1110, 0x2009, 0x00ff, 0x7a88,
-	0x080c, 0x4364, 0x012e, 0x00ce, 0x002e, 0x0804, 0x3337, 0x7984,
-	0x080c, 0x61de, 0x2b08, 0x1904, 0x336c, 0x0804, 0x3337, 0x81ff,
-	0x0120, 0x2009, 0x0001, 0x0804, 0x3369, 0x60d8, 0xd0ac, 0x1130,
-	0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x3369, 0x080c, 0x4879,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x3369, 0x7984, 0x9192, 0x0021,
-	0x1a04, 0x336c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
-	0x0019, 0x702a, 0xaf60, 0x7736, 0x080c, 0x48c2, 0x701f, 0x459f,
-	0x7880, 0x9086, 0x006e, 0x0110, 0x701f, 0x4e44, 0x0005, 0x2009,
-	0x0080, 0x080c, 0x623e, 0x1118, 0x080c, 0x6562, 0x0120, 0x2021,
-	0x400a, 0x0804, 0x3339, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70,
-	0xac74, 0xad78, 0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x4638,
-	0x90be, 0x0112, 0x0904, 0x4638, 0x90be, 0x0113, 0x0904, 0x4638,
-	0x90be, 0x0114, 0x0904, 0x4638, 0x90be, 0x0117, 0x0904, 0x4638,
-	0x90be, 0x011a, 0x0904, 0x4638, 0x90be, 0x011c, 0x0904, 0x4638,
-	0x90be, 0x0121, 0x0904, 0x461f, 0x90be, 0x0131, 0x0904, 0x461f,
-	0x90be, 0x0171, 0x0904, 0x4638, 0x90be, 0x0173, 0x0904, 0x4638,
-	0x90be, 0x01a1, 0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x4643,
-	0x90be, 0x0212, 0x0904, 0x462c, 0x90be, 0x0213, 0x05e8, 0x90be,
-	0x0214, 0x0500, 0x90be, 0x0217, 0x0188, 0x90be, 0x021a, 0x1120,
-	0xa89c, 0x8007, 0xa89e, 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be,
-	0x0300, 0x05b0, 0x009e, 0x00de, 0x0804, 0x336c, 0x7028, 0x9080,
-	0x0010, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007,
-	0x080c, 0x4681, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034,
-	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x4681, 0x00c8, 0x7028,
-	0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9,
-	0x0001, 0x080c, 0x468e, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098,
-	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x468e,
-	0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8,
-	0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c, 0x4879, 0x0550, 0xa868,
-	0xc0fd, 0xa86a, 0xa867, 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020,
-	0xa88b, 0x0001, 0x810b, 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe,
-	0xadc2, 0xa9c6, 0xa8ca, 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822,
-	0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c, 0xbca1, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x3369, 0x7007, 0x0003, 0x701f, 0x4678,
-	0x0005, 0x00ce, 0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x3369,
-	0xa820, 0x9086, 0x8001, 0x1904, 0x3337, 0x2009, 0x0004, 0x0804,
-	0x3369, 0x0016, 0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104,
-	0x4004, 0x8211, 0x1dc8, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
-	0x0036, 0x0046, 0x3520, 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204,
-	0x4104, 0x4004, 0x8421, 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3369, 0x60d8,
-	0xd0ac, 0x1160, 0xd09c, 0x0120, 0x2009, 0x0016, 0x0804, 0x3369,
-	0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x3369, 0x7984, 0x78a8,
-	0x2040, 0x080c, 0x9db1, 0x1120, 0x9182, 0x007f, 0x0a04, 0x336c,
-	0x9186, 0x00ff, 0x0904, 0x336c, 0x9182, 0x0800, 0x1a04, 0x336c,
-	0x7a8c, 0x7b88, 0x6078, 0x9306, 0x1140, 0x607c, 0x924e, 0x0904,
-	0x336c, 0x99cc, 0xff00, 0x0904, 0x336c, 0x0126, 0x2091, 0x8000,
-	0x0026, 0x2011, 0x8008, 0x080c, 0x6586, 0x002e, 0x0140, 0x918d,
-	0x8000, 0x080c, 0x65d0, 0x1118, 0x2001, 0x4009, 0x0458, 0x080c,
-	0x4793, 0x0560, 0x90c6, 0x4000, 0x1170, 0x00c6, 0x0006, 0x900e,
-	0x080c, 0x645e, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
+	0x0005, 0x9186, 0x00ff, 0x0110, 0x0071, 0x0060, 0x2029, 0x007e,
+	0x2061, 0x1800, 0x6458, 0x2400, 0x9506, 0x0110, 0x2508, 0x0019,
+	0x8529, 0x1ec8, 0x0005, 0x080c, 0x6247, 0x1138, 0x2200, 0x8003,
+	0x800b, 0x810b, 0x9108, 0x080c, 0x802f, 0x0005, 0x81ff, 0x1904,
+	0x336b, 0x798c, 0x2001, 0x1950, 0x918c, 0x8000, 0x2102, 0x080c,
+	0x48a0, 0x0904, 0x336e, 0x080c, 0x656b, 0x0120, 0x080c, 0x6573,
+	0x1904, 0x336e, 0x080c, 0x630e, 0x0904, 0x336b, 0x080c, 0x63c2,
+	0x0904, 0x336b, 0x2001, 0x1950, 0x2004, 0xd0fc, 0x1904, 0x3339,
+	0x0804, 0x430e, 0xa9a0, 0x2001, 0x1950, 0x918c, 0x8000, 0xc18d,
+	0x2102, 0x080c, 0x48ad, 0x01a0, 0x080c, 0x656b, 0x0118, 0x080c,
+	0x6573, 0x1170, 0x080c, 0x630e, 0x2009, 0x0002, 0x0128, 0x080c,
+	0x63c2, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010,
+	0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005,
+	0xa897, 0x4000, 0x2001, 0x1950, 0x2004, 0xd0fc, 0x1128, 0x080c,
+	0x5397, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0000, 0x0005, 0x81ff, 0x1904, 0x336b, 0x798c, 0x2001, 0x194f,
+	0x918c, 0x8000, 0x2102, 0x080c, 0x48a0, 0x0904, 0x336e, 0x080c,
+	0x656b, 0x0120, 0x080c, 0x6573, 0x1904, 0x336e, 0x080c, 0x630e,
+	0x0904, 0x336b, 0x080c, 0x63b0, 0x0904, 0x336b, 0x2001, 0x194f,
+	0x2004, 0xd0fc, 0x1904, 0x3339, 0x0804, 0x430e, 0xa9a0, 0x2001,
+	0x194f, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x48ad, 0x01a0,
+	0x080c, 0x656b, 0x0118, 0x080c, 0x6573, 0x1170, 0x080c, 0x630e,
+	0x2009, 0x0002, 0x0128, 0x080c, 0x63b0, 0x1170, 0x2009, 0x0003,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x194f,
+	0x2004, 0xd0fc, 0x1128, 0x080c, 0x5397, 0x0110, 0x9006, 0x0018,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x6100, 0x0804,
+	0x3339, 0x080c, 0x48bc, 0x0904, 0x336e, 0x080c, 0x53a3, 0x1904,
+	0x336b, 0x79a8, 0xd184, 0x1158, 0xb834, 0x8007, 0x789e, 0xb830,
+	0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28, 0x8217, 0x0050, 0xb824,
+	0x8007, 0x789e, 0xb820, 0x8007, 0x789a, 0xbb1c, 0x831f, 0xba18,
+	0x8217, 0xb900, 0x918c, 0x0200, 0x0804, 0x3339, 0x78a8, 0x909c,
+	0x0003, 0xd0b4, 0x1148, 0x939a, 0x0003, 0x1a04, 0x336b, 0x6258,
+	0x7884, 0x9206, 0x1904, 0x44be, 0x2031, 0x1848, 0x2009, 0x013c,
+	0x2136, 0x2001, 0x1840, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c,
+	0x7d98, 0x2039, 0x0001, 0x0006, 0x78a8, 0x9084, 0x0080, 0x11c8,
+	0x0006, 0x0036, 0x2001, 0x1a4e, 0x201c, 0x7b9a, 0x2003, 0x0000,
+	0x2001, 0x1a4f, 0x201c, 0x7b9e, 0x2003, 0x0000, 0x2001, 0x1a50,
+	0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e, 0x000e, 0x000e, 0x0804,
+	0x48d5, 0x000e, 0x2031, 0x0000, 0x2061, 0x18ae, 0x2c44, 0xa66a,
+	0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
+	0x10d5, 0x7007, 0x0002, 0x701f, 0x44de, 0x0005, 0x81ff, 0x1904,
+	0x336b, 0x080c, 0x48bc, 0x0904, 0x336e, 0x080c, 0x656b, 0x1904,
+	0x336b, 0x00c6, 0x080c, 0x4889, 0x00ce, 0x0904, 0x336b, 0xa867,
+	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8, 0x080c, 0xbc9b, 0x0904,
+	0x336b, 0x7007, 0x0003, 0x701f, 0x44f8, 0x0005, 0x080c, 0x4028,
+	0x0006, 0x0036, 0x2001, 0x1a4e, 0x201c, 0x7b9a, 0x2003, 0x0000,
+	0x2001, 0x1a4f, 0x201c, 0x7b9e, 0x2003, 0x0000, 0x2001, 0x1a50,
+	0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e, 0x000e, 0x0804, 0x3339,
+	0xa830, 0x9086, 0x0100, 0x0904, 0x336b, 0x8906, 0x8006, 0x8007,
+	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x2009, 0x000c,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x48d5, 0x9006, 0x080c,
+	0x26ce, 0x78a8, 0x9084, 0x00ff, 0x9086, 0x00ff, 0x0118, 0x81ff,
+	0x1904, 0x336b, 0x080c, 0x6f9b, 0x0110, 0x080c, 0x5c9f, 0x7888,
+	0x908a, 0x1000, 0x1a04, 0x336e, 0x7984, 0x9186, 0x00ff, 0x0138,
+	0x9182, 0x007f, 0x1a04, 0x336e, 0x2100, 0x080c, 0x2698, 0x0026,
+	0x00c6, 0x0126, 0x2091, 0x8000, 0x2061, 0x19ca, 0x601b, 0x0000,
+	0x601f, 0x0000, 0x6073, 0x0000, 0x6077, 0x0000, 0x080c, 0x6f9b,
+	0x1158, 0x080c, 0x727f, 0x080c, 0x5cda, 0x9085, 0x0001, 0x080c,
+	0x6fe2, 0x080c, 0x6ecd, 0x00d0, 0x080c, 0x9dc8, 0x2061, 0x0100,
+	0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x810f, 0x9105, 0x604a,
+	0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1969, 0x200b, 0x0000,
+	0x2009, 0x002d, 0x2011, 0x5bc5, 0x080c, 0x80b3, 0x7984, 0x080c,
+	0x6f9b, 0x1110, 0x2009, 0x00ff, 0x7a88, 0x080c, 0x4371, 0x012e,
+	0x00ce, 0x002e, 0x0804, 0x3339, 0x7984, 0x080c, 0x61e7, 0x2b08,
+	0x1904, 0x336e, 0x0804, 0x3339, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x336b, 0x60d8, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009,
+	0x0005, 0x0804, 0x336b, 0x080c, 0x4889, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x336b, 0x7984, 0x9192, 0x0021, 0x1a04, 0x336e, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0x702a, 0xaf60,
+	0x7736, 0x080c, 0x48d2, 0x701f, 0x45ac, 0x7880, 0x9086, 0x006e,
+	0x0110, 0x701f, 0x4e4d, 0x0005, 0x2009, 0x0080, 0x080c, 0x6247,
+	0x1118, 0x080c, 0x656b, 0x0120, 0x2021, 0x400a, 0x0804, 0x333b,
+	0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70, 0xac74, 0xad78, 0xae7c,
+	0xa884, 0x90be, 0x0100, 0x0904, 0x4645, 0x90be, 0x0112, 0x0904,
+	0x4645, 0x90be, 0x0113, 0x0904, 0x4645, 0x90be, 0x0114, 0x0904,
+	0x4645, 0x90be, 0x0117, 0x0904, 0x4645, 0x90be, 0x011a, 0x0904,
+	0x4645, 0x90be, 0x011c, 0x0904, 0x4645, 0x90be, 0x0121, 0x0904,
+	0x462c, 0x90be, 0x0131, 0x0904, 0x462c, 0x90be, 0x0171, 0x0904,
+	0x4645, 0x90be, 0x0173, 0x0904, 0x4645, 0x90be, 0x01a1, 0x1128,
+	0xa894, 0x8007, 0xa896, 0x0804, 0x4650, 0x90be, 0x0212, 0x0904,
+	0x4639, 0x90be, 0x0213, 0x05e8, 0x90be, 0x0214, 0x0500, 0x90be,
+	0x0217, 0x0188, 0x90be, 0x021a, 0x1120, 0xa89c, 0x8007, 0xa89e,
+	0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be, 0x0300, 0x05b0, 0x009e,
+	0x00de, 0x0804, 0x336e, 0x7028, 0x9080, 0x0010, 0x2098, 0x20a0,
+	0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007, 0x080c, 0x468e, 0x7028,
+	0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9,
+	0x0001, 0x080c, 0x468e, 0x00c8, 0x7028, 0x9080, 0x000c, 0x2098,
+	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x469b,
+	0x00b8, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0,
+	0x20e8, 0x20a9, 0x0001, 0x080c, 0x469b, 0x7028, 0x9080, 0x000c,
+	0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x04f1,
+	0x00c6, 0x080c, 0x4889, 0x0550, 0xa868, 0xc0fd, 0xa86a, 0xa867,
+	0x0119, 0x9006, 0xa882, 0xa87f, 0x0020, 0xa88b, 0x0001, 0x810b,
+	0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe, 0xadc2, 0xa9c6, 0xa8ca,
+	0x00ce, 0x009e, 0x00de, 0xa866, 0xa822, 0xa868, 0xc0fd, 0xa86a,
+	0xa804, 0x2048, 0x080c, 0xbcb6, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x336b, 0x7007, 0x0003, 0x701f, 0x4685, 0x0005, 0x00ce, 0x009e,
+	0x00de, 0x2009, 0x0002, 0x0804, 0x336b, 0xa820, 0x9086, 0x8001,
+	0x1904, 0x3339, 0x2009, 0x0004, 0x0804, 0x336b, 0x0016, 0x0026,
+	0x3510, 0x20a9, 0x0002, 0x4002, 0x4104, 0x4004, 0x8211, 0x1dc8,
+	0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0036, 0x0046, 0x3520,
+	0x20a9, 0x0004, 0x4002, 0x4304, 0x4204, 0x4104, 0x4004, 0x8421,
+	0x1db8, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x81ff, 0x0120,
+	0x2009, 0x0001, 0x0804, 0x336b, 0x60d8, 0xd0ac, 0x1160, 0xd09c,
+	0x0120, 0x2009, 0x0016, 0x0804, 0x336b, 0xd09c, 0x1120, 0x2009,
+	0x0005, 0x0804, 0x336b, 0x7984, 0x78a8, 0x2040, 0x080c, 0x9dc1,
+	0x1120, 0x9182, 0x007f, 0x0a04, 0x336e, 0x9186, 0x00ff, 0x0904,
+	0x336e, 0x9182, 0x0800, 0x1a04, 0x336e, 0x7a8c, 0x7b88, 0x6078,
+	0x9306, 0x1158, 0x607c, 0x924e, 0x0904, 0x336e, 0x080c, 0x9dc1,
+	0x1120, 0x99cc, 0xff00, 0x0904, 0x336e, 0x0126, 0x2091, 0x8000,
+	0x0026, 0x2011, 0x8008, 0x080c, 0x658f, 0x002e, 0x0140, 0x918d,
+	0x8000, 0x080c, 0x65d9, 0x1118, 0x2001, 0x4009, 0x0458, 0x080c,
+	0x47a3, 0x0560, 0x90c6, 0x4000, 0x1170, 0x00c6, 0x0006, 0x900e,
+	0x080c, 0x6467, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
 	0x000e, 0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x0090,
 	0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0060, 0x90c6, 0x4009,
 	0x1108, 0x0040, 0x90c6, 0x4006, 0x1108, 0x0020, 0x2001, 0x4005,
-	0x2009, 0x000a, 0x2020, 0x012e, 0x0804, 0x3339, 0x2b00, 0x7026,
-	0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0x9e7f, 0x0904,
-	0x4760, 0x2b00, 0x6012, 0x080c, 0xbf8c, 0x2e58, 0x00ee, 0x00e6,
-	0x00c6, 0x080c, 0x4879, 0x00ce, 0x2b70, 0x1158, 0x080c, 0x9e32,
+	0x2009, 0x000a, 0x2020, 0x012e, 0x0804, 0x333b, 0x2b00, 0x7026,
+	0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0x9e8f, 0x0904,
+	0x4770, 0x2b00, 0x6012, 0x080c, 0xbfa6, 0x2e58, 0x00ee, 0x00e6,
+	0x00c6, 0x080c, 0x4889, 0x00ce, 0x2b70, 0x1158, 0x080c, 0x9e42,
 	0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002, 0x0804,
-	0x3369, 0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932, 0xa868,
-	0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x080c, 0x2fda, 0x6023,
-	0x0001, 0x9006, 0x080c, 0x617b, 0x2001, 0x0002, 0x080c, 0x618f,
-	0x2009, 0x0002, 0x080c, 0x9eac, 0x78a8, 0xd094, 0x0138, 0x00ee,
+	0x336b, 0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932, 0xa868,
+	0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x080c, 0x2fdc, 0x6023,
+	0x0001, 0x9006, 0x080c, 0x6184, 0x2001, 0x0002, 0x080c, 0x6198,
+	0x2009, 0x0002, 0x080c, 0x9ebc, 0x78a8, 0xd094, 0x0138, 0x00ee,
 	0x7024, 0x00e6, 0x2058, 0xb8bc, 0xc08d, 0xb8be, 0x9085, 0x0001,
 	0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009, 0x0003,
-	0x0804, 0x3369, 0x7007, 0x0003, 0x701f, 0x476f, 0x0005, 0xa830,
-	0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804, 0x3339,
+	0x0804, 0x336b, 0x7007, 0x0003, 0x701f, 0x477f, 0x0005, 0xa830,
+	0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804, 0x333b,
 	0x9086, 0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004, 0xba04,
-	0x9294, 0x00ff, 0x0804, 0x52e3, 0x900e, 0xa868, 0xd0f4, 0x1904,
-	0x3337, 0x080c, 0x645e, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0x0804, 0x3337, 0x00e6, 0x00d6, 0x0096, 0x83ff, 0x0904,
-	0x47db, 0x902e, 0x080c, 0x9db1, 0x0130, 0x9026, 0x20a9, 0x0800,
+	0x9294, 0x00ff, 0x0804, 0x52ec, 0x900e, 0xa868, 0xd0f4, 0x1904,
+	0x3339, 0x080c, 0x6467, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
+	0xc18d, 0x0804, 0x3339, 0x00e6, 0x00d6, 0x0096, 0x83ff, 0x0904,
+	0x47eb, 0x902e, 0x080c, 0x9dc1, 0x0130, 0x9026, 0x20a9, 0x0800,
 	0x2071, 0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781, 0x2071,
 	0x107f, 0x2e04, 0x9005, 0x11b0, 0x2100, 0x9406, 0x15e8, 0x2428,
 	0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd, 0x1528, 0x0030, 0x94ce,
 	0x0080, 0x1130, 0x92ce, 0xfffc, 0x11f0, 0x93ce, 0x00ff, 0x11d8,
 	0xc5fd, 0x0450, 0x2058, 0xbf10, 0x2700, 0x9306, 0x11b8, 0xbe14,
 	0x2600, 0x9206, 0x1198, 0x2400, 0x9106, 0x1150, 0xd884, 0x0568,
-	0xd894, 0x1558, 0x080c, 0x6562, 0x1540, 0x2001, 0x4000, 0x0430,
+	0xd894, 0x1558, 0x080c, 0x656b, 0x1540, 0x2001, 0x4000, 0x0430,
 	0x2001, 0x4007, 0x0418, 0x2001, 0x4006, 0x0400, 0x2400, 0x9106,
-	0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0948, 0x080c, 0x9db1,
-	0x1930, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x47a9,
+	0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0948, 0x080c, 0x9dc1,
+	0x1930, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x47b9,
 	0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001, 0x0030,
-	0x080c, 0x61de, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, 0x009e,
+	0x080c, 0x61e7, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, 0x009e,
 	0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
-	0x3369, 0x080c, 0x4879, 0x1120, 0x2009, 0x0002, 0x0804, 0x3369,
+	0x336b, 0x080c, 0x4889, 0x1120, 0x2009, 0x0002, 0x0804, 0x336b,
 	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005, 0x0904,
-	0x336c, 0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, 0x336c,
-	0x2010, 0x2918, 0x080c, 0x2f80, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x3369, 0x7007, 0x0003, 0x701f, 0x482e, 0x0005, 0xa830, 0x9086,
-	0x0100, 0x1904, 0x3337, 0x2009, 0x0004, 0x0804, 0x3369, 0x7984,
-	0x080c, 0x9db1, 0x1120, 0x9182, 0x007f, 0x0a04, 0x336c, 0x9186,
-	0x00ff, 0x0904, 0x336c, 0x9182, 0x0800, 0x1a04, 0x336c, 0x2001,
-	0x9000, 0x080c, 0x533e, 0x1904, 0x3369, 0x0804, 0x3337, 0xa998,
-	0x080c, 0x9db1, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186, 0x00ff,
-	0x0168, 0x9182, 0x0800, 0x1250, 0x2001, 0x9000, 0x080c, 0x533e,
+	0x336e, 0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, 0x336e,
+	0x2010, 0x2918, 0x080c, 0x2f82, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x336b, 0x7007, 0x0003, 0x701f, 0x483e, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x1904, 0x3339, 0x2009, 0x0004, 0x0804, 0x336b, 0x7984,
+	0x080c, 0x9dc1, 0x1120, 0x9182, 0x007f, 0x0a04, 0x336e, 0x9186,
+	0x00ff, 0x0904, 0x336e, 0x9182, 0x0800, 0x1a04, 0x336e, 0x2001,
+	0x9000, 0x080c, 0x5347, 0x1904, 0x336b, 0x0804, 0x3339, 0xa998,
+	0x080c, 0x9dc1, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186, 0x00ff,
+	0x0168, 0x9182, 0x0800, 0x1250, 0x2001, 0x9000, 0x080c, 0x5347,
 	0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
 	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
 	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x2009, 0x000a,
 	0x0c48, 0x080c, 0x0feb, 0x0198, 0x9006, 0xa802, 0x7014, 0x9005,
 	0x1120, 0x2900, 0x7016, 0x701a, 0x0040, 0x7018, 0xa802, 0x0086,
 	0x2040, 0x2900, 0xa006, 0x701a, 0x008e, 0x9085, 0x0001, 0x0005,
-	0x7984, 0x080c, 0x623e, 0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082,
-	0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, 0x623e,
+	0x7984, 0x080c, 0x6247, 0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082,
+	0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, 0x6247,
 	0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e,
-	0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, 0x623e,
+	0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, 0x6247,
 	0x1108, 0x0008, 0x905e, 0x8bff, 0x0005, 0x0016, 0x7114, 0x81ff,
 	0x0128, 0x2148, 0xa904, 0x080c, 0x101d, 0x0cc8, 0x7116, 0x711a,
 	0x001e, 0x0005, 0x2031, 0x0001, 0x0010, 0x2031, 0x0000, 0x2061,
 	0x18ae, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392,
-	0xa496, 0xa59a, 0x080c, 0x10d5, 0x7007, 0x0002, 0x701f, 0x3337,
+	0xa496, 0xa59a, 0x080c, 0x10d5, 0x7007, 0x0002, 0x701f, 0x3339,
 	0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0000, 0x2001,
-	0x18a6, 0x2004, 0x9005, 0x1190, 0x0e04, 0x48f6, 0x7a36, 0x7833,
+	0x18a6, 0x2004, 0x9005, 0x1190, 0x0e04, 0x4906, 0x7a36, 0x7833,
 	0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x1187, 0x0804, 0x495c, 0x0016, 0x0086,
+	0x2004, 0xd084, 0x190c, 0x1187, 0x0804, 0x496c, 0x0016, 0x0086,
 	0x0096, 0x00c6, 0x00e6, 0x2071, 0x1894, 0x7044, 0x9005, 0x1540,
 	0x7148, 0x9182, 0x0010, 0x0288, 0x7038, 0x2060, 0x080c, 0x0feb,
-	0x0904, 0x4954, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, 0x0002,
-	0x9080, 0x1f26, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, 0x0004,
+	0x0904, 0x4964, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, 0x0002,
+	0x9080, 0x1f28, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, 0x0004,
 	0x2001, 0x18b0, 0x9c82, 0x18f0, 0x0210, 0x2061, 0x18b0, 0x2c00,
 	0x703a, 0x7148, 0x81ff, 0x1108, 0x703e, 0x8108, 0x714a, 0x0460,
 	0x7148, 0x8108, 0x714a, 0x7044, 0x2040, 0xa144, 0x2105, 0x0016,
@@ -2140,23 +2142,23 @@
 	0x9005, 0xa146, 0x1520, 0x080c, 0x0feb, 0x1130, 0x8109, 0xa946,
 	0x7148, 0x8109, 0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a, 0xa046,
 	0x2800, 0xa802, 0x2900, 0xa006, 0x7046, 0x2001, 0x0002, 0x9080,
-	0x1f26, 0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a, 0x00ee,
+	0x1f28, 0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a, 0x00ee,
 	0x00ce, 0x009e, 0x008e, 0x001e, 0x012e, 0x00fe, 0x0005, 0x2c00,
-	0x9082, 0x001b, 0x0002, 0x497e, 0x497e, 0x4980, 0x497e, 0x497e,
-	0x497e, 0x4984, 0x497e, 0x497e, 0x497e, 0x4988, 0x497e, 0x497e,
-	0x497e, 0x498c, 0x497e, 0x497e, 0x497e, 0x4990, 0x497e, 0x497e,
-	0x497e, 0x4994, 0x497e, 0x497e, 0x497e, 0x4999, 0x080c, 0x0db4,
+	0x9082, 0x001b, 0x0002, 0x498e, 0x498e, 0x4990, 0x498e, 0x498e,
+	0x498e, 0x4994, 0x498e, 0x498e, 0x498e, 0x4998, 0x498e, 0x498e,
+	0x498e, 0x499c, 0x498e, 0x498e, 0x498e, 0x49a0, 0x498e, 0x498e,
+	0x498e, 0x49a4, 0x498e, 0x498e, 0x498e, 0x49a9, 0x080c, 0x0db4,
 	0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e, 0x0878,
 	0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae, 0x0838,
 	0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce, 0x0804,
-	0x4957, 0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x4957, 0x00e6, 0x2071,
-	0x1894, 0x7048, 0x9005, 0x0904, 0x4a30, 0x0126, 0x2091, 0x8000,
-	0x0e04, 0x4a2f, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, 0x0086,
+	0x4967, 0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x4967, 0x00e6, 0x2071,
+	0x1894, 0x7048, 0x9005, 0x0904, 0x4a40, 0x0126, 0x2091, 0x8000,
+	0x0e04, 0x4a3f, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, 0x0086,
 	0x0076, 0x9006, 0x2038, 0x7040, 0x2048, 0x9005, 0x0500, 0xa948,
 	0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0db4, 0x2060, 0x001e,
-	0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, 0x4a32, 0xa804, 0x9005,
+	0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, 0x4a42, 0xa804, 0x9005,
 	0x090c, 0x0db4, 0x7042, 0x2938, 0x2040, 0xa003, 0x0000, 0x2001,
-	0x0002, 0x9080, 0x1f26, 0x2005, 0xa04a, 0x0804, 0x4a32, 0x703c,
+	0x0002, 0x9080, 0x1f28, 0x2005, 0xa04a, 0x0804, 0x4a42, 0x703c,
 	0x2060, 0x2c14, 0x6304, 0x6408, 0x650c, 0x2200, 0x7836, 0x7833,
 	0x0012, 0x7882, 0x2300, 0x7886, 0x2400, 0x788a, 0x2091, 0x4080,
 	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x87ff, 0x0118,
@@ -2166,2683 +2168,2683 @@
 	0x1508, 0x7238, 0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004, 0x90fa,
 	0x18f0, 0x0210, 0x2001, 0x18b0, 0x703e, 0x00a0, 0x9006, 0x703e,
 	0x703a, 0x7044, 0x9005, 0x090c, 0x0db4, 0x2048, 0xa800, 0x9005,
-	0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1f26, 0x2005,
+	0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1f28, 0x2005,
 	0xa84a, 0x0000, 0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe, 0x012e,
-	0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4a51, 0x4a51,
-	0x4a53, 0x4a51, 0x4a51, 0x4a51, 0x4a58, 0x4a51, 0x4a51, 0x4a51,
-	0x4a5d, 0x4a51, 0x4a51, 0x4a51, 0x4a62, 0x4a51, 0x4a51, 0x4a51,
-	0x4a67, 0x4a51, 0x4a51, 0x4a51, 0x4a6c, 0x4a51, 0x4a51, 0x4a51,
-	0x4a71, 0x080c, 0x0db4, 0xaa74, 0xab78, 0xac7c, 0x0804, 0x49dd,
-	0xaa84, 0xab88, 0xac8c, 0x0804, 0x49dd, 0xaa94, 0xab98, 0xac9c,
-	0x0804, 0x49dd, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x49dd, 0xaab4,
-	0xabb8, 0xacbc, 0x0804, 0x49dd, 0xaac4, 0xabc8, 0xaccc, 0x0804,
-	0x49dd, 0xaad4, 0xabd8, 0xacdc, 0x0804, 0x49dd, 0x0026, 0x080c,
-	0x5386, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x48d9, 0x002e,
-	0x0005, 0x81ff, 0x1904, 0x3369, 0x0126, 0x2091, 0x8000, 0x6030,
-	0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x6fb2, 0x1158, 0x080c,
-	0x7296, 0x080c, 0x5cd1, 0x9085, 0x0001, 0x080c, 0x6ff9, 0x080c,
-	0x6ee4, 0x0010, 0x080c, 0x5b90, 0x012e, 0x0804, 0x3337, 0x81ff,
-	0x0120, 0x2009, 0x0001, 0x0804, 0x3369, 0x080c, 0x539a, 0x0120,
-	0x2009, 0x0007, 0x0804, 0x3369, 0x080c, 0x655a, 0x0120, 0x2009,
-	0x0008, 0x0804, 0x3369, 0x0026, 0x2011, 0x0010, 0x080c, 0x6586,
-	0x002e, 0x0140, 0x7984, 0x080c, 0x65d0, 0x1120, 0x2009, 0x4009,
-	0x0804, 0x3369, 0x080c, 0x312e, 0x0128, 0x7984, 0x080c, 0x61de,
-	0x1904, 0x336c, 0x080c, 0x48ac, 0x0904, 0x336c, 0x2b00, 0x7026,
-	0x080c, 0x6562, 0x7888, 0x1170, 0x9084, 0x0005, 0x1158, 0x900e,
-	0x080c, 0x645e, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0x0804, 0x3337, 0x080c, 0x4879, 0x0904, 0x3369, 0x9006, 0xa866,
-	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbd3a, 0x0904, 0x3369,
-	0x7888, 0xd094, 0x0118, 0xb8bc, 0xc08d, 0xb8be, 0x7007, 0x0003,
-	0x701f, 0x4b47, 0x0005, 0x2061, 0x1800, 0x080c, 0x539a, 0x2009,
-	0x0007, 0x1578, 0x080c, 0x655a, 0x0118, 0x2009, 0x0008, 0x0448,
-	0x080c, 0x312e, 0x0120, 0xa998, 0x080c, 0x61de, 0x1530, 0x080c,
-	0x48aa, 0x0518, 0x080c, 0x6562, 0xa89c, 0x1168, 0x9084, 0x0005,
-	0x1150, 0x900e, 0x080c, 0x645e, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c, 0xbd3a,
-	0x11e0, 0xa89c, 0xd094, 0x0118, 0xb8bc, 0xc08d, 0xb8be, 0x2009,
-	0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0xa99a,
-	0x9006, 0x918d, 0x0001, 0x2008, 0x0005, 0x9006, 0x0005, 0xa830,
-	0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804, 0x3339,
-	0x9086, 0x0100, 0x7024, 0x2058, 0x1110, 0x0804, 0x52e3, 0x900e,
-	0x080c, 0x645e, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0x0804, 0x3337, 0x080c, 0x539a, 0x0120, 0x2009, 0x0007, 0x0804,
-	0x3369, 0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4879,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x3369, 0x900e, 0x2130, 0x7126,
-	0x7132, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005, 0x702a,
-	0x20a0, 0x080c, 0x623e, 0x1904, 0x4be5, 0x080c, 0x6562, 0x0120,
-	0x080c, 0x656a, 0x1904, 0x4be5, 0x080c, 0x655a, 0x1130, 0x080c,
-	0x645e, 0x1118, 0xd79c, 0x0904, 0x4be5, 0xd794, 0x1110, 0xd784,
-	0x01a8, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x3400,
-	0xd794, 0x0160, 0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0, 0x3d00,
-	0x20e0, 0x20a9, 0x0002, 0x080c, 0x468e, 0x0048, 0x20a9, 0x0004,
-	0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x468e, 0x4104,
-	0xd794, 0x0528, 0xb8b4, 0x20e0, 0xb8b8, 0x2060, 0x9c80, 0x0000,
-	0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003, 0x2098, 0x20a9,
-	0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400, 0x20a9, 0x0002,
-	0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x4681, 0x9c80,
-	0x0026, 0x2098, 0xb8b4, 0x20e0, 0x20a9, 0x0002, 0x4003, 0xd794,
-	0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108, 0x080c, 0x9db1,
-	0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120, 0x9186, 0x0800,
-	0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794, 0x0118, 0x9686,
-	0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804, 0x4b81, 0x86ff,
-	0x1120, 0x7124, 0x810b, 0x0804, 0x3337, 0x7033, 0x0001, 0x7122,
-	0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18ae, 0x2c44, 0xa06b,
-	0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076, 0xa28e, 0xa392,
-	0xa496, 0xa59a, 0x080c, 0x10d5, 0x7007, 0x0002, 0x701f, 0x4c21,
-	0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028, 0x20a0, 0x772c,
-	0x9036, 0x7034, 0x20e8, 0x2061, 0x18ae, 0x2c44, 0xa28c, 0xa390,
-	0xa494, 0xa598, 0x0804, 0x4b81, 0x7124, 0x810b, 0x0804, 0x3337,
-	0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98, 0x9184, 0xff00,
-	0x8007, 0x90e2, 0x0020, 0x0a04, 0x336c, 0x9502, 0x0a04, 0x336c,
-	0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x336c, 0x9502, 0x0a04,
-	0x336c, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x336c,
-	0x9502, 0x0a04, 0x336c, 0x9284, 0x00ff, 0x90e2, 0x0020, 0x0a04,
-	0x336c, 0x9502, 0x0a04, 0x336c, 0x9384, 0xff00, 0x8007, 0x90e2,
-	0x0020, 0x0a04, 0x336c, 0x9502, 0x0a04, 0x336c, 0x9384, 0x00ff,
-	0x90e2, 0x0020, 0x0a04, 0x336c, 0x9502, 0x0a04, 0x336c, 0x9484,
-	0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x336c, 0x9502, 0x0a04,
-	0x336c, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x336c, 0x9502,
-	0x0a04, 0x336c, 0x2061, 0x195a, 0x6102, 0x6206, 0x630a, 0x640e,
-	0x0804, 0x3337, 0x0006, 0x080c, 0x5386, 0xd0cc, 0x000e, 0x0005,
-	0x0006, 0x080c, 0x538a, 0xd0bc, 0x000e, 0x0005, 0x6170, 0x7a84,
-	0x6300, 0x82ff, 0x1118, 0x7986, 0x0804, 0x3337, 0x83ff, 0x1904,
-	0x336c, 0x2001, 0xfff0, 0x9200, 0x1a04, 0x336c, 0x2019, 0xffff,
-	0x6074, 0x9302, 0x9200, 0x0a04, 0x336c, 0x7986, 0x6272, 0x0804,
-	0x3337, 0x080c, 0x539a, 0x1904, 0x3369, 0x7c88, 0x7d84, 0x7e98,
-	0x7f8c, 0x080c, 0x4879, 0x0904, 0x3369, 0x900e, 0x901e, 0x7326,
-	0x7332, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0003, 0x702a,
-	0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6562,
-	0x0118, 0x080c, 0x656a, 0x1148, 0x20a9, 0x0001, 0xb814, 0x4004,
+	0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4a61, 0x4a61,
+	0x4a63, 0x4a61, 0x4a61, 0x4a61, 0x4a68, 0x4a61, 0x4a61, 0x4a61,
+	0x4a6d, 0x4a61, 0x4a61, 0x4a61, 0x4a72, 0x4a61, 0x4a61, 0x4a61,
+	0x4a77, 0x4a61, 0x4a61, 0x4a61, 0x4a7c, 0x4a61, 0x4a61, 0x4a61,
+	0x4a81, 0x080c, 0x0db4, 0xaa74, 0xab78, 0xac7c, 0x0804, 0x49ed,
+	0xaa84, 0xab88, 0xac8c, 0x0804, 0x49ed, 0xaa94, 0xab98, 0xac9c,
+	0x0804, 0x49ed, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x49ed, 0xaab4,
+	0xabb8, 0xacbc, 0x0804, 0x49ed, 0xaac4, 0xabc8, 0xaccc, 0x0804,
+	0x49ed, 0xaad4, 0xabd8, 0xacdc, 0x0804, 0x49ed, 0x0026, 0x080c,
+	0x538f, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x48e9, 0x002e,
+	0x0005, 0x81ff, 0x1904, 0x336b, 0x0126, 0x2091, 0x8000, 0x6030,
+	0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x6f9b, 0x1158, 0x080c,
+	0x727f, 0x080c, 0x5cda, 0x9085, 0x0001, 0x080c, 0x6fe2, 0x080c,
+	0x6ecd, 0x0010, 0x080c, 0x5b99, 0x012e, 0x0804, 0x3339, 0x81ff,
+	0x0120, 0x2009, 0x0001, 0x0804, 0x336b, 0x080c, 0x53a3, 0x0120,
+	0x2009, 0x0007, 0x0804, 0x336b, 0x080c, 0x6563, 0x0120, 0x2009,
+	0x0008, 0x0804, 0x336b, 0x0026, 0x2011, 0x0010, 0x080c, 0x658f,
+	0x002e, 0x0140, 0x7984, 0x080c, 0x65d9, 0x1120, 0x2009, 0x4009,
+	0x0804, 0x336b, 0x7984, 0x080c, 0x61e7, 0x1904, 0x336e, 0x2b00,
+	0x7026, 0x080c, 0x656b, 0x7888, 0x1170, 0x9084, 0x0005, 0x1158,
+	0x900e, 0x080c, 0x6467, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
+	0xc18d, 0x0804, 0x3339, 0x080c, 0x4889, 0x0904, 0x336b, 0x9006,
+	0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbd54, 0x0904,
+	0x336b, 0x7888, 0xd094, 0x0118, 0xb8bc, 0xc08d, 0xb8be, 0x7007,
+	0x0003, 0x701f, 0x4b50, 0x0005, 0x2061, 0x1800, 0x080c, 0x53a3,
+	0x2009, 0x0007, 0x1578, 0x080c, 0x6563, 0x0118, 0x2009, 0x0008,
+	0x0448, 0x080c, 0x3130, 0x0120, 0xa998, 0x080c, 0x61e7, 0x1530,
+	0x080c, 0x48ba, 0x0518, 0x080c, 0x656b, 0xa89c, 0x1168, 0x9084,
+	0x0005, 0x1150, 0x900e, 0x080c, 0x6467, 0x1108, 0xc185, 0xb800,
+	0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c,
+	0xbd54, 0x11e0, 0xa89c, 0xd094, 0x0118, 0xb8bc, 0xc08d, 0xb8be,
+	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
+	0xa99a, 0x9006, 0x918d, 0x0001, 0x2008, 0x0005, 0x9006, 0x0005,
+	0xa830, 0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804,
+	0x333b, 0x9086, 0x0100, 0x7024, 0x2058, 0x1110, 0x0804, 0x52ec,
+	0x900e, 0x080c, 0x6467, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
+	0xc18d, 0x0804, 0x3339, 0x080c, 0x53a3, 0x0120, 0x2009, 0x0007,
+	0x0804, 0x336b, 0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c,
+	0x4889, 0x1120, 0x2009, 0x0002, 0x0804, 0x336b, 0x900e, 0x2130,
+	0x7126, 0x7132, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005,
+	0x702a, 0x20a0, 0x080c, 0x6247, 0x1904, 0x4bee, 0x080c, 0x656b,
+	0x0120, 0x080c, 0x6573, 0x1904, 0x4bee, 0x080c, 0x6563, 0x1130,
+	0x080c, 0x6467, 0x1118, 0xd79c, 0x0904, 0x4bee, 0xd794, 0x1110,
+	0xd784, 0x01a8, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098,
+	0x3400, 0xd794, 0x0160, 0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0,
+	0x3d00, 0x20e0, 0x20a9, 0x0002, 0x080c, 0x469b, 0x0048, 0x20a9,
+	0x0004, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x469b,
+	0x4104, 0xd794, 0x0528, 0xb8b4, 0x20e0, 0xb8b8, 0x2060, 0x9c80,
+	0x0000, 0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003, 0x2098,
+	0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400, 0x20a9,
+	0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x468e,
+	0x9c80, 0x0026, 0x2098, 0xb8b4, 0x20e0, 0x20a9, 0x0002, 0x4003,
+	0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108, 0x080c,
+	0x9dc1, 0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120, 0x9186,
+	0x0800, 0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794, 0x0118,
+	0x9686, 0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804, 0x4b8a,
+	0x86ff, 0x1120, 0x7124, 0x810b, 0x0804, 0x3339, 0x7033, 0x0001,
+	0x7122, 0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18ae, 0x2c44,
+	0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076, 0xa28e,
+	0xa392, 0xa496, 0xa59a, 0x080c, 0x10d5, 0x7007, 0x0002, 0x701f,
+	0x4c2a, 0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028, 0x20a0,
+	0x772c, 0x9036, 0x7034, 0x20e8, 0x2061, 0x18ae, 0x2c44, 0xa28c,
+	0xa390, 0xa494, 0xa598, 0x0804, 0x4b8a, 0x7124, 0x810b, 0x0804,
+	0x3339, 0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98, 0x9184,
+	0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x336e, 0x9502, 0x0a04,
+	0x336e, 0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x336e, 0x9502,
+	0x0a04, 0x336e, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04,
+	0x336e, 0x9502, 0x0a04, 0x336e, 0x9284, 0x00ff, 0x90e2, 0x0020,
+	0x0a04, 0x336e, 0x9502, 0x0a04, 0x336e, 0x9384, 0xff00, 0x8007,
+	0x90e2, 0x0020, 0x0a04, 0x336e, 0x9502, 0x0a04, 0x336e, 0x9384,
+	0x00ff, 0x90e2, 0x0020, 0x0a04, 0x336e, 0x9502, 0x0a04, 0x336e,
+	0x9484, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x336e, 0x9502,
+	0x0a04, 0x336e, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x336e,
+	0x9502, 0x0a04, 0x336e, 0x2061, 0x1959, 0x6102, 0x6206, 0x630a,
+	0x640e, 0x0804, 0x3339, 0x0006, 0x080c, 0x538f, 0xd0cc, 0x000e,
+	0x0005, 0x0006, 0x080c, 0x5393, 0xd0bc, 0x000e, 0x0005, 0x6170,
+	0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986, 0x0804, 0x3339, 0x83ff,
+	0x1904, 0x336e, 0x2001, 0xfff0, 0x9200, 0x1a04, 0x336e, 0x2019,
+	0xffff, 0x6074, 0x9302, 0x9200, 0x0a04, 0x336e, 0x7986, 0x6272,
+	0x0804, 0x3339, 0x080c, 0x53a3, 0x1904, 0x336b, 0x7c88, 0x7d84,
+	0x7e98, 0x7f8c, 0x080c, 0x4889, 0x0904, 0x336b, 0x900e, 0x901e,
+	0x7326, 0x7332, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0003,
+	0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c,
+	0x656b, 0x0118, 0x080c, 0x6573, 0x1148, 0x20a9, 0x0001, 0xb814,
+	0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182,
+	0x0800, 0x0120, 0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff, 0x1148,
+	0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x8259, 0x2208, 0x0804,
+	0x3339, 0x7033, 0x0001, 0x7122, 0x7024, 0x9300, 0x7026, 0x2061,
+	0x18ae, 0x2c44, 0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076, 0x7034,
+	0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x10d5, 0x7007,
+	0x0002, 0x701f, 0x4d1c, 0x0005, 0x7030, 0x9005, 0x1178, 0x7120,
+	0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8, 0x2061, 0x18ae, 0x2c44,
+	0xa48c, 0xa590, 0xa694, 0xa798, 0x0804, 0x4cda, 0x7224, 0x900e,
+	0x2001, 0x0003, 0x080c, 0x8259, 0x2208, 0x0804, 0x3339, 0x00f6,
+	0x00e6, 0x080c, 0x53a3, 0x2009, 0x0007, 0x1904, 0x4daf, 0x2071,
+	0x1894, 0x745c, 0x84ff, 0x2009, 0x000e, 0x1904, 0x4daf, 0xac9c,
+	0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c, 0x1004, 0x2009, 0x0002,
+	0x0904, 0x4daf, 0x2900, 0x705e, 0x900e, 0x901e, 0x7356, 0x7362,
+	0xa860, 0x7066, 0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0, 0x91d8,
+	0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x656b, 0x0118, 0x080c,
+	0x6573, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004,
+	0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386,
+	0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e, 0x2001,
+	0x0003, 0x080c, 0x8259, 0x2208, 0x009e, 0xa897, 0x4000, 0xa99a,
+	0x715c, 0x81ff, 0x090c, 0x0db4, 0x2148, 0x080c, 0x101d, 0x9006,
+	0x705e, 0x918d, 0x0001, 0x2008, 0x0418, 0x7063, 0x0001, 0x7152,
+	0x7054, 0x9300, 0x7056, 0x2061, 0x18af, 0x2c44, 0xa37a, 0x7058,
+	0xa076, 0x7064, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0xa09f,
+	0x4dbb, 0x000e, 0xa0a2, 0x080c, 0x10d5, 0x9006, 0x0048, 0x009e,
+	0xa897, 0x4005, 0xa99a, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
+	0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c, 0x0db4,
+	0x00e6, 0x2071, 0x1894, 0xa06c, 0x908e, 0x0100, 0x0138, 0xa87b,
+	0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x00d8, 0x7060, 0x9005,
+	0x1158, 0x7150, 0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8, 0xa48c,
+	0xa590, 0xa694, 0xa798, 0x0428, 0xa87b, 0x0000, 0xa883, 0x0000,
+	0xa897, 0x4000, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x8259,
+	0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0db4, 0x2148, 0x080c, 0x101d,
+	0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6891, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee, 0x00fe,
+	0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x656b,
+	0x0118, 0x080c, 0x6573, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004,
 	0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800,
-	0x0120, 0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff, 0x1148, 0x7224,
-	0x900e, 0x2001, 0x0003, 0x080c, 0x8270, 0x2208, 0x0804, 0x3337,
-	0x7033, 0x0001, 0x7122, 0x7024, 0x9300, 0x7026, 0x2061, 0x18ae,
-	0x2c44, 0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076, 0x7034, 0xa072,
-	0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x10d5, 0x7007, 0x0002,
-	0x701f, 0x4d13, 0x0005, 0x7030, 0x9005, 0x1178, 0x7120, 0x7028,
-	0x20a0, 0x901e, 0x7034, 0x20e8, 0x2061, 0x18ae, 0x2c44, 0xa48c,
-	0xa590, 0xa694, 0xa798, 0x0804, 0x4cd1, 0x7224, 0x900e, 0x2001,
-	0x0003, 0x080c, 0x8270, 0x2208, 0x0804, 0x3337, 0x00f6, 0x00e6,
-	0x080c, 0x539a, 0x2009, 0x0007, 0x1904, 0x4da6, 0x2071, 0x1894,
-	0x745c, 0x84ff, 0x2009, 0x000e, 0x1904, 0x4da6, 0xac9c, 0xad98,
-	0xaea4, 0xafa0, 0x0096, 0x080c, 0x1004, 0x2009, 0x0002, 0x0904,
-	0x4da6, 0x2900, 0x705e, 0x900e, 0x901e, 0x7356, 0x7362, 0xa860,
-	0x7066, 0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0, 0x91d8, 0x1000,
-	0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6562, 0x0118, 0x080c, 0x656a,
-	0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104,
-	0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c,
-	0x01e8, 0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e, 0x2001, 0x0003,
-	0x080c, 0x8270, 0x2208, 0x009e, 0xa897, 0x4000, 0xa99a, 0x715c,
-	0x81ff, 0x090c, 0x0db4, 0x2148, 0x080c, 0x101d, 0x9006, 0x705e,
-	0x918d, 0x0001, 0x2008, 0x0418, 0x7063, 0x0001, 0x7152, 0x7054,
-	0x9300, 0x7056, 0x2061, 0x18af, 0x2c44, 0xa37a, 0x7058, 0xa076,
-	0x7064, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0xa09f, 0x4db2,
-	0x000e, 0xa0a2, 0x080c, 0x10d5, 0x9006, 0x0048, 0x009e, 0xa897,
-	0x4005, 0xa99a, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ee,
-	0x00fe, 0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c, 0x0db4, 0x00e6,
-	0x2071, 0x1894, 0xa06c, 0x908e, 0x0100, 0x0138, 0xa87b, 0x0030,
-	0xa883, 0x0000, 0xa897, 0x4002, 0x00d8, 0x7060, 0x9005, 0x1158,
-	0x7150, 0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8, 0xa48c, 0xa590,
-	0xa694, 0xa798, 0x0428, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897,
-	0x4000, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x8270, 0xaa9a,
-	0x715c, 0x81ff, 0x090c, 0x0db4, 0x2148, 0x080c, 0x101d, 0x705f,
-	0x0000, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x688c,
-	0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee, 0x00fe, 0x0005,
-	0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6562, 0x0118,
-	0x080c, 0x656a, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810,
-	0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120,
-	0x9386, 0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0, 0x7154, 0x810c,
-	0xa99a, 0xa897, 0x4000, 0x715c, 0x81ff, 0x090c, 0x0db4, 0x2148,
-	0x080c, 0x101d, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0xa0a0,
-	0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x688c, 0x012e, 0xa09f,
-	0x0000, 0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001, 0x7152, 0x7054,
-	0x9300, 0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c,
-	0x10d5, 0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c, 0x90be, 0x7000,
-	0x0148, 0x90be, 0x7100, 0x0130, 0x90be, 0x7200, 0x0118, 0x009e,
-	0x0804, 0x336c, 0xa884, 0xa988, 0x080c, 0x2663, 0x1518, 0x080c,
-	0x61de, 0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c, 0x080c, 0x4879,
-	0x01c8, 0x080c, 0x4879, 0x01b0, 0x009e, 0xa867, 0x0000, 0xa868,
-	0xc0fd, 0xa86a, 0xa823, 0x0000, 0xa804, 0x2048, 0x080c, 0xbcc1,
-	0x1120, 0x2009, 0x0003, 0x0804, 0x3369, 0x7007, 0x0003, 0x701f,
-	0x4e7f, 0x0005, 0x009e, 0x2009, 0x0002, 0x0804, 0x3369, 0x7124,
-	0x080c, 0x30d5, 0xa820, 0x9086, 0x8001, 0x1120, 0x2009, 0x0004,
-	0x0804, 0x3369, 0x2900, 0x7022, 0xa804, 0x0096, 0x2048, 0x8906,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x009e, 0x9080,
-	0x0002, 0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9,
-	0x002a, 0x080c, 0x0f68, 0xaa6c, 0xab70, 0xac74, 0xad78, 0x2061,
-	0x18ae, 0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c, 0x97c6, 0x7000,
-	0x0118, 0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004, 0x0600, 0x2009,
-	0x0004, 0x000e, 0x007e, 0x0804, 0x48c5, 0x97c6, 0x7200, 0x11b8,
-	0x96c2, 0x0054, 0x02a0, 0x000e, 0x007e, 0x2061, 0x18ae, 0x2c44,
-	0xa076, 0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392, 0xa496, 0xa59a,
-	0x080c, 0x10d5, 0x7007, 0x0002, 0x701f, 0x4edb, 0x0005, 0x000e,
-	0x007e, 0x0804, 0x336c, 0x7020, 0x2048, 0xa804, 0x2048, 0xa804,
-	0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a,
-	0x080c, 0x0f68, 0x2100, 0x2238, 0x2061, 0x18ae, 0x2c44, 0xa28c,
-	0xa390, 0xa494, 0xa598, 0x2009, 0x002a, 0x0804, 0x48c5, 0x81ff,
-	0x1904, 0x3369, 0x798c, 0x2001, 0x194f, 0x918c, 0x8000, 0x2102,
-	0x080c, 0x4890, 0x0904, 0x336c, 0x080c, 0x6562, 0x0120, 0x080c,
-	0x656a, 0x1904, 0x336c, 0x080c, 0x6305, 0x0904, 0x3369, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x63cb, 0x012e, 0x0904, 0x3369, 0x2001,
-	0x194f, 0x2004, 0xd0fc, 0x1904, 0x3337, 0x0804, 0x4301, 0xa9a0,
-	0x2001, 0x194f, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x489d,
-	0x01a0, 0x080c, 0x6562, 0x0118, 0x080c, 0x656a, 0x1170, 0x080c,
-	0x6305, 0x2009, 0x0002, 0x0128, 0x080c, 0x63cb, 0x1170, 0x2009,
-	0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001,
-	0x194f, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x538e, 0x0110, 0x9006,
-	0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x78a8,
-	0xd08c, 0x1118, 0xd084, 0x0904, 0x4276, 0x080c, 0x48ac, 0x0904,
-	0x336c, 0x080c, 0x4879, 0x1120, 0x2009, 0x0002, 0x0804, 0x3369,
-	0x080c, 0x6562, 0x0130, 0x908e, 0x0004, 0x0118, 0x908e, 0x0005,
-	0x15a0, 0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c, 0xb802, 0x0028,
-	0x080c, 0x5386, 0xd0b4, 0x0904, 0x42b0, 0x7884, 0x908e, 0x007e,
-	0x0904, 0x42b0, 0x908e, 0x007f, 0x0904, 0x42b0, 0x908e, 0x0080,
-	0x0904, 0x42b0, 0xb800, 0xd08c, 0x1904, 0x42b0, 0xa867, 0x0000,
-	0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbce0, 0x1120, 0x2009, 0x0003,
-	0x0804, 0x3369, 0x7007, 0x0003, 0x701f, 0x4fa7, 0x0005, 0x080c,
-	0x48ac, 0x0904, 0x336c, 0x0804, 0x42b0, 0x080c, 0x312e, 0x0108,
-	0x0005, 0x2009, 0x1833, 0x210c, 0x81ff, 0x0120, 0x2009, 0x0001,
-	0x0804, 0x3369, 0x080c, 0x539a, 0x0120, 0x2009, 0x0007, 0x0804,
-	0x3369, 0x080c, 0x655a, 0x0120, 0x2009, 0x0008, 0x0804, 0x3369,
-	0xb89c, 0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x42b0, 0x9006, 0xa866,
-	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbd3a, 0x1120, 0x2009,
-	0x0003, 0x0804, 0x3369, 0x7007, 0x0003, 0x701f, 0x4fe0, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x52e3,
-	0x080c, 0x48ac, 0x0904, 0x336c, 0x0804, 0x4f79, 0x81ff, 0x2009,
-	0x0001, 0x1904, 0x3369, 0x080c, 0x539a, 0x2009, 0x0007, 0x1904,
-	0x3369, 0x080c, 0x655a, 0x0120, 0x2009, 0x0008, 0x0804, 0x3369,
-	0x080c, 0x48ac, 0x0904, 0x336c, 0x080c, 0x6562, 0x2009, 0x0009,
-	0x1904, 0x3369, 0x080c, 0x4879, 0x2009, 0x0002, 0x0904, 0x3369,
-	0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x7988, 0x9194,
-	0xff00, 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128, 0xc0ed, 0xa952,
-	0x798c, 0xa956, 0x0038, 0x928e, 0x0100, 0x1904, 0x336c, 0xc0e5,
-	0xa952, 0xa956, 0xa83e, 0x080c, 0xbf8d, 0x2009, 0x0003, 0x0904,
-	0x3369, 0x7007, 0x0003, 0x701f, 0x5036, 0x0005, 0xa830, 0x9086,
-	0x0100, 0x2009, 0x0004, 0x0904, 0x3369, 0x0804, 0x3337, 0x7aa8,
-	0x9284, 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c, 0x539a, 0x1188,
-	0x2009, 0x0014, 0x0804, 0x3369, 0xd2dc, 0x1568, 0x81ff, 0x2009,
-	0x0001, 0x1904, 0x3369, 0x080c, 0x539a, 0x2009, 0x0007, 0x1904,
-	0x3369, 0xd2f4, 0x0130, 0x9284, 0x5000, 0x080c, 0x5361, 0x0804,
-	0x3337, 0xd2fc, 0x0158, 0x080c, 0x48ac, 0x0904, 0x336c, 0x7984,
-	0x9284, 0x9000, 0x080c, 0x533e, 0x0804, 0x3337, 0x080c, 0x48ac,
-	0x0904, 0x336c, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x2009,
-	0x0009, 0x1904, 0x511f, 0x080c, 0x4879, 0x2009, 0x0002, 0x0904,
-	0x511f, 0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009, 0x0008, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x48c2, 0x701f, 0x5090, 0x0005,
-	0xa86c, 0x9086, 0x0500, 0x1138, 0xa870, 0x9005, 0x1120, 0xa874,
-	0x9084, 0xff00, 0x0110, 0x1904, 0x336c, 0xa866, 0xa832, 0xa868,
-	0xc0fd, 0xa86a, 0x080c, 0x48ac, 0x1110, 0x0804, 0x336c, 0x2009,
-	0x0043, 0x080c, 0xbff5, 0x2009, 0x0003, 0x0904, 0x511f, 0x7007,
-	0x0003, 0x701f, 0x50b4, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009,
-	0x0004, 0x0904, 0x511f, 0x7984, 0x7aa8, 0x9284, 0x1000, 0x080c,
-	0x533e, 0x0804, 0x3337, 0x00c6, 0xaab0, 0x9284, 0xc000, 0x0140,
-	0xd2ec, 0x0168, 0x080c, 0x539a, 0x1150, 0x2009, 0x0014, 0x04f0,
-	0x2061, 0x1800, 0x080c, 0x539a, 0x2009, 0x0007, 0x15b8, 0xd2f4,
-	0x0128, 0x9284, 0x5000, 0x080c, 0x5361, 0x0050, 0xd2fc, 0x0178,
-	0x080c, 0x48aa, 0x0588, 0xa998, 0x9284, 0x9000, 0x080c, 0x533e,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0438, 0x080c,
-	0x48aa, 0x0510, 0x080c, 0x6562, 0x2009, 0x0009, 0x11b8, 0xa8c4,
-	0x9086, 0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0, 0xa8cc, 0x9084,
-	0xff00, 0x1190, 0x080c, 0x48aa, 0x1108, 0x0070, 0x2009, 0x004b,
-	0x080c, 0xbff5, 0x2009, 0x0003, 0x0108, 0x0078, 0x0429, 0x19c0,
-	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0030, 0x00ce, 0x0005, 0x9006, 0x0ce0, 0x7aa8,
-	0xd2dc, 0x0904, 0x3369, 0x0016, 0x7984, 0x9284, 0x1000, 0xc0fd,
-	0x080c, 0x533e, 0x001e, 0x1904, 0x3369, 0x0804, 0x3337, 0x00f6,
-	0x2d78, 0x0011, 0x00fe, 0x0005, 0xaab0, 0xd2dc, 0x0150, 0x0016,
-	0xa998, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x533e, 0x001e, 0x9085,
-	0x0001, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3369,
-	0x080c, 0x539a, 0x0120, 0x2009, 0x0007, 0x0804, 0x3369, 0x7984,
-	0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x623e, 0x1904, 0x336c, 0x9186,
-	0x007f, 0x0138, 0x080c, 0x6562, 0x0120, 0x2009, 0x0009, 0x0804,
-	0x3369, 0x080c, 0x4879, 0x1120, 0x2009, 0x0002, 0x0804, 0x3369,
-	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001, 0x0100, 0x8007,
-	0xa80a, 0x080c, 0xbcfa, 0x1120, 0x2009, 0x0003, 0x0804, 0x3369,
-	0x7007, 0x0003, 0x701f, 0x517d, 0x0005, 0xa808, 0x8007, 0x9086,
-	0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x3369, 0xa8e0, 0xa866,
-	0xa810, 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814, 0x8007, 0x9084,
-	0x00ff, 0x8004, 0x9080, 0x0002, 0x9108, 0x8906, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x0804, 0x48c5, 0x080c, 0x4879, 0x1120, 0x2009,
-	0x0002, 0x0804, 0x3369, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff,
-	0x8217, 0x82ff, 0x1118, 0x7023, 0x1984, 0x0040, 0x92c6, 0x0001,
-	0x1118, 0x7023, 0x199e, 0x0010, 0x0804, 0x336c, 0x2009, 0x001a,
+	0x0120, 0x9386, 0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0, 0x7154,
+	0x810c, 0xa99a, 0xa897, 0x4000, 0x715c, 0x81ff, 0x090c, 0x0db4,
+	0x2148, 0x080c, 0x101d, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008,
+	0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6891, 0x012e,
+	0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001, 0x7152,
+	0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696, 0xa79a,
+	0x080c, 0x10d5, 0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c, 0x90be,
+	0x7000, 0x0148, 0x90be, 0x7100, 0x0130, 0x90be, 0x7200, 0x0118,
+	0x009e, 0x0804, 0x336e, 0xa884, 0xa988, 0x080c, 0x2665, 0x1518,
+	0x080c, 0x61e7, 0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c, 0x080c,
+	0x4889, 0x01c8, 0x080c, 0x4889, 0x01b0, 0x009e, 0xa867, 0x0000,
+	0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000, 0xa804, 0x2048, 0x080c,
+	0xbcd6, 0x1120, 0x2009, 0x0003, 0x0804, 0x336b, 0x7007, 0x0003,
+	0x701f, 0x4e88, 0x0005, 0x009e, 0x2009, 0x0002, 0x0804, 0x336b,
+	0x7124, 0x080c, 0x30d7, 0xa820, 0x9086, 0x8001, 0x1120, 0x2009,
+	0x0004, 0x0804, 0x336b, 0x2900, 0x7022, 0xa804, 0x0096, 0x2048,
+	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x009e,
+	0x9080, 0x0002, 0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0, 0x27e8,
+	0x20a9, 0x002a, 0x080c, 0x0f68, 0xaa6c, 0xab70, 0xac74, 0xad78,
+	0x2061, 0x18ae, 0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c, 0x97c6,
+	0x7000, 0x0118, 0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004, 0x0600,
+	0x2009, 0x0004, 0x000e, 0x007e, 0x0804, 0x48d5, 0x97c6, 0x7200,
+	0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e, 0x007e, 0x2061, 0x18ae,
+	0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392, 0xa496,
+	0xa59a, 0x080c, 0x10d5, 0x7007, 0x0002, 0x701f, 0x4ee4, 0x0005,
+	0x000e, 0x007e, 0x0804, 0x336e, 0x7020, 0x2048, 0xa804, 0x2048,
+	0xa804, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9,
+	0x002a, 0x080c, 0x0f68, 0x2100, 0x2238, 0x2061, 0x18ae, 0x2c44,
+	0xa28c, 0xa390, 0xa494, 0xa598, 0x2009, 0x002a, 0x0804, 0x48d5,
+	0x81ff, 0x1904, 0x336b, 0x798c, 0x2001, 0x194e, 0x918c, 0x8000,
+	0x2102, 0x080c, 0x48a0, 0x0904, 0x336e, 0x080c, 0x656b, 0x0120,
+	0x080c, 0x6573, 0x1904, 0x336e, 0x080c, 0x630e, 0x0904, 0x336b,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x63d4, 0x012e, 0x0904, 0x336b,
+	0x2001, 0x194e, 0x2004, 0xd0fc, 0x1904, 0x3339, 0x0804, 0x430e,
+	0xa9a0, 0x2001, 0x194e, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c,
+	0x48ad, 0x01a0, 0x080c, 0x656b, 0x0118, 0x080c, 0x6573, 0x1170,
+	0x080c, 0x630e, 0x2009, 0x0002, 0x0128, 0x080c, 0x63d4, 0x1170,
+	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
+	0x2001, 0x194e, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x5397, 0x0110,
+	0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005,
+	0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904, 0x4283, 0x080c, 0x48bc,
+	0x0904, 0x336e, 0x080c, 0x4889, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x336b, 0x080c, 0x656b, 0x0130, 0x908e, 0x0004, 0x0118, 0x908e,
+	0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c, 0xb802,
+	0x0028, 0x080c, 0x538f, 0xd0b4, 0x0904, 0x42bd, 0x7884, 0x908e,
+	0x007e, 0x0904, 0x42bd, 0x908e, 0x007f, 0x0904, 0x42bd, 0x908e,
+	0x0080, 0x0904, 0x42bd, 0xb800, 0xd08c, 0x1904, 0x42bd, 0xa867,
+	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbcf5, 0x1120, 0x2009,
+	0x0003, 0x0804, 0x336b, 0x7007, 0x0003, 0x701f, 0x4fb0, 0x0005,
+	0x080c, 0x48bc, 0x0904, 0x336e, 0x0804, 0x42bd, 0x080c, 0x3130,
+	0x0108, 0x0005, 0x2009, 0x1833, 0x210c, 0x81ff, 0x0120, 0x2009,
+	0x0001, 0x0804, 0x336b, 0x080c, 0x53a3, 0x0120, 0x2009, 0x0007,
+	0x0804, 0x336b, 0x080c, 0x6563, 0x0120, 0x2009, 0x0008, 0x0804,
+	0x336b, 0xb89c, 0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x42bd, 0x9006,
+	0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbd54, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x336b, 0x7007, 0x0003, 0x701f, 0x4fe9,
+	0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804,
+	0x52ec, 0x080c, 0x48bc, 0x0904, 0x336e, 0x0804, 0x4f82, 0x81ff,
+	0x2009, 0x0001, 0x1904, 0x336b, 0x080c, 0x53a3, 0x2009, 0x0007,
+	0x1904, 0x336b, 0x080c, 0x6563, 0x0120, 0x2009, 0x0008, 0x0804,
+	0x336b, 0x080c, 0x48bc, 0x0904, 0x336e, 0x080c, 0x656b, 0x2009,
+	0x0009, 0x1904, 0x336b, 0x080c, 0x4889, 0x2009, 0x0002, 0x0904,
+	0x336b, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x7988,
+	0x9194, 0xff00, 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128, 0xc0ed,
+	0xa952, 0x798c, 0xa956, 0x0038, 0x928e, 0x0100, 0x1904, 0x336e,
+	0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c, 0xbfa7, 0x2009, 0x0003,
+	0x0904, 0x336b, 0x7007, 0x0003, 0x701f, 0x503f, 0x0005, 0xa830,
+	0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x336b, 0x0804, 0x3339,
+	0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c, 0x53a3,
+	0x1188, 0x2009, 0x0014, 0x0804, 0x336b, 0xd2dc, 0x1568, 0x81ff,
+	0x2009, 0x0001, 0x1904, 0x336b, 0x080c, 0x53a3, 0x2009, 0x0007,
+	0x1904, 0x336b, 0xd2f4, 0x0130, 0x9284, 0x5000, 0x080c, 0x536a,
+	0x0804, 0x3339, 0xd2fc, 0x0158, 0x080c, 0x48bc, 0x0904, 0x336e,
+	0x7984, 0x9284, 0x9000, 0x080c, 0x5347, 0x0804, 0x3339, 0x080c,
+	0x48bc, 0x0904, 0x336e, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
+	0x2009, 0x0009, 0x1904, 0x5128, 0x080c, 0x4889, 0x2009, 0x0002,
+	0x0904, 0x5128, 0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009, 0x0008,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x48d2, 0x701f, 0x5099,
+	0x0005, 0xa86c, 0x9086, 0x0500, 0x1138, 0xa870, 0x9005, 0x1120,
+	0xa874, 0x9084, 0xff00, 0x0110, 0x1904, 0x336e, 0xa866, 0xa832,
+	0xa868, 0xc0fd, 0xa86a, 0x080c, 0x48bc, 0x1110, 0x0804, 0x336e,
+	0x2009, 0x0043, 0x080c, 0xc00f, 0x2009, 0x0003, 0x0904, 0x5128,
+	0x7007, 0x0003, 0x701f, 0x50bd, 0x0005, 0xa830, 0x9086, 0x0100,
+	0x2009, 0x0004, 0x0904, 0x5128, 0x7984, 0x7aa8, 0x9284, 0x1000,
+	0x080c, 0x5347, 0x0804, 0x3339, 0x00c6, 0xaab0, 0x9284, 0xc000,
+	0x0140, 0xd2ec, 0x0168, 0x080c, 0x53a3, 0x1150, 0x2009, 0x0014,
+	0x04f0, 0x2061, 0x1800, 0x080c, 0x53a3, 0x2009, 0x0007, 0x15b8,
+	0xd2f4, 0x0128, 0x9284, 0x5000, 0x080c, 0x536a, 0x0050, 0xd2fc,
+	0x0178, 0x080c, 0x48ba, 0x0588, 0xa998, 0x9284, 0x9000, 0x080c,
+	0x5347, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0438,
+	0x080c, 0x48ba, 0x0510, 0x080c, 0x656b, 0x2009, 0x0009, 0x11b8,
+	0xa8c4, 0x9086, 0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0, 0xa8cc,
+	0x9084, 0xff00, 0x1190, 0x080c, 0x48ba, 0x1108, 0x0070, 0x2009,
+	0x004b, 0x080c, 0xc00f, 0x2009, 0x0003, 0x0108, 0x0078, 0x0429,
+	0x19c0, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0030, 0x00ce, 0x0005, 0x9006, 0x0ce0,
+	0x7aa8, 0xd2dc, 0x0904, 0x336b, 0x0016, 0x7984, 0x9284, 0x1000,
+	0xc0fd, 0x080c, 0x5347, 0x001e, 0x1904, 0x336b, 0x0804, 0x3339,
+	0x00f6, 0x2d78, 0x0011, 0x00fe, 0x0005, 0xaab0, 0xd2dc, 0x0150,
+	0x0016, 0xa998, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5347, 0x001e,
+	0x9085, 0x0001, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
+	0x336b, 0x080c, 0x53a3, 0x0120, 0x2009, 0x0007, 0x0804, 0x336b,
+	0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x6247, 0x1904, 0x336e,
+	0x9186, 0x007f, 0x0138, 0x080c, 0x656b, 0x0120, 0x2009, 0x0009,
+	0x0804, 0x336b, 0x080c, 0x4889, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x336b, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001, 0x0100,
+	0x8007, 0xa80a, 0x080c, 0xbd0f, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x336b, 0x7007, 0x0003, 0x701f, 0x5186, 0x0005, 0xa808, 0x8007,
+	0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x336b, 0xa8e0,
+	0xa866, 0xa810, 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814, 0x8007,
+	0x9084, 0x00ff, 0x8004, 0x9080, 0x0002, 0x9108, 0x8906, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x48d5, 0x080c, 0x4889, 0x1120,
+	0x2009, 0x0002, 0x0804, 0x336b, 0x7984, 0x9194, 0xff00, 0x918c,
+	0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023, 0x1983, 0x0040, 0x92c6,
+	0x0001, 0x1118, 0x7023, 0x199d, 0x0010, 0x0804, 0x336e, 0x2009,
+	0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019,
+	0xaf60, 0x080c, 0x48d2, 0x701f, 0x51d6, 0x0005, 0x2001, 0x182d,
+	0x2003, 0x0001, 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860, 0x20e0,
+	0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003, 0x0804,
+	0x3339, 0x080c, 0x4889, 0x1120, 0x2009, 0x0002, 0x0804, 0x336b,
+	0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118,
+	0x2099, 0x1983, 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099, 0x199d,
+	0x0010, 0x0804, 0x336e, 0xa85c, 0x9080, 0x0019, 0x20a0, 0xa860,
+	0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009, 0x001a,
 	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60,
-	0x080c, 0x48c2, 0x701f, 0x51cd, 0x0005, 0x2001, 0x182d, 0x2003,
-	0x0001, 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860, 0x20e0, 0x20a9,
-	0x001a, 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003, 0x0804, 0x3337,
-	0x080c, 0x4879, 0x1120, 0x2009, 0x0002, 0x0804, 0x3369, 0x7984,
-	0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x2099,
-	0x1984, 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099, 0x199e, 0x0010,
-	0x0804, 0x336c, 0xa85c, 0x9080, 0x0019, 0x20a0, 0xa860, 0x20e8,
-	0x20a9, 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009, 0x001a, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x0804,
-	0x48c5, 0x7884, 0x908a, 0x1000, 0x1a04, 0x336c, 0x0126, 0x2091,
-	0x8000, 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6, 0x2061, 0x19cb,
-	0x6142, 0x00ce, 0x012e, 0x0804, 0x3337, 0x00c6, 0x080c, 0x6fb2,
-	0x1160, 0x080c, 0x7296, 0x080c, 0x5cd1, 0x9085, 0x0001, 0x080c,
-	0x6ff9, 0x080c, 0x6ee4, 0x080c, 0x0db4, 0x2061, 0x1800, 0x6030,
-	0xc09d, 0x6032, 0x080c, 0x5b90, 0x00ce, 0x0005, 0x00c6, 0x2001,
-	0x1800, 0x2004, 0x908e, 0x0000, 0x0904, 0x3369, 0x7884, 0x9005,
-	0x0188, 0x7888, 0x2061, 0x196d, 0x2c0c, 0x2062, 0x080c, 0x2a45,
-	0x01a0, 0x080c, 0x2a4d, 0x0188, 0x080c, 0x2a55, 0x0170, 0x2162,
-	0x0804, 0x336c, 0x2061, 0x0100, 0x6038, 0x9086, 0x0007, 0x1118,
-	0x2009, 0x0001, 0x0010, 0x2009, 0x0000, 0x7884, 0x9086, 0x0002,
-	0x1548, 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a, 0x0026, 0x2011,
-	0x0003, 0x080c, 0x9771, 0x2011, 0x0002, 0x080c, 0x977b, 0x002e,
-	0x080c, 0x9662, 0x0036, 0x901e, 0x080c, 0x96d8, 0x003e, 0x60e3,
-	0x0000, 0x080c, 0xd8b4, 0x080c, 0xd8cf, 0x9085, 0x0001, 0x080c,
-	0x6ff9, 0x9006, 0x080c, 0x2b14, 0x2001, 0x1800, 0x2003, 0x0004,
-	0x6027, 0x0008, 0x00ce, 0x0804, 0x3337, 0x81ff, 0x0120, 0x2009,
-	0x0001, 0x0804, 0x3369, 0x080c, 0x539a, 0x0120, 0x2009, 0x0007,
-	0x0804, 0x3369, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x623e,
-	0x1904, 0x336c, 0x9186, 0x007f, 0x0138, 0x080c, 0x6562, 0x0120,
-	0x2009, 0x0009, 0x0804, 0x3369, 0x080c, 0x4879, 0x1120, 0x2009,
-	0x0002, 0x0804, 0x3369, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
-	0x080c, 0xbcfd, 0x1120, 0x2009, 0x0003, 0x0804, 0x3369, 0x7007,
-	0x0003, 0x701f, 0x52cc, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120,
-	0x2009, 0x0004, 0x0804, 0x3369, 0xa8e0, 0xa866, 0xa834, 0x8007,
-	0x800c, 0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0xaf60, 0x0804, 0x48c5, 0xa898, 0x9086, 0x000d, 0x1904, 0x3369,
-	0x2021, 0x4005, 0x0126, 0x2091, 0x8000, 0x0e04, 0x52f0, 0x0010,
-	0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011,
-	0x0010, 0x7833, 0x0010, 0x7883, 0x4005, 0xa998, 0x7986, 0xa9a4,
-	0x799a, 0xa9a8, 0x799e, 0x080c, 0x48b5, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x7007, 0x0001, 0x2091,
-	0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x00c6, 0x2061, 0x19cb, 0x7984, 0x6152, 0x614e, 0x6057, 0x0000,
-	0x604b, 0x0009, 0x7898, 0x606a, 0x789c, 0x6066, 0x7888, 0x6062,
-	0x788c, 0x605e, 0x2001, 0x19d9, 0x2044, 0x2001, 0x19e0, 0xa076,
-	0xa060, 0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002, 0xa06b, 0x0000,
-	0xa09f, 0x0000, 0x00ce, 0x012e, 0x0804, 0x3337, 0x0126, 0x2091,
-	0x8000, 0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0128, 0x0006, 0x080c,
-	0xbb64, 0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180, 0x1000, 0x2004,
-	0x905d, 0x0160, 0x080c, 0x5ceb, 0x080c, 0x9db1, 0x0110, 0xb817,
-	0x0000, 0x9006, 0x00ce, 0x00be, 0x012e, 0x0005, 0x9085, 0x0001,
-	0x0cc8, 0x0126, 0x2091, 0x8000, 0x0156, 0x2010, 0x900e, 0x20a9,
-	0x0800, 0x0016, 0x9180, 0x1000, 0x2004, 0x9005, 0x0180, 0x9186,
-	0x007e, 0x0168, 0x9186, 0x007f, 0x0150, 0x9186, 0x0080, 0x0138,
-	0x9186, 0x00ff, 0x0120, 0x0026, 0x2200, 0x0801, 0x002e, 0x001e,
-	0x8108, 0x1f04, 0x5369, 0x015e, 0x012e, 0x0005, 0x2001, 0x1854,
-	0x2004, 0x0005, 0x2001, 0x1873, 0x2004, 0x0005, 0x0006, 0x2001,
-	0x1810, 0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, 0x180e, 0x2004,
-	0xd0b4, 0x0005, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x0005,
-	0x0016, 0x00e6, 0x2071, 0x1894, 0x7108, 0x910d, 0x710a, 0x00ee,
-	0x001e, 0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04, 0x336c, 0x810c,
-	0x0016, 0x080c, 0x4879, 0x080c, 0x0ef3, 0x2100, 0x2238, 0x7d84,
-	0x7c88, 0x7b8c, 0x7a90, 0x001e, 0x080c, 0x48c2, 0x701f, 0x53c1,
-	0x0005, 0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8, 0x7aac, 0x79a4,
-	0x810c, 0x2061, 0x18ae, 0x2c44, 0xa770, 0xa074, 0x2071, 0x1894,
-	0x080c, 0x48c5, 0x701f, 0x53d5, 0x0005, 0x2061, 0x18ae, 0x2c44,
-	0x0016, 0x0026, 0xa270, 0xa174, 0x080c, 0x0efb, 0x002e, 0x001e,
-	0x080c, 0x0fa8, 0x9006, 0xa802, 0xa806, 0x0804, 0x3337, 0x0126,
-	0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6,
-	0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, 0x2071, 0x1800, 0x6044,
-	0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, 0x5590, 0x0068, 0xd08c,
-	0x0118, 0x080c, 0x5499, 0x0040, 0xd094, 0x0118, 0x080c, 0x5469,
-	0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x012e, 0x0005, 0x0016,
-	0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0c68, 0x0006,
-	0x7094, 0x9005, 0x000e, 0x0120, 0x7097, 0x0000, 0x708f, 0x0000,
-	0x624c, 0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086, 0xf0f0, 0x0130,
-	0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0490, 0x9294, 0xff00,
-	0x9296, 0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160, 0x6240, 0x9295,
-	0x0100, 0x6242, 0x9294, 0x0010, 0x0128, 0x2009, 0x00f7, 0x080c,
-	0x5c4d, 0x00f0, 0x6040, 0x9084, 0x0010, 0x9085, 0x0140, 0x6042,
-	0x6043, 0x0000, 0x7083, 0x0000, 0x709f, 0x0001, 0x70c3, 0x0000,
-	0x70db, 0x0000, 0x2009, 0x1c80, 0x200b, 0x0000, 0x7093, 0x0000,
-	0x7087, 0x000f, 0x2009, 0x000f, 0x2011, 0x5b33, 0x080c, 0x80ca,
-	0x0005, 0x2001, 0x1875, 0x2004, 0xd08c, 0x0110, 0x705b, 0xffff,
-	0x7084, 0x9005, 0x1528, 0x2011, 0x5b33, 0x080c, 0x8038, 0x6040,
-	0x9094, 0x0010, 0x9285, 0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044,
-	0xd08c, 0x1168, 0x1f04, 0x547f, 0x6242, 0x7097, 0x0000, 0x6040,
-	0x9094, 0x0010, 0x9285, 0x0080, 0x6042, 0x6242, 0x0048, 0x6242,
-	0x7097, 0x0000, 0x708b, 0x0000, 0x9006, 0x080c, 0x5cd6, 0x0000,
-	0x0005, 0x7088, 0x908a, 0x0003, 0x1a0c, 0x0db4, 0x000b, 0x0005,
-	0x54a3, 0x54f4, 0x558f, 0x00f6, 0x0016, 0x6900, 0x918c, 0x0800,
-	0x708b, 0x0001, 0x2001, 0x015d, 0x2003, 0x0000, 0x6803, 0x00fc,
-	0x20a9, 0x0004, 0x6800, 0x9084, 0x00fc, 0x0120, 0x1f04, 0x54b2,
-	0x080c, 0x0db4, 0x68a0, 0x68a2, 0x689c, 0x689e, 0x6898, 0x689a,
-	0xa001, 0x918d, 0x1600, 0x6902, 0x001e, 0x6837, 0x0020, 0x080c,
-	0x5cb2, 0x2079, 0x1c00, 0x7833, 0x1101, 0x7837, 0x0000, 0x20e1,
-	0x0001, 0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1, 0x1c0e, 0x20a9,
-	0x0004, 0x4003, 0x080c, 0x9c3f, 0x20e1, 0x0001, 0x2099, 0x1c00,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3,
-	0x000c, 0x600f, 0x0000, 0x080c, 0x5b64, 0x00fe, 0x9006, 0x708e,
-	0x6043, 0x0008, 0x6042, 0x0005, 0x00f6, 0x708c, 0x708f, 0x0000,
-	0x9025, 0x0904, 0x556c, 0x6020, 0xd0b4, 0x1904, 0x556a, 0x719c,
-	0x81ff, 0x0904, 0x5558, 0x9486, 0x000c, 0x1904, 0x5565, 0x9480,
-	0x0018, 0x8004, 0x20a8, 0x080c, 0x5cab, 0x2011, 0x0260, 0x2019,
-	0x1c00, 0x220c, 0x2304, 0x9106, 0x11e8, 0x8210, 0x8318, 0x1f04,
-	0x5511, 0x6043, 0x0004, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f,
-	0xf0f0, 0x2061, 0x0100, 0x6043, 0x0006, 0x708b, 0x0002, 0x7097,
-	0x0002, 0x2009, 0x07d0, 0x2011, 0x5b3a, 0x080c, 0x80ca, 0x080c,
-	0x5cb2, 0x04c0, 0x080c, 0x5cab, 0x2079, 0x0260, 0x7930, 0x918e,
-	0x1101, 0x1558, 0x7834, 0x9005, 0x1540, 0x7900, 0x918c, 0x00ff,
-	0x1118, 0x7804, 0x9005, 0x0190, 0x080c, 0x5cab, 0x2011, 0x026e,
-	0x2019, 0x1805, 0x20a9, 0x0004, 0x220c, 0x2304, 0x9102, 0x0230,
-	0x11a0, 0x8210, 0x8318, 0x1f04, 0x554c, 0x0078, 0x709f, 0x0000,
-	0x080c, 0x5cab, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0001,
-	0x20a1, 0x1c00, 0x20a9, 0x0014, 0x4003, 0x6043, 0x0008, 0x6043,
-	0x0000, 0x0010, 0x00fe, 0x0005, 0x6040, 0x9085, 0x0100, 0x6042,
-	0x6020, 0xd0b4, 0x1db8, 0x080c, 0x9c3f, 0x20e1, 0x0001, 0x2099,
+	0x0804, 0x48d5, 0x7884, 0x908a, 0x1000, 0x1a04, 0x336e, 0x0126,
+	0x2091, 0x8000, 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6, 0x2061,
+	0x19ca, 0x6142, 0x00ce, 0x012e, 0x0804, 0x3339, 0x00c6, 0x080c,
+	0x6f9b, 0x1160, 0x080c, 0x727f, 0x080c, 0x5cda, 0x9085, 0x0001,
+	0x080c, 0x6fe2, 0x080c, 0x6ecd, 0x080c, 0x0db4, 0x2061, 0x1800,
+	0x6030, 0xc09d, 0x6032, 0x080c, 0x5b99, 0x00ce, 0x0005, 0x00c6,
+	0x2001, 0x1800, 0x2004, 0x908e, 0x0000, 0x0904, 0x336b, 0x7884,
+	0x9005, 0x0188, 0x7888, 0x2061, 0x196c, 0x2c0c, 0x2062, 0x080c,
+	0x2a47, 0x01a0, 0x080c, 0x2a4f, 0x0188, 0x080c, 0x2a57, 0x0170,
+	0x2162, 0x0804, 0x336e, 0x2061, 0x0100, 0x6038, 0x9086, 0x0007,
+	0x1118, 0x2009, 0x0001, 0x0010, 0x2009, 0x0000, 0x7884, 0x9086,
+	0x0002, 0x1548, 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a, 0x0026,
+	0x2011, 0x0003, 0x080c, 0x9772, 0x2011, 0x0002, 0x080c, 0x977c,
+	0x002e, 0x080c, 0x9663, 0x0036, 0x901e, 0x080c, 0x96d9, 0x003e,
+	0x60e3, 0x0000, 0x080c, 0xd8d5, 0x080c, 0xd8f0, 0x9085, 0x0001,
+	0x080c, 0x6fe2, 0x9006, 0x080c, 0x2b16, 0x2001, 0x1800, 0x2003,
+	0x0004, 0x6027, 0x0008, 0x00ce, 0x0804, 0x3339, 0x81ff, 0x0120,
+	0x2009, 0x0001, 0x0804, 0x336b, 0x080c, 0x53a3, 0x0120, 0x2009,
+	0x0007, 0x0804, 0x336b, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c,
+	0x6247, 0x1904, 0x336e, 0x9186, 0x007f, 0x0138, 0x080c, 0x656b,
+	0x0120, 0x2009, 0x0009, 0x0804, 0x336b, 0x080c, 0x4889, 0x1120,
+	0x2009, 0x0002, 0x0804, 0x336b, 0xa867, 0x0000, 0xa868, 0xc0fd,
+	0xa86a, 0x080c, 0xbd12, 0x1120, 0x2009, 0x0003, 0x0804, 0x336b,
+	0x7007, 0x0003, 0x701f, 0x52d5, 0x0005, 0xa830, 0x9086, 0x0100,
+	0x1120, 0x2009, 0x0004, 0x0804, 0x336b, 0xa8e0, 0xa866, 0xa834,
+	0x8007, 0x800c, 0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88, 0x7c9c,
+	0x7d98, 0xaf60, 0x0804, 0x48d5, 0xa898, 0x9086, 0x000d, 0x1904,
+	0x336b, 0x2021, 0x4005, 0x0126, 0x2091, 0x8000, 0x0e04, 0x52f9,
+	0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833,
+	0x0011, 0x0010, 0x7833, 0x0010, 0x7883, 0x4005, 0xa998, 0x7986,
+	0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c, 0x48c5, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x7007, 0x0001,
+	0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x00c6, 0x2061, 0x19ca, 0x7984, 0x6152, 0x614e, 0x6057,
+	0x0000, 0x604b, 0x0009, 0x7898, 0x606a, 0x789c, 0x6066, 0x7888,
+	0x6062, 0x788c, 0x605e, 0x2001, 0x19d8, 0x2044, 0x2001, 0x19df,
+	0xa076, 0xa060, 0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002, 0xa06b,
+	0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e, 0x0804, 0x3339, 0x0126,
+	0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0128, 0x0006,
+	0x080c, 0xbb79, 0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180, 0x1000,
+	0x2004, 0x905d, 0x0160, 0x080c, 0x5cf4, 0x080c, 0x9dc1, 0x0110,
+	0xb817, 0x0000, 0x9006, 0x00ce, 0x00be, 0x012e, 0x0005, 0x9085,
+	0x0001, 0x0cc8, 0x0126, 0x2091, 0x8000, 0x0156, 0x2010, 0x900e,
+	0x20a9, 0x0800, 0x0016, 0x9180, 0x1000, 0x2004, 0x9005, 0x0180,
+	0x9186, 0x007e, 0x0168, 0x9186, 0x007f, 0x0150, 0x9186, 0x0080,
+	0x0138, 0x9186, 0x00ff, 0x0120, 0x0026, 0x2200, 0x0801, 0x002e,
+	0x001e, 0x8108, 0x1f04, 0x5372, 0x015e, 0x012e, 0x0005, 0x2001,
+	0x1854, 0x2004, 0x0005, 0x2001, 0x1873, 0x2004, 0x0005, 0x0006,
+	0x2001, 0x1810, 0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, 0x180e,
+	0x2004, 0xd0b4, 0x0005, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003,
+	0x0005, 0x0016, 0x00e6, 0x2071, 0x1894, 0x7108, 0x910d, 0x710a,
+	0x00ee, 0x001e, 0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04, 0x336e,
+	0x810c, 0x0016, 0x080c, 0x4889, 0x080c, 0x0ef3, 0x2100, 0x2238,
+	0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e, 0x080c, 0x48d2, 0x701f,
+	0x53ca, 0x0005, 0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8, 0x7aac,
+	0x79a4, 0x810c, 0x2061, 0x18ae, 0x2c44, 0xa770, 0xa074, 0x2071,
+	0x1894, 0x080c, 0x48d5, 0x701f, 0x53de, 0x0005, 0x2061, 0x18ae,
+	0x2c44, 0x0016, 0x0026, 0xa270, 0xa174, 0x080c, 0x0efb, 0x002e,
+	0x001e, 0x080c, 0x0fa8, 0x9006, 0xa802, 0xa806, 0x0804, 0x3339,
+	0x0126, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6,
+	0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, 0x2071, 0x1800,
+	0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, 0x5599, 0x0068,
+	0xd08c, 0x0118, 0x080c, 0x54a2, 0x0040, 0xd094, 0x0118, 0x080c,
+	0x5472, 0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x012e, 0x0005,
+	0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0c68,
+	0x0006, 0x7094, 0x9005, 0x000e, 0x0120, 0x7097, 0x0000, 0x708f,
+	0x0000, 0x624c, 0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086, 0xf0f0,
+	0x0130, 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0490, 0x9294,
+	0xff00, 0x9296, 0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160, 0x6240,
+	0x9295, 0x0100, 0x6242, 0x9294, 0x0010, 0x0128, 0x2009, 0x00f7,
+	0x080c, 0x5c56, 0x00f0, 0x6040, 0x9084, 0x0010, 0x9085, 0x0140,
+	0x6042, 0x6043, 0x0000, 0x7083, 0x0000, 0x709f, 0x0001, 0x70c3,
+	0x0000, 0x70db, 0x0000, 0x2009, 0x1c80, 0x200b, 0x0000, 0x7093,
+	0x0000, 0x7087, 0x000f, 0x2009, 0x000f, 0x2011, 0x5b3c, 0x080c,
+	0x80b3, 0x0005, 0x2001, 0x1875, 0x2004, 0xd08c, 0x0110, 0x705b,
+	0xffff, 0x7084, 0x9005, 0x1528, 0x2011, 0x5b3c, 0x080c, 0x8021,
+	0x6040, 0x9094, 0x0010, 0x9285, 0x0020, 0x6042, 0x20a9, 0x00c8,
+	0x6044, 0xd08c, 0x1168, 0x1f04, 0x5488, 0x6242, 0x7097, 0x0000,
+	0x6040, 0x9094, 0x0010, 0x9285, 0x0080, 0x6042, 0x6242, 0x0048,
+	0x6242, 0x7097, 0x0000, 0x708b, 0x0000, 0x9006, 0x080c, 0x5cdf,
+	0x0000, 0x0005, 0x7088, 0x908a, 0x0003, 0x1a0c, 0x0db4, 0x000b,
+	0x0005, 0x54ac, 0x54fd, 0x5598, 0x00f6, 0x0016, 0x6900, 0x918c,
+	0x0800, 0x708b, 0x0001, 0x2001, 0x015d, 0x2003, 0x0000, 0x6803,
+	0x00fc, 0x20a9, 0x0004, 0x6800, 0x9084, 0x00fc, 0x0120, 0x1f04,
+	0x54bb, 0x080c, 0x0db4, 0x68a0, 0x68a2, 0x689c, 0x689e, 0x6898,
+	0x689a, 0xa001, 0x918d, 0x1600, 0x6902, 0x001e, 0x6837, 0x0020,
+	0x080c, 0x5cbb, 0x2079, 0x1c00, 0x7833, 0x1101, 0x7837, 0x0000,
+	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1, 0x1c0e,
+	0x20a9, 0x0004, 0x4003, 0x080c, 0x9c4a, 0x20e1, 0x0001, 0x2099,
 	0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003,
-	0x60c3, 0x000c, 0x2011, 0x19c2, 0x2013, 0x0000, 0x708f, 0x0000,
-	0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x93a3, 0x08d8, 0x0005,
-	0x7094, 0x908a, 0x001d, 0x1a0c, 0x0db4, 0x000b, 0x0005, 0x55c1,
-	0x55d4, 0x55fd, 0x561d, 0x5643, 0x5672, 0x5698, 0x56d0, 0x56f6,
-	0x5724, 0x575f, 0x5797, 0x57b5, 0x57e0, 0x5802, 0x581d, 0x5827,
-	0x585b, 0x5881, 0x58b0, 0x58d6, 0x590e, 0x5952, 0x598f, 0x59b0,
-	0x5a09, 0x5a2b, 0x5a59, 0x5a59, 0x00c6, 0x2061, 0x1800, 0x6003,
-	0x0007, 0x2061, 0x0100, 0x6004, 0x9084, 0xfff9, 0x6006, 0x00ce,
-	0x0005, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061,
-	0x0100, 0x6043, 0x0002, 0x7097, 0x0001, 0x2009, 0x07d0, 0x2011,
-	0x5b3a, 0x080c, 0x80ca, 0x0005, 0x00f6, 0x708c, 0x9086, 0x0014,
-	0x1510, 0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c, 0x5cab, 0x2079,
-	0x0260, 0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834, 0x9005, 0x1188,
-	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
-	0x2011, 0x5b3a, 0x080c, 0x8038, 0x7097, 0x0010, 0x080c, 0x5827,
-	0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0003,
-	0x6043, 0x0004, 0x2011, 0x5b3a, 0x080c, 0x8038, 0x080c, 0x5c2f,
-	0x2079, 0x0240, 0x7833, 0x1102, 0x7837, 0x0000, 0x20a9, 0x0008,
-	0x9f88, 0x000e, 0x200b, 0x0000, 0x8108, 0x1f04, 0x5612, 0x60c3,
-	0x0014, 0x080c, 0x5b64, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005,
-	0x0500, 0x2011, 0x5b3a, 0x080c, 0x8038, 0x9086, 0x0014, 0x11b8,
-	0x080c, 0x5cab, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x1178,
-	0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005,
-	0x1110, 0x70c3, 0x0001, 0x7097, 0x0004, 0x0029, 0x0010, 0x080c,
-	0x5c87, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0005, 0x080c, 0x5c2f,
-	0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5cab,
-	0x080c, 0x5c8e, 0x1170, 0x7080, 0x9005, 0x1158, 0x7158, 0x9186,
-	0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5ae7, 0x0168, 0x080c,
-	0x5c64, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
-	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b64,
-	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b3a,
-	0x080c, 0x8038, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cab, 0x2079,
-	0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160,
-	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
-	0x7097, 0x0006, 0x0029, 0x0010, 0x080c, 0x5c87, 0x00fe, 0x0005,
-	0x00f6, 0x7097, 0x0007, 0x080c, 0x5c2f, 0x2079, 0x0240, 0x7833,
-	0x1104, 0x7837, 0x0000, 0x080c, 0x5cab, 0x080c, 0x5c8e, 0x11b8,
-	0x7080, 0x9005, 0x11a0, 0x7160, 0x9186, 0xffff, 0x0180, 0x9180,
-	0x3138, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c,
-	0x5ae7, 0x0180, 0x080c, 0x4c98, 0x0110, 0x080c, 0x26cc, 0x20a9,
-	0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1,
-	0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b64, 0x00fe, 0x0005,
-	0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b3a, 0x080c, 0x8038,
-	0x9086, 0x0014, 0x11b8, 0x080c, 0x5cab, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc,
-	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0008,
-	0x0029, 0x0010, 0x080c, 0x5c87, 0x00fe, 0x0005, 0x00f6, 0x7097,
-	0x0009, 0x080c, 0x5c2f, 0x2079, 0x0240, 0x7833, 0x1105, 0x7837,
-	0x0100, 0x080c, 0x5c8e, 0x1150, 0x7080, 0x9005, 0x1138, 0x080c,
-	0x5a5a, 0x1188, 0x9085, 0x0001, 0x080c, 0x26cc, 0x20a9, 0x0008,
-	0x080c, 0x5cab, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
-	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b64, 0x0010,
-	0x080c, 0x55b4, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x05a8,
-	0x2011, 0x5b3a, 0x080c, 0x8038, 0x9086, 0x0014, 0x1560, 0x080c,
-	0x5cab, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1520, 0x7834,
-	0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1160, 0x7a38, 0xd2fc,
-	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x000a,
-	0x00b1, 0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70c0,
-	0x9005, 0x1110, 0x70c3, 0x0001, 0x7093, 0x0000, 0x7097, 0x000e,
-	0x080c, 0x5802, 0x0010, 0x080c, 0x5c87, 0x00fe, 0x0005, 0x00f6,
-	0x7097, 0x000b, 0x2011, 0x1c0e, 0x20e9, 0x0001, 0x22a0, 0x20a9,
-	0x0040, 0x2019, 0xffff, 0x4304, 0x080c, 0x5c2f, 0x2079, 0x0240,
-	0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5c8e, 0x0118, 0x2013,
-	0x0000, 0x0020, 0x705c, 0x9085, 0x0100, 0x2012, 0x20a9, 0x0040,
-	0x2009, 0x024e, 0x2011, 0x1c0e, 0x220e, 0x8210, 0x8108, 0x9186,
-	0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04,
-	0x5784, 0x60c3, 0x0084, 0x080c, 0x5b64, 0x00fe, 0x0005, 0x00f6,
-	0x708c, 0x9005, 0x01c0, 0x2011, 0x5b3a, 0x080c, 0x8038, 0x9086,
-	0x0084, 0x1178, 0x080c, 0x5cab, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1106, 0x1138, 0x7834, 0x9005, 0x1120, 0x7097, 0x000c, 0x0029,
-	0x0010, 0x080c, 0x5c87, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x000d,
-	0x080c, 0x5c2f, 0x2079, 0x0240, 0x7833, 0x1107, 0x7837, 0x0000,
-	0x080c, 0x5cab, 0x20a9, 0x0040, 0x2011, 0x026e, 0x2009, 0x024e,
-	0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000,
-	0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260,
-	0x1f04, 0x57c8, 0x60c3, 0x0084, 0x080c, 0x5b64, 0x00fe, 0x0005,
-	0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011, 0x5b3a, 0x080c, 0x8038,
-	0x9086, 0x0084, 0x1198, 0x080c, 0x5cab, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7093, 0x0001,
-	0x080c, 0x5c01, 0x7097, 0x000e, 0x0029, 0x0010, 0x080c, 0x5c87,
-	0x00fe, 0x0005, 0x918d, 0x0001, 0x080c, 0x5cd6, 0x7097, 0x000f,
-	0x708f, 0x0000, 0x2061, 0x0140, 0x605b, 0xbc85, 0x605f, 0xb5b5,
-	0x2061, 0x0100, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009, 0x07d0,
-	0x2011, 0x5b3a, 0x080c, 0x802c, 0x0005, 0x708c, 0x9005, 0x0130,
-	0x2011, 0x5b3a, 0x080c, 0x8038, 0x7097, 0x0000, 0x0005, 0x7097,
-	0x0011, 0x080c, 0x9c3f, 0x080c, 0x5cab, 0x20e1, 0x0000, 0x2099,
-	0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x748c, 0x9480, 0x0018,
-	0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x4003, 0x080c,
-	0x5c8e, 0x11a0, 0x7178, 0x81ff, 0x0188, 0x900e, 0x707c, 0x9084,
-	0x00ff, 0x0160, 0x080c, 0x2663, 0x9186, 0x007e, 0x0138, 0x9186,
-	0x0080, 0x0120, 0x2011, 0x0008, 0x080c, 0x5ae7, 0x60c3, 0x0014,
-	0x080c, 0x5b64, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011,
-	0x5b3a, 0x080c, 0x8038, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cab,
+	0x60c3, 0x000c, 0x600f, 0x0000, 0x080c, 0x5b6d, 0x00fe, 0x9006,
+	0x708e, 0x6043, 0x0008, 0x6042, 0x0005, 0x00f6, 0x708c, 0x708f,
+	0x0000, 0x9025, 0x0904, 0x5575, 0x6020, 0xd0b4, 0x1904, 0x5573,
+	0x719c, 0x81ff, 0x0904, 0x5561, 0x9486, 0x000c, 0x1904, 0x556e,
+	0x9480, 0x0018, 0x8004, 0x20a8, 0x080c, 0x5cb4, 0x2011, 0x0260,
+	0x2019, 0x1c00, 0x220c, 0x2304, 0x9106, 0x11e8, 0x8210, 0x8318,
+	0x1f04, 0x551a, 0x6043, 0x0004, 0x2061, 0x0140, 0x605b, 0xbc94,
+	0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0006, 0x708b, 0x0002,
+	0x7097, 0x0002, 0x2009, 0x07d0, 0x2011, 0x5b43, 0x080c, 0x80b3,
+	0x080c, 0x5cbb, 0x04c0, 0x080c, 0x5cb4, 0x2079, 0x0260, 0x7930,
+	0x918e, 0x1101, 0x1558, 0x7834, 0x9005, 0x1540, 0x7900, 0x918c,
+	0x00ff, 0x1118, 0x7804, 0x9005, 0x0190, 0x080c, 0x5cb4, 0x2011,
+	0x026e, 0x2019, 0x1805, 0x20a9, 0x0004, 0x220c, 0x2304, 0x9102,
+	0x0230, 0x11a0, 0x8210, 0x8318, 0x1f04, 0x5555, 0x0078, 0x709f,
+	0x0000, 0x080c, 0x5cb4, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9,
+	0x0001, 0x20a1, 0x1c00, 0x20a9, 0x0014, 0x4003, 0x6043, 0x0008,
+	0x6043, 0x0000, 0x0010, 0x00fe, 0x0005, 0x6040, 0x9085, 0x0100,
+	0x6042, 0x6020, 0xd0b4, 0x1db8, 0x080c, 0x9c4a, 0x20e1, 0x0001,
+	0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014,
+	0x4003, 0x60c3, 0x000c, 0x2011, 0x19c1, 0x2013, 0x0000, 0x708f,
+	0x0000, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x93a4, 0x08d8,
+	0x0005, 0x7094, 0x908a, 0x001d, 0x1a0c, 0x0db4, 0x000b, 0x0005,
+	0x55ca, 0x55dd, 0x5606, 0x5626, 0x564c, 0x567b, 0x56a1, 0x56d9,
+	0x56ff, 0x572d, 0x5768, 0x57a0, 0x57be, 0x57e9, 0x580b, 0x5826,
+	0x5830, 0x5864, 0x588a, 0x58b9, 0x58df, 0x5917, 0x595b, 0x5998,
+	0x59b9, 0x5a12, 0x5a34, 0x5a62, 0x5a62, 0x00c6, 0x2061, 0x1800,
+	0x6003, 0x0007, 0x2061, 0x0100, 0x6004, 0x9084, 0xfff9, 0x6006,
+	0x00ce, 0x0005, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0,
+	0x2061, 0x0100, 0x6043, 0x0002, 0x7097, 0x0001, 0x2009, 0x07d0,
+	0x2011, 0x5b43, 0x080c, 0x80b3, 0x0005, 0x00f6, 0x708c, 0x9086,
+	0x0014, 0x1510, 0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c, 0x5cb4,
+	0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834, 0x9005,
+	0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3,
+	0x0001, 0x2011, 0x5b43, 0x080c, 0x8021, 0x7097, 0x0010, 0x080c,
+	0x5830, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097,
+	0x0003, 0x6043, 0x0004, 0x2011, 0x5b43, 0x080c, 0x8021, 0x080c,
+	0x5c38, 0x2079, 0x0240, 0x7833, 0x1102, 0x7837, 0x0000, 0x20a9,
+	0x0008, 0x9f88, 0x000e, 0x200b, 0x0000, 0x8108, 0x1f04, 0x561b,
+	0x60c3, 0x0014, 0x080c, 0x5b6d, 0x00fe, 0x0005, 0x00f6, 0x708c,
+	0x9005, 0x0500, 0x2011, 0x5b43, 0x080c, 0x8021, 0x9086, 0x0014,
+	0x11b8, 0x080c, 0x5cb4, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102,
+	0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0,
+	0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0004, 0x0029, 0x0010,
+	0x080c, 0x5c90, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0005, 0x080c,
+	0x5c38, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c,
+	0x5cb4, 0x080c, 0x5c97, 0x1170, 0x7080, 0x9005, 0x1158, 0x7158,
+	0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5af0, 0x0168,
+	0x080c, 0x5c6d, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e,
+	0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c,
+	0x5b6d, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011,
+	0x5b43, 0x080c, 0x8021, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cb4,
 	0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005,
 	0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3,
-	0x0001, 0x7097, 0x0012, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe,
-	0x0005, 0x00f6, 0x7097, 0x0013, 0x080c, 0x5c3d, 0x2079, 0x0240,
-	0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5cab, 0x080c, 0x5c8e,
-	0x1170, 0x7080, 0x9005, 0x1158, 0x7158, 0x9186, 0xffff, 0x0138,
-	0x2011, 0x0008, 0x080c, 0x5ae7, 0x0168, 0x080c, 0x5c64, 0x20a9,
-	0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1,
-	0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b64, 0x00fe, 0x0005,
-	0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b3a, 0x080c, 0x8038,
-	0x9086, 0x0014, 0x11b8, 0x080c, 0x5cab, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc,
-	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0014,
-	0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097,
-	0x0015, 0x080c, 0x5c3d, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837,
-	0x0000, 0x080c, 0x5cab, 0x080c, 0x5c8e, 0x11b8, 0x7080, 0x9005,
-	0x11a0, 0x7160, 0x9186, 0xffff, 0x0180, 0x9180, 0x3138, 0x200d,
-	0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5ae7, 0x0180,
-	0x080c, 0x4c98, 0x0110, 0x080c, 0x26cc, 0x20a9, 0x0008, 0x20e1,
-	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003,
-	0x60c3, 0x0014, 0x080c, 0x5b64, 0x00fe, 0x0005, 0x00f6, 0x708c,
-	0x9005, 0x05f0, 0x2011, 0x5b3a, 0x080c, 0x8038, 0x9086, 0x0014,
-	0x15a8, 0x080c, 0x5cab, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105,
-	0x1568, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1168,
-	0x9085, 0x0001, 0x080c, 0x5cd6, 0x7a38, 0xd2fc, 0x0128, 0x70c0,
-	0x9005, 0x1110, 0x70c3, 0x0001, 0x0080, 0x9005, 0x11b8, 0x7a38,
-	0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x9085,
-	0x0001, 0x080c, 0x5cd6, 0x7093, 0x0000, 0x7a38, 0xd2f4, 0x0110,
-	0x70db, 0x0008, 0x7097, 0x0016, 0x0029, 0x0010, 0x708f, 0x0000,
-	0x00fe, 0x0005, 0x080c, 0x9c3f, 0x080c, 0x5cab, 0x20e1, 0x0000,
-	0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000e,
-	0x4003, 0x2011, 0x026d, 0x2204, 0x9084, 0x0100, 0x2011, 0x024d,
-	0x2012, 0x2011, 0x026e, 0x7097, 0x0017, 0x080c, 0x5c8e, 0x1150,
-	0x7080, 0x9005, 0x1138, 0x080c, 0x5a5a, 0x1188, 0x9085, 0x0001,
-	0x080c, 0x26cc, 0x20a9, 0x0008, 0x080c, 0x5cab, 0x20e1, 0x0000,
-	0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3,
-	0x0014, 0x080c, 0x5b64, 0x0010, 0x080c, 0x55b4, 0x0005, 0x00f6,
-	0x708c, 0x9005, 0x01d8, 0x2011, 0x5b3a, 0x080c, 0x8038, 0x9086,
-	0x0084, 0x1190, 0x080c, 0x5cab, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1106, 0x1150, 0x7834, 0x9005, 0x1138, 0x9006, 0x080c, 0x5cd6,
-	0x7097, 0x0018, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005,
-	0x00f6, 0x7097, 0x0019, 0x080c, 0x5c3d, 0x2079, 0x0240, 0x7833,
-	0x1106, 0x7837, 0x0000, 0x080c, 0x5cab, 0x2009, 0x026e, 0x2039,
-	0x1c0e, 0x20a9, 0x0040, 0x213e, 0x8738, 0x8108, 0x9186, 0x0280,
-	0x1128, 0x6814, 0x8000, 0x6816, 0x2009, 0x0260, 0x1f04, 0x59c3,
-	0x2039, 0x1c0e, 0x080c, 0x5c8e, 0x11e8, 0x2728, 0x2514, 0x8207,
-	0x9084, 0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff, 0x8007, 0x9205,
-	0x202a, 0x705c, 0x2310, 0x8214, 0x92a0, 0x1c0e, 0x2414, 0x938c,
-	0x0001, 0x0118, 0x9294, 0xff00, 0x0018, 0x9294, 0x00ff, 0x8007,
-	0x9215, 0x2222, 0x20a9, 0x0040, 0x2009, 0x024e, 0x270e, 0x8738,
-	0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009,
-	0x0240, 0x1f04, 0x59f6, 0x60c3, 0x0084, 0x080c, 0x5b64, 0x00fe,
-	0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011, 0x5b3a, 0x080c,
-	0x8038, 0x9086, 0x0084, 0x1198, 0x080c, 0x5cab, 0x2079, 0x0260,
+	0x0001, 0x7097, 0x0006, 0x0029, 0x0010, 0x080c, 0x5c90, 0x00fe,
+	0x0005, 0x00f6, 0x7097, 0x0007, 0x080c, 0x5c38, 0x2079, 0x0240,
+	0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x5cb4, 0x080c, 0x5c97,
+	0x11b8, 0x7080, 0x9005, 0x11a0, 0x7160, 0x9186, 0xffff, 0x0180,
+	0x9180, 0x313a, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008,
+	0x080c, 0x5af0, 0x0180, 0x080c, 0x4ca1, 0x0110, 0x080c, 0x26ce,
+	0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
+	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b6d, 0x00fe,
+	0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b43, 0x080c,
+	0x8021, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cb4, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
+	0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097,
+	0x0008, 0x0029, 0x0010, 0x080c, 0x5c90, 0x00fe, 0x0005, 0x00f6,
+	0x7097, 0x0009, 0x080c, 0x5c38, 0x2079, 0x0240, 0x7833, 0x1105,
+	0x7837, 0x0100, 0x080c, 0x5c97, 0x1150, 0x7080, 0x9005, 0x1138,
+	0x080c, 0x5a63, 0x1188, 0x9085, 0x0001, 0x080c, 0x26ce, 0x20a9,
+	0x0008, 0x080c, 0x5cb4, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b6d,
+	0x0010, 0x080c, 0x55bd, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005,
+	0x05a8, 0x2011, 0x5b43, 0x080c, 0x8021, 0x9086, 0x0014, 0x1560,
+	0x080c, 0x5cb4, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1520,
+	0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1160, 0x7a38,
+	0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097,
+	0x000a, 0x00b1, 0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc, 0x0128,
+	0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7093, 0x0000, 0x7097,
+	0x000e, 0x080c, 0x580b, 0x0010, 0x080c, 0x5c90, 0x00fe, 0x0005,
+	0x00f6, 0x7097, 0x000b, 0x2011, 0x1c0e, 0x20e9, 0x0001, 0x22a0,
+	0x20a9, 0x0040, 0x2019, 0xffff, 0x4304, 0x080c, 0x5c38, 0x2079,
+	0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5c97, 0x0118,
+	0x2013, 0x0000, 0x0020, 0x705c, 0x9085, 0x0100, 0x2012, 0x20a9,
+	0x0040, 0x2009, 0x024e, 0x2011, 0x1c0e, 0x220e, 0x8210, 0x8108,
+	0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240,
+	0x1f04, 0x578d, 0x60c3, 0x0084, 0x080c, 0x5b6d, 0x00fe, 0x0005,
+	0x00f6, 0x708c, 0x9005, 0x01c0, 0x2011, 0x5b43, 0x080c, 0x8021,
+	0x9086, 0x0084, 0x1178, 0x080c, 0x5cb4, 0x2079, 0x0260, 0x7a30,
+	0x9296, 0x1106, 0x1138, 0x7834, 0x9005, 0x1120, 0x7097, 0x000c,
+	0x0029, 0x0010, 0x080c, 0x5c90, 0x00fe, 0x0005, 0x00f6, 0x7097,
+	0x000d, 0x080c, 0x5c38, 0x2079, 0x0240, 0x7833, 0x1107, 0x7837,
+	0x0000, 0x080c, 0x5cb4, 0x20a9, 0x0040, 0x2011, 0x026e, 0x2009,
+	0x024e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810,
+	0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011,
+	0x0260, 0x1f04, 0x57d1, 0x60c3, 0x0084, 0x080c, 0x5b6d, 0x00fe,
+	0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011, 0x5b43, 0x080c,
+	0x8021, 0x9086, 0x0084, 0x1198, 0x080c, 0x5cb4, 0x2079, 0x0260,
 	0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7093,
-	0x0001, 0x080c, 0x5c01, 0x7097, 0x001a, 0x0029, 0x0010, 0x708f,
-	0x0000, 0x00fe, 0x0005, 0x9085, 0x0001, 0x080c, 0x5cd6, 0x7097,
-	0x001b, 0x080c, 0x9c3f, 0x080c, 0x5cab, 0x2011, 0x0260, 0x2009,
-	0x0240, 0x748c, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8,
-	0x8004, 0x20a8, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150,
-	0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816,
-	0x2011, 0x0260, 0x1f04, 0x5a42, 0x60c3, 0x0084, 0x080c, 0x5b64,
-	0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0x1854, 0x252c, 0x20a9,
-	0x0008, 0x2041, 0x1c0e, 0x20e9, 0x0001, 0x28a0, 0x080c, 0x5cab,
-	0x20e1, 0x0000, 0x2099, 0x026e, 0x4003, 0x20a9, 0x0008, 0x2011,
-	0x0007, 0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200, 0x200c, 0x91a6,
-	0xffff, 0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008, 0x8211, 0x1f04,
-	0x5a74, 0x0804, 0x5ae3, 0x82ff, 0x1160, 0xd5d4, 0x0120, 0x91a6,
-	0x3fff, 0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904, 0x5ae3, 0x918d,
-	0xc000, 0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019,
-	0x0010, 0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008, 0x8424, 0x1240,
-	0xd5d4, 0x0110, 0x8319, 0x0008, 0x8318, 0x1f04, 0x5a9a, 0x04d8,
-	0x23a8, 0x2021, 0x0001, 0x8426, 0x8425, 0x1f04, 0x5aac, 0x2328,
-	0x8529, 0x92be, 0x0007, 0x0158, 0x0006, 0x2039, 0x0007, 0x2200,
-	0x973a, 0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04, 0x5abb, 0x755a,
-	0x95c8, 0x3138, 0x292d, 0x95ac, 0x00ff, 0x757e, 0x6532, 0x6536,
-	0x0016, 0x2508, 0x080c, 0x26ac, 0x001e, 0x60e7, 0x0000, 0x65ea,
-	0x2018, 0x2304, 0x9405, 0x201a, 0x7083, 0x0001, 0x20e9, 0x0000,
-	0x20a1, 0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9, 0x0008, 0x4003,
-	0x9085, 0x0001, 0x0008, 0x9006, 0x009e, 0x008e, 0x0005, 0x0156,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1, 0x0000, 0x2099,
-	0x026e, 0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0, 0x4003, 0x014e,
-	0x013e, 0x01de, 0x01ce, 0x015e, 0x2118, 0x9026, 0x2001, 0x0007,
-	0x939a, 0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0, 0x2118, 0x84ff,
-	0x0120, 0x939a, 0x0010, 0x8421, 0x1de0, 0x2021, 0x0001, 0x83ff,
-	0x0118, 0x8423, 0x8319, 0x1de8, 0x9238, 0x2029, 0x026e, 0x9528,
-	0x2504, 0x942c, 0x11b8, 0x9405, 0x203a, 0x715a, 0x91a0, 0x3138,
-	0x242d, 0x95ac, 0x00ff, 0x757e, 0x6532, 0x6536, 0x0016, 0x2508,
-	0x080c, 0x26ac, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x7083, 0x0001,
-	0x9084, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7087, 0x0000,
-	0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, 0x2071, 0x0140,
-	0x080c, 0x5bf0, 0x080c, 0x93ac, 0x7004, 0x9084, 0x4000, 0x0110,
-	0x080c, 0x2b24, 0x0126, 0x2091, 0x8000, 0x2071, 0x1825, 0x2073,
-	0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7, 0x080c, 0x5c4d,
-	0x001e, 0x9094, 0x0010, 0x9285, 0x0080, 0x7842, 0x7a42, 0x002e,
-	0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x29ca, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x2011,
-	0x19c2, 0x2013, 0x0000, 0x708f, 0x0000, 0x012e, 0x60a3, 0x0056,
-	0x60a7, 0x9575, 0x080c, 0x93a3, 0x6144, 0xd184, 0x0120, 0x7194,
-	0x918d, 0x2000, 0x0018, 0x7188, 0x918d, 0x1000, 0x2011, 0x196a,
-	0x2112, 0x2009, 0x07d0, 0x2011, 0x5b3a, 0x080c, 0x80ca, 0x0005,
-	0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9db8,
-	0x2009, 0x00f7, 0x080c, 0x5c4d, 0x2061, 0x19cb, 0x900e, 0x611a,
-	0x611e, 0x6172, 0x6176, 0x2061, 0x1800, 0x6003, 0x0001, 0x2061,
-	0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x196a, 0x200b,
-	0x0000, 0x2009, 0x002d, 0x2011, 0x5bbc, 0x080c, 0x802c, 0x012e,
-	0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x0471, 0x2071, 0x0100, 0x080c, 0x93ac, 0x2071, 0x0140,
-	0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2b24, 0x080c, 0x6fba,
-	0x0188, 0x080c, 0x6fd5, 0x1170, 0x080c, 0x72a0, 0x0016, 0x080c,
-	0x277b, 0x2001, 0x193e, 0x2102, 0x001e, 0x080c, 0x729b, 0x080c,
-	0x6ee4, 0x0050, 0x2009, 0x0001, 0x080c, 0x2a63, 0x2001, 0x0001,
-	0x080c, 0x260c, 0x080c, 0x5b90, 0x012e, 0x000e, 0x00ee, 0x0005,
-	0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158, 0x0026, 0x0036, 0x2011,
-	0x8017, 0x2001, 0x196a, 0x201c, 0x080c, 0x48d9, 0x003e, 0x002e,
-	0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001, 0x20a1, 0x1c80, 0x080c,
-	0x5cab, 0x20e9, 0x0000, 0x2099, 0x026e, 0x0099, 0x20a9, 0x0020,
-	0x080c, 0x5ca5, 0x2099, 0x0260, 0x20a1, 0x1c92, 0x0051, 0x20a9,
-	0x000e, 0x080c, 0x5ca8, 0x2099, 0x0260, 0x20a1, 0x1cb2, 0x0009,
-	0x0005, 0x0016, 0x0026, 0x3410, 0x3308, 0x2104, 0x8007, 0x2012,
-	0x8108, 0x8210, 0x1f04, 0x5c25, 0x002e, 0x001e, 0x0005, 0x080c,
-	0x9c3f, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x080c, 0x9c3f, 0x080c,
-	0x5cab, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x00c6, 0x0006, 0x2061,
-	0x0100, 0x810f, 0x2001, 0x1833, 0x2004, 0x9005, 0x1138, 0x2001,
-	0x1817, 0x2004, 0x9084, 0x00ff, 0x9105, 0x0010, 0x9185, 0x00f7,
-	0x604a, 0x000e, 0x00ce, 0x0005, 0x0016, 0x0046, 0x080c, 0x655e,
-	0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xd52a, 0x2001,
-	0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x900e, 0x080c,
-	0x2fa5, 0x080c, 0xc212, 0x0140, 0x0036, 0x2019, 0xffff, 0x2021,
-	0x0007, 0x080c, 0x4a76, 0x003e, 0x004e, 0x001e, 0x0005, 0x080c,
-	0x5b90, 0x7097, 0x0000, 0x708f, 0x0000, 0x0005, 0x0006, 0x2001,
-	0x180c, 0x2004, 0xd09c, 0x0100, 0x000e, 0x0005, 0x0006, 0x0016,
-	0x0126, 0x2091, 0x8000, 0x2001, 0x0101, 0x200c, 0x918d, 0x0006,
-	0x2102, 0x012e, 0x001e, 0x000e, 0x0005, 0x2009, 0x0001, 0x0020,
-	0x2009, 0x0002, 0x0008, 0x900e, 0x6814, 0x9084, 0xffc0, 0x910d,
-	0x6916, 0x0005, 0x00f6, 0x0156, 0x0146, 0x01d6, 0x9006, 0x20a9,
-	0x0080, 0x20e9, 0x0001, 0x20a1, 0x1c00, 0x4004, 0x2079, 0x1c00,
-	0x7803, 0x2200, 0x7807, 0x00ef, 0x780f, 0x00ef, 0x7813, 0x0138,
-	0x7823, 0xffff, 0x7827, 0xffff, 0x01de, 0x014e, 0x015e, 0x00fe,
-	0x0005, 0x2001, 0x1800, 0x2003, 0x0001, 0x0005, 0x2001, 0x1977,
-	0x0118, 0x2003, 0x0001, 0x0010, 0x2003, 0x0000, 0x0005, 0x0156,
-	0x20a9, 0x0800, 0x2009, 0x1000, 0x9006, 0x200a, 0x8108, 0x1f04,
-	0x5ce5, 0x015e, 0x0005, 0x00d6, 0x0036, 0x0156, 0x0136, 0x0146,
-	0x2069, 0x1853, 0x9006, 0xb802, 0xb8be, 0xb807, 0x0707, 0xb80a,
-	0xb80e, 0xb812, 0x9198, 0x3138, 0x231d, 0x939c, 0x00ff, 0xbb16,
-	0x0016, 0x0026, 0xb8b2, 0x080c, 0x9db1, 0x1120, 0x9192, 0x007e,
-	0x1208, 0xbbb2, 0x20a9, 0x0004, 0xb8b4, 0x20e8, 0xb9b8, 0x9198,
-	0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9, 0x0004, 0x9198, 0x000a,
-	0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e, 0xb842, 0xb84e, 0xb852,
-	0xb856, 0xb85a, 0xb85e, 0xb862, 0xb866, 0xb86a, 0xb86f, 0x0100,
-	0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893, 0x0008, 0xb896,
-	0xb89a, 0xb89e, 0xb8ae, 0xb9a2, 0x0096, 0xb8a4, 0x904d, 0x0110,
-	0x080c, 0x101d, 0xb8a7, 0x0000, 0x009e, 0x9006, 0xb84a, 0x6810,
-	0xb83a, 0x680c, 0xb846, 0x6814, 0x9084, 0x00ff, 0xb842, 0x014e,
-	0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, 0x2091, 0x8000,
-	0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x5dbb,
-	0x9182, 0x0800, 0x1a04, 0x5dbf, 0x2001, 0x180c, 0x2004, 0x9084,
-	0x0003, 0x1904, 0x5dc5, 0x9188, 0x1000, 0x2104, 0x905d, 0x0518,
-	0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1508, 0xb8a4, 0x900d,
-	0x1904, 0x5dd7, 0xb850, 0x900d, 0x1148, 0xa802, 0x2900, 0xb852,
-	0xb84e, 0x080c, 0x840e, 0x9006, 0x012e, 0x0005, 0x00a6, 0x2150,
-	0x2900, 0xb002, 0xa803, 0x0000, 0x00ae, 0xb852, 0x0c90, 0x2001,
-	0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e, 0x0498, 0x9082,
-	0x0006, 0x1290, 0x080c, 0x9db1, 0x1160, 0xb8a0, 0x9084, 0xff80,
-	0x1140, 0xb900, 0xd1fc, 0x0990, 0x2001, 0x0029, 0x2009, 0x1000,
-	0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c, 0x210c, 0xd18c,
-	0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118, 0x2001, 0x0004,
-	0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118, 0x2009, 0x1000,
-	0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001,
-	0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001, 0x180c, 0x2004,
-	0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x905d, 0x09a8, 0x080c,
-	0x6562, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804, 0x5d6e, 0x080c,
-	0x63da, 0x0904, 0x5d87, 0x0804, 0x5d72, 0x00b6, 0x00e6, 0x0126,
-	0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04, 0x5e58, 0x9188,
-	0x1000, 0x2104, 0x905d, 0x0904, 0x5e30, 0xb8a0, 0x9086, 0x007f,
-	0x0178, 0x080c, 0x656a, 0x0160, 0xa994, 0x81ff, 0x0130, 0x908e,
-	0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x080c, 0x6562, 0x1598,
-	0xa87c, 0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8, 0x2060, 0x0026,
-	0x2010, 0x080c, 0xbb05, 0x002e, 0x1120, 0x2001, 0x0008, 0x0804,
-	0x5e5a, 0x6020, 0x9086, 0x000a, 0x0120, 0x2001, 0x0008, 0x0804,
-	0x5e5a, 0x601a, 0x6003, 0x0008, 0x2900, 0x6016, 0x0058, 0x080c,
-	0x9ddc, 0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016, 0x600b, 0xffff,
-	0x6023, 0x000a, 0x2009, 0x0003, 0x080c, 0x9eac, 0x9006, 0x0458,
-	0x2001, 0x0028, 0x0438, 0x9082, 0x0006, 0x1290, 0x080c, 0x9db1,
-	0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0900,
-	0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, 0x2001, 0x0028, 0x0090,
-	0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0050,
-	0xd184, 0x0118, 0x2001, 0x0004, 0x0028, 0x2001, 0x0029, 0x0010,
-	0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001,
-	0x002c, 0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091, 0x8000, 0xa8e0,
-	0x9005, 0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630, 0xa8c8, 0x9005,
-	0x1518, 0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974, 0x2079, 0x1800,
-	0x9182, 0x0800, 0x12e8, 0x7830, 0x9084, 0x0003, 0x1130, 0xaa98,
-	0xab94, 0xa878, 0x9084, 0x0007, 0x00ea, 0x7930, 0xd18c, 0x0118,
-	0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010,
-	0x2001, 0x0029, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018,
-	0x2001, 0x0029, 0x900e, 0x9006, 0x0008, 0x9005, 0x012e, 0x00be,
-	0x00fe, 0x0005, 0x5eef, 0x5eaa, 0x5ec1, 0x5eef, 0x5eef, 0x5eef,
-	0x5eef, 0x5eef, 0x2100, 0x9082, 0x007e, 0x1278, 0x080c, 0x61de,
-	0x0148, 0x9046, 0xb810, 0x9306, 0x1904, 0x5ef7, 0xb814, 0x9206,
-	0x15f0, 0x0028, 0xbb12, 0xba16, 0x0010, 0x080c, 0x4793, 0x0150,
-	0x04b0, 0x080c, 0x623e, 0x1598, 0xb810, 0x9306, 0x1580, 0xb814,
-	0x9206, 0x1568, 0x080c, 0x9ddc, 0x0530, 0x2b00, 0x6012, 0x080c,
-	0xbf8c, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0xa878,
-	0x9086, 0x0001, 0x1170, 0x080c, 0x2fda, 0x9006, 0x080c, 0x617b,
-	0x2001, 0x0002, 0x080c, 0x618f, 0x2001, 0x0200, 0xb86e, 0xb893,
-	0x0002, 0x2009, 0x0003, 0x080c, 0x9eac, 0x9006, 0x0068, 0x2001,
-	0x0001, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001,
-	0x0028, 0x900e, 0x9005, 0x0000, 0x012e, 0x00be, 0x00fe, 0x0005,
-	0x00b6, 0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa894, 0x90c6,
-	0x0015, 0x0904, 0x60cc, 0x90c6, 0x0056, 0x0904, 0x60d0, 0x90c6,
-	0x0066, 0x0904, 0x60d4, 0x90c6, 0x0067, 0x0904, 0x60d8, 0x90c6,
-	0x0068, 0x0904, 0x60dc, 0x90c6, 0x0071, 0x0904, 0x60e0, 0x90c6,
-	0x0074, 0x0904, 0x60e4, 0x90c6, 0x007c, 0x0904, 0x60e8, 0x90c6,
-	0x007e, 0x0904, 0x60ec, 0x90c6, 0x0037, 0x0904, 0x60f0, 0x9016,
-	0x2079, 0x1800, 0xa974, 0x9186, 0x00ff, 0x0904, 0x60c7, 0x9182,
-	0x0800, 0x1a04, 0x60c7, 0x080c, 0x623e, 0x1198, 0xb804, 0x9084,
-	0x00ff, 0x9082, 0x0006, 0x1268, 0xa894, 0x90c6, 0x006f, 0x0148,
-	0x080c, 0x9db1, 0x1904, 0x60b0, 0xb8a0, 0x9084, 0xff80, 0x1904,
-	0x60b0, 0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6, 0x005e, 0x0904,
-	0x6010, 0x90c6, 0x0064, 0x0904, 0x6039, 0x2008, 0x0804, 0x5fd3,
-	0xa998, 0xa8b0, 0x2040, 0x080c, 0x9db1, 0x1120, 0x9182, 0x007f,
-	0x0a04, 0x5fd3, 0x9186, 0x00ff, 0x0904, 0x5fd3, 0x9182, 0x0800,
-	0x1a04, 0x5fd3, 0xaaa0, 0xab9c, 0x7878, 0x9306, 0x1188, 0x787c,
-	0x0096, 0x924e, 0x1128, 0x2208, 0x2310, 0x009e, 0x0804, 0x5fd3,
-	0x99cc, 0xff00, 0x009e, 0x1120, 0x2208, 0x2310, 0x0804, 0x5fd3,
-	0x080c, 0x4793, 0x0904, 0x5fdc, 0x900e, 0x9016, 0x90c6, 0x4000,
-	0x1558, 0x0006, 0x080c, 0x645e, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0031, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098,
-	0x080c, 0x0f68, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0035, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098,
-	0x080c, 0x0f68, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408,
-	0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070, 0x90c6,
-	0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001, 0x4005,
-	0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e,
-	0x2001, 0x0030, 0x900e, 0x0470, 0x080c, 0x9ddc, 0x1130, 0x2001,
-	0x4005, 0x2009, 0x0003, 0x9016, 0x0c80, 0x2b00, 0x6012, 0x080c,
-	0xbf8c, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c, 0x0108,
-	0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x2fda, 0x012e,
-	0x9006, 0x080c, 0x617b, 0x2001, 0x0002, 0x080c, 0x618f, 0x2009,
-	0x0002, 0x080c, 0x9eac, 0xa8b0, 0xd094, 0x0118, 0xb8bc, 0xc08d,
-	0xb8be, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be, 0x0005,
-	0x080c, 0x539a, 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998, 0xaeb0,
-	0x080c, 0x623e, 0x1904, 0x5fce, 0x9186, 0x007f, 0x0130, 0x080c,
-	0x6562, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096, 0x080c, 0x0feb,
-	0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900, 0x009e, 0xa806,
-	0x080c, 0xbcfd, 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804,
-	0x5fd5, 0xa998, 0xaeb0, 0x080c, 0x623e, 0x1904, 0x5fce, 0x0096,
-	0x080c, 0x0feb, 0x1128, 0x009e, 0x2009, 0x0002, 0x0804, 0x608d,
-	0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b, 0xb8b4,
-	0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002,
-	0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xbbb8,
-	0x9398, 0x0006, 0x2398, 0x080c, 0x0f68, 0x009e, 0xa87b, 0x0000,
-	0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168, 0x080c, 0x5386,
-	0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c, 0x0118,
-	0xa89b, 0x000c, 0x00b0, 0x080c, 0x6562, 0x0118, 0xa89b, 0x0009,
-	0x0080, 0x080c, 0x539a, 0x0118, 0xa89b, 0x0007, 0x0050, 0x080c,
-	0xbce0, 0x1904, 0x6009, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804,
-	0x5fd5, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804, 0x8006, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009,
-	0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041,
-	0x122f, 0x080c, 0xa334, 0x1904, 0x6009, 0x2009, 0x0002, 0x08e8,
-	0x2001, 0x0028, 0x900e, 0x0804, 0x600a, 0x2009, 0x180c, 0x210c,
-	0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001,
-	0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804, 0x600a, 0x2001,
-	0x0029, 0x900e, 0x0804, 0x600a, 0x080c, 0x355c, 0x0804, 0x600b,
-	0x080c, 0x50c3, 0x0804, 0x600b, 0x080c, 0x432c, 0x0804, 0x600b,
-	0x080c, 0x43a5, 0x0804, 0x600b, 0x080c, 0x4401, 0x0804, 0x600b,
-	0x080c, 0x484f, 0x0804, 0x600b, 0x080c, 0x4afb, 0x0804, 0x600b,
-	0x080c, 0x4d2e, 0x0804, 0x600b, 0x080c, 0x4f27, 0x0804, 0x600b,
-	0x080c, 0x376c, 0x0804, 0x600b, 0x00b6, 0xa974, 0xae78, 0x9684,
-	0x3fff, 0x9082, 0x4000, 0x1618, 0x9182, 0x0800, 0x1268, 0x9188,
-	0x1000, 0x2104, 0x905d, 0x0140, 0x080c, 0x6562, 0x1148, 0x00e9,
-	0x080c, 0x6369, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e, 0x0090,
-	0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d88, 0x2001, 0x0029,
-	0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001,
-	0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000,
-	0xb850, 0x900d, 0x0150, 0x2900, 0x0096, 0x2148, 0xa802, 0x009e,
-	0xa803, 0x0000, 0xb852, 0x012e, 0x0005, 0x2900, 0xb852, 0xb84e,
-	0xa803, 0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000, 0xb84c, 0x9005,
-	0x0170, 0x00e6, 0x2071, 0x19b8, 0x7004, 0x9086, 0x0002, 0x0168,
-	0x00ee, 0xb84c, 0xa802, 0x2900, 0xb84e, 0x012e, 0x0005, 0x2900,
-	0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x701c, 0x9b06, 0x1d80,
-	0xb84c, 0x00a6, 0x2050, 0xb000, 0xa802, 0x2900, 0xb002, 0x00ae,
-	0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0xb84c, 0x904d,
-	0x0130, 0xa800, 0x9005, 0x1108, 0xb852, 0xb84e, 0x9905, 0x012e,
-	0x0005, 0xb84c, 0x904d, 0x0130, 0xa800, 0x9005, 0x1108, 0xb852,
-	0xb84e, 0x9905, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026, 0x2091,
-	0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285, 0x0008,
-	0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6,
-	0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006,
-	0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c, 0x655e,
-	0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110, 0x2011,
-	0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006, 0x9086,
-	0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0db4, 0x000e, 0x00ce,
-	0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000,
-	0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168, 0xb89c,
-	0xd0a4, 0x0150, 0x080c, 0x655a, 0x1138, 0x9284, 0x00ff, 0x9086,
-	0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff, 0x8007,
-	0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182, 0x0800,
-	0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190, 0x1000,
-	0x2204, 0x905d, 0x1180, 0x0096, 0x080c, 0x0feb, 0x2958, 0x009e,
-	0x0160, 0x2b00, 0x2012, 0xb85c, 0xb8ba, 0xb860, 0xb8b6, 0x9006,
-	0xb8a6, 0x080c, 0x5ceb, 0x9006, 0x0010, 0x9085, 0x0001, 0x002e,
-	0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091, 0x8000, 0x0026,
-	0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458, 0x00d6, 0x9190,
-	0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4, 0x904d,
-	0x0110, 0x080c, 0x101d, 0x00d6, 0x00c6, 0xb8ac, 0x2060, 0x8cff,
-	0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c, 0xbb17, 0x0110,
-	0x080c, 0x0f9d, 0x080c, 0x9e32, 0x00ce, 0x0c88, 0x00ce, 0x00de,
-	0x2b48, 0xb8b8, 0xb85e, 0xb8b4, 0xb862, 0x080c, 0x102d, 0x00de,
-	0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005, 0x0016, 0x9182,
-	0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188, 0x1000, 0x2104,
-	0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156, 0x0136,
-	0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c,
-	0x6fb2, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c, 0x9db1,
-	0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x1953,
-	0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a, 0x7054, 0x600e,
-	0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110, 0x2001, 0x0001,
-	0x6886, 0x2069, 0x1800, 0x68b2, 0x7040, 0xb85e, 0x7048, 0xb862,
-	0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8b4, 0x20e8,
-	0xb8b8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099,
-	0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069,
-	0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048,
-	0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0,
-	0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211, 0x1218,
-	0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218, 0x2009, 0x0007,
-	0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0, 0x9182,
-	0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182, 0x0421, 0x1218,
-	0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218, 0x2009, 0x0003,
-	0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e, 0x015e, 0x00de,
-	0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034, 0xb896,
-	0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbbc, 0xc384, 0xba00,
-	0x2009, 0x1873, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad,
-	0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc,
-	0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbbe,
-	0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x0126, 0x2091,
-	0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04,
-	0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906,
-	0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080,
-	0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002, 0x9086,
-	0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0db4, 0x3c00, 0x20e8,
-	0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce,
-	0x014e, 0x013e, 0x0060, 0x080c, 0x0feb, 0x0170, 0x2900, 0xb8a6,
-	0xa803, 0x0000, 0x080c, 0x63fa, 0xa807, 0x0001, 0xae12, 0x9085,
-	0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091,
-	0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005, 0x1150,
-	0x080c, 0x6409, 0x1158, 0xa804, 0x908a, 0x0002, 0x0218, 0x8001,
-	0xa806, 0x0020, 0x080c, 0x101d, 0xb8a7, 0x0000, 0x009e, 0x012e,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x840e, 0x012e, 0x0005,
-	0x901e, 0x0010, 0x2019, 0x0001, 0x900e, 0x0126, 0x2091, 0x8000,
-	0xb84c, 0x2048, 0xb800, 0xd0dc, 0x1170, 0x89ff, 0x0500, 0x83ff,
-	0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118,
-	0xa870, 0x9506, 0x0120, 0x2908, 0xa800, 0x2048, 0x0c70, 0x080c,
-	0x97b0, 0xaa00, 0xb84c, 0x9906, 0x1110, 0xba4e, 0x0020, 0x00a6,
-	0x2150, 0xb202, 0x00ae, 0x82ff, 0x1110, 0xb952, 0x89ff, 0x012e,
-	0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005, 0x080c,
-	0x645e, 0x0128, 0x080c, 0xbbd4, 0x0010, 0x9085, 0x0001, 0x0005,
-	0x080c, 0x645e, 0x0128, 0x080c, 0xbb79, 0x0010, 0x9085, 0x0001,
-	0x0005, 0x080c, 0x645e, 0x0128, 0x080c, 0xbbd1, 0x0010, 0x9085,
-	0x0001, 0x0005, 0x080c, 0x645e, 0x0128, 0x080c, 0xbb98, 0x0010,
-	0x9085, 0x0001, 0x0005, 0x080c, 0x645e, 0x0128, 0x080c, 0xbc15,
-	0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085,
-	0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
+	0x0001, 0x080c, 0x5c0a, 0x7097, 0x000e, 0x0029, 0x0010, 0x080c,
+	0x5c90, 0x00fe, 0x0005, 0x918d, 0x0001, 0x080c, 0x5cdf, 0x7097,
+	0x000f, 0x708f, 0x0000, 0x2061, 0x0140, 0x605b, 0xbc85, 0x605f,
+	0xb5b5, 0x2061, 0x0100, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009,
+	0x07d0, 0x2011, 0x5b43, 0x080c, 0x8015, 0x0005, 0x708c, 0x9005,
+	0x0130, 0x2011, 0x5b43, 0x080c, 0x8021, 0x7097, 0x0000, 0x0005,
+	0x7097, 0x0011, 0x080c, 0x9c4a, 0x080c, 0x5cb4, 0x20e1, 0x0000,
+	0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x748c, 0x9480,
+	0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x4003,
+	0x080c, 0x5c97, 0x11a0, 0x7178, 0x81ff, 0x0188, 0x900e, 0x707c,
+	0x9084, 0x00ff, 0x0160, 0x080c, 0x2665, 0x9186, 0x007e, 0x0138,
+	0x9186, 0x0080, 0x0120, 0x2011, 0x0008, 0x080c, 0x5af0, 0x60c3,
+	0x0014, 0x080c, 0x5b6d, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500,
+	0x2011, 0x5b43, 0x080c, 0x8021, 0x9086, 0x0014, 0x11b8, 0x080c,
+	0x5cb4, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834,
+	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110,
+	0x70c3, 0x0001, 0x7097, 0x0012, 0x0029, 0x0010, 0x708f, 0x0000,
+	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0013, 0x080c, 0x5c46, 0x2079,
+	0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5cb4, 0x080c,
+	0x5c97, 0x1170, 0x7080, 0x9005, 0x1158, 0x7158, 0x9186, 0xffff,
+	0x0138, 0x2011, 0x0008, 0x080c, 0x5af0, 0x0168, 0x080c, 0x5c6d,
+	0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
+	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b6d, 0x00fe,
+	0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b43, 0x080c,
+	0x8021, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cb4, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
+	0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097,
+	0x0014, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6,
+	0x7097, 0x0015, 0x080c, 0x5c46, 0x2079, 0x0240, 0x7833, 0x1104,
+	0x7837, 0x0000, 0x080c, 0x5cb4, 0x080c, 0x5c97, 0x11b8, 0x7080,
+	0x9005, 0x11a0, 0x7160, 0x9186, 0xffff, 0x0180, 0x9180, 0x313a,
+	0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5af0,
+	0x0180, 0x080c, 0x4ca1, 0x0110, 0x080c, 0x26ce, 0x20a9, 0x0008,
+	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
+	0x4003, 0x60c3, 0x0014, 0x080c, 0x5b6d, 0x00fe, 0x0005, 0x00f6,
+	0x708c, 0x9005, 0x05f0, 0x2011, 0x5b43, 0x080c, 0x8021, 0x9086,
+	0x0014, 0x15a8, 0x080c, 0x5cb4, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x1105, 0x1568, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e,
+	0x1168, 0x9085, 0x0001, 0x080c, 0x5cdf, 0x7a38, 0xd2fc, 0x0128,
+	0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x0080, 0x9005, 0x11b8,
+	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
+	0x9085, 0x0001, 0x080c, 0x5cdf, 0x7093, 0x0000, 0x7a38, 0xd2f4,
+	0x0110, 0x70db, 0x0008, 0x7097, 0x0016, 0x0029, 0x0010, 0x708f,
+	0x0000, 0x00fe, 0x0005, 0x080c, 0x9c4a, 0x080c, 0x5cb4, 0x20e1,
+	0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
+	0x000e, 0x4003, 0x2011, 0x026d, 0x2204, 0x9084, 0x0100, 0x2011,
+	0x024d, 0x2012, 0x2011, 0x026e, 0x7097, 0x0017, 0x080c, 0x5c97,
+	0x1150, 0x7080, 0x9005, 0x1138, 0x080c, 0x5a63, 0x1188, 0x9085,
+	0x0001, 0x080c, 0x26ce, 0x20a9, 0x0008, 0x080c, 0x5cb4, 0x20e1,
+	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003,
+	0x60c3, 0x0014, 0x080c, 0x5b6d, 0x0010, 0x080c, 0x55bd, 0x0005,
+	0x00f6, 0x708c, 0x9005, 0x01d8, 0x2011, 0x5b43, 0x080c, 0x8021,
+	0x9086, 0x0084, 0x1190, 0x080c, 0x5cb4, 0x2079, 0x0260, 0x7a30,
+	0x9296, 0x1106, 0x1150, 0x7834, 0x9005, 0x1138, 0x9006, 0x080c,
+	0x5cdf, 0x7097, 0x0018, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe,
+	0x0005, 0x00f6, 0x7097, 0x0019, 0x080c, 0x5c46, 0x2079, 0x0240,
+	0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5cb4, 0x2009, 0x026e,
+	0x2039, 0x1c0e, 0x20a9, 0x0040, 0x213e, 0x8738, 0x8108, 0x9186,
+	0x0280, 0x1128, 0x6814, 0x8000, 0x6816, 0x2009, 0x0260, 0x1f04,
+	0x59cc, 0x2039, 0x1c0e, 0x080c, 0x5c97, 0x11e8, 0x2728, 0x2514,
+	0x8207, 0x9084, 0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff, 0x8007,
+	0x9205, 0x202a, 0x705c, 0x2310, 0x8214, 0x92a0, 0x1c0e, 0x2414,
+	0x938c, 0x0001, 0x0118, 0x9294, 0xff00, 0x0018, 0x9294, 0x00ff,
+	0x8007, 0x9215, 0x2222, 0x20a9, 0x0040, 0x2009, 0x024e, 0x270e,
+	0x8738, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812,
+	0x2009, 0x0240, 0x1f04, 0x59ff, 0x60c3, 0x0084, 0x080c, 0x5b6d,
+	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011, 0x5b43,
+	0x080c, 0x8021, 0x9086, 0x0084, 0x1198, 0x080c, 0x5cb4, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140,
+	0x7093, 0x0001, 0x080c, 0x5c0a, 0x7097, 0x001a, 0x0029, 0x0010,
+	0x708f, 0x0000, 0x00fe, 0x0005, 0x9085, 0x0001, 0x080c, 0x5cdf,
+	0x7097, 0x001b, 0x080c, 0x9c4a, 0x080c, 0x5cb4, 0x2011, 0x0260,
+	0x2009, 0x0240, 0x748c, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084,
+	0x03f8, 0x8004, 0x20a8, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260,
+	0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000,
+	0x6816, 0x2011, 0x0260, 0x1f04, 0x5a4b, 0x60c3, 0x0084, 0x080c,
+	0x5b6d, 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0x1854, 0x252c,
+	0x20a9, 0x0008, 0x2041, 0x1c0e, 0x20e9, 0x0001, 0x28a0, 0x080c,
+	0x5cb4, 0x20e1, 0x0000, 0x2099, 0x026e, 0x4003, 0x20a9, 0x0008,
+	0x2011, 0x0007, 0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200, 0x200c,
+	0x91a6, 0xffff, 0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008, 0x8211,
+	0x1f04, 0x5a7d, 0x0804, 0x5aec, 0x82ff, 0x1160, 0xd5d4, 0x0120,
+	0x91a6, 0x3fff, 0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904, 0x5aec,
+	0x918d, 0xc000, 0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4, 0x0110,
+	0x2019, 0x0010, 0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008, 0x8424,
+	0x1240, 0xd5d4, 0x0110, 0x8319, 0x0008, 0x8318, 0x1f04, 0x5aa3,
+	0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426, 0x8425, 0x1f04, 0x5ab5,
+	0x2328, 0x8529, 0x92be, 0x0007, 0x0158, 0x0006, 0x2039, 0x0007,
+	0x2200, 0x973a, 0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04, 0x5ac4,
+	0x755a, 0x95c8, 0x313a, 0x292d, 0x95ac, 0x00ff, 0x757e, 0x6532,
+	0x6536, 0x0016, 0x2508, 0x080c, 0x26ae, 0x001e, 0x60e7, 0x0000,
+	0x65ea, 0x2018, 0x2304, 0x9405, 0x201a, 0x7083, 0x0001, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9, 0x0008,
+	0x4003, 0x9085, 0x0001, 0x0008, 0x9006, 0x009e, 0x008e, 0x0005,
+	0x0156, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1, 0x0000,
+	0x2099, 0x026e, 0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0, 0x4003,
+	0x014e, 0x013e, 0x01de, 0x01ce, 0x015e, 0x2118, 0x9026, 0x2001,
+	0x0007, 0x939a, 0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0, 0x2118,
+	0x84ff, 0x0120, 0x939a, 0x0010, 0x8421, 0x1de0, 0x2021, 0x0001,
+	0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8, 0x9238, 0x2029, 0x026e,
+	0x9528, 0x2504, 0x942c, 0x11b8, 0x9405, 0x203a, 0x715a, 0x91a0,
+	0x313a, 0x242d, 0x95ac, 0x00ff, 0x757e, 0x6532, 0x6536, 0x0016,
+	0x2508, 0x080c, 0x26ae, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x7083,
+	0x0001, 0x9084, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7087,
+	0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, 0x2071,
+	0x0140, 0x080c, 0x5bf9, 0x080c, 0x93ad, 0x7004, 0x9084, 0x4000,
+	0x0110, 0x080c, 0x2b26, 0x0126, 0x2091, 0x8000, 0x2071, 0x1825,
+	0x2073, 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7, 0x080c,
+	0x5c56, 0x001e, 0x9094, 0x0010, 0x9285, 0x0080, 0x7842, 0x7a42,
+	0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x29cc, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012,
+	0x2011, 0x19c1, 0x2013, 0x0000, 0x708f, 0x0000, 0x012e, 0x60a3,
+	0x0056, 0x60a7, 0x9575, 0x080c, 0x93a4, 0x6144, 0xd184, 0x0120,
+	0x7194, 0x918d, 0x2000, 0x0018, 0x7188, 0x918d, 0x1000, 0x2011,
+	0x1969, 0x2112, 0x2009, 0x07d0, 0x2011, 0x5b43, 0x080c, 0x80b3,
+	0x0005, 0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x9dc8, 0x2009, 0x00f7, 0x080c, 0x5c56, 0x2061, 0x19ca, 0x900e,
+	0x611a, 0x611e, 0x6172, 0x6176, 0x2061, 0x1800, 0x6003, 0x0001,
+	0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1969,
+	0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5bc5, 0x080c, 0x8015,
+	0x012e, 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x0471, 0x2071, 0x0100, 0x080c, 0x93ad, 0x2071,
+	0x0140, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2b26, 0x080c,
+	0x6fa3, 0x0188, 0x080c, 0x6fbe, 0x1170, 0x080c, 0x7289, 0x0016,
+	0x080c, 0x277d, 0x2001, 0x193d, 0x2102, 0x001e, 0x080c, 0x7284,
+	0x080c, 0x6ecd, 0x0050, 0x2009, 0x0001, 0x080c, 0x2a65, 0x2001,
+	0x0001, 0x080c, 0x260e, 0x080c, 0x5b99, 0x012e, 0x000e, 0x00ee,
+	0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158, 0x0026, 0x0036,
+	0x2011, 0x8017, 0x2001, 0x1969, 0x201c, 0x080c, 0x48e9, 0x003e,
+	0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001, 0x20a1, 0x1c80,
+	0x080c, 0x5cb4, 0x20e9, 0x0000, 0x2099, 0x026e, 0x0099, 0x20a9,
+	0x0020, 0x080c, 0x5cae, 0x2099, 0x0260, 0x20a1, 0x1c92, 0x0051,
+	0x20a9, 0x000e, 0x080c, 0x5cb1, 0x2099, 0x0260, 0x20a1, 0x1cb2,
+	0x0009, 0x0005, 0x0016, 0x0026, 0x3410, 0x3308, 0x2104, 0x8007,
+	0x2012, 0x8108, 0x8210, 0x1f04, 0x5c2e, 0x002e, 0x001e, 0x0005,
+	0x080c, 0x9c4a, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000,
+	0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x080c, 0x9c4a,
+	0x080c, 0x5cb4, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000,
+	0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x00c6, 0x0006,
+	0x2061, 0x0100, 0x810f, 0x2001, 0x1833, 0x2004, 0x9005, 0x1138,
+	0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x9105, 0x0010, 0x9185,
+	0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016, 0x0046, 0x080c,
+	0x6567, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xd54b,
+	0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x900e,
+	0x080c, 0x2fa7, 0x080c, 0xc22c, 0x0140, 0x0036, 0x2019, 0xffff,
+	0x2021, 0x0007, 0x080c, 0x4a86, 0x003e, 0x004e, 0x001e, 0x0005,
+	0x080c, 0x5b99, 0x7097, 0x0000, 0x708f, 0x0000, 0x0005, 0x0006,
+	0x2001, 0x180c, 0x2004, 0xd09c, 0x0100, 0x000e, 0x0005, 0x0006,
+	0x0016, 0x0126, 0x2091, 0x8000, 0x2001, 0x0101, 0x200c, 0x918d,
+	0x0006, 0x2102, 0x012e, 0x001e, 0x000e, 0x0005, 0x2009, 0x0001,
+	0x0020, 0x2009, 0x0002, 0x0008, 0x900e, 0x6814, 0x9084, 0xffc0,
+	0x910d, 0x6916, 0x0005, 0x00f6, 0x0156, 0x0146, 0x01d6, 0x9006,
+	0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1, 0x1c00, 0x4004, 0x2079,
+	0x1c00, 0x7803, 0x2200, 0x7807, 0x00ef, 0x780f, 0x00ef, 0x7813,
+	0x0138, 0x7823, 0xffff, 0x7827, 0xffff, 0x01de, 0x014e, 0x015e,
+	0x00fe, 0x0005, 0x2001, 0x1800, 0x2003, 0x0001, 0x0005, 0x2001,
+	0x1976, 0x0118, 0x2003, 0x0001, 0x0010, 0x2003, 0x0000, 0x0005,
+	0x0156, 0x20a9, 0x0800, 0x2009, 0x1000, 0x9006, 0x200a, 0x8108,
+	0x1f04, 0x5cee, 0x015e, 0x0005, 0x00d6, 0x0036, 0x0156, 0x0136,
+	0x0146, 0x2069, 0x1853, 0x9006, 0xb802, 0xb8be, 0xb807, 0x0707,
+	0xb80a, 0xb80e, 0xb812, 0x9198, 0x313a, 0x231d, 0x939c, 0x00ff,
+	0xbb16, 0x0016, 0x0026, 0xb8b2, 0x080c, 0x9dc1, 0x1120, 0x9192,
+	0x007e, 0x1208, 0xbbb2, 0x20a9, 0x0004, 0xb8b4, 0x20e8, 0xb9b8,
+	0x9198, 0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9, 0x0004, 0x9198,
+	0x000a, 0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e, 0xb842, 0xb84e,
+	0xb852, 0xb856, 0xb85a, 0xb85e, 0xb862, 0xb866, 0xb86a, 0xb86f,
+	0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893, 0x0008,
+	0xb896, 0xb89a, 0xb89e, 0xb8ae, 0xb9a2, 0x0096, 0xb8a4, 0x904d,
+	0x0110, 0x080c, 0x101d, 0xb8a7, 0x0000, 0x009e, 0x9006, 0xb84a,
+	0x6810, 0xb83a, 0x680c, 0xb846, 0x6814, 0x9084, 0x00ff, 0xb842,
+	0x014e, 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, 0x2091,
+	0x8000, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04,
+	0x5dc4, 0x9182, 0x0800, 0x1a04, 0x5dc8, 0x2001, 0x180c, 0x2004,
+	0x9084, 0x0003, 0x1904, 0x5dce, 0x9188, 0x1000, 0x2104, 0x905d,
+	0x0518, 0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1508, 0xb8a4,
+	0x900d, 0x1904, 0x5de0, 0xb850, 0x900d, 0x1148, 0xa802, 0x2900,
+	0xb852, 0xb84e, 0x080c, 0x83f7, 0x9006, 0x012e, 0x0005, 0x00a6,
+	0x2150, 0x2900, 0xb002, 0xa803, 0x0000, 0x00ae, 0xb852, 0x0c90,
+	0x2001, 0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e, 0x0498,
+	0x9082, 0x0006, 0x1290, 0x080c, 0x9dc1, 0x1160, 0xb8a0, 0x9084,
+	0xff80, 0x1140, 0xb900, 0xd1fc, 0x0990, 0x2001, 0x0029, 0x2009,
+	0x1000, 0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c, 0x210c,
+	0xd18c, 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118, 0x2001,
+	0x0004, 0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118, 0x2009,
+	0x1000, 0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
+	0x2001, 0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001, 0x180c,
+	0x2004, 0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x905d, 0x09a8,
+	0x080c, 0x656b, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804, 0x5d77,
+	0x080c, 0x63e3, 0x0904, 0x5d90, 0x0804, 0x5d7b, 0x00b6, 0x00e6,
+	0x0126, 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04, 0x5e61,
+	0x9188, 0x1000, 0x2104, 0x905d, 0x0904, 0x5e39, 0xb8a0, 0x9086,
+	0x007f, 0x0178, 0x080c, 0x6573, 0x0160, 0xa994, 0x81ff, 0x0130,
+	0x908e, 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x080c, 0x656b,
+	0x1598, 0xa87c, 0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8, 0x2060,
+	0x0026, 0x2010, 0x080c, 0xbb1a, 0x002e, 0x1120, 0x2001, 0x0008,
+	0x0804, 0x5e63, 0x6020, 0x9086, 0x000a, 0x0120, 0x2001, 0x0008,
+	0x0804, 0x5e63, 0x601a, 0x6003, 0x0008, 0x2900, 0x6016, 0x0058,
+	0x080c, 0x9dec, 0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016, 0x600b,
+	0xffff, 0x6023, 0x000a, 0x2009, 0x0003, 0x080c, 0x9ebc, 0x9006,
+	0x0458, 0x2001, 0x0028, 0x0438, 0x9082, 0x0006, 0x1290, 0x080c,
+	0x9dc1, 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc,
+	0x0900, 0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, 0x2001, 0x0028,
+	0x0090, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004,
+	0x0050, 0xd184, 0x0118, 0x2001, 0x0004, 0x0028, 0x2001, 0x0029,
+	0x0010, 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005,
+	0x2001, 0x002c, 0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091, 0x8000,
+	0xa8e0, 0x9005, 0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630, 0xa8c8,
+	0x9005, 0x1518, 0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974, 0x2079,
+	0x1800, 0x9182, 0x0800, 0x12e8, 0x7830, 0x9084, 0x0003, 0x1130,
+	0xaa98, 0xab94, 0xa878, 0x9084, 0x0007, 0x00ea, 0x7930, 0xd18c,
+	0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004,
+	0x0010, 0x2001, 0x0029, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e,
+	0x0018, 0x2001, 0x0029, 0x900e, 0x9006, 0x0008, 0x9005, 0x012e,
+	0x00be, 0x00fe, 0x0005, 0x5ef8, 0x5eb3, 0x5eca, 0x5ef8, 0x5ef8,
+	0x5ef8, 0x5ef8, 0x5ef8, 0x2100, 0x9082, 0x007e, 0x1278, 0x080c,
+	0x61e7, 0x0148, 0x9046, 0xb810, 0x9306, 0x1904, 0x5f00, 0xb814,
+	0x9206, 0x15f0, 0x0028, 0xbb12, 0xba16, 0x0010, 0x080c, 0x47a3,
+	0x0150, 0x04b0, 0x080c, 0x6247, 0x1598, 0xb810, 0x9306, 0x1580,
+	0xb814, 0x9206, 0x1568, 0x080c, 0x9dec, 0x0530, 0x2b00, 0x6012,
+	0x080c, 0xbfa6, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a,
+	0xa878, 0x9086, 0x0001, 0x1170, 0x080c, 0x2fdc, 0x9006, 0x080c,
+	0x6184, 0x2001, 0x0002, 0x080c, 0x6198, 0x2001, 0x0200, 0xb86e,
+	0xb893, 0x0002, 0x2009, 0x0003, 0x080c, 0x9ebc, 0x9006, 0x0068,
+	0x2001, 0x0001, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018,
+	0x2001, 0x0028, 0x900e, 0x9005, 0x0000, 0x012e, 0x00be, 0x00fe,
+	0x0005, 0x00b6, 0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa894,
+	0x90c6, 0x0015, 0x0904, 0x60d5, 0x90c6, 0x0056, 0x0904, 0x60d9,
+	0x90c6, 0x0066, 0x0904, 0x60dd, 0x90c6, 0x0067, 0x0904, 0x60e1,
+	0x90c6, 0x0068, 0x0904, 0x60e5, 0x90c6, 0x0071, 0x0904, 0x60e9,
+	0x90c6, 0x0074, 0x0904, 0x60ed, 0x90c6, 0x007c, 0x0904, 0x60f1,
+	0x90c6, 0x007e, 0x0904, 0x60f5, 0x90c6, 0x0037, 0x0904, 0x60f9,
+	0x9016, 0x2079, 0x1800, 0xa974, 0x9186, 0x00ff, 0x0904, 0x60d0,
+	0x9182, 0x0800, 0x1a04, 0x60d0, 0x080c, 0x6247, 0x1198, 0xb804,
+	0x9084, 0x00ff, 0x9082, 0x0006, 0x1268, 0xa894, 0x90c6, 0x006f,
+	0x0148, 0x080c, 0x9dc1, 0x1904, 0x60b9, 0xb8a0, 0x9084, 0xff80,
+	0x1904, 0x60b9, 0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6, 0x005e,
+	0x0904, 0x6019, 0x90c6, 0x0064, 0x0904, 0x6042, 0x2008, 0x0804,
+	0x5fdc, 0xa998, 0xa8b0, 0x2040, 0x080c, 0x9dc1, 0x1120, 0x9182,
+	0x007f, 0x0a04, 0x5fdc, 0x9186, 0x00ff, 0x0904, 0x5fdc, 0x9182,
+	0x0800, 0x1a04, 0x5fdc, 0xaaa0, 0xab9c, 0x7878, 0x9306, 0x1188,
+	0x787c, 0x0096, 0x924e, 0x1128, 0x2208, 0x2310, 0x009e, 0x0804,
+	0x5fdc, 0x99cc, 0xff00, 0x009e, 0x1120, 0x2208, 0x2310, 0x0804,
+	0x5fdc, 0x080c, 0x47a3, 0x0904, 0x5fe5, 0x900e, 0x9016, 0x90c6,
+	0x4000, 0x1558, 0x0006, 0x080c, 0x6467, 0x1108, 0xc185, 0xb800,
+	0xd0bc, 0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0031, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006,
+	0x2098, 0x080c, 0x0f68, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0035, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a,
+	0x2098, 0x080c, 0x0f68, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110,
+	0x2408, 0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070,
+	0x90c6, 0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001,
+	0x4005, 0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a,
+	0xaa9e, 0x2001, 0x0030, 0x900e, 0x0470, 0x080c, 0x9dec, 0x1130,
+	0x2001, 0x4005, 0x2009, 0x0003, 0x9016, 0x0c80, 0x2b00, 0x6012,
+	0x080c, 0xbfa6, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c,
+	0x0108, 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x2fdc,
+	0x012e, 0x9006, 0x080c, 0x6184, 0x2001, 0x0002, 0x080c, 0x6198,
+	0x2009, 0x0002, 0x080c, 0x9ebc, 0xa8b0, 0xd094, 0x0118, 0xb8bc,
+	0xc08d, 0xb8be, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be,
+	0x0005, 0x080c, 0x53a3, 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998,
+	0xaeb0, 0x080c, 0x6247, 0x1904, 0x5fd7, 0x9186, 0x007f, 0x0130,
+	0x080c, 0x656b, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096, 0x080c,
+	0x0feb, 0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900, 0x009e,
+	0xa806, 0x080c, 0xbd12, 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005,
+	0x0804, 0x5fde, 0xa998, 0xaeb0, 0x080c, 0x6247, 0x1904, 0x5fd7,
+	0x0096, 0x080c, 0x0feb, 0x1128, 0x009e, 0x2009, 0x0002, 0x0804,
+	0x6096, 0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b,
+	0xb8b4, 0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0,
+	0xbbb8, 0x9398, 0x0006, 0x2398, 0x080c, 0x0f68, 0x009e, 0xa87b,
+	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168, 0x080c,
+	0x538f, 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c,
+	0x0118, 0xa89b, 0x000c, 0x00b0, 0x080c, 0x656b, 0x0118, 0xa89b,
+	0x0009, 0x0080, 0x080c, 0x53a3, 0x0118, 0xa89b, 0x0007, 0x0050,
+	0x080c, 0xbcf5, 0x1904, 0x6012, 0x2009, 0x0003, 0x2001, 0x4005,
+	0x0804, 0x5fde, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804, 0x8006,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002,
+	0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000,
+	0x2041, 0x122f, 0x080c, 0xa345, 0x1904, 0x6012, 0x2009, 0x0002,
+	0x08e8, 0x2001, 0x0028, 0x900e, 0x0804, 0x6013, 0x2009, 0x180c,
+	0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118,
+	0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804, 0x6013,
+	0x2001, 0x0029, 0x900e, 0x0804, 0x6013, 0x080c, 0x3569, 0x0804,
+	0x6014, 0x080c, 0x50cc, 0x0804, 0x6014, 0x080c, 0x4339, 0x0804,
+	0x6014, 0x080c, 0x43b2, 0x0804, 0x6014, 0x080c, 0x440e, 0x0804,
+	0x6014, 0x080c, 0x485f, 0x0804, 0x6014, 0x080c, 0x4b04, 0x0804,
+	0x6014, 0x080c, 0x4d37, 0x0804, 0x6014, 0x080c, 0x4f30, 0x0804,
+	0x6014, 0x080c, 0x3779, 0x0804, 0x6014, 0x00b6, 0xa974, 0xae78,
+	0x9684, 0x3fff, 0x9082, 0x4000, 0x1618, 0x9182, 0x0800, 0x1268,
+	0x9188, 0x1000, 0x2104, 0x905d, 0x0140, 0x080c, 0x656b, 0x1148,
+	0x00e9, 0x080c, 0x6372, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e,
+	0x0090, 0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d88, 0x2001,
+	0x0029, 0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
+	0x2001, 0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0x0126, 0x2091,
+	0x8000, 0xb850, 0x900d, 0x0150, 0x2900, 0x0096, 0x2148, 0xa802,
+	0x009e, 0xa803, 0x0000, 0xb852, 0x012e, 0x0005, 0x2900, 0xb852,
+	0xb84e, 0xa803, 0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000, 0xb84c,
+	0x9005, 0x0170, 0x00e6, 0x2071, 0x19b7, 0x7004, 0x9086, 0x0002,
+	0x0168, 0x00ee, 0xb84c, 0xa802, 0x2900, 0xb84e, 0x012e, 0x0005,
+	0x2900, 0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x701c, 0x9b06,
+	0x1d80, 0xb84c, 0x00a6, 0x2050, 0xb000, 0xa802, 0x2900, 0xb002,
+	0x00ae, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0xb84c,
+	0x904d, 0x0130, 0xa800, 0x9005, 0x1108, 0xb852, 0xb84e, 0x9905,
+	0x012e, 0x0005, 0xb84c, 0x904d, 0x0130, 0xa800, 0x9005, 0x1108,
+	0xb852, 0xb84e, 0x9905, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026,
+	0x2091, 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285,
+	0x0008, 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005,
+	0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04,
+	0x0006, 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c,
+	0x6567, 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110,
+	0x2011, 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006,
+	0x9086, 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0db4, 0x000e,
+	0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091,
+	0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168,
+	0xb89c, 0xd0a4, 0x0150, 0x080c, 0x6563, 0x1138, 0x9284, 0x00ff,
+	0x9086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff,
+	0x8007, 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182,
+	0x0800, 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190,
+	0x1000, 0x2204, 0x905d, 0x1180, 0x0096, 0x080c, 0x0feb, 0x2958,
+	0x009e, 0x0160, 0x2b00, 0x2012, 0xb85c, 0xb8ba, 0xb860, 0xb8b6,
+	0x9006, 0xb8a6, 0x080c, 0x5cf4, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091, 0x8000,
+	0x0026, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458, 0x00d6,
+	0x9190, 0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4,
+	0x904d, 0x0110, 0x080c, 0x101d, 0x00d6, 0x00c6, 0xb8ac, 0x2060,
+	0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c, 0xbb2c,
+	0x0110, 0x080c, 0x0f9d, 0x080c, 0x9e42, 0x00ce, 0x0c88, 0x00ce,
+	0x00de, 0x2b48, 0xb8b8, 0xb85e, 0xb8b4, 0xb862, 0x080c, 0x102d,
+	0x00de, 0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005, 0x0016,
+	0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188, 0x1000,
+	0x2104, 0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156,
+	0x0136, 0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802,
+	0x080c, 0x6f9b, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c,
+	0x9dc1, 0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061,
+	0x1952, 0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a, 0x7054,
+	0x600e, 0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110, 0x2001,
+	0x0001, 0x6886, 0x2069, 0x1800, 0x68b2, 0x7040, 0xb85e, 0x7048,
+	0xb862, 0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8b4,
+	0x20e8, 0xb8b8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003,
+	0x2099, 0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003,
+	0x2069, 0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e,
+	0x7048, 0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817, 0x0000,
+	0xb8a0, 0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211,
+	0x1218, 0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218, 0x2009,
+	0x0007, 0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0,
+	0x9182, 0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182, 0x0421,
+	0x1218, 0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218, 0x2009,
+	0x0003, 0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e, 0x015e,
+	0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034,
+	0xb896, 0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbbc, 0xc384,
+	0xba00, 0x2009, 0x1873, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110,
+	0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd,
+	0xd0cc, 0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02,
+	0xbbbe, 0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x0126,
+	0x2091, 0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0,
+	0xaa04, 0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6,
+	0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0,
+	0x9080, 0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002,
+	0x9086, 0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0db4, 0x3c00,
+	0x20e8, 0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de,
+	0x01ce, 0x014e, 0x013e, 0x0060, 0x080c, 0x0feb, 0x0170, 0x2900,
+	0xb8a6, 0xa803, 0x0000, 0x080c, 0x6403, 0xa807, 0x0001, 0xae12,
+	0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126,
+	0x2091, 0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005,
+	0x1150, 0x080c, 0x6412, 0x1158, 0xa804, 0x908a, 0x0002, 0x0218,
+	0x8001, 0xa806, 0x0020, 0x080c, 0x101d, 0xb8a7, 0x0000, 0x009e,
+	0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x83f7, 0x012e,
+	0x0005, 0x901e, 0x0010, 0x2019, 0x0001, 0x900e, 0x0126, 0x2091,
+	0x8000, 0xb84c, 0x2048, 0xb800, 0xd0dc, 0x1170, 0x89ff, 0x0500,
+	0x83ff, 0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406,
+	0x1118, 0xa870, 0x9506, 0x0120, 0x2908, 0xa800, 0x2048, 0x0c70,
+	0x080c, 0x97b1, 0xaa00, 0xb84c, 0x9906, 0x1110, 0xba4e, 0x0020,
+	0x00a6, 0x2150, 0xb202, 0x00ae, 0x82ff, 0x1110, 0xb952, 0x89ff,
+	0x012e, 0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005,
+	0x080c, 0x6467, 0x0128, 0x080c, 0xbbe9, 0x0010, 0x9085, 0x0001,
+	0x0005, 0x080c, 0x6467, 0x0128, 0x080c, 0xbb8e, 0x0010, 0x9085,
+	0x0001, 0x0005, 0x080c, 0x6467, 0x0128, 0x080c, 0xbbe6, 0x0010,
+	0x9085, 0x0001, 0x0005, 0x080c, 0x6467, 0x0128, 0x080c, 0xbbad,
+	0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6467, 0x0128, 0x080c,
+	0xbc2a, 0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118,
+	0x9085, 0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8,
+	0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0,
+	0x9080, 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002,
+	0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006,
+	0x01ce, 0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104,
+	0x01de, 0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
 	0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080,
 	0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606,
-	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006, 0x01ce,
-	0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104, 0x01de,
-	0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e,
-	0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004,
-	0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128,
-	0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6, 0x3300,
-	0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004, 0x01de,
-	0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126, 0x2091,
-	0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x0feb, 0x0168, 0x2900,
-	0xb8a6, 0x080c, 0x63fa, 0xa803, 0x0001, 0xa807, 0x0000, 0x9085,
-	0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126,
-	0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c,
-	0x101d, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4,
-	0x0005, 0x00b6, 0x00f6, 0x080c, 0x6fb2, 0x01b0, 0x71c0, 0x81ff,
-	0x1198, 0x71d8, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080, 0x1000,
-	0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
-	0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1853, 0x7804, 0x00d0,
-	0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x623e, 0x1168,
-	0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118, 0x9086,
-	0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108, 0x1f04,
-	0x6484, 0x015e, 0x080c, 0x6520, 0x0120, 0x2001, 0x1956, 0x200c,
-	0x0030, 0x2079, 0x1853, 0x7804, 0x0030, 0x2009, 0x07d0, 0x2011,
-	0x64ae, 0x080c, 0x80ca, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x2011,
-	0x64ae, 0x080c, 0x8038, 0x080c, 0x6520, 0x01d8, 0x2001, 0x107e,
-	0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c, 0x655e, 0x0130,
-	0x2009, 0x07d0, 0x2011, 0x64ae, 0x080c, 0x80ca, 0x00e6, 0x2071,
-	0x1800, 0x9006, 0x707a, 0x705c, 0x707e, 0x080c, 0x2dbb, 0x00ee,
-	0x04b0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c,
-	0x623e, 0x1538, 0xb800, 0xd0ec, 0x0520, 0x0046, 0xbaa0, 0x2220,
-	0x9006, 0x2009, 0x0029, 0x080c, 0xd52a, 0xb800, 0xc0e5, 0xc0ec,
-	0xb802, 0x080c, 0x655a, 0x2001, 0x0707, 0x1128, 0xb804, 0x9084,
-	0x00ff, 0x9085, 0x0700, 0xb806, 0x2019, 0x0029, 0x080c, 0x8571,
-	0x0076, 0x903e, 0x080c, 0x8469, 0x900e, 0x080c, 0xd29b, 0x007e,
-	0x004e, 0x001e, 0x8108, 0x1f04, 0x64d6, 0x00ce, 0x015e, 0x00be,
-	0x0005, 0x00b6, 0x6010, 0x2058, 0xb800, 0xc0ec, 0xb802, 0x00be,
-	0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ac, 0x0005,
-	0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be, 0xd0bc, 0x0005,
-	0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110, 0xb800,
-	0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091, 0x8000,
-	0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c, 0x0db4,
-	0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, 0xba02,
-	0x002e, 0x012e, 0x0005, 0x2011, 0x1836, 0x2204, 0xd0cc, 0x0138,
-	0x2001, 0x1954, 0x200c, 0x2011, 0x6550, 0x080c, 0x80ca, 0x0005,
-	0x2011, 0x6550, 0x080c, 0x8038, 0x2011, 0x1836, 0x2204, 0xc0cc,
-	0x2012, 0x0005, 0x080c, 0x5386, 0xd0ac, 0x0005, 0x080c, 0x5386,
-	0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e, 0x0006,
-	0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007, 0x908e,
-	0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xc212, 0x0158,
-	0x70d8, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004, 0x905d,
-	0x0110, 0xb8bc, 0xd094, 0x00fe, 0x00be, 0x0005, 0x0006, 0x0016,
-	0x0036, 0x0046, 0x0076, 0x00b6, 0x2001, 0x1817, 0x203c, 0x9780,
-	0x3138, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2018, 0x2008,
-	0x9284, 0x8000, 0x0110, 0x2019, 0x0001, 0x9294, 0x7fff, 0x2100,
-	0x9706, 0x0190, 0x91a0, 0x1000, 0x2404, 0x905d, 0x0168, 0xb804,
-	0x9084, 0x00ff, 0x9086, 0x0006, 0x1138, 0x83ff, 0x0118, 0xb89c,
-	0xd0a4, 0x0110, 0x8211, 0x0158, 0x8108, 0x83ff, 0x0120, 0x9182,
-	0x0800, 0x0e28, 0x0068, 0x9182, 0x007e, 0x0e08, 0x0048, 0x00be,
-	0x007e, 0x004e, 0x003e, 0x001e, 0x9085, 0x0001, 0x000e, 0x0005,
-	0x00be, 0x007e, 0x004e, 0x003e, 0x001e, 0x9006, 0x000e, 0x0005,
-	0x0046, 0x0056, 0x0076, 0x00b6, 0x2100, 0x9084, 0x7fff, 0x9080,
-	0x1000, 0x2004, 0x905d, 0x0130, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x0550, 0x9184, 0x8000, 0x0580, 0x2001, 0x1817, 0x203c,
-	0x9780, 0x3138, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2020,
-	0x2400, 0x9706, 0x01a0, 0x94a8, 0x1000, 0x2504, 0x905d, 0x0178,
-	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1148, 0xb89c, 0xd0a4,
-	0x0130, 0xb814, 0x9206, 0x1118, 0xb810, 0x9306, 0x0128, 0x8420,
-	0x9482, 0x0800, 0x0e28, 0x0048, 0x918c, 0x7fff, 0x00be, 0x007e,
-	0x005e, 0x004e, 0x9085, 0x0001, 0x0005, 0x918c, 0x7fff, 0x00be,
-	0x007e, 0x005e, 0x004e, 0x9006, 0x0005, 0x2071, 0x1906, 0x7003,
-	0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016, 0x701a, 0x701e,
-	0x700a, 0x7046, 0x2001, 0x1919, 0x2003, 0x0000, 0x0005, 0x0016,
-	0x00e6, 0x2071, 0x191a, 0x900e, 0x710a, 0x080c, 0x5386, 0xd0fc,
-	0x1140, 0x080c, 0x5386, 0x900e, 0xd09c, 0x0108, 0x8108, 0x7102,
-	0x0400, 0x2001, 0x1873, 0x200c, 0x9184, 0x0007, 0x9006, 0x0002,
-	0x6639, 0x6639, 0x6639, 0x6639, 0x6639, 0x6650, 0x665e, 0x6639,
-	0x7003, 0x0003, 0x2009, 0x1874, 0x210c, 0x9184, 0xff00, 0x8007,
-	0x9005, 0x1110, 0x2001, 0x0002, 0x7006, 0x0018, 0x7003, 0x0005,
-	0x0c88, 0x00ee, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0050, 0x684c,
-	0x9005, 0x1150, 0x00e6, 0x2071, 0x1906, 0x7028, 0xc085, 0x702a,
-	0x00ee, 0x9085, 0x0001, 0x0488, 0x6844, 0x9005, 0x0158, 0x080c,
-	0x7308, 0x6a60, 0x9200, 0x7002, 0x6864, 0x9101, 0x7006, 0x9006,
-	0x7012, 0x7016, 0x6860, 0x7002, 0x6864, 0x7006, 0x6868, 0x700a,
-	0x686c, 0x700e, 0x6844, 0x9005, 0x1110, 0x7012, 0x7016, 0x684c,
-	0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x7037, 0x0019, 0x702b,
-	0x0001, 0x00e6, 0x2071, 0x1906, 0x7028, 0xc084, 0x702a, 0x7007,
-	0x0001, 0x700b, 0x0000, 0x00ee, 0x9006, 0x00ee, 0x0005, 0xa868,
-	0xd0fc, 0x11d8, 0x00e6, 0x0026, 0x2001, 0x191a, 0x2004, 0x9005,
-	0x0904, 0x6891, 0xa87c, 0xd0bc, 0x1904, 0x6891, 0xa978, 0xa874,
-	0x9105, 0x1904, 0x6891, 0x2001, 0x191a, 0x2004, 0x0002, 0x6891,
-	0x66ea, 0x6726, 0x6726, 0x6891, 0x6726, 0x0005, 0xa868, 0xd0fc,
-	0x1500, 0x00e6, 0x0026, 0x2009, 0x191a, 0x210c, 0x81ff, 0x0904,
-	0x6891, 0xa87c, 0xd0cc, 0x0904, 0x6891, 0xa880, 0x9084, 0x00ff,
-	0x9086, 0x0001, 0x1904, 0x6891, 0x9186, 0x0003, 0x0904, 0x6726,
-	0x9186, 0x0005, 0x0904, 0x6726, 0xa84f, 0x8021, 0xa853, 0x0017,
-	0x0028, 0x0005, 0xa84f, 0x8020, 0xa853, 0x0016, 0x2071, 0x1906,
-	0x701c, 0x9005, 0x1904, 0x6a51, 0x0e04, 0x6a9c, 0x2071, 0x0000,
-	0xa84c, 0x7082, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870,
-	0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x1187, 0x2071, 0x1800, 0x2011, 0x0001, 0xa804, 0x900d, 0x702c,
-	0x1158, 0xa802, 0x2900, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c,
-	0x7f5d, 0x002e, 0x00ee, 0x0005, 0x0096, 0x2148, 0xa904, 0xa802,
-	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000,
-	0x00f6, 0x2079, 0x0050, 0x2071, 0x1906, 0xa803, 0x0000, 0x7010,
-	0x9005, 0x1904, 0x6815, 0x782c, 0x908c, 0x0780, 0x190c, 0x6bc3,
-	0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x6744, 0x6815,
-	0x6769, 0x67b0, 0x080c, 0x0db4, 0x2071, 0x1800, 0x2900, 0x7822,
-	0xa804, 0x900d, 0x1170, 0x2071, 0x19cb, 0x703c, 0x9005, 0x1328,
-	0x2001, 0x191b, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f5d,
-	0x0c10, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1580,
-	0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009,
-	0x182f, 0x210c, 0x918a, 0x0040, 0x0218, 0x7022, 0x00ee, 0x0058,
-	0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000,
-	0x70be, 0x080c, 0x7f5d, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bc3,
-	0xd0a4, 0x19f0, 0x2071, 0x19cb, 0x703c, 0x9005, 0x1328, 0x2001,
-	0x191b, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f5d, 0x0800,
-	0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x7f5d, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6bc3, 0xd0a4, 0x1d60, 0x00ee, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6bc3, 0xd09c, 0x11a0, 0x009e, 0x2900,
-	0x7822, 0xa804, 0x900d, 0x1560, 0x2071, 0x19cb, 0x703c, 0x9005,
-	0x1328, 0x2001, 0x191b, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
-	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
-	0x900d, 0x1170, 0x2071, 0x19cb, 0x703c, 0x9005, 0x1328, 0x2001,
-	0x191b, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6,
+	0x3300, 0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004,
+	0x01de, 0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126,
+	0x2091, 0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x0feb, 0x0168,
+	0x2900, 0xb8a6, 0x080c, 0x6403, 0xa803, 0x0001, 0xa807, 0x0000,
+	0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096,
+	0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000,
+	0x080c, 0x101d, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c,
+	0xd0a4, 0x0005, 0x00b6, 0x00f6, 0x080c, 0x6f9b, 0x01b0, 0x71c0,
+	0x81ff, 0x1198, 0x71d8, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080,
+	0x1000, 0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1853, 0x7804,
+	0x00d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6247,
+	0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118,
+	0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108,
+	0x1f04, 0x648d, 0x015e, 0x080c, 0x6529, 0x0120, 0x2001, 0x1955,
+	0x200c, 0x0030, 0x2079, 0x1853, 0x7804, 0x0030, 0x2009, 0x07d0,
+	0x2011, 0x64b7, 0x080c, 0x80b3, 0x00fe, 0x00be, 0x0005, 0x00b6,
+	0x2011, 0x64b7, 0x080c, 0x8021, 0x080c, 0x6529, 0x01d8, 0x2001,
+	0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c, 0x6567,
+	0x0130, 0x2009, 0x07d0, 0x2011, 0x64b7, 0x080c, 0x80b3, 0x00e6,
+	0x2071, 0x1800, 0x9006, 0x707a, 0x705c, 0x707e, 0x080c, 0x2dbd,
+	0x00ee, 0x04b0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016,
+	0x080c, 0x6247, 0x1538, 0xb800, 0xd0ec, 0x0520, 0x0046, 0xbaa0,
+	0x2220, 0x9006, 0x2009, 0x0029, 0x080c, 0xd54b, 0xb800, 0xc0e5,
+	0xc0ec, 0xb802, 0x080c, 0x6563, 0x2001, 0x0707, 0x1128, 0xb804,
+	0x9084, 0x00ff, 0x9085, 0x0700, 0xb806, 0x2019, 0x0029, 0x080c,
+	0x8564, 0x0076, 0x903e, 0x080c, 0x8452, 0x900e, 0x080c, 0xd2bc,
+	0x007e, 0x004e, 0x001e, 0x8108, 0x1f04, 0x64df, 0x00ce, 0x015e,
+	0x00be, 0x0005, 0x00b6, 0x6010, 0x2058, 0xb800, 0xc0ec, 0xb802,
+	0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ac,
+	0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be, 0xd0bc,
+	0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110,
+	0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091,
+	0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c,
+	0x0db4, 0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc,
+	0xba02, 0x002e, 0x012e, 0x0005, 0x2011, 0x1836, 0x2204, 0xd0cc,
+	0x0138, 0x2001, 0x1953, 0x200c, 0x2011, 0x6559, 0x080c, 0x80b3,
+	0x0005, 0x2011, 0x6559, 0x080c, 0x8021, 0x2011, 0x1836, 0x2204,
+	0xc0cc, 0x2012, 0x0005, 0x080c, 0x538f, 0xd0ac, 0x0005, 0x080c,
+	0x538f, 0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e,
+	0x0006, 0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007,
+	0x908e, 0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xc22c,
+	0x0158, 0x70d8, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004,
+	0x905d, 0x0110, 0xb8bc, 0xd094, 0x00fe, 0x00be, 0x0005, 0x0006,
+	0x0016, 0x0036, 0x0046, 0x0076, 0x00b6, 0x2001, 0x1817, 0x203c,
+	0x9780, 0x313a, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2018,
+	0x2008, 0x9284, 0x8000, 0x0110, 0x2019, 0x0001, 0x9294, 0x7fff,
+	0x2100, 0x9706, 0x0190, 0x91a0, 0x1000, 0x2404, 0x905d, 0x0168,
+	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1138, 0x83ff, 0x0118,
+	0xb89c, 0xd0a4, 0x0110, 0x8211, 0x0158, 0x8108, 0x83ff, 0x0120,
+	0x9182, 0x0800, 0x0e28, 0x0068, 0x9182, 0x007e, 0x0e08, 0x0048,
+	0x00be, 0x007e, 0x004e, 0x003e, 0x001e, 0x9085, 0x0001, 0x000e,
+	0x0005, 0x00be, 0x007e, 0x004e, 0x003e, 0x001e, 0x9006, 0x000e,
+	0x0005, 0x0046, 0x0056, 0x0076, 0x00b6, 0x2100, 0x9084, 0x7fff,
+	0x9080, 0x1000, 0x2004, 0x905d, 0x0130, 0xb804, 0x9084, 0x00ff,
+	0x9086, 0x0006, 0x0550, 0x9184, 0x8000, 0x0580, 0x2001, 0x1817,
+	0x203c, 0x9780, 0x313a, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006,
+	0x2020, 0x2400, 0x9706, 0x01a0, 0x94a8, 0x1000, 0x2504, 0x905d,
+	0x0178, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1148, 0xb89c,
+	0xd0a4, 0x0130, 0xb814, 0x9206, 0x1118, 0xb810, 0x9306, 0x0128,
+	0x8420, 0x9482, 0x0800, 0x0e28, 0x0048, 0x918c, 0x7fff, 0x00be,
+	0x007e, 0x005e, 0x004e, 0x9085, 0x0001, 0x0005, 0x918c, 0x7fff,
+	0x00be, 0x007e, 0x005e, 0x004e, 0x9006, 0x0005, 0x2071, 0x1906,
+	0x7003, 0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016, 0x701a,
+	0x701e, 0x700a, 0x7046, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1919,
+	0x900e, 0x710a, 0x080c, 0x538f, 0xd0fc, 0x1140, 0x080c, 0x538f,
+	0x900e, 0xd09c, 0x0108, 0x8108, 0x7102, 0x0400, 0x2001, 0x1873,
+	0x200c, 0x9184, 0x0007, 0x9006, 0x0002, 0x663e, 0x663e, 0x663e,
+	0x663e, 0x663e, 0x6655, 0x6663, 0x663e, 0x7003, 0x0003, 0x2009,
+	0x1874, 0x210c, 0x9184, 0xff00, 0x8007, 0x9005, 0x1110, 0x2001,
+	0x0002, 0x7006, 0x0018, 0x7003, 0x0005, 0x0c88, 0x00ee, 0x001e,
+	0x0005, 0x00e6, 0x2071, 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6,
+	0x2071, 0x1906, 0x7028, 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001,
+	0x0488, 0x6844, 0x9005, 0x0158, 0x080c, 0x72f1, 0x6a60, 0x9200,
+	0x7002, 0x6864, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6860,
+	0x7002, 0x6864, 0x7006, 0x6868, 0x700a, 0x686c, 0x700e, 0x6844,
+	0x9005, 0x1110, 0x7012, 0x7016, 0x684c, 0x701a, 0x701c, 0x9085,
+	0x0040, 0x701e, 0x7037, 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071,
+	0x1906, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700b, 0x0000,
+	0x00ee, 0x9006, 0x00ee, 0x0005, 0xa868, 0xd0fc, 0x11d8, 0x00e6,
+	0x0026, 0x2001, 0x1919, 0x2004, 0x9005, 0x0904, 0x6896, 0xa87c,
+	0xd0bc, 0x1904, 0x6896, 0xa978, 0xa874, 0x9105, 0x1904, 0x6896,
+	0x2001, 0x1919, 0x2004, 0x0002, 0x6896, 0x66ef, 0x672b, 0x672b,
+	0x6896, 0x672b, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026,
+	0x2009, 0x1919, 0x210c, 0x81ff, 0x0904, 0x6896, 0xa87c, 0xd0cc,
+	0x0904, 0x6896, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904,
+	0x6896, 0x9186, 0x0003, 0x0904, 0x672b, 0x9186, 0x0005, 0x0904,
+	0x672b, 0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005, 0xa84f,
+	0x8020, 0xa853, 0x0016, 0x2071, 0x1906, 0x701c, 0x9005, 0x1904,
+	0x6a4a, 0x0e04, 0x6a95, 0x2071, 0x0000, 0xa84c, 0x7082, 0xa850,
+	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2071, 0x1800,
+	0x2011, 0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802, 0x2900,
+	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f46, 0x002e, 0x00ee,
+	0x0005, 0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050,
+	0x2071, 0x1906, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x681a,
+	0x782c, 0x908c, 0x0780, 0x190c, 0x6bbc, 0x8004, 0x8004, 0x8004,
+	0x9084, 0x0003, 0x0002, 0x6749, 0x681a, 0x676e, 0x67b5, 0x080c,
+	0x0db4, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1170,
+	0x2071, 0x19ca, 0x703c, 0x9005, 0x1328, 0x2001, 0x191a, 0x2004,
+	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
+	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
+	0x70bc, 0x9200, 0x70be, 0x080c, 0x7f46, 0x0c10, 0x2071, 0x1800,
+	0x2900, 0x7822, 0xa804, 0x900d, 0x1580, 0x7824, 0x00e6, 0x2071,
+	0x0040, 0x712c, 0xd19c, 0x1148, 0x2009, 0x182f, 0x210c, 0x918a,
+	0x0040, 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c,
+	0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x7f46,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x6bbc, 0xd0a4, 0x19f0, 0x2071,
+	0x19ca, 0x703c, 0x9005, 0x1328, 0x2001, 0x191a, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
+	0x9200, 0x70be, 0x080c, 0x7f46, 0x0800, 0x0096, 0x00e6, 0x7824,
+	0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
+	0x8000, 0x70be, 0x080c, 0x7f46, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6bbc, 0xd0a4, 0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6bbc, 0xd09c, 0x11a0, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d,
+	0x1560, 0x2071, 0x19ca, 0x703c, 0x9005, 0x1328, 0x2001, 0x191a,
+	0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1170, 0x2071,
+	0x19ca, 0x703c, 0x9005, 0x1328, 0x2001, 0x191a, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016,
+	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
+	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f46, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
+	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
+	0x1904, 0x686f, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bbc, 0xd09c,
+	0x1198, 0x701c, 0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108,
+	0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6bbc, 0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6bbc, 0xd0a4, 0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
+	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
+	0x7f46, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bbc, 0xd0a4, 0x1d60,
+	0x00ee, 0x2071, 0x19ca, 0x703c, 0x9005, 0x1328, 0x2001, 0x191a,
+	0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6,
 	0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
 	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c,
-	0x7f5d, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000,
-	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
-	0x2148, 0xa804, 0x900d, 0x1904, 0x686a, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6bc3, 0xd09c, 0x1198, 0x701c, 0x904d, 0x0180, 0x7010,
-	0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6bc3, 0xd09c, 0x0d68, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6bc3, 0xd0a4, 0x01b0, 0x00e6, 0x7824,
-	0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
-	0x8000, 0x70be, 0x080c, 0x7f5d, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6bc3, 0xd0a4, 0x1d60, 0x00ee, 0x2071, 0x19cb, 0x703c, 0x9005,
-	0x1328, 0x2001, 0x191b, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0x7f46, 0x00ee, 0x0804, 0x682a, 0xa868, 0xd0fc, 0x1904, 0x68d2,
+	0x0096, 0xa804, 0xa807, 0x0000, 0x904d, 0x190c, 0x0f9d, 0x009e,
+	0x0018, 0xa868, 0xd0fc, 0x15f0, 0x00e6, 0x0026, 0xa84f, 0x0000,
+	0x00f6, 0x2079, 0x0050, 0x2071, 0x1800, 0x70e8, 0x8001, 0x01d0,
+	0x1678, 0x2071, 0x1906, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904,
+	0x69c8, 0x782c, 0x908c, 0x0780, 0x190c, 0x6bbc, 0x8004, 0x8004,
+	0x8004, 0x9084, 0x0003, 0x0002, 0x68d3, 0x69c8, 0x68ee, 0x695b,
+	0x080c, 0x0db4, 0x70eb, 0x0fa0, 0x71e4, 0x8107, 0x9106, 0x9094,
+	0x00c0, 0x9184, 0xff3f, 0x9205, 0x70e6, 0x3b08, 0x3a00, 0x9104,
+	0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, 0x0888,
+	0x70ea, 0x0878, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804,
+	0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
+	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
+	0x70bc, 0x9200, 0x70be, 0x080c, 0x7f46, 0x0c60, 0x2071, 0x1800,
+	0x2900, 0x7822, 0xa804, 0x900d, 0x1904, 0x694a, 0x7830, 0x8007,
+	0x9084, 0x001f, 0x9082, 0x0001, 0x1220, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148,
+	0x2009, 0x182f, 0x210c, 0x918a, 0x0040, 0x0218, 0x7022, 0x00ee,
+	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
+	0x8000, 0x70be, 0x080c, 0x7f46, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6bbc, 0xd0a4, 0x19f0, 0x0e04, 0x6941, 0x7838, 0x7938, 0x910e,
+	0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de,
+	0x2001, 0x1917, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x2001, 0x1917, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
+	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c,
+	0x7f46, 0x0804, 0x6901, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
+	0x080c, 0x7f46, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bbc, 0xd0a4,
+	0x1d60, 0x00ee, 0x0e04, 0x699b, 0x7838, 0x7938, 0x910e, 0x1de0,
+	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044,
+	0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x1187, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bbc, 0xd09c,
+	0x1170, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
 	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
-	0x9200, 0x70be, 0x080c, 0x7f5d, 0x00ee, 0x0804, 0x6825, 0xa868,
-	0xd0fc, 0x1904, 0x68cd, 0x0096, 0xa804, 0xa807, 0x0000, 0x904d,
-	0x190c, 0x0f9d, 0x009e, 0x0018, 0xa868, 0xd0fc, 0x15f0, 0x00e6,
-	0x0026, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071, 0x1800,
-	0x70e8, 0x8001, 0x01d0, 0x1678, 0x2071, 0x1906, 0xa803, 0x0000,
-	0x7010, 0x9005, 0x1904, 0x69cb, 0x782c, 0x908c, 0x0780, 0x190c,
-	0x6bc3, 0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x68ce,
-	0x69cb, 0x68e9, 0x695a, 0x080c, 0x0db4, 0x70eb, 0x0fa0, 0x71e4,
-	0x8107, 0x9106, 0x9094, 0x00c0, 0x9184, 0xff3f, 0x9205, 0x70e6,
-	0x3b08, 0x3a00, 0x9104, 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f,
-	0x9205, 0x20d0, 0x0888, 0x70ea, 0x0878, 0x0005, 0x2071, 0x1800,
-	0x2900, 0x7822, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f5d,
-	0x0c60, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1904,
-	0x6949, 0x7830, 0x8007, 0x9084, 0x001f, 0x9082, 0x0005, 0x1220,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x7824, 0x00e6, 0x2071, 0x0040,
-	0x712c, 0xd19c, 0x1148, 0x2009, 0x182f, 0x210c, 0x918a, 0x0040,
-	0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x7f5d, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6bc3, 0xd0a4, 0x19f0, 0x0e04, 0x6940,
-	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
-	0x6833, 0x0013, 0x00de, 0x2001, 0x1917, 0x200c, 0xc184, 0x2102,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187,
-	0x2009, 0x1919, 0x200b, 0x0000, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x2001, 0x1917, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f5d,
-	0x0804, 0x68fc, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
-	0x7f5d, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bc3, 0xd0a4, 0x1d60,
-	0x00ee, 0x0e04, 0x699e, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
-	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084,
-	0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x1187, 0x2009, 0x1919, 0x200b, 0x0000, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6bc3, 0xd09c, 0x1170, 0x009e, 0x2900, 0x7822, 0xa804,
-	0x900d, 0x11e0, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085,
-	0x7046, 0x0c58, 0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
-	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
-	0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800,
-	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f5d, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
-	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
-	0x900d, 0x1904, 0x6a3c, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bc3,
-	0xd09c, 0x11b0, 0x701c, 0x904d, 0x0198, 0xa84c, 0x9005, 0x1180,
-	0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e, 0x2900,
-	0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bc3, 0xd09c, 0x0d50,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6bc3, 0xd0a4, 0x05c8, 0x00e6,
-	0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e,
-	0x70bc, 0x8000, 0x70be, 0x080c, 0x7f5d, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6bc3, 0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x6a35, 0x7838,
-	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
-	0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2009, 0x1919, 0x200b,
-	0x0000, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016,
-	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f5d, 0x00ee, 0x0804,
-	0x69db, 0x2071, 0x1906, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000,
-	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
-	0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6a7c, 0x002e, 0x00ee,
-	0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
-	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be,
-	0x080c, 0x7f5d, 0x0e04, 0x6a66, 0x2071, 0x1906, 0x701c, 0x2048,
-	0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032,
-	0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2071, 0x1906, 0x080c,
-	0x6baf, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1906, 0xa803, 0x0000,
+	0x9200, 0x70be, 0x080c, 0x7f46, 0x00fe, 0x002e, 0x00ee, 0x0005,
 	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
-	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1118, 0x002e,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6a35,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x6bbc, 0xd09c, 0x11b0, 0x701c,
+	0x904d, 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001, 0x7012,
+	0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094,
+	0x0780, 0x190c, 0x6bbc, 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6bbc, 0xd0a4, 0x05a8, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
+	0x080c, 0x7f46, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bbc, 0xd0a4,
+	0x1d60, 0x00ee, 0x0e04, 0x6a2e, 0x7838, 0x7938, 0x910e, 0x1de0,
+	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044,
+	0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x1187, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085,
+	0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f46, 0x00ee,
+	0x0804, 0x69d8, 0x2071, 0x1906, 0xa803, 0x0000, 0x2908, 0x7010,
+	0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008,
+	0x711e, 0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6a75, 0x002e,
 	0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
 	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200,
-	0x70be, 0x080c, 0x7f5d, 0x002e, 0x00ee, 0x0005, 0x0006, 0xa87c,
-	0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e, 0x9084, 0x00ff,
-	0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071, 0x1906, 0x7004,
-	0x0002, 0x6ae7, 0x6ae8, 0x6bae, 0x6ae8, 0x0db4, 0x6bae, 0x0005,
-	0x2001, 0x191a, 0x2004, 0x0002, 0x6af2, 0x6af2, 0x6b47, 0x6b48,
-	0x6af2, 0x6b48, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x6bce, 0x701c,
-	0x904d, 0x01e0, 0xa84c, 0x9005, 0x01d8, 0x0e04, 0x6b16, 0xa94c,
-	0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036,
-	0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x1187, 0x2071, 0x1906, 0x080c, 0x6baf, 0x012e, 0x0470,
-	0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x190c, 0x6bc3, 0xd09c,
-	0x2071, 0x1906, 0x1510, 0x2071, 0x1906, 0x700f, 0x0001, 0xa964,
-	0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff,
-	0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822,
-	0x00de, 0x2071, 0x1906, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012,
-	0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005,
-	0x00d6, 0x2008, 0x2069, 0x19cb, 0x683c, 0x9005, 0x0760, 0x0158,
-	0x9186, 0x0003, 0x0540, 0x2001, 0x1814, 0x2004, 0x2009, 0x1a98,
-	0x210c, 0x9102, 0x1500, 0x0126, 0x2091, 0x8000, 0x2069, 0x0050,
-	0x693c, 0x6838, 0x9106, 0x0190, 0x0e04, 0x6b7a, 0x2069, 0x0000,
-	0x6837, 0x8040, 0x6833, 0x0012, 0x6883, 0x8040, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2069, 0x19cb,
-	0x683f, 0xffff, 0x012e, 0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c,
-	0x6c3f, 0x701c, 0x904d, 0x0540, 0x2001, 0x005b, 0x2004, 0x9094,
-	0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071, 0x1906, 0x700f, 0x0001,
+	0x70be, 0x080c, 0x7f46, 0x0e04, 0x6a5f, 0x2071, 0x1906, 0x701c,
+	0x2048, 0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850,
+	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2071, 0x1906,
+	0x080c, 0x6ba8, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1906, 0xa803,
+	0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
+	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1118,
+	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
+	0x9200, 0x70be, 0x080c, 0x7f46, 0x002e, 0x00ee, 0x0005, 0x0006,
+	0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e, 0x9084,
+	0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071, 0x1906,
+	0x7004, 0x0002, 0x6ae0, 0x6ae1, 0x6ba7, 0x6ae1, 0x0db4, 0x6ba7,
+	0x0005, 0x2001, 0x1919, 0x2004, 0x0002, 0x6aeb, 0x6aeb, 0x6b40,
+	0x6b41, 0x6aeb, 0x6b41, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x6bc7,
+	0x701c, 0x904d, 0x01e0, 0xa84c, 0x9005, 0x01d8, 0x0e04, 0x6b0f,
+	0xa94c, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086,
+	0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x190c, 0x1187, 0x2071, 0x1906, 0x080c, 0x6ba8, 0x012e,
+	0x0470, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x190c, 0x6bbc,
+	0xd09c, 0x2071, 0x1906, 0x1510, 0x2071, 0x1906, 0x700f, 0x0001,
 	0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c,
 	0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050,
-	0x6822, 0x00de, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800,
-	0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x701c, 0x904d, 0x0160, 0x7010, 0x8001, 0x7012,
-	0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x080c, 0x101d,
-	0x0005, 0x012e, 0x0005, 0x2091, 0x8000, 0x0e04, 0x6bc5, 0x0006,
-	0x0016, 0x2001, 0x8004, 0x0006, 0x0804, 0x0dbd, 0x0096, 0x00f6,
-	0x2079, 0x0050, 0x7044, 0xd084, 0x01e0, 0xc084, 0x7046, 0x7838,
-	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
-	0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x1187, 0x2009, 0x1919, 0x200b, 0x0000, 0x00fe, 0x009e,
-	0x0005, 0x782c, 0x9094, 0x0780, 0x1971, 0xd0a4, 0x0db8, 0x2009,
-	0x1919, 0x2104, 0x8000, 0x200a, 0x9082, 0x000f, 0x0e78, 0x00e6,
-	0x2071, 0x1800, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c,
-	0x1148, 0x2009, 0x182f, 0x210c, 0x918a, 0x0040, 0x0218, 0x7022,
-	0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e,
-	0x70bc, 0x8000, 0x70be, 0x080c, 0x7f5d, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6bc3, 0xd0a4, 0x19f0, 0x7838, 0x7938, 0x910e, 0x1de0,
-	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2009,
-	0x1919, 0x200b, 0x0000, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x00f6,
-	0x2079, 0x0050, 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046, 0x7838,
-	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
-	0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x1187, 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6bc3, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x2048,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
-	0x7f5d, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bc3, 0xd0a4, 0x1d70,
-	0x00d6, 0x2069, 0x0050, 0x693c, 0x2069, 0x191a, 0x6808, 0x690a,
-	0x2069, 0x19cb, 0x9102, 0x1118, 0x683c, 0x9005, 0x1328, 0x2001,
-	0x191b, 0x200c, 0x810d, 0x693e, 0x00de, 0x00ee, 0x00fe, 0x0005,
-	0x7094, 0x908a, 0x0029, 0x1a0c, 0x0db4, 0x9082, 0x001d, 0x001b,
-	0x6027, 0x1e00, 0x0005, 0x6d67, 0x6ced, 0x6d09, 0x6d33, 0x6d56,
-	0x6d96, 0x6da8, 0x6d09, 0x6d7e, 0x6ca8, 0x6cd6, 0x6ca7, 0x0005,
-	0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1180, 0x6808, 0x9005,
-	0x1518, 0x7097, 0x0028, 0x2069, 0x1960, 0x2d04, 0x7002, 0x080c,
-	0x70eb, 0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, 0x7097, 0x0028,
-	0x2069, 0x1960, 0x2d04, 0x7002, 0x6028, 0x9085, 0x0600, 0x602a,
-	0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a33, 0x080c, 0x1958,
-	0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069,
-	0x0200, 0x6804, 0x9005, 0x1178, 0x6808, 0x9005, 0x1160, 0x7097,
-	0x0028, 0x2069, 0x1960, 0x2d04, 0x7002, 0x080c, 0x7185, 0x6028,
-	0x9085, 0x0600, 0x602a, 0x00de, 0x0005, 0x0006, 0x2001, 0x0090,
-	0x080c, 0x2b14, 0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x6e15,
-	0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x7097, 0x0020,
-	0x080c, 0x6e15, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f,
-	0x0005, 0x2001, 0x0088, 0x080c, 0x2b14, 0x6124, 0xd1cc, 0x11e8,
-	0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c,
-	0x1982, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x6fde,
-	0x2001, 0x0080, 0x080c, 0x2b14, 0x7097, 0x0028, 0x0058, 0x7097,
-	0x001e, 0x0040, 0x7097, 0x001d, 0x0028, 0x7097, 0x0020, 0x0010,
-	0x7097, 0x001f, 0x0005, 0x080c, 0x1982, 0x60e3, 0x0001, 0x600c,
-	0xc0b4, 0x600e, 0x080c, 0x6fde, 0x2001, 0x0080, 0x080c, 0x2b14,
-	0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184,
-	0x1e00, 0x1158, 0x7097, 0x0028, 0x0040, 0x7097, 0x001e, 0x0028,
-	0x7097, 0x001d, 0x0010, 0x7097, 0x001f, 0x0005, 0x2001, 0x00a0,
-	0x080c, 0x2b14, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c,
-	0x1982, 0x7097, 0x001e, 0x0010, 0x7097, 0x001d, 0x0005, 0x080c,
-	0x6e98, 0x6124, 0xd1dc, 0x1188, 0x080c, 0x6e15, 0x0016, 0x080c,
-	0x1982, 0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x7097, 0x001e,
-	0x0020, 0x7097, 0x001f, 0x080c, 0x6e15, 0x0005, 0x0006, 0x2001,
-	0x00a0, 0x080c, 0x2b14, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc,
-	0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x7097, 0x001e, 0x0028,
-	0x7097, 0x001d, 0x0010, 0x7097, 0x0021, 0x0005, 0x080c, 0x6e98,
-	0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x7097,
-	0x001e, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f, 0x0005,
-	0x0006, 0x2001, 0x0090, 0x080c, 0x2b14, 0x000e, 0x6124, 0xd1d4,
-	0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x7097,
-	0x001e, 0x0040, 0x7097, 0x001d, 0x0028, 0x7097, 0x0020, 0x0010,
-	0x7097, 0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126,
-	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000,
-	0x080c, 0x6fb2, 0x11d8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01b0,
-	0xc1b4, 0x2102, 0x6027, 0x0200, 0x080c, 0x2a5d, 0x6024, 0xd0cc,
-	0x0148, 0x2001, 0x00a0, 0x080c, 0x2b14, 0x080c, 0x7296, 0x080c,
-	0x5cd1, 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x6fcc,
-	0x0150, 0x080c, 0x6fc3, 0x1138, 0x2001, 0x0001, 0x080c, 0x260c,
-	0x080c, 0x6f8a, 0x00a0, 0x080c, 0x6e95, 0x0178, 0x2001, 0x0001,
-	0x080c, 0x260c, 0x7094, 0x9086, 0x001e, 0x0120, 0x7094, 0x9086,
-	0x0022, 0x1118, 0x7097, 0x0025, 0x0010, 0x7097, 0x0021, 0x012e,
-	0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x6e26,
-	0x080c, 0x810c, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011,
-	0x6e26, 0x080c, 0x8103, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6,
-	0x0016, 0x080c, 0x93ac, 0x2071, 0x1800, 0x080c, 0x6dc3, 0x001e,
-	0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
-	0x00e6, 0x00f6, 0x0126, 0x080c, 0x93ac, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a,
-	0x2011, 0x0003, 0x080c, 0x9771, 0x2011, 0x0002, 0x080c, 0x977b,
-	0x080c, 0x9662, 0x080c, 0x80b8, 0x0036, 0x901e, 0x080c, 0x96d8,
-	0x003e, 0x60e3, 0x0000, 0x080c, 0xd8b4, 0x080c, 0xd8cf, 0x2009,
-	0x0004, 0x080c, 0x2a63, 0x080c, 0x297e, 0x2001, 0x1800, 0x2003,
-	0x0004, 0x6027, 0x0008, 0x2011, 0x6e26, 0x080c, 0x810c, 0x080c,
-	0x6fcc, 0x0118, 0x9006, 0x080c, 0x2b14, 0x080c, 0x0b8f, 0x2001,
-	0x0001, 0x080c, 0x260c, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x6e33,
-	0x2071, 0x19cb, 0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110,
-	0x9085, 0x0001, 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005,
-	0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0, 0x01b8, 0x2001, 0x00c0,
-	0x080c, 0x2b14, 0x0156, 0x20a9, 0x002d, 0x1d04, 0x6ea5, 0x2091,
-	0x6000, 0x1f04, 0x6ea5, 0x015e, 0x00d6, 0x2069, 0x1800, 0x6898,
-	0x8001, 0x0220, 0x0118, 0x689a, 0x00de, 0x0005, 0x689b, 0x0014,
-	0x68e4, 0xd0dc, 0x0dc8, 0x6800, 0x9086, 0x0001, 0x1da8, 0x080c,
-	0x8118, 0x0c90, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x2071, 0x1800, 0x080c, 0x72a5, 0x2001, 0x193e, 0x2003,
-	0x0000, 0x9006, 0x7096, 0x60e2, 0x6886, 0x080c, 0x26d7, 0x9006,
-	0x080c, 0x2b14, 0x080c, 0x5b90, 0x6027, 0xffff, 0x602b, 0x182f,
-	0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061,
-	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2001, 0x194e, 0x200c,
-	0x9186, 0x0000, 0x0158, 0x9186, 0x0001, 0x0158, 0x9186, 0x0002,
-	0x0158, 0x9186, 0x0003, 0x0158, 0x0804, 0x6f7a, 0x7097, 0x0022,
-	0x0040, 0x7097, 0x0021, 0x0028, 0x7097, 0x0023, 0x0010, 0x7097,
-	0x0024, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c,
-	0x26d7, 0x0026, 0x080c, 0x9db8, 0x002e, 0x7000, 0x908e, 0x0004,
-	0x0118, 0x602b, 0x0028, 0x0010, 0x602b, 0x0020, 0x0156, 0x0126,
-	0x2091, 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e,
-	0x015e, 0x080c, 0xc212, 0x0118, 0x9006, 0x080c, 0x2b3e, 0x0804,
-	0x6f86, 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c, 0x2a5d,
-	0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c, 0x2b14, 0x1f04,
-	0x6f24, 0x080c, 0x7009, 0x012e, 0x015e, 0x080c, 0x6fc3, 0x01a8,
-	0x6044, 0x9005, 0x0168, 0x6050, 0x0006, 0x9085, 0x0020, 0x6052,
-	0x080c, 0x7009, 0x9006, 0x8001, 0x1df0, 0x000e, 0x6052, 0x0028,
-	0x6804, 0xd0d4, 0x1110, 0x080c, 0x7009, 0x080c, 0xc212, 0x0118,
-	0x9006, 0x080c, 0x2b3e, 0x0016, 0x0026, 0x7000, 0x908e, 0x0004,
-	0x0130, 0x2009, 0x00c8, 0x2011, 0x6e33, 0x080c, 0x80ca, 0x002e,
-	0x001e, 0x080c, 0x7f54, 0x7034, 0xc085, 0x7036, 0x2001, 0x194e,
-	0x2003, 0x0004, 0x080c, 0x6c90, 0x080c, 0x6fc3, 0x0138, 0x6804,
-	0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, 0x729b, 0x00ee, 0x00de,
-	0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x2071, 0x1800, 0x080c, 0x7f6b, 0x080c, 0x7f5d, 0x080c,
-	0x72a5, 0x2001, 0x193e, 0x2003, 0x0000, 0x9006, 0x7096, 0x60e2,
-	0x6886, 0x080c, 0x26d7, 0x9006, 0x080c, 0x2b14, 0x6043, 0x0090,
-	0x6043, 0x0010, 0x6027, 0xffff, 0x602b, 0x182f, 0x00ee, 0x00de,
-	0x00ce, 0x0005, 0x0006, 0x2001, 0x194d, 0x2004, 0x9086, 0xaaaa,
-	0x000e, 0x0005, 0x0006, 0x080c, 0x538a, 0x9084, 0x0030, 0x9086,
-	0x0000, 0x000e, 0x0005, 0x0006, 0x080c, 0x538a, 0x9084, 0x0030,
-	0x9086, 0x0030, 0x000e, 0x0005, 0x0006, 0x080c, 0x538a, 0x9084,
-	0x0030, 0x9086, 0x0010, 0x000e, 0x0005, 0x0006, 0x080c, 0x538a,
-	0x9084, 0x0030, 0x9086, 0x0020, 0x000e, 0x0005, 0x0036, 0x0016,
-	0x2001, 0x180c, 0x2004, 0x908c, 0x0013, 0x0180, 0x0020, 0x080c,
-	0x26f7, 0x900e, 0x0028, 0x080c, 0x655a, 0x1dc8, 0x2009, 0x0002,
-	0x2019, 0x0028, 0x080c, 0x2fa5, 0x9006, 0x0019, 0x001e, 0x003e,
-	0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130, 0x080c, 0xc20b,
-	0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef, 0x2072, 0x00ee,
-	0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, 0x0006, 0x6004,
-	0x0006, 0x6028, 0x0006, 0x0016, 0x6138, 0x6050, 0x9084, 0xfbff,
-	0x9085, 0x2000, 0x6052, 0x613a, 0x20a9, 0x0012, 0x1d04, 0x701e,
-	0x2091, 0x6000, 0x1f04, 0x701e, 0x602f, 0x0100, 0x602f, 0x0000,
-	0x6050, 0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x613a, 0x001e,
-	0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x602a, 0x000e, 0x6006,
-	0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001,
-	0x2001, 0x0001, 0x080c, 0x26d7, 0x2001, 0x00a0, 0x0006, 0x080c,
-	0xc212, 0x000e, 0x0130, 0x080c, 0x2b32, 0x9006, 0x080c, 0x2b3e,
-	0x0010, 0x080c, 0x2b14, 0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5,
-	0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x29d2, 0x00fe, 0x000e,
-	0x6052, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
-	0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x6020,
-	0x9084, 0x0080, 0x0138, 0x2001, 0x180c, 0x200c, 0xc1c5, 0x2102,
-	0x0804, 0x70dd, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102, 0x6028,
-	0x9084, 0xe1ff, 0x602a, 0x6027, 0x0200, 0x2001, 0x0090, 0x080c,
-	0x2b14, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1518, 0x1d04, 0x708b,
-	0x2091, 0x6000, 0x1f04, 0x708b, 0x2011, 0x0003, 0x080c, 0x9771,
-	0x2011, 0x0002, 0x080c, 0x977b, 0x080c, 0x9662, 0x901e, 0x080c,
-	0x96d8, 0x2001, 0x00a0, 0x080c, 0x2b14, 0x080c, 0x7296, 0x080c,
-	0x5cd1, 0x080c, 0xc212, 0x0110, 0x080c, 0x0d22, 0x9085, 0x0001,
-	0x0490, 0x86ff, 0x1110, 0x080c, 0x1982, 0x60e3, 0x0000, 0x2001,
-	0x0002, 0x080c, 0x26d7, 0x60e2, 0x2001, 0x0080, 0x080c, 0x2b14,
-	0x20a9, 0x0366, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2a5d,
-	0x6024, 0x910c, 0x0138, 0x1d04, 0x70c2, 0x2091, 0x6000, 0x1f04,
-	0x70c2, 0x0810, 0x6028, 0x9085, 0x1e00, 0x602a, 0x70b0, 0x9005,
-	0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x080c, 0xc212, 0x0110,
-	0x080c, 0x0d22, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e,
-	0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6,
-	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x7000, 0x9086,
-	0x0003, 0x1168, 0x2001, 0x020b, 0x2004, 0x9084, 0x5540, 0x9086,
-	0x5540, 0x1128, 0x2069, 0x1a49, 0x2d04, 0x8000, 0x206a, 0x2069,
-	0x0140, 0x6020, 0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, 0x1904,
-	0x7150, 0x2001, 0x0088, 0x080c, 0x2b14, 0x9006, 0x60e2, 0x6886,
-	0x080c, 0x26d7, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808,
-	0x9005, 0x01c0, 0x6028, 0x9084, 0xfbff, 0x602a, 0x6027, 0x0400,
-	0x2069, 0x1960, 0x7000, 0x206a, 0x7097, 0x0026, 0x7003, 0x0001,
-	0x20a9, 0x0002, 0x1d04, 0x7132, 0x2091, 0x6000, 0x1f04, 0x7132,
-	0x0804, 0x717d, 0x2069, 0x0140, 0x20a9, 0x0384, 0x6027, 0x1e00,
-	0x2009, 0x1e00, 0x080c, 0x2a5d, 0x6024, 0x910c, 0x0508, 0x9084,
-	0x1a00, 0x11f0, 0x1d04, 0x713e, 0x2091, 0x6000, 0x1f04, 0x713e,
-	0x2011, 0x0003, 0x080c, 0x9771, 0x2011, 0x0002, 0x080c, 0x977b,
-	0x080c, 0x9662, 0x901e, 0x080c, 0x96d8, 0x2001, 0x00a0, 0x080c,
-	0x2b14, 0x080c, 0x7296, 0x080c, 0x5cd1, 0x9085, 0x0001, 0x00a8,
-	0x2001, 0x0080, 0x080c, 0x2b14, 0x2069, 0x0140, 0x60e3, 0x0000,
-	0x70b0, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001,
-	0x0002, 0x080c, 0x26d7, 0x60e2, 0x9006, 0x00ee, 0x00de, 0x00ce,
-	0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026,
-	0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800,
-	0x6020, 0x9084, 0x00c0, 0x01c8, 0x2011, 0x0003, 0x080c, 0x9771,
-	0x2011, 0x0002, 0x080c, 0x977b, 0x080c, 0x9662, 0x901e, 0x080c,
-	0x96d8, 0x2069, 0x0140, 0x2001, 0x00a0, 0x080c, 0x2b14, 0x080c,
-	0x7296, 0x080c, 0x5cd1, 0x0804, 0x7217, 0x2001, 0x180c, 0x200c,
-	0xd1b4, 0x1160, 0xc1b5, 0x2102, 0x080c, 0x6e1b, 0x2069, 0x0140,
-	0x2001, 0x0080, 0x080c, 0x2b14, 0x60e3, 0x0000, 0x2069, 0x0200,
-	0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x0180, 0x6028, 0x9084,
-	0xfdff, 0x602a, 0x6027, 0x0200, 0x2069, 0x1960, 0x7000, 0x206a,
-	0x7097, 0x0027, 0x7003, 0x0001, 0x0804, 0x7217, 0x6027, 0x1e00,
-	0x2009, 0x1e00, 0x080c, 0x2a5d, 0x6024, 0x910c, 0x01c8, 0x9084,
-	0x1c00, 0x11b0, 0x1d04, 0x71d6, 0x0006, 0x0016, 0x00c6, 0x00d6,
-	0x00e6, 0x080c, 0x7f9c, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x000e,
-	0x00e6, 0x2071, 0x19cb, 0x7018, 0x00ee, 0x9005, 0x19f8, 0x01f8,
-	0x0026, 0x2011, 0x6e33, 0x080c, 0x8038, 0x2011, 0x6e26, 0x080c,
-	0x810c, 0x002e, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b0, 0x9005,
-	0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x0002, 0x080c,
-	0x26d7, 0x60e2, 0x2001, 0x180c, 0x200c, 0xc1b4, 0x2102, 0x00ee,
-	0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156,
-	0x0016, 0x0026, 0x0036, 0x0046, 0x00c6, 0x00e6, 0x2061, 0x0100,
-	0x2071, 0x1800, 0x080c, 0xc20b, 0x1904, 0x7284, 0x7130, 0xd184,
-	0x1170, 0x080c, 0x3133, 0x0138, 0xc18d, 0x7132, 0x2011, 0x1854,
-	0x2214, 0xd2ac, 0x1120, 0x7030, 0xd08c, 0x0904, 0x7284, 0x2011,
-	0x1854, 0x220c, 0x0438, 0x0016, 0x2019, 0x000e, 0x080c, 0xd4a6,
-	0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x9186, 0x007e, 0x01a0,
-	0x9186, 0x0080, 0x0188, 0x080c, 0x623e, 0x1170, 0x2120, 0x9006,
-	0x0016, 0x2009, 0x000e, 0x080c, 0xd52a, 0x2009, 0x0001, 0x2011,
-	0x0100, 0x080c, 0x822f, 0x001e, 0x8108, 0x1f04, 0x724d, 0x00be,
-	0x015e, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002, 0x2019,
-	0x0004, 0x080c, 0x2fa5, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9,
-	0x007f, 0x900e, 0x080c, 0x623e, 0x1110, 0x080c, 0x5ceb, 0x8108,
-	0x1f04, 0x727a, 0x00be, 0x015e, 0x080c, 0x1982, 0x080c, 0x9db8,
-	0x60e3, 0x0000, 0x080c, 0x5cd1, 0x080c, 0x6ee4, 0x00ee, 0x00ce,
-	0x004e, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x194e,
-	0x2003, 0x0001, 0x0005, 0x2001, 0x194e, 0x2003, 0x0000, 0x0005,
-	0x2001, 0x194d, 0x2003, 0xaaaa, 0x0005, 0x2001, 0x194d, 0x2003,
-	0x0000, 0x0005, 0x2071, 0x18f0, 0x7003, 0x0000, 0x7007, 0x0000,
-	0x080c, 0x1004, 0x090c, 0x0db4, 0xa8ab, 0xdcb0, 0x2900, 0x704e,
-	0x080c, 0x1004, 0x090c, 0x0db4, 0xa8ab, 0xdcb0, 0x2900, 0x7052,
-	0xa867, 0x0000, 0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005, 0x00e6,
-	0x2071, 0x0040, 0x6848, 0x9005, 0x1118, 0x9085, 0x0001, 0x04b0,
-	0x6840, 0x9005, 0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002, 0x6854,
-	0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6850, 0x7002, 0x6854,
-	0x7006, 0x6858, 0x700a, 0x685c, 0x700e, 0x6840, 0x9005, 0x1110,
-	0x7012, 0x7016, 0x6848, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e,
-	0x2001, 0x0019, 0x7036, 0x702b, 0x0001, 0x2001, 0x0004, 0x200c,
-	0x918c, 0xfff7, 0x918d, 0x8000, 0x2102, 0x00d6, 0x2069, 0x18f0,
-	0x6807, 0x0001, 0x00de, 0x080c, 0x7897, 0x9006, 0x00ee, 0x0005,
-	0x900e, 0x0156, 0x20a9, 0x0006, 0x8003, 0x2011, 0x0100, 0x2214,
-	0x9296, 0x0008, 0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x1f04,
-	0x730c, 0x015e, 0x0005, 0x2079, 0x0040, 0x2071, 0x18f0, 0x7004,
-	0x0002, 0x732b, 0x732c, 0x7363, 0x73be, 0x74ff, 0x7329, 0x7329,
-	0x7529, 0x080c, 0x0db4, 0x0005, 0x2079, 0x0040, 0x782c, 0x908c,
-	0x0780, 0x190c, 0x7923, 0xd0a4, 0x01f0, 0x7824, 0x2048, 0x9006,
-	0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x0040, 0x0608,
-	0x00b8, 0x2001, 0x1800, 0x200c, 0x9186, 0x0003, 0x1160, 0x7104,
-	0x9186, 0x0004, 0x0140, 0x9186, 0x0007, 0x0128, 0x9186, 0x0003,
-	0x19e8, 0x080c, 0x73be, 0x782c, 0xd09c, 0x090c, 0x7897, 0x0005,
-	0x9082, 0x005a, 0x1218, 0x2100, 0x003b, 0x0c18, 0x080c, 0x73f4,
-	0x0c90, 0x00e3, 0x08f0, 0x0005, 0x73f4, 0x73f4, 0x73f4, 0x73f4,
-	0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x7416, 0x73f4, 0x73f4, 0x73f4,
-	0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4,
-	0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4,
-	0x7400, 0x73f4, 0x75fe, 0x73f4, 0x73f4, 0x73f4, 0x7416, 0x73f4,
-	0x7400, 0x763f, 0x7680, 0x76c7, 0x76db, 0x73f4, 0x73f4, 0x7416,
-	0x7400, 0x73f4, 0x73f4, 0x74d3, 0x7786, 0x77a1, 0x73f4, 0x7416,
-	0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x74c9, 0x77a1, 0x73f4, 0x73f4,
-	0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x742a,
-	0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4,
-	0x73f4, 0x78c7, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x743e,
-	0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x73f4, 0x2079, 0x0040,
-	0x7004, 0x9086, 0x0003, 0x1198, 0x782c, 0x080c, 0x78c0, 0xd0a4,
-	0x0170, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084,
-	0x00ff, 0x908a, 0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c,
-	0x7897, 0x0005, 0x73f4, 0x7400, 0x75ea, 0x73f4, 0x7400, 0x73f4,
-	0x7400, 0x7400, 0x73f4, 0x7400, 0x75ea, 0x7400, 0x7400, 0x7400,
-	0x7400, 0x7400, 0x73f4, 0x7400, 0x75ea, 0x73f4, 0x73f4, 0x7400,
-	0x73f4, 0x73f4, 0x73f4, 0x7400, 0x00e6, 0x2071, 0x18f0, 0x2009,
-	0x0400, 0x0071, 0x00ee, 0x0005, 0x2009, 0x1000, 0x0049, 0x0005,
-	0x2009, 0x2000, 0x0029, 0x0005, 0x2009, 0x0800, 0x0009, 0x0005,
-	0x7007, 0x0001, 0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x688c, 0x012e, 0x0005, 0xa864, 0x8007,
-	0x9084, 0x00ff, 0x0d08, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804,
-	0x75a8, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b,
-	0x75a8, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0968, 0x8001,
-	0x1120, 0x7007, 0x0001, 0x0804, 0x75c3, 0x7007, 0x0003, 0x7012,
-	0x2900, 0x7016, 0x701a, 0x704b, 0x75c3, 0x0005, 0xa864, 0x8007,
-	0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x73fc, 0x7007, 0x0001,
-	0x2009, 0x1833, 0x210c, 0x81ff, 0x1904, 0x74a0, 0xa994, 0x9186,
-	0x006f, 0x0188, 0x9186, 0x0074, 0x15b0, 0x0026, 0x2011, 0x0010,
-	0x080c, 0x6586, 0x002e, 0x0578, 0x0016, 0xa998, 0x080c, 0x65d0,
-	0x001e, 0x1548, 0x0400, 0x080c, 0x6fb2, 0x0140, 0xa897, 0x4005,
-	0xa89b, 0x0016, 0x2001, 0x0030, 0x900e, 0x0438, 0x0026, 0x2011,
-	0x8008, 0x080c, 0x6586, 0x002e, 0x01b0, 0x0016, 0x0026, 0x0036,
-	0xa998, 0xaaa0, 0xab9c, 0x918d, 0x8000, 0x080c, 0x65d0, 0x003e,
-	0x002e, 0x001e, 0x1140, 0xa897, 0x4005, 0xa89b, 0x4009, 0x2001,
-	0x0030, 0x900e, 0x0050, 0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883,
-	0x0000, 0x080c, 0x5f00, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000,
-	0xa867, 0x0139, 0xa87a, 0xa982, 0x080c, 0x688c, 0x012e, 0x0ca0,
-	0xa994, 0x9186, 0x0071, 0x0904, 0x744e, 0x9186, 0x0064, 0x0904,
-	0x744e, 0x9186, 0x007c, 0x0904, 0x744e, 0x9186, 0x0028, 0x0904,
-	0x744e, 0x9186, 0x0038, 0x0904, 0x744e, 0x9186, 0x0078, 0x0904,
-	0x744e, 0x9186, 0x005f, 0x0904, 0x744e, 0x9186, 0x0056, 0x0904,
-	0x744e, 0xa897, 0x4005, 0xa89b, 0x0001, 0x2001, 0x0030, 0x900e,
-	0x0860, 0xa87c, 0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007,
-	0x0001, 0x0804, 0x77b8, 0x2900, 0x7016, 0x701a, 0x20a9, 0x0004,
-	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0030, 0x2098, 0x7050, 0x2040,
-	0xa060, 0x20e8, 0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003, 0xa888,
-	0x7012, 0x9082, 0x0401, 0x1a04, 0x7404, 0xaab4, 0x928a, 0x0002,
-	0x1a04, 0x7404, 0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118,
-	0x2001, 0x7566, 0x0018, 0x9280, 0x755c, 0x2005, 0x7056, 0x7010,
-	0x9015, 0x0904, 0x7547, 0x080c, 0x1004, 0x1118, 0x7007, 0x0004,
-	0x0005, 0x2900, 0x7022, 0x7054, 0x2060, 0xe000, 0xa866, 0x7050,
-	0x2040, 0xa95c, 0xe004, 0x9100, 0xa076, 0xa860, 0xa072, 0xe008,
-	0x920a, 0x1210, 0x900e, 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b,
-	0x9296, 0x0004, 0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c,
-	0x10d5, 0xa06c, 0x908e, 0x0100, 0x0170, 0x9086, 0x0200, 0x0118,
-	0x7007, 0x0007, 0x0005, 0x7020, 0x2048, 0x080c, 0x101d, 0x7014,
-	0x2048, 0x0804, 0x7404, 0x7020, 0x2048, 0x7018, 0xa802, 0xa807,
-	0x0000, 0x2908, 0x2048, 0xa906, 0x711a, 0x0804, 0x74ff, 0x7014,
-	0x2048, 0x7007, 0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc,
-	0x9105, 0x0108, 0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e,
-	0x0904, 0x77b8, 0x0804, 0x75a8, 0x755e, 0x7562, 0x0002, 0x001d,
-	0x0007, 0x0004, 0x000a, 0x001b, 0x0005, 0x0006, 0x000a, 0x001d,
-	0x0005, 0x0004, 0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050,
-	0xb0c0, 0xb0e2, 0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce,
-	0xb6da, 0xb7d6, 0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba,
-	0xb0a4, 0xb0b6, 0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae,
-	0xb098, 0xb0a2, 0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a,
-	0xb08c, 0xb096, 0xb088, 0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e,
-	0xb080, 0xb082, 0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e,
-	0xb67a, 0xb776, 0xb004, 0x9055, 0x1958, 0x006e, 0x007e, 0x0005,
-	0x2009, 0x1833, 0x210c, 0x81ff, 0x1178, 0x080c, 0x5d4d, 0x1108,
-	0x0005, 0x080c, 0x6ac6, 0x0126, 0x2091, 0x8000, 0x080c, 0xbe06,
-	0x080c, 0x688c, 0x012e, 0x0ca0, 0x080c, 0xc20b, 0x1d70, 0x2001,
-	0x0028, 0x900e, 0x0c70, 0x2009, 0x1833, 0x210c, 0x81ff, 0x11d8,
-	0xa888, 0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4, 0x0120,
-	0x080c, 0x5e62, 0x1138, 0x0005, 0x9006, 0xa87a, 0x080c, 0x5ddd,
-	0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x080c,
-	0x688c, 0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98, 0x2001,
-	0x0000, 0x0c80, 0x7018, 0xa802, 0x2908, 0x2048, 0xa906, 0x711a,
-	0x7010, 0x8001, 0x7012, 0x0118, 0x7007, 0x0003, 0x0030, 0x7014,
-	0x2048, 0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x00b6, 0x7007,
-	0x0001, 0xa974, 0xa878, 0x9084, 0x00ff, 0x9096, 0x0004, 0x0540,
-	0x20a9, 0x0001, 0x9096, 0x0001, 0x0190, 0x900e, 0x20a9, 0x0800,
-	0x9096, 0x0002, 0x0160, 0x9005, 0x11d8, 0xa974, 0x080c, 0x623e,
-	0x11b8, 0x0066, 0xae80, 0x080c, 0x634e, 0x006e, 0x0088, 0x0046,
-	0x2011, 0x180c, 0x2224, 0xc484, 0x2412, 0x004e, 0x00c6, 0x080c,
-	0x623e, 0x1110, 0x080c, 0x644e, 0x8108, 0x1f04, 0x7627, 0x00ce,
-	0xa87c, 0xd084, 0x1120, 0x080c, 0x101d, 0x00be, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x688c, 0x012e, 0x00be, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x655e, 0x0580, 0x2061,
-	0x1a41, 0x6100, 0xd184, 0x0178, 0xa888, 0x9084, 0x00ff, 0x1550,
-	0x6000, 0xd084, 0x0520, 0x6004, 0x9005, 0x1538, 0x6003, 0x0000,
-	0x600b, 0x0000, 0x00c8, 0x2011, 0x0001, 0xa890, 0x9005, 0x1110,
-	0x2001, 0x001e, 0x8000, 0x6016, 0xa888, 0x9084, 0x00ff, 0x0178,
-	0x6006, 0xa888, 0x8007, 0x9084, 0x00ff, 0x0148, 0x600a, 0xa888,
-	0x8000, 0x1108, 0xc28d, 0x6202, 0x012e, 0x0804, 0x7881, 0x012e,
-	0x0804, 0x787b, 0x012e, 0x0804, 0x7875, 0x012e, 0x0804, 0x7878,
-	0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x655e, 0x05e0,
-	0x2061, 0x1a41, 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c,
-	0x1530, 0xac78, 0x9484, 0x0003, 0x0170, 0xa988, 0x918c, 0x00ff,
-	0x8001, 0x1120, 0x2100, 0x9210, 0x0620, 0x0028, 0x8001, 0x1508,
-	0x2100, 0x9212, 0x02f0, 0x9484, 0x000c, 0x0188, 0xa988, 0x810f,
-	0x918c, 0x00ff, 0x9082, 0x0004, 0x1120, 0x2100, 0x9318, 0x0288,
-	0x0030, 0x9082, 0x0004, 0x1168, 0x2100, 0x931a, 0x0250, 0xa890,
-	0x9005, 0x0110, 0x8000, 0x6016, 0x6206, 0x630a, 0x012e, 0x0804,
-	0x7881, 0x012e, 0x0804, 0x787e, 0x012e, 0x0804, 0x787b, 0x0126,
-	0x2091, 0x8000, 0x7007, 0x0001, 0x2061, 0x1a41, 0x6300, 0xd38c,
-	0x1120, 0x6308, 0x8318, 0x0220, 0x630a, 0x012e, 0x0804, 0x788f,
-	0x012e, 0x0804, 0x787e, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000,
-	0x7007, 0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061, 0x1a41,
-	0x6000, 0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888, 0x9005,
-	0x05d8, 0xa88c, 0x9065, 0x0598, 0x2001, 0x1833, 0x2004, 0x9005,
-	0x0118, 0x080c, 0x9e62, 0x0068, 0x6017, 0xf400, 0x605b, 0x0000,
-	0xa97c, 0xd1a4, 0x0110, 0xa980, 0x615a, 0x2009, 0x0041, 0x080c,
-	0x9eac, 0xa988, 0x918c, 0xff00, 0x9186, 0x2000, 0x1138, 0x0026,
-	0x900e, 0x2011, 0xfdff, 0x080c, 0x822f, 0x002e, 0xa87c, 0xd0c4,
-	0x0148, 0x2061, 0x1a41, 0x6000, 0xd08c, 0x1120, 0x6008, 0x8000,
-	0x0208, 0x600a, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7881, 0x00ce,
-	0x012e, 0x00be, 0x0804, 0x787b, 0xa984, 0x9186, 0x002e, 0x0d30,
-	0x9186, 0x002d, 0x0d18, 0x9186, 0x0045, 0x0510, 0x9186, 0x002a,
-	0x1130, 0x2001, 0x180c, 0x200c, 0xc194, 0x2102, 0x08b8, 0x9186,
-	0x0020, 0x0158, 0x9186, 0x0029, 0x1d10, 0xa974, 0x080c, 0x623e,
-	0x1968, 0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065, 0x09b8,
-	0x6007, 0x0024, 0x2001, 0x1957, 0x2004, 0x601a, 0x0804, 0x7716,
-	0xa88c, 0x9065, 0x0960, 0x00e6, 0xa890, 0x9075, 0x2001, 0x1833,
-	0x2004, 0x9005, 0x0150, 0x080c, 0x9e62, 0x8eff, 0x0118, 0x2e60,
-	0x080c, 0x9e62, 0x00ee, 0x0804, 0x7716, 0x6024, 0xc0dc, 0xc0d5,
-	0x6026, 0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130, 0x6007,
-	0x003b, 0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x00ee, 0x0804, 0x7716, 0x2061, 0x1a41,
-	0x6000, 0xd084, 0x0190, 0xd08c, 0x1904, 0x788f, 0x0126, 0x2091,
-	0x8000, 0x6204, 0x8210, 0x0220, 0x6206, 0x012e, 0x0804, 0x788f,
-	0x012e, 0xa883, 0x0016, 0x0804, 0x7888, 0xa883, 0x0007, 0x0804,
-	0x7888, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0130, 0x8001, 0x1138,
-	0x7007, 0x0001, 0x0069, 0x0005, 0x080c, 0x73fc, 0x0040, 0x7007,
-	0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x77b8, 0x0005,
-	0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x903e, 0x2061, 0x1800,
-	0x61cc, 0x81ff, 0x1904, 0x783a, 0x6130, 0xd194, 0x1904, 0x7864,
-	0xa878, 0x2070, 0x9e82, 0x1cd0, 0x0a04, 0x782e, 0x6064, 0x9e02,
-	0x1a04, 0x782e, 0x7120, 0x9186, 0x0006, 0x1904, 0x7820, 0x7010,
-	0x905d, 0x0904, 0x783a, 0xb800, 0xd0e4, 0x1904, 0x785e, 0x2061,
-	0x1a41, 0x6100, 0x9184, 0x0301, 0x9086, 0x0001, 0x15a0, 0x7024,
-	0xd0dc, 0x1904, 0x7867, 0xa883, 0x0000, 0xa803, 0x0000, 0x2908,
-	0x7014, 0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904, 0x786a,
-	0x080c, 0x5386, 0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e, 0x2e60,
-	0x080c, 0x814f, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2048, 0xa800,
-	0x9005, 0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904, 0x786a,
-	0x012e, 0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee, 0xa883, 0x0006,
-	0x00be, 0x0804, 0x7888, 0xd184, 0x0db8, 0xd1c4, 0x1190, 0x00a0,
-	0xa974, 0x080c, 0x623e, 0x15d0, 0xb800, 0xd0e4, 0x15b8, 0x7120,
-	0x9186, 0x0007, 0x1118, 0xa883, 0x0002, 0x0490, 0xa883, 0x0008,
-	0x0478, 0xa883, 0x000e, 0x0460, 0xa883, 0x0017, 0x0448, 0xa883,
-	0x0035, 0x0430, 0x080c, 0x538a, 0xd0fc, 0x01e8, 0xa878, 0x2070,
-	0x9e82, 0x1cd0, 0x02c0, 0x6064, 0x9e02, 0x12a8, 0x7120, 0x9186,
-	0x0006, 0x1188, 0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc, 0x0158,
-	0x2039, 0x0001, 0x7000, 0x9086, 0x0007, 0x1904, 0x77c4, 0x7003,
-	0x0002, 0x0804, 0x77c4, 0xa883, 0x0028, 0x0010, 0xa883, 0x0029,
-	0x012e, 0x00ee, 0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8, 0xa883,
-	0x0045, 0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b, 0x0014, 0x080c,
-	0xd0e5, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2009, 0x003e, 0x0058,
-	0x2009, 0x0004, 0x0040, 0x2009, 0x0006, 0x0028, 0x2009, 0x0016,
-	0x0010, 0x2009, 0x0001, 0xa884, 0x9084, 0xff00, 0x9105, 0xa886,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x688c, 0x012e, 0x0005, 0x080c,
-	0x101d, 0x0005, 0x00d6, 0x080c, 0x8146, 0x00de, 0x0005, 0x00d6,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x0040, 0x702c, 0xd084,
-	0x01d8, 0x908c, 0x0780, 0x190c, 0x7923, 0xd09c, 0x11a8, 0x2071,
-	0x1800, 0x70bc, 0x90ea, 0x0040, 0x0278, 0x8001, 0x70be, 0x702c,
-	0x2048, 0xa800, 0x702e, 0x9006, 0xa802, 0xa806, 0x2071, 0x0040,
-	0x2900, 0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de, 0x0005,
-	0x0006, 0x9084, 0x0780, 0x190c, 0x7923, 0x000e, 0x0005, 0x00d6,
-	0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74,
-	0x9282, 0x0004, 0x1a04, 0x7914, 0xa97c, 0x9188, 0x1000, 0x2104,
-	0x905d, 0xb804, 0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff,
-	0x9084, 0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c, 0x9ddc, 0x1118,
-	0x080c, 0x9e7f, 0x05a8, 0x6212, 0xa874, 0x0002, 0x78f2, 0x78f7,
-	0x78fa, 0x7900, 0x2019, 0x0002, 0x080c, 0xd4a6, 0x0060, 0x080c,
-	0xd442, 0x0048, 0x2019, 0x0002, 0xa980, 0x080c, 0xd45d, 0x0018,
-	0xa980, 0x080c, 0xd442, 0x080c, 0x9e32, 0xa887, 0x0000, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x688c, 0x012e, 0x00be, 0x001e, 0x002e,
-	0x003e, 0x00ce, 0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887,
-	0x0002, 0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38,
-	0xa887, 0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04, 0x7925, 0x0006,
-	0x0016, 0x2001, 0x8003, 0x0006, 0x0804, 0x0dbd, 0x2001, 0x1833,
-	0x2004, 0x9005, 0x0005, 0x0005, 0x00f6, 0x2079, 0x0300, 0x2001,
-	0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c,
-	0xd1ec, 0x1120, 0x080c, 0x14a7, 0x00fe, 0x0005, 0x2001, 0x020d,
-	0x2003, 0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c,
-	0x0904, 0x79a5, 0x68bc, 0x90aa, 0x0005, 0x0a04, 0x7f54, 0x7d44,
-	0x7c40, 0x9584, 0x00f6, 0x1510, 0x9484, 0x7000, 0x0140, 0x908a,
-	0x2000, 0x1260, 0x9584, 0x0700, 0x8007, 0x0804, 0x79ac, 0x7000,
-	0x9084, 0xff00, 0x9086, 0x8100, 0x0da8, 0x00b0, 0x9484, 0x0fff,
-	0x1130, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0, 0x080c,
-	0xd88c, 0x080c, 0x7e99, 0x7817, 0x0140, 0x00a8, 0x9584, 0x0076,
-	0x1118, 0x080c, 0x7ef7, 0x19c0, 0xd5a4, 0x0148, 0x0046, 0x0056,
-	0x080c, 0x7a07, 0x080c, 0x21cd, 0x005e, 0x004e, 0x0020, 0x080c,
-	0xd88c, 0x7817, 0x0140, 0x080c, 0x6fb2, 0x0168, 0x2001, 0x0111,
-	0x2004, 0xd08c, 0x0140, 0x688f, 0x0000, 0x2001, 0x0110, 0x2003,
-	0x0008, 0x2003, 0x0000, 0x080c, 0x79e8, 0x2001, 0x19c1, 0x2004,
-	0x9005, 0x090c, 0x8973, 0x0005, 0x0002, 0x79be, 0x7cbb, 0x79b5,
-	0x79b5, 0x79b5, 0x79b5, 0x79b5, 0x79b5, 0x7817, 0x0140, 0x2001,
-	0x19c1, 0x2004, 0x9005, 0x090c, 0x8973, 0x0005, 0x7000, 0x908c,
-	0xff00, 0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x688e, 0x9286,
-	0x2000, 0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x53e7,
-	0x0070, 0x080c, 0x7a27, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c,
-	0x7bf6, 0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x7dc9, 0x7817,
-	0x0140, 0x2001, 0x19c1, 0x2004, 0x9005, 0x090c, 0x8973, 0x0005,
-	0x2001, 0x1810, 0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, 0x2004,
-	0x9086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048, 0x2518,
-	0x080c, 0x48d9, 0x003e, 0x002e, 0x0005, 0x0036, 0x0046, 0x0056,
-	0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036,
-	0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019,
-	0xffff, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0160, 0x2001, 0x1800,
-	0x2004, 0x9086, 0x0003, 0x1130, 0x0026, 0x2011, 0x8048, 0x080c,
-	0x48d9, 0x002e, 0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, 0x00b6,
-	0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, 0x9096, 0x0001, 0x0120,
-	0x9096, 0x0023, 0x1904, 0x7bc7, 0x9186, 0x0023, 0x15c0, 0x080c,
-	0x7e5e, 0x0904, 0x7bc7, 0x6120, 0x9186, 0x0001, 0x0150, 0x9186,
-	0x0004, 0x0138, 0x9186, 0x0008, 0x0120, 0x9186, 0x000a, 0x1904,
-	0x7bc7, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1130, 0x2009,
-	0x0015, 0x080c, 0x9eac, 0x0804, 0x7bc7, 0x908e, 0x0214, 0x0118,
-	0x908e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c, 0x9eac, 0x0804,
-	0x7bc7, 0x908e, 0x0100, 0x1904, 0x7bc7, 0x7034, 0x9005, 0x1904,
-	0x7bc7, 0x2009, 0x0016, 0x080c, 0x9eac, 0x0804, 0x7bc7, 0x9186,
-	0x0022, 0x1904, 0x7bc7, 0x7030, 0x908e, 0x0300, 0x1580, 0x68d8,
-	0xd0a4, 0x0528, 0xc0b5, 0x68da, 0x7100, 0x918c, 0x00ff, 0x697a,
-	0x7004, 0x687e, 0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006,
-	0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x26ac, 0x7932, 0x7936,
-	0x001e, 0x000e, 0x00fe, 0x080c, 0x2663, 0x695a, 0x703c, 0x00e6,
-	0x2071, 0x0140, 0x7086, 0x2071, 0x1800, 0x70b2, 0x00ee, 0x7034,
-	0x9005, 0x1904, 0x7bc7, 0x2009, 0x0017, 0x0804, 0x7b77, 0x908e,
-	0x0400, 0x1190, 0x7034, 0x9005, 0x1904, 0x7bc7, 0x080c, 0x6fb2,
-	0x0120, 0x2009, 0x001d, 0x0804, 0x7b77, 0x68d8, 0xc0a5, 0x68da,
-	0x2009, 0x0030, 0x0804, 0x7b77, 0x908e, 0x0500, 0x1140, 0x7034,
-	0x9005, 0x1904, 0x7bc7, 0x2009, 0x0018, 0x0804, 0x7b77, 0x908e,
-	0x2010, 0x1120, 0x2009, 0x0019, 0x0804, 0x7b77, 0x908e, 0x2110,
-	0x1120, 0x2009, 0x001a, 0x0804, 0x7b77, 0x908e, 0x5200, 0x1140,
-	0x7034, 0x9005, 0x1904, 0x7bc7, 0x2009, 0x001b, 0x0804, 0x7b77,
-	0x908e, 0x5000, 0x1140, 0x7034, 0x9005, 0x1904, 0x7bc7, 0x2009,
-	0x001c, 0x0804, 0x7b77, 0x908e, 0x1300, 0x1120, 0x2009, 0x0034,
-	0x0804, 0x7b77, 0x908e, 0x1200, 0x1140, 0x7034, 0x9005, 0x1904,
-	0x7bc7, 0x2009, 0x0024, 0x0804, 0x7b77, 0x908c, 0xff00, 0x918e,
-	0x2400, 0x1170, 0x2009, 0x002d, 0x2001, 0x1810, 0x2004, 0xd09c,
-	0x0904, 0x7b77, 0x080c, 0xc8b8, 0x1904, 0x7bc7, 0x0804, 0x7b75,
-	0x908c, 0xff00, 0x918e, 0x5300, 0x1120, 0x2009, 0x002a, 0x0804,
-	0x7b77, 0x908e, 0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, 0x7b77,
-	0x908e, 0x6104, 0x1528, 0x2029, 0x0205, 0x2011, 0x026d, 0x8208,
-	0x2204, 0x9082, 0x0004, 0x8004, 0x8004, 0x20a8, 0x2011, 0x8015,
-	0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x48d9, 0x004e, 0x8108,
-	0x0f04, 0x7b43, 0x9186, 0x0280, 0x1d88, 0x2504, 0x8000, 0x202a,
-	0x2009, 0x0260, 0x0c58, 0x202b, 0x0000, 0x2009, 0x0023, 0x0478,
-	0x908e, 0x6000, 0x1118, 0x2009, 0x003f, 0x0448, 0x908e, 0x7800,
-	0x1118, 0x2009, 0x0045, 0x0418, 0x908e, 0x1000, 0x1118, 0x2009,
-	0x004e, 0x00e8, 0x908e, 0x6300, 0x1118, 0x2009, 0x004a, 0x00b8,
-	0x908c, 0xff00, 0x918e, 0x5600, 0x1118, 0x2009, 0x004f, 0x0078,
-	0x908c, 0xff00, 0x918e, 0x5700, 0x1118, 0x2009, 0x0050, 0x0038,
-	0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016,
-	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2663, 0x1904,
-	0x7bca, 0x080c, 0x61de, 0x1904, 0x7bca, 0xbe12, 0xbd16, 0x001e,
-	0x0016, 0x080c, 0x6fb2, 0x01c0, 0x68d8, 0xd08c, 0x1148, 0x7000,
-	0x9084, 0x00ff, 0x1188, 0x7004, 0x9084, 0xff00, 0x1168, 0x0040,
-	0x6878, 0x9606, 0x1148, 0x687c, 0x9506, 0x9084, 0xff00, 0x1120,
-	0x9584, 0x00ff, 0xb8b2, 0x0080, 0xb8b0, 0x9005, 0x1168, 0x9186,
-	0x0046, 0x1150, 0x6878, 0x9606, 0x1138, 0x687c, 0x9506, 0x9084,
-	0xff00, 0x1110, 0x001e, 0x0098, 0x080c, 0x9ddc, 0x01a8, 0x2b08,
-	0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x9186, 0x004c,
-	0x1110, 0x6023, 0x000a, 0x0016, 0x001e, 0x080c, 0x9eac, 0x00ce,
-	0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec,
-	0x0120, 0x2011, 0x8049, 0x080c, 0x48d9, 0x080c, 0x9e7f, 0x0d90,
-	0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x0016,
-	0x9186, 0x0017, 0x0118, 0x9186, 0x0030, 0x1128, 0x6007, 0x0009,
-	0x6017, 0x2900, 0x0020, 0x6007, 0x0051, 0x6017, 0x0000, 0x602f,
-	0x0009, 0x6003, 0x0001, 0x080c, 0x8439, 0x08a0, 0x080c, 0x30fd,
-	0x1140, 0x7010, 0x9084, 0xff00, 0x8007, 0x908e, 0x0008, 0x1108,
-	0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0033, 0x11e8, 0x080c, 0x7e5e, 0x0904, 0x7c53,
-	0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1140, 0x7034, 0x9005,
-	0x15d0, 0x2009, 0x0015, 0x080c, 0x9eac, 0x04a8, 0x908e, 0x0100,
-	0x1590, 0x7034, 0x9005, 0x1578, 0x2009, 0x0016, 0x080c, 0x9eac,
-	0x0450, 0x9186, 0x0032, 0x1538, 0x7030, 0x908e, 0x1400, 0x1518,
-	0x2009, 0x0038, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c,
-	0x080c, 0x2663, 0x11b8, 0x080c, 0x61de, 0x11a0, 0xbe12, 0xbd16,
-	0x080c, 0x9ddc, 0x0178, 0x2b08, 0x6112, 0x080c, 0xbf8c, 0x6023,
-	0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0x9eac, 0x080c, 0x8973,
-	0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6,
-	0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8,
-	0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f,
-	0x0804, 0x7cb5, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804,
-	0x7cb5, 0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011,
-	0x0000, 0x2019, 0x1836, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9,
-	0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f,
-	0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0,
-	0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600,
-	0x9706, 0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745,
-	0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6,
-	0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04, 0x7c8a, 0x82ff, 0x1118,
-	0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee,
-	0x004e, 0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184,
-	0x000f, 0x0002, 0x7cd2, 0x7cd2, 0x7cd2, 0x7e70, 0x7cd2, 0x7cdb,
-	0x7d06, 0x7d94, 0x7cd2, 0x7cd2, 0x7cd2, 0x7cd2, 0x7cd2, 0x7cd2,
-	0x7cd2, 0x7cd2, 0x7817, 0x0140, 0x2001, 0x19c1, 0x2004, 0x9005,
-	0x090c, 0x8973, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120,
-	0x2160, 0x9c8c, 0x0007, 0x11c0, 0x9c8a, 0x1cd0, 0x02a8, 0x6864,
-	0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910,
-	0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a,
-	0x2009, 0x0046, 0x080c, 0x9eac, 0x7817, 0x0140, 0x2001, 0x19c1,
-	0x2004, 0x9005, 0x090c, 0x8973, 0x00be, 0x0005, 0x00b6, 0x00c6,
-	0x9484, 0x0fff, 0x0904, 0x7d6a, 0x7110, 0xd1bc, 0x1904, 0x7d6a,
-	0x7108, 0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00,
-	0x15b0, 0x81ff, 0x15a0, 0x9080, 0x3138, 0x200d, 0x918c, 0xff00,
-	0x810f, 0x2001, 0x0080, 0x9106, 0x0904, 0x7d6a, 0x080c, 0x61de,
-	0x1904, 0x7d6a, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15d8, 0xba04,
-	0x9294, 0xff00, 0x9286, 0x0600, 0x11a0, 0x080c, 0x9ddc, 0x05e8,
-	0x2b08, 0x7028, 0x604a, 0x702c, 0x6046, 0x6112, 0x6023, 0x0006,
-	0x7120, 0x610a, 0x7130, 0x6156, 0x2009, 0x0044, 0x080c, 0xcb14,
-	0x0408, 0x080c, 0x6562, 0x1138, 0xb807, 0x0606, 0x0c30, 0x190c,
-	0x7c57, 0x11c0, 0x0898, 0x080c, 0x9ddc, 0x2b08, 0x0198, 0x6112,
-	0x6023, 0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007,
-	0x0005, 0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x8439,
-	0x080c, 0x8973, 0x7817, 0x0140, 0x2001, 0x19c1, 0x2004, 0x9005,
-	0x090c, 0x8973, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e, 0x2004,
-	0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48d9, 0x080c, 0x9e7f,
-	0x0d48, 0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130,
-	0x6156, 0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x08b0, 0x00b6, 0x7110, 0xd1bc, 0x01e8,
-	0x7020, 0x2060, 0x9c84, 0x0007, 0x11c0, 0x9c82, 0x1cd0, 0x02a8,
+	0x6822, 0x00de, 0x2071, 0x1906, 0x701c, 0x2048, 0x7010, 0x8001,
+	0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005,
+	0x0005, 0x00d6, 0x2008, 0x2069, 0x19ca, 0x683c, 0x9005, 0x0760,
+	0x0158, 0x9186, 0x0003, 0x0540, 0x2001, 0x1814, 0x2004, 0x2009,
+	0x1a97, 0x210c, 0x9102, 0x1500, 0x0126, 0x2091, 0x8000, 0x2069,
+	0x0050, 0x693c, 0x6838, 0x9106, 0x0190, 0x0e04, 0x6b73, 0x2069,
+	0x0000, 0x6837, 0x8040, 0x6833, 0x0012, 0x6883, 0x8040, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2069,
+	0x19ca, 0x683f, 0xffff, 0x012e, 0x00de, 0x0126, 0x2091, 0x8000,
+	0x1e0c, 0x6c28, 0x701c, 0x904d, 0x0540, 0x2001, 0x005b, 0x2004,
+	0x9094, 0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071, 0x1906, 0x700f,
+	0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f,
+	0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069,
+	0x0050, 0x6822, 0x00de, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012,
+	0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x701c, 0x904d, 0x0160, 0x7010, 0x8001,
+	0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x080c,
+	0x101d, 0x0005, 0x012e, 0x0005, 0x2091, 0x8000, 0x0e04, 0x6bbe,
+	0x0006, 0x0016, 0x2001, 0x8004, 0x0006, 0x0804, 0x0dbd, 0x0096,
+	0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01c0, 0xc084, 0x7046,
+	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
+	0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x190c, 0x1187, 0x00fe, 0x009e, 0x0005, 0x782c, 0x9094,
+	0x0780, 0x1991, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824,
+	0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009, 0x182f,
+	0x210c, 0x918a, 0x0040, 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee,
+	0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
+	0x080c, 0x7f46, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bbc, 0xd0a4,
+	0x19f0, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000,
+	0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x1187, 0x00ee, 0x00fe, 0x009e, 0x0005,
+	0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046,
+	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
+	0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x190c, 0x1187, 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6bbc, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824,
+	0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
+	0x080c, 0x7f46, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bbc, 0xd0a4,
+	0x1d70, 0x00d6, 0x2069, 0x0050, 0x693c, 0x2069, 0x1919, 0x6808,
+	0x690a, 0x2069, 0x19ca, 0x9102, 0x1118, 0x683c, 0x9005, 0x1328,
+	0x2001, 0x191a, 0x200c, 0x810d, 0x693e, 0x00de, 0x00ee, 0x00fe,
+	0x0005, 0x7094, 0x908a, 0x0029, 0x1a0c, 0x0db4, 0x9082, 0x001d,
+	0x001b, 0x6027, 0x1e00, 0x0005, 0x6d50, 0x6cd6, 0x6cf2, 0x6d1c,
+	0x6d3f, 0x6d7f, 0x6d91, 0x6cf2, 0x6d67, 0x6c91, 0x6cbf, 0x6c90,
+	0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1180, 0x6808,
+	0x9005, 0x1518, 0x7097, 0x0028, 0x2069, 0x195f, 0x2d04, 0x7002,
+	0x080c, 0x70d4, 0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, 0x7097,
+	0x0028, 0x2069, 0x195f, 0x2d04, 0x7002, 0x6028, 0x9085, 0x0600,
+	0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a32, 0x080c,
+	0x195a, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6,
+	0x2069, 0x0200, 0x6804, 0x9005, 0x1178, 0x6808, 0x9005, 0x1160,
+	0x7097, 0x0028, 0x2069, 0x195f, 0x2d04, 0x7002, 0x080c, 0x716e,
+	0x6028, 0x9085, 0x0600, 0x602a, 0x00de, 0x0005, 0x0006, 0x2001,
+	0x0090, 0x080c, 0x2b16, 0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c,
+	0x6dfe, 0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x7097,
+	0x0020, 0x080c, 0x6dfe, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097,
+	0x001f, 0x0005, 0x2001, 0x0088, 0x080c, 0x2b16, 0x6124, 0xd1cc,
+	0x11e8, 0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8,
+	0x080c, 0x1984, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c,
+	0x6fc7, 0x2001, 0x0080, 0x080c, 0x2b16, 0x7097, 0x0028, 0x0058,
+	0x7097, 0x001e, 0x0040, 0x7097, 0x001d, 0x0028, 0x7097, 0x0020,
+	0x0010, 0x7097, 0x001f, 0x0005, 0x080c, 0x1984, 0x60e3, 0x0001,
+	0x600c, 0xc0b4, 0x600e, 0x080c, 0x6fc7, 0x2001, 0x0080, 0x080c,
+	0x2b16, 0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130,
+	0x9184, 0x1e00, 0x1158, 0x7097, 0x0028, 0x0040, 0x7097, 0x001e,
+	0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f, 0x0005, 0x2001,
+	0x00a0, 0x080c, 0x2b16, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138,
+	0x080c, 0x1984, 0x7097, 0x001e, 0x0010, 0x7097, 0x001d, 0x0005,
+	0x080c, 0x6e81, 0x6124, 0xd1dc, 0x1188, 0x080c, 0x6dfe, 0x0016,
+	0x080c, 0x1984, 0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x7097,
+	0x001e, 0x0020, 0x7097, 0x001f, 0x080c, 0x6dfe, 0x0005, 0x0006,
+	0x2001, 0x00a0, 0x080c, 0x2b16, 0x000e, 0x6124, 0xd1d4, 0x1160,
+	0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x7097, 0x001e,
+	0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x0021, 0x0005, 0x080c,
+	0x6e81, 0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140,
+	0x7097, 0x001e, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f,
+	0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2b16, 0x000e, 0x6124,
+	0xd1d4, 0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158,
+	0x7097, 0x001e, 0x0040, 0x7097, 0x001d, 0x0028, 0x7097, 0x0020,
+	0x0010, 0x7097, 0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6,
+	0x0126, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091,
+	0x8000, 0x080c, 0x6f9b, 0x11d8, 0x2001, 0x180c, 0x200c, 0xd1b4,
+	0x01b0, 0xc1b4, 0x2102, 0x6027, 0x0200, 0x080c, 0x2a5f, 0x6024,
+	0xd0cc, 0x0148, 0x2001, 0x00a0, 0x080c, 0x2b16, 0x080c, 0x727f,
+	0x080c, 0x5cda, 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c,
+	0x6fb5, 0x0150, 0x080c, 0x6fac, 0x1138, 0x2001, 0x0001, 0x080c,
+	0x260e, 0x080c, 0x6f73, 0x00a0, 0x080c, 0x6e7e, 0x0178, 0x2001,
+	0x0001, 0x080c, 0x260e, 0x7094, 0x9086, 0x001e, 0x0120, 0x7094,
+	0x9086, 0x0022, 0x1118, 0x7097, 0x0025, 0x0010, 0x7097, 0x0021,
+	0x012e, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011,
+	0x6e0f, 0x080c, 0x80f5, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064,
+	0x2011, 0x6e0f, 0x080c, 0x80ec, 0x002e, 0x001e, 0x0005, 0x00e6,
+	0x00f6, 0x0016, 0x080c, 0x93ad, 0x2071, 0x1800, 0x080c, 0x6dac,
+	0x001e, 0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x0126, 0x080c, 0x93ad, 0x2061, 0x0100,
+	0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x6028, 0xc09c,
+	0x602a, 0x2011, 0x0003, 0x080c, 0x9772, 0x2011, 0x0002, 0x080c,
+	0x977c, 0x080c, 0x9663, 0x080c, 0x80a1, 0x0036, 0x901e, 0x080c,
+	0x96d9, 0x003e, 0x60e3, 0x0000, 0x080c, 0xd8d5, 0x080c, 0xd8f0,
+	0x2009, 0x0004, 0x080c, 0x2a65, 0x080c, 0x2980, 0x2001, 0x1800,
+	0x2003, 0x0004, 0x6027, 0x0008, 0x2011, 0x6e0f, 0x080c, 0x80f5,
+	0x080c, 0x6fb5, 0x0118, 0x9006, 0x080c, 0x2b16, 0x080c, 0x0b8f,
+	0x2001, 0x0001, 0x080c, 0x260e, 0x012e, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011,
+	0x6e1c, 0x2071, 0x19ca, 0x701c, 0x9206, 0x1118, 0x7018, 0x9005,
+	0x0110, 0x9085, 0x0001, 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c,
+	0x0005, 0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0, 0x01b8, 0x2001,
+	0x00c0, 0x080c, 0x2b16, 0x0156, 0x20a9, 0x002d, 0x1d04, 0x6e8e,
+	0x2091, 0x6000, 0x1f04, 0x6e8e, 0x015e, 0x00d6, 0x2069, 0x1800,
+	0x6898, 0x8001, 0x0220, 0x0118, 0x689a, 0x00de, 0x0005, 0x689b,
+	0x0014, 0x68e4, 0xd0dc, 0x0dc8, 0x6800, 0x9086, 0x0001, 0x1da8,
+	0x080c, 0x8101, 0x0c90, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
+	0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x728e, 0x2001, 0x193d,
+	0x2003, 0x0000, 0x9006, 0x7096, 0x60e2, 0x6886, 0x080c, 0x26d9,
+	0x9006, 0x080c, 0x2b16, 0x080c, 0x5b99, 0x6027, 0xffff, 0x602b,
+	0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2001, 0x194d,
+	0x200c, 0x9186, 0x0000, 0x0158, 0x9186, 0x0001, 0x0158, 0x9186,
+	0x0002, 0x0158, 0x9186, 0x0003, 0x0158, 0x0804, 0x6f63, 0x7097,
+	0x0022, 0x0040, 0x7097, 0x0021, 0x0028, 0x7097, 0x0023, 0x0010,
+	0x7097, 0x0024, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001,
+	0x080c, 0x26d9, 0x0026, 0x080c, 0x9dc8, 0x002e, 0x7000, 0x908e,
+	0x0004, 0x0118, 0x602b, 0x0028, 0x0010, 0x602b, 0x0020, 0x0156,
+	0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150,
+	0x012e, 0x015e, 0x080c, 0xc22c, 0x0118, 0x9006, 0x080c, 0x2b40,
+	0x0804, 0x6f6f, 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c,
+	0x2a5f, 0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c, 0x2b16,
+	0x1f04, 0x6f0d, 0x080c, 0x6ff2, 0x012e, 0x015e, 0x080c, 0x6fac,
+	0x01a8, 0x6044, 0x9005, 0x0168, 0x6050, 0x0006, 0x9085, 0x0020,
+	0x6052, 0x080c, 0x6ff2, 0x9006, 0x8001, 0x1df0, 0x000e, 0x6052,
+	0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c, 0x6ff2, 0x080c, 0xc22c,
+	0x0118, 0x9006, 0x080c, 0x2b40, 0x0016, 0x0026, 0x7000, 0x908e,
+	0x0004, 0x0130, 0x2009, 0x00c8, 0x2011, 0x6e1c, 0x080c, 0x80b3,
+	0x002e, 0x001e, 0x080c, 0x7f3d, 0x7034, 0xc085, 0x7036, 0x2001,
+	0x194d, 0x2003, 0x0004, 0x080c, 0x6c79, 0x080c, 0x6fac, 0x0138,
+	0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, 0x7284, 0x00ee,
+	0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
+	0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x7f54, 0x080c, 0x7f46,
+	0x080c, 0x728e, 0x2001, 0x193d, 0x2003, 0x0000, 0x9006, 0x7096,
+	0x60e2, 0x6886, 0x080c, 0x26d9, 0x9006, 0x080c, 0x2b16, 0x6043,
+	0x0090, 0x6043, 0x0010, 0x6027, 0xffff, 0x602b, 0x182f, 0x00ee,
+	0x00de, 0x00ce, 0x0005, 0x0006, 0x2001, 0x194c, 0x2004, 0x9086,
+	0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c, 0x5393, 0x9084, 0x0030,
+	0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x080c, 0x5393, 0x9084,
+	0x0030, 0x9086, 0x0030, 0x000e, 0x0005, 0x0006, 0x080c, 0x5393,
+	0x9084, 0x0030, 0x9086, 0x0010, 0x000e, 0x0005, 0x0006, 0x080c,
+	0x5393, 0x9084, 0x0030, 0x9086, 0x0020, 0x000e, 0x0005, 0x0036,
+	0x0016, 0x2001, 0x180c, 0x2004, 0x908c, 0x0013, 0x0180, 0x0020,
+	0x080c, 0x26f9, 0x900e, 0x0028, 0x080c, 0x6563, 0x1dc8, 0x2009,
+	0x0002, 0x2019, 0x0028, 0x080c, 0x2fa7, 0x9006, 0x0019, 0x001e,
+	0x003e, 0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130, 0x080c,
+	0xc225, 0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef, 0x2072,
+	0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, 0x0006,
+	0x6004, 0x0006, 0x6028, 0x0006, 0x0016, 0x6138, 0x6050, 0x9084,
+	0xfbff, 0x9085, 0x2000, 0x6052, 0x613a, 0x20a9, 0x0012, 0x1d04,
+	0x7007, 0x2091, 0x6000, 0x1f04, 0x7007, 0x602f, 0x0100, 0x602f,
+	0x0000, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x613a,
+	0x001e, 0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x602a, 0x000e,
+	0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887,
+	0x0001, 0x2001, 0x0001, 0x080c, 0x26d9, 0x2001, 0x00a0, 0x0006,
+	0x080c, 0xc22c, 0x000e, 0x0130, 0x080c, 0x2b34, 0x9006, 0x080c,
+	0x2b40, 0x0010, 0x080c, 0x2b16, 0x000e, 0x6052, 0x6050, 0x0006,
+	0xc0e5, 0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x29d4, 0x00fe,
+	0x000e, 0x6052, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6,
+	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800,
+	0x6020, 0x9084, 0x0080, 0x0138, 0x2001, 0x180c, 0x200c, 0xc1c5,
+	0x2102, 0x0804, 0x70c6, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102,
+	0x6028, 0x9084, 0xe1ff, 0x602a, 0x6027, 0x0200, 0x2001, 0x0090,
+	0x080c, 0x2b16, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1518, 0x1d04,
+	0x7074, 0x2091, 0x6000, 0x1f04, 0x7074, 0x2011, 0x0003, 0x080c,
+	0x9772, 0x2011, 0x0002, 0x080c, 0x977c, 0x080c, 0x9663, 0x901e,
+	0x080c, 0x96d9, 0x2001, 0x00a0, 0x080c, 0x2b16, 0x080c, 0x727f,
+	0x080c, 0x5cda, 0x080c, 0xc22c, 0x0110, 0x080c, 0x0d22, 0x9085,
+	0x0001, 0x0490, 0x86ff, 0x1110, 0x080c, 0x1984, 0x60e3, 0x0000,
+	0x2001, 0x0002, 0x080c, 0x26d9, 0x60e2, 0x2001, 0x0080, 0x080c,
+	0x2b16, 0x20a9, 0x0366, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c,
+	0x2a5f, 0x6024, 0x910c, 0x0138, 0x1d04, 0x70ab, 0x2091, 0x6000,
+	0x1f04, 0x70ab, 0x0810, 0x6028, 0x9085, 0x1e00, 0x602a, 0x70b0,
+	0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x080c, 0xc22c,
+	0x0110, 0x080c, 0x0d22, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e,
+	0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036,
+	0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x7000,
+	0x9086, 0x0003, 0x1168, 0x2001, 0x020b, 0x2004, 0x9084, 0x5540,
+	0x9086, 0x5540, 0x1128, 0x2069, 0x1a48, 0x2d04, 0x8000, 0x206a,
+	0x2069, 0x0140, 0x6020, 0x9084, 0x00c0, 0x0120, 0x6884, 0x9005,
+	0x1904, 0x7139, 0x2001, 0x0088, 0x080c, 0x2b16, 0x9006, 0x60e2,
+	0x6886, 0x080c, 0x26d9, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118,
+	0x6808, 0x9005, 0x01c0, 0x6028, 0x9084, 0xfbff, 0x602a, 0x6027,
+	0x0400, 0x2069, 0x195f, 0x7000, 0x206a, 0x7097, 0x0026, 0x7003,
+	0x0001, 0x20a9, 0x0002, 0x1d04, 0x711b, 0x2091, 0x6000, 0x1f04,
+	0x711b, 0x0804, 0x7166, 0x2069, 0x0140, 0x20a9, 0x0384, 0x6027,
+	0x1e00, 0x2009, 0x1e00, 0x080c, 0x2a5f, 0x6024, 0x910c, 0x0508,
+	0x9084, 0x1a00, 0x11f0, 0x1d04, 0x7127, 0x2091, 0x6000, 0x1f04,
+	0x7127, 0x2011, 0x0003, 0x080c, 0x9772, 0x2011, 0x0002, 0x080c,
+	0x977c, 0x080c, 0x9663, 0x901e, 0x080c, 0x96d9, 0x2001, 0x00a0,
+	0x080c, 0x2b16, 0x080c, 0x727f, 0x080c, 0x5cda, 0x9085, 0x0001,
+	0x00a8, 0x2001, 0x0080, 0x080c, 0x2b16, 0x2069, 0x0140, 0x60e3,
+	0x0000, 0x70b0, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886,
+	0x2001, 0x0002, 0x080c, 0x26d9, 0x60e2, 0x9006, 0x00ee, 0x00de,
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016,
+	0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071,
+	0x1800, 0x6020, 0x9084, 0x00c0, 0x01c8, 0x2011, 0x0003, 0x080c,
+	0x9772, 0x2011, 0x0002, 0x080c, 0x977c, 0x080c, 0x9663, 0x901e,
+	0x080c, 0x96d9, 0x2069, 0x0140, 0x2001, 0x00a0, 0x080c, 0x2b16,
+	0x080c, 0x727f, 0x080c, 0x5cda, 0x0804, 0x7200, 0x2001, 0x180c,
+	0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102, 0x080c, 0x6e04, 0x2069,
+	0x0140, 0x2001, 0x0080, 0x080c, 0x2b16, 0x60e3, 0x0000, 0x2069,
+	0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x0180, 0x6028,
+	0x9084, 0xfdff, 0x602a, 0x6027, 0x0200, 0x2069, 0x195f, 0x7000,
+	0x206a, 0x7097, 0x0027, 0x7003, 0x0001, 0x0804, 0x7200, 0x6027,
+	0x1e00, 0x2009, 0x1e00, 0x080c, 0x2a5f, 0x6024, 0x910c, 0x01c8,
+	0x9084, 0x1c00, 0x11b0, 0x1d04, 0x71bf, 0x0006, 0x0016, 0x00c6,
+	0x00d6, 0x00e6, 0x080c, 0x7f85, 0x00ee, 0x00de, 0x00ce, 0x001e,
+	0x000e, 0x00e6, 0x2071, 0x19ca, 0x7018, 0x00ee, 0x9005, 0x19f8,
+	0x01f8, 0x0026, 0x2011, 0x6e1c, 0x080c, 0x8021, 0x2011, 0x6e0f,
+	0x080c, 0x80f5, 0x002e, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b0,
+	0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x0002,
+	0x080c, 0x26d9, 0x60e2, 0x2001, 0x180c, 0x200c, 0xc1b4, 0x2102,
+	0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005,
+	0x0156, 0x0016, 0x0026, 0x0036, 0x0046, 0x00c6, 0x00e6, 0x2061,
+	0x0100, 0x2071, 0x1800, 0x080c, 0xc225, 0x1904, 0x726d, 0x7130,
+	0xd184, 0x1170, 0x080c, 0x3135, 0x0138, 0xc18d, 0x7132, 0x2011,
+	0x1854, 0x2214, 0xd2ac, 0x1120, 0x7030, 0xd08c, 0x0904, 0x726d,
+	0x2011, 0x1854, 0x220c, 0x0438, 0x0016, 0x2019, 0x000e, 0x080c,
+	0xd4c7, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x9186, 0x007e,
+	0x01a0, 0x9186, 0x0080, 0x0188, 0x080c, 0x6247, 0x1170, 0x2120,
+	0x9006, 0x0016, 0x2009, 0x000e, 0x080c, 0xd54b, 0x2009, 0x0001,
+	0x2011, 0x0100, 0x080c, 0x8218, 0x001e, 0x8108, 0x1f04, 0x7236,
+	0x00be, 0x015e, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002,
+	0x2019, 0x0004, 0x080c, 0x2fa7, 0x001e, 0x0078, 0x0156, 0x00b6,
+	0x20a9, 0x007f, 0x900e, 0x080c, 0x6247, 0x1110, 0x080c, 0x5cf4,
+	0x8108, 0x1f04, 0x7263, 0x00be, 0x015e, 0x080c, 0x1984, 0x080c,
+	0x9dc8, 0x60e3, 0x0000, 0x080c, 0x5cda, 0x080c, 0x6ecd, 0x00ee,
+	0x00ce, 0x004e, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001,
+	0x194d, 0x2003, 0x0001, 0x0005, 0x2001, 0x194d, 0x2003, 0x0000,
+	0x0005, 0x2001, 0x194c, 0x2003, 0xaaaa, 0x0005, 0x2001, 0x194c,
+	0x2003, 0x0000, 0x0005, 0x2071, 0x18f0, 0x7003, 0x0000, 0x7007,
+	0x0000, 0x080c, 0x1004, 0x090c, 0x0db4, 0xa8ab, 0xdcb0, 0x2900,
+	0x704e, 0x080c, 0x1004, 0x090c, 0x0db4, 0xa8ab, 0xdcb0, 0x2900,
+	0x7052, 0xa867, 0x0000, 0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005,
+	0x00e6, 0x2071, 0x0040, 0x6848, 0x9005, 0x1118, 0x9085, 0x0001,
+	0x04b0, 0x6840, 0x9005, 0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002,
+	0x6854, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6850, 0x7002,
+	0x6854, 0x7006, 0x6858, 0x700a, 0x685c, 0x700e, 0x6840, 0x9005,
+	0x1110, 0x7012, 0x7016, 0x6848, 0x701a, 0x701c, 0x9085, 0x0040,
+	0x701e, 0x2001, 0x0019, 0x7036, 0x702b, 0x0001, 0x2001, 0x0004,
+	0x200c, 0x918c, 0xfff7, 0x918d, 0x8000, 0x2102, 0x00d6, 0x2069,
+	0x18f0, 0x6807, 0x0001, 0x00de, 0x080c, 0x7880, 0x9006, 0x00ee,
+	0x0005, 0x900e, 0x0156, 0x20a9, 0x0006, 0x8003, 0x2011, 0x0100,
+	0x2214, 0x9296, 0x0008, 0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08,
+	0x1f04, 0x72f5, 0x015e, 0x0005, 0x2079, 0x0040, 0x2071, 0x18f0,
+	0x7004, 0x0002, 0x7314, 0x7315, 0x734c, 0x73a7, 0x74e8, 0x7312,
+	0x7312, 0x7512, 0x080c, 0x0db4, 0x0005, 0x2079, 0x0040, 0x782c,
+	0x908c, 0x0780, 0x190c, 0x790c, 0xd0a4, 0x01f0, 0x7824, 0x2048,
+	0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x0040,
+	0x0608, 0x00b8, 0x2001, 0x1800, 0x200c, 0x9186, 0x0003, 0x1160,
+	0x7104, 0x9186, 0x0004, 0x0140, 0x9186, 0x0007, 0x0128, 0x9186,
+	0x0003, 0x19e8, 0x080c, 0x73a7, 0x782c, 0xd09c, 0x090c, 0x7880,
+	0x0005, 0x9082, 0x005a, 0x1218, 0x2100, 0x003b, 0x0c18, 0x080c,
+	0x73dd, 0x0c90, 0x00e3, 0x08f0, 0x0005, 0x73dd, 0x73dd, 0x73dd,
+	0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73ff, 0x73dd, 0x73dd,
+	0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd,
+	0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd,
+	0x73dd, 0x73e9, 0x73dd, 0x75e7, 0x73dd, 0x73dd, 0x73dd, 0x73ff,
+	0x73dd, 0x73e9, 0x7628, 0x7669, 0x76b0, 0x76c4, 0x73dd, 0x73dd,
+	0x73ff, 0x73e9, 0x73dd, 0x73dd, 0x74bc, 0x776f, 0x778a, 0x73dd,
+	0x73ff, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x74b2, 0x778a, 0x73dd,
+	0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd,
+	0x7413, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd,
+	0x73dd, 0x73dd, 0x78b0, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd,
+	0x7427, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x73dd, 0x2079,
+	0x0040, 0x7004, 0x9086, 0x0003, 0x1198, 0x782c, 0x080c, 0x78a9,
+	0xd0a4, 0x0170, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864,
+	0x9084, 0x00ff, 0x908a, 0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9,
+	0x080c, 0x7880, 0x0005, 0x73dd, 0x73e9, 0x75d3, 0x73dd, 0x73e9,
+	0x73dd, 0x73e9, 0x73e9, 0x73dd, 0x73e9, 0x75d3, 0x73e9, 0x73e9,
+	0x73e9, 0x73e9, 0x73e9, 0x73dd, 0x73e9, 0x75d3, 0x73dd, 0x73dd,
+	0x73e9, 0x73dd, 0x73dd, 0x73dd, 0x73e9, 0x00e6, 0x2071, 0x18f0,
+	0x2009, 0x0400, 0x0071, 0x00ee, 0x0005, 0x2009, 0x1000, 0x0049,
+	0x0005, 0x2009, 0x2000, 0x0029, 0x0005, 0x2009, 0x0800, 0x0009,
+	0x0005, 0x7007, 0x0001, 0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6891, 0x012e, 0x0005, 0xa864,
+	0x8007, 0x9084, 0x00ff, 0x0d08, 0x8001, 0x1120, 0x7007, 0x0001,
+	0x0804, 0x7591, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a,
+	0x704b, 0x7591, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0968,
+	0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x75ac, 0x7007, 0x0003,
+	0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x75ac, 0x0005, 0xa864,
+	0x8007, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x73e5, 0x7007,
+	0x0001, 0x2009, 0x1833, 0x210c, 0x81ff, 0x1904, 0x7489, 0xa994,
+	0x9186, 0x006f, 0x0188, 0x9186, 0x0074, 0x15b0, 0x0026, 0x2011,
+	0x0010, 0x080c, 0x658f, 0x002e, 0x0578, 0x0016, 0xa998, 0x080c,
+	0x65d9, 0x001e, 0x1548, 0x0400, 0x080c, 0x6f9b, 0x0140, 0xa897,
+	0x4005, 0xa89b, 0x0016, 0x2001, 0x0030, 0x900e, 0x0438, 0x0026,
+	0x2011, 0x8008, 0x080c, 0x658f, 0x002e, 0x01b0, 0x0016, 0x0026,
+	0x0036, 0xa998, 0xaaa0, 0xab9c, 0x918d, 0x8000, 0x080c, 0x65d9,
+	0x003e, 0x002e, 0x001e, 0x1140, 0xa897, 0x4005, 0xa89b, 0x4009,
+	0x2001, 0x0030, 0x900e, 0x0050, 0xa868, 0x9084, 0x00ff, 0xa86a,
+	0xa883, 0x0000, 0x080c, 0x5f09, 0x1108, 0x0005, 0x0126, 0x2091,
+	0x8000, 0xa867, 0x0139, 0xa87a, 0xa982, 0x080c, 0x6891, 0x012e,
+	0x0ca0, 0xa994, 0x9186, 0x0071, 0x0904, 0x7437, 0x9186, 0x0064,
+	0x0904, 0x7437, 0x9186, 0x007c, 0x0904, 0x7437, 0x9186, 0x0028,
+	0x0904, 0x7437, 0x9186, 0x0038, 0x0904, 0x7437, 0x9186, 0x0078,
+	0x0904, 0x7437, 0x9186, 0x005f, 0x0904, 0x7437, 0x9186, 0x0056,
+	0x0904, 0x7437, 0xa897, 0x4005, 0xa89b, 0x0001, 0x2001, 0x0030,
+	0x900e, 0x0860, 0xa87c, 0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120,
+	0x7007, 0x0001, 0x0804, 0x77a1, 0x2900, 0x7016, 0x701a, 0x20a9,
+	0x0004, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0030, 0x2098, 0x7050,
+	0x2040, 0xa060, 0x20e8, 0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003,
+	0xa888, 0x7012, 0x9082, 0x0401, 0x1a04, 0x73ed, 0xaab4, 0x928a,
+	0x0002, 0x1a04, 0x73ed, 0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105,
+	0x0118, 0x2001, 0x754f, 0x0018, 0x9280, 0x7545, 0x2005, 0x7056,
+	0x7010, 0x9015, 0x0904, 0x7530, 0x080c, 0x1004, 0x1118, 0x7007,
+	0x0004, 0x0005, 0x2900, 0x7022, 0x7054, 0x2060, 0xe000, 0xa866,
+	0x7050, 0x2040, 0xa95c, 0xe004, 0x9100, 0xa076, 0xa860, 0xa072,
+	0xe008, 0x920a, 0x1210, 0x900e, 0x2200, 0x7112, 0xe20c, 0x8003,
+	0x800b, 0x9296, 0x0004, 0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e,
+	0x080c, 0x10d5, 0xa06c, 0x908e, 0x0100, 0x0170, 0x9086, 0x0200,
+	0x0118, 0x7007, 0x0007, 0x0005, 0x7020, 0x2048, 0x080c, 0x101d,
+	0x7014, 0x2048, 0x0804, 0x73ed, 0x7020, 0x2048, 0x7018, 0xa802,
+	0xa807, 0x0000, 0x2908, 0x2048, 0xa906, 0x711a, 0x0804, 0x74e8,
+	0x7014, 0x2048, 0x7007, 0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8,
+	0xa9bc, 0x9105, 0x0108, 0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x001e, 0x0904, 0x77a1, 0x0804, 0x7591, 0x7547, 0x754b, 0x0002,
+	0x001d, 0x0007, 0x0004, 0x000a, 0x001b, 0x0005, 0x0006, 0x000a,
+	0x001d, 0x0005, 0x0004, 0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804,
+	0x2050, 0xb0c0, 0xb0e2, 0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4,
+	0xb0ce, 0xb6da, 0xb7d6, 0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8,
+	0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c,
+	0xb0ae, 0xb098, 0xb0a2, 0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090,
+	0xb09a, 0xb08c, 0xb096, 0xb088, 0xb08a, 0xb084, 0xb086, 0xb692,
+	0xb78e, 0xb080, 0xb082, 0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074,
+	0xb06e, 0xb67a, 0xb776, 0xb004, 0x9055, 0x1958, 0x006e, 0x007e,
+	0x0005, 0x2009, 0x1833, 0x210c, 0x81ff, 0x1178, 0x080c, 0x5d56,
+	0x1108, 0x0005, 0x080c, 0x6abf, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xbe20, 0x080c, 0x6891, 0x012e, 0x0ca0, 0x080c, 0xc225, 0x1d70,
+	0x2001, 0x0028, 0x900e, 0x0c70, 0x2009, 0x1833, 0x210c, 0x81ff,
+	0x11d8, 0xa888, 0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4,
+	0x0120, 0x080c, 0x5e6b, 0x1138, 0x0005, 0x9006, 0xa87a, 0x080c,
+	0x5de6, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982,
+	0x080c, 0x6891, 0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98,
+	0x2001, 0x0000, 0x0c80, 0x7018, 0xa802, 0x2908, 0x2048, 0xa906,
+	0x711a, 0x7010, 0x8001, 0x7012, 0x0118, 0x7007, 0x0003, 0x0030,
+	0x7014, 0x2048, 0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x00b6,
+	0x7007, 0x0001, 0xa974, 0xa878, 0x9084, 0x00ff, 0x9096, 0x0004,
+	0x0540, 0x20a9, 0x0001, 0x9096, 0x0001, 0x0190, 0x900e, 0x20a9,
+	0x0800, 0x9096, 0x0002, 0x0160, 0x9005, 0x11d8, 0xa974, 0x080c,
+	0x6247, 0x11b8, 0x0066, 0xae80, 0x080c, 0x6357, 0x006e, 0x0088,
+	0x0046, 0x2011, 0x180c, 0x2224, 0xc484, 0x2412, 0x004e, 0x00c6,
+	0x080c, 0x6247, 0x1110, 0x080c, 0x6457, 0x8108, 0x1f04, 0x7610,
+	0x00ce, 0xa87c, 0xd084, 0x1120, 0x080c, 0x101d, 0x00be, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6891, 0x012e, 0x00be, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6567, 0x0580,
+	0x2061, 0x1a40, 0x6100, 0xd184, 0x0178, 0xa888, 0x9084, 0x00ff,
+	0x1550, 0x6000, 0xd084, 0x0520, 0x6004, 0x9005, 0x1538, 0x6003,
+	0x0000, 0x600b, 0x0000, 0x00c8, 0x2011, 0x0001, 0xa890, 0x9005,
+	0x1110, 0x2001, 0x001e, 0x8000, 0x6016, 0xa888, 0x9084, 0x00ff,
+	0x0178, 0x6006, 0xa888, 0x8007, 0x9084, 0x00ff, 0x0148, 0x600a,
+	0xa888, 0x8000, 0x1108, 0xc28d, 0x6202, 0x012e, 0x0804, 0x786a,
+	0x012e, 0x0804, 0x7864, 0x012e, 0x0804, 0x785e, 0x012e, 0x0804,
+	0x7861, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6567,
+	0x05e0, 0x2061, 0x1a40, 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308,
+	0xd08c, 0x1530, 0xac78, 0x9484, 0x0003, 0x0170, 0xa988, 0x918c,
+	0x00ff, 0x8001, 0x1120, 0x2100, 0x9210, 0x0620, 0x0028, 0x8001,
+	0x1508, 0x2100, 0x9212, 0x02f0, 0x9484, 0x000c, 0x0188, 0xa988,
+	0x810f, 0x918c, 0x00ff, 0x9082, 0x0004, 0x1120, 0x2100, 0x9318,
+	0x0288, 0x0030, 0x9082, 0x0004, 0x1168, 0x2100, 0x931a, 0x0250,
+	0xa890, 0x9005, 0x0110, 0x8000, 0x6016, 0x6206, 0x630a, 0x012e,
+	0x0804, 0x786a, 0x012e, 0x0804, 0x7867, 0x012e, 0x0804, 0x7864,
+	0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x2061, 0x1a40, 0x6300,
+	0xd38c, 0x1120, 0x6308, 0x8318, 0x0220, 0x630a, 0x012e, 0x0804,
+	0x7878, 0x012e, 0x0804, 0x7867, 0x00b6, 0x0126, 0x00c6, 0x2091,
+	0x8000, 0x7007, 0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061,
+	0x1a40, 0x6000, 0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888,
+	0x9005, 0x05d8, 0xa88c, 0x9065, 0x0598, 0x2001, 0x1833, 0x2004,
+	0x9005, 0x0118, 0x080c, 0x9e72, 0x0068, 0x6017, 0xf400, 0x605b,
+	0x0000, 0xa97c, 0xd1a4, 0x0110, 0xa980, 0x615a, 0x2009, 0x0041,
+	0x080c, 0x9ebc, 0xa988, 0x918c, 0xff00, 0x9186, 0x2000, 0x1138,
+	0x0026, 0x900e, 0x2011, 0xfdff, 0x080c, 0x8218, 0x002e, 0xa87c,
+	0xd0c4, 0x0148, 0x2061, 0x1a40, 0x6000, 0xd08c, 0x1120, 0x6008,
+	0x8000, 0x0208, 0x600a, 0x00ce, 0x012e, 0x00be, 0x0804, 0x786a,
+	0x00ce, 0x012e, 0x00be, 0x0804, 0x7864, 0xa984, 0x9186, 0x002e,
+	0x0d30, 0x9186, 0x002d, 0x0d18, 0x9186, 0x0045, 0x0510, 0x9186,
+	0x002a, 0x1130, 0x2001, 0x180c, 0x200c, 0xc194, 0x2102, 0x08b8,
+	0x9186, 0x0020, 0x0158, 0x9186, 0x0029, 0x1d10, 0xa974, 0x080c,
+	0x6247, 0x1968, 0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065,
+	0x09b8, 0x6007, 0x0024, 0x2001, 0x1956, 0x2004, 0x601a, 0x0804,
+	0x76ff, 0xa88c, 0x9065, 0x0960, 0x00e6, 0xa890, 0x9075, 0x2001,
+	0x1833, 0x2004, 0x9005, 0x0150, 0x080c, 0x9e72, 0x8eff, 0x0118,
+	0x2e60, 0x080c, 0x9e72, 0x00ee, 0x0804, 0x76ff, 0x6024, 0xc0dc,
+	0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130,
+	0x6007, 0x003b, 0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001,
+	0x080c, 0x83da, 0x080c, 0x896d, 0x00ee, 0x0804, 0x76ff, 0x2061,
+	0x1a40, 0x6000, 0xd084, 0x0190, 0xd08c, 0x1904, 0x7878, 0x0126,
+	0x2091, 0x8000, 0x6204, 0x8210, 0x0220, 0x6206, 0x012e, 0x0804,
+	0x7878, 0x012e, 0xa883, 0x0016, 0x0804, 0x7871, 0xa883, 0x0007,
+	0x0804, 0x7871, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0130, 0x8001,
+	0x1138, 0x7007, 0x0001, 0x0069, 0x0005, 0x080c, 0x73e5, 0x0040,
+	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x77a1,
+	0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x903e, 0x2061,
+	0x1800, 0x61cc, 0x81ff, 0x1904, 0x7823, 0x6130, 0xd194, 0x1904,
+	0x784d, 0xa878, 0x2070, 0x9e82, 0x1cd0, 0x0a04, 0x7817, 0x6064,
+	0x9e02, 0x1a04, 0x7817, 0x7120, 0x9186, 0x0006, 0x1904, 0x7809,
+	0x7010, 0x905d, 0x0904, 0x7823, 0xb800, 0xd0e4, 0x1904, 0x7847,
+	0x2061, 0x1a40, 0x6100, 0x9184, 0x0301, 0x9086, 0x0001, 0x15a0,
+	0x7024, 0xd0dc, 0x1904, 0x7850, 0xa883, 0x0000, 0xa803, 0x0000,
+	0x2908, 0x7014, 0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904,
+	0x7853, 0x080c, 0x538f, 0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e,
+	0x2e60, 0x080c, 0x8138, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2048,
+	0xa800, 0x9005, 0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904,
+	0x7853, 0x012e, 0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee, 0xa883,
+	0x0006, 0x00be, 0x0804, 0x7871, 0xd184, 0x0db8, 0xd1c4, 0x1190,
+	0x00a0, 0xa974, 0x080c, 0x6247, 0x15d0, 0xb800, 0xd0e4, 0x15b8,
+	0x7120, 0x9186, 0x0007, 0x1118, 0xa883, 0x0002, 0x0490, 0xa883,
+	0x0008, 0x0478, 0xa883, 0x000e, 0x0460, 0xa883, 0x0017, 0x0448,
+	0xa883, 0x0035, 0x0430, 0x080c, 0x5393, 0xd0fc, 0x01e8, 0xa878,
+	0x2070, 0x9e82, 0x1cd0, 0x02c0, 0x6064, 0x9e02, 0x12a8, 0x7120,
+	0x9186, 0x0006, 0x1188, 0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc,
+	0x0158, 0x2039, 0x0001, 0x7000, 0x9086, 0x0007, 0x1904, 0x77ad,
+	0x7003, 0x0002, 0x0804, 0x77ad, 0xa883, 0x0028, 0x0010, 0xa883,
+	0x0029, 0x012e, 0x00ee, 0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8,
+	0xa883, 0x0045, 0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b, 0x0014,
+	0x080c, 0xd106, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2009, 0x003e,
+	0x0058, 0x2009, 0x0004, 0x0040, 0x2009, 0x0006, 0x0028, 0x2009,
+	0x0016, 0x0010, 0x2009, 0x0001, 0xa884, 0x9084, 0xff00, 0x9105,
+	0xa886, 0x0126, 0x2091, 0x8000, 0x080c, 0x6891, 0x012e, 0x0005,
+	0x080c, 0x101d, 0x0005, 0x00d6, 0x080c, 0x812f, 0x00de, 0x0005,
+	0x00d6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x0040, 0x702c,
+	0xd084, 0x01d8, 0x908c, 0x0780, 0x190c, 0x790c, 0xd09c, 0x11a8,
+	0x2071, 0x1800, 0x70bc, 0x90ea, 0x0040, 0x0278, 0x8001, 0x70be,
+	0x702c, 0x2048, 0xa800, 0x702e, 0x9006, 0xa802, 0xa806, 0x2071,
+	0x0040, 0x2900, 0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de,
+	0x0005, 0x0006, 0x9084, 0x0780, 0x190c, 0x790c, 0x000e, 0x0005,
+	0x00d6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6, 0x7007, 0x0001,
+	0xaa74, 0x9282, 0x0004, 0x1a04, 0x78fd, 0xa97c, 0x9188, 0x1000,
+	0x2104, 0x905d, 0xb804, 0xd284, 0x0140, 0x05e8, 0x8007, 0x9084,
+	0x00ff, 0x9084, 0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c, 0x9dec,
+	0x1118, 0x080c, 0x9e8f, 0x05a8, 0x6212, 0xa874, 0x0002, 0x78db,
+	0x78e0, 0x78e3, 0x78e9, 0x2019, 0x0002, 0x080c, 0xd4c7, 0x0060,
+	0x080c, 0xd463, 0x0048, 0x2019, 0x0002, 0xa980, 0x080c, 0xd47e,
+	0x0018, 0xa980, 0x080c, 0xd463, 0x080c, 0x9e42, 0xa887, 0x0000,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6891, 0x012e, 0x00be, 0x001e,
+	0x002e, 0x003e, 0x00ce, 0x00de, 0x0005, 0xa887, 0x0006, 0x0c80,
+	0xa887, 0x0002, 0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887, 0x0004,
+	0x0c38, 0xa887, 0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04, 0x790e,
+	0x0006, 0x0016, 0x2001, 0x8003, 0x0006, 0x0804, 0x0dbd, 0x2001,
+	0x1833, 0x2004, 0x9005, 0x0005, 0x0005, 0x00f6, 0x2079, 0x0300,
+	0x2001, 0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218,
+	0x210c, 0xd1ec, 0x1120, 0x080c, 0x14a9, 0x00fe, 0x0005, 0x2001,
+	0x020d, 0x2003, 0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, 0x781c,
+	0xd08c, 0x0904, 0x798e, 0x68bc, 0x90aa, 0x0005, 0x0a04, 0x7f3d,
+	0x7d44, 0x7c40, 0x9584, 0x00f6, 0x1510, 0x9484, 0x7000, 0x0140,
+	0x908a, 0x2000, 0x1260, 0x9584, 0x0700, 0x8007, 0x0804, 0x7995,
+	0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x0da8, 0x00b0, 0x9484,
+	0x0fff, 0x1130, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0,
+	0x080c, 0xd8ad, 0x080c, 0x7e82, 0x7817, 0x0140, 0x00a8, 0x9584,
+	0x0076, 0x1118, 0x080c, 0x7ee0, 0x19c0, 0xd5a4, 0x0148, 0x0046,
+	0x0056, 0x080c, 0x79f0, 0x080c, 0x21cf, 0x005e, 0x004e, 0x0020,
+	0x080c, 0xd8ad, 0x7817, 0x0140, 0x080c, 0x6f9b, 0x0168, 0x2001,
+	0x0111, 0x2004, 0xd08c, 0x0140, 0x688f, 0x0000, 0x2001, 0x0110,
+	0x2003, 0x0008, 0x2003, 0x0000, 0x080c, 0x79d1, 0x2001, 0x19c0,
+	0x2004, 0x9005, 0x090c, 0x896d, 0x0005, 0x0002, 0x79a7, 0x7ca4,
+	0x799e, 0x799e, 0x799e, 0x799e, 0x799e, 0x799e, 0x7817, 0x0140,
+	0x2001, 0x19c0, 0x2004, 0x9005, 0x090c, 0x896d, 0x0005, 0x7000,
+	0x908c, 0xff00, 0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x688e,
+	0x9286, 0x2000, 0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c,
+	0x53f0, 0x0070, 0x080c, 0x7a10, 0x0058, 0x9286, 0x3000, 0x1118,
+	0x080c, 0x7bdf, 0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x7db2,
+	0x7817, 0x0140, 0x2001, 0x19c0, 0x2004, 0x9005, 0x090c, 0x896d,
+	0x0005, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0178, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048,
+	0x2518, 0x080c, 0x48e9, 0x003e, 0x002e, 0x0005, 0x0036, 0x0046,
+	0x0056, 0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050,
+	0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40,
+	0x2019, 0xffff, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0160, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0003, 0x1130, 0x0026, 0x2011, 0x8048,
+	0x080c, 0x48e9, 0x002e, 0x00fe, 0x005e, 0x004e, 0x003e, 0x0005,
+	0x00b6, 0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, 0x9096, 0x0001,
+	0x0120, 0x9096, 0x0023, 0x1904, 0x7bb0, 0x9186, 0x0023, 0x15c0,
+	0x080c, 0x7e47, 0x0904, 0x7bb0, 0x6120, 0x9186, 0x0001, 0x0150,
+	0x9186, 0x0004, 0x0138, 0x9186, 0x0008, 0x0120, 0x9186, 0x000a,
+	0x1904, 0x7bb0, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1130,
+	0x2009, 0x0015, 0x080c, 0x9ebc, 0x0804, 0x7bb0, 0x908e, 0x0214,
+	0x0118, 0x908e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c, 0x9ebc,
+	0x0804, 0x7bb0, 0x908e, 0x0100, 0x1904, 0x7bb0, 0x7034, 0x9005,
+	0x1904, 0x7bb0, 0x2009, 0x0016, 0x080c, 0x9ebc, 0x0804, 0x7bb0,
+	0x9186, 0x0022, 0x1904, 0x7bb0, 0x7030, 0x908e, 0x0300, 0x1580,
+	0x68d8, 0xd0a4, 0x0528, 0xc0b5, 0x68da, 0x7100, 0x918c, 0x00ff,
+	0x697a, 0x7004, 0x687e, 0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea,
+	0x0006, 0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x26ae, 0x7932,
+	0x7936, 0x001e, 0x000e, 0x00fe, 0x080c, 0x2665, 0x695a, 0x703c,
+	0x00e6, 0x2071, 0x0140, 0x7086, 0x2071, 0x1800, 0x70b2, 0x00ee,
+	0x7034, 0x9005, 0x1904, 0x7bb0, 0x2009, 0x0017, 0x0804, 0x7b60,
+	0x908e, 0x0400, 0x1190, 0x7034, 0x9005, 0x1904, 0x7bb0, 0x080c,
+	0x6f9b, 0x0120, 0x2009, 0x001d, 0x0804, 0x7b60, 0x68d8, 0xc0a5,
+	0x68da, 0x2009, 0x0030, 0x0804, 0x7b60, 0x908e, 0x0500, 0x1140,
+	0x7034, 0x9005, 0x1904, 0x7bb0, 0x2009, 0x0018, 0x0804, 0x7b60,
+	0x908e, 0x2010, 0x1120, 0x2009, 0x0019, 0x0804, 0x7b60, 0x908e,
+	0x2110, 0x1120, 0x2009, 0x001a, 0x0804, 0x7b60, 0x908e, 0x5200,
+	0x1140, 0x7034, 0x9005, 0x1904, 0x7bb0, 0x2009, 0x001b, 0x0804,
+	0x7b60, 0x908e, 0x5000, 0x1140, 0x7034, 0x9005, 0x1904, 0x7bb0,
+	0x2009, 0x001c, 0x0804, 0x7b60, 0x908e, 0x1300, 0x1120, 0x2009,
+	0x0034, 0x0804, 0x7b60, 0x908e, 0x1200, 0x1140, 0x7034, 0x9005,
+	0x1904, 0x7bb0, 0x2009, 0x0024, 0x0804, 0x7b60, 0x908c, 0xff00,
+	0x918e, 0x2400, 0x1170, 0x2009, 0x002d, 0x2001, 0x1810, 0x2004,
+	0xd09c, 0x0904, 0x7b60, 0x080c, 0xc8d7, 0x1904, 0x7bb0, 0x0804,
+	0x7b5e, 0x908c, 0xff00, 0x918e, 0x5300, 0x1120, 0x2009, 0x002a,
+	0x0804, 0x7b60, 0x908e, 0x0f00, 0x1120, 0x2009, 0x0020, 0x0804,
+	0x7b60, 0x908e, 0x6104, 0x1528, 0x2029, 0x0205, 0x2011, 0x026d,
+	0x8208, 0x2204, 0x9082, 0x0004, 0x8004, 0x8004, 0x20a8, 0x2011,
+	0x8015, 0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x48e9, 0x004e,
+	0x8108, 0x0f04, 0x7b2c, 0x9186, 0x0280, 0x1d88, 0x2504, 0x8000,
+	0x202a, 0x2009, 0x0260, 0x0c58, 0x202b, 0x0000, 0x2009, 0x0023,
+	0x0478, 0x908e, 0x6000, 0x1118, 0x2009, 0x003f, 0x0448, 0x908e,
+	0x7800, 0x1118, 0x2009, 0x0045, 0x0418, 0x908e, 0x1000, 0x1118,
+	0x2009, 0x004e, 0x00e8, 0x908e, 0x6300, 0x1118, 0x2009, 0x004a,
+	0x00b8, 0x908c, 0xff00, 0x918e, 0x5600, 0x1118, 0x2009, 0x004f,
+	0x0078, 0x908c, 0xff00, 0x918e, 0x5700, 0x1118, 0x2009, 0x0050,
+	0x0038, 0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c,
+	0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2665,
+	0x1904, 0x7bb3, 0x080c, 0x61e7, 0x1904, 0x7bb3, 0xbe12, 0xbd16,
+	0x001e, 0x0016, 0x080c, 0x6f9b, 0x01c0, 0x68d8, 0xd08c, 0x1148,
+	0x7000, 0x9084, 0x00ff, 0x1188, 0x7004, 0x9084, 0xff00, 0x1168,
+	0x0040, 0x6878, 0x9606, 0x1148, 0x687c, 0x9506, 0x9084, 0xff00,
+	0x1120, 0x9584, 0x00ff, 0xb8b2, 0x0080, 0xb8b0, 0x9005, 0x1168,
+	0x9186, 0x0046, 0x1150, 0x6878, 0x9606, 0x1138, 0x687c, 0x9506,
+	0x9084, 0xff00, 0x1110, 0x001e, 0x0098, 0x080c, 0x9dec, 0x01a8,
+	0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x9186,
+	0x004c, 0x1110, 0x6023, 0x000a, 0x0016, 0x001e, 0x080c, 0x9ebc,
+	0x00ce, 0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004,
+	0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48e9, 0x080c, 0x9e8f,
+	0x0d90, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e,
+	0x0016, 0x9186, 0x0017, 0x0118, 0x9186, 0x0030, 0x1128, 0x6007,
+	0x0009, 0x6017, 0x2900, 0x0020, 0x6007, 0x0051, 0x6017, 0x0000,
+	0x602f, 0x0009, 0x6003, 0x0001, 0x080c, 0x8422, 0x08a0, 0x080c,
+	0x30ff, 0x1140, 0x7010, 0x9084, 0xff00, 0x8007, 0x908e, 0x0008,
+	0x1108, 0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c,
+	0xff00, 0x810f, 0x9186, 0x0033, 0x11e8, 0x080c, 0x7e47, 0x0904,
+	0x7c3c, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1140, 0x7034,
+	0x9005, 0x15d0, 0x2009, 0x0015, 0x080c, 0x9ebc, 0x04a8, 0x908e,
+	0x0100, 0x1590, 0x7034, 0x9005, 0x1578, 0x2009, 0x0016, 0x080c,
+	0x9ebc, 0x0450, 0x9186, 0x0032, 0x1538, 0x7030, 0x908e, 0x1400,
+	0x1518, 0x2009, 0x0038, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211,
+	0x220c, 0x080c, 0x2665, 0x11b8, 0x080c, 0x61e7, 0x11a0, 0xbe12,
+	0xbd16, 0x080c, 0x9dec, 0x0178, 0x2b08, 0x6112, 0x080c, 0xbfa6,
+	0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0x9ebc, 0x080c,
+	0x896d, 0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005,
+	0x00b6, 0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff,
+	0x11b8, 0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009,
+	0x007f, 0x0804, 0x7c9e, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e,
+	0x0804, 0x7c9e, 0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0,
+	0x2011, 0x0000, 0x2019, 0x1836, 0x231c, 0xd3ac, 0x0130, 0x9026,
+	0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9,
+	0x077f, 0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff,
+	0x11d0, 0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10,
+	0x2600, 0x9706, 0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0,
+	0x9745, 0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118,
+	0x94c6, 0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04, 0x7c73, 0x82ff,
+	0x1118, 0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de,
+	0x00ee, 0x004e, 0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f,
+	0x9184, 0x000f, 0x0002, 0x7cbb, 0x7cbb, 0x7cbb, 0x7e59, 0x7cbb,
+	0x7cc4, 0x7cef, 0x7d7d, 0x7cbb, 0x7cbb, 0x7cbb, 0x7cbb, 0x7cbb,
+	0x7cbb, 0x7cbb, 0x7cbb, 0x7817, 0x0140, 0x2001, 0x19c0, 0x2004,
+	0x9005, 0x090c, 0x896d, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8,
+	0x7120, 0x2160, 0x9c8c, 0x0007, 0x11c0, 0x9c8a, 0x1cd0, 0x02a8,
 	0x6864, 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158,
 	0xb910, 0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124,
-	0x610a, 0x2009, 0x0045, 0x080c, 0x9eac, 0x7817, 0x0140, 0x2001,
-	0x19c1, 0x2004, 0x9005, 0x090c, 0x8973, 0x00be, 0x0005, 0x6120,
-	0x9186, 0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001,
-	0x0005, 0x080c, 0x30fd, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007,
-	0x9086, 0x0000, 0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208,
-	0x000b, 0x0005, 0x7de0, 0x7de1, 0x7de0, 0x7de0, 0x7e40, 0x7e4f,
-	0x0005, 0x00b6, 0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904,
-	0x7e3e, 0x700c, 0x7108, 0x080c, 0x2663, 0x1904, 0x7e3e, 0x080c,
-	0x61de, 0x1904, 0x7e3e, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8,
-	0x080c, 0x6562, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6, 0x080c,
-	0x7e5e, 0x00ce, 0x05d8, 0x080c, 0x9ddc, 0x2b08, 0x05b8, 0x6112,
-	0x080c, 0xbf8c, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009, 0x0088,
-	0x080c, 0x9eac, 0x0458, 0x080c, 0x6562, 0x0148, 0x9086, 0x0004,
-	0x0130, 0x080c, 0x656a, 0x0118, 0x9086, 0x0004, 0x1180, 0x080c,
-	0x9ddc, 0x2b08, 0x01d8, 0x6112, 0x080c, 0xbf8c, 0x6023, 0x0005,
-	0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0x9eac, 0x0078, 0x080c,
-	0x9ddc, 0x2b08, 0x0158, 0x6112, 0x080c, 0xbf8c, 0x6023, 0x0004,
-	0x7120, 0x610a, 0x2009, 0x0001, 0x080c, 0x9eac, 0x00be, 0x0005,
-	0x7110, 0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x7dbf, 0x1130,
-	0x7124, 0x610a, 0x2009, 0x0089, 0x080c, 0x9eac, 0x0005, 0x7110,
-	0xd1bc, 0x0158, 0x0059, 0x0148, 0x080c, 0x7dbf, 0x1130, 0x7124,
-	0x610a, 0x2009, 0x008a, 0x080c, 0x9eac, 0x0005, 0x7020, 0x2060,
-	0x9c84, 0x0007, 0x1158, 0x9c82, 0x1cd0, 0x0240, 0x2001, 0x1819,
-	0x2004, 0x9c02, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8,
-	0x00b6, 0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84, 0x0007,
-	0x11b0, 0x9c82, 0x1cd0, 0x0298, 0x6864, 0x9c02, 0x1280, 0x7008,
-	0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1140, 0x700c,
-	0xb914, 0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0x9eac, 0x7817,
-	0x0140, 0x2001, 0x19c1, 0x2004, 0x9005, 0x090c, 0x8973, 0x00be,
-	0x0005, 0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049,
-	0x0005, 0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009,
-	0x0005, 0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086,
-	0xc000, 0x05d0, 0x080c, 0x9ddc, 0x05b8, 0x0066, 0x00c6, 0x0046,
-	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2663, 0x15a0,
-	0x080c, 0x61de, 0x1588, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce,
-	0x6012, 0x080c, 0xbf8c, 0x080c, 0x0feb, 0x0510, 0x2900, 0x605a,
-	0x9006, 0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9,
-	0x000e, 0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003,
-	0x006e, 0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001,
-	0x080c, 0x8439, 0x080c, 0x8973, 0x00fe, 0x009e, 0x00ce, 0x0005,
-	0x080c, 0x9e32, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6,
-	0x7000, 0x908c, 0xff00, 0x9184, 0xf000, 0x810f, 0x9086, 0x2000,
-	0x1904, 0x7f4e, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111, 0x2004,
-	0x9005, 0x1904, 0x7f50, 0x7030, 0x908e, 0x0400, 0x0904, 0x7f50,
-	0x908e, 0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e, 0x0300,
-	0x11d8, 0x2009, 0x1836, 0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580,
-	0x080c, 0x6520, 0x0558, 0x68ac, 0x9084, 0x00ff, 0x7100, 0x918c,
-	0x00ff, 0x9106, 0x1518, 0x687c, 0x69ac, 0x918c, 0xff00, 0x9105,
-	0x7104, 0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4,
-	0x11a8, 0x908e, 0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e,
-	0x5000, 0x09b8, 0x0058, 0x9186, 0x0023, 0x1140, 0x080c, 0x7e5e,
-	0x0128, 0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006, 0x0010,
-	0x9085, 0x0001, 0x00ce, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7800,
-	0xc0e5, 0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800,
-	0x7834, 0xd084, 0x1130, 0x2079, 0x0200, 0x7800, 0x9085, 0x1200,
-	0x7802, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7034, 0xc084,
-	0x7036, 0x00ee, 0x0005, 0x2071, 0x19cb, 0x7003, 0x0003, 0x700f,
-	0x0361, 0x9006, 0x701a, 0x7072, 0x7012, 0x7017, 0x1cd0, 0x7007,
-	0x0000, 0x7026, 0x702b, 0x93c2, 0x7032, 0x7037, 0x9430, 0x703f,
-	0xffff, 0x7042, 0x7047, 0x5225, 0x704a, 0x705b, 0x80d3, 0x080c,
-	0x1004, 0x090c, 0x0db4, 0x2900, 0x703a, 0xa867, 0x0003, 0xa86f,
-	0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19cb, 0x1d04, 0x8027,
-	0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x1510, 0x2001, 0x1875,
-	0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1, 0x0000,
-	0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c, 0x0db4, 0x700f, 0x0361,
-	0x7007, 0x0001, 0x0126, 0x2091, 0x8000, 0x080c, 0x8118, 0x7040,
-	0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044, 0x080f, 0x0018,
-	0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020, 0x8001,
-	0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186, 0x03e8,
-	0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f, 0x7030,
-	0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f, 0x0009,
-	0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c, 0x953d, 0x0010,
-	0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310, 0x8001, 0x703e,
-	0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a, 0x1148, 0x704b,
-	0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e, 0x7058, 0x080f,
-	0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, 0x0158, 0x706c,
-	0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109, 0x7172, 0x1110,
-	0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a, 0x1138, 0x700b,
-	0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f, 0x012e, 0x7004,
-	0x0002, 0x804f, 0x8050, 0x806c, 0x00e6, 0x2071, 0x19cb, 0x7018,
-	0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005,
-	0x00e6, 0x0006, 0x2071, 0x19cb, 0x701c, 0x9206, 0x1120, 0x701a,
-	0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071,
-	0x19cb, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005, 0x0005,
-	0x00b6, 0x7110, 0x080c, 0x623e, 0x1168, 0xb888, 0x8001, 0x0250,
-	0xb88a, 0x1140, 0x0126, 0x2091, 0x8000, 0x0016, 0x080c, 0x8973,
-	0x001e, 0x012e, 0x8108, 0x9182, 0x0800, 0x0218, 0x900e, 0x7007,
-	0x0002, 0x7112, 0x00be, 0x0005, 0x7014, 0x2060, 0x0126, 0x2091,
-	0x8000, 0x6040, 0x9005, 0x0128, 0x8001, 0x6042, 0x1110, 0x080c,
-	0xbe1d, 0x6018, 0x9005, 0x0528, 0x8001, 0x601a, 0x1510, 0x6120,
-	0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x11c8, 0x080c, 0xbb17,
-	0x01b0, 0x6014, 0x2048, 0xa884, 0x908a, 0x199a, 0x0280, 0x9082,
-	0x1999, 0xa886, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003,
-	0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0xd0e4, 0x0110, 0x080c,
-	0xb815, 0x012e, 0x9c88, 0x0018, 0x7116, 0x2001, 0x1819, 0x2004,
-	0x9102, 0x0220, 0x7017, 0x1cd0, 0x7007, 0x0000, 0x0005, 0x00e6,
-	0x2071, 0x19cb, 0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005,
-	0x2001, 0x19d4, 0x2003, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19cb,
-	0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, 0x19d7, 0x2013,
-	0x0000, 0x0005, 0x00e6, 0x2071, 0x19cb, 0x711a, 0x721e, 0x700b,
-	0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, 0x7054, 0x8000, 0x7056,
-	0x2001, 0x19d9, 0x2044, 0xa06c, 0x9086, 0x0000, 0x0150, 0x7068,
-	0xa09a, 0x7064, 0xa096, 0x7060, 0xa092, 0x705c, 0xa08e, 0x080c,
-	0x10d5, 0x002e, 0x008e, 0x0005, 0x0006, 0x0016, 0x0096, 0x00a6,
-	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c, 0x7f9c,
-	0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
-	0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x19cb, 0x7172, 0x7276,
-	0x706f, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19cb,
-	0x7074, 0x9206, 0x1110, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005,
-	0x2069, 0x1800, 0x69e4, 0xd1e4, 0x1518, 0x0026, 0xd1ec, 0x0140,
-	0x6a50, 0x6870, 0x9202, 0x0288, 0x8117, 0x9294, 0x00c0, 0x0088,
-	0x9184, 0x0007, 0x01a0, 0x8109, 0x9184, 0x0007, 0x0110, 0x69e6,
-	0x0070, 0x8107, 0x9084, 0x0007, 0x910d, 0x8107, 0x9106, 0x9094,
-	0x00c0, 0x9184, 0xff3f, 0x9205, 0x68e6, 0x080c, 0x0ecb, 0x002e,
-	0x0005, 0x00c6, 0x2061, 0x1a41, 0x00ce, 0x0005, 0x9184, 0x000f,
-	0x8003, 0x8003, 0x8003, 0x9080, 0x1a41, 0x2060, 0x0005, 0xa884,
-	0x908a, 0x199a, 0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a41,
-	0x6014, 0x00ce, 0x9005, 0x1130, 0x2001, 0x001e, 0x0018, 0x908e,
-	0xffff, 0x01b0, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c,
-	0x908c, 0x00c0, 0x918e, 0x00c0, 0x0904, 0x81d9, 0xd0b4, 0x1168,
-	0xd0bc, 0x1904, 0x81b2, 0x2009, 0x0006, 0x080c, 0x8206, 0x0005,
-	0x900e, 0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc, 0x0160, 0x908c,
-	0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x8200, 0x908c, 0x2020,
-	0x918e, 0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8, 0x2009, 0x1875,
-	0x2104, 0xd084, 0x1138, 0x87ff, 0x1120, 0x2009, 0x0043, 0x0804,
-	0x9eac, 0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042, 0x0804, 0x9eac,
-	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6024,
-	0xc0cd, 0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890, 0x602e, 0xa88c,
-	0x6032, 0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, 0x918e,
-	0x0003, 0x1904, 0x8200, 0x908c, 0x2020, 0x918e, 0x2020, 0x0170,
-	0x0076, 0x00f6, 0x2c78, 0x080c, 0x1648, 0x00fe, 0x007e, 0x87ff,
-	0x1120, 0x2009, 0x0042, 0x080c, 0x9eac, 0x0005, 0x6110, 0x00b6,
-	0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124, 0xc1cd, 0x6126,
-	0x0c38, 0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8,
-	0x9084, 0x0003, 0x908e, 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009,
-	0x0041, 0x080c, 0x9eac, 0x0005, 0x00b9, 0x0ce8, 0x87ff, 0x1dd8,
-	0x2009, 0x0043, 0x080c, 0x9eac, 0x0cb0, 0x6110, 0x00b6, 0x2158,
-	0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd, 0x6126, 0x0c00,
-	0x2009, 0x0004, 0x0019, 0x0005, 0x2009, 0x0001, 0x0096, 0x080c,
-	0xbb17, 0x0518, 0x6014, 0x2048, 0xa982, 0xa800, 0x6016, 0x9186,
-	0x0001, 0x1188, 0xa97c, 0x918c, 0x8100, 0x918e, 0x8100, 0x1158,
-	0x00c6, 0x2061, 0x1a41, 0x6200, 0xd28c, 0x1120, 0x6204, 0x8210,
-	0x0208, 0x6206, 0x00ce, 0x080c, 0x66c6, 0x6014, 0x904d, 0x0076,
-	0x2039, 0x0000, 0x190c, 0x814f, 0x007e, 0x009e, 0x0005, 0x0156,
-	0x00c6, 0x2061, 0x1a41, 0x6000, 0x81ff, 0x0110, 0x9205, 0x0008,
-	0x9204, 0x6002, 0x00ce, 0x015e, 0x0005, 0x6800, 0xd08c, 0x1138,
-	0x6808, 0x9005, 0x0120, 0x8001, 0x680a, 0x9085, 0x0001, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010, 0x9006,
-	0x8004, 0x2019, 0x0100, 0x231c, 0x93a6, 0x0008, 0x1118, 0x8086,
-	0x818e, 0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x1208, 0x9200,
-	0x1f04, 0x8251, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e, 0x0020,
-	0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x004e, 0x003e, 0x012e, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005,
-	0x0510, 0x911a, 0x1600, 0x8213, 0x2039, 0x0100, 0x273c, 0x97be,
-	0x0008, 0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x0228, 0x911a,
-	0x1220, 0x1f04, 0x827b, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04,
-	0x827b, 0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e,
-	0x007e, 0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8,
-	0x0126, 0x2091, 0x2800, 0x2079, 0x19b8, 0x012e, 0x00d6, 0x2069,
-	0x19b8, 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000,
-	0x2069, 0x0200, 0x080c, 0x9c3f, 0x0401, 0x080c, 0x9c2a, 0x00e9,
-	0x080c, 0x9c2d, 0x00d1, 0x080c, 0x9c30, 0x00b9, 0x080c, 0x9c33,
-	0x00a1, 0x080c, 0x9c36, 0x0089, 0x080c, 0x9c39, 0x0071, 0x080c,
-	0x9c3c, 0x0059, 0x01de, 0x014e, 0x015e, 0x2069, 0x0004, 0x2d04,
-	0x9085, 0x8001, 0x206a, 0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1,
-	0x0240, 0x2001, 0x0000, 0x4004, 0x0005, 0x00c6, 0x6027, 0x0001,
-	0x7804, 0x9084, 0x0007, 0x0002, 0x82ee, 0x8312, 0x8351, 0x82f4,
-	0x8312, 0x82ee, 0x82ec, 0x82ec, 0x080c, 0x0db4, 0x080c, 0x80b8,
-	0x080c, 0x8973, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110, 0x00ce,
-	0x0005, 0x2011, 0x5b3a, 0x080c, 0x8038, 0x7828, 0x9092, 0x00c8,
-	0x1228, 0x8000, 0x782a, 0x080c, 0x5b7a, 0x0c88, 0x62c0, 0x080c,
-	0x9c43, 0x080c, 0x5b3a, 0x7807, 0x0003, 0x7827, 0x0000, 0x782b,
-	0x0000, 0x0c28, 0x080c, 0x80b8, 0x6220, 0xd2a4, 0x0160, 0x782b,
-	0x0000, 0x7824, 0x9065, 0x090c, 0x0db4, 0x2009, 0x0013, 0x080c,
-	0x9eac, 0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c, 0x0db4,
-	0x7828, 0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce, 0x080c,
-	0x29ca, 0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d, 0x090c,
-	0x0db4, 0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c, 0x8973,
-	0x0c00, 0x080c, 0x9388, 0x08e8, 0x2011, 0x0130, 0x2214, 0x080c,
-	0x9c43, 0x080c, 0xd8c9, 0x2009, 0x0014, 0x080c, 0x9eac, 0x00ce,
-	0x0880, 0x2001, 0x19d4, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x1160,
+	0x610a, 0x2009, 0x0046, 0x080c, 0x9ebc, 0x7817, 0x0140, 0x2001,
+	0x19c0, 0x2004, 0x9005, 0x090c, 0x896d, 0x00be, 0x0005, 0x00b6,
+	0x00c6, 0x9484, 0x0fff, 0x0904, 0x7d53, 0x7110, 0xd1bc, 0x1904,
+	0x7d53, 0x7108, 0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094,
+	0xff00, 0x15b0, 0x81ff, 0x15a0, 0x9080, 0x313a, 0x200d, 0x918c,
+	0xff00, 0x810f, 0x2001, 0x0080, 0x9106, 0x0904, 0x7d53, 0x080c,
+	0x61e7, 0x1904, 0x7d53, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15d8,
+	0xba04, 0x9294, 0xff00, 0x9286, 0x0600, 0x11a0, 0x080c, 0x9dec,
+	0x05e8, 0x2b08, 0x7028, 0x604a, 0x702c, 0x6046, 0x6112, 0x6023,
+	0x0006, 0x7120, 0x610a, 0x7130, 0x6156, 0x2009, 0x0044, 0x080c,
+	0xcb35, 0x0408, 0x080c, 0x656b, 0x1138, 0xb807, 0x0606, 0x0c30,
+	0x190c, 0x7c40, 0x11c0, 0x0898, 0x080c, 0x9dec, 0x2b08, 0x0198,
+	0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118,
+	0x6007, 0x0005, 0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
+	0x8422, 0x080c, 0x896d, 0x7817, 0x0140, 0x2001, 0x19c0, 0x2004,
+	0x9005, 0x090c, 0x896d, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e,
+	0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48e9, 0x080c,
+	0x9e8f, 0x0d48, 0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a,
+	0x7130, 0x6156, 0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041,
+	0x080c, 0x83da, 0x080c, 0x896d, 0x08b0, 0x00b6, 0x7110, 0xd1bc,
+	0x01e8, 0x7020, 0x2060, 0x9c84, 0x0007, 0x11c0, 0x9c82, 0x1cd0,
+	0x02a8, 0x6864, 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110,
+	0x2158, 0xb910, 0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130,
+	0x7124, 0x610a, 0x2009, 0x0045, 0x080c, 0x9ebc, 0x7817, 0x0140,
+	0x2001, 0x19c0, 0x2004, 0x9005, 0x090c, 0x896d, 0x00be, 0x0005,
+	0x6120, 0x9186, 0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085,
+	0x0001, 0x0005, 0x080c, 0x30ff, 0x1168, 0x7010, 0x9084, 0xff00,
+	0x8007, 0x9086, 0x0000, 0x1130, 0x9184, 0x000f, 0x908a, 0x0006,
+	0x1208, 0x000b, 0x0005, 0x7dc9, 0x7dca, 0x7dc9, 0x7dc9, 0x7e29,
+	0x7e38, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084,
+	0x0904, 0x7e27, 0x700c, 0x7108, 0x080c, 0x2665, 0x1904, 0x7e27,
+	0x080c, 0x61e7, 0x1904, 0x7e27, 0xbe12, 0xbd16, 0x7110, 0xd1bc,
+	0x01d8, 0x080c, 0x656b, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6,
+	0x080c, 0x7e47, 0x00ce, 0x05d8, 0x080c, 0x9dec, 0x2b08, 0x05b8,
+	0x6112, 0x080c, 0xbfa6, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009,
+	0x0088, 0x080c, 0x9ebc, 0x0458, 0x080c, 0x656b, 0x0148, 0x9086,
+	0x0004, 0x0130, 0x080c, 0x6573, 0x0118, 0x9086, 0x0004, 0x1180,
+	0x080c, 0x9dec, 0x2b08, 0x01d8, 0x6112, 0x080c, 0xbfa6, 0x6023,
+	0x0005, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0x9ebc, 0x0078,
+	0x080c, 0x9dec, 0x2b08, 0x0158, 0x6112, 0x080c, 0xbfa6, 0x6023,
+	0x0004, 0x7120, 0x610a, 0x2009, 0x0001, 0x080c, 0x9ebc, 0x00be,
+	0x0005, 0x7110, 0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x7da8,
+	0x1130, 0x7124, 0x610a, 0x2009, 0x0089, 0x080c, 0x9ebc, 0x0005,
+	0x7110, 0xd1bc, 0x0158, 0x0059, 0x0148, 0x080c, 0x7da8, 0x1130,
+	0x7124, 0x610a, 0x2009, 0x008a, 0x080c, 0x9ebc, 0x0005, 0x7020,
+	0x2060, 0x9c84, 0x0007, 0x1158, 0x9c82, 0x1cd0, 0x0240, 0x2001,
+	0x1819, 0x2004, 0x9c02, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006,
+	0x0ce8, 0x00b6, 0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84,
+	0x0007, 0x11b0, 0x9c82, 0x1cd0, 0x0298, 0x6864, 0x9c02, 0x1280,
+	0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1140,
+	0x700c, 0xb914, 0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0x9ebc,
+	0x7817, 0x0140, 0x2001, 0x19c0, 0x2004, 0x9005, 0x090c, 0x896d,
+	0x00be, 0x0005, 0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206,
+	0x0049, 0x0005, 0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213,
+	0x0009, 0x0005, 0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000,
+	0x9086, 0xc000, 0x05d0, 0x080c, 0x9dec, 0x05b8, 0x0066, 0x00c6,
+	0x0046, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2665,
+	0x15a0, 0x080c, 0x61e7, 0x1588, 0xbe12, 0xbd16, 0x2b00, 0x004e,
+	0x00ce, 0x6012, 0x080c, 0xbfa6, 0x080c, 0x0feb, 0x0510, 0x2900,
+	0x605a, 0x9006, 0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b,
+	0x20a9, 0x000e, 0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98,
+	0x4003, 0x006e, 0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003,
+	0x0001, 0x080c, 0x8422, 0x080c, 0x896d, 0x00fe, 0x009e, 0x00ce,
+	0x0005, 0x080c, 0x9e42, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8,
+	0x00c6, 0x7000, 0x908c, 0xff00, 0x9184, 0xf000, 0x810f, 0x9086,
+	0x2000, 0x1904, 0x7f37, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111,
+	0x2004, 0x9005, 0x1904, 0x7f39, 0x7030, 0x908e, 0x0400, 0x0904,
+	0x7f39, 0x908e, 0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e,
+	0x0300, 0x11d8, 0x2009, 0x1836, 0x210c, 0xd18c, 0x1590, 0xd1a4,
+	0x1580, 0x080c, 0x6529, 0x0558, 0x68ac, 0x9084, 0x00ff, 0x7100,
+	0x918c, 0x00ff, 0x9106, 0x1518, 0x687c, 0x69ac, 0x918c, 0xff00,
+	0x9105, 0x7104, 0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c,
+	0xd1b4, 0x11a8, 0x908e, 0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0,
+	0x908e, 0x5000, 0x09b8, 0x0058, 0x9186, 0x0023, 0x1140, 0x080c,
+	0x7e47, 0x0128, 0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006,
+	0x0010, 0x9085, 0x0001, 0x00ce, 0x0005, 0x00f6, 0x2079, 0x0200,
+	0x7800, 0xc0e5, 0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079,
+	0x1800, 0x7834, 0xd084, 0x1130, 0x2079, 0x0200, 0x7800, 0x9085,
+	0x1200, 0x7802, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7034,
+	0xc084, 0x7036, 0x00ee, 0x0005, 0x2071, 0x19ca, 0x7003, 0x0003,
+	0x700f, 0x0361, 0x9006, 0x701a, 0x7072, 0x7012, 0x7017, 0x1cd0,
+	0x7007, 0x0000, 0x7026, 0x702b, 0x93c3, 0x7032, 0x7037, 0x9431,
+	0x703f, 0xffff, 0x7042, 0x7047, 0x522e, 0x704a, 0x705b, 0x80bc,
+	0x080c, 0x1004, 0x090c, 0x0db4, 0x2900, 0x703a, 0xa867, 0x0003,
+	0xa86f, 0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19ca, 0x1d04,
+	0x8010, 0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x1510, 0x2001,
+	0x1875, 0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1,
+	0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c, 0x0db4, 0x700f,
+	0x0361, 0x7007, 0x0001, 0x0126, 0x2091, 0x8000, 0x080c, 0x8101,
+	0x7040, 0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044, 0x080f,
+	0x0018, 0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020,
+	0x8001, 0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186,
+	0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f,
+	0x7030, 0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f,
+	0x0009, 0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c, 0x953e,
+	0x0010, 0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310, 0x8001,
+	0x703e, 0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a, 0x1148,
+	0x704b, 0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e, 0x7058,
+	0x080f, 0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, 0x0158,
+	0x706c, 0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109, 0x7172,
+	0x1110, 0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a, 0x1138,
+	0x700b, 0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f, 0x012e,
+	0x7004, 0x0002, 0x8038, 0x8039, 0x8055, 0x00e6, 0x2071, 0x19ca,
+	0x7018, 0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee,
+	0x0005, 0x00e6, 0x0006, 0x2071, 0x19ca, 0x701c, 0x9206, 0x1120,
+	0x701a, 0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6,
+	0x2071, 0x19ca, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005,
+	0x0005, 0x00b6, 0x7110, 0x080c, 0x6247, 0x1168, 0xb888, 0x8001,
+	0x0250, 0xb88a, 0x1140, 0x0126, 0x2091, 0x8000, 0x0016, 0x080c,
+	0x896d, 0x001e, 0x012e, 0x8108, 0x9182, 0x0800, 0x0218, 0x900e,
+	0x7007, 0x0002, 0x7112, 0x00be, 0x0005, 0x7014, 0x2060, 0x0126,
+	0x2091, 0x8000, 0x6040, 0x9005, 0x0128, 0x8001, 0x6042, 0x1110,
+	0x080c, 0xbe37, 0x6018, 0x9005, 0x0528, 0x8001, 0x601a, 0x1510,
+	0x6120, 0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x11c8, 0x080c,
+	0xbb2c, 0x01b0, 0x6014, 0x2048, 0xa884, 0x908a, 0x199a, 0x0280,
+	0x9082, 0x1999, 0xa886, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999,
+	0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0xd0e4, 0x0110,
+	0x080c, 0xb828, 0x012e, 0x9c88, 0x0018, 0x7116, 0x2001, 0x1819,
+	0x2004, 0x9102, 0x0220, 0x7017, 0x1cd0, 0x7007, 0x0000, 0x0005,
+	0x00e6, 0x2071, 0x19ca, 0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee,
+	0x0005, 0x2001, 0x19d3, 0x2003, 0x0000, 0x0005, 0x00e6, 0x2071,
+	0x19ca, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, 0x19d6,
+	0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19ca, 0x711a, 0x721e,
+	0x700b, 0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, 0x7054, 0x8000,
+	0x7056, 0x2001, 0x19d8, 0x2044, 0xa06c, 0x9086, 0x0000, 0x0150,
+	0x7068, 0xa09a, 0x7064, 0xa096, 0x7060, 0xa092, 0x705c, 0xa08e,
+	0x080c, 0x10d5, 0x002e, 0x008e, 0x0005, 0x0006, 0x0016, 0x0096,
+	0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c,
+	0x7f85, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae,
+	0x009e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x19ca, 0x7172,
+	0x7276, 0x706f, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071,
+	0x19ca, 0x7074, 0x9206, 0x1110, 0x7072, 0x7076, 0x000e, 0x00ee,
+	0x0005, 0x2069, 0x1800, 0x69e4, 0xd1e4, 0x1518, 0x0026, 0xd1ec,
+	0x0140, 0x6a50, 0x6870, 0x9202, 0x0288, 0x8117, 0x9294, 0x00c0,
+	0x0088, 0x9184, 0x0007, 0x01a0, 0x8109, 0x9184, 0x0007, 0x0110,
+	0x69e6, 0x0070, 0x8107, 0x9084, 0x0007, 0x910d, 0x8107, 0x9106,
+	0x9094, 0x00c0, 0x9184, 0xff3f, 0x9205, 0x68e6, 0x080c, 0x0ecb,
+	0x002e, 0x0005, 0x00c6, 0x2061, 0x1a40, 0x00ce, 0x0005, 0x9184,
+	0x000f, 0x8003, 0x8003, 0x8003, 0x9080, 0x1a40, 0x2060, 0x0005,
+	0xa884, 0x908a, 0x199a, 0x1638, 0x9005, 0x1150, 0x00c6, 0x2061,
+	0x1a40, 0x6014, 0x00ce, 0x9005, 0x1130, 0x2001, 0x001e, 0x0018,
+	0x908e, 0xffff, 0x01b0, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a,
+	0xa87c, 0x908c, 0x00c0, 0x918e, 0x00c0, 0x0904, 0x81c2, 0xd0b4,
+	0x1168, 0xd0bc, 0x1904, 0x819b, 0x2009, 0x0006, 0x080c, 0x81ef,
+	0x0005, 0x900e, 0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc, 0x0160,
+	0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x81e9, 0x908c,
+	0x2020, 0x918e, 0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8, 0x2009,
+	0x1875, 0x2104, 0xd084, 0x1138, 0x87ff, 0x1120, 0x2009, 0x0043,
+	0x0804, 0x9ebc, 0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042, 0x0804,
+	0x9ebc, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20,
+	0x6024, 0xc0cd, 0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890, 0x602e,
+	0xa88c, 0x6032, 0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120,
+	0x918e, 0x0003, 0x1904, 0x81e9, 0x908c, 0x2020, 0x918e, 0x2020,
+	0x0170, 0x0076, 0x00f6, 0x2c78, 0x080c, 0x164a, 0x00fe, 0x007e,
+	0x87ff, 0x1120, 0x2009, 0x0042, 0x080c, 0x9ebc, 0x0005, 0x6110,
+	0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124, 0xc1cd,
+	0x6126, 0x0c38, 0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e, 0x2020,
+	0x01a8, 0x9084, 0x0003, 0x908e, 0x0002, 0x0148, 0x87ff, 0x1120,
+	0x2009, 0x0041, 0x080c, 0x9ebc, 0x0005, 0x00b9, 0x0ce8, 0x87ff,
+	0x1dd8, 0x2009, 0x0043, 0x080c, 0x9ebc, 0x0cb0, 0x6110, 0x00b6,
+	0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd, 0x6126,
+	0x0c00, 0x2009, 0x0004, 0x0019, 0x0005, 0x2009, 0x0001, 0x0096,
+	0x080c, 0xbb2c, 0x0518, 0x6014, 0x2048, 0xa982, 0xa800, 0x6016,
+	0x9186, 0x0001, 0x1188, 0xa97c, 0x918c, 0x8100, 0x918e, 0x8100,
+	0x1158, 0x00c6, 0x2061, 0x1a40, 0x6200, 0xd28c, 0x1120, 0x6204,
+	0x8210, 0x0208, 0x6206, 0x00ce, 0x080c, 0x66cb, 0x6014, 0x904d,
+	0x0076, 0x2039, 0x0000, 0x190c, 0x8138, 0x007e, 0x009e, 0x0005,
+	0x0156, 0x00c6, 0x2061, 0x1a40, 0x6000, 0x81ff, 0x0110, 0x9205,
+	0x0008, 0x9204, 0x6002, 0x00ce, 0x015e, 0x0005, 0x6800, 0xd08c,
+	0x1138, 0x6808, 0x9005, 0x0120, 0x8001, 0x680a, 0x9085, 0x0001,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010,
+	0x9006, 0x8004, 0x2019, 0x0100, 0x231c, 0x93a6, 0x0008, 0x1118,
+	0x8086, 0x818e, 0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x1208,
+	0x9200, 0x1f04, 0x823a, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e,
+	0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x004e, 0x003e, 0x012e,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010,
+	0x9005, 0x0510, 0x911a, 0x1600, 0x8213, 0x2039, 0x0100, 0x273c,
+	0x97be, 0x0008, 0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x0228,
+	0x911a, 0x1220, 0x1f04, 0x8264, 0x0028, 0x911a, 0x2308, 0x8210,
+	0x1f04, 0x8264, 0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e,
+	0x015e, 0x007e, 0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000,
+	0x0ca8, 0x0126, 0x2091, 0x2800, 0x2079, 0x19b7, 0x012e, 0x00d6,
+	0x2069, 0x19b7, 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9,
+	0x0000, 0x2069, 0x0200, 0x080c, 0x9c4a, 0x0401, 0x080c, 0x9c35,
+	0x00e9, 0x080c, 0x9c38, 0x00d1, 0x080c, 0x9c3b, 0x00b9, 0x080c,
+	0x9c3e, 0x00a1, 0x080c, 0x9c41, 0x0089, 0x080c, 0x9c44, 0x0071,
+	0x080c, 0x9c47, 0x0059, 0x01de, 0x014e, 0x015e, 0x2069, 0x0004,
+	0x2d04, 0x9085, 0x8001, 0x206a, 0x00de, 0x0005, 0x20a9, 0x0020,
+	0x20a1, 0x0240, 0x2001, 0x0000, 0x4004, 0x0005, 0x00c6, 0x6027,
+	0x0001, 0x7804, 0x9084, 0x0007, 0x0002, 0x82d7, 0x82fb, 0x833a,
+	0x82dd, 0x82fb, 0x82d7, 0x82d5, 0x82d5, 0x080c, 0x0db4, 0x080c,
+	0x80a1, 0x080c, 0x896d, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110,
+	0x00ce, 0x0005, 0x2011, 0x5b43, 0x080c, 0x8021, 0x7828, 0x9092,
+	0x00c8, 0x1228, 0x8000, 0x782a, 0x080c, 0x5b83, 0x0c88, 0x62c0,
+	0x080c, 0x9c4e, 0x080c, 0x5b43, 0x7807, 0x0003, 0x7827, 0x0000,
+	0x782b, 0x0000, 0x0c28, 0x080c, 0x80a1, 0x6220, 0xd2a4, 0x0160,
 	0x782b, 0x0000, 0x7824, 0x9065, 0x090c, 0x0db4, 0x2009, 0x0013,
-	0x080c, 0x9efe, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x7824,
-	0x9005, 0x090c, 0x0db4, 0x7828, 0x9092, 0xc350, 0x1648, 0x8000,
-	0x782a, 0x00de, 0x00ce, 0x00be, 0x080c, 0x29ca, 0x02f0, 0x00b6,
-	0x00c6, 0x00d6, 0x781c, 0x905d, 0x090c, 0x0db4, 0xb800, 0xc0dc,
-	0xb802, 0x7924, 0x2160, 0x080c, 0x9e32, 0xb93c, 0x81ff, 0x090c,
-	0x0db4, 0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000, 0x00de,
-	0x00ce, 0x00be, 0x080c, 0x8973, 0x0868, 0x080c, 0x9388, 0x0850,
-	0x2011, 0x0130, 0x2214, 0x080c, 0x9c43, 0x080c, 0xd8c9, 0x7824,
-	0x9065, 0x2009, 0x0014, 0x080c, 0x9eac, 0x00de, 0x00ce, 0x00be,
-	0x0804, 0x8362, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x190c,
-	0x1d4a, 0x6024, 0x6027, 0x0002, 0xd0f4, 0x1580, 0x62c8, 0x60c4,
-	0x9205, 0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049, 0x080c,
-	0x9eac, 0x00ce, 0x0005, 0x2011, 0x19d7, 0x2013, 0x0000, 0x0cc8,
-	0x793c, 0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x12f0, 0x8108,
-	0x7946, 0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006, 0x1138,
-	0x6014, 0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10, 0x6014,
-	0x9084, 0x1984, 0x9085, 0x0016, 0x6016, 0x08d8, 0x793c, 0x2160,
-	0x2009, 0x004a, 0x080c, 0x9eac, 0x08a0, 0x7848, 0xc085, 0x784a,
-	0x0880, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f,
-	0x0000, 0x2c08, 0x2061, 0x19b8, 0x6020, 0x8000, 0x6022, 0x6010,
-	0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce,
-	0x001e, 0x000e, 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069,
-	0x19b8, 0xb800, 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0x9086,
-	0x0001, 0x1110, 0x2b00, 0x681e, 0x00de, 0x0804, 0x8973, 0x00de,
-	0x0005, 0xc0d5, 0xb802, 0x6818, 0x9005, 0x0168, 0xb856, 0xb85b,
-	0x0000, 0x0086, 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a, 0x008e,
-	0x2069, 0x19b8, 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a, 0x681e,
-	0x08d8, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f,
-	0x0000, 0x2c08, 0x2061, 0x19b8, 0x6020, 0x8000, 0x6022, 0x6008,
-	0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x610a, 0x012e, 0x00ce,
-	0x001e, 0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6, 0x600f,
-	0x0000, 0x2c08, 0x2061, 0x19b8, 0x6034, 0x9005, 0x0130, 0x9080,
-	0x0003, 0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136, 0x00ce,
-	0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076,
-	0x0066, 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e,
-	0x2071, 0x19b8, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff,
-	0x0904, 0x84e0, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x84db,
-	0x87ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x84db, 0x703c, 0x9c06,
-	0x1178, 0x0036, 0x2019, 0x0001, 0x080c, 0x96d8, 0x7033, 0x0000,
-	0x9006, 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x2029, 0x0001,
-	0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140,
-	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000,
-	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
-	0x600f, 0x0000, 0x080c, 0xbb17, 0x01c8, 0x6014, 0x2048, 0x6020,
-	0x9086, 0x0003, 0x1590, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x0016, 0x0036, 0x0076, 0x080c, 0xbe06, 0x080c, 0xd7d3, 0x080c,
-	0x688c, 0x007e, 0x003e, 0x001e, 0x080c, 0xbd00, 0x080c, 0x9e62,
-	0x00ce, 0x0804, 0x847f, 0x2c78, 0x600c, 0x2060, 0x0804, 0x847f,
-	0x85ff, 0x0120, 0x0036, 0x080c, 0x8a4e, 0x003e, 0x012e, 0x000e,
-	0x001e, 0x002e, 0x003e, 0x005e, 0x006e, 0x007e, 0x009e, 0x00be,
-	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006,
-	0x1158, 0x0016, 0x0036, 0x0076, 0x080c, 0xd7d3, 0x080c, 0xd4d5,
-	0x007e, 0x003e, 0x001e, 0x0890, 0x6020, 0x9086, 0x000a, 0x0904,
-	0x84c5, 0x0804, 0x84c3, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6,
-	0x00f6, 0x9036, 0x0126, 0x2091, 0x8000, 0x2079, 0x19b8, 0x7838,
-	0x9065, 0x0904, 0x855b, 0x600c, 0x0006, 0x600f, 0x0000, 0x783c,
-	0x9c06, 0x1168, 0x0036, 0x2019, 0x0001, 0x080c, 0x96d8, 0x7833,
-	0x0000, 0x901e, 0x7b3e, 0x7b42, 0x7b46, 0x7b4a, 0x003e, 0x080c,
-	0xbb17, 0x0520, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1568,
-	0x3e08, 0x918e, 0x0002, 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6040, 0x9005, 0x1180,
-	0x2001, 0x1959, 0x2004, 0x6042, 0x0058, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0x687f, 0x080c, 0xbd00, 0x080c, 0x9e62,
-	0x000e, 0x0804, 0x8518, 0x7e3a, 0x7e36, 0x012e, 0x00fe, 0x00de,
-	0x00ce, 0x009e, 0x006e, 0x000e, 0x0005, 0x6020, 0x9086, 0x0006,
-	0x1118, 0x080c, 0xd4d5, 0x0c50, 0x6020, 0x9086, 0x000a, 0x09f8,
-	0x08e0, 0x0016, 0x0026, 0x0086, 0x9046, 0x0099, 0x080c, 0x865a,
-	0x008e, 0x002e, 0x001e, 0x0005, 0x00f6, 0x0126, 0x2079, 0x19b8,
-	0x2091, 0x8000, 0x080c, 0x86f1, 0x080c, 0x877f, 0x012e, 0x00fe,
-	0x0005, 0x00b6, 0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
-	0x0016, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b8, 0x7614,
-	0x2660, 0x2678, 0x8cff, 0x0904, 0x861f, 0x6010, 0x2058, 0xb8a0,
-	0x9206, 0x1904, 0x861a, 0x88ff, 0x0120, 0x6054, 0x9106, 0x1904,
-	0x861a, 0x7024, 0x9c06, 0x1558, 0x2069, 0x0100, 0x6820, 0xd0a4,
-	0x1508, 0x080c, 0x80b8, 0x080c, 0x93ac, 0x68c3, 0x0000, 0x080c,
-	0x98da, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384,
-	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b14, 0x9006, 0x080c,
-	0x2b14, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001,
-	0x003e, 0x0028, 0x6003, 0x0009, 0x630a, 0x0804, 0x861a, 0x7014,
-	0x9c36, 0x1110, 0x660c, 0x7616, 0x7010, 0x9c36, 0x1140, 0x2c00,
-	0x9f36, 0x0118, 0x2f00, 0x7012, 0x0010, 0x7013, 0x0000, 0x660c,
-	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x6014, 0x2048, 0x080c, 0xbb17, 0x01e8, 0x6020, 0x9086,
-	0x0003, 0x1580, 0x080c, 0xbd1d, 0x1118, 0x080c, 0xa7c0, 0x0098,
-	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0086,
-	0x080c, 0xbe06, 0x080c, 0xd7d3, 0x080c, 0x688c, 0x008e, 0x003e,
-	0x001e, 0x080c, 0xbd00, 0x080c, 0x9e62, 0x080c, 0x97b0, 0x00ce,
-	0x0804, 0x859a, 0x2c78, 0x600c, 0x2060, 0x0804, 0x859a, 0x012e,
-	0x000e, 0x001e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e,
-	0x00be, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036,
-	0x0086, 0x080c, 0xd7d3, 0x080c, 0xd4d5, 0x008e, 0x003e, 0x001e,
-	0x08d0, 0x080c, 0xa7c0, 0x6020, 0x9086, 0x0002, 0x1160, 0x6004,
-	0x0006, 0x9086, 0x0085, 0x000e, 0x0904, 0x8600, 0x9086, 0x008b,
-	0x0904, 0x8600, 0x0840, 0x6020, 0x9086, 0x0005, 0x1920, 0x6004,
-	0x0006, 0x9086, 0x0085, 0x000e, 0x09c8, 0x9086, 0x008b, 0x09b0,
-	0x0804, 0x8613, 0x00b6, 0x00a6, 0x0096, 0x00c6, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x9280, 0x1000, 0x2004, 0x905d, 0x0904, 0x86ea,
-	0x00f6, 0x00e6, 0x00d6, 0x0066, 0x2071, 0x19b8, 0xbe54, 0x7018,
-	0x9b06, 0x1108, 0x761a, 0x701c, 0x9b06, 0x1130, 0x86ff, 0x1118,
-	0x7018, 0x701e, 0x0008, 0x761e, 0xb858, 0x904d, 0x0108, 0xae56,
-	0x96d5, 0x0000, 0x0110, 0x2900, 0xb05a, 0xb857, 0x0000, 0xb85b,
-	0x0000, 0xb800, 0xc0d4, 0xc0dc, 0xb802, 0x080c, 0x6171, 0x0904,
-	0x86e6, 0x7624, 0x86ff, 0x0904, 0x86d5, 0x9680, 0x0005, 0x2004,
-	0x9906, 0x15d8, 0x00d6, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0560,
-	0x080c, 0x80b8, 0x080c, 0x93ac, 0x68c3, 0x0000, 0x080c, 0x98da,
-	0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
-	0x0138, 0x2001, 0x0100, 0x080c, 0x2b14, 0x9006, 0x080c, 0x2b14,
-	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
-	0x00de, 0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660,
-	0x080c, 0x9e62, 0x00ce, 0x0048, 0x00de, 0x00c6, 0x2660, 0x6003,
-	0x0009, 0x630a, 0x00ce, 0x0804, 0x868d, 0x89ff, 0x0158, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xbe06, 0x080c, 0xd7d3,
-	0x080c, 0x688c, 0x080c, 0x97b0, 0x0804, 0x868d, 0x006e, 0x00de,
-	0x00ee, 0x00fe, 0x012e, 0x000e, 0x00ce, 0x009e, 0x00ae, 0x00be,
-	0x0005, 0x0096, 0x0006, 0x0066, 0x00c6, 0x00d6, 0x9036, 0x7814,
-	0x9065, 0x0904, 0x8752, 0x600c, 0x0006, 0x600f, 0x0000, 0x7824,
-	0x9c06, 0x1570, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c,
-	0x80b8, 0x080c, 0x93ac, 0x68c3, 0x0000, 0x080c, 0x98da, 0x7827,
-	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2b14, 0x9006, 0x080c, 0x2b14, 0x2069,
-	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0040,
-	0x080c, 0x6518, 0x1520, 0x6003, 0x0009, 0x630a, 0x2c30, 0x00f8,
-	0x6014, 0x2048, 0x080c, 0xbb15, 0x01b0, 0x6020, 0x9086, 0x0003,
-	0x1508, 0x080c, 0xbd1d, 0x1118, 0x080c, 0xa7c0, 0x0060, 0x080c,
-	0x6518, 0x1168, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0x688c, 0x080c, 0xbd00, 0x080c, 0x9e62, 0x080c, 0x97b0, 0x000e,
-	0x0804, 0x86f8, 0x7e16, 0x7e12, 0x00de, 0x00ce, 0x006e, 0x000e,
-	0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xd4d5,
-	0x0c50, 0x080c, 0xa7c0, 0x6020, 0x9086, 0x0002, 0x1150, 0x6004,
-	0x0006, 0x9086, 0x0085, 0x000e, 0x0990, 0x9086, 0x008b, 0x0978,
-	0x08d0, 0x6020, 0x9086, 0x0005, 0x19b0, 0x6004, 0x0006, 0x9086,
-	0x0085, 0x000e, 0x0d18, 0x9086, 0x008b, 0x0d00, 0x0860, 0x0006,
-	0x0066, 0x0096, 0x00b6, 0x00c6, 0x00d6, 0x7818, 0x905d, 0x0904,
-	0x87ff, 0xb854, 0x0006, 0x9006, 0xb856, 0xb85a, 0xb800, 0xc0d4,
-	0xc0dc, 0xb802, 0x080c, 0x6171, 0x0904, 0x87fc, 0x7e24, 0x86ff,
-	0x0904, 0x87ef, 0x9680, 0x0005, 0x2004, 0x9906, 0x1904, 0x87ef,
-	0x00d6, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0x87e6, 0x080c,
-	0x80b8, 0x080c, 0x93ac, 0x68c3, 0x0000, 0x080c, 0x98da, 0x7827,
-	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2b14, 0x9006, 0x080c, 0x2b14, 0x2069,
-	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x00de,
-	0x00c6, 0x3e08, 0x918e, 0x0002, 0x1168, 0xb800, 0xd0bc, 0x0150,
-	0x9680, 0x0010, 0x200c, 0x81ff, 0x1518, 0x2009, 0x1959, 0x210c,
-	0x2102, 0x00f0, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660,
-	0x600f, 0x0000, 0x080c, 0x9e62, 0x00ce, 0x0048, 0x00de, 0x00c6,
-	0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x8792, 0x89ff,
-	0x0138, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x688c,
-	0x080c, 0x97b0, 0x0804, 0x8792, 0x000e, 0x0804, 0x8786, 0x781e,
-	0x781a, 0x00de, 0x00ce, 0x00be, 0x009e, 0x006e, 0x000e, 0x0005,
-	0x00e6, 0x00d6, 0x0096, 0x0066, 0xb800, 0xd0dc, 0x01a0, 0xb84c,
-	0x904d, 0x0188, 0xa878, 0x9606, 0x1170, 0x2071, 0x19b8, 0x7024,
-	0x9035, 0x0148, 0x9080, 0x0005, 0x2004, 0x9906, 0x1120, 0xb800,
-	0xc0dc, 0xb802, 0x0029, 0x006e, 0x009e, 0x00de, 0x00ee, 0x0005,
-	0x00f6, 0x2079, 0x0100, 0x78c0, 0x9005, 0x1138, 0x00c6, 0x2660,
-	0x6003, 0x0009, 0x630a, 0x00ce, 0x04b8, 0x080c, 0x93ac, 0x78c3,
-	0x0000, 0x080c, 0x98da, 0x7027, 0x0000, 0x0036, 0x2079, 0x0140,
-	0x7b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b14,
-	0x9006, 0x080c, 0x2b14, 0x2079, 0x0100, 0x7824, 0xd084, 0x0110,
-	0x7827, 0x0001, 0x080c, 0x98da, 0x003e, 0x080c, 0x6171, 0x00c6,
-	0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x080c, 0x9e32,
-	0x00ce, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xbe06,
-	0x080c, 0x688c, 0x080c, 0x97b0, 0x00fe, 0x0005, 0x00b6, 0x00e6,
-	0x00c6, 0x2011, 0x0101, 0x2204, 0xc0c4, 0x2012, 0x2001, 0x180c,
-	0x2014, 0xc2e4, 0x2202, 0x2071, 0x19b8, 0x7004, 0x9084, 0x0007,
-	0x0002, 0x888b, 0x888f, 0x88a6, 0x88cf, 0x890d, 0x888b, 0x88a6,
-	0x8889, 0x080c, 0x0db4, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024,
-	0x9065, 0x0148, 0x7020, 0x8001, 0x7022, 0x600c, 0x9015, 0x0158,
-	0x7216, 0x600f, 0x0000, 0x7007, 0x0000, 0x7027, 0x0000, 0x00ce,
-	0x00ee, 0x00be, 0x0005, 0x7216, 0x7212, 0x0ca8, 0x6010, 0x2058,
-	0x080c, 0x6171, 0xb800, 0xc0dc, 0xb802, 0x7007, 0x0000, 0x7027,
-	0x0000, 0x7020, 0x8001, 0x7022, 0x1148, 0x2001, 0x180c, 0x2014,
-	0xd2ec, 0x1180, 0x00ce, 0x00ee, 0x00be, 0x0005, 0xb854, 0x9015,
-	0x0120, 0x721e, 0x080c, 0x8973, 0x0ca8, 0x7218, 0x721e, 0x080c,
-	0x8973, 0x0c80, 0xc2ec, 0x2202, 0x080c, 0x8a4e, 0x0c58, 0x7024,
-	0x9065, 0x05b8, 0x700c, 0x9c06, 0x1160, 0x080c, 0x97b0, 0x600c,
-	0x9015, 0x0120, 0x720e, 0x600f, 0x0000, 0x0448, 0x720e, 0x720a,
-	0x0430, 0x7014, 0x9c06, 0x1160, 0x080c, 0x97b0, 0x600c, 0x9015,
-	0x0120, 0x7216, 0x600f, 0x0000, 0x00d0, 0x7216, 0x7212, 0x00b8,
-	0x6020, 0x9086, 0x0003, 0x1198, 0x6010, 0x2058, 0x080c, 0x6171,
-	0xb800, 0xc0dc, 0xb802, 0x080c, 0x97b0, 0x701c, 0x9065, 0x0138,
-	0xb854, 0x9015, 0x0110, 0x721e, 0x0010, 0x7218, 0x721e, 0x7027,
-	0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, 0x0140,
-	0x080c, 0x97b0, 0x600c, 0x9015, 0x0158, 0x720e, 0x600f, 0x0000,
-	0x080c, 0x98da, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005,
-	0x720e, 0x720a, 0x0ca8, 0x00d6, 0x2069, 0x19b8, 0x6830, 0x9084,
-	0x0003, 0x0002, 0x8930, 0x8932, 0x8956, 0x892e, 0x080c, 0x0db4,
-	0x00de, 0x0005, 0x00c6, 0x6840, 0x9086, 0x0001, 0x01b8, 0x683c,
-	0x9065, 0x0130, 0x600c, 0x9015, 0x0170, 0x6a3a, 0x600f, 0x0000,
-	0x6833, 0x0000, 0x683f, 0x0000, 0x2011, 0x19d7, 0x2013, 0x0000,
-	0x00ce, 0x00de, 0x0005, 0x683a, 0x6836, 0x0c90, 0x6843, 0x0000,
-	0x6838, 0x9065, 0x0d68, 0x6003, 0x0003, 0x0c50, 0x00c6, 0x9006,
-	0x6842, 0x6846, 0x684a, 0x683c, 0x9065, 0x0160, 0x600c, 0x9015,
-	0x0130, 0x6a3a, 0x600f, 0x0000, 0x683f, 0x0000, 0x0018, 0x683e,
-	0x683a, 0x6836, 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x200c,
-	0xc1e5, 0x2102, 0x0005, 0x2001, 0x180c, 0x200c, 0xd1ec, 0x0120,
-	0xc1ec, 0x2102, 0x080c, 0x8a4e, 0x2001, 0x19c4, 0x2004, 0x9086,
-	0x0001, 0x0d58, 0x00d6, 0x2069, 0x19b8, 0x6804, 0x9084, 0x0007,
-	0x0002, 0x8993, 0x8a36, 0x8a36, 0x8a36, 0x8a36, 0x8a38, 0x8a36,
-	0x8991, 0x080c, 0x0db4, 0x6820, 0x9005, 0x1110, 0x00de, 0x0005,
-	0x00c6, 0x680c, 0x9065, 0x0150, 0x6807, 0x0004, 0x6826, 0x682b,
-	0x0000, 0x080c, 0x8aa4, 0x00ce, 0x00de, 0x0005, 0x6814, 0x9065,
-	0x0150, 0x6807, 0x0001, 0x6826, 0x682b, 0x0000, 0x080c, 0x8aa4,
-	0x00ce, 0x00de, 0x0005, 0x00b6, 0x00e6, 0x6a1c, 0x92dd, 0x0000,
-	0x0904, 0x8a22, 0xb84c, 0x900d, 0x0118, 0xb888, 0x9005, 0x01a0,
-	0xb854, 0x905d, 0x0120, 0x920e, 0x0904, 0x8a22, 0x0028, 0x6818,
-	0x920e, 0x0904, 0x8a22, 0x2058, 0xb84c, 0x900d, 0x0d88, 0xb888,
-	0x9005, 0x1d70, 0x2b00, 0x681e, 0xbb3c, 0xb838, 0x9302, 0x1e40,
-	0x080c, 0x9e09, 0x0904, 0x8a22, 0x8318, 0xbb3e, 0x6116, 0x2b10,
-	0x6212, 0x0096, 0x2148, 0xa880, 0x9084, 0x00ff, 0x605e, 0xa883,
-	0x0000, 0xa884, 0x009e, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999,
-	0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x6114, 0x0096, 0x2148,
-	0xa964, 0x009e, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0538, 0x00f6,
-	0x2c78, 0x2061, 0x0100, 0xbab0, 0x629a, 0x2069, 0x0200, 0x2071,
-	0x0240, 0x080c, 0x8fdc, 0x2069, 0x19b8, 0xbb00, 0xc3dd, 0xbb02,
-	0x6807, 0x0002, 0x2f18, 0x6b26, 0x682b, 0x0000, 0x7823, 0x0003,
-	0x7803, 0x0001, 0x7807, 0x0040, 0x00fe, 0x00ee, 0x00be, 0x00ce,
-	0x00de, 0x0005, 0x00ee, 0x00be, 0x00ce, 0x0cd0, 0xbb00, 0xc3dd,
-	0xbb02, 0x6807, 0x0006, 0x2f18, 0x6b26, 0x682b, 0x0000, 0x080c,
-	0x9c63, 0x00ee, 0x00be, 0x00ce, 0x00de, 0x0005, 0x00de, 0x0005,
-	0x00c6, 0x680c, 0x9065, 0x0138, 0x6807, 0x0004, 0x6826, 0x682b,
-	0x0000, 0x080c, 0x8aa4, 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c,
-	0x2014, 0xc2ed, 0x2202, 0x00de, 0x00fe, 0x0005, 0x00f6, 0x00d6,
-	0x2069, 0x19b8, 0x6830, 0x9086, 0x0000, 0x1548, 0x2001, 0x180c,
-	0x2014, 0xd2e4, 0x0130, 0xc2e4, 0x2202, 0x080c, 0x8982, 0x2069,
-	0x19b8, 0x2001, 0x180c, 0x200c, 0xd1c4, 0x11e0, 0x6838, 0x907d,
-	0x01b0, 0x6a04, 0x9296, 0x0000, 0x1588, 0x6833, 0x0001, 0x683e,
-	0x6847, 0x0000, 0x684b, 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400,
-	0x002e, 0x080c, 0x1ae8, 0x1178, 0x012e, 0x080c, 0x9209, 0x00de,
-	0x00fe, 0x0005, 0xc1c4, 0x2102, 0x0066, 0x2031, 0x0001, 0x080c,
-	0x7062, 0x006e, 0x08d8, 0x012e, 0x6843, 0x0000, 0x7803, 0x0002,
-	0x780c, 0x9015, 0x0140, 0x6a3a, 0x780f, 0x0000, 0x6833, 0x0000,
-	0x683f, 0x0000, 0x0c20, 0x683a, 0x6836, 0x0cc0, 0x6a04, 0x9296,
-	0x0006, 0x0958, 0x0804, 0x8a46, 0x6020, 0x9084, 0x000f, 0x000b,
-	0x0005, 0x8ab8, 0x8abd, 0x8f16, 0x8fa5, 0x8abd, 0x8f16, 0x8fa5,
-	0x8ab8, 0x8abd, 0x8ab8, 0x8ab8, 0x8ab8, 0x8ab8, 0x8ab8, 0x8ab8,
-	0x080c, 0x886e, 0x080c, 0x8973, 0x0005, 0x00b6, 0x0156, 0x0136,
-	0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069,
-	0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0db4,
-	0x6110, 0x2158, 0xb9b0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x908a,
-	0x0040, 0x1a04, 0x8b29, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x8ca0,
-	0x8cdb, 0x8d04, 0x8da7, 0x8dc8, 0x8dce, 0x8ddb, 0x8de3, 0x8def,
-	0x8df5, 0x8e06, 0x8df5, 0x8e5d, 0x8de3, 0x8e69, 0x8e6f, 0x8def,
-	0x8e6f, 0x8e7b, 0x8b27, 0x8b27, 0x8b27, 0x8b27, 0x8b27, 0x8b27,
-	0x8b27, 0x8b27, 0x8b27, 0x8b27, 0x8b27, 0x958f, 0x95b2, 0x95c3,
-	0x95e3, 0x9615, 0x8ddb, 0x8b27, 0x8ddb, 0x8df5, 0x8b27, 0x8d04,
-	0x8da7, 0x8b27, 0x99c7, 0x8df5, 0x8b27, 0x99e3, 0x8df5, 0x8b27,
-	0x8def, 0x8c9a, 0x8b4a, 0x8b27, 0x99ff, 0x9a6c, 0x9b43, 0x8b27,
-	0x9b50, 0x8dd8, 0x9b7b, 0x8b27, 0x961f, 0x9ba8, 0x8b27, 0x080c,
-	0x0db4, 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de,
-	0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x8b48, 0x8b48,
-	0x8b48, 0x8b71, 0x8c1d, 0x8c28, 0x8b48, 0x8b48, 0x8b48, 0x8c6f,
-	0x8c7b, 0x8b8c, 0x8b48, 0x8ba7, 0x8bdb, 0x9d25, 0x9d6a, 0x8df5,
-	0x080c, 0x0db4, 0x00d6, 0x0096, 0x080c, 0x8e8e, 0x7003, 0x2414,
-	0x7007, 0x0018, 0x700b, 0x0800, 0x7814, 0x2048, 0xa83c, 0x700e,
-	0xa850, 0x7022, 0xa854, 0x7026, 0x60c3, 0x0018, 0x080c, 0x9380,
-	0x009e, 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0, 0x00be,
-	0x080c, 0x9db1, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085, 0x0001,
-	0x0005, 0x00d6, 0x0096, 0x080c, 0x8e8e, 0x7003, 0x0500, 0x7814,
-	0x2048, 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012, 0xa880,
-	0x7016, 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010, 0x080c,
-	0x9380, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c, 0x8e8e,
-	0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0, 0x700e,
-	0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0, 0x701e,
-	0x60c3, 0x0010, 0x080c, 0x9380, 0x009e, 0x00de, 0x0005, 0x00d6,
-	0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x8e8e, 0x20e9, 0x0000,
-	0x2001, 0x1974, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814, 0x8003,
-	0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b,
-	0x2098, 0x2001, 0x1974, 0x0016, 0x200c, 0x2001, 0x0001, 0x080c,
-	0x224d, 0x080c, 0xc81a, 0x9006, 0x080c, 0x224d, 0x001e, 0xa804,
-	0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0x9380, 0x012e,
-	0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x8ed9, 0x20e9, 0x0000, 0x2001, 0x1974, 0x2003, 0x0000,
-	0x7814, 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814, 0x8003,
-	0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b,
-	0x2098, 0x2001, 0x1974, 0x0016, 0x200c, 0x080c, 0xc81a, 0x001e,
-	0xa804, 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814, 0x2048,
-	0x080c, 0x0f9d, 0x080c, 0x9380, 0x012e, 0x009e, 0x00de, 0x0005,
-	0x60c0, 0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082, 0x0004,
-	0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0x8e8e, 0x7003,
-	0x7800, 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804, 0x9380,
-	0x00d6, 0x00e6, 0x080c, 0x8ed9, 0x7814, 0x9084, 0xff00, 0x2073,
-	0x0200, 0x8e70, 0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70, 0x2073,
-	0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76, 0x8d68,
-	0x8e70, 0x1f04, 0x8c3e, 0x2069, 0x1801, 0x20a9, 0x0004, 0x2d76,
-	0x8d68, 0x8e70, 0x1f04, 0x8c47, 0x2069, 0x1984, 0x9086, 0xdf00,
-	0x0110, 0x2069, 0x199e, 0x20a9, 0x001a, 0x9e86, 0x0260, 0x1148,
-	0x00c6, 0x2061, 0x0200, 0x6010, 0x8000, 0x6012, 0x00ce, 0x2071,
-	0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04, 0x8c55,
-	0x60c3, 0x004c, 0x080c, 0x9380, 0x00ee, 0x00de, 0x0005, 0x080c,
-	0x8e8e, 0x7003, 0x6300, 0x7007, 0x0028, 0x7808, 0x700e, 0x60c3,
-	0x0008, 0x0804, 0x9380, 0x00d6, 0x0026, 0x0016, 0x080c, 0x8ed9,
-	0x7003, 0x0200, 0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004, 0x2009,
-	0x0001, 0x2011, 0x000c, 0x2073, 0x0800, 0x8e70, 0x2073, 0x0000,
-	0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c, 0x9380, 0x001e, 0x002e,
-	0x00de, 0x0005, 0x2001, 0x1817, 0x2004, 0x609a, 0x0804, 0x9380,
-	0x080c, 0x8e8e, 0x7003, 0x5200, 0x2069, 0x1853, 0x6804, 0xd084,
-	0x0130, 0x6828, 0x0016, 0x080c, 0x2696, 0x710e, 0x001e, 0x20a9,
-	0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1,
-	0x0250, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x0254,
-	0x4003, 0x080c, 0x9db1, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248,
-	0x2001, 0x181e, 0x2004, 0x7032, 0x2001, 0x181f, 0x2004, 0x7036,
-	0x0030, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x7036, 0x60c3,
-	0x001c, 0x0804, 0x9380, 0x080c, 0x8e8e, 0x7003, 0x0500, 0x080c,
-	0x9db1, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181e,
-	0x2004, 0x700a, 0x2001, 0x181f, 0x2004, 0x700e, 0x0030, 0x2001,
-	0x1817, 0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9, 0x0004, 0x20e1,
-	0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003,
-	0x60c3, 0x0010, 0x0804, 0x9380, 0x080c, 0x8e8e, 0x9006, 0x080c,
-	0x652c, 0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003, 0x0400, 0x620c,
-	0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096, 0x904d, 0x0120, 0x9006,
-	0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300, 0xb8a0, 0x9086,
-	0x007e, 0x1904, 0x8d6f, 0x00d6, 0x2069, 0x193d, 0x2001, 0x1836,
-	0x2004, 0xd0a4, 0x0178, 0x6800, 0x700a, 0x6808, 0x9084, 0x2000,
-	0x7012, 0x680c, 0x7016, 0x701f, 0x2710, 0x6818, 0x7022, 0x681c,
-	0x7026, 0x0080, 0x6800, 0x700a, 0x6804, 0x700e, 0x6808, 0x080c,
-	0x6fb2, 0x1118, 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff, 0x7012,
-	0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099,
-	0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004,
-	0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, 0x9c2a,
-	0x2069, 0x1945, 0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, 0x080c,
-	0x538a, 0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de, 0x04a0, 0x2001,
-	0x1836, 0x2004, 0xd0a4, 0x0168, 0x0016, 0x2009, 0x0002, 0x60e0,
-	0x9106, 0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x26d7, 0x61e2,
-	0x001e, 0x20e1, 0x0001, 0x2099, 0x193d, 0x20e9, 0x0000, 0x20a1,
-	0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1805,
-	0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1,
-	0x025a, 0x4003, 0x080c, 0x9c2a, 0x20a1, 0x024e, 0x20a9, 0x0008,
-	0x2099, 0x1945, 0x4003, 0x60c3, 0x0074, 0x0804, 0x9380, 0x080c,
-	0x8e8e, 0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800, 0x700f,
-	0x2000, 0x9006, 0x00f6, 0x2079, 0x1853, 0x7904, 0x00fe, 0xd1ac,
-	0x1110, 0x9085, 0x0020, 0x0010, 0x9085, 0x0010, 0x9085, 0x0002,
-	0x00d6, 0x0804, 0x8e3e, 0x7026, 0x60c3, 0x0014, 0x0804, 0x9380,
-	0x080c, 0x8e8e, 0x7003, 0x5000, 0x0804, 0x8d1e, 0x080c, 0x8e8e,
-	0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014, 0x0804, 0x9380,
-	0x080c, 0x8ed0, 0x0010, 0x080c, 0x8ed9, 0x7003, 0x0200, 0x60c3,
-	0x0004, 0x0804, 0x9380, 0x080c, 0x8ed9, 0x7003, 0x0100, 0x700b,
-	0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0x9380, 0x080c,
-	0x8ed9, 0x7003, 0x0200, 0x0804, 0x8d1e, 0x080c, 0x8ed9, 0x7003,
-	0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010, 0x700b, 0x0003,
-	0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9380, 0x00d6, 0x080c,
-	0x8ed9, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b, 0x0800, 0xb894,
-	0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030, 0x0190, 0xb998,
-	0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f, 0x2100, 0x0058,
-	0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028, 0x700f, 0x0700,
-	0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1853, 0x7904, 0x00fe,
-	0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010, 0x9085, 0x0010, 0x2009,
-	0x1875, 0x210c, 0xd184, 0x1110, 0x9085, 0x0002, 0x0026, 0x2009,
-	0x1873, 0x210c, 0xd1e4, 0x0150, 0xc0c5, 0xbabc, 0xd28c, 0x1108,
-	0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010, 0x0140, 0xd1ec, 0x0130,
-	0x9094, 0x0030, 0x9296, 0x0010, 0x0108, 0xc0bd, 0x002e, 0x7026,
-	0x60c3, 0x0014, 0x00de, 0x0804, 0x9380, 0x080c, 0x8ed9, 0x7003,
-	0x0210, 0x7007, 0x0014, 0x700f, 0x0100, 0x60c3, 0x0014, 0x0804,
-	0x9380, 0x080c, 0x8ed9, 0x7003, 0x0200, 0x0804, 0x8ca4, 0x080c,
-	0x8ed9, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3,
-	0x0008, 0x0804, 0x9380, 0x080c, 0x8ed9, 0x7003, 0x0100, 0x700b,
-	0x000b, 0x60c3, 0x0008, 0x0804, 0x9380, 0x0026, 0x00d6, 0x0036,
-	0x0046, 0x2019, 0x3200, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6,
-	0x0036, 0x0046, 0x2019, 0x2200, 0x2021, 0x0100, 0x080c, 0x9c3f,
-	0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878,
-	0x700a, 0x687c, 0x700e, 0x9485, 0x0029, 0x7012, 0x004e, 0x003e,
-	0x00de, 0x080c, 0x936e, 0x721a, 0x9f95, 0x0000, 0x7222, 0x7027,
-	0xffff, 0x2071, 0x024c, 0x002e, 0x0005, 0x0026, 0x080c, 0x9c3f,
-	0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6, 0x2069, 0x1800, 0x6878,
-	0x700a, 0x687c, 0x700e, 0x00de, 0x7013, 0x2029, 0x0c10, 0x7003,
-	0x0100, 0x7007, 0x0000, 0x700b, 0xfc02, 0x700f, 0x0000, 0x0005,
-	0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3300, 0x2021, 0x0800,
-	0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2300, 0x2021,
-	0x0100, 0x080c, 0x9c3f, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006,
-	0x2069, 0x1800, 0xb810, 0x9005, 0x1140, 0xb814, 0x9005, 0x1128,
-	0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020, 0x6878, 0x700a, 0x687c,
-	0x700e, 0x0000, 0x9485, 0x0098, 0x7012, 0x004e, 0x003e, 0x00de,
-	0x080c, 0x936e, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071,
-	0x024c, 0x002e, 0x0005, 0x080c, 0x936e, 0x721a, 0x7a08, 0x7222,
-	0x7814, 0x7026, 0x2071, 0x024c, 0x002e, 0x0005, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004,
-	0x908a, 0x0085, 0x0a0c, 0x0db4, 0x908a, 0x0092, 0x1a0c, 0x0db4,
-	0x6110, 0x2158, 0xb9b0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x9082,
-	0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005,
-	0x8f47, 0x8f56, 0x8f61, 0x8f45, 0x8f45, 0x8f45, 0x8f47, 0x8f45,
-	0x8f45, 0x8f45, 0x8f45, 0x8f45, 0x8f45, 0x080c, 0x0db4, 0x0411,
-	0x60c3, 0x0000, 0x0026, 0x080c, 0x29ca, 0x0228, 0x2011, 0x0101,
-	0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804, 0x9380, 0x0431, 0x7808,
-	0x700a, 0x7814, 0x700e, 0x7017, 0xffff, 0x60c3, 0x000c, 0x0804,
-	0x9380, 0x0479, 0x7003, 0x0003, 0x7007, 0x0300, 0x60c3, 0x0004,
-	0x0804, 0x9380, 0x0026, 0x080c, 0x9c3f, 0xb810, 0x9085, 0x8100,
+	0x080c, 0x9ebc, 0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c,
+	0x0db4, 0x7828, 0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce,
+	0x080c, 0x29cc, 0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d,
+	0x090c, 0x0db4, 0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c,
+	0x896d, 0x0c00, 0x080c, 0x9389, 0x08e8, 0x2011, 0x0130, 0x2214,
+	0x080c, 0x9c4e, 0x080c, 0xd8ea, 0x2009, 0x0014, 0x080c, 0x9ebc,
+	0x00ce, 0x0880, 0x2001, 0x19d3, 0x2003, 0x0000, 0x62c0, 0x82ff,
+	0x1160, 0x782b, 0x0000, 0x7824, 0x9065, 0x090c, 0x0db4, 0x2009,
+	0x0013, 0x080c, 0x9f0e, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6,
+	0x7824, 0x9005, 0x090c, 0x0db4, 0x7828, 0x9092, 0xc350, 0x1648,
+	0x8000, 0x782a, 0x00de, 0x00ce, 0x00be, 0x080c, 0x29cc, 0x02f0,
+	0x00b6, 0x00c6, 0x00d6, 0x781c, 0x905d, 0x090c, 0x0db4, 0xb800,
+	0xc0dc, 0xb802, 0x7924, 0x2160, 0x080c, 0x9e42, 0xb93c, 0x81ff,
+	0x090c, 0x0db4, 0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000,
+	0x00de, 0x00ce, 0x00be, 0x080c, 0x896d, 0x0868, 0x080c, 0x9389,
+	0x0850, 0x2011, 0x0130, 0x2214, 0x080c, 0x9c4e, 0x080c, 0xd8ea,
+	0x7824, 0x9065, 0x2009, 0x0014, 0x080c, 0x9ebc, 0x00de, 0x00ce,
+	0x00be, 0x0804, 0x834b, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc,
+	0x190c, 0x1d4c, 0x6024, 0x6027, 0x0002, 0xd0f4, 0x1580, 0x62c8,
+	0x60c4, 0x9205, 0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049,
+	0x080c, 0x9ebc, 0x00ce, 0x0005, 0x2011, 0x19d6, 0x2013, 0x0000,
+	0x0cc8, 0x793c, 0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x12f0,
+	0x8108, 0x7946, 0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006,
+	0x1138, 0x6014, 0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10,
+	0x6014, 0x9084, 0x1984, 0x9085, 0x0016, 0x6016, 0x08d8, 0x793c,
+	0x2160, 0x2009, 0x004a, 0x080c, 0x9ebc, 0x08a0, 0x7848, 0xc085,
+	0x784a, 0x0880, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x600f, 0x0000, 0x2c08, 0x2061, 0x19b7, 0x6020, 0x8000, 0x6022,
+	0x6010, 0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x6112, 0x012e,
+	0x00ce, 0x001e, 0x000e, 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6,
+	0x2069, 0x19b7, 0xb800, 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822,
+	0x9086, 0x0001, 0x1110, 0x2b00, 0x681e, 0x00de, 0x0804, 0x896d,
+	0x00de, 0x0005, 0xc0d5, 0xb802, 0x6818, 0x9005, 0x0168, 0xb856,
+	0xb85b, 0x0000, 0x0086, 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a,
+	0x008e, 0x2069, 0x19b7, 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a,
+	0x681e, 0x08d8, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x600f, 0x0000, 0x2c08, 0x2061, 0x19b7, 0x6020, 0x8000, 0x6022,
+	0x6008, 0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x610a, 0x012e,
+	0x00ce, 0x001e, 0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6,
+	0x600f, 0x0000, 0x2c08, 0x2061, 0x19b7, 0x6034, 0x9005, 0x0130,
+	0x9080, 0x0003, 0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136,
+	0x00ce, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096,
+	0x0076, 0x0066, 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126,
+	0x902e, 0x2071, 0x19b7, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000,
+	0x8cff, 0x0904, 0x84ce, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904,
+	0x84c9, 0x87ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x84c9, 0x703c,
+	0x9c06, 0x1178, 0x0036, 0x2019, 0x0001, 0x080c, 0x96d9, 0x7033,
+	0x0000, 0x9006, 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x2029,
+	0x0001, 0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36,
+	0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037,
+	0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
+	0x2678, 0x600f, 0x0000, 0x080c, 0xbb2c, 0x01f0, 0x6014, 0x2048,
+	0x6020, 0x9086, 0x0003, 0x15b8, 0x6004, 0x9086, 0x0040, 0x090c,
+	0x98db, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036,
+	0x0076, 0x080c, 0xbe20, 0x080c, 0xd7f4, 0x080c, 0x6891, 0x007e,
+	0x003e, 0x001e, 0x080c, 0xbd15, 0x080c, 0x9e72, 0x00ce, 0x0804,
+	0x8468, 0x2c78, 0x600c, 0x2060, 0x0804, 0x8468, 0x85ff, 0x0120,
+	0x0036, 0x080c, 0x8a4a, 0x003e, 0x012e, 0x000e, 0x001e, 0x002e,
+	0x003e, 0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de,
+	0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016,
+	0x0036, 0x0076, 0x080c, 0xd7f4, 0x080c, 0xd4f6, 0x007e, 0x003e,
+	0x001e, 0x0890, 0x6020, 0x9086, 0x000a, 0x0904, 0x84b3, 0x0804,
+	0x84ac, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036,
+	0x0126, 0x2091, 0x8000, 0x2079, 0x19b7, 0x7838, 0x9065, 0x0904,
+	0x854e, 0x600c, 0x0006, 0x600f, 0x0000, 0x783c, 0x9c06, 0x1168,
+	0x0036, 0x2019, 0x0001, 0x080c, 0x96d9, 0x7833, 0x0000, 0x901e,
+	0x7b3e, 0x7b42, 0x7b46, 0x7b4a, 0x003e, 0x080c, 0xbb2c, 0x0548,
+	0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1590, 0x3e08, 0x918e,
+	0x0002, 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0140, 0x6040, 0x9005, 0x11a8, 0x2001, 0x1958,
+	0x2004, 0x6042, 0x0080, 0x6004, 0x9086, 0x0040, 0x090c, 0x98db,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6884, 0x080c,
+	0xbd15, 0x080c, 0x9e72, 0x000e, 0x0804, 0x8506, 0x7e3a, 0x7e36,
+	0x012e, 0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005,
+	0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xd4f6, 0x0c50, 0x6020,
+	0x9086, 0x000a, 0x09f8, 0x08b8, 0x0016, 0x0026, 0x0086, 0x9046,
+	0x0099, 0x080c, 0x864d, 0x008e, 0x002e, 0x001e, 0x0005, 0x00f6,
+	0x0126, 0x2079, 0x19b7, 0x2091, 0x8000, 0x080c, 0x86e4, 0x080c,
+	0x8772, 0x012e, 0x00fe, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x00e6,
+	0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006, 0x0126, 0x2091, 0x8000,
+	0x2071, 0x19b7, 0x7614, 0x2660, 0x2678, 0x8cff, 0x0904, 0x8612,
+	0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x860d, 0x88ff, 0x0120,
+	0x6054, 0x9106, 0x1904, 0x860d, 0x7024, 0x9c06, 0x1558, 0x2069,
+	0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c, 0x80a1, 0x080c, 0x93ad,
+	0x68c3, 0x0000, 0x080c, 0x98db, 0x7027, 0x0000, 0x0036, 0x2069,
+	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2b16, 0x9006, 0x080c, 0x2b16, 0x2069, 0x0100, 0x6824, 0xd084,
+	0x0110, 0x6827, 0x0001, 0x003e, 0x0028, 0x6003, 0x0009, 0x630a,
+	0x0804, 0x860d, 0x7014, 0x9c36, 0x1110, 0x660c, 0x7616, 0x7010,
+	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012, 0x0010,
+	0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
+	0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048, 0x080c, 0xbb2c,
+	0x01e8, 0x6020, 0x9086, 0x0003, 0x1580, 0x080c, 0xbd32, 0x1118,
+	0x080c, 0xa7d1, 0x0098, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
+	0x0016, 0x0036, 0x0086, 0x080c, 0xbe20, 0x080c, 0xd7f4, 0x080c,
+	0x6891, 0x008e, 0x003e, 0x001e, 0x080c, 0xbd15, 0x080c, 0x9e72,
+	0x080c, 0x97b1, 0x00ce, 0x0804, 0x858d, 0x2c78, 0x600c, 0x2060,
+	0x0804, 0x858d, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce, 0x00de,
+	0x00ee, 0x00fe, 0x009e, 0x00be, 0x0005, 0x6020, 0x9086, 0x0006,
+	0x1158, 0x0016, 0x0036, 0x0086, 0x080c, 0xd7f4, 0x080c, 0xd4f6,
+	0x008e, 0x003e, 0x001e, 0x08d0, 0x080c, 0xa7d1, 0x6020, 0x9086,
+	0x0002, 0x1160, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0904,
+	0x85f3, 0x9086, 0x008b, 0x0904, 0x85f3, 0x0840, 0x6020, 0x9086,
+	0x0005, 0x1920, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x09c8,
+	0x9086, 0x008b, 0x09b0, 0x0804, 0x8606, 0x00b6, 0x00a6, 0x0096,
+	0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x9280, 0x1000, 0x2004,
+	0x905d, 0x0904, 0x86dd, 0x00f6, 0x00e6, 0x00d6, 0x0066, 0x2071,
+	0x19b7, 0xbe54, 0x7018, 0x9b06, 0x1108, 0x761a, 0x701c, 0x9b06,
+	0x1130, 0x86ff, 0x1118, 0x7018, 0x701e, 0x0008, 0x761e, 0xb858,
+	0x904d, 0x0108, 0xae56, 0x96d5, 0x0000, 0x0110, 0x2900, 0xb05a,
+	0xb857, 0x0000, 0xb85b, 0x0000, 0xb800, 0xc0d4, 0xc0dc, 0xb802,
+	0x080c, 0x617a, 0x0904, 0x86d9, 0x7624, 0x86ff, 0x0904, 0x86c8,
+	0x9680, 0x0005, 0x2004, 0x9906, 0x15d8, 0x00d6, 0x2069, 0x0100,
+	0x68c0, 0x9005, 0x0560, 0x080c, 0x80a1, 0x080c, 0x93ad, 0x68c3,
+	0x0000, 0x080c, 0x98db, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140,
+	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b16,
+	0x9006, 0x080c, 0x2b16, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
+	0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0xb83c, 0x9005, 0x0110,
+	0x8001, 0xb83e, 0x2660, 0x080c, 0x9e72, 0x00ce, 0x0048, 0x00de,
+	0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x8680,
+	0x89ff, 0x0158, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
+	0xbe20, 0x080c, 0xd7f4, 0x080c, 0x6891, 0x080c, 0x97b1, 0x0804,
+	0x8680, 0x006e, 0x00de, 0x00ee, 0x00fe, 0x012e, 0x000e, 0x00ce,
+	0x009e, 0x00ae, 0x00be, 0x0005, 0x0096, 0x0006, 0x0066, 0x00c6,
+	0x00d6, 0x9036, 0x7814, 0x9065, 0x0904, 0x8745, 0x600c, 0x0006,
+	0x600f, 0x0000, 0x7824, 0x9c06, 0x1570, 0x2069, 0x0100, 0x6820,
+	0xd0a4, 0x1508, 0x080c, 0x80a1, 0x080c, 0x93ad, 0x68c3, 0x0000,
+	0x080c, 0x98db, 0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
+	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b16, 0x9006,
+	0x080c, 0x2b16, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
+	0x0001, 0x003e, 0x0040, 0x080c, 0x6521, 0x1520, 0x6003, 0x0009,
+	0x630a, 0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c, 0xbb2a, 0x01b0,
+	0x6020, 0x9086, 0x0003, 0x1508, 0x080c, 0xbd32, 0x1118, 0x080c,
+	0xa7d1, 0x0060, 0x080c, 0x6521, 0x1168, 0xa867, 0x0103, 0xab7a,
+	0xa877, 0x0000, 0x080c, 0x6891, 0x080c, 0xbd15, 0x080c, 0x9e72,
+	0x080c, 0x97b1, 0x000e, 0x0804, 0x86eb, 0x7e16, 0x7e12, 0x00de,
+	0x00ce, 0x006e, 0x000e, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006,
+	0x1118, 0x080c, 0xd4f6, 0x0c50, 0x080c, 0xa7d1, 0x6020, 0x9086,
+	0x0002, 0x1150, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0990,
+	0x9086, 0x008b, 0x0978, 0x08d0, 0x6020, 0x9086, 0x0005, 0x19b0,
+	0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0d18, 0x9086, 0x008b,
+	0x0d00, 0x0860, 0x0006, 0x0066, 0x0096, 0x00b6, 0x00c6, 0x00d6,
+	0x7818, 0x905d, 0x0904, 0x87f2, 0xb854, 0x0006, 0x9006, 0xb856,
+	0xb85a, 0xb800, 0xc0d4, 0xc0dc, 0xb802, 0x080c, 0x617a, 0x0904,
+	0x87ef, 0x7e24, 0x86ff, 0x0904, 0x87e2, 0x9680, 0x0005, 0x2004,
+	0x9906, 0x1904, 0x87e2, 0x00d6, 0x2069, 0x0100, 0x68c0, 0x9005,
+	0x0904, 0x87d9, 0x080c, 0x80a1, 0x080c, 0x93ad, 0x68c3, 0x0000,
+	0x080c, 0x98db, 0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
+	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b16, 0x9006,
+	0x080c, 0x2b16, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
+	0x0001, 0x003e, 0x00de, 0x00c6, 0x3e08, 0x918e, 0x0002, 0x1168,
+	0xb800, 0xd0bc, 0x0150, 0x9680, 0x0010, 0x200c, 0x81ff, 0x1518,
+	0x2009, 0x1958, 0x210c, 0x2102, 0x00f0, 0xb83c, 0x9005, 0x0110,
+	0x8001, 0xb83e, 0x2660, 0x600f, 0x0000, 0x080c, 0x9e72, 0x00ce,
+	0x0048, 0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce,
+	0x0804, 0x8785, 0x89ff, 0x0138, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x080c, 0x6891, 0x080c, 0x97b1, 0x0804, 0x8785, 0x000e,
+	0x0804, 0x8779, 0x781e, 0x781a, 0x00de, 0x00ce, 0x00be, 0x009e,
+	0x006e, 0x000e, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x0066, 0xb800,
+	0xd0dc, 0x01a0, 0xb84c, 0x904d, 0x0188, 0xa878, 0x9606, 0x1170,
+	0x2071, 0x19b7, 0x7024, 0x9035, 0x0148, 0x9080, 0x0005, 0x2004,
+	0x9906, 0x1120, 0xb800, 0xc0dc, 0xb802, 0x0029, 0x006e, 0x009e,
+	0x00de, 0x00ee, 0x0005, 0x00f6, 0x2079, 0x0100, 0x78c0, 0x9005,
+	0x1138, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x04b8,
+	0x080c, 0x93ad, 0x78c3, 0x0000, 0x080c, 0x98db, 0x7027, 0x0000,
+	0x0036, 0x2079, 0x0140, 0x7b04, 0x9384, 0x1000, 0x0138, 0x2001,
+	0x0100, 0x080c, 0x2b16, 0x9006, 0x080c, 0x2b16, 0x2079, 0x0100,
+	0x7824, 0xd084, 0x0110, 0x7827, 0x0001, 0x080c, 0x98db, 0x003e,
+	0x080c, 0x617a, 0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e,
+	0x2660, 0x080c, 0x9e42, 0x00ce, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x080c, 0xbe20, 0x080c, 0x6891, 0x080c, 0x97b1, 0x00fe,
+	0x0005, 0x00b6, 0x00e6, 0x00c6, 0x2011, 0x0101, 0x2204, 0xc0c4,
+	0x2012, 0x2001, 0x180c, 0x2014, 0xc2e4, 0x2202, 0x2071, 0x19b7,
+	0x7004, 0x9084, 0x0007, 0x0002, 0x887e, 0x8882, 0x88a0, 0x88c9,
+	0x8907, 0x887e, 0x8899, 0x887c, 0x080c, 0x0db4, 0x00ce, 0x00ee,
+	0x00be, 0x0005, 0x7024, 0x9065, 0x0148, 0x7020, 0x8001, 0x7022,
+	0x600c, 0x9015, 0x0158, 0x7216, 0x600f, 0x0000, 0x7007, 0x0000,
+	0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7216, 0x7212,
+	0x0ca8, 0x7007, 0x0000, 0x7027, 0x0000, 0x7020, 0x9005, 0x0070,
+	0x6010, 0x2058, 0x080c, 0x617a, 0xb800, 0xc0dc, 0xb802, 0x7007,
+	0x0000, 0x7027, 0x0000, 0x7020, 0x8001, 0x7022, 0x1148, 0x2001,
+	0x180c, 0x2014, 0xd2ec, 0x1180, 0x00ce, 0x00ee, 0x00be, 0x0005,
+	0xb854, 0x9015, 0x0120, 0x721e, 0x080c, 0x896d, 0x0ca8, 0x7218,
+	0x721e, 0x080c, 0x896d, 0x0c80, 0xc2ec, 0x2202, 0x080c, 0x8a4a,
+	0x0c58, 0x7024, 0x9065, 0x05b8, 0x700c, 0x9c06, 0x1160, 0x080c,
+	0x97b1, 0x600c, 0x9015, 0x0120, 0x720e, 0x600f, 0x0000, 0x0448,
+	0x720e, 0x720a, 0x0430, 0x7014, 0x9c06, 0x1160, 0x080c, 0x97b1,
+	0x600c, 0x9015, 0x0120, 0x7216, 0x600f, 0x0000, 0x00d0, 0x7216,
+	0x7212, 0x00b8, 0x6020, 0x9086, 0x0003, 0x1198, 0x6010, 0x2058,
+	0x080c, 0x617a, 0xb800, 0xc0dc, 0xb802, 0x080c, 0x97b1, 0x701c,
+	0x9065, 0x0138, 0xb854, 0x9015, 0x0110, 0x721e, 0x0010, 0x7218,
+	0x721e, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024,
+	0x9065, 0x0140, 0x080c, 0x97b1, 0x600c, 0x9015, 0x0158, 0x720e,
+	0x600f, 0x0000, 0x080c, 0x98db, 0x7027, 0x0000, 0x00ce, 0x00ee,
+	0x00be, 0x0005, 0x720e, 0x720a, 0x0ca8, 0x00d6, 0x2069, 0x19b7,
+	0x6830, 0x9084, 0x0003, 0x0002, 0x892a, 0x892c, 0x8950, 0x8928,
+	0x080c, 0x0db4, 0x00de, 0x0005, 0x00c6, 0x6840, 0x9086, 0x0001,
+	0x01b8, 0x683c, 0x9065, 0x0130, 0x600c, 0x9015, 0x0170, 0x6a3a,
+	0x600f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x2011, 0x19d6,
+	0x2013, 0x0000, 0x00ce, 0x00de, 0x0005, 0x683a, 0x6836, 0x0c90,
+	0x6843, 0x0000, 0x6838, 0x9065, 0x0d68, 0x6003, 0x0003, 0x0c50,
+	0x00c6, 0x9006, 0x6842, 0x6846, 0x684a, 0x683c, 0x9065, 0x0160,
+	0x600c, 0x9015, 0x0130, 0x6a3a, 0x600f, 0x0000, 0x683f, 0x0000,
+	0x0018, 0x683e, 0x683a, 0x6836, 0x00ce, 0x00de, 0x0005, 0x2001,
+	0x180c, 0x200c, 0xc1e5, 0x2102, 0x0005, 0x2001, 0x180c, 0x200c,
+	0xd1ec, 0x0120, 0xc1ec, 0x2102, 0x080c, 0x8a4a, 0x2001, 0x19c3,
+	0x2004, 0x9086, 0x0001, 0x0d58, 0x00d6, 0x2069, 0x19b7, 0x6804,
+	0x9084, 0x0007, 0x0002, 0x898d, 0x8a32, 0x8a32, 0x8a32, 0x8a32,
+	0x8a34, 0x8a32, 0x898b, 0x080c, 0x0db4, 0x6820, 0x9005, 0x1110,
+	0x00de, 0x0005, 0x00c6, 0x680c, 0x9065, 0x0150, 0x6807, 0x0004,
+	0x6826, 0x682b, 0x0000, 0x080c, 0x8aa5, 0x00ce, 0x00de, 0x0005,
+	0x6814, 0x9065, 0x0150, 0x6807, 0x0001, 0x6826, 0x682b, 0x0000,
+	0x080c, 0x8aa5, 0x00ce, 0x00de, 0x0005, 0x00b6, 0x00e6, 0x6a1c,
+	0x92dd, 0x0000, 0x0904, 0x8a1c, 0xb84c, 0x900d, 0x0118, 0xb888,
+	0x9005, 0x01a0, 0xb854, 0x905d, 0x0120, 0x920e, 0x0904, 0x8a1c,
+	0x0028, 0x6818, 0x920e, 0x0904, 0x8a1c, 0x2058, 0xb84c, 0x900d,
+	0x0d88, 0xb888, 0x9005, 0x1d70, 0x2b00, 0x681e, 0xbb3c, 0xb838,
+	0x9302, 0x1e40, 0x080c, 0x9e19, 0x0904, 0x8a1c, 0x8318, 0xbb3e,
+	0x6116, 0x2b10, 0x6212, 0x0096, 0x2148, 0xa880, 0x9084, 0x00ff,
+	0x605e, 0xa883, 0x0000, 0xa884, 0x009e, 0x908a, 0x199a, 0x0210,
+	0x2001, 0x1999, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x6114,
+	0x0096, 0x2148, 0xa964, 0x009e, 0x918c, 0x00ff, 0x918e, 0x0048,
+	0x0538, 0x00f6, 0x2c78, 0x2061, 0x0100, 0xbab0, 0x629a, 0x2069,
+	0x0200, 0x2071, 0x0240, 0x080c, 0x8fdd, 0x2069, 0x19b7, 0xbb00,
+	0xc3dd, 0xbb02, 0x6807, 0x0002, 0x2f18, 0x6b26, 0x682b, 0x0000,
+	0x7823, 0x0003, 0x7803, 0x0001, 0x7807, 0x0040, 0x00fe, 0x00ee,
+	0x00be, 0x00ce, 0x00de, 0x0005, 0x00ee, 0x00be, 0x00ce, 0x0cd0,
+	0x6807, 0x0006, 0x2c18, 0x6b26, 0x6820, 0x8001, 0x6822, 0x682b,
+	0x0000, 0x080c, 0x617a, 0x080c, 0x9c6e, 0x00ee, 0x00be, 0x00ce,
+	0x00de, 0x0005, 0x00de, 0x0005, 0x00c6, 0x680c, 0x9065, 0x0138,
+	0x6807, 0x0004, 0x6826, 0x682b, 0x0000, 0x080c, 0x8aa5, 0x00ce,
+	0x00de, 0x0005, 0x2001, 0x180c, 0x2014, 0xc2ed, 0x2202, 0x00de,
+	0x00fe, 0x0005, 0x00f6, 0x00d6, 0x2069, 0x19b7, 0x6830, 0x9086,
+	0x0000, 0x1548, 0x2001, 0x180c, 0x2014, 0xd2e4, 0x0130, 0xc2e4,
+	0x2202, 0x080c, 0x897c, 0x2069, 0x19b7, 0x2001, 0x180c, 0x200c,
+	0xd1c4, 0x11e0, 0x6838, 0x907d, 0x01b0, 0x6a04, 0x9296, 0x0000,
+	0x1588, 0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000,
+	0x0126, 0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1aea, 0x1178,
+	0x012e, 0x080c, 0x920a, 0x00de, 0x00fe, 0x0005, 0xc1c4, 0x2102,
+	0x0066, 0x2031, 0x0001, 0x080c, 0x704b, 0x006e, 0x08d8, 0x012e,
+	0x6843, 0x0000, 0x7803, 0x0002, 0x780c, 0x9015, 0x0140, 0x6a3a,
+	0x780f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x0c20, 0x683a,
+	0x6836, 0x0cc0, 0x6a04, 0x9296, 0x0006, 0x1904, 0x8a42, 0x6a30,
+	0x9296, 0x0000, 0x0930, 0x0804, 0x8a42, 0x6020, 0x9084, 0x000f,
+	0x000b, 0x0005, 0x8ab9, 0x8abe, 0x8f17, 0x8fa6, 0x8abe, 0x8f17,
+	0x8fa6, 0x8ab9, 0x8abe, 0x8ab9, 0x8ab9, 0x8ab9, 0x8ab9, 0x8ab9,
+	0x8ab9, 0x080c, 0x8861, 0x080c, 0x896d, 0x0005, 0x00b6, 0x0156,
+	0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
+	0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c,
+	0x0db4, 0x6110, 0x2158, 0xb9b0, 0x2c78, 0x2061, 0x0100, 0x619a,
+	0x908a, 0x0040, 0x1a04, 0x8b2a, 0x005b, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005,
+	0x8ca1, 0x8cdc, 0x8d05, 0x8da8, 0x8dc9, 0x8dcf, 0x8ddc, 0x8de4,
+	0x8df0, 0x8df6, 0x8e07, 0x8df6, 0x8e5e, 0x8de4, 0x8e6a, 0x8e70,
+	0x8df0, 0x8e70, 0x8e7c, 0x8b28, 0x8b28, 0x8b28, 0x8b28, 0x8b28,
+	0x8b28, 0x8b28, 0x8b28, 0x8b28, 0x8b28, 0x8b28, 0x9590, 0x95b3,
+	0x95c4, 0x95e4, 0x9616, 0x8ddc, 0x8b28, 0x8ddc, 0x8df6, 0x8b28,
+	0x8d05, 0x8da8, 0x8b28, 0x99d2, 0x8df6, 0x8b28, 0x99ee, 0x8df6,
+	0x8b28, 0x8df0, 0x8c9b, 0x8b4b, 0x8b28, 0x9a0a, 0x9a77, 0x9b4e,
+	0x8b28, 0x9b5b, 0x8dd9, 0x9b86, 0x8b28, 0x9620, 0x9bb3, 0x8b28,
+	0x080c, 0x0db4, 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce,
+	0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x8b49,
+	0x8b49, 0x8b49, 0x8b72, 0x8c1e, 0x8c29, 0x8b49, 0x8b49, 0x8b49,
+	0x8c70, 0x8c7c, 0x8b8d, 0x8b49, 0x8ba8, 0x8bdc, 0x9d35, 0x9d7a,
+	0x8df6, 0x080c, 0x0db4, 0x00d6, 0x0096, 0x080c, 0x8e8f, 0x7003,
+	0x2414, 0x7007, 0x0018, 0x700b, 0x0800, 0x7814, 0x2048, 0xa83c,
+	0x700e, 0xa850, 0x7022, 0xa854, 0x7026, 0x60c3, 0x0018, 0x080c,
+	0x9381, 0x009e, 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0,
+	0x00be, 0x080c, 0x9dc1, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085,
+	0x0001, 0x0005, 0x00d6, 0x0096, 0x080c, 0x8e8f, 0x7003, 0x0500,
+	0x7814, 0x2048, 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012,
+	0xa880, 0x7016, 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010,
+	0x080c, 0x9381, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c,
+	0x8e8f, 0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0,
+	0x700e, 0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0,
+	0x701e, 0x60c3, 0x0010, 0x080c, 0x9381, 0x009e, 0x00de, 0x0005,
+	0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x8e8f, 0x20e9,
+	0x0000, 0x2001, 0x1973, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814,
+	0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080,
+	0x001b, 0x2098, 0x2001, 0x1973, 0x0016, 0x200c, 0x2001, 0x0001,
+	0x080c, 0x224f, 0x080c, 0xc839, 0x9006, 0x080c, 0x224f, 0x001e,
+	0xa804, 0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0x9381,
+	0x012e, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x8eda, 0x20e9, 0x0000, 0x2001, 0x1973, 0x2003,
+	0x0000, 0x7814, 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814,
+	0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080,
+	0x001b, 0x2098, 0x2001, 0x1973, 0x0016, 0x200c, 0x080c, 0xc839,
+	0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814,
+	0x2048, 0x080c, 0x0f9d, 0x080c, 0x9381, 0x012e, 0x009e, 0x00de,
+	0x0005, 0x60c0, 0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082,
+	0x0004, 0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0x8e8f,
+	0x7003, 0x7800, 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804,
+	0x9381, 0x00d6, 0x00e6, 0x080c, 0x8eda, 0x7814, 0x9084, 0xff00,
+	0x2073, 0x0200, 0x8e70, 0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70,
+	0x2073, 0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76,
+	0x8d68, 0x8e70, 0x1f04, 0x8c3f, 0x2069, 0x1801, 0x20a9, 0x0004,
+	0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x8c48, 0x2069, 0x1983, 0x9086,
+	0xdf00, 0x0110, 0x2069, 0x199d, 0x20a9, 0x001a, 0x9e86, 0x0260,
+	0x1148, 0x00c6, 0x2061, 0x0200, 0x6010, 0x8000, 0x6012, 0x00ce,
+	0x2071, 0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04,
+	0x8c56, 0x60c3, 0x004c, 0x080c, 0x9381, 0x00ee, 0x00de, 0x0005,
+	0x080c, 0x8e8f, 0x7003, 0x6300, 0x7007, 0x0028, 0x7808, 0x700e,
+	0x60c3, 0x0008, 0x0804, 0x9381, 0x00d6, 0x0026, 0x0016, 0x080c,
+	0x8eda, 0x7003, 0x0200, 0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004,
+	0x2009, 0x0001, 0x2011, 0x000c, 0x2073, 0x0800, 0x8e70, 0x2073,
+	0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c, 0x9381, 0x001e,
+	0x002e, 0x00de, 0x0005, 0x2001, 0x1817, 0x2004, 0x609a, 0x0804,
+	0x9381, 0x080c, 0x8e8f, 0x7003, 0x5200, 0x2069, 0x1853, 0x6804,
+	0xd084, 0x0130, 0x6828, 0x0016, 0x080c, 0x2698, 0x710e, 0x001e,
+	0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000,
+	0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1,
+	0x0254, 0x4003, 0x080c, 0x9dc1, 0x1120, 0xb8a0, 0x9082, 0x007f,
+	0x0248, 0x2001, 0x181e, 0x2004, 0x7032, 0x2001, 0x181f, 0x2004,
+	0x7036, 0x0030, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x7036,
+	0x60c3, 0x001c, 0x0804, 0x9381, 0x080c, 0x8e8f, 0x7003, 0x0500,
+	0x080c, 0x9dc1, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001,
+	0x181e, 0x2004, 0x700a, 0x2001, 0x181f, 0x2004, 0x700e, 0x0030,
+	0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9, 0x0004,
+	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250,
+	0x4003, 0x60c3, 0x0010, 0x0804, 0x9381, 0x080c, 0x8e8f, 0x9006,
+	0x080c, 0x6535, 0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003, 0x0400,
+	0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096, 0x904d, 0x0120,
+	0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300, 0xb8a0,
+	0x9086, 0x007e, 0x1904, 0x8d70, 0x00d6, 0x2069, 0x193c, 0x2001,
+	0x1836, 0x2004, 0xd0a4, 0x0178, 0x6800, 0x700a, 0x6808, 0x9084,
+	0x2000, 0x7012, 0x680c, 0x7016, 0x701f, 0x2710, 0x6818, 0x7022,
+	0x681c, 0x7026, 0x0080, 0x6800, 0x700a, 0x6804, 0x700e, 0x6808,
+	0x080c, 0x6f9b, 0x1118, 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff,
+	0x7012, 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001,
+	0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9,
+	0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c,
+	0x9c35, 0x2069, 0x1944, 0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002,
+	0x080c, 0x5393, 0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de, 0x04a0,
+	0x2001, 0x1836, 0x2004, 0xd0a4, 0x0168, 0x0016, 0x2009, 0x0002,
+	0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x26d9,
+	0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099, 0x193c, 0x20e9, 0x0000,
+	0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099,
+	0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801,
+	0x20a1, 0x025a, 0x4003, 0x080c, 0x9c35, 0x20a1, 0x024e, 0x20a9,
+	0x0008, 0x2099, 0x1944, 0x4003, 0x60c3, 0x0074, 0x0804, 0x9381,
+	0x080c, 0x8e8f, 0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800,
+	0x700f, 0x2000, 0x9006, 0x00f6, 0x2079, 0x1853, 0x7904, 0x00fe,
+	0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010, 0x9085, 0x0010, 0x9085,
+	0x0002, 0x00d6, 0x0804, 0x8e3f, 0x7026, 0x60c3, 0x0014, 0x0804,
+	0x9381, 0x080c, 0x8e8f, 0x7003, 0x5000, 0x0804, 0x8d1f, 0x080c,
+	0x8e8f, 0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014, 0x0804,
+	0x9381, 0x080c, 0x8ed1, 0x0010, 0x080c, 0x8eda, 0x7003, 0x0200,
+	0x60c3, 0x0004, 0x0804, 0x9381, 0x080c, 0x8eda, 0x7003, 0x0100,
+	0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0x9381,
+	0x080c, 0x8eda, 0x7003, 0x0200, 0x0804, 0x8d1f, 0x080c, 0x8eda,
+	0x7003, 0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010, 0x700b,
+	0x0003, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9381, 0x00d6,
+	0x080c, 0x8eda, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b, 0x0800,
+	0xb894, 0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030, 0x0190,
+	0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f, 0x2100,
+	0x0058, 0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028, 0x700f,
+	0x0700, 0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1853, 0x7904,
+	0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010, 0x9085, 0x0010,
+	0x2009, 0x1875, 0x210c, 0xd184, 0x1110, 0x9085, 0x0002, 0x0026,
+	0x2009, 0x1873, 0x210c, 0xd1e4, 0x0150, 0xc0c5, 0xbabc, 0xd28c,
+	0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010, 0x0140, 0xd1ec,
+	0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108, 0xc0bd, 0x002e,
+	0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0x9381, 0x080c, 0x8eda,
+	0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100, 0x60c3, 0x0014,
+	0x0804, 0x9381, 0x080c, 0x8eda, 0x7003, 0x0200, 0x0804, 0x8ca5,
+	0x080c, 0x8eda, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00,
+	0x60c3, 0x0008, 0x0804, 0x9381, 0x080c, 0x8eda, 0x7003, 0x0100,
+	0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0x9381, 0x0026, 0x00d6,
+	0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800, 0x0040, 0x0026,
+	0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021, 0x0100, 0x080c,
+	0x9c4a, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
+	0x6878, 0x700a, 0x687c, 0x700e, 0x9485, 0x0029, 0x7012, 0x004e,
+	0x003e, 0x00de, 0x080c, 0x936f, 0x721a, 0x9f95, 0x0000, 0x7222,
+	0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005, 0x0026, 0x080c,
+	0x9c4a, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6, 0x2069, 0x1800,
+	0x6878, 0x700a, 0x687c, 0x700e, 0x00de, 0x7013, 0x2029, 0x0c10,
+	0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02, 0x700f, 0x0000,
+	0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3300, 0x2021,
+	0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2300,
+	0x2021, 0x0100, 0x080c, 0x9c4a, 0xb810, 0x9305, 0x7002, 0xb814,
+	0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140, 0xb814, 0x9005,
+	0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020, 0x6878, 0x700a,
+	0x687c, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012, 0x004e, 0x003e,
+	0x00de, 0x080c, 0x936f, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226,
+	0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0x936f, 0x721a, 0x7a08,
+	0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e, 0x0005, 0x00b6,
+	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240,
+	0x6004, 0x908a, 0x0085, 0x0a0c, 0x0db4, 0x908a, 0x0092, 0x1a0c,
+	0x0db4, 0x6110, 0x2158, 0xb9b0, 0x2c78, 0x2061, 0x0100, 0x619a,
+	0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
+	0x0005, 0x8f48, 0x8f57, 0x8f62, 0x8f46, 0x8f46, 0x8f46, 0x8f48,
+	0x8f46, 0x8f46, 0x8f46, 0x8f46, 0x8f46, 0x8f46, 0x080c, 0x0db4,
+	0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x29cc, 0x0228, 0x2011,
+	0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804, 0x9381, 0x0431,
+	0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff, 0x60c3, 0x000c,
+	0x0804, 0x9381, 0x0479, 0x7003, 0x0003, 0x7007, 0x0300, 0x60c3,
+	0x0004, 0x0804, 0x9381, 0x0026, 0x080c, 0x9c4a, 0xb810, 0x9085,
+	0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878, 0x700a,
+	0x687c, 0x700e, 0x7013, 0x0009, 0x0804, 0x8eaa, 0x0026, 0x080c,
+	0x9c4a, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814, 0x7006, 0x2069,
+	0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x2001, 0x0099, 0x7012,
+	0x0804, 0x8f0c, 0x0026, 0x080c, 0x9c4a, 0xb810, 0x9085, 0x8500,
 	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c,
-	0x700e, 0x7013, 0x0009, 0x0804, 0x8ea9, 0x0026, 0x080c, 0x9c3f,
-	0xb810, 0x9085, 0x8400, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
-	0x6878, 0x700a, 0x687c, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804,
-	0x8f0b, 0x0026, 0x080c, 0x9c3f, 0xb810, 0x9085, 0x8500, 0x7002,
+	0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x8f0c, 0x00b6, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200, 0x2071, 0x0240,
+	0x7804, 0x908a, 0x0040, 0x0a0c, 0x0db4, 0x908a, 0x0054, 0x1a0c,
+	0x0db4, 0x7910, 0x2158, 0xb9b0, 0x2061, 0x0100, 0x619a, 0x9082,
+	0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005,
+	0x8fdd, 0x9099, 0x906c, 0x91bb, 0x8fdb, 0x8fdb, 0x8fdb, 0x8fdb,
+	0x8fdb, 0x8fdb, 0x8fdb, 0x978e, 0x9796, 0x979e, 0x97a6, 0x8fdb,
+	0x9b92, 0x8fdb, 0x9786, 0x080c, 0x0db4, 0x0096, 0x780b, 0xffff,
+	0x080c, 0x9048, 0x7914, 0x2148, 0xa978, 0x7956, 0xae64, 0x96b4,
+	0x00ff, 0x9686, 0x0008, 0x1148, 0xa8b4, 0x7032, 0xa8b8, 0x7036,
+	0xa8bc, 0x703a, 0xa8c0, 0x703e, 0x0008, 0x7132, 0xa97c, 0x9184,
+	0x000f, 0x1118, 0x2001, 0x0005, 0x0040, 0xd184, 0x0118, 0x2001,
+	0x0004, 0x0018, 0x9084, 0x0006, 0x8004, 0x2010, 0x785c, 0x9084,
+	0x00ff, 0x8007, 0x9205, 0x7042, 0xd1ac, 0x0158, 0x7047, 0x0002,
+	0x9686, 0x0008, 0x1118, 0x080c, 0x1789, 0x0010, 0x080c, 0x164a,
+	0x0050, 0xd1b4, 0x0118, 0x7047, 0x0001, 0x0028, 0x7047, 0x0000,
+	0x9016, 0x2230, 0x0010, 0xaab0, 0xaeac, 0x726a, 0x766e, 0x20a9,
+	0x0008, 0x20e9, 0x0000, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023,
+	0x2098, 0x20a1, 0x0252, 0x2069, 0x0200, 0x6813, 0x0018, 0x4003,
+	0x6813, 0x0008, 0x60c3, 0x0020, 0x6017, 0x0009, 0x2001, 0x19d3,
+	0x2003, 0x07d0, 0x2001, 0x19d2, 0x2003, 0x0009, 0x009e, 0x0005,
+	0x6813, 0x0008, 0xba8c, 0x8210, 0xb8bc, 0xd084, 0x0128, 0x7a46,
+	0x7b14, 0x7b4a, 0x722e, 0x732a, 0x9294, 0x00ff, 0xba8e, 0x8217,
+	0x721a, 0xba10, 0x9295, 0x0600, 0x7202, 0xba14, 0x7206, 0x2069,
+	0x1800, 0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013, 0x0829, 0x2f10,
+	0x7222, 0x7027, 0xffff, 0x0005, 0x00d6, 0x0096, 0x0081, 0x7814,
+	0x2048, 0xa890, 0x7002, 0xa88c, 0x7006, 0xa8b0, 0x700a, 0xa8ac,
+	0x700e, 0x60c3, 0x000c, 0x009e, 0x00de, 0x0804, 0x9381, 0x6813,
+	0x0008, 0xb810, 0x9085, 0x0500, 0x7002, 0xb814, 0x7006, 0x2069,
+	0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x7013, 0x0889, 0x080c,
+	0x936f, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c,
+	0x0005, 0x00d6, 0x0096, 0x080c, 0x9199, 0x7814, 0x2048, 0x080c,
+	0xbb2a, 0x1130, 0x7814, 0x9084, 0x0700, 0x8007, 0x0033, 0x0010,
+	0x9006, 0x001b, 0x009e, 0x00de, 0x0005, 0x90b7, 0x9120, 0x9130,
+	0x9156, 0x9162, 0x9173, 0x917b, 0x90b5, 0x080c, 0x0db4, 0x0016,
+	0x0036, 0xa97c, 0x918c, 0x0003, 0x0118, 0x9186, 0x0003, 0x1198,
+	0xaba8, 0x7824, 0xd0cc, 0x1168, 0x7316, 0xa898, 0x701a, 0xa894,
+	0x701e, 0x003e, 0x001e, 0x2001, 0x1981, 0x2004, 0x60c2, 0x0804,
+	0x9381, 0xc3e5, 0x0c88, 0x9186, 0x0001, 0x190c, 0x0db4, 0xaba8,
+	0x7824, 0xd0cc, 0x1904, 0x911d, 0x7316, 0xa898, 0x701a, 0xa894,
+	0x701e, 0xa8a4, 0x7026, 0xa8ac, 0x702e, 0x2009, 0x0018, 0x9384,
+	0x0300, 0x0570, 0xd3c4, 0x0110, 0xa8ac, 0x9108, 0xd3cc, 0x0110,
+	0xa8a4, 0x9108, 0x6810, 0x9085, 0x0010, 0x6812, 0x2011, 0x0258,
+	0x20e9, 0x0000, 0x22a0, 0x0156, 0x20a9, 0x0008, 0xa860, 0x20e0,
+	0xa85c, 0x9080, 0x002c, 0x2098, 0x4003, 0x6810, 0x8000, 0x6812,
+	0x2011, 0x0240, 0x22a0, 0x20a9, 0x0005, 0x4003, 0x6810, 0xc084,
+	0x6812, 0x015e, 0x9184, 0x0003, 0x0118, 0x2019, 0x0245, 0x201a,
+	0x61c2, 0x003e, 0x001e, 0x0804, 0x9381, 0xc3e5, 0x0804, 0x90dc,
+	0x2011, 0x0008, 0x2001, 0x180f, 0x2004, 0xd0a4, 0x0110, 0x2011,
+	0x0028, 0x7824, 0xd0cc, 0x1110, 0x7216, 0x0470, 0x0ce8, 0xc2e5,
+	0x2011, 0x0302, 0x0016, 0x782c, 0x701a, 0x7930, 0x711e, 0x9105,
+	0x0108, 0xc2dd, 0x001e, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216,
+	0x7027, 0x0012, 0x702f, 0x0008, 0x7043, 0x7000, 0x7047, 0x0500,
+	0x704f, 0x000a, 0x2069, 0x0200, 0x6813, 0x0009, 0x2071, 0x0240,
+	0x700b, 0x2500, 0x60c3, 0x0032, 0x0804, 0x9381, 0x2011, 0x0028,
+	0x7824, 0xd0cc, 0x1128, 0x7216, 0x60c3, 0x0018, 0x0804, 0x9381,
+	0x0cd0, 0xc2e5, 0x2011, 0x0100, 0x7824, 0xd0cc, 0x0108, 0xc2e5,
+	0x7216, 0x702f, 0x0008, 0x7858, 0x9084, 0x00ff, 0x7036, 0x60c3,
+	0x0020, 0x0804, 0x9381, 0x2011, 0x0008, 0x7824, 0xd0cc, 0x0108,
+	0xc2e5, 0x7216, 0x0c08, 0x0036, 0x7b14, 0x9384, 0xff00, 0x7816,
+	0x9384, 0x00ff, 0x8001, 0x1138, 0x7824, 0xd0cc, 0x0108, 0xc2e5,
+	0x7216, 0x003e, 0x0888, 0x0046, 0x2021, 0x0800, 0x0006, 0x7824,
+	0xd0cc, 0x000e, 0x0108, 0xc4e5, 0x7416, 0x004e, 0x701e, 0x003e,
+	0x0818, 0x00d6, 0x6813, 0x0008, 0xb810, 0x9085, 0x0700, 0x7002,
 	0xb814, 0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e,
-	0x2001, 0x0099, 0x7012, 0x0804, 0x8f0b, 0x00b6, 0x00c6, 0x00d6,
-	0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200, 0x2071, 0x0240, 0x7804,
-	0x908a, 0x0040, 0x0a0c, 0x0db4, 0x908a, 0x0054, 0x1a0c, 0x0db4,
-	0x7910, 0x2158, 0xb9b0, 0x2061, 0x0100, 0x619a, 0x9082, 0x0040,
-	0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x8fdc,
-	0x9098, 0x906b, 0x91ba, 0x8fda, 0x8fda, 0x8fda, 0x8fda, 0x8fda,
-	0x8fda, 0x8fda, 0x978d, 0x9795, 0x979d, 0x97a5, 0x8fda, 0x9b87,
-	0x8fda, 0x9785, 0x080c, 0x0db4, 0x0096, 0x780b, 0xffff, 0x080c,
-	0x9047, 0x7914, 0x2148, 0xa978, 0x7956, 0xae64, 0x96b4, 0x00ff,
-	0x9686, 0x0008, 0x1148, 0xa8b4, 0x7032, 0xa8b8, 0x7036, 0xa8bc,
-	0x703a, 0xa8c0, 0x703e, 0x0008, 0x7132, 0xa97c, 0x9184, 0x000f,
-	0x1118, 0x2001, 0x0005, 0x0040, 0xd184, 0x0118, 0x2001, 0x0004,
-	0x0018, 0x9084, 0x0006, 0x8004, 0x2010, 0x785c, 0x9084, 0x00ff,
-	0x8007, 0x9205, 0x7042, 0xd1ac, 0x0158, 0x7047, 0x0002, 0x9686,
-	0x0008, 0x1118, 0x080c, 0x1787, 0x0010, 0x080c, 0x1648, 0x0050,
-	0xd1b4, 0x0118, 0x7047, 0x0001, 0x0028, 0x7047, 0x0000, 0x9016,
-	0x2230, 0x0010, 0xaab0, 0xaeac, 0x726a, 0x766e, 0x20a9, 0x0008,
-	0x20e9, 0x0000, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098,
-	0x20a1, 0x0252, 0x2069, 0x0200, 0x6813, 0x0018, 0x4003, 0x6813,
-	0x0008, 0x60c3, 0x0020, 0x6017, 0x0009, 0x2001, 0x19d4, 0x2003,
-	0x07d0, 0x2001, 0x19d3, 0x2003, 0x0009, 0x009e, 0x0005, 0x6813,
-	0x0008, 0xba8c, 0x8210, 0xb8bc, 0xd084, 0x0128, 0x7a46, 0x7b14,
-	0x7b4a, 0x722e, 0x732a, 0x9294, 0x00ff, 0xba8e, 0x8217, 0x721a,
-	0xba10, 0x9295, 0x0600, 0x7202, 0xba14, 0x7206, 0x2069, 0x1800,
-	0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013, 0x0829, 0x2f10, 0x7222,
-	0x7027, 0xffff, 0x0005, 0x00d6, 0x0096, 0x0081, 0x7814, 0x2048,
-	0xa890, 0x7002, 0xa88c, 0x7006, 0xa8b0, 0x700a, 0xa8ac, 0x700e,
-	0x60c3, 0x000c, 0x009e, 0x00de, 0x0804, 0x9380, 0x6813, 0x0008,
-	0xb810, 0x9085, 0x0500, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
-	0x6878, 0x700a, 0x687c, 0x700e, 0x7013, 0x0889, 0x080c, 0x936e,
-	0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x0005,
-	0x00d6, 0x0096, 0x080c, 0x9198, 0x7814, 0x2048, 0x080c, 0xbb15,
-	0x1130, 0x7814, 0x9084, 0x0700, 0x8007, 0x0033, 0x0010, 0x9006,
-	0x001b, 0x009e, 0x00de, 0x0005, 0x90b6, 0x911f, 0x912f, 0x9155,
-	0x9161, 0x9172, 0x917a, 0x90b4, 0x080c, 0x0db4, 0x0016, 0x0036,
-	0xa97c, 0x918c, 0x0003, 0x0118, 0x9186, 0x0003, 0x1198, 0xaba8,
-	0x7824, 0xd0cc, 0x1168, 0x7316, 0xa898, 0x701a, 0xa894, 0x701e,
-	0x003e, 0x001e, 0x2001, 0x1982, 0x2004, 0x60c2, 0x0804, 0x9380,
-	0xc3e5, 0x0c88, 0x9186, 0x0001, 0x190c, 0x0db4, 0xaba8, 0x7824,
-	0xd0cc, 0x1904, 0x911c, 0x7316, 0xa898, 0x701a, 0xa894, 0x701e,
-	0xa8a4, 0x7026, 0xa8ac, 0x702e, 0x2009, 0x0018, 0x9384, 0x0300,
-	0x0570, 0xd3c4, 0x0110, 0xa8ac, 0x9108, 0xd3cc, 0x0110, 0xa8a4,
-	0x9108, 0x6810, 0x9085, 0x0010, 0x6812, 0x2011, 0x0258, 0x20e9,
-	0x0000, 0x22a0, 0x0156, 0x20a9, 0x0008, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x002c, 0x2098, 0x4003, 0x6810, 0x8000, 0x6812, 0x2011,
-	0x0240, 0x22a0, 0x20a9, 0x0005, 0x4003, 0x6810, 0xc084, 0x6812,
-	0x015e, 0x9184, 0x0003, 0x0118, 0x2019, 0x0245, 0x201a, 0x61c2,
-	0x003e, 0x001e, 0x0804, 0x9380, 0xc3e5, 0x0804, 0x90db, 0x2011,
-	0x0008, 0x2001, 0x180f, 0x2004, 0xd0a4, 0x0110, 0x2011, 0x0028,
-	0x7824, 0xd0cc, 0x1110, 0x7216, 0x0470, 0x0ce8, 0xc2e5, 0x2011,
-	0x0302, 0x0016, 0x782c, 0x701a, 0x7930, 0x711e, 0x9105, 0x0108,
-	0xc2dd, 0x001e, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x7027,
-	0x0012, 0x702f, 0x0008, 0x7043, 0x7000, 0x7047, 0x0500, 0x704f,
-	0x000a, 0x2069, 0x0200, 0x6813, 0x0009, 0x2071, 0x0240, 0x700b,
-	0x2500, 0x60c3, 0x0032, 0x0804, 0x9380, 0x2011, 0x0028, 0x7824,
-	0xd0cc, 0x1128, 0x7216, 0x60c3, 0x0018, 0x0804, 0x9380, 0x0cd0,
-	0xc2e5, 0x2011, 0x0100, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216,
-	0x702f, 0x0008, 0x7858, 0x9084, 0x00ff, 0x7036, 0x60c3, 0x0020,
-	0x0804, 0x9380, 0x2011, 0x0008, 0x7824, 0xd0cc, 0x0108, 0xc2e5,
-	0x7216, 0x0c08, 0x0036, 0x7b14, 0x9384, 0xff00, 0x7816, 0x9384,
-	0x00ff, 0x8001, 0x1138, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216,
-	0x003e, 0x0888, 0x0046, 0x2021, 0x0800, 0x0006, 0x7824, 0xd0cc,
-	0x000e, 0x0108, 0xc4e5, 0x7416, 0x004e, 0x701e, 0x003e, 0x0818,
-	0x00d6, 0x6813, 0x0008, 0xb810, 0x9085, 0x0700, 0x7002, 0xb814,
-	0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x7824,
-	0xd0cc, 0x1168, 0x7013, 0x0898, 0x080c, 0x936e, 0x721a, 0x7a08,
-	0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x00de, 0x0005, 0x7013,
-	0x0889, 0x0c90, 0x0016, 0x7814, 0x9084, 0x0700, 0x8007, 0x0013,
-	0x001e, 0x0005, 0x91ca, 0x91ca, 0x91cc, 0x91ca, 0x91ca, 0x91ca,
-	0x91e6, 0x91ca, 0x080c, 0x0db4, 0x7914, 0x918c, 0x08ff, 0x918d,
-	0xf600, 0x7916, 0x2009, 0x0003, 0x00b9, 0x2069, 0x1853, 0x6804,
-	0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff, 0x8007, 0x7032, 0x0010,
-	0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804, 0x9380, 0x2009, 0x0003,
-	0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c, 0x9c3f, 0x001e,
-	0xb810, 0x9085, 0x0100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
-	0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013, 0x0888, 0x918d, 0x0008,
-	0x7116, 0x080c, 0x936e, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226,
-	0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046,
-	0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058, 0xb8a0,
-	0x2028, 0xb910, 0xba14, 0x7378, 0x747c, 0x7820, 0x90be, 0x0006,
-	0x0904, 0x92dd, 0x90be, 0x000a, 0x1904, 0x9299, 0xb8b0, 0x609e,
-	0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90, 0x9784, 0xff00,
-	0x9105, 0x6062, 0x873f, 0x9784, 0xff00, 0x0006, 0x7814, 0x2048,
-	0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94, 0x87ff, 0x0198,
-	0x2039, 0x0098, 0x9705, 0x6072, 0x7808, 0x6082, 0x2f00, 0x6086,
-	0x0038, 0x9185, 0x2200, 0x6062, 0x6073, 0x0129, 0x6077, 0x0000,
-	0xb8b0, 0x609e, 0x0050, 0x2039, 0x0029, 0x9705, 0x6072, 0x0cc0,
-	0x9185, 0x0200, 0x6062, 0x6073, 0x2029, 0xa87c, 0xd0fc, 0x0118,
-	0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808, 0x6086, 0x6266,
-	0x636a, 0x646e, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff,
-	0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0xa838, 0x608a, 0xa834,
-	0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af,
-	0x95d5, 0x60d7, 0x0000, 0x080c, 0x9c24, 0x2009, 0x07d0, 0x60c4,
-	0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x80bd,
-	0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be,
-	0x0005, 0x7804, 0x9086, 0x0040, 0x0904, 0x9319, 0x9185, 0x0100,
-	0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0809, 0x6077, 0x0008,
-	0x60af, 0x95d5, 0x60d7, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff,
-	0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808,
-	0x6086, 0x7814, 0x2048, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848,
-	0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0xbab0, 0x629e, 0x080c,
-	0x9c24, 0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110,
-	0x2009, 0x1b58, 0x080c, 0x80bd, 0x003e, 0x004e, 0x005e, 0x00ce,
-	0x00de, 0x00ee, 0x009e, 0x00be, 0x0005, 0x7814, 0x2048, 0xa87c,
-	0x9084, 0x0003, 0x9086, 0x0002, 0x0904, 0x9335, 0x9185, 0x0100,
-	0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0880, 0x6077, 0x0008,
-	0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x7838,
-	0x607e, 0x2f00, 0x6086, 0x7808, 0x6082, 0xa890, 0x608a, 0xa88c,
-	0x608e, 0xa8b0, 0x60c6, 0xa8ac, 0x60ca, 0xa8ac, 0x7930, 0x9108,
-	0x7932, 0xa8b0, 0x792c, 0x9109, 0x792e, 0xb86c, 0x60ce, 0x60af,
-	0x95d5, 0x60d7, 0x0000, 0xbab0, 0x629e, 0x080c, 0x9c01, 0x0804,
-	0x92c9, 0xb8bc, 0xd084, 0x0148, 0xb88c, 0x7814, 0x2048, 0xb88c,
-	0x7846, 0xa836, 0x2900, 0xa83a, 0xb04a, 0x9185, 0x0600, 0x6062,
-	0x6266, 0x636a, 0x646e, 0x6073, 0x0829, 0x6077, 0x0000, 0x60af,
-	0x9575, 0x60d7, 0x0000, 0x0804, 0x92ac, 0x9185, 0x0700, 0x6062,
-	0x6266, 0x636a, 0x646e, 0x7824, 0xd0cc, 0x7826, 0x0118, 0x6073,
-	0x0889, 0x0010, 0x6073, 0x0898, 0x6077, 0x0000, 0xb88c, 0x8000,
-	0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00,
-	0x6086, 0x7808, 0x6082, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848,
-	0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7,
-	0x0000, 0xbab0, 0x629e, 0x7824, 0xd0cc, 0x0120, 0x080c, 0x9c24,
-	0x0804, 0x92c9, 0x080c, 0x9c01, 0x0804, 0x92c9, 0x7a10, 0x00b6,
-	0x2258, 0xba8c, 0x8210, 0x9294, 0x00ff, 0xba8e, 0x00be, 0x8217,
-	0x0005, 0x00d6, 0x2069, 0x19b8, 0x6843, 0x0001, 0x00de, 0x0005,
-	0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c, 0x80af, 0x0005,
-	0x0016, 0x2001, 0x180c, 0x200c, 0x9184, 0x0600, 0x9086, 0x0600,
-	0x0128, 0x0089, 0x080c, 0x80af, 0x001e, 0x0005, 0xc1e5, 0x2001,
-	0x180c, 0x2102, 0x2001, 0x19b9, 0x2003, 0x0000, 0x2001, 0x19c1,
-	0x2003, 0x0000, 0x0c88, 0x0006, 0x6014, 0x9084, 0x1804, 0x9085,
-	0x0009, 0x6016, 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x2061,
-	0x0100, 0x61a4, 0x60a7, 0x95f5, 0x6014, 0x9084, 0x1804, 0x9085,
-	0x0008, 0x6016, 0x000e, 0xa001, 0xa001, 0xa001, 0x61a6, 0x00ce,
-	0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100,
-	0x2069, 0x0140, 0x080c, 0x6fb2, 0x11e8, 0x2001, 0x19d4, 0x2004,
-	0x9005, 0x1904, 0x9412, 0x0066, 0x2031, 0x0001, 0x080c, 0x7062,
-	0x006e, 0x1160, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024,
-	0xd084, 0x090c, 0x0db4, 0x080c, 0x80af, 0x0460, 0x00c6, 0x2061,
-	0x19b8, 0x00d0, 0x6904, 0x9194, 0x4000, 0x0548, 0x080c, 0x93ac,
-	0x080c, 0x2b24, 0x00c6, 0x2061, 0x19b8, 0x6128, 0x9192, 0x0008,
-	0x1258, 0x8108, 0x612a, 0x6124, 0x00ce, 0x81ff, 0x0198, 0x080c,
-	0x80af, 0x080c, 0x93a3, 0x0070, 0x6124, 0x91e5, 0x0000, 0x0140,
-	0x080c, 0xd8c9, 0x080c, 0x80b8, 0x2009, 0x0014, 0x080c, 0x9eac,
-	0x00ce, 0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005, 0x2001,
-	0x19d4, 0x2004, 0x9005, 0x1db0, 0x00c6, 0x2061, 0x19b8, 0x6128,
-	0x9192, 0x0003, 0x1e08, 0x8108, 0x612a, 0x00ce, 0x080c, 0x80af,
-	0x080c, 0x5b90, 0x2009, 0x1852, 0x2114, 0x8210, 0x220a, 0x0c10,
-	0x0096, 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c, 0x80c5,
-	0x2071, 0x19b8, 0x713c, 0x81ff, 0x0904, 0x94a2, 0x2061, 0x0100,
-	0x2069, 0x0140, 0x080c, 0x6fb2, 0x11b0, 0x0036, 0x2019, 0x0002,
-	0x080c, 0x96d8, 0x003e, 0x713c, 0x2160, 0x080c, 0xd8c9, 0x2009,
-	0x004a, 0x080c, 0x9eac, 0x0066, 0x2031, 0x0001, 0x080c, 0x7062,
-	0x006e, 0x0804, 0x94a2, 0x080c, 0x94ae, 0x0904, 0x94a2, 0x6904,
-	0xd1f4, 0x0904, 0x94a9, 0x080c, 0x2b24, 0x00c6, 0x703c, 0x9065,
-	0x090c, 0x0db4, 0x6020, 0x00ce, 0x9086, 0x0006, 0x1528, 0x61c8,
-	0x60c4, 0x9105, 0x1508, 0x2009, 0x180c, 0x2104, 0xd0d4, 0x01e0,
-	0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294, 0x0002, 0x1510,
-	0x0030, 0xc0d4, 0x200a, 0xd0cc, 0x0110, 0x080c, 0x2a77, 0x6014,
-	0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, 0x703c, 0x2060, 0x2009,
-	0x0049, 0x080c, 0x9eac, 0x0070, 0x0036, 0x2019, 0x0001, 0x080c,
-	0x96d8, 0x003e, 0x713c, 0x2160, 0x080c, 0xd8c9, 0x2009, 0x004a,
-	0x080c, 0x9eac, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce, 0x009e,
-	0x0005, 0xd1ec, 0x1904, 0x9463, 0x0804, 0x9465, 0x00d6, 0x00c6,
-	0x0096, 0x703c, 0x9065, 0x090c, 0x0db4, 0x2001, 0x1836, 0x2004,
-	0xd09c, 0x1904, 0x953a, 0x2001, 0x0306, 0x200c, 0x9184, 0x0030,
-	0x0904, 0x953a, 0x9184, 0x0048, 0x9086, 0x0008, 0x1904, 0x953a,
-	0x2001, 0x020b, 0x2004, 0xd0fc, 0x0904, 0x953a, 0xd08c, 0x0904,
-	0x953a, 0x2009, 0x1a50, 0x2104, 0x8000, 0x0208, 0x200a, 0x2069,
-	0x0100, 0x6914, 0x918c, 0x0184, 0x918d, 0x0010, 0x6916, 0x69c8,
-	0x2011, 0x0020, 0x68c8, 0x9106, 0x1570, 0x8211, 0x1dd8, 0x2001,
-	0x0306, 0x2003, 0x4800, 0x2001, 0x009a, 0x2003, 0x0004, 0x2001,
-	0x1a36, 0x2003, 0x0000, 0x2001, 0x1a3f, 0x2003, 0x0000, 0x6a88,
-	0x698c, 0x2200, 0x9105, 0x1120, 0x2c10, 0x080c, 0x1a5c, 0x0040,
-	0x6014, 0x2048, 0xaa3a, 0xa936, 0x6ac4, 0x69c8, 0xa946, 0xaa4a,
-	0x0126, 0x00c6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1ae8, 0x190c,
-	0x0db4, 0x012e, 0x0090, 0x2009, 0x1a51, 0x2104, 0x8000, 0x0208,
-	0x200a, 0x69c8, 0x2011, 0x0020, 0x8211, 0x1df0, 0x68c8, 0x9106,
-	0x1dc0, 0x69c4, 0x68c8, 0x9105, 0x0160, 0x6824, 0xd08c, 0x0110,
-	0x6827, 0x0002, 0x7048, 0xc085, 0x704a, 0x0079, 0x7048, 0xc084,
-	0x704a, 0x2009, 0x07d0, 0x080c, 0x80bd, 0x9006, 0x009e, 0x00ce,
-	0x00de, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0026, 0x00e6, 0x2071,
-	0x19b8, 0x7048, 0xd084, 0x01c0, 0x713c, 0x81ff, 0x01a8, 0x2071,
-	0x0100, 0x9188, 0x0008, 0x2114, 0x928e, 0x0006, 0x1138, 0x7014,
-	0x9084, 0x1984, 0x9085, 0x0012, 0x7016, 0x0030, 0x7014, 0x9084,
-	0x1984, 0x9085, 0x0016, 0x7016, 0x00ee, 0x002e, 0x0005, 0x00b6,
-	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x6010, 0x2058, 0xbca0, 0x2071, 0x19b8, 0x7018,
-	0x2058, 0x8bff, 0x0190, 0xb8a0, 0x9406, 0x0118, 0xb854, 0x2058,
-	0x0cc0, 0x6014, 0x0096, 0x2048, 0xac6c, 0xad70, 0xae78, 0x009e,
-	0x080c, 0x6370, 0x0110, 0x9085, 0x0001, 0x012e, 0x000e, 0x004e,
-	0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x080c,
-	0x8e8e, 0x7003, 0x1200, 0x7838, 0x7012, 0x783c, 0x7016, 0x00c6,
-	0x7820, 0x9086, 0x0004, 0x1148, 0x7810, 0x9005, 0x0130, 0x00b6,
-	0x2058, 0xb810, 0xb914, 0x00be, 0x0020, 0x2061, 0x1800, 0x6078,
-	0x617c, 0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3, 0x002c,
-	0x0804, 0x9380, 0x080c, 0x8e8e, 0x7003, 0x0f00, 0x7808, 0xd09c,
-	0x0128, 0xb810, 0x9084, 0x00ff, 0x700a, 0xb814, 0x700e, 0x60c3,
-	0x0008, 0x0804, 0x9380, 0x0156, 0x080c, 0x8ed9, 0x7003, 0x0200,
-	0x2011, 0x1848, 0x63f0, 0x2312, 0x20a9, 0x0006, 0x2011, 0x1840,
-	0x2019, 0x1841, 0x9ef0, 0x0002, 0x2376, 0x8e70, 0x2276, 0x8e70,
-	0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0x95d4, 0x60c3, 0x001c,
-	0x015e, 0x0804, 0x9380, 0x0016, 0x0026, 0x080c, 0x8eb5, 0x080c,
-	0x8ec7, 0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814, 0x0096,
-	0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021,
-	0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x9192, 0x0010,
-	0x1250, 0x4003, 0x9080, 0x0004, 0x8003, 0x60c2, 0x080c, 0x9380,
-	0x002e, 0x001e, 0x0005, 0x20a9, 0x0010, 0x4003, 0x080c, 0x9c2a,
-	0x20a1, 0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c, 0x8e8e, 0x7003,
-	0x6200, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9380, 0x0016,
-	0x0026, 0x080c, 0x8e8e, 0x20e9, 0x0000, 0x20a1, 0x024c, 0x7814,
+	0x7824, 0xd0cc, 0x1168, 0x7013, 0x0898, 0x080c, 0x936f, 0x721a,
+	0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x00de, 0x0005,
+	0x7013, 0x0889, 0x0c90, 0x0016, 0x7814, 0x9084, 0x0700, 0x8007,
+	0x0013, 0x001e, 0x0005, 0x91cb, 0x91cb, 0x91cd, 0x91cb, 0x91cb,
+	0x91cb, 0x91e7, 0x91cb, 0x080c, 0x0db4, 0x7914, 0x918c, 0x08ff,
+	0x918d, 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9, 0x2069, 0x1853,
+	0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff, 0x8007, 0x7032,
+	0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804, 0x9381, 0x2009,
+	0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c, 0x9c4a,
+	0x001e, 0xb810, 0x9085, 0x0100, 0x7002, 0xb814, 0x7006, 0x2069,
+	0x1800, 0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013, 0x0888, 0x918d,
+	0x0008, 0x7116, 0x080c, 0x936f, 0x721a, 0x7a08, 0x7222, 0x2f10,
+	0x7226, 0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056,
+	0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058,
+	0xb8a0, 0x2028, 0xb910, 0xba14, 0x7378, 0x747c, 0x7820, 0x90be,
+	0x0006, 0x0904, 0x92de, 0x90be, 0x000a, 0x1904, 0x929a, 0xb8b0,
+	0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90, 0x9784,
+	0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00, 0x0006, 0x7814,
+	0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94, 0x87ff,
+	0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808, 0x6082, 0x2f00,
+	0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073, 0x0129, 0x6077,
+	0x0000, 0xb8b0, 0x609e, 0x0050, 0x2039, 0x0029, 0x9705, 0x6072,
+	0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029, 0xa87c, 0xd0fc,
+	0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808, 0x6086,
+	0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084,
+	0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0xa838, 0x608a,
+	0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce,
+	0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0x9c2f, 0x2009, 0x07d0,
+	0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c,
+	0x80a6, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e,
+	0x00be, 0x0005, 0x7804, 0x9086, 0x0040, 0x0904, 0x931a, 0x9185,
+	0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0809, 0x6077,
+	0x0008, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xb88c, 0x8000, 0x9084,
+	0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6082,
+	0x7808, 0x6086, 0x7814, 0x2048, 0xa838, 0x608a, 0xa834, 0x608e,
+	0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0xbab0, 0x629e,
+	0x080c, 0x9c2f, 0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005,
+	0x0110, 0x2009, 0x1b58, 0x080c, 0x80a6, 0x003e, 0x004e, 0x005e,
+	0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005, 0x7814, 0x2048,
+	0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0904, 0x9336, 0x9185,
+	0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0880, 0x6077,
+	0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a,
+	0x7838, 0x607e, 0x2f00, 0x6086, 0x7808, 0x6082, 0xa890, 0x608a,
+	0xa88c, 0x608e, 0xa8b0, 0x60c6, 0xa8ac, 0x60ca, 0xa8ac, 0x7930,
+	0x9108, 0x7932, 0xa8b0, 0x792c, 0x9109, 0x792e, 0xb86c, 0x60ce,
+	0x60af, 0x95d5, 0x60d7, 0x0000, 0xbab0, 0x629e, 0x080c, 0x9c0c,
+	0x0804, 0x92ca, 0xb8bc, 0xd084, 0x0148, 0xb88c, 0x7814, 0x2048,
+	0xb88c, 0x7846, 0xa836, 0x2900, 0xa83a, 0xb04a, 0x9185, 0x0600,
+	0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0829, 0x6077, 0x0000,
+	0x60af, 0x9575, 0x60d7, 0x0000, 0x0804, 0x92ad, 0x9185, 0x0700,
+	0x6062, 0x6266, 0x636a, 0x646e, 0x7824, 0xd0cc, 0x7826, 0x0118,
+	0x6073, 0x0889, 0x0010, 0x6073, 0x0898, 0x6077, 0x0000, 0xb88c,
+	0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000,
+	0x2f00, 0x6086, 0x7808, 0x6082, 0xa838, 0x608a, 0xa834, 0x608e,
+	0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5,
+	0x60d7, 0x0000, 0xbab0, 0x629e, 0x7824, 0xd0cc, 0x0120, 0x080c,
+	0x9c2f, 0x0804, 0x92ca, 0x080c, 0x9c0c, 0x0804, 0x92ca, 0x7a10,
+	0x00b6, 0x2258, 0xba8c, 0x8210, 0x9294, 0x00ff, 0xba8e, 0x00be,
+	0x8217, 0x0005, 0x00d6, 0x2069, 0x19b7, 0x6843, 0x0001, 0x00de,
+	0x0005, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c, 0x8098,
+	0x0005, 0x0016, 0x2001, 0x180c, 0x200c, 0x9184, 0x0600, 0x9086,
+	0x0600, 0x0128, 0x0089, 0x080c, 0x8098, 0x001e, 0x0005, 0xc1e5,
+	0x2001, 0x180c, 0x2102, 0x2001, 0x19b8, 0x2003, 0x0000, 0x2001,
+	0x19c0, 0x2003, 0x0000, 0x0c88, 0x0006, 0x6014, 0x9084, 0x1804,
+	0x9085, 0x0009, 0x6016, 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006,
+	0x2061, 0x0100, 0x61a4, 0x60a7, 0x95f5, 0x6014, 0x9084, 0x1804,
+	0x9085, 0x0008, 0x6016, 0x000e, 0xa001, 0xa001, 0xa001, 0x61a6,
+	0x00ce, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061,
+	0x0100, 0x2069, 0x0140, 0x080c, 0x6f9b, 0x11e8, 0x2001, 0x19d3,
+	0x2004, 0x9005, 0x1904, 0x9413, 0x0066, 0x2031, 0x0001, 0x080c,
+	0x704b, 0x006e, 0x1160, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120,
+	0x6024, 0xd084, 0x090c, 0x0db4, 0x080c, 0x8098, 0x0460, 0x00c6,
+	0x2061, 0x19b7, 0x00d0, 0x6904, 0x9194, 0x4000, 0x0548, 0x080c,
+	0x93ad, 0x080c, 0x2b26, 0x00c6, 0x2061, 0x19b7, 0x6128, 0x9192,
+	0x0008, 0x1258, 0x8108, 0x612a, 0x6124, 0x00ce, 0x81ff, 0x0198,
+	0x080c, 0x8098, 0x080c, 0x93a4, 0x0070, 0x6124, 0x91e5, 0x0000,
+	0x0140, 0x080c, 0xd8ea, 0x080c, 0x80a1, 0x2009, 0x0014, 0x080c,
+	0x9ebc, 0x00ce, 0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005,
+	0x2001, 0x19d3, 0x2004, 0x9005, 0x1db0, 0x00c6, 0x2061, 0x19b7,
+	0x6128, 0x9192, 0x0003, 0x1e08, 0x8108, 0x612a, 0x00ce, 0x080c,
+	0x8098, 0x080c, 0x5b99, 0x2009, 0x1852, 0x2114, 0x8210, 0x220a,
+	0x0c10, 0x0096, 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c,
+	0x80ae, 0x2071, 0x19b7, 0x713c, 0x81ff, 0x0904, 0x94a3, 0x2061,
+	0x0100, 0x2069, 0x0140, 0x080c, 0x6f9b, 0x11b0, 0x0036, 0x2019,
+	0x0002, 0x080c, 0x96d9, 0x003e, 0x713c, 0x2160, 0x080c, 0xd8ea,
+	0x2009, 0x004a, 0x080c, 0x9ebc, 0x0066, 0x2031, 0x0001, 0x080c,
+	0x704b, 0x006e, 0x0804, 0x94a3, 0x080c, 0x94af, 0x0904, 0x94a3,
+	0x6904, 0xd1f4, 0x0904, 0x94aa, 0x080c, 0x2b26, 0x00c6, 0x703c,
+	0x9065, 0x090c, 0x0db4, 0x6020, 0x00ce, 0x9086, 0x0006, 0x1528,
+	0x61c8, 0x60c4, 0x9105, 0x1508, 0x2009, 0x180c, 0x2104, 0xd0d4,
+	0x01e0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294, 0x0002,
+	0x1510, 0x0030, 0xc0d4, 0x200a, 0xd0cc, 0x0110, 0x080c, 0x2a79,
+	0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, 0x703c, 0x2060,
+	0x2009, 0x0049, 0x080c, 0x9ebc, 0x0070, 0x0036, 0x2019, 0x0001,
+	0x080c, 0x96d9, 0x003e, 0x713c, 0x2160, 0x080c, 0xd8ea, 0x2009,
+	0x004a, 0x080c, 0x9ebc, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce,
+	0x009e, 0x0005, 0xd1ec, 0x1904, 0x9464, 0x0804, 0x9466, 0x00d6,
+	0x00c6, 0x0096, 0x703c, 0x9065, 0x090c, 0x0db4, 0x2001, 0x1836,
+	0x2004, 0xd09c, 0x1904, 0x953b, 0x2001, 0x0306, 0x200c, 0x9184,
+	0x0030, 0x0904, 0x953b, 0x9184, 0x0048, 0x9086, 0x0008, 0x1904,
+	0x953b, 0x2001, 0x020b, 0x2004, 0xd0fc, 0x0904, 0x953b, 0xd08c,
+	0x0904, 0x953b, 0x2009, 0x1a4f, 0x2104, 0x8000, 0x0208, 0x200a,
+	0x2069, 0x0100, 0x6914, 0x918c, 0x0184, 0x918d, 0x0010, 0x6916,
+	0x69c8, 0x2011, 0x0020, 0x68c8, 0x9106, 0x1570, 0x8211, 0x1dd8,
+	0x2001, 0x0306, 0x2003, 0x4800, 0x2001, 0x009a, 0x2003, 0x0004,
+	0x2001, 0x1a35, 0x2003, 0x0000, 0x2001, 0x1a3e, 0x2003, 0x0000,
+	0x6a88, 0x698c, 0x2200, 0x9105, 0x1120, 0x2c10, 0x080c, 0x1a5e,
+	0x0040, 0x6014, 0x2048, 0xaa3a, 0xa936, 0x6ac4, 0x69c8, 0xa946,
+	0xaa4a, 0x0126, 0x00c6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1aea,
+	0x190c, 0x0db4, 0x012e, 0x0090, 0x2009, 0x1a50, 0x2104, 0x8000,
+	0x0208, 0x200a, 0x69c8, 0x2011, 0x0020, 0x8211, 0x1df0, 0x68c8,
+	0x9106, 0x1dc0, 0x69c4, 0x68c8, 0x9105, 0x0160, 0x6824, 0xd08c,
+	0x0110, 0x6827, 0x0002, 0x7048, 0xc085, 0x704a, 0x0079, 0x7048,
+	0xc084, 0x704a, 0x2009, 0x07d0, 0x080c, 0x80a6, 0x9006, 0x009e,
+	0x00ce, 0x00de, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0026, 0x00e6,
+	0x2071, 0x19b7, 0x7048, 0xd084, 0x01c0, 0x713c, 0x81ff, 0x01a8,
+	0x2071, 0x0100, 0x9188, 0x0008, 0x2114, 0x928e, 0x0006, 0x1138,
+	0x7014, 0x9084, 0x1984, 0x9085, 0x0012, 0x7016, 0x0030, 0x7014,
+	0x9084, 0x1984, 0x9085, 0x0016, 0x7016, 0x00ee, 0x002e, 0x0005,
+	0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0006,
+	0x0126, 0x2091, 0x8000, 0x6010, 0x2058, 0xbca0, 0x2071, 0x19b7,
+	0x7018, 0x2058, 0x8bff, 0x0190, 0xb8a0, 0x9406, 0x0118, 0xb854,
+	0x2058, 0x0cc0, 0x6014, 0x0096, 0x2048, 0xac6c, 0xad70, 0xae78,
+	0x009e, 0x080c, 0x6379, 0x0110, 0x9085, 0x0001, 0x012e, 0x000e,
+	0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005,
+	0x080c, 0x8e8f, 0x7003, 0x1200, 0x7838, 0x7012, 0x783c, 0x7016,
+	0x00c6, 0x7820, 0x9086, 0x0004, 0x1148, 0x7810, 0x9005, 0x0130,
+	0x00b6, 0x2058, 0xb810, 0xb914, 0x00be, 0x0020, 0x2061, 0x1800,
+	0x6078, 0x617c, 0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3,
+	0x002c, 0x0804, 0x9381, 0x080c, 0x8e8f, 0x7003, 0x0f00, 0x7808,
+	0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff, 0x700a, 0xb814, 0x700e,
+	0x60c3, 0x0008, 0x0804, 0x9381, 0x0156, 0x080c, 0x8eda, 0x7003,
+	0x0200, 0x2011, 0x1848, 0x63f0, 0x2312, 0x20a9, 0x0006, 0x2011,
+	0x1840, 0x2019, 0x1841, 0x9ef0, 0x0002, 0x2376, 0x8e70, 0x2276,
+	0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0x95d5, 0x60c3,
+	0x001c, 0x015e, 0x0804, 0x9381, 0x0016, 0x0026, 0x080c, 0x8eb6,
+	0x080c, 0x8ec8, 0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814,
 	0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0023, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x4003,
-	0x8003, 0x60c2, 0x080c, 0x9380, 0x002e, 0x001e, 0x0005, 0x00e6,
-	0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b8, 0x700c,
-	0x2060, 0x8cff, 0x0178, 0x080c, 0xbd1d, 0x1110, 0x080c, 0xa7c0,
-	0x600c, 0x0006, 0x080c, 0xbf84, 0x080c, 0x9e32, 0x080c, 0x97b0,
-	0x00ce, 0x0c78, 0x2c00, 0x700e, 0x700a, 0x012e, 0x000e, 0x00ce,
-	0x00ee, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
-	0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c,
-	0x200c, 0x918c, 0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140,
-	0x2071, 0x19b8, 0x7024, 0x2060, 0x8cff, 0x01f8, 0x080c, 0x93ac,
-	0x6ac0, 0x68c3, 0x0000, 0x080c, 0x80b8, 0x00c6, 0x2061, 0x0100,
-	0x080c, 0x9c43, 0x00ce, 0x20a9, 0x01f4, 0x0461, 0x2009, 0x0013,
-	0x080c, 0x9eac, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de,
-	0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x2001, 0x1800, 0x2004,
-	0x9096, 0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c, 0x80b8,
-	0x6814, 0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008,
-	0x68c3, 0x0000, 0x2011, 0x5b3a, 0x080c, 0x8038, 0x20a9, 0x01f4,
-	0x0009, 0x08c0, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804,
-	0x9084, 0x4000, 0x190c, 0x2b24, 0x0090, 0xd084, 0x0118, 0x6827,
-	0x0001, 0x0010, 0x1f04, 0x96ba, 0x7804, 0x9084, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2b14, 0x9006, 0x080c, 0x2b14, 0x0005,
-	0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026,
-	0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c,
-	0xdbff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19b8,
-	0x703c, 0x2060, 0x8cff, 0x0904, 0x9766, 0x9386, 0x0002, 0x1128,
-	0x6814, 0x9084, 0x0002, 0x0904, 0x9766, 0x68af, 0x95f5, 0x6817,
-	0x0010, 0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008,
-	0x080c, 0x80c5, 0x080c, 0x1e90, 0x0046, 0x2009, 0x00a5, 0x080c,
-	0x0e2f, 0x2021, 0x0169, 0x2404, 0x9084, 0x000f, 0x9086, 0x0004,
-	0x11f8, 0x68af, 0x95f5, 0x68c6, 0x68cb, 0x0008, 0x00e6, 0x00f6,
-	0x2079, 0x0090, 0x2071, 0x1a36, 0x6814, 0x9084, 0x1984, 0x9085,
-	0x0012, 0x6816, 0x782b, 0x0008, 0x7003, 0x0000, 0x00fe, 0x00ee,
-	0x9386, 0x0002, 0x1128, 0x7884, 0x9005, 0x1110, 0x7887, 0x0001,
-	0x2001, 0x1952, 0x200c, 0x080c, 0x0e2f, 0x004e, 0x20a9, 0x03e8,
-	0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000,
-	0x190c, 0x2b24, 0x0090, 0xd08c, 0x0118, 0x6827, 0x0002, 0x0010,
-	0x1f04, 0x9740, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100,
-	0x080c, 0x2b14, 0x9006, 0x080c, 0x2b14, 0x6827, 0x4000, 0x6824,
-	0x83ff, 0x1120, 0x2009, 0x0049, 0x080c, 0x9eac, 0x000e, 0x001e,
-	0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e,
-	0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19b8, 0x6a06,
-	0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069,
-	0x19b8, 0x6a32, 0x012e, 0x00de, 0x0005, 0x080c, 0x9047, 0x7854,
-	0x7032, 0x7042, 0x7047, 0x1000, 0x00f8, 0x080c, 0x9047, 0x7854,
-	0x7032, 0x7042, 0x7047, 0x4000, 0x00b8, 0x080c, 0x9047, 0x7854,
-	0x7032, 0x7042, 0x7047, 0x2000, 0x0078, 0x080c, 0x9047, 0x7854,
-	0x7032, 0x7042, 0x7047, 0x0400, 0x0038, 0x080c, 0x9047, 0x7854,
-	0x7032, 0x7042, 0x7047, 0x0200, 0x60c3, 0x0020, 0x0804, 0x9380,
-	0x00e6, 0x2071, 0x19b8, 0x7020, 0x9005, 0x0110, 0x8001, 0x7022,
-	0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b8, 0x7614, 0x2660,
-	0x2678, 0x2039, 0x0001, 0x87ff, 0x0904, 0x9855, 0x8cff, 0x0904,
-	0x9855, 0x6020, 0x9086, 0x0006, 0x1904, 0x9850, 0x88ff, 0x0138,
-	0x2800, 0x9c06, 0x1904, 0x9850, 0x2039, 0x0000, 0x0050, 0x6010,
-	0x9b06, 0x1904, 0x9850, 0x85ff, 0x0120, 0x6054, 0x9106, 0x1904,
-	0x9850, 0x7024, 0x9c06, 0x15b0, 0x2069, 0x0100, 0x68c0, 0x9005,
-	0x1160, 0x6824, 0xd084, 0x0148, 0x6827, 0x0001, 0x080c, 0x80b8,
-	0x080c, 0x98da, 0x7027, 0x0000, 0x0428, 0x080c, 0x80b8, 0x6820,
-	0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000,
-	0x080c, 0x98da, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
-	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b14, 0x9006,
-	0x080c, 0x2b14, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
-	0x0001, 0x003e, 0x7014, 0x9c36, 0x1110, 0x660c, 0x7616, 0x7010,
-	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012, 0x0010,
-	0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
-	0x0008, 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000, 0x6014, 0x0096,
-	0x2048, 0x080c, 0xbb15, 0x0110, 0x080c, 0xd4d5, 0x009e, 0x080c,
-	0x9e62, 0x080c, 0x97b0, 0x88ff, 0x1190, 0x00ce, 0x0804, 0x97cb,
-	0x2c78, 0x600c, 0x2060, 0x0804, 0x97cb, 0x9006, 0x012e, 0x000e,
-	0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b,
-	0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6,
-	0x0096, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x19b8, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0904, 0x98c9,
-	0x6020, 0x9086, 0x0006, 0x1904, 0x98c4, 0x87ff, 0x0128, 0x2700,
-	0x9c06, 0x1904, 0x98c4, 0x0040, 0x6010, 0x9b06, 0x15e8, 0x85ff,
-	0x0118, 0x6054, 0x9106, 0x15c0, 0x703c, 0x9c06, 0x1168, 0x0036,
-	0x2019, 0x0001, 0x080c, 0x96d8, 0x7033, 0x0000, 0x9006, 0x703e,
-	0x7042, 0x7046, 0x704a, 0x003e, 0x7038, 0x9c36, 0x1110, 0x660c,
-	0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
-	0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06,
-	0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048,
-	0x080c, 0xbb15, 0x0110, 0x080c, 0xd4d5, 0x080c, 0x9e62, 0x87ff,
-	0x1198, 0x00ce, 0x0804, 0x9875, 0x2c78, 0x600c, 0x2060, 0x0804,
-	0x9875, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x009e,
-	0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x97bd,
-	0x0001, 0x0c80, 0x00e6, 0x2071, 0x19b8, 0x2001, 0x1800, 0x2004,
-	0x9086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010, 0x7007, 0x0000,
-	0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026, 0x0006,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x19b8, 0x2c10, 0x7638, 0x2660,
-	0x2678, 0x8cff, 0x0518, 0x2200, 0x9c06, 0x11e0, 0x7038, 0x9c36,
-	0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36,
-	0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x2c00,
-	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x9085,
-	0x0001, 0x0020, 0x2c78, 0x600c, 0x2060, 0x08d8, 0x012e, 0x000e,
-	0x002e, 0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6,
-	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x19b8, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904,
-	0x99b6, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904,
-	0x99b1, 0x7024, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005,
-	0x0904, 0x998d, 0x080c, 0x93ac, 0x68c3, 0x0000, 0x080c, 0x98da,
-	0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
-	0x0138, 0x2001, 0x0100, 0x080c, 0x2b14, 0x9006, 0x080c, 0x2b14,
-	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
-	0x700c, 0x9c36, 0x1110, 0x660c, 0x760e, 0x7008, 0x9c36, 0x1140,
-	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000,
-	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
-	0x600f, 0x0000, 0x080c, 0xbd0c, 0x1158, 0x080c, 0x3003, 0x080c,
-	0xbd1d, 0x11f0, 0x080c, 0xa7c0, 0x00d8, 0x080c, 0x98da, 0x08c0,
-	0x080c, 0xbd1d, 0x1118, 0x080c, 0xa7c0, 0x0090, 0x6014, 0x2048,
-	0x080c, 0xbb15, 0x0168, 0x6020, 0x9086, 0x0003, 0x1508, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x687f, 0x080c, 0xbd00,
-	0x080c, 0xbf84, 0x080c, 0x9e62, 0x080c, 0x97b0, 0x00ce, 0x0804,
-	0x9936, 0x2c78, 0x600c, 0x2060, 0x0804, 0x9936, 0x012e, 0x000e,
-	0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x0005,
-	0x6020, 0x9086, 0x0006, 0x1d20, 0x080c, 0xd4d5, 0x0c08, 0x00d6,
-	0x080c, 0x8ed9, 0x7003, 0x0200, 0x7007, 0x0014, 0x60c3, 0x0014,
-	0x20e1, 0x0001, 0x2099, 0x195a, 0x20e9, 0x0000, 0x20a1, 0x0250,
-	0x20a9, 0x0004, 0x4003, 0x7023, 0x0004, 0x7027, 0x7878, 0x080c,
-	0x9380, 0x00de, 0x0005, 0x080c, 0x8ed9, 0x700b, 0x0800, 0x7814,
-	0x9084, 0xff00, 0x700e, 0x7814, 0x9084, 0x00ff, 0x7022, 0x782c,
-	0x7026, 0x7858, 0x9084, 0x00ff, 0x9085, 0x0200, 0x7002, 0x7858,
-	0x9084, 0xff00, 0x8007, 0x7006, 0x60c2, 0x0804, 0x9380, 0x00b6,
-	0x00d6, 0x0016, 0x00d6, 0x2f68, 0x2009, 0x0035, 0x080c, 0xc18a,
-	0x00de, 0x1904, 0x9a64, 0x080c, 0x8e8e, 0x7003, 0x1300, 0x782c,
-	0x080c, 0x9b66, 0x2068, 0x6820, 0x9086, 0x0003, 0x0560, 0x7810,
-	0x2058, 0xbaa0, 0x080c, 0x9db1, 0x11d8, 0x9286, 0x007e, 0x1128,
-	0x700b, 0x00ff, 0x700f, 0xfffe, 0x0498, 0x9286, 0x007f, 0x1128,
-	0x700b, 0x00ff, 0x700f, 0xfffd, 0x0458, 0x9284, 0xff80, 0x0180,
-	0x9286, 0x0080, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffc, 0x0400,
-	0x92d8, 0x1000, 0x2b5c, 0xb810, 0x700a, 0xb814, 0x700e, 0x00c0,
-	0x6098, 0x700e, 0x00a8, 0x080c, 0x9db1, 0x1130, 0x7810, 0x2058,
-	0xb8a0, 0x9082, 0x007e, 0x0250, 0x00d6, 0x2069, 0x181e, 0x2d04,
-	0x700a, 0x8d68, 0x2d04, 0x700e, 0x00de, 0x0010, 0x6034, 0x700e,
-	0x7838, 0x7012, 0x783c, 0x7016, 0x60c3, 0x000c, 0x001e, 0x00de,
-	0x080c, 0x9380, 0x00be, 0x0005, 0x781b, 0x0001, 0x7803, 0x0006,
-	0x001e, 0x00de, 0x00be, 0x0005, 0x792c, 0x9180, 0x0008, 0x200c,
-	0x9186, 0x0006, 0x01c0, 0x9186, 0x0003, 0x0904, 0x9ade, 0x9186,
-	0x0005, 0x0904, 0x9ac7, 0x9186, 0x0004, 0x05d8, 0x9186, 0x0008,
-	0x0904, 0x9acf, 0x7807, 0x0037, 0x782f, 0x0003, 0x7817, 0x1700,
-	0x080c, 0x9b43, 0x0005, 0x080c, 0x9b04, 0x00d6, 0x0026, 0x792c,
-	0x2168, 0x2009, 0x4000, 0x6800, 0x0002, 0x9aa8, 0x9ab3, 0x9aaa,
-	0x9ab3, 0x9aaf, 0x9aa8, 0x9aa8, 0x9ab3, 0x9ab3, 0x9ab3, 0x9ab3,
-	0x9aa8, 0x9aa8, 0x9aa8, 0x9aa8, 0x9aa8, 0x9ab3, 0x9aa8, 0x9ab3,
-	0x080c, 0x0db4, 0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110, 0x900e,
-	0x0010, 0x2009, 0x2000, 0x682c, 0x7022, 0x6830, 0x7026, 0x0804,
-	0x9afd, 0x080c, 0x9b04, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009,
-	0x4000, 0x6a00, 0x9286, 0x0002, 0x1108, 0x900e, 0x04b0, 0x04e1,
-	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x0470, 0x04a1,
-	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x9286, 0x0005,
-	0x0118, 0x9286, 0x0002, 0x1108, 0x900e, 0x00f8, 0x0429, 0x00d6,
-	0x0026, 0x792c, 0x2168, 0x6814, 0x0096, 0x2048, 0xa9ac, 0xa834,
-	0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022, 0x7226, 0x792c,
-	0x9180, 0x0000, 0x2004, 0x908e, 0x0002, 0x0130, 0x908e, 0x0004,
-	0x0118, 0x2009, 0x4000, 0x0008, 0x900e, 0x712a, 0x60c3, 0x0018,
-	0x002e, 0x00de, 0x0804, 0x9380, 0x00b6, 0x0036, 0x0046, 0x0056,
-	0x0066, 0x080c, 0x8ed9, 0x9006, 0x7003, 0x0200, 0x7938, 0x710a,
-	0x793c, 0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c, 0x9db1, 0x1118,
-	0x9092, 0x007e, 0x0268, 0x00d6, 0x2069, 0x181e, 0x2d2c, 0x8d68,
-	0x2d34, 0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028,
-	0x901e, 0x6498, 0x2029, 0x0000, 0x6634, 0x782c, 0x9080, 0x0008,
-	0x2004, 0x9086, 0x0003, 0x1128, 0x7512, 0x7616, 0x731a, 0x741e,
-	0x0020, 0x7312, 0x7416, 0x751a, 0x761e, 0x006e, 0x005e, 0x004e,
-	0x003e, 0x00be, 0x0005, 0x080c, 0x8ed9, 0x7003, 0x0100, 0x782c,
-	0x700a, 0x7814, 0x700e, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9380,
-	0x080c, 0x8e85, 0x7003, 0x1400, 0x7838, 0x700a, 0x0079, 0x783c,
-	0x700e, 0x782c, 0x7012, 0x7830, 0x7016, 0x7834, 0x9084, 0x00ff,
-	0x8007, 0x701a, 0x60c3, 0x0010, 0x0804, 0x9380, 0x00e6, 0x2071,
-	0x0240, 0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6, 0x2058, 0xb8bc,
-	0xd084, 0x0120, 0x7848, 0x702a, 0x7844, 0x702e, 0x00be, 0x00fe,
-	0x000e, 0x00ee, 0x0005, 0x080c, 0x8ed0, 0x7003, 0x0100, 0x782c,
-	0x700a, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9380, 0x0021,
-	0x60c3, 0x0000, 0x0804, 0x9380, 0x00d6, 0x080c, 0x9c3f, 0xb810,
-	0x9085, 0x0300, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878,
-	0x700a, 0x687c, 0x700e, 0x7013, 0x0819, 0x080c, 0x936e, 0x721a,
-	0x2f10, 0x7222, 0x7a08, 0x7226, 0x2071, 0x024c, 0x00de, 0x0005,
-	0x00a9, 0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026,
-	0x080c, 0x29ca, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012,
-	0x002e, 0x080c, 0x93a3, 0x080c, 0x80af, 0x0005, 0x0036, 0x0096,
-	0x00d6, 0x00e6, 0x7858, 0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294,
-	0xfffd, 0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194,
-	0x00ff, 0xab74, 0x9384, 0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384,
-	0xff00, 0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6,
-	0x2069, 0x0200, 0x080c, 0x9c3f, 0x00de, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b,
-	0x2098, 0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294, 0x7000, 0x9286,
-	0x3000, 0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de, 0x009e, 0x003e,
-	0x0005, 0x900e, 0x7814, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0,
-	0x9084, 0x0003, 0x11a8, 0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180,
-	0x7824, 0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140,
-	0x2001, 0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009, 0x1983, 0x210c,
-	0x009e, 0x918d, 0x0092, 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036,
-	0x6116, 0x0005, 0x2009, 0x0009, 0x00a0, 0x2009, 0x000a, 0x0088,
-	0x2009, 0x000b, 0x0070, 0x2009, 0x000c, 0x0058, 0x2009, 0x000d,
-	0x0040, 0x2009, 0x000e, 0x0028, 0x2009, 0x000f, 0x0010, 0x2009,
-	0x0008, 0x6912, 0x0005, 0x00d6, 0x9290, 0x0018, 0x8214, 0x20e9,
-	0x0000, 0x2069, 0x0200, 0x6813, 0x0000, 0x22a8, 0x9284, 0x00e0,
-	0x0128, 0x20a9, 0x0020, 0x9292, 0x0020, 0x0008, 0x9016, 0x20a1,
-	0x0240, 0x9006, 0x4004, 0x82ff, 0x0120, 0x6810, 0x8000, 0x6812,
-	0x0c60, 0x00de, 0x0005, 0x00d6, 0x0096, 0x6014, 0x2048, 0xa878,
-	0x6056, 0x9006, 0xa836, 0xa83a, 0xa99c, 0xa946, 0xa84a, 0x6023,
-	0x0003, 0x6007, 0x0040, 0x6003, 0x0003, 0x600b, 0xffff, 0xa817,
-	0x0001, 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa813, 0x1f24, 0x080c,
-	0x8456, 0x0126, 0x2091, 0x8000, 0x080c, 0x8a4e, 0x012e, 0x009e,
-	0x00de, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096,
-	0x0066, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b8, 0x760c, 0x2660,
-	0x2678, 0x8cff, 0x0904, 0x9d11, 0x7024, 0x9c06, 0x1520, 0x2069,
-	0x0100, 0x68c0, 0x9005, 0x0904, 0x9ce8, 0x080c, 0x93ac, 0x68c3,
-	0x0000, 0x080c, 0x98da, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140,
-	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b14,
-	0x9006, 0x080c, 0x2b14, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
-	0x6827, 0x0001, 0x003e, 0x700c, 0x9c36, 0x1110, 0x660c, 0x760e,
-	0x7008, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a,
-	0x0010, 0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
-	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xbd0c, 0x1158,
-	0x080c, 0x3003, 0x080c, 0xbd1d, 0x11f0, 0x080c, 0xa7c0, 0x00d8,
-	0x080c, 0x98da, 0x08c0, 0x080c, 0xbd1d, 0x1118, 0x080c, 0xa7c0,
-	0x0090, 0x6014, 0x2048, 0x080c, 0xbb15, 0x0168, 0x6020, 0x9086,
+	0x0021, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x9192,
+	0x0010, 0x1250, 0x4003, 0x9080, 0x0004, 0x8003, 0x60c2, 0x080c,
+	0x9381, 0x002e, 0x001e, 0x0005, 0x20a9, 0x0010, 0x4003, 0x080c,
+	0x9c35, 0x20a1, 0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c, 0x8e8f,
+	0x7003, 0x6200, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9381,
+	0x0016, 0x0026, 0x080c, 0x8e8f, 0x20e9, 0x0000, 0x20a1, 0x024c,
+	0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c,
+	0x9080, 0x0023, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8,
+	0x4003, 0x8003, 0x60c2, 0x080c, 0x9381, 0x002e, 0x001e, 0x0005,
+	0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b7,
+	0x700c, 0x2060, 0x8cff, 0x0178, 0x080c, 0xbd32, 0x1110, 0x080c,
+	0xa7d1, 0x600c, 0x0006, 0x080c, 0xbf9e, 0x080c, 0x9e42, 0x080c,
+	0x97b1, 0x00ce, 0x0c78, 0x2c00, 0x700e, 0x700a, 0x012e, 0x000e,
+	0x00ce, 0x00ee, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6,
+	0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001,
+	0x180c, 0x200c, 0x918c, 0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079,
+	0x0140, 0x2071, 0x19b7, 0x7024, 0x2060, 0x8cff, 0x01f8, 0x080c,
+	0x93ad, 0x6ac0, 0x68c3, 0x0000, 0x080c, 0x80a1, 0x00c6, 0x2061,
+	0x0100, 0x080c, 0x9c4e, 0x00ce, 0x20a9, 0x01f4, 0x0461, 0x2009,
+	0x0013, 0x080c, 0x9ebc, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce,
+	0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x2001, 0x1800,
+	0x2004, 0x9096, 0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c,
+	0x80a1, 0x6814, 0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817,
+	0x0008, 0x68c3, 0x0000, 0x2011, 0x5b43, 0x080c, 0x8021, 0x20a9,
+	0x01f4, 0x0009, 0x08c0, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004,
+	0x7804, 0x9084, 0x4000, 0x190c, 0x2b26, 0x0090, 0xd084, 0x0118,
+	0x6827, 0x0001, 0x0010, 0x1f04, 0x96bb, 0x7804, 0x9084, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2b16, 0x9006, 0x080c, 0x2b16,
+	0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
+	0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c,
+	0x918c, 0xdbff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071,
+	0x19b7, 0x703c, 0x2060, 0x8cff, 0x0904, 0x9767, 0x9386, 0x0002,
+	0x1128, 0x6814, 0x9084, 0x0002, 0x0904, 0x9767, 0x68af, 0x95f5,
+	0x6817, 0x0010, 0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb,
+	0x0008, 0x080c, 0x80ae, 0x080c, 0x1e92, 0x0046, 0x2009, 0x00a5,
+	0x080c, 0x0e2f, 0x2021, 0x0169, 0x2404, 0x9084, 0x000f, 0x9086,
+	0x0004, 0x11f8, 0x68af, 0x95f5, 0x68c6, 0x68cb, 0x0008, 0x00e6,
+	0x00f6, 0x2079, 0x0090, 0x2071, 0x1a35, 0x6814, 0x9084, 0x1984,
+	0x9085, 0x0012, 0x6816, 0x782b, 0x0008, 0x7003, 0x0000, 0x00fe,
+	0x00ee, 0x9386, 0x0002, 0x1128, 0x7884, 0x9005, 0x1110, 0x7887,
+	0x0001, 0x2001, 0x1951, 0x200c, 0x080c, 0x0e2f, 0x004e, 0x20a9,
+	0x03e8, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084,
+	0x4000, 0x190c, 0x2b26, 0x0090, 0xd08c, 0x0118, 0x6827, 0x0002,
+	0x0010, 0x1f04, 0x9741, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001,
+	0x0100, 0x080c, 0x2b16, 0x9006, 0x080c, 0x2b16, 0x6827, 0x4000,
+	0x6824, 0x83ff, 0x1120, 0x2009, 0x0049, 0x080c, 0x9ebc, 0x000e,
+	0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e,
+	0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19b7,
+	0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000,
+	0x2069, 0x19b7, 0x6a32, 0x012e, 0x00de, 0x0005, 0x080c, 0x9048,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x1000, 0x00f8, 0x080c, 0x9048,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x4000, 0x00b8, 0x080c, 0x9048,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x2000, 0x0078, 0x080c, 0x9048,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x0400, 0x0038, 0x080c, 0x9048,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x0200, 0x60c3, 0x0020, 0x0804,
+	0x9381, 0x00e6, 0x2071, 0x19b7, 0x7020, 0x9005, 0x0110, 0x8001,
+	0x7022, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076,
+	0x0066, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b7, 0x7614,
+	0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, 0x0904, 0x9856, 0x8cff,
+	0x0904, 0x9856, 0x6020, 0x9086, 0x0006, 0x1904, 0x9851, 0x88ff,
+	0x0138, 0x2800, 0x9c06, 0x1904, 0x9851, 0x2039, 0x0000, 0x0050,
+	0x6010, 0x9b06, 0x1904, 0x9851, 0x85ff, 0x0120, 0x6054, 0x9106,
+	0x1904, 0x9851, 0x7024, 0x9c06, 0x15b0, 0x2069, 0x0100, 0x68c0,
+	0x9005, 0x1160, 0x6824, 0xd084, 0x0148, 0x6827, 0x0001, 0x080c,
+	0x80a1, 0x080c, 0x98db, 0x7027, 0x0000, 0x0428, 0x080c, 0x80a1,
+	0x6820, 0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3,
+	0x0000, 0x080c, 0x98db, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140,
+	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b16,
+	0x9006, 0x080c, 0x2b16, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
+	0x6827, 0x0001, 0x003e, 0x7014, 0x9c36, 0x1110, 0x660c, 0x7616,
+	0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012,
+	0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
+	0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000, 0x6014,
+	0x0096, 0x2048, 0x080c, 0xbb2a, 0x0110, 0x080c, 0xd4f6, 0x009e,
+	0x080c, 0x9e72, 0x080c, 0x97b1, 0x88ff, 0x1190, 0x00ce, 0x0804,
+	0x97cc, 0x2c78, 0x600c, 0x2060, 0x0804, 0x97cc, 0x9006, 0x012e,
+	0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005,
+	0x601b, 0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6, 0x00e6,
+	0x00d6, 0x0096, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x19b7, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0904,
+	0x98ca, 0x6020, 0x9086, 0x0006, 0x1904, 0x98c5, 0x87ff, 0x0128,
+	0x2700, 0x9c06, 0x1904, 0x98c5, 0x0040, 0x6010, 0x9b06, 0x15e8,
+	0x85ff, 0x0118, 0x6054, 0x9106, 0x15c0, 0x703c, 0x9c06, 0x1168,
+	0x0036, 0x2019, 0x0001, 0x080c, 0x96d9, 0x7033, 0x0000, 0x9006,
+	0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x7038, 0x9c36, 0x1110,
+	0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
+	0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x0066, 0x2c00,
+	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014,
+	0x2048, 0x080c, 0xbb2a, 0x0110, 0x080c, 0xd4f6, 0x080c, 0x9e72,
+	0x87ff, 0x1198, 0x00ce, 0x0804, 0x9876, 0x2c78, 0x600c, 0x2060,
+	0x0804, 0x9876, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce,
+	0x009e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce,
+	0x97bd, 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19b7, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010, 0x7007,
+	0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026,
+	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b7, 0x2c10, 0x7638,
+	0x2660, 0x2678, 0x8cff, 0x0540, 0x2200, 0x9c06, 0x1508, 0x7038,
+	0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00,
+	0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x6004, 0x9086, 0x0040, 0x090c, 0x8861, 0x9085, 0x0001, 0x0020,
+	0x2c78, 0x600c, 0x2060, 0x08b0, 0x012e, 0x000e, 0x002e, 0x006e,
+	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6, 0x00d6,
+	0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x19b7, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, 0x99c1, 0x6010,
+	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904, 0x99bc, 0x7024,
+	0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0x9993,
+	0x080c, 0x93ad, 0x68c3, 0x0000, 0x080c, 0x98db, 0x7027, 0x0000,
+	0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001,
+	0x0100, 0x080c, 0x2b16, 0x9006, 0x080c, 0x2b16, 0x2069, 0x0100,
+	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x700c, 0x9c36,
+	0x1110, 0x660c, 0x760e, 0x7008, 0x9c36, 0x1140, 0x2c00, 0x9f36,
+	0x0118, 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000, 0x660c, 0x0066,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x080c, 0xbd21, 0x1180, 0x080c, 0x3005, 0x080c, 0xbd32, 0x1518,
+	0x080c, 0xa7d1, 0x0400, 0x080c, 0x98db, 0x6824, 0xd084, 0x09b0,
+	0x6827, 0x0001, 0x0898, 0x080c, 0xbd32, 0x1118, 0x080c, 0xa7d1,
+	0x0090, 0x6014, 0x2048, 0x080c, 0xbb2a, 0x0168, 0x6020, 0x9086,
+	0x0003, 0x1508, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
+	0x6884, 0x080c, 0xbd15, 0x080c, 0xbf9e, 0x080c, 0x9e72, 0x080c,
+	0x97b1, 0x00ce, 0x0804, 0x993c, 0x2c78, 0x600c, 0x2060, 0x0804,
+	0x993c, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20, 0x080c,
+	0xd4f6, 0x0c08, 0x00d6, 0x080c, 0x8eda, 0x7003, 0x0200, 0x7007,
+	0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099, 0x1959, 0x20e9,
+	0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023, 0x0004,
+	0x7027, 0x7878, 0x080c, 0x9381, 0x00de, 0x0005, 0x080c, 0x8eda,
+	0x700b, 0x0800, 0x7814, 0x9084, 0xff00, 0x700e, 0x7814, 0x9084,
+	0x00ff, 0x7022, 0x782c, 0x7026, 0x7858, 0x9084, 0x00ff, 0x9085,
+	0x0200, 0x7002, 0x7858, 0x9084, 0xff00, 0x8007, 0x7006, 0x60c2,
+	0x0804, 0x9381, 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68, 0x2009,
+	0x0035, 0x080c, 0xc1a4, 0x00de, 0x1904, 0x9a6f, 0x080c, 0x8e8f,
+	0x7003, 0x1300, 0x782c, 0x080c, 0x9b71, 0x2068, 0x6820, 0x9086,
+	0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c, 0x9dc1, 0x11d8,
+	0x9286, 0x007e, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0498,
+	0x9286, 0x007f, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd, 0x0458,
+	0x9284, 0xff80, 0x0180, 0x9286, 0x0080, 0x1128, 0x700b, 0x00ff,
+	0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810, 0x700a,
+	0xb814, 0x700e, 0x00c0, 0x6098, 0x700e, 0x00a8, 0x080c, 0x9dc1,
+	0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250, 0x00d6,
+	0x2069, 0x181e, 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e, 0x00de,
+	0x0010, 0x6034, 0x700e, 0x7838, 0x7012, 0x783c, 0x7016, 0x60c3,
+	0x000c, 0x001e, 0x00de, 0x080c, 0x9381, 0x00be, 0x0005, 0x781b,
+	0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x00be, 0x0005, 0x792c,
+	0x9180, 0x0008, 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186, 0x0003,
+	0x0904, 0x9ae9, 0x9186, 0x0005, 0x0904, 0x9ad2, 0x9186, 0x0004,
+	0x05d8, 0x9186, 0x0008, 0x0904, 0x9ada, 0x7807, 0x0037, 0x782f,
+	0x0003, 0x7817, 0x1700, 0x080c, 0x9b4e, 0x0005, 0x080c, 0x9b0f,
+	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6800, 0x0002,
+	0x9ab3, 0x9abe, 0x9ab5, 0x9abe, 0x9aba, 0x9ab3, 0x9ab3, 0x9abe,
+	0x9abe, 0x9abe, 0x9abe, 0x9ab3, 0x9ab3, 0x9ab3, 0x9ab3, 0x9ab3,
+	0x9abe, 0x9ab3, 0x9abe, 0x080c, 0x0db4, 0x6824, 0xd0e4, 0x0110,
+	0xd0cc, 0x0110, 0x900e, 0x0010, 0x2009, 0x2000, 0x682c, 0x7022,
+	0x6830, 0x7026, 0x0804, 0x9b08, 0x080c, 0x9b0f, 0x00d6, 0x0026,
+	0x792c, 0x2168, 0x2009, 0x4000, 0x6a00, 0x9286, 0x0002, 0x1108,
+	0x900e, 0x04b0, 0x04e1, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009,
+	0x4000, 0x0470, 0x04a1, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009,
+	0x4000, 0x9286, 0x0005, 0x0118, 0x9286, 0x0002, 0x1108, 0x900e,
+	0x00f8, 0x0429, 0x00d6, 0x0026, 0x792c, 0x2168, 0x6814, 0x0096,
+	0x2048, 0xa9ac, 0xa834, 0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103,
+	0x7022, 0x7226, 0x792c, 0x9180, 0x0000, 0x2004, 0x908e, 0x0002,
+	0x0130, 0x908e, 0x0004, 0x0118, 0x2009, 0x4000, 0x0008, 0x900e,
+	0x712a, 0x60c3, 0x0018, 0x002e, 0x00de, 0x0804, 0x9381, 0x00b6,
+	0x0036, 0x0046, 0x0056, 0x0066, 0x080c, 0x8eda, 0x9006, 0x7003,
+	0x0200, 0x7938, 0x710a, 0x793c, 0x710e, 0x7810, 0x2058, 0xb8a0,
+	0x080c, 0x9dc1, 0x1118, 0x9092, 0x007e, 0x0268, 0x00d6, 0x2069,
+	0x181e, 0x2d2c, 0x8d68, 0x2d34, 0x90d8, 0x1000, 0x2b5c, 0xbb10,
+	0xbc14, 0x00de, 0x0028, 0x901e, 0x6498, 0x2029, 0x0000, 0x6634,
+	0x782c, 0x9080, 0x0008, 0x2004, 0x9086, 0x0003, 0x1128, 0x7512,
+	0x7616, 0x731a, 0x741e, 0x0020, 0x7312, 0x7416, 0x751a, 0x761e,
+	0x006e, 0x005e, 0x004e, 0x003e, 0x00be, 0x0005, 0x080c, 0x8eda,
+	0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x700e, 0x60c3,
+	0x0008, 0x0804, 0x9381, 0x080c, 0x8e86, 0x7003, 0x1400, 0x7838,
+	0x700a, 0x0079, 0x783c, 0x700e, 0x782c, 0x7012, 0x7830, 0x7016,
+	0x7834, 0x9084, 0x00ff, 0x8007, 0x701a, 0x60c3, 0x0010, 0x0804,
+	0x9381, 0x00e6, 0x2071, 0x0240, 0x0006, 0x00f6, 0x2078, 0x7810,
+	0x00b6, 0x2058, 0xb8bc, 0xd084, 0x0120, 0x7848, 0x702a, 0x7844,
+	0x702e, 0x00be, 0x00fe, 0x000e, 0x00ee, 0x0005, 0x080c, 0x8ed1,
+	0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x60c3, 0x0008,
+	0x0804, 0x9381, 0x0021, 0x60c3, 0x0000, 0x0804, 0x9381, 0x00d6,
+	0x080c, 0x9c4a, 0xb810, 0x9085, 0x0300, 0x7002, 0xb814, 0x7006,
+	0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x7013, 0x0819,
+	0x080c, 0x936f, 0x721a, 0x2f10, 0x7222, 0x7a08, 0x7226, 0x2071,
+	0x024c, 0x00de, 0x0005, 0x00a9, 0x7914, 0x712a, 0x60c3, 0x0000,
+	0x60a7, 0x9575, 0x0026, 0x080c, 0x29cc, 0x0228, 0x2011, 0x0101,
+	0x2204, 0xc0c5, 0x2012, 0x002e, 0x080c, 0x93a4, 0x080c, 0x8098,
+	0x0005, 0x0036, 0x0096, 0x00d6, 0x00e6, 0x7858, 0x2048, 0xaa7c,
+	0x9296, 0x00c0, 0x9294, 0xfffd, 0xaa7e, 0xaa80, 0x9294, 0x0300,
+	0xaa82, 0xa96c, 0x9194, 0x00ff, 0xab74, 0x9384, 0x00ff, 0x908d,
+	0xc200, 0xa96e, 0x9384, 0xff00, 0x9215, 0xaa76, 0xa870, 0xaa78,
+	0xa87a, 0xaa72, 0x00d6, 0x2069, 0x0200, 0x080c, 0x9c4a, 0x00de,
+	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000a, 0xa860, 0x20e0,
+	0xa85c, 0x9080, 0x001b, 0x2098, 0x4003, 0x60a3, 0x0035, 0xaa68,
+	0x9294, 0x7000, 0x9286, 0x3000, 0x0110, 0x60a3, 0x0037, 0x00ee,
+	0x00de, 0x009e, 0x003e, 0x0005, 0x900e, 0x7814, 0x0096, 0x2048,
+	0xa87c, 0xd0fc, 0x01c0, 0x9084, 0x0003, 0x11a8, 0x2001, 0x180c,
+	0x2004, 0xd0bc, 0x0180, 0x7824, 0xd0cc, 0x1168, 0xd0c4, 0x1158,
+	0xa8a8, 0x9005, 0x1140, 0x2001, 0x180c, 0x200c, 0xc1d5, 0x2102,
+	0x2009, 0x1982, 0x210c, 0x009e, 0x918d, 0x0092, 0x0010, 0x2009,
+	0x0096, 0x60ab, 0x0036, 0x6116, 0x0005, 0x2009, 0x0009, 0x00a0,
+	0x2009, 0x000a, 0x0088, 0x2009, 0x000b, 0x0070, 0x2009, 0x000c,
+	0x0058, 0x2009, 0x000d, 0x0040, 0x2009, 0x000e, 0x0028, 0x2009,
+	0x000f, 0x0010, 0x2009, 0x0008, 0x6912, 0x0005, 0x00d6, 0x9290,
+	0x0018, 0x8214, 0x20e9, 0x0000, 0x2069, 0x0200, 0x6813, 0x0000,
+	0x22a8, 0x9284, 0x00e0, 0x0128, 0x20a9, 0x0020, 0x9292, 0x0020,
+	0x0008, 0x9016, 0x20a1, 0x0240, 0x9006, 0x4004, 0x82ff, 0x0120,
+	0x6810, 0x8000, 0x6812, 0x0c60, 0x00de, 0x0005, 0x00d6, 0x0096,
+	0x6014, 0x2048, 0xa878, 0x6056, 0x9006, 0xa836, 0xa83a, 0xa99c,
+	0xa946, 0xa84a, 0x6023, 0x0003, 0x6007, 0x0040, 0x6003, 0x0003,
+	0x600b, 0xffff, 0xa817, 0x0001, 0xa842, 0xa83e, 0x2900, 0xa85a,
+	0xa813, 0x1f26, 0x080c, 0x843f, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x8a4a, 0x012e, 0x009e, 0x00de, 0x0005, 0x00f6, 0x00e6, 0x00d6,
+	0x00c6, 0x00a6, 0x0096, 0x0066, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x19b7, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9d21, 0x7024,
+	0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0x9cf3,
+	0x080c, 0x93ad, 0x68c3, 0x0000, 0x080c, 0x98db, 0x7027, 0x0000,
+	0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001,
+	0x0100, 0x080c, 0x2b16, 0x9006, 0x080c, 0x2b16, 0x2069, 0x0100,
+	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x700c, 0x9c36,
+	0x1110, 0x660c, 0x760e, 0x7008, 0x9c36, 0x1140, 0x2c00, 0x9f36,
+	0x0118, 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000, 0x660c, 0x0066,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x080c, 0xbd21, 0x1180, 0x080c, 0x3005, 0x080c, 0xbd32, 0x1518,
+	0x080c, 0xa7d1, 0x0400, 0x080c, 0x98db, 0x6824, 0xd084, 0x09b0,
+	0x6827, 0x0001, 0x0898, 0x080c, 0xbd32, 0x1118, 0x080c, 0xa7d1,
+	0x0090, 0x6014, 0x2048, 0x080c, 0xbb2a, 0x0168, 0x6020, 0x9086,
 	0x0003, 0x1520, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0x688c, 0x080c, 0xbd00, 0x080c, 0xbf84, 0x080c, 0x9e62, 0x080c,
-	0x97b0, 0x00ce, 0x0804, 0x9c99, 0x2c78, 0x600c, 0x2060, 0x0804,
-	0x9c99, 0x700f, 0x0000, 0x700b, 0x0000, 0x012e, 0x006e, 0x009e,
+	0x6891, 0x080c, 0xbd15, 0x080c, 0xbf9e, 0x080c, 0x9e72, 0x080c,
+	0x97b1, 0x00ce, 0x0804, 0x9ca4, 0x2c78, 0x600c, 0x2060, 0x0804,
+	0x9ca4, 0x700f, 0x0000, 0x700b, 0x0000, 0x012e, 0x006e, 0x009e,
 	0x00ae, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086,
-	0x0006, 0x1d08, 0x080c, 0xd4d5, 0x08f0, 0x00d6, 0x0156, 0x080c,
-	0x8ed9, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100, 0x700b, 0x0003,
+	0x0006, 0x1d08, 0x080c, 0xd4f6, 0x08f0, 0x00d6, 0x0156, 0x080c,
+	0x8eda, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100, 0x700b, 0x0003,
 	0x60c3, 0x0008, 0x0490, 0x7003, 0x0200, 0x7007, 0x0000, 0x2069,
 	0x1800, 0x901e, 0x6800, 0x9086, 0x0004, 0x1110, 0xc38d, 0x0060,
-	0x080c, 0x6fb2, 0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6ad8, 0xd29c,
+	0x080c, 0x6f9b, 0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6ad8, 0xd29c,
 	0x1110, 0xd2ac, 0x0108, 0xc39d, 0x730e, 0x2011, 0x1848, 0x63f0,
 	0x2312, 0x20a9, 0x0006, 0x2011, 0x1840, 0x2019, 0x1841, 0x2071,
 	0x0250, 0x2376, 0x8e70, 0x2276, 0x8e70, 0x9398, 0x0002, 0x9290,
-	0x0002, 0x1f04, 0x9d59, 0x60c3, 0x0020, 0x080c, 0x9380, 0x015e,
-	0x00de, 0x0005, 0x0156, 0x080c, 0x8ed9, 0x7a14, 0x82ff, 0x0168,
+	0x0002, 0x1f04, 0x9d69, 0x60c3, 0x0020, 0x080c, 0x9381, 0x015e,
+	0x00de, 0x0005, 0x0156, 0x080c, 0x8eda, 0x7a14, 0x82ff, 0x0168,
 	0x9286, 0xffff, 0x0118, 0x9282, 0x000e, 0x1238, 0x7003, 0x0100,
 	0x700b, 0x0003, 0x60c3, 0x0008, 0x0488, 0x7003, 0x0200, 0x7007,
-	0x001c, 0x700f, 0x0001, 0x2011, 0x198e, 0x2204, 0x8007, 0x701a,
+	0x001c, 0x700f, 0x0001, 0x2011, 0x198d, 0x2204, 0x8007, 0x701a,
 	0x8210, 0x2204, 0x8007, 0x701e, 0x0421, 0x1120, 0xb8a0, 0x9082,
 	0x007f, 0x0248, 0x2001, 0x181e, 0x2004, 0x7022, 0x2001, 0x181f,
 	0x2004, 0x7026, 0x0030, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff,
 	0x7026, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
 	0x0000, 0x20a1, 0x0256, 0x4003, 0x60c3, 0x001c, 0x015e, 0x0804,
-	0x9380, 0x0006, 0x2001, 0x1836, 0x2004, 0xd0ac, 0x000e, 0x0005,
-	0x2011, 0x0003, 0x080c, 0x9771, 0x2011, 0x0002, 0x080c, 0x977b,
-	0x080c, 0x9662, 0x0036, 0x901e, 0x080c, 0x96d8, 0x003e, 0x0005,
+	0x9381, 0x0006, 0x2001, 0x1836, 0x2004, 0xd0ac, 0x000e, 0x0005,
+	0x2011, 0x0003, 0x080c, 0x9772, 0x2011, 0x0002, 0x080c, 0x977c,
+	0x080c, 0x9663, 0x0036, 0x901e, 0x080c, 0x96d9, 0x003e, 0x0005,
 	0x2071, 0x1883, 0x7000, 0x9005, 0x0140, 0x2001, 0x0976, 0x2071,
 	0x1800, 0x7072, 0x7076, 0x7067, 0xffe0, 0x2071, 0x1800, 0x7070,
 	0x7052, 0x7057, 0x1cd0, 0x0005, 0x00e6, 0x0126, 0x2071, 0x1800,
@@ -4861,42 +4863,42 @@
 	0x6016, 0x601a, 0x6012, 0x6023, 0x0000, 0x6003, 0x0000, 0x601e,
 	0x6056, 0x605a, 0x6026, 0x602a, 0x602e, 0x6032, 0x6036, 0x603a,
 	0x603e, 0x6042, 0x2061, 0x1800, 0x6050, 0x8000, 0x6052, 0x9086,
-	0x0001, 0x0108, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x8973,
+	0x0001, 0x0108, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x896d,
 	0x012e, 0x0cc0, 0x0006, 0x6000, 0x9086, 0x0000, 0x01b0, 0x601c,
-	0xd084, 0x190c, 0x190d, 0x6017, 0x0000, 0x6023, 0x0007, 0x2001,
-	0x1957, 0x2004, 0x0006, 0x9082, 0x0051, 0x000e, 0x0208, 0x8004,
-	0x601a, 0x080c, 0xd787, 0x6043, 0x0000, 0x000e, 0x0005, 0x00e6,
+	0xd084, 0x190c, 0x190f, 0x6017, 0x0000, 0x6023, 0x0007, 0x2001,
+	0x1956, 0x2004, 0x0006, 0x9082, 0x0051, 0x000e, 0x0208, 0x8004,
+	0x601a, 0x080c, 0xd7a8, 0x6043, 0x0000, 0x000e, 0x0005, 0x00e6,
 	0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7550, 0x9582, 0x0001,
 	0x0608, 0x7054, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0,
 	0x0018, 0x7064, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98,
 	0x6003, 0x0008, 0x8529, 0x7552, 0x9ca8, 0x0018, 0x7064, 0x9502,
 	0x1230, 0x7556, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x7057,
 	0x1cd0, 0x0cc0, 0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f, 0x0002,
-	0x9ebf, 0x9ec8, 0x9ee3, 0x9efe, 0xc238, 0xc255, 0xc270, 0x9ebf,
-	0x9ec8, 0x9ebf, 0x9f1a, 0x9ebf, 0x9ebf, 0x9ebf, 0x9ebf, 0x9186,
-	0x0013, 0x1128, 0x080c, 0x886e, 0x080c, 0x8973, 0x0005, 0x0005,
+	0x9ecf, 0x9ed8, 0x9ef3, 0x9f0e, 0xc252, 0xc26f, 0xc28a, 0x9ecf,
+	0x9ed8, 0x9ecf, 0x9f2a, 0x9ecf, 0x9ecf, 0x9ecf, 0x9ecf, 0x9186,
+	0x0013, 0x1128, 0x080c, 0x8861, 0x080c, 0x896d, 0x0005, 0x0005,
 	0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0db4, 0x0013, 0x006e,
-	0x0005, 0x9ee1, 0xa639, 0xa807, 0x9ee1, 0xa895, 0xa1fd, 0x9ee1,
-	0x9ee1, 0xa5bb, 0xae37, 0x9ee1, 0x9ee1, 0x9ee1, 0x9ee1, 0x9ee1,
-	0x9ee1, 0x080c, 0x0db4, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
-	0x0db4, 0x0013, 0x006e, 0x0005, 0x9efc, 0xb50b, 0x9efc, 0x9efc,
-	0x9efc, 0x9efc, 0x9efc, 0x9efc, 0xb4b0, 0xb68d, 0x9efc, 0xb54c,
-	0xb5cb, 0xb54c, 0xb5cb, 0x9efc, 0x080c, 0x0db4, 0x6000, 0x9082,
-	0x0016, 0x1a0c, 0x0db4, 0x6000, 0x0002, 0x9f18, 0xae7e, 0xaf63,
-	0xb093, 0xb23e, 0x9f18, 0x9f18, 0x9f18, 0xae52, 0xb43c, 0xb43f,
-	0x9f18, 0x9f18, 0x9f18, 0x9f18, 0xb46e, 0x9f18, 0x9f18, 0x9f18,
+	0x0005, 0x9ef1, 0xa64a, 0xa818, 0x9ef1, 0xa8a6, 0xa20d, 0x9ef1,
+	0x9ef1, 0xa5cc, 0xae4a, 0x9ef1, 0x9ef1, 0x9ef1, 0x9ef1, 0x9ef1,
+	0x9ef1, 0x080c, 0x0db4, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
+	0x0db4, 0x0013, 0x006e, 0x0005, 0x9f0c, 0xb51e, 0x9f0c, 0x9f0c,
+	0x9f0c, 0x9f0c, 0x9f0c, 0x9f0c, 0xb4c3, 0xb6a0, 0x9f0c, 0xb55f,
+	0xb5de, 0xb55f, 0xb5de, 0x9f0c, 0x080c, 0x0db4, 0x6000, 0x9082,
+	0x0016, 0x1a0c, 0x0db4, 0x6000, 0x0002, 0x9f28, 0xae91, 0xaf76,
+	0xb0a6, 0xb251, 0x9f28, 0x9f28, 0x9f28, 0xae65, 0xb44f, 0xb452,
+	0x9f28, 0x9f28, 0x9f28, 0x9f28, 0xb481, 0x9f28, 0x9f28, 0x9f28,
 	0x080c, 0x0db4, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0db4,
-	0x0013, 0x006e, 0x0005, 0x9f33, 0x9f33, 0x9f76, 0xa015, 0xa0aa,
-	0x9f33, 0x9f33, 0x9f33, 0x9f35, 0x9f33, 0x9f33, 0x9f33, 0x9f33,
-	0x9f33, 0x9f33, 0x9f33, 0x080c, 0x0db4, 0x9186, 0x004c, 0x0588,
+	0x0013, 0x006e, 0x0005, 0x9f43, 0x9f43, 0x9f86, 0xa025, 0xa0ba,
+	0x9f43, 0x9f43, 0x9f43, 0x9f45, 0x9f43, 0x9f43, 0x9f43, 0x9f43,
+	0x9f43, 0x9f43, 0x9f43, 0x080c, 0x0db4, 0x9186, 0x004c, 0x0588,
 	0x9186, 0x0003, 0x190c, 0x0db4, 0x0096, 0x601c, 0xc0ed, 0x601e,
 	0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa87c, 0x9084, 0xa000,
 	0xc0b5, 0xa87e, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0x9006, 0xa836,
 	0xa83a, 0xa884, 0x9092, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003,
-	0x8013, 0x8213, 0x9210, 0x621a, 0x009e, 0x2c10, 0x080c, 0x1a5c,
-	0x080c, 0x8456, 0x0126, 0x2091, 0x8000, 0x080c, 0x8a4e, 0x012e,
+	0x8013, 0x8213, 0x9210, 0x621a, 0x009e, 0x2c10, 0x080c, 0x1a5e,
+	0x080c, 0x843f, 0x0126, 0x2091, 0x8000, 0x080c, 0x8a4a, 0x012e,
 	0x0005, 0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c,
-	0xa0cc, 0x080c, 0xc22a, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096,
+	0xa0dc, 0x080c, 0xc244, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096,
 	0x00f6, 0x2079, 0x1800, 0x7a8c, 0x6014, 0x2048, 0xa87c, 0xd0ec,
 	0x1110, 0x9290, 0x0018, 0xac78, 0xc4fc, 0x0046, 0xa8e0, 0x9005,
 	0x1140, 0xa8dc, 0x921a, 0x0140, 0x0220, 0xa87b, 0x0007, 0x2010,
@@ -4905,56 +4907,56 @@
 	0x00f6, 0x2400, 0x9005, 0x1108, 0x009a, 0x2100, 0x9086, 0x0015,
 	0x1118, 0x2001, 0x0001, 0x0038, 0x2100, 0x9086, 0x0016, 0x0118,
 	0x2001, 0x0001, 0x002a, 0x94a4, 0x0007, 0x8423, 0x9405, 0x0002,
-	0x9fdd, 0x9fdd, 0x9fd8, 0x9fdb, 0x9fdd, 0x9fd5, 0x9fc8, 0x9fc8,
-	0x9fc8, 0x9fc8, 0x9fc8, 0x9fc8, 0x9fc8, 0x9fc8, 0x9fc8, 0x9fc8,
+	0x9fed, 0x9fed, 0x9fe8, 0x9feb, 0x9fed, 0x9fe5, 0x9fd8, 0x9fd8,
+	0x9fd8, 0x9fd8, 0x9fd8, 0x9fd8, 0x9fd8, 0x9fd8, 0x9fd8, 0x9fd8,
 	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e, 0x000e, 0x004e,
-	0x00fe, 0x009e, 0x00de, 0x080c, 0x0db4, 0x080c, 0xaa76, 0x0028,
-	0x080c, 0xab99, 0x0010, 0x080c, 0xac88, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0xa18a,
+	0x00fe, 0x009e, 0x00de, 0x080c, 0x0db4, 0x080c, 0xaa89, 0x0028,
+	0x080c, 0xabac, 0x0010, 0x080c, 0xac9b, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0xa19a,
 	0x0530, 0xa804, 0xa80e, 0x00a6, 0x2050, 0xb100, 0x00ae, 0x8006,
 	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002,
 	0xaacc, 0xabd0, 0xacd4, 0xadd8, 0x2031, 0x0000, 0x2041, 0x1249,
-	0x080c, 0xa334, 0x0160, 0x000e, 0x9005, 0x0120, 0x00fe, 0x009e,
-	0x00de, 0x0005, 0x00fe, 0x009e, 0x00de, 0x0804, 0x9e32, 0x2001,
-	0x002c, 0x900e, 0x080c, 0xa1f0, 0x0c70, 0x91b6, 0x0015, 0x0170,
+	0x080c, 0xa345, 0x0160, 0x000e, 0x9005, 0x0120, 0x00fe, 0x009e,
+	0x00de, 0x0005, 0x00fe, 0x009e, 0x00de, 0x0804, 0x9e42, 0x2001,
+	0x002c, 0x900e, 0x080c, 0xa200, 0x0c70, 0x91b6, 0x0015, 0x0170,
 	0x91b6, 0x0016, 0x0158, 0x91b2, 0x0047, 0x0a0c, 0x0db4, 0x91b2,
 	0x0050, 0x1a0c, 0x0db4, 0x9182, 0x0047, 0x00ca, 0x2001, 0x0109,
 	0x2004, 0xd08c, 0x0198, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016,
-	0x0026, 0x080c, 0x83aa, 0x002e, 0x001e, 0x000e, 0x012e, 0xa001,
-	0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0x9f76, 0x0005, 0xa048,
-	0xa048, 0xa04a, 0xa080, 0xa048, 0xa048, 0xa048, 0xa048, 0xa093,
-	0x080c, 0x0db4, 0x00d6, 0x0016, 0x0096, 0x080c, 0x8923, 0x080c,
-	0x8a4e, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc, 0x01c0,
+	0x0026, 0x080c, 0x8393, 0x002e, 0x001e, 0x000e, 0x012e, 0xa001,
+	0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0x9f86, 0x0005, 0xa058,
+	0xa058, 0xa05a, 0xa090, 0xa058, 0xa058, 0xa058, 0xa058, 0xa0a3,
+	0x080c, 0x0db4, 0x00d6, 0x0016, 0x0096, 0x080c, 0x891d, 0x080c,
+	0x8a4a, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc, 0x01c0,
 	0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, 0x9005, 0x0140, 0x2001,
-	0x0000, 0x900e, 0x080c, 0xa1f0, 0x080c, 0x9e32, 0x00a8, 0x6003,
+	0x0000, 0x900e, 0x080c, 0xa200, 0x080c, 0x9e42, 0x00a8, 0x6003,
 	0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, 0xa8ae, 0xa8b2, 0x0c78,
 	0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, 0xa8ae, 0xa8a8, 0xa8b2,
 	0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, 0x001e, 0x00de, 0x0005,
-	0x080c, 0x8923, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xbb17,
-	0x0120, 0xa87b, 0x0006, 0x080c, 0x688c, 0x009e, 0x00de, 0x080c,
-	0x9e32, 0x0804, 0x8a4e, 0x080c, 0x8923, 0x080c, 0x2fda, 0x080c,
-	0xc227, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xbb17, 0x0120,
-	0xa87b, 0x0029, 0x080c, 0x688c, 0x009e, 0x00de, 0x080c, 0x9e32,
-	0x0804, 0x8a4e, 0x9182, 0x0047, 0x0002, 0xa0ba, 0xa0bc, 0xa0ba,
-	0xa0ba, 0xa0ba, 0xa0ba, 0xa0ba, 0xa0ba, 0xa0ba, 0xa0ba, 0xa0ba,
-	0xa0ba, 0xa0bc, 0x080c, 0x0db4, 0x00d6, 0x0096, 0x080c, 0x150f,
-	0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, 0x080c, 0x688c,
-	0x009e, 0x00de, 0x0804, 0x9e32, 0x0026, 0x0036, 0x0056, 0x0066,
+	0x080c, 0x891d, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xbb2c,
+	0x0120, 0xa87b, 0x0006, 0x080c, 0x6891, 0x009e, 0x00de, 0x080c,
+	0x9e42, 0x0804, 0x8a4a, 0x080c, 0x891d, 0x080c, 0x2fdc, 0x080c,
+	0xc241, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xbb2c, 0x0120,
+	0xa87b, 0x0029, 0x080c, 0x6891, 0x009e, 0x00de, 0x080c, 0x9e42,
+	0x0804, 0x8a4a, 0x9182, 0x0047, 0x0002, 0xa0ca, 0xa0cc, 0xa0ca,
+	0xa0ca, 0xa0ca, 0xa0ca, 0xa0ca, 0xa0ca, 0xa0ca, 0xa0ca, 0xa0ca,
+	0xa0ca, 0xa0cc, 0x080c, 0x0db4, 0x00d6, 0x0096, 0x080c, 0x1511,
+	0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, 0x080c, 0x6891,
+	0x009e, 0x00de, 0x0804, 0x9e42, 0x0026, 0x0036, 0x0056, 0x0066,
 	0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, 0x0feb, 0x000e, 0x090c,
 	0x0db4, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e,
 	0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, 0x1800, 0x798c, 0x9188,
 	0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, 0x2950, 0x00a6, 0x2001,
 	0x0205, 0x2003, 0x0000, 0x901e, 0x2029, 0x0001, 0x9182, 0x0034,
-	0x1228, 0x2011, 0x001f, 0x080c, 0xb712, 0x04c0, 0x2130, 0x2009,
-	0x0034, 0x2011, 0x001f, 0x080c, 0xb712, 0x96b2, 0x0034, 0xb004,
+	0x1228, 0x2011, 0x001f, 0x080c, 0xb725, 0x04c0, 0x2130, 0x2009,
+	0x0034, 0x2011, 0x001f, 0x080c, 0xb725, 0x96b2, 0x0034, 0xb004,
 	0x904d, 0x0110, 0x080c, 0x0f9d, 0x080c, 0x0feb, 0x01d0, 0x8528,
 	0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d,
-	0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xb712, 0x00b8, 0x96b2,
-	0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x080c, 0xb712,
+	0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xb725, 0x00b8, 0x96b2,
+	0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x080c, 0xb725,
 	0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad,
 	0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, 0x0048, 0x2001, 0x0205,
 	0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566, 0x2a48,
-	0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x688c, 0x000e, 0x2048,
+	0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6891, 0x000e, 0x2048,
 	0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, 0x006e, 0x005e, 0x003e,
 	0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, 0x0006, 0x080c, 0x0feb,
 	0x000e, 0x090c, 0x0db4, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019,
@@ -4962,7 +4964,7 @@
 	0x1800, 0x798c, 0x810c, 0x9188, 0x000c, 0x9182, 0x001a, 0x0210,
 	0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, 0xac76, 0x2e98, 0xa85c,
 	0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080,
-	0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x688c, 0x009e, 0x00fe,
+	0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6891, 0x009e, 0x00fe,
 	0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, 0x0096, 0x0016, 0x2001,
 	0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x001e, 0x2079, 0x0200,
 	0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, 0x000c, 0x2098, 0x2021,
@@ -4974,1922 +4976,1924 @@
 	0x2400, 0x9202, 0x2410, 0x9318, 0x9006, 0x2020, 0x22a8, 0xa800,
 	0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, 0x83ff, 0x0180, 0x3300,
 	0x9086, 0x0280, 0x1130, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816,
-	0x2e98, 0x2310, 0x84ff, 0x0904, 0xa19f, 0x0804, 0xa1a1, 0x9085,
+	0x2e98, 0x2310, 0x84ff, 0x0904, 0xa1af, 0x0804, 0xa1b1, 0x9085,
 	0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, 0x00de, 0x001e, 0x0005,
 	0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x080c,
-	0x687f, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015, 0x1118,
-	0x080c, 0x9e32, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0db4, 0x080c,
-	0x9e32, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98, 0x6014,
+	0x6884, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015, 0x1118,
+	0x080c, 0x9e42, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0db4, 0x080c,
+	0x9e42, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98, 0x6014,
 	0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x20a0, 0x009e, 0x4003,
-	0x0136, 0x9080, 0x001b, 0x2011, 0x0006, 0x20a9, 0x0001, 0x3418,
-	0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211, 0x1db8,
-	0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398, 0x4003,
-	0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c, 0xbb17,
-	0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0x009e,
-	0x0804, 0x9e32, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386, 0x0200,
-	0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8bf, 0x0000, 0x00be, 0x6014,
-	0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xab32,
-	0x080c, 0x9e32, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011, 0x1d48,
-	0x0cc8, 0x0006, 0x0016, 0x080c, 0xc212, 0x0188, 0x6014, 0x9005,
-	0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x6043, 0x0000, 0x2009,
-	0x0022, 0x080c, 0xa611, 0x9006, 0x001e, 0x000e, 0x0005, 0x9085,
-	0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80, 0x000c,
-	0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0001,
-	0x2099, 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a, 0xa804,
-	0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003,
-	0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9, 0x0020,
-	0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867,
-	0x0103, 0x080c, 0x9e32, 0x001e, 0x009e, 0x0005, 0x0096, 0x0016,
-	0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084, 0x00ff,
-	0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004, 0x9108,
-	0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048, 0x080c,
-	0xb712, 0x080c, 0xbb17, 0x0140, 0x6014, 0x2048, 0xa807, 0x0000,
-	0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0x9e32, 0x001e, 0x009e,
-	0x0005, 0x0016, 0x0096, 0x7030, 0x9086, 0x0100, 0x1118, 0x2009,
-	0x0004, 0x0010, 0x7034, 0x800c, 0x810b, 0x2011, 0x000c, 0x2019,
-	0x000c, 0x6014, 0x2048, 0xa804, 0x0096, 0x9005, 0x0108, 0x2048,
-	0x080c, 0xb712, 0x009e, 0x080c, 0xbb17, 0x0148, 0xa804, 0x9005,
-	0x1158, 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c,
-	0x9e32, 0x009e, 0x001e, 0x0005, 0x0086, 0x2040, 0xa030, 0x8007,
-	0x9086, 0x0100, 0x1118, 0x080c, 0xa7c0, 0x00e0, 0xa034, 0x8007,
-	0x800c, 0x8806, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x000c, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
-	0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x122f,
-	0x0019, 0x0d08, 0x008e, 0x0898, 0x0096, 0x0006, 0x080c, 0x0feb,
-	0x000e, 0x01b0, 0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006,
-	0xae6a, 0x2800, 0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96,
-	0xad9a, 0x0086, 0x2940, 0x080c, 0x10d5, 0x008e, 0x9085, 0x0001,
-	0x009e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff,
-	0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1520, 0x700c,
-	0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x11e0, 0x6043,
-	0x0000, 0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xc18a, 0x001e,
-	0x1158, 0x622c, 0x2268, 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003,
-	0x0130, 0x9386, 0x0006, 0x0128, 0x080c, 0x9e32, 0x0020, 0x0039,
-	0x0010, 0x080c, 0xa446, 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096,
-	0x6814, 0x2048, 0x9186, 0x0015, 0x0904, 0xa42e, 0x918e, 0x0016,
-	0x1904, 0xa444, 0x700c, 0x908c, 0xff00, 0x9186, 0x1700, 0x0120,
-	0x9186, 0x0300, 0x1904, 0xa408, 0x89ff, 0x1138, 0x6800, 0x9086,
-	0x000f, 0x0904, 0xa3eb, 0x0804, 0xa442, 0x6808, 0x9086, 0xffff,
-	0x1904, 0xa430, 0xa87c, 0x9084, 0x0060, 0x9086, 0x0020, 0x1128,
-	0xa83c, 0xa940, 0x9105, 0x1904, 0xa430, 0x6824, 0xd0b4, 0x1904,
-	0xa430, 0x080c, 0xbd00, 0x685c, 0xa882, 0xa87c, 0xc0dc, 0xc0f4,
-	0xc0d4, 0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001, 0x000a, 0x080c,
-	0x8270, 0xa884, 0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff, 0x002e,
-	0x1138, 0x00c6, 0x2d60, 0x080c, 0xb83c, 0x00ce, 0x0804, 0xa442,
-	0x00c6, 0xa868, 0xd0fc, 0x1118, 0x080c, 0x5d4d, 0x0010, 0x080c,
-	0x60f4, 0x00ce, 0x1904, 0xa430, 0x00c6, 0x2d60, 0x080c, 0x9e32,
-	0x00ce, 0x0804, 0xa442, 0x00c6, 0x080c, 0x9e7f, 0x0198, 0x6017,
-	0x0000, 0x6810, 0x6012, 0x080c, 0xbf8c, 0x6023, 0x0003, 0x6904,
-	0x00c6, 0x2d60, 0x080c, 0x9e32, 0x00ce, 0x080c, 0x9eac, 0x00ce,
-	0x0804, 0xa442, 0x2001, 0x1959, 0x2004, 0x6842, 0x00ce, 0x04d0,
-	0x7008, 0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900,
-	0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c,
-	0xc1cc, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x00ce, 0x00e8, 0x700c, 0x9086, 0x2a00,
-	0x1138, 0x2001, 0x1959, 0x2004, 0x6842, 0x00a0, 0x0479, 0x00a0,
-	0x89ff, 0x090c, 0x0db4, 0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103,
-	0xa87b, 0x0003, 0x080c, 0x66a7, 0x080c, 0xbd00, 0x080c, 0x9e62,
-	0x00de, 0x00ce, 0x080c, 0x9e32, 0x009e, 0x0005, 0x9186, 0x0015,
-	0x1128, 0x2001, 0x1959, 0x2004, 0x6842, 0x0068, 0x918e, 0x0016,
-	0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c, 0xd787, 0x080c, 0x8204,
-	0x080c, 0x9e32, 0x00ce, 0x080c, 0x9e32, 0x0005, 0x0026, 0x0036,
-	0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001, 0x1959,
-	0x2004, 0x6842, 0x0804, 0xa4c0, 0x00c6, 0x2d60, 0x080c, 0xb73d,
-	0x00ce, 0x6804, 0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060,
-	0x6003, 0x0001, 0x6007, 0x0050, 0x080c, 0x83f1, 0x080c, 0x8973,
-	0x00ce, 0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff, 0x090c,
-	0x0db4, 0x6800, 0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac, 0x0178,
-	0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882, 0x2001,
-	0x0001, 0x6832, 0x0400, 0x2001, 0x0007, 0x6832, 0x00e0, 0xa87c,
-	0xd0b4, 0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48, 0xa838,
-	0xa934, 0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024, 0x9306,
-	0x1118, 0x7020, 0x9406, 0x0d38, 0x7020, 0x683e, 0x7024, 0x683a,
-	0x2001, 0x0005, 0x6832, 0x080c, 0xbe83, 0x080c, 0x8973, 0x0010,
-	0x080c, 0x9e32, 0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6,
-	0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10,
-	0x00be, 0x9206, 0x1904, 0xa52b, 0x700c, 0x6210, 0x00b6, 0x2258,
-	0xba14, 0x00be, 0x9206, 0x1904, 0xa52b, 0x6038, 0x2068, 0x6824,
-	0xc0dc, 0x6826, 0x6a20, 0x9286, 0x0007, 0x0904, 0xa52b, 0x9286,
-	0x0002, 0x0904, 0xa52b, 0x9286, 0x0000, 0x05e8, 0x6808, 0x633c,
-	0x9306, 0x15c8, 0x2071, 0x026c, 0x9186, 0x0015, 0x0570, 0x918e,
-	0x0016, 0x1100, 0x00c6, 0x6038, 0x2060, 0x6104, 0x9186, 0x004b,
-	0x01c0, 0x9186, 0x004c, 0x01a8, 0x9186, 0x004d, 0x0190, 0x9186,
-	0x004e, 0x0178, 0x9186, 0x0052, 0x0160, 0x6014, 0x0096, 0x2048,
-	0x080c, 0xbb17, 0x090c, 0x0db4, 0xa87b, 0x0003, 0x009e, 0x080c,
-	0xc1cc, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x00ce, 0x0030, 0x6038, 0x2070, 0x2001,
-	0x1959, 0x2004, 0x7042, 0x080c, 0x9e32, 0x002e, 0x00de, 0x00ee,
-	0x0005, 0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048, 0x6010, 0x2058,
-	0x91b6, 0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c, 0xbc02,
-	0x0460, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0010,
-	0x2019, 0x000a, 0x20a9, 0x0004, 0x080c, 0xae0d, 0x002e, 0x003e,
-	0x015e, 0x009e, 0x1904, 0xa59a, 0x0096, 0x0156, 0x0036, 0x0026,
-	0x2b48, 0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9, 0x0004, 0x080c,
-	0xae0d, 0x002e, 0x003e, 0x015e, 0x009e, 0x15a0, 0x7238, 0xba0a,
-	0x733c, 0xbb0e, 0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005, 0x1128,
-	0x00fe, 0x009e, 0x00be, 0x0804, 0xa235, 0x0096, 0x2048, 0xaa12,
-	0xab16, 0xac0a, 0x009e, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f,
-	0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c,
-	0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x122f, 0x080c, 0xa334,
-	0x0130, 0x00fe, 0x009e, 0x080c, 0x9e32, 0x00be, 0x0005, 0x080c,
-	0xa7c0, 0x0cb8, 0x2b78, 0x00f6, 0x080c, 0x2fda, 0x080c, 0xc227,
-	0x00fe, 0x00c6, 0x080c, 0x9ddc, 0x2f00, 0x6012, 0x6017, 0x0000,
-	0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007,
-	0x080c, 0x618f, 0x080c, 0x61bb, 0x080c, 0x8439, 0x080c, 0x8973,
-	0x00ce, 0x0804, 0xa56d, 0x2100, 0x91b2, 0x0053, 0x1a0c, 0x0db4,
-	0x91b2, 0x0040, 0x1a04, 0xa623, 0x0002, 0xa611, 0xa611, 0xa607,
-	0xa611, 0xa611, 0xa611, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605,
-	0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605,
-	0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605,
-	0xa605, 0xa605, 0xa605, 0xa605, 0xa611, 0xa605, 0xa611, 0xa611,
-	0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa607, 0xa605, 0xa605,
-	0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa611,
-	0xa611, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605, 0xa605,
-	0xa605, 0xa605, 0xa611, 0xa605, 0xa605, 0x080c, 0x0db4, 0x0066,
-	0x00b6, 0x6610, 0x2658, 0xb8bc, 0xc08c, 0xb8be, 0x00be, 0x006e,
-	0x0000, 0x6003, 0x0001, 0x6106, 0x9186, 0x0032, 0x0118, 0x080c,
-	0x8439, 0x0010, 0x080c, 0x83f1, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x8973, 0x012e, 0x0005, 0x2600, 0x0002, 0xa637, 0xa637, 0xa637,
-	0xa611, 0xa611, 0xa637, 0xa637, 0xa637, 0xa637, 0xa611, 0xa637,
-	0xa611, 0xa637, 0xa611, 0xa637, 0xa637, 0xa637, 0xa637, 0x080c,
-	0x0db4, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0db4, 0x91b6, 0x0013,
-	0x0904, 0xa6fb, 0x91b6, 0x0027, 0x1904, 0xa6b6, 0x080c, 0x886e,
-	0x6004, 0x080c, 0xbd0c, 0x01b0, 0x080c, 0xbd1d, 0x01a8, 0x908e,
-	0x0021, 0x0904, 0xa6b3, 0x908e, 0x0022, 0x1130, 0x080c, 0xa261,
-	0x0904, 0xa6af, 0x0804, 0xa6b0, 0x908e, 0x003d, 0x0904, 0xa6b3,
-	0x0804, 0xa6a9, 0x080c, 0x3003, 0x2001, 0x0007, 0x080c, 0x618f,
-	0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xa7c0, 0x9186,
-	0x007e, 0x1148, 0x2001, 0x1836, 0x2014, 0xc285, 0x080c, 0x6fb2,
-	0x1108, 0xc2ad, 0x2202, 0x0036, 0x0026, 0x2019, 0x0028, 0x2110,
-	0x080c, 0xd7e2, 0x002e, 0x003e, 0x0016, 0x0026, 0x0036, 0x2110,
-	0x2019, 0x0028, 0x080c, 0x8571, 0x0076, 0x903e, 0x080c, 0x8469,
-	0x6010, 0x00b6, 0x905d, 0x0100, 0x00be, 0x2c08, 0x080c, 0xd29b,
-	0x007e, 0x003e, 0x002e, 0x001e, 0x080c, 0xc227, 0x0016, 0x080c,
-	0xbf84, 0x080c, 0x9e32, 0x001e, 0x080c, 0x30d5, 0x080c, 0x8973,
-	0x0030, 0x080c, 0xbf84, 0x080c, 0x9e32, 0x080c, 0x8973, 0x0005,
-	0x080c, 0xa7c0, 0x0cb0, 0x080c, 0xa7fc, 0x0c98, 0x9186, 0x0014,
-	0x1db0, 0x080c, 0x886e, 0x6004, 0x908e, 0x0022, 0x1118, 0x080c,
-	0xa261, 0x0d68, 0x080c, 0x2fda, 0x080c, 0xc227, 0x080c, 0xbd0c,
-	0x1190, 0x080c, 0x3003, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be,
-	0x080c, 0xa7c0, 0x9186, 0x007e, 0x1128, 0x2001, 0x1836, 0x200c,
-	0xc185, 0x2102, 0x0870, 0x080c, 0xbd1d, 0x1118, 0x080c, 0xa7c0,
-	0x0840, 0x6004, 0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071,
-	0x1894, 0x2079, 0x0000, 0x080c, 0x3369, 0x00fe, 0x00ee, 0x0804,
-	0xa6a9, 0x6004, 0x908e, 0x0021, 0x0d48, 0x908e, 0x0022, 0x090c,
-	0xa7c0, 0x0804, 0xa6a9, 0x90b2, 0x0040, 0x1a04, 0xa7a9, 0x2008,
-	0x0002, 0xa743, 0xa744, 0xa747, 0xa74a, 0xa74d, 0xa750, 0xa741,
-	0xa741, 0xa741, 0xa741, 0xa741, 0xa741, 0xa741, 0xa741, 0xa741,
-	0xa741, 0xa741, 0xa741, 0xa741, 0xa741, 0xa741, 0xa741, 0xa741,
-	0xa741, 0xa741, 0xa741, 0xa741, 0xa741, 0xa741, 0xa741, 0xa753,
-	0xa75e, 0xa741, 0xa760, 0xa75e, 0xa741, 0xa741, 0xa741, 0xa741,
-	0xa741, 0xa75e, 0xa75e, 0xa741, 0xa741, 0xa741, 0xa741, 0xa741,
-	0xa741, 0xa741, 0xa741, 0xa790, 0xa75e, 0xa741, 0xa75a, 0xa741,
-	0xa741, 0xa741, 0xa75b, 0xa741, 0xa741, 0xa741, 0xa75e, 0xa787,
-	0xa741, 0x080c, 0x0db4, 0x00d0, 0x2001, 0x000b, 0x0410, 0x2001,
-	0x0003, 0x00f8, 0x2001, 0x0005, 0x00e0, 0x2001, 0x0001, 0x00c8,
-	0x2001, 0x0009, 0x00b0, 0x080c, 0x886e, 0x6003, 0x0005, 0x080c,
-	0x8973, 0x0070, 0x0018, 0x0010, 0x080c, 0x618f, 0x0804, 0xa7a1,
-	0x080c, 0x886e, 0x080c, 0xc22a, 0x6003, 0x0004, 0x080c, 0x8973,
-	0x0005, 0x080c, 0x618f, 0x080c, 0x886e, 0x6003, 0x0002, 0x0036,
-	0x2019, 0x185e, 0x2304, 0x9084, 0xff00, 0x1120, 0x2001, 0x1957,
-	0x201c, 0x0040, 0x8007, 0x909a, 0x0004, 0x0ec0, 0x8003, 0x801b,
-	0x831b, 0x9318, 0x631a, 0x003e, 0x080c, 0x8973, 0x0c08, 0x080c,
-	0x886e, 0x080c, 0xbf84, 0x080c, 0x9e32, 0x080c, 0x8973, 0x08c0,
-	0x00e6, 0x00f6, 0x2071, 0x1894, 0x2079, 0x0000, 0x080c, 0x3369,
-	0x00fe, 0x00ee, 0x080c, 0x886e, 0x080c, 0x9e32, 0x080c, 0x8973,
-	0x0838, 0x080c, 0x886e, 0x6003, 0x0002, 0x080c, 0xc22a, 0x0804,
-	0x8973, 0x2600, 0x2008, 0x0002, 0xa7be, 0xa7be, 0xa7be, 0xa7a1,
-	0xa7a1, 0xa7be, 0xa7be, 0xa7be, 0xa7be, 0xa7a1, 0xa7be, 0xa7a1,
-	0xa7be, 0xa7a1, 0xa7be, 0xa7be, 0xa7be, 0xa7be, 0x080c, 0x0db4,
-	0x00e6, 0x0096, 0x0026, 0x0016, 0x080c, 0xbb17, 0x0568, 0x6014,
-	0x2048, 0xa864, 0x9086, 0x0139, 0x11a8, 0xa894, 0x9086, 0x0056,
-	0x1148, 0x080c, 0x512f, 0x0130, 0x2001, 0x0000, 0x900e, 0x2011,
-	0x4000, 0x0028, 0x2001, 0x0030, 0x900e, 0x2011, 0x4005, 0x080c,
-	0xc0f1, 0x0090, 0xa868, 0xd0fc, 0x0178, 0xa807, 0x0000, 0x0016,
-	0x6004, 0x908e, 0x0021, 0x0168, 0x908e, 0x003d, 0x0150, 0x001e,
-	0xa867, 0x0103, 0xa833, 0x0100, 0x001e, 0x002e, 0x009e, 0x00ee,
-	0x0005, 0x001e, 0x0009, 0x0cc0, 0x0096, 0x6014, 0x2048, 0xa800,
-	0x2048, 0xa867, 0x0103, 0xa823, 0x8001, 0x009e, 0x0005, 0x00b6,
-	0x6610, 0x2658, 0xb804, 0x9084, 0x00ff, 0x90b2, 0x000c, 0x1a0c,
-	0x0db4, 0x6604, 0x96b6, 0x004d, 0x1120, 0x080c, 0xc010, 0x0804,
-	0xa884, 0x6604, 0x96b6, 0x0043, 0x1120, 0x080c, 0xc059, 0x0804,
-	0xa884, 0x6604, 0x96b6, 0x004b, 0x1120, 0x080c, 0xc085, 0x0804,
-	0xa884, 0x6604, 0x96b6, 0x0033, 0x1120, 0x080c, 0xbfa6, 0x0804,
-	0xa884, 0x6604, 0x96b6, 0x0028, 0x1120, 0x080c, 0xbd56, 0x0804,
-	0xa884, 0x6604, 0x96b6, 0x0029, 0x1120, 0x080c, 0xbd97, 0x0804,
-	0xa884, 0x6604, 0x96b6, 0x001f, 0x1118, 0x080c, 0xa20a, 0x04e0,
-	0x6604, 0x96b6, 0x0000, 0x1118, 0x080c, 0xa531, 0x04a8, 0x6604,
-	0x96b6, 0x0022, 0x1118, 0x080c, 0xa242, 0x0470, 0x6604, 0x96b6,
-	0x0035, 0x1118, 0x080c, 0xa352, 0x0438, 0x6604, 0x96b6, 0x0039,
-	0x1118, 0x080c, 0xa4c6, 0x0400, 0x6604, 0x96b6, 0x003d, 0x1118,
-	0x080c, 0xa27a, 0x00c8, 0x6604, 0x96b6, 0x0044, 0x1118, 0x080c,
-	0xa2b6, 0x0090, 0x6604, 0x96b6, 0x0049, 0x1118, 0x080c, 0xa2e1,
-	0x0058, 0x91b6, 0x0015, 0x1110, 0x0063, 0x0030, 0x91b6, 0x0016,
-	0x1128, 0x00be, 0x0804, 0xab42, 0x00be, 0x0005, 0x080c, 0x9ec7,
-	0x0cd8, 0xa8a1, 0xa8a4, 0xa8a1, 0xa8e8, 0xa8a1, 0xaa76, 0xab4f,
-	0xa8a1, 0xa8a1, 0xab1c, 0xa8a1, 0xab30, 0x0096, 0x080c, 0x150f,
-	0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0x009e, 0x0804,
-	0x9e32, 0xa001, 0xa001, 0x0005, 0x00e6, 0x2071, 0x1800, 0x708c,
-	0x9086, 0x0074, 0x1540, 0x080c, 0xd26c, 0x11b0, 0x6010, 0x00b6,
-	0x2058, 0x7030, 0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110, 0xc0c5,
-	0xb802, 0x00e9, 0x00be, 0x2001, 0x0006, 0x080c, 0x618f, 0x080c,
-	0x3003, 0x080c, 0x9e32, 0x0088, 0x2001, 0x000a, 0x080c, 0x618f,
-	0x080c, 0x3003, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x8439,
-	0x080c, 0x8973, 0x0010, 0x080c, 0xaa61, 0x00ee, 0x0005, 0x00d6,
-	0xb800, 0xd084, 0x0158, 0x9006, 0x080c, 0x617b, 0x2069, 0x1853,
-	0x6804, 0x0020, 0x2001, 0x0006, 0x080c, 0x61bb, 0x00de, 0x0005,
-	0x00b6, 0x0096, 0x00d6, 0x2011, 0x1823, 0x2204, 0x9086, 0x0074,
-	0x1904, 0xaa3a, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e, 0x1120,
-	0x080c, 0xac93, 0x0804, 0xa99f, 0x00d6, 0x080c, 0x6fb2, 0x0198,
-	0x0026, 0x2011, 0x0010, 0x080c, 0x6586, 0x002e, 0x05c8, 0x080c,
-	0x539a, 0x1540, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
-	0xa833, 0xdead, 0x00f8, 0x0026, 0x2011, 0x8008, 0x080c, 0x6586,
+	0x0136, 0x9080, 0x001b, 0x20a0, 0x2011, 0x0006, 0x20a9, 0x0001,
+	0x3418, 0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211,
+	0x1db8, 0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398,
+	0x4003, 0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c,
+	0xbb2c, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0x009e, 0x0804, 0x9e42, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386,
+	0x0200, 0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8bf, 0x0000, 0x00be,
+	0x6014, 0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xab32, 0x080c, 0x9e42, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011,
+	0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xc22c, 0x0188, 0x6014,
+	0x9005, 0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x6043, 0x0000,
+	0x2009, 0x0022, 0x080c, 0xa622, 0x9006, 0x001e, 0x000e, 0x0005,
+	0x9085, 0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80,
+	0x000c, 0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003,
+	0x0001, 0x2099, 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a,
+	0xa804, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0,
+	0x4003, 0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9,
+	0x0020, 0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048,
+	0xa867, 0x0103, 0x080c, 0x9e42, 0x001e, 0x009e, 0x0005, 0x0096,
+	0x0016, 0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084,
+	0x00ff, 0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004,
+	0x9108, 0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048,
+	0x080c, 0xb725, 0x080c, 0xbb2c, 0x0140, 0x6014, 0x2048, 0xa807,
+	0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0x9e42, 0x001e,
+	0x009e, 0x0005, 0x0016, 0x0096, 0x7030, 0x9086, 0x0100, 0x1118,
+	0x2009, 0x0004, 0x0010, 0x7034, 0x800c, 0x810b, 0x2011, 0x000c,
+	0x2019, 0x000c, 0x6014, 0x2048, 0xa804, 0x0096, 0x9005, 0x0108,
+	0x2048, 0x080c, 0xb725, 0x009e, 0x080c, 0xbb2c, 0x0148, 0xa804,
+	0x9005, 0x1158, 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103,
+	0x080c, 0x9e42, 0x009e, 0x001e, 0x0005, 0x0086, 0x2040, 0xa030,
+	0x8007, 0x9086, 0x0100, 0x1118, 0x080c, 0xa7d1, 0x00e0, 0xa034,
+	0x8007, 0x800c, 0x8806, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x000c, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897,
+	0x4000, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041,
+	0x122f, 0x0019, 0x0d08, 0x008e, 0x0898, 0x0096, 0x0006, 0x080c,
+	0x0feb, 0x000e, 0x01b0, 0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2,
+	0x0006, 0xae6a, 0x2800, 0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92,
+	0xac96, 0xad9a, 0x0086, 0x2940, 0x080c, 0x10d5, 0x008e, 0x9085,
+	0x0001, 0x009e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084,
+	0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1520,
+	0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x11e0,
+	0x6043, 0x0000, 0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xc1a4,
+	0x001e, 0x1158, 0x622c, 0x2268, 0x2071, 0x026c, 0x6b20, 0x9386,
+	0x0003, 0x0130, 0x9386, 0x0006, 0x0128, 0x080c, 0x9e42, 0x0020,
+	0x0039, 0x0010, 0x080c, 0xa457, 0x002e, 0x00de, 0x00ee, 0x0005,
+	0x0096, 0x6814, 0x2048, 0x9186, 0x0015, 0x0904, 0xa43f, 0x918e,
+	0x0016, 0x1904, 0xa455, 0x700c, 0x908c, 0xff00, 0x9186, 0x1700,
+	0x0120, 0x9186, 0x0300, 0x1904, 0xa419, 0x89ff, 0x1138, 0x6800,
+	0x9086, 0x000f, 0x0904, 0xa3fc, 0x0804, 0xa453, 0x6808, 0x9086,
+	0xffff, 0x1904, 0xa441, 0xa87c, 0x9084, 0x0060, 0x9086, 0x0020,
+	0x1128, 0xa83c, 0xa940, 0x9105, 0x1904, 0xa441, 0x6824, 0xd0b4,
+	0x1904, 0xa441, 0x080c, 0xbd15, 0x685c, 0xa882, 0xa87c, 0xc0dc,
+	0xc0f4, 0xc0d4, 0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001, 0x000a,
+	0x080c, 0x8259, 0xa884, 0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff,
+	0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c, 0xb84f, 0x00ce, 0x0804,
+	0xa453, 0x00c6, 0xa868, 0xd0fc, 0x1118, 0x080c, 0x5d56, 0x0010,
+	0x080c, 0x60fd, 0x00ce, 0x1904, 0xa441, 0x00c6, 0x2d60, 0x080c,
+	0x9e42, 0x00ce, 0x0804, 0xa453, 0x00c6, 0x080c, 0x9e8f, 0x0198,
+	0x6017, 0x0000, 0x6810, 0x6012, 0x080c, 0xbfa6, 0x6023, 0x0003,
+	0x6904, 0x00c6, 0x2d60, 0x080c, 0x9e42, 0x00ce, 0x080c, 0x9ebc,
+	0x00ce, 0x0804, 0xa453, 0x2001, 0x1958, 0x2004, 0x6842, 0x00ce,
+	0x04d0, 0x7008, 0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058,
+	0xb900, 0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003,
+	0x080c, 0xc1e6, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002,
+	0x080c, 0x83da, 0x080c, 0x896d, 0x00ce, 0x00e8, 0x700c, 0x9086,
+	0x2a00, 0x1138, 0x2001, 0x1958, 0x2004, 0x6842, 0x00a0, 0x0479,
+	0x00a0, 0x89ff, 0x090c, 0x0db4, 0x00c6, 0x00d6, 0x2d60, 0xa867,
+	0x0103, 0xa87b, 0x0003, 0x080c, 0x66ac, 0x080c, 0xbd15, 0x080c,
+	0x9e72, 0x00de, 0x00ce, 0x080c, 0x9e42, 0x009e, 0x0005, 0x9186,
+	0x0015, 0x1128, 0x2001, 0x1958, 0x2004, 0x6842, 0x0068, 0x918e,
+	0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c, 0xd7a8, 0x080c,
+	0x81ed, 0x080c, 0x9e42, 0x00ce, 0x080c, 0x9e42, 0x0005, 0x0026,
+	0x0036, 0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001,
+	0x1958, 0x2004, 0x6842, 0x0804, 0xa4d1, 0x00c6, 0x2d60, 0x080c,
+	0xb750, 0x00ce, 0x6804, 0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00,
+	0x2060, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c, 0x83da, 0x080c,
+	0x896d, 0x00ce, 0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff,
+	0x090c, 0x0db4, 0x6800, 0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac,
+	0x0178, 0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882,
+	0x2001, 0x0001, 0x6832, 0x0400, 0x2001, 0x0007, 0x6832, 0x00e0,
+	0xa87c, 0xd0b4, 0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48,
+	0xa838, 0xa934, 0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024,
+	0x9306, 0x1118, 0x7020, 0x9406, 0x0d38, 0x7020, 0x683e, 0x7024,
+	0x683a, 0x2001, 0x0005, 0x6832, 0x080c, 0xbe9d, 0x080c, 0x896d,
+	0x0010, 0x080c, 0x9e42, 0x004e, 0x003e, 0x002e, 0x0005, 0x00e6,
+	0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258,
+	0xba10, 0x00be, 0x9206, 0x1904, 0xa53c, 0x700c, 0x6210, 0x00b6,
+	0x2258, 0xba14, 0x00be, 0x9206, 0x1904, 0xa53c, 0x6038, 0x2068,
+	0x6824, 0xc0dc, 0x6826, 0x6a20, 0x9286, 0x0007, 0x0904, 0xa53c,
+	0x9286, 0x0002, 0x0904, 0xa53c, 0x9286, 0x0000, 0x05e8, 0x6808,
+	0x633c, 0x9306, 0x15c8, 0x2071, 0x026c, 0x9186, 0x0015, 0x0570,
+	0x918e, 0x0016, 0x1100, 0x00c6, 0x6038, 0x2060, 0x6104, 0x9186,
+	0x004b, 0x01c0, 0x9186, 0x004c, 0x01a8, 0x9186, 0x004d, 0x0190,
+	0x9186, 0x004e, 0x0178, 0x9186, 0x0052, 0x0160, 0x6014, 0x0096,
+	0x2048, 0x080c, 0xbb2c, 0x090c, 0x0db4, 0xa87b, 0x0003, 0x009e,
+	0x080c, 0xc1e6, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002,
+	0x080c, 0x83da, 0x080c, 0x896d, 0x00ce, 0x0030, 0x6038, 0x2070,
+	0x2001, 0x1958, 0x2004, 0x7042, 0x080c, 0x9e42, 0x002e, 0x00de,
+	0x00ee, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048, 0x6010,
+	0x2058, 0x91b6, 0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c,
+	0xbc02, 0x0460, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90,
+	0x0010, 0x2019, 0x000a, 0x20a9, 0x0004, 0x080c, 0xae20, 0x002e,
+	0x003e, 0x015e, 0x009e, 0x1904, 0xa5ab, 0x0096, 0x0156, 0x0036,
+	0x0026, 0x2b48, 0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9, 0x0004,
+	0x080c, 0xae20, 0x002e, 0x003e, 0x015e, 0x009e, 0x15a0, 0x7238,
+	0xba0a, 0x733c, 0xbb0e, 0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005,
+	0x1128, 0x00fe, 0x009e, 0x00be, 0x0804, 0xa246, 0x0096, 0x2048,
+	0xaa12, 0xab16, 0xac0a, 0x009e, 0x8006, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0,
+	0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x122f, 0x080c,
+	0xa345, 0x0130, 0x00fe, 0x009e, 0x080c, 0x9e42, 0x00be, 0x0005,
+	0x080c, 0xa7d1, 0x0cb8, 0x2b78, 0x00f6, 0x080c, 0x2fdc, 0x080c,
+	0xc241, 0x00fe, 0x00c6, 0x080c, 0x9dec, 0x2f00, 0x6012, 0x6017,
+	0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001,
+	0x0007, 0x080c, 0x6198, 0x080c, 0x61c4, 0x080c, 0x8422, 0x080c,
+	0x896d, 0x00ce, 0x0804, 0xa57e, 0x2100, 0x91b2, 0x0053, 0x1a0c,
+	0x0db4, 0x91b2, 0x0040, 0x1a04, 0xa634, 0x0002, 0xa622, 0xa622,
+	0xa618, 0xa622, 0xa622, 0xa622, 0xa616, 0xa616, 0xa616, 0xa616,
+	0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616,
+	0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616,
+	0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa622, 0xa616, 0xa622,
+	0xa622, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa618, 0xa616,
+	0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616,
+	0xa622, 0xa622, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616, 0xa616,
+	0xa616, 0xa616, 0xa616, 0xa622, 0xa616, 0xa616, 0x080c, 0x0db4,
+	0x0066, 0x00b6, 0x6610, 0x2658, 0xb8bc, 0xc08c, 0xb8be, 0x00be,
+	0x006e, 0x0000, 0x6003, 0x0001, 0x6106, 0x9186, 0x0032, 0x0118,
+	0x080c, 0x8422, 0x0010, 0x080c, 0x83da, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x896d, 0x012e, 0x0005, 0x2600, 0x0002, 0xa648, 0xa648,
+	0xa648, 0xa622, 0xa622, 0xa648, 0xa648, 0xa648, 0xa648, 0xa622,
+	0xa648, 0xa622, 0xa648, 0xa622, 0xa648, 0xa648, 0xa648, 0xa648,
+	0x080c, 0x0db4, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0db4, 0x91b6,
+	0x0013, 0x0904, 0xa70c, 0x91b6, 0x0027, 0x1904, 0xa6c7, 0x080c,
+	0x8861, 0x6004, 0x080c, 0xbd21, 0x01b0, 0x080c, 0xbd32, 0x01a8,
+	0x908e, 0x0021, 0x0904, 0xa6c4, 0x908e, 0x0022, 0x1130, 0x080c,
+	0xa272, 0x0904, 0xa6c0, 0x0804, 0xa6c1, 0x908e, 0x003d, 0x0904,
+	0xa6c4, 0x0804, 0xa6ba, 0x080c, 0x3005, 0x2001, 0x0007, 0x080c,
+	0x6198, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xa7d1,
+	0x9186, 0x007e, 0x1148, 0x2001, 0x1836, 0x2014, 0xc285, 0x080c,
+	0x6f9b, 0x1108, 0xc2ad, 0x2202, 0x0036, 0x0026, 0x2019, 0x0028,
+	0x2110, 0x080c, 0xd803, 0x002e, 0x003e, 0x0016, 0x0026, 0x0036,
+	0x2110, 0x2019, 0x0028, 0x080c, 0x8564, 0x0076, 0x903e, 0x080c,
+	0x8452, 0x6010, 0x00b6, 0x905d, 0x0100, 0x00be, 0x2c08, 0x080c,
+	0xd2bc, 0x007e, 0x003e, 0x002e, 0x001e, 0x080c, 0xc241, 0x0016,
+	0x080c, 0xbf9e, 0x080c, 0x9e42, 0x001e, 0x080c, 0x30d7, 0x080c,
+	0x896d, 0x0030, 0x080c, 0xbf9e, 0x080c, 0x9e42, 0x080c, 0x896d,
+	0x0005, 0x080c, 0xa7d1, 0x0cb0, 0x080c, 0xa80d, 0x0c98, 0x9186,
+	0x0014, 0x1db0, 0x080c, 0x8861, 0x6004, 0x908e, 0x0022, 0x1118,
+	0x080c, 0xa272, 0x0d68, 0x080c, 0x2fdc, 0x080c, 0xc241, 0x080c,
+	0xbd21, 0x1190, 0x080c, 0x3005, 0x6010, 0x00b6, 0x2058, 0xb9a0,
+	0x00be, 0x080c, 0xa7d1, 0x9186, 0x007e, 0x1128, 0x2001, 0x1836,
+	0x200c, 0xc185, 0x2102, 0x0870, 0x080c, 0xbd32, 0x1118, 0x080c,
+	0xa7d1, 0x0840, 0x6004, 0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6,
+	0x2071, 0x1894, 0x2079, 0x0000, 0x080c, 0x336b, 0x00fe, 0x00ee,
+	0x0804, 0xa6ba, 0x6004, 0x908e, 0x0021, 0x0d48, 0x908e, 0x0022,
+	0x090c, 0xa7d1, 0x0804, 0xa6ba, 0x90b2, 0x0040, 0x1a04, 0xa7ba,
+	0x2008, 0x0002, 0xa754, 0xa755, 0xa758, 0xa75b, 0xa75e, 0xa761,
+	0xa752, 0xa752, 0xa752, 0xa752, 0xa752, 0xa752, 0xa752, 0xa752,
+	0xa752, 0xa752, 0xa752, 0xa752, 0xa752, 0xa752, 0xa752, 0xa752,
+	0xa752, 0xa752, 0xa752, 0xa752, 0xa752, 0xa752, 0xa752, 0xa752,
+	0xa764, 0xa76f, 0xa752, 0xa771, 0xa76f, 0xa752, 0xa752, 0xa752,
+	0xa752, 0xa752, 0xa76f, 0xa76f, 0xa752, 0xa752, 0xa752, 0xa752,
+	0xa752, 0xa752, 0xa752, 0xa752, 0xa7a1, 0xa76f, 0xa752, 0xa76b,
+	0xa752, 0xa752, 0xa752, 0xa76c, 0xa752, 0xa752, 0xa752, 0xa76f,
+	0xa798, 0xa752, 0x080c, 0x0db4, 0x00d0, 0x2001, 0x000b, 0x0410,
+	0x2001, 0x0003, 0x00f8, 0x2001, 0x0005, 0x00e0, 0x2001, 0x0001,
+	0x00c8, 0x2001, 0x0009, 0x00b0, 0x080c, 0x8861, 0x6003, 0x0005,
+	0x080c, 0x896d, 0x0070, 0x0018, 0x0010, 0x080c, 0x6198, 0x0804,
+	0xa7b2, 0x080c, 0x8861, 0x080c, 0xc244, 0x6003, 0x0004, 0x080c,
+	0x896d, 0x0005, 0x080c, 0x6198, 0x080c, 0x8861, 0x6003, 0x0002,
+	0x0036, 0x2019, 0x185e, 0x2304, 0x9084, 0xff00, 0x1120, 0x2001,
+	0x1956, 0x201c, 0x0040, 0x8007, 0x909a, 0x0004, 0x0ec0, 0x8003,
+	0x801b, 0x831b, 0x9318, 0x631a, 0x003e, 0x080c, 0x896d, 0x0c08,
+	0x080c, 0x8861, 0x080c, 0xbf9e, 0x080c, 0x9e42, 0x080c, 0x896d,
+	0x08c0, 0x00e6, 0x00f6, 0x2071, 0x1894, 0x2079, 0x0000, 0x080c,
+	0x336b, 0x00fe, 0x00ee, 0x080c, 0x8861, 0x080c, 0x9e42, 0x080c,
+	0x896d, 0x0838, 0x080c, 0x8861, 0x6003, 0x0002, 0x080c, 0xc244,
+	0x0804, 0x896d, 0x2600, 0x2008, 0x0002, 0xa7cf, 0xa7cf, 0xa7cf,
+	0xa7b2, 0xa7b2, 0xa7cf, 0xa7cf, 0xa7cf, 0xa7cf, 0xa7b2, 0xa7cf,
+	0xa7b2, 0xa7cf, 0xa7b2, 0xa7cf, 0xa7cf, 0xa7cf, 0xa7cf, 0x080c,
+	0x0db4, 0x00e6, 0x0096, 0x0026, 0x0016, 0x080c, 0xbb2c, 0x0568,
+	0x6014, 0x2048, 0xa864, 0x9086, 0x0139, 0x11a8, 0xa894, 0x9086,
+	0x0056, 0x1148, 0x080c, 0x5138, 0x0130, 0x2001, 0x0000, 0x900e,
+	0x2011, 0x4000, 0x0028, 0x2001, 0x0030, 0x900e, 0x2011, 0x4005,
+	0x080c, 0xc10b, 0x0090, 0xa868, 0xd0fc, 0x0178, 0xa807, 0x0000,
+	0x0016, 0x6004, 0x908e, 0x0021, 0x0168, 0x908e, 0x003d, 0x0150,
+	0x001e, 0xa867, 0x0103, 0xa833, 0x0100, 0x001e, 0x002e, 0x009e,
+	0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0, 0x0096, 0x6014, 0x2048,
+	0xa800, 0x2048, 0xa867, 0x0103, 0xa823, 0x8001, 0x009e, 0x0005,
+	0x00b6, 0x6610, 0x2658, 0xb804, 0x9084, 0x00ff, 0x90b2, 0x000c,
+	0x1a0c, 0x0db4, 0x6604, 0x96b6, 0x004d, 0x1120, 0x080c, 0xc02a,
+	0x0804, 0xa895, 0x6604, 0x96b6, 0x0043, 0x1120, 0x080c, 0xc073,
+	0x0804, 0xa895, 0x6604, 0x96b6, 0x004b, 0x1120, 0x080c, 0xc09f,
+	0x0804, 0xa895, 0x6604, 0x96b6, 0x0033, 0x1120, 0x080c, 0xbfc0,
+	0x0804, 0xa895, 0x6604, 0x96b6, 0x0028, 0x1120, 0x080c, 0xbd70,
+	0x0804, 0xa895, 0x6604, 0x96b6, 0x0029, 0x1120, 0x080c, 0xbdb1,
+	0x0804, 0xa895, 0x6604, 0x96b6, 0x001f, 0x1118, 0x080c, 0xa21a,
+	0x04e0, 0x6604, 0x96b6, 0x0000, 0x1118, 0x080c, 0xa542, 0x04a8,
+	0x6604, 0x96b6, 0x0022, 0x1118, 0x080c, 0xa253, 0x0470, 0x6604,
+	0x96b6, 0x0035, 0x1118, 0x080c, 0xa363, 0x0438, 0x6604, 0x96b6,
+	0x0039, 0x1118, 0x080c, 0xa4d7, 0x0400, 0x6604, 0x96b6, 0x003d,
+	0x1118, 0x080c, 0xa28b, 0x00c8, 0x6604, 0x96b6, 0x0044, 0x1118,
+	0x080c, 0xa2c7, 0x0090, 0x6604, 0x96b6, 0x0049, 0x1118, 0x080c,
+	0xa2f2, 0x0058, 0x91b6, 0x0015, 0x1110, 0x0063, 0x0030, 0x91b6,
+	0x0016, 0x1128, 0x00be, 0x0804, 0xab55, 0x00be, 0x0005, 0x080c,
+	0x9ed7, 0x0cd8, 0xa8b2, 0xa8b5, 0xa8b2, 0xa8f9, 0xa8b2, 0xaa89,
+	0xab62, 0xa8b2, 0xa8b2, 0xab2f, 0xa8b2, 0xab43, 0x0096, 0x080c,
+	0x1511, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0x009e,
+	0x0804, 0x9e42, 0xa001, 0xa001, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x708c, 0x9086, 0x0074, 0x1540, 0x080c, 0xd28d, 0x11b0, 0x6010,
+	0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110,
+	0xc0c5, 0xb802, 0x00e9, 0x00be, 0x2001, 0x0006, 0x080c, 0x6198,
+	0x080c, 0x3005, 0x080c, 0x9e42, 0x0088, 0x2001, 0x000a, 0x080c,
+	0x6198, 0x080c, 0x3005, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
+	0x8422, 0x080c, 0x896d, 0x0010, 0x080c, 0xaa74, 0x00ee, 0x0005,
+	0x00d6, 0xb800, 0xd084, 0x0158, 0x9006, 0x080c, 0x6184, 0x2069,
+	0x1853, 0x6804, 0x0020, 0x2001, 0x0006, 0x080c, 0x61c4, 0x00de,
+	0x0005, 0x00b6, 0x0096, 0x00d6, 0x2011, 0x1823, 0x2204, 0x9086,
+	0x0074, 0x1904, 0xaa4b, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e,
+	0x1120, 0x080c, 0xaca6, 0x0804, 0xa9b0, 0x00d6, 0x080c, 0x6f9b,
+	0x0198, 0x0026, 0x2011, 0x0010, 0x080c, 0x658f, 0x002e, 0x05c8,
+	0x080c, 0x53a3, 0x1540, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867,
+	0x0103, 0xa833, 0xdead, 0x00f8, 0x0026, 0x2011, 0x8008, 0x080c,
+	0x658f, 0x002e, 0x0530, 0x6014, 0x2048, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0039, 0x1140, 0x2001, 0x0030, 0x900e, 0x2011, 0x4009,
+	0x080c, 0xc10b, 0x0040, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867,
+	0x0103, 0xa833, 0xdead, 0x6010, 0x2058, 0xb9a0, 0x0016, 0x080c,
+	0x3005, 0x080c, 0x9e42, 0x001e, 0x080c, 0x30d7, 0x00de, 0x0804,
+	0xaa4e, 0x00de, 0x080c, 0xac9b, 0x6010, 0x2058, 0xbaa0, 0x9286,
+	0x0080, 0x1510, 0x6014, 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084,
+	0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011,
+	0x4000, 0x080c, 0xc10b, 0x0030, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0x0200, 0x2001, 0x0006, 0x080c, 0x6198, 0x080c, 0x3005,
+	0x080c, 0x9e42, 0x0804, 0xaa4e, 0x080c, 0xaa5c, 0x6014, 0x9005,
+	0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0039, 0x1d08, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000,
+	0x080c, 0xc10b, 0x08f8, 0x080c, 0xaa52, 0x0160, 0x9006, 0x080c,
+	0x6184, 0x2001, 0x0004, 0x080c, 0x61c4, 0x2001, 0x0007, 0x080c,
+	0x6198, 0x08a0, 0x2001, 0x0004, 0x080c, 0x6198, 0x6003, 0x0001,
+	0x6007, 0x0003, 0x080c, 0x8422, 0x080c, 0x896d, 0x0804, 0xaa4e,
+	0xb85c, 0xd0e4, 0x01d0, 0x080c, 0xbf40, 0x080c, 0x6f9b, 0x0118,
+	0xd0dc, 0x1904, 0xa972, 0x2011, 0x1836, 0x2204, 0xc0ad, 0x2012,
+	0x2001, 0x0002, 0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000, 0x080c,
+	0x26d9, 0x78e2, 0x00fe, 0x0804, 0xa972, 0x080c, 0xbf7d, 0x2011,
+	0x1836, 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xd3e6, 0x000e,
+	0x1904, 0xa972, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c, 0x6198,
+	0x9006, 0x080c, 0x6184, 0x00c6, 0x2001, 0x180f, 0x2004, 0xd09c,
+	0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, 0x1800, 0x700c,
+	0x9084, 0x00ff, 0x78e6, 0x707a, 0x7010, 0x78ea, 0x707e, 0x908c,
+	0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x26ae,
+	0x00f6, 0x2100, 0x900e, 0x080c, 0x2665, 0x795a, 0x00fe, 0x9186,
+	0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8, 0x2009, 0x00ef, 0x00f6,
+	0x2079, 0x0100, 0x79ea, 0x7932, 0x7936, 0x780c, 0xc0b5, 0x780e,
+	0x00fe, 0x080c, 0x26ae, 0x00f6, 0x2079, 0x1800, 0x797e, 0x2100,
+	0x900e, 0x080c, 0x2665, 0x795a, 0x00fe, 0x8108, 0x080c, 0x61e7,
+	0x2b00, 0x00ce, 0x1904, 0xa972, 0x6012, 0x2009, 0x180f, 0x210c,
+	0xd19c, 0x0150, 0x2009, 0x027c, 0x210c, 0x918c, 0x00ff, 0xb912,
+	0x2009, 0x027d, 0x210c, 0xb916, 0x2001, 0x0002, 0x080c, 0x6198,
+	0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8422,
+	0x080c, 0x896d, 0x0018, 0x080c, 0xa7d1, 0x0431, 0x00de, 0x009e,
+	0x00be, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0a4, 0x0120, 0x2001,
+	0x1854, 0x2004, 0xd0ac, 0x0005, 0x00e6, 0x080c, 0xd85c, 0x0190,
+	0x2071, 0x0260, 0x7108, 0x720c, 0x918c, 0x00ff, 0x1118, 0x9284,
+	0xff00, 0x0140, 0x6010, 0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110,
+	0xb912, 0xba16, 0x00ee, 0x0005, 0x2030, 0x2001, 0x0007, 0x080c,
+	0x6198, 0x080c, 0x53a3, 0x1120, 0x2001, 0x0007, 0x080c, 0x61c4,
+	0x080c, 0x3005, 0x6020, 0x9086, 0x000a, 0x1108, 0x0005, 0x0804,
+	0x9e42, 0x00b6, 0x00e6, 0x0026, 0x0016, 0x2071, 0x1800, 0x708c,
+	0x9086, 0x0014, 0x1904, 0xab26, 0x00d6, 0x080c, 0x6f9b, 0x0198,
+	0x0026, 0x2011, 0x0010, 0x080c, 0x658f, 0x002e, 0x05c8, 0x080c,
+	0x53a3, 0x1540, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0xdead, 0x00f8, 0x0026, 0x2011, 0x8008, 0x080c, 0x658f,
 	0x002e, 0x0530, 0x6014, 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086,
 	0x0039, 0x1140, 0x2001, 0x0030, 0x900e, 0x2011, 0x4009, 0x080c,
-	0xc0f1, 0x0040, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
-	0xa833, 0xdead, 0x6010, 0x2058, 0xb9a0, 0x0016, 0x080c, 0x3003,
-	0x080c, 0x9e32, 0x001e, 0x080c, 0x30d5, 0x00de, 0x0804, 0xaa3b,
-	0x00de, 0x080c, 0xac88, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x0080,
-	0x1510, 0x6014, 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000,
-	0x080c, 0xc0f1, 0x0030, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833,
-	0x0200, 0x2001, 0x0006, 0x080c, 0x618f, 0x080c, 0x3003, 0x080c,
-	0x9e32, 0x0804, 0xaa3b, 0x080c, 0xaa49, 0x6014, 0x9005, 0x0190,
-	0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0039, 0x1d08, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c,
-	0xc0f1, 0x08f8, 0x080c, 0xaa3f, 0x0160, 0x9006, 0x080c, 0x617b,
-	0x2001, 0x0004, 0x080c, 0x61bb, 0x2001, 0x0007, 0x080c, 0x618f,
-	0x08a0, 0x2001, 0x0004, 0x080c, 0x618f, 0x6003, 0x0001, 0x6007,
-	0x0003, 0x080c, 0x8439, 0x080c, 0x8973, 0x0804, 0xaa3b, 0xb85c,
-	0xd0e4, 0x01d0, 0x080c, 0xbf26, 0x080c, 0x6fb2, 0x0118, 0xd0dc,
-	0x1904, 0xa961, 0x2011, 0x1836, 0x2204, 0xc0ad, 0x2012, 0x2001,
-	0x0002, 0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000, 0x080c, 0x26d7,
-	0x78e2, 0x00fe, 0x0804, 0xa961, 0x080c, 0xbf63, 0x2011, 0x1836,
-	0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xd3c5, 0x000e, 0x1904,
-	0xa961, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c, 0x618f, 0x9006,
-	0x080c, 0x617b, 0x00c6, 0x2001, 0x180f, 0x2004, 0xd09c, 0x0520,
-	0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, 0x1800, 0x700c, 0x9084,
-	0x00ff, 0x78e6, 0x707a, 0x7010, 0x78ea, 0x707e, 0x908c, 0x00ff,
-	0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x26ac, 0x00f6,
-	0x2100, 0x900e, 0x080c, 0x2663, 0x795a, 0x00fe, 0x9186, 0x0081,
-	0x01d8, 0x2009, 0x0081, 0x00c8, 0x2009, 0x00ef, 0x00f6, 0x2079,
-	0x0100, 0x79ea, 0x7932, 0x7936, 0x780c, 0xc0b5, 0x780e, 0x00fe,
-	0x080c, 0x26ac, 0x00f6, 0x2079, 0x1800, 0x797e, 0x2100, 0x900e,
-	0x080c, 0x2663, 0x795a, 0x00fe, 0x8108, 0x080c, 0x61de, 0x2b00,
-	0x00ce, 0x1904, 0xa961, 0x6012, 0x2009, 0x180f, 0x210c, 0xd19c,
-	0x0150, 0x2009, 0x027c, 0x210c, 0x918c, 0x00ff, 0xb912, 0x2009,
-	0x027d, 0x210c, 0xb916, 0x2001, 0x0002, 0x080c, 0x618f, 0x6023,
-	0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8439, 0x080c,
-	0x8973, 0x0008, 0x0431, 0x00de, 0x009e, 0x00be, 0x0005, 0x2001,
-	0x1810, 0x2004, 0xd0a4, 0x0120, 0x2001, 0x1854, 0x2004, 0xd0ac,
-	0x0005, 0x00e6, 0x080c, 0xd83b, 0x0190, 0x2071, 0x0260, 0x7108,
-	0x720c, 0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, 0x6010,
-	0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, 0xba16, 0x00ee,
-	0x0005, 0x2030, 0x2001, 0x0007, 0x080c, 0x618f, 0x080c, 0x539a,
-	0x1120, 0x2001, 0x0007, 0x080c, 0x61bb, 0x080c, 0x3003, 0x6020,
-	0x9086, 0x000a, 0x1108, 0x0005, 0x0804, 0x9e32, 0x00b6, 0x00e6,
-	0x0026, 0x0016, 0x2071, 0x1800, 0x708c, 0x9086, 0x0014, 0x1904,
-	0xab13, 0x00d6, 0x080c, 0x6fb2, 0x0198, 0x0026, 0x2011, 0x0010,
-	0x080c, 0x6586, 0x002e, 0x05c8, 0x080c, 0x539a, 0x1540, 0x6014,
-	0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x00f8,
-	0x0026, 0x2011, 0x8008, 0x080c, 0x6586, 0x002e, 0x0530, 0x6014,
-	0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001,
-	0x0030, 0x900e, 0x2011, 0x4009, 0x080c, 0xc0f1, 0x0040, 0x6014,
-	0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x6010,
-	0x2058, 0xb9a0, 0x0016, 0x080c, 0x3003, 0x080c, 0x9e32, 0x001e,
-	0x080c, 0x30d5, 0x00de, 0x0804, 0xab17, 0x00de, 0x080c, 0x539a,
-	0x1170, 0x6014, 0x9005, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058,
-	0xbba0, 0x2021, 0x0006, 0x080c, 0x4a76, 0x004e, 0x003e, 0x00d6,
-	0x6010, 0x2058, 0x080c, 0x62d9, 0x080c, 0xa8d7, 0x00de, 0x080c,
-	0xad59, 0x1588, 0x6010, 0x2058, 0xb890, 0x9005, 0x0560, 0x2001,
-	0x0006, 0x080c, 0x618f, 0x0096, 0x6014, 0x904d, 0x01d0, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e,
-	0x2011, 0x4000, 0x080c, 0xc0f1, 0x0060, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x0029, 0x0130, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833,
-	0x0200, 0x009e, 0x080c, 0x3003, 0x6020, 0x9086, 0x000a, 0x0138,
-	0x080c, 0x9e32, 0x0020, 0x080c, 0xa7c0, 0x080c, 0xaa61, 0x001e,
-	0x002e, 0x00ee, 0x00be, 0x0005, 0x2011, 0x1823, 0x2204, 0x9086,
-	0x0014, 0x1160, 0x2001, 0x0002, 0x080c, 0x618f, 0x6003, 0x0001,
-	0x6007, 0x0001, 0x080c, 0x8439, 0x0804, 0x8973, 0x0804, 0xaa61,
-	0x2030, 0x2011, 0x1823, 0x2204, 0x9086, 0x0004, 0x1148, 0x96b6,
-	0x000b, 0x1120, 0x2001, 0x0007, 0x080c, 0x618f, 0x0804, 0x9e32,
-	0x0804, 0xaa61, 0x0002, 0xa8a1, 0xab5a, 0xa8a1, 0xab99, 0xa8a1,
-	0xac44, 0xab4f, 0xa8a1, 0xa8a1, 0xac57, 0xa8a1, 0xac67, 0x6604,
-	0x9686, 0x0003, 0x0904, 0xaa76, 0x96b6, 0x001e, 0x1110, 0x080c,
-	0x9e32, 0x0005, 0x00b6, 0x00d6, 0x00c6, 0x080c, 0xac77, 0x11a0,
-	0x9006, 0x080c, 0x617b, 0x080c, 0x2fda, 0x080c, 0xc227, 0x2001,
-	0x0002, 0x080c, 0x618f, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c,
-	0x8439, 0x080c, 0x8973, 0x0408, 0x2009, 0x026e, 0x2104, 0x9086,
-	0x0009, 0x1160, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005,
-	0x0170, 0x8001, 0xb842, 0x601b, 0x000a, 0x0078, 0x2009, 0x026f,
-	0x2104, 0x9084, 0xff00, 0x9086, 0x1900, 0x1108, 0x08a0, 0x080c,
-	0x2fda, 0x080c, 0xc227, 0x080c, 0xaa61, 0x00ce, 0x00de, 0x00be,
-	0x0005, 0x0096, 0x00b6, 0x0026, 0x9016, 0x080c, 0xac85, 0x00d6,
-	0x2069, 0x194d, 0x2d04, 0x9005, 0x0168, 0x6010, 0x2058, 0xb8a0,
-	0x9086, 0x007e, 0x1138, 0x2069, 0x181f, 0x2d04, 0x8000, 0x206a,
-	0x00de, 0x0010, 0x00de, 0x0088, 0x9006, 0x080c, 0x617b, 0x2001,
-	0x0002, 0x080c, 0x618f, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c,
-	0x8439, 0x080c, 0x8973, 0x0804, 0xac14, 0x080c, 0xbb17, 0x01b0,
-	0x6014, 0x2048, 0xa864, 0x2010, 0x9086, 0x0139, 0x1138, 0x6007,
-	0x0016, 0x2001, 0x0002, 0x080c, 0xc14b, 0x00b0, 0x6014, 0x2048,
-	0xa864, 0xd0fc, 0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001, 0x180e,
-	0x2004, 0xd0dc, 0x0148, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff,
-	0x9005, 0x1110, 0x9006, 0x0c38, 0x080c, 0xa7c0, 0x2009, 0x026e,
-	0x2134, 0x96b4, 0x00ff, 0x9686, 0x0005, 0x0510, 0x9686, 0x000b,
-	0x01c8, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x1118, 0x9686,
-	0x0009, 0x01b0, 0x9086, 0x1900, 0x1168, 0x9686, 0x0009, 0x0180,
-	0x2001, 0x0004, 0x080c, 0x618f, 0x2001, 0x0028, 0x601a, 0x6007,
-	0x0052, 0x0010, 0x080c, 0xaa61, 0x002e, 0x00be, 0x009e, 0x0005,
-	0x9286, 0x0139, 0x0160, 0x6014, 0x2048, 0x080c, 0xbb17, 0x0140,
-	0xa864, 0x9086, 0x0139, 0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c50,
-	0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0138, 0x8001,
-	0xb842, 0x601b, 0x000a, 0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086,
-	0x007e, 0x1138, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c64, 0x00ee,
-	0x0010, 0x080c, 0x2fda, 0x0870, 0x080c, 0xac85, 0x1160, 0x2001,
-	0x0004, 0x080c, 0x618f, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c,
-	0x8439, 0x0804, 0x8973, 0x080c, 0xa7c0, 0x0804, 0xaa61, 0x0469,
-	0x1160, 0x2001, 0x0008, 0x080c, 0x618f, 0x6003, 0x0001, 0x6007,
-	0x0005, 0x080c, 0x8439, 0x0804, 0x8973, 0x0804, 0xaa61, 0x00e9,
-	0x1160, 0x2001, 0x000a, 0x080c, 0x618f, 0x6003, 0x0001, 0x6007,
-	0x0001, 0x080c, 0x8439, 0x0804, 0x8973, 0x0804, 0xaa61, 0x2009,
-	0x026e, 0x2104, 0x9086, 0x0003, 0x1138, 0x2009, 0x026f, 0x2104,
-	0x9084, 0xff00, 0x9086, 0x2a00, 0x0005, 0x9085, 0x0001, 0x0005,
-	0x00b6, 0x00c6, 0x0016, 0x6110, 0x2158, 0x080c, 0x624d, 0x001e,
-	0x00ce, 0x00be, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036,
-	0x0016, 0x6010, 0x2058, 0x2009, 0x1836, 0x2104, 0x9085, 0x0003,
-	0x200a, 0x080c, 0xad2b, 0x0560, 0x2009, 0x1836, 0x2104, 0xc0cd,
-	0x200a, 0x080c, 0x655e, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a,
-	0x080c, 0xd52a, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019,
-	0x002a, 0x2009, 0x0001, 0x080c, 0x2fa5, 0x00e6, 0x2071, 0x1800,
-	0x080c, 0x2dbb, 0x00ee, 0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009,
-	0x007f, 0x080c, 0x30d5, 0x8108, 0x1f04, 0xacc9, 0x015e, 0x00ce,
-	0x080c, 0xac88, 0x2071, 0x0260, 0x2079, 0x0200, 0x7817, 0x0001,
-	0x2001, 0x1836, 0x200c, 0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc,
-	0x0118, 0x7038, 0xd0dc, 0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001,
-	0x1836, 0x2102, 0x2079, 0x0100, 0x2e04, 0x9084, 0x00ff, 0x2069,
-	0x181e, 0x206a, 0x78e6, 0x0006, 0x8e70, 0x2e04, 0x2069, 0x181f,
-	0x206a, 0x78ea, 0x7832, 0x7836, 0x2010, 0x9084, 0xff00, 0x001e,
-	0x9105, 0x2009, 0x182b, 0x200a, 0x2200, 0x9084, 0x00ff, 0x2008,
-	0x080c, 0x26ac, 0x080c, 0x6fb2, 0x0170, 0x2071, 0x0260, 0x2069,
-	0x1953, 0x7048, 0x206a, 0x704c, 0x6806, 0x7050, 0x680a, 0x7054,
-	0x680e, 0x080c, 0xbf26, 0x0040, 0x2001, 0x0006, 0x080c, 0x618f,
-	0x080c, 0x3003, 0x080c, 0x9e32, 0x001e, 0x003e, 0x00de, 0x00ee,
-	0x00fe, 0x00be, 0x0005, 0x0096, 0x0026, 0x0036, 0x00e6, 0x0156,
-	0x2019, 0x182b, 0x231c, 0x83ff, 0x01f0, 0x2071, 0x0260, 0x7200,
-	0x9294, 0x00ff, 0x7004, 0x9084, 0xff00, 0x9205, 0x9306, 0x1198,
-	0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48, 0x2019, 0x000a, 0x080c,
-	0xae0d, 0x1148, 0x2011, 0x027a, 0x20a9, 0x0004, 0x2019, 0x0006,
-	0x080c, 0xae0d, 0x1100, 0x015e, 0x00ee, 0x003e, 0x002e, 0x009e,
-	0x0005, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9086, 0x0014, 0x11a8,
-	0x7038, 0x9086, 0x0800, 0x1188, 0x703c, 0xd0ec, 0x0160, 0x9084,
-	0x0f00, 0x9086, 0x0100, 0x1138, 0x7054, 0xd0a4, 0x1110, 0xd0ac,
-	0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6,
-	0x0096, 0x00c6, 0x0076, 0x0056, 0x0046, 0x0026, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x2029, 0x19c1, 0x252c, 0x2021, 0x19c7, 0x2424,
-	0x2061, 0x1cd0, 0x2071, 0x1800, 0x7250, 0x7070, 0x9202, 0x1a04,
-	0xade5, 0x080c, 0xd55b, 0x0904, 0xadde, 0x6720, 0x9786, 0x0007,
-	0x0904, 0xadde, 0x2500, 0x9c06, 0x0904, 0xadde, 0x2400, 0x9c06,
-	0x05e8, 0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1580, 0x00c6, 0x6000,
-	0x9086, 0x0004, 0x1110, 0x080c, 0x190d, 0x9786, 0x000a, 0x0148,
-	0x080c, 0xbd1d, 0x1130, 0x00ce, 0x080c, 0xa7c0, 0x080c, 0x9e62,
-	0x00e8, 0x6014, 0x2048, 0x080c, 0xbb17, 0x01a8, 0x9786, 0x0003,
-	0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878,
-	0x2048, 0x080c, 0x0f9d, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0x687f, 0x080c, 0xbd00, 0x080c, 0x9e62, 0x00ce, 0x9ce0, 0x0018,
-	0x7064, 0x9c02, 0x1210, 0x0804, 0xad8c, 0x012e, 0x000e, 0x002e,
-	0x004e, 0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005, 0x9786,
-	0x0006, 0x1118, 0x080c, 0xd4d5, 0x0c30, 0x9786, 0x000a, 0x0998,
-	0x0880, 0x220c, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04,
-	0xadf9, 0x9006, 0x0005, 0x2304, 0x9102, 0x0218, 0x2001, 0x0001,
-	0x0008, 0x9006, 0x918d, 0x0001, 0x0005, 0x0136, 0x01c6, 0x0016,
-	0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0,
-	0x9300, 0x2098, 0x3518, 0x20a9, 0x0001, 0x220c, 0x4002, 0x910e,
-	0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e,
-	0x0005, 0x220c, 0x9102, 0x0218, 0x2001, 0x0001, 0x0010, 0x2001,
-	0x0000, 0x918d, 0x0001, 0x001e, 0x01ce, 0x013e, 0x0005, 0x6004,
-	0x908a, 0x0053, 0x1a0c, 0x0db4, 0x080c, 0xbd0c, 0x0120, 0x080c,
-	0xbd1d, 0x0168, 0x0028, 0x080c, 0x3003, 0x080c, 0xbd1d, 0x0138,
-	0x080c, 0x886e, 0x080c, 0x9e32, 0x080c, 0x8973, 0x0005, 0x080c,
-	0xa7c0, 0x0cb0, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208,
-	0x000a, 0x0005, 0xae6e, 0xae6e, 0xae6e, 0xae6e, 0xae6e, 0xae6e,
-	0xae6e, 0xae6e, 0xae6e, 0xae6e, 0xae6e, 0xae70, 0xae70, 0xae70,
-	0xae70, 0xae6e, 0xae6e, 0xae6e, 0xae70, 0xae6e, 0x080c, 0x0db4,
-	0x600b, 0xffff, 0x6003, 0x0001, 0x6106, 0x080c, 0x83f1, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x8973, 0x012e, 0x0005, 0x9186, 0x0013,
-	0x1128, 0x6004, 0x9082, 0x0040, 0x0804, 0xaf25, 0x9186, 0x0027,
-	0x1520, 0x080c, 0x886e, 0x080c, 0x2fda, 0x080c, 0xc227, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xbb17, 0x0198, 0x080c, 0xbd1d, 0x1118,
-	0x080c, 0xa7c0, 0x0068, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877,
-	0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c, 0x688c, 0x080c, 0xbd00,
-	0x009e, 0x080c, 0x9e32, 0x0804, 0x8973, 0x9186, 0x0014, 0x1120,
-	0x6004, 0x9082, 0x0040, 0x04a0, 0x9186, 0x0046, 0x0150, 0x9186,
-	0x0045, 0x0138, 0x9186, 0x0053, 0x0120, 0x9186, 0x0048, 0x190c,
-	0x0db4, 0x2001, 0x0109, 0x2004, 0xd084, 0x0508, 0x0126, 0x2091,
-	0x2800, 0x0006, 0x0016, 0x0026, 0x0036, 0x00f6, 0x00e6, 0x00c6,
-	0x2079, 0x19b8, 0x2071, 0x1800, 0x2061, 0x0100, 0x080c, 0x82dd,
-	0x00ce, 0x00ee, 0x00fe, 0x003e, 0x002e, 0x001e, 0x000e, 0x012e,
-	0xa001, 0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0xaf63, 0x0005,
-	0x0002, 0xaeff, 0xaefd, 0xaefd, 0xaefd, 0xaefd, 0xaefd, 0xaefd,
-	0xaefd, 0xaefd, 0xaefd, 0xaefd, 0xaf1a, 0xaf1a, 0xaf1a, 0xaf1a,
-	0xaefd, 0xaf1a, 0xaefd, 0xaf1a, 0xaefd, 0x080c, 0x0db4, 0x080c,
-	0x886e, 0x0096, 0x6114, 0x2148, 0x080c, 0xbb17, 0x0168, 0xa867,
-	0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ec, 0xa882,
-	0x080c, 0x688c, 0x080c, 0xbd00, 0x009e, 0x080c, 0x9e32, 0x080c,
-	0x8973, 0x0005, 0x080c, 0x886e, 0x080c, 0xbd1d, 0x090c, 0xa7c0,
-	0x080c, 0x9e32, 0x080c, 0x8973, 0x0005, 0x0002, 0xaf3c, 0xaf3a,
-	0xaf3a, 0xaf3a, 0xaf3a, 0xaf3a, 0xaf3a, 0xaf3a, 0xaf3a, 0xaf3a,
-	0xaf3a, 0xaf53, 0xaf53, 0xaf53, 0xaf53, 0xaf3a, 0xaf5d, 0xaf3a,
-	0xaf53, 0xaf3a, 0x080c, 0x0db4, 0x0096, 0x080c, 0x886e, 0x6014,
-	0x2048, 0x2001, 0x1959, 0x2004, 0x6042, 0xa97c, 0xd1ac, 0x0140,
-	0x6003, 0x0004, 0xa87c, 0x9085, 0x0400, 0xa87e, 0x009e, 0x0005,
-	0x6003, 0x0002, 0x0cb8, 0x080c, 0x886e, 0x080c, 0xc22a, 0x080c,
-	0xc22f, 0x6003, 0x000f, 0x0804, 0x8973, 0x080c, 0x886e, 0x080c,
-	0x9e32, 0x0804, 0x8973, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040,
-	0x0208, 0x000a, 0x0005, 0xaf7f, 0xaf7f, 0xaf7f, 0xaf7f, 0xaf7f,
-	0xaf81, 0xb05e, 0xaf7f, 0xb092, 0xaf7f, 0xaf7f, 0xaf7f, 0xaf7f,
-	0xaf7f, 0xaf7f, 0xaf7f, 0xaf7f, 0xaf7f, 0xaf7f, 0xb092, 0x080c,
-	0x0db4, 0x00b6, 0x0096, 0x6114, 0x2148, 0x7644, 0x96b4, 0x0fff,
-	0x86ff, 0x1528, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xb04d,
-	0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0xa87c, 0xd0ac, 0x0128,
-	0xa834, 0xa938, 0x9115, 0x190c, 0xb227, 0x080c, 0x66a7, 0x6210,
-	0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x7044, 0xd0e4,
-	0x1904, 0xb031, 0x080c, 0x9e32, 0x009e, 0x00be, 0x0005, 0x968c,
-	0x0c00, 0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xb035,
-	0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002,
-	0x0508, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc,
-	0x01a0, 0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34,
-	0x2100, 0x9205, 0x0148, 0x7048, 0x9106, 0x1118, 0x704c, 0x9206,
-	0x0118, 0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b,
-	0x0007, 0x0010, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0x901e,
-	0xd6c4, 0x01d8, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118,
-	0xc6c4, 0x0804, 0xaf88, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a,
-	0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018,
-	0x2011, 0x0025, 0x080c, 0xb712, 0x003e, 0xd6cc, 0x0904, 0xaf9d,
-	0x7154, 0xa98a, 0x81ff, 0x0904, 0xaf9d, 0x9192, 0x0021, 0x1278,
-	0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xb712, 0x2011,
-	0x0205, 0x2013, 0x0000, 0x080c, 0xc1b7, 0x0804, 0xaf9d, 0xa868,
-	0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950,
-	0x080c, 0xb6b1, 0x00ae, 0x080c, 0xc1b7, 0x080c, 0xb702, 0x0804,
-	0xaf9f, 0x080c, 0xbe10, 0x0804, 0xafac, 0xa87c, 0xd0ac, 0x0904,
-	0xafb8, 0xa880, 0xd0bc, 0x1904, 0xafb8, 0x7348, 0xa838, 0x9306,
-	0x11c8, 0x734c, 0xa834, 0x931e, 0x0904, 0xafb8, 0xd6d4, 0x0190,
-	0xab38, 0x9305, 0x0904, 0xafb8, 0x0068, 0xa87c, 0xd0ac, 0x0904,
-	0xaf90, 0xa838, 0xa934, 0x9105, 0x0904, 0xaf90, 0xa880, 0xd0bc,
-	0x1904, 0xaf90, 0x080c, 0xbe4a, 0x0804, 0xafac, 0x0096, 0x00f6,
-	0x6003, 0x0003, 0x6007, 0x0043, 0x2079, 0x026c, 0x7c04, 0x7b00,
-	0x7e0c, 0x7d08, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0140, 0x6003,
-	0x0002, 0x00fe, 0x009e, 0x0005, 0x2130, 0x2228, 0x0058, 0x2400,
-	0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213, 0x2600, 0x9102, 0x2500,
-	0x9203, 0x0e90, 0xac36, 0xab3a, 0xae46, 0xad4a, 0x00fe, 0x6043,
-	0x0000, 0x2c10, 0x080c, 0x1a5c, 0x080c, 0x8456, 0x080c, 0x8a4e,
-	0x009e, 0x0005, 0x0005, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040,
-	0x0208, 0x000a, 0x0005, 0xb0af, 0xb0af, 0xb0af, 0xb0af, 0xb0af,
-	0xb0b1, 0xb147, 0xb0af, 0xb0af, 0xb15e, 0xb1ea, 0xb0af, 0xb0af,
-	0xb0af, 0xb0af, 0xb1ff, 0xb0af, 0xb0af, 0xb0af, 0xb0af, 0x080c,
-	0x0db4, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114,
-	0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e,
-	0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e,
-	0x00be, 0x86ff, 0x0904, 0xb142, 0x9694, 0xff00, 0x9284, 0x0c00,
-	0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904,
-	0xb142, 0x080c, 0x0feb, 0x090c, 0x0db4, 0x2900, 0xb07a, 0xb77c,
-	0xc7cd, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e,
-	0xb070, 0xa872, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92,
-	0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186,
-	0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b,
-	0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b,
-	0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4,
-	0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210,
-	0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025,
-	0x080c, 0xb712, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff,
-	0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011,
-	0x0029, 0x080c, 0xb712, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050,
-	0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950,
-	0x080c, 0xb6b1, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x00f6,
-	0x00a6, 0x6003, 0x0003, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c,
-	0x7d08, 0x6014, 0x2050, 0xb436, 0xb33a, 0xb646, 0xb54a, 0x00ae,
-	0x00fe, 0x2c10, 0x080c, 0x1a5c, 0x0804, 0x9379, 0x6003, 0x0002,
-	0x6004, 0x9086, 0x0040, 0x11c8, 0x0096, 0x6014, 0x2048, 0xa87c,
-	0xd0ac, 0x0160, 0x601c, 0xd084, 0x1130, 0x00f6, 0x2c00, 0x2078,
-	0x080c, 0x1648, 0x00fe, 0x6003, 0x0004, 0x0010, 0x6003, 0x0002,
-	0x009e, 0x080c, 0x886e, 0x080c, 0x8973, 0x0096, 0x2001, 0x1959,
-	0x2004, 0x6042, 0x080c, 0x8923, 0x080c, 0x8a4e, 0x6114, 0x2148,
-	0xa97c, 0xd1e4, 0x0904, 0xb1e5, 0xd1cc, 0x05a8, 0xa978, 0xa868,
-	0xd0fc, 0x0538, 0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0xa860,
-	0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x810e, 0x810e, 0x810f,
-	0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0019, 0x2098,
-	0x0156, 0x20a9, 0x0020, 0x4003, 0x015e, 0x000e, 0xa882, 0x000e,
-	0xa87e, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0f9d, 0x001e,
-	0x0440, 0x0016, 0x080c, 0x0f9d, 0x009e, 0xa974, 0x0016, 0x080c,
-	0xb702, 0x001e, 0x00f0, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff,
-	0x90b6, 0x0002, 0x0180, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c,
-	0x0060, 0xd1dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd1d4, 0x0118,
-	0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0x0016, 0x080c, 0x66a7,
-	0x001e, 0xd1e4, 0x1120, 0x080c, 0x9e32, 0x009e, 0x0005, 0x080c,
-	0xbe10, 0x0cd8, 0x6004, 0x9086, 0x0040, 0x1120, 0x080c, 0x886e,
-	0x080c, 0x8973, 0x2019, 0x0001, 0x080c, 0x96d8, 0x6003, 0x0002,
-	0x080c, 0xc22f, 0x080c, 0x8923, 0x080c, 0x8a4e, 0x0005, 0x6004,
-	0x9086, 0x0040, 0x1120, 0x080c, 0x886e, 0x080c, 0x8973, 0x2019,
-	0x0001, 0x080c, 0x96d8, 0x080c, 0x8923, 0x080c, 0x2fda, 0x080c,
-	0xc227, 0x0096, 0x6114, 0x2148, 0x080c, 0xbb17, 0x0150, 0xa867,
-	0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, 0x688c, 0x080c,
-	0xbd00, 0x009e, 0x080c, 0x9e32, 0x080c, 0x8a4e, 0x0005, 0xa87b,
-	0x0015, 0xd1fc, 0x0180, 0xa87b, 0x0007, 0x8002, 0x8000, 0x810a,
-	0x9189, 0x0000, 0x0006, 0x0016, 0x2009, 0x1a4a, 0x2104, 0x8000,
-	0x200a, 0x001e, 0x000e, 0xa992, 0xa88e, 0x0005, 0x9182, 0x0054,
-	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb25a, 0xb25a,
-	0xb25a, 0xb25a, 0xb25a, 0xb25c, 0xb25a, 0xb25a, 0xb302, 0xb25a,
-	0xb25a, 0xb25a, 0xb25a, 0xb25a, 0xb25a, 0xb25a, 0xb25a, 0xb25a,
-	0xb25a, 0xb433, 0x080c, 0x0db4, 0x0076, 0x00a6, 0x00e6, 0x0096,
+	0xc10b, 0x0040, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0xdead, 0x6010, 0x2058, 0xb9a0, 0x0016, 0x080c, 0x3005,
+	0x080c, 0x9e42, 0x001e, 0x080c, 0x30d7, 0x00de, 0x0804, 0xab2a,
+	0x00de, 0x080c, 0x53a3, 0x1170, 0x6014, 0x9005, 0x1158, 0x0036,
+	0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4a86,
+	0x004e, 0x003e, 0x00d6, 0x6010, 0x2058, 0x080c, 0x62e2, 0x080c,
+	0xa8e8, 0x00de, 0x080c, 0xad6c, 0x1588, 0x6010, 0x2058, 0xb890,
+	0x9005, 0x0560, 0x2001, 0x0006, 0x080c, 0x6198, 0x0096, 0x6014,
+	0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140,
+	0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xc10b, 0x0060,
+	0xa864, 0x9084, 0x00ff, 0x9086, 0x0029, 0x0130, 0xa807, 0x0000,
+	0xa867, 0x0103, 0xa833, 0x0200, 0x009e, 0x080c, 0x3005, 0x6020,
+	0x9086, 0x000a, 0x0138, 0x080c, 0x9e42, 0x0020, 0x080c, 0xa7d1,
+	0x080c, 0xaa74, 0x001e, 0x002e, 0x00ee, 0x00be, 0x0005, 0x2011,
+	0x1823, 0x2204, 0x9086, 0x0014, 0x1160, 0x2001, 0x0002, 0x080c,
+	0x6198, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x8422, 0x0804,
+	0x896d, 0x0804, 0xaa74, 0x2030, 0x2011, 0x1823, 0x2204, 0x9086,
+	0x0004, 0x1148, 0x96b6, 0x000b, 0x1120, 0x2001, 0x0007, 0x080c,
+	0x6198, 0x0804, 0x9e42, 0x0804, 0xaa74, 0x0002, 0xa8b2, 0xab6d,
+	0xa8b2, 0xabac, 0xa8b2, 0xac57, 0xab62, 0xa8b2, 0xa8b2, 0xac6a,
+	0xa8b2, 0xac7a, 0x6604, 0x9686, 0x0003, 0x0904, 0xaa89, 0x96b6,
+	0x001e, 0x1110, 0x080c, 0x9e42, 0x0005, 0x00b6, 0x00d6, 0x00c6,
+	0x080c, 0xac8a, 0x11a0, 0x9006, 0x080c, 0x6184, 0x080c, 0x2fdc,
+	0x080c, 0xc241, 0x2001, 0x0002, 0x080c, 0x6198, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x8422, 0x080c, 0x896d, 0x0408, 0x2009,
+	0x026e, 0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058, 0xb840,
+	0x9084, 0x00ff, 0x9005, 0x0170, 0x8001, 0xb842, 0x601b, 0x000a,
+	0x0078, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x1900,
+	0x1108, 0x08a0, 0x080c, 0x2fdc, 0x080c, 0xc241, 0x080c, 0xaa74,
+	0x00ce, 0x00de, 0x00be, 0x0005, 0x0096, 0x00b6, 0x0026, 0x9016,
+	0x080c, 0xac98, 0x00d6, 0x2069, 0x194c, 0x2d04, 0x9005, 0x0168,
+	0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x2069, 0x181f,
+	0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, 0x00de, 0x0088, 0x9006,
+	0x080c, 0x6184, 0x2001, 0x0002, 0x080c, 0x6198, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x8422, 0x080c, 0x896d, 0x0804, 0xac27,
+	0x080c, 0xbb2c, 0x01b0, 0x6014, 0x2048, 0xa864, 0x2010, 0x9086,
+	0x0139, 0x1138, 0x6007, 0x0016, 0x2001, 0x0002, 0x080c, 0xc165,
+	0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc, 0x0118, 0x2001, 0x0001,
+	0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc, 0x0148, 0x6010, 0x2058,
+	0xb840, 0x9084, 0x00ff, 0x9005, 0x1110, 0x9006, 0x0c38, 0x080c,
+	0xa7d1, 0x2009, 0x026e, 0x2134, 0x96b4, 0x00ff, 0x9686, 0x0005,
+	0x0510, 0x9686, 0x000b, 0x01c8, 0x2009, 0x026f, 0x2104, 0x9084,
+	0xff00, 0x1118, 0x9686, 0x0009, 0x01b0, 0x9086, 0x1900, 0x1168,
+	0x9686, 0x0009, 0x0180, 0x2001, 0x0004, 0x080c, 0x6198, 0x2001,
+	0x0028, 0x601a, 0x6007, 0x0052, 0x0010, 0x080c, 0xaa74, 0x002e,
+	0x00be, 0x009e, 0x0005, 0x9286, 0x0139, 0x0160, 0x6014, 0x2048,
+	0x080c, 0xbb2c, 0x0140, 0xa864, 0x9086, 0x0139, 0x0118, 0xa868,
+	0xd0fc, 0x0108, 0x0c50, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff,
+	0x9005, 0x0138, 0x8001, 0xb842, 0x601b, 0x000a, 0x6007, 0x0016,
+	0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x00e6, 0x2071, 0x1800,
+	0x080c, 0x5c6d, 0x00ee, 0x0010, 0x080c, 0x2fdc, 0x0870, 0x080c,
+	0xac98, 0x1160, 0x2001, 0x0004, 0x080c, 0x6198, 0x6003, 0x0001,
+	0x6007, 0x0003, 0x080c, 0x8422, 0x0804, 0x896d, 0x080c, 0xa7d1,
+	0x0804, 0xaa74, 0x0469, 0x1160, 0x2001, 0x0008, 0x080c, 0x6198,
+	0x6003, 0x0001, 0x6007, 0x0005, 0x080c, 0x8422, 0x0804, 0x896d,
+	0x0804, 0xaa74, 0x00e9, 0x1160, 0x2001, 0x000a, 0x080c, 0x6198,
+	0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x8422, 0x0804, 0x896d,
+	0x0804, 0xaa74, 0x2009, 0x026e, 0x2104, 0x9086, 0x0003, 0x1138,
+	0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x2a00, 0x0005,
+	0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016, 0x6110, 0x2158,
+	0x080c, 0x6256, 0x001e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x00f6,
+	0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010, 0x2058, 0x2009, 0x1836,
+	0x2104, 0x9085, 0x0003, 0x200a, 0x080c, 0xad3e, 0x0560, 0x2009,
+	0x1836, 0x2104, 0xc0cd, 0x200a, 0x080c, 0x6567, 0x0158, 0x9006,
+	0x2020, 0x2009, 0x002a, 0x080c, 0xd54b, 0x2001, 0x180c, 0x200c,
+	0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x080c, 0x2fa7,
+	0x00e6, 0x2071, 0x1800, 0x080c, 0x2dbd, 0x00ee, 0x00c6, 0x0156,
+	0x20a9, 0x0781, 0x2009, 0x007f, 0x080c, 0x30d7, 0x8108, 0x1f04,
+	0xacdc, 0x015e, 0x00ce, 0x080c, 0xac9b, 0x2071, 0x0260, 0x2079,
+	0x0200, 0x7817, 0x0001, 0x2001, 0x1836, 0x200c, 0xc1c5, 0x7018,
+	0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc, 0x1108, 0xc1c4,
+	0x7817, 0x0000, 0x2001, 0x1836, 0x2102, 0x2079, 0x0100, 0x2e04,
+	0x9084, 0x00ff, 0x2069, 0x181e, 0x206a, 0x78e6, 0x0006, 0x8e70,
+	0x2e04, 0x2069, 0x181f, 0x206a, 0x78ea, 0x7832, 0x7836, 0x2010,
+	0x9084, 0xff00, 0x001e, 0x9105, 0x2009, 0x182b, 0x200a, 0x2200,
+	0x9084, 0x00ff, 0x2008, 0x080c, 0x26ae, 0x080c, 0x6f9b, 0x0170,
+	0x2071, 0x0260, 0x2069, 0x1952, 0x7048, 0x206a, 0x704c, 0x6806,
+	0x7050, 0x680a, 0x7054, 0x680e, 0x080c, 0xbf40, 0x0040, 0x2001,
+	0x0006, 0x080c, 0x6198, 0x080c, 0x3005, 0x080c, 0x9e42, 0x001e,
+	0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096, 0x0026,
+	0x0036, 0x00e6, 0x0156, 0x2019, 0x182b, 0x231c, 0x83ff, 0x01f0,
+	0x2071, 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084, 0xff00,
+	0x9205, 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48,
+	0x2019, 0x000a, 0x080c, 0xae20, 0x1148, 0x2011, 0x027a, 0x20a9,
+	0x0004, 0x2019, 0x0006, 0x080c, 0xae20, 0x1100, 0x015e, 0x00ee,
+	0x003e, 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260, 0x7034,
+	0x9086, 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188, 0x703c,
+	0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138, 0x7054,
+	0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056, 0x0046,
+	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19c0, 0x252c,
+	0x2021, 0x19c6, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7250,
+	0x7070, 0x9202, 0x1a04, 0xadf8, 0x080c, 0xd57c, 0x0904, 0xadf1,
+	0x6720, 0x9786, 0x0007, 0x0904, 0xadf1, 0x2500, 0x9c06, 0x0904,
+	0xadf1, 0x2400, 0x9c06, 0x05e8, 0x3e08, 0x9186, 0x0002, 0x1148,
+	0x6010, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
+	0x1580, 0x00c6, 0x6000, 0x9086, 0x0004, 0x1110, 0x080c, 0x190f,
+	0x9786, 0x000a, 0x0148, 0x080c, 0xbd32, 0x1130, 0x00ce, 0x080c,
+	0xa7d1, 0x080c, 0x9e72, 0x00e8, 0x6014, 0x2048, 0x080c, 0xbb2c,
+	0x01a8, 0x9786, 0x0003, 0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc,
+	0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0f9d, 0x009e, 0xab7a,
+	0xa877, 0x0000, 0x080c, 0x6884, 0x080c, 0xbd15, 0x080c, 0x9e72,
+	0x00ce, 0x9ce0, 0x0018, 0x7064, 0x9c02, 0x1210, 0x0804, 0xad9f,
+	0x012e, 0x000e, 0x002e, 0x004e, 0x005e, 0x007e, 0x00ce, 0x009e,
+	0x00ee, 0x0005, 0x9786, 0x0006, 0x1118, 0x080c, 0xd4f6, 0x0c30,
+	0x9786, 0x000a, 0x0998, 0x0880, 0x220c, 0x2304, 0x9106, 0x1130,
+	0x8210, 0x8318, 0x1f04, 0xae0c, 0x9006, 0x0005, 0x2304, 0x9102,
+	0x0218, 0x2001, 0x0001, 0x0008, 0x9006, 0x918d, 0x0001, 0x0005,
+	0x0136, 0x01c6, 0x0016, 0x8906, 0x8006, 0x8007, 0x908c, 0x003f,
+	0x21e0, 0x9084, 0xffc0, 0x9300, 0x2098, 0x3518, 0x20a9, 0x0001,
+	0x220c, 0x4002, 0x910e, 0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006,
+	0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x9102, 0x0218, 0x2001,
+	0x0001, 0x0010, 0x2001, 0x0000, 0x918d, 0x0001, 0x001e, 0x01ce,
+	0x013e, 0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0db4, 0x080c,
+	0xbd21, 0x0120, 0x080c, 0xbd32, 0x0168, 0x0028, 0x080c, 0x3005,
+	0x080c, 0xbd32, 0x0138, 0x080c, 0x8861, 0x080c, 0x9e42, 0x080c,
+	0x896d, 0x0005, 0x080c, 0xa7d1, 0x0cb0, 0x9182, 0x0054, 0x1220,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xae81, 0xae81, 0xae81,
+	0xae81, 0xae81, 0xae81, 0xae81, 0xae81, 0xae81, 0xae81, 0xae81,
+	0xae83, 0xae83, 0xae83, 0xae83, 0xae81, 0xae81, 0xae81, 0xae83,
+	0xae81, 0x080c, 0x0db4, 0x600b, 0xffff, 0x6003, 0x0001, 0x6106,
+	0x080c, 0x83da, 0x0126, 0x2091, 0x8000, 0x080c, 0x896d, 0x012e,
+	0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0040, 0x0804,
+	0xaf38, 0x9186, 0x0027, 0x1520, 0x080c, 0x8861, 0x080c, 0x2fdc,
+	0x080c, 0xc241, 0x0096, 0x6114, 0x2148, 0x080c, 0xbb2c, 0x0198,
+	0x080c, 0xbd32, 0x1118, 0x080c, 0xa7d1, 0x0068, 0xa867, 0x0103,
+	0xa87b, 0x0029, 0xa877, 0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c,
+	0x6891, 0x080c, 0xbd15, 0x009e, 0x080c, 0x9e42, 0x0804, 0x896d,
+	0x9186, 0x0014, 0x1120, 0x6004, 0x9082, 0x0040, 0x04a0, 0x9186,
+	0x0046, 0x0150, 0x9186, 0x0045, 0x0138, 0x9186, 0x0053, 0x0120,
+	0x9186, 0x0048, 0x190c, 0x0db4, 0x2001, 0x0109, 0x2004, 0xd084,
+	0x0508, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x0036,
+	0x00f6, 0x00e6, 0x00c6, 0x2079, 0x19b7, 0x2071, 0x1800, 0x2061,
+	0x0100, 0x080c, 0x82c6, 0x00ce, 0x00ee, 0x00fe, 0x003e, 0x002e,
+	0x001e, 0x000e, 0x012e, 0xa001, 0x6000, 0x9086, 0x0002, 0x1110,
+	0x0804, 0xaf76, 0x0005, 0x0002, 0xaf12, 0xaf10, 0xaf10, 0xaf10,
+	0xaf10, 0xaf10, 0xaf10, 0xaf10, 0xaf10, 0xaf10, 0xaf10, 0xaf2d,
+	0xaf2d, 0xaf2d, 0xaf2d, 0xaf10, 0xaf2d, 0xaf10, 0xaf2d, 0xaf10,
+	0x080c, 0x0db4, 0x080c, 0x8861, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xbb2c, 0x0168, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000,
+	0xa880, 0xc0ec, 0xa882, 0x080c, 0x6891, 0x080c, 0xbd15, 0x009e,
+	0x080c, 0x9e42, 0x080c, 0x896d, 0x0005, 0x080c, 0x8861, 0x080c,
+	0xbd32, 0x090c, 0xa7d1, 0x080c, 0x9e42, 0x080c, 0x896d, 0x0005,
+	0x0002, 0xaf4f, 0xaf4d, 0xaf4d, 0xaf4d, 0xaf4d, 0xaf4d, 0xaf4d,
+	0xaf4d, 0xaf4d, 0xaf4d, 0xaf4d, 0xaf66, 0xaf66, 0xaf66, 0xaf66,
+	0xaf4d, 0xaf70, 0xaf4d, 0xaf66, 0xaf4d, 0x080c, 0x0db4, 0x0096,
+	0x080c, 0x8861, 0x6014, 0x2048, 0x2001, 0x1958, 0x2004, 0x6042,
+	0xa97c, 0xd1ac, 0x0140, 0x6003, 0x0004, 0xa87c, 0x9085, 0x0400,
+	0xa87e, 0x009e, 0x0005, 0x6003, 0x0002, 0x0cb8, 0x080c, 0x8861,
+	0x080c, 0xc244, 0x080c, 0xc249, 0x6003, 0x000f, 0x0804, 0x896d,
+	0x080c, 0x8861, 0x080c, 0x9e42, 0x0804, 0x896d, 0x9182, 0x0054,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xaf92, 0xaf92,
+	0xaf92, 0xaf92, 0xaf92, 0xaf94, 0xb071, 0xaf92, 0xb0a5, 0xaf92,
+	0xaf92, 0xaf92, 0xaf92, 0xaf92, 0xaf92, 0xaf92, 0xaf92, 0xaf92,
+	0xaf92, 0xb0a5, 0x080c, 0x0db4, 0x00b6, 0x0096, 0x6114, 0x2148,
+	0x7644, 0x96b4, 0x0fff, 0x86ff, 0x1528, 0x6010, 0x2058, 0xb800,
+	0xd0bc, 0x1904, 0xb060, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76,
+	0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xb23a,
+	0x080c, 0x66ac, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211,
+	0xba3e, 0x7044, 0xd0e4, 0x1904, 0xb044, 0x080c, 0x9e42, 0x009e,
+	0x00be, 0x0005, 0x968c, 0x0c00, 0x0150, 0x6010, 0x2058, 0xb800,
+	0xd0bc, 0x1904, 0xb048, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c,
+	0x00ff, 0x9186, 0x0002, 0x0508, 0x9186, 0x0028, 0x1118, 0xa87b,
+	0x001c, 0x00e8, 0xd6dc, 0x01a0, 0xa87b, 0x0015, 0xa87c, 0xd0ac,
+	0x0170, 0xa938, 0xaa34, 0x2100, 0x9205, 0x0148, 0x7048, 0x9106,
+	0x1118, 0x704c, 0x9206, 0x0118, 0xa992, 0xaa8e, 0xc6dc, 0x0038,
+	0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xa867,
+	0x0103, 0xae76, 0x901e, 0xd6c4, 0x01d8, 0x9686, 0x0100, 0x1130,
+	0x7064, 0x9005, 0x1118, 0xc6c4, 0x0804, 0xaf9b, 0x735c, 0xab86,
+	0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036,
+	0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xb725, 0x003e,
+	0xd6cc, 0x0904, 0xafb0, 0x7154, 0xa98a, 0x81ff, 0x0904, 0xafb0,
+	0x9192, 0x0021, 0x1278, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029,
+	0x080c, 0xb725, 0x2011, 0x0205, 0x2013, 0x0000, 0x080c, 0xc1d1,
+	0x0804, 0xafb0, 0xa868, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a,
+	0x0c50, 0x00a6, 0x2950, 0x080c, 0xb6c4, 0x00ae, 0x080c, 0xc1d1,
+	0x080c, 0xb715, 0x0804, 0xafb2, 0x080c, 0xbe2a, 0x0804, 0xafbf,
+	0xa87c, 0xd0ac, 0x0904, 0xafcb, 0xa880, 0xd0bc, 0x1904, 0xafcb,
+	0x7348, 0xa838, 0x9306, 0x11c8, 0x734c, 0xa834, 0x931e, 0x0904,
+	0xafcb, 0xd6d4, 0x0190, 0xab38, 0x9305, 0x0904, 0xafcb, 0x0068,
+	0xa87c, 0xd0ac, 0x0904, 0xafa3, 0xa838, 0xa934, 0x9105, 0x0904,
+	0xafa3, 0xa880, 0xd0bc, 0x1904, 0xafa3, 0x080c, 0xbe64, 0x0804,
+	0xafbf, 0x0096, 0x00f6, 0x6003, 0x0003, 0x6007, 0x0043, 0x2079,
+	0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x6014, 0x2048, 0xa87c,
+	0xd0ac, 0x0140, 0x6003, 0x0002, 0x00fe, 0x009e, 0x0005, 0x2130,
+	0x2228, 0x0058, 0x2400, 0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213,
+	0x2600, 0x9102, 0x2500, 0x9203, 0x0e90, 0xac36, 0xab3a, 0xae46,
+	0xad4a, 0x00fe, 0x6043, 0x0000, 0x2c10, 0x080c, 0x1a5e, 0x080c,
+	0x843f, 0x080c, 0x8a4a, 0x009e, 0x0005, 0x0005, 0x9182, 0x0054,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb0c2, 0xb0c2,
+	0xb0c2, 0xb0c2, 0xb0c2, 0xb0c4, 0xb15a, 0xb0c2, 0xb0c2, 0xb171,
+	0xb1fd, 0xb0c2, 0xb0c2, 0xb0c2, 0xb0c2, 0xb212, 0xb0c2, 0xb0c2,
+	0xb0c2, 0xb0c2, 0x080c, 0x0db4, 0x0076, 0x00a6, 0x00e6, 0x0096,
 	0x2071, 0x0260, 0x6114, 0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff,
 	0xb77c, 0xc7e5, 0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff,
-	0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xb2fb, 0x9694,
+	0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xb155, 0x9694,
 	0xff00, 0x9284, 0x0c00, 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e,
-	0x9284, 0x0300, 0x0904, 0xb2fb, 0x9686, 0x0100, 0x1130, 0x7064,
-	0x9005, 0x1118, 0xc6c4, 0xb676, 0x0c38, 0x080c, 0x0feb, 0x090c,
-	0x0db4, 0x2900, 0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e, 0xa867,
-	0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872, 0x7044,
-	0x9084, 0xf000, 0x9635, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348,
-	0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0180,
-	0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118,
-	0xa87b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010,
-	0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e,
-	0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009,
-	0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011,
-	0x0025, 0x080c, 0xb712, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a,
-	0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018,
-	0x2011, 0x0029, 0x080c, 0xb712, 0x2011, 0x0205, 0x2013, 0x0000,
-	0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68,
-	0x2950, 0x080c, 0xb6b1, 0x080c, 0x18eb, 0x009e, 0x00ee, 0x00ae,
-	0x007e, 0x0005, 0x2001, 0x1959, 0x2004, 0x6042, 0x0096, 0x6114,
-	0x2148, 0xa83c, 0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc, 0xa87e,
-	0x6003, 0x0002, 0xa97c, 0xd1e4, 0x0904, 0xb42e, 0x6043, 0x0000,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500, 0xd1cc,
-	0x0904, 0xb3fd, 0xa978, 0xa868, 0xd0fc, 0x0904, 0xb3be, 0x0016,
-	0xa87c, 0x0006, 0xa880, 0x0006, 0x00a6, 0x2150, 0xb174, 0x9184,
-	0x00ff, 0x90b6, 0x0002, 0x0904, 0xb38c, 0x9086, 0x0028, 0x1904,
-	0xb378, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x0804, 0xb394, 0x6024,
-	0xd0f4, 0x11d0, 0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838, 0xaa90,
-	0x9206, 0x1120, 0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024, 0xd0d4,
-	0x1148, 0xa9ac, 0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838, 0x9103,
-	0x603e, 0x6024, 0xc0f5, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb83c,
-	0x8000, 0xb83e, 0x00be, 0x9006, 0xa876, 0xa892, 0xa88e, 0xa87c,
-	0xc0e4, 0xa87e, 0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096, 0xa878,
-	0x2048, 0x080c, 0x0f9d, 0x009e, 0x080c, 0xbe4a, 0x0804, 0xb42e,
-	0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xc0da,
-	0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b,
-	0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834,
-	0xa938, 0x9115, 0x190c, 0xb227, 0xa87c, 0xb07e, 0xa890, 0xb092,
-	0xa88c, 0xb08e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0,
-	0x20a9, 0x0020, 0x8a06, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e0,
-	0x9084, 0xffc0, 0x9080, 0x0019, 0x2098, 0x4003, 0x00ae, 0x000e,
-	0xa882, 0x000e, 0xa87e, 0x080c, 0xc1b7, 0x001e, 0xa874, 0x0006,
-	0x2148, 0x080c, 0x0f9d, 0x001e, 0x0804, 0xb42a, 0x0016, 0x00a6,
-	0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086,
-	0x0028, 0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc,
-	0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xc0da, 0x0118,
-	0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007,
-	0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xb227, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c,
-	0xb07e, 0x00ae, 0x080c, 0x0f9d, 0x009e, 0x080c, 0xc1b7, 0xa974,
-	0x0016, 0x080c, 0xb702, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974,
-	0x9184, 0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118,
-	0xa87b, 0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c,
-	0xc0da, 0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118,
-	0xa87b, 0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128,
-	0xa834, 0xa938, 0x9115, 0x190c, 0xb227, 0xa974, 0x0016, 0x080c,
-	0x66a7, 0x001e, 0xd1e4, 0x1120, 0x080c, 0x9e32, 0x009e, 0x0005,
-	0x080c, 0xbe10, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0xd1e4,
-	0x190c, 0x18f9, 0x009e, 0x0005, 0x080c, 0x886e, 0x0010, 0x080c,
-	0x8923, 0x080c, 0xbb17, 0x01f0, 0x0096, 0x6114, 0x2148, 0x080c,
-	0xbd1d, 0x1118, 0x080c, 0xa7c0, 0x00a0, 0xa867, 0x0103, 0x2009,
-	0x180c, 0x210c, 0xd18c, 0x11b8, 0xd184, 0x1190, 0x6108, 0xa97a,
-	0x918e, 0x0029, 0x1110, 0x080c, 0xd7d3, 0xa877, 0x0000, 0x080c,
-	0x688c, 0x009e, 0x080c, 0x9e32, 0x080c, 0x8973, 0x0804, 0x8a4e,
-	0xa87b, 0x0004, 0x0c90, 0xa87b, 0x0004, 0x0c78, 0x9182, 0x0054,
-	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb48a, 0xb48a,
-	0xb48a, 0xb48a, 0xb48a, 0xb48c, 0xb48a, 0xb48a, 0xb48a, 0xb48a,
-	0xb48a, 0xb48a, 0xb48a, 0xb48a, 0xb48a, 0xb48a, 0xb48a, 0xb48a,
-	0xb48a, 0xb48a, 0x080c, 0x0db4, 0x080c, 0x538e, 0x01f8, 0x6014,
-	0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294,
-	0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086,
-	0x0139, 0x0128, 0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897,
-	0x4000, 0xa99a, 0xaa9e, 0x080c, 0x688c, 0x009e, 0x0804, 0x9e32,
-	0x9182, 0x0085, 0x0002, 0xb4c2, 0xb4c0, 0xb4c0, 0xb4ce, 0xb4c0,
-	0xb4c0, 0xb4c0, 0xb4c0, 0xb4c0, 0xb4c0, 0xb4c0, 0xb4c0, 0xb4c0,
-	0x080c, 0x0db4, 0x6003, 0x0001, 0x6106, 0x080c, 0x83f1, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x8973, 0x012e, 0x0005, 0x0026, 0x0056,
-	0x00d6, 0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c,
-	0xbb05, 0x01a0, 0x2268, 0x6800, 0x9086, 0x0000, 0x0178, 0x6010,
-	0x6d10, 0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c, 0xb73d, 0x00ce,
-	0x0128, 0x6803, 0x0002, 0x6007, 0x0086, 0x0010, 0x6007, 0x0087,
-	0x6003, 0x0001, 0x080c, 0x83f1, 0x080c, 0x8973, 0x9280, 0x0004,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824, 0xd0ec,
-	0x0128, 0x00c6, 0x2260, 0x080c, 0xbe4a, 0x00ce, 0x00ee, 0x00de,
-	0x005e, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a,
-	0x0085, 0x0a0c, 0x0db4, 0x908a, 0x0092, 0x1a0c, 0x0db4, 0x9082,
-	0x0085, 0x00e2, 0x9186, 0x0027, 0x0120, 0x9186, 0x0014, 0x190c,
-	0x0db4, 0x080c, 0x886e, 0x0096, 0x6014, 0x2048, 0x080c, 0xbb17,
-	0x0140, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c,
-	0x688c, 0x009e, 0x080c, 0x9e62, 0x0804, 0x8973, 0xb543, 0xb545,
-	0xb545, 0xb543, 0xb543, 0xb543, 0xb543, 0xb543, 0xb543, 0xb543,
-	0xb543, 0xb543, 0xb543, 0x080c, 0x0db4, 0x080c, 0x886e, 0x080c,
-	0x9e62, 0x080c, 0x8973, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004,
-	0x9082, 0x0085, 0x2008, 0x04b8, 0x9186, 0x0027, 0x11f8, 0x080c,
-	0x886e, 0x080c, 0x2fda, 0x080c, 0xc227, 0x0096, 0x6014, 0x2048,
-	0x080c, 0xbb17, 0x0150, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b,
-	0x0029, 0x080c, 0x688c, 0x080c, 0xbd00, 0x009e, 0x080c, 0x9e32,
-	0x080c, 0x8973, 0x0005, 0x080c, 0x9ec7, 0x0ce0, 0x9186, 0x0014,
-	0x1dd0, 0x080c, 0x886e, 0x0096, 0x6014, 0x2048, 0x080c, 0xbb17,
-	0x0d60, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0006, 0xa880,
-	0xc0ec, 0xa882, 0x08f0, 0x0002, 0xb59b, 0xb599, 0xb599, 0xb599,
-	0xb599, 0xb599, 0xb5b3, 0xb599, 0xb599, 0xb599, 0xb599, 0xb599,
-	0xb599, 0x080c, 0x0db4, 0x080c, 0x886e, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001,
-	0x1957, 0x0010, 0x2001, 0x1958, 0x2004, 0x601a, 0x6003, 0x000c,
-	0x080c, 0x8973, 0x0005, 0x080c, 0x886e, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001,
-	0x1957, 0x0010, 0x2001, 0x1958, 0x2004, 0x601a, 0x6003, 0x000e,
-	0x080c, 0x8973, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085,
-	0x0208, 0x0012, 0x0804, 0x9ec7, 0xb5e1, 0xb5e1, 0xb5e1, 0xb5e1,
-	0xb5e3, 0xb630, 0xb5e1, 0xb5e1, 0xb5e1, 0xb5e1, 0xb5e1, 0xb5e1,
-	0xb5e1, 0x080c, 0x0db4, 0x0096, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
-	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x009e, 0x0804, 0xb644,
-	0x080c, 0xbb17, 0x1118, 0x080c, 0xbd00, 0x0068, 0x6014, 0x2048,
-	0xa87c, 0xd0e4, 0x1110, 0x080c, 0xbd00, 0xa867, 0x0103, 0x080c,
-	0xc1f2, 0x080c, 0x688c, 0x00d6, 0x2c68, 0x080c, 0x9ddc, 0x01d0,
-	0x6003, 0x0001, 0x6007, 0x001e, 0x600b, 0xffff, 0x2009, 0x026e,
-	0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x6910, 0x6112,
-	0x080c, 0xbf8c, 0x6954, 0x6156, 0x6023, 0x0001, 0x080c, 0x83f1,
-	0x080c, 0x8973, 0x2d60, 0x00de, 0x080c, 0x9e32, 0x009e, 0x0005,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0, 0x6034,
-	0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x0130, 0x9186, 0x001e,
-	0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c, 0xc18a,
-	0x11f0, 0x080c, 0x9ddc, 0x01d8, 0x6106, 0x6003, 0x0001, 0x6023,
-	0x0001, 0x6910, 0x6112, 0x692c, 0x612e, 0x6930, 0x6132, 0x6934,
-	0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, 0x693c, 0x613e, 0x6954,
-	0x6156, 0x080c, 0xbf8c, 0x080c, 0x83f1, 0x080c, 0x8973, 0x2d60,
-	0x00de, 0x0804, 0x9e32, 0x0096, 0x6014, 0x2048, 0x080c, 0xbb17,
-	0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec, 0xa882,
-	0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020,
-	0xa87b, 0x0005, 0x080c, 0xbe0c, 0xa877, 0x0000, 0x080c, 0x688c,
-	0x080c, 0xbd00, 0x009e, 0x0804, 0x9e32, 0x0016, 0x0096, 0x6014,
-	0x2048, 0x080c, 0xbb17, 0x0140, 0xa867, 0x0103, 0xa87b, 0x0028,
-	0xa877, 0x0000, 0x080c, 0x688c, 0x009e, 0x001e, 0x9186, 0x0013,
-	0x0148, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c,
-	0x9ec7, 0x0030, 0x080c, 0x886e, 0x080c, 0x9e62, 0x080c, 0x8973,
-	0x0005, 0x0056, 0x0066, 0x0096, 0x00a6, 0x2029, 0x0001, 0x9182,
-	0x0101, 0x1208, 0x0010, 0x2009, 0x0100, 0x2130, 0x8304, 0x9098,
-	0x0018, 0x2009, 0x0020, 0x2011, 0x0029, 0x080c, 0xb712, 0x96b2,
-	0x0020, 0xb004, 0x904d, 0x0110, 0x080c, 0x0f9d, 0x080c, 0x0feb,
-	0x0520, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406,
-	0x968a, 0x003d, 0x1228, 0x2608, 0x2011, 0x001b, 0x0499, 0x00a8,
-	0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x0451,
-	0x0c28, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad,
-	0x0003, 0xb566, 0x95ac, 0x0000, 0x0048, 0x2001, 0x0205, 0x2003,
-	0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x009e, 0x006e,
-	0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055, 0x0130,
-	0xa807, 0x0000, 0x080c, 0x688c, 0x2a48, 0x0cb8, 0x080c, 0x688c,
-	0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7814, 0x9085, 0x0080,
-	0x7816, 0xd184, 0x0108, 0x8108, 0x810c, 0x20a9, 0x0001, 0xa860,
-	0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300, 0x9e00,
-	0x2098, 0x4003, 0x8318, 0x9386, 0x0020, 0x1148, 0x2018, 0x2300,
-	0x9e00, 0x2098, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x8109,
-	0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005, 0x0066, 0x0126, 0x2091,
-	0x8000, 0x2031, 0x0001, 0x6020, 0x9084, 0x000f, 0x0083, 0x012e,
-	0x006e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031, 0x0000,
-	0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005, 0xb778,
-	0xb778, 0xb773, 0xb79a, 0xb766, 0xb773, 0xb79a, 0xb773, 0xb766,
-	0xb766, 0xb773, 0xb773, 0xb773, 0xb766, 0xb766, 0x080c, 0x0db4,
-	0x0036, 0x2019, 0x0010, 0x080c, 0xd0e5, 0x6023, 0x0006, 0x6003,
-	0x0007, 0x003e, 0x0005, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005,
-	0x0096, 0x86ff, 0x11d8, 0x6014, 0x2048, 0x080c, 0xbb17, 0x01c0,
-	0xa864, 0x9086, 0x0139, 0x1128, 0xa87b, 0x0005, 0xa883, 0x0000,
-	0x0028, 0x900e, 0x2001, 0x0005, 0x080c, 0x6ac6, 0x080c, 0xbe0c,
-	0x080c, 0x687f, 0x080c, 0x9e62, 0x9085, 0x0001, 0x009e, 0x0005,
-	0x9006, 0x0ce0, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0db4, 0x0002,
-	0xb7b0, 0xb7de, 0xb7b2, 0xb7ff, 0xb7d9, 0xb7b0, 0xb773, 0xb778,
-	0xb778, 0xb773, 0xb773, 0xb773, 0xb773, 0xb773, 0xb773, 0xb773,
-	0x080c, 0x0db4, 0x86ff, 0x1510, 0x6020, 0x9086, 0x0006, 0x01f0,
-	0x0096, 0x6014, 0x2048, 0x080c, 0xbb17, 0x0158, 0xa87c, 0xd0cc,
-	0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0f9d, 0x009e, 0x080c,
-	0xbe0c, 0x009e, 0x080c, 0xc1cc, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0002, 0x080c, 0x83f1, 0x080c, 0x8973, 0x9085, 0x0001,
-	0x0005, 0x0066, 0x080c, 0x190d, 0x006e, 0x08a0, 0x00e6, 0x2071,
-	0x19b8, 0x7024, 0x9c06, 0x1120, 0x080c, 0x9662, 0x00ee, 0x0850,
-	0x6020, 0x9084, 0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096,
-	0x2049, 0x0001, 0x2c40, 0x080c, 0x97ba, 0x009e, 0x008e, 0x0010,
-	0x080c, 0x955f, 0x00ee, 0x1904, 0xb7b2, 0x0804, 0xb773, 0x0036,
-	0x00e6, 0x2071, 0x19b8, 0x703c, 0x9c06, 0x1138, 0x901e, 0x080c,
-	0x96d8, 0x00ee, 0x003e, 0x0804, 0xb7b2, 0x080c, 0x98ea, 0x00ee,
-	0x003e, 0x1904, 0xb7b2, 0x0804, 0xb773, 0x00c6, 0x6020, 0x9084,
-	0x000f, 0x0013, 0x00ce, 0x0005, 0xb832, 0xb8fb, 0xba62, 0xb83c,
-	0x9e62, 0xb832, 0xd0d7, 0xc234, 0xb8fb, 0xb82b, 0xbae1, 0xb82b,
-	0xb82b, 0xb82b, 0xb82b, 0x080c, 0x0db4, 0x080c, 0xbd1d, 0x1110,
-	0x080c, 0xa7c0, 0x0005, 0x080c, 0x886e, 0x080c, 0x8973, 0x0804,
-	0x9e32, 0x601b, 0x0001, 0x0005, 0x080c, 0xbb17, 0x0130, 0x6014,
-	0x0096, 0x2048, 0x2c00, 0xa896, 0x009e, 0x6000, 0x908a, 0x0016,
-	0x1a0c, 0x0db4, 0x0002, 0xb85b, 0xb85d, 0xb881, 0xb895, 0xb8b9,
-	0xb85b, 0xb832, 0xb832, 0xb832, 0xb895, 0xb895, 0xb85b, 0xb85b,
-	0xb85b, 0xb85b, 0xb89f, 0x080c, 0x0db4, 0x00e6, 0x6014, 0x0096,
-	0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x2071, 0x19b8, 0x7024,
-	0x9c06, 0x01a0, 0x080c, 0x955f, 0x080c, 0xc1cc, 0x6007, 0x0085,
-	0x6003, 0x000b, 0x6023, 0x0002, 0x2001, 0x1958, 0x2004, 0x601a,
-	0x080c, 0x83f1, 0x080c, 0x8973, 0x00ee, 0x0005, 0x601b, 0x0001,
-	0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e,
-	0x080c, 0xc1cc, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002,
-	0x080c, 0x83f1, 0x080c, 0x8973, 0x0005, 0x0096, 0x601b, 0x0001,
-	0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c,
-	0x538e, 0x01a8, 0x6014, 0x0096, 0x904d, 0x0180, 0xa864, 0xa867,
-	0x0103, 0xa87b, 0x0006, 0x9086, 0x0139, 0x1140, 0xa867, 0x0139,
-	0xa897, 0x4005, 0xa89b, 0x0004, 0x080c, 0x688c, 0x009e, 0x0804,
-	0x9e32, 0x6014, 0x0096, 0x904d, 0x05c8, 0xa97c, 0xd1e4, 0x05b0,
-	0x2001, 0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884,
-	0x009e, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001, 0x0030,
-	0x2c08, 0x080c, 0x1518, 0x2001, 0x030c, 0x2004, 0x9086, 0x0041,
-	0x11a0, 0x6014, 0x0096, 0x904d, 0x090c, 0x0db4, 0xa880, 0xd0f4,
-	0x1130, 0xc0f5, 0xa882, 0x009e, 0x601b, 0x0002, 0x0070, 0x009e,
-	0x2001, 0x0037, 0x2c08, 0x080c, 0x1518, 0x6000, 0x9086, 0x0004,
-	0x1120, 0x2009, 0x0048, 0x080c, 0x9eac, 0x0005, 0x009e, 0x080c,
-	0x190d, 0x0804, 0xb881, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0db4,
-	0x000b, 0x0005, 0xb912, 0xb839, 0xb914, 0xb912, 0xb914, 0xb914,
-	0xb833, 0xb912, 0xb82d, 0xb82d, 0xb912, 0xb912, 0xb912, 0xb912,
-	0xb912, 0xb912, 0x080c, 0x0db4, 0x6010, 0x00b6, 0x2058, 0xb804,
-	0x9084, 0x00ff, 0x00be, 0x908a, 0x000c, 0x1a0c, 0x0db4, 0x00b6,
-	0x0013, 0x00be, 0x0005, 0xb92f, 0xb9fc, 0xb931, 0xb971, 0xb931,
-	0xb971, 0xb931, 0xb93f, 0xb92f, 0xb971, 0xb92f, 0xb960, 0x080c,
-	0x0db4, 0x6004, 0x908e, 0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8,
-	0x908e, 0x0002, 0x0590, 0x908e, 0x0052, 0x0904, 0xb9f8, 0x6004,
-	0x080c, 0xbd1d, 0x0904, 0xba15, 0x908e, 0x0004, 0x1110, 0x080c,
-	0x3003, 0x908e, 0x0021, 0x0904, 0xba19, 0x908e, 0x0022, 0x0904,
-	0xba5d, 0x908e, 0x003d, 0x0904, 0xba19, 0x908e, 0x0039, 0x0904,
-	0xba1d, 0x908e, 0x0035, 0x0904, 0xba1d, 0x908e, 0x001e, 0x0178,
-	0x908e, 0x0001, 0x1140, 0x6010, 0x2058, 0xb804, 0x9084, 0x00ff,
-	0x9086, 0x0006, 0x0110, 0x080c, 0x2fda, 0x080c, 0xa7c0, 0x0804,
-	0x9e62, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0904, 0xb9e9,
-	0x9186, 0x0002, 0x1904, 0xb9be, 0x2001, 0x1836, 0x2004, 0xd08c,
-	0x11c8, 0x080c, 0x6fb2, 0x11b0, 0x080c, 0xc212, 0x0138, 0x080c,
-	0x6fd5, 0x1120, 0x080c, 0x6ec2, 0x0804, 0xba46, 0x2001, 0x194e,
-	0x2003, 0x0001, 0x2001, 0x1800, 0x2003, 0x0001, 0x080c, 0x6ee4,
-	0x0804, 0xba46, 0x6010, 0x2058, 0x2001, 0x1836, 0x2004, 0xd0ac,
-	0x1904, 0xba46, 0xb8a0, 0x9084, 0xff80, 0x1904, 0xba46, 0xb840,
-	0x9084, 0x00ff, 0x9005, 0x0190, 0x8001, 0xb842, 0x6017, 0x0000,
-	0x6023, 0x0007, 0x601b, 0x0398, 0x6043, 0x0000, 0x080c, 0x9ddc,
-	0x0128, 0x2b00, 0x6012, 0x6023, 0x0001, 0x0458, 0x00de, 0x00ce,
-	0x6004, 0x908e, 0x0002, 0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086,
-	0x007e, 0x1170, 0x2009, 0x1836, 0x2104, 0xc085, 0x200a, 0x00e6,
-	0x2071, 0x1800, 0x080c, 0x5c64, 0x00ee, 0x080c, 0xa7c0, 0x0030,
-	0x080c, 0xa7c0, 0x080c, 0x2fda, 0x080c, 0xc227, 0x00e6, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x3003, 0x012e, 0x00ee, 0x080c, 0x9e62,
-	0x0005, 0x2001, 0x0002, 0x080c, 0x618f, 0x6003, 0x0001, 0x6007,
-	0x0002, 0x080c, 0x8439, 0x080c, 0x8973, 0x00de, 0x00ce, 0x0c80,
-	0x080c, 0x3003, 0x0804, 0xb96d, 0x00c6, 0x00d6, 0x6104, 0x9186,
-	0x0016, 0x0d38, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005,
-	0x0904, 0xb9be, 0x8001, 0xb842, 0x6003, 0x0001, 0x080c, 0x8439,
-	0x080c, 0x8973, 0x00de, 0x00ce, 0x0898, 0x080c, 0xa7c0, 0x0804,
-	0xb96f, 0x080c, 0xa7fc, 0x0804, 0xb96f, 0x00d6, 0x2c68, 0x6104,
-	0x080c, 0xc18a, 0x00de, 0x0118, 0x080c, 0x9e32, 0x00f0, 0x6004,
-	0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085,
-	0x6003, 0x000b, 0x6023, 0x0002, 0x603c, 0x600a, 0x2001, 0x1958,
-	0x2004, 0x601a, 0x602c, 0x2c08, 0x2060, 0x6024, 0xc0b5, 0x6026,
-	0x2160, 0x080c, 0x83f1, 0x080c, 0x8973, 0x0005, 0x00de, 0x00ce,
-	0x080c, 0xa7c0, 0x080c, 0x2fda, 0x00e6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x3003, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398,
-	0x6043, 0x0000, 0x012e, 0x00ee, 0x0005, 0x080c, 0xa261, 0x1904,
-	0xba15, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0db4, 0x0096,
-	0x00d6, 0x001b, 0x00de, 0x009e, 0x0005, 0xba7d, 0xba7d, 0xba7d,
-	0xba7d, 0xba7d, 0xba7d, 0xba7d, 0xba7d, 0xba7d, 0xb832, 0xba7d,
-	0xb839, 0xba7f, 0xb839, 0xba8c, 0xba7d, 0x080c, 0x0db4, 0x6004,
-	0x9086, 0x008b, 0x0148, 0x6007, 0x008b, 0x6003, 0x000d, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x0005, 0x080c, 0xc206, 0x0118, 0x080c,
-	0xc219, 0x0010, 0x080c, 0xc227, 0x080c, 0xbd00, 0x080c, 0xbb17,
-	0x0570, 0x080c, 0x2fda, 0x080c, 0xbb17, 0x0168, 0x6014, 0x2048,
-	0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed,
-	0xa882, 0x080c, 0x688c, 0x2c68, 0x080c, 0x9ddc, 0x0150, 0x6810,
-	0x6012, 0x080c, 0xbf8c, 0x00c6, 0x2d60, 0x080c, 0x9e62, 0x00ce,
-	0x0008, 0x2d60, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001,
-	0x6003, 0x0001, 0x080c, 0x8439, 0x080c, 0x8973, 0x00c8, 0x080c,
-	0xc206, 0x0138, 0x6034, 0x9086, 0x4000, 0x1118, 0x080c, 0x2fda,
-	0x08d0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118,
-	0x9186, 0x0035, 0x1118, 0x080c, 0x2fda, 0x0868, 0x080c, 0x9e62,
-	0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0db4, 0x0002, 0xbaf7,
-	0xbaf7, 0xbaf9, 0xbaf9, 0xbaf9, 0xbaf7, 0xbaf7, 0x9e62, 0xbaf7,
-	0xbaf7, 0xbaf7, 0xbaf7, 0xbaf7, 0xbaf7, 0xbaf7, 0xbaf7, 0x080c,
-	0x0db4, 0x080c, 0x98ea, 0x6114, 0x0096, 0x2148, 0xa87b, 0x0006,
-	0x080c, 0x688c, 0x009e, 0x0804, 0x9e32, 0x9284, 0x0007, 0x1158,
-	0x9282, 0x1cd0, 0x0240, 0x2001, 0x1819, 0x2004, 0x9202, 0x1218,
-	0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x0096, 0x0028, 0x0096,
-	0x0006, 0x6014, 0x2048, 0x000e, 0x0006, 0x9984, 0xf000, 0x9086,
-	0xf000, 0x0110, 0x080c, 0x1096, 0x000e, 0x009e, 0x0005, 0x00e6,
-	0x00c6, 0x0036, 0x0006, 0x0126, 0x2091, 0x8000, 0x2061, 0x1cd0,
-	0x2071, 0x1800, 0x7350, 0x7070, 0x9302, 0x1640, 0x6020, 0x9206,
-	0x11f8, 0x080c, 0xc212, 0x0180, 0x9286, 0x0001, 0x1168, 0x6004,
-	0x9086, 0x0004, 0x1148, 0x080c, 0x2fda, 0x080c, 0xc227, 0x00c6,
-	0x080c, 0x9e62, 0x00ce, 0x0060, 0x080c, 0xbf06, 0x0148, 0x080c,
-	0xbd1d, 0x1110, 0x080c, 0xa7c0, 0x00c6, 0x080c, 0x9e32, 0x00ce,
-	0x9ce0, 0x0018, 0x7064, 0x9c02, 0x1208, 0x08a0, 0x012e, 0x000e,
-	0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016, 0x9188,
-	0x1000, 0x210c, 0x81ff, 0x0128, 0x2061, 0x1a80, 0x6112, 0x080c,
-	0x2fda, 0x9006, 0x0010, 0x9085, 0x0001, 0x001e, 0x00ce, 0x00ee,
-	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9ddc, 0x01b0,
-	0x6656, 0x2b00, 0x6012, 0x080c, 0x538e, 0x0118, 0x080c, 0xbc44,
-	0x0168, 0x080c, 0xbf8c, 0x6023, 0x0003, 0x2009, 0x004b, 0x080c,
-	0x9eac, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0, 0x080c, 0x9e7f, 0x0560,
-	0x6057, 0x0000, 0x2b00, 0x6012, 0x080c, 0xbf8c, 0x6023, 0x0003,
-	0x0016, 0x080c, 0x8571, 0x0076, 0x903e, 0x080c, 0x8469, 0x2c08,
-	0x080c, 0xd29b, 0x007e, 0x001e, 0xd184, 0x0128, 0x080c, 0x9e32,
-	0x9085, 0x0001, 0x0070, 0x080c, 0x538e, 0x0128, 0xd18c, 0x1170,
-	0x080c, 0xbc44, 0x0148, 0x2009, 0x004c, 0x080c, 0x9eac, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016,
-	0x0c90, 0x2009, 0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6,
-	0x0046, 0x0016, 0x080c, 0x9ddc, 0x2c78, 0x0590, 0x7e56, 0x2b00,
-	0x7812, 0x7823, 0x0003, 0x2021, 0x0005, 0x080c, 0xbc56, 0x9186,
-	0x004d, 0x0118, 0x9186, 0x004e, 0x0148, 0x2001, 0x1951, 0x200c,
-	0xd1fc, 0x0168, 0x2f60, 0x080c, 0x9e32, 0x00d0, 0x2001, 0x1950,
-	0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0x9e32, 0x0088, 0x2f60,
-	0x080c, 0x538e, 0x0138, 0xd18c, 0x1118, 0x04f1, 0x0148, 0x0010,
-	0x2900, 0x7816, 0x001e, 0x0016, 0x080c, 0x9eac, 0x9085, 0x0001,
-	0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046,
-	0x080c, 0x9ddc, 0x2c78, 0x0508, 0x7e56, 0x2b00, 0x7812, 0x7823,
-	0x0003, 0x0096, 0x2021, 0x0004, 0x0489, 0x009e, 0x2001, 0x194f,
-	0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0x9e32, 0x0060, 0x2f60,
-	0x080c, 0x538e, 0x0120, 0xd18c, 0x1160, 0x0071, 0x0130, 0x2009,
-	0x0052, 0x080c, 0x9eac, 0x9085, 0x0001, 0x004e, 0x00ce, 0x00fe,
-	0x0005, 0x2900, 0x7816, 0x0c98, 0x00c6, 0x080c, 0x4879, 0x00ce,
-	0x1120, 0x080c, 0x9e32, 0x9006, 0x0005, 0xa867, 0x0000, 0xa86b,
-	0x8000, 0x2900, 0x6016, 0x9085, 0x0001, 0x0005, 0x0096, 0x0076,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x6372, 0x0158, 0x2001, 0xbc5b,
-	0x0006, 0x900e, 0x2400, 0x080c, 0x6ac6, 0x080c, 0x688c, 0x000e,
-	0x0807, 0x2418, 0x080c, 0x8808, 0xbaa0, 0x0086, 0x2041, 0x0001,
-	0x2039, 0x0001, 0x2608, 0x080c, 0x8589, 0x008e, 0x080c, 0x8469,
-	0x2f08, 0x2648, 0x080c, 0xd29b, 0xb93c, 0x81ff, 0x090c, 0x865a,
-	0x080c, 0x8973, 0x012e, 0x007e, 0x009e, 0x0005, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x9ddc, 0x0190, 0x660a, 0x2b08, 0x6112,
-	0x080c, 0xbf8c, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x001f,
-	0x080c, 0x9eac, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006,
-	0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9e7f, 0x01b8,
-	0x660a, 0x2b08, 0x6112, 0x080c, 0xbf8c, 0x6023, 0x0008, 0x2900,
-	0x6016, 0x00f6, 0x2c78, 0x080c, 0x1648, 0x00fe, 0x2009, 0x0021,
-	0x080c, 0x9eac, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006,
-	0x0cd8, 0x2009, 0x003d, 0x00c6, 0x0126, 0x0016, 0x2091, 0x8000,
-	0x080c, 0x9ddc, 0x0198, 0x660a, 0x2b08, 0x6112, 0x080c, 0xbf8c,
-	0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x0016, 0x080c, 0x9eac,
-	0x9085, 0x0001, 0x001e, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd0,
-	0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9e7f, 0x0188, 0x2b08,
-	0x6112, 0x080c, 0xbf8c, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009,
-	0x0000, 0x080c, 0x9eac, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
-	0x9006, 0x0cd8, 0x2009, 0x0044, 0x0830, 0x2009, 0x0049, 0x0818,
-	0x0026, 0x00b6, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211,
-	0xba3e, 0x00be, 0x002e, 0x0005, 0x0006, 0x0016, 0x6004, 0x908e,
-	0x0002, 0x0140, 0x908e, 0x0003, 0x0128, 0x908e, 0x0004, 0x0110,
-	0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0096, 0x6020,
-	0x9086, 0x0004, 0x0190, 0x6014, 0x904d, 0x080c, 0xbb17, 0x0168,
-	0xa864, 0x9086, 0x0139, 0x0158, 0x6020, 0x9086, 0x0003, 0x0128,
-	0xa868, 0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e,
-	0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9e7f,
-	0x0198, 0x2b08, 0x6112, 0x080c, 0xbf8c, 0x6023, 0x0001, 0x2900,
-	0x6016, 0x080c, 0x2fda, 0x2009, 0x0028, 0x080c, 0x9eac, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015,
-	0x11a8, 0x2011, 0x1823, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6,
-	0x080c, 0xaa49, 0x00be, 0x080c, 0xac88, 0x6003, 0x0001, 0x6007,
-	0x0029, 0x080c, 0x8439, 0x080c, 0x8973, 0x0078, 0x6014, 0x0096,
-	0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c,
-	0xc14b, 0x080c, 0xa7c0, 0x080c, 0x9e32, 0x0005, 0x0096, 0x6014,
-	0x904d, 0x090c, 0x0db4, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897,
-	0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x688c, 0x012e, 0x009e, 0x080c, 0x9e32, 0x0c30, 0x0096,
-	0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x618f, 0x00e8,
-	0x9186, 0x0015, 0x1510, 0x2011, 0x1823, 0x2204, 0x9086, 0x0014,
-	0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x62d9, 0x00be, 0x080c,
-	0xad59, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005,
-	0x0160, 0x2001, 0x0006, 0x080c, 0x618f, 0x6014, 0x2048, 0xa868,
-	0xd0fc, 0x0170, 0x080c, 0xa235, 0x0048, 0x6014, 0x2048, 0xa868,
-	0xd0fc, 0x0528, 0x080c, 0xa7c0, 0x080c, 0x9e32, 0x009e, 0x0005,
-	0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0db4, 0xa87b, 0x0000,
-	0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x645e, 0x1108,
-	0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x688c, 0x012e, 0x080c, 0x9e32, 0x08f8, 0x6014,
-	0x904d, 0x090c, 0x0db4, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897,
-	0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x688c, 0x012e, 0x080c, 0x9e32, 0x0840, 0xa878, 0x9086,
-	0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005,
-	0x6043, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050,
-	0x080c, 0x83f1, 0x080c, 0x8973, 0x0005, 0x00c6, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0120, 0x6020, 0x9084, 0x000f,
-	0x0013, 0x00ce, 0x0005, 0xb832, 0xbe3c, 0xbe3c, 0xbe3f, 0xd579,
-	0xd594, 0xd597, 0xb832, 0xb832, 0xb832, 0xb832, 0xb832, 0xb832,
-	0xb832, 0xb832, 0x080c, 0x0db4, 0xa001, 0xa001, 0x0005, 0x0096,
-	0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010,
-	0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x0550, 0x2001, 0x1833, 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78,
-	0x080c, 0x9ddc, 0x0508, 0x7810, 0x6012, 0x080c, 0xbf8c, 0x7820,
-	0x9086, 0x0003, 0x0128, 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020,
-	0x7808, 0x603e, 0x2f00, 0x603a, 0x602e, 0x6023, 0x0001, 0x6007,
-	0x0035, 0x6003, 0x0001, 0x7954, 0x6156, 0x080c, 0x83f1, 0x080c,
-	0x8973, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1959,
-	0x2004, 0x6042, 0x0005, 0x0016, 0x0096, 0x6814, 0x2048, 0xa87c,
-	0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000,
-	0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048,
-	0x080c, 0x0f9d, 0x6830, 0x6036, 0x908e, 0x0001, 0x0148, 0x6803,
-	0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0,
-	0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085,
-	0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0,
-	0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc,
-	0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112,
-	0x6954, 0x6156, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001,
-	0x080c, 0x83f1, 0x080c, 0x8973, 0x009e, 0x001e, 0x0005, 0x6024,
-	0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303,
-	0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a,
-	0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402,
-	0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024,
-	0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a,
-	0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016,
-	0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e,
-	0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158,
-	0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b,
-	0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016,
-	0x0026, 0x0036, 0x00e6, 0x2001, 0x1953, 0x200c, 0x8000, 0x2014,
-	0x2001, 0x0032, 0x080c, 0x8270, 0x2001, 0x1957, 0x82ff, 0x1110,
-	0x2011, 0x0014, 0x2202, 0x2001, 0x1955, 0x200c, 0x8000, 0x2014,
-	0x2071, 0x193d, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x8270,
-	0x2001, 0x1958, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001,
-	0x1959, 0x9288, 0x000a, 0x2102, 0x2001, 0x1a61, 0x2102, 0x2001,
-	0x0032, 0x080c, 0x1518, 0x080c, 0x6543, 0x00ee, 0x003e, 0x002e,
-	0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x00e6, 0x2001, 0x1957,
-	0x2003, 0x0028, 0x2001, 0x1958, 0x2003, 0x0014, 0x2071, 0x193d,
-	0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0x1959, 0x2009, 0x001e,
-	0x2102, 0x2001, 0x1a61, 0x2102, 0x2001, 0x0032, 0x080c, 0x1518,
-	0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6058, 0x904d, 0x0110,
-	0x080c, 0x101d, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x9ddc, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0x9eac, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6,
-	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1500, 0x708c, 0x9086,
-	0x0018, 0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78,
-	0x080c, 0x8b63, 0x01d8, 0x7078, 0xaa50, 0x9206, 0x1160, 0x707c,
-	0xaa54, 0x9206, 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be,
-	0x900e, 0x080c, 0x3023, 0x080c, 0xa235, 0x0020, 0x080c, 0xa7c0,
-	0x080c, 0x9e32, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c, 0xaa54,
-	0x9206, 0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x9ddc, 0x0188, 0x2b08, 0x6112, 0x080c, 0xbf8c, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x2009, 0x004d, 0x080c, 0x9eac, 0x9085, 0x0001,
+	0x9284, 0x0300, 0x0904, 0xb155, 0x080c, 0x0feb, 0x090c, 0x0db4,
+	0x2900, 0xb07a, 0xb77c, 0xc7cd, 0xb77e, 0xa867, 0x0103, 0xb068,
+	0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872, 0xae76, 0x968c, 0x0c00,
+	0x0120, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186,
+	0x0002, 0x0180, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060,
+	0xd6dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b,
+	0x0007, 0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084,
+	0xa886, 0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170,
+	0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019,
+	0x0018, 0x2011, 0x0025, 0x080c, 0xb725, 0x003e, 0xd6cc, 0x01e8,
+	0x7154, 0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304,
+	0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xb725, 0x2011, 0x0205,
+	0x2013, 0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020,
+	0xa98a, 0x0c68, 0x2950, 0x080c, 0xb6c4, 0x009e, 0x00ee, 0x00ae,
+	0x007e, 0x0005, 0x00f6, 0x00a6, 0x6003, 0x0003, 0x2079, 0x026c,
+	0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x6014, 0x2050, 0xb436, 0xb33a,
+	0xb646, 0xb54a, 0x00ae, 0x00fe, 0x2c10, 0x080c, 0x1a5e, 0x0804,
+	0x937a, 0x6003, 0x0002, 0x6004, 0x9086, 0x0040, 0x11c8, 0x0096,
+	0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0160, 0x601c, 0xd084, 0x1130,
+	0x00f6, 0x2c00, 0x2078, 0x080c, 0x164a, 0x00fe, 0x6003, 0x0004,
+	0x0010, 0x6003, 0x0002, 0x009e, 0x080c, 0x8861, 0x080c, 0x896d,
+	0x0096, 0x2001, 0x1958, 0x2004, 0x6042, 0x080c, 0x891d, 0x080c,
+	0x8a4a, 0x6114, 0x2148, 0xa97c, 0xd1e4, 0x0904, 0xb1f8, 0xd1cc,
+	0x05a8, 0xa978, 0xa868, 0xd0fc, 0x0538, 0x0016, 0xa87c, 0x0006,
+	0xa880, 0x0006, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0,
+	0x810e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0,
+	0x9080, 0x0019, 0x2098, 0x0156, 0x20a9, 0x0020, 0x4003, 0x015e,
+	0x000e, 0xa882, 0x000e, 0xa87e, 0x001e, 0xa874, 0x0006, 0x2148,
+	0x080c, 0x0f9d, 0x001e, 0x0440, 0x0016, 0x080c, 0x0f9d, 0x009e,
+	0xa974, 0x0016, 0x080c, 0xb715, 0x001e, 0x00f0, 0xa867, 0x0103,
+	0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x0180, 0x9086, 0x0028,
+	0x1118, 0xa87b, 0x001c, 0x0060, 0xd1dc, 0x0118, 0xa87b, 0x0015,
+	0x0038, 0xd1d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000,
+	0x0016, 0x080c, 0x66ac, 0x001e, 0xd1e4, 0x1120, 0x080c, 0x9e42,
+	0x009e, 0x0005, 0x080c, 0xbe2a, 0x0cd8, 0x6004, 0x9086, 0x0040,
+	0x1120, 0x080c, 0x8861, 0x080c, 0x896d, 0x2019, 0x0001, 0x080c,
+	0x96d9, 0x6003, 0x0002, 0x080c, 0xc249, 0x080c, 0x891d, 0x080c,
+	0x8a4a, 0x0005, 0x6004, 0x9086, 0x0040, 0x1120, 0x080c, 0x8861,
+	0x080c, 0x896d, 0x2019, 0x0001, 0x080c, 0x96d9, 0x080c, 0x891d,
+	0x080c, 0x2fdc, 0x080c, 0xc241, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xbb2c, 0x0150, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000,
+	0x080c, 0x6891, 0x080c, 0xbd15, 0x009e, 0x080c, 0x9e42, 0x080c,
+	0x8a4a, 0x0005, 0xa87b, 0x0015, 0xd1fc, 0x0180, 0xa87b, 0x0007,
+	0x8002, 0x8000, 0x810a, 0x9189, 0x0000, 0x0006, 0x0016, 0x2009,
+	0x1a49, 0x2104, 0x8000, 0x200a, 0x001e, 0x000e, 0xa992, 0xa88e,
+	0x0005, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
+	0x0005, 0xb26d, 0xb26d, 0xb26d, 0xb26d, 0xb26d, 0xb26f, 0xb26d,
+	0xb26d, 0xb315, 0xb26d, 0xb26d, 0xb26d, 0xb26d, 0xb26d, 0xb26d,
+	0xb26d, 0xb26d, 0xb26d, 0xb26d, 0xb446, 0x080c, 0x0db4, 0x0076,
+	0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, 0x2150, 0x7644,
+	0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210, 0x00b6,
+	0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff,
+	0x0904, 0xb30e, 0x9694, 0xff00, 0x9284, 0x0c00, 0x0120, 0x7048,
+	0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904, 0xb30e, 0x9686,
+	0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4, 0xb676, 0x0c38,
+	0x080c, 0x0feb, 0x090c, 0x0db4, 0x2900, 0xb07a, 0xb77c, 0x97bd,
+	0x0200, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e,
+	0xb070, 0xa872, 0x7044, 0x9084, 0xf000, 0x9635, 0xae76, 0x968c,
+	0x0c00, 0x0120, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff,
+	0x9186, 0x0002, 0x0180, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c,
+	0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4, 0x0118,
+	0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882,
+	0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff,
+	0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308,
+	0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xb725, 0x003e, 0xd6cc,
+	0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260,
+	0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xb725, 0x2011,
+	0x0205, 0x2013, 0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009,
+	0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c, 0xb6c4, 0x080c, 0x18ed,
+	0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x2001, 0x1958, 0x2004,
+	0x6042, 0x0096, 0x6114, 0x2148, 0xa83c, 0xa940, 0x9105, 0x1118,
+	0xa87c, 0xc0dc, 0xa87e, 0x6003, 0x0002, 0xa97c, 0xd1e4, 0x0904,
+	0xb441, 0x6043, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
+	0xd0bc, 0x1500, 0xd1cc, 0x0904, 0xb410, 0xa978, 0xa868, 0xd0fc,
+	0x0904, 0xb3d1, 0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0x00a6,
+	0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x0904, 0xb39f,
+	0x9086, 0x0028, 0x1904, 0xb38b, 0xa87b, 0x001c, 0xb07b, 0x001c,
+	0x0804, 0xb3a7, 0x6024, 0xd0f4, 0x11d0, 0xa838, 0xaa34, 0x9205,
+	0x09c8, 0xa838, 0xaa90, 0x9206, 0x1120, 0xa88c, 0xaa34, 0x9206,
+	0x0988, 0x6024, 0xd0d4, 0x1148, 0xa9ac, 0xa834, 0x9102, 0x603a,
+	0xa9b0, 0xa838, 0x9103, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x6010,
+	0x00b6, 0x2058, 0xb83c, 0x8000, 0xb83e, 0x00be, 0x9006, 0xa876,
+	0xa892, 0xa88e, 0xa87c, 0xc0e4, 0xa87e, 0xd0cc, 0x0140, 0xc0cc,
+	0xa87e, 0x0096, 0xa878, 0x2048, 0x080c, 0x0f9d, 0x009e, 0x080c,
+	0xbe64, 0x0804, 0xb441, 0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b,
+	0x0015, 0x080c, 0xc0f4, 0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078,
+	0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c,
+	0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xb23a, 0xa87c,
+	0xb07e, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0019, 0x20a0, 0x20a9, 0x0020, 0x8a06, 0x8006, 0x8007,
+	0x9094, 0x003f, 0x22e0, 0x9084, 0xffc0, 0x9080, 0x0019, 0x2098,
+	0x4003, 0x00ae, 0x000e, 0xa882, 0x000e, 0xa87e, 0x080c, 0xc1d1,
+	0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0f9d, 0x001e, 0x0804,
+	0xb43d, 0x0016, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6,
+	0x0002, 0x01e0, 0x9086, 0x0028, 0x1128, 0xa87b, 0x001c, 0xb07b,
+	0x001c, 0x00e0, 0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015,
+	0x080c, 0xc0f4, 0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4,
+	0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac,
+	0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xb23a, 0xa890, 0xb092,
+	0xa88c, 0xb08e, 0xa87c, 0xb07e, 0x00ae, 0x080c, 0x0f9d, 0x009e,
+	0x080c, 0xc1d1, 0xa974, 0x0016, 0x080c, 0xb715, 0x001e, 0x0468,
+	0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01b0,
+	0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00d0, 0xd1dc, 0x0148,
+	0xa87b, 0x0015, 0x080c, 0xc0f4, 0x0118, 0xa974, 0xc1dc, 0xa976,
+	0x0078, 0xd1d4, 0x0118, 0xa87b, 0x0007, 0x0050, 0xa87b, 0x0000,
+	0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xb23a,
+	0xa974, 0x0016, 0x080c, 0x66ac, 0x001e, 0xd1e4, 0x1120, 0x080c,
+	0x9e42, 0x009e, 0x0005, 0x080c, 0xbe2a, 0x0cd8, 0x6114, 0x0096,
+	0x2148, 0xa97c, 0xd1e4, 0x190c, 0x18fb, 0x009e, 0x0005, 0x080c,
+	0x8861, 0x0010, 0x080c, 0x891d, 0x080c, 0xbb2c, 0x01f0, 0x0096,
+	0x6114, 0x2148, 0x080c, 0xbd32, 0x1118, 0x080c, 0xa7d1, 0x00a0,
+	0xa867, 0x0103, 0x2009, 0x180c, 0x210c, 0xd18c, 0x11b8, 0xd184,
+	0x1190, 0x6108, 0xa97a, 0x918e, 0x0029, 0x1110, 0x080c, 0xd7f4,
+	0xa877, 0x0000, 0x080c, 0x6891, 0x009e, 0x080c, 0x9e42, 0x080c,
+	0x896d, 0x0804, 0x8a4a, 0xa87b, 0x0004, 0x0c90, 0xa87b, 0x0004,
+	0x0c78, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
+	0x0005, 0xb49d, 0xb49d, 0xb49d, 0xb49d, 0xb49d, 0xb49f, 0xb49d,
+	0xb49d, 0xb49d, 0xb49d, 0xb49d, 0xb49d, 0xb49d, 0xb49d, 0xb49d,
+	0xb49d, 0xb49d, 0xb49d, 0xb49d, 0xb49d, 0x080c, 0x0db4, 0x080c,
+	0x5397, 0x01f8, 0x6014, 0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4,
+	0x0118, 0x7264, 0x9294, 0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b,
+	0x0000, 0xa864, 0x9086, 0x0139, 0x0128, 0xa867, 0x0103, 0xa976,
+	0xaa96, 0x0030, 0xa897, 0x4000, 0xa99a, 0xaa9e, 0x080c, 0x6891,
+	0x009e, 0x0804, 0x9e42, 0x9182, 0x0085, 0x0002, 0xb4d5, 0xb4d3,
+	0xb4d3, 0xb4e1, 0xb4d3, 0xb4d3, 0xb4d3, 0xb4d3, 0xb4d3, 0xb4d3,
+	0xb4d3, 0xb4d3, 0xb4d3, 0x080c, 0x0db4, 0x6003, 0x0001, 0x6106,
+	0x080c, 0x83da, 0x0126, 0x2091, 0x8000, 0x080c, 0x896d, 0x012e,
+	0x0005, 0x0026, 0x0056, 0x00d6, 0x00e6, 0x2071, 0x0260, 0x7224,
+	0x6216, 0x7220, 0x080c, 0xbb1a, 0x01a0, 0x2268, 0x6800, 0x9086,
+	0x0000, 0x0178, 0x6010, 0x6d10, 0x952e, 0x1158, 0x00c6, 0x2d60,
+	0x080c, 0xb750, 0x00ce, 0x0128, 0x6803, 0x0002, 0x6007, 0x0086,
+	0x0010, 0x6007, 0x0087, 0x6003, 0x0001, 0x080c, 0x83da, 0x080c,
+	0x896d, 0x9280, 0x0004, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
+	0x0140, 0x6824, 0xd0ec, 0x0128, 0x00c6, 0x2260, 0x080c, 0xbe64,
+	0x00ce, 0x00ee, 0x00de, 0x005e, 0x002e, 0x0005, 0x9186, 0x0013,
+	0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0db4, 0x908a, 0x0092,
+	0x1a0c, 0x0db4, 0x9082, 0x0085, 0x00e2, 0x9186, 0x0027, 0x0120,
+	0x9186, 0x0014, 0x190c, 0x0db4, 0x080c, 0x8861, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xbb2c, 0x0140, 0xa867, 0x0103, 0xa877, 0x0000,
+	0xa87b, 0x0029, 0x080c, 0x6891, 0x009e, 0x080c, 0x9e72, 0x0804,
+	0x896d, 0xb556, 0xb558, 0xb558, 0xb556, 0xb556, 0xb556, 0xb556,
+	0xb556, 0xb556, 0xb556, 0xb556, 0xb556, 0xb556, 0x080c, 0x0db4,
+	0x080c, 0x8861, 0x080c, 0x9e72, 0x080c, 0x896d, 0x0005, 0x9186,
+	0x0013, 0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x04b8, 0x9186,
+	0x0027, 0x11f8, 0x080c, 0x8861, 0x080c, 0x2fdc, 0x080c, 0xc241,
+	0x0096, 0x6014, 0x2048, 0x080c, 0xbb2c, 0x0150, 0xa867, 0x0103,
+	0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6891, 0x080c, 0xbd15,
+	0x009e, 0x080c, 0x9e42, 0x080c, 0x896d, 0x0005, 0x080c, 0x9ed7,
+	0x0ce0, 0x9186, 0x0014, 0x1dd0, 0x080c, 0x8861, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xbb2c, 0x0d60, 0xa867, 0x0103, 0xa877, 0x0000,
+	0xa87b, 0x0006, 0xa880, 0xc0ec, 0xa882, 0x08f0, 0x0002, 0xb5ae,
+	0xb5ac, 0xb5ac, 0xb5ac, 0xb5ac, 0xb5ac, 0xb5c6, 0xb5ac, 0xb5ac,
+	0xb5ac, 0xb5ac, 0xb5ac, 0xb5ac, 0x080c, 0x0db4, 0x080c, 0x8861,
+	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186,
+	0x0035, 0x1118, 0x2001, 0x1956, 0x0010, 0x2001, 0x1957, 0x2004,
+	0x601a, 0x6003, 0x000c, 0x080c, 0x896d, 0x0005, 0x080c, 0x8861,
+	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186,
+	0x0035, 0x1118, 0x2001, 0x1956, 0x0010, 0x2001, 0x1957, 0x2004,
+	0x601a, 0x6003, 0x000e, 0x080c, 0x896d, 0x0005, 0x9182, 0x0092,
+	0x1220, 0x9182, 0x0085, 0x0208, 0x0012, 0x0804, 0x9ed7, 0xb5f4,
+	0xb5f4, 0xb5f4, 0xb5f4, 0xb5f6, 0xb643, 0xb5f4, 0xb5f4, 0xb5f4,
+	0xb5f4, 0xb5f4, 0xb5f4, 0xb5f4, 0x080c, 0x0db4, 0x0096, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c,
+	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
+	0x009e, 0x0804, 0xb657, 0x080c, 0xbb2c, 0x1118, 0x080c, 0xbd15,
+	0x0068, 0x6014, 0x2048, 0xa87c, 0xd0e4, 0x1110, 0x080c, 0xbd15,
+	0xa867, 0x0103, 0x080c, 0xc20c, 0x080c, 0x6891, 0x00d6, 0x2c68,
+	0x080c, 0x9dec, 0x01d0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b,
+	0xffff, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c,
+	0x613e, 0x6910, 0x6112, 0x080c, 0xbfa6, 0x6954, 0x6156, 0x6023,
+	0x0001, 0x080c, 0x83da, 0x080c, 0x896d, 0x2d60, 0x00de, 0x080c,
+	0x9e42, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
+	0xd0bc, 0x05a0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035,
+	0x0130, 0x9186, 0x001e, 0x0118, 0x9186, 0x0039, 0x1538, 0x00d6,
+	0x2c68, 0x080c, 0xc1a4, 0x11f0, 0x080c, 0x9dec, 0x01d8, 0x6106,
+	0x6003, 0x0001, 0x6023, 0x0001, 0x6910, 0x6112, 0x692c, 0x612e,
+	0x6930, 0x6132, 0x6934, 0x918c, 0x00ff, 0x6136, 0x6938, 0x613a,
+	0x693c, 0x613e, 0x6954, 0x6156, 0x080c, 0xbfa6, 0x080c, 0x83da,
+	0x080c, 0x896d, 0x2d60, 0x00de, 0x0804, 0x9e42, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xbb2c, 0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4,
+	0x0128, 0xc0ec, 0xa882, 0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118,
+	0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c, 0xbe26, 0xa877,
+	0x0000, 0x080c, 0x6891, 0x080c, 0xbd15, 0x009e, 0x0804, 0x9e42,
+	0x0016, 0x0096, 0x6014, 0x2048, 0x080c, 0xbb2c, 0x0140, 0xa867,
+	0x0103, 0xa87b, 0x0028, 0xa877, 0x0000, 0x080c, 0x6891, 0x009e,
+	0x001e, 0x9186, 0x0013, 0x0148, 0x9186, 0x0014, 0x0130, 0x9186,
+	0x0027, 0x0118, 0x080c, 0x9ed7, 0x0030, 0x080c, 0x8861, 0x080c,
+	0x9e72, 0x080c, 0x896d, 0x0005, 0x0056, 0x0066, 0x0096, 0x00a6,
+	0x2029, 0x0001, 0x9182, 0x0101, 0x1208, 0x0010, 0x2009, 0x0100,
+	0x2130, 0x8304, 0x9098, 0x0018, 0x2009, 0x0020, 0x2011, 0x0029,
+	0x080c, 0xb725, 0x96b2, 0x0020, 0xb004, 0x904d, 0x0110, 0x080c,
+	0x0f9d, 0x080c, 0x0feb, 0x0520, 0x8528, 0xa867, 0x0110, 0xa86b,
+	0x0000, 0x2920, 0xb406, 0x968a, 0x003d, 0x1228, 0x2608, 0x2011,
+	0x001b, 0x0499, 0x00a8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950,
+	0x2011, 0x001b, 0x0451, 0x0c28, 0x2001, 0x0205, 0x2003, 0x0000,
+	0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x95ac, 0x0000, 0x0048,
+	0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003,
+	0xb566, 0x009e, 0x006e, 0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158,
+	0xa804, 0x9055, 0x0130, 0xa807, 0x0000, 0x080c, 0x6891, 0x2a48,
+	0x0cb8, 0x080c, 0x6891, 0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200,
+	0x7814, 0x9085, 0x0080, 0x7816, 0xd184, 0x0108, 0x8108, 0x810c,
+	0x20a9, 0x0001, 0xa860, 0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1,
+	0x0000, 0x2300, 0x9e00, 0x2098, 0x4003, 0x8318, 0x9386, 0x0020,
+	0x1148, 0x2018, 0x2300, 0x9e00, 0x2098, 0x7814, 0x8000, 0x9085,
+	0x0080, 0x7816, 0x8109, 0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005,
+	0x0066, 0x0126, 0x2091, 0x8000, 0x2031, 0x0001, 0x6020, 0x9084,
+	0x000f, 0x0083, 0x012e, 0x006e, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x0066, 0x2031, 0x0000, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e,
+	0x012e, 0x0005, 0xb78b, 0xb78b, 0xb786, 0xb7ad, 0xb779, 0xb786,
+	0xb7ad, 0xb786, 0xb779, 0xb779, 0xb786, 0xb786, 0xb786, 0xb779,
+	0xb779, 0x080c, 0x0db4, 0x0036, 0x2019, 0x0010, 0x080c, 0xd106,
+	0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x9006, 0x0005,
+	0x9085, 0x0001, 0x0005, 0x0096, 0x86ff, 0x11d8, 0x6014, 0x2048,
+	0x080c, 0xbb2c, 0x01c0, 0xa864, 0x9086, 0x0139, 0x1128, 0xa87b,
+	0x0005, 0xa883, 0x0000, 0x0028, 0x900e, 0x2001, 0x0005, 0x080c,
+	0x6abf, 0x080c, 0xbe26, 0x080c, 0x6884, 0x080c, 0x9e72, 0x9085,
+	0x0001, 0x009e, 0x0005, 0x9006, 0x0ce0, 0x6000, 0x908a, 0x0016,
+	0x1a0c, 0x0db4, 0x0002, 0xb7c3, 0xb7f1, 0xb7c5, 0xb812, 0xb7ec,
+	0xb7c3, 0xb786, 0xb78b, 0xb78b, 0xb786, 0xb786, 0xb786, 0xb786,
+	0xb786, 0xb786, 0xb786, 0x080c, 0x0db4, 0x86ff, 0x1510, 0x6020,
+	0x9086, 0x0006, 0x01f0, 0x0096, 0x6014, 0x2048, 0x080c, 0xbb2c,
+	0x0158, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c,
+	0x0f9d, 0x009e, 0x080c, 0xbe26, 0x009e, 0x080c, 0xc1e6, 0x6007,
+	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x83da, 0x080c,
+	0x896d, 0x9085, 0x0001, 0x0005, 0x0066, 0x080c, 0x190f, 0x006e,
+	0x08a0, 0x00e6, 0x2071, 0x19b7, 0x7024, 0x9c06, 0x1120, 0x080c,
+	0x9663, 0x00ee, 0x0850, 0x6020, 0x9084, 0x000f, 0x9086, 0x0006,
+	0x1150, 0x0086, 0x0096, 0x2049, 0x0001, 0x2c40, 0x080c, 0x97bb,
+	0x009e, 0x008e, 0x0010, 0x080c, 0x9560, 0x00ee, 0x1904, 0xb7c5,
+	0x0804, 0xb786, 0x0036, 0x00e6, 0x2071, 0x19b7, 0x703c, 0x9c06,
+	0x1138, 0x901e, 0x080c, 0x96d9, 0x00ee, 0x003e, 0x0804, 0xb7c5,
+	0x080c, 0x98eb, 0x00ee, 0x003e, 0x1904, 0xb7c5, 0x0804, 0xb786,
+	0x00c6, 0x6020, 0x9084, 0x000f, 0x0013, 0x00ce, 0x0005, 0xb845,
+	0xb910, 0xba77, 0xb84f, 0x9e72, 0xb845, 0xd0f8, 0xc24e, 0xb910,
+	0xb83e, 0xbaf6, 0xb83e, 0xb83e, 0xb83e, 0xb83e, 0x080c, 0x0db4,
+	0x080c, 0xbd32, 0x1110, 0x080c, 0xa7d1, 0x0005, 0x080c, 0x8861,
+	0x080c, 0x896d, 0x0804, 0x9e42, 0x601b, 0x0001, 0x0005, 0x080c,
+	0xbb2c, 0x0130, 0x6014, 0x0096, 0x2048, 0x2c00, 0xa896, 0x009e,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0db4, 0x0002, 0xb86e, 0xb870,
+	0xb894, 0xb8a8, 0xb8ce, 0xb86e, 0xb845, 0xb845, 0xb845, 0xb8a8,
+	0xb8a8, 0xb86e, 0xb86e, 0xb86e, 0xb86e, 0xb8b2, 0x080c, 0x0db4,
+	0x00e6, 0x6014, 0x0096, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e,
+	0x2071, 0x19b7, 0x7024, 0x9c06, 0x01a0, 0x080c, 0x9560, 0x080c,
+	0xc1e6, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2001,
+	0x1957, 0x2004, 0x601a, 0x080c, 0x83da, 0x080c, 0x896d, 0x00ee,
+	0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880,
+	0xc0b5, 0xa882, 0x009e, 0x080c, 0xc1e6, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x080c, 0x83da, 0x080c, 0x896d, 0x0005,
+	0x0096, 0x601b, 0x0001, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882,
+	0x009e, 0x0005, 0x080c, 0x5397, 0x01b8, 0x6014, 0x0096, 0x904d,
+	0x0190, 0xa864, 0xa867, 0x0103, 0xa87b, 0x0006, 0x9086, 0x0139,
+	0x1150, 0xa867, 0x0139, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa89b,
+	0x0004, 0x080c, 0x6891, 0x009e, 0x0804, 0x9e42, 0x6014, 0x0096,
+	0x904d, 0x05c8, 0xa97c, 0xd1e4, 0x05b0, 0x2001, 0x180f, 0x2004,
+	0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884, 0x009e, 0x8003, 0x800b,
+	0x810b, 0x9108, 0x611a, 0x2001, 0x0030, 0x2c08, 0x080c, 0x151a,
+	0x2001, 0x030c, 0x2004, 0x9086, 0x0041, 0x11a0, 0x6014, 0x0096,
+	0x904d, 0x090c, 0x0db4, 0xa880, 0xd0f4, 0x1130, 0xc0f5, 0xa882,
+	0x009e, 0x601b, 0x0002, 0x0070, 0x009e, 0x2001, 0x0037, 0x2c08,
+	0x080c, 0x151a, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048,
+	0x080c, 0x9ebc, 0x0005, 0x009e, 0x080c, 0x190f, 0x0804, 0xb894,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0db4, 0x000b, 0x0005, 0xb927,
+	0xb84c, 0xb929, 0xb927, 0xb929, 0xb929, 0xb846, 0xb927, 0xb840,
+	0xb840, 0xb927, 0xb927, 0xb927, 0xb927, 0xb927, 0xb927, 0x080c,
+	0x0db4, 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084, 0x00ff, 0x00be,
+	0x908a, 0x000c, 0x1a0c, 0x0db4, 0x00b6, 0x0013, 0x00be, 0x0005,
+	0xb944, 0xba11, 0xb946, 0xb986, 0xb946, 0xb986, 0xb946, 0xb954,
+	0xb944, 0xb986, 0xb944, 0xb975, 0x080c, 0x0db4, 0x6004, 0x908e,
+	0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e, 0x0002, 0x0590,
+	0x908e, 0x0052, 0x0904, 0xba0d, 0x6004, 0x080c, 0xbd32, 0x0904,
+	0xba2a, 0x908e, 0x0004, 0x1110, 0x080c, 0x3005, 0x908e, 0x0021,
+	0x0904, 0xba2e, 0x908e, 0x0022, 0x0904, 0xba72, 0x908e, 0x003d,
+	0x0904, 0xba2e, 0x908e, 0x0039, 0x0904, 0xba32, 0x908e, 0x0035,
+	0x0904, 0xba32, 0x908e, 0x001e, 0x0178, 0x908e, 0x0001, 0x1140,
+	0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0110,
+	0x080c, 0x2fdc, 0x080c, 0xa7d1, 0x0804, 0x9e72, 0x00c6, 0x00d6,
+	0x6104, 0x9186, 0x0016, 0x0904, 0xb9fe, 0x9186, 0x0002, 0x1904,
+	0xb9d3, 0x2001, 0x1836, 0x2004, 0xd08c, 0x11c8, 0x080c, 0x6f9b,
+	0x11b0, 0x080c, 0xc22c, 0x0138, 0x080c, 0x6fbe, 0x1120, 0x080c,
+	0x6eab, 0x0804, 0xba5b, 0x2001, 0x194d, 0x2003, 0x0001, 0x2001,
+	0x1800, 0x2003, 0x0001, 0x080c, 0x6ecd, 0x0804, 0xba5b, 0x6010,
+	0x2058, 0x2001, 0x1836, 0x2004, 0xd0ac, 0x1904, 0xba5b, 0xb8a0,
+	0x9084, 0xff80, 0x1904, 0xba5b, 0xb840, 0x9084, 0x00ff, 0x9005,
+	0x0190, 0x8001, 0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b,
+	0x0398, 0x6043, 0x0000, 0x080c, 0x9dec, 0x0128, 0x2b00, 0x6012,
+	0x6023, 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002,
+	0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009,
+	0x1836, 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c,
+	0x5c6d, 0x00ee, 0x080c, 0xa7d1, 0x0030, 0x080c, 0xa7d1, 0x080c,
+	0x2fdc, 0x080c, 0xc241, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x3005, 0x012e, 0x00ee, 0x080c, 0x9e72, 0x0005, 0x2001, 0x0002,
+	0x080c, 0x6198, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8422,
+	0x080c, 0x896d, 0x00de, 0x00ce, 0x0c80, 0x080c, 0x3005, 0x0804,
+	0xb982, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010,
+	0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904, 0xb9d3, 0x8001,
+	0xb842, 0x6003, 0x0001, 0x080c, 0x8422, 0x080c, 0x896d, 0x00de,
+	0x00ce, 0x0898, 0x080c, 0xa7d1, 0x0804, 0xb984, 0x080c, 0xa80d,
+	0x0804, 0xb984, 0x00d6, 0x2c68, 0x6104, 0x080c, 0xc1a4, 0x00de,
+	0x0118, 0x080c, 0x9e42, 0x00f0, 0x6004, 0x8007, 0x6134, 0x918c,
+	0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
+	0x0002, 0x603c, 0x600a, 0x2001, 0x1957, 0x2004, 0x601a, 0x602c,
+	0x2c08, 0x2060, 0x6024, 0xc0b5, 0x6026, 0x2160, 0x080c, 0x83da,
+	0x080c, 0x896d, 0x0005, 0x00de, 0x00ce, 0x080c, 0xa7d1, 0x080c,
+	0x2fdc, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x3005, 0x6017,
+	0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x6043, 0x0000, 0x012e,
+	0x00ee, 0x0005, 0x080c, 0xa272, 0x1904, 0xba2a, 0x0005, 0x6000,
+	0x908a, 0x0016, 0x1a0c, 0x0db4, 0x0096, 0x00d6, 0x001b, 0x00de,
+	0x009e, 0x0005, 0xba92, 0xba92, 0xba92, 0xba92, 0xba92, 0xba92,
+	0xba92, 0xba92, 0xba92, 0xb845, 0xba92, 0xb84c, 0xba94, 0xb84c,
+	0xbaa1, 0xba92, 0x080c, 0x0db4, 0x6004, 0x9086, 0x008b, 0x0148,
+	0x6007, 0x008b, 0x6003, 0x000d, 0x080c, 0x83da, 0x080c, 0x896d,
+	0x0005, 0x080c, 0xc220, 0x0118, 0x080c, 0xc233, 0x0010, 0x080c,
+	0xc241, 0x080c, 0xbd15, 0x080c, 0xbb2c, 0x0570, 0x080c, 0x2fdc,
+	0x080c, 0xbb2c, 0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b,
+	0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x6891,
+	0x2c68, 0x080c, 0x9dec, 0x0150, 0x6810, 0x6012, 0x080c, 0xbfa6,
+	0x00c6, 0x2d60, 0x080c, 0x9e72, 0x00ce, 0x0008, 0x2d60, 0x6017,
+	0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
+	0x8422, 0x080c, 0x896d, 0x00c8, 0x080c, 0xc220, 0x0138, 0x6034,
+	0x9086, 0x4000, 0x1118, 0x080c, 0x2fdc, 0x08d0, 0x6034, 0x908c,
+	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
+	0x080c, 0x2fdc, 0x0868, 0x080c, 0x9e72, 0x0005, 0x6000, 0x908a,
+	0x0016, 0x1a0c, 0x0db4, 0x0002, 0xbb0c, 0xbb0c, 0xbb0e, 0xbb0e,
+	0xbb0e, 0xbb0c, 0xbb0c, 0x9e72, 0xbb0c, 0xbb0c, 0xbb0c, 0xbb0c,
+	0xbb0c, 0xbb0c, 0xbb0c, 0xbb0c, 0x080c, 0x0db4, 0x080c, 0x98eb,
+	0x6114, 0x0096, 0x2148, 0xa87b, 0x0006, 0x080c, 0x6891, 0x009e,
+	0x0804, 0x9e42, 0x9284, 0x0007, 0x1158, 0x9282, 0x1cd0, 0x0240,
+	0x2001, 0x1819, 0x2004, 0x9202, 0x1218, 0x9085, 0x0001, 0x0005,
+	0x9006, 0x0ce8, 0x0096, 0x0028, 0x0096, 0x0006, 0x6014, 0x2048,
+	0x000e, 0x0006, 0x9984, 0xf000, 0x9086, 0xf000, 0x0110, 0x080c,
+	0x1096, 0x000e, 0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006,
+	0x0126, 0x2091, 0x8000, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7350,
+	0x7070, 0x9302, 0x1640, 0x6020, 0x9206, 0x11f8, 0x080c, 0xc22c,
+	0x0180, 0x9286, 0x0001, 0x1168, 0x6004, 0x9086, 0x0004, 0x1148,
+	0x080c, 0x2fdc, 0x080c, 0xc241, 0x00c6, 0x080c, 0x9e72, 0x00ce,
+	0x0060, 0x080c, 0xbf20, 0x0148, 0x080c, 0xbd32, 0x1110, 0x080c,
+	0xa7d1, 0x00c6, 0x080c, 0x9e42, 0x00ce, 0x9ce0, 0x0018, 0x7064,
+	0x9c02, 0x1208, 0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee,
+	0x0005, 0x00e6, 0x00c6, 0x0016, 0x9188, 0x1000, 0x210c, 0x81ff,
+	0x0128, 0x2061, 0x1a7f, 0x6112, 0x080c, 0x2fdc, 0x9006, 0x0010,
+	0x9085, 0x0001, 0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x9dec, 0x01b0, 0x6656, 0x2b00, 0x6012,
+	0x080c, 0x5397, 0x0118, 0x080c, 0xbc59, 0x0168, 0x080c, 0xbfa6,
+	0x6023, 0x0003, 0x2009, 0x004b, 0x080c, 0x9ebc, 0x9085, 0x0001,
 	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x0016, 0x080c, 0x9ddc, 0x0180, 0x2b08, 0x6112, 0x080c,
-	0xbf8c, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0x9eac,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0,
-	0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6,
-	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1568, 0x718c, 0x6014,
-	0x2048, 0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001,
-	0x1971, 0x2003, 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906,
-	0x8006, 0x8007, 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080,
-	0x001b, 0x20a0, 0x2001, 0x1971, 0x0016, 0x200c, 0x080c, 0xc7ce,
-	0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048,
-	0xa867, 0x0103, 0x0010, 0x080c, 0xa7c0, 0x080c, 0x9e32, 0x00fe,
-	0x00ee, 0x009e, 0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015,
-	0x11b8, 0x708c, 0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78,
-	0x080c, 0x8b63, 0x01a8, 0x7078, 0xaa74, 0x9206, 0x1130, 0x707c,
-	0xaa78, 0x9206, 0x1110, 0x080c, 0x2fda, 0x080c, 0xa235, 0x0020,
-	0x080c, 0xa7c0, 0x080c, 0x9e32, 0x00fe, 0x00ee, 0x009e, 0x0005,
-	0x705c, 0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6,
-	0x2071, 0x1800, 0x9186, 0x0015, 0x1550, 0x708c, 0x9086, 0x0004,
-	0x1530, 0x6014, 0x2048, 0x2c78, 0x080c, 0x8b63, 0x05f0, 0x7078,
-	0xaacc, 0x9206, 0x1180, 0x707c, 0xaad0, 0x9206, 0x1160, 0x080c,
-	0x2fda, 0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c,
-	0x533e, 0x001e, 0x0010, 0x080c, 0x512f, 0x080c, 0xbb17, 0x0508,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c,
-	0xbb17, 0x01b8, 0x6014, 0x2048, 0x080c, 0x512f, 0x1d70, 0xa87b,
-	0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126,
-	0x2091, 0x8000, 0xa867, 0x0139, 0x080c, 0x688c, 0x012e, 0x080c,
-	0x9e32, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c, 0xaad0, 0x9206,
-	0x0930, 0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938,
-	0xaa34, 0x2100, 0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c,
-	0x9206, 0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e,
-	0x0005, 0x00b6, 0x00d6, 0x0036, 0x080c, 0xbb17, 0x0904, 0xc147,
-	0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580,
-	0x6310, 0x00c6, 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140,
-	0x080c, 0x645e, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0xaa96, 0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0031, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098,
-	0x080c, 0x0f68, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0,
-	0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f68, 0x00ce, 0x0090,
-	0xaa96, 0x3918, 0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016,
-	0x0110, 0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084,
-	0x00ff, 0xa89e, 0x080c, 0x687f, 0x6017, 0x0000, 0x009e, 0x003e,
-	0x00de, 0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096,
-	0x00f6, 0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096,
-	0x0000, 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x2663,
-	0x2118, 0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d,
-	0x7c3c, 0x2011, 0x8018, 0x080c, 0x48d9, 0x00a8, 0x9096, 0x0001,
-	0x1148, 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c,
-	0xa8aa, 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838,
-	0xa8a6, 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e,
-	0x002e, 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110,
-	0x6a38, 0x0008, 0x6a2c, 0x080c, 0xbb05, 0x01f0, 0x2260, 0x6120,
-	0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206,
-	0x0140, 0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140,
-	0x0020, 0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106,
-	0x001e, 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974,
-	0xd1cc, 0x0188, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8,
-	0x918c, 0x0f00, 0x810f, 0x918e, 0x0001, 0x1128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xb227, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010,
-	0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, 0xbb17, 0x01c8, 0x080c,
-	0xbd00, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096, 0x2048,
-	0xa87c, 0x080c, 0xbd1d, 0x1118, 0x080c, 0xa7c0, 0x0040, 0xa867,
-	0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x688c, 0x009e,
-	0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec,
-	0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b,
-	0x0005, 0x080c, 0xbe0c, 0xa877, 0x0000, 0x0005, 0x2001, 0x1810,
-	0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4,
-	0x000e, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e,
-	0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be,
-	0x2021, 0x0007, 0x080c, 0x4a76, 0x004e, 0x003e, 0x0005, 0x0c51,
-	0x1d81, 0x0005, 0x2001, 0x1957, 0x2004, 0x601a, 0x0005, 0x2001,
-	0x1959, 0x2004, 0x6042, 0x0005, 0x080c, 0x9e32, 0x0804, 0x8973,
-	0x00b6, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0db4, 0x001b,
-	0x006e, 0x00be, 0x0005, 0xc253, 0xc92b, 0xca86, 0xc253, 0xc253,
-	0xc253, 0xc253, 0xc253, 0xc28a, 0xcb08, 0xc253, 0xc253, 0xc253,
-	0xc253, 0xc253, 0xc253, 0x080c, 0x0db4, 0x0066, 0x6000, 0x90b2,
-	0x0016, 0x1a0c, 0x0db4, 0x0013, 0x006e, 0x0005, 0xc26e, 0xd070,
-	0xc26e, 0xc26e, 0xc26e, 0xc26e, 0xc26e, 0xc26e, 0xd01d, 0xd0c4,
-	0xc26e, 0xd6b4, 0xd6ea, 0xd6b4, 0xd6ea, 0xc26e, 0x080c, 0x0db4,
-	0x6000, 0x9082, 0x0016, 0x1a0c, 0x0db4, 0x6000, 0x000a, 0x0005,
-	0xc288, 0xcce5, 0xcdd5, 0xcdf7, 0xceb6, 0xc288, 0xcf94, 0xcf3e,
-	0xcb14, 0xcff3, 0xd008, 0xc288, 0xc288, 0xc288, 0xc288, 0xc288,
-	0x080c, 0x0db4, 0x91b2, 0x0053, 0x1a0c, 0x0db4, 0x2100, 0x91b2,
-	0x0040, 0x1a04, 0xc6cc, 0x0002, 0xc2d4, 0xc4bd, 0xc2d4, 0xc2d4,
-	0xc2d4, 0xc4c6, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4,
-	0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4,
-	0xc2d4, 0xc2d4, 0xc2d4, 0xc2d6, 0xc339, 0xc348, 0xc3ac, 0xc3d7,
-	0xc44f, 0xc4a8, 0xc2d4, 0xc2d4, 0xc4c9, 0xc2d4, 0xc2d4, 0xc4de,
-	0xc4eb, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc56e, 0xc2d4,
-	0xc2d4, 0xc582, 0xc2d4, 0xc2d4, 0xc53d, 0xc2d4, 0xc2d4, 0xc2d4,
-	0xc59a, 0xc2d4, 0xc2d4, 0xc2d4, 0xc617, 0xc2d4, 0xc2d4, 0xc2d4,
-	0xc2d4, 0xc2d4, 0xc2d4, 0xc694, 0x080c, 0x0db4, 0x080c, 0x6520,
-	0x1150, 0x2001, 0x1836, 0x2004, 0xd0cc, 0x1128, 0x9084, 0x0009,
-	0x9086, 0x0008, 0x1140, 0x6007, 0x0009, 0x602f, 0x0009, 0x6017,
-	0x0000, 0x0804, 0xc4b6, 0x080c, 0x6509, 0x00e6, 0x00c6, 0x0036,
-	0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029,
-	0x080c, 0x8571, 0x0076, 0x903e, 0x080c, 0x8469, 0x2c08, 0x080c,
-	0xd29b, 0x007e, 0x001e, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee,
-	0x6610, 0x2658, 0x080c, 0x624d, 0xbe04, 0x9684, 0x00ff, 0x9082,
-	0x0006, 0x1268, 0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0,
-	0x00be, 0x2c08, 0x080c, 0xd862, 0x002e, 0x001e, 0x1178, 0x080c,
-	0xd1ce, 0x1904, 0xc3a4, 0x080c, 0xd16a, 0x1120, 0x6007, 0x0008,
-	0x0804, 0xc4b6, 0x6007, 0x0009, 0x0804, 0xc4b6, 0x080c, 0xd3c5,
-	0x0128, 0x080c, 0xd1ce, 0x0d78, 0x0804, 0xc3a4, 0x6017, 0x1900,
-	0x0c88, 0x080c, 0x30fd, 0x1904, 0xc6c9, 0x6106, 0x080c, 0xd11f,
-	0x6007, 0x0006, 0x0804, 0xc4b6, 0x6007, 0x0007, 0x0804, 0xc4b6,
-	0x080c, 0xd726, 0x1904, 0xc6c9, 0x080c, 0x30fd, 0x1904, 0xc6c9,
-	0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006,
-	0x1220, 0x2001, 0x0001, 0x080c, 0x617b, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0006, 0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4,
-	0x00ff, 0x9686, 0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686,
-	0x0005, 0x0110, 0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034,
-	0x9084, 0x0003, 0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030,
-	0x9084, 0x0003, 0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007,
-	0x00b0, 0x00ee, 0x080c, 0xd231, 0x1190, 0x9686, 0x0006, 0x1140,
-	0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x3023, 0x002e,
-	0x080c, 0x62d9, 0x6007, 0x000a, 0x00de, 0x0804, 0xc4b6, 0x6007,
-	0x000b, 0x00de, 0x0804, 0xc4b6, 0x080c, 0x2fda, 0x080c, 0xc227,
-	0x6007, 0x0001, 0x0804, 0xc4b6, 0x080c, 0xd726, 0x1904, 0xc6c9,
-	0x080c, 0x30fd, 0x1904, 0xc6c9, 0x2071, 0x0260, 0x7034, 0x90b4,
-	0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003,
-	0x1910, 0x6610, 0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026,
-	0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x3023, 0x002e, 0x6007,
-	0x000c, 0x2001, 0x0001, 0x080c, 0xd842, 0x0804, 0xc4b6, 0x080c,
-	0x6520, 0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086,
-	0x0008, 0x1110, 0x0804, 0xc2e3, 0x080c, 0x6509, 0x6610, 0x2658,
-	0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x06c0, 0x1138, 0x0026,
-	0x2001, 0x0006, 0x080c, 0x61bb, 0x002e, 0x0050, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xc3a4,
-	0x080c, 0xd23e, 0x1120, 0x6007, 0x000e, 0x0804, 0xc4b6, 0x0046,
-	0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x2fda, 0x080c, 0xc227,
-	0x004e, 0x0016, 0x9006, 0x2009, 0x1854, 0x210c, 0x0048, 0x2009,
-	0x0029, 0x080c, 0xd52a, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802,
-	0x001e, 0x004e, 0x6007, 0x0001, 0x0804, 0xc4b6, 0x2001, 0x0001,
-	0x080c, 0x617b, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004,
-	0x2019, 0x1805, 0x2011, 0x0270, 0x080c, 0xadf9, 0x003e, 0x002e,
-	0x001e, 0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637, 0x9682,
-	0x0004, 0x0a04, 0xc3a4, 0x9682, 0x0007, 0x0a04, 0xc400, 0x0804,
-	0xc3a4, 0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xc4b6, 0x080c,
-	0x6520, 0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086,
-	0x0008, 0x1110, 0x0804, 0xc2e3, 0x080c, 0x6509, 0x6610, 0x2658,
-	0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x0690, 0x0150, 0x96b4,
-	0xff00, 0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904,
-	0xc3a4, 0x080c, 0xd26c, 0x1130, 0x080c, 0xd16a, 0x1118, 0x6007,
-	0x0010, 0x04e0, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c,
-	0x2fda, 0x080c, 0xc227, 0x004e, 0x0016, 0x9006, 0x2009, 0x1854,
-	0x210c, 0x0048, 0x2009, 0x0029, 0x080c, 0xd52a, 0x6010, 0x2058,
-	0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0,
-	0x080c, 0xd3c5, 0x0140, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006,
-	0x0980, 0x0804, 0xc3a4, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070,
-	0x080c, 0x30fd, 0x1904, 0xc6c9, 0x080c, 0xd726, 0x1904, 0xc6c9,
-	0x080c, 0xc869, 0x1904, 0xc3a4, 0x6007, 0x0012, 0x6003, 0x0001,
-	0x080c, 0x8439, 0x080c, 0x8973, 0x0005, 0x6007, 0x0001, 0x6003,
-	0x0001, 0x080c, 0x8439, 0x080c, 0x8973, 0x0cb0, 0x6007, 0x0005,
-	0x0c68, 0x080c, 0xd726, 0x1904, 0xc6c9, 0x080c, 0x30fd, 0x1904,
-	0xc6c9, 0x080c, 0xc869, 0x1904, 0xc3a4, 0x6007, 0x0020, 0x6003,
-	0x0001, 0x080c, 0x8439, 0x080c, 0x8973, 0x0005, 0x080c, 0x30fd,
-	0x1904, 0xc6c9, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x8439,
-	0x080c, 0x8973, 0x0005, 0x080c, 0xd726, 0x1904, 0xc6c9, 0x080c,
-	0x30fd, 0x1904, 0xc6c9, 0x080c, 0xc869, 0x1904, 0xc3a4, 0x0016,
-	0x0026, 0x00e6, 0x2071, 0x0260, 0x7244, 0x9286, 0xffff, 0x0180,
-	0x2c08, 0x080c, 0xbb05, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206,
-	0x1188, 0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050,
-	0x7240, 0x2c08, 0x9006, 0x080c, 0xd4fc, 0x1180, 0x7244, 0x9286,
-	0xffff, 0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214,
-	0x9296, 0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086,
-	0x0007, 0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0x9e32,
-	0x2160, 0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x8439, 0x080c,
-	0x8973, 0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c,
-	0x617b, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019,
-	0x1805, 0x2011, 0x0276, 0x080c, 0xadf9, 0x003e, 0x002e, 0x001e,
-	0x015e, 0x0120, 0x6007, 0x0031, 0x0804, 0xc4b6, 0x080c, 0xaa61,
-	0x080c, 0x6fb2, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x6fcc,
-	0x1138, 0x080c, 0x7296, 0x080c, 0x5cd1, 0x080c, 0x6ee4, 0x0010,
-	0x080c, 0x6f8a, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x30fd,
-	0x1904, 0xc6c9, 0x080c, 0xc869, 0x1904, 0xc3a4, 0x6106, 0x080c,
-	0xc885, 0x1120, 0x6007, 0x002b, 0x0804, 0xc4b6, 0x6007, 0x002c,
-	0x0804, 0xc4b6, 0x080c, 0xd726, 0x1904, 0xc6c9, 0x080c, 0x30fd,
-	0x1904, 0xc6c9, 0x080c, 0xc869, 0x1904, 0xc3a4, 0x6106, 0x080c,
-	0xc88a, 0x1120, 0x6007, 0x002e, 0x0804, 0xc4b6, 0x6007, 0x002f,
-	0x0804, 0xc4b6, 0x080c, 0x30fd, 0x1904, 0xc6c9, 0x00e6, 0x00d6,
-	0x00c6, 0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006,
-	0x0158, 0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce,
-	0x00de, 0x00ee, 0x0804, 0xc4bd, 0x080c, 0x538a, 0xd0e4, 0x0904,
-	0xc614, 0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108,
-	0x720c, 0x080c, 0x655e, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106,
-	0x1118, 0xb814, 0x9206, 0x0510, 0x080c, 0x655a, 0x15b8, 0x2069,
-	0x1800, 0x687c, 0x9206, 0x1590, 0x6878, 0x9106, 0x1578, 0x7210,
-	0x080c, 0xbb05, 0x0590, 0x080c, 0xc754, 0x0578, 0x080c, 0xd5a6,
-	0x0560, 0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x83f1,
-	0x080c, 0x8973, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286,
-	0xffff, 0x0150, 0x080c, 0xbb05, 0x01c0, 0x9280, 0x0002, 0x2004,
-	0x7110, 0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001,
-	0x080c, 0xd4fc, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037,
-	0x602f, 0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f,
-	0x0003, 0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c,
-	0x30fd, 0x1904, 0xc6c9, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00,
-	0x8007, 0x9086, 0x0006, 0x1904, 0xc4bd, 0x00e6, 0x00d6, 0x00c6,
-	0x080c, 0x538a, 0xd0e4, 0x0904, 0xc68c, 0x2069, 0x1800, 0x2071,
-	0x026c, 0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150,
-	0x7208, 0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xd4fc, 0x2c10,
-	0x00ce, 0x05e8, 0x080c, 0xbb05, 0x05d0, 0x7108, 0x9280, 0x0002,
-	0x2004, 0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xb73d,
-	0x002e, 0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001,
-	0x0178, 0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280,
-	0x0005, 0x2004, 0x9005, 0x0170, 0x080c, 0xc754, 0x0904, 0xc60d,
-	0x0056, 0x7510, 0x7614, 0x080c, 0xd5bf, 0x005e, 0x00ce, 0x00de,
-	0x00ee, 0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00,
-	0x6003, 0x0001, 0x080c, 0x83f1, 0x080c, 0x8973, 0x0c78, 0x6007,
-	0x003b, 0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b,
-	0x6017, 0x0000, 0x0804, 0xc5e4, 0x00e6, 0x0026, 0x080c, 0x6520,
-	0x0550, 0x080c, 0x6509, 0x080c, 0xd798, 0x1518, 0x2071, 0x1800,
-	0x70d8, 0x9085, 0x0003, 0x70da, 0x00f6, 0x2079, 0x0100, 0x72ac,
-	0x9284, 0x00ff, 0x707a, 0x78e6, 0x9284, 0xff00, 0x727c, 0x9205,
-	0x707e, 0x78ea, 0x00fe, 0x70e3, 0x0000, 0x080c, 0x655e, 0x0120,
-	0x2011, 0x19d1, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2dbb,
-	0x0010, 0x080c, 0xd7ca, 0x002e, 0x00ee, 0x080c, 0x9e32, 0x0804,
-	0xc4bc, 0x080c, 0x9e32, 0x0005, 0x2600, 0x0002, 0xc6e0, 0xc6e0,
-	0xc6e0, 0xc6e0, 0xc6e0, 0xc6e2, 0xc6e0, 0xc6e0, 0xc6e0, 0xc6e0,
-	0xc6ff, 0xc6e0, 0xc6e0, 0xc6e0, 0xc711, 0xc71e, 0xc74f, 0xc6e0,
-	0x080c, 0x0db4, 0x080c, 0xd726, 0x1d20, 0x080c, 0x30fd, 0x1d08,
-	0x080c, 0xc869, 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003,
-	0x0001, 0x080c, 0x8439, 0x0005, 0x080c, 0x2fda, 0x080c, 0xc227,
-	0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x8439, 0x0005, 0x080c,
-	0xd726, 0x1938, 0x080c, 0x30fd, 0x1920, 0x080c, 0xc869, 0x1d60,
-	0x703c, 0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x8439,
-	0x0005, 0x080c, 0xc771, 0x0904, 0xc6c9, 0x6007, 0x004e, 0x6003,
-	0x0001, 0x080c, 0x8439, 0x080c, 0x8973, 0x0005, 0x6007, 0x004f,
-	0x6017, 0x0000, 0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186,
-	0x0001, 0x1160, 0x7140, 0x2001, 0x198e, 0x2004, 0x9106, 0x11b0,
-	0x7144, 0x2001, 0x198f, 0x2004, 0x9106, 0x0190, 0x9186, 0x0002,
-	0x1168, 0x2011, 0x0276, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048,
-	0x2019, 0x000a, 0x080c, 0xae0d, 0x009e, 0x0110, 0x6017, 0x0001,
-	0x6003, 0x0001, 0x080c, 0x8439, 0x080c, 0x8973, 0x0005, 0x6007,
-	0x0050, 0x703c, 0x6016, 0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260,
-	0x00b6, 0x00c6, 0x2260, 0x6010, 0x2058, 0xb8bc, 0xd084, 0x0150,
-	0x7128, 0x6048, 0x9106, 0x1120, 0x712c, 0x6044, 0x9106, 0x0110,
-	0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e,
-	0x0005, 0x0016, 0x0096, 0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126,
-	0x2091, 0x8000, 0x2071, 0x1800, 0x708c, 0x908a, 0x00f9, 0x16e8,
-	0x20e1, 0x0000, 0x2001, 0x1971, 0x2003, 0x0000, 0x080c, 0x1004,
-	0x05a0, 0x2900, 0x6016, 0x708c, 0x8004, 0xa816, 0x908a, 0x001e,
-	0x02d0, 0xa833, 0x001e, 0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x001b, 0x20a0, 0x2001, 0x1971, 0x0016, 0x200c, 0x0471,
-	0x001e, 0x2940, 0x080c, 0x1004, 0x01c0, 0x2900, 0xa006, 0x2100,
-	0x81ff, 0x0180, 0x0c18, 0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x001b, 0x20a0, 0x2001, 0x1971, 0x0016, 0x200c, 0x00b1,
-	0x001e, 0x0000, 0x9085, 0x0001, 0x0048, 0x2071, 0x1800, 0x708f,
-	0x0000, 0x6014, 0x2048, 0x080c, 0x0f9d, 0x9006, 0x012e, 0x01de,
-	0x01ce, 0x00ee, 0x008e, 0x009e, 0x001e, 0x0005, 0x0006, 0x0016,
-	0x0026, 0x0036, 0x00c6, 0x918c, 0xffff, 0x11a8, 0x080c, 0x2241,
-	0x2099, 0x026c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8,
-	0x4003, 0x00f8, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x2241,
-	0x2099, 0x0260, 0x0ca8, 0x080c, 0x2241, 0x2061, 0x1971, 0x6004,
-	0x2098, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0048,
-	0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x2241, 0x2099, 0x0260,
-	0x0ca8, 0x2061, 0x1971, 0x2019, 0x0280, 0x3300, 0x931e, 0x0110,
-	0x6006, 0x0020, 0x2001, 0x0260, 0x6006, 0x8108, 0x2162, 0x9292,
-	0x0021, 0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e,
-	0x000e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff,
-	0x11b8, 0x080c, 0x2259, 0x20a1, 0x024c, 0x2001, 0x0014, 0x3518,
-	0x9312, 0x1218, 0x23a8, 0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff,
-	0x01f8, 0x22a8, 0x8108, 0x080c, 0x2259, 0x20a1, 0x0240, 0x0c98,
-	0x080c, 0x2259, 0x2061, 0x1974, 0x6004, 0x20a0, 0x6008, 0x3518,
-	0x9312, 0x1218, 0x23a8, 0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff,
-	0x0138, 0x22a8, 0x8108, 0x080c, 0x2259, 0x20a1, 0x0240, 0x0c98,
-	0x2061, 0x1974, 0x2019, 0x0260, 0x3400, 0x931e, 0x0110, 0x6006,
-	0x0020, 0x2001, 0x0240, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021,
+	0x8000, 0xbaa0, 0x080c, 0x9e8f, 0x0560, 0x6057, 0x0000, 0x2b00,
+	0x6012, 0x080c, 0xbfa6, 0x6023, 0x0003, 0x0016, 0x080c, 0x8564,
+	0x0076, 0x903e, 0x080c, 0x8452, 0x2c08, 0x080c, 0xd2bc, 0x007e,
+	0x001e, 0xd184, 0x0128, 0x080c, 0x9e42, 0x9085, 0x0001, 0x0070,
+	0x080c, 0x5397, 0x0128, 0xd18c, 0x1170, 0x080c, 0xbc59, 0x0148,
+	0x2009, 0x004c, 0x080c, 0x9ebc, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90, 0x2009, 0x004d,
+	0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046, 0x0016, 0x080c,
+	0x9dec, 0x2c78, 0x0590, 0x7e56, 0x2b00, 0x7812, 0x7823, 0x0003,
+	0x2021, 0x0005, 0x080c, 0xbc6b, 0x9186, 0x004d, 0x0118, 0x9186,
+	0x004e, 0x0148, 0x2001, 0x1950, 0x200c, 0xd1fc, 0x0168, 0x2f60,
+	0x080c, 0x9e42, 0x00d0, 0x2001, 0x194f, 0x200c, 0xd1fc, 0x0120,
+	0x2f60, 0x080c, 0x9e42, 0x0088, 0x2f60, 0x080c, 0x5397, 0x0138,
+	0xd18c, 0x1118, 0x04f1, 0x0148, 0x0010, 0x2900, 0x7816, 0x001e,
+	0x0016, 0x080c, 0x9ebc, 0x9085, 0x0001, 0x001e, 0x004e, 0x00ce,
+	0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046, 0x080c, 0x9dec, 0x2c78,
+	0x0508, 0x7e56, 0x2b00, 0x7812, 0x7823, 0x0003, 0x0096, 0x2021,
+	0x0004, 0x0489, 0x009e, 0x2001, 0x194e, 0x200c, 0xd1fc, 0x0120,
+	0x2f60, 0x080c, 0x9e42, 0x0060, 0x2f60, 0x080c, 0x5397, 0x0120,
+	0xd18c, 0x1160, 0x0071, 0x0130, 0x2009, 0x0052, 0x080c, 0x9ebc,
+	0x9085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816,
+	0x0c98, 0x00c6, 0x080c, 0x4889, 0x00ce, 0x1120, 0x080c, 0x9e42,
+	0x9006, 0x0005, 0xa867, 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016,
+	0x9085, 0x0001, 0x0005, 0x0096, 0x0076, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x637b, 0x0158, 0x2001, 0xbc70, 0x0006, 0x900e, 0x2400,
+	0x080c, 0x6abf, 0x080c, 0x6891, 0x000e, 0x0807, 0x2418, 0x080c,
+	0x87fb, 0xbaa0, 0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608,
+	0x080c, 0x857c, 0x008e, 0x080c, 0x8452, 0x2f08, 0x2648, 0x080c,
+	0xd2bc, 0xb93c, 0x81ff, 0x090c, 0x864d, 0x080c, 0x896d, 0x012e,
+	0x007e, 0x009e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x9dec, 0x0190, 0x660a, 0x2b08, 0x6112, 0x080c, 0xbfa6, 0x6023,
+	0x0001, 0x2900, 0x6016, 0x2009, 0x001f, 0x080c, 0x9ebc, 0x9085,
+	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x9e8f, 0x01b8, 0x660a, 0x2b08, 0x6112,
+	0x080c, 0xbfa6, 0x6023, 0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78,
+	0x080c, 0x164a, 0x00fe, 0x2009, 0x0021, 0x080c, 0x9ebc, 0x9085,
+	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d,
+	0x00c6, 0x0126, 0x0016, 0x2091, 0x8000, 0x080c, 0x9dec, 0x0198,
+	0x660a, 0x2b08, 0x6112, 0x080c, 0xbfa6, 0x6023, 0x0001, 0x2900,
+	0x6016, 0x001e, 0x0016, 0x080c, 0x9ebc, 0x9085, 0x0001, 0x001e,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x9e8f, 0x0188, 0x2b08, 0x6112, 0x080c, 0xbfa6,
+	0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0000, 0x080c, 0x9ebc,
+	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009,
+	0x0044, 0x0830, 0x2009, 0x0049, 0x0818, 0x0026, 0x00b6, 0x6210,
+	0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x002e,
+	0x0005, 0x0006, 0x0016, 0x6004, 0x908e, 0x0002, 0x0140, 0x908e,
+	0x0003, 0x0128, 0x908e, 0x0004, 0x0110, 0x9085, 0x0001, 0x001e,
+	0x000e, 0x0005, 0x0006, 0x0086, 0x0096, 0x6020, 0x9086, 0x0004,
+	0x01a8, 0x6014, 0x904d, 0x080c, 0xbb2c, 0x0180, 0xa864, 0x9086,
+	0x0139, 0x0170, 0x6020, 0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002,
+	0x0128, 0xa868, 0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x009e, 0x008e, 0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x9e8f, 0x0198, 0x2b08, 0x6112, 0x080c, 0xbfa6, 0x6023,
+	0x0001, 0x2900, 0x6016, 0x080c, 0x2fdc, 0x2009, 0x0028, 0x080c,
+	0x9ebc, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
+	0x9186, 0x0015, 0x11a8, 0x2011, 0x1823, 0x2204, 0x9086, 0x0074,
+	0x1178, 0x00b6, 0x080c, 0xaa5c, 0x00be, 0x080c, 0xac9b, 0x6003,
+	0x0001, 0x6007, 0x0029, 0x080c, 0x8422, 0x080c, 0x896d, 0x0078,
+	0x6014, 0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001,
+	0x0001, 0x080c, 0xc165, 0x080c, 0xa7d1, 0x080c, 0x9e42, 0x0005,
+	0x0096, 0x6014, 0x904d, 0x090c, 0x0db4, 0xa87b, 0x0030, 0xa883,
+	0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x6891, 0x012e, 0x009e, 0x080c, 0x9e42,
+	0x0c30, 0x0096, 0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c,
+	0x6198, 0x00e8, 0x9186, 0x0015, 0x1510, 0x2011, 0x1823, 0x2204,
+	0x9086, 0x0014, 0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x62e2,
+	0x00be, 0x080c, 0xad6c, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890,
+	0x00be, 0x9005, 0x0160, 0x2001, 0x0006, 0x080c, 0x6198, 0x6014,
+	0x2048, 0xa868, 0xd0fc, 0x0170, 0x080c, 0xa246, 0x0048, 0x6014,
+	0x2048, 0xa868, 0xd0fc, 0x0528, 0x080c, 0xa7d1, 0x080c, 0x9e42,
+	0x009e, 0x0005, 0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0db4,
+	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c,
+	0x6467, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6891, 0x012e, 0x080c, 0x9e42,
+	0x08f8, 0x6014, 0x904d, 0x090c, 0x0db4, 0xa87b, 0x0030, 0xa883,
+	0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x6891, 0x012e, 0x080c, 0x9e42, 0x0840,
+	0xa878, 0x9086, 0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad,
+	0xa882, 0x0005, 0x6043, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001,
+	0x6007, 0x0050, 0x080c, 0x83da, 0x080c, 0x896d, 0x0005, 0x00c6,
+	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0120, 0x6020,
+	0x9084, 0x000f, 0x0013, 0x00ce, 0x0005, 0xb845, 0xbe56, 0xbe56,
+	0xbe59, 0xd59a, 0xd5b5, 0xd5b8, 0xb845, 0xb845, 0xb845, 0xb845,
+	0xb845, 0xb845, 0xb845, 0xb845, 0x080c, 0x0db4, 0xa001, 0xa001,
+	0x0005, 0x0096, 0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110,
+	0x009e, 0x0010, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0550, 0x2001, 0x1833, 0x2004, 0x9005, 0x1540,
+	0x00f6, 0x2c78, 0x080c, 0x9dec, 0x0508, 0x7810, 0x6012, 0x080c,
+	0xbfa6, 0x7820, 0x9086, 0x0003, 0x0128, 0x7808, 0x603a, 0x2f00,
+	0x603e, 0x0020, 0x7808, 0x603e, 0x2f00, 0x603a, 0x602e, 0x6023,
+	0x0001, 0x6007, 0x0035, 0x6003, 0x0001, 0x7954, 0x6156, 0x080c,
+	0x83da, 0x080c, 0x896d, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe,
+	0x2001, 0x1958, 0x2004, 0x6042, 0x0005, 0x0016, 0x0096, 0x6814,
+	0x2048, 0xa87c, 0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000,
+	0xa893, 0x0000, 0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e,
+	0xa878, 0x2048, 0x080c, 0x0f9d, 0x6830, 0x6036, 0x908e, 0x0001,
+	0x0148, 0x6803, 0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e,
+	0x6032, 0x00d0, 0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824,
+	0xc0f4, 0x9085, 0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938,
+	0x9102, 0xa8b0, 0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838,
+	0x9084, 0xfffc, 0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e,
+	0x6910, 0x6112, 0x6954, 0x6156, 0x6023, 0x0001, 0x6007, 0x0039,
+	0x6003, 0x0001, 0x080c, 0x83da, 0x080c, 0x896d, 0x009e, 0x001e,
+	0x0005, 0x6024, 0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a,
+	0x603c, 0x9303, 0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5,
+	0x0098, 0x643a, 0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400,
+	0xacac, 0x9402, 0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e,
+	0x004e, 0x6024, 0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138,
+	0xa83c, 0x603a, 0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005,
+	0x0006, 0x0016, 0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035,
+	0x01a0, 0x908e, 0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e,
+	0x0038, 0x0158, 0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128,
+	0x908e, 0x003b, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005,
+	0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x2001, 0x1952, 0x200c,
+	0x8000, 0x2014, 0x2001, 0x0032, 0x080c, 0x8259, 0x2001, 0x1956,
+	0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1954, 0x200c,
+	0x8000, 0x2014, 0x2071, 0x193c, 0x711a, 0x721e, 0x2001, 0x0064,
+	0x080c, 0x8259, 0x2001, 0x1957, 0x82ff, 0x1110, 0x2011, 0x0014,
+	0x2202, 0x2001, 0x1958, 0x9288, 0x000a, 0x2102, 0x2001, 0x1a60,
+	0x2102, 0x2001, 0x0032, 0x080c, 0x151a, 0x080c, 0x654c, 0x00ee,
+	0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x00e6,
+	0x2001, 0x1956, 0x2003, 0x0028, 0x2001, 0x1957, 0x2003, 0x0014,
+	0x2071, 0x193c, 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0x1958,
+	0x2009, 0x001e, 0x2102, 0x2001, 0x1a60, 0x2102, 0x2001, 0x0032,
+	0x080c, 0x151a, 0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6058,
+	0x904d, 0x0110, 0x080c, 0x101d, 0x009e, 0x0005, 0x0005, 0x00c6,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x9dec, 0x0180, 0x2b08, 0x6112,
+	0x0ca9, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c,
+	0x9ebc, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
+	0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1500,
+	0x708c, 0x9086, 0x0018, 0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4,
+	0x1160, 0x2c78, 0x080c, 0x8b64, 0x01d8, 0x7078, 0xaa50, 0x9206,
+	0x1160, 0x707c, 0xaa54, 0x9206, 0x1140, 0x6210, 0x00b6, 0x2258,
+	0xbaa0, 0x00be, 0x900e, 0x080c, 0x3025, 0x080c, 0xa246, 0x0020,
+	0x080c, 0xa7d1, 0x080c, 0x9e42, 0x00fe, 0x00ee, 0x009e, 0x0005,
+	0x705c, 0xaa54, 0x9206, 0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x9dec, 0x0188, 0x2b08, 0x6112, 0x080c, 0xbfa6,
+	0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x004d, 0x080c, 0x9ebc,
+	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6,
+	0x0126, 0x2091, 0x8000, 0x0016, 0x080c, 0x9dec, 0x0180, 0x2b08,
+	0x6112, 0x080c, 0xbfa6, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e,
+	0x080c, 0x9ebc, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x001e,
+	0x9006, 0x0cd0, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0066,
+	0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1568,
+	0x718c, 0x6014, 0x2048, 0xa814, 0x8003, 0x9106, 0x1530, 0x20e1,
+	0x0000, 0x2001, 0x1970, 0x2003, 0x0000, 0x6014, 0x2048, 0xa830,
+	0x20a8, 0x8906, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e8, 0x9084,
+	0xffc0, 0x9080, 0x001b, 0x20a0, 0x2001, 0x1970, 0x0016, 0x200c,
+	0x080c, 0xc7ed, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c38,
+	0x6014, 0x2048, 0xa867, 0x0103, 0x0010, 0x080c, 0xa7d1, 0x080c,
+	0x9e42, 0x00fe, 0x00ee, 0x009e, 0x006e, 0x005e, 0x004e, 0x003e,
+	0x002e, 0x001e, 0x0005, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800,
+	0x9186, 0x0015, 0x11b8, 0x708c, 0x9086, 0x0004, 0x1198, 0x6014,
+	0x2048, 0x2c78, 0x080c, 0x8b64, 0x01a8, 0x7078, 0xaa74, 0x9206,
+	0x1130, 0x707c, 0xaa78, 0x9206, 0x1110, 0x080c, 0x2fdc, 0x080c,
+	0xa246, 0x0020, 0x080c, 0xa7d1, 0x080c, 0x9e42, 0x00fe, 0x00ee,
+	0x009e, 0x0005, 0x705c, 0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096,
+	0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1550, 0x708c,
+	0x9086, 0x0004, 0x1530, 0x6014, 0x2048, 0x2c78, 0x080c, 0x8b64,
+	0x05f0, 0x7078, 0xaacc, 0x9206, 0x1180, 0x707c, 0xaad0, 0x9206,
+	0x1160, 0x080c, 0x2fdc, 0x0016, 0xa998, 0xaab0, 0x9284, 0x1000,
+	0xc0fd, 0x080c, 0x5347, 0x001e, 0x0010, 0x080c, 0x5138, 0x080c,
+	0xbb2c, 0x0508, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
+	0x0080, 0x080c, 0xbb2c, 0x01b8, 0x6014, 0x2048, 0x080c, 0x5138,
+	0x1d70, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b,
+	0x0004, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0x080c, 0x6891,
+	0x012e, 0x080c, 0x9e42, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c,
+	0xaad0, 0x9206, 0x0930, 0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac,
+	0x0178, 0xa938, 0xaa34, 0x2100, 0x9205, 0x0150, 0xa890, 0x9106,
+	0x1118, 0xa88c, 0x9206, 0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001,
+	0x002e, 0x001e, 0x0005, 0x00b6, 0x00d6, 0x0036, 0x080c, 0xbb2c,
+	0x0904, 0xc161, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x929e,
+	0x4000, 0x1580, 0x6310, 0x00c6, 0x2358, 0x2009, 0x0000, 0xa868,
+	0xd0f4, 0x1140, 0x080c, 0x6467, 0x1108, 0xc185, 0xb800, 0xd0bc,
+	0x0108, 0xc18d, 0xaa96, 0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0031, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080,
+	0x0006, 0x2098, 0x080c, 0x0f68, 0x20a9, 0x0004, 0xa85c, 0x9080,
+	0x0035, 0x20a0, 0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f68,
+	0x00ce, 0x0090, 0xaa96, 0x3918, 0x9398, 0x0007, 0x231c, 0x6004,
+	0x9086, 0x0016, 0x0110, 0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358,
+	0xb804, 0x9084, 0x00ff, 0xa89e, 0x080c, 0x6884, 0x6017, 0x0000,
+	0x009e, 0x003e, 0x00de, 0x00be, 0x0005, 0x0026, 0x0036, 0x0046,
+	0x00b6, 0x0096, 0x00f6, 0x6214, 0x2248, 0x6210, 0x2258, 0x2079,
+	0x0260, 0x9096, 0x0000, 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e,
+	0x080c, 0x2665, 0x2118, 0x831f, 0x939c, 0xff00, 0x7838, 0x9084,
+	0x00ff, 0x931d, 0x7c3c, 0x2011, 0x8018, 0x080c, 0x48e9, 0x00a8,
+	0x9096, 0x0001, 0x1148, 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838,
+	0xa8a6, 0x783c, 0xa8aa, 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b,
+	0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be,
+	0x004e, 0x003e, 0x002e, 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186,
+	0x0035, 0x0110, 0x6a38, 0x0008, 0x6a2c, 0x080c, 0xbb1a, 0x01f0,
+	0x2260, 0x6120, 0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x1190,
+	0x6838, 0x9206, 0x0140, 0x683c, 0x9206, 0x1160, 0x6108, 0x6838,
+	0x9106, 0x1140, 0x0020, 0x6008, 0x693c, 0x9106, 0x1118, 0x6010,
+	0x6910, 0x9106, 0x001e, 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001,
+	0x0cc8, 0xa974, 0xd1cc, 0x0188, 0x918c, 0x00ff, 0x918e, 0x0002,
+	0x1160, 0xa9a8, 0x918c, 0x0f00, 0x810f, 0x918e, 0x0001, 0x1128,
+	0xa834, 0xa938, 0x9115, 0x190c, 0xb23a, 0x0005, 0x0036, 0x2019,
+	0x0001, 0x0010, 0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, 0xbb2c,
+	0x01c8, 0x080c, 0xbd15, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000,
+	0x0096, 0x2048, 0xa87c, 0x080c, 0xbd32, 0x1118, 0x080c, 0xa7d1,
+	0x0040, 0xa867, 0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c,
+	0x6891, 0x009e, 0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b,
+	0x0006, 0xc0ec, 0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002,
+	0x0020, 0xa87b, 0x0005, 0x080c, 0xbe26, 0xa877, 0x0000, 0x0005,
+	0x2001, 0x1810, 0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810,
+	0x2004, 0xd0f4, 0x000e, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004,
+	0xd0e4, 0x000e, 0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058,
+	0xbba0, 0x00be, 0x2021, 0x0007, 0x080c, 0x4a86, 0x004e, 0x003e,
+	0x0005, 0x0c51, 0x1d81, 0x0005, 0x2001, 0x1956, 0x2004, 0x601a,
+	0x0005, 0x2001, 0x1958, 0x2004, 0x6042, 0x0005, 0x080c, 0x9e42,
+	0x0804, 0x896d, 0x00b6, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
+	0x0db4, 0x001b, 0x006e, 0x00be, 0x0005, 0xc26d, 0xc94a, 0xcaa5,
+	0xc26d, 0xc26d, 0xc26d, 0xc26d, 0xc26d, 0xc2a4, 0xcb29, 0xc26d,
+	0xc26d, 0xc26d, 0xc26d, 0xc26d, 0xc26d, 0x080c, 0x0db4, 0x0066,
+	0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0db4, 0x0013, 0x006e, 0x0005,
+	0xc288, 0xd091, 0xc288, 0xc288, 0xc288, 0xc288, 0xc288, 0xc288,
+	0xd03e, 0xd0e5, 0xc288, 0xd6d5, 0xd70b, 0xd6d5, 0xd70b, 0xc288,
+	0x080c, 0x0db4, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0db4, 0x6000,
+	0x000a, 0x0005, 0xc2a2, 0xcd06, 0xcdf6, 0xce18, 0xced7, 0xc2a2,
+	0xcfb5, 0xcf5f, 0xcb35, 0xd014, 0xd029, 0xc2a2, 0xc2a2, 0xc2a2,
+	0xc2a2, 0xc2a2, 0x080c, 0x0db4, 0x91b2, 0x0053, 0x1a0c, 0x0db4,
+	0x2100, 0x91b2, 0x0040, 0x1a04, 0xc6eb, 0x0002, 0xc2ee, 0xc4dc,
+	0xc2ee, 0xc2ee, 0xc2ee, 0xc4e5, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee,
+	0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee,
+	0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2f0, 0xc353, 0xc362,
+	0xc3c6, 0xc3f1, 0xc469, 0xc4c7, 0xc2ee, 0xc2ee, 0xc4e8, 0xc2ee,
+	0xc2ee, 0xc4fd, 0xc50a, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee,
+	0xc58d, 0xc2ee, 0xc2ee, 0xc5a1, 0xc2ee, 0xc2ee, 0xc55c, 0xc2ee,
+	0xc2ee, 0xc2ee, 0xc5b9, 0xc2ee, 0xc2ee, 0xc2ee, 0xc636, 0xc2ee,
+	0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc6b3, 0x080c, 0x0db4,
+	0x080c, 0x6529, 0x1150, 0x2001, 0x1836, 0x2004, 0xd0cc, 0x1128,
+	0x9084, 0x0009, 0x9086, 0x0008, 0x1140, 0x6007, 0x0009, 0x602f,
+	0x0009, 0x6017, 0x0000, 0x0804, 0xc4d5, 0x080c, 0x6512, 0x00e6,
+	0x00c6, 0x0036, 0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026,
+	0x2019, 0x0029, 0x080c, 0x8564, 0x0076, 0x903e, 0x080c, 0x8452,
+	0x2c08, 0x080c, 0xd2bc, 0x007e, 0x001e, 0x001e, 0x002e, 0x003e,
+	0x00ce, 0x00ee, 0x6610, 0x2658, 0x080c, 0x6256, 0xbe04, 0x9684,
+	0x00ff, 0x9082, 0x0006, 0x1268, 0x0016, 0x0026, 0x6210, 0x00b6,
+	0x2258, 0xbaa0, 0x00be, 0x2c08, 0x080c, 0xd883, 0x002e, 0x001e,
+	0x1178, 0x080c, 0xd1ef, 0x1904, 0xc3be, 0x080c, 0xd18b, 0x1120,
+	0x6007, 0x0008, 0x0804, 0xc4d5, 0x6007, 0x0009, 0x0804, 0xc4d5,
+	0x080c, 0xd3e6, 0x0128, 0x080c, 0xd1ef, 0x0d78, 0x0804, 0xc3be,
+	0x6017, 0x1900, 0x0c88, 0x080c, 0x30ff, 0x1904, 0xc6e8, 0x6106,
+	0x080c, 0xd140, 0x6007, 0x0006, 0x0804, 0xc4d5, 0x6007, 0x0007,
+	0x0804, 0xc4d5, 0x080c, 0xd747, 0x1904, 0xc6e8, 0x080c, 0x30ff,
+	0x1904, 0xc6e8, 0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff,
+	0x9082, 0x0006, 0x1220, 0x2001, 0x0001, 0x080c, 0x6184, 0x96b4,
+	0xff00, 0x8637, 0x9686, 0x0006, 0x0188, 0x9686, 0x0004, 0x0170,
+	0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x0140, 0x9686, 0x0004,
+	0x0128, 0x9686, 0x0005, 0x0110, 0x00de, 0x0480, 0x00e6, 0x2071,
+	0x0260, 0x7034, 0x9084, 0x0003, 0x1140, 0x7034, 0x9082, 0x0014,
+	0x0220, 0x7030, 0x9084, 0x0003, 0x0130, 0x00ee, 0x6017, 0x0000,
+	0x602f, 0x0007, 0x00b0, 0x00ee, 0x080c, 0xd252, 0x1190, 0x9686,
+	0x0006, 0x1140, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c,
+	0x3025, 0x002e, 0x080c, 0x62e2, 0x6007, 0x000a, 0x00de, 0x0804,
+	0xc4d5, 0x6007, 0x000b, 0x00de, 0x0804, 0xc4d5, 0x080c, 0x2fdc,
+	0x080c, 0xc241, 0x6007, 0x0001, 0x0804, 0xc4d5, 0x080c, 0xd747,
+	0x1904, 0xc6e8, 0x080c, 0x30ff, 0x1904, 0xc6e8, 0x2071, 0x0260,
+	0x7034, 0x90b4, 0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030,
+	0x9084, 0x0003, 0x1910, 0x6610, 0x2658, 0xbe04, 0x9686, 0x0707,
+	0x09e8, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x3025,
+	0x002e, 0x6007, 0x000c, 0x2001, 0x0001, 0x080c, 0xd863, 0x0804,
+	0xc4d5, 0x080c, 0x6529, 0x1140, 0x2001, 0x1836, 0x2004, 0x9084,
+	0x0009, 0x9086, 0x0008, 0x1110, 0x0804, 0xc2fd, 0x080c, 0x6512,
+	0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x06c0,
+	0x1138, 0x0026, 0x2001, 0x0006, 0x080c, 0x61c4, 0x002e, 0x0050,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006,
+	0x1904, 0xc3be, 0x080c, 0xd25f, 0x1120, 0x6007, 0x000e, 0x0804,
+	0xc4d5, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x2fdc,
+	0x080c, 0xc241, 0x004e, 0x0016, 0x9006, 0x2009, 0x1854, 0x210c,
+	0x0048, 0x2009, 0x0029, 0x080c, 0xd54b, 0x6010, 0x2058, 0xb800,
+	0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x0804, 0xc4d5,
+	0x2001, 0x0001, 0x080c, 0x6184, 0x0156, 0x0016, 0x0026, 0x0036,
+	0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0270, 0x080c, 0xae0c,
+	0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0168, 0x96b4, 0xff00,
+	0x8637, 0x9682, 0x0004, 0x0a04, 0xc3be, 0x9682, 0x0007, 0x0a04,
+	0xc41a, 0x0804, 0xc3be, 0x6017, 0x1900, 0x6007, 0x0009, 0x0804,
+	0xc4d5, 0x080c, 0x6529, 0x1140, 0x2001, 0x1836, 0x2004, 0x9084,
+	0x0009, 0x9086, 0x0008, 0x1110, 0x0804, 0xc2fd, 0x080c, 0x6512,
+	0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x0006, 0x9086, 0x0001,
+	0x000e, 0x0170, 0x9082, 0x0006, 0x0690, 0x0150, 0x96b4, 0xff00,
+	0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xc3be,
+	0x080c, 0xd28d, 0x1130, 0x080c, 0xd18b, 0x1118, 0x6007, 0x0010,
+	0x04e0, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x2fdc,
+	0x080c, 0xc241, 0x004e, 0x0016, 0x9006, 0x2009, 0x1854, 0x210c,
+	0x0048, 0x2009, 0x0029, 0x080c, 0xd54b, 0x6010, 0x2058, 0xb800,
+	0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c,
+	0xd3e6, 0x0140, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0980,
+	0x0804, 0xc3be, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c,
+	0x30ff, 0x1904, 0xc6e8, 0x080c, 0xd747, 0x1904, 0xc6e8, 0x080c,
+	0xc888, 0x1904, 0xc3be, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c,
+	0x8422, 0x080c, 0x896d, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001,
+	0x080c, 0x8422, 0x080c, 0x896d, 0x0cb0, 0x6007, 0x0005, 0x0c68,
+	0x080c, 0xd747, 0x1904, 0xc6e8, 0x080c, 0x30ff, 0x1904, 0xc6e8,
+	0x080c, 0xc888, 0x1904, 0xc3be, 0x6007, 0x0020, 0x6003, 0x0001,
+	0x080c, 0x8422, 0x080c, 0x896d, 0x0005, 0x080c, 0x30ff, 0x1904,
+	0xc6e8, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x8422, 0x080c,
+	0x896d, 0x0005, 0x080c, 0xd747, 0x1904, 0xc6e8, 0x080c, 0x30ff,
+	0x1904, 0xc6e8, 0x080c, 0xc888, 0x1904, 0xc3be, 0x0016, 0x0026,
+	0x00e6, 0x2071, 0x0260, 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08,
+	0x080c, 0xbb1a, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206, 0x1188,
+	0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240,
+	0x2c08, 0x9006, 0x080c, 0xd51d, 0x1180, 0x7244, 0x9286, 0xffff,
+	0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214, 0x9296,
+	0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086, 0x0007,
+	0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0x9e42, 0x2160,
+	0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x8422, 0x080c, 0x896d,
+	0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x6184,
+	0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805,
+	0x2011, 0x0276, 0x080c, 0xae0c, 0x003e, 0x002e, 0x001e, 0x015e,
+	0x0120, 0x6007, 0x0031, 0x0804, 0xc4d5, 0x080c, 0xaa74, 0x080c,
+	0x6f9b, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x6fb5, 0x1138,
+	0x080c, 0x727f, 0x080c, 0x5cda, 0x080c, 0x6ecd, 0x0010, 0x080c,
+	0x6f73, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x30ff, 0x1904,
+	0xc6e8, 0x080c, 0xc888, 0x1904, 0xc3be, 0x6106, 0x080c, 0xc8a4,
+	0x1120, 0x6007, 0x002b, 0x0804, 0xc4d5, 0x6007, 0x002c, 0x0804,
+	0xc4d5, 0x080c, 0xd747, 0x1904, 0xc6e8, 0x080c, 0x30ff, 0x1904,
+	0xc6e8, 0x080c, 0xc888, 0x1904, 0xc3be, 0x6106, 0x080c, 0xc8a9,
+	0x1120, 0x6007, 0x002e, 0x0804, 0xc4d5, 0x6007, 0x002f, 0x0804,
+	0xc4d5, 0x080c, 0x30ff, 0x1904, 0xc6e8, 0x00e6, 0x00d6, 0x00c6,
+	0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158,
+	0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de,
+	0x00ee, 0x0804, 0xc4dc, 0x080c, 0x5393, 0xd0e4, 0x0904, 0xc633,
+	0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108, 0x720c,
+	0x080c, 0x6567, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106, 0x1118,
+	0xb814, 0x9206, 0x0510, 0x080c, 0x6563, 0x15b8, 0x2069, 0x1800,
+	0x687c, 0x9206, 0x1590, 0x6878, 0x9106, 0x1578, 0x7210, 0x080c,
+	0xbb1a, 0x0590, 0x080c, 0xc773, 0x0578, 0x080c, 0xd5c7, 0x0560,
+	0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x83da, 0x080c,
+	0x896d, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff,
+	0x0150, 0x080c, 0xbb1a, 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110,
+	0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c,
+	0xd51d, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037, 0x602f,
+	0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003,
+	0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c, 0x30ff,
+	0x1904, 0xc6e8, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00, 0x8007,
+	0x9086, 0x0006, 0x1904, 0xc4dc, 0x00e6, 0x00d6, 0x00c6, 0x080c,
+	0x5393, 0xd0e4, 0x0904, 0xc6ab, 0x2069, 0x1800, 0x2071, 0x026c,
+	0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150, 0x7208,
+	0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xd51d, 0x2c10, 0x00ce,
+	0x05e8, 0x080c, 0xbb1a, 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004,
+	0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xb750, 0x002e,
+	0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001, 0x0178,
+	0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280, 0x0005,
+	0x2004, 0x9005, 0x0170, 0x080c, 0xc773, 0x0904, 0xc62c, 0x0056,
+	0x7510, 0x7614, 0x080c, 0xd5e0, 0x005e, 0x00ce, 0x00de, 0x00ee,
+	0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003,
+	0x0001, 0x080c, 0x83da, 0x080c, 0x896d, 0x0c78, 0x6007, 0x003b,
+	0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x080c, 0x83da,
+	0x080c, 0x896d, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b, 0x6017,
+	0x0000, 0x0804, 0xc603, 0x00e6, 0x0026, 0x080c, 0x6529, 0x0550,
+	0x080c, 0x6512, 0x080c, 0xd7b9, 0x1518, 0x2071, 0x1800, 0x70d8,
+	0x9085, 0x0003, 0x70da, 0x00f6, 0x2079, 0x0100, 0x72ac, 0x9284,
+	0x00ff, 0x707a, 0x78e6, 0x9284, 0xff00, 0x727c, 0x9205, 0x707e,
+	0x78ea, 0x00fe, 0x70e3, 0x0000, 0x080c, 0x6567, 0x0120, 0x2011,
+	0x19d0, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2dbd, 0x0010,
+	0x080c, 0xd7eb, 0x002e, 0x00ee, 0x080c, 0x9e42, 0x0804, 0xc4db,
+	0x080c, 0x9e42, 0x0005, 0x2600, 0x0002, 0xc6ff, 0xc6ff, 0xc6ff,
+	0xc6ff, 0xc6ff, 0xc701, 0xc6ff, 0xc6ff, 0xc6ff, 0xc6ff, 0xc71e,
+	0xc6ff, 0xc6ff, 0xc6ff, 0xc730, 0xc73d, 0xc76e, 0xc6ff, 0x080c,
+	0x0db4, 0x080c, 0xd747, 0x1d20, 0x080c, 0x30ff, 0x1d08, 0x080c,
+	0xc888, 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001,
+	0x080c, 0x8422, 0x0005, 0x080c, 0x2fdc, 0x080c, 0xc241, 0x6007,
+	0x0001, 0x6003, 0x0001, 0x080c, 0x8422, 0x0005, 0x080c, 0xd747,
+	0x1938, 0x080c, 0x30ff, 0x1920, 0x080c, 0xc888, 0x1d60, 0x703c,
+	0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x8422, 0x0005,
+	0x080c, 0xc790, 0x0904, 0xc6e8, 0x6007, 0x004e, 0x6003, 0x0001,
+	0x080c, 0x8422, 0x080c, 0x896d, 0x0005, 0x6007, 0x004f, 0x6017,
+	0x0000, 0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001,
+	0x1160, 0x7140, 0x2001, 0x198d, 0x2004, 0x9106, 0x11b0, 0x7144,
+	0x2001, 0x198e, 0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168,
+	0x2011, 0x0276, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019,
+	0x000a, 0x080c, 0xae20, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003,
+	0x0001, 0x080c, 0x8422, 0x080c, 0x896d, 0x0005, 0x6007, 0x0050,
+	0x703c, 0x6016, 0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6,
+	0x00c6, 0x2260, 0x6010, 0x2058, 0xb8bc, 0xd084, 0x0150, 0x7128,
+	0x6048, 0x9106, 0x1120, 0x712c, 0x6044, 0x9106, 0x0110, 0x9006,
+	0x0010, 0x9085, 0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005,
+	0x0016, 0x0096, 0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x1800, 0x708c, 0x908a, 0x00f9, 0x16e8, 0x20e1,
+	0x0000, 0x2001, 0x1970, 0x2003, 0x0000, 0x080c, 0x1004, 0x05a0,
+	0x2900, 0x6016, 0x708c, 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0,
+	0xa833, 0x001e, 0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x001b, 0x20a0, 0x2001, 0x1970, 0x0016, 0x200c, 0x0471, 0x001e,
+	0x2940, 0x080c, 0x1004, 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff,
+	0x0180, 0x0c18, 0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x001b, 0x20a0, 0x2001, 0x1970, 0x0016, 0x200c, 0x00b1, 0x001e,
+	0x0000, 0x9085, 0x0001, 0x0048, 0x2071, 0x1800, 0x708f, 0x0000,
+	0x6014, 0x2048, 0x080c, 0x0f9d, 0x9006, 0x012e, 0x01de, 0x01ce,
+	0x00ee, 0x008e, 0x009e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0026,
+	0x0036, 0x00c6, 0x918c, 0xffff, 0x11a8, 0x080c, 0x2243, 0x2099,
+	0x026c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
+	0x00f8, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x2243, 0x2099,
+	0x0260, 0x0ca8, 0x080c, 0x2243, 0x2061, 0x1970, 0x6004, 0x2098,
+	0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8,
+	0x4003, 0x22a8, 0x8108, 0x080c, 0x2243, 0x2099, 0x0260, 0x0ca8,
+	0x2061, 0x1970, 0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006,
+	0x0020, 0x2001, 0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021,
 	0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e,
-	0x0005, 0x00b6, 0x0066, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0006, 0x0170, 0x9686, 0x0004, 0x0158, 0xbe04,
-	0x96b4, 0x00ff, 0x9686, 0x0006, 0x0128, 0x9686, 0x0004, 0x0110,
-	0x9085, 0x0001, 0x006e, 0x00be, 0x0005, 0x00d6, 0x080c, 0xc901,
-	0x00de, 0x0005, 0x00d6, 0x080c, 0xc90e, 0x1520, 0x680c, 0x908c,
-	0xff00, 0x6820, 0x9084, 0x00ff, 0x9115, 0x6216, 0x6824, 0x602e,
-	0xd1e4, 0x0130, 0x9006, 0x080c, 0xd842, 0x2009, 0x0001, 0x0078,
-	0xd1ec, 0x0180, 0x6920, 0x918c, 0x00ff, 0x6824, 0x080c, 0x2663,
-	0x1148, 0x2001, 0x0001, 0x080c, 0xd842, 0x2110, 0x900e, 0x080c,
-	0x3023, 0x0018, 0x9085, 0x0001, 0x0008, 0x9006, 0x00de, 0x0005,
-	0x00b6, 0x00c6, 0x080c, 0x9e7f, 0x05a8, 0x0016, 0x0026, 0x00c6,
-	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2663, 0x1578,
-	0x080c, 0x61de, 0x1560, 0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e,
-	0x2b00, 0x6012, 0x080c, 0xd726, 0x11d8, 0x080c, 0x30fd, 0x11c0,
-	0x080c, 0xc869, 0x0510, 0x2001, 0x0007, 0x080c, 0x618f, 0x2001,
-	0x0007, 0x080c, 0x61bb, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007,
-	0x0001, 0x6003, 0x0001, 0x080c, 0x8439, 0x080c, 0x8973, 0x0010,
-	0x080c, 0x9e32, 0x9085, 0x0001, 0x00ce, 0x00be, 0x0005, 0x080c,
-	0x9e32, 0x00ce, 0x002e, 0x001e, 0x0ca8, 0x080c, 0x9e32, 0x9006,
-	0x0c98, 0x2069, 0x026d, 0x6800, 0x9082, 0x0010, 0x1228, 0x6017,
-	0x0000, 0x9085, 0x0001, 0x0008, 0x9006, 0x0005, 0x6017, 0x0000,
-	0x2069, 0x026c, 0x6808, 0x9084, 0xff00, 0x9086, 0x0800, 0x1190,
-	0x6904, 0x9186, 0x0018, 0x0118, 0x9186, 0x0014, 0x1158, 0x810f,
-	0x6800, 0x9084, 0x00ff, 0x910d, 0x615a, 0x908e, 0x0014, 0x0110,
-	0x908e, 0x0010, 0x0005, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0db4,
-	0x91b6, 0x0013, 0x1130, 0x2008, 0x91b2, 0x0040, 0x1a04, 0xca56,
-	0x0092, 0x91b6, 0x0027, 0x0120, 0x91b6, 0x0014, 0x190c, 0x0db4,
-	0x2001, 0x0007, 0x080c, 0x61bb, 0x080c, 0x886e, 0x080c, 0x9e62,
-	0x080c, 0x8973, 0x0005, 0xc98b, 0xc98d, 0xc98b, 0xc98b, 0xc98b,
-	0xc98d, 0xc99c, 0xca4f, 0xc9ee, 0xca4f, 0xca00, 0xca4f, 0xc99c,
-	0xca4f, 0xca47, 0xca4f, 0xca47, 0xca4f, 0xca4f, 0xc98b, 0xc98b,
-	0xc98b, 0xc98b, 0xc98b, 0xc98b, 0xc98b, 0xc98b, 0xc98b, 0xc98b,
-	0xc98b, 0xc98d, 0xc98b, 0xca4f, 0xc98b, 0xc98b, 0xca4f, 0xc98b,
-	0xca4c, 0xca4f, 0xc98b, 0xc98b, 0xc98b, 0xc98b, 0xca4f, 0xca4f,
-	0xc98b, 0xca4f, 0xca4f, 0xc98b, 0xc997, 0xc98b, 0xc98b, 0xc98b,
-	0xc98b, 0xca4b, 0xca4f, 0xc98b, 0xc98b, 0xca4f, 0xca4f, 0xc98b,
-	0xc98b, 0xc98b, 0xc98b, 0x080c, 0x0db4, 0x080c, 0x886e, 0x080c,
-	0xc22a, 0x6003, 0x0002, 0x080c, 0x8973, 0x0804, 0xca55, 0x9006,
-	0x080c, 0x617b, 0x0804, 0xca4f, 0x080c, 0x655a, 0x1904, 0xca4f,
-	0x9006, 0x080c, 0x617b, 0x6010, 0x2058, 0xb810, 0x9086, 0x00ff,
-	0x1140, 0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe,
-	0x0428, 0x6010, 0x2058, 0xb8b0, 0x9005, 0x1178, 0x080c, 0xc212,
-	0x1904, 0xca4f, 0x0036, 0x0046, 0xbba0, 0x2021, 0x0007, 0x080c,
-	0x4a76, 0x004e, 0x003e, 0x0804, 0xca4f, 0x080c, 0x312e, 0x1904,
-	0xca4f, 0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1138, 0x00f6,
-	0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x2001, 0x0002,
-	0x080c, 0x618f, 0x080c, 0x886e, 0x6023, 0x0001, 0x6003, 0x0001,
-	0x6007, 0x0002, 0x080c, 0x8439, 0x080c, 0x8973, 0x6110, 0x2158,
-	0x2009, 0x0001, 0x080c, 0x8046, 0x0804, 0xca55, 0x6610, 0x2658,
-	0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0904, 0xca4f,
-	0x9686, 0x0004, 0x0904, 0xca4f, 0x2001, 0x0004, 0x0804, 0xca4d,
-	0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046,
-	0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4a76, 0x004e,
-	0x003e, 0x2001, 0x0006, 0x080c, 0xca73, 0x6610, 0x2658, 0xbe04,
-	0x0066, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168,
-	0x2001, 0x0006, 0x080c, 0x61bb, 0x9284, 0x00ff, 0x908e, 0x0007,
-	0x1120, 0x2001, 0x0006, 0x080c, 0x618f, 0x080c, 0x655a, 0x11f8,
-	0x2001, 0x1836, 0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff,
-	0x9686, 0x0006, 0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000,
-	0x78a6, 0x00fe, 0x0804, 0xc9d6, 0x2001, 0x0004, 0x0030, 0x2001,
-	0x0006, 0x0449, 0x0020, 0x0018, 0x0010, 0x080c, 0x61bb, 0x080c,
-	0x886e, 0x080c, 0x9e32, 0x080c, 0x8973, 0x0005, 0x2600, 0x0002,
-	0xca6a, 0xca6a, 0xca6a, 0xca6a, 0xca6a, 0xca6c, 0xca6a, 0xca6a,
-	0xca6a, 0xca6a, 0xca6c, 0xca6a, 0xca6a, 0xca6a, 0xca6c, 0xca6c,
-	0xca6c, 0xca6c, 0x080c, 0x0db4, 0x080c, 0x886e, 0x080c, 0x9e32,
-	0x080c, 0x8973, 0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158,
-	0xb900, 0xd184, 0x0138, 0x080c, 0x618f, 0x9006, 0x080c, 0x617b,
-	0x080c, 0x3003, 0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658,
-	0xb804, 0x9084, 0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0db4,
-	0x91b6, 0x0015, 0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c,
-	0x0db4, 0x006b, 0x0005, 0xa8a1, 0xa8a1, 0xa8a1, 0xa8a1, 0xa8a1,
-	0xa8a1, 0xcaf2, 0xcab3, 0xa8a1, 0xa8a1, 0xa8a1, 0xa8a1, 0xa8a1,
-	0xa8a1, 0xa8a1, 0xa8a1, 0xa8a1, 0xa8a1, 0xcaf2, 0xcaf9, 0xa8a1,
-	0xa8a1, 0xa8a1, 0xa8a1, 0x00f6, 0x080c, 0x655a, 0x11d8, 0x080c,
-	0xc212, 0x11c0, 0x6010, 0x905d, 0x01a8, 0xb8b0, 0x9005, 0x0190,
-	0x9006, 0x080c, 0x617b, 0x2001, 0x0002, 0x080c, 0x618f, 0x6023,
-	0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8439, 0x080c,
-	0x8973, 0x00f0, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c,
-	0x2663, 0x11b0, 0x080c, 0x623e, 0x0118, 0x080c, 0x9e32, 0x0080,
-	0xb810, 0x0006, 0xb814, 0x0006, 0xb8b0, 0x0006, 0x080c, 0x5ceb,
-	0x000e, 0xb8b2, 0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0x9e32,
-	0x00fe, 0x0005, 0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0x9e32,
-	0x0005, 0x080c, 0xac85, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001,
-	0x080c, 0x8439, 0x080c, 0x8973, 0x0010, 0x080c, 0x9e32, 0x0005,
-	0x6004, 0x908a, 0x0053, 0x1a0c, 0x0db4, 0x080c, 0x886e, 0x080c,
-	0x9e62, 0x080c, 0x8973, 0x0005, 0x9182, 0x0040, 0x0002, 0xcb2a,
-	0xcb2a, 0xcb2a, 0xcb2a, 0xcb2c, 0xcb2a, 0xcb2a, 0xcb2a, 0xcb2a,
-	0xcb2a, 0xcb2a, 0xcb2a, 0xcb2a, 0xcb2a, 0xcb2a, 0xcb2a, 0xcb2a,
-	0xcb2a, 0xcb2a, 0x080c, 0x0db4, 0x0096, 0x00b6, 0x00d6, 0x00e6,
-	0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8ac, 0x9005, 0x11a8,
-	0x6106, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xcb92,
-	0x080c, 0xd836, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001,
-	0x2011, 0x0200, 0x080c, 0x822f, 0x0020, 0x9026, 0x080c, 0xd76b,
-	0x0c38, 0x080c, 0x0feb, 0x090c, 0x0db4, 0x6003, 0x0007, 0xa867,
-	0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008,
-	0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876,
-	0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x688c,
-	0x001e, 0x080c, 0xd836, 0x1904, 0xcbf2, 0x9486, 0x2000, 0x1130,
-	0x2019, 0x0017, 0x080c, 0xd4a6, 0x0804, 0xcbf2, 0x9486, 0x0200,
-	0x1120, 0x080c, 0xd442, 0x0804, 0xcbf2, 0x9486, 0x0400, 0x0120,
-	0x9486, 0x1000, 0x1904, 0xcbf2, 0x2019, 0x0002, 0x080c, 0xd45d,
-	0x0804, 0xcbf2, 0x2069, 0x1a41, 0x6a00, 0xd284, 0x0904, 0xcc5c,
-	0x9284, 0x0300, 0x1904, 0xcc55, 0x6804, 0x9005, 0x0904, 0xcc3d,
-	0x2d78, 0x6003, 0x0007, 0x080c, 0x1004, 0x0904, 0xcbfe, 0x7800,
-	0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000, 0x2001,
-	0x180f, 0x2004, 0xd084, 0x1904, 0xcc60, 0x9006, 0xa802, 0xa867,
-	0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058,
-	0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be,
-	0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084,
-	0x0003, 0x9080, 0xcbfa, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001,
-	0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b, 0x0080,
-	0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b,
-	0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae,
-	0x080c, 0x688c, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be,
-	0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001, 0x1810,
-	0x2004, 0xd084, 0x0120, 0x080c, 0x0feb, 0x1904, 0xcba7, 0x6017,
-	0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x83f1, 0x080c,
-	0x8973, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086,
-	0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114, 0x918c,
-	0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043,
-	0x080c, 0x83f1, 0x080c, 0x8973, 0x0828, 0x6868, 0x602e, 0x686c,
-	0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x0804, 0xcbf2, 0x2001, 0x180e, 0x2004,
-	0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48d9, 0x6017, 0xf300,
-	0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x0804, 0xcbf2, 0x6017, 0xf500, 0x0c98,
-	0x6017, 0xf600, 0x0804, 0xcc12, 0x6017, 0xf200, 0x0804, 0xcc12,
-	0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a,
-	0x7044, 0x9084, 0x0003, 0x9080, 0xcbfa, 0x2005, 0xa87e, 0x2928,
-	0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e,
-	0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009, 0x0205,
-	0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011, 0x0210,
-	0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0db4,
-	0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0029, 0x20a0, 0x2011, 0xccdc, 0x2041, 0x0001, 0x223d,
-	0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003, 0x931a,
-	0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260,
-	0x2098, 0x0c68, 0x2950, 0x080c, 0x1004, 0x0170, 0x2900, 0xb002,
-	0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d, 0x0118,
-	0x080c, 0x101d, 0x0cc8, 0x080c, 0x101d, 0x0804, 0xcbfe, 0x2548,
-	0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b, 0x0000,
-	0x080c, 0xd4d5, 0x0804, 0xcbf2, 0x8010, 0x0004, 0x801a, 0x0006,
-	0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013, 0x1160,
-	0x6004, 0x908a, 0x0054, 0x1a0c, 0x0db4, 0x9082, 0x0040, 0x0a0c,
-	0x0db4, 0x2008, 0x0804, 0xcd8d, 0x9186, 0x0051, 0x0108, 0x00c0,
-	0x2001, 0x0109, 0x2004, 0xd084, 0x0904, 0xcd3e, 0x0126, 0x2091,
-	0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x82dd, 0x002e, 0x001e,
-	0x000e, 0x012e, 0x6000, 0x9086, 0x0002, 0x1580, 0x0804, 0xcdd5,
-	0x9186, 0x0027, 0x0530, 0x9186, 0x0048, 0x0128, 0x9186, 0x0014,
-	0x0500, 0x190c, 0x0db4, 0x2001, 0x0109, 0x2004, 0xd084, 0x01f0,
-	0x00c6, 0x0126, 0x2091, 0x2800, 0x00c6, 0x2061, 0x0100, 0x0006,
-	0x0016, 0x0026, 0x080c, 0x82dd, 0x002e, 0x001e, 0x000e, 0x00ce,
-	0x012e, 0x00ce, 0x6000, 0x9086, 0x0004, 0x190c, 0x0db4, 0x0804,
-	0xceb6, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c, 0x9ec7,
-	0x0005, 0xcd54, 0xcd56, 0xcd56, 0xcd7d, 0xcd54, 0xcd54, 0xcd54,
-	0xcd54, 0xcd54, 0xcd54, 0xcd54, 0xcd54, 0xcd54, 0xcd54, 0xcd54,
-	0xcd54, 0xcd54, 0xcd54, 0xcd54, 0x080c, 0x0db4, 0x080c, 0x886e,
-	0x080c, 0x8973, 0x0036, 0x0096, 0x6014, 0x904d, 0x01d8, 0x080c,
-	0xbb17, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c, 0xd4d5, 0x6017,
-	0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1958, 0x2004, 0x601a,
-	0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096, 0x080c, 0x886e,
-	0x080c, 0x8973, 0x080c, 0xbb17, 0x0120, 0x6014, 0x2048, 0x080c,
-	0x101d, 0x080c, 0x9e62, 0x009e, 0x0005, 0x0002, 0xcda1, 0xcdb8,
-	0xcda3, 0xcdcf, 0xcda1, 0xcda1, 0xcda1, 0xcda1, 0xcda1, 0xcda1,
-	0xcda1, 0xcda1, 0xcda1, 0xcda1, 0xcda1, 0xcda1, 0xcda1, 0xcda1,
-	0xcda1, 0x080c, 0x0db4, 0x0096, 0x080c, 0x886e, 0x6014, 0x2048,
-	0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043, 0x080c,
-	0x9eac, 0x0010, 0x6003, 0x0004, 0x080c, 0x8973, 0x009e, 0x0005,
-	0x080c, 0x886e, 0x080c, 0xbb17, 0x0138, 0x6114, 0x0096, 0x2148,
-	0xa97c, 0x009e, 0xd1ec, 0x1138, 0x080c, 0x8204, 0x080c, 0x9e32,
-	0x080c, 0x8973, 0x0005, 0x080c, 0xd72f, 0x0db0, 0x0cc8, 0x080c,
-	0x886e, 0x2009, 0x0041, 0x0804, 0xcf3e, 0x9182, 0x0040, 0x0002,
-	0xcdeb, 0xcded, 0xcdeb, 0xcdeb, 0xcdeb, 0xcdeb, 0xcdeb, 0xcdeb,
-	0xcdeb, 0xcdeb, 0xcdeb, 0xcdeb, 0xcdeb, 0xcdeb, 0xcdeb, 0xcdeb,
-	0xcdeb, 0xcdee, 0xcdeb, 0x080c, 0x0db4, 0x0005, 0x00d6, 0x080c,
-	0x8204, 0x00de, 0x080c, 0xd787, 0x080c, 0x9e32, 0x0005, 0x9182,
-	0x0040, 0x0002, 0xce0d, 0xce0d, 0xce0d, 0xce0d, 0xce0d, 0xce0d,
-	0xce0d, 0xce0d, 0xce0d, 0xce0f, 0xce7e, 0xce0d, 0xce0d, 0xce0d,
-	0xce0d, 0xce7e, 0xce0d, 0xce0d, 0xce0d, 0x080c, 0x0db4, 0x2001,
-	0x0105, 0x2004, 0x9084, 0x1800, 0x01c8, 0x2001, 0x0132, 0x200c,
-	0x2001, 0x0131, 0x2004, 0x9105, 0x1904, 0xce7e, 0x2009, 0x180c,
-	0x2104, 0xd0d4, 0x0904, 0xce7e, 0xc0d4, 0x200a, 0x2009, 0x0105,
-	0x2104, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x200a, 0x2001, 0x1873,
-	0x2004, 0xd0e4, 0x1528, 0x603b, 0x0000, 0x080c, 0x8923, 0x6014,
-	0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0188, 0x908c, 0x0003, 0x918e,
-	0x0002, 0x0508, 0x2001, 0x180c, 0x2004, 0xd0d4, 0x11e0, 0x080c,
-	0x8a4e, 0x2009, 0x0041, 0x009e, 0x0804, 0xcf3e, 0x080c, 0x8a4e,
-	0x6003, 0x0007, 0x601b, 0x0000, 0x080c, 0x8204, 0x009e, 0x0005,
-	0x2001, 0x0100, 0x2004, 0x9082, 0x0005, 0x0aa8, 0x2001, 0x011f,
-	0x2004, 0x603a, 0x0890, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102,
-	0xd1cc, 0x0110, 0x080c, 0x2a77, 0x080c, 0x8a4e, 0x6014, 0x2048,
-	0xa97c, 0xd1ec, 0x1130, 0x080c, 0x8204, 0x080c, 0x9e32, 0x009e,
-	0x0005, 0x080c, 0xd72f, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c,
-	0x200c, 0xc1d4, 0x2102, 0x0036, 0x080c, 0x8923, 0x080c, 0x8a4e,
-	0x6014, 0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140,
-	0xa8ac, 0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e,
-	0x6003, 0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xd4d5, 0x6018,
-	0x9005, 0x1128, 0x2001, 0x1958, 0x2004, 0x8003, 0x601a, 0x6017,
-	0x0000, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040,
-	0x0002, 0xcecd, 0xcecd, 0xcecd, 0xcecd, 0xcecd, 0xcecd, 0xcecd,
-	0xcecd, 0xcecf, 0xcecd, 0xcecd, 0xcecd, 0xcecd, 0xcecd, 0xcecd,
-	0xcecd, 0xcecd, 0xcecd, 0xcecd, 0xcf1a, 0x080c, 0x0db4, 0x6014,
-	0x0096, 0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900,
-	0x00be, 0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128,
-	0x2009, 0x0041, 0x009e, 0x0804, 0xcf3e, 0x6003, 0x0007, 0x601b,
-	0x0000, 0x080c, 0x8204, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58,
-	0x0006, 0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030,
-	0x9420, 0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8,
-	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009,
-	0x180e, 0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003,
-	0x0006, 0x00e9, 0x080c, 0x8206, 0x009e, 0x0005, 0x6003, 0x0002,
-	0x009e, 0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x150f, 0x1904,
-	0xcecf, 0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e,
-	0x9105, 0x1120, 0x080c, 0x150f, 0x1904, 0xcecf, 0x0005, 0xd2fc,
-	0x0140, 0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009,
-	0x0010, 0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040,
-	0x0208, 0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c,
-	0x0db4, 0x6024, 0xd0dc, 0x090c, 0x0db4, 0x0005, 0xcf61, 0xcf6d,
-	0xcf79, 0xcf85, 0xcf61, 0xcf61, 0xcf61, 0xcf61, 0xcf68, 0xcf63,
-	0xcf63, 0xcf61, 0xcf61, 0xcf61, 0xcf61, 0xcf63, 0xcf61, 0xcf63,
-	0xcf61, 0x080c, 0x0db4, 0x6024, 0xd0dc, 0x090c, 0x0db4, 0x0005,
-	0x6014, 0x9005, 0x190c, 0x0db4, 0x0005, 0x6003, 0x0001, 0x6106,
-	0x080c, 0x83f1, 0x0126, 0x2091, 0x8000, 0x080c, 0x8973, 0x012e,
-	0x0005, 0x6003, 0x0001, 0x6106, 0x080c, 0x83f1, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x8973, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106,
-	0x2c10, 0x080c, 0x1a5c, 0x0126, 0x2091, 0x8000, 0x080c, 0x8456,
-	0x080c, 0x8a4e, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036,
-	0x0096, 0x9182, 0x0040, 0x0023, 0x009e, 0x003e, 0x012e, 0x0005,
-	0xcfb0, 0xcfb2, 0xcfc4, 0xcfde, 0xcfb0, 0xcfb0, 0xcfb0, 0xcfb0,
-	0xcfb0, 0xcfb0, 0xcfb0, 0xcfb0, 0xcfb0, 0xcfb0, 0xcfb0, 0xcfb0,
-	0x080c, 0x0db4, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x01f8, 0x909c,
-	0x0003, 0x939e, 0x0003, 0x01d0, 0x6003, 0x0001, 0x6106, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x0470, 0x6014, 0x2048, 0xa87c, 0xd0fc,
-	0x0168, 0x909c, 0x0003, 0x939e, 0x0003, 0x0140, 0x6003, 0x0001,
-	0x6106, 0x080c, 0x83f1, 0x080c, 0x8973, 0x00e0, 0x901e, 0x6316,
-	0x631a, 0x2019, 0x0004, 0x080c, 0xd4d5, 0x00a0, 0x6014, 0x2048,
-	0xa87c, 0xd0fc, 0x0d98, 0x909c, 0x0003, 0x939e, 0x0003, 0x0d70,
-	0x6003, 0x0003, 0x6106, 0x2c10, 0x080c, 0x1a5c, 0x080c, 0x8456,
-	0x080c, 0x8a4e, 0x0005, 0x080c, 0x886e, 0x6114, 0x81ff, 0x0158,
-	0x0096, 0x2148, 0x080c, 0xd7d3, 0x0036, 0x2019, 0x0029, 0x080c,
-	0xd4d5, 0x003e, 0x009e, 0x080c, 0x9e62, 0x080c, 0x8973, 0x0005,
-	0x080c, 0x8923, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c,
-	0xd7d3, 0x0036, 0x2019, 0x0029, 0x080c, 0xd4d5, 0x003e, 0x009e,
-	0x080c, 0x9e62, 0x080c, 0x8a4e, 0x0005, 0x9182, 0x0085, 0x0002,
-	0xd02f, 0xd02d, 0xd02d, 0xd03b, 0xd02d, 0xd02d, 0xd02d, 0xd02d,
-	0xd02d, 0xd02d, 0xd02d, 0xd02d, 0xd02d, 0x080c, 0x0db4, 0x6003,
-	0x000b, 0x6106, 0x080c, 0x83f1, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x8973, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c, 0xd726, 0x0118,
-	0x080c, 0x9e32, 0x0450, 0x2071, 0x0260, 0x7224, 0x6216, 0x2001,
-	0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6, 0x2058, 0xbca0,
-	0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0xa152, 0x7220, 0x080c,
-	0xd37b, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007, 0x0087, 0x7224,
-	0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003, 0x0001, 0x080c,
-	0x83f1, 0x080c, 0x8973, 0x080c, 0x8a4e, 0x00ee, 0x002e, 0x0005,
-	0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0db4,
-	0x908a, 0x0092, 0x1a0c, 0x0db4, 0x9082, 0x0085, 0x00a2, 0x9186,
-	0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0x9ec7, 0x0050,
-	0x2001, 0x0007, 0x080c, 0x61bb, 0x080c, 0x886e, 0x080c, 0x9e62,
-	0x080c, 0x8973, 0x0005, 0xd0a0, 0xd0a2, 0xd0a2, 0xd0a0, 0xd0a0,
-	0xd0a0, 0xd0a0, 0xd0a0, 0xd0a0, 0xd0a0, 0xd0a0, 0xd0a0, 0xd0a0,
-	0x080c, 0x0db4, 0x080c, 0x886e, 0x080c, 0x9e62, 0x080c, 0x8973,
-	0x0005, 0x9182, 0x0085, 0x0a0c, 0x0db4, 0x9182, 0x0092, 0x1a0c,
-	0x0db4, 0x9182, 0x0085, 0x0002, 0xd0c1, 0xd0c1, 0xd0c1, 0xd0c3,
+	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8,
+	0x080c, 0x225b, 0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312,
+	0x1218, 0x23a8, 0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8,
+	0x22a8, 0x8108, 0x080c, 0x225b, 0x20a1, 0x0240, 0x0c98, 0x080c,
+	0x225b, 0x2061, 0x1973, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312,
+	0x1218, 0x23a8, 0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138,
+	0x22a8, 0x8108, 0x080c, 0x225b, 0x20a1, 0x0240, 0x0c98, 0x2061,
+	0x1973, 0x2019, 0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020,
+	0x2001, 0x0240, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296,
+	0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005,
+	0x00b6, 0x0066, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637,
+	0x9686, 0x0006, 0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4,
+	0x00ff, 0x9686, 0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085,
+	0x0001, 0x006e, 0x00be, 0x0005, 0x00d6, 0x080c, 0xc920, 0x00de,
+	0x0005, 0x00d6, 0x080c, 0xc92d, 0x1520, 0x680c, 0x908c, 0xff00,
+	0x6820, 0x9084, 0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4,
+	0x0130, 0x9006, 0x080c, 0xd863, 0x2009, 0x0001, 0x0078, 0xd1ec,
+	0x0180, 0x6920, 0x918c, 0x00ff, 0x6824, 0x080c, 0x2665, 0x1148,
+	0x2001, 0x0001, 0x080c, 0xd863, 0x2110, 0x900e, 0x080c, 0x3025,
+	0x0018, 0x9085, 0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6,
+	0x00c6, 0x080c, 0x9e8f, 0x05a8, 0x0016, 0x0026, 0x00c6, 0x2011,
+	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2665, 0x1578, 0x080c,
+	0x61e7, 0x1560, 0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00,
+	0x6012, 0x080c, 0xd747, 0x11d8, 0x080c, 0x30ff, 0x11c0, 0x080c,
+	0xc888, 0x0510, 0x2001, 0x0007, 0x080c, 0x6198, 0x2001, 0x0007,
+	0x080c, 0x61c4, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001,
+	0x6003, 0x0001, 0x080c, 0x8422, 0x080c, 0x896d, 0x0010, 0x080c,
+	0x9e42, 0x9085, 0x0001, 0x00ce, 0x00be, 0x0005, 0x080c, 0x9e42,
+	0x00ce, 0x002e, 0x001e, 0x0ca8, 0x080c, 0x9e42, 0x9006, 0x0c98,
+	0x2069, 0x026d, 0x6800, 0x9082, 0x0010, 0x1228, 0x6017, 0x0000,
+	0x9085, 0x0001, 0x0008, 0x9006, 0x0005, 0x6017, 0x0000, 0x2069,
+	0x026c, 0x6808, 0x9084, 0xff00, 0x9086, 0x0800, 0x1190, 0x6904,
+	0x9186, 0x0018, 0x0118, 0x9186, 0x0014, 0x1158, 0x810f, 0x6800,
+	0x9084, 0x00ff, 0x910d, 0x615a, 0x908e, 0x0014, 0x0110, 0x908e,
+	0x0010, 0x0005, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0db4, 0x91b6,
+	0x0013, 0x1130, 0x2008, 0x91b2, 0x0040, 0x1a04, 0xca75, 0x0092,
+	0x91b6, 0x0027, 0x0120, 0x91b6, 0x0014, 0x190c, 0x0db4, 0x2001,
+	0x0007, 0x080c, 0x61c4, 0x080c, 0x8861, 0x080c, 0x9e72, 0x080c,
+	0x896d, 0x0005, 0xc9aa, 0xc9ac, 0xc9aa, 0xc9aa, 0xc9aa, 0xc9ac,
+	0xc9bb, 0xca6e, 0xca0d, 0xca6e, 0xca1f, 0xca6e, 0xc9bb, 0xca6e,
+	0xca66, 0xca6e, 0xca66, 0xca6e, 0xca6e, 0xc9aa, 0xc9aa, 0xc9aa,
+	0xc9aa, 0xc9aa, 0xc9aa, 0xc9aa, 0xc9aa, 0xc9aa, 0xc9aa, 0xc9aa,
+	0xc9ac, 0xc9aa, 0xca6e, 0xc9aa, 0xc9aa, 0xca6e, 0xc9aa, 0xca6b,
+	0xca6e, 0xc9aa, 0xc9aa, 0xc9aa, 0xc9aa, 0xca6e, 0xca6e, 0xc9aa,
+	0xca6e, 0xca6e, 0xc9aa, 0xc9b6, 0xc9aa, 0xc9aa, 0xc9aa, 0xc9aa,
+	0xca6a, 0xca6e, 0xc9aa, 0xc9aa, 0xca6e, 0xca6e, 0xc9aa, 0xc9aa,
+	0xc9aa, 0xc9aa, 0x080c, 0x0db4, 0x080c, 0x8861, 0x080c, 0xc244,
+	0x6003, 0x0002, 0x080c, 0x896d, 0x0804, 0xca74, 0x9006, 0x080c,
+	0x6184, 0x0804, 0xca6e, 0x080c, 0x6563, 0x1904, 0xca6e, 0x9006,
+	0x080c, 0x6184, 0x6010, 0x2058, 0xb810, 0x9086, 0x00ff, 0x1140,
+	0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x0428,
+	0x6010, 0x2058, 0xb8b0, 0x9005, 0x1178, 0x080c, 0xc22c, 0x1904,
+	0xca6e, 0x0036, 0x0046, 0xbba0, 0x2021, 0x0007, 0x080c, 0x4a86,
+	0x004e, 0x003e, 0x0804, 0xca6e, 0x080c, 0x3130, 0x1904, 0xca6e,
+	0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1138, 0x00f6, 0x2079,
+	0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x2001, 0x0002, 0x080c,
+	0x6198, 0x080c, 0x8861, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007,
+	0x0002, 0x080c, 0x8422, 0x080c, 0x896d, 0x6110, 0x2158, 0x2009,
+	0x0001, 0x080c, 0x802f, 0x0804, 0xca74, 0x6610, 0x2658, 0xbe04,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0904, 0xca6e, 0x9686,
+	0x0004, 0x0904, 0xca6e, 0x2001, 0x0004, 0x0804, 0xca6c, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010,
+	0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4a86, 0x004e, 0x003e,
+	0x2001, 0x0006, 0x080c, 0xca92, 0x6610, 0x2658, 0xbe04, 0x0066,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001,
+	0x0006, 0x080c, 0x61c4, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120,
+	0x2001, 0x0006, 0x080c, 0x6198, 0x080c, 0x6563, 0x11f8, 0x2001,
+	0x1836, 0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686,
+	0x0006, 0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6,
+	0x00fe, 0x0804, 0xc9f5, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006,
+	0x0449, 0x0020, 0x0018, 0x0010, 0x080c, 0x61c4, 0x080c, 0x8861,
+	0x080c, 0x9e42, 0x080c, 0x896d, 0x0005, 0x2600, 0x0002, 0xca89,
+	0xca89, 0xca89, 0xca89, 0xca89, 0xca8b, 0xca89, 0xca89, 0xca89,
+	0xca89, 0xca8b, 0xca89, 0xca89, 0xca89, 0xca8b, 0xca8b, 0xca8b,
+	0xca8b, 0x080c, 0x0db4, 0x080c, 0x8861, 0x080c, 0x9e42, 0x080c,
+	0x896d, 0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900,
+	0xd184, 0x0138, 0x080c, 0x6198, 0x9006, 0x080c, 0x6184, 0x080c,
+	0x3005, 0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804,
+	0x9084, 0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0db4, 0x91b6,
+	0x0015, 0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0db4,
+	0x006b, 0x0005, 0xa8b2, 0xa8b2, 0xa8b2, 0xa8b2, 0xcb27, 0xa8b2,
+	0xcb11, 0xcad2, 0xa8b2, 0xa8b2, 0xa8b2, 0xa8b2, 0xa8b2, 0xa8b2,
+	0xa8b2, 0xa8b2, 0xcb27, 0xa8b2, 0xcb11, 0xcb18, 0xa8b2, 0xa8b2,
+	0xa8b2, 0xa8b2, 0x00f6, 0x080c, 0x6563, 0x11d8, 0x080c, 0xc22c,
+	0x11c0, 0x6010, 0x905d, 0x01a8, 0xb8b0, 0x9005, 0x0190, 0x9006,
+	0x080c, 0x6184, 0x2001, 0x0002, 0x080c, 0x6198, 0x6023, 0x0001,
+	0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8422, 0x080c, 0x896d,
+	0x00f0, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2665,
+	0x11b0, 0x080c, 0x6247, 0x0118, 0x080c, 0x9e42, 0x0080, 0xb810,
+	0x0006, 0xb814, 0x0006, 0xb8b0, 0x0006, 0x080c, 0x5cf4, 0x000e,
+	0xb8b2, 0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0x9e42, 0x00fe,
+	0x0005, 0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0x9e42, 0x0005,
+	0x080c, 0xac98, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
+	0x8422, 0x080c, 0x896d, 0x0010, 0x080c, 0x9e42, 0x0005, 0x0804,
+	0x9e42, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0db4, 0x080c, 0x8861,
+	0x080c, 0x9e72, 0x080c, 0x896d, 0x0005, 0x9182, 0x0040, 0x0002,
+	0xcb4b, 0xcb4b, 0xcb4b, 0xcb4b, 0xcb4d, 0xcb4b, 0xcb4b, 0xcb4b,
+	0xcb4b, 0xcb4b, 0xcb4b, 0xcb4b, 0xcb4b, 0xcb4b, 0xcb4b, 0xcb4b,
+	0xcb4b, 0xcb4b, 0xcb4b, 0x080c, 0x0db4, 0x0096, 0x00b6, 0x00d6,
+	0x00e6, 0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8ac, 0x9005,
+	0x11a8, 0x6106, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904,
+	0xcbb3, 0x080c, 0xd857, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009,
+	0x0001, 0x2011, 0x0200, 0x080c, 0x8218, 0x0020, 0x9026, 0x080c,
+	0xd78c, 0x0c38, 0x080c, 0x0feb, 0x090c, 0x0db4, 0x6003, 0x0007,
+	0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e,
+	0x6008, 0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016,
+	0xa876, 0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c,
+	0x6891, 0x001e, 0x080c, 0xd857, 0x1904, 0xcc13, 0x9486, 0x2000,
+	0x1130, 0x2019, 0x0017, 0x080c, 0xd4c7, 0x0804, 0xcc13, 0x9486,
+	0x0200, 0x1120, 0x080c, 0xd463, 0x0804, 0xcc13, 0x9486, 0x0400,
+	0x0120, 0x9486, 0x1000, 0x1904, 0xcc13, 0x2019, 0x0002, 0x080c,
+	0xd47e, 0x0804, 0xcc13, 0x2069, 0x1a40, 0x6a00, 0xd284, 0x0904,
+	0xcc7d, 0x9284, 0x0300, 0x1904, 0xcc76, 0x6804, 0x9005, 0x0904,
+	0xcc5e, 0x2d78, 0x6003, 0x0007, 0x080c, 0x1004, 0x0904, 0xcc1f,
+	0x7800, 0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000,
+	0x2001, 0x180f, 0x2004, 0xd084, 0x1904, 0xcc81, 0x9006, 0xa802,
+	0xa867, 0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010,
+	0x2058, 0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c,
+	0xa9be, 0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044,
+	0x9084, 0x0003, 0x9080, 0xcc1b, 0x2005, 0xa87e, 0x20a9, 0x000a,
+	0x2001, 0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b,
+	0x0080, 0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003,
+	0x200b, 0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c,
+	0xa9ae, 0x080c, 0x6891, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de,
+	0x00be, 0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001,
+	0x1810, 0x2004, 0xd084, 0x0120, 0x080c, 0x0feb, 0x1904, 0xcbc8,
+	0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x83da,
+	0x080c, 0x896d, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00,
+	0x9086, 0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114,
+	0x918c, 0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007,
+	0x0043, 0x080c, 0x83da, 0x080c, 0x896d, 0x0828, 0x6868, 0x602e,
+	0x686c, 0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041,
+	0x080c, 0x83da, 0x080c, 0x896d, 0x0804, 0xcc13, 0x2001, 0x180e,
+	0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48e9, 0x6017,
+	0xf300, 0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041,
+	0x080c, 0x83da, 0x080c, 0x896d, 0x0804, 0xcc13, 0x6017, 0xf500,
+	0x0c98, 0x6017, 0xf600, 0x0804, 0xcc33, 0x6017, 0xf200, 0x0804,
+	0xcc33, 0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00,
+	0xa87a, 0x7044, 0x9084, 0x0003, 0x9080, 0xcc1b, 0x2005, 0xa87e,
+	0x2928, 0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c,
+	0xa88e, 0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009,
+	0x0205, 0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011,
+	0x0210, 0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c,
+	0x0db4, 0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0029, 0x20a0, 0x2011, 0xccfd, 0x2041, 0x0001,
+	0x223d, 0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003,
+	0x931a, 0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001,
+	0x0260, 0x2098, 0x0c68, 0x2950, 0x080c, 0x1004, 0x0170, 0x2900,
+	0xb002, 0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d,
+	0x0118, 0x080c, 0x101d, 0x0cc8, 0x080c, 0x101d, 0x0804, 0xcc1f,
+	0x2548, 0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b,
+	0x0000, 0x080c, 0xd4f6, 0x0804, 0xcc13, 0x8010, 0x0004, 0x801a,
+	0x0006, 0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013,
+	0x1160, 0x6004, 0x908a, 0x0054, 0x1a0c, 0x0db4, 0x9082, 0x0040,
+	0x0a0c, 0x0db4, 0x2008, 0x0804, 0xcdae, 0x9186, 0x0051, 0x0108,
+	0x00c0, 0x2001, 0x0109, 0x2004, 0xd084, 0x0904, 0xcd5f, 0x0126,
+	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x82c6, 0x002e,
+	0x001e, 0x000e, 0x012e, 0x6000, 0x9086, 0x0002, 0x1580, 0x0804,
+	0xcdf6, 0x9186, 0x0027, 0x0530, 0x9186, 0x0048, 0x0128, 0x9186,
+	0x0014, 0x0500, 0x190c, 0x0db4, 0x2001, 0x0109, 0x2004, 0xd084,
+	0x01f0, 0x00c6, 0x0126, 0x2091, 0x2800, 0x00c6, 0x2061, 0x0100,
+	0x0006, 0x0016, 0x0026, 0x080c, 0x82c6, 0x002e, 0x001e, 0x000e,
+	0x00ce, 0x012e, 0x00ce, 0x6000, 0x9086, 0x0004, 0x190c, 0x0db4,
+	0x0804, 0xced7, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c,
+	0x9ed7, 0x0005, 0xcd75, 0xcd77, 0xcd77, 0xcd9e, 0xcd75, 0xcd75,
+	0xcd75, 0xcd75, 0xcd75, 0xcd75, 0xcd75, 0xcd75, 0xcd75, 0xcd75,
+	0xcd75, 0xcd75, 0xcd75, 0xcd75, 0xcd75, 0x080c, 0x0db4, 0x080c,
+	0x8861, 0x080c, 0x896d, 0x0036, 0x0096, 0x6014, 0x904d, 0x01d8,
+	0x080c, 0xbb2c, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c, 0xd4f6,
+	0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1957, 0x2004,
+	0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096, 0x080c,
+	0x8861, 0x080c, 0x896d, 0x080c, 0xbb2c, 0x0120, 0x6014, 0x2048,
+	0x080c, 0x101d, 0x080c, 0x9e72, 0x009e, 0x0005, 0x0002, 0xcdc2,
+	0xcdd9, 0xcdc4, 0xcdf0, 0xcdc2, 0xcdc2, 0xcdc2, 0xcdc2, 0xcdc2,
+	0xcdc2, 0xcdc2, 0xcdc2, 0xcdc2, 0xcdc2, 0xcdc2, 0xcdc2, 0xcdc2,
+	0xcdc2, 0xcdc2, 0x080c, 0x0db4, 0x0096, 0x080c, 0x8861, 0x6014,
+	0x2048, 0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043,
+	0x080c, 0x9ebc, 0x0010, 0x6003, 0x0004, 0x080c, 0x896d, 0x009e,
+	0x0005, 0x080c, 0x8861, 0x080c, 0xbb2c, 0x0138, 0x6114, 0x0096,
+	0x2148, 0xa97c, 0x009e, 0xd1ec, 0x1138, 0x080c, 0x81ed, 0x080c,
+	0x9e42, 0x080c, 0x896d, 0x0005, 0x080c, 0xd750, 0x0db0, 0x0cc8,
+	0x080c, 0x8861, 0x2009, 0x0041, 0x0804, 0xcf5f, 0x9182, 0x0040,
+	0x0002, 0xce0c, 0xce0e, 0xce0c, 0xce0c, 0xce0c, 0xce0c, 0xce0c,
+	0xce0c, 0xce0c, 0xce0c, 0xce0c, 0xce0c, 0xce0c, 0xce0c, 0xce0c,
+	0xce0c, 0xce0c, 0xce0f, 0xce0c, 0x080c, 0x0db4, 0x0005, 0x00d6,
+	0x080c, 0x81ed, 0x00de, 0x080c, 0xd7a8, 0x080c, 0x9e42, 0x0005,
+	0x9182, 0x0040, 0x0002, 0xce2e, 0xce2e, 0xce2e, 0xce2e, 0xce2e,
+	0xce2e, 0xce2e, 0xce2e, 0xce2e, 0xce30, 0xce9f, 0xce2e, 0xce2e,
+	0xce2e, 0xce2e, 0xce9f, 0xce2e, 0xce2e, 0xce2e, 0x080c, 0x0db4,
+	0x2001, 0x0105, 0x2004, 0x9084, 0x1800, 0x01c8, 0x2001, 0x0132,
+	0x200c, 0x2001, 0x0131, 0x2004, 0x9105, 0x1904, 0xce9f, 0x2009,
+	0x180c, 0x2104, 0xd0d4, 0x0904, 0xce9f, 0xc0d4, 0x200a, 0x2009,
+	0x0105, 0x2104, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x200a, 0x2001,
+	0x1873, 0x2004, 0xd0e4, 0x1528, 0x603b, 0x0000, 0x080c, 0x891d,
+	0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0188, 0x908c, 0x0003,
+	0x918e, 0x0002, 0x0508, 0x2001, 0x180c, 0x2004, 0xd0d4, 0x11e0,
+	0x080c, 0x8a4a, 0x2009, 0x0041, 0x009e, 0x0804, 0xcf5f, 0x080c,
+	0x8a4a, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c, 0x81ed, 0x009e,
+	0x0005, 0x2001, 0x0100, 0x2004, 0x9082, 0x0005, 0x0aa8, 0x2001,
+	0x011f, 0x2004, 0x603a, 0x0890, 0x2001, 0x180c, 0x200c, 0xc1d4,
+	0x2102, 0xd1cc, 0x0110, 0x080c, 0x2a79, 0x080c, 0x8a4a, 0x6014,
+	0x2048, 0xa97c, 0xd1ec, 0x1130, 0x080c, 0x81ed, 0x080c, 0x9e42,
+	0x009e, 0x0005, 0x080c, 0xd750, 0x0db8, 0x009e, 0x0005, 0x2001,
+	0x180c, 0x200c, 0xc1d4, 0x2102, 0x0036, 0x080c, 0x891d, 0x080c,
+	0x8a4a, 0x6014, 0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002,
+	0x0140, 0xa8ac, 0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b,
+	0x632e, 0x6003, 0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xd4f6,
+	0x6018, 0x9005, 0x1128, 0x2001, 0x1957, 0x2004, 0x8003, 0x601a,
+	0x6017, 0x0000, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182,
+	0x0040, 0x0002, 0xceee, 0xceee, 0xceee, 0xceee, 0xceee, 0xceee,
+	0xceee, 0xceee, 0xcef0, 0xceee, 0xceee, 0xceee, 0xceee, 0xceee,
+	0xceee, 0xceee, 0xceee, 0xceee, 0xceee, 0xcf3b, 0x080c, 0x0db4,
+	0x6014, 0x0096, 0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158,
+	0xb900, 0x00be, 0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc,
+	0x0128, 0x2009, 0x0041, 0x009e, 0x0804, 0xcf5f, 0x6003, 0x0007,
+	0x601b, 0x0000, 0x080c, 0x81ed, 0x009e, 0x0005, 0x6124, 0xd1f4,
+	0x1d58, 0x0006, 0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b,
+	0x6030, 0x9420, 0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e,
+	0x08d8, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178,
+	0x2009, 0x180e, 0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010,
+	0x6003, 0x0006, 0x00e9, 0x080c, 0x81ef, 0x009e, 0x0005, 0x6003,
+	0x0002, 0x009e, 0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x1511,
+	0x1904, 0xcef0, 0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938,
+	0x009e, 0x9105, 0x1120, 0x080c, 0x1511, 0x1904, 0xcef0, 0x0005,
+	0xd2fc, 0x0140, 0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009,
+	0x0009, 0x0010, 0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182,
+	0x0040, 0x0208, 0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014,
+	0x190c, 0x0db4, 0x6024, 0xd0dc, 0x090c, 0x0db4, 0x0005, 0xcf82,
+	0xcf8e, 0xcf9a, 0xcfa6, 0xcf82, 0xcf82, 0xcf82, 0xcf82, 0xcf89,
+	0xcf84, 0xcf84, 0xcf82, 0xcf82, 0xcf82, 0xcf82, 0xcf84, 0xcf82,
+	0xcf84, 0xcf82, 0x080c, 0x0db4, 0x6024, 0xd0dc, 0x090c, 0x0db4,
+	0x0005, 0x6014, 0x9005, 0x190c, 0x0db4, 0x0005, 0x6003, 0x0001,
+	0x6106, 0x080c, 0x83da, 0x0126, 0x2091, 0x8000, 0x080c, 0x896d,
+	0x012e, 0x0005, 0x6003, 0x0001, 0x6106, 0x080c, 0x83da, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x896d, 0x012e, 0x0005, 0x6003, 0x0003,
+	0x6106, 0x2c10, 0x080c, 0x1a5e, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x843f, 0x080c, 0x8a4a, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x0036, 0x0096, 0x9182, 0x0040, 0x0023, 0x009e, 0x003e, 0x012e,
+	0x0005, 0xcfd1, 0xcfd3, 0xcfe5, 0xcfff, 0xcfd1, 0xcfd1, 0xcfd1,
+	0xcfd1, 0xcfd1, 0xcfd1, 0xcfd1, 0xcfd1, 0xcfd1, 0xcfd1, 0xcfd1,
+	0xcfd1, 0x080c, 0x0db4, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x01f8,
+	0x909c, 0x0003, 0x939e, 0x0003, 0x01d0, 0x6003, 0x0001, 0x6106,
+	0x080c, 0x83da, 0x080c, 0x896d, 0x0470, 0x6014, 0x2048, 0xa87c,
+	0xd0fc, 0x0168, 0x909c, 0x0003, 0x939e, 0x0003, 0x0140, 0x6003,
+	0x0001, 0x6106, 0x080c, 0x83da, 0x080c, 0x896d, 0x00e0, 0x901e,
+	0x6316, 0x631a, 0x2019, 0x0004, 0x080c, 0xd4f6, 0x00a0, 0x6014,
+	0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c, 0x0003, 0x939e, 0x0003,
+	0x0d70, 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c, 0x1a5e, 0x080c,
+	0x843f, 0x080c, 0x8a4a, 0x0005, 0x080c, 0x8861, 0x6114, 0x81ff,
+	0x0158, 0x0096, 0x2148, 0x080c, 0xd7f4, 0x0036, 0x2019, 0x0029,
+	0x080c, 0xd4f6, 0x003e, 0x009e, 0x080c, 0x9e72, 0x080c, 0x896d,
+	0x0005, 0x080c, 0x891d, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148,
+	0x080c, 0xd7f4, 0x0036, 0x2019, 0x0029, 0x080c, 0xd4f6, 0x003e,
+	0x009e, 0x080c, 0x9e72, 0x080c, 0x8a4a, 0x0005, 0x9182, 0x0085,
+	0x0002, 0xd050, 0xd04e, 0xd04e, 0xd05c, 0xd04e, 0xd04e, 0xd04e,
+	0xd04e, 0xd04e, 0xd04e, 0xd04e, 0xd04e, 0xd04e, 0x080c, 0x0db4,
+	0x6003, 0x000b, 0x6106, 0x080c, 0x83da, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x896d, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c, 0xd747,
+	0x0118, 0x080c, 0x9e42, 0x0450, 0x2071, 0x0260, 0x7224, 0x6216,
+	0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6, 0x2058,
+	0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0xa162, 0x7220,
+	0x080c, 0xd39c, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007, 0x0087,
+	0x7224, 0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003, 0x0001,
+	0x080c, 0x83da, 0x080c, 0x896d, 0x080c, 0x8a4a, 0x00ee, 0x002e,
+	0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c,
+	0x0db4, 0x908a, 0x0092, 0x1a0c, 0x0db4, 0x9082, 0x0085, 0x00a2,
+	0x9186, 0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0x9ed7,
+	0x0050, 0x2001, 0x0007, 0x080c, 0x61c4, 0x080c, 0x8861, 0x080c,
+	0x9e72, 0x080c, 0x896d, 0x0005, 0xd0c1, 0xd0c3, 0xd0c3, 0xd0c1,
 	0xd0c1, 0xd0c1, 0xd0c1, 0xd0c1, 0xd0c1, 0xd0c1, 0xd0c1, 0xd0c1,
-	0xd0c1, 0x080c, 0x0db4, 0x0005, 0x9186, 0x0013, 0x0148, 0x9186,
-	0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0x9ec7, 0x0030,
-	0x080c, 0x886e, 0x080c, 0x9e62, 0x080c, 0x8973, 0x0005, 0x0036,
-	0x080c, 0xd787, 0x6043, 0x0000, 0x2019, 0x000b, 0x0031, 0x6023,
-	0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x0126, 0x0036, 0x2091,
-	0x8000, 0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0x97ba, 0x009e,
-	0x008e, 0x1550, 0x0076, 0x2c38, 0x080c, 0x9865, 0x007e, 0x1520,
-	0x6000, 0x9086, 0x0000, 0x0500, 0x6020, 0x9086, 0x0007, 0x01e0,
-	0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xd787, 0x080c, 0xc22a,
-	0x080c, 0x190d, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xbb17,
-	0x0110, 0x080c, 0xd4d5, 0x009e, 0x6017, 0x0000, 0x080c, 0xd787,
-	0x6023, 0x0007, 0x080c, 0xc22a, 0x003e, 0x012e, 0x0005, 0x00f6,
-	0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079, 0x0260, 0x7938, 0x783c,
-	0x080c, 0x2663, 0x15c8, 0x0016, 0x00c6, 0x080c, 0x623e, 0x1590,
-	0x001e, 0x00c6, 0x2160, 0x080c, 0xc227, 0x00ce, 0x002e, 0x0026,
-	0x0016, 0x2019, 0x0029, 0x080c, 0x9926, 0x080c, 0x8571, 0x0076,
-	0x903e, 0x080c, 0x8469, 0x007e, 0x001e, 0x0076, 0x903e, 0x080c,
-	0xd29b, 0x007e, 0x0026, 0xba04, 0x9294, 0xff00, 0x8217, 0x9286,
-	0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0, 0x080c, 0x3097,
-	0x002e, 0xbcb0, 0x001e, 0x080c, 0x5ceb, 0xbe12, 0xbd16, 0xbcb2,
-	0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e, 0x00be, 0x00ce,
-	0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016, 0x2009, 0x1823,
-	0x2104, 0x9086, 0x0074, 0x1904, 0xd1c3, 0x2069, 0x0260, 0x6944,
-	0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000, 0x0904, 0xd1c0,
-	0x2001, 0x194d, 0x2004, 0x9005, 0x1140, 0x6010, 0x2058, 0xb8b0,
-	0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948, 0x918a, 0x0001,
-	0x0648, 0x080c, 0xd83b, 0x0118, 0x6978, 0xd1fc, 0x11b8, 0x2009,
-	0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198, 0x6944, 0x9182,
-	0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948, 0x918a, 0x0001,
-	0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0, 0x6017, 0x0100,
-	0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500, 0x0070, 0x6017,
-	0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017, 0x0b00, 0x0028,
-	0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085, 0x0001, 0x0008,
-	0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00b6,
-	0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04, 0x9394, 0x00ff,
-	0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168, 0x9394, 0xff00,
-	0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004, 0x0120, 0x080c,
-	0x624d, 0x0804, 0xd22a, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096,
-	0x2b48, 0x2019, 0x000a, 0x080c, 0xae0d, 0x009e, 0x15a0, 0x2011,
-	0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c,
-	0xae0d, 0x009e, 0x1540, 0x0046, 0x0016, 0xbaa0, 0x2220, 0x9006,
-	0x2009, 0x1854, 0x210c, 0x0038, 0x2009, 0x0029, 0x080c, 0xd52a,
-	0xb800, 0xc0e5, 0xb802, 0x2019, 0x0029, 0x080c, 0x8571, 0x0076,
-	0x2039, 0x0000, 0x080c, 0x8469, 0x2c08, 0x080c, 0xd29b, 0x007e,
-	0x2001, 0x0007, 0x080c, 0x61bb, 0x2001, 0x0007, 0x080c, 0x618f,
-	0x001e, 0x004e, 0x9006, 0x015e, 0x003e, 0x002e, 0x00be, 0x00ce,
-	0x0005, 0x00d6, 0x2069, 0x026e, 0x6800, 0x9086, 0x0800, 0x0118,
-	0x6017, 0x0000, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00f6,
-	0x0016, 0x0026, 0x0036, 0x0156, 0x2079, 0x026c, 0x7930, 0x7834,
-	0x080c, 0x2663, 0x11d0, 0x080c, 0x623e, 0x11b8, 0x2011, 0x0270,
-	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xae0d,
-	0x009e, 0x1158, 0x2011, 0x0274, 0x20a9, 0x0004, 0x0096, 0x2b48,
-	0x2019, 0x0006, 0x080c, 0xae0d, 0x009e, 0x015e, 0x003e, 0x002e,
-	0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x0006, 0x0016, 0x0026,
-	0x0036, 0x0156, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c,
-	0x2663, 0x11d0, 0x080c, 0x623e, 0x11b8, 0x2011, 0x0276, 0x20a9,
-	0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xae0d, 0x009e,
-	0x1158, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
-	0x0006, 0x080c, 0xae0d, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e,
-	0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066,
-	0x0056, 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, 0x2740, 0x2029,
-	0x19c1, 0x252c, 0x2021, 0x19c7, 0x2424, 0x2061, 0x1cd0, 0x2071,
-	0x1800, 0x7650, 0x7070, 0x81ff, 0x0150, 0x0006, 0x9186, 0x1a80,
-	0x000e, 0x0128, 0x8001, 0x9602, 0x1a04, 0xd334, 0x0018, 0x9606,
-	0x0904, 0xd334, 0x2100, 0x9c06, 0x0904, 0xd32b, 0x080c, 0xd56b,
-	0x1904, 0xd32b, 0x080c, 0xd858, 0x0904, 0xd32b, 0x080c, 0xd55b,
-	0x0904, 0xd32b, 0x6720, 0x9786, 0x0001, 0x1148, 0x080c, 0x312e,
-	0x0904, 0xd34f, 0x6004, 0x9086, 0x0000, 0x1904, 0xd34f, 0x9786,
-	0x0004, 0x0904, 0xd34f, 0x9786, 0x0007, 0x0904, 0xd32b, 0x2500,
-	0x9c06, 0x0904, 0xd32b, 0x2400, 0x9c06, 0x05e8, 0x88ff, 0x0118,
-	0x6054, 0x9906, 0x15c0, 0x0096, 0x6000, 0x9086, 0x0004, 0x1120,
-	0x0016, 0x080c, 0x190d, 0x001e, 0x9786, 0x000a, 0x0148, 0x080c,
-	0xbd1d, 0x1130, 0x080c, 0xa7c0, 0x009e, 0x080c, 0x9e62, 0x0418,
-	0x6014, 0x2048, 0x080c, 0xbb17, 0x01d8, 0x9786, 0x0003, 0x1570,
-	0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048,
-	0x080c, 0x0f9d, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0xd7d3,
-	0x0016, 0x080c, 0xbe06, 0x080c, 0x687f, 0x001e, 0x080c, 0xbd00,
-	0x009e, 0x080c, 0x9e62, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x1210, 0x0804, 0xd2af, 0x012e, 0x002e, 0x004e, 0x005e,
-	0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, 0x9786, 0x0006,
-	0x1150, 0x9386, 0x0005, 0x0128, 0x080c, 0xd7d3, 0x080c, 0xd4d5,
-	0x08f8, 0x009e, 0x0c00, 0x9786, 0x000a, 0x0920, 0x0808, 0x81ff,
-	0x09d0, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018, 0x0130, 0x9180,
-	0x0001, 0x2004, 0x9086, 0x002d, 0x1970, 0x6000, 0x9086, 0x0002,
-	0x1950, 0x080c, 0xbd0c, 0x0130, 0x080c, 0xbd1d, 0x1920, 0x080c,
-	0xa7c0, 0x0038, 0x080c, 0x3003, 0x080c, 0xbd1d, 0x1110, 0x080c,
-	0xa7c0, 0x080c, 0x9e62, 0x0804, 0xd32b, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016, 0x2c08, 0x2170,
-	0x9006, 0x080c, 0xd4fc, 0x001e, 0x0120, 0x6020, 0x9084, 0x000f,
-	0x001b, 0x00ee, 0x00ce, 0x0005, 0xd39a, 0xd39a, 0xd39a, 0xd39a,
-	0xd39a, 0xd39a, 0xd39c, 0xd39a, 0xd39a, 0xd39a, 0xd39a, 0x9e62,
-	0x9e62, 0xd39a, 0x9006, 0x0005, 0x0036, 0x0046, 0x0016, 0x7010,
-	0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009, 0x0020, 0x080c,
-	0xd52a, 0x001e, 0x004e, 0x2019, 0x0002, 0x080c, 0xd0e5, 0x003e,
-	0x9085, 0x0001, 0x0005, 0x0096, 0x080c, 0xbb17, 0x0140, 0x6014,
-	0x904d, 0x080c, 0xb74a, 0x687b, 0x0005, 0x080c, 0x688c, 0x009e,
-	0x080c, 0x9e62, 0x9085, 0x0001, 0x0005, 0x2001, 0x0001, 0x080c,
-	0x617b, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019,
-	0x1805, 0x2011, 0x0276, 0x080c, 0xadf9, 0x003e, 0x002e, 0x001e,
-	0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x0076,
-	0x0066, 0x00b6, 0x0126, 0x2091, 0x8000, 0x2740, 0x2061, 0x1cd0,
-	0x2079, 0x0001, 0x8fff, 0x0904, 0xd435, 0x2071, 0x1800, 0x7650,
-	0x7070, 0x8001, 0x9602, 0x1a04, 0xd435, 0x88ff, 0x0120, 0x2800,
-	0x9c06, 0x1590, 0x2078, 0x080c, 0xd55b, 0x0570, 0x2400, 0x9c06,
-	0x0558, 0x6720, 0x9786, 0x0006, 0x1538, 0x9786, 0x0007, 0x0520,
-	0x88ff, 0x1140, 0x6010, 0x9b06, 0x11f8, 0x85ff, 0x0118, 0x6054,
-	0x9106, 0x11d0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xd787,
-	0x080c, 0xc22a, 0x080c, 0x190d, 0x6023, 0x0007, 0x6014, 0x2048,
-	0x080c, 0xbb17, 0x0120, 0x0046, 0x080c, 0xd4d5, 0x004e, 0x009e,
-	0x080c, 0x9e62, 0x88ff, 0x1198, 0x9ce0, 0x0018, 0x2001, 0x1819,
-	0x2004, 0x9c02, 0x1210, 0x0804, 0xd3ea, 0x9006, 0x012e, 0x00be,
-	0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x98c5,
-	0x0001, 0x0ca0, 0x00b6, 0x0076, 0x0056, 0x0086, 0x9046, 0x2029,
-	0x0001, 0x2c20, 0x2019, 0x0002, 0x6210, 0x2258, 0x0096, 0x904e,
-	0x080c, 0x97ba, 0x009e, 0x008e, 0x903e, 0x080c, 0x9865, 0x080c,
-	0xd3db, 0x005e, 0x007e, 0x00be, 0x0005, 0x00b6, 0x0046, 0x0056,
-	0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e,
-	0x0016, 0x0036, 0x080c, 0x623e, 0x1190, 0x0056, 0x0086, 0x9046,
-	0x2508, 0x2029, 0x0001, 0x0096, 0x904e, 0x080c, 0x97ba, 0x009e,
-	0x008e, 0x903e, 0x080c, 0x9865, 0x080c, 0xd3db, 0x005e, 0x003e,
-	0x001e, 0x8108, 0x1f04, 0xd468, 0x015e, 0x00ce, 0x007e, 0x005e,
-	0x004e, 0x00be, 0x0005, 0x00b6, 0x0076, 0x0056, 0x6210, 0x2258,
-	0x0086, 0x9046, 0x2029, 0x0001, 0x2019, 0x0048, 0x0096, 0x904e,
-	0x080c, 0x97ba, 0x009e, 0x008e, 0x903e, 0x080c, 0x9865, 0x2c20,
-	0x080c, 0xd3db, 0x005e, 0x007e, 0x00be, 0x0005, 0x00b6, 0x0046,
-	0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9, 0x0800, 0x900e,
-	0x0016, 0x0036, 0x080c, 0x623e, 0x11a0, 0x0086, 0x9046, 0x2828,
-	0x0046, 0x2021, 0x0001, 0x080c, 0xd76b, 0x004e, 0x0096, 0x904e,
-	0x080c, 0x97ba, 0x009e, 0x008e, 0x903e, 0x080c, 0x9865, 0x080c,
-	0xd3db, 0x003e, 0x001e, 0x8108, 0x1f04, 0xd4b0, 0x015e, 0x00ce,
-	0x007e, 0x005e, 0x004e, 0x00be, 0x0005, 0x0016, 0x00f6, 0x080c,
-	0xbb15, 0x0198, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0046, 0x0180,
-	0xa800, 0x907d, 0x0138, 0xa803, 0x0000, 0xab82, 0x080c, 0x688c,
-	0x2f48, 0x0cb0, 0xab82, 0x080c, 0x688c, 0x00fe, 0x001e, 0x0005,
-	0xa800, 0x907d, 0x0130, 0xa803, 0x0000, 0x080c, 0x688c, 0x2f48,
-	0x0cb8, 0x080c, 0x688c, 0x0c88, 0x00e6, 0x0046, 0x0036, 0x2061,
-	0x1cd0, 0x9005, 0x1138, 0x2071, 0x1800, 0x7450, 0x7070, 0x8001,
-	0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000, 0x9086, 0x0000,
-	0x0148, 0x6008, 0x9206, 0x1130, 0x6010, 0x91a0, 0x0004, 0x2424,
-	0x9406, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004, 0x9c02,
-	0x1220, 0x0c40, 0x9085, 0x0001, 0x0008, 0x9006, 0x003e, 0x004e,
-	0x00ee, 0x0005, 0x0096, 0x0006, 0x080c, 0x0feb, 0x000e, 0x090c,
-	0x0db4, 0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026, 0x2010, 0x080c,
-	0xbb05, 0x2001, 0x0000, 0x0120, 0x2200, 0x9080, 0x0015, 0x2004,
-	0x002e, 0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3, 0xffff, 0xa986,
-	0xac76, 0xa87f, 0x0000, 0x2001, 0x195f, 0x2004, 0xa882, 0x9006,
-	0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000, 0x080c, 0x688c,
-	0x012e, 0x009e, 0x0005, 0x6700, 0x9786, 0x0000, 0x0158, 0x9786,
-	0x0001, 0x0140, 0x9786, 0x000a, 0x0128, 0x9786, 0x0009, 0x0110,
-	0x9085, 0x0001, 0x0005, 0x00e6, 0x6010, 0x9075, 0x0138, 0x00b6,
-	0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005, 0x9085, 0x0001,
-	0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e, 0x11a0, 0x8007, 0x6134,
-	0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0005, 0x2001, 0x1958, 0x2004, 0x601a, 0x080c, 0x83f1,
-	0x080c, 0x8973, 0x001e, 0x0005, 0xa001, 0xa001, 0x0005, 0x6024,
-	0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c, 0xbe4a, 0x0030, 0x080c,
-	0xd787, 0x080c, 0x8204, 0x080c, 0x9e32, 0x0005, 0x9280, 0x0008,
-	0x2004, 0x9084, 0x000f, 0x0002, 0xd5ba, 0xd5ba, 0xd5ba, 0xd5bc,
-	0xd5ba, 0xd5bc, 0xd5bc, 0xd5ba, 0xd5bc, 0xd5ba, 0xd5ba, 0xd5ba,
-	0xd5ba, 0xd5ba, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x9280,
-	0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd5d3, 0xd5d3, 0xd5d3,
-	0xd5d3, 0xd5d3, 0xd5d3, 0xd5e0, 0xd5d3, 0xd5d3, 0xd5d3, 0xd5d3,
-	0xd5d3, 0xd5d3, 0xd5d3, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017,
-	0x2a00, 0x6003, 0x0001, 0x080c, 0x83f1, 0x080c, 0x8973, 0x0005,
-	0x0096, 0x00c6, 0x2260, 0x080c, 0xd787, 0x6043, 0x0000, 0x6024,
-	0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce, 0x00d6, 0x2268,
-	0x9186, 0x0007, 0x1904, 0xd639, 0x6814, 0x9005, 0x0138, 0x2048,
-	0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8, 0x6007, 0x003a,
-	0x6003, 0x0001, 0x080c, 0x83f1, 0x080c, 0x8973, 0x00c6, 0x2d60,
-	0x6100, 0x9186, 0x0002, 0x1904, 0xd6b0, 0x6014, 0x9005, 0x1138,
-	0x6000, 0x9086, 0x0007, 0x190c, 0x0db4, 0x0804, 0xd6b0, 0x2048,
-	0x080c, 0xbb17, 0x1130, 0x0028, 0x2048, 0xa800, 0x9005, 0x1de0,
-	0x2900, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x1168,
-	0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc, 0xa882, 0x2009,
-	0x0043, 0x080c, 0xcf3e, 0x0804, 0xd6b0, 0x2009, 0x0041, 0x0804,
-	0xd6aa, 0x9186, 0x0005, 0x15a0, 0x6814, 0x2048, 0xa87c, 0xd0bc,
-	0x1120, 0x00de, 0x009e, 0x0804, 0xd5d3, 0xd0b4, 0x0128, 0xd0fc,
-	0x090c, 0x0db4, 0x0804, 0xd5f4, 0x6007, 0x003a, 0x6003, 0x0001,
-	0x080c, 0x83f1, 0x080c, 0x8973, 0x00c6, 0x2d60, 0x6100, 0x9186,
-	0x0002, 0x0120, 0x9186, 0x0004, 0x1904, 0xd6b0, 0x6814, 0x2048,
-	0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc, 0xc1bc, 0xa982,
-	0x00f6, 0x2c78, 0x080c, 0x1648, 0x00fe, 0x2009, 0x0042, 0x04d0,
-	0x0036, 0x080c, 0x0feb, 0x090c, 0x0db4, 0xa867, 0x010d, 0x9006,
-	0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887, 0x0045, 0x2c00,
-	0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd, 0x6026, 0x6010,
-	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004, 0x6354, 0xab7a, 0xa876,
-	0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f, 0x0001, 0x080c,
-	0x688c, 0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xd0e5, 0x2d00,
-	0x600a, 0x6023, 0x0006, 0x6003, 0x0007, 0x901e, 0x631a, 0x6342,
-	0x003e, 0x0038, 0x6043, 0x0000, 0x6003, 0x0007, 0x080c, 0xcf3e,
-	0x00ce, 0x00de, 0x009e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004,
-	0x9082, 0x0085, 0x2008, 0x00c2, 0x9186, 0x0027, 0x1178, 0x080c,
-	0x886e, 0x0036, 0x0096, 0x6014, 0x2048, 0x2019, 0x0004, 0x080c,
-	0xd4d5, 0x009e, 0x003e, 0x080c, 0x8973, 0x0005, 0x9186, 0x0014,
-	0x0d70, 0x080c, 0x9ec7, 0x0005, 0xd6e3, 0xd6e1, 0xd6e1, 0xd6e1,
-	0xd6e1, 0xd6e1, 0xd6e3, 0xd6e1, 0xd6e1, 0xd6e1, 0xd6e1, 0xd6e1,
-	0xd6e1, 0x080c, 0x0db4, 0x080c, 0x886e, 0x6003, 0x000c, 0x080c,
-	0x8973, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208,
-	0x001a, 0x080c, 0x9ec7, 0x0005, 0xd701, 0xd701, 0xd701, 0xd701,
-	0xd703, 0xd723, 0xd701, 0xd701, 0xd701, 0xd701, 0xd701, 0xd701,
-	0xd701, 0x080c, 0x0db4, 0x00d6, 0x2c68, 0x080c, 0x9ddc, 0x01b0,
-	0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c, 0x613a,
-	0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910, 0x6112,
-	0x6023, 0x0004, 0x080c, 0x83f1, 0x080c, 0x8973, 0x2d60, 0x080c,
-	0x9e32, 0x00de, 0x0005, 0x080c, 0x9e32, 0x0005, 0x00e6, 0x6010,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005, 0x2009,
-	0x1873, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024, 0xc0e5,
-	0x6026, 0xd0cc, 0x0150, 0x2001, 0x1959, 0x2004, 0x6042, 0x2009,
-	0x1873, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x1873, 0x210c,
-	0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001,
-	0x1959, 0x200c, 0x2001, 0x1957, 0x2004, 0x9100, 0x9080, 0x000a,
-	0x6042, 0x6010, 0x00b6, 0x2058, 0xb8ac, 0x00be, 0x0008, 0x2104,
-	0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000,
-	0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x6154, 0xb8ac,
-	0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x6054, 0x9106, 0x1138,
-	0x600c, 0x2072, 0x080c, 0x8204, 0x080c, 0x9e32, 0x0010, 0x9cf0,
-	0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6,
-	0x00b6, 0x6010, 0x2058, 0xb8ac, 0x2068, 0x9005, 0x0130, 0x9c06,
-	0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de, 0x0005,
-	0x0026, 0x0036, 0x0156, 0x2011, 0x182b, 0x2204, 0x9084, 0x00ff,
-	0x2019, 0x026e, 0x2334, 0x9636, 0x1508, 0x8318, 0x2334, 0x2204,
-	0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9, 0x0004,
-	0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xae0d, 0x009e,
-	0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048,
-	0x2019, 0x0006, 0x080c, 0xae0d, 0x009e, 0x1100, 0x015e, 0x003e,
-	0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c64, 0x080c,
-	0x2dbb, 0x00ee, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, 0xa880, 0xc0e5,
-	0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0056,
-	0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000, 0x2029, 0x19c1,
-	0x252c, 0x2021, 0x19c7, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800,
-	0x7650, 0x7070, 0x9606, 0x0578, 0x6720, 0x9786, 0x0001, 0x0118,
-	0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400, 0x9c06,
-	0x01d0, 0x080c, 0xd55b, 0x01b8, 0x080c, 0xd56b, 0x11a0, 0x6000,
-	0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x190d, 0x001e, 0x080c,
-	0xbd0c, 0x1110, 0x080c, 0x3003, 0x080c, 0xbd1d, 0x1110, 0x080c,
-	0xa7c0, 0x080c, 0x9e62, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e, 0x004e, 0x005e,
-	0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001, 0x1810,
-	0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1836, 0x2004, 0xd09c,
-	0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c, 0xc212, 0x0168,
-	0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6, 0x2058, 0xbba0,
-	0x00be, 0x2021, 0x0004, 0x080c, 0x4a76, 0x004e, 0x003e, 0x000e,
-	0x6004, 0x9086, 0x0001, 0x1128, 0x080c, 0x9926, 0x080c, 0x9e62,
-	0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x2061, 0x1cd0,
-	0x2071, 0x1800, 0x7450, 0x7070, 0x8001, 0x9402, 0x12b8, 0x2100,
-	0x9c06, 0x0148, 0x6000, 0x9086, 0x0000, 0x0128, 0x6010, 0x2058,
-	0xb8a0, 0x9206, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x1220, 0x0c60, 0x9085, 0x0001, 0x0008, 0x9006, 0x004e,
-	0x00be, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016,
-	0x2091, 0x8000, 0x2071, 0x1840, 0xd5a4, 0x0118, 0x7034, 0x8000,
-	0x7036, 0xd5b4, 0x0118, 0x7030, 0x8000, 0x7032, 0xd5ac, 0x0178,
-	0x2500, 0x9084, 0x0007, 0x908e, 0x0003, 0x0148, 0x908e, 0x0004,
-	0x0130, 0x908e, 0x0005, 0x0118, 0x2071, 0x184a, 0x0089, 0x001e,
-	0x00ee, 0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091,
-	0x8000, 0x2071, 0x1842, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005,
-	0x2e04, 0x8000, 0x2072, 0x1220, 0x8e70, 0x2e04, 0x8000, 0x2072,
-	0x0005, 0x00e6, 0x2071, 0x1840, 0x0c99, 0x00ee, 0x0005, 0x00e6,
-	0x2071, 0x1844, 0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6,
-	0x2091, 0x8000, 0x2071, 0x1840, 0x7044, 0x8000, 0x7046, 0x00ee,
-	0x000e, 0x012e, 0x0005, 0x0003, 0x000b, 0x04a6, 0x0000, 0xc000,
-	0x0001, 0x8064, 0x0008, 0x0010, 0x0000, 0x8066, 0x0000, 0x0101,
-	0x0008, 0x4407, 0x0003, 0x8060, 0x0000, 0x0400, 0x0000, 0x580d,
-	0x000b, 0x798e, 0x0003, 0x50db, 0x000b, 0x4c0a, 0x0003, 0xbac0,
-	0x0009, 0x008a, 0x0000, 0x0c0a, 0x000b, 0x15fe, 0x0008, 0x340a,
-	0x0003, 0xc4c0, 0x0009, 0x7000, 0x0000, 0xffa0, 0x0001, 0x2000,
-	0x0000, 0x1627, 0x0003, 0x808c, 0x0008, 0x0001, 0x0000, 0x0000,
-	0x0007, 0x4047, 0x000a, 0x808c, 0x0008, 0x0002, 0x0000, 0x0821,
-	0x0003, 0x4022, 0x0000, 0x0022, 0x000b, 0x4122, 0x0008, 0x4447,
-	0x0002, 0x0e4f, 0x000b, 0x0bfe, 0x0008, 0x11a0, 0x0001, 0x122d,
-	0x000b, 0x0ca0, 0x0001, 0x122d, 0x000b, 0x9180, 0x0001, 0x0004,
-	0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066,
-	0x0000, 0x0009, 0x0008, 0x4430, 0x000b, 0x808c, 0x0008, 0x0000,
-	0x0008, 0x0060, 0x0008, 0x8062, 0x0008, 0x0004, 0x0000, 0x8066,
-	0x0000, 0x0411, 0x0000, 0x4438, 0x0003, 0x03fe, 0x0000, 0x43e0,
-	0x0001, 0x0e2a, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008, 0x02e0,
-	0x0001, 0x0e2a, 0x000b, 0x9180, 0x0001, 0x0005, 0x0008, 0x8060,
-	0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0019,
-	0x0000, 0x4447, 0x000b, 0x0240, 0x0002, 0x0a27, 0x000b, 0x00fe,
-	0x0000, 0x322a, 0x000b, 0x112a, 0x0000, 0x002e, 0x0008, 0x022c,
-	0x0008, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c, 0x0008, 0x0002,
-	0x0000, 0x1760, 0x0008, 0x8062, 0x0008, 0x000f, 0x0008, 0x8066,
-	0x0000, 0x0011, 0x0008, 0x4458, 0x0003, 0x01fe, 0x0008, 0x42e0,
-	0x0009, 0x0e1d, 0x0003, 0x00fe, 0x0000, 0x43e0, 0x0001, 0x0e1d,
-	0x0003, 0x1734, 0x0000, 0x1530, 0x0000, 0x1632, 0x0008, 0x0d2a,
-	0x0008, 0x9880, 0x0001, 0x0010, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x1e0a, 0x0008, 0x446a,
-	0x000b, 0x808a, 0x0008, 0x0003, 0x0008, 0x1a60, 0x0000, 0x8062,
-	0x0008, 0x0002, 0x0000, 0x5870, 0x000b, 0x8066, 0x0000, 0x3679,
-	0x0000, 0x4473, 0x0003, 0x5874, 0x0003, 0x3efe, 0x0008, 0x7f4f,
-	0x0002, 0x087a, 0x000b, 0x0d00, 0x0000, 0x0082, 0x0004, 0x8054,
-	0x0008, 0x0011, 0x0008, 0x8074, 0x0000, 0x1010, 0x0008, 0x1efe,
-	0x0000, 0x300a, 0x000b, 0x00b8, 0x0004, 0x000a, 0x000b, 0x00fe,
-	0x0000, 0x348a, 0x000b, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0007,
-	0x0000, 0x8066, 0x0000, 0x0231, 0x0008, 0x4489, 0x0003, 0x03fe,
-	0x0000, 0x04d0, 0x0001, 0x0cb0, 0x0003, 0x82c0, 0x0001, 0x1f00,
-	0x0000, 0xffa0, 0x0001, 0x0400, 0x0000, 0x089f, 0x0003, 0x14b0,
-	0x0003, 0x01fe, 0x0008, 0x0580, 0x0009, 0x7f06, 0x0000, 0x02fe,
-	0x0008, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x0690, 0x0001, 0x109f,
-	0x0003, 0x7f08, 0x0008, 0x84c0, 0x0001, 0xff00, 0x0008, 0x08b0,
-	0x000b, 0x00fe, 0x0000, 0x34a6, 0x0003, 0x8072, 0x0000, 0x1010,
-	0x0008, 0x3944, 0x0002, 0x08a1, 0x000b, 0x00aa, 0x000b, 0x8072,
-	0x0000, 0x2020, 0x0008, 0x3945, 0x000a, 0x08a6, 0x0003, 0x3946,
-	0x000a, 0x0cb7, 0x000b, 0x0000, 0x0007, 0x3943, 0x000a, 0x08b7,
-	0x0003, 0x00aa, 0x000b, 0x00fe, 0x0000, 0x34b5, 0x000b, 0x8072,
-	0x0000, 0x1000, 0x0000, 0x00b7, 0x000b, 0x8072, 0x0000, 0x2000,
-	0x0000, 0x4000, 0x000f, 0x1c60, 0x0000, 0x1b62, 0x0000, 0x8066,
-	0x0000, 0x0231, 0x0008, 0x44bc, 0x0003, 0x58bd, 0x0003, 0x0140,
-	0x0008, 0x0242, 0x0000, 0x1f43, 0x0002, 0x0ccb, 0x0003, 0x0d44,
-	0x0000, 0x0d46, 0x0008, 0x0348, 0x0008, 0x044a, 0x0008, 0x030a,
-	0x0008, 0x040c, 0x0000, 0x0d06, 0x0000, 0x0d08, 0x0008, 0x00cf,
-	0x000b, 0x0344, 0x0008, 0x0446, 0x0008, 0x0548, 0x0008, 0x064a,
-	0x0000, 0x58cf, 0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002, 0x08d6,
-	0x000b, 0x8000, 0x0000, 0x0001, 0x0000, 0x0082, 0x0004, 0x8054,
-	0x0008, 0x0001, 0x0000, 0x8074, 0x0000, 0x2020, 0x0008, 0x4000,
-	0x000f, 0x3a40, 0x000a, 0x0c0d, 0x0003, 0x2b24, 0x0008, 0x2b24,
-	0x0008, 0x58df, 0x000b, 0x8054, 0x0008, 0x0002, 0x0000, 0x1242,
-	0x0002, 0x092d, 0x000b, 0x3a45, 0x000a, 0x091c, 0x0003, 0x8072,
-	0x0000, 0x1000, 0x0000, 0x3945, 0x000a, 0x08ec, 0x000b, 0x8072,
-	0x0000, 0x3010, 0x0000, 0x1e10, 0x000a, 0x7f3c, 0x0000, 0x0917,
-	0x000b, 0x1d00, 0x0002, 0x7f3a, 0x0000, 0x0d60, 0x0000, 0x7f62,
-	0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x44f5, 0x000b, 0x00fe,
-	0x0000, 0x3514, 0x000b, 0x1c60, 0x0000, 0x8062, 0x0008, 0x0001,
-	0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x44fd, 0x0003, 0x00fe,
-	0x0000, 0x3204, 0x000b, 0x0038, 0x0000, 0x0060, 0x0008, 0x8062,
-	0x0008, 0x0019, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x4506,
-	0x0003, 0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f3e, 0x0008, 0x0d60,
-	0x0000, 0x0efe, 0x0008, 0x1f80, 0x0001, 0x7f62, 0x0008, 0x8066,
-	0x0000, 0x0009, 0x0008, 0x4510, 0x000b, 0x003a, 0x0008, 0x1dfe,
-	0x0000, 0x00f1, 0x0003, 0x0036, 0x0008, 0x00b8, 0x0004, 0x012d,
-	0x0003, 0x8074, 0x0000, 0x2000, 0x0000, 0x8072, 0x0000, 0x2000,
-	0x0000, 0x012d, 0x0003, 0x3a44, 0x0002, 0x0a30, 0x000b, 0x8074,
-	0x0000, 0x1000, 0x0000, 0x8072, 0x0000, 0x1000, 0x0000, 0x2d0e,
-	0x0000, 0x2d0e, 0x0000, 0x3601, 0x0003, 0x26fe, 0x0008, 0x26fe,
-	0x0008, 0x2700, 0x0008, 0x2700, 0x0008, 0x00d0, 0x0009, 0x0d3f,
-	0x0003, 0x8074, 0x0000, 0x4040, 0x0008, 0x592d, 0x000b, 0x50db,
-	0x000b, 0x3a46, 0x000a, 0x0d3f, 0x0003, 0x3a47, 0x0002, 0x093a,
-	0x000b, 0x8054, 0x0008, 0x0004, 0x0000, 0x8074, 0x0000, 0x8000,
-	0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0182, 0x0003, 0x92c0,
-	0x0009, 0x0fc8, 0x0000, 0x080a, 0x0003, 0x1246, 0x000a, 0x0dfb,
-	0x000b, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002, 0x0000, 0x8066,
-	0x0000, 0x362a, 0x0000, 0x4544, 0x0003, 0x2000, 0x0000, 0x2000,
-	0x0000, 0x2102, 0x0000, 0x2102, 0x0000, 0x2204, 0x0000, 0x2204,
-	0x0000, 0x2306, 0x0000, 0x2306, 0x0000, 0x2408, 0x0000, 0x2408,
-	0x0000, 0x250a, 0x0000, 0x250a, 0x0000, 0x260c, 0x0000, 0x260c,
-	0x0000, 0x270e, 0x0000, 0x270e, 0x0000, 0x2810, 0x0000, 0x2810,
-	0x0000, 0x2912, 0x0000, 0x2912, 0x0000, 0x1a60, 0x0000, 0x8062,
-	0x0008, 0x0007, 0x0000, 0x8066, 0x0000, 0x0052, 0x0000, 0x455e,
-	0x000b, 0x92c0, 0x0009, 0x0780, 0x0008, 0x0e17, 0x0003, 0x124b,
-	0x0002, 0x0967, 0x0003, 0x2e4d, 0x0002, 0x2e4d, 0x0002, 0x0a01,
-	0x0003, 0x3a46, 0x000a, 0x0d74, 0x0003, 0x5969, 0x000b, 0x8054,
-	0x0008, 0x0004, 0x0000, 0x1243, 0x000a, 0x097e, 0x000b, 0x8010,
-	0x0008, 0x000d, 0x0000, 0x01ef, 0x0004, 0x1810, 0x0000, 0x01ef,
-	0x0004, 0x017e, 0x0003, 0x194d, 0x000a, 0x0978, 0x000b, 0x1243,
-	0x000a, 0x0a0b, 0x0003, 0x5978, 0x000b, 0x8054, 0x0008, 0x0004,
-	0x0000, 0x01e4, 0x000c, 0x1810, 0x0000, 0x01ef, 0x0004, 0x8074,
-	0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30,
-	0x0000, 0x3a42, 0x0002, 0x0d88, 0x0003, 0x15fe, 0x0008, 0x3451,
-	0x000b, 0x000a, 0x000b, 0x8074, 0x0000, 0x0501, 0x0000, 0x8010,
-	0x0008, 0x000c, 0x0008, 0x01ef, 0x0004, 0x000a, 0x000b, 0xbbe0,
-	0x0009, 0x0030, 0x0008, 0x0d9e, 0x000b, 0x18fe, 0x0000, 0x3ce0,
-	0x0009, 0x099b, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x099b,
-	0x0003, 0x01df, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x01dc,
-	0x000b, 0x8076, 0x0008, 0x0041, 0x0008, 0x01dc, 0x000b, 0xbbe0,
-	0x0009, 0x0032, 0x0000, 0x0da3, 0x0003, 0x3c1e, 0x0008, 0x01dc,
-	0x000b, 0xbbe0, 0x0009, 0x0037, 0x0000, 0x0dc1, 0x000b, 0x18fe,
-	0x0000, 0x3ce0, 0x0009, 0x0d9b, 0x000b, 0x8076, 0x0008, 0x0040,
-	0x0000, 0x1a60, 0x0000, 0x8062, 0x0008, 0x000d, 0x0000, 0x2604,
-	0x0008, 0x2604, 0x0008, 0x2706, 0x0008, 0x2706, 0x0008, 0x2808,
-	0x0000, 0x2808, 0x0000, 0x290a, 0x0000, 0x290a, 0x0000, 0x8066,
-	0x0000, 0x0422, 0x0000, 0x45b8, 0x0003, 0x01e4, 0x000c, 0x8054,
-	0x0008, 0x0004, 0x0000, 0x8074, 0x0000, 0xf000, 0x0008, 0x8072,
-	0x0000, 0xb000, 0x0000, 0x0182, 0x0003, 0xbbe0, 0x0009, 0x0038,
-	0x0000, 0x0dd3, 0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x09d0,
-	0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0d97, 0x000b, 0x01df,
-	0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x8072, 0x0000, 0x8000,
-	0x0000, 0x0227, 0x0003, 0x8076, 0x0008, 0x0042, 0x0008, 0x01dc,
-	0x000b, 0xbbe0, 0x0009, 0x0016, 0x0000, 0x0ddc, 0x000b, 0x3a44,
-	0x0002, 0x0c0c, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x8000,
-	0x000f, 0x000a, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x000a,
-	0x000b, 0x3d30, 0x000a, 0x7f00, 0x0000, 0xbc80, 0x0001, 0x0007,
-	0x0000, 0x01e8, 0x0003, 0x1930, 0x000a, 0x7f00, 0x0000, 0x9880,
-	0x0001, 0x0007, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62,
-	0x0008, 0x8066, 0x0000, 0x000a, 0x0008, 0x45ed, 0x0003, 0x4000,
-	0x000f, 0x21ef, 0x0003, 0x0870, 0x0008, 0x4000, 0x000f, 0xbac0,
-	0x0009, 0x0090, 0x0008, 0x09f8, 0x0003, 0x8074, 0x0000, 0x0706,
-	0x0000, 0x01fa, 0x0003, 0x8074, 0x0000, 0x0703, 0x0000, 0x4000,
-	0x000f, 0x8010, 0x0008, 0x0023, 0x0000, 0x0235, 0x0003, 0x8010,
-	0x0008, 0x0008, 0x0000, 0x0235, 0x0003, 0x8010, 0x0008, 0x0022,
-	0x0008, 0x0235, 0x0003, 0x01e4, 0x000c, 0x8010, 0x0008, 0x0007,
-	0x0000, 0x01ef, 0x0004, 0x1810, 0x0000, 0x01ef, 0x0004, 0x0241,
-	0x0003, 0x01e4, 0x000c, 0x8010, 0x0008, 0x001b, 0x0008, 0x01ef,
-	0x0004, 0x1810, 0x0000, 0x01ef, 0x0004, 0x8074, 0x0000, 0xf080,
-	0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x000a,
-	0x000b, 0x8010, 0x0008, 0x0009, 0x0008, 0x0235, 0x0003, 0x8010,
-	0x0008, 0x0005, 0x0008, 0x0235, 0x0003, 0x808c, 0x0008, 0x0001,
-	0x0000, 0x8010, 0x0008, 0x0004, 0x0000, 0x4143, 0x000a, 0x085f,
-	0x0003, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x0d2a, 0x0008, 0x0235,
-	0x0003, 0x8010, 0x0008, 0x0003, 0x0008, 0x0239, 0x0003, 0x8010,
-	0x0008, 0x000b, 0x0000, 0x0239, 0x0003, 0x8010, 0x0008, 0x0002,
-	0x0000, 0x0239, 0x0003, 0x3a47, 0x0002, 0x0d2d, 0x0003, 0x8010,
-	0x0008, 0x0006, 0x0008, 0x0239, 0x0003, 0x8074, 0x0000, 0xf000,
-	0x0008, 0x8072, 0x0000, 0x3000, 0x0008, 0x01ef, 0x0004, 0x01f2,
-	0x0004, 0x3a40, 0x000a, 0x080a, 0x0003, 0x8010, 0x0008, 0x000c,
-	0x0008, 0x01ef, 0x0004, 0x000a, 0x000b, 0x8074, 0x0000, 0xf080,
-	0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x2e4d,
-	0x0002, 0x2e4d, 0x0002, 0x0a4c, 0x0003, 0x8054, 0x0008, 0x0019,
-	0x0000, 0x000a, 0x000b, 0x8054, 0x0008, 0x0009, 0x0008, 0x000a,
-	0x000b, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x022a, 0x000b, 0x15b6,
-	0xf4ac, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040,
-	0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000,
-	0x8000, 0x89e3
+	0xd0c1, 0x080c, 0x0db4, 0x080c, 0x8861, 0x080c, 0x9e72, 0x080c,
+	0x896d, 0x0005, 0x9182, 0x0085, 0x0a0c, 0x0db4, 0x9182, 0x0092,
+	0x1a0c, 0x0db4, 0x9182, 0x0085, 0x0002, 0xd0e2, 0xd0e2, 0xd0e2,
+	0xd0e4, 0xd0e2, 0xd0e2, 0xd0e2, 0xd0e2, 0xd0e2, 0xd0e2, 0xd0e2,
+	0xd0e2, 0xd0e2, 0x080c, 0x0db4, 0x0005, 0x9186, 0x0013, 0x0148,
+	0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0x9ed7,
+	0x0030, 0x080c, 0x8861, 0x080c, 0x9e72, 0x080c, 0x896d, 0x0005,
+	0x0036, 0x080c, 0xd7a8, 0x6043, 0x0000, 0x2019, 0x000b, 0x0031,
+	0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x0126, 0x0036,
+	0x2091, 0x8000, 0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0x97bb,
+	0x009e, 0x008e, 0x1550, 0x0076, 0x2c38, 0x080c, 0x9866, 0x007e,
+	0x1520, 0x6000, 0x9086, 0x0000, 0x0500, 0x6020, 0x9086, 0x0007,
+	0x01e0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xd7a8, 0x080c,
+	0xc244, 0x080c, 0x190f, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c,
+	0xbb2c, 0x0110, 0x080c, 0xd4f6, 0x009e, 0x6017, 0x0000, 0x080c,
+	0xd7a8, 0x6023, 0x0007, 0x080c, 0xc244, 0x003e, 0x012e, 0x0005,
+	0x00f6, 0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079, 0x0260, 0x7938,
+	0x783c, 0x080c, 0x2665, 0x15c8, 0x0016, 0x00c6, 0x080c, 0x6247,
+	0x1590, 0x001e, 0x00c6, 0x2160, 0x080c, 0xc241, 0x00ce, 0x002e,
+	0x0026, 0x0016, 0x2019, 0x0029, 0x080c, 0x992c, 0x080c, 0x8564,
+	0x0076, 0x903e, 0x080c, 0x8452, 0x007e, 0x001e, 0x0076, 0x903e,
+	0x080c, 0xd2bc, 0x007e, 0x0026, 0xba04, 0x9294, 0xff00, 0x8217,
+	0x9286, 0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0, 0x080c,
+	0x3099, 0x002e, 0xbcb0, 0x001e, 0x080c, 0x5cf4, 0xbe12, 0xbd16,
+	0xbcb2, 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e, 0x00be,
+	0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016, 0x2009,
+	0x1823, 0x2104, 0x9086, 0x0074, 0x1904, 0xd1e4, 0x2069, 0x0260,
+	0x6944, 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000, 0x0904,
+	0xd1e1, 0x2001, 0x194c, 0x2004, 0x9005, 0x1140, 0x6010, 0x2058,
+	0xb8b0, 0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948, 0x918a,
+	0x0001, 0x0648, 0x080c, 0xd85c, 0x0118, 0x6978, 0xd1fc, 0x11b8,
+	0x2009, 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198, 0x6944,
+	0x9182, 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948, 0x918a,
+	0x0001, 0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0, 0x6017,
+	0x0100, 0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500, 0x0070,
+	0x6017, 0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017, 0x0b00,
+	0x0028, 0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085, 0x0001,
+	0x0008, 0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005, 0x00c6,
+	0x00b6, 0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04, 0x9394,
+	0x00ff, 0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168, 0x9394,
+	0xff00, 0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004, 0x0120,
+	0x080c, 0x6256, 0x0804, 0xd24b, 0x2011, 0x0276, 0x20a9, 0x0004,
+	0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xae20, 0x009e, 0x15a0,
+	0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006,
+	0x080c, 0xae20, 0x009e, 0x1540, 0x0046, 0x0016, 0xbaa0, 0x2220,
+	0x9006, 0x2009, 0x1854, 0x210c, 0x0038, 0x2009, 0x0029, 0x080c,
+	0xd54b, 0xb800, 0xc0e5, 0xb802, 0x2019, 0x0029, 0x080c, 0x8564,
+	0x0076, 0x2039, 0x0000, 0x080c, 0x8452, 0x2c08, 0x080c, 0xd2bc,
+	0x007e, 0x2001, 0x0007, 0x080c, 0x61c4, 0x2001, 0x0007, 0x080c,
+	0x6198, 0x001e, 0x004e, 0x9006, 0x015e, 0x003e, 0x002e, 0x00be,
+	0x00ce, 0x0005, 0x00d6, 0x2069, 0x026e, 0x6800, 0x9086, 0x0800,
+	0x0118, 0x6017, 0x0000, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6,
+	0x00f6, 0x0016, 0x0026, 0x0036, 0x0156, 0x2079, 0x026c, 0x7930,
+	0x7834, 0x080c, 0x2665, 0x11d0, 0x080c, 0x6247, 0x11b8, 0x2011,
+	0x0270, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c,
+	0xae20, 0x009e, 0x1158, 0x2011, 0x0274, 0x20a9, 0x0004, 0x0096,
+	0x2b48, 0x2019, 0x0006, 0x080c, 0xae20, 0x009e, 0x015e, 0x003e,
+	0x002e, 0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x0006, 0x0016,
+	0x0026, 0x0036, 0x0156, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c,
+	0x080c, 0x2665, 0x11d0, 0x080c, 0x6247, 0x11b8, 0x2011, 0x0276,
+	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xae20,
+	0x009e, 0x1158, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48,
+	0x2019, 0x0006, 0x080c, 0xae20, 0x009e, 0x015e, 0x003e, 0x002e,
+	0x001e, 0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076,
+	0x0066, 0x0056, 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, 0x2740,
+	0x2029, 0x19c0, 0x252c, 0x2021, 0x19c6, 0x2424, 0x2061, 0x1cd0,
+	0x2071, 0x1800, 0x7650, 0x7070, 0x81ff, 0x0150, 0x0006, 0x9186,
+	0x1a7f, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04, 0xd355, 0x0018,
+	0x9606, 0x0904, 0xd355, 0x2100, 0x9c06, 0x0904, 0xd34c, 0x080c,
+	0xd58c, 0x1904, 0xd34c, 0x080c, 0xd879, 0x0904, 0xd34c, 0x080c,
+	0xd57c, 0x0904, 0xd34c, 0x6720, 0x9786, 0x0001, 0x1148, 0x080c,
+	0x3130, 0x0904, 0xd370, 0x6004, 0x9086, 0x0000, 0x1904, 0xd370,
+	0x9786, 0x0004, 0x0904, 0xd370, 0x9786, 0x0007, 0x0904, 0xd34c,
+	0x2500, 0x9c06, 0x0904, 0xd34c, 0x2400, 0x9c06, 0x05e8, 0x88ff,
+	0x0118, 0x6054, 0x9906, 0x15c0, 0x0096, 0x6000, 0x9086, 0x0004,
+	0x1120, 0x0016, 0x080c, 0x190f, 0x001e, 0x9786, 0x000a, 0x0148,
+	0x080c, 0xbd32, 0x1130, 0x080c, 0xa7d1, 0x009e, 0x080c, 0x9e72,
+	0x0418, 0x6014, 0x2048, 0x080c, 0xbb2c, 0x01d8, 0x9786, 0x0003,
+	0x1570, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878,
+	0x2048, 0x080c, 0x0f9d, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c,
+	0xd7f4, 0x0016, 0x080c, 0xbe20, 0x080c, 0x6884, 0x001e, 0x080c,
+	0xbd15, 0x009e, 0x080c, 0x9e72, 0x9ce0, 0x0018, 0x2001, 0x1819,
+	0x2004, 0x9c02, 0x1210, 0x0804, 0xd2d0, 0x012e, 0x002e, 0x004e,
+	0x005e, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, 0x9786,
+	0x0006, 0x1150, 0x9386, 0x0005, 0x0128, 0x080c, 0xd7f4, 0x080c,
+	0xd4f6, 0x08f8, 0x009e, 0x0c00, 0x9786, 0x000a, 0x0920, 0x0808,
+	0x81ff, 0x09d0, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018, 0x0130,
+	0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1970, 0x6000, 0x9086,
+	0x0002, 0x1950, 0x080c, 0xbd21, 0x0130, 0x080c, 0xbd32, 0x1920,
+	0x080c, 0xa7d1, 0x0038, 0x080c, 0x3005, 0x080c, 0xbd32, 0x1110,
+	0x080c, 0xa7d1, 0x080c, 0x9e72, 0x0804, 0xd34c, 0xa864, 0x9084,
+	0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016, 0x2c08,
+	0x2170, 0x9006, 0x080c, 0xd51d, 0x001e, 0x0120, 0x6020, 0x9084,
+	0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, 0xd3bb, 0xd3bb, 0xd3bb,
+	0xd3bb, 0xd3bb, 0xd3bb, 0xd3bd, 0xd3bb, 0xd3bb, 0xd3bb, 0xd3bb,
+	0x9e72, 0x9e72, 0xd3bb, 0x9006, 0x0005, 0x0036, 0x0046, 0x0016,
+	0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009, 0x0020,
+	0x080c, 0xd54b, 0x001e, 0x004e, 0x2019, 0x0002, 0x080c, 0xd106,
+	0x003e, 0x9085, 0x0001, 0x0005, 0x0096, 0x080c, 0xbb2c, 0x0140,
+	0x6014, 0x904d, 0x080c, 0xb75d, 0x687b, 0x0005, 0x080c, 0x6891,
+	0x009e, 0x080c, 0x9e72, 0x9085, 0x0001, 0x0005, 0x2001, 0x0001,
+	0x080c, 0x6184, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004,
+	0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xae0c, 0x003e, 0x002e,
+	0x001e, 0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086,
+	0x0076, 0x0066, 0x00b6, 0x0126, 0x2091, 0x8000, 0x2740, 0x2061,
+	0x1cd0, 0x2079, 0x0001, 0x8fff, 0x0904, 0xd456, 0x2071, 0x1800,
+	0x7650, 0x7070, 0x8001, 0x9602, 0x1a04, 0xd456, 0x88ff, 0x0120,
+	0x2800, 0x9c06, 0x1590, 0x2078, 0x080c, 0xd57c, 0x0570, 0x2400,
+	0x9c06, 0x0558, 0x6720, 0x9786, 0x0006, 0x1538, 0x9786, 0x0007,
+	0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06, 0x11f8, 0x85ff, 0x0118,
+	0x6054, 0x9106, 0x11d0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c,
+	0xd7a8, 0x080c, 0xc244, 0x080c, 0x190f, 0x6023, 0x0007, 0x6014,
+	0x2048, 0x080c, 0xbb2c, 0x0120, 0x0046, 0x080c, 0xd4f6, 0x004e,
+	0x009e, 0x080c, 0x9e72, 0x88ff, 0x1198, 0x9ce0, 0x0018, 0x2001,
+	0x1819, 0x2004, 0x9c02, 0x1210, 0x0804, 0xd40b, 0x9006, 0x012e,
+	0x00be, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005,
+	0x98c5, 0x0001, 0x0ca0, 0x00b6, 0x0076, 0x0056, 0x0086, 0x9046,
+	0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, 0x6210, 0x2258, 0x0096,
+	0x904e, 0x080c, 0x97bb, 0x009e, 0x008e, 0x903e, 0x080c, 0x9866,
+	0x080c, 0xd3fc, 0x005e, 0x007e, 0x00be, 0x0005, 0x00b6, 0x0046,
+	0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f,
+	0x900e, 0x0016, 0x0036, 0x080c, 0x6247, 0x1190, 0x0056, 0x0086,
+	0x9046, 0x2508, 0x2029, 0x0001, 0x0096, 0x904e, 0x080c, 0x97bb,
+	0x009e, 0x008e, 0x903e, 0x080c, 0x9866, 0x080c, 0xd3fc, 0x005e,
+	0x003e, 0x001e, 0x8108, 0x1f04, 0xd489, 0x015e, 0x00ce, 0x007e,
+	0x005e, 0x004e, 0x00be, 0x0005, 0x00b6, 0x0076, 0x0056, 0x6210,
+	0x2258, 0x0086, 0x9046, 0x2029, 0x0001, 0x2019, 0x0048, 0x0096,
+	0x904e, 0x080c, 0x97bb, 0x009e, 0x008e, 0x903e, 0x080c, 0x9866,
+	0x2c20, 0x080c, 0xd3fc, 0x005e, 0x007e, 0x00be, 0x0005, 0x00b6,
+	0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9, 0x0800,
+	0x900e, 0x0016, 0x0036, 0x080c, 0x6247, 0x11a0, 0x0086, 0x9046,
+	0x2828, 0x0046, 0x2021, 0x0001, 0x080c, 0xd78c, 0x004e, 0x0096,
+	0x904e, 0x080c, 0x97bb, 0x009e, 0x008e, 0x903e, 0x080c, 0x9866,
+	0x080c, 0xd3fc, 0x003e, 0x001e, 0x8108, 0x1f04, 0xd4d1, 0x015e,
+	0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x0005, 0x0016, 0x00f6,
+	0x080c, 0xbb2a, 0x0198, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0046,
+	0x0180, 0xa800, 0x907d, 0x0138, 0xa803, 0x0000, 0xab82, 0x080c,
+	0x6891, 0x2f48, 0x0cb0, 0xab82, 0x080c, 0x6891, 0x00fe, 0x001e,
+	0x0005, 0xa800, 0x907d, 0x0130, 0xa803, 0x0000, 0x080c, 0x6891,
+	0x2f48, 0x0cb8, 0x080c, 0x6891, 0x0c88, 0x00e6, 0x0046, 0x0036,
+	0x2061, 0x1cd0, 0x9005, 0x1138, 0x2071, 0x1800, 0x7450, 0x7070,
+	0x8001, 0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000, 0x9086,
+	0x0000, 0x0148, 0x6008, 0x9206, 0x1130, 0x6010, 0x91a0, 0x0004,
+	0x2424, 0x9406, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004,
+	0x9c02, 0x1220, 0x0c40, 0x9085, 0x0001, 0x0008, 0x9006, 0x003e,
+	0x004e, 0x00ee, 0x0005, 0x0096, 0x0006, 0x080c, 0x0feb, 0x000e,
+	0x090c, 0x0db4, 0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026, 0x2010,
+	0x080c, 0xbb1a, 0x2001, 0x0000, 0x0120, 0x2200, 0x9080, 0x0015,
+	0x2004, 0x002e, 0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3, 0xffff,
+	0xa986, 0xac76, 0xa87f, 0x0000, 0x2001, 0x195e, 0x2004, 0xa882,
+	0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6891, 0x012e, 0x009e, 0x0005, 0x6700, 0x9786, 0x0000, 0x0158,
+	0x9786, 0x0001, 0x0140, 0x9786, 0x000a, 0x0128, 0x9786, 0x0009,
+	0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x6010, 0x9075, 0x0138,
+	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005, 0x9085,
+	0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e, 0x11a0, 0x8007,
+	0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0005, 0x2001, 0x1957, 0x2004, 0x601a, 0x080c,
+	0x83da, 0x080c, 0x896d, 0x001e, 0x0005, 0xa001, 0xa001, 0x0005,
+	0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c, 0xbe64, 0x0030,
+	0x080c, 0xd7a8, 0x080c, 0x81ed, 0x080c, 0x9e42, 0x0005, 0x9280,
+	0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd5db, 0xd5db, 0xd5db,
+	0xd5dd, 0xd5db, 0xd5dd, 0xd5dd, 0xd5db, 0xd5dd, 0xd5db, 0xd5db,
+	0xd5db, 0xd5db, 0xd5db, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005,
+	0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd5f4, 0xd5f4,
+	0xd5f4, 0xd5f4, 0xd5f4, 0xd5f4, 0xd601, 0xd5f4, 0xd5f4, 0xd5f4,
+	0xd5f4, 0xd5f4, 0xd5f4, 0xd5f4, 0x6007, 0x003b, 0x602f, 0x0009,
+	0x6017, 0x2a00, 0x6003, 0x0001, 0x080c, 0x83da, 0x080c, 0x896d,
+	0x0005, 0x0096, 0x00c6, 0x2260, 0x080c, 0xd7a8, 0x6043, 0x0000,
+	0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce, 0x00d6,
+	0x2268, 0x9186, 0x0007, 0x1904, 0xd65a, 0x6814, 0x9005, 0x0138,
+	0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8, 0x6007,
+	0x003a, 0x6003, 0x0001, 0x080c, 0x83da, 0x080c, 0x896d, 0x00c6,
+	0x2d60, 0x6100, 0x9186, 0x0002, 0x1904, 0xd6d1, 0x6014, 0x9005,
+	0x1138, 0x6000, 0x9086, 0x0007, 0x190c, 0x0db4, 0x0804, 0xd6d1,
+	0x2048, 0x080c, 0xbb2c, 0x1130, 0x0028, 0x2048, 0xa800, 0x9005,
+	0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002,
+	0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc, 0xa882,
+	0x2009, 0x0043, 0x080c, 0xcf5f, 0x0804, 0xd6d1, 0x2009, 0x0041,
+	0x0804, 0xd6cb, 0x9186, 0x0005, 0x15a0, 0x6814, 0x2048, 0xa87c,
+	0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804, 0xd5f4, 0xd0b4, 0x0128,
+	0xd0fc, 0x090c, 0x0db4, 0x0804, 0xd615, 0x6007, 0x003a, 0x6003,
+	0x0001, 0x080c, 0x83da, 0x080c, 0x896d, 0x00c6, 0x2d60, 0x6100,
+	0x9186, 0x0002, 0x0120, 0x9186, 0x0004, 0x1904, 0xd6d1, 0x6814,
+	0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc, 0xc1bc,
+	0xa982, 0x00f6, 0x2c78, 0x080c, 0x164a, 0x00fe, 0x2009, 0x0042,
+	0x04d0, 0x0036, 0x080c, 0x0feb, 0x090c, 0x0db4, 0xa867, 0x010d,
+	0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887, 0x0045,
+	0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd, 0x6026,
+	0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004, 0x6354, 0xab7a,
+	0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f, 0x0001,
+	0x080c, 0x6891, 0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xd106,
+	0x2d00, 0x600a, 0x6023, 0x0006, 0x6003, 0x0007, 0x901e, 0x631a,
+	0x6342, 0x003e, 0x0038, 0x6043, 0x0000, 0x6003, 0x0007, 0x080c,
+	0xcf5f, 0x00ce, 0x00de, 0x009e, 0x0005, 0x9186, 0x0013, 0x1128,
+	0x6004, 0x9082, 0x0085, 0x2008, 0x00c2, 0x9186, 0x0027, 0x1178,
+	0x080c, 0x8861, 0x0036, 0x0096, 0x6014, 0x2048, 0x2019, 0x0004,
+	0x080c, 0xd4f6, 0x009e, 0x003e, 0x080c, 0x896d, 0x0005, 0x9186,
+	0x0014, 0x0d70, 0x080c, 0x9ed7, 0x0005, 0xd704, 0xd702, 0xd702,
+	0xd702, 0xd702, 0xd702, 0xd704, 0xd702, 0xd702, 0xd702, 0xd702,
+	0xd702, 0xd702, 0x080c, 0x0db4, 0x080c, 0x8861, 0x6003, 0x000c,
+	0x080c, 0x896d, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085,
+	0x0208, 0x001a, 0x080c, 0x9ed7, 0x0005, 0xd722, 0xd722, 0xd722,
+	0xd722, 0xd724, 0xd744, 0xd722, 0xd722, 0xd722, 0xd722, 0xd722,
+	0xd722, 0xd722, 0x080c, 0x0db4, 0x00d6, 0x2c68, 0x080c, 0x9dec,
+	0x01b0, 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c,
+	0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910,
+	0x6112, 0x6023, 0x0004, 0x080c, 0x83da, 0x080c, 0x896d, 0x2d60,
+	0x080c, 0x9e42, 0x00de, 0x0005, 0x080c, 0x9e42, 0x0005, 0x00e6,
+	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005,
+	0x2009, 0x1873, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024,
+	0xc0e5, 0x6026, 0xd0cc, 0x0150, 0x2001, 0x1958, 0x2004, 0x6042,
+	0x2009, 0x1873, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x1873,
+	0x210c, 0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8,
+	0x2001, 0x1958, 0x200c, 0x2001, 0x1956, 0x2004, 0x9100, 0x9080,
+	0x000a, 0x6042, 0x6010, 0x00b6, 0x2058, 0xb8ac, 0x00be, 0x0008,
+	0x2104, 0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f,
+	0x0000, 0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x6154,
+	0xb8ac, 0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x6054, 0x9106,
+	0x1138, 0x600c, 0x2072, 0x080c, 0x81ed, 0x080c, 0x9e42, 0x0010,
+	0x9cf0, 0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005,
+	0x00d6, 0x00b6, 0x6010, 0x2058, 0xb8ac, 0x2068, 0x9005, 0x0130,
+	0x9c06, 0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de,
+	0x0005, 0x0026, 0x0036, 0x0156, 0x2011, 0x182b, 0x2204, 0x9084,
+	0x00ff, 0x2019, 0x026e, 0x2334, 0x9636, 0x1508, 0x8318, 0x2334,
+	0x2204, 0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9,
+	0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xae20,
+	0x009e, 0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096,
+	0x2048, 0x2019, 0x0006, 0x080c, 0xae20, 0x009e, 0x1100, 0x015e,
+	0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c6d,
+	0x080c, 0x2dbd, 0x00ee, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, 0xa880,
+	0xc0e5, 0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066,
+	0x0056, 0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000, 0x2029,
+	0x19c0, 0x252c, 0x2021, 0x19c6, 0x2424, 0x2061, 0x1cd0, 0x2071,
+	0x1800, 0x7650, 0x7070, 0x9606, 0x0578, 0x6720, 0x9786, 0x0001,
+	0x0118, 0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400,
+	0x9c06, 0x01d0, 0x080c, 0xd57c, 0x01b8, 0x080c, 0xd58c, 0x11a0,
+	0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x190f, 0x001e,
+	0x080c, 0xbd21, 0x1110, 0x080c, 0x3005, 0x080c, 0xbd32, 0x1110,
+	0x080c, 0xa7d1, 0x080c, 0x9e72, 0x9ce0, 0x0018, 0x2001, 0x1819,
+	0x2004, 0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e, 0x004e,
+	0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001,
+	0x1810, 0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1836, 0x2004,
+	0xd09c, 0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c, 0xc22c,
+	0x0168, 0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6, 0x2058,
+	0xbba0, 0x00be, 0x2021, 0x0004, 0x080c, 0x4a86, 0x004e, 0x003e,
+	0x000e, 0x6004, 0x9086, 0x0001, 0x1128, 0x080c, 0x992c, 0x080c,
+	0x9e72, 0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x2061,
+	0x1cd0, 0x2071, 0x1800, 0x7450, 0x7070, 0x8001, 0x9402, 0x12b8,
+	0x2100, 0x9c06, 0x0148, 0x6000, 0x9086, 0x0000, 0x0128, 0x6010,
+	0x2058, 0xb8a0, 0x9206, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x1819,
+	0x2004, 0x9c02, 0x1220, 0x0c60, 0x9085, 0x0001, 0x0008, 0x9006,
+	0x004e, 0x00be, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6,
+	0x0016, 0x2091, 0x8000, 0x2071, 0x1840, 0xd5a4, 0x0118, 0x7034,
+	0x8000, 0x7036, 0xd5b4, 0x0118, 0x7030, 0x8000, 0x7032, 0xd5ac,
+	0x0178, 0x2500, 0x9084, 0x0007, 0x908e, 0x0003, 0x0148, 0x908e,
+	0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x2071, 0x184a, 0x0089,
+	0x001e, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6,
+	0x2091, 0x8000, 0x2071, 0x1842, 0x0021, 0x00ee, 0x000e, 0x012e,
+	0x0005, 0x2e04, 0x8000, 0x2072, 0x1220, 0x8e70, 0x2e04, 0x8000,
+	0x2072, 0x0005, 0x00e6, 0x2071, 0x1840, 0x0c99, 0x00ee, 0x0005,
+	0x00e6, 0x2071, 0x1844, 0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006,
+	0x00e6, 0x2091, 0x8000, 0x2071, 0x1840, 0x7044, 0x8000, 0x7046,
+	0x00ee, 0x000e, 0x012e, 0x0005, 0x0003, 0x000b, 0x04a6, 0x0000,
+	0xc000, 0x0001, 0x8064, 0x0008, 0x0010, 0x0000, 0x8066, 0x0000,
+	0x0101, 0x0008, 0x4407, 0x0003, 0x8060, 0x0000, 0x0400, 0x0000,
+	0x580d, 0x000b, 0x798e, 0x0003, 0x50db, 0x000b, 0x4c0a, 0x0003,
+	0xbac0, 0x0009, 0x008a, 0x0000, 0x0c0a, 0x000b, 0x15fe, 0x0008,
+	0x340a, 0x0003, 0xc4c0, 0x0009, 0x7000, 0x0000, 0xffa0, 0x0001,
+	0x2000, 0x0000, 0x1627, 0x0003, 0x808c, 0x0008, 0x0001, 0x0000,
+	0x0000, 0x0007, 0x4047, 0x000a, 0x808c, 0x0008, 0x0002, 0x0000,
+	0x0821, 0x0003, 0x4022, 0x0000, 0x0022, 0x000b, 0x4122, 0x0008,
+	0x4447, 0x0002, 0x0e4f, 0x000b, 0x0bfe, 0x0008, 0x11a0, 0x0001,
+	0x122d, 0x000b, 0x0ca0, 0x0001, 0x122d, 0x000b, 0x9180, 0x0001,
+	0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x0009, 0x0008, 0x4430, 0x000b, 0x808c, 0x0008,
+	0x0000, 0x0008, 0x0060, 0x0008, 0x8062, 0x0008, 0x0004, 0x0000,
+	0x8066, 0x0000, 0x0411, 0x0000, 0x4438, 0x0003, 0x03fe, 0x0000,
+	0x43e0, 0x0001, 0x0e2a, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008,
+	0x02e0, 0x0001, 0x0e2a, 0x000b, 0x9180, 0x0001, 0x0005, 0x0008,
+	0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000,
+	0x0019, 0x0000, 0x4447, 0x000b, 0x0240, 0x0002, 0x0a27, 0x000b,
+	0x00fe, 0x0000, 0x322a, 0x000b, 0x112a, 0x0000, 0x002e, 0x0008,
+	0x022c, 0x0008, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c, 0x0008,
+	0x0002, 0x0000, 0x1760, 0x0008, 0x8062, 0x0008, 0x000f, 0x0008,
+	0x8066, 0x0000, 0x0011, 0x0008, 0x4458, 0x0003, 0x01fe, 0x0008,
+	0x42e0, 0x0009, 0x0e1d, 0x0003, 0x00fe, 0x0000, 0x43e0, 0x0001,
+	0x0e1d, 0x0003, 0x1734, 0x0000, 0x1530, 0x0000, 0x1632, 0x0008,
+	0x0d2a, 0x0008, 0x9880, 0x0001, 0x0010, 0x0000, 0x8060, 0x0000,
+	0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x1e0a, 0x0008,
+	0x446a, 0x000b, 0x808a, 0x0008, 0x0003, 0x0008, 0x1a60, 0x0000,
+	0x8062, 0x0008, 0x0002, 0x0000, 0x5870, 0x000b, 0x8066, 0x0000,
+	0x3679, 0x0000, 0x4473, 0x0003, 0x5874, 0x0003, 0x3efe, 0x0008,
+	0x7f4f, 0x0002, 0x087a, 0x000b, 0x0d00, 0x0000, 0x0082, 0x0004,
+	0x8054, 0x0008, 0x0011, 0x0008, 0x8074, 0x0000, 0x1010, 0x0008,
+	0x1efe, 0x0000, 0x300a, 0x000b, 0x00b8, 0x0004, 0x000a, 0x000b,
+	0x00fe, 0x0000, 0x348a, 0x000b, 0x1a60, 0x0000, 0x8062, 0x0008,
+	0x0007, 0x0000, 0x8066, 0x0000, 0x0231, 0x0008, 0x4489, 0x0003,
+	0x03fe, 0x0000, 0x04d0, 0x0001, 0x0cb0, 0x0003, 0x82c0, 0x0001,
+	0x1f00, 0x0000, 0xffa0, 0x0001, 0x0400, 0x0000, 0x089f, 0x0003,
+	0x14b0, 0x0003, 0x01fe, 0x0008, 0x0580, 0x0009, 0x7f06, 0x0000,
+	0x02fe, 0x0008, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x0690, 0x0001,
+	0x109f, 0x0003, 0x7f08, 0x0008, 0x84c0, 0x0001, 0xff00, 0x0008,
+	0x08b0, 0x000b, 0x00fe, 0x0000, 0x34a6, 0x0003, 0x8072, 0x0000,
+	0x1010, 0x0008, 0x3944, 0x0002, 0x08a1, 0x000b, 0x00aa, 0x000b,
+	0x8072, 0x0000, 0x2020, 0x0008, 0x3945, 0x000a, 0x08a6, 0x0003,
+	0x3946, 0x000a, 0x0cb7, 0x000b, 0x0000, 0x0007, 0x3943, 0x000a,
+	0x08b7, 0x0003, 0x00aa, 0x000b, 0x00fe, 0x0000, 0x34b5, 0x000b,
+	0x8072, 0x0000, 0x1000, 0x0000, 0x00b7, 0x000b, 0x8072, 0x0000,
+	0x2000, 0x0000, 0x4000, 0x000f, 0x1c60, 0x0000, 0x1b62, 0x0000,
+	0x8066, 0x0000, 0x0231, 0x0008, 0x44bc, 0x0003, 0x58bd, 0x0003,
+	0x0140, 0x0008, 0x0242, 0x0000, 0x1f43, 0x0002, 0x0ccb, 0x0003,
+	0x0d44, 0x0000, 0x0d46, 0x0008, 0x0348, 0x0008, 0x044a, 0x0008,
+	0x030a, 0x0008, 0x040c, 0x0000, 0x0d06, 0x0000, 0x0d08, 0x0008,
+	0x00cf, 0x000b, 0x0344, 0x0008, 0x0446, 0x0008, 0x0548, 0x0008,
+	0x064a, 0x0000, 0x58cf, 0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002,
+	0x08d6, 0x000b, 0x8000, 0x0000, 0x0001, 0x0000, 0x0082, 0x0004,
+	0x8054, 0x0008, 0x0001, 0x0000, 0x8074, 0x0000, 0x2020, 0x0008,
+	0x4000, 0x000f, 0x3a40, 0x000a, 0x0c0d, 0x0003, 0x2b24, 0x0008,
+	0x2b24, 0x0008, 0x58df, 0x000b, 0x8054, 0x0008, 0x0002, 0x0000,
+	0x1242, 0x0002, 0x092d, 0x000b, 0x3a45, 0x000a, 0x091c, 0x0003,
+	0x8072, 0x0000, 0x1000, 0x0000, 0x3945, 0x000a, 0x08ec, 0x000b,
+	0x8072, 0x0000, 0x3010, 0x0000, 0x1e10, 0x000a, 0x7f3c, 0x0000,
+	0x0917, 0x000b, 0x1d00, 0x0002, 0x7f3a, 0x0000, 0x0d60, 0x0000,
+	0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x44f5, 0x000b,
+	0x00fe, 0x0000, 0x3514, 0x000b, 0x1c60, 0x0000, 0x8062, 0x0008,
+	0x0001, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x44fd, 0x0003,
+	0x00fe, 0x0000, 0x3204, 0x000b, 0x0038, 0x0000, 0x0060, 0x0008,
+	0x8062, 0x0008, 0x0019, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008,
+	0x4506, 0x0003, 0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f3e, 0x0008,
+	0x0d60, 0x0000, 0x0efe, 0x0008, 0x1f80, 0x0001, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x0009, 0x0008, 0x4510, 0x000b, 0x003a, 0x0008,
+	0x1dfe, 0x0000, 0x00f1, 0x0003, 0x0036, 0x0008, 0x00b8, 0x0004,
+	0x012d, 0x0003, 0x8074, 0x0000, 0x2000, 0x0000, 0x8072, 0x0000,
+	0x2000, 0x0000, 0x012d, 0x0003, 0x3a44, 0x0002, 0x0a30, 0x000b,
+	0x8074, 0x0000, 0x1000, 0x0000, 0x8072, 0x0000, 0x1000, 0x0000,
+	0x2d0e, 0x0000, 0x2d0e, 0x0000, 0x3601, 0x0003, 0x26fe, 0x0008,
+	0x26fe, 0x0008, 0x2700, 0x0008, 0x2700, 0x0008, 0x00d0, 0x0009,
+	0x0d3f, 0x0003, 0x8074, 0x0000, 0x4040, 0x0008, 0x592d, 0x000b,
+	0x50db, 0x000b, 0x3a46, 0x000a, 0x0d3f, 0x0003, 0x3a47, 0x0002,
+	0x093a, 0x000b, 0x8054, 0x0008, 0x0004, 0x0000, 0x8074, 0x0000,
+	0x8000, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0182, 0x0003,
+	0x92c0, 0x0009, 0x0fc8, 0x0000, 0x080a, 0x0003, 0x1246, 0x000a,
+	0x0dfb, 0x000b, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002, 0x0000,
+	0x8066, 0x0000, 0x362a, 0x0000, 0x4544, 0x0003, 0x2000, 0x0000,
+	0x2000, 0x0000, 0x2102, 0x0000, 0x2102, 0x0000, 0x2204, 0x0000,
+	0x2204, 0x0000, 0x2306, 0x0000, 0x2306, 0x0000, 0x2408, 0x0000,
+	0x2408, 0x0000, 0x250a, 0x0000, 0x250a, 0x0000, 0x260c, 0x0000,
+	0x260c, 0x0000, 0x270e, 0x0000, 0x270e, 0x0000, 0x2810, 0x0000,
+	0x2810, 0x0000, 0x2912, 0x0000, 0x2912, 0x0000, 0x1a60, 0x0000,
+	0x8062, 0x0008, 0x0007, 0x0000, 0x8066, 0x0000, 0x0052, 0x0000,
+	0x455e, 0x000b, 0x92c0, 0x0009, 0x0780, 0x0008, 0x0e17, 0x0003,
+	0x124b, 0x0002, 0x0967, 0x0003, 0x2e4d, 0x0002, 0x2e4d, 0x0002,
+	0x0a01, 0x0003, 0x3a46, 0x000a, 0x0d74, 0x0003, 0x5969, 0x000b,
+	0x8054, 0x0008, 0x0004, 0x0000, 0x1243, 0x000a, 0x097e, 0x000b,
+	0x8010, 0x0008, 0x000d, 0x0000, 0x01ef, 0x0004, 0x1810, 0x0000,
+	0x01ef, 0x0004, 0x017e, 0x0003, 0x194d, 0x000a, 0x0978, 0x000b,
+	0x1243, 0x000a, 0x0a0b, 0x0003, 0x5978, 0x000b, 0x8054, 0x0008,
+	0x0004, 0x0000, 0x01e4, 0x000c, 0x1810, 0x0000, 0x01ef, 0x0004,
+	0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008,
+	0x0d30, 0x0000, 0x3a42, 0x0002, 0x0d88, 0x0003, 0x15fe, 0x0008,
+	0x3451, 0x000b, 0x000a, 0x000b, 0x8074, 0x0000, 0x0501, 0x0000,
+	0x8010, 0x0008, 0x000c, 0x0008, 0x01ef, 0x0004, 0x000a, 0x000b,
+	0xbbe0, 0x0009, 0x0030, 0x0008, 0x0d9e, 0x000b, 0x18fe, 0x0000,
+	0x3ce0, 0x0009, 0x099b, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009,
+	0x099b, 0x0003, 0x01df, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000,
+	0x01dc, 0x000b, 0x8076, 0x0008, 0x0041, 0x0008, 0x01dc, 0x000b,
+	0xbbe0, 0x0009, 0x0032, 0x0000, 0x0da3, 0x0003, 0x3c1e, 0x0008,
+	0x01dc, 0x000b, 0xbbe0, 0x0009, 0x0037, 0x0000, 0x0dc1, 0x000b,
+	0x18fe, 0x0000, 0x3ce0, 0x0009, 0x0d9b, 0x000b, 0x8076, 0x0008,
+	0x0040, 0x0000, 0x1a60, 0x0000, 0x8062, 0x0008, 0x000d, 0x0000,
+	0x2604, 0x0008, 0x2604, 0x0008, 0x2706, 0x0008, 0x2706, 0x0008,
+	0x2808, 0x0000, 0x2808, 0x0000, 0x290a, 0x0000, 0x290a, 0x0000,
+	0x8066, 0x0000, 0x0422, 0x0000, 0x45b8, 0x0003, 0x01e4, 0x000c,
+	0x8054, 0x0008, 0x0004, 0x0000, 0x8074, 0x0000, 0xf000, 0x0008,
+	0x8072, 0x0000, 0xb000, 0x0000, 0x0182, 0x0003, 0xbbe0, 0x0009,
+	0x0038, 0x0000, 0x0dd3, 0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009,
+	0x09d0, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0d97, 0x000b,
+	0x01df, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x8072, 0x0000,
+	0x8000, 0x0000, 0x0227, 0x0003, 0x8076, 0x0008, 0x0042, 0x0008,
+	0x01dc, 0x000b, 0xbbe0, 0x0009, 0x0016, 0x0000, 0x0ddc, 0x000b,
+	0x3a44, 0x0002, 0x0c0c, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000,
+	0x8000, 0x000f, 0x000a, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000,
+	0x000a, 0x000b, 0x3d30, 0x000a, 0x7f00, 0x0000, 0xbc80, 0x0001,
+	0x0007, 0x0000, 0x01e8, 0x0003, 0x1930, 0x000a, 0x7f00, 0x0000,
+	0x9880, 0x0001, 0x0007, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000,
+	0x7f62, 0x0008, 0x8066, 0x0000, 0x000a, 0x0008, 0x45ed, 0x0003,
+	0x4000, 0x000f, 0x21ef, 0x0003, 0x0870, 0x0008, 0x4000, 0x000f,
+	0xbac0, 0x0009, 0x0090, 0x0008, 0x09f8, 0x0003, 0x8074, 0x0000,
+	0x0706, 0x0000, 0x01fa, 0x0003, 0x8074, 0x0000, 0x0703, 0x0000,
+	0x4000, 0x000f, 0x8010, 0x0008, 0x0023, 0x0000, 0x0235, 0x0003,
+	0x8010, 0x0008, 0x0008, 0x0000, 0x0235, 0x0003, 0x8010, 0x0008,
+	0x0022, 0x0008, 0x0235, 0x0003, 0x01e4, 0x000c, 0x8010, 0x0008,
+	0x0007, 0x0000, 0x01ef, 0x0004, 0x1810, 0x0000, 0x01ef, 0x0004,
+	0x0241, 0x0003, 0x01e4, 0x000c, 0x8010, 0x0008, 0x001b, 0x0008,
+	0x01ef, 0x0004, 0x1810, 0x0000, 0x01ef, 0x0004, 0x8074, 0x0000,
+	0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000,
+	0x000a, 0x000b, 0x8010, 0x0008, 0x0009, 0x0008, 0x0235, 0x0003,
+	0x8010, 0x0008, 0x0005, 0x0008, 0x0235, 0x0003, 0x808c, 0x0008,
+	0x0001, 0x0000, 0x8010, 0x0008, 0x0004, 0x0000, 0x4143, 0x000a,
+	0x085f, 0x0003, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x0d2a, 0x0008,
+	0x0235, 0x0003, 0x8010, 0x0008, 0x0003, 0x0008, 0x0239, 0x0003,
+	0x8010, 0x0008, 0x000b, 0x0000, 0x0239, 0x0003, 0x8010, 0x0008,
+	0x0002, 0x0000, 0x0239, 0x0003, 0x3a47, 0x0002, 0x0d2d, 0x0003,
+	0x8010, 0x0008, 0x0006, 0x0008, 0x0239, 0x0003, 0x8074, 0x0000,
+	0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008, 0x01ef, 0x0004,
+	0x01f2, 0x0004, 0x3a40, 0x000a, 0x080a, 0x0003, 0x8010, 0x0008,
+	0x000c, 0x0008, 0x01ef, 0x0004, 0x000a, 0x000b, 0x8074, 0x0000,
+	0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000,
+	0x2e4d, 0x0002, 0x2e4d, 0x0002, 0x0a4c, 0x0003, 0x8054, 0x0008,
+	0x0019, 0x0000, 0x000a, 0x000b, 0x8054, 0x0008, 0x0009, 0x0008,
+	0x000a, 0x000b, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x022a, 0x000b,
+	0x15b6, 0xf4ac, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020,
+	0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000,
+	0x4000, 0x8000, 0x0a42
 };
 #ifdef UNIQUE_FW_NAME
-unsigned short fw2300flx_length01 = 0xd59a;
+unsigned short fw2300flx_length01 = 0xd5bb;
 #else
-unsigned short risc_code_length01 = 0xd59a;
+unsigned short risc_code_length01 = 0xd5bb;
 #endif
 
--- diff/drivers/scsi/qla2xxx/ql6322.c	2004-05-19 22:12:14.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql6322.c	2004-07-01 21:32:43.000000000 +0100
@@ -9,7 +9,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 
-#include "qla_os.h"
 #include "qla_def.h"
 
 static char qla_driver_name[] = "qla6322";
--- diff/drivers/scsi/qla2xxx/ql6322_fw.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/ql6322_fw.c	2004-07-01 21:32:43.000000000 +0100
@@ -18,7 +18,7 @@
  *************************************************************************/
 
 /*
- *	Firmware Version 3.02.28 (14:05 Apr 03, 2004)
+ *	Firmware Version 3.02.30 (07:56 Jun 16, 2004)
  */
 
 #ifdef UNIQUE_FW_NAME
@@ -28,15 +28,15 @@
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned char fw2322flx_version_str[] = {3, 2,28};
+unsigned char fw2322flx_version_str[] = {3, 2,30};
 #else
-unsigned char firmware_version[] = {3, 2,28};
+unsigned char firmware_version[] = {3, 2,30};
 #endif
 
 #ifdef UNIQUE_FW_NAME
-#define fw2322flx_VERSION_STRING "3.02.28"
+#define fw2322flx_VERSION_STRING "3.02.30"
 #else
-#define FW_VERSION_STRING "3.02.28"
+#define FW_VERSION_STRING "3.02.30"
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -50,12 +50,12 @@
 #else
 unsigned short risc_code01[] = { 
 #endif
-	0x0470, 0x0000, 0x0000, 0xce3b, 0x0000, 0x0003, 0x0002, 0x001c,
+	0x0470, 0x0000, 0x0000, 0xce4c, 0x0000, 0x0003, 0x0002, 0x001e,
 	0x0317, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
 	0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
 	0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972,
 	0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-	0x332e, 0x3032, 0x2e32, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9,
+	0x332e, 0x3032, 0x2e33, 0x3020, 0x2020, 0x2020, 0x2400, 0x20a9,
 	0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f,
 	0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001,
 	0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000,
@@ -64,161 +64,161 @@
 	0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00,
 	0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001,
 	0x0000, 0x20c1, 0x0004, 0x20c9, 0x1cff, 0x2059, 0x0000, 0x2b78,
-	0x7883, 0x0004, 0x2089, 0x28de, 0x2051, 0x1800, 0x2a70, 0x20e1,
+	0x7883, 0x0004, 0x2089, 0x28ec, 0x2051, 0x1800, 0x2a70, 0x20e1,
 	0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e3d, 0x00f6,
-	0x7888, 0x9005, 0x11f8, 0x2061, 0xc000, 0x080c, 0x1efc, 0x1170,
-	0x2079, 0x0300, 0x080c, 0x1f12, 0x2061, 0xe000, 0x080c, 0x1efc,
-	0x1128, 0x2079, 0x0380, 0x080c, 0x1f12, 0x0060, 0x00fe, 0x7883,
+	0x7888, 0x9005, 0x11f8, 0x2061, 0xc000, 0x080c, 0x1f09, 0x1170,
+	0x2079, 0x0300, 0x080c, 0x1f1f, 0x2061, 0xe000, 0x080c, 0x1f09,
+	0x1128, 0x2079, 0x0380, 0x080c, 0x1f1f, 0x0060, 0x00fe, 0x7883,
 	0x4010, 0x7837, 0x4010, 0x7833, 0x0010, 0x2091, 0x5000, 0x2091,
 	0x4080, 0x0cf8, 0x00fe, 0x2029, 0x26c0, 0x2031, 0xffff, 0x2039,
 	0x269c, 0x2021, 0x0050, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9,
 	0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e,
 	0x2001, 0x0dc1, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000,
 	0x9086, 0x0000, 0x0120, 0x21a8, 0x4104, 0x8001, 0x1de0, 0x756a,
-	0x766e, 0x7766, 0x7472, 0x7476, 0x00e6, 0x2071, 0x1b1e, 0x2472,
+	0x766e, 0x7766, 0x7472, 0x7476, 0x00e6, 0x2071, 0x1b1d, 0x2472,
 	0x00ee, 0x20a1, 0x1ddc, 0x716c, 0x810d, 0x810d, 0x810d, 0x810d,
 	0x918c, 0x000f, 0x2001, 0x0001, 0x9112, 0x900e, 0x21a8, 0x4104,
 	0x8211, 0x1de0, 0x716c, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218,
 	0x20a8, 0x900e, 0x4104, 0x2009, 0x1800, 0x810d, 0x810d, 0x810d,
 	0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9,
 	0x0001, 0x20a1, 0x0800, 0x900e, 0x20a9, 0x0800, 0x4104, 0x8211,
-	0x1dd8, 0x080c, 0x0f3a, 0x080c, 0x5cea, 0x080c, 0x9b7d, 0x080c,
-	0x10f1, 0x080c, 0x12d6, 0x080c, 0x1a5a, 0x080c, 0x8440, 0x080c,
-	0x0cf7, 0x080c, 0x1076, 0x080c, 0x328b, 0x080c, 0x73cb, 0x080c,
-	0x6722, 0x080c, 0x808a, 0x080c, 0x20dd, 0x080c, 0x7a5f, 0x080c,
-	0x1f2b, 0x080c, 0x2065, 0x080c, 0x20d2, 0x2091, 0x3009, 0x7883,
+	0x1dd8, 0x080c, 0x0f3a, 0x080c, 0x5ce5, 0x080c, 0x9b70, 0x080c,
+	0x10f1, 0x080c, 0x12e1, 0x080c, 0x1a67, 0x080c, 0x8422, 0x080c,
+	0x0cf7, 0x080c, 0x1076, 0x080c, 0x327f, 0x080c, 0x73aa, 0x080c,
+	0x6721, 0x080c, 0x8069, 0x080c, 0x20f6, 0x080c, 0x7a3e, 0x080c,
+	0x1f38, 0x080c, 0x2076, 0x080c, 0x20eb, 0x2091, 0x3009, 0x7883,
 	0x0000, 0x1004, 0x0941, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883,
 	0x4000, 0x7837, 0x4000, 0x7833, 0x0010, 0x0e04, 0x0935, 0x2091,
 	0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x11be, 0x2071, 0x1800, 0x7003, 0x0000, 0x2071, 0x1800, 0x7000,
-	0x908e, 0x0003, 0x1158, 0x080c, 0x499d, 0x080c, 0x32b2, 0x080c,
-	0x7433, 0x080c, 0x6bca, 0x080c, 0x80b3, 0x0c78, 0x000b, 0x0c98,
+	0x11c9, 0x2071, 0x1800, 0x7003, 0x0000, 0x2071, 0x1800, 0x7000,
+	0x908e, 0x0003, 0x1158, 0x080c, 0x499f, 0x080c, 0x32a6, 0x080c,
+	0x7412, 0x080c, 0x6bb9, 0x080c, 0x8092, 0x0c78, 0x000b, 0x0c98,
 	0x0962, 0x0963, 0x0afa, 0x0960, 0x0bab, 0x0cf6, 0x0cf6, 0x0cf6,
 	0x080c, 0x0d65, 0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000,
-	0x9086, 0x0001, 0x1904, 0x0acd, 0x080c, 0x0e8d, 0x080c, 0x70b7,
-	0x0150, 0x080c, 0x70da, 0x15b0, 0x2079, 0x0100, 0x7828, 0x9085,
-	0x1800, 0x782a, 0x0478, 0x080c, 0x6fe8, 0x7000, 0x9086, 0x0001,
+	0x9086, 0x0001, 0x1904, 0x0acd, 0x080c, 0x0e8d, 0x080c, 0x7096,
+	0x0150, 0x080c, 0x70b9, 0x15b0, 0x2079, 0x0100, 0x7828, 0x9085,
+	0x1800, 0x782a, 0x0478, 0x080c, 0x6fc7, 0x7000, 0x9086, 0x0001,
 	0x1904, 0x0acd, 0x7094, 0x9086, 0x0028, 0x1904, 0x0acd, 0x080c,
-	0x8082, 0x080c, 0x8074, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079,
-	0x0100, 0x2011, 0xffff, 0x080c, 0x286d, 0x7a28, 0x9295, 0x5e2c,
-	0x7a2a, 0x2011, 0x6f2d, 0x080c, 0x8159, 0x2011, 0x6f20, 0x080c,
-	0x825f, 0x2011, 0x5b41, 0x080c, 0x8159, 0x2011, 0x8030, 0x901e,
-	0x7392, 0x04d0, 0x080c, 0x53ee, 0x2079, 0x0100, 0x7844, 0x9005,
-	0x1904, 0x0acd, 0x2011, 0x5b41, 0x080c, 0x8159, 0x2011, 0x6f2d,
-	0x080c, 0x8159, 0x2011, 0x6f20, 0x080c, 0x825f, 0x2001, 0x0265,
+	0x8061, 0x080c, 0x8053, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079,
+	0x0100, 0x2011, 0xffff, 0x080c, 0x288c, 0x7a28, 0x9295, 0x5e2c,
+	0x7a2a, 0x2011, 0x6f0c, 0x080c, 0x8138, 0x2011, 0x6eff, 0x080c,
+	0x823e, 0x2011, 0x5b3c, 0x080c, 0x8138, 0x2011, 0x8030, 0x901e,
+	0x7392, 0x04d0, 0x080c, 0x53e9, 0x2079, 0x0100, 0x7844, 0x9005,
+	0x1904, 0x0acd, 0x2011, 0x5b3c, 0x080c, 0x8138, 0x2011, 0x6f0c,
+	0x080c, 0x8138, 0x2011, 0x6eff, 0x080c, 0x823e, 0x2001, 0x0265,
 	0x2001, 0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842,
-	0x2001, 0x1977, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100,
-	0x080c, 0x5c92, 0x00ce, 0x0804, 0x0acd, 0x780f, 0x006b, 0x7a28,
-	0x080c, 0x70bf, 0x0118, 0x9295, 0x5e2c, 0x0010, 0x9295, 0x402c,
-	0x7a2a, 0x2011, 0x8010, 0x73d4, 0x2001, 0x1978, 0x2003, 0x0001,
-	0x080c, 0x273f, 0x080c, 0x48d8, 0x7244, 0xc284, 0x7246, 0x2001,
+	0x2001, 0x1976, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100,
+	0x080c, 0x5c8d, 0x00ce, 0x0804, 0x0acd, 0x780f, 0x006b, 0x7a28,
+	0x080c, 0x709e, 0x0118, 0x9295, 0x5e2c, 0x0010, 0x9295, 0x402c,
+	0x7a2a, 0x2011, 0x8010, 0x73d4, 0x2001, 0x1977, 0x2003, 0x0001,
+	0x080c, 0x2758, 0x080c, 0x48da, 0x7244, 0xc284, 0x7246, 0x2001,
 	0x180c, 0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x2001, 0x0390, 0x2003,
-	0x0400, 0x080c, 0x98c8, 0x080c, 0x91e1, 0x2011, 0x0004, 0x080c,
-	0xb857, 0x080c, 0x98e4, 0x080c, 0x6562, 0x080c, 0x70b7, 0x1120,
-	0x080c, 0x279a, 0x0600, 0x0420, 0x080c, 0x5c99, 0x0140, 0x7093,
-	0x0001, 0x70cf, 0x0000, 0x080c, 0x55bb, 0x0804, 0x0acd, 0x080c,
-	0x538d, 0xd094, 0x01a8, 0x2001, 0x0390, 0x2003, 0x0404, 0x2011,
-	0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x5391, 0xd0d4, 0x1118,
-	0x080c, 0x279a, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x0088,
-	0x080c, 0x5391, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd,
-	0x0040, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x665f,
-	0x0008, 0x2012, 0x080c, 0x6625, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e,
-	0x00a8, 0x707b, 0x0000, 0x080c, 0x70b7, 0x1130, 0x70ac, 0x9005,
+	0x0400, 0x080c, 0x98bb, 0x080c, 0x91c4, 0x2011, 0x0004, 0x080c,
+	0xb852, 0x080c, 0x98d7, 0x080c, 0x6561, 0x080c, 0x7096, 0x1120,
+	0x080c, 0x27b9, 0x0600, 0x0420, 0x080c, 0x5c94, 0x0140, 0x7093,
+	0x0001, 0x70cf, 0x0000, 0x080c, 0x55b6, 0x0804, 0x0acd, 0x080c,
+	0x5388, 0xd094, 0x01a8, 0x2001, 0x0390, 0x2003, 0x0404, 0x2011,
+	0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x538c, 0xd0d4, 0x1118,
+	0x080c, 0x27b9, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x0088,
+	0x080c, 0x538c, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd,
+	0x0040, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x665e,
+	0x0008, 0x2012, 0x080c, 0x6624, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e,
+	0x00a8, 0x707b, 0x0000, 0x080c, 0x7096, 0x1130, 0x70ac, 0x9005,
 	0x1168, 0x080c, 0xbcae, 0x0050, 0x080c, 0xbcae, 0x70d8, 0xd09c,
-	0x1128, 0x70ac, 0x9005, 0x0110, 0x080c, 0x5c6f, 0x70e3, 0x0000,
-	0x70df, 0x0000, 0x70a3, 0x0000, 0x080c, 0x27a2, 0x0228, 0x2011,
-	0x0101, 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x70b7, 0x1178,
-	0x9016, 0x0016, 0x2009, 0x0002, 0x2019, 0x193e, 0x211a, 0x001e,
+	0x1128, 0x70ac, 0x9005, 0x0110, 0x080c, 0x5c6a, 0x70e3, 0x0000,
+	0x70df, 0x0000, 0x70a3, 0x0000, 0x080c, 0x27c1, 0x0228, 0x2011,
+	0x0101, 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x7096, 0x1178,
+	0x9016, 0x0016, 0x2009, 0x0002, 0x2019, 0x193d, 0x211a, 0x001e,
 	0x705b, 0xffff, 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019,
-	0x193e, 0x201b, 0x0000, 0x2079, 0x1853, 0x7804, 0xd0ac, 0x0108,
-	0xc295, 0x72da, 0x080c, 0x70b7, 0x0118, 0x9296, 0x0004, 0x0518,
-	0x2011, 0x0001, 0x080c, 0xb857, 0x70a7, 0x0000, 0x70ab, 0xffff,
-	0x7003, 0x0002, 0x00fe, 0x080c, 0x2ddb, 0x080c, 0x98c8, 0x2011,
-	0x0005, 0x080c, 0x9339, 0x080c, 0x98e4, 0x080c, 0x70b7, 0x0148,
+	0x193d, 0x201b, 0x0000, 0x2079, 0x1853, 0x7804, 0xd0ac, 0x0108,
+	0xc295, 0x72da, 0x080c, 0x7096, 0x0118, 0x9296, 0x0004, 0x0518,
+	0x2011, 0x0001, 0x080c, 0xb852, 0x70a7, 0x0000, 0x70ab, 0xffff,
+	0x7003, 0x0002, 0x00fe, 0x080c, 0x2de9, 0x080c, 0x98bb, 0x2011,
+	0x0005, 0x080c, 0x931c, 0x080c, 0x98d7, 0x080c, 0x7096, 0x0148,
 	0x00c6, 0x2061, 0x0100, 0x0016, 0x2009, 0x0002, 0x61e2, 0x001e,
 	0x00ce, 0x012e, 0x00e0, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003,
-	0x0002, 0x080c, 0x98c8, 0x2011, 0x0005, 0x080c, 0x9339, 0x080c,
-	0x98e4, 0x080c, 0x70b7, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016,
+	0x0002, 0x080c, 0x98bb, 0x2011, 0x0005, 0x080c, 0x931c, 0x080c,
+	0x98d7, 0x080c, 0x7096, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016,
 	0x2009, 0x0002, 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005,
-	0x00c6, 0x00b6, 0x080c, 0x70b7, 0x1118, 0x20a9, 0x0800, 0x0010,
-	0x20a9, 0x0782, 0x080c, 0x70b7, 0x1110, 0x900e, 0x0010, 0x2009,
+	0x00c6, 0x00b6, 0x080c, 0x7096, 0x1118, 0x20a9, 0x0800, 0x0010,
+	0x20a9, 0x0782, 0x080c, 0x7096, 0x1110, 0x900e, 0x0010, 0x2009,
 	0x007e, 0x86ff, 0x0138, 0x9180, 0x1000, 0x2004, 0x905d, 0x0110,
-	0xb800, 0xd0bc, 0x090c, 0x311a, 0x8108, 0x1f04, 0x0ae1, 0x707b,
+	0xb800, 0xd0bc, 0x090c, 0x3116, 0x8108, 0x1f04, 0x0ae1, 0x707b,
 	0x0000, 0x707c, 0x9084, 0x00ff, 0x707e, 0x70af, 0x0000, 0x00be,
 	0x00ce, 0x0005, 0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086,
 	0x0002, 0x1904, 0x0ba8, 0x70a8, 0x9086, 0xffff, 0x0120, 0x080c,
-	0x2ddb, 0x0804, 0x0ba8, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0520,
+	0x2de9, 0x0804, 0x0ba8, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0520,
 	0xd084, 0x0510, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e,
-	0xd08c, 0x01d0, 0x70dc, 0x9086, 0xffff, 0x0190, 0x080c, 0x2f66,
+	0xd08c, 0x01d0, 0x70dc, 0x9086, 0xffff, 0x0190, 0x080c, 0x2f74,
 	0x70d8, 0xd094, 0x1904, 0x0ba8, 0x2011, 0x0001, 0x080c, 0xbf61,
-	0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2fa0, 0x0804, 0x0ba8,
+	0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2fae, 0x0804, 0x0ba8,
 	0x70e0, 0x9005, 0x1904, 0x0ba8, 0x70a4, 0x9005, 0x1904, 0x0ba8,
-	0x70d8, 0xd0a4, 0x0118, 0xd0b4, 0x0904, 0x0ba8, 0x080c, 0x6625,
-	0x1904, 0x0ba8, 0x080c, 0x6678, 0x1904, 0x0ba8, 0x080c, 0x665f,
+	0x70d8, 0xd0a4, 0x0118, 0xd0b4, 0x0904, 0x0ba8, 0x080c, 0x6624,
+	0x1904, 0x0ba8, 0x080c, 0x6677, 0x1904, 0x0ba8, 0x080c, 0x665e,
 	0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c,
-	0x6270, 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04,
+	0x626b, 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04,
 	0x0b4e, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804,
 	0x0ba8, 0x0006, 0x2001, 0x0103, 0x2003, 0x006b, 0x000e, 0x2011,
-	0x1984, 0x080c, 0x0faa, 0x2011, 0x199e, 0x080c, 0x0faa, 0x7030,
+	0x1983, 0x080c, 0x0faa, 0x2011, 0x199d, 0x080c, 0x0faa, 0x7030,
 	0xc08c, 0x7032, 0x7003, 0x0003, 0x70ab, 0xffff, 0x080c, 0x0e61,
-	0x9006, 0x080c, 0x23c9, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021,
-	0x0006, 0x080c, 0x4a75, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100,
-	0x080c, 0x70da, 0x0150, 0x080c, 0x70b7, 0x7828, 0x0118, 0x9084,
-	0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x080c, 0x98c8,
-	0x2001, 0x19b9, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000,
-	0x080c, 0x9339, 0x2011, 0x0000, 0x080c, 0x9343, 0x080c, 0x98e4,
+	0x9006, 0x080c, 0x23e2, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021,
+	0x0006, 0x080c, 0x4a77, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100,
+	0x080c, 0x70b9, 0x0150, 0x080c, 0x7096, 0x7828, 0x0118, 0x9084,
+	0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x080c, 0x98bb,
+	0x2001, 0x19b8, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000,
+	0x080c, 0x931c, 0x2011, 0x0000, 0x080c, 0x9326, 0x080c, 0x98d7,
 	0x012e, 0x00be, 0x0005, 0x0016, 0x0026, 0x0046, 0x00f6, 0x0126,
 	0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, 0xfffd, 0x7906,
-	0x2009, 0x00f7, 0x080c, 0x5c58, 0x7940, 0x918c, 0x0010, 0x7942,
-	0x7924, 0xd1b4, 0x0120, 0x2011, 0x0040, 0x080c, 0x286d, 0xd19c,
-	0x0120, 0x2011, 0x0008, 0x080c, 0x286d, 0x0006, 0x0036, 0x0156,
-	0x0000, 0x2001, 0x1978, 0x2004, 0x9005, 0x1518, 0x080c, 0x2801,
-	0x1148, 0x2001, 0x0001, 0x080c, 0x276e, 0x2001, 0x0001, 0x080c,
-	0x2751, 0x00b8, 0x080c, 0x2809, 0x1138, 0x9006, 0x080c, 0x276e,
-	0x9006, 0x080c, 0x2751, 0x0068, 0x080c, 0x2811, 0x1d50, 0x2001,
-	0x1969, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x2568, 0x0804,
-	0x0ca9, 0x080c, 0x2890, 0x080c, 0x28d4, 0x20a9, 0x003a, 0x1d04,
-	0x0bff, 0x080c, 0x823f, 0x1f04, 0x0bff, 0x080c, 0x70c8, 0x0148,
-	0x080c, 0x70da, 0x1118, 0x080c, 0x73c6, 0x0050, 0x080c, 0x70bf,
-	0x0dd0, 0x080c, 0x73c1, 0x080c, 0x73b7, 0x080c, 0x6fe8, 0x0020,
-	0x2009, 0x00f8, 0x080c, 0x5c58, 0x7850, 0xc0e5, 0x7852, 0x080c,
-	0x70b7, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678,
-	0x2019, 0xea60, 0x0d0c, 0x823f, 0x7820, 0xd09c, 0x15a0, 0x080c,
-	0x70b7, 0x0904, 0x0c8b, 0x7824, 0xd0ac, 0x1904, 0x0cae, 0x080c,
-	0x70da, 0x1548, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e,
-	0x2011, 0x1800, 0x080c, 0x286d, 0x080c, 0x2819, 0x7824, 0x9084,
+	0x2009, 0x00f7, 0x080c, 0x5c53, 0x7940, 0x918c, 0x0010, 0x7942,
+	0x7924, 0xd1b4, 0x0120, 0x2011, 0x0040, 0x080c, 0x288c, 0xd19c,
+	0x0120, 0x2011, 0x0008, 0x080c, 0x288c, 0x0006, 0x0036, 0x0156,
+	0x0000, 0x2001, 0x1977, 0x2004, 0x9005, 0x1518, 0x080c, 0x2820,
+	0x1148, 0x2001, 0x0001, 0x080c, 0x2787, 0x2001, 0x0001, 0x080c,
+	0x276a, 0x00b8, 0x080c, 0x2828, 0x1138, 0x9006, 0x080c, 0x2787,
+	0x9006, 0x080c, 0x276a, 0x0068, 0x080c, 0x2830, 0x1d50, 0x2001,
+	0x1968, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x2581, 0x0804,
+	0x0ca9, 0x080c, 0x28af, 0x080c, 0x28e2, 0x20a9, 0x003a, 0x1d04,
+	0x0bff, 0x080c, 0x821e, 0x1f04, 0x0bff, 0x080c, 0x70a7, 0x0148,
+	0x080c, 0x70b9, 0x1118, 0x080c, 0x73a5, 0x0050, 0x080c, 0x709e,
+	0x0dd0, 0x080c, 0x73a0, 0x080c, 0x7396, 0x080c, 0x6fc7, 0x0020,
+	0x2009, 0x00f8, 0x080c, 0x5c53, 0x7850, 0xc0e5, 0x7852, 0x080c,
+	0x7096, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678,
+	0x2019, 0xea60, 0x0d0c, 0x821e, 0x7820, 0xd09c, 0x15a0, 0x080c,
+	0x7096, 0x0904, 0x0c8b, 0x7824, 0xd0ac, 0x1904, 0x0cae, 0x080c,
+	0x70b9, 0x1548, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e,
+	0x2011, 0x1800, 0x080c, 0x288c, 0x080c, 0x2838, 0x7824, 0x9084,
 	0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810, 0x2004,
 	0x9084, 0x9000, 0x0110, 0x080c, 0x0cd1, 0x8421, 0x1160, 0x1d04,
-	0x0c5b, 0x080c, 0x823f, 0x080c, 0x73c1, 0x080c, 0x73b7, 0x7003,
+	0x0c5b, 0x080c, 0x821e, 0x080c, 0x73a0, 0x080c, 0x7396, 0x7003,
 	0x0001, 0x0804, 0x0cae, 0x8319, 0x1928, 0x2001, 0x1810, 0x2004,
 	0x9084, 0x9000, 0x0110, 0x080c, 0x0cd1, 0x1d04, 0x0c71, 0x080c,
-	0x823f, 0x2009, 0x196c, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
-	0x1188, 0x200b, 0x000a, 0x2011, 0x0048, 0x080c, 0x286d, 0x20a9,
-	0x0002, 0x080c, 0x27fa, 0x7924, 0x080c, 0x2819, 0xd19c, 0x0110,
-	0x080c, 0x273f, 0x00f0, 0x080c, 0x70c8, 0x1140, 0x94a2, 0x03e8,
-	0x1128, 0x080c, 0x708b, 0x7003, 0x0001, 0x00c0, 0x2011, 0x1800,
-	0x080c, 0x286d, 0x080c, 0x2819, 0x7824, 0x080c, 0x70d1, 0x0110,
+	0x821e, 0x2009, 0x196b, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
+	0x1188, 0x200b, 0x000a, 0x2011, 0x0048, 0x080c, 0x288c, 0x20a9,
+	0x0002, 0x080c, 0x2819, 0x7924, 0x080c, 0x2838, 0xd19c, 0x0110,
+	0x080c, 0x2758, 0x00f0, 0x080c, 0x70a7, 0x1140, 0x94a2, 0x03e8,
+	0x1128, 0x080c, 0x706a, 0x7003, 0x0001, 0x00c0, 0x2011, 0x1800,
+	0x080c, 0x288c, 0x080c, 0x2838, 0x7824, 0x080c, 0x70b0, 0x0110,
 	0xd0ac, 0x1160, 0x9084, 0x1800, 0x0904, 0x0c63, 0x7003, 0x0001,
-	0x0028, 0x2001, 0x0001, 0x080c, 0x23c9, 0x00a0, 0x7850, 0xc0e4,
+	0x0028, 0x2001, 0x0001, 0x080c, 0x23e2, 0x00a0, 0x7850, 0xc0e4,
 	0x7852, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d,
-	0x0002, 0x7906, 0x2011, 0x0048, 0x080c, 0x286d, 0x7828, 0x9085,
-	0x0028, 0x782a, 0x2001, 0x1978, 0x2003, 0x0000, 0x9006, 0x78f2,
+	0x0002, 0x7906, 0x2011, 0x0048, 0x080c, 0x288c, 0x7828, 0x9085,
+	0x0028, 0x782a, 0x2001, 0x1977, 0x2003, 0x0000, 0x9006, 0x78f2,
 	0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, 0x002e, 0x001e,
 	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x0046, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0071, 0x0d0c, 0x823f, 0x015e,
+	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0071, 0x0d0c, 0x821e, 0x015e,
 	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x002e,
 	0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x1894, 0x7004, 0x9086,
-	0x0001, 0x1110, 0x080c, 0x32b2, 0x00ee, 0x0005, 0x0005, 0x2a70,
-	0x2061, 0x197c, 0x2063, 0x0003, 0x6007, 0x0002, 0x600b, 0x001c,
-	0x600f, 0x0317, 0x2001, 0x194d, 0x900e, 0x2102, 0x7192, 0x2001,
+	0x0001, 0x1110, 0x080c, 0x32a6, 0x00ee, 0x0005, 0x0005, 0x2a70,
+	0x2061, 0x197b, 0x2063, 0x0003, 0x6007, 0x0002, 0x600b, 0x001e,
+	0x600f, 0x0317, 0x2001, 0x194c, 0x900e, 0x2102, 0x7192, 0x2001,
 	0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, 0x0008,
 	0x715a, 0x7063, 0xffff, 0x717a, 0x717e, 0x080c, 0xbcae, 0x70eb,
-	0x00c0, 0x2061, 0x193d, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
+	0x00c0, 0x2061, 0x193c, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
 	0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x000f, 0x611a, 0x601f,
-	0x07d0, 0x2061, 0x1945, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f,
+	0x07d0, 0x2061, 0x1944, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f,
 	0x0200, 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061,
-	0x195a, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f,
-	0x2020, 0x2001, 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x6270,
+	0x1959, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f,
+	0x2020, 0x2001, 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x626b,
 	0x1178, 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4,
 	0xff00, 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210,
 	0x8108, 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000,
@@ -226,29 +226,29 @@
 	0x0d67, 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000,
 	0x000e, 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e,
 	0x7886, 0x3900, 0x789a, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156,
-	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1af4, 0x7a08,
-	0x226a, 0x2069, 0x1af5, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
-	0x782c, 0x2019, 0x1b02, 0x201a, 0x2019, 0x1b05, 0x9016, 0x7808,
-	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1b1e,
+	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1af3, 0x7a08,
+	0x226a, 0x2069, 0x1af4, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
+	0x782c, 0x2019, 0x1b01, 0x201a, 0x2019, 0x1b04, 0x9016, 0x7808,
+	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1b1d,
 	0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019,
-	0x1b03, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
-	0x1a4a, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
+	0x1b02, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
+	0x1a49, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
 	0x8318, 0x1f04, 0x0db4, 0x0491, 0x002e, 0x003e, 0x00de, 0x015e,
 	0x2079, 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x0180, 0x2001, 0x19f3, 0x2004, 0x9005, 0x0128,
+	0x2004, 0xd084, 0x0180, 0x2001, 0x19f2, 0x2004, 0x9005, 0x0128,
 	0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003,
-	0x0002, 0x2003, 0x1001, 0x080c, 0x539c, 0x1170, 0x080c, 0x0efb,
-	0x0110, 0x080c, 0x0e4e, 0x080c, 0x539c, 0x1130, 0x2071, 0x1800,
+	0x0002, 0x2003, 0x1001, 0x080c, 0x5397, 0x1170, 0x080c, 0x0efb,
+	0x0110, 0x080c, 0x0e4e, 0x080c, 0x5397, 0x1130, 0x2071, 0x1800,
 	0x2011, 0x8000, 0x080c, 0x0f0f, 0x0c70, 0x0005, 0x2001, 0x0382,
 	0x2004, 0x9084, 0x0007, 0x9086, 0x0001, 0x1120, 0x2001, 0x0015,
-	0x080c, 0x98b9, 0x2079, 0x0380, 0x2069, 0x1ad4, 0x7818, 0x6802,
+	0x080c, 0x98ac, 0x2079, 0x0380, 0x2069, 0x1ad3, 0x7818, 0x6802,
 	0x781c, 0x6806, 0x7840, 0x680a, 0x7844, 0x680e, 0x782c, 0x6812,
-	0x2019, 0x1adf, 0x9016, 0x7808, 0xd09c, 0x0150, 0x7820, 0x201a,
+	0x2019, 0x1ade, 0x9016, 0x7808, 0xd09c, 0x0150, 0x7820, 0x201a,
 	0x8210, 0x8318, 0x8210, 0x9282, 0x0011, 0x0ea8, 0x2011, 0xdead,
 	0x6a2a, 0x7830, 0x681a, 0x7834, 0x681e, 0x7838, 0x6822, 0x783c,
-	0x6826, 0x7803, 0x0000, 0x2069, 0x1a94, 0x901e, 0x20a9, 0x0020,
+	0x6826, 0x7803, 0x0000, 0x2069, 0x1a93, 0x901e, 0x20a9, 0x0020,
 	0x7b26, 0x7828, 0x206a, 0x8d68, 0x8318, 0x1f04, 0x0e28, 0x2069,
-	0x1ab4, 0x2019, 0x00b0, 0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a,
+	0x1ab3, 0x2019, 0x00b0, 0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a,
 	0x8d68, 0x8318, 0x1f04, 0x0e35, 0x0005, 0x918c, 0x03ff, 0x2001,
 	0x0003, 0x2004, 0x9084, 0x0600, 0x1118, 0x918d, 0x6c00, 0x0010,
 	0x918d, 0x6400, 0x2001, 0x017f, 0x2102, 0x0005, 0x0026, 0x0126,
@@ -263,7 +263,7 @@
 	0x0148, 0xd0a4, 0x1138, 0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080,
 	0x080c, 0x0f00, 0x002e, 0x0005, 0x0026, 0x70ef, 0x0000, 0x080c,
 	0x0efb, 0x1130, 0x2011, 0x8040, 0x080c, 0x0f0f, 0x002e, 0x0005,
-	0x080c, 0x2811, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2,
+	0x080c, 0x2830, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2,
 	0x080c, 0x0f00, 0x002e, 0x0005, 0x00e6, 0x0016, 0x0006, 0x2071,
 	0x1800, 0xd0b4, 0x70e8, 0x71e4, 0x1118, 0xc0e4, 0xc1f4, 0x0050,
 	0x0006, 0x3b00, 0x9084, 0xff3e, 0x20d8, 0x000e, 0x70ef, 0x0000,
@@ -320,7 +320,7 @@
 	0x0016, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0xa862, 0x9184,
 	0xffc0, 0xa85e, 0x001e, 0x0020, 0x00e6, 0x0126, 0x2091, 0x8000,
 	0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000,
-	0x70be, 0x080c, 0x8074, 0x012e, 0x00ee, 0x0005, 0x2071, 0x1800,
+	0x70be, 0x080c, 0x8053, 0x012e, 0x00ee, 0x0005, 0x2071, 0x1800,
 	0x9026, 0x2009, 0x0000, 0x2049, 0x0400, 0x2900, 0x702e, 0x8940,
 	0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0440,
 	0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x1883, 0x7000,
@@ -336,5473 +336,5473 @@
 	0x9982, 0x0440, 0x0278, 0x9982, 0x049b, 0x0288, 0x9982, 0x0800,
 	0x1270, 0x0040, 0x9982, 0x0800, 0x0250, 0x2071, 0x1883, 0x7010,
 	0x9902, 0x1228, 0x9085, 0x0001, 0x001e, 0x00ee, 0x0005, 0x9006,
-	0x0cd8, 0x00e6, 0x2071, 0x19f2, 0x7007, 0x0000, 0x9006, 0x701e,
+	0x0cd8, 0x00e6, 0x2071, 0x19f1, 0x7007, 0x0000, 0x9006, 0x701e,
 	0x7022, 0x7002, 0x2071, 0x0000, 0x7010, 0x9085, 0x8044, 0x7012,
-	0x2071, 0x0080, 0x9006, 0x20a9, 0x0040, 0x7022, 0x1f04, 0x1105,
-	0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6,
-	0xa06f, 0x0000, 0x2071, 0x19f2, 0x701c, 0x9088, 0x19fc, 0x280a,
-	0x8000, 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, 0x090c, 0x0d65,
-	0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x00a9, 0x00fe,
-	0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0x2071,
-	0x19f2, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x0021,
-	0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, 0x0000, 0x1110,
-	0x7007, 0x0006, 0x7000, 0x0002, 0x114e, 0x114c, 0x114c, 0x114c,
-	0x12c5, 0x12c5, 0x12c5, 0x12c5, 0x080c, 0x0d65, 0x701c, 0x7120,
-	0x9106, 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, 0xd1fc, 0x1110,
-	0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x19fc, 0x2004, 0x700a,
-	0x2048, 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, 0x0026, 0xa88c,
-	0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898, 0x780e, 0xa878,
-	0x700e, 0xa870, 0x7016, 0xa874, 0x701a, 0xa868, 0x009e, 0xd084,
-	0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002, 0x00b1,
-	0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, 0x0040,
-	0x1210, 0x2110, 0x9006, 0x700e, 0x7212, 0x8203, 0x7812, 0x782b,
-	0x0020, 0x782b, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
-	0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018, 0x2098, 0x20e9,
-	0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c, 0x2011, 0x0040,
-	0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x22a8, 0x4006,
-	0x8203, 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, 0x782b, 0x0001,
-	0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x2009, 0x19f2,
-	0x2104, 0xc095, 0x200a, 0x080c, 0x112b, 0x0005, 0x0016, 0x00e6,
-	0x2071, 0x19f2, 0x00f6, 0x2079, 0x0080, 0x792c, 0xd1bc, 0x190c,
-	0x0d5e, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c, 0x0700, 0x7004,
-	0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x113c, 0x11e4, 0x1218,
-	0x0d65, 0x0d65, 0x12d1, 0x0d65, 0x918c, 0x0700, 0x1550, 0x0136,
-	0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, 0x20a0, 0x20e1, 0x0000,
-	0x2099, 0x0088, 0x782b, 0x0040, 0x7010, 0x20a8, 0x4005, 0x3400,
-	0x701a, 0x015e, 0x014e, 0x013e, 0x700c, 0x9005, 0x0578, 0x7800,
-	0x7802, 0x7804, 0x7806, 0x080c, 0x1181, 0x0005, 0x7008, 0x0096,
-	0x2048, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, 0x080c, 0x113c,
-	0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x0ca0,
-	0x918c, 0x0700, 0x1150, 0x700c, 0x9005, 0x0180, 0x7800, 0x7802,
-	0x7804, 0x7806, 0x080c, 0x1196, 0x0005, 0x7008, 0x0096, 0x2048,
-	0xa86f, 0x0200, 0x009e, 0x7007, 0x0000, 0x0080, 0x0096, 0x7008,
-	0x2048, 0x7800, 0xa88e, 0x7804, 0xa892, 0x7808, 0xa896, 0x780c,
-	0xa89a, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, 0x0096, 0x00d6,
-	0x7008, 0x2048, 0x2001, 0x18af, 0x2004, 0x9906, 0x1128, 0xa89c,
-	0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, 0x009e, 0x0096, 0x00d6,
-	0x7008, 0x2048, 0x0081, 0x0150, 0xa89c, 0x0086, 0x2940, 0x080f,
-	0x008e, 0x00de, 0x009e, 0x080c, 0x112b, 0x0005, 0x00de, 0x009e,
-	0x080c, 0x112b, 0x0005, 0xa8a8, 0xd08c, 0x0005, 0x0096, 0xa0a0,
-	0x904d, 0x090c, 0x0d65, 0xa06c, 0x908e, 0x0100, 0x0130, 0xa87b,
-	0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c, 0x698a, 0xa09f,
-	0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c, 0x1054, 0x009e, 0x0005,
-	0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0d65, 0xa06c, 0x908e, 0x0100,
-	0x0128, 0xa87b, 0x0001, 0xa883, 0x0000, 0x00c0, 0xa80c, 0x2050,
-	0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006, 0x8007,
-	0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xa076, 0xa172,
-	0xb000, 0xa07a, 0x2810, 0x080c, 0x110c, 0x00e8, 0xa97c, 0xa894,
-	0x0016, 0x0006, 0x080c, 0x698a, 0x000e, 0x001e, 0xd1fc, 0x1138,
-	0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0x9be7, 0x00ce, 0x7008,
-	0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000, 0x080c, 0x1054, 0x7007,
-	0x0000, 0x080c, 0x112b, 0x00ae, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094, 0x7002, 0x012e,
-	0x0005, 0x7007, 0x0000, 0x080c, 0x113c, 0x0005, 0x0126, 0x2091,
-	0x2200, 0x2079, 0x0300, 0x2071, 0x1a3c, 0x7003, 0x0000, 0x78bf,
-	0x00f6, 0x0041, 0x7807, 0x0007, 0x7803, 0x0000, 0x7803, 0x0001,
-	0x012e, 0x0005, 0x00c6, 0x7803, 0x0000, 0x2001, 0x0165, 0x2003,
-	0x4198, 0x7808, 0xd09c, 0x0110, 0x7820, 0x0cd8, 0x2001, 0x1a3d,
-	0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab,
-	0x0002, 0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827,
-	0x0031, 0x782b, 0x1a4a, 0x781f, 0xff00, 0x781b, 0xff00, 0x2001,
-	0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a4a,
-	0x602f, 0x1ddc, 0x2001, 0x1819, 0x2004, 0x9082, 0x1ddc, 0x6032,
-	0x603b, 0x1cf7, 0x602b, 0x1a8a, 0x6007, 0x1a6a, 0x2061, 0x1a6a,
-	0x00ce, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908, 0x9184, 0x0070,
-	0x190c, 0x0d5e, 0xd19c, 0x05a0, 0x7820, 0x908c, 0xf000, 0x0540,
-	0x2060, 0x6020, 0x9086, 0x0003, 0x1550, 0x6000, 0x9086, 0x0004,
-	0x1530, 0x6114, 0x2148, 0xa876, 0xa87a, 0xa867, 0x0103, 0x080c,
-	0x67ac, 0x00b6, 0x6010, 0x2058, 0xba3c, 0x8211, 0x0208, 0xba3e,
-	0xb8c0, 0x9005, 0x190c, 0x639b, 0x00be, 0x6044, 0xd0fc, 0x190c,
-	0x98f1, 0x080c, 0x9c0f, 0x7808, 0xd09c, 0x19b0, 0x012e, 0x0005,
-	0x908a, 0x0024, 0x1a0c, 0x0d65, 0x002b, 0x012e, 0x0005, 0x04b0,
-	0x012e, 0x0005, 0x138e, 0x13b4, 0x13e4, 0x13e9, 0x13ed, 0x13f2,
-	0x141a, 0x141e, 0x142c, 0x1430, 0x138e, 0x14ba, 0x14be, 0x1521,
-	0x138e, 0x138e, 0x138e, 0x138e, 0x138e, 0x138e, 0x138e, 0x138e,
-	0x138e, 0x138e, 0x138e, 0x138e, 0x138e, 0x13f4, 0x138e, 0x13bc,
-	0x13e1, 0x13a8, 0x138e, 0x13c8, 0x1392, 0x1390, 0x080c, 0x0d65,
-	0x080c, 0x0d5e, 0x080c, 0x1528, 0x2009, 0x1a49, 0x2104, 0x8000,
-	0x200a, 0x080c, 0x7b22, 0x080c, 0x195f, 0x0005, 0x6044, 0xd0fc,
-	0x190c, 0x98f1, 0x2009, 0x0055, 0x080c, 0x9c85, 0x012e, 0x0005,
-	0x080c, 0x1528, 0x2060, 0x6044, 0xd0fc, 0x190c, 0x98f1, 0x2009,
-	0x0055, 0x080c, 0x9c85, 0x0005, 0x2009, 0x0048, 0x080c, 0x1528,
-	0x2060, 0x080c, 0x9c85, 0x0005, 0x2009, 0x0054, 0x080c, 0x1528,
-	0x2060, 0x6044, 0xd0fc, 0x190c, 0x98f1, 0x080c, 0x9c85, 0x0005,
-	0x080c, 0x1528, 0x2060, 0x0056, 0x0066, 0x080c, 0x1528, 0x2028,
-	0x080c, 0x1528, 0x2030, 0x0036, 0x0046, 0x2021, 0x0000, 0x2418,
-	0x2009, 0x0056, 0x080c, 0x9c85, 0x004e, 0x003e, 0x006e, 0x005e,
-	0x0005, 0x080c, 0x1528, 0x0005, 0x7004, 0xc085, 0xc0b5, 0x7006,
-	0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, 0x1528, 0x080c,
-	0x15e5, 0x0005, 0x080c, 0x0d65, 0x080c, 0x1528, 0x2060, 0x6014,
-	0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c,
-	0x9c85, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, 0x03e8, 0x8109,
-	0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218,
-	0x2004, 0xd0ec, 0x1110, 0x080c, 0x152d, 0x2001, 0x0307, 0x2003,
-	0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005, 0x080c, 0x1528,
-	0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009,
-	0x0048, 0x080c, 0x9c85, 0x0005, 0x080c, 0x1528, 0x080c, 0x0d65,
-	0x080c, 0x1528, 0x080c, 0x14a5, 0x7827, 0x0018, 0x79ac, 0xd1dc,
-	0x0540, 0x7827, 0x0015, 0x7828, 0x782b, 0x0000, 0x9065, 0x0138,
-	0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0400, 0x7004,
-	0x9005, 0x1180, 0x78ab, 0x0004, 0x7827, 0x0018, 0x782b, 0x0000,
-	0xd1bc, 0x090c, 0x0d65, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003,
-	0x0020, 0x0480, 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x14be,
-	0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c, 0x0d65, 0x6014,
-	0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x0198, 0x080c, 0x7b22,
-	0x080c, 0x195f, 0x080c, 0xb847, 0x0158, 0xa9ac, 0xa936, 0xa9b0,
-	0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd, 0xa882,
-	0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024,
-	0x190c, 0xbc43, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201,
-	0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xd5d3, 0xd5a4, 0x1118,
-	0x080c, 0x152d, 0x0005, 0x080c, 0x7b22, 0x080c, 0x195f, 0x0005,
-	0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016, 0x0066, 0x0076,
-	0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007, 0x9186, 0x0003,
-	0x0120, 0x2001, 0x0016, 0x080c, 0x159e, 0x00fe, 0x007e, 0x006e,
-	0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184,
-	0x0004, 0x190c, 0x0d65, 0xd184, 0x1189, 0xd19c, 0x0158, 0xc19c,
-	0x7106, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x080c,
-	0x152d, 0x0005, 0x81ff, 0x190c, 0x0d65, 0x0005, 0xc184, 0xd1b4,
-	0xc1b4, 0x7106, 0x0016, 0x00e6, 0x15e0, 0x2071, 0x0200, 0x080c,
-	0x15d9, 0x6014, 0x9005, 0x05a8, 0x0096, 0x2048, 0xa864, 0x009e,
-	0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, 0x0048, 0x1548,
-	0x601c, 0xd084, 0x11d8, 0x00f6, 0x2c78, 0x080c, 0x164f, 0x00fe,
-	0x00a8, 0x00f6, 0x2c78, 0x080c, 0x1797, 0x00fe, 0x2009, 0x01f4,
-	0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001,
-	0x0218, 0x2004, 0xd0ec, 0x1110, 0x0401, 0x0040, 0x2001, 0x020d,
-	0x2003, 0x0020, 0x080c, 0x12ea, 0x7803, 0x0001, 0x00ee, 0x001e,
-	0x0005, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0069,
-	0x0ca8, 0x0031, 0x2060, 0x2009, 0x0053, 0x080c, 0x9c85, 0x0005,
-	0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c, 0x14a5, 0x00d6,
-	0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0510, 0x6804, 0x9005,
-	0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1528,
-	0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841, 0x1268, 0x9188,
-	0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c, 0x080c, 0x1590,
-	0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827, 0x0002, 0x04c1,
-	0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500, 0x6804, 0x9005,
-	0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c, 0x7b22, 0x080c,
-	0x195f, 0x0090, 0x7827, 0x0015, 0x782b, 0x0000, 0x7827, 0x0018,
-	0x782b, 0x0000, 0x2001, 0x020d, 0x2003, 0x0020, 0x2001, 0x0307,
-	0x2003, 0x0300, 0x7803, 0x0001, 0x00de, 0x0005, 0x682c, 0x9084,
-	0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015, 0x782b, 0x0000,
-	0x7803, 0x0001, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0005,
-	0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, 0x2001, 0x0030, 0x2c08,
-	0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005, 0x00f6, 0x2079,
-	0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016, 0x0026, 0x00c6,
-	0x080c, 0x132a, 0x00ce, 0x002e, 0x001e, 0x000e, 0x0006, 0x7832,
-	0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118, 0x000e, 0x00fe,
-	0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0d65,
-	0x2009, 0xff00, 0x8109, 0x0120, 0x7818, 0xd0bc, 0x1dd8, 0x0005,
-	0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080,
-	0x0c79, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c,
-	0x0d65, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, 0x7050, 0x2060,
-	0xd1bc, 0x1110, 0x7054, 0x2060, 0x0005, 0x00e6, 0x0016, 0x2071,
-	0x0200, 0x0c79, 0x6124, 0xd1dc, 0x01f8, 0x701c, 0xd08c, 0x0904,
-	0x1644, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004, 0xd0bc, 0x0904,
-	0x1644, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, 0x6038, 0x00ce,
-	0x918e, 0x0039, 0x1904, 0x1644, 0x9c06, 0x15f0, 0x0126, 0x2091,
-	0x2600, 0x080c, 0x7a7a, 0x012e, 0x7358, 0x745c, 0x6014, 0x905d,
-	0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x190c, 0xbc1e, 0xab42, 0xac3e, 0x2001, 0x1875, 0x2004, 0xd0b4,
-	0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837, 0xffff, 0x080c,
-	0x1d17, 0x1190, 0x080c, 0x17f2, 0x2a00, 0xa816, 0x0130, 0x2800,
-	0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020, 0x781f,
-	0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050, 0x7037, 0x0020,
-	0x001e, 0x00ee, 0x080c, 0x152d, 0x0005, 0x080c, 0x0d65, 0x0016,
-	0x2009, 0x00a0, 0x8109, 0xa001, 0xa001, 0xa001, 0x1dd8, 0x001e,
-	0x2cf0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048,
-	0x2940, 0x903e, 0x2730, 0xa864, 0x2068, 0xa81a, 0x9d84, 0x000f,
-	0x9088, 0x1cf7, 0x2165, 0x0002, 0x1683, 0x16d0, 0x1683, 0x1683,
-	0x1683, 0x16b2, 0x1683, 0x1687, 0x167c, 0x16c7, 0x1683, 0x1683,
-	0x1683, 0x178c, 0x169b, 0x1691, 0xa964, 0x918c, 0x00ff, 0x918e,
-	0x0048, 0x0904, 0x16c7, 0x9085, 0x0001, 0x0804, 0x1783, 0xa87c,
-	0xd0bc, 0x0dc8, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804,
-	0x16d7, 0xa87c, 0xd0bc, 0x0d78, 0xa890, 0xa842, 0xa88c, 0xa83e,
-	0xa888, 0x0804, 0x1726, 0xa87c, 0xd0bc, 0x0d28, 0xa890, 0xa842,
-	0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c, 0x0d65, 0xa164, 0xa91a,
-	0x91ec, 0x000f, 0x9d80, 0x1cf7, 0x2065, 0xa888, 0xd19c, 0x1904,
-	0x1726, 0x0428, 0xa87c, 0xd0ac, 0x0970, 0xa804, 0x9045, 0x090c,
-	0x0d65, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1cf7, 0x2065,
-	0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x1726, 0x0080, 0xa87c,
-	0xd0ac, 0x0904, 0x1683, 0x9006, 0xa842, 0xa83e, 0x0804, 0x1726,
-	0xa87c, 0xd0ac, 0x0904, 0x1683, 0x9006, 0xa842, 0xa83e, 0x2c05,
-	0x908a, 0x0036, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x16fa,
-	0x16fa, 0x16fc, 0x16fa, 0x16fa, 0x16fa, 0x1702, 0x16fa, 0x16fa,
-	0x16fa, 0x1708, 0x16fa, 0x16fa, 0x16fa, 0x170e, 0x16fa, 0x16fa,
-	0x16fa, 0x1714, 0x16fa, 0x16fa, 0x16fa, 0x171a, 0x16fa, 0x16fa,
-	0x16fa, 0x1720, 0x080c, 0x0d65, 0xa574, 0xa478, 0xa37c, 0xa280,
-	0x0804, 0x176b, 0xa584, 0xa488, 0xa38c, 0xa290, 0x0804, 0x176b,
-	0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x176b, 0xa5a4, 0xa4a8,
-	0xa3ac, 0xa2b0, 0x0804, 0x176b, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0,
-	0x0804, 0x176b, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x176b,
-	0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x176b, 0x2c05, 0x908a,
-	0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x1749, 0x1747,
-	0x1747, 0x1747, 0x1747, 0x1747, 0x1750, 0x1747, 0x1747, 0x1747,
-	0x1747, 0x1747, 0x1757, 0x1747, 0x1747, 0x1747, 0x1747, 0x1747,
-	0x175e, 0x1747, 0x1747, 0x1747, 0x1747, 0x1747, 0x1765, 0x080c,
-	0x0d65, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, 0xa280, 0x00d8,
-	0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, 0x00a0, 0xa59c,
-	0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x0068, 0xa5b4, 0xa4b8,
-	0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0030, 0xa5cc, 0xa4d0, 0xa7d4,
-	0xa6d8, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26,
-	0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a,
-	0x8109, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c,
-	0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005, 0x2800, 0xa80e,
-	0xab0a, 0x2c00, 0xa812, 0x0c78, 0x0804, 0x1683, 0x0016, 0x2009,
-	0x00a0, 0x8109, 0xa001, 0xa001, 0xa001, 0x1dd8, 0x001e, 0x2ff0,
-	0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940,
-	0xa80e, 0x2061, 0x1cf2, 0xa813, 0x1cf2, 0x2c05, 0xa80a, 0xa964,
-	0xa91a, 0xa87c, 0xd0ac, 0x090c, 0x0d65, 0x9006, 0xa842, 0xa83e,
-	0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d65, 0xadcc, 0xacd0, 0xafd4,
-	0xaed8, 0xabdc, 0xaae0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26,
-	0xae2a, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0xa988, 0xa864, 0x9084,
-	0x00ff, 0x9086, 0x0008, 0x1120, 0x8109, 0xa916, 0x0128, 0x0078,
-	0x918a, 0x0002, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085, 0x601e,
-	0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005, 0xa804,
-	0x9045, 0x090c, 0x0d65, 0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f,
-	0x9080, 0x1cf7, 0x2015, 0x82ff, 0x090c, 0x0d65, 0xaa12, 0x2205,
-	0xa80a, 0x0c10, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00,
-	0x0002, 0x18e7, 0x1849, 0x1849, 0x18e7, 0x18e7, 0x18e1, 0x18e7,
-	0x1849, 0x1898, 0x1898, 0x1898, 0x18e7, 0x18e7, 0x18e7, 0x18de,
-	0x1898, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c,
-	0x0904, 0x18e9, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d65, 0x9082,
-	0x001b, 0x0002, 0x1835, 0x1833, 0x1833, 0x1833, 0x1833, 0x1833,
-	0x1839, 0x1833, 0x1833, 0x1833, 0x1833, 0x1833, 0x183d, 0x1833,
-	0x1833, 0x1833, 0x1833, 0x1833, 0x1841, 0x1833, 0x1833, 0x1833,
-	0x1833, 0x1833, 0x1845, 0x080c, 0x0d65, 0xa774, 0xa678, 0x0804,
-	0x18e9, 0xa78c, 0xa690, 0x0804, 0x18e9, 0xa7a4, 0xa6a8, 0x0804,
-	0x18e9, 0xa7bc, 0xa6c0, 0x0804, 0x18e9, 0xa7d4, 0xa6d8, 0x0804,
-	0x18e9, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0d65, 0x9082, 0x001b,
-	0x0002, 0x186c, 0x186c, 0x186e, 0x186c, 0x186c, 0x186c, 0x1874,
-	0x186c, 0x186c, 0x186c, 0x187a, 0x186c, 0x186c, 0x186c, 0x1880,
-	0x186c, 0x186c, 0x186c, 0x1886, 0x186c, 0x186c, 0x186c, 0x188c,
-	0x186c, 0x186c, 0x186c, 0x1892, 0x080c, 0x0d65, 0xa574, 0xa478,
-	0xa37c, 0xa280, 0x0804, 0x18e9, 0xa584, 0xa488, 0xa38c, 0xa290,
-	0x0804, 0x18e9, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x18e9,
-	0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x18e9, 0xa5b4, 0xa4b8,
-	0xa3bc, 0xa2c0, 0x0804, 0x18e9, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0,
-	0x0804, 0x18e9, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x18e9,
-	0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002,
-	0x18bb, 0x18b9, 0x18b9, 0x18b9, 0x18b9, 0x18b9, 0x18c2, 0x18b9,
-	0x18b9, 0x18b9, 0x18b9, 0x18b9, 0x18c9, 0x18b9, 0x18b9, 0x18b9,
-	0x18b9, 0x18b9, 0x18d0, 0x18b9, 0x18b9, 0x18b9, 0x18b9, 0x18b9,
-	0x18d7, 0x080c, 0x0d65, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c,
-	0xa280, 0x0438, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298,
-	0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x00c8,
-	0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0090, 0xa5cc,
-	0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0x0058, 0x9d86, 0x000e,
-	0x1130, 0x080c, 0x1ccd, 0x1904, 0x17f2, 0x900e, 0x0050, 0x080c,
-	0x0d65, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0x080c,
-	0x1ccd, 0x0005, 0x6014, 0x2048, 0x6118, 0x810c, 0x810c, 0x810c,
-	0x81ff, 0x1118, 0xa887, 0x0001, 0x0008, 0xa986, 0x601b, 0x0002,
-	0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934, 0xa88c, 0x9106, 0x1158,
-	0xa938, 0xa890, 0x9106, 0x1138, 0x601c, 0xc084, 0x601e, 0x2009,
-	0x0048, 0x0804, 0x9c85, 0x0005, 0x0126, 0x00c6, 0x2091, 0x2200,
-	0x00ce, 0x7908, 0x918c, 0x0007, 0x9186, 0x0000, 0x05b0, 0x9186,
-	0x0003, 0x0598, 0x6020, 0x6023, 0x0000, 0x0006, 0x2031, 0x0008,
-	0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c, 0x0120, 0x080c, 0x132a,
-	0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800, 0x2031, 0x0168, 0x00c6,
-	0x7808, 0xd09c, 0x190c, 0x132a, 0x00ce, 0x2001, 0x0038, 0x080c,
-	0x19ec, 0x7930, 0x9186, 0x0040, 0x0160, 0x9186, 0x0042, 0x190c,
-	0x0d65, 0x2001, 0x001e, 0x8001, 0x1df0, 0x8631, 0x1d40, 0x080c,
-	0x19fb, 0x000e, 0x6022, 0x012e, 0x0005, 0x080c, 0x19e8, 0x7827,
-	0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b, 0x0000, 0x0ca0, 0x00f6,
-	0x2079, 0x0300, 0x7803, 0x0000, 0x78ab, 0x0004, 0x00fe, 0x080c,
-	0x70b7, 0x11b0, 0x2001, 0x0138, 0x2003, 0x0000, 0x2001, 0x0160,
-	0x2003, 0x0000, 0x2011, 0x012c, 0xa001, 0xa001, 0x8211, 0x1de0,
-	0x0081, 0x2001, 0x0386, 0x2003, 0x2020, 0x080c, 0x7158, 0x0005,
-	0x0479, 0x0039, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, 0x2202,
-	0x0005, 0x00e6, 0x2071, 0x0200, 0x080c, 0x2825, 0x2009, 0x003c,
-	0x080c, 0x2052, 0x2001, 0x015d, 0x2003, 0x0000, 0x7000, 0x9084,
-	0x003c, 0x1de0, 0x080c, 0x8074, 0x70a0, 0x70a2, 0x7098, 0x709a,
-	0x709c, 0x709e, 0x2001, 0x020d, 0x2003, 0x0020, 0x00f6, 0x2079,
-	0x0300, 0x080c, 0x12ea, 0x7803, 0x0001, 0x00fe, 0x00ee, 0x0005,
-	0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2001, 0x0160, 0x202c,
-	0x2003, 0x0000, 0x080c, 0x70b7, 0x1108, 0x0005, 0x2021, 0x0260,
-	0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c,
-	0x939c, 0x0048, 0x1160, 0x2001, 0x0111, 0x201c, 0x83ff, 0x1110,
-	0x8421, 0x1d70, 0x2001, 0x015d, 0x2003, 0x0000, 0x0005, 0x0046,
-	0x2021, 0x0019, 0x2003, 0x0048, 0xa001, 0xa001, 0x201c, 0x939c,
-	0x0048, 0x0120, 0x8421, 0x1db0, 0x004e, 0x0c60, 0x004e, 0x0c40,
-	0x601c, 0xc084, 0x601e, 0x0005, 0x2c08, 0x621c, 0x080c, 0x159e,
-	0x7930, 0x0005, 0x2c08, 0x621c, 0x080c, 0x15cb, 0x7930, 0x0005,
-	0x8001, 0x1df0, 0x0005, 0x2031, 0x0005, 0x781c, 0x9084, 0x0007,
-	0x0170, 0x2001, 0x0038, 0x0c41, 0x9186, 0x0040, 0x0904, 0x1a59,
-	0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80, 0x080c, 0x0d65, 0x781f,
-	0x0202, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, 0x0b10, 0x0c01,
-	0x781c, 0xd084, 0x0110, 0x0861, 0x04e0, 0x2001, 0x0030, 0x0891,
-	0x9186, 0x0040, 0x0568, 0x781c, 0xd084, 0x1da8, 0x781f, 0x0101,
-	0x2001, 0x0014, 0x0869, 0x2001, 0x0037, 0x0821, 0x9186, 0x0040,
-	0x0140, 0x2001, 0x0030, 0x080c, 0x19f2, 0x9186, 0x0040, 0x190c,
-	0x0d65, 0x00d6, 0x2069, 0x0200, 0x692c, 0xd1f4, 0x1170, 0xd1c4,
-	0x0160, 0xd19c, 0x0130, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de,
-	0x0080, 0x6908, 0x9184, 0x0007, 0x1db0, 0x00de, 0x781f, 0x0100,
-	0x791c, 0x9184, 0x0007, 0x090c, 0x0d65, 0xa001, 0xa001, 0x781f,
-	0x0200, 0x0005, 0x0126, 0x2091, 0x2400, 0x2079, 0x0380, 0x2001,
-	0x19b8, 0x2070, 0x012e, 0x0005, 0x2cf0, 0x0126, 0x2091, 0x2400,
-	0x3e60, 0x6014, 0x2048, 0xa964, 0xa91a, 0x918c, 0x00ff, 0x9184,
-	0x000f, 0x0002, 0x1a8e, 0x1a8e, 0x1a8e, 0x1a8e, 0x1a8e, 0x1a8e,
-	0x1a8e, 0x1a8e, 0x1a82, 0x1a90, 0x1a8e, 0x1a8e, 0x1a8e, 0x1a8e,
-	0x1a8e, 0x1a8e, 0x9086, 0x0008, 0x1148, 0xa87c, 0xd0b4, 0x0904,
-	0x1c00, 0x2011, 0x1cf2, 0x2205, 0xab88, 0x0068, 0x080c, 0x0d65,
-	0xa87c, 0xd0b4, 0x0904, 0x1c00, 0x9184, 0x000f, 0x9080, 0x1cf7,
-	0x2015, 0x2205, 0xab88, 0x2908, 0xa80a, 0xa90e, 0xaa12, 0xab16,
-	0x9006, 0xa842, 0xa83e, 0x012e, 0x0005, 0x2cf0, 0x0126, 0x2091,
-	0x2400, 0x3e60, 0x6014, 0x2048, 0xa88c, 0xa990, 0xaaac, 0xabb0,
-	0xaa36, 0xab3a, 0xa83e, 0xa942, 0xa846, 0xa94a, 0xa964, 0x918c,
-	0x00ff, 0x9186, 0x001e, 0x0198, 0x2940, 0xa064, 0xa81a, 0x90ec,
-	0x000f, 0x9d80, 0x1cf7, 0x2065, 0x2c05, 0x2808, 0x2c10, 0xab88,
-	0xa80a, 0xa90e, 0xaa12, 0xab16, 0x012e, 0x3e60, 0x0005, 0xa804,
-	0x2040, 0x0c58, 0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014,
-	0x2048, 0xa97c, 0x2950, 0xd1dc, 0x1904, 0x1bca, 0xc1dd, 0xa97e,
-	0x9006, 0xa842, 0xa83e, 0xa988, 0x8109, 0xa916, 0xa964, 0xa91a,
-	0x9184, 0x000f, 0x9088, 0x1cf7, 0x2145, 0x0002, 0x1afe, 0x1b0c,
-	0x1afe, 0x1afe, 0x1afe, 0x1b00, 0x1afe, 0x1afe, 0x1b61, 0x1b61,
-	0x1afe, 0x1afe, 0x1afe, 0x1b5f, 0x1afe, 0x1afe, 0x080c, 0x0d65,
-	0xa804, 0x2050, 0xb164, 0xa91a, 0x9184, 0x000f, 0x9080, 0x1cf7,
-	0x2045, 0xd19c, 0x1904, 0x1b61, 0x9036, 0x2638, 0x2805, 0x908a,
-	0x0036, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x1b31, 0x1b31,
-	0x1b33, 0x1b31, 0x1b31, 0x1b31, 0x1b39, 0x1b31, 0x1b31, 0x1b31,
-	0x1b3f, 0x1b31, 0x1b31, 0x1b31, 0x1b45, 0x1b31, 0x1b31, 0x1b31,
-	0x1b4b, 0x1b31, 0x1b31, 0x1b31, 0x1b51, 0x1b31, 0x1b31, 0x1b31,
-	0x1b57, 0x080c, 0x0d65, 0xb574, 0xb478, 0xb37c, 0xb280, 0x0804,
-	0x1ba6, 0xb584, 0xb488, 0xb38c, 0xb290, 0x0804, 0x1ba6, 0xb594,
-	0xb498, 0xb39c, 0xb2a0, 0x0804, 0x1ba6, 0xb5a4, 0xb4a8, 0xb3ac,
-	0xb2b0, 0x0804, 0x1ba6, 0xb5b4, 0xb4b8, 0xb3bc, 0xb2c0, 0x0804,
-	0x1ba6, 0xb5c4, 0xb4c8, 0xb3cc, 0xb2d0, 0x0804, 0x1ba6, 0xb5d4,
-	0xb4d8, 0xb3dc, 0xb2e0, 0x0804, 0x1ba6, 0x0804, 0x1ba6, 0x080c,
-	0x0d65, 0x2805, 0x908a, 0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b,
-	0x0002, 0x1b84, 0x1b82, 0x1b82, 0x1b82, 0x1b82, 0x1b82, 0x1b8b,
-	0x1b82, 0x1b82, 0x1b82, 0x1b82, 0x1b82, 0x1b92, 0x1b82, 0x1b82,
-	0x1b82, 0x1b82, 0x1b82, 0x1b99, 0x1b82, 0x1b82, 0x1b82, 0x1b82,
-	0x1b82, 0x1ba0, 0x080c, 0x0d65, 0xb56c, 0xb470, 0xb774, 0xb678,
-	0xb37c, 0xb280, 0x00d8, 0xb584, 0xb488, 0xb78c, 0xb690, 0xb394,
-	0xb298, 0x00a0, 0xb59c, 0xb4a0, 0xb7a4, 0xb6a8, 0xb3ac, 0xb2b0,
-	0x0068, 0xb5b4, 0xb4b8, 0xb7bc, 0xb6c0, 0xb3c4, 0xb2c8, 0x0030,
-	0xb5cc, 0xb4d0, 0xb7d4, 0xb6d8, 0xb3dc, 0xb2e0, 0xab2e, 0xaa32,
-	0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988, 0x8109, 0xa916, 0x1118,
-	0x9006, 0x012e, 0x0005, 0x8840, 0x2805, 0x9005, 0x1168, 0xb004,
-	0x9005, 0x090c, 0x0d65, 0x2050, 0xb164, 0xa91a, 0x9184, 0x000f,
-	0x9080, 0x1cf7, 0x2045, 0x2805, 0x2810, 0x2a08, 0xa80a, 0xa90e,
-	0xaa12, 0x0c30, 0x3e60, 0x6344, 0xd3fc, 0x190c, 0x0d65, 0xa93c,
-	0xaa40, 0xa844, 0x9106, 0x1118, 0xa848, 0x9206, 0x0508, 0x2958,
-	0xab48, 0xac44, 0x2940, 0x080c, 0x1d17, 0x1998, 0x2850, 0x2c40,
-	0xab14, 0xa880, 0xd0fc, 0x1140, 0xa810, 0x2005, 0xa80a, 0x2a00,
-	0xa80e, 0x2009, 0x8015, 0x0070, 0x00c6, 0x3e60, 0x6044, 0xc0a4,
-	0x9085, 0x8005, 0x6046, 0x00ce, 0x8319, 0xab16, 0x1904, 0x1bb3,
-	0x2009, 0x8005, 0x3e60, 0x6044, 0x9105, 0x6046, 0x0804, 0x1bb0,
-	0x080c, 0x0d65, 0x00f6, 0x00e6, 0x0096, 0x00c6, 0x0026, 0x704c,
-	0x9c06, 0x190c, 0x0d65, 0x2079, 0x0090, 0x2001, 0x0105, 0x2003,
-	0x0010, 0x782b, 0x0004, 0x7057, 0x0000, 0x6014, 0x2048, 0x080c,
-	0xb847, 0x0118, 0xa880, 0xc0bd, 0xa882, 0x6020, 0x9086, 0x0006,
-	0x1170, 0x2061, 0x0100, 0x62c8, 0x2001, 0x00fa, 0x8001, 0x1df0,
-	0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a, 0x60c8, 0xa896, 0x704c,
-	0x2060, 0x00c6, 0x080c, 0xb452, 0x080c, 0x98c8, 0x00ce, 0x704c,
-	0x9c06, 0x1150, 0x2009, 0x0040, 0x080c, 0x2052, 0x080c, 0x94b8,
-	0x2011, 0x0000, 0x080c, 0x9343, 0x002e, 0x00ce, 0x009e, 0x00ee,
-	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0090, 0x781c, 0x0006, 0x7818,
-	0x0006, 0x2079, 0x0100, 0x7a14, 0x9284, 0x1984, 0x9085, 0x0012,
-	0x7816, 0x2019, 0x1000, 0x8319, 0x090c, 0x0d65, 0x7820, 0xd0bc,
-	0x1dd0, 0x79c8, 0x000e, 0x9102, 0x001e, 0x0006, 0x0016, 0x79c4,
-	0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284, 0x1984, 0x9085,
-	0x0012, 0x7816, 0x2079, 0x0090, 0x782b, 0x0008, 0x7057, 0x0000,
-	0x00fe, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x19b8, 0x7054, 0x9086,
-	0x0000, 0x0904, 0x1cc8, 0x2079, 0x0090, 0x2009, 0x0207, 0x210c,
-	0xd194, 0x01b8, 0x2009, 0x020c, 0x210c, 0x9184, 0x0003, 0x0188,
-	0x080c, 0xd61c, 0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0d65,
-	0x0016, 0x2009, 0x0040, 0x080c, 0x2052, 0x001e, 0x2001, 0x020c,
-	0x2102, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106,
-	0x1120, 0x2009, 0x0040, 0x080c, 0x2052, 0x782c, 0xd0fc, 0x09a8,
-	0x080c, 0x98e4, 0x782c, 0xd0fc, 0x1de8, 0x080c, 0x98c8, 0x7054,
-	0x9086, 0x0000, 0x1950, 0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8,
-	0x2009, 0x0040, 0x080c, 0x2052, 0x782b, 0x0002, 0x7057, 0x0000,
-	0x00ee, 0x00fe, 0x0005, 0x080c, 0x0d65, 0x8c60, 0x2c05, 0x9005,
-	0x0110, 0x8a51, 0x0005, 0xa004, 0x9005, 0x0168, 0xa85a, 0x2040,
-	0xa064, 0x9084, 0x000f, 0x9080, 0x1cf7, 0x2065, 0x8cff, 0x090c,
-	0x0d65, 0x8a51, 0x0005, 0x2050, 0x0005, 0x0000, 0x001d, 0x0021,
-	0x0025, 0x0029, 0x002d, 0x0031, 0x0035, 0x0000, 0x001b, 0x0021,
-	0x0027, 0x002d, 0x0033, 0x0000, 0x0000, 0x0023, 0x0000, 0x0000,
-	0x1cea, 0x1ce6, 0x0000, 0x0000, 0x1cf4, 0x0000, 0x1cea, 0x1cf1,
-	0x1cf1, 0x1cee, 0x0000, 0x0000, 0x0000, 0x1cf4, 0x1cf1, 0x0000,
-	0x1cec, 0x1cec, 0x0000, 0x0000, 0x1cf4, 0x0000, 0x1cec, 0x1cf2,
-	0x1cf2, 0x1cf2, 0x0000, 0x0000, 0x0000, 0x1cf4, 0x1cf2, 0x00c6,
-	0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888, 0x9055, 0x0904, 0x1ef6,
-	0x2940, 0xa064, 0x90ec, 0x000f, 0x9084, 0x00ff, 0x9086, 0x0008,
-	0x1118, 0x2061, 0x1cf2, 0x00d0, 0x9de0, 0x1cf7, 0x9d86, 0x0007,
-	0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86, 0x000f, 0x1120, 0xa08c,
-	0x9422, 0xa090, 0x931b, 0x2c05, 0x9065, 0x1140, 0x0310, 0x0804,
-	0x1ef6, 0xa004, 0x9045, 0x0904, 0x1ef6, 0x08d8, 0x2c05, 0x9005,
-	0x0904, 0x1dde, 0xdd9c, 0x1904, 0x1d9a, 0x908a, 0x0036, 0x1a0c,
-	0x0d65, 0x9082, 0x001b, 0x0002, 0x1d6f, 0x1d6f, 0x1d71, 0x1d6f,
-	0x1d6f, 0x1d6f, 0x1d77, 0x1d6f, 0x1d6f, 0x1d6f, 0x1d7d, 0x1d6f,
-	0x1d6f, 0x1d6f, 0x1d83, 0x1d6f, 0x1d6f, 0x1d6f, 0x1d89, 0x1d6f,
-	0x1d6f, 0x1d6f, 0x1d8f, 0x1d6f, 0x1d6f, 0x1d6f, 0x1d95, 0x080c,
-	0x0d65, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0804, 0x1dd4, 0xa08c,
-	0x9422, 0xa090, 0x931b, 0x0804, 0x1dd4, 0xa09c, 0x9422, 0xa0a0,
-	0x931b, 0x0804, 0x1dd4, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0804,
-	0x1dd4, 0xa0bc, 0x9422, 0xa0c0, 0x931b, 0x0804, 0x1dd4, 0xa0cc,
-	0x9422, 0xa0d0, 0x931b, 0x0804, 0x1dd4, 0xa0dc, 0x9422, 0xa0e0,
-	0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b,
-	0x0002, 0x1dbc, 0x1dba, 0x1dba, 0x1dba, 0x1dba, 0x1dba, 0x1dc1,
-	0x1dba, 0x1dba, 0x1dba, 0x1dba, 0x1dba, 0x1dc6, 0x1dba, 0x1dba,
-	0x1dba, 0x1dba, 0x1dba, 0x1dcb, 0x1dba, 0x1dba, 0x1dba, 0x1dba,
-	0x1dba, 0x1dd0, 0x080c, 0x0d65, 0xa07c, 0x9422, 0xa080, 0x931b,
-	0x0098, 0xa094, 0x9422, 0xa098, 0x931b, 0x0070, 0xa0ac, 0x9422,
-	0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422, 0xa0c8, 0x931b, 0x0020,
-	0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630, 0x2300, 0x9405, 0x0160,
-	0x8a51, 0x0904, 0x1ef6, 0x8c60, 0x0804, 0x1d46, 0xa004, 0x9045,
-	0x0904, 0x1ef6, 0x0804, 0x1d21, 0x8a51, 0x0904, 0x1ef6, 0x8c60,
-	0x2c05, 0x9005, 0x1158, 0xa004, 0x9045, 0x0904, 0x1ef6, 0xa064,
-	0x90ec, 0x000f, 0x9de0, 0x1cf7, 0x2c05, 0x2060, 0xa880, 0xc0fc,
-	0xa882, 0x0804, 0x1eeb, 0x2c05, 0x8422, 0x8420, 0x831a, 0x9399,
-	0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904, 0x1e88, 0x9082, 0x001b,
-	0x0002, 0x1e24, 0x1e24, 0x1e26, 0x1e24, 0x1e24, 0x1e24, 0x1e34,
-	0x1e24, 0x1e24, 0x1e24, 0x1e42, 0x1e24, 0x1e24, 0x1e24, 0x1e50,
-	0x1e24, 0x1e24, 0x1e24, 0x1e5e, 0x1e24, 0x1e24, 0x1e24, 0x1e6c,
-	0x1e24, 0x1e24, 0x1e24, 0x1e7a, 0x080c, 0x0d65, 0xa17c, 0x2400,
-	0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa074, 0x9420,
-	0xa078, 0x9319, 0x0804, 0x1ee6, 0xa18c, 0x2400, 0x9122, 0xa190,
-	0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa084, 0x9420, 0xa088, 0x9319,
-	0x0804, 0x1ee6, 0xa19c, 0x2400, 0x9122, 0xa1a0, 0x2300, 0x911b,
-	0x0a0c, 0x0d65, 0xa094, 0x9420, 0xa098, 0x9319, 0x0804, 0x1ee6,
-	0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0d65,
-	0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804, 0x1ee6, 0xa1bc, 0x2400,
-	0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa0b4, 0x9420,
-	0xa0b8, 0x9319, 0x0804, 0x1ee6, 0xa1cc, 0x2400, 0x9122, 0xa1d0,
-	0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa0c4, 0x9420, 0xa0c8, 0x9319,
-	0x0804, 0x1ee6, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b,
-	0x0a0c, 0x0d65, 0xa0d4, 0x9420, 0xa0d8, 0x9319, 0x0804, 0x1ee6,
-	0x9082, 0x001b, 0x0002, 0x1ea6, 0x1ea4, 0x1ea4, 0x1ea4, 0x1ea4,
-	0x1ea4, 0x1eb3, 0x1ea4, 0x1ea4, 0x1ea4, 0x1ea4, 0x1ea4, 0x1ec0,
-	0x1ea4, 0x1ea4, 0x1ea4, 0x1ea4, 0x1ea4, 0x1ecd, 0x1ea4, 0x1ea4,
-	0x1ea4, 0x1ea4, 0x1ea4, 0x1eda, 0x080c, 0x0d65, 0xa17c, 0x2400,
-	0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa06c, 0x9420,
-	0xa070, 0x9319, 0x0498, 0xa194, 0x2400, 0x9122, 0xa198, 0x2300,
-	0x911b, 0x0a0c, 0x0d65, 0xa084, 0x9420, 0xa088, 0x9319, 0x0430,
-	0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0d65,
-	0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8, 0xa1c4, 0x2400, 0x9122,
-	0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa0b4, 0x9420, 0xa0b8,
-	0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b,
-	0x0a0c, 0x0d65, 0xa0cc, 0x9420, 0xa0d0, 0x9319, 0xac1e, 0xab22,
-	0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x2a00,
-	0xa816, 0x000e, 0x000e, 0x000e, 0x9006, 0x0028, 0x008e, 0x00de,
-	0x00ce, 0x9085, 0x0001, 0x0005, 0x00c6, 0x610c, 0x0016, 0x9026,
-	0x2410, 0x6004, 0x9420, 0x9291, 0x0000, 0x2c04, 0x9210, 0x9ce0,
-	0x0002, 0x918a, 0x0002, 0x1da8, 0x9284, 0x000f, 0x9405, 0x001e,
-	0x00ce, 0x0005, 0x7803, 0x0003, 0x780f, 0x0000, 0x6004, 0x7812,
-	0x2c04, 0x7816, 0x9ce0, 0x0002, 0x918a, 0x0002, 0x1db8, 0x0005,
-	0x2001, 0x0005, 0x2004, 0xd0bc, 0x190c, 0x0d5e, 0xd094, 0x0110,
-	0x080c, 0x11c6, 0x0005, 0x0126, 0x2091, 0x2600, 0x2079, 0x0200,
-	0x2071, 0x0260, 0x2069, 0x1800, 0x7817, 0x0000, 0x789b, 0x0814,
-	0x78a3, 0x0406, 0x789f, 0x0410, 0x2009, 0x013b, 0x200b, 0x0400,
-	0x781b, 0x0002, 0x783b, 0x001f, 0x7837, 0x0020, 0x7803, 0x1600,
-	0x012e, 0x0005, 0x2091, 0x2600, 0x781c, 0xd0a4, 0x190c, 0x204f,
-	0x7900, 0xd1dc, 0x1118, 0x9084, 0x0006, 0x001a, 0x9084, 0x000e,
-	0x0002, 0x1f71, 0x1f69, 0x7a7a, 0x1f69, 0x1f6b, 0x1f6b, 0x1f6b,
-	0x1f6b, 0x7a60, 0x1f69, 0x1f6d, 0x1f69, 0x1f6b, 0x1f69, 0x1f6b,
-	0x1f69, 0x080c, 0x0d65, 0x0031, 0x0020, 0x080c, 0x7a60, 0x080c,
-	0x7a7a, 0x0005, 0x0006, 0x0016, 0x0026, 0x080c, 0xd61c, 0x7930,
-	0x9184, 0x0003, 0x01f0, 0x080c, 0x98c8, 0x2001, 0x19cb, 0x2004,
-	0x9005, 0x0180, 0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0d65,
-	0x00c6, 0x2001, 0x19cb, 0x2064, 0x080c, 0x98e4, 0x080c, 0xb452,
-	0x00ce, 0x0408, 0x2009, 0x0040, 0x080c, 0x2052, 0x080c, 0x98e4,
-	0x00d0, 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160,
-	0x080c, 0x70b7, 0x1138, 0x080c, 0x73b7, 0x080c, 0x5cdc, 0x080c,
-	0x6fe8, 0x0010, 0x080c, 0x5b97, 0x080c, 0x7b18, 0x0041, 0x0018,
-	0x9184, 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6,
-	0x0036, 0x0046, 0x0056, 0x2071, 0x1a3c, 0x080c, 0x195f, 0x005e,
-	0x004e, 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071,
-	0x1800, 0x7128, 0x2001, 0x1940, 0x2102, 0x2001, 0x1948, 0x2102,
-	0x2001, 0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e,
-	0x78a3, 0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398,
-	0x0005, 0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423,
-	0x8423, 0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007,
-	0x8403, 0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc,
-	0x1238, 0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0,
-	0x9182, 0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420,
-	0x0098, 0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423,
-	0x0058, 0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420,
-	0x0018, 0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020,
-	0x8301, 0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405,
-	0x789a, 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814,
-	0x9084, 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6,
-	0x2069, 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4,
-	0x6812, 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810,
-	0x9084, 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938,
-	0x080c, 0x0d5e, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001,
-	0xa001, 0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001,
-	0xa001, 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800,
-	0x2061, 0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x281f,
-	0x080c, 0x273f, 0x080c, 0x2890, 0x9006, 0x080c, 0x276e, 0x9006,
-	0x080c, 0x2751, 0x20a9, 0x0012, 0x1d04, 0x207c, 0x2091, 0x6000,
-	0x1f04, 0x207c, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085,
-	0x0400, 0x9084, 0xdfff, 0x6052, 0x6224, 0x080c, 0x286d, 0x080c,
-	0x245d, 0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x246d, 0x60e7,
-	0x0000, 0x61ea, 0x60e3, 0x0002, 0x604b, 0xf7f7, 0x6043, 0x0000,
-	0x602f, 0x0080, 0x602f, 0x0000, 0x6007, 0x149f, 0x00c6, 0x2061,
-	0x0140, 0x608b, 0x000b, 0x608f, 0x10b8, 0x6093, 0x0000, 0x6097,
-	0x0198, 0x00ce, 0x6004, 0x9085, 0x8000, 0x6006, 0x60bb, 0x0000,
-	0x20a9, 0x0018, 0x60bf, 0x0000, 0x1f04, 0x20ba, 0x60bb, 0x0000,
-	0x60bf, 0x0108, 0x60bf, 0x0012, 0x60bf, 0x0320, 0x60bf, 0x0018,
-	0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b, 0x602b, 0x402c,
-	0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3, 0x0080, 0x78c3,
-	0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001, 0x1834, 0x2003,
-	0x0000, 0x2001, 0x1833, 0x2003, 0x0001, 0x0005, 0x0126, 0x2091,
-	0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x6028, 0x910c, 0x9184,
-	0x5e2c, 0x1118, 0x9184, 0x0007, 0x002a, 0x9195, 0x0004, 0x9284,
-	0x0007, 0x0002, 0x2105, 0x2102, 0x2102, 0x2102, 0x2104, 0x2102,
-	0x2102, 0x2102, 0x080c, 0x0d65, 0x0029, 0x002e, 0x001e, 0x000e,
-	0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c, 0x0118, 0xd19c,
-	0x1904, 0x2364, 0xd1f4, 0x190c, 0x0d5e, 0x080c, 0x70b7, 0x0904,
-	0x2162, 0x080c, 0xbf61, 0x1120, 0x7000, 0x9086, 0x0003, 0x0580,
-	0x6024, 0x9084, 0x1800, 0x0560, 0x080c, 0x70da, 0x0118, 0x080c,
-	0x70c8, 0x1530, 0x2011, 0x0020, 0x080c, 0x286d, 0x6043, 0x0000,
-	0x080c, 0xbf61, 0x0168, 0x080c, 0x70da, 0x1150, 0x2001, 0x1978,
-	0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x6f2d, 0x0804, 0x2367,
-	0x70a0, 0x9005, 0x1150, 0x70a3, 0x0001, 0x00d6, 0x2069, 0x0140,
-	0x080c, 0x710e, 0x00de, 0x1904, 0x2367, 0x080c, 0x73c1, 0x0428,
-	0x080c, 0x70da, 0x1590, 0x6024, 0x9084, 0x1800, 0x1108, 0x0468,
-	0x080c, 0x73c1, 0x080c, 0x73b7, 0x080c, 0x5cdc, 0x080c, 0x6fe8,
-	0x0804, 0x2364, 0xd1ac, 0x1508, 0x6024, 0xd0dc, 0x1170, 0xd0e4,
-	0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7094, 0x9086, 0x0028,
-	0x1110, 0x080c, 0x729a, 0x0804, 0x2364, 0x080c, 0x73bc, 0x0048,
-	0x2001, 0x194e, 0x2003, 0x0002, 0x0020, 0x080c, 0x71f8, 0x0804,
-	0x2364, 0x080c, 0x733c, 0x0804, 0x2364, 0xd1ac, 0x0904, 0x227e,
-	0x080c, 0x70b7, 0x11d0, 0x2011, 0x0020, 0x080c, 0x286d, 0x0006,
-	0x0026, 0x0036, 0x080c, 0x70d1, 0x1158, 0x080c, 0x73b7, 0x080c,
-	0x5cdc, 0x080c, 0x6fe8, 0x003e, 0x002e, 0x000e, 0x00ae, 0x0005,
-	0x003e, 0x002e, 0x000e, 0x080c, 0x708b, 0x0016, 0x0046, 0x00c6,
-	0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, 0x6043,
-	0x0090, 0x6043, 0x0010, 0x74d6, 0x948c, 0xff00, 0x7038, 0xd084,
-	0x0178, 0x9186, 0xf800, 0x1160, 0x7044, 0xd084, 0x1148, 0xc085,
-	0x7046, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x48d8, 0x003e,
-	0x080c, 0xbf5a, 0x1904, 0x2255, 0x9196, 0xff00, 0x05a8, 0x705c,
-	0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568, 0x7130,
-	0xd184, 0x1550, 0x080c, 0x3186, 0x0128, 0xc18d, 0x7132, 0x080c,
-	0x665f, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248, 0x9294,
-	0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904, 0x2255,
-	0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904,
-	0x2255, 0xc1ad, 0x2102, 0x0036, 0x73d4, 0x2011, 0x8013, 0x080c,
-	0x48d8, 0x003e, 0x0804, 0x2255, 0x7038, 0xd08c, 0x1140, 0x2001,
-	0x180c, 0x200c, 0xd1ac, 0x1904, 0x2255, 0xc1ad, 0x2102, 0x0036,
-	0x73d4, 0x2011, 0x8013, 0x080c, 0x48d8, 0x003e, 0x7130, 0xc185,
-	0x7132, 0x2011, 0x1854, 0x220c, 0x00f0, 0x0016, 0x2009, 0x0001,
-	0x2011, 0x0100, 0x080c, 0x83eb, 0x2019, 0x000e, 0x00c6, 0x2061,
-	0x0000, 0x080c, 0xd1eb, 0x00ce, 0x9484, 0x00ff, 0x9080, 0x318b,
-	0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006, 0x2009, 0x000e,
-	0x080c, 0xd273, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002,
-	0x2019, 0x0004, 0x080c, 0x2fc5, 0x001e, 0x0078, 0x0156, 0x00b6,
-	0x20a9, 0x007f, 0x900e, 0x080c, 0x6270, 0x1110, 0x080c, 0x5cf6,
-	0x8108, 0x1f04, 0x224b, 0x00be, 0x015e, 0x00ce, 0x004e, 0x080c,
-	0x98c8, 0x080c, 0x9b6d, 0x080c, 0x98e4, 0x60e3, 0x0000, 0x001e,
-	0x2001, 0x1800, 0x2014, 0x9296, 0x0004, 0x1170, 0xd19c, 0x11b0,
-	0x2011, 0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, 0x9295, 0x0002,
-	0x6206, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001, 0x1825,
-	0x2003, 0x0000, 0x2011, 0x0020, 0x080c, 0x286d, 0xd194, 0x0904,
-	0x2364, 0x0016, 0x080c, 0x98c8, 0x6220, 0xd2b4, 0x0904, 0x230c,
-	0x080c, 0x820b, 0x080c, 0x8fb7, 0x2011, 0x0004, 0x080c, 0x286d,
-	0x00f6, 0x2019, 0x19c4, 0x2304, 0x907d, 0x0904, 0x22d9, 0x7804,
-	0x9086, 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069,
-	0x0140, 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002, 0x2001,
-	0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c, 0x8001,
-	0x1df0, 0x080c, 0x2843, 0x2001, 0x001e, 0x8001, 0x0240, 0x20a9,
-	0x0009, 0x080c, 0x27fa, 0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001,
-	0x0100, 0x080c, 0x2833, 0x9006, 0x080c, 0x2833, 0x080c, 0x8874,
-	0x080c, 0x98e4, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60, 0x080c,
-	0x9be7, 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae,
-	0x0005, 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000,
-	0x0110, 0x080c, 0x2843, 0x00de, 0x00c6, 0x2061, 0x19b8, 0x6034,
-	0x080c, 0xbf61, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018, 0x909a,
-	0x00c8, 0x1238, 0x8000, 0x6036, 0x00ce, 0x080c, 0x8f8f, 0x0804,
-	0x2361, 0x2061, 0x0100, 0x62c0, 0x080c, 0x97fe, 0x2019, 0x19c4,
-	0x2304, 0x9065, 0x0130, 0x6003, 0x0001, 0x2009, 0x0027, 0x080c,
-	0x9c85, 0x00ce, 0x0804, 0x2361, 0xd2bc, 0x05e0, 0x080c, 0x8218,
-	0x2011, 0x0004, 0x080c, 0x286d, 0x00d6, 0x2069, 0x0140, 0x6804,
-	0x9084, 0x4000, 0x0110, 0x080c, 0x2843, 0x00de, 0x00c6, 0x2061,
-	0x19b8, 0x6050, 0x080c, 0xbf61, 0x0120, 0x909a, 0x0003, 0x1638,
-	0x0018, 0x909a, 0x00c8, 0x1618, 0x8000, 0x6052, 0x604c, 0x00ce,
-	0x9005, 0x0578, 0x2009, 0x07d0, 0x080c, 0x8210, 0x9080, 0x0008,
-	0x2004, 0x9086, 0x0006, 0x1138, 0x2009, 0x1984, 0x2011, 0x0012,
-	0x080c, 0x287c, 0x00f0, 0x2009, 0x1984, 0x2011, 0x0016, 0x080c,
-	0x287c, 0x00b8, 0x2011, 0x0004, 0x080c, 0x286d, 0x0090, 0x0036,
-	0x2019, 0x0001, 0x080c, 0x9286, 0x003e, 0x2019, 0x19cb, 0x2304,
-	0x9065, 0x0130, 0x2009, 0x004f, 0x6003, 0x0003, 0x080c, 0x9c85,
-	0x00ce, 0x080c, 0x98e4, 0x001e, 0xd19c, 0x0904, 0x23c2, 0x7038,
-	0xd0ac, 0x1538, 0x0016, 0x0156, 0x2011, 0x0008, 0x080c, 0x286d,
-	0x6050, 0xc0e5, 0x6052, 0x20a9, 0x0367, 0x1f04, 0x238f, 0x1d04,
-	0x2377, 0x080c, 0x823f, 0x6020, 0xd09c, 0x1db8, 0x00f6, 0x2079,
-	0x0100, 0x080c, 0x27aa, 0x00fe, 0x1d80, 0x6050, 0xc0e4, 0x6052,
-	0x2011, 0x0008, 0x080c, 0x286d, 0x015e, 0x001e, 0x0498, 0x015e,
-	0x001e, 0x0016, 0x6028, 0xc09c, 0x602a, 0x080c, 0x98c8, 0x080c,
-	0x9b6d, 0x080c, 0x98e4, 0x60e3, 0x0000, 0x080c, 0xd5fb, 0x080c,
-	0xd616, 0x080c, 0x5391, 0xd0fc, 0x1138, 0x080c, 0xbf5a, 0x1120,
-	0x9085, 0x0001, 0x080c, 0x70fe, 0x9006, 0x080c, 0x2833, 0x2009,
-	0x0002, 0x080c, 0x281f, 0x00e6, 0x2071, 0x1800, 0x7003, 0x0004,
-	0x080c, 0x0e9c, 0x00ee, 0x2011, 0x0008, 0x080c, 0x286d, 0x080c,
-	0x0bab, 0x001e, 0x918c, 0xffd0, 0x2110, 0x080c, 0x286d, 0x00ae,
-	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126,
-	0x2091, 0x8000, 0x2071, 0x1800, 0x71cc, 0x70ce, 0x9116, 0x0904,
-	0x241c, 0x81ff, 0x01a0, 0x2009, 0x0000, 0x080c, 0x281f, 0x2011,
-	0x8011, 0x2019, 0x010e, 0x231c, 0x939e, 0x0007, 0x1118, 0x2019,
-	0x0001, 0x0010, 0x2019, 0x0000, 0x080c, 0x48d8, 0x0468, 0x2001,
-	0x1979, 0x200c, 0x81ff, 0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4,
-	0x0118, 0x2019, 0x0003, 0x0008, 0x2118, 0x2011, 0x8012, 0x080c,
-	0x48d8, 0x080c, 0x0e9c, 0x080c, 0x5391, 0xd0fc, 0x11a8, 0x080c,
-	0xbf5a, 0x1190, 0x00c6, 0x080c, 0x24b8, 0x080c, 0x98c8, 0x080c,
-	0x91e1, 0x080c, 0x98e4, 0x2061, 0x0100, 0x2019, 0x0028, 0x2009,
-	0x0002, 0x080c, 0x2fc5, 0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e,
-	0x002e, 0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff, 0x2130,
-	0x9094, 0xff00, 0x11f0, 0x2011, 0x1836, 0x2214, 0xd2ac, 0x11c8,
-	0x81ff, 0x01e8, 0x2011, 0x181e, 0x2204, 0x9106, 0x1190, 0x2011,
-	0x181f, 0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206, 0x1148,
-	0x2011, 0x181f, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206,
-	0x1120, 0x2500, 0x080c, 0x7d70, 0x0048, 0x9584, 0x00ff, 0x9080,
-	0x318b, 0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005, 0x9080,
-	0x318b, 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140,
-	0x2001, 0x1817, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852,
-	0x6856, 0x1f04, 0x2468, 0x00de, 0x0005, 0x0006, 0x00d6, 0x0026,
-	0x2069, 0x0140, 0x2001, 0x1817, 0x2102, 0x8114, 0x8214, 0x8214,
-	0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff, 0x1128,
-	0x9184, 0x000f, 0x9080, 0xd62a, 0x2005, 0x6856, 0x8211, 0x1f04,
-	0x247d, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061, 0x1800,
-	0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005,
-	0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140, 0x6980,
-	0x9116, 0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8, 0x2001,
-	0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04, 0x24ad,
-	0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e, 0x0005,
-	0x080c, 0x538d, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046,
-	0x2020, 0x2009, 0x002e, 0x080c, 0xd273, 0x004e, 0x0005, 0x00f6,
-	0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904, 0x2524,
-	0x080c, 0x279a, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600, 0x1120,
-	0x2011, 0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120, 0x2011,
-	0x8000, 0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016, 0x2009,
-	0x0001, 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009, 0x0002,
-	0x00b0, 0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004, 0x0078,
-	0x908e, 0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040, 0x9084,
-	0x0700, 0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058, 0x2300,
-	0x9080, 0x0020, 0x2018, 0x080c, 0x8419, 0x928c, 0xff00, 0x0110,
-	0x2011, 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2, 0x2009,
-	0x0138, 0x220a, 0x080c, 0x70b7, 0x1118, 0x2009, 0x193e, 0x220a,
-	0x002e, 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126,
-	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170, 0x200c,
-	0x8000, 0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0d5e, 0x002e,
-	0x001e, 0x000e, 0x012e, 0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc,
-	0x0168, 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e, 0x004c,
-	0x1128, 0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e, 0x2001,
-	0x0227, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x2001,
-	0x0226, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x0005,
-	0x0018, 0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000, 0x1800,
-	0x0156, 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x1961, 0x2004,
-	0x908a, 0x0007, 0x1a0c, 0x0d65, 0x0033, 0x00ee, 0x002e, 0x001e,
-	0x000e, 0x015e, 0x0005, 0x2582, 0x25a0, 0x25c4, 0x25c6, 0x25ef,
-	0x25f1, 0x25f3, 0x2001, 0x0001, 0x080c, 0x23c9, 0x080c, 0x27e4,
-	0x2001, 0x1963, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a,
-	0x9006, 0x20a9, 0x0009, 0x080c, 0x27b6, 0x2001, 0x1961, 0x2003,
-	0x0006, 0x2009, 0x001e, 0x2011, 0x25f4, 0x080c, 0x821d, 0x0005,
-	0x2009, 0x1966, 0x200b, 0x0000, 0x2001, 0x196b, 0x2003, 0x0036,
-	0x2001, 0x196a, 0x2003, 0x002a, 0x2001, 0x1963, 0x2003, 0x0001,
-	0x9006, 0x080c, 0x2751, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c,
-	0x27b6, 0x2001, 0x1961, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011,
-	0x25f4, 0x080c, 0x821d, 0x0005, 0x080c, 0x0d65, 0x2001, 0x196b,
-	0x2003, 0x0036, 0x2001, 0x1963, 0x2003, 0x0003, 0x7a38, 0x9294,
-	0x0005, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
-	0x080c, 0x2751, 0x2001, 0x1967, 0x2003, 0x0000, 0x2001, 0xffff,
-	0x20a9, 0x0009, 0x080c, 0x27b6, 0x2001, 0x1961, 0x2003, 0x0006,
-	0x2009, 0x001e, 0x2011, 0x25f4, 0x080c, 0x821d, 0x0005, 0x080c,
-	0x0d65, 0x080c, 0x0d65, 0x0005, 0x0006, 0x0016, 0x0026, 0x00e6,
-	0x00f6, 0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2001,
-	0x1963, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0d65, 0x0043, 0x012e,
-	0x015e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, 0x2616,
-	0x2636, 0x2676, 0x26a6, 0x26ca, 0x26da, 0x26dc, 0x080c, 0x27aa,
-	0x11b0, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1969, 0x2104,
-	0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0xc08d, 0x0008,
-	0xc085, 0x200a, 0x2001, 0x1961, 0x2003, 0x0001, 0x0030, 0x080c,
-	0x2700, 0x2001, 0xffff, 0x080c, 0x2591, 0x0005, 0x080c, 0x26de,
-	0x05e0, 0x2009, 0x196a, 0x2104, 0x8001, 0x200a, 0x080c, 0x27aa,
-	0x1178, 0x7850, 0x9084, 0xefff, 0x7852, 0x7a38, 0x9294, 0x0005,
-	0x9296, 0x0005, 0x0518, 0x2009, 0x1969, 0x2104, 0xc085, 0x200a,
-	0x2009, 0x1966, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0118,
-	0x080c, 0x26e6, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006,
-	0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x276e, 0x2001, 0x1963, 0x2003, 0x0002, 0x0028, 0x2001, 0x1961,
-	0x2003, 0x0003, 0x0010, 0x080c, 0x25b3, 0x0005, 0x080c, 0x26de,
-	0x0560, 0x2009, 0x196a, 0x2104, 0x8001, 0x200a, 0x080c, 0x27aa,
-	0x1168, 0x7850, 0x9084, 0xefff, 0x7852, 0x2001, 0x1961, 0x2003,
-	0x0003, 0x2001, 0x1962, 0x2003, 0x0000, 0x00b8, 0x2009, 0x196a,
-	0x2104, 0x9005, 0x1118, 0x080c, 0x2723, 0x0010, 0x080c, 0x26f3,
-	0x080c, 0x26e6, 0x2009, 0x1966, 0x200b, 0x0000, 0x2001, 0x1963,
-	0x2003, 0x0001, 0x080c, 0x25b3, 0x0000, 0x0005, 0x04b9, 0x0508,
-	0x080c, 0x27aa, 0x11b8, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009,
-	0x1967, 0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108, 0x0078,
-	0x2001, 0x196c, 0x2003, 0x000a, 0x2009, 0x1969, 0x2104, 0xc0fd,
-	0x200a, 0x0038, 0x0419, 0x2001, 0x1963, 0x2003, 0x0004, 0x080c,
-	0x25de, 0x0005, 0x0099, 0x0168, 0x080c, 0x27aa, 0x1138, 0x7850,
-	0x9084, 0xefff, 0x7852, 0x080c, 0x25ca, 0x0018, 0x0079, 0x080c,
-	0x25de, 0x0005, 0x080c, 0x0d65, 0x080c, 0x0d65, 0x2009, 0x196b,
-	0x2104, 0x8001, 0x200a, 0x090c, 0x273f, 0x0005, 0x7a38, 0x9294,
-	0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
-	0x080c, 0x276e, 0x0005, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006,
-	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2751, 0x0005,
-	0x2009, 0x1966, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0108,
-	0x0068, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006,
-	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x04d9, 0x7a38, 0x9294,
-	0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
-	0x080c, 0x276e, 0x0005, 0x0086, 0x2001, 0x1969, 0x2004, 0x9084,
-	0x7fff, 0x090c, 0x0d65, 0x2009, 0x1968, 0x2144, 0x8846, 0x280a,
-	0x9844, 0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120, 0x080c, 0x0d65,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x00a1, 0x008e, 0x0005, 0x0006,
-	0x0156, 0x2001, 0x1961, 0x20a9, 0x0009, 0x2003, 0x0000, 0x8000,
-	0x1f04, 0x2745, 0x2001, 0x1968, 0x2003, 0x8000, 0x015e, 0x000e,
-	0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158, 0x7838,
-	0x9084, 0xfff9, 0x9085, 0x0004, 0x783a, 0x2009, 0x196e, 0x210c,
-	0x795a, 0x0050, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0006, 0x783a,
-	0x2009, 0x196f, 0x210c, 0x795a, 0x00fe, 0x0005, 0x00f6, 0x2079,
-	0x0100, 0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfffa, 0x9085,
-	0x0004, 0x783a, 0x7850, 0x9084, 0xfff0, 0x7852, 0x00c8, 0x7838,
-	0x9084, 0xfffb, 0x9085, 0x0005, 0x783a, 0x7850, 0x9084, 0xfff0,
-	0x0016, 0x2009, 0x0003, 0x210c, 0x918c, 0x0600, 0x918e, 0x0400,
-	0x0118, 0x9085, 0x000a, 0x0010, 0x9085, 0x0000, 0x001e, 0x7852,
-	0x00fe, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0007,
-	0x000e, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0009,
-	0x000e, 0x0005, 0x0156, 0x20a9, 0x0064, 0x7820, 0x080c, 0x2819,
-	0xd09c, 0x1110, 0x1f04, 0x27ad, 0x015e, 0x0005, 0x0126, 0x0016,
-	0x0006, 0x2091, 0x8000, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118,
-	0x783b, 0x0007, 0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006,
-	0x0060, 0x9186, 0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186,
-	0x0003, 0x1118, 0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x27d6,
-	0x080c, 0x823f, 0x1f04, 0x27d6, 0x7850, 0x9085, 0x1000, 0x7852,
-	0x000e, 0x001e, 0x012e, 0x0005, 0x080c, 0x28d4, 0x0005, 0x0006,
-	0x0156, 0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac,
-	0x1100, 0x7854, 0xd08c, 0x1110, 0x1f04, 0x27f1, 0x00fe, 0x015e,
-	0x000e, 0x0005, 0x1d04, 0x27fa, 0x080c, 0x823f, 0x1f04, 0x27fa,
-	0x0005, 0x0006, 0x2001, 0x196d, 0x2004, 0x9086, 0x0000, 0x000e,
-	0x0005, 0x0006, 0x2001, 0x196d, 0x2004, 0x9086, 0x0001, 0x000e,
-	0x0005, 0x0006, 0x2001, 0x196d, 0x2004, 0x9086, 0x0002, 0x000e,
-	0x0005, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006,
-	0x2001, 0x1979, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104,
-	0xd0dc, 0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001,
-	0xa001, 0x200a, 0x0005, 0x0016, 0x0026, 0x080c, 0x70d1, 0x0108,
-	0xc0bc, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a,
-	0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114,
-	0x9294, 0x0001, 0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e,
-	0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001,
-	0x9215, 0x220a, 0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009,
-	0x0140, 0x2104, 0x1128, 0x080c, 0x70d1, 0x0110, 0xc0bc, 0x0008,
-	0xc0bd, 0x200a, 0x001e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0380,
-	0x7843, 0x0101, 0x7844, 0xd084, 0x1de8, 0x2001, 0x0109, 0x2202,
-	0x7843, 0x0100, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843,
-	0x0202, 0x7844, 0xd08c, 0x1de8, 0x2079, 0x0100, 0x7814, 0x9104,
-	0x9205, 0x7a16, 0x2079, 0x0380, 0x7843, 0x0200, 0x00fe, 0x0005,
-	0x0016, 0x0026, 0x0036, 0x00c6, 0x2061, 0x0100, 0x6050, 0x9084,
-	0xfbff, 0x9085, 0x0040, 0x6052, 0x20a9, 0x0002, 0x080c, 0x27fa,
-	0x6050, 0x9085, 0x0400, 0x9084, 0xff9f, 0x6052, 0x20a9, 0x0005,
-	0x080c, 0x27fa, 0x6054, 0xd0bc, 0x090c, 0x0d65, 0x20a9, 0x0005,
-	0x080c, 0x27fa, 0x6054, 0xd0ac, 0x090c, 0x0d65, 0x2009, 0x1980,
-	0x9084, 0x7e00, 0x8007, 0x8004, 0x8004, 0x200a, 0x9085, 0x0000,
-	0x605a, 0x2009, 0x196e, 0x2011, 0x196f, 0x6358, 0x939c, 0x38df,
-	0x2320, 0x939d, 0x0000, 0x94a5, 0x0000, 0x230a, 0x2412, 0x00ce,
-	0x003e, 0x002e, 0x001e, 0x0005, 0x0006, 0x00c6, 0x2061, 0x0100,
-	0x6050, 0xc0cd, 0x6052, 0x00ce, 0x000e, 0x0005, 0x2dda, 0x2dda,
-	0x29de, 0x29de, 0x29ea, 0x29ea, 0x29f6, 0x29f6, 0x2a04, 0x2a04,
-	0x2a10, 0x2a10, 0x2a1e, 0x2a1e, 0x2a2c, 0x2a2c, 0x2a3e, 0x2a3e,
-	0x2a4a, 0x2a4a, 0x2a58, 0x2a58, 0x2a76, 0x2a76, 0x2a96, 0x2a96,
-	0x2a66, 0x2a66, 0x2a86, 0x2a86, 0x2aa4, 0x2aa4, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2ab6, 0x2ab6,
-	0x2ac2, 0x2ac2, 0x2ad0, 0x2ad0, 0x2ade, 0x2ade, 0x2aee, 0x2aee,
-	0x2afc, 0x2afc, 0x2b0c, 0x2b0c, 0x2b1c, 0x2b1c, 0x2b2e, 0x2b2e,
-	0x2b3c, 0x2b3c, 0x2b4c, 0x2b4c, 0x2b6e, 0x2b6e, 0x2b92, 0x2b92,
-	0x2b5c, 0x2b5c, 0x2b80, 0x2b80, 0x2ba2, 0x2ba2, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2bb6, 0x2bb6,
-	0x2bc2, 0x2bc2, 0x2bd0, 0x2bd0, 0x2bde, 0x2bde, 0x2bee, 0x2bee,
-	0x2bfc, 0x2bfc, 0x2c0c, 0x2c0c, 0x2c1c, 0x2c1c, 0x2c2e, 0x2c2e,
-	0x2c3c, 0x2c3c, 0x2c4c, 0x2c4c, 0x2c5c, 0x2c5c, 0x2c6e, 0x2c6e,
-	0x2c7e, 0x2c7e, 0x2c90, 0x2c90, 0x2ca2, 0x2ca2, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2cb6, 0x2cb6,
-	0x2cc4, 0x2cc4, 0x2cd4, 0x2cd4, 0x2ce4, 0x2ce4, 0x2cf6, 0x2cf6,
-	0x2d06, 0x2d06, 0x2d18, 0x2d18, 0x2d2a, 0x2d2a, 0x2d3e, 0x2d3e,
-	0x2d4e, 0x2d4e, 0x2d60, 0x2d60, 0x2d72, 0x2d72, 0x2d86, 0x2d86,
-	0x2d97, 0x2d97, 0x2daa, 0x2daa, 0x2dbd, 0x2dbd, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c,
-	0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x2a3c, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20e6,
-	0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x1f20, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20,
-	0x080c, 0x20e6, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f4a, 0x0804, 0x2dd2,
+	0x2071, 0x0080, 0x9006, 0x702b, 0x0060, 0x20a9, 0x0040, 0x7022,
+	0x1f04, 0x1107, 0x702b, 0x0060, 0x702b, 0x0020, 0x20a9, 0x0040,
+	0x7022, 0x1f04, 0x1110, 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x00e6, 0xa06f, 0x0000, 0x2071, 0x19f1, 0x701c,
+	0x9088, 0x19fb, 0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120,
+	0x9106, 0x090c, 0x0d65, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079,
+	0x0080, 0x00a9, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x00e6, 0x2071, 0x19f1, 0x7004, 0x9005, 0x1128, 0x00f6,
+	0x2079, 0x0080, 0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004,
+	0x9086, 0x0000, 0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x1159,
+	0x1157, 0x1157, 0x1157, 0x12d0, 0x12d0, 0x12d0, 0x12d0, 0x080c,
+	0x0d65, 0x701c, 0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001,
+	0x1120, 0xd1fc, 0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180,
+	0x19fb, 0x2004, 0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122,
+	0x782b, 0x0026, 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a,
+	0xa898, 0x780e, 0xa878, 0x700e, 0xa870, 0x7016, 0xa874, 0x701a,
+	0xa868, 0x009e, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005,
+	0x7007, 0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011,
+	0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x7212,
+	0x8203, 0x7812, 0x782b, 0x0020, 0x782b, 0x0041, 0x002e, 0x001e,
+	0x0005, 0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0,
+	0x7018, 0x2098, 0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026,
+	0x710c, 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006,
+	0x700e, 0x22a8, 0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300,
+	0x701a, 0x782b, 0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e,
+	0x0005, 0x2009, 0x19f1, 0x2104, 0xc095, 0x200a, 0x080c, 0x1136,
+	0x0005, 0x0016, 0x00e6, 0x2071, 0x19f1, 0x00f6, 0x2079, 0x0080,
+	0x792c, 0xd1bc, 0x190c, 0x0d5e, 0x782b, 0x0002, 0xd1fc, 0x0120,
+	0x918c, 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005,
+	0x1147, 0x11ef, 0x1223, 0x0d65, 0x0d65, 0x12dc, 0x0d65, 0x918c,
+	0x0700, 0x1550, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, 0x7018,
+	0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x7010,
+	0x20a8, 0x4005, 0x3400, 0x701a, 0x015e, 0x014e, 0x013e, 0x700c,
+	0x9005, 0x0578, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x118c,
+	0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0100, 0x009e, 0x7007,
+	0x0000, 0x080c, 0x1147, 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f,
+	0x0200, 0x009e, 0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, 0x9005,
+	0x0180, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x11a1, 0x0005,
+	0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x7007, 0x0000,
+	0x0080, 0x0096, 0x7008, 0x2048, 0x7800, 0xa88e, 0x7804, 0xa892,
+	0x7808, 0xa896, 0x780c, 0xa89a, 0xa86f, 0x0100, 0x009e, 0x7007,
+	0x0000, 0x0096, 0x00d6, 0x7008, 0x2048, 0x2001, 0x18af, 0x2004,
+	0x9906, 0x1128, 0xa89c, 0x080f, 0x00de, 0x009e, 0x00a0, 0x00de,
+	0x009e, 0x0096, 0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, 0xa89c,
+	0x0086, 0x2940, 0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x1136,
+	0x0005, 0x00de, 0x009e, 0x080c, 0x1136, 0x0005, 0xa8a8, 0xd08c,
+	0x0005, 0x0096, 0xa0a0, 0x904d, 0x090c, 0x0d65, 0xa06c, 0x908e,
+	0x0100, 0x0130, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002,
+	0x080c, 0x6985, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c,
+	0x1054, 0x009e, 0x0005, 0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0d65,
+	0xa06c, 0x908e, 0x0100, 0x0128, 0xa87b, 0x0001, 0xa883, 0x0000,
+	0x00c0, 0xa80c, 0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, 0x2050,
+	0x8006, 0x8006, 0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x0002, 0xa076, 0xa172, 0xb000, 0xa07a, 0x2810, 0x080c, 0x1117,
+	0x00e8, 0xa97c, 0xa894, 0x0016, 0x0006, 0x080c, 0x6985, 0x000e,
+	0x001e, 0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c,
+	0x9bda, 0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000,
+	0x080c, 0x1054, 0x7007, 0x0000, 0x080c, 0x1136, 0x00ae, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000,
+	0xc094, 0x7002, 0x012e, 0x0005, 0x7007, 0x0000, 0x080c, 0x1147,
+	0x0005, 0x0126, 0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a3b,
+	0x7003, 0x0000, 0x78bf, 0x00f6, 0x0041, 0x7807, 0x0007, 0x7803,
+	0x0000, 0x7803, 0x0001, 0x012e, 0x0005, 0x00c6, 0x7803, 0x0000,
+	0x2001, 0x0165, 0x2003, 0x4198, 0x7808, 0xd09c, 0x0110, 0x7820,
+	0x0cd8, 0x2001, 0x1a3c, 0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac,
+	0xd0ac, 0x1de8, 0x78ab, 0x0002, 0x7807, 0x0007, 0x7827, 0x0030,
+	0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1a49, 0x781f, 0xff00,
+	0x781b, 0xff00, 0x2001, 0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f,
+	0x0303, 0x2061, 0x1a49, 0x602f, 0x1ddc, 0x2001, 0x1819, 0x2004,
+	0x9082, 0x1ddc, 0x6032, 0x603b, 0x1d04, 0x602b, 0x1a89, 0x6007,
+	0x1a69, 0x2061, 0x1a69, 0x00ce, 0x0005, 0x0126, 0x2091, 0x2200,
+	0x7908, 0x9184, 0x0070, 0x190c, 0x0d5e, 0xd19c, 0x05a0, 0x7820,
+	0x908c, 0xf000, 0x0540, 0x2060, 0x6020, 0x9086, 0x0003, 0x1550,
+	0x6000, 0x9086, 0x0004, 0x1530, 0x6114, 0x2148, 0xa876, 0xa87a,
+	0xa867, 0x0103, 0x080c, 0x67a7, 0x00b6, 0x6010, 0x2058, 0xba3c,
+	0x8211, 0x0208, 0xba3e, 0xb8c0, 0x9005, 0x190c, 0x6396, 0x00be,
+	0x6044, 0xd0fc, 0x190c, 0x98e4, 0x080c, 0x9c02, 0x7808, 0xd09c,
+	0x19b0, 0x012e, 0x0005, 0x908a, 0x0024, 0x1a0c, 0x0d65, 0x002b,
+	0x012e, 0x0005, 0x04b0, 0x012e, 0x0005, 0x1399, 0x13bf, 0x13ef,
+	0x13f4, 0x13f8, 0x13fd, 0x1425, 0x1429, 0x1437, 0x143b, 0x1399,
+	0x14c7, 0x14cb, 0x152e, 0x1399, 0x1399, 0x1399, 0x1399, 0x1399,
+	0x1399, 0x1399, 0x1399, 0x1399, 0x1399, 0x1399, 0x1399, 0x1399,
+	0x13ff, 0x1399, 0x13c7, 0x13ec, 0x13b3, 0x1399, 0x13d3, 0x139d,
+	0x139b, 0x080c, 0x0d65, 0x080c, 0x0d5e, 0x080c, 0x1535, 0x2009,
+	0x1a48, 0x2104, 0x8000, 0x200a, 0x080c, 0x7b01, 0x080c, 0x196c,
+	0x0005, 0x6044, 0xd0fc, 0x190c, 0x98e4, 0x2009, 0x0055, 0x080c,
+	0x9c76, 0x012e, 0x0005, 0x080c, 0x1535, 0x2060, 0x6044, 0xd0fc,
+	0x190c, 0x98e4, 0x2009, 0x0055, 0x080c, 0x9c76, 0x0005, 0x2009,
+	0x0048, 0x080c, 0x1535, 0x2060, 0x080c, 0x9c76, 0x0005, 0x2009,
+	0x0054, 0x080c, 0x1535, 0x2060, 0x6044, 0xd0fc, 0x190c, 0x98e4,
+	0x080c, 0x9c76, 0x0005, 0x080c, 0x1535, 0x2060, 0x0056, 0x0066,
+	0x080c, 0x1535, 0x2028, 0x080c, 0x1535, 0x2030, 0x0036, 0x0046,
+	0x2021, 0x0000, 0x2418, 0x2009, 0x0056, 0x080c, 0x9c76, 0x004e,
+	0x003e, 0x006e, 0x005e, 0x0005, 0x080c, 0x1535, 0x0005, 0x7004,
+	0xc085, 0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005,
+	0x080c, 0x1535, 0x080c, 0x15f2, 0x0005, 0x080c, 0x0d65, 0x080c,
+	0x1535, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e,
+	0x2009, 0x0048, 0x080c, 0x9c76, 0x2001, 0x015d, 0x2003, 0x0000,
+	0x2009, 0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005,
+	0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x153a,
+	0x2001, 0x0307, 0x2003, 0x8000, 0x0005, 0x7004, 0xc095, 0x7006,
+	0x0005, 0x080c, 0x1535, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b,
+	0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0x9c76, 0x0005, 0x080c,
+	0x1535, 0x080c, 0x0d65, 0x080c, 0x1535, 0x080c, 0x14b2, 0x7827,
+	0x0018, 0x79ac, 0xd1dc, 0x0540, 0x7827, 0x0015, 0x7828, 0x782b,
+	0x0000, 0x9065, 0x0138, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003,
+	0x0020, 0x0400, 0x7004, 0x9005, 0x1180, 0x78ab, 0x0004, 0x7827,
+	0x0018, 0x782b, 0x0000, 0xd1bc, 0x090c, 0x0d65, 0x2001, 0x020d,
+	0x2003, 0x0050, 0x2003, 0x0020, 0x0490, 0x78ab, 0x0004, 0x7803,
+	0x0001, 0x080c, 0x14cb, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065,
+	0x090c, 0x0d65, 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700,
+	0x01a8, 0x080c, 0x7b01, 0x080c, 0x196c, 0x080c, 0xb842, 0x0158,
+	0xa9ac, 0xa936, 0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff,
+	0xa880, 0xc0bd, 0xa882, 0x080c, 0xb440, 0x0005, 0x6010, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xbc43, 0x2029,
+	0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8,
+	0x7dbc, 0x080c, 0xd5e4, 0xd5a4, 0x1118, 0x080c, 0x153a, 0x0005,
+	0x080c, 0x7b01, 0x080c, 0x196c, 0x0005, 0x781f, 0x0300, 0x7803,
+	0x0001, 0x0005, 0x0016, 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300,
+	0x7908, 0x918c, 0x0007, 0x9186, 0x0003, 0x0120, 0x2001, 0x0016,
+	0x080c, 0x15ab, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004,
+	0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0d65,
+	0xd184, 0x1189, 0xd19c, 0x0158, 0xc19c, 0x7106, 0x2001, 0x020d,
+	0x2003, 0x0050, 0x2003, 0x0020, 0x080c, 0x153a, 0x0005, 0x81ff,
+	0x190c, 0x0d65, 0x0005, 0xc184, 0xd1b4, 0xc1b4, 0x7106, 0x0016,
+	0x00e6, 0x15e0, 0x2071, 0x0200, 0x080c, 0x15e6, 0x6014, 0x9005,
+	0x05a8, 0x0096, 0x2048, 0xa864, 0x009e, 0x9084, 0x00ff, 0x908e,
+	0x0029, 0x0160, 0x908e, 0x0048, 0x1548, 0x601c, 0xd084, 0x11d8,
+	0x00f6, 0x2c78, 0x080c, 0x165c, 0x00fe, 0x00a8, 0x00f6, 0x2c78,
+	0x080c, 0x17a4, 0x00fe, 0x2009, 0x01f4, 0x8109, 0x0160, 0x2001,
+	0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec,
+	0x1110, 0x0401, 0x0040, 0x2001, 0x020d, 0x2003, 0x0020, 0x080c,
+	0x12f5, 0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, 0x2001, 0x020d,
+	0x2003, 0x0050, 0x2003, 0x0020, 0x0069, 0x0ca8, 0x0031, 0x2060,
+	0x2009, 0x0053, 0x080c, 0x9c76, 0x0005, 0x7808, 0xd09c, 0x0de8,
+	0x7820, 0x0005, 0x080c, 0x14b2, 0x00d6, 0x2069, 0x0200, 0x2009,
+	0x01f4, 0x8109, 0x0510, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d,
+	0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff,
+	0x0180, 0x9182, 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8,
+	0x810c, 0x810c, 0x810c, 0x080c, 0x159d, 0x6827, 0x0001, 0x8109,
+	0x1dd0, 0x04d9, 0x6827, 0x0002, 0x04c1, 0x6804, 0x9005, 0x1130,
+	0x682c, 0xd0e4, 0x1500, 0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec,
+	0x1130, 0x08c0, 0x080c, 0x7b01, 0x080c, 0x196c, 0x0090, 0x7827,
+	0x0015, 0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001,
+	0x020d, 0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803,
+	0x0001, 0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400,
+	0x0d30, 0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800,
+	0x9085, 0x1800, 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003,
+	0x1de0, 0x0005, 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830,
+	0x9086, 0x0041, 0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808,
+	0xd09c, 0x0140, 0x0016, 0x0026, 0x00c6, 0x080c, 0x1335, 0x00ce,
+	0x002e, 0x001e, 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b,
+	0x8080, 0x0059, 0x1118, 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c,
+	0x3900, 0x8000, 0x2004, 0x080c, 0x0d65, 0x2009, 0xff00, 0x8109,
+	0x0120, 0x7818, 0xd0bc, 0x1dd8, 0x0005, 0x9085, 0x0001, 0x0005,
+	0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0c79, 0x1108, 0x0005,
+	0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0d65, 0x7037, 0x0001,
+	0x7150, 0x7037, 0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054,
+	0x2060, 0x0005, 0x00e6, 0x0016, 0x2071, 0x0200, 0x0c79, 0x6124,
+	0xd1dc, 0x01f8, 0x701c, 0xd08c, 0x0904, 0x1651, 0x7017, 0x0000,
+	0x2001, 0x0264, 0x2004, 0xd0bc, 0x0904, 0x1651, 0x2001, 0x0268,
+	0x00c6, 0x2064, 0x6104, 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904,
+	0x1651, 0x9c06, 0x15f0, 0x0126, 0x2091, 0x2600, 0x080c, 0x7a59,
+	0x012e, 0x7358, 0x745c, 0x6014, 0x905d, 0x0598, 0x2b48, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x190c, 0xbc1e, 0xab42,
+	0xac3e, 0x2001, 0x1875, 0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4,
+	0x1158, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120,
+	0xa83b, 0x7fff, 0xa837, 0xffff, 0x080c, 0x1d24, 0x1190, 0x080c,
+	0x17ff, 0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a,
+	0x2c00, 0xa812, 0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee,
+	0x0005, 0x7037, 0x0050, 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c,
+	0x153a, 0x0005, 0x080c, 0x0d65, 0x0016, 0x2009, 0x00a0, 0x8109,
+	0xa001, 0xa001, 0xa001, 0x1dd8, 0x001e, 0x2cf0, 0x0126, 0x2091,
+	0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730,
+	0xa864, 0x2068, 0xa81a, 0x9d84, 0x000f, 0x9088, 0x1d04, 0x2165,
+	0x0002, 0x1690, 0x16dd, 0x1690, 0x1690, 0x1690, 0x16bf, 0x1690,
+	0x1694, 0x1689, 0x16d4, 0x1690, 0x1690, 0x1690, 0x1799, 0x16a8,
+	0x169e, 0xa964, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0904, 0x16d4,
+	0x9085, 0x0001, 0x0804, 0x1790, 0xa87c, 0xd0bc, 0x0dc8, 0xa890,
+	0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x16e4, 0xa87c, 0xd0bc,
+	0x0d78, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x1733,
+	0xa87c, 0xd0bc, 0x0d28, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804,
+	0x9045, 0x090c, 0x0d65, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80,
+	0x1d04, 0x2065, 0xa888, 0xd19c, 0x1904, 0x1733, 0x0428, 0xa87c,
+	0xd0ac, 0x0970, 0xa804, 0x9045, 0x090c, 0x0d65, 0xa164, 0xa91a,
+	0x91ec, 0x000f, 0x9d80, 0x1d04, 0x2065, 0x9006, 0xa842, 0xa83e,
+	0xd19c, 0x1904, 0x1733, 0x0080, 0xa87c, 0xd0ac, 0x0904, 0x1690,
+	0x9006, 0xa842, 0xa83e, 0x0804, 0x1733, 0xa87c, 0xd0ac, 0x0904,
+	0x1690, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c,
+	0x0d65, 0x9082, 0x001b, 0x0002, 0x1707, 0x1707, 0x1709, 0x1707,
+	0x1707, 0x1707, 0x170f, 0x1707, 0x1707, 0x1707, 0x1715, 0x1707,
+	0x1707, 0x1707, 0x171b, 0x1707, 0x1707, 0x1707, 0x1721, 0x1707,
+	0x1707, 0x1707, 0x1727, 0x1707, 0x1707, 0x1707, 0x172d, 0x080c,
+	0x0d65, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x1778, 0xa584,
+	0xa488, 0xa38c, 0xa290, 0x0804, 0x1778, 0xa594, 0xa498, 0xa39c,
+	0xa2a0, 0x0804, 0x1778, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804,
+	0x1778, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x1778, 0xa5c4,
+	0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x1778, 0xa5d4, 0xa4d8, 0xa3dc,
+	0xa2e0, 0x0804, 0x1778, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d65,
+	0x9082, 0x001b, 0x0002, 0x1756, 0x1754, 0x1754, 0x1754, 0x1754,
+	0x1754, 0x175d, 0x1754, 0x1754, 0x1754, 0x1754, 0x1754, 0x1764,
+	0x1754, 0x1754, 0x1754, 0x1754, 0x1754, 0x176b, 0x1754, 0x1754,
+	0x1754, 0x1754, 0x1754, 0x1772, 0x080c, 0x0d65, 0xa56c, 0xa470,
+	0xa774, 0xa678, 0xa37c, 0xa280, 0x00d8, 0xa584, 0xa488, 0xa78c,
+	0xa690, 0xa394, 0xa298, 0x00a0, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8,
+	0xa3ac, 0xa2b0, 0x0068, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4,
+	0xa2c8, 0x0030, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0,
+	0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60,
+	0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x8109, 0xa916, 0x1158,
+	0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006,
+	0x00ce, 0x012e, 0x0005, 0x2800, 0xa80e, 0xab0a, 0x2c00, 0xa812,
+	0x0c78, 0x0804, 0x1690, 0x0016, 0x2009, 0x00a0, 0x8109, 0xa001,
+	0xa001, 0xa001, 0x1dd8, 0x001e, 0x2ff0, 0x0126, 0x2091, 0x2200,
+	0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e, 0x2061, 0x1cff,
+	0xa813, 0x1cff, 0x2c05, 0xa80a, 0xa964, 0xa91a, 0xa87c, 0xd0ac,
+	0x090c, 0x0d65, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0034,
+	0x1a0c, 0x0d65, 0xadcc, 0xacd0, 0xafd4, 0xaed8, 0xabdc, 0xaae0,
+	0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa8ac, 0xaab0,
+	0xa836, 0xaa3a, 0xa988, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0008,
+	0x1120, 0x8109, 0xa916, 0x0128, 0x0078, 0x918a, 0x0002, 0xa916,
+	0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e,
+	0x9006, 0x00ce, 0x012e, 0x0005, 0xa804, 0x9045, 0x090c, 0x0d65,
+	0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f, 0x9080, 0x1d04, 0x2015,
+	0x82ff, 0x090c, 0x0d65, 0xaa12, 0x2205, 0xa80a, 0x0c10, 0x903e,
+	0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x18f4, 0x1856,
+	0x1856, 0x18f4, 0x18f4, 0x18ee, 0x18f4, 0x1856, 0x18a5, 0x18a5,
+	0x18a5, 0x18f4, 0x18f4, 0x18f4, 0x18eb, 0x18a5, 0xc0fc, 0xa882,
+	0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x18f6, 0x2c05,
+	0x908a, 0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x1842,
+	0x1840, 0x1840, 0x1840, 0x1840, 0x1840, 0x1846, 0x1840, 0x1840,
+	0x1840, 0x1840, 0x1840, 0x184a, 0x1840, 0x1840, 0x1840, 0x1840,
+	0x1840, 0x184e, 0x1840, 0x1840, 0x1840, 0x1840, 0x1840, 0x1852,
+	0x080c, 0x0d65, 0xa774, 0xa678, 0x0804, 0x18f6, 0xa78c, 0xa690,
+	0x0804, 0x18f6, 0xa7a4, 0xa6a8, 0x0804, 0x18f6, 0xa7bc, 0xa6c0,
+	0x0804, 0x18f6, 0xa7d4, 0xa6d8, 0x0804, 0x18f6, 0x2c05, 0x908a,
+	0x0036, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x1879, 0x1879,
+	0x187b, 0x1879, 0x1879, 0x1879, 0x1881, 0x1879, 0x1879, 0x1879,
+	0x1887, 0x1879, 0x1879, 0x1879, 0x188d, 0x1879, 0x1879, 0x1879,
+	0x1893, 0x1879, 0x1879, 0x1879, 0x1899, 0x1879, 0x1879, 0x1879,
+	0x189f, 0x080c, 0x0d65, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804,
+	0x18f6, 0xa584, 0xa488, 0xa38c, 0xa290, 0x0804, 0x18f6, 0xa594,
+	0xa498, 0xa39c, 0xa2a0, 0x0804, 0x18f6, 0xa5a4, 0xa4a8, 0xa3ac,
+	0xa2b0, 0x0804, 0x18f6, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804,
+	0x18f6, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x18f6, 0xa5d4,
+	0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x18f6, 0x2c05, 0x908a, 0x0034,
+	0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x18c8, 0x18c6, 0x18c6,
+	0x18c6, 0x18c6, 0x18c6, 0x18cf, 0x18c6, 0x18c6, 0x18c6, 0x18c6,
+	0x18c6, 0x18d6, 0x18c6, 0x18c6, 0x18c6, 0x18c6, 0x18c6, 0x18dd,
+	0x18c6, 0x18c6, 0x18c6, 0x18c6, 0x18c6, 0x18e4, 0x080c, 0x0d65,
+	0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, 0xa280, 0x0438, 0xa584,
+	0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0,
+	0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x00c8, 0xa5b4, 0xa4b8, 0xa7bc,
+	0xa6c0, 0xa3c4, 0xa2c8, 0x0090, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8,
+	0xa3dc, 0xa2e0, 0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x1cda,
+	0x1904, 0x17ff, 0x900e, 0x0050, 0x080c, 0x0d65, 0xab2e, 0xaa32,
+	0xad1e, 0xac22, 0xaf26, 0xae2a, 0x080c, 0x1cda, 0x0005, 0x6014,
+	0x2048, 0x6118, 0x810c, 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887,
+	0x0001, 0x0008, 0xa986, 0x601b, 0x0002, 0xa974, 0xd1dc, 0x1108,
+	0x0005, 0xa934, 0xa88c, 0x9106, 0x1158, 0xa938, 0xa890, 0x9106,
+	0x1138, 0x601c, 0xc084, 0x601e, 0x2009, 0x0048, 0x0804, 0x9c76,
+	0x0005, 0x0126, 0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c,
+	0x0007, 0x9186, 0x0000, 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020,
+	0x6023, 0x0000, 0x0006, 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808,
+	0x7808, 0xd09c, 0x0120, 0x080c, 0x1335, 0x8631, 0x1db8, 0x00ce,
+	0x781f, 0x0800, 0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c,
+	0x1335, 0x00ce, 0x2001, 0x0038, 0x080c, 0x19f9, 0x7930, 0x9186,
+	0x0040, 0x0160, 0x9186, 0x0042, 0x190c, 0x0d65, 0x2001, 0x001e,
+	0x8001, 0x1df0, 0x8631, 0x1d40, 0x080c, 0x1a08, 0x000e, 0x6022,
+	0x012e, 0x0005, 0x080c, 0x19f5, 0x7827, 0x0015, 0x7828, 0x9c06,
+	0x1db8, 0x782b, 0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803,
+	0x0000, 0x78ab, 0x0004, 0x00fe, 0x080c, 0x7096, 0x11b0, 0x2001,
+	0x0138, 0x2003, 0x0000, 0x2001, 0x0160, 0x2003, 0x0000, 0x2011,
+	0x012c, 0xa001, 0xa001, 0x8211, 0x1de0, 0x0081, 0x2001, 0x0386,
+	0x2003, 0x2020, 0x080c, 0x7137, 0x0005, 0x0479, 0x0039, 0x2001,
+	0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071,
+	0x0200, 0x080c, 0x2844, 0x2009, 0x003c, 0x080c, 0x2063, 0x2001,
+	0x015d, 0x2003, 0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c,
+	0x8053, 0x70a0, 0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001,
+	0x020d, 0x2003, 0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x12f5,
+	0x7803, 0x0001, 0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014,
+	0x2003, 0x0000, 0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c,
+	0x7096, 0x1108, 0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c,
+	0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160,
+	0x2001, 0x0111, 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001,
+	0x015d, 0x2003, 0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003,
+	0x0048, 0xa001, 0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421,
+	0x1db0, 0x004e, 0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e,
+	0x0005, 0x2c08, 0x621c, 0x080c, 0x15ab, 0x7930, 0x0005, 0x2c08,
+	0x621c, 0x080c, 0x15d8, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005,
+	0x2031, 0x0005, 0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038,
+	0x0c41, 0x9186, 0x0040, 0x0904, 0x1a66, 0x2001, 0x001e, 0x0c69,
+	0x8631, 0x1d80, 0x080c, 0x0d65, 0x781f, 0x0202, 0x2001, 0x015d,
+	0x2003, 0x0000, 0x2001, 0x0b10, 0x0c01, 0x781c, 0xd084, 0x0110,
+	0x0861, 0x04e0, 0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568,
+	0x781c, 0xd084, 0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869,
+	0x2001, 0x0037, 0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030,
+	0x080c, 0x19ff, 0x9186, 0x0040, 0x190c, 0x0d65, 0x00d6, 0x2069,
+	0x0200, 0x692c, 0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130,
+	0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184,
+	0x0007, 0x1db0, 0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007,
+	0x090c, 0x0d65, 0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126,
+	0x2091, 0x2400, 0x2079, 0x0380, 0x2001, 0x19b7, 0x2070, 0x012e,
+	0x0005, 0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048,
+	0xa964, 0xa91a, 0x918c, 0x00ff, 0x9184, 0x000f, 0x0002, 0x1a9b,
+	0x1a9b, 0x1a9b, 0x1a9b, 0x1a9b, 0x1a9b, 0x1a9b, 0x1a9b, 0x1a8f,
+	0x1a9d, 0x1a9b, 0x1a9b, 0x1a9b, 0x1a9b, 0x1a9b, 0x1a9b, 0x9086,
+	0x0008, 0x1148, 0xa87c, 0xd0b4, 0x0904, 0x1c0d, 0x2011, 0x1cff,
+	0x2205, 0xab88, 0x0068, 0x080c, 0x0d65, 0xa87c, 0xd0b4, 0x0904,
+	0x1c0d, 0x9184, 0x000f, 0x9080, 0x1d04, 0x2015, 0x2205, 0xab88,
+	0x2908, 0xa80a, 0xa90e, 0xaa12, 0xab16, 0x9006, 0xa842, 0xa83e,
+	0x012e, 0x0005, 0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014,
+	0x2048, 0xa88c, 0xa990, 0xaaac, 0xabb0, 0xaa36, 0xab3a, 0xa83e,
+	0xa942, 0xa846, 0xa94a, 0xa964, 0x918c, 0x00ff, 0x9186, 0x001e,
+	0x0198, 0x2940, 0xa064, 0xa81a, 0x90ec, 0x000f, 0x9d80, 0x1d04,
+	0x2065, 0x2c05, 0x2808, 0x2c10, 0xab88, 0xa80a, 0xa90e, 0xaa12,
+	0xab16, 0x012e, 0x3e60, 0x0005, 0xa804, 0x2040, 0x0c58, 0x2cf0,
+	0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa97c, 0x2950,
+	0xd1dc, 0x1904, 0x1bd7, 0xc1dd, 0xa97e, 0x9006, 0xa842, 0xa83e,
+	0xa988, 0x8109, 0xa916, 0xa964, 0xa91a, 0x9184, 0x000f, 0x9088,
+	0x1d04, 0x2145, 0x0002, 0x1b0b, 0x1b19, 0x1b0b, 0x1b0b, 0x1b0b,
+	0x1b0d, 0x1b0b, 0x1b0b, 0x1b6e, 0x1b6e, 0x1b0b, 0x1b0b, 0x1b0b,
+	0x1b6c, 0x1b0b, 0x1b0b, 0x080c, 0x0d65, 0xa804, 0x2050, 0xb164,
+	0xa91a, 0x9184, 0x000f, 0x9080, 0x1d04, 0x2045, 0xd19c, 0x1904,
+	0x1b6e, 0x9036, 0x2638, 0x2805, 0x908a, 0x0036, 0x1a0c, 0x0d65,
+	0x9082, 0x001b, 0x0002, 0x1b3e, 0x1b3e, 0x1b40, 0x1b3e, 0x1b3e,
+	0x1b3e, 0x1b46, 0x1b3e, 0x1b3e, 0x1b3e, 0x1b4c, 0x1b3e, 0x1b3e,
+	0x1b3e, 0x1b52, 0x1b3e, 0x1b3e, 0x1b3e, 0x1b58, 0x1b3e, 0x1b3e,
+	0x1b3e, 0x1b5e, 0x1b3e, 0x1b3e, 0x1b3e, 0x1b64, 0x080c, 0x0d65,
+	0xb574, 0xb478, 0xb37c, 0xb280, 0x0804, 0x1bb3, 0xb584, 0xb488,
+	0xb38c, 0xb290, 0x0804, 0x1bb3, 0xb594, 0xb498, 0xb39c, 0xb2a0,
+	0x0804, 0x1bb3, 0xb5a4, 0xb4a8, 0xb3ac, 0xb2b0, 0x0804, 0x1bb3,
+	0xb5b4, 0xb4b8, 0xb3bc, 0xb2c0, 0x0804, 0x1bb3, 0xb5c4, 0xb4c8,
+	0xb3cc, 0xb2d0, 0x0804, 0x1bb3, 0xb5d4, 0xb4d8, 0xb3dc, 0xb2e0,
+	0x0804, 0x1bb3, 0x0804, 0x1bb3, 0x080c, 0x0d65, 0x2805, 0x908a,
+	0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x1b91, 0x1b8f,
+	0x1b8f, 0x1b8f, 0x1b8f, 0x1b8f, 0x1b98, 0x1b8f, 0x1b8f, 0x1b8f,
+	0x1b8f, 0x1b8f, 0x1b9f, 0x1b8f, 0x1b8f, 0x1b8f, 0x1b8f, 0x1b8f,
+	0x1ba6, 0x1b8f, 0x1b8f, 0x1b8f, 0x1b8f, 0x1b8f, 0x1bad, 0x080c,
+	0x0d65, 0xb56c, 0xb470, 0xb774, 0xb678, 0xb37c, 0xb280, 0x00d8,
+	0xb584, 0xb488, 0xb78c, 0xb690, 0xb394, 0xb298, 0x00a0, 0xb59c,
+	0xb4a0, 0xb7a4, 0xb6a8, 0xb3ac, 0xb2b0, 0x0068, 0xb5b4, 0xb4b8,
+	0xb7bc, 0xb6c0, 0xb3c4, 0xb2c8, 0x0030, 0xb5cc, 0xb4d0, 0xb7d4,
+	0xb6d8, 0xb3dc, 0xb2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26,
+	0xae2a, 0xa988, 0x8109, 0xa916, 0x1118, 0x9006, 0x012e, 0x0005,
+	0x8840, 0x2805, 0x9005, 0x1168, 0xb004, 0x9005, 0x090c, 0x0d65,
+	0x2050, 0xb164, 0xa91a, 0x9184, 0x000f, 0x9080, 0x1d04, 0x2045,
+	0x2805, 0x2810, 0x2a08, 0xa80a, 0xa90e, 0xaa12, 0x0c30, 0x3e60,
+	0x6344, 0xd3fc, 0x190c, 0x0d65, 0xa93c, 0xaa40, 0xa844, 0x9106,
+	0x1118, 0xa848, 0x9206, 0x0508, 0x2958, 0xab48, 0xac44, 0x2940,
+	0x080c, 0x1d24, 0x1998, 0x2850, 0x2c40, 0xab14, 0xa880, 0xd0fc,
+	0x1140, 0xa810, 0x2005, 0xa80a, 0x2a00, 0xa80e, 0x2009, 0x8015,
+	0x0070, 0x00c6, 0x3e60, 0x6044, 0xc0a4, 0x9085, 0x8005, 0x6046,
+	0x00ce, 0x8319, 0xab16, 0x1904, 0x1bc0, 0x2009, 0x8005, 0x3e60,
+	0x6044, 0x9105, 0x6046, 0x0804, 0x1bbd, 0x080c, 0x0d65, 0x00f6,
+	0x00e6, 0x0096, 0x00c6, 0x0026, 0x704c, 0x9c06, 0x190c, 0x0d65,
+	0x2079, 0x0090, 0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004,
+	0x7057, 0x0000, 0x6014, 0x2048, 0x080c, 0xb842, 0x0118, 0xa880,
+	0xc0bd, 0xa882, 0x6020, 0x9086, 0x0006, 0x1170, 0x2061, 0x0100,
+	0x62c8, 0x2001, 0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0,
+	0x60c4, 0xa89a, 0x60c8, 0xa896, 0x704c, 0x2060, 0x00c6, 0x080c,
+	0xb440, 0x080c, 0x98bb, 0x00ce, 0x704c, 0x9c06, 0x1150, 0x2009,
+	0x0040, 0x080c, 0x2063, 0x080c, 0x949c, 0x2011, 0x0000, 0x080c,
+	0x9326, 0x002e, 0x00ce, 0x009e, 0x00ee, 0x00fe, 0x0005, 0x00f6,
+	0x2079, 0x0090, 0x781c, 0x0006, 0x7818, 0x0006, 0x2079, 0x0100,
+	0x7a14, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x2019, 0x1000,
+	0x8319, 0x090c, 0x0d65, 0x7820, 0xd0bc, 0x1dd0, 0x79c8, 0x000e,
+	0x9102, 0x001e, 0x0006, 0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6,
+	0x000e, 0x78ca, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x2079,
+	0x0090, 0x782b, 0x0008, 0x7057, 0x0000, 0x00fe, 0x0005, 0x00f6,
+	0x00e6, 0x2071, 0x19b7, 0x7054, 0x9086, 0x0000, 0x0904, 0x1cd5,
+	0x2079, 0x0090, 0x2009, 0x0207, 0x210c, 0xd194, 0x01b8, 0x2009,
+	0x020c, 0x210c, 0x9184, 0x0003, 0x0188, 0x080c, 0xd62d, 0x2001,
+	0x0133, 0x2004, 0x9005, 0x090c, 0x0d65, 0x0016, 0x2009, 0x0040,
+	0x080c, 0x2063, 0x001e, 0x2001, 0x020c, 0x2102, 0x2009, 0x0206,
+	0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040,
+	0x080c, 0x2063, 0x782c, 0xd0fc, 0x09a8, 0x080c, 0x98d7, 0x782c,
+	0xd0fc, 0x1de8, 0x080c, 0x98bb, 0x7054, 0x9086, 0x0000, 0x1950,
+	0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c,
+	0x2063, 0x782b, 0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005,
+	0x080c, 0x0d65, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005,
+	0xa004, 0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f,
+	0x9080, 0x1d04, 0x2065, 0x8cff, 0x090c, 0x0d65, 0x8a51, 0x0005,
+	0x2050, 0x0005, 0x0000, 0x001d, 0x0021, 0x0025, 0x0029, 0x002d,
+	0x0031, 0x0035, 0x0000, 0x001b, 0x0021, 0x0027, 0x002d, 0x0033,
+	0x0000, 0x0000, 0x0023, 0x0000, 0x0000, 0x1cf7, 0x1cf3, 0x0000,
+	0x0000, 0x1d01, 0x0000, 0x1cf7, 0x1cfe, 0x1cfe, 0x1cfb, 0x0000,
+	0x0000, 0x0000, 0x1d01, 0x1cfe, 0x0000, 0x1cf9, 0x1cf9, 0x0000,
+	0x0000, 0x1d01, 0x0000, 0x1cf9, 0x1cff, 0x1cff, 0x1cff, 0x0000,
+	0x0000, 0x0000, 0x1d01, 0x1cff, 0x00c6, 0x00d6, 0x0086, 0xab42,
+	0xac3e, 0xa888, 0x9055, 0x0904, 0x1f03, 0x2940, 0xa064, 0x90ec,
+	0x000f, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1118, 0x2061, 0x1cff,
+	0x00d0, 0x9de0, 0x1d04, 0x9d86, 0x0007, 0x0130, 0x9d86, 0x000e,
+	0x0118, 0x9d86, 0x000f, 0x1120, 0xa08c, 0x9422, 0xa090, 0x931b,
+	0x2c05, 0x9065, 0x1140, 0x0310, 0x0804, 0x1f03, 0xa004, 0x9045,
+	0x0904, 0x1f03, 0x08d8, 0x2c05, 0x9005, 0x0904, 0x1deb, 0xdd9c,
+	0x1904, 0x1da7, 0x908a, 0x0036, 0x1a0c, 0x0d65, 0x9082, 0x001b,
+	0x0002, 0x1d7c, 0x1d7c, 0x1d7e, 0x1d7c, 0x1d7c, 0x1d7c, 0x1d84,
+	0x1d7c, 0x1d7c, 0x1d7c, 0x1d8a, 0x1d7c, 0x1d7c, 0x1d7c, 0x1d90,
+	0x1d7c, 0x1d7c, 0x1d7c, 0x1d96, 0x1d7c, 0x1d7c, 0x1d7c, 0x1d9c,
+	0x1d7c, 0x1d7c, 0x1d7c, 0x1da2, 0x080c, 0x0d65, 0xa07c, 0x9422,
+	0xa080, 0x931b, 0x0804, 0x1de1, 0xa08c, 0x9422, 0xa090, 0x931b,
+	0x0804, 0x1de1, 0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804, 0x1de1,
+	0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0804, 0x1de1, 0xa0bc, 0x9422,
+	0xa0c0, 0x931b, 0x0804, 0x1de1, 0xa0cc, 0x9422, 0xa0d0, 0x931b,
+	0x0804, 0x1de1, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0, 0x908a,
+	0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x1dc9, 0x1dc7,
+	0x1dc7, 0x1dc7, 0x1dc7, 0x1dc7, 0x1dce, 0x1dc7, 0x1dc7, 0x1dc7,
+	0x1dc7, 0x1dc7, 0x1dd3, 0x1dc7, 0x1dc7, 0x1dc7, 0x1dc7, 0x1dc7,
+	0x1dd8, 0x1dc7, 0x1dc7, 0x1dc7, 0x1dc7, 0x1dc7, 0x1ddd, 0x080c,
+	0x0d65, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0098, 0xa094, 0x9422,
+	0xa098, 0x931b, 0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0048,
+	0xa0c4, 0x9422, 0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422, 0xa0e0,
+	0x931b, 0x0630, 0x2300, 0x9405, 0x0160, 0x8a51, 0x0904, 0x1f03,
+	0x8c60, 0x0804, 0x1d53, 0xa004, 0x9045, 0x0904, 0x1f03, 0x0804,
+	0x1d2e, 0x8a51, 0x0904, 0x1f03, 0x8c60, 0x2c05, 0x9005, 0x1158,
+	0xa004, 0x9045, 0x0904, 0x1f03, 0xa064, 0x90ec, 0x000f, 0x9de0,
+	0x1d04, 0x2c05, 0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804, 0x1ef8,
+	0x2c05, 0x8422, 0x8420, 0x831a, 0x9399, 0x0000, 0xac2e, 0xab32,
+	0xdd9c, 0x1904, 0x1e95, 0x9082, 0x001b, 0x0002, 0x1e31, 0x1e31,
+	0x1e33, 0x1e31, 0x1e31, 0x1e31, 0x1e41, 0x1e31, 0x1e31, 0x1e31,
+	0x1e4f, 0x1e31, 0x1e31, 0x1e31, 0x1e5d, 0x1e31, 0x1e31, 0x1e31,
+	0x1e6b, 0x1e31, 0x1e31, 0x1e31, 0x1e79, 0x1e31, 0x1e31, 0x1e31,
+	0x1e87, 0x080c, 0x0d65, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300,
+	0x911b, 0x0a0c, 0x0d65, 0xa074, 0x9420, 0xa078, 0x9319, 0x0804,
+	0x1ef3, 0xa18c, 0x2400, 0x9122, 0xa190, 0x2300, 0x911b, 0x0a0c,
+	0x0d65, 0xa084, 0x9420, 0xa088, 0x9319, 0x0804, 0x1ef3, 0xa19c,
+	0x2400, 0x9122, 0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa094,
+	0x9420, 0xa098, 0x9319, 0x0804, 0x1ef3, 0xa1ac, 0x2400, 0x9122,
+	0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa0a4, 0x9420, 0xa0a8,
+	0x9319, 0x0804, 0x1ef3, 0xa1bc, 0x2400, 0x9122, 0xa1c0, 0x2300,
+	0x911b, 0x0a0c, 0x0d65, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0804,
+	0x1ef3, 0xa1cc, 0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b, 0x0a0c,
+	0x0d65, 0xa0c4, 0x9420, 0xa0c8, 0x9319, 0x0804, 0x1ef3, 0xa1dc,
+	0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa0d4,
+	0x9420, 0xa0d8, 0x9319, 0x0804, 0x1ef3, 0x9082, 0x001b, 0x0002,
+	0x1eb3, 0x1eb1, 0x1eb1, 0x1eb1, 0x1eb1, 0x1eb1, 0x1ec0, 0x1eb1,
+	0x1eb1, 0x1eb1, 0x1eb1, 0x1eb1, 0x1ecd, 0x1eb1, 0x1eb1, 0x1eb1,
+	0x1eb1, 0x1eb1, 0x1eda, 0x1eb1, 0x1eb1, 0x1eb1, 0x1eb1, 0x1eb1,
+	0x1ee7, 0x080c, 0x0d65, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300,
+	0x911b, 0x0a0c, 0x0d65, 0xa06c, 0x9420, 0xa070, 0x9319, 0x0498,
+	0xa194, 0x2400, 0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c, 0x0d65,
+	0xa084, 0x9420, 0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400, 0x9122,
+	0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa09c, 0x9420, 0xa0a0,
+	0x9319, 0x00c8, 0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300, 0x911b,
+	0x0a0c, 0x0d65, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060, 0xa1dc,
+	0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa0cc,
+	0x9420, 0xa0d0, 0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd, 0xa882,
+	0x2800, 0xa85a, 0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e, 0x000e,
+	0x000e, 0x9006, 0x0028, 0x008e, 0x00de, 0x00ce, 0x9085, 0x0001,
+	0x0005, 0x00c6, 0x610c, 0x0016, 0x9026, 0x2410, 0x6004, 0x9420,
+	0x9291, 0x0000, 0x2c04, 0x9210, 0x9ce0, 0x0002, 0x918a, 0x0002,
+	0x1da8, 0x9284, 0x000f, 0x9405, 0x001e, 0x00ce, 0x0005, 0x7803,
+	0x0003, 0x780f, 0x0000, 0x6004, 0x7812, 0x2c04, 0x7816, 0x9ce0,
+	0x0002, 0x918a, 0x0002, 0x1db8, 0x0005, 0x2001, 0x0005, 0x2004,
+	0xd0bc, 0x190c, 0x0d5e, 0xd094, 0x0110, 0x080c, 0x11d1, 0x0005,
+	0x0126, 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069,
+	0x1800, 0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f,
+	0x0410, 0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b,
+	0x001f, 0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091,
+	0x2600, 0x781c, 0xd0a4, 0x190c, 0x2060, 0x7900, 0xd1dc, 0x1118,
+	0x9084, 0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x1f7e, 0x1f76,
+	0x7a59, 0x1f76, 0x1f78, 0x1f78, 0x1f78, 0x1f78, 0x7a3f, 0x1f76,
+	0x1f7a, 0x1f76, 0x1f78, 0x1f76, 0x1f78, 0x1f76, 0x080c, 0x0d65,
+	0x0031, 0x0020, 0x080c, 0x7a3f, 0x080c, 0x7a59, 0x0005, 0x0006,
+	0x0016, 0x0026, 0x080c, 0xd62d, 0x7930, 0x9184, 0x0003, 0x0510,
+	0x080c, 0x98bb, 0x2001, 0x19ca, 0x2004, 0x9005, 0x01a0, 0x2001,
+	0x0133, 0x2004, 0x9005, 0x090c, 0x0d65, 0x00c6, 0x2001, 0x19ca,
+	0x2064, 0x080c, 0x98d7, 0x080c, 0xb440, 0x2009, 0x0040, 0x080c,
+	0x2063, 0x00ce, 0x0408, 0x2009, 0x0040, 0x080c, 0x2063, 0x080c,
+	0x98d7, 0x00d0, 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003,
+	0x0160, 0x080c, 0x7096, 0x1138, 0x080c, 0x7396, 0x080c, 0x5cd7,
+	0x080c, 0x6fc7, 0x0010, 0x080c, 0x5b92, 0x080c, 0x7af7, 0x0041,
+	0x0018, 0x9184, 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005,
+	0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a3b, 0x080c, 0x196c,
+	0x005e, 0x004e, 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00,
+	0x2071, 0x1800, 0x7128, 0x2001, 0x193f, 0x2102, 0x2001, 0x1947,
+	0x2102, 0x2001, 0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201,
+	0x789e, 0x78a3, 0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c,
+	0x9398, 0x0005, 0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008,
+	0x8423, 0x8423, 0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011,
+	0x0007, 0x8403, 0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182,
+	0x02bc, 0x1238, 0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420,
+	0x00e0, 0x9182, 0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003,
+	0x9420, 0x0098, 0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423,
+	0x8423, 0x0058, 0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403,
+	0x9420, 0x0018, 0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002,
+	0x8020, 0x8301, 0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203,
+	0x9405, 0x789a, 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200,
+	0x6814, 0x9084, 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005,
+	0x00d6, 0x2069, 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008,
+	0xc0a4, 0x6812, 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200,
+	0x6810, 0x9084, 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005,
+	0x7938, 0x080c, 0x0d5e, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001,
+	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001,
+	0xa001, 0xa001, 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091,
+	0x2800, 0x2061, 0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c,
+	0x283e, 0x080c, 0x2758, 0x2001, 0x196d, 0x2003, 0x0000, 0x2001,
+	0x196e, 0x2003, 0x0000, 0x080c, 0x28af, 0x9006, 0x080c, 0x2787,
+	0x9006, 0x080c, 0x276a, 0x20a9, 0x0012, 0x1d04, 0x2095, 0x2091,
+	0x6000, 0x1f04, 0x2095, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050,
+	0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x6224, 0x080c, 0x288c,
+	0x080c, 0x2476, 0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x2486,
+	0x60e7, 0x0000, 0x61ea, 0x60e3, 0x0002, 0x604b, 0xf7f7, 0x6043,
+	0x0000, 0x602f, 0x0080, 0x602f, 0x0000, 0x6007, 0x149f, 0x00c6,
+	0x2061, 0x0140, 0x608b, 0x000b, 0x608f, 0x10b8, 0x6093, 0x0000,
+	0x6097, 0x0198, 0x00ce, 0x6004, 0x9085, 0x8000, 0x6006, 0x60bb,
+	0x0000, 0x20a9, 0x0018, 0x60bf, 0x0000, 0x1f04, 0x20d3, 0x60bb,
+	0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x60bf, 0x0320, 0x60bf,
+	0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b, 0x602b,
+	0x402c, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3, 0x0080,
+	0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001, 0x1834,
+	0x2003, 0x0000, 0x2001, 0x1833, 0x2003, 0x0001, 0x0005, 0x0126,
+	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x6028, 0x910c,
+	0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, 0x002a, 0x9195, 0x0004,
+	0x9284, 0x0007, 0x0002, 0x211e, 0x211b, 0x211b, 0x211b, 0x211d,
+	0x211b, 0x211b, 0x211b, 0x080c, 0x0d65, 0x0029, 0x002e, 0x001e,
+	0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c, 0x0118,
+	0xd19c, 0x1904, 0x237d, 0xd1f4, 0x190c, 0x0d5e, 0x080c, 0x7096,
+	0x0904, 0x217b, 0x080c, 0xbf61, 0x1120, 0x7000, 0x9086, 0x0003,
+	0x0580, 0x6024, 0x9084, 0x1800, 0x0560, 0x080c, 0x70b9, 0x0118,
+	0x080c, 0x70a7, 0x1530, 0x2011, 0x0020, 0x080c, 0x288c, 0x6043,
+	0x0000, 0x080c, 0xbf61, 0x0168, 0x080c, 0x70b9, 0x1150, 0x2001,
+	0x1977, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x6f0c, 0x0804,
+	0x2380, 0x70a0, 0x9005, 0x1150, 0x70a3, 0x0001, 0x00d6, 0x2069,
+	0x0140, 0x080c, 0x70ed, 0x00de, 0x1904, 0x2380, 0x080c, 0x73a0,
+	0x0428, 0x080c, 0x70b9, 0x1590, 0x6024, 0x9084, 0x1800, 0x1108,
+	0x0468, 0x080c, 0x73a0, 0x080c, 0x7396, 0x080c, 0x5cd7, 0x080c,
+	0x6fc7, 0x0804, 0x237d, 0xd1ac, 0x1508, 0x6024, 0xd0dc, 0x1170,
+	0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7094, 0x9086,
+	0x0028, 0x1110, 0x080c, 0x7279, 0x0804, 0x237d, 0x080c, 0x739b,
+	0x0048, 0x2001, 0x194d, 0x2003, 0x0002, 0x0020, 0x080c, 0x71d7,
+	0x0804, 0x237d, 0x080c, 0x731b, 0x0804, 0x237d, 0xd1ac, 0x0904,
+	0x2297, 0x080c, 0x7096, 0x11d0, 0x2011, 0x0020, 0x080c, 0x288c,
+	0x0006, 0x0026, 0x0036, 0x080c, 0x70b0, 0x1158, 0x080c, 0x7396,
+	0x080c, 0x5cd7, 0x080c, 0x6fc7, 0x003e, 0x002e, 0x000e, 0x00ae,
+	0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x706a, 0x0016, 0x0046,
+	0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a,
+	0x6043, 0x0090, 0x6043, 0x0010, 0x74d6, 0x948c, 0xff00, 0x7038,
+	0xd084, 0x0178, 0x9186, 0xf800, 0x1160, 0x7044, 0xd084, 0x1148,
+	0xc085, 0x7046, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x48da,
+	0x003e, 0x080c, 0xbf5a, 0x1904, 0x226e, 0x9196, 0xff00, 0x05a8,
+	0x705c, 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568,
+	0x7130, 0xd184, 0x1550, 0x080c, 0x317a, 0x0128, 0xc18d, 0x7132,
+	0x080c, 0x665e, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248,
+	0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904,
+	0x226e, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac,
+	0x1904, 0x226e, 0xc1ad, 0x2102, 0x0036, 0x73d4, 0x2011, 0x8013,
+	0x080c, 0x48da, 0x003e, 0x0804, 0x226e, 0x7038, 0xd08c, 0x1140,
+	0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x226e, 0xc1ad, 0x2102,
+	0x0036, 0x73d4, 0x2011, 0x8013, 0x080c, 0x48da, 0x003e, 0x7130,
+	0xc185, 0x7132, 0x2011, 0x1854, 0x220c, 0x00f0, 0x0016, 0x2009,
+	0x0001, 0x2011, 0x0100, 0x080c, 0x83cd, 0x2019, 0x000e, 0x00c6,
+	0x2061, 0x0000, 0x080c, 0xd1fc, 0x00ce, 0x9484, 0x00ff, 0x9080,
+	0x317f, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006, 0x2009,
+	0x000e, 0x080c, 0xd284, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009,
+	0x0002, 0x2019, 0x0004, 0x080c, 0x2fd3, 0x001e, 0x0078, 0x0156,
+	0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x626b, 0x1110, 0x080c,
+	0x5cf1, 0x8108, 0x1f04, 0x2264, 0x00be, 0x015e, 0x00ce, 0x004e,
+	0x080c, 0x98bb, 0x080c, 0x9b60, 0x080c, 0x98d7, 0x60e3, 0x0000,
+	0x001e, 0x2001, 0x1800, 0x2014, 0x9296, 0x0004, 0x1170, 0xd19c,
+	0x11b0, 0x2011, 0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, 0x9295,
+	0x0002, 0x6206, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001,
+	0x1825, 0x2003, 0x0000, 0x2011, 0x0020, 0x080c, 0x288c, 0xd194,
+	0x0904, 0x237d, 0x0016, 0x080c, 0x98bb, 0x6220, 0xd2b4, 0x0904,
+	0x2325, 0x080c, 0x81ea, 0x080c, 0x8f9c, 0x2011, 0x0004, 0x080c,
+	0x288c, 0x00f6, 0x2019, 0x19c3, 0x2304, 0x907d, 0x0904, 0x22f2,
+	0x7804, 0x9086, 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096,
+	0x2069, 0x0140, 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002,
+	0x2001, 0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c,
+	0x8001, 0x1df0, 0x080c, 0x2862, 0x2001, 0x001e, 0x8001, 0x0240,
+	0x20a9, 0x0009, 0x080c, 0x2819, 0x6904, 0xd1dc, 0x1140, 0x0cb0,
+	0x2001, 0x0100, 0x080c, 0x2852, 0x9006, 0x080c, 0x2852, 0x080c,
+	0x885d, 0x080c, 0x98d7, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60,
+	0x080c, 0x9bda, 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e,
+	0x00ae, 0x0005, 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084,
+	0x4000, 0x0110, 0x080c, 0x2862, 0x00de, 0x00c6, 0x2061, 0x19b7,
+	0x6034, 0x080c, 0xbf61, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018,
+	0x909a, 0x00c8, 0x1238, 0x8000, 0x6036, 0x00ce, 0x080c, 0x8f74,
+	0x0804, 0x237a, 0x2061, 0x0100, 0x62c0, 0x080c, 0x97ec, 0x2019,
+	0x19c3, 0x2304, 0x9065, 0x0130, 0x6003, 0x0001, 0x2009, 0x0027,
+	0x080c, 0x9c76, 0x00ce, 0x0804, 0x237a, 0xd2bc, 0x05e0, 0x080c,
+	0x81f7, 0x2011, 0x0004, 0x080c, 0x288c, 0x00d6, 0x2069, 0x0140,
+	0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2862, 0x00de, 0x00c6,
+	0x2061, 0x19b7, 0x6050, 0x080c, 0xbf61, 0x0120, 0x909a, 0x0003,
+	0x1638, 0x0018, 0x909a, 0x00c8, 0x1618, 0x8000, 0x6052, 0x604c,
+	0x00ce, 0x9005, 0x0578, 0x2009, 0x07d0, 0x080c, 0x81ef, 0x9080,
+	0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x2009, 0x1984, 0x2011,
+	0x0012, 0x080c, 0x289b, 0x00f0, 0x2009, 0x1984, 0x2011, 0x0016,
+	0x080c, 0x289b, 0x00b8, 0x2011, 0x0004, 0x080c, 0x288c, 0x0090,
+	0x0036, 0x2019, 0x0001, 0x080c, 0x9269, 0x003e, 0x2019, 0x19ca,
+	0x2304, 0x9065, 0x0130, 0x2009, 0x004f, 0x6003, 0x0003, 0x080c,
+	0x9c76, 0x00ce, 0x080c, 0x98d7, 0x001e, 0xd19c, 0x0904, 0x23db,
+	0x7038, 0xd0ac, 0x1538, 0x0016, 0x0156, 0x2011, 0x0008, 0x080c,
+	0x288c, 0x6050, 0xc0e5, 0x6052, 0x20a9, 0x0367, 0x1f04, 0x23a8,
+	0x1d04, 0x2390, 0x080c, 0x821e, 0x6020, 0xd09c, 0x1db8, 0x00f6,
+	0x2079, 0x0100, 0x080c, 0x27c9, 0x00fe, 0x1d80, 0x6050, 0xc0e4,
+	0x6052, 0x2011, 0x0008, 0x080c, 0x288c, 0x015e, 0x001e, 0x0498,
+	0x015e, 0x001e, 0x0016, 0x6028, 0xc09c, 0x602a, 0x080c, 0x98bb,
+	0x080c, 0x9b60, 0x080c, 0x98d7, 0x60e3, 0x0000, 0x080c, 0xd60c,
+	0x080c, 0xd627, 0x080c, 0x538c, 0xd0fc, 0x1138, 0x080c, 0xbf5a,
+	0x1120, 0x9085, 0x0001, 0x080c, 0x70dd, 0x9006, 0x080c, 0x2852,
+	0x2009, 0x0002, 0x080c, 0x283e, 0x00e6, 0x2071, 0x1800, 0x7003,
+	0x0004, 0x080c, 0x0e9c, 0x00ee, 0x2011, 0x0008, 0x080c, 0x288c,
+	0x080c, 0x0bab, 0x001e, 0x918c, 0xffd0, 0x2110, 0x080c, 0x288c,
+	0x00ae, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6,
+	0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x71cc, 0x70ce, 0x9116,
+	0x0904, 0x2435, 0x81ff, 0x01a0, 0x2009, 0x0000, 0x080c, 0x283e,
+	0x2011, 0x8011, 0x2019, 0x010e, 0x231c, 0x939e, 0x0007, 0x1118,
+	0x2019, 0x0001, 0x0010, 0x2019, 0x0000, 0x080c, 0x48da, 0x0468,
+	0x2001, 0x1978, 0x200c, 0x81ff, 0x1140, 0x2001, 0x0109, 0x2004,
+	0xd0b4, 0x0118, 0x2019, 0x0003, 0x0008, 0x2118, 0x2011, 0x8012,
+	0x080c, 0x48da, 0x080c, 0x0e9c, 0x080c, 0x538c, 0xd0fc, 0x11a8,
+	0x080c, 0xbf5a, 0x1190, 0x00c6, 0x080c, 0x24d1, 0x080c, 0x98bb,
+	0x080c, 0x91c4, 0x080c, 0x98d7, 0x2061, 0x0100, 0x2019, 0x0028,
+	0x2009, 0x0002, 0x080c, 0x2fd3, 0x00ce, 0x012e, 0x00fe, 0x00ee,
+	0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff,
+	0x2130, 0x9094, 0xff00, 0x11f0, 0x2011, 0x1836, 0x2214, 0xd2ac,
+	0x11c8, 0x81ff, 0x01e8, 0x2011, 0x181e, 0x2204, 0x9106, 0x1190,
+	0x2011, 0x181f, 0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206,
+	0x1148, 0x2011, 0x181f, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff,
+	0x9206, 0x1120, 0x2500, 0x080c, 0x7d4f, 0x0048, 0x9584, 0x00ff,
+	0x9080, 0x317f, 0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005,
+	0x9080, 0x317f, 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069,
+	0x0140, 0x2001, 0x1817, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006,
+	0x6852, 0x6856, 0x1f04, 0x2481, 0x00de, 0x0005, 0x0006, 0x00d6,
+	0x0026, 0x2069, 0x0140, 0x2001, 0x1817, 0x2102, 0x8114, 0x8214,
+	0x8214, 0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff,
+	0x1128, 0x9184, 0x000f, 0x9080, 0xd63b, 0x2005, 0x6856, 0x8211,
+	0x1f04, 0x2496, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061,
+	0x1800, 0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce,
+	0x0005, 0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140,
+	0x6980, 0x9116, 0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8,
+	0x2001, 0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04,
+	0x24c6, 0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e,
+	0x0005, 0x080c, 0x5388, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006,
+	0x0046, 0x2020, 0x2009, 0x002e, 0x080c, 0xd284, 0x004e, 0x0005,
+	0x00f6, 0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904,
+	0x253d, 0x080c, 0x27b9, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600,
+	0x1120, 0x2011, 0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120,
+	0x2011, 0x8000, 0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016,
+	0x2009, 0x0001, 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009,
+	0x0002, 0x00b0, 0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004,
+	0x0078, 0x908e, 0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040,
+	0x9084, 0x0700, 0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058,
+	0x2300, 0x9080, 0x0020, 0x2018, 0x080c, 0x83fb, 0x928c, 0xff00,
+	0x0110, 0x2011, 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2,
+	0x2009, 0x0138, 0x220a, 0x080c, 0x7096, 0x1118, 0x2009, 0x193d,
+	0x220a, 0x002e, 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8,
+	0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170,
+	0x200c, 0x8000, 0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0d5e,
+	0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x2001, 0x0171, 0x2004,
+	0xd0dc, 0x0168, 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e,
+	0x004c, 0x1128, 0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e,
+	0x2001, 0x0227, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108,
+	0x2001, 0x0226, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108,
+	0x0005, 0x0018, 0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000,
+	0x1800, 0x0156, 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x1960,
+	0x2004, 0x908a, 0x0007, 0x1a0c, 0x0d65, 0x0033, 0x00ee, 0x002e,
+	0x001e, 0x000e, 0x015e, 0x0005, 0x259b, 0x25b9, 0x25dd, 0x25df,
+	0x2608, 0x260a, 0x260c, 0x2001, 0x0001, 0x080c, 0x23e2, 0x080c,
+	0x2803, 0x2001, 0x1962, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7,
+	0x782a, 0x9006, 0x20a9, 0x0009, 0x080c, 0x27d5, 0x2001, 0x1960,
+	0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x260d, 0x080c, 0x81fc,
+	0x0005, 0x2009, 0x1965, 0x200b, 0x0000, 0x2001, 0x196a, 0x2003,
+	0x0036, 0x2001, 0x1969, 0x2003, 0x002a, 0x2001, 0x1962, 0x2003,
+	0x0001, 0x9006, 0x080c, 0x276a, 0x2001, 0xffff, 0x20a9, 0x0009,
+	0x080c, 0x27d5, 0x2001, 0x1960, 0x2003, 0x0006, 0x2009, 0x001e,
+	0x2011, 0x260d, 0x080c, 0x81fc, 0x0005, 0x080c, 0x0d65, 0x2001,
+	0x196a, 0x2003, 0x0036, 0x2001, 0x1962, 0x2003, 0x0003, 0x7a38,
+	0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x080c, 0x276a, 0x2001, 0x1966, 0x2003, 0x0000, 0x2001,
+	0xffff, 0x20a9, 0x0009, 0x080c, 0x27d5, 0x2001, 0x1960, 0x2003,
+	0x0006, 0x2009, 0x001e, 0x2011, 0x260d, 0x080c, 0x81fc, 0x0005,
+	0x080c, 0x0d65, 0x080c, 0x0d65, 0x0005, 0x0006, 0x0016, 0x0026,
+	0x00e6, 0x00f6, 0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100,
+	0x2001, 0x1962, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0d65, 0x0043,
+	0x012e, 0x015e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005,
+	0x262f, 0x264f, 0x268f, 0x26bf, 0x26e3, 0x26f3, 0x26f5, 0x080c,
+	0x27c9, 0x11b0, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1968,
+	0x2104, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0xc08d,
+	0x0008, 0xc085, 0x200a, 0x2001, 0x1960, 0x2003, 0x0001, 0x0030,
+	0x080c, 0x2719, 0x2001, 0xffff, 0x080c, 0x25aa, 0x0005, 0x080c,
+	0x26f7, 0x05e0, 0x2009, 0x1969, 0x2104, 0x8001, 0x200a, 0x080c,
+	0x27c9, 0x1178, 0x7850, 0x9084, 0xefff, 0x7852, 0x7a38, 0x9294,
+	0x0005, 0x9296, 0x0005, 0x0518, 0x2009, 0x1968, 0x2104, 0xc085,
+	0x200a, 0x2009, 0x1965, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005,
+	0x0118, 0x080c, 0x26ff, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294,
+	0x0006, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
+	0x080c, 0x2787, 0x2001, 0x1962, 0x2003, 0x0002, 0x0028, 0x2001,
+	0x1960, 0x2003, 0x0003, 0x0010, 0x080c, 0x25cc, 0x0005, 0x080c,
+	0x26f7, 0x0560, 0x2009, 0x1969, 0x2104, 0x8001, 0x200a, 0x080c,
+	0x27c9, 0x1168, 0x7850, 0x9084, 0xefff, 0x7852, 0x2001, 0x1960,
+	0x2003, 0x0003, 0x2001, 0x1961, 0x2003, 0x0000, 0x00b8, 0x2009,
+	0x1969, 0x2104, 0x9005, 0x1118, 0x080c, 0x273c, 0x0010, 0x080c,
+	0x270c, 0x080c, 0x26ff, 0x2009, 0x1965, 0x200b, 0x0000, 0x2001,
+	0x1962, 0x2003, 0x0001, 0x080c, 0x25cc, 0x0000, 0x0005, 0x04b9,
+	0x0508, 0x080c, 0x27c9, 0x11b8, 0x7850, 0x9084, 0xefff, 0x7852,
+	0x2009, 0x1966, 0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108,
+	0x0078, 0x2001, 0x196b, 0x2003, 0x000a, 0x2009, 0x1968, 0x2104,
+	0xc0fd, 0x200a, 0x0038, 0x0419, 0x2001, 0x1962, 0x2003, 0x0004,
+	0x080c, 0x25f7, 0x0005, 0x0099, 0x0168, 0x080c, 0x27c9, 0x1138,
+	0x7850, 0x9084, 0xefff, 0x7852, 0x080c, 0x25e3, 0x0018, 0x0079,
+	0x080c, 0x25f7, 0x0005, 0x080c, 0x0d65, 0x080c, 0x0d65, 0x2009,
+	0x196a, 0x2104, 0x8001, 0x200a, 0x090c, 0x2758, 0x0005, 0x7a38,
+	0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x080c, 0x2787, 0x0005, 0x7a38, 0x9294, 0x0006, 0x9296,
+	0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x276a,
+	0x0005, 0x2009, 0x1965, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005,
+	0x0108, 0x0068, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296,
+	0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x04d9, 0x7a38,
+	0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x080c, 0x2787, 0x0005, 0x0086, 0x2001, 0x1968, 0x2004,
+	0x9084, 0x7fff, 0x090c, 0x0d65, 0x2009, 0x1967, 0x2144, 0x8846,
+	0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120, 0x080c,
+	0x0d65, 0x9006, 0x0010, 0x2001, 0x0001, 0x00a1, 0x008e, 0x0005,
+	0x0006, 0x0156, 0x2001, 0x1960, 0x20a9, 0x0009, 0x2003, 0x0000,
+	0x8000, 0x1f04, 0x275e, 0x2001, 0x1967, 0x2003, 0x8000, 0x015e,
+	0x000e, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158,
+	0x7838, 0x9084, 0xfff9, 0x9085, 0x0004, 0x783a, 0x2009, 0x196d,
+	0x210c, 0x795a, 0x0050, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0006,
+	0x783a, 0x2009, 0x196e, 0x210c, 0x795a, 0x00fe, 0x0005, 0x00f6,
+	0x2079, 0x0100, 0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfffa,
+	0x9085, 0x0004, 0x783a, 0x7850, 0x9084, 0xfff0, 0x7852, 0x00f8,
+	0x7838, 0x9084, 0xfffb, 0x9085, 0x0005, 0x783a, 0x7850, 0x9084,
+	0xfff0, 0x0016, 0x2009, 0x017f, 0x210c, 0x918e, 0x0005, 0x0140,
+	0x2009, 0x0003, 0x210c, 0x918c, 0x0600, 0x918e, 0x0400, 0x0118,
+	0x9085, 0x000a, 0x0010, 0x9085, 0x0000, 0x001e, 0x7852, 0x00fe,
+	0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0007, 0x000e,
+	0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0009, 0x000e,
+	0x0005, 0x0156, 0x20a9, 0x0064, 0x7820, 0x080c, 0x2838, 0xd09c,
+	0x1110, 0x1f04, 0x27cc, 0x015e, 0x0005, 0x0126, 0x0016, 0x0006,
+	0x2091, 0x8000, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b,
+	0x0007, 0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060,
+	0x9186, 0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003,
+	0x1118, 0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x27f5, 0x080c,
+	0x821e, 0x1f04, 0x27f5, 0x7850, 0x9085, 0x1000, 0x7852, 0x000e,
+	0x001e, 0x012e, 0x0005, 0x080c, 0x28e2, 0x0005, 0x0006, 0x0156,
+	0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1100,
+	0x7854, 0xd08c, 0x1110, 0x1f04, 0x2810, 0x00fe, 0x015e, 0x000e,
+	0x0005, 0x1d04, 0x2819, 0x080c, 0x821e, 0x1f04, 0x2819, 0x0005,
+	0x0006, 0x2001, 0x196c, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005,
+	0x0006, 0x2001, 0x196c, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005,
+	0x0006, 0x2001, 0x196c, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005,
+	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001,
+	0x1978, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc,
+	0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001,
+	0x200a, 0x0005, 0x0016, 0x0026, 0x080c, 0x70b0, 0x0108, 0xc0bc,
+	0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e,
+	0x001e, 0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294,
+	0x0001, 0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005,
+	0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215,
+	0x220a, 0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140,
+	0x2104, 0x1128, 0x080c, 0x70b0, 0x0110, 0xc0bc, 0x0008, 0xc0bd,
+	0x200a, 0x001e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843,
+	0x0101, 0x7844, 0xd084, 0x1de8, 0x2001, 0x0109, 0x2202, 0x7843,
+	0x0100, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0202,
+	0x7844, 0xd08c, 0x1de8, 0x2079, 0x0100, 0x7814, 0x9104, 0x9205,
+	0x7a16, 0x2079, 0x0380, 0x7843, 0x0200, 0x00fe, 0x0005, 0x0016,
+	0x0026, 0x0036, 0x00c6, 0x2061, 0x0100, 0x6050, 0x9084, 0xfbff,
+	0x9085, 0x0040, 0x6052, 0x20a9, 0x0002, 0x080c, 0x2819, 0x6050,
+	0x9085, 0x0400, 0x9084, 0xff9f, 0x6052, 0x20a9, 0x0005, 0x080c,
+	0x2819, 0x6054, 0xd0bc, 0x090c, 0x0d65, 0x20a9, 0x0005, 0x080c,
+	0x2819, 0x6054, 0xd0ac, 0x090c, 0x0d65, 0x2009, 0x197f, 0x9084,
+	0x7e00, 0x8007, 0x8004, 0x8004, 0x200a, 0x00ce, 0x003e, 0x002e,
+	0x001e, 0x0005, 0x0006, 0x00c6, 0x2061, 0x0100, 0x6050, 0xc0cd,
+	0x6052, 0x00ce, 0x000e, 0x0005, 0x2de8, 0x2de8, 0x29ec, 0x29ec,
+	0x29f8, 0x29f8, 0x2a04, 0x2a04, 0x2a12, 0x2a12, 0x2a1e, 0x2a1e,
+	0x2a2c, 0x2a2c, 0x2a3a, 0x2a3a, 0x2a4c, 0x2a4c, 0x2a58, 0x2a58,
+	0x2a66, 0x2a66, 0x2a84, 0x2a84, 0x2aa4, 0x2aa4, 0x2a74, 0x2a74,
+	0x2a94, 0x2a94, 0x2ab2, 0x2ab2, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2ac4, 0x2ac4, 0x2ad0, 0x2ad0,
+	0x2ade, 0x2ade, 0x2aec, 0x2aec, 0x2afc, 0x2afc, 0x2b0a, 0x2b0a,
+	0x2b1a, 0x2b1a, 0x2b2a, 0x2b2a, 0x2b3c, 0x2b3c, 0x2b4a, 0x2b4a,
+	0x2b5a, 0x2b5a, 0x2b7c, 0x2b7c, 0x2ba0, 0x2ba0, 0x2b6a, 0x2b6a,
+	0x2b8e, 0x2b8e, 0x2bb0, 0x2bb0, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2bc4, 0x2bc4, 0x2bd0, 0x2bd0,
+	0x2bde, 0x2bde, 0x2bec, 0x2bec, 0x2bfc, 0x2bfc, 0x2c0a, 0x2c0a,
+	0x2c1a, 0x2c1a, 0x2c2a, 0x2c2a, 0x2c3c, 0x2c3c, 0x2c4a, 0x2c4a,
+	0x2c5a, 0x2c5a, 0x2c6a, 0x2c6a, 0x2c7c, 0x2c7c, 0x2c8c, 0x2c8c,
+	0x2c9e, 0x2c9e, 0x2cb0, 0x2cb0, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2cc4, 0x2cc4, 0x2cd2, 0x2cd2,
+	0x2ce2, 0x2ce2, 0x2cf2, 0x2cf2, 0x2d04, 0x2d04, 0x2d14, 0x2d14,
+	0x2d26, 0x2d26, 0x2d38, 0x2d38, 0x2d4c, 0x2d4c, 0x2d5c, 0x2d5c,
+	0x2d6e, 0x2d6e, 0x2d80, 0x2d80, 0x2d94, 0x2d94, 0x2da5, 0x2da5,
+	0x2db8, 0x2db8, 0x2dcb, 0x2dcb, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a,
+	0x2a4a, 0x2a4a, 0x2a4a, 0x2a4a, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20ff, 0x0804, 0x2de0,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x20e6, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20,
-	0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20, 0x080c, 0x20e6,
-	0x080c, 0x1f4a, 0x0804, 0x2dd2, 0xa001, 0x0cf0, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x132a,
-	0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x20e6, 0x080c, 0x132a, 0x0804, 0x2dd2,
+	0x080c, 0x1f2d, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x20ff,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20ff,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x1f57,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x20ff, 0x080c, 0x1f57,
+	0x0804, 0x2de0, 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1335, 0x0804, 0x2de0,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x1f20, 0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20e6,
-	0x080c, 0x132a, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20,
-	0x080c, 0x20e6, 0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20,
-	0x080c, 0x132a, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x132a,
-	0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20, 0x080c, 0x20e6,
-	0x080c, 0x132a, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x20e6, 0x0804, 0x2dd2,
+	0x080c, 0x20ff, 0x080c, 0x1335, 0x0804, 0x2de0, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f2d,
+	0x080c, 0x1335, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20ff, 0x080c, 0x1335,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x20ff,
+	0x080c, 0x1335, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x1335,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1335, 0x080c, 0x1f57,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x20ff, 0x080c, 0x1335,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x0804, 0x2de0,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x2527, 0x080c, 0x1f20, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x1f20, 0x080c, 0x20e6, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x20e6,
-	0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x1f20,
-	0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x1f20,
-	0x080c, 0x20e6, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x20e6,
-	0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x1f20,
-	0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x20e6,
-	0x080c, 0x132a, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x1f20, 0x080c, 0x20e6, 0x080c, 0x132a, 0x0804, 0x2dd2,
+	0x080c, 0x2540, 0x080c, 0x20ff, 0x0804, 0x2de0, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540,
+	0x080c, 0x1f2d, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1f2d,
+	0x080c, 0x20ff, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1f57,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x20ff, 0x080c, 0x1f57,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c, 0x1f57,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c, 0x20ff,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1335,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x20ff, 0x080c, 0x1335,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c, 0x1335,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x20ff, 0x080c, 0x1335,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1f2d,
+	0x080c, 0x20ff, 0x080c, 0x1335, 0x0804, 0x2de0, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540,
+	0x080c, 0x1f2d, 0x080c, 0x1335, 0x080c, 0x1f57, 0x0804, 0x2de0,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x2527, 0x080c, 0x1f20, 0x080c, 0x132a, 0x080c, 0x1f4a,
-	0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x132a, 0x080c, 0x1f4a,
-	0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x1f20, 0x080c, 0x20e6,
-	0x080c, 0x132a, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992e,
-	0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x992e, 0x080c, 0x20e6, 0x0804, 0x2dd2,
+	0x080c, 0x2540, 0x080c, 0x1335, 0x080c, 0x1f57, 0x0804, 0x2de0,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x1f20, 0x080c, 0x992e, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20,
-	0x080c, 0x992e, 0x080c, 0x20e6, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992e,
-	0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992e, 0x080c, 0x20e6,
-	0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20, 0x080c, 0x992e,
-	0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20, 0x080c, 0x992e,
-	0x080c, 0x20e6, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992e,
-	0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992e, 0x080c, 0x20e6,
-	0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20, 0x080c, 0x992e,
-	0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f20, 0x080c, 0x992e,
-	0x080c, 0x20e6, 0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992e,
-	0x080c, 0x132a, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992e,
-	0x080c, 0x20e6, 0x080c, 0x132a, 0x080c, 0x1f4a, 0x0804, 0x2dd2,
+	0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c, 0x20ff, 0x080c, 0x1335,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x9921, 0x0804, 0x2de0,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x1f20, 0x080c, 0x992e, 0x080c, 0x132a, 0x080c, 0x1f4a,
-	0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x1f20, 0x080c, 0x992e, 0x080c, 0x20e6,
-	0x080c, 0x132a, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x992e, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x992e,
-	0x080c, 0x20e6, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x1f20,
-	0x080c, 0x992e, 0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x1f20,
-	0x080c, 0x992e, 0x080c, 0x20e6, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x992e, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x992e, 0x080c, 0x20e6, 0x080c, 0x1f4a, 0x0804, 0x2dd2,
+	0x080c, 0x9921, 0x080c, 0x20ff, 0x0804, 0x2de0, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f2d,
+	0x080c, 0x9921, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x9921,
+	0x080c, 0x20ff, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x9921, 0x080c, 0x1f57,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x9921, 0x080c, 0x20ff, 0x080c, 0x1f57,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x9921, 0x080c, 0x1f57,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x9921, 0x080c, 0x20ff,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x9921, 0x080c, 0x1335,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x9921, 0x080c, 0x20ff, 0x080c, 0x1335,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x9921, 0x080c, 0x1335,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x1f2d, 0x080c, 0x9921, 0x080c, 0x20ff,
+	0x080c, 0x1335, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x9921, 0x080c, 0x1335,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x9921, 0x080c, 0x20ff,
+	0x080c, 0x1335, 0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f2d,
+	0x080c, 0x9921, 0x080c, 0x1335, 0x080c, 0x1f57, 0x0804, 0x2de0,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x2527, 0x080c, 0x1f20, 0x080c, 0x992e, 0x080c, 0x1f4a,
-	0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x1f20, 0x080c, 0x992e,
-	0x080c, 0x20e6, 0x080c, 0x1f4a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x992e, 0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x992e, 0x080c, 0x20e6, 0x080c, 0x132a, 0x0804, 0x2dd2,
+	0x080c, 0x1f2d, 0x080c, 0x9921, 0x080c, 0x20ff, 0x080c, 0x1335,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x9921,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x9921, 0x080c, 0x20ff,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c, 0x9921,
+	0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c, 0x9921,
+	0x080c, 0x20ff, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x9921,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x9921,
+	0x080c, 0x20ff, 0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540,
+	0x080c, 0x1f2d, 0x080c, 0x9921, 0x080c, 0x1f57, 0x0804, 0x2de0,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x2527, 0x080c, 0x1f20, 0x080c, 0x992e, 0x080c, 0x132a,
-	0x0804, 0x2dd2, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x1f20, 0x080c, 0x992e,
-	0x080c, 0x20e6, 0x080c, 0x132a, 0x0804, 0x2dd2, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527,
-	0x080c, 0x992e, 0x080c, 0x132a, 0x080c, 0x1f4a, 0x04d8, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2527, 0x080c, 0x992e, 0x080c, 0x20e6, 0x080c, 0x132a, 0x080c,
-	0x1f4a, 0x0440, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2527, 0x080c, 0x1f20, 0x080c, 0x132a,
-	0x080c, 0x992e, 0x080c, 0x1f4a, 0x00a8, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2527, 0x080c,
-	0x1f20, 0x080c, 0x992e, 0x080c, 0x20e6, 0x080c, 0x132a, 0x080c,
-	0x1f4a, 0x0000, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e,
-	0x000e, 0x010e, 0x000d, 0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026,
-	0x080c, 0x6625, 0x1904, 0x2ee1, 0x72d8, 0x2001, 0x194d, 0x2004,
-	0x9005, 0x1110, 0xd29c, 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904,
-	0x2ee1, 0x080c, 0x2ee6, 0x0804, 0x2ee1, 0xd2cc, 0x1904, 0x2ee1,
-	0x080c, 0x70b7, 0x1120, 0x70ab, 0xffff, 0x0804, 0x2ee1, 0xd294,
-	0x0120, 0x70ab, 0xffff, 0x0804, 0x2ee1, 0x080c, 0x3181, 0x0160,
-	0x080c, 0xbf61, 0x0128, 0x2001, 0x1817, 0x203c, 0x0804, 0x2e73,
-	0x70ab, 0xffff, 0x0804, 0x2ee1, 0x2001, 0x1817, 0x203c, 0x7290,
-	0xd284, 0x0904, 0x2e73, 0xd28c, 0x1904, 0x2e73, 0x0036, 0x73a8,
-	0x938e, 0xffff, 0x1110, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80,
-	0x2c04, 0x938c, 0x0001, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010,
-	0x9084, 0x00ff, 0x970e, 0x05a8, 0x908e, 0x0000, 0x0590, 0x908e,
-	0x00ff, 0x1150, 0x7230, 0xd284, 0x1588, 0x7290, 0xc28d, 0x7292,
-	0x70ab, 0xffff, 0x003e, 0x0478, 0x0026, 0x2011, 0x0010, 0x080c,
-	0x668b, 0x002e, 0x0118, 0x70ab, 0xffff, 0x0410, 0x900e, 0x080c,
-	0x2424, 0x080c, 0x6210, 0x11c0, 0x080c, 0x6667, 0x1168, 0x7030,
-	0xd08c, 0x0130, 0xb800, 0xd0bc, 0x0138, 0x080c, 0x655f, 0x0120,
-	0x080c, 0x2eff, 0x0148, 0x0028, 0x080c, 0x3057, 0x080c, 0x2f2b,
-	0x0118, 0x8318, 0x0804, 0x2e25, 0x73aa, 0x0010, 0x70ab, 0xffff,
-	0x003e, 0x0804, 0x2ee1, 0x9780, 0x318b, 0x203d, 0x97bc, 0xff00,
-	0x873f, 0x2041, 0x007e, 0x70a8, 0x9096, 0xffff, 0x1118, 0x900e,
-	0x28a8, 0x0050, 0x9812, 0x0220, 0x2008, 0x9802, 0x20a8, 0x0020,
-	0x70ab, 0xffff, 0x0804, 0x2ee1, 0x2700, 0x0156, 0x0016, 0x9106,
-	0x0904, 0x2ed6, 0x0026, 0x2011, 0x0010, 0x080c, 0x668b, 0x002e,
-	0x0120, 0x2009, 0xffff, 0x0804, 0x2ede, 0xc484, 0x080c, 0x6270,
-	0x0138, 0x080c, 0xbf61, 0x1590, 0x080c, 0x6210, 0x15b8, 0x0008,
-	0xc485, 0x080c, 0x6667, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800,
-	0xd0bc, 0x11e0, 0x7290, 0xd28c, 0x0180, 0x080c, 0x6667, 0x9082,
-	0x0006, 0x02e0, 0xd484, 0x1118, 0x080c, 0x6234, 0x0028, 0x080c,
-	0x30ef, 0x01a0, 0x080c, 0x311a, 0x0088, 0x080c, 0x3057, 0x080c,
-	0xbf61, 0x1160, 0x080c, 0x2f2b, 0x0188, 0x0040, 0x080c, 0xbf61,
-	0x1118, 0x080c, 0x30ef, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108,
-	0x015e, 0x1f04, 0x2e8c, 0x70ab, 0xffff, 0x0018, 0x001e, 0x015e,
-	0x71aa, 0x004e, 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016,
-	0x70ab, 0x0001, 0x2009, 0x007e, 0x080c, 0x6210, 0x1168, 0xb813,
-	0x00ff, 0xb817, 0xfffe, 0x080c, 0x3057, 0x04a9, 0x0128, 0x70d8,
-	0xc0bd, 0x70da, 0x080c, 0xbcae, 0x001e, 0x00ce, 0x0005, 0x0016,
-	0x0076, 0x00d6, 0x00c6, 0x2001, 0x1858, 0x2004, 0x9084, 0x00ff,
-	0xb842, 0x080c, 0x9c58, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xbcdb,
-	0x6023, 0x0001, 0x9006, 0x080c, 0x61ad, 0x2001, 0x0000, 0x080c,
-	0x61c1, 0x0126, 0x2091, 0x8000, 0x70a4, 0x8000, 0x70a6, 0x012e,
-	0x2009, 0x0004, 0x080c, 0x9c85, 0x9085, 0x0001, 0x00ce, 0x00de,
-	0x007e, 0x001e, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001,
-	0x1858, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0x9c58, 0x0548,
-	0x2b00, 0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e,
-	0x0140, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c,
-	0x3006, 0x080c, 0xbcdb, 0x6023, 0x0001, 0x9006, 0x080c, 0x61ad,
-	0x2001, 0x0002, 0x080c, 0x61c1, 0x0126, 0x2091, 0x8000, 0x70a4,
-	0x8000, 0x70a6, 0x012e, 0x2009, 0x0002, 0x080c, 0x9c85, 0x9085,
-	0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6,
-	0x0026, 0x2009, 0x0080, 0x080c, 0x6210, 0x1140, 0xb813, 0x00ff,
-	0xb817, 0xfffc, 0x0039, 0x0110, 0x70df, 0xffff, 0x002e, 0x00ce,
-	0x00be, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0x9b91,
-	0x01d0, 0x2b00, 0x6012, 0x080c, 0xbcdb, 0x6023, 0x0001, 0x9006,
-	0x080c, 0x61ad, 0x2001, 0x0002, 0x080c, 0x61c1, 0x0126, 0x2091,
-	0x8000, 0x70e0, 0x8000, 0x70e2, 0x012e, 0x2009, 0x0002, 0x080c,
-	0x9c85, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005,
-	0x00c6, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c,
-	0x6210, 0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8c7, 0x0004,
-	0x080c, 0x9b91, 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001,
-	0x620a, 0x080c, 0xbcdb, 0x2009, 0x0022, 0x080c, 0x9c85, 0x9085,
-	0x0001, 0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066,
-	0x0036, 0x0026, 0x00b6, 0x21f0, 0x9036, 0x080c, 0x98c8, 0x1110,
-	0x2031, 0x0001, 0x0066, 0x080c, 0x8646, 0x080c, 0x85c6, 0x080c,
-	0x981e, 0x080c, 0xab46, 0x006e, 0x86ff, 0x0110, 0x080c, 0x98e4,
+	0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c, 0x9921, 0x080c, 0x20ff,
+	0x080c, 0x1f57, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x9921,
+	0x080c, 0x1335, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x9921,
+	0x080c, 0x20ff, 0x080c, 0x1335, 0x0804, 0x2de0, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540,
+	0x080c, 0x1f2d, 0x080c, 0x9921, 0x080c, 0x1335, 0x0804, 0x2de0,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c, 0x9921, 0x080c, 0x20ff,
+	0x080c, 0x1335, 0x0804, 0x2de0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x9921,
+	0x080c, 0x1335, 0x080c, 0x1f57, 0x04d8, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c,
+	0x9921, 0x080c, 0x20ff, 0x080c, 0x1335, 0x080c, 0x1f57, 0x0440,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c, 0x1335, 0x080c, 0x9921,
+	0x080c, 0x1f57, 0x00a8, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2540, 0x080c, 0x1f2d, 0x080c,
+	0x9921, 0x080c, 0x20ff, 0x080c, 0x1335, 0x080c, 0x1f57, 0x0000,
+	0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x010e,
+	0x000d, 0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c, 0x6624,
+	0x1904, 0x2eef, 0x72d8, 0x2001, 0x194c, 0x2004, 0x9005, 0x1110,
+	0xd29c, 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x2eef, 0x080c,
+	0x2ef4, 0x0804, 0x2eef, 0xd2cc, 0x1904, 0x2eef, 0x080c, 0x7096,
+	0x1120, 0x70ab, 0xffff, 0x0804, 0x2eef, 0xd294, 0x0120, 0x70ab,
+	0xffff, 0x0804, 0x2eef, 0x080c, 0x3175, 0x0160, 0x080c, 0xbf61,
+	0x0128, 0x2001, 0x1817, 0x203c, 0x0804, 0x2e81, 0x70ab, 0xffff,
+	0x0804, 0x2eef, 0x2001, 0x1817, 0x203c, 0x7290, 0xd284, 0x0904,
+	0x2e81, 0xd28c, 0x1904, 0x2e81, 0x0036, 0x73a8, 0x938e, 0xffff,
+	0x1110, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04, 0x938c,
+	0x0001, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff,
+	0x970e, 0x05a8, 0x908e, 0x0000, 0x0590, 0x908e, 0x00ff, 0x1150,
+	0x7230, 0xd284, 0x1588, 0x7290, 0xc28d, 0x7292, 0x70ab, 0xffff,
+	0x003e, 0x0478, 0x0026, 0x2011, 0x0010, 0x080c, 0x668a, 0x002e,
+	0x0118, 0x70ab, 0xffff, 0x0410, 0x900e, 0x080c, 0x243d, 0x080c,
+	0x620b, 0x11c0, 0x080c, 0x6666, 0x1168, 0x7030, 0xd08c, 0x0130,
+	0xb800, 0xd0bc, 0x0138, 0x080c, 0x655e, 0x0120, 0x080c, 0x2f0d,
+	0x0148, 0x0028, 0x080c, 0x3059, 0x080c, 0x2f39, 0x0118, 0x8318,
+	0x0804, 0x2e33, 0x73aa, 0x0010, 0x70ab, 0xffff, 0x003e, 0x0804,
+	0x2eef, 0x9780, 0x317f, 0x203d, 0x97bc, 0xff00, 0x873f, 0x2041,
+	0x007e, 0x70a8, 0x9096, 0xffff, 0x1118, 0x900e, 0x28a8, 0x0050,
+	0x9812, 0x0220, 0x2008, 0x9802, 0x20a8, 0x0020, 0x70ab, 0xffff,
+	0x0804, 0x2eef, 0x2700, 0x0156, 0x0016, 0x9106, 0x0904, 0x2ee4,
+	0x0026, 0x2011, 0x0010, 0x080c, 0x668a, 0x002e, 0x0120, 0x2009,
+	0xffff, 0x0804, 0x2eec, 0xc484, 0x080c, 0x626b, 0x0138, 0x080c,
+	0xbf61, 0x1590, 0x080c, 0x620b, 0x15b8, 0x0008, 0xc485, 0x080c,
+	0x6666, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc, 0x11e0,
+	0x7290, 0xd28c, 0x0180, 0x080c, 0x6666, 0x9082, 0x0006, 0x02e0,
+	0xd484, 0x1118, 0x080c, 0x622f, 0x0028, 0x080c, 0x30eb, 0x01a0,
+	0x080c, 0x3116, 0x0088, 0x080c, 0x3059, 0x080c, 0xbf61, 0x1160,
+	0x080c, 0x2f39, 0x0188, 0x0040, 0x080c, 0xbf61, 0x1118, 0x080c,
+	0x30eb, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e, 0x1f04,
+	0x2e9a, 0x70ab, 0xffff, 0x0018, 0x001e, 0x015e, 0x71aa, 0x004e,
+	0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70ab, 0x0001,
+	0x2009, 0x007e, 0x080c, 0x620b, 0x1168, 0xb813, 0x00ff, 0xb817,
+	0xfffe, 0x080c, 0x3059, 0x04a9, 0x0128, 0x70d8, 0xc0bd, 0x70da,
+	0x080c, 0xbcae, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6,
+	0x00c6, 0x2001, 0x1858, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c,
+	0x9c49, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xbcdb, 0x6023, 0x0001,
+	0x9006, 0x080c, 0x61a8, 0x2001, 0x0000, 0x080c, 0x61bc, 0x0126,
+	0x2091, 0x8000, 0x70a4, 0x8000, 0x70a6, 0x012e, 0x2009, 0x0004,
+	0x080c, 0x9c76, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e,
+	0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x1858, 0x2004,
+	0x9084, 0x00ff, 0xb842, 0x080c, 0x9c49, 0x0548, 0x2b00, 0x6012,
+	0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140, 0xb804,
+	0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x300e, 0x080c,
+	0xbcdb, 0x6023, 0x0001, 0x9006, 0x080c, 0x61a8, 0x2001, 0x0002,
+	0x080c, 0x61bc, 0x0126, 0x2091, 0x8000, 0x70a4, 0x8000, 0x70a6,
+	0x012e, 0x2009, 0x0002, 0x080c, 0x9c76, 0x9085, 0x0001, 0x00ce,
+	0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026, 0x2009,
+	0x0080, 0x080c, 0x620b, 0x1140, 0xb813, 0x00ff, 0xb817, 0xfffc,
+	0x0039, 0x0110, 0x70df, 0xffff, 0x002e, 0x00ce, 0x00be, 0x0005,
+	0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0x9b84, 0x01d0, 0x2b00,
+	0x6012, 0x080c, 0xbcdb, 0x6023, 0x0001, 0x9006, 0x080c, 0x61a8,
+	0x2001, 0x0002, 0x080c, 0x61bc, 0x0126, 0x2091, 0x8000, 0x70e0,
+	0x8000, 0x70e2, 0x012e, 0x2009, 0x0002, 0x080c, 0x9c76, 0x9085,
+	0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x00d6,
+	0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x620b, 0x11b8,
+	0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8c7, 0x0004, 0x080c, 0x9b84,
+	0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a, 0x080c,
+	0xbcdb, 0x2009, 0x0022, 0x080c, 0x9c76, 0x9085, 0x0001, 0x012e,
+	0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036, 0x0026,
+	0x00b6, 0x21f0, 0x080c, 0x98bb, 0x0106, 0x080c, 0x862f, 0x080c,
+	0x85aa, 0x080c, 0x980c, 0x080c, 0xab3a, 0x010e, 0x090c, 0x98d7,
 	0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e, 0x0018,
-	0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6270, 0x1140, 0x9686,
-	0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x5cf6, 0x001e,
-	0x8108, 0x1f04, 0x2feb, 0x9686, 0x0001, 0x190c, 0x3155, 0x00be,
+	0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x626b, 0x1140, 0x9686,
+	0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x5cf1, 0x001e,
+	0x8108, 0x1f04, 0x2ff3, 0x9686, 0x0001, 0x190c, 0x3149, 0x00be,
 	0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6,
-	0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x9016, 0x080c, 0x98c8,
-	0x1110, 0x2011, 0x0001, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x0026,
-	0x2019, 0x0029, 0x080c, 0x863b, 0x0076, 0x2039, 0x0000, 0x080c,
-	0x852a, 0x2c08, 0x080c, 0xcfc8, 0x007e, 0x001e, 0x002e, 0x82ff,
-	0x0110, 0x080c, 0x98e4, 0xba10, 0xbb14, 0xbc84, 0x080c, 0x5cf6,
-	0xba12, 0xbb16, 0xbc86, 0x00be, 0x001e, 0x002e, 0x003e, 0x004e,
-	0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6, 0x6010, 0x2058,
-	0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071, 0x1800, 0x70a4,
-	0x9005, 0x0110, 0x8001, 0x70a6, 0x000e, 0x00ee, 0x0005, 0x2071,
-	0x1800, 0x70e0, 0x9005, 0x0dc0, 0x8001, 0x70e2, 0x0ca8, 0xb800,
-	0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x00b6, 0x0046,
-	0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x9016, 0x080c, 0x98c8,
-	0x1110, 0x2011, 0x0001, 0x0026, 0x81ff, 0x1118, 0x20a9, 0x0001,
-	0x0070, 0x080c, 0x538d, 0xd0c4, 0x0138, 0x0030, 0x9006, 0x2020,
-	0x2009, 0x002d, 0x080c, 0xd273, 0x20a9, 0x0800, 0x9016, 0x0026,
-	0x928e, 0x007e, 0x0904, 0x30c9, 0x928e, 0x007f, 0x0904, 0x30c9,
-	0x928e, 0x0080, 0x05f0, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c8,
-	0x8fff, 0x1150, 0x2001, 0x195f, 0x0006, 0x2003, 0x0001, 0x080c,
-	0x30dc, 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001,
-	0x0001, 0x080c, 0x6631, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c,
-	0x863b, 0x0076, 0x2039, 0x0000, 0x080c, 0x852a, 0x00b6, 0x00c6,
-	0x0026, 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118,
-	0xb807, 0x0404, 0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06,
-	0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c, 0xcfc8, 0x001e,
-	0x007e, 0x002e, 0x8210, 0x1f04, 0x307f, 0x002e, 0x82ff, 0x0110,
-	0x080c, 0x98e4, 0x015e, 0x001e, 0x002e, 0x003e, 0x004e, 0x00be,
-	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, 0x080c,
-	0x538d, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2220, 0x2009,
-	0x0029, 0x080c, 0xd273, 0x001e, 0x002e, 0x004e, 0x0005, 0x0016,
-	0x0026, 0x0036, 0x00c6, 0x7290, 0x82ff, 0x01e8, 0x080c, 0x665f,
-	0x11d0, 0x2100, 0x080c, 0x2457, 0x81ff, 0x01b8, 0x2019, 0x0001,
-	0x8314, 0x92e0, 0x1d80, 0x2c04, 0xd384, 0x0120, 0x9084, 0xff00,
-	0x8007, 0x0010, 0x9084, 0x00ff, 0x9116, 0x0138, 0x9096, 0x00ff,
-	0x0110, 0x8318, 0x0c68, 0x9085, 0x0001, 0x00ce, 0x003e, 0x002e,
-	0x001e, 0x0005, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0066,
-	0x9036, 0x080c, 0x98c8, 0x1110, 0x2031, 0x0001, 0x0066, 0x0036,
-	0x2019, 0x0029, 0x00d9, 0x003e, 0x006e, 0x86ff, 0x0110, 0x080c,
-	0x98e4, 0x006e, 0x9180, 0x1000, 0x2004, 0x9065, 0x0158, 0x0016,
-	0x00c6, 0x2061, 0x1b02, 0x001e, 0x6112, 0x080c, 0x3006, 0x001e,
-	0x080c, 0x6234, 0x012e, 0x00ce, 0x001e, 0x0005, 0x0016, 0x0026,
-	0x2110, 0x080c, 0x94f4, 0x080c, 0xd529, 0x002e, 0x001e, 0x0005,
-	0x2001, 0x1836, 0x2004, 0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c,
-	0x70b7, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c,
-	0x70b7, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x9180, 0x1000,
-	0x2004, 0x905d, 0x0130, 0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c,
-	0x6234, 0x8108, 0x1f04, 0x3166, 0x2061, 0x1800, 0x607b, 0x0000,
-	0x607c, 0x9084, 0x00ff, 0x607e, 0x60af, 0x0000, 0x00be, 0x00ce,
-	0x0005, 0x2001, 0x1875, 0x2004, 0xd0bc, 0x0005, 0x2011, 0x1854,
-	0x2214, 0xd2ec, 0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1,
-	0x80e0, 0x80dc, 0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3,
-	0x80d2, 0x80d1, 0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9,
-	0x80c7, 0x80c6, 0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6,
-	0x74b5, 0x73b4, 0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac,
-	0x70ab, 0x6faa, 0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f,
-	0x699e, 0x689d, 0x809b, 0x8098, 0x6797, 0x6690, 0x658f, 0x6488,
-	0x6384, 0x6282, 0x8081, 0x8080, 0x617c, 0x607a, 0x8079, 0x5f76,
-	0x8075, 0x8074, 0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c,
-	0x5d6b, 0x5c6a, 0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863, 0x575c,
-	0x565a, 0x5559, 0x8056, 0x8055, 0x5454, 0x5353, 0x5252, 0x5151,
-	0x504e, 0x4f4d, 0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46,
-	0x8045, 0x8043, 0x803c, 0x803a, 0x8039, 0x8036, 0x4b35, 0x8034,
-	0x4a33, 0x4932, 0x4831, 0x802e, 0x472d, 0x462c, 0x452b, 0x442a,
-	0x4329, 0x4227, 0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d,
-	0x3d1b, 0x3c18, 0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902,
-	0x8001, 0x8000, 0x8000, 0x3800, 0x3700, 0x3600, 0x8000, 0x3500,
-	0x8000, 0x8000, 0x8000, 0x3400, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x3300, 0x3200, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x3100, 0x3000, 0x8000, 0x8000, 0x2f00, 0x8000,
-	0x2e00, 0x2d00, 0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00, 0x8000,
-	0x2a00, 0x2900, 0x2800, 0x8000, 0x2700, 0x2600, 0x2500, 0x2400,
-	0x2300, 0x2200, 0x8000, 0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00,
-	0x1d00, 0x1c00, 0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x1800, 0x8000,
-	0x1700, 0x1600, 0x1500, 0x8000, 0x1400, 0x1300, 0x1200, 0x1100,
-	0x1000, 0x0f00, 0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00,
-	0x0a00, 0x0900, 0x8000, 0x8000, 0x0800, 0x0700, 0x8000, 0x0600,
-	0x8000, 0x8000, 0x8000, 0x0500, 0x0400, 0x0300, 0x8000, 0x0200,
-	0x8000, 0x8000, 0x8000, 0x0100, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x080c, 0x98bb, 0x0106,
+	0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x8624,
+	0x0076, 0x2039, 0x0000, 0x080c, 0x8509, 0x2c08, 0x080c, 0xcfd9,
+	0x007e, 0x001e, 0x010e, 0x090c, 0x98d7, 0xba10, 0xbb14, 0xbc84,
+	0x080c, 0x5cf1, 0xba12, 0xbb16, 0xbc86, 0x00be, 0x001e, 0x002e,
+	0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6,
+	0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071,
+	0x1800, 0x70a4, 0x9005, 0x0110, 0x8001, 0x70a6, 0x000e, 0x00ee,
+	0x0005, 0x2071, 0x1800, 0x70e0, 0x9005, 0x0dc0, 0x8001, 0x70e2,
+	0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6,
+	0x00b6, 0x0046, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x080c,
+	0x98bb, 0x0106, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0070, 0x080c,
+	0x5388, 0xd0c4, 0x0138, 0x0030, 0x9006, 0x2020, 0x2009, 0x002d,
+	0x080c, 0xd284, 0x20a9, 0x0800, 0x9016, 0x0026, 0x928e, 0x007e,
+	0x0904, 0x30c7, 0x928e, 0x007f, 0x0904, 0x30c7, 0x928e, 0x0080,
+	0x05f0, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c8, 0x8fff, 0x1150,
+	0x2001, 0x195e, 0x0006, 0x2003, 0x0001, 0x080c, 0x30d8, 0x000e,
+	0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001, 0x0001, 0x080c,
+	0x6630, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c, 0x8624, 0x0076,
+	0x2039, 0x0000, 0x080c, 0x8509, 0x00b6, 0x00c6, 0x0026, 0x2158,
+	0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118, 0xb807, 0x0404,
+	0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06, 0x002e, 0x00ce,
+	0x00be, 0x0016, 0x2c08, 0x080c, 0xcfd9, 0x001e, 0x007e, 0x002e,
+	0x8210, 0x1f04, 0x307d, 0x010e, 0x090c, 0x98d7, 0x015e, 0x001e,
+	0x002e, 0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee, 0x00fe, 0x0005,
+	0x0046, 0x0026, 0x0016, 0x080c, 0x5388, 0xd0c4, 0x0140, 0xd0a4,
+	0x0130, 0x9006, 0x2220, 0x2009, 0x0029, 0x080c, 0xd284, 0x001e,
+	0x002e, 0x004e, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x7290,
+	0x82ff, 0x01e8, 0x080c, 0x665e, 0x11d0, 0x2100, 0x080c, 0x2470,
+	0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04,
+	0xd384, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff,
+	0x9116, 0x0138, 0x9096, 0x00ff, 0x0110, 0x8318, 0x0c68, 0x9085,
+	0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0016, 0x00c6,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x98bb, 0x0106, 0x0036, 0x2019,
+	0x0029, 0x00c1, 0x003e, 0x010e, 0x090c, 0x98d7, 0x9180, 0x1000,
+	0x2004, 0x9065, 0x0158, 0x0016, 0x00c6, 0x2061, 0x1b01, 0x001e,
+	0x6112, 0x080c, 0x300e, 0x001e, 0x080c, 0x622f, 0x012e, 0x00ce,
+	0x001e, 0x0005, 0x0016, 0x0026, 0x2110, 0x080c, 0x94dd, 0x080c,
+	0xd53a, 0x002e, 0x001e, 0x0005, 0x2001, 0x1836, 0x2004, 0xd0cc,
+	0x0005, 0x00c6, 0x00b6, 0x080c, 0x7096, 0x1118, 0x20a9, 0x0800,
+	0x0010, 0x20a9, 0x0782, 0x080c, 0x7096, 0x1110, 0x900e, 0x0010,
+	0x2009, 0x007e, 0x9180, 0x1000, 0x2004, 0x905d, 0x0130, 0x86ff,
+	0x0110, 0xb800, 0xd0bc, 0x090c, 0x622f, 0x8108, 0x1f04, 0x315a,
+	0x2061, 0x1800, 0x607b, 0x0000, 0x607c, 0x9084, 0x00ff, 0x607e,
+	0x60af, 0x0000, 0x00be, 0x00ce, 0x0005, 0x2001, 0x1875, 0x2004,
+	0xd0bc, 0x0005, 0x2011, 0x1854, 0x2214, 0xd2ec, 0x0005, 0x7eef,
+	0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9,
+	0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd,
+	0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3,
+	0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2,
+	0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7,
+	0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098,
+	0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081, 0x8080,
+	0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073, 0x8072,
+	0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067,
+	0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056, 0x8055,
+	0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b,
+	0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c, 0x803a,
+	0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831, 0x802e,
+	0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026, 0x8025,
+	0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010,
+	0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000, 0x3800,
+	0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000, 0x3400,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300, 0x3200,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100, 0x3000,
+	0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000,
+	0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800, 0x8000,
+	0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000, 0x8000,
+	0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000,
+	0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500, 0x8000,
+	0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000, 0x8000,
+	0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000,
+	0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000, 0x0500,
+	0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000, 0x0100,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x8000,
 	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x2071, 0x1894, 0x7003, 0x0002, 0x9006,
-	0x7016, 0x701a, 0x704a, 0x704e, 0x700e, 0x7042, 0x7046, 0x703b,
-	0x18b0, 0x703f, 0x18b0, 0x7007, 0x0001, 0x080c, 0x103b, 0x090c,
-	0x0d65, 0x2900, 0x706a, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x080c,
-	0x103b, 0x090c, 0x0d65, 0x2900, 0x706e, 0xa867, 0x0002, 0xa8ab,
-	0xdcb0, 0x0005, 0x2071, 0x1894, 0x7004, 0x0002, 0x32ba, 0x32bb,
-	0x32ce, 0x32e2, 0x0005, 0x1004, 0x32cb, 0x0e04, 0x32cb, 0x2079,
-	0x0000, 0x0126, 0x2091, 0x8000, 0x700c, 0x9005, 0x1128, 0x700f,
-	0x0001, 0x012e, 0x0468, 0x0005, 0x012e, 0x0ce8, 0x2079, 0x0000,
-	0x2061, 0x18ae, 0x2c4c, 0xa86c, 0x908e, 0x0100, 0x0128, 0x9086,
-	0x0200, 0x0904, 0x33b6, 0x0005, 0x7018, 0x2048, 0x2061, 0x1800,
-	0x701c, 0x0807, 0x7014, 0x2048, 0xa864, 0x9094, 0x00ff, 0x9296,
-	0x0029, 0x1120, 0xaa78, 0xd2fc, 0x0128, 0x0005, 0x9086, 0x0103,
-	0x0108, 0x0005, 0x2079, 0x0000, 0x2061, 0x1800, 0x701c, 0x0807,
-	0x2061, 0x1800, 0x7880, 0x908a, 0x0040, 0x1210, 0x61cc, 0x0042,
-	0x2100, 0x908a, 0x003f, 0x1a04, 0x33b3, 0x61cc, 0x0804, 0x3348,
-	0x338a, 0x33c2, 0x33cc, 0x33d0, 0x33da, 0x33e0, 0x33e4, 0x33f4,
-	0x33f7, 0x3401, 0x3406, 0x340b, 0x3416, 0x3421, 0x3430, 0x343f,
-	0x344d, 0x3464, 0x347f, 0x33b3, 0x3528, 0x3566, 0x360b, 0x361c,
-	0x363f, 0x33b3, 0x33b3, 0x33b3, 0x3677, 0x3697, 0x36a0, 0x36cc,
-	0x36d2, 0x33b3, 0x3718, 0x33b3, 0x33b3, 0x33b3, 0x33b3, 0x33b3,
-	0x3723, 0x372c, 0x3734, 0x3736, 0x33b3, 0x33b3, 0x33b3, 0x33b3,
-	0x33b3, 0x33b3, 0x3766, 0x33b3, 0x33b3, 0x33b3, 0x33b3, 0x33b3,
-	0x3783, 0x37de, 0x33b3, 0x33b3, 0x33b3, 0x33b3, 0x33b3, 0x33b3,
-	0x0002, 0x3808, 0x380b, 0x386a, 0x3883, 0x38b3, 0x3b55, 0x33b3,
-	0x4f5e, 0x33b3, 0x33b3, 0x33b3, 0x33b3, 0x33b3, 0x33b3, 0x33b3,
-	0x33b3, 0x3401, 0x3406, 0x4054, 0x53b1, 0x406a, 0x4fed, 0x503e,
-	0x5141, 0x33b3, 0x51a3, 0x51df, 0x5210, 0x531c, 0x523d, 0x529c,
-	0x33b3, 0x406e, 0x41fe, 0x4214, 0x4239, 0x429e, 0x4312, 0x4332,
-	0x43a9, 0x4405, 0x4461, 0x4464, 0x4489, 0x44fc, 0x4566, 0x456e,
-	0x46a0, 0x4802, 0x4836, 0x4a80, 0x33b3, 0x4a9e, 0x4b61, 0x4c37,
-	0x33b3, 0x33b3, 0x33b3, 0x33b3, 0x4c9d, 0x4cb8, 0x456e, 0x4efe,
-	0x714c, 0x0000, 0x2021, 0x4000, 0x080c, 0x48b4, 0x0126, 0x2091,
-	0x8000, 0x0e04, 0x3394, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486,
-	0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7c82,
-	0x7986, 0x7a8a, 0x7b8e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x11be, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f,
-	0x0000, 0x012e, 0x0005, 0x2021, 0x4001, 0x08b0, 0x2021, 0x4002,
-	0x0898, 0x2021, 0x4003, 0x0880, 0x2021, 0x4005, 0x0868, 0x2021,
-	0x4006, 0x0850, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c,
-	0x7884, 0x7990, 0x0804, 0x48c1, 0x7883, 0x0004, 0x7884, 0x0807,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x2071,
+	0x1894, 0x7003, 0x0002, 0x9006, 0x7016, 0x701a, 0x704a, 0x704e,
+	0x700e, 0x7042, 0x7046, 0x703b, 0x18b0, 0x703f, 0x18b0, 0x7007,
+	0x0001, 0x080c, 0x103b, 0x090c, 0x0d65, 0x2900, 0x706a, 0xa867,
+	0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x103b, 0x090c, 0x0d65, 0x2900,
+	0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x1894,
+	0x7004, 0x0002, 0x32ae, 0x32af, 0x32c2, 0x32d6, 0x0005, 0x1004,
+	0x32bf, 0x0e04, 0x32bf, 0x2079, 0x0000, 0x0126, 0x2091, 0x8000,
+	0x700c, 0x9005, 0x1128, 0x700f, 0x0001, 0x012e, 0x0468, 0x0005,
+	0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18ae, 0x2c4c, 0xa86c,
+	0x908e, 0x0100, 0x0128, 0x9086, 0x0200, 0x0904, 0x33aa, 0x0005,
+	0x7018, 0x2048, 0x2061, 0x1800, 0x701c, 0x0807, 0x7014, 0x2048,
+	0xa864, 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78, 0xd2fc,
+	0x0128, 0x0005, 0x9086, 0x0103, 0x0108, 0x0005, 0x2079, 0x0000,
+	0x2061, 0x1800, 0x701c, 0x0807, 0x2061, 0x1800, 0x7880, 0x908a,
+	0x0040, 0x1210, 0x61cc, 0x0042, 0x2100, 0x908a, 0x003f, 0x1a04,
+	0x33a7, 0x61cc, 0x0804, 0x333c, 0x337e, 0x33b6, 0x33a7, 0x33c0,
+	0x33ca, 0x33d0, 0x33d4, 0x33e4, 0x33e8, 0x33fe, 0x3404, 0x340a,
+	0x3415, 0x3420, 0x342f, 0x343e, 0x344c, 0x3463, 0x347e, 0x33a7,
+	0x3527, 0x3565, 0x360a, 0x361b, 0x363e, 0x33a7, 0x33a7, 0x33a7,
+	0x3676, 0x3696, 0x369f, 0x36cb, 0x36d1, 0x33a7, 0x3717, 0x33a7,
+	0x33a7, 0x33a7, 0x33a7, 0x33a7, 0x3722, 0x372b, 0x3733, 0x3735,
+	0x33a7, 0x33a7, 0x33a7, 0x33a7, 0x33a7, 0x33a7, 0x3765, 0x33a7,
+	0x33a7, 0x33a7, 0x33a7, 0x33a7, 0x3782, 0x37dd, 0x33a7, 0x33a7,
+	0x33a7, 0x33a7, 0x33a7, 0x33a7, 0x0002, 0x3807, 0x380a, 0x3869,
+	0x3882, 0x38b2, 0x3b54, 0x33a7, 0x4f59, 0x33a7, 0x33a7, 0x33a7,
+	0x33a7, 0x33a7, 0x33a7, 0x33a7, 0x33a7, 0x33fe, 0x3404, 0x4053,
+	0x53ac, 0x4069, 0x4fe8, 0x5039, 0x513c, 0x33a7, 0x519e, 0x51da,
+	0x520b, 0x5317, 0x5238, 0x5297, 0x33a7, 0x406d, 0x41fd, 0x4213,
+	0x4238, 0x429d, 0x4311, 0x4331, 0x43a8, 0x4404, 0x4460, 0x4463,
+	0x4488, 0x44fb, 0x4565, 0x456d, 0x469f, 0x4804, 0x4838, 0x4a82,
+	0x33a7, 0x4aa0, 0x4b5c, 0x4c32, 0x33a7, 0x33a7, 0x33a7, 0x33a7,
+	0x4c98, 0x4cb3, 0x456d, 0x4ef9, 0x714c, 0x0000, 0x2021, 0x4000,
+	0x080c, 0x48b6, 0x0126, 0x2091, 0x8000, 0x0e04, 0x3388, 0x0010,
+	0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011,
+	0x0010, 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11c9, 0x7007,
+	0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x2021,
+	0x4001, 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021, 0x4003, 0x0880,
+	0x2021, 0x4005, 0x0868, 0x2021, 0x4006, 0x0850, 0x2039, 0x0001,
+	0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804, 0x48c3,
 	0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990,
-	0x0804, 0x48c4, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804, 0x338a,
-	0x7984, 0x2114, 0x0804, 0x338a, 0x20e1, 0x0000, 0x2099, 0x0021,
+	0x0804, 0x48c6, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804, 0x337e,
+	0x7984, 0x2114, 0x0804, 0x337e, 0x20e1, 0x0000, 0x2099, 0x0021,
 	0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f, 0x4003, 0x7984,
-	0x7a88, 0x7b8c, 0x0804, 0x338a, 0x7884, 0x2060, 0x04d8, 0x2009,
-	0x0003, 0x2011, 0x0002, 0x2019, 0x001c, 0x789b, 0x0317, 0x0804,
-	0x338a, 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0800, 0x2039, 0x0001,
-	0x7d98, 0x7c9c, 0x0848, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804,
-	0x33bf, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x33c6, 0x79a0, 0x9182,
-	0x0040, 0x0210, 0x0804, 0x33bf, 0x2138, 0x7d98, 0x7c9c, 0x0804,
-	0x33d4, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x33bf, 0x21e8,
-	0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804, 0x338a,
-	0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109,
-	0x1dd8, 0x2010, 0x9005, 0x0904, 0x338a, 0x0804, 0x33b9, 0x79a0,
-	0x9182, 0x0040, 0x0210, 0x0804, 0x33bf, 0x21e0, 0x20a9, 0x0001,
-	0x7984, 0x2198, 0x4012, 0x0804, 0x338a, 0x2069, 0x1853, 0x7884,
-	0x7990, 0x911a, 0x1a04, 0x33bf, 0x8019, 0x0904, 0x33bf, 0x684a,
-	0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a, 0x685e,
-	0x080c, 0x73e8, 0x0804, 0x338a, 0x2069, 0x1853, 0x7884, 0x7994,
-	0x911a, 0x1a04, 0x33bf, 0x8019, 0x0904, 0x33bf, 0x684e, 0x6946,
-	0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6769, 0x012e, 0x0804, 0x338a, 0x902e,
-	0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33bc, 0x7984,
-	0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1, 0x189c,
-	0x4101, 0x080c, 0x4878, 0x1120, 0x2009, 0x0002, 0x0804, 0x33bc,
-	0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x48c1,
-	0x701f, 0x34a3, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff, 0x9096,
-	0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015, 0x0138,
-	0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x33bc, 0x810f,
-	0x918c, 0x00ff, 0x0904, 0x33bc, 0x7112, 0x7010, 0x8001, 0x0560,
-	0x7012, 0x080c, 0x4878, 0x1120, 0x2009, 0x0002, 0x0804, 0x33bc,
-	0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598,
-	0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000,
-	0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x48c1, 0x701f, 0x34e1,
-	0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120, 0x9096,
-	0x000a, 0x1904, 0x33bc, 0x0888, 0x7014, 0x2048, 0xa868, 0xc0fd,
-	0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160, 0xc2fd,
-	0xaa7a, 0x080c, 0x5de4, 0x0150, 0x0126, 0x2091, 0x8000, 0xa87a,
-	0xa982, 0x012e, 0x0050, 0x080c, 0x60fb, 0x1128, 0x7007, 0x0003,
-	0x701f, 0x350d, 0x0005, 0x080c, 0x6bb3, 0x0126, 0x2091, 0x8000,
-	0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x189c, 0x400a, 0x2100,
-	0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c,
-	0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804, 0x48c4,
-	0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883, 0x4000,
-	0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009, 0x017f,
-	0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200, 0x2061,
-	0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd, 0x2104,
-	0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x0180, 0x2001, 0x19f3, 0x2004, 0x9005, 0x0128, 0x2001,
-	0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002,
-	0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff, 0x1904,
-	0x33bc, 0x7984, 0x080c, 0x6270, 0x1904, 0x33bf, 0x7e98, 0x9684,
-	0x3fff, 0x9082, 0x4000, 0x1a04, 0x33bf, 0x7c88, 0x7d8c, 0x080c,
-	0x64a2, 0x080c, 0x6433, 0x1518, 0x2061, 0x1ddc, 0x0126, 0x2091,
-	0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130,
-	0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0,
-	0x001c, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1a04, 0x33bc, 0x0c30,
-	0x080c, 0xb452, 0x012e, 0x0904, 0x33bc, 0x0804, 0x338a, 0x900e,
-	0x2001, 0x0005, 0x080c, 0x6bb3, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xbb4b, 0x080c, 0x6996, 0x012e, 0x0804, 0x338a, 0x00a6, 0x2950,
-	0xb198, 0x080c, 0x6270, 0x1904, 0x35f8, 0xb6a4, 0x9684, 0x3fff,
-	0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x64a2, 0x080c,
-	0x644d, 0x1520, 0x2061, 0x1ddc, 0x0126, 0x2091, 0x8000, 0x6000,
-	0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406,
-	0x1118, 0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, 0x001c, 0x2001,
-	0x1819, 0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c,
-	0xb452, 0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, 0x900e, 0x2001,
-	0x0005, 0x080c, 0x6bb3, 0x0126, 0x2091, 0x8000, 0x080c, 0xbb4b,
-	0x080c, 0x698a, 0x012e, 0x0070, 0xb097, 0x4005, 0xb19a, 0x0010,
-	0xb097, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x2a48,
-	0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, 0x918d, 0x0001, 0x2008,
-	0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, 0x33bc, 0x080c, 0x488f,
-	0x0904, 0x33bf, 0x080c, 0x6337, 0x0904, 0x33bc, 0x080c, 0x64a8,
-	0x0904, 0x33bc, 0x0804, 0x4329, 0x81ff, 0x1904, 0x33bc, 0x080c,
-	0x48ab, 0x0904, 0x33bf, 0x080c, 0x6536, 0x0904, 0x33bc, 0x2019,
-	0x0005, 0x79a8, 0x080c, 0x64c3, 0x0904, 0x33bc, 0x7888, 0x908a,
-	0x1000, 0x1a04, 0x33bf, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c,
-	0x8167, 0x7984, 0xd184, 0x1904, 0x338a, 0x0804, 0x4329, 0x0126,
-	0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029,
-	0x07ff, 0x6458, 0x2400, 0x9506, 0x01f8, 0x2508, 0x080c, 0x6270,
-	0x11d8, 0x080c, 0x6536, 0x1128, 0x2009, 0x0002, 0x62bc, 0x2518,
-	0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, 0x64c3, 0x1118, 0x2009,
-	0x0006, 0x0078, 0x7884, 0x908a, 0x1000, 0x1270, 0x8003, 0x800b,
-	0x810b, 0x9108, 0x080c, 0x8167, 0x8529, 0x1ae0, 0x012e, 0x0804,
-	0x338a, 0x012e, 0x0804, 0x33bc, 0x012e, 0x0804, 0x33bf, 0x080c,
-	0x488f, 0x0904, 0x33bf, 0x080c, 0x6337, 0x0904, 0x33bc, 0x080c,
-	0x98c8, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x863b,
-	0x0076, 0x903e, 0x080c, 0x852a, 0x900e, 0x080c, 0xcfc8, 0x007e,
-	0x00ce, 0x080c, 0x98e4, 0x080c, 0x64a2, 0x0804, 0x338a, 0x080c,
-	0x488f, 0x0904, 0x33bf, 0x080c, 0x64a2, 0x2208, 0x0804, 0x338a,
-	0x0156, 0x00d6, 0x00e6, 0x00c6, 0x2069, 0x1906, 0x6810, 0x6914,
-	0x910a, 0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x2071, 0x19b8,
-	0x7028, 0x9065, 0x0118, 0x8210, 0x600c, 0x0cd8, 0x2300, 0x9218,
-	0x00ce, 0x00ee, 0x00de, 0x015e, 0x0804, 0x338a, 0x00f6, 0x0016,
-	0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178,
-	0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1906, 0x6910, 0x62b8,
-	0x0804, 0x338a, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33bc,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x53a1, 0x0128, 0x2009, 0x0007,
-	0x012e, 0x0804, 0x33bc, 0x012e, 0x6158, 0x9190, 0x318b, 0x2215,
-	0x9294, 0x00ff, 0x6378, 0x83ff, 0x0108, 0x627c, 0x67d8, 0x97c4,
-	0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8, 0x97c4,
-	0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8, 0x97c4,
-	0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068, 0x080c,
-	0x70b7, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120, 0x2009,
-	0x0005, 0x0804, 0x33bc, 0x9036, 0x7e9a, 0x7f9e, 0x0804, 0x338a,
-	0x6148, 0x624c, 0x2019, 0x1957, 0x231c, 0x2001, 0x1958, 0x2004,
-	0x789a, 0x0804, 0x338a, 0x0126, 0x2091, 0x8000, 0x6138, 0x623c,
-	0x6340, 0x012e, 0x0804, 0x338a, 0x080c, 0x48ab, 0x0904, 0x33bf,
-	0xba44, 0xbb38, 0x0804, 0x338a, 0x080c, 0x0d65, 0x080c, 0x48ab,
-	0x2110, 0x0904, 0x33bf, 0xb804, 0x908c, 0x00ff, 0x918e, 0x0006,
-	0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009, 0x1904,
-	0x33bc, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6, 0x9066,
-	0x080c, 0x98c8, 0x080c, 0x94f4, 0x080c, 0x863b, 0x0076, 0x903e,
-	0x080c, 0x852a, 0x900e, 0x080c, 0xcfc8, 0x007e, 0x00ce, 0x080c,
-	0x98e4, 0xb807, 0x0407, 0x012e, 0x0804, 0x338a, 0x6148, 0x624c,
-	0x7884, 0x604a, 0x7b88, 0x634e, 0x2069, 0x1853, 0x831f, 0x9305,
-	0x6816, 0x788c, 0x2069, 0x1957, 0x2d1c, 0x206a, 0x7e98, 0x9682,
-	0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, 0x1958, 0x2d04, 0x266a,
-	0x789a, 0x0804, 0x338a, 0x0126, 0x2091, 0x8000, 0x6138, 0x7884,
-	0x603a, 0x910e, 0xd1b4, 0x190c, 0x0eb4, 0xd0c4, 0x01a8, 0x00d6,
-	0x78a8, 0x2009, 0x196e, 0x200a, 0x78ac, 0x2011, 0x196f, 0x2012,
-	0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214, 0x6a5a,
-	0x0010, 0x210c, 0x695a, 0x00de, 0x7888, 0x603e, 0x2011, 0x0116,
-	0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0040, 0x0010, 0x918c,
-	0xff7f, 0x2112, 0x6140, 0x788c, 0x6042, 0x910e, 0xd1e4, 0x190c,
-	0x0ecf, 0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114, 0x2012,
-	0x012e, 0x0804, 0x338a, 0x00f6, 0x2079, 0x1800, 0x7a38, 0xa898,
-	0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002, 0x9214,
-	0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, 0x7898, 0x9005,
-	0x01a8, 0x7888, 0x9025, 0x0904, 0x33bf, 0x788c, 0x902d, 0x0904,
-	0x33bf, 0x900e, 0x080c, 0x6270, 0x1120, 0xba44, 0xbb38, 0xbc46,
-	0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c, 0x48ab,
-	0x0904, 0x33bf, 0x7888, 0x900d, 0x0904, 0x33bf, 0x788c, 0x9005,
-	0x0904, 0x33bf, 0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804, 0x338a,
-	0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, 0x53a1, 0x1904,
-	0x33bc, 0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, 0x00ff, 0x1130,
-	0x2001, 0x1817, 0x2004, 0x9085, 0xff00, 0x0088, 0x9182, 0x007f,
-	0x16e0, 0x9188, 0x318b, 0x210d, 0x918c, 0x00ff, 0x2001, 0x1817,
-	0x2004, 0x0026, 0x9116, 0x002e, 0x0580, 0x810f, 0x9105, 0x0126,
-	0x2091, 0x8000, 0x0006, 0x080c, 0x9b91, 0x000e, 0x0510, 0x602e,
-	0x620a, 0x7984, 0x00b6, 0x080c, 0x6216, 0x2b08, 0x00be, 0x1500,
-	0x6112, 0x6023, 0x0001, 0x080c, 0x4878, 0x01d0, 0x9006, 0xa866,
-	0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f, 0x3863,
-	0x2900, 0x6016, 0x2009, 0x0032, 0x080c, 0x9c85, 0x012e, 0x00ce,
-	0x0005, 0x012e, 0x00ce, 0x0804, 0x33bc, 0x00ce, 0x0804, 0x33bf,
-	0x080c, 0x9be7, 0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904, 0x33bc,
-	0x0804, 0x338a, 0x2061, 0x1a3f, 0x0126, 0x2091, 0x8000, 0x6000,
-	0xd084, 0x0170, 0x6104, 0x6208, 0x2061, 0x1800, 0x6350, 0x6070,
-	0x789a, 0x60bc, 0x789e, 0x60b8, 0x78aa, 0x012e, 0x0804, 0x338a,
-	0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, 0x33bc, 0x080c, 0x70b7,
-	0x0904, 0x33bc, 0x0126, 0x2091, 0x8000, 0x6250, 0x6070, 0x9202,
-	0x0248, 0x9085, 0x0001, 0x080c, 0x248d, 0x080c, 0x55bb, 0x012e,
-	0x0804, 0x338a, 0x012e, 0x0804, 0x33bf, 0x0006, 0x0016, 0x00c6,
-	0x00e6, 0x2001, 0x197a, 0x2070, 0x2061, 0x1853, 0x6008, 0x2072,
-	0x900e, 0x2011, 0x1400, 0x080c, 0x8419, 0x7206, 0x00ee, 0x00ce,
-	0x001e, 0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0128,
-	0x012e, 0x2021, 0x400b, 0x0804, 0x338c, 0x7884, 0xd0fc, 0x0148,
-	0x2001, 0x002a, 0x2004, 0x9082, 0x00e1, 0x0288, 0x012e, 0x0804,
-	0x33bf, 0x2001, 0x002a, 0x2004, 0x2069, 0x1853, 0x6908, 0x9102,
-	0x1230, 0x012e, 0x0804, 0x33bf, 0x012e, 0x0804, 0x33bc, 0x080c,
-	0x9b66, 0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x392e, 0x00c6, 0x080c,
-	0x4878, 0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a, 0x7898,
-	0xa80e, 0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a, 0x2001,
-	0x002f, 0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822, 0x2001,
-	0x0031, 0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a, 0x2001,
-	0x0035, 0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080, 0x0003,
-	0x9084, 0x00fc, 0x8004, 0xa816, 0x080c, 0x3ab8, 0x0928, 0x7014,
-	0x2048, 0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808, 0xd0b4,
-	0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x48c1,
-	0x701f, 0x39f5, 0x7023, 0x0001, 0x012e, 0x0005, 0x080c, 0x98c8,
-	0x0046, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6,
-	0x00f6, 0x080c, 0x389d, 0x2001, 0x1970, 0x2003, 0x0000, 0x2021,
-	0x000a, 0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000, 0x60bf,
-	0x32e1, 0x60bf, 0x0012, 0x080c, 0x3b27, 0x080c, 0x3ae6, 0x00f6,
-	0x00e6, 0x0086, 0x2940, 0x2071, 0x19b8, 0x2079, 0x0090, 0x00d6,
-	0x2069, 0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035, 0x2004,
-	0x780e, 0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011, 0x0001,
-	0x080c, 0x3e98, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3dc5, 0x080c,
-	0x3cf2, 0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1db8,
-	0x080c, 0x3f0c, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c,
-	0x0070, 0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050, 0x9084,
-	0xff00, 0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050, 0x9084,
-	0xff00, 0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054, 0x7037,
-	0x0000, 0x715c, 0x9106, 0x1190, 0x2001, 0x181f, 0x2004, 0x9106,
-	0x1168, 0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00, 0x00ce,
-	0x0138, 0x080c, 0x3cfc, 0x080c, 0x3ae1, 0x0058, 0x080c, 0x3ae1,
-	0x080c, 0x3e30, 0x080c, 0x3dbb, 0x2001, 0x020b, 0x2004, 0xd0e4,
-	0x0dd8, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027,
-	0x0002, 0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x60bb,
-	0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004, 0x200c,
-	0x918c, 0xfffd, 0x2102, 0x080c, 0x12d6, 0x2009, 0x0028, 0x080c,
-	0x2052, 0x2001, 0x0227, 0x200c, 0x2102, 0x080c, 0x98e4, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x004e,
-	0x2001, 0x1970, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804, 0x338a,
-	0x012e, 0x2021, 0x400c, 0x0804, 0x338c, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x7014,
-	0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005, 0x0904,
-	0x3a51, 0x2048, 0x1f04, 0x3a05, 0x7068, 0x2040, 0xa28c, 0xa390,
-	0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000,
-	0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e, 0x9086,
-	0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
-	0xffc0, 0x9080, 0x001b, 0x080c, 0x48c1, 0x701f, 0x39f5, 0x00b0,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c,
-	0x0f9f, 0x000e, 0x080c, 0x48c4, 0x701f, 0x39f5, 0x015e, 0x00de,
-	0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118, 0x701f,
-	0x3ab6, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009,
-	0x007f, 0x080c, 0x6210, 0x0110, 0x9006, 0x0030, 0xb813, 0x00ff,
-	0xb817, 0xfffd, 0x080c, 0xbd2a, 0x015e, 0x00de, 0x009e, 0x008e,
-	0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904, 0x33bc,
-	0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096,
-	0x00d6, 0x0156, 0x701f, 0x3a88, 0x7007, 0x0003, 0x0804, 0x3a46,
-	0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x338c, 0x0076,
-	0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120,
+	0x7a88, 0x7b8c, 0x0804, 0x337e, 0x7884, 0x2060, 0x0804, 0x3431,
+	0x2009, 0x0003, 0x2011, 0x0002, 0x2019, 0x001e, 0x789b, 0x0317,
+	0x7893, 0xffff, 0x2001, 0x1885, 0x2004, 0x9005, 0x0118, 0x7896,
+	0x0804, 0x337e, 0x7897, 0x0001, 0x0804, 0x337e, 0x2039, 0x0001,
+	0x7d98, 0x7c9c, 0x0804, 0x33ba, 0x2039, 0x0001, 0x7d98, 0x7c9c,
+	0x0804, 0x33c4, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x33b3,
+	0x2138, 0x7d98, 0x7c9c, 0x0804, 0x33ba, 0x79a0, 0x9182, 0x0040,
+	0x0210, 0x0804, 0x33b3, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x33c4,
+	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x33b3, 0x21e8, 0x7984,
+	0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804, 0x337e, 0x2061,
+	0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109, 0x1dd8,
+	0x2010, 0x9005, 0x0904, 0x337e, 0x0804, 0x33ad, 0x79a0, 0x9182,
+	0x0040, 0x0210, 0x0804, 0x33b3, 0x21e0, 0x20a9, 0x0001, 0x7984,
+	0x2198, 0x4012, 0x0804, 0x337e, 0x2069, 0x1853, 0x7884, 0x7990,
+	0x911a, 0x1a04, 0x33b3, 0x8019, 0x0904, 0x33b3, 0x684a, 0x6942,
+	0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a, 0x685e, 0x080c,
+	0x73c7, 0x0804, 0x337e, 0x2069, 0x1853, 0x7884, 0x7994, 0x911a,
+	0x1a04, 0x33b3, 0x8019, 0x0904, 0x33b3, 0x684e, 0x6946, 0x788c,
+	0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6764, 0x012e, 0x0804, 0x337e, 0x902e, 0x2520,
+	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33b0, 0x7984, 0x7b88,
+	0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1, 0x189c, 0x4101,
+	0x080c, 0x487a, 0x1120, 0x2009, 0x0002, 0x0804, 0x33b0, 0x2009,
+	0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x48c3, 0x701f,
+	0x34a2, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff, 0x9096, 0x0011,
+	0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015, 0x0138, 0x9096,
+	0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x33b0, 0x810f, 0x918c,
+	0x00ff, 0x0904, 0x33b0, 0x7112, 0x7010, 0x8001, 0x0560, 0x7012,
+	0x080c, 0x487a, 0x1120, 0x2009, 0x0002, 0x0804, 0x33b0, 0x2009,
+	0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, 0x9290,
+	0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c,
+	0x9080, 0x0019, 0xaf60, 0x080c, 0x48c3, 0x701f, 0x34e0, 0x0005,
+	0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120, 0x9096, 0x000a,
+	0x1904, 0x33b0, 0x0888, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a,
+	0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160, 0xc2fd, 0xaa7a,
+	0x080c, 0x5ddf, 0x0150, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982,
+	0x012e, 0x0050, 0x080c, 0x60f6, 0x1128, 0x7007, 0x0003, 0x701f,
+	0x350c, 0x0005, 0x080c, 0x6ba2, 0x0126, 0x2091, 0x8000, 0x20a9,
+	0x0005, 0x20e1, 0x0001, 0x2099, 0x189c, 0x400a, 0x2100, 0x9210,
+	0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080,
+	0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804, 0x48c6, 0x2091,
+	0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883, 0x4000, 0x7887,
+	0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009, 0x017f, 0x2104,
+	0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200, 0x2061, 0x0200,
+	0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd, 0x2104, 0x789e,
+	0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x0180, 0x2001, 0x19f2, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b,
+	0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003,
+	0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff, 0x1904, 0x33b0,
+	0x7984, 0x080c, 0x626b, 0x1904, 0x33b3, 0x7e98, 0x9684, 0x3fff,
+	0x9082, 0x4000, 0x1a04, 0x33b3, 0x7c88, 0x7d8c, 0x080c, 0x64a1,
+	0x080c, 0x642e, 0x1518, 0x2061, 0x1ddc, 0x0126, 0x2091, 0x8000,
+	0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c,
+	0x9406, 0x1118, 0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0, 0x001c,
+	0x2001, 0x1819, 0x2004, 0x9c02, 0x1a04, 0x33b0, 0x0c30, 0x080c,
+	0xb440, 0x012e, 0x0904, 0x33b0, 0x0804, 0x337e, 0x900e, 0x2001,
+	0x0005, 0x080c, 0x6ba2, 0x0126, 0x2091, 0x8000, 0x080c, 0xbb4b,
+	0x080c, 0x6991, 0x012e, 0x0804, 0x337e, 0x00a6, 0x2950, 0xb198,
+	0x080c, 0x626b, 0x1904, 0x35f7, 0xb6a4, 0x9684, 0x3fff, 0x9082,
+	0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x64a1, 0x080c, 0x644b,
+	0x1520, 0x2061, 0x1ddc, 0x0126, 0x2091, 0x8000, 0x6000, 0x9086,
+	0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118,
+	0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, 0x001c, 0x2001, 0x1819,
+	0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c, 0xb440,
+	0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, 0x900e, 0x2001, 0x0005,
+	0x080c, 0x6ba2, 0x0126, 0x2091, 0x8000, 0x080c, 0xbb4b, 0x080c,
+	0x6985, 0x012e, 0x0070, 0xb097, 0x4005, 0xb19a, 0x0010, 0xb097,
+	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x2a48, 0x00ae,
+	0x0005, 0xb097, 0x4000, 0x9006, 0x918d, 0x0001, 0x2008, 0x2a48,
+	0x00ae, 0x0005, 0x81ff, 0x1904, 0x33b0, 0x080c, 0x4891, 0x0904,
+	0x33b3, 0x080c, 0x6332, 0x0904, 0x33b0, 0x080c, 0x64a7, 0x0904,
+	0x33b0, 0x0804, 0x4328, 0x81ff, 0x1904, 0x33b0, 0x080c, 0x48ad,
+	0x0904, 0x33b3, 0x080c, 0x6535, 0x0904, 0x33b0, 0x2019, 0x0005,
+	0x79a8, 0x080c, 0x64c2, 0x0904, 0x33b0, 0x7888, 0x908a, 0x1000,
+	0x1a04, 0x33b3, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x8146,
+	0x7984, 0xd184, 0x1904, 0x337e, 0x0804, 0x4328, 0x0126, 0x2091,
+	0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029, 0x07ff,
+	0x6458, 0x2400, 0x9506, 0x01f8, 0x2508, 0x080c, 0x626b, 0x11d8,
+	0x080c, 0x6535, 0x1128, 0x2009, 0x0002, 0x62bc, 0x2518, 0x00c0,
+	0x2019, 0x0004, 0x900e, 0x080c, 0x64c2, 0x1118, 0x2009, 0x0006,
+	0x0078, 0x7884, 0x908a, 0x1000, 0x1270, 0x8003, 0x800b, 0x810b,
+	0x9108, 0x080c, 0x8146, 0x8529, 0x1ae0, 0x012e, 0x0804, 0x337e,
+	0x012e, 0x0804, 0x33b0, 0x012e, 0x0804, 0x33b3, 0x080c, 0x4891,
+	0x0904, 0x33b3, 0x080c, 0x6332, 0x0904, 0x33b0, 0x080c, 0x98bb,
+	0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x8624, 0x0076,
+	0x903e, 0x080c, 0x8509, 0x900e, 0x080c, 0xcfd9, 0x007e, 0x00ce,
+	0x080c, 0x98d7, 0x080c, 0x64a1, 0x0804, 0x337e, 0x080c, 0x4891,
+	0x0904, 0x33b3, 0x080c, 0x64a1, 0x2208, 0x0804, 0x337e, 0x0156,
+	0x00d6, 0x00e6, 0x00c6, 0x2069, 0x1906, 0x6810, 0x6914, 0x910a,
+	0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x2071, 0x19b7, 0x7028,
+	0x9065, 0x0118, 0x8210, 0x600c, 0x0cd8, 0x2300, 0x9218, 0x00ce,
+	0x00ee, 0x00de, 0x015e, 0x0804, 0x337e, 0x00f6, 0x0016, 0x907d,
+	0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178, 0x0cd0,
+	0x001e, 0x00fe, 0x0005, 0x2069, 0x1906, 0x6910, 0x62b8, 0x0804,
+	0x337e, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33b0, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x539c, 0x0128, 0x2009, 0x0007, 0x012e,
+	0x0804, 0x33b0, 0x012e, 0x6158, 0x9190, 0x317f, 0x2215, 0x9294,
+	0x00ff, 0x6378, 0x83ff, 0x0108, 0x627c, 0x67d8, 0x97c4, 0x000a,
+	0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8, 0x97c4, 0x0022,
+	0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8, 0x97c4, 0x0012,
+	0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068, 0x080c, 0x7096,
+	0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120, 0x2009, 0x0005,
+	0x0804, 0x33b0, 0x9036, 0x7e9a, 0x7f9e, 0x0804, 0x337e, 0x6148,
+	0x624c, 0x2019, 0x1956, 0x231c, 0x2001, 0x1957, 0x2004, 0x789a,
+	0x0804, 0x337e, 0x0126, 0x2091, 0x8000, 0x6138, 0x623c, 0x6340,
+	0x012e, 0x0804, 0x337e, 0x080c, 0x48ad, 0x0904, 0x33b3, 0xba44,
+	0xbb38, 0x0804, 0x337e, 0x080c, 0x0d65, 0x080c, 0x48ad, 0x2110,
+	0x0904, 0x33b3, 0xb804, 0x908c, 0x00ff, 0x918e, 0x0006, 0x0140,
+	0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009, 0x1904, 0x33b0,
+	0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c,
+	0x98bb, 0x080c, 0x94dd, 0x080c, 0x8624, 0x0076, 0x903e, 0x080c,
+	0x8509, 0x900e, 0x080c, 0xcfd9, 0x007e, 0x00ce, 0x080c, 0x98d7,
+	0xb807, 0x0407, 0x012e, 0x0804, 0x337e, 0x6148, 0x624c, 0x7884,
+	0x604a, 0x7b88, 0x634e, 0x2069, 0x1853, 0x831f, 0x9305, 0x6816,
+	0x788c, 0x2069, 0x1956, 0x2d1c, 0x206a, 0x7e98, 0x9682, 0x0014,
+	0x1210, 0x2031, 0x07d0, 0x2069, 0x1957, 0x2d04, 0x266a, 0x789a,
+	0x0804, 0x337e, 0x0126, 0x2091, 0x8000, 0x6138, 0x7884, 0x603a,
+	0x910e, 0xd1b4, 0x190c, 0x0eb4, 0xd0c4, 0x01a8, 0x00d6, 0x78a8,
+	0x2009, 0x196d, 0x200a, 0x78ac, 0x2011, 0x196e, 0x2012, 0x2069,
+	0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214, 0x6a5a, 0x0010,
+	0x210c, 0x695a, 0x00de, 0x7888, 0x603e, 0x2011, 0x0116, 0x220c,
+	0x7888, 0xd08c, 0x0118, 0x918d, 0x0040, 0x0010, 0x918c, 0xff7f,
+	0x2112, 0x6140, 0x788c, 0x6042, 0x910e, 0xd1e4, 0x190c, 0x0ecf,
+	0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114, 0x2012, 0x012e,
+	0x0804, 0x337e, 0x00f6, 0x2079, 0x1800, 0x7a38, 0xa898, 0x9084,
+	0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002, 0x9214, 0x7838,
+	0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, 0x7898, 0x9005, 0x01a8,
+	0x7888, 0x9025, 0x0904, 0x33b3, 0x788c, 0x902d, 0x0904, 0x33b3,
+	0x900e, 0x080c, 0x626b, 0x1120, 0xba44, 0xbb38, 0xbc46, 0xbd3a,
+	0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c, 0x48ad, 0x0904,
+	0x33b3, 0x7888, 0x900d, 0x0904, 0x33b3, 0x788c, 0x9005, 0x0904,
+	0x33b3, 0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804, 0x337e, 0x2011,
+	0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, 0x539c, 0x1904, 0x33b0,
+	0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, 0x00ff, 0x1130, 0x2001,
+	0x1817, 0x2004, 0x9085, 0xff00, 0x0088, 0x9182, 0x007f, 0x16e0,
+	0x9188, 0x317f, 0x210d, 0x918c, 0x00ff, 0x2001, 0x1817, 0x2004,
+	0x0026, 0x9116, 0x002e, 0x0580, 0x810f, 0x9105, 0x0126, 0x2091,
+	0x8000, 0x0006, 0x080c, 0x9b84, 0x000e, 0x0510, 0x602e, 0x620a,
+	0x7984, 0x00b6, 0x080c, 0x6211, 0x2b08, 0x00be, 0x1500, 0x6112,
+	0x6023, 0x0001, 0x080c, 0x487a, 0x01d0, 0x9006, 0xa866, 0x7007,
+	0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f, 0x3862, 0x2900,
+	0x6016, 0x2009, 0x0032, 0x080c, 0x9c76, 0x012e, 0x00ce, 0x0005,
+	0x012e, 0x00ce, 0x0804, 0x33b0, 0x00ce, 0x0804, 0x33b3, 0x080c,
+	0x9bda, 0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904, 0x33b0, 0x0804,
+	0x337e, 0x2061, 0x1a3e, 0x0126, 0x2091, 0x8000, 0x6000, 0xd084,
+	0x0170, 0x6104, 0x6208, 0x2061, 0x1800, 0x6350, 0x6070, 0x789a,
+	0x60bc, 0x789e, 0x60b8, 0x78aa, 0x012e, 0x0804, 0x337e, 0x900e,
+	0x2110, 0x0c88, 0x81ff, 0x1904, 0x33b0, 0x080c, 0x7096, 0x0904,
+	0x33b0, 0x0126, 0x2091, 0x8000, 0x6250, 0x6070, 0x9202, 0x0248,
+	0x9085, 0x0001, 0x080c, 0x24a6, 0x080c, 0x55b6, 0x012e, 0x0804,
+	0x337e, 0x012e, 0x0804, 0x33b3, 0x0006, 0x0016, 0x00c6, 0x00e6,
+	0x2001, 0x1979, 0x2070, 0x2061, 0x1853, 0x6008, 0x2072, 0x900e,
+	0x2011, 0x1400, 0x080c, 0x83fb, 0x7206, 0x00ee, 0x00ce, 0x001e,
+	0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0128, 0x012e,
+	0x2021, 0x400b, 0x0804, 0x3380, 0x7884, 0xd0fc, 0x0148, 0x2001,
+	0x002a, 0x2004, 0x9082, 0x00e1, 0x0288, 0x012e, 0x0804, 0x33b3,
+	0x2001, 0x002a, 0x2004, 0x2069, 0x1853, 0x6908, 0x9102, 0x1230,
+	0x012e, 0x0804, 0x33b3, 0x012e, 0x0804, 0x33b0, 0x080c, 0x9b59,
+	0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x392d, 0x00c6, 0x080c, 0x487a,
+	0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a, 0x7898, 0xa80e,
+	0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a, 0x2001, 0x002f,
+	0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822, 0x2001, 0x0031,
+	0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a, 0x2001, 0x0035,
+	0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080, 0x0003, 0x9084,
+	0x00fc, 0x8004, 0xa816, 0x080c, 0x3ab7, 0x0928, 0x7014, 0x2048,
+	0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808, 0xd0b4, 0x1120,
 	0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098,
-	0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f9f, 0x000e, 0x080c, 0x48c4,
-	0x007e, 0x701f, 0x39f5, 0x7023, 0x0001, 0x0005, 0x0804, 0x338a,
-	0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833, 0x001e,
-	0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c, 0x4878,
-	0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58,
-	0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005, 0x0006,
-	0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe, 0x000e,
-	0x0005, 0x2001, 0x1970, 0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6,
-	0x00c6, 0x2061, 0x0200, 0x2001, 0x197b, 0x2004, 0x601a, 0x2061,
-	0x0100, 0x2001, 0x197a, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106,
-	0x080c, 0x4878, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a,
-	0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a,
-	0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x197a, 0x2004, 0x6036,
-	0x2009, 0x0040, 0x080c, 0x2052, 0x2001, 0x002a, 0x2004, 0x9084,
-	0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000, 0x78ca,
-	0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6,
-	0x080c, 0x4878, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800,
-	0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031, 0x2004,
-	0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873,
-	0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300, 0x2003,
-	0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c,
-	0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x81ff, 0x0148, 0x080c, 0x2811, 0x1130, 0x9006, 0x080c, 0x276e,
-	0x9006, 0x080c, 0x2751, 0x7884, 0x9084, 0x0007, 0x0002, 0x3b72,
-	0x3b7b, 0x3b84, 0x3b6f, 0x3b6f, 0x3b6f, 0x3b6f, 0x3b6f, 0x012e,
-	0x0804, 0x33bf, 0x2009, 0x0114, 0x2104, 0x9085, 0x0800, 0x200a,
-	0x080c, 0x3d46, 0x00c0, 0x2009, 0x0114, 0x2104, 0x9085, 0x4000,
-	0x200a, 0x080c, 0x3d46, 0x0078, 0x080c, 0x70b7, 0x1128, 0x012e,
-	0x2009, 0x0016, 0x0804, 0x33bc, 0x81ff, 0x0128, 0x012e, 0x2021,
-	0x400b, 0x0804, 0x338c, 0x080c, 0x98c8, 0x0086, 0x0096, 0x00a6,
-	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x389d, 0x2009,
-	0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060,
-	0x2058, 0x080c, 0x3fe7, 0x080c, 0x3f37, 0x903e, 0x2720, 0x00f6,
-	0x00e6, 0x0086, 0x2940, 0x2071, 0x19b8, 0x2079, 0x0090, 0x00d6,
-	0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0,
-	0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x3e98, 0x080c, 0x2819,
-	0x080c, 0x2819, 0x080c, 0x2819, 0x080c, 0x2819, 0x080c, 0x3e98,
-	0x008e, 0x00ee, 0x00fe, 0x080c, 0x3dc5, 0x2009, 0x9c40, 0x8109,
-	0x11b0, 0x080c, 0x3cfc, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd,
-	0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae,
-	0x009e, 0x008e, 0x2009, 0x0017, 0x080c, 0x33bc, 0x0cf8, 0x2001,
-	0x020b, 0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000,
-	0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff,
-	0x0150, 0x080c, 0x3da3, 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c,
-	0x3cfc, 0x0804, 0x3ca5, 0x080c, 0x3f0c, 0x080c, 0x3e30, 0x080c,
-	0x3d86, 0x080c, 0x3dbb, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac,
-	0x0130, 0x8b58, 0x080c, 0x3cfc, 0x00fe, 0x0804, 0x3ca5, 0x00fe,
-	0x080c, 0x3cf2, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001,
-	0x0033, 0x2502, 0x080c, 0x3cfc, 0x0080, 0x87ff, 0x0138, 0x2001,
-	0x0201, 0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001, 0x1a3c,
-	0x2004, 0x9086, 0x0000, 0x1904, 0x3bf5, 0x2001, 0x032f, 0x2003,
-	0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904, 0x3ca5,
-	0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3ca5,
-	0xa013, 0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac,
-	0x1148, 0x2001, 0x1a3c, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003,
-	0x0009, 0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016,
-	0x2800, 0xa05a, 0x2009, 0x0040, 0x080c, 0x2052, 0x2900, 0xa85a,
-	0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6,
-	0x20a9, 0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001, 0x0203,
-	0x2004, 0x1f04, 0x3c7c, 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0,
-	0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061,
-	0x0090, 0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
-	0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e,
-	0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3baf, 0x001e, 0x00c6, 0x2001,
-	0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x6106,
-	0x2011, 0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c, 0x918c,
-	0xfffd, 0x2102, 0x080c, 0x12d6, 0x7884, 0x9084, 0x0003, 0x9086,
-	0x0002, 0x01b0, 0x2009, 0x0028, 0x080c, 0x2052, 0x2001, 0x0227,
-	0x200c, 0x2102, 0x6050, 0x9084, 0xb7ff, 0x080c, 0x28d4, 0x6052,
-	0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010,
-	0x080c, 0x98e4, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05,
-	0x9d05, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
-	0x008e, 0x1118, 0x012e, 0x0804, 0x338a, 0x012e, 0x2021, 0x400c,
-	0x0804, 0x338c, 0x9085, 0x0001, 0x1d04, 0x3cfb, 0x2091, 0x6000,
-	0x8420, 0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, 0x0010,
-	0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x1a3c, 0x2003, 0x0000,
-	0x0071, 0x2009, 0x0048, 0x080c, 0x2052, 0x2001, 0x0227, 0x2024,
-	0x2402, 0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005, 0x00f6,
-	0x00e6, 0x2071, 0x19b8, 0x7054, 0x9086, 0x0000, 0x0520, 0x2079,
-	0x0090, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106,
-	0x1120, 0x2009, 0x0040, 0x080c, 0x2052, 0x782c, 0xd0fc, 0x0d88,
-	0x080c, 0x3f0c, 0x7054, 0x9086, 0x0000, 0x1d58, 0x782b, 0x0004,
-	0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x2052, 0x782b,
-	0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079,
-	0x0100, 0x2001, 0x1817, 0x200c, 0x7932, 0x7936, 0x080c, 0x246d,
-	0x080c, 0x2890, 0x080c, 0x28d4, 0x784b, 0xf7f7, 0x7843, 0x0090,
-	0x7843, 0x0010, 0x7850, 0xc0e5, 0x7852, 0x2019, 0x61a8, 0x7820,
-	0xd09c, 0x0110, 0x8319, 0x1dd8, 0x7850, 0xc0e4, 0x7852, 0x2011,
-	0x0048, 0x080c, 0x286d, 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001,
-	0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2833, 0x2011,
-	0x0020, 0x080c, 0x286d, 0x7843, 0x0000, 0x9006, 0x080c, 0x2833,
-	0x2011, 0x0048, 0x080c, 0x286d, 0x00fe, 0x0005, 0x7884, 0xd0ac,
-	0x11c8, 0x00f6, 0x00e6, 0x2071, 0x1a3c, 0x2079, 0x0320, 0x2001,
-	0x0201, 0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000, 0x1140,
-	0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b, 0x0019,
-	0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe,
-	0x908c, 0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009, 0x0033,
-	0x250a, 0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4,
-	0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084,
-	0x0110, 0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100,
-	0x2001, 0x197b, 0x2004, 0x70e2, 0x080c, 0x3ad7, 0x1188, 0x2001,
-	0x181f, 0x2004, 0x2009, 0x181e, 0x210c, 0x918c, 0x00ff, 0x706e,
-	0x716a, 0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109, 0x0080,
-	0x702c, 0x9085, 0x0002, 0x702e, 0x2009, 0x1817, 0x210c, 0x716e,
-	0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, 0x0809,
-	0x7077, 0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080, 0x8000,
-	0x7082, 0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e, 0x70d6,
-	0x70ab, 0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984, 0x9085,
-	0x0092, 0x7016, 0x080c, 0x3f0c, 0x00f6, 0x2071, 0x1a3c, 0x2079,
-	0x0320, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c,
-	0x780e, 0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109, 0x1df0,
-	0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011, 0x080c,
-	0x3e98, 0x2011, 0x0001, 0x080c, 0x3e98, 0x00fe, 0x00ee, 0x0005,
-	0x00f6, 0x00e6, 0x2071, 0x1a3c, 0x2079, 0x0320, 0x792c, 0xd1fc,
-	0x0904, 0x3e95, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904, 0x3e91,
-	0x7000, 0x0002, 0x3e95, 0x3e46, 0x3e76, 0x3e91, 0xd1bc, 0x1170,
-	0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c, 0x3e98,
-	0x0904, 0x3e95, 0x080c, 0x3e98, 0x0804, 0x3e95, 0x00f6, 0x2079,
-	0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b, 0x0004,
-	0x7812, 0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c,
-	0x3da3, 0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8, 0x00fe,
-	0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001, 0x7002,
-	0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x3e3a, 0x2011,
-	0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086, 0x0015,
-	0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc, 0x1960,
-	0x0828, 0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005,
-	0xa014, 0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016, 0xa058,
-	0x2048, 0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c, 0x938a,
-	0x0007, 0x1a0c, 0x0d65, 0x9398, 0x3ec6, 0x231d, 0x083f, 0x9080,
-	0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e, 0x908a,
-	0x0035, 0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a, 0x2001,
-	0x0019, 0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x3f03, 0x3efa,
-	0x3ef1, 0x3ee8, 0x3edf, 0x3ed6, 0x3ecd, 0xa964, 0x7902, 0xa968,
-	0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974, 0x7902,
-	0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005, 0xa984,
-	0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916, 0x0005,
-	0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0, 0x7916,
-	0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912, 0xa9b0,
-	0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc, 0x7912,
-	0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906, 0xa9cc,
-	0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086, 0x2071,
-	0x19b8, 0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b, 0x0002,
-	0x2940, 0x9026, 0x7054, 0x0002, 0x3f33, 0x3f1f, 0x3f2a, 0x8001,
-	0x7056, 0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x3e98, 0x190c,
-	0x3e98, 0x0048, 0x8001, 0x7056, 0x782c, 0xd0fc, 0x1d38, 0x2011,
-	0x0001, 0x080c, 0x3e98, 0x008e, 0x00ee, 0x00fe, 0x0005, 0x00f6,
-	0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x197b, 0x2004,
-	0x601a, 0x2061, 0x0100, 0x2001, 0x197a, 0x2004, 0x60ce, 0x6104,
-	0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520, 0x2038,
-	0x2001, 0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c, 0x4878,
-	0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220,
-	0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858,
-	0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x3faf, 0x1d68,
-	0x2900, 0xa85a, 0x00d0, 0x080c, 0x4878, 0xa813, 0x0019, 0xa817,
-	0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001,
-	0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
-	0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090, 0x2079,
-	0x0100, 0x2001, 0x197a, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c,
-	0x2052, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006,
-	0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x9006,
-	0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6,
-	0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000, 0x2099,
-	0x0088, 0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a, 0x700e,
-	0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041, 0x702c,
-	0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005, 0x7400,
-	0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086, 0x080c,
-	0x4878, 0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006, 0xa05a,
-	0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6,
-	0x2001, 0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001, 0x0030,
-	0x2024, 0x2001, 0x0031, 0x201c, 0x080c, 0x4878, 0x2940, 0xa813,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x48c3, 0x701f,
+	0x39f4, 0x7023, 0x0001, 0x012e, 0x0005, 0x080c, 0x98bb, 0x0046,
+	0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
+	0x080c, 0x389c, 0x2001, 0x196f, 0x2003, 0x0000, 0x2021, 0x000a,
+	0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1,
+	0x60bf, 0x0012, 0x080c, 0x3b26, 0x080c, 0x3ae5, 0x00f6, 0x00e6,
+	0x0086, 0x2940, 0x2071, 0x19b7, 0x2079, 0x0090, 0x00d6, 0x2069,
+	0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035, 0x2004, 0x780e,
+	0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c,
+	0x3e97, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3dc4, 0x080c, 0x3cf1,
+	0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1db8, 0x080c,
+	0x3f0b, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070,
+	0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050, 0x9084, 0xff00,
+	0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050, 0x9084, 0xff00,
+	0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054, 0x7037, 0x0000,
+	0x715c, 0x9106, 0x1190, 0x2001, 0x181f, 0x2004, 0x9106, 0x1168,
+	0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138,
+	0x080c, 0x3cfb, 0x080c, 0x3ae0, 0x0058, 0x080c, 0x3ae0, 0x080c,
+	0x3e2f, 0x080c, 0x3dba, 0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8,
+	0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002,
+	0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x60bb, 0x0000,
+	0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004, 0x200c, 0x918c,
+	0xfffd, 0x2102, 0x080c, 0x12e1, 0x2009, 0x0028, 0x080c, 0x2063,
+	0x2001, 0x0227, 0x200c, 0x2102, 0x080c, 0x98d7, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x004e, 0x2001,
+	0x196f, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804, 0x337e, 0x012e,
+	0x2021, 0x400c, 0x0804, 0x3380, 0x0016, 0x0026, 0x0036, 0x0046,
+	0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x7014, 0x2048,
+	0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005, 0x0904, 0x3a50,
+	0x2048, 0x1f04, 0x3a04, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494,
+	0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021,
+	0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e, 0x9086, 0x0103,
+	0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x9080, 0x001b, 0x080c, 0x48c3, 0x701f, 0x39f4, 0x00b0, 0x8906,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b,
+	0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f9f,
+	0x000e, 0x080c, 0x48c6, 0x701f, 0x39f4, 0x015e, 0x00de, 0x009e,
+	0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005,
+	0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118, 0x701f, 0x3ab5,
+	0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009, 0x007f,
+	0x080c, 0x620b, 0x0110, 0x9006, 0x0030, 0xb813, 0x00ff, 0xb817,
+	0xfffd, 0x080c, 0xbd2a, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e,
+	0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904, 0x33b0, 0x0016,
+	0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6,
+	0x0156, 0x701f, 0x3a87, 0x7007, 0x0003, 0x0804, 0x3a45, 0xa830,
+	0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x3380, 0x0076, 0xad10,
+	0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029,
+	0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8,
+	0x20a0, 0x0006, 0x080c, 0x0f9f, 0x000e, 0x080c, 0x48c6, 0x007e,
+	0x701f, 0x39f4, 0x7023, 0x0001, 0x0005, 0x0804, 0x337e, 0x0156,
+	0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833, 0x001e, 0x0010,
+	0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c, 0x487a, 0x001e,
+	0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58, 0x9006,
+	0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005, 0x0006, 0x00f6,
+	0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe, 0x000e, 0x0005,
+	0x2001, 0x196f, 0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6, 0x00c6,
+	0x2061, 0x0200, 0x2001, 0x197a, 0x2004, 0x601a, 0x2061, 0x0100,
+	0x2001, 0x1979, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x080c,
+	0x487a, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001,
+	0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2061,
+	0x0090, 0x2079, 0x0100, 0x2001, 0x1979, 0x2004, 0x6036, 0x2009,
+	0x0040, 0x080c, 0x2063, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
+	0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000, 0x78ca, 0x9006,
+	0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x080c,
+	0x487a, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a,
+	0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031, 0x2004, 0xa86a,
+	0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873, 0x0000,
+	0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300, 0x2003, 0x0000,
+	0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d,
+	0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff,
+	0x0148, 0x080c, 0x2830, 0x1130, 0x9006, 0x080c, 0x2787, 0x9006,
+	0x080c, 0x276a, 0x7884, 0x9084, 0x0007, 0x0002, 0x3b71, 0x3b7a,
+	0x3b83, 0x3b6e, 0x3b6e, 0x3b6e, 0x3b6e, 0x3b6e, 0x012e, 0x0804,
+	0x33b3, 0x2009, 0x0114, 0x2104, 0x9085, 0x0800, 0x200a, 0x080c,
+	0x3d45, 0x00c0, 0x2009, 0x0114, 0x2104, 0x9085, 0x4000, 0x200a,
+	0x080c, 0x3d45, 0x0078, 0x080c, 0x7096, 0x1128, 0x012e, 0x2009,
+	0x0016, 0x0804, 0x33b0, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b,
+	0x0804, 0x3380, 0x080c, 0x98bb, 0x0086, 0x0096, 0x00a6, 0x00b6,
+	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x389c, 0x2009, 0x0101,
+	0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060, 0x2058,
+	0x080c, 0x3fe6, 0x080c, 0x3f36, 0x903e, 0x2720, 0x00f6, 0x00e6,
+	0x0086, 0x2940, 0x2071, 0x19b7, 0x2079, 0x0090, 0x00d6, 0x2069,
+	0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0, 0x780a,
+	0x00de, 0x2011, 0x0001, 0x080c, 0x3e97, 0x080c, 0x2838, 0x080c,
+	0x2838, 0x080c, 0x2838, 0x080c, 0x2838, 0x080c, 0x3e97, 0x008e,
+	0x00ee, 0x00fe, 0x080c, 0x3dc4, 0x2009, 0x9c40, 0x8109, 0x11b0,
+	0x080c, 0x3cfb, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102,
+	0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
+	0x008e, 0x2009, 0x0017, 0x080c, 0x33b0, 0x0cf8, 0x2001, 0x020b,
+	0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000, 0x7884,
+	0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0150,
+	0x080c, 0x3da2, 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c, 0x3cfb,
+	0x0804, 0x3ca4, 0x080c, 0x3f0b, 0x080c, 0x3e2f, 0x080c, 0x3d85,
+	0x080c, 0x3dba, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac, 0x0130,
+	0x8b58, 0x080c, 0x3cfb, 0x00fe, 0x0804, 0x3ca4, 0x00fe, 0x080c,
+	0x3cf1, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001, 0x0033,
+	0x2502, 0x080c, 0x3cfb, 0x0080, 0x87ff, 0x0138, 0x2001, 0x0201,
+	0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001, 0x1a3b, 0x2004,
+	0x9086, 0x0000, 0x1904, 0x3bf4, 0x2001, 0x032f, 0x2003, 0x00f6,
+	0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904, 0x3ca4, 0x7884,
+	0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3ca4, 0xa013,
+	0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1148,
+	0x2001, 0x1a3b, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009,
+	0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016, 0x2800,
+	0xa05a, 0x2009, 0x0040, 0x080c, 0x2063, 0x2900, 0xa85a, 0xa813,
+	0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6, 0x20a9,
+	0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001, 0x0203, 0x2004,
+	0x1f04, 0x3c7b, 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0, 0x9005,
+	0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061, 0x0090,
+	0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a,
+	0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca,
+	0x00ce, 0x00fe, 0x0804, 0x3bae, 0x001e, 0x00c6, 0x2001, 0x032a,
+	0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x6106, 0x2011,
+	0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd,
+	0x2102, 0x080c, 0x12e1, 0x7884, 0x9084, 0x0003, 0x9086, 0x0002,
+	0x01b0, 0x2009, 0x0028, 0x080c, 0x2063, 0x2001, 0x0227, 0x200c,
+	0x2102, 0x6050, 0x9084, 0xb7ff, 0x080c, 0x28e2, 0x6052, 0x602f,
+	0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010, 0x080c,
+	0x98d7, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05, 0x9d05,
+	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e,
+	0x1118, 0x012e, 0x0804, 0x337e, 0x012e, 0x2021, 0x400c, 0x0804,
+	0x3380, 0x9085, 0x0001, 0x1d04, 0x3cfa, 0x2091, 0x6000, 0x8420,
+	0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, 0x0010, 0x2001,
+	0x032a, 0x2003, 0x0004, 0x2001, 0x1a3b, 0x2003, 0x0000, 0x0071,
+	0x2009, 0x0048, 0x080c, 0x2063, 0x2001, 0x0227, 0x2024, 0x2402,
+	0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005, 0x00f6, 0x00e6,
+	0x2071, 0x19b7, 0x7054, 0x9086, 0x0000, 0x0520, 0x2079, 0x0090,
+	0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120,
+	0x2009, 0x0040, 0x080c, 0x2063, 0x782c, 0xd0fc, 0x0d88, 0x080c,
+	0x3f0b, 0x7054, 0x9086, 0x0000, 0x1d58, 0x782b, 0x0004, 0x782c,
+	0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x2063, 0x782b, 0x0002,
+	0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100,
+	0x2001, 0x1817, 0x200c, 0x7932, 0x7936, 0x080c, 0x2486, 0x080c,
+	0x28af, 0x080c, 0x28e2, 0x784b, 0xf7f7, 0x7843, 0x0090, 0x7843,
+	0x0010, 0x7850, 0xc0e5, 0x7852, 0x2019, 0x61a8, 0x7820, 0xd09c,
+	0x0110, 0x8319, 0x1dd8, 0x7850, 0xc0e4, 0x7852, 0x2011, 0x0048,
+	0x080c, 0x288c, 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001, 0xa001,
+	0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2852, 0x2011, 0x0020,
+	0x080c, 0x288c, 0x7843, 0x0000, 0x9006, 0x080c, 0x2852, 0x2011,
+	0x0048, 0x080c, 0x288c, 0x00fe, 0x0005, 0x7884, 0xd0ac, 0x11c8,
+	0x00f6, 0x00e6, 0x2071, 0x1a3b, 0x2079, 0x0320, 0x2001, 0x0201,
+	0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000, 0x1140, 0x0051,
+	0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b, 0x0019, 0x00ee,
+	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c,
+	0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009, 0x0033, 0x250a,
+	0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4, 0x0108,
+	0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084, 0x0110,
+	0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, 0x2001,
+	0x197a, 0x2004, 0x70e2, 0x080c, 0x3ad6, 0x1188, 0x2001, 0x181f,
+	0x2004, 0x2009, 0x181e, 0x210c, 0x918c, 0x00ff, 0x706e, 0x716a,
+	0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109, 0x0080, 0x702c,
+	0x9085, 0x0002, 0x702e, 0x2009, 0x1817, 0x210c, 0x716e, 0x7063,
+	0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, 0x0809, 0x7077,
+	0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080, 0x8000, 0x7082,
+	0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab,
+	0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984, 0x9085, 0x0092,
+	0x7016, 0x080c, 0x3f0b, 0x00f6, 0x2071, 0x1a3b, 0x2079, 0x0320,
+	0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c, 0x780e,
+	0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109, 0x1df0, 0x792c,
+	0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011, 0x080c, 0x3e97,
+	0x2011, 0x0001, 0x080c, 0x3e97, 0x00fe, 0x00ee, 0x0005, 0x00f6,
+	0x00e6, 0x2071, 0x1a3b, 0x2079, 0x0320, 0x792c, 0xd1fc, 0x0904,
+	0x3e94, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904, 0x3e90, 0x7000,
+	0x0002, 0x3e94, 0x3e45, 0x3e75, 0x3e90, 0xd1bc, 0x1170, 0xd1dc,
+	0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c, 0x3e97, 0x0904,
+	0x3e94, 0x080c, 0x3e97, 0x0804, 0x3e94, 0x00f6, 0x2079, 0x0300,
+	0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b, 0x0004, 0x7812,
+	0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c, 0x3da2,
+	0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8, 0x00fe, 0xd0ec,
+	0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001, 0x7002, 0x9184,
+	0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x3e39, 0x2011, 0x0001,
+	0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086, 0x0015, 0x1120,
+	0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc, 0x1960, 0x0828,
+	0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0xa014,
+	0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016, 0xa058, 0x2048,
+	0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c, 0x938a, 0x0007,
+	0x1a0c, 0x0d65, 0x9398, 0x3ec5, 0x231d, 0x083f, 0x9080, 0x0004,
+	0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e, 0x908a, 0x0035,
+	0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a, 0x2001, 0x0019,
+	0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x3f02, 0x3ef9, 0x3ef0,
+	0x3ee7, 0x3ede, 0x3ed5, 0x3ecc, 0xa964, 0x7902, 0xa968, 0x7906,
+	0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974, 0x7902, 0xa978,
+	0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005, 0xa984, 0x7902,
+	0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916, 0x0005, 0xa994,
+	0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0, 0x7916, 0x0005,
+	0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912, 0xa9b0, 0x7916,
+	0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc, 0x7912, 0xa9c0,
+	0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906, 0xa9cc, 0x7912,
+	0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086, 0x2071, 0x19b7,
+	0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b, 0x0002, 0x2940,
+	0x9026, 0x7054, 0x0002, 0x3f32, 0x3f1e, 0x3f29, 0x8001, 0x7056,
+	0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x3e97, 0x190c, 0x3e97,
+	0x0048, 0x8001, 0x7056, 0x782c, 0xd0fc, 0x1d38, 0x2011, 0x0001,
+	0x080c, 0x3e97, 0x008e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6,
+	0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x197a, 0x2004, 0x601a,
+	0x2061, 0x0100, 0x2001, 0x1979, 0x2004, 0x60ce, 0x6104, 0xc1ac,
+	0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520, 0x2038, 0x2001,
+	0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c, 0x487a, 0xa813,
 	0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138,
 	0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048,
-	0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x3faf, 0x1d68, 0x2900,
-	0xa85a, 0x00d8, 0x080c, 0x4878, 0x2940, 0xa013, 0x0019, 0xa017,
-	0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066, 0x2001,
-	0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
-	0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a, 0x2003,
-	0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c, 0x918d,
-	0x0200, 0x2102, 0xa017, 0x0000, 0x2001, 0x1a3c, 0x2003, 0x0003,
-	0x2001, 0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003, 0x0000,
-	0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d,
-	0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x20a9,
-	0x0013, 0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004, 0x2009,
-	0x013c, 0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108, 0x0005,
-	0x0804, 0x338a, 0x7d98, 0x7c9c, 0x0804, 0x3481, 0x080c, 0x70b7,
-	0x190c, 0x5ca1, 0x2069, 0x1853, 0x2d00, 0x2009, 0x0030, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x48c1, 0x701f,
-	0x4082, 0x0005, 0x080c, 0x539c, 0x1130, 0x3b00, 0x3a08, 0xc194,
-	0xc095, 0x20d8, 0x21d0, 0x2069, 0x1853, 0x6800, 0x9005, 0x0904,
-	0x33bf, 0x6804, 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0138,
-	0x6200, 0x9292, 0x0005, 0x0218, 0x918c, 0xffdf, 0x0010, 0x918d,
-	0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104,
-	0x0118, 0x918d, 0x0010, 0x0010, 0x918c, 0xffef, 0x6106, 0x00ce,
-	0xd084, 0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04, 0x33bf, 0x9288,
-	0x318b, 0x210d, 0x918c, 0x00ff, 0x6162, 0xd0dc, 0x0130, 0x6828,
-	0x908a, 0x007f, 0x1a04, 0x33bf, 0x605a, 0x6888, 0x9084, 0x0030,
-	0x8004, 0x8004, 0x8004, 0x8004, 0x0006, 0x2009, 0x1982, 0x9080,
-	0x2560, 0x2005, 0x200a, 0x2008, 0x2001, 0x0018, 0x080c, 0x98b9,
-	0x2009, 0x0390, 0x200b, 0x0400, 0x000e, 0x2009, 0x1983, 0x9080,
-	0x2564, 0x2005, 0x200a, 0x6808, 0x908a, 0x0100, 0x0a04, 0x33bf,
-	0x908a, 0x0841, 0x1a04, 0x33bf, 0x9084, 0x0007, 0x1904, 0x33bf,
-	0x680c, 0x9005, 0x0904, 0x33bf, 0x6810, 0x9005, 0x0904, 0x33bf,
-	0x6848, 0x6940, 0x910a, 0x1a04, 0x33bf, 0x8001, 0x0904, 0x33bf,
-	0x684c, 0x6944, 0x910a, 0x1a04, 0x33bf, 0x8001, 0x0904, 0x33bf,
-	0x6814, 0x908c, 0x00ff, 0x614a, 0x8007, 0x9084, 0x00ff, 0x604e,
-	0x080c, 0x73e8, 0x080c, 0x6734, 0x080c, 0x6769, 0x6808, 0x602a,
-	0x080c, 0x1fc4, 0x2009, 0x0170, 0x200b, 0x0080, 0xa001, 0xa001,
-	0x200b, 0x0000, 0x0036, 0x6b08, 0x080c, 0x24c7, 0x003e, 0x6000,
-	0x9086, 0x0000, 0x1904, 0x41ee, 0x6818, 0x691c, 0x6a20, 0x6b24,
-	0x8007, 0x810f, 0x8217, 0x831f, 0x6016, 0x611a, 0x621e, 0x6322,
-	0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007,
-	0x810f, 0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff, 0x6006, 0x610a,
-	0x620e, 0x6312, 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9, 0x0004,
-	0x20a1, 0x1984, 0x20e9, 0x0001, 0x4001, 0x20a9, 0x0004, 0x20a1,
-	0x199e, 0x20e9, 0x0001, 0x4001, 0x080c, 0x82d0, 0x00c6, 0x900e,
-	0x20a9, 0x0001, 0x6b70, 0xd384, 0x01c8, 0x0020, 0x839d, 0x12b0,
-	0x3508, 0x8109, 0x080c, 0x79be, 0x6878, 0x6016, 0x6874, 0x2008,
-	0x9084, 0xff00, 0x8007, 0x600a, 0x9184, 0x00ff, 0x6006, 0x8108,
-	0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x1f04, 0x4166,
-	0x00ce, 0x00c6, 0x2061, 0x196d, 0x2063, 0x0001, 0x9006, 0x080c,
-	0x276e, 0x9006, 0x080c, 0x2751, 0x0000, 0x00ce, 0x00e6, 0x2c70,
-	0x080c, 0x0e9c, 0x00ee, 0x6888, 0xd0ec, 0x0130, 0x2011, 0x0114,
-	0x2204, 0x9085, 0x0180, 0x2012, 0x6a80, 0x9284, 0x0030, 0x9086,
-	0x0030, 0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82, 0x2001,
-	0x194d, 0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170, 0x928e,
-	0x0010, 0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c,
-	0x253c, 0x2001, 0x193e, 0x2102, 0x0008, 0x2102, 0x00c6, 0x2061,
-	0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, 0x70b7,
-	0x0128, 0x080c, 0x4c91, 0x0110, 0x080c, 0x248d, 0x60d0, 0x9005,
-	0x01c0, 0x6003, 0x0001, 0x2009, 0x41d6, 0x00d0, 0x080c, 0x70b7,
-	0x1168, 0x2011, 0x6f2d, 0x080c, 0x8159, 0x2011, 0x6f20, 0x080c,
-	0x825f, 0x080c, 0x73bc, 0x080c, 0x6fe8, 0x0040, 0x080c, 0x5b97,
-	0x0028, 0x6003, 0x0004, 0x2009, 0x41ee, 0x0010, 0x0804, 0x338a,
-	0x2001, 0x0170, 0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, 0x1118,
-	0x2091, 0x31bd, 0x0817, 0x2091, 0x313d, 0x0817, 0x6000, 0x9086,
-	0x0000, 0x0904, 0x33bc, 0x2069, 0x1853, 0x7890, 0x6842, 0x7894,
-	0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0x2039, 0x0001, 0x0804, 0x48c4, 0x9006, 0x080c, 0x248d, 0x81ff,
-	0x1904, 0x33bc, 0x080c, 0x70b7, 0x11b0, 0x080c, 0x73b7, 0x080c,
-	0x5cdc, 0x080c, 0x3186, 0x0118, 0x6130, 0xc18d, 0x6132, 0x080c,
-	0xbf61, 0x0130, 0x080c, 0x70da, 0x1118, 0x080c, 0x708b, 0x0038,
-	0x080c, 0x6fe8, 0x0020, 0x080c, 0x5ca1, 0x080c, 0x5b97, 0x0804,
-	0x338a, 0x81ff, 0x1904, 0x33bc, 0x080c, 0x70b7, 0x1110, 0x0804,
-	0x33bc, 0x6190, 0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, 0x1d80,
-	0x2009, 0x0040, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091,
-	0x8000, 0x2039, 0x0001, 0x080c, 0x48c4, 0x701f, 0x3388, 0x012e,
-	0x0005, 0x704f, 0x0001, 0x00d6, 0x2069, 0x1d80, 0x20a9, 0x0040,
-	0x20e9, 0x0001, 0x20a1, 0x1d80, 0x2019, 0xffff, 0x4304, 0x6558,
-	0x9588, 0x318b, 0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, 0x2011,
-	0x0002, 0x2100, 0x9506, 0x01a8, 0x080c, 0x6270, 0x1190, 0xb814,
-	0x821c, 0x0238, 0x9398, 0x1d80, 0x9085, 0xff00, 0x8007, 0x201a,
-	0x0038, 0x9398, 0x1d80, 0x2324, 0x94a4, 0xff00, 0x9405, 0x201a,
-	0x8210, 0x8108, 0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007,
-	0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0x1d80,
-	0x2099, 0x1d80, 0x080c, 0x5c2c, 0x0804, 0x4246, 0x080c, 0x48ab,
-	0x0904, 0x33bf, 0x080c, 0x4878, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x33bc, 0x080c, 0x538d, 0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e,
-	0x0538, 0x908e, 0x007f, 0x0520, 0x908e, 0x0080, 0x0508, 0x080c,
-	0x3181, 0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff,
-	0x9086, 0x0006, 0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
-	0x080c, 0xba16, 0x1120, 0x2009, 0x0003, 0x0804, 0x33bc, 0x7007,
-	0x0003, 0x701f, 0x42d4, 0x0005, 0x080c, 0x48ab, 0x0904, 0x33bf,
-	0x20a9, 0x002b, 0xb8b4, 0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080,
-	0x0006, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098,
-	0x080c, 0x0f9f, 0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a,
-	0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c,
-	0x0f9f, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0x0804, 0x48c4, 0x81ff, 0x1904, 0x33bc, 0x080c, 0x488f, 0x0904,
-	0x33bf, 0x080c, 0x64b1, 0x0904, 0x33bc, 0x0058, 0xa878, 0x9005,
-	0x0120, 0x2009, 0x0004, 0x0804, 0x33bc, 0xa974, 0xaa94, 0x0804,
-	0x338a, 0x080c, 0x5395, 0x0904, 0x338a, 0x701f, 0x431e, 0x7007,
-	0x0003, 0x0005, 0x81ff, 0x1904, 0x33bc, 0x7888, 0x908a, 0x1000,
-	0x1a04, 0x33bf, 0x080c, 0x48ab, 0x0904, 0x33bf, 0x080c, 0x6667,
-	0x0120, 0x080c, 0x666f, 0x1904, 0x33bf, 0x080c, 0x6536, 0x0904,
-	0x33bc, 0x2019, 0x0004, 0x900e, 0x080c, 0x64c3, 0x0904, 0x33bc,
-	0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8,
-	0x080c, 0x48a9, 0x01e0, 0x080c, 0x6667, 0x0118, 0x080c, 0x666f,
-	0x11b0, 0x080c, 0x6536, 0x2009, 0x0002, 0x0168, 0x2009, 0x0002,
-	0x2019, 0x0004, 0x080c, 0x64c3, 0x2009, 0x0003, 0x0120, 0xa998,
-	0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
-	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
-	0x4000, 0x080c, 0x5395, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, 0x0071,
-	0x0060, 0x2029, 0x007e, 0x2061, 0x1800, 0x6458, 0x2400, 0x9506,
-	0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x6270,
-	0x1138, 0x2200, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x8167,
-	0x0005, 0x81ff, 0x1904, 0x33bc, 0x798c, 0x2001, 0x1951, 0x918c,
-	0x8000, 0x2102, 0x080c, 0x488f, 0x0904, 0x33bf, 0x080c, 0x6667,
-	0x0120, 0x080c, 0x666f, 0x1904, 0x33bf, 0x080c, 0x6337, 0x0904,
-	0x33bc, 0x080c, 0x64ba, 0x0904, 0x33bc, 0x2001, 0x1951, 0x2004,
-	0xd0fc, 0x1904, 0x338a, 0x0804, 0x4329, 0xa9a0, 0x2001, 0x1951,
-	0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x489c, 0x01a0, 0x080c,
-	0x6667, 0x0118, 0x080c, 0x666f, 0x1170, 0x080c, 0x6337, 0x2009,
-	0x0002, 0x0128, 0x080c, 0x64ba, 0x1170, 0x2009, 0x0003, 0xa897,
-	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x1951, 0x2004,
-	0xd0fc, 0x1128, 0x080c, 0x5395, 0x0110, 0x9006, 0x0018, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, 0x33bc,
-	0x798c, 0x2001, 0x1950, 0x918c, 0x8000, 0x2102, 0x080c, 0x488f,
-	0x0904, 0x33bf, 0x080c, 0x6667, 0x0120, 0x080c, 0x666f, 0x1904,
-	0x33bf, 0x080c, 0x6337, 0x0904, 0x33bc, 0x080c, 0x64a8, 0x0904,
-	0x33bc, 0x2001, 0x1950, 0x2004, 0xd0fc, 0x1904, 0x338a, 0x0804,
-	0x4329, 0xa9a0, 0x2001, 0x1950, 0x918c, 0x8000, 0xc18d, 0x2102,
-	0x080c, 0x489c, 0x01a0, 0x080c, 0x6667, 0x0118, 0x080c, 0x666f,
-	0x1170, 0x080c, 0x6337, 0x2009, 0x0002, 0x0128, 0x080c, 0x64a8,
-	0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
+	0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x3fae, 0x1d68, 0x2900,
+	0xa85a, 0x00d0, 0x080c, 0x487a, 0xa813, 0x0019, 0xa817, 0x0001,
+	0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f,
+	0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e,
+	0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090, 0x2079, 0x0100,
+	0x2001, 0x1979, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x2063,
+	0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001,
+	0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x9006, 0x600a,
+	0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x2071,
+	0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088,
+	0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a, 0x700e, 0x810b,
+	0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041, 0x702c, 0xd0fc,
+	0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005, 0x7400, 0x7304,
+	0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086, 0x080c, 0x487a,
+	0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006, 0xa05a, 0x00ae,
+	0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x2001,
+	0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001, 0x0030, 0x2024,
+	0x2001, 0x0031, 0x201c, 0x080c, 0x487a, 0x2940, 0xa813, 0x0019,
+	0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, 0x2009,
+	0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c,
+	0x9080, 0x0019, 0x009e, 0x080c, 0x3fae, 0x1d68, 0x2900, 0xa85a,
+	0x00d8, 0x080c, 0x487a, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001,
+	0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066, 0x2001, 0x0031,
+	0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa06e,
+	0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a, 0x2003, 0x0004,
+	0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c, 0x918d, 0x0200,
+	0x2102, 0xa017, 0x0000, 0x2001, 0x1a3b, 0x2003, 0x0003, 0x2001,
+	0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003, 0x0000, 0x2001,
+	0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, 0x0002,
+	0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0013,
+	0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004, 0x2009, 0x013c,
+	0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108, 0x0005, 0x0804,
+	0x337e, 0x7d98, 0x7c9c, 0x0804, 0x3480, 0x080c, 0x7096, 0x190c,
+	0x5c9c, 0x2069, 0x1853, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x48c3, 0x701f, 0x4081,
+	0x0005, 0x080c, 0x5397, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095,
+	0x20d8, 0x21d0, 0x2069, 0x1853, 0x6800, 0x9005, 0x0904, 0x33b3,
+	0x6804, 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0138, 0x6200,
+	0x9292, 0x0005, 0x0218, 0x918c, 0xffdf, 0x0010, 0x918d, 0x0020,
+	0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0118,
+	0x918d, 0x0010, 0x0010, 0x918c, 0xffef, 0x6106, 0x00ce, 0xd084,
+	0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04, 0x33b3, 0x9288, 0x317f,
+	0x210d, 0x918c, 0x00ff, 0x6162, 0xd0dc, 0x0130, 0x6828, 0x908a,
+	0x007f, 0x1a04, 0x33b3, 0x605a, 0x6888, 0x9084, 0x0030, 0x8004,
+	0x8004, 0x8004, 0x8004, 0x0006, 0x2009, 0x1981, 0x9080, 0x2579,
+	0x2005, 0x200a, 0x2008, 0x2001, 0x0018, 0x080c, 0x98ac, 0x2009,
+	0x0390, 0x200b, 0x0400, 0x000e, 0x2009, 0x1982, 0x9080, 0x257d,
+	0x2005, 0x200a, 0x6808, 0x908a, 0x0100, 0x0a04, 0x33b3, 0x908a,
+	0x0841, 0x1a04, 0x33b3, 0x9084, 0x0007, 0x1904, 0x33b3, 0x680c,
+	0x9005, 0x0904, 0x33b3, 0x6810, 0x9005, 0x0904, 0x33b3, 0x6848,
+	0x6940, 0x910a, 0x1a04, 0x33b3, 0x8001, 0x0904, 0x33b3, 0x684c,
+	0x6944, 0x910a, 0x1a04, 0x33b3, 0x8001, 0x0904, 0x33b3, 0x6814,
+	0x908c, 0x00ff, 0x614a, 0x8007, 0x9084, 0x00ff, 0x604e, 0x080c,
+	0x73c7, 0x080c, 0x672f, 0x080c, 0x6764, 0x6808, 0x602a, 0x080c,
+	0x1fd5, 0x2009, 0x0170, 0x200b, 0x0080, 0xa001, 0xa001, 0x200b,
+	0x0000, 0x0036, 0x6b08, 0x080c, 0x24e0, 0x003e, 0x6000, 0x9086,
+	0x0000, 0x1904, 0x41ed, 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007,
+	0x810f, 0x8217, 0x831f, 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04,
+	0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f,
+	0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff, 0x6006, 0x610a, 0x620e,
+	0x6312, 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1,
+	0x1983, 0x20e9, 0x0001, 0x4001, 0x20a9, 0x0004, 0x20a1, 0x199d,
+	0x20e9, 0x0001, 0x4001, 0x080c, 0x82af, 0x00c6, 0x900e, 0x20a9,
+	0x0001, 0x6b70, 0xd384, 0x01c8, 0x0020, 0x839d, 0x12b0, 0x3508,
+	0x8109, 0x080c, 0x799d, 0x6878, 0x6016, 0x6874, 0x2008, 0x9084,
+	0xff00, 0x8007, 0x600a, 0x9184, 0x00ff, 0x6006, 0x8108, 0x1118,
+	0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x1f04, 0x4165, 0x00ce,
+	0x00c6, 0x2061, 0x196c, 0x2063, 0x0001, 0x9006, 0x080c, 0x2787,
+	0x9006, 0x080c, 0x276a, 0x0000, 0x00ce, 0x00e6, 0x2c70, 0x080c,
+	0x0e9c, 0x00ee, 0x6888, 0xd0ec, 0x0130, 0x2011, 0x0114, 0x2204,
+	0x9085, 0x0180, 0x2012, 0x6a80, 0x9284, 0x0030, 0x9086, 0x0030,
+	0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82, 0x2001, 0x194c,
+	0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170, 0x928e, 0x0010,
+	0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c, 0x2555,
+	0x2001, 0x193d, 0x2102, 0x0008, 0x2102, 0x00c6, 0x2061, 0x0100,
+	0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, 0x7096, 0x0128,
+	0x080c, 0x4c8c, 0x0110, 0x080c, 0x24a6, 0x60d0, 0x9005, 0x01c0,
+	0x6003, 0x0001, 0x2009, 0x41d5, 0x00d0, 0x080c, 0x7096, 0x1168,
+	0x2011, 0x6f0c, 0x080c, 0x8138, 0x2011, 0x6eff, 0x080c, 0x823e,
+	0x080c, 0x739b, 0x080c, 0x6fc7, 0x0040, 0x080c, 0x5b92, 0x0028,
+	0x6003, 0x0004, 0x2009, 0x41ed, 0x0010, 0x0804, 0x337e, 0x2001,
+	0x0170, 0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, 0x1118, 0x2091,
+	0x31bd, 0x0817, 0x2091, 0x313d, 0x0817, 0x6000, 0x9086, 0x0000,
+	0x0904, 0x33b0, 0x2069, 0x1853, 0x7890, 0x6842, 0x7894, 0x6846,
+	0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039,
+	0x0001, 0x0804, 0x48c6, 0x9006, 0x080c, 0x24a6, 0x81ff, 0x1904,
+	0x33b0, 0x080c, 0x7096, 0x11b0, 0x080c, 0x7396, 0x080c, 0x5cd7,
+	0x080c, 0x317a, 0x0118, 0x6130, 0xc18d, 0x6132, 0x080c, 0xbf61,
+	0x0130, 0x080c, 0x70b9, 0x1118, 0x080c, 0x706a, 0x0038, 0x080c,
+	0x6fc7, 0x0020, 0x080c, 0x5c9c, 0x080c, 0x5b92, 0x0804, 0x337e,
+	0x81ff, 0x1904, 0x33b0, 0x080c, 0x7096, 0x1110, 0x0804, 0x33b0,
+	0x6190, 0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, 0x1d80, 0x2009,
+	0x0040, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091, 0x8000,
+	0x2039, 0x0001, 0x080c, 0x48c6, 0x701f, 0x337c, 0x012e, 0x0005,
+	0x704f, 0x0001, 0x00d6, 0x2069, 0x1d80, 0x20a9, 0x0040, 0x20e9,
+	0x0001, 0x20a1, 0x1d80, 0x2019, 0xffff, 0x4304, 0x6558, 0x9588,
+	0x317f, 0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, 0x2011, 0x0002,
+	0x2100, 0x9506, 0x01a8, 0x080c, 0x626b, 0x1190, 0xb814, 0x821c,
+	0x0238, 0x9398, 0x1d80, 0x9085, 0xff00, 0x8007, 0x201a, 0x0038,
+	0x9398, 0x1d80, 0x2324, 0x94a4, 0xff00, 0x9405, 0x201a, 0x8210,
+	0x8108, 0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007, 0x2d0c,
+	0x9105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0x1d80, 0x2099,
+	0x1d80, 0x080c, 0x5c27, 0x0804, 0x4245, 0x080c, 0x48ad, 0x0904,
+	0x33b3, 0x080c, 0x487a, 0x1120, 0x2009, 0x0002, 0x0804, 0x33b0,
+	0x080c, 0x5388, 0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e, 0x0538,
+	0x908e, 0x007f, 0x0520, 0x908e, 0x0080, 0x0508, 0x080c, 0x3175,
+	0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c,
+	0xba11, 0x1120, 0x2009, 0x0003, 0x0804, 0x33b0, 0x7007, 0x0003,
+	0x701f, 0x42d3, 0x0005, 0x080c, 0x48ad, 0x0904, 0x33b3, 0x20a9,
+	0x002b, 0xb8b4, 0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006,
+	0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x080c,
+	0x0f9f, 0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a, 0x20a0,
+	0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f9f,
+	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804,
+	0x48c6, 0x81ff, 0x1904, 0x33b0, 0x080c, 0x4891, 0x0904, 0x33b3,
+	0x080c, 0x64b0, 0x0904, 0x33b0, 0x0058, 0xa878, 0x9005, 0x0120,
+	0x2009, 0x0004, 0x0804, 0x33b0, 0xa974, 0xaa94, 0x0804, 0x337e,
+	0x080c, 0x5390, 0x0904, 0x337e, 0x701f, 0x431d, 0x7007, 0x0003,
+	0x0005, 0x81ff, 0x1904, 0x33b0, 0x7888, 0x908a, 0x1000, 0x1a04,
+	0x33b3, 0x080c, 0x48ad, 0x0904, 0x33b3, 0x080c, 0x6666, 0x0120,
+	0x080c, 0x666e, 0x1904, 0x33b3, 0x080c, 0x6535, 0x0904, 0x33b0,
+	0x2019, 0x0004, 0x900e, 0x080c, 0x64c2, 0x0904, 0x33b0, 0x7984,
+	0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8, 0x080c,
+	0x48ab, 0x01e0, 0x080c, 0x6666, 0x0118, 0x080c, 0x666e, 0x11b0,
+	0x080c, 0x6535, 0x2009, 0x0002, 0x0168, 0x2009, 0x0002, 0x2019,
+	0x0004, 0x080c, 0x64c2, 0x2009, 0x0003, 0x0120, 0xa998, 0xaa9c,
+	0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
+	0x080c, 0x5390, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, 0x0071, 0x0060,
+	0x2029, 0x007e, 0x2061, 0x1800, 0x6458, 0x2400, 0x9506, 0x0110,
+	0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x626b, 0x1138,
+	0x2200, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x8146, 0x0005,
+	0x81ff, 0x1904, 0x33b0, 0x798c, 0x2001, 0x1950, 0x918c, 0x8000,
+	0x2102, 0x080c, 0x4891, 0x0904, 0x33b3, 0x080c, 0x6666, 0x0120,
+	0x080c, 0x666e, 0x1904, 0x33b3, 0x080c, 0x6332, 0x0904, 0x33b0,
+	0x080c, 0x64b9, 0x0904, 0x33b0, 0x2001, 0x1950, 0x2004, 0xd0fc,
+	0x1904, 0x337e, 0x0804, 0x4328, 0xa9a0, 0x2001, 0x1950, 0x918c,
+	0x8000, 0xc18d, 0x2102, 0x080c, 0x489e, 0x01a0, 0x080c, 0x6666,
+	0x0118, 0x080c, 0x666e, 0x1170, 0x080c, 0x6332, 0x2009, 0x0002,
+	0x0128, 0x080c, 0x64b9, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005,
+	0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x1950, 0x2004, 0xd0fc,
+	0x1128, 0x080c, 0x5390, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, 0x33b0, 0x798c,
+	0x2001, 0x194f, 0x918c, 0x8000, 0x2102, 0x080c, 0x4891, 0x0904,
+	0x33b3, 0x080c, 0x6666, 0x0120, 0x080c, 0x666e, 0x1904, 0x33b3,
+	0x080c, 0x6332, 0x0904, 0x33b0, 0x080c, 0x64a7, 0x0904, 0x33b0,
+	0x2001, 0x194f, 0x2004, 0xd0fc, 0x1904, 0x337e, 0x0804, 0x4328,
+	0xa9a0, 0x2001, 0x194f, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c,
+	0x489e, 0x01a0, 0x080c, 0x6666, 0x0118, 0x080c, 0x666e, 0x1170,
+	0x080c, 0x6332, 0x2009, 0x0002, 0x0128, 0x080c, 0x64a7, 0x1170,
+	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
+	0x2001, 0x194f, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x5390, 0x0110,
+	0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005,
+	0x6100, 0x0804, 0x337e, 0x080c, 0x48ad, 0x0904, 0x33b3, 0x080c,
+	0x539c, 0x1904, 0x33b0, 0x79a8, 0xd184, 0x1158, 0xb834, 0x8007,
+	0x789e, 0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28, 0x8217,
+	0x0050, 0xb824, 0x8007, 0x789e, 0xb820, 0x8007, 0x789a, 0xbb1c,
+	0x831f, 0xba18, 0x8217, 0xb900, 0x918c, 0x0200, 0x0804, 0x337e,
+	0x78a8, 0x909c, 0x0003, 0xd0b4, 0x1140, 0x939a, 0x0003, 0x1a04,
+	0x33b0, 0x6258, 0x7884, 0x9206, 0x1560, 0x2031, 0x1848, 0x2009,
+	0x013c, 0x2136, 0x2001, 0x1840, 0x2009, 0x000c, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0006, 0x78a8, 0x9084, 0x0080,
+	0x1118, 0x000e, 0x0804, 0x48c6, 0x000e, 0x2031, 0x0000, 0x2061,
+	0x18ae, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392,
+	0xa496, 0xa59a, 0x080c, 0x1117, 0x7007, 0x0002, 0x701f, 0x44e1,
+	0x0005, 0x81ff, 0x1904, 0x33b0, 0x080c, 0x48ad, 0x0904, 0x33b3,
+	0x080c, 0x6666, 0x1904, 0x33b0, 0x00c6, 0x080c, 0x487a, 0x00ce,
+	0x0904, 0x33b0, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8,
+	0x080c, 0xb9b7, 0x0904, 0x33b0, 0x7007, 0x0003, 0x701f, 0x44e5,
+	0x0005, 0x080c, 0x4053, 0x0804, 0x337e, 0xa830, 0x9086, 0x0100,
+	0x0904, 0x33b0, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x001b, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c,
+	0x7d98, 0x0804, 0x48c6, 0x9006, 0x080c, 0x24a6, 0x78a8, 0x9084,
+	0x00ff, 0x9086, 0x00ff, 0x0118, 0x81ff, 0x1904, 0x33b0, 0x080c,
+	0x7096, 0x0110, 0x080c, 0x5c9c, 0x7888, 0x908a, 0x1000, 0x1a04,
+	0x33b3, 0x7984, 0x9186, 0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04,
+	0x33b3, 0x2100, 0x080c, 0x2470, 0x0026, 0x00c6, 0x0126, 0x2091,
+	0x8000, 0x2061, 0x19d3, 0x601b, 0x0000, 0x601f, 0x0000, 0x6073,
+	0x0000, 0x6077, 0x0000, 0x080c, 0x7096, 0x1158, 0x080c, 0x7396,
+	0x080c, 0x5cd7, 0x9085, 0x0001, 0x080c, 0x70dd, 0x080c, 0x6fc7,
+	0x00f0, 0x080c, 0x98bb, 0x080c, 0x9b60, 0x080c, 0x98d7, 0x2061,
+	0x0100, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x810f, 0x9105,
+	0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1969, 0x200b,
+	0x0000, 0x2009, 0x002d, 0x2011, 0x5bc2, 0x080c, 0x81fc, 0x7984,
+	0x080c, 0x7096, 0x1110, 0x2009, 0x00ff, 0x7a88, 0x080c, 0x438b,
+	0x012e, 0x00ce, 0x002e, 0x0804, 0x337e, 0x7984, 0x080c, 0x620b,
+	0x2b08, 0x1904, 0x33b3, 0x0804, 0x337e, 0x81ff, 0x0120, 0x2009,
+	0x0001, 0x0804, 0x33b0, 0x60d8, 0xd0ac, 0x1130, 0xd09c, 0x1120,
+	0x2009, 0x0005, 0x0804, 0x33b0, 0x080c, 0x487a, 0x1120, 0x2009,
+	0x0002, 0x0804, 0x33b0, 0x7984, 0x9192, 0x0021, 0x1a04, 0x33b3,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0x702a,
+	0xaf60, 0x7736, 0x080c, 0x48c3, 0x701f, 0x459d, 0x7880, 0x9086,
+	0x006e, 0x0110, 0x701f, 0x4e3e, 0x0005, 0x2009, 0x0080, 0x080c,
+	0x626b, 0x1118, 0x080c, 0x6666, 0x0120, 0x2021, 0x400a, 0x0804,
+	0x3380, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70, 0xac74, 0xad78,
+	0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x4636, 0x90be, 0x0112,
+	0x0904, 0x4636, 0x90be, 0x0113, 0x0904, 0x4636, 0x90be, 0x0114,
+	0x0904, 0x4636, 0x90be, 0x0117, 0x0904, 0x4636, 0x90be, 0x011a,
+	0x0904, 0x4636, 0x90be, 0x011c, 0x0904, 0x4636, 0x90be, 0x0121,
+	0x0904, 0x461d, 0x90be, 0x0131, 0x0904, 0x461d, 0x90be, 0x0171,
+	0x0904, 0x4636, 0x90be, 0x0173, 0x0904, 0x4636, 0x90be, 0x01a1,
+	0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x4641, 0x90be, 0x0212,
+	0x0904, 0x462a, 0x90be, 0x0213, 0x05e8, 0x90be, 0x0214, 0x0500,
+	0x90be, 0x0217, 0x0188, 0x90be, 0x021a, 0x1120, 0xa89c, 0x8007,
+	0xa89e, 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be, 0x0300, 0x05b0,
+	0x009e, 0x00de, 0x0804, 0x33b3, 0x7028, 0x9080, 0x0010, 0x2098,
+	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007, 0x080c, 0x467f,
+	0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8,
+	0x20a9, 0x0001, 0x080c, 0x467f, 0x00c8, 0x7028, 0x9080, 0x000c,
+	0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c,
+	0x468c, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034,
+	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x468c, 0x7028, 0x9080,
+	0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001,
+	0x04f1, 0x00c6, 0x080c, 0x487a, 0x0550, 0xa868, 0xc0fd, 0xa86a,
+	0xa867, 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020, 0xa88b, 0x0001,
+	0x810b, 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe, 0xadc2, 0xa9c6,
+	0xa8ca, 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822, 0xa868, 0xc0fd,
+	0xa86a, 0xa804, 0x2048, 0x080c, 0xb9d2, 0x1120, 0x2009, 0x0003,
+	0x0804, 0x33b0, 0x7007, 0x0003, 0x701f, 0x4676, 0x0005, 0x00ce,
+	0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x33b0, 0xa820, 0x9086,
+	0x8001, 0x1904, 0x337e, 0x2009, 0x0004, 0x0804, 0x33b0, 0x0016,
+	0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104, 0x4004, 0x8211,
+	0x1dc8, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0036, 0x0046,
+	0x3520, 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204, 0x4104, 0x4004,
+	0x8421, 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x81ff,
+	0x0120, 0x2009, 0x0001, 0x0804, 0x33b0, 0x60d8, 0xd0ac, 0x1160,
+	0xd09c, 0x0120, 0x2009, 0x0016, 0x0804, 0x33b0, 0xd09c, 0x1120,
+	0x2009, 0x0005, 0x0804, 0x33b0, 0x7984, 0x78a8, 0x2040, 0x080c,
+	0x9b59, 0x1120, 0x9182, 0x007f, 0x0a04, 0x33b3, 0x9186, 0x00ff,
+	0x0904, 0x33b3, 0x9182, 0x0800, 0x1a04, 0x33b3, 0x7a8c, 0x7b88,
+	0x6078, 0x9306, 0x1158, 0x607c, 0x924e, 0x0904, 0x33b3, 0x080c,
+	0x9b59, 0x1120, 0x99cc, 0xff00, 0x0904, 0x33b3, 0x0126, 0x2091,
+	0x8000, 0x0026, 0x2011, 0x8008, 0x080c, 0x668a, 0x002e, 0x0140,
+	0x918d, 0x8000, 0x080c, 0x66d4, 0x1118, 0x2001, 0x4009, 0x0458,
+	0x080c, 0x4794, 0x0560, 0x90c6, 0x4000, 0x1170, 0x00c6, 0x0006,
+	0x900e, 0x080c, 0x655e, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
+	0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110, 0x2408,
+	0x0090, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0060, 0x90c6,
+	0x4009, 0x1108, 0x0040, 0x90c6, 0x4006, 0x1108, 0x0020, 0x2001,
+	0x4005, 0x2009, 0x000a, 0x2020, 0x012e, 0x0804, 0x3380, 0x2b00,
+	0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0x9c49,
+	0x0904, 0x4761, 0x2b00, 0x6012, 0x080c, 0xbcdb, 0x2e58, 0x00ee,
+	0x00e6, 0x00c6, 0x080c, 0x487a, 0x00ce, 0x2b70, 0x1158, 0x080c,
+	0x9bda, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002,
+	0x0804, 0x33b0, 0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932,
+	0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x080c, 0x300e,
+	0x6023, 0x0001, 0x9006, 0x080c, 0x61a8, 0x2001, 0x0002, 0x080c,
+	0x61bc, 0x2009, 0x0002, 0x080c, 0x9c76, 0x78a8, 0xd094, 0x0138,
+	0x00ee, 0x7024, 0x00e6, 0x2058, 0xb8c4, 0xc08d, 0xb8c6, 0x9085,
+	0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009,
+	0x0003, 0x0804, 0x33b0, 0x7007, 0x0003, 0x701f, 0x4770, 0x0005,
+	0xa830, 0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804,
+	0x3380, 0x9086, 0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004,
+	0xba04, 0x9294, 0x00ff, 0x0804, 0x52e5, 0x900e, 0xa868, 0xd0f4,
+	0x1904, 0x337e, 0x080c, 0x655e, 0x1108, 0xc185, 0xb800, 0xd0bc,
+	0x0108, 0xc18d, 0x0804, 0x337e, 0x00e6, 0x00d6, 0x0096, 0x83ff,
+	0x0904, 0x47dc, 0x902e, 0x080c, 0x9b59, 0x0130, 0x9026, 0x20a9,
+	0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781,
+	0x2071, 0x107f, 0x2e04, 0x9005, 0x11b0, 0x2100, 0x9406, 0x15e8,
+	0x2428, 0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd, 0x1528, 0x0030,
+	0x94ce, 0x0080, 0x1130, 0x92ce, 0xfffc, 0x11f0, 0x93ce, 0x00ff,
+	0x11d8, 0xc5fd, 0x0450, 0x2058, 0xbf10, 0x2700, 0x9306, 0x11b8,
+	0xbe14, 0x2600, 0x9206, 0x1198, 0x2400, 0x9106, 0x1150, 0xd884,
+	0x0568, 0xd894, 0x1558, 0x080c, 0x6666, 0x1540, 0x2001, 0x4000,
+	0x0430, 0x2001, 0x4007, 0x0418, 0x2001, 0x4006, 0x0400, 0x2400,
+	0x9106, 0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0948, 0x080c,
+	0x9b59, 0x1930, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04,
+	0x47aa, 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001,
+	0x0030, 0x080c, 0x620b, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005,
+	0x009e, 0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x33b0, 0x080c, 0x487a, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x33b0, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005,
+	0x0904, 0x33b3, 0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04,
+	0x33b3, 0x2010, 0x2918, 0x080c, 0x2fae, 0x1120, 0x2009, 0x0003,
+	0x0804, 0x33b0, 0x7007, 0x0003, 0x701f, 0x482f, 0x0005, 0xa830,
+	0x9086, 0x0100, 0x1904, 0x337e, 0x2009, 0x0004, 0x0804, 0x33b0,
+	0x7984, 0x080c, 0x9b59, 0x1120, 0x9182, 0x007f, 0x0a04, 0x33b3,
+	0x9186, 0x00ff, 0x0904, 0x33b3, 0x9182, 0x0800, 0x1a04, 0x33b3,
+	0x2001, 0x9000, 0x080c, 0x5340, 0x1904, 0x33b0, 0x0804, 0x337e,
+	0xa998, 0x080c, 0x9b59, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186,
+	0x00ff, 0x0168, 0x9182, 0x0800, 0x1250, 0x2001, 0x9000, 0x080c,
+	0x5340, 0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
 	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
-	0x4000, 0x2001, 0x1950, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x5395,
-	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
-	0x0005, 0x6100, 0x0804, 0x338a, 0x080c, 0x48ab, 0x0904, 0x33bf,
-	0x080c, 0x53a1, 0x1904, 0x33bc, 0x79a8, 0xd184, 0x1158, 0xb834,
-	0x8007, 0x789e, 0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28,
-	0x8217, 0x0050, 0xb824, 0x8007, 0x789e, 0xb820, 0x8007, 0x789a,
-	0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900, 0x918c, 0x0200, 0x0804,
-	0x338a, 0x78a8, 0x909c, 0x0003, 0xd0b4, 0x1140, 0x939a, 0x0003,
-	0x1a04, 0x33bc, 0x6258, 0x7884, 0x9206, 0x1560, 0x2031, 0x1848,
-	0x2009, 0x013c, 0x2136, 0x2001, 0x1840, 0x2009, 0x000c, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0006, 0x78a8, 0x9084,
-	0x0080, 0x1118, 0x000e, 0x0804, 0x48c4, 0x000e, 0x2031, 0x0000,
+	0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x2009,
+	0x000a, 0x0c48, 0x080c, 0x1022, 0x0198, 0x9006, 0xa802, 0x7014,
+	0x9005, 0x1120, 0x2900, 0x7016, 0x701a, 0x0040, 0x7018, 0xa802,
+	0x0086, 0x2040, 0x2900, 0xa006, 0x701a, 0x008e, 0x9085, 0x0001,
+	0x0005, 0x7984, 0x080c, 0x626b, 0x1130, 0x7e88, 0x9684, 0x3fff,
+	0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c,
+	0x626b, 0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208,
+	0x905e, 0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c,
+	0x626b, 0x1108, 0x0008, 0x905e, 0x8bff, 0x0005, 0x0016, 0x7114,
+	0x81ff, 0x0128, 0x2148, 0xa904, 0x080c, 0x1054, 0x0cc8, 0x7116,
+	0x711a, 0x001e, 0x0005, 0x2031, 0x0001, 0x0010, 0x2031, 0x0000,
 	0x2061, 0x18ae, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e,
-	0xa392, 0xa496, 0xa59a, 0x080c, 0x110c, 0x7007, 0x0002, 0x701f,
-	0x44e2, 0x0005, 0x81ff, 0x1904, 0x33bc, 0x080c, 0x48ab, 0x0904,
-	0x33bf, 0x080c, 0x6667, 0x1904, 0x33bc, 0x00c6, 0x080c, 0x4878,
-	0x00ce, 0x0904, 0x33bc, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
-	0x7ea8, 0x080c, 0xb9bc, 0x0904, 0x33bc, 0x7007, 0x0003, 0x701f,
-	0x44e6, 0x0005, 0x080c, 0x4054, 0x0804, 0x338a, 0xa830, 0x9086,
-	0x0100, 0x0904, 0x33bc, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
-	0x9084, 0xffc0, 0x9080, 0x001b, 0x2009, 0x000c, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x0804, 0x48c4, 0x9006, 0x080c, 0x248d, 0x78a8,
-	0x9084, 0x00ff, 0x9086, 0x00ff, 0x0118, 0x81ff, 0x1904, 0x33bc,
-	0x080c, 0x70b7, 0x0110, 0x080c, 0x5ca1, 0x7888, 0x908a, 0x1000,
-	0x1a04, 0x33bf, 0x7984, 0x9186, 0x00ff, 0x0138, 0x9182, 0x007f,
-	0x1a04, 0x33bf, 0x2100, 0x080c, 0x2457, 0x0026, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x2061, 0x19d4, 0x601b, 0x0000, 0x601f, 0x0000,
-	0x6073, 0x0000, 0x6077, 0x0000, 0x080c, 0x70b7, 0x1158, 0x080c,
-	0x73b7, 0x080c, 0x5cdc, 0x9085, 0x0001, 0x080c, 0x70fe, 0x080c,
-	0x6fe8, 0x00f0, 0x080c, 0x98c8, 0x080c, 0x9b6d, 0x080c, 0x98e4,
-	0x2061, 0x0100, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x810f,
-	0x9105, 0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x196a,
-	0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5bc7, 0x080c, 0x821d,
-	0x7984, 0x080c, 0x70b7, 0x1110, 0x2009, 0x00ff, 0x7a88, 0x080c,
-	0x438c, 0x012e, 0x00ce, 0x002e, 0x0804, 0x338a, 0x7984, 0x080c,
-	0x6210, 0x2b08, 0x1904, 0x33bf, 0x0804, 0x338a, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x33bc, 0x60d8, 0xd0ac, 0x1130, 0xd09c,
-	0x1120, 0x2009, 0x0005, 0x0804, 0x33bc, 0x080c, 0x4878, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x33bc, 0x7984, 0x9192, 0x0021, 0x1a04,
-	0x33bf, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019,
-	0x702a, 0xaf60, 0x7736, 0x080c, 0x48c1, 0x701f, 0x459e, 0x7880,
-	0x9086, 0x006e, 0x0110, 0x701f, 0x4e43, 0x0005, 0x2009, 0x0080,
-	0x080c, 0x6270, 0x1118, 0x080c, 0x6667, 0x0120, 0x2021, 0x400a,
-	0x0804, 0x338c, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70, 0xac74,
-	0xad78, 0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x4637, 0x90be,
-	0x0112, 0x0904, 0x4637, 0x90be, 0x0113, 0x0904, 0x4637, 0x90be,
-	0x0114, 0x0904, 0x4637, 0x90be, 0x0117, 0x0904, 0x4637, 0x90be,
-	0x011a, 0x0904, 0x4637, 0x90be, 0x011c, 0x0904, 0x4637, 0x90be,
-	0x0121, 0x0904, 0x461e, 0x90be, 0x0131, 0x0904, 0x461e, 0x90be,
-	0x0171, 0x0904, 0x4637, 0x90be, 0x0173, 0x0904, 0x4637, 0x90be,
-	0x01a1, 0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x4642, 0x90be,
-	0x0212, 0x0904, 0x462b, 0x90be, 0x0213, 0x05e8, 0x90be, 0x0214,
-	0x0500, 0x90be, 0x0217, 0x0188, 0x90be, 0x021a, 0x1120, 0xa89c,
-	0x8007, 0xa89e, 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be, 0x0300,
-	0x05b0, 0x009e, 0x00de, 0x0804, 0x33bf, 0x7028, 0x9080, 0x0010,
-	0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007, 0x080c,
-	0x4680, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0,
-	0x20e8, 0x20a9, 0x0001, 0x080c, 0x4680, 0x00c8, 0x7028, 0x9080,
-	0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001,
-	0x080c, 0x468d, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0,
-	0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x468d, 0x7028,
-	0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9,
-	0x0001, 0x04f1, 0x00c6, 0x080c, 0x4878, 0x0550, 0xa868, 0xc0fd,
-	0xa86a, 0xa867, 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020, 0xa88b,
-	0x0001, 0x810b, 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe, 0xadc2,
-	0xa9c6, 0xa8ca, 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822, 0xa868,
-	0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c, 0xb9d7, 0x1120, 0x2009,
-	0x0003, 0x0804, 0x33bc, 0x7007, 0x0003, 0x701f, 0x4677, 0x0005,
-	0x00ce, 0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x33bc, 0xa820,
-	0x9086, 0x8001, 0x1904, 0x338a, 0x2009, 0x0004, 0x0804, 0x33bc,
-	0x0016, 0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104, 0x4004,
-	0x8211, 0x1dc8, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x3520, 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204, 0x4104,
-	0x4004, 0x8421, 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005,
-	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33bc, 0x60d8, 0xd0ac,
-	0x1160, 0xd09c, 0x0120, 0x2009, 0x0016, 0x0804, 0x33bc, 0xd09c,
-	0x1120, 0x2009, 0x0005, 0x0804, 0x33bc, 0x7984, 0x78a8, 0x2040,
-	0x080c, 0x9b66, 0x1120, 0x9182, 0x007f, 0x0a04, 0x33bf, 0x9186,
-	0x00ff, 0x0904, 0x33bf, 0x9182, 0x0800, 0x1a04, 0x33bf, 0x7a8c,
-	0x7b88, 0x6078, 0x9306, 0x1140, 0x607c, 0x924e, 0x0904, 0x33bf,
-	0x99cc, 0xff00, 0x0904, 0x33bf, 0x0126, 0x2091, 0x8000, 0x0026,
-	0x2011, 0x8008, 0x080c, 0x668b, 0x002e, 0x0140, 0x918d, 0x8000,
-	0x080c, 0x66d5, 0x1118, 0x2001, 0x4009, 0x0458, 0x080c, 0x4792,
-	0x0560, 0x90c6, 0x4000, 0x1170, 0x00c6, 0x0006, 0x900e, 0x080c,
-	0x655f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x000e,
-	0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x0090, 0x90c6,
-	0x4008, 0x1118, 0x2708, 0x2610, 0x0060, 0x90c6, 0x4009, 0x1108,
-	0x0040, 0x90c6, 0x4006, 0x1108, 0x0020, 0x2001, 0x4005, 0x2009,
-	0x000a, 0x2020, 0x012e, 0x0804, 0x338c, 0x2b00, 0x7026, 0x0016,
-	0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0x9c58, 0x0904, 0x475f,
-	0x2b00, 0x6012, 0x080c, 0xbcdb, 0x2e58, 0x00ee, 0x00e6, 0x00c6,
-	0x080c, 0x4878, 0x00ce, 0x2b70, 0x1158, 0x080c, 0x9be7, 0x00ee,
-	0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002, 0x0804, 0x33bc,
-	0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932, 0xa868, 0xc0fd,
-	0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x080c, 0x3006, 0x6023, 0x0001,
-	0x9006, 0x080c, 0x61ad, 0x2001, 0x0002, 0x080c, 0x61c1, 0x2009,
-	0x0002, 0x080c, 0x9c85, 0x78a8, 0xd094, 0x0138, 0x00ee, 0x7024,
-	0x00e6, 0x2058, 0xb8c4, 0xc08d, 0xb8c6, 0x9085, 0x0001, 0x00ee,
-	0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x33bc, 0x7007, 0x0003, 0x701f, 0x476e, 0x0005, 0xa830, 0x2008,
-	0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804, 0x338c, 0x9086,
-	0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004, 0xba04, 0x9294,
-	0x00ff, 0x0804, 0x52ea, 0x900e, 0xa868, 0xd0f4, 0x1904, 0x338a,
-	0x080c, 0x655f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0x0804, 0x338a, 0x00e6, 0x00d6, 0x0096, 0x83ff, 0x0904, 0x47da,
-	0x902e, 0x080c, 0x9b66, 0x0130, 0x9026, 0x20a9, 0x0800, 0x2071,
-	0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781, 0x2071, 0x107f,
-	0x2e04, 0x9005, 0x11b0, 0x2100, 0x9406, 0x15e8, 0x2428, 0x94ce,
-	0x007f, 0x1120, 0x92ce, 0xfffd, 0x1528, 0x0030, 0x94ce, 0x0080,
-	0x1130, 0x92ce, 0xfffc, 0x11f0, 0x93ce, 0x00ff, 0x11d8, 0xc5fd,
-	0x0450, 0x2058, 0xbf10, 0x2700, 0x9306, 0x11b8, 0xbe14, 0x2600,
-	0x9206, 0x1198, 0x2400, 0x9106, 0x1150, 0xd884, 0x0568, 0xd894,
-	0x1558, 0x080c, 0x6667, 0x1540, 0x2001, 0x4000, 0x0430, 0x2001,
-	0x4007, 0x0418, 0x2001, 0x4006, 0x0400, 0x2400, 0x9106, 0x1158,
-	0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0948, 0x080c, 0x9b66, 0x1930,
-	0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x47a8, 0x85ff,
-	0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001, 0x0030, 0x080c,
-	0x6210, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, 0x009e, 0x00de,
-	0x00ee, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33bc,
-	0x080c, 0x4878, 0x1120, 0x2009, 0x0002, 0x0804, 0x33bc, 0xa867,
-	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005, 0x0904, 0x33bf,
-	0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, 0x33bf, 0x2010,
-	0x2918, 0x080c, 0x2fa0, 0x1120, 0x2009, 0x0003, 0x0804, 0x33bc,
-	0x7007, 0x0003, 0x701f, 0x482d, 0x0005, 0xa830, 0x9086, 0x0100,
-	0x1904, 0x338a, 0x2009, 0x0004, 0x0804, 0x33bc, 0x7984, 0x080c,
-	0x9b66, 0x1120, 0x9182, 0x007f, 0x0a04, 0x33bf, 0x9186, 0x00ff,
-	0x0904, 0x33bf, 0x9182, 0x0800, 0x1a04, 0x33bf, 0x2001, 0x9000,
-	0x080c, 0x5345, 0x1904, 0x33bc, 0x0804, 0x338a, 0xa998, 0x080c,
-	0x9b66, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186, 0x00ff, 0x0168,
-	0x9182, 0x0800, 0x1250, 0x2001, 0x9000, 0x080c, 0x5345, 0x11a8,
-	0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x2009, 0x000a, 0x0c48,
-	0x080c, 0x1022, 0x0198, 0x9006, 0xa802, 0x7014, 0x9005, 0x1120,
-	0x2900, 0x7016, 0x701a, 0x0040, 0x7018, 0xa802, 0x0086, 0x2040,
-	0x2900, 0xa006, 0x701a, 0x008e, 0x9085, 0x0001, 0x0005, 0x7984,
-	0x080c, 0x6270, 0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082, 0x4000,
-	0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, 0x6270, 0x1130,
-	0xae9c, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e, 0x8bff,
-	0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, 0x6270, 0x1108,
-	0x0008, 0x905e, 0x8bff, 0x0005, 0x0016, 0x7114, 0x81ff, 0x0128,
-	0x2148, 0xa904, 0x080c, 0x1054, 0x0cc8, 0x7116, 0x711a, 0x001e,
-	0x0005, 0x2031, 0x0001, 0x0010, 0x2031, 0x0000, 0x2061, 0x18ae,
-	0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496,
-	0xa59a, 0x080c, 0x110c, 0x7007, 0x0002, 0x701f, 0x338a, 0x0005,
-	0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0000, 0x2001, 0x18a6,
-	0x2004, 0x9005, 0x1190, 0x0e04, 0x48f5, 0x7a36, 0x7833, 0x0012,
-	0x7a82, 0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x11be, 0x0804, 0x495b, 0x0016, 0x0086, 0x0096,
-	0x00c6, 0x00e6, 0x2071, 0x1894, 0x7044, 0x9005, 0x1540, 0x7148,
-	0x9182, 0x0010, 0x0288, 0x7038, 0x2060, 0x080c, 0x1022, 0x0904,
-	0x4953, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, 0x0002, 0x9080,
-	0x1cf7, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, 0x0004, 0x2001,
-	0x18b0, 0x9c82, 0x18f0, 0x0210, 0x2061, 0x18b0, 0x2c00, 0x703a,
-	0x7148, 0x81ff, 0x1108, 0x703e, 0x8108, 0x714a, 0x0460, 0x7148,
-	0x8108, 0x714a, 0x7044, 0x2040, 0xa144, 0x2105, 0x0016, 0x908a,
-	0x0036, 0x1a0c, 0x0d65, 0x2060, 0x001e, 0x8108, 0x2105, 0x9005,
-	0xa146, 0x1520, 0x080c, 0x1022, 0x1130, 0x8109, 0xa946, 0x7148,
-	0x8109, 0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a, 0xa046, 0x2800,
-	0xa802, 0x2900, 0xa006, 0x7046, 0x2001, 0x0002, 0x9080, 0x1cf7,
-	0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a, 0x00ee, 0x00ce,
-	0x009e, 0x008e, 0x001e, 0x012e, 0x00fe, 0x0005, 0x2c00, 0x9082,
-	0x001b, 0x0002, 0x497d, 0x497d, 0x497f, 0x497d, 0x497d, 0x497d,
-	0x4983, 0x497d, 0x497d, 0x497d, 0x4987, 0x497d, 0x497d, 0x497d,
-	0x498b, 0x497d, 0x497d, 0x497d, 0x498f, 0x497d, 0x497d, 0x497d,
-	0x4993, 0x497d, 0x497d, 0x497d, 0x4998, 0x080c, 0x0d65, 0xa276,
-	0xa37a, 0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e, 0x0878, 0xa296,
-	0xa39a, 0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae, 0x0838, 0xa2b6,
-	0xa3ba, 0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce, 0x0804, 0x4956,
-	0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x4956, 0x00e6, 0x2071, 0x1894,
-	0x7048, 0x9005, 0x0904, 0x4a2f, 0x0126, 0x2091, 0x8000, 0x0e04,
-	0x4a2e, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, 0x0086, 0x0076,
-	0x9006, 0x2038, 0x7040, 0x2048, 0x9005, 0x0500, 0xa948, 0x2105,
+	0xa392, 0xa496, 0xa59a, 0x080c, 0x1117, 0x7007, 0x0002, 0x701f,
+	0x337e, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0000,
+	0x2001, 0x18a6, 0x2004, 0x9005, 0x1190, 0x0e04, 0x48f7, 0x7a36,
+	0x7833, 0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11c9, 0x0804, 0x495d, 0x0016,
+	0x0086, 0x0096, 0x00c6, 0x00e6, 0x2071, 0x1894, 0x7044, 0x9005,
+	0x1540, 0x7148, 0x9182, 0x0010, 0x0288, 0x7038, 0x2060, 0x080c,
+	0x1022, 0x0904, 0x4955, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001,
+	0x0002, 0x9080, 0x1d04, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0,
+	0x0004, 0x2001, 0x18b0, 0x9c82, 0x18f0, 0x0210, 0x2061, 0x18b0,
+	0x2c00, 0x703a, 0x7148, 0x81ff, 0x1108, 0x703e, 0x8108, 0x714a,
+	0x0460, 0x7148, 0x8108, 0x714a, 0x7044, 0x2040, 0xa144, 0x2105,
 	0x0016, 0x908a, 0x0036, 0x1a0c, 0x0d65, 0x2060, 0x001e, 0x8108,
-	0x2105, 0x9005, 0xa94a, 0x1904, 0x4a31, 0xa804, 0x9005, 0x090c,
-	0x0d65, 0x7042, 0x2938, 0x2040, 0xa003, 0x0000, 0x2001, 0x0002,
-	0x9080, 0x1cf7, 0x2005, 0xa04a, 0x0804, 0x4a31, 0x703c, 0x2060,
-	0x2c14, 0x6304, 0x6408, 0x650c, 0x2200, 0x7836, 0x7833, 0x0012,
-	0x7882, 0x2300, 0x7886, 0x2400, 0x788a, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x11be, 0x87ff, 0x0118, 0x2748,
-	0x080c, 0x1054, 0x7048, 0x8001, 0x704a, 0x9005, 0x1170, 0x7040,
-	0x2048, 0x9005, 0x0128, 0x080c, 0x1054, 0x9006, 0x7042, 0x7046,
-	0x703b, 0x18b0, 0x703f, 0x18b0, 0x0420, 0x7040, 0x9005, 0x1508,
-	0x7238, 0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004, 0x90fa, 0x18f0,
-	0x0210, 0x2001, 0x18b0, 0x703e, 0x00a0, 0x9006, 0x703e, 0x703a,
-	0x7044, 0x9005, 0x090c, 0x0d65, 0x2048, 0xa800, 0x9005, 0x1de0,
-	0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1cf7, 0x2005, 0xa84a,
-	0x0000, 0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe, 0x012e, 0x00ee,
-	0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4a50, 0x4a50, 0x4a52,
-	0x4a50, 0x4a50, 0x4a50, 0x4a57, 0x4a50, 0x4a50, 0x4a50, 0x4a5c,
-	0x4a50, 0x4a50, 0x4a50, 0x4a61, 0x4a50, 0x4a50, 0x4a50, 0x4a66,
-	0x4a50, 0x4a50, 0x4a50, 0x4a6b, 0x4a50, 0x4a50, 0x4a50, 0x4a70,
-	0x080c, 0x0d65, 0xaa74, 0xab78, 0xac7c, 0x0804, 0x49dc, 0xaa84,
-	0xab88, 0xac8c, 0x0804, 0x49dc, 0xaa94, 0xab98, 0xac9c, 0x0804,
-	0x49dc, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x49dc, 0xaab4, 0xabb8,
-	0xacbc, 0x0804, 0x49dc, 0xaac4, 0xabc8, 0xaccc, 0x0804, 0x49dc,
-	0xaad4, 0xabd8, 0xacdc, 0x0804, 0x49dc, 0x0026, 0x080c, 0x538d,
-	0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x48d8, 0x002e, 0x0005,
-	0x81ff, 0x1904, 0x33bc, 0x0126, 0x2091, 0x8000, 0x6030, 0xc08d,
-	0xc085, 0xc0ac, 0x6032, 0x080c, 0x70b7, 0x1158, 0x080c, 0x73b7,
-	0x080c, 0x5cdc, 0x9085, 0x0001, 0x080c, 0x70fe, 0x080c, 0x6fe8,
-	0x0010, 0x080c, 0x5b97, 0x012e, 0x0804, 0x338a, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x33bc, 0x080c, 0x53a1, 0x0120, 0x2009,
-	0x0007, 0x0804, 0x33bc, 0x080c, 0x665f, 0x0120, 0x2009, 0x0008,
-	0x0804, 0x33bc, 0x0026, 0x2011, 0x0010, 0x080c, 0x668b, 0x002e,
-	0x0140, 0x7984, 0x080c, 0x66d5, 0x1120, 0x2009, 0x4009, 0x0804,
-	0x33bc, 0x080c, 0x3181, 0x0128, 0x7984, 0x080c, 0x6210, 0x1904,
-	0x33bf, 0x080c, 0x48ab, 0x0904, 0x33bf, 0x2b00, 0x7026, 0x080c,
-	0x6667, 0x7888, 0x1170, 0x9084, 0x0005, 0x1158, 0x900e, 0x080c,
-	0x655f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804,
-	0x338a, 0x080c, 0x4878, 0x0904, 0x33bc, 0x9006, 0xa866, 0xa832,
-	0xa868, 0xc0fd, 0xa86a, 0x080c, 0xba79, 0x0904, 0x33bc, 0x7888,
-	0xd094, 0x0118, 0xb8c4, 0xc08d, 0xb8c6, 0x7007, 0x0003, 0x701f,
-	0x4b46, 0x0005, 0x2061, 0x1800, 0x080c, 0x53a1, 0x2009, 0x0007,
-	0x1578, 0x080c, 0x665f, 0x0118, 0x2009, 0x0008, 0x0448, 0x080c,
-	0x3181, 0x0120, 0xa998, 0x080c, 0x6210, 0x1530, 0x080c, 0x48a9,
-	0x0518, 0x080c, 0x6667, 0xa89c, 0x1168, 0x9084, 0x0005, 0x1150,
-	0x900e, 0x080c, 0x655f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c, 0xba79, 0x11e0,
-	0xa89c, 0xd094, 0x0118, 0xb8c4, 0xc08d, 0xb8c6, 0x2009, 0x0003,
-	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0xa99a, 0x9006,
-	0x918d, 0x0001, 0x2008, 0x0005, 0x9006, 0x0005, 0xa830, 0x2008,
-	0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804, 0x338c, 0x9086,
-	0x0100, 0x7024, 0x2058, 0x1110, 0x0804, 0x52ea, 0x900e, 0x080c,
-	0x655f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804,
-	0x338a, 0x080c, 0x53a1, 0x0120, 0x2009, 0x0007, 0x0804, 0x33bc,
-	0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4878, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x33bc, 0x900e, 0x2130, 0x7126, 0x7132,
-	0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005, 0x702a, 0x20a0,
-	0x080c, 0x6270, 0x1904, 0x4be4, 0x080c, 0x6667, 0x0120, 0x080c,
-	0x666f, 0x1904, 0x4be4, 0x080c, 0x665f, 0x1130, 0x080c, 0x655f,
-	0x1118, 0xd79c, 0x0904, 0x4be4, 0xd794, 0x1110, 0xd784, 0x01a8,
-	0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x3400, 0xd794,
-	0x0160, 0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0,
-	0x20a9, 0x0002, 0x080c, 0x468d, 0x0048, 0x20a9, 0x0004, 0x4003,
-	0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x468d, 0x4104, 0xd794,
-	0x0528, 0xb8b4, 0x20e0, 0xb8b8, 0x2060, 0x9c80, 0x0000, 0x2098,
-	0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003, 0x2098, 0x20a9, 0x0001,
-	0x4005, 0x9c80, 0x0004, 0x2098, 0x3400, 0x20a9, 0x0002, 0x4003,
-	0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x4680, 0x9c80, 0x0026,
-	0x2098, 0xb8b4, 0x20e0, 0x20a9, 0x0002, 0x4003, 0xd794, 0x0110,
-	0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108, 0x080c, 0x9b66, 0x0118,
-	0x9186, 0x0800, 0x0040, 0xd78c, 0x0120, 0x9186, 0x0800, 0x0170,
-	0x0018, 0x9186, 0x007e, 0x0150, 0xd794, 0x0118, 0x9686, 0x0020,
-	0x0010, 0x9686, 0x0028, 0x0150, 0x0804, 0x4b80, 0x86ff, 0x1120,
-	0x7124, 0x810b, 0x0804, 0x338a, 0x7033, 0x0001, 0x7122, 0x7024,
-	0x9600, 0x7026, 0x772e, 0x2061, 0x18ae, 0x2c44, 0xa06b, 0x0000,
-	0xa67a, 0x7034, 0xa072, 0x7028, 0xa076, 0xa28e, 0xa392, 0xa496,
-	0xa59a, 0x080c, 0x110c, 0x7007, 0x0002, 0x701f, 0x4c20, 0x0005,
-	0x7030, 0x9005, 0x1180, 0x7120, 0x7028, 0x20a0, 0x772c, 0x9036,
-	0x7034, 0x20e8, 0x2061, 0x18ae, 0x2c44, 0xa28c, 0xa390, 0xa494,
-	0xa598, 0x0804, 0x4b80, 0x7124, 0x810b, 0x0804, 0x338a, 0x2029,
-	0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98, 0x9184, 0xff00, 0x8007,
-	0x90e2, 0x0020, 0x0a04, 0x33bf, 0x9502, 0x0a04, 0x33bf, 0x9184,
-	0x00ff, 0x90e2, 0x0020, 0x0a04, 0x33bf, 0x9502, 0x0a04, 0x33bf,
-	0x9284, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x33bf, 0x9502,
-	0x0a04, 0x33bf, 0x9284, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x33bf,
-	0x9502, 0x0a04, 0x33bf, 0x9384, 0xff00, 0x8007, 0x90e2, 0x0020,
-	0x0a04, 0x33bf, 0x9502, 0x0a04, 0x33bf, 0x9384, 0x00ff, 0x90e2,
-	0x0020, 0x0a04, 0x33bf, 0x9502, 0x0a04, 0x33bf, 0x9484, 0xff00,
-	0x8007, 0x90e2, 0x0020, 0x0a04, 0x33bf, 0x9502, 0x0a04, 0x33bf,
-	0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x33bf, 0x9502, 0x0a04,
-	0x33bf, 0x2061, 0x195a, 0x6102, 0x6206, 0x630a, 0x640e, 0x0804,
-	0x338a, 0x0006, 0x080c, 0x538d, 0xd0cc, 0x000e, 0x0005, 0x0006,
-	0x080c, 0x5391, 0xd0bc, 0x000e, 0x0005, 0x6170, 0x7a84, 0x6300,
-	0x82ff, 0x1118, 0x7986, 0x0804, 0x338a, 0x83ff, 0x1904, 0x33bf,
-	0x2001, 0xfff0, 0x9200, 0x1a04, 0x33bf, 0x2019, 0xffff, 0x6074,
-	0x9302, 0x9200, 0x0a04, 0x33bf, 0x7986, 0x6272, 0x0804, 0x338a,
-	0x080c, 0x53a1, 0x1904, 0x33bc, 0x7c88, 0x7d84, 0x7e98, 0x7f8c,
-	0x080c, 0x4878, 0x0904, 0x33bc, 0x900e, 0x901e, 0x7326, 0x7332,
-	0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0003, 0x702a, 0x20a0,
-	0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6667, 0x0118,
-	0x080c, 0x666f, 0x1148, 0x20a9, 0x0001, 0xb814, 0x4004, 0xb810,
+	0x2105, 0x9005, 0xa146, 0x1520, 0x080c, 0x1022, 0x1130, 0x8109,
+	0xa946, 0x7148, 0x8109, 0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a,
+	0xa046, 0x2800, 0xa802, 0x2900, 0xa006, 0x7046, 0x2001, 0x0002,
+	0x9080, 0x1d04, 0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a,
+	0x00ee, 0x00ce, 0x009e, 0x008e, 0x001e, 0x012e, 0x00fe, 0x0005,
+	0x2c00, 0x9082, 0x001b, 0x0002, 0x497f, 0x497f, 0x4981, 0x497f,
+	0x497f, 0x497f, 0x4985, 0x497f, 0x497f, 0x497f, 0x4989, 0x497f,
+	0x497f, 0x497f, 0x498d, 0x497f, 0x497f, 0x497f, 0x4991, 0x497f,
+	0x497f, 0x497f, 0x4995, 0x497f, 0x497f, 0x497f, 0x499a, 0x080c,
+	0x0d65, 0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e,
+	0x0878, 0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae,
+	0x0838, 0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce,
+	0x0804, 0x4958, 0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x4958, 0x00e6,
+	0x2071, 0x1894, 0x7048, 0x9005, 0x0904, 0x4a31, 0x0126, 0x2091,
+	0x8000, 0x0e04, 0x4a30, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096,
+	0x0086, 0x0076, 0x9006, 0x2038, 0x7040, 0x2048, 0x9005, 0x0500,
+	0xa948, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0d65, 0x2060,
+	0x001e, 0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, 0x4a33, 0xa804,
+	0x9005, 0x090c, 0x0d65, 0x7042, 0x2938, 0x2040, 0xa003, 0x0000,
+	0x2001, 0x0002, 0x9080, 0x1d04, 0x2005, 0xa04a, 0x0804, 0x4a33,
+	0x703c, 0x2060, 0x2c14, 0x6304, 0x6408, 0x650c, 0x2200, 0x7836,
+	0x7833, 0x0012, 0x7882, 0x2300, 0x7886, 0x2400, 0x788a, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11c9, 0x87ff,
+	0x0118, 0x2748, 0x080c, 0x1054, 0x7048, 0x8001, 0x704a, 0x9005,
+	0x1170, 0x7040, 0x2048, 0x9005, 0x0128, 0x080c, 0x1054, 0x9006,
+	0x7042, 0x7046, 0x703b, 0x18b0, 0x703f, 0x18b0, 0x0420, 0x7040,
+	0x9005, 0x1508, 0x7238, 0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004,
+	0x90fa, 0x18f0, 0x0210, 0x2001, 0x18b0, 0x703e, 0x00a0, 0x9006,
+	0x703e, 0x703a, 0x7044, 0x9005, 0x090c, 0x0d65, 0x2048, 0xa800,
+	0x9005, 0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1d04,
+	0x2005, 0xa84a, 0x0000, 0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe,
+	0x012e, 0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4a52,
+	0x4a52, 0x4a54, 0x4a52, 0x4a52, 0x4a52, 0x4a59, 0x4a52, 0x4a52,
+	0x4a52, 0x4a5e, 0x4a52, 0x4a52, 0x4a52, 0x4a63, 0x4a52, 0x4a52,
+	0x4a52, 0x4a68, 0x4a52, 0x4a52, 0x4a52, 0x4a6d, 0x4a52, 0x4a52,
+	0x4a52, 0x4a72, 0x080c, 0x0d65, 0xaa74, 0xab78, 0xac7c, 0x0804,
+	0x49de, 0xaa84, 0xab88, 0xac8c, 0x0804, 0x49de, 0xaa94, 0xab98,
+	0xac9c, 0x0804, 0x49de, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x49de,
+	0xaab4, 0xabb8, 0xacbc, 0x0804, 0x49de, 0xaac4, 0xabc8, 0xaccc,
+	0x0804, 0x49de, 0xaad4, 0xabd8, 0xacdc, 0x0804, 0x49de, 0x0026,
+	0x080c, 0x5388, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x48da,
+	0x002e, 0x0005, 0x81ff, 0x1904, 0x33b0, 0x0126, 0x2091, 0x8000,
+	0x6030, 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x7096, 0x1158,
+	0x080c, 0x7396, 0x080c, 0x5cd7, 0x9085, 0x0001, 0x080c, 0x70dd,
+	0x080c, 0x6fc7, 0x0010, 0x080c, 0x5b92, 0x012e, 0x0804, 0x337e,
+	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33b0, 0x080c, 0x539c,
+	0x0120, 0x2009, 0x0007, 0x0804, 0x33b0, 0x080c, 0x665e, 0x0120,
+	0x2009, 0x0008, 0x0804, 0x33b0, 0x0026, 0x2011, 0x0010, 0x080c,
+	0x668a, 0x002e, 0x0140, 0x7984, 0x080c, 0x66d4, 0x1120, 0x2009,
+	0x4009, 0x0804, 0x33b0, 0x7984, 0x080c, 0x620b, 0x1904, 0x33b3,
+	0x2b00, 0x7026, 0x080c, 0x6666, 0x7888, 0x1170, 0x9084, 0x0005,
+	0x1158, 0x900e, 0x080c, 0x655e, 0x1108, 0xc185, 0xb800, 0xd0bc,
+	0x0108, 0xc18d, 0x0804, 0x337e, 0x080c, 0x487a, 0x0904, 0x33b0,
+	0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xba79,
+	0x0904, 0x33b0, 0x7888, 0xd094, 0x0118, 0xb8c4, 0xc08d, 0xb8c6,
+	0x7007, 0x0003, 0x701f, 0x4b41, 0x0005, 0x2061, 0x1800, 0x080c,
+	0x539c, 0x2009, 0x0007, 0x1578, 0x080c, 0x665e, 0x0118, 0x2009,
+	0x0008, 0x0448, 0x080c, 0x3175, 0x0120, 0xa998, 0x080c, 0x620b,
+	0x1530, 0x080c, 0x48ab, 0x0518, 0x080c, 0x6666, 0xa89c, 0x1168,
+	0x9084, 0x0005, 0x1150, 0x900e, 0x080c, 0x655e, 0x1108, 0xc185,
+	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a,
+	0x080c, 0xba79, 0x11e0, 0xa89c, 0xd094, 0x0118, 0xb8c4, 0xc08d,
+	0xb8c6, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
+	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
+	0x4000, 0xa99a, 0x9006, 0x918d, 0x0001, 0x2008, 0x0005, 0x9006,
+	0x0005, 0xa830, 0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009,
+	0x0804, 0x3380, 0x9086, 0x0100, 0x7024, 0x2058, 0x1110, 0x0804,
+	0x52e5, 0x900e, 0x080c, 0x655e, 0x1108, 0xc185, 0xb800, 0xd0bc,
+	0x0108, 0xc18d, 0x0804, 0x337e, 0x080c, 0x539c, 0x0120, 0x2009,
+	0x0007, 0x0804, 0x33b0, 0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0x080c, 0x487a, 0x1120, 0x2009, 0x0002, 0x0804, 0x33b0, 0x900e,
+	0x2130, 0x7126, 0x7132, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080,
+	0x0005, 0x702a, 0x20a0, 0x080c, 0x626b, 0x1904, 0x4bdf, 0x080c,
+	0x6666, 0x0120, 0x080c, 0x666e, 0x1904, 0x4bdf, 0x080c, 0x665e,
+	0x1130, 0x080c, 0x655e, 0x1118, 0xd79c, 0x0904, 0x4bdf, 0xd794,
+	0x1110, 0xd784, 0x01a8, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006,
+	0x2098, 0x3400, 0xd794, 0x0160, 0x20a9, 0x0008, 0x4003, 0x2098,
+	0x20a0, 0x3d00, 0x20e0, 0x20a9, 0x0002, 0x080c, 0x468c, 0x0048,
+	0x20a9, 0x0004, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c,
+	0x468c, 0x4104, 0xd794, 0x0528, 0xb8b4, 0x20e0, 0xb8b8, 0x2060,
+	0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003,
+	0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400,
+	0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c,
+	0x467f, 0x9c80, 0x0026, 0x2098, 0xb8b4, 0x20e0, 0x20a9, 0x0002,
+	0x4003, 0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108,
+	0x080c, 0x9b59, 0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120,
+	0x9186, 0x0800, 0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794,
+	0x0118, 0x9686, 0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804,
+	0x4b7b, 0x86ff, 0x1120, 0x7124, 0x810b, 0x0804, 0x337e, 0x7033,
+	0x0001, 0x7122, 0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18ae,
+	0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076,
+	0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x1117, 0x7007, 0x0002,
+	0x701f, 0x4c1b, 0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028,
+	0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8, 0x2061, 0x18ae, 0x2c44,
+	0xa28c, 0xa390, 0xa494, 0xa598, 0x0804, 0x4b7b, 0x7124, 0x810b,
+	0x0804, 0x337e, 0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98,
+	0x9184, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x33b3, 0x9502,
+	0x0a04, 0x33b3, 0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x33b3,
+	0x9502, 0x0a04, 0x33b3, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020,
+	0x0a04, 0x33b3, 0x9502, 0x0a04, 0x33b3, 0x9284, 0x00ff, 0x90e2,
+	0x0020, 0x0a04, 0x33b3, 0x9502, 0x0a04, 0x33b3, 0x9384, 0xff00,
+	0x8007, 0x90e2, 0x0020, 0x0a04, 0x33b3, 0x9502, 0x0a04, 0x33b3,
+	0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x33b3, 0x9502, 0x0a04,
+	0x33b3, 0x9484, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x33b3,
+	0x9502, 0x0a04, 0x33b3, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04,
+	0x33b3, 0x9502, 0x0a04, 0x33b3, 0x2061, 0x1959, 0x6102, 0x6206,
+	0x630a, 0x640e, 0x0804, 0x337e, 0x0006, 0x080c, 0x5388, 0xd0cc,
+	0x000e, 0x0005, 0x0006, 0x080c, 0x538c, 0xd0bc, 0x000e, 0x0005,
+	0x6170, 0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986, 0x0804, 0x337e,
+	0x83ff, 0x1904, 0x33b3, 0x2001, 0xfff0, 0x9200, 0x1a04, 0x33b3,
+	0x2019, 0xffff, 0x6074, 0x9302, 0x9200, 0x0a04, 0x33b3, 0x7986,
+	0x6272, 0x0804, 0x337e, 0x080c, 0x539c, 0x1904, 0x33b0, 0x7c88,
+	0x7d84, 0x7e98, 0x7f8c, 0x080c, 0x487a, 0x0904, 0x33b0, 0x900e,
+	0x901e, 0x7326, 0x7332, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080,
+	0x0003, 0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178,
+	0x080c, 0x6666, 0x0118, 0x080c, 0x666e, 0x1148, 0x20a9, 0x0001,
+	0xb814, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108,
+	0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff,
+	0x1148, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x83fb, 0x2208,
+	0x0804, 0x337e, 0x7033, 0x0001, 0x7122, 0x7024, 0x9300, 0x7026,
+	0x2061, 0x18ae, 0x2c44, 0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076,
+	0x7034, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x1117,
+	0x7007, 0x0002, 0x701f, 0x4d0d, 0x0005, 0x7030, 0x9005, 0x1178,
+	0x7120, 0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8, 0x2061, 0x18ae,
+	0x2c44, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0804, 0x4ccb, 0x7224,
+	0x900e, 0x2001, 0x0003, 0x080c, 0x83fb, 0x2208, 0x0804, 0x337e,
+	0x00f6, 0x00e6, 0x080c, 0x539c, 0x2009, 0x0007, 0x1904, 0x4da0,
+	0x2071, 0x1894, 0x745c, 0x84ff, 0x2009, 0x000e, 0x1904, 0x4da0,
+	0xac9c, 0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c, 0x103b, 0x2009,
+	0x0002, 0x0904, 0x4da0, 0x2900, 0x705e, 0x900e, 0x901e, 0x7356,
+	0x7362, 0xa860, 0x7066, 0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0,
+	0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6666, 0x0118,
+	0x080c, 0x666e, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810,
 	0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120,
-	0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff, 0x1148, 0x7224, 0x900e,
-	0x2001, 0x0003, 0x080c, 0x8419, 0x2208, 0x0804, 0x338a, 0x7033,
-	0x0001, 0x7122, 0x7024, 0x9300, 0x7026, 0x2061, 0x18ae, 0x2c44,
-	0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076, 0x7034, 0xa072, 0xa48e,
-	0xa592, 0xa696, 0xa79a, 0x080c, 0x110c, 0x7007, 0x0002, 0x701f,
-	0x4d12, 0x0005, 0x7030, 0x9005, 0x1178, 0x7120, 0x7028, 0x20a0,
-	0x901e, 0x7034, 0x20e8, 0x2061, 0x18ae, 0x2c44, 0xa48c, 0xa590,
-	0xa694, 0xa798, 0x0804, 0x4cd0, 0x7224, 0x900e, 0x2001, 0x0003,
-	0x080c, 0x8419, 0x2208, 0x0804, 0x338a, 0x00f6, 0x00e6, 0x080c,
-	0x53a1, 0x2009, 0x0007, 0x1904, 0x4da5, 0x2071, 0x1894, 0x745c,
-	0x84ff, 0x2009, 0x000e, 0x1904, 0x4da5, 0xac9c, 0xad98, 0xaea4,
-	0xafa0, 0x0096, 0x080c, 0x103b, 0x2009, 0x0002, 0x0904, 0x4da5,
-	0x2900, 0x705e, 0x900e, 0x901e, 0x7356, 0x7362, 0xa860, 0x7066,
-	0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0, 0x91d8, 0x1000, 0x2b5c,
-	0x8bff, 0x0178, 0x080c, 0x6667, 0x0118, 0x080c, 0x666f, 0x1148,
-	0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398,
-	0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x01e8,
-	0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c,
-	0x8419, 0x2208, 0x009e, 0xa897, 0x4000, 0xa99a, 0x715c, 0x81ff,
-	0x090c, 0x0d65, 0x2148, 0x080c, 0x1054, 0x9006, 0x705e, 0x918d,
-	0x0001, 0x2008, 0x0418, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300,
-	0x7056, 0x2061, 0x18af, 0x2c44, 0xa37a, 0x7058, 0xa076, 0x7064,
-	0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0xa09f, 0x4db1, 0x000e,
-	0xa0a2, 0x080c, 0x110c, 0x9006, 0x0048, 0x009e, 0xa897, 0x4005,
-	0xa99a, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ee, 0x00fe,
-	0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c, 0x0d65, 0x00e6, 0x2071,
-	0x1894, 0xa06c, 0x908e, 0x0100, 0x0138, 0xa87b, 0x0030, 0xa883,
-	0x0000, 0xa897, 0x4002, 0x00d8, 0x7060, 0x9005, 0x1158, 0x7150,
-	0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8, 0xa48c, 0xa590, 0xa694,
-	0xa798, 0x0428, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
-	0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x8419, 0xaa9a, 0x715c,
-	0x81ff, 0x090c, 0x0d65, 0x2148, 0x080c, 0x1054, 0x705f, 0x0000,
-	0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6996, 0x012e,
-	0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x91d8,
-	0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6667, 0x0118, 0x080c,
-	0x666f, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004,
-	0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386,
-	0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0, 0x7154, 0x810c, 0xa99a,
-	0xa897, 0x4000, 0x715c, 0x81ff, 0x090c, 0x0d65, 0x2148, 0x080c,
-	0x1054, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0xa0a0, 0x2048,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x6996, 0x012e, 0xa09f, 0x0000,
-	0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300,
-	0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x110c,
-	0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c, 0x90be, 0x7000, 0x0148,
-	0x90be, 0x7100, 0x0130, 0x90be, 0x7200, 0x0118, 0x009e, 0x0804,
-	0x33bf, 0xa884, 0xa988, 0x080c, 0x2424, 0x1518, 0x080c, 0x6210,
-	0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c, 0x080c, 0x4878, 0x01c8,
-	0x080c, 0x4878, 0x01b0, 0x009e, 0xa867, 0x0000, 0xa868, 0xc0fd,
-	0xa86a, 0xa823, 0x0000, 0xa804, 0x2048, 0x080c, 0xb9f7, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x33bc, 0x7007, 0x0003, 0x701f, 0x4e7e,
-	0x0005, 0x009e, 0x2009, 0x0002, 0x0804, 0x33bc, 0x7124, 0x080c,
-	0x311a, 0xa820, 0x9086, 0x8001, 0x1120, 0x2009, 0x0004, 0x0804,
-	0x33bc, 0x2900, 0x7022, 0xa804, 0x0096, 0x2048, 0x8906, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x009e, 0x9080, 0x0002,
-	0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a,
-	0x080c, 0x0f9f, 0xaa6c, 0xab70, 0xac74, 0xad78, 0x2061, 0x18ae,
-	0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c, 0x97c6, 0x7000, 0x0118,
-	0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004, 0x0600, 0x2009, 0x0004,
-	0x000e, 0x007e, 0x0804, 0x48c4, 0x97c6, 0x7200, 0x11b8, 0x96c2,
-	0x0054, 0x02a0, 0x000e, 0x007e, 0x2061, 0x18ae, 0x2c44, 0xa076,
-	0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
-	0x110c, 0x7007, 0x0002, 0x701f, 0x4eda, 0x0005, 0x000e, 0x007e,
-	0x0804, 0x33bf, 0x7020, 0x2048, 0xa804, 0x2048, 0xa804, 0x2048,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c,
-	0x0f9f, 0x2100, 0x2238, 0x2061, 0x18ae, 0x2c44, 0xa28c, 0xa390,
-	0xa494, 0xa598, 0x2009, 0x002a, 0x0804, 0x48c4, 0x81ff, 0x1904,
-	0x33bc, 0x798c, 0x2001, 0x194f, 0x918c, 0x8000, 0x2102, 0x080c,
-	0x488f, 0x0904, 0x33bf, 0x080c, 0x6667, 0x0120, 0x080c, 0x666f,
-	0x1904, 0x33bf, 0x080c, 0x6337, 0x0904, 0x33bc, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x64cc, 0x012e, 0x0904, 0x33bc, 0x2001, 0x194f,
-	0x2004, 0xd0fc, 0x1904, 0x338a, 0x0804, 0x4329, 0xa9a0, 0x2001,
-	0x194f, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x489c, 0x01a0,
-	0x080c, 0x6667, 0x0118, 0x080c, 0x666f, 0x1170, 0x080c, 0x6337,
-	0x2009, 0x0002, 0x0128, 0x080c, 0x64cc, 0x1170, 0x2009, 0x0003,
-	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x194f,
-	0x2004, 0xd0fc, 0x1128, 0x080c, 0x5395, 0x0110, 0x9006, 0x0018,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x78a8, 0xd08c,
-	0x1118, 0xd084, 0x0904, 0x429e, 0x080c, 0x48ab, 0x0904, 0x33bf,
-	0x080c, 0x4878, 0x1120, 0x2009, 0x0002, 0x0804, 0x33bc, 0x080c,
-	0x6667, 0x0130, 0x908e, 0x0004, 0x0118, 0x908e, 0x0005, 0x15a0,
-	0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c, 0xb802, 0x0028, 0x080c,
-	0x538d, 0xd0b4, 0x0904, 0x42d8, 0x7884, 0x908e, 0x007e, 0x0904,
-	0x42d8, 0x908e, 0x007f, 0x0904, 0x42d8, 0x908e, 0x0080, 0x0904,
-	0x42d8, 0xb800, 0xd08c, 0x1904, 0x42d8, 0xa867, 0x0000, 0xa868,
-	0xc0fd, 0xa86a, 0x080c, 0xba16, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x33bc, 0x7007, 0x0003, 0x701f, 0x4fa6, 0x0005, 0x080c, 0x48ab,
-	0x0904, 0x33bf, 0x0804, 0x42d8, 0x080c, 0x3181, 0x0108, 0x0005,
-	0x2009, 0x1833, 0x210c, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
-	0x33bc, 0x080c, 0x53a1, 0x0120, 0x2009, 0x0007, 0x0804, 0x33bc,
-	0x080c, 0x665f, 0x0120, 0x2009, 0x0008, 0x0804, 0x33bc, 0xb89c,
-	0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x42d8, 0x9006, 0xa866, 0xa832,
-	0xa868, 0xc0fd, 0xa86a, 0x080c, 0xba79, 0x1120, 0x2009, 0x0003,
-	0x0804, 0x33bc, 0x7007, 0x0003, 0x701f, 0x4fdf, 0x0005, 0xa830,
-	0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x52ea, 0x080c,
-	0x48ab, 0x0904, 0x33bf, 0x0804, 0x4f78, 0x81ff, 0x2009, 0x0001,
-	0x1904, 0x33bc, 0x080c, 0x53a1, 0x2009, 0x0007, 0x1904, 0x33bc,
-	0x080c, 0x665f, 0x0120, 0x2009, 0x0008, 0x0804, 0x33bc, 0x080c,
-	0x48ab, 0x0904, 0x33bf, 0x080c, 0x6667, 0x2009, 0x0009, 0x1904,
-	0x33bc, 0x080c, 0x4878, 0x2009, 0x0002, 0x0904, 0x33bc, 0x9006,
-	0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x7988, 0x9194, 0xff00,
-	0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128, 0xc0ed, 0xa952, 0x798c,
-	0xa956, 0x0038, 0x928e, 0x0100, 0x1904, 0x33bf, 0xc0e5, 0xa952,
-	0xa956, 0xa83e, 0x080c, 0xbcdc, 0x2009, 0x0003, 0x0904, 0x33bc,
-	0x7007, 0x0003, 0x701f, 0x5035, 0x0005, 0xa830, 0x9086, 0x0100,
-	0x2009, 0x0004, 0x0904, 0x33bc, 0x0804, 0x338a, 0x7aa8, 0x9284,
-	0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c, 0x53a1, 0x1188, 0x2009,
-	0x0014, 0x0804, 0x33bc, 0xd2dc, 0x1568, 0x81ff, 0x2009, 0x0001,
-	0x1904, 0x33bc, 0x080c, 0x53a1, 0x2009, 0x0007, 0x1904, 0x33bc,
-	0xd2f4, 0x0130, 0x9284, 0x5000, 0x080c, 0x5368, 0x0804, 0x338a,
-	0xd2fc, 0x0158, 0x080c, 0x48ab, 0x0904, 0x33bf, 0x7984, 0x9284,
-	0x9000, 0x080c, 0x5345, 0x0804, 0x338a, 0x080c, 0x48ab, 0x0904,
-	0x33bf, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x2009, 0x0009,
-	0x1904, 0x511e, 0x080c, 0x4878, 0x2009, 0x0002, 0x0904, 0x511e,
-	0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009, 0x0008, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x080c, 0x48c1, 0x701f, 0x508f, 0x0005, 0xa86c,
-	0x9086, 0x0500, 0x1138, 0xa870, 0x9005, 0x1120, 0xa874, 0x9084,
-	0xff00, 0x0110, 0x1904, 0x33bf, 0xa866, 0xa832, 0xa868, 0xc0fd,
-	0xa86a, 0x080c, 0x48ab, 0x1110, 0x0804, 0x33bf, 0x2009, 0x0043,
-	0x080c, 0xbd44, 0x2009, 0x0003, 0x0904, 0x511e, 0x7007, 0x0003,
-	0x701f, 0x50b3, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004,
-	0x0904, 0x511e, 0x7984, 0x7aa8, 0x9284, 0x1000, 0x080c, 0x5345,
-	0x0804, 0x338a, 0x00c6, 0xaab0, 0x9284, 0xc000, 0x0140, 0xd2ec,
-	0x0168, 0x080c, 0x53a1, 0x1150, 0x2009, 0x0014, 0x04f0, 0x2061,
-	0x1800, 0x080c, 0x53a1, 0x2009, 0x0007, 0x15b8, 0xd2f4, 0x0128,
-	0x9284, 0x5000, 0x080c, 0x5368, 0x0050, 0xd2fc, 0x0178, 0x080c,
-	0x48a9, 0x0588, 0xa998, 0x9284, 0x9000, 0x080c, 0x5345, 0xa87b,
-	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0438, 0x080c, 0x48a9,
-	0x0510, 0x080c, 0x6667, 0x2009, 0x0009, 0x11b8, 0xa8c4, 0x9086,
-	0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0, 0xa8cc, 0x9084, 0xff00,
-	0x1190, 0x080c, 0x48a9, 0x1108, 0x0070, 0x2009, 0x004b, 0x080c,
-	0xbd44, 0x2009, 0x0003, 0x0108, 0x0078, 0x0429, 0x19c0, 0xa897,
-	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0030, 0x00ce, 0x0005, 0x9006, 0x0ce0, 0x7aa8, 0xd2dc,
-	0x0904, 0x33bc, 0x0016, 0x7984, 0x9284, 0x1000, 0xc0fd, 0x080c,
-	0x5345, 0x001e, 0x1904, 0x33bc, 0x0804, 0x338a, 0x00f6, 0x2d78,
-	0x0011, 0x00fe, 0x0005, 0xaab0, 0xd2dc, 0x0150, 0x0016, 0xa998,
-	0x9284, 0x1000, 0xc0fd, 0x080c, 0x5345, 0x001e, 0x9085, 0x0001,
-	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33bc, 0x080c,
-	0x53a1, 0x0120, 0x2009, 0x0007, 0x0804, 0x33bc, 0x7984, 0x7ea8,
-	0x96b4, 0x00ff, 0x080c, 0x6270, 0x1904, 0x33bf, 0x9186, 0x007f,
-	0x0138, 0x080c, 0x6667, 0x0120, 0x2009, 0x0009, 0x0804, 0x33bc,
-	0x080c, 0x4878, 0x1120, 0x2009, 0x0002, 0x0804, 0x33bc, 0xa867,
-	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001, 0x0100, 0x8007, 0xa80a,
-	0x080c, 0xba30, 0x1120, 0x2009, 0x0003, 0x0804, 0x33bc, 0x7007,
-	0x0003, 0x701f, 0x517c, 0x0005, 0xa808, 0x8007, 0x9086, 0x0100,
-	0x1120, 0x2009, 0x0004, 0x0804, 0x33bc, 0xa8e0, 0xa866, 0xa810,
-	0x8007, 0x9084, 0x00ff, 0x800c, 0xa814, 0x8007, 0x9084, 0x00ff,
-	0x8004, 0x9080, 0x0002, 0x9108, 0x8906, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x0004, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0x0804, 0x48c4, 0x080c, 0x4878, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x33bc, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217,
-	0x82ff, 0x1118, 0x7023, 0x1984, 0x0040, 0x92c6, 0x0001, 0x1118,
-	0x7023, 0x199e, 0x0010, 0x0804, 0x33bf, 0x2009, 0x001a, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c,
-	0x48c1, 0x701f, 0x51cc, 0x0005, 0x2001, 0x182d, 0x2003, 0x0001,
-	0xa85c, 0x9080, 0x0019, 0x2098, 0xa860, 0x20e0, 0x20a9, 0x001a,
-	0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003, 0x0804, 0x338a, 0x080c,
-	0x4878, 0x1120, 0x2009, 0x0002, 0x0804, 0x33bc, 0x7984, 0x9194,
-	0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x2099, 0x1984,
-	0x0040, 0x92c6, 0x0001, 0x1118, 0x2099, 0x199e, 0x0010, 0x0804,
-	0x33bf, 0xa85c, 0x9080, 0x0019, 0x20a0, 0xa860, 0x20e8, 0x20a9,
-	0x001a, 0x20e1, 0x0001, 0x4003, 0x2009, 0x001a, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x0804, 0x48c4,
-	0x7884, 0x908a, 0x1000, 0x1a04, 0x33bf, 0x0126, 0x2091, 0x8000,
-	0x8003, 0x800b, 0x810b, 0x9108, 0x00c6, 0x2061, 0x19d4, 0x6142,
-	0x00ce, 0x012e, 0x0804, 0x338a, 0x00c6, 0x080c, 0x70b7, 0x1160,
-	0x080c, 0x73b7, 0x080c, 0x5cdc, 0x9085, 0x0001, 0x080c, 0x70fe,
-	0x080c, 0x6fe8, 0x080c, 0x0d65, 0x2061, 0x1800, 0x6030, 0xc09d,
-	0x6032, 0x080c, 0x5b97, 0x00ce, 0x0005, 0x00c6, 0x2001, 0x1800,
-	0x2004, 0x908e, 0x0000, 0x0904, 0x33bc, 0x7884, 0x9005, 0x0188,
-	0x7888, 0x2061, 0x196d, 0x2c0c, 0x2062, 0x080c, 0x2801, 0x01a0,
-	0x080c, 0x2809, 0x0188, 0x080c, 0x2811, 0x0170, 0x2162, 0x0804,
-	0x33bf, 0x2061, 0x0100, 0x6038, 0x9086, 0x0007, 0x1118, 0x2009,
-	0x0001, 0x0010, 0x2009, 0x0000, 0x7884, 0x9086, 0x0002, 0x1588,
-	0x2061, 0x0100, 0x6028, 0xc09c, 0x602a, 0x080c, 0x98c8, 0x0026,
-	0x2011, 0x0003, 0x080c, 0x9339, 0x2011, 0x0002, 0x080c, 0x9343,
-	0x002e, 0x080c, 0x9206, 0x0036, 0x901e, 0x080c, 0x9286, 0x003e,
-	0x080c, 0x98e4, 0x60e3, 0x0000, 0x080c, 0xd5fb, 0x080c, 0xd616,
-	0x9085, 0x0001, 0x080c, 0x70fe, 0x9006, 0x080c, 0x2833, 0x2001,
-	0x1800, 0x2003, 0x0004, 0x0026, 0x2011, 0x0008, 0x080c, 0x286d,
-	0x002e, 0x00ce, 0x0804, 0x338a, 0x81ff, 0x0120, 0x2009, 0x0001,
-	0x0804, 0x33bc, 0x080c, 0x53a1, 0x0120, 0x2009, 0x0007, 0x0804,
-	0x33bc, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x6270, 0x1904,
-	0x33bf, 0x9186, 0x007f, 0x0138, 0x080c, 0x6667, 0x0120, 0x2009,
-	0x0009, 0x0804, 0x33bc, 0x080c, 0x4878, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x33bc, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c,
-	0xba33, 0x1120, 0x2009, 0x0003, 0x0804, 0x33bc, 0x7007, 0x0003,
-	0x701f, 0x52d3, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009,
-	0x0004, 0x0804, 0x33bc, 0xa8e0, 0xa866, 0xa834, 0x8007, 0x800c,
-	0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60,
-	0x0804, 0x48c4, 0xa898, 0x9086, 0x000d, 0x1904, 0x33bc, 0x2021,
-	0x4005, 0x0126, 0x2091, 0x8000, 0x0e04, 0x52f7, 0x0010, 0x012e,
-	0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010,
-	0x7833, 0x0010, 0x7883, 0x4005, 0xa998, 0x7986, 0xa9a4, 0x799a,
-	0xa9a8, 0x799e, 0x080c, 0x48b4, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11be, 0x7007, 0x0001, 0x2091, 0x5000,
-	0x700f, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00c6,
-	0x2061, 0x19d4, 0x7984, 0x6152, 0x614e, 0x6057, 0x0000, 0x604b,
-	0x0009, 0x7898, 0x606a, 0x789c, 0x6066, 0x7888, 0x6062, 0x788c,
-	0x605e, 0x2001, 0x19e2, 0x2044, 0x2001, 0x19e9, 0xa076, 0xa060,
-	0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002, 0xa06b, 0x0000, 0xa09f,
-	0x0000, 0x00ce, 0x012e, 0x0804, 0x338a, 0x0126, 0x2091, 0x8000,
-	0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0128, 0x0006, 0x080c, 0xb894,
-	0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180, 0x1000, 0x2004, 0x905d,
-	0x0160, 0x080c, 0x5cf6, 0x080c, 0x9b66, 0x0110, 0xb817, 0x0000,
-	0x9006, 0x00ce, 0x00be, 0x012e, 0x0005, 0x9085, 0x0001, 0x0cc8,
-	0x0126, 0x2091, 0x8000, 0x0156, 0x2010, 0x900e, 0x20a9, 0x0800,
-	0x0016, 0x9180, 0x1000, 0x2004, 0x9005, 0x0180, 0x9186, 0x007e,
-	0x0168, 0x9186, 0x007f, 0x0150, 0x9186, 0x0080, 0x0138, 0x9186,
-	0x00ff, 0x0120, 0x0026, 0x2200, 0x0801, 0x002e, 0x001e, 0x8108,
-	0x1f04, 0x5370, 0x015e, 0x012e, 0x0005, 0x2001, 0x1854, 0x2004,
-	0x0005, 0x2001, 0x1873, 0x2004, 0x0005, 0x0006, 0x2001, 0x1810,
-	0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0b4,
-	0x0005, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x0005, 0x0016,
-	0x00e6, 0x2071, 0x1894, 0x7108, 0x910d, 0x710a, 0x00ee, 0x001e,
-	0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04, 0x33bf, 0x810c, 0x0016,
-	0x080c, 0x4878, 0x080c, 0x0f2a, 0x2100, 0x2238, 0x7d84, 0x7c88,
-	0x7b8c, 0x7a90, 0x001e, 0x080c, 0x48c1, 0x701f, 0x53c8, 0x0005,
-	0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8, 0x7aac, 0x79a4, 0x810c,
-	0x2061, 0x18ae, 0x2c44, 0xa770, 0xa074, 0x2071, 0x1894, 0x080c,
-	0x48c4, 0x701f, 0x53dc, 0x0005, 0x2061, 0x18ae, 0x2c44, 0x0016,
-	0x0026, 0xa270, 0xa174, 0x080c, 0x0f32, 0x002e, 0x001e, 0x080c,
-	0x0fdf, 0x9006, 0xa802, 0xa806, 0x0804, 0x338a, 0x0126, 0x0156,
-	0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x2061, 0x0100, 0x2069, 0x0200, 0x2071, 0x1800, 0x6044, 0xd0a4,
-	0x11e8, 0xd084, 0x0118, 0x080c, 0x5597, 0x0068, 0xd08c, 0x0118,
-	0x080c, 0x54a0, 0x0040, 0xd094, 0x0118, 0x080c, 0x5470, 0x0018,
-	0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de,
-	0x01ce, 0x014e, 0x013e, 0x015e, 0x012e, 0x0005, 0x0016, 0x6128,
-	0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0c68, 0x0006, 0x7094,
-	0x9005, 0x000e, 0x0120, 0x7097, 0x0000, 0x708f, 0x0000, 0x624c,
-	0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086, 0xf0f0, 0x0130, 0x624a,
-	0x6043, 0x0090, 0x6043, 0x0010, 0x0490, 0x9294, 0xff00, 0x9296,
-	0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160, 0x6240, 0x9295, 0x0100,
-	0x6242, 0x9294, 0x0010, 0x0128, 0x2009, 0x00f7, 0x080c, 0x5c58,
-	0x00f0, 0x6040, 0x9084, 0x0010, 0x9085, 0x0140, 0x6042, 0x6043,
-	0x0000, 0x7083, 0x0000, 0x709f, 0x0001, 0x70c3, 0x0000, 0x70db,
-	0x0000, 0x2009, 0x1d80, 0x200b, 0x0000, 0x7093, 0x0000, 0x7087,
-	0x000f, 0x2009, 0x000f, 0x2011, 0x5b3a, 0x080c, 0x821d, 0x0005,
-	0x2001, 0x1875, 0x2004, 0xd08c, 0x0110, 0x705b, 0xffff, 0x7084,
-	0x9005, 0x1528, 0x2011, 0x5b3a, 0x080c, 0x8159, 0x6040, 0x9094,
-	0x0010, 0x9285, 0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c,
-	0x1168, 0x1f04, 0x5486, 0x6242, 0x7097, 0x0000, 0x6040, 0x9094,
-	0x0010, 0x9285, 0x0080, 0x6042, 0x6242, 0x0048, 0x6242, 0x7097,
-	0x0000, 0x708b, 0x0000, 0x9006, 0x080c, 0x5ce1, 0x0000, 0x0005,
-	0x7088, 0x908a, 0x0003, 0x1a0c, 0x0d65, 0x000b, 0x0005, 0x54aa,
-	0x54fb, 0x5596, 0x00f6, 0x0016, 0x6900, 0x918c, 0x0800, 0x708b,
-	0x0001, 0x2001, 0x015d, 0x2003, 0x0000, 0x6803, 0x00fc, 0x20a9,
-	0x0004, 0x6800, 0x9084, 0x00fc, 0x0120, 0x1f04, 0x54b9, 0x080c,
-	0x0d65, 0x68a0, 0x68a2, 0x689c, 0x689e, 0x6898, 0x689a, 0xa001,
-	0x918d, 0x1600, 0x6902, 0x001e, 0x6837, 0x0020, 0x080c, 0x5cbd,
-	0x2079, 0x1d00, 0x7833, 0x1101, 0x7837, 0x0000, 0x20e1, 0x0001,
-	0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1, 0x1d0e, 0x20a9, 0x0004,
-	0x4003, 0x080c, 0x97fa, 0x20e1, 0x0001, 0x2099, 0x1d00, 0x20e9,
-	0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c,
-	0x600f, 0x0000, 0x080c, 0x5b6b, 0x00fe, 0x9006, 0x708e, 0x6043,
-	0x0008, 0x6042, 0x0005, 0x00f6, 0x708c, 0x708f, 0x0000, 0x9025,
-	0x0904, 0x5573, 0x6020, 0xd0b4, 0x1904, 0x5571, 0x719c, 0x81ff,
-	0x0904, 0x555f, 0x9486, 0x000c, 0x1904, 0x556c, 0x9480, 0x0018,
-	0x8004, 0x20a8, 0x080c, 0x5cb6, 0x2011, 0x0260, 0x2019, 0x1d00,
-	0x220c, 0x2304, 0x9106, 0x11e8, 0x8210, 0x8318, 0x1f04, 0x5518,
-	0x6043, 0x0004, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0,
-	0x2061, 0x0100, 0x6043, 0x0006, 0x708b, 0x0002, 0x7097, 0x0002,
-	0x2009, 0x07d0, 0x2011, 0x5b41, 0x080c, 0x821d, 0x080c, 0x5cbd,
-	0x04c0, 0x080c, 0x5cb6, 0x2079, 0x0260, 0x7930, 0x918e, 0x1101,
-	0x1558, 0x7834, 0x9005, 0x1540, 0x7900, 0x918c, 0x00ff, 0x1118,
-	0x7804, 0x9005, 0x0190, 0x080c, 0x5cb6, 0x2011, 0x026e, 0x2019,
-	0x1805, 0x20a9, 0x0004, 0x220c, 0x2304, 0x9102, 0x0230, 0x11a0,
-	0x8210, 0x8318, 0x1f04, 0x5553, 0x0078, 0x709f, 0x0000, 0x080c,
-	0x5cb6, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0001, 0x20a1,
-	0x1d00, 0x20a9, 0x0014, 0x4003, 0x6043, 0x0008, 0x6043, 0x0000,
-	0x0010, 0x00fe, 0x0005, 0x6040, 0x9085, 0x0100, 0x6042, 0x6020,
-	0xd0b4, 0x1db8, 0x080c, 0x97fa, 0x20e1, 0x0001, 0x2099, 0x1d00,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3,
-	0x000c, 0x2011, 0x19c5, 0x2013, 0x0000, 0x708f, 0x0000, 0x60a3,
-	0x0056, 0x60a7, 0x9575, 0x080c, 0x8faa, 0x08d8, 0x0005, 0x7094,
-	0x908a, 0x001d, 0x1a0c, 0x0d65, 0x000b, 0x0005, 0x55c8, 0x55db,
-	0x5604, 0x5624, 0x564a, 0x5679, 0x569f, 0x56d7, 0x56fd, 0x572b,
-	0x5766, 0x579e, 0x57bc, 0x57e7, 0x5809, 0x5824, 0x582e, 0x5862,
-	0x5888, 0x58b7, 0x58dd, 0x5915, 0x5959, 0x5996, 0x59b7, 0x5a10,
-	0x5a32, 0x5a60, 0x5a60, 0x00c6, 0x2061, 0x1800, 0x6003, 0x0007,
-	0x2061, 0x0100, 0x6004, 0x9084, 0xfff9, 0x6006, 0x00ce, 0x0005,
-	0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100,
-	0x6043, 0x0002, 0x7097, 0x0001, 0x2009, 0x07d0, 0x2011, 0x5b41,
-	0x080c, 0x821d, 0x0005, 0x00f6, 0x708c, 0x9086, 0x0014, 0x1510,
-	0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c, 0x5cb6, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834, 0x9005, 0x1188, 0x7a38,
-	0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x2011,
-	0x5b41, 0x080c, 0x8159, 0x7097, 0x0010, 0x080c, 0x582e, 0x0010,
-	0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0003, 0x6043,
-	0x0004, 0x2011, 0x5b41, 0x080c, 0x8159, 0x080c, 0x5c3a, 0x2079,
-	0x0240, 0x7833, 0x1102, 0x7837, 0x0000, 0x20a9, 0x0008, 0x9f88,
-	0x000e, 0x200b, 0x0000, 0x8108, 0x1f04, 0x5619, 0x60c3, 0x0014,
-	0x080c, 0x5b6b, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500,
-	0x2011, 0x5b41, 0x080c, 0x8159, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x5cb6, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x1178, 0x7834,
+	0x9386, 0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e,
+	0x2001, 0x0003, 0x080c, 0x83fb, 0x2208, 0x009e, 0xa897, 0x4000,
+	0xa99a, 0x715c, 0x81ff, 0x090c, 0x0d65, 0x2148, 0x080c, 0x1054,
+	0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0x0418, 0x7063, 0x0001,
+	0x7152, 0x7054, 0x9300, 0x7056, 0x2061, 0x18af, 0x2c44, 0xa37a,
+	0x7058, 0xa076, 0x7064, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a,
+	0xa09f, 0x4dac, 0x000e, 0xa0a2, 0x080c, 0x1117, 0x9006, 0x0048,
+	0x009e, 0xa897, 0x4005, 0xa99a, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0030, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c,
+	0x0d65, 0x00e6, 0x2071, 0x1894, 0xa06c, 0x908e, 0x0100, 0x0138,
+	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x00d8, 0x7060,
+	0x9005, 0x1158, 0x7150, 0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8,
+	0xa48c, 0xa590, 0xa694, 0xa798, 0x0428, 0xa87b, 0x0000, 0xa883,
+	0x0000, 0xa897, 0x4000, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c,
+	0x83fb, 0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0d65, 0x2148, 0x080c,
+	0x1054, 0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6991, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee,
+	0x00fe, 0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c,
+	0x6666, 0x0118, 0x080c, 0x666e, 0x1148, 0xb814, 0x20a9, 0x0001,
+	0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182,
+	0x0800, 0x0120, 0x9386, 0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0,
+	0x7154, 0x810c, 0xa99a, 0xa897, 0x4000, 0x715c, 0x81ff, 0x090c,
+	0x0d65, 0x2148, 0x080c, 0x1054, 0x9006, 0x705e, 0x918d, 0x0001,
+	0x2008, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6991,
+	0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001,
+	0x7152, 0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696,
+	0xa79a, 0x080c, 0x1117, 0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c,
+	0x90be, 0x7000, 0x0148, 0x90be, 0x7100, 0x0130, 0x90be, 0x7200,
+	0x0118, 0x009e, 0x0804, 0x33b3, 0xa884, 0xa988, 0x080c, 0x243d,
+	0x1518, 0x080c, 0x620b, 0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c,
+	0x080c, 0x487a, 0x01c8, 0x080c, 0x487a, 0x01b0, 0x009e, 0xa867,
+	0x0000, 0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000, 0xa804, 0x2048,
+	0x080c, 0xb9f2, 0x1120, 0x2009, 0x0003, 0x0804, 0x33b0, 0x7007,
+	0x0003, 0x701f, 0x4e79, 0x0005, 0x009e, 0x2009, 0x0002, 0x0804,
+	0x33b0, 0x7124, 0x080c, 0x3116, 0xa820, 0x9086, 0x8001, 0x1120,
+	0x2009, 0x0004, 0x0804, 0x33b0, 0x2900, 0x7022, 0xa804, 0x0096,
+	0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x009e, 0x9080, 0x0002, 0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0,
+	0x27e8, 0x20a9, 0x002a, 0x080c, 0x0f9f, 0xaa6c, 0xab70, 0xac74,
+	0xad78, 0x2061, 0x18ae, 0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c,
+	0x97c6, 0x7000, 0x0118, 0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004,
+	0x0600, 0x2009, 0x0004, 0x000e, 0x007e, 0x0804, 0x48c6, 0x97c6,
+	0x7200, 0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e, 0x007e, 0x2061,
+	0x18ae, 0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392,
+	0xa496, 0xa59a, 0x080c, 0x1117, 0x7007, 0x0002, 0x701f, 0x4ed5,
+	0x0005, 0x000e, 0x007e, 0x0804, 0x33b3, 0x7020, 0x2048, 0xa804,
+	0x2048, 0xa804, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8,
+	0x20a9, 0x002a, 0x080c, 0x0f9f, 0x2100, 0x2238, 0x2061, 0x18ae,
+	0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x2009, 0x002a, 0x0804,
+	0x48c6, 0x81ff, 0x1904, 0x33b0, 0x798c, 0x2001, 0x194e, 0x918c,
+	0x8000, 0x2102, 0x080c, 0x4891, 0x0904, 0x33b3, 0x080c, 0x6666,
+	0x0120, 0x080c, 0x666e, 0x1904, 0x33b3, 0x080c, 0x6332, 0x0904,
+	0x33b0, 0x0126, 0x2091, 0x8000, 0x080c, 0x64cb, 0x012e, 0x0904,
+	0x33b0, 0x2001, 0x194e, 0x2004, 0xd0fc, 0x1904, 0x337e, 0x0804,
+	0x4328, 0xa9a0, 0x2001, 0x194e, 0x918c, 0x8000, 0xc18d, 0x2102,
+	0x080c, 0x489e, 0x01a0, 0x080c, 0x6666, 0x0118, 0x080c, 0x666e,
+	0x1170, 0x080c, 0x6332, 0x2009, 0x0002, 0x0128, 0x080c, 0x64cb,
+	0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
+	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
+	0x4000, 0x2001, 0x194e, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x5390,
+	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
+	0x0005, 0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904, 0x429d, 0x080c,
+	0x48ad, 0x0904, 0x33b3, 0x080c, 0x487a, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x33b0, 0x080c, 0x6666, 0x0130, 0x908e, 0x0004, 0x0118,
+	0x908e, 0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c,
+	0xb802, 0x0028, 0x080c, 0x5388, 0xd0b4, 0x0904, 0x42d7, 0x7884,
+	0x908e, 0x007e, 0x0904, 0x42d7, 0x908e, 0x007f, 0x0904, 0x42d7,
+	0x908e, 0x0080, 0x0904, 0x42d7, 0xb800, 0xd08c, 0x1904, 0x42d7,
+	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xba11, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x33b0, 0x7007, 0x0003, 0x701f, 0x4fa1,
+	0x0005, 0x080c, 0x48ad, 0x0904, 0x33b3, 0x0804, 0x42d7, 0x080c,
+	0x3175, 0x0108, 0x0005, 0x2009, 0x1833, 0x210c, 0x81ff, 0x0120,
+	0x2009, 0x0001, 0x0804, 0x33b0, 0x080c, 0x539c, 0x0120, 0x2009,
+	0x0007, 0x0804, 0x33b0, 0x080c, 0x665e, 0x0120, 0x2009, 0x0008,
+	0x0804, 0x33b0, 0xb89c, 0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x42d7,
+	0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xba79,
+	0x1120, 0x2009, 0x0003, 0x0804, 0x33b0, 0x7007, 0x0003, 0x701f,
+	0x4fda, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004,
+	0x0804, 0x52e5, 0x080c, 0x48ad, 0x0904, 0x33b3, 0x0804, 0x4f73,
+	0x81ff, 0x2009, 0x0001, 0x1904, 0x33b0, 0x080c, 0x539c, 0x2009,
+	0x0007, 0x1904, 0x33b0, 0x080c, 0x665e, 0x0120, 0x2009, 0x0008,
+	0x0804, 0x33b0, 0x080c, 0x48ad, 0x0904, 0x33b3, 0x080c, 0x6666,
+	0x2009, 0x0009, 0x1904, 0x33b0, 0x080c, 0x487a, 0x2009, 0x0002,
+	0x0904, 0x33b0, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
+	0x7988, 0x9194, 0xff00, 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128,
+	0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038, 0x928e, 0x0100, 0x1904,
+	0x33b3, 0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c, 0xbcdc, 0x2009,
+	0x0003, 0x0904, 0x33b0, 0x7007, 0x0003, 0x701f, 0x5030, 0x0005,
+	0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x33b0, 0x0804,
+	0x337e, 0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c,
+	0x539c, 0x1188, 0x2009, 0x0014, 0x0804, 0x33b0, 0xd2dc, 0x1568,
+	0x81ff, 0x2009, 0x0001, 0x1904, 0x33b0, 0x080c, 0x539c, 0x2009,
+	0x0007, 0x1904, 0x33b0, 0xd2f4, 0x0130, 0x9284, 0x5000, 0x080c,
+	0x5363, 0x0804, 0x337e, 0xd2fc, 0x0158, 0x080c, 0x48ad, 0x0904,
+	0x33b3, 0x7984, 0x9284, 0x9000, 0x080c, 0x5340, 0x0804, 0x337e,
+	0x080c, 0x48ad, 0x0904, 0x33b3, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x2009, 0x0009, 0x1904, 0x5119, 0x080c, 0x487a, 0x2009,
+	0x0002, 0x0904, 0x5119, 0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009,
+	0x0008, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x48c3, 0x701f,
+	0x508a, 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138, 0xa870, 0x9005,
+	0x1120, 0xa874, 0x9084, 0xff00, 0x0110, 0x1904, 0x33b3, 0xa866,
+	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x48ad, 0x1110, 0x0804,
+	0x33b3, 0x2009, 0x0043, 0x080c, 0xbd44, 0x2009, 0x0003, 0x0904,
+	0x5119, 0x7007, 0x0003, 0x701f, 0x50ae, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x2009, 0x0004, 0x0904, 0x5119, 0x7984, 0x7aa8, 0x9284,
+	0x1000, 0x080c, 0x5340, 0x0804, 0x337e, 0x00c6, 0xaab0, 0x9284,
+	0xc000, 0x0140, 0xd2ec, 0x0168, 0x080c, 0x539c, 0x1150, 0x2009,
+	0x0014, 0x04f0, 0x2061, 0x1800, 0x080c, 0x539c, 0x2009, 0x0007,
+	0x15b8, 0xd2f4, 0x0128, 0x9284, 0x5000, 0x080c, 0x5363, 0x0050,
+	0xd2fc, 0x0178, 0x080c, 0x48ab, 0x0588, 0xa998, 0x9284, 0x9000,
+	0x080c, 0x5340, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
+	0x0438, 0x080c, 0x48ab, 0x0510, 0x080c, 0x6666, 0x2009, 0x0009,
+	0x11b8, 0xa8c4, 0x9086, 0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0,
+	0xa8cc, 0x9084, 0xff00, 0x1190, 0x080c, 0x48ab, 0x1108, 0x0070,
+	0x2009, 0x004b, 0x080c, 0xbd44, 0x2009, 0x0003, 0x0108, 0x0078,
+	0x0429, 0x19c0, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ce, 0x0005, 0x9006,
+	0x0ce0, 0x7aa8, 0xd2dc, 0x0904, 0x33b0, 0x0016, 0x7984, 0x9284,
+	0x1000, 0xc0fd, 0x080c, 0x5340, 0x001e, 0x1904, 0x33b0, 0x0804,
+	0x337e, 0x00f6, 0x2d78, 0x0011, 0x00fe, 0x0005, 0xaab0, 0xd2dc,
+	0x0150, 0x0016, 0xa998, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5340,
+	0x001e, 0x9085, 0x0001, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x33b0, 0x080c, 0x539c, 0x0120, 0x2009, 0x0007, 0x0804,
+	0x33b0, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x626b, 0x1904,
+	0x33b3, 0x9186, 0x007f, 0x0138, 0x080c, 0x6666, 0x0120, 0x2009,
+	0x0009, 0x0804, 0x33b0, 0x080c, 0x487a, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x33b0, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001,
+	0x0100, 0x8007, 0xa80a, 0x080c, 0xba2b, 0x1120, 0x2009, 0x0003,
+	0x0804, 0x33b0, 0x7007, 0x0003, 0x701f, 0x5177, 0x0005, 0xa808,
+	0x8007, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x33b0,
+	0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814,
+	0x8007, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0002, 0x9108, 0x8906,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x48c6, 0x080c, 0x487a,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x33b0, 0x7984, 0x9194, 0xff00,
+	0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023, 0x1983, 0x0040,
+	0x92c6, 0x0001, 0x1118, 0x7023, 0x199d, 0x0010, 0x0804, 0x33b3,
+	0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
+	0x0019, 0xaf60, 0x080c, 0x48c3, 0x701f, 0x51c7, 0x0005, 0x2001,
+	0x182d, 0x2003, 0x0001, 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860,
+	0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003,
+	0x0804, 0x337e, 0x080c, 0x487a, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x33b0, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff,
+	0x1118, 0x2099, 0x1983, 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099,
+	0x199d, 0x0010, 0x0804, 0x33b3, 0xa85c, 0x9080, 0x0019, 0x20a0,
+	0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009,
+	0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019,
+	0xaf60, 0x0804, 0x48c6, 0x7884, 0x908a, 0x1000, 0x1a04, 0x33b3,
+	0x0126, 0x2091, 0x8000, 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6,
+	0x2061, 0x19d3, 0x6142, 0x00ce, 0x012e, 0x0804, 0x337e, 0x00c6,
+	0x080c, 0x7096, 0x1160, 0x080c, 0x7396, 0x080c, 0x5cd7, 0x9085,
+	0x0001, 0x080c, 0x70dd, 0x080c, 0x6fc7, 0x080c, 0x0d65, 0x2061,
+	0x1800, 0x6030, 0xc09d, 0x6032, 0x080c, 0x5b92, 0x00ce, 0x0005,
+	0x00c6, 0x2001, 0x1800, 0x2004, 0x908e, 0x0000, 0x0904, 0x33b0,
+	0x7884, 0x9005, 0x0188, 0x7888, 0x2061, 0x196c, 0x2c0c, 0x2062,
+	0x080c, 0x2820, 0x01a0, 0x080c, 0x2828, 0x0188, 0x080c, 0x2830,
+	0x0170, 0x2162, 0x0804, 0x33b3, 0x2061, 0x0100, 0x6038, 0x9086,
+	0x0007, 0x1118, 0x2009, 0x0001, 0x0010, 0x2009, 0x0000, 0x7884,
+	0x9086, 0x0002, 0x1588, 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a,
+	0x080c, 0x98bb, 0x0026, 0x2011, 0x0003, 0x080c, 0x931c, 0x2011,
+	0x0002, 0x080c, 0x9326, 0x002e, 0x080c, 0x91e9, 0x0036, 0x901e,
+	0x080c, 0x9269, 0x003e, 0x080c, 0x98d7, 0x60e3, 0x0000, 0x080c,
+	0xd60c, 0x080c, 0xd627, 0x9085, 0x0001, 0x080c, 0x70dd, 0x9006,
+	0x080c, 0x2852, 0x2001, 0x1800, 0x2003, 0x0004, 0x0026, 0x2011,
+	0x0008, 0x080c, 0x288c, 0x002e, 0x00ce, 0x0804, 0x337e, 0x81ff,
+	0x0120, 0x2009, 0x0001, 0x0804, 0x33b0, 0x080c, 0x539c, 0x0120,
+	0x2009, 0x0007, 0x0804, 0x33b0, 0x7984, 0x7ea8, 0x96b4, 0x00ff,
+	0x080c, 0x626b, 0x1904, 0x33b3, 0x9186, 0x007f, 0x0138, 0x080c,
+	0x6666, 0x0120, 0x2009, 0x0009, 0x0804, 0x33b0, 0x080c, 0x487a,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x33b0, 0xa867, 0x0000, 0xa868,
+	0xc0fd, 0xa86a, 0x080c, 0xba2e, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x33b0, 0x7007, 0x0003, 0x701f, 0x52ce, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x33b0, 0xa8e0, 0xa866,
+	0xa834, 0x8007, 0x800c, 0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0xaf60, 0x0804, 0x48c6, 0xa898, 0x9086, 0x000d,
+	0x1904, 0x33b0, 0x2021, 0x4005, 0x0126, 0x2091, 0x8000, 0x0e04,
+	0x52f2, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118,
+	0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7883, 0x4005, 0xa998,
+	0x7986, 0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c, 0x48b6, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11c9, 0x7007,
+	0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x00c6, 0x2061, 0x19d3, 0x7984, 0x6152, 0x614e,
+	0x6057, 0x0000, 0x604b, 0x0009, 0x7898, 0x606a, 0x789c, 0x6066,
+	0x7888, 0x6062, 0x788c, 0x605e, 0x2001, 0x19e1, 0x2044, 0x2001,
+	0x19e8, 0xa076, 0xa060, 0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002,
+	0xa06b, 0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e, 0x0804, 0x337e,
+	0x0126, 0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0128,
+	0x0006, 0x080c, 0xb88f, 0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180,
+	0x1000, 0x2004, 0x905d, 0x0160, 0x080c, 0x5cf1, 0x080c, 0x9b59,
+	0x0110, 0xb817, 0x0000, 0x9006, 0x00ce, 0x00be, 0x012e, 0x0005,
+	0x9085, 0x0001, 0x0cc8, 0x0126, 0x2091, 0x8000, 0x0156, 0x2010,
+	0x900e, 0x20a9, 0x0800, 0x0016, 0x9180, 0x1000, 0x2004, 0x9005,
+	0x0180, 0x9186, 0x007e, 0x0168, 0x9186, 0x007f, 0x0150, 0x9186,
+	0x0080, 0x0138, 0x9186, 0x00ff, 0x0120, 0x0026, 0x2200, 0x0801,
+	0x002e, 0x001e, 0x8108, 0x1f04, 0x536b, 0x015e, 0x012e, 0x0005,
+	0x2001, 0x1854, 0x2004, 0x0005, 0x2001, 0x1873, 0x2004, 0x0005,
+	0x0006, 0x2001, 0x1810, 0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001,
+	0x180e, 0x2004, 0xd0b4, 0x0005, 0x2001, 0x1800, 0x2004, 0x9086,
+	0x0003, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1894, 0x7108, 0x910d,
+	0x710a, 0x00ee, 0x001e, 0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04,
+	0x33b3, 0x810c, 0x0016, 0x080c, 0x487a, 0x080c, 0x0f2a, 0x2100,
+	0x2238, 0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e, 0x080c, 0x48c3,
+	0x701f, 0x53c3, 0x0005, 0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8,
+	0x7aac, 0x79a4, 0x810c, 0x2061, 0x18ae, 0x2c44, 0xa770, 0xa074,
+	0x2071, 0x1894, 0x080c, 0x48c6, 0x701f, 0x53d7, 0x0005, 0x2061,
+	0x18ae, 0x2c44, 0x0016, 0x0026, 0xa270, 0xa174, 0x080c, 0x0f32,
+	0x002e, 0x001e, 0x080c, 0x0fdf, 0x9006, 0xa802, 0xa806, 0x0804,
+	0x337e, 0x0126, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, 0x2071,
+	0x1800, 0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, 0x5592,
+	0x0068, 0xd08c, 0x0118, 0x080c, 0x549b, 0x0040, 0xd094, 0x0118,
+	0x080c, 0x546b, 0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x012e,
+	0x0005, 0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e,
+	0x0c68, 0x0006, 0x7094, 0x9005, 0x000e, 0x0120, 0x7097, 0x0000,
+	0x708f, 0x0000, 0x624c, 0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086,
+	0xf0f0, 0x0130, 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0490,
+	0x9294, 0xff00, 0x9296, 0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160,
+	0x6240, 0x9295, 0x0100, 0x6242, 0x9294, 0x0010, 0x0128, 0x2009,
+	0x00f7, 0x080c, 0x5c53, 0x00f0, 0x6040, 0x9084, 0x0010, 0x9085,
+	0x0140, 0x6042, 0x6043, 0x0000, 0x7083, 0x0000, 0x709f, 0x0001,
+	0x70c3, 0x0000, 0x70db, 0x0000, 0x2009, 0x1d80, 0x200b, 0x0000,
+	0x7093, 0x0000, 0x7087, 0x000f, 0x2009, 0x000f, 0x2011, 0x5b35,
+	0x080c, 0x81fc, 0x0005, 0x2001, 0x1875, 0x2004, 0xd08c, 0x0110,
+	0x705b, 0xffff, 0x7084, 0x9005, 0x1528, 0x2011, 0x5b35, 0x080c,
+	0x8138, 0x6040, 0x9094, 0x0010, 0x9285, 0x0020, 0x6042, 0x20a9,
+	0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04, 0x5481, 0x6242, 0x7097,
+	0x0000, 0x6040, 0x9094, 0x0010, 0x9285, 0x0080, 0x6042, 0x6242,
+	0x0048, 0x6242, 0x7097, 0x0000, 0x708b, 0x0000, 0x9006, 0x080c,
+	0x5cdc, 0x0000, 0x0005, 0x7088, 0x908a, 0x0003, 0x1a0c, 0x0d65,
+	0x000b, 0x0005, 0x54a5, 0x54f6, 0x5591, 0x00f6, 0x0016, 0x6900,
+	0x918c, 0x0800, 0x708b, 0x0001, 0x2001, 0x015d, 0x2003, 0x0000,
+	0x6803, 0x00fc, 0x20a9, 0x0004, 0x6800, 0x9084, 0x00fc, 0x0120,
+	0x1f04, 0x54b4, 0x080c, 0x0d65, 0x68a0, 0x68a2, 0x689c, 0x689e,
+	0x6898, 0x689a, 0xa001, 0x918d, 0x1600, 0x6902, 0x001e, 0x6837,
+	0x0020, 0x080c, 0x5cb8, 0x2079, 0x1d00, 0x7833, 0x1101, 0x7837,
+	0x0000, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1,
+	0x1d0e, 0x20a9, 0x0004, 0x4003, 0x080c, 0x97e8, 0x20e1, 0x0001,
+	0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014,
+	0x4003, 0x60c3, 0x000c, 0x600f, 0x0000, 0x080c, 0x5b66, 0x00fe,
+	0x9006, 0x708e, 0x6043, 0x0008, 0x6042, 0x0005, 0x00f6, 0x708c,
+	0x708f, 0x0000, 0x9025, 0x0904, 0x556e, 0x6020, 0xd0b4, 0x1904,
+	0x556c, 0x719c, 0x81ff, 0x0904, 0x555a, 0x9486, 0x000c, 0x1904,
+	0x5567, 0x9480, 0x0018, 0x8004, 0x20a8, 0x080c, 0x5cb1, 0x2011,
+	0x0260, 0x2019, 0x1d00, 0x220c, 0x2304, 0x9106, 0x11e8, 0x8210,
+	0x8318, 0x1f04, 0x5513, 0x6043, 0x0004, 0x2061, 0x0140, 0x605b,
+	0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0006, 0x708b,
+	0x0002, 0x7097, 0x0002, 0x2009, 0x07d0, 0x2011, 0x5b3c, 0x080c,
+	0x81fc, 0x080c, 0x5cb8, 0x04c0, 0x080c, 0x5cb1, 0x2079, 0x0260,
+	0x7930, 0x918e, 0x1101, 0x1558, 0x7834, 0x9005, 0x1540, 0x7900,
+	0x918c, 0x00ff, 0x1118, 0x7804, 0x9005, 0x0190, 0x080c, 0x5cb1,
+	0x2011, 0x026e, 0x2019, 0x1805, 0x20a9, 0x0004, 0x220c, 0x2304,
+	0x9102, 0x0230, 0x11a0, 0x8210, 0x8318, 0x1f04, 0x554e, 0x0078,
+	0x709f, 0x0000, 0x080c, 0x5cb1, 0x20e1, 0x0000, 0x2099, 0x0260,
+	0x20e9, 0x0001, 0x20a1, 0x1d00, 0x20a9, 0x0014, 0x4003, 0x6043,
+	0x0008, 0x6043, 0x0000, 0x0010, 0x00fe, 0x0005, 0x6040, 0x9085,
+	0x0100, 0x6042, 0x6020, 0xd0b4, 0x1db8, 0x080c, 0x97e8, 0x20e1,
+	0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
+	0x0014, 0x4003, 0x60c3, 0x000c, 0x2011, 0x19c4, 0x2013, 0x0000,
+	0x708f, 0x0000, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x8f8f,
+	0x08d8, 0x0005, 0x7094, 0x908a, 0x001d, 0x1a0c, 0x0d65, 0x000b,
+	0x0005, 0x55c3, 0x55d6, 0x55ff, 0x561f, 0x5645, 0x5674, 0x569a,
+	0x56d2, 0x56f8, 0x5726, 0x5761, 0x5799, 0x57b7, 0x57e2, 0x5804,
+	0x581f, 0x5829, 0x585d, 0x5883, 0x58b2, 0x58d8, 0x5910, 0x5954,
+	0x5991, 0x59b2, 0x5a0b, 0x5a2d, 0x5a5b, 0x5a5b, 0x00c6, 0x2061,
+	0x1800, 0x6003, 0x0007, 0x2061, 0x0100, 0x6004, 0x9084, 0xfff9,
+	0x6006, 0x00ce, 0x0005, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f,
+	0xf0f0, 0x2061, 0x0100, 0x6043, 0x0002, 0x7097, 0x0001, 0x2009,
+	0x07d0, 0x2011, 0x5b3c, 0x080c, 0x81fc, 0x0005, 0x00f6, 0x708c,
+	0x9086, 0x0014, 0x1510, 0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c,
+	0x5cb1, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834,
+	0x9005, 0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110,
+	0x70c3, 0x0001, 0x2011, 0x5b3c, 0x080c, 0x8138, 0x7097, 0x0010,
+	0x080c, 0x5829, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6,
+	0x7097, 0x0003, 0x6043, 0x0004, 0x2011, 0x5b3c, 0x080c, 0x8138,
+	0x080c, 0x5c35, 0x2079, 0x0240, 0x7833, 0x1102, 0x7837, 0x0000,
+	0x20a9, 0x0008, 0x9f88, 0x000e, 0x200b, 0x0000, 0x8108, 0x1f04,
+	0x5614, 0x60c3, 0x0014, 0x080c, 0x5b66, 0x00fe, 0x0005, 0x00f6,
+	0x708c, 0x9005, 0x0500, 0x2011, 0x5b3c, 0x080c, 0x8138, 0x9086,
+	0x0014, 0x11b8, 0x080c, 0x5cb1, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x1102, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
+	0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0004, 0x0029,
+	0x0010, 0x080c, 0x5c8d, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0005,
+	0x080c, 0x5c35, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000,
+	0x080c, 0x5cb1, 0x080c, 0x5c94, 0x1170, 0x7080, 0x9005, 0x1158,
+	0x7158, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5ae9,
+	0x0168, 0x080c, 0x5c6a, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
+	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
+	0x080c, 0x5b66, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500,
+	0x2011, 0x5b3c, 0x080c, 0x8138, 0x9086, 0x0014, 0x11b8, 0x080c,
+	0x5cb1, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834,
 	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110,
-	0x70c3, 0x0001, 0x7097, 0x0004, 0x0029, 0x0010, 0x080c, 0x5c92,
-	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0005, 0x080c, 0x5c3a, 0x2079,
-	0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5cb6, 0x080c,
-	0x5c99, 0x1170, 0x7080, 0x9005, 0x1158, 0x7158, 0x9186, 0xffff,
-	0x0138, 0x2011, 0x0008, 0x080c, 0x5aee, 0x0168, 0x080c, 0x5c6f,
-	0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
-	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b6b, 0x00fe,
-	0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b41, 0x080c,
-	0x8159, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cb6, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
-	0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097,
-	0x0006, 0x0029, 0x0010, 0x080c, 0x5c92, 0x00fe, 0x0005, 0x00f6,
-	0x7097, 0x0007, 0x080c, 0x5c3a, 0x2079, 0x0240, 0x7833, 0x1104,
-	0x7837, 0x0000, 0x080c, 0x5cb6, 0x080c, 0x5c99, 0x11b8, 0x7080,
-	0x9005, 0x11a0, 0x7160, 0x9186, 0xffff, 0x0180, 0x9180, 0x318b,
-	0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5aee,
-	0x0180, 0x080c, 0x4c97, 0x0110, 0x080c, 0x248d, 0x20a9, 0x0008,
-	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
-	0x4003, 0x60c3, 0x0014, 0x080c, 0x5b6b, 0x00fe, 0x0005, 0x00f6,
-	0x708c, 0x9005, 0x0500, 0x2011, 0x5b41, 0x080c, 0x8159, 0x9086,
-	0x0014, 0x11b8, 0x080c, 0x5cb6, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
-	0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0008, 0x0029,
-	0x0010, 0x080c, 0x5c92, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0009,
-	0x080c, 0x5c3a, 0x2079, 0x0240, 0x7833, 0x1105, 0x7837, 0x0100,
-	0x080c, 0x5c99, 0x1150, 0x7080, 0x9005, 0x1138, 0x080c, 0x5a61,
-	0x1188, 0x9085, 0x0001, 0x080c, 0x248d, 0x20a9, 0x0008, 0x080c,
-	0x5cb6, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1,
-	0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b6b, 0x0010, 0x080c,
-	0x55bb, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x05a8, 0x2011,
-	0x5b41, 0x080c, 0x8159, 0x9086, 0x0014, 0x1560, 0x080c, 0x5cb6,
-	0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1520, 0x7834, 0x9084,
-	0x0100, 0x2011, 0x0100, 0x921e, 0x1160, 0x7a38, 0xd2fc, 0x0128,
-	0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x000a, 0x00b1,
-	0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005,
-	0x1110, 0x70c3, 0x0001, 0x7093, 0x0000, 0x7097, 0x000e, 0x080c,
-	0x5809, 0x0010, 0x080c, 0x5c92, 0x00fe, 0x0005, 0x00f6, 0x7097,
-	0x000b, 0x2011, 0x1d0e, 0x20e9, 0x0001, 0x22a0, 0x20a9, 0x0040,
-	0x2019, 0xffff, 0x4304, 0x080c, 0x5c3a, 0x2079, 0x0240, 0x7833,
-	0x1106, 0x7837, 0x0000, 0x080c, 0x5c99, 0x0118, 0x2013, 0x0000,
-	0x0020, 0x705c, 0x9085, 0x0100, 0x2012, 0x20a9, 0x0040, 0x2009,
-	0x024e, 0x2011, 0x1d0e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260,
-	0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x578b,
-	0x60c3, 0x0084, 0x080c, 0x5b6b, 0x00fe, 0x0005, 0x00f6, 0x708c,
-	0x9005, 0x01c0, 0x2011, 0x5b41, 0x080c, 0x8159, 0x9086, 0x0084,
-	0x1178, 0x080c, 0x5cb6, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106,
-	0x1138, 0x7834, 0x9005, 0x1120, 0x7097, 0x000c, 0x0029, 0x0010,
-	0x080c, 0x5c92, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x000d, 0x080c,
-	0x5c3a, 0x2079, 0x0240, 0x7833, 0x1107, 0x7837, 0x0000, 0x080c,
-	0x5cb6, 0x20a9, 0x0040, 0x2011, 0x026e, 0x2009, 0x024e, 0x220e,
-	0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812,
-	0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04,
-	0x57cf, 0x60c3, 0x0084, 0x080c, 0x5b6b, 0x00fe, 0x0005, 0x00f6,
-	0x708c, 0x9005, 0x01e0, 0x2011, 0x5b41, 0x080c, 0x8159, 0x9086,
-	0x0084, 0x1198, 0x080c, 0x5cb6, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7093, 0x0001, 0x080c,
-	0x5c0c, 0x7097, 0x000e, 0x0029, 0x0010, 0x080c, 0x5c92, 0x00fe,
-	0x0005, 0x918d, 0x0001, 0x080c, 0x5ce1, 0x7097, 0x000f, 0x708f,
-	0x0000, 0x2061, 0x0140, 0x605b, 0xbc85, 0x605f, 0xb5b5, 0x2061,
-	0x0100, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009, 0x07d0, 0x2011,
-	0x5b41, 0x080c, 0x814d, 0x0005, 0x708c, 0x9005, 0x0130, 0x2011,
-	0x5b41, 0x080c, 0x8159, 0x7097, 0x0000, 0x0005, 0x7097, 0x0011,
-	0x080c, 0x97fa, 0x080c, 0x5cb6, 0x20e1, 0x0000, 0x2099, 0x0260,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x748c, 0x9480, 0x0018, 0x9080,
-	0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x4003, 0x080c, 0x5c99,
-	0x11a0, 0x7178, 0x81ff, 0x0188, 0x900e, 0x707c, 0x9084, 0x00ff,
-	0x0160, 0x080c, 0x2424, 0x9186, 0x007e, 0x0138, 0x9186, 0x0080,
-	0x0120, 0x2011, 0x0008, 0x080c, 0x5aee, 0x60c3, 0x0014, 0x080c,
-	0x5b6b, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b41,
-	0x080c, 0x8159, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cb6, 0x2079,
-	0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160,
+	0x70c3, 0x0001, 0x7097, 0x0006, 0x0029, 0x0010, 0x080c, 0x5c8d,
+	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0007, 0x080c, 0x5c35, 0x2079,
+	0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x5cb1, 0x080c,
+	0x5c94, 0x11b8, 0x7080, 0x9005, 0x11a0, 0x7160, 0x9186, 0xffff,
+	0x0180, 0x9180, 0x317f, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011,
+	0x0008, 0x080c, 0x5ae9, 0x0180, 0x080c, 0x4c92, 0x0110, 0x080c,
+	0x24a6, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b66,
+	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b3c,
+	0x080c, 0x8138, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cb1, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160,
+	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
+	0x7097, 0x0008, 0x0029, 0x0010, 0x080c, 0x5c8d, 0x00fe, 0x0005,
+	0x00f6, 0x7097, 0x0009, 0x080c, 0x5c35, 0x2079, 0x0240, 0x7833,
+	0x1105, 0x7837, 0x0100, 0x080c, 0x5c94, 0x1150, 0x7080, 0x9005,
+	0x1138, 0x080c, 0x5a5c, 0x1188, 0x9085, 0x0001, 0x080c, 0x24a6,
+	0x20a9, 0x0008, 0x080c, 0x5cb1, 0x20e1, 0x0000, 0x2099, 0x026e,
+	0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c,
+	0x5b66, 0x0010, 0x080c, 0x55b6, 0x00fe, 0x0005, 0x00f6, 0x708c,
+	0x9005, 0x05a8, 0x2011, 0x5b3c, 0x080c, 0x8138, 0x9086, 0x0014,
+	0x1560, 0x080c, 0x5cb1, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105,
+	0x1520, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1160,
+	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
+	0x7097, 0x000a, 0x00b1, 0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc,
+	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7093, 0x0000,
+	0x7097, 0x000e, 0x080c, 0x5804, 0x0010, 0x080c, 0x5c8d, 0x00fe,
+	0x0005, 0x00f6, 0x7097, 0x000b, 0x2011, 0x1d0e, 0x20e9, 0x0001,
+	0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, 0x4304, 0x080c, 0x5c35,
+	0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5c94,
+	0x0118, 0x2013, 0x0000, 0x0020, 0x705c, 0x9085, 0x0100, 0x2012,
+	0x20a9, 0x0040, 0x2009, 0x024e, 0x2011, 0x1d0e, 0x220e, 0x8210,
+	0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009,
+	0x0240, 0x1f04, 0x5786, 0x60c3, 0x0084, 0x080c, 0x5b66, 0x00fe,
+	0x0005, 0x00f6, 0x708c, 0x9005, 0x01c0, 0x2011, 0x5b3c, 0x080c,
+	0x8138, 0x9086, 0x0084, 0x1178, 0x080c, 0x5cb1, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1106, 0x1138, 0x7834, 0x9005, 0x1120, 0x7097,
+	0x000c, 0x0029, 0x0010, 0x080c, 0x5c8d, 0x00fe, 0x0005, 0x00f6,
+	0x7097, 0x000d, 0x080c, 0x5c35, 0x2079, 0x0240, 0x7833, 0x1107,
+	0x7837, 0x0000, 0x080c, 0x5cb1, 0x20a9, 0x0040, 0x2011, 0x026e,
+	0x2009, 0x024e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150,
+	0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816,
+	0x2011, 0x0260, 0x1f04, 0x57ca, 0x60c3, 0x0084, 0x080c, 0x5b66,
+	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011, 0x5b3c,
+	0x080c, 0x8138, 0x9086, 0x0084, 0x1198, 0x080c, 0x5cb1, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140,
+	0x7093, 0x0001, 0x080c, 0x5c07, 0x7097, 0x000e, 0x0029, 0x0010,
+	0x080c, 0x5c8d, 0x00fe, 0x0005, 0x918d, 0x0001, 0x080c, 0x5cdc,
+	0x7097, 0x000f, 0x708f, 0x0000, 0x2061, 0x0140, 0x605b, 0xbc85,
+	0x605f, 0xb5b5, 0x2061, 0x0100, 0x6043, 0x0005, 0x6043, 0x0004,
+	0x2009, 0x07d0, 0x2011, 0x5b3c, 0x080c, 0x812c, 0x0005, 0x708c,
+	0x9005, 0x0130, 0x2011, 0x5b3c, 0x080c, 0x8138, 0x7097, 0x0000,
+	0x0005, 0x7097, 0x0011, 0x080c, 0x97e8, 0x080c, 0x5cb1, 0x20e1,
+	0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x748c,
+	0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8,
+	0x4003, 0x080c, 0x5c94, 0x11a0, 0x7178, 0x81ff, 0x0188, 0x900e,
+	0x707c, 0x9084, 0x00ff, 0x0160, 0x080c, 0x243d, 0x9186, 0x007e,
+	0x0138, 0x9186, 0x0080, 0x0120, 0x2011, 0x0008, 0x080c, 0x5ae9,
+	0x60c3, 0x0014, 0x080c, 0x5b66, 0x0005, 0x00f6, 0x708c, 0x9005,
+	0x0500, 0x2011, 0x5b3c, 0x080c, 0x8138, 0x9086, 0x0014, 0x11b8,
+	0x080c, 0x5cb1, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178,
+	0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005,
+	0x1110, 0x70c3, 0x0001, 0x7097, 0x0012, 0x0029, 0x0010, 0x708f,
+	0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0013, 0x080c, 0x5c43,
+	0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5cb1,
+	0x080c, 0x5c94, 0x1170, 0x7080, 0x9005, 0x1158, 0x7158, 0x9186,
+	0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5ae9, 0x0168, 0x080c,
+	0x5c6a, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b66,
+	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b3c,
+	0x080c, 0x8138, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cb1, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160,
 	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
-	0x7097, 0x0012, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005,
-	0x00f6, 0x7097, 0x0013, 0x080c, 0x5c48, 0x2079, 0x0240, 0x7833,
-	0x1103, 0x7837, 0x0000, 0x080c, 0x5cb6, 0x080c, 0x5c99, 0x1170,
-	0x7080, 0x9005, 0x1158, 0x7158, 0x9186, 0xffff, 0x0138, 0x2011,
-	0x0008, 0x080c, 0x5aee, 0x0168, 0x080c, 0x5c6f, 0x20a9, 0x0008,
+	0x7097, 0x0014, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005,
+	0x00f6, 0x7097, 0x0015, 0x080c, 0x5c43, 0x2079, 0x0240, 0x7833,
+	0x1104, 0x7837, 0x0000, 0x080c, 0x5cb1, 0x080c, 0x5c94, 0x11b8,
+	0x7080, 0x9005, 0x11a0, 0x7160, 0x9186, 0xffff, 0x0180, 0x9180,
+	0x317f, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c,
+	0x5ae9, 0x0180, 0x080c, 0x4c92, 0x0110, 0x080c, 0x24a6, 0x20a9,
+	0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1,
+	0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b66, 0x00fe, 0x0005,
+	0x00f6, 0x708c, 0x9005, 0x05f0, 0x2011, 0x5b3c, 0x080c, 0x8138,
+	0x9086, 0x0014, 0x15a8, 0x080c, 0x5cb1, 0x2079, 0x0260, 0x7a30,
+	0x9296, 0x1105, 0x1568, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100,
+	0x921e, 0x1168, 0x9085, 0x0001, 0x080c, 0x5cdc, 0x7a38, 0xd2fc,
+	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x0080, 0x9005,
+	0x11b8, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3,
+	0x0001, 0x9085, 0x0001, 0x080c, 0x5cdc, 0x7093, 0x0000, 0x7a38,
+	0xd2f4, 0x0110, 0x70db, 0x0008, 0x7097, 0x0016, 0x0029, 0x0010,
+	0x708f, 0x0000, 0x00fe, 0x0005, 0x080c, 0x97e8, 0x080c, 0x5cb1,
+	0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240,
+	0x20a9, 0x000e, 0x4003, 0x2011, 0x026d, 0x2204, 0x9084, 0x0100,
+	0x2011, 0x024d, 0x2012, 0x2011, 0x026e, 0x7097, 0x0017, 0x080c,
+	0x5c94, 0x1150, 0x7080, 0x9005, 0x1138, 0x080c, 0x5a5c, 0x1188,
+	0x9085, 0x0001, 0x080c, 0x24a6, 0x20a9, 0x0008, 0x080c, 0x5cb1,
 	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
-	0x4003, 0x60c3, 0x0014, 0x080c, 0x5b6b, 0x00fe, 0x0005, 0x00f6,
-	0x708c, 0x9005, 0x0500, 0x2011, 0x5b41, 0x080c, 0x8159, 0x9086,
-	0x0014, 0x11b8, 0x080c, 0x5cb6, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
-	0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0014, 0x0029,
-	0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0015,
-	0x080c, 0x5c48, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000,
-	0x080c, 0x5cb6, 0x080c, 0x5c99, 0x11b8, 0x7080, 0x9005, 0x11a0,
-	0x7160, 0x9186, 0xffff, 0x0180, 0x9180, 0x318b, 0x200d, 0x918c,
-	0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5aee, 0x0180, 0x080c,
-	0x4c97, 0x0110, 0x080c, 0x248d, 0x20a9, 0x0008, 0x20e1, 0x0000,
-	0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3,
-	0x0014, 0x080c, 0x5b6b, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005,
-	0x05f0, 0x2011, 0x5b41, 0x080c, 0x8159, 0x9086, 0x0014, 0x15a8,
-	0x080c, 0x5cb6, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1568,
-	0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1168, 0x9085,
-	0x0001, 0x080c, 0x5ce1, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005,
-	0x1110, 0x70c3, 0x0001, 0x0080, 0x9005, 0x11b8, 0x7a38, 0xd2fc,
-	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x9085, 0x0001,
-	0x080c, 0x5ce1, 0x7093, 0x0000, 0x7a38, 0xd2f4, 0x0110, 0x70db,
-	0x0008, 0x7097, 0x0016, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe,
-	0x0005, 0x080c, 0x97fa, 0x080c, 0x5cb6, 0x20e1, 0x0000, 0x2099,
-	0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000e, 0x4003,
-	0x2011, 0x026d, 0x2204, 0x9084, 0x0100, 0x2011, 0x024d, 0x2012,
-	0x2011, 0x026e, 0x7097, 0x0017, 0x080c, 0x5c99, 0x1150, 0x7080,
-	0x9005, 0x1138, 0x080c, 0x5a61, 0x1188, 0x9085, 0x0001, 0x080c,
-	0x248d, 0x20a9, 0x0008, 0x080c, 0x5cb6, 0x20e1, 0x0000, 0x2099,
-	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
-	0x080c, 0x5b6b, 0x0010, 0x080c, 0x55bb, 0x0005, 0x00f6, 0x708c,
-	0x9005, 0x01d8, 0x2011, 0x5b41, 0x080c, 0x8159, 0x9086, 0x0084,
-	0x1190, 0x080c, 0x5cb6, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106,
-	0x1150, 0x7834, 0x9005, 0x1138, 0x9006, 0x080c, 0x5ce1, 0x7097,
-	0x0018, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6,
-	0x7097, 0x0019, 0x080c, 0x5c48, 0x2079, 0x0240, 0x7833, 0x1106,
-	0x7837, 0x0000, 0x080c, 0x5cb6, 0x2009, 0x026e, 0x2039, 0x1d0e,
-	0x20a9, 0x0040, 0x213e, 0x8738, 0x8108, 0x9186, 0x0280, 0x1128,
-	0x6814, 0x8000, 0x6816, 0x2009, 0x0260, 0x1f04, 0x59ca, 0x2039,
-	0x1d0e, 0x080c, 0x5c99, 0x11e8, 0x2728, 0x2514, 0x8207, 0x9084,
-	0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff, 0x8007, 0x9205, 0x202a,
-	0x705c, 0x2310, 0x8214, 0x92a0, 0x1d0e, 0x2414, 0x938c, 0x0001,
-	0x0118, 0x9294, 0xff00, 0x0018, 0x9294, 0x00ff, 0x8007, 0x9215,
-	0x2222, 0x20a9, 0x0040, 0x2009, 0x024e, 0x270e, 0x8738, 0x8108,
-	0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240,
-	0x1f04, 0x59fd, 0x60c3, 0x0084, 0x080c, 0x5b6b, 0x00fe, 0x0005,
-	0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011, 0x5b41, 0x080c, 0x8159,
-	0x9086, 0x0084, 0x1198, 0x080c, 0x5cb6, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7093, 0x0001,
-	0x080c, 0x5c0c, 0x7097, 0x001a, 0x0029, 0x0010, 0x708f, 0x0000,
-	0x00fe, 0x0005, 0x9085, 0x0001, 0x080c, 0x5ce1, 0x7097, 0x001b,
-	0x080c, 0x97fa, 0x080c, 0x5cb6, 0x2011, 0x0260, 0x2009, 0x0240,
-	0x748c, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004,
-	0x20a8, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810,
-	0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011,
-	0x0260, 0x1f04, 0x5a49, 0x60c3, 0x0084, 0x080c, 0x5b6b, 0x0005,
-	0x0005, 0x0086, 0x0096, 0x2029, 0x1854, 0x252c, 0x20a9, 0x0008,
-	0x2041, 0x1d0e, 0x20e9, 0x0001, 0x28a0, 0x080c, 0x5cb6, 0x20e1,
-	0x0000, 0x2099, 0x026e, 0x4003, 0x20a9, 0x0008, 0x2011, 0x0007,
-	0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200, 0x200c, 0x91a6, 0xffff,
-	0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008, 0x8211, 0x1f04, 0x5a7b,
-	0x0804, 0x5aea, 0x82ff, 0x1160, 0xd5d4, 0x0120, 0x91a6, 0x3fff,
-	0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904, 0x5aea, 0x918d, 0xc000,
-	0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010,
-	0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4,
-	0x0110, 0x8319, 0x0008, 0x8318, 0x1f04, 0x5aa1, 0x04d8, 0x23a8,
-	0x2021, 0x0001, 0x8426, 0x8425, 0x1f04, 0x5ab3, 0x2328, 0x8529,
-	0x92be, 0x0007, 0x0158, 0x0006, 0x2039, 0x0007, 0x2200, 0x973a,
-	0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04, 0x5ac2, 0x755a, 0x95c8,
-	0x318b, 0x292d, 0x95ac, 0x00ff, 0x757e, 0x6532, 0x6536, 0x0016,
-	0x2508, 0x080c, 0x246d, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018,
-	0x2304, 0x9405, 0x201a, 0x7083, 0x0001, 0x20e9, 0x0000, 0x20a1,
-	0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9, 0x0008, 0x4003, 0x9085,
-	0x0001, 0x0008, 0x9006, 0x009e, 0x008e, 0x0005, 0x0156, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1, 0x0000, 0x2099, 0x026e,
-	0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0, 0x4003, 0x014e, 0x013e,
-	0x01de, 0x01ce, 0x015e, 0x2118, 0x9026, 0x2001, 0x0007, 0x939a,
-	0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120,
-	0x939a, 0x0010, 0x8421, 0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118,
-	0x8423, 0x8319, 0x1de8, 0x9238, 0x2029, 0x026e, 0x9528, 0x2504,
-	0x942c, 0x11b8, 0x9405, 0x203a, 0x715a, 0x91a0, 0x318b, 0x242d,
-	0x95ac, 0x00ff, 0x757e, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c,
-	0x246d, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x7083, 0x0001, 0x9084,
-	0x0000, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7087, 0x0000, 0x00ee,
-	0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, 0x2071, 0x0140, 0x080c,
-	0x5bfb, 0x080c, 0x8fb7, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c,
-	0x2843, 0x0126, 0x2091, 0x8000, 0x2071, 0x1825, 0x2073, 0x0000,
-	0x7840, 0x0026, 0x0016, 0x2009, 0x00f7, 0x080c, 0x5c58, 0x001e,
-	0x9094, 0x0010, 0x9285, 0x0080, 0x7842, 0x7a42, 0x002e, 0x012e,
-	0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x27a2,
-	0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x2011, 0x19c5,
-	0x2013, 0x0000, 0x708f, 0x0000, 0x012e, 0x60a3, 0x0056, 0x60a7,
-	0x9575, 0x080c, 0x8faa, 0x6144, 0xd184, 0x0120, 0x7194, 0x918d,
-	0x2000, 0x0018, 0x7188, 0x918d, 0x1000, 0x2011, 0x196a, 0x2112,
-	0x2009, 0x07d0, 0x2011, 0x5b41, 0x080c, 0x821d, 0x0005, 0x0016,
-	0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x98c8, 0x080c,
-	0x9b6d, 0x080c, 0x98e4, 0x2009, 0x00f7, 0x080c, 0x5c58, 0x2061,
-	0x19d4, 0x900e, 0x611a, 0x611e, 0x6172, 0x6176, 0x2061, 0x1800,
-	0x6003, 0x0001, 0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010,
-	0x2009, 0x196a, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5bc7,
-	0x080c, 0x814d, 0x012e, 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x0471, 0x2071, 0x0100, 0x080c,
-	0x8fb7, 0x2071, 0x0140, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c,
-	0x2843, 0x080c, 0x70bf, 0x0188, 0x080c, 0x70da, 0x1170, 0x080c,
-	0x73c1, 0x0016, 0x080c, 0x253c, 0x2001, 0x193e, 0x2102, 0x001e,
-	0x080c, 0x73bc, 0x080c, 0x6fe8, 0x0050, 0x2009, 0x0001, 0x080c,
-	0x281f, 0x2001, 0x0001, 0x080c, 0x23c9, 0x080c, 0x5b97, 0x012e,
-	0x000e, 0x00ee, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158,
-	0x0026, 0x0036, 0x2011, 0x8017, 0x2001, 0x196a, 0x201c, 0x080c,
-	0x48d8, 0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001,
-	0x20a1, 0x1d80, 0x080c, 0x5cb6, 0x20e9, 0x0000, 0x2099, 0x026e,
-	0x0099, 0x20a9, 0x0020, 0x080c, 0x5cb0, 0x2099, 0x0260, 0x20a1,
-	0x1d92, 0x0051, 0x20a9, 0x000e, 0x080c, 0x5cb3, 0x2099, 0x0260,
-	0x20a1, 0x1db2, 0x0009, 0x0005, 0x0016, 0x0026, 0x3410, 0x3308,
-	0x2104, 0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, 0x5c30, 0x002e,
-	0x001e, 0x0005, 0x080c, 0x97fa, 0x20e1, 0x0001, 0x2099, 0x1d00,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005,
-	0x080c, 0x97fa, 0x080c, 0x5cb6, 0x20e1, 0x0000, 0x2099, 0x0260,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005,
-	0x00c6, 0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0x1833, 0x2004,
-	0x9005, 0x1138, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x9105,
-	0x0010, 0x9185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016,
-	0x0046, 0x080c, 0x6663, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a,
-	0x080c, 0xd273, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019,
-	0x002a, 0x900e, 0x080c, 0x2fc5, 0x080c, 0xbf61, 0x0140, 0x0036,
-	0x2019, 0xffff, 0x2021, 0x0007, 0x080c, 0x4a75, 0x003e, 0x004e,
-	0x001e, 0x0005, 0x080c, 0x5b97, 0x7097, 0x0000, 0x708f, 0x0000,
-	0x0005, 0x0006, 0x2001, 0x180c, 0x2004, 0xd09c, 0x0100, 0x000e,
-	0x0005, 0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001, 0x0101,
-	0x200c, 0x918d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e, 0x0005,
-	0x2009, 0x0001, 0x0020, 0x2009, 0x0002, 0x0008, 0x900e, 0x6814,
-	0x9084, 0xffc0, 0x910d, 0x6916, 0x0005, 0x00f6, 0x0156, 0x0146,
-	0x01d6, 0x9006, 0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1, 0x1d00,
-	0x4004, 0x2079, 0x1d00, 0x7803, 0x2200, 0x7807, 0x00ef, 0x780f,
-	0x00ef, 0x7813, 0x0138, 0x7823, 0xffff, 0x7827, 0xffff, 0x01de,
-	0x014e, 0x015e, 0x00fe, 0x0005, 0x2001, 0x1800, 0x2003, 0x0001,
-	0x0005, 0x2001, 0x1977, 0x0118, 0x2003, 0x0001, 0x0010, 0x2003,
-	0x0000, 0x0005, 0x0156, 0x20a9, 0x0800, 0x2009, 0x1000, 0x9006,
-	0x200a, 0x8108, 0x1f04, 0x5cf0, 0x015e, 0x0005, 0x00d6, 0x0036,
-	0x0156, 0x0136, 0x0146, 0x2069, 0x1853, 0x9006, 0xb802, 0xb8c6,
-	0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, 0x318b, 0x231d,
-	0x939c, 0x00ff, 0xbb16, 0x0016, 0x0026, 0xb886, 0x080c, 0x9b66,
-	0x1120, 0x9192, 0x007e, 0x1208, 0xbb86, 0x20a9, 0x0004, 0xb8b4,
-	0x20e8, 0xb9b8, 0x9198, 0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9,
-	0x0004, 0x9198, 0x000a, 0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e,
-	0xb842, 0xb8be, 0xb8c2, 0xb85e, 0xb862, 0xb866, 0xb86a, 0xb86f,
-	0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893, 0x0008,
-	0xb896, 0xb89a, 0xb89e, 0xb8ae, 0xb9a2, 0x0096, 0xb8a4, 0x904d,
-	0x0110, 0x080c, 0x1054, 0xb8a7, 0x0000, 0x009e, 0x9006, 0xb84a,
-	0x6810, 0xb83a, 0x680c, 0xb846, 0x6814, 0x9084, 0x00ff, 0xb842,
-	0x014e, 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, 0x2091,
-	0x8000, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04,
-	0x5db4, 0x9182, 0x0800, 0x1a04, 0x5db8, 0x2001, 0x180c, 0x2004,
-	0x9084, 0x0003, 0x1904, 0x5dbe, 0x9188, 0x1000, 0x2104, 0x905d,
-	0x0198, 0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1188, 0xb8a4,
-	0x900d, 0x1904, 0x5dd0, 0x080c, 0x612a, 0x9006, 0x012e, 0x0005,
-	0x2001, 0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e, 0x0498,
-	0x9082, 0x0006, 0x1290, 0x080c, 0x9b66, 0x1160, 0xb8a0, 0x9084,
-	0xff80, 0x1140, 0xb900, 0xd1fc, 0x0d10, 0x2001, 0x0029, 0x2009,
-	0x1000, 0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c, 0x210c,
-	0xd18c, 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118, 0x2001,
-	0x0004, 0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118, 0x2009,
-	0x1000, 0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
-	0x2001, 0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001, 0x180c,
-	0x2004, 0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x9065, 0x09a8,
-	0x080c, 0x6667, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804, 0x5d77,
-	0x080c, 0x64db, 0x0904, 0x5d80, 0x0804, 0x5d7b, 0x00e6, 0x2071,
-	0x19b8, 0x7004, 0x9086, 0x0002, 0x1128, 0x7030, 0x9080, 0x0004,
-	0x2004, 0x9b06, 0x00ee, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091,
-	0x8000, 0xa974, 0x9182, 0x0800, 0x1a04, 0x5e5f, 0x9188, 0x1000,
-	0x2104, 0x905d, 0x0904, 0x5e37, 0xb8a0, 0x9086, 0x007f, 0x0178,
-	0x080c, 0x666f, 0x0160, 0xa994, 0x81ff, 0x0130, 0x908e, 0x0004,
-	0x0130, 0x908e, 0x0005, 0x0118, 0x080c, 0x6667, 0x1598, 0xa87c,
-	0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8, 0x2060, 0x0026, 0x2010,
-	0x080c, 0xb835, 0x002e, 0x1120, 0x2001, 0x0008, 0x0804, 0x5e61,
-	0x6020, 0x9086, 0x000a, 0x0120, 0x2001, 0x0008, 0x0804, 0x5e61,
-	0x601a, 0x6003, 0x0008, 0x2900, 0x6016, 0x0058, 0x080c, 0x9b91,
-	0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023,
-	0x000a, 0x2009, 0x0003, 0x080c, 0x9c85, 0x9006, 0x0458, 0x2001,
-	0x0028, 0x0438, 0x9082, 0x0006, 0x1290, 0x080c, 0x9b66, 0x1160,
-	0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001,
-	0x0029, 0x2009, 0x1000, 0x00a8, 0x2001, 0x0028, 0x0090, 0x2009,
-	0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0050, 0xd184,
-	0x0118, 0x2001, 0x0004, 0x0028, 0x2001, 0x0029, 0x0010, 0x2001,
-	0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c,
-	0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005,
-	0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518,
-	0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974, 0x2079, 0x1800, 0x9182,
-	0x0800, 0x12e8, 0x7830, 0x9084, 0x0003, 0x1130, 0xaa98, 0xab94,
-	0xa878, 0x9084, 0x0007, 0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001,
-	0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001,
-	0x0029, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001,
-	0x0029, 0x900e, 0x9006, 0x0008, 0x9005, 0x012e, 0x00be, 0x00fe,
-	0x0005, 0x5ef6, 0x5eb1, 0x5ec8, 0x5ef6, 0x5ef6, 0x5ef6, 0x5ef6,
-	0x5ef6, 0x2100, 0x9082, 0x007e, 0x1278, 0x080c, 0x6210, 0x0148,
-	0x9046, 0xb810, 0x9306, 0x1904, 0x5efe, 0xb814, 0x9206, 0x15f0,
-	0x0028, 0xbb12, 0xba16, 0x0010, 0x080c, 0x4792, 0x0150, 0x04b0,
-	0x080c, 0x6270, 0x1598, 0xb810, 0x9306, 0x1580, 0xb814, 0x9206,
-	0x1568, 0x080c, 0x9b91, 0x0530, 0x2b00, 0x6012, 0x080c, 0xbcdb,
-	0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0xa878, 0x9086,
-	0x0001, 0x1170, 0x080c, 0x3006, 0x9006, 0x080c, 0x61ad, 0x2001,
-	0x0002, 0x080c, 0x61c1, 0x2001, 0x0200, 0xb86e, 0xb893, 0x0002,
-	0x2009, 0x0003, 0x080c, 0x9c85, 0x9006, 0x0068, 0x2001, 0x0001,
-	0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0028,
-	0x900e, 0x9005, 0x0000, 0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6,
-	0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa894, 0x90c6, 0x0015,
-	0x0904, 0x60d3, 0x90c6, 0x0056, 0x0904, 0x60d7, 0x90c6, 0x0066,
-	0x0904, 0x60db, 0x90c6, 0x0067, 0x0904, 0x60df, 0x90c6, 0x0068,
-	0x0904, 0x60e3, 0x90c6, 0x0071, 0x0904, 0x60e7, 0x90c6, 0x0074,
-	0x0904, 0x60eb, 0x90c6, 0x007c, 0x0904, 0x60ef, 0x90c6, 0x007e,
-	0x0904, 0x60f3, 0x90c6, 0x0037, 0x0904, 0x60f7, 0x9016, 0x2079,
-	0x1800, 0xa974, 0x9186, 0x00ff, 0x0904, 0x60ce, 0x9182, 0x0800,
-	0x1a04, 0x60ce, 0x080c, 0x6270, 0x1198, 0xb804, 0x9084, 0x00ff,
-	0x9082, 0x0006, 0x1268, 0xa894, 0x90c6, 0x006f, 0x0148, 0x080c,
-	0x9b66, 0x1904, 0x60b7, 0xb8a0, 0x9084, 0xff80, 0x1904, 0x60b7,
-	0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6, 0x005e, 0x0904, 0x6017,
-	0x90c6, 0x0064, 0x0904, 0x6040, 0x2008, 0x0804, 0x5fda, 0xa998,
-	0xa8b0, 0x2040, 0x080c, 0x9b66, 0x1120, 0x9182, 0x007f, 0x0a04,
-	0x5fda, 0x9186, 0x00ff, 0x0904, 0x5fda, 0x9182, 0x0800, 0x1a04,
-	0x5fda, 0xaaa0, 0xab9c, 0x7878, 0x9306, 0x1188, 0x787c, 0x0096,
-	0x924e, 0x1128, 0x2208, 0x2310, 0x009e, 0x0804, 0x5fda, 0x99cc,
-	0xff00, 0x009e, 0x1120, 0x2208, 0x2310, 0x0804, 0x5fda, 0x080c,
-	0x4792, 0x0904, 0x5fe3, 0x900e, 0x9016, 0x90c6, 0x4000, 0x1558,
-	0x0006, 0x080c, 0x655f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031,
-	0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x080c,
-	0x0f9f, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0035,
-	0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c,
-	0x0f9f, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x00a0,
-	0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070, 0x90c6, 0x4009,
-	0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001, 0x4005, 0x2009,
-	0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e, 0x2001,
-	0x0030, 0x900e, 0x0470, 0x080c, 0x9b91, 0x1130, 0x2001, 0x4005,
-	0x2009, 0x0003, 0x9016, 0x0c80, 0x2b00, 0x6012, 0x080c, 0xbcdb,
-	0x2900, 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c, 0x0108, 0xc0f5,
-	0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x3006, 0x012e, 0x9006,
-	0x080c, 0x61ad, 0x2001, 0x0002, 0x080c, 0x61c1, 0x2009, 0x0002,
-	0x080c, 0x9c85, 0xa8b0, 0xd094, 0x0118, 0xb8c4, 0xc08d, 0xb8c6,
-	0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x080c,
-	0x53a1, 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998, 0xaeb0, 0x080c,
-	0x6270, 0x1904, 0x5fd5, 0x9186, 0x007f, 0x0130, 0x080c, 0x6667,
-	0x0118, 0x2009, 0x0009, 0x0080, 0x0096, 0x080c, 0x1022, 0x1120,
-	0x009e, 0x2009, 0x0002, 0x0040, 0x2900, 0x009e, 0xa806, 0x080c,
-	0xba33, 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x5fdc,
-	0xa998, 0xaeb0, 0x080c, 0x6270, 0x1904, 0x5fd5, 0x0096, 0x080c,
-	0x1022, 0x1128, 0x009e, 0x2009, 0x0002, 0x0804, 0x6094, 0x2900,
-	0x009e, 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b, 0xb8b4, 0x20e0,
-	0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0,
-	0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xbbb8, 0x9398,
-	0x0006, 0x2398, 0x080c, 0x0f9f, 0x009e, 0xa87b, 0x0000, 0xa883,
-	0x0000, 0xa897, 0x4000, 0xd684, 0x1168, 0x080c, 0x538d, 0xd0b4,
-	0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c, 0x0118, 0xa89b,
-	0x000c, 0x00b0, 0x080c, 0x6667, 0x0118, 0xa89b, 0x0009, 0x0080,
-	0x080c, 0x53a1, 0x0118, 0xa89b, 0x0007, 0x0050, 0x080c, 0xba16,
-	0x1904, 0x6010, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x5fdc,
-	0xa87b, 0x0030, 0xa897, 0x4005, 0xa804, 0x8006, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b,
-	0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x1266,
-	0x080c, 0xa0f5, 0x1904, 0x6010, 0x2009, 0x0002, 0x08e8, 0x2001,
-	0x0028, 0x900e, 0x0804, 0x6011, 0x2009, 0x180c, 0x210c, 0xd18c,
-	0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004,
-	0x0010, 0x2001, 0x0029, 0x900e, 0x0804, 0x6011, 0x2001, 0x0029,
-	0x900e, 0x0804, 0x6011, 0x080c, 0x35ae, 0x0804, 0x6012, 0x080c,
-	0x50c2, 0x0804, 0x6012, 0x080c, 0x4354, 0x0804, 0x6012, 0x080c,
-	0x43cd, 0x0804, 0x6012, 0x080c, 0x4429, 0x0804, 0x6012, 0x080c,
-	0x484e, 0x0804, 0x6012, 0x080c, 0x4afa, 0x0804, 0x6012, 0x080c,
-	0x4d2d, 0x0804, 0x6012, 0x080c, 0x4f26, 0x0804, 0x6012, 0x080c,
-	0x37c3, 0x0804, 0x6012, 0x00b6, 0xa974, 0xae78, 0x9684, 0x3fff,
-	0x9082, 0x4000, 0x1608, 0x9182, 0x0800, 0x1258, 0x9188, 0x1000,
-	0x2104, 0x905d, 0x0130, 0x080c, 0x6667, 0x1138, 0x00d9, 0x9006,
-	0x00b0, 0x2001, 0x0028, 0x900e, 0x0090, 0x9082, 0x0006, 0x1240,
-	0xb900, 0xd1fc, 0x0d98, 0x2001, 0x0029, 0x2009, 0x1000, 0x0038,
-	0x2001, 0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005,
-	0x00be, 0x0005, 0xa877, 0x0000, 0xb8c0, 0x9005, 0x1904, 0x61a1,
-	0xb888, 0x9005, 0x1904, 0x61a1, 0xb838, 0xb93c, 0x9102, 0x1a04,
-	0x61a1, 0x2b10, 0x080c, 0x9bbe, 0x0904, 0x619d, 0x8108, 0xb93e,
-	0x6212, 0x2900, 0x6016, 0x6023, 0x0003, 0x600b, 0xffff, 0x6007,
-	0x0040, 0xa878, 0x605e, 0xa880, 0x9084, 0x00ff, 0x6066, 0xa883,
-	0x0000, 0xa87c, 0xd0ac, 0x05c0, 0xc0dd, 0xa87e, 0xa888, 0x8001,
-	0x1568, 0x2001, 0x00f8, 0x8001, 0xa001, 0xa001, 0xa001, 0x1dd8,
-	0xa816, 0xa864, 0x9094, 0x00f7, 0x9296, 0x0011, 0x11f8, 0x9084,
-	0x00ff, 0xc0bd, 0x601e, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x2001,
-	0x000f, 0x8001, 0x1df0, 0x2001, 0x8004, 0x6003, 0x0004, 0x6046,
-	0x00f6, 0x2079, 0x0380, 0x7818, 0xd0bc, 0x1de8, 0x7833, 0x0010,
-	0x2c00, 0x7836, 0x781b, 0x8080, 0x00fe, 0x0005, 0x080c, 0x164f,
-	0x601c, 0xc0bd, 0x601e, 0x0c38, 0x0006, 0x2001, 0x00e8, 0x8001,
-	0xa001, 0xa001, 0xa001, 0x1dd8, 0x000e, 0xd0b4, 0x190c, 0x1ad2,
-	0x2001, 0x8004, 0x6003, 0x0002, 0x08d0, 0x81ff, 0x1110, 0xb88b,
-	0x0001, 0x2908, 0xb8bc, 0xb9be, 0x9005, 0x1110, 0xb9c2, 0x0020,
-	0x0096, 0x2048, 0xa902, 0x009e, 0x0005, 0x00b6, 0x0126, 0x00c6,
-	0x0026, 0x2091, 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110,
-	0xc285, 0x0008, 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be,
-	0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258,
-	0xba04, 0x0006, 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158,
-	0x080c, 0x6663, 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007,
-	0x1110, 0x2011, 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06,
-	0x0006, 0x9086, 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0d65,
-	0x000e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6,
-	0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006,
-	0x1168, 0xb89c, 0xd0a4, 0x0150, 0x080c, 0x665f, 0x1138, 0x9284,
-	0x00ff, 0x9086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294,
-	0x00ff, 0x8007, 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005,
-	0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026,
-	0x9190, 0x1000, 0x2204, 0x905d, 0x1180, 0x0096, 0x080c, 0x1022,
-	0x2958, 0x009e, 0x0160, 0x2b00, 0x2012, 0xb85c, 0xb8ba, 0xb860,
-	0xb8b6, 0x9006, 0xb8a6, 0x080c, 0x5cf6, 0x9006, 0x0010, 0x9085,
-	0x0001, 0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091,
-	0x8000, 0x0026, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458,
-	0x00d6, 0x9190, 0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000,
-	0xb8a4, 0x904d, 0x0110, 0x080c, 0x1054, 0x00d6, 0x00c6, 0xb8ac,
-	0x2060, 0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c,
-	0xb847, 0x0110, 0x080c, 0x0fd4, 0x080c, 0x9be7, 0x00ce, 0x0c88,
-	0x00ce, 0x00de, 0x2b48, 0xb8b8, 0xb85e, 0xb8b4, 0xb862, 0x080c,
-	0x1064, 0x00de, 0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005,
-	0x0016, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188,
-	0x1000, 0x2104, 0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6,
-	0x0156, 0x0136, 0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c,
-	0xb802, 0x080c, 0x70b7, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120,
-	0x080c, 0x9b66, 0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6,
-	0x2061, 0x1953, 0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a,
-	0x7054, 0x600e, 0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110,
-	0x2001, 0x0001, 0x6886, 0x2069, 0x1800, 0x68b2, 0x7040, 0xb85e,
-	0x7048, 0xb862, 0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276,
-	0xb8b4, 0x20e8, 0xb8b8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004,
-	0x4003, 0x2099, 0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004,
-	0x4003, 0x2069, 0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144,
-	0xb96e, 0x7048, 0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817,
-	0x0000, 0xb8a0, 0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182,
-	0x0211, 0x1218, 0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218,
-	0x2009, 0x0007, 0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006,
-	0x00a0, 0x9182, 0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182,
-	0x0421, 0x1218, 0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218,
-	0x2009, 0x0003, 0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e,
-	0x015e, 0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260,
-	0x7034, 0xb896, 0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbc4,
-	0xc384, 0xba00, 0x2009, 0x1873, 0x210c, 0xd0bc, 0x0120, 0xd1ec,
-	0x0110, 0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138,
-	0xc2bd, 0xd0cc, 0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc,
-	0xba02, 0xbbc6, 0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096,
-	0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff,
-	0x15c0, 0xaa04, 0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6,
-	0x01d6, 0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084,
-	0xffc0, 0x9080, 0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001,
-	0x4002, 0x9086, 0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0d65,
-	0x3c00, 0x20e8, 0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06,
-	0x01de, 0x01ce, 0x014e, 0x013e, 0x0060, 0x080c, 0x1022, 0x0170,
-	0x2900, 0xb8a6, 0xa803, 0x0000, 0x080c, 0x64fb, 0xa807, 0x0001,
-	0xae12, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8,
-	0x0126, 0x2091, 0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800,
-	0x9005, 0x1150, 0x080c, 0x650a, 0x1158, 0xa804, 0x908a, 0x0002,
-	0x0218, 0x8001, 0xa806, 0x0020, 0x080c, 0x1054, 0xb8a7, 0x0000,
-	0x009e, 0x012e, 0x0005, 0x0096, 0x00c6, 0xb888, 0x9005, 0x1904,
-	0x63f4, 0xb8c0, 0x904d, 0x0904, 0x63f4, 0x080c, 0x9bbe, 0x0904,
-	0x63f0, 0x8210, 0xba3e, 0xa800, 0xb8c2, 0x9005, 0x1108, 0xb8be,
-	0x2b00, 0x6012, 0x2900, 0x6016, 0x6023, 0x0003, 0x600b, 0xffff,
-	0x6007, 0x0040, 0xa878, 0x605e, 0xa880, 0x9084, 0x00ff, 0x6066,
-	0xa883, 0x0000, 0xa87c, 0xd0ac, 0x01c8, 0xc0dd, 0xa87e, 0xa888,
-	0x8001, 0x1568, 0xa816, 0xa864, 0x9094, 0x00f7, 0x9296, 0x0011,
-	0x1530, 0x9084, 0x00ff, 0xc0bd, 0x601e, 0xa8ac, 0xaab0, 0xa836,
-	0xaa3a, 0x2001, 0x8004, 0x6003, 0x0004, 0x0030, 0x080c, 0x1ad2,
-	0x2001, 0x8004, 0x6003, 0x0002, 0x6046, 0x2001, 0x0010, 0x2c08,
-	0x080c, 0x98b9, 0xb838, 0xba3c, 0x9202, 0x0a04, 0x63a1, 0x0020,
-	0x82ff, 0x1110, 0xb88b, 0x0001, 0x00ce, 0x009e, 0x0005, 0x080c,
-	0x164f, 0x601c, 0xc0bd, 0x601e, 0x08e0, 0x00b6, 0x0096, 0x0016,
-	0x20a9, 0x0800, 0x900e, 0x0016, 0x080c, 0x6270, 0x1158, 0xb8c0,
-	0x904d, 0x0140, 0x3e00, 0x9086, 0x0002, 0x1118, 0xb800, 0xd0bc,
-	0x1108, 0x0041, 0x001e, 0x8108, 0x1f04, 0x6403, 0x001e, 0x00be,
-	0x009e, 0x0005, 0x0096, 0x0016, 0xb8c0, 0x904d, 0x0188, 0xa800,
-	0xb8c2, 0x9005, 0x1108, 0xb8be, 0x9006, 0xa802, 0xa867, 0x0103,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0xbb45, 0x080c, 0x6996, 0x0c60,
-	0x001e, 0x009e, 0x0005, 0x0086, 0x9046, 0xb8c0, 0x904d, 0x0198,
-	0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0128, 0x2940, 0xa800,
-	0x904d, 0x0148, 0x0ca8, 0xa800, 0x88ff, 0x1110, 0xb8c2, 0x0008,
-	0xa002, 0xa803, 0x0000, 0x008e, 0x0005, 0x901e, 0x0010, 0x2019,
-	0x0001, 0x00e6, 0x0096, 0x00c6, 0x0086, 0x0026, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x19b8, 0x9046, 0x7028, 0x9065, 0x01e8, 0x6014,
-	0x2068, 0x83ff, 0x0120, 0x605c, 0x9606, 0x0158, 0x0030, 0xa86c,
-	0x9406, 0x1118, 0xa870, 0x9506, 0x0120, 0x2c40, 0x600c, 0x2060,
-	0x0c60, 0x600c, 0x0006, 0x0066, 0x2830, 0x080c, 0x9110, 0x006e,
-	0x000e, 0x83ff, 0x0508, 0x0c08, 0x9046, 0xb8c0, 0x904d, 0x01e0,
-	0x83ff, 0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406,
-	0x1118, 0xa870, 0x9506, 0x0120, 0x2940, 0xa800, 0x2048, 0x0c70,
-	0xb8c0, 0xaa00, 0x0026, 0x9906, 0x1110, 0xbac2, 0x0008, 0xa202,
-	0x000e, 0x83ff, 0x0108, 0x0c10, 0x002e, 0x008e, 0x00ce, 0x009e,
-	0x00ee, 0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005,
-	0x080c, 0x655f, 0x0128, 0x080c, 0xb908, 0x0010, 0x9085, 0x0001,
-	0x0005, 0x080c, 0x655f, 0x0128, 0x080c, 0xb8a9, 0x0010, 0x9085,
-	0x0001, 0x0005, 0x080c, 0x655f, 0x0128, 0x080c, 0xb905, 0x0010,
-	0x9085, 0x0001, 0x0005, 0x080c, 0x655f, 0x0128, 0x080c, 0xb8c8,
-	0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x655f, 0x0128, 0x080c,
-	0xb949, 0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118,
-	0x9085, 0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8,
-	0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0,
-	0x9080, 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002,
-	0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006,
-	0x01ce, 0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104,
-	0x01de, 0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
+	0x4003, 0x60c3, 0x0014, 0x080c, 0x5b66, 0x0010, 0x080c, 0x55b6,
+	0x0005, 0x00f6, 0x708c, 0x9005, 0x01d8, 0x2011, 0x5b3c, 0x080c,
+	0x8138, 0x9086, 0x0084, 0x1190, 0x080c, 0x5cb1, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1106, 0x1150, 0x7834, 0x9005, 0x1138, 0x9006,
+	0x080c, 0x5cdc, 0x7097, 0x0018, 0x0029, 0x0010, 0x708f, 0x0000,
+	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0019, 0x080c, 0x5c43, 0x2079,
+	0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5cb1, 0x2009,
+	0x026e, 0x2039, 0x1d0e, 0x20a9, 0x0040, 0x213e, 0x8738, 0x8108,
+	0x9186, 0x0280, 0x1128, 0x6814, 0x8000, 0x6816, 0x2009, 0x0260,
+	0x1f04, 0x59c5, 0x2039, 0x1d0e, 0x080c, 0x5c94, 0x11e8, 0x2728,
+	0x2514, 0x8207, 0x9084, 0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff,
+	0x8007, 0x9205, 0x202a, 0x705c, 0x2310, 0x8214, 0x92a0, 0x1d0e,
+	0x2414, 0x938c, 0x0001, 0x0118, 0x9294, 0xff00, 0x0018, 0x9294,
+	0x00ff, 0x8007, 0x9215, 0x2222, 0x20a9, 0x0040, 0x2009, 0x024e,
+	0x270e, 0x8738, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000,
+	0x6812, 0x2009, 0x0240, 0x1f04, 0x59f8, 0x60c3, 0x0084, 0x080c,
+	0x5b66, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011,
+	0x5b3c, 0x080c, 0x8138, 0x9086, 0x0084, 0x1198, 0x080c, 0x5cb1,
+	0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005,
+	0x1140, 0x7093, 0x0001, 0x080c, 0x5c07, 0x7097, 0x001a, 0x0029,
+	0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x9085, 0x0001, 0x080c,
+	0x5cdc, 0x7097, 0x001b, 0x080c, 0x97e8, 0x080c, 0x5cb1, 0x2011,
+	0x0260, 0x2009, 0x0240, 0x748c, 0x9480, 0x0018, 0x9080, 0x0007,
+	0x9084, 0x03f8, 0x8004, 0x20a8, 0x220e, 0x8210, 0x8108, 0x9186,
+	0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814,
+	0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5a44, 0x60c3, 0x0084,
+	0x080c, 0x5b66, 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0x1854,
+	0x252c, 0x20a9, 0x0008, 0x2041, 0x1d0e, 0x20e9, 0x0001, 0x28a0,
+	0x080c, 0x5cb1, 0x20e1, 0x0000, 0x2099, 0x026e, 0x4003, 0x20a9,
+	0x0008, 0x2011, 0x0007, 0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200,
+	0x200c, 0x91a6, 0xffff, 0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008,
+	0x8211, 0x1f04, 0x5a76, 0x0804, 0x5ae5, 0x82ff, 0x1160, 0xd5d4,
+	0x0120, 0x91a6, 0x3fff, 0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904,
+	0x5ae5, 0x918d, 0xc000, 0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4,
+	0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008,
+	0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319, 0x0008, 0x8318, 0x1f04,
+	0x5a9c, 0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426, 0x8425, 0x1f04,
+	0x5aae, 0x2328, 0x8529, 0x92be, 0x0007, 0x0158, 0x0006, 0x2039,
+	0x0007, 0x2200, 0x973a, 0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04,
+	0x5abd, 0x755a, 0x95c8, 0x317f, 0x292d, 0x95ac, 0x00ff, 0x757e,
+	0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x2486, 0x001e, 0x60e7,
+	0x0000, 0x65ea, 0x2018, 0x2304, 0x9405, 0x201a, 0x7083, 0x0001,
+	0x20e9, 0x0000, 0x20a1, 0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9,
+	0x0008, 0x4003, 0x9085, 0x0001, 0x0008, 0x9006, 0x009e, 0x008e,
+	0x0005, 0x0156, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1,
+	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0,
+	0x4003, 0x014e, 0x013e, 0x01de, 0x01ce, 0x015e, 0x2118, 0x9026,
+	0x2001, 0x0007, 0x939a, 0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0,
+	0x2118, 0x84ff, 0x0120, 0x939a, 0x0010, 0x8421, 0x1de0, 0x2021,
+	0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8, 0x9238, 0x2029,
+	0x026e, 0x9528, 0x2504, 0x942c, 0x11b8, 0x9405, 0x203a, 0x715a,
+	0x91a0, 0x317f, 0x242d, 0x95ac, 0x00ff, 0x757e, 0x6532, 0x6536,
+	0x0016, 0x2508, 0x080c, 0x2486, 0x001e, 0x60e7, 0x0000, 0x65ea,
+	0x7083, 0x0001, 0x9084, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x7087, 0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100,
+	0x2071, 0x0140, 0x080c, 0x5bf6, 0x080c, 0x8f9c, 0x7004, 0x9084,
+	0x4000, 0x0110, 0x080c, 0x2862, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x1825, 0x2073, 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7,
+	0x080c, 0x5c53, 0x001e, 0x9094, 0x0010, 0x9285, 0x0080, 0x7842,
+	0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x27c1, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5,
+	0x2012, 0x2011, 0x19c4, 0x2013, 0x0000, 0x708f, 0x0000, 0x012e,
+	0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x8f8f, 0x6144, 0xd184,
+	0x0120, 0x7194, 0x918d, 0x2000, 0x0018, 0x7188, 0x918d, 0x1000,
+	0x2011, 0x1969, 0x2112, 0x2009, 0x07d0, 0x2011, 0x5b3c, 0x080c,
+	0x81fc, 0x0005, 0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x98bb, 0x080c, 0x9b60, 0x080c, 0x98d7, 0x2009, 0x00f7,
+	0x080c, 0x5c53, 0x2061, 0x19d3, 0x900e, 0x611a, 0x611e, 0x6172,
+	0x6176, 0x2061, 0x1800, 0x6003, 0x0001, 0x2061, 0x0100, 0x6043,
+	0x0090, 0x6043, 0x0010, 0x2009, 0x1969, 0x200b, 0x0000, 0x2009,
+	0x002d, 0x2011, 0x5bc2, 0x080c, 0x812c, 0x012e, 0x00ce, 0x002e,
+	0x001e, 0x0005, 0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x0471,
+	0x2071, 0x0100, 0x080c, 0x8f9c, 0x2071, 0x0140, 0x7004, 0x9084,
+	0x4000, 0x0110, 0x080c, 0x2862, 0x080c, 0x709e, 0x0188, 0x080c,
+	0x70b9, 0x1170, 0x080c, 0x73a0, 0x0016, 0x080c, 0x2555, 0x2001,
+	0x193d, 0x2102, 0x001e, 0x080c, 0x739b, 0x080c, 0x6fc7, 0x0050,
+	0x2009, 0x0001, 0x080c, 0x283e, 0x2001, 0x0001, 0x080c, 0x23e2,
+	0x080c, 0x5b92, 0x012e, 0x000e, 0x00ee, 0x0005, 0x2001, 0x180e,
+	0x2004, 0xd0bc, 0x0158, 0x0026, 0x0036, 0x2011, 0x8017, 0x2001,
+	0x1969, 0x201c, 0x080c, 0x48da, 0x003e, 0x002e, 0x0005, 0x20a9,
+	0x0012, 0x20e9, 0x0001, 0x20a1, 0x1d80, 0x080c, 0x5cb1, 0x20e9,
+	0x0000, 0x2099, 0x026e, 0x0099, 0x20a9, 0x0020, 0x080c, 0x5cab,
+	0x2099, 0x0260, 0x20a1, 0x1d92, 0x0051, 0x20a9, 0x000e, 0x080c,
+	0x5cae, 0x2099, 0x0260, 0x20a1, 0x1db2, 0x0009, 0x0005, 0x0016,
+	0x0026, 0x3410, 0x3308, 0x2104, 0x8007, 0x2012, 0x8108, 0x8210,
+	0x1f04, 0x5c2b, 0x002e, 0x001e, 0x0005, 0x080c, 0x97e8, 0x20e1,
+	0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
+	0x000c, 0x4003, 0x0005, 0x080c, 0x97e8, 0x080c, 0x5cb1, 0x20e1,
+	0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
+	0x000c, 0x4003, 0x0005, 0x00c6, 0x0006, 0x2061, 0x0100, 0x810f,
+	0x2001, 0x1833, 0x2004, 0x9005, 0x1138, 0x2001, 0x1817, 0x2004,
+	0x9084, 0x00ff, 0x9105, 0x0010, 0x9185, 0x00f7, 0x604a, 0x000e,
+	0x00ce, 0x0005, 0x0016, 0x0046, 0x080c, 0x6662, 0x0158, 0x9006,
+	0x2020, 0x2009, 0x002a, 0x080c, 0xd284, 0x2001, 0x180c, 0x200c,
+	0xc195, 0x2102, 0x2019, 0x002a, 0x900e, 0x080c, 0x2fd3, 0x080c,
+	0xbf61, 0x0140, 0x0036, 0x2019, 0xffff, 0x2021, 0x0007, 0x080c,
+	0x4a77, 0x003e, 0x004e, 0x001e, 0x0005, 0x080c, 0x5b92, 0x7097,
+	0x0000, 0x708f, 0x0000, 0x0005, 0x0006, 0x2001, 0x180c, 0x2004,
+	0xd09c, 0x0100, 0x000e, 0x0005, 0x0006, 0x0016, 0x0126, 0x2091,
+	0x8000, 0x2001, 0x0101, 0x200c, 0x918d, 0x0006, 0x2102, 0x012e,
+	0x001e, 0x000e, 0x0005, 0x2009, 0x0001, 0x0020, 0x2009, 0x0002,
+	0x0008, 0x900e, 0x6814, 0x9084, 0xffc0, 0x910d, 0x6916, 0x0005,
+	0x00f6, 0x0156, 0x0146, 0x01d6, 0x9006, 0x20a9, 0x0080, 0x20e9,
+	0x0001, 0x20a1, 0x1d00, 0x4004, 0x2079, 0x1d00, 0x7803, 0x2200,
+	0x7807, 0x00ef, 0x780f, 0x00ef, 0x7813, 0x0138, 0x7823, 0xffff,
+	0x7827, 0xffff, 0x01de, 0x014e, 0x015e, 0x00fe, 0x0005, 0x2001,
+	0x1800, 0x2003, 0x0001, 0x0005, 0x2001, 0x1976, 0x0118, 0x2003,
+	0x0001, 0x0010, 0x2003, 0x0000, 0x0005, 0x0156, 0x20a9, 0x0800,
+	0x2009, 0x1000, 0x9006, 0x200a, 0x8108, 0x1f04, 0x5ceb, 0x015e,
+	0x0005, 0x00d6, 0x0036, 0x0156, 0x0136, 0x0146, 0x2069, 0x1853,
+	0x9006, 0xb802, 0xb8c6, 0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812,
+	0x9198, 0x317f, 0x231d, 0x939c, 0x00ff, 0xbb16, 0x0016, 0x0026,
+	0xb886, 0x080c, 0x9b59, 0x1120, 0x9192, 0x007e, 0x1208, 0xbb86,
+	0x20a9, 0x0004, 0xb8b4, 0x20e8, 0xb9b8, 0x9198, 0x0006, 0x9006,
+	0x23a0, 0x4004, 0x20a9, 0x0004, 0x9198, 0x000a, 0x23a0, 0x4004,
+	0x002e, 0x001e, 0xb83e, 0xb842, 0xb8be, 0xb8c2, 0xb85e, 0xb862,
+	0xb866, 0xb86a, 0xb86f, 0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a,
+	0xb88e, 0xb893, 0x0008, 0xb896, 0xb89a, 0xb89e, 0xb8ae, 0xb9a2,
+	0x0096, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x1054, 0xb8a7, 0x0000,
+	0x009e, 0x9006, 0xb84a, 0x6810, 0xb83a, 0x680c, 0xb846, 0x6814,
+	0x9084, 0x00ff, 0xb842, 0x014e, 0x013e, 0x015e, 0x003e, 0x00de,
+	0x0005, 0x0126, 0x2091, 0x8000, 0xa974, 0xae78, 0x9684, 0x3fff,
+	0x9082, 0x4000, 0x1a04, 0x5daf, 0x9182, 0x0800, 0x1a04, 0x5db3,
+	0x2001, 0x180c, 0x2004, 0x9084, 0x0003, 0x1904, 0x5db9, 0x9188,
+	0x1000, 0x2104, 0x905d, 0x0198, 0xb804, 0x9084, 0x00ff, 0x908e,
+	0x0006, 0x1188, 0xb8a4, 0x900d, 0x1904, 0x5dcb, 0x080c, 0x6125,
+	0x9006, 0x012e, 0x0005, 0x2001, 0x0005, 0x900e, 0x04b8, 0x2001,
+	0x0028, 0x900e, 0x0498, 0x9082, 0x0006, 0x1290, 0x080c, 0x9b59,
+	0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0d10,
+	0x2001, 0x0029, 0x2009, 0x1000, 0x0408, 0x2001, 0x0028, 0x00a8,
+	0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0068,
+	0xd184, 0x0118, 0x2001, 0x0004, 0x0040, 0x2001, 0x0029, 0xb900,
+	0xd1fc, 0x0118, 0x2009, 0x1000, 0x0048, 0x900e, 0x0038, 0x2001,
+	0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x012e,
+	0x0005, 0x2001, 0x180c, 0x2004, 0xd084, 0x19d0, 0x9188, 0x1000,
+	0x2104, 0x9065, 0x09a8, 0x080c, 0x6666, 0x1990, 0xb800, 0xd0bc,
+	0x0978, 0x0804, 0x5d72, 0x080c, 0x64da, 0x0904, 0x5d7b, 0x0804,
+	0x5d76, 0x00e6, 0x2071, 0x19b7, 0x7004, 0x9086, 0x0002, 0x1128,
+	0x7030, 0x9080, 0x0004, 0x2004, 0x9b06, 0x00ee, 0x0005, 0x00b6,
+	0x00e6, 0x0126, 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04,
+	0x5e5a, 0x9188, 0x1000, 0x2104, 0x905d, 0x0904, 0x5e32, 0xb8a0,
+	0x9086, 0x007f, 0x0178, 0x080c, 0x666e, 0x0160, 0xa994, 0x81ff,
+	0x0130, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x080c,
+	0x6666, 0x1598, 0xa87c, 0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8,
+	0x2060, 0x0026, 0x2010, 0x080c, 0xb830, 0x002e, 0x1120, 0x2001,
+	0x0008, 0x0804, 0x5e5c, 0x6020, 0x9086, 0x000a, 0x0120, 0x2001,
+	0x0008, 0x0804, 0x5e5c, 0x601a, 0x6003, 0x0008, 0x2900, 0x6016,
+	0x0058, 0x080c, 0x9b84, 0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016,
+	0x600b, 0xffff, 0x6023, 0x000a, 0x2009, 0x0003, 0x080c, 0x9c76,
+	0x9006, 0x0458, 0x2001, 0x0028, 0x0438, 0x9082, 0x0006, 0x1290,
+	0x080c, 0x9b59, 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900,
+	0xd1fc, 0x0900, 0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, 0x2001,
+	0x0028, 0x0090, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001,
+	0x0004, 0x0050, 0xd184, 0x0118, 0x2001, 0x0004, 0x0028, 0x2001,
+	0x0029, 0x0010, 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be,
+	0x0005, 0x2001, 0x002c, 0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091,
+	0x8000, 0xa8e0, 0x9005, 0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630,
+	0xa8c8, 0x9005, 0x1518, 0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974,
+	0x2079, 0x1800, 0x9182, 0x0800, 0x12e8, 0x7830, 0x9084, 0x0003,
+	0x1130, 0xaa98, 0xab94, 0xa878, 0x9084, 0x0007, 0x00ea, 0x7930,
+	0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001,
+	0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0038, 0x2001, 0x002c,
+	0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9006, 0x0008, 0x9005,
+	0x012e, 0x00be, 0x00fe, 0x0005, 0x5ef1, 0x5eac, 0x5ec3, 0x5ef1,
+	0x5ef1, 0x5ef1, 0x5ef1, 0x5ef1, 0x2100, 0x9082, 0x007e, 0x1278,
+	0x080c, 0x620b, 0x0148, 0x9046, 0xb810, 0x9306, 0x1904, 0x5ef9,
+	0xb814, 0x9206, 0x15f0, 0x0028, 0xbb12, 0xba16, 0x0010, 0x080c,
+	0x4794, 0x0150, 0x04b0, 0x080c, 0x626b, 0x1598, 0xb810, 0x9306,
+	0x1580, 0xb814, 0x9206, 0x1568, 0x080c, 0x9b84, 0x0530, 0x2b00,
+	0x6012, 0x080c, 0xbcdb, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023,
+	0x000a, 0xa878, 0x9086, 0x0001, 0x1170, 0x080c, 0x300e, 0x9006,
+	0x080c, 0x61a8, 0x2001, 0x0002, 0x080c, 0x61bc, 0x2001, 0x0200,
+	0xb86e, 0xb893, 0x0002, 0x2009, 0x0003, 0x080c, 0x9c76, 0x9006,
+	0x0068, 0x2001, 0x0001, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e,
+	0x0018, 0x2001, 0x0028, 0x900e, 0x9005, 0x0000, 0x012e, 0x00be,
+	0x00fe, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000,
+	0xa894, 0x90c6, 0x0015, 0x0904, 0x60ce, 0x90c6, 0x0056, 0x0904,
+	0x60d2, 0x90c6, 0x0066, 0x0904, 0x60d6, 0x90c6, 0x0067, 0x0904,
+	0x60da, 0x90c6, 0x0068, 0x0904, 0x60de, 0x90c6, 0x0071, 0x0904,
+	0x60e2, 0x90c6, 0x0074, 0x0904, 0x60e6, 0x90c6, 0x007c, 0x0904,
+	0x60ea, 0x90c6, 0x007e, 0x0904, 0x60ee, 0x90c6, 0x0037, 0x0904,
+	0x60f2, 0x9016, 0x2079, 0x1800, 0xa974, 0x9186, 0x00ff, 0x0904,
+	0x60c9, 0x9182, 0x0800, 0x1a04, 0x60c9, 0x080c, 0x626b, 0x1198,
+	0xb804, 0x9084, 0x00ff, 0x9082, 0x0006, 0x1268, 0xa894, 0x90c6,
+	0x006f, 0x0148, 0x080c, 0x9b59, 0x1904, 0x60b2, 0xb8a0, 0x9084,
+	0xff80, 0x1904, 0x60b2, 0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6,
+	0x005e, 0x0904, 0x6012, 0x90c6, 0x0064, 0x0904, 0x603b, 0x2008,
+	0x0804, 0x5fd5, 0xa998, 0xa8b0, 0x2040, 0x080c, 0x9b59, 0x1120,
+	0x9182, 0x007f, 0x0a04, 0x5fd5, 0x9186, 0x00ff, 0x0904, 0x5fd5,
+	0x9182, 0x0800, 0x1a04, 0x5fd5, 0xaaa0, 0xab9c, 0x7878, 0x9306,
+	0x1188, 0x787c, 0x0096, 0x924e, 0x1128, 0x2208, 0x2310, 0x009e,
+	0x0804, 0x5fd5, 0x99cc, 0xff00, 0x009e, 0x1120, 0x2208, 0x2310,
+	0x0804, 0x5fd5, 0x080c, 0x4794, 0x0904, 0x5fde, 0x900e, 0x9016,
+	0x90c6, 0x4000, 0x1558, 0x0006, 0x080c, 0x655e, 0x1108, 0xc185,
+	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0031, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080,
+	0x0006, 0x2098, 0x080c, 0x0f9f, 0x20a9, 0x0004, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080,
+	0x000a, 0x2098, 0x080c, 0x0f9f, 0x000e, 0x00c8, 0x90c6, 0x4007,
+	0x1110, 0x2408, 0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610,
+	0x0070, 0x90c6, 0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138,
+	0x2001, 0x4005, 0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896,
+	0xa99a, 0xaa9e, 0x2001, 0x0030, 0x900e, 0x0470, 0x080c, 0x9b84,
+	0x1130, 0x2001, 0x4005, 0x2009, 0x0003, 0x9016, 0x0c80, 0x2b00,
+	0x6012, 0x080c, 0xbcdb, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868,
+	0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x300e, 0x012e, 0x9006, 0x080c, 0x61a8, 0x2001, 0x0002, 0x080c,
+	0x61bc, 0x2009, 0x0002, 0x080c, 0x9c76, 0xa8b0, 0xd094, 0x0118,
+	0xb8c4, 0xc08d, 0xb8c6, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe,
+	0x00be, 0x0005, 0x080c, 0x539c, 0x0118, 0x2009, 0x0007, 0x00f8,
+	0xa998, 0xaeb0, 0x080c, 0x626b, 0x1904, 0x5fd0, 0x9186, 0x007f,
+	0x0130, 0x080c, 0x6666, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096,
+	0x080c, 0x1022, 0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900,
+	0x009e, 0xa806, 0x080c, 0xba2e, 0x19b0, 0x2009, 0x0003, 0x2001,
+	0x4005, 0x0804, 0x5fd7, 0xa998, 0xaeb0, 0x080c, 0x626b, 0x1904,
+	0x5fd0, 0x0096, 0x080c, 0x1022, 0x1128, 0x009e, 0x2009, 0x0002,
+	0x0804, 0x608f, 0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9,
+	0x002b, 0xb8b4, 0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006,
+	0x20a0, 0xbbb8, 0x9398, 0x0006, 0x2398, 0x080c, 0x0f9f, 0x009e,
+	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168,
+	0x080c, 0x5388, 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800,
+	0xd08c, 0x0118, 0xa89b, 0x000c, 0x00b0, 0x080c, 0x6666, 0x0118,
+	0xa89b, 0x0009, 0x0080, 0x080c, 0x539c, 0x0118, 0xa89b, 0x0007,
+	0x0050, 0x080c, 0xba11, 0x1904, 0x600b, 0x2009, 0x0003, 0x2001,
+	0x4005, 0x0804, 0x5fd7, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804,
+	0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031,
+	0x0000, 0x2041, 0x1271, 0x080c, 0xa0e7, 0x1904, 0x600b, 0x2009,
+	0x0002, 0x08e8, 0x2001, 0x0028, 0x900e, 0x0804, 0x600c, 0x2009,
+	0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184,
+	0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804,
+	0x600c, 0x2001, 0x0029, 0x900e, 0x0804, 0x600c, 0x080c, 0x35ad,
+	0x0804, 0x600d, 0x080c, 0x50bd, 0x0804, 0x600d, 0x080c, 0x4353,
+	0x0804, 0x600d, 0x080c, 0x43cc, 0x0804, 0x600d, 0x080c, 0x4428,
+	0x0804, 0x600d, 0x080c, 0x4850, 0x0804, 0x600d, 0x080c, 0x4af5,
+	0x0804, 0x600d, 0x080c, 0x4d28, 0x0804, 0x600d, 0x080c, 0x4f21,
+	0x0804, 0x600d, 0x080c, 0x37c2, 0x0804, 0x600d, 0x00b6, 0xa974,
+	0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1608, 0x9182, 0x0800,
+	0x1258, 0x9188, 0x1000, 0x2104, 0x905d, 0x0130, 0x080c, 0x6666,
+	0x1138, 0x00d9, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e, 0x0090,
+	0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d98, 0x2001, 0x0029,
+	0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001,
+	0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0xa877, 0x0000, 0xb8c0,
+	0x9005, 0x1904, 0x619c, 0xb888, 0x9005, 0x1904, 0x619c, 0xb838,
+	0xb93c, 0x9102, 0x1a04, 0x619c, 0x2b10, 0x080c, 0x9bb1, 0x0904,
+	0x6198, 0x8108, 0xb93e, 0x6212, 0x2900, 0x6016, 0x6023, 0x0003,
+	0x600b, 0xffff, 0x6007, 0x0040, 0xa878, 0x605e, 0xa880, 0x9084,
+	0x00ff, 0x6066, 0xa883, 0x0000, 0xa87c, 0xd0ac, 0x05c0, 0xc0dd,
+	0xa87e, 0xa888, 0x8001, 0x1568, 0x2001, 0x00f8, 0x8001, 0xa001,
+	0xa001, 0xa001, 0x1dd8, 0xa816, 0xa864, 0x9094, 0x00f7, 0x9296,
+	0x0011, 0x11f8, 0x9084, 0x00ff, 0xc0bd, 0x601e, 0xa8ac, 0xaab0,
+	0xa836, 0xaa3a, 0x2001, 0x000f, 0x8001, 0x1df0, 0x2001, 0x8004,
+	0x6003, 0x0004, 0x6046, 0x00f6, 0x2079, 0x0380, 0x7818, 0xd0bc,
+	0x1de8, 0x7833, 0x0010, 0x2c00, 0x7836, 0x781b, 0x8080, 0x00fe,
+	0x0005, 0x080c, 0x165c, 0x601c, 0xc0bd, 0x601e, 0x0c38, 0x0006,
+	0x2001, 0x00e8, 0x8001, 0xa001, 0xa001, 0xa001, 0x1dd8, 0x000e,
+	0xd0b4, 0x190c, 0x1adf, 0x2001, 0x8004, 0x6003, 0x0002, 0x08d0,
+	0x81ff, 0x1110, 0xb88b, 0x0001, 0x2908, 0xb8bc, 0xb9be, 0x9005,
+	0x1110, 0xb9c2, 0x0020, 0x0096, 0x2048, 0xa902, 0x009e, 0x0005,
+	0x00b6, 0x0126, 0x00c6, 0x0026, 0x2091, 0x8000, 0x6210, 0x2258,
+	0xba00, 0x9005, 0x0110, 0xc285, 0x0008, 0xc284, 0xba02, 0x002e,
+	0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091,
+	0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1170,
+	0xb89c, 0xd0ac, 0x0158, 0x080c, 0x6662, 0x0140, 0x9284, 0xff00,
+	0x8007, 0x9086, 0x0007, 0x1110, 0x2011, 0x0600, 0x000e, 0x9294,
+	0xff00, 0x9215, 0xba06, 0x0006, 0x9086, 0x0006, 0x1120, 0xba90,
+	0x82ff, 0x090c, 0x0d65, 0x000e, 0x00ce, 0x012e, 0x00be, 0x0005,
+	0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04,
+	0x0006, 0x9086, 0x0006, 0x1168, 0xb89c, 0xd0a4, 0x0150, 0x080c,
+	0x665e, 0x1138, 0x9284, 0x00ff, 0x9086, 0x0007, 0x1110, 0x2011,
+	0x0006, 0x000e, 0x9294, 0x00ff, 0x8007, 0x9215, 0xba06, 0x00ce,
+	0x012e, 0x00be, 0x0005, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001,
+	0x0005, 0x00d6, 0x0026, 0x9190, 0x1000, 0x2204, 0x905d, 0x1180,
+	0x0096, 0x080c, 0x1022, 0x2958, 0x009e, 0x0160, 0x2b00, 0x2012,
+	0xb85c, 0xb8ba, 0xb860, 0xb8b6, 0x9006, 0xb8a6, 0x080c, 0x5cf1,
+	0x9006, 0x0010, 0x9085, 0x0001, 0x002e, 0x00de, 0x0005, 0x00b6,
+	0x0096, 0x0126, 0x2091, 0x8000, 0x0026, 0x9182, 0x0800, 0x0218,
+	0x9085, 0x0001, 0x0458, 0x00d6, 0x9190, 0x1000, 0x2204, 0x905d,
+	0x0518, 0x2013, 0x0000, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x1054,
+	0x00d6, 0x00c6, 0xb8ac, 0x2060, 0x8cff, 0x0168, 0x600c, 0x0006,
+	0x6014, 0x2048, 0x080c, 0xb842, 0x0110, 0x080c, 0x0fd4, 0x080c,
+	0x9bda, 0x00ce, 0x0c88, 0x00ce, 0x00de, 0x2b48, 0xb8b8, 0xb85e,
+	0xb8b4, 0xb862, 0x080c, 0x1064, 0x00de, 0x9006, 0x002e, 0x012e,
+	0x009e, 0x00be, 0x0005, 0x0016, 0x9182, 0x0800, 0x0218, 0x9085,
+	0x0001, 0x0030, 0x9188, 0x1000, 0x2104, 0x905d, 0x0dc0, 0x9006,
+	0x001e, 0x0005, 0x00d6, 0x0156, 0x0136, 0x0146, 0x9006, 0xb80a,
+	0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c, 0x7096, 0x1510, 0xb8a0,
+	0x9086, 0x007e, 0x0120, 0x080c, 0x9b59, 0x11d8, 0x0078, 0x7040,
+	0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x1952, 0x7048, 0x2062, 0x704c,
+	0x6006, 0x7050, 0x600a, 0x7054, 0x600e, 0x00ce, 0x703c, 0x2069,
+	0x0140, 0x9005, 0x1110, 0x2001, 0x0001, 0x6886, 0x2069, 0x1800,
+	0x68b2, 0x7040, 0xb85e, 0x7048, 0xb862, 0x704c, 0xb866, 0x20e1,
+	0x0000, 0x2099, 0x0276, 0xb8b4, 0x20e8, 0xb8b8, 0x9088, 0x000a,
+	0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099, 0x027a, 0x9088, 0x0006,
+	0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069, 0x0200, 0x6817, 0x0001,
+	0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048, 0xb872, 0x7050, 0xb876,
+	0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0, 0x9086, 0x007e, 0x1110,
+	0x7144, 0xb96e, 0x9182, 0x0211, 0x1218, 0x2009, 0x0008, 0x0400,
+	0x9182, 0x0259, 0x1218, 0x2009, 0x0007, 0x00d0, 0x9182, 0x02c1,
+	0x1218, 0x2009, 0x0006, 0x00a0, 0x9182, 0x0349, 0x1218, 0x2009,
+	0x0005, 0x0070, 0x9182, 0x0421, 0x1218, 0x2009, 0x0004, 0x0040,
+	0x9182, 0x0581, 0x1218, 0x2009, 0x0003, 0x0010, 0x2009, 0x0002,
+	0xb992, 0x014e, 0x013e, 0x015e, 0x00de, 0x0005, 0x0016, 0x0026,
+	0x00e6, 0x2071, 0x0260, 0x7034, 0xb896, 0x703c, 0xb89a, 0x7054,
+	0xb89e, 0x0036, 0xbbc4, 0xc384, 0xba00, 0x2009, 0x1873, 0x210c,
+	0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad, 0x0008, 0xc2ac, 0xd0c4,
+	0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc, 0x0128, 0xd38c, 0x1108,
+	0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbc6, 0x003e, 0x00ee, 0x002e,
+	0x001e, 0x0005, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d,
+	0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04, 0x9282, 0x0010, 0x16c8,
+	0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906, 0x8006, 0x8007, 0x908c,
+	0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080, 0x0004, 0x2098, 0x2009,
+	0x0010, 0x20a9, 0x0001, 0x4002, 0x9086, 0xffff, 0x0120, 0x8109,
+	0x1dd0, 0x080c, 0x0d65, 0x3c00, 0x20e8, 0x3300, 0x8001, 0x20a0,
+	0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce, 0x014e, 0x013e, 0x0060,
+	0x080c, 0x1022, 0x0170, 0x2900, 0xb8a6, 0xa803, 0x0000, 0x080c,
+	0x64fa, 0xa807, 0x0001, 0xae12, 0x9085, 0x0001, 0x012e, 0x009e,
+	0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091, 0x8000, 0x0096, 0xb8a4,
+	0x904d, 0x0188, 0xa800, 0x9005, 0x1150, 0x080c, 0x6509, 0x1158,
+	0xa804, 0x908a, 0x0002, 0x0218, 0x8001, 0xa806, 0x0020, 0x080c,
+	0x1054, 0xb8a7, 0x0000, 0x009e, 0x012e, 0x0005, 0x0096, 0x00c6,
+	0xb888, 0x9005, 0x1904, 0x63ef, 0xb8c0, 0x904d, 0x0904, 0x63ef,
+	0x080c, 0x9bb1, 0x0904, 0x63eb, 0x8210, 0xba3e, 0xa800, 0xb8c2,
+	0x9005, 0x1108, 0xb8be, 0x2b00, 0x6012, 0x2900, 0x6016, 0x6023,
+	0x0003, 0x600b, 0xffff, 0x6007, 0x0040, 0xa878, 0x605e, 0xa880,
+	0x9084, 0x00ff, 0x6066, 0xa883, 0x0000, 0xa87c, 0xd0ac, 0x01c8,
+	0xc0dd, 0xa87e, 0xa888, 0x8001, 0x1568, 0xa816, 0xa864, 0x9094,
+	0x00f7, 0x9296, 0x0011, 0x1530, 0x9084, 0x00ff, 0xc0bd, 0x601e,
+	0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x2001, 0x8004, 0x6003, 0x0004,
+	0x0030, 0x080c, 0x1adf, 0x2001, 0x8004, 0x6003, 0x0002, 0x6046,
+	0x2001, 0x0010, 0x2c08, 0x080c, 0x98ac, 0xb838, 0xba3c, 0x9202,
+	0x0a04, 0x639c, 0x0020, 0x82ff, 0x1110, 0xb88b, 0x0001, 0x00ce,
+	0x009e, 0x0005, 0x080c, 0x165c, 0x601c, 0xc0bd, 0x601e, 0x08e0,
+	0x00b6, 0x0096, 0x0016, 0x20a9, 0x0800, 0x900e, 0x0016, 0x080c,
+	0x626b, 0x1158, 0xb8c0, 0x904d, 0x0140, 0x3e00, 0x9086, 0x0002,
+	0x1118, 0xb800, 0xd0bc, 0x1108, 0x0041, 0x001e, 0x8108, 0x1f04,
+	0x63fe, 0x001e, 0x00be, 0x009e, 0x0005, 0x0096, 0x0016, 0xb8c0,
+	0x904d, 0x0188, 0xa800, 0xb8c2, 0x9005, 0x1108, 0xb8be, 0x9006,
+	0xa802, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xbb45,
+	0x080c, 0x6991, 0x0c60, 0x001e, 0x009e, 0x0005, 0x0086, 0x9046,
+	0xb8c0, 0x904d, 0x01b0, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506,
+	0x0128, 0x2940, 0xa800, 0x904d, 0x0160, 0x0ca8, 0xa800, 0x88ff,
+	0x1128, 0xb8c2, 0x9005, 0x1118, 0xb8be, 0x0008, 0xa002, 0xa803,
+	0x0000, 0x008e, 0x0005, 0x901e, 0x0010, 0x2019, 0x0001, 0x0126,
+	0x2091, 0x8000, 0x00e6, 0x0096, 0x00c6, 0x0086, 0x0026, 0x2071,
+	0x19b7, 0x9046, 0x7028, 0x9065, 0x01e8, 0x6014, 0x2068, 0x83ff,
+	0x0120, 0x605c, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118,
+	0xa870, 0x9506, 0x0120, 0x2c40, 0x600c, 0x2060, 0x0c60, 0x600c,
+	0x0006, 0x0066, 0x2830, 0x080c, 0x90f3, 0x006e, 0x000e, 0x83ff,
+	0x0508, 0x0c08, 0x9046, 0xb8c0, 0x904d, 0x01e0, 0x83ff, 0x0120,
+	0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118, 0xa870,
+	0x9506, 0x0120, 0x2940, 0xa800, 0x2048, 0x0c70, 0xb8c0, 0xaa00,
+	0x0026, 0x9906, 0x1110, 0xbac2, 0x0008, 0xa202, 0x000e, 0x83ff,
+	0x0108, 0x0c10, 0x002e, 0x008e, 0x00ce, 0x009e, 0x00ee, 0x012e,
+	0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005, 0x080c,
+	0x655e, 0x0128, 0x080c, 0xb903, 0x0010, 0x9085, 0x0001, 0x0005,
+	0x080c, 0x655e, 0x0128, 0x080c, 0xb8a4, 0x0010, 0x9085, 0x0001,
+	0x0005, 0x080c, 0x655e, 0x0128, 0x080c, 0xb900, 0x0010, 0x9085,
+	0x0001, 0x0005, 0x080c, 0x655e, 0x0128, 0x080c, 0xb8c3, 0x0010,
+	0x9085, 0x0001, 0x0005, 0x080c, 0x655e, 0x0128, 0x080c, 0xb944,
+	0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085,
+	0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
 	0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080,
 	0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606,
-	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6,
-	0x3300, 0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004,
-	0x01de, 0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126,
-	0x2091, 0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x1022, 0x0168,
-	0x2900, 0xb8a6, 0x080c, 0x64fb, 0xa803, 0x0001, 0xa807, 0x0000,
-	0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096,
-	0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000,
-	0x080c, 0x1054, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c,
-	0xd0a4, 0x0005, 0x00b6, 0x00f6, 0x080c, 0x70b7, 0x01b0, 0x71c0,
-	0x81ff, 0x1198, 0x71d8, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080,
-	0x1000, 0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1853, 0x7804,
-	0x00d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6270,
-	0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118,
-	0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108,
-	0x1f04, 0x6585, 0x015e, 0x080c, 0x6625, 0x0120, 0x2001, 0x1956,
-	0x200c, 0x0030, 0x2079, 0x1853, 0x7804, 0x0030, 0x2009, 0x07d0,
-	0x2011, 0x65af, 0x080c, 0x821d, 0x00fe, 0x00be, 0x0005, 0x00b6,
-	0x2011, 0x65af, 0x080c, 0x8159, 0x080c, 0x6625, 0x01d8, 0x2001,
-	0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c, 0x6663,
-	0x0130, 0x2009, 0x07d0, 0x2011, 0x65af, 0x080c, 0x821d, 0x00e6,
-	0x2071, 0x1800, 0x9006, 0x707a, 0x705c, 0x707e, 0x080c, 0x2ddb,
-	0x00ee, 0x04d0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016,
-	0x080c, 0x6270, 0x1558, 0xb800, 0xd0ec, 0x0540, 0x0046, 0xbaa0,
-	0x2220, 0x9006, 0x2009, 0x0029, 0x080c, 0xd273, 0xb800, 0xc0e5,
-	0xc0ec, 0xb802, 0x080c, 0x665f, 0x2001, 0x0707, 0x1128, 0xb804,
-	0x9084, 0x00ff, 0x9085, 0x0700, 0xb806, 0x080c, 0x98c8, 0x2019,
-	0x0029, 0x080c, 0x863b, 0x0076, 0x903e, 0x080c, 0x852a, 0x900e,
-	0x080c, 0xcfc8, 0x007e, 0x004e, 0x080c, 0x98e4, 0x001e, 0x8108,
-	0x1f04, 0x65d7, 0x00ce, 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010,
-	0x2058, 0xb800, 0xc0ec, 0xb802, 0x00be, 0x0005, 0x7810, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d,
-	0x0108, 0xb800, 0x00be, 0xd0bc, 0x0005, 0x00b6, 0x00f6, 0x2001,
-	0x107e, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0ec, 0x00fe, 0x00be,
-	0x0005, 0x0126, 0x0026, 0x2091, 0x8000, 0x0006, 0xbaa0, 0x9290,
-	0x1000, 0x2204, 0x9b06, 0x190c, 0x0d65, 0x000e, 0xba00, 0x9005,
-	0x0110, 0xc2fd, 0x0008, 0xc2fc, 0xba02, 0x002e, 0x012e, 0x0005,
-	0x2011, 0x1836, 0x2204, 0xd0cc, 0x0138, 0x2001, 0x1954, 0x200c,
-	0x2011, 0x6655, 0x080c, 0x821d, 0x0005, 0x2011, 0x6655, 0x080c,
-	0x8159, 0x2011, 0x1836, 0x2204, 0xc0cc, 0x2012, 0x0005, 0x080c,
-	0x538d, 0xd0ac, 0x0005, 0x080c, 0x538d, 0xd0a4, 0x0005, 0x0016,
-	0xb904, 0x9184, 0x00ff, 0x908e, 0x0006, 0x001e, 0x0005, 0x0016,
-	0xb904, 0x9184, 0xff00, 0x8007, 0x908e, 0x0006, 0x001e, 0x0005,
-	0x00b6, 0x00f6, 0x080c, 0xbf61, 0x0158, 0x70d8, 0x9084, 0x0028,
-	0x0138, 0x2001, 0x107f, 0x2004, 0x905d, 0x0110, 0xb8c4, 0xd094,
-	0x00fe, 0x00be, 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x0076,
-	0x00b6, 0x2001, 0x1817, 0x203c, 0x9780, 0x318b, 0x203d, 0x97bc,
-	0xff00, 0x873f, 0x9006, 0x2018, 0x2008, 0x9284, 0x8000, 0x0110,
-	0x2019, 0x0001, 0x9294, 0x7fff, 0x2100, 0x9706, 0x0190, 0x91a0,
-	0x1000, 0x2404, 0x905d, 0x0168, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x1138, 0x83ff, 0x0118, 0xb89c, 0xd0a4, 0x0110, 0x8211,
-	0x0158, 0x8108, 0x83ff, 0x0120, 0x9182, 0x0800, 0x0e28, 0x0068,
-	0x9182, 0x007e, 0x0e08, 0x0048, 0x00be, 0x007e, 0x004e, 0x003e,
-	0x001e, 0x9085, 0x0001, 0x000e, 0x0005, 0x00be, 0x007e, 0x004e,
-	0x003e, 0x001e, 0x9006, 0x000e, 0x0005, 0x0046, 0x0056, 0x0076,
-	0x00b6, 0x2100, 0x9084, 0x7fff, 0x9080, 0x1000, 0x2004, 0x905d,
-	0x0130, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0550, 0x9184,
-	0x8000, 0x0580, 0x2001, 0x1817, 0x203c, 0x9780, 0x318b, 0x203d,
-	0x97bc, 0xff00, 0x873f, 0x9006, 0x2020, 0x2400, 0x9706, 0x01a0,
-	0x94a8, 0x1000, 0x2504, 0x905d, 0x0178, 0xb804, 0x9084, 0x00ff,
-	0x9086, 0x0006, 0x1148, 0xb89c, 0xd0a4, 0x0130, 0xb814, 0x9206,
-	0x1118, 0xb810, 0x9306, 0x0128, 0x8420, 0x9482, 0x0800, 0x0e28,
-	0x0048, 0x918c, 0x7fff, 0x00be, 0x007e, 0x005e, 0x004e, 0x9085,
-	0x0001, 0x0005, 0x918c, 0x7fff, 0x00be, 0x007e, 0x005e, 0x004e,
-	0x9006, 0x0005, 0x2071, 0x1906, 0x7003, 0x0001, 0x7007, 0x0000,
-	0x9006, 0x7012, 0x7016, 0x701a, 0x701e, 0x700a, 0x7046, 0x2001,
-	0x1919, 0x2003, 0x0000, 0x0005, 0x0016, 0x00e6, 0x2071, 0x191a,
-	0x900e, 0x710a, 0x080c, 0x538d, 0xd0fc, 0x1140, 0x080c, 0x538d,
-	0x900e, 0xd09c, 0x0108, 0x8108, 0x7102, 0x0400, 0x2001, 0x1873,
-	0x200c, 0x9184, 0x0007, 0x9006, 0x0002, 0x673e, 0x673e, 0x673e,
-	0x673e, 0x673e, 0x6755, 0x6763, 0x673e, 0x7003, 0x0003, 0x2009,
-	0x1874, 0x210c, 0x9184, 0xff00, 0x8007, 0x9005, 0x1110, 0x2001,
-	0x0002, 0x7006, 0x0018, 0x7003, 0x0005, 0x0c88, 0x00ee, 0x001e,
-	0x0005, 0x00e6, 0x2071, 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6,
-	0x2071, 0x1906, 0x7028, 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001,
-	0x0488, 0x6844, 0x9005, 0x0158, 0x080c, 0x7429, 0x6a60, 0x9200,
-	0x7002, 0x6864, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6860,
-	0x7002, 0x6864, 0x7006, 0x6868, 0x700a, 0x686c, 0x700e, 0x6844,
-	0x9005, 0x1110, 0x7012, 0x7016, 0x684c, 0x701a, 0x701c, 0x9085,
-	0x0040, 0x701e, 0x7037, 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071,
-	0x1906, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700b, 0x0000,
-	0x00ee, 0x9006, 0x00ee, 0x0005, 0xa868, 0xd0fc, 0x11d8, 0x00e6,
-	0x0026, 0x2001, 0x191a, 0x2004, 0x9005, 0x0904, 0x699b, 0xa87c,
-	0xd0bc, 0x1904, 0x699b, 0xa978, 0xa874, 0x9105, 0x1904, 0x699b,
-	0x2001, 0x191a, 0x2004, 0x0002, 0x699b, 0x67ef, 0x682b, 0x682b,
-	0x699b, 0x682b, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026,
-	0x2009, 0x191a, 0x210c, 0x81ff, 0x0904, 0x699b, 0xa87c, 0xd0cc,
-	0x0904, 0x699b, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904,
-	0x699b, 0x9186, 0x0003, 0x0904, 0x682b, 0x9186, 0x0005, 0x0904,
-	0x682b, 0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005, 0xa84f,
-	0x8020, 0xa853, 0x0016, 0x2071, 0x1906, 0x701c, 0x9005, 0x1904,
-	0x6b3e, 0x0e04, 0x6b89, 0x2071, 0x0000, 0xa84c, 0x7082, 0xa850,
-	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11be, 0x2071, 0x1800,
-	0x2011, 0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802, 0x2900,
-	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8074, 0x002e, 0x00ee,
-	0x0005, 0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050,
-	0x2071, 0x1906, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6920,
-	0x782c, 0x908c, 0x0780, 0x190c, 0x6cb0, 0x8004, 0x8004, 0x8004,
-	0x9084, 0x0003, 0x0002, 0x6849, 0x6920, 0x686e, 0x68bb, 0x080c,
-	0x0d65, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1170,
-	0x2071, 0x19d4, 0x703c, 0x9005, 0x1328, 0x2001, 0x191b, 0x2004,
-	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70bc, 0x9200, 0x70be, 0x080c, 0x8074, 0x0c10, 0x2071, 0x1800,
-	0x2900, 0x7822, 0xa804, 0x900d, 0x15a8, 0x7824, 0x00e6, 0x2071,
-	0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, 0x182f, 0x210c, 0x918a,
-	0x0040, 0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102,
-	0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e,
-	0x70bc, 0x8000, 0x70be, 0x080c, 0x8074, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6cb0, 0xd0a4, 0x19c8, 0x2071, 0x19d4, 0x703c, 0x9005,
-	0x1328, 0x2001, 0x191b, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
-	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c,
-	0x8074, 0x0804, 0x6875, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071,
-	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
-	0x080c, 0x8074, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cb0, 0xd0a4,
-	0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cb0, 0xd09c,
-	0x11a0, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x1560, 0x2071,
-	0x19d4, 0x703c, 0x9005, 0x1328, 0x2001, 0x191b, 0x2004, 0x8005,
-	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e, 0x2908, 0x7010,
-	0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008,
-	0x711e, 0x2148, 0xa804, 0x900d, 0x1170, 0x2071, 0x19d4, 0x703c,
-	0x9005, 0x1328, 0x2001, 0x191b, 0x2004, 0x8005, 0x703e, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006, 0x01ce,
+	0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104, 0x01de,
+	0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e,
+	0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004,
+	0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128,
+	0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6, 0x3300,
+	0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004, 0x01de,
+	0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126, 0x2091,
+	0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x1022, 0x0168, 0x2900,
+	0xb8a6, 0x080c, 0x64fa, 0xa803, 0x0001, 0xa807, 0x0000, 0x9085,
+	0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126,
+	0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c,
+	0x1054, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4,
+	0x0005, 0x00b6, 0x00f6, 0x080c, 0x7096, 0x01b0, 0x71c0, 0x81ff,
+	0x1198, 0x71d8, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080, 0x1000,
+	0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
+	0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1853, 0x7804, 0x00d0,
+	0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x626b, 0x1168,
+	0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118, 0x9086,
+	0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108, 0x1f04,
+	0x6584, 0x015e, 0x080c, 0x6624, 0x0120, 0x2001, 0x1955, 0x200c,
+	0x0030, 0x2079, 0x1853, 0x7804, 0x0030, 0x2009, 0x07d0, 0x2011,
+	0x65ae, 0x080c, 0x81fc, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x2011,
+	0x65ae, 0x080c, 0x8138, 0x080c, 0x6624, 0x01d8, 0x2001, 0x107e,
+	0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c, 0x6662, 0x0130,
+	0x2009, 0x07d0, 0x2011, 0x65ae, 0x080c, 0x81fc, 0x00e6, 0x2071,
+	0x1800, 0x9006, 0x707a, 0x705c, 0x707e, 0x080c, 0x2de9, 0x00ee,
+	0x04d0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c,
+	0x626b, 0x1558, 0xb800, 0xd0ec, 0x0540, 0x0046, 0xbaa0, 0x2220,
+	0x9006, 0x2009, 0x0029, 0x080c, 0xd284, 0xb800, 0xc0e5, 0xc0ec,
+	0xb802, 0x080c, 0x665e, 0x2001, 0x0707, 0x1128, 0xb804, 0x9084,
+	0x00ff, 0x9085, 0x0700, 0xb806, 0x080c, 0x98bb, 0x2019, 0x0029,
+	0x080c, 0x8624, 0x0076, 0x903e, 0x080c, 0x8509, 0x900e, 0x080c,
+	0xcfd9, 0x007e, 0x004e, 0x080c, 0x98d7, 0x001e, 0x8108, 0x1f04,
+	0x65d6, 0x00ce, 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010, 0x2058,
+	0xb800, 0xc0ec, 0xb802, 0x00be, 0x0005, 0x7810, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d, 0x0108,
+	0xb800, 0x00be, 0xd0bc, 0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e,
+	0x2004, 0x905d, 0x0110, 0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005,
+	0x0126, 0x0026, 0x2091, 0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000,
+	0x2204, 0x9b06, 0x190c, 0x0d65, 0x000e, 0xba00, 0x9005, 0x0110,
+	0xc2fd, 0x0008, 0xc2fc, 0xba02, 0x002e, 0x012e, 0x0005, 0x2011,
+	0x1836, 0x2204, 0xd0cc, 0x0138, 0x2001, 0x1953, 0x200c, 0x2011,
+	0x6654, 0x080c, 0x81fc, 0x0005, 0x2011, 0x6654, 0x080c, 0x8138,
+	0x2011, 0x1836, 0x2204, 0xc0cc, 0x2012, 0x0005, 0x080c, 0x5388,
+	0xd0ac, 0x0005, 0x080c, 0x5388, 0xd0a4, 0x0005, 0x0016, 0xb904,
+	0x9184, 0x00ff, 0x908e, 0x0006, 0x001e, 0x0005, 0x0016, 0xb904,
+	0x9184, 0xff00, 0x8007, 0x908e, 0x0006, 0x001e, 0x0005, 0x00b6,
+	0x00f6, 0x080c, 0xbf61, 0x0158, 0x70d8, 0x9084, 0x0028, 0x0138,
+	0x2001, 0x107f, 0x2004, 0x905d, 0x0110, 0xb8c4, 0xd094, 0x00fe,
+	0x00be, 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x0076, 0x00b6,
+	0x2001, 0x1817, 0x203c, 0x9780, 0x317f, 0x203d, 0x97bc, 0xff00,
+	0x873f, 0x9006, 0x2018, 0x2008, 0x9284, 0x8000, 0x0110, 0x2019,
+	0x0001, 0x9294, 0x7fff, 0x2100, 0x9706, 0x0190, 0x91a0, 0x1000,
+	0x2404, 0x905d, 0x0168, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
+	0x1138, 0x83ff, 0x0118, 0xb89c, 0xd0a4, 0x0110, 0x8211, 0x0158,
+	0x8108, 0x83ff, 0x0120, 0x9182, 0x0800, 0x0e28, 0x0068, 0x9182,
+	0x007e, 0x0e08, 0x0048, 0x00be, 0x007e, 0x004e, 0x003e, 0x001e,
+	0x9085, 0x0001, 0x000e, 0x0005, 0x00be, 0x007e, 0x004e, 0x003e,
+	0x001e, 0x9006, 0x000e, 0x0005, 0x0046, 0x0056, 0x0076, 0x00b6,
+	0x2100, 0x9084, 0x7fff, 0x9080, 0x1000, 0x2004, 0x905d, 0x0130,
+	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0550, 0x9184, 0x8000,
+	0x0580, 0x2001, 0x1817, 0x203c, 0x9780, 0x317f, 0x203d, 0x97bc,
+	0xff00, 0x873f, 0x9006, 0x2020, 0x2400, 0x9706, 0x01a0, 0x94a8,
+	0x1000, 0x2504, 0x905d, 0x0178, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x1148, 0xb89c, 0xd0a4, 0x0130, 0xb814, 0x9206, 0x1118,
+	0xb810, 0x9306, 0x0128, 0x8420, 0x9482, 0x0800, 0x0e28, 0x0048,
+	0x918c, 0x7fff, 0x00be, 0x007e, 0x005e, 0x004e, 0x9085, 0x0001,
+	0x0005, 0x918c, 0x7fff, 0x00be, 0x007e, 0x005e, 0x004e, 0x9006,
+	0x0005, 0x2071, 0x1906, 0x7003, 0x0001, 0x7007, 0x0000, 0x9006,
+	0x7012, 0x7016, 0x701a, 0x701e, 0x700a, 0x7046, 0x0005, 0x0016,
+	0x00e6, 0x2071, 0x1919, 0x900e, 0x710a, 0x080c, 0x5388, 0xd0fc,
+	0x1140, 0x080c, 0x5388, 0x900e, 0xd09c, 0x0108, 0x8108, 0x7102,
+	0x0400, 0x2001, 0x1873, 0x200c, 0x9184, 0x0007, 0x9006, 0x0002,
+	0x6739, 0x6739, 0x6739, 0x6739, 0x6739, 0x6750, 0x675e, 0x6739,
+	0x7003, 0x0003, 0x2009, 0x1874, 0x210c, 0x9184, 0xff00, 0x8007,
+	0x9005, 0x1110, 0x2001, 0x0002, 0x7006, 0x0018, 0x7003, 0x0005,
+	0x0c88, 0x00ee, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0050, 0x684c,
+	0x9005, 0x1150, 0x00e6, 0x2071, 0x1906, 0x7028, 0xc085, 0x702a,
+	0x00ee, 0x9085, 0x0001, 0x0488, 0x6844, 0x9005, 0x0158, 0x080c,
+	0x7408, 0x6a60, 0x9200, 0x7002, 0x6864, 0x9101, 0x7006, 0x9006,
+	0x7012, 0x7016, 0x6860, 0x7002, 0x6864, 0x7006, 0x6868, 0x700a,
+	0x686c, 0x700e, 0x6844, 0x9005, 0x1110, 0x7012, 0x7016, 0x684c,
+	0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x7037, 0x0019, 0x702b,
+	0x0001, 0x00e6, 0x2071, 0x1906, 0x7028, 0xc084, 0x702a, 0x7007,
+	0x0001, 0x700b, 0x0000, 0x00ee, 0x9006, 0x00ee, 0x0005, 0xa868,
+	0xd0fc, 0x11d8, 0x00e6, 0x0026, 0x2001, 0x1919, 0x2004, 0x9005,
+	0x0904, 0x6996, 0xa87c, 0xd0bc, 0x1904, 0x6996, 0xa978, 0xa874,
+	0x9105, 0x1904, 0x6996, 0x2001, 0x1919, 0x2004, 0x0002, 0x6996,
+	0x67ea, 0x6826, 0x6826, 0x6996, 0x6826, 0x0005, 0xa868, 0xd0fc,
+	0x1500, 0x00e6, 0x0026, 0x2009, 0x1919, 0x210c, 0x81ff, 0x0904,
+	0x6996, 0xa87c, 0xd0cc, 0x0904, 0x6996, 0xa880, 0x9084, 0x00ff,
+	0x9086, 0x0001, 0x1904, 0x6996, 0x9186, 0x0003, 0x0904, 0x6826,
+	0x9186, 0x0005, 0x0904, 0x6826, 0xa84f, 0x8021, 0xa853, 0x0017,
+	0x0028, 0x0005, 0xa84f, 0x8020, 0xa853, 0x0016, 0x2071, 0x1906,
+	0x701c, 0x9005, 0x1904, 0x6b2d, 0x0e04, 0x6b78, 0x2071, 0x0000,
+	0xa84c, 0x7082, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870,
+	0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x11c9, 0x2071, 0x1800, 0x2011, 0x0001, 0xa804, 0x900d, 0x702c,
+	0x1158, 0xa802, 0x2900, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c,
+	0x8053, 0x002e, 0x00ee, 0x0005, 0x0096, 0x2148, 0xa904, 0xa802,
+	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000,
+	0x00f6, 0x2079, 0x0050, 0x2071, 0x1906, 0xa803, 0x0000, 0x7010,
+	0x9005, 0x1904, 0x691b, 0x782c, 0x908c, 0x0780, 0x190c, 0x6c9f,
+	0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x6844, 0x691b,
+	0x6869, 0x68b6, 0x080c, 0x0d65, 0x2071, 0x1800, 0x2900, 0x7822,
+	0xa804, 0x900d, 0x1170, 0x2071, 0x19d3, 0x703c, 0x9005, 0x1328,
+	0x2001, 0x191a, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
+	0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8053,
+	0x0c10, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x15a8,
+	0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009,
+	0x182f, 0x210c, 0x918a, 0x0040, 0x0240, 0x7022, 0x2001, 0x1dc0,
+	0x200c, 0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c,
+	0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8053,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x6c9f, 0xd0a4, 0x19c8, 0x2071,
+	0x19d3, 0x703c, 0x9005, 0x1328, 0x2001, 0x191a, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
 	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
-	0x9200, 0x70be, 0x080c, 0x8074, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
-	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6975,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6cb0, 0xd09c, 0x1198, 0x701c,
-	0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800,
-	0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cb0,
-	0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cb0, 0xd0a4,
-	0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8074, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6cb0, 0xd0a4, 0x1d60, 0x00ee, 0x2071,
-	0x19d4, 0x703c, 0x9005, 0x1328, 0x2001, 0x191b, 0x2004, 0x8005,
-	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x9200, 0x70be, 0x080c, 0x8053, 0x0804, 0x6870, 0x0096, 0x00e6,
+	0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e,
+	0x70bc, 0x8000, 0x70be, 0x080c, 0x8053, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6c9f, 0xd0a4, 0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6c9f, 0xd09c, 0x11a0, 0x009e, 0x2900, 0x7822, 0xa804,
+	0x900d, 0x1560, 0x2071, 0x19d3, 0x703c, 0x9005, 0x1328, 0x2001,
+	0x191a, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
+	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1170,
+	0x2071, 0x19d3, 0x703c, 0x9005, 0x1328, 0x2001, 0x191a, 0x2004,
+	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800,
 	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8074, 0x00ee,
-	0x0804, 0x6930, 0xa868, 0xd0fc, 0x1560, 0x0096, 0xa804, 0xa807,
-	0x0000, 0x904d, 0x190c, 0x0fd4, 0x009e, 0x0018, 0xa868, 0xd0fc,
-	0x1500, 0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050,
-	0x2071, 0x1906, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6ab8,
-	0x782c, 0x908c, 0x0780, 0x190c, 0x6cb0, 0x8004, 0x8004, 0x8004,
-	0x9084, 0x0003, 0x0002, 0x69ba, 0x6ab8, 0x69d5, 0x6a47, 0x080c,
-	0x0d65, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d,
-	0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
-	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
-	0x9200, 0x70be, 0x080c, 0x8074, 0x0c60, 0x2071, 0x1800, 0x2900,
-	0x7822, 0xa804, 0x900d, 0x1904, 0x6a36, 0x7830, 0xd0dc, 0x1120,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x7824, 0x00e6, 0x2071, 0x0040,
-	0x712c, 0xd19c, 0x1170, 0x2009, 0x182f, 0x210c, 0x918a, 0x0040,
-	0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee,
-	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
-	0x8000, 0x70be, 0x080c, 0x8074, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6cb0, 0xd0a4, 0x19c8, 0x0e04, 0x6a2d, 0x7838, 0x7938, 0x910e,
-	0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de,
-	0x2001, 0x1917, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x11be, 0x2009, 0x1919, 0x200b,
-	0x0000, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2001, 0x1917, 0x200c,
-	0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70bc, 0x9200, 0x70be, 0x080c, 0x8074, 0x0804, 0x69e4, 0x0096,
-	0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900,
-	0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8074, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x6cb0, 0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x6a8b,
-	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
-	0x6833, 0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11be, 0x2009, 0x1919,
-	0x200b, 0x0000, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cb0, 0xd09c,
-	0x1170, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e,
-	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
-	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
-	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
-	0x9200, 0x70be, 0x080c, 0x8074, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
-	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6b29,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6cb0, 0xd09c, 0x11b0, 0x701c,
-	0x904d, 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001, 0x7012,
+	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8053, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
+	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
+	0x900d, 0x1904, 0x6970, 0x782c, 0x9094, 0x0780, 0x190c, 0x6c9f,
+	0xd09c, 0x1198, 0x701c, 0x904d, 0x0180, 0x7010, 0x8001, 0x7012,
 	0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x6cb0, 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6cb0, 0xd0a4, 0x05c8, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x0780, 0x190c, 0x6c9f, 0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6c9f, 0xd0a4, 0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071,
 	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
-	0x080c, 0x8074, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cb0, 0xd0a4,
-	0x1d60, 0x00ee, 0x0e04, 0x6b22, 0x7838, 0x7938, 0x910e, 0x1de0,
-	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044,
-	0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x11be, 0x2009, 0x1919, 0x200b, 0x0000, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
-	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200,
-	0x70be, 0x080c, 0x8074, 0x00ee, 0x0804, 0x6ac8, 0x2071, 0x1906,
-	0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
-	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
-	0x1128, 0x1e04, 0x6b69, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800,
+	0x080c, 0x8053, 0x782c, 0x9094, 0x0780, 0x190c, 0x6c9f, 0xd0a4,
+	0x1d60, 0x00ee, 0x2071, 0x19d3, 0x703c, 0x9005, 0x1328, 0x2001,
+	0x191a, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
+	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be,
+	0x080c, 0x8053, 0x00ee, 0x0804, 0x692b, 0xa868, 0xd0fc, 0x1560,
+	0x0096, 0xa804, 0xa807, 0x0000, 0x904d, 0x190c, 0x0fd4, 0x009e,
+	0x0018, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026, 0xa84f, 0x0000,
+	0x00f6, 0x2079, 0x0050, 0x2071, 0x1906, 0xa803, 0x0000, 0x7010,
+	0x9005, 0x1904, 0x6aab, 0x782c, 0x908c, 0x0780, 0x190c, 0x6c9f,
+	0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x69b5, 0x6aab,
+	0x69d0, 0x6a3e, 0x080c, 0x0d65, 0x0005, 0x2071, 0x1800, 0x2900,
+	0x7822, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005,
 	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
-	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8074, 0x0e04,
-	0x6b53, 0x2071, 0x1906, 0x701c, 0x2048, 0xa84c, 0x900d, 0x0d18,
-	0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036,
-	0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x11be, 0x2071, 0x1906, 0x080c, 0x6c9c, 0x002e, 0x00ee,
-	0x0005, 0x2071, 0x1906, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000,
-	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
-	0x2148, 0xa804, 0x900d, 0x1118, 0x002e, 0x00ee, 0x0005, 0x2071,
-	0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8074,
-	0x002e, 0x00ee, 0x0005, 0x0006, 0xa87c, 0x0006, 0xa867, 0x0103,
-	0x20a9, 0x001c, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0,
-	0x9006, 0x4004, 0x000e, 0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a,
-	0xa982, 0x0005, 0x2071, 0x1906, 0x7004, 0x0002, 0x6bd4, 0x6bd5,
-	0x6c9b, 0x6bd5, 0x0d65, 0x6c9b, 0x0005, 0x2001, 0x191a, 0x2004,
-	0x0002, 0x6bdf, 0x6bdf, 0x6c34, 0x6c35, 0x6bdf, 0x6c35, 0x0126,
-	0x2091, 0x8000, 0x1e0c, 0x6cbb, 0x701c, 0x904d, 0x01e0, 0xa84c,
-	0x9005, 0x01d8, 0x0e04, 0x6c03, 0xa94c, 0x2071, 0x0000, 0x7182,
-	0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11be, 0x2071,
-	0x1906, 0x080c, 0x6c9c, 0x012e, 0x0470, 0x2001, 0x005b, 0x2004,
-	0x9094, 0x0780, 0x190c, 0x6cb0, 0xd09c, 0x2071, 0x1906, 0x1510,
-	0x2071, 0x1906, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086,
-	0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e,
-	0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x2071, 0x1906,
-	0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005,
-	0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x00d6, 0x2008, 0x2069,
-	0x19d4, 0x683c, 0x9005, 0x0760, 0x0158, 0x9186, 0x0003, 0x0540,
-	0x2001, 0x1814, 0x2004, 0x2009, 0x1b1e, 0x210c, 0x9102, 0x1500,
-	0x0126, 0x2091, 0x8000, 0x2069, 0x0050, 0x693c, 0x6838, 0x9106,
-	0x0190, 0x0e04, 0x6c67, 0x2069, 0x0000, 0x6837, 0x8040, 0x6833,
-	0x0012, 0x6883, 0x8040, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x11be, 0x2069, 0x19d4, 0x683f, 0xffff, 0x012e,
-	0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x6d31, 0x701c, 0x904d,
-	0x0540, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x15c9, 0xd09c,
-	0x1500, 0x2071, 0x1906, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff,
-	0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108,
-	0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x701c,
-	0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108,
-	0x701a, 0x012e, 0x0005, 0x0005, 0x0126, 0x2091, 0x8000, 0x701c,
-	0x904d, 0x0160, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005,
-	0x1108, 0x701a, 0x012e, 0x080c, 0x1054, 0x0005, 0x012e, 0x0005,
-	0x2091, 0x8000, 0x0e04, 0x6cb2, 0x0006, 0x0016, 0x2001, 0x8004,
-	0x0006, 0x0804, 0x0d6e, 0x0096, 0x00f6, 0x2079, 0x0050, 0x7044,
-	0xd084, 0x01e0, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0,
-	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11be, 0x2009,
-	0x1919, 0x200b, 0x0000, 0x00fe, 0x009e, 0x0005, 0x782c, 0x9094,
-	0x0780, 0x1971, 0xd0a4, 0x0db8, 0x2009, 0x1919, 0x2104, 0x8000,
-	0x200a, 0x9082, 0x000f, 0x0e78, 0x00e6, 0x2071, 0x1800, 0x7824,
+	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8053, 0x0c60,
+	0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1904, 0x6a2d,
+	0x7830, 0xd0dc, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7824,
 	0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, 0x182f,
 	0x210c, 0x918a, 0x0040, 0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c,
 	0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8074, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6cb0, 0xd0a4, 0x19c8, 0x7838, 0x7938,
-	0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013,
-	0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x11be, 0x2009, 0x1919, 0x200b, 0x0000, 0x00ee, 0x00fe, 0x009e,
-	0x0005, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01b8, 0xc084,
-	0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000,
+	0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8053, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x6c9f, 0xd0a4, 0x19c8, 0x0e04, 0x6a24,
+	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
+	0x6833, 0x0013, 0x00de, 0x2001, 0x1917, 0x200c, 0xc184, 0x2102,
+	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11c9,
+	0x00fe, 0x002e, 0x00ee, 0x0005, 0x2001, 0x1917, 0x200c, 0xc185,
+	0x2102, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
+	0x9200, 0x70be, 0x080c, 0x8053, 0x0804, 0x69df, 0x0096, 0x00e6,
+	0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e,
+	0x70bc, 0x8000, 0x70be, 0x080c, 0x8053, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6c9f, 0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x6a7e, 0x7838,
+	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
+	0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11c9, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6c9f, 0xd09c, 0x1170, 0x009e, 0x2900, 0x7822, 0xa804,
+	0x900d, 0x11e0, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085,
+	0x7046, 0x0c58, 0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
+	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
+	0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800,
+	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8053, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
+	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
+	0x900d, 0x1904, 0x6b18, 0x782c, 0x9094, 0x0780, 0x190c, 0x6c9f,
+	0xd09c, 0x11b0, 0x701c, 0x904d, 0x0198, 0xa84c, 0x9005, 0x1180,
+	0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e, 0x2900,
+	0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x6c9f, 0xd09c, 0x0d50,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x6c9f, 0xd0a4, 0x05a8, 0x00e6,
+	0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e,
+	0x70bc, 0x8000, 0x70be, 0x080c, 0x8053, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6c9f, 0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x6b11, 0x7838,
+	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
+	0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11c9, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x7044, 0xc085, 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
+	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be,
+	0x080c, 0x8053, 0x00ee, 0x0804, 0x6abb, 0x2071, 0x1906, 0xa803,
+	0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
+	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1128,
+	0x1e04, 0x6b58, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016,
+	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
+	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8053, 0x0e04, 0x6b42,
+	0x2071, 0x1906, 0x701c, 0x2048, 0xa84c, 0x900d, 0x0d18, 0x2071,
+	0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870,
+	0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x11c9, 0x2071, 0x1906, 0x080c, 0x6c8b, 0x002e, 0x00ee, 0x0005,
+	0x2071, 0x1906, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012,
+	0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148,
+	0xa804, 0x900d, 0x1118, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800,
+	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8053, 0x002e,
+	0x00ee, 0x0005, 0x0006, 0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9,
+	0x001c, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006,
+	0x4004, 0x000e, 0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982,
+	0x0005, 0x2071, 0x1906, 0x7004, 0x0002, 0x6bc3, 0x6bc4, 0x6c8a,
+	0x6bc4, 0x0d65, 0x6c8a, 0x0005, 0x2001, 0x1919, 0x2004, 0x0002,
+	0x6bce, 0x6bce, 0x6c23, 0x6c24, 0x6bce, 0x6c24, 0x0126, 0x2091,
+	0x8000, 0x1e0c, 0x6caa, 0x701c, 0x904d, 0x01e0, 0xa84c, 0x9005,
+	0x01d8, 0x0e04, 0x6bf2, 0xa94c, 0x2071, 0x0000, 0x7182, 0xa850,
+	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11c9, 0x2071, 0x1906,
+	0x080c, 0x6c8b, 0x012e, 0x0470, 0x2001, 0x005b, 0x2004, 0x9094,
+	0x0780, 0x190c, 0x6c9f, 0xd09c, 0x2071, 0x1906, 0x1510, 0x2071,
+	0x1906, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003,
+	0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900,
+	0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x2071, 0x1906, 0x701c,
+	0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108,
+	0x701a, 0x012e, 0x0005, 0x0005, 0x00d6, 0x2008, 0x2069, 0x19d3,
+	0x683c, 0x9005, 0x0760, 0x0158, 0x9186, 0x0003, 0x0540, 0x2001,
+	0x1814, 0x2004, 0x2009, 0x1b1d, 0x210c, 0x9102, 0x1500, 0x0126,
+	0x2091, 0x8000, 0x2069, 0x0050, 0x693c, 0x6838, 0x9106, 0x0190,
+	0x0e04, 0x6c56, 0x2069, 0x0000, 0x6837, 0x8040, 0x6833, 0x0012,
+	0x6883, 0x8040, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x11c9, 0x2069, 0x19d3, 0x683f, 0xffff, 0x012e, 0x00de,
+	0x0126, 0x2091, 0x8000, 0x1e0c, 0x6d10, 0x701c, 0x904d, 0x0540,
+	0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x15c9, 0xd09c, 0x1500,
+	0x2071, 0x1906, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086,
+	0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e,
+	0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x701c, 0x2048,
+	0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a,
+	0x012e, 0x0005, 0x0005, 0x0126, 0x2091, 0x8000, 0x701c, 0x904d,
+	0x0160, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108,
+	0x701a, 0x012e, 0x080c, 0x1054, 0x0005, 0x012e, 0x0005, 0x2091,
+	0x8000, 0x0e04, 0x6ca1, 0x0006, 0x0016, 0x2001, 0x8004, 0x0006,
+	0x0804, 0x0d6e, 0x0096, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084,
+	0x01c0, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
+	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11c9, 0x00fe, 0x009e,
+	0x0005, 0x782c, 0x9094, 0x0780, 0x1991, 0xd0a4, 0x0db8, 0x00e6,
+	0x2071, 0x1800, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c,
+	0x1170, 0x2009, 0x182f, 0x210c, 0x918a, 0x0040, 0x0240, 0x7022,
+	0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee,
+	0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
+	0x080c, 0x8053, 0x782c, 0x9094, 0x0780, 0x190c, 0x6c9f, 0xd0a4,
+	0x19c8, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000,
 	0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11be, 0x00fe, 0x0005, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x6cb0, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800,
-	0x7824, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000,
-	0x70be, 0x080c, 0x8074, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cb0,
-	0xd0a4, 0x1d70, 0x00d6, 0x2069, 0x0050, 0x693c, 0x2069, 0x191a,
-	0x6808, 0x690a, 0x2069, 0x19d4, 0x9102, 0x1118, 0x683c, 0x9005,
-	0x1328, 0x2001, 0x191b, 0x200c, 0x810d, 0x693e, 0x00de, 0x00ee,
-	0x00fe, 0x0005, 0x7094, 0x908a, 0x0029, 0x1a0c, 0x0d65, 0x9082,
-	0x001d, 0x003b, 0x0026, 0x2011, 0x1e00, 0x080c, 0x286d, 0x002e,
-	0x0005, 0x6e5d, 0x6de3, 0x6dff, 0x6e29, 0x6e4c, 0x6e8c, 0x6e9e,
-	0x6dff, 0x6e74, 0x6d9e, 0x6dcc, 0x6d9d, 0x0005, 0x00d6, 0x2069,
-	0x0200, 0x6804, 0x9005, 0x1180, 0x6808, 0x9005, 0x1518, 0x7097,
-	0x0028, 0x2069, 0x1960, 0x2d04, 0x7002, 0x080c, 0x71f8, 0x6028,
-	0x9085, 0x0600, 0x602a, 0x00b0, 0x7097, 0x0028, 0x2069, 0x1960,
-	0x2d04, 0x7002, 0x6028, 0x9085, 0x0600, 0x602a, 0x00e6, 0x0036,
-	0x0046, 0x0056, 0x2071, 0x1a3c, 0x080c, 0x195f, 0x005e, 0x004e,
-	0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804,
-	0x9005, 0x1178, 0x6808, 0x9005, 0x1160, 0x7097, 0x0028, 0x2069,
-	0x1960, 0x2d04, 0x7002, 0x080c, 0x729a, 0x6028, 0x9085, 0x0600,
-	0x602a, 0x00de, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2833,
-	0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x6f0f, 0xd1d4, 0x1160,
-	0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x7097, 0x0020, 0x080c, 0x6f0f,
-	0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f, 0x0005, 0x2001,
-	0x0088, 0x080c, 0x2833, 0x6124, 0xd1cc, 0x11e8, 0xd1dc, 0x11c0,
-	0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c, 0x1989, 0x60e3,
-	0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x70e3, 0x2001, 0x0080,
-	0x080c, 0x2833, 0x7097, 0x0028, 0x0058, 0x7097, 0x001e, 0x0040,
-	0x7097, 0x001d, 0x0028, 0x7097, 0x0020, 0x0010, 0x7097, 0x001f,
-	0x0005, 0x080c, 0x1989, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e,
-	0x080c, 0x70e3, 0x2001, 0x0080, 0x080c, 0x2833, 0x6124, 0xd1d4,
-	0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184, 0x1e00, 0x1158,
-	0x7097, 0x0028, 0x0040, 0x7097, 0x001e, 0x0028, 0x7097, 0x001d,
-	0x0010, 0x7097, 0x001f, 0x0005, 0x2001, 0x00a0, 0x080c, 0x2833,
-	0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c, 0x1989, 0x7097,
-	0x001e, 0x0010, 0x7097, 0x001d, 0x0005, 0x080c, 0x6f98, 0x6124,
-	0xd1dc, 0x1188, 0x080c, 0x6f0f, 0x0016, 0x080c, 0x1989, 0x001e,
-	0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x7097, 0x001e, 0x0020, 0x7097,
-	0x001f, 0x080c, 0x6f0f, 0x0005, 0x0006, 0x2001, 0x00a0, 0x080c,
-	0x2833, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc,
-	0x1128, 0xd1e4, 0x0140, 0x7097, 0x001e, 0x0028, 0x7097, 0x001d,
-	0x0010, 0x7097, 0x0021, 0x0005, 0x080c, 0x6f98, 0x6124, 0xd1d4,
-	0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x7097, 0x001e, 0x0028,
-	0x7097, 0x001d, 0x0010, 0x7097, 0x001f, 0x0005, 0x0006, 0x2001,
-	0x0090, 0x080c, 0x2833, 0x000e, 0x6124, 0xd1d4, 0x1178, 0xd1cc,
-	0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x7097, 0x001e, 0x0040,
-	0x7097, 0x001d, 0x0028, 0x7097, 0x0020, 0x0010, 0x7097, 0x001f,
-	0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100,
-	0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x080c, 0x70b7,
-	0x11f8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01d0, 0xc1b4, 0x2102,
-	0x0026, 0x2011, 0x0200, 0x080c, 0x286d, 0x002e, 0x080c, 0x2819,
-	0x6024, 0xd0cc, 0x0148, 0x2001, 0x00a0, 0x080c, 0x2833, 0x080c,
-	0x73b7, 0x080c, 0x5cdc, 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408,
-	0x080c, 0x70d1, 0x0150, 0x080c, 0x70c8, 0x1138, 0x2001, 0x0001,
-	0x080c, 0x23c9, 0x080c, 0x708b, 0x00a0, 0x080c, 0x6f95, 0x0178,
-	0x2001, 0x0001, 0x080c, 0x23c9, 0x7094, 0x9086, 0x001e, 0x0120,
-	0x7094, 0x9086, 0x0022, 0x1118, 0x7097, 0x0025, 0x0010, 0x7097,
-	0x0021, 0x012e, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026,
-	0x2011, 0x6f20, 0x080c, 0x825f, 0x002e, 0x0016, 0x0026, 0x2009,
-	0x0064, 0x2011, 0x6f20, 0x080c, 0x8256, 0x002e, 0x001e, 0x0005,
-	0x00e6, 0x00f6, 0x0016, 0x080c, 0x8fb7, 0x2071, 0x1800, 0x080c,
-	0x6eb9, 0x001e, 0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036,
-	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0126, 0x080c, 0x8fb7, 0x2061,
-	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x6028,
-	0xc09c, 0x602a, 0x080c, 0x98c8, 0x2011, 0x0003, 0x080c, 0x9339,
-	0x2011, 0x0002, 0x080c, 0x9343, 0x080c, 0x9206, 0x080c, 0x820b,
-	0x0036, 0x901e, 0x080c, 0x9286, 0x003e, 0x080c, 0x98e4, 0x60e3,
-	0x0000, 0x080c, 0xd5fb, 0x080c, 0xd616, 0x2009, 0x0004, 0x080c,
-	0x281f, 0x080c, 0x273f, 0x2001, 0x1800, 0x2003, 0x0004, 0x2011,
-	0x0008, 0x080c, 0x286d, 0x2011, 0x6f20, 0x080c, 0x825f, 0x080c,
-	0x70d1, 0x0118, 0x9006, 0x080c, 0x2833, 0x080c, 0x0bab, 0x2001,
-	0x0001, 0x080c, 0x23c9, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x6f2d,
-	0x2071, 0x19d4, 0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110,
-	0x9085, 0x0001, 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005,
-	0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0, 0x01b8, 0x2001, 0x00c0,
-	0x080c, 0x2833, 0x0156, 0x20a9, 0x002d, 0x1d04, 0x6fa5, 0x2091,
-	0x6000, 0x1f04, 0x6fa5, 0x015e, 0x00d6, 0x2069, 0x1800, 0x6898,
-	0x8001, 0x0220, 0x0118, 0x689a, 0x00de, 0x0005, 0x689b, 0x0014,
-	0x68e8, 0xd0dc, 0x0dc8, 0x6800, 0x9086, 0x0001, 0x1da8, 0x080c,
-	0x826b, 0x0c90, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x2071, 0x1800, 0x080c, 0x73c6, 0x2001, 0x193e, 0x2003,
-	0x0000, 0x9006, 0x7096, 0x60e2, 0x6886, 0x080c, 0x2498, 0x9006,
-	0x080c, 0x2833, 0x080c, 0x5b97, 0x0026, 0x2011, 0xffff, 0x080c,
-	0x286d, 0x002e, 0x602b, 0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005,
-	0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071,
-	0x1800, 0x2001, 0x194e, 0x200c, 0x9186, 0x0000, 0x0158, 0x9186,
-	0x0001, 0x0158, 0x9186, 0x0002, 0x0158, 0x9186, 0x0003, 0x0158,
-	0x0804, 0x707b, 0x7097, 0x0022, 0x0040, 0x7097, 0x0021, 0x0028,
-	0x7097, 0x0023, 0x0010, 0x7097, 0x0024, 0x60e3, 0x0000, 0x6887,
-	0x0001, 0x2001, 0x0001, 0x080c, 0x2498, 0x080c, 0x98c8, 0x0026,
-	0x080c, 0x9b6d, 0x002e, 0x080c, 0x98e4, 0x7000, 0x908e, 0x0004,
-	0x0118, 0x602b, 0x0028, 0x0010, 0x602b, 0x0020, 0x0156, 0x0126,
-	0x2091, 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e,
-	0x015e, 0x080c, 0xbf61, 0x0118, 0x9006, 0x080c, 0x285d, 0x0804,
-	0x7087, 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c, 0x2819,
-	0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c, 0x2833, 0x1f04,
-	0x702c, 0x080c, 0x710e, 0x012e, 0x015e, 0x080c, 0x70c8, 0x0170,
-	0x6044, 0x9005, 0x0130, 0x080c, 0x710e, 0x9006, 0x8001, 0x1df0,
-	0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c, 0x710e, 0x080c, 0xbf61,
-	0x0118, 0x9006, 0x080c, 0x285d, 0x0016, 0x0026, 0x7000, 0x908e,
-	0x0004, 0x0130, 0x2009, 0x00c8, 0x2011, 0x6f2d, 0x080c, 0x821d,
-	0x002e, 0x001e, 0x080c, 0x806b, 0x7034, 0xc085, 0x7036, 0x2001,
-	0x194e, 0x2003, 0x0004, 0x080c, 0x6d82, 0x080c, 0x70c8, 0x0138,
-	0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, 0x73bc, 0x00ee,
-	0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
-	0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x8082, 0x080c, 0x8074,
-	0x080c, 0x73c6, 0x2001, 0x193e, 0x2003, 0x0000, 0x9006, 0x7096,
-	0x60e2, 0x6886, 0x080c, 0x2498, 0x9006, 0x080c, 0x2833, 0x6043,
-	0x0090, 0x6043, 0x0010, 0x0026, 0x2011, 0xffff, 0x080c, 0x286d,
-	0x002e, 0x602b, 0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006,
-	0x2001, 0x194d, 0x2004, 0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006,
-	0x080c, 0x5391, 0x9084, 0x0030, 0x9086, 0x0000, 0x000e, 0x0005,
-	0x0006, 0x080c, 0x5391, 0x9084, 0x0030, 0x9086, 0x0030, 0x000e,
-	0x0005, 0x0006, 0x080c, 0x5391, 0x9084, 0x0030, 0x9086, 0x0010,
-	0x000e, 0x0005, 0x0006, 0x080c, 0x5391, 0x9084, 0x0030, 0x9086,
-	0x0020, 0x000e, 0x0005, 0x0036, 0x0016, 0x2001, 0x180c, 0x2004,
-	0x908c, 0x0013, 0x0180, 0x0020, 0x080c, 0x24b8, 0x900e, 0x0028,
-	0x080c, 0x665f, 0x1dc8, 0x2009, 0x0002, 0x2019, 0x0028, 0x080c,
-	0x2fc5, 0x9006, 0x0019, 0x001e, 0x003e, 0x0005, 0x00e6, 0x2071,
-	0x180c, 0x2e04, 0x0130, 0x080c, 0xbf5a, 0x1128, 0x9085, 0x0010,
-	0x0010, 0x9084, 0xffef, 0x2072, 0x00ee, 0x0005, 0x6050, 0x0006,
-	0x60ec, 0x0006, 0x600c, 0x0006, 0x6004, 0x0006, 0x6028, 0x0006,
-	0x602f, 0x0100, 0x602f, 0x0000, 0x602f, 0x0040, 0x602f, 0x0000,
-	0x20a9, 0x0002, 0x080c, 0x27fa, 0x0026, 0x2011, 0x0040, 0x080c,
-	0x286d, 0x002e, 0x000e, 0x602a, 0x000e, 0x6006, 0x000e, 0x600e,
-	0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001,
-	0x080c, 0x2498, 0x2001, 0x00a0, 0x0006, 0x080c, 0xbf61, 0x000e,
-	0x0130, 0x080c, 0x2851, 0x9006, 0x080c, 0x285d, 0x0010, 0x080c,
-	0x2833, 0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5, 0x6052, 0x00f6,
-	0x2079, 0x0100, 0x080c, 0x27aa, 0x00fe, 0x000e, 0x6052, 0x0005,
-	0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061,
-	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x9926, 0x0158,
-	0x2001, 0x0386, 0x2004, 0xd0b4, 0x1130, 0x2001, 0x0016, 0x080c,
-	0x98b9, 0x0804, 0x71ea, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102,
-	0x6028, 0x9084, 0xe1ff, 0x602a, 0x2011, 0x0200, 0x080c, 0x286d,
-	0x2001, 0x0090, 0x080c, 0x2833, 0x20a9, 0x0366, 0x6024, 0xd0cc,
-	0x1558, 0x1d04, 0x7186, 0x2091, 0x6000, 0x1f04, 0x7186, 0x080c,
-	0x98c8, 0x2011, 0x0003, 0x080c, 0x9339, 0x2011, 0x0002, 0x080c,
-	0x9343, 0x080c, 0x9206, 0x901e, 0x080c, 0x9286, 0x2001, 0x0386,
-	0x2003, 0x7000, 0x080c, 0x98e4, 0x2001, 0x00a0, 0x080c, 0x2833,
-	0x080c, 0x73b7, 0x080c, 0x5cdc, 0x080c, 0xbf61, 0x0110, 0x080c,
-	0x0cd1, 0x9085, 0x0001, 0x04e0, 0x2001, 0x0386, 0x2004, 0xd0ac,
-	0x0110, 0x080c, 0x1989, 0x60e3, 0x0000, 0x2001, 0x0002, 0x080c,
-	0x2498, 0x60e2, 0x2001, 0x0080, 0x080c, 0x2833, 0x20a9, 0x0366,
-	0x2011, 0x1e00, 0x080c, 0x286d, 0x2009, 0x1e00, 0x080c, 0x2819,
-	0x6024, 0x910c, 0x0140, 0x1d04, 0x71c8, 0x2091, 0x6000, 0x1f04,
-	0x71c8, 0x0804, 0x718f, 0x2001, 0x0386, 0x2003, 0x7000, 0x6028,
-	0x9085, 0x1e00, 0x602a, 0x70b0, 0x9005, 0x1118, 0x6887, 0x0001,
-	0x0008, 0x6886, 0x080c, 0xbf61, 0x0110, 0x080c, 0x0cd1, 0x9006,
-	0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005,
-	0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061,
-	0x0100, 0x2071, 0x1800, 0x7000, 0x9086, 0x0003, 0x1168, 0x2001,
-	0x020b, 0x2004, 0x9084, 0x5540, 0x9086, 0x5540, 0x1128, 0x2069,
-	0x1a47, 0x2d04, 0x8000, 0x206a, 0x2069, 0x0140, 0x6020, 0x9084,
-	0x00c0, 0x0120, 0x6884, 0x9005, 0x1904, 0x7261, 0x2001, 0x0088,
-	0x080c, 0x2833, 0x9006, 0x60e2, 0x6886, 0x080c, 0x2498, 0x2069,
-	0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x01d0, 0x6028,
-	0x9084, 0xfbff, 0x602a, 0x2011, 0x0400, 0x080c, 0x286d, 0x2069,
-	0x1960, 0x7000, 0x206a, 0x7097, 0x0026, 0x7003, 0x0001, 0x20a9,
-	0x0002, 0x1d04, 0x7241, 0x2091, 0x6000, 0x1f04, 0x7241, 0x0804,
-	0x7292, 0x2069, 0x0140, 0x20a9, 0x0384, 0x2011, 0x1e00, 0x080c,
-	0x286d, 0x2009, 0x1e00, 0x080c, 0x2819, 0x6024, 0x910c, 0x0528,
-	0x9084, 0x1a00, 0x1510, 0x1d04, 0x724d, 0x2091, 0x6000, 0x1f04,
-	0x724d, 0x080c, 0x98c8, 0x2011, 0x0003, 0x080c, 0x9339, 0x2011,
-	0x0002, 0x080c, 0x9343, 0x080c, 0x9206, 0x901e, 0x080c, 0x9286,
-	0x080c, 0x98e4, 0x2001, 0x00a0, 0x080c, 0x2833, 0x080c, 0x73b7,
-	0x080c, 0x5cdc, 0x9085, 0x0001, 0x00a8, 0x2001, 0x0080, 0x080c,
-	0x2833, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b0, 0x9005, 0x1118,
-	0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x0002, 0x080c, 0x2498,
-	0x60e2, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e,
-	0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
-	0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0,
-	0x01e8, 0x080c, 0x98c8, 0x2011, 0x0003, 0x080c, 0x9339, 0x2011,
-	0x0002, 0x080c, 0x9343, 0x080c, 0x9206, 0x901e, 0x080c, 0x9286,
-	0x080c, 0x98e4, 0x2069, 0x0140, 0x2001, 0x00a0, 0x080c, 0x2833,
-	0x080c, 0x73b7, 0x080c, 0x5cdc, 0x0804, 0x7334, 0x2001, 0x180c,
-	0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102, 0x080c, 0x6f15, 0x2069,
-	0x0140, 0x2001, 0x0080, 0x080c, 0x2833, 0x60e3, 0x0000, 0x2069,
-	0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x0190, 0x6028,
-	0x9084, 0xfdff, 0x602a, 0x2011, 0x0200, 0x080c, 0x286d, 0x2069,
-	0x1960, 0x7000, 0x206a, 0x7097, 0x0027, 0x7003, 0x0001, 0x0804,
-	0x7334, 0x2011, 0x1e00, 0x080c, 0x286d, 0x2009, 0x1e00, 0x080c,
-	0x2819, 0x6024, 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04,
-	0x72f1, 0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x80b3,
-	0x00ee, 0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0x19d4,
-	0x7018, 0x00ee, 0x9005, 0x19e8, 0x01f8, 0x0026, 0x2011, 0x6f2d,
-	0x080c, 0x8159, 0x2011, 0x6f20, 0x080c, 0x825f, 0x002e, 0x2069,
-	0x0140, 0x60e3, 0x0000, 0x70b0, 0x9005, 0x1118, 0x6887, 0x0001,
-	0x0008, 0x6886, 0x2001, 0x0002, 0x080c, 0x2498, 0x60e2, 0x2001,
-	0x180c, 0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x080c,
-	0xbf5a, 0x1904, 0x73a1, 0x7130, 0xd184, 0x1170, 0x080c, 0x3186,
-	0x0138, 0xc18d, 0x7132, 0x2011, 0x1854, 0x2214, 0xd2ac, 0x1120,
-	0x7030, 0xd08c, 0x0904, 0x73a1, 0x2011, 0x1854, 0x220c, 0x0438,
-	0x0016, 0x2019, 0x000e, 0x080c, 0xd1eb, 0x0156, 0x00b6, 0x20a9,
-	0x007f, 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080, 0x0188,
-	0x080c, 0x6270, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009, 0x000e,
-	0x080c, 0xd273, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x83eb,
-	0x001e, 0x8108, 0x1f04, 0x736a, 0x00be, 0x015e, 0x001e, 0xd1ac,
-	0x1148, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x2fc5,
-	0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c,
-	0x6270, 0x1110, 0x080c, 0x5cf6, 0x8108, 0x1f04, 0x7397, 0x00be,
-	0x015e, 0x080c, 0x1989, 0x080c, 0x98c8, 0x080c, 0x9b6d, 0x080c,
-	0x98e4, 0x60e3, 0x0000, 0x080c, 0x5cdc, 0x080c, 0x6fe8, 0x00ee,
-	0x00ce, 0x004e, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001,
-	0x194e, 0x2003, 0x0001, 0x0005, 0x2001, 0x194e, 0x2003, 0x0000,
-	0x0005, 0x2001, 0x194d, 0x2003, 0xaaaa, 0x0005, 0x2001, 0x194d,
-	0x2003, 0x0000, 0x0005, 0x2071, 0x18f0, 0x7003, 0x0000, 0x7007,
-	0x0000, 0x080c, 0x103b, 0x090c, 0x0d65, 0xa8ab, 0xdcb0, 0x2900,
-	0x704e, 0x080c, 0x103b, 0x090c, 0x0d65, 0xa8ab, 0xdcb0, 0x2900,
-	0x7052, 0xa867, 0x0000, 0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005,
-	0x00e6, 0x2071, 0x0040, 0x6848, 0x9005, 0x1118, 0x9085, 0x0001,
-	0x04b0, 0x6840, 0x9005, 0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002,
-	0x6854, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6850, 0x7002,
-	0x6854, 0x7006, 0x6858, 0x700a, 0x685c, 0x700e, 0x6840, 0x9005,
-	0x1110, 0x7012, 0x7016, 0x6848, 0x701a, 0x701c, 0x9085, 0x0040,
-	0x701e, 0x2001, 0x0019, 0x7036, 0x702b, 0x0001, 0x2001, 0x0004,
-	0x200c, 0x918c, 0xfff7, 0x918d, 0x8000, 0x2102, 0x00d6, 0x2069,
-	0x18f0, 0x6807, 0x0001, 0x00de, 0x080c, 0x79c3, 0x9006, 0x00ee,
-	0x0005, 0x900e, 0x0156, 0x20a9, 0x0006, 0x8003, 0x818d, 0x1f04,
-	0x742d, 0x015e, 0x0005, 0x2079, 0x0040, 0x2071, 0x18f0, 0x7004,
-	0x0002, 0x7443, 0x7444, 0x748f, 0x74ea, 0x762b, 0x7441, 0x7441,
-	0x7655, 0x080c, 0x0d65, 0x0005, 0x2079, 0x0040, 0x2001, 0x1dc0,
-	0x2003, 0x0000, 0x782c, 0x908c, 0x0780, 0x190c, 0x7a4f, 0xd0a4,
-	0x0570, 0x2001, 0x1dc0, 0x2004, 0x9082, 0x0080, 0x1640, 0x1d04,
-	0x7461, 0x2001, 0x19d7, 0x200c, 0x8109, 0x0508, 0x2091, 0x6000,
-	0x2102, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084,
-	0x00ff, 0x908a, 0x0040, 0x0608, 0x00b8, 0x2001, 0x1800, 0x200c,
-	0x9186, 0x0003, 0x1160, 0x7104, 0x9186, 0x0004, 0x0140, 0x9186,
-	0x0007, 0x0128, 0x9186, 0x0003, 0x1968, 0x080c, 0x74ea, 0x782c,
-	0xd09c, 0x090c, 0x79c3, 0x0005, 0x9082, 0x005a, 0x1218, 0x2100,
-	0x003b, 0x0c18, 0x080c, 0x7520, 0x0c90, 0x00e3, 0x08f0, 0x0005,
-	0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520,
-	0x7542, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520,
-	0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520,
-	0x7520, 0x7520, 0x7520, 0x7520, 0x752c, 0x7520, 0x772a, 0x7520,
-	0x7520, 0x7520, 0x7542, 0x7520, 0x752c, 0x776b, 0x77ac, 0x77f3,
-	0x7807, 0x7520, 0x7520, 0x7542, 0x752c, 0x7520, 0x7520, 0x75ff,
-	0x78b2, 0x78cd, 0x7520, 0x7542, 0x7520, 0x7520, 0x7520, 0x7520,
-	0x75f5, 0x78cd, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x7520,
-	0x7520, 0x7520, 0x7520, 0x7556, 0x7520, 0x7520, 0x7520, 0x7520,
-	0x7520, 0x7520, 0x7520, 0x7520, 0x7520, 0x79f3, 0x7520, 0x7520,
-	0x7520, 0x7520, 0x7520, 0x756a, 0x7520, 0x7520, 0x7520, 0x7520,
-	0x7520, 0x7520, 0x2079, 0x0040, 0x7004, 0x9086, 0x0003, 0x1198,
-	0x782c, 0x080c, 0x79ec, 0xd0a4, 0x0170, 0x7824, 0x2048, 0x9006,
-	0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x001a, 0x1210,
-	0x002b, 0x0c50, 0x00e9, 0x080c, 0x79c3, 0x0005, 0x7520, 0x752c,
-	0x7716, 0x7520, 0x752c, 0x7520, 0x752c, 0x752c, 0x7520, 0x752c,
-	0x7716, 0x752c, 0x752c, 0x752c, 0x752c, 0x752c, 0x7520, 0x752c,
-	0x7716, 0x7520, 0x7520, 0x752c, 0x7520, 0x7520, 0x7520, 0x752c,
-	0x00e6, 0x2071, 0x18f0, 0x2009, 0x0400, 0x0071, 0x00ee, 0x0005,
-	0x2009, 0x1000, 0x0049, 0x0005, 0x2009, 0x2000, 0x0029, 0x0005,
-	0x2009, 0x0800, 0x0009, 0x0005, 0x7007, 0x0001, 0xa868, 0x9084,
-	0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6996,
-	0x012e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0d08, 0x8001,
-	0x1120, 0x7007, 0x0001, 0x0804, 0x76d4, 0x7007, 0x0003, 0x7012,
-	0x2900, 0x7016, 0x701a, 0x704b, 0x76d4, 0x0005, 0xa864, 0x8007,
-	0x9084, 0x00ff, 0x0968, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804,
-	0x76ef, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b,
-	0x76ef, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001,
-	0x1904, 0x7528, 0x7007, 0x0001, 0x2009, 0x1833, 0x210c, 0x81ff,
-	0x1904, 0x75cc, 0xa994, 0x9186, 0x006f, 0x0188, 0x9186, 0x0074,
-	0x15b0, 0x0026, 0x2011, 0x0010, 0x080c, 0x668b, 0x002e, 0x0578,
-	0x0016, 0xa998, 0x080c, 0x66d5, 0x001e, 0x1548, 0x0400, 0x080c,
-	0x70b7, 0x0140, 0xa897, 0x4005, 0xa89b, 0x0016, 0x2001, 0x0030,
-	0x900e, 0x0438, 0x0026, 0x2011, 0x8008, 0x080c, 0x668b, 0x002e,
-	0x01b0, 0x0016, 0x0026, 0x0036, 0xa998, 0xaaa0, 0xab9c, 0x918d,
-	0x8000, 0x080c, 0x66d5, 0x003e, 0x002e, 0x001e, 0x1140, 0xa897,
-	0x4005, 0xa89b, 0x4009, 0x2001, 0x0030, 0x900e, 0x0050, 0xa868,
-	0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c, 0x5f07, 0x1108,
-	0x0005, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0xa87a, 0xa982,
-	0x080c, 0x6996, 0x012e, 0x0ca0, 0xa994, 0x9186, 0x0071, 0x0904,
-	0x757a, 0x9186, 0x0064, 0x0904, 0x757a, 0x9186, 0x007c, 0x0904,
-	0x757a, 0x9186, 0x0028, 0x0904, 0x757a, 0x9186, 0x0038, 0x0904,
-	0x757a, 0x9186, 0x0078, 0x0904, 0x757a, 0x9186, 0x005f, 0x0904,
-	0x757a, 0x9186, 0x0056, 0x0904, 0x757a, 0xa897, 0x4005, 0xa89b,
-	0x0001, 0x2001, 0x0030, 0x900e, 0x0860, 0xa87c, 0x9084, 0x00c0,
-	0x9086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x78e4, 0x2900,
-	0x7016, 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0030, 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8, 0xa05c, 0x9080,
-	0x0023, 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082, 0x0401, 0x1a04,
-	0x7530, 0xaab4, 0x928a, 0x0002, 0x1a04, 0x7530, 0x82ff, 0x1138,
-	0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001, 0x7692, 0x0018, 0x9280,
-	0x7688, 0x2005, 0x7056, 0x7010, 0x9015, 0x0904, 0x7673, 0x080c,
-	0x103b, 0x1118, 0x7007, 0x0004, 0x0005, 0x2900, 0x7022, 0x7054,
-	0x2060, 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c, 0xe004, 0x9100,
-	0xa076, 0xa860, 0xa072, 0xe008, 0x920a, 0x1210, 0x900e, 0x2200,
-	0x7112, 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004, 0x0108, 0x9108,
-	0xa17a, 0x810b, 0xa17e, 0x080c, 0x110c, 0xa06c, 0x908e, 0x0100,
-	0x0170, 0x9086, 0x0200, 0x0118, 0x7007, 0x0007, 0x0005, 0x7020,
-	0x2048, 0x080c, 0x1054, 0x7014, 0x2048, 0x0804, 0x7530, 0x7020,
-	0x2048, 0x7018, 0xa802, 0xa807, 0x0000, 0x2908, 0x2048, 0xa906,
-	0x711a, 0x0804, 0x762b, 0x7014, 0x2048, 0x7007, 0x0001, 0xa8b4,
-	0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108, 0x00b9, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x001e, 0x0904, 0x78e4, 0x0804, 0x76d4,
-	0x768a, 0x768e, 0x0002, 0x001d, 0x0007, 0x0004, 0x000a, 0x001b,
-	0x0005, 0x0006, 0x000a, 0x001d, 0x0005, 0x0004, 0x0076, 0x0066,
-	0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2, 0xb0bc, 0xb0de,
-	0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6, 0xb0b0, 0xb0ca,
-	0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2, 0xb7be,
-	0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2, 0xb094, 0xb09e,
-	0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096, 0xb088, 0xb08a,
-	0xb084, 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082, 0xb07c, 0xb07e,
-	0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776, 0xb004, 0x9055,
-	0x1958, 0x006e, 0x007e, 0x0005, 0x2009, 0x1833, 0x210c, 0x81ff,
-	0x1178, 0x080c, 0x5d56, 0x1108, 0x0005, 0x080c, 0x6bb3, 0x0126,
-	0x2091, 0x8000, 0x080c, 0xbb45, 0x080c, 0x6996, 0x012e, 0x0ca0,
-	0x080c, 0xbf5a, 0x1d70, 0x2001, 0x0028, 0x900e, 0x0c70, 0x2009,
-	0x1833, 0x210c, 0x81ff, 0x11d8, 0xa888, 0x9005, 0x01e0, 0xa883,
-	0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c, 0x5e69, 0x1138, 0x0005,
-	0x9006, 0xa87a, 0x080c, 0x5de4, 0x1108, 0x0005, 0x0126, 0x2091,
-	0x8000, 0xa87a, 0xa982, 0x080c, 0x6996, 0x012e, 0x0cb0, 0x2001,
-	0x0028, 0x900e, 0x0c98, 0x2001, 0x0000, 0x0c80, 0x7018, 0xa802,
-	0x2908, 0x2048, 0xa906, 0x711a, 0x7010, 0x8001, 0x7012, 0x0118,
-	0x7007, 0x0003, 0x0030, 0x7014, 0x2048, 0x7007, 0x0001, 0x7048,
-	0x080f, 0x0005, 0x00b6, 0x7007, 0x0001, 0xa974, 0xa878, 0x9084,
-	0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9, 0x0001, 0x9096, 0x0001,
-	0x0190, 0x900e, 0x20a9, 0x0800, 0x9096, 0x0002, 0x0160, 0x9005,
-	0x11d8, 0xa974, 0x080c, 0x6270, 0x11b8, 0x0066, 0xae80, 0x080c,
-	0x6380, 0x006e, 0x0088, 0x0046, 0x2011, 0x180c, 0x2224, 0xc484,
-	0x2412, 0x004e, 0x00c6, 0x080c, 0x6270, 0x1110, 0x080c, 0x654f,
-	0x8108, 0x1f04, 0x7753, 0x00ce, 0xa87c, 0xd084, 0x1120, 0x080c,
-	0x1054, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x6996,
-	0x012e, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001,
-	0x080c, 0x6663, 0x0580, 0x2061, 0x1a3f, 0x6100, 0xd184, 0x0178,
-	0xa888, 0x9084, 0x00ff, 0x1550, 0x6000, 0xd084, 0x0520, 0x6004,
-	0x9005, 0x1538, 0x6003, 0x0000, 0x600b, 0x0000, 0x00c8, 0x2011,
-	0x0001, 0xa890, 0x9005, 0x1110, 0x2001, 0x001e, 0x8000, 0x6016,
-	0xa888, 0x9084, 0x00ff, 0x0178, 0x6006, 0xa888, 0x8007, 0x9084,
-	0x00ff, 0x0148, 0x600a, 0xa888, 0x8000, 0x1108, 0xc28d, 0x6202,
-	0x012e, 0x0804, 0x79ad, 0x012e, 0x0804, 0x79a7, 0x012e, 0x0804,
-	0x79a1, 0x012e, 0x0804, 0x79a4, 0x0126, 0x2091, 0x8000, 0x7007,
-	0x0001, 0x080c, 0x6663, 0x05e0, 0x2061, 0x1a3f, 0x6000, 0xd084,
-	0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530, 0xac78, 0x9484, 0x0003,
-	0x0170, 0xa988, 0x918c, 0x00ff, 0x8001, 0x1120, 0x2100, 0x9210,
-	0x0620, 0x0028, 0x8001, 0x1508, 0x2100, 0x9212, 0x02f0, 0x9484,
-	0x000c, 0x0188, 0xa988, 0x810f, 0x918c, 0x00ff, 0x9082, 0x0004,
-	0x1120, 0x2100, 0x9318, 0x0288, 0x0030, 0x9082, 0x0004, 0x1168,
-	0x2100, 0x931a, 0x0250, 0xa890, 0x9005, 0x0110, 0x8000, 0x6016,
-	0x6206, 0x630a, 0x012e, 0x0804, 0x79ad, 0x012e, 0x0804, 0x79aa,
-	0x012e, 0x0804, 0x79a7, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001,
-	0x2061, 0x1a3f, 0x6300, 0xd38c, 0x1120, 0x6308, 0x8318, 0x0220,
-	0x630a, 0x012e, 0x0804, 0x79bb, 0x012e, 0x0804, 0x79aa, 0x00b6,
-	0x0126, 0x00c6, 0x2091, 0x8000, 0x7007, 0x0001, 0xa87c, 0xd0ac,
-	0x0148, 0x00c6, 0x2061, 0x1a3f, 0x6000, 0x9084, 0xfcff, 0x6002,
-	0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8, 0xa88c, 0x9065, 0x0598,
-	0x2001, 0x1833, 0x2004, 0x9005, 0x0118, 0x080c, 0x9c21, 0x0068,
-	0x6017, 0xf400, 0x6063, 0x0000, 0xa97c, 0xd1a4, 0x0110, 0xa980,
-	0x6162, 0x2009, 0x0041, 0x080c, 0x9c85, 0xa988, 0x918c, 0xff00,
-	0x9186, 0x2000, 0x1138, 0x0026, 0x900e, 0x2011, 0xfdff, 0x080c,
-	0x83eb, 0x002e, 0xa87c, 0xd0c4, 0x0148, 0x2061, 0x1a3f, 0x6000,
-	0xd08c, 0x1120, 0x6008, 0x8000, 0x0208, 0x600a, 0x00ce, 0x012e,
-	0x00be, 0x0804, 0x79ad, 0x00ce, 0x012e, 0x00be, 0x0804, 0x79a7,
-	0xa984, 0x9186, 0x002e, 0x0d30, 0x9186, 0x002d, 0x0d18, 0x9186,
-	0x0045, 0x0510, 0x9186, 0x002a, 0x1130, 0x2001, 0x180c, 0x200c,
-	0xc194, 0x2102, 0x08b8, 0x9186, 0x0020, 0x0158, 0x9186, 0x0029,
-	0x1d10, 0xa974, 0x080c, 0x6270, 0x1968, 0xb800, 0xc0e4, 0xb802,
-	0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007, 0x0024, 0x2001, 0x1957,
-	0x2004, 0x601a, 0x0804, 0x7842, 0xa88c, 0x9065, 0x0960, 0x00e6,
-	0xa890, 0x9075, 0x2001, 0x1833, 0x2004, 0x9005, 0x0150, 0x080c,
-	0x9c21, 0x8eff, 0x0118, 0x2e60, 0x080c, 0x9c21, 0x00ee, 0x0804,
-	0x7842, 0x6024, 0xc0dc, 0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a,
-	0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b, 0xa8a4, 0x602e, 0xa8a8,
-	0x6016, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84d1, 0x00ee,
-	0x0804, 0x7842, 0x2061, 0x1a3f, 0x6000, 0xd084, 0x0190, 0xd08c,
-	0x1904, 0x79bb, 0x0126, 0x2091, 0x8000, 0x6204, 0x8210, 0x0220,
-	0x6206, 0x012e, 0x0804, 0x79bb, 0x012e, 0xa883, 0x0016, 0x0804,
-	0x79b4, 0xa883, 0x0007, 0x0804, 0x79b4, 0xa864, 0x8007, 0x9084,
-	0x00ff, 0x0130, 0x8001, 0x1138, 0x7007, 0x0001, 0x0069, 0x0005,
-	0x080c, 0x7528, 0x0040, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016,
-	0x701a, 0x704b, 0x78e4, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091,
-	0x8000, 0x903e, 0x2061, 0x1800, 0x61cc, 0x81ff, 0x1904, 0x7966,
-	0x6130, 0xd194, 0x1904, 0x7990, 0xa878, 0x2070, 0x9e82, 0x1ddc,
-	0x0a04, 0x795a, 0x6064, 0x9e02, 0x1a04, 0x795a, 0x7120, 0x9186,
-	0x0006, 0x1904, 0x794c, 0x7010, 0x905d, 0x0904, 0x7966, 0xb800,
-	0xd0e4, 0x1904, 0x798a, 0x2061, 0x1a3f, 0x6100, 0x9184, 0x0301,
-	0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc, 0x1904, 0x7993, 0xa883,
-	0x0000, 0xa803, 0x0000, 0x2908, 0x7014, 0x9005, 0x1198, 0x7116,
-	0xa87c, 0xd0f4, 0x1904, 0x7996, 0x080c, 0x538d, 0xd09c, 0x1118,
-	0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c, 0x82de, 0x012e, 0x00ee,
-	0x00be, 0x0005, 0x2048, 0xa800, 0x9005, 0x1de0, 0xa902, 0x2148,
-	0xa87c, 0xd0f4, 0x1904, 0x7996, 0x012e, 0x00ee, 0x00be, 0x0005,
-	0x012e, 0x00ee, 0xa883, 0x0006, 0x00be, 0x0804, 0x79b4, 0xd184,
-	0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974, 0x080c, 0x6270, 0x15d0,
-	0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186, 0x0007, 0x1118, 0xa883,
-	0x0002, 0x0490, 0xa883, 0x0008, 0x0478, 0xa883, 0x000e, 0x0460,
-	0xa883, 0x0017, 0x0448, 0xa883, 0x0035, 0x0430, 0x080c, 0x5391,
-	0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82, 0x1ddc, 0x02c0, 0x6064,
-	0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006, 0x1188, 0x7010, 0x905d,
-	0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000, 0x9086,
-	0x0007, 0x1904, 0x78f0, 0x7003, 0x0002, 0x0804, 0x78f0, 0xa883,
-	0x0028, 0x0010, 0xa883, 0x0029, 0x012e, 0x00ee, 0x00be, 0x0420,
-	0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045, 0x0cb0, 0x2e60, 0x2019,
-	0x0002, 0x601b, 0x0014, 0x080c, 0xcdf9, 0x012e, 0x00ee, 0x00be,
-	0x0005, 0x2009, 0x003e, 0x0058, 0x2009, 0x0004, 0x0040, 0x2009,
-	0x0006, 0x0028, 0x2009, 0x0016, 0x0010, 0x2009, 0x0001, 0xa884,
-	0x9084, 0xff00, 0x9105, 0xa886, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6996, 0x012e, 0x0005, 0x080c, 0x1054, 0x0005, 0x00d6, 0x080c,
-	0x82d5, 0x00de, 0x0005, 0x00d6, 0x00e6, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x0040, 0x702c, 0xd084, 0x01d8, 0x908c, 0x0780, 0x190c,
-	0x7a4f, 0xd09c, 0x11a8, 0x2071, 0x1800, 0x70bc, 0x90ea, 0x0040,
-	0x0278, 0x8001, 0x70be, 0x702c, 0x2048, 0xa800, 0x702e, 0x9006,
-	0xa802, 0xa806, 0x2071, 0x0040, 0x2900, 0x7022, 0x702c, 0x0c28,
-	0x012e, 0x00ee, 0x00de, 0x0005, 0x0006, 0x9084, 0x0780, 0x190c,
-	0x7a4f, 0x000e, 0x0005, 0x00d6, 0x00c6, 0x0036, 0x0026, 0x0016,
-	0x00b6, 0x7007, 0x0001, 0xaa74, 0x9282, 0x0004, 0x1a04, 0x7a40,
-	0xa97c, 0x9188, 0x1000, 0x2104, 0x905d, 0xb804, 0xd284, 0x0140,
-	0x05e8, 0x8007, 0x9084, 0x00ff, 0x9084, 0x0006, 0x1108, 0x04b0,
-	0x2b10, 0x080c, 0x9b91, 0x1118, 0x080c, 0x9c58, 0x05a8, 0x6212,
-	0xa874, 0x0002, 0x7a1e, 0x7a23, 0x7a26, 0x7a2c, 0x2019, 0x0002,
-	0x080c, 0xd1eb, 0x0060, 0x080c, 0xd17b, 0x0048, 0x2019, 0x0002,
-	0xa980, 0x080c, 0xd19a, 0x0018, 0xa980, 0x080c, 0xd17b, 0x080c,
-	0x9be7, 0xa887, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x6996,
-	0x012e, 0x00be, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00de, 0x0005,
-	0xa887, 0x0006, 0x0c80, 0xa887, 0x0002, 0x0c68, 0xa887, 0x0005,
-	0x0c50, 0xa887, 0x0004, 0x0c38, 0xa887, 0x0007, 0x0c20, 0x2091,
-	0x8000, 0x0e04, 0x7a51, 0x0006, 0x0016, 0x2001, 0x8003, 0x0006,
-	0x0804, 0x0d6e, 0x2001, 0x1833, 0x2004, 0x9005, 0x0005, 0x0005,
-	0x00f6, 0x2079, 0x0300, 0x2001, 0x0200, 0x200c, 0xc1e5, 0xc1dc,
-	0x2102, 0x2009, 0x0218, 0x210c, 0xd1ec, 0x1120, 0x080c, 0x152d,
-	0x00fe, 0x0005, 0x2001, 0x020d, 0x2003, 0x0020, 0x781f, 0x0300,
-	0x00fe, 0x0005, 0x781c, 0xd08c, 0x0904, 0x7ad2, 0x68bc, 0x90aa,
-	0x0005, 0x0a04, 0x806b, 0x7d44, 0x7c40, 0xd59c, 0x190c, 0x0d65,
-	0x9584, 0x00f6, 0x1508, 0x9484, 0x7000, 0x0138, 0x908a, 0x2000,
-	0x1258, 0x9584, 0x0700, 0x8007, 0x04f0, 0x7000, 0x9084, 0xff00,
-	0x9086, 0x8100, 0x0db0, 0x00b0, 0x9484, 0x0fff, 0x1130, 0x7000,
-	0x9084, 0xff00, 0x9086, 0x8100, 0x11c0, 0x080c, 0xd5d3, 0x080c,
-	0x7fb2, 0x7817, 0x0140, 0x00a8, 0x9584, 0x0076, 0x1118, 0x080c,
-	0x800e, 0x19c8, 0xd5a4, 0x0148, 0x0046, 0x0056, 0x080c, 0x7b22,
-	0x080c, 0x1fb7, 0x005e, 0x004e, 0x0020, 0x080c, 0xd5d3, 0x7817,
-	0x0140, 0x080c, 0x70b7, 0x0168, 0x2001, 0x0111, 0x2004, 0xd08c,
-	0x0140, 0x688f, 0x0000, 0x2001, 0x0110, 0x2003, 0x0008, 0x2003,
-	0x0000, 0x0489, 0x0005, 0x0002, 0x7adf, 0x7dd4, 0x7adc, 0x7adc,
-	0x7adc, 0x7adc, 0x7adc, 0x7adc, 0x7817, 0x0140, 0x0005, 0x7000,
-	0x908c, 0xff00, 0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x688e,
-	0x9286, 0x2000, 0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c,
-	0x53ee, 0x0070, 0x080c, 0x7b42, 0x0058, 0x9286, 0x3000, 0x1118,
-	0x080c, 0x7d11, 0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x7ee8,
-	0x7817, 0x0140, 0x0005, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0178,
-	0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1148, 0x0026, 0x0036,
-	0x2011, 0x8048, 0x2518, 0x080c, 0x48d8, 0x003e, 0x002e, 0x0005,
-	0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe,
-	0x7c30, 0x0050, 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200,
-	0x7d44, 0x7c40, 0x2019, 0xffff, 0x2001, 0x1810, 0x2004, 0xd08c,
-	0x0160, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1130, 0x0026,
-	0x2011, 0x8048, 0x080c, 0x48d8, 0x002e, 0x00fe, 0x005e, 0x004e,
-	0x003e, 0x0005, 0x00b6, 0x00c6, 0x7010, 0x9084, 0xff00, 0x8007,
-	0x9096, 0x0001, 0x0120, 0x9096, 0x0023, 0x1904, 0x7ce2, 0x9186,
-	0x0023, 0x15c0, 0x080c, 0x7f7d, 0x0904, 0x7ce2, 0x6120, 0x9186,
-	0x0001, 0x0150, 0x9186, 0x0004, 0x0138, 0x9186, 0x0008, 0x0120,
-	0x9186, 0x000a, 0x1904, 0x7ce2, 0x7124, 0x610a, 0x7030, 0x908e,
-	0x0200, 0x1130, 0x2009, 0x0015, 0x080c, 0x9c85, 0x0804, 0x7ce2,
-	0x908e, 0x0214, 0x0118, 0x908e, 0x0210, 0x1130, 0x2009, 0x0015,
-	0x080c, 0x9c85, 0x0804, 0x7ce2, 0x908e, 0x0100, 0x1904, 0x7ce2,
-	0x7034, 0x9005, 0x1904, 0x7ce2, 0x2009, 0x0016, 0x080c, 0x9c85,
-	0x0804, 0x7ce2, 0x9186, 0x0022, 0x1904, 0x7ce2, 0x7030, 0x908e,
-	0x0300, 0x1580, 0x68d8, 0xd0a4, 0x0528, 0xc0b5, 0x68da, 0x7100,
-	0x918c, 0x00ff, 0x697a, 0x7004, 0x687e, 0x00f6, 0x2079, 0x0100,
-	0x79e6, 0x78ea, 0x0006, 0x9084, 0x00ff, 0x0016, 0x2008, 0x080c,
-	0x246d, 0x7932, 0x7936, 0x001e, 0x000e, 0x00fe, 0x080c, 0x2424,
-	0x695a, 0x703c, 0x00e6, 0x2071, 0x0140, 0x7086, 0x2071, 0x1800,
-	0x70b2, 0x00ee, 0x7034, 0x9005, 0x1904, 0x7ce2, 0x2009, 0x0017,
-	0x0804, 0x7c92, 0x908e, 0x0400, 0x1190, 0x7034, 0x9005, 0x1904,
-	0x7ce2, 0x080c, 0x70b7, 0x0120, 0x2009, 0x001d, 0x0804, 0x7c92,
-	0x68d8, 0xc0a5, 0x68da, 0x2009, 0x0030, 0x0804, 0x7c92, 0x908e,
-	0x0500, 0x1140, 0x7034, 0x9005, 0x1904, 0x7ce2, 0x2009, 0x0018,
-	0x0804, 0x7c92, 0x908e, 0x2010, 0x1120, 0x2009, 0x0019, 0x0804,
-	0x7c92, 0x908e, 0x2110, 0x1120, 0x2009, 0x001a, 0x0804, 0x7c92,
-	0x908e, 0x5200, 0x1140, 0x7034, 0x9005, 0x1904, 0x7ce2, 0x2009,
-	0x001b, 0x0804, 0x7c92, 0x908e, 0x5000, 0x1140, 0x7034, 0x9005,
-	0x1904, 0x7ce2, 0x2009, 0x001c, 0x0804, 0x7c92, 0x908e, 0x1300,
-	0x1120, 0x2009, 0x0034, 0x0804, 0x7c92, 0x908e, 0x1200, 0x1140,
-	0x7034, 0x9005, 0x1904, 0x7ce2, 0x2009, 0x0024, 0x0804, 0x7c92,
-	0x908c, 0xff00, 0x918e, 0x2400, 0x1170, 0x2009, 0x002d, 0x2001,
-	0x1810, 0x2004, 0xd09c, 0x0904, 0x7c92, 0x080c, 0xc62f, 0x1904,
-	0x7ce2, 0x0804, 0x7c90, 0x908c, 0xff00, 0x918e, 0x5300, 0x1120,
-	0x2009, 0x002a, 0x0804, 0x7c92, 0x908e, 0x0f00, 0x1120, 0x2009,
-	0x0020, 0x0804, 0x7c92, 0x908e, 0x6104, 0x1528, 0x2029, 0x0205,
-	0x2011, 0x026d, 0x8208, 0x2204, 0x9082, 0x0004, 0x8004, 0x8004,
-	0x20a8, 0x2011, 0x8015, 0x211c, 0x8108, 0x0046, 0x2124, 0x080c,
-	0x48d8, 0x004e, 0x8108, 0x0f04, 0x7c5e, 0x9186, 0x0280, 0x1d88,
-	0x2504, 0x8000, 0x202a, 0x2009, 0x0260, 0x0c58, 0x202b, 0x0000,
-	0x2009, 0x0023, 0x0478, 0x908e, 0x6000, 0x1118, 0x2009, 0x003f,
-	0x0448, 0x908e, 0x7800, 0x1118, 0x2009, 0x0045, 0x0418, 0x908e,
-	0x1000, 0x1118, 0x2009, 0x004e, 0x00e8, 0x908e, 0x6300, 0x1118,
-	0x2009, 0x004a, 0x00b8, 0x908c, 0xff00, 0x918e, 0x5600, 0x1118,
-	0x2009, 0x004f, 0x0078, 0x908c, 0xff00, 0x918e, 0x5700, 0x1118,
-	0x2009, 0x0050, 0x0038, 0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110,
-	0x2009, 0x004c, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c,
-	0x080c, 0x2424, 0x1904, 0x7ce5, 0x080c, 0x6210, 0x1904, 0x7ce5,
-	0xbe12, 0xbd16, 0x001e, 0x0016, 0x080c, 0x70b7, 0x01c0, 0x68d8,
-	0xd08c, 0x1148, 0x7000, 0x9084, 0x00ff, 0x1188, 0x7004, 0x9084,
-	0xff00, 0x1168, 0x0040, 0x6878, 0x9606, 0x1148, 0x687c, 0x9506,
-	0x9084, 0xff00, 0x1120, 0x9584, 0x00ff, 0xb886, 0x0080, 0xb884,
-	0x9005, 0x1168, 0x9186, 0x0046, 0x1150, 0x6878, 0x9606, 0x1138,
-	0x687c, 0x9506, 0x9084, 0xff00, 0x1110, 0x001e, 0x0098, 0x080c,
-	0x9b91, 0x01a8, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a,
-	0x001e, 0x9186, 0x004c, 0x1110, 0x6023, 0x000a, 0x0016, 0x001e,
-	0x080c, 0x9c85, 0x00ce, 0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001,
-	0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48d8,
-	0x080c, 0x9c58, 0x0d90, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120,
-	0x610a, 0x001e, 0x0016, 0x9186, 0x0017, 0x0118, 0x9186, 0x0030,
-	0x1128, 0x6007, 0x0009, 0x6017, 0x2900, 0x0020, 0x6007, 0x0051,
-	0x6017, 0x0000, 0x602f, 0x0009, 0x6003, 0x0001, 0x080c, 0x84d8,
-	0x08a0, 0x080c, 0x3150, 0x1140, 0x7010, 0x9084, 0xff00, 0x8007,
-	0x908e, 0x0008, 0x1108, 0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046,
-	0x7000, 0x908c, 0xff00, 0x810f, 0x9186, 0x0033, 0x11e8, 0x080c,
-	0x7f7d, 0x0904, 0x7d6c, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200,
-	0x1140, 0x7034, 0x9005, 0x15c0, 0x2009, 0x0015, 0x080c, 0x9c85,
-	0x0498, 0x908e, 0x0100, 0x1580, 0x7034, 0x9005, 0x1568, 0x2009,
-	0x0016, 0x080c, 0x9c85, 0x0440, 0x9186, 0x0032, 0x1528, 0x7030,
-	0x908e, 0x1400, 0x1508, 0x2009, 0x0038, 0x0016, 0x2011, 0x0263,
-	0x2204, 0x8211, 0x220c, 0x080c, 0x2424, 0x11a8, 0x080c, 0x6210,
-	0x1190, 0xbe12, 0xbd16, 0x080c, 0x9b91, 0x0168, 0x2b08, 0x6112,
-	0x080c, 0xbcdb, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c,
-	0x9c85, 0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005,
-	0x00b6, 0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff,
-	0x11b8, 0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009,
-	0x007f, 0x0804, 0x7dce, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e,
-	0x0804, 0x7dce, 0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0,
-	0x2011, 0x0000, 0x2019, 0x1836, 0x231c, 0xd3ac, 0x0130, 0x9026,
-	0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9,
-	0x077f, 0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff,
-	0x11d0, 0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10,
-	0x2600, 0x9706, 0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0,
-	0x9745, 0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118,
-	0x94c6, 0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04, 0x7da3, 0x82ff,
-	0x1118, 0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de,
-	0x00ee, 0x004e, 0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f,
-	0x9184, 0x000f, 0x0002, 0x7deb, 0x7deb, 0x7deb, 0x7f8f, 0x7deb,
-	0x7dee, 0x7e13, 0x7e9c, 0x7deb, 0x7deb, 0x7deb, 0x7deb, 0x7deb,
-	0x7deb, 0x7deb, 0x7deb, 0x7817, 0x0140, 0x0005, 0x00b6, 0x7110,
-	0xd1bc, 0x01e8, 0x7120, 0x2160, 0x9c8c, 0x0003, 0x11c0, 0x9c8a,
-	0x1ddc, 0x02a8, 0x6864, 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff,
-	0x6110, 0x2158, 0xb910, 0x9106, 0x1150, 0x700c, 0xb914, 0x9106,
-	0x1130, 0x7124, 0x610a, 0x2009, 0x0046, 0x080c, 0x9c85, 0x7817,
-	0x0140, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484, 0x0fff, 0x0904,
-	0x7e78, 0x7110, 0xd1bc, 0x1904, 0x7e78, 0x7108, 0x700c, 0x2028,
-	0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x15c8, 0x81ff, 0x15b8,
-	0x9080, 0x318b, 0x200d, 0x918c, 0xff00, 0x810f, 0x2001, 0x0080,
-	0x9106, 0x0904, 0x7e78, 0x9182, 0x0801, 0x1a04, 0x7e78, 0x9190,
-	0x1000, 0x2204, 0x905d, 0x05e0, 0xbe12, 0xbd16, 0xb800, 0xd0ec,
-	0x15b8, 0xba04, 0x9294, 0xff00, 0x9286, 0x0600, 0x1190, 0x080c,
-	0x9b91, 0x0598, 0x2b08, 0x7028, 0x6052, 0x702c, 0x604e, 0x6112,
-	0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x615e, 0x080c, 0xc893,
-	0x00f8, 0x080c, 0x6667, 0x1138, 0xb807, 0x0606, 0x0c40, 0x190c,
-	0x7d70, 0x11b0, 0x0880, 0x080c, 0x9b91, 0x2b08, 0x0188, 0x6112,
-	0x6023, 0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007,
-	0x0005, 0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x84d8,
-	0x7817, 0x0140, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e, 0x2004,
-	0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48d8, 0x080c, 0x9c58,
-	0x0d78, 0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130,
-	0x615e, 0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009,
-	0xa022, 0x080c, 0x84d1, 0x08e0, 0x00b6, 0x7110, 0xd1bc, 0x05d0,
-	0x7020, 0x2060, 0x9c84, 0x0003, 0x15a8, 0x9c82, 0x1ddc, 0x0690,
-	0x6864, 0x9c02, 0x1678, 0x9484, 0x0fff, 0x9082, 0x000c, 0x0650,
-	0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1510,
-	0x700c, 0xb914, 0x9106, 0x11f0, 0x7124, 0x610a, 0x601c, 0xd0fc,
-	0x11c8, 0x2001, 0x0271, 0x2004, 0x9005, 0x1180, 0x9484, 0x0fff,
-	0x9082, 0x000c, 0x0158, 0x0066, 0x2031, 0x0100, 0xa001, 0xa001,
-	0x8631, 0x1de0, 0x006e, 0x601c, 0xd0fc, 0x1120, 0x2009, 0x0045,
-	0x080c, 0x9c85, 0x7817, 0x0140, 0x00be, 0x0005, 0x6120, 0x9186,
-	0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001, 0x0005,
-	0x080c, 0x3150, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086,
-	0x0000, 0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b,
-	0x0005, 0x7eff, 0x7f00, 0x7eff, 0x7eff, 0x7f5f, 0x7f6e, 0x0005,
-	0x00b6, 0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904, 0x7f5d,
-	0x700c, 0x7108, 0x080c, 0x2424, 0x1904, 0x7f5d, 0x080c, 0x6210,
-	0x1904, 0x7f5d, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8, 0x080c,
-	0x6667, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, 0x7f7d,
-	0x00ce, 0x05d8, 0x080c, 0x9b91, 0x2b08, 0x05b8, 0x6112, 0x080c,
-	0xbcdb, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c,
-	0x9c85, 0x0458, 0x080c, 0x6667, 0x0148, 0x9086, 0x0004, 0x0130,
-	0x080c, 0x666f, 0x0118, 0x9086, 0x0004, 0x1180, 0x080c, 0x9b91,
-	0x2b08, 0x01d8, 0x6112, 0x080c, 0xbcdb, 0x6023, 0x0005, 0x7120,
-	0x610a, 0x2009, 0x0088, 0x080c, 0x9c85, 0x0078, 0x080c, 0x9b91,
-	0x2b08, 0x0158, 0x6112, 0x080c, 0xbcdb, 0x6023, 0x0004, 0x7120,
-	0x610a, 0x2009, 0x0001, 0x080c, 0x9c85, 0x00be, 0x0005, 0x7110,
-	0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x7ede, 0x1130, 0x7124,
-	0x610a, 0x2009, 0x0089, 0x080c, 0x9c85, 0x0005, 0x7110, 0xd1bc,
-	0x0158, 0x0059, 0x0148, 0x080c, 0x7ede, 0x1130, 0x7124, 0x610a,
-	0x2009, 0x008a, 0x080c, 0x9c85, 0x0005, 0x7020, 0x2060, 0x9c84,
-	0x0003, 0x1158, 0x9c82, 0x1ddc, 0x0240, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x00b6,
-	0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84, 0x0003, 0x11b0,
-	0x9c82, 0x1ddc, 0x0298, 0x6864, 0x9c02, 0x1280, 0x7008, 0x9084,
-	0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1140, 0x700c, 0xb914,
-	0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0x9c85, 0x7817, 0x0140,
-	0x00be, 0x0005, 0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206,
-	0x0049, 0x0005, 0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213,
-	0x0009, 0x0005, 0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000,
-	0x9086, 0xc000, 0x05c0, 0x080c, 0x9b91, 0x05a8, 0x0066, 0x00c6,
-	0x0046, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2424,
-	0x1590, 0x080c, 0x6210, 0x1578, 0xbe12, 0xbd16, 0x2b00, 0x004e,
-	0x00ce, 0x6012, 0x080c, 0xbcdb, 0x080c, 0x1022, 0x0500, 0x2900,
-	0x6062, 0x9006, 0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b,
-	0x20a9, 0x000e, 0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98,
-	0x4003, 0x006e, 0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003,
-	0x0001, 0x080c, 0x84d8, 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c,
-	0x9be7, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6, 0x7000,
-	0x908c, 0xff00, 0x9184, 0xf000, 0x810f, 0x9086, 0x2000, 0x1904,
-	0x8065, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005,
-	0x1904, 0x8067, 0x7030, 0x908e, 0x0400, 0x0904, 0x8067, 0x908e,
-	0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e, 0x0300, 0x11d8,
-	0x2009, 0x1836, 0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c,
-	0x6625, 0x0558, 0x68ac, 0x9084, 0x00ff, 0x7100, 0x918c, 0x00ff,
-	0x9106, 0x1518, 0x687c, 0x69ac, 0x918c, 0xff00, 0x9105, 0x7104,
-	0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4, 0x11a8,
-	0x908e, 0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e, 0x5000,
-	0x09b8, 0x0058, 0x9186, 0x0023, 0x1140, 0x080c, 0x7f7d, 0x0128,
-	0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006, 0x0010, 0x9085,
-	0x0001, 0x00ce, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7800, 0xc0e5,
-	0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800, 0x7834,
-	0xd084, 0x1130, 0x2079, 0x0200, 0x7800, 0x9085, 0x1200, 0x7802,
-	0x00fe, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7034, 0xc084, 0x7036,
-	0x00ee, 0x0005, 0x2071, 0x19d4, 0x7003, 0x0003, 0x700f, 0x0361,
-	0x9006, 0x701a, 0x7072, 0x7012, 0x7017, 0x1ddc, 0x7007, 0x0000,
-	0x7026, 0x702b, 0x8fd9, 0x7032, 0x7037, 0x9056, 0x703f, 0xffff,
-	0x7042, 0x7047, 0x5224, 0x704a, 0x705b, 0x8226, 0x080c, 0x103b,
-	0x090c, 0x0d65, 0x2900, 0x703a, 0xa867, 0x0003, 0xa86f, 0x0100,
-	0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19d4, 0x1d04, 0x8148, 0x2091,
-	0x6000, 0x700c, 0x8001, 0x700e, 0x1560, 0x2001, 0x1875, 0x2004,
-	0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1, 0x0000, 0x20d1,
-	0x0001, 0x20d1, 0x0000, 0x080c, 0x0d65, 0x700f, 0x0361, 0x7007,
-	0x0001, 0x0126, 0x2091, 0x8000, 0x2069, 0x1800, 0x69e8, 0xd1e4,
-	0x1138, 0xd1dc, 0x1118, 0x080c, 0x8294, 0x0010, 0x080c, 0x826b,
-	0x7040, 0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044, 0x080f,
-	0x0018, 0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020,
-	0x8001, 0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186,
-	0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f,
-	0x7030, 0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f,
-	0x0009, 0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c, 0x90de,
-	0x0010, 0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310, 0x8001,
-	0x703e, 0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a, 0x1148,
-	0x704b, 0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e, 0x7058,
-	0x080f, 0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, 0x0158,
-	0x706c, 0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109, 0x7172,
-	0x1110, 0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a, 0x1138,
-	0x700b, 0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f, 0x012e,
-	0x7004, 0x0002, 0x8170, 0x8171, 0x819b, 0x00e6, 0x2071, 0x19d4,
-	0x7018, 0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee,
-	0x0005, 0x00e6, 0x0006, 0x2071, 0x19d4, 0x701c, 0x9206, 0x1120,
-	0x701a, 0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6,
-	0x2071, 0x19d4, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005,
-	0x0005, 0x00b6, 0x2031, 0x0010, 0x7110, 0x080c, 0x6270, 0x11a8,
-	0xb888, 0x8001, 0x0290, 0xb88a, 0x1180, 0x0126, 0x2091, 0x8000,
-	0x0066, 0xb8c0, 0x9005, 0x0138, 0x0026, 0xba3c, 0x0016, 0x080c,
-	0x639b, 0x001e, 0x002e, 0x006e, 0x012e, 0x8108, 0x9182, 0x0800,
-	0x1220, 0x8631, 0x0128, 0x7112, 0x0c00, 0x900e, 0x7007, 0x0002,
-	0x7112, 0x00be, 0x0005, 0x2031, 0x0010, 0x7014, 0x2060, 0x0126,
-	0x2091, 0x8000, 0x6048, 0x9005, 0x0128, 0x8001, 0x604a, 0x1110,
-	0x080c, 0xbb5c, 0x6018, 0x9005, 0x0904, 0x81ed, 0x00f6, 0x2079,
-	0x0300, 0x7918, 0xd1b4, 0x1904, 0x8200, 0x781b, 0x2020, 0xa001,
-	0x7918, 0xd1b4, 0x0120, 0x781b, 0x2000, 0x0804, 0x8200, 0x8001,
-	0x601a, 0x0106, 0x781b, 0x2000, 0xa001, 0x7918, 0xd1ac, 0x1dd0,
-	0x010e, 0x00fe, 0x1510, 0x6120, 0x9186, 0x0003, 0x0118, 0x9186,
-	0x0006, 0x11c8, 0x080c, 0xb847, 0x01b0, 0x6014, 0x2048, 0xa884,
-	0x908a, 0x199a, 0x0280, 0x9082, 0x1999, 0xa886, 0x908a, 0x199a,
-	0x0210, 0x2001, 0x1999, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a,
-	0x080c, 0xbf8d, 0x0110, 0x080c, 0xb545, 0x012e, 0x9c88, 0x001c,
-	0x7116, 0x2001, 0x1819, 0x2004, 0x9102, 0x1228, 0x8631, 0x0138,
-	0x2160, 0x0804, 0x819f, 0x7017, 0x1ddc, 0x7007, 0x0000, 0x0005,
-	0x00fe, 0x0c58, 0x00e6, 0x2071, 0x19d4, 0x7027, 0x07d0, 0x7023,
-	0x0009, 0x00ee, 0x0005, 0x2001, 0x19dd, 0x2003, 0x0000, 0x0005,
-	0x00e6, 0x2071, 0x19d4, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005,
-	0x2011, 0x19e0, 0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19d4,
-	0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x0086, 0x0026,
-	0x7054, 0x8000, 0x7056, 0x2001, 0x19e2, 0x2044, 0xa06c, 0x9086,
-	0x0000, 0x0150, 0x7068, 0xa09a, 0x7064, 0xa096, 0x7060, 0xa092,
-	0x705c, 0xa08e, 0x080c, 0x110c, 0x002e, 0x008e, 0x0005, 0x0006,
-	0x0016, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x0156, 0x080c, 0x80b3, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x00be, 0x00ae, 0x009e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071,
-	0x19d4, 0x7172, 0x7276, 0x706f, 0x0009, 0x00ee, 0x0005, 0x00e6,
-	0x0006, 0x2071, 0x19d4, 0x7074, 0x9206, 0x1110, 0x7072, 0x7076,
-	0x000e, 0x00ee, 0x0005, 0x2069, 0x1800, 0x69e8, 0xd1e4, 0x1518,
-	0x0026, 0xd1ec, 0x0140, 0x6a50, 0x6870, 0x9202, 0x0288, 0x8117,
-	0x9294, 0x00c1, 0x0088, 0x9184, 0x0007, 0x01a0, 0x8109, 0x9184,
-	0x0007, 0x0110, 0x69ea, 0x0070, 0x8107, 0x9084, 0x0007, 0x910d,
-	0x8107, 0x9106, 0x9094, 0x00c1, 0x9184, 0xff3e, 0x9205, 0x68ea,
-	0x080c, 0x0eed, 0x002e, 0x0005, 0x69e4, 0x9184, 0x003f, 0x05b8,
-	0x8109, 0x9184, 0x003f, 0x01a8, 0x6a50, 0x6870, 0x9202, 0x0220,
-	0xd1bc, 0x0168, 0xc1bc, 0x0018, 0xd1bc, 0x1148, 0xc1bd, 0x2110,
-	0x00e6, 0x2071, 0x1800, 0x080c, 0x0f0f, 0x00ee, 0x0400, 0x69e6,
-	0x00f0, 0x0026, 0x8107, 0x9094, 0x0007, 0x0128, 0x8001, 0x8007,
-	0x9085, 0x0007, 0x0050, 0x2010, 0x8004, 0x8004, 0x8004, 0x9084,
-	0x0007, 0x9205, 0x8007, 0x9085, 0x0028, 0x9086, 0x0040, 0x2010,
-	0x00e6, 0x2071, 0x1800, 0x080c, 0x0f0f, 0x00ee, 0x002e, 0x0005,
-	0x00c6, 0x2061, 0x1a3f, 0x00ce, 0x0005, 0x9184, 0x000f, 0x8003,
-	0x8003, 0x8003, 0x9080, 0x1a3f, 0x2060, 0x0005, 0xa884, 0x908a,
-	0x199a, 0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a3f, 0x6014,
-	0x00ce, 0x9005, 0x1130, 0x2001, 0x001e, 0x0018, 0x908e, 0xffff,
-	0x01b0, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0x908c,
-	0x00c0, 0x918e, 0x00c0, 0x0904, 0x8395, 0xd0b4, 0x1168, 0xd0bc,
-	0x1904, 0x836e, 0x2009, 0x0006, 0x080c, 0x83c2, 0x0005, 0x900e,
-	0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc, 0x05c8, 0x908c, 0x2023,
-	0x1550, 0x87ff, 0x1540, 0x6124, 0x918c, 0x0500, 0x1520, 0x6100,
-	0x918e, 0x0007, 0x1500, 0x2009, 0x1875, 0x210c, 0xd184, 0x11d8,
-	0x6003, 0x0003, 0x6007, 0x0043, 0x6047, 0xb035, 0x080c, 0x1aa5,
-	0xa87c, 0xc0dd, 0xa87e, 0x600f, 0x0000, 0x00f6, 0x2079, 0x0380,
-	0x7818, 0xd0bc, 0x1de8, 0x7833, 0x0013, 0x2c00, 0x7836, 0x781b,
-	0x8080, 0x00fe, 0x0005, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003,
-	0x1904, 0x83bc, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x6024,
-	0xd0d4, 0x11e8, 0x2009, 0x1875, 0x2104, 0xd084, 0x1138, 0x87ff,
-	0x1120, 0x2009, 0x0043, 0x0804, 0x9c85, 0x0005, 0x87ff, 0x1de8,
-	0x2009, 0x0042, 0x0804, 0x9c85, 0x6110, 0x00b6, 0x2158, 0xb900,
-	0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd, 0x6026, 0x0c00, 0xc0d4,
-	0x6026, 0xa890, 0x602e, 0xa88c, 0x6032, 0x08e0, 0xd0fc, 0x0160,
-	0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x83bc, 0x908c,
-	0x2020, 0x918e, 0x2020, 0x0170, 0x0076, 0x00f6, 0x2c78, 0x080c,
-	0x164f, 0x00fe, 0x007e, 0x87ff, 0x1120, 0x2009, 0x0042, 0x080c,
-	0x9c85, 0x0005, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac,
-	0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38, 0xd0fc, 0x0188, 0x908c,
-	0x2020, 0x918e, 0x2020, 0x01a8, 0x9084, 0x0003, 0x908e, 0x0002,
-	0x0148, 0x87ff, 0x1120, 0x2009, 0x0041, 0x080c, 0x9c85, 0x0005,
-	0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009, 0x0043, 0x080c, 0x9c85,
-	0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20,
-	0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009, 0x0004, 0x0019, 0x0005,
-	0x2009, 0x0001, 0x0096, 0x080c, 0xb847, 0x0518, 0x6014, 0x2048,
-	0xa982, 0xa800, 0x6016, 0x9186, 0x0001, 0x1188, 0xa97c, 0x918c,
-	0x8100, 0x918e, 0x8100, 0x1158, 0x00c6, 0x2061, 0x1a3f, 0x6200,
-	0xd28c, 0x1120, 0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, 0x080c,
-	0x67cb, 0x6014, 0x904d, 0x0076, 0x2039, 0x0000, 0x190c, 0x82de,
-	0x007e, 0x009e, 0x0005, 0x0156, 0x00c6, 0x2061, 0x1a3f, 0x6000,
-	0x81ff, 0x0110, 0x9205, 0x0008, 0x9204, 0x6002, 0x00ce, 0x015e,
-	0x0005, 0x6800, 0xd08c, 0x1138, 0x6808, 0x9005, 0x0120, 0x8001,
-	0x680a, 0x9085, 0x0001, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036,
-	0x0046, 0x20a9, 0x0010, 0x9006, 0x8004, 0x8086, 0x818e, 0x1208,
-	0x9200, 0x1f04, 0x840d, 0x8086, 0x818e, 0x004e, 0x003e, 0x012e,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010,
-	0x9005, 0x01c8, 0x911a, 0x12b8, 0x8213, 0x818d, 0x0228, 0x911a,
-	0x1220, 0x1f04, 0x8424, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04,
-	0x8424, 0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e,
-	0x007e, 0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8,
-	0x0126, 0x2091, 0x2800, 0x2079, 0x19b8, 0x012e, 0x00d6, 0x2069,
-	0x19b8, 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000,
-	0x2069, 0x0200, 0x080c, 0x97fa, 0x04a9, 0x080c, 0x97e5, 0x0491,
-	0x080c, 0x97e8, 0x0479, 0x080c, 0x97eb, 0x0461, 0x080c, 0x97ee,
-	0x0449, 0x080c, 0x97f1, 0x0431, 0x080c, 0x97f4, 0x0419, 0x080c,
-	0x97f7, 0x0401, 0x01de, 0x014e, 0x015e, 0x6857, 0x0000, 0x00f6,
-	0x2079, 0x0380, 0x00f9, 0x7807, 0x0003, 0x7803, 0x0000, 0x7803,
-	0x0001, 0x2069, 0x0004, 0x2d04, 0x9084, 0xfffe, 0x9085, 0x8000,
-	0x206a, 0x2069, 0x0100, 0x6828, 0x9084, 0xfffc, 0x682a, 0x00fe,
-	0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240, 0x2001, 0x0000,
-	0x4004, 0x0005, 0x00c6, 0x7803, 0x0000, 0x9006, 0x7827, 0x0030,
-	0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1abf, 0x781f, 0xff00,
-	0x781b, 0xff00, 0x2061, 0x1ab4, 0x602f, 0x19b8, 0x6033, 0x1800,
-	0x6037, 0x19d4, 0x603b, 0x1cf7, 0x603f, 0x1d07, 0x6042, 0x6047,
-	0x1a8a, 0x00ce, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007,
-	0x9086, 0x0001, 0x01b0, 0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08,
-	0x2061, 0x19b8, 0x602c, 0x8000, 0x602e, 0x601c, 0x9005, 0x0130,
-	0x9080, 0x0003, 0x2102, 0x611e, 0x00ce, 0x0005, 0x6122, 0x611e,
-	0x0cd8, 0x6146, 0x2c08, 0x2001, 0x0012, 0x080c, 0x98b9, 0x0005,
-	0x0016, 0x2009, 0x8020, 0x6146, 0x2c08, 0x2001, 0x0382, 0x2004,
-	0x9084, 0x0007, 0x9086, 0x0001, 0x1128, 0x2001, 0x0019, 0x080c,
-	0x98b9, 0x0088, 0x00c6, 0x2061, 0x19b8, 0x602c, 0x8000, 0x602e,
-	0x600c, 0x9005, 0x0128, 0x9080, 0x0003, 0x2102, 0x610e, 0x0010,
-	0x6112, 0x610e, 0x00ce, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004,
-	0x9084, 0x0007, 0x9086, 0x0001, 0x0198, 0x00c6, 0x6146, 0x600f,
-	0x0000, 0x2c08, 0x2061, 0x19b8, 0x6044, 0x9005, 0x0130, 0x9080,
-	0x0003, 0x2102, 0x6146, 0x00ce, 0x0005, 0x614a, 0x6146, 0x0cd8,
-	0x6146, 0x600f, 0x0000, 0x2c08, 0x2001, 0x0013, 0x080c, 0x98b9,
-	0x0005, 0x6044, 0xd0dc, 0x0128, 0x9006, 0x7007, 0x0000, 0x700a,
-	0x7032, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096,
-	0x0076, 0x0066, 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126,
-	0x902e, 0x2071, 0x19b8, 0x7648, 0x2660, 0x2678, 0x2091, 0x8000,
-	0x8cff, 0x0904, 0x85a3, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904,
-	0x859e, 0x87ff, 0x0120, 0x605c, 0x9106, 0x1904, 0x859e, 0x704c,
-	0x9c06, 0x1178, 0x0036, 0x2019, 0x0001, 0x080c, 0x9286, 0x703f,
-	0x0000, 0x9006, 0x704e, 0x706a, 0x7052, 0x706e, 0x003e, 0x2029,
-	0x0001, 0x080c, 0x8521, 0x7048, 0x9c36, 0x1110, 0x660c, 0x764a,
-	0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7046,
-	0x0010, 0x7047, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
-	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xb847, 0x01c8,
-	0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1560, 0xa867, 0x0103,
-	0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076, 0x080c, 0xbb45,
-	0x080c, 0xd51a, 0x080c, 0x6996, 0x007e, 0x003e, 0x001e, 0x080c,
-	0xba36, 0x080c, 0x9c21, 0x00ce, 0x0804, 0x8540, 0x2c78, 0x600c,
-	0x2060, 0x0804, 0x8540, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e,
-	0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee,
-	0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036,
-	0x0076, 0x080c, 0xd51a, 0x080c, 0xd21e, 0x007e, 0x003e, 0x001e,
-	0x08c0, 0x6020, 0x9086, 0x000a, 0x0918, 0x0800, 0x0006, 0x0066,
-	0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036, 0x0126, 0x2091, 0x8000,
-	0x2079, 0x19b8, 0x7848, 0x9065, 0x0904, 0x8625, 0x600c, 0x0006,
-	0x600f, 0x0000, 0x784c, 0x9c06, 0x11a0, 0x0036, 0x2019, 0x0001,
-	0x080c, 0x9286, 0x783f, 0x0000, 0x901e, 0x7b4e, 0x7b6a, 0x7b52,
-	0x7b6e, 0x003e, 0x000e, 0x9005, 0x1118, 0x600c, 0x600f, 0x0000,
-	0x0006, 0x00e6, 0x2f70, 0x080c, 0x8521, 0x00ee, 0x080c, 0xb847,
-	0x0520, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1580, 0x3e08,
-	0x918e, 0x0002, 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x0140, 0x6048, 0x9005, 0x1198, 0x2001,
-	0x1959, 0x2004, 0x604a, 0x0070, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x080c, 0x698a, 0x080c, 0xba36, 0x6044, 0xc0fc, 0x6046,
-	0x080c, 0x9c21, 0x000e, 0x0804, 0x85d3, 0x7e4a, 0x7e46, 0x012e,
-	0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005, 0x6020,
-	0x9086, 0x0006, 0x1118, 0x080c, 0xd21e, 0x0c38, 0x6020, 0x9086,
-	0x000a, 0x09e0, 0x08c8, 0x0016, 0x0026, 0x0086, 0x9046, 0x00a9,
-	0x080c, 0x872c, 0x008e, 0x002e, 0x001e, 0x0005, 0x00f6, 0x0126,
-	0x2079, 0x19b8, 0x2091, 0x8000, 0x080c, 0x8775, 0x080c, 0x8809,
-	0x080c, 0x63fd, 0x012e, 0x00fe, 0x0005, 0x00b6, 0x0096, 0x00f6,
-	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x19b8, 0x7620, 0x2660, 0x2678, 0x8cff, 0x0904,
-	0x86f1, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x86ec, 0x88ff,
-	0x0120, 0x605c, 0x9106, 0x1904, 0x86ec, 0x7030, 0x9c06, 0x1570,
-	0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c, 0x820b, 0x080c,
-	0x8fb7, 0x68c3, 0x0000, 0x080c, 0x94a2, 0x7033, 0x0000, 0x0036,
-	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
-	0x080c, 0x2833, 0x9006, 0x080c, 0x2833, 0x2069, 0x0100, 0x6824,
-	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0040, 0x7008, 0xc0ad,
-	0x700a, 0x6003, 0x0009, 0x630a, 0x0804, 0x86ec, 0x7020, 0x9c36,
-	0x1110, 0x660c, 0x7622, 0x701c, 0x9c36, 0x1140, 0x2c00, 0x9f36,
-	0x0118, 0x2f00, 0x701e, 0x0010, 0x701f, 0x0000, 0x660c, 0x0066,
-	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
-	0x6044, 0xc0fc, 0x6046, 0x6014, 0x2048, 0x080c, 0xb847, 0x01e8,
-	0x6020, 0x9086, 0x0003, 0x1580, 0x080c, 0xba5c, 0x1118, 0x080c,
-	0xa58f, 0x0098, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016,
-	0x0036, 0x0086, 0x080c, 0xbb45, 0x080c, 0xd51a, 0x080c, 0x6996,
-	0x008e, 0x003e, 0x001e, 0x080c, 0xba36, 0x080c, 0x9c21, 0x080c,
-	0x9378, 0x00ce, 0x0804, 0x8666, 0x2c78, 0x600c, 0x2060, 0x0804,
-	0x8666, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce, 0x00de, 0x00ee,
-	0x00fe, 0x009e, 0x00be, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158,
-	0x0016, 0x0036, 0x0086, 0x080c, 0xd51a, 0x080c, 0xd21e, 0x008e,
-	0x003e, 0x001e, 0x08d0, 0x080c, 0xa58f, 0x6020, 0x9086, 0x0002,
-	0x1160, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0904, 0x86d2,
-	0x9086, 0x008b, 0x0904, 0x86d2, 0x0840, 0x6020, 0x9086, 0x0005,
-	0x1920, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x09c8, 0x9086,
-	0x008b, 0x09b0, 0x0804, 0x86e5, 0x0006, 0x00f6, 0x00e6, 0x0096,
-	0x00b6, 0x00c6, 0x0066, 0x0016, 0x0126, 0x2091, 0x8000, 0x9280,
-	0x1000, 0x2004, 0x905d, 0x2079, 0x19b8, 0x9036, 0x7828, 0x2060,
-	0x8cff, 0x0538, 0x6010, 0x9b06, 0x1500, 0x6043, 0xffff, 0x080c,
-	0x9a84, 0x01d8, 0x610c, 0x0016, 0x080c, 0x9110, 0x6014, 0x2048,
-	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0086,
-	0x080c, 0xbb45, 0x080c, 0xd51a, 0x080c, 0x6996, 0x008e, 0x003e,
-	0x001e, 0x080c, 0x9c21, 0x00ce, 0x08d8, 0x2c30, 0x600c, 0x2060,
-	0x08b8, 0x080c, 0x641a, 0x012e, 0x001e, 0x006e, 0x00ce, 0x00be,
-	0x009e, 0x00ee, 0x00fe, 0x000e, 0x0005, 0x0096, 0x0006, 0x0066,
-	0x00c6, 0x00d6, 0x9036, 0x7820, 0x9065, 0x0904, 0x87dc, 0x600c,
-	0x0006, 0x6044, 0xc0fc, 0x6046, 0x600f, 0x0000, 0x7830, 0x9c06,
-	0x1588, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c, 0x820b,
-	0x080c, 0x8fb7, 0x68c3, 0x0000, 0x080c, 0x94a2, 0x7833, 0x0000,
-	0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001,
-	0x0100, 0x080c, 0x2833, 0x9006, 0x080c, 0x2833, 0x2069, 0x0100,
-	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0058, 0x080c,
-	0x661d, 0x1538, 0x6003, 0x0009, 0x630a, 0x7808, 0xc0ad, 0x780a,
-	0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c, 0xb845, 0x01b0, 0x6020,
-	0x9086, 0x0003, 0x1508, 0x080c, 0xba5c, 0x1118, 0x080c, 0xa58f,
-	0x0060, 0x080c, 0x661d, 0x1168, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x080c, 0x6996, 0x080c, 0xba36, 0x080c, 0x9c21, 0x080c,
-	0x9378, 0x000e, 0x0804, 0x877c, 0x7e22, 0x7e1e, 0x00de, 0x00ce,
-	0x006e, 0x000e, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1118,
-	0x080c, 0xd21e, 0x0c50, 0x080c, 0xa58f, 0x6020, 0x9086, 0x0002,
-	0x1150, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0990, 0x9086,
-	0x008b, 0x0978, 0x08d0, 0x6020, 0x9086, 0x0005, 0x19b0, 0x6004,
-	0x0006, 0x9086, 0x0085, 0x000e, 0x0d18, 0x9086, 0x008b, 0x0d00,
-	0x0860, 0x0006, 0x0096, 0x00b6, 0x00c6, 0x0066, 0x9036, 0x7828,
-	0x9065, 0x0510, 0x6010, 0x2058, 0x600c, 0x0006, 0x3e08, 0x918e,
-	0x0002, 0x1118, 0xb800, 0xd0bc, 0x11a8, 0x6043, 0xffff, 0x080c,
-	0x9a84, 0x0180, 0x610c, 0x080c, 0x9110, 0x6014, 0x2048, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6996, 0x080c, 0x9c21,
-	0x000e, 0x08f0, 0x2c30, 0x0ce0, 0x006e, 0x00ce, 0x00be, 0x009e,
-	0x000e, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x0066, 0x080c, 0x5dd6,
-	0x11b0, 0x2071, 0x19b8, 0x7030, 0x9080, 0x0005, 0x2004, 0x904d,
-	0x0170, 0xa878, 0x9606, 0x1158, 0x2071, 0x19b8, 0x7030, 0x9035,
-	0x0130, 0x9080, 0x0005, 0x2004, 0x9906, 0x1108, 0x0029, 0x006e,
-	0x009e, 0x00de, 0x00ee, 0x0005, 0x00c6, 0x2660, 0x6043, 0xffff,
-	0x080c, 0x9a84, 0x0178, 0x080c, 0x9110, 0x6014, 0x2048, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xbb45, 0x080c, 0x6996,
-	0x080c, 0x9c21, 0x00ce, 0x0005, 0x00b6, 0x00e6, 0x00c6, 0x080c,
-	0x9926, 0x0106, 0x190c, 0x98c8, 0x2071, 0x0101, 0x2e04, 0xc0c4,
-	0x2072, 0x6044, 0xd0fc, 0x1138, 0x010e, 0x190c, 0x98e4, 0x00ce,
-	0x00ee, 0x00be, 0x0005, 0x2071, 0x19b8, 0x7030, 0x9005, 0x0da0,
-	0x9c06, 0x190c, 0x0d65, 0x7036, 0x080c, 0x820b, 0x7004, 0x9084,
-	0x0007, 0x0002, 0x88a4, 0x88a6, 0x88ad, 0x88b7, 0x88c5, 0x88a4,
-	0x88ad, 0x88a2, 0x080c, 0x0d65, 0x0428, 0x0005, 0x080c, 0x9a6f,
-	0x7007, 0x0000, 0x7033, 0x0000, 0x00e8, 0x0066, 0x9036, 0x080c,
-	0x9110, 0x006e, 0x7007, 0x0000, 0x7033, 0x0000, 0x0098, 0x080c,
-	0x9a5a, 0x0140, 0x080c, 0x9a6f, 0x0128, 0x0066, 0x9036, 0x080c,
-	0x9110, 0x006e, 0x7033, 0x0000, 0x0028, 0x080c, 0x9a5a, 0x080c,
-	0x94a2, 0x0000, 0x010e, 0x190c, 0x98e4, 0x00ce, 0x00ee, 0x00be,
-	0x0005, 0x00d6, 0x00c6, 0x080c, 0x9926, 0x0106, 0x190c, 0x98c8,
-	0x6044, 0xd0fc, 0x1130, 0x010e, 0x190c, 0x98e4, 0x00ce, 0x00de,
-	0x0005, 0x2069, 0x19b8, 0x684c, 0x9005, 0x0da8, 0x9c06, 0x190c,
-	0x0d65, 0x6852, 0x00e6, 0x2d70, 0x080c, 0x8521, 0x00ee, 0x080c,
-	0x8218, 0x0016, 0x2009, 0x0040, 0x080c, 0x2052, 0x001e, 0x683c,
-	0x9084, 0x0003, 0x0002, 0x8901, 0x8902, 0x8920, 0x88ff, 0x080c,
-	0x0d65, 0x0460, 0x6868, 0x9086, 0x0001, 0x0190, 0x600c, 0x9015,
-	0x0160, 0x6a4a, 0x600f, 0x0000, 0x6044, 0xc0fc, 0x6046, 0x9006,
-	0x7042, 0x684e, 0x683f, 0x0000, 0x00c8, 0x684a, 0x6846, 0x0ca0,
-	0x686b, 0x0000, 0x6848, 0x9065, 0x0d78, 0x6003, 0x0002, 0x0c60,
-	0x9006, 0x686a, 0x6852, 0x686e, 0x600c, 0x9015, 0x0120, 0x6a4a,
-	0x600f, 0x0000, 0x0018, 0x684e, 0x684a, 0x6846, 0x684f, 0x0000,
-	0x010e, 0x190c, 0x98e4, 0x00ce, 0x00de, 0x0005, 0x0005, 0x6020,
-	0x9084, 0x000f, 0x000b, 0x0005, 0x894c, 0x894f, 0x8da8, 0x8e37,
-	0x894f, 0x8da8, 0x8e37, 0x894c, 0x894f, 0x894c, 0x894c, 0x894c,
-	0x894c, 0x894c, 0x894c, 0x894c, 0x080c, 0x8874, 0x0005, 0x00b6,
-	0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6,
-	0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0053,
-	0x1a0c, 0x0d65, 0x6110, 0x2158, 0xb984, 0x2c78, 0x2061, 0x0100,
-	0x619a, 0x908a, 0x0040, 0x1a04, 0x89bb, 0x005b, 0x00fe, 0x00ee,
-	0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be,
-	0x0005, 0x8b32, 0x8b6d, 0x8b96, 0x8c39, 0x8c5a, 0x8c60, 0x8c6d,
-	0x8c75, 0x8c81, 0x8c87, 0x8c98, 0x8c87, 0x8cef, 0x8c75, 0x8cfb,
-	0x8d01, 0x8c81, 0x8d01, 0x8d0d, 0x89b9, 0x89b9, 0x89b9, 0x89b9,
-	0x89b9, 0x89b9, 0x89b9, 0x89b9, 0x89b9, 0x89b9, 0x89b9, 0x9131,
-	0x9154, 0x9165, 0x9185, 0x91b7, 0x8c6d, 0x89b9, 0x8c6d, 0x8c87,
-	0x89b9, 0x8b96, 0x8c39, 0x89b9, 0x9595, 0x8c87, 0x89b9, 0x95b1,
-	0x8c87, 0x89b9, 0x8c81, 0x8b2c, 0x89dc, 0x89b9, 0x95cd, 0x963a,
-	0x971a, 0x89b9, 0x9727, 0x8c6a, 0x9752, 0x89b9, 0x91c1, 0x975e,
-	0x89b9, 0x080c, 0x0d65, 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005,
-	0x89da, 0x89da, 0x89da, 0x8a03, 0x8aaf, 0x8aba, 0x89da, 0x89da,
-	0x89da, 0x8b01, 0x8b0d, 0x8a1e, 0x89da, 0x8a39, 0x8a6d, 0x9ada,
-	0x9b1f, 0x8c87, 0x080c, 0x0d65, 0x00d6, 0x0096, 0x080c, 0x8d20,
-	0x7003, 0x2414, 0x7007, 0x0018, 0x700b, 0x0800, 0x7814, 0x2048,
-	0xa83c, 0x700e, 0xa850, 0x7022, 0xa854, 0x7026, 0x60c3, 0x0018,
-	0x080c, 0x8f87, 0x009e, 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058,
-	0xb8a0, 0x00be, 0x080c, 0x9b66, 0x1118, 0x9084, 0xff80, 0x0110,
-	0x9085, 0x0001, 0x0005, 0x00d6, 0x0096, 0x080c, 0x8d20, 0x7003,
-	0x0500, 0x7814, 0x2048, 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c,
-	0x7012, 0xa880, 0x7016, 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3,
-	0x0010, 0x080c, 0x8f87, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096,
-	0x080c, 0x8d20, 0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a,
-	0xa8d0, 0x700e, 0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a,
-	0xa8e0, 0x701e, 0x60c3, 0x0010, 0x080c, 0x8f87, 0x009e, 0x00de,
-	0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x8d20,
-	0x20e9, 0x0000, 0x2001, 0x1974, 0x2003, 0x0000, 0x7814, 0x2048,
-	0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x001b, 0x2098, 0x2001, 0x1974, 0x0016, 0x200c, 0x2001,
-	0x0001, 0x080c, 0x2037, 0x080c, 0xc591, 0x9006, 0x080c, 0x2037,
-	0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c,
-	0x8f87, 0x012e, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x8d6b, 0x20e9, 0x0000, 0x2001, 0x1974,
-	0x2003, 0x0000, 0x7814, 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000,
-	0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x001b, 0x2098, 0x2001, 0x1974, 0x0016, 0x200c, 0x080c,
-	0xc591, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051,
-	0x7814, 0x2048, 0x080c, 0x0fd4, 0x080c, 0x8f87, 0x012e, 0x009e,
-	0x00de, 0x0005, 0x60c0, 0x8004, 0x9084, 0x0003, 0x9005, 0x0130,
-	0x9082, 0x0004, 0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c,
-	0x8d20, 0x7003, 0x7800, 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008,
-	0x0804, 0x8f87, 0x00d6, 0x00e6, 0x080c, 0x8d6b, 0x7814, 0x9084,
-	0xff00, 0x2073, 0x0200, 0x8e70, 0x8e70, 0x9095, 0x0010, 0x2272,
-	0x8e70, 0x2073, 0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004,
-	0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x8ad0, 0x2069, 0x1801, 0x20a9,
-	0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x8ad9, 0x2069, 0x1984,
-	0x9086, 0xdf00, 0x0110, 0x2069, 0x199e, 0x20a9, 0x001a, 0x9e86,
-	0x0260, 0x1148, 0x00c6, 0x2061, 0x0200, 0x6010, 0x8000, 0x6012,
-	0x00ce, 0x2071, 0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68, 0x8e70,
-	0x1f04, 0x8ae7, 0x60c3, 0x004c, 0x080c, 0x8f87, 0x00ee, 0x00de,
-	0x0005, 0x080c, 0x8d20, 0x7003, 0x6300, 0x7007, 0x0028, 0x7808,
-	0x700e, 0x60c3, 0x0008, 0x0804, 0x8f87, 0x00d6, 0x0026, 0x0016,
-	0x080c, 0x8d6b, 0x7003, 0x0200, 0x7814, 0x700e, 0x00e6, 0x9ef0,
-	0x0004, 0x2009, 0x0001, 0x2011, 0x000c, 0x2073, 0x0800, 0x8e70,
-	0x2073, 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c, 0x8f87,
-	0x001e, 0x002e, 0x00de, 0x0005, 0x2001, 0x1817, 0x2004, 0x609a,
-	0x0804, 0x8f87, 0x080c, 0x8d20, 0x7003, 0x5200, 0x2069, 0x1853,
-	0x6804, 0xd084, 0x0130, 0x6828, 0x0016, 0x080c, 0x2457, 0x710e,
-	0x001e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
-	0x0000, 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801,
-	0x20a1, 0x0254, 0x4003, 0x080c, 0x9b66, 0x1120, 0xb8a0, 0x9082,
-	0x007f, 0x0248, 0x2001, 0x181e, 0x2004, 0x7032, 0x2001, 0x181f,
-	0x2004, 0x7036, 0x0030, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff,
-	0x7036, 0x60c3, 0x001c, 0x0804, 0x8f87, 0x080c, 0x8d20, 0x7003,
-	0x0500, 0x080c, 0x9b66, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248,
-	0x2001, 0x181e, 0x2004, 0x700a, 0x2001, 0x181f, 0x2004, 0x700e,
-	0x0030, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9,
-	0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1,
-	0x0250, 0x4003, 0x60c3, 0x0010, 0x0804, 0x8f87, 0x080c, 0x8d20,
-	0x9006, 0x080c, 0x6631, 0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003,
-	0x0400, 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096, 0x904d,
-	0x0120, 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300,
-	0xb8a0, 0x9086, 0x007e, 0x1904, 0x8c01, 0x00d6, 0x2069, 0x193d,
-	0x2001, 0x1836, 0x2004, 0xd0a4, 0x0178, 0x6800, 0x700a, 0x6808,
-	0x9084, 0x2000, 0x7012, 0x680c, 0x7016, 0x701f, 0x2710, 0x6818,
-	0x7022, 0x681c, 0x7026, 0x0080, 0x6800, 0x700a, 0x6804, 0x700e,
-	0x6808, 0x080c, 0x70b7, 0x1118, 0x9084, 0x37ff, 0x0010, 0x9084,
-	0x3fff, 0x7012, 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1,
-	0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003,
-	0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6,
-	0x080c, 0x97e5, 0x2069, 0x1945, 0x2071, 0x024e, 0x6800, 0xc0dd,
-	0x7002, 0x080c, 0x5391, 0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de,
-	0x04a0, 0x2001, 0x1836, 0x2004, 0xd0a4, 0x0168, 0x0016, 0x2009,
-	0x0002, 0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3, 0x0000, 0x080c,
-	0x2498, 0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099, 0x193d, 0x20e9,
-	0x0000, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004,
-	0x2099, 0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099,
-	0x1801, 0x20a1, 0x025a, 0x4003, 0x080c, 0x97e5, 0x20a1, 0x024e,
-	0x20a9, 0x0008, 0x2099, 0x1945, 0x4003, 0x60c3, 0x0074, 0x0804,
-	0x8f87, 0x080c, 0x8d20, 0x7003, 0x2010, 0x7007, 0x0014, 0x700b,
-	0x0800, 0x700f, 0x2000, 0x9006, 0x00f6, 0x2079, 0x1853, 0x7904,
-	0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010, 0x9085, 0x0010,
-	0x9085, 0x0002, 0x00d6, 0x0804, 0x8cd0, 0x7026, 0x60c3, 0x0014,
-	0x0804, 0x8f87, 0x080c, 0x8d20, 0x7003, 0x5000, 0x0804, 0x8bb0,
-	0x080c, 0x8d20, 0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014,
-	0x0804, 0x8f87, 0x080c, 0x8d62, 0x0010, 0x080c, 0x8d6b, 0x7003,
-	0x0200, 0x60c3, 0x0004, 0x0804, 0x8f87, 0x080c, 0x8d6b, 0x7003,
-	0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804,
-	0x8f87, 0x080c, 0x8d6b, 0x7003, 0x0200, 0x0804, 0x8bb0, 0x080c,
-	0x8d6b, 0x7003, 0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010,
-	0x700b, 0x0003, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8f87,
-	0x00d6, 0x080c, 0x8d6b, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b,
-	0x0800, 0xb894, 0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030,
-	0x0190, 0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f,
-	0x2100, 0x0058, 0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028,
-	0x700f, 0x0700, 0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1853,
-	0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010, 0x9085,
-	0x0010, 0x2009, 0x1875, 0x210c, 0xd184, 0x1110, 0x9085, 0x0002,
-	0x0026, 0x2009, 0x1873, 0x210c, 0xd1e4, 0x0150, 0xc0c5, 0xbac4,
-	0xd28c, 0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010, 0x0140,
-	0xd1ec, 0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108, 0xc0bd,
-	0x002e, 0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0x8f87, 0x080c,
-	0x8d6b, 0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100, 0x60c3,
-	0x0014, 0x0804, 0x8f87, 0x080c, 0x8d6b, 0x7003, 0x0200, 0x0804,
-	0x8b36, 0x080c, 0x8d6b, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f,
-	0x2a00, 0x60c3, 0x0008, 0x0804, 0x8f87, 0x080c, 0x8d6b, 0x7003,
-	0x0100, 0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0x8f87, 0x0026,
-	0x00d6, 0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800, 0x0040,
-	0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021, 0x0100,
-	0x080c, 0x97fa, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069,
-	0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x9485, 0x0029, 0x7012,
-	0x004e, 0x003e, 0x00de, 0x080c, 0x8f7b, 0x721a, 0x9f95, 0x0000,
-	0x7222, 0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005, 0x0026,
-	0x080c, 0x97fa, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6, 0x2069,
-	0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x00de, 0x7013, 0x2029,
-	0x0c10, 0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02, 0x700f,
-	0x0000, 0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3300,
-	0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019,
-	0x2300, 0x2021, 0x0100, 0x080c, 0x97fa, 0xb810, 0x9305, 0x7002,
-	0xb814, 0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140, 0xb814,
-	0x9005, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020, 0x6878,
-	0x700a, 0x687c, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012, 0x004e,
-	0x003e, 0x00de, 0x080c, 0x8f7b, 0x721a, 0x7a08, 0x7222, 0x2f10,
-	0x7226, 0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0x8f7b, 0x721a,
-	0x7a08, 0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e, 0x0005,
-	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071,
-	0x0240, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d65, 0x908a, 0x0092,
-	0x1a0c, 0x0d65, 0x6110, 0x2158, 0xb984, 0x2c78, 0x2061, 0x0100,
-	0x619a, 0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x00be, 0x0005, 0x8dd9, 0x8de8, 0x8df3, 0x8dd7, 0x8dd7, 0x8dd7,
-	0x8dd9, 0x8dd7, 0x8dd7, 0x8dd7, 0x8dd7, 0x8dd7, 0x8dd7, 0x080c,
-	0x0d65, 0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x27a2, 0x0228,
-	0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804, 0x8f87,
-	0x0431, 0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff, 0x60c3,
-	0x000c, 0x0804, 0x8f87, 0x0479, 0x7003, 0x0003, 0x7007, 0x0300,
-	0x60c3, 0x0004, 0x0804, 0x8f87, 0x0026, 0x080c, 0x97fa, 0xb810,
-	0x9085, 0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878,
-	0x700a, 0x687c, 0x700e, 0x7013, 0x0009, 0x0804, 0x8d3b, 0x0026,
-	0x080c, 0x97fa, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814, 0x7006,
-	0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x2001, 0x0099,
-	0x7012, 0x0804, 0x8d9d, 0x0026, 0x080c, 0x97fa, 0xb810, 0x9085,
-	0x8500, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878, 0x700a,
-	0x687c, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x8d9d, 0x00b6,
-	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200, 0x2071,
-	0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c, 0x0d65, 0x908a, 0x0057,
-	0x1a0c, 0x0d65, 0x7910, 0x2158, 0xb984, 0x2061, 0x0100, 0x619a,
-	0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
-	0x0005, 0x8e6c, 0x8e6c, 0x8e6c, 0x8e92, 0x8e6c, 0x8e6c, 0x8e6c,
-	0x8e6c, 0x8e6c, 0x8e6c, 0x8e6c, 0x9355, 0x935d, 0x9365, 0x936d,
-	0x8e6c, 0x8e6c, 0x8e6c, 0x934d, 0x080c, 0x0d65, 0x6813, 0x0008,
-	0xba8c, 0x8210, 0xb8c4, 0xd084, 0x0128, 0x7a4e, 0x7b14, 0x7b52,
-	0x722e, 0x732a, 0x9294, 0x00ff, 0xba8e, 0x8217, 0x721a, 0xba10,
-	0x9295, 0x0600, 0x7202, 0xba14, 0x7206, 0x2069, 0x1800, 0x6a78,
-	0x720a, 0x6a7c, 0x720e, 0x7013, 0x0829, 0x2f10, 0x7222, 0x7027,
-	0xffff, 0x0005, 0x0016, 0x7814, 0x9084, 0x0700, 0x8007, 0x0013,
-	0x001e, 0x0005, 0x8ea2, 0x8ea2, 0x8ea4, 0x8ea2, 0x8ea2, 0x8ea2,
-	0x8ebe, 0x8ea2, 0x080c, 0x0d65, 0x7914, 0x918c, 0x08ff, 0x918d,
-	0xf600, 0x7916, 0x2009, 0x0003, 0x00b9, 0x2069, 0x1853, 0x6804,
-	0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff, 0x8007, 0x7032, 0x0010,
-	0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804, 0x8f87, 0x2009, 0x0003,
-	0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c, 0x97fa, 0x001e,
-	0xb810, 0x9085, 0x0100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
-	0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013, 0x0888, 0x918d, 0x0008,
-	0x7116, 0x080c, 0x8f7b, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226,
-	0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046,
-	0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058, 0xb8a0,
-	0x2028, 0xb910, 0xba14, 0x7378, 0x747c, 0x7820, 0x0002, 0x8f06,
-	0x8f06, 0x8f06, 0x8f06, 0x8f06, 0x8f06, 0x8f06, 0x8f06, 0x8f06,
-	0x8f06, 0x8f08, 0x8f06, 0x8f06, 0x8f06, 0x8f06, 0x080c, 0x0d65,
-	0xb884, 0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90,
-	0x9784, 0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00, 0x0006,
-	0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94,
-	0x87ff, 0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808, 0x6082,
-	0x2f00, 0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073, 0x0129,
-	0x6077, 0x0000, 0xb884, 0x609e, 0x0050, 0x2039, 0x0029, 0x9705,
-	0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029, 0xa87c,
-	0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808,
-	0x6086, 0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c, 0x8000,
-	0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0xa848,
-	0x608a, 0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca, 0xb86c,
-	0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0x97da, 0x2009,
-	0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58,
-	0x080c, 0x8210, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee,
-	0x009e, 0x00be, 0x0005, 0x7a40, 0x9294, 0x00ff, 0x8217, 0x0005,
-	0x00d6, 0x2069, 0x19b8, 0x686b, 0x0001, 0x00de, 0x0005, 0x60a3,
-	0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c, 0x8202, 0x0005, 0x0016,
-	0x2001, 0x180c, 0x200c, 0x9184, 0x0600, 0x9086, 0x0600, 0x0128,
-	0x0089, 0x080c, 0x8202, 0x001e, 0x0005, 0xc1e5, 0x2001, 0x180c,
-	0x2102, 0x2001, 0x19b9, 0x2003, 0x0000, 0x2001, 0x19c4, 0x2003,
-	0x0000, 0x0c88, 0x0006, 0x0016, 0x0026, 0x2009, 0x1804, 0x2011,
-	0x0009, 0x080c, 0x287c, 0x002e, 0x001e, 0x000e, 0x0005, 0x0016,
-	0x00c6, 0x0006, 0x080c, 0x9926, 0x0106, 0x190c, 0x98c8, 0x2061,
-	0x0100, 0x61a4, 0x60a7, 0x95f5, 0x0016, 0x0026, 0x2009, 0x1804,
-	0x2011, 0x0008, 0x080c, 0x287c, 0x002e, 0x001e, 0x010e, 0x190c,
-	0x98e4, 0x000e, 0xa001, 0xa001, 0xa001, 0x61a6, 0x00ce, 0x001e,
-	0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x080c, 0x70b7, 0x1510, 0x2001, 0x19dd, 0x2004, 0x9005,
-	0x1904, 0x9038, 0x080c, 0x7158, 0x11a8, 0x2069, 0x0380, 0x6843,
-	0x0101, 0x6844, 0xd084, 0x1de8, 0x2061, 0x0100, 0x6020, 0xd0b4,
-	0x1120, 0x6024, 0xd084, 0x090c, 0x0d65, 0x6843, 0x0100, 0x080c,
-	0x8202, 0x04b0, 0x00c6, 0x2061, 0x19b8, 0x00f0, 0x6904, 0x9194,
-	0x4000, 0x0598, 0x080c, 0x8fb7, 0x080c, 0x2843, 0x00c6, 0x2061,
-	0x19b8, 0x6134, 0x9192, 0x0008, 0x1278, 0x8108, 0x6136, 0x080c,
-	0x98c8, 0x6130, 0x080c, 0x98e4, 0x00ce, 0x81ff, 0x01c8, 0x080c,
-	0x8202, 0x080c, 0x8faa, 0x00a0, 0x080c, 0x98c8, 0x6130, 0x91e5,
-	0x0000, 0x0150, 0x080c, 0xd610, 0x080c, 0x820b, 0x6003, 0x0001,
-	0x2009, 0x0014, 0x080c, 0x9c85, 0x080c, 0x98e4, 0x00ce, 0x0000,
-	0x002e, 0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0x19dd, 0x2004,
-	0x9005, 0x1db0, 0x00c6, 0x2061, 0x19b8, 0x6134, 0x9192, 0x0003,
-	0x1ad8, 0x8108, 0x6136, 0x00ce, 0x080c, 0x8202, 0x080c, 0x5b97,
-	0x2009, 0x1852, 0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, 0x00c6,
-	0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c, 0x8218, 0x080c, 0x98c8,
-	0x2001, 0x0387, 0x2003, 0x0202, 0x2071, 0x19b8, 0x714c, 0x81ff,
-	0x0904, 0x90cc, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x70b7,
-	0x11c0, 0x0036, 0x2019, 0x0002, 0x080c, 0x9286, 0x003e, 0x714c,
-	0x2160, 0x080c, 0xd610, 0x2009, 0x004a, 0x6003, 0x0003, 0x080c,
-	0x9c85, 0x2001, 0x0386, 0x2003, 0x5040, 0x080c, 0x7158, 0x0804,
-	0x90cc, 0x6904, 0xd1f4, 0x0904, 0x90d9, 0x080c, 0x2843, 0x00c6,
-	0x704c, 0x9065, 0x090c, 0x0d65, 0x6020, 0x00ce, 0x9086, 0x0006,
-	0x1518, 0x61c8, 0x60c4, 0x9105, 0x11f8, 0x2009, 0x180c, 0x2104,
-	0xd0d4, 0x01d0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294,
-	0x0002, 0x1510, 0x0010, 0xc0d4, 0x200a, 0x6014, 0x9084, 0xe7fd,
-	0x9085, 0x0010, 0x6016, 0x704c, 0x2060, 0x080c, 0x88d1, 0x2009,
-	0x0049, 0x080c, 0x9c85, 0x0080, 0x0036, 0x2019, 0x0001, 0x080c,
-	0x9286, 0x003e, 0x714c, 0x2160, 0x080c, 0xd610, 0x2009, 0x004a,
-	0x6003, 0x0003, 0x080c, 0x9c85, 0x2001, 0x0387, 0x2003, 0x0200,
-	0x080c, 0x98e4, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce, 0x009e,
-	0x0005, 0xd1ec, 0x1904, 0x908d, 0x0804, 0x908f, 0x0026, 0x00e6,
-	0x2071, 0x19b8, 0x706c, 0xd084, 0x01d0, 0xc084, 0x706e, 0x714c,
-	0x81ff, 0x01a8, 0x2071, 0x0100, 0x9188, 0x0008, 0x2114, 0x928e,
-	0x0006, 0x1138, 0x2009, 0x1984, 0x2011, 0x0012, 0x080c, 0x287c,
-	0x0030, 0x2009, 0x1984, 0x2011, 0x0016, 0x080c, 0x287c, 0x00ee,
-	0x002e, 0x0005, 0x9036, 0x2001, 0x19c2, 0x2004, 0x9005, 0x0128,
-	0x9c06, 0x0128, 0x2c30, 0x600c, 0x0cc8, 0x9085, 0x0001, 0x0005,
-	0x00f6, 0x2079, 0x19b8, 0x610c, 0x9006, 0x600e, 0x6044, 0xc0fc,
-	0x6046, 0x86ff, 0x1140, 0x7824, 0x9c06, 0x1118, 0x7826, 0x782a,
-	0x0050, 0x792a, 0x0040, 0x00c6, 0x2660, 0x610e, 0x00ce, 0x7824,
-	0x9c06, 0x1108, 0x7e26, 0x080c, 0x9378, 0x080c, 0xba36, 0x00fe,
-	0x0005, 0x080c, 0x8d20, 0x7003, 0x1200, 0x7838, 0x7012, 0x783c,
-	0x7016, 0x00c6, 0x7820, 0x9086, 0x0004, 0x1148, 0x7810, 0x9005,
-	0x0130, 0x00b6, 0x2058, 0xb810, 0xb914, 0x00be, 0x0020, 0x2061,
-	0x1800, 0x6078, 0x617c, 0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce,
-	0x60c3, 0x002c, 0x0804, 0x8f87, 0x080c, 0x8d20, 0x7003, 0x0f00,
-	0x7808, 0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff, 0x700a, 0xb814,
-	0x700e, 0x60c3, 0x0008, 0x0804, 0x8f87, 0x0156, 0x080c, 0x8d6b,
-	0x7003, 0x0200, 0x2011, 0x1848, 0x63f0, 0x2312, 0x20a9, 0x0006,
-	0x2011, 0x1840, 0x2019, 0x1841, 0x9ef0, 0x0002, 0x2376, 0x8e70,
-	0x2276, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0x9176,
-	0x60c3, 0x001c, 0x015e, 0x0804, 0x8f87, 0x0016, 0x0026, 0x080c,
-	0x8d47, 0x080c, 0x8d59, 0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0,
-	0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x0021, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8,
-	0x9192, 0x0010, 0x1250, 0x4003, 0x9080, 0x0004, 0x8003, 0x60c2,
-	0x080c, 0x8f87, 0x002e, 0x001e, 0x0005, 0x20a9, 0x0010, 0x4003,
-	0x080c, 0x97e5, 0x20a1, 0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c,
-	0x8d20, 0x7003, 0x6200, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804,
-	0x8f87, 0x0016, 0x0026, 0x080c, 0x8d20, 0x20e9, 0x0000, 0x20a1,
-	0x024c, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0,
-	0xa85c, 0x9080, 0x0023, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002,
-	0x21a8, 0x4003, 0x8003, 0x60c2, 0x080c, 0x8f87, 0x002e, 0x001e,
-	0x0005, 0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x19b8, 0x7010, 0x2060, 0x8cff, 0x0188, 0x080c, 0xba5c, 0x1110,
-	0x080c, 0xa58f, 0x600c, 0x0006, 0x080c, 0xbcd3, 0x600f, 0x0000,
-	0x080c, 0x9be7, 0x080c, 0x9378, 0x00ce, 0x0c68, 0x2c00, 0x7012,
-	0x700e, 0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0156,
-	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006,
-	0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xe7ff, 0x2102,
-	0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19b8, 0x7030, 0x2060,
-	0x8cff, 0x0548, 0x080c, 0x8fb7, 0x6ac0, 0x68c3, 0x0000, 0x080c,
-	0x820b, 0x00c6, 0x2061, 0x0100, 0x080c, 0x97fe, 0x00ce, 0x20a9,
-	0x01f4, 0x04b1, 0x080c, 0x8874, 0x6044, 0xd0ac, 0x1128, 0x2001,
-	0x1959, 0x2004, 0x604a, 0x0020, 0x2009, 0x0013, 0x080c, 0x9c85,
-	0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x015e, 0x012e, 0x0005, 0x2001, 0x1800, 0x2004, 0x9096, 0x0001,
-	0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c, 0x820b, 0x6814, 0x9084,
-	0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000,
-	0x2011, 0x5b41, 0x080c, 0x8159, 0x20a9, 0x01f4, 0x0009, 0x08c0,
-	0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000,
-	0x190c, 0x2843, 0x0090, 0xd084, 0x0118, 0x6827, 0x0001, 0x0010,
-	0x1f04, 0x9268, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100,
-	0x080c, 0x2833, 0x9006, 0x080c, 0x2833, 0x0005, 0x0126, 0x0156,
-	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006,
-	0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xdbff, 0x2102,
-	0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x0380, 0x701c, 0x0006,
-	0x701f, 0x0202, 0x2071, 0x19b8, 0x704c, 0x2060, 0x8cff, 0x0904,
-	0x9327, 0x9386, 0x0002, 0x1128, 0x6814, 0x9084, 0x0002, 0x0904,
-	0x9327, 0x68af, 0x95f5, 0x6817, 0x0010, 0x2009, 0x00fa, 0x8109,
-	0x1df0, 0x69c6, 0x68cb, 0x0008, 0x080c, 0x8218, 0x080c, 0x1c7a,
-	0x0046, 0x2009, 0x00a5, 0x080c, 0x0e3d, 0x2021, 0x0169, 0x2404,
-	0x9084, 0x000f, 0x9086, 0x0004, 0x11f8, 0x68af, 0x95f5, 0x68c6,
-	0x68cb, 0x0008, 0x00e6, 0x00f6, 0x2079, 0x0090, 0x2071, 0x19b8,
-	0x6814, 0x9084, 0x1984, 0x9085, 0x0012, 0x6816, 0x782b, 0x0008,
-	0x7057, 0x0000, 0x00fe, 0x00ee, 0x9386, 0x0002, 0x1128, 0x7884,
-	0x9005, 0x1110, 0x7887, 0x0001, 0x0016, 0x2009, 0x0040, 0x080c,
-	0x2052, 0x001e, 0x2009, 0x0000, 0x080c, 0x0e3d, 0x004e, 0x20a9,
-	0x03e8, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084,
-	0x4000, 0x190c, 0x2843, 0x0090, 0xd08c, 0x0118, 0x6827, 0x0002,
-	0x0010, 0x1f04, 0x92f9, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001,
-	0x0100, 0x080c, 0x2833, 0x9006, 0x080c, 0x2833, 0x6827, 0x4000,
-	0x6824, 0x83ff, 0x1160, 0x2009, 0x0049, 0x080c, 0x88d1, 0x6044,
-	0xd0ac, 0x1118, 0x6003, 0x0002, 0x0010, 0x080c, 0x9c85, 0x000e,
-	0x2071, 0x0380, 0xd08c, 0x1110, 0x701f, 0x0200, 0x000e, 0x001e,
-	0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e,
-	0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19b8, 0x6a06,
-	0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069,
-	0x19b8, 0x6a3e, 0x012e, 0x00de, 0x0005, 0x080c, 0x8e6e, 0x785c,
-	0x7032, 0x7042, 0x7047, 0x1000, 0x00f8, 0x080c, 0x8e6e, 0x785c,
-	0x7032, 0x7042, 0x7047, 0x4000, 0x00b8, 0x080c, 0x8e6e, 0x785c,
-	0x7032, 0x7042, 0x7047, 0x2000, 0x0078, 0x080c, 0x8e6e, 0x785c,
-	0x7032, 0x7042, 0x7047, 0x0400, 0x0038, 0x080c, 0x8e6e, 0x785c,
-	0x7032, 0x7042, 0x7047, 0x0200, 0x60c3, 0x0020, 0x0804, 0x8f87,
-	0x00e6, 0x2071, 0x19b8, 0x702c, 0x9005, 0x0110, 0x8001, 0x702e,
-	0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b8, 0x7620, 0x2660,
-	0x2678, 0x2039, 0x0001, 0x87ff, 0x0904, 0x941d, 0x8cff, 0x0904,
-	0x941d, 0x6020, 0x9086, 0x0006, 0x1904, 0x9418, 0x88ff, 0x0138,
-	0x2800, 0x9c06, 0x1904, 0x9418, 0x2039, 0x0000, 0x0050, 0x6010,
-	0x9b06, 0x1904, 0x9418, 0x85ff, 0x0120, 0x605c, 0x9106, 0x1904,
-	0x9418, 0x7030, 0x9c06, 0x15b0, 0x2069, 0x0100, 0x68c0, 0x9005,
-	0x1160, 0x6824, 0xd084, 0x0148, 0x6827, 0x0001, 0x080c, 0x820b,
-	0x080c, 0x94a2, 0x7033, 0x0000, 0x0428, 0x080c, 0x820b, 0x6820,
-	0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000,
-	0x080c, 0x94a2, 0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
-	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2833, 0x9006,
-	0x080c, 0x2833, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
-	0x0001, 0x003e, 0x7020, 0x9c36, 0x1110, 0x660c, 0x7622, 0x701c,
-	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x701e, 0x0010,
-	0x701f, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
-	0x0008, 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000, 0x6014, 0x0096,
-	0x2048, 0x080c, 0xb845, 0x0110, 0x080c, 0xd21e, 0x009e, 0x080c,
-	0x9c21, 0x080c, 0x9378, 0x88ff, 0x1190, 0x00ce, 0x0804, 0x9393,
-	0x2c78, 0x600c, 0x2060, 0x0804, 0x9393, 0x9006, 0x012e, 0x000e,
-	0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b,
-	0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6,
-	0x0096, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x19b8, 0x7648, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9491,
-	0x6020, 0x9086, 0x0006, 0x1904, 0x948c, 0x87ff, 0x0128, 0x2700,
-	0x9c06, 0x1904, 0x948c, 0x0040, 0x6010, 0x9b06, 0x15e8, 0x85ff,
-	0x0118, 0x605c, 0x9106, 0x15c0, 0x704c, 0x9c06, 0x1168, 0x0036,
-	0x2019, 0x0001, 0x080c, 0x9286, 0x703f, 0x0000, 0x9006, 0x704e,
-	0x706a, 0x7052, 0x706e, 0x003e, 0x7048, 0x9c36, 0x1110, 0x660c,
-	0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
-	0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06,
-	0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048,
-	0x080c, 0xb845, 0x0110, 0x080c, 0xd21e, 0x080c, 0x9c21, 0x87ff,
-	0x1198, 0x00ce, 0x0804, 0x943d, 0x2c78, 0x600c, 0x2060, 0x0804,
-	0x943d, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x009e,
-	0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x97bd,
-	0x0001, 0x0c80, 0x00e6, 0x2071, 0x19b8, 0x7033, 0x0000, 0x7004,
-	0x9086, 0x0003, 0x0158, 0x2001, 0x1800, 0x2004, 0x9086, 0x0002,
-	0x1118, 0x7007, 0x0005, 0x0010, 0x7007, 0x0000, 0x00ee, 0x0005,
-	0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x19b8, 0x2c10, 0x7648, 0x2660, 0x2678, 0x8cff,
-	0x0518, 0x2200, 0x9c06, 0x11e0, 0x7048, 0x9c36, 0x1110, 0x660c,
-	0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
-	0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x2c00, 0x9f06, 0x0110,
-	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x9085, 0x0001, 0x0020,
-	0x2c78, 0x600c, 0x2060, 0x08d8, 0x012e, 0x000e, 0x002e, 0x006e,
-	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6, 0x00d6,
-	0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x19b8, 0x7610, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9584, 0x6010,
-	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904, 0x957f, 0x7030,
-	0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0x955b,
-	0x080c, 0x8fb7, 0x68c3, 0x0000, 0x080c, 0x94a2, 0x7033, 0x0000,
+	0x2004, 0xd084, 0x190c, 0x11c9, 0x00ee, 0x00fe, 0x009e, 0x0005,
+	0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046,
+	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
+	0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x190c, 0x11c9, 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6c9f, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824,
+	0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
+	0x080c, 0x8053, 0x782c, 0x9094, 0x0780, 0x190c, 0x6c9f, 0xd0a4,
+	0x1d70, 0x00d6, 0x2069, 0x0050, 0x693c, 0x2069, 0x1919, 0x6808,
+	0x690a, 0x2069, 0x19d3, 0x9102, 0x1118, 0x683c, 0x9005, 0x1328,
+	0x2001, 0x191a, 0x200c, 0x810d, 0x693e, 0x00de, 0x00ee, 0x00fe,
+	0x0005, 0x7094, 0x908a, 0x0029, 0x1a0c, 0x0d65, 0x9082, 0x001d,
+	0x003b, 0x0026, 0x2011, 0x1e00, 0x080c, 0x288c, 0x002e, 0x0005,
+	0x6e3c, 0x6dc2, 0x6dde, 0x6e08, 0x6e2b, 0x6e6b, 0x6e7d, 0x6dde,
+	0x6e53, 0x6d7d, 0x6dab, 0x6d7c, 0x0005, 0x00d6, 0x2069, 0x0200,
+	0x6804, 0x9005, 0x1180, 0x6808, 0x9005, 0x1518, 0x7097, 0x0028,
+	0x2069, 0x195f, 0x2d04, 0x7002, 0x080c, 0x71d7, 0x6028, 0x9085,
+	0x0600, 0x602a, 0x00b0, 0x7097, 0x0028, 0x2069, 0x195f, 0x2d04,
+	0x7002, 0x6028, 0x9085, 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046,
+	0x0056, 0x2071, 0x1a3b, 0x080c, 0x196c, 0x005e, 0x004e, 0x003e,
+	0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005,
+	0x1178, 0x6808, 0x9005, 0x1160, 0x7097, 0x0028, 0x2069, 0x195f,
+	0x2d04, 0x7002, 0x080c, 0x7279, 0x6028, 0x9085, 0x0600, 0x602a,
+	0x00de, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2852, 0x000e,
+	0x6124, 0xd1e4, 0x1190, 0x080c, 0x6eee, 0xd1d4, 0x1160, 0xd1dc,
+	0x1138, 0xd1cc, 0x0150, 0x7097, 0x0020, 0x080c, 0x6eee, 0x0028,
+	0x7097, 0x001d, 0x0010, 0x7097, 0x001f, 0x0005, 0x2001, 0x0088,
+	0x080c, 0x2852, 0x6124, 0xd1cc, 0x11e8, 0xd1dc, 0x11c0, 0xd1e4,
+	0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c, 0x1996, 0x60e3, 0x0001,
+	0x600c, 0xc0b4, 0x600e, 0x080c, 0x70c2, 0x2001, 0x0080, 0x080c,
+	0x2852, 0x7097, 0x0028, 0x0058, 0x7097, 0x001e, 0x0040, 0x7097,
+	0x001d, 0x0028, 0x7097, 0x0020, 0x0010, 0x7097, 0x001f, 0x0005,
+	0x080c, 0x1996, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c,
+	0x70c2, 0x2001, 0x0080, 0x080c, 0x2852, 0x6124, 0xd1d4, 0x1180,
+	0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184, 0x1e00, 0x1158, 0x7097,
+	0x0028, 0x0040, 0x7097, 0x001e, 0x0028, 0x7097, 0x001d, 0x0010,
+	0x7097, 0x001f, 0x0005, 0x2001, 0x00a0, 0x080c, 0x2852, 0x6124,
+	0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c, 0x1996, 0x7097, 0x001e,
+	0x0010, 0x7097, 0x001d, 0x0005, 0x080c, 0x6f77, 0x6124, 0xd1dc,
+	0x1188, 0x080c, 0x6eee, 0x0016, 0x080c, 0x1996, 0x001e, 0xd1d4,
+	0x1128, 0xd1e4, 0x0138, 0x7097, 0x001e, 0x0020, 0x7097, 0x001f,
+	0x080c, 0x6eee, 0x0005, 0x0006, 0x2001, 0x00a0, 0x080c, 0x2852,
+	0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc, 0x1128,
+	0xd1e4, 0x0140, 0x7097, 0x001e, 0x0028, 0x7097, 0x001d, 0x0010,
+	0x7097, 0x0021, 0x0005, 0x080c, 0x6f77, 0x6124, 0xd1d4, 0x1150,
+	0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x7097, 0x001e, 0x0028, 0x7097,
+	0x001d, 0x0010, 0x7097, 0x001f, 0x0005, 0x0006, 0x2001, 0x0090,
+	0x080c, 0x2852, 0x000e, 0x6124, 0xd1d4, 0x1178, 0xd1cc, 0x1150,
+	0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x7097, 0x001e, 0x0040, 0x7097,
+	0x001d, 0x0028, 0x7097, 0x0020, 0x0010, 0x7097, 0x001f, 0x0005,
+	0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100, 0x2069,
+	0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x080c, 0x7096, 0x11f8,
+	0x2001, 0x180c, 0x200c, 0xd1b4, 0x01d0, 0xc1b4, 0x2102, 0x0026,
+	0x2011, 0x0200, 0x080c, 0x288c, 0x002e, 0x080c, 0x2838, 0x6024,
+	0xd0cc, 0x0148, 0x2001, 0x00a0, 0x080c, 0x2852, 0x080c, 0x7396,
+	0x080c, 0x5cd7, 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c,
+	0x70b0, 0x0150, 0x080c, 0x70a7, 0x1138, 0x2001, 0x0001, 0x080c,
+	0x23e2, 0x080c, 0x706a, 0x00a0, 0x080c, 0x6f74, 0x0178, 0x2001,
+	0x0001, 0x080c, 0x23e2, 0x7094, 0x9086, 0x001e, 0x0120, 0x7094,
+	0x9086, 0x0022, 0x1118, 0x7097, 0x0025, 0x0010, 0x7097, 0x0021,
+	0x012e, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011,
+	0x6eff, 0x080c, 0x823e, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064,
+	0x2011, 0x6eff, 0x080c, 0x8235, 0x002e, 0x001e, 0x0005, 0x00e6,
+	0x00f6, 0x0016, 0x080c, 0x8f9c, 0x2071, 0x1800, 0x080c, 0x6e98,
+	0x001e, 0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x0126, 0x080c, 0x8f9c, 0x2061, 0x0100,
+	0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x6028, 0xc09c,
+	0x602a, 0x080c, 0x98bb, 0x2011, 0x0003, 0x080c, 0x931c, 0x2011,
+	0x0002, 0x080c, 0x9326, 0x080c, 0x91e9, 0x080c, 0x81ea, 0x0036,
+	0x901e, 0x080c, 0x9269, 0x003e, 0x080c, 0x98d7, 0x60e3, 0x0000,
+	0x080c, 0xd60c, 0x080c, 0xd627, 0x2009, 0x0004, 0x080c, 0x283e,
+	0x080c, 0x2758, 0x2001, 0x1800, 0x2003, 0x0004, 0x2011, 0x0008,
+	0x080c, 0x288c, 0x2011, 0x6eff, 0x080c, 0x823e, 0x080c, 0x70b0,
+	0x0118, 0x9006, 0x080c, 0x2852, 0x080c, 0x0bab, 0x2001, 0x0001,
+	0x080c, 0x23e2, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x003e,
+	0x002e, 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x6f0c, 0x2071,
+	0x19d3, 0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110, 0x9085,
+	0x0001, 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005, 0x6800,
+	0x9084, 0xfffe, 0x9086, 0x00c0, 0x01b8, 0x2001, 0x00c0, 0x080c,
+	0x2852, 0x0156, 0x20a9, 0x002d, 0x1d04, 0x6f84, 0x2091, 0x6000,
+	0x1f04, 0x6f84, 0x015e, 0x00d6, 0x2069, 0x1800, 0x6898, 0x8001,
+	0x0220, 0x0118, 0x689a, 0x00de, 0x0005, 0x689b, 0x0014, 0x68e8,
+	0xd0dc, 0x0dc8, 0x6800, 0x9086, 0x0001, 0x1da8, 0x080c, 0x824a,
+	0x0c90, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140,
+	0x2071, 0x1800, 0x080c, 0x73a5, 0x2001, 0x193d, 0x2003, 0x0000,
+	0x9006, 0x7096, 0x60e2, 0x6886, 0x080c, 0x24b1, 0x9006, 0x080c,
+	0x2852, 0x080c, 0x5b92, 0x0026, 0x2011, 0xffff, 0x080c, 0x288c,
+	0x002e, 0x602b, 0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6,
+	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800,
+	0x2001, 0x194d, 0x200c, 0x9186, 0x0000, 0x0158, 0x9186, 0x0001,
+	0x0158, 0x9186, 0x0002, 0x0158, 0x9186, 0x0003, 0x0158, 0x0804,
+	0x705a, 0x7097, 0x0022, 0x0040, 0x7097, 0x0021, 0x0028, 0x7097,
+	0x0023, 0x0010, 0x7097, 0x0024, 0x60e3, 0x0000, 0x6887, 0x0001,
+	0x2001, 0x0001, 0x080c, 0x24b1, 0x080c, 0x98bb, 0x0026, 0x080c,
+	0x9b60, 0x002e, 0x080c, 0x98d7, 0x7000, 0x908e, 0x0004, 0x0118,
+	0x602b, 0x0028, 0x0010, 0x602b, 0x0020, 0x0156, 0x0126, 0x2091,
+	0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e, 0x015e,
+	0x080c, 0xbf61, 0x0118, 0x9006, 0x080c, 0x287c, 0x0804, 0x7066,
+	0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c, 0x2838, 0x6904,
+	0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c, 0x2852, 0x1f04, 0x700b,
+	0x080c, 0x70ed, 0x012e, 0x015e, 0x080c, 0x70a7, 0x0170, 0x6044,
+	0x9005, 0x0130, 0x080c, 0x70ed, 0x9006, 0x8001, 0x1df0, 0x0028,
+	0x6804, 0xd0d4, 0x1110, 0x080c, 0x70ed, 0x080c, 0xbf61, 0x0118,
+	0x9006, 0x080c, 0x287c, 0x0016, 0x0026, 0x7000, 0x908e, 0x0004,
+	0x0130, 0x2009, 0x00c8, 0x2011, 0x6f0c, 0x080c, 0x81fc, 0x002e,
+	0x001e, 0x080c, 0x804a, 0x7034, 0xc085, 0x7036, 0x2001, 0x194d,
+	0x2003, 0x0004, 0x080c, 0x6d61, 0x080c, 0x70a7, 0x0138, 0x6804,
+	0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, 0x739b, 0x00ee, 0x00de,
+	0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069,
+	0x0140, 0x2071, 0x1800, 0x080c, 0x8061, 0x080c, 0x8053, 0x080c,
+	0x73a5, 0x2001, 0x193d, 0x2003, 0x0000, 0x9006, 0x7096, 0x60e2,
+	0x6886, 0x080c, 0x24b1, 0x9006, 0x080c, 0x2852, 0x6043, 0x0090,
+	0x6043, 0x0010, 0x0026, 0x2011, 0xffff, 0x080c, 0x288c, 0x002e,
+	0x602b, 0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006, 0x2001,
+	0x194c, 0x2004, 0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c,
+	0x538c, 0x9084, 0x0030, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006,
+	0x080c, 0x538c, 0x9084, 0x0030, 0x9086, 0x0030, 0x000e, 0x0005,
+	0x0006, 0x080c, 0x538c, 0x9084, 0x0030, 0x9086, 0x0010, 0x000e,
+	0x0005, 0x0006, 0x080c, 0x538c, 0x9084, 0x0030, 0x9086, 0x0020,
+	0x000e, 0x0005, 0x0036, 0x0016, 0x2001, 0x180c, 0x2004, 0x908c,
+	0x0013, 0x0180, 0x0020, 0x080c, 0x24d1, 0x900e, 0x0028, 0x080c,
+	0x665e, 0x1dc8, 0x2009, 0x0002, 0x2019, 0x0028, 0x080c, 0x2fd3,
+	0x9006, 0x0019, 0x001e, 0x003e, 0x0005, 0x00e6, 0x2071, 0x180c,
+	0x2e04, 0x0130, 0x080c, 0xbf5a, 0x1128, 0x9085, 0x0010, 0x0010,
+	0x9084, 0xffef, 0x2072, 0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec,
+	0x0006, 0x600c, 0x0006, 0x6004, 0x0006, 0x6028, 0x0006, 0x602f,
+	0x0100, 0x602f, 0x0000, 0x602f, 0x0040, 0x602f, 0x0000, 0x20a9,
+	0x0002, 0x080c, 0x2819, 0x0026, 0x2011, 0x0040, 0x080c, 0x288c,
+	0x002e, 0x000e, 0x602a, 0x000e, 0x6006, 0x000e, 0x600e, 0x000e,
+	0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c,
+	0x24b1, 0x2001, 0x00a0, 0x0006, 0x080c, 0xbf61, 0x000e, 0x0130,
+	0x080c, 0x2870, 0x9006, 0x080c, 0x287c, 0x0010, 0x080c, 0x2852,
+	0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5, 0x6052, 0x00f6, 0x2079,
+	0x0100, 0x080c, 0x27c9, 0x00fe, 0x000e, 0x6052, 0x0005, 0x0156,
+	0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
+	0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x9919, 0x0158, 0x2001,
+	0x0386, 0x2004, 0xd0b4, 0x1130, 0x2001, 0x0016, 0x080c, 0x98ac,
+	0x0804, 0x71c9, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102, 0x6028,
+	0x9084, 0xe1ff, 0x602a, 0x2011, 0x0200, 0x080c, 0x288c, 0x2001,
+	0x0090, 0x080c, 0x2852, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1558,
+	0x1d04, 0x7165, 0x2091, 0x6000, 0x1f04, 0x7165, 0x080c, 0x98bb,
+	0x2011, 0x0003, 0x080c, 0x931c, 0x2011, 0x0002, 0x080c, 0x9326,
+	0x080c, 0x91e9, 0x901e, 0x080c, 0x9269, 0x2001, 0x0386, 0x2003,
+	0x7000, 0x080c, 0x98d7, 0x2001, 0x00a0, 0x080c, 0x2852, 0x080c,
+	0x7396, 0x080c, 0x5cd7, 0x080c, 0xbf61, 0x0110, 0x080c, 0x0cd1,
+	0x9085, 0x0001, 0x04e0, 0x2001, 0x0386, 0x2004, 0xd0ac, 0x0110,
+	0x080c, 0x1996, 0x60e3, 0x0000, 0x2001, 0x0002, 0x080c, 0x24b1,
+	0x60e2, 0x2001, 0x0080, 0x080c, 0x2852, 0x20a9, 0x0366, 0x2011,
+	0x1e00, 0x080c, 0x288c, 0x2009, 0x1e00, 0x080c, 0x2838, 0x6024,
+	0x910c, 0x0140, 0x1d04, 0x71a7, 0x2091, 0x6000, 0x1f04, 0x71a7,
+	0x0804, 0x716e, 0x2001, 0x0386, 0x2003, 0x7000, 0x6028, 0x9085,
+	0x1e00, 0x602a, 0x70b0, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008,
+	0x6886, 0x080c, 0xbf61, 0x0110, 0x080c, 0x0cd1, 0x9006, 0x00ee,
+	0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156,
+	0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
+	0x2071, 0x1800, 0x7000, 0x9086, 0x0003, 0x1168, 0x2001, 0x020b,
+	0x2004, 0x9084, 0x5540, 0x9086, 0x5540, 0x1128, 0x2069, 0x1a46,
+	0x2d04, 0x8000, 0x206a, 0x2069, 0x0140, 0x6020, 0x9084, 0x00c0,
+	0x0120, 0x6884, 0x9005, 0x1904, 0x7240, 0x2001, 0x0088, 0x080c,
+	0x2852, 0x9006, 0x60e2, 0x6886, 0x080c, 0x24b1, 0x2069, 0x0200,
+	0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x01d0, 0x6028, 0x9084,
+	0xfbff, 0x602a, 0x2011, 0x0400, 0x080c, 0x288c, 0x2069, 0x195f,
+	0x7000, 0x206a, 0x7097, 0x0026, 0x7003, 0x0001, 0x20a9, 0x0002,
+	0x1d04, 0x7220, 0x2091, 0x6000, 0x1f04, 0x7220, 0x0804, 0x7271,
+	0x2069, 0x0140, 0x20a9, 0x0384, 0x2011, 0x1e00, 0x080c, 0x288c,
+	0x2009, 0x1e00, 0x080c, 0x2838, 0x6024, 0x910c, 0x0528, 0x9084,
+	0x1a00, 0x1510, 0x1d04, 0x722c, 0x2091, 0x6000, 0x1f04, 0x722c,
+	0x080c, 0x98bb, 0x2011, 0x0003, 0x080c, 0x931c, 0x2011, 0x0002,
+	0x080c, 0x9326, 0x080c, 0x91e9, 0x901e, 0x080c, 0x9269, 0x080c,
+	0x98d7, 0x2001, 0x00a0, 0x080c, 0x2852, 0x080c, 0x7396, 0x080c,
+	0x5cd7, 0x9085, 0x0001, 0x00a8, 0x2001, 0x0080, 0x080c, 0x2852,
+	0x2069, 0x0140, 0x60e3, 0x0000, 0x70b0, 0x9005, 0x1118, 0x6887,
+	0x0001, 0x0008, 0x6886, 0x2001, 0x0002, 0x080c, 0x24b1, 0x60e2,
+	0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e,
+	0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6,
+	0x2061, 0x0100, 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0, 0x01e8,
+	0x080c, 0x98bb, 0x2011, 0x0003, 0x080c, 0x931c, 0x2011, 0x0002,
+	0x080c, 0x9326, 0x080c, 0x91e9, 0x901e, 0x080c, 0x9269, 0x080c,
+	0x98d7, 0x2069, 0x0140, 0x2001, 0x00a0, 0x080c, 0x2852, 0x080c,
+	0x7396, 0x080c, 0x5cd7, 0x0804, 0x7313, 0x2001, 0x180c, 0x200c,
+	0xd1b4, 0x1160, 0xc1b5, 0x2102, 0x080c, 0x6ef4, 0x2069, 0x0140,
+	0x2001, 0x0080, 0x080c, 0x2852, 0x60e3, 0x0000, 0x2069, 0x0200,
+	0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x0190, 0x6028, 0x9084,
+	0xfdff, 0x602a, 0x2011, 0x0200, 0x080c, 0x288c, 0x2069, 0x195f,
+	0x7000, 0x206a, 0x7097, 0x0027, 0x7003, 0x0001, 0x0804, 0x7313,
+	0x2011, 0x1e00, 0x080c, 0x288c, 0x2009, 0x1e00, 0x080c, 0x2838,
+	0x6024, 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04, 0x72d0,
+	0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x8092, 0x00ee,
+	0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0x19d3, 0x7018,
+	0x00ee, 0x9005, 0x19e8, 0x01f8, 0x0026, 0x2011, 0x6f0c, 0x080c,
+	0x8138, 0x2011, 0x6eff, 0x080c, 0x823e, 0x002e, 0x2069, 0x0140,
+	0x60e3, 0x0000, 0x70b0, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008,
+	0x6886, 0x2001, 0x0002, 0x080c, 0x24b1, 0x60e2, 0x2001, 0x180c,
+	0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e,
+	0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x0046,
+	0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x080c, 0xbf5a,
+	0x1904, 0x7380, 0x7130, 0xd184, 0x1170, 0x080c, 0x317a, 0x0138,
+	0xc18d, 0x7132, 0x2011, 0x1854, 0x2214, 0xd2ac, 0x1120, 0x7030,
+	0xd08c, 0x0904, 0x7380, 0x2011, 0x1854, 0x220c, 0x0438, 0x0016,
+	0x2019, 0x000e, 0x080c, 0xd1fc, 0x0156, 0x00b6, 0x20a9, 0x007f,
+	0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080, 0x0188, 0x080c,
+	0x626b, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009, 0x000e, 0x080c,
+	0xd284, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x83cd, 0x001e,
+	0x8108, 0x1f04, 0x7349, 0x00be, 0x015e, 0x001e, 0xd1ac, 0x1148,
+	0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x2fd3, 0x001e,
+	0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x626b,
+	0x1110, 0x080c, 0x5cf1, 0x8108, 0x1f04, 0x7376, 0x00be, 0x015e,
+	0x080c, 0x1996, 0x080c, 0x98bb, 0x080c, 0x9b60, 0x080c, 0x98d7,
+	0x60e3, 0x0000, 0x080c, 0x5cd7, 0x080c, 0x6fc7, 0x00ee, 0x00ce,
+	0x004e, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x194d,
+	0x2003, 0x0001, 0x0005, 0x2001, 0x194d, 0x2003, 0x0000, 0x0005,
+	0x2001, 0x194c, 0x2003, 0xaaaa, 0x0005, 0x2001, 0x194c, 0x2003,
+	0x0000, 0x0005, 0x2071, 0x18f0, 0x7003, 0x0000, 0x7007, 0x0000,
+	0x080c, 0x103b, 0x090c, 0x0d65, 0xa8ab, 0xdcb0, 0x2900, 0x704e,
+	0x080c, 0x103b, 0x090c, 0x0d65, 0xa8ab, 0xdcb0, 0x2900, 0x7052,
+	0xa867, 0x0000, 0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005, 0x00e6,
+	0x2071, 0x0040, 0x6848, 0x9005, 0x1118, 0x9085, 0x0001, 0x04b0,
+	0x6840, 0x9005, 0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002, 0x6854,
+	0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6850, 0x7002, 0x6854,
+	0x7006, 0x6858, 0x700a, 0x685c, 0x700e, 0x6840, 0x9005, 0x1110,
+	0x7012, 0x7016, 0x6848, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e,
+	0x2001, 0x0019, 0x7036, 0x702b, 0x0001, 0x2001, 0x0004, 0x200c,
+	0x918c, 0xfff7, 0x918d, 0x8000, 0x2102, 0x00d6, 0x2069, 0x18f0,
+	0x6807, 0x0001, 0x00de, 0x080c, 0x79a2, 0x9006, 0x00ee, 0x0005,
+	0x900e, 0x0156, 0x20a9, 0x0006, 0x8003, 0x818d, 0x1f04, 0x740c,
+	0x015e, 0x0005, 0x2079, 0x0040, 0x2071, 0x18f0, 0x7004, 0x0002,
+	0x7422, 0x7423, 0x746e, 0x74c9, 0x760a, 0x7420, 0x7420, 0x7634,
+	0x080c, 0x0d65, 0x0005, 0x2079, 0x0040, 0x2001, 0x1dc0, 0x2003,
+	0x0000, 0x782c, 0x908c, 0x0780, 0x190c, 0x7a2e, 0xd0a4, 0x0570,
+	0x2001, 0x1dc0, 0x2004, 0x9082, 0x0080, 0x1640, 0x1d04, 0x7440,
+	0x2001, 0x19d6, 0x200c, 0x8109, 0x0508, 0x2091, 0x6000, 0x2102,
+	0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff,
+	0x908a, 0x0040, 0x0608, 0x00b8, 0x2001, 0x1800, 0x200c, 0x9186,
+	0x0003, 0x1160, 0x7104, 0x9186, 0x0004, 0x0140, 0x9186, 0x0007,
+	0x0128, 0x9186, 0x0003, 0x1968, 0x080c, 0x74c9, 0x782c, 0xd09c,
+	0x090c, 0x79a2, 0x0005, 0x9082, 0x005a, 0x1218, 0x2100, 0x003b,
+	0x0c18, 0x080c, 0x74ff, 0x0c90, 0x00e3, 0x08f0, 0x0005, 0x74ff,
+	0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x7521,
+	0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff,
+	0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff,
+	0x74ff, 0x74ff, 0x74ff, 0x750b, 0x74ff, 0x7709, 0x74ff, 0x74ff,
+	0x74ff, 0x7521, 0x74ff, 0x750b, 0x774a, 0x778b, 0x77d2, 0x77e6,
+	0x74ff, 0x74ff, 0x7521, 0x750b, 0x74ff, 0x74ff, 0x75de, 0x7891,
+	0x78ac, 0x74ff, 0x7521, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x75d4,
+	0x78ac, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff,
+	0x74ff, 0x74ff, 0x7535, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff,
+	0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x79d2, 0x74ff, 0x74ff, 0x74ff,
+	0x74ff, 0x74ff, 0x7549, 0x74ff, 0x74ff, 0x74ff, 0x74ff, 0x74ff,
+	0x74ff, 0x2079, 0x0040, 0x7004, 0x9086, 0x0003, 0x1198, 0x782c,
+	0x080c, 0x79cb, 0xd0a4, 0x0170, 0x7824, 0x2048, 0x9006, 0xa802,
+	0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x001a, 0x1210, 0x002b,
+	0x0c50, 0x00e9, 0x080c, 0x79a2, 0x0005, 0x74ff, 0x750b, 0x76f5,
+	0x74ff, 0x750b, 0x74ff, 0x750b, 0x750b, 0x74ff, 0x750b, 0x76f5,
+	0x750b, 0x750b, 0x750b, 0x750b, 0x750b, 0x74ff, 0x750b, 0x76f5,
+	0x74ff, 0x74ff, 0x750b, 0x74ff, 0x74ff, 0x74ff, 0x750b, 0x00e6,
+	0x2071, 0x18f0, 0x2009, 0x0400, 0x0071, 0x00ee, 0x0005, 0x2009,
+	0x1000, 0x0049, 0x0005, 0x2009, 0x2000, 0x0029, 0x0005, 0x2009,
+	0x0800, 0x0009, 0x0005, 0x7007, 0x0001, 0xa868, 0x9084, 0x00ff,
+	0x9105, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6991, 0x012e,
+	0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0d08, 0x8001, 0x1120,
+	0x7007, 0x0001, 0x0804, 0x76b3, 0x7007, 0x0003, 0x7012, 0x2900,
+	0x7016, 0x701a, 0x704b, 0x76b3, 0x0005, 0xa864, 0x8007, 0x9084,
+	0x00ff, 0x0968, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x76ce,
+	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x76ce,
+	0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904,
+	0x7507, 0x7007, 0x0001, 0x2009, 0x1833, 0x210c, 0x81ff, 0x1904,
+	0x75ab, 0xa994, 0x9186, 0x006f, 0x0188, 0x9186, 0x0074, 0x15b0,
+	0x0026, 0x2011, 0x0010, 0x080c, 0x668a, 0x002e, 0x0578, 0x0016,
+	0xa998, 0x080c, 0x66d4, 0x001e, 0x1548, 0x0400, 0x080c, 0x7096,
+	0x0140, 0xa897, 0x4005, 0xa89b, 0x0016, 0x2001, 0x0030, 0x900e,
+	0x0438, 0x0026, 0x2011, 0x8008, 0x080c, 0x668a, 0x002e, 0x01b0,
+	0x0016, 0x0026, 0x0036, 0xa998, 0xaaa0, 0xab9c, 0x918d, 0x8000,
+	0x080c, 0x66d4, 0x003e, 0x002e, 0x001e, 0x1140, 0xa897, 0x4005,
+	0xa89b, 0x4009, 0x2001, 0x0030, 0x900e, 0x0050, 0xa868, 0x9084,
+	0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c, 0x5f02, 0x1108, 0x0005,
+	0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0xa87a, 0xa982, 0x080c,
+	0x6991, 0x012e, 0x0ca0, 0xa994, 0x9186, 0x0071, 0x0904, 0x7559,
+	0x9186, 0x0064, 0x0904, 0x7559, 0x9186, 0x007c, 0x0904, 0x7559,
+	0x9186, 0x0028, 0x0904, 0x7559, 0x9186, 0x0038, 0x0904, 0x7559,
+	0x9186, 0x0078, 0x0904, 0x7559, 0x9186, 0x005f, 0x0904, 0x7559,
+	0x9186, 0x0056, 0x0904, 0x7559, 0xa897, 0x4005, 0xa89b, 0x0001,
+	0x2001, 0x0030, 0x900e, 0x0860, 0xa87c, 0x9084, 0x00c0, 0x9086,
+	0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x78c3, 0x2900, 0x7016,
+	0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0030,
+	0x2098, 0x7050, 0x2040, 0xa060, 0x20e8, 0xa05c, 0x9080, 0x0023,
+	0x20a0, 0x4003, 0xa888, 0x7012, 0x9082, 0x0401, 0x1a04, 0x750f,
+	0xaab4, 0x928a, 0x0002, 0x1a04, 0x750f, 0x82ff, 0x1138, 0xa8b8,
+	0xa9bc, 0x9105, 0x0118, 0x2001, 0x7671, 0x0018, 0x9280, 0x7667,
+	0x2005, 0x7056, 0x7010, 0x9015, 0x0904, 0x7652, 0x080c, 0x103b,
+	0x1118, 0x7007, 0x0004, 0x0005, 0x2900, 0x7022, 0x7054, 0x2060,
+	0xe000, 0xa866, 0x7050, 0x2040, 0xa95c, 0xe004, 0x9100, 0xa076,
+	0xa860, 0xa072, 0xe008, 0x920a, 0x1210, 0x900e, 0x2200, 0x7112,
+	0xe20c, 0x8003, 0x800b, 0x9296, 0x0004, 0x0108, 0x9108, 0xa17a,
+	0x810b, 0xa17e, 0x080c, 0x1117, 0xa06c, 0x908e, 0x0100, 0x0170,
+	0x9086, 0x0200, 0x0118, 0x7007, 0x0007, 0x0005, 0x7020, 0x2048,
+	0x080c, 0x1054, 0x7014, 0x2048, 0x0804, 0x750f, 0x7020, 0x2048,
+	0x7018, 0xa802, 0xa807, 0x0000, 0x2908, 0x2048, 0xa906, 0x711a,
+	0x0804, 0x760a, 0x7014, 0x2048, 0x7007, 0x0001, 0xa8b4, 0x9005,
+	0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108, 0x00b9, 0xa864, 0x9084,
+	0x00ff, 0x9086, 0x001e, 0x0904, 0x78c3, 0x0804, 0x76b3, 0x7669,
+	0x766d, 0x0002, 0x001d, 0x0007, 0x0004, 0x000a, 0x001b, 0x0005,
+	0x0006, 0x000a, 0x001d, 0x0005, 0x0004, 0x0076, 0x0066, 0xafb8,
+	0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2, 0xb0bc, 0xb0de, 0xb0b8,
+	0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6, 0xb0b0, 0xb0ca, 0xb0ac,
+	0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2, 0xb7be, 0xb0a0,
+	0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2, 0xb094, 0xb09e, 0xb6aa,
+	0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096, 0xb088, 0xb08a, 0xb084,
+	0xb086, 0xb692, 0xb78e, 0xb080, 0xb082, 0xb07c, 0xb07e, 0xb078,
+	0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776, 0xb004, 0x9055, 0x1958,
+	0x006e, 0x007e, 0x0005, 0x2009, 0x1833, 0x210c, 0x81ff, 0x1178,
+	0x080c, 0x5d51, 0x1108, 0x0005, 0x080c, 0x6ba2, 0x0126, 0x2091,
+	0x8000, 0x080c, 0xbb45, 0x080c, 0x6991, 0x012e, 0x0ca0, 0x080c,
+	0xbf5a, 0x1d70, 0x2001, 0x0028, 0x900e, 0x0c70, 0x2009, 0x1833,
+	0x210c, 0x81ff, 0x11d8, 0xa888, 0x9005, 0x01e0, 0xa883, 0x0000,
+	0xa87c, 0xd0f4, 0x0120, 0x080c, 0x5e64, 0x1138, 0x0005, 0x9006,
+	0xa87a, 0x080c, 0x5ddf, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000,
+	0xa87a, 0xa982, 0x080c, 0x6991, 0x012e, 0x0cb0, 0x2001, 0x0028,
+	0x900e, 0x0c98, 0x2001, 0x0000, 0x0c80, 0x7018, 0xa802, 0x2908,
+	0x2048, 0xa906, 0x711a, 0x7010, 0x8001, 0x7012, 0x0118, 0x7007,
+	0x0003, 0x0030, 0x7014, 0x2048, 0x7007, 0x0001, 0x7048, 0x080f,
+	0x0005, 0x00b6, 0x7007, 0x0001, 0xa974, 0xa878, 0x9084, 0x00ff,
+	0x9096, 0x0004, 0x0540, 0x20a9, 0x0001, 0x9096, 0x0001, 0x0190,
+	0x900e, 0x20a9, 0x0800, 0x9096, 0x0002, 0x0160, 0x9005, 0x11d8,
+	0xa974, 0x080c, 0x626b, 0x11b8, 0x0066, 0xae80, 0x080c, 0x637b,
+	0x006e, 0x0088, 0x0046, 0x2011, 0x180c, 0x2224, 0xc484, 0x2412,
+	0x004e, 0x00c6, 0x080c, 0x626b, 0x1110, 0x080c, 0x654e, 0x8108,
+	0x1f04, 0x7732, 0x00ce, 0xa87c, 0xd084, 0x1120, 0x080c, 0x1054,
+	0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x6991, 0x012e,
+	0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c,
+	0x6662, 0x0580, 0x2061, 0x1a3e, 0x6100, 0xd184, 0x0178, 0xa888,
+	0x9084, 0x00ff, 0x1550, 0x6000, 0xd084, 0x0520, 0x6004, 0x9005,
+	0x1538, 0x6003, 0x0000, 0x600b, 0x0000, 0x00c8, 0x2011, 0x0001,
+	0xa890, 0x9005, 0x1110, 0x2001, 0x001e, 0x8000, 0x6016, 0xa888,
+	0x9084, 0x00ff, 0x0178, 0x6006, 0xa888, 0x8007, 0x9084, 0x00ff,
+	0x0148, 0x600a, 0xa888, 0x8000, 0x1108, 0xc28d, 0x6202, 0x012e,
+	0x0804, 0x798c, 0x012e, 0x0804, 0x7986, 0x012e, 0x0804, 0x7980,
+	0x012e, 0x0804, 0x7983, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001,
+	0x080c, 0x6662, 0x05e0, 0x2061, 0x1a3e, 0x6000, 0xd084, 0x05b8,
+	0x6204, 0x6308, 0xd08c, 0x1530, 0xac78, 0x9484, 0x0003, 0x0170,
+	0xa988, 0x918c, 0x00ff, 0x8001, 0x1120, 0x2100, 0x9210, 0x0620,
+	0x0028, 0x8001, 0x1508, 0x2100, 0x9212, 0x02f0, 0x9484, 0x000c,
+	0x0188, 0xa988, 0x810f, 0x918c, 0x00ff, 0x9082, 0x0004, 0x1120,
+	0x2100, 0x9318, 0x0288, 0x0030, 0x9082, 0x0004, 0x1168, 0x2100,
+	0x931a, 0x0250, 0xa890, 0x9005, 0x0110, 0x8000, 0x6016, 0x6206,
+	0x630a, 0x012e, 0x0804, 0x798c, 0x012e, 0x0804, 0x7989, 0x012e,
+	0x0804, 0x7986, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x2061,
+	0x1a3e, 0x6300, 0xd38c, 0x1120, 0x6308, 0x8318, 0x0220, 0x630a,
+	0x012e, 0x0804, 0x799a, 0x012e, 0x0804, 0x7989, 0x00b6, 0x0126,
+	0x00c6, 0x2091, 0x8000, 0x7007, 0x0001, 0xa87c, 0xd0ac, 0x0148,
+	0x00c6, 0x2061, 0x1a3e, 0x6000, 0x9084, 0xfcff, 0x6002, 0x00ce,
+	0x0440, 0xa888, 0x9005, 0x05d8, 0xa88c, 0x9065, 0x0598, 0x2001,
+	0x1833, 0x2004, 0x9005, 0x0118, 0x080c, 0x9c14, 0x0068, 0x6017,
+	0xf400, 0x6063, 0x0000, 0xa97c, 0xd1a4, 0x0110, 0xa980, 0x6162,
+	0x2009, 0x0041, 0x080c, 0x9c76, 0xa988, 0x918c, 0xff00, 0x9186,
+	0x2000, 0x1138, 0x0026, 0x900e, 0x2011, 0xfdff, 0x080c, 0x83cd,
+	0x002e, 0xa87c, 0xd0c4, 0x0148, 0x2061, 0x1a3e, 0x6000, 0xd08c,
+	0x1120, 0x6008, 0x8000, 0x0208, 0x600a, 0x00ce, 0x012e, 0x00be,
+	0x0804, 0x798c, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7986, 0xa984,
+	0x9186, 0x002e, 0x0d30, 0x9186, 0x002d, 0x0d18, 0x9186, 0x0045,
+	0x0510, 0x9186, 0x002a, 0x1130, 0x2001, 0x180c, 0x200c, 0xc194,
+	0x2102, 0x08b8, 0x9186, 0x0020, 0x0158, 0x9186, 0x0029, 0x1d10,
+	0xa974, 0x080c, 0x626b, 0x1968, 0xb800, 0xc0e4, 0xb802, 0x0848,
+	0xa88c, 0x9065, 0x09b8, 0x6007, 0x0024, 0x2001, 0x1956, 0x2004,
+	0x601a, 0x0804, 0x7821, 0xa88c, 0x9065, 0x0960, 0x00e6, 0xa890,
+	0x9075, 0x2001, 0x1833, 0x2004, 0x9005, 0x0150, 0x080c, 0x9c14,
+	0x8eff, 0x0118, 0x2e60, 0x080c, 0x9c14, 0x00ee, 0x0804, 0x7821,
+	0x6024, 0xc0dc, 0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a, 0xa8a0,
+	0x9005, 0x0130, 0x6007, 0x003b, 0xa8a4, 0x602e, 0xa8a8, 0x6016,
+	0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84b3, 0x00ee, 0x0804,
+	0x7821, 0x2061, 0x1a3e, 0x6000, 0xd084, 0x0190, 0xd08c, 0x1904,
+	0x799a, 0x0126, 0x2091, 0x8000, 0x6204, 0x8210, 0x0220, 0x6206,
+	0x012e, 0x0804, 0x799a, 0x012e, 0xa883, 0x0016, 0x0804, 0x7993,
+	0xa883, 0x0007, 0x0804, 0x7993, 0xa864, 0x8007, 0x9084, 0x00ff,
+	0x0130, 0x8001, 0x1138, 0x7007, 0x0001, 0x0069, 0x0005, 0x080c,
+	0x7507, 0x0040, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a,
+	0x704b, 0x78c3, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000,
+	0x903e, 0x2061, 0x1800, 0x61cc, 0x81ff, 0x1904, 0x7945, 0x6130,
+	0xd194, 0x1904, 0x796f, 0xa878, 0x2070, 0x9e82, 0x1ddc, 0x0a04,
+	0x7939, 0x6064, 0x9e02, 0x1a04, 0x7939, 0x7120, 0x9186, 0x0006,
+	0x1904, 0x792b, 0x7010, 0x905d, 0x0904, 0x7945, 0xb800, 0xd0e4,
+	0x1904, 0x7969, 0x2061, 0x1a3e, 0x6100, 0x9184, 0x0301, 0x9086,
+	0x0001, 0x15a0, 0x7024, 0xd0dc, 0x1904, 0x7972, 0xa883, 0x0000,
+	0xa803, 0x0000, 0x2908, 0x7014, 0x9005, 0x1198, 0x7116, 0xa87c,
+	0xd0f4, 0x1904, 0x7975, 0x080c, 0x5388, 0xd09c, 0x1118, 0xa87c,
+	0xc0cc, 0xa87e, 0x2e60, 0x080c, 0x82bd, 0x012e, 0x00ee, 0x00be,
+	0x0005, 0x2048, 0xa800, 0x9005, 0x1de0, 0xa902, 0x2148, 0xa87c,
+	0xd0f4, 0x1904, 0x7975, 0x012e, 0x00ee, 0x00be, 0x0005, 0x012e,
+	0x00ee, 0xa883, 0x0006, 0x00be, 0x0804, 0x7993, 0xd184, 0x0db8,
+	0xd1c4, 0x1190, 0x00a0, 0xa974, 0x080c, 0x626b, 0x15d0, 0xb800,
+	0xd0e4, 0x15b8, 0x7120, 0x9186, 0x0007, 0x1118, 0xa883, 0x0002,
+	0x0490, 0xa883, 0x0008, 0x0478, 0xa883, 0x000e, 0x0460, 0xa883,
+	0x0017, 0x0448, 0xa883, 0x0035, 0x0430, 0x080c, 0x538c, 0xd0fc,
+	0x01e8, 0xa878, 0x2070, 0x9e82, 0x1ddc, 0x02c0, 0x6064, 0x9e02,
+	0x12a8, 0x7120, 0x9186, 0x0006, 0x1188, 0x7010, 0x905d, 0x0170,
+	0xb800, 0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000, 0x9086, 0x0007,
+	0x1904, 0x78cf, 0x7003, 0x0002, 0x0804, 0x78cf, 0xa883, 0x0028,
+	0x0010, 0xa883, 0x0029, 0x012e, 0x00ee, 0x00be, 0x0420, 0xa883,
+	0x002a, 0x0cc8, 0xa883, 0x0045, 0x0cb0, 0x2e60, 0x2019, 0x0002,
+	0x601b, 0x0014, 0x080c, 0xce09, 0x012e, 0x00ee, 0x00be, 0x0005,
+	0x2009, 0x003e, 0x0058, 0x2009, 0x0004, 0x0040, 0x2009, 0x0006,
+	0x0028, 0x2009, 0x0016, 0x0010, 0x2009, 0x0001, 0xa884, 0x9084,
+	0xff00, 0x9105, 0xa886, 0x0126, 0x2091, 0x8000, 0x080c, 0x6991,
+	0x012e, 0x0005, 0x080c, 0x1054, 0x0005, 0x00d6, 0x080c, 0x82b4,
+	0x00de, 0x0005, 0x00d6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x0040, 0x702c, 0xd084, 0x01d8, 0x908c, 0x0780, 0x190c, 0x7a2e,
+	0xd09c, 0x11a8, 0x2071, 0x1800, 0x70bc, 0x90ea, 0x0040, 0x0278,
+	0x8001, 0x70be, 0x702c, 0x2048, 0xa800, 0x702e, 0x9006, 0xa802,
+	0xa806, 0x2071, 0x0040, 0x2900, 0x7022, 0x702c, 0x0c28, 0x012e,
+	0x00ee, 0x00de, 0x0005, 0x0006, 0x9084, 0x0780, 0x190c, 0x7a2e,
+	0x000e, 0x0005, 0x00d6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6,
+	0x7007, 0x0001, 0xaa74, 0x9282, 0x0004, 0x1a04, 0x7a1f, 0xa97c,
+	0x9188, 0x1000, 0x2104, 0x905d, 0xb804, 0xd284, 0x0140, 0x05e8,
+	0x8007, 0x9084, 0x00ff, 0x9084, 0x0006, 0x1108, 0x04b0, 0x2b10,
+	0x080c, 0x9b84, 0x1118, 0x080c, 0x9c49, 0x05a8, 0x6212, 0xa874,
+	0x0002, 0x79fd, 0x7a02, 0x7a05, 0x7a0b, 0x2019, 0x0002, 0x080c,
+	0xd1fc, 0x0060, 0x080c, 0xd18c, 0x0048, 0x2019, 0x0002, 0xa980,
+	0x080c, 0xd1ab, 0x0018, 0xa980, 0x080c, 0xd18c, 0x080c, 0x9bda,
+	0xa887, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x6991, 0x012e,
+	0x00be, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00de, 0x0005, 0xa887,
+	0x0006, 0x0c80, 0xa887, 0x0002, 0x0c68, 0xa887, 0x0005, 0x0c50,
+	0xa887, 0x0004, 0x0c38, 0xa887, 0x0007, 0x0c20, 0x2091, 0x8000,
+	0x0e04, 0x7a30, 0x0006, 0x0016, 0x2001, 0x8003, 0x0006, 0x0804,
+	0x0d6e, 0x2001, 0x1833, 0x2004, 0x9005, 0x0005, 0x0005, 0x00f6,
+	0x2079, 0x0300, 0x2001, 0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102,
+	0x2009, 0x0218, 0x210c, 0xd1ec, 0x1120, 0x080c, 0x153a, 0x00fe,
+	0x0005, 0x2001, 0x020d, 0x2003, 0x0020, 0x781f, 0x0300, 0x00fe,
+	0x0005, 0x781c, 0xd08c, 0x0904, 0x7ab1, 0x68bc, 0x90aa, 0x0005,
+	0x0a04, 0x804a, 0x7d44, 0x7c40, 0xd59c, 0x190c, 0x0d65, 0x9584,
+	0x00f6, 0x1508, 0x9484, 0x7000, 0x0138, 0x908a, 0x2000, 0x1258,
+	0x9584, 0x0700, 0x8007, 0x04f0, 0x7000, 0x9084, 0xff00, 0x9086,
+	0x8100, 0x0db0, 0x00b0, 0x9484, 0x0fff, 0x1130, 0x7000, 0x9084,
+	0xff00, 0x9086, 0x8100, 0x11c0, 0x080c, 0xd5e4, 0x080c, 0x7f91,
+	0x7817, 0x0140, 0x00a8, 0x9584, 0x0076, 0x1118, 0x080c, 0x7fed,
+	0x19c8, 0xd5a4, 0x0148, 0x0046, 0x0056, 0x080c, 0x7b01, 0x080c,
+	0x1fc8, 0x005e, 0x004e, 0x0020, 0x080c, 0xd5e4, 0x7817, 0x0140,
+	0x080c, 0x7096, 0x0168, 0x2001, 0x0111, 0x2004, 0xd08c, 0x0140,
+	0x688f, 0x0000, 0x2001, 0x0110, 0x2003, 0x0008, 0x2003, 0x0000,
+	0x0489, 0x0005, 0x0002, 0x7abe, 0x7db3, 0x7abb, 0x7abb, 0x7abb,
+	0x7abb, 0x7abb, 0x7abb, 0x7817, 0x0140, 0x0005, 0x7000, 0x908c,
+	0xff00, 0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x688e, 0x9286,
+	0x2000, 0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x53e9,
+	0x0070, 0x080c, 0x7b21, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c,
+	0x7cf0, 0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x7ec7, 0x7817,
+	0x0140, 0x0005, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0178, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011,
+	0x8048, 0x2518, 0x080c, 0x48da, 0x003e, 0x002e, 0x0005, 0x0036,
+	0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30,
+	0x0050, 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44,
+	0x7c40, 0x2019, 0xffff, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0160,
+	0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1130, 0x0026, 0x2011,
+	0x8048, 0x080c, 0x48da, 0x002e, 0x00fe, 0x005e, 0x004e, 0x003e,
+	0x0005, 0x00b6, 0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, 0x9096,
+	0x0001, 0x0120, 0x9096, 0x0023, 0x1904, 0x7cc1, 0x9186, 0x0023,
+	0x15c0, 0x080c, 0x7f5c, 0x0904, 0x7cc1, 0x6120, 0x9186, 0x0001,
+	0x0150, 0x9186, 0x0004, 0x0138, 0x9186, 0x0008, 0x0120, 0x9186,
+	0x000a, 0x1904, 0x7cc1, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200,
+	0x1130, 0x2009, 0x0015, 0x080c, 0x9c76, 0x0804, 0x7cc1, 0x908e,
+	0x0214, 0x0118, 0x908e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c,
+	0x9c76, 0x0804, 0x7cc1, 0x908e, 0x0100, 0x1904, 0x7cc1, 0x7034,
+	0x9005, 0x1904, 0x7cc1, 0x2009, 0x0016, 0x080c, 0x9c76, 0x0804,
+	0x7cc1, 0x9186, 0x0022, 0x1904, 0x7cc1, 0x7030, 0x908e, 0x0300,
+	0x1580, 0x68d8, 0xd0a4, 0x0528, 0xc0b5, 0x68da, 0x7100, 0x918c,
+	0x00ff, 0x697a, 0x7004, 0x687e, 0x00f6, 0x2079, 0x0100, 0x79e6,
+	0x78ea, 0x0006, 0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x2486,
+	0x7932, 0x7936, 0x001e, 0x000e, 0x00fe, 0x080c, 0x243d, 0x695a,
+	0x703c, 0x00e6, 0x2071, 0x0140, 0x7086, 0x2071, 0x1800, 0x70b2,
+	0x00ee, 0x7034, 0x9005, 0x1904, 0x7cc1, 0x2009, 0x0017, 0x0804,
+	0x7c71, 0x908e, 0x0400, 0x1190, 0x7034, 0x9005, 0x1904, 0x7cc1,
+	0x080c, 0x7096, 0x0120, 0x2009, 0x001d, 0x0804, 0x7c71, 0x68d8,
+	0xc0a5, 0x68da, 0x2009, 0x0030, 0x0804, 0x7c71, 0x908e, 0x0500,
+	0x1140, 0x7034, 0x9005, 0x1904, 0x7cc1, 0x2009, 0x0018, 0x0804,
+	0x7c71, 0x908e, 0x2010, 0x1120, 0x2009, 0x0019, 0x0804, 0x7c71,
+	0x908e, 0x2110, 0x1120, 0x2009, 0x001a, 0x0804, 0x7c71, 0x908e,
+	0x5200, 0x1140, 0x7034, 0x9005, 0x1904, 0x7cc1, 0x2009, 0x001b,
+	0x0804, 0x7c71, 0x908e, 0x5000, 0x1140, 0x7034, 0x9005, 0x1904,
+	0x7cc1, 0x2009, 0x001c, 0x0804, 0x7c71, 0x908e, 0x1300, 0x1120,
+	0x2009, 0x0034, 0x0804, 0x7c71, 0x908e, 0x1200, 0x1140, 0x7034,
+	0x9005, 0x1904, 0x7cc1, 0x2009, 0x0024, 0x0804, 0x7c71, 0x908c,
+	0xff00, 0x918e, 0x2400, 0x1170, 0x2009, 0x002d, 0x2001, 0x1810,
+	0x2004, 0xd09c, 0x0904, 0x7c71, 0x080c, 0xc63d, 0x1904, 0x7cc1,
+	0x0804, 0x7c6f, 0x908c, 0xff00, 0x918e, 0x5300, 0x1120, 0x2009,
+	0x002a, 0x0804, 0x7c71, 0x908e, 0x0f00, 0x1120, 0x2009, 0x0020,
+	0x0804, 0x7c71, 0x908e, 0x6104, 0x1528, 0x2029, 0x0205, 0x2011,
+	0x026d, 0x8208, 0x2204, 0x9082, 0x0004, 0x8004, 0x8004, 0x20a8,
+	0x2011, 0x8015, 0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x48da,
+	0x004e, 0x8108, 0x0f04, 0x7c3d, 0x9186, 0x0280, 0x1d88, 0x2504,
+	0x8000, 0x202a, 0x2009, 0x0260, 0x0c58, 0x202b, 0x0000, 0x2009,
+	0x0023, 0x0478, 0x908e, 0x6000, 0x1118, 0x2009, 0x003f, 0x0448,
+	0x908e, 0x7800, 0x1118, 0x2009, 0x0045, 0x0418, 0x908e, 0x1000,
+	0x1118, 0x2009, 0x004e, 0x00e8, 0x908e, 0x6300, 0x1118, 0x2009,
+	0x004a, 0x00b8, 0x908c, 0xff00, 0x918e, 0x5600, 0x1118, 0x2009,
+	0x004f, 0x0078, 0x908c, 0xff00, 0x918e, 0x5700, 0x1118, 0x2009,
+	0x0050, 0x0038, 0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009,
+	0x004c, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c,
+	0x243d, 0x1904, 0x7cc4, 0x080c, 0x620b, 0x1904, 0x7cc4, 0xbe12,
+	0xbd16, 0x001e, 0x0016, 0x080c, 0x7096, 0x01c0, 0x68d8, 0xd08c,
+	0x1148, 0x7000, 0x9084, 0x00ff, 0x1188, 0x7004, 0x9084, 0xff00,
+	0x1168, 0x0040, 0x6878, 0x9606, 0x1148, 0x687c, 0x9506, 0x9084,
+	0xff00, 0x1120, 0x9584, 0x00ff, 0xb886, 0x0080, 0xb884, 0x9005,
+	0x1168, 0x9186, 0x0046, 0x1150, 0x6878, 0x9606, 0x1138, 0x687c,
+	0x9506, 0x9084, 0xff00, 0x1110, 0x001e, 0x0098, 0x080c, 0x9b84,
+	0x01a8, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e,
+	0x9186, 0x004c, 0x1110, 0x6023, 0x000a, 0x0016, 0x001e, 0x080c,
+	0x9c76, 0x00ce, 0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e,
+	0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48da, 0x080c,
+	0x9c49, 0x0d90, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a,
+	0x001e, 0x0016, 0x9186, 0x0017, 0x0118, 0x9186, 0x0030, 0x1128,
+	0x6007, 0x0009, 0x6017, 0x2900, 0x0020, 0x6007, 0x0051, 0x6017,
+	0x0000, 0x602f, 0x0009, 0x6003, 0x0001, 0x080c, 0x84ba, 0x08a0,
+	0x080c, 0x3144, 0x1140, 0x7010, 0x9084, 0xff00, 0x8007, 0x908e,
+	0x0008, 0x1108, 0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000,
+	0x908c, 0xff00, 0x810f, 0x9186, 0x0033, 0x11e8, 0x080c, 0x7f5c,
+	0x0904, 0x7d4b, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1140,
+	0x7034, 0x9005, 0x15c0, 0x2009, 0x0015, 0x080c, 0x9c76, 0x0498,
+	0x908e, 0x0100, 0x1580, 0x7034, 0x9005, 0x1568, 0x2009, 0x0016,
+	0x080c, 0x9c76, 0x0440, 0x9186, 0x0032, 0x1528, 0x7030, 0x908e,
+	0x1400, 0x1508, 0x2009, 0x0038, 0x0016, 0x2011, 0x0263, 0x2204,
+	0x8211, 0x220c, 0x080c, 0x243d, 0x11a8, 0x080c, 0x620b, 0x1190,
+	0xbe12, 0xbd16, 0x080c, 0x9b84, 0x0168, 0x2b08, 0x6112, 0x080c,
+	0xbcdb, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0x9c76,
+	0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6,
+	0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8,
+	0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f,
+	0x0804, 0x7dad, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804,
+	0x7dad, 0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011,
+	0x0000, 0x2019, 0x1836, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9,
+	0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f,
+	0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0,
+	0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600,
+	0x9706, 0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745,
+	0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6,
+	0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04, 0x7d82, 0x82ff, 0x1118,
+	0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee,
+	0x004e, 0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184,
+	0x000f, 0x0002, 0x7dca, 0x7dca, 0x7dca, 0x7f6e, 0x7dca, 0x7dcd,
+	0x7df2, 0x7e7b, 0x7dca, 0x7dca, 0x7dca, 0x7dca, 0x7dca, 0x7dca,
+	0x7dca, 0x7dca, 0x7817, 0x0140, 0x0005, 0x00b6, 0x7110, 0xd1bc,
+	0x01e8, 0x7120, 0x2160, 0x9c8c, 0x0003, 0x11c0, 0x9c8a, 0x1ddc,
+	0x02a8, 0x6864, 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110,
+	0x2158, 0xb910, 0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130,
+	0x7124, 0x610a, 0x2009, 0x0046, 0x080c, 0x9c76, 0x7817, 0x0140,
+	0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484, 0x0fff, 0x0904, 0x7e57,
+	0x7110, 0xd1bc, 0x1904, 0x7e57, 0x7108, 0x700c, 0x2028, 0x918c,
+	0x00ff, 0x2130, 0x9094, 0xff00, 0x15c8, 0x81ff, 0x15b8, 0x9080,
+	0x317f, 0x200d, 0x918c, 0xff00, 0x810f, 0x2001, 0x0080, 0x9106,
+	0x0904, 0x7e57, 0x9182, 0x0801, 0x1a04, 0x7e57, 0x9190, 0x1000,
+	0x2204, 0x905d, 0x05e0, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15b8,
+	0xba04, 0x9294, 0xff00, 0x9286, 0x0600, 0x1190, 0x080c, 0x9b84,
+	0x0598, 0x2b08, 0x7028, 0x6052, 0x702c, 0x604e, 0x6112, 0x6023,
+	0x0006, 0x7120, 0x610a, 0x7130, 0x615e, 0x080c, 0xc8a3, 0x00f8,
+	0x080c, 0x6666, 0x1138, 0xb807, 0x0606, 0x0c40, 0x190c, 0x7d4f,
+	0x11b0, 0x0880, 0x080c, 0x9b84, 0x2b08, 0x0188, 0x6112, 0x6023,
+	0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007, 0x0005,
+	0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x84ba, 0x7817,
+	0x0140, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0ec,
+	0x0120, 0x2011, 0x8049, 0x080c, 0x48da, 0x080c, 0x9c49, 0x0d78,
+	0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x615e,
+	0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022,
+	0x080c, 0x84b3, 0x08e0, 0x00b6, 0x7110, 0xd1bc, 0x05d0, 0x7020,
+	0x2060, 0x9c84, 0x0003, 0x15a8, 0x9c82, 0x1ddc, 0x0690, 0x6864,
+	0x9c02, 0x1678, 0x9484, 0x0fff, 0x9082, 0x000c, 0x0650, 0x7008,
+	0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1510, 0x700c,
+	0xb914, 0x9106, 0x11f0, 0x7124, 0x610a, 0x601c, 0xd0fc, 0x11c8,
+	0x2001, 0x0271, 0x2004, 0x9005, 0x1180, 0x9484, 0x0fff, 0x9082,
+	0x000c, 0x0158, 0x0066, 0x2031, 0x0100, 0xa001, 0xa001, 0x8631,
+	0x1de0, 0x006e, 0x601c, 0xd0fc, 0x1120, 0x2009, 0x0045, 0x080c,
+	0x9c76, 0x7817, 0x0140, 0x00be, 0x0005, 0x6120, 0x9186, 0x0002,
+	0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001, 0x0005, 0x080c,
+	0x3144, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086, 0x0000,
+	0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b, 0x0005,
+	0x7ede, 0x7edf, 0x7ede, 0x7ede, 0x7f3e, 0x7f4d, 0x0005, 0x00b6,
+	0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904, 0x7f3c, 0x700c,
+	0x7108, 0x080c, 0x243d, 0x1904, 0x7f3c, 0x080c, 0x620b, 0x1904,
+	0x7f3c, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8, 0x080c, 0x6666,
+	0x0118, 0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, 0x7f5c, 0x00ce,
+	0x05d8, 0x080c, 0x9b84, 0x2b08, 0x05b8, 0x6112, 0x080c, 0xbcdb,
+	0x6023, 0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0x9c76,
+	0x0458, 0x080c, 0x6666, 0x0148, 0x9086, 0x0004, 0x0130, 0x080c,
+	0x666e, 0x0118, 0x9086, 0x0004, 0x1180, 0x080c, 0x9b84, 0x2b08,
+	0x01d8, 0x6112, 0x080c, 0xbcdb, 0x6023, 0x0005, 0x7120, 0x610a,
+	0x2009, 0x0088, 0x080c, 0x9c76, 0x0078, 0x080c, 0x9b84, 0x2b08,
+	0x0158, 0x6112, 0x080c, 0xbcdb, 0x6023, 0x0004, 0x7120, 0x610a,
+	0x2009, 0x0001, 0x080c, 0x9c76, 0x00be, 0x0005, 0x7110, 0xd1bc,
+	0x0158, 0x00d1, 0x0148, 0x080c, 0x7ebd, 0x1130, 0x7124, 0x610a,
+	0x2009, 0x0089, 0x080c, 0x9c76, 0x0005, 0x7110, 0xd1bc, 0x0158,
+	0x0059, 0x0148, 0x080c, 0x7ebd, 0x1130, 0x7124, 0x610a, 0x2009,
+	0x008a, 0x080c, 0x9c76, 0x0005, 0x7020, 0x2060, 0x9c84, 0x0003,
+	0x1158, 0x9c82, 0x1ddc, 0x0240, 0x2001, 0x1819, 0x2004, 0x9c02,
+	0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x00b6, 0x7110,
+	0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84, 0x0003, 0x11b0, 0x9c82,
+	0x1ddc, 0x0298, 0x6864, 0x9c02, 0x1280, 0x7008, 0x9084, 0x00ff,
+	0x6110, 0x2158, 0xb910, 0x9106, 0x1140, 0x700c, 0xb914, 0x9106,
+	0x1120, 0x2009, 0x0051, 0x080c, 0x9c76, 0x7817, 0x0140, 0x00be,
+	0x0005, 0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049,
+	0x0005, 0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009,
+	0x0005, 0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086,
+	0xc000, 0x05c0, 0x080c, 0x9b84, 0x05a8, 0x0066, 0x00c6, 0x0046,
+	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x243d, 0x1590,
+	0x080c, 0x620b, 0x1578, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce,
+	0x6012, 0x080c, 0xbcdb, 0x080c, 0x1022, 0x0500, 0x2900, 0x6062,
+	0x9006, 0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9,
+	0x000e, 0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003,
+	0x006e, 0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001,
+	0x080c, 0x84ba, 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c, 0x9bda,
+	0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6, 0x7000, 0x908c,
+	0xff00, 0x9184, 0xf000, 0x810f, 0x9086, 0x2000, 0x1904, 0x8044,
+	0x9186, 0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005, 0x1904,
+	0x8046, 0x7030, 0x908e, 0x0400, 0x0904, 0x8046, 0x908e, 0x6000,
+	0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e, 0x0300, 0x11d8, 0x2009,
+	0x1836, 0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c, 0x6624,
+	0x0558, 0x68ac, 0x9084, 0x00ff, 0x7100, 0x918c, 0x00ff, 0x9106,
+	0x1518, 0x687c, 0x69ac, 0x918c, 0xff00, 0x9105, 0x7104, 0x9106,
+	0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4, 0x11a8, 0x908e,
+	0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e, 0x5000, 0x09b8,
+	0x0058, 0x9186, 0x0023, 0x1140, 0x080c, 0x7f5c, 0x0128, 0x6004,
+	0x9086, 0x0002, 0x0118, 0x0000, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x00ce, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7800, 0xc0e5, 0xc0cc,
+	0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800, 0x7834, 0xd084,
+	0x1130, 0x2079, 0x0200, 0x7800, 0x9085, 0x1200, 0x7802, 0x00fe,
+	0x0005, 0x00e6, 0x2071, 0x1800, 0x7034, 0xc084, 0x7036, 0x00ee,
+	0x0005, 0x2071, 0x19d3, 0x7003, 0x0003, 0x700f, 0x0361, 0x9006,
+	0x701a, 0x7072, 0x7012, 0x7017, 0x1ddc, 0x7007, 0x0000, 0x7026,
+	0x702b, 0x8fbc, 0x7032, 0x7037, 0x9039, 0x703f, 0xffff, 0x7042,
+	0x7047, 0x521f, 0x704a, 0x705b, 0x8205, 0x080c, 0x103b, 0x090c,
+	0x0d65, 0x2900, 0x703a, 0xa867, 0x0003, 0xa86f, 0x0100, 0xa8ab,
+	0xdcb0, 0x0005, 0x2071, 0x19d3, 0x1d04, 0x8127, 0x2091, 0x6000,
+	0x700c, 0x8001, 0x700e, 0x1560, 0x2001, 0x1875, 0x2004, 0xd0c4,
+	0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1, 0x0000, 0x20d1, 0x0001,
+	0x20d1, 0x0000, 0x080c, 0x0d65, 0x700f, 0x0361, 0x7007, 0x0001,
+	0x0126, 0x2091, 0x8000, 0x2069, 0x1800, 0x69e8, 0xd1e4, 0x1138,
+	0xd1dc, 0x1118, 0x080c, 0x8273, 0x0010, 0x080c, 0x824a, 0x7040,
+	0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044, 0x080f, 0x0018,
+	0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020, 0x8001,
+	0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186, 0x03e8,
+	0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f, 0x7030,
+	0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f, 0x0009,
+	0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c, 0x90c1, 0x0010,
+	0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310, 0x8001, 0x703e,
+	0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a, 0x1148, 0x704b,
+	0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e, 0x7058, 0x080f,
+	0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, 0x0158, 0x706c,
+	0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109, 0x7172, 0x1110,
+	0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a, 0x1138, 0x700b,
+	0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f, 0x012e, 0x7004,
+	0x0002, 0x814f, 0x8150, 0x817a, 0x00e6, 0x2071, 0x19d3, 0x7018,
+	0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005,
+	0x00e6, 0x0006, 0x2071, 0x19d3, 0x701c, 0x9206, 0x1120, 0x701a,
+	0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071,
+	0x19d3, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005, 0x0005,
+	0x00b6, 0x2031, 0x0010, 0x7110, 0x080c, 0x626b, 0x11a8, 0xb888,
+	0x8001, 0x0290, 0xb88a, 0x1180, 0x0126, 0x2091, 0x8000, 0x0066,
+	0xb8c0, 0x9005, 0x0138, 0x0026, 0xba3c, 0x0016, 0x080c, 0x6396,
+	0x001e, 0x002e, 0x006e, 0x012e, 0x8108, 0x9182, 0x0800, 0x1220,
+	0x8631, 0x0128, 0x7112, 0x0c00, 0x900e, 0x7007, 0x0002, 0x7112,
+	0x00be, 0x0005, 0x2031, 0x0010, 0x7014, 0x2060, 0x0126, 0x2091,
+	0x8000, 0x6048, 0x9005, 0x0128, 0x8001, 0x604a, 0x1110, 0x080c,
+	0xbb5c, 0x6018, 0x9005, 0x0904, 0x81cc, 0x00f6, 0x2079, 0x0300,
+	0x7918, 0xd1b4, 0x1904, 0x81df, 0x781b, 0x2020, 0xa001, 0x7918,
+	0xd1b4, 0x0120, 0x781b, 0x2000, 0x0804, 0x81df, 0x8001, 0x601a,
+	0x0106, 0x781b, 0x2000, 0xa001, 0x7918, 0xd1ac, 0x1dd0, 0x010e,
+	0x00fe, 0x1510, 0x6120, 0x9186, 0x0003, 0x0118, 0x9186, 0x0006,
+	0x11c8, 0x080c, 0xb842, 0x01b0, 0x6014, 0x2048, 0xa884, 0x908a,
+	0x199a, 0x0280, 0x9082, 0x1999, 0xa886, 0x908a, 0x199a, 0x0210,
+	0x2001, 0x1999, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x080c,
+	0xbf8d, 0x0110, 0x080c, 0xb533, 0x012e, 0x9c88, 0x001c, 0x7116,
+	0x2001, 0x1819, 0x2004, 0x9102, 0x1228, 0x8631, 0x0138, 0x2160,
+	0x0804, 0x817e, 0x7017, 0x1ddc, 0x7007, 0x0000, 0x0005, 0x00fe,
+	0x0c58, 0x00e6, 0x2071, 0x19d3, 0x7027, 0x07d0, 0x7023, 0x0009,
+	0x00ee, 0x0005, 0x2001, 0x19dc, 0x2003, 0x0000, 0x0005, 0x00e6,
+	0x2071, 0x19d3, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011,
+	0x19df, 0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19d3, 0x711a,
+	0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, 0x7054,
+	0x8000, 0x7056, 0x2001, 0x19e1, 0x2044, 0xa06c, 0x9086, 0x0000,
+	0x0150, 0x7068, 0xa09a, 0x7064, 0xa096, 0x7060, 0xa092, 0x705c,
+	0xa08e, 0x080c, 0x1117, 0x002e, 0x008e, 0x0005, 0x0006, 0x0016,
+	0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156,
+	0x080c, 0x8092, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
+	0x00ae, 0x009e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x19d3,
+	0x7172, 0x7276, 0x706f, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006,
+	0x2071, 0x19d3, 0x7074, 0x9206, 0x1110, 0x7072, 0x7076, 0x000e,
+	0x00ee, 0x0005, 0x2069, 0x1800, 0x69e8, 0xd1e4, 0x1518, 0x0026,
+	0xd1ec, 0x0140, 0x6a50, 0x6870, 0x9202, 0x0288, 0x8117, 0x9294,
+	0x00c1, 0x0088, 0x9184, 0x0007, 0x01a0, 0x8109, 0x9184, 0x0007,
+	0x0110, 0x69ea, 0x0070, 0x8107, 0x9084, 0x0007, 0x910d, 0x8107,
+	0x9106, 0x9094, 0x00c1, 0x9184, 0xff3e, 0x9205, 0x68ea, 0x080c,
+	0x0eed, 0x002e, 0x0005, 0x69e4, 0x9184, 0x003f, 0x05b8, 0x8109,
+	0x9184, 0x003f, 0x01a8, 0x6a50, 0x6870, 0x9202, 0x0220, 0xd1bc,
+	0x0168, 0xc1bc, 0x0018, 0xd1bc, 0x1148, 0xc1bd, 0x2110, 0x00e6,
+	0x2071, 0x1800, 0x080c, 0x0f0f, 0x00ee, 0x0400, 0x69e6, 0x00f0,
+	0x0026, 0x8107, 0x9094, 0x0007, 0x0128, 0x8001, 0x8007, 0x9085,
+	0x0007, 0x0050, 0x2010, 0x8004, 0x8004, 0x8004, 0x9084, 0x0007,
+	0x9205, 0x8007, 0x9085, 0x0028, 0x9086, 0x0040, 0x2010, 0x00e6,
+	0x2071, 0x1800, 0x080c, 0x0f0f, 0x00ee, 0x002e, 0x0005, 0x00c6,
+	0x2061, 0x1a3e, 0x00ce, 0x0005, 0x9184, 0x000f, 0x8003, 0x8003,
+	0x8003, 0x9080, 0x1a3e, 0x2060, 0x0005, 0xa884, 0x908a, 0x199a,
+	0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a3e, 0x6014, 0x00ce,
+	0x9005, 0x1130, 0x2001, 0x001e, 0x0018, 0x908e, 0xffff, 0x01b0,
+	0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0x908c, 0x00c0,
+	0x918e, 0x00c0, 0x0904, 0x8377, 0xd0b4, 0x1168, 0xd0bc, 0x1904,
+	0x8350, 0x2009, 0x0006, 0x080c, 0x83a4, 0x0005, 0x900e, 0x0c60,
+	0x2001, 0x1999, 0x08b0, 0xd0fc, 0x05e0, 0x908c, 0x2023, 0x1568,
+	0x87ff, 0x1558, 0xa9a8, 0x81ff, 0x1540, 0x6124, 0x918c, 0x0500,
+	0x1520, 0x6100, 0x918e, 0x0007, 0x1500, 0x2009, 0x1875, 0x210c,
+	0xd184, 0x11d8, 0x6003, 0x0003, 0x6007, 0x0043, 0x6047, 0xb035,
+	0x080c, 0x1ab2, 0xa87c, 0xc0dd, 0xa87e, 0x600f, 0x0000, 0x00f6,
+	0x2079, 0x0380, 0x7818, 0xd0bc, 0x1de8, 0x7833, 0x0013, 0x2c00,
+	0x7836, 0x781b, 0x8080, 0x00fe, 0x0005, 0x908c, 0x0003, 0x0120,
+	0x918e, 0x0003, 0x1904, 0x839e, 0x908c, 0x2020, 0x918e, 0x2020,
+	0x01a8, 0x6024, 0xd0d4, 0x11e8, 0x2009, 0x1875, 0x2104, 0xd084,
+	0x1138, 0x87ff, 0x1120, 0x2009, 0x0043, 0x0804, 0x9c76, 0x0005,
+	0x87ff, 0x1de8, 0x2009, 0x0042, 0x0804, 0x9c76, 0x6110, 0x00b6,
+	0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd, 0x6026,
+	0x0c00, 0xc0d4, 0x6026, 0xa890, 0x602e, 0xa88c, 0x6032, 0x08e0,
+	0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904,
+	0x839e, 0x908c, 0x2020, 0x918e, 0x2020, 0x0170, 0x0076, 0x00f6,
+	0x2c78, 0x080c, 0x165c, 0x00fe, 0x007e, 0x87ff, 0x1120, 0x2009,
+	0x0042, 0x080c, 0x9c76, 0x0005, 0x6110, 0x00b6, 0x2158, 0xb900,
+	0x00be, 0xd1ac, 0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38, 0xd0fc,
+	0x0188, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x9084, 0x0003,
+	0x908e, 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, 0x0041, 0x080c,
+	0x9c76, 0x0005, 0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009, 0x0043,
+	0x080c, 0x9c76, 0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be,
+	0xd1ac, 0x0d20, 0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009, 0x0004,
+	0x0019, 0x0005, 0x2009, 0x0001, 0x0096, 0x080c, 0xb842, 0x0518,
+	0x6014, 0x2048, 0xa982, 0xa800, 0x6016, 0x9186, 0x0001, 0x1188,
+	0xa97c, 0x918c, 0x8100, 0x918e, 0x8100, 0x1158, 0x00c6, 0x2061,
+	0x1a3e, 0x6200, 0xd28c, 0x1120, 0x6204, 0x8210, 0x0208, 0x6206,
+	0x00ce, 0x080c, 0x67c6, 0x6014, 0x904d, 0x0076, 0x2039, 0x0000,
+	0x190c, 0x82bd, 0x007e, 0x009e, 0x0005, 0x0156, 0x00c6, 0x2061,
+	0x1a3e, 0x6000, 0x81ff, 0x0110, 0x9205, 0x0008, 0x9204, 0x6002,
+	0x00ce, 0x015e, 0x0005, 0x6800, 0xd08c, 0x1138, 0x6808, 0x9005,
+	0x0120, 0x8001, 0x680a, 0x9085, 0x0001, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x0036, 0x0046, 0x20a9, 0x0010, 0x9006, 0x8004, 0x8086,
+	0x818e, 0x1208, 0x9200, 0x1f04, 0x83ef, 0x8086, 0x818e, 0x004e,
+	0x003e, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0076, 0x0156,
+	0x20a9, 0x0010, 0x9005, 0x01c8, 0x911a, 0x12b8, 0x8213, 0x818d,
+	0x0228, 0x911a, 0x1220, 0x1f04, 0x8406, 0x0028, 0x911a, 0x2308,
+	0x8210, 0x1f04, 0x8406, 0x0006, 0x3200, 0x9084, 0xefff, 0x2080,
+	0x000e, 0x015e, 0x007e, 0x012e, 0x0005, 0x0006, 0x3200, 0x9085,
+	0x1000, 0x0ca8, 0x0126, 0x2091, 0x2800, 0x2079, 0x19b7, 0x012e,
+	0x00d6, 0x2069, 0x19b7, 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6,
+	0x20e9, 0x0000, 0x2069, 0x0200, 0x080c, 0x97e8, 0x04a9, 0x080c,
+	0x97d3, 0x0491, 0x080c, 0x97d6, 0x0479, 0x080c, 0x97d9, 0x0461,
+	0x080c, 0x97dc, 0x0449, 0x080c, 0x97df, 0x0431, 0x080c, 0x97e2,
+	0x0419, 0x080c, 0x97e5, 0x0401, 0x01de, 0x014e, 0x015e, 0x6857,
+	0x0000, 0x00f6, 0x2079, 0x0380, 0x00f9, 0x7807, 0x0003, 0x7803,
+	0x0000, 0x7803, 0x0001, 0x2069, 0x0004, 0x2d04, 0x9084, 0xfffe,
+	0x9085, 0x8000, 0x206a, 0x2069, 0x0100, 0x6828, 0x9084, 0xfffc,
+	0x682a, 0x00fe, 0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240,
+	0x2001, 0x0000, 0x4004, 0x0005, 0x00c6, 0x7803, 0x0000, 0x9006,
+	0x7827, 0x0030, 0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1abe,
+	0x781f, 0xff00, 0x781b, 0xff00, 0x2061, 0x1ab3, 0x602f, 0x19b7,
+	0x6033, 0x1800, 0x6037, 0x19d3, 0x603b, 0x1d04, 0x603f, 0x1d14,
+	0x6042, 0x6047, 0x1a89, 0x00ce, 0x0005, 0x2001, 0x0382, 0x2004,
+	0x9084, 0x0007, 0x9086, 0x0001, 0x01b0, 0x00c6, 0x6146, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19b7, 0x602c, 0x8000, 0x602e, 0x601c,
+	0x9005, 0x0130, 0x9080, 0x0003, 0x2102, 0x611e, 0x00ce, 0x0005,
+	0x6122, 0x611e, 0x0cd8, 0x6146, 0x2c08, 0x2001, 0x0012, 0x080c,
+	0x98ac, 0x0005, 0x0016, 0x2009, 0x8020, 0x6146, 0x2c08, 0x2001,
+	0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001, 0x1128, 0x2001,
+	0x0019, 0x080c, 0x98ac, 0x0088, 0x00c6, 0x2061, 0x19b7, 0x602c,
+	0x8000, 0x602e, 0x600c, 0x9005, 0x0128, 0x9080, 0x0003, 0x2102,
+	0x610e, 0x0010, 0x6112, 0x610e, 0x00ce, 0x001e, 0x0005, 0x2001,
+	0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001, 0x0198, 0x00c6,
+	0x6146, 0x600f, 0x0000, 0x2c08, 0x2061, 0x19b7, 0x6044, 0x9005,
+	0x0130, 0x9080, 0x0003, 0x2102, 0x6146, 0x00ce, 0x0005, 0x614a,
+	0x6146, 0x0cd8, 0x6146, 0x600f, 0x0000, 0x2c08, 0x2001, 0x0013,
+	0x080c, 0x98ac, 0x0005, 0x6044, 0xd0dc, 0x0110, 0x080c, 0x9485,
+	0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076,
+	0x0066, 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e,
+	0x2071, 0x19b7, 0x7648, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff,
+	0x0904, 0x8586, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x8581,
+	0x87ff, 0x0120, 0x605c, 0x9106, 0x1904, 0x8581, 0x704c, 0x9c06,
+	0x1178, 0x0036, 0x2019, 0x0001, 0x080c, 0x9269, 0x703f, 0x0000,
+	0x9006, 0x704e, 0x706a, 0x7052, 0x706e, 0x003e, 0x2029, 0x0001,
+	0x0811, 0x7048, 0x9c36, 0x1110, 0x660c, 0x764a, 0x7044, 0x9c36,
+	0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010, 0x7047,
+	0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
+	0x2678, 0x600f, 0x0000, 0x080c, 0xb842, 0x01f0, 0x6014, 0x2048,
+	0x6020, 0x9086, 0x0003, 0x1588, 0x6004, 0x9086, 0x0040, 0x090c,
+	0x9485, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036,
+	0x0076, 0x080c, 0xbb45, 0x080c, 0xd52b, 0x080c, 0x6991, 0x007e,
+	0x003e, 0x001e, 0x080c, 0xba31, 0x080c, 0x9c14, 0x00ce, 0x0804,
+	0x851f, 0x2c78, 0x600c, 0x2060, 0x0804, 0x851f, 0x012e, 0x000e,
+	0x001e, 0x002e, 0x003e, 0x005e, 0x006e, 0x007e, 0x009e, 0x00be,
+	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006,
+	0x1158, 0x0016, 0x0036, 0x0076, 0x080c, 0xd52b, 0x080c, 0xd22f,
+	0x007e, 0x003e, 0x001e, 0x08c0, 0x6020, 0x9086, 0x000a, 0x0918,
+	0x0804, 0x8564, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6,
+	0x9036, 0x0126, 0x2091, 0x8000, 0x2079, 0x19b7, 0x7848, 0x9065,
+	0x0904, 0x860e, 0x600c, 0x0006, 0x600f, 0x0000, 0x784c, 0x9c06,
+	0x11a0, 0x0036, 0x2019, 0x0001, 0x080c, 0x9269, 0x783f, 0x0000,
+	0x901e, 0x7b4e, 0x7b6a, 0x7b52, 0x7b6e, 0x003e, 0x000e, 0x9005,
+	0x1118, 0x600c, 0x600f, 0x0000, 0x0006, 0x00e6, 0x2f70, 0x080c,
+	0x8503, 0x00ee, 0x080c, 0xb842, 0x0548, 0x6014, 0x2048, 0x6020,
+	0x9086, 0x0003, 0x15a8, 0x3e08, 0x918e, 0x0002, 0x1188, 0x6010,
+	0x9005, 0x0170, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140,
+	0x6048, 0x9005, 0x11c0, 0x2001, 0x1958, 0x2004, 0x604a, 0x0098,
+	0x6004, 0x9086, 0x0040, 0x090c, 0x9485, 0xa867, 0x0103, 0xab7a,
+	0xa877, 0x0000, 0x080c, 0x6985, 0x080c, 0xba31, 0x6044, 0xc0fc,
+	0x6046, 0x080c, 0x9c14, 0x000e, 0x0804, 0x85b7, 0x7e4a, 0x7e46,
+	0x012e, 0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005,
+	0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xd22f, 0x0c38, 0x6020,
+	0x9086, 0x000a, 0x09e0, 0x08a0, 0x0016, 0x0026, 0x0086, 0x9046,
+	0x00a9, 0x080c, 0x8715, 0x008e, 0x002e, 0x001e, 0x0005, 0x00f6,
+	0x0126, 0x2079, 0x19b7, 0x2091, 0x8000, 0x080c, 0x875e, 0x080c,
+	0x87f2, 0x080c, 0x63f8, 0x012e, 0x00fe, 0x0005, 0x00b6, 0x0096,
+	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x19b7, 0x7620, 0x2660, 0x2678, 0x8cff,
+	0x0904, 0x86da, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x86d5,
+	0x88ff, 0x0120, 0x605c, 0x9106, 0x1904, 0x86d5, 0x7030, 0x9c06,
+	0x1570, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c, 0x81ea,
+	0x080c, 0x8f9c, 0x68c3, 0x0000, 0x080c, 0x9485, 0x7033, 0x0000,
 	0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001,
-	0x0100, 0x080c, 0x2833, 0x9006, 0x080c, 0x2833, 0x2069, 0x0100,
-	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7010, 0x9c36,
-	0x1110, 0x660c, 0x7612, 0x700c, 0x9c36, 0x1140, 0x2c00, 0x9f36,
-	0x0118, 0x2f00, 0x700e, 0x0010, 0x700f, 0x0000, 0x660c, 0x0066,
-	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
-	0x080c, 0xba4b, 0x1158, 0x080c, 0x303b, 0x080c, 0xba5c, 0x11f0,
-	0x080c, 0xa58f, 0x00d8, 0x080c, 0x94a2, 0x08c0, 0x080c, 0xba5c,
-	0x1118, 0x080c, 0xa58f, 0x0090, 0x6014, 0x2048, 0x080c, 0xb845,
-	0x0168, 0x6020, 0x9086, 0x0003, 0x1508, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0x698a, 0x080c, 0xba36, 0x080c, 0xbcd3,
-	0x080c, 0x9c21, 0x080c, 0x9378, 0x00ce, 0x0804, 0x9504, 0x2c78,
-	0x600c, 0x2060, 0x0804, 0x9504, 0x012e, 0x000e, 0x002e, 0x006e,
-	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x6020, 0x9086,
-	0x0006, 0x1d20, 0x080c, 0xd21e, 0x0c08, 0x00d6, 0x080c, 0x8d6b,
-	0x7003, 0x0200, 0x7007, 0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001,
-	0x2099, 0x195a, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004,
-	0x4003, 0x7023, 0x0004, 0x7027, 0x7878, 0x080c, 0x8f87, 0x00de,
-	0x0005, 0x080c, 0x8d6b, 0x700b, 0x0800, 0x7814, 0x9084, 0xff00,
-	0x700e, 0x7814, 0x9084, 0x00ff, 0x7022, 0x782c, 0x7026, 0x7860,
-	0x9084, 0x00ff, 0x9085, 0x0200, 0x7002, 0x7860, 0x9084, 0xff00,
-	0x8007, 0x7006, 0x60c2, 0x0804, 0x8f87, 0x00b6, 0x00d6, 0x0016,
-	0x00d6, 0x2f68, 0x2009, 0x0035, 0x080c, 0xbed9, 0x00de, 0x1904,
-	0x9632, 0x080c, 0x8d20, 0x7003, 0x1300, 0x782c, 0x080c, 0x973d,
-	0x2068, 0x6820, 0x9086, 0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0,
-	0x080c, 0x9b66, 0x11d8, 0x9286, 0x007e, 0x1128, 0x700b, 0x00ff,
-	0x700f, 0xfffe, 0x0498, 0x9286, 0x007f, 0x1128, 0x700b, 0x00ff,
-	0x700f, 0xfffd, 0x0458, 0x9284, 0xff80, 0x0180, 0x9286, 0x0080,
-	0x1128, 0x700b, 0x00ff, 0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000,
-	0x2b5c, 0xb810, 0x700a, 0xb814, 0x700e, 0x00c0, 0xb884, 0x700e,
-	0x00a8, 0x080c, 0x9b66, 0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082,
-	0x007e, 0x0250, 0x00d6, 0x2069, 0x181e, 0x2d04, 0x700a, 0x8d68,
-	0x2d04, 0x700e, 0x00de, 0x0010, 0x6034, 0x700e, 0x7838, 0x7012,
-	0x783c, 0x7016, 0x60c3, 0x000c, 0x001e, 0x00de, 0x080c, 0x8f87,
-	0x00be, 0x0005, 0x781b, 0x0001, 0x7803, 0x0006, 0x001e, 0x00de,
-	0x00be, 0x0005, 0x792c, 0x9180, 0x0008, 0x200c, 0x9186, 0x0006,
-	0x01c0, 0x9186, 0x0003, 0x0904, 0x96b0, 0x9186, 0x0005, 0x0904,
-	0x9698, 0x9186, 0x0004, 0x05f0, 0x9186, 0x0008, 0x0904, 0x96a1,
-	0x7807, 0x0037, 0x782f, 0x0003, 0x7817, 0x1700, 0x080c, 0x971a,
-	0x0005, 0x080c, 0x96db, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009,
-	0x4000, 0x6800, 0x6a44, 0xd2fc, 0x11f8, 0x0002, 0x9679, 0x9684,
-	0x967b, 0x9684, 0x9680, 0x9679, 0x9679, 0x9684, 0x9684, 0x9684,
-	0x9684, 0x9679, 0x9679, 0x9679, 0x9679, 0x9679, 0x9684, 0x9679,
-	0x9684, 0x080c, 0x0d65, 0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110,
-	0x900e, 0x0010, 0x2009, 0x2000, 0x682c, 0x7022, 0x6830, 0x7026,
-	0x0804, 0x96d4, 0x080c, 0x96db, 0x00d6, 0x0026, 0x792c, 0x2168,
-	0x2009, 0x4000, 0x6a00, 0x9286, 0x0002, 0x1108, 0x900e, 0x04e0,
-	0x080c, 0x96db, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000,
-	0x0498, 0x04c9, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000,
-	0x9286, 0x0005, 0x0118, 0x9286, 0x0002, 0x1108, 0x900e, 0x0420,
-	0x0451, 0x00d6, 0x0026, 0x792c, 0x2168, 0x6814, 0x0096, 0x2048,
-	0xa9ac, 0xa834, 0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022,
-	0x7226, 0x792c, 0x9180, 0x0011, 0x2004, 0xd0fc, 0x1148, 0x9180,
-	0x0000, 0x2004, 0x908e, 0x0002, 0x0130, 0x908e, 0x0004, 0x0118,
-	0x2009, 0x4000, 0x0008, 0x900e, 0x712a, 0x60c3, 0x0018, 0x002e,
-	0x00de, 0x0804, 0x8f87, 0x00b6, 0x0036, 0x0046, 0x0056, 0x0066,
-	0x080c, 0x8d6b, 0x9006, 0x7003, 0x0200, 0x7938, 0x710a, 0x793c,
-	0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c, 0x9b66, 0x1118, 0x9092,
-	0x007e, 0x0268, 0x00d6, 0x2069, 0x181e, 0x2d2c, 0x8d68, 0x2d34,
-	0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028, 0x901e,
-	0xbc84, 0x2029, 0x0000, 0x6634, 0x782c, 0x9080, 0x0008, 0x2004,
-	0x9086, 0x0003, 0x1128, 0x7512, 0x7616, 0x731a, 0x741e, 0x0020,
-	0x7312, 0x7416, 0x751a, 0x761e, 0x006e, 0x005e, 0x004e, 0x003e,
-	0x00be, 0x0005, 0x080c, 0x8d6b, 0x7003, 0x0100, 0x782c, 0x700a,
-	0x7814, 0x700e, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8f87, 0x080c,
-	0x8d17, 0x7003, 0x1400, 0x7838, 0x700a, 0x0079, 0x783c, 0x700e,
-	0x782c, 0x7012, 0x7830, 0x7016, 0x7834, 0x9084, 0x00ff, 0x8007,
-	0x701a, 0x60c3, 0x0010, 0x0804, 0x8f87, 0x00e6, 0x2071, 0x0240,
-	0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6, 0x2058, 0xb8c4, 0xd084,
-	0x0120, 0x7850, 0x702a, 0x784c, 0x702e, 0x00be, 0x00fe, 0x000e,
-	0x00ee, 0x0005, 0x080c, 0x8d62, 0x7003, 0x0100, 0x782c, 0x700a,
-	0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8f87, 0x00a9, 0x7914,
-	0x712a, 0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026, 0x080c, 0x27a2,
-	0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x080c,
-	0x8faa, 0x080c, 0x8202, 0x0005, 0x0036, 0x0096, 0x00d6, 0x00e6,
-	0x7860, 0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294, 0xfffd, 0xaa7e,
-	0xaa80, 0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff, 0xab74,
-	0x9384, 0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384, 0xff00, 0x9215,
-	0xaa76, 0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069, 0x0200,
-	0x080c, 0x97fa, 0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
-	0x000a, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x4003,
-	0x60a3, 0x0035, 0xaa68, 0x9294, 0x7000, 0x9286, 0x3000, 0x0110,
-	0x60a3, 0x0037, 0x00ee, 0x00de, 0x009e, 0x003e, 0x0005, 0x900e,
-	0x7814, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084, 0x0003,
-	0x11a8, 0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824, 0xd0cc,
-	0x1168, 0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001, 0x180c,
-	0x200c, 0xc1d5, 0x2102, 0x2009, 0x1983, 0x210c, 0x009e, 0x918d,
-	0x0092, 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036, 0x0026, 0x2110,
-	0x900e, 0x080c, 0x287c, 0x002e, 0x0005, 0x2009, 0x0009, 0x00a0,
-	0x2009, 0x000a, 0x0088, 0x2009, 0x000b, 0x0070, 0x2009, 0x000c,
-	0x0058, 0x2009, 0x000d, 0x0040, 0x2009, 0x000e, 0x0028, 0x2009,
-	0x000f, 0x0010, 0x2009, 0x0008, 0x6912, 0x0005, 0x00d6, 0x9290,
-	0x0018, 0x8214, 0x20e9, 0x0000, 0x2069, 0x0200, 0x6813, 0x0000,
-	0x22a8, 0x9284, 0x00e0, 0x0128, 0x20a9, 0x0020, 0x9292, 0x0020,
-	0x0008, 0x9016, 0x20a1, 0x0240, 0x9006, 0x4004, 0x82ff, 0x0120,
-	0x6810, 0x8000, 0x6812, 0x0c60, 0x00de, 0x0005, 0x00f6, 0x00e6,
-	0x00d6, 0x00c6, 0x00a6, 0x0096, 0x0066, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x19b8, 0x7610, 0x2660, 0x2678, 0x8cff, 0x0904, 0x98a5,
+	0x0100, 0x080c, 0x2852, 0x9006, 0x080c, 0x2852, 0x2069, 0x0100,
+	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0040, 0x7008,
+	0xc0ad, 0x700a, 0x6003, 0x0009, 0x630a, 0x0804, 0x86d5, 0x7020,
+	0x9c36, 0x1110, 0x660c, 0x7622, 0x701c, 0x9c36, 0x1140, 0x2c00,
+	0x9f36, 0x0118, 0x2f00, 0x701e, 0x0010, 0x701f, 0x0000, 0x660c,
+	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
+	0x0000, 0x6044, 0xc0fc, 0x6046, 0x6014, 0x2048, 0x080c, 0xb842,
+	0x01e8, 0x6020, 0x9086, 0x0003, 0x1580, 0x080c, 0xba57, 0x1118,
+	0x080c, 0xa581, 0x0098, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
+	0x0016, 0x0036, 0x0086, 0x080c, 0xbb45, 0x080c, 0xd52b, 0x080c,
+	0x6991, 0x008e, 0x003e, 0x001e, 0x080c, 0xba31, 0x080c, 0x9c14,
+	0x080c, 0x935b, 0x00ce, 0x0804, 0x864f, 0x2c78, 0x600c, 0x2060,
+	0x0804, 0x864f, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce, 0x00de,
+	0x00ee, 0x00fe, 0x009e, 0x00be, 0x0005, 0x6020, 0x9086, 0x0006,
+	0x1158, 0x0016, 0x0036, 0x0086, 0x080c, 0xd52b, 0x080c, 0xd22f,
+	0x008e, 0x003e, 0x001e, 0x08d0, 0x080c, 0xa581, 0x6020, 0x9086,
+	0x0002, 0x1160, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0904,
+	0x86bb, 0x9086, 0x008b, 0x0904, 0x86bb, 0x0840, 0x6020, 0x9086,
+	0x0005, 0x1920, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x09c8,
+	0x9086, 0x008b, 0x09b0, 0x0804, 0x86ce, 0x0006, 0x00f6, 0x00e6,
+	0x0096, 0x00b6, 0x00c6, 0x0066, 0x0016, 0x0126, 0x2091, 0x8000,
+	0x9280, 0x1000, 0x2004, 0x905d, 0x2079, 0x19b7, 0x9036, 0x7828,
+	0x2060, 0x8cff, 0x0538, 0x6010, 0x9b06, 0x1500, 0x6043, 0xffff,
+	0x080c, 0x9a77, 0x01d8, 0x610c, 0x0016, 0x080c, 0x90f3, 0x6014,
+	0x2048, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036,
+	0x0086, 0x080c, 0xbb45, 0x080c, 0xd52b, 0x080c, 0x6991, 0x008e,
+	0x003e, 0x001e, 0x080c, 0x9c14, 0x00ce, 0x08d8, 0x2c30, 0x600c,
+	0x2060, 0x08b8, 0x080c, 0x6415, 0x012e, 0x001e, 0x006e, 0x00ce,
+	0x00be, 0x009e, 0x00ee, 0x00fe, 0x000e, 0x0005, 0x0096, 0x0006,
+	0x0066, 0x00c6, 0x00d6, 0x9036, 0x7820, 0x9065, 0x0904, 0x87c5,
+	0x600c, 0x0006, 0x6044, 0xc0fc, 0x6046, 0x600f, 0x0000, 0x7830,
+	0x9c06, 0x1588, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c,
+	0x81ea, 0x080c, 0x8f9c, 0x68c3, 0x0000, 0x080c, 0x9485, 0x7833,
+	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
+	0x2001, 0x0100, 0x080c, 0x2852, 0x9006, 0x080c, 0x2852, 0x2069,
+	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0058,
+	0x080c, 0x661c, 0x1538, 0x6003, 0x0009, 0x630a, 0x7808, 0xc0ad,
+	0x780a, 0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c, 0xb840, 0x01b0,
+	0x6020, 0x9086, 0x0003, 0x1508, 0x080c, 0xba57, 0x1118, 0x080c,
+	0xa581, 0x0060, 0x080c, 0x661c, 0x1168, 0xa867, 0x0103, 0xab7a,
+	0xa877, 0x0000, 0x080c, 0x6991, 0x080c, 0xba31, 0x080c, 0x9c14,
+	0x080c, 0x935b, 0x000e, 0x0804, 0x8765, 0x7e22, 0x7e1e, 0x00de,
+	0x00ce, 0x006e, 0x000e, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006,
+	0x1118, 0x080c, 0xd22f, 0x0c50, 0x080c, 0xa581, 0x6020, 0x9086,
+	0x0002, 0x1150, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0990,
+	0x9086, 0x008b, 0x0978, 0x08d0, 0x6020, 0x9086, 0x0005, 0x19b0,
+	0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0d18, 0x9086, 0x008b,
+	0x0d00, 0x0860, 0x0006, 0x0096, 0x00b6, 0x00c6, 0x0066, 0x9036,
+	0x7828, 0x9065, 0x0510, 0x6010, 0x2058, 0x600c, 0x0006, 0x3e08,
+	0x918e, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x11a8, 0x6043, 0xffff,
+	0x080c, 0x9a77, 0x0180, 0x610c, 0x080c, 0x90f3, 0x6014, 0x2048,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6991, 0x080c,
+	0x9c14, 0x000e, 0x08f0, 0x2c30, 0x0ce0, 0x006e, 0x00ce, 0x00be,
+	0x009e, 0x000e, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x0066, 0x080c,
+	0x5dd1, 0x11b0, 0x2071, 0x19b7, 0x7030, 0x9080, 0x0005, 0x2004,
+	0x904d, 0x0170, 0xa878, 0x9606, 0x1158, 0x2071, 0x19b7, 0x7030,
+	0x9035, 0x0130, 0x9080, 0x0005, 0x2004, 0x9906, 0x1108, 0x0029,
+	0x006e, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00c6, 0x2660, 0x6043,
+	0xffff, 0x080c, 0x9a77, 0x0178, 0x080c, 0x90f3, 0x6014, 0x2048,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xbb45, 0x080c,
+	0x6991, 0x080c, 0x9c14, 0x00ce, 0x0005, 0x00b6, 0x00e6, 0x00c6,
+	0x080c, 0x98bb, 0x0106, 0x2071, 0x0101, 0x2e04, 0xc0c4, 0x2072,
+	0x6044, 0xd0fc, 0x1138, 0x010e, 0x090c, 0x98d7, 0x00ce, 0x00ee,
+	0x00be, 0x0005, 0x2071, 0x19b7, 0x7030, 0x9005, 0x0da0, 0x9c06,
+	0x190c, 0x0d65, 0x7036, 0x080c, 0x81ea, 0x7004, 0x9084, 0x0007,
+	0x0002, 0x888b, 0x888d, 0x8894, 0x889e, 0x88ac, 0x888b, 0x8899,
+	0x8889, 0x080c, 0x0d65, 0x0428, 0x0005, 0x080c, 0x9a62, 0x7007,
+	0x0000, 0x7033, 0x0000, 0x00e8, 0x0066, 0x9036, 0x080c, 0x90f3,
+	0x006e, 0x7007, 0x0000, 0x7033, 0x0000, 0x0098, 0x080c, 0x9a4d,
+	0x0140, 0x080c, 0x9a62, 0x0128, 0x0066, 0x9036, 0x080c, 0x90f3,
+	0x006e, 0x7033, 0x0000, 0x0028, 0x080c, 0x9a4d, 0x080c, 0x9485,
+	0x0000, 0x010e, 0x190c, 0x98d7, 0x00ce, 0x00ee, 0x00be, 0x0005,
+	0x00d6, 0x00c6, 0x080c, 0x98bb, 0x0106, 0x6044, 0xd0fc, 0x1130,
+	0x010e, 0x090c, 0x98d7, 0x00ce, 0x00de, 0x0005, 0x2069, 0x19b7,
+	0x684c, 0x9005, 0x0da8, 0x9c06, 0x190c, 0x0d65, 0x6852, 0x00e6,
+	0x2d70, 0x080c, 0x8503, 0x00ee, 0x080c, 0x81f7, 0x0016, 0x2009,
+	0x0040, 0x080c, 0x2063, 0x001e, 0x683c, 0x9084, 0x0003, 0x0002,
+	0x88e6, 0x88e7, 0x8905, 0x88e4, 0x080c, 0x0d65, 0x0460, 0x6868,
+	0x9086, 0x0001, 0x0190, 0x600c, 0x9015, 0x0160, 0x6a4a, 0x600f,
+	0x0000, 0x6044, 0xc0fc, 0x6046, 0x9006, 0x7042, 0x684e, 0x683f,
+	0x0000, 0x00c8, 0x684a, 0x6846, 0x0ca0, 0x686b, 0x0000, 0x6848,
+	0x9065, 0x0d78, 0x6003, 0x0002, 0x0c60, 0x9006, 0x686a, 0x6852,
+	0x686e, 0x600c, 0x9015, 0x0120, 0x6a4a, 0x600f, 0x0000, 0x0018,
+	0x684e, 0x684a, 0x6846, 0x684f, 0x0000, 0x010e, 0x190c, 0x98d7,
+	0x00ce, 0x00de, 0x0005, 0x0005, 0x6020, 0x9084, 0x000f, 0x000b,
+	0x0005, 0x8931, 0x8934, 0x8d8d, 0x8e1c, 0x8934, 0x8d8d, 0x8e1c,
+	0x8931, 0x8934, 0x8931, 0x8931, 0x8931, 0x8931, 0x8931, 0x8931,
+	0x8931, 0x080c, 0x885d, 0x0005, 0x00b6, 0x0156, 0x0136, 0x0146,
+	0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200,
+	0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d65, 0x6110,
+	0x2158, 0xb984, 0x2c78, 0x2061, 0x0100, 0x619a, 0x908a, 0x0040,
+	0x1a04, 0x89a0, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de,
+	0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x8b17, 0x8b52,
+	0x8b7b, 0x8c1e, 0x8c3f, 0x8c45, 0x8c52, 0x8c5a, 0x8c66, 0x8c6c,
+	0x8c7d, 0x8c6c, 0x8cd4, 0x8c5a, 0x8ce0, 0x8ce6, 0x8c66, 0x8ce6,
+	0x8cf2, 0x899e, 0x899e, 0x899e, 0x899e, 0x899e, 0x899e, 0x899e,
+	0x899e, 0x899e, 0x899e, 0x899e, 0x9114, 0x9137, 0x9148, 0x9168,
+	0x919a, 0x8c52, 0x899e, 0x8c52, 0x8c6c, 0x899e, 0x8b7b, 0x8c1e,
+	0x899e, 0x9583, 0x8c6c, 0x899e, 0x959f, 0x8c6c, 0x899e, 0x8c66,
+	0x8b11, 0x89c1, 0x899e, 0x95bb, 0x9628, 0x9708, 0x899e, 0x9715,
+	0x8c4f, 0x9740, 0x899e, 0x91a4, 0x974c, 0x899e, 0x080c, 0x0d65,
+	0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce,
+	0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x89bf, 0x89bf, 0x89bf,
+	0x89e8, 0x8a94, 0x8a9f, 0x89bf, 0x89bf, 0x89bf, 0x8ae6, 0x8af2,
+	0x8a03, 0x89bf, 0x8a1e, 0x8a52, 0x9acd, 0x9b12, 0x8c6c, 0x080c,
+	0x0d65, 0x00d6, 0x0096, 0x080c, 0x8d05, 0x7003, 0x2414, 0x7007,
+	0x0018, 0x700b, 0x0800, 0x7814, 0x2048, 0xa83c, 0x700e, 0xa850,
+	0x7022, 0xa854, 0x7026, 0x60c3, 0x0018, 0x080c, 0x8f6c, 0x009e,
+	0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x080c,
+	0x9b59, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085, 0x0001, 0x0005,
+	0x00d6, 0x0096, 0x080c, 0x8d05, 0x7003, 0x0500, 0x7814, 0x2048,
+	0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012, 0xa880, 0x7016,
+	0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010, 0x080c, 0x8f6c,
+	0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c, 0x8d05, 0x7003,
+	0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0, 0x700e, 0xa8d4,
+	0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0, 0x701e, 0x60c3,
+	0x0010, 0x080c, 0x8f6c, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x8d05, 0x20e9, 0x0000, 0x2001,
+	0x1973, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814, 0x8003, 0x60c2,
+	0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098,
+	0x2001, 0x1973, 0x0016, 0x200c, 0x2001, 0x0001, 0x080c, 0x2048,
+	0x080c, 0xc59f, 0x9006, 0x080c, 0x2048, 0x001e, 0xa804, 0x9005,
+	0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0x8f6c, 0x012e, 0x009e,
+	0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x8d50, 0x20e9, 0x0000, 0x2001, 0x1973, 0x2003, 0x0000, 0x7814,
+	0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814, 0x8003, 0x60c2,
+	0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098,
+	0x2001, 0x1973, 0x0016, 0x200c, 0x080c, 0xc59f, 0x001e, 0xa804,
+	0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814, 0x2048, 0x080c,
+	0x0fd4, 0x080c, 0x8f6c, 0x012e, 0x009e, 0x00de, 0x0005, 0x60c0,
+	0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082, 0x0004, 0x20a3,
+	0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0x8d05, 0x7003, 0x7800,
+	0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804, 0x8f6c, 0x00d6,
+	0x00e6, 0x080c, 0x8d50, 0x7814, 0x9084, 0xff00, 0x2073, 0x0200,
+	0x8e70, 0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70, 0x2073, 0x0034,
+	0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70,
+	0x1f04, 0x8ab5, 0x2069, 0x1801, 0x20a9, 0x0004, 0x2d76, 0x8d68,
+	0x8e70, 0x1f04, 0x8abe, 0x2069, 0x1983, 0x9086, 0xdf00, 0x0110,
+	0x2069, 0x199d, 0x20a9, 0x001a, 0x9e86, 0x0260, 0x1148, 0x00c6,
+	0x2061, 0x0200, 0x6010, 0x8000, 0x6012, 0x00ce, 0x2071, 0x0240,
+	0x2d04, 0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04, 0x8acc, 0x60c3,
+	0x004c, 0x080c, 0x8f6c, 0x00ee, 0x00de, 0x0005, 0x080c, 0x8d05,
+	0x7003, 0x6300, 0x7007, 0x0028, 0x7808, 0x700e, 0x60c3, 0x0008,
+	0x0804, 0x8f6c, 0x00d6, 0x0026, 0x0016, 0x080c, 0x8d50, 0x7003,
+	0x0200, 0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004, 0x2009, 0x0001,
+	0x2011, 0x000c, 0x2073, 0x0800, 0x8e70, 0x2073, 0x0000, 0x00ee,
+	0x7206, 0x710a, 0x62c2, 0x080c, 0x8f6c, 0x001e, 0x002e, 0x00de,
+	0x0005, 0x2001, 0x1817, 0x2004, 0x609a, 0x0804, 0x8f6c, 0x080c,
+	0x8d05, 0x7003, 0x5200, 0x2069, 0x1853, 0x6804, 0xd084, 0x0130,
+	0x6828, 0x0016, 0x080c, 0x2470, 0x710e, 0x001e, 0x20a9, 0x0004,
+	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250,
+	0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x0254, 0x4003,
+	0x080c, 0x9b59, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001,
+	0x181e, 0x2004, 0x7032, 0x2001, 0x181f, 0x2004, 0x7036, 0x0030,
+	0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x7036, 0x60c3, 0x001c,
+	0x0804, 0x8f6c, 0x080c, 0x8d05, 0x7003, 0x0500, 0x080c, 0x9b59,
+	0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181e, 0x2004,
+	0x700a, 0x2001, 0x181f, 0x2004, 0x700e, 0x0030, 0x2001, 0x1817,
+	0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9, 0x0004, 0x20e1, 0x0001,
+	0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x60c3,
+	0x0010, 0x0804, 0x8f6c, 0x080c, 0x8d05, 0x9006, 0x080c, 0x6630,
+	0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003, 0x0400, 0x620c, 0xc2b4,
+	0x620e, 0x0058, 0x7814, 0x0096, 0x904d, 0x0120, 0x9006, 0xa89a,
+	0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300, 0xb8a0, 0x9086, 0x007e,
+	0x1904, 0x8be6, 0x00d6, 0x2069, 0x193c, 0x2001, 0x1836, 0x2004,
+	0xd0a4, 0x0178, 0x6800, 0x700a, 0x6808, 0x9084, 0x2000, 0x7012,
+	0x680c, 0x7016, 0x701f, 0x2710, 0x6818, 0x7022, 0x681c, 0x7026,
+	0x0080, 0x6800, 0x700a, 0x6804, 0x700e, 0x6808, 0x080c, 0x7096,
+	0x1118, 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff, 0x7012, 0x680c,
+	0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805,
+	0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099,
+	0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, 0x97d3, 0x2069,
+	0x1944, 0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, 0x080c, 0x538c,
+	0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de, 0x04a0, 0x2001, 0x1836,
+	0x2004, 0xd0a4, 0x0168, 0x0016, 0x2009, 0x0002, 0x60e0, 0x9106,
+	0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x24b1, 0x61e2, 0x001e,
+	0x20e1, 0x0001, 0x2099, 0x193c, 0x20e9, 0x0000, 0x20a1, 0x024e,
+	0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1805, 0x20a1,
+	0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a,
+	0x4003, 0x080c, 0x97d3, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x2099,
+	0x1944, 0x4003, 0x60c3, 0x0074, 0x0804, 0x8f6c, 0x080c, 0x8d05,
+	0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800, 0x700f, 0x2000,
+	0x9006, 0x00f6, 0x2079, 0x1853, 0x7904, 0x00fe, 0xd1ac, 0x1110,
+	0x9085, 0x0020, 0x0010, 0x9085, 0x0010, 0x9085, 0x0002, 0x00d6,
+	0x0804, 0x8cb5, 0x7026, 0x60c3, 0x0014, 0x0804, 0x8f6c, 0x080c,
+	0x8d05, 0x7003, 0x5000, 0x0804, 0x8b95, 0x080c, 0x8d05, 0x7003,
+	0x2110, 0x7007, 0x0014, 0x60c3, 0x0014, 0x0804, 0x8f6c, 0x080c,
+	0x8d47, 0x0010, 0x080c, 0x8d50, 0x7003, 0x0200, 0x60c3, 0x0004,
+	0x0804, 0x8f6c, 0x080c, 0x8d50, 0x7003, 0x0100, 0x700b, 0x0003,
+	0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0x8f6c, 0x080c, 0x8d50,
+	0x7003, 0x0200, 0x0804, 0x8b95, 0x080c, 0x8d50, 0x7003, 0x0100,
+	0x782c, 0x9005, 0x0110, 0x700a, 0x0010, 0x700b, 0x0003, 0x7814,
+	0x700e, 0x60c3, 0x0008, 0x0804, 0x8f6c, 0x00d6, 0x080c, 0x8d50,
+	0x7003, 0x0210, 0x7007, 0x0014, 0x700b, 0x0800, 0xb894, 0x9086,
+	0x0014, 0x1198, 0xb99c, 0x9184, 0x0030, 0x0190, 0xb998, 0x9184,
+	0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f, 0x2100, 0x0058, 0x700f,
+	0x0100, 0x0040, 0x700f, 0x0400, 0x0028, 0x700f, 0x0700, 0x0010,
+	0x700f, 0x0800, 0x00f6, 0x2079, 0x1853, 0x7904, 0x00fe, 0xd1ac,
+	0x1110, 0x9085, 0x0020, 0x0010, 0x9085, 0x0010, 0x2009, 0x1875,
+	0x210c, 0xd184, 0x1110, 0x9085, 0x0002, 0x0026, 0x2009, 0x1873,
+	0x210c, 0xd1e4, 0x0150, 0xc0c5, 0xbac4, 0xd28c, 0x1108, 0xc0cd,
+	0x9094, 0x0030, 0x9296, 0x0010, 0x0140, 0xd1ec, 0x0130, 0x9094,
+	0x0030, 0x9296, 0x0010, 0x0108, 0xc0bd, 0x002e, 0x7026, 0x60c3,
+	0x0014, 0x00de, 0x0804, 0x8f6c, 0x080c, 0x8d50, 0x7003, 0x0210,
+	0x7007, 0x0014, 0x700f, 0x0100, 0x60c3, 0x0014, 0x0804, 0x8f6c,
+	0x080c, 0x8d50, 0x7003, 0x0200, 0x0804, 0x8b1b, 0x080c, 0x8d50,
+	0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008,
+	0x0804, 0x8f6c, 0x080c, 0x8d50, 0x7003, 0x0100, 0x700b, 0x000b,
+	0x60c3, 0x0008, 0x0804, 0x8f6c, 0x0026, 0x00d6, 0x0036, 0x0046,
+	0x2019, 0x3200, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036,
+	0x0046, 0x2019, 0x2200, 0x2021, 0x0100, 0x080c, 0x97e8, 0xb810,
+	0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878, 0x700a,
+	0x687c, 0x700e, 0x9485, 0x0029, 0x7012, 0x004e, 0x003e, 0x00de,
+	0x080c, 0x8f60, 0x721a, 0x9f95, 0x0000, 0x7222, 0x7027, 0xffff,
+	0x2071, 0x024c, 0x002e, 0x0005, 0x0026, 0x080c, 0x97e8, 0x7003,
+	0x02ff, 0x7007, 0xfffc, 0x00d6, 0x2069, 0x1800, 0x6878, 0x700a,
+	0x687c, 0x700e, 0x00de, 0x7013, 0x2029, 0x0c10, 0x7003, 0x0100,
+	0x7007, 0x0000, 0x700b, 0xfc02, 0x700f, 0x0000, 0x0005, 0x0026,
+	0x00d6, 0x0036, 0x0046, 0x2019, 0x3300, 0x2021, 0x0800, 0x0040,
+	0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2300, 0x2021, 0x0100,
+	0x080c, 0x97e8, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069,
+	0x1800, 0xb810, 0x9005, 0x1140, 0xb814, 0x9005, 0x1128, 0x700b,
+	0x00ff, 0x700f, 0xfffe, 0x0020, 0x6878, 0x700a, 0x687c, 0x700e,
+	0x0000, 0x9485, 0x0098, 0x7012, 0x004e, 0x003e, 0x00de, 0x080c,
+	0x8f60, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c,
+	0x002e, 0x0005, 0x080c, 0x8f60, 0x721a, 0x7a08, 0x7222, 0x7814,
+	0x7026, 0x2071, 0x024c, 0x002e, 0x0005, 0x00b6, 0x00c6, 0x00d6,
+	0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a,
+	0x0085, 0x0a0c, 0x0d65, 0x908a, 0x0092, 0x1a0c, 0x0d65, 0x6110,
+	0x2158, 0xb984, 0x2c78, 0x2061, 0x0100, 0x619a, 0x9082, 0x0085,
+	0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x8dbe,
+	0x8dcd, 0x8dd8, 0x8dbc, 0x8dbc, 0x8dbc, 0x8dbe, 0x8dbc, 0x8dbc,
+	0x8dbc, 0x8dbc, 0x8dbc, 0x8dbc, 0x080c, 0x0d65, 0x0411, 0x60c3,
+	0x0000, 0x0026, 0x080c, 0x27c1, 0x0228, 0x2011, 0x0101, 0x2204,
+	0xc0c5, 0x2012, 0x002e, 0x0804, 0x8f6c, 0x0431, 0x7808, 0x700a,
+	0x7814, 0x700e, 0x7017, 0xffff, 0x60c3, 0x000c, 0x0804, 0x8f6c,
+	0x0479, 0x7003, 0x0003, 0x7007, 0x0300, 0x60c3, 0x0004, 0x0804,
+	0x8f6c, 0x0026, 0x080c, 0x97e8, 0xb810, 0x9085, 0x8100, 0x7002,
+	0xb814, 0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e,
+	0x7013, 0x0009, 0x0804, 0x8d20, 0x0026, 0x080c, 0x97e8, 0xb810,
+	0x9085, 0x8400, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878,
+	0x700a, 0x687c, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x8d82,
+	0x0026, 0x080c, 0x97e8, 0xb810, 0x9085, 0x8500, 0x7002, 0xb814,
+	0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x2001,
+	0x0099, 0x7012, 0x0804, 0x8d82, 0x00b6, 0x00c6, 0x00d6, 0x00e6,
+	0x00f6, 0x2c78, 0x2069, 0x0200, 0x2071, 0x0240, 0x7804, 0x908a,
+	0x0040, 0x0a0c, 0x0d65, 0x908a, 0x0057, 0x1a0c, 0x0d65, 0x7910,
+	0x2158, 0xb984, 0x2061, 0x0100, 0x619a, 0x9082, 0x0040, 0x0033,
+	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x8e51, 0x8e51,
+	0x8e51, 0x8e77, 0x8e51, 0x8e51, 0x8e51, 0x8e51, 0x8e51, 0x8e51,
+	0x8e51, 0x9338, 0x9340, 0x9348, 0x9350, 0x8e51, 0x8e51, 0x8e51,
+	0x9330, 0x080c, 0x0d65, 0x6813, 0x0008, 0xba8c, 0x8210, 0xb8c4,
+	0xd084, 0x0128, 0x7a4e, 0x7b14, 0x7b52, 0x722e, 0x732a, 0x9294,
+	0x00ff, 0xba8e, 0x8217, 0x721a, 0xba10, 0x9295, 0x0600, 0x7202,
+	0xba14, 0x7206, 0x2069, 0x1800, 0x6a78, 0x720a, 0x6a7c, 0x720e,
+	0x7013, 0x0829, 0x2f10, 0x7222, 0x7027, 0xffff, 0x0005, 0x0016,
+	0x7814, 0x9084, 0x0700, 0x8007, 0x0013, 0x001e, 0x0005, 0x8e87,
+	0x8e87, 0x8e89, 0x8e87, 0x8e87, 0x8e87, 0x8ea3, 0x8e87, 0x080c,
+	0x0d65, 0x7914, 0x918c, 0x08ff, 0x918d, 0xf600, 0x7916, 0x2009,
+	0x0003, 0x00b9, 0x2069, 0x1853, 0x6804, 0xd0bc, 0x0130, 0x682c,
+	0x9084, 0x00ff, 0x8007, 0x7032, 0x0010, 0x7033, 0x3f00, 0x60c3,
+	0x0001, 0x0804, 0x8f6c, 0x2009, 0x0003, 0x0019, 0x7033, 0x7f00,
+	0x0cb0, 0x0016, 0x080c, 0x97e8, 0x001e, 0xb810, 0x9085, 0x0100,
+	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6a78, 0x720a, 0x6a7c,
+	0x720e, 0x7013, 0x0888, 0x918d, 0x0008, 0x7116, 0x080c, 0x8f60,
+	0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x0005, 0x00b6, 0x0096,
+	0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100,
+	0x2071, 0x1800, 0x7810, 0x2058, 0xb8a0, 0x2028, 0xb910, 0xba14,
+	0x7378, 0x747c, 0x7820, 0x0002, 0x8eeb, 0x8eeb, 0x8eeb, 0x8eeb,
+	0x8eeb, 0x8eeb, 0x8eeb, 0x8eeb, 0x8eeb, 0x8eeb, 0x8eed, 0x8eeb,
+	0x8eeb, 0x8eeb, 0x8eeb, 0x080c, 0x0d65, 0xb884, 0x609e, 0x7814,
+	0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90, 0x9784, 0xff00, 0x9105,
+	0x6062, 0x873f, 0x9784, 0xff00, 0x0006, 0x7814, 0x2048, 0xa878,
+	0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94, 0x87ff, 0x0198, 0x2039,
+	0x0098, 0x9705, 0x6072, 0x7808, 0x6082, 0x2f00, 0x6086, 0x0038,
+	0x9185, 0x2200, 0x6062, 0x6073, 0x0129, 0x6077, 0x0000, 0xb884,
+	0x609e, 0x0050, 0x2039, 0x0029, 0x9705, 0x6072, 0x0cc0, 0x9185,
+	0x0200, 0x6062, 0x6073, 0x2029, 0xa87c, 0xd0fc, 0x0118, 0xaf94,
+	0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808, 0x6086, 0x6266, 0x636a,
+	0x646e, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e,
+	0x8007, 0x607a, 0x607f, 0x0000, 0xa848, 0x608a, 0xa844, 0x608e,
+	0xa838, 0x60c6, 0xa834, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5,
+	0x60d7, 0x0000, 0x080c, 0x97c8, 0x2009, 0x07d0, 0x60c4, 0x9084,
+	0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x81ef, 0x003e,
+	0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005,
+	0x7a40, 0x9294, 0x00ff, 0x8217, 0x0005, 0x00d6, 0x2069, 0x19b7,
+	0x686b, 0x0001, 0x00de, 0x0005, 0x60a3, 0x0056, 0x60a7, 0x9575,
+	0x00f1, 0x080c, 0x81e1, 0x0005, 0x0016, 0x2001, 0x180c, 0x200c,
+	0x9184, 0x0600, 0x9086, 0x0600, 0x0128, 0x0089, 0x080c, 0x81e1,
+	0x001e, 0x0005, 0xc1e5, 0x2001, 0x180c, 0x2102, 0x2001, 0x19b8,
+	0x2003, 0x0000, 0x2001, 0x19c3, 0x2003, 0x0000, 0x0c88, 0x0006,
+	0x0016, 0x0026, 0x2009, 0x1804, 0x2011, 0x0009, 0x080c, 0x289b,
+	0x002e, 0x001e, 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x080c,
+	0x98bb, 0x0106, 0x2061, 0x0100, 0x61a4, 0x60a7, 0x95f5, 0x0016,
+	0x0026, 0x2009, 0x1804, 0x2011, 0x0008, 0x080c, 0x289b, 0x002e,
+	0x001e, 0x010e, 0x090c, 0x98d7, 0x000e, 0xa001, 0xa001, 0xa001,
+	0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x7096, 0x1510, 0x2001,
+	0x19dc, 0x2004, 0x9005, 0x1904, 0x901b, 0x080c, 0x7137, 0x11a8,
+	0x2069, 0x0380, 0x6843, 0x0101, 0x6844, 0xd084, 0x1de8, 0x2061,
+	0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084, 0x090c, 0x0d65,
+	0x6843, 0x0100, 0x080c, 0x81e1, 0x04b0, 0x00c6, 0x2061, 0x19b7,
+	0x00f0, 0x6904, 0x9194, 0x4000, 0x0598, 0x080c, 0x8f9c, 0x080c,
+	0x2862, 0x00c6, 0x2061, 0x19b7, 0x6134, 0x9192, 0x0008, 0x1278,
+	0x8108, 0x6136, 0x080c, 0x98bb, 0x6130, 0x080c, 0x98d7, 0x00ce,
+	0x81ff, 0x01c8, 0x080c, 0x81e1, 0x080c, 0x8f8f, 0x00a0, 0x080c,
+	0x98bb, 0x6130, 0x91e5, 0x0000, 0x0150, 0x080c, 0xd621, 0x080c,
+	0x81ea, 0x6003, 0x0001, 0x2009, 0x0014, 0x080c, 0x9c76, 0x080c,
+	0x98d7, 0x00ce, 0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005,
+	0x2001, 0x19dc, 0x2004, 0x9005, 0x1db0, 0x00c6, 0x2061, 0x19b7,
+	0x6134, 0x9192, 0x0003, 0x1ad8, 0x8108, 0x6136, 0x00ce, 0x080c,
+	0x81e1, 0x080c, 0x5b92, 0x2009, 0x1852, 0x2114, 0x8210, 0x220a,
+	0x0c10, 0x0096, 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c,
+	0x81f7, 0x080c, 0x98bb, 0x2001, 0x0387, 0x2003, 0x0202, 0x2071,
+	0x19b7, 0x714c, 0x81ff, 0x0904, 0x90af, 0x2061, 0x0100, 0x2069,
+	0x0140, 0x080c, 0x7096, 0x11c0, 0x0036, 0x2019, 0x0002, 0x080c,
+	0x9269, 0x003e, 0x714c, 0x2160, 0x080c, 0xd621, 0x2009, 0x004a,
+	0x6003, 0x0003, 0x080c, 0x9c76, 0x2001, 0x0386, 0x2003, 0x5040,
+	0x080c, 0x7137, 0x0804, 0x90af, 0x6904, 0xd1f4, 0x0904, 0x90bc,
+	0x080c, 0x2862, 0x00c6, 0x704c, 0x9065, 0x090c, 0x0d65, 0x6020,
+	0x00ce, 0x9086, 0x0006, 0x1518, 0x61c8, 0x60c4, 0x9105, 0x11f8,
+	0x2009, 0x180c, 0x2104, 0xd0d4, 0x01d0, 0x6214, 0x9294, 0x1800,
+	0x1128, 0x6224, 0x9294, 0x0002, 0x1510, 0x0010, 0xc0d4, 0x200a,
+	0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, 0x704c, 0x2060,
+	0x080c, 0x88b8, 0x2009, 0x0049, 0x080c, 0x9c76, 0x0080, 0x0036,
+	0x2019, 0x0001, 0x080c, 0x9269, 0x003e, 0x714c, 0x2160, 0x080c,
+	0xd621, 0x2009, 0x004a, 0x6003, 0x0003, 0x080c, 0x9c76, 0x2001,
+	0x0387, 0x2003, 0x0200, 0x080c, 0x98d7, 0x002e, 0x001e, 0x00ee,
+	0x00de, 0x00ce, 0x009e, 0x0005, 0xd1ec, 0x1904, 0x9070, 0x0804,
+	0x9072, 0x0026, 0x00e6, 0x2071, 0x19b7, 0x706c, 0xd084, 0x01d0,
+	0xc084, 0x706e, 0x714c, 0x81ff, 0x01a8, 0x2071, 0x0100, 0x9188,
+	0x0008, 0x2114, 0x928e, 0x0006, 0x1138, 0x2009, 0x1984, 0x2011,
+	0x0012, 0x080c, 0x289b, 0x0030, 0x2009, 0x1984, 0x2011, 0x0016,
+	0x080c, 0x289b, 0x00ee, 0x002e, 0x0005, 0x9036, 0x2001, 0x19c1,
+	0x2004, 0x9005, 0x0128, 0x9c06, 0x0128, 0x2c30, 0x600c, 0x0cc8,
+	0x9085, 0x0001, 0x0005, 0x00f6, 0x2079, 0x19b7, 0x610c, 0x9006,
+	0x600e, 0x6044, 0xc0fc, 0x6046, 0x86ff, 0x1140, 0x7824, 0x9c06,
+	0x1118, 0x7826, 0x782a, 0x0050, 0x792a, 0x0040, 0x00c6, 0x2660,
+	0x610e, 0x00ce, 0x7824, 0x9c06, 0x1108, 0x7e26, 0x080c, 0x935b,
+	0x080c, 0xba31, 0x00fe, 0x0005, 0x080c, 0x8d05, 0x7003, 0x1200,
+	0x7838, 0x7012, 0x783c, 0x7016, 0x00c6, 0x7820, 0x9086, 0x0004,
+	0x1148, 0x7810, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb810, 0xb914,
+	0x00be, 0x0020, 0x2061, 0x1800, 0x6078, 0x617c, 0x9084, 0x00ff,
+	0x700a, 0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804, 0x8f6c, 0x080c,
+	0x8d05, 0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128, 0xb810, 0x9084,
+	0x00ff, 0x700a, 0xb814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8f6c,
+	0x0156, 0x080c, 0x8d50, 0x7003, 0x0200, 0x2011, 0x1848, 0x63f0,
+	0x2312, 0x20a9, 0x0006, 0x2011, 0x1840, 0x2019, 0x1841, 0x9ef0,
+	0x0002, 0x2376, 0x8e70, 0x2276, 0x8e70, 0x9398, 0x0002, 0x9290,
+	0x0002, 0x1f04, 0x9159, 0x60c3, 0x001c, 0x015e, 0x0804, 0x8f6c,
+	0x0016, 0x0026, 0x080c, 0x8d2c, 0x080c, 0x8d3e, 0x9e80, 0x0004,
+	0x20e9, 0x0000, 0x20a0, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048,
+	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x009e, 0x7808,
+	0x9088, 0x0002, 0x21a8, 0x9192, 0x0010, 0x1250, 0x4003, 0x9080,
+	0x0004, 0x8003, 0x60c2, 0x080c, 0x8f6c, 0x002e, 0x001e, 0x0005,
+	0x20a9, 0x0010, 0x4003, 0x080c, 0x97d3, 0x20a1, 0x0240, 0x22a8,
+	0x4003, 0x0c68, 0x080c, 0x8d05, 0x7003, 0x6200, 0x7808, 0x700e,
+	0x60c3, 0x0008, 0x0804, 0x8f6c, 0x0016, 0x0026, 0x080c, 0x8d05,
+	0x20e9, 0x0000, 0x20a1, 0x024c, 0x7814, 0x0096, 0x2048, 0xa800,
+	0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098, 0x009e,
+	0x7808, 0x9088, 0x0002, 0x21a8, 0x4003, 0x8003, 0x60c2, 0x080c,
+	0x8f6c, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x19b7, 0x7010, 0x2060, 0x8cff, 0x0188,
+	0x080c, 0xba57, 0x1110, 0x080c, 0xa581, 0x600c, 0x0006, 0x080c,
+	0xbcd3, 0x600f, 0x0000, 0x080c, 0x9bda, 0x080c, 0x935b, 0x00ce,
+	0x0c68, 0x2c00, 0x7012, 0x700e, 0x012e, 0x000e, 0x00ce, 0x00ee,
+	0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
+	0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c,
+	0x918c, 0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071,
+	0x19b7, 0x7030, 0x2060, 0x8cff, 0x0548, 0x080c, 0x8f9c, 0x6ac0,
+	0x68c3, 0x0000, 0x080c, 0x81ea, 0x00c6, 0x2061, 0x0100, 0x080c,
+	0x97ec, 0x00ce, 0x20a9, 0x01f4, 0x04b1, 0x080c, 0x885d, 0x6044,
+	0xd0ac, 0x1128, 0x2001, 0x1958, 0x2004, 0x604a, 0x0020, 0x2009,
+	0x0013, 0x080c, 0x9c76, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce,
+	0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x2001, 0x1800,
+	0x2004, 0x9096, 0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c,
+	0x81ea, 0x6814, 0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817,
+	0x0008, 0x68c3, 0x0000, 0x2011, 0x5b3c, 0x080c, 0x8138, 0x20a9,
+	0x01f4, 0x0009, 0x08c0, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004,
+	0x7804, 0x9084, 0x4000, 0x190c, 0x2862, 0x0090, 0xd084, 0x0118,
+	0x6827, 0x0001, 0x0010, 0x1f04, 0x924b, 0x7804, 0x9084, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2852, 0x9006, 0x080c, 0x2852,
+	0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
+	0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c,
+	0x918c, 0xdbff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071,
+	0x0380, 0x701c, 0x0006, 0x701f, 0x0202, 0x2071, 0x19b7, 0x704c,
+	0x2060, 0x8cff, 0x0904, 0x930a, 0x9386, 0x0002, 0x1128, 0x6814,
+	0x9084, 0x0002, 0x0904, 0x930a, 0x68af, 0x95f5, 0x6817, 0x0010,
+	0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008, 0x080c,
+	0x81f7, 0x080c, 0x1c87, 0x0046, 0x2009, 0x00a5, 0x080c, 0x0e3d,
+	0x2021, 0x0169, 0x2404, 0x9084, 0x000f, 0x9086, 0x0004, 0x11f8,
+	0x68af, 0x95f5, 0x68c6, 0x68cb, 0x0008, 0x00e6, 0x00f6, 0x2079,
+	0x0090, 0x2071, 0x19b7, 0x6814, 0x9084, 0x1984, 0x9085, 0x0012,
+	0x6816, 0x782b, 0x0008, 0x7057, 0x0000, 0x00fe, 0x00ee, 0x9386,
+	0x0002, 0x1128, 0x7884, 0x9005, 0x1110, 0x7887, 0x0001, 0x0016,
+	0x2009, 0x0040, 0x080c, 0x2063, 0x001e, 0x2009, 0x0000, 0x080c,
+	0x0e3d, 0x004e, 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0140, 0x6827,
+	0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2862, 0x0090, 0xd08c,
+	0x0118, 0x6827, 0x0002, 0x0010, 0x1f04, 0x92dc, 0x7804, 0x9084,
+	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2852, 0x9006, 0x080c,
+	0x2852, 0x6827, 0x4000, 0x6824, 0x83ff, 0x1160, 0x2009, 0x0049,
+	0x080c, 0x88b8, 0x6044, 0xd0ac, 0x1118, 0x6003, 0x0002, 0x0010,
+	0x080c, 0x9c76, 0x000e, 0x2071, 0x0380, 0xd08c, 0x1110, 0x701f,
+	0x0200, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000,
+	0x2069, 0x19b7, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126,
+	0x2091, 0x8000, 0x2069, 0x19b7, 0x6a3e, 0x012e, 0x00de, 0x0005,
+	0x080c, 0x8e53, 0x785c, 0x7032, 0x7042, 0x7047, 0x1000, 0x00f8,
+	0x080c, 0x8e53, 0x785c, 0x7032, 0x7042, 0x7047, 0x4000, 0x00b8,
+	0x080c, 0x8e53, 0x785c, 0x7032, 0x7042, 0x7047, 0x2000, 0x0078,
+	0x080c, 0x8e53, 0x785c, 0x7032, 0x7042, 0x7047, 0x0400, 0x0038,
+	0x080c, 0x8e53, 0x785c, 0x7032, 0x7042, 0x7047, 0x0200, 0x60c3,
+	0x0020, 0x0804, 0x8f6c, 0x00e6, 0x2071, 0x19b7, 0x702c, 0x9005,
+	0x0110, 0x8001, 0x702e, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6,
+	0x00c6, 0x0076, 0x0066, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x19b7, 0x7620, 0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, 0x0904,
+	0x9400, 0x8cff, 0x0904, 0x9400, 0x6020, 0x9086, 0x0006, 0x1904,
+	0x93fb, 0x88ff, 0x0138, 0x2800, 0x9c06, 0x1904, 0x93fb, 0x2039,
+	0x0000, 0x0050, 0x6010, 0x9b06, 0x1904, 0x93fb, 0x85ff, 0x0120,
+	0x605c, 0x9106, 0x1904, 0x93fb, 0x7030, 0x9c06, 0x15b0, 0x2069,
+	0x0100, 0x68c0, 0x9005, 0x1160, 0x6824, 0xd084, 0x0148, 0x6827,
+	0x0001, 0x080c, 0x81ea, 0x080c, 0x9485, 0x7033, 0x0000, 0x0428,
+	0x080c, 0x81ea, 0x6820, 0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817,
+	0x0008, 0x68c3, 0x0000, 0x080c, 0x9485, 0x7033, 0x0000, 0x0036,
+	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
+	0x080c, 0x2852, 0x9006, 0x080c, 0x2852, 0x2069, 0x0100, 0x6824,
+	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7020, 0x9c36, 0x1110,
+	0x660c, 0x7622, 0x701c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
+	0x2f00, 0x701e, 0x0010, 0x701f, 0x0000, 0x660c, 0x0066, 0x2c00,
+	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1168, 0x600f,
+	0x0000, 0x6014, 0x0096, 0x2048, 0x080c, 0xb840, 0x0110, 0x080c,
+	0xd22f, 0x009e, 0x080c, 0x9c14, 0x080c, 0x935b, 0x88ff, 0x1190,
+	0x00ce, 0x0804, 0x9376, 0x2c78, 0x600c, 0x2060, 0x0804, 0x9376,
+	0x9006, 0x012e, 0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88,
+	0x00f6, 0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0066, 0x0026, 0x0006,
+	0x0126, 0x2091, 0x8000, 0x2071, 0x19b7, 0x7648, 0x2660, 0x2678,
+	0x8cff, 0x0904, 0x9474, 0x6020, 0x9086, 0x0006, 0x1904, 0x946f,
+	0x87ff, 0x0128, 0x2700, 0x9c06, 0x1904, 0x946f, 0x0040, 0x6010,
+	0x9b06, 0x15e8, 0x85ff, 0x0118, 0x605c, 0x9106, 0x15c0, 0x704c,
+	0x9c06, 0x1168, 0x0036, 0x2019, 0x0001, 0x080c, 0x9269, 0x703f,
+	0x0000, 0x9006, 0x704e, 0x706a, 0x7052, 0x706e, 0x003e, 0x7048,
+	0x9c36, 0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00,
+	0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c,
+	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
+	0x0000, 0x6014, 0x2048, 0x080c, 0xb840, 0x0110, 0x080c, 0xd22f,
+	0x080c, 0x9c14, 0x87ff, 0x1198, 0x00ce, 0x0804, 0x9420, 0x2c78,
+	0x600c, 0x2060, 0x0804, 0x9420, 0x9006, 0x012e, 0x000e, 0x002e,
+	0x006e, 0x00ce, 0x009e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b,
+	0x0000, 0x00ce, 0x97bd, 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19b7,
+	0x9006, 0x7032, 0x700a, 0x7004, 0x9086, 0x0003, 0x0158, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010,
+	0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066,
+	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b7, 0x2c10,
+	0x7648, 0x2660, 0x2678, 0x8cff, 0x0540, 0x2200, 0x9c06, 0x1508,
+	0x7048, 0x9c36, 0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140,
+	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000,
+	0x660c, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
+	0x0000, 0x6004, 0x9086, 0x0040, 0x090c, 0x885d, 0x9085, 0x0001,
+	0x0020, 0x2c78, 0x600c, 0x2060, 0x08b0, 0x012e, 0x000e, 0x002e,
+	0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6,
+	0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000,
+	0x2071, 0x19b7, 0x7610, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9572,
+	0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904, 0x956d,
 	0x7030, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904,
-	0x987c, 0x080c, 0x8fb7, 0x68c3, 0x0000, 0x080c, 0x94a2, 0x7033,
+	0x9544, 0x080c, 0x8f9c, 0x68c3, 0x0000, 0x080c, 0x9485, 0x7033,
 	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2833, 0x9006, 0x080c, 0x2833, 0x2069,
+	0x2001, 0x0100, 0x080c, 0x2852, 0x9006, 0x080c, 0x2852, 0x2069,
 	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7010,
 	0x9c36, 0x1110, 0x660c, 0x7612, 0x700c, 0x9c36, 0x1140, 0x2c00,
 	0x9f36, 0x0118, 0x2f00, 0x700e, 0x0010, 0x700f, 0x0000, 0x660c,
 	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x080c, 0xba4b, 0x1158, 0x080c, 0x303b, 0x080c, 0xba5c,
-	0x11f0, 0x080c, 0xa58f, 0x00d8, 0x080c, 0x94a2, 0x08c0, 0x080c,
-	0xba5c, 0x1118, 0x080c, 0xa58f, 0x0090, 0x6014, 0x2048, 0x080c,
-	0xb845, 0x0168, 0x6020, 0x9086, 0x0003, 0x1520, 0xa867, 0x0103,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0x6996, 0x080c, 0xba36, 0x080c,
-	0xbcd3, 0x080c, 0x9c21, 0x080c, 0x9378, 0x00ce, 0x0804, 0x982d,
-	0x2c78, 0x600c, 0x2060, 0x0804, 0x982d, 0x7013, 0x0000, 0x700f,
-	0x0000, 0x012e, 0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de, 0x00ee,
-	0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d08, 0x080c, 0xd21e,
-	0x08f0, 0x00f6, 0x0036, 0x2079, 0x0380, 0x7b18, 0xd3bc, 0x1de8,
-	0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x003e, 0x00fe, 0x0005,
-	0x0016, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001,
-	0x1188, 0x2001, 0x0015, 0x0c29, 0x2009, 0x1000, 0x2001, 0x0382,
-	0x2004, 0x9084, 0x0007, 0x9086, 0x0003, 0x0120, 0x8109, 0x1db0,
-	0x080c, 0x0d65, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084,
-	0x0007, 0x9086, 0x0003, 0x1120, 0x2001, 0x0380, 0x2003, 0x0001,
-	0x0005, 0x0156, 0x0016, 0x0026, 0x00e6, 0x900e, 0x2071, 0x19b8,
-	0x0469, 0x0106, 0x0190, 0x7004, 0x9086, 0x0003, 0x0148, 0x20a9,
-	0x1000, 0x6044, 0xd0fc, 0x01d8, 0x1f04, 0x9901, 0x080c, 0x0d65,
-	0x080c, 0x98c8, 0x6044, 0xd0fc, 0x0190, 0x7030, 0x9c06, 0x1148,
-	0x080c, 0x8874, 0x6044, 0xd0dc, 0x0150, 0xc0dc, 0x6046, 0x700a,
-	0x7042, 0x704c, 0x9c06, 0x190c, 0x0d65, 0x080c, 0x88d1, 0x010e,
-	0x1919, 0x00ee, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x0382,
-	0x2004, 0x9084, 0x0007, 0x9086, 0x0003, 0x0005, 0x0126, 0x2091,
-	0x2400, 0x7808, 0xd0a4, 0x190c, 0x0d5e, 0xd09c, 0x0128, 0x7820,
-	0x908c, 0xf000, 0x11b8, 0x0012, 0x012e, 0x0005, 0x994e, 0x998c,
-	0x99b3, 0x99e3, 0x99f3, 0x9a04, 0x9a13, 0x9a21, 0x9a32, 0x9a36,
-	0x994e, 0x994e, 0x994e, 0x994e, 0x994e, 0x994e, 0x080c, 0x0d65,
-	0x012e, 0x0005, 0x2060, 0x6044, 0xd0bc, 0x0140, 0xc0bc, 0x6046,
-	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65, 0x0012, 0x012e, 0x0005,
-	0x9973, 0x9975, 0x9973, 0x997b, 0x9973, 0x9973, 0x9973, 0x9973,
-	0x9973, 0x9975, 0x9973, 0x9975, 0x9973, 0x9975, 0x9973, 0x9973,
-	0x9973, 0x9975, 0x9973, 0x080c, 0x0d65, 0x2009, 0x0013, 0x080c,
-	0x9c85, 0x012e, 0x0005, 0x6014, 0x2048, 0xa87c, 0xd0dc, 0x0130,
-	0x080c, 0x83c0, 0x080c, 0x9be7, 0x012e, 0x0005, 0x2009, 0x0049,
-	0x080c, 0x9c85, 0x012e, 0x0005, 0x080c, 0x98c8, 0x2001, 0x19dd,
-	0x2003, 0x0000, 0x7030, 0x9065, 0x090c, 0x0d65, 0x7034, 0x9092,
-	0x00c8, 0x1258, 0x8000, 0x7036, 0x7004, 0x9086, 0x0003, 0x0110,
-	0x7007, 0x0000, 0x781f, 0x0808, 0x0040, 0x080c, 0xd610, 0x6003,
-	0x0001, 0x2009, 0x0014, 0x080c, 0x9c85, 0x781f, 0x0100, 0x080c,
-	0x98e4, 0x012e, 0x0005, 0x080c, 0x98c8, 0x714c, 0x81ff, 0x1128,
-	0x2011, 0x19e0, 0x2013, 0x0000, 0x0400, 0x2061, 0x0100, 0x7150,
-	0x9192, 0x7530, 0x12b8, 0x8108, 0x7152, 0x714c, 0x9188, 0x0008,
-	0x210c, 0x918e, 0x0006, 0x1138, 0x6014, 0x9084, 0x1984, 0x9085,
-	0x0012, 0x6016, 0x0050, 0x6014, 0x9084, 0x1984, 0x9085, 0x0016,
-	0x6016, 0x0018, 0x706c, 0xc085, 0x706e, 0x781f, 0x0200, 0x080c,
-	0x98e4, 0x012e, 0x0005, 0x080c, 0x98c8, 0x714c, 0x2160, 0x6003,
-	0x0003, 0x2009, 0x004a, 0x080c, 0x9c85, 0x781f, 0x0200, 0x080c,
-	0x98e4, 0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060,
-	0x6003, 0x0003, 0x080c, 0x98c8, 0x080c, 0x1c02, 0x781f, 0x0400,
-	0x080c, 0x98e4, 0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820,
-	0x2060, 0x080c, 0x98c8, 0x080c, 0x1c4a, 0x781f, 0x0400, 0x080c,
-	0x98e4, 0x012e, 0x0005, 0x7030, 0x9065, 0x0148, 0x6044, 0xc0bc,
-	0x6046, 0x7104, 0x9186, 0x0003, 0x0110, 0x080c, 0x8937, 0x012e,
-	0x0005, 0x00f6, 0x703c, 0x9086, 0x0002, 0x0148, 0x704c, 0x907d,
-	0x0130, 0x7844, 0xc0bc, 0x7846, 0x080c, 0x8ee1, 0x0000, 0x00fe,
-	0x012e, 0x0005, 0x080c, 0x7158, 0x012e, 0x0005, 0x080c, 0x0d65,
-	0x0005, 0x00e6, 0x2071, 0x19b8, 0x6044, 0xc0bc, 0x6046, 0xd0fc,
-	0x01b8, 0x704c, 0x9c06, 0x1190, 0x2019, 0x0001, 0x080c, 0x9286,
-	0x704f, 0x0000, 0x2001, 0x0109, 0x2004, 0xd08c, 0x1138, 0x2001,
-	0x0108, 0x2004, 0xd0bc, 0x1110, 0x703f, 0x0000, 0x080c, 0x94b8,
-	0x00ee, 0x0005, 0x0026, 0x7010, 0x9c06, 0x1178, 0x080c, 0x9378,
-	0x6044, 0xc0fc, 0x6046, 0x600c, 0x9015, 0x0120, 0x7212, 0x600f,
-	0x0000, 0x0010, 0x7212, 0x720e, 0x9006, 0x002e, 0x0005, 0x0026,
-	0x7020, 0x9c06, 0x1178, 0x080c, 0x9378, 0x6044, 0xc0fc, 0x6046,
-	0x600c, 0x9015, 0x0120, 0x7222, 0x600f, 0x0000, 0x0010, 0x7222,
-	0x721e, 0x9006, 0x002e, 0x0005, 0x00d6, 0x0036, 0x7830, 0x9c06,
-	0x1558, 0x2069, 0x0100, 0x68c0, 0x9005, 0x01f8, 0x080c, 0x820b,
-	0x080c, 0x8fb7, 0x68c3, 0x0000, 0x080c, 0x94a2, 0x2069, 0x0140,
-	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2833,
-	0x9006, 0x080c, 0x2833, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
-	0x6827, 0x0001, 0x9085, 0x0001, 0x0038, 0x7808, 0xc0ad, 0x780a,
-	0x6003, 0x0009, 0x630a, 0x9006, 0x003e, 0x00de, 0x0005, 0x0016,
-	0x0026, 0x0036, 0x6100, 0x2019, 0x0100, 0x2001, 0x0382, 0x2004,
-	0xd09c, 0x0190, 0x00c6, 0x0126, 0x2091, 0x2800, 0x0016, 0x0036,
-	0x080c, 0x992e, 0x003e, 0x001e, 0x012e, 0x00ce, 0x6200, 0x2200,
-	0x9106, 0x0d58, 0x2200, 0x0010, 0x8319, 0x1d38, 0x003e, 0x002e,
-	0x001e, 0x0005, 0x00d6, 0x0156, 0x080c, 0x8d6b, 0x7a14, 0x82ff,
-	0x0138, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0490,
-	0x7003, 0x0200, 0x7007, 0x0000, 0x2069, 0x1800, 0x901e, 0x6800,
-	0x9086, 0x0004, 0x1110, 0xc38d, 0x0060, 0x080c, 0x70b7, 0x1110,
-	0xc3ad, 0x0008, 0xc3a5, 0x6ad8, 0xd29c, 0x1110, 0xd2ac, 0x0108,
-	0xc39d, 0x730e, 0x2011, 0x1848, 0x63f0, 0x2312, 0x20a9, 0x0006,
-	0x2011, 0x1840, 0x2019, 0x1841, 0x2071, 0x0250, 0x2376, 0x8e70,
-	0x2276, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0x9b0e,
-	0x60c3, 0x0020, 0x080c, 0x8f87, 0x015e, 0x00de, 0x0005, 0x0156,
-	0x080c, 0x8d6b, 0x7a14, 0x82ff, 0x0168, 0x9286, 0xffff, 0x0118,
-	0x9282, 0x000e, 0x1238, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3,
-	0x0008, 0x0488, 0x7003, 0x0200, 0x7007, 0x001c, 0x700f, 0x0001,
-	0x2011, 0x198e, 0x2204, 0x8007, 0x701a, 0x8210, 0x2204, 0x8007,
-	0x701e, 0x0421, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001,
-	0x181e, 0x2004, 0x7022, 0x2001, 0x181f, 0x2004, 0x7026, 0x0030,
-	0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x7026, 0x20a9, 0x0004,
-	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256,
-	0x4003, 0x60c3, 0x001c, 0x015e, 0x0804, 0x8f87, 0x0006, 0x2001,
-	0x1836, 0x2004, 0xd0ac, 0x000e, 0x0005, 0x2011, 0x0003, 0x080c,
-	0x9339, 0x2011, 0x0002, 0x080c, 0x9343, 0x080c, 0x9206, 0x0036,
-	0x901e, 0x080c, 0x9286, 0x003e, 0x0005, 0x2071, 0x1883, 0x7000,
-	0x9005, 0x0140, 0x2001, 0x0812, 0x2071, 0x1800, 0x7072, 0x7076,
-	0x7067, 0xffd4, 0x2071, 0x1800, 0x7070, 0x7052, 0x7057, 0x1ddc,
+	0x0000, 0x080c, 0xba46, 0x1180, 0x080c, 0x303d, 0x080c, 0xba57,
+	0x1518, 0x080c, 0xa581, 0x0400, 0x080c, 0x9485, 0x6824, 0xd084,
+	0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, 0xba57, 0x1118, 0x080c,
+	0xa581, 0x0090, 0x6014, 0x2048, 0x080c, 0xb840, 0x0168, 0x6020,
+	0x9086, 0x0003, 0x1508, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
+	0x080c, 0x6985, 0x080c, 0xba31, 0x080c, 0xbcd3, 0x080c, 0x9c14,
+	0x080c, 0x935b, 0x00ce, 0x0804, 0x94ed, 0x2c78, 0x600c, 0x2060,
+	0x0804, 0x94ed, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de,
+	0x00ee, 0x00fe, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20,
+	0x080c, 0xd22f, 0x0c08, 0x00d6, 0x080c, 0x8d50, 0x7003, 0x0200,
+	0x7007, 0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099, 0x1959,
+	0x20e9, 0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023,
+	0x0004, 0x7027, 0x7878, 0x080c, 0x8f6c, 0x00de, 0x0005, 0x080c,
+	0x8d50, 0x700b, 0x0800, 0x7814, 0x9084, 0xff00, 0x700e, 0x7814,
+	0x9084, 0x00ff, 0x7022, 0x782c, 0x7026, 0x7860, 0x9084, 0x00ff,
+	0x9085, 0x0200, 0x7002, 0x7860, 0x9084, 0xff00, 0x8007, 0x7006,
+	0x60c2, 0x0804, 0x8f6c, 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68,
+	0x2009, 0x0035, 0x080c, 0xbed9, 0x00de, 0x1904, 0x9620, 0x080c,
+	0x8d05, 0x7003, 0x1300, 0x782c, 0x080c, 0x972b, 0x2068, 0x6820,
+	0x9086, 0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c, 0x9b59,
+	0x11d8, 0x9286, 0x007e, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe,
+	0x0498, 0x9286, 0x007f, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd,
+	0x0458, 0x9284, 0xff80, 0x0180, 0x9286, 0x0080, 0x1128, 0x700b,
+	0x00ff, 0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810,
+	0x700a, 0xb814, 0x700e, 0x00c0, 0xb884, 0x700e, 0x00a8, 0x080c,
+	0x9b59, 0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250,
+	0x00d6, 0x2069, 0x181e, 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e,
+	0x00de, 0x0010, 0x6034, 0x700e, 0x7838, 0x7012, 0x783c, 0x7016,
+	0x60c3, 0x000c, 0x001e, 0x00de, 0x080c, 0x8f6c, 0x00be, 0x0005,
+	0x781b, 0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x00be, 0x0005,
+	0x792c, 0x9180, 0x0008, 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186,
+	0x0003, 0x0904, 0x969e, 0x9186, 0x0005, 0x0904, 0x9686, 0x9186,
+	0x0004, 0x05f0, 0x9186, 0x0008, 0x0904, 0x968f, 0x7807, 0x0037,
+	0x782f, 0x0003, 0x7817, 0x1700, 0x080c, 0x9708, 0x0005, 0x080c,
+	0x96c9, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6800,
+	0x6a44, 0xd2fc, 0x11f8, 0x0002, 0x9667, 0x9672, 0x9669, 0x9672,
+	0x966e, 0x9667, 0x9667, 0x9672, 0x9672, 0x9672, 0x9672, 0x9667,
+	0x9667, 0x9667, 0x9667, 0x9667, 0x9672, 0x9667, 0x9672, 0x080c,
+	0x0d65, 0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010,
+	0x2009, 0x2000, 0x682c, 0x7022, 0x6830, 0x7026, 0x0804, 0x96c2,
+	0x080c, 0x96c9, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000,
+	0x6a00, 0x9286, 0x0002, 0x1108, 0x900e, 0x04e0, 0x080c, 0x96c9,
+	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x0498, 0x04c9,
+	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x9286, 0x0005,
+	0x0118, 0x9286, 0x0002, 0x1108, 0x900e, 0x0420, 0x0451, 0x00d6,
+	0x0026, 0x792c, 0x2168, 0x6814, 0x0096, 0x2048, 0xa9ac, 0xa834,
+	0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022, 0x7226, 0x792c,
+	0x9180, 0x0011, 0x2004, 0xd0fc, 0x1148, 0x9180, 0x0000, 0x2004,
+	0x908e, 0x0002, 0x0130, 0x908e, 0x0004, 0x0118, 0x2009, 0x4000,
+	0x0008, 0x900e, 0x712a, 0x60c3, 0x0018, 0x002e, 0x00de, 0x0804,
+	0x8f6c, 0x00b6, 0x0036, 0x0046, 0x0056, 0x0066, 0x080c, 0x8d50,
+	0x9006, 0x7003, 0x0200, 0x7938, 0x710a, 0x793c, 0x710e, 0x7810,
+	0x2058, 0xb8a0, 0x080c, 0x9b59, 0x1118, 0x9092, 0x007e, 0x0268,
+	0x00d6, 0x2069, 0x181e, 0x2d2c, 0x8d68, 0x2d34, 0x90d8, 0x1000,
+	0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028, 0x901e, 0xbc84, 0x2029,
+	0x0000, 0x6634, 0x782c, 0x9080, 0x0008, 0x2004, 0x9086, 0x0003,
+	0x1128, 0x7512, 0x7616, 0x731a, 0x741e, 0x0020, 0x7312, 0x7416,
+	0x751a, 0x761e, 0x006e, 0x005e, 0x004e, 0x003e, 0x00be, 0x0005,
+	0x080c, 0x8d50, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e,
+	0x700e, 0x60c3, 0x0008, 0x0804, 0x8f6c, 0x080c, 0x8cfc, 0x7003,
+	0x1400, 0x7838, 0x700a, 0x0079, 0x783c, 0x700e, 0x782c, 0x7012,
+	0x7830, 0x7016, 0x7834, 0x9084, 0x00ff, 0x8007, 0x701a, 0x60c3,
+	0x0010, 0x0804, 0x8f6c, 0x00e6, 0x2071, 0x0240, 0x0006, 0x00f6,
+	0x2078, 0x7810, 0x00b6, 0x2058, 0xb8c4, 0xd084, 0x0120, 0x7850,
+	0x702a, 0x784c, 0x702e, 0x00be, 0x00fe, 0x000e, 0x00ee, 0x0005,
+	0x080c, 0x8d47, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e,
+	0x60c3, 0x0008, 0x0804, 0x8f6c, 0x00a9, 0x7914, 0x712a, 0x60c3,
+	0x0000, 0x60a7, 0x9575, 0x0026, 0x080c, 0x27c1, 0x0228, 0x2011,
+	0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x080c, 0x8f8f, 0x080c,
+	0x81e1, 0x0005, 0x0036, 0x0096, 0x00d6, 0x00e6, 0x7860, 0x2048,
+	0xaa7c, 0x9296, 0x00c0, 0x9294, 0xfffd, 0xaa7e, 0xaa80, 0x9294,
+	0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff, 0xab74, 0x9384, 0x00ff,
+	0x908d, 0xc200, 0xa96e, 0x9384, 0xff00, 0x9215, 0xaa76, 0xa870,
+	0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069, 0x0200, 0x080c, 0x97e8,
+	0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000a, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x4003, 0x60a3, 0x0035,
+	0xaa68, 0x9294, 0x7000, 0x9286, 0x3000, 0x0110, 0x60a3, 0x0037,
+	0x00ee, 0x00de, 0x009e, 0x003e, 0x0005, 0x900e, 0x7814, 0x0096,
+	0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084, 0x0003, 0x11a8, 0x2001,
+	0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824, 0xd0cc, 0x1168, 0xd0c4,
+	0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001, 0x180c, 0x200c, 0xc1d5,
+	0x2102, 0x2009, 0x1982, 0x210c, 0x009e, 0x918d, 0x0092, 0x0010,
+	0x2009, 0x0096, 0x60ab, 0x0036, 0x0026, 0x2110, 0x900e, 0x080c,
+	0x289b, 0x002e, 0x0005, 0x2009, 0x0009, 0x00a0, 0x2009, 0x000a,
+	0x0088, 0x2009, 0x000b, 0x0070, 0x2009, 0x000c, 0x0058, 0x2009,
+	0x000d, 0x0040, 0x2009, 0x000e, 0x0028, 0x2009, 0x000f, 0x0010,
+	0x2009, 0x0008, 0x6912, 0x0005, 0x00d6, 0x9290, 0x0018, 0x8214,
+	0x20e9, 0x0000, 0x2069, 0x0200, 0x6813, 0x0000, 0x22a8, 0x9284,
+	0x00e0, 0x0128, 0x20a9, 0x0020, 0x9292, 0x0020, 0x0008, 0x9016,
+	0x20a1, 0x0240, 0x9006, 0x4004, 0x82ff, 0x0120, 0x6810, 0x8000,
+	0x6812, 0x0c60, 0x00de, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
+	0x00a6, 0x0096, 0x0066, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b7,
+	0x7610, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9898, 0x7030, 0x9c06,
+	0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0x986a, 0x080c,
+	0x8f9c, 0x68c3, 0x0000, 0x080c, 0x9485, 0x7033, 0x0000, 0x0036,
+	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
+	0x080c, 0x2852, 0x9006, 0x080c, 0x2852, 0x2069, 0x0100, 0x6824,
+	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7010, 0x9c36, 0x1110,
+	0x660c, 0x7612, 0x700c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
+	0x2f00, 0x700e, 0x0010, 0x700f, 0x0000, 0x660c, 0x0066, 0x2c00,
+	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c,
+	0xba46, 0x1180, 0x080c, 0x303d, 0x080c, 0xba57, 0x1518, 0x080c,
+	0xa581, 0x0400, 0x080c, 0x9485, 0x6824, 0xd084, 0x09b0, 0x6827,
+	0x0001, 0x0898, 0x080c, 0xba57, 0x1118, 0x080c, 0xa581, 0x0090,
+	0x6014, 0x2048, 0x080c, 0xb840, 0x0168, 0x6020, 0x9086, 0x0003,
+	0x1520, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6991,
+	0x080c, 0xba31, 0x080c, 0xbcd3, 0x080c, 0x9c14, 0x080c, 0x935b,
+	0x00ce, 0x0804, 0x981b, 0x2c78, 0x600c, 0x2060, 0x0804, 0x981b,
+	0x7013, 0x0000, 0x700f, 0x0000, 0x012e, 0x006e, 0x009e, 0x00ae,
+	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006,
+	0x1d08, 0x080c, 0xd22f, 0x08f0, 0x00f6, 0x0036, 0x2079, 0x0380,
+	0x7b18, 0xd3bc, 0x1de8, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080,
+	0x003e, 0x00fe, 0x0005, 0x0016, 0x2001, 0x0382, 0x2004, 0x9084,
+	0x0007, 0x9086, 0x0001, 0x1188, 0x2001, 0x0015, 0x0c29, 0x2009,
+	0x1000, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0003,
+	0x0120, 0x8109, 0x1db0, 0x080c, 0x0d65, 0x001e, 0x0005, 0x2001,
+	0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0003, 0x1120, 0x2001,
+	0x0380, 0x2003, 0x0001, 0x0005, 0x0156, 0x0016, 0x0026, 0x00e6,
+	0x900e, 0x2071, 0x19b7, 0x0469, 0x0106, 0x0190, 0x7004, 0x9086,
+	0x0003, 0x0148, 0x20a9, 0x1000, 0x6044, 0xd0fc, 0x01d8, 0x1f04,
+	0x98f4, 0x080c, 0x0d65, 0x080c, 0x98bb, 0x6044, 0xd0fc, 0x0190,
+	0x7030, 0x9c06, 0x1148, 0x080c, 0x885d, 0x6044, 0xd0dc, 0x0150,
+	0xc0dc, 0x6046, 0x700a, 0x7042, 0x704c, 0x9c06, 0x190c, 0x0d65,
+	0x080c, 0x88b8, 0x010e, 0x1919, 0x00ee, 0x002e, 0x001e, 0x015e,
+	0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0003,
+	0x0005, 0x0126, 0x2091, 0x2400, 0x7808, 0xd0a4, 0x190c, 0x0d5e,
+	0xd09c, 0x0128, 0x7820, 0x908c, 0xf000, 0x11b8, 0x0012, 0x012e,
+	0x0005, 0x9941, 0x997f, 0x99a6, 0x99d6, 0x99e6, 0x99f7, 0x9a06,
+	0x9a14, 0x9a25, 0x9a29, 0x9941, 0x9941, 0x9941, 0x9941, 0x9941,
+	0x9941, 0x080c, 0x0d65, 0x012e, 0x0005, 0x2060, 0x6044, 0xd0bc,
+	0x0140, 0xc0bc, 0x6046, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65,
+	0x0012, 0x012e, 0x0005, 0x9966, 0x9968, 0x9966, 0x996e, 0x9966,
+	0x9966, 0x9966, 0x9966, 0x9966, 0x9968, 0x9966, 0x9968, 0x9966,
+	0x9968, 0x9966, 0x9966, 0x9966, 0x9968, 0x9966, 0x080c, 0x0d65,
+	0x2009, 0x0013, 0x080c, 0x9c76, 0x012e, 0x0005, 0x6014, 0x2048,
+	0xa87c, 0xd0dc, 0x0130, 0x080c, 0x83a2, 0x080c, 0x9bda, 0x012e,
+	0x0005, 0x2009, 0x0049, 0x080c, 0x9c76, 0x012e, 0x0005, 0x080c,
+	0x98bb, 0x2001, 0x19dc, 0x2003, 0x0000, 0x7030, 0x9065, 0x090c,
+	0x0d65, 0x7034, 0x9092, 0x00c8, 0x1258, 0x8000, 0x7036, 0x7004,
+	0x9086, 0x0003, 0x0110, 0x7007, 0x0000, 0x781f, 0x0808, 0x0040,
+	0x080c, 0xd621, 0x6003, 0x0001, 0x2009, 0x0014, 0x080c, 0x9c76,
+	0x781f, 0x0100, 0x080c, 0x98d7, 0x012e, 0x0005, 0x080c, 0x98bb,
+	0x714c, 0x81ff, 0x1128, 0x2011, 0x19df, 0x2013, 0x0000, 0x0400,
+	0x2061, 0x0100, 0x7150, 0x9192, 0x7530, 0x12b8, 0x8108, 0x7152,
+	0x714c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006, 0x1138, 0x6014,
+	0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0050, 0x6014, 0x9084,
+	0x1984, 0x9085, 0x0016, 0x6016, 0x0018, 0x706c, 0xc085, 0x706e,
+	0x781f, 0x0200, 0x080c, 0x98d7, 0x012e, 0x0005, 0x080c, 0x98bb,
+	0x714c, 0x2160, 0x6003, 0x0003, 0x2009, 0x004a, 0x080c, 0x9c76,
+	0x781f, 0x0200, 0x080c, 0x98d7, 0x012e, 0x0005, 0x7808, 0xd09c,
+	0x0de8, 0x7820, 0x2060, 0x6003, 0x0003, 0x080c, 0x98bb, 0x080c,
+	0x1c0f, 0x781f, 0x0400, 0x080c, 0x98d7, 0x012e, 0x0005, 0x7808,
+	0xd09c, 0x0de8, 0x7820, 0x2060, 0x080c, 0x98bb, 0x080c, 0x1c57,
+	0x781f, 0x0400, 0x080c, 0x98d7, 0x012e, 0x0005, 0x7030, 0x9065,
+	0x0148, 0x6044, 0xc0bc, 0x6046, 0x7104, 0x9186, 0x0003, 0x0110,
+	0x080c, 0x891c, 0x012e, 0x0005, 0x00f6, 0x703c, 0x9086, 0x0002,
+	0x0148, 0x704c, 0x907d, 0x0130, 0x7844, 0xc0bc, 0x7846, 0x080c,
+	0x8ec6, 0x0000, 0x00fe, 0x012e, 0x0005, 0x080c, 0x7137, 0x012e,
+	0x0005, 0x080c, 0x0d65, 0x0005, 0x00e6, 0x2071, 0x19b7, 0x6044,
+	0xc0bc, 0x6046, 0xd0fc, 0x01b8, 0x704c, 0x9c06, 0x1190, 0x2019,
+	0x0001, 0x080c, 0x9269, 0x704f, 0x0000, 0x2001, 0x0109, 0x2004,
+	0xd08c, 0x1138, 0x2001, 0x0108, 0x2004, 0xd0bc, 0x1110, 0x703f,
+	0x0000, 0x080c, 0x949c, 0x00ee, 0x0005, 0x0026, 0x7010, 0x9c06,
+	0x1178, 0x080c, 0x935b, 0x6044, 0xc0fc, 0x6046, 0x600c, 0x9015,
+	0x0120, 0x7212, 0x600f, 0x0000, 0x0010, 0x7212, 0x720e, 0x9006,
+	0x002e, 0x0005, 0x0026, 0x7020, 0x9c06, 0x1178, 0x080c, 0x935b,
+	0x6044, 0xc0fc, 0x6046, 0x600c, 0x9015, 0x0120, 0x7222, 0x600f,
+	0x0000, 0x0010, 0x7222, 0x721e, 0x9006, 0x002e, 0x0005, 0x00d6,
+	0x0036, 0x7830, 0x9c06, 0x1558, 0x2069, 0x0100, 0x68c0, 0x9005,
+	0x01f8, 0x080c, 0x81ea, 0x080c, 0x8f9c, 0x68c3, 0x0000, 0x080c,
+	0x9485, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001,
+	0x0100, 0x080c, 0x2852, 0x9006, 0x080c, 0x2852, 0x2069, 0x0100,
+	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x9085, 0x0001, 0x0038,
+	0x7808, 0xc0ad, 0x780a, 0x6003, 0x0009, 0x630a, 0x9006, 0x003e,
+	0x00de, 0x0005, 0x0016, 0x0026, 0x0036, 0x6100, 0x2019, 0x0100,
+	0x2001, 0x0382, 0x2004, 0xd09c, 0x0190, 0x00c6, 0x0126, 0x2091,
+	0x2800, 0x0016, 0x0036, 0x080c, 0x9921, 0x003e, 0x001e, 0x012e,
+	0x00ce, 0x6200, 0x2200, 0x9106, 0x0d58, 0x2200, 0x0010, 0x8319,
+	0x1d38, 0x003e, 0x002e, 0x001e, 0x0005, 0x00d6, 0x0156, 0x080c,
+	0x8d50, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100, 0x700b, 0x0003,
+	0x60c3, 0x0008, 0x0490, 0x7003, 0x0200, 0x7007, 0x0000, 0x2069,
+	0x1800, 0x901e, 0x6800, 0x9086, 0x0004, 0x1110, 0xc38d, 0x0060,
+	0x080c, 0x7096, 0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6ad8, 0xd29c,
+	0x1110, 0xd2ac, 0x0108, 0xc39d, 0x730e, 0x2011, 0x1848, 0x63f0,
+	0x2312, 0x20a9, 0x0006, 0x2011, 0x1840, 0x2019, 0x1841, 0x2071,
+	0x0250, 0x2376, 0x8e70, 0x2276, 0x8e70, 0x9398, 0x0002, 0x9290,
+	0x0002, 0x1f04, 0x9b01, 0x60c3, 0x0020, 0x080c, 0x8f6c, 0x015e,
+	0x00de, 0x0005, 0x0156, 0x080c, 0x8d50, 0x7a14, 0x82ff, 0x0168,
+	0x9286, 0xffff, 0x0118, 0x9282, 0x000e, 0x1238, 0x7003, 0x0100,
+	0x700b, 0x0003, 0x60c3, 0x0008, 0x0488, 0x7003, 0x0200, 0x7007,
+	0x001c, 0x700f, 0x0001, 0x2011, 0x198d, 0x2204, 0x8007, 0x701a,
+	0x8210, 0x2204, 0x8007, 0x701e, 0x0421, 0x1120, 0xb8a0, 0x9082,
+	0x007f, 0x0248, 0x2001, 0x181e, 0x2004, 0x7022, 0x2001, 0x181f,
+	0x2004, 0x7026, 0x0030, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff,
+	0x7026, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
+	0x0000, 0x20a1, 0x0256, 0x4003, 0x60c3, 0x001c, 0x015e, 0x0804,
+	0x8f6c, 0x0006, 0x2001, 0x1836, 0x2004, 0xd0ac, 0x000e, 0x0005,
+	0x2011, 0x0003, 0x080c, 0x931c, 0x2011, 0x0002, 0x080c, 0x9326,
+	0x080c, 0x91e9, 0x0036, 0x901e, 0x080c, 0x9269, 0x003e, 0x0005,
+	0x2071, 0x1883, 0x7000, 0x9005, 0x0140, 0x2001, 0x0812, 0x2071,
+	0x1800, 0x7072, 0x7076, 0x7067, 0xffd4, 0x2071, 0x1800, 0x7070,
+	0x7052, 0x7057, 0x1ddc, 0x0005, 0x00e6, 0x0126, 0x2071, 0x1800,
+	0x2091, 0x8000, 0x7550, 0x9582, 0x0010, 0x0608, 0x7054, 0x2060,
+	0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x001c, 0x7064, 0x9c02,
+	0x1208, 0x0cb0, 0x2061, 0x1ddc, 0x0c98, 0x6003, 0x0008, 0x8529,
+	0x7552, 0x9ca8, 0x001c, 0x7064, 0x9502, 0x1230, 0x7556, 0x9085,
+	0x0001, 0x012e, 0x00ee, 0x0005, 0x7057, 0x1ddc, 0x0cc0, 0x9006,
+	0x0cc0, 0x00e6, 0x2071, 0x1800, 0x7550, 0x9582, 0x0010, 0x0600,
+	0x7054, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x001c,
+	0x7064, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc, 0x0c98, 0x6003,
+	0x0008, 0x8529, 0x7552, 0x9ca8, 0x001c, 0x7064, 0x9502, 0x1228,
+	0x7556, 0x9085, 0x0001, 0x00ee, 0x0005, 0x7057, 0x1ddc, 0x0cc8,
+	0x9006, 0x0cc8, 0x9c82, 0x1ddc, 0x0a0c, 0x0d65, 0x2001, 0x1819,
+	0x2004, 0x9c02, 0x1a0c, 0x0d65, 0x9006, 0x6006, 0x600a, 0x600e,
+	0x6016, 0x601a, 0x6012, 0x6023, 0x0000, 0x6003, 0x0000, 0x601e,
+	0x605e, 0x6062, 0x6026, 0x602a, 0x602e, 0x6032, 0x6036, 0x603a,
+	0x603e, 0x604a, 0x6046, 0x6042, 0x2061, 0x1800, 0x6050, 0x8000,
+	0x6052, 0x0005, 0x9006, 0x600e, 0x6016, 0x601a, 0x6012, 0x6022,
+	0x6002, 0x601e, 0x605e, 0x6062, 0x604a, 0x6046, 0x2061, 0x1800,
+	0x6050, 0x8000, 0x6052, 0x0005, 0x0006, 0x6000, 0x9086, 0x0000,
+	0x01d0, 0x601c, 0xd084, 0x190c, 0x1921, 0x6023, 0x0007, 0x2001,
+	0x1956, 0x2004, 0x0006, 0x9082, 0x0051, 0x000e, 0x0208, 0x8004,
+	0x601a, 0x080c, 0xd4df, 0x604b, 0x0000, 0x6044, 0xd0fc, 0x1129,
+	0x9006, 0x6046, 0x6016, 0x000e, 0x0005, 0x080c, 0x98bb, 0x0106,
+	0x2001, 0x19ca, 0x2004, 0x9c06, 0x1130, 0x0036, 0x2019, 0x0001,
+	0x080c, 0x9269, 0x003e, 0x080c, 0x949c, 0x010e, 0x090c, 0x98d7,
 	0x0005, 0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7550,
-	0x9582, 0x0010, 0x0608, 0x7054, 0x2060, 0x6000, 0x9086, 0x0000,
+	0x9582, 0x0001, 0x0608, 0x7054, 0x2060, 0x6000, 0x9086, 0x0000,
 	0x0148, 0x9ce0, 0x001c, 0x7064, 0x9c02, 0x1208, 0x0cb0, 0x2061,
 	0x1ddc, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7552, 0x9ca8, 0x001c,
 	0x7064, 0x9502, 0x1230, 0x7556, 0x9085, 0x0001, 0x012e, 0x00ee,
-	0x0005, 0x7057, 0x1ddc, 0x0cc0, 0x9006, 0x0cc0, 0x00e6, 0x2071,
-	0x1800, 0x7550, 0x9582, 0x0010, 0x0600, 0x7054, 0x2060, 0x6000,
-	0x9086, 0x0000, 0x0148, 0x9ce0, 0x001c, 0x7064, 0x9c02, 0x1208,
-	0x0cb0, 0x2061, 0x1ddc, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7552,
-	0x9ca8, 0x001c, 0x7064, 0x9502, 0x1228, 0x7556, 0x9085, 0x0001,
-	0x00ee, 0x0005, 0x7057, 0x1ddc, 0x0cc8, 0x9006, 0x0cc8, 0x9c82,
-	0x1ddc, 0x0a0c, 0x0d65, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1a0c,
-	0x0d65, 0x9006, 0x6006, 0x600a, 0x600e, 0x6016, 0x601a, 0x6012,
-	0x6023, 0x0000, 0x6003, 0x0000, 0x601e, 0x605e, 0x6062, 0x6026,
-	0x602a, 0x602e, 0x6032, 0x6036, 0x603a, 0x603e, 0x604a, 0x6046,
-	0x6042, 0x2061, 0x1800, 0x6050, 0x8000, 0x6052, 0x0005, 0x9006,
-	0x600e, 0x6016, 0x601a, 0x6012, 0x6022, 0x6002, 0x601e, 0x605e,
-	0x6062, 0x604a, 0x6046, 0x2061, 0x1800, 0x6050, 0x8000, 0x6052,
-	0x0005, 0x0006, 0x6000, 0x9086, 0x0000, 0x01d0, 0x601c, 0xd084,
-	0x190c, 0x1914, 0x6023, 0x0007, 0x2001, 0x1957, 0x2004, 0x0006,
-	0x9082, 0x0051, 0x000e, 0x0208, 0x8004, 0x601a, 0x080c, 0xd4ce,
-	0x604b, 0x0000, 0x6044, 0xd0fc, 0x1129, 0x9006, 0x6046, 0x6016,
-	0x000e, 0x0005, 0x080c, 0x9926, 0x0106, 0x190c, 0x98c8, 0x2001,
-	0x19cb, 0x2004, 0x9c06, 0x1130, 0x0036, 0x2019, 0x0001, 0x080c,
-	0x9286, 0x003e, 0x080c, 0x94b8, 0x010e, 0x190c, 0x98e4, 0x0005,
-	0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7550, 0x9582,
-	0x0001, 0x0608, 0x7054, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148,
-	0x9ce0, 0x001c, 0x7064, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc,
-	0x0c98, 0x6003, 0x0008, 0x8529, 0x7552, 0x9ca8, 0x001c, 0x7064,
-	0x9502, 0x1230, 0x7556, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005,
-	0x7057, 0x1ddc, 0x0cc0, 0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f,
-	0x0002, 0x9c99, 0x9ca3, 0x9cbe, 0x9cd9, 0xbfab, 0xbfc8, 0xbfe3,
-	0x9c99, 0x9ca3, 0x9c99, 0x9cf5, 0x9c99, 0x9c99, 0x9c99, 0x9c99,
-	0x9c99, 0x9186, 0x0013, 0x1130, 0x6044, 0xd0fc, 0x0110, 0x080c,
-	0x8874, 0x0005, 0x0005, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
-	0x0d65, 0x0013, 0x006e, 0x0005, 0x9cbc, 0xa404, 0xa5d6, 0x9cbc,
-	0xa664, 0x9fbe, 0x9cbc, 0x9cbc, 0xa386, 0xac09, 0x9cbc, 0x9cbc,
-	0x9cbc, 0x9cbc, 0x9cbc, 0x9cbc, 0x080c, 0x0d65, 0x0066, 0x6000,
-	0x90b2, 0x0016, 0x1a0c, 0x0d65, 0x0013, 0x006e, 0x0005, 0x9cd7,
-	0xb214, 0x9cd7, 0x9cd7, 0x9cd7, 0x9cd7, 0x9cd7, 0x9cd7, 0xb1b9,
-	0xb397, 0x9cd7, 0xb251, 0xb2d5, 0xb251, 0xb2d5, 0x9cd7, 0x080c,
-	0x0d65, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0d65, 0x6000, 0x0002,
-	0x9cf3, 0xac53, 0xacea, 0xae6a, 0xaed9, 0x9cf3, 0x9cf3, 0x9cf3,
-	0xac22, 0xb13a, 0xb13d, 0x9cf3, 0x9cf3, 0x9cf3, 0x9cf3, 0xb16d,
-	0x9cf3, 0x9cf3, 0x9cf3, 0x080c, 0x0d65, 0x0066, 0x6000, 0x90b2,
-	0x0016, 0x1a0c, 0x0d65, 0x0013, 0x006e, 0x0005, 0x9d0e, 0x9d0e,
-	0x9d4c, 0x9deb, 0x9e6b, 0x9d0e, 0x9d0e, 0x9d0e, 0x9d10, 0x9d0e,
-	0x9d0e, 0x9d0e, 0x9d0e, 0x9d0e, 0x9d0e, 0x9d0e, 0x080c, 0x0d65,
-	0x9186, 0x004c, 0x0560, 0x9186, 0x0003, 0x190c, 0x0d65, 0x0096,
-	0x601c, 0xc0ed, 0x601e, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048,
-	0xa87c, 0x9084, 0xa000, 0xc0b5, 0xa87e, 0xa8ac, 0xa836, 0xa8b0,
-	0xa83a, 0x9006, 0xa846, 0xa84a, 0xa884, 0x9092, 0x199a, 0x0210,
-	0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a, 0x009e,
-	0x080c, 0x1a64, 0x2009, 0x8030, 0x080c, 0x8518, 0x0005, 0x6010,
-	0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c, 0x9e8d, 0x080c,
-	0xbf79, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096, 0x00f6, 0x2079,
-	0x1800, 0x7a8c, 0x6014, 0x2048, 0xa87c, 0xd0ec, 0x1110, 0x9290,
-	0x0018, 0xac78, 0xc4fc, 0x0046, 0xa8e0, 0x9005, 0x1140, 0xa8dc,
-	0x921a, 0x0140, 0x0220, 0xa87b, 0x0007, 0x2010, 0x0028, 0xa87b,
-	0x0015, 0x0010, 0xa87b, 0x0000, 0x8214, 0xa883, 0x0000, 0xaa02,
-	0x0006, 0x0016, 0x0026, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2400,
-	0x9005, 0x1108, 0x009a, 0x2100, 0x9086, 0x0015, 0x1118, 0x2001,
-	0x0001, 0x0038, 0x2100, 0x9086, 0x0016, 0x0118, 0x2001, 0x0001,
-	0x002a, 0x94a4, 0x0007, 0x8423, 0x9405, 0x0002, 0x9db3, 0x9db3,
-	0x9dae, 0x9db1, 0x9db3, 0x9dab, 0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e,
-	0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e, 0x00fe, 0x00ee,
-	0x00de, 0x00ce, 0x002e, 0x001e, 0x000e, 0x004e, 0x00fe, 0x009e,
-	0x00de, 0x080c, 0x0d65, 0x080c, 0xa845, 0x0028, 0x080c, 0xa968,
-	0x0010, 0x080c, 0xaa57, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e,
-	0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0x9f4b, 0x0530, 0xa804,
-	0xa80e, 0x00a6, 0x2050, 0xb100, 0x00ae, 0x8006, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xaacc, 0xabd0,
-	0xacd4, 0xadd8, 0x2031, 0x0000, 0x2041, 0x1280, 0x080c, 0xa0f5,
-	0x0160, 0x000e, 0x9005, 0x0120, 0x00fe, 0x009e, 0x00de, 0x0005,
-	0x00fe, 0x009e, 0x00de, 0x0804, 0x9be7, 0x2001, 0x002c, 0x900e,
-	0x080c, 0x9fb1, 0x0c70, 0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016,
-	0x0158, 0x91b2, 0x0047, 0x0a0c, 0x0d65, 0x91b2, 0x0050, 0x1a0c,
-	0x0d65, 0x9182, 0x0047, 0x0042, 0x080c, 0x9ab7, 0x0120, 0x9086,
-	0x0002, 0x0904, 0x9d4c, 0x0005, 0x9e0d, 0x9e0d, 0x9e0f, 0x9e41,
-	0x9e0d, 0x9e0d, 0x9e0d, 0x9e0d, 0x9e54, 0x080c, 0x0d65, 0x00d6,
-	0x0016, 0x0096, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc,
-	0x01c0, 0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, 0x9005, 0x0140,
-	0x2001, 0x0000, 0x900e, 0x080c, 0x9fb1, 0x080c, 0x9be7, 0x00a8,
-	0x6003, 0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, 0xa8ae, 0xa8b2,
-	0x0c78, 0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, 0xa8ae, 0xa8a8,
-	0xa8b2, 0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, 0x001e, 0x00de,
-	0x0005, 0x080c, 0x88d1, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c,
-	0xb847, 0x0120, 0xa87b, 0x0006, 0x080c, 0x6996, 0x009e, 0x00de,
-	0x080c, 0x9be7, 0x0804, 0x8936, 0x080c, 0x88d1, 0x080c, 0x3006,
-	0x080c, 0xbf76, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xb847,
-	0x0120, 0xa87b, 0x0029, 0x080c, 0x6996, 0x009e, 0x00de, 0x080c,
-	0x9be7, 0x0804, 0x8936, 0x9182, 0x0047, 0x0002, 0x9e7b, 0x9e7d,
-	0x9e7b, 0x9e7b, 0x9e7b, 0x9e7b, 0x9e7b, 0x9e7b, 0x9e7b, 0x9e7b,
-	0x9e7b, 0x9e7b, 0x9e7d, 0x080c, 0x0d65, 0x00d6, 0x0096, 0x080c,
-	0x1595, 0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, 0x080c,
-	0x6996, 0x009e, 0x00de, 0x0804, 0x9be7, 0x0026, 0x0036, 0x0056,
-	0x0066, 0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, 0x1022, 0x000e,
-	0x090c, 0x0d65, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0,
-	0x900e, 0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, 0x1800, 0x798c,
-	0x9188, 0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, 0x2950, 0x00a6,
-	0x2001, 0x0205, 0x2003, 0x0000, 0x901e, 0x2029, 0x0001, 0x9182,
-	0x0034, 0x1228, 0x2011, 0x001f, 0x080c, 0xb41a, 0x04c0, 0x2130,
-	0x2009, 0x0034, 0x2011, 0x001f, 0x080c, 0xb41a, 0x96b2, 0x0034,
-	0xb004, 0x904d, 0x0110, 0x080c, 0x0fd4, 0x080c, 0x1022, 0x01d0,
-	0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a,
-	0x003d, 0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xb41a, 0x00b8,
-	0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x080c,
-	0xb41a, 0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f,
-	0x95ad, 0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, 0x0048, 0x2001,
-	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566,
-	0x2a48, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6996, 0x000e,
-	0x2048, 0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, 0x006e, 0x005e,
-	0x003e, 0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, 0x0006, 0x080c,
-	0x1022, 0x000e, 0x090c, 0x0d65, 0xa960, 0x21e8, 0xa95c, 0x9188,
-	0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xaa66, 0xa87a,
-	0x2079, 0x1800, 0x798c, 0x810c, 0x9188, 0x000c, 0x9182, 0x001a,
-	0x0210, 0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, 0xac76, 0x2e98,
-	0xa85c, 0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, 0x200c, 0x918d,
-	0x0080, 0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6996, 0x009e,
-	0x00fe, 0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, 0x0096, 0x0016,
-	0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x001e, 0x2079,
-	0x0200, 0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, 0x000c, 0x2098,
-	0x2021, 0x003e, 0x901e, 0x9282, 0x0020, 0x0218, 0x2011, 0x0020,
-	0x2018, 0x9486, 0x003e, 0x1170, 0x0096, 0x080c, 0x1022, 0x2900,
-	0x009e, 0x05c0, 0xa806, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0002, 0x20a0, 0x3300, 0x908e, 0x0260, 0x0140, 0x2009, 0x0280,
-	0x9102, 0x920a, 0x0218, 0x2010, 0x2100, 0x9318, 0x2200, 0x9402,
-	0x1228, 0x2400, 0x9202, 0x2410, 0x9318, 0x9006, 0x2020, 0x22a8,
-	0xa800, 0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, 0x83ff, 0x0180,
-	0x3300, 0x9086, 0x0280, 0x1130, 0x7814, 0x8000, 0x9085, 0x0080,
-	0x7816, 0x2e98, 0x2310, 0x84ff, 0x0904, 0x9f60, 0x0804, 0x9f62,
-	0x9085, 0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, 0x00de, 0x001e,
-	0x0005, 0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982,
-	0x080c, 0x698a, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015,
-	0x1118, 0x080c, 0x9be7, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0d65,
-	0x080c, 0x9be7, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98,
-	0x6014, 0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x20a0, 0x009e,
-	0x4003, 0x0136, 0x9080, 0x001b, 0x2011, 0x0006, 0x20a9, 0x0001,
-	0x3418, 0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211,
-	0x1db8, 0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398,
-	0x4003, 0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c,
-	0xb847, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
-	0x009e, 0x0804, 0x9be7, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386,
-	0x0200, 0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8c7, 0x0000, 0x00be,
-	0x6014, 0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
-	0xab32, 0x080c, 0x9be7, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011,
-	0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xbf61, 0x0188, 0x6014,
-	0x9005, 0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x604b, 0x0000,
-	0x2009, 0x0022, 0x080c, 0xa3dc, 0x9006, 0x001e, 0x000e, 0x0005,
-	0x9085, 0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80,
-	0x000c, 0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003,
-	0x0001, 0x2099, 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a,
-	0xa804, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0,
-	0x4003, 0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9,
-	0x0020, 0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048,
-	0xa867, 0x0103, 0x080c, 0x9be7, 0x001e, 0x009e, 0x0005, 0x0096,
-	0x0016, 0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084,
-	0x00ff, 0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004,
-	0x9108, 0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048,
-	0x080c, 0xb41a, 0x080c, 0xb847, 0x0140, 0x6014, 0x2048, 0xa807,
-	0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0x9be7, 0x001e,
-	0x009e, 0x0005, 0x0016, 0x0096, 0x7030, 0x9086, 0x0100, 0x1118,
-	0x2009, 0x0004, 0x0010, 0x7034, 0x800c, 0x810b, 0x2011, 0x000c,
-	0x2019, 0x000c, 0x6014, 0x2048, 0xa804, 0x0096, 0x9005, 0x0108,
-	0x2048, 0x080c, 0xb41a, 0x009e, 0x080c, 0xb847, 0x0148, 0xa804,
-	0x9005, 0x1158, 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103,
-	0x080c, 0x9be7, 0x009e, 0x001e, 0x0005, 0x0086, 0x2040, 0xa030,
-	0x8007, 0x9086, 0x0100, 0x1118, 0x080c, 0xa58f, 0x00e0, 0xa034,
-	0x8007, 0x800c, 0x8806, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
-	0xffc0, 0x9080, 0x000c, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897,
-	0x4000, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041,
-	0x1266, 0x0019, 0x0d08, 0x008e, 0x0898, 0x0096, 0x0006, 0x080c,
-	0x1022, 0x000e, 0x01b0, 0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2,
-	0x0006, 0xae6a, 0x2800, 0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92,
-	0xac96, 0xad9a, 0x0086, 0x2940, 0x080c, 0x110c, 0x008e, 0x9085,
-	0x0001, 0x009e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084,
-	0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1520,
-	0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x11e0,
-	0x604b, 0x0000, 0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xbed9,
-	0x001e, 0x1158, 0x622c, 0x2268, 0x2071, 0x026c, 0x6b20, 0x9386,
-	0x0003, 0x0130, 0x9386, 0x0006, 0x0128, 0x080c, 0x9be7, 0x0020,
-	0x0039, 0x0010, 0x080c, 0xa211, 0x002e, 0x00de, 0x00ee, 0x0005,
-	0x0096, 0x6814, 0x2048, 0x9186, 0x0015, 0x0904, 0xa1f0, 0x918e,
-	0x0016, 0x1904, 0xa20f, 0x700c, 0x908c, 0xff00, 0x9186, 0x1700,
-	0x0120, 0x9186, 0x0300, 0x1904, 0xa1ca, 0x89ff, 0x1138, 0x6800,
-	0x9086, 0x000f, 0x0904, 0xa1ac, 0x0804, 0xa20d, 0x6808, 0x9086,
-	0xffff, 0x1904, 0xa1f2, 0xa87c, 0x9084, 0x0060, 0x9086, 0x0020,
-	0x1128, 0xa83c, 0xa940, 0x9105, 0x1904, 0xa1f2, 0x6824, 0xd0b4,
-	0x1904, 0xa1f2, 0x080c, 0xba36, 0x6864, 0xa882, 0xa87c, 0xc0dc,
-	0xc0f4, 0xc0d4, 0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001, 0x000a,
-	0x080c, 0x8419, 0xa884, 0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff,
-	0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c, 0xb56d, 0x00ce, 0x0804,
-	0xa20d, 0x00c6, 0xa868, 0xd0fc, 0x1118, 0x080c, 0x5d56, 0x0010,
-	0x080c, 0x60fb, 0x00ce, 0x1904, 0xa1f2, 0x00c6, 0x2d60, 0x080c,
-	0x9be7, 0x00ce, 0x0804, 0xa20d, 0x00c6, 0x080c, 0x9c58, 0x0198,
-	0x6017, 0x0000, 0x6810, 0x6012, 0x080c, 0xbcdb, 0x6023, 0x0003,
-	0x6904, 0x00c6, 0x2d60, 0x080c, 0x9be7, 0x00ce, 0x080c, 0x9c85,
-	0x00ce, 0x0804, 0xa20d, 0x2001, 0x1959, 0x2004, 0x684a, 0x00ce,
-	0x0804, 0xa20d, 0x7008, 0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6,
-	0x2058, 0xb900, 0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b,
-	0x0003, 0x080c, 0xbf1b, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0002, 0x2009, 0x8020, 0x080c, 0x84d1, 0x00ce, 0x0430, 0x700c,
-	0x9086, 0x2a00, 0x1138, 0x2001, 0x1959, 0x2004, 0x684a, 0x00e8,
-	0x04c1, 0x00e8, 0x89ff, 0x090c, 0x0d65, 0x00c6, 0x00d6, 0x2d60,
-	0xa867, 0x0103, 0xa87b, 0x0003, 0x080c, 0x67ac, 0x080c, 0xba36,
-	0x080c, 0x9c21, 0x0026, 0x6010, 0x00b6, 0x2058, 0xba3c, 0x080c,
-	0x639b, 0x00be, 0x002e, 0x00de, 0x00ce, 0x080c, 0x9be7, 0x009e,
-	0x0005, 0x9186, 0x0015, 0x1128, 0x2001, 0x1959, 0x2004, 0x684a,
-	0x0068, 0x918e, 0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c,
-	0xd4ce, 0x080c, 0x83c0, 0x080c, 0x9be7, 0x00ce, 0x080c, 0x9be7,
-	0x0005, 0x0026, 0x0036, 0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4,
-	0x0130, 0x2001, 0x1959, 0x2004, 0x684a, 0x0804, 0xa28b, 0x00c6,
-	0x2d60, 0x080c, 0xb445, 0x00ce, 0x6804, 0x9086, 0x0050, 0x1168,
-	0x00c6, 0x2d00, 0x2060, 0x6003, 0x0001, 0x6007, 0x0050, 0x2009,
-	0x8023, 0x080c, 0x84d1, 0x00ce, 0x04f0, 0x6800, 0x9086, 0x000f,
-	0x01a8, 0x89ff, 0x090c, 0x0d65, 0x6800, 0x9086, 0x0004, 0x1190,
-	0xa87c, 0xd0ac, 0x0178, 0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880,
-	0xc0fc, 0xa882, 0x2001, 0x0001, 0x6832, 0x0400, 0x2001, 0x0007,
-	0x6832, 0x00e0, 0xa87c, 0xd0b4, 0x1150, 0xd0ac, 0x0db8, 0x6824,
-	0xd0f4, 0x1d48, 0xa838, 0xa934, 0x9105, 0x0d80, 0x0c20, 0xd2ec,
-	0x1d68, 0x7024, 0x9306, 0x1118, 0x7020, 0x9406, 0x0d38, 0x7020,
-	0x683e, 0x7024, 0x683a, 0x2001, 0x0005, 0x6832, 0x080c, 0xbbc5,
-	0x080c, 0x8936, 0x0010, 0x080c, 0x9be7, 0x004e, 0x003e, 0x002e,
-	0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210,
-	0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1904, 0xa2f6, 0x700c,
-	0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x1904, 0xa2f6,
-	0x6038, 0x2068, 0x6824, 0xc0dc, 0x6826, 0x6a20, 0x9286, 0x0007,
-	0x0904, 0xa2f6, 0x9286, 0x0002, 0x0904, 0xa2f6, 0x9286, 0x0000,
-	0x05e8, 0x6808, 0x633c, 0x9306, 0x15c8, 0x2071, 0x026c, 0x9186,
-	0x0015, 0x0570, 0x918e, 0x0016, 0x1100, 0x00c6, 0x6038, 0x2060,
-	0x6104, 0x9186, 0x004b, 0x01c0, 0x9186, 0x004c, 0x01a8, 0x9186,
-	0x004d, 0x0190, 0x9186, 0x004e, 0x0178, 0x9186, 0x0052, 0x0160,
-	0x6014, 0x0096, 0x2048, 0x080c, 0xb847, 0x090c, 0x0d65, 0xa87b,
-	0x0003, 0x009e, 0x080c, 0xbf1b, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x84d1, 0x00ce, 0x0030,
-	0x6038, 0x2070, 0x2001, 0x1959, 0x2004, 0x704a, 0x080c, 0x9be7,
-	0x002e, 0x00de, 0x00ee, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x6014,
-	0x2048, 0x6010, 0x2058, 0x91b6, 0x0015, 0x0130, 0xba08, 0xbb0c,
-	0xbc00, 0xc48c, 0xbc02, 0x0460, 0x0096, 0x0156, 0x0036, 0x0026,
-	0x2b48, 0x9e90, 0x0010, 0x2019, 0x000a, 0x20a9, 0x0004, 0x080c,
-	0xabdf, 0x002e, 0x003e, 0x015e, 0x009e, 0x1904, 0xa365, 0x0096,
-	0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0014, 0x2019, 0x0006,
-	0x20a9, 0x0004, 0x080c, 0xabdf, 0x002e, 0x003e, 0x015e, 0x009e,
-	0x15a0, 0x7238, 0xba0a, 0x733c, 0xbb0e, 0xbc00, 0xc48d, 0xbc02,
-	0xa804, 0x9005, 0x1128, 0x00fe, 0x009e, 0x00be, 0x0804, 0x9ff6,
-	0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a, 0x009e, 0x8006, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009,
-	0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041,
-	0x1266, 0x080c, 0xa0f5, 0x0130, 0x00fe, 0x009e, 0x080c, 0x9be7,
-	0x00be, 0x0005, 0x080c, 0xa58f, 0x0cb8, 0x2b78, 0x00f6, 0x080c,
-	0x3006, 0x080c, 0xbf76, 0x00fe, 0x00c6, 0x080c, 0x9b91, 0x2f00,
-	0x6012, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003,
-	0x0001, 0x2001, 0x0007, 0x080c, 0x61c1, 0x080c, 0x61ed, 0x080c,
-	0x84d8, 0x080c, 0x8936, 0x00ce, 0x0804, 0xa338, 0x2100, 0x91b2,
-	0x0053, 0x1a0c, 0x0d65, 0x91b2, 0x0040, 0x1a04, 0xa3ee, 0x0002,
-	0xa3dc, 0xa3dc, 0xa3d2, 0xa3dc, 0xa3dc, 0xa3dc, 0xa3d0, 0xa3d0,
-	0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0,
-	0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0,
-	0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3dc,
-	0xa3d0, 0xa3dc, 0xa3dc, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0,
-	0xa3d2, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0,
-	0xa3d0, 0xa3d0, 0xa3dc, 0xa3dc, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0,
-	0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3d0, 0xa3dc, 0xa3d0, 0xa3d0,
-	0x080c, 0x0d65, 0x0066, 0x00b6, 0x6610, 0x2658, 0xb8c4, 0xc08c,
-	0xb8c6, 0x00be, 0x006e, 0x0000, 0x6003, 0x0001, 0x6106, 0x9186,
-	0x0032, 0x0118, 0x080c, 0x84d8, 0x0010, 0x080c, 0x84d1, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x8936, 0x012e, 0x0005, 0x2600, 0x0002,
-	0xa402, 0xa402, 0xa402, 0xa3dc, 0xa3dc, 0xa402, 0xa402, 0xa402,
-	0xa402, 0xa3dc, 0xa402, 0xa3dc, 0xa402, 0xa3dc, 0xa402, 0xa402,
-	0xa402, 0xa402, 0x080c, 0x0d65, 0x6004, 0x90b2, 0x0053, 0x1a0c,
-	0x0d65, 0x91b6, 0x0013, 0x0904, 0xa4d9, 0x91b6, 0x0027, 0x1904,
-	0xa485, 0x080c, 0x8874, 0x6004, 0x080c, 0xba4b, 0x01b0, 0x080c,
-	0xba5c, 0x01a8, 0x908e, 0x0021, 0x0904, 0xa482, 0x908e, 0x0022,
-	0x1130, 0x080c, 0xa022, 0x0904, 0xa47e, 0x0804, 0xa47f, 0x908e,
-	0x003d, 0x0904, 0xa482, 0x0804, 0xa478, 0x080c, 0x303b, 0x2001,
-	0x0007, 0x080c, 0x61c1, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be,
-	0x080c, 0xa58f, 0x9186, 0x007e, 0x1148, 0x2001, 0x1836, 0x2014,
-	0xc285, 0x080c, 0x70b7, 0x1108, 0xc2ad, 0x2202, 0x080c, 0x98c8,
-	0x0036, 0x0026, 0x2019, 0x0028, 0x2110, 0x080c, 0xd529, 0x002e,
-	0x003e, 0x0016, 0x0026, 0x0036, 0x2110, 0x2019, 0x0028, 0x080c,
-	0x863b, 0x0076, 0x903e, 0x080c, 0x852a, 0x6010, 0x00b6, 0x905d,
-	0x0100, 0x00be, 0x2c08, 0x080c, 0xcfc8, 0x007e, 0x003e, 0x002e,
-	0x001e, 0x080c, 0x98e4, 0x080c, 0xbf76, 0x0016, 0x080c, 0xbcd3,
-	0x080c, 0x9be7, 0x001e, 0x080c, 0x311a, 0x080c, 0x8936, 0x0030,
-	0x080c, 0xbcd3, 0x080c, 0x9be7, 0x080c, 0x8936, 0x0005, 0x080c,
-	0xa58f, 0x0cb0, 0x080c, 0xa5cb, 0x0c98, 0x9186, 0x0015, 0x0118,
-	0x9186, 0x0016, 0x1140, 0x080c, 0x9ab7, 0x0d80, 0x9086, 0x0002,
-	0x0904, 0xa5d6, 0x0c58, 0x9186, 0x0014, 0x1d40, 0x080c, 0x8874,
-	0x6004, 0x908e, 0x0022, 0x1118, 0x080c, 0xa022, 0x09f8, 0x080c,
-	0x3006, 0x080c, 0xbf76, 0x080c, 0xba4b, 0x1190, 0x080c, 0x303b,
-	0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xa58f, 0x9186,
-	0x007e, 0x1128, 0x2001, 0x1836, 0x200c, 0xc185, 0x2102, 0x0800,
-	0x080c, 0xba5c, 0x1120, 0x080c, 0xa58f, 0x0804, 0xa478, 0x6004,
-	0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071, 0x1894, 0x2079,
-	0x0000, 0x080c, 0x33bc, 0x00fe, 0x00ee, 0x0804, 0xa478, 0x6004,
-	0x908e, 0x0021, 0x0d40, 0x908e, 0x0022, 0x090c, 0xa58f, 0x0804,
-	0xa478, 0x90b2, 0x0040, 0x1a04, 0xa578, 0x2008, 0x0002, 0xa521,
-	0xa522, 0xa525, 0xa528, 0xa52b, 0xa52e, 0xa51f, 0xa51f, 0xa51f,
-	0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f,
-	0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f,
-	0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa531, 0xa53a, 0xa51f,
-	0xa53b, 0xa53a, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa53a,
-	0xa53a, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f, 0xa51f,
-	0xa51f, 0xa563, 0xa53a, 0xa51f, 0xa536, 0xa51f, 0xa51f, 0xa51f,
-	0xa537, 0xa51f, 0xa51f, 0xa51f, 0xa53a, 0xa55e, 0xa51f, 0x080c,
-	0x0d65, 0x00c0, 0x2001, 0x000b, 0x00e8, 0x2001, 0x0003, 0x00d0,
-	0x2001, 0x0005, 0x00b8, 0x2001, 0x0001, 0x00a0, 0x2001, 0x0009,
-	0x0088, 0x6003, 0x0005, 0x080c, 0x8936, 0x0058, 0x0018, 0x0010,
-	0x080c, 0x61c1, 0x04b8, 0x080c, 0xbf79, 0x6003, 0x0004, 0x080c,
-	0x8936, 0x0005, 0x080c, 0x61c1, 0x6003, 0x0002, 0x0036, 0x2019,
-	0x185e, 0x2304, 0x9084, 0xff00, 0x1120, 0x2001, 0x1957, 0x201c,
-	0x0040, 0x8007, 0x909a, 0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b,
-	0x9318, 0x631a, 0x003e, 0x080c, 0x8936, 0x0c18, 0x080c, 0xbcd3,
-	0x080c, 0x9be7, 0x08f0, 0x00e6, 0x00f6, 0x2071, 0x1894, 0x2079,
-	0x0000, 0x080c, 0x33bc, 0x00fe, 0x00ee, 0x080c, 0x8874, 0x080c,
-	0x9be7, 0x0878, 0x6003, 0x0002, 0x080c, 0xbf79, 0x0804, 0x8936,
-	0x2600, 0x2008, 0x0002, 0xa58d, 0xa58d, 0xa58d, 0xa572, 0xa572,
-	0xa58d, 0xa58d, 0xa58d, 0xa58d, 0xa572, 0xa58d, 0xa572, 0xa58d,
-	0xa572, 0xa58d, 0xa58d, 0xa58d, 0xa58d, 0x080c, 0x0d65, 0x00e6,
-	0x0096, 0x0026, 0x0016, 0x080c, 0xb847, 0x0568, 0x6014, 0x2048,
-	0xa864, 0x9086, 0x0139, 0x11a8, 0xa894, 0x9086, 0x0056, 0x1148,
-	0x080c, 0x512e, 0x0130, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000,
-	0x0028, 0x2001, 0x0030, 0x900e, 0x2011, 0x4005, 0x080c, 0xbe40,
-	0x0090, 0xa868, 0xd0fc, 0x0178, 0xa807, 0x0000, 0x0016, 0x6004,
-	0x908e, 0x0021, 0x0168, 0x908e, 0x003d, 0x0150, 0x001e, 0xa867,
-	0x0103, 0xa833, 0x0100, 0x001e, 0x002e, 0x009e, 0x00ee, 0x0005,
-	0x001e, 0x0009, 0x0cc0, 0x0096, 0x6014, 0x2048, 0xa800, 0x2048,
-	0xa867, 0x0103, 0xa823, 0x8001, 0x009e, 0x0005, 0x00b6, 0x6610,
-	0x2658, 0xb804, 0x9084, 0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0d65,
-	0x6604, 0x96b6, 0x004d, 0x1120, 0x080c, 0xbd5f, 0x0804, 0xa653,
-	0x6604, 0x96b6, 0x0043, 0x1120, 0x080c, 0xbda8, 0x0804, 0xa653,
-	0x6604, 0x96b6, 0x004b, 0x1120, 0x080c, 0xbdd4, 0x0804, 0xa653,
-	0x6604, 0x96b6, 0x0033, 0x1120, 0x080c, 0xbcf5, 0x0804, 0xa653,
-	0x6604, 0x96b6, 0x0028, 0x1120, 0x080c, 0xba95, 0x0804, 0xa653,
-	0x6604, 0x96b6, 0x0029, 0x1120, 0x080c, 0xbad6, 0x0804, 0xa653,
-	0x6604, 0x96b6, 0x001f, 0x1118, 0x080c, 0x9fcb, 0x04e0, 0x6604,
-	0x96b6, 0x0000, 0x1118, 0x080c, 0xa2fc, 0x04a8, 0x6604, 0x96b6,
-	0x0022, 0x1118, 0x080c, 0xa003, 0x0470, 0x6604, 0x96b6, 0x0035,
-	0x1118, 0x080c, 0xa113, 0x0438, 0x6604, 0x96b6, 0x0039, 0x1118,
-	0x080c, 0xa291, 0x0400, 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c,
-	0xa03b, 0x00c8, 0x6604, 0x96b6, 0x0044, 0x1118, 0x080c, 0xa077,
-	0x0090, 0x6604, 0x96b6, 0x0049, 0x1118, 0x080c, 0xa0a2, 0x0058,
-	0x91b6, 0x0015, 0x1110, 0x0063, 0x0030, 0x91b6, 0x0016, 0x1128,
-	0x00be, 0x0804, 0xa911, 0x00be, 0x0005, 0x080c, 0x9ca2, 0x0cd8,
-	0xa670, 0xa673, 0xa670, 0xa6b7, 0xa670, 0xa845, 0xa91e, 0xa670,
-	0xa670, 0xa8eb, 0xa670, 0xa8ff, 0x0096, 0x080c, 0x1595, 0x6014,
-	0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0x009e, 0x0804, 0x9be7,
-	0xa001, 0xa001, 0x0005, 0x00e6, 0x2071, 0x1800, 0x708c, 0x9086,
-	0x0074, 0x1540, 0x080c, 0xcf99, 0x11b0, 0x6010, 0x00b6, 0x2058,
-	0x7030, 0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802,
-	0x00e9, 0x00be, 0x2001, 0x0006, 0x080c, 0x61c1, 0x080c, 0x303b,
-	0x080c, 0x9be7, 0x0088, 0x2001, 0x000a, 0x080c, 0x61c1, 0x080c,
-	0x303b, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x84d8, 0x080c,
-	0x8936, 0x0010, 0x080c, 0xa830, 0x00ee, 0x0005, 0x00d6, 0xb800,
-	0xd084, 0x0158, 0x9006, 0x080c, 0x61ad, 0x2069, 0x1853, 0x6804,
-	0x0020, 0x2001, 0x0006, 0x080c, 0x61ed, 0x00de, 0x0005, 0x00b6,
-	0x0096, 0x00d6, 0x2011, 0x1823, 0x2204, 0x9086, 0x0074, 0x1904,
-	0xa809, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e, 0x1120, 0x080c,
-	0xaa62, 0x0804, 0xa76e, 0x00d6, 0x080c, 0x70b7, 0x0198, 0x0026,
-	0x2011, 0x0010, 0x080c, 0x668b, 0x002e, 0x05c8, 0x080c, 0x53a1,
-	0x1540, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833,
-	0xdead, 0x00f8, 0x0026, 0x2011, 0x8008, 0x080c, 0x668b, 0x002e,
-	0x0530, 0x6014, 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039,
-	0x1140, 0x2001, 0x0030, 0x900e, 0x2011, 0x4009, 0x080c, 0xbe40,
-	0x0040, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833,
-	0xdead, 0x6010, 0x2058, 0xb9a0, 0x0016, 0x080c, 0x303b, 0x080c,
-	0x9be7, 0x001e, 0x080c, 0x311a, 0x00de, 0x0804, 0xa80a, 0x00de,
-	0x080c, 0xaa57, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x0080, 0x1510,
-	0x6014, 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c,
-	0xbe40, 0x0030, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200,
-	0x2001, 0x0006, 0x080c, 0x61c1, 0x080c, 0x303b, 0x080c, 0x9be7,
-	0x0804, 0xa80a, 0x080c, 0xa818, 0x6014, 0x9005, 0x0190, 0x2048,
-	0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039,
-	0x1d08, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xbe40,
-	0x08f8, 0x080c, 0xa80e, 0x0160, 0x9006, 0x080c, 0x61ad, 0x2001,
-	0x0004, 0x080c, 0x61ed, 0x2001, 0x0007, 0x080c, 0x61c1, 0x08a0,
-	0x2001, 0x0004, 0x080c, 0x61c1, 0x6003, 0x0001, 0x6007, 0x0003,
-	0x080c, 0x84d8, 0x080c, 0x8936, 0x0804, 0xa80a, 0xb85c, 0xd0e4,
-	0x01d0, 0x080c, 0xbc6d, 0x080c, 0x70b7, 0x0118, 0xd0dc, 0x1904,
-	0xa730, 0x2011, 0x1836, 0x2204, 0xc0ad, 0x2012, 0x2001, 0x0002,
-	0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000, 0x080c, 0x2498, 0x78e2,
-	0x00fe, 0x0804, 0xa730, 0x080c, 0xbcae, 0x2011, 0x1836, 0x2204,
-	0xc0a5, 0x2012, 0x0006, 0x080c, 0xd0fe, 0x000e, 0x1904, 0xa730,
-	0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c, 0x61c1, 0x9006, 0x080c,
-	0x61ad, 0x00c6, 0x2001, 0x180f, 0x2004, 0xd09c, 0x0520, 0x00f6,
-	0x2079, 0x0100, 0x00e6, 0x2071, 0x1800, 0x700c, 0x9084, 0x00ff,
-	0x78e6, 0x707a, 0x7010, 0x78ea, 0x707e, 0x908c, 0x00ff, 0x00ee,
-	0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x246d, 0x00f6, 0x2100,
-	0x900e, 0x080c, 0x2424, 0x795a, 0x00fe, 0x9186, 0x0081, 0x01d8,
-	0x2009, 0x0081, 0x00c8, 0x2009, 0x00ef, 0x00f6, 0x2079, 0x0100,
-	0x79ea, 0x7932, 0x7936, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c,
-	0x246d, 0x00f6, 0x2079, 0x1800, 0x797e, 0x2100, 0x900e, 0x080c,
-	0x2424, 0x795a, 0x00fe, 0x8108, 0x080c, 0x6210, 0x2b00, 0x00ce,
-	0x1904, 0xa730, 0x6012, 0x2009, 0x180f, 0x210c, 0xd19c, 0x0150,
-	0x2009, 0x027c, 0x210c, 0x918c, 0x00ff, 0xb912, 0x2009, 0x027d,
-	0x210c, 0xb916, 0x2001, 0x0002, 0x080c, 0x61c1, 0x6023, 0x0001,
-	0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84d8, 0x080c, 0x8936,
-	0x0008, 0x0431, 0x00de, 0x009e, 0x00be, 0x0005, 0x2001, 0x1810,
-	0x2004, 0xd0a4, 0x0120, 0x2001, 0x1854, 0x2004, 0xd0ac, 0x0005,
-	0x00e6, 0x080c, 0xd582, 0x0190, 0x2071, 0x0260, 0x7108, 0x720c,
-	0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, 0x6010, 0x2058,
-	0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, 0xba16, 0x00ee, 0x0005,
-	0x2030, 0x2001, 0x0007, 0x080c, 0x61c1, 0x080c, 0x53a1, 0x1120,
-	0x2001, 0x0007, 0x080c, 0x61ed, 0x080c, 0x303b, 0x6020, 0x9086,
-	0x000a, 0x1108, 0x0005, 0x0804, 0x9be7, 0x00b6, 0x00e6, 0x0026,
-	0x0016, 0x2071, 0x1800, 0x708c, 0x9086, 0x0014, 0x1904, 0xa8e2,
-	0x00d6, 0x080c, 0x70b7, 0x0198, 0x0026, 0x2011, 0x0010, 0x080c,
-	0x668b, 0x002e, 0x05c8, 0x080c, 0x53a1, 0x1540, 0x6014, 0x2048,
-	0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x00f8, 0x0026,
-	0x2011, 0x8008, 0x080c, 0x668b, 0x002e, 0x0530, 0x6014, 0x2048,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0030,
-	0x900e, 0x2011, 0x4009, 0x080c, 0xbe40, 0x0040, 0x6014, 0x2048,
-	0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x6010, 0x2058,
-	0xb9a0, 0x0016, 0x080c, 0x303b, 0x080c, 0x9be7, 0x001e, 0x080c,
-	0x311a, 0x00de, 0x0804, 0xa8e6, 0x00de, 0x080c, 0x53a1, 0x1170,
-	0x6014, 0x9005, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0,
-	0x2021, 0x0006, 0x080c, 0x4a75, 0x004e, 0x003e, 0x00d6, 0x6010,
-	0x2058, 0x080c, 0x630b, 0x080c, 0xa6a6, 0x00de, 0x080c, 0xab28,
-	0x1588, 0x6010, 0x2058, 0xb890, 0x9005, 0x0560, 0x2001, 0x0006,
-	0x080c, 0x61c1, 0x0096, 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084,
-	0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011,
-	0x4000, 0x080c, 0xbe40, 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0029, 0x0130, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200,
-	0x009e, 0x080c, 0x303b, 0x6020, 0x9086, 0x000a, 0x0138, 0x080c,
-	0x9be7, 0x0020, 0x080c, 0xa58f, 0x080c, 0xa830, 0x001e, 0x002e,
-	0x00ee, 0x00be, 0x0005, 0x2011, 0x1823, 0x2204, 0x9086, 0x0014,
-	0x1160, 0x2001, 0x0002, 0x080c, 0x61c1, 0x6003, 0x0001, 0x6007,
-	0x0001, 0x080c, 0x84d8, 0x0804, 0x8936, 0x0804, 0xa830, 0x2030,
-	0x2011, 0x1823, 0x2204, 0x9086, 0x0004, 0x1148, 0x96b6, 0x000b,
-	0x1120, 0x2001, 0x0007, 0x080c, 0x61c1, 0x0804, 0x9be7, 0x0804,
-	0xa830, 0x0002, 0xa670, 0xa929, 0xa670, 0xa968, 0xa670, 0xaa13,
-	0xa91e, 0xa670, 0xa670, 0xaa26, 0xa670, 0xaa36, 0x6604, 0x9686,
-	0x0003, 0x0904, 0xa845, 0x96b6, 0x001e, 0x1110, 0x080c, 0x9be7,
-	0x0005, 0x00b6, 0x00d6, 0x00c6, 0x080c, 0xaa46, 0x11a0, 0x9006,
-	0x080c, 0x61ad, 0x080c, 0x3006, 0x080c, 0xbf76, 0x2001, 0x0002,
-	0x080c, 0x61c1, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84d8,
-	0x080c, 0x8936, 0x0408, 0x2009, 0x026e, 0x2104, 0x9086, 0x0009,
-	0x1160, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0170,
-	0x8001, 0xb842, 0x601b, 0x000a, 0x0078, 0x2009, 0x026f, 0x2104,
-	0x9084, 0xff00, 0x9086, 0x1900, 0x1108, 0x08a0, 0x080c, 0x3006,
-	0x080c, 0xbf76, 0x080c, 0xa830, 0x00ce, 0x00de, 0x00be, 0x0005,
-	0x0096, 0x00b6, 0x0026, 0x9016, 0x080c, 0xaa54, 0x00d6, 0x2069,
-	0x194d, 0x2d04, 0x9005, 0x0168, 0x6010, 0x2058, 0xb8a0, 0x9086,
-	0x007e, 0x1138, 0x2069, 0x181f, 0x2d04, 0x8000, 0x206a, 0x00de,
-	0x0010, 0x00de, 0x0088, 0x9006, 0x080c, 0x61ad, 0x2001, 0x0002,
-	0x080c, 0x61c1, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84d8,
-	0x080c, 0x8936, 0x0804, 0xa9e3, 0x080c, 0xb847, 0x01b0, 0x6014,
-	0x2048, 0xa864, 0x2010, 0x9086, 0x0139, 0x1138, 0x6007, 0x0016,
-	0x2001, 0x0002, 0x080c, 0xbe9a, 0x00b0, 0x6014, 0x2048, 0xa864,
-	0xd0fc, 0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001, 0x180e, 0x2004,
-	0xd0dc, 0x0148, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005,
-	0x1110, 0x9006, 0x0c38, 0x080c, 0xa58f, 0x2009, 0x026e, 0x2134,
-	0x96b4, 0x00ff, 0x9686, 0x0005, 0x0510, 0x9686, 0x000b, 0x01c8,
-	0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x1118, 0x9686, 0x0009,
-	0x01b0, 0x9086, 0x1900, 0x1168, 0x9686, 0x0009, 0x0180, 0x2001,
-	0x0004, 0x080c, 0x61c1, 0x2001, 0x0028, 0x601a, 0x6007, 0x0052,
-	0x0010, 0x080c, 0xa830, 0x002e, 0x00be, 0x009e, 0x0005, 0x9286,
-	0x0139, 0x0160, 0x6014, 0x2048, 0x080c, 0xb847, 0x0140, 0xa864,
-	0x9086, 0x0139, 0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c50, 0x6010,
-	0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0138, 0x8001, 0xb842,
-	0x601b, 0x000a, 0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086, 0x007e,
-	0x1138, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c6f, 0x00ee, 0x0010,
-	0x080c, 0x3006, 0x0870, 0x080c, 0xaa54, 0x1160, 0x2001, 0x0004,
-	0x080c, 0x61c1, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x84d8,
-	0x0804, 0x8936, 0x080c, 0xa58f, 0x0804, 0xa830, 0x0469, 0x1160,
-	0x2001, 0x0008, 0x080c, 0x61c1, 0x6003, 0x0001, 0x6007, 0x0005,
-	0x080c, 0x84d8, 0x0804, 0x8936, 0x0804, 0xa830, 0x00e9, 0x1160,
-	0x2001, 0x000a, 0x080c, 0x61c1, 0x6003, 0x0001, 0x6007, 0x0001,
-	0x080c, 0x84d8, 0x0804, 0x8936, 0x0804, 0xa830, 0x2009, 0x026e,
-	0x2104, 0x9086, 0x0003, 0x1138, 0x2009, 0x026f, 0x2104, 0x9084,
-	0xff00, 0x9086, 0x2a00, 0x0005, 0x9085, 0x0001, 0x0005, 0x00b6,
-	0x00c6, 0x0016, 0x6110, 0x2158, 0x080c, 0x627f, 0x001e, 0x00ce,
-	0x00be, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016,
-	0x6010, 0x2058, 0x2009, 0x1836, 0x2104, 0x9085, 0x0003, 0x200a,
-	0x080c, 0xaafa, 0x0560, 0x2009, 0x1836, 0x2104, 0xc0cd, 0x200a,
-	0x080c, 0x6663, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c,
-	0xd273, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a,
-	0x2009, 0x0001, 0x080c, 0x2fc5, 0x00e6, 0x2071, 0x1800, 0x080c,
-	0x2ddb, 0x00ee, 0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009, 0x007f,
-	0x080c, 0x311a, 0x8108, 0x1f04, 0xaa98, 0x015e, 0x00ce, 0x080c,
-	0xaa57, 0x2071, 0x0260, 0x2079, 0x0200, 0x7817, 0x0001, 0x2001,
-	0x1836, 0x200c, 0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc, 0x0118,
-	0x7038, 0xd0dc, 0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001, 0x1836,
-	0x2102, 0x2079, 0x0100, 0x2e04, 0x9084, 0x00ff, 0x2069, 0x181e,
-	0x206a, 0x78e6, 0x0006, 0x8e70, 0x2e04, 0x2069, 0x181f, 0x206a,
-	0x78ea, 0x7832, 0x7836, 0x2010, 0x9084, 0xff00, 0x001e, 0x9105,
-	0x2009, 0x182b, 0x200a, 0x2200, 0x9084, 0x00ff, 0x2008, 0x080c,
-	0x246d, 0x080c, 0x70b7, 0x0170, 0x2071, 0x0260, 0x2069, 0x1953,
-	0x7048, 0x206a, 0x704c, 0x6806, 0x7050, 0x680a, 0x7054, 0x680e,
-	0x080c, 0xbc6d, 0x0040, 0x2001, 0x0006, 0x080c, 0x61c1, 0x080c,
-	0x303b, 0x080c, 0x9be7, 0x001e, 0x003e, 0x00de, 0x00ee, 0x00fe,
-	0x00be, 0x0005, 0x0096, 0x0026, 0x0036, 0x00e6, 0x0156, 0x2019,
-	0x182b, 0x231c, 0x83ff, 0x01f0, 0x2071, 0x0260, 0x7200, 0x9294,
-	0x00ff, 0x7004, 0x9084, 0xff00, 0x9205, 0x9306, 0x1198, 0x2011,
-	0x0276, 0x20a9, 0x0004, 0x2b48, 0x2019, 0x000a, 0x080c, 0xabdf,
-	0x1148, 0x2011, 0x027a, 0x20a9, 0x0004, 0x2019, 0x0006, 0x080c,
-	0xabdf, 0x1100, 0x015e, 0x00ee, 0x003e, 0x002e, 0x009e, 0x0005,
-	0x00e6, 0x2071, 0x0260, 0x7034, 0x9086, 0x0014, 0x11a8, 0x7038,
-	0x9086, 0x0800, 0x1188, 0x703c, 0xd0ec, 0x0160, 0x9084, 0x0f00,
-	0x9086, 0x0100, 0x1138, 0x7054, 0xd0a4, 0x1110, 0xd0ac, 0x0110,
-	0x9006, 0x0010, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x0096,
-	0x00c6, 0x0076, 0x0056, 0x0046, 0x0026, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2029, 0x19c4, 0x252c, 0x2021, 0x19cb, 0x2424, 0x2061,
-	0x1ddc, 0x2071, 0x1800, 0x7250, 0x7070, 0x9202, 0x1a04, 0xabb7,
-	0x080c, 0xd2a4, 0x0904, 0xabb0, 0x6720, 0x9786, 0x0007, 0x0904,
-	0xabb0, 0x2500, 0x9c06, 0x0904, 0xabb0, 0x2400, 0x9c06, 0x0904,
-	0xabb0, 0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1590, 0x00c6, 0x6043,
-	0xffff, 0x6000, 0x9086, 0x0004, 0x1110, 0x080c, 0x1914, 0x9786,
-	0x000a, 0x0148, 0x080c, 0xba5c, 0x1130, 0x00ce, 0x080c, 0xa58f,
-	0x080c, 0x9c21, 0x00e8, 0x6014, 0x2048, 0x080c, 0xb847, 0x01a8,
-	0x9786, 0x0003, 0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130,
-	0x0096, 0xa878, 0x2048, 0x080c, 0x0fd4, 0x009e, 0xab7a, 0xa877,
-	0x0000, 0x080c, 0x698a, 0x080c, 0xba36, 0x080c, 0x9c21, 0x00ce,
-	0x9ce0, 0x001c, 0x7064, 0x9c02, 0x1210, 0x0804, 0xab5b, 0x012e,
-	0x000e, 0x002e, 0x004e, 0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee,
-	0x0005, 0x9786, 0x0006, 0x1118, 0x080c, 0xd21e, 0x0c30, 0x9786,
-	0x000a, 0x0998, 0x0880, 0x220c, 0x2304, 0x9106, 0x1130, 0x8210,
-	0x8318, 0x1f04, 0xabcb, 0x9006, 0x0005, 0x2304, 0x9102, 0x0218,
-	0x2001, 0x0001, 0x0008, 0x9006, 0x918d, 0x0001, 0x0005, 0x0136,
-	0x01c6, 0x0016, 0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0,
-	0x9084, 0xffc0, 0x9300, 0x2098, 0x3518, 0x20a9, 0x0001, 0x220c,
-	0x4002, 0x910e, 0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006, 0x001e,
-	0x01ce, 0x013e, 0x0005, 0x220c, 0x9102, 0x0218, 0x2001, 0x0001,
-	0x0010, 0x2001, 0x0000, 0x918d, 0x0001, 0x001e, 0x01ce, 0x013e,
-	0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d65, 0x080c, 0xba4b,
-	0x0120, 0x080c, 0xba5c, 0x0158, 0x0028, 0x080c, 0x303b, 0x080c,
-	0xba5c, 0x0128, 0x080c, 0x8874, 0x080c, 0x9be7, 0x0005, 0x080c,
-	0xa58f, 0x0cc0, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208,
-	0x000a, 0x0005, 0xac41, 0xac41, 0xac41, 0xac41, 0xac41, 0xac41,
-	0xac41, 0xac41, 0xac41, 0xac41, 0xac41, 0xac43, 0xac43, 0xac43,
-	0xac43, 0xac41, 0xac41, 0xac41, 0xac43, 0xac41, 0xac41, 0xac41,
-	0xac41, 0x080c, 0x0d65, 0x600b, 0xffff, 0x6003, 0x000f, 0x6106,
-	0x0126, 0x2091, 0x8000, 0x080c, 0xbf79, 0x2009, 0x8000, 0x080c,
-	0x84d1, 0x012e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082,
-	0x0040, 0x0804, 0xacc8, 0x9186, 0x0027, 0x1520, 0x080c, 0x8874,
-	0x080c, 0x3006, 0x080c, 0xbf76, 0x0096, 0x6114, 0x2148, 0x080c,
-	0xb847, 0x0198, 0x080c, 0xba5c, 0x1118, 0x080c, 0xa58f, 0x0068,
-	0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0xa97c, 0xc1c5,
-	0xa97e, 0x080c, 0x6996, 0x080c, 0xba36, 0x009e, 0x080c, 0x9be7,
-	0x0804, 0x8936, 0x9186, 0x0014, 0x1120, 0x6004, 0x9082, 0x0040,
-	0x0018, 0x080c, 0x0d65, 0x0005, 0x0002, 0xaca6, 0xaca4, 0xaca4,
-	0xaca4, 0xaca4, 0xaca4, 0xaca4, 0xaca4, 0xaca4, 0xaca4, 0xaca4,
-	0xacbf, 0xacbf, 0xacbf, 0xacbf, 0xaca4, 0xacbf, 0xaca4, 0xacbf,
-	0xaca4, 0xaca4, 0xaca4, 0xaca4, 0x080c, 0x0d65, 0x080c, 0x8874,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xb847, 0x0168, 0xa867, 0x0103,
-	0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ec, 0xa882, 0x080c,
-	0x6996, 0x080c, 0xba36, 0x009e, 0x080c, 0x9be7, 0x0005, 0x080c,
-	0x8874, 0x080c, 0xba5c, 0x090c, 0xa58f, 0x080c, 0x9be7, 0x0005,
-	0x0002, 0xace2, 0xace0, 0xace0, 0xace0, 0xace0, 0xace0, 0xace0,
-	0xace0, 0xace0, 0xace0, 0xace0, 0xace4, 0xace4, 0xace4, 0xace4,
-	0xace0, 0xace6, 0xace0, 0xace4, 0xace0, 0xace0, 0xace0, 0xace0,
-	0x080c, 0x0d65, 0x080c, 0x0d65, 0x080c, 0x0d65, 0x080c, 0x9be7,
-	0x0804, 0x8936, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208,
-	0x000a, 0x0005, 0xad09, 0xad09, 0xad09, 0xad09, 0xad09, 0xad42,
-	0xae31, 0xad09, 0xae3d, 0xad09, 0xad09, 0xad09, 0xad09, 0xad09,
-	0xad09, 0xad09, 0xad09, 0xad09, 0xad09, 0xae3d, 0xad0b, 0xad09,
-	0xae3b, 0x080c, 0x0d65, 0x00b6, 0x0096, 0x6114, 0x2148, 0x6010,
-	0x2058, 0xb800, 0xd0bc, 0x1508, 0xa87b, 0x0000, 0xa867, 0x0103,
-	0xa877, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115,
-	0x190c, 0xaec2, 0x080c, 0x67ac, 0x6210, 0x2258, 0xba3c, 0x82ff,
-	0x0110, 0x8211, 0xba3e, 0xb8c0, 0x9005, 0x0110, 0x080c, 0x639b,
-	0x080c, 0x9be7, 0x009e, 0x00be, 0x0005, 0xa87c, 0xd0ac, 0x09e0,
-	0xa838, 0xa934, 0x9105, 0x09c0, 0xa880, 0xd0bc, 0x19a8, 0x080c,
-	0xbb8c, 0x0c80, 0x00b6, 0x0096, 0x6114, 0x2148, 0x601c, 0xd0fc,
-	0x1110, 0x7644, 0x0008, 0x9036, 0x96b4, 0x0fff, 0x86ff, 0x1590,
-	0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xae20, 0xa87b, 0x0000,
-	0xa867, 0x0103, 0xae76, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xaec2, 0x080c, 0x67ac, 0x6210, 0x2258, 0xba3c,
-	0x82ff, 0x0110, 0x8211, 0xba3e, 0xb8c0, 0x9005, 0x0110, 0x080c,
-	0x639b, 0x601c, 0xd0fc, 0x1148, 0x7044, 0xd0e4, 0x1904, 0xae04,
-	0x080c, 0x9be7, 0x009e, 0x00be, 0x0005, 0x2009, 0x0211, 0x210c,
-	0x080c, 0x0d65, 0x968c, 0x0c00, 0x0150, 0x6010, 0x2058, 0xb800,
-	0xd0bc, 0x1904, 0xae08, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c,
-	0x00ff, 0x9186, 0x0002, 0x0508, 0x9186, 0x0028, 0x1118, 0xa87b,
-	0x001c, 0x00e8, 0xd6dc, 0x01a0, 0xa87b, 0x0015, 0xa87c, 0xd0ac,
-	0x0170, 0xa938, 0xaa34, 0x2100, 0x9205, 0x0148, 0x7048, 0x9106,
-	0x1118, 0x704c, 0x9206, 0x0118, 0xa992, 0xaa8e, 0xc6dc, 0x0038,
-	0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xa867,
-	0x0103, 0xae76, 0x901e, 0xd6c4, 0x01d8, 0x9686, 0x0100, 0x1130,
-	0x7064, 0x9005, 0x1118, 0xc6c4, 0x0804, 0xad4e, 0x735c, 0xab86,
-	0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036,
-	0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xb41a, 0x003e,
-	0xd6cc, 0x0904, 0xad63, 0x7154, 0xa98a, 0x81ff, 0x0904, 0xad63,
-	0x9192, 0x0021, 0x1278, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029,
-	0x080c, 0xb41a, 0x2011, 0x0205, 0x2013, 0x0000, 0x080c, 0xbf06,
-	0x0804, 0xad63, 0xa868, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a,
-	0x0c50, 0x00a6, 0x2950, 0x080c, 0xb3b9, 0x00ae, 0x080c, 0xbf06,
-	0x080c, 0xb40a, 0x0804, 0xad65, 0x080c, 0xbb4f, 0x0804, 0xad7a,
-	0xa87c, 0xd0ac, 0x0904, 0xad8b, 0xa880, 0xd0bc, 0x1904, 0xad8b,
-	0x7348, 0xa838, 0x9306, 0x11c8, 0x734c, 0xa834, 0x931e, 0x0904,
-	0xad8b, 0xd6d4, 0x0190, 0xab38, 0x9305, 0x0904, 0xad8b, 0x0068,
-	0xa87c, 0xd0ac, 0x0904, 0xad56, 0xa838, 0xa934, 0x9105, 0x0904,
-	0xad56, 0xa880, 0xd0bc, 0x1904, 0xad56, 0x080c, 0xbb8c, 0x0804,
-	0xad7a, 0x00f6, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08,
-	0x00fe, 0x0021, 0x0005, 0x0011, 0x0005, 0x0005, 0x0096, 0x6003,
-	0x0002, 0x6007, 0x0043, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0128,
-	0x009e, 0x0005, 0x2130, 0x2228, 0x0058, 0x2400, 0xa9ac, 0x910a,
-	0x2300, 0xaab0, 0x9213, 0x2600, 0x9102, 0x2500, 0x9203, 0x0e90,
-	0xac46, 0xab4a, 0xae36, 0xad3a, 0x6044, 0xd0fc, 0x190c, 0x98f1,
-	0x604b, 0x0000, 0x080c, 0x1ad2, 0x1118, 0x6144, 0x080c, 0x84fd,
-	0x009e, 0x0005, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208,
-	0x000a, 0x0005, 0xae89, 0xae89, 0xae89, 0xae89, 0xae89, 0xae89,
-	0xae89, 0xae89, 0xae89, 0xae89, 0xae8b, 0xae89, 0xae89, 0xae89,
-	0xae89, 0xae9c, 0xae89, 0xae89, 0xae89, 0xae89, 0xaec0, 0xae89,
-	0xae89, 0x080c, 0x0d65, 0x6004, 0x9086, 0x0040, 0x1110, 0x080c,
-	0x8874, 0x2019, 0x0001, 0x080c, 0x9286, 0x6003, 0x0002, 0x080c,
-	0xbf7e, 0x080c, 0x88d1, 0x0005, 0x6004, 0x9086, 0x0040, 0x1110,
-	0x080c, 0x8874, 0x2019, 0x0001, 0x080c, 0x9286, 0x080c, 0x88d1,
-	0x080c, 0x3006, 0x080c, 0xbf76, 0x0096, 0x6114, 0x2148, 0x080c,
-	0xb847, 0x0150, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000,
-	0x080c, 0x6996, 0x080c, 0xba36, 0x009e, 0x080c, 0x9be7, 0x0005,
-	0x080c, 0x0d65, 0xa87b, 0x0015, 0xd1fc, 0x0180, 0xa87b, 0x0007,
-	0x8002, 0x8000, 0x810a, 0x9189, 0x0000, 0x0006, 0x0016, 0x2009,
-	0x1a48, 0x2104, 0x8000, 0x200a, 0x001e, 0x000e, 0xa992, 0xa88e,
-	0x0005, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
-	0x0005, 0xaef8, 0xaef8, 0xaef8, 0xaef8, 0xaef8, 0xaefa, 0xaef8,
-	0xaef8, 0xafb7, 0xaef8, 0xaef8, 0xaef8, 0xaef8, 0xaef8, 0xaef8,
-	0xaef8, 0xaef8, 0xaef8, 0xaef8, 0xb0fb, 0xaef8, 0xb105, 0xaef8,
-	0x080c, 0x0d65, 0x601c, 0xd0bc, 0x0178, 0xd084, 0x0168, 0xd0f4,
-	0x0120, 0xc084, 0x601e, 0x0804, 0xacea, 0x6114, 0x0096, 0x2148,
-	0xa87c, 0xc0e5, 0xa87e, 0x009e, 0x0076, 0x00a6, 0x00e6, 0x0096,
-	0x2071, 0x0260, 0x6114, 0x2150, 0x601c, 0xd0fc, 0x1110, 0x7644,
-	0x0008, 0x9036, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e,
-	0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e,
-	0x00be, 0x86ff, 0x0904, 0xafb0, 0x9694, 0xff00, 0x9284, 0x0c00,
-	0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904,
-	0xafb0, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4,
-	0xb676, 0x0c38, 0x080c, 0x1022, 0x090c, 0x0d65, 0x2900, 0xb07a,
-	0xb77c, 0x97bd, 0x0200, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a,
-	0xb06c, 0xa86e, 0xb070, 0xa872, 0x7044, 0x9084, 0xf000, 0x9635,
-	0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, 0x734c, 0xab8e,
-	0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, 0x0028, 0x1118,
-	0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015, 0x0038,
-	0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xaf7e,
-	0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190, 0x735c,
-	0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008,
-	0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xb41a,
-	0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8, 0x9192,
-	0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c,
-	0xb41a, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068, 0xd0fc,
-	0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c, 0xb3b9,
-	0x080c, 0x18f2, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x2001,
-	0x1959, 0x2004, 0x604a, 0x0096, 0x6114, 0x2148, 0xa83c, 0xa940,
-	0x9105, 0x1118, 0xa87c, 0xc0dc, 0xa87e, 0x6003, 0x0002, 0x080c,
-	0xbf87, 0x0904, 0xb0f6, 0x604b, 0x0000, 0x6010, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904, 0xb0b5, 0xa978,
-	0xa868, 0xd0fc, 0x0904, 0xb076, 0x0016, 0xa87c, 0x0006, 0xa880,
-	0x0006, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002,
-	0x0904, 0xb044, 0x9086, 0x0028, 0x1904, 0xb030, 0xa87b, 0x001c,
-	0xb07b, 0x001c, 0x0804, 0xb04c, 0x6024, 0xd0f4, 0x11d0, 0xa838,
-	0xaa34, 0x9205, 0x09c8, 0xa838, 0xaa90, 0x9206, 0x1120, 0xa88c,
-	0xaa34, 0x9206, 0x0988, 0x6024, 0xd0d4, 0x1148, 0xa9ac, 0xa834,
-	0x9102, 0x603a, 0xa9b0, 0xa838, 0x9103, 0x603e, 0x6024, 0xc0f5,
-	0x6026, 0x6010, 0x00b6, 0x2058, 0xb83c, 0x8000, 0xb83e, 0x00be,
-	0x601c, 0xc0fc, 0x601e, 0x9006, 0xa876, 0xa892, 0xa88e, 0xa87c,
-	0xc0e4, 0xa87e, 0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096, 0xa878,
-	0x2048, 0x080c, 0x0fd4, 0x009e, 0x080c, 0xbb8c, 0x0804, 0xb0f6,
-	0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xbe29,
-	0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b,
-	0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834,
-	0xa938, 0x9115, 0x190c, 0xaec2, 0xa87c, 0xb07e, 0xa890, 0xb092,
-	0xa88c, 0xb08e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0,
-	0x20a9, 0x0020, 0x8a06, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e0,
-	0x9084, 0xffc0, 0x9080, 0x0019, 0x2098, 0x4003, 0x00ae, 0x000e,
-	0xa882, 0x000e, 0xa87e, 0x080c, 0xbf06, 0x001e, 0xa874, 0x0006,
-	0x2148, 0x080c, 0x0fd4, 0x001e, 0x0804, 0xb0e2, 0x0016, 0x00a6,
-	0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086,
-	0x0028, 0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc,
-	0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xbe29, 0x0118,
-	0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007,
-	0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xaec2, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c,
-	0xb07e, 0x00ae, 0x080c, 0x0fd4, 0x009e, 0x080c, 0xbf06, 0xa974,
-	0x0016, 0x080c, 0xb40a, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974,
-	0x9184, 0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118,
-	0xa87b, 0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c,
-	0xbe29, 0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118,
-	0xa87b, 0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128,
-	0xa834, 0xa938, 0x9115, 0x190c, 0xaec2, 0xa974, 0x0016, 0x080c,
-	0x67ac, 0x001e, 0x6010, 0x00b6, 0x2058, 0xba3c, 0x82ff, 0x0110,
-	0x8211, 0xba3e, 0xb8c0, 0x9005, 0x0120, 0x0016, 0x080c, 0x639b,
-	0x001e, 0x00be, 0xd1e4, 0x1120, 0x080c, 0x9be7, 0x009e, 0x0005,
-	0x080c, 0xbb4f, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0x080c,
-	0xbf87, 0x190c, 0x1900, 0x009e, 0x0005, 0x0096, 0x6114, 0x2148,
-	0xa83c, 0xa940, 0x9105, 0x01e8, 0xa877, 0x0000, 0xa87b, 0x0000,
-	0xa867, 0x0103, 0x00b6, 0x6010, 0x2058, 0xa834, 0xa938, 0x9115,
-	0x11a0, 0x080c, 0x67ac, 0xba3c, 0x8211, 0x0208, 0xba3e, 0xb8c0,
-	0x9005, 0x0110, 0x080c, 0x639b, 0x080c, 0x9be7, 0x00be, 0x009e,
-	0x0005, 0xa87c, 0xc0dc, 0xa87e, 0x08f8, 0xb800, 0xd0bc, 0x1120,
-	0xa834, 0x080c, 0xaec2, 0x0c28, 0xa880, 0xd0bc, 0x1dc8, 0x080c,
-	0xbb8c, 0x0c60, 0x080c, 0x8874, 0x0010, 0x080c, 0x88d1, 0x601c,
-	0xd084, 0x0110, 0x080c, 0x1914, 0x080c, 0xb847, 0x01f0, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xba5c, 0x1118, 0x080c, 0xa58f, 0x00a0,
-	0xa867, 0x0103, 0x2009, 0x180c, 0x210c, 0xd18c, 0x1198, 0xd184,
-	0x1170, 0x6108, 0xa97a, 0x918e, 0x0029, 0x1110, 0x080c, 0xd51a,
-	0xa877, 0x0000, 0x080c, 0x6996, 0x009e, 0x0804, 0x9c21, 0xa87b,
-	0x0004, 0x0cb0, 0xa87b, 0x0004, 0x0c98, 0x9182, 0x0057, 0x1220,
-	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb18c, 0xb18c, 0xb18c,
-	0xb18c, 0xb18c, 0xb18e, 0xb18c, 0xb18c, 0xb18c, 0xb18c, 0xb18c,
-	0xb18c, 0xb18c, 0xb18c, 0xb18c, 0xb18c, 0xb18c, 0xb18c, 0xb18c,
-	0xb18c, 0xb1b2, 0xb18c, 0xb18c, 0x080c, 0x0d65, 0x080c, 0x5395,
-	0x01f8, 0x6014, 0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118,
-	0x7264, 0x9294, 0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b, 0x0000,
-	0xa864, 0x9086, 0x0139, 0x0128, 0xa867, 0x0103, 0xa976, 0xaa96,
-	0x0030, 0xa897, 0x4000, 0xa99a, 0xaa9e, 0x080c, 0x6996, 0x009e,
-	0x0804, 0x9be7, 0x080c, 0x5395, 0x0dd8, 0x6014, 0x900e, 0x9016,
-	0x0c10, 0x9182, 0x0085, 0x0002, 0xb1cb, 0xb1c9, 0xb1c9, 0xb1d7,
-	0xb1c9, 0xb1c9, 0xb1c9, 0xb1c9, 0xb1c9, 0xb1c9, 0xb1c9, 0xb1c9,
-	0xb1c9, 0x080c, 0x0d65, 0x6003, 0x0001, 0x6106, 0x0126, 0x2091,
-	0x8000, 0x2009, 0x8020, 0x080c, 0x84d1, 0x012e, 0x0005, 0x0026,
-	0x0056, 0x00d6, 0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220,
-	0x080c, 0xb835, 0x01a0, 0x2268, 0x6800, 0x9086, 0x0000, 0x0178,
-	0x6010, 0x6d10, 0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c, 0xb445,
-	0x00ce, 0x0128, 0x6803, 0x0002, 0x6007, 0x0086, 0x0010, 0x6007,
-	0x0087, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84d1, 0x9280,
-	0x0004, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824,
-	0xd0ec, 0x0128, 0x00c6, 0x2260, 0x080c, 0xbb8c, 0x00ce, 0x00ee,
-	0x00de, 0x005e, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004,
-	0x908a, 0x0085, 0x0a0c, 0x0d65, 0x908a, 0x0092, 0x1a0c, 0x0d65,
-	0x9082, 0x0085, 0x00e2, 0x9186, 0x0027, 0x0120, 0x9186, 0x0014,
-	0x190c, 0x0d65, 0x080c, 0x8874, 0x0096, 0x6014, 0x2048, 0x080c,
-	0xb847, 0x0140, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029,
-	0x080c, 0x6996, 0x009e, 0x080c, 0x9c21, 0x0804, 0x8936, 0xb24c,
-	0xb24e, 0xb24e, 0xb24c, 0xb24c, 0xb24c, 0xb24c, 0xb24c, 0xb24c,
-	0xb24c, 0xb24c, 0xb24c, 0xb24c, 0x080c, 0x0d65, 0x080c, 0x9c21,
-	0x0005, 0x9186, 0x0013, 0x1130, 0x6004, 0x9082, 0x0085, 0x2008,
-	0x0804, 0xb29d, 0x9186, 0x0027, 0x1558, 0x080c, 0x8874, 0x080c,
-	0x3006, 0x080c, 0xbf76, 0x0096, 0x6014, 0x2048, 0x080c, 0xb847,
-	0x0150, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c,
-	0x6996, 0x080c, 0xba36, 0x009e, 0x080c, 0x9be7, 0x0005, 0x9186,
-	0x0089, 0x0118, 0x9186, 0x008a, 0x1140, 0x080c, 0x9ab7, 0x0128,
-	0x9086, 0x000c, 0x0904, 0xb2d5, 0x0000, 0x080c, 0x9ca2, 0x0c70,
-	0x9186, 0x0014, 0x1d60, 0x080c, 0x8874, 0x0096, 0x6014, 0x2048,
-	0x080c, 0xb847, 0x0d00, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b,
-	0x0006, 0xa880, 0xc0ec, 0xa882, 0x0890, 0x0002, 0xb2ad, 0xb2ab,
-	0xb2ab, 0xb2ab, 0xb2ab, 0xb2ab, 0xb2c1, 0xb2ab, 0xb2ab, 0xb2ab,
-	0xb2ab, 0xb2ab, 0xb2ab, 0x080c, 0x0d65, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001,
-	0x1957, 0x0010, 0x2001, 0x1958, 0x2004, 0x601a, 0x6003, 0x000c,
-	0x0005, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118,
-	0x9186, 0x0035, 0x1118, 0x2001, 0x1957, 0x0010, 0x2001, 0x1958,
-	0x2004, 0x601a, 0x6003, 0x000e, 0x0005, 0x9182, 0x0092, 0x1220,
-	0x9182, 0x0085, 0x0208, 0x0012, 0x0804, 0x9ca2, 0xb2eb, 0xb2eb,
-	0xb2eb, 0xb2eb, 0xb2ed, 0xb33a, 0xb2eb, 0xb2eb, 0xb2eb, 0xb2eb,
-	0xb2eb, 0xb2eb, 0xb2eb, 0x080c, 0x0d65, 0x0096, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x009e,
-	0x0804, 0xb34e, 0x080c, 0xb847, 0x1118, 0x080c, 0xba36, 0x0068,
-	0x6014, 0x2048, 0x080c, 0xbf8d, 0x1110, 0x080c, 0xba36, 0xa867,
-	0x0103, 0x080c, 0xbf41, 0x080c, 0x6996, 0x00d6, 0x2c68, 0x080c,
-	0x9b91, 0x01d0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b, 0xffff,
-	0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e,
-	0x6910, 0x6112, 0x080c, 0xbcdb, 0x695c, 0x615e, 0x6023, 0x0001,
-	0x2009, 0x8020, 0x080c, 0x84d1, 0x2d60, 0x00de, 0x080c, 0x9be7,
-	0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x05a0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x0130,
-	0x9186, 0x001e, 0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, 0x2c68,
-	0x080c, 0xbed9, 0x11f0, 0x080c, 0x9b91, 0x01d8, 0x6106, 0x6003,
-	0x0001, 0x6023, 0x0001, 0x6910, 0x6112, 0x692c, 0x612e, 0x6930,
-	0x6132, 0x6934, 0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, 0x693c,
-	0x613e, 0x695c, 0x615e, 0x080c, 0xbcdb, 0x2009, 0x8020, 0x080c,
-	0x84d1, 0x2d60, 0x00de, 0x0804, 0x9be7, 0x0096, 0x6014, 0x2048,
-	0x080c, 0xb847, 0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, 0x0128,
-	0xc0ec, 0xa882, 0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, 0xa87b,
-	0x0002, 0x0020, 0xa87b, 0x0005, 0x080c, 0xbb4b, 0xa877, 0x0000,
-	0x080c, 0x6996, 0x080c, 0xba36, 0x009e, 0x0804, 0x9be7, 0x0016,
-	0x0096, 0x6014, 0x2048, 0x080c, 0xb847, 0x0140, 0xa867, 0x0103,
-	0xa87b, 0x0028, 0xa877, 0x0000, 0x080c, 0x6996, 0x009e, 0x001e,
-	0x9186, 0x0013, 0x0158, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027,
-	0x0118, 0x080c, 0x9ca2, 0x0020, 0x080c, 0x8874, 0x080c, 0x9c21,
-	0x0005, 0x0056, 0x0066, 0x0096, 0x00a6, 0x2029, 0x0001, 0x9182,
-	0x0101, 0x1208, 0x0010, 0x2009, 0x0100, 0x2130, 0x8304, 0x9098,
-	0x0018, 0x2009, 0x0020, 0x2011, 0x0029, 0x080c, 0xb41a, 0x96b2,
-	0x0020, 0xb004, 0x904d, 0x0110, 0x080c, 0x0fd4, 0x080c, 0x1022,
-	0x0520, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406,
-	0x968a, 0x003d, 0x1228, 0x2608, 0x2011, 0x001b, 0x0499, 0x00a8,
-	0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x0451,
-	0x0c28, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad,
-	0x0003, 0xb566, 0x95ac, 0x0000, 0x0048, 0x2001, 0x0205, 0x2003,
-	0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x009e, 0x006e,
-	0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055, 0x0130,
-	0xa807, 0x0000, 0x080c, 0x6996, 0x2a48, 0x0cb8, 0x080c, 0x6996,
-	0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7814, 0x9085, 0x0080,
-	0x7816, 0xd184, 0x0108, 0x8108, 0x810c, 0x20a9, 0x0001, 0xa860,
-	0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300, 0x9e00,
-	0x2098, 0x4003, 0x8318, 0x9386, 0x0020, 0x1148, 0x2018, 0x2300,
-	0x9e00, 0x2098, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x8109,
-	0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005, 0x0066, 0x0126, 0x2091,
-	0x8000, 0x2031, 0x0001, 0x6020, 0x9084, 0x000f, 0x0083, 0x012e,
-	0x006e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031, 0x0000,
-	0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005, 0xb497,
-	0xb497, 0xb492, 0xb4bb, 0xb46f, 0xb492, 0xb471, 0xb492, 0xb46f,
-	0xb46f, 0xb492, 0xb492, 0xb492, 0xb46f, 0xb46f, 0xb46f, 0x080c,
-	0x0d65, 0x6010, 0x9080, 0x0000, 0x2004, 0xd0bc, 0x190c, 0xb4bb,
-	0x0036, 0x6014, 0x0096, 0x2048, 0xa880, 0x009e, 0xd0cc, 0x0118,
-	0x2019, 0x000c, 0x0038, 0xd094, 0x0118, 0x2019, 0x000d, 0x0010,
-	0x2019, 0x0010, 0x080c, 0xcdf9, 0x6023, 0x0006, 0x6003, 0x0007,
-	0x003e, 0x0005, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x0096,
-	0x86ff, 0x11e8, 0x6014, 0x2048, 0x080c, 0xb847, 0x01d0, 0x6043,
-	0xffff, 0xa864, 0x9086, 0x0139, 0x1128, 0xa87b, 0x0005, 0xa883,
-	0x0000, 0x0028, 0x900e, 0x2001, 0x0005, 0x080c, 0x6bb3, 0x080c,
-	0xbb4b, 0x080c, 0x698a, 0x080c, 0x9c21, 0x9085, 0x0001, 0x009e,
-	0x0005, 0x9006, 0x0ce0, 0x080c, 0x98c8, 0x080c, 0xbf9b, 0x6000,
-	0x908a, 0x0016, 0x1a0c, 0x0d65, 0x002b, 0x0106, 0x080c, 0x98e4,
-	0x010e, 0x0005, 0xb4da, 0xb508, 0xb4dc, 0xb52f, 0xb503, 0xb4da,
-	0xb492, 0xb497, 0xb497, 0xb492, 0xb492, 0xb492, 0xb492, 0xb492,
-	0xb492, 0xb492, 0x080c, 0x0d65, 0x86ff, 0x1510, 0x6020, 0x9086,
-	0x0006, 0x01f0, 0x0096, 0x6014, 0x2048, 0x080c, 0xb847, 0x0158,
-	0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fd4,
-	0x009e, 0x080c, 0xbb4b, 0x009e, 0x080c, 0xbf1b, 0x6007, 0x0085,
+	0x0005, 0x7057, 0x1ddc, 0x0cc0, 0x9006, 0x0cc0, 0x6020, 0x9084,
+	0x000f, 0x0002, 0x9c8a, 0x9c94, 0x9caf, 0x9cca, 0xbfb4, 0xbfd1,
+	0xbfec, 0x9c8a, 0x9c94, 0x9c8a, 0x9ce6, 0x9c8a, 0x9c8a, 0x9c8a,
+	0x9c8a, 0x9c8a, 0x9186, 0x0013, 0x1130, 0x6044, 0xd0fc, 0x0110,
+	0x080c, 0x885d, 0x0005, 0x0005, 0x0066, 0x6000, 0x90b2, 0x0016,
+	0x1a0c, 0x0d65, 0x0013, 0x006e, 0x0005, 0x9cad, 0xa3f6, 0xa5c8,
+	0x9cad, 0xa656, 0x9faf, 0x9cad, 0x9cad, 0xa378, 0xabfd, 0x9cad,
+	0x9cad, 0x9cad, 0x9cad, 0x9cad, 0x9cad, 0x080c, 0x0d65, 0x0066,
+	0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d65, 0x0013, 0x006e, 0x0005,
+	0x9cc8, 0xb202, 0x9cc8, 0x9cc8, 0x9cc8, 0x9cc8, 0x9cc8, 0x9cc8,
+	0xb1a7, 0xb385, 0x9cc8, 0xb23f, 0xb2c3, 0xb23f, 0xb2c3, 0x9cc8,
+	0x080c, 0x0d65, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0d65, 0x6000,
+	0x0002, 0x9ce4, 0xac47, 0xacde, 0xae5e, 0xaecd, 0x9ce4, 0x9ce4,
+	0x9ce4, 0xac16, 0xb128, 0xb12b, 0x9ce4, 0x9ce4, 0x9ce4, 0x9ce4,
+	0xb15b, 0x9ce4, 0x9ce4, 0x9ce4, 0x080c, 0x0d65, 0x0066, 0x6000,
+	0x90b2, 0x0016, 0x1a0c, 0x0d65, 0x0013, 0x006e, 0x0005, 0x9cff,
+	0x9cff, 0x9d3d, 0x9ddc, 0x9e5c, 0x9cff, 0x9cff, 0x9cff, 0x9d01,
+	0x9cff, 0x9cff, 0x9cff, 0x9cff, 0x9cff, 0x9cff, 0x9cff, 0x080c,
+	0x0d65, 0x9186, 0x004c, 0x0560, 0x9186, 0x0003, 0x190c, 0x0d65,
+	0x0096, 0x601c, 0xc0ed, 0x601e, 0x6003, 0x0003, 0x6106, 0x6014,
+	0x2048, 0xa87c, 0x9084, 0xa000, 0xc0b5, 0xa87e, 0xa8ac, 0xa836,
+	0xa8b0, 0xa83a, 0x9006, 0xa846, 0xa84a, 0xa884, 0x9092, 0x199a,
+	0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a,
+	0x009e, 0x080c, 0x1a71, 0x2009, 0x8030, 0x080c, 0x84fa, 0x0005,
+	0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c, 0x9e7e,
+	0x080c, 0xbf79, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096, 0x00f6,
+	0x2079, 0x1800, 0x7a8c, 0x6014, 0x2048, 0xa87c, 0xd0ec, 0x1110,
+	0x9290, 0x0018, 0xac78, 0xc4fc, 0x0046, 0xa8e0, 0x9005, 0x1140,
+	0xa8dc, 0x921a, 0x0140, 0x0220, 0xa87b, 0x0007, 0x2010, 0x0028,
+	0xa87b, 0x0015, 0x0010, 0xa87b, 0x0000, 0x8214, 0xa883, 0x0000,
+	0xaa02, 0x0006, 0x0016, 0x0026, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
+	0x2400, 0x9005, 0x1108, 0x009a, 0x2100, 0x9086, 0x0015, 0x1118,
+	0x2001, 0x0001, 0x0038, 0x2100, 0x9086, 0x0016, 0x0118, 0x2001,
+	0x0001, 0x002a, 0x94a4, 0x0007, 0x8423, 0x9405, 0x0002, 0x9da4,
+	0x9da4, 0x9d9f, 0x9da2, 0x9da4, 0x9d9c, 0x9d8f, 0x9d8f, 0x9d8f,
+	0x9d8f, 0x9d8f, 0x9d8f, 0x9d8f, 0x9d8f, 0x9d8f, 0x9d8f, 0x00fe,
+	0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e, 0x000e, 0x004e, 0x00fe,
+	0x009e, 0x00de, 0x080c, 0x0d65, 0x080c, 0xa839, 0x0028, 0x080c,
+	0xa95c, 0x0010, 0x080c, 0xaa4b, 0x00fe, 0x00ee, 0x00de, 0x00ce,
+	0x002e, 0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0x9f3c, 0x0530,
+	0xa804, 0xa80e, 0x00a6, 0x2050, 0xb100, 0x00ae, 0x8006, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xaacc,
+	0xabd0, 0xacd4, 0xadd8, 0x2031, 0x0000, 0x2041, 0x128b, 0x080c,
+	0xa0e7, 0x0160, 0x000e, 0x9005, 0x0120, 0x00fe, 0x009e, 0x00de,
+	0x0005, 0x00fe, 0x009e, 0x00de, 0x0804, 0x9bda, 0x2001, 0x002c,
+	0x900e, 0x080c, 0x9fa2, 0x0c70, 0x91b6, 0x0015, 0x0170, 0x91b6,
+	0x0016, 0x0158, 0x91b2, 0x0047, 0x0a0c, 0x0d65, 0x91b2, 0x0050,
+	0x1a0c, 0x0d65, 0x9182, 0x0047, 0x0042, 0x080c, 0x9aaa, 0x0120,
+	0x9086, 0x0002, 0x0904, 0x9d3d, 0x0005, 0x9dfe, 0x9dfe, 0x9e00,
+	0x9e32, 0x9dfe, 0x9dfe, 0x9dfe, 0x9dfe, 0x9e45, 0x080c, 0x0d65,
+	0x00d6, 0x0016, 0x0096, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c,
+	0xd0fc, 0x01c0, 0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, 0x9005,
+	0x0140, 0x2001, 0x0000, 0x900e, 0x080c, 0x9fa2, 0x080c, 0x9bda,
+	0x00a8, 0x6003, 0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, 0xa8ae,
+	0xa8b2, 0x0c78, 0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, 0xa8ae,
+	0xa8a8, 0xa8b2, 0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, 0x001e,
+	0x00de, 0x0005, 0x080c, 0x88b8, 0x00d6, 0x0096, 0x6114, 0x2148,
+	0x080c, 0xb842, 0x0120, 0xa87b, 0x0006, 0x080c, 0x6991, 0x009e,
+	0x00de, 0x080c, 0x9bda, 0x0804, 0x891b, 0x080c, 0x88b8, 0x080c,
+	0x300e, 0x080c, 0xbf76, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xb842, 0x0120, 0xa87b, 0x0029, 0x080c, 0x6991, 0x009e, 0x00de,
+	0x080c, 0x9bda, 0x0804, 0x891b, 0x9182, 0x0047, 0x0002, 0x9e6c,
+	0x9e6e, 0x9e6c, 0x9e6c, 0x9e6c, 0x9e6c, 0x9e6c, 0x9e6c, 0x9e6c,
+	0x9e6c, 0x9e6c, 0x9e6c, 0x9e6e, 0x080c, 0x0d65, 0x00d6, 0x0096,
+	0x080c, 0x15a2, 0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000,
+	0x080c, 0x6991, 0x009e, 0x00de, 0x0804, 0x9bda, 0x0026, 0x0036,
+	0x0056, 0x0066, 0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, 0x1022,
+	0x000e, 0x090c, 0x0d65, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019,
+	0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, 0x1800,
+	0x798c, 0x9188, 0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, 0x2950,
+	0x00a6, 0x2001, 0x0205, 0x2003, 0x0000, 0x901e, 0x2029, 0x0001,
+	0x9182, 0x0034, 0x1228, 0x2011, 0x001f, 0x080c, 0xb408, 0x04c0,
+	0x2130, 0x2009, 0x0034, 0x2011, 0x001f, 0x080c, 0xb408, 0x96b2,
+	0x0034, 0xb004, 0x904d, 0x0110, 0x080c, 0x0fd4, 0x080c, 0x1022,
+	0x01d0, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406,
+	0x968a, 0x003d, 0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xb408,
+	0x00b8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b,
+	0x080c, 0xb408, 0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae,
+	0x852f, 0x95ad, 0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, 0x0048,
+	0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050,
+	0xb566, 0x2a48, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6991,
+	0x000e, 0x2048, 0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, 0x006e,
+	0x005e, 0x003e, 0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, 0x0006,
+	0x080c, 0x1022, 0x000e, 0x090c, 0x0d65, 0xa960, 0x21e8, 0xa95c,
+	0x9188, 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xaa66,
+	0xa87a, 0x2079, 0x1800, 0x798c, 0x810c, 0x9188, 0x000c, 0x9182,
+	0x001a, 0x0210, 0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, 0xac76,
+	0x2e98, 0xa85c, 0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, 0x200c,
+	0x918d, 0x0080, 0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6991,
+	0x009e, 0x00fe, 0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, 0x0096,
+	0x0016, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x001e,
+	0x2079, 0x0200, 0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, 0x000c,
+	0x2098, 0x2021, 0x003e, 0x901e, 0x9282, 0x0020, 0x0218, 0x2011,
+	0x0020, 0x2018, 0x9486, 0x003e, 0x1170, 0x0096, 0x080c, 0x1022,
+	0x2900, 0x009e, 0x05c0, 0xa806, 0x2048, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0002, 0x20a0, 0x3300, 0x908e, 0x0260, 0x0140, 0x2009,
+	0x0280, 0x9102, 0x920a, 0x0218, 0x2010, 0x2100, 0x9318, 0x2200,
+	0x9402, 0x1228, 0x2400, 0x9202, 0x2410, 0x9318, 0x9006, 0x2020,
+	0x22a8, 0xa800, 0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, 0x83ff,
+	0x0180, 0x3300, 0x9086, 0x0280, 0x1130, 0x7814, 0x8000, 0x9085,
+	0x0080, 0x7816, 0x2e98, 0x2310, 0x84ff, 0x0904, 0x9f51, 0x0804,
+	0x9f53, 0x9085, 0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, 0x00de,
+	0x001e, 0x0005, 0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, 0xa87a,
+	0xa982, 0x080c, 0x6985, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6,
+	0x0015, 0x1118, 0x080c, 0x9bda, 0x0030, 0x91b6, 0x0016, 0x190c,
+	0x0d65, 0x080c, 0x9bda, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000,
+	0x2e98, 0x6014, 0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x20a0,
+	0x009e, 0x4003, 0x0136, 0x9080, 0x001b, 0x20a0, 0x2011, 0x0006,
+	0x20a9, 0x0001, 0x3418, 0x8318, 0x23a0, 0x4003, 0x3318, 0x8318,
+	0x2398, 0x8211, 0x1db8, 0x2011, 0x0006, 0x013e, 0x20a0, 0x3318,
+	0x8318, 0x2398, 0x4003, 0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8,
+	0x0096, 0x080c, 0xb842, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000,
+	0xa867, 0x0103, 0x009e, 0x0804, 0x9bda, 0x0096, 0x00d6, 0x0036,
+	0x7330, 0x9386, 0x0200, 0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8c7,
+	0x0000, 0x00be, 0x6014, 0x9005, 0x0130, 0x2048, 0xa807, 0x0000,
+	0xa867, 0x0103, 0xab32, 0x080c, 0x9bda, 0x003e, 0x00de, 0x009e,
+	0x0005, 0x0011, 0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xbf61,
+	0x0188, 0x6014, 0x9005, 0x1170, 0x600b, 0x0003, 0x601b, 0x0000,
+	0x604b, 0x0000, 0x2009, 0x0022, 0x080c, 0xa3ce, 0x9006, 0x001e,
+	0x000e, 0x0005, 0x9085, 0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9,
+	0x0014, 0x9e80, 0x000c, 0x20e1, 0x0000, 0x2098, 0x6014, 0x2048,
+	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001,
+	0x0205, 0x2003, 0x0001, 0x2099, 0x0260, 0x20a9, 0x0016, 0x4003,
+	0x20a9, 0x000a, 0xa804, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0002, 0x2099,
+	0x0260, 0x20a9, 0x0020, 0x4003, 0x2003, 0x0000, 0x6014, 0x2048,
+	0xa800, 0x2048, 0xa867, 0x0103, 0x080c, 0x9bda, 0x001e, 0x009e,
+	0x0005, 0x0096, 0x0016, 0x900e, 0x7030, 0x9086, 0x0100, 0x0140,
+	0x7038, 0x9084, 0x00ff, 0x800c, 0x703c, 0x9084, 0x00ff, 0x8004,
+	0x9080, 0x0004, 0x9108, 0x810b, 0x2011, 0x0002, 0x2019, 0x000c,
+	0x6014, 0x2048, 0x080c, 0xb408, 0x080c, 0xb842, 0x0140, 0x6014,
+	0x2048, 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c,
+	0x9bda, 0x001e, 0x009e, 0x0005, 0x0016, 0x0096, 0x7030, 0x9086,
+	0x0100, 0x1118, 0x2009, 0x0004, 0x0010, 0x7034, 0x800c, 0x810b,
+	0x2011, 0x000c, 0x2019, 0x000c, 0x6014, 0x2048, 0xa804, 0x0096,
+	0x9005, 0x0108, 0x2048, 0x080c, 0xb408, 0x009e, 0x080c, 0xb842,
+	0x0148, 0xa804, 0x9005, 0x1158, 0xa807, 0x0000, 0xa864, 0xa8e2,
+	0xa867, 0x0103, 0x080c, 0x9bda, 0x009e, 0x001e, 0x0005, 0x0086,
+	0x2040, 0xa030, 0x8007, 0x9086, 0x0100, 0x1118, 0x080c, 0xa581,
+	0x00e0, 0xa034, 0x8007, 0x800c, 0x8806, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x000c, 0xa87b, 0x0000, 0xa883,
+	0x0000, 0xa897, 0x4000, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031,
+	0x0000, 0x2041, 0x1271, 0x0019, 0x0d08, 0x008e, 0x0898, 0x0096,
+	0x0006, 0x080c, 0x1022, 0x000e, 0x01b0, 0xa8ab, 0x0dcb, 0xa876,
+	0x000e, 0xa8a2, 0x0006, 0xae6a, 0x2800, 0xa89e, 0xa97a, 0xaf72,
+	0xaa8e, 0xab92, 0xac96, 0xad9a, 0x0086, 0x2940, 0x080c, 0x1117,
+	0x008e, 0x9085, 0x0001, 0x009e, 0x0005, 0x00e6, 0x00d6, 0x0026,
+	0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be,
+	0x9206, 0x1520, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be,
+	0x9206, 0x11e0, 0x604b, 0x0000, 0x2c68, 0x0016, 0x2009, 0x0035,
+	0x080c, 0xbed9, 0x001e, 0x1158, 0x622c, 0x2268, 0x2071, 0x026c,
+	0x6b20, 0x9386, 0x0003, 0x0130, 0x9386, 0x0006, 0x0128, 0x080c,
+	0x9bda, 0x0020, 0x0039, 0x0010, 0x080c, 0xa203, 0x002e, 0x00de,
+	0x00ee, 0x0005, 0x0096, 0x6814, 0x2048, 0x9186, 0x0015, 0x0904,
+	0xa1e2, 0x918e, 0x0016, 0x1904, 0xa201, 0x700c, 0x908c, 0xff00,
+	0x9186, 0x1700, 0x0120, 0x9186, 0x0300, 0x1904, 0xa1bc, 0x89ff,
+	0x1138, 0x6800, 0x9086, 0x000f, 0x0904, 0xa19e, 0x0804, 0xa1ff,
+	0x6808, 0x9086, 0xffff, 0x1904, 0xa1e4, 0xa87c, 0x9084, 0x0060,
+	0x9086, 0x0020, 0x1128, 0xa83c, 0xa940, 0x9105, 0x1904, 0xa1e4,
+	0x6824, 0xd0b4, 0x1904, 0xa1e4, 0x080c, 0xba31, 0x6864, 0xa882,
+	0xa87c, 0xc0dc, 0xc0f4, 0xc0d4, 0xa87e, 0x0026, 0x900e, 0x6a18,
+	0x2001, 0x000a, 0x080c, 0x83fb, 0xa884, 0x920a, 0x0208, 0x8011,
+	0xaa86, 0x82ff, 0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c, 0xb55b,
+	0x00ce, 0x0804, 0xa1ff, 0x00c6, 0xa868, 0xd0fc, 0x1118, 0x080c,
+	0x5d51, 0x0010, 0x080c, 0x60f6, 0x00ce, 0x1904, 0xa1e4, 0x00c6,
+	0x2d60, 0x080c, 0x9bda, 0x00ce, 0x0804, 0xa1ff, 0x00c6, 0x080c,
+	0x9c49, 0x0198, 0x6017, 0x0000, 0x6810, 0x6012, 0x080c, 0xbcdb,
+	0x6023, 0x0003, 0x6904, 0x00c6, 0x2d60, 0x080c, 0x9bda, 0x00ce,
+	0x080c, 0x9c76, 0x00ce, 0x0804, 0xa1ff, 0x2001, 0x1958, 0x2004,
+	0x684a, 0x00ce, 0x0804, 0xa1ff, 0x7008, 0x9086, 0x000b, 0x11c8,
+	0x6010, 0x00b6, 0x2058, 0xb900, 0xc1bc, 0xb902, 0x00be, 0x00c6,
+	0x2d60, 0xa87b, 0x0003, 0x080c, 0xbf1b, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x84b3, 0x00ce,
+	0x0430, 0x700c, 0x9086, 0x2a00, 0x1138, 0x2001, 0x1958, 0x2004,
+	0x684a, 0x00e8, 0x04c1, 0x00e8, 0x89ff, 0x090c, 0x0d65, 0x00c6,
+	0x00d6, 0x2d60, 0xa867, 0x0103, 0xa87b, 0x0003, 0x080c, 0x67a7,
+	0x080c, 0xba31, 0x080c, 0x9c14, 0x0026, 0x6010, 0x00b6, 0x2058,
+	0xba3c, 0x080c, 0x6396, 0x00be, 0x002e, 0x00de, 0x00ce, 0x080c,
+	0x9bda, 0x009e, 0x0005, 0x9186, 0x0015, 0x1128, 0x2001, 0x1958,
+	0x2004, 0x684a, 0x0068, 0x918e, 0x0016, 0x1160, 0x00c6, 0x2d00,
+	0x2060, 0x080c, 0xd4df, 0x080c, 0x83a2, 0x080c, 0x9bda, 0x00ce,
+	0x080c, 0x9bda, 0x0005, 0x0026, 0x0036, 0x0046, 0x7228, 0xacb0,
+	0xabac, 0xd2f4, 0x0130, 0x2001, 0x1958, 0x2004, 0x684a, 0x0804,
+	0xa27d, 0x00c6, 0x2d60, 0x080c, 0xb433, 0x00ce, 0x6804, 0x9086,
+	0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060, 0x6003, 0x0001, 0x6007,
+	0x0050, 0x2009, 0x8023, 0x080c, 0x84b3, 0x00ce, 0x04f0, 0x6800,
+	0x9086, 0x000f, 0x01a8, 0x89ff, 0x090c, 0x0d65, 0x6800, 0x9086,
+	0x0004, 0x1190, 0xa87c, 0xd0ac, 0x0178, 0xa843, 0x0fff, 0xa83f,
+	0x0fff, 0xa880, 0xc0fc, 0xa882, 0x2001, 0x0001, 0x6832, 0x0400,
+	0x2001, 0x0007, 0x6832, 0x00e0, 0xa87c, 0xd0b4, 0x1150, 0xd0ac,
+	0x0db8, 0x6824, 0xd0f4, 0x1d48, 0xa838, 0xa934, 0x9105, 0x0d80,
+	0x0c20, 0xd2ec, 0x1d68, 0x7024, 0x9306, 0x1118, 0x7020, 0x9406,
+	0x0d38, 0x7020, 0x683e, 0x7024, 0x683a, 0x2001, 0x0005, 0x6832,
+	0x080c, 0xbbc5, 0x080c, 0x891b, 0x0010, 0x080c, 0x9bda, 0x004e,
+	0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084,
+	0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1904,
+	0xa2e8, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206,
+	0x1904, 0xa2e8, 0x6038, 0x2068, 0x6824, 0xc0dc, 0x6826, 0x6a20,
+	0x9286, 0x0007, 0x0904, 0xa2e8, 0x9286, 0x0002, 0x0904, 0xa2e8,
+	0x9286, 0x0000, 0x05e8, 0x6808, 0x633c, 0x9306, 0x15c8, 0x2071,
+	0x026c, 0x9186, 0x0015, 0x0570, 0x918e, 0x0016, 0x1100, 0x00c6,
+	0x6038, 0x2060, 0x6104, 0x9186, 0x004b, 0x01c0, 0x9186, 0x004c,
+	0x01a8, 0x9186, 0x004d, 0x0190, 0x9186, 0x004e, 0x0178, 0x9186,
+	0x0052, 0x0160, 0x6014, 0x0096, 0x2048, 0x080c, 0xb842, 0x090c,
+	0x0d65, 0xa87b, 0x0003, 0x009e, 0x080c, 0xbf1b, 0x6007, 0x0085,
 	0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x84b3,
-	0x9085, 0x0001, 0x0005, 0x0066, 0x080c, 0x1914, 0x006e, 0x08a0,
-	0x00e6, 0x2071, 0x19b8, 0x7030, 0x9c06, 0x1120, 0x080c, 0x9206,
-	0x00ee, 0x0850, 0x6020, 0x9084, 0x000f, 0x9086, 0x0006, 0x1150,
-	0x0086, 0x0096, 0x2049, 0x0001, 0x2c40, 0x080c, 0x9382, 0x009e,
-	0x008e, 0x0040, 0x0066, 0x080c, 0x9102, 0x190c, 0x0d65, 0x080c,
-	0x9110, 0x006e, 0x00ee, 0x1904, 0xb4dc, 0x0804, 0xb492, 0x0036,
-	0x00e6, 0x2071, 0x19b8, 0x704c, 0x9c06, 0x1138, 0x901e, 0x080c,
-	0x9286, 0x00ee, 0x003e, 0x0804, 0xb4dc, 0x080c, 0x94b8, 0x00ee,
-	0x003e, 0x1904, 0xb4dc, 0x0804, 0xb492, 0x00c6, 0x0066, 0x6020,
-	0x9084, 0x000f, 0x001b, 0x006e, 0x00ce, 0x0005, 0xb565, 0xb627,
-	0xb78e, 0xb56d, 0x9c21, 0xb565, 0xcdeb, 0xbf83, 0xb627, 0xb55e,
-	0xb80d, 0xb55e, 0xb55e, 0xb55e, 0xb55e, 0xb55e, 0x080c, 0x0d65,
-	0x080c, 0xba5c, 0x1110, 0x080c, 0xa58f, 0x0005, 0x080c, 0x8874,
-	0x0804, 0x9be7, 0x601b, 0x0001, 0x0005, 0x080c, 0xb847, 0x0130,
-	0x6014, 0x0096, 0x2048, 0x2c00, 0xa896, 0x009e, 0x080c, 0x98c8,
-	0x080c, 0xbf9b, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65, 0x0013,
-	0x0804, 0x98e4, 0xb592, 0xb594, 0xb5be, 0xb5d2, 0xb5fd, 0xb592,
-	0xb565, 0xb565, 0xb565, 0xb5d9, 0xb5d9, 0xb592, 0xb592, 0xb592,
-	0xb592, 0xb5e3, 0x080c, 0x0d65, 0x00e6, 0x6014, 0x0096, 0x2048,
-	0xa880, 0xc0b5, 0xa882, 0x009e, 0x2071, 0x19b8, 0x7030, 0x9c06,
-	0x01d0, 0x0066, 0x080c, 0x9102, 0x190c, 0x0d65, 0x080c, 0x9110,
-	0x006e, 0x080c, 0xbf1b, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0002, 0x2001, 0x1958, 0x2004, 0x601a, 0x2009, 0x8020, 0x080c,
-	0x84b3, 0x00ee, 0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096, 0x6014,
-	0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x080c, 0xbf1b, 0x6007,
-	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c,
-	0x84b3, 0x0005, 0x080c, 0x98c8, 0x080c, 0x9a39, 0x080c, 0x98e4,
-	0x0c28, 0x0096, 0x601b, 0x0001, 0x6014, 0x2048, 0xa880, 0xc0b5,
-	0xa882, 0x009e, 0x0005, 0x080c, 0x5395, 0x01a8, 0x6014, 0x0096,
-	0x904d, 0x0180, 0xa864, 0xa867, 0x0103, 0xa87b, 0x0006, 0x9086,
-	0x0139, 0x1140, 0xa867, 0x0139, 0xa897, 0x4005, 0xa89b, 0x0004,
-	0x080c, 0x6996, 0x009e, 0x0804, 0x9be7, 0x6014, 0x0096, 0x904d,
-	0x0508, 0x080c, 0xbf87, 0x01f0, 0x080c, 0x98e4, 0x2001, 0x180f,
-	0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884, 0x009e, 0x8003,
-	0x800b, 0x810b, 0x9108, 0x611a, 0x2001, 0x0037, 0x2c08, 0x080c,
-	0x159e, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c,
-	0x9c85, 0x0005, 0x009e, 0x080c, 0x1914, 0x0804, 0xb5be, 0x6000,
-	0x908a, 0x0016, 0x1a0c, 0x0d65, 0x000b, 0x0005, 0xb63e, 0xb56a,
-	0xb640, 0xb63e, 0xb640, 0xb640, 0xb566, 0xb63e, 0xb560, 0xb560,
-	0xb63e, 0xb63e, 0xb63e, 0xb63e, 0xb63e, 0xb63e, 0x080c, 0x0d65,
-	0x6010, 0x00b6, 0x2058, 0xb804, 0x9084, 0x00ff, 0x00be, 0x908a,
-	0x000c, 0x1a0c, 0x0d65, 0x00b6, 0x0013, 0x00be, 0x0005, 0xb65b,
-	0xb728, 0xb65d, 0xb69d, 0xb65d, 0xb69d, 0xb65d, 0xb66b, 0xb65b,
-	0xb69d, 0xb65b, 0xb68c, 0x080c, 0x0d65, 0x6004, 0x908e, 0x0016,
-	0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e, 0x0002, 0x0590, 0x908e,
-	0x0052, 0x0904, 0xb724, 0x6004, 0x080c, 0xba5c, 0x0904, 0xb741,
-	0x908e, 0x0004, 0x1110, 0x080c, 0x303b, 0x908e, 0x0021, 0x0904,
-	0xb745, 0x908e, 0x0022, 0x0904, 0xb789, 0x908e, 0x003d, 0x0904,
-	0xb745, 0x908e, 0x0039, 0x0904, 0xb749, 0x908e, 0x0035, 0x0904,
-	0xb749, 0x908e, 0x001e, 0x0178, 0x908e, 0x0001, 0x1140, 0x6010,
-	0x2058, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0110, 0x080c,
-	0x3006, 0x080c, 0xa58f, 0x0804, 0x9c21, 0x00c6, 0x00d6, 0x6104,
-	0x9186, 0x0016, 0x0904, 0xb715, 0x9186, 0x0002, 0x1904, 0xb6ea,
-	0x2001, 0x1836, 0x2004, 0xd08c, 0x11c8, 0x080c, 0x70b7, 0x11b0,
-	0x080c, 0xbf61, 0x0138, 0x080c, 0x70da, 0x1120, 0x080c, 0x6fc2,
-	0x0804, 0xb772, 0x2001, 0x194e, 0x2003, 0x0001, 0x2001, 0x1800,
-	0x2003, 0x0001, 0x080c, 0x6fe8, 0x0804, 0xb772, 0x6010, 0x2058,
-	0x2001, 0x1836, 0x2004, 0xd0ac, 0x1904, 0xb772, 0xb8a0, 0x9084,
-	0xff80, 0x1904, 0xb772, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0190,
-	0x8001, 0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398,
-	0x604b, 0x0000, 0x080c, 0x9b91, 0x0128, 0x2b00, 0x6012, 0x6023,
-	0x0001, 0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002, 0x11a0,
-	0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009, 0x1836,
-	0x2104, 0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c6f,
-	0x00ee, 0x080c, 0xa58f, 0x0030, 0x080c, 0xa58f, 0x080c, 0x3006,
-	0x080c, 0xbf76, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x303b,
-	0x012e, 0x00ee, 0x080c, 0x9c21, 0x0005, 0x2001, 0x0002, 0x080c,
-	0x61c1, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84d8, 0x080c,
-	0x8936, 0x00de, 0x00ce, 0x0c80, 0x080c, 0x303b, 0x0804, 0xb699,
-	0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010, 0x2058,
-	0xb840, 0x9084, 0x00ff, 0x9005, 0x0904, 0xb6ea, 0x8001, 0xb842,
-	0x6003, 0x0001, 0x080c, 0x84d8, 0x080c, 0x8936, 0x00de, 0x00ce,
-	0x0898, 0x080c, 0xa58f, 0x0804, 0xb69b, 0x080c, 0xa5cb, 0x0804,
-	0xb69b, 0x00d6, 0x2c68, 0x6104, 0x080c, 0xbed9, 0x00de, 0x0118,
-	0x080c, 0x9be7, 0x00f0, 0x6004, 0x8007, 0x6134, 0x918c, 0x00ff,
-	0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002,
-	0x603c, 0x600a, 0x2001, 0x1958, 0x2004, 0x601a, 0x602c, 0x2c08,
-	0x2060, 0x6024, 0xc0b5, 0x6026, 0x2160, 0x2009, 0x8020, 0x080c,
-	0x84d1, 0x0005, 0x00de, 0x00ce, 0x080c, 0xa58f, 0x080c, 0x3006,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x303b, 0x6017, 0x0000,
-	0x6023, 0x0007, 0x601b, 0x0398, 0x604b, 0x0000, 0x012e, 0x00ee,
-	0x0005, 0x080c, 0xa022, 0x1904, 0xb741, 0x0005, 0x6000, 0x908a,
-	0x0016, 0x1a0c, 0x0d65, 0x0096, 0x00d6, 0x001b, 0x00de, 0x009e,
-	0x0005, 0xb7a9, 0xb7a9, 0xb7a9, 0xb7a9, 0xb7a9, 0xb7a9, 0xb7a9,
-	0xb7a9, 0xb7a9, 0xb565, 0xb7a9, 0xb56a, 0xb7ab, 0xb56a, 0xb7b8,
-	0xb7a9, 0x080c, 0x0d65, 0x6004, 0x9086, 0x008b, 0x0148, 0x6007,
-	0x008b, 0x6003, 0x000d, 0x2009, 0x8020, 0x080c, 0x84d1, 0x0005,
-	0x080c, 0xbf55, 0x0118, 0x080c, 0xbf68, 0x0010, 0x080c, 0xbf76,
-	0x080c, 0xba36, 0x080c, 0xb847, 0x0570, 0x080c, 0x3006, 0x080c,
-	0xb847, 0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b, 0x0006,
-	0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x6996, 0x2c68,
-	0x080c, 0x9b91, 0x0150, 0x6810, 0x6012, 0x080c, 0xbcdb, 0x00c6,
-	0x2d60, 0x080c, 0x9c21, 0x00ce, 0x0008, 0x2d60, 0x6017, 0x0000,
-	0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x84d8,
-	0x080c, 0x8936, 0x00c8, 0x080c, 0xbf55, 0x0138, 0x6034, 0x9086,
-	0x4000, 0x1118, 0x080c, 0x3006, 0x08d0, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x080c,
-	0x3006, 0x0868, 0x080c, 0x9c21, 0x0005, 0x6000, 0x908a, 0x0016,
-	0x1a0c, 0x0d65, 0x0002, 0xb823, 0xb823, 0xb825, 0xb825, 0xb825,
-	0xb823, 0xb823, 0x9c21, 0xb823, 0xb823, 0xb823, 0xb823, 0xb823,
-	0xb823, 0xb823, 0xb823, 0x080c, 0x0d65, 0x080c, 0x98c8, 0x080c,
-	0x9a39, 0x080c, 0x98e4, 0x6114, 0x0096, 0x2148, 0xa87b, 0x0006,
-	0x080c, 0x6996, 0x009e, 0x0804, 0x9be7, 0x9284, 0x0003, 0x1158,
-	0x9282, 0x1ddc, 0x0240, 0x2001, 0x1819, 0x2004, 0x9202, 0x1218,
-	0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x0096, 0x0028, 0x0096,
-	0x0006, 0x6014, 0x2048, 0x000e, 0x0006, 0x9984, 0xf000, 0x9086,
-	0xf000, 0x0110, 0x080c, 0x10cd, 0x000e, 0x009e, 0x0005, 0x00e6,
-	0x00c6, 0x0036, 0x0006, 0x0126, 0x2091, 0x8000, 0x2061, 0x1ddc,
-	0x2071, 0x1800, 0x7350, 0x7070, 0x9302, 0x1640, 0x6020, 0x9206,
-	0x11f8, 0x080c, 0xbf61, 0x0180, 0x9286, 0x0001, 0x1168, 0x6004,
-	0x9086, 0x0004, 0x1148, 0x080c, 0x3006, 0x080c, 0xbf76, 0x00c6,
-	0x080c, 0x9c21, 0x00ce, 0x0060, 0x080c, 0xbc4d, 0x0148, 0x080c,
-	0xba5c, 0x1110, 0x080c, 0xa58f, 0x00c6, 0x080c, 0x9be7, 0x00ce,
-	0x9ce0, 0x001c, 0x7064, 0x9c02, 0x1208, 0x08a0, 0x012e, 0x000e,
-	0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016, 0x9188,
-	0x1000, 0x210c, 0x81ff, 0x0128, 0x2061, 0x1b02, 0x6112, 0x080c,
-	0x3006, 0x9006, 0x0010, 0x9085, 0x0001, 0x001e, 0x00ce, 0x00ee,
-	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9b91, 0x01b0,
-	0x665e, 0x2b00, 0x6012, 0x080c, 0x5395, 0x0118, 0x080c, 0xb978,
-	0x0168, 0x080c, 0xbcdb, 0x6023, 0x0003, 0x2009, 0x004b, 0x080c,
-	0x9c85, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0, 0x080c, 0x9c58, 0x0580,
-	0x605f, 0x0000, 0x2b00, 0x6012, 0x080c, 0xbcdb, 0x6023, 0x0003,
-	0x0016, 0x080c, 0x98c8, 0x080c, 0x863b, 0x0076, 0x903e, 0x080c,
-	0x852a, 0x2c08, 0x080c, 0xcfc8, 0x007e, 0x080c, 0x98e4, 0x001e,
-	0xd184, 0x0128, 0x080c, 0x9be7, 0x9085, 0x0001, 0x0070, 0x080c,
-	0x5395, 0x0128, 0xd18c, 0x1170, 0x080c, 0xb978, 0x0148, 0x2009,
-	0x004c, 0x080c, 0x9c85, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
-	0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90, 0x2009, 0x004d, 0x0010,
-	0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046, 0x0016, 0x080c, 0x9b91,
-	0x2c78, 0x0590, 0x7e5e, 0x2b00, 0x7812, 0x7823, 0x0003, 0x2021,
-	0x0005, 0x080c, 0xb98a, 0x9186, 0x004d, 0x0118, 0x9186, 0x004e,
-	0x0148, 0x2001, 0x1951, 0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c,
-	0x9be7, 0x00d0, 0x2001, 0x1950, 0x200c, 0xd1fc, 0x0120, 0x2f60,
-	0x080c, 0x9be7, 0x0088, 0x2f60, 0x080c, 0x5395, 0x0138, 0xd18c,
-	0x1118, 0x04f1, 0x0148, 0x0010, 0x2900, 0x7816, 0x001e, 0x0016,
-	0x080c, 0x9c85, 0x9085, 0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe,
-	0x0005, 0x00f6, 0x00c6, 0x0046, 0x080c, 0x9b91, 0x2c78, 0x0508,
-	0x7e5e, 0x2b00, 0x7812, 0x7823, 0x0003, 0x0096, 0x2021, 0x0004,
-	0x0489, 0x009e, 0x2001, 0x194f, 0x200c, 0xd1fc, 0x0120, 0x2f60,
-	0x080c, 0x9be7, 0x0060, 0x2f60, 0x080c, 0x5395, 0x0120, 0xd18c,
-	0x1160, 0x0071, 0x0130, 0x2009, 0x0052, 0x080c, 0x9c85, 0x9085,
-	0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98,
-	0x00c6, 0x080c, 0x4878, 0x00ce, 0x1120, 0x080c, 0x9be7, 0x9006,
-	0x0005, 0xa867, 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016, 0x9085,
-	0x0001, 0x0005, 0x0096, 0x0076, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x98c8, 0x080c, 0x644f, 0x0158, 0x2001, 0xb991, 0x0006, 0x900e,
-	0x2400, 0x080c, 0x6bb3, 0x080c, 0x6996, 0x000e, 0x0807, 0x2418,
-	0x080c, 0x883a, 0xbaa0, 0x0086, 0x2041, 0x0001, 0x2039, 0x0001,
-	0x2608, 0x080c, 0x8655, 0x008e, 0x080c, 0x852a, 0x2f08, 0x2648,
-	0x080c, 0xcfc8, 0xb93c, 0x81ff, 0x090c, 0x872c, 0x080c, 0x98e4,
-	0x012e, 0x007e, 0x009e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x9b91, 0x0190, 0x660a, 0x2b08, 0x6112, 0x080c, 0xbcdb,
-	0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x001f, 0x080c, 0x9c85,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x9c58, 0x01b8, 0x660a, 0x2b08,
-	0x6112, 0x080c, 0xbcdb, 0x6023, 0x0008, 0x2900, 0x6016, 0x00f6,
-	0x2c78, 0x080c, 0x164f, 0x00fe, 0x2009, 0x0021, 0x080c, 0x9c85,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009,
-	0x003d, 0x00c6, 0x0126, 0x0016, 0x2091, 0x8000, 0x080c, 0x9b91,
-	0x0198, 0x660a, 0x2b08, 0x6112, 0x080c, 0xbcdb, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x001e, 0x0016, 0x080c, 0x9c85, 0x9085, 0x0001,
-	0x001e, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x9c58, 0x0188, 0x2b08, 0x6112, 0x080c,
-	0xbcdb, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0000, 0x080c,
-	0x9c85, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x2009, 0x0044, 0x0830, 0x2009, 0x0049, 0x0818, 0x0026, 0x00b6,
-	0x6210, 0x2258, 0xba3c, 0x82ff, 0x0118, 0x8211, 0xba3e, 0x1140,
-	0xb8c0, 0x9005, 0x0128, 0xb888, 0x9005, 0x1110, 0xb88b, 0x0001,
-	0x00be, 0x002e, 0x0005, 0x0006, 0x0016, 0x6004, 0x908e, 0x0002,
-	0x0140, 0x908e, 0x0003, 0x0128, 0x908e, 0x0004, 0x0110, 0x9085,
-	0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0096, 0x6020, 0x9086,
-	0x0004, 0x0190, 0x6014, 0x904d, 0x080c, 0xb847, 0x0168, 0xa864,
-	0x9086, 0x0139, 0x0158, 0x6020, 0x9086, 0x0003, 0x0128, 0xa868,
-	0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x000e,
-	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9c58, 0x0198,
+	0x00ce, 0x0030, 0x6038, 0x2070, 0x2001, 0x1958, 0x2004, 0x704a,
+	0x080c, 0x9bda, 0x002e, 0x00de, 0x00ee, 0x0005, 0x00b6, 0x0096,
+	0x00f6, 0x6014, 0x2048, 0x6010, 0x2058, 0x91b6, 0x0015, 0x0130,
+	0xba08, 0xbb0c, 0xbc00, 0xc48c, 0xbc02, 0x0460, 0x0096, 0x0156,
+	0x0036, 0x0026, 0x2b48, 0x9e90, 0x0010, 0x2019, 0x000a, 0x20a9,
+	0x0004, 0x080c, 0xabd3, 0x002e, 0x003e, 0x015e, 0x009e, 0x1904,
+	0xa357, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0014,
+	0x2019, 0x0006, 0x20a9, 0x0004, 0x080c, 0xabd3, 0x002e, 0x003e,
+	0x015e, 0x009e, 0x15a0, 0x7238, 0xba0a, 0x733c, 0xbb0e, 0xbc00,
+	0xc48d, 0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe, 0x009e, 0x00be,
+	0x0804, 0x9fe8, 0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a, 0x009e,
+	0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031,
+	0x0000, 0x2041, 0x1271, 0x080c, 0xa0e7, 0x0130, 0x00fe, 0x009e,
+	0x080c, 0x9bda, 0x00be, 0x0005, 0x080c, 0xa581, 0x0cb8, 0x2b78,
+	0x00f6, 0x080c, 0x300e, 0x080c, 0xbf76, 0x00fe, 0x00c6, 0x080c,
+	0x9b84, 0x2f00, 0x6012, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007,
+	0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x080c, 0x61bc, 0x080c,
+	0x61e8, 0x080c, 0x84ba, 0x080c, 0x891b, 0x00ce, 0x0804, 0xa32a,
+	0x2100, 0x91b2, 0x0053, 0x1a0c, 0x0d65, 0x91b2, 0x0040, 0x1a04,
+	0xa3e0, 0x0002, 0xa3ce, 0xa3ce, 0xa3c4, 0xa3ce, 0xa3ce, 0xa3ce,
+	0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2,
+	0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2,
+	0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2,
+	0xa3c2, 0xa3ce, 0xa3c2, 0xa3ce, 0xa3ce, 0xa3c2, 0xa3c2, 0xa3c2,
+	0xa3c2, 0xa3c2, 0xa3c4, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2,
+	0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3ce, 0xa3ce, 0xa3c2, 0xa3c2,
+	0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3c2, 0xa3ce,
+	0xa3c2, 0xa3c2, 0x080c, 0x0d65, 0x0066, 0x00b6, 0x6610, 0x2658,
+	0xb8c4, 0xc08c, 0xb8c6, 0x00be, 0x006e, 0x0000, 0x6003, 0x0001,
+	0x6106, 0x9186, 0x0032, 0x0118, 0x080c, 0x84ba, 0x0010, 0x080c,
+	0x84b3, 0x0126, 0x2091, 0x8000, 0x080c, 0x891b, 0x012e, 0x0005,
+	0x2600, 0x0002, 0xa3f4, 0xa3f4, 0xa3f4, 0xa3ce, 0xa3ce, 0xa3f4,
+	0xa3f4, 0xa3f4, 0xa3f4, 0xa3ce, 0xa3f4, 0xa3ce, 0xa3f4, 0xa3ce,
+	0xa3f4, 0xa3f4, 0xa3f4, 0xa3f4, 0x080c, 0x0d65, 0x6004, 0x90b2,
+	0x0053, 0x1a0c, 0x0d65, 0x91b6, 0x0013, 0x0904, 0xa4cb, 0x91b6,
+	0x0027, 0x1904, 0xa477, 0x080c, 0x885d, 0x6004, 0x080c, 0xba46,
+	0x01b0, 0x080c, 0xba57, 0x01a8, 0x908e, 0x0021, 0x0904, 0xa474,
+	0x908e, 0x0022, 0x1130, 0x080c, 0xa014, 0x0904, 0xa470, 0x0804,
+	0xa471, 0x908e, 0x003d, 0x0904, 0xa474, 0x0804, 0xa46a, 0x080c,
+	0x303d, 0x2001, 0x0007, 0x080c, 0x61bc, 0x6010, 0x00b6, 0x2058,
+	0xb9a0, 0x00be, 0x080c, 0xa581, 0x9186, 0x007e, 0x1148, 0x2001,
+	0x1836, 0x2014, 0xc285, 0x080c, 0x7096, 0x1108, 0xc2ad, 0x2202,
+	0x080c, 0x98bb, 0x0036, 0x0026, 0x2019, 0x0028, 0x2110, 0x080c,
+	0xd53a, 0x002e, 0x003e, 0x0016, 0x0026, 0x0036, 0x2110, 0x2019,
+	0x0028, 0x080c, 0x8624, 0x0076, 0x903e, 0x080c, 0x8509, 0x6010,
+	0x00b6, 0x905d, 0x0100, 0x00be, 0x2c08, 0x080c, 0xcfd9, 0x007e,
+	0x003e, 0x002e, 0x001e, 0x080c, 0x98d7, 0x080c, 0xbf76, 0x0016,
+	0x080c, 0xbcd3, 0x080c, 0x9bda, 0x001e, 0x080c, 0x3116, 0x080c,
+	0x891b, 0x0030, 0x080c, 0xbcd3, 0x080c, 0x9bda, 0x080c, 0x891b,
+	0x0005, 0x080c, 0xa581, 0x0cb0, 0x080c, 0xa5bd, 0x0c98, 0x9186,
+	0x0015, 0x0118, 0x9186, 0x0016, 0x1140, 0x080c, 0x9aaa, 0x0d80,
+	0x9086, 0x0002, 0x0904, 0xa5c8, 0x0c58, 0x9186, 0x0014, 0x1d40,
+	0x080c, 0x885d, 0x6004, 0x908e, 0x0022, 0x1118, 0x080c, 0xa014,
+	0x09f8, 0x080c, 0x300e, 0x080c, 0xbf76, 0x080c, 0xba46, 0x1190,
+	0x080c, 0x303d, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c,
+	0xa581, 0x9186, 0x007e, 0x1128, 0x2001, 0x1836, 0x200c, 0xc185,
+	0x2102, 0x0800, 0x080c, 0xba57, 0x1120, 0x080c, 0xa581, 0x0804,
+	0xa46a, 0x6004, 0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071,
+	0x1894, 0x2079, 0x0000, 0x080c, 0x33b0, 0x00fe, 0x00ee, 0x0804,
+	0xa46a, 0x6004, 0x908e, 0x0021, 0x0d40, 0x908e, 0x0022, 0x090c,
+	0xa581, 0x0804, 0xa46a, 0x90b2, 0x0040, 0x1a04, 0xa56a, 0x2008,
+	0x0002, 0xa513, 0xa514, 0xa517, 0xa51a, 0xa51d, 0xa520, 0xa511,
+	0xa511, 0xa511, 0xa511, 0xa511, 0xa511, 0xa511, 0xa511, 0xa511,
+	0xa511, 0xa511, 0xa511, 0xa511, 0xa511, 0xa511, 0xa511, 0xa511,
+	0xa511, 0xa511, 0xa511, 0xa511, 0xa511, 0xa511, 0xa511, 0xa523,
+	0xa52c, 0xa511, 0xa52d, 0xa52c, 0xa511, 0xa511, 0xa511, 0xa511,
+	0xa511, 0xa52c, 0xa52c, 0xa511, 0xa511, 0xa511, 0xa511, 0xa511,
+	0xa511, 0xa511, 0xa511, 0xa555, 0xa52c, 0xa511, 0xa528, 0xa511,
+	0xa511, 0xa511, 0xa529, 0xa511, 0xa511, 0xa511, 0xa52c, 0xa550,
+	0xa511, 0x080c, 0x0d65, 0x00c0, 0x2001, 0x000b, 0x00e8, 0x2001,
+	0x0003, 0x00d0, 0x2001, 0x0005, 0x00b8, 0x2001, 0x0001, 0x00a0,
+	0x2001, 0x0009, 0x0088, 0x6003, 0x0005, 0x080c, 0x891b, 0x0058,
+	0x0018, 0x0010, 0x080c, 0x61bc, 0x04b8, 0x080c, 0xbf79, 0x6003,
+	0x0004, 0x080c, 0x891b, 0x0005, 0x080c, 0x61bc, 0x6003, 0x0002,
+	0x0036, 0x2019, 0x185e, 0x2304, 0x9084, 0xff00, 0x1120, 0x2001,
+	0x1956, 0x201c, 0x0040, 0x8007, 0x909a, 0x0004, 0x0ec0, 0x8003,
+	0x801b, 0x831b, 0x9318, 0x631a, 0x003e, 0x080c, 0x891b, 0x0c18,
+	0x080c, 0xbcd3, 0x080c, 0x9bda, 0x08f0, 0x00e6, 0x00f6, 0x2071,
+	0x1894, 0x2079, 0x0000, 0x080c, 0x33b0, 0x00fe, 0x00ee, 0x080c,
+	0x885d, 0x080c, 0x9bda, 0x0878, 0x6003, 0x0002, 0x080c, 0xbf79,
+	0x0804, 0x891b, 0x2600, 0x2008, 0x0002, 0xa57f, 0xa57f, 0xa57f,
+	0xa564, 0xa564, 0xa57f, 0xa57f, 0xa57f, 0xa57f, 0xa564, 0xa57f,
+	0xa564, 0xa57f, 0xa564, 0xa57f, 0xa57f, 0xa57f, 0xa57f, 0x080c,
+	0x0d65, 0x00e6, 0x0096, 0x0026, 0x0016, 0x080c, 0xb842, 0x0568,
+	0x6014, 0x2048, 0xa864, 0x9086, 0x0139, 0x11a8, 0xa894, 0x9086,
+	0x0056, 0x1148, 0x080c, 0x5129, 0x0130, 0x2001, 0x0000, 0x900e,
+	0x2011, 0x4000, 0x0028, 0x2001, 0x0030, 0x900e, 0x2011, 0x4005,
+	0x080c, 0xbe40, 0x0090, 0xa868, 0xd0fc, 0x0178, 0xa807, 0x0000,
+	0x0016, 0x6004, 0x908e, 0x0021, 0x0168, 0x908e, 0x003d, 0x0150,
+	0x001e, 0xa867, 0x0103, 0xa833, 0x0100, 0x001e, 0x002e, 0x009e,
+	0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0, 0x0096, 0x6014, 0x2048,
+	0xa800, 0x2048, 0xa867, 0x0103, 0xa823, 0x8001, 0x009e, 0x0005,
+	0x00b6, 0x6610, 0x2658, 0xb804, 0x9084, 0x00ff, 0x90b2, 0x000c,
+	0x1a0c, 0x0d65, 0x6604, 0x96b6, 0x004d, 0x1120, 0x080c, 0xbd5f,
+	0x0804, 0xa645, 0x6604, 0x96b6, 0x0043, 0x1120, 0x080c, 0xbda8,
+	0x0804, 0xa645, 0x6604, 0x96b6, 0x004b, 0x1120, 0x080c, 0xbdd4,
+	0x0804, 0xa645, 0x6604, 0x96b6, 0x0033, 0x1120, 0x080c, 0xbcf5,
+	0x0804, 0xa645, 0x6604, 0x96b6, 0x0028, 0x1120, 0x080c, 0xba95,
+	0x0804, 0xa645, 0x6604, 0x96b6, 0x0029, 0x1120, 0x080c, 0xbad6,
+	0x0804, 0xa645, 0x6604, 0x96b6, 0x001f, 0x1118, 0x080c, 0x9fbc,
+	0x04e0, 0x6604, 0x96b6, 0x0000, 0x1118, 0x080c, 0xa2ee, 0x04a8,
+	0x6604, 0x96b6, 0x0022, 0x1118, 0x080c, 0x9ff5, 0x0470, 0x6604,
+	0x96b6, 0x0035, 0x1118, 0x080c, 0xa105, 0x0438, 0x6604, 0x96b6,
+	0x0039, 0x1118, 0x080c, 0xa283, 0x0400, 0x6604, 0x96b6, 0x003d,
+	0x1118, 0x080c, 0xa02d, 0x00c8, 0x6604, 0x96b6, 0x0044, 0x1118,
+	0x080c, 0xa069, 0x0090, 0x6604, 0x96b6, 0x0049, 0x1118, 0x080c,
+	0xa094, 0x0058, 0x91b6, 0x0015, 0x1110, 0x0063, 0x0030, 0x91b6,
+	0x0016, 0x1128, 0x00be, 0x0804, 0xa905, 0x00be, 0x0005, 0x080c,
+	0x9c93, 0x0cd8, 0xa662, 0xa665, 0xa662, 0xa6a9, 0xa662, 0xa839,
+	0xa912, 0xa662, 0xa662, 0xa8df, 0xa662, 0xa8f3, 0x0096, 0x080c,
+	0x15a2, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0x009e,
+	0x0804, 0x9bda, 0xa001, 0xa001, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x708c, 0x9086, 0x0074, 0x1540, 0x080c, 0xcfaa, 0x11b0, 0x6010,
+	0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110,
+	0xc0c5, 0xb802, 0x00e9, 0x00be, 0x2001, 0x0006, 0x080c, 0x61bc,
+	0x080c, 0x303d, 0x080c, 0x9bda, 0x0088, 0x2001, 0x000a, 0x080c,
+	0x61bc, 0x080c, 0x303d, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
+	0x84ba, 0x080c, 0x891b, 0x0010, 0x080c, 0xa824, 0x00ee, 0x0005,
+	0x00d6, 0xb800, 0xd084, 0x0158, 0x9006, 0x080c, 0x61a8, 0x2069,
+	0x1853, 0x6804, 0x0020, 0x2001, 0x0006, 0x080c, 0x61e8, 0x00de,
+	0x0005, 0x00b6, 0x0096, 0x00d6, 0x2011, 0x1823, 0x2204, 0x9086,
+	0x0074, 0x1904, 0xa7fb, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e,
+	0x1120, 0x080c, 0xaa56, 0x0804, 0xa760, 0x00d6, 0x080c, 0x7096,
+	0x0198, 0x0026, 0x2011, 0x0010, 0x080c, 0x668a, 0x002e, 0x05c8,
+	0x080c, 0x539c, 0x1540, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867,
+	0x0103, 0xa833, 0xdead, 0x00f8, 0x0026, 0x2011, 0x8008, 0x080c,
+	0x668a, 0x002e, 0x0530, 0x6014, 0x2048, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0039, 0x1140, 0x2001, 0x0030, 0x900e, 0x2011, 0x4009,
+	0x080c, 0xbe40, 0x0040, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867,
+	0x0103, 0xa833, 0xdead, 0x6010, 0x2058, 0xb9a0, 0x0016, 0x080c,
+	0x303d, 0x080c, 0x9bda, 0x001e, 0x080c, 0x3116, 0x00de, 0x0804,
+	0xa7fe, 0x00de, 0x080c, 0xaa4b, 0x6010, 0x2058, 0xbaa0, 0x9286,
+	0x0080, 0x1510, 0x6014, 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084,
+	0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011,
+	0x4000, 0x080c, 0xbe40, 0x0030, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0x0200, 0x2001, 0x0006, 0x080c, 0x61bc, 0x080c, 0x303d,
+	0x080c, 0x9bda, 0x0804, 0xa7fe, 0x080c, 0xa80c, 0x6014, 0x9005,
+	0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0039, 0x1d08, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000,
+	0x080c, 0xbe40, 0x08f8, 0x080c, 0xa802, 0x0160, 0x9006, 0x080c,
+	0x61a8, 0x2001, 0x0004, 0x080c, 0x61e8, 0x2001, 0x0007, 0x080c,
+	0x61bc, 0x08a0, 0x2001, 0x0004, 0x080c, 0x61bc, 0x6003, 0x0001,
+	0x6007, 0x0003, 0x080c, 0x84ba, 0x080c, 0x891b, 0x0804, 0xa7fe,
+	0xb85c, 0xd0e4, 0x01d0, 0x080c, 0xbc6d, 0x080c, 0x7096, 0x0118,
+	0xd0dc, 0x1904, 0xa722, 0x2011, 0x1836, 0x2204, 0xc0ad, 0x2012,
+	0x2001, 0x0002, 0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000, 0x080c,
+	0x24b1, 0x78e2, 0x00fe, 0x0804, 0xa722, 0x080c, 0xbcae, 0x2011,
+	0x1836, 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xd10f, 0x000e,
+	0x1904, 0xa722, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c, 0x61bc,
+	0x9006, 0x080c, 0x61a8, 0x00c6, 0x2001, 0x180f, 0x2004, 0xd09c,
+	0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, 0x1800, 0x700c,
+	0x9084, 0x00ff, 0x78e6, 0x707a, 0x7010, 0x78ea, 0x707e, 0x908c,
+	0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x2486,
+	0x00f6, 0x2100, 0x900e, 0x080c, 0x243d, 0x795a, 0x00fe, 0x9186,
+	0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8, 0x2009, 0x00ef, 0x00f6,
+	0x2079, 0x0100, 0x79ea, 0x7932, 0x7936, 0x780c, 0xc0b5, 0x780e,
+	0x00fe, 0x080c, 0x2486, 0x00f6, 0x2079, 0x1800, 0x797e, 0x2100,
+	0x900e, 0x080c, 0x243d, 0x795a, 0x00fe, 0x8108, 0x080c, 0x620b,
+	0x2b00, 0x00ce, 0x1904, 0xa722, 0x6012, 0x2009, 0x180f, 0x210c,
+	0xd19c, 0x0150, 0x2009, 0x027c, 0x210c, 0x918c, 0x00ff, 0xb912,
+	0x2009, 0x027d, 0x210c, 0xb916, 0x2001, 0x0002, 0x080c, 0x61bc,
+	0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84ba,
+	0x080c, 0x891b, 0x0018, 0x080c, 0xa581, 0x0431, 0x00de, 0x009e,
+	0x00be, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0a4, 0x0120, 0x2001,
+	0x1854, 0x2004, 0xd0ac, 0x0005, 0x00e6, 0x080c, 0xd593, 0x0190,
+	0x2071, 0x0260, 0x7108, 0x720c, 0x918c, 0x00ff, 0x1118, 0x9284,
+	0xff00, 0x0140, 0x6010, 0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110,
+	0xb912, 0xba16, 0x00ee, 0x0005, 0x2030, 0x2001, 0x0007, 0x080c,
+	0x61bc, 0x080c, 0x539c, 0x1120, 0x2001, 0x0007, 0x080c, 0x61e8,
+	0x080c, 0x303d, 0x6020, 0x9086, 0x000a, 0x1108, 0x0005, 0x0804,
+	0x9bda, 0x00b6, 0x00e6, 0x0026, 0x0016, 0x2071, 0x1800, 0x708c,
+	0x9086, 0x0014, 0x1904, 0xa8d6, 0x00d6, 0x080c, 0x7096, 0x0198,
+	0x0026, 0x2011, 0x0010, 0x080c, 0x668a, 0x002e, 0x05c8, 0x080c,
+	0x539c, 0x1540, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0xdead, 0x00f8, 0x0026, 0x2011, 0x8008, 0x080c, 0x668a,
+	0x002e, 0x0530, 0x6014, 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x0039, 0x1140, 0x2001, 0x0030, 0x900e, 0x2011, 0x4009, 0x080c,
+	0xbe40, 0x0040, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0xdead, 0x6010, 0x2058, 0xb9a0, 0x0016, 0x080c, 0x303d,
+	0x080c, 0x9bda, 0x001e, 0x080c, 0x3116, 0x00de, 0x0804, 0xa8da,
+	0x00de, 0x080c, 0x539c, 0x1170, 0x6014, 0x9005, 0x1158, 0x0036,
+	0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4a77,
+	0x004e, 0x003e, 0x00d6, 0x6010, 0x2058, 0x080c, 0x6306, 0x080c,
+	0xa698, 0x00de, 0x080c, 0xab1c, 0x1588, 0x6010, 0x2058, 0xb890,
+	0x9005, 0x0560, 0x2001, 0x0006, 0x080c, 0x61bc, 0x0096, 0x6014,
+	0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140,
+	0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xbe40, 0x0060,
+	0xa864, 0x9084, 0x00ff, 0x9086, 0x0029, 0x0130, 0xa807, 0x0000,
+	0xa867, 0x0103, 0xa833, 0x0200, 0x009e, 0x080c, 0x303d, 0x6020,
+	0x9086, 0x000a, 0x0138, 0x080c, 0x9bda, 0x0020, 0x080c, 0xa581,
+	0x080c, 0xa824, 0x001e, 0x002e, 0x00ee, 0x00be, 0x0005, 0x2011,
+	0x1823, 0x2204, 0x9086, 0x0014, 0x1160, 0x2001, 0x0002, 0x080c,
+	0x61bc, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x84ba, 0x0804,
+	0x891b, 0x0804, 0xa824, 0x2030, 0x2011, 0x1823, 0x2204, 0x9086,
+	0x0004, 0x1148, 0x96b6, 0x000b, 0x1120, 0x2001, 0x0007, 0x080c,
+	0x61bc, 0x0804, 0x9bda, 0x0804, 0xa824, 0x0002, 0xa662, 0xa91d,
+	0xa662, 0xa95c, 0xa662, 0xaa07, 0xa912, 0xa662, 0xa662, 0xaa1a,
+	0xa662, 0xaa2a, 0x6604, 0x9686, 0x0003, 0x0904, 0xa839, 0x96b6,
+	0x001e, 0x1110, 0x080c, 0x9bda, 0x0005, 0x00b6, 0x00d6, 0x00c6,
+	0x080c, 0xaa3a, 0x11a0, 0x9006, 0x080c, 0x61a8, 0x080c, 0x300e,
+	0x080c, 0xbf76, 0x2001, 0x0002, 0x080c, 0x61bc, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x84ba, 0x080c, 0x891b, 0x0408, 0x2009,
+	0x026e, 0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058, 0xb840,
+	0x9084, 0x00ff, 0x9005, 0x0170, 0x8001, 0xb842, 0x601b, 0x000a,
+	0x0078, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x1900,
+	0x1108, 0x08a0, 0x080c, 0x300e, 0x080c, 0xbf76, 0x080c, 0xa824,
+	0x00ce, 0x00de, 0x00be, 0x0005, 0x0096, 0x00b6, 0x0026, 0x9016,
+	0x080c, 0xaa48, 0x00d6, 0x2069, 0x194c, 0x2d04, 0x9005, 0x0168,
+	0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x2069, 0x181f,
+	0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, 0x00de, 0x0088, 0x9006,
+	0x080c, 0x61a8, 0x2001, 0x0002, 0x080c, 0x61bc, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x84ba, 0x080c, 0x891b, 0x0804, 0xa9d7,
+	0x080c, 0xb842, 0x01b0, 0x6014, 0x2048, 0xa864, 0x2010, 0x9086,
+	0x0139, 0x1138, 0x6007, 0x0016, 0x2001, 0x0002, 0x080c, 0xbe9a,
+	0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc, 0x0118, 0x2001, 0x0001,
+	0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc, 0x0148, 0x6010, 0x2058,
+	0xb840, 0x9084, 0x00ff, 0x9005, 0x1110, 0x9006, 0x0c38, 0x080c,
+	0xa581, 0x2009, 0x026e, 0x2134, 0x96b4, 0x00ff, 0x9686, 0x0005,
+	0x0510, 0x9686, 0x000b, 0x01c8, 0x2009, 0x026f, 0x2104, 0x9084,
+	0xff00, 0x1118, 0x9686, 0x0009, 0x01b0, 0x9086, 0x1900, 0x1168,
+	0x9686, 0x0009, 0x0180, 0x2001, 0x0004, 0x080c, 0x61bc, 0x2001,
+	0x0028, 0x601a, 0x6007, 0x0052, 0x0010, 0x080c, 0xa824, 0x002e,
+	0x00be, 0x009e, 0x0005, 0x9286, 0x0139, 0x0160, 0x6014, 0x2048,
+	0x080c, 0xb842, 0x0140, 0xa864, 0x9086, 0x0139, 0x0118, 0xa868,
+	0xd0fc, 0x0108, 0x0c50, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff,
+	0x9005, 0x0138, 0x8001, 0xb842, 0x601b, 0x000a, 0x6007, 0x0016,
+	0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x00e6, 0x2071, 0x1800,
+	0x080c, 0x5c6a, 0x00ee, 0x0010, 0x080c, 0x300e, 0x0870, 0x080c,
+	0xaa48, 0x1160, 0x2001, 0x0004, 0x080c, 0x61bc, 0x6003, 0x0001,
+	0x6007, 0x0003, 0x080c, 0x84ba, 0x0804, 0x891b, 0x080c, 0xa581,
+	0x0804, 0xa824, 0x0469, 0x1160, 0x2001, 0x0008, 0x080c, 0x61bc,
+	0x6003, 0x0001, 0x6007, 0x0005, 0x080c, 0x84ba, 0x0804, 0x891b,
+	0x0804, 0xa824, 0x00e9, 0x1160, 0x2001, 0x000a, 0x080c, 0x61bc,
+	0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x84ba, 0x0804, 0x891b,
+	0x0804, 0xa824, 0x2009, 0x026e, 0x2104, 0x9086, 0x0003, 0x1138,
+	0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x2a00, 0x0005,
+	0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016, 0x6110, 0x2158,
+	0x080c, 0x627a, 0x001e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x00f6,
+	0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010, 0x2058, 0x2009, 0x1836,
+	0x2104, 0x9085, 0x0003, 0x200a, 0x080c, 0xaaee, 0x0560, 0x2009,
+	0x1836, 0x2104, 0xc0cd, 0x200a, 0x080c, 0x6662, 0x0158, 0x9006,
+	0x2020, 0x2009, 0x002a, 0x080c, 0xd284, 0x2001, 0x180c, 0x200c,
+	0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x080c, 0x2fd3,
+	0x00e6, 0x2071, 0x1800, 0x080c, 0x2de9, 0x00ee, 0x00c6, 0x0156,
+	0x20a9, 0x0781, 0x2009, 0x007f, 0x080c, 0x3116, 0x8108, 0x1f04,
+	0xaa8c, 0x015e, 0x00ce, 0x080c, 0xaa4b, 0x2071, 0x0260, 0x2079,
+	0x0200, 0x7817, 0x0001, 0x2001, 0x1836, 0x200c, 0xc1c5, 0x7018,
+	0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc, 0x1108, 0xc1c4,
+	0x7817, 0x0000, 0x2001, 0x1836, 0x2102, 0x2079, 0x0100, 0x2e04,
+	0x9084, 0x00ff, 0x2069, 0x181e, 0x206a, 0x78e6, 0x0006, 0x8e70,
+	0x2e04, 0x2069, 0x181f, 0x206a, 0x78ea, 0x7832, 0x7836, 0x2010,
+	0x9084, 0xff00, 0x001e, 0x9105, 0x2009, 0x182b, 0x200a, 0x2200,
+	0x9084, 0x00ff, 0x2008, 0x080c, 0x2486, 0x080c, 0x7096, 0x0170,
+	0x2071, 0x0260, 0x2069, 0x1952, 0x7048, 0x206a, 0x704c, 0x6806,
+	0x7050, 0x680a, 0x7054, 0x680e, 0x080c, 0xbc6d, 0x0040, 0x2001,
+	0x0006, 0x080c, 0x61bc, 0x080c, 0x303d, 0x080c, 0x9bda, 0x001e,
+	0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096, 0x0026,
+	0x0036, 0x00e6, 0x0156, 0x2019, 0x182b, 0x231c, 0x83ff, 0x01f0,
+	0x2071, 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084, 0xff00,
+	0x9205, 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48,
+	0x2019, 0x000a, 0x080c, 0xabd3, 0x1148, 0x2011, 0x027a, 0x20a9,
+	0x0004, 0x2019, 0x0006, 0x080c, 0xabd3, 0x1100, 0x015e, 0x00ee,
+	0x003e, 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260, 0x7034,
+	0x9086, 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188, 0x703c,
+	0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138, 0x7054,
+	0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056, 0x0046,
+	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19c3, 0x252c,
+	0x2021, 0x19ca, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7250,
+	0x7070, 0x9202, 0x1a04, 0xabab, 0x080c, 0xd2b5, 0x0904, 0xaba4,
+	0x6720, 0x9786, 0x0007, 0x0904, 0xaba4, 0x2500, 0x9c06, 0x0904,
+	0xaba4, 0x2400, 0x9c06, 0x0904, 0xaba4, 0x3e08, 0x9186, 0x0002,
+	0x1148, 0x6010, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb800, 0x00be,
+	0xd0bc, 0x1590, 0x00c6, 0x6043, 0xffff, 0x6000, 0x9086, 0x0004,
+	0x1110, 0x080c, 0x1921, 0x9786, 0x000a, 0x0148, 0x080c, 0xba57,
+	0x1130, 0x00ce, 0x080c, 0xa581, 0x080c, 0x9c14, 0x00e8, 0x6014,
+	0x2048, 0x080c, 0xb842, 0x01a8, 0x9786, 0x0003, 0x1530, 0xa867,
+	0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c,
+	0x0fd4, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6985, 0x080c,
+	0xba31, 0x080c, 0x9c14, 0x00ce, 0x9ce0, 0x001c, 0x7064, 0x9c02,
+	0x1210, 0x0804, 0xab4f, 0x012e, 0x000e, 0x002e, 0x004e, 0x005e,
+	0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005, 0x9786, 0x0006, 0x1118,
+	0x080c, 0xd22f, 0x0c30, 0x9786, 0x000a, 0x0998, 0x0880, 0x220c,
+	0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, 0xabbf, 0x9006,
+	0x0005, 0x2304, 0x9102, 0x0218, 0x2001, 0x0001, 0x0008, 0x9006,
+	0x918d, 0x0001, 0x0005, 0x0136, 0x01c6, 0x0016, 0x8906, 0x8006,
+	0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9300, 0x2098,
+	0x3518, 0x20a9, 0x0001, 0x220c, 0x4002, 0x910e, 0x1140, 0x8210,
+	0x8319, 0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c,
+	0x9102, 0x0218, 0x2001, 0x0001, 0x0010, 0x2001, 0x0000, 0x918d,
+	0x0001, 0x001e, 0x01ce, 0x013e, 0x0005, 0x6004, 0x908a, 0x0053,
+	0x1a0c, 0x0d65, 0x080c, 0xba46, 0x0120, 0x080c, 0xba57, 0x0158,
+	0x0028, 0x080c, 0x303d, 0x080c, 0xba57, 0x0128, 0x080c, 0x885d,
+	0x080c, 0x9bda, 0x0005, 0x080c, 0xa581, 0x0cc0, 0x9182, 0x0057,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xac35, 0xac35,
+	0xac35, 0xac35, 0xac35, 0xac35, 0xac35, 0xac35, 0xac35, 0xac35,
+	0xac35, 0xac37, 0xac37, 0xac37, 0xac37, 0xac35, 0xac35, 0xac35,
+	0xac37, 0xac35, 0xac35, 0xac35, 0xac35, 0x080c, 0x0d65, 0x600b,
+	0xffff, 0x6003, 0x000f, 0x6106, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xbf79, 0x2009, 0x8000, 0x080c, 0x84b3, 0x012e, 0x0005, 0x9186,
+	0x0013, 0x1128, 0x6004, 0x9082, 0x0040, 0x0804, 0xacbc, 0x9186,
+	0x0027, 0x1520, 0x080c, 0x885d, 0x080c, 0x300e, 0x080c, 0xbf76,
+	0x0096, 0x6114, 0x2148, 0x080c, 0xb842, 0x0198, 0x080c, 0xba57,
+	0x1118, 0x080c, 0xa581, 0x0068, 0xa867, 0x0103, 0xa87b, 0x0029,
+	0xa877, 0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c, 0x6991, 0x080c,
+	0xba31, 0x009e, 0x080c, 0x9bda, 0x0804, 0x891b, 0x9186, 0x0014,
+	0x1120, 0x6004, 0x9082, 0x0040, 0x0018, 0x080c, 0x0d65, 0x0005,
+	0x0002, 0xac9a, 0xac98, 0xac98, 0xac98, 0xac98, 0xac98, 0xac98,
+	0xac98, 0xac98, 0xac98, 0xac98, 0xacb3, 0xacb3, 0xacb3, 0xacb3,
+	0xac98, 0xacb3, 0xac98, 0xacb3, 0xac98, 0xac98, 0xac98, 0xac98,
+	0x080c, 0x0d65, 0x080c, 0x885d, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xb842, 0x0168, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000,
+	0xa880, 0xc0ec, 0xa882, 0x080c, 0x6991, 0x080c, 0xba31, 0x009e,
+	0x080c, 0x9bda, 0x0005, 0x080c, 0x885d, 0x080c, 0xba57, 0x090c,
+	0xa581, 0x080c, 0x9bda, 0x0005, 0x0002, 0xacd6, 0xacd4, 0xacd4,
+	0xacd4, 0xacd4, 0xacd4, 0xacd4, 0xacd4, 0xacd4, 0xacd4, 0xacd4,
+	0xacd8, 0xacd8, 0xacd8, 0xacd8, 0xacd4, 0xacda, 0xacd4, 0xacd8,
+	0xacd4, 0xacd4, 0xacd4, 0xacd4, 0x080c, 0x0d65, 0x080c, 0x0d65,
+	0x080c, 0x0d65, 0x080c, 0x9bda, 0x0804, 0x891b, 0x9182, 0x0057,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xacfd, 0xacfd,
+	0xacfd, 0xacfd, 0xacfd, 0xad36, 0xae25, 0xacfd, 0xae31, 0xacfd,
+	0xacfd, 0xacfd, 0xacfd, 0xacfd, 0xacfd, 0xacfd, 0xacfd, 0xacfd,
+	0xacfd, 0xae31, 0xacff, 0xacfd, 0xae2f, 0x080c, 0x0d65, 0x00b6,
+	0x0096, 0x6114, 0x2148, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1508,
+	0xa87b, 0x0000, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87c, 0xd0ac,
+	0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xaeb6, 0x080c, 0x67a7,
+	0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0xb8c0,
+	0x9005, 0x0110, 0x080c, 0x6396, 0x080c, 0x9bda, 0x009e, 0x00be,
+	0x0005, 0xa87c, 0xd0ac, 0x09e0, 0xa838, 0xa934, 0x9105, 0x09c0,
+	0xa880, 0xd0bc, 0x19a8, 0x080c, 0xbb8c, 0x0c80, 0x00b6, 0x0096,
+	0x6114, 0x2148, 0x601c, 0xd0fc, 0x1110, 0x7644, 0x0008, 0x9036,
+	0x96b4, 0x0fff, 0x86ff, 0x1590, 0x6010, 0x2058, 0xb800, 0xd0bc,
+	0x1904, 0xae14, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0xa87c,
+	0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xaeb6, 0x080c,
+	0x67a7, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e,
+	0xb8c0, 0x9005, 0x0110, 0x080c, 0x6396, 0x601c, 0xd0fc, 0x1148,
+	0x7044, 0xd0e4, 0x1904, 0xadf8, 0x080c, 0x9bda, 0x009e, 0x00be,
+	0x0005, 0x2009, 0x0211, 0x210c, 0x080c, 0x0d65, 0x968c, 0x0c00,
+	0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xadfc, 0x7348,
+	0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0508,
+	0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc, 0x01a0,
+	0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34, 0x2100,
+	0x9205, 0x0148, 0x7048, 0x9106, 0x1118, 0x704c, 0x9206, 0x0118,
+	0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007,
+	0x0010, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0x901e, 0xd6c4,
+	0x01d8, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4,
+	0x0804, 0xad42, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009,
+	0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011,
+	0x0025, 0x080c, 0xb408, 0x003e, 0xd6cc, 0x0904, 0xad57, 0x7154,
+	0xa98a, 0x81ff, 0x0904, 0xad57, 0x9192, 0x0021, 0x1278, 0x8304,
+	0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xb408, 0x2011, 0x0205,
+	0x2013, 0x0000, 0x080c, 0xbf06, 0x0804, 0xad57, 0xa868, 0xd0fc,
+	0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950, 0x080c,
+	0xb3a7, 0x00ae, 0x080c, 0xbf06, 0x080c, 0xb3f8, 0x0804, 0xad59,
+	0x080c, 0xbb4f, 0x0804, 0xad6e, 0xa87c, 0xd0ac, 0x0904, 0xad7f,
+	0xa880, 0xd0bc, 0x1904, 0xad7f, 0x7348, 0xa838, 0x9306, 0x11c8,
+	0x734c, 0xa834, 0x931e, 0x0904, 0xad7f, 0xd6d4, 0x0190, 0xab38,
+	0x9305, 0x0904, 0xad7f, 0x0068, 0xa87c, 0xd0ac, 0x0904, 0xad4a,
+	0xa838, 0xa934, 0x9105, 0x0904, 0xad4a, 0xa880, 0xd0bc, 0x1904,
+	0xad4a, 0x080c, 0xbb8c, 0x0804, 0xad6e, 0x00f6, 0x2079, 0x026c,
+	0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x00fe, 0x0021, 0x0005, 0x0011,
+	0x0005, 0x0005, 0x0096, 0x6003, 0x0002, 0x6007, 0x0043, 0x6014,
+	0x2048, 0xa87c, 0xd0ac, 0x0128, 0x009e, 0x0005, 0x2130, 0x2228,
+	0x0058, 0x2400, 0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213, 0x2600,
+	0x9102, 0x2500, 0x9203, 0x0e90, 0xac46, 0xab4a, 0xae36, 0xad3a,
+	0x6044, 0xd0fc, 0x190c, 0x98e4, 0x604b, 0x0000, 0x080c, 0x1adf,
+	0x1118, 0x6144, 0x080c, 0x84df, 0x009e, 0x0005, 0x9182, 0x0057,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xae7d, 0xae7d,
+	0xae7d, 0xae7d, 0xae7d, 0xae7d, 0xae7d, 0xae7d, 0xae7d, 0xae7d,
+	0xae7f, 0xae7d, 0xae7d, 0xae7d, 0xae7d, 0xae90, 0xae7d, 0xae7d,
+	0xae7d, 0xae7d, 0xaeb4, 0xae7d, 0xae7d, 0x080c, 0x0d65, 0x6004,
+	0x9086, 0x0040, 0x1110, 0x080c, 0x885d, 0x2019, 0x0001, 0x080c,
+	0x9269, 0x6003, 0x0002, 0x080c, 0xbf7e, 0x080c, 0x88b8, 0x0005,
+	0x6004, 0x9086, 0x0040, 0x1110, 0x080c, 0x885d, 0x2019, 0x0001,
+	0x080c, 0x9269, 0x080c, 0x88b8, 0x080c, 0x300e, 0x080c, 0xbf76,
+	0x0096, 0x6114, 0x2148, 0x080c, 0xb842, 0x0150, 0xa867, 0x0103,
+	0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, 0x6991, 0x080c, 0xba31,
+	0x009e, 0x080c, 0x9bda, 0x0005, 0x080c, 0x0d65, 0xa87b, 0x0015,
+	0xd1fc, 0x0180, 0xa87b, 0x0007, 0x8002, 0x8000, 0x810a, 0x9189,
+	0x0000, 0x0006, 0x0016, 0x2009, 0x1a47, 0x2104, 0x8000, 0x200a,
+	0x001e, 0x000e, 0xa992, 0xa88e, 0x0005, 0x9182, 0x0057, 0x1220,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xaeec, 0xaeec, 0xaeec,
+	0xaeec, 0xaeec, 0xaeee, 0xaeec, 0xaeec, 0xafab, 0xaeec, 0xaeec,
+	0xaeec, 0xaeec, 0xaeec, 0xaeec, 0xaeec, 0xaeec, 0xaeec, 0xaeec,
+	0xb0e9, 0xaeec, 0xb0f3, 0xaeec, 0x080c, 0x0d65, 0x601c, 0xd0bc,
+	0x0178, 0xd084, 0x0168, 0xd0f4, 0x0120, 0xc084, 0x601e, 0x0804,
+	0xacde, 0x6114, 0x0096, 0x2148, 0xa87c, 0xc0e5, 0xa87e, 0x009e,
+	0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, 0x2150,
+	0x601c, 0xd0fc, 0x1110, 0x7644, 0x0008, 0x9036, 0xb676, 0x96b4,
+	0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c,
+	0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xafa4,
+	0x9694, 0xff00, 0x9284, 0x0c00, 0x0120, 0x7048, 0xb092, 0x704c,
+	0xb08e, 0x9284, 0x0300, 0x0904, 0xafa4, 0x9686, 0x0100, 0x1130,
+	0x7064, 0x9005, 0x1118, 0xc6c4, 0xb676, 0x0c38, 0x080c, 0x1022,
+	0x090c, 0x0d65, 0x2900, 0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e,
+	0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872,
+	0x7044, 0x9084, 0xf000, 0x9635, 0xae76, 0x968c, 0x0c00, 0x0120,
+	0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002,
+	0x0180, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc,
+	0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007,
+	0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886,
+	0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a,
+	0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018,
+	0x2011, 0x0025, 0x080c, 0xb408, 0x003e, 0xd6cc, 0x01e8, 0x7154,
+	0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098,
+	0x0018, 0x2011, 0x0029, 0x080c, 0xb408, 0x2011, 0x0205, 0x2013,
+	0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a,
+	0x0c68, 0x2950, 0x080c, 0xb3a7, 0x080c, 0x18ff, 0x009e, 0x00ee,
+	0x00ae, 0x007e, 0x0005, 0x2001, 0x1958, 0x2004, 0x604a, 0x0096,
+	0x6114, 0x2148, 0xa83c, 0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc,
+	0xa87e, 0x6003, 0x0002, 0x080c, 0xbf87, 0x0904, 0xb0e4, 0x604b,
+	0x0000, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500,
+	0xd1cc, 0x0904, 0xb0a9, 0xa978, 0xa868, 0xd0fc, 0x0904, 0xb06a,
+	0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0x00a6, 0x2150, 0xb174,
+	0x9184, 0x00ff, 0x90b6, 0x0002, 0x0904, 0xb038, 0x9086, 0x0028,
+	0x1904, 0xb024, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x0804, 0xb040,
+	0x6024, 0xd0f4, 0x11d0, 0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838,
+	0xaa90, 0x9206, 0x1120, 0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024,
+	0xd0d4, 0x1148, 0xa9ac, 0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838,
+	0x9103, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x6010, 0x00b6, 0x2058,
+	0xb83c, 0x8000, 0xb83e, 0x00be, 0x601c, 0xc0fc, 0x601e, 0x9006,
+	0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4, 0xa87e, 0xd0cc, 0x0140,
+	0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fd4, 0x009e,
+	0x080c, 0xbb8c, 0x0804, 0xb0e4, 0xd1dc, 0x0158, 0xa87b, 0x0015,
+	0xb07b, 0x0015, 0x080c, 0xbe29, 0x0118, 0xb174, 0xc1dc, 0xb176,
+	0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040,
+	0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xaeb6,
+	0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9, 0x0020, 0x8a06, 0x8006,
+	0x8007, 0x9094, 0x003f, 0x22e0, 0x9084, 0xffc0, 0x9080, 0x0019,
+	0x2098, 0x4003, 0x00ae, 0x000e, 0xa882, 0x000e, 0xa87e, 0x080c,
+	0xbf06, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0fd4, 0x001e,
+	0x0804, 0xb0d6, 0x0016, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff,
+	0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028, 0x1128, 0xa87b, 0x001c,
+	0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b,
+	0x0015, 0x080c, 0xbe29, 0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078,
+	0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c,
+	0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xaeb6, 0xa890,
+	0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e, 0x00ae, 0x080c, 0x0fd4,
+	0x009e, 0x080c, 0xbf06, 0xa974, 0x0016, 0x080c, 0xb3f8, 0x001e,
+	0x0468, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002,
+	0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00d0, 0xd1dc,
+	0x0148, 0xa87b, 0x0015, 0x080c, 0xbe29, 0x0118, 0xa974, 0xc1dc,
+	0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b, 0x0007, 0x0050, 0xa87b,
+	0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c,
+	0xaeb6, 0xa974, 0x0016, 0x080c, 0x67a7, 0x001e, 0x6010, 0x00b6,
+	0x2058, 0xb8c0, 0x0016, 0x9005, 0x190c, 0x6396, 0x001e, 0x00be,
+	0xd1e4, 0x1120, 0x080c, 0x9bda, 0x009e, 0x0005, 0x080c, 0xbb4f,
+	0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0x080c, 0xbf87, 0x190c,
+	0x190d, 0x009e, 0x0005, 0x0096, 0x6114, 0x2148, 0xa83c, 0xa940,
+	0x9105, 0x01e8, 0xa877, 0x0000, 0xa87b, 0x0000, 0xa867, 0x0103,
+	0x00b6, 0x6010, 0x2058, 0xa834, 0xa938, 0x9115, 0x11a0, 0x080c,
+	0x67a7, 0xba3c, 0x8211, 0x0208, 0xba3e, 0xb8c0, 0x9005, 0x0110,
+	0x080c, 0x6396, 0x080c, 0x9bda, 0x00be, 0x009e, 0x0005, 0xa87c,
+	0xc0dc, 0xa87e, 0x08f8, 0xb800, 0xd0bc, 0x1120, 0xa834, 0x080c,
+	0xaeb6, 0x0c28, 0xa880, 0xd0bc, 0x1dc8, 0x080c, 0xbb8c, 0x0c60,
+	0x080c, 0x885d, 0x0010, 0x080c, 0x88b8, 0x601c, 0xd084, 0x0110,
+	0x080c, 0x1921, 0x080c, 0xb842, 0x01f0, 0x0096, 0x6114, 0x2148,
+	0x080c, 0xba57, 0x1118, 0x080c, 0xa581, 0x00a0, 0xa867, 0x0103,
+	0x2009, 0x180c, 0x210c, 0xd18c, 0x1198, 0xd184, 0x1170, 0x6108,
+	0xa97a, 0x918e, 0x0029, 0x1110, 0x080c, 0xd52b, 0xa877, 0x0000,
+	0x080c, 0x6991, 0x009e, 0x0804, 0x9c14, 0xa87b, 0x0004, 0x0cb0,
+	0xa87b, 0x0004, 0x0c98, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040,
+	0x0208, 0x000a, 0x0005, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb17a,
+	0xb17c, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb17a,
+	0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb1a0,
+	0xb17a, 0xb17a, 0x080c, 0x0d65, 0x080c, 0x5390, 0x01f8, 0x6014,
+	0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294,
+	0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086,
+	0x0139, 0x0128, 0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897,
+	0x4000, 0xa99a, 0xaa9e, 0x080c, 0x6991, 0x009e, 0x0804, 0x9bda,
+	0x080c, 0x5390, 0x0dd8, 0x6014, 0x900e, 0x9016, 0x0c10, 0x9182,
+	0x0085, 0x0002, 0xb1b9, 0xb1b7, 0xb1b7, 0xb1c5, 0xb1b7, 0xb1b7,
+	0xb1b7, 0xb1b7, 0xb1b7, 0xb1b7, 0xb1b7, 0xb1b7, 0xb1b7, 0x080c,
+	0x0d65, 0x6003, 0x0001, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009,
+	0x8020, 0x080c, 0x84b3, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6,
+	0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c, 0xb830,
+	0x01a0, 0x2268, 0x6800, 0x9086, 0x0000, 0x0178, 0x6010, 0x6d10,
+	0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c, 0xb433, 0x00ce, 0x0128,
+	0x6803, 0x0002, 0x6007, 0x0086, 0x0010, 0x6007, 0x0087, 0x6003,
+	0x0001, 0x2009, 0x8020, 0x080c, 0x84b3, 0x9280, 0x0004, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824, 0xd0ec, 0x0128,
+	0x00c6, 0x2260, 0x080c, 0xbb8c, 0x00ce, 0x00ee, 0x00de, 0x005e,
+	0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085,
+	0x0a0c, 0x0d65, 0x908a, 0x0092, 0x1a0c, 0x0d65, 0x9082, 0x0085,
+	0x00e2, 0x9186, 0x0027, 0x0120, 0x9186, 0x0014, 0x190c, 0x0d65,
+	0x080c, 0x885d, 0x0096, 0x6014, 0x2048, 0x080c, 0xb842, 0x0140,
+	0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6991,
+	0x009e, 0x080c, 0x9c14, 0x0804, 0x891b, 0xb23a, 0xb23c, 0xb23c,
+	0xb23a, 0xb23a, 0xb23a, 0xb23a, 0xb23a, 0xb23a, 0xb23a, 0xb23a,
+	0xb23a, 0xb23a, 0x080c, 0x0d65, 0x080c, 0x9c14, 0x0005, 0x9186,
+	0x0013, 0x1130, 0x6004, 0x9082, 0x0085, 0x2008, 0x0804, 0xb28b,
+	0x9186, 0x0027, 0x1558, 0x080c, 0x885d, 0x080c, 0x300e, 0x080c,
+	0xbf76, 0x0096, 0x6014, 0x2048, 0x080c, 0xb842, 0x0150, 0xa867,
+	0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6991, 0x080c,
+	0xba31, 0x009e, 0x080c, 0x9bda, 0x0005, 0x9186, 0x0089, 0x0118,
+	0x9186, 0x008a, 0x1140, 0x080c, 0x9aaa, 0x0128, 0x9086, 0x000c,
+	0x0904, 0xb2c3, 0x0000, 0x080c, 0x9c93, 0x0c70, 0x9186, 0x0014,
+	0x1d60, 0x080c, 0x885d, 0x0096, 0x6014, 0x2048, 0x080c, 0xb842,
+	0x0d00, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0006, 0xa880,
+	0xc0ec, 0xa882, 0x0890, 0x0002, 0xb29b, 0xb299, 0xb299, 0xb299,
+	0xb299, 0xb299, 0xb2af, 0xb299, 0xb299, 0xb299, 0xb299, 0xb299,
+	0xb299, 0x080c, 0x0d65, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
+	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1956, 0x0010,
+	0x2001, 0x1957, 0x2004, 0x601a, 0x6003, 0x000c, 0x0005, 0x6034,
+	0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035,
+	0x1118, 0x2001, 0x1956, 0x0010, 0x2001, 0x1957, 0x2004, 0x601a,
+	0x6003, 0x000e, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085,
+	0x0208, 0x0012, 0x0804, 0x9c93, 0xb2d9, 0xb2d9, 0xb2d9, 0xb2d9,
+	0xb2db, 0xb328, 0xb2d9, 0xb2d9, 0xb2d9, 0xb2d9, 0xb2d9, 0xb2d9,
+	0xb2d9, 0x080c, 0x0d65, 0x0096, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
+	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x009e, 0x0804, 0xb33c,
+	0x080c, 0xb842, 0x1118, 0x080c, 0xba31, 0x0068, 0x6014, 0x2048,
+	0x080c, 0xbf8d, 0x1110, 0x080c, 0xba31, 0xa867, 0x0103, 0x080c,
+	0xbf41, 0x080c, 0x6991, 0x00d6, 0x2c68, 0x080c, 0x9b84, 0x01d0,
+	0x6003, 0x0001, 0x6007, 0x001e, 0x600b, 0xffff, 0x2009, 0x026e,
+	0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x6910, 0x6112,
+	0x080c, 0xbcdb, 0x695c, 0x615e, 0x6023, 0x0001, 0x2009, 0x8020,
+	0x080c, 0x84b3, 0x2d60, 0x00de, 0x080c, 0x9bda, 0x009e, 0x0005,
+	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0, 0x6034,
+	0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x0130, 0x9186, 0x001e,
+	0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c, 0xbed9,
+	0x11f0, 0x080c, 0x9b84, 0x01d8, 0x6106, 0x6003, 0x0001, 0x6023,
+	0x0001, 0x6910, 0x6112, 0x692c, 0x612e, 0x6930, 0x6132, 0x6934,
+	0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, 0x693c, 0x613e, 0x695c,
+	0x615e, 0x080c, 0xbcdb, 0x2009, 0x8020, 0x080c, 0x84b3, 0x2d60,
+	0x00de, 0x0804, 0x9bda, 0x0096, 0x6014, 0x2048, 0x080c, 0xb842,
+	0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec, 0xa882,
+	0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020,
+	0xa87b, 0x0005, 0x080c, 0xbb4b, 0xa877, 0x0000, 0x080c, 0x6991,
+	0x080c, 0xba31, 0x009e, 0x0804, 0x9bda, 0x0016, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xb842, 0x0140, 0xa867, 0x0103, 0xa87b, 0x0028,
+	0xa877, 0x0000, 0x080c, 0x6991, 0x009e, 0x001e, 0x9186, 0x0013,
+	0x0158, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c,
+	0x9c93, 0x0020, 0x080c, 0x885d, 0x080c, 0x9c14, 0x0005, 0x0056,
+	0x0066, 0x0096, 0x00a6, 0x2029, 0x0001, 0x9182, 0x0101, 0x1208,
+	0x0010, 0x2009, 0x0100, 0x2130, 0x8304, 0x9098, 0x0018, 0x2009,
+	0x0020, 0x2011, 0x0029, 0x080c, 0xb408, 0x96b2, 0x0020, 0xb004,
+	0x904d, 0x0110, 0x080c, 0x0fd4, 0x080c, 0x1022, 0x0520, 0x8528,
+	0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d,
+	0x1228, 0x2608, 0x2011, 0x001b, 0x0499, 0x00a8, 0x96b2, 0x003c,
+	0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x0451, 0x0c28, 0x2001,
+	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566,
+	0x95ac, 0x0000, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae,
+	0x852f, 0x95ad, 0x0003, 0xb566, 0x009e, 0x006e, 0x005e, 0x0005,
+	0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055, 0x0130, 0xa807, 0x0000,
+	0x080c, 0x6991, 0x2a48, 0x0cb8, 0x080c, 0x6991, 0x00ae, 0x0005,
+	0x00f6, 0x2079, 0x0200, 0x7814, 0x9085, 0x0080, 0x7816, 0xd184,
+	0x0108, 0x8108, 0x810c, 0x20a9, 0x0001, 0xa860, 0x20e8, 0xa85c,
+	0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300, 0x9e00, 0x2098, 0x4003,
+	0x8318, 0x9386, 0x0020, 0x1148, 0x2018, 0x2300, 0x9e00, 0x2098,
+	0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x8109, 0x1d80, 0x7817,
+	0x0000, 0x00fe, 0x0005, 0x0066, 0x0126, 0x2091, 0x8000, 0x2031,
+	0x0001, 0x6020, 0x9084, 0x000f, 0x0083, 0x012e, 0x006e, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x0066, 0x2031, 0x0000, 0x6020, 0x9084,
+	0x000f, 0x001b, 0x006e, 0x012e, 0x0005, 0xb485, 0xb485, 0xb480,
+	0xb4a9, 0xb45d, 0xb480, 0xb45f, 0xb480, 0xb45d, 0xb45d, 0xb480,
+	0xb480, 0xb480, 0xb45d, 0xb45d, 0xb45d, 0x080c, 0x0d65, 0x6010,
+	0x9080, 0x0000, 0x2004, 0xd0bc, 0x190c, 0xb4a9, 0x0036, 0x6014,
+	0x0096, 0x2048, 0xa880, 0x009e, 0xd0cc, 0x0118, 0x2019, 0x000c,
+	0x0038, 0xd094, 0x0118, 0x2019, 0x000d, 0x0010, 0x2019, 0x0010,
+	0x080c, 0xce09, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005,
+	0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x0096, 0x86ff, 0x11e8,
+	0x6014, 0x2048, 0x080c, 0xb842, 0x01d0, 0x6043, 0xffff, 0xa864,
+	0x9086, 0x0139, 0x1128, 0xa87b, 0x0005, 0xa883, 0x0000, 0x0028,
+	0x900e, 0x2001, 0x0005, 0x080c, 0x6ba2, 0x080c, 0xbb4b, 0x080c,
+	0x6985, 0x080c, 0x9c14, 0x9085, 0x0001, 0x009e, 0x0005, 0x9006,
+	0x0ce0, 0x080c, 0x98bb, 0x080c, 0xbf9b, 0x6000, 0x908a, 0x0016,
+	0x1a0c, 0x0d65, 0x002b, 0x0106, 0x080c, 0x98d7, 0x010e, 0x0005,
+	0xb4c8, 0xb4f6, 0xb4ca, 0xb51d, 0xb4f1, 0xb4c8, 0xb480, 0xb485,
+	0xb485, 0xb480, 0xb480, 0xb480, 0xb480, 0xb480, 0xb480, 0xb480,
+	0x080c, 0x0d65, 0x86ff, 0x1510, 0x6020, 0x9086, 0x0006, 0x01f0,
+	0x0096, 0x6014, 0x2048, 0x080c, 0xb842, 0x0158, 0xa87c, 0xd0cc,
+	0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fd4, 0x009e, 0x080c,
+	0xbb4b, 0x009e, 0x080c, 0xbf1b, 0x6007, 0x0085, 0x6003, 0x000b,
+	0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x8495, 0x9085, 0x0001,
+	0x0005, 0x0066, 0x080c, 0x1921, 0x006e, 0x08a0, 0x00e6, 0x2071,
+	0x19b7, 0x7030, 0x9c06, 0x1120, 0x080c, 0x91e9, 0x00ee, 0x0850,
+	0x6020, 0x9084, 0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096,
+	0x2049, 0x0001, 0x2c40, 0x080c, 0x9365, 0x009e, 0x008e, 0x0040,
+	0x0066, 0x080c, 0x90e5, 0x190c, 0x0d65, 0x080c, 0x90f3, 0x006e,
+	0x00ee, 0x1904, 0xb4ca, 0x0804, 0xb480, 0x0036, 0x00e6, 0x2071,
+	0x19b7, 0x704c, 0x9c06, 0x1138, 0x901e, 0x080c, 0x9269, 0x00ee,
+	0x003e, 0x0804, 0xb4ca, 0x080c, 0x949c, 0x00ee, 0x003e, 0x1904,
+	0xb4ca, 0x0804, 0xb480, 0x00c6, 0x0066, 0x6020, 0x9084, 0x000f,
+	0x001b, 0x006e, 0x00ce, 0x0005, 0xb553, 0xb622, 0xb789, 0xb55b,
+	0x9c14, 0xb553, 0xcdfb, 0xbf83, 0xb622, 0xb54c, 0xb808, 0xb54c,
+	0xb54c, 0xb54c, 0xb54c, 0xb54c, 0x080c, 0x0d65, 0x080c, 0xba57,
+	0x1110, 0x080c, 0xa581, 0x0005, 0x080c, 0x885d, 0x0804, 0x9bda,
+	0x601b, 0x0001, 0x0005, 0x080c, 0xb842, 0x0130, 0x6014, 0x0096,
+	0x2048, 0x2c00, 0xa896, 0x009e, 0x080c, 0x98bb, 0x080c, 0xbf9b,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65, 0x0013, 0x0804, 0x98d7,
+	0xb580, 0xb582, 0xb5ac, 0xb5c0, 0xb5ed, 0xb580, 0xb553, 0xb553,
+	0xb553, 0xb5c7, 0xb5c7, 0xb580, 0xb580, 0xb580, 0xb580, 0xb5d1,
+	0x080c, 0x0d65, 0x00e6, 0x6014, 0x0096, 0x2048, 0xa880, 0xc0b5,
+	0xa882, 0x009e, 0x2071, 0x19b7, 0x7030, 0x9c06, 0x01d0, 0x0066,
+	0x080c, 0x90e5, 0x190c, 0x0d65, 0x080c, 0x90f3, 0x006e, 0x080c,
+	0xbf1b, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2001,
+	0x1957, 0x2004, 0x601a, 0x2009, 0x8020, 0x080c, 0x8495, 0x00ee,
+	0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880,
+	0xc0b5, 0xa882, 0x009e, 0x080c, 0xbf1b, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x8495, 0x0005,
+	0x080c, 0x98bb, 0x080c, 0x9a2c, 0x080c, 0x98d7, 0x0c28, 0x0096,
+	0x601b, 0x0001, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e,
+	0x0005, 0x080c, 0x5390, 0x01b8, 0x6014, 0x0096, 0x904d, 0x0190,
+	0xa864, 0xa867, 0x0103, 0xa87b, 0x0006, 0x9086, 0x0139, 0x1150,
+	0xa867, 0x0139, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa89b, 0x0004,
+	0x080c, 0x6991, 0x009e, 0x0804, 0x9bda, 0x6014, 0x0096, 0x904d,
+	0x0560, 0xa97c, 0xd1e4, 0x1158, 0x611c, 0xd1fc, 0x0530, 0x6110,
+	0x00b6, 0x2158, 0xb93c, 0x8109, 0x0208, 0xb93e, 0x00be, 0x080c,
+	0x98d7, 0x2001, 0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005,
+	0xa884, 0x009e, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001,
+	0x0037, 0x2c08, 0x080c, 0x15ab, 0x6000, 0x9086, 0x0004, 0x1120,
+	0x2009, 0x0048, 0x080c, 0x9c76, 0x0005, 0x009e, 0x080c, 0x1921,
+	0x0804, 0xb5ac, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65, 0x000b,
+	0x0005, 0xb639, 0xb558, 0xb63b, 0xb639, 0xb63b, 0xb63b, 0xb554,
+	0xb639, 0xb54e, 0xb54e, 0xb639, 0xb639, 0xb639, 0xb639, 0xb639,
+	0xb639, 0x080c, 0x0d65, 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084,
+	0x00ff, 0x00be, 0x908a, 0x000c, 0x1a0c, 0x0d65, 0x00b6, 0x0013,
+	0x00be, 0x0005, 0xb656, 0xb723, 0xb658, 0xb698, 0xb658, 0xb698,
+	0xb658, 0xb666, 0xb656, 0xb698, 0xb656, 0xb687, 0x080c, 0x0d65,
+	0x6004, 0x908e, 0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e,
+	0x0002, 0x0590, 0x908e, 0x0052, 0x0904, 0xb71f, 0x6004, 0x080c,
+	0xba57, 0x0904, 0xb73c, 0x908e, 0x0004, 0x1110, 0x080c, 0x303d,
+	0x908e, 0x0021, 0x0904, 0xb740, 0x908e, 0x0022, 0x0904, 0xb784,
+	0x908e, 0x003d, 0x0904, 0xb740, 0x908e, 0x0039, 0x0904, 0xb744,
+	0x908e, 0x0035, 0x0904, 0xb744, 0x908e, 0x001e, 0x0178, 0x908e,
+	0x0001, 0x1140, 0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x0110, 0x080c, 0x300e, 0x080c, 0xa581, 0x0804, 0x9c14,
+	0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0904, 0xb710, 0x9186,
+	0x0002, 0x1904, 0xb6e5, 0x2001, 0x1836, 0x2004, 0xd08c, 0x11c8,
+	0x080c, 0x7096, 0x11b0, 0x080c, 0xbf61, 0x0138, 0x080c, 0x70b9,
+	0x1120, 0x080c, 0x6fa1, 0x0804, 0xb76d, 0x2001, 0x194d, 0x2003,
+	0x0001, 0x2001, 0x1800, 0x2003, 0x0001, 0x080c, 0x6fc7, 0x0804,
+	0xb76d, 0x6010, 0x2058, 0x2001, 0x1836, 0x2004, 0xd0ac, 0x1904,
+	0xb76d, 0xb8a0, 0x9084, 0xff80, 0x1904, 0xb76d, 0xb840, 0x9084,
+	0x00ff, 0x9005, 0x0190, 0x8001, 0xb842, 0x6017, 0x0000, 0x6023,
+	0x0007, 0x601b, 0x0398, 0x604b, 0x0000, 0x080c, 0x9b84, 0x0128,
+	0x2b00, 0x6012, 0x6023, 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004,
+	0x908e, 0x0002, 0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e,
+	0x1170, 0x2009, 0x1836, 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071,
+	0x1800, 0x080c, 0x5c6a, 0x00ee, 0x080c, 0xa581, 0x0030, 0x080c,
+	0xa581, 0x080c, 0x300e, 0x080c, 0xbf76, 0x00e6, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x303d, 0x012e, 0x00ee, 0x080c, 0x9c14, 0x0005,
+	0x2001, 0x0002, 0x080c, 0x61bc, 0x6003, 0x0001, 0x6007, 0x0002,
+	0x080c, 0x84ba, 0x080c, 0x891b, 0x00de, 0x00ce, 0x0c80, 0x080c,
+	0x303d, 0x0804, 0xb694, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016,
+	0x0d38, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904,
+	0xb6e5, 0x8001, 0xb842, 0x6003, 0x0001, 0x080c, 0x84ba, 0x080c,
+	0x891b, 0x00de, 0x00ce, 0x0898, 0x080c, 0xa581, 0x0804, 0xb696,
+	0x080c, 0xa5bd, 0x0804, 0xb696, 0x00d6, 0x2c68, 0x6104, 0x080c,
+	0xbed9, 0x00de, 0x0118, 0x080c, 0x9bda, 0x00f0, 0x6004, 0x8007,
+	0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x603c, 0x600a, 0x2001, 0x1957, 0x2004,
+	0x601a, 0x602c, 0x2c08, 0x2060, 0x6024, 0xc0b5, 0x6026, 0x2160,
+	0x2009, 0x8020, 0x080c, 0x84b3, 0x0005, 0x00de, 0x00ce, 0x080c,
+	0xa581, 0x080c, 0x300e, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x303d, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x604b,
+	0x0000, 0x012e, 0x00ee, 0x0005, 0x080c, 0xa014, 0x1904, 0xb73c,
+	0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65, 0x0096, 0x00d6,
+	0x001b, 0x00de, 0x009e, 0x0005, 0xb7a4, 0xb7a4, 0xb7a4, 0xb7a4,
+	0xb7a4, 0xb7a4, 0xb7a4, 0xb7a4, 0xb7a4, 0xb553, 0xb7a4, 0xb558,
+	0xb7a6, 0xb558, 0xb7b3, 0xb7a4, 0x080c, 0x0d65, 0x6004, 0x9086,
+	0x008b, 0x0148, 0x6007, 0x008b, 0x6003, 0x000d, 0x2009, 0x8020,
+	0x080c, 0x84b3, 0x0005, 0x080c, 0xbf55, 0x0118, 0x080c, 0xbf68,
+	0x0010, 0x080c, 0xbf76, 0x080c, 0xba31, 0x080c, 0xb842, 0x0570,
+	0x080c, 0x300e, 0x080c, 0xb842, 0x0168, 0x6014, 0x2048, 0xa867,
+	0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882,
+	0x080c, 0x6991, 0x2c68, 0x080c, 0x9b84, 0x0150, 0x6810, 0x6012,
+	0x080c, 0xbcdb, 0x00c6, 0x2d60, 0x080c, 0x9c14, 0x00ce, 0x0008,
+	0x2d60, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003,
+	0x0001, 0x080c, 0x84ba, 0x080c, 0x891b, 0x00c8, 0x080c, 0xbf55,
+	0x0138, 0x6034, 0x9086, 0x4000, 0x1118, 0x080c, 0x300e, 0x08d0,
+	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186,
+	0x0035, 0x1118, 0x080c, 0x300e, 0x0868, 0x080c, 0x9c14, 0x0005,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65, 0x0002, 0xb81e, 0xb81e,
+	0xb820, 0xb820, 0xb820, 0xb81e, 0xb81e, 0x9c14, 0xb81e, 0xb81e,
+	0xb81e, 0xb81e, 0xb81e, 0xb81e, 0xb81e, 0xb81e, 0x080c, 0x0d65,
+	0x080c, 0x98bb, 0x080c, 0x9a2c, 0x080c, 0x98d7, 0x6114, 0x0096,
+	0x2148, 0xa87b, 0x0006, 0x080c, 0x6991, 0x009e, 0x0804, 0x9bda,
+	0x9284, 0x0003, 0x1158, 0x9282, 0x1ddc, 0x0240, 0x2001, 0x1819,
+	0x2004, 0x9202, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8,
+	0x0096, 0x0028, 0x0096, 0x0006, 0x6014, 0x2048, 0x000e, 0x0006,
+	0x9984, 0xf000, 0x9086, 0xf000, 0x0110, 0x080c, 0x10cd, 0x000e,
+	0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7350, 0x7070, 0x9302,
+	0x1640, 0x6020, 0x9206, 0x11f8, 0x080c, 0xbf61, 0x0180, 0x9286,
+	0x0001, 0x1168, 0x6004, 0x9086, 0x0004, 0x1148, 0x080c, 0x300e,
+	0x080c, 0xbf76, 0x00c6, 0x080c, 0x9c14, 0x00ce, 0x0060, 0x080c,
+	0xbc4d, 0x0148, 0x080c, 0xba57, 0x1110, 0x080c, 0xa581, 0x00c6,
+	0x080c, 0x9bda, 0x00ce, 0x9ce0, 0x001c, 0x7064, 0x9c02, 0x1208,
+	0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
+	0x00c6, 0x0016, 0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, 0x2061,
+	0x1b01, 0x6112, 0x080c, 0x300e, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x9b84, 0x01b0, 0x665e, 0x2b00, 0x6012, 0x080c, 0x5390,
+	0x0118, 0x080c, 0xb973, 0x0168, 0x080c, 0xbcdb, 0x6023, 0x0003,
+	0x2009, 0x004b, 0x080c, 0x9c76, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0,
+	0x080c, 0x9c49, 0x0580, 0x605f, 0x0000, 0x2b00, 0x6012, 0x080c,
+	0xbcdb, 0x6023, 0x0003, 0x0016, 0x080c, 0x98bb, 0x080c, 0x8624,
+	0x0076, 0x903e, 0x080c, 0x8509, 0x2c08, 0x080c, 0xcfd9, 0x007e,
+	0x080c, 0x98d7, 0x001e, 0xd184, 0x0128, 0x080c, 0x9bda, 0x9085,
+	0x0001, 0x0070, 0x080c, 0x5390, 0x0128, 0xd18c, 0x1170, 0x080c,
+	0xb973, 0x0148, 0x2009, 0x004c, 0x080c, 0x9c76, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90,
+	0x2009, 0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046,
+	0x0016, 0x080c, 0x9b84, 0x2c78, 0x0590, 0x7e5e, 0x2b00, 0x7812,
+	0x7823, 0x0003, 0x2021, 0x0005, 0x080c, 0xb985, 0x9186, 0x004d,
+	0x0118, 0x9186, 0x004e, 0x0148, 0x2001, 0x1950, 0x200c, 0xd1fc,
+	0x0168, 0x2f60, 0x080c, 0x9bda, 0x00d0, 0x2001, 0x194f, 0x200c,
+	0xd1fc, 0x0120, 0x2f60, 0x080c, 0x9bda, 0x0088, 0x2f60, 0x080c,
+	0x5390, 0x0138, 0xd18c, 0x1118, 0x04f1, 0x0148, 0x0010, 0x2900,
+	0x7816, 0x001e, 0x0016, 0x080c, 0x9c76, 0x9085, 0x0001, 0x001e,
+	0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046, 0x080c,
+	0x9b84, 0x2c78, 0x0508, 0x7e5e, 0x2b00, 0x7812, 0x7823, 0x0003,
+	0x0096, 0x2021, 0x0004, 0x0489, 0x009e, 0x2001, 0x194e, 0x200c,
+	0xd1fc, 0x0120, 0x2f60, 0x080c, 0x9bda, 0x0060, 0x2f60, 0x080c,
+	0x5390, 0x0120, 0xd18c, 0x1160, 0x0071, 0x0130, 0x2009, 0x0052,
+	0x080c, 0x9c76, 0x9085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005,
+	0x2900, 0x7816, 0x0c98, 0x00c6, 0x080c, 0x487a, 0x00ce, 0x1120,
+	0x080c, 0x9bda, 0x9006, 0x0005, 0xa867, 0x0000, 0xa86b, 0x8000,
+	0x2900, 0x6016, 0x9085, 0x0001, 0x0005, 0x0096, 0x0076, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x98bb, 0x080c, 0x644d, 0x0158, 0x2001,
+	0xb98c, 0x0006, 0x900e, 0x2400, 0x080c, 0x6ba2, 0x080c, 0x6991,
+	0x000e, 0x0807, 0x2418, 0x080c, 0x8823, 0xbaa0, 0x0086, 0x2041,
+	0x0001, 0x2039, 0x0001, 0x2608, 0x080c, 0x863e, 0x008e, 0x080c,
+	0x8509, 0x2f08, 0x2648, 0x080c, 0xcfd9, 0xb93c, 0x81ff, 0x090c,
+	0x8715, 0x080c, 0x98d7, 0x012e, 0x007e, 0x009e, 0x0005, 0x00c6,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x9b84, 0x0190, 0x660a, 0x2b08,
+	0x6112, 0x080c, 0xbcdb, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009,
+	0x001f, 0x080c, 0x9c76, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
+	0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9c49,
+	0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c, 0xbcdb, 0x6023, 0x0008,
+	0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c, 0x165c, 0x00fe, 0x2009,
+	0x0021, 0x080c, 0x9c76, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
+	0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6, 0x0126, 0x0016, 0x2091,
+	0x8000, 0x080c, 0x9b84, 0x0198, 0x660a, 0x2b08, 0x6112, 0x080c,
+	0xbcdb, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x0016, 0x080c,
+	0x9c76, 0x9085, 0x0001, 0x001e, 0x012e, 0x00ce, 0x0005, 0x9006,
+	0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9c49, 0x0188,
+	0x2b08, 0x6112, 0x080c, 0xbcdb, 0x6023, 0x0001, 0x2900, 0x6016,
+	0x2009, 0x0000, 0x080c, 0x9c76, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044, 0x0830, 0x2009, 0x0049,
+	0x0818, 0x0026, 0x00b6, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0118,
+	0x8211, 0xba3e, 0x1140, 0xb8c0, 0x9005, 0x0128, 0xb888, 0x9005,
+	0x1110, 0xb88b, 0x0001, 0x00be, 0x002e, 0x0005, 0x0006, 0x0016,
+	0x6004, 0x908e, 0x0002, 0x0140, 0x908e, 0x0003, 0x0128, 0x908e,
+	0x0004, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006,
+	0x0086, 0x0096, 0x6020, 0x9086, 0x0004, 0x01a8, 0x6014, 0x904d,
+	0x080c, 0xb842, 0x0180, 0xa864, 0x9086, 0x0139, 0x0170, 0x6020,
+	0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002, 0x0128, 0xa868, 0xd0fc,
+	0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x008e, 0x000e,
+	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9c49, 0x0198,
 	0x2b08, 0x6112, 0x080c, 0xbcdb, 0x6023, 0x0001, 0x2900, 0x6016,
-	0x080c, 0x3006, 0x2009, 0x0028, 0x080c, 0x9c85, 0x9085, 0x0001,
+	0x080c, 0x300e, 0x2009, 0x0028, 0x080c, 0x9c76, 0x9085, 0x0001,
 	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015, 0x11a8,
 	0x2011, 0x1823, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6, 0x080c,
-	0xa818, 0x00be, 0x080c, 0xaa57, 0x6003, 0x0001, 0x6007, 0x0029,
-	0x080c, 0x84d8, 0x080c, 0x8936, 0x0078, 0x6014, 0x0096, 0x2048,
+	0xa80c, 0x00be, 0x080c, 0xaa4b, 0x6003, 0x0001, 0x6007, 0x0029,
+	0x080c, 0x84ba, 0x080c, 0x891b, 0x0078, 0x6014, 0x0096, 0x2048,
 	0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c, 0xbe9a,
-	0x080c, 0xa58f, 0x080c, 0x9be7, 0x0005, 0x0096, 0x6014, 0x904d,
+	0x080c, 0xa581, 0x080c, 0x9bda, 0x0005, 0x0096, 0x6014, 0x904d,
 	0x090c, 0x0d65, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005,
 	0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6996, 0x012e, 0x009e, 0x080c, 0x9be7, 0x0c30, 0x0096, 0x9186,
-	0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x61c1, 0x00e8, 0x9186,
+	0x6991, 0x012e, 0x009e, 0x080c, 0x9bda, 0x0c30, 0x0096, 0x9186,
+	0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x61bc, 0x00e8, 0x9186,
 	0x0015, 0x1510, 0x2011, 0x1823, 0x2204, 0x9086, 0x0014, 0x11e0,
-	0x6010, 0x00b6, 0x2058, 0x080c, 0x630b, 0x00be, 0x080c, 0xab28,
+	0x6010, 0x00b6, 0x2058, 0x080c, 0x6306, 0x00be, 0x080c, 0xab1c,
 	0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005, 0x0160,
-	0x2001, 0x0006, 0x080c, 0x61c1, 0x6014, 0x2048, 0xa868, 0xd0fc,
-	0x0170, 0x080c, 0x9ff6, 0x0048, 0x6014, 0x2048, 0xa868, 0xd0fc,
-	0x0528, 0x080c, 0xa58f, 0x080c, 0x9be7, 0x009e, 0x0005, 0x6014,
+	0x2001, 0x0006, 0x080c, 0x61bc, 0x6014, 0x2048, 0xa868, 0xd0fc,
+	0x0170, 0x080c, 0x9fe8, 0x0048, 0x6014, 0x2048, 0xa868, 0xd0fc,
+	0x0528, 0x080c, 0xa581, 0x080c, 0x9bda, 0x009e, 0x0005, 0x6014,
 	0x6310, 0x2358, 0x904d, 0x090c, 0x0d65, 0xa87b, 0x0000, 0xa883,
-	0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x655f, 0x1108, 0xc185,
+	0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x655e, 0x1108, 0xc185,
 	0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6996, 0x012e, 0x080c, 0x9be7, 0x08f8, 0x6014, 0x904d,
+	0x080c, 0x6991, 0x012e, 0x080c, 0x9bda, 0x08f8, 0x6014, 0x904d,
 	0x090c, 0x0d65, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005,
 	0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6996, 0x012e, 0x080c, 0x9be7, 0x0840, 0xa878, 0x9086, 0x0005,
+	0x6991, 0x012e, 0x080c, 0x9bda, 0x0840, 0xa878, 0x9086, 0x0005,
 	0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005, 0x604b,
 	0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x2009,
-	0x8023, 0x080c, 0x84d1, 0x0005, 0x00c6, 0x6010, 0x00b6, 0x2058,
+	0x8023, 0x080c, 0x84b3, 0x0005, 0x00c6, 0x6010, 0x00b6, 0x2058,
 	0xb800, 0x00be, 0xd0bc, 0x0130, 0x0066, 0x6020, 0x9084, 0x000f,
-	0x001b, 0x006e, 0x00ce, 0x0005, 0xb565, 0xbb7e, 0xbb7e, 0xbb81,
-	0xd2c2, 0xd2dd, 0xd2e0, 0xb565, 0xb565, 0xb565, 0xb565, 0xb565,
-	0xb565, 0xb565, 0xb565, 0xb565, 0x080c, 0x0d65, 0xa001, 0xa001,
+	0x001b, 0x006e, 0x00ce, 0x0005, 0xb553, 0xbb7e, 0xbb7e, 0xbb81,
+	0xd2d3, 0xd2ee, 0xd2f1, 0xb553, 0xb553, 0xb553, 0xb553, 0xb553,
+	0xb553, 0xb553, 0xb553, 0xb553, 0x080c, 0x0d65, 0xa001, 0xa001,
 	0x0005, 0x0096, 0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110,
 	0x009e, 0x0010, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800,
 	0x00be, 0xd0bc, 0x0550, 0x2001, 0x1833, 0x2004, 0x9005, 0x1540,
-	0x00f6, 0x2c78, 0x080c, 0x9b91, 0x0508, 0x7810, 0x6012, 0x080c,
+	0x00f6, 0x2c78, 0x080c, 0x9b84, 0x0508, 0x7810, 0x6012, 0x080c,
 	0xbcdb, 0x7820, 0x9086, 0x0003, 0x0128, 0x7808, 0x603a, 0x2f00,
 	0x603e, 0x0020, 0x7808, 0x603e, 0x2f00, 0x603a, 0x602e, 0x6023,
 	0x0001, 0x6007, 0x0035, 0x6003, 0x0001, 0x795c, 0x615e, 0x2009,
-	0x8020, 0x080c, 0x84d1, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe,
-	0x2001, 0x1959, 0x2004, 0x604a, 0x0005, 0x0016, 0x0096, 0x6814,
+	0x8020, 0x080c, 0x84b3, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe,
+	0x2001, 0x1958, 0x2004, 0x604a, 0x0005, 0x0016, 0x0096, 0x6814,
 	0x2048, 0x681c, 0xd0fc, 0xc0fc, 0x681e, 0xa87c, 0x1108, 0xd0e4,
 	0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000, 0xa88f,
 	0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048, 0x080c,
@@ -5813,7 +5813,7 @@
 	0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc, 0x683a,
 	0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112, 0x695c,
 	0x615e, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001, 0x2009,
-	0x8020, 0x080c, 0x84d1, 0x009e, 0x001e, 0x0005, 0x6024, 0xd0d4,
+	0x8020, 0x080c, 0x84b3, 0x009e, 0x001e, 0x0005, 0x6024, 0xd0d4,
 	0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303, 0x0230,
 	0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a, 0x633e,
 	0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402, 0xa836,
@@ -5824,837 +5824,839 @@
 	0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158, 0x908e,
 	0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b, 0x0110,
 	0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026,
-	0x0036, 0x00e6, 0x2001, 0x1953, 0x200c, 0x8000, 0x2014, 0x2001,
-	0x0032, 0x080c, 0x8419, 0x2001, 0x1957, 0x82ff, 0x1110, 0x2011,
-	0x0014, 0x2202, 0x2001, 0x1955, 0x200c, 0x8000, 0x2014, 0x2071,
-	0x193d, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x8419, 0x2001,
-	0x1958, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1959,
-	0x9288, 0x000a, 0x2102, 0x2001, 0x0017, 0x080c, 0x98b9, 0x2001,
-	0x1a59, 0x2102, 0x2001, 0x0032, 0x080c, 0x159e, 0x080c, 0x6648,
+	0x0036, 0x00e6, 0x2001, 0x1952, 0x200c, 0x8000, 0x2014, 0x2001,
+	0x0032, 0x080c, 0x83fb, 0x2001, 0x1956, 0x82ff, 0x1110, 0x2011,
+	0x0014, 0x2202, 0x2001, 0x1954, 0x200c, 0x8000, 0x2014, 0x2071,
+	0x193c, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x83fb, 0x2001,
+	0x1957, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1958,
+	0x9288, 0x000a, 0x2102, 0x2001, 0x0017, 0x080c, 0x98ac, 0x2001,
+	0x1a58, 0x2102, 0x2001, 0x0032, 0x080c, 0x15ab, 0x080c, 0x6647,
 	0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016,
-	0x00e6, 0x2001, 0x1957, 0x2003, 0x0028, 0x2001, 0x1958, 0x2003,
-	0x0014, 0x2071, 0x193d, 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001,
-	0x1959, 0x2009, 0x001e, 0x2102, 0x2001, 0x0017, 0x080c, 0x98b9,
-	0x2001, 0x1a59, 0x2102, 0x2001, 0x0032, 0x080c, 0x159e, 0x00ee,
+	0x00e6, 0x2001, 0x1956, 0x2003, 0x0028, 0x2001, 0x1957, 0x2003,
+	0x0014, 0x2071, 0x193c, 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001,
+	0x1958, 0x2009, 0x001e, 0x2102, 0x2001, 0x0017, 0x080c, 0x98ac,
+	0x2001, 0x1a58, 0x2102, 0x2001, 0x0032, 0x080c, 0x15ab, 0x00ee,
 	0x001e, 0x000e, 0x0005, 0x0096, 0x6060, 0x904d, 0x0110, 0x080c,
 	0x1054, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x9b91, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0x9c85, 0x9085, 0x0001,
+	0x080c, 0x9b84, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023, 0x0001,
+	0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0x9c76, 0x9085, 0x0001,
 	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6, 0x00f6,
 	0x2071, 0x1800, 0x9186, 0x0015, 0x1500, 0x708c, 0x9086, 0x0018,
 	0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78, 0x080c,
-	0x89f5, 0x01d8, 0x7078, 0xaa50, 0x9206, 0x1160, 0x707c, 0xaa54,
+	0x89da, 0x01d8, 0x7078, 0xaa50, 0x9206, 0x1160, 0x707c, 0xaa54,
 	0x9206, 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x900e,
-	0x080c, 0x305b, 0x080c, 0x9ff6, 0x0020, 0x080c, 0xa58f, 0x080c,
-	0x9be7, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c, 0xaa54, 0x9206,
-	0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9b91,
+	0x080c, 0x305d, 0x080c, 0x9fe8, 0x0020, 0x080c, 0xa581, 0x080c,
+	0x9bda, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c, 0xaa54, 0x9206,
+	0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9b84,
 	0x0188, 0x2b08, 0x6112, 0x080c, 0xbcdb, 0x6023, 0x0001, 0x2900,
-	0x6016, 0x2009, 0x004d, 0x080c, 0x9c85, 0x9085, 0x0001, 0x012e,
+	0x6016, 0x2009, 0x004d, 0x080c, 0x9c76, 0x9085, 0x0001, 0x012e,
 	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x0016, 0x080c, 0x9b91, 0x0180, 0x2b08, 0x6112, 0x080c, 0xbcdb,
-	0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0x9c85, 0x9085,
+	0x0016, 0x080c, 0x9b84, 0x0180, 0x2b08, 0x6112, 0x080c, 0xbcdb,
+	0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0x9c76, 0x9085,
 	0x0001, 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0, 0x0016,
 	0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6, 0x00f6,
 	0x2071, 0x1800, 0x9186, 0x0015, 0x1568, 0x718c, 0x6014, 0x2048,
-	0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001, 0x1971,
+	0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001, 0x1970,
 	0x2003, 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906, 0x8006,
 	0x8007, 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080, 0x001b,
-	0x20a0, 0x2001, 0x1971, 0x0016, 0x200c, 0x080c, 0xc545, 0x001e,
+	0x20a0, 0x2001, 0x1970, 0x0016, 0x200c, 0x080c, 0xc553, 0x001e,
 	0xa804, 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048, 0xa867,
-	0x0103, 0x0010, 0x080c, 0xa58f, 0x080c, 0x9be7, 0x00fe, 0x00ee,
+	0x0103, 0x0010, 0x080c, 0xa581, 0x080c, 0x9bda, 0x00fe, 0x00ee,
 	0x009e, 0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005,
 	0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x11b8,
 	0x708c, 0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78, 0x080c,
-	0x89f5, 0x01a8, 0x7078, 0xaa74, 0x9206, 0x1130, 0x707c, 0xaa78,
-	0x9206, 0x1110, 0x080c, 0x3006, 0x080c, 0x9ff6, 0x0020, 0x080c,
-	0xa58f, 0x080c, 0x9be7, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c,
+	0x89da, 0x01a8, 0x7078, 0xaa74, 0x9206, 0x1130, 0x707c, 0xaa78,
+	0x9206, 0x1110, 0x080c, 0x300e, 0x080c, 0x9fe8, 0x0020, 0x080c,
+	0xa581, 0x080c, 0x9bda, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c,
 	0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6, 0x2071,
 	0x1800, 0x9186, 0x0015, 0x1550, 0x708c, 0x9086, 0x0004, 0x1530,
-	0x6014, 0x2048, 0x2c78, 0x080c, 0x89f5, 0x05f0, 0x7078, 0xaacc,
-	0x9206, 0x1180, 0x707c, 0xaad0, 0x9206, 0x1160, 0x080c, 0x3006,
-	0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5345,
-	0x001e, 0x0010, 0x080c, 0x512e, 0x080c, 0xb847, 0x0508, 0xa87b,
-	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c, 0xb847,
-	0x01b8, 0x6014, 0x2048, 0x080c, 0x512e, 0x1d70, 0xa87b, 0x0030,
+	0x6014, 0x2048, 0x2c78, 0x080c, 0x89da, 0x05f0, 0x7078, 0xaacc,
+	0x9206, 0x1180, 0x707c, 0xaad0, 0x9206, 0x1160, 0x080c, 0x300e,
+	0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5340,
+	0x001e, 0x0010, 0x080c, 0x5129, 0x080c, 0xb842, 0x0508, 0xa87b,
+	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c, 0xb842,
+	0x01b8, 0x6014, 0x2048, 0x080c, 0x5129, 0x1d70, 0xa87b, 0x0030,
 	0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126, 0x2091,
-	0x8000, 0xa867, 0x0139, 0x080c, 0x6996, 0x012e, 0x080c, 0x9be7,
+	0x8000, 0xa867, 0x0139, 0x080c, 0x6991, 0x012e, 0x080c, 0x9bda,
 	0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c, 0xaad0, 0x9206, 0x0930,
 	0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938, 0xaa34,
 	0x2100, 0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c, 0x9206,
 	0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e, 0x0005,
-	0x00b6, 0x00d6, 0x0036, 0x080c, 0xb847, 0x0904, 0xbe96, 0x0096,
+	0x00b6, 0x00d6, 0x0036, 0x080c, 0xb842, 0x0904, 0xbe96, 0x0096,
 	0x6314, 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580, 0x6310,
 	0x00c6, 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140, 0x080c,
-	0x655f, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96,
+	0x655e, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96,
 	0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031,
 	0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x080c,
 	0x0f9f, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8b8,
 	0x9080, 0x000a, 0x2098, 0x080c, 0x0f9f, 0x00ce, 0x0090, 0xaa96,
 	0x3918, 0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016, 0x0110,
 	0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084, 0x00ff,
-	0xa89e, 0x080c, 0x698a, 0x6017, 0x0000, 0x009e, 0x003e, 0x00de,
+	0xa89e, 0x080c, 0x6985, 0x6017, 0x0000, 0x009e, 0x003e, 0x00de,
 	0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096, 0x00f6,
 	0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096, 0x0000,
-	0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x2424, 0x2118,
+	0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x243d, 0x2118,
 	0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d, 0x7c3c,
-	0x2011, 0x8018, 0x080c, 0x48d8, 0x00a8, 0x9096, 0x0001, 0x1148,
+	0x2011, 0x8018, 0x080c, 0x48da, 0x00a8, 0x9096, 0x0001, 0x1148,
 	0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa,
 	0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838, 0xa8a6,
 	0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e, 0x002e,
 	0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110, 0x6a38,
-	0x0008, 0x6a2c, 0x080c, 0xb835, 0x01f0, 0x2260, 0x6120, 0x9186,
+	0x0008, 0x6a2c, 0x080c, 0xb830, 0x01f0, 0x2260, 0x6120, 0x9186,
 	0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206, 0x0140,
 	0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140, 0x0020,
 	0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106, 0x001e,
 	0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974, 0xd1cc,
 	0x0188, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8, 0x918c,
 	0x0f00, 0x810f, 0x918e, 0x0001, 0x1128, 0xa834, 0xa938, 0x9115,
-	0x190c, 0xaec2, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010, 0x0036,
-	0x901e, 0x0499, 0x01e0, 0x080c, 0xb847, 0x01c8, 0x080c, 0xba36,
+	0x190c, 0xaeb6, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010, 0x0036,
+	0x901e, 0x0499, 0x01e0, 0x080c, 0xb842, 0x01c8, 0x080c, 0xba31,
 	0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096, 0x2048, 0xa87c,
-	0x080c, 0xba5c, 0x1118, 0x080c, 0xa58f, 0x0040, 0xa867, 0x0103,
-	0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x6996, 0x009e, 0x003e,
+	0x080c, 0xba57, 0x1118, 0x080c, 0xa581, 0x0040, 0xa867, 0x0103,
+	0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x6991, 0x009e, 0x003e,
 	0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec, 0xa882,
 	0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005,
 	0x080c, 0xbb4b, 0xa877, 0x0000, 0x0005, 0x2001, 0x1810, 0x2004,
 	0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4, 0x000e,
 	0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e, 0x0005,
 	0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021,
-	0x0007, 0x080c, 0x4a75, 0x004e, 0x003e, 0x0005, 0x0c51, 0x1d81,
-	0x0005, 0x2001, 0x1957, 0x2004, 0x601a, 0x0005, 0x2001, 0x1959,
-	0x2004, 0x604a, 0x0005, 0x080c, 0x9be7, 0x0804, 0x8936, 0x611c,
+	0x0007, 0x080c, 0x4a77, 0x004e, 0x003e, 0x0005, 0x0c51, 0x1d81,
+	0x0005, 0x2001, 0x1956, 0x2004, 0x601a, 0x0005, 0x2001, 0x1958,
+	0x2004, 0x604a, 0x0005, 0x080c, 0x9bda, 0x0804, 0x891b, 0x611c,
 	0xd1fc, 0xa97c, 0x1108, 0xd1e4, 0x0005, 0x601c, 0xd0fc, 0xa87c,
 	0x1108, 0xd0e4, 0x0005, 0x601c, 0xd0fc, 0xc0fc, 0x601e, 0xa87c,
-	0x1108, 0xd0e4, 0x0005, 0x6044, 0xd0fc, 0x0160, 0xd0dc, 0x1128,
-	0x908c, 0x000f, 0x9186, 0x0005, 0x1118, 0x6003, 0x0003, 0x0010,
-	0x6003, 0x0001, 0x0005, 0x00b6, 0x0066, 0x6000, 0x90b2, 0x0016,
-	0x1a0c, 0x0d65, 0x001b, 0x006e, 0x00be, 0x0005, 0xbfc6, 0xc6a0,
-	0xc7ef, 0xbfc6, 0xbfc6, 0xbfc6, 0xbfc6, 0xbfc6, 0xbffd, 0xc871,
-	0xbfc6, 0xbfc6, 0xbfc6, 0xbfc6, 0xbfc6, 0xbfc6, 0x080c, 0x0d65,
-	0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d65, 0x0013, 0x006e,
-	0x0005, 0xbfe1, 0xcd88, 0xbfe1, 0xbfe1, 0xbfe1, 0xbfe1, 0xbfe1,
-	0xbfe1, 0xcd37, 0xcdda, 0xbfe1, 0xd3fd, 0xd431, 0xd3fd, 0xd431,
-	0xbfe1, 0x080c, 0x0d65, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0d65,
-	0x6000, 0x000a, 0x0005, 0xbffb, 0xca4d, 0xcb16, 0xcb38, 0xcbb3,
-	0xbffb, 0xccad, 0xcc3b, 0xc87b, 0xcd0f, 0xcd24, 0xbffb, 0xbffb,
-	0xbffb, 0xbffb, 0xbffb, 0x080c, 0x0d65, 0x91b2, 0x0053, 0x1a0c,
-	0x0d65, 0x2100, 0x91b2, 0x0040, 0x1a04, 0xc443, 0x0002, 0xc047,
-	0xc234, 0xc047, 0xc047, 0xc047, 0xc23d, 0xc047, 0xc047, 0xc047,
-	0xc047, 0xc047, 0xc047, 0xc047, 0xc047, 0xc047, 0xc047, 0xc047,
-	0xc047, 0xc047, 0xc047, 0xc047, 0xc047, 0xc047, 0xc049, 0xc0b0,
-	0xc0bf, 0xc123, 0xc14e, 0xc1c6, 0xc21f, 0xc047, 0xc047, 0xc240,
-	0xc047, 0xc047, 0xc255, 0xc262, 0xc047, 0xc047, 0xc047, 0xc047,
-	0xc047, 0xc2e5, 0xc047, 0xc047, 0xc2f9, 0xc047, 0xc047, 0xc2b4,
-	0xc047, 0xc047, 0xc047, 0xc311, 0xc047, 0xc047, 0xc047, 0xc38e,
-	0xc047, 0xc047, 0xc047, 0xc047, 0xc047, 0xc047, 0xc40b, 0x080c,
-	0x0d65, 0x080c, 0x6625, 0x1150, 0x2001, 0x1836, 0x2004, 0xd0cc,
-	0x1128, 0x9084, 0x0009, 0x9086, 0x0008, 0x1140, 0x6007, 0x0009,
-	0x602f, 0x0009, 0x6017, 0x0000, 0x0804, 0xc22d, 0x080c, 0x660e,
-	0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0,
-	0x0026, 0x2019, 0x0029, 0x080c, 0x98c8, 0x080c, 0x863b, 0x0076,
-	0x903e, 0x080c, 0x852a, 0x2c08, 0x080c, 0xcfc8, 0x007e, 0x001e,
-	0x080c, 0x98e4, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee, 0x6610,
-	0x2658, 0x080c, 0x627f, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006,
-	0x1268, 0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be,
-	0x2c08, 0x080c, 0xd5a9, 0x002e, 0x001e, 0x1178, 0x080c, 0xcef7,
-	0x1904, 0xc11b, 0x080c, 0xce93, 0x1120, 0x6007, 0x0008, 0x0804,
-	0xc22d, 0x6007, 0x0009, 0x0804, 0xc22d, 0x080c, 0xd0fe, 0x0128,
-	0x080c, 0xcef7, 0x0d78, 0x0804, 0xc11b, 0x6017, 0x1900, 0x0c88,
-	0x080c, 0x3150, 0x1904, 0xc440, 0x6106, 0x080c, 0xce44, 0x6007,
-	0x0006, 0x0804, 0xc22d, 0x6007, 0x0007, 0x0804, 0xc22d, 0x080c,
-	0xd46d, 0x1904, 0xc440, 0x080c, 0x3150, 0x1904, 0xc440, 0x00d6,
-	0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1220,
-	0x2001, 0x0001, 0x080c, 0x61ad, 0x96b4, 0xff00, 0x8637, 0x9686,
-	0x0006, 0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4, 0x00ff,
-	0x9686, 0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686, 0x0005,
-	0x0110, 0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9084,
-	0x0003, 0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030, 0x9084,
-	0x0003, 0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007, 0x00b0,
-	0x00ee, 0x080c, 0xcf5e, 0x1190, 0x9686, 0x0006, 0x1140, 0x0026,
-	0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x305b, 0x002e, 0x080c,
-	0x630b, 0x6007, 0x000a, 0x00de, 0x0804, 0xc22d, 0x6007, 0x000b,
-	0x00de, 0x0804, 0xc22d, 0x080c, 0x3006, 0x080c, 0xbf76, 0x6007,
-	0x0001, 0x0804, 0xc22d, 0x080c, 0xd46d, 0x1904, 0xc440, 0x080c,
-	0x3150, 0x1904, 0xc440, 0x2071, 0x0260, 0x7034, 0x90b4, 0x0003,
-	0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003, 0x1910,
-	0x6610, 0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026, 0x6210,
-	0x2258, 0xbaa0, 0x900e, 0x080c, 0x305b, 0x002e, 0x6007, 0x000c,
-	0x2001, 0x0001, 0x080c, 0xd589, 0x0804, 0xc22d, 0x080c, 0x6625,
-	0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008,
-	0x1110, 0x0804, 0xc056, 0x080c, 0x660e, 0x6610, 0x2658, 0xbe04,
-	0x9684, 0x00ff, 0x9082, 0x0006, 0x06c0, 0x1138, 0x0026, 0x2001,
-	0x0006, 0x080c, 0x61ed, 0x002e, 0x0050, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xc11b, 0x080c,
-	0xcf6b, 0x1120, 0x6007, 0x000e, 0x0804, 0xc22d, 0x0046, 0x6410,
-	0x2458, 0xbca0, 0x0046, 0x080c, 0x3006, 0x080c, 0xbf76, 0x004e,
-	0x0016, 0x9006, 0x2009, 0x1854, 0x210c, 0x0048, 0x2009, 0x0029,
-	0x080c, 0xd273, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e,
-	0x004e, 0x6007, 0x0001, 0x0804, 0xc22d, 0x2001, 0x0001, 0x080c,
-	0x61ad, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019,
-	0x1805, 0x2011, 0x0270, 0x080c, 0xabcb, 0x003e, 0x002e, 0x001e,
-	0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637, 0x9682, 0x0004,
-	0x0a04, 0xc11b, 0x9682, 0x0007, 0x0a04, 0xc177, 0x0804, 0xc11b,
-	0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xc22d, 0x080c, 0x6625,
-	0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008,
-	0x1110, 0x0804, 0xc056, 0x080c, 0x660e, 0x6610, 0x2658, 0xbe04,
-	0x9684, 0x00ff, 0x9082, 0x0006, 0x0690, 0x0150, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xc11b,
-	0x080c, 0xcf99, 0x1130, 0x080c, 0xce93, 0x1118, 0x6007, 0x0010,
-	0x04e0, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x3006,
-	0x080c, 0xbf76, 0x004e, 0x0016, 0x9006, 0x2009, 0x1854, 0x210c,
-	0x0048, 0x2009, 0x0029, 0x080c, 0xd273, 0x6010, 0x2058, 0xb800,
-	0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c,
-	0xd0fe, 0x0140, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0980,
-	0x0804, 0xc11b, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c,
-	0x3150, 0x1904, 0xc440, 0x080c, 0xd46d, 0x1904, 0xc440, 0x080c,
-	0xc5e0, 0x1904, 0xc11b, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c,
-	0x84d8, 0x080c, 0x8936, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001,
-	0x080c, 0x84d8, 0x080c, 0x8936, 0x0cb0, 0x6007, 0x0005, 0x0c68,
-	0x080c, 0xd46d, 0x1904, 0xc440, 0x080c, 0x3150, 0x1904, 0xc440,
-	0x080c, 0xc5e0, 0x1904, 0xc11b, 0x6007, 0x0020, 0x6003, 0x0001,
-	0x080c, 0x84d8, 0x080c, 0x8936, 0x0005, 0x080c, 0x3150, 0x1904,
-	0xc440, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x84d8, 0x080c,
-	0x8936, 0x0005, 0x080c, 0xd46d, 0x1904, 0xc440, 0x080c, 0x3150,
-	0x1904, 0xc440, 0x080c, 0xc5e0, 0x1904, 0xc11b, 0x0016, 0x0026,
-	0x00e6, 0x2071, 0x0260, 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08,
-	0x080c, 0xb835, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206, 0x1188,
-	0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240,
-	0x2c08, 0x9006, 0x080c, 0xd245, 0x1180, 0x7244, 0x9286, 0xffff,
-	0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214, 0x9296,
-	0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086, 0x0007,
-	0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0x9be7, 0x2160,
-	0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x84d8, 0x080c, 0x8936,
-	0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x61ad,
-	0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805,
-	0x2011, 0x0276, 0x080c, 0xabcb, 0x003e, 0x002e, 0x001e, 0x015e,
-	0x0120, 0x6007, 0x0031, 0x0804, 0xc22d, 0x080c, 0xa830, 0x080c,
-	0x70b7, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x70d1, 0x1138,
-	0x080c, 0x73b7, 0x080c, 0x5cdc, 0x080c, 0x6fe8, 0x0010, 0x080c,
-	0x708b, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x3150, 0x1904,
-	0xc440, 0x080c, 0xc5e0, 0x1904, 0xc11b, 0x6106, 0x080c, 0xc5fc,
-	0x1120, 0x6007, 0x002b, 0x0804, 0xc22d, 0x6007, 0x002c, 0x0804,
-	0xc22d, 0x080c, 0xd46d, 0x1904, 0xc440, 0x080c, 0x3150, 0x1904,
-	0xc440, 0x080c, 0xc5e0, 0x1904, 0xc11b, 0x6106, 0x080c, 0xc601,
-	0x1120, 0x6007, 0x002e, 0x0804, 0xc22d, 0x6007, 0x002f, 0x0804,
-	0xc22d, 0x080c, 0x3150, 0x1904, 0xc440, 0x00e6, 0x00d6, 0x00c6,
-	0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158,
-	0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de,
-	0x00ee, 0x0804, 0xc234, 0x080c, 0x5391, 0xd0e4, 0x0904, 0xc38b,
-	0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108, 0x720c,
-	0x080c, 0x6663, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106, 0x1118,
-	0xb814, 0x9206, 0x0510, 0x080c, 0x665f, 0x15b8, 0x2069, 0x1800,
-	0x687c, 0x9206, 0x1590, 0x6878, 0x9106, 0x1578, 0x7210, 0x080c,
-	0xb835, 0x0590, 0x080c, 0xc4cb, 0x0578, 0x080c, 0xd2ef, 0x0560,
-	0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c,
-	0x84d1, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff,
-	0x0150, 0x080c, 0xb835, 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110,
-	0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c,
-	0xd245, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037, 0x602f,
-	0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003,
-	0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c, 0x3150,
-	0x1904, 0xc440, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00, 0x8007,
-	0x9086, 0x0006, 0x1904, 0xc234, 0x00e6, 0x00d6, 0x00c6, 0x080c,
-	0x5391, 0xd0e4, 0x0904, 0xc403, 0x2069, 0x1800, 0x2071, 0x026c,
-	0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150, 0x7208,
-	0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xd245, 0x2c10, 0x00ce,
-	0x05e8, 0x080c, 0xb835, 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004,
-	0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xb445, 0x002e,
-	0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001, 0x0178,
-	0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280, 0x0005,
-	0x2004, 0x9005, 0x0170, 0x080c, 0xc4cb, 0x0904, 0xc384, 0x0056,
-	0x7510, 0x7614, 0x080c, 0xd308, 0x005e, 0x00ce, 0x00de, 0x00ee,
-	0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x84d1, 0x0c78, 0x6007, 0x003b,
-	0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x2009, 0x8020,
-	0x080c, 0x84d1, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b, 0x6017,
-	0x0000, 0x0804, 0xc35b, 0x00e6, 0x0026, 0x080c, 0x6625, 0x0550,
-	0x080c, 0x660e, 0x080c, 0xd4df, 0x1518, 0x2071, 0x1800, 0x70d8,
-	0x9085, 0x0003, 0x70da, 0x00f6, 0x2079, 0x0100, 0x72ac, 0x9284,
-	0x00ff, 0x707a, 0x78e6, 0x9284, 0xff00, 0x727c, 0x9205, 0x707e,
-	0x78ea, 0x00fe, 0x70e3, 0x0000, 0x080c, 0x6663, 0x0120, 0x2011,
-	0x19da, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2ddb, 0x0010,
-	0x080c, 0xd511, 0x002e, 0x00ee, 0x080c, 0x9be7, 0x0804, 0xc233,
-	0x080c, 0x9be7, 0x0005, 0x2600, 0x0002, 0xc457, 0xc457, 0xc457,
-	0xc457, 0xc457, 0xc459, 0xc457, 0xc457, 0xc457, 0xc457, 0xc476,
-	0xc457, 0xc457, 0xc457, 0xc488, 0xc495, 0xc4c6, 0xc457, 0x080c,
-	0x0d65, 0x080c, 0xd46d, 0x1d20, 0x080c, 0x3150, 0x1d08, 0x080c,
-	0xc5e0, 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001,
-	0x080c, 0x84d8, 0x0005, 0x080c, 0x3006, 0x080c, 0xbf76, 0x6007,
-	0x0001, 0x6003, 0x0001, 0x080c, 0x84d8, 0x0005, 0x080c, 0xd46d,
-	0x1938, 0x080c, 0x3150, 0x1920, 0x080c, 0xc5e0, 0x1d60, 0x703c,
-	0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x84d8, 0x0005,
-	0x080c, 0xc4e8, 0x0904, 0xc440, 0x6007, 0x004e, 0x6003, 0x0001,
-	0x080c, 0x84d8, 0x080c, 0x8936, 0x0005, 0x6007, 0x004f, 0x6017,
-	0x0000, 0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001,
-	0x1160, 0x7140, 0x2001, 0x198e, 0x2004, 0x9106, 0x11b0, 0x7144,
-	0x2001, 0x198f, 0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168,
-	0x2011, 0x0276, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019,
-	0x000a, 0x080c, 0xabdf, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003,
-	0x0001, 0x080c, 0x84d8, 0x080c, 0x8936, 0x0005, 0x6007, 0x0050,
-	0x703c, 0x6016, 0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6,
-	0x00c6, 0x2260, 0x6010, 0x2058, 0xb8c4, 0xd084, 0x0150, 0x7128,
-	0x6050, 0x9106, 0x1120, 0x712c, 0x604c, 0x9106, 0x0110, 0x9006,
-	0x0010, 0x9085, 0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005,
-	0x0016, 0x0096, 0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x1800, 0x708c, 0x908a, 0x00f9, 0x16e8, 0x20e1,
-	0x0000, 0x2001, 0x1971, 0x2003, 0x0000, 0x080c, 0x103b, 0x05a0,
-	0x2900, 0x6016, 0x708c, 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0,
-	0xa833, 0x001e, 0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x001b, 0x20a0, 0x2001, 0x1971, 0x0016, 0x200c, 0x0471, 0x001e,
-	0x2940, 0x080c, 0x103b, 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff,
-	0x0180, 0x0c18, 0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x001b, 0x20a0, 0x2001, 0x1971, 0x0016, 0x200c, 0x00b1, 0x001e,
-	0x0000, 0x9085, 0x0001, 0x0048, 0x2071, 0x1800, 0x708f, 0x0000,
-	0x6014, 0x2048, 0x080c, 0x0fd4, 0x9006, 0x012e, 0x01de, 0x01ce,
-	0x00ee, 0x008e, 0x009e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0026,
-	0x0036, 0x00c6, 0x918c, 0xffff, 0x11a8, 0x080c, 0x202b, 0x2099,
-	0x026c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
-	0x00f8, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x202b, 0x2099,
-	0x0260, 0x0ca8, 0x080c, 0x202b, 0x2061, 0x1971, 0x6004, 0x2098,
-	0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8,
-	0x4003, 0x22a8, 0x8108, 0x080c, 0x202b, 0x2099, 0x0260, 0x0ca8,
-	0x2061, 0x1971, 0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006,
-	0x0020, 0x2001, 0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021,
-	0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e,
-	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8,
-	0x080c, 0x2043, 0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312,
-	0x1218, 0x23a8, 0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8,
-	0x22a8, 0x8108, 0x080c, 0x2043, 0x20a1, 0x0240, 0x0c98, 0x080c,
-	0x2043, 0x2061, 0x1974, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312,
-	0x1218, 0x23a8, 0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138,
-	0x22a8, 0x8108, 0x080c, 0x2043, 0x20a1, 0x0240, 0x0c98, 0x2061,
-	0x1974, 0x2019, 0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020,
-	0x2001, 0x0240, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296,
-	0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005,
-	0x00b6, 0x0066, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0006, 0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4,
-	0x00ff, 0x9686, 0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085,
-	0x0001, 0x006e, 0x00be, 0x0005, 0x00d6, 0x080c, 0xc676, 0x00de,
-	0x0005, 0x00d6, 0x080c, 0xc683, 0x1520, 0x680c, 0x908c, 0xff00,
-	0x6820, 0x9084, 0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4,
-	0x0130, 0x9006, 0x080c, 0xd589, 0x2009, 0x0001, 0x0078, 0xd1ec,
-	0x0180, 0x6920, 0x918c, 0x00ff, 0x6824, 0x080c, 0x2424, 0x1148,
-	0x2001, 0x0001, 0x080c, 0xd589, 0x2110, 0x900e, 0x080c, 0x305b,
-	0x0018, 0x9085, 0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6,
-	0x00c6, 0x080c, 0x9c58, 0x0598, 0x0016, 0x0026, 0x00c6, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2424, 0x1568, 0x080c,
-	0x6210, 0x1550, 0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00,
-	0x6012, 0x080c, 0xd46d, 0x11c8, 0x080c, 0x3150, 0x11b0, 0x080c,
-	0xc5e0, 0x0500, 0x2001, 0x0007, 0x080c, 0x61c1, 0x2001, 0x0007,
-	0x080c, 0x61ed, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001,
-	0x6003, 0x0001, 0x080c, 0x84d8, 0x0010, 0x080c, 0x9be7, 0x9085,
-	0x0001, 0x00ce, 0x00be, 0x0005, 0x080c, 0x9be7, 0x00ce, 0x002e,
-	0x001e, 0x0ca8, 0x080c, 0x9be7, 0x9006, 0x0c98, 0x2069, 0x026d,
-	0x6800, 0x9082, 0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001,
-	0x0008, 0x9006, 0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808,
-	0x9084, 0xff00, 0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018,
-	0x0118, 0x9186, 0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff,
-	0x910d, 0x6162, 0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005,
-	0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0d65, 0x91b6, 0x0013, 0x1130,
-	0x2008, 0x91b2, 0x0040, 0x1a04, 0xc7c3, 0x0092, 0x91b6, 0x0027,
-	0x0120, 0x91b6, 0x0014, 0x190c, 0x0d65, 0x2001, 0x0007, 0x080c,
-	0x61ed, 0x080c, 0x8874, 0x080c, 0x9c21, 0x080c, 0x8936, 0x0005,
-	0xc700, 0xc702, 0xc700, 0xc700, 0xc700, 0xc702, 0xc70f, 0xc7c0,
-	0xc75f, 0xc7c0, 0xc771, 0xc7c0, 0xc70f, 0xc7c0, 0xc7b8, 0xc7c0,
-	0xc7b8, 0xc7c0, 0xc7c0, 0xc700, 0xc700, 0xc700, 0xc700, 0xc700,
-	0xc700, 0xc700, 0xc700, 0xc700, 0xc700, 0xc700, 0xc702, 0xc700,
-	0xc7c0, 0xc700, 0xc700, 0xc7c0, 0xc700, 0xc7bd, 0xc7c0, 0xc700,
-	0xc700, 0xc700, 0xc700, 0xc7c0, 0xc7c0, 0xc700, 0xc7c0, 0xc7c0,
-	0xc700, 0xc70a, 0xc700, 0xc700, 0xc700, 0xc700, 0xc7bc, 0xc7c0,
-	0xc700, 0xc700, 0xc7c0, 0xc7c0, 0xc700, 0xc700, 0xc700, 0xc700,
-	0x080c, 0x0d65, 0x080c, 0xbf79, 0x6003, 0x0002, 0x080c, 0x8936,
-	0x0804, 0xc7c2, 0x9006, 0x080c, 0x61ad, 0x0804, 0xc7c0, 0x080c,
-	0x665f, 0x1904, 0xc7c0, 0x9006, 0x080c, 0x61ad, 0x6010, 0x2058,
-	0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6, 0x2079, 0x1800, 0x78a4,
-	0x8000, 0x78a6, 0x00fe, 0x0428, 0x6010, 0x2058, 0xb884, 0x9005,
-	0x1178, 0x080c, 0xbf61, 0x1904, 0xc7c0, 0x0036, 0x0046, 0xbba0,
-	0x2021, 0x0007, 0x080c, 0x4a75, 0x004e, 0x003e, 0x0804, 0xc7c0,
-	0x080c, 0x3181, 0x1904, 0xc7c0, 0x2001, 0x1800, 0x2004, 0x9086,
-	0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6,
-	0x00fe, 0x2001, 0x0002, 0x080c, 0x61c1, 0x6023, 0x0001, 0x6003,
-	0x0001, 0x6007, 0x0002, 0x080c, 0x84d8, 0x080c, 0x8936, 0x6110,
-	0x2158, 0x2009, 0x0001, 0x080c, 0x8167, 0x0804, 0xc7c2, 0x6610,
-	0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0904,
-	0xc7c0, 0x9686, 0x0004, 0x0904, 0xc7c0, 0x2001, 0x0004, 0x0804,
-	0xc7be, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036,
-	0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4a75,
-	0x004e, 0x003e, 0x2001, 0x0006, 0x080c, 0xc7dc, 0x6610, 0x2658,
-	0xbe04, 0x0066, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e,
-	0x0168, 0x2001, 0x0006, 0x080c, 0x61ed, 0x9284, 0x00ff, 0x908e,
-	0x0007, 0x1120, 0x2001, 0x0006, 0x080c, 0x61c1, 0x080c, 0x665f,
-	0x11f8, 0x2001, 0x1836, 0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4,
-	0x00ff, 0x9686, 0x0006, 0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a4,
-	0x8000, 0x78a6, 0x00fe, 0x0804, 0xc749, 0x2001, 0x0004, 0x0030,
-	0x2001, 0x0006, 0x0409, 0x0020, 0x0018, 0x0010, 0x080c, 0x61ed,
-	0x080c, 0x9be7, 0x0005, 0x2600, 0x0002, 0xc7d7, 0xc7d7, 0xc7d7,
-	0xc7d7, 0xc7d7, 0xc7d9, 0xc7d7, 0xc7d7, 0xc7d7, 0xc7d7, 0xc7d9,
-	0xc7d7, 0xc7d7, 0xc7d7, 0xc7d9, 0xc7d9, 0xc7d9, 0xc7d9, 0x080c,
-	0x0d65, 0x080c, 0x9be7, 0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110,
-	0x2158, 0xb900, 0xd184, 0x0138, 0x080c, 0x61c1, 0x9006, 0x080c,
-	0x61ad, 0x080c, 0x303b, 0x00de, 0x00be, 0x001e, 0x0005, 0x6610,
-	0x2658, 0xb804, 0x9084, 0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c,
-	0x0d65, 0x91b6, 0x0015, 0x1110, 0x003b, 0x0028, 0x91b6, 0x0016,
-	0x190c, 0x0d65, 0x006b, 0x0005, 0xa670, 0xa670, 0xa670, 0xa670,
-	0xa670, 0xa670, 0xc85b, 0xc81c, 0xa670, 0xa670, 0xa670, 0xa670,
-	0xa670, 0xa670, 0xa670, 0xa670, 0xa670, 0xa670, 0xc85b, 0xc862,
-	0xa670, 0xa670, 0xa670, 0xa670, 0x00f6, 0x080c, 0x665f, 0x11d8,
-	0x080c, 0xbf61, 0x11c0, 0x6010, 0x905d, 0x01a8, 0xb884, 0x9005,
-	0x0190, 0x9006, 0x080c, 0x61ad, 0x2001, 0x0002, 0x080c, 0x61c1,
-	0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84d8,
-	0x080c, 0x8936, 0x00f0, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c,
-	0x080c, 0x2424, 0x11b0, 0x080c, 0x6270, 0x0118, 0x080c, 0x9be7,
-	0x0080, 0xb810, 0x0006, 0xb814, 0x0006, 0xb884, 0x0006, 0x080c,
-	0x5cf6, 0x000e, 0xb886, 0x000e, 0xb816, 0x000e, 0xb812, 0x080c,
-	0x9be7, 0x00fe, 0x0005, 0x6604, 0x96b6, 0x001e, 0x1110, 0x080c,
-	0x9be7, 0x0005, 0x080c, 0xaa54, 0x1148, 0x6003, 0x0001, 0x6007,
-	0x0001, 0x080c, 0x84d8, 0x080c, 0x8936, 0x0010, 0x080c, 0x9be7,
-	0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d65, 0x080c, 0x8874,
-	0x080c, 0x9c21, 0x0005, 0x9182, 0x0040, 0x0002, 0xc891, 0xc891,
-	0xc891, 0xc891, 0xc893, 0xc891, 0xc891, 0xc891, 0xc891, 0xc891,
-	0xc891, 0xc891, 0xc891, 0xc891, 0xc891, 0xc891, 0xc891, 0xc891,
-	0xc891, 0x080c, 0x0d65, 0x0096, 0x00b6, 0x00d6, 0x00e6, 0x00f6,
+	0x1108, 0xd0e4, 0x0005, 0x6044, 0xd0fc, 0x1138, 0xd0bc, 0x0198,
+	0xc0bc, 0x6046, 0x6003, 0x0002, 0x0070, 0xd0ac, 0x1160, 0xd0dc,
+	0x1128, 0x908c, 0x000f, 0x9186, 0x0005, 0x1118, 0x6003, 0x0003,
+	0x0010, 0x6003, 0x0001, 0x0005, 0x00b6, 0x0066, 0x6000, 0x90b2,
+	0x0016, 0x1a0c, 0x0d65, 0x001b, 0x006e, 0x00be, 0x0005, 0xbfcf,
+	0xc6ae, 0xc7fd, 0xbfcf, 0xbfcf, 0xbfcf, 0xbfcf, 0xbfcf, 0xc006,
+	0xc881, 0xbfcf, 0xbfcf, 0xbfcf, 0xbfcf, 0xbfcf, 0xbfcf, 0x080c,
+	0x0d65, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d65, 0x0013,
+	0x006e, 0x0005, 0xbfea, 0xcd98, 0xbfea, 0xbfea, 0xbfea, 0xbfea,
+	0xbfea, 0xbfea, 0xcd47, 0xcdea, 0xbfea, 0xd40e, 0xd442, 0xd40e,
+	0xd442, 0xbfea, 0x080c, 0x0d65, 0x6000, 0x9082, 0x0016, 0x1a0c,
+	0x0d65, 0x6000, 0x000a, 0x0005, 0xc004, 0xca5d, 0xcb26, 0xcb48,
+	0xcbc3, 0xc004, 0xccbd, 0xcc4b, 0xc88b, 0xcd1f, 0xcd34, 0xc004,
+	0xc004, 0xc004, 0xc004, 0xc004, 0x080c, 0x0d65, 0x91b2, 0x0053,
+	0x1a0c, 0x0d65, 0x2100, 0x91b2, 0x0040, 0x1a04, 0xc451, 0x0002,
+	0xc050, 0xc242, 0xc050, 0xc050, 0xc050, 0xc24b, 0xc050, 0xc050,
+	0xc050, 0xc050, 0xc050, 0xc050, 0xc050, 0xc050, 0xc050, 0xc050,
+	0xc050, 0xc050, 0xc050, 0xc050, 0xc050, 0xc050, 0xc050, 0xc052,
+	0xc0b9, 0xc0c8, 0xc12c, 0xc157, 0xc1cf, 0xc22d, 0xc050, 0xc050,
+	0xc24e, 0xc050, 0xc050, 0xc263, 0xc270, 0xc050, 0xc050, 0xc050,
+	0xc050, 0xc050, 0xc2f3, 0xc050, 0xc050, 0xc307, 0xc050, 0xc050,
+	0xc2c2, 0xc050, 0xc050, 0xc050, 0xc31f, 0xc050, 0xc050, 0xc050,
+	0xc39c, 0xc050, 0xc050, 0xc050, 0xc050, 0xc050, 0xc050, 0xc419,
+	0x080c, 0x0d65, 0x080c, 0x6624, 0x1150, 0x2001, 0x1836, 0x2004,
+	0xd0cc, 0x1128, 0x9084, 0x0009, 0x9086, 0x0008, 0x1140, 0x6007,
+	0x0009, 0x602f, 0x0009, 0x6017, 0x0000, 0x0804, 0xc23b, 0x080c,
+	0x660d, 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x6210, 0x2258,
+	0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x98bb, 0x080c, 0x8624,
+	0x0076, 0x903e, 0x080c, 0x8509, 0x2c08, 0x080c, 0xcfd9, 0x007e,
+	0x001e, 0x080c, 0x98d7, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee,
+	0x6610, 0x2658, 0x080c, 0x627a, 0xbe04, 0x9684, 0x00ff, 0x9082,
+	0x0006, 0x1268, 0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0,
+	0x00be, 0x2c08, 0x080c, 0xd5ba, 0x002e, 0x001e, 0x1178, 0x080c,
+	0xcf08, 0x1904, 0xc124, 0x080c, 0xcea4, 0x1120, 0x6007, 0x0008,
+	0x0804, 0xc23b, 0x6007, 0x0009, 0x0804, 0xc23b, 0x080c, 0xd10f,
+	0x0128, 0x080c, 0xcf08, 0x0d78, 0x0804, 0xc124, 0x6017, 0x1900,
+	0x0c88, 0x080c, 0x3144, 0x1904, 0xc44e, 0x6106, 0x080c, 0xce55,
+	0x6007, 0x0006, 0x0804, 0xc23b, 0x6007, 0x0007, 0x0804, 0xc23b,
+	0x080c, 0xd47e, 0x1904, 0xc44e, 0x080c, 0x3144, 0x1904, 0xc44e,
+	0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006,
+	0x1220, 0x2001, 0x0001, 0x080c, 0x61a8, 0x96b4, 0xff00, 0x8637,
+	0x9686, 0x0006, 0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4,
+	0x00ff, 0x9686, 0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686,
+	0x0005, 0x0110, 0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034,
+	0x9084, 0x0003, 0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030,
+	0x9084, 0x0003, 0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007,
+	0x00b0, 0x00ee, 0x080c, 0xcf6f, 0x1190, 0x9686, 0x0006, 0x1140,
+	0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x305d, 0x002e,
+	0x080c, 0x6306, 0x6007, 0x000a, 0x00de, 0x0804, 0xc23b, 0x6007,
+	0x000b, 0x00de, 0x0804, 0xc23b, 0x080c, 0x300e, 0x080c, 0xbf76,
+	0x6007, 0x0001, 0x0804, 0xc23b, 0x080c, 0xd47e, 0x1904, 0xc44e,
+	0x080c, 0x3144, 0x1904, 0xc44e, 0x2071, 0x0260, 0x7034, 0x90b4,
+	0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003,
+	0x1910, 0x6610, 0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026,
+	0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x305d, 0x002e, 0x6007,
+	0x000c, 0x2001, 0x0001, 0x080c, 0xd59a, 0x0804, 0xc23b, 0x080c,
+	0x6624, 0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086,
+	0x0008, 0x1110, 0x0804, 0xc05f, 0x080c, 0x660d, 0x6610, 0x2658,
+	0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x06c0, 0x1138, 0x0026,
+	0x2001, 0x0006, 0x080c, 0x61e8, 0x002e, 0x0050, 0x96b4, 0xff00,
+	0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xc124,
+	0x080c, 0xcf7c, 0x1120, 0x6007, 0x000e, 0x0804, 0xc23b, 0x0046,
+	0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x300e, 0x080c, 0xbf76,
+	0x004e, 0x0016, 0x9006, 0x2009, 0x1854, 0x210c, 0x0048, 0x2009,
+	0x0029, 0x080c, 0xd284, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802,
+	0x001e, 0x004e, 0x6007, 0x0001, 0x0804, 0xc23b, 0x2001, 0x0001,
+	0x080c, 0x61a8, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004,
+	0x2019, 0x1805, 0x2011, 0x0270, 0x080c, 0xabbf, 0x003e, 0x002e,
+	0x001e, 0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637, 0x9682,
+	0x0004, 0x0a04, 0xc124, 0x9682, 0x0007, 0x0a04, 0xc180, 0x0804,
+	0xc124, 0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xc23b, 0x080c,
+	0x6624, 0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086,
+	0x0008, 0x1110, 0x0804, 0xc05f, 0x080c, 0x660d, 0x6610, 0x2658,
+	0xbe04, 0x9684, 0x00ff, 0x0006, 0x9086, 0x0001, 0x000e, 0x0170,
+	0x9082, 0x0006, 0x0690, 0x0150, 0x96b4, 0xff00, 0x8637, 0x9686,
+	0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xc124, 0x080c, 0xcfaa,
+	0x1130, 0x080c, 0xcea4, 0x1118, 0x6007, 0x0010, 0x04e0, 0x0046,
+	0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x300e, 0x080c, 0xbf76,
+	0x004e, 0x0016, 0x9006, 0x2009, 0x1854, 0x210c, 0x0048, 0x2009,
+	0x0029, 0x080c, 0xd284, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802,
+	0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c, 0xd10f, 0x0140,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0980, 0x0804, 0xc124,
+	0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c, 0x3144, 0x1904,
+	0xc44e, 0x080c, 0xd47e, 0x1904, 0xc44e, 0x080c, 0xc5ee, 0x1904,
+	0xc124, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c, 0x84ba, 0x080c,
+	0x891b, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x84ba,
+	0x080c, 0x891b, 0x0cb0, 0x6007, 0x0005, 0x0c68, 0x080c, 0xd47e,
+	0x1904, 0xc44e, 0x080c, 0x3144, 0x1904, 0xc44e, 0x080c, 0xc5ee,
+	0x1904, 0xc124, 0x6007, 0x0020, 0x6003, 0x0001, 0x080c, 0x84ba,
+	0x080c, 0x891b, 0x0005, 0x080c, 0x3144, 0x1904, 0xc44e, 0x6007,
+	0x0023, 0x6003, 0x0001, 0x080c, 0x84ba, 0x080c, 0x891b, 0x0005,
+	0x080c, 0xd47e, 0x1904, 0xc44e, 0x080c, 0x3144, 0x1904, 0xc44e,
+	0x080c, 0xc5ee, 0x1904, 0xc124, 0x0016, 0x0026, 0x00e6, 0x2071,
+	0x0260, 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08, 0x080c, 0xb830,
+	0x01b0, 0x2260, 0x7240, 0x6008, 0x9206, 0x1188, 0x6010, 0x9190,
+	0x0004, 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240, 0x2c08, 0x9006,
+	0x080c, 0xd256, 0x1180, 0x7244, 0x9286, 0xffff, 0x01b0, 0x2160,
+	0x6007, 0x0026, 0x6017, 0x1700, 0x7214, 0x9296, 0xffff, 0x1180,
+	0x6007, 0x0025, 0x0068, 0x6020, 0x9086, 0x0007, 0x1d80, 0x6004,
+	0x9086, 0x0024, 0x1110, 0x080c, 0x9bda, 0x2160, 0x6007, 0x0025,
+	0x6003, 0x0001, 0x080c, 0x84ba, 0x080c, 0x891b, 0x00ee, 0x002e,
+	0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x61a8, 0x0156, 0x0016,
+	0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276,
+	0x080c, 0xabbf, 0x003e, 0x002e, 0x001e, 0x015e, 0x0120, 0x6007,
+	0x0031, 0x0804, 0xc23b, 0x080c, 0xa824, 0x080c, 0x7096, 0x1190,
+	0x0006, 0x0026, 0x0036, 0x080c, 0x70b0, 0x1138, 0x080c, 0x7396,
+	0x080c, 0x5cd7, 0x080c, 0x6fc7, 0x0010, 0x080c, 0x706a, 0x003e,
+	0x002e, 0x000e, 0x0005, 0x080c, 0x3144, 0x1904, 0xc44e, 0x080c,
+	0xc5ee, 0x1904, 0xc124, 0x6106, 0x080c, 0xc60a, 0x1120, 0x6007,
+	0x002b, 0x0804, 0xc23b, 0x6007, 0x002c, 0x0804, 0xc23b, 0x080c,
+	0xd47e, 0x1904, 0xc44e, 0x080c, 0x3144, 0x1904, 0xc44e, 0x080c,
+	0xc5ee, 0x1904, 0xc124, 0x6106, 0x080c, 0xc60f, 0x1120, 0x6007,
+	0x002e, 0x0804, 0xc23b, 0x6007, 0x002f, 0x0804, 0xc23b, 0x080c,
+	0x3144, 0x1904, 0xc44e, 0x00e6, 0x00d6, 0x00c6, 0x6010, 0x2058,
+	0xb904, 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158, 0x9184, 0xff00,
+	0x8007, 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de, 0x00ee, 0x0804,
+	0xc242, 0x080c, 0x538c, 0xd0e4, 0x0904, 0xc399, 0x2071, 0x026c,
+	0x7010, 0x603a, 0x7014, 0x603e, 0x7108, 0x720c, 0x080c, 0x6662,
+	0x0140, 0x6010, 0x2058, 0xb810, 0x9106, 0x1118, 0xb814, 0x9206,
+	0x0510, 0x080c, 0x665e, 0x15b8, 0x2069, 0x1800, 0x687c, 0x9206,
+	0x1590, 0x6878, 0x9106, 0x1578, 0x7210, 0x080c, 0xb830, 0x0590,
+	0x080c, 0xc4d9, 0x0578, 0x080c, 0xd300, 0x0560, 0x622e, 0x6007,
+	0x0036, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84b3, 0x00ce,
+	0x00de, 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff, 0x0150, 0x080c,
+	0xb830, 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110, 0x9106, 0x1190,
+	0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c, 0xd256, 0x2c10,
+	0x2160, 0x0140, 0x0890, 0x6007, 0x0037, 0x602f, 0x0009, 0x6017,
+	0x1500, 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003, 0x6017, 0x1700,
+	0x0880, 0x6007, 0x0012, 0x0868, 0x080c, 0x3144, 0x1904, 0xc44e,
+	0x6010, 0x2058, 0xb804, 0x9084, 0xff00, 0x8007, 0x9086, 0x0006,
+	0x1904, 0xc242, 0x00e6, 0x00d6, 0x00c6, 0x080c, 0x538c, 0xd0e4,
+	0x0904, 0xc411, 0x2069, 0x1800, 0x2071, 0x026c, 0x7008, 0x603a,
+	0x720c, 0x623e, 0x9286, 0xffff, 0x1150, 0x7208, 0x00c6, 0x2c08,
+	0x9085, 0x0001, 0x080c, 0xd256, 0x2c10, 0x00ce, 0x05e8, 0x080c,
+	0xb830, 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004, 0x9106, 0x15a0,
+	0x00c6, 0x0026, 0x2260, 0x080c, 0xb433, 0x002e, 0x00ce, 0x7118,
+	0x918c, 0xff00, 0x810f, 0x9186, 0x0001, 0x0178, 0x9186, 0x0005,
+	0x0118, 0x9186, 0x0007, 0x1198, 0x9280, 0x0005, 0x2004, 0x9005,
+	0x0170, 0x080c, 0xc4d9, 0x0904, 0xc392, 0x0056, 0x7510, 0x7614,
+	0x080c, 0xd319, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x6007,
+	0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x2009,
+	0x8020, 0x080c, 0x84b3, 0x0c78, 0x6007, 0x003b, 0x602f, 0x0003,
+	0x6017, 0x0300, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84b3,
+	0x0c10, 0x6007, 0x003b, 0x602f, 0x000b, 0x6017, 0x0000, 0x0804,
+	0xc369, 0x00e6, 0x0026, 0x080c, 0x6624, 0x0550, 0x080c, 0x660d,
+	0x080c, 0xd4f0, 0x1518, 0x2071, 0x1800, 0x70d8, 0x9085, 0x0003,
+	0x70da, 0x00f6, 0x2079, 0x0100, 0x72ac, 0x9284, 0x00ff, 0x707a,
+	0x78e6, 0x9284, 0xff00, 0x727c, 0x9205, 0x707e, 0x78ea, 0x00fe,
+	0x70e3, 0x0000, 0x080c, 0x6662, 0x0120, 0x2011, 0x19d9, 0x2013,
+	0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2de9, 0x0010, 0x080c, 0xd522,
+	0x002e, 0x00ee, 0x080c, 0x9bda, 0x0804, 0xc241, 0x080c, 0x9bda,
+	0x0005, 0x2600, 0x0002, 0xc465, 0xc465, 0xc465, 0xc465, 0xc465,
+	0xc467, 0xc465, 0xc465, 0xc465, 0xc465, 0xc484, 0xc465, 0xc465,
+	0xc465, 0xc496, 0xc4a3, 0xc4d4, 0xc465, 0x080c, 0x0d65, 0x080c,
+	0xd47e, 0x1d20, 0x080c, 0x3144, 0x1d08, 0x080c, 0xc5ee, 0x1148,
+	0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001, 0x080c, 0x84ba,
+	0x0005, 0x080c, 0x300e, 0x080c, 0xbf76, 0x6007, 0x0001, 0x6003,
+	0x0001, 0x080c, 0x84ba, 0x0005, 0x080c, 0xd47e, 0x1938, 0x080c,
+	0x3144, 0x1920, 0x080c, 0xc5ee, 0x1d60, 0x703c, 0x6016, 0x6007,
+	0x004a, 0x6003, 0x0001, 0x080c, 0x84ba, 0x0005, 0x080c, 0xc4f6,
+	0x0904, 0xc44e, 0x6007, 0x004e, 0x6003, 0x0001, 0x080c, 0x84ba,
+	0x080c, 0x891b, 0x0005, 0x6007, 0x004f, 0x6017, 0x0000, 0x7134,
+	0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, 0x1160, 0x7140,
+	0x2001, 0x198d, 0x2004, 0x9106, 0x11b0, 0x7144, 0x2001, 0x198e,
+	0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168, 0x2011, 0x0276,
+	0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c,
+	0xabd3, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003, 0x0001, 0x080c,
+	0x84ba, 0x080c, 0x891b, 0x0005, 0x6007, 0x0050, 0x703c, 0x6016,
+	0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6, 0x2260,
+	0x6010, 0x2058, 0xb8c4, 0xd084, 0x0150, 0x7128, 0x6050, 0x9106,
+	0x1120, 0x712c, 0x604c, 0x9106, 0x0110, 0x9006, 0x0010, 0x9085,
+	0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005, 0x0016, 0x0096,
+	0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x1800, 0x708c, 0x908a, 0x00f9, 0x16e8, 0x20e1, 0x0000, 0x2001,
+	0x1970, 0x2003, 0x0000, 0x080c, 0x103b, 0x05a0, 0x2900, 0x6016,
+	0x708c, 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0, 0xa833, 0x001e,
+	0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0,
+	0x2001, 0x1970, 0x0016, 0x200c, 0x0471, 0x001e, 0x2940, 0x080c,
+	0x103b, 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff, 0x0180, 0x0c18,
+	0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0,
+	0x2001, 0x1970, 0x0016, 0x200c, 0x00b1, 0x001e, 0x0000, 0x9085,
+	0x0001, 0x0048, 0x2071, 0x1800, 0x708f, 0x0000, 0x6014, 0x2048,
+	0x080c, 0x0fd4, 0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee, 0x008e,
+	0x009e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6,
+	0x918c, 0xffff, 0x11a8, 0x080c, 0x203c, 0x2099, 0x026c, 0x2001,
+	0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x00f8, 0x20a8,
+	0x4003, 0x22a8, 0x8108, 0x080c, 0x203c, 0x2099, 0x0260, 0x0ca8,
+	0x080c, 0x203c, 0x2061, 0x1970, 0x6004, 0x2098, 0x6008, 0x3518,
+	0x9312, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8,
+	0x8108, 0x080c, 0x203c, 0x2099, 0x0260, 0x0ca8, 0x2061, 0x1970,
+	0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001,
+	0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff,
+	0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006,
+	0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x2054,
+	0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8,
+	0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108,
+	0x080c, 0x2054, 0x20a1, 0x0240, 0x0c98, 0x080c, 0x2054, 0x2061,
+	0x1973, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8,
+	0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108,
+	0x080c, 0x2054, 0x20a1, 0x0240, 0x0c98, 0x2061, 0x1973, 0x2019,
+	0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0240,
+	0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a,
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066,
+	0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006,
+	0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686,
+	0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085, 0x0001, 0x006e,
+	0x00be, 0x0005, 0x00d6, 0x080c, 0xc684, 0x00de, 0x0005, 0x00d6,
+	0x080c, 0xc691, 0x1520, 0x680c, 0x908c, 0xff00, 0x6820, 0x9084,
+	0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006,
+	0x080c, 0xd59a, 0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920,
+	0x918c, 0x00ff, 0x6824, 0x080c, 0x243d, 0x1148, 0x2001, 0x0001,
+	0x080c, 0xd59a, 0x2110, 0x900e, 0x080c, 0x305d, 0x0018, 0x9085,
+	0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c,
+	0x9c49, 0x0598, 0x0016, 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204,
+	0x8211, 0x220c, 0x080c, 0x243d, 0x1568, 0x080c, 0x620b, 0x1550,
+	0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c,
+	0xd47e, 0x11c8, 0x080c, 0x3144, 0x11b0, 0x080c, 0xc5ee, 0x0500,
+	0x2001, 0x0007, 0x080c, 0x61bc, 0x2001, 0x0007, 0x080c, 0x61e8,
+	0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001,
+	0x080c, 0x84ba, 0x0010, 0x080c, 0x9bda, 0x9085, 0x0001, 0x00ce,
+	0x00be, 0x0005, 0x080c, 0x9bda, 0x00ce, 0x002e, 0x001e, 0x0ca8,
+	0x080c, 0x9bda, 0x9006, 0x0c98, 0x2069, 0x026d, 0x6800, 0x9082,
+	0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001, 0x0008, 0x9006,
+	0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808, 0x9084, 0xff00,
+	0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018, 0x0118, 0x9186,
+	0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff, 0x910d, 0x6162,
+	0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005, 0x6004, 0x90b2,
+	0x0053, 0x1a0c, 0x0d65, 0x91b6, 0x0013, 0x1130, 0x2008, 0x91b2,
+	0x0040, 0x1a04, 0xc7d1, 0x0092, 0x91b6, 0x0027, 0x0120, 0x91b6,
+	0x0014, 0x190c, 0x0d65, 0x2001, 0x0007, 0x080c, 0x61e8, 0x080c,
+	0x885d, 0x080c, 0x9c14, 0x080c, 0x891b, 0x0005, 0xc70e, 0xc710,
+	0xc70e, 0xc70e, 0xc70e, 0xc710, 0xc71d, 0xc7ce, 0xc76d, 0xc7ce,
+	0xc77f, 0xc7ce, 0xc71d, 0xc7ce, 0xc7c6, 0xc7ce, 0xc7c6, 0xc7ce,
+	0xc7ce, 0xc70e, 0xc70e, 0xc70e, 0xc70e, 0xc70e, 0xc70e, 0xc70e,
+	0xc70e, 0xc70e, 0xc70e, 0xc70e, 0xc710, 0xc70e, 0xc7ce, 0xc70e,
+	0xc70e, 0xc7ce, 0xc70e, 0xc7cb, 0xc7ce, 0xc70e, 0xc70e, 0xc70e,
+	0xc70e, 0xc7ce, 0xc7ce, 0xc70e, 0xc7ce, 0xc7ce, 0xc70e, 0xc718,
+	0xc70e, 0xc70e, 0xc70e, 0xc70e, 0xc7ca, 0xc7ce, 0xc70e, 0xc70e,
+	0xc7ce, 0xc7ce, 0xc70e, 0xc70e, 0xc70e, 0xc70e, 0x080c, 0x0d65,
+	0x080c, 0xbf79, 0x6003, 0x0002, 0x080c, 0x891b, 0x0804, 0xc7d0,
+	0x9006, 0x080c, 0x61a8, 0x0804, 0xc7ce, 0x080c, 0x665e, 0x1904,
+	0xc7ce, 0x9006, 0x080c, 0x61a8, 0x6010, 0x2058, 0xb810, 0x9086,
+	0x00ff, 0x1140, 0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6,
+	0x00fe, 0x0428, 0x6010, 0x2058, 0xb884, 0x9005, 0x1178, 0x080c,
+	0xbf61, 0x1904, 0xc7ce, 0x0036, 0x0046, 0xbba0, 0x2021, 0x0007,
+	0x080c, 0x4a77, 0x004e, 0x003e, 0x0804, 0xc7ce, 0x080c, 0x3175,
+	0x1904, 0xc7ce, 0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1138,
+	0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x2001,
+	0x0002, 0x080c, 0x61bc, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007,
+	0x0002, 0x080c, 0x84ba, 0x080c, 0x891b, 0x6110, 0x2158, 0x2009,
+	0x0001, 0x080c, 0x8146, 0x0804, 0xc7d0, 0x6610, 0x2658, 0xbe04,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0904, 0xc7ce, 0x9686,
+	0x0004, 0x0904, 0xc7ce, 0x2001, 0x0004, 0x0804, 0xc7cc, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010,
+	0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4a77, 0x004e, 0x003e,
+	0x2001, 0x0006, 0x080c, 0xc7ea, 0x6610, 0x2658, 0xbe04, 0x0066,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001,
+	0x0006, 0x080c, 0x61e8, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120,
+	0x2001, 0x0006, 0x080c, 0x61bc, 0x080c, 0x665e, 0x11f8, 0x2001,
+	0x1836, 0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686,
+	0x0006, 0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6,
+	0x00fe, 0x0804, 0xc757, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006,
+	0x0409, 0x0020, 0x0018, 0x0010, 0x080c, 0x61e8, 0x080c, 0x9bda,
+	0x0005, 0x2600, 0x0002, 0xc7e5, 0xc7e5, 0xc7e5, 0xc7e5, 0xc7e5,
+	0xc7e7, 0xc7e5, 0xc7e5, 0xc7e5, 0xc7e5, 0xc7e7, 0xc7e5, 0xc7e5,
+	0xc7e5, 0xc7e7, 0xc7e7, 0xc7e7, 0xc7e7, 0x080c, 0x0d65, 0x080c,
+	0x9bda, 0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900,
+	0xd184, 0x0138, 0x080c, 0x61bc, 0x9006, 0x080c, 0x61a8, 0x080c,
+	0x303d, 0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804,
+	0x9084, 0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0d65, 0x91b6,
+	0x0015, 0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0d65,
+	0x006b, 0x0005, 0xa662, 0xa662, 0xa662, 0xa662, 0xc87f, 0xa662,
+	0xc869, 0xc82a, 0xa662, 0xa662, 0xa662, 0xa662, 0xa662, 0xa662,
+	0xa662, 0xa662, 0xc87f, 0xa662, 0xc869, 0xc870, 0xa662, 0xa662,
+	0xa662, 0xa662, 0x00f6, 0x080c, 0x665e, 0x11d8, 0x080c, 0xbf61,
+	0x11c0, 0x6010, 0x905d, 0x01a8, 0xb884, 0x9005, 0x0190, 0x9006,
+	0x080c, 0x61a8, 0x2001, 0x0002, 0x080c, 0x61bc, 0x6023, 0x0001,
+	0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84ba, 0x080c, 0x891b,
+	0x00f0, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x243d,
+	0x11b0, 0x080c, 0x626b, 0x0118, 0x080c, 0x9bda, 0x0080, 0xb810,
+	0x0006, 0xb814, 0x0006, 0xb884, 0x0006, 0x080c, 0x5cf1, 0x000e,
+	0xb886, 0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0x9bda, 0x00fe,
+	0x0005, 0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0x9bda, 0x0005,
+	0x080c, 0xaa48, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
+	0x84ba, 0x080c, 0x891b, 0x0010, 0x080c, 0x9bda, 0x0005, 0x0804,
+	0x9bda, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d65, 0x080c, 0x885d,
+	0x080c, 0x9c14, 0x0005, 0x9182, 0x0040, 0x0002, 0xc8a1, 0xc8a1,
+	0xc8a1, 0xc8a1, 0xc8a3, 0xc8a1, 0xc8a1, 0xc8a1, 0xc8a1, 0xc8a1,
+	0xc8a1, 0xc8a1, 0xc8a1, 0xc8a1, 0xc8a1, 0xc8a1, 0xc8a1, 0xc8a1,
+	0xc8a1, 0x080c, 0x0d65, 0x0096, 0x00b6, 0x00d6, 0x00e6, 0x00f6,
 	0x0046, 0x0026, 0x6210, 0x2258, 0xb8ac, 0x9005, 0x11b0, 0x6007,
-	0x0044, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xc8fa,
-	0x080c, 0xd57d, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001,
-	0x2011, 0x0200, 0x080c, 0x83eb, 0x0020, 0x9026, 0x080c, 0xd4b2,
+	0x0044, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xc90a,
+	0x080c, 0xd58e, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001,
+	0x2011, 0x0200, 0x080c, 0x83cd, 0x0020, 0x9026, 0x080c, 0xd4c3,
 	0x0c30, 0x080c, 0x1022, 0x090c, 0x0d65, 0x6003, 0x0007, 0xa867,
 	0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008,
 	0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876,
-	0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x6996,
-	0x001e, 0x080c, 0xd57d, 0x1904, 0xc95a, 0x9486, 0x2000, 0x1130,
-	0x2019, 0x0017, 0x080c, 0xd1eb, 0x0804, 0xc95a, 0x9486, 0x0200,
-	0x1120, 0x080c, 0xd17b, 0x0804, 0xc95a, 0x9486, 0x0400, 0x0120,
-	0x9486, 0x1000, 0x1904, 0xc95a, 0x2019, 0x0002, 0x080c, 0xd19a,
-	0x0804, 0xc95a, 0x2069, 0x1a3f, 0x6a00, 0xd284, 0x0904, 0xc9c4,
-	0x9284, 0x0300, 0x1904, 0xc9bd, 0x6804, 0x9005, 0x0904, 0xc9a5,
-	0x2d78, 0x6003, 0x0007, 0x080c, 0x103b, 0x0904, 0xc966, 0x7800,
+	0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x6991,
+	0x001e, 0x080c, 0xd58e, 0x1904, 0xc96a, 0x9486, 0x2000, 0x1130,
+	0x2019, 0x0017, 0x080c, 0xd1fc, 0x0804, 0xc96a, 0x9486, 0x0200,
+	0x1120, 0x080c, 0xd18c, 0x0804, 0xc96a, 0x9486, 0x0400, 0x0120,
+	0x9486, 0x1000, 0x1904, 0xc96a, 0x2019, 0x0002, 0x080c, 0xd1ab,
+	0x0804, 0xc96a, 0x2069, 0x1a3e, 0x6a00, 0xd284, 0x0904, 0xc9d4,
+	0x9284, 0x0300, 0x1904, 0xc9cd, 0x6804, 0x9005, 0x0904, 0xc9b5,
+	0x2d78, 0x6003, 0x0007, 0x080c, 0x103b, 0x0904, 0xc976, 0x7800,
 	0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000, 0x2001,
-	0x180f, 0x2004, 0xd084, 0x1904, 0xc9c8, 0x9006, 0xa802, 0xa867,
+	0x180f, 0x2004, 0xd084, 0x1904, 0xc9d8, 0x9006, 0xa802, 0xa867,
 	0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058,
 	0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be,
 	0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084,
-	0x0003, 0x9080, 0xc962, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001,
+	0x0003, 0x9080, 0xc972, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001,
 	0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b, 0x0080,
 	0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b,
 	0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae,
-	0x080c, 0x6999, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be,
+	0x080c, 0x6994, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be,
 	0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001, 0x1810,
-	0x2004, 0xd084, 0x0120, 0x080c, 0x1022, 0x1904, 0xc90f, 0x6017,
+	0x2004, 0xd084, 0x0120, 0x080c, 0x1022, 0x1904, 0xc91f, 0x6017,
 	0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c,
-	0x84d1, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086,
+	0x84b3, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086,
 	0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114, 0x918c,
 	0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043,
-	0x2009, 0xa025, 0x080c, 0x84d1, 0x0828, 0x6868, 0x602e, 0x686c,
+	0x2009, 0xa025, 0x080c, 0x84b3, 0x0828, 0x6868, 0x602e, 0x686c,
 	0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009,
-	0xa022, 0x080c, 0x84d1, 0x0804, 0xc95a, 0x2001, 0x180e, 0x2004,
-	0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48d8, 0x6017, 0xf300,
+	0xa022, 0x080c, 0x84b3, 0x0804, 0xc96a, 0x2001, 0x180e, 0x2004,
+	0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48da, 0x6017, 0xf300,
 	0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009,
-	0xa022, 0x080c, 0x84d1, 0x0804, 0xc95a, 0x6017, 0xf500, 0x0c98,
-	0x6017, 0xf600, 0x0804, 0xc97a, 0x6017, 0xf200, 0x0804, 0xc97a,
+	0xa022, 0x080c, 0x84b3, 0x0804, 0xc96a, 0x6017, 0xf500, 0x0c98,
+	0x6017, 0xf600, 0x0804, 0xc98a, 0x6017, 0xf200, 0x0804, 0xc98a,
 	0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a,
-	0x7044, 0x9084, 0x0003, 0x9080, 0xc962, 0x2005, 0xa87e, 0x2928,
+	0x7044, 0x9084, 0x0003, 0x9080, 0xc972, 0x2005, 0xa87e, 0x2928,
 	0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e,
 	0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009, 0x0205,
 	0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011, 0x0210,
 	0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0d65,
 	0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0029, 0x20a0, 0x2011, 0xca44, 0x2041, 0x0001, 0x223d,
+	0x9080, 0x0029, 0x20a0, 0x2011, 0xca54, 0x2041, 0x0001, 0x223d,
 	0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003, 0x931a,
 	0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260,
 	0x2098, 0x0c68, 0x2950, 0x080c, 0x103b, 0x0170, 0x2900, 0xb002,
 	0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080,
 	0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d, 0x0118,
-	0x080c, 0x1054, 0x0cc8, 0x080c, 0x1054, 0x0804, 0xc966, 0x2548,
+	0x080c, 0x1054, 0x0cc8, 0x080c, 0x1054, 0x0804, 0xc976, 0x2548,
 	0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b, 0x0000,
-	0x080c, 0xd21e, 0x0804, 0xc95a, 0x8010, 0x0004, 0x801a, 0x0006,
+	0x080c, 0xd22f, 0x0804, 0xc96a, 0x8010, 0x0004, 0x801a, 0x0006,
 	0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013, 0x1160,
 	0x6004, 0x908a, 0x0057, 0x1a0c, 0x0d65, 0x9082, 0x0040, 0x0a0c,
-	0x0d65, 0x2008, 0x0804, 0xcacf, 0x9186, 0x0051, 0x0108, 0x0040,
-	0x080c, 0x9ab7, 0x01e8, 0x9086, 0x0002, 0x0904, 0xcb16, 0x00c0,
+	0x0d65, 0x2008, 0x0804, 0xcadf, 0x9186, 0x0051, 0x0108, 0x0040,
+	0x080c, 0x9aaa, 0x01e8, 0x9086, 0x0002, 0x0904, 0xcb26, 0x00c0,
 	0x9186, 0x0027, 0x0180, 0x9186, 0x0048, 0x0128, 0x9186, 0x0014,
-	0x0150, 0x190c, 0x0d65, 0x080c, 0x9ab7, 0x0150, 0x9086, 0x0004,
-	0x0904, 0xcbb3, 0x0028, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a,
-	0x080c, 0x9ca2, 0x0005, 0xca96, 0xca98, 0xca98, 0xcabf, 0xca96,
-	0xca96, 0xca96, 0xca96, 0xca96, 0xca96, 0xca96, 0xca96, 0xca96,
-	0xca96, 0xca96, 0xca96, 0xca96, 0xca96, 0xca96, 0x080c, 0x0d65,
-	0x080c, 0x8874, 0x080c, 0x8936, 0x0036, 0x0096, 0x6014, 0x904d,
-	0x01d8, 0x080c, 0xb847, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6,
+	0x0150, 0x190c, 0x0d65, 0x080c, 0x9aaa, 0x0150, 0x9086, 0x0004,
+	0x0904, 0xcbc3, 0x0028, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a,
+	0x080c, 0x9c93, 0x0005, 0xcaa6, 0xcaa8, 0xcaa8, 0xcacf, 0xcaa6,
+	0xcaa6, 0xcaa6, 0xcaa6, 0xcaa6, 0xcaa6, 0xcaa6, 0xcaa6, 0xcaa6,
+	0xcaa6, 0xcaa6, 0xcaa6, 0xcaa6, 0xcaa6, 0xcaa6, 0x080c, 0x0d65,
+	0x080c, 0x885d, 0x080c, 0x891b, 0x0036, 0x0096, 0x6014, 0x904d,
+	0x01d8, 0x080c, 0xb842, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6,
 	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c,
-	0xd21e, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1958,
+	0xd22f, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1957,
 	0x2004, 0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096,
-	0x080c, 0x8874, 0x080c, 0x8936, 0x080c, 0xb847, 0x0120, 0x6014,
-	0x2048, 0x080c, 0x1054, 0x080c, 0x9c21, 0x009e, 0x0005, 0x0002,
-	0xcae3, 0xcaf8, 0xcae5, 0xcb0d, 0xcae3, 0xcae3, 0xcae3, 0xcae3,
-	0xcae3, 0xcae3, 0xcae3, 0xcae3, 0xcae3, 0xcae3, 0xcae3, 0xcae3,
-	0xcae3, 0xcae3, 0xcae3, 0x080c, 0x0d65, 0x0096, 0x6014, 0x2048,
+	0x080c, 0x885d, 0x080c, 0x891b, 0x080c, 0xb842, 0x0120, 0x6014,
+	0x2048, 0x080c, 0x1054, 0x080c, 0x9c14, 0x009e, 0x0005, 0x0002,
+	0xcaf3, 0xcb08, 0xcaf5, 0xcb1d, 0xcaf3, 0xcaf3, 0xcaf3, 0xcaf3,
+	0xcaf3, 0xcaf3, 0xcaf3, 0xcaf3, 0xcaf3, 0xcaf3, 0xcaf3, 0xcaf3,
+	0xcaf3, 0xcaf3, 0xcaf3, 0x080c, 0x0d65, 0x0096, 0x6014, 0x2048,
 	0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043, 0x080c,
-	0x9c85, 0x0010, 0x6003, 0x0004, 0x080c, 0x8936, 0x009e, 0x0005,
-	0x080c, 0xb847, 0x0138, 0x6114, 0x0096, 0x2148, 0xa97c, 0x009e,
-	0xd1ec, 0x1138, 0x080c, 0x83c0, 0x080c, 0x9be7, 0x080c, 0x8936,
-	0x0005, 0x080c, 0xd476, 0x0db0, 0x0cc8, 0x6003, 0x0001, 0x6007,
-	0x0041, 0x2009, 0xa022, 0x080c, 0x84d1, 0x0005, 0x9182, 0x0040,
-	0x0002, 0xcb2c, 0xcb2e, 0xcb2c, 0xcb2c, 0xcb2c, 0xcb2c, 0xcb2c,
-	0xcb2c, 0xcb2c, 0xcb2c, 0xcb2c, 0xcb2c, 0xcb2c, 0xcb2c, 0xcb2c,
-	0xcb2c, 0xcb2c, 0xcb2f, 0xcb2c, 0x080c, 0x0d65, 0x0005, 0x00d6,
-	0x080c, 0x83c0, 0x00de, 0x080c, 0xd4ce, 0x080c, 0x9be7, 0x0005,
-	0x9182, 0x0040, 0x0002, 0xcb4e, 0xcb4e, 0xcb4e, 0xcb4e, 0xcb4e,
-	0xcb4e, 0xcb4e, 0xcb4e, 0xcb4e, 0xcb50, 0xcb7b, 0xcb4e, 0xcb4e,
-	0xcb4e, 0xcb4e, 0xcb7b, 0xcb4e, 0xcb4e, 0xcb4e, 0x080c, 0x0d65,
+	0x9c76, 0x0010, 0x6003, 0x0004, 0x080c, 0x891b, 0x009e, 0x0005,
+	0x080c, 0xb842, 0x0138, 0x6114, 0x0096, 0x2148, 0xa97c, 0x009e,
+	0xd1ec, 0x1138, 0x080c, 0x83a2, 0x080c, 0x9bda, 0x080c, 0x891b,
+	0x0005, 0x080c, 0xd487, 0x0db0, 0x0cc8, 0x6003, 0x0001, 0x6007,
+	0x0041, 0x2009, 0xa022, 0x080c, 0x84b3, 0x0005, 0x9182, 0x0040,
+	0x0002, 0xcb3c, 0xcb3e, 0xcb3c, 0xcb3c, 0xcb3c, 0xcb3c, 0xcb3c,
+	0xcb3c, 0xcb3c, 0xcb3c, 0xcb3c, 0xcb3c, 0xcb3c, 0xcb3c, 0xcb3c,
+	0xcb3c, 0xcb3c, 0xcb3f, 0xcb3c, 0x080c, 0x0d65, 0x0005, 0x00d6,
+	0x080c, 0x83a2, 0x00de, 0x080c, 0xd4df, 0x080c, 0x9bda, 0x0005,
+	0x9182, 0x0040, 0x0002, 0xcb5e, 0xcb5e, 0xcb5e, 0xcb5e, 0xcb5e,
+	0xcb5e, 0xcb5e, 0xcb5e, 0xcb5e, 0xcb60, 0xcb8b, 0xcb5e, 0xcb5e,
+	0xcb5e, 0xcb5e, 0xcb8b, 0xcb5e, 0xcb5e, 0xcb5e, 0x080c, 0x0d65,
 	0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x908c, 0x0003,
 	0x918e, 0x0002, 0x0180, 0x6144, 0xd1e4, 0x1168, 0x2009, 0x0041,
-	0x009e, 0x0804, 0xcc3b, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c,
-	0x83c0, 0x009e, 0x0005, 0x6014, 0x2048, 0xa97c, 0xd1ec, 0x1130,
-	0x080c, 0x83c0, 0x080c, 0x9be7, 0x009e, 0x0005, 0x080c, 0xd476,
+	0x009e, 0x0804, 0xcc4b, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c,
+	0x83a2, 0x009e, 0x0005, 0x6014, 0x2048, 0xa97c, 0xd1ec, 0x1130,
+	0x080c, 0x83a2, 0x080c, 0x9bda, 0x009e, 0x0005, 0x080c, 0xd487,
 	0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102,
-	0x0036, 0x080c, 0x88d1, 0x080c, 0x8936, 0x6014, 0x0096, 0x2048,
+	0x0036, 0x080c, 0x88b8, 0x080c, 0x891b, 0x6014, 0x0096, 0x2048,
 	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0188, 0xa87c,
 	0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac, 0x6330, 0x931a,
 	0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003, 0x0002, 0x0080,
-	0x2019, 0x0004, 0x080c, 0xd21e, 0x6018, 0x9005, 0x1128, 0x2001,
-	0x1958, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000, 0x6003, 0x0007,
-	0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002, 0xcbca, 0xcbca,
-	0xcbca, 0xcbca, 0xcbca, 0xcbca, 0xcbca, 0xcbca, 0xcbcc, 0xcbca,
-	0xcbca, 0xcbca, 0xcbca, 0xcbca, 0xcbca, 0xcbca, 0xcbca, 0xcbca,
-	0xcbca, 0xcc17, 0x080c, 0x0d65, 0x6014, 0x0096, 0x2048, 0xa834,
+	0x2019, 0x0004, 0x080c, 0xd22f, 0x6018, 0x9005, 0x1128, 0x2001,
+	0x1957, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000, 0x6003, 0x0007,
+	0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002, 0xcbda, 0xcbda,
+	0xcbda, 0xcbda, 0xcbda, 0xcbda, 0xcbda, 0xcbda, 0xcbdc, 0xcbda,
+	0xcbda, 0xcbda, 0xcbda, 0xcbda, 0xcbda, 0xcbda, 0xcbda, 0xcbda,
+	0xcbda, 0xcc27, 0x080c, 0x0d65, 0x6014, 0x0096, 0x2048, 0xa834,
 	0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1190,
 	0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009, 0x0041, 0x009e,
-	0x0804, 0xcc3b, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c, 0x83c0,
+	0x0804, 0xcc4b, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c, 0x83a2,
 	0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006, 0x0046, 0xacac,
 	0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420, 0x6432, 0x602c,
 	0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110, 0x00b6, 0x2158,
 	0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e, 0x210c, 0xd19c,
 	0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006, 0x00e9, 0x080c,
-	0x83c2, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e, 0x0005, 0x6024,
-	0xd0f4, 0x0128, 0x080c, 0x1595, 0x1904, 0xcbcc, 0x0005, 0x6014,
+	0x83a4, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e, 0x0005, 0x6024,
+	0xd0f4, 0x0128, 0x080c, 0x15a2, 0x1904, 0xcbdc, 0x0005, 0x6014,
 	0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105, 0x1120, 0x080c,
-	0x1595, 0x1904, 0xcbcc, 0x0005, 0xd2fc, 0x0140, 0x8002, 0x8000,
+	0x15a2, 0x1904, 0xcbdc, 0x0005, 0xd2fc, 0x0140, 0x8002, 0x8000,
 	0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010, 0x2009, 0x0015,
 	0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208, 0x0062, 0x9186,
 	0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0d65, 0x6024, 0xd0dc,
-	0x090c, 0x0d65, 0x0005, 0xcc5e, 0xcc6a, 0xcc76, 0xcc82, 0xcc5e,
-	0xcc5e, 0xcc5e, 0xcc5e, 0xcc65, 0xcc60, 0xcc60, 0xcc5e, 0xcc5e,
-	0xcc5e, 0xcc5e, 0xcc60, 0xcc5e, 0xcc60, 0xcc5e, 0x080c, 0x0d65,
+	0x090c, 0x0d65, 0x0005, 0xcc6e, 0xcc7a, 0xcc86, 0xcc92, 0xcc6e,
+	0xcc6e, 0xcc6e, 0xcc6e, 0xcc75, 0xcc70, 0xcc70, 0xcc6e, 0xcc6e,
+	0xcc6e, 0xcc6e, 0xcc70, 0xcc6e, 0xcc70, 0xcc6e, 0x080c, 0x0d65,
 	0x6024, 0xd0dc, 0x090c, 0x0d65, 0x0005, 0x6014, 0x9005, 0x190c,
 	0x0d65, 0x0005, 0x6003, 0x0001, 0x6106, 0x0126, 0x2091, 0x8000,
-	0x2009, 0xa022, 0x080c, 0x84b3, 0x012e, 0x0005, 0x6003, 0x0004,
-	0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa001, 0x080c, 0x84d1,
-	0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x080c, 0x1aa5, 0x0126,
+	0x2009, 0xa022, 0x080c, 0x8495, 0x012e, 0x0005, 0x6003, 0x0004,
+	0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa001, 0x080c, 0x84b3,
+	0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x080c, 0x1ab2, 0x0126,
 	0x2091, 0x8000, 0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0188,
 	0x9084, 0x0003, 0x9086, 0x0002, 0x01a0, 0x6024, 0xd0cc, 0x1148,
 	0xd0c4, 0x1138, 0xa8a8, 0x9005, 0x1120, 0x6144, 0x918d, 0xb035,
-	0x0018, 0x6144, 0x918d, 0xa035, 0x009e, 0x080c, 0x8518, 0x012e,
+	0x0018, 0x6144, 0x918d, 0xa035, 0x009e, 0x080c, 0x84fa, 0x012e,
 	0x0005, 0x6144, 0x918d, 0xa032, 0x0cb8, 0x0126, 0x2091, 0x8000,
 	0x0036, 0x0096, 0x9182, 0x0040, 0x0023, 0x009e, 0x003e, 0x012e,
-	0x0005, 0xccc9, 0xcccb, 0xcce0, 0xccfa, 0xccc9, 0xccc9, 0xccc9,
-	0xccc9, 0xccc9, 0xccc9, 0xccc9, 0xccc9, 0xccc9, 0xccc9, 0xccc9,
-	0xccc9, 0x080c, 0x0d65, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0510,
+	0x0005, 0xccd9, 0xccdb, 0xccf0, 0xcd0a, 0xccd9, 0xccd9, 0xccd9,
+	0xccd9, 0xccd9, 0xccd9, 0xccd9, 0xccd9, 0xccd9, 0xccd9, 0xccd9,
+	0xccd9, 0x080c, 0x0d65, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0510,
 	0x909c, 0x0003, 0x939e, 0x0003, 0x01e8, 0x6003, 0x0001, 0x6106,
-	0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x84d1, 0x0470,
+	0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x84b3, 0x0470,
 	0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, 0x939e,
 	0x0003, 0x0140, 0x6003, 0x0001, 0x6106, 0x2009, 0xa001, 0x080c,
-	0x84d1, 0x00e0, 0x901e, 0x6316, 0x631a, 0x2019, 0x0004, 0x080c,
-	0xd21e, 0x00a0, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c,
+	0x84b3, 0x00e0, 0x901e, 0x6316, 0x631a, 0x2019, 0x0004, 0x080c,
+	0xd22f, 0x00a0, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c,
 	0x0003, 0x939e, 0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, 0x080c,
-	0x1aa5, 0x6144, 0x918d, 0xa035, 0x080c, 0x8518, 0x0005, 0x080c,
-	0x8874, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xd51a,
-	0x0036, 0x2019, 0x0029, 0x080c, 0xd21e, 0x003e, 0x009e, 0x080c,
-	0x9c21, 0x080c, 0x8936, 0x0005, 0x080c, 0x88d1, 0x6114, 0x81ff,
-	0x0158, 0x0096, 0x2148, 0x080c, 0xd51a, 0x0036, 0x2019, 0x0029,
-	0x080c, 0xd21e, 0x003e, 0x009e, 0x080c, 0x9c21, 0x0005, 0x9182,
-	0x0085, 0x0002, 0xcd49, 0xcd47, 0xcd47, 0xcd55, 0xcd47, 0xcd47,
-	0xcd47, 0xcd47, 0xcd47, 0xcd47, 0xcd47, 0xcd47, 0xcd47, 0x080c,
+	0x1ab2, 0x6144, 0x918d, 0xa035, 0x080c, 0x84fa, 0x0005, 0x080c,
+	0x885d, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xd52b,
+	0x0036, 0x2019, 0x0029, 0x080c, 0xd22f, 0x003e, 0x009e, 0x080c,
+	0x9c14, 0x080c, 0x891b, 0x0005, 0x080c, 0x88b8, 0x6114, 0x81ff,
+	0x0158, 0x0096, 0x2148, 0x080c, 0xd52b, 0x0036, 0x2019, 0x0029,
+	0x080c, 0xd22f, 0x003e, 0x009e, 0x080c, 0x9c14, 0x0005, 0x9182,
+	0x0085, 0x0002, 0xcd59, 0xcd57, 0xcd57, 0xcd65, 0xcd57, 0xcd57,
+	0xcd57, 0xcd57, 0xcd57, 0xcd57, 0xcd57, 0xcd57, 0xcd57, 0x080c,
 	0x0d65, 0x6003, 0x000b, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009,
-	0x8020, 0x080c, 0x84d1, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c,
-	0xd46d, 0x0118, 0x080c, 0x9be7, 0x0440, 0x2071, 0x0260, 0x7224,
+	0x8020, 0x080c, 0x84b3, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c,
+	0xd47e, 0x0118, 0x080c, 0x9bda, 0x0440, 0x2071, 0x0260, 0x7224,
 	0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6,
-	0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0x9f13,
-	0x7220, 0x080c, 0xd0b4, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007,
+	0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0x9f04,
+	0x7220, 0x080c, 0xd0c5, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007,
 	0x0087, 0x7224, 0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x84d1, 0x00ee, 0x002e, 0x0005,
+	0x0001, 0x2009, 0x8020, 0x080c, 0x84b3, 0x00ee, 0x002e, 0x0005,
 	0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d65,
 	0x908a, 0x0092, 0x1a0c, 0x0d65, 0x9082, 0x0085, 0x00a2, 0x9186,
-	0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0x9ca2, 0x0050,
-	0x2001, 0x0007, 0x080c, 0x61ed, 0x080c, 0x8874, 0x080c, 0x9c21,
-	0x080c, 0x8936, 0x0005, 0xcdb8, 0xcdba, 0xcdba, 0xcdb8, 0xcdb8,
-	0xcdb8, 0xcdb8, 0xcdb8, 0xcdb8, 0xcdb8, 0xcdb8, 0xcdb8, 0xcdb8,
-	0x080c, 0x0d65, 0x080c, 0x9c21, 0x080c, 0x8936, 0x0005, 0x9182,
+	0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0x9c93, 0x0050,
+	0x2001, 0x0007, 0x080c, 0x61e8, 0x080c, 0x885d, 0x080c, 0x9c14,
+	0x080c, 0x891b, 0x0005, 0xcdc8, 0xcdca, 0xcdca, 0xcdc8, 0xcdc8,
+	0xcdc8, 0xcdc8, 0xcdc8, 0xcdc8, 0xcdc8, 0xcdc8, 0xcdc8, 0xcdc8,
+	0x080c, 0x0d65, 0x080c, 0x9c14, 0x080c, 0x891b, 0x0005, 0x9182,
 	0x0085, 0x0a0c, 0x0d65, 0x9182, 0x0092, 0x1a0c, 0x0d65, 0x9182,
-	0x0085, 0x0002, 0xcdd7, 0xcdd7, 0xcdd7, 0xcdd9, 0xcdd7, 0xcdd7,
-	0xcdd7, 0xcdd7, 0xcdd7, 0xcdd7, 0xcdd7, 0xcdd7, 0xcdd7, 0x080c,
+	0x0085, 0x0002, 0xcde7, 0xcde7, 0xcde7, 0xcde9, 0xcde7, 0xcde7,
+	0xcde7, 0xcde7, 0xcde7, 0xcde7, 0xcde7, 0xcde7, 0xcde7, 0x080c,
 	0x0d65, 0x0005, 0x9186, 0x0013, 0x0148, 0x9186, 0x0014, 0x0130,
-	0x9186, 0x0027, 0x0118, 0x080c, 0x9ca2, 0x0020, 0x080c, 0x8874,
-	0x080c, 0x9c21, 0x0005, 0x0036, 0x080c, 0xd4ce, 0x604b, 0x0000,
+	0x9186, 0x0027, 0x0118, 0x080c, 0x9c93, 0x0020, 0x080c, 0x885d,
+	0x080c, 0x9c14, 0x0005, 0x0036, 0x080c, 0xd4df, 0x604b, 0x0000,
 	0x2019, 0x000b, 0x0031, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e,
 	0x0005, 0x0126, 0x0036, 0x2091, 0x8000, 0x2001, 0x0382, 0x2004,
-	0x9084, 0x0007, 0x0006, 0x9086, 0x0003, 0x0110, 0x080c, 0x98c8,
-	0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0x9382, 0x009e, 0x008e,
-	0x1550, 0x0076, 0x2c38, 0x080c, 0x942d, 0x007e, 0x1520, 0x6000,
-	0x9086, 0x0000, 0x0500, 0x6020, 0x9086, 0x0007, 0x01e0, 0x0096,
-	0x601c, 0xd084, 0x0140, 0x080c, 0xd4ce, 0x080c, 0xbf79, 0x080c,
-	0x1914, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xb847, 0x0110,
-	0x080c, 0xd21e, 0x009e, 0x6017, 0x0000, 0x080c, 0xd4ce, 0x6023,
-	0x0007, 0x080c, 0xbf79, 0x000e, 0x9086, 0x0003, 0x0110, 0x080c,
-	0x98e4, 0x003e, 0x012e, 0x0005, 0x00f6, 0x00c6, 0x00b6, 0x0036,
-	0x0156, 0x2079, 0x0260, 0x7938, 0x783c, 0x080c, 0x2424, 0x15e8,
-	0x0016, 0x00c6, 0x080c, 0x6270, 0x15b0, 0x001e, 0x00c6, 0x2160,
-	0x080c, 0xbf76, 0x00ce, 0x002e, 0x0026, 0x0016, 0x080c, 0x98c8,
-	0x2019, 0x0029, 0x080c, 0x94f4, 0x080c, 0x863b, 0x0076, 0x903e,
-	0x080c, 0x852a, 0x007e, 0x001e, 0x0076, 0x903e, 0x080c, 0xcfc8,
-	0x007e, 0x080c, 0x98e4, 0x0026, 0xba04, 0x9294, 0xff00, 0x8217,
-	0x9286, 0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0, 0x080c,
-	0x30dc, 0x002e, 0xbc84, 0x001e, 0x080c, 0x5cf6, 0xbe12, 0xbd16,
-	0xbc86, 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e, 0x00be,
-	0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016, 0x2009,
-	0x1823, 0x2104, 0x9086, 0x0074, 0x1904, 0xceec, 0x2069, 0x0260,
-	0x6944, 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000, 0x0904,
-	0xcee9, 0x2001, 0x194d, 0x2004, 0x9005, 0x1140, 0x6010, 0x2058,
-	0xb884, 0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948, 0x918a,
-	0x0001, 0x0648, 0x080c, 0xd582, 0x0118, 0x6978, 0xd1fc, 0x11b8,
-	0x2009, 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198, 0x6944,
-	0x9182, 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948, 0x918a,
-	0x0001, 0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0, 0x6017,
-	0x0100, 0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500, 0x0070,
-	0x6017, 0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017, 0x0b00,
-	0x0028, 0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085, 0x0001,
-	0x0008, 0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005, 0x00c6,
-	0x00b6, 0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04, 0x9394,
-	0x00ff, 0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168, 0x9394,
-	0xff00, 0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004, 0x0120,
-	0x080c, 0x627f, 0x0804, 0xcf57, 0x2011, 0x0276, 0x20a9, 0x0004,
-	0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xabdf, 0x009e, 0x15c0,
-	0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006,
-	0x080c, 0xabdf, 0x009e, 0x1560, 0x0046, 0x0016, 0xbaa0, 0x2220,
-	0x9006, 0x2009, 0x1854, 0x210c, 0x0038, 0x2009, 0x0029, 0x080c,
-	0xd273, 0xb800, 0xc0e5, 0xb802, 0x080c, 0x98c8, 0x2019, 0x0029,
-	0x080c, 0x863b, 0x0076, 0x2039, 0x0000, 0x080c, 0x852a, 0x2c08,
-	0x080c, 0xcfc8, 0x007e, 0x080c, 0x98e4, 0x2001, 0x0007, 0x080c,
-	0x61ed, 0x2001, 0x0007, 0x080c, 0x61c1, 0x001e, 0x004e, 0x9006,
-	0x015e, 0x003e, 0x002e, 0x00be, 0x00ce, 0x0005, 0x00d6, 0x2069,
-	0x026e, 0x6800, 0x9086, 0x0800, 0x0118, 0x6017, 0x0000, 0x0008,
-	0x9006, 0x00de, 0x0005, 0x00b6, 0x00f6, 0x0016, 0x0026, 0x0036,
-	0x0156, 0x2079, 0x026c, 0x7930, 0x7834, 0x080c, 0x2424, 0x11d0,
-	0x080c, 0x6270, 0x11b8, 0x2011, 0x0270, 0x20a9, 0x0004, 0x0096,
-	0x2b48, 0x2019, 0x000a, 0x080c, 0xabdf, 0x009e, 0x1158, 0x2011,
-	0x0274, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c,
-	0xabdf, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x00fe, 0x00be,
-	0x0005, 0x00b6, 0x0006, 0x0016, 0x0026, 0x0036, 0x0156, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2424, 0x11d0, 0x080c,
-	0x6270, 0x11b8, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48,
-	0x2019, 0x000a, 0x080c, 0xabdf, 0x009e, 0x1158, 0x2011, 0x027a,
-	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xabdf,
-	0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x000e, 0x00be, 0x0005,
-	0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x9926, 0x0106, 0x190c, 0x98c8,
-	0x2740, 0x2029, 0x19c4, 0x252c, 0x2021, 0x19cb, 0x2424, 0x2061,
-	0x1ddc, 0x2071, 0x1800, 0x7650, 0x7070, 0x81ff, 0x0150, 0x0006,
-	0x9186, 0x1b02, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04, 0xd069,
-	0x0018, 0x9606, 0x0904, 0xd069, 0x2100, 0x9c06, 0x0904, 0xd060,
-	0x080c, 0xd2b4, 0x1904, 0xd060, 0x080c, 0xd59f, 0x0904, 0xd060,
-	0x080c, 0xd2a4, 0x0904, 0xd060, 0x6720, 0x9786, 0x0001, 0x1148,
-	0x080c, 0x3181, 0x0904, 0xd088, 0x6004, 0x9086, 0x0000, 0x1904,
-	0xd088, 0x9786, 0x0004, 0x0904, 0xd088, 0x9786, 0x0007, 0x0904,
-	0xd060, 0x2500, 0x9c06, 0x0904, 0xd060, 0x2400, 0x9c06, 0x0904,
-	0xd060, 0x88ff, 0x0118, 0x605c, 0x9906, 0x15d0, 0x0096, 0x6043,
-	0xffff, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1914,
-	0x001e, 0x9786, 0x000a, 0x0148, 0x080c, 0xba5c, 0x1130, 0x080c,
-	0xa58f, 0x009e, 0x080c, 0x9c21, 0x0418, 0x6014, 0x2048, 0x080c,
-	0xb847, 0x01d8, 0x9786, 0x0003, 0x1588, 0xa867, 0x0103, 0xa87c,
-	0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fd4, 0x009e,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0xd51a, 0x0016, 0x080c, 0xbb45,
-	0x080c, 0x698a, 0x001e, 0x080c, 0xba36, 0x009e, 0x080c, 0x9c21,
-	0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1210, 0x0804,
-	0xcfe1, 0x010e, 0x190c, 0x98e4, 0x012e, 0x002e, 0x004e, 0x005e,
-	0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, 0x9786, 0x0006,
-	0x1150, 0x9386, 0x0005, 0x0128, 0x080c, 0xd51a, 0x080c, 0xd21e,
-	0x08e0, 0x009e, 0x08e8, 0x9786, 0x000a, 0x0908, 0x0804, 0xd045,
-	0x81ff, 0x09b0, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018, 0x0130,
-	0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1950, 0x6000, 0x9086,
-	0x0002, 0x1930, 0x080c, 0xba4b, 0x0130, 0x080c, 0xba5c, 0x1900,
-	0x080c, 0xa58f, 0x0038, 0x080c, 0x303b, 0x080c, 0xba5c, 0x1110,
-	0x080c, 0xa58f, 0x080c, 0x9c21, 0x0804, 0xd060, 0xa864, 0x9084,
-	0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016, 0x2c08,
-	0x2170, 0x9006, 0x080c, 0xd245, 0x001e, 0x0120, 0x6020, 0x9084,
-	0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, 0xd0d3, 0xd0d3, 0xd0d3,
-	0xd0d3, 0xd0d3, 0xd0d3, 0xd0d5, 0xd0d3, 0xd0d3, 0xd0d3, 0xd0d3,
-	0x9c21, 0x9c21, 0xd0d3, 0x9006, 0x0005, 0x0036, 0x0046, 0x0016,
-	0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009, 0x0020,
-	0x080c, 0xd273, 0x001e, 0x004e, 0x2019, 0x0002, 0x080c, 0xcdf9,
-	0x003e, 0x9085, 0x0001, 0x0005, 0x0096, 0x080c, 0xb847, 0x0140,
-	0x6014, 0x904d, 0x080c, 0xb452, 0x687b, 0x0005, 0x080c, 0x6996,
-	0x009e, 0x080c, 0x9c21, 0x9085, 0x0001, 0x0005, 0x2001, 0x0001,
-	0x080c, 0x61ad, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004,
-	0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xabcb, 0x003e, 0x002e,
-	0x001e, 0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086,
-	0x0076, 0x0066, 0x00b6, 0x0126, 0x2091, 0x8000, 0x2740, 0x2061,
-	0x1ddc, 0x2079, 0x0001, 0x8fff, 0x0904, 0xd16e, 0x2071, 0x1800,
-	0x7650, 0x7070, 0x8001, 0x9602, 0x1a04, 0xd16e, 0x88ff, 0x0120,
-	0x2800, 0x9c06, 0x1590, 0x2078, 0x080c, 0xd2a4, 0x0570, 0x2400,
-	0x9c06, 0x0558, 0x6720, 0x9786, 0x0006, 0x1538, 0x9786, 0x0007,
-	0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06, 0x11f8, 0x85ff, 0x0118,
-	0x605c, 0x9106, 0x11d0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c,
-	0xd4ce, 0x080c, 0xbf79, 0x080c, 0x1914, 0x6023, 0x0007, 0x6014,
-	0x2048, 0x080c, 0xb847, 0x0120, 0x0046, 0x080c, 0xd21e, 0x004e,
-	0x009e, 0x080c, 0x9c21, 0x88ff, 0x1198, 0x9ce0, 0x001c, 0x2001,
-	0x1819, 0x2004, 0x9c02, 0x1210, 0x0804, 0xd123, 0x9006, 0x012e,
-	0x00be, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005,
-	0x98c5, 0x0001, 0x0ca0, 0x080c, 0x98c8, 0x00b6, 0x0076, 0x0056,
-	0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, 0x6210,
-	0x2258, 0x0096, 0x904e, 0x080c, 0x9382, 0x009e, 0x008e, 0x903e,
-	0x080c, 0x942d, 0x080c, 0xd114, 0x005e, 0x007e, 0x00be, 0x080c,
-	0x98e4, 0x0005, 0x080c, 0x98c8, 0x00b6, 0x0046, 0x0056, 0x0076,
-	0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e, 0x0016,
-	0x0036, 0x080c, 0x6270, 0x1190, 0x0056, 0x0086, 0x9046, 0x2508,
-	0x2029, 0x0001, 0x0096, 0x904e, 0x080c, 0x9382, 0x009e, 0x008e,
-	0x903e, 0x080c, 0x942d, 0x080c, 0xd114, 0x005e, 0x003e, 0x001e,
-	0x8108, 0x1f04, 0xd1a7, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e,
-	0x00be, 0x080c, 0x98e4, 0x0005, 0x080c, 0x98c8, 0x00b6, 0x0076,
-	0x0056, 0x6210, 0x2258, 0x0086, 0x9046, 0x2029, 0x0001, 0x2019,
-	0x0048, 0x0096, 0x904e, 0x080c, 0x9382, 0x009e, 0x008e, 0x903e,
-	0x080c, 0x942d, 0x2c20, 0x080c, 0xd114, 0x005e, 0x007e, 0x00be,
-	0x080c, 0x98e4, 0x0005, 0x080c, 0x98c8, 0x00b6, 0x0046, 0x0056,
-	0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9, 0x0800, 0x900e, 0x0016,
-	0x0036, 0x080c, 0x6270, 0x11a0, 0x0086, 0x9046, 0x2828, 0x0046,
-	0x2021, 0x0001, 0x080c, 0xd4b2, 0x004e, 0x0096, 0x904e, 0x080c,
-	0x9382, 0x009e, 0x008e, 0x903e, 0x080c, 0x942d, 0x080c, 0xd114,
-	0x003e, 0x001e, 0x8108, 0x1f04, 0xd1f7, 0x015e, 0x00ce, 0x007e,
-	0x005e, 0x004e, 0x00be, 0x080c, 0x98e4, 0x0005, 0x0016, 0x00f6,
-	0x080c, 0xb845, 0x0198, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0046,
-	0x0180, 0xa800, 0x907d, 0x0138, 0xa803, 0x0000, 0xab82, 0x080c,
-	0x6996, 0x2f48, 0x0cb0, 0xab82, 0x080c, 0x6996, 0x00fe, 0x001e,
-	0x0005, 0xa800, 0x907d, 0x0130, 0xa803, 0x0000, 0x080c, 0x6996,
-	0x2f48, 0x0cb8, 0x080c, 0x6996, 0x0c88, 0x00e6, 0x0046, 0x0036,
-	0x2061, 0x1ddc, 0x9005, 0x1138, 0x2071, 0x1800, 0x7450, 0x7070,
-	0x8001, 0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000, 0x9086,
-	0x0000, 0x0148, 0x6008, 0x9206, 0x1130, 0x6010, 0x91a0, 0x0004,
-	0x2424, 0x9406, 0x0140, 0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x1220, 0x0c40, 0x9085, 0x0001, 0x0008, 0x9006, 0x003e,
-	0x004e, 0x00ee, 0x0005, 0x0096, 0x0006, 0x080c, 0x1022, 0x000e,
-	0x090c, 0x0d65, 0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026, 0x2010,
-	0x080c, 0xb835, 0x2001, 0x0000, 0x0120, 0x2200, 0x9080, 0x0017,
-	0x2004, 0x002e, 0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3, 0xffff,
-	0xa986, 0xac76, 0xa87f, 0x0000, 0x2001, 0x195f, 0x2004, 0xa882,
-	0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6996, 0x012e, 0x009e, 0x0005, 0x6700, 0x9786, 0x0000, 0x0158,
-	0x9786, 0x0001, 0x0140, 0x9786, 0x000a, 0x0128, 0x9786, 0x0009,
-	0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x6010, 0x9075, 0x0138,
-	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005, 0x9085,
-	0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e, 0x11a0, 0x8007,
-	0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003,
-	0x000b, 0x6023, 0x0005, 0x2001, 0x1958, 0x2004, 0x601a, 0x2009,
-	0x8020, 0x080c, 0x84d1, 0x001e, 0x0005, 0xa001, 0xa001, 0x0005,
-	0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c, 0xbb8c, 0x0030,
-	0x080c, 0xd4ce, 0x080c, 0x83c0, 0x080c, 0x9be7, 0x0005, 0x9280,
-	0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd303, 0xd303, 0xd303,
-	0xd305, 0xd303, 0xd305, 0xd305, 0xd303, 0xd305, 0xd303, 0xd303,
-	0xd303, 0xd303, 0xd303, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005,
-	0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd31c, 0xd31c,
-	0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd329, 0xd31c, 0xd31c, 0xd31c,
-	0xd31c, 0xd31c, 0xd31c, 0xd31c, 0x6007, 0x003b, 0x602f, 0x0009,
-	0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84d1,
-	0x0005, 0x0096, 0x00c6, 0x2260, 0x080c, 0xd4ce, 0x604b, 0x0000,
-	0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce, 0x00d6,
-	0x2268, 0x9186, 0x0007, 0x1904, 0xd382, 0x6814, 0x9005, 0x0138,
-	0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8, 0x6007,
-	0x003a, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84d1, 0x00c6,
-	0x2d60, 0x6100, 0x9186, 0x0002, 0x1904, 0xd3f9, 0x6014, 0x9005,
-	0x1138, 0x6000, 0x9086, 0x0007, 0x190c, 0x0d65, 0x0804, 0xd3f9,
-	0x2048, 0x080c, 0xb847, 0x1130, 0x0028, 0x2048, 0xa800, 0x9005,
-	0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002,
-	0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc, 0xa882,
-	0x2009, 0x0043, 0x080c, 0xcc3b, 0x0804, 0xd3f9, 0x2009, 0x0041,
-	0x0804, 0xd3f3, 0x9186, 0x0005, 0x15a0, 0x6814, 0x2048, 0xa87c,
-	0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804, 0xd31c, 0xd0b4, 0x0128,
-	0xd0fc, 0x090c, 0x0d65, 0x0804, 0xd33d, 0x6007, 0x003a, 0x6003,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x84d1, 0x00c6, 0x2d60, 0x6100,
-	0x9186, 0x0002, 0x0120, 0x9186, 0x0004, 0x1904, 0xd3f9, 0x6814,
-	0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc, 0xc1bc,
-	0xa982, 0x00f6, 0x2c78, 0x080c, 0x164f, 0x00fe, 0x2009, 0x0042,
-	0x04d0, 0x0036, 0x080c, 0x1022, 0x090c, 0x0d65, 0xa867, 0x010d,
-	0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887, 0x0045,
-	0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd, 0x6026,
-	0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004, 0x635c, 0xab7a,
-	0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f, 0x0001,
-	0x080c, 0x6996, 0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xcdf9,
-	0x2d00, 0x600a, 0x6023, 0x0006, 0x6003, 0x0007, 0x901e, 0x631a,
-	0x634a, 0x003e, 0x0038, 0x604b, 0x0000, 0x6003, 0x0007, 0x080c,
-	0xcc3b, 0x00ce, 0x00de, 0x009e, 0x0005, 0x9186, 0x0013, 0x1128,
-	0x6004, 0x9082, 0x0085, 0x2008, 0x00c2, 0x9186, 0x0027, 0x1178,
-	0x080c, 0x8874, 0x0036, 0x0096, 0x6014, 0x2048, 0x2019, 0x0004,
-	0x080c, 0xd21e, 0x009e, 0x003e, 0x080c, 0x8936, 0x0005, 0x9186,
-	0x0014, 0x0d70, 0x080c, 0x9ca2, 0x0005, 0xd42c, 0xd42a, 0xd42a,
-	0xd42a, 0xd42a, 0xd42a, 0xd42c, 0xd42a, 0xd42a, 0xd42a, 0xd42a,
-	0xd42a, 0xd42a, 0x080c, 0x0d65, 0x6003, 0x000c, 0x080c, 0x8936,
-	0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208, 0x001a,
-	0x080c, 0x9ca2, 0x0005, 0xd448, 0xd448, 0xd448, 0xd448, 0xd44a,
-	0xd46a, 0xd448, 0xd448, 0xd448, 0xd448, 0xd448, 0xd448, 0xd448,
-	0x080c, 0x0d65, 0x00d6, 0x2c68, 0x080c, 0x9b91, 0x01b0, 0x6003,
-	0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009,
-	0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910, 0x6112, 0x6023,
-	0x0004, 0x2009, 0x8020, 0x080c, 0x84d1, 0x2d60, 0x080c, 0x9be7,
-	0x00de, 0x0005, 0x080c, 0x9be7, 0x0005, 0x00e6, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005, 0x2009, 0x1873,
-	0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024, 0xc0e5, 0x6026,
-	0xd0cc, 0x0150, 0x2001, 0x1959, 0x2004, 0x604a, 0x2009, 0x1873,
-	0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x1873, 0x210c, 0xd1f4,
-	0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001, 0x1959,
-	0x200c, 0x2001, 0x1957, 0x2004, 0x9100, 0x9080, 0x000a, 0x604a,
-	0x6010, 0x00b6, 0x2058, 0xb8ac, 0x00be, 0x0008, 0x2104, 0x9005,
-	0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000, 0x9085,
-	0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x615c, 0xb8ac, 0x2060,
-	0x8cff, 0x0180, 0x84ff, 0x1118, 0x605c, 0x9106, 0x1138, 0x600c,
-	0x2072, 0x080c, 0x83c0, 0x080c, 0x9be7, 0x0010, 0x9cf0, 0x0003,
-	0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6, 0x00b6,
-	0x6010, 0x2058, 0xb8ac, 0x2068, 0x9005, 0x0130, 0x9c06, 0x0110,
-	0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de, 0x0005, 0x0026,
-	0x0036, 0x0156, 0x2011, 0x182b, 0x2204, 0x9084, 0x00ff, 0x2019,
-	0x026e, 0x2334, 0x9636, 0x1508, 0x8318, 0x2334, 0x2204, 0x9084,
-	0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9, 0x0004, 0x6010,
-	0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xabdf, 0x009e, 0x1168,
-	0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019,
-	0x0006, 0x080c, 0xabdf, 0x009e, 0x1100, 0x015e, 0x003e, 0x002e,
-	0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c6f, 0x080c, 0x2ddb,
-	0x00ee, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, 0xa880, 0xc0e5, 0xa882,
-	0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0056, 0x0046,
-	0x0026, 0x0016, 0x0126, 0x2091, 0x8000, 0x2029, 0x19c4, 0x252c,
-	0x2021, 0x19cb, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7650,
-	0x7070, 0x9606, 0x0578, 0x6720, 0x9786, 0x0001, 0x0118, 0x9786,
-	0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400, 0x9c06, 0x01d0,
-	0x080c, 0xd2a4, 0x01b8, 0x080c, 0xd2b4, 0x11a0, 0x6000, 0x9086,
-	0x0004, 0x1120, 0x0016, 0x080c, 0x1914, 0x001e, 0x080c, 0xba4b,
-	0x1110, 0x080c, 0x303b, 0x080c, 0xba5c, 0x1110, 0x080c, 0xa58f,
-	0x080c, 0x9c21, 0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004, 0x9c02,
-	0x1208, 0x0858, 0x012e, 0x001e, 0x002e, 0x004e, 0x005e, 0x006e,
-	0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001, 0x1810, 0x2004,
-	0xd0dc, 0x0005, 0x0006, 0x2001, 0x1836, 0x2004, 0xd09c, 0x000e,
-	0x0005, 0x0006, 0x0036, 0x0046, 0x080c, 0xbf61, 0x0168, 0x2019,
-	0xffff, 0x9005, 0x0128, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be,
-	0x2021, 0x0004, 0x080c, 0x4a75, 0x004e, 0x003e, 0x000e, 0x6004,
-	0x9086, 0x0001, 0x1128, 0x080c, 0x94f4, 0x080c, 0x9c21, 0x9006,
-	0x0005, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x2061, 0x1ddc, 0x2071,
-	0x1800, 0x7450, 0x7070, 0x8001, 0x9402, 0x12b8, 0x2100, 0x9c06,
-	0x0148, 0x6000, 0x9086, 0x0000, 0x0128, 0x6010, 0x2058, 0xb8a0,
-	0x9206, 0x0140, 0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004, 0x9c02,
-	0x1220, 0x0c60, 0x9085, 0x0001, 0x0008, 0x9006, 0x004e, 0x00be,
-	0x00ce, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091,
-	0x8000, 0x2071, 0x1840, 0xd5a4, 0x0118, 0x7034, 0x8000, 0x7036,
-	0xd5b4, 0x0118, 0x7030, 0x8000, 0x7032, 0xd5ac, 0x0178, 0x2500,
-	0x9084, 0x0007, 0x908e, 0x0003, 0x0148, 0x908e, 0x0004, 0x0130,
-	0x908e, 0x0005, 0x0118, 0x2071, 0x184a, 0x0089, 0x001e, 0x00ee,
-	0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000,
-	0x2071, 0x1842, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005, 0x2e04,
-	0x8000, 0x2072, 0x1220, 0x8e70, 0x2e04, 0x8000, 0x2072, 0x0005,
-	0x00e6, 0x2071, 0x1840, 0x0c99, 0x00ee, 0x0005, 0x00e6, 0x2071,
-	0x1844, 0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091,
-	0x8000, 0x2071, 0x1840, 0x7044, 0x8000, 0x7046, 0x00ee, 0x000e,
-	0x012e, 0x0005, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020,
-	0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000,
-	0x4000, 0x8000, 0xfddb
+	0x9084, 0x0007, 0x0006, 0x9086, 0x0003, 0x0110, 0x080c, 0x98bb,
+	0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0x9365, 0x009e, 0x008e,
+	0x1558, 0x0076, 0x2c38, 0x080c, 0x9410, 0x007e, 0x1528, 0x6000,
+	0x9086, 0x0000, 0x0508, 0x6020, 0x9086, 0x0007, 0x01e8, 0x0096,
+	0x601c, 0xd084, 0x0140, 0x080c, 0xd4df, 0x080c, 0xbf79, 0x080c,
+	0x1921, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xb842, 0x0110,
+	0x080c, 0xd22f, 0x009e, 0x9006, 0x6046, 0x6016, 0x080c, 0xd4df,
+	0x6023, 0x0007, 0x080c, 0xbf79, 0x000e, 0x9086, 0x0003, 0x0110,
+	0x080c, 0x98d7, 0x003e, 0x012e, 0x0005, 0x00f6, 0x00c6, 0x00b6,
+	0x0036, 0x0156, 0x2079, 0x0260, 0x7938, 0x783c, 0x080c, 0x243d,
+	0x15e8, 0x0016, 0x00c6, 0x080c, 0x626b, 0x15b0, 0x001e, 0x00c6,
+	0x2160, 0x080c, 0xbf76, 0x00ce, 0x002e, 0x0026, 0x0016, 0x080c,
+	0x98bb, 0x2019, 0x0029, 0x080c, 0x94dd, 0x080c, 0x8624, 0x0076,
+	0x903e, 0x080c, 0x8509, 0x007e, 0x001e, 0x0076, 0x903e, 0x080c,
+	0xcfd9, 0x007e, 0x080c, 0x98d7, 0x0026, 0xba04, 0x9294, 0xff00,
+	0x8217, 0x9286, 0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0,
+	0x080c, 0x30d8, 0x002e, 0xbc84, 0x001e, 0x080c, 0x5cf1, 0xbe12,
+	0xbd16, 0xbc86, 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e,
+	0x00be, 0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016,
+	0x2009, 0x1823, 0x2104, 0x9086, 0x0074, 0x1904, 0xcefd, 0x2069,
+	0x0260, 0x6944, 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000,
+	0x0904, 0xcefa, 0x2001, 0x194c, 0x2004, 0x9005, 0x1140, 0x6010,
+	0x2058, 0xb884, 0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948,
+	0x918a, 0x0001, 0x0648, 0x080c, 0xd593, 0x0118, 0x6978, 0xd1fc,
+	0x11b8, 0x2009, 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198,
+	0x6944, 0x9182, 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948,
+	0x918a, 0x0001, 0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0,
+	0x6017, 0x0100, 0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500,
+	0x0070, 0x6017, 0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017,
+	0x0b00, 0x0028, 0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085,
+	0x0001, 0x0008, 0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005,
+	0x00c6, 0x00b6, 0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04,
+	0x9394, 0x00ff, 0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168,
+	0x9394, 0xff00, 0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004,
+	0x0120, 0x080c, 0x627a, 0x0804, 0xcf68, 0x2011, 0x0276, 0x20a9,
+	0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xabd3, 0x009e,
+	0x15c0, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
+	0x0006, 0x080c, 0xabd3, 0x009e, 0x1560, 0x0046, 0x0016, 0xbaa0,
+	0x2220, 0x9006, 0x2009, 0x1854, 0x210c, 0x0038, 0x2009, 0x0029,
+	0x080c, 0xd284, 0xb800, 0xc0e5, 0xb802, 0x080c, 0x98bb, 0x2019,
+	0x0029, 0x080c, 0x8624, 0x0076, 0x2039, 0x0000, 0x080c, 0x8509,
+	0x2c08, 0x080c, 0xcfd9, 0x007e, 0x080c, 0x98d7, 0x2001, 0x0007,
+	0x080c, 0x61e8, 0x2001, 0x0007, 0x080c, 0x61bc, 0x001e, 0x004e,
+	0x9006, 0x015e, 0x003e, 0x002e, 0x00be, 0x00ce, 0x0005, 0x00d6,
+	0x2069, 0x026e, 0x6800, 0x9086, 0x0800, 0x0118, 0x6017, 0x0000,
+	0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00f6, 0x0016, 0x0026,
+	0x0036, 0x0156, 0x2079, 0x026c, 0x7930, 0x7834, 0x080c, 0x243d,
+	0x11d0, 0x080c, 0x626b, 0x11b8, 0x2011, 0x0270, 0x20a9, 0x0004,
+	0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xabd3, 0x009e, 0x1158,
+	0x2011, 0x0274, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006,
+	0x080c, 0xabd3, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x00fe,
+	0x00be, 0x0005, 0x00b6, 0x0006, 0x0016, 0x0026, 0x0036, 0x0156,
+	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x243d, 0x11d0,
+	0x080c, 0x626b, 0x11b8, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096,
+	0x2b48, 0x2019, 0x000a, 0x080c, 0xabd3, 0x009e, 0x1158, 0x2011,
+	0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c,
+	0xabd3, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x000e, 0x00be,
+	0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x0056, 0x0046,
+	0x0026, 0x0126, 0x2091, 0x8000, 0x080c, 0x9919, 0x0106, 0x190c,
+	0x98bb, 0x2740, 0x2029, 0x19c3, 0x252c, 0x2021, 0x19ca, 0x2424,
+	0x2061, 0x1ddc, 0x2071, 0x1800, 0x7650, 0x7070, 0x81ff, 0x0150,
+	0x0006, 0x9186, 0x1b01, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04,
+	0xd07a, 0x0018, 0x9606, 0x0904, 0xd07a, 0x2100, 0x9c06, 0x0904,
+	0xd071, 0x080c, 0xd2c5, 0x1904, 0xd071, 0x080c, 0xd5b0, 0x0904,
+	0xd071, 0x080c, 0xd2b5, 0x0904, 0xd071, 0x6720, 0x9786, 0x0001,
+	0x1148, 0x080c, 0x3175, 0x0904, 0xd099, 0x6004, 0x9086, 0x0000,
+	0x1904, 0xd099, 0x9786, 0x0004, 0x0904, 0xd099, 0x9786, 0x0007,
+	0x0904, 0xd071, 0x2500, 0x9c06, 0x0904, 0xd071, 0x2400, 0x9c06,
+	0x0904, 0xd071, 0x88ff, 0x0118, 0x605c, 0x9906, 0x15d0, 0x0096,
+	0x6043, 0xffff, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c,
+	0x1921, 0x001e, 0x9786, 0x000a, 0x0148, 0x080c, 0xba57, 0x1130,
+	0x080c, 0xa581, 0x009e, 0x080c, 0x9c14, 0x0418, 0x6014, 0x2048,
+	0x080c, 0xb842, 0x01d8, 0x9786, 0x0003, 0x1588, 0xa867, 0x0103,
+	0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fd4,
+	0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0xd52b, 0x0016, 0x080c,
+	0xbb45, 0x080c, 0x6985, 0x001e, 0x080c, 0xba31, 0x009e, 0x080c,
+	0x9c14, 0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1210,
+	0x0804, 0xcff2, 0x010e, 0x190c, 0x98d7, 0x012e, 0x002e, 0x004e,
+	0x005e, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, 0x9786,
+	0x0006, 0x1150, 0x9386, 0x0005, 0x0128, 0x080c, 0xd52b, 0x080c,
+	0xd22f, 0x08e0, 0x009e, 0x08e8, 0x9786, 0x000a, 0x0908, 0x0804,
+	0xd056, 0x81ff, 0x09b0, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018,
+	0x0130, 0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1950, 0x6000,
+	0x9086, 0x0002, 0x1930, 0x080c, 0xba46, 0x0130, 0x080c, 0xba57,
+	0x1900, 0x080c, 0xa581, 0x0038, 0x080c, 0x303d, 0x080c, 0xba57,
+	0x1110, 0x080c, 0xa581, 0x080c, 0x9c14, 0x0804, 0xd071, 0xa864,
+	0x9084, 0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016,
+	0x2c08, 0x2170, 0x9006, 0x080c, 0xd256, 0x001e, 0x0120, 0x6020,
+	0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, 0xd0e4, 0xd0e4,
+	0xd0e4, 0xd0e4, 0xd0e4, 0xd0e4, 0xd0e6, 0xd0e4, 0xd0e4, 0xd0e4,
+	0xd0e4, 0x9c14, 0x9c14, 0xd0e4, 0x9006, 0x0005, 0x0036, 0x0046,
+	0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009,
+	0x0020, 0x080c, 0xd284, 0x001e, 0x004e, 0x2019, 0x0002, 0x080c,
+	0xce09, 0x003e, 0x9085, 0x0001, 0x0005, 0x0096, 0x080c, 0xb842,
+	0x0140, 0x6014, 0x904d, 0x080c, 0xb440, 0x687b, 0x0005, 0x080c,
+	0x6991, 0x009e, 0x080c, 0x9c14, 0x9085, 0x0001, 0x0005, 0x2001,
+	0x0001, 0x080c, 0x61a8, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
+	0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xabbf, 0x003e,
+	0x002e, 0x001e, 0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6,
+	0x0086, 0x0076, 0x0066, 0x00b6, 0x0126, 0x2091, 0x8000, 0x2740,
+	0x2061, 0x1ddc, 0x2079, 0x0001, 0x8fff, 0x0904, 0xd17f, 0x2071,
+	0x1800, 0x7650, 0x7070, 0x8001, 0x9602, 0x1a04, 0xd17f, 0x88ff,
+	0x0120, 0x2800, 0x9c06, 0x1590, 0x2078, 0x080c, 0xd2b5, 0x0570,
+	0x2400, 0x9c06, 0x0558, 0x6720, 0x9786, 0x0006, 0x1538, 0x9786,
+	0x0007, 0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06, 0x11f8, 0x85ff,
+	0x0118, 0x605c, 0x9106, 0x11d0, 0x0096, 0x601c, 0xd084, 0x0140,
+	0x080c, 0xd4df, 0x080c, 0xbf79, 0x080c, 0x1921, 0x6023, 0x0007,
+	0x6014, 0x2048, 0x080c, 0xb842, 0x0120, 0x0046, 0x080c, 0xd22f,
+	0x004e, 0x009e, 0x080c, 0x9c14, 0x88ff, 0x1198, 0x9ce0, 0x001c,
+	0x2001, 0x1819, 0x2004, 0x9c02, 0x1210, 0x0804, 0xd134, 0x9006,
+	0x012e, 0x00be, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe,
+	0x0005, 0x98c5, 0x0001, 0x0ca0, 0x080c, 0x98bb, 0x00b6, 0x0076,
+	0x0056, 0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002,
+	0x6210, 0x2258, 0x0096, 0x904e, 0x080c, 0x9365, 0x009e, 0x008e,
+	0x903e, 0x080c, 0x9410, 0x080c, 0xd125, 0x005e, 0x007e, 0x00be,
+	0x080c, 0x98d7, 0x0005, 0x080c, 0x98bb, 0x00b6, 0x0046, 0x0056,
+	0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e,
+	0x0016, 0x0036, 0x080c, 0x626b, 0x1190, 0x0056, 0x0086, 0x9046,
+	0x2508, 0x2029, 0x0001, 0x0096, 0x904e, 0x080c, 0x9365, 0x009e,
+	0x008e, 0x903e, 0x080c, 0x9410, 0x080c, 0xd125, 0x005e, 0x003e,
+	0x001e, 0x8108, 0x1f04, 0xd1b8, 0x015e, 0x00ce, 0x007e, 0x005e,
+	0x004e, 0x00be, 0x080c, 0x98d7, 0x0005, 0x080c, 0x98bb, 0x00b6,
+	0x0076, 0x0056, 0x6210, 0x2258, 0x0086, 0x9046, 0x2029, 0x0001,
+	0x2019, 0x0048, 0x0096, 0x904e, 0x080c, 0x9365, 0x009e, 0x008e,
+	0x903e, 0x080c, 0x9410, 0x2c20, 0x080c, 0xd125, 0x005e, 0x007e,
+	0x00be, 0x080c, 0x98d7, 0x0005, 0x080c, 0x98bb, 0x00b6, 0x0046,
+	0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9, 0x0800, 0x900e,
+	0x0016, 0x0036, 0x080c, 0x626b, 0x11a0, 0x0086, 0x9046, 0x2828,
+	0x0046, 0x2021, 0x0001, 0x080c, 0xd4c3, 0x004e, 0x0096, 0x904e,
+	0x080c, 0x9365, 0x009e, 0x008e, 0x903e, 0x080c, 0x9410, 0x080c,
+	0xd125, 0x003e, 0x001e, 0x8108, 0x1f04, 0xd208, 0x015e, 0x00ce,
+	0x007e, 0x005e, 0x004e, 0x00be, 0x080c, 0x98d7, 0x0005, 0x0016,
+	0x00f6, 0x080c, 0xb840, 0x0198, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x0046, 0x0180, 0xa800, 0x907d, 0x0138, 0xa803, 0x0000, 0xab82,
+	0x080c, 0x6991, 0x2f48, 0x0cb0, 0xab82, 0x080c, 0x6991, 0x00fe,
+	0x001e, 0x0005, 0xa800, 0x907d, 0x0130, 0xa803, 0x0000, 0x080c,
+	0x6991, 0x2f48, 0x0cb8, 0x080c, 0x6991, 0x0c88, 0x00e6, 0x0046,
+	0x0036, 0x2061, 0x1ddc, 0x9005, 0x1138, 0x2071, 0x1800, 0x7450,
+	0x7070, 0x8001, 0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000,
+	0x9086, 0x0000, 0x0148, 0x6008, 0x9206, 0x1130, 0x6010, 0x91a0,
+	0x0004, 0x2424, 0x9406, 0x0140, 0x9ce0, 0x001c, 0x2001, 0x1819,
+	0x2004, 0x9c02, 0x1220, 0x0c40, 0x9085, 0x0001, 0x0008, 0x9006,
+	0x003e, 0x004e, 0x00ee, 0x0005, 0x0096, 0x0006, 0x080c, 0x1022,
+	0x000e, 0x090c, 0x0d65, 0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026,
+	0x2010, 0x080c, 0xb830, 0x2001, 0x0000, 0x0120, 0x2200, 0x9080,
+	0x0017, 0x2004, 0x002e, 0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3,
+	0xffff, 0xa986, 0xac76, 0xa87f, 0x0000, 0x2001, 0x195e, 0x2004,
+	0xa882, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6991, 0x012e, 0x009e, 0x0005, 0x6700, 0x9786, 0x0000,
+	0x0158, 0x9786, 0x0001, 0x0140, 0x9786, 0x000a, 0x0128, 0x9786,
+	0x0009, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x6010, 0x9075,
+	0x0138, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005,
+	0x9085, 0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e, 0x11a0,
+	0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085,
+	0x6003, 0x000b, 0x6023, 0x0005, 0x2001, 0x1957, 0x2004, 0x601a,
+	0x2009, 0x8020, 0x080c, 0x84b3, 0x001e, 0x0005, 0xa001, 0xa001,
+	0x0005, 0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c, 0xbb8c,
+	0x0030, 0x080c, 0xd4df, 0x080c, 0x83a2, 0x080c, 0x9bda, 0x0005,
+	0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd314, 0xd314,
+	0xd314, 0xd316, 0xd314, 0xd316, 0xd316, 0xd314, 0xd316, 0xd314,
+	0xd314, 0xd314, 0xd314, 0xd314, 0x9006, 0x0005, 0x9085, 0x0001,
+	0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd32d,
+	0xd32d, 0xd32d, 0xd32d, 0xd32d, 0xd32d, 0xd33a, 0xd32d, 0xd32d,
+	0xd32d, 0xd32d, 0xd32d, 0xd32d, 0xd32d, 0x6007, 0x003b, 0x602f,
+	0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c,
+	0x84b3, 0x0005, 0x0096, 0x00c6, 0x2260, 0x080c, 0xd4df, 0x604b,
+	0x0000, 0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce,
+	0x00d6, 0x2268, 0x9186, 0x0007, 0x1904, 0xd393, 0x6814, 0x9005,
+	0x0138, 0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8,
+	0x6007, 0x003a, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84b3,
+	0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x1904, 0xd40a, 0x6014,
+	0x9005, 0x1138, 0x6000, 0x9086, 0x0007, 0x190c, 0x0d65, 0x0804,
+	0xd40a, 0x2048, 0x080c, 0xb842, 0x1130, 0x0028, 0x2048, 0xa800,
+	0x9005, 0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086,
+	0x0002, 0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc,
+	0xa882, 0x2009, 0x0043, 0x080c, 0xcc4b, 0x0804, 0xd40a, 0x2009,
+	0x0041, 0x0804, 0xd404, 0x9186, 0x0005, 0x15a0, 0x6814, 0x2048,
+	0xa87c, 0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804, 0xd32d, 0xd0b4,
+	0x0128, 0xd0fc, 0x090c, 0x0d65, 0x0804, 0xd34e, 0x6007, 0x003a,
+	0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84b3, 0x00c6, 0x2d60,
+	0x6100, 0x9186, 0x0002, 0x0120, 0x9186, 0x0004, 0x1904, 0xd40a,
+	0x6814, 0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc,
+	0xc1bc, 0xa982, 0x00f6, 0x2c78, 0x080c, 0x165c, 0x00fe, 0x2009,
+	0x0042, 0x04d0, 0x0036, 0x080c, 0x1022, 0x090c, 0x0d65, 0xa867,
+	0x010d, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887,
+	0x0045, 0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd,
+	0x6026, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004, 0x635c,
+	0xab7a, 0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f,
+	0x0001, 0x080c, 0x6991, 0x2019, 0x0045, 0x6008, 0x2068, 0x080c,
+	0xce09, 0x2d00, 0x600a, 0x6023, 0x0006, 0x6003, 0x0007, 0x901e,
+	0x631a, 0x634a, 0x003e, 0x0038, 0x604b, 0x0000, 0x6003, 0x0007,
+	0x080c, 0xcc4b, 0x00ce, 0x00de, 0x009e, 0x0005, 0x9186, 0x0013,
+	0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x00c2, 0x9186, 0x0027,
+	0x1178, 0x080c, 0x885d, 0x0036, 0x0096, 0x6014, 0x2048, 0x2019,
+	0x0004, 0x080c, 0xd22f, 0x009e, 0x003e, 0x080c, 0x891b, 0x0005,
+	0x9186, 0x0014, 0x0d70, 0x080c, 0x9c93, 0x0005, 0xd43d, 0xd43b,
+	0xd43b, 0xd43b, 0xd43b, 0xd43b, 0xd43d, 0xd43b, 0xd43b, 0xd43b,
+	0xd43b, 0xd43b, 0xd43b, 0x080c, 0x0d65, 0x6003, 0x000c, 0x080c,
+	0x891b, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208,
+	0x001a, 0x080c, 0x9c93, 0x0005, 0xd459, 0xd459, 0xd459, 0xd459,
+	0xd45b, 0xd47b, 0xd459, 0xd459, 0xd459, 0xd459, 0xd459, 0xd459,
+	0xd459, 0x080c, 0x0d65, 0x00d6, 0x2c68, 0x080c, 0x9b84, 0x01b0,
+	0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c, 0x613a,
+	0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910, 0x6112,
+	0x6023, 0x0004, 0x2009, 0x8020, 0x080c, 0x84b3, 0x2d60, 0x080c,
+	0x9bda, 0x00de, 0x0005, 0x080c, 0x9bda, 0x0005, 0x00e6, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005, 0x2009,
+	0x1873, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024, 0xc0e5,
+	0x6026, 0xd0cc, 0x0150, 0x2001, 0x1958, 0x2004, 0x604a, 0x2009,
+	0x1873, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x1873, 0x210c,
+	0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001,
+	0x1958, 0x200c, 0x2001, 0x1956, 0x2004, 0x9100, 0x9080, 0x000a,
+	0x604a, 0x6010, 0x00b6, 0x2058, 0xb8ac, 0x00be, 0x0008, 0x2104,
+	0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000,
+	0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x615c, 0xb8ac,
+	0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x605c, 0x9106, 0x1138,
+	0x600c, 0x2072, 0x080c, 0x83a2, 0x080c, 0x9bda, 0x0010, 0x9cf0,
+	0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6,
+	0x00b6, 0x6010, 0x2058, 0xb8ac, 0x2068, 0x9005, 0x0130, 0x9c06,
+	0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de, 0x0005,
+	0x0026, 0x0036, 0x0156, 0x2011, 0x182b, 0x2204, 0x9084, 0x00ff,
+	0x2019, 0x026e, 0x2334, 0x9636, 0x1508, 0x8318, 0x2334, 0x2204,
+	0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9, 0x0004,
+	0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xabd3, 0x009e,
+	0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048,
+	0x2019, 0x0006, 0x080c, 0xabd3, 0x009e, 0x1100, 0x015e, 0x003e,
+	0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c6a, 0x080c,
+	0x2de9, 0x00ee, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, 0xa880, 0xc0e5,
+	0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0056,
+	0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000, 0x2029, 0x19c3,
+	0x252c, 0x2021, 0x19ca, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800,
+	0x7650, 0x7070, 0x9606, 0x0578, 0x6720, 0x9786, 0x0001, 0x0118,
+	0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400, 0x9c06,
+	0x01d0, 0x080c, 0xd2b5, 0x01b8, 0x080c, 0xd2c5, 0x11a0, 0x6000,
+	0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1921, 0x001e, 0x080c,
+	0xba46, 0x1110, 0x080c, 0x303d, 0x080c, 0xba57, 0x1110, 0x080c,
+	0xa581, 0x080c, 0x9c14, 0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004,
+	0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e, 0x004e, 0x005e,
+	0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001, 0x1810,
+	0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1836, 0x2004, 0xd09c,
+	0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c, 0xbf61, 0x0168,
+	0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6, 0x2058, 0xbba0,
+	0x00be, 0x2021, 0x0004, 0x080c, 0x4a77, 0x004e, 0x003e, 0x000e,
+	0x6004, 0x9086, 0x0001, 0x1128, 0x080c, 0x94dd, 0x080c, 0x9c14,
+	0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x2061, 0x1ddc,
+	0x2071, 0x1800, 0x7450, 0x7070, 0x8001, 0x9402, 0x12b8, 0x2100,
+	0x9c06, 0x0148, 0x6000, 0x9086, 0x0000, 0x0128, 0x6010, 0x2058,
+	0xb8a0, 0x9206, 0x0140, 0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004,
+	0x9c02, 0x1220, 0x0c60, 0x9085, 0x0001, 0x0008, 0x9006, 0x004e,
+	0x00be, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016,
+	0x2091, 0x8000, 0x2071, 0x1840, 0xd5a4, 0x0118, 0x7034, 0x8000,
+	0x7036, 0xd5b4, 0x0118, 0x7030, 0x8000, 0x7032, 0xd5ac, 0x0178,
+	0x2500, 0x9084, 0x0007, 0x908e, 0x0003, 0x0148, 0x908e, 0x0004,
+	0x0130, 0x908e, 0x0005, 0x0118, 0x2071, 0x184a, 0x0089, 0x001e,
+	0x00ee, 0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091,
+	0x8000, 0x2071, 0x1842, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005,
+	0x2e04, 0x8000, 0x2072, 0x1220, 0x8e70, 0x2e04, 0x8000, 0x2072,
+	0x0005, 0x00e6, 0x2071, 0x1840, 0x0c99, 0x00ee, 0x0005, 0x00e6,
+	0x2071, 0x1844, 0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6,
+	0x2091, 0x8000, 0x2071, 0x1840, 0x7044, 0x8000, 0x7046, 0x00ee,
+	0x000e, 0x012e, 0x0005, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010,
+	0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000,
+	0x2000, 0x4000, 0x8000, 0x9407
 };
 #ifdef UNIQUE_FW_NAME
-unsigned short fw2322flx_length01 = 0xce3b;
+unsigned short fw2322flx_length01 = 0xce4c;
 #else
-unsigned short risc_code_length01 = 0xce3b;
+unsigned short risc_code_length01 = 0xce4c;
 #endif
 
 /*
@@ -6663,28 +6665,28 @@
 
 unsigned long rseqflx_code_addr01 = 0x0001c000 ;
 unsigned short rseqflx_code01[] = { 
-0x000b, 0x0003, 0x0000, 0x071c, 0x0001, 0xc000, 0x0008, 0x8064,
+0x000b, 0x0003, 0x0000, 0x072a, 0x0001, 0xc000, 0x0008, 0x8064,
 	0x0000, 0x0010, 0x0000, 0x8066, 0x0008, 0x0101, 0x0003, 0xc007,
 	0x0008, 0x80e0, 0x0008, 0xff00, 0x0000, 0x80e2, 0x0008, 0xff00,
 	0x0008, 0x0162, 0x0000, 0x8066, 0x0008, 0xa101, 0x000b, 0xc00f,
 	0x0008, 0x0d02, 0x0000, 0x8060, 0x0000, 0x0400, 0x000b, 0x60af,
-	0x0003, 0x5817, 0x0003, 0x7ac6, 0x0003, 0x5209, 0x000b, 0xc813,
+	0x0003, 0x5817, 0x0003, 0x7ac9, 0x0003, 0x5209, 0x000b, 0xc813,
 	0x0009, 0xbac0, 0x0000, 0x008a, 0x0003, 0x8813, 0x0000, 0x15fc,
 	0x000b, 0xb013, 0x0009, 0xc4c0, 0x0000, 0x7000, 0x0001, 0xffa0,
-	0x0000, 0x2000, 0x000b, 0x9366, 0x0008, 0x808c, 0x0000, 0x0001,
+	0x0000, 0x2000, 0x0003, 0x936d, 0x0008, 0x808c, 0x0000, 0x0001,
 	0x0007, 0x0000, 0x0007, 0x0000, 0x000a, 0x4047, 0x0008, 0x808c,
 	0x0000, 0x0002, 0x0007, 0x0000, 0x0003, 0x082d, 0x0000, 0x4022,
-	0x000b, 0x002e, 0x0008, 0x4122, 0x0002, 0x4447, 0x0003, 0x8b8a,
-	0x0008, 0x0bfe, 0x0001, 0x11a0, 0x0003, 0x136c, 0x0001, 0x0ca0,
-	0x0003, 0x136c, 0x0001, 0x9180, 0x0000, 0x0004, 0x0000, 0x8060,
+	0x000b, 0x002e, 0x0008, 0x4122, 0x0002, 0x4447, 0x0003, 0x8b91,
+	0x0008, 0x0bfe, 0x0001, 0x11a0, 0x000b, 0x1373, 0x0001, 0x0ca0,
+	0x000b, 0x1373, 0x0001, 0x9180, 0x0000, 0x0004, 0x0000, 0x8060,
 	0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009,
 	0x000b, 0xc03c, 0x0008, 0x808c, 0x0008, 0x0000, 0x0008, 0x0060,
 	0x0008, 0x8062, 0x0000, 0x0004, 0x0000, 0x8066, 0x0000, 0x0411,
-	0x000b, 0xc044, 0x0000, 0x03fe, 0x0001, 0x43e0, 0x000b, 0x8b69,
-	0x0009, 0xc2c0, 0x0008, 0x00ff, 0x0001, 0x02e0, 0x000b, 0x8b69,
+	0x000b, 0xc044, 0x0000, 0x03fe, 0x0001, 0x43e0, 0x0003, 0x8b70,
+	0x0009, 0xc2c0, 0x0008, 0x00ff, 0x0001, 0x02e0, 0x0003, 0x8b70,
 	0x0001, 0x9180, 0x0008, 0x0005, 0x0000, 0x8060, 0x0000, 0x0400,
 	0x0008, 0x7f62, 0x0000, 0x8066, 0x0000, 0x0019, 0x000b, 0xc053,
-	0x0002, 0x0240, 0x0003, 0x0b66, 0x0008, 0x00fc, 0x000b, 0x3369,
+	0x0002, 0x0240, 0x000b, 0x0b6d, 0x0008, 0x00fc, 0x0003, 0x3370,
 	0x000a, 0x0244, 0x0003, 0x0865, 0x000c, 0x01e2, 0x0001, 0x9180,
 	0x0000, 0x0007, 0x0008, 0x7f62, 0x0000, 0x8060, 0x0000, 0x0400,
 	0x0002, 0x0234, 0x0008, 0x7f04, 0x0000, 0x8066, 0x0000, 0x040a,
@@ -6692,7 +6694,7 @@
 	0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x808c, 0x0000, 0x0002,
 	0x0008, 0x1760, 0x0008, 0x8062, 0x0008, 0x000f, 0x0000, 0x8066,
 	0x0008, 0x0011, 0x000b, 0xc071, 0x0008, 0x01fe, 0x0009, 0x42e0,
-	0x0003, 0x8b5b, 0x0000, 0x00fe, 0x0001, 0x43e0, 0x0003, 0x8b5b,
+	0x0003, 0x8b62, 0x0000, 0x00fe, 0x0001, 0x43e0, 0x0003, 0x8b62,
 	0x0000, 0x1734, 0x0000, 0x1530, 0x0008, 0x1632, 0x0008, 0x0d2a,
 	0x0001, 0x9880, 0x0008, 0x0012, 0x0000, 0x8060, 0x0000, 0x0400,
 	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x1e0a, 0x0003, 0xc083,
@@ -6720,9 +6722,9 @@
 	0x000b, 0x8907, 0x000a, 0x0040, 0x000b, 0x08f1, 0x0002, 0x004e,
 	0x000b, 0x08f1, 0x0002, 0x0030, 0x0002, 0x7f2f, 0x0000, 0x7f00,
 	0x0000, 0x8066, 0x0008, 0x000a, 0x000b, 0xc0e2, 0x0008, 0x1010,
-	0x000c, 0x01c9, 0x000b, 0xb0ea, 0x000c, 0x032f, 0x0004, 0x01b3,
+	0x000c, 0x01c9, 0x000b, 0xb0ea, 0x0004, 0x0336, 0x0004, 0x01b3,
 	0x000b, 0x7814, 0x0003, 0x0013, 0x0000, 0x0806, 0x0008, 0x8010,
-	0x0000, 0x001f, 0x000c, 0x032f, 0x0000, 0x0310, 0x000c, 0x032f,
+	0x0000, 0x001f, 0x0004, 0x0336, 0x0000, 0x0310, 0x0004, 0x0336,
 	0x000b, 0x00e8, 0x000a, 0x002f, 0x0000, 0x7f00, 0x0000, 0x8066,
 	0x0008, 0x000a, 0x000b, 0xc0f5, 0x0004, 0x018c, 0x000a, 0x0040,
 	0x000b, 0x090a, 0x000c, 0x01f9, 0x0000, 0x8000, 0x0000, 0x0002,
@@ -6730,7 +6732,7 @@
 	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x000a, 0x0003, 0xc103,
 	0x0000, 0x8072, 0x0000, 0x4000, 0x000b, 0x00e8, 0x0008, 0x8010,
 	0x0008, 0x001e, 0x0003, 0x010c, 0x0008, 0x8010, 0x0008, 0x001d,
-	0x000c, 0x032f, 0x0008, 0x1010, 0x000c, 0x032f, 0x000b, 0x0014,
+	0x0004, 0x0336, 0x0008, 0x1010, 0x0004, 0x0336, 0x000b, 0x0014,
 	0x0002, 0x4b4e, 0x0003, 0x0916, 0x0008, 0x808a, 0x0000, 0x0004,
 	0x000b, 0x6116, 0x000f, 0x8000, 0x0008, 0x808a, 0x0000, 0x0004,
 	0x000b, 0x0014, 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080,
@@ -6759,9 +6761,9 @@
 	0x0003, 0xc174, 0x0008, 0x5006, 0x0008, 0x100e, 0x000c, 0x01a0,
 	0x000b, 0x7814, 0x0003, 0x0013, 0x0008, 0x0208, 0x0008, 0x030a,
 	0x000b, 0x0161, 0x0004, 0x018c, 0x0008, 0x808a, 0x0000, 0x0004,
-	0x0008, 0x8010, 0x0008, 0x0021, 0x000c, 0x032f, 0x0008, 0x1010,
-	0x000c, 0x032f, 0x0000, 0x4810, 0x000c, 0x032f, 0x0008, 0x4910,
-	0x000c, 0x032f, 0x0008, 0x808a, 0x0000, 0x0004, 0x000b, 0x0014,
+	0x0008, 0x8010, 0x0008, 0x0021, 0x0004, 0x0336, 0x0008, 0x1010,
+	0x0004, 0x0336, 0x0000, 0x4810, 0x0004, 0x0336, 0x0008, 0x4910,
+	0x0004, 0x0336, 0x0008, 0x808a, 0x0000, 0x0004, 0x000b, 0x0014,
 	0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, 0x0000, 0x0002,
 	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0xb40a, 0x0003, 0xc193,
 	0x000f, 0x4000, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x0a62,
@@ -6793,113 +6795,115 @@
 	0x0008, 0x4040, 0x0007, 0x0000, 0x000a, 0x3945, 0x000b, 0x8a01,
 	0x000f, 0x4000, 0x0000, 0x8072, 0x0000, 0x4000, 0x0007, 0x0000,
 	0x0007, 0x0000, 0x0007, 0x0000, 0x000a, 0x3945, 0x0003, 0x09fb,
-	0x0003, 0x0203, 0x000a, 0x3a40, 0x000b, 0x8817, 0x0008, 0x2b24,
-	0x0008, 0x2b24, 0x0003, 0x5a0d, 0x0008, 0x8054, 0x0000, 0x0002,
-	0x0002, 0x1242, 0x0003, 0x0a51, 0x000a, 0x3a45, 0x000b, 0x0a42,
-	0x000a, 0x1e10, 0x0000, 0x7f3c, 0x000b, 0x0a3f, 0x0002, 0x1d00,
-	0x0000, 0x7f3a, 0x0000, 0x0d60, 0x0008, 0x7f62, 0x0000, 0x8066,
-	0x0008, 0x0009, 0x0003, 0xc21d, 0x0008, 0x00fc, 0x000b, 0xb23c,
-	0x0000, 0x1c60, 0x0008, 0x8062, 0x0000, 0x0001, 0x0000, 0x8066,
-	0x0008, 0x0009, 0x000b, 0xc225, 0x0008, 0x00fc, 0x000b, 0x3344,
-	0x0000, 0x0038, 0x0008, 0x0060, 0x0008, 0x8062, 0x0000, 0x0019,
-	0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc22e, 0x0009, 0x80c0,
-	0x0008, 0x00ff, 0x0008, 0x7f3e, 0x0000, 0x0d60, 0x0008, 0x0efe,
-	0x0001, 0x1f80, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009,
-	0x000b, 0xc238, 0x0008, 0x003a, 0x0000, 0x1dfe, 0x000b, 0x0219,
-	0x0008, 0x0036, 0x0004, 0x0096, 0x000b, 0x0251, 0x0000, 0x8074,
-	0x0000, 0x2000, 0x000b, 0x0251, 0x0002, 0x3a44, 0x0003, 0x0b6f,
-	0x0000, 0x8074, 0x0000, 0x1000, 0x0000, 0x2d0e, 0x0000, 0x2d0e,
-	0x0003, 0xb341, 0x0008, 0x26fe, 0x0008, 0x26fe, 0x0008, 0x2700,
-	0x0008, 0x2700, 0x0009, 0x00d0, 0x000b, 0x8a61, 0x0000, 0x8074,
-	0x0008, 0x4040, 0x0003, 0x5a51, 0x0003, 0x5209, 0x000a, 0x3a46,
-	0x000b, 0x8a61, 0x0002, 0x3a47, 0x000b, 0x0a5c, 0x0008, 0x8054,
-	0x0000, 0x0004, 0x0000, 0x8074, 0x0000, 0x8000, 0x000b, 0x02ba,
-	0x0009, 0x92c0, 0x0000, 0x0fc8, 0x000b, 0x0813, 0x000a, 0x1246,
-	0x0003, 0x8b3b, 0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x0002,
-	0x0000, 0x8066, 0x0000, 0x367a, 0x0003, 0xc266, 0x0009, 0x92c0,
-	0x0008, 0x0780, 0x000b, 0x8b55, 0x0002, 0x124b, 0x000b, 0x0a6f,
-	0x0002, 0x2e4d, 0x0002, 0x2e4d, 0x0003, 0x0b41, 0x000a, 0x3a46,
-	0x000b, 0x8a7c, 0x000b, 0x5a71, 0x0008, 0x8054, 0x0000, 0x0004,
-	0x000a, 0x1243, 0x000b, 0x0ab8, 0x0008, 0x8010, 0x0000, 0x000d,
-	0x000c, 0x032f, 0x0000, 0x1810, 0x000c, 0x032f, 0x0003, 0x02b8,
-	0x000a, 0x194d, 0x0003, 0x0a80, 0x000a, 0x1243, 0x0003, 0x0b4b,
-	0x0003, 0x5a80, 0x0008, 0x8054, 0x0000, 0x0004, 0x000a, 0x192e,
-	0x0008, 0x7f32, 0x000a, 0x1947, 0x000b, 0x0ab2, 0x0002, 0x194f,
-	0x000b, 0x0a90, 0x0004, 0x0324, 0x0000, 0x1810, 0x000c, 0x01c9,
-	0x0003, 0xb2ab, 0x000c, 0x032f, 0x0004, 0x01b3, 0x0003, 0x02b8,
-	0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x001f, 0x0000, 0x8066,
-	0x0008, 0x0009, 0x0003, 0xc295, 0x000a, 0x004c, 0x0003, 0x8ab2,
-	0x0000, 0x8060, 0x0000, 0x0400, 0x0001, 0x9880, 0x0000, 0x0007,
-	0x0008, 0x7f62, 0x0000, 0x8066, 0x0000, 0x320a, 0x0003, 0xc29f,
-	0x0000, 0x8060, 0x0000, 0x0400, 0x0001, 0x9880, 0x0008, 0x0012,
-	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x1e0a, 0x000b, 0xc2a7,
-	0x0000, 0x1826, 0x0000, 0x1928, 0x0003, 0x02b8, 0x0000, 0x0806,
-	0x0008, 0x8010, 0x0000, 0x001f, 0x000c, 0x032f, 0x0000, 0x0310,
-	0x000c, 0x032f, 0x0003, 0x02b8, 0x0004, 0x0324, 0x0008, 0x8010,
-	0x0000, 0x0001, 0x000c, 0x032f, 0x0000, 0x1810, 0x000c, 0x032f,
-	0x0000, 0x8074, 0x0008, 0xf000, 0x0000, 0x0d30, 0x0002, 0x3a42,
-	0x0003, 0x8ac0, 0x0000, 0x15fc, 0x0003, 0xb06a, 0x0003, 0x0013,
-	0x0000, 0x8074, 0x0000, 0x0501, 0x0008, 0x8010, 0x0008, 0x000c,
-	0x000c, 0x032f, 0x0003, 0x0013, 0x0009, 0xbbe0, 0x0008, 0x0030,
-	0x000b, 0x8adc, 0x0000, 0x18fe, 0x0009, 0x3ce0, 0x0003, 0x0ad9,
-	0x0008, 0x15fe, 0x0009, 0x3ce0, 0x0003, 0x0ad9, 0x0008, 0x13fe,
-	0x0009, 0x3ce0, 0x000b, 0x8ad5, 0x0004, 0x031d, 0x0008, 0x0d26,
-	0x000b, 0x02d6, 0x000c, 0x031f, 0x0008, 0x8076, 0x0000, 0x0040,
-	0x0003, 0x031a, 0x0008, 0x8076, 0x0008, 0x0041, 0x0003, 0x031a,
-	0x0009, 0xbbe0, 0x0000, 0x0032, 0x0003, 0x8ae1, 0x0008, 0x3c1e,
-	0x0003, 0x031a, 0x0009, 0xbbe0, 0x0000, 0x0037, 0x0003, 0x8aff,
-	0x0000, 0x18fe, 0x0009, 0x3ce0, 0x000b, 0x8ad9, 0x0008, 0x8076,
-	0x0000, 0x0040, 0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x000d,
-	0x0008, 0x2604, 0x0008, 0x2604, 0x0008, 0x2706, 0x0008, 0x2706,
-	0x0000, 0x2808, 0x0000, 0x2808, 0x0000, 0x290a, 0x0000, 0x290a,
-	0x0000, 0x8066, 0x0000, 0x0422, 0x0003, 0xc2f6, 0x0004, 0x0324,
-	0x0008, 0x8054, 0x0000, 0x0004, 0x0000, 0x8074, 0x0008, 0xf000,
-	0x0000, 0x8072, 0x0000, 0x8000, 0x000b, 0x02ba, 0x0009, 0xbbe0,
-	0x0000, 0x0038, 0x000b, 0x8b11, 0x0000, 0x18fe, 0x0009, 0x3ce0,
-	0x000b, 0x0b0e, 0x0008, 0x15fe, 0x0009, 0x3ce0, 0x0003, 0x8acf,
-	0x000c, 0x031f, 0x0008, 0x8076, 0x0000, 0x0040, 0x0000, 0x8072,
-	0x0000, 0x8000, 0x000b, 0x0366, 0x0008, 0x8076, 0x0008, 0x0042,
-	0x0003, 0x031a, 0x0009, 0xbbe0, 0x0000, 0x0016, 0x0003, 0x8b1a,
-	0x0002, 0x3a44, 0x0003, 0x8816, 0x0000, 0x8072, 0x0000, 0x8000,
-	0x000f, 0x8000, 0x0003, 0x0013, 0x0000, 0x8072, 0x0000, 0x8000,
-	0x0003, 0x0013, 0x0002, 0x1430, 0x0003, 0x0320, 0x000a, 0x3d30,
-	0x0000, 0x7f00, 0x0001, 0xbc80, 0x0000, 0x0007, 0x000b, 0x0328,
-	0x000a, 0x1930, 0x0000, 0x7f00, 0x0001, 0x9880, 0x0000, 0x0007,
-	0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066,
-	0x0008, 0x000a, 0x000b, 0xc32d, 0x000f, 0x4000, 0x000b, 0x232f,
-	0x0008, 0x0870, 0x000f, 0x4000, 0x0009, 0xbac0, 0x0008, 0x0090,
-	0x000b, 0x0b38, 0x0000, 0x8074, 0x0000, 0x0706, 0x000b, 0x033a,
-	0x0000, 0x8074, 0x0000, 0x0703, 0x000f, 0x4000, 0x0008, 0x8010,
-	0x0000, 0x0023, 0x000b, 0x0374, 0x0008, 0x8010, 0x0000, 0x0008,
-	0x000b, 0x0374, 0x0008, 0x8010, 0x0008, 0x0022, 0x000b, 0x0374,
-	0x0004, 0x0324, 0x0008, 0x8010, 0x0000, 0x0007, 0x000c, 0x032f,
-	0x0000, 0x1810, 0x000c, 0x032f, 0x000b, 0x037e, 0x0004, 0x0324,
-	0x0008, 0x8010, 0x0008, 0x001b, 0x000c, 0x032f, 0x0000, 0x1810,
-	0x000c, 0x032f, 0x0000, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30,
-	0x0003, 0x0013, 0x0008, 0x8010, 0x0008, 0x0009, 0x000b, 0x0374,
-	0x0008, 0x8010, 0x0008, 0x0005, 0x000b, 0x0374, 0x0008, 0x808c,
-	0x0000, 0x0001, 0x0007, 0x0000, 0x0008, 0x8010, 0x0000, 0x0004,
-	0x000a, 0x4143, 0x0003, 0x0878, 0x0002, 0x3a44, 0x0003, 0x8813,
-	0x0008, 0x0d2a, 0x000b, 0x0374, 0x0008, 0x8010, 0x0008, 0x0003,
-	0x0003, 0x0376, 0x0008, 0x8010, 0x0000, 0x000b, 0x0003, 0x0376,
-	0x0008, 0x8010, 0x0000, 0x0002, 0x0003, 0x0376, 0x0002, 0x3a47,
-	0x000b, 0x8a51, 0x0008, 0x8010, 0x0008, 0x0006, 0x0003, 0x0376,
-	0x0000, 0x8074, 0x0008, 0xf000, 0x000c, 0x032f, 0x000c, 0x0332,
-	0x000a, 0x3a40, 0x000b, 0x0813, 0x0008, 0x8010, 0x0008, 0x000c,
-	0x000c, 0x032f, 0x0003, 0x0013, 0x0000, 0x8074, 0x0000, 0xf080,
-	0x0000, 0x0d30, 0x0002, 0x2e4d, 0x0002, 0x2e4d, 0x0003, 0x0b87,
-	0x0008, 0x8054, 0x0000, 0x0019, 0x0003, 0x0013, 0x0008, 0x8054,
-	0x0008, 0x0009, 0x0003, 0x0013, 0x0002, 0x3a44, 0x0003, 0x8813,
-	0x000b, 0x0369, 0xec89, 0x9da0
+	0x0003, 0x0203, 0x000a, 0x3a40, 0x000b, 0x8817, 0x0001, 0xabd0,
+	0x0008, 0x0000, 0x0000, 0x7f24, 0x0003, 0x5a0e, 0x0008, 0x8054,
+	0x0000, 0x0002, 0x0002, 0x1242, 0x0003, 0x0a54, 0x000a, 0x3a45,
+	0x0003, 0x0a43, 0x000a, 0x1e10, 0x0000, 0x7f3c, 0x0003, 0x0a40,
+	0x0002, 0x1d00, 0x0000, 0x7f3a, 0x0000, 0x0d60, 0x0008, 0x7f62,
+	0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc21e, 0x0008, 0x00fc,
+	0x0003, 0xb23d, 0x0000, 0x1c60, 0x0008, 0x8062, 0x0000, 0x0001,
+	0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc226, 0x0008, 0x00fc,
+	0x000b, 0x334b, 0x0000, 0x0038, 0x0008, 0x0060, 0x0008, 0x8062,
+	0x0000, 0x0019, 0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc22f,
+	0x0009, 0x80c0, 0x0008, 0x00ff, 0x0008, 0x7f3e, 0x0000, 0x0d60,
+	0x0008, 0x0efe, 0x0001, 0x1f80, 0x0008, 0x7f62, 0x0000, 0x8066,
+	0x0008, 0x0009, 0x0003, 0xc239, 0x0008, 0x003a, 0x0000, 0x1dfe,
+	0x000b, 0x021a, 0x0008, 0x0036, 0x0004, 0x0096, 0x000b, 0x0254,
+	0x0000, 0x8074, 0x0000, 0x2000, 0x000b, 0x0254, 0x0002, 0x3a44,
+	0x000b, 0x0b76, 0x0000, 0x8074, 0x0000, 0x1000, 0x0001, 0xadd0,
+	0x0008, 0x0000, 0x0008, 0x7f0e, 0x0003, 0xb348, 0x0001, 0xa7d0,
+	0x0008, 0x0000, 0x0000, 0x7f00, 0x0009, 0xa6d0, 0x0008, 0x0000,
+	0x0009, 0x00d0, 0x000b, 0x8a64, 0x0000, 0x8074, 0x0008, 0x4040,
+	0x0003, 0x5a54, 0x0003, 0x5209, 0x000a, 0x3a46, 0x000b, 0x8a64,
+	0x0002, 0x3a47, 0x000b, 0x0a5f, 0x0008, 0x8054, 0x0000, 0x0004,
+	0x0000, 0x8074, 0x0000, 0x8000, 0x0003, 0x02bd, 0x0009, 0x92c0,
+	0x0000, 0x0fc8, 0x000b, 0x0813, 0x000a, 0x1246, 0x000b, 0x8b42,
+	0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x0002, 0x0000, 0x8066,
+	0x0000, 0x367a, 0x0003, 0xc269, 0x0009, 0x92c0, 0x0008, 0x0780,
+	0x000b, 0x8b5c, 0x0002, 0x124b, 0x000b, 0x0a72, 0x0002, 0x2e4d,
+	0x0002, 0x2e4d, 0x0003, 0x0b48, 0x000a, 0x3a46, 0x000b, 0x8a7f,
+	0x000b, 0x5a74, 0x0008, 0x8054, 0x0000, 0x0004, 0x000a, 0x1243,
+	0x000b, 0x0abb, 0x0008, 0x8010, 0x0000, 0x000d, 0x0004, 0x0336,
+	0x0000, 0x1810, 0x0004, 0x0336, 0x0003, 0x02bb, 0x000a, 0x194d,
+	0x0003, 0x0a83, 0x000a, 0x1243, 0x000b, 0x0b52, 0x0003, 0x5a83,
+	0x0008, 0x8054, 0x0000, 0x0004, 0x000a, 0x192e, 0x0008, 0x7f32,
+	0x000a, 0x1947, 0x0003, 0x0ab5, 0x0002, 0x194f, 0x000b, 0x0a93,
+	0x0004, 0x032b, 0x0000, 0x1810, 0x000c, 0x01c9, 0x0003, 0xb2ae,
+	0x0004, 0x0336, 0x0004, 0x01b3, 0x0003, 0x02bb, 0x0000, 0x1a60,
+	0x0008, 0x8062, 0x0000, 0x001f, 0x0000, 0x8066, 0x0008, 0x0009,
+	0x000b, 0xc298, 0x000a, 0x004c, 0x000b, 0x8ab5, 0x0000, 0x8060,
+	0x0000, 0x0400, 0x0001, 0x9880, 0x0000, 0x0007, 0x0008, 0x7f62,
+	0x0000, 0x8066, 0x0000, 0x320a, 0x000b, 0xc2a2, 0x0000, 0x8060,
+	0x0000, 0x0400, 0x0001, 0x9880, 0x0008, 0x0012, 0x0008, 0x7f62,
+	0x0000, 0x8066, 0x0008, 0x1e0a, 0x0003, 0xc2aa, 0x0000, 0x1826,
+	0x0000, 0x1928, 0x0003, 0x02bb, 0x0000, 0x0806, 0x0008, 0x8010,
+	0x0000, 0x001f, 0x0004, 0x0336, 0x0000, 0x0310, 0x0004, 0x0336,
+	0x0003, 0x02bb, 0x0004, 0x032b, 0x0008, 0x8010, 0x0000, 0x0001,
+	0x0004, 0x0336, 0x0000, 0x1810, 0x0004, 0x0336, 0x0000, 0x8074,
+	0x0008, 0xf000, 0x0000, 0x0d30, 0x0002, 0x3a42, 0x0003, 0x8ac3,
+	0x0000, 0x15fc, 0x0003, 0xb06a, 0x0003, 0x0013, 0x0000, 0x8074,
+	0x0000, 0x0501, 0x0008, 0x8010, 0x0008, 0x000c, 0x0004, 0x0336,
+	0x0003, 0x0013, 0x0009, 0xbbe0, 0x0008, 0x0030, 0x000b, 0x8adf,
+	0x0000, 0x18fe, 0x0009, 0x3ce0, 0x0003, 0x0adc, 0x0008, 0x15fe,
+	0x0009, 0x3ce0, 0x0003, 0x0adc, 0x0008, 0x13fe, 0x0009, 0x3ce0,
+	0x0003, 0x8ad8, 0x0004, 0x0324, 0x0008, 0x0d26, 0x000b, 0x02d9,
+	0x000c, 0x0326, 0x0008, 0x8076, 0x0000, 0x0040, 0x000b, 0x0321,
+	0x0008, 0x8076, 0x0008, 0x0041, 0x000b, 0x0321, 0x0009, 0xbbe0,
+	0x0000, 0x0032, 0x0003, 0x8ae4, 0x0008, 0x3c1e, 0x000b, 0x0321,
+	0x0009, 0xbbe0, 0x0000, 0x0037, 0x000b, 0x8b06, 0x0000, 0x18fe,
+	0x0009, 0x3ce0, 0x000b, 0x8adc, 0x0008, 0x8076, 0x0000, 0x0040,
+	0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x000d, 0x0009, 0xa6d0,
+	0x0008, 0x0000, 0x0008, 0x7f04, 0x0001, 0xa7d0, 0x0008, 0x0000,
+	0x0000, 0x7f06, 0x0001, 0xa8d0, 0x0008, 0x0000, 0x0008, 0x7f08,
+	0x0009, 0xa9d0, 0x0008, 0x0000, 0x0000, 0x7f0a, 0x0000, 0x8066,
+	0x0000, 0x0422, 0x000b, 0xc2fd, 0x0004, 0x032b, 0x0008, 0x8054,
+	0x0000, 0x0004, 0x0000, 0x8074, 0x0008, 0xf000, 0x0000, 0x8072,
+	0x0000, 0x8000, 0x0003, 0x02bd, 0x0009, 0xbbe0, 0x0000, 0x0038,
+	0x000b, 0x8b18, 0x0000, 0x18fe, 0x0009, 0x3ce0, 0x000b, 0x0b15,
+	0x0008, 0x15fe, 0x0009, 0x3ce0, 0x0003, 0x8ad2, 0x000c, 0x0326,
+	0x0008, 0x8076, 0x0000, 0x0040, 0x0000, 0x8072, 0x0000, 0x8000,
+	0x0003, 0x036d, 0x0008, 0x8076, 0x0008, 0x0042, 0x000b, 0x0321,
+	0x0009, 0xbbe0, 0x0000, 0x0016, 0x000b, 0x8b21, 0x0002, 0x3a44,
+	0x0003, 0x8816, 0x0000, 0x8072, 0x0000, 0x8000, 0x000f, 0x8000,
+	0x0003, 0x0013, 0x0000, 0x8072, 0x0000, 0x8000, 0x0003, 0x0013,
+	0x0002, 0x1430, 0x000b, 0x0327, 0x000a, 0x3d30, 0x0000, 0x7f00,
+	0x0001, 0xbc80, 0x0000, 0x0007, 0x0003, 0x032f, 0x000a, 0x1930,
+	0x0000, 0x7f00, 0x0001, 0x9880, 0x0000, 0x0007, 0x0000, 0x8060,
+	0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x000a,
+	0x0003, 0xc334, 0x000f, 0x4000, 0x0003, 0x2336, 0x0008, 0x0870,
+	0x000f, 0x4000, 0x0009, 0xbac0, 0x0008, 0x0090, 0x0003, 0x0b3f,
+	0x0000, 0x8074, 0x0000, 0x0706, 0x000b, 0x0341, 0x0000, 0x8074,
+	0x0000, 0x0703, 0x000f, 0x4000, 0x0008, 0x8010, 0x0000, 0x0023,
+	0x000b, 0x037b, 0x0008, 0x8010, 0x0000, 0x0008, 0x000b, 0x037b,
+	0x0008, 0x8010, 0x0008, 0x0022, 0x000b, 0x037b, 0x0004, 0x032b,
+	0x0008, 0x8010, 0x0000, 0x0007, 0x0004, 0x0336, 0x0000, 0x1810,
+	0x0004, 0x0336, 0x0003, 0x0385, 0x0004, 0x032b, 0x0008, 0x8010,
+	0x0008, 0x001b, 0x0004, 0x0336, 0x0000, 0x1810, 0x0004, 0x0336,
+	0x0000, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30, 0x0003, 0x0013,
+	0x0008, 0x8010, 0x0008, 0x0009, 0x000b, 0x037b, 0x0008, 0x8010,
+	0x0008, 0x0005, 0x000b, 0x037b, 0x0008, 0x808c, 0x0000, 0x0001,
+	0x0007, 0x0000, 0x0008, 0x8010, 0x0000, 0x0004, 0x000a, 0x4143,
+	0x0003, 0x0878, 0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x0d2a,
+	0x000b, 0x037b, 0x0008, 0x8010, 0x0008, 0x0003, 0x000b, 0x037d,
+	0x0008, 0x8010, 0x0000, 0x000b, 0x000b, 0x037d, 0x0008, 0x8010,
+	0x0000, 0x0002, 0x000b, 0x037d, 0x0002, 0x3a47, 0x000b, 0x8a54,
+	0x0008, 0x8010, 0x0008, 0x0006, 0x000b, 0x037d, 0x0000, 0x8074,
+	0x0008, 0xf000, 0x0004, 0x0336, 0x0004, 0x0339, 0x000a, 0x3a40,
+	0x000b, 0x0813, 0x0008, 0x8010, 0x0008, 0x000c, 0x0004, 0x0336,
+	0x0003, 0x0013, 0x0000, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30,
+	0x0002, 0x2e4d, 0x0002, 0x2e4d, 0x0003, 0x0b8e, 0x0008, 0x8054,
+	0x0000, 0x0019, 0x0003, 0x0013, 0x0008, 0x8054, 0x0008, 0x0009,
+	0x0003, 0x0013, 0x0002, 0x3a44, 0x0003, 0x8813, 0x0003, 0x0370,
+	0xed0b, 0x60bf
 };
-unsigned short rseqflx_code_length01 = 0x071c;
+unsigned short rseqflx_code_length01 = 0x072a;
 /*
  *
  */
 
 unsigned long xseqflx_code_addr01 = 0x0001e000 ;
 unsigned short xseqflx_code01[] = { 
-0x0013, 0x0003, 0x0000, 0x0fe2, 0x0001, 0xe000, 0x0005, 0x0032,
+0x0013, 0x0003, 0x0000, 0x1036, 0x0001, 0xe000, 0x0005, 0x0032,
 	0x0000, 0x0010, 0x0015, 0x0033, 0x0010, 0xbb39, 0x000b, 0x8007,
 	0x0004, 0x0107, 0x0004, 0x0119, 0x0010, 0xc000, 0x0000, 0xc001,
 	0x0000, 0xc0b0, 0x0010, 0xc0b1, 0x0010, 0xc0b2, 0x0000, 0xc0b3,
@@ -6912,14 +6916,14 @@
 	0x0010, 0xff00, 0x0005, 0x00d0, 0x0010, 0xff00, 0x0015, 0x00d1,
 	0x0010, 0xff00, 0x0012, 0x3a40, 0x000b, 0x1031, 0x0002, 0x7940,
 	0x000b, 0x112b, 0x0002, 0x3a42, 0x001b, 0x1035, 0x0003, 0xb035,
-	0x0013, 0xa1cd, 0x0002, 0x3a41, 0x001b, 0x1039, 0x0012, 0x7941,
-	0x000b, 0x12eb, 0x0013, 0xe051, 0x0012, 0xd042, 0x0003, 0x103f,
+	0x0003, 0xa1d1, 0x0002, 0x3a41, 0x001b, 0x1039, 0x0012, 0x7941,
+	0x001b, 0x1306, 0x0013, 0xe051, 0x0012, 0xd042, 0x0003, 0x103f,
 	0x0000, 0x75ff, 0x0002, 0xff41, 0x000b, 0x1051, 0x0000, 0x0cfe,
-	0x0013, 0x6047, 0x0011, 0x02e8, 0x0010, 0x0000, 0x0003, 0x1371,
-	0x0011, 0x02e8, 0x0010, 0x0005, 0x0013, 0x13fe, 0x0012, 0xd042,
+	0x0013, 0x6047, 0x0011, 0x02e8, 0x0010, 0x0000, 0x0003, 0x1390,
+	0x0011, 0x02e8, 0x0010, 0x0005, 0x0013, 0x141d, 0x0012, 0xd042,
 	0x0013, 0x104c, 0x0000, 0x75ff, 0x0012, 0xff40, 0x000b, 0x1051,
 	0x0000, 0x12fe, 0x0003, 0x6051, 0x0001, 0x0fe8, 0x0010, 0x0000,
-	0x0003, 0x15e8, 0x0015, 0x0030, 0x0000, 0x0400, 0x0010, 0xc131,
+	0x0013, 0x160e, 0x0015, 0x0030, 0x0000, 0x0400, 0x0010, 0xc131,
 	0x0015, 0x0033, 0x0010, 0xb211, 0x001b, 0x8056, 0x0010, 0xb2ff,
 	0x0001, 0xb3e0, 0x000c, 0x10c9, 0x000b, 0xf02d, 0x0011, 0x3be8,
 	0x0000, 0x0010, 0x000b, 0x106e, 0x0000, 0x0afe, 0x001b, 0x6062,
@@ -6944,11 +6948,11 @@
 	0x001b, 0x10b8, 0x0001, 0x0fe8, 0x0010, 0x0000, 0x0003, 0x10b2,
 	0x0001, 0x0fe8, 0x0000, 0x0002, 0x0003, 0x10b2, 0x0015, 0x0039,
 	0x0010, 0x1010, 0x0013, 0x00c6, 0x0015, 0x0039, 0x0000, 0x5040,
-	0x0015, 0x00b8, 0x0000, 0x0008, 0x0014, 0x07ed, 0x0013, 0x00c6,
+	0x0015, 0x00b8, 0x0000, 0x0008, 0x0014, 0x0817, 0x0013, 0x00c6,
 	0x0011, 0x3be8, 0x0010, 0x0017, 0x001b, 0x10bd, 0x0010, 0x3cc3,
 	0x0013, 0x00c6, 0x0011, 0x3be8, 0x0010, 0x0018, 0x000b, 0x10c2,
 	0x0000, 0x3cc2, 0x0013, 0x00c6, 0x0005, 0x00ce, 0x0000, 0x0001,
-	0x0000, 0x3bcf, 0x0014, 0x07b1, 0x0015, 0x0039, 0x0000, 0x8000,
+	0x0000, 0x3bcf, 0x0004, 0x07d9, 0x0015, 0x0039, 0x0000, 0x8000,
 	0x0013, 0x002d, 0x0001, 0xb288, 0x0000, 0x0002, 0x0001, 0xc180,
 	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x80cf,
 	0x0002, 0xb200, 0x0011, 0xffc8, 0x0000, 0x0007, 0x0010, 0xffb2,
@@ -6977,436 +6981,446 @@
 	0x0012, 0xff40, 0x000b, 0x1031, 0x0015, 0x00d1, 0x0010, 0x0101,
 	0x0003, 0x9130, 0x0005, 0x0079, 0x0000, 0x0001, 0x0003, 0x9133,
 	0x0015, 0x00d1, 0x0000, 0x0100, 0x0011, 0x02e8, 0x0000, 0x0002,
-	0x0003, 0x1152, 0x0011, 0x02e8, 0x0000, 0x0001, 0x0013, 0x116a,
-	0x0011, 0x02e8, 0x0000, 0x0004, 0x0013, 0x1188, 0x0011, 0x02e8,
-	0x0010, 0x0003, 0x0003, 0x11b9, 0x0005, 0x0002, 0x0010, 0x0000,
+	0x0013, 0x1156, 0x0011, 0x02e8, 0x0000, 0x0001, 0x0003, 0x116e,
+	0x0011, 0x02e8, 0x0000, 0x0004, 0x0003, 0x118c, 0x0011, 0x02e8,
+	0x0010, 0x0003, 0x0013, 0x11bd, 0x0005, 0x0002, 0x0010, 0x0000,
 	0x0000, 0xc00e, 0x0000, 0xc00d, 0x0010, 0xc003, 0x0015, 0x0030,
 	0x0000, 0x0400, 0x0001, 0xbd88, 0x0010, 0x0009, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x814e, 0x0012, 0xd042,
-	0x0013, 0x1031, 0x0003, 0x004c, 0x0012, 0x7849, 0x0003, 0x11c7,
+	0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x814e, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x8152, 0x0012, 0xd042,
+	0x0013, 0x1031, 0x0003, 0x004c, 0x0012, 0x7849, 0x0003, 0x11cb,
 	0x0010, 0x0dfe, 0x0003, 0x6144, 0x0012, 0x0c10, 0x0010, 0xff0c,
 	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x815f,
-	0x0010, 0xb3fe, 0x0013, 0x6167, 0x0010, 0xb30b, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x000b, 0x8165, 0x0013, 0x01bc, 0x0000, 0xc00b,
-	0x0010, 0xc00a, 0x0013, 0x01bc, 0x0000, 0x78b0, 0x0012, 0xb044,
-	0x0003, 0x11c7, 0x0002, 0xb049, 0x0003, 0x11c7, 0x0010, 0x71ff,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x8163,
+	0x0010, 0xb3fe, 0x0013, 0x616b, 0x0010, 0xb30b, 0x0015, 0x0033,
+	0x0010, 0xc00a, 0x000b, 0x8169, 0x0003, 0x01c0, 0x0000, 0xc00b,
+	0x0010, 0xc00a, 0x0003, 0x01c0, 0x0000, 0x78b0, 0x0012, 0xb044,
+	0x0003, 0x11cb, 0x0002, 0xb049, 0x0003, 0x11cb, 0x0010, 0x71ff,
 	0x0012, 0xff38, 0x0010, 0xff71, 0x0010, 0x0dfe, 0x0003, 0x6142,
 	0x0012, 0x0c10, 0x0010, 0xff0c, 0x0015, 0x0030, 0x0000, 0x0400,
 	0x0011, 0x0d88, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb309, 0x000b, 0x817d, 0x0010, 0xb3fe, 0x0013, 0x6185,
-	0x0000, 0xb309, 0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x8183,
-	0x0013, 0x01bc, 0x0010, 0xc009, 0x0000, 0xc008, 0x0013, 0x01bc,
-	0x0000, 0x78b0, 0x0012, 0xb044, 0x0003, 0x11c7, 0x0002, 0xb049,
-	0x0003, 0x11c7, 0x0010, 0x71ff, 0x0012, 0xff38, 0x0010, 0xff71,
+	0x0000, 0xb309, 0x000b, 0x8181, 0x0010, 0xb3fe, 0x0013, 0x6189,
+	0x0000, 0xb309, 0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x8187,
+	0x0003, 0x01c0, 0x0010, 0xc009, 0x0000, 0xc008, 0x0003, 0x01c0,
+	0x0000, 0x78b0, 0x0012, 0xb044, 0x0003, 0x11cb, 0x0002, 0xb049,
+	0x0003, 0x11cb, 0x0010, 0x71ff, 0x0012, 0xff38, 0x0010, 0xff71,
 	0x0010, 0x0dfe, 0x0003, 0x6142, 0x0012, 0x0c10, 0x0010, 0xff0c,
 	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309, 0x001b, 0x819b,
-	0x0010, 0xb3fe, 0x0003, 0x61a3, 0x0000, 0xb305, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x001b, 0x81a1, 0x0003, 0x01a5, 0x0010, 0xc005,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x819f,
+	0x0010, 0xb3fe, 0x0013, 0x61a7, 0x0000, 0xb305, 0x0015, 0x0033,
+	0x0010, 0xc00a, 0x000b, 0x81a5, 0x0003, 0x01a9, 0x0010, 0xc005,
 	0x0000, 0xc004, 0x0002, 0x033f, 0x0002, 0xff27, 0x0000, 0x0db8,
-	0x0004, 0x0366, 0x0000, 0x0db8, 0x0014, 0x07ed, 0x0015, 0x0030,
+	0x0014, 0x0385, 0x0000, 0x0db8, 0x0014, 0x0817, 0x0015, 0x0030,
 	0x0000, 0x0400, 0x0011, 0xbc88, 0x0010, 0x0000, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x81b2, 0x0011, 0xb3e8,
+	0x0015, 0x0033, 0x0000, 0xb309, 0x001b, 0x81b6, 0x0011, 0xb3e8,
 	0x0000, 0x0002, 0x000b, 0x1142, 0x0005, 0x0002, 0x0010, 0x0005,
-	0x0003, 0x0144, 0x0012, 0x7849, 0x0003, 0x11c7, 0x0003, 0x0144,
-	0x0000, 0x0db8, 0x0012, 0x0345, 0x001b, 0x11c2, 0x0002, 0x033f,
-	0x0004, 0x0366, 0x0003, 0x0142, 0x0002, 0x033f, 0x0002, 0xff27,
-	0x0004, 0x0366, 0x0014, 0x07ed, 0x0003, 0x0142, 0x0015, 0x00b8,
-	0x0000, 0x0001, 0x0015, 0x003a, 0x0010, 0x0101, 0x0014, 0x07ed,
-	0x0013, 0x014f, 0x0000, 0x2bba, 0x0003, 0xb1ce, 0x0005, 0x002a,
-	0x0000, 0x0002, 0x0001, 0xbac8, 0x0000, 0x0700, 0x000b, 0x12a6,
-	0x0011, 0x15e8, 0x0000, 0x0002, 0x0013, 0x1221, 0x0011, 0x15e8,
-	0x0000, 0x0001, 0x0013, 0x11dd, 0x0005, 0x0015, 0x0010, 0x0000,
-	0x0013, 0x0204, 0x0005, 0x0015, 0x0010, 0x0000, 0x0002, 0xba43,
-	0x0013, 0x1205, 0x0013, 0xb1e1, 0x0005, 0x002a, 0x0000, 0x0004,
-	0x0012, 0xba42, 0x0003, 0x120b, 0x0012, 0x104b, 0x001b, 0x1204,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033,
-	0x0000, 0x1b2a, 0x000b, 0x81ed, 0x0010, 0x20b0, 0x0010, 0x21b1,
-	0x0010, 0x22b2, 0x0010, 0x23b3, 0x0010, 0x24b4, 0x0010, 0x25b5,
-	0x0010, 0x28b8, 0x0010, 0x29b9, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x0007, 0x0015, 0x0033, 0x0010, 0xb032, 0x001b, 0x81fb,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0010, 0x000f, 0x0015, 0x0033,
-	0x0010, 0xb812, 0x001b, 0x8201, 0x0005, 0x0015, 0x0010, 0x0000,
-	0x0013, 0x0035, 0x0000, 0x1efe, 0x0013, 0x6219, 0x0014, 0x024b,
-	0x0000, 0x1efe, 0x000c, 0x624b, 0x0013, 0x0204, 0x0000, 0x1a30,
-	0x0005, 0x0031, 0x0000, 0x0020, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x001b, 0x8210, 0x0002, 0xb02f, 0x0000, 0xffb0, 0x0005, 0x0031,
-	0x0000, 0x0020, 0x0015, 0x0033, 0x0000, 0xb00a, 0x000b, 0x8217,
-	0x0003, 0x01e8, 0x0015, 0x00b8, 0x0010, 0x0005, 0x0014, 0x07ed,
-	0x0000, 0x13b8, 0x0015, 0x003a, 0x0010, 0x0404, 0x0014, 0x07ed,
-	0x0013, 0x0204, 0x0005, 0x0015, 0x0000, 0x0001, 0x0012, 0xba42,
-	0x0013, 0x122e, 0x0003, 0xb225, 0x0010, 0x2bff, 0x0012, 0xff4f,
-	0x001b, 0x11cd, 0x0002, 0xba43, 0x001b, 0x120b, 0x0000, 0x1efe,
-	0x000c, 0x624b, 0x0013, 0x0204, 0x0010, 0x28b8, 0x0010, 0x29b9,
-	0x0004, 0x02bc, 0x0002, 0x3a42, 0x001b, 0x1204, 0x0000, 0x1c30,
-	0x0015, 0x00ff, 0x0000, 0x0002, 0x0002, 0x1f43, 0x001b, 0x123b,
-	0x0001, 0xff88, 0x0000, 0x0002, 0x0013, 0x023d, 0x0001, 0xff88,
-	0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb011,
-	0x001b, 0x8240, 0x0000, 0xb0ff, 0x0011, 0x16a0, 0x0000, 0xff16,
-	0x000b, 0x24e2, 0x0002, 0xb100, 0x0003, 0x0248, 0x0010, 0xb1ff,
-	0x0001, 0x17a0, 0x0010, 0xff17, 0x0013, 0x020b, 0x0000, 0x16ff,
-	0x0001, 0x18a0, 0x0010, 0xff00, 0x001b, 0x2252, 0x0002, 0x1700,
-	0x0013, 0x12a5, 0x0003, 0x0253, 0x0010, 0x17ff, 0x0011, 0x19a0,
-	0x0013, 0x22a5, 0x0011, 0x00d0, 0x0013, 0x12a5, 0x0000, 0x1c30,
-	0x0000, 0x1b31, 0x0015, 0x0033, 0x0000, 0xb131, 0x001b, 0x825b,
-	0x0013, 0xb25c, 0x0000, 0xb120, 0x0010, 0xb221, 0x0002, 0x1f43,
-	0x001b, 0x1268, 0x0010, 0xc022, 0x0000, 0xc023, 0x0000, 0xb324,
-	0x0000, 0xb425, 0x0010, 0xb3b5, 0x0000, 0xb4b6, 0x0003, 0x026c,
-	0x0000, 0xb322, 0x0000, 0xb423, 0x0000, 0xb524, 0x0010, 0xb625,
-	0x0013, 0xb26c, 0x0005, 0x002a, 0x0000, 0x0001, 0x0012, 0x1500,
-	0x0000, 0xff15, 0x0000, 0x16ff, 0x0001, 0xb580, 0x0000, 0xff16,
-	0x000b, 0x2277, 0x0002, 0x1700, 0x0003, 0x0278, 0x0010, 0x17ff,
-	0x0001, 0xb680, 0x0010, 0xff17, 0x0012, 0x1e10, 0x0010, 0xff1e,
-	0x0003, 0x62a5, 0x0002, 0x1d00, 0x0010, 0xff1d, 0x0010, 0xc030,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8283,
-	0x0010, 0xb0fe, 0x000b, 0x62a4, 0x0000, 0x1c30, 0x0005, 0x0031,
-	0x0000, 0x0001, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x828b,
-	0x0010, 0xb0fe, 0x000b, 0x6291, 0x0005, 0x00ce, 0x0010, 0x0005,
-	0x0003, 0x07b1, 0x0010, 0xb01c, 0x0000, 0x1c30, 0x0005, 0x0031,
-	0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8297,
-	0x0001, 0xb0c8, 0x0010, 0x00ff, 0x0000, 0xff1f, 0x0010, 0xc030,
-	0x0011, 0xbe80, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x82a0, 0x0000, 0xb01d, 0x0010, 0x1dff, 0x0013, 0x027f,
-	0x0000, 0xb01b, 0x0017, 0x4000, 0x0002, 0x3a41, 0x0003, 0x12ae,
-	0x0003, 0xb2a8, 0x0005, 0x002a, 0x0000, 0x0004, 0x0005, 0x0015,
-	0x0010, 0x0000, 0x0013, 0x0204, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b2a, 0x001b, 0x82b3,
-	0x0015, 0x00b8, 0x0000, 0x0004, 0x0014, 0x07ed, 0x0000, 0x13b8,
-	0x0015, 0x003a, 0x0010, 0x0404, 0x0014, 0x07ed, 0x0013, 0x0039,
-	0x0002, 0x1e00, 0x0010, 0xff1e, 0x0012, 0x1d10, 0x0010, 0xff1d,
-	0x0010, 0xc030, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x001b, 0x82c4, 0x0010, 0xb0fe, 0x000b, 0x62e9, 0x0000, 0x1cff,
-	0x0001, 0x1ae0, 0x0003, 0x12d3, 0x0000, 0x1c30, 0x0005, 0x0031,
-	0x0010, 0x0000, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82cf,
-	0x0010, 0xb0fe, 0x000b, 0x62d3, 0x0000, 0x1aff, 0x0000, 0xff1c,
-	0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0019, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x001b, 0x82d9, 0x0001, 0xb0c8, 0x0010, 0x000f,
-	0x0000, 0xff1f, 0x0001, 0xbf80, 0x0010, 0xff1d, 0x0010, 0xc030,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82e3,
-	0x0010, 0xb0fe, 0x000b, 0x62e9, 0x0005, 0x00ce, 0x0010, 0x0006,
-	0x0003, 0x07b1, 0x0000, 0xb01b, 0x0017, 0x4000, 0x0010, 0x79b0,
-	0x0000, 0xd0ff, 0x0012, 0xff40, 0x001b, 0x1039, 0x0015, 0x00d1,
-	0x0010, 0x0101, 0x0013, 0x92f1, 0x0005, 0x0079, 0x0000, 0x0002,
-	0x0013, 0x92f4, 0x0015, 0x00d1, 0x0000, 0x0100, 0x0010, 0x13fe,
-	0x0003, 0x6329, 0x0012, 0xb04e, 0x000b, 0x133e, 0x0012, 0x784a,
-	0x0003, 0x1344, 0x0000, 0x75ff, 0x0011, 0xffc8, 0x0010, 0x1800,
-	0x001b, 0x1344, 0x0001, 0x0fe8, 0x0000, 0x0001, 0x000b, 0x130d,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000e,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0x8f0a, 0x000b, 0x830b,
-	0x0003, 0x034a, 0x0001, 0x0fe8, 0x0000, 0x0002, 0x001b, 0x1318,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0005, 0x0031, 0x0000, 0x001a,
-	0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x8316, 0x0003, 0x034a,
-	0x0001, 0x0fe8, 0x0010, 0x0000, 0x0013, 0x131f, 0x0005, 0x00ce,
-	0x0000, 0x0007, 0x0010, 0x0fcf, 0x0013, 0x07ab, 0x0000, 0x13b8,
-	0x0002, 0x1045, 0x0003, 0x1327, 0x0012, 0x103f, 0x0002, 0xff27,
-	0x0004, 0x0366, 0x0014, 0x07ed, 0x0003, 0x0329, 0x0012, 0x103f,
-	0x0004, 0x0366, 0x0015, 0x000f, 0x0010, 0x0000, 0x0002, 0x3944,
-	0x0013, 0x1332, 0x0015, 0x0039, 0x0000, 0x5040, 0x0015, 0x00b8,
-	0x0000, 0x0008, 0x0014, 0x07ed, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0001, 0xbd88, 0x0010, 0x000c, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x001b, 0x8339, 0x0010, 0xc014, 0x0000, 0xc013,
-	0x0000, 0xc010, 0x0013, 0x0039, 0x0015, 0x00b8, 0x0010, 0x0003,
-	0x0015, 0x003a, 0x0010, 0x0202, 0x0014, 0x07ed, 0x0003, 0x033d,
-	0x0015, 0x00b8, 0x0000, 0x0002, 0x0015, 0x003a, 0x0010, 0x0202,
-	0x0014, 0x07ed, 0x0003, 0x033d, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x1388, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x000b, 0x8351, 0x0011, 0x1388, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x8357,
-	0x0010, 0xb0fe, 0x0013, 0x635c, 0x0000, 0xb012, 0x0003, 0x035e,
-	0x0010, 0xc012, 0x0010, 0xc011, 0x0012, 0x104b, 0x0013, 0x131f,
-	0x0002, 0x103b, 0x0010, 0xff03, 0x0005, 0x0002, 0x0010, 0x0000,
-	0x0000, 0xc00d, 0x0003, 0x031f, 0x0000, 0xffb0, 0x0010, 0xc3b1,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xb888, 0x0010, 0x0011,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x836f,
-	0x0017, 0x4000, 0x0012, 0x3a43, 0x0013, 0x1380, 0x0015, 0x003a,
-	0x0000, 0x0800, 0x0010, 0x0db0, 0x0003, 0x6380, 0x0000, 0x0bff,
-	0x0001, 0xb0e0, 0x0003, 0x13a6, 0x0010, 0x09ff, 0x0001, 0xb0e0,
-	0x0013, 0x138a, 0x0010, 0x05ff, 0x0001, 0xb0e0, 0x0003, 0x1384,
-	0x0000, 0xc00e, 0x0000, 0x05fe, 0x0013, 0x6387, 0x0000, 0x050d,
-	0x0005, 0x0002, 0x0000, 0x0004, 0x0003, 0x03a1, 0x0000, 0x09fe,
-	0x0013, 0x63a3, 0x0000, 0x090d, 0x0005, 0x0002, 0x0000, 0x0001,
-	0x0014, 0x0405, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09,
-	0x000b, 0x8394, 0x0011, 0x03c8, 0x0010, 0x000f, 0x0000, 0xffb6,
-	0x0011, 0xb6e8, 0x0000, 0x0001, 0x0013, 0x1499, 0x0011, 0xb6e8,
-	0x0000, 0x0002, 0x0013, 0x14bb, 0x0011, 0xb6e8, 0x0010, 0x0003,
-	0x0003, 0x15a6, 0x0004, 0x07b6, 0x0013, 0x0404, 0x0010, 0x0bfe,
-	0x0013, 0x6404, 0x0010, 0x0b0d, 0x0005, 0x0002, 0x0000, 0x0002,
-	0x0014, 0x0405, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09,
-	0x000b, 0x83b0, 0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x0021,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x83b6, 0x0001, 0xb0a8,
-	0x0000, 0x199a, 0x0013, 0x23bc, 0x0005, 0x00b0, 0x0000, 0x1999,
-	0x0012, 0xb050, 0x0000, 0xffb0, 0x0002, 0xff50, 0x0002, 0xff50,
-	0x0001, 0xb080, 0x0000, 0xffb0, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0010, 0x0006, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb00a, 0x001b, 0x83c9, 0x0000, 0xb930, 0x0005, 0x0031,
-	0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x83cf,
-	0x0001, 0xb0c8, 0x0010, 0x00ff, 0x0001, 0xffe8, 0x0010, 0x0048,
-	0x000b, 0x1414, 0x0005, 0x0002, 0x0010, 0x0006, 0x0012, 0x0c10,
-	0x0010, 0xff0c, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109,
-	0x000b, 0x83e0, 0x0000, 0xb10b, 0x000b, 0x63e4, 0x0010, 0xb10a,
-	0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x83e6, 0x0002, 0x032b,
-	0x0010, 0xff03, 0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0x030a, 0x001b, 0x83ee, 0x0000, 0x11fe,
-	0x000b, 0x63f3, 0x0000, 0x0d12, 0x0013, 0x03fc, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0001, 0x1188, 0x0010, 0x0003, 0x0000, 0xff31,
-	0x0010, 0x0db0, 0x0015, 0x0033, 0x0000, 0xb00a, 0x000b, 0x83fb,
-	0x0000, 0x0d11, 0x0013, 0x0404, 0x0000, 0x05fe, 0x0013, 0x6404,
-	0x0005, 0x0002, 0x0000, 0x0004, 0x0000, 0x050d, 0x0004, 0x07b6,
-	0x0013, 0x0047, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x0309,
-	0x000b, 0x840c, 0x0011, 0x0d88, 0x0010, 0x0005, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb909, 0x000b, 0x8412, 0x0017, 0x4000,
-	0x0005, 0x00b6, 0x0010, 0x0600, 0x0014, 0x05d6, 0x0004, 0x0483,
-	0x0000, 0xb05a, 0x0000, 0xb15b, 0x0005, 0x0054, 0x0010, 0x0829,
-	0x0010, 0x0d58, 0x0015, 0x0059, 0x0010, 0xffff, 0x0000, 0xb930,
-	0x0005, 0x0031, 0x0010, 0x001e, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x8424, 0x0000, 0xb05c, 0x0005, 0x0031, 0x0000, 0x001f,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x842a, 0x0001, 0xb0c8,
-	0x0010, 0x000f, 0x001b, 0x1431, 0x0015, 0x00ff, 0x0010, 0x0005,
-	0x0003, 0x0439, 0x0002, 0xb040, 0x0013, 0x1436, 0x0015, 0x00ff,
-	0x0000, 0x0004, 0x0003, 0x0439, 0x0001, 0xb0c8, 0x0010, 0x0006,
-	0x0002, 0xff60, 0x0010, 0xffb2, 0x0011, 0x0d88, 0x0000, 0x0019,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109, 0x000b, 0x843f,
-	0x0012, 0xb170, 0x0011, 0xffc8, 0x0010, 0xff00, 0x0011, 0xb2d0,
-	0x0010, 0xff60, 0x0002, 0xb045, 0x0003, 0x144a, 0x0015, 0x00b2,
-	0x0000, 0x0002, 0x0013, 0x0454, 0x0002, 0xb046, 0x0003, 0x144f,
-	0x0015, 0x00b2, 0x0000, 0x0001, 0x0013, 0x0454, 0x0015, 0x00b2,
-	0x0010, 0x0000, 0x0000, 0xc0b0, 0x0010, 0xc0b1, 0x0003, 0x045a,
-	0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x002b, 0x0015, 0x0033,
-	0x0000, 0xb011, 0x000b, 0x8459, 0x0010, 0xb16a, 0x0010, 0xb06b,
-	0x0000, 0xb261, 0x0015, 0x0044, 0x0010, 0x0018, 0x0005, 0x0031,
-	0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0x6241, 0x000b, 0x8463,
-	0x0013, 0x9464, 0x0015, 0x00a0, 0x0000, 0x0020, 0x0012, 0xd041,
-	0x001b, 0x1467, 0x0015, 0x00d1, 0x0010, 0x0202, 0x0013, 0x946b,
-	0x0000, 0x75ff, 0x0011, 0xffc8, 0x0000, 0x1804, 0x0001, 0xffd8,
-	0x0010, 0x0009, 0x0003, 0x9471, 0x0000, 0xff75, 0x0013, 0x9473,
-	0x0015, 0x00d1, 0x0000, 0x0200, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0001, 0xbd88, 0x0000, 0x0008, 0x0000, 0xff31, 0x0015, 0x00b1,
-	0x0010, 0x07d0, 0x0005, 0x00b0, 0x0010, 0x0009, 0x0015, 0x0033,
-	0x0000, 0xb012, 0x000b, 0x8481, 0x0013, 0x0404, 0x0000, 0xba30,
-	0x0005, 0x0031, 0x0000, 0x0031, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x8488, 0x0002, 0xb040, 0x0013, 0x1496, 0x0000, 0xb7b0,
-	0x0000, 0xb9b1, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0000, 0x0013, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012,
-	0x001b, 0x8494, 0x0013, 0x0498, 0x0010, 0xc0b1, 0x0000, 0xc0b0,
-	0x0017, 0x4000, 0x0005, 0x00b6, 0x0010, 0x0500, 0x0014, 0x05d6,
-	0x0005, 0x0054, 0x0010, 0x0889, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x000b, 0x84a5, 0x0010, 0xb058, 0x0000, 0x0d59,
+	0x0003, 0x0144, 0x0012, 0x7849, 0x0003, 0x11cb, 0x0003, 0x0144,
+	0x0000, 0x0db8, 0x0012, 0x0345, 0x000b, 0x11c6, 0x0002, 0x033f,
+	0x0014, 0x0385, 0x0003, 0x0142, 0x0002, 0x033f, 0x0002, 0xff27,
+	0x0014, 0x0385, 0x0014, 0x0817, 0x0003, 0x0142, 0x0015, 0x00b8,
+	0x0000, 0x0001, 0x0015, 0x003a, 0x0010, 0x0101, 0x0014, 0x0817,
+	0x0003, 0x0153, 0x0001, 0x2bd8, 0x0010, 0x0000, 0x0000, 0xffba,
+	0x0013, 0xb1d4, 0x0005, 0x002a, 0x0000, 0x0002, 0x0001, 0xbac8,
+	0x0000, 0x0700, 0x001b, 0x12c1, 0x0011, 0x15e8, 0x0000, 0x0002,
+	0x0003, 0x1237, 0x0011, 0x15e8, 0x0000, 0x0001, 0x0003, 0x11e3,
+	0x0005, 0x0015, 0x0010, 0x0000, 0x0013, 0x021a, 0x0005, 0x0015,
+	0x0010, 0x0000, 0x0002, 0xba43, 0x0013, 0x121b, 0x0013, 0xb1e7,
+	0x0005, 0x002a, 0x0000, 0x0004, 0x0012, 0xba42, 0x0013, 0x1221,
+	0x0012, 0x104b, 0x001b, 0x121a, 0x0000, 0x1a30, 0x0005, 0x0031,
+	0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b2a, 0x000b, 0x81f3,
+	0x0011, 0x20d8, 0x0010, 0x0000, 0x0000, 0xffb0, 0x0001, 0x21d8,
+	0x0010, 0x0000, 0x0010, 0xffb1, 0x0001, 0x22d8, 0x0010, 0x0000,
+	0x0010, 0xffb2, 0x0011, 0x23d8, 0x0010, 0x0000, 0x0000, 0xffb3,
+	0x0001, 0x24d8, 0x0010, 0x0000, 0x0010, 0xffb4, 0x0011, 0x25d8,
+	0x0010, 0x0000, 0x0000, 0xffb5, 0x0001, 0x28d8, 0x0010, 0x0000,
+	0x0010, 0xffb8, 0x0011, 0x29d8, 0x0010, 0x0000, 0x0000, 0xffb9,
+	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0007, 0x0015, 0x0033,
+	0x0010, 0xb032, 0x000b, 0x8211, 0x0000, 0x1a30, 0x0005, 0x0031,
+	0x0010, 0x000f, 0x0015, 0x0033, 0x0010, 0xb812, 0x000b, 0x8217,
+	0x0005, 0x0015, 0x0010, 0x0000, 0x0013, 0x0035, 0x0000, 0x1efe,
+	0x0013, 0x622f, 0x0014, 0x0266, 0x0000, 0x1efe, 0x000c, 0x6266,
+	0x0013, 0x021a, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0020,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8226, 0x0002, 0xb02f,
+	0x0000, 0xffb0, 0x0005, 0x0031, 0x0000, 0x0020, 0x0015, 0x0033,
+	0x0000, 0xb00a, 0x000b, 0x822d, 0x0003, 0x01ee, 0x0015, 0x00b8,
+	0x0010, 0x0005, 0x0014, 0x0817, 0x0000, 0x13b8, 0x0015, 0x003a,
+	0x0010, 0x0404, 0x0014, 0x0817, 0x0013, 0x021a, 0x0005, 0x0015,
+	0x0000, 0x0001, 0x0012, 0xba42, 0x0003, 0x1245, 0x0003, 0xb23b,
+	0x0001, 0x2bd8, 0x0010, 0x0000, 0x0012, 0xff4f, 0x000b, 0x11d1,
+	0x0002, 0xba43, 0x000b, 0x1221, 0x0000, 0x1efe, 0x000c, 0x6266,
+	0x0013, 0x021a, 0x0001, 0x28d8, 0x0010, 0x0000, 0x0010, 0xffb8,
+	0x0011, 0x29d8, 0x0010, 0x0000, 0x0000, 0xffb9, 0x0014, 0x02d7,
+	0x0002, 0x3a42, 0x001b, 0x121a, 0x0000, 0x1c30, 0x0015, 0x00ff,
+	0x0000, 0x0002, 0x0002, 0x1f43, 0x000b, 0x1256, 0x0001, 0xff88,
+	0x0000, 0x0002, 0x0013, 0x0258, 0x0001, 0xff88, 0x0000, 0x0004,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x825b,
+	0x0000, 0xb0ff, 0x0011, 0x16a0, 0x0000, 0xff16, 0x000b, 0x24e2,
+	0x0002, 0xb100, 0x0003, 0x0263, 0x0010, 0xb1ff, 0x0001, 0x17a0,
+	0x0010, 0xff17, 0x0003, 0x0221, 0x0000, 0x16ff, 0x0001, 0x18a0,
+	0x0010, 0xff00, 0x001b, 0x226d, 0x0002, 0x1700, 0x0013, 0x12c0,
+	0x0013, 0x026e, 0x0010, 0x17ff, 0x0011, 0x19a0, 0x0013, 0x22c0,
+	0x0011, 0x00d0, 0x0013, 0x12c0, 0x0000, 0x1c30, 0x0000, 0x1b31,
+	0x0015, 0x0033, 0x0000, 0xb131, 0x001b, 0x8276, 0x0013, 0xb277,
+	0x0000, 0xb120, 0x0010, 0xb221, 0x0002, 0x1f43, 0x001b, 0x1283,
+	0x0010, 0xc022, 0x0000, 0xc023, 0x0000, 0xb324, 0x0000, 0xb425,
+	0x0010, 0xb3b5, 0x0000, 0xb4b6, 0x0003, 0x0287, 0x0000, 0xb322,
+	0x0000, 0xb423, 0x0000, 0xb524, 0x0010, 0xb625, 0x0013, 0xb287,
+	0x0005, 0x002a, 0x0000, 0x0001, 0x0012, 0x1500, 0x0000, 0xff15,
+	0x0000, 0x16ff, 0x0001, 0xb580, 0x0000, 0xff16, 0x001b, 0x2292,
+	0x0002, 0x1700, 0x0003, 0x0293, 0x0010, 0x17ff, 0x0001, 0xb680,
+	0x0010, 0xff17, 0x0012, 0x1e10, 0x0010, 0xff1e, 0x0003, 0x62c0,
+	0x0002, 0x1d00, 0x0010, 0xff1d, 0x0010, 0xc030, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x829e, 0x0010, 0xb0fe,
+	0x000b, 0x62bf, 0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0001,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82a6, 0x0010, 0xb0fe,
+	0x001b, 0x62ac, 0x0005, 0x00ce, 0x0010, 0x0005, 0x0013, 0x07d9,
+	0x0010, 0xb01c, 0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0019,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82b2, 0x0001, 0xb0c8,
+	0x0010, 0x00ff, 0x0000, 0xff1f, 0x0010, 0xc030, 0x0011, 0xbe80,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82bb,
+	0x0000, 0xb01d, 0x0010, 0x1dff, 0x0003, 0x029a, 0x0000, 0xb01b,
+	0x0017, 0x4000, 0x0002, 0x3a41, 0x0013, 0x12c9, 0x0013, 0xb2c3,
+	0x0005, 0x002a, 0x0000, 0x0004, 0x0005, 0x0015, 0x0010, 0x0000,
+	0x0013, 0x021a, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002,
+	0x0015, 0x0033, 0x0000, 0x1b2a, 0x001b, 0x82ce, 0x0015, 0x00b8,
+	0x0000, 0x0004, 0x0014, 0x0817, 0x0000, 0x13b8, 0x0015, 0x003a,
+	0x0010, 0x0404, 0x0014, 0x0817, 0x0013, 0x0039, 0x0002, 0x1e00,
+	0x0010, 0xff1e, 0x0012, 0x1d10, 0x0010, 0xff1d, 0x0010, 0xc030,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82df,
+	0x0010, 0xb0fe, 0x001b, 0x6304, 0x0000, 0x1cff, 0x0001, 0x1ae0,
+	0x0013, 0x12ee, 0x0000, 0x1c30, 0x0005, 0x0031, 0x0010, 0x0000,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82ea, 0x0010, 0xb0fe,
+	0x001b, 0x62ee, 0x0000, 0x1aff, 0x0000, 0xff1c, 0x0000, 0x1c30,
+	0x0005, 0x0031, 0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009,
+	0x001b, 0x82f4, 0x0001, 0xb0c8, 0x0010, 0x000f, 0x0000, 0xff1f,
+	0x0001, 0xbf80, 0x0010, 0xff1d, 0x0010, 0xc030, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82fe, 0x0010, 0xb0fe,
+	0x001b, 0x6304, 0x0005, 0x00ce, 0x0010, 0x0006, 0x0013, 0x07d9,
+	0x0000, 0xb01b, 0x0017, 0x4000, 0x0010, 0x79b0, 0x0000, 0xd0ff,
+	0x0012, 0xff40, 0x001b, 0x1039, 0x0015, 0x00d1, 0x0010, 0x0101,
+	0x0013, 0x930c, 0x0005, 0x0079, 0x0000, 0x0002, 0x0013, 0x930f,
+	0x0015, 0x00d1, 0x0000, 0x0100, 0x0010, 0x13fe, 0x0013, 0x6344,
+	0x0012, 0xb04e, 0x000b, 0x135d, 0x0012, 0x784a, 0x0003, 0x1363,
+	0x0000, 0x75ff, 0x0011, 0xffc8, 0x0010, 0x1800, 0x001b, 0x1363,
+	0x0001, 0x0fe8, 0x0000, 0x0001, 0x001b, 0x1328, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000e, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0x8f0a, 0x000b, 0x8326, 0x0013, 0x0369,
+	0x0001, 0x0fe8, 0x0000, 0x0002, 0x001b, 0x1333, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0005, 0x0031, 0x0000, 0x001a, 0x0015, 0x0033,
+	0x0010, 0xc00a, 0x000b, 0x8331, 0x0013, 0x0369, 0x0001, 0x0fe8,
+	0x0010, 0x0000, 0x0003, 0x133a, 0x0005, 0x00ce, 0x0000, 0x0007,
+	0x0010, 0x0fcf, 0x0013, 0x07d3, 0x0000, 0x13b8, 0x0002, 0x1045,
+	0x0003, 0x1342, 0x0012, 0x103f, 0x0002, 0xff27, 0x0014, 0x0385,
+	0x0014, 0x0817, 0x0013, 0x0344, 0x0012, 0x103f, 0x0014, 0x0385,
+	0x0015, 0x000f, 0x0010, 0x0000, 0x0002, 0x3944, 0x0003, 0x134d,
+	0x0015, 0x0039, 0x0000, 0x5040, 0x0015, 0x00b8, 0x0000, 0x0008,
+	0x0014, 0x0817, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88,
+	0x0010, 0x000c, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a,
+	0x000b, 0x8354, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a,
+	0x000b, 0x8358, 0x0010, 0xc014, 0x0000, 0xc013, 0x0000, 0xc010,
+	0x0013, 0x0039, 0x0015, 0x00b8, 0x0010, 0x0003, 0x0015, 0x003a,
+	0x0010, 0x0202, 0x0014, 0x0817, 0x0013, 0x035c, 0x0015, 0x00b8,
+	0x0000, 0x0002, 0x0015, 0x003a, 0x0010, 0x0202, 0x0014, 0x0817,
+	0x0013, 0x035c, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388,
+	0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
+	0x000b, 0x8370, 0x0011, 0x1388, 0x0010, 0x0003, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x8376, 0x0010, 0xb0fe,
+	0x0013, 0x637b, 0x0000, 0xb012, 0x0013, 0x037d, 0x0010, 0xc012,
+	0x0010, 0xc011, 0x0012, 0x104b, 0x0003, 0x133a, 0x0002, 0x103b,
+	0x0010, 0xff03, 0x0005, 0x0002, 0x0010, 0x0000, 0x0000, 0xc00d,
+	0x0013, 0x033a, 0x0000, 0xffb0, 0x0010, 0xc3b1, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0001, 0xb888, 0x0010, 0x0011, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x838e, 0x0017, 0x4000,
+	0x0012, 0x3a43, 0x0003, 0x139f, 0x0015, 0x003a, 0x0000, 0x0800,
+	0x0010, 0x0db0, 0x0013, 0x639f, 0x0000, 0x0bff, 0x0001, 0xb0e0,
+	0x0003, 0x13c5, 0x0010, 0x09ff, 0x0001, 0xb0e0, 0x0003, 0x13a9,
+	0x0010, 0x05ff, 0x0001, 0xb0e0, 0x0003, 0x13a3, 0x0000, 0xc00e,
+	0x0000, 0x05fe, 0x0013, 0x63a6, 0x0000, 0x050d, 0x0005, 0x0002,
+	0x0000, 0x0004, 0x0013, 0x03c0, 0x0000, 0x09fe, 0x0003, 0x63c2,
+	0x0000, 0x090d, 0x0005, 0x0002, 0x0000, 0x0001, 0x0014, 0x0424,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0004,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09, 0x000b, 0x83b3,
+	0x0011, 0x03c8, 0x0010, 0x000f, 0x0000, 0xffb6, 0x0011, 0xb6e8,
+	0x0000, 0x0001, 0x0013, 0x14bb, 0x0011, 0xb6e8, 0x0000, 0x0002,
+	0x0013, 0x14dd, 0x0011, 0xb6e8, 0x0010, 0x0003, 0x0003, 0x15cc,
+	0x0014, 0x07de, 0x0013, 0x0423, 0x0010, 0x0bfe, 0x0013, 0x6423,
+	0x0010, 0x0b0d, 0x0005, 0x0002, 0x0000, 0x0002, 0x0014, 0x0424,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0004,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09, 0x001b, 0x83cf,
+	0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x0021, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x000b, 0x83d5, 0x0001, 0xb0a8, 0x0000, 0x199a,
+	0x0003, 0x23db, 0x0005, 0x00b0, 0x0000, 0x1999, 0x0012, 0xb050,
+	0x0000, 0xffb0, 0x0002, 0xff50, 0x0002, 0xff50, 0x0001, 0xb080,
+	0x0000, 0xffb0, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0010, 0x0006, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb00a,
+	0x001b, 0x83e8, 0x0000, 0xb930, 0x0005, 0x0031, 0x0000, 0x0019,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x83ee, 0x0001, 0xb0c8,
+	0x0010, 0x00ff, 0x0001, 0xffe8, 0x0010, 0x0048, 0x000b, 0x1433,
+	0x0005, 0x0002, 0x0010, 0x0006, 0x0012, 0x0c10, 0x0010, 0xff0c,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0003,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109, 0x001b, 0x83ff,
+	0x0000, 0xb10b, 0x001b, 0x6403, 0x0010, 0xb10a, 0x0015, 0x0033,
+	0x0010, 0xc00a, 0x000b, 0x8405, 0x0002, 0x032b, 0x0010, 0xff03,
+	0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0010, 0x030a, 0x001b, 0x840d, 0x0000, 0x11fe, 0x001b, 0x6412,
+	0x0000, 0x0d12, 0x0003, 0x041b, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0001, 0x1188, 0x0010, 0x0003, 0x0000, 0xff31, 0x0010, 0x0db0,
+	0x0015, 0x0033, 0x0000, 0xb00a, 0x001b, 0x841a, 0x0000, 0x0d11,
+	0x0013, 0x0423, 0x0000, 0x05fe, 0x0013, 0x6423, 0x0005, 0x0002,
+	0x0000, 0x0004, 0x0000, 0x050d, 0x0014, 0x07de, 0x0013, 0x0047,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0011,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x0309, 0x000b, 0x842b,
+	0x0011, 0x0d88, 0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xb909, 0x001b, 0x8431, 0x0017, 0x4000, 0x0005, 0x00b6,
+	0x0010, 0x0600, 0x0004, 0x05fc, 0x0014, 0x04a5, 0x0000, 0xb05a,
+	0x0000, 0xb15b, 0x0005, 0x0054, 0x0010, 0x0829, 0x0010, 0x0d58,
+	0x0015, 0x0059, 0x0010, 0xffff, 0x0000, 0xb930, 0x0005, 0x0031,
+	0x0010, 0x001e, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8443,
+	0x0000, 0xb05c, 0x0005, 0x0031, 0x0000, 0x001f, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x001b, 0x8449, 0x0001, 0xb0c8, 0x0010, 0x000f,
+	0x000b, 0x1450, 0x0015, 0x00ff, 0x0010, 0x0005, 0x0013, 0x0458,
+	0x0002, 0xb040, 0x0013, 0x1455, 0x0015, 0x00ff, 0x0000, 0x0004,
+	0x0013, 0x0458, 0x0001, 0xb0c8, 0x0010, 0x0006, 0x0002, 0xff60,
+	0x0010, 0xffb2, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0000, 0x0019, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109,
+	0x000b, 0x8460, 0x0012, 0xb170, 0x0011, 0xffc8, 0x0010, 0xff00,
+	0x0011, 0xb2d0, 0x0010, 0xff60, 0x0002, 0xb045, 0x0003, 0x146b,
+	0x0015, 0x00b2, 0x0000, 0x0002, 0x0013, 0x0475, 0x0002, 0xb046,
+	0x0003, 0x1470, 0x0015, 0x00b2, 0x0000, 0x0001, 0x0013, 0x0475,
+	0x0015, 0x00b2, 0x0010, 0x0000, 0x0000, 0xc0b0, 0x0010, 0xc0b1,
+	0x0003, 0x047b, 0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x002b,
+	0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x847a, 0x0010, 0xb16a,
+	0x0010, 0xb06b, 0x0000, 0xb261, 0x0015, 0x0044, 0x0010, 0x0018,
 	0x0000, 0xb930, 0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033,
-	0x0000, 0xb011, 0x001b, 0x84ad, 0x0010, 0xb15c, 0x0010, 0xb05d,
-	0x0005, 0x0031, 0x0010, 0x002b, 0x0015, 0x0033, 0x0000, 0xb011,
-	0x000b, 0x84b4, 0x0000, 0xb15e, 0x0000, 0xb05f, 0x0003, 0x94b7,
-	0x0015, 0x00a0, 0x0010, 0x000c, 0x0013, 0x05bb, 0x0005, 0x00b6,
-	0x0000, 0x0700, 0x0014, 0x05d6, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0010, 0x0009, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0xb709, 0x000b, 0x84c5, 0x0012, 0xb749, 0x0003, 0x14cb,
-	0x0005, 0x0054, 0x0010, 0x0889, 0x0013, 0x04cd, 0x0005, 0x0054,
-	0x0010, 0x0898, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x84d4, 0x0010, 0xb058, 0x0000, 0x0d59, 0x0001, 0xb9a8,
-	0x0010, 0x00f0, 0x000b, 0x24f9, 0x0011, 0x0d88, 0x0010, 0x0005,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x84df,
+	0x0000, 0x6241, 0x001b, 0x8485, 0x0013, 0x9486, 0x0015, 0x00a0,
+	0x0000, 0x0020, 0x0012, 0xd041, 0x001b, 0x1489, 0x0015, 0x00d1,
+	0x0010, 0x0202, 0x0003, 0x948d, 0x0000, 0x75ff, 0x0011, 0xffc8,
+	0x0000, 0x1804, 0x0001, 0xffd8, 0x0010, 0x0009, 0x0003, 0x9493,
+	0x0000, 0xff75, 0x0003, 0x9495, 0x0015, 0x00d1, 0x0000, 0x0200,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88, 0x0000, 0x0008,
+	0x0000, 0xff31, 0x0015, 0x00b1, 0x0010, 0x07d0, 0x0005, 0x00b0,
+	0x0010, 0x0009, 0x0015, 0x0033, 0x0000, 0xb012, 0x000b, 0x84a3,
+	0x0013, 0x0423, 0x0000, 0xba30, 0x0005, 0x0031, 0x0000, 0x0031,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x84aa, 0x0002, 0xb040,
+	0x0013, 0x14b8, 0x0000, 0xb7b0, 0x0000, 0xb9b1, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0013, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x84b6, 0x0013, 0x04ba,
+	0x0010, 0xc0b1, 0x0000, 0xc0b0, 0x0017, 0x4000, 0x0005, 0x00b6,
+	0x0010, 0x0500, 0x0004, 0x05fc, 0x0005, 0x0054, 0x0010, 0x0889,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x84c7,
+	0x0010, 0xb058, 0x0000, 0x0d59, 0x0000, 0xb930, 0x0005, 0x0031,
+	0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x84cf,
+	0x0010, 0xb15c, 0x0010, 0xb05d, 0x0005, 0x0031, 0x0010, 0x002b,
+	0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x84d6, 0x0000, 0xb15e,
+	0x0000, 0xb05f, 0x0013, 0x94d9, 0x0015, 0x00a0, 0x0010, 0x000c,
+	0x0013, 0x05e1, 0x0005, 0x00b6, 0x0000, 0x0700, 0x0004, 0x05fc,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0009,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb709, 0x000b, 0x84e7,
+	0x0012, 0xb749, 0x0013, 0x14ed, 0x0005, 0x0054, 0x0010, 0x0889,
+	0x0013, 0x04ef, 0x0005, 0x0054, 0x0010, 0x0898, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x84f6, 0x0010, 0xb058,
+	0x0000, 0x0d59, 0x0001, 0xb9a8, 0x0010, 0x00f0, 0x001b, 0x251d,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0005,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8503,
 	0x0001, 0xb0c8, 0x0000, 0xf700, 0x0000, 0xffb0, 0x0011, 0xb0e8,
-	0x0000, 0xf100, 0x0013, 0x1540, 0x0011, 0xb0e8, 0x0000, 0xf200,
-	0x0013, 0x1545, 0x0011, 0xb0e8, 0x0010, 0xf300, 0x0013, 0x1568,
-	0x0011, 0xb0e8, 0x0000, 0xf400, 0x0013, 0x156d, 0x0011, 0xb0e8,
-	0x0010, 0xf500, 0x0013, 0x1540, 0x0011, 0xb0e8, 0x0010, 0xf600,
-	0x0003, 0x157e, 0x0005, 0x00ce, 0x0010, 0x0009, 0x0000, 0xb0cf,
-	0x0013, 0x07ab, 0x0000, 0xb930, 0x0005, 0x0031, 0x0000, 0x0025,
-	0x0015, 0x0033, 0x0000, 0xb039, 0x001b, 0x84fe, 0x0012, 0xb749,
-	0x0003, 0x1503, 0x0002, 0xb52c, 0x0000, 0xffb5, 0x0000, 0xb162,
+	0x0000, 0xf100, 0x0013, 0x1564, 0x0011, 0xb0e8, 0x0000, 0xf200,
+	0x0003, 0x1569, 0x0011, 0xb0e8, 0x0010, 0xf300, 0x0003, 0x158e,
+	0x0011, 0xb0e8, 0x0000, 0xf400, 0x0003, 0x1593, 0x0011, 0xb0e8,
+	0x0010, 0xf500, 0x0013, 0x1564, 0x0011, 0xb0e8, 0x0010, 0xf600,
+	0x0013, 0x15a4, 0x0005, 0x00ce, 0x0010, 0x0009, 0x0000, 0xb0cf,
+	0x0013, 0x07d3, 0x0000, 0xb930, 0x0005, 0x0031, 0x0000, 0x0025,
+	0x0015, 0x0033, 0x0000, 0xb039, 0x001b, 0x8522, 0x0012, 0xb749,
+	0x0003, 0x1527, 0x0002, 0xb52c, 0x0000, 0xffb5, 0x0000, 0xb162,
 	0x0000, 0xb063, 0x0005, 0x0031, 0x0000, 0x001f, 0x0015, 0x0033,
-	0x0000, 0xb309, 0x001b, 0x8509, 0x0001, 0xb3c8, 0x0010, 0x0003,
-	0x0003, 0x1511, 0x0010, 0xffb2, 0x0001, 0xffe8, 0x0010, 0x0003,
-	0x000b, 0x1513, 0x0000, 0xc2b7, 0x0013, 0x059a, 0x0001, 0xb2e8,
-	0x0000, 0x0001, 0x0013, 0x151a, 0x0005, 0x00ce, 0x0010, 0x000a,
-	0x0010, 0xb2cf, 0x0013, 0x07ab, 0x0010, 0xb465, 0x0010, 0xb667,
+	0x0000, 0xb309, 0x001b, 0x852d, 0x0001, 0xb3c8, 0x0010, 0x0003,
+	0x0003, 0x1535, 0x0010, 0xffb2, 0x0001, 0xffe8, 0x0010, 0x0003,
+	0x000b, 0x1537, 0x0000, 0xc2b7, 0x0013, 0x05c0, 0x0001, 0xb2e8,
+	0x0000, 0x0001, 0x0013, 0x153e, 0x0005, 0x00ce, 0x0010, 0x000a,
+	0x0010, 0xb2cf, 0x0013, 0x07d3, 0x0010, 0xb465, 0x0010, 0xb667,
 	0x0015, 0x00b7, 0x0010, 0x0018, 0x0001, 0xb5c8, 0x0010, 0x0300,
-	0x0003, 0x153f, 0x0012, 0xb548, 0x0013, 0x1526, 0x0000, 0xb6ff,
-	0x0011, 0xb780, 0x0010, 0xffb7, 0x0002, 0xb549, 0x0003, 0x152b,
+	0x0003, 0x1563, 0x0012, 0xb548, 0x0013, 0x154a, 0x0000, 0xb6ff,
+	0x0011, 0xb780, 0x0010, 0xffb7, 0x0002, 0xb549, 0x0013, 0x154f,
 	0x0010, 0xb4ff, 0x0011, 0xb780, 0x0010, 0xffb7, 0x0015, 0x0044,
 	0x0010, 0x0018, 0x0005, 0x0031, 0x0000, 0x002c, 0x0015, 0x0033,
-	0x0000, 0x6841, 0x000b, 0x8531, 0x0015, 0x0044, 0x0000, 0x0019,
+	0x0000, 0x6841, 0x001b, 0x8555, 0x0015, 0x0044, 0x0000, 0x0019,
 	0x0005, 0x0031, 0x0000, 0x0034, 0x0015, 0x0033, 0x0000, 0x5029,
-	0x000b, 0x8538, 0x0015, 0x0044, 0x0000, 0x0008, 0x0011, 0xb7c8,
-	0x0010, 0x0003, 0x0003, 0x153f, 0x0010, 0xff55, 0x0013, 0x059a,
+	0x001b, 0x855c, 0x0015, 0x0044, 0x0000, 0x0008, 0x0011, 0xb7c8,
+	0x0010, 0x0003, 0x0003, 0x1563, 0x0010, 0xff55, 0x0013, 0x05c0,
 	0x0005, 0x00b5, 0x0000, 0x0008, 0x0015, 0x00b7, 0x0010, 0x0018,
-	0x0013, 0x059a, 0x0011, 0x0d88, 0x0000, 0x000b, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x854a, 0x0010, 0xb1ff,
-	0x0001, 0xb0d0, 0x0003, 0x1553, 0x0005, 0x00b5, 0x0010, 0x0b02,
-	0x0010, 0xb062, 0x0010, 0xb163, 0x0013, 0x0555, 0x0005, 0x00b5,
-	0x0000, 0x0302, 0x0015, 0x0065, 0x0010, 0x0012, 0x0005, 0x0067,
-	0x0000, 0x0008, 0x0015, 0x006c, 0x0000, 0x7000, 0x0005, 0x006d,
-	0x0010, 0x0500, 0x0015, 0x006f, 0x0010, 0x000a, 0x0015, 0x0044,
-	0x0000, 0x0001, 0x0005, 0x0052, 0x0000, 0x2500, 0x0015, 0x0044,
-	0x0000, 0x0008, 0x0015, 0x00b7, 0x0000, 0x0032, 0x0013, 0x059a,
-	0x0005, 0x00b5, 0x0010, 0x0028, 0x0015, 0x00b7, 0x0010, 0x0018,
-	0x0013, 0x059a, 0x0005, 0x00b5, 0x0000, 0x0100, 0x0005, 0x0067,
-	0x0000, 0x0008, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0010, 0x0018, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x001b, 0x8578, 0x0001, 0xb0c8, 0x0010, 0x00ff, 0x0015, 0x00b7,
-	0x0000, 0x0020, 0x0013, 0x059a, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb609, 0x000b, 0x8585, 0x0001, 0xb6c8, 0x0010, 0xff00,
-	0x0000, 0xffb0, 0x0015, 0x0033, 0x0000, 0xb00a, 0x001b, 0x858b,
-	0x0001, 0xb6c8, 0x0010, 0x00ff, 0x0012, 0xff10, 0x000b, 0x1594,
-	0x0000, 0xffb5, 0x0015, 0x00b7, 0x0010, 0x0018, 0x0013, 0x059a,
-	0x0010, 0xff63, 0x0005, 0x00b5, 0x0000, 0x0800, 0x0015, 0x00b7,
-	0x0010, 0x0018, 0x0013, 0x059a, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0010, 0x0009, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x000b, 0x85a1, 0x0010, 0xb561, 0x0013, 0x95a3,
-	0x0010, 0xb7a0, 0x0013, 0x05bb, 0x0005, 0x00b6, 0x0010, 0x0300,
-	0x0014, 0x05d6, 0x0005, 0x0054, 0x0010, 0x0819, 0x0010, 0x0d58,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x85b3,
-	0x0000, 0xb059, 0x0003, 0x95b5, 0x0010, 0xc0a0, 0x0010, 0x71ff,
-	0x0002, 0xff28, 0x0010, 0xff71, 0x0013, 0x05bb, 0x0012, 0xd041,
-	0x001b, 0x15bb, 0x0015, 0x00d1, 0x0010, 0x0202, 0x0000, 0x75ff,
-	0x0011, 0xffc8, 0x0000, 0x1804, 0x0001, 0xffd8, 0x0010, 0x0009,
-	0x0003, 0x95c4, 0x0000, 0xff75, 0x0013, 0x95c6, 0x0015, 0x00d1,
-	0x0000, 0x0200, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88,
-	0x0000, 0x0008, 0x0000, 0xff31, 0x0005, 0x00b0, 0x0010, 0x0009,
-	0x0015, 0x00b1, 0x0010, 0x07d0, 0x0015, 0x0033, 0x0000, 0xb012,
-	0x001b, 0x85d4, 0x0013, 0x0404, 0x0015, 0x0044, 0x0000, 0x0008,
-	0x0005, 0x0098, 0x0010, 0x0056, 0x0015, 0x0099, 0x0000, 0x9575,
-	0x0014, 0x0772, 0x0000, 0xb096, 0x0012, 0xb270, 0x0010, 0xff56,
-	0x0004, 0x0794, 0x0010, 0xb052, 0x0010, 0xb153, 0x0000, 0xb6ff,
-	0x0011, 0xb2d0, 0x0010, 0xff50, 0x0010, 0xb351, 0x0017, 0x4000,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0x1288, 0x0010, 0x0011,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0x1009, 0x000b, 0x85ef,
-	0x0015, 0x000f, 0x0000, 0x0001, 0x0010, 0xc014, 0x0000, 0x1213,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x0004,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09, 0x000b, 0x85fb,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0005,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0x1a09, 0x001b, 0x8603,
-	0x0012, 0x104b, 0x001b, 0x160c, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x000b, 0x0015, 0x0033, 0x0000, 0x1621, 0x000b, 0x860b,
-	0x0010, 0x15fe, 0x001b, 0x6615, 0x0004, 0x0633, 0x0002, 0x3a42,
-	0x000b, 0x1632, 0x0001, 0x10c8, 0x0010, 0x000f, 0x001b, 0x1695,
-	0x0003, 0x0631, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388,
-	0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x861c, 0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x861f,
-	0x0010, 0xb0fe, 0x0013, 0x6624, 0x0000, 0xb012, 0x0003, 0x0626,
-	0x0010, 0xc012, 0x0010, 0xc011, 0x0015, 0x000f, 0x0010, 0x0000,
-	0x0002, 0x3944, 0x0013, 0x162f, 0x0015, 0x0039, 0x0000, 0x5040,
-	0x0015, 0x00b8, 0x0000, 0x0008, 0x0014, 0x07ed, 0x0000, 0xc013,
-	0x0003, 0x0632, 0x0004, 0x07d9, 0x0003, 0x0051, 0x0003, 0xb633,
-	0x0005, 0x002a, 0x0000, 0x0004, 0x0000, 0xba30, 0x0005, 0x0031,
-	0x0010, 0x001b, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x863b,
-	0x0000, 0xc02c, 0x0000, 0xb02d, 0x0012, 0x104b, 0x0003, 0x1656,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033,
-	0x0000, 0xb129, 0x000b, 0x8645, 0x0000, 0xb120, 0x0010, 0xb221,
-	0x0000, 0xb322, 0x0000, 0xb423, 0x0000, 0xb524, 0x0000, 0xc025,
-	0x0010, 0xb526, 0x0010, 0xc027, 0x0010, 0xb516, 0x0010, 0xc017,
-	0x0000, 0xb518, 0x0000, 0xc019, 0x0010, 0xc028, 0x0000, 0xc029,
-	0x0010, 0xc01e, 0x0003, 0x068c, 0x0012, 0x1044, 0x0013, 0x1686,
-	0x0002, 0x1034, 0x0000, 0xff10, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b29, 0x001b, 0x865f,
-	0x0000, 0x1c30, 0x0000, 0x1b31, 0x0015, 0x0033, 0x0000, 0xb131,
-	0x000b, 0x8664, 0x0002, 0x1f43, 0x000b, 0x166b, 0x0010, 0xb3b5,
-	0x0000, 0xb4b6, 0x0000, 0xc0b3, 0x0010, 0xc0b4, 0x0000, 0xb120,
-	0x0010, 0xb221, 0x0000, 0xb322, 0x0000, 0xb423, 0x0000, 0xb524,
-	0x0010, 0xb625, 0x0010, 0xb516, 0x0000, 0xb617, 0x0000, 0x1826,
-	0x0000, 0x1927, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0010, 0x000f,
-	0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x867a, 0x0000, 0xb028,
-	0x0000, 0xb129, 0x0012, 0x1e10, 0x0010, 0xff1e, 0x0003, 0x668c,
-	0x0002, 0x1d00, 0x0010, 0xff1d, 0x0004, 0x027f, 0x0002, 0x3a42,
-	0x0013, 0x168c, 0x0003, 0x0694, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b79, 0x001b, 0x868b,
-	0x0013, 0xb68c, 0x0005, 0x002a, 0x0000, 0x0001, 0x0005, 0x0015,
-	0x0000, 0x0001, 0x0000, 0x1efe, 0x0003, 0x6694, 0x0003, 0x024b,
-	0x0017, 0x4000, 0x0000, 0xba30, 0x0005, 0x0031, 0x0010, 0x001b,
-	0x0015, 0x0033, 0x0010, 0xb051, 0x001b, 0x869a, 0x0000, 0xb0a3,
-	0x0010, 0xb697, 0x0010, 0xb946, 0x0015, 0x00a5, 0x0000, 0x0010,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x0002,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb509, 0x000b, 0x86a7,
-	0x0004, 0x0794, 0x0004, 0x0783, 0x0012, 0xb470, 0x0010, 0xffb4,
-	0x0010, 0xb48e, 0x0010, 0xb08a, 0x0010, 0xb18b, 0x0012, 0x104d,
-	0x0003, 0x16b2, 0x0003, 0x06df, 0x0012, 0x104b, 0x0003, 0x16c5,
-	0x0005, 0x008c, 0x0010, 0x0829, 0x0010, 0xc08d, 0x0001, 0xb2d8,
-	0x0010, 0x0600, 0x0010, 0xff88, 0x0010, 0xb389, 0x0000, 0x1390,
-	0x0010, 0xb591, 0x0000, 0xc08f, 0x0010, 0x1ab9, 0x0004, 0x0483,
-	0x0013, 0x96c0, 0x0010, 0xb092, 0x0010, 0xb193, 0x0013, 0x96c3,
-	0x0003, 0x06da, 0x0005, 0x008c, 0x0000, 0x0809, 0x0015, 0x008d,
-	0x0000, 0x0008, 0x0001, 0xb2d8, 0x0000, 0x0100, 0x0010, 0xff88,
+	0x0013, 0x05c0, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
+	0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb011,
+	0x000b, 0x8570, 0x0010, 0xb1ff, 0x0001, 0xb0d0, 0x0013, 0x1579,
+	0x0005, 0x00b5, 0x0010, 0x0b02, 0x0010, 0xb062, 0x0010, 0xb163,
+	0x0013, 0x057b, 0x0005, 0x00b5, 0x0000, 0x0302, 0x0015, 0x0065,
+	0x0010, 0x0012, 0x0005, 0x0067, 0x0000, 0x0008, 0x0015, 0x006c,
+	0x0000, 0x7000, 0x0005, 0x006d, 0x0010, 0x0500, 0x0015, 0x006f,
+	0x0010, 0x000a, 0x0015, 0x0044, 0x0000, 0x0001, 0x0005, 0x0052,
+	0x0000, 0x2500, 0x0015, 0x0044, 0x0000, 0x0008, 0x0015, 0x00b7,
+	0x0000, 0x0032, 0x0013, 0x05c0, 0x0005, 0x00b5, 0x0010, 0x0028,
+	0x0015, 0x00b7, 0x0010, 0x0018, 0x0013, 0x05c0, 0x0005, 0x00b5,
+	0x0000, 0x0100, 0x0005, 0x0067, 0x0000, 0x0008, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0018, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x859e, 0x0001, 0xb0c8,
+	0x0010, 0x00ff, 0x0015, 0x00b7, 0x0000, 0x0020, 0x0013, 0x05c0,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0005,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb609, 0x000b, 0x85ab,
+	0x0001, 0xb6c8, 0x0010, 0xff00, 0x0000, 0xffb0, 0x0015, 0x0033,
+	0x0000, 0xb00a, 0x001b, 0x85b1, 0x0001, 0xb6c8, 0x0010, 0x00ff,
+	0x0012, 0xff10, 0x000b, 0x15ba, 0x0000, 0xffb5, 0x0015, 0x00b7,
+	0x0010, 0x0018, 0x0013, 0x05c0, 0x0010, 0xff63, 0x0005, 0x00b5,
+	0x0000, 0x0800, 0x0015, 0x00b7, 0x0010, 0x0018, 0x0013, 0x05c0,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0009,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x85c7,
+	0x0010, 0xb561, 0x0013, 0x95c9, 0x0010, 0xb7a0, 0x0013, 0x05e1,
+	0x0005, 0x00b6, 0x0010, 0x0300, 0x0004, 0x05fc, 0x0005, 0x0054,
+	0x0010, 0x0819, 0x0010, 0x0d58, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x0d88, 0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x000b, 0x85d9, 0x0000, 0xb059, 0x0013, 0x95db,
+	0x0010, 0xc0a0, 0x0010, 0x71ff, 0x0002, 0xff28, 0x0010, 0xff71,
+	0x0013, 0x05e1, 0x0012, 0xd041, 0x001b, 0x15e1, 0x0015, 0x00d1,
+	0x0010, 0x0202, 0x0000, 0x75ff, 0x0011, 0xffc8, 0x0000, 0x1804,
+	0x0001, 0xffd8, 0x0010, 0x0009, 0x0003, 0x95ea, 0x0000, 0xff75,
+	0x0003, 0x95ec, 0x0015, 0x00d1, 0x0000, 0x0200, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0001, 0xbd88, 0x0000, 0x0008, 0x0000, 0xff31,
+	0x0005, 0x00b0, 0x0010, 0x0009, 0x0015, 0x00b1, 0x0010, 0x07d0,
+	0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x85fa, 0x0013, 0x0423,
+	0x0015, 0x0044, 0x0000, 0x0008, 0x0005, 0x0098, 0x0010, 0x0056,
+	0x0015, 0x0099, 0x0000, 0x9575, 0x0014, 0x079a, 0x0000, 0xb096,
+	0x0012, 0xb270, 0x0010, 0xff56, 0x0004, 0x07bc, 0x0010, 0xb052,
+	0x0010, 0xb153, 0x0000, 0xb6ff, 0x0011, 0xb2d0, 0x0010, 0xff50,
+	0x0010, 0xb351, 0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0001, 0x1288, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0x1009, 0x000b, 0x8615, 0x0015, 0x000f, 0x0000, 0x0001,
+	0x0010, 0xc014, 0x0000, 0x1213, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x1388, 0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xba09, 0x001b, 0x8621, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x1388, 0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0x1a09, 0x000b, 0x8629, 0x0012, 0x104b, 0x000b, 0x1632,
+	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x000b, 0x0015, 0x0033,
+	0x0000, 0x1621, 0x000b, 0x8631, 0x0010, 0x15fe, 0x001b, 0x663b,
+	0x0004, 0x0659, 0x0002, 0x3a42, 0x000b, 0x1658, 0x0001, 0x10c8,
+	0x0010, 0x000f, 0x001b, 0x16bb, 0x0003, 0x0657, 0x0015, 0x0030,
+	0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0003, 0x0000, 0xff31,
+	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8642, 0x0015, 0x0033,
+	0x0010, 0xc00a, 0x000b, 0x8645, 0x0010, 0xb0fe, 0x0003, 0x664a,
+	0x0000, 0xb012, 0x0003, 0x064c, 0x0010, 0xc012, 0x0010, 0xc011,
+	0x0015, 0x000f, 0x0010, 0x0000, 0x0002, 0x3944, 0x0003, 0x1655,
+	0x0015, 0x0039, 0x0000, 0x5040, 0x0015, 0x00b8, 0x0000, 0x0008,
+	0x0014, 0x0817, 0x0000, 0xc013, 0x0003, 0x0658, 0x0014, 0x0803,
+	0x0003, 0x0051, 0x0003, 0xb659, 0x0005, 0x002a, 0x0000, 0x0004,
+	0x0000, 0xba30, 0x0005, 0x0031, 0x0010, 0x001b, 0x0015, 0x0033,
+	0x0000, 0xb009, 0x000b, 0x8661, 0x0000, 0xc02c, 0x0000, 0xb02d,
+	0x0012, 0x104b, 0x0013, 0x167c, 0x0000, 0x1a30, 0x0005, 0x0031,
+	0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0xb129, 0x000b, 0x866b,
+	0x0000, 0xb120, 0x0010, 0xb221, 0x0000, 0xb322, 0x0000, 0xb423,
+	0x0000, 0xb524, 0x0000, 0xc025, 0x0010, 0xb526, 0x0010, 0xc027,
+	0x0010, 0xb516, 0x0010, 0xc017, 0x0000, 0xb518, 0x0000, 0xc019,
+	0x0010, 0xc028, 0x0000, 0xc029, 0x0010, 0xc01e, 0x0013, 0x06b2,
+	0x0012, 0x1044, 0x0003, 0x16ac, 0x0002, 0x1034, 0x0000, 0xff10,
+	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033,
+	0x0000, 0x1b29, 0x000b, 0x8685, 0x0000, 0x1c30, 0x0000, 0x1b31,
+	0x0015, 0x0033, 0x0000, 0xb131, 0x000b, 0x868a, 0x0002, 0x1f43,
+	0x000b, 0x1691, 0x0010, 0xb3b5, 0x0000, 0xb4b6, 0x0000, 0xc0b3,
+	0x0010, 0xc0b4, 0x0000, 0xb120, 0x0010, 0xb221, 0x0000, 0xb322,
+	0x0000, 0xb423, 0x0000, 0xb524, 0x0010, 0xb625, 0x0010, 0xb516,
+	0x0000, 0xb617, 0x0000, 0x1826, 0x0000, 0x1927, 0x0000, 0x1a30,
+	0x0005, 0x0031, 0x0010, 0x000f, 0x0015, 0x0033, 0x0000, 0xb011,
+	0x001b, 0x86a0, 0x0000, 0xb028, 0x0000, 0xb129, 0x0012, 0x1e10,
+	0x0010, 0xff1e, 0x0013, 0x66b2, 0x0002, 0x1d00, 0x0010, 0xff1d,
+	0x0014, 0x029a, 0x0002, 0x3a42, 0x0003, 0x16b2, 0x0003, 0x06ba,
+	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033,
+	0x0000, 0x1b79, 0x001b, 0x86b1, 0x0003, 0xb6b2, 0x0005, 0x002a,
+	0x0000, 0x0001, 0x0005, 0x0015, 0x0000, 0x0001, 0x0000, 0x1efe,
+	0x0003, 0x66ba, 0x0003, 0x0266, 0x0017, 0x4000, 0x0000, 0xba30,
+	0x0005, 0x0031, 0x0010, 0x001b, 0x0015, 0x0033, 0x0010, 0xb051,
+	0x001b, 0x86c0, 0x0000, 0xb0a3, 0x0010, 0xb697, 0x0010, 0xb946,
+	0x0015, 0x00a5, 0x0000, 0x0010, 0x0015, 0x0030, 0x0000, 0x0400,
+	0x0011, 0x1388, 0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033,
+	0x0000, 0xb509, 0x000b, 0x86cd, 0x0004, 0x07bc, 0x0004, 0x07ab,
+	0x0012, 0xb470, 0x0010, 0xffb4, 0x0010, 0xb48e, 0x0010, 0xb08a,
+	0x0010, 0xb18b, 0x0012, 0x104d, 0x0003, 0x16d8, 0x0003, 0x0705,
+	0x0012, 0x104b, 0x0003, 0x16eb, 0x0005, 0x008c, 0x0010, 0x0829,
+	0x0010, 0xc08d, 0x0001, 0xb2d8, 0x0010, 0x0600, 0x0010, 0xff88,
 	0x0010, 0xb389, 0x0000, 0x1390, 0x0010, 0xb591, 0x0000, 0xc08f,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0010, 0x000f, 0x0015, 0x0033,
-	0x0000, 0xb011, 0x000b, 0x86d5, 0x0003, 0x96d6, 0x0000, 0xb192,
-	0x0000, 0xb093, 0x0003, 0x96d9, 0x0010, 0x19a1, 0x0000, 0x18a2,
-	0x0015, 0x00b1, 0x0010, 0x0096, 0x0003, 0x074e, 0x0000, 0xb590,
-	0x0010, 0x1391, 0x0001, 0x10c8, 0x0010, 0x000f, 0x0001, 0xffe8,
-	0x0010, 0x0005, 0x0013, 0x1706, 0x0001, 0xb2d8, 0x0000, 0x0700,
-	0x0010, 0xff88, 0x0010, 0xb389, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x1388, 0x0010, 0x0009, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x000b, 0x86f1, 0x0002, 0xb049, 0x0003, 0x16f9,
-	0x0005, 0x008c, 0x0010, 0x0889, 0x0015, 0x00b1, 0x0010, 0x0096,
-	0x0003, 0x06fd, 0x0005, 0x008c, 0x0010, 0x0898, 0x0015, 0x00b1,
-	0x0000, 0x0092, 0x0010, 0xc08d, 0x0000, 0xc08f, 0x0013, 0x96ff,
-	0x0000, 0xc092, 0x0010, 0xc093, 0x0013, 0x9702, 0x0010, 0x19a1,
-	0x0000, 0x18a2, 0x0003, 0x074e, 0x0001, 0xb2d8, 0x0000, 0x0100,
-	0x0010, 0xff88, 0x0010, 0xb389, 0x0005, 0x008c, 0x0010, 0x0880,
-	0x0015, 0x008d, 0x0000, 0x0008, 0x0011, 0x1388, 0x0000, 0x000e,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8713,
+	0x0010, 0x1ab9, 0x0014, 0x04a5, 0x0003, 0x96e6, 0x0010, 0xb092,
+	0x0010, 0xb193, 0x0003, 0x96e9, 0x0003, 0x0700, 0x0005, 0x008c,
+	0x0000, 0x0809, 0x0015, 0x008d, 0x0000, 0x0008, 0x0001, 0xb2d8,
+	0x0000, 0x0100, 0x0010, 0xff88, 0x0010, 0xb389, 0x0000, 0x1390,
+	0x0010, 0xb591, 0x0000, 0xc08f, 0x0000, 0x1a30, 0x0005, 0x0031,
+	0x0010, 0x000f, 0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x86fb,
+	0x0013, 0x96fc, 0x0000, 0xb192, 0x0000, 0xb093, 0x0013, 0x96ff,
+	0x0010, 0x19a1, 0x0000, 0x18a2, 0x0015, 0x00b1, 0x0010, 0x0096,
+	0x0013, 0x0776, 0x0000, 0xb590, 0x0010, 0x1391, 0x0001, 0x10c8,
+	0x0010, 0x000f, 0x0001, 0xffe8, 0x0010, 0x0005, 0x0003, 0x172c,
+	0x0001, 0xb2d8, 0x0000, 0x0700, 0x0010, 0xff88, 0x0010, 0xb389,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0009,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x8717,
+	0x0002, 0xb049, 0x0003, 0x171f, 0x0005, 0x008c, 0x0010, 0x0889,
+	0x0015, 0x00b1, 0x0010, 0x0096, 0x0013, 0x0723, 0x0005, 0x008c,
+	0x0010, 0x0898, 0x0015, 0x00b1, 0x0000, 0x0092, 0x0010, 0xc08d,
+	0x0000, 0xc08f, 0x0013, 0x9725, 0x0000, 0xc092, 0x0010, 0xc093,
+	0x0003, 0x9728, 0x0010, 0x19a1, 0x0000, 0x18a2, 0x0013, 0x0776,
+	0x0001, 0xb2d8, 0x0000, 0x0100, 0x0010, 0xff88, 0x0010, 0xb389,
+	0x0005, 0x008c, 0x0010, 0x0880, 0x0015, 0x008d, 0x0000, 0x0008,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000e,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x873b,
 	0x0010, 0xb08f, 0x0000, 0xb590, 0x0010, 0x1391, 0x0000, 0x1a30,
 	0x0005, 0x0031, 0x0000, 0x000d, 0x0015, 0x0033, 0x0000, 0xb021,
-	0x001b, 0x871c, 0x0003, 0x971d, 0x0010, 0xb392, 0x0010, 0xb293,
-	0x0013, 0x9720, 0x0000, 0xb1a1, 0x0010, 0xb0a2, 0x0015, 0x0030,
+	0x000b, 0x8744, 0x0013, 0x9745, 0x0010, 0xb392, 0x0010, 0xb293,
+	0x0003, 0x9748, 0x0000, 0xb1a1, 0x0010, 0xb0a2, 0x0015, 0x0030,
 	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000b, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xb211, 0x001b, 0x872a, 0x0000, 0xb3ff,
-	0x0001, 0xb080, 0x0000, 0xffb3, 0x001b, 0x2731, 0x0002, 0xb200,
-	0x0013, 0x0732, 0x0010, 0xb2ff, 0x0011, 0xb180, 0x0010, 0xffb2,
+	0x0015, 0x0033, 0x0010, 0xb211, 0x001b, 0x8752, 0x0000, 0xb3ff,
+	0x0001, 0xb080, 0x0000, 0xffb3, 0x000b, 0x2759, 0x0002, 0xb200,
+	0x0003, 0x075a, 0x0010, 0xb2ff, 0x0011, 0xb180, 0x0010, 0xffb2,
 	0x0011, 0x1388, 0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0xb212, 0x000b, 0x8739, 0x0015, 0x00b1, 0x0000, 0x0092,
-	0x0002, 0x104c, 0x0003, 0x174c, 0x0011, 0xc2e8, 0x0010, 0x000c,
-	0x000b, 0x1744, 0x0015, 0x00ff, 0x0000, 0x0800, 0x0013, 0x074c,
-	0x0011, 0xc2e8, 0x0000, 0x0020, 0x001b, 0x174a, 0x0015, 0x00ff,
-	0x0010, 0x1800, 0x0013, 0x074c, 0x0015, 0x00ff, 0x0000, 0x1000,
+	0x0010, 0xb212, 0x001b, 0x8761, 0x0015, 0x00b1, 0x0000, 0x0092,
+	0x0002, 0x104c, 0x0013, 0x1774, 0x0011, 0xc2e8, 0x0010, 0x000c,
+	0x000b, 0x176c, 0x0015, 0x00ff, 0x0000, 0x0800, 0x0003, 0x0774,
+	0x0011, 0xc2e8, 0x0000, 0x0020, 0x000b, 0x1772, 0x0015, 0x00ff,
+	0x0010, 0x1800, 0x0003, 0x0774, 0x0015, 0x00ff, 0x0000, 0x1000,
 	0x0011, 0xb1d0, 0x0010, 0xffb1, 0x0015, 0x009a, 0x0010, 0x0036,
-	0x0005, 0x009b, 0x0000, 0x95d5, 0x0012, 0xd041, 0x001b, 0x1752,
-	0x0015, 0x00d1, 0x0010, 0x0202, 0x0003, 0x9756, 0x0012, 0x104e,
-	0x0003, 0x175b, 0x0012, 0xb12f, 0x0010, 0xffb1, 0x0000, 0xb175,
-	0x0003, 0x975c, 0x0015, 0x00d1, 0x0000, 0x0200, 0x0001, 0x19c8,
-	0x0010, 0xfff0, 0x000b, 0x1765, 0x0015, 0x00b1, 0x0010, 0x07d0,
-	0x0013, 0x0767, 0x0015, 0x00b1, 0x0000, 0x1b58, 0x0005, 0x00b0,
+	0x0005, 0x009b, 0x0000, 0x95d5, 0x0012, 0xd041, 0x001b, 0x177a,
+	0x0015, 0x00d1, 0x0010, 0x0202, 0x0003, 0x977e, 0x0012, 0x104e,
+	0x0003, 0x1783, 0x0012, 0xb12f, 0x0010, 0xffb1, 0x0000, 0xb175,
+	0x0003, 0x9784, 0x0015, 0x00d1, 0x0000, 0x0200, 0x0001, 0x19c8,
+	0x0010, 0xfff0, 0x000b, 0x178d, 0x0015, 0x00b1, 0x0010, 0x07d0,
+	0x0013, 0x078f, 0x0015, 0x00b1, 0x0000, 0x1b58, 0x0005, 0x00b0,
 	0x0010, 0x0009, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88,
 	0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012,
-	0x001b, 0x8770, 0x0003, 0x0632, 0x0000, 0xba30, 0x0005, 0x0031,
-	0x0010, 0x0021, 0x0015, 0x0033, 0x0010, 0xb019, 0x000b, 0x8777,
+	0x001b, 0x8798, 0x0003, 0x0658, 0x0000, 0xba30, 0x0005, 0x0031,
+	0x0010, 0x0021, 0x0015, 0x0033, 0x0010, 0xb019, 0x000b, 0x879f,
 	0x0002, 0xb200, 0x0011, 0xffc8, 0x0010, 0x00ff, 0x0010, 0xffb2,
 	0x0010, 0xb2b7, 0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033,
-	0x0010, 0xb20a, 0x000b, 0x8781, 0x0017, 0x4000, 0x0000, 0xba30,
+	0x0010, 0xb20a, 0x000b, 0x87a9, 0x0017, 0x4000, 0x0000, 0xba30,
 	0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033, 0x0010, 0xb409,
-	0x000b, 0x8788, 0x0002, 0xb400, 0x0011, 0xffc8, 0x0010, 0x00ff,
+	0x001b, 0x87b0, 0x0002, 0xb400, 0x0011, 0xffc8, 0x0010, 0x00ff,
 	0x0010, 0xffb4, 0x0010, 0xb4b7, 0x0005, 0x0031, 0x0000, 0x0023,
-	0x0015, 0x0033, 0x0010, 0xb40a, 0x001b, 0x8792, 0x0017, 0x4000,
-	0x0000, 0xba30, 0x0001, 0xc7c8, 0x0000, 0x0020, 0x000b, 0x17a0,
+	0x0015, 0x0033, 0x0010, 0xb40a, 0x001b, 0x87ba, 0x0017, 0x4000,
+	0x0000, 0xba30, 0x0001, 0xc7c8, 0x0000, 0x0020, 0x001b, 0x17c8,
 	0x0005, 0x0031, 0x0010, 0x0028, 0x0015, 0x0033, 0x0010, 0xb209,
-	0x000b, 0x879c, 0x0011, 0xb2c8, 0x0000, 0xff80, 0x0013, 0x17a3,
-	0x0010, 0xc4b0, 0x0010, 0xc5b1, 0x0003, 0x07a5, 0x0010, 0xc6b1,
+	0x001b, 0x87c4, 0x0011, 0xb2c8, 0x0000, 0xff80, 0x0003, 0x17cb,
+	0x0010, 0xc4b0, 0x0010, 0xc5b1, 0x0013, 0x07cd, 0x0010, 0xc6b1,
 	0x0000, 0xc0b0, 0x0005, 0x0031, 0x0000, 0x0004, 0x0015, 0x0033,
-	0x0010, 0xb211, 0x000b, 0x87a9, 0x0017, 0x4000, 0x0015, 0x00b8,
-	0x0010, 0x0009, 0x0015, 0x003a, 0x0010, 0x0707, 0x0014, 0x07ed,
+	0x0010, 0xb211, 0x000b, 0x87d1, 0x0017, 0x4000, 0x0015, 0x00b8,
+	0x0010, 0x0009, 0x0015, 0x003a, 0x0010, 0x0707, 0x0014, 0x0817,
 	0x0013, 0x002d, 0x0015, 0x00b8, 0x0010, 0x0009, 0x0015, 0x003a,
-	0x0010, 0x0707, 0x0003, 0x07ed, 0x0004, 0x0110, 0x0015, 0x0030,
+	0x0010, 0x0707, 0x0003, 0x0817, 0x0004, 0x0110, 0x0015, 0x0030,
 	0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0004, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xba09, 0x000b, 0x87be, 0x0014, 0x0772,
+	0x0015, 0x0033, 0x0000, 0xba09, 0x001b, 0x87e6, 0x0014, 0x079a,
 	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0010,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a, 0x001b, 0x87c7,
-	0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0x0309, 0x001b, 0x87cd, 0x0002, 0x0327, 0x0010, 0xffb2,
-	0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0xb20a, 0x001b, 0x87d5, 0x0015, 0x00b8, 0x0010, 0x0006,
-	0x0003, 0x07ed, 0x0014, 0x0122, 0x0014, 0x0772, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x0010, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xb20a, 0x000b, 0x87e2, 0x0012, 0x1027,
-	0x0010, 0xffb2, 0x0011, 0x1388, 0x0010, 0x0011, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xb20a, 0x001b, 0x87ea, 0x0015, 0x00b8,
-	0x0000, 0x0007, 0x0013, 0x47ed, 0x0000, 0xb838, 0x0017, 0x4000,
-	0xa85a, 0x97da
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a, 0x001b, 0x87ef,
+	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0011,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x0309, 0x001b, 0x87f7,
+	0x0002, 0x0327, 0x0010, 0xffb2, 0x0011, 0x0d88, 0x0010, 0x0011,
+	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a, 0x000b, 0x87ff,
+	0x0015, 0x00b8, 0x0010, 0x0006, 0x0003, 0x0817, 0x0014, 0x0122,
+	0x0014, 0x079a, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388,
+	0x0000, 0x0010, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a,
+	0x000b, 0x880c, 0x0012, 0x1027, 0x0010, 0xffb2, 0x0011, 0x1388,
+	0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a,
+	0x000b, 0x8814, 0x0015, 0x00b8, 0x0000, 0x0007, 0x0013, 0x4817,
+	0x0000, 0xb838, 0x0017, 0x4000, 0xa5a5, 0x1ab5
 };
-unsigned short xseqflx_code_length01 = 0x0fe2;
+unsigned short xseqflx_code_length01 = 0x1036;
--- diff/drivers/scsi/qla2xxx/qla_dbg.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_dbg.c	2004-07-01 21:32:43.000000000 +0100
@@ -16,10 +16,10 @@
  * General Public License for more details.
  *
  */
-#include "qla_os.h"
-
 #include "qla_def.h"
 
+#include <linux/delay.h>
+
 static int qla_uprintf(char **, char *, ...);
 
 /**
@@ -40,9 +40,10 @@
 	uint16_t	*dmp_reg;
 	unsigned long	flags;
 	struct qla2300_fw_dump	*fw;
+	uint32_t	dump_size, data_ram_cnt;
 
 	reg = ha->iobase;
-	risc_address = 0;
+	risc_address = data_ram_cnt = 0;
 	mb0 = mb2 = 0;
 	flags = 0;
 
@@ -57,13 +58,15 @@
 	}
 
 	/* Allocate (large) dump buffer. */
-	ha->fw_dump_order = get_order(sizeof(struct qla2300_fw_dump));
+	dump_size = sizeof(struct qla2300_fw_dump);
+	dump_size += (ha->fw_memory_size - 0x11000) * sizeof(uint16_t);
+	ha->fw_dump_order = get_order(dump_size);
 	ha->fw_dump = (struct qla2300_fw_dump *) __get_free_pages(GFP_ATOMIC,
 	    ha->fw_dump_order);
 	if (ha->fw_dump == NULL) {
 		qla_printk(KERN_WARNING, ha,
-		    "Unable to allocated memory for firmware dump (%d/%Zd).\n",
-		    ha->fw_dump_order, sizeof(struct qla2300_fw_dump));
+		    "Unable to allocated memory for firmware dump (%d/%d).\n",
+		    ha->fw_dump_order, dump_size);
 		goto qla2300_fw_dump_failed;
 	}
 	fw = ha->fw_dump;
@@ -304,10 +307,11 @@
 	if (rval == QLA_SUCCESS) {
 		/* Get data SRAM. */
 		risc_address = 0x11000;
+		data_ram_cnt = ha->fw_memory_size - risc_address + 1;
  		WRT_MAILBOX_REG(ha, reg, 0, MBC_READ_RAM_EXTENDED);
 		clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
 	}
-	for (cnt = 0; cnt < sizeof(fw->data_ram) / 2 && rval == QLA_SUCCESS;
+	for (cnt = 0; cnt < data_ram_cnt && rval == QLA_SUCCESS;
 	    cnt++, risc_address++) {
  		WRT_MAILBOX_REG(ha, reg, 1, LSW(risc_address));
  		WRT_MAILBOX_REG(ha, reg, 8, MSW(risc_address));
@@ -386,6 +390,7 @@
 	char *uiter;
 	char fw_info[30];
 	struct qla2300_fw_dump *fw;
+	uint32_t data_ram_cnt;
 
 	uiter = ha->fw_dump_buffer;
 	fw = ha->fw_dump;
@@ -550,7 +555,8 @@
 	}
 
 	qla_uprintf(&uiter, "\n\nData RAM Dump:");
-	for (cnt = 0; cnt < sizeof (fw->data_ram) / 2; cnt++) {
+	data_ram_cnt = ha->fw_memory_size - 0x11000 + 1;
+	for (cnt = 0; cnt < data_ram_cnt; cnt++) {
 		if (cnt % 8 == 0) {
 			qla_uprintf(&uiter, "\n%05x: ", cnt + 0x11000);
 		}
--- diff/drivers/scsi/qla2xxx/qla_dbg.h	2004-05-19 22:12:14.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_dbg.h	2004-07-01 21:32:43.000000000 +0100
@@ -182,7 +182,9 @@
 /*
  * Firmware Dump structure definition
  */
-#define FW_DUMP_SIZE	0xBC000		/* bytes */
+#define FW_DUMP_SIZE_128K	0xBC000
+#define FW_DUMP_SIZE_512K	0x2FC000
+#define FW_DUMP_SIZE_1M		0x5FC000
 
 struct qla2300_fw_dump {
 	uint16_t hccr;
@@ -205,7 +207,7 @@
 	uint16_t fpm_b1_reg[64];
 	uint16_t risc_ram[0xf800];
 	uint16_t stack_ram[0x1000];
-	uint16_t data_ram[0xF000];
+	uint16_t data_ram[1];
 };
 
 struct qla2100_fw_dump {
--- diff/drivers/scsi/qla2xxx/qla_def.h	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_def.h	2004-07-01 21:32:43.000000000 +0100
@@ -20,6 +20,24 @@
 #ifndef __QLA_DEF_H
 #define __QLA_DEF_H
 
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/list.h>
+#include <linux/pci.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/mempool.h>
+#include <linux/spinlock.h>
+#include <linux/completion.h>
+#include <asm/semaphore.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_cmnd.h>
+
 /* XXX(hch): move to pci_ids.h */
 #ifndef PCI_DEVICE_ID_QLOGIC_ISP2300
 #define PCI_DEVICE_ID_QLOGIC_ISP2300	0x2300
@@ -264,10 +282,6 @@
 #define SRB_ERR_DEVICE	3		/* Request failed -- "device error" */
 #define SRB_ERR_OTHER	4
 
-	/* Segment/entries counts */
-	uint16_t	req_cnt;	/* !0 indicates counts determined */
-	uint16_t	tot_dsds;
-
 	/* SRB magic number */
 	uint16_t magic;
 #define SRB_MAGIC       0x10CB
@@ -1307,8 +1321,7 @@
 #define SS_RESIDUAL_UNDER		BIT_11
 #define SS_RESIDUAL_OVER		BIT_10
 #define SS_SENSE_LEN_VALID		BIT_9
-#define SS_RESIDUAL_LEN_VALID		BIT_8	/* ISP2100 only */
-#define SS_RESPONSE_INFO_LEN_VALID	BIT_8	/* ISP2200 and 23xx */
+#define SS_RESPONSE_INFO_LEN_VALID	BIT_8
 
 #define SS_RESERVE_CONFLICT		(BIT_4 | BIT_3)
 #define SS_BUSY_CONDITION		BIT_3
@@ -2272,7 +2285,8 @@
 	mbx_cmd_t	*mcp;
 	unsigned long	mbx_cmd_flags;
 #define MBX_INTERRUPT	1
-#define MBX_INTR_WAIT   2
+#define MBX_INTR_WAIT	2
+#define MBX_UPDATE_FLASH_ACTIVE	3
 
 	spinlock_t	mbx_reg_lock;   /* Mbx Cmd Register Lock */
 
@@ -2308,6 +2322,7 @@
 	uint16_t	fw_minor_version;
 	uint16_t	fw_subminor_version;
 	uint16_t	fw_attributes;
+	uint32_t	fw_memory_size;
 	uint32_t	fw_transfer_size;
 
 	uint16_t	fw_options[16];		/* slots: 1,2,3,10,11 */
@@ -2423,4 +2438,17 @@
 #include "qla_inline.h"
 #include "qla_listops.h"
 
+/*
+* String arrays
+*/
+#define LINESIZE    256
+#define MAXARGS      26
+
+#define CMD_SP(Cmnd)		((Cmnd)->SCp.ptr)
+#define CMD_COMPL_STATUS(Cmnd)  ((Cmnd)->SCp.this_residual)
+#define CMD_RESID_LEN(Cmnd)	((Cmnd)->SCp.buffers_residual)
+#define CMD_SCSI_STATUS(Cmnd)	((Cmnd)->SCp.Status)
+#define CMD_ACTUAL_SNSLEN(Cmnd)	((Cmnd)->SCp.Message)
+#define CMD_ENTRY_STATUS(Cmnd)	((Cmnd)->SCp.have_data_in)
+
 #endif
--- diff/drivers/scsi/qla2xxx/qla_gbl.h	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_gbl.h	2004-07-01 21:32:43.000000000 +0100
@@ -23,6 +23,8 @@
 #ifndef __QLA_GBL_H
 #define	__QLA_GBL_H
 
+#include <linux/interrupt.h>
+
 extern void qla2x00_remove_one(struct pci_dev *);
 extern int qla2x00_probe_one(struct pci_dev *, struct qla_board_info *);
 
@@ -64,6 +66,7 @@
 extern int ql2xmaxqdepth;
 extern int displayConfig;
 extern int ql2xplogiabsentdevice;
+extern int ql2xenablezio;
 extern int ql2xintrdelaytimer;
 extern int ql2xloginretrycount;
 
@@ -74,8 +77,6 @@
 #if defined(MODULE)
 extern char *ql2xopts;
 #endif
-extern struct list_head qla_hostlist;
-extern rwlock_t qla_hostlist_lock;
 
 extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *);
 
@@ -140,7 +141,7 @@
 
 extern void
 qla2x00_get_fw_version(scsi_qla_host_t *, uint16_t *,
-    uint16_t *, uint16_t *, uint16_t *);
+    uint16_t *, uint16_t *, uint16_t *, uint32_t *);
 
 extern int
 qla2x00_get_fw_options(scsi_qla_host_t *, uint16_t *);
--- diff/drivers/scsi/qla2xxx/qla_gs.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_gs.c	2004-07-01 21:32:43.000000000 +0100
@@ -16,8 +16,6 @@
  * General Public License for more details.
  *
  */
-#include "qla_os.h"
-
 #include "qla_def.h"
 
 static inline ms_iocb_entry_t *
--- diff/drivers/scsi/qla2xxx/qla_init.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_init.c	2004-07-01 21:32:43.000000000 +0100
@@ -16,8 +16,10 @@
  * General Public License for more details.
  *
  */
-#include "qla_os.h"
 #include "qla_def.h"
+
+#include <linux/delay.h>
+
 #include "qla_devtbl.h"
 
 /* XXX(hch): this is ugly, but we don't want to pull in exioctl.h */
@@ -107,8 +109,8 @@
 	uint32_t wait_time;
 
 	/* Clear adapter flags. */
-	ha->flags.online = FALSE;
-	ha->flags.reset_active = FALSE;
+	ha->flags.online = 0;
+	ha->flags.reset_active = 0;
 	atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME);
 	atomic_set(&ha->loop_state, LOOP_DOWN);
 	ha->device_flags = 0;
@@ -220,17 +222,12 @@
 	} while (restart_risc && retry--);
 
 	if (rval == QLA_SUCCESS) {
-		/* Retrieve firmware information */
-		qla2x00_get_fw_version(ha, &ha->fw_major_version,
-		    &ha->fw_minor_version, &ha->fw_subminor_version,
-		    &ha->fw_attributes);
-
 		clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags);
 		ha->marker_needed = 1;
 		qla2x00_marker(ha, 0, 0, MK_SYNC_ALL);
 		ha->marker_needed = 0;
 
-		ha->flags.online = TRUE;
+		ha->flags.online = 1;
 	} else {
 		DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__));
 	}
@@ -730,6 +727,14 @@
 			    "firmware.\n", ha->host_no));
 
 			rval = qla2x00_execute_fw(ha);
+			/* Retrieve firmware information. */
+			if (rval == QLA_SUCCESS && ha->fw_major_version == 0) {
+				qla2x00_get_fw_version(ha,
+				    &ha->fw_major_version,
+				    &ha->fw_minor_version,
+				    &ha->fw_subminor_version,
+				    &ha->fw_attributes, &ha->fw_memory_size);
+			}
 		}
 		else {
 			DEBUG2(printk(KERN_INFO
@@ -941,7 +946,8 @@
 			rval = QLA_FUNCTION_FAILED;
 
 			if (atomic_read(&ha->loop_down_timer) &&
-			    fw_state >= FSTATE_LOSS_OF_SYNC) {
+			    (fw_state >= FSTATE_LOSS_OF_SYNC ||
+				fw_state == FSTATE_WAIT_AL_PA)) {
 				/* Loop down. Timeout on min_wait for states
 				 * other than Wait for Login. 
 				 */	
@@ -1110,7 +1116,7 @@
 	nvram_t *nv    = (nvram_t *)ha->request_ring;
 	uint16_t  *wptr  = (uint16_t *)ha->request_ring;
 	device_reg_t *reg = ha->iobase;
-	uint16_t  timer_mode;
+	uint8_t  timer_mode;
 
 	rval = QLA_SUCCESS;
 
@@ -1164,7 +1170,7 @@
 		} else if (IS_QLA2200(ha)) {
 			nv->firmware_options[0] = BIT_2 | BIT_1;
 			nv->firmware_options[1] = BIT_7 | BIT_5;
-			nv->add_firmware_options[0] = BIT_5 | BIT_4;
+			nv->add_firmware_options[0] = BIT_5;
 			nv->add_firmware_options[1] = BIT_5 | BIT_4;
 			nv->frame_payload_size = __constant_cpu_to_le16(1024);
 		} else if (IS_QLA2100(ha)) {
@@ -1262,6 +1268,16 @@
 		}
 	} else if (IS_QLA2200(ha)) {
 		nv->firmware_options[0] |= BIT_2;
+		/*
+		 * 'Point-to-point preferred, else loop' is not a safe
+		 * connection mode setting.
+		 */
+		if ((nv->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) ==
+		    (BIT_5 | BIT_4)) {
+			/* Force 'loop preferred, else point-to-point'. */
+			nv->add_firmware_options[0] &= ~(BIT_6 | BIT_5 | BIT_4);
+			nv->add_firmware_options[0] |= BIT_5;
+		}
 		strcpy(ha->model_number, "QLA22xx");
 	} else /*if (IS_QLA2100(ha))*/ {
 		strcpy(ha->model_number, "QLA2100");
@@ -1417,23 +1433,22 @@
 
 		ha->flags.process_response_queue = 1;
 	} else {
-		/* TEST ZIO:
-		 *
-		 * icb->add_firmware_options[0] &=
-		 *    ~(BIT_3 | BIT_2 | BIT_1 | BIT_0);
-		 * icb->add_firmware_options[0] |= (BIT_2 | BIT_0);
-		 */
+		/* Enable ZIO -- Support mode 5 only. */
 		timer_mode = icb->add_firmware_options[0] &
 		    (BIT_3 | BIT_2 | BIT_1 | BIT_0);
-		if (timer_mode == 5) {
+		icb->add_firmware_options[0] &=
+		    ~(BIT_3 | BIT_2 | BIT_1 | BIT_0);
+		if (ql2xenablezio)
+			timer_mode = BIT_2 | BIT_0;
+		if (timer_mode == (BIT_2 | BIT_0)) {
 			DEBUG2(printk("scsi(%ld): ZIO enabled; timer delay "
 			    "(%d).\n", ha->host_no, ql2xintrdelaytimer));
 			qla_printk(KERN_INFO, ha,
 			    "ZIO enabled; timer delay (%d).\n",
 			    ql2xintrdelaytimer);
 
+			icb->add_firmware_options[0] |= timer_mode;
 			icb->interrupt_delay_timer = ql2xintrdelaytimer;
-	
 			ha->flags.process_response_queue = 1;
 		}
 	}
@@ -1539,20 +1554,20 @@
 	if (ha->current_topology == ISP_CFG_FL &&
 	    (test_bit(LOCAL_LOOP_UPDATE, &flags))) {
 
-		ha->flags.rscn_queue_overflow = TRUE;
+		ha->flags.rscn_queue_overflow = 1;
 		set_bit(RSCN_UPDATE, &flags);
 
 	} else if (ha->current_topology == ISP_CFG_F &&
 	    (test_bit(LOCAL_LOOP_UPDATE, &flags))) {
 
-		ha->flags.rscn_queue_overflow = TRUE;
+		ha->flags.rscn_queue_overflow = 1;
 		set_bit(RSCN_UPDATE, &flags);
 		clear_bit(LOCAL_LOOP_UPDATE, &flags);
 
 	} else if (!ha->flags.online ||
 	    (test_bit(ABORT_ISP_ACTIVE, &flags))) {
 
-		ha->flags.rscn_queue_overflow = TRUE;
+		ha->flags.rscn_queue_overflow = 1;
 		set_bit(RSCN_UPDATE, &flags);
 		set_bit(LOCAL_LOOP_UPDATE, &flags);
 	}
@@ -2328,13 +2343,13 @@
 	do {
 		/* Ensure we are logged into the SNS. */
 		qla2x00_login_fabric(ha, SIMPLE_NAME_SERVER, 0xff, 0xff, 0xfc,
-		    mb, BIT_0);
+		    mb, BIT_1 | BIT_0);
 		if (mb[0] != MBS_COMMAND_COMPLETE) {
-			qla_printk(KERN_INFO, ha,
+			DEBUG2(qla_printk(KERN_INFO, ha,
 			    "Failed SNS login: loop_id=%x mb[0]=%x mb[1]=%x "
 			    "mb[2]=%x mb[6]=%x mb[7]=%x\n", SIMPLE_NAME_SERVER,
-			    mb[0], mb[1], mb[2], mb[6], mb[7]);
-			return (QLA_FUNCTION_FAILED);
+			    mb[0], mb[1], mb[2], mb[6], mb[7]));
+			return (QLA_SUCCESS);
 		}
 
 		if (test_and_clear_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags)) {
@@ -2578,11 +2593,6 @@
 		if ((new_fcport->d_id.b.domain & 0xf0) == 0xf0)
 			continue;
 
-		/* Bypass if same domain and area of adapter. */
-		if ((new_fcport->d_id.b24 & 0xffff00) ==
-		    (ha->d_id.b24 & 0xffff00))
-			continue;
-
 		/* Locate matching device in database. */
 		found = 0;
 		list_for_each_entry(fcport, &ha->fcports, list) {
@@ -2593,6 +2603,15 @@
 			found++;
 
 			/*
+			 * If address the same and state FCS_ONLINE, nothing
+			 * changed.
+			 */
+			if (fcport->d_id.b24 == new_fcport->d_id.b24 &&
+			    atomic_read(&fcport->state) == FCS_ONLINE) {
+				break;
+			}
+
+			/*
 			 * If device was not a fabric device before.
 			 */
 			if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) {
@@ -2605,15 +2624,6 @@
 			}
 
 			/*
-			 * If address the same and state FCS_ONLINE, nothing
-			 * changed.
-			 */
-			if (fcport->d_id.b24 == new_fcport->d_id.b24 &&
-			    atomic_read(&fcport->state) == FCS_ONLINE) {
-				break;
-			}
-
-			/*
 			 * Port ID changed or device was marked to be updated;
 			 * Log it out if still logged in and mark it for
 			 * relogin later.
@@ -2882,7 +2892,7 @@
 
 	rval = qla2x00_fabric_login(ha, fcport, next_loopid);
 	if (rval == QLA_SUCCESS) {
-		rval = qla2x00_get_port_database(ha, fcport, BIT_1 | BIT_0);
+		rval = qla2x00_get_port_database(ha, fcport, 0);
 		if (rval != QLA_SUCCESS) {
 			qla2x00_fabric_logout(ha, fcport->loop_id);
 		} else {
@@ -3095,7 +3105,7 @@
 				wait_time &&
 				(test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)));
 		}
-		qla2x00_restart_queues(ha, TRUE);
+		qla2x00_restart_queues(ha, 1);
 	}
 
 	if (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) {
@@ -4098,7 +4108,7 @@
 	uint8_t        status = 0;
 
 	if (ha->flags.online) {
-		ha->flags.online = FALSE;
+		ha->flags.online = 0;
 		clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
 		qla2x00_stats.ispAbort++;
 		ha->total_isp_aborts++;  /* used by ioctl */
@@ -4108,10 +4118,14 @@
 		    "Performing ISP error recovery - ha= %p.\n", ha);
 		qla2x00_reset_chip(ha);
 
+		atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME);
 		if (atomic_read(&ha->loop_state) != LOOP_DOWN) {
 			atomic_set(&ha->loop_state, LOOP_DOWN);
-			atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME);
 			qla2x00_mark_all_devices_lost(ha);
+		} else {
+			if (!atomic_read(&ha->loop_down_timer))
+				atomic_set(&ha->loop_down_timer,
+				    LOOP_DOWN_TIME);
 		}
 
 		spin_lock_irqsave(&ha->hardware_lock, flags);
@@ -4123,23 +4137,27 @@
 				if (ha->actthreads)
 					ha->actthreads--;
 				sp->lun_queue->out_cnt--;
-				sp->flags = 0;
 
 				/*
 				 * Set the cmd host_byte status depending on
 				 * whether the scsi_error_handler is
 				 * active or not.
  				 */
-				if (ha->host->eh_active != EH_ACTIVE) {
-					sp->cmd->result = DID_BUS_BUSY << 16;
+				if (sp->flags & SRB_TAPE) {
+					sp->cmd->result = DID_NO_CONNECT << 16;
 				} else {
-					sp->cmd->result = DID_RESET << 16;
+					if (ha->host->eh_active != EH_ACTIVE)
+						sp->cmd->result =
+						    DID_BUS_BUSY << 16;
+					else
+						sp->cmd->result =
+						    DID_RESET << 16;
 				}
+				sp->flags = 0;
 				sp->cmd->host_scribble = (unsigned char *)NULL;
 				add_to_done_queue(ha, sp);
 			}
 		}
-
 		spin_unlock_irqrestore(&ha->hardware_lock, flags);
 
 		qla2x00_nvram_config(ha);
@@ -4155,20 +4173,20 @@
 				ha->marker_needed = 1;
 			}
 
-			ha->flags.online = TRUE;
+			ha->flags.online = 1;
 
 			/* Enable ISP interrupts. */
 			qla2x00_enable_intrs(ha);
 
 			/* v2.19.5b6 Return all commands */
-			qla2x00_abort_queues(ha, TRUE);
+			qla2x00_abort_queues(ha, 1);
 
 			/* Restart queues that may have been stopped. */
-			qla2x00_restart_queues(ha,TRUE);
+			qla2x00_restart_queues(ha, 1);
 			ha->isp_abort_cnt = 0; 
 			clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags);
 		} else {	/* failed the ISP abort */
-			ha->flags.online = TRUE;
+			ha->flags.online = 1;
 			if (test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) {
 				if (ha->isp_abort_cnt == 0) {
  					qla_printk(KERN_WARNING, ha,
@@ -4179,8 +4197,8 @@
 					 * completely.
 					 */
 					qla2x00_reset_adapter(ha);
-					qla2x00_abort_queues(ha, FALSE);
-					ha->flags.online = FALSE;
+					qla2x00_abort_queues(ha, 0);
+					ha->flags.online = 0;
 					clear_bit(ISP_ABORT_RETRY,
 					    &ha->dpc_flags);
 					status = 0;
@@ -4235,7 +4253,7 @@
 
 	/* If firmware needs to be loaded */
 	if (qla2x00_isp_firmware(ha)) {
-		ha->flags.online = FALSE;
+		ha->flags.online = 0;
 		if (!(status = qla2x00_chip_diag(ha))) {
 			if (IS_QLA2100(ha) || IS_QLA2200(ha)) {
 				status = qla2x00_setup_chip(ha);
@@ -4274,7 +4292,7 @@
 					"status = %d\n",
 					__func__,
 					status);)
-			ha->flags.online = TRUE;
+			ha->flags.online = 1;
 			/* Wait at most MAX_TARGET RSCNs for a stable link. */
 			wait_time = 256;
 			do {
@@ -4311,7 +4329,7 @@
 	unsigned long flags = 0;
 	device_reg_t *reg = ha->iobase;
 
-	ha->flags.online = FALSE;
+	ha->flags.online = 0;
 	qla2x00_disable_intrs(ha);
 	/* Reset RISC processor. */
 	spin_lock_irqsave(&ha->hardware_lock, flags);
--- diff/drivers/scsi/qla2xxx/qla_inline.h	2004-05-19 22:12:14.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_inline.h	2004-07-01 21:32:43.000000000 +0100
@@ -165,7 +165,7 @@
  *      wwn = Pointer to WW name to check
  *
  * Returns:
- *      TRUE if name is 0 else FALSE
+ *      1 if name is 0x00 else 0
  *
  * Context:
  *      Kernel context.
@@ -179,7 +179,7 @@
 		if (*wwn != 0)
 			break;
 	}
-	/* if zero return TRUE */
+	/* if zero return 1 */
 	if (cnt == WWN_SIZE)
 		return (1);
 	else
--- diff/drivers/scsi/qla2xxx/qla_iocb.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_iocb.c	2004-07-01 21:32:43.000000000 +0100
@@ -17,9 +17,11 @@
  *
  ******************************************************************************/
 
-#include "qla_os.h"
 #include "qla_def.h"
 
+#include <linux/blkdev.h>
+#include <linux/delay.h>
+
 static inline uint16_t qla2x00_get_cmd_direction(struct scsi_cmnd *cmd);
 static inline cont_entry_t *qla2x00_prep_cont_type0_iocb(scsi_qla_host_t *);
 static inline cont_a64_entry_t *qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *);
@@ -42,28 +44,6 @@
 		cflags = CF_WRITE;
 	else if (cmd->sc_data_direction == DMA_FROM_DEVICE)
 		cflags = CF_READ;
-	else {
-		switch (cmd->data_cmnd[0]) {
-		case WRITE_6:
-		case WRITE_10:
-		case WRITE_12:
-		case WRITE_BUFFER:
-		case WRITE_LONG:
-		case WRITE_SAME:
-		case WRITE_VERIFY:
-		case WRITE_VERIFY_12:
-		case FORMAT_UNIT:
-		case SEND_VOLUME_TAG:
-		case MODE_SELECT:
-		case SEND_DIAGNOSTIC:
-		case MODE_SELECT_10:
-			cflags = CF_WRITE;
-			break;
-		default:
-			cflags = CF_READ;
-			break;
-		}
-	}
 	return (cflags);
 }
 
@@ -350,11 +330,12 @@
 	uint32_t	*clr_ptr;
 	uint32_t        index;
 	uint32_t	handle;
-	uint16_t	cnt;
 	cmd_entry_t	*cmd_pkt;
 	uint32_t        timeout;
 	struct scatterlist *sg;
-
+	uint16_t	cnt;
+	uint16_t	req_cnt;
+	uint16_t	tot_dsds;
 	device_reg_t	*reg;
 
 	/* Setup device pointers. */
@@ -372,72 +353,60 @@
 		ha->marker_needed = 0;
 	}
 
-	/* Calculate number of segments and entries required. */
-	if (sp->req_cnt == 0) {
-		sp->tot_dsds = 0;
-		if (cmd->use_sg) {
-			sg = (struct scatterlist *) cmd->request_buffer;
-			sp->tot_dsds = pci_map_sg(ha->pdev, sg, cmd->use_sg,
-			    cmd->sc_data_direction);
-		} else if (cmd->request_bufflen) {
-		    sp->tot_dsds++;
-		}
-		sp->req_cnt = (ha->calc_request_entries)(sp->tot_dsds);
-	}
-
 	/* Acquire ring specific lock */
 	spin_lock_irqsave(&ha->hardware_lock, flags);
 
-	if (ha->req_q_cnt < (sp->req_cnt + 2)) {
-		/* Calculate number of free request entries */
-		cnt = RD_REG_WORD_RELAXED(ISP_REQ_Q_OUT(ha, reg));
-		if (ha->req_ring_index < cnt)
-			ha->req_q_cnt = cnt - ha->req_ring_index;
-		else
-			ha->req_q_cnt = ha->request_q_length -
-			    (ha->req_ring_index - cnt);
-	}
-
-	/* If no room for request in request ring */
-	if (ha->req_q_cnt < (sp->req_cnt + 2)) {
-		DEBUG5(printk("scsi(%ld): in-ptr=%x req_q_cnt=%x "
-		    "tot_dsds=%x.\n",
-		    ha->host_no, ha->req_ring_index, ha->req_q_cnt,
-		    sp->tot_dsds));
-
-		goto queuing_error;
-	}
-
 	/* Check for room in outstanding command list. */
 	handle = ha->current_outstanding_cmd;
 	for (index = 1; index < MAX_OUTSTANDING_COMMANDS; index++) {
 		handle++;
 		if (handle == MAX_OUTSTANDING_COMMANDS)
 			handle = 1;
-		if (ha->outstanding_cmds[handle] == 0) {
-			ha->current_outstanding_cmd = handle;
+		if (ha->outstanding_cmds[handle] == 0)
 			break;
-		}
 	}
-	if (index == MAX_OUTSTANDING_COMMANDS) {
-		DEBUG5(printk("scsi(%ld): Unable to queue command -- NO ROOM "
-		    "IN OUTSTANDING ARRAY (req_q_cnt=%x).\n",
-		    ha->host_no, ha->req_q_cnt));
+	if (index == MAX_OUTSTANDING_COMMANDS)
 		goto queuing_error;
+
+	/* Calculate the number of request entries needed. */
+	req_cnt = (ha->calc_request_entries)(cmd->request->nr_hw_segments);
+	if (ha->req_q_cnt < (req_cnt + 2)) {
+		cnt = RD_REG_WORD_RELAXED(ISP_REQ_Q_OUT(ha, reg));
+		if (ha->req_ring_index < cnt)
+			ha->req_q_cnt = cnt - ha->req_ring_index;
+		else
+			ha->req_q_cnt = ha->request_q_length -
+			    (ha->req_ring_index - cnt);
+	}
+	if (ha->req_q_cnt < (req_cnt + 2))
+		goto queuing_error;
+
+	/* Finally, we have enough space, now perform mappings. */
+	tot_dsds = 0;
+	if (cmd->use_sg) {
+		sg = (struct scatterlist *) cmd->request_buffer;
+		tot_dsds = pci_map_sg(ha->pdev, sg, cmd->use_sg,
+		    cmd->sc_data_direction);
+		if (tot_dsds == 0)
+			goto queuing_error;
+	} else if (cmd->request_bufflen) {
+	    tot_dsds++;
 	}
+	req_cnt = (ha->calc_request_entries)(tot_dsds);
 
 	/* Build command packet */
+	ha->current_outstanding_cmd = handle;
 	ha->outstanding_cmds[handle] = sp;
 	sp->ha = ha;
 	sp->cmd->host_scribble = (unsigned char *)(unsigned long)handle;
-	ha->req_q_cnt -= sp->req_cnt;
+	ha->req_q_cnt -= req_cnt;
 
 	cmd_pkt = (cmd_entry_t *)ha->request_ring_ptr;
 	cmd_pkt->handle = handle;
 	/* Zero out remaining portion of packet. */
 	clr_ptr = (uint32_t *)cmd_pkt + 2;
 	memset(clr_ptr, 0, REQUEST_ENTRY_SIZE - 8);
-	cmd_pkt->dseg_count = cpu_to_le16(sp->tot_dsds);
+	cmd_pkt->dseg_count = cpu_to_le16(tot_dsds);
 
 	/* Set target ID */
 	SET_TARGET_ID(ha, cmd_pkt->target, fclun->fcport->loop_id);
@@ -477,10 +446,11 @@
 	cmd_pkt->byte_count = cpu_to_le32((uint32_t)cmd->request_bufflen);
 
 	/* Build IOCB segments */
-	(ha->build_scsi_iocbs)(sp, cmd_pkt, sp->tot_dsds);
+	(ha->build_scsi_iocbs)(sp, cmd_pkt, tot_dsds);
 
 	/* Set total data segment count. */
-	cmd_pkt->entry_count = (uint8_t)sp->req_cnt;
+	cmd_pkt->entry_count = (uint8_t)req_cnt;
+	wmb();
 
 	/* Adjust ring index. */
 	ha->req_ring_index++;
@@ -541,6 +511,7 @@
 		pkt->lun = cpu_to_le16(lun);
 		SET_TARGET_ID(ha, pkt->target, loop_id);
 	}
+	wmb();
 
 	/* Issue command to ISP */
 	qla2x00_isp_cmd(ha);
--- diff/drivers/scsi/qla2xxx/qla_isr.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_isr.c	2004-07-01 21:32:43.000000000 +0100
@@ -16,9 +16,6 @@
  * General Public License for more details.
  *
  */
-
-#include "qla_os.h"
-
 #include "qla_def.h"
 
 static void qla2x00_mbx_completion(scsi_qla_host_t *, uint16_t);
@@ -109,7 +106,25 @@
 			}
 		} else /* IS_QLA23XX(ha) */ {
 			stat = RD_REG_DWORD(&reg->u.isp2300.host_status);
-			if ((stat & HSR_RISC_INT) == 0)
+			if (stat & HSR_RISC_PAUSED) {
+				hccr = RD_REG_WORD(&reg->hccr);
+				if (hccr & (BIT_15 | BIT_13 | BIT_11 | BIT_8))
+					qla_printk(KERN_INFO, ha,
+					    "Parity error -- HCCR=%x.\n", hccr);
+				else
+					qla_printk(KERN_INFO, ha,
+					    "RISC paused -- HCCR=%x\n", hccr);
+
+				/*
+				 * Issue a "HARD" reset in order for the RISC
+				 * interrupt bit to be cleared.  Schedule a big
+				 * hammmer to get out of the RISC PAUSED state.
+				 */
+				WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC);
+				RD_REG_WORD(&reg->hccr);
+				set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
+				break;
+			} else if ((stat & HSR_RISC_INT) == 0)
 				break;
 
 			mbx = MSW(stat);
@@ -139,29 +154,9 @@
 				qla2x00_async_event(ha, mbx);
 				break;
 			default:
-				hccr = RD_REG_WORD(&reg->hccr);
-				if (hccr & HCCR_RISC_PAUSE) {
-					qla_printk(KERN_INFO, ha,
-					    "RISC paused, dumping HCCR=%x\n",
-					    hccr);
-
-					/*
-					 * Issue a "HARD" reset in order for
-					 * the RISC interrupt bit to be
-					 * cleared.  Schedule a big hammmer to
-					 * get out of the RISC PAUSED state.
-					 */
-					WRT_REG_WORD(&reg->hccr,
-					    HCCR_RESET_RISC);
-					RD_REG_WORD(&reg->hccr);
-					set_bit(ISP_ABORT_NEEDED,
-					    &ha->dpc_flags);
-					break;
-				} else {
-					DEBUG2(printk("scsi(%ld): Unrecognized "
-					    "interrupt type (%d)\n",
-					    ha->host_no, stat & 0xff));
-				}
+				DEBUG2(printk("scsi(%ld): Unrecognized "
+				    "interrupt type (%d)\n",
+				    ha->host_no, stat & 0xff));
 				break;
 			}
 			WRT_REG_WORD(&reg->hccr, HCCR_CLR_RISC_INT);
@@ -235,7 +230,7 @@
 	device_reg_t	*reg = ha->iobase;
 
 	/* Load return mailbox registers. */
-	ha->flags.mbox_int = TRUE;
+	ha->flags.mbox_int = 1;
 	ha->mailbox_out[0] = mb0;
 	wptr = (uint16_t *)MAILBOX_REG(ha, reg, 1);
 
@@ -344,7 +339,6 @@
 		break;
 	}
 
-	mb[0] = LSW(mbx);
 	switch (mb[0]) {
 	case MBA_SCSI_COMPLETION:	/* Fast Post */
 		if (!ha->flags.online)
@@ -827,7 +821,7 @@
 	uint16_t	comp_status;
 	uint16_t	scsi_status;
 	uint8_t		lscsi_status;
-	uint32_t	resid;
+	int32_t		resid;
 	uint8_t		sense_sz = 0;
 	uint16_t	rsp_info_len;
 
@@ -948,6 +942,11 @@
 			cp->result = DID_OK << 16;
 			break;
 		}
+		if (scsi_status & (SS_RESIDUAL_UNDER | SS_RESIDUAL_OVER)) {
+			resid = le32_to_cpu(pkt->residual_length);
+			cp->resid = resid;
+			CMD_RESID_LEN(cp) = resid;
+		}
 		if (lscsi_status == SS_BUSY_CONDITION) {
 			cp->result = DID_BUS_BUSY << 16 | lscsi_status;
 			break;
@@ -1009,7 +1008,10 @@
 		    ha->host_no, t, l, comp_status, scsi_status));
 
 		resid = le32_to_cpu(pkt->residual_length);
-		CMD_RESID_LEN(cp) = resid;
+		if (scsi_status & SS_RESIDUAL_UNDER) {
+			cp->resid = resid;
+			CMD_RESID_LEN(cp) = resid;
+		}
 
 		/*
 		 * Check to see if SCSI Status is non zero. If so report SCSI 
@@ -1085,7 +1087,6 @@
 			}
 
 			/* Handle mid-layer underflow */
-			cp->resid = resid;
 			if ((unsigned)(cp->request_bufflen - resid) <
 			    cp->underflow) {
 				qla_printk(KERN_INFO, ha,
--- diff/drivers/scsi/qla2xxx/qla_mbx.c	2004-06-30 14:25:52.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_mbx.c	2004-07-01 21:32:43.000000000 +0100
@@ -16,11 +16,9 @@
  * General Public License for more details.
  *
  */
-
-#include "qla_os.h"
-
 #include "qla_def.h"
 
+#include <linux/delay.h>
 
 static void
 qla2x00_mbx_sem_timeout(unsigned long data)
@@ -89,7 +87,7 @@
 		}
 	}
 
-	ha->flags.mbox_busy = TRUE;
+	ha->flags.mbox_busy = 1;
 	/* Save mailbox command for debug */
 	ha->mcp = mcp;
 
@@ -135,7 +133,7 @@
 #endif
 
 	/* Issue set host interrupt command to send cmd out. */
-	ha->flags.mbox_int = FALSE;
+	ha->flags.mbox_int = 0;
 	clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
 
 	/* Unlock mbx registers and wait for interrupt */
@@ -216,7 +214,7 @@
 		    command);)
 
 		/* Got interrupt. Clear the flag. */
-		ha->flags.mbox_int = FALSE;
+		ha->flags.mbox_int = 0;
 		clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
 
 		if (ha->mailbox_out[0] != MBS_COMMAND_COMPLETE) {
@@ -257,7 +255,7 @@
 	if (!abort_active)
 		spin_unlock_irqrestore(&ha->mbx_reg_lock, mbx_flags);
 
-	ha->flags.mbox_busy = FALSE;
+	ha->flags.mbox_busy = 0;
 
 	/* Clean up */
 	ha->mcp = NULL;
@@ -546,7 +544,7 @@
  */
 void
 qla2x00_get_fw_version(scsi_qla_host_t *ha, uint16_t *major, uint16_t *minor,
-    uint16_t *subminor, uint16_t *attributes)
+    uint16_t *subminor, uint16_t *attributes, uint32_t *memory)
 {
 	int		rval;
 	mbx_cmd_t	mc;
@@ -556,7 +554,7 @@
 
 	mcp->mb[0] = MBC_GET_FIRMWARE_VERSION;
 	mcp->out_mb = MBX_0;
-	mcp->in_mb = MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
+	mcp->in_mb = MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0;
 	mcp->flags = 0;
 	mcp->tov = 30;
 	rval = qla2x00_mailbox_command(ha, mcp);
@@ -566,6 +564,10 @@
 	*minor = mcp->mb[2];
 	*subminor = mcp->mb[3];
 	*attributes = mcp->mb[6];
+	if (IS_QLA2100(ha) || IS_QLA2200(ha))
+		*memory = 0x1FFFF;			/* Defaults to 128KB. */
+	else
+		*memory = (mcp->mb[5] << 16) | mcp->mb[4];
 
 	if (rval != QLA_SUCCESS) {
 		/*EMPTY*/
@@ -1431,35 +1433,37 @@
 	mcp->flags = MBX_DMA_IN;
 	mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2);
 	rval = qla2x00_mailbox_command(ha, mcp);
+	if (rval != QLA_SUCCESS)
+		goto gpd_error_out;
 
-	if (rval == QLA_SUCCESS) {
-		/* Names are little-endian. */
-		memcpy(fcport->node_name, pd->node_name, WWN_SIZE);
-		memcpy(fcport->port_name, pd->port_name, WWN_SIZE);
-
-		/* Get port_id of device. */
-		fcport->d_id.b.al_pa = pd->port_id[2];
-		fcport->d_id.b.area = pd->port_id[3];
-		fcport->d_id.b.domain = pd->port_id[0];
-		fcport->d_id.b.rsvd_1 = 0;
-
-		/* Check for device require authentication. */
-		pd->common_features & BIT_5 ? (fcport->flags |= FCF_AUTH_REQ) :
-		    (fcport->flags &= ~FCF_AUTH_REQ);
-
-		/* If not target must be initiator or unknown type. */
-		if ((pd->prli_svc_param_word_3[0] & BIT_4) == 0) {
-			fcport->port_type = FCT_INITIATOR;
-		} else {
-			fcport->port_type = FCT_TARGET;
-
-			/* Check for logged in. */
-			if (pd->master_state != PD_STATE_PORT_LOGGED_IN &&
-			    pd->slave_state != PD_STATE_PORT_LOGGED_IN)
-				rval = QLA_FUNCTION_FAILED;
-		}
-	}
+	/* Check for logged in state. */
+	if (pd->master_state != PD_STATE_PORT_LOGGED_IN &&
+	    pd->slave_state != PD_STATE_PORT_LOGGED_IN) {
+		rval = QLA_FUNCTION_FAILED;
+		goto gpd_error_out;
+	}
+
+	/* Names are little-endian. */
+	memcpy(fcport->node_name, pd->node_name, WWN_SIZE);
+	memcpy(fcport->port_name, pd->port_name, WWN_SIZE);
+
+	/* Get port_id of device. */
+	fcport->d_id.b.al_pa = pd->port_id[2];
+	fcport->d_id.b.area = pd->port_id[3];
+	fcport->d_id.b.domain = pd->port_id[0];
+	fcport->d_id.b.rsvd_1 = 0;
+
+	/* Check for device require authentication. */
+	pd->common_features & BIT_5 ? (fcport->flags |= FCF_AUTH_REQ) :
+	    (fcport->flags &= ~FCF_AUTH_REQ);
+
+	/* If not target must be initiator or unknown type. */
+	if ((pd->prli_svc_param_word_3[0] & BIT_4) == 0)
+		fcport->port_type = FCT_INITIATOR;
+	else
+		fcport->port_type = FCT_TARGET;
 
+gpd_error_out:
 	pci_free_consistent(ha->pdev, PORT_DATABASE_SIZE, pd, pd_dma);
 
 	if (rval != QLA_SUCCESS) {
--- diff/drivers/scsi/qla2xxx/qla_os.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_os.c	2004-07-01 21:32:44.000000000 +0100
@@ -16,10 +16,17 @@
  * General Public License for more details.
  *
  */
-
-#include "qla_os.h"
 #include "qla_def.h"
 
+#include <linux/moduleparam.h>
+#include <linux/vmalloc.h>
+#include <linux/smp_lock.h>
+
+#include <scsi/scsi_tcq.h>
+#include <scsi/scsicam.h>
+#include <scsi/scsi_transport.h>
+#include <scsi/scsi_transport_fc.h>
+
 /*
  * Driver version
  */
@@ -46,72 +53,79 @@
  * Module parameter information and variables
  */
 int ql2xmaxqdepth;
-module_param(ql2xmaxqdepth, int, 0);
+module_param(ql2xmaxqdepth, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(ql2xmaxqdepth,
 		"Maximum queue depth to report for target devices.");
 
 int ql2xlogintimeout = 20;
-module_param(ql2xlogintimeout, int, 0);
+module_param(ql2xlogintimeout, int, S_IRUGO|S_IRUSR);
 MODULE_PARM_DESC(ql2xlogintimeout,
 		"Login timeout value in seconds.");
 
 int qlport_down_retry;
-module_param(qlport_down_retry, int, 0);
+module_param(qlport_down_retry, int, S_IRUGO|S_IRUSR);
 MODULE_PARM_DESC(qlport_down_retry,
 		"Maximum number of command retries to a port that returns"
 		"a PORT-DOWN status.");
 
 int ql2xretrycount = 20;
-module_param(ql2xretrycount, int, 0);
+module_param(ql2xretrycount, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(ql2xretrycount,
 		"Maximum number of mid-layer retries allowed for a command.  "
 		"Default value is 20, ");
 
 int displayConfig;
-module_param(displayConfig, int, 0);
+module_param(displayConfig, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(displayConfig,
 		"If 1 then display the configuration used in /etc/modprobe.conf.");
 
 int ql2xplogiabsentdevice;
-module_param(ql2xplogiabsentdevice, int, 0);
+module_param(ql2xplogiabsentdevice, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(ql2xplogiabsentdevice,
 		"Option to enable PLOGI to devices that are not present after "
 		"a Fabric scan.  This is needed for several broken switches."
 		"Default is 0 - no PLOGI. 1 - perfom PLOGI.");
 
+int ql2xenablezio = 0;
+module_param(ql2xenablezio, int, S_IRUGO|S_IRUSR);
+MODULE_PARM_DESC(ql2xenablezio,
+		"Option to enable ZIO:If 1 then enable it otherwise" 
+		" use the default set in the NVRAM."
+		" Default is 0 : disabled");
+
 int ql2xintrdelaytimer = 10;
-module_param(ql2xintrdelaytimer, int, 0);
+module_param(ql2xintrdelaytimer, int, S_IRUGO|S_IRUSR);
 MODULE_PARM_DESC(ql2xintrdelaytimer,
 		"ZIO: Waiting time for Firmware before it generates an "
 		"interrupt to the host to notify completion of request.");
 
 int ConfigRequired;
-module_param(ConfigRequired, int, 0);
+module_param(ConfigRequired, int, S_IRUGO|S_IRUSR);
 MODULE_PARM_DESC(ConfigRequired,
 		"If 1, then only configured devices passed in through the"
 		"ql2xopts parameter will be presented to the OS");
 
 int Bind = BIND_BY_PORT_NAME;
-module_param(Bind, int, 0);
+module_param(Bind, int, S_IRUGO|S_IRUSR);
 MODULE_PARM_DESC(Bind,
 		"Target persistent binding method: "
 		"0 by Portname (default); 1 by PortID; 2 by Nodename. ");
 
 int ql2xsuspendcount = SUSPEND_COUNT;
-module_param(ql2xsuspendcount, int, 0);
+module_param(ql2xsuspendcount, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(ql2xsuspendcount,
 		"Number of 6-second suspend iterations to perform while a "
 		"target returns a <NOT READY> status.  Default is 10 "
 		"iterations.");
 
 int ql2xdoinitscan = 1;
-module_param(ql2xdoinitscan, int, 0);
+module_param(ql2xdoinitscan, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(ql2xdoinitscan,
 		"Signal mid-layer to perform scan after driver load: 0 -- no "
 		"signal sent to mid-layer.");
 
 int ql2xloginretrycount = 0;
-module_param(ql2xloginretrycount, int, 0);
+module_param(ql2xloginretrycount, int, S_IRUGO|S_IRUSR);
 MODULE_PARM_DESC(ql2xloginretrycount,
 		"Specify an alternate value for the NVRAM login retry count.");
 
@@ -128,13 +142,6 @@
 static void copy_mem_info(struct info_str *, char *, int);
 static int copy_info(struct info_str *, char *, ...);
 
-
-/*
- * List of host adapters
- */
-LIST_HEAD(qla_hostlist);
-rwlock_t qla_hostlist_lock = RW_LOCK_UNLOCKED;
-
 static void qla2x00_free_device(scsi_qla_host_t *);
 
 static void qla2x00_config_dma_addressing(scsi_qla_host_t *ha);
@@ -147,7 +154,7 @@
 static int qla2xxx_eh_device_reset(struct scsi_cmnd *);
 static int qla2xxx_eh_bus_reset(struct scsi_cmnd *);
 static int qla2xxx_eh_host_reset(struct scsi_cmnd *);
-static uint8_t qla2x00_loop_reset(scsi_qla_host_t *ha);
+static int qla2x00_loop_reset(scsi_qla_host_t *ha);
 static int qla2x00_device_reset(scsi_qla_host_t *, fc_port_t *);
 
 static int qla2x00_proc_info(struct Scsi_Host *, char *, char **,
@@ -183,8 +190,6 @@
 
 static void qla2x00_display_fc_names(scsi_qla_host_t *);
 
-void qla2x00_blink_led(scsi_qla_host_t *);
-
 /* TODO Convert to inlines
  *
  * Timer routines
@@ -457,6 +462,7 @@
 	struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
 	    struct device, kobj)));
 	int reading;
+	uint32_t dump_size;
 
 	if (off != 0)
 		return (0);
@@ -482,11 +488,16 @@
 		if (ha->fw_dump != NULL && !ha->fw_dump_reading) {
 			ha->fw_dump_reading = 1;
 
-			ha->fw_dump_buffer = (char *)vmalloc(FW_DUMP_SIZE);
+			dump_size = FW_DUMP_SIZE_1M;
+			if (ha->fw_memory_size < 0x20000) 
+				dump_size = FW_DUMP_SIZE_128K;
+			else if (ha->fw_memory_size < 0x80000) 
+				dump_size = FW_DUMP_SIZE_512K;
+			ha->fw_dump_buffer = (char *)vmalloc(dump_size);
 			if (ha->fw_dump_buffer == NULL) {
 				qla_printk(KERN_WARNING, ha,
 				    "Unable to allocate memory for firmware "
-				    "dump buffer (%d).\n", FW_DUMP_SIZE);
+				    "dump buffer (%d).\n", dump_size);
 
 				ha->fw_dump_reading = 0;
 				return (count);
@@ -494,7 +505,7 @@
 			qla_printk(KERN_INFO, ha,
 			    "Firmware dump ready for read on (%ld).\n",
 			    ha->host_no);
-			memset(ha->fw_dump_buffer, 0, FW_DUMP_SIZE);
+			memset(ha->fw_dump_buffer, 0, dump_size);
 			if (IS_QLA2100(ha) || IS_QLA2200(ha))
  				qla2100_ascii_fw_dump(ha);
  			else
@@ -878,39 +889,38 @@
 static int
 qla2x00_eh_wait_on_command(scsi_qla_host_t *ha, struct scsi_cmnd *cmd)
 {
-#define ABORT_WAIT_TIME	10 /* seconds */
+#define ABORT_POLLING_PERIOD	HZ
+#define ABORT_WAIT_TIME		((10 * HZ) / (ABORT_POLLING_PERIOD))
 
 	int		found = 0;
 	int		done = 0;
-	srb_t		*rp;
+	srb_t		*rp = NULL;
 	struct list_head *list, *temp;
-	u_long		cpu_flags = 0;
 	u_long		max_wait_time = ABORT_WAIT_TIME;
 
 	do {
 		/* Check on done queue */
-		if (!found) {
-			spin_lock_irqsave(&ha->list_lock, cpu_flags);
-			list_for_each_safe(list, temp, &ha->done_queue) {
-				rp = list_entry(list, srb_t, list);
+		spin_lock(&ha->list_lock);
+		list_for_each_safe(list, temp, &ha->done_queue) {
+			rp = list_entry(list, srb_t, list);
 
-				/*
-				* Found command.  Just exit and wait for the
-				* cmd sent to OS.
-			 	*/
-				if (cmd == rp->cmd) {
-					found++;
-					DEBUG3(printk("%s: found in done "
-							"queue.\n", __func__);)
-					break;
-				}
+			/*
+			 * Found command. Just exit and wait for the cmd sent
+			 * to OS.
+			*/
+			if (cmd == rp->cmd) {
+				found++;
+				DEBUG3(printk("%s: found in done queue.\n",
+				    __func__);)
+				break;
 			}
-			spin_unlock_irqrestore(&ha->list_lock, cpu_flags);
 		}
+		spin_unlock(&ha->list_lock);
 
-		/* Checking to see if its returned to OS */
-		rp = (srb_t *) CMD_SP(cmd);
-		if (rp == NULL ) {
+		/* Complete the cmd right away. */
+		if (found) { 
+			qla2x00_delete_from_done_queue(ha, rp);
+			sp_put(ha, rp);
 			done++;
 			break;
 		}
@@ -918,20 +928,14 @@
 		spin_unlock_irq(ha->host->host_lock);
 
 		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(2*HZ);
+		schedule_timeout(ABORT_POLLING_PERIOD);
 
 		spin_lock_irq(ha->host->host_lock);
 
 	} while ((max_wait_time--));
 
-	if (done) {
+	if (done)
 		DEBUG2(printk(KERN_INFO "%s: found cmd=%p.\n", __func__, cmd));
-	} else if (found) {
-		/* Immediately return command to the mid-layer */
-		qla2x00_delete_from_done_queue(ha, rp);
-		sp_put(ha, rp);
-		done++;
-	}
 
 	return (done);
 }
@@ -953,7 +957,7 @@
  *    Success (Adapter is online) : 0
  *    Failed  (Adapter is offline/disabled) : 1
  */
-static inline int 
+int 
 qla2x00_wait_for_hba_online(scsi_qla_host_t *ha)
 {
 	int 	 return_status;
@@ -962,16 +966,15 @@
 	wait_online = jiffies + (MAX_LOOP_TIMEOUT * HZ); 
 	while (((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) ||
 	    test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) ||
-	    test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) &&
-		time_before(jiffies, wait_online)) {
+	    test_bit(ISP_ABORT_RETRY, &ha->dpc_flags) ||
+	    ha->dpc_active) && time_before(jiffies, wait_online)) {
 
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout(HZ);
 	}
-	if (ha->flags.online == TRUE) 
+	if (ha->flags.online) 
 		return_status = QLA_SUCCESS; 
 	else
-		/* Adapter is disabled/offline */
 		return_status = QLA_FUNCTION_FAILED;
 
 	DEBUG2(printk("%s return_status=%d\n",__func__,return_status));
@@ -1046,7 +1049,6 @@
 	struct Scsi_Host *host;
 	uint8_t		found = 0;
 	unsigned int	b, t, l;
-	unsigned long	flags;
 
 	/* Get the SCSI request ptr */
 	sp = (srb_t *) CMD_SP(cmd);
@@ -1061,7 +1063,7 @@
 		qla_printk(KERN_INFO, to_qla_host(cmd->device->host),
 		    "qla2xxx_eh_abort: cmd already done sp=%p\n", sp);
 		DEBUG(printk("qla2xxx_eh_abort: cmd already done sp=%p\n", sp);)
-		return(SUCCESS);
+		return SUCCESS;
 	}
 	if (sp) {
 		DEBUG(printk("qla2xxx_eh_abort: refcount %i \n",
@@ -1092,7 +1094,7 @@
 			"qla2x00: (%x:%x:%x) No LUN queue.\n", b, t, l);
 
 		/* no action - we don't have command */
-		return(FAILED);
+		return FAILED;
 	}
 
 	DEBUG2(printk("scsi(%ld): ABORTing cmd=%p sp=%p jiffies = 0x%lx, "
@@ -1102,16 +1104,15 @@
 	DEBUG2(qla2x00_print_scsi_cmd(cmd));
 
 	spin_unlock_irq(ha->host->host_lock);
-	/* Blocking call-Does context switching if abort isp is active etc */  
 	if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS) {
 		DEBUG2(printk("%s failed:board disabled\n", __func__);)
 		spin_lock_irq(ha->host->host_lock);
-		return (FAILED);
+		return FAILED;
 	}
 	spin_lock_irq(ha->host->host_lock);
 
 	/* Search done queue */
-	spin_lock_irqsave(&ha->list_lock,flags);
+	spin_lock(&ha->list_lock);
 	list_for_each_safe(list, temp, &ha->done_queue) {
 		rp = list_entry(list, srb_t, list);
 
@@ -1128,7 +1129,7 @@
 
 		break;
 	} /* list_for_each_safe() */
-	spin_unlock_irqrestore(&ha->list_lock, flags);
+	spin_unlock(&ha->list_lock);
 
 	/*
 	 * Return immediately if the aborted command was already in the done
@@ -1149,7 +1150,7 @@
 	DEBUG3(printk("qla2xxx_eh_abort: searching sp %p in retry "
 		    "queue.\n", sp);)
 
-	spin_lock_irqsave(&ha->list_lock, flags);
+	spin_lock(&ha->list_lock);
 	list_for_each_safe(list, temp, &ha->retry_queue) {
 		rp = list_entry(list, srb_t, list);
 
@@ -1170,7 +1171,7 @@
 		break;
 
 	} 
-	spin_unlock_irqrestore(&ha->list_lock, flags);
+	spin_unlock(&ha->list_lock);
 
 
 	/*
@@ -1181,7 +1182,7 @@
 		DEBUG3(printk("qla2xxx_eh_abort: searching sp %p "
 		    "in pending queue.\n", sp);)
 
-		spin_lock_irqsave(&vis_ha->list_lock, flags);
+		spin_lock(&vis_ha->list_lock);
 		list_for_each_safe(list, temp, &vis_ha->pending_queue) {
 			rp = list_entry(list, srb_t, list);
 
@@ -1205,14 +1206,14 @@
 			found++;
 			break;
 		} /* list_for_each_safe() */
-		spin_unlock_irqrestore(&vis_ha->list_lock, flags);
+		spin_unlock(&vis_ha->list_lock);
 	} /*End of if !found */
 
 	if (!found) {  /* find the command in our active list */
 		DEBUG3(printk("qla2xxx_eh_abort: searching sp %p "
 		    "in outstanding queue.\n", sp);)
 
-		spin_lock_irqsave(&ha->hardware_lock, flags);
+		spin_lock(&ha->hardware_lock);
 		for (i = 1; i < MAX_OUTSTANDING_COMMANDS; i++) {
 			sp = ha->outstanding_cmds[i];
 
@@ -1231,8 +1232,8 @@
 			/* Get a reference to the sp and drop the lock.*/
 			sp_get(ha, sp);
 
-			spin_unlock_irqrestore(&ha->hardware_lock, flags);
-			spin_unlock(ha->host->host_lock);
+			spin_unlock(&ha->hardware_lock);
+			spin_unlock_irq(ha->host->host_lock);
 
 			if (qla2x00_abort_command(ha, sp)) {
 				DEBUG2(printk("qla2xxx_eh_abort: abort_command "
@@ -1247,7 +1248,7 @@
 			sp_put(ha,sp);
 
 			spin_lock_irq(ha->host->host_lock);
-			spin_lock_irqsave(&ha->hardware_lock, flags);
+			spin_lock(&ha->hardware_lock);
 
 			/*
 			 * Regardless of mailbox command status, go check on
@@ -1256,11 +1257,11 @@
 			break;
 
 		}/*End of for loop */
-		spin_unlock_irqrestore(&ha->hardware_lock, flags);
+		spin_unlock(&ha->hardware_lock);
 
 	} /*End of if !found */
 
-	  /*Waiting for our command in done_queue to be returned to OS.*/
+	/* Waiting for our command in done_queue to be returned to OS.*/
 	if (qla2x00_eh_wait_on_command(ha, cmd) != 0) {
 		DEBUG2(printk("qla2xxx_eh_abort: cmd returned back to OS.\n");)
 		return_status = SUCCESS;
@@ -1275,7 +1276,7 @@
 	DEBUG2(printk("qla2xxx_eh_abort: Exiting. return_status=0x%x.\n",
 	    return_status));
 
-	return(return_status);
+	return return_status;
 }
 
 /**************************************************************************
@@ -1297,7 +1298,6 @@
 {
 	int	cnt;
 	int	status;
-	unsigned long	flags;
 	srb_t		*sp;
 	struct scsi_cmnd *cmd;
 
@@ -1308,11 +1308,11 @@
 	 * array
 	 */
 	for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {
-		spin_lock_irqsave(&ha->hardware_lock, flags);
+		spin_lock(&ha->hardware_lock);
 		sp = ha->outstanding_cmds[cnt];
 		if (sp) {
 			cmd = sp->cmd;
-			spin_unlock_irqrestore(&ha->hardware_lock, flags);
+			spin_unlock(&ha->hardware_lock);
 			if (cmd->device->id == t) {
 				if (!qla2x00_eh_wait_on_command(ha, cmd)) {
 					status = 1;
@@ -1321,7 +1321,7 @@
 			}
 		}
 		else {
-			spin_unlock_irqrestore(&ha->hardware_lock, flags);
+			spin_unlock(&ha->hardware_lock);
 		}
 	}
 	return (status);
@@ -1356,7 +1356,6 @@
 	os_tgt_t	*tq;
 	os_lun_t	*lq;
 	fc_port_t	*fcport_to_reset;
-	unsigned long	flags;
 	srb_t		*rp;
 	struct list_head *list, *temp;
 
@@ -1404,7 +1403,7 @@
 	    ha->dpc_flags, cmd->result, cmd->allowed, cmd->state));
 
  	/* Clear commands from the retry queue. */
- 	spin_lock_irqsave(&ha->list_lock, flags);
+ 	spin_lock(&ha->list_lock);
  	list_for_each_safe(list, temp, &ha->retry_queue) {
  		rp = list_entry(list, srb_t, list);
  
@@ -1418,11 +1417,10 @@
  		rp->cmd->result = DID_RESET << 16;
  		__add_to_done_queue(ha, rp);
  	}
- 	spin_unlock_irqrestore(&ha->list_lock, flags);
+ 	spin_unlock(&ha->list_lock);
 
 	spin_unlock_irq(ha->host->host_lock);
 
-	/* Blocking call-Does context switching if abort isp is active etc */  
 	if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS) {
 		DEBUG2(printk(KERN_INFO
 		    "%s failed:board disabled\n",__func__));
@@ -1431,7 +1429,6 @@
 		goto eh_dev_reset_done;
 	}
 
-	/* Blocking call-Does context switching if loop is Not Ready */
 	if (qla2x00_wait_for_loop_ready(ha) == QLA_SUCCESS) {
 		if (qla2x00_device_reset(ha, fcport_to_reset) == 0) {
 			return_status = SUCCESS;
@@ -1455,7 +1452,7 @@
 
 	if (return_status == FAILED) {
 		DEBUG3(printk("%s(%ld): device reset failed\n",
-		    __func__,ha->host_no));
+		    __func__, ha->host_no));
 		qla_printk(KERN_INFO, ha, "%s: device reset failed\n",
 		    __func__);
 
@@ -1513,7 +1510,6 @@
 {
 	int	cnt;
 	int	status;
-	unsigned long	flags;
 	srb_t		*sp;
 	struct scsi_cmnd *cmd;
 
@@ -1524,17 +1520,17 @@
 	 * array
 	 */
 	for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {
-		spin_lock_irqsave(&ha->hardware_lock, flags);
+		spin_lock(&ha->hardware_lock);
 		sp = ha->outstanding_cmds[cnt];
 		if (sp) {
 			cmd = sp->cmd;
-			spin_unlock_irqrestore(&ha->hardware_lock, flags);
+			spin_unlock(&ha->hardware_lock);
 			status = qla2x00_eh_wait_on_command(ha, cmd);
 			if (status == 0)
 				break;
 		}
 		else {
-			spin_unlock_irqrestore(&ha->hardware_lock, flags);
+			spin_unlock(&ha->hardware_lock);
 		}
 	}
 	return (status);
@@ -1572,16 +1568,14 @@
 
 	spin_unlock_irq(ha->host->host_lock);
 
-	/* Blocking call-Does context switching if abort isp is active etc*/  
 	if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS) {
 		DEBUG2(printk("%s failed:board disabled\n",__func__));
 		spin_lock_irq(ha->host->host_lock);
 		return FAILED;
 	}
 
-	/* Blocking call-Does context switching if loop is Not Ready */ 
 	if (qla2x00_wait_for_loop_ready(ha) == QLA_SUCCESS) {
-		if (qla2x00_loop_reset(ha)) 
+		if (qla2x00_loop_reset(ha) == QLA_SUCCESS) 
 			rval = SUCCESS;
 	}
 
@@ -1639,7 +1633,6 @@
 
 	spin_unlock_irq(ha->host->host_lock);
 
-	/* Blocking call-Does context switching if abort isp is active etc*/  
 	if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS)
 		goto board_disabled;
 
@@ -1697,10 +1690,10 @@
 * Returns:
 *      0 = success
 */
-static uint8_t
+static int
 qla2x00_loop_reset(scsi_qla_host_t *ha)
 {
-	uint8_t  status = QLA_SUCCESS;
+	int status = QLA_SUCCESS;
 	uint16_t t;
 	os_tgt_t        *tq;
 
@@ -2111,15 +2104,9 @@
 	}
 	spin_unlock_irqrestore(&ha->hardware_lock, flags);
 
-
 	/* Enable chip interrupts. */
 	qla2x00_enable_intrs(ha);
 
-	/* Insert new entry into the list of adapters */
-	write_lock(&qla_hostlist_lock);
-	list_add_tail(&ha->list, &qla_hostlist);
-	write_unlock(&qla_hostlist_lock);
-
 	/* v2.19.5b6 */
 	/*
 	 * Wait around max loop_reset_delay secs for the devices to come
@@ -2181,10 +2168,6 @@
 
 	ha = pci_get_drvdata(pdev);
 
-	write_lock(&qla_hostlist_lock);
-	list_del(&ha->list);
-	write_unlock(&qla_hostlist_lock);
-
 	sysfs_remove_bin_file(&ha->host->shost_gendev.kobj,
 	    &sysfs_fw_dump_attr);
 	sysfs_remove_bin_file(&ha->host->shost_gendev.kobj, &sysfs_nvram_attr);
@@ -2234,7 +2217,7 @@
 	qla2x00_mem_free(ha);
 
 
-	ha->flags.online = FALSE;
+	ha->flags.online = 0;
 
 	/* Detach interrupts */
 	if (ha->pdev->irq)
@@ -2305,12 +2288,12 @@
 *
 * inout : decides the direction of the dataflow and the meaning of the
 *         variables
-* buffer: If inout==FALSE data is being written to it else read from it
+* buffer: If inout==0 data is being written to it else read from it
 *         (ptr to a page buffer)
-* *start: If inout==FALSE start of the valid data in the buffer
-* offset: If inout==FALSE starting offset from the beginning of all
+* *start: If inout==0 start of the valid data in the buffer
+* offset: If inout==0 starting offset from the beginning of all
 *         possible data to return.
-* length: If inout==FALSE max number of bytes to be written into the buffer
+* length: If inout==0 max number of bytes to be written into the buffer
 *         else number of bytes in "buffer"
 * Returns:
 *         < 0:  error. errno value.
@@ -2328,7 +2311,6 @@
 	uint32_t        tmp_sn;
 	uint32_t	*flags;
 	uint8_t		*loop_state;
-	int	found;
 	scsi_qla_host_t *ha;
 	char fw_info[30];
  
@@ -2336,29 +2318,9 @@
 	    "Entering proc_info buff_in=%p, offset=0x%lx, length=0x%x\n",
 	    buffer, offset, length);)
 
-	ha = NULL;
-
-	/* Find the host that was specified */
-	found = 0;
-	read_lock(&qla_hostlist_lock);
-	list_for_each_entry(ha, &qla_hostlist, list) {
-		if (ha->host == shost) {
-			found++;
-			break;
-		}
-	}
-	read_unlock(&qla_hostlist_lock);
-
-	/* if host wasn't found then exit */
-	if (!found) {
-		DEBUG2_3(printk(KERN_WARNING
-		    "%s: Can't find adapter for host %p\n", 
-		    __func__, shost);)
-
-		return (retval);
-	}
+	ha = (scsi_qla_host_t *) shost->hostdata;
 
-	if (inout == TRUE) {
+	if (inout) {
 		/* Has data been written to the file? */
 		DEBUG3(printk(
 		    "%s: has data been written to the file. \n",
@@ -2522,6 +2484,7 @@
 		    tq->port_name[4], tq->port_name[5],
 		    tq->port_name[6], tq->port_name[7]);
 	}
+
 	copy_info(&info, "\nSCSI LUN Information:\n");
 	copy_info(&info,
 	    "(Id:Lun)  * - indicates lun is not registered with the OS.\n");
@@ -3421,10 +3384,15 @@
 				    fcport->login_retry) {
 
 					fcport->login_retry--;
-					if (fcport->flags & FCF_FABRIC_DEVICE)
+					if (fcport->flags & FCF_FABRIC_DEVICE) {
+						if (fcport->flags &
+						    FCF_TAPE_PRESENT)
+							qla2x00_fabric_logout(
+							    ha,
+							    fcport->loop_id);
 						status = qla2x00_fabric_login(
 						    ha, fcport, &next_loopid);
-					else 	
+					} else
 						status =
 						    qla2x00_local_device_login(
 							ha, fcport->loop_id);
@@ -3494,7 +3462,7 @@
 			DEBUG(printk("scsi(%ld): qla2x00_restart_queues()\n",
 			    ha->host_no));
 
-			qla2x00_restart_queues(ha,FALSE);
+			qla2x00_restart_queues(ha, 0);
 
 			DEBUG(printk("scsi(%ld): qla2x00_restart_queues - end\n",
 			    ha->host_no));
@@ -3505,7 +3473,7 @@
 			DEBUG(printk("scsi(%ld): qla2x00_abort_queues()\n",
 			    ha->host_no));
 				
-			qla2x00_abort_queues(ha, FALSE);
+			qla2x00_abort_queues(ha, 0);
 
 			DEBUG(printk("scsi(%ld): qla2x00_abort_queues - end\n",
 			    ha->host_no));
@@ -3596,8 +3564,6 @@
 	if (ha->flags.online && !ha->flags.reset_active &&
 	    !atomic_read(&ha->loop_down_timer) &&
 	    !(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) {
-
-		/* 10/15 ha->flags.reset_active = TRUE; */
 		do {
 			clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags);
 
@@ -3608,8 +3574,6 @@
 			ha->marker_needed = 1;
 		} while (!atomic_read(&ha->loop_down_timer) &&
 		    (test_bit(RESET_MARKER_NEEDED, &ha->dpc_flags)));
-
-		/* 10/15 ha->flags.reset_active = FALSE; */
 	}
 }
 
@@ -3627,81 +3591,12 @@
 	srb_t *sp;
 
 	sp = mempool_alloc(ha->srb_mempool, GFP_KERNEL);
-	if (sp) {
+	if (sp)
 		atomic_set(&sp->ref_count, 1);
-		sp->req_cnt = 0;
-	}
 	return (sp);
 }
 
 /**************************************************************************
- * qla2x00_blink_led
- *
- * Description:
- *   This function sets the colour of the LED while preserving the
- *   unsued GPIO pins every sec.
- *
- * Input:
- *       ha - Host adapter structure
- *      
- * Return:
- * 	None
- *
- * Context: qla2x00_timer() Interrupt
- ***************************************************************************/
-void
-qla2x00_blink_led(scsi_qla_host_t *ha)
-{
-	uint16_t	gpio_enable, gpio_data, led_color;
-	unsigned long	cpu_flags = 0;
-	device_reg_t	*reg = ha->iobase;
-
-	/* Save the Original GPIOE */ 
-	spin_lock_irqsave(&ha->hardware_lock, cpu_flags);
-	gpio_enable = RD_REG_WORD(&reg->gpioe);
-	gpio_data = RD_REG_WORD(&reg->gpiod);
-	spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags);
-
-	DEBUG2(printk("%s Original data of gpio_enable_reg=0x%x"
-	    " gpio_data_reg=0x%x\n",
-	    __func__,gpio_enable,gpio_data));
-
-	if (ha->beacon_green_on){
-		led_color = GPIO_LED_GREEN_ON_AMBER_OFF;
-		ha->beacon_green_on = 0;
-	} else {
-		led_color = GPIO_LED_GREEN_OFF_AMBER_OFF;
-		ha->beacon_green_on = 1;
-	}
-
-	/* Set the modified gpio_enable values */
-	gpio_enable |= GPIO_LED_GREEN_ON_AMBER_OFF;
-
-	DEBUG2(printk("%s Before writing enable : gpio_enable_reg=0x%x"
-	    " gpio_data_reg=0x%x led_color=0x%x\n",
-	    __func__, gpio_enable, gpio_data, led_color));
-
-	spin_lock_irqsave(&ha->hardware_lock, cpu_flags);
-	WRT_REG_WORD(&reg->gpioe,gpio_enable);
-	spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags);
-
-	/* Clear out the previously set LED colour */
-	gpio_data &= ~GPIO_LED_GREEN_ON_AMBER_OFF;
-
-	/* Set the new input LED colour to GPIOD */
-	gpio_data |= led_color;
-
-	DEBUG2(printk("%s Before writing data: gpio_enable_reg=0x%x"
-	    " gpio_data_reg=0x%x led_color=0x%x\n",
-	    __func__,gpio_enable,gpio_data,led_color));
-
-	/* Set the modified gpio_data values */
-	spin_lock_irqsave(&ha->hardware_lock, cpu_flags);
-	WRT_REG_WORD(&reg->gpiod,gpio_data);
-	spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags);
-}
-
-/**************************************************************************
 *   qla2x00_timer
 *
 * Description:
@@ -3718,6 +3613,8 @@
 	os_lun_t *lq;
 	os_tgt_t *tq;
 	int		start_dpc = 0;
+	int		index;
+	srb_t		*sp;
 
 	/*
 	 * We try and restart any request in the retry queue every second.
@@ -3735,11 +3632,6 @@
 		start_dpc++;
 	}
 
-	/* Check if beacon LED needs to be blinked */
-	if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && ha->beacon_blink_led)
-		qla2x00_blink_led(ha);
-
-
 	/*
 	 * Ports - Port down timer.
 	 *
@@ -3826,7 +3718,6 @@
 	if (atomic_read(&ha->loop_down_timer) > 0 &&
 	    !(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags)) && ha->flags.online) {
 
-		/* dg 10/30 if (atomic_read(&ha->loop_down_timer) == LOOP_DOWN_TIME) { */
 		if (atomic_read(&ha->loop_down_timer) ==
 		    ha->loop_down_abort_time) {
 
@@ -3837,6 +3728,22 @@
 			if (!IS_QLA2100(ha) && ha->link_down_timeout)
 				atomic_set(&ha->loop_state, LOOP_DEAD); 
 
+			/* Schedule an ISP abort to return any tape commands. */
+			spin_lock_irqsave(&ha->hardware_lock, cpu_flags);
+			for (index = 1; index < MAX_OUTSTANDING_COMMANDS;
+			    index++) {
+				sp = ha->outstanding_cmds[index];
+				if (!sp)
+					continue;
+				if (!(sp->fclun->fcport->flags &
+				    FCF_TAPE_PRESENT))
+					continue;
+
+				set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
+				break;
+			}
+			spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags);
+
 			set_bit(ABORT_QUEUES_NEEDED, &ha->dpc_flags);
 			start_dpc++;
 		}
--- diff/drivers/scsi/qla2xxx/qla_rscn.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_rscn.c	2004-07-01 21:32:44.000000000 +0100
@@ -16,8 +16,6 @@
  * General Public License for more details.
  *
  */
-#include "qla_os.h"
-
 #include "qla_def.h"
 
 /**
@@ -438,6 +436,7 @@
 	    cpu_to_le16(iodesc->remote_fcport->loop_id);
 	mbxentry->mb2 = LSW(handle_to_abort);
 	mbxentry->mb3 = MSW(handle_to_abort);
+	wmb();
 
 	qla2x00_add_iodesc_timer(iodesc);
 
@@ -514,6 +513,7 @@
 	mbxentry->mb6 = cpu_to_le16(MSW(MSD(ha->iodesc_pd_dma)));
 	mbxentry->mb7 = cpu_to_le16(LSW(MSD(ha->iodesc_pd_dma)));
 	mbxentry->mb10 = __constant_cpu_to_le16(BIT_0);
+	wmb();
 
 	qla2x00_add_iodesc_timer(iodesc);
 
@@ -625,6 +625,7 @@
 	mbxentry->mb0 = __constant_cpu_to_le16(MBC_LOGOUT_FABRIC_PORT);
 	mbxentry->mb1 = mbxentry->loop_id.extended =
 	    cpu_to_le16(iodesc->remote_fcport->loop_id);
+	wmb();
 
 	qla2x00_add_iodesc_timer(iodesc);
 
@@ -702,6 +703,7 @@
 	mbxentry->mb2 = cpu_to_le16(d_id->b.domain);
 	mbxentry->mb3 = cpu_to_le16(d_id->b.area << 8 | d_id->b.al_pa);
 	mbxentry->mb10 = __constant_cpu_to_le16(BIT_0);
+	wmb();
 
 	qla2x00_add_iodesc_timer(iodesc);
 
--- diff/drivers/scsi/qla2xxx/qla_sup.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_sup.c	2004-07-01 21:32:44.000000000 +0100
@@ -17,9 +17,11 @@
  *
  ******************************************************************************/
 
-#include "qla_os.h"
 #include "qla_def.h"
 
+#include <linux/delay.h>
+#include <asm/uaccess.h>
+
 static uint16_t qla2x00_nvram_request(scsi_qla_host_t *, uint32_t);
 static void qla2x00_nv_deselect(scsi_qla_host_t *);
 static void qla2x00_nv_write(scsi_qla_host_t *, uint16_t);
--- diff/drivers/scsi/qla2xxx/qla_version.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_version.h	2004-07-01 21:32:44.000000000 +0100
@@ -19,9 +19,9 @@
 /*
  * Driver version 
  */
-#define QLA2XXX_VERSION      "8.00.00b12-k"
+#define QLA2XXX_VERSION      "8.00.00b14-k"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	0
 #define QLA_DRIVER_PATCH_VER	0
-#define QLA_DRIVER_BETA_VER	12
+#define QLA_DRIVER_BETA_VER	14
--- diff/drivers/scsi/qlogicfas.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/qlogicfas.c	2004-07-01 21:32:44.000000000 +0100
@@ -32,7 +32,7 @@
 #include <asm/dma.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "qlogicfas408.h"
 
 /* Set the following to 2 to use normal interrupt (active high/totempole-
--- diff/drivers/scsi/qlogicfas408.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/qlogicfas408.c	2004-07-01 21:32:44.000000000 +0100
@@ -56,7 +56,7 @@
 #include <asm/dma.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "qlogicfas408.h"
 
 /*----------------------------------------------------------------*/
--- diff/drivers/scsi/qlogicfc.c	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/qlogicfc.c	2004-07-01 21:32:44.000000000 +0100
@@ -64,7 +64,7 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #define pci64_dma_hi32(a) ((u32) (0xffffffff & (((u64)(a))>>32)))
 #define pci64_dma_lo32(a) ((u32) (0xffffffff & (((u64)(a)))))
@@ -100,6 +100,7 @@
 
 #define DEFAULT_LOOP_COUNT	1000000000
 
+#define ISP_TIMEOUT (2*HZ)
 /* End Configuration section ************************************************ */
 
 #include <linux/module.h>
@@ -1305,7 +1306,7 @@
 		cmd->control_flags = cpu_to_le16(CFLAG_READ);
 
 	if (Cmnd->device->tagged_supported) {
-		if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (2 * SCSI_TIMEOUT)) {
+		if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (2 * ISP_TIMEOUT)) {
 			cmd->control_flags |= cpu_to_le16(CFLAG_ORDERED_TAG);
 			hostdata->tag_ages[Cmnd->device->id] = jiffies;
 		} else
--- diff/drivers/scsi/qlogicisp.c	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/qlogicisp.c	2004-07-01 21:32:44.000000000 +0100
@@ -36,7 +36,7 @@
 #include <asm/irq.h>
 #include <asm/byteorder.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "qlogicisp.h"
 
 /* Configuration section *****************************************************/
--- diff/drivers/scsi/qlogicpti.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/qlogicpti.c	2004-07-01 21:32:44.000000000 +0100
@@ -27,6 +27,8 @@
 
 #include <asm/byteorder.h>
 
+#include "scsi.h"
+#include <scsi/scsi_host.h>
 #include "qlogicpti.h"
 
 #include <asm/sbus.h>
--- diff/drivers/scsi/sata_promise.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sata_promise.c	2004-07-01 21:32:44.000000000 +0100
@@ -81,7 +81,7 @@
 static int pdc_port_start(struct ata_port *ap);
 static void pdc_port_stop(struct ata_port *ap);
 static void pdc_phy_reset(struct ata_port *ap);
-static void pdc_fill_sg(struct ata_queued_cmd *qc);
+static void pdc_qc_prep(struct ata_queued_cmd *qc);
 static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf);
 static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf);
 static inline void pdc_dma_complete (struct ata_port *ap,
@@ -114,7 +114,7 @@
 	.phy_reset		= pdc_phy_reset,
 	.bmdma_setup            = pdc_dma_setup,
 	.bmdma_start            = pdc_dma_start,
-	.fill_sg		= pdc_fill_sg,
+	.qc_prep		= pdc_qc_prep,
 	.eng_timeout		= pdc_eng_timeout,
 	.irq_handler		= pdc_interrupt,
 	.scr_read		= pdc_sata_scr_read,
@@ -261,14 +261,14 @@
 	writel(val, (void *) ap->ioaddr.scr_addr + (sc_reg * 4));
 }
 
-static void pdc_fill_sg(struct ata_queued_cmd *qc)
+static void pdc_qc_prep(struct ata_queued_cmd *qc)
 {
 	struct pdc_port_priv *pp = qc->ap->private_data;
 	unsigned int i;
 
 	VPRINTK("ENTER\n");
 
-	ata_fill_sg(qc);
+	ata_qc_prep(qc);
 
 	i = pdc_pkt_header(&qc->tf, qc->ap->prd_dma,  qc->dev->devno, pp->pkt);
 
--- diff/drivers/scsi/sata_sil.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sata_sil.c	2004-07-01 21:32:44.000000000 +0100
@@ -131,7 +131,7 @@
 	.post_set_mode		= sil_post_set_mode,
 	.bmdma_setup            = ata_bmdma_setup_mmio,
 	.bmdma_start            = ata_bmdma_start_mmio,
-	.fill_sg		= ata_fill_sg,
+	.qc_prep		= ata_qc_prep,
 	.eng_timeout		= ata_eng_timeout,
 	.irq_handler		= ata_interrupt,
 	.scr_read		= sil_scr_read,
@@ -302,6 +302,7 @@
 		       ap->id, dev->devno);
 		ap->host->max_sectors = 15;
 		ap->host->hostt->max_sectors = 15;
+		dev->flags |= ATA_DFLAG_LOCK_SECTORS;
 		return;
 	}
 
--- diff/drivers/scsi/sata_sis.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sata_sis.c	2004-07-01 21:32:44.000000000 +0100
@@ -100,7 +100,7 @@
 	.phy_reset		= sata_phy_reset,
 	.bmdma_setup            = ata_bmdma_setup_pio,
 	.bmdma_start            = ata_bmdma_start_pio,
-	.fill_sg		= ata_fill_sg,
+	.qc_prep		= ata_qc_prep,
 	.eng_timeout		= ata_eng_timeout,
 	.irq_handler		= ata_interrupt,
 	.scr_read		= sis_scr_read,
--- diff/drivers/scsi/sata_svw.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sata_svw.c	2004-07-01 21:32:44.000000000 +0100
@@ -233,7 +233,7 @@
 	.phy_reset		= sata_phy_reset,
 	.bmdma_setup            = ata_bmdma_setup_mmio,
 	.bmdma_start            = ata_bmdma_start_mmio,
-	.fill_sg		= ata_fill_sg,
+	.qc_prep		= ata_qc_prep,
 	.eng_timeout		= ata_eng_timeout,
 	.irq_handler		= ata_interrupt,
 	.scr_read		= k2_sata_scr_read,
--- diff/drivers/scsi/sata_sx4.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sata_sx4.c	2004-07-01 21:32:44.000000000 +0100
@@ -153,7 +153,7 @@
 static void pdc_20621_phy_reset (struct ata_port *ap);
 static int pdc_port_start(struct ata_port *ap);
 static void pdc_port_stop(struct ata_port *ap);
-static void pdc20621_fill_sg(struct ata_queued_cmd *qc);
+static void pdc20621_qc_prep(struct ata_queued_cmd *qc);
 static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf);
 static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf);
 static void pdc20621_host_stop(struct ata_host_set *host_set);
@@ -200,7 +200,7 @@
 	.phy_reset		= pdc_20621_phy_reset,
 	.bmdma_setup            = pdc20621_dma_setup,
 	.bmdma_start            = pdc20621_dma_start,
-	.fill_sg		= pdc20621_fill_sg,
+	.qc_prep		= pdc20621_qc_prep,
 	.eng_timeout		= pdc_eng_timeout,
 	.irq_handler		= pdc20621_interrupt,
 	.port_start		= pdc_port_start,
@@ -434,7 +434,7 @@
 		buf32[dw + 3]);
 }
 
-static void pdc20621_fill_sg(struct ata_queued_cmd *qc)
+static void pdc20621_qc_prep(struct ata_queued_cmd *qc)
 {
 	struct scatterlist *sg = qc->sg;
 	struct ata_port *ap = qc->ap;
@@ -446,6 +446,9 @@
 	unsigned int i, last, idx, total_len = 0, sgt_len;
 	u32 *buf = (u32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ];
 
+	if (!(qc->flags & ATA_QCFLAG_SG))
+		return;
+
 	VPRINTK("ata%u: ENTER\n", ap->id);
 
 	/* hard-code chip #0 */
--- diff/drivers/scsi/sata_via.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sata_via.c	2004-07-01 21:32:44.000000000 +0100
@@ -108,7 +108,7 @@
 
 	.bmdma_setup            = ata_bmdma_setup_pio,
 	.bmdma_start            = ata_bmdma_start_pio,
-	.fill_sg		= ata_fill_sg,
+	.qc_prep		= ata_qc_prep,
 	.eng_timeout		= ata_eng_timeout,
 
 	.irq_handler		= ata_interrupt,
--- diff/drivers/scsi/sata_vsc.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sata_vsc.c	2004-07-01 21:32:44.000000000 +0100
@@ -215,7 +215,7 @@
 	.phy_reset		= sata_phy_reset,
 	.bmdma_setup            = ata_bmdma_setup_mmio,
 	.bmdma_start            = ata_bmdma_start_mmio,
-	.fill_sg		= ata_fill_sg,
+	.qc_prep		= ata_qc_prep,
 	.eng_timeout		= ata_eng_timeout,
 	.irq_handler		= vsc_sata_interrupt,
 	.scr_read		= vsc_sata_scr_read,
--- diff/drivers/scsi/scsi.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/scsi.c	2004-07-01 21:32:44.000000000 +0100
@@ -56,8 +56,14 @@
 #include <linux/notifier.h>
 #include <linux/cpu.h>
 
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_eh.h>
 #include <scsi/scsi_host.h>
-#include "scsi.h"
+#include <scsi/scsi_tcq.h>
+#include <scsi/scsi_request.h>
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
@@ -400,7 +406,7 @@
 			 * output in scsi_log_completion.
 			 */
 			printk("                 ");
-			print_command(cmd->cmnd);
+			scsi_print_command(cmd);
 			if (level > 3) {
 				printk(KERN_INFO "buffer = 0x%p, bufflen = %d,"
 				       " done = 0x%p, queuecommand 0x%p\n",
@@ -468,13 +474,13 @@
 				printk("UNKNOWN");
 			}
 			printk(" %8x ", cmd->result);
-			print_command(cmd->cmnd);
+			scsi_print_command(cmd);
 			if (status_byte(cmd->result) & CHECK_CONDITION) {
 				/*
 				 * XXX The print_sense formatting/prefix
 				 * doesn't match this function.
 				 */
-				print_sense("", cmd);
+				scsi_print_sense("", cmd);
 			}
 			if (level > 3) {
 				printk(KERN_INFO "scsi host busy %d failed %d\n",
@@ -689,8 +695,6 @@
  */
 void scsi_done(struct scsi_cmnd *cmd)
 {
-	unsigned long flags;
-
 	/*
 	 * We don't have to worry about this one timing out any more.
 	 * If we are unable to remove the timer, then the command
@@ -701,6 +705,14 @@
 	 */
 	if (!scsi_delete_timer(cmd))
 		return;
+	__scsi_done(cmd);
+}
+
+/* Private entry to scsi_done() to complete a command when the timer
+ * isn't running --- used by scsi_times_out */
+void __scsi_done(struct scsi_cmnd *cmd)
+{
+	unsigned long flags;
 
 	/*
 	 * Set the serial numbers back to zero
--- diff/drivers/scsi/scsi.h	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/scsi.h	2004-07-01 21:32:44.000000000 +0100
@@ -11,6 +11,11 @@
  *       add scatter-gather, multiple outstanding request, and other
  *       enhancements.
  */
+/*
+ * NOTE:  this file only contains compatibility glue for old drivers.  All
+ * these wrappers will be removed sooner or later.  For new code please use
+ * the interfaces declared in the headers in include/scsi/
+ */
 
 #ifndef _SCSI_H
 #define _SCSI_H
@@ -18,6 +23,7 @@
 #include <linux/config.h>	    /* for CONFIG_SCSI_LOGGING */
 
 #include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_dbg.h>
 #include <scsi/scsi_device.h>
 #include <scsi/scsi_eh.h>
 #include <scsi/scsi_request.h>
@@ -34,12 +40,6 @@
 #define FALSE 0
 #endif
 
-#ifdef DEBUG
-#define SCSI_TIMEOUT (5*HZ)
-#else
-#define SCSI_TIMEOUT (2*HZ)
-#endif
-
 struct Scsi_Host;
 struct scsi_cmnd;
 struct scsi_device;
@@ -47,21 +47,6 @@
 struct scatterlist;
 
 /*
- * Prototypes for functions in constants.c
- * Some of these used to live in constants.h
- */
-extern void print_Scsi_Cmnd(struct scsi_cmnd *);
-extern void print_command(unsigned char *);
-extern void print_sense(const char *, struct scsi_cmnd *);
-extern void print_req_sense(const char *, struct scsi_request *);
-extern void print_driverbyte(int scsiresult);
-extern void print_hostbyte(int scsiresult);
-extern void print_status(unsigned char status);
-extern int print_msg(const unsigned char *);
-extern const char *scsi_sense_key_string(unsigned char);
-extern const char *scsi_extd_sense_format(unsigned char, unsigned char);
-
-/*
  * Legacy dma direction interfaces.
  *
  * This assumes the pci/sbus dma mapping flags have the same numercial
@@ -77,6 +62,42 @@
 #define scsi_to_sbus_dma_dir(scsi_dir)	((int)(scsi_dir))
 
 /*
+ * Old names for debug prettyprinting functions.
+ */
+static inline void print_Scsi_Cmnd(struct scsi_cmnd *cmd)
+{
+	return scsi_print_command(cmd);
+}
+static inline void print_command(unsigned char *cdb)
+{
+	return __scsi_print_command(cdb);
+}
+static inline void print_sense(const char *devclass, struct scsi_cmnd *cmd)
+{
+	return scsi_print_sense(devclass, cmd);
+}
+static inline void print_req_sense(const char *devclass, struct scsi_request *req)
+{
+	return scsi_print_req_sense(devclass, req);
+}
+static inline void print_driverbyte(int scsiresult)
+{
+	return scsi_print_driverbyte(scsiresult);
+}
+static inline void print_hostbyte(int scsiresult)
+{
+	return scsi_print_hostbyte(scsiresult);
+}
+static inline void print_status(unsigned char status)
+{
+	return scsi_print_status(status);
+}
+static inline int print_msg(const unsigned char *msg)
+{
+	return scsi_print_msg(msg);
+}
+
+/*
  * This is the crap from the old error handling code.  We have it in a special
  * place so that we can more easily delete it later on.
  */
--- diff/drivers/scsi/scsi_debug.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/scsi_debug.c	2004-07-01 21:32:44.000000000 +0100
@@ -1,4 +1,4 @@
-/* 
+/*
  *  linux/kernel/scsi_debug.c
  * vvvvvvvvvvvvvvvvvvvvvvv Original vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
  *  Copyright (C) 1992  Eric Youngdale
@@ -7,9 +7,9 @@
  *  anything out of the ordinary is seen.
  * ^^^^^^^^^^^^^^^^^^^^^^^ Original ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  *
- *  This version is more generic, simulating a variable number of disk 
- *  (or disk like devices) sharing a common amount of RAM 
- *  
+ *  This version is more generic, simulating a variable number of disk
+ *  (or disk like devices) sharing a common amount of RAM
+ *
  *
  *  For documentation see http://www.torque.net/sg/sdebug25.html
  *
@@ -43,7 +43,7 @@
 
 #include <linux/blkdev.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <scsi/scsicam.h>
 
 #include <linux/stat.h>
@@ -55,7 +55,8 @@
 #include "scsi_logging.h"
 #include "scsi_debug.h"
 
-static const char * scsi_debug_version_str = "Version: 1.71 (20031007)";
+#define SCSI_DEBUG_VERSION "1.73"
+static const char * scsi_debug_version_date = "20040518";
 
 /* Additional Sense Code (ASC) used */
 #define NO_ADDED_SENSE 0x0
@@ -76,11 +77,13 @@
 /* With these defaults, this driver will make 1 host with 1 target
  * (id 0) containing 1 logical unit (lun 0). That is 1 device.
  */
+#define DEF_DELAY   1
 #define DEF_DEV_SIZE_MB   8
 #define DEF_EVERY_NTH   0
-#define DEF_DELAY   1
-#define DEF_SCSI_LEVEL   3
+#define DEF_NUM_PARTS   0
 #define DEF_OPTS   0
+#define DEF_SCSI_LEVEL   3
+#define DEF_PTYPE   0
 
 /* bit mask values for scsi_debug_opts */
 #define SCSI_DEBUG_OPT_NOISE   1
@@ -101,19 +104,21 @@
  * or "peripheral device" addressing (value 0) */
 #define SAM2_LUN_ADDRESS_METHOD 0
 
+static int scsi_debug_add_host = DEF_NUM_HOST;
+static int scsi_debug_delay = DEF_DELAY;
 static int scsi_debug_dev_size_mb = DEF_DEV_SIZE_MB;
-static int scsi_debug_num_tgts = DEF_NUM_TGTS; /* targets per host */
-static int scsi_debug_opts = DEF_OPTS;
 static int scsi_debug_every_nth = DEF_EVERY_NTH;
-static int scsi_debug_cmnd_count = 0;
-static int scsi_debug_delay = DEF_DELAY;
 static int scsi_debug_max_luns = DEF_MAX_LUNS;
+static int scsi_debug_num_parts = DEF_NUM_PARTS;
+static int scsi_debug_num_tgts = DEF_NUM_TGTS; /* targets per host */
+static int scsi_debug_opts = DEF_OPTS;
 static int scsi_debug_scsi_level = DEF_SCSI_LEVEL;
-static int scsi_debug_add_host = DEF_NUM_HOST;
+static int scsi_debug_ptype = DEF_PTYPE; /* SCSI peripheral type (0==disk) */
+
+static int scsi_debug_cmnd_count = 0;
 
 #define DEV_READONLY(TGT)      (0)
 #define DEV_REMOVEABLE(TGT)    (0)
-#define PERIPH_DEVICE_TYPE(TGT) (TYPE_DISK);
 
 static unsigned long sdebug_store_size;	/* in bytes */
 static sector_t sdebug_capacity;	/* in sectors */
@@ -129,6 +134,8 @@
 #define SECT_SIZE (1 << POW2_SECT_SIZE)
 #define SECT_SIZE_PER(TGT) SECT_SIZE
 
+#define SDEBUG_MAX_PARTS 4
+
 #define SDEBUG_SENSE_LEN 32
 
 struct sdebug_dev_info {
@@ -215,7 +222,7 @@
 	.remove         = sdebug_driver_remove,
 };
 
-static const int check_condition_result = 
+static const int check_condition_result =
 		(DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
 
 /* function declarations */
@@ -224,7 +231,7 @@
 static int resp_mode_sense(unsigned char * cmd, int target,
 			   unsigned char * buff, int bufflen,
 			   struct sdebug_dev_info * devip);
-static int resp_read(struct scsi_cmnd * SCpnt, int upper_blk, int block, 
+static int resp_read(struct scsi_cmnd * SCpnt, int upper_blk, int block,
 		     int num, struct sdebug_dev_info * devip);
 static int resp_write(struct scsi_cmnd * SCpnt, int upper_blk, int block,
 		      int num, struct sdebug_dev_info * devip);
@@ -232,14 +239,15 @@
 			    int bufflen, struct sdebug_dev_info * devip);
 static void timer_intr_handler(unsigned long);
 static struct sdebug_dev_info * devInfoReg(struct scsi_device * sdev);
-static void mk_sense_buffer(struct sdebug_dev_info * devip, int key, 
+static void mk_sense_buffer(struct sdebug_dev_info * devip, int key,
 			    int asc, int asq, int inbandLen);
-static int check_reset(struct scsi_cmnd * SCpnt, 
+static int check_reset(struct scsi_cmnd * SCpnt,
 		       struct sdebug_dev_info * devip);
-static int schedule_resp(struct scsi_cmnd * cmnd, 
-			 struct sdebug_dev_info * devip, 
+static int schedule_resp(struct scsi_cmnd * cmnd,
+			 struct sdebug_dev_info * devip,
 			 done_funct_t done, int scsi_result, int delta_jiff);
-static void init_all_queued(void);
+static void __init sdebug_build_parts(unsigned char * ramp);
+static void __init init_all_queued(void);
 static void stop_all_queued(void);
 static int stop_queued_cmnd(struct scsi_cmnd * cmnd);
 static int inquiry_evpd_83(unsigned char * arr, int dev_id_num,
@@ -249,6 +257,8 @@
 
 static int sdebug_add_adapter(void);
 static void sdebug_remove_adapter(void);
+static void sdebug_max_tgts_luns(void);
+
 static struct device pseudo_primary;
 static struct bus_type pseudo_lld_bus;
 
@@ -257,7 +267,7 @@
 	if (NULL == sclp)
 		return NULL;
 	else if (sclp->page)
-		return (unsigned char *)page_address(sclp->page) + 
+		return (unsigned char *)page_address(sclp->page) +
 		       sclp->offset;
 	else
 		return NULL;
@@ -288,7 +298,7 @@
 		bufflen = sgpnt[0].length;
 		/* READ and WRITE process scatterlist themselves */
 	}
-	else 
+	else
 		buff = (unsigned char *) SCpnt->request_buffer;
 	if (NULL == buff) {
 		buff = spare_buff;	/* assume cmd moves no data */
@@ -304,11 +314,11 @@
         }
 
 	if (SCpnt->device->lun >= scsi_debug_max_luns)
-		return schedule_resp(SCpnt, NULL, done, 
+		return schedule_resp(SCpnt, NULL, done,
 				     DID_NO_CONNECT << 16, 0);
 	devip = devInfoReg(SCpnt->device);
 	if (NULL == devip)
-		return schedule_resp(SCpnt, NULL, done, 
+		return schedule_resp(SCpnt, NULL, done,
 				     DID_NO_CONNECT << 16, 0);
 
         if ((scsi_debug_every_nth > 0) &&
@@ -331,7 +341,7 @@
 		 * shouldn't need to call REQUEST_SENSE */
 		if (devip) {
 			sbuff = devip->sense_buff;
-			memcpy(buff, sbuff, (bufflen < SDEBUG_SENSE_LEN) ? 
+			memcpy(buff, sbuff, (bufflen < SDEBUG_SENSE_LEN) ?
 					     bufflen : SDEBUG_SENSE_LEN);
 			mk_sense_buffer(devip, 0, NO_ADDED_SENSE, 0, 7);
 		} else {
@@ -392,29 +402,29 @@
 			break;
 		upper_blk = 0;
 		if ((*cmd) == READ_16) {
-			upper_blk = cmd[5] + (cmd[4] << 8) + 
+			upper_blk = cmd[5] + (cmd[4] << 8) +
 				    (cmd[3] << 16) + (cmd[2] << 24);
-			block = cmd[9] + (cmd[8] << 8) + 
+			block = cmd[9] + (cmd[8] << 8) +
 				(cmd[7] << 16) + (cmd[6] << 24);
-			num = cmd[13] + (cmd[12] << 8) + 
+			num = cmd[13] + (cmd[12] << 8) +
 				(cmd[11] << 16) + (cmd[10] << 24);
 		} else if ((*cmd) == READ_12) {
-			block = cmd[5] + (cmd[4] << 8) + 
+			block = cmd[5] + (cmd[4] << 8) +
 				(cmd[3] << 16) + (cmd[2] << 24);
-			num = cmd[9] + (cmd[8] << 8) + 
+			num = cmd[9] + (cmd[8] << 8) +
 				(cmd[7] << 16) + (cmd[6] << 24);
 		} else if ((*cmd) == READ_10) {
-			block = cmd[5] + (cmd[4] << 8) + 
+			block = cmd[5] + (cmd[4] << 8) +
 				(cmd[3] << 16) + (cmd[2] << 24);
 			num = cmd[8] + (cmd[7] << 8);
 		} else {
-			block = cmd[3] + (cmd[2] << 8) + 
+			block = cmd[3] + (cmd[2] << 8) +
 				((cmd[1] & 0x1f) << 16);
 			num = cmd[4];
 		}
 		errsts = resp_read(SCpnt, upper_blk, block, num, devip);
 		if (inj_recovered && (0 == errsts)) {
-			mk_sense_buffer(devip, RECOVERED_ERROR, 
+			mk_sense_buffer(devip, RECOVERED_ERROR,
 					THRESHHOLD_EXCEEDED, 0, 18);
 			errsts = check_condition_result;
 		}
@@ -430,29 +440,29 @@
 			break;
 		upper_blk = 0;
 		if ((*cmd) == WRITE_16) {
-			upper_blk = cmd[5] + (cmd[4] << 8) + 
+			upper_blk = cmd[5] + (cmd[4] << 8) +
 				    (cmd[3] << 16) + (cmd[2] << 24);
-			block = cmd[9] + (cmd[8] << 8) + 
+			block = cmd[9] + (cmd[8] << 8) +
 				(cmd[7] << 16) + (cmd[6] << 24);
-			num = cmd[13] + (cmd[12] << 8) + 
+			num = cmd[13] + (cmd[12] << 8) +
 				(cmd[11] << 16) + (cmd[10] << 24);
 		} else if ((*cmd) == WRITE_12) {
-			block = cmd[5] + (cmd[4] << 8) + 
+			block = cmd[5] + (cmd[4] << 8) +
 				(cmd[3] << 16) + (cmd[2] << 24);
-			num = cmd[9] + (cmd[8] << 8) + 
+			num = cmd[9] + (cmd[8] << 8) +
 				(cmd[7] << 16) + (cmd[6] << 24);
 		} else if ((*cmd) == WRITE_10) {
-			block = cmd[5] + (cmd[4] << 8) + 
+			block = cmd[5] + (cmd[4] << 8) +
 				(cmd[3] << 16) + (cmd[2] << 24);
 			num = cmd[8] + (cmd[7] << 8);
 		} else {
-			block = cmd[3] + (cmd[2] << 8) + 
+			block = cmd[3] + (cmd[2] << 8) +
 				((cmd[1] & 0x1f) << 16);
 			num = cmd[4];
 		}
 		errsts = resp_write(SCpnt, upper_blk, block, num, devip);
 		if (inj_recovered && (0 == errsts)) {
-			mk_sense_buffer(devip, RECOVERED_ERROR, 
+			mk_sense_buffer(devip, RECOVERED_ERROR,
 					THRESHHOLD_EXCEEDED, 0, 18);
 			errsts = check_condition_result;
 		}
@@ -474,7 +484,7 @@
 	return schedule_resp(SCpnt, devip, done, errsts, scsi_debug_delay);
 }
 
-static int scsi_debug_ioctl(struct scsi_device *dev, int cmd, void *arg)
+static int scsi_debug_ioctl(struct scsi_device *dev, int cmd, void __user *arg)
 {
 	if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) {
 		printk(KERN_INFO "scsi_debug: ioctl: cmd=0x%x\n", cmd);
@@ -500,7 +510,7 @@
 static const char * product_id = "scsi_debug      ";
 static const char * product_rev = "0004";
 
-static int inquiry_evpd_83(unsigned char * arr, int dev_id_num, 
+static int inquiry_evpd_83(unsigned char * arr, int dev_id_num,
 			   const char * dev_id_str, int dev_id_str_len)
 {
 	int num;
@@ -537,7 +547,7 @@
 {
 	unsigned char pq_pdt;
 	unsigned char arr[SDEBUG_MAX_INQ_ARR_SZ];
-	int min_len = bufflen > SDEBUG_MAX_INQ_ARR_SZ ? 
+	int min_len = bufflen > SDEBUG_MAX_INQ_ARR_SZ ?
 			SDEBUG_MAX_INQ_ARR_SZ : bufflen;
 
 	if (bufflen < cmd[4])
@@ -545,7 +555,7 @@
 		       "< alloc_length=%d\n", bufflen, (int)cmd[4]);
 	memset(buff, 0, bufflen);
 	memset(arr, 0, SDEBUG_MAX_INQ_ARR_SZ);
-	pq_pdt = PERIPH_DEVICE_TYPE(target);
+	pq_pdt = (scsi_debug_ptype & 0x1f);
 	arr[0] = pq_pdt;
 	if (0x2 & cmd[1]) {  /* CMDDT bit set */
 		mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB,
@@ -573,11 +583,11 @@
 						 dev_id_str, len);
 		} else {
 			/* Illegal request, invalid field in cdb */
-			mk_sense_buffer(devip, ILLEGAL_REQUEST, 
+			mk_sense_buffer(devip, ILLEGAL_REQUEST,
 					INVALID_FIELD_IN_CDB, 0, 18);
 			return check_condition_result;
 		}
-		memcpy(buff, arr, min_len); 
+		memcpy(buff, arr, min_len);
 		return 0;
 	}
 	/* drops through here for a standard inquiry */
@@ -592,11 +602,11 @@
 	return 0;
 }
 
-/* <<Following mode page info copied from ST318451LW>> */ 
+/* <<Following mode page info copied from ST318451LW>> */
 
 static int resp_err_recov_pg(unsigned char * p, int pcontrol, int target)
 {	/* Read-Write Error Recovery page for mode_sense */
-	unsigned char err_recov_pg[] = {0x1, 0xa, 0xc0, 11, 240, 0, 0, 0, 
+	unsigned char err_recov_pg[] = {0x1, 0xa, 0xc0, 11, 240, 0, 0, 0,
 					5, 0, 0xff, 0xff};
 
 	memcpy(p, err_recov_pg, sizeof(err_recov_pg));
@@ -607,7 +617,7 @@
 
 static int resp_disconnect_pg(unsigned char * p, int pcontrol, int target)
 { 	/* Disconnect-Reconnect page for mode_sense */
-	unsigned char disconnect_pg[] = {0x2, 0xe, 128, 128, 0, 10, 0, 0, 
+	unsigned char disconnect_pg[] = {0x2, 0xe, 128, 128, 0, 10, 0, 0,
 					 0, 0, 0, 0, 0, 0, 0, 0};
 
 	memcpy(p, disconnect_pg, sizeof(disconnect_pg));
@@ -636,7 +646,7 @@
 
 static int resp_caching_pg(unsigned char * p, int pcontrol, int target)
 { 	/* Caching page for mode_sense */
-	unsigned char caching_pg[] = {0x8, 18, 0x14, 0, 0xff, 0xff, 0, 0, 
+	unsigned char caching_pg[] = {0x8, 18, 0x14, 0, 0xff, 0xff, 0, 0,
 		0xff, 0xff, 0xff, 0xff, 0x80, 0x14, 0, 0,     0, 0, 0, 0};
 
 	memcpy(p, caching_pg, sizeof(caching_pg));
@@ -678,7 +688,7 @@
 	int alloc_len, msense_6, offset, len;
 	unsigned char * ap;
 	unsigned char arr[SDEBUG_MAX_MSENSE_SZ];
-	int min_len = bufflen > SDEBUG_MAX_MSENSE_SZ ? 
+	int min_len = bufflen > SDEBUG_MAX_MSENSE_SZ ?
 			SDEBUG_MAX_MSENSE_SZ : bufflen;
 
 	SCSI_LOG_LLQUEUE(3, printk("Mode sense ...(%p %d)\n", buff, bufflen));
@@ -753,14 +763,14 @@
 		arr[0] = offset - 1;
 	else {
 		offset -= 2;
-		arr[0] = (offset >> 8) & 0xff; 
-		arr[1] = offset & 0xff; 
+		arr[0] = (offset >> 8) & 0xff;
+		arr[1] = offset & 0xff;
 	}
 	memcpy(buff, arr, min_len);
 	return 0;
 }
 
-static int resp_read(struct scsi_cmnd * SCpnt, int upper_blk, int block, 
+static int resp_read(struct scsi_cmnd * SCpnt, int upper_blk, int block,
 		     int num, struct sdebug_dev_info * devip)
 {
         unsigned char *buff = (unsigned char *) SCpnt->request_buffer;
@@ -770,14 +780,14 @@
 	unsigned long iflags;
 
 	if (upper_blk || (block + num > sdebug_capacity)) {
-		mk_sense_buffer(devip, ILLEGAL_REQUEST, ADDR_OUT_OF_RANGE, 
+		mk_sense_buffer(devip, ILLEGAL_REQUEST, ADDR_OUT_OF_RANGE,
 				0, 18);
 		return check_condition_result;
 	}
 	if ((SCSI_DEBUG_OPT_MEDIUM_ERR & scsi_debug_opts) &&
-	    (block <= OPT_MEDIUM_ERR_ADDR) && 
+	    (block <= OPT_MEDIUM_ERR_ADDR) &&
 	    ((block + num) > OPT_MEDIUM_ERR_ADDR)) {
-		mk_sense_buffer(devip, MEDIUM_ERROR, UNRECOVERED_READ_ERR, 
+		mk_sense_buffer(devip, MEDIUM_ERROR, UNRECOVERED_READ_ERR,
 				0, 18);
 		/* claim unrecoverable read error */
 		return check_condition_result;
@@ -785,7 +795,7 @@
 	read_lock_irqsave(&atomic_rw, iflags);
         sgcount = 0;
 	nbytes = bufflen;
-	/* printk(KERN_INFO "scsi_debug_read: block=%d, tot_bufflen=%d\n", 
+	/* printk(KERN_INFO "scsi_debug_read: block=%d, tot_bufflen=%d\n",
 	       block, bufflen); */
 	if (SCpnt->use_sg) {
 		sgcount = 0;
@@ -857,7 +867,7 @@
 static int resp_report_luns(unsigned char * cmd, unsigned char * buff,
 			    int bufflen, struct sdebug_dev_info * devip)
 {
-	unsigned int alloc_len; 
+	unsigned int alloc_len;
 	int lun_cnt, i, upper;
 	int select_report = (int)cmd[2];
 	struct scsi_lun *one_lun;
@@ -868,19 +878,19 @@
 			       	0, 18);
 		return check_condition_result;
 	}
-	if (bufflen > 8) { /* can produce response with up to 16k luns 
+	if (bufflen > 8) { /* can produce response with up to 16k luns
 			      (lun 0 to lun 16383) */
 		memset(buff, 0, bufflen);
 		lun_cnt = scsi_debug_max_luns;
 		buff[2] = ((sizeof(struct scsi_lun) * lun_cnt) >> 8) & 0xff;
 		buff[3] = (sizeof(struct scsi_lun) * lun_cnt) & 0xff;
-		lun_cnt = min((int)((bufflen - 8) / sizeof(struct scsi_lun)), 
+		lun_cnt = min((int)((bufflen - 8) / sizeof(struct scsi_lun)),
 			      lun_cnt);
 		one_lun = (struct scsi_lun *) &buff[8];
 		for (i = 0; i < lun_cnt; i++) {
 			upper = (i >> 8) & 0x3f;
 			if (upper)
-				one_lun[i].scsi_lun[0] = 
+				one_lun[i].scsi_lun[0] =
 				    (upper | (SAM2_LUN_ADDRESS_METHOD << 6));
 			one_lun[i].scsi_lun[1] = i & 0xff;
 		}
@@ -926,7 +936,7 @@
 
 static int scsi_debug_slave_configure(struct scsi_device * sdp)
 {
-	struct sdebug_dev_info * devip; 
+	struct sdebug_dev_info * devip;
 
 	if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)
 		printk(KERN_INFO "scsi_debug: slave_configure <%u %u %u %u>\n",
@@ -936,14 +946,14 @@
 	devip = devInfoReg(sdp);
 	sdp->hostdata = devip;
 	if (sdp->host->cmd_per_lun)
-		scsi_adjust_queue_depth(sdp, SDEBUG_TAGGED_QUEUING, 
+		scsi_adjust_queue_depth(sdp, SDEBUG_TAGGED_QUEUING,
 					sdp->host->cmd_per_lun);
 	return 0;
 }
 
 static void scsi_debug_slave_destroy(struct scsi_device * sdp)
 {
-	struct sdebug_dev_info * devip = 
+	struct sdebug_dev_info * devip =
 				(struct sdebug_dev_info *)sdp->hostdata;
 
 	if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)
@@ -980,6 +990,18 @@
 				open_devip = devip;
 		}
 	}
+	if (NULL == open_devip) { /* try and make a new one */
+		open_devip = kmalloc(sizeof(*open_devip),GFP_KERNEL);
+		if (NULL == open_devip) {
+			printk(KERN_ERR "%s: out of memory at line %d\n",
+				__FUNCTION__, __LINE__);
+			return NULL;
+		}
+		memset(open_devip, 0, sizeof(*open_devip));
+		open_devip->sdbg_host = sdbg_host;
+		list_add_tail(&open_devip->dev_list,
+		&sdbg_host->dev_info_list);
+	}
         if (open_devip) {
 		open_devip->channel = sdev->channel;
 		open_devip->target = sdev->id;
@@ -994,7 +1016,7 @@
         return NULL;
 }
 
-static void mk_sense_buffer(struct sdebug_dev_info * devip, int key, 
+static void mk_sense_buffer(struct sdebug_dev_info * devip, int key,
 			    int asc, int asq, int inbandLen)
 {
 	unsigned char * sbuff;
@@ -1029,7 +1051,7 @@
 		printk(KERN_INFO "scsi_debug: biosparam\n");
 	buf = scsi_bios_ptable(bdev);
 	if (buf) {
-		res = scsi_partsize(buf, capacity, 
+		res = scsi_partsize(buf, capacity,
 				    &info[2], &info[0], &info[1]);
 		kfree(buf);
 		if (! res)
@@ -1138,7 +1160,7 @@
 }
 
 /* Initializes timers in queued array */
-static void init_all_queued(void)
+static void __init init_all_queued(void)
 {
 	unsigned long iflags;
 	int k;
@@ -1154,11 +1176,61 @@
 	spin_unlock_irqrestore(&queued_arr_lock, iflags);
 }
 
-static int schedule_resp(struct scsi_cmnd * cmnd, 
+static void __init sdebug_build_parts(unsigned char * ramp)
+{
+	struct partition * pp;
+	int starts[SDEBUG_MAX_PARTS + 2];
+	int sectors_per_part, num_sectors, k;
+	int heads_by_sects, start_sec, end_sec;
+
+	/* assume partition table already zeroed */
+	if ((scsi_debug_num_parts < 1) || (sdebug_store_size < 1048576))
+		return;
+	if (scsi_debug_num_parts > SDEBUG_MAX_PARTS) {
+		scsi_debug_num_parts = SDEBUG_MAX_PARTS;
+		printk(KERN_WARNING "scsi_debug:build_parts: reducing "
+				    "partitions to %d\n", SDEBUG_MAX_PARTS);
+	}
+	num_sectors = (int)(sdebug_store_size / SECT_SIZE);
+	sectors_per_part = (num_sectors - sdebug_sectors_per)
+			   / scsi_debug_num_parts;
+	heads_by_sects = sdebug_heads * sdebug_sectors_per;
+        starts[0] = sdebug_sectors_per;
+	for (k = 1; k < scsi_debug_num_parts; ++k)
+		starts[k] = ((k * sectors_per_part) / heads_by_sects)
+			    * heads_by_sects;
+	starts[scsi_debug_num_parts] = num_sectors;
+	starts[scsi_debug_num_parts + 1] = 0;
+
+	ramp[510] = 0x55;	/* magic partition markings */
+	ramp[511] = 0xAA;
+	pp = (struct partition *)(ramp + 0x1be);
+	for (k = 0; starts[k + 1]; ++k, ++pp) {
+		start_sec = starts[k];
+		end_sec = starts[k + 1] - 1;
+		pp->boot_ind = 0;
+
+		pp->cyl = start_sec / heads_by_sects;
+		pp->head = (start_sec - (pp->cyl * heads_by_sects))
+			   / sdebug_sectors_per;
+		pp->sector = (start_sec % sdebug_sectors_per) + 1;
+
+		pp->end_cyl = end_sec / heads_by_sects;
+		pp->end_head = (end_sec - (pp->end_cyl * heads_by_sects))
+			       / sdebug_sectors_per;
+		pp->end_sector = (end_sec % sdebug_sectors_per) + 1;
+
+		pp->start_sect = start_sec;
+		pp->nr_sects = end_sec - start_sec + 1;
+		pp->sys_ind = 0x83;	/* plain Linux partition */
+	}
+}
+
+static int schedule_resp(struct scsi_cmnd * cmnd,
 			 struct sdebug_dev_info * devip,
 			 done_funct_t done, int scsi_result, int delta_jiff)
 {
-	int k, num; 
+	int k, num;
 
 	if ((SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) && cmnd) {
 		printk(KERN_INFO "scsi_debug: cmd ");
@@ -1176,7 +1248,7 @@
 	if (cmnd && devip) {
 		/* simulate autosense by this driver */
 		if (SAM_STAT_CHECK_CONDITION == (scsi_result & 0xff))
-			memcpy(cmnd->sense_buffer, devip->sense_buff, 
+			memcpy(cmnd->sense_buffer, devip->sense_buff,
 			       (SCSI_SENSE_BUFFERSIZE > SDEBUG_SENSE_LEN) ?
 			       SDEBUG_SENSE_LEN : SCSI_SENSE_BUFFERSIZE);
 	}
@@ -1219,38 +1291,43 @@
 
 /* Set 'perm' (4th argument) to 0 to disable module_param's definition
  * of sysfs parameters (which module_param doesn't yet support).
- * Sysfs parameters defined explicitly below. 
+ * Sysfs parameters defined explicitly below.
  */
-module_param_named(num_tgts, scsi_debug_num_tgts, int, 0);
-module_param_named(max_luns, scsi_debug_max_luns, int, 0);
-module_param_named(scsi_level, scsi_debug_scsi_level, int, 0);
+module_param_named(add_host, scsi_debug_add_host, int, 0); /* perm=0644 */
+module_param_named(delay, scsi_debug_delay, int, 0); /* perm=0644 */
 module_param_named(dev_size_mb, scsi_debug_dev_size_mb, int, 0);
-module_param_named(opts, scsi_debug_opts, int, 0); /* perm=0644 */
 module_param_named(every_nth, scsi_debug_every_nth, int, 0);
-module_param_named(delay, scsi_debug_delay, int, 0); /* perm=0644 */
-module_param_named(add_host, scsi_debug_add_host, int, 0); /* perm=0644 */
+module_param_named(max_luns, scsi_debug_max_luns, int, 0);
+module_param_named(num_parts, scsi_debug_num_parts, int, 0);
+module_param_named(num_tgts, scsi_debug_num_tgts, int, 0);
+module_param_named(opts, scsi_debug_opts, int, 0); /* perm=0644 */
+module_param_named(ptype, scsi_debug_ptype, int, 0);
+module_param_named(scsi_level, scsi_debug_scsi_level, int, 0);
 
 MODULE_AUTHOR("Eric Youngdale + Douglas Gilbert");
 MODULE_DESCRIPTION("SCSI debug adapter driver");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(SCSI_DEBUG_VERSION);
 
-MODULE_PARM_DESC(num_tgts, "number of SCSI targets per host to simulate");
-MODULE_PARM_DESC(max_luns, "number of SCSI LUNs per target to simulate");
-MODULE_PARM_DESC(scsi_level, "SCSI level to simulate");
+MODULE_PARM_DESC(add_host, "0..127 hosts allowed(def=1)");
+MODULE_PARM_DESC(delay, "# of jiffies to delay response(def=1)");
 MODULE_PARM_DESC(dev_size_mb, "size in MB of ram shared by devs");
-MODULE_PARM_DESC(opts, "1->noise, 2->medium_error, 4->...");
 MODULE_PARM_DESC(every_nth, "timeout every nth command(def=100)");
-MODULE_PARM_DESC(delay, "# of jiffies to delay response(def=1)");
-MODULE_PARM_DESC(add_host, "0..127 hosts allowed(def=1)");
+MODULE_PARM_DESC(max_luns, "number of SCSI LUNs per target to simulate");
+MODULE_PARM_DESC(num_parts, "number of partitions(def=0)");
+MODULE_PARM_DESC(num_tgts, "number of SCSI targets per host to simulate");
+MODULE_PARM_DESC(opts, "1->noise, 2->medium_error, 4->...");
+MODULE_PARM_DESC(ptype, "SCSI peripheral type(def=0[disk])");
+MODULE_PARM_DESC(scsi_level, "SCSI level to simulate");
 
 
 static char sdebug_info[256];
 
 static const char * scsi_debug_info(struct Scsi_Host * shp)
 {
-	sprintf(sdebug_info, "scsi_debug, %s, num_tgts=%d, "
-		"dev_size_mb=%d, opts=0x%x", scsi_debug_version_str,
-		scsi_debug_num_tgts, scsi_debug_dev_size_mb,
+	sprintf(sdebug_info, "scsi_debug, version %s [%s], "
+		"dev_size_mb=%d, opts=0x%x", SCSI_DEBUG_VERSION,
+		scsi_debug_version_date, scsi_debug_dev_size_mb,
 		scsi_debug_opts);
 	return sdebug_info;
 }
@@ -1282,14 +1359,15 @@
 		return length;
 	}
 	begin = 0;
-	pos = len = sprintf(buffer, "scsi_debug adapter driver, %s\n"
+	pos = len = sprintf(buffer, "scsi_debug adapter driver, version "
+	    "%s [%s]\n"
 	    "num_tgts=%d, shared (ram) size=%d MB, opts=0x%x, "
 	    "every_nth=%d(curr:%d)\n"
 	    "delay=%d, max_luns=%d, scsi_level=%d\n"
 	    "sector_size=%d bytes, cylinders=%d, heads=%d, sectors=%d\n"
-	    "number of aborts=%d, device_reset=%d, bus_resets=%d, " 
+	    "number of aborts=%d, device_reset=%d, bus_resets=%d, "
 	    "host_resets=%d\n",
-	    scsi_debug_version_str, scsi_debug_num_tgts, 
+	    SCSI_DEBUG_VERSION, scsi_debug_version_date, scsi_debug_num_tgts,
 	    scsi_debug_dev_size_mb, scsi_debug_opts, scsi_debug_every_nth,
 	    scsi_debug_cmnd_count, scsi_debug_delay,
 	    scsi_debug_max_luns, scsi_debug_scsi_level,
@@ -1306,12 +1384,12 @@
 	return len;
 }
 
-static ssize_t sdebug_delay_show(struct device_driver * ddp, char * buf) 
+static ssize_t sdebug_delay_show(struct device_driver * ddp, char * buf)
 {
         return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_delay);
 }
 
-static ssize_t sdebug_delay_store(struct device_driver * ddp, 
+static ssize_t sdebug_delay_store(struct device_driver * ddp,
 				  const char * buf, size_t count)
 {
         int delay;
@@ -1325,15 +1403,15 @@
 	}
 	return -EINVAL;
 }
-DRIVER_ATTR(delay, S_IRUGO | S_IWUSR, sdebug_delay_show, 
-	    sdebug_delay_store)
+DRIVER_ATTR(delay, S_IRUGO | S_IWUSR, sdebug_delay_show,
+	    sdebug_delay_store);
 
-static ssize_t sdebug_opts_show(struct device_driver * ddp, char * buf) 
+static ssize_t sdebug_opts_show(struct device_driver * ddp, char * buf)
 {
         return scnprintf(buf, PAGE_SIZE, "0x%x\n", scsi_debug_opts);
 }
 
-static ssize_t sdebug_opts_store(struct device_driver * ddp, 
+static ssize_t sdebug_opts_store(struct device_driver * ddp,
 				 const char * buf, size_t count)
 {
         int opts;
@@ -1354,38 +1432,62 @@
 	scsi_debug_cmnd_count = 0;
 	return count;
 }
-DRIVER_ATTR(opts, S_IRUGO | S_IWUSR, sdebug_opts_show, 
-	    sdebug_opts_store)
+DRIVER_ATTR(opts, S_IRUGO | S_IWUSR, sdebug_opts_show,
+	    sdebug_opts_store);
+
+static ssize_t sdebug_ptype_show(struct device_driver * ddp, char * buf)
+{
+        return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_ptype);
+}
+static ssize_t sdebug_ptype_store(struct device_driver * ddp,
+				  const char * buf, size_t count)
+{
+        int n;
+
+	if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n >= 0)) {
+		scsi_debug_ptype = n;
+		return count;
+	}
+	return -EINVAL;
+}
+DRIVER_ATTR(ptype, S_IRUGO | S_IWUSR, sdebug_ptype_show, sdebug_ptype_store);
 
-static ssize_t sdebug_num_tgts_show(struct device_driver * ddp, char * buf) 
+static ssize_t sdebug_num_tgts_show(struct device_driver * ddp, char * buf)
 {
         return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_num_tgts);
 }
-static ssize_t sdebug_num_tgts_store(struct device_driver * ddp, 
+static ssize_t sdebug_num_tgts_store(struct device_driver * ddp,
 				     const char * buf, size_t count)
 {
         int n;
 
 	if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n >= 0)) {
 		scsi_debug_num_tgts = n;
+		sdebug_max_tgts_luns();
 		return count;
 	}
 	return -EINVAL;
 }
-DRIVER_ATTR(num_tgts, S_IRUGO | S_IWUSR, sdebug_num_tgts_show, 
-	    sdebug_num_tgts_store) 
+DRIVER_ATTR(num_tgts, S_IRUGO | S_IWUSR, sdebug_num_tgts_show,
+	    sdebug_num_tgts_store);
 
-static ssize_t sdebug_dev_size_mb_show(struct device_driver * ddp, char * buf) 
+static ssize_t sdebug_dev_size_mb_show(struct device_driver * ddp, char * buf)
 {
         return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dev_size_mb);
 }
-DRIVER_ATTR(dev_size_mb, S_IRUGO, sdebug_dev_size_mb_show, NULL) 
+DRIVER_ATTR(dev_size_mb, S_IRUGO, sdebug_dev_size_mb_show, NULL);
+
+static ssize_t sdebug_num_parts_show(struct device_driver * ddp, char * buf)
+{
+        return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_num_parts);
+}
+DRIVER_ATTR(num_parts, S_IRUGO, sdebug_num_parts_show, NULL);
 
-static ssize_t sdebug_every_nth_show(struct device_driver * ddp, char * buf) 
+static ssize_t sdebug_every_nth_show(struct device_driver * ddp, char * buf)
 {
         return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_every_nth);
 }
-static ssize_t sdebug_every_nth_store(struct device_driver * ddp, 
+static ssize_t sdebug_every_nth_store(struct device_driver * ddp,
 				      const char * buf, size_t count)
 {
         int nth;
@@ -1398,38 +1500,39 @@
 	return -EINVAL;
 }
 DRIVER_ATTR(every_nth, S_IRUGO | S_IWUSR, sdebug_every_nth_show,
-	    sdebug_every_nth_store) 
+	    sdebug_every_nth_store);
 
-static ssize_t sdebug_max_luns_show(struct device_driver * ddp, char * buf) 
+static ssize_t sdebug_max_luns_show(struct device_driver * ddp, char * buf)
 {
         return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_max_luns);
 }
-static ssize_t sdebug_max_luns_store(struct device_driver * ddp, 
+static ssize_t sdebug_max_luns_store(struct device_driver * ddp,
 				     const char * buf, size_t count)
 {
         int n;
 
 	if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n >= 0)) {
 		scsi_debug_max_luns = n;
+		sdebug_max_tgts_luns();
 		return count;
 	}
 	return -EINVAL;
 }
-DRIVER_ATTR(max_luns, S_IRUGO | S_IWUSR, sdebug_max_luns_show, 
-	    sdebug_max_luns_store) 
+DRIVER_ATTR(max_luns, S_IRUGO | S_IWUSR, sdebug_max_luns_show,
+	    sdebug_max_luns_store);
 
-static ssize_t sdebug_scsi_level_show(struct device_driver * ddp, char * buf) 
+static ssize_t sdebug_scsi_level_show(struct device_driver * ddp, char * buf)
 {
         return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_scsi_level);
 }
-DRIVER_ATTR(scsi_level, S_IRUGO, sdebug_scsi_level_show, NULL) 
+DRIVER_ATTR(scsi_level, S_IRUGO, sdebug_scsi_level_show, NULL);
 
-static ssize_t sdebug_add_host_show(struct device_driver * ddp, char * buf) 
+static ssize_t sdebug_add_host_show(struct device_driver * ddp, char * buf)
 {
         return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_add_host);
 }
 
-static ssize_t sdebug_add_host_store(struct device_driver * ddp, 
+static ssize_t sdebug_add_host_store(struct device_driver * ddp,
 				     const char * buf, size_t count)
 {
         int delta_hosts;
@@ -1459,30 +1562,34 @@
 	return count;
 }
 DRIVER_ATTR(add_host, S_IRUGO | S_IWUSR, sdebug_add_host_show, 
-	    sdebug_add_host_store)
+	    sdebug_add_host_store);
 
 static void do_create_driverfs_files(void)
 {
+	driver_create_file(&sdebug_driverfs_driver, &driver_attr_add_host);
 	driver_create_file(&sdebug_driverfs_driver, &driver_attr_delay);
-	driver_create_file(&sdebug_driverfs_driver, &driver_attr_opts);
-	driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_tgts);
 	driver_create_file(&sdebug_driverfs_driver, &driver_attr_dev_size_mb);
 	driver_create_file(&sdebug_driverfs_driver, &driver_attr_every_nth);
 	driver_create_file(&sdebug_driverfs_driver, &driver_attr_max_luns);
+	driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_tgts);
+	driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_parts);
+	driver_create_file(&sdebug_driverfs_driver, &driver_attr_ptype);
+	driver_create_file(&sdebug_driverfs_driver, &driver_attr_opts);
 	driver_create_file(&sdebug_driverfs_driver, &driver_attr_scsi_level);
-	driver_create_file(&sdebug_driverfs_driver, &driver_attr_add_host);
 }
 
 static void do_remove_driverfs_files(void)
 {
-	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_add_host);
 	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_scsi_level);
+	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_opts);
+	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_ptype);
+	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_num_parts);
+	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_num_tgts);
 	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_max_luns);
 	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_every_nth);
 	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_dev_size_mb);
-	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_num_tgts);
-	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_opts);
 	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_delay);
+	driver_remove_file(&sdebug_driverfs_driver, &driver_attr_add_host);
 }
 
 static int __init scsi_debug_init(void)
@@ -1491,23 +1598,25 @@
 	int host_to_add;
 	int k;
 
+	if (scsi_debug_dev_size_mb < 1)
+		scsi_debug_dev_size_mb = 1;  /* force minimum 1 MB ramdisk */
 	sdebug_store_size = (unsigned long)scsi_debug_dev_size_mb * 1048576;
 	sdebug_capacity = sdebug_store_size / SECT_SIZE;
 
 	/* play around with geometry, don't waste too much on track 0 */
 	sdebug_heads = 8;
 	sdebug_sectors_per = 32;
-	if (scsi_debug_dev_size_mb >= 16) 
+	if (scsi_debug_dev_size_mb >= 16)
 		sdebug_heads = 32;
 	else if (scsi_debug_dev_size_mb >= 256)
 		sdebug_heads = 64;
-	sdebug_cylinders_per = (unsigned long)sdebug_capacity / 
+	sdebug_cylinders_per = (unsigned long)sdebug_capacity /
 			       (sdebug_sectors_per * sdebug_heads);
-	if (sdebug_cylinders_per >= 1024) { 
+	if (sdebug_cylinders_per >= 1024) {
 		/* other LLDs do this; implies >= 1GB ram disk ... */
 		sdebug_heads = 255;
 		sdebug_sectors_per = 63;
-		sdebug_cylinders_per = (unsigned long)sdebug_capacity / 
+		sdebug_cylinders_per = (unsigned long)sdebug_capacity /
 			       (sdebug_sectors_per * sdebug_heads);
 	}
 
@@ -1518,6 +1627,8 @@
 		return -ENOMEM;
 	}
 	memset(fake_storep, 0, sz);
+	if (scsi_debug_num_parts > 0)
+		sdebug_build_parts(fake_storep);
 
 	init_all_queued();
 
@@ -1575,7 +1686,7 @@
 	.release	= pseudo_0_release,
 };
 
-static int pseudo_lld_bus_match(struct device *dev, 
+static int pseudo_lld_bus_match(struct device *dev,
                           struct device_driver *dev_driver)
 {
         return 1;
@@ -1737,3 +1848,21 @@
         scsi_host_put(sdbg_host->shost);
         return 0;
 }
+
+static void sdebug_max_tgts_luns(void)
+{
+	struct sdebug_host_info * sdbg_host;
+	struct Scsi_Host *hpnt;
+
+	spin_lock(&sdebug_host_list_lock);
+	list_for_each_entry(sdbg_host, &sdebug_host_list, host_list) {
+		hpnt = sdbg_host->shost;
+		if ((hpnt->this_id >= 0) &&
+		    (scsi_debug_num_tgts > hpnt->this_id))
+			hpnt->max_id = scsi_debug_num_tgts + 1;
+		else
+			hpnt->max_id = scsi_debug_num_tgts;
+		hpnt->max_lun = scsi_debug_max_luns;
+	}
+	spin_unlock(&sdebug_host_list_lock);
+}
--- diff/drivers/scsi/scsi_debug.h	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/scsi_debug.h	2004-07-01 21:32:44.000000000 +0100
@@ -5,9 +5,9 @@
 static int scsi_debug_slave_alloc(struct scsi_device *);
 static int scsi_debug_slave_configure(struct scsi_device *);
 static void scsi_debug_slave_destroy(struct scsi_device *);
-static int scsi_debug_queuecommand(struct scsi_cmnd *, 
+static int scsi_debug_queuecommand(struct scsi_cmnd *,
 				   void (*done) (struct scsi_cmnd *));
-static int scsi_debug_ioctl(struct scsi_device *, int, void *);
+static int scsi_debug_ioctl(struct scsi_device *, int, void __user *);
 static int scsi_debug_biosparam(struct scsi_device *, struct block_device *,
 		sector_t, int[]);
 static int scsi_debug_abort(struct scsi_cmnd *);
@@ -17,9 +17,6 @@
 static int scsi_debug_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
 static const char * scsi_debug_info(struct Scsi_Host *);
 
-/*
- * This driver is written for the lk 2.5 series
- */
 #define SCSI_DEBUG_CANQUEUE  255 	/* needs to be >= 1 */
 
 #define SCSI_DEBUG_MAX_CMD_LEN 16
--- diff/drivers/scsi/scsi_devinfo.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/scsi_devinfo.c	2004-07-01 21:32:44.000000000 +0100
@@ -6,12 +6,13 @@
 #include <linux/moduleparam.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_devinfo.h>
 
-#include "scsi.h"
-#include "hosts.h"
 #include "scsi_priv.h"
 
+
 /*
  * scsi_dev_info_list: structure to hold black/white listed devices.
  */
@@ -27,7 +28,7 @@
 static const char spaces[] = "                "; /* 16 of them */
 static unsigned scsi_default_dev_flags;
 static LIST_HEAD(scsi_dev_info_list);
-static __init char scsi_dev_flags[256];
+static __initdata char scsi_dev_flags[256];
 
 /*
  * scsi_static_device_list: deprecated list of devices that require
@@ -117,8 +118,10 @@
 	 */
 	{"ADAPTEC", "AACRAID", NULL, BLIST_FORCELUN},
 	{"ADAPTEC", "Adaptec 5400S", NULL, BLIST_FORCELUN},
-	{"BELKIN", "USB 2 HS-CF", "1.95",  BLIST_SPARSELUN},
+	{"AFT PRO", "-IX CF", "0.0>", BLIST_FORCELUN},
+	{"BELKIN", "USB 2 HS-CF", "1.95",  BLIST_FORCELUN},
 	{"CANON", "IPUBJD", NULL, BLIST_SPARSELUN},
+	{"CBOX3", "USB Storage-SMC", "300A", BLIST_FORCELUN},
 	{"CMD", "CRA-7280", NULL, BLIST_SPARSELUN},	/* CMD RAID Controller */
 	{"CNSI", "G7324", NULL, BLIST_SPARSELUN},	/* Chaparral G7324 RAID */
 	{"CNSi", "G8324", NULL, BLIST_SPARSELUN},	/* Chaparral G8324 RAID */
@@ -126,7 +129,7 @@
 	{"COMPAQ", "CR3500", NULL, BLIST_FORCELUN},
 	{"COMPAQ", "MSA1000", NULL, BLIST_SPARSELUN | BLIST_NOSTARTONADD},
 	{"COMPAQ", "MSA1000 VOLUME", NULL, BLIST_SPARSELUN | BLIST_NOSTARTONADD},
-	{"COMPAQ", "HSV110", NULL, BLIST_SPARSELUN | BLIST_NOSTARTONADD},
+	{"COMPAQ", "HSV110", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD},
 	{"DDN", "SAN DataDirector", "*", BLIST_SPARSELUN},
 	{"DEC", "HSG80", NULL, BLIST_SPARSELUN | BLIST_NOSTARTONADD},
 	{"DELL", "PV660F", NULL, BLIST_SPARSELUN},
@@ -139,6 +142,7 @@
 	{"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_FORCELUN},
 	{"EMULEX", "MD21/S2     ESDI", NULL, BLIST_SINGLELUN},
 	{"FSC", "CentricStor", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+	{"Generic", "USB SD Reader", "1.00", BLIST_FORCELUN},
 	{"Generic", "USB Storage-SMC", "0180", BLIST_FORCELUN},
 	{"Generic", "USB Storage-SMC", "0207", BLIST_FORCELUN},
 	{"HITACHI", "DF400", "*", BLIST_SPARSELUN},
@@ -147,7 +151,7 @@
 	{"HP", "A6189A", NULL, BLIST_SPARSELUN | BLIST_LARGELUN},	/* HP VA7400 */
 	{"HP", "OPEN-", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, /* HP XP Arrays */
 	{"HP", "NetRAID-4M", NULL, BLIST_FORCELUN},
-	{"HP", "HSV100", NULL, BLIST_SPARSELUN | BLIST_NOSTARTONADD},
+	{"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD},
 	{"HP", "C1557A", NULL, BLIST_FORCELUN},
 	{"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN},
 	{"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
@@ -155,12 +159,15 @@
 	{"IOMEGA", "Io20S         *F", NULL, BLIST_KEY},
 	{"INSITE", "Floptical   F*8I", NULL, BLIST_KEY},
 	{"INSITE", "I325VM", NULL, BLIST_KEY},
+	{"iRiver", "iFP Mass Driver", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
 	{"LASOUND", "CDX7405", "3.10", BLIST_MAX5LUN | BLIST_SINGLELUN},
 	{"MATSHITA", "PD-1", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
+	{"MATSHITA", "DMC-LC5", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
+	{"MATSHITA", "DMC-LC40", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
 	{"Medion", "Flash XL  MMC/SD", "2.6D", BLIST_FORCELUN},
 	{"MegaRAID", "LD", NULL, BLIST_FORCELUN},
 	{"MICROP", "4110", NULL, BLIST_NOTQ},
-	{"MYLEX", "DACARMRB", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+	{"MYLEX", "DACARMRB", "*", BLIST_REPORTLUN2},
 	{"nCipher", "Fastness Crypto", NULL, BLIST_FORCELUN},
 	{"NAKAMICH", "MJ-4.8S", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
 	{"NAKAMICH", "MJ-5.16S", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
@@ -171,9 +178,10 @@
 	{"PIONEER", "CD-ROM DRM-602X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
 	{"PIONEER", "CD-ROM DRM-604X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
 	{"REGAL", "CDC-4X", NULL, BLIST_MAX5LUN | BLIST_SINGLELUN},
+	{"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN},
 	{"SGI", "RAID3", "*", BLIST_SPARSELUN},
 	{"SGI", "RAID5", "*", BLIST_SPARSELUN},
-	{"SGI", "TP9100", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+	{"SGI", "TP9100", "*", BLIST_REPORTLUN2},
 	{"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN},
 	{"SONY", "CD-ROM CDU-8001", NULL, BLIST_BORKEN},
 	{"SONY", "TSL", NULL, BLIST_FORCELUN},		/* DDS3 & DDS4 autoloaders */
@@ -182,6 +190,7 @@
 	{"TEXEL", "CD-ROM", "1.06", BLIST_BORKEN},
 	{"TOSHIBA", "CDROM", NULL, BLIST_ISROM},
 	{"TOSHIBA", "CD-ROM", NULL, BLIST_ISROM},
+	{"USB2.0", "SMARTMEDIA/XD", NULL, BLIST_FORCELUN},
 	{"XYRATEX", "RS", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
 	{"Zzyzx", "RocketStor 500S", NULL, BLIST_SPARSELUN},
 	{"Zzyzx", "RocketStor 2000", NULL, BLIST_SPARSELUN},
--- diff/drivers/scsi/scsi_error.c	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/scsi_error.c	2004-07-01 21:32:44.000000000 +0100
@@ -23,28 +23,27 @@
 #include <linux/interrupt.h>
 #include <linux/blkdev.h>
 #include <linux/smp_lock.h>
-#include <scsi/scsi_ioctl.h>
 
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_ioctl.h>
+#include <scsi/scsi_request.h>
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
 
-#ifdef DEBUG
-#define SENSE_TIMEOUT SCSI_TIMEOUT
-#else
-#define SENSE_TIMEOUT (10*HZ)
-#endif
-
-#define START_UNIT_TIMEOUT (30*HZ)
+#define SENSE_TIMEOUT		(10*HZ)
+#define START_UNIT_TIMEOUT	(30*HZ)
 
 /*
  * These should *probably* be handled by the host itself.
  * Since it is allowed to sleep, it probably should.
  */
-#define BUS_RESET_SETTLE_TIME   10*HZ
-#define HOST_RESET_SETTLE_TIME  10*HZ
+#define BUS_RESET_SETTLE_TIME   (10*HZ)
+#define HOST_RESET_SETTLE_TIME  (10*HZ)
 
 /* called with shost->host_lock held */
 void scsi_eh_wakeup(struct Scsi_Host *shost)
@@ -167,6 +166,24 @@
 void scsi_times_out(struct scsi_cmnd *scmd)
 {
 	scsi_log_completion(scmd, TIMEOUT_ERROR);
+
+	if (scmd->device->host->hostt->eh_timed_out)
+		switch (scmd->device->host->hostt->eh_timed_out(scmd)) {
+		case EH_HANDLED:
+			__scsi_done(scmd);
+			return;
+		case EH_RESET_TIMER:
+			/* This allows a single retry even of a command
+			 * with allowed == 0 */
+			if (scmd->retries++ > scmd->allowed)
+				break;
+			scsi_add_timer(scmd, scmd->timeout_per_command,
+				       scsi_times_out);
+			return;
+		case EH_NOT_HANDLED:
+			break;
+		}
+
 	if (unlikely(!scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))) {
 		panic("Error handler thread not present at %p %p %s %d",
 		      scmd, scmd->device->host, __FILE__, __LINE__);
@@ -660,7 +677,7 @@
 		SCSI_LOG_ERROR_RECOVERY(3, printk("sense requested for %p"
 						  " result %x\n", scmd,
 						  scmd->result));
-		SCSI_LOG_ERROR_RECOVERY(3, print_sense("bh", scmd));
+		SCSI_LOG_ERROR_RECOVERY(3, scsi_print_sense("bh", scmd));
 
 		rtn = scsi_decide_disposition(scmd);
 
@@ -1026,7 +1043,8 @@
 	spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
 
 	if (rtn == SUCCESS) {
-		scsi_sleep(BUS_RESET_SETTLE_TIME);
+		if (!scmd->device->host->hostt->skip_settle_delay)
+			scsi_sleep(BUS_RESET_SETTLE_TIME);
 		spin_lock_irqsave(scmd->device->host->host_lock, flags);
 		scsi_report_bus_reset(scmd->device->host, scmd->device->channel);
 		spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
@@ -1057,7 +1075,8 @@
 	spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
 
 	if (rtn == SUCCESS) {
-		scsi_sleep(HOST_RESET_SETTLE_TIME);
+		if (!scmd->device->host->hostt->skip_settle_delay)
+			scsi_sleep(HOST_RESET_SETTLE_TIME);
 		spin_lock_irqsave(scmd->device->host->host_lock, flags);
 		scsi_report_bus_reset(scmd->device->host, scmd->device->channel);
 		spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
--- diff/drivers/scsi/scsi_ioctl.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/scsi_ioctl.c	2004-07-01 21:32:44.000000000 +0100
@@ -5,23 +5,21 @@
  *   for the ones that remain
  */
 #include <linux/module.h>
-
-#include <asm/io.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/page.h>
-
+#include <linux/blkdev.h>
 #include <linux/interrupt.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/string.h>
+#include <asm/uaccess.h>
 
-#include <linux/blkdev.h>
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
+#include <scsi/scsi_request.h>
 
 #include "scsi_logging.h"
 
@@ -447,19 +445,3 @@
 	}
 	return -EINVAL;
 }
-
-/*
- * Just like scsi_ioctl, only callable from kernel space with no 
- * fs segment fiddling.
- */
-
-int kernel_scsi_ioctl(struct scsi_device *sdev, int cmd, void *arg)
-{
-	mm_segment_t oldfs;
-	int tmp;
-	oldfs = get_fs();
-	set_fs(get_ds());
-	tmp = scsi_ioctl(sdev, cmd, arg);
-	set_fs(oldfs);
-	return tmp;
-}
--- diff/drivers/scsi/scsi_lib.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/scsi_lib.c	2004-07-01 21:32:44.000000000 +0100
@@ -16,9 +16,13 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 
+#include <scsi/scsi.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_driver.h>
+#include <scsi/scsi_eh.h>
 #include <scsi/scsi_host.h>
-#include "scsi.h"
+#include <scsi/scsi_request.h>
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
@@ -255,7 +259,6 @@
 	sreq->sr_request->rq_status = RQ_SCSI_BUSY;
 	scsi_do_req(sreq, cmnd, buffer, bufflen, scsi_wait_done,
 			timeout, retries);
-	generic_unplug_device(sreq->sr_device->request_queue);
 	wait_for_completion(&wait);
 	sreq->sr_request->waiting = NULL;
 	if (sreq->sr_request->rq_status != RQ_SCSI_DONE)
@@ -838,8 +841,8 @@
 			printk("scsi%d: ERROR on channel %d, id %d, lun %d, CDB: ",
 			       cmd->device->host->host_no, (int) cmd->device->channel,
 			       (int) cmd->device->id, (int) cmd->device->lun);
-			print_command(cmd->data_cmnd);
-			print_sense("", cmd);
+			__scsi_print_command(cmd->data_cmnd);
+			scsi_print_sense("", cmd);
 			cmd = scsi_end_request(cmd, 0, block_bytes, 1);
 			return;
 		default:
@@ -863,7 +866,7 @@
 		       cmd->device->lun, result);
 
 		if (driver_byte(result) & DRIVER_SENSE)
-			print_sense("", cmd);
+			scsi_print_sense("", cmd);
 		/*
 		 * Mark a single buffer as not uptodate.  Queue the remainder.
 		 * We sometimes get this cruft in the event that a medium error
@@ -951,6 +954,22 @@
 	return BLKPREP_KILL;
 }
 
+static int scsi_issue_flush_fn(request_queue_t *q, struct gendisk *disk,
+			       sector_t *error_sector)
+{
+	struct scsi_device *sdev = q->queuedata;
+	struct scsi_driver *drv;
+
+	if (sdev->sdev_state != SDEV_RUNNING)
+		return -ENXIO;
+
+	drv = *(struct scsi_driver **) disk->private_data;
+	if (drv->issue_flush)
+		return drv->issue_flush(&sdev->sdev_gendev, error_sector);
+
+	return -EOPNOTSUPP;
+}
+
 static int scsi_prep_fn(struct request_queue *q, struct request *req)
 {
 	struct scsi_device *sdev = q->queuedata;
@@ -1332,7 +1351,8 @@
 	blk_queue_max_sectors(q, shost->max_sectors);
 	blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));
 	blk_queue_segment_boundary(q, shost->dma_boundary);
- 
+	blk_queue_issue_flush_fn(q, scsi_issue_flush_fn);
+
 	if (!shost->use_clustering)
 		clear_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
 	return q;
--- diff/drivers/scsi/scsi_module.c	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/scsi_module.c	2004-07-01 21:32:44.000000000 +0100
@@ -12,7 +12,7 @@
 #include <linux/module.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 
 static int __init init_this_scsi_driver(void)
--- diff/drivers/scsi/scsi_priv.h	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/scsi_priv.h	2004-07-01 21:32:44.000000000 +0100
@@ -82,6 +82,7 @@
 extern void scsi_init_cmd_from_req(struct scsi_cmnd *cmd,
 		struct scsi_request *sreq);
 extern void __scsi_release_request(struct scsi_request *sreq);
+extern void __scsi_done(struct scsi_cmnd *cmd);
 #ifdef CONFIG_SCSI_LOGGING
 void scsi_log_send(struct scsi_cmnd *cmd);
 void scsi_log_completion(struct scsi_cmnd *cmd, int disposition);
--- diff/drivers/scsi/scsi_proc.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/scsi_proc.c	2004-07-01 21:32:44.000000000 +0100
@@ -27,8 +27,9 @@
 #include <linux/seq_file.h>
 #include <asm/uaccess.h>
 
+#include <scsi/scsi.h>
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_host.h>
-#include "scsi.h"
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
--- diff/drivers/scsi/scsi_scan.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/scsi_scan.c	2004-07-01 21:32:44.000000000 +0100
@@ -32,11 +32,13 @@
 #include <linux/blkdev.h>
 #include <asm/semaphore.h>
 
+#include <scsi/scsi.h>
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_driver.h>
 #include <scsi/scsi_devinfo.h>
 #include <scsi/scsi_host.h>
+#include <scsi/scsi_request.h>
 #include <scsi/scsi_transport.h>
-#include "scsi.h"
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
@@ -45,6 +47,11 @@
 	" SCSI scanning, some SCSI devices might not be configured\n"
 
 /*
+ * Default timeout
+ */
+#define SCSI_TIMEOUT (2*HZ)
+
+/*
  * Prefix values for the SCSI id's (stored in driverfs name field)
  */
 #define SCSI_UID_SER_NUM 'S'
@@ -656,6 +663,9 @@
 	if (*bflags & BLIST_MS_192_BYTES_FOR_3F)
 		sdev->use_192_bytes_for_3f = 1;
 
+	if (*bflags & BLIST_NOT_LOCKABLE)
+		sdev->lockable = 0;
+
 	if(sdev->host->hostt->slave_configure)
 		sdev->host->hostt->slave_configure(sdev);
 
--- diff/drivers/scsi/scsi_syms.c	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/scsi_syms.c	2004-07-01 21:32:44.000000000 +0100
@@ -5,24 +5,15 @@
 #include <linux/config.h>
 #include <linux/module.h>
 
-#include <linux/sched.h>
-#include <linux/timer.h>
-#include <linux/string.h>
-#include <linux/slab.h>
-#include <linux/ioport.h>
-#include <linux/kernel.h>
-#include <linux/blkdev.h>
-#include <linux/fs.h>
-
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/dma.h>
-
+#include <scsi/scsi.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_driver.h>
+#include <scsi/scsi_eh.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
+#include <scsi/scsi_request.h>
 #include <scsi/scsicam.h>
-#include "scsi.h"
 
 #include "scsi_logging.h"
 
@@ -46,15 +37,14 @@
 EXPORT_SYMBOL(scsi_partsize);
 EXPORT_SYMBOL(scsi_bios_ptable);
 EXPORT_SYMBOL(scsi_ioctl);
-EXPORT_SYMBOL(print_command);
-EXPORT_SYMBOL(print_sense);
-EXPORT_SYMBOL(print_req_sense);
-EXPORT_SYMBOL(print_msg);
-EXPORT_SYMBOL(print_status);
+EXPORT_SYMBOL(scsi_print_command);
+EXPORT_SYMBOL(__scsi_print_command);
+EXPORT_SYMBOL(scsi_print_sense);
+EXPORT_SYMBOL(scsi_print_req_sense);
+EXPORT_SYMBOL(scsi_print_msg);
+EXPORT_SYMBOL(scsi_print_status);
 EXPORT_SYMBOL(scsi_sense_key_string);
 EXPORT_SYMBOL(scsi_extd_sense_format);
-EXPORT_SYMBOL(kernel_scsi_ioctl);
-EXPORT_SYMBOL(print_Scsi_Cmnd);
 EXPORT_SYMBOL(scsi_block_when_processing_errors);
 EXPORT_SYMBOL(scsi_ioctl_send_command);
 EXPORT_SYMBOL(scsi_set_medium_removal);
--- diff/drivers/scsi/scsi_sysfs.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/scsi_sysfs.c	2004-07-01 21:32:44.000000000 +0100
@@ -12,9 +12,10 @@
 #include <linux/blkdev.h>
 #include <linux/device.h>
 
+#include <scsi/scsi.h>
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_transport.h>
-#include "scsi.h"
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
@@ -99,7 +100,7 @@
  */
 #define shost_rd_attr2(name, field, format_string)			\
 	shost_show_function(name, field, format_string)			\
-static CLASS_DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)
+static CLASS_DEVICE_ATTR(name, S_IRUGO, show_##name, NULL);
 
 #define shost_rd_attr(field, format_string) \
 shost_rd_attr2(field, field, format_string)
@@ -228,8 +229,8 @@
  * read only field.
  */
 #define sdev_rd_attr(field, format_string)				\
-	sdev_show_function(field, format_string)				\
-static DEVICE_ATTR(field, S_IRUGO, sdev_show_##field, NULL)
+	sdev_show_function(field, format_string)			\
+static DEVICE_ATTR(field, S_IRUGO, sdev_show_##field, NULL);
 
 
 /*
@@ -247,7 +248,7 @@
 	snscanf (buf, 20, format_string, &sdev->field);			\
 	return count;							\
 }									\
-static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field)
+static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field);
 
 /* Currently we don't export bit fields, but we might in future,
  * so leave this code in */
@@ -272,7 +273,7 @@
 	}								\
 	return ret;							\
 }									\
-static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field)
+static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field);
 
 /*
  * scsi_sdev_check_buf_bit: return 0 if buf is "0", return 1 if buf is "1",
@@ -320,7 +321,7 @@
 	sdev->timeout = timeout * HZ;
 	return count;
 }
-static DEVICE_ATTR(timeout, S_IRUGO | S_IWUSR, sdev_show_timeout, sdev_store_timeout)
+static DEVICE_ATTR(timeout, S_IRUGO | S_IWUSR, sdev_show_timeout, sdev_store_timeout);
 
 static ssize_t
 store_rescan_field (struct device *dev, const char *buf, size_t count) 
@@ -328,7 +329,7 @@
 	scsi_rescan_device(dev);
 	return count;
 }
-static DEVICE_ATTR(rescan, S_IWUSR, NULL, store_rescan_field)
+static DEVICE_ATTR(rescan, S_IWUSR, NULL, store_rescan_field);
 
 static ssize_t sdev_store_delete(struct device *dev, const char *buf,
 				 size_t count)
--- diff/drivers/scsi/scsi_transport_spi.c	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/scsi_transport_spi.c	2004-07-01 21:32:44.000000000 +0100
@@ -152,7 +152,7 @@
 	spi_transport_store_function(field, format_string)		\
 static CLASS_DEVICE_ATTR(field, S_IRUGO | S_IWUSR,			\
 			 show_spi_transport_##field,			\
-			 store_spi_transport_##field)
+			 store_spi_transport_##field);
 
 /* The Parallel SCSI Tranport Attributes: */
 spi_transport_rd_attr(offset, "%d\n");
@@ -173,7 +173,7 @@
 	spi_dv_device(sdev);
 	return count;
 }
-static CLASS_DEVICE_ATTR(revalidate, S_IWUSR, NULL, store_spi_revalidate)
+static CLASS_DEVICE_ATTR(revalidate, S_IWUSR, NULL, store_spi_revalidate);
 
 /* Translate the period into ns according to the current spec
  * for SDTR/PPR messages */
@@ -390,10 +390,11 @@
 {
 	struct spi_internal *i = to_spi_internal(sreq->sr_host->transportt);
 	struct scsi_device *sdev = sreq->sr_device;
-	int period, prevperiod = 0; 
+	int period = 0, prevperiod = 0; 
 
 
 	for (;;) {
+		int newperiod;
 		if (compare_fn(sreq, buffer, ptr, DV_LOOPS))
 			/* Successful DV */
 			break;
@@ -401,7 +402,8 @@
 		/* OK, retrain, fallback */
 		if (i->f->get_period)
 			i->f->get_period(sdev);
-		period = spi_period(sdev);
+		newperiod = spi_period(sdev);
+		period = newperiod > period ? newperiod : period;
 		if (period < 0x0d)
 			period++;
 		else
--- diff/drivers/scsi/scsicam.c	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/scsicam.c	2004-07-01 21:32:44.000000000 +0100
@@ -11,17 +11,16 @@
  */
 
 #include <linux/module.h>
-
 #include <linux/fs.h>
 #include <linux/genhd.h>
 #include <linux/kernel.h>
 #include <linux/blkdev.h>
 #include <linux/buffer_head.h>
 #include <asm/unaligned.h>
-#include "scsi.h"
-#include "hosts.h"
+
 #include <scsi/scsicam.h>
 
+
 static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds,
 		   unsigned int *secs);
 
--- diff/drivers/scsi/scsiiom.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/scsiiom.c	2004-07-01 21:32:44.000000000 +0100
@@ -6,19 +6,19 @@
  ***********************************************************************/
 /* $Id: scsiiom.c,v 2.55.2.17 2000/12/20 00:39:37 garloff Exp $ */
 static void __inline__
-dc390_freetag (PDCB pDCB, PSRB pSRB)
+dc390_freetag (struct dc390_dcb* pDCB, struct dc390_srb* pSRB)
 {
 	if (pSRB->TagNumber < 255) {
 		pDCB->TagMask &= ~(1 << pSRB->TagNumber);   /* free tag mask */
 		pSRB->TagNumber = 255;
 	}
-};
+}
 
 
-static UCHAR
-dc390_StartSCSI( PACB pACB, PDCB pDCB, PSRB pSRB )
+static u8
+dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB )
 {
-    UCHAR cmd; UCHAR  disc_allowed, try_sync_nego;
+    u8 cmd; u8  disc_allowed, try_sync_nego;
 
     pSRB->ScsiPhase = SCSI_NOP0;
 
@@ -69,13 +69,13 @@
     /* Change 99/05/31: Don't use tags when not disconnecting (BUSY) */
     if ((pDCB->SyncMode & EN_TAG_QUEUEING) && disc_allowed)
       {
-	UCHAR tag_no = 0;
+	u8 tag_no = 0;
 	while ((1 << tag_no) & pDCB->TagMask) tag_no++;
 	if (tag_no >= sizeof (pDCB->TagMask)*8 || tag_no >= pDCB->MaxCommand) { 
 		printk (KERN_WARNING "DC390: Out of tags for Dev. %02x %02x\n", pDCB->TargetID, pDCB->TargetLUN); 
 		return 1;
 		//goto no_tag;
-	};
+	}
 	DC390_write8 (ScsiFifo, SIMPLE_QUEUE_TAG);
 	pDCB->TagMask |= (1 << tag_no); pSRB->TagNumber = tag_no;
 	DC390_write8 (ScsiFifo, tag_no);
@@ -86,13 +86,13 @@
       {
 //      no_tag:
 	DEBUG1(printk (KERN_DEBUG "DC390: Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", (disc_allowed?"":"o"), pSRB->pcmd->pid, pSRB));
-      };
+      }
 
     pSRB->SRBState = SRB_START_;
 
     if (try_sync_nego)
       { 
-	UCHAR Sync_Off = pDCB->SyncOffset;
+	u8 Sync_Off = pDCB->SyncOffset;
         DEBUG0(printk (KERN_INFO "DC390: NEW Sync Nego code triggered (%i %i)\n", pDCB->TargetID, pDCB->TargetLUN));
 	pSRB->MsgOutBuf[0] = EXTENDED_MESSAGE;
 	pSRB->MsgOutBuf[1] = 3;
@@ -104,7 +104,7 @@
 	//pSRB->SRBState = SRB_MSGOUT_;
 	pSRB->SRBState |= DO_SYNC_NEGO;
 	cmd = SEL_W_ATN_STOP;
-      };
+      }
 
     /* Command is written in CommandPhase, if SEL_W_ATN_STOP ... */
     if (cmd != SEL_W_ATN_STOP)
@@ -121,11 +121,11 @@
 	  }
 	else	/* write cmnd to bus */ 
 	  {
-	    PUCHAR ptr; UCHAR i;
-	    ptr = (PUCHAR) pSRB->pcmd->cmnd;
+	    u8 *ptr; u8 i;
+	    ptr = (u8 *) pSRB->pcmd->cmnd;
 	    for (i=0; i<pSRB->pcmd->cmd_len; i++)
 	      DC390_write8 (ScsiFifo, *(ptr++));
-	  };
+	  }
       }
     DEBUG0(if (pACB->pActiveDCB)	\
 	   printk (KERN_WARNING "DC390: ActiveDCB != 0\n"));
@@ -141,7 +141,7 @@
 	//DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
 	pACB->SelLost++;
 	return 1;
-    };
+    }
     DC390_write8 (ScsiCmd, cmd);
     pACB->pActiveDCB = pDCB; pDCB->pActiveSRB = pSRB;
     pACB->Connected = 1;
@@ -154,18 +154,17 @@
 
 #if DMA_INT
 /* This is similar to AM53C974.c ... */
-static UCHAR 
-dc390_dma_intr (PACB pACB)
+static u8 
+dc390_dma_intr (struct dc390_acb* pACB)
 {
-  PSRB pSRB;
-  UCHAR dstate;
-  DEBUG0(USHORT pstate;PDEVDECL1);
+  struct dc390_srb* pSRB;
+  u8 dstate;
+  DEBUG0(u16 pstate; struct pci_dev *pdev = pACB->pdev);
   
-  DEBUG0(PDEVSET1);
-  DEBUG0(PCI_READ_CONFIG_WORD (PDEV, PCI_STATUS, &pstate));
+  DEBUG0(pci_read_config_word(pdev, PCI_STATUS, &pstate));
   DEBUG0(if (pstate & (PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY))\
 	{ printk(KERN_WARNING "DC390: PCI state = %04x!\n", pstate); \
-	  PCI_WRITE_CONFIG_WORD (PDEV, PCI_STATUS, (PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY));});
+	  pci_write_config_word(pdev, PCI_STATUS, (PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY));});
 
   dstate = DC390_read8 (DMA_Status); 
 
@@ -176,10 +175,10 @@
     {
 	printk (KERN_ERR "DC390: DMA error (%02x)!\n", dstate);
 	return dstate;
-    };
+    }
   if (dstate & DMA_XFER_DONE)
     {
-	UINT residual, xferCnt; int ctr = 6000000;
+	u32 residual, xferCnt; int ctr = 6000000;
 	if (! (DC390_read8 (DMA_Cmd) & READ_DIRECTION))
 	  {
 	    do
@@ -217,19 +216,18 @@
 static irqreturn_t __inline__
 DC390_Interrupt( int irq, void *dev_id, struct pt_regs *regs)
 {
-    PACB   pACB, pACB2;
-    PDCB   pDCB;
-    PSRB   pSRB;
-    UCHAR  sstatus=0;
-    UCHAR  phase;
-    void   (*stateV)( PACB, PSRB, PUCHAR );
-    UCHAR  istate, istatus;
+    struct dc390_acb *pACB, *pACB2;
+    struct dc390_dcb *pDCB;
+    struct dc390_srb *pSRB;
+    u8  sstatus=0;
+    u8  phase;
+    void   (*stateV)( struct dc390_acb*, struct dc390_srb*, u8 *);
+    u8  istate, istatus;
 #if DMA_INT
-    UCHAR  dstatus;
+    u8  dstatus;
 #endif
-    DC390_IFLAGS;
 
-    pACB = (PACB)dev_id;
+    pACB = (struct dc390_acb*)dev_id;
     for (pACB2 = dc390_pACB_start; (pACB2 && pACB2 != pACB); pACB2 = pACB2->pNextACB);
     if (!pACB2)
     {
@@ -244,23 +242,23 @@
     DEBUG1(printk (KERN_DEBUG "sstatus=%02x,", sstatus));
 
 #if DMA_INT
-    DC390_LOCK_IO(pACB->pScsiHost);
+    spin_lock_irq(pACB->pScsiHost->host_lock);
     dstatus = dc390_dma_intr (pACB);
-    DC390_UNLOCK_IO(pACB->pScsiHost);
+    spin_unlock_irq(pACB->pScsiHost->host_lock);
 
     DEBUG1(printk (KERN_DEBUG "dstatus=%02x,", dstatus));
     if (! (dstatus & SCSI_INTERRUPT))
       {
 	DEBUG0(printk (KERN_WARNING "DC390 Int w/o SCSI actions (only DMA?)\n"));
 	return IRQ_NONE;
-      };
+      }
 #else
     //DC390_write32 (DMA_ScsiBusCtrl, WRT_ERASE_DMA_STAT | EN_INT_ON_PCI_ABORT);
     //dstatus = DC390_read8 (DMA_Status);
     //DC390_write32 (DMA_ScsiBusCtrl, EN_INT_ON_PCI_ABORT);
 #endif
 
-    DC390_LOCK_IO(pACB->pScsiHost);
+    spin_lock_irq(pACB->pScsiHost->host_lock);
 
     istate = DC390_read8 (Intern_State);
     istatus = DC390_read8 (INT_Status); /* This clears Scsi_Status, Intern_State and INT_Status ! */
@@ -313,7 +311,7 @@
 	{
 		printk (KERN_ERR "DC390: Suc. op/ Serv. req: pActiveDCB = 0!\n");
 		goto unlock;
-	};
+	}
 	pSRB = pDCB->pActiveSRB;
 	if( pDCB->DCBFlag & ABORT_DEV_ )
 	  dc390_EnableMsgOut_Abort (pACB, pSRB);
@@ -324,15 +322,14 @@
 	( *stateV )( pACB, pSRB, &sstatus );
 
 	pSRB->ScsiPhase = sstatus & 7;
-	phase = (UCHAR) sstatus & 7;
+	phase = (u8) sstatus & 7;
 	DEBUG1(printk (KERN_INFO "DC390: [%i]%s(1) (%02x)\n", phase, dc390_p1_str[phase], sstatus));
 	stateV = (void *) dc390_phase1[phase];
 	( *stateV )( pACB, pSRB, &sstatus );
-	goto unlock;
     }
 
  unlock:
-    DC390_UNLOCK_IO(pACB->pScsiHost);
+    spin_unlock_irq(pACB->pScsiHost->host_lock);
     return IRQ_HANDLED;
 }
 
@@ -347,12 +344,12 @@
 }
 
 static void
-dc390_DataOut_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_DataOut_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
-    UCHAR   sstatus;
-    PSGL    psgl;
-    UINT    ResidCnt, xferCnt;
-    UCHAR   dstate = 0;
+    u8   sstatus;
+    struct scatterlist *psgl;
+    u32    ResidCnt, xferCnt;
+    u8   dstate = 0;
 
     sstatus = *psstatus;
 
@@ -363,10 +360,20 @@
 
 	if( sstatus & COUNT_2_ZERO )
 	{
-	    int ctr = 6000000; /* only try for about a second */
-	    while( --ctr && !((dstate = DC390_read8 (DMA_Status)) & DMA_XFER_DONE) && pSRB->SGToBeXferLen );
-	    if (!ctr) printk (KERN_CRIT "DC390: Deadlock in DataOut_0: DMA aborted unfinished: %06x bytes remain!!\n", DC390_read32 (DMA_Wk_ByteCntr));
-	    dc390_laststatus &= ~0xff000000; dc390_laststatus |= dstate << 24;
+	    unsigned long timeout = jiffies + HZ;
+
+	    /* Function called from the ISR with the host_lock held and interrupts disabled */
+	    if (pSRB->SGToBeXferLen)
+		while (time_before(jiffies, timeout) && !((dstate = DC390_read8 (DMA_Status)) & DMA_XFER_DONE)) {
+		    spin_unlock_irq(pACB->pScsiHost->host_lock);
+		    udelay(50);
+		    spin_lock_irq(pACB->pScsiHost->host_lock);
+		}
+	    if (!time_before(jiffies, timeout))
+		printk (KERN_CRIT "DC390: Deadlock in DataOut_0: DMA aborted unfinished: %06x bytes remain!!\n",
+			DC390_read32 (DMA_Wk_ByteCntr));
+	    dc390_laststatus &= ~0xff000000;
+	    dc390_laststatus |= dstate << 24;
 	    pSRB->TotalXferredLen += pSRB->SGToBeXferLen;
 	    pSRB->SGIndex++;
 	    if( pSRB->SGIndex < pSRB->SGcount )
@@ -382,10 +389,10 @@
 	}
 	else
 	{
-	    ResidCnt  = (UINT) DC390_read8 (Current_Fifo) & 0x1f;
-	    ResidCnt |= (UINT) DC390_read8 (CtcReg_High) << 16;
-	    ResidCnt |= (UINT) DC390_read8 (CtcReg_Mid) << 8; 
-	    ResidCnt += (UINT) DC390_read8 (CtcReg_Low);
+	    ResidCnt  = (u32) DC390_read8 (Current_Fifo) & 0x1f;
+	    ResidCnt |= (u32) DC390_read8 (CtcReg_High) << 16;
+	    ResidCnt |= (u32) DC390_read8 (CtcReg_Mid) << 8; 
+	    ResidCnt += (u32) DC390_read8 (CtcReg_Low);
 
 	    xferCnt = pSRB->SGToBeXferLen - ResidCnt;
 	    pSRB->SGBusAddr += xferCnt;
@@ -401,13 +408,13 @@
 }
 
 static void
-dc390_DataIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_DataIn_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
-    UCHAR   sstatus, residual, bval;
-    PSGL    psgl;
-    UINT    ResidCnt, i;
-    ULONG   xferCnt;
-    PUCHAR  ptr;
+    u8   sstatus, residual, bval;
+    struct scatterlist *psgl;
+    u32    ResidCnt, i;
+    unsigned long   xferCnt;
+    u8      *ptr;
 
     sstatus = *psstatus;
 
@@ -418,15 +425,26 @@
 
 	if( sstatus & COUNT_2_ZERO )
 	{
-	    int ctr = 6000000; /* only try for about a second */
 	    int dstate = 0;
-	    while( --ctr && !((dstate = DC390_read8 (DMA_Status)) & DMA_XFER_DONE) && pSRB->SGToBeXferLen );
-	    if (!ctr) printk (KERN_CRIT "DC390: Deadlock in DataIn_0: DMA aborted unfinished: %06x bytes remain!!\n", DC390_read32 (DMA_Wk_ByteCntr));
-	    if (!ctr) printk (KERN_CRIT "DC390: DataIn_0: DMA State: %i\n", dstate);
-	    dc390_laststatus &= ~0xff000000; dc390_laststatus |= dstate << 24;
-	    DEBUG1(ResidCnt = ((ULONG) DC390_read8 (CtcReg_High) << 16)	\
-		+ ((ULONG) DC390_read8 (CtcReg_Mid) << 8)		\
-		+ ((ULONG) DC390_read8 (CtcReg_Low)));
+	    unsigned long timeout = jiffies + HZ;
+
+	    /* Function called from the ISR with the host_lock held and interrupts disabled */
+	    if (pSRB->SGToBeXferLen)
+		while (time_before(jiffies, timeout) && !((dstate = DC390_read8 (DMA_Status)) & DMA_XFER_DONE)) {
+		    spin_unlock_irq(pACB->pScsiHost->host_lock);
+		    udelay(50);
+		    spin_lock_irq(pACB->pScsiHost->host_lock);
+		}
+	    if (!time_before(jiffies, timeout)) {
+		printk (KERN_CRIT "DC390: Deadlock in DataIn_0: DMA aborted unfinished: %06x bytes remain!!\n",
+			DC390_read32 (DMA_Wk_ByteCntr));
+		printk (KERN_CRIT "DC390: DataIn_0: DMA State: %i\n", dstate);
+	    }
+	    dc390_laststatus &= ~0xff000000;
+	    dc390_laststatus |= dstate << 24;
+	    DEBUG1(ResidCnt = ((unsigned long) DC390_read8 (CtcReg_High) << 16)	\
+		+ ((unsigned long) DC390_read8 (CtcReg_Mid) << 8)		\
+		+ ((unsigned long) DC390_read8 (CtcReg_Low)));
 	    DEBUG1(printk (KERN_DEBUG "Count_2_Zero (ResidCnt=%i,ToBeXfer=%li),", ResidCnt, pSRB->SGToBeXferLen));
 
 	    DC390_write8 (DMA_Cmd, READ_DIRECTION+DMA_IDLE_CMD); /* | DMA_INT */
@@ -482,11 +500,11 @@
 	    dc390_laststatus &= ~0xff000000; dc390_laststatus |= bval << 24;
 
 	    DEBUG1(printk (KERN_DEBUG "Blast: Read %i times DMA_Status %02x", 0xa000-i, bval));
-	    ResidCnt = (UINT) DC390_read8 (CtcReg_High);
+	    ResidCnt = (u32) DC390_read8 (CtcReg_High);
 	    ResidCnt <<= 8;
-	    ResidCnt |= (UINT) DC390_read8 (CtcReg_Mid);
+	    ResidCnt |= (u32) DC390_read8 (CtcReg_Mid);
 	    ResidCnt <<= 8;
-	    ResidCnt |= (UINT) DC390_read8 (CtcReg_Low);
+	    ResidCnt |= (u32) DC390_read8 (CtcReg_Low);
 
 	    xferCnt = pSRB->SGToBeXferLen - ResidCnt;
 	    pSRB->SGBusAddr += xferCnt;
@@ -496,7 +514,7 @@
 	    if( residual )
 	    {
 		bval = DC390_read8 (ScsiFifo);	    /* get one residual byte */
-		ptr = (PUCHAR) bus_to_virt( pSRB->SGBusAddr );
+		ptr = (u8 *) bus_to_virt( pSRB->SGBusAddr );
 		*ptr = bval;
 		pSRB->SGBusAddr++; xferCnt++;
 		pSRB->TotalXferredLen++;
@@ -515,12 +533,12 @@
 }
 
 static void
-dc390_Command_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_Command_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
 }
 
 static void
-dc390_Status_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_Status_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
 
     pSRB->TargetStatus = DC390_read8 (ScsiFifo);
@@ -533,7 +551,7 @@
 }
 
 static void
-dc390_MsgOut_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_MsgOut_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
     if( pSRB->SRBState & (SRB_UNEXPECT_RESEL+SRB_ABORT_SENT) )
 	*psstatus = SCSI_NOP0;
@@ -542,33 +560,33 @@
 
 
 static void __inline__
-dc390_reprog (PACB pACB, PDCB pDCB)
+dc390_reprog (struct dc390_acb* pACB, struct dc390_dcb* pDCB)
 {
   DC390_write8 (Sync_Period, pDCB->SyncPeriod);
   DC390_write8 (Sync_Offset, pDCB->SyncOffset);
   DC390_write8 (CtrlReg3, pDCB->CtrlR3);
   DC390_write8 (CtrlReg4, pDCB->CtrlR4);
   dc390_SetXferRate (pACB, pDCB);
-};
+}
 
 
 #ifdef DC390_DEBUG0
 static void
-dc390_printMsg (UCHAR *MsgBuf, UCHAR len)
+dc390_printMsg (u8 *MsgBuf, u8 len)
 {
   int i;
   printk (" %02x", MsgBuf[0]);
   for (i = 1; i < len; i++)
     printk (" %02x", MsgBuf[i]);
   printk ("\n");
-};
+}
 #endif
 
 #define DC390_ENABLE_MSGOUT DC390_write8 (ScsiCmd, SET_ATN_CMD)
 
 /* reject_msg */
 static void __inline__
-dc390_MsgIn_reject (PACB pACB, PSRB pSRB)
+dc390_MsgIn_reject (struct dc390_acb* pACB, struct dc390_srb* pSRB)
 {
   pSRB->MsgOutBuf[0] = MESSAGE_REJECT;
   pSRB->MsgCnt = 1; DC390_ENABLE_MSGOUT;
@@ -577,18 +595,18 @@
 
 /* abort command */
 static void __inline__
-dc390_EnableMsgOut_Abort ( PACB pACB, PSRB pSRB )
+dc390_EnableMsgOut_Abort ( struct dc390_acb* pACB, struct dc390_srb* pSRB )
 {
     pSRB->MsgOutBuf[0] = ABORT; 
     pSRB->MsgCnt = 1; DC390_ENABLE_MSGOUT;
     pSRB->pSRBDCB->DCBFlag &= ~ABORT_DEV_;
 }
 
-static PSRB
-dc390_MsgIn_QTag (PACB pACB, PDCB pDCB, UCHAR tag)
+static struct dc390_srb*
+dc390_MsgIn_QTag (struct dc390_acb* pACB, struct dc390_dcb* pDCB, u8 tag)
 {
-  PSRB lastSRB = pDCB->pGoingLast;
-  PSRB pSRB = pDCB->pGoingSRB;
+  struct dc390_srb* lastSRB = pDCB->pGoingLast;
+  struct dc390_srb* pSRB = pDCB->pGoingSRB;
 
   if (pSRB)
     {
@@ -626,9 +644,9 @@
 
 /* set async transfer mode */
 static void 
-dc390_MsgIn_set_async (PACB pACB, PSRB pSRB)
+dc390_MsgIn_set_async (struct dc390_acb* pACB, struct dc390_srb* pSRB)
 {
-  PDCB pDCB = pSRB->pSRBDCB;
+  struct dc390_dcb* pDCB = pSRB->pSRBDCB;
   if (!(pSRB->SRBState & DO_SYNC_NEGO)) 
     printk (KERN_INFO "DC390: Target %i initiates Non-Sync?\n", pDCB->TargetID);
   pSRB->SRBState &= ~DO_SYNC_NEGO;
@@ -644,13 +662,13 @@
 
 /* set sync transfer mode */
 static void
-dc390_MsgIn_set_sync (PACB pACB, PSRB pSRB)
+dc390_MsgIn_set_sync (struct dc390_acb* pACB, struct dc390_srb* pSRB)
 {
-  UCHAR bval;
-  USHORT wval, wval1;
-  PDCB pDCB = pSRB->pSRBDCB;
-  UCHAR oldsyncperiod = pDCB->SyncPeriod;
-  UCHAR oldsyncoffset = pDCB->SyncOffset;
+  u8 bval;
+  u16 wval, wval1;
+  struct dc390_dcb* pDCB = pSRB->pSRBDCB;
+  u8 oldsyncperiod = pDCB->SyncPeriod;
+  u8 oldsyncoffset = pDCB->SyncOffset;
   
   if (!(pSRB->SRBState & DO_SYNC_NEGO))
     {
@@ -671,11 +689,11 @@
 	{
 	  printk (KERN_INFO "DC390: Set sync nego period to %ins\n", pDCB->NegoPeriod << 2);
 	  pSRB->MsgInBuf[3] = pDCB->NegoPeriod;
-	};
+	}
       memcpy (pSRB->MsgOutBuf, pSRB->MsgInBuf, 5);
       pSRB->MsgCnt = 5;
       DC390_ENABLE_MSGOUT;
-    };
+    }
 
   pSRB->SRBState &= ~DO_SYNC_NEGO;
   pDCB->SyncMode |= SYNC_ENABLE+SYNC_NEGO_DONE;
@@ -683,7 +701,7 @@
   pDCB->SyncOffset |= pSRB->MsgInBuf[4];
   pDCB->NegoPeriod = pSRB->MsgInBuf[3];
 
-  wval = (USHORT) pSRB->MsgInBuf[3];
+  wval = (u16) pSRB->MsgInBuf[3];
   wval = wval << 2; wval -= 3; wval1 = wval / 25;	/* compute speed */
   if( (wval1 * 25) != wval) wval1++;
   bval = FAST_CLK+FAST_SCSI;	/* fast clock / fast scsi */
@@ -703,7 +721,7 @@
     }
 
   pDCB->CtrlR3 = bval;
-  pDCB->SyncPeriod = (UCHAR)wval1;
+  pDCB->SyncPeriod = (u8)wval1;
   
   if ((oldsyncperiod != wval1 || oldsyncoffset != pDCB->SyncOffset) && pDCB->TargetLUN == 0)
     {
@@ -713,26 +731,26 @@
     }
   
   dc390_reprog (pACB, pDCB);
-};
+}
 
 
 /* handle RESTORE_PTR */
 /* I presume, this command is already mapped, so, have to remap. */
 static void 
-dc390_restore_ptr (PACB pACB, PSRB pSRB)
+dc390_restore_ptr (struct dc390_acb* pACB, struct dc390_srb* pSRB)
 {
-    Scsi_Cmnd* pcmd = pSRB->pcmd;
-    PSGL psgl;
+    struct scsi_cmnd *pcmd = pSRB->pcmd;
+    struct scatterlist *psgl;
     pSRB->TotalXferredLen = 0;
     pSRB->SGIndex = 0;
     if (pcmd->use_sg) {
-	pSRB->pSegmentList = (PSGL) pcmd->request_buffer;
+	pSRB->pSegmentList = (struct scatterlist *)pcmd->request_buffer;
 	psgl = pSRB->pSegmentList;
 	//dc390_pci_sync(pSRB);
 
-	while (pSRB->TotalXferredLen + (ULONG) sg_dma_len(psgl) < pSRB->Saved_Ptr)
+	while (pSRB->TotalXferredLen + (unsigned long) sg_dma_len(psgl) < pSRB->Saved_Ptr)
 	{
-	    pSRB->TotalXferredLen += (ULONG) sg_dma_len(psgl);
+	    pSRB->TotalXferredLen += (unsigned long) sg_dma_len(psgl);
 	    pSRB->SGIndex++;
 	    if( pSRB->SGIndex < pSRB->SGcount )
 	    {
@@ -754,14 +772,14 @@
 
 	sg_dma_len(&pSRB->Segmentx) = pcmd->request_bufflen - pSRB->Saved_Ptr;
 	pSRB->SGcount = 1;
-	pSRB->pSegmentList = (PSGL) &pSRB->Segmentx;
+	pSRB->pSegmentList = (struct scatterlist *) &pSRB->Segmentx;
     } else {
 	 pSRB->SGcount = 0;
 	 printk (KERN_INFO "DC390: RESTORE_PTR message for Transfer without Scatter-Gather ??\n");
     }
 
   pSRB->TotalXferredLen = pSRB->Saved_Ptr;
-};
+}
 
 
 /* According to the docs, the AM53C974 reads the message and 
@@ -773,8 +791,8 @@
 /* The old implementation was correct. Sigh! */
 
 /* Check if the message is complete */
-static UCHAR __inline__
-dc390_MsgIn_complete (UCHAR *msgbuf, UINT len)
+static u8 __inline__
+dc390_MsgIn_complete (u8 *msgbuf, u32 len)
 { 
   if (*msgbuf == EXTENDED_MESSAGE)
   {
@@ -789,10 +807,10 @@
 
 
 /* read and eval received messages */
-void
-dc390_MsgIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+static void
+dc390_MsgIn_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
-    PDCB   pDCB = pACB->pActiveDCB;
+    struct dc390_dcb*   pDCB = pACB->pActiveDCB;
 
     /* Read the msg */
 
@@ -832,12 +850,12 @@
 		  dc390_MsgIn_set_async (pACB, pSRB);
 		else
 		  dc390_MsgIn_set_sync (pACB, pSRB);
-	      };
+	      }
 	    
 	    // nothing has to be done
 	  case COMMAND_COMPLETE: break;
 	    
-	    // SAVE POINTER may be ignored as we have the PSRB associated with the
+	    // SAVE POINTER may be ignored as we have the struct dc390_srb* associated with the
 	    // scsi command. Thanks, Gerard, for pointing it out.
 	  case SAVE_POINTERS: 
 	    pSRB->Saved_Ptr = pSRB->TotalXferredLen;
@@ -864,11 +882,11 @@
 
 
 static void
-dc390_DataIO_Comm( PACB pACB, PSRB pSRB, UCHAR ioDir)
+dc390_DataIO_Comm( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 ioDir)
 {
-    PSGL   psgl;
-    ULONG  lval;
-    PDCB   pDCB = pACB->pActiveDCB;
+    struct scatterlist *psgl;
+    unsigned long  lval;
+    struct dc390_dcb*   pDCB = pACB->pActiveDCB;
 
     if (pSRB == pACB->pTmpSRB)
     {
@@ -894,11 +912,11 @@
 	}
 	lval = pSRB->SGToBeXferLen;
 	DEBUG1(printk (KERN_DEBUG " DC390: Start transfer: %li bytes (address %08lx)\n", lval, pSRB->SGBusAddr));
-	DC390_write8 (CtcReg_Low, (UCHAR) lval);
+	DC390_write8 (CtcReg_Low, (u8) lval);
 	lval >>= 8;
-	DC390_write8 (CtcReg_Mid, (UCHAR) lval);
+	DC390_write8 (CtcReg_Mid, (u8) lval);
 	lval >>= 8;
-	DC390_write8 (CtcReg_High, (UCHAR) lval);
+	DC390_write8 (CtcReg_High, (u8) lval);
 
 	DC390_write32 (DMA_XferCnt, pSRB->SGToBeXferLen);
 	DC390_write32 (DMA_XferAddr, pSRB->SGBusAddr);
@@ -937,36 +955,36 @@
 
 
 static void
-dc390_DataOutPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_DataOutPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
     dc390_DataIO_Comm (pACB, pSRB, WRITE_DIRECTION);
 }
 
 static void
-dc390_DataInPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_DataInPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
     dc390_DataIO_Comm (pACB, pSRB, READ_DIRECTION);
 }
 
-void
-dc390_CommandPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+static void
+dc390_CommandPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
-    PDCB   pDCB;
-    UCHAR  i, cnt;
-    PUCHAR ptr;
+    struct dc390_dcb*   pDCB;
+    u8  i, cnt;
+    u8     *ptr;
 
     DC390_write8 (ScsiCmd, RESET_ATN_CMD);
     DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
     if( !(pSRB->SRBFlag & AUTO_REQSENSE) )
     {
-	cnt = (UCHAR) pSRB->pcmd->cmd_len;
-	ptr = (PUCHAR) pSRB->pcmd->cmnd;
+	cnt = (u8) pSRB->pcmd->cmd_len;
+	ptr = (u8 *) pSRB->pcmd->cmnd;
 	for(i=0; i < cnt; i++)
 	    DC390_write8 (ScsiFifo, *(ptr++));
     }
     else
     {
-	UCHAR bval = 0;
+	u8 bval = 0;
 	DC390_write8 (ScsiFifo, REQUEST_SENSE);
 	pDCB = pACB->pActiveDCB;
 	DC390_write8 (ScsiFifo, pDCB->TargetLUN << 5);
@@ -981,7 +999,7 @@
 }
 
 static void
-dc390_StatusPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_StatusPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
     DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
     pSRB->SRBState = SRB_STATUS;
@@ -989,12 +1007,12 @@
     //DC390_write8 (DMA_Cmd, DMA_IDLE_CMD);
 }
 
-void
-dc390_MsgOutPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+static void
+dc390_MsgOutPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
-    UCHAR   bval, i, cnt;
-    PUCHAR  ptr;
-    PDCB    pDCB;
+    u8   bval, i, cnt;
+    u8     *ptr;
+    struct dc390_dcb*    pDCB;
 
     DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
     pDCB = pACB->pActiveDCB;
@@ -1003,7 +1021,7 @@
 	cnt = pSRB->MsgCnt;
 	if( cnt )
 	{
-	    ptr = (PUCHAR) pSRB->MsgOutBuf;
+	    ptr = (u8 *) pSRB->MsgOutBuf;
 	    for(i=0; i < cnt; i++)
 		DC390_write8 (ScsiFifo, *(ptr++));
 	    pSRB->MsgCnt = 0;
@@ -1043,7 +1061,7 @@
 }
 
 static void
-dc390_MsgInPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_MsgInPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
     DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
     if( !(pSRB->SRBState & SRB_MSGIN) )
@@ -1056,21 +1074,21 @@
 }
 
 static void
-dc390_Nop_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_Nop_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
 }
 
 static void
-dc390_Nop_1( PACB pACB, PSRB pSRB, PUCHAR psstatus)
+dc390_Nop_1( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
 {
 }
 
 
 static void
-dc390_SetXferRate( PACB pACB, PDCB pDCB )
+dc390_SetXferRate( struct dc390_acb* pACB, struct dc390_dcb* pDCB )
 {
-    UCHAR  bval, i, cnt;
-    PDCB   ptr;
+    u8  bval, i, cnt;
+    struct dc390_dcb*   ptr;
 
     if( !(pDCB->TargetLUN) )
     {
@@ -1097,12 +1115,12 @@
 }
 
 
-void
-dc390_Disconnect( PACB pACB )
+static void
+dc390_Disconnect( struct dc390_acb* pACB )
 {
-    PDCB   pDCB;
-    PSRB   pSRB, psrb;
-    UCHAR  i, cnt;
+    struct dc390_dcb *pDCB;
+    struct dc390_srb *pSRB, *psrb;
+    u8  i, cnt;
 
     DEBUG0(printk(KERN_INFO "DISC,"));
 
@@ -1111,10 +1129,9 @@
     pDCB = pACB->pActiveDCB;
     if (!pDCB)
      {
-	int j = 400;
 	DEBUG0(printk(KERN_ERR "ACB:%p->ActiveDCB:%p IOPort:%04x IRQ:%02x !\n",\
 	       pACB, pDCB, pACB->IOPortBase, pACB->IRQLevel));
-	while (--j) udelay (1000);
+	mdelay(400);
 	DC390_read8 (INT_Status);	/* Reset Pending INT */
 	DC390_write8 (ScsiCmd, EN_SEL_RESEL);
 	return;
@@ -1179,12 +1196,12 @@
 }
 
 
-void
-dc390_Reselect( PACB pACB )
+static void
+dc390_Reselect( struct dc390_acb* pACB )
 {
-    PDCB   pDCB;
-    PSRB   pSRB;
-    UCHAR  id, lun;
+    struct dc390_dcb*   pDCB;
+    struct dc390_srb*   pSRB;
+    u8  id, lun;
 
     DEBUG0(printk(KERN_INFO "RSEL,"));
     pACB->Connected = 1;
@@ -1265,60 +1282,19 @@
     DC390_write8 (ScsiCmd, MSG_ACCEPTED_CMD);	/* ;to release the /ACK signal */
 }
 
-
-static void 
-dc390_remove_dev (PACB pACB, PDCB pDCB)
-{
-   PDCB pPrevDCB = pACB->pLinkDCB;
-
-   if (pDCB->GoingSRBCnt > 1)
-     {
-	DCBDEBUG(printk (KERN_INFO "DC390: Driver won't free DCB (ID %i, LUN %i): 0x%08x because of SRBCnt %i\n",\
-		pDCB->TargetID, pDCB->TargetLUN, (int)pDCB, pDCB->GoingSRBCnt));
-	return;
-     };
-   pACB->DCBmap[pDCB->TargetID] &= ~(1 << pDCB->TargetLUN);
-   
-   // The first one
-   if (pDCB == pACB->pLinkDCB) 
-   {
-	// The last one
-	if (pACB->pLastDCB == pDCB) {
-		pDCB->pNextDCB = 0; pACB->pLastDCB = 0;
-	}
-	pACB->pLinkDCB = pDCB->pNextDCB;
-   }
-   else
-   {
-	while (pPrevDCB->pNextDCB != pDCB) pPrevDCB = pPrevDCB->pNextDCB;
-	pPrevDCB->pNextDCB = pDCB->pNextDCB;
-	if (pDCB == pACB->pLastDCB) pACB->pLastDCB = pPrevDCB;
-   }
-
-   DCBDEBUG(printk (KERN_INFO "DC390: Driver about to free DCB (ID %i, LUN %i): %p\n",\
-	   pDCB->TargetID, pDCB->TargetLUN, pDCB));
-   if (pDCB == pACB->pActiveDCB) pACB->pActiveDCB = 0;
-   if (pDCB == pACB->pLinkDCB) pACB->pLinkDCB = pDCB->pNextDCB;
-   if (pDCB == pACB->pDCBRunRobin) pACB->pDCBRunRobin = pDCB->pNextDCB;
-   kfree (pDCB); 
-   pACB->DCBCnt--;
-   /* pACB->DeviceCnt--; */
-};
-
-
-static UCHAR __inline__
+static u8 __inline__
 dc390_tagq_blacklist (char* name)
 {
-   UCHAR i;
+   u8 i;
    for(i=0; i<BADDEVCNT; i++)
      if (memcmp (name, dc390_baddevname1[i], 28) == 0)
 	return 1;
    return 0;
-};
+}
    
 
 static void 
-dc390_disc_tagq_set (PDCB pDCB, PSCSI_INQDATA ptr)
+dc390_disc_tagq_set (struct dc390_dcb* pDCB, PSCSI_INQDATA ptr)
 {
    /* Check for SCSI format (ANSI and Response data format) */
    if ( (ptr->Vers & 0x07) >= 2 || (ptr->RDF & 0x0F) == 2 )
@@ -1336,37 +1312,38 @@
 	else
 	     pDCB->MaxCommand = 1;
      }
-};
+}
 
 
 static void 
-dc390_add_dev (PACB pACB, PDCB pDCB, PSCSI_INQDATA ptr)
+dc390_add_dev (struct dc390_acb* pACB, struct dc390_dcb* pDCB, PSCSI_INQDATA ptr)
 {
-   UCHAR bval1 = ptr->DevType & SCSI_DEVTYPE;
+   u8 bval1 = ptr->DevType & SCSI_DEVTYPE;
    pDCB->DevType = bval1;
    /* if (bval1 == TYPE_DISK || bval1 == TYPE_MOD) */
 	dc390_disc_tagq_set (pDCB, ptr);
-};
+}
 
 
-void
-dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB )
+static void
+dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB )
 {
-    UCHAR  bval, status, i, DCB_removed;
-    PSCSICMD pcmd;
+    u8  bval, status, i;
+    struct scsi_cmnd *pcmd;
     PSCSI_INQDATA  ptr;
-    PSGL   ptr2;
-    ULONG  swlval;
+    struct scatterlist *ptr2;
+    unsigned long  swlval;
 
     pcmd = pSRB->pcmd;
     /* KG: Moved pci_unmap here */
     dc390_pci_unmap(pSRB);
 
-    DCB_removed = 0;
     status = pSRB->TargetStatus;
-    ptr = (PSCSI_INQDATA) (pcmd->request_buffer);
-    if( pcmd->use_sg )
-	ptr = (PSCSI_INQDATA) sg_dma_address((PSGL) ptr);
+    if (pcmd->use_sg) {
+	    ptr2 = (struct scatterlist *) (pcmd->request_buffer);
+	    ptr = (PSCSI_INQDATA) (page_address(ptr2->page) + ptr2->offset);
+    } else
+	    ptr = (PSCSI_INQDATA) (pcmd->request_buffer);
 	
     DEBUG0(printk (" SRBdone (%02x,%08x), SRB %p, pid %li\n", status, pcmd->result,\
 		pSRB, pcmd->pid));
@@ -1403,7 +1380,7 @@
 	}
 	if(pSRB->RetryCnt == 0)
 	{
-	    //(UINT)(pSRB->pcmd->cmnd[0]) = pSRB->Segment0[0];
+	    //(u32)(pSRB->pcmd->cmnd[0]) = pSRB->Segment0[0];
 	    pSRB->TotalXferredLen = pSRB->SavedTotXLen;
 	    if( (pSRB->TotalXferredLen) &&
 		(pSRB->TotalXferredLen >= pcmd->underflow) )
@@ -1411,7 +1388,7 @@
 	    else
 		  pcmd->result = MK_RES_LNX(DRIVER_SENSE,DID_OK,0,CHECK_CONDITION);
 		  REMOVABLEDEBUG(printk(KERN_INFO "Cmd=%02x,Result=%08x,XferL=%08x\n",pSRB->pcmd->cmnd[0],\
-			(UINT) pcmd->result, (UINT) pSRB->TotalXferredLen));
+			(u32) pcmd->result, (u32) pSRB->TotalXferredLen));
 	    goto ckc_e;
 	}
 	else /* Retry */
@@ -1419,19 +1396,17 @@
 	    pSRB->RetryCnt--;
 	    pSRB->AdaptStatus = 0;
 	    pSRB->TargetStatus = 0;
-	    //*((PUINT) &(pSRB->CmdBlock[0])) = pSRB->Segment0[0];
-	    //*((PUINT) &(pSRB->CmdBlock[4])) = pSRB->Segment0[1];
 	    /* Don't retry on TEST_UNIT_READY */
 	    if( pSRB->pcmd->cmnd[0] == TEST_UNIT_READY /* || pSRB->pcmd->cmnd[0] == START_STOP */)
 	    {
 		pcmd->result = MK_RES_LNX(DRIVER_SENSE,DID_OK,0,CHECK_CONDITION);
 		REMOVABLEDEBUG(printk(KERN_INFO "Cmd=%02x, Result=%08x, XferL=%08x\n",pSRB->pcmd->cmnd[0],\
-		       (UINT) pcmd->result, (UINT) pSRB->TotalXferredLen));
+		       (u32) pcmd->result, (u32) pSRB->TotalXferredLen));
 		goto ckc_e;
 	    }
 	    SET_RES_DRV(pcmd->result,DRIVER_SENSE);
 	    pcmd->use_sg	 = pSRB->SavedSGCount;
-	    //pSRB->ScsiCmdLen	 = (UCHAR) (pSRB->Segment1[0] >> 8);
+	    //pSRB->ScsiCmdLen	 = (u8) (pSRB->Segment1[0] >> 8);
 	    DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
 	    pSRB->SGIndex = 0;
 	    pSRB->TotalXferredLen = 0;
@@ -1461,14 +1436,14 @@
 		    ptr2++;
 		}
 		REMOVABLEDEBUG(printk(KERN_INFO "XferredLen=%08x,NotXferLen=%08x\n",\
-			(UINT) pSRB->TotalXferredLen, (UINT) swlval));
+			(u32) pSRB->TotalXferredLen, (u32) swlval));
 	    }
 	    dc390_RequestSense( pACB, pDCB, pSRB );
 	    return;
 	}
 	else if( status_byte(status) == QUEUE_FULL )
 	{
-	    bval = (UCHAR) pDCB->GoingSRBCnt;
+	    bval = (u8) pDCB->GoingSRBCnt;
 	    bval--;
 	    pDCB->MaxCommand = bval;
 	    dc390_freetag (pDCB, pSRB);
@@ -1564,55 +1539,22 @@
 				   pcmd->sense_buffer[2], pcmd->sense_buffer[3]);
 	    else printk ("\n");
 #endif
-	    if( (host_byte(pcmd->result) != DID_OK && !(status_byte(pcmd->result) & CHECK_CONDITION) && !(status_byte(pcmd->result) & BUSY)) ||
-	       ((driver_byte(pcmd->result) & DRIVER_SENSE) && (pcmd->sense_buffer[0] & 0x70) == 0x70 &&
-		(pcmd->sense_buffer[2] & 0xf) == ILLEGAL_REQUEST) || host_byte(pcmd->result) & DID_ERROR )
-	    {
-	       /* device not present: remove */ 
-	       //dc390_Going_remove (pDCB, pSRB);
-	       dc390_remove_dev (pACB, pDCB); DCB_removed = 1;
-	       
-	       if( (pcmd->device->id == pACB->pScsiHost->max_id - 1) &&
-		  ((pcmd->device->lun == 0) || (pcmd->device->lun == pACB->pScsiHost->max_lun - 1)) )
-		 pACB->scan_devices = 0;
-	    }
-	    else
-	    {
-	        /* device present: add */
-		if( (pcmd->device->id == pACB->pScsiHost->max_id - 1) && 
-		    (pcmd->device->lun == pACB->pScsiHost->max_lun - 1) )
-		    pACB->scan_devices = END_SCAN ;
-	        /* pACB->DeviceCnt++; */ /* Dev is added on INQUIRY */
-	    }
 	}
     }
-   
-    //if( pSRB->pcmd->cmnd[0] == INQUIRY && 
-    //  (host_byte(pcmd->result) == DID_OK || status_byte(pcmd->result) & CHECK_CONDITION) )
+
     if( pcmd->cmnd[0] == INQUIRY && 
 	(pcmd->result == (DID_OK << 16) || status_byte(pcmd->result) & CHECK_CONDITION) )
      {
-	if ((ptr->DevType & SCSI_DEVTYPE) == TYPE_NODEV && !DCB_removed)
-	  {
-	     //printk ("DC390: Type = nodev! (%02i-%i)\n", pcmd->target, pcmd->lun);
-	     /* device not present: remove */
-	     //dc390_Going_remove (pDCB, pSRB);
-	     dc390_remove_dev (pACB, pDCB); DCB_removed = 1;
-	  }
-	else
+	if ((ptr->DevType & SCSI_DEVTYPE) != TYPE_NODEV)
 	  {
 	     /* device found: add */ 
 	     dc390_add_dev (pACB, pDCB, ptr);
-	     if (pACB->scan_devices) pACB->DeviceCnt++;
 	  }
-	if( (pcmd->device->id == pACB->pScsiHost->max_id - 1) &&
-	    (pcmd->device->lun == pACB->pScsiHost->max_lun - 1) )
-	  pACB->scan_devices = 0;
-     };
+     }
 
     pcmd->resid = pcmd->request_bufflen - pSRB->TotalXferredLen;
 
-    if (!DCB_removed) dc390_Going_remove (pDCB, pSRB);
+    dc390_Going_remove (pDCB, pSRB);
     /* Add to free list */
     dc390_Free_insert (pACB, pSRB);
 
@@ -1625,13 +1567,13 @@
 
 
 /* Remove all SRBs from Going list and inform midlevel */
-void
-dc390_DoingSRB_Done( PACB pACB, PSCSICMD cmd )
+static void
+dc390_DoingSRB_Done(struct dc390_acb* pACB, struct scsi_cmnd *cmd)
 {
-    PDCB   pDCB, pdcb;
-    PSRB   psrb, psrb2;
-    UCHAR  i;
-    PSCSICMD pcmd;
+    struct dc390_dcb *pDCB, *pdcb;
+    struct dc390_srb *psrb, *psrb2;
+    u8  i;
+    struct scsi_cmnd *pcmd;
 
     pDCB = pACB->pLinkDCB;
     pdcb = pDCB;
@@ -1667,7 +1609,7 @@
 
 
 static void
-dc390_ResetSCSIBus( PACB pACB )
+dc390_ResetSCSIBus( struct dc390_acb* pACB )
 {
     //DC390_write8 (ScsiCmd, RST_DEVICE_CMD);
     //udelay (250);
@@ -1682,7 +1624,7 @@
 }
 
 static void
-dc390_ScsiRstDetect( PACB pACB )
+dc390_ScsiRstDetect( struct dc390_acb* pACB )
 {
     printk ("DC390: Rst_Detect: laststat = %08x\n", dc390_laststatus);
     //DEBUG0(printk(KERN_INFO "RST_DETECT,"));
@@ -1715,9 +1657,9 @@
 
 
 static void __inline__
-dc390_RequestSense( PACB pACB, PDCB pDCB, PSRB pSRB )
+dc390_RequestSense( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB )
 {
-    PSCSICMD  pcmd;
+    struct scsi_cmnd *pcmd;
 
     pcmd = pSRB->pcmd;
 
@@ -1725,9 +1667,9 @@
 	    pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN));
 
     pSRB->SRBFlag |= AUTO_REQSENSE;
-    //pSRB->Segment0[0] = (UINT) pSRB->CmdBlock[0];
-    //pSRB->Segment0[1] = (UINT) pSRB->CmdBlock[4];
-    //pSRB->Segment1[0] = ((UINT)(pcmd->cmd_len) << 8) + pSRB->SGcount;
+    //pSRB->Segment0[0] = (u32) pSRB->CmdBlock[0];
+    //pSRB->Segment0[1] = (u32) pSRB->CmdBlock[4];
+    //pSRB->Segment1[0] = ((u32)(pcmd->cmd_len) << 8) + pSRB->SGcount;
     //pSRB->Segment1[1] = pSRB->TotalXferredLen;
     pSRB->SavedSGCount = pcmd->use_sg;
     pSRB->SavedTotXLen = pSRB->TotalXferredLen;
@@ -1740,8 +1682,8 @@
 
     //pSRB->CmdBlock[0] = REQUEST_SENSE;
     //pSRB->CmdBlock[1] = pDCB->TargetLUN << 5;
-    //(USHORT) pSRB->CmdBlock[2] = 0;
-    //(USHORT) pSRB->CmdBlock[4] = sizeof(pcmd->sense_buffer);
+    //(u16) pSRB->CmdBlock[2] = 0;
+    //(u16) pSRB->CmdBlock[4] = sizeof(pcmd->sense_buffer);
     //pSRB->ScsiCmdLen = 6;
 
     pSRB->TotalXferredLen = 0;
@@ -1755,9 +1697,8 @@
 
 
 static void __inline__
-dc390_InvalidCmd( PACB pACB )
+dc390_InvalidCmd( struct dc390_acb* pACB )
 {
     if( pACB->pActiveDCB->pActiveSRB->SRBState & (SRB_START_+SRB_MSGOUT) )
 	DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
 }
-
--- diff/drivers/scsi/sd.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sd.c	2004-07-01 21:32:44.000000000 +0100
@@ -44,18 +44,20 @@
 #include <linux/errno.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
-#include <linux/reboot.h>
-#include <linux/vmalloc.h>
 #include <linux/blkdev.h>
 #include <linux/blkpg.h>
 #include <linux/kref.h>
 #include <asm/uaccess.h>
 
-#include "scsi.h"
-#include "hosts.h"
-
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_driver.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
+#include <scsi/scsi_request.h>
 #include <scsi/scsicam.h>
 
 #include "scsi_logging.h"
@@ -111,6 +113,7 @@
 static void sd_shutdown(struct device *dev);
 static void sd_rescan(struct device *);
 static int sd_init_command(struct scsi_cmnd *);
+static int sd_issue_flush(struct device *, sector_t *);
 static void sd_read_capacity(struct scsi_disk *sdkp, char *diskname,
 		 struct scsi_request *SRpnt, unsigned char *buffer);
 
@@ -124,6 +127,7 @@
 	},
 	.rescan			= sd_rescan,
 	.init_command		= sd_init_command,
+	.issue_flush		= sd_issue_flush,
 };
 
 /* Device no to disk mapping:
@@ -674,6 +678,62 @@
 	return 1;
 }
 
+static int sd_sync_cache(struct scsi_device *sdp)
+{
+	struct scsi_request *sreq;
+	int retries, res;
+
+	if (!scsi_device_online(sdp))
+		return -ENODEV;
+
+	sreq = scsi_allocate_request(sdp, GFP_KERNEL);
+	if (!sreq) {
+		printk("FAILED\n  No memory for request\n");
+		return -ENOMEM;
+	}
+
+	sreq->sr_data_direction = DMA_NONE;
+	for (retries = 3; retries > 0; --retries) {
+		unsigned char cmd[10] = { 0 };
+
+		cmd[0] = SYNCHRONIZE_CACHE;
+		/*
+		 * Leave the rest of the command zero to indicate
+		 * flush everything.
+		 */
+		scsi_wait_req(sreq, cmd, NULL, 0, SD_TIMEOUT, SD_MAX_RETRIES);
+		if (sreq->sr_result == 0)
+			break;
+	}
+
+	res = sreq->sr_result;
+	if (res) {
+		printk(KERN_WARNING "FAILED\n  status = %x, message = %02x, "
+				    "host = %d, driver = %02x\n  ",
+				    status_byte(res), msg_byte(res),
+				    host_byte(res), driver_byte(res));
+			if (driver_byte(res) & DRIVER_SENSE)
+				scsi_print_req_sense("sd", sreq);
+	}
+
+	scsi_release_request(sreq);
+	return res;
+}
+
+static int sd_issue_flush(struct device *dev, sector_t *error_sector)
+{
+	struct scsi_device *sdp = to_scsi_device(dev);
+	struct scsi_disk *sdkp = dev_get_drvdata(dev);
+
+	if (!sdkp)
+               return -ENODEV;
+
+	if (!sdkp->WCE)
+		return 0;
+
+	return sd_sync_cache(sdp);
+}
+
 static void sd_rescan(struct device *dev)
 {
 	struct scsi_disk *sdkp = dev_get_drvdata(dev);
@@ -763,13 +823,13 @@
 				good_bytes = 0;
 			break;
 
-		case RECOVERED_ERROR:
+		case RECOVERED_ERROR: /* an error occurred, but it recovered */
+		case NO_SENSE: /* LLDD got sense data */
 			/*
-			 * An error occurred, but it recovered.  Inform the
-			 * user, but make sure that it's not treated as a
-			 * hard error.
+			 * Inform the user, but make sure that it's not treated
+			 * as a hard error.
 			 */
-			print_sense("sd", SCpnt);
+			scsi_print_sense("sd", SCpnt);
 			SCpnt->result = 0;
 			SCpnt->sense_buffer[0] = 0x0;
 			good_bytes = this_count;
@@ -918,7 +978,7 @@
 			 * probably pointless to loop */
 			if(!spintime) {
 				printk(KERN_NOTICE "%s: Unit Not Ready, sense:\n", diskname);
-				print_req_sense("", SRpnt);
+				scsi_print_req_sense("", SRpnt);
 			}
 			break;
 		}
@@ -987,7 +1047,7 @@
 		       driver_byte(the_result));
 
 		if (driver_byte(the_result) & DRIVER_SENSE)
-			print_req_sense("sd", SRpnt);
+			scsi_print_req_sense("sd", SRpnt);
 		else
 			printk("%s : sense not available. \n", diskname);
 
@@ -1501,52 +1561,17 @@
 static void sd_shutdown(struct device *dev)
 {
 	struct scsi_device *sdp = to_scsi_device(dev);
-	struct scsi_disk *sdkp;
-	struct scsi_request *sreq;
-	int retries, res;
+	struct scsi_disk *sdkp = dev_get_drvdata(dev);
 
-	sdkp = dev_get_drvdata(dev);
 	if (!sdkp)
-               return;         /* this can happen */
+		return;         /* this can happen */
 
-	if (!scsi_device_online(sdp) || !sdkp->WCE)
+	if (!sdkp->WCE)
 		return;
 
-	printk(KERN_NOTICE "Synchronizing SCSI cache for disk %s: ",
+	printk(KERN_NOTICE "Synchronizing SCSI cache for disk %s: \n",
 			sdkp->disk->disk_name);
-
-	sreq = scsi_allocate_request(sdp, GFP_KERNEL);
-	if (!sreq) {
-		printk("FAILED\n  No memory for request\n");
-		return;
-	}
-
-	sreq->sr_data_direction = DMA_NONE;
-	for (retries = 3; retries > 0; --retries) {
-		unsigned char cmd[10] = { 0 };
-
-		cmd[0] = SYNCHRONIZE_CACHE;
-		/*
-		 * Leave the rest of the command zero to indicate
-		 * flush everything.
-		 */
-		scsi_wait_req(sreq, cmd, NULL, 0, SD_TIMEOUT, SD_MAX_RETRIES);
-		if (sreq->sr_result == 0)
-			break;
-	}
-
-	res = sreq->sr_result;
-	if (res) {
-		printk(KERN_WARNING "FAILED\n  status = %x, message = %02x, "
-				    "host = %d, driver = %02x\n  ",
-				    status_byte(res), msg_byte(res),
-				    host_byte(res), driver_byte(res));
-			if (driver_byte(res) & DRIVER_SENSE)
-				print_req_sense("sd", sreq);
-	}
-	
-	scsi_release_request(sreq);
-	printk("\n");
+	sd_sync_cache(sdp);
 }	
 
 /**
--- diff/drivers/scsi/seagate.c	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/seagate.c	2004-07-01 21:32:44.000000000 +0100
@@ -103,7 +103,7 @@
 #include <asm/uaccess.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "seagate.h"
 
 #include <scsi/scsi_ioctl.h>
--- diff/drivers/scsi/sg.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sg.c	2004-07-01 21:32:44.000000000 +0100
@@ -42,7 +42,6 @@
 #include <linux/fcntl.h>
 #include <linux/init.h>
 #include <linux/poll.h>
-#include <linux/vmalloc.h>
 #include <linux/smp_lock.h>
 #include <linux/moduleparam.h>
 #include <linux/devfs_fs_kernel.h>
@@ -51,7 +50,7 @@
 
 #include <linux/blkdev.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>
 #include <scsi/sg.h>
@@ -60,7 +59,7 @@
 
 #ifdef CONFIG_SCSI_PROC_FS
 #include <linux/proc_fs.h>
-static char *sg_version_date = "20040513";
+static char *sg_version_date = "20040516";
 
 static int sg_proc_init(void);
 static void sg_proc_cleanup(void);
@@ -73,7 +72,7 @@
 #define SG_ALLOW_DIO_DEF 0
 #define SG_ALLOW_DIO_CODE /* compile out by commenting this define */
 
-#define SG_MAX_DEVS 8192
+#define SG_MAX_DEVS 32768
 
 /*
  * Suppose you want to calculate the formula muldiv(x,m,d)=int(x * m / d)
@@ -718,7 +717,6 @@
 		    (void *) SRpnt->sr_buffer, hp->dxfer_len,
 		    sg_cmd_done, timeout, SG_DEFAULT_RETRIES);
 	/* dxfer_len overwrites SRpnt->sr_bufflen, hence need for b_malloc_len */
-	generic_unplug_device(q);
 	return 0;
 }
 
@@ -1331,9 +1329,11 @@
 	void *old_sg_dev_arr = NULL;
 	int k, error;
 
-	sdp = vmalloc(sizeof(Sg_device));
-	if (!sdp)
+	sdp = kmalloc(sizeof(Sg_device), GFP_KERNEL);
+	if (!sdp) {
+		printk(KERN_WARNING "kmalloc Sg_device failure\n");
 		return -ENOMEM;
+	}
 
 	write_lock_irqsave(&sg_dev_arr_lock, iflags);
 	if (unlikely(sg_nr_dev >= sg_dev_max)) {	/* try to resize */
@@ -1341,7 +1341,7 @@
 		int tmp_dev_max = sg_nr_dev + SG_DEV_ARR_LUMP;
 		write_unlock_irqrestore(&sg_dev_arr_lock, iflags);
 
-		tmp_da = vmalloc(tmp_dev_max * sizeof(Sg_device *));
+		tmp_da = kmalloc(tmp_dev_max * sizeof(Sg_device *), GFP_KERNEL);
 		if (unlikely(!tmp_da))
 			goto expand_failed;
 
@@ -1375,12 +1375,12 @@
 
  out:
 	if (error < 0)
-		vfree(sdp);
-	vfree(old_sg_dev_arr);
+		kfree(sdp);
+	kfree(old_sg_dev_arr);
 	return error;
 
  expand_failed:
-	printk(KERN_ERR "sg_alloc: device array cannot be resized\n");
+	printk(KERN_WARNING "sg_alloc: device array cannot be resized\n");
 	error = -ENOMEM;
 	goto out;
 
@@ -1404,20 +1404,26 @@
 	int error, k;
 
 	disk = alloc_disk(1);
-	if (!disk)
+	if (!disk) {
+		printk(KERN_WARNING "alloc_disk failed\n");
 		return -ENOMEM;
+	}
 	disk->major = SCSI_GENERIC_MAJOR;
 
 	error = -ENOMEM;
 	cdev = cdev_alloc();
-	if (!cdev)
+	if (!cdev) {
+		printk(KERN_WARNING "cdev_alloc failed\n");
 		goto out;
+	}
 	cdev->owner = THIS_MODULE;
 	cdev->ops = &sg_fops;
 
 	error = sg_alloc(disk, scsidp);
-	if (error < 0)
+	if (error < 0) {
+		printk(KERN_WARNING "sg_alloc failed\n");
 		goto out;
+	}
 	k = error;
 	sdp = sg_dev_arr[k];
 
@@ -1525,7 +1531,7 @@
 		put_disk(sdp->disk);
 		sdp->disk = NULL;
 		if (NULL == sdp->headfp)
-			vfree((char *) sdp);
+			kfree((char *) sdp);
 	}
 
 	if (delay)
@@ -1590,7 +1596,7 @@
 	unregister_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0),
 				 SG_MAX_DEVS);
 	if (sg_dev_arr != NULL) {
-		vfree((char *) sg_dev_arr);
+		kfree((char *) sg_dev_arr);
 		sg_dev_arr = NULL;
 	}
 	sg_dev_max = 0;
@@ -2492,7 +2498,7 @@
 			}
 			if (k < maxd)
 				sg_dev_arr[k] = NULL;
-			vfree((char *) sdp);
+			kfree((char *) sdp);
 			res = 1;
 		}
 		write_unlock_irqrestore(&sg_dev_arr_lock, iflags);
--- diff/drivers/scsi/sgiwd93.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sgiwd93.c	2004-07-01 21:32:44.000000000 +0100
@@ -31,7 +31,7 @@
 #include <asm/io.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "wd33c93.h"
 #include "sgiwd93.h"
 
--- diff/drivers/scsi/sim710.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/sim710.c	2004-07-01 21:32:44.000000000 +0100
@@ -35,9 +35,8 @@
 #include <linux/mca.h>
 #include <linux/eisa.h>
 #include <linux/interrupt.h>
+#include <scsi/scsi_host.h>
 
-#include "scsi.h"
-#include "hosts.h"
 #include "53c700.h"
 
 
@@ -86,7 +85,7 @@
 }
 __setup("sim710=", param_setup);
 
-static Scsi_Host_Template sim710_driver_template = {
+static struct scsi_host_template sim710_driver_template = {
 	.name			= "LSI (Symbios) 710 MCA/EISA",
 	.proc_name		= "sim710",
 	.this_id		= 7,
--- diff/drivers/scsi/sr.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sr.c	2004-07-01 21:32:44.000000000 +0100
@@ -46,11 +46,14 @@
 #include <linux/blkdev.h>
 #include <asm/uaccess.h>
 
-#include "scsi.h"
-#include "hosts.h"
-
+#include <scsi/scsi.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_driver.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>	/* For the door lock/unlock commands */
+#include <scsi/scsi_request.h>
 
 #include "scsi_logging.h"
 #include "sr.h"
@@ -282,7 +285,7 @@
 			 * user, but make sure that it's not treated as a
 			 * hard error.
 			 */
-			print_sense("sr", SCpnt);
+			scsi_print_sense("sr", SCpnt);
 			SCpnt->result = 0;
 			SCpnt->sense_buffer[0] = 0x0;
 			good_bytes = this_count;
@@ -335,11 +338,11 @@
 
 		memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd));
 		if (!rq->data_len)
-			SCpnt->sc_data_direction = SCSI_DATA_NONE;
+			SCpnt->sc_data_direction = DMA_NONE;
 		else if (rq_data_dir(rq) == WRITE)
-			SCpnt->sc_data_direction = SCSI_DATA_WRITE;
+			SCpnt->sc_data_direction = DMA_TO_DEVICE;
 		else
-			SCpnt->sc_data_direction = SCSI_DATA_READ;
+			SCpnt->sc_data_direction = DMA_FROM_DEVICE;
 
 		this_count = rq->data_len;
 		if (rq->timeout)
@@ -375,10 +378,10 @@
 		if (!cd->device->writeable)
 			return 0;
 		SCpnt->cmnd[0] = WRITE_10;
-		SCpnt->sc_data_direction = SCSI_DATA_WRITE;
+		SCpnt->sc_data_direction = DMA_TO_DEVICE;
 	} else if (rq_data_dir(SCpnt->request) == READ) {
 		SCpnt->cmnd[0] = READ_10;
-		SCpnt->sc_data_direction = SCSI_DATA_READ;
+		SCpnt->sc_data_direction = DMA_FROM_DEVICE;
 	} else {
 		blk_dump_rq_flags(SCpnt->request, "Unknown sr command");
 		return 0;
@@ -674,7 +677,7 @@
 		memset(buffer, 0, 8);
 
 		/* Do the command and wait.. */
-		SRpnt->sr_data_direction = SCSI_DATA_READ;
+		SRpnt->sr_data_direction = DMA_FROM_DEVICE;
 		scsi_wait_req(SRpnt, (void *) cmd, (void *) buffer,
 			      8, SR_TIMEOUT, MAX_RETRIES);
 
@@ -754,12 +757,11 @@
 static void get_capabilities(struct scsi_cd *cd)
 {
 	unsigned char *buffer;
-	int rc, n, mrw_write = 0, mrw = 1,ram_write=0;
 	struct scsi_mode_data data;
 	struct scsi_request *SRpnt;
 	unsigned char cmd[MAX_COMMAND_SIZE];
 	unsigned int the_result;
-	int retries;
+	int retries, rc, n;
 
 	static char *loadmech[] =
 	{
@@ -831,19 +833,6 @@
 		return;
 	}
 
-	if (cdrom_is_mrw(&cd->cdi, &mrw_write)) {
-		mrw = 0;
-		cd->cdi.mask |= CDC_MRW;
-		cd->cdi.mask |= CDC_MRW_W;
-	}
-	if (!mrw_write)
-		cd->cdi.mask |= CDC_MRW_W;
-
-	if (cdrom_is_random_writable(&cd->cdi, &ram_write))
-		cd->cdi.mask |= CDC_RAM;
-	if (!ram_write)
-		cd->cdi.mask |= CDC_RAM;
-
 	n = data.header_length + data.block_descriptor_length;
 	cd->cdi.speed = ((buffer[n + 8] << 8) + buffer[n + 9]) / 176;
 	cd->readcd_known = 1;
--- diff/drivers/scsi/sr.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sr.h	2004-07-01 21:32:44.000000000 +0100
@@ -17,18 +17,20 @@
 #ifndef _SR_H
 #define _SR_H
 
-#include "scsi.h"
 #include <linux/genhd.h>
 #include <linux/kref.h>
 
+struct scsi_device;
+
 /* The CDROM is fairly slow, so we need a little extra time */
 /* In fact, it is very slow if it has to spin up first */
 #define IOCTL_TIMEOUT 30*HZ
 
+
 typedef struct scsi_cd {
 	struct scsi_driver *driver;
 	unsigned capacity;	/* size in blocks                       */
-	Scsi_Device *device;
+	struct scsi_device *device;
 	unsigned int vendor;	/* vendor code, see sr_vendor.c         */
 	unsigned long ms_offset;	/* for reading multisession-CD's        */
 	unsigned needs_sector_size:1;	/* needs to get sector size */
--- diff/drivers/scsi/sr_ioctl.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sr_ioctl.c	2004-07-01 21:32:44.000000000 +0100
@@ -10,9 +10,13 @@
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
+#include <scsi/scsi_request.h>
 
 #include "sr.h"
 
@@ -65,7 +69,7 @@
 	cgc.cmd[6] = trk1_te.cdte_addr.msf.minute;
 	cgc.cmd[7] = trk1_te.cdte_addr.msf.second;
 	cgc.cmd[8] = trk1_te.cdte_addr.msf.frame;
-	cgc.data_direction = SCSI_DATA_NONE;
+	cgc.data_direction = DMA_NONE;
 	cgc.timeout = IOCTL_TIMEOUT;
 	return sr_do_ioctl(cdi->handle, &cgc);
 }
@@ -138,7 +142,7 @@
 			if (!cgc->quiet)
 				printk(KERN_INFO "%s: CDROM not ready.  Make sure there is a disc in the drive.\n", cd->cdi.name);
 #ifdef DEBUG
-			print_req_sense("sr", SRpnt);
+			scsi_print_req_sense("sr", SRpnt);
 #endif
 			err = -ENOMEDIUM;
 			break;
@@ -149,14 +153,14 @@
 				/* sense: Invalid command operation code */
 				err = -EDRIVE_CANT_DO_THIS;
 #ifdef DEBUG
-			print_command(cgc->cmd);
-			print_req_sense("sr", SRpnt);
+			__scsi_print_command(cgc->cmd);
+			scsi_print_req_sense("sr", SRpnt);
 #endif
 			break;
 		default:
 			printk(KERN_ERR "%s: CDROM (ioctl) error, command: ", cd->cdi.name);
-			print_command(cgc->cmd);
-			print_req_sense("sr", SRpnt);
+			__scsi_print_command(cgc->cmd);
+			scsi_print_req_sense("sr", SRpnt);
 			err = -EIO;
 		}
 	}
@@ -183,7 +187,7 @@
 	memset(&cgc, 0, sizeof(struct packet_command));
 	cgc.cmd[0] = GPCMD_TEST_UNIT_READY;
 	cgc.quiet = 1;
-	cgc.data_direction = SCSI_DATA_NONE;
+	cgc.data_direction = DMA_NONE;
 	cgc.timeout = IOCTL_TIMEOUT;
 	return sr_do_ioctl(cd, &cgc);
 }
@@ -196,7 +200,7 @@
 	memset(&cgc, 0, sizeof(struct packet_command));
 	cgc.cmd[0] = GPCMD_START_STOP_UNIT;
 	cgc.cmd[4] = (pos == 0) ? 0x03 /* close */ : 0x02 /* eject */ ;
-	cgc.data_direction = SCSI_DATA_NONE;
+	cgc.data_direction = DMA_NONE;
 	cgc.timeout = IOCTL_TIMEOUT;
 	return sr_do_ioctl(cd, &cgc);
 }
@@ -280,7 +284,7 @@
 	cgc.cmd[8] = 24;
 	cgc.buffer = buffer;
 	cgc.buflen = 24;
-	cgc.data_direction = SCSI_DATA_READ;
+	cgc.data_direction = DMA_FROM_DEVICE;
 	cgc.timeout = IOCTL_TIMEOUT;
 	result = sr_do_ioctl(cd, &cgc);
 
@@ -310,7 +314,7 @@
 	cgc.cmd[0] = GPCMD_SET_SPEED;	/* SET CD SPEED */
 	cgc.cmd[2] = (speed >> 8) & 0xff;	/* MSB for speed (in kbytes/sec) */
 	cgc.cmd[3] = speed & 0xff;	/* LSB */
-	cgc.data_direction = SCSI_DATA_NONE;
+	cgc.data_direction = DMA_NONE;
 	cgc.timeout = IOCTL_TIMEOUT;
 
 	if (sr_do_ioctl(cd, &cgc))
@@ -331,6 +335,9 @@
 	int result;
 	unsigned char *buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
 
+	if (!buffer)
+		return -ENOMEM;
+
 	memset(&cgc, 0, sizeof(struct packet_command));
 	cgc.timeout = IOCTL_TIMEOUT;
 
@@ -344,7 +351,7 @@
 			cgc.buffer = buffer;
 			cgc.buflen = 12;
 			cgc.quiet = 1;
-			cgc.data_direction = SCSI_DATA_READ;
+			cgc.data_direction = DMA_FROM_DEVICE;
 
 			result = sr_do_ioctl(cd, &cgc);
 
@@ -364,7 +371,7 @@
 			cgc.cmd[8] = 12;		/* LSB of length */
 			cgc.buffer = buffer;
 			cgc.buflen = 12;
-			cgc.data_direction = SCSI_DATA_READ;
+			cgc.data_direction = DMA_FROM_DEVICE;
 
 			result = sr_do_ioctl(cd, &cgc);
 
@@ -390,7 +397,7 @@
 		cgc.cmd[5] = ti->cdti_ind0;
 		cgc.cmd[7] = ti->cdti_trk1;
 		cgc.cmd[8] = ti->cdti_ind1;
-		cgc.data_direction = SCSI_DATA_NONE;
+		cgc.data_direction = DMA_NONE;
 
 		result = sr_do_ioctl(cd, &cgc);
 		if (result == -EDRIVE_CANT_DO_THIS)
@@ -459,7 +466,7 @@
 	}
 	cgc.buffer = dest;
 	cgc.buflen = blksize;
-	cgc.data_direction = SCSI_DATA_READ;
+	cgc.data_direction = DMA_FROM_DEVICE;
 	cgc.timeout = IOCTL_TIMEOUT;
 	return sr_do_ioctl(cd, &cgc);
 }
@@ -500,7 +507,7 @@
 	cgc.cmd[8] = 1;
 	cgc.buffer = dest;
 	cgc.buflen = blksize;
-	cgc.data_direction = SCSI_DATA_READ;
+	cgc.data_direction = DMA_FROM_DEVICE;
 	cgc.timeout = IOCTL_TIMEOUT;
 	rc = sr_do_ioctl(cd, &cgc);
 
--- diff/drivers/scsi/sr_vendor.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sr_vendor.c	2004-07-01 21:32:44.000000000 +0100
@@ -35,16 +35,18 @@
  */
 
 #include <linux/config.h>
+#include <linux/cdrom.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/bcd.h>
-
 #include <linux/blkdev.h>
-#include "scsi.h"
-#include "hosts.h"
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
 
-#include <linux/cdrom.h>
 #include "sr.h"
 
 #if 0
@@ -135,7 +137,7 @@
 	modesel->block_length_lo = blocklength & 0xff;
 	cgc.buffer = buffer;
 	cgc.buflen = sizeof(*modesel);
-	cgc.data_direction = SCSI_DATA_WRITE;
+	cgc.data_direction = DMA_TO_DEVICE;
 	cgc.timeout = VENDOR_TIMEOUT;
 	if (0 == (rc = sr_do_ioctl(cd, &cgc))) {
 		cd->device->sector_size = blocklength;
@@ -182,7 +184,7 @@
 		cgc.buffer = buffer;
 		cgc.buflen = 12;
 		cgc.quiet = 1;
-		cgc.data_direction = SCSI_DATA_READ;
+		cgc.data_direction = DMA_FROM_DEVICE;
 		cgc.timeout = VENDOR_TIMEOUT;
 		rc = sr_do_ioctl(cd, &cgc);
 		if (rc != 0)
@@ -210,7 +212,7 @@
 			cgc.buffer = buffer;
 			cgc.buflen = 0x16;
 			cgc.quiet = 1;
-			cgc.data_direction = SCSI_DATA_READ;
+			cgc.data_direction = DMA_FROM_DEVICE;
 			cgc.timeout = VENDOR_TIMEOUT;
 			rc = sr_do_ioctl(cd, &cgc);
 			if (rc != 0)
@@ -239,7 +241,7 @@
 			cgc.buffer = buffer;
 			cgc.buflen = 4;
 			cgc.quiet = 1;
-			cgc.data_direction = SCSI_DATA_READ;
+			cgc.data_direction = DMA_FROM_DEVICE;
 			cgc.timeout = VENDOR_TIMEOUT;
 			rc = sr_do_ioctl(cd, &cgc);
 			if (rc == -EINVAL) {
@@ -268,7 +270,7 @@
 		cgc.buffer = buffer;
 		cgc.buflen = 0x04;
 		cgc.quiet = 1;
-		cgc.data_direction = SCSI_DATA_READ;
+		cgc.data_direction = DMA_FROM_DEVICE;
 		cgc.timeout = VENDOR_TIMEOUT;
 		rc = sr_do_ioctl(cd, &cgc);
 		if (rc != 0) {
@@ -286,7 +288,7 @@
 		cgc.buffer = buffer;
 		cgc.buflen = 12;
 		cgc.quiet = 1;
-		cgc.data_direction = SCSI_DATA_READ;
+		cgc.data_direction = DMA_FROM_DEVICE;
 		cgc.timeout = VENDOR_TIMEOUT;
 		rc = sr_do_ioctl(cd, &cgc);
 		if (rc != 0) {
--- diff/drivers/scsi/st.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/st.c	2004-07-01 21:32:44.000000000 +0100
@@ -58,7 +58,7 @@
 
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 
 #include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>
--- diff/drivers/scsi/sun3_scsi.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/sun3_scsi.c	2004-07-01 21:32:44.000000000 +0100
@@ -75,7 +75,7 @@
 #define REAL_DMA
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "sun3_scsi.h"
 #include "NCR5380.h"
 
--- diff/drivers/scsi/sun3_scsi_vme.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/sun3_scsi_vme.c	2004-07-01 21:32:44.000000000 +0100
@@ -41,7 +41,7 @@
 #define REAL_DMA
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "sun3_scsi.h"
 #include "NCR5380.h"
 
--- diff/drivers/scsi/sun3x_esp.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/sun3x_esp.c	2004-07-01 21:32:44.000000000 +0100
@@ -16,7 +16,7 @@
 #include <linux/interrupt.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "NCR53C9x.h"
 
 #include <asm/sun3x.h>
--- diff/drivers/scsi/sym53c416.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/sym53c416.c	2004-07-01 21:32:44.000000000 +0100
@@ -43,7 +43,7 @@
 #include <linux/blkdev.h>
 #include <linux/isapnp.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "sym53c416.h"
 
 #define VERSION_STRING        "Version 1.0.0-ac"
@@ -622,12 +622,13 @@
 	int ints[2];
 
 	ints[0] = 1;
-	for(; *base; base++)
-	{
-		if(!check_region(*base, IO_RANGE) && sym53c416_test(*base))
-		{
-			ints[1] = *base;
-			sym53c416_setup(NULL, ints);
+	for(; *base; base++) {
+		if (request_region(*base, IO_RANGE, ID)) {
+			if (sym53c416_test(*base)) {
+				ints[1] = *base;
+				sym53c416_setup(NULL, ints);
+			}
+			release_region(*base, IO_RANGE);
 		}
 	}
 }
@@ -702,44 +703,42 @@
 	sym53c416_probe();
 
 	/* Now we register and set up each host adapter found... */
-	for(count = 0, i = 0; i < host_index; i++)
-	{
-		if(!sym53c416_test(hosts[i].base))
+	for(count = 0, i = 0; i < host_index; i++) {
+		if (!request_region(hosts[i].base, IO_RANGE, ID))
+			continue;
+		if (!sym53c416_test(hosts[i].base)) {
 			printk(KERN_WARNING "No sym53c416 found at address 0x%03x\n", hosts[i].base);
-		else
-		{
-			if(hosts[i].irq == 0)
-			/* We don't have an irq yet, so we should probe for one */
-				if((hosts[i].irq = sym53c416_probeirq(hosts[i].base, hosts[i].scsi_id)) == 0)
-					printk(KERN_WARNING "IRQ autoprobing failed for sym53c416 at address 0x%03x\n", hosts[i].base);
-			if(hosts[i].irq && !check_region(hosts[i].base, IO_RANGE))
-			{
-				shpnt = scsi_register(tpnt, 0);
-				if(shpnt==NULL)
-					continue;
-				spin_lock_irqsave(&sym53c416_lock, flags);
-				/* Request for specified IRQ */
-				if(request_irq(hosts[i].irq, sym53c416_intr_handle, 0, ID, shpnt))
-				{
-					spin_unlock_irqrestore(&sym53c416_lock, flags);
-					printk(KERN_ERR "sym53c416: Unable to assign IRQ %d\n", hosts[i].irq);
-					scsi_unregister(shpnt);
-				}
-				else
-				{
-					/* Inform the kernel of our IO range */
-					request_region(hosts[i].base, IO_RANGE, ID);
-					shpnt->unique_id = hosts[i].base;
-					shpnt->io_port = hosts[i].base;
-					shpnt->n_io_port = IO_RANGE;
-					shpnt->irq = hosts[i].irq;
-					shpnt->this_id = hosts[i].scsi_id;
-					sym53c416_init(hosts[i].base, hosts[i].scsi_id);
-					count++;
-					spin_unlock_irqrestore(&sym53c416_lock, flags);
-				}
-			}
+			goto fail_release_region;
 		}
+
+		/* We don't have an irq yet, so we should probe for one */
+		if (!hosts[i].irq)
+			hosts[i].irq = sym53c416_probeirq(hosts[i].base, hosts[i].scsi_id);
+		if (!hosts[i].irq)
+			goto fail_release_region;
+	
+		shpnt = scsi_register(tpnt, 0);
+		if (!shpnt)
+			goto fail_release_region;
+		/* Request for specified IRQ */
+		if (request_irq(hosts[i].irq, sym53c416_intr_handle, 0, ID, shpnt))
+			goto fail_free_host;
+
+		spin_lock_irqsave(&sym53c416_lock, flags);
+		shpnt->unique_id = hosts[i].base;
+		shpnt->io_port = hosts[i].base;
+		shpnt->n_io_port = IO_RANGE;
+		shpnt->irq = hosts[i].irq;
+		shpnt->this_id = hosts[i].scsi_id;
+		sym53c416_init(hosts[i].base, hosts[i].scsi_id);
+		count++;
+		spin_unlock_irqrestore(&sym53c416_lock, flags);
+		continue;
+
+ fail_free_host:
+		scsi_unregister(shpnt);
+ fail_release_region:
+		release_region(hosts[i].base, IO_RANGE);
 	}
 	return count;
 }
--- diff/drivers/scsi/sym53c8xx_comm.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/sym53c8xx_comm.h	2004-07-01 21:32:44.000000000 +0100
@@ -71,8 +71,6 @@
 **==========================================================
 */
 
-#define SCSI_NCR_DYNAMIC_DMA_MAPPING
-
 /*==========================================================
 **
 **	Miscallaneous defines.
@@ -81,22 +79,12 @@
 */
 
 #define u_char		unsigned char
-#define u_short		unsigned short
-#define u_int		unsigned int
 #define u_long		unsigned long
 
-#ifndef bcmp
-#define bcmp(s, d, n)	memcmp((d), (s), (n))
-#endif
-
 #ifndef bzero
 #define bzero(d, n)	memset((d), 0, (n))
 #endif
  
-#ifndef offsetof
-#define offsetof(t, m)	((size_t) (&((t *)0)->m))
-#endif
-
 /*==========================================================
 **
 **	assert ()
@@ -353,7 +341,6 @@
 	struct m_link *next;
 } m_link_s;
 
-#ifdef	SCSI_NCR_DYNAMIC_DMA_MAPPING
 typedef struct m_vtob {		/* Virtual to Bus address translation */
 	struct m_vtob *next;
 	m_addr_t vaddr;
@@ -364,10 +351,8 @@
 #define VTOB_HASH_MASK		(VTOB_HASH_SIZE-1)
 #define VTOB_HASH_CODE(m)	\
 	((((m_addr_t) (m)) >> MEMO_CLUSTER_SHIFT) & VTOB_HASH_MASK)
-#endif
 
 typedef struct m_pool {		/* Memory pool of a given kind */
-#ifdef	SCSI_NCR_DYNAMIC_DMA_MAPPING
 	m_bush_t bush;
 	m_addr_t (*getp)(struct m_pool *);
 	void (*freep)(struct m_pool *, m_addr_t);
@@ -378,10 +363,6 @@
 	int nump;
 	m_vtob_s *(vtob[VTOB_HASH_SIZE]);
 	struct m_pool *next;
-#else
-#define M_GETP()		__GetFreePages(MEMO_GFP_FLAGS, MEMO_PAGE_ORDER)
-#define M_FREEP(p)		free_pages(p, MEMO_PAGE_ORDER)
-#endif	/* SCSI_NCR_DYNAMIC_DMA_MAPPING */
 	struct m_link h[PAGE_SHIFT-MEMO_SHIFT+MEMO_PAGE_ORDER+1];
 } m_pool_s;
 
@@ -508,12 +489,6 @@
  * memory accessed by the PCI chip. `mp0' is the default not DMAable pool.
  */
 
-#ifndef	SCSI_NCR_DYNAMIC_DMA_MAPPING
-
-static m_pool_s mp0;
-
-#else
-
 static m_addr_t ___mp0_getp(m_pool_s *mp)
 {
 	m_addr_t m = GetPages();
@@ -530,22 +505,10 @@
 
 static m_pool_s mp0 = {0, ___mp0_getp, ___mp0_freep};
 
-#endif	/* SCSI_NCR_DYNAMIC_DMA_MAPPING */
-
 /*
  * DMAable pools.
  */
 
-#ifndef	SCSI_NCR_DYNAMIC_DMA_MAPPING
-
-/* Without pci bus iommu support, all the memory is assumed DMAable */
-
-#define __m_calloc_dma(b, s, n)		m_calloc(s, n)
-#define __m_free_dma(b, p, s, n)	m_free(p, s, n)
-#define __vtobus(b, p)			virt_to_bus(p)
-
-#else
-
 /*
  * With pci bus iommu support, we maintain one pool per pcidev and a 
  * hashed reverse table for virtual to bus physical address translations.
@@ -680,8 +643,6 @@
 	return vp ? vp->baddr + (((m_addr_t) m) - a) : 0;
 }
 
-#endif	/* SCSI_NCR_DYNAMIC_DMA_MAPPING */
-
 #define _m_calloc_dma(np, s, n)		__m_calloc_dma(np->dev, s, n)
 #define _m_free_dma(np, p, s, n)	__m_free_dma(np->dev, p, s, n)
 #define m_calloc_dma(s, n)		_m_calloc_dma(np, s, n)
@@ -693,23 +654,6 @@
  *  Deal with DMA mapping/unmapping.
  */
 
-#ifndef SCSI_NCR_DYNAMIC_DMA_MAPPING
-
-/* Linux versions prior to pci bus iommu kernel interface */
-
-#define __unmap_scsi_data(dev, cmd)	do {; } while (0)
-#define __map_scsi_single_data(dev, cmd) (__vtobus(dev,(cmd)->request_buffer))
-#define __map_scsi_sg_data(dev, cmd)	((cmd)->use_sg)
-#define __sync_scsi_data_for_cpu(dev, cmd)	do {; } while (0)
-#define __sync_scsi_data_for_device(dev, cmd)	do {; } while (0)
-
-#define scsi_sg_dma_address(sc)		vtobus((sc)->address)
-#define scsi_sg_dma_len(sc)		((sc)->length)
-
-#else
-
-/* Linux version with pci bus iommu kernel interface */
-
 /* To keep track of the dma mapping (sg/single) that has been set */
 #define __data_mapped	SCp.phase
 #define __data_mapping	SCp.have_data_in
@@ -800,65 +744,14 @@
 #define scsi_sg_dma_address(sc)		sg_dma_address(sc)
 #define scsi_sg_dma_len(sc)		sg_dma_len(sc)
 
-#endif	/* SCSI_NCR_DYNAMIC_DMA_MAPPING */
-
 #define unmap_scsi_data(np, cmd)	__unmap_scsi_data(np->dev, cmd)
 #define map_scsi_single_data(np, cmd)	__map_scsi_single_data(np->dev, cmd)
 #define map_scsi_sg_data(np, cmd)	__map_scsi_sg_data(np->dev, cmd)
 #define sync_scsi_data_for_cpu(np, cmd)	__sync_scsi_data_for_cpu(np->dev, cmd)
 #define sync_scsi_data_for_device(np, cmd) __sync_scsi_data_for_device(np->dev, cmd)
 
-/*==========================================================
-**
-**	SCSI data transfer direction
-**
-**	Until some linux kernel version near 2.3.40, 
-**	low-level scsi drivers were not told about data 
-**	transfer direction. We check the existence of this 
-**	feature that has been expected for a _long_ time by 
-**	all SCSI driver developers by just testing against 
-**	the definition of SCSI_DATA_UNKNOWN. Indeed this is 
-**	a hack, but testing against a kernel version would 
-**	have been a shame. ;-)
-**
-**==========================================================
-*/
-#ifdef	SCSI_DATA_UNKNOWN
-
 #define scsi_data_direction(cmd)	(cmd->sc_data_direction)
 
-#else
-
-#define	SCSI_DATA_UNKNOWN	0
-#define	SCSI_DATA_WRITE		1
-#define	SCSI_DATA_READ		2
-#define	SCSI_DATA_NONE		3
-
-static __inline__ int scsi_data_direction(Scsi_Cmnd *cmd)
-{
-	int direction;
-
-	switch((int) cmd->cmnd[0]) {
-	case 0x08:  /*	READ(6)				08 */
-	case 0x28:  /*	READ(10)			28 */
-	case 0xA8:  /*	READ(12)			A8 */
-		direction = SCSI_DATA_READ;
-		break;
-	case 0x0A:  /*	WRITE(6)			0A */
-	case 0x2A:  /*	WRITE(10)			2A */
-	case 0xAA:  /*	WRITE(12)			AA */
-		direction = SCSI_DATA_WRITE;
-		break;
-	default:
-		direction = SCSI_DATA_UNKNOWN;
-		break;
-	}
-
-	return direction;
-}
-
-#endif	/* SCSI_DATA_UNKNOWN */
-
 /*==========================================================
 **
 **	Driver setup.
@@ -881,602 +774,6 @@
 #define bootverbose (np->verbose)
 
 
-/*==========================================================
-**
-**	NVRAM detection and reading.
-**	 
-**	Currently supported:
-**	- 24C16 EEPROM with both Symbios and Tekram layout.
-**	- 93C46 EEPROM with Tekram layout.
-**
-**==========================================================
-*/
-
-#ifdef SCSI_NCR_NVRAM_SUPPORT
-/*
- *  24C16 EEPROM reading.
- *
- *  GPOI0 - data in/data out
- *  GPIO1 - clock
- *  Symbios NVRAM wiring now also used by Tekram.
- */
-
-#define SET_BIT 0
-#define CLR_BIT 1
-#define SET_CLK 2
-#define CLR_CLK 3
-
-/*
- *  Set/clear data/clock bit in GPIO0
- */
-static void __init
-S24C16_set_bit(ncr_slot *np, u_char write_bit, u_char *gpreg, int bit_mode)
-{
-	UDELAY (5);
-	switch (bit_mode){
-	case SET_BIT:
-		*gpreg |= write_bit;
-		break;
-	case CLR_BIT:
-		*gpreg &= 0xfe;
-		break;
-	case SET_CLK:
-		*gpreg |= 0x02;
-		break;
-	case CLR_CLK:
-		*gpreg &= 0xfd;
-		break;
-
-	}
-	OUTB (nc_gpreg, *gpreg);
-	UDELAY (5);
-}
-
-/*
- *  Send START condition to NVRAM to wake it up.
- */
-static void __init S24C16_start(ncr_slot *np, u_char *gpreg)
-{
-	S24C16_set_bit(np, 1, gpreg, SET_BIT);
-	S24C16_set_bit(np, 0, gpreg, SET_CLK);
-	S24C16_set_bit(np, 0, gpreg, CLR_BIT);
-	S24C16_set_bit(np, 0, gpreg, CLR_CLK);
-}
-
-/*
- *  Send STOP condition to NVRAM - puts NVRAM to sleep... ZZzzzz!!
- */
-static void __init S24C16_stop(ncr_slot *np, u_char *gpreg)
-{
-	S24C16_set_bit(np, 0, gpreg, SET_CLK);
-	S24C16_set_bit(np, 1, gpreg, SET_BIT);
-}
-
-/*
- *  Read or write a bit to the NVRAM,
- *  read if GPIO0 input else write if GPIO0 output
- */
-static void __init 
-S24C16_do_bit(ncr_slot *np, u_char *read_bit, u_char write_bit, u_char *gpreg)
-{
-	S24C16_set_bit(np, write_bit, gpreg, SET_BIT);
-	S24C16_set_bit(np, 0, gpreg, SET_CLK);
-	if (read_bit)
-		*read_bit = INB (nc_gpreg);
-	S24C16_set_bit(np, 0, gpreg, CLR_CLK);
-	S24C16_set_bit(np, 0, gpreg, CLR_BIT);
-}
-
-/*
- *  Output an ACK to the NVRAM after reading,
- *  change GPIO0 to output and when done back to an input
- */
-static void __init
-S24C16_write_ack(ncr_slot *np, u_char write_bit, u_char *gpreg, u_char *gpcntl)
-{
-	OUTB (nc_gpcntl, *gpcntl & 0xfe);
-	S24C16_do_bit(np, 0, write_bit, gpreg);
-	OUTB (nc_gpcntl, *gpcntl);
-}
-
-/*
- *  Input an ACK from NVRAM after writing,
- *  change GPIO0 to input and when done back to an output
- */
-static void __init 
-S24C16_read_ack(ncr_slot *np, u_char *read_bit, u_char *gpreg, u_char *gpcntl)
-{
-	OUTB (nc_gpcntl, *gpcntl | 0x01);
-	S24C16_do_bit(np, read_bit, 1, gpreg);
-	OUTB (nc_gpcntl, *gpcntl);
-}
-
-/*
- *  WRITE a byte to the NVRAM and then get an ACK to see it was accepted OK,
- *  GPIO0 must already be set as an output
- */
-static void __init 
-S24C16_write_byte(ncr_slot *np, u_char *ack_data, u_char write_data, 
-		  u_char *gpreg, u_char *gpcntl)
-{
-	int x;
-	
-	for (x = 0; x < 8; x++)
-		S24C16_do_bit(np, 0, (write_data >> (7 - x)) & 0x01, gpreg);
-		
-	S24C16_read_ack(np, ack_data, gpreg, gpcntl);
-}
-
-/*
- *  READ a byte from the NVRAM and then send an ACK to say we have got it,
- *  GPIO0 must already be set as an input
- */
-static void __init 
-S24C16_read_byte(ncr_slot *np, u_char *read_data, u_char ack_data, 
-	         u_char *gpreg, u_char *gpcntl)
-{
-	int x;
-	u_char read_bit;
-
-	*read_data = 0;
-	for (x = 0; x < 8; x++) {
-		S24C16_do_bit(np, &read_bit, 1, gpreg);
-		*read_data |= ((read_bit & 0x01) << (7 - x));
-	}
-
-	S24C16_write_ack(np, ack_data, gpreg, gpcntl);
-}
-
-/*
- *  Read 'len' bytes starting at 'offset'.
- */
-static int __init 
-sym_read_S24C16_nvram (ncr_slot *np, int offset, u_char *data, int len)
-{
-	u_char	gpcntl, gpreg;
-	u_char	old_gpcntl, old_gpreg;
-	u_char	ack_data;
-	int	retv = 1;
-	int	x;
-
-	/* save current state of GPCNTL and GPREG */
-	old_gpreg	= INB (nc_gpreg);
-	old_gpcntl	= INB (nc_gpcntl);
-	gpcntl		= old_gpcntl & 0x1c;
-
-	/* set up GPREG & GPCNTL to set GPIO0 and GPIO1 in to known state */
-	OUTB (nc_gpreg,  old_gpreg);
-	OUTB (nc_gpcntl, gpcntl);
-
-	/* this is to set NVRAM into a known state with GPIO0/1 both low */
-	gpreg = old_gpreg;
-	S24C16_set_bit(np, 0, &gpreg, CLR_CLK);
-	S24C16_set_bit(np, 0, &gpreg, CLR_BIT);
-		
-	/* now set NVRAM inactive with GPIO0/1 both high */
-	S24C16_stop(np, &gpreg);
-	
-	/* activate NVRAM */
-	S24C16_start(np, &gpreg);
-
-	/* write device code and random address MSB */
-	S24C16_write_byte(np, &ack_data,
-		0xa0 | ((offset >> 7) & 0x0e), &gpreg, &gpcntl);
-	if (ack_data & 0x01)
-		goto out;
-
-	/* write random address LSB */
-	S24C16_write_byte(np, &ack_data,
-		offset & 0xff, &gpreg, &gpcntl);
-	if (ack_data & 0x01)
-		goto out;
-
-	/* regenerate START state to set up for reading */
-	S24C16_start(np, &gpreg);
-	
-	/* rewrite device code and address MSB with read bit set (lsb = 0x01) */
-	S24C16_write_byte(np, &ack_data,
-		0xa1 | ((offset >> 7) & 0x0e), &gpreg, &gpcntl);
-	if (ack_data & 0x01)
-		goto out;
-
-	/* now set up GPIO0 for inputting data */
-	gpcntl |= 0x01;
-	OUTB (nc_gpcntl, gpcntl);
-		
-	/* input all requested data - only part of total NVRAM */
-	for (x = 0; x < len; x++) 
-		S24C16_read_byte(np, &data[x], (x == (len-1)), &gpreg, &gpcntl);
-
-	/* finally put NVRAM back in inactive mode */
-	gpcntl &= 0xfe;
-	OUTB (nc_gpcntl, gpcntl);
-	S24C16_stop(np, &gpreg);
-	retv = 0;
-out:
-	/* return GPIO0/1 to original states after having accessed NVRAM */
-	OUTB (nc_gpcntl, old_gpcntl);
-	OUTB (nc_gpreg,  old_gpreg);
-
-	return retv;
-}
-
-#undef SET_BIT
-#undef CLR_BIT
-#undef SET_CLK
-#undef CLR_CLK
-
-/*
- *  Try reading Symbios NVRAM.
- *  Return 0 if OK.
- */
-static int __init sym_read_Symbios_nvram (ncr_slot *np, Symbios_nvram *nvram)
-{
-	static u_char Symbios_trailer[6] = {0xfe, 0xfe, 0, 0, 0, 0};
-	u_char *data = (u_char *) nvram;
-	int len  = sizeof(*nvram);
-	u_short	csum;
-	int x;
-
-	/* probe the 24c16 and read the SYMBIOS 24c16 area */
-	if (sym_read_S24C16_nvram (np, SYMBIOS_NVRAM_ADDRESS, data, len))
-		return 1;
-
-	/* check valid NVRAM signature, verify byte count and checksum */
-	if (nvram->type != 0 ||
-	    memcmp(nvram->trailer, Symbios_trailer, 6) ||
-	    nvram->byte_count != len - 12)
-		return 1;
-
-	/* verify checksum */
-	for (x = 6, csum = 0; x < len - 6; x++)
-		csum += data[x];
-	if (csum != nvram->checksum)
-		return 1;
-
-	return 0;
-}
-
-/*
- *  93C46 EEPROM reading.
- *
- *  GPOI0 - data in
- *  GPIO1 - data out
- *  GPIO2 - clock
- *  GPIO4 - chip select
- *
- *  Used by Tekram.
- */
-
-/*
- *  Pulse clock bit in GPIO0
- */
-static void __init T93C46_Clk(ncr_slot *np, u_char *gpreg)
-{
-	OUTB (nc_gpreg, *gpreg | 0x04);
-	UDELAY (2);
-	OUTB (nc_gpreg, *gpreg);
-}
-
-/* 
- *  Read bit from NVRAM
- */
-static void __init T93C46_Read_Bit(ncr_slot *np, u_char *read_bit, u_char *gpreg)
-{
-	UDELAY (2);
-	T93C46_Clk(np, gpreg);
-	*read_bit = INB (nc_gpreg);
-}
-
-/*
- *  Write bit to GPIO0
- */
-static void __init T93C46_Write_Bit(ncr_slot *np, u_char write_bit, u_char *gpreg)
-{
-	if (write_bit & 0x01)
-		*gpreg |= 0x02;
-	else
-		*gpreg &= 0xfd;
-		
-	*gpreg |= 0x10;
-		
-	OUTB (nc_gpreg, *gpreg);
-	UDELAY (2);
-
-	T93C46_Clk(np, gpreg);
-}
-
-/*
- *  Send STOP condition to NVRAM - puts NVRAM to sleep... ZZZzzz!!
- */
-static void __init T93C46_Stop(ncr_slot *np, u_char *gpreg)
-{
-	*gpreg &= 0xef;
-	OUTB (nc_gpreg, *gpreg);
-	UDELAY (2);
-
-	T93C46_Clk(np, gpreg);
-}
-
-/*
- *  Send read command and address to NVRAM
- */
-static void __init 
-T93C46_Send_Command(ncr_slot *np, u_short write_data, 
-		    u_char *read_bit, u_char *gpreg)
-{
-	int x;
-
-	/* send 9 bits, start bit (1), command (2), address (6)  */
-	for (x = 0; x < 9; x++)
-		T93C46_Write_Bit(np, (u_char) (write_data >> (8 - x)), gpreg);
-
-	*read_bit = INB (nc_gpreg);
-}
-
-/*
- *  READ 2 bytes from the NVRAM
- */
-static void __init 
-T93C46_Read_Word(ncr_slot *np, u_short *nvram_data, u_char *gpreg)
-{
-	int x;
-	u_char read_bit;
-
-	*nvram_data = 0;
-	for (x = 0; x < 16; x++) {
-		T93C46_Read_Bit(np, &read_bit, gpreg);
-
-		if (read_bit & 0x01)
-			*nvram_data |=  (0x01 << (15 - x));
-		else
-			*nvram_data &= ~(0x01 << (15 - x));
-	}
-}
-
-/*
- *  Read Tekram NvRAM data.
- */
-static int __init 
-T93C46_Read_Data(ncr_slot *np, u_short *data,int len,u_char *gpreg)
-{
-	u_char	read_bit;
-	int	x;
-
-	for (x = 0; x < len; x++)  {
-
-		/* output read command and address */
-		T93C46_Send_Command(np, 0x180 | x, &read_bit, gpreg);
-		if (read_bit & 0x01)
-			return 1; /* Bad */
-		T93C46_Read_Word(np, &data[x], gpreg);
-		T93C46_Stop(np, gpreg);
-	}
-
-	return 0;
-}
-
-/*
- *  Try reading 93C46 Tekram NVRAM.
- */
-static int __init 
-sym_read_T93C46_nvram (ncr_slot *np, Tekram_nvram *nvram)
-{
-	u_char gpcntl, gpreg;
-	u_char old_gpcntl, old_gpreg;
-	int retv = 1;
-
-	/* save current state of GPCNTL and GPREG */
-	old_gpreg	= INB (nc_gpreg);
-	old_gpcntl	= INB (nc_gpcntl);
-
-	/* set up GPREG & GPCNTL to set GPIO0/1/2/4 in to known state, 0 in,
-	   1/2/4 out */
-	gpreg = old_gpreg & 0xe9;
-	OUTB (nc_gpreg, gpreg);
-	gpcntl = (old_gpcntl & 0xe9) | 0x09;
-	OUTB (nc_gpcntl, gpcntl);
-
-	/* input all of NVRAM, 64 words */
-	retv = T93C46_Read_Data(np, (u_short *) nvram,
-				sizeof(*nvram) / sizeof(short), &gpreg);
-	
-	/* return GPIO0/1/2/4 to original states after having accessed NVRAM */
-	OUTB (nc_gpcntl, old_gpcntl);
-	OUTB (nc_gpreg,  old_gpreg);
-
-	return retv;
-}
-
-/*
- *  Try reading Tekram NVRAM.
- *  Return 0 if OK.
- */
-static int __init 
-sym_read_Tekram_nvram (ncr_slot *np, u_short device_id, Tekram_nvram *nvram)
-{
-	u_char *data = (u_char *) nvram;
-	int len = sizeof(*nvram);
-	u_short	csum;
-	int x;
-
-	switch (device_id) {
-	case PCI_DEVICE_ID_NCR_53C885:
-	case PCI_DEVICE_ID_NCR_53C895:
-	case PCI_DEVICE_ID_NCR_53C896:
-		x = sym_read_S24C16_nvram(np, TEKRAM_24C16_NVRAM_ADDRESS,
-					  data, len);
-		break;
-	case PCI_DEVICE_ID_NCR_53C875:
-		x = sym_read_S24C16_nvram(np, TEKRAM_24C16_NVRAM_ADDRESS,
-					  data, len);
-		if (!x)
-			break;
-	default:
-		x = sym_read_T93C46_nvram(np, nvram);
-		break;
-	}
-	if (x)
-		return 1;
-
-	/* verify checksum */
-	for (x = 0, csum = 0; x < len - 1; x += 2)
-		csum += data[x] + (data[x+1] << 8);
-	if (csum != 0x1234)
-		return 1;
-
-	return 0;
-}
-
-#endif	/* SCSI_NCR_NVRAM_SUPPORT */
-
-/*===================================================================
-**
-**    Detect and try to read SYMBIOS and TEKRAM NVRAM.
-**
-**    Data can be used to order booting of boards.
-**
-**    Data is saved in ncr_device structure if NVRAM found. This
-**    is then used to find drive boot order for ncr_attach().
-**
-**    NVRAM data is passed to Scsi_Host_Template later during 
-**    ncr_attach() for any device set up.
-**
-**===================================================================
-*/
-#ifdef SCSI_NCR_NVRAM_SUPPORT
-static void __init ncr_get_nvram(struct ncr_device *devp, ncr_nvram *nvp)
-{
-	devp->nvram = nvp;
-	if (!nvp)
-		return;
-	/*
-	**    Get access to chip IO registers
-	*/
-#ifdef SCSI_NCR_IOMAPPED
-	request_region(devp->slot.io_port, 128, NAME53C8XX);
-	devp->slot.base_io = devp->slot.io_port;
-#else
-	devp->slot.reg = 
-		(struct ncr_reg *) remap_pci_mem(devp->slot.base_c, 128);
-	if (!devp->slot.reg)
-		return;
-#endif
-
-	/*
-	**    Try to read SYMBIOS nvram.
-	**    Try to read TEKRAM nvram if Symbios nvram not found.
-	*/
-	if	(!sym_read_Symbios_nvram(&devp->slot, &nvp->data.Symbios))
-		nvp->type = SCSI_NCR_SYMBIOS_NVRAM;
-	else if	(!sym_read_Tekram_nvram(&devp->slot, devp->chip.device_id,
-					&nvp->data.Tekram))
-		nvp->type = SCSI_NCR_TEKRAM_NVRAM;
-	else {
-		nvp->type = 0;
-		devp->nvram = 0;
-	}
-
-	/*
-	** Release access to chip IO registers
-	*/
-#ifdef SCSI_NCR_IOMAPPED
-	release_region(devp->slot.base_io, 128);
-#else
-	unmap_pci_mem((u_long) devp->slot.reg, 128ul);
-#endif
-
-}
-
-/*===================================================================
-**
-**	Display the content of NVRAM for debugging purpose.
-**
-**===================================================================
-*/
-#ifdef	SCSI_NCR_DEBUG_NVRAM
-static void __init ncr_display_Symbios_nvram(Symbios_nvram *nvram)
-{
-	int i;
-
-	/* display Symbios nvram host data */
-	printk(KERN_DEBUG NAME53C8XX ": HOST ID=%d%s%s%s%s%s\n",
-		nvram->host_id & 0x0f,
-		(nvram->flags  & SYMBIOS_SCAM_ENABLE)	? " SCAM"	:"",
-		(nvram->flags  & SYMBIOS_PARITY_ENABLE)	? " PARITY"	:"",
-		(nvram->flags  & SYMBIOS_VERBOSE_MSGS)	? " VERBOSE"	:"", 
-		(nvram->flags  & SYMBIOS_CHS_MAPPING)	? " CHS_ALT"	:"", 
-		(nvram->flags1 & SYMBIOS_SCAN_HI_LO)	? " HI_LO"	:"");
-
-	/* display Symbios nvram drive data */
-	for (i = 0 ; i < 15 ; i++) {
-		struct Symbios_target *tn = &nvram->target[i];
-		printk(KERN_DEBUG NAME53C8XX 
-		"-%d:%s%s%s%s WIDTH=%d SYNC=%d TMO=%d\n",
-		i,
-		(tn->flags & SYMBIOS_DISCONNECT_ENABLE)	? " DISC"	: "",
-		(tn->flags & SYMBIOS_SCAN_AT_BOOT_TIME)	? " SCAN_BOOT"	: "",
-		(tn->flags & SYMBIOS_SCAN_LUNS)		? " SCAN_LUNS"	: "",
-		(tn->flags & SYMBIOS_QUEUE_TAGS_ENABLED)? " TCQ"	: "",
-		tn->bus_width,
-		tn->sync_period / 4,
-		tn->timeout);
-	}
-}
-
-static u_char Tekram_boot_delay[7] __initdata = {3, 5, 10, 20, 30, 60, 120};
-
-static void __init ncr_display_Tekram_nvram(Tekram_nvram *nvram)
-{
-	int i, tags, boot_delay;
-	char *rem;
-
-	/* display Tekram nvram host data */
-	tags = 2 << nvram->max_tags_index;
-	boot_delay = 0;
-	if (nvram->boot_delay_index < 6)
-		boot_delay = Tekram_boot_delay[nvram->boot_delay_index];
-	switch((nvram->flags & TEKRAM_REMOVABLE_FLAGS) >> 6) {
-	default:
-	case 0:	rem = "";			break;
-	case 1: rem = " REMOVABLE=boot device";	break;
-	case 2: rem = " REMOVABLE=all";		break;
-	}
-
-	printk(KERN_DEBUG NAME53C8XX
-		": HOST ID=%d%s%s%s%s%s%s%s%s%s BOOT DELAY=%d tags=%d\n",
-		nvram->host_id & 0x0f,
-		(nvram->flags1 & SYMBIOS_SCAM_ENABLE)	? " SCAM"	:"",
-		(nvram->flags & TEKRAM_MORE_THAN_2_DRIVES) ? " >2DRIVES":"",
-		(nvram->flags & TEKRAM_DRIVES_SUP_1GB)	? " >1GB"	:"",
-		(nvram->flags & TEKRAM_RESET_ON_POWER_ON) ? " RESET"	:"",
-		(nvram->flags & TEKRAM_ACTIVE_NEGATION)	? " ACT_NEG"	:"",
-		(nvram->flags & TEKRAM_IMMEDIATE_SEEK)	? " IMM_SEEK"	:"",
-		(nvram->flags & TEKRAM_SCAN_LUNS)	? " SCAN_LUNS"	:"",
-		(nvram->flags1 & TEKRAM_F2_F6_ENABLED)	? " F2_F6"	:"",
-		rem, boot_delay, tags);
-
-	/* display Tekram nvram drive data */
-	for (i = 0; i <= 15; i++) {
-		int sync, j;
-		struct Tekram_target *tn = &nvram->target[i];
-		j = tn->sync_index & 0xf;
-		sync = Tekram_sync[j];
-		printk(KERN_DEBUG NAME53C8XX "-%d:%s%s%s%s%s%s PERIOD=%d\n",
-		i,
-		(tn->flags & TEKRAM_PARITY_CHECK)	? " PARITY"	: "",
-		(tn->flags & TEKRAM_SYNC_NEGO)		? " SYNC"	: "",
-		(tn->flags & TEKRAM_DISCONNECT_ENABLE)	? " DISC"	: "",
-		(tn->flags & TEKRAM_START_CMD)		? " START"	: "",
-		(tn->flags & TEKRAM_TAGGED_COMMANDS)	? " TCQ"	: "",
-		(tn->flags & TEKRAM_WIDE_NEGO)		? " WIDE"	: "",
-		sync);
-	}
-}
-#endif /* SCSI_NCR_DEBUG_NVRAM */
-#endif	/* SCSI_NCR_NVRAM_SUPPORT */
-
-
 /*===================================================================
 **
 **	Utility routines that protperly return data through /proc FS.
--- diff/drivers/scsi/sym53c8xx_defs.h	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/sym53c8xx_defs.h	2004-07-01 21:32:44.000000000 +0100
@@ -64,31 +64,9 @@
 #ifndef SYM53C8XX_DEFS_H
 #define SYM53C8XX_DEFS_H
 
-/*
-**	Check supported Linux versions
-*/
-
 #include <linux/config.h>
 
-/*
- * NCR PQS/PDS special device support.
- */
-#ifdef CONFIG_SCSI_NCR53C8XX_PQS_PDS
-#define SCSI_NCR_PQS_PDS_SUPPORT
-#endif
-
-/*
- *	No more an option, enabled by default.
- */
-#ifndef CONFIG_SCSI_NCR53C8XX_NO_NVRAM
-# ifndef CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
-#  define CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
-# endif
-#endif
-
-/*
-**	These options are not tunable from 'make config'
-*/
+/* These options are not tunable from 'make config' */
 #define	SCSI_NCR_PROC_INFO_SUPPORT
 
 /*
@@ -97,7 +75,6 @@
 */
 #define SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT
 #define SCSI_NCR_DEBUG_INFO_SUPPORT
-#define SCSI_NCR_PCI_FIX_UP_SUPPORT
 #ifdef	SCSI_NCR_PROC_INFO_SUPPORT
 #	define	SCSI_NCR_USER_COMMAND_SUPPORT
 #	define	SCSI_NCR_USER_INFO_SUPPORT
@@ -111,18 +88,6 @@
 #	define SCSI_NCR_ENABLE_INTEGRITY_CHECK
 #endif
 
-/*==========================================================
-**
-** nvram settings - #define SCSI_NCR_NVRAM_SUPPORT to enable
-**
-**==========================================================
-*/
-
-#ifdef CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
-#define SCSI_NCR_NVRAM_SUPPORT
-/* #define SCSI_NCR_DEBUG_NVRAM */
-#endif
-
 /* ---------------------------------------------------------------------
 ** Take into account kernel configured parameters.
 ** Most of these options can be overridden at startup by a command line.
@@ -172,15 +137,6 @@
 #endif
 
 /*
- * Use normal IO if configured. Forced for alpha.
- */
-#if defined(CONFIG_SCSI_NCR53C8XX_IOMAPPED)
-#define	SCSI_NCR_IOMAPPED
-#elif defined(__alpha__)
-#define	SCSI_NCR_IOMAPPED
-#endif
-
-/*
  * Immediate arbitration
  */
 #if defined(CONFIG_SCSI_NCR53C8XX_IARB)
@@ -331,8 +287,6 @@
 #define SCSI_NCR_MAX_LUN	(1)
 #endif
 
-#ifndef HOSTS_C
-
 /*
 **	These simple macros limit expression involving 
 **	kernel time values (jiffies) to some that have 
@@ -388,15 +342,6 @@
 #define	outw_raw	outw
 #define	outl_raw	outl
 
-#if defined(__i386__)	/* i386 implements full FLAT memory/MMIO model */
-#define readb_raw(a)	(*(volatile unsigned char *) (a))
-#define readw_raw(a)	(*(volatile unsigned short *) (a))
-#define readl_raw(a)	(*(volatile unsigned int *) (a))
-#define writeb_raw(b,a)	((*(volatile unsigned char *) (a)) = (b))
-#define writew_raw(b,a)	((*(volatile unsigned short *) (a)) = (b))
-#define writel_raw(b,a)	((*(volatile unsigned int *) (a)) = (b))
-
-#else	/* Other little-endian */
 #define	readb_raw	readb
 #define	readw_raw	readw
 #define	readl_raw	readl
@@ -405,7 +350,6 @@
 #define	writel_raw	writel
 
 #endif
-#endif
 
 #if !defined(__hppa__) && !defined(__mips__)
 #ifdef	SCSI_NCR_BIG_ENDIAN
@@ -413,18 +357,6 @@
 #endif
 #endif
 
-
-/*
- *  IA32 architecture does not reorder STORES and prevents
- *  LOADS from passing STORES. It is called `program order' 
- *  by Intel and allows device drivers to deal with memory 
- *  ordering by only ensuring that the code is not reordered  
- *  by the compiler when ordering is required.
- *  Other architectures implement a weaker ordering that 
- *  requires memory barriers (and also IO barriers when they 
- *  make sense) to be used.
- */
-
 #define MEMORY_BARRIER()	mb()
 
 
@@ -476,13 +408,6 @@
 /*
  *  Access to the controller chip.
  *
- *  If SCSI_NCR_IOMAPPED is defined, the driver will use 
- *  normal IOs instead of the MEMORY MAPPED IO method  
- *  recommended by PCI specifications.
- *  If all PCI bridges, host brigdes and architectures 
- *  would have been correctly designed for PCI, this 
- *  option would be useless.
- *
  *  If the CPU and the NCR use same endian-ness addressing,
  *  no byte reordering is needed for accessing chip io 
  *  registers. Functions suffixed by '_raw' are assumed 
@@ -493,42 +418,6 @@
  *  blah, ...
  */
 
-#if defined(SCSI_NCR_IOMAPPED)
-/*
- *  IO mapped only input / ouput
- */
-
-#define	INB_OFF(o)		inb (np->base_io + ncr_offb(o))
-#define	OUTB_OFF(o, val)	outb ((val), np->base_io + ncr_offb(o))
-
-#if	defined(__BIG_ENDIAN) && !defined(SCSI_NCR_BIG_ENDIAN)
-
-#define	INW_OFF(o)		inw_l2b (np->base_io + ncr_offw(o))
-#define	INL_OFF(o)		inl_l2b (np->base_io + (o))
-
-#define	OUTW_OFF(o, val)	outw_b2l ((val), np->base_io + ncr_offw(o))
-#define	OUTL_OFF(o, val)	outl_b2l ((val), np->base_io + (o))
-
-#elif	defined(__LITTLE_ENDIAN) && defined(SCSI_NCR_BIG_ENDIAN)
-
-#define	INW_OFF(o)		inw_b2l (np->base_io + ncr_offw(o))
-#define	INL_OFF(o)		inl_b2l (np->base_io + (o))
-
-#define	OUTW_OFF(o, val)	outw_l2b ((val), np->base_io + ncr_offw(o))
-#define	OUTL_OFF(o, val)	outl_l2b ((val), np->base_io + (o))
-
-#else
-
-#define	INW_OFF(o)		inw_raw (np->base_io + ncr_offw(o))
-#define	INL_OFF(o)		inl_raw (np->base_io + (o))
-
-#define	OUTW_OFF(o, val)	outw_raw ((val), np->base_io + ncr_offw(o))
-#define	OUTL_OFF(o, val)	outl_raw ((val), np->base_io + (o))
-
-#endif	/* ENDIANs */
-
-#else	/* defined SCSI_NCR_IOMAPPED */
-
 /*
  *  MEMORY mapped IO input / output
  */
@@ -572,8 +461,6 @@
 
 #endif
 
-#endif	/* defined SCSI_NCR_IOMAPPED */
-
 #define INB(r)		INB_OFF (offsetof(struct ncr_reg,r))
 #define INW(r)		INW_OFF (offsetof(struct ncr_reg,r))
 #define INL(r)		INL_OFF (offsetof(struct ncr_reg,r))
@@ -612,85 +499,10 @@
 
 
 /*
-**	NCR53C8XX Device Ids
-*/
-
-#ifndef PSEUDO_720_ID
-#define PSEUDO_720_ID 0x5a00
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C810
-#define PCI_DEVICE_ID_NCR_53C810 1
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C810AP
-#define PCI_DEVICE_ID_NCR_53C810AP 5
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C815
-#define PCI_DEVICE_ID_NCR_53C815 4
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C820
-#define PCI_DEVICE_ID_NCR_53C820 2
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C825
-#define PCI_DEVICE_ID_NCR_53C825 3
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C860
-#define PCI_DEVICE_ID_NCR_53C860 6
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C875
-#define PCI_DEVICE_ID_NCR_53C875 0xf
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C875J
-#define PCI_DEVICE_ID_NCR_53C875J 0x8f
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C885
-#define PCI_DEVICE_ID_NCR_53C885 0xd
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C895
-#define PCI_DEVICE_ID_NCR_53C895 0xc
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C896
-#define PCI_DEVICE_ID_NCR_53C896 0xb
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C895A
-#define PCI_DEVICE_ID_NCR_53C895A 0x12
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C875A
-#define PCI_DEVICE_ID_NCR_53C875A 0x13
-#endif
-
-#ifndef PCI_DEVICE_ID_NCR_53C1510D
-#define PCI_DEVICE_ID_NCR_53C1510D 0xa
-#endif
-
-#ifndef PCI_DEVICE_ID_LSI_53C1010
-#define PCI_DEVICE_ID_LSI_53C1010 0x20
-#endif
-
-#ifndef PCI_DEVICE_ID_LSI_53C1010_66
-#define PCI_DEVICE_ID_LSI_53C1010_66 0x21
-#endif
-
-
-/*
 **   NCR53C8XX devices features table.
 */
-typedef struct {
-	unsigned short	device_id;
+struct ncr_chip {
 	unsigned short	revision_id;
-	char	*name;
 	unsigned char	burst_max;	/* log-base-2 of max burst */
 	unsigned char	offset_max;
 	unsigned char	nr_divisor;
@@ -698,7 +510,6 @@
 #define FE_LED0		(1<<0)
 #define FE_WIDE		(1<<1)    /* Wide data transfers */
 #define FE_ULTRA	(1<<2)	  /* Ultra speed 20Mtrans/sec */
-#define FE_ULTRA2	(1<<3)	  /* Ultra 2 - 40 Mtrans/sec */
 #define FE_DBLR		(1<<4)	  /* Clock doubler present */
 #define FE_QUAD		(1<<5)	  /* Clock quadrupler present */
 #define FE_ERL		(1<<6)    /* Enable read line */
@@ -717,7 +528,6 @@
 #define FE_NOPM		(1<<19)   /* Scripts handles phase mismatch */
 #define FE_LEDC		(1<<20)   /* Hardware control of LED */
 #define FE_DIFF		(1<<21)   /* Support Differential SCSI */
-#define FE_ULTRA3	(1<<22)   /* Ultra-3 80Mtrans/sec */
 #define FE_66MHZ 	(1<<23)   /* 66MHz PCI Support */
 #define FE_DAC	 	(1<<24)   /* Support DAC cycles (64 bit addressing) */
 #define FE_ISTAT1 	(1<<25)   /* Have ISTAT1, MBOX0, MBOX1 registers */
@@ -727,116 +537,10 @@
 #define FE_EA		(1<<29)   /* 720: Enable Ack */
 
 #define FE_CACHE_SET	(FE_ERL|FE_CLSE|FE_WRIE|FE_ERMP)
-#define FE_SCSI_SET	(FE_WIDE|FE_ULTRA|FE_ULTRA2|FE_DBLR|FE_QUAD|F_CLK80)
+#define FE_SCSI_SET	(FE_WIDE|FE_ULTRA|FE_DBLR|FE_QUAD|F_CLK80)
 #define FE_SPECIAL_SET	(FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|FE_RAM)
-} ncr_chip;
-
-/*
-**	DEL 397 - 53C875 Rev 3 - Part Number 609-0392410 - ITEM 3.
-**	Memory Read transaction terminated by a retry followed by 
-**	Memory Read Line command.
-*/
-#define FE_CACHE0_SET	(FE_CACHE_SET & ~FE_ERL)
-
-/*
-**	DEL 397 - 53C875 Rev 3 - Part Number 609-0392410 - ITEM 5.
-**	On paper, this errata is harmless. But it is a good reason for 
-**	using a shorter programmed burst length (64 DWORDS instead of 128).
-*/
-
-#define SCSI_NCR_CHIP_TABLE						\
-{									\
- {PSEUDO_720_ID, 0x0f, "720",  3,  8, 4,				\
- FE_WIDE|FE_DIFF|FE_EHP|FE_MUX|FE_EA}					\
- ,									\
- {PCI_DEVICE_ID_NCR_53C810, 0x0f, "810",  4,  8, 4,			\
- FE_ERL}								\
- ,									\
- {PCI_DEVICE_ID_NCR_53C810, 0xff, "810a", 4,  8, 4,			\
- FE_CACHE_SET|FE_LDSTR|FE_PFEN|FE_BOF}					\
- ,									\
- {PCI_DEVICE_ID_NCR_53C815, 0xff, "815",  4,  8, 4,			\
- FE_ERL|FE_BOF}								\
- ,									\
- {PCI_DEVICE_ID_NCR_53C820, 0xff, "820",  4,  8, 4,			\
- FE_WIDE|FE_ERL}							\
- ,									\
- {PCI_DEVICE_ID_NCR_53C825, 0x0f, "825",  4,  8, 4,			\
- FE_WIDE|FE_ERL|FE_BOF|FE_DIFF}						\
- ,									\
- {PCI_DEVICE_ID_NCR_53C825, 0xff, "825a", 6,  8, 4,			\
- FE_WIDE|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|FE_RAM|FE_DIFF}	\
- ,									\
- {PCI_DEVICE_ID_NCR_53C860, 0xff, "860",  4,  8, 5,			\
- FE_ULTRA|FE_CACHE_SET|FE_BOF|FE_LDSTR|FE_PFEN}				\
- ,									\
- {PCI_DEVICE_ID_NCR_53C875, 0x01, "875",  6, 16, 5,			\
- FE_WIDE|FE_ULTRA|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|		\
- FE_RAM|FE_DIFF|FE_VARCLK}						\
- ,									\
- {PCI_DEVICE_ID_NCR_53C875, 0xff, "875",  6, 16, 5,			\
- FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|	\
- FE_RAM|FE_DIFF|FE_VARCLK}						\
- ,									\
- {PCI_DEVICE_ID_NCR_53C875J,0xff, "875J", 6, 16, 5,			\
- FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|	\
- FE_RAM|FE_VARCLK}							\
- ,									\
- {PCI_DEVICE_ID_NCR_53C885, 0xff, "885",  6, 16, 5,			\
- FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|	\
- FE_RAM|FE_DIFF|FE_VARCLK}						\
- ,									\
- {PCI_DEVICE_ID_NCR_53C895, 0xff, "895",  6, 31, 7,			\
- FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|	\
- FE_RAM}								\
- ,									\
- {PCI_DEVICE_ID_NCR_53C896, 0xff, "896",  6, 31, 7,			\
- FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|	\
- FE_RAM|FE_RAM8K|FE_64BIT|FE_DAC|FE_IO256|FE_NOPM|FE_LEDC|FE_ISTAT1}	\
- ,									\
- {PCI_DEVICE_ID_NCR_53C895A, 0xff, "895a",  6, 31, 7,			\
- FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|	\
- FE_RAM|FE_RAM8K|FE_DAC|FE_IO256|FE_NOPM|FE_LEDC}			\
- ,									\
- {PCI_DEVICE_ID_NCR_53C875A, 0xff, "875a",  6, 31, 7,			\
- FE_WIDE|FE_ULTRA|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|	\
- FE_RAM|FE_DAC|FE_IO256|FE_NOPM|FE_LEDC}				\
- ,									\
- {PCI_DEVICE_ID_NCR_53C1510D, 0xff, "1510D",  7, 31, 7,			\
- FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|	\
- FE_RAM|FE_IO256}							\
- ,									\
- {PCI_DEVICE_ID_LSI_53C1010, 0xff, "1010-33",  6, 62, 7,		\
- FE_WIDE|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|FE_ISTAT1|	\
- FE_RAM|FE_RAM8K|FE_64BIT|FE_DAC|FE_IO256|FE_NOPM|FE_LEDC|FE_ULTRA3}	\
- ,									\
- {PCI_DEVICE_ID_LSI_53C1010_66, 0xff, "1010-66",  6, 62, 7,		\
- FE_WIDE|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|FE_ISTAT1|	\
- FE_RAM|FE_RAM8K|FE_64BIT|FE_DAC|FE_IO256|FE_NOPM|FE_LEDC|FE_ULTRA3|	\
- FE_66MHZ}								\
-}
+};
 
-/*
- * List of supported NCR chip ids
- */
-#define SCSI_NCR_CHIP_IDS		\
-{					\
-	PSEUDO_720_ID,		\
-	PCI_DEVICE_ID_NCR_53C810,	\
-	PCI_DEVICE_ID_NCR_53C815,	\
-	PCI_DEVICE_ID_NCR_53C820,	\
-	PCI_DEVICE_ID_NCR_53C825,	\
-	PCI_DEVICE_ID_NCR_53C860,	\
-	PCI_DEVICE_ID_NCR_53C875,	\
-	PCI_DEVICE_ID_NCR_53C875J,	\
-	PCI_DEVICE_ID_NCR_53C885,	\
-	PCI_DEVICE_ID_NCR_53C895,	\
-	PCI_DEVICE_ID_NCR_53C896,	\
-	PCI_DEVICE_ID_NCR_53C895A,	\
-	PCI_DEVICE_ID_NCR_53C1510D,	\
- 	PCI_DEVICE_ID_LSI_53C1010,	\
- 	PCI_DEVICE_ID_LSI_53C1010_66	\
-}
 
 /*
 **	Driver setup structure.
@@ -846,30 +550,30 @@
 */
 #define SCSI_NCR_MAX_EXCLUDES 8
 struct ncr_driver_setup {
-	u_char	master_parity;
-	u_char	scsi_parity;
-	u_char	disconnection;
-	u_char	special_features;
-	u_char	force_sync_nego;
-	u_char	reverse_probe;
-	u_char	pci_fix_up;
-	u_char	use_nvram;
-	u_char	verbose;
-	u_char	default_tags;
-	u_short	default_sync;
-	u_short	debug;
-	u_char	burst_max;
-	u_char	led_pin;
-	u_char	max_wide;
-	u_char	settle_delay;
-	u_char	diff_support;
-	u_char	irqm;
-	u_char	bus_check;
-	u_char	optimize;
-	u_char	recovery;
-	u_char	host_id;
-	u_short	iarb;
-	u_long	excludes[SCSI_NCR_MAX_EXCLUDES];
+	u8	master_parity;
+	u8	scsi_parity;
+	u8	disconnection;
+	u8	special_features;
+	u8	force_sync_nego;
+	u8	reverse_probe;
+	u8	pci_fix_up;
+	u8	use_nvram;
+	u8	verbose;
+	u8	default_tags;
+	u16	default_sync;
+	u16	debug;
+	u8	burst_max;
+	u8	led_pin;
+	u8	max_wide;
+	u8	settle_delay;
+	u8	diff_support;
+	u8	irqm;
+	u8	bus_check;
+	u8	optimize;
+	u8	recovery;
+	u8	host_id;
+	u16	iarb;
+	u32	excludes[SCSI_NCR_MAX_EXCLUDES];
 	char	tag_ctrl[100];
 };
 
@@ -935,136 +639,6 @@
 	255					\
 }
 
-#ifdef SCSI_NCR_NVRAM_SUPPORT
-/*
-**	Symbios NvRAM data format
-*/
-#define SYMBIOS_NVRAM_SIZE 368
-#define SYMBIOS_NVRAM_ADDRESS 0x100
-
-struct Symbios_nvram {
-/* Header 6 bytes */
-	u_short type;		/* 0x0000 */
-	u_short byte_count;	/* excluding header/trailer */
-	u_short checksum;
-
-/* Controller set up 20 bytes */
-	u_char	v_major;	/* 0x00 */
-	u_char	v_minor;	/* 0x30 */
-	u32	boot_crc;
-	u_short	flags;
-#define SYMBIOS_SCAM_ENABLE	(1)
-#define SYMBIOS_PARITY_ENABLE	(1<<1)
-#define SYMBIOS_VERBOSE_MSGS	(1<<2)
-#define SYMBIOS_CHS_MAPPING	(1<<3)
-#define SYMBIOS_NO_NVRAM	(1<<3)	/* ??? */
-	u_short	flags1;
-#define SYMBIOS_SCAN_HI_LO	(1)
-	u_short	term_state;
-#define SYMBIOS_TERM_CANT_PROGRAM	(0)
-#define SYMBIOS_TERM_ENABLED		(1)
-#define SYMBIOS_TERM_DISABLED		(2)
-	u_short	rmvbl_flags;
-#define SYMBIOS_RMVBL_NO_SUPPORT	(0)
-#define SYMBIOS_RMVBL_BOOT_DEVICE	(1)
-#define SYMBIOS_RMVBL_MEDIA_INSTALLED	(2)
-	u_char	host_id;
-	u_char	num_hba;	/* 0x04 */
-	u_char	num_devices;	/* 0x10 */
-	u_char	max_scam_devices;	/* 0x04 */
-	u_char	num_valid_scam_devives;	/* 0x00 */
-	u_char	rsvd;
-
-/* Boot order 14 bytes * 4 */
-	struct Symbios_host{
-		u_short	type;		/* 4:8xx / 0:nok */
-		u_short	device_id;	/* PCI device id */
-		u_short	vendor_id;	/* PCI vendor id */
-		u_char	bus_nr;		/* PCI bus number */
-		u_char	device_fn;	/* PCI device/function number << 3*/
-		u_short	word8;
-		u_short	flags;
-#define	SYMBIOS_INIT_SCAN_AT_BOOT	(1)
-		u_short	io_port;	/* PCI io_port address */
-	} host[4];
-
-/* Targets 8 bytes * 16 */
-	struct Symbios_target {
-		u_char	flags;
-#define SYMBIOS_DISCONNECT_ENABLE	(1)
-#define SYMBIOS_SCAN_AT_BOOT_TIME	(1<<1)
-#define SYMBIOS_SCAN_LUNS		(1<<2)
-#define SYMBIOS_QUEUE_TAGS_ENABLED	(1<<3)
-		u_char	rsvd;
-		u_char	bus_width;	/* 0x08/0x10 */
-		u_char	sync_offset;
-		u_short	sync_period;	/* 4*period factor */
-		u_short	timeout;
-	} target[16];
-/* Scam table 8 bytes * 4 */
-	struct Symbios_scam {
-		u_short	id;
-		u_short	method;
-#define SYMBIOS_SCAM_DEFAULT_METHOD	(0)
-#define SYMBIOS_SCAM_DONT_ASSIGN	(1)
-#define SYMBIOS_SCAM_SET_SPECIFIC_ID	(2)
-#define SYMBIOS_SCAM_USE_ORDER_GIVEN	(3)
-		u_short status;
-#define SYMBIOS_SCAM_UNKNOWN		(0)
-#define SYMBIOS_SCAM_DEVICE_NOT_FOUND	(1)
-#define SYMBIOS_SCAM_ID_NOT_SET		(2)
-#define SYMBIOS_SCAM_ID_VALID		(3)
-		u_char	target_id;
-		u_char	rsvd;
-	} scam[4];
-
-	u_char	spare_devices[15*8];
-	u_char	trailer[6];		/* 0xfe 0xfe 0x00 0x00 0x00 0x00 */
-};
-typedef struct Symbios_nvram	Symbios_nvram;
-typedef struct Symbios_host	Symbios_host;
-typedef struct Symbios_target	Symbios_target;
-typedef struct Symbios_scam	Symbios_scam;
-
-/*
-**	Tekram NvRAM data format.
-*/
-#define TEKRAM_NVRAM_SIZE 64
-#define TEKRAM_93C46_NVRAM_ADDRESS 0
-#define TEKRAM_24C16_NVRAM_ADDRESS 0x40
-
-struct Tekram_nvram {
-	struct Tekram_target {
-		u_char	flags;
-#define	TEKRAM_PARITY_CHECK		(1)
-#define TEKRAM_SYNC_NEGO		(1<<1)
-#define TEKRAM_DISCONNECT_ENABLE	(1<<2)
-#define	TEKRAM_START_CMD		(1<<3)
-#define TEKRAM_TAGGED_COMMANDS		(1<<4)
-#define TEKRAM_WIDE_NEGO		(1<<5)
-		u_char	sync_index;
-		u_short	word2;
-	} target[16];
-	u_char	host_id;
-	u_char	flags;
-#define TEKRAM_MORE_THAN_2_DRIVES	(1)
-#define TEKRAM_DRIVES_SUP_1GB		(1<<1)
-#define	TEKRAM_RESET_ON_POWER_ON	(1<<2)
-#define TEKRAM_ACTIVE_NEGATION		(1<<3)
-#define TEKRAM_IMMEDIATE_SEEK		(1<<4)
-#define	TEKRAM_SCAN_LUNS		(1<<5)
-#define	TEKRAM_REMOVABLE_FLAGS		(3<<6)	/* 0: disable; 1: boot device; 2:all */
-	u_char	boot_delay_index;
-	u_char	max_tags_index;
-	u_short	flags1;
-#define TEKRAM_F2_F6_ENABLED		(1)
-	u_short	spare[29];
-};
-typedef struct Tekram_nvram	Tekram_nvram;
-typedef struct Tekram_target	Tekram_target;
-
-#endif /* SCSI_NCR_NVRAM_SUPPORT */
-
 /**************** ORIGINAL CONTENT of ncrreg.h from FreeBSD ******************/
 
 /*-----------------------------------------------------------------
@@ -1075,38 +649,38 @@
 */
 
 struct ncr_reg {
-/*00*/  u_char    nc_scntl0;    /* full arb., ena parity, par->ATN  */
+/*00*/  u8	nc_scntl0;    /* full arb., ena parity, par->ATN  */
 
-/*01*/  u_char    nc_scntl1;    /* no reset                         */
+/*01*/  u8	nc_scntl1;    /* no reset                         */
         #define   ISCON   0x10  /* connected to scsi		    */
         #define   CRST    0x08  /* force reset                      */
         #define   IARB    0x02  /* immediate arbitration            */
 
-/*02*/  u_char    nc_scntl2;    /* no disconnect expected           */
+/*02*/  u8	nc_scntl2;    /* no disconnect expected           */
 	#define   SDU     0x80  /* cmd: disconnect will raise error */
 	#define   CHM     0x40  /* sta: chained mode                */
 	#define   WSS     0x08  /* sta: wide scsi send           [W]*/
 	#define   WSR     0x01  /* sta: wide scsi received       [W]*/
 
-/*03*/  u_char    nc_scntl3;    /* cnf system clock dependent       */
+/*03*/  u8	nc_scntl3;    /* cnf system clock dependent       */
 	#define   EWS     0x08  /* cmd: enable wide scsi         [W]*/
 	#define   ULTRA   0x80  /* cmd: ULTRA enable                */
 				/* bits 0-2, 7 rsvd for C1010       */
 
-/*04*/  u_char    nc_scid;	/* cnf host adapter scsi address    */
+/*04*/  u8	nc_scid;	/* cnf host adapter scsi address    */
 	#define   RRE     0x40  /* r/w:e enable response to resel.  */
 	#define   SRE     0x20  /* r/w:e enable response to select  */
 
-/*05*/  u_char    nc_sxfer;	/* ### Sync speed and count         */
+/*05*/  u8	nc_sxfer;	/* ### Sync speed and count         */
 				/* bits 6-7 rsvd for C1010          */
 
-/*06*/  u_char    nc_sdid;	/* ### Destination-ID               */
+/*06*/  u8	nc_sdid;	/* ### Destination-ID               */
 
-/*07*/  u_char    nc_gpreg;	/* ??? IO-Pins                      */
+/*07*/  u8	nc_gpreg;	/* ??? IO-Pins                      */
 
-/*08*/  u_char    nc_sfbr;	/* ### First byte in phase          */
+/*08*/  u8	nc_sfbr;	/* ### First byte in phase          */
 
-/*09*/  u_char    nc_socl;
+/*09*/  u8	nc_socl;
 	#define   CREQ	  0x80	/* r/w: SCSI-REQ                    */
 	#define   CACK	  0x40	/* r/w: SCSI-ACK                    */
 	#define   CBSY	  0x20	/* r/w: SCSI-BSY                    */
@@ -1116,11 +690,11 @@
 	#define   CC_D	  0x02	/* r/w: SCSI-C_D                    */
 	#define   CI_O	  0x01	/* r/w: SCSI-I_O                    */
 
-/*0a*/  u_char    nc_ssid;
+/*0a*/  u8	nc_ssid;
 
-/*0b*/  u_char    nc_sbcl;
+/*0b*/  u8	nc_sbcl;
 
-/*0c*/  u_char    nc_dstat;
+/*0c*/  u8	nc_dstat;
         #define   DFE     0x80  /* sta: dma fifo empty              */
         #define   MDPE    0x40  /* int: master data parity error    */
         #define   BF      0x20  /* int: script: bus fault           */
@@ -1129,7 +703,7 @@
         #define   SIR     0x04  /* int: script: interrupt instruct. */
         #define   IID     0x01  /* int: script: illegal instruct.   */
 
-/*0d*/  u_char    nc_sstat0;
+/*0d*/  u8	nc_sstat0;
         #define   ILF     0x80  /* sta: data in SIDL register lsb   */
         #define   ORF     0x40  /* sta: data in SODR register lsb   */
         #define   OLF     0x20  /* sta: data in SODL register lsb   */
@@ -1139,22 +713,22 @@
         #define   IRST    0x02  /* sta: scsi reset signal           */
         #define   SDP     0x01  /* sta: scsi parity signal          */
 
-/*0e*/  u_char    nc_sstat1;
+/*0e*/  u8	nc_sstat1;
 	#define   FF3210  0xf0	/* sta: bytes in the scsi fifo      */
 
-/*0f*/  u_char    nc_sstat2;
+/*0f*/  u8	nc_sstat2;
         #define   ILF1    0x80  /* sta: data in SIDL register msb[W]*/
         #define   ORF1    0x40  /* sta: data in SODR register msb[W]*/
         #define   OLF1    0x20  /* sta: data in SODL register msb[W]*/
         #define   DM      0x04  /* sta: DIFFSENS mismatch (895/6 only) */
         #define   LDSC    0x02  /* sta: disconnect & reconnect      */
 
-/*10*/  u_char    nc_dsa;	/* --> Base page                    */
-/*11*/  u_char    nc_dsa1;
-/*12*/  u_char    nc_dsa2;
-/*13*/  u_char    nc_dsa3;
+/*10*/  u8	nc_dsa;	/* --> Base page                    */
+/*11*/  u8	nc_dsa1;
+/*12*/  u8	nc_dsa2;
+/*13*/  u8	nc_dsa3;
 
-/*14*/  u_char    nc_istat;	/* --> Main Command and status      */
+/*14*/  u8	nc_istat;	/* --> Main Command and status      */
         #define   CABRT   0x80  /* cmd: abort current operation     */
         #define   SRST    0x40  /* mod: reset chip                  */
         #define   SIGP    0x20  /* r/w: message from host to ncr    */
@@ -1164,23 +738,23 @@
         #define   SIP     0x02  /* sta: scsi-interrupt              */
         #define   DIP     0x01  /* sta: host/script interrupt       */
 
-/*15*/  u_char    nc_istat1;	/* 896 and later cores only */
+/*15*/  u8	nc_istat1;	/* 896 and later cores only */
         #define   FLSH    0x04  /* sta: chip is flushing            */
         #define   SRUN    0x02  /* sta: scripts are running         */
         #define   SIRQD   0x01  /* r/w: disable INT pin             */
 
-/*16*/  u_char    nc_mbox0;	/* 896 and later cores only */
-/*17*/  u_char    nc_mbox1;	/* 896 and later cores only */
+/*16*/  u8	nc_mbox0;	/* 896 and later cores only */
+/*17*/  u8	nc_mbox1;	/* 896 and later cores only */
 
-/*18*/	u_char	  nc_ctest0;
+/*18*/	u8	nc_ctest0;
 	#define   EHP     0x04	/* 720 even host parity             */
-/*19*/  u_char    nc_ctest1;
+/*19*/  u8	nc_ctest1;
 
-/*1a*/  u_char    nc_ctest2;
+/*1a*/  u8	nc_ctest2;
 	#define   CSIGP   0x40
 				/* bits 0-2,7 rsvd for C1010        */
 
-/*1b*/  u_char    nc_ctest3;
+/*1b*/  u8	nc_ctest3;
 	#define   FLF     0x08  /* cmd: flush dma fifo              */
 	#define   CLF	  0x04	/* cmd: clear dma fifo		    */
 	#define   FM      0x02  /* mod: fetch pin mode              */
@@ -1189,38 +763,38 @@
 
 /*1c*/  u32    nc_temp;	/* ### Temporary stack              */
 
-/*20*/	u_char	  nc_dfifo;
-/*21*/  u_char    nc_ctest4;
+/*20*/	u8	nc_dfifo;
+/*21*/  u8	nc_ctest4;
 	#define   MUX     0x80  /* 720 host bus multiplex mode      */
 	#define   BDIS    0x80  /* mod: burst disable               */
 	#define   MPEE    0x08  /* mod: master parity error enable  */
 
-/*22*/  u_char    nc_ctest5;
+/*22*/  u8	nc_ctest5;
 	#define   DFS     0x20  /* mod: dma fifo size               */
 				/* bits 0-1, 3-7 rsvd for C1010          */
-/*23*/  u_char    nc_ctest6;
+/*23*/  u8	nc_ctest6;
 
 /*24*/  u32    nc_dbc;	/* ### Byte count and command       */
 /*28*/  u32    nc_dnad;	/* ### Next command register        */
 /*2c*/  u32    nc_dsp;	/* --> Script Pointer               */
 /*30*/  u32    nc_dsps;	/* --> Script pointer save/opcode#2 */
 
-/*34*/  u_char     nc_scratcha;  /* Temporary register a            */
-/*35*/  u_char     nc_scratcha1;
-/*36*/  u_char     nc_scratcha2;
-/*37*/  u_char     nc_scratcha3;
+/*34*/  u8	nc_scratcha;  /* Temporary register a            */
+/*35*/  u8	nc_scratcha1;
+/*36*/  u8	nc_scratcha2;
+/*37*/  u8	nc_scratcha3;
 
-/*38*/  u_char    nc_dmode;
+/*38*/  u8	nc_dmode;
 	#define   BL_2    0x80  /* mod: burst length shift value +2 */
 	#define   BL_1    0x40  /* mod: burst length shift value +1 */
 	#define   ERL     0x08  /* mod: enable read line            */
 	#define   ERMP    0x04  /* mod: enable read multiple        */
 	#define   BOF     0x02  /* mod: burst op code fetch         */
 
-/*39*/  u_char    nc_dien;
-/*3a*/  u_char    nc_sbr;
+/*39*/  u8	nc_dien;
+/*3a*/  u8	nc_sbr;
 
-/*3b*/  u_char    nc_dcntl;	/* --> Script execution control     */
+/*3b*/  u8	nc_dcntl;	/* --> Script execution control     */
 	#define   CLSE    0x80  /* mod: cache line size enable      */
 	#define   PFF     0x40  /* cmd: pre-fetch flush             */
 	#define   PFEN    0x20  /* mod: pre-fetch enable            */
@@ -1232,10 +806,10 @@
  	#define	  NOCOM   0x01	/* cmd: protect sfbr while reselect */
 				/* bits 0-1 rsvd for C1010          */
 
-/*3c*/  u32    nc_adder;
+/*3c*/  u32	nc_adder;
 
-/*40*/  u_short   nc_sien;	/* -->: interrupt enable            */
-/*42*/  u_short   nc_sist;	/* <--: interrupt status            */
+/*40*/  u16	nc_sien;	/* -->: interrupt enable            */
+/*42*/  u16	nc_sist;	/* <--: interrupt status            */
         #define   SBMC    0x1000/* sta: SCSI Bus Mode Change (895/6 only) */
         #define   STO     0x0400/* sta: timeout (select)            */
         #define   GEN     0x0200/* sta: timeout (general)           */
@@ -1249,34 +823,34 @@
         #define   RST     0x02  /* sta: scsi bus reset detected     */
         #define   PAR     0x01  /* sta: scsi parity error           */
 
-/*44*/  u_char    nc_slpar;
-/*45*/  u_char    nc_swide;
-/*46*/  u_char    nc_macntl;
-/*47*/  u_char    nc_gpcntl;
-/*48*/  u_char    nc_stime0;    /* cmd: timeout for select&handshake*/
-/*49*/  u_char    nc_stime1;    /* cmd: timeout user defined        */
-/*4a*/  u_short   nc_respid;    /* sta: Reselect-IDs                */
+/*44*/  u8	nc_slpar;
+/*45*/  u8	nc_swide;
+/*46*/  u8	nc_macntl;
+/*47*/  u8	nc_gpcntl;
+/*48*/  u8	nc_stime0;    /* cmd: timeout for select&handshake*/
+/*49*/  u8	nc_stime1;    /* cmd: timeout user defined        */
+/*4a*/  u16   nc_respid;    /* sta: Reselect-IDs                */
 
-/*4c*/  u_char    nc_stest0;
+/*4c*/  u8	nc_stest0;
 
-/*4d*/  u_char    nc_stest1;
+/*4d*/  u8	nc_stest1;
 	#define   SCLK    0x80	/* Use the PCI clock as SCSI clock	*/
 	#define   DBLEN   0x08	/* clock doubler running		*/
 	#define   DBLSEL  0x04	/* clock doubler selected		*/
   
 
-/*4e*/  u_char    nc_stest2;
+/*4e*/  u8	nc_stest2;
 	#define   ROF     0x40	/* reset scsi offset (after gross error!) */
 	#define   DIF     0x20  /* 720 SCSI differential mode             */
 	#define   EXT     0x02  /* extended filtering                     */
 
-/*4f*/  u_char    nc_stest3;
+/*4f*/  u8	nc_stest3;
 	#define   TE     0x80	/* c: tolerAnt enable */
 	#define   HSC    0x20	/* c: Halt SCSI Clock */
 	#define   CSF    0x02	/* c: clear scsi fifo */
 
-/*50*/  u_short   nc_sidl;	/* Lowlevel: latched from scsi data */
-/*52*/  u_char    nc_stest4;
+/*50*/  u16   nc_sidl;	/* Lowlevel: latched from scsi data */
+/*52*/  u8	nc_stest4;
 	#define   SMODE  0xc0	/* SCSI bus mode      (895/6 only) */
 	#define    SMODE_HVD 0x40	/* High Voltage Differential       */
 	#define    SMODE_SE  0x80	/* Single Ended                    */
@@ -1284,9 +858,9 @@
 	#define   LCKFRQ 0x20	/* Frequency Lock (895/6 only)     */
 				/* bits 0-5 rsvd for C1010          */
 
-/*53*/  u_char    nc_53_;
-/*54*/  u_short   nc_sodl;	/* Lowlevel: data out to scsi data  */
-/*56*/	u_char    nc_ccntl0;	/* Chip Control 0 (896)             */
+/*53*/  u8	nc_53_;
+/*54*/  u16	nc_sodl;	/* Lowlevel: data out to scsi data  */
+/*56*/	u8	nc_ccntl0;	/* Chip Control 0 (896)             */
 	#define   ENPMJ  0x80	/* Enable Phase Mismatch Jump       */
 	#define   PMJCTL 0x40	/* Phase Mismatch Jump Control      */
 	#define   ENNDJ  0x20	/* Enable Non Data PM Jump          */
@@ -1294,7 +868,7 @@
 	#define   DILS   0x02	/* Disable Internal Load/Store      */
 	#define   DPR    0x01	/* Disable Pipe Req                 */
 
-/*57*/	u_char    nc_ccntl1;	/* Chip Control 1 (896)             */
+/*57*/	u8	nc_ccntl1;	/* Chip Control 1 (896)             */
 	#define   ZMOD   0x80	/* High Impedance Mode              */
 	#define	  DIC	 0x10	/* Disable Internal Cycles	    */
 	#define   DDAC   0x08	/* Disable Dual Address Cycle       */
@@ -1302,23 +876,23 @@
 	#define   EXTIBMV 0x02	/* Enable 64-bit Table Ind. BMOV    */
 	#define   EXDBMV 0x01	/* Enable 64-bit Direct BMOV        */
 
-/*58*/  u_short   nc_sbdl;	/* Lowlevel: data from scsi data    */
-/*5a*/  u_short   nc_5a_;
+/*58*/  u16	nc_sbdl;	/* Lowlevel: data from scsi data    */
+/*5a*/  u16	nc_5a_;
 
-/*5c*/  u_char    nc_scr0;	/* Working register B               */
-/*5d*/  u_char    nc_scr1;	/*                                  */
-/*5e*/  u_char    nc_scr2;	/*                                  */
-/*5f*/  u_char    nc_scr3;	/*                                  */
-
-/*60*/  u_char    nc_scrx[64];	/* Working register C-R             */
-/*a0*/	u32   nc_mmrs;	/* Memory Move Read Selector        */
-/*a4*/	u32   nc_mmws;	/* Memory Move Write Selector       */
-/*a8*/	u32   nc_sfs;	/* Script Fetch Selector            */
-/*ac*/	u32   nc_drs;	/* DSA Relative Selector            */
-/*b0*/	u32   nc_sbms;	/* Static Block Move Selector       */
-/*b4*/	u32   nc_dbms;	/* Dynamic Block Move Selector      */
-/*b8*/	u32   nc_dnad64;	/* DMA Next Address 64              */
-/*bc*/	u_short   nc_scntl4;    /* C1010 only                       */
+/*5c*/  u8	nc_scr0;	/* Working register B               */
+/*5d*/  u8	nc_scr1;	/*                                  */
+/*5e*/  u8	nc_scr2;	/*                                  */
+/*5f*/  u8	nc_scr3;	/*                                  */
+
+/*60*/  u8	nc_scrx[64];	/* Working register C-R             */
+/*a0*/	u32	nc_mmrs;	/* Memory Move Read Selector        */
+/*a4*/	u32	nc_mmws;	/* Memory Move Write Selector       */
+/*a8*/	u32	nc_sfs;		/* Script Fetch Selector            */
+/*ac*/	u32	nc_drs;		/* DSA Relative Selector            */
+/*b0*/	u32	nc_sbms;	/* Static Block Move Selector       */
+/*b4*/	u32	nc_dbms;	/* Dynamic Block Move Selector      */
+/*b8*/	u32	nc_dnad64;	/* DMA Next Address 64              */
+/*bc*/	u16	nc_scntl4;	/* C1010 only                       */
 	#define   U3EN   0x80	/* Enable Ultra 3                   */
 	#define   AIPEN	 0x40   /* Allow check upper byte lanes     */
 	#define   XCLKH_DT 0x08 /* Extra clock of data hold on DT
@@ -1326,37 +900,37 @@
 	#define   XCLKH_ST 0x04 /* Extra clock of data hold on ST
 					transfer edge	            */
 
-/*be*/  u_char   nc_aipcntl0;	/* Epat Control 1 C1010 only        */
-/*bf*/  u_char   nc_aipcntl1;	/* AIP Control C1010_66 Only        */
+/*be*/  u8	nc_aipcntl0;	/* Epat Control 1 C1010 only        */
+/*bf*/  u8	nc_aipcntl1;	/* AIP Control C1010_66 Only        */
 
-/*c0*/	u32   nc_pmjad1;	/* Phase Mismatch Jump Address 1    */
-/*c4*/	u32   nc_pmjad2;	/* Phase Mismatch Jump Address 2    */
-/*c8*/	u_char    nc_rbc;	/* Remaining Byte Count             */
-/*c9*/	u_char    nc_rbc1;	/*                                  */
-/*ca*/	u_char    nc_rbc2;	/*                                  */
-/*cb*/	u_char    nc_rbc3;	/*                                  */
-
-/*cc*/	u_char    nc_ua;	/* Updated Address                  */
-/*cd*/	u_char    nc_ua1;	/*                                  */
-/*ce*/	u_char    nc_ua2;	/*                                  */
-/*cf*/	u_char    nc_ua3;	/*                                  */
-/*d0*/	u32   nc_esa;	/* Entry Storage Address            */
-/*d4*/	u_char    nc_ia;	/* Instruction Address              */
-/*d5*/	u_char    nc_ia1;
-/*d6*/	u_char    nc_ia2;
-/*d7*/	u_char    nc_ia3;
-/*d8*/	u32   nc_sbc;	/* SCSI Byte Count (3 bytes only)   */
-/*dc*/	u32   nc_csbc;	/* Cumulative SCSI Byte Count       */
-
-                                /* Following for C1010 only         */
-/*e0*/ u_short    nc_crcpad;    /* CRC Value                        */
-/*e2*/ u_char     nc_crccntl0;  /* CRC control register             */
+/*c0*/	u32	nc_pmjad1;	/* Phase Mismatch Jump Address 1    */
+/*c4*/	u32	nc_pmjad2;	/* Phase Mismatch Jump Address 2    */
+/*c8*/	u8	nc_rbc;		/* Remaining Byte Count             */
+/*c9*/	u8	nc_rbc1;	/*                                  */
+/*ca*/	u8	nc_rbc2;	/*                                  */
+/*cb*/	u8	nc_rbc3;	/*                                  */
+
+/*cc*/	u8	nc_ua;		/* Updated Address                  */
+/*cd*/	u8	nc_ua1;		/*                                  */
+/*ce*/	u8	nc_ua2;		/*                                  */
+/*cf*/	u8	nc_ua3;		/*                                  */
+/*d0*/	u32	nc_esa;		/* Entry Storage Address            */
+/*d4*/	u8	nc_ia;		/* Instruction Address              */
+/*d5*/	u8	nc_ia1;
+/*d6*/	u8	nc_ia2;
+/*d7*/	u8	nc_ia3;
+/*d8*/	u32	nc_sbc;		/* SCSI Byte Count (3 bytes only)   */
+/*dc*/	u32	nc_csbc;	/* Cumulative SCSI Byte Count       */
+
+				/* Following for C1010 only         */
+/*e0*/  u16	nc_crcpad;	/* CRC Value                        */
+/*e2*/  u8	nc_crccntl0;	/* CRC control register             */
 	#define   SNDCRC  0x10	/* Send CRC Request                 */
-/*e3*/ u_char     nc_crccntl1;  /* CRC control register             */
-/*e4*/ u32    nc_crcdata;   /* CRC data register                */ 
-/*e8*/ u32	  nc_e8_;	/* rsvd 			    */
-/*ec*/ u32	  nc_ec_;	/* rsvd 			    */
-/*f0*/ u_short    nc_dfbc;      /* DMA FIFO byte count              */ 
+/*e3*/  u8	nc_crccntl1;	/* CRC control register             */
+/*e4*/  u32	nc_crcdata;	/* CRC data register                */ 
+/*e8*/  u32	nc_e8_;		/* rsvd 			    */
+/*ec*/  u32	nc_ec_;		/* rsvd 			    */
+/*f0*/  u16	nc_dfbc;	/* DMA FIFO byte count              */ 
 
 };
 
@@ -1449,17 +1023,17 @@
 
 #ifdef SCSI_NCR_BIG_ENDIAN
 struct scr_tblsel {
-        u_char  sel_scntl3;
-        u_char  sel_id;
-        u_char  sel_sxfer;
-        u_char  sel_scntl4;	
+        u8	sel_scntl3;
+        u8	sel_id;
+        u8	sel_sxfer;
+        u8	sel_scntl4;	
 };
 #else
 struct scr_tblsel {
-        u_char  sel_scntl4;	
-        u_char  sel_sxfer;
-        u_char  sel_id;
-        u_char  sel_scntl3;
+        u8	sel_scntl4;	
+        u8	sel_sxfer;
+        u8	sel_id;
+        u8	sel_scntl3;
 };
 #endif
 
@@ -1763,6 +1337,4 @@
  * End of ncrreg from FreeBSD
  */
 
-#endif /* !defined HOSTS_C */
-
 #endif /* defined SYM53C8XX_DEFS_H */
--- diff/drivers/scsi/t128.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/t128.c	2004-07-01 21:32:44.000000000 +0100
@@ -118,7 +118,7 @@
 #include <linux/delay.h>
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "t128.h"
 #define AUTOPROBE_IRQ
 #include "NCR5380.h"
--- diff/drivers/scsi/tmscsim.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/tmscsim.c	2004-07-01 21:32:44.000000000 +0100
@@ -172,6 +172,11 @@
  *	2.1b1 04/01/31	GL	(applied 05.04) Remove internal		*
  *				command-queuing.			*
  *	2.1b2 04/02/01	CH	(applied 05.04) Fix error-handling	*
+ *	2.1c  04/05/23  GL	Update to use the new pci_driver API,	*
+ *				some scsi EH updates, more cleanup.	*
+ *	2.1d  04/05/27	GL	Moved setting of scan_devices to	*
+ *				slave_alloc/_configure/_destroy, as	*
+ *				suggested by CH.			*
  ***********************************************************************/
 
 /* Uncomment SA_INTERRUPT, if the driver refuses to share its IRQ with other devices */
@@ -216,11 +221,8 @@
 #endif
 #define DCBDEBUG1(x) C_NOP
 
-/* Includes */
+#include <linux/config.h>
 #include <linux/module.h>
-#include <asm/dma.h>
-#include <asm/io.h>
-#include <asm/system.h>
 #include <linux/delay.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
@@ -230,45 +232,30 @@
 #include <linux/pci.h>
 #include <linux/proc_fs.h>
 #include <linux/string.h>
-#include <linux/ctype.h>
 #include <linux/mm.h>
-#include <linux/config.h>
-#include <linux/version.h>
 #include <linux/blkdev.h>
 #include <linux/timer.h>
 #include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <asm/io.h>
 
+#if 0
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#else
 #include "scsi.h"
-#include "hosts.h"
-#include <linux/stat.h>
+#endif
+#include <scsi/scsi_host.h>
 #include <scsi/scsicam.h>
 
 #include "dc390.h"
 
 #define PCI_DEVICE_ID_AMD53C974 	PCI_DEVICE_ID_AMD_SCSI
 
-/* Locking */
-
-/* Note: Starting from 2.1.9x, the mid-level scsi code issues a 
- * spinlock_irqsave (&io_request_lock) before calling the driver's 
- * routines, so we don't need to lock, except in the IRQ handler.
- * The policy 3, let the midlevel scsi code do the io_request_locks
- * and us locking on a driver specific lock, shouldn't hurt anybody; it
- * just causes a minor performance degradation for setting the locks.
- */
-
-/* spinlock things
- * level 3: lock on both adapter specific locks and (global) io_request_lock
- * level 2: lock on adapter specific locks only
- * level 1: rely on the locking of the mid level code (io_request_lock)
- * undef  : traditional save_flags; cli; restore_flags;
- */
-
-#include <linux/init.h>
-#include <linux/spinlock.h>
 
-#if defined(MODULE)
-static struct pci_device_id tmscsim_pci_tbl[] = {
+ static struct pci_device_id tmscsim_pci_tbl[] = {
 	{
 		.vendor		= PCI_VENDOR_ID_AMD,
 		.device		= PCI_DEVICE_ID_AMD53C974,
@@ -278,91 +265,61 @@
 	{ }		/* Terminating entry */
 };
 MODULE_DEVICE_TABLE(pci, tmscsim_pci_tbl);
-#endif
-	
-#define USE_SPINLOCKS 1
-
-#define DC390_IFLAGS unsigned long iflags
-#define DC390_LOCK_IO(dev) spin_lock_irqsave (((struct Scsi_Host *)dev)->host_lock, iflags)
-#define DC390_UNLOCK_IO(dev) spin_unlock_irqrestore (((struct Scsi_Host *)dev)->host_lock, iflags)
-
-/* These macros are used for uniform access to 2.0.x and 2.1.x PCI config space*/
-
-#define PDEV pdev
-#define PDEVDECL struct pci_dev *pdev
-#define PDEVDECL0 struct pci_dev *pdev = NULL
-#define PDEVDECL1 struct pci_dev *pdev
-#define PDEVSET pACB->pdev=pdev
-#define PDEVSET1 pdev=pACB->pdev
-#define PCI_WRITE_CONFIG_BYTE(pd, rv, bv) pci_write_config_byte (pd, rv, bv)
-#define PCI_READ_CONFIG_BYTE(pd, rv, bv) pci_read_config_byte (pd, rv, bv)
-#define PCI_WRITE_CONFIG_WORD(pd, rv, bv) pci_write_config_word (pd, rv, bv)
-#define PCI_READ_CONFIG_WORD(pd, rv, bv) pci_read_config_word (pd, rv, bv)
-#define PCI_PRESENT (1)
-#define PCI_GET_IO_AND_IRQ do{io_port = pci_resource_start (pdev, 0); irq = pdev->irq;} while(0)
 
 #include "tmscsim.h"
 
-#ifndef __init
-# define __init
-#endif
-
-static UCHAR dc390_StartSCSI( PACB pACB, PDCB pDCB, PSRB pSRB );
-static void dc390_DataOut_0( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_DataIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_Command_0( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_Status_0( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_MsgOut_0( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_MsgIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_DataOutPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_DataInPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_CommandPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_StatusPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_MsgOutPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_MsgInPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_Nop_0( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-static void dc390_Nop_1( PACB pACB, PSRB pSRB, PUCHAR psstatus);
-
-static void dc390_SetXferRate( PACB pACB, PDCB pDCB );
-static void dc390_Disconnect( PACB pACB );
-static void dc390_Reselect( PACB pACB );
-static void dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB );
-static void dc390_DoingSRB_Done( PACB pACB, PSCSICMD cmd );
-static void dc390_ScsiRstDetect( PACB pACB );
-static void dc390_ResetSCSIBus( PACB pACB );
-static void __inline__ dc390_RequestSense( PACB pACB, PDCB pDCB, PSRB pSRB );
-static void __inline__ dc390_InvalidCmd( PACB pACB );
-static void __inline__ dc390_EnableMsgOut_Abort (PACB, PSRB);
-static void dc390_remove_dev (PACB pACB, PDCB pDCB);
+static u8 dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB );
+static void dc390_DataOut_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_DataIn_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_Command_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_Status_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_MsgOut_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_MsgIn_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_DataOutPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_DataInPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_CommandPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_StatusPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_MsgOutPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_MsgInPhase( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_Nop_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+static void dc390_Nop_1( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus);
+
+static void dc390_SetXferRate( struct dc390_acb* pACB, struct dc390_dcb* pDCB );
+static void dc390_Disconnect( struct dc390_acb* pACB );
+static void dc390_Reselect( struct dc390_acb* pACB );
+static void dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB );
+static void dc390_DoingSRB_Done( struct dc390_acb* pACB, struct scsi_cmnd * cmd);
+static void dc390_ScsiRstDetect( struct dc390_acb* pACB );
+static void dc390_ResetSCSIBus( struct dc390_acb* pACB );
+static void __inline__ dc390_RequestSense( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB );
+static void __inline__ dc390_InvalidCmd( struct dc390_acb* pACB );
+static void __inline__ dc390_EnableMsgOut_Abort (struct dc390_acb*, struct dc390_srb*);
 static irqreturn_t do_DC390_Interrupt( int, void *, struct pt_regs *);
 
-static int    dc390_initAdapter( PSH psh, ULONG io_port, UCHAR Irq, UCHAR index );
-static void   dc390_initDCB( PACB pACB, PDCB *ppDCB, UCHAR id, UCHAR lun);
-static void   dc390_updateDCB (PACB pACB, PDCB pDCB);
-
-static int DC390_release(struct Scsi_Host *host);
-static int dc390_shutdown (struct Scsi_Host *host);
-
-static PACB	dc390_pACB_start= NULL;
-static PACB	dc390_pACB_current = NULL;
-static ULONG	dc390_lastabortedpid = 0;
-static UINT	dc390_laststatus = 0;
-static UCHAR	dc390_adapterCnt = 0;
+static int    dc390_initAdapter(struct Scsi_Host *psh, unsigned long io_port, u8 Irq, u8 index );
+static void   dc390_updateDCB (struct dc390_acb* pACB, struct dc390_dcb* pDCB);
+
+static int DC390_proc_info (struct Scsi_Host *shpnt, char *buffer, char **start,
+			    off_t offset, int length, int inout);
+
+static struct dc390_acb*	dc390_pACB_start= NULL;
+static struct dc390_acb*	dc390_pACB_current = NULL;
+static unsigned long	dc390_lastabortedpid = 0;
+static u32	dc390_laststatus = 0;
+static u8	dc390_adapterCnt = 0;
 
 /* Startup values, to be overriden on the commandline */
 static int tmscsim[] = {-2, -2, -2, -2, -2, -2};
+static int tmscsim_paramnum = ARRAY_SIZE(tmscsim);
 
-#if defined(MODULE)
-MODULE_PARM(tmscsim, "1-6i");
+module_param_array(tmscsim, int, tmscsim_paramnum, 0);
 MODULE_PARM_DESC(tmscsim, "Host SCSI ID, Speed (0=10MHz), Device Flags, Adapter Flags, Max Tags (log2(tags)-1), DelayReset (s)");
 MODULE_AUTHOR("C.L. Huang / Kurt Garloff");
 MODULE_DESCRIPTION("SCSI host adapter driver for Tekram DC390 and other AMD53C974A based PCI SCSI adapters");
 MODULE_LICENSE("GPL");
-
 MODULE_SUPPORTED_DEVICE("sd,sr,sg,st");
-#endif
 
-static PVOID dc390_phase0[]={
+static void *dc390_phase0[]={
        dc390_DataOut_0,
        dc390_DataIn_0,
        dc390_Command_0,
@@ -374,7 +331,7 @@
        dc390_Nop_1
        };
 
-static PVOID dc390_phase1[]={
+static void *dc390_phase1[]={
        dc390_DataOutPhase,
        dc390_DataInPhase,
        dc390_CommandPhase,
@@ -413,15 +370,15 @@
 #endif   
 
 /* Devices erroneously pretending to be able to do TagQ */
-static UCHAR  dc390_baddevname1[2][28] ={
+static u8  dc390_baddevname1[2][28] ={
        "SEAGATE ST3390N         9546",
        "HP      C3323-300       4269"};
 #define BADDEVCNT	2
 
 static char*  dc390_adapname = "DC390";
-static UCHAR  dc390_eepromBuf[MAX_ADAPTER_NUM][EE_LEN];
-static UCHAR  dc390_clock_period1[] = {4, 5, 6, 7, 8, 10, 13, 20};
-static UCHAR  dc390_clock_speed[] = {100,80,67,57,50, 40, 31, 20};
+static u8  dc390_eepromBuf[MAX_ADAPTER_NUM][EE_LEN];
+static u8  dc390_clock_period1[] = {4, 5, 6, 7, 8, 10, 13, 20};
+static u8  dc390_clock_speed[] = {100,80,67,57,50, 40, 31, 20};
 
 /***********************************************************************
  * Functions for access to DC390 EEPROM
@@ -430,51 +387,50 @@
  **********************************************************************/
 
 
-static void __init dc390_EnDisableCE( UCHAR mode, PDEVDECL, PUCHAR regval )
+static void __devinit dc390_EnDisableCE(u8 mode, struct pci_dev *pdev, u8 *regval)
 {
-    UCHAR bval;
+    u8 bval;
 
     bval = 0;
     if(mode == ENABLE_CE)
 	*regval = 0xc0;
     else
 	*regval = 0x80;
-    PCI_WRITE_CONFIG_BYTE(PDEV, *regval, bval);
+    pci_write_config_byte(pdev, *regval, bval);
     if(mode == DISABLE_CE)
-        PCI_WRITE_CONFIG_BYTE(PDEV, *regval, bval);
+        pci_write_config_byte(pdev, *regval, bval);
     udelay(160);
 }
 
 
 /* Override EEprom values with explicitly set values */
-static void __init dc390_EEprom_Override (UCHAR index)
+static void __devinit dc390_EEprom_Override (u8 index)
 {
-    PUCHAR ptr;
-    UCHAR  id;
-    ptr = (PUCHAR) dc390_eepromBuf[index];
+    u8 *ptr = (u8 *) dc390_eepromBuf[index];
+    u8 id;
     
     /* Adapter Settings */
     if (tmscsim[0] != -2)
-	ptr[EE_ADAPT_SCSI_ID] = (UCHAR)tmscsim[0];	/* Adapter ID */
+	ptr[EE_ADAPT_SCSI_ID] = (u8)tmscsim[0];	/* Adapter ID */
     if (tmscsim[3] != -2)
-	ptr[EE_MODE2] = (UCHAR)tmscsim[3];
+	ptr[EE_MODE2] = (u8)tmscsim[3];
     if (tmscsim[5] != -2)
 	ptr[EE_DELAY] = tmscsim[5];			/* Reset delay */
     if (tmscsim[4] != -2)
-	ptr[EE_TAG_CMD_NUM] = (UCHAR)tmscsim[4];	/* Tagged Cmds */
+	ptr[EE_TAG_CMD_NUM] = (u8)tmscsim[4];	/* Tagged Cmds */
     
     /* Device Settings */
     for (id = 0; id < MAX_SCSI_ID; id++)
     {
 	if (tmscsim[2] != -2)
-		ptr[id<<2] = (UCHAR)tmscsim[2];		/* EE_MODE1 */
+		ptr[id<<2] = (u8)tmscsim[2];		/* EE_MODE1 */
 	if (tmscsim[1] != -2)
-		ptr[(id<<2) + 1] = (UCHAR)tmscsim[1];	/* EE_Speed */
+		ptr[(id<<2) + 1] = (u8)tmscsim[1];	/* EE_Speed */
     }
 }
 
 /* Handle "-1" case */
-static void __init dc390_check_for_safe_settings (void)
+static void __devinit dc390_check_for_safe_settings (void)
 {
 	if (tmscsim[0] == -1 || tmscsim[0] > 15) /* modules-2.0.0 passes -1 as string */
 	{
@@ -497,7 +453,7 @@
 		, 3 /* 16 Tags per LUN */, 1 /* s delay after Reset */ };
 
 /* Copy defaults over set values where missing */
-static void __init dc390_fill_with_defaults (void)
+static void __devinit dc390_fill_with_defaults (void)
 {
 	int i;
 	PARSEDEBUG(printk(KERN_INFO "DC390: setup %08x %08x %08x %08x %08x %08x\n", tmscsim[0],\
@@ -514,6 +470,7 @@
 	if (tmscsim[5] > 180) tmscsim[5] = 180;
 }
 
+#ifndef MODULE
 /* Override defaults on cmdline:
  * tmscsim: AdaptID, MaxSpeed (Index), DevMode (Bitmapped), AdaptMode (Bitmapped)
  */
@@ -533,40 +490,40 @@
 	/* dc390_checkparams (); */
 	return 1;
 }
-#ifndef MODULE
+
 __setup("tmscsim=", dc390_setup);
 #endif
 
-static void __init dc390_EEpromOutDI( PDEVDECL, PUCHAR regval, UCHAR Carry )
+static void __devinit dc390_EEpromOutDI(struct pci_dev *pdev, u8 *regval, u8 Carry)
 {
-    UCHAR bval;
+    u8 bval;
 
     bval = 0;
     if(Carry)
     {
 	bval = 0x40;
 	*regval = 0x80;
-	PCI_WRITE_CONFIG_BYTE(PDEV, *regval, bval);
+	pci_write_config_byte(pdev, *regval, bval);
     }
     udelay(160);
     bval |= 0x80;
-    PCI_WRITE_CONFIG_BYTE(PDEV, *regval, bval);
+    pci_write_config_byte(pdev, *regval, bval);
     udelay(160);
     bval = 0;
-    PCI_WRITE_CONFIG_BYTE(PDEV, *regval, bval);
+    pci_write_config_byte(pdev, *regval, bval);
     udelay(160);
 }
 
 
-static UCHAR __init dc390_EEpromInDO( PDEVDECL )
+static u8 __devinit dc390_EEpromInDO(struct pci_dev *pdev)
 {
-    UCHAR bval;
+    u8 bval;
 
-    PCI_WRITE_CONFIG_BYTE(PDEV, 0x80, 0x80);
+    pci_write_config_byte(pdev, 0x80, 0x80);
     udelay(160);
-    PCI_WRITE_CONFIG_BYTE(PDEV, 0x80, 0x40);
+    pci_write_config_byte(pdev, 0x80, 0x40);
     udelay(160);
-    PCI_READ_CONFIG_BYTE(PDEV, 0x00, &bval);
+    pci_read_config_byte(pdev, 0x00, &bval);
     if(bval == 0x22)
 	return(1);
     else
@@ -574,68 +531,68 @@
 }
 
 
-static USHORT __init dc390_EEpromGetData1( PDEVDECL )
+static u16 __devinit dc390_EEpromGetData1(struct pci_dev *pdev)
 {
-    UCHAR i;
-    UCHAR carryFlag;
-    USHORT wval;
+    u8 i;
+    u8 carryFlag;
+    u16 wval;
 
     wval = 0;
     for(i=0; i<16; i++)
     {
 	wval <<= 1;
-	carryFlag = dc390_EEpromInDO(PDEV);
+	carryFlag = dc390_EEpromInDO(pdev);
 	wval |= carryFlag;
     }
     return(wval);
 }
 
 
-static void __init dc390_Prepare( PDEVDECL, PUCHAR regval, UCHAR EEpromCmd )
+static void __devinit dc390_Prepare(struct pci_dev *pdev, u8 *regval, u8 EEpromCmd)
 {
-    UCHAR i,j;
-    UCHAR carryFlag;
+    u8 i,j;
+    u8 carryFlag;
 
     carryFlag = 1;
     j = 0x80;
     for(i=0; i<9; i++)
     {
-	dc390_EEpromOutDI(PDEV,regval,carryFlag);
+	dc390_EEpromOutDI(pdev, regval, carryFlag);
 	carryFlag = (EEpromCmd & j) ? 1 : 0;
 	j >>= 1;
     }
 }
 
 
-static void __init dc390_ReadEEprom( PDEVDECL, PUSHORT ptr)
+static void __devinit dc390_ReadEEprom(struct pci_dev *pdev, u16 *ptr)
 {
-    UCHAR   regval,cmd;
-    UCHAR   i;
+    u8   regval,cmd;
+    u8   i;
 
     cmd = EEPROM_READ;
     for(i=0; i<0x40; i++)
     {
-	dc390_EnDisableCE(ENABLE_CE, PDEV, &regval);
-	dc390_Prepare(PDEV, &regval, cmd++);
-	*ptr++ = dc390_EEpromGetData1(PDEV);
-	dc390_EnDisableCE(DISABLE_CE, PDEV, &regval);
+	dc390_EnDisableCE(ENABLE_CE, pdev, &regval);
+	dc390_Prepare(pdev, &regval, cmd++);
+	*ptr++ = dc390_EEpromGetData1(pdev);
+	dc390_EnDisableCE(DISABLE_CE, pdev, &regval);
     }
 }
 
 
-static void __init dc390_interpret_delay (UCHAR index)
+static void __devinit dc390_interpret_delay (u8 index)
 {
     char interpd [] = {1,3,5,10,16,30,60,120};
     dc390_eepromBuf[index][EE_DELAY] = interpd [dc390_eepromBuf[index][EE_DELAY]];
 }
 
-static UCHAR __init dc390_CheckEEpromCheckSum( PDEVDECL, UCHAR index )
+static u8 __devinit dc390_CheckEEpromCheckSum(struct pci_dev *pdev, u8 index)
 {
-    UCHAR  i;
+    u8  i;
     char  EEbuf[128];
-    USHORT wval, *ptr = (PUSHORT)EEbuf;
+    u16 wval, *ptr = (u16 *)EEbuf;
 
-    dc390_ReadEEprom( PDEV, ptr );
+    dc390_ReadEEprom(pdev, ptr);
     memcpy (dc390_eepromBuf[index], EEbuf, EE_ADAPT_SCSI_ID);
     memcpy (&dc390_eepromBuf[index][EE_ADAPT_SCSI_ID], 
 	    &EEbuf[REAL_EE_ADAPT_SCSI_ID], EE_LEN - EE_ADAPT_SCSI_ID);
@@ -653,9 +610,9 @@
  * (DCBs, SRBs, Queueing)
  *
  **********************************************************************/
-static PDCB __inline__ dc390_findDCB ( PACB pACB, UCHAR id, UCHAR lun)
+static struct dc390_dcb __inline__ *dc390_findDCB ( struct dc390_acb* pACB, u8 id, u8 lun)
 {
-   PDCB pDCB = pACB->pLinkDCB; if (!pDCB) return 0;
+   struct dc390_dcb* pDCB = pACB->pLinkDCB; if (!pDCB) return 0;
    while (pDCB->TargetID != id || pDCB->TargetLUN != lun)
      {
 	pDCB = pDCB->pNextDCB;
@@ -685,26 +642,10 @@
  * Lists are managed using two pointers and eventually a counter
  */
 
-
-#if 0
-/* Look for a SCSI cmd in a SRB queue */
-static PSRB dc390_find_cmd_in_SRBq (PSCSICMD cmd, PSRB queue)
-{
-    PSRB q = queue;
-    while (q)
-    {
-	if (q->pcmd == cmd) return q;
-	q = q->pNextSRB;
-	if (q == queue) return 0;
-    }
-    return q;
-}
-#endif
-
 /* Return next free SRB */
-static __inline__ PSRB dc390_Free_get ( PACB pACB )
+static __inline__ struct dc390_srb* dc390_Free_get ( struct dc390_acb* pACB )
 {
-    PSRB   pSRB;
+    struct dc390_srb*   pSRB;
 
     pSRB = pACB->pFreeSRB;
     DEBUG0(printk ("DC390: Get Free SRB %p\n", pSRB));
@@ -718,7 +659,7 @@
 }
 
 /* Insert SRB oin top of free list */
-static __inline__ void dc390_Free_insert (PACB pACB, PSRB pSRB)
+static __inline__ void dc390_Free_insert (struct dc390_acb* pACB, struct dc390_srb* pSRB)
 {
     DEBUG0(printk ("DC390: Free SRB %p\n", pSRB));
     pSRB->pNextSRB = pACB->pFreeSRB;
@@ -727,7 +668,7 @@
 
 
 /* Inserts a SRB to the top of the Waiting list */
-static __inline__ void dc390_Waiting_insert ( PDCB pDCB, PSRB pSRB )
+static __inline__ void dc390_Waiting_insert ( struct dc390_dcb* pDCB, struct dc390_srb* pSRB )
 {
     DEBUG0(printk ("DC390: Insert pSRB %p cmd %li to Waiting\n", pSRB, pSRB->pcmd->pid));
     pSRB->pNextSRB = pDCB->pWaitingSRB;
@@ -739,7 +680,7 @@
 
 
 /* Queue SRB to waiting list */
-static __inline__ void dc390_Waiting_append ( PDCB pDCB, PSRB pSRB)
+static __inline__ void dc390_Waiting_append ( struct dc390_dcb* pDCB, struct dc390_srb* pSRB)
 {
 	DEBUG0(printk ("DC390: Append pSRB %p cmd %li to Waiting\n", pSRB, pSRB->pcmd->pid));
     if( pDCB->pWaitingSRB )
@@ -753,7 +694,7 @@
     pDCB->pDCBACB->CmdInQ++;
 }
 
-static __inline__ void dc390_Going_append (PDCB pDCB, PSRB pSRB)
+static __inline__ void dc390_Going_append (struct dc390_dcb* pDCB, struct dc390_srb* pSRB)
 {
     pDCB->GoingSRBCnt++;
     DEBUG0(printk("DC390: Append SRB %p to Going\n", pSRB));
@@ -768,14 +709,14 @@
     pSRB->pNextSRB = NULL;
 }
 
-static __inline__ void dc390_Going_remove (PDCB pDCB, PSRB pSRB)
+static __inline__ void dc390_Going_remove (struct dc390_dcb* pDCB, struct dc390_srb* pSRB)
 {
 	DEBUG0(printk("DC390: Remove SRB %p from Going\n", pSRB));
    if (pSRB == pDCB->pGoingSRB)
 	pDCB->pGoingSRB = pSRB->pNextSRB;
    else
      {
-	PSRB psrb = pDCB->pGoingSRB;
+	struct dc390_srb* psrb = pDCB->pGoingSRB;
 	while (psrb && psrb->pNextSRB != pSRB)
 	  psrb = psrb->pNextSRB;
 	if (!psrb) 
@@ -788,7 +729,7 @@
 }
 
 /* Moves SRB from Going list to the top of Waiting list */
-static void dc390_Going_to_Waiting ( PDCB pDCB, PSRB pSRB )
+static void dc390_Going_to_Waiting ( struct dc390_dcb* pDCB, struct dc390_srb* pSRB )
 {
     DEBUG0(printk(KERN_INFO "DC390: Going_to_Waiting (SRB %p) pid = %li\n", pSRB, pSRB->pcmd->pid));
     /* Remove SRB from Going */
@@ -799,7 +740,7 @@
 }
 
 /* Moves first SRB from Waiting list to Going list */
-static __inline__ void dc390_Waiting_to_Going ( PDCB pDCB, PSRB pSRB )
+static __inline__ void dc390_Waiting_to_Going ( struct dc390_dcb* pDCB, struct dc390_srb* pSRB )
 {	
 	/* Remove from waiting list */
 	DEBUG0(printk("DC390: Remove SRB %p from head of Waiting\n", pSRB));
@@ -811,7 +752,7 @@
 
 static void DC390_waiting_timed_out (unsigned long ptr);
 /* Sets the timer to wake us up */
-static void dc390_waiting_timer (PACB pACB, unsigned long to)
+static void dc390_waiting_timer (struct dc390_acb* pACB, unsigned long to)
 {
 	if (timer_pending (&pACB->Waiting_Timer)) return;
 	init_timer (&pACB->Waiting_Timer);
@@ -826,10 +767,10 @@
 
 
 /* Send the next command from the waiting list to the bus */
-static void dc390_Waiting_process ( PACB pACB )
+static void dc390_Waiting_process ( struct dc390_acb* pACB )
 {
-    PDCB   ptr, ptr1;
-    PSRB   pSRB;
+    struct dc390_dcb *ptr, *ptr1;
+    struct dc390_srb *pSRB;
 
     if( (pACB->pActiveDCB) || (pACB->ACBFlag & (RESET_DETECT+RESET_DONE+RESET_DEV) ) )
 	return;
@@ -864,24 +805,24 @@
 /* Wake up waiting queue */
 static void DC390_waiting_timed_out (unsigned long ptr)
 {
-	PACB pACB = (PACB)ptr;
-	DC390_IFLAGS;
+	struct dc390_acb* pACB = (struct dc390_acb*)ptr;
+	unsigned long iflags;
 	DEBUG0(printk ("DC390: Debug: Waiting queue woken up by timer!\n"));
-	DC390_LOCK_IO(pACB->pScsiHost);
+	spin_lock_irqsave(pACB->pScsiHost->host_lock, iflags);
 	dc390_Waiting_process (pACB);
-	DC390_UNLOCK_IO(pACB->pScsiHost);
+	spin_unlock_irqrestore(pACB->pScsiHost->host_lock, iflags);
 }
 
 /***********************************************************************
- * Function: static void dc390_SendSRB (PACB pACB, PSRB pSRB)
+ * Function: static void dc390_SendSRB (struct dc390_acb* pACB, struct dc390_srb* pSRB)
  *
  * Purpose: Send SCSI Request Block (pSRB) to adapter (pACB)
  *
  ***********************************************************************/
 
-static void dc390_SendSRB( PACB pACB, PSRB pSRB )
+static void dc390_SendSRB( struct dc390_acb* pACB, struct dc390_srb* pSRB )
 {
-    PDCB   pDCB;
+    struct dc390_dcb*   pDCB;
 
     pDCB = pSRB->pSRBDCB;
     if( (pDCB->MaxCommand <= pDCB->GoingSRBCnt) || (pACB->pActiveDCB) ||
@@ -913,85 +854,91 @@
     }
 }
 
+static struct scatterlist* dc390_sg_build_single(struct scatterlist *sg, void *addr, unsigned int length)
+{
+	memset(sg, 0, sizeof(struct scatterlist));
+	sg->page	= virt_to_page(addr);
+	sg->length	= length;
+	sg->offset	= (unsigned long)addr & ~PAGE_MASK;
+	return sg;
+}
 
 /* Create pci mapping */
-static int dc390_pci_map (PSRB pSRB)
+static int dc390_pci_map (struct dc390_srb* pSRB)
 {
 	int error = 0;
-	Scsi_Cmnd *pcmd = pSRB->pcmd;
+	struct scsi_cmnd *pcmd = pSRB->pcmd;
 	struct pci_dev *pdev = pSRB->pSRBDCB->pDCBACB->pdev;
 	dc390_cmd_scp_t* cmdp = ((dc390_cmd_scp_t*)(&pcmd->SCp));
+
 	/* Map sense buffer */
 	if (pSRB->SRBFlag & AUTO_REQSENSE) {
-		sg_dma_address(&pSRB->Segmentx) = cmdp->saved_dma_handle = 
-			pci_map_page(pdev, virt_to_page(pcmd->sense_buffer),
-				     (unsigned long)pcmd->sense_buffer & ~PAGE_MASK, sizeof(pcmd->sense_buffer),
-				     DMA_FROM_DEVICE);
-		sg_dma_len(&pSRB->Segmentx) = sizeof(pcmd->sense_buffer);
-		pSRB->SGcount = 1;
-		pSRB->pSegmentList = (PSGL) &pSRB->Segmentx;
+		pSRB->pSegmentList	= dc390_sg_build_single(&pSRB->Segmentx, pcmd->sense_buffer, sizeof(pcmd->sense_buffer));
+		pSRB->SGcount		= pci_map_sg(pdev, pSRB->pSegmentList, 1,
+						     DMA_FROM_DEVICE);
+		cmdp->saved_dma_handle	= sg_dma_address(pSRB->pSegmentList);
+
+		/* TODO: error handling */
+		if (pSRB->SGcount != 1)
+			error = 1;
 		DEBUG1(printk("%s(): Mapped sense buffer %p at %x\n", __FUNCTION__, pcmd->sense_buffer, cmdp->saved_dma_handle));
-	/* Make SG list */	
+	/* Map SG list */
 	} else if (pcmd->use_sg) {
-		pSRB->pSegmentList = (PSGL) pcmd->request_buffer;
-		pSRB->SGcount = pci_map_sg(pdev, pSRB->pSegmentList,
-					   pcmd->use_sg,
-					   scsi_to_pci_dma_dir(pcmd->sc_data_direction));
+		pSRB->pSegmentList	= (struct scatterlist *) pcmd->request_buffer;
+		pSRB->SGcount		= pci_map_sg(pdev, pSRB->pSegmentList, pcmd->use_sg,
+						     pcmd->sc_data_direction);
 		/* TODO: error handling */
 		if (!pSRB->SGcount)
 			error = 1;
-		DEBUG1(printk("%s(): Mapped SG %p with %d (%d) elements\n", __FUNCTION__, pcmd->request_buffer, pSRB->SGcount, pcmd->use_sg));
+		DEBUG1(printk("%s(): Mapped SG %p with %d (%d) elements\n",\
+			      __FUNCTION__, pcmd->request_buffer, pSRB->SGcount, pcmd->use_sg));
 	/* Map single segment */
 	} else if (pcmd->request_buffer && pcmd->request_bufflen) {
-		sg_dma_address(&pSRB->Segmentx) = cmdp->saved_dma_handle =
-			pci_map_page(pdev, virt_to_page(pcmd->request_buffer),
-				     (unsigned long)pcmd->request_buffer & ~PAGE_MASK,
-				     pcmd->request_bufflen, scsi_to_pci_dma_dir(pcmd->sc_data_direction));
+		pSRB->pSegmentList	= dc390_sg_build_single(&pSRB->Segmentx, pcmd->request_buffer, pcmd->request_bufflen);
+		pSRB->SGcount		= pci_map_sg(pdev, pSRB->pSegmentList, 1,
+						     pcmd->sc_data_direction);
+		cmdp->saved_dma_handle	= sg_dma_address(pSRB->pSegmentList);
+
 		/* TODO: error handling */
-		sg_dma_len(&pSRB->Segmentx) = pcmd->request_bufflen;
-		pSRB->SGcount = 1;
-		pSRB->pSegmentList = (PSGL) &pSRB->Segmentx;
+		if (pSRB->SGcount != 1)
+			error = 1;
 		DEBUG1(printk("%s(): Mapped request buffer %p at %x\n", __FUNCTION__, pcmd->request_buffer, cmdp->saved_dma_handle));
 	/* No mapping !? */	
     	} else
 		pSRB->SGcount = 0;
+
 	return error;
 }
 
 /* Remove pci mapping */
-static void dc390_pci_unmap (PSRB pSRB)
+static void dc390_pci_unmap (struct dc390_srb* pSRB)
 {
-	Scsi_Cmnd* pcmd = pSRB->pcmd;
+	struct scsi_cmnd *pcmd = pSRB->pcmd;
 	struct pci_dev *pdev = pSRB->pSRBDCB->pDCBACB->pdev;
-	dc390_cmd_scp_t* cmdp = ((dc390_cmd_scp_t*)(&pcmd->SCp));
+	DEBUG1(dc390_cmd_scp_t* cmdp = ((dc390_cmd_scp_t*)(&pcmd->SCp)));
 
 	if (pSRB->SRBFlag) {
-		pci_unmap_page(pdev, cmdp->saved_dma_handle,
-			       sizeof(pcmd->sense_buffer), DMA_FROM_DEVICE);
+		pci_unmap_sg(pdev, &pSRB->Segmentx, 1, DMA_FROM_DEVICE);
 		DEBUG1(printk("%s(): Unmapped sense buffer at %x\n", __FUNCTION__, cmdp->saved_dma_handle));
 	} else if (pcmd->use_sg) {
-		pci_unmap_sg(pdev, pcmd->request_buffer, pcmd->use_sg,
-			     scsi_to_pci_dma_dir(pcmd->sc_data_direction));
+		pci_unmap_sg(pdev, pcmd->request_buffer, pcmd->use_sg, pcmd->sc_data_direction);
 		DEBUG1(printk("%s(): Unmapped SG at %p with %d elements\n", __FUNCTION__, pcmd->request_buffer, pcmd->use_sg));
 	} else if (pcmd->request_buffer && pcmd->request_bufflen) {
-		pci_unmap_page(pdev,
-			       cmdp->saved_dma_handle,
-			       pcmd->request_bufflen,
-			       scsi_to_pci_dma_dir(pcmd->sc_data_direction));
+		pci_unmap_sg(pdev, &pSRB->Segmentx, 1, pcmd->sc_data_direction);
 		DEBUG1(printk("%s(): Unmapped request buffer at %x\n", __FUNCTION__, cmdp->saved_dma_handle));
 	}
 }
 
 
 /***********************************************************************
- * Function: static void dc390_BuildSRB (Scsi_Cmd *pcmd, PDCB pDCB, 
- * 					 PSRB pSRB)
+ * Function: static void dc390_BuildSRB (Scsi_Cmd *pcmd, struct dc390_dcb* pDCB, 
+ * 					 struct dc390_srb* pSRB)
  *
  * Purpose: Prepare SRB for being sent to Device DCB w/ command *pcmd
  *
  ***********************************************************************/
 
-static void dc390_BuildSRB (Scsi_Cmnd* pcmd, PDCB pDCB, PSRB pSRB)
+static void dc390_BuildSRB (struct scsi_cmnd *pcmd, struct dc390_dcb* pDCB, struct dc390_srb* pSRB)
 {
     pSRB->pSRBDCB = pDCB;
     pSRB->pcmd = pcmd;
@@ -1019,8 +966,8 @@
 }
 
 /***********************************************************************
- * Function : static int DC390_queue_command (Scsi_Cmnd *cmd,
- *					       void (*done)(Scsi_Cmnd *))
+ * Function : static int DC390_queue_command (struct scsi_cmnd *cmd,
+ *					       void (*done)(struct scsi_cmnd *))
  *
  * Purpose : enqueues a SCSI command
  *
@@ -1031,17 +978,18 @@
  * 2.0.x: always return 0
  * 2.1.x: old model: (use_new_eh_code == 0): like 2.0.x
  *	  TO BE DONE:
- *	  new model: return 0 if successful
- *	  	     return 1 if command cannot be queued (queue full)
+ *	  new model: return 0 if successful, or must not be re-queued
+ *		     return 1 if command cannot be queued (queue full)
  *		     command will be inserted in midlevel queue then ...
  *
  ***********************************************************************/
 
-static int DC390_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *))
+static int DC390_queue_command(struct scsi_cmnd *cmd,
+		void (* done)(struct scsi_cmnd *))
 {
-    PDCB   pDCB;
-    PSRB   pSRB;
-    PACB   pACB = (PACB) cmd->device->host->hostdata;
+    struct dc390_dcb*   pDCB = (struct dc390_dcb*) cmd->device->hostdata;
+    struct dc390_srb*   pSRB;
+    struct dc390_acb*   pACB = (struct dc390_acb*) cmd->device->host->hostdata;
 
     DEBUG0(/*  if(pACB->scan_devices) */	\
 	printk(KERN_INFO "DC390: Queue Cmd=%02x,Tgt=%d,LUN=%d (pid=%li), buffer=%p\n",\
@@ -1050,42 +998,19 @@
     /* TODO: Change the policy: Always accept TEST_UNIT_READY or INQUIRY 
      * commands and alloc a DCB for the device if not yet there. DCB will
      * be removed in dc390_SRBdone if SEL_TIMEOUT */
-
-    if( (pACB->scan_devices == END_SCAN) && (cmd->cmnd[0] != INQUIRY) )
-	pACB->scan_devices = 0;
-
-    else if( (pACB->scan_devices) && (cmd->cmnd[0] == READ_6) )
-	pACB->scan_devices = 0;
-
-    if( (pACB->scan_devices || cmd->cmnd[0] == TEST_UNIT_READY || cmd->cmnd[0] == INQUIRY) && 
-       !(pACB->DCBmap[cmd->device->id] & (1 << cmd->device->lun)) )
-    {
-        pACB->scan_devices = 1;
-
-	dc390_initDCB( pACB, &pDCB, cmd->device->id, cmd->device->lun );
-	if (!pDCB)
-	  {
-	    printk (KERN_ERR "DC390: kmalloc for DCB failed, target %02x lun %02x\n", 
-		    cmd->device->id, cmd->device->lun);
-	    goto fail;
-	  }
-            
-    }
-    else if( !(pACB->scan_devices) && !(pACB->DCBmap[cmd->device->id] & (1 << cmd->device->lun)) )
-    {
+    if (!(pACB->scan_devices) && !(pACB->DCBmap[cmd->device->id] & (1 << cmd->device->lun))) {
 	printk(KERN_INFO "DC390: Ignore target %02x lun %02x\n",
 		cmd->device->id, cmd->device->lun); 
 	goto fail;
     }
-    else
-    {
-	pDCB = dc390_findDCB (pACB, cmd->device->id, cmd->device->lun);
-	if (!pDCB)
-	 {  /* should never happen */
-	    printk (KERN_ERR "DC390: no DCB failed, target %02x lun %02x\n", 
-		    cmd->device->id, cmd->device->lun);
-	    goto fail;
-	 }
+
+    /* Should it be: BUG_ON(!pDCB); ? */
+
+    if (!pDCB)
+    {  /* should never happen */
+	printk (KERN_ERR "DC390: no DCB found, target %02x lun %02x\n", 
+		cmd->device->id, cmd->device->lun);
+	goto fail;
     }
 
     pACB->Cmds++;
@@ -1208,7 +1133,7 @@
 			     sector_t capacity, int geom[])
 {
     int heads, sectors, cylinders;
-    PACB pACB = (PACB) sdev->host->hostdata;
+    struct dc390_acb* pACB = (struct dc390_acb*) sdev->host->hostdata;
     int ret_code = -1;
     int size = capacity;
     unsigned char *buf;
@@ -1248,9 +1173,11 @@
 }
 #endif
 
-static void dc390_dumpinfo (PACB pACB, PDCB pDCB, PSRB pSRB)
+static void dc390_dumpinfo (struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB)
 {
-    USHORT pstat; PDEVDECL1;
+    struct pci_dev *pdev;
+    u16 pstat;
+
     if (!pDCB) pDCB = pACB->pActiveDCB;
     if (!pSRB && pDCB) pSRB = pDCB->pActiveSRB;
 
@@ -1284,14 +1211,16 @@
 	    DC390_read32(DMA_Wk_ByteCntr), DC390_read32(DMA_Wk_AddrCntr),
 	    DC390_read8(DMA_Status), DC390_read32(DMA_ScsiBusCtrl));
     DC390_write32 (DMA_ScsiBusCtrl, EN_INT_ON_PCI_ABORT);
-    PDEVSET1; PCI_READ_CONFIG_WORD(PDEV, PCI_STATUS, &pstat);
+
+    pdev = pACB->pdev;
+    pci_read_config_word(pdev, PCI_STATUS, &pstat);
     printk ("DC390: Register dump: PCI Status: %04x\n", pstat);
     printk ("DC390: In case of driver trouble read linux/Documentation/scsi/tmscsim.txt\n");
 }
 
 
 /***********************************************************************
- * Function : int DC390_abort (Scsi_Cmnd *cmd)
+ * Function : int DC390_abort (struct scsi_cmnd *cmd)
  *
  * Purpose : Abort an errant SCSI command
  *
@@ -1302,19 +1231,18 @@
  * Status: Buggy !
  ***********************************************************************/
 
-static int DC390_abort (Scsi_Cmnd *cmd)
+static int DC390_abort (struct scsi_cmnd *cmd)
 {
-    PDCB  pDCB;
-    PSRB  pSRB, psrb;
-    UINT  count, i;
+    struct dc390_dcb *pDCB = (struct dc390_dcb*) cmd->device->hostdata;
+    struct dc390_srb *pSRB, *psrb;
+    u32  count, i;
     int   status;
-    //ULONG sbac;
-    PACB  pACB = (PACB) cmd->device->host->hostdata;
+    //unsigned long sbac;
+    struct dc390_acb *pACB = (struct dc390_acb*) cmd->device->host->hostdata;
 
     printk ("DC390: Abort command (pid %li, Device %02i-%02i)\n",
 	    cmd->pid, cmd->device->id, cmd->device->lun);
 
-    pDCB = dc390_findDCB (pACB, cmd->device->id, cmd->device->lun);
     if( !pDCB ) goto  NOT_RUN;
 
     /* Added 98/07/02 KG */
@@ -1434,9 +1362,9 @@
 }
 
 
-static void dc390_ResetDevParam( PACB pACB )
+static void dc390_ResetDevParam( struct dc390_acb* pACB )
 {
-    PDCB   pDCB, pdcb;
+    struct dc390_dcb *pDCB, *pdcb;
 
     pDCB = pACB->pLinkDCB;
     if (! pDCB) return;
@@ -1459,11 +1387,11 @@
 
 #if 0
 /* Moves all SRBs from Going to Waiting for all DCBs */
-static void dc390_RecoverSRB( PACB pACB )
+static void dc390_RecoverSRB( struct dc390_acb* pACB )
 {
-    PDCB   pDCB, pdcb;
-    PSRB   psrb, psrb2;
-    UINT   cnt, i;
+    struct dc390_dcb *pDCB, *pdcb;
+    struct dc390_srb *psrb, *psrb2;
+    u32   cnt, i;
 
     pDCB = pACB->pLinkDCB;
     if( !pDCB ) return;
@@ -1498,7 +1426,7 @@
 #endif
 
 /***********************************************************************
- * Function : int DC390_reset (Scsi_Cmnd *cmd, ...)
+ * Function : int DC390_reset (struct scsi_cmnd *cmd, ...)
  *
  * Purpose : perform a hard reset on the SCSI bus
  *
@@ -1508,10 +1436,10 @@
  * Returns : 0 on success.
  ***********************************************************************/
 
-static int DC390_reset (Scsi_Cmnd *cmd)
+static int DC390_reset (struct scsi_cmnd *cmd)
 {
-    UCHAR   bval;
-    PACB    pACB = (PACB) cmd->device->host->hostdata;
+    u8   bval;
+    struct dc390_acb*    pACB = (struct dc390_acb*) cmd->device->host->hostdata;
 
     printk(KERN_INFO "DC390: RESET ... ");
 
@@ -1548,101 +1476,13 @@
 
 #include "scsiiom.c"
 
-
-/***********************************************************************
- * Function : static void dc390_initDCB()
- *
- * Purpose :  initialize the internal structures for a DCB (to be malloced)
- *
- * Inputs : SCSI id and lun
- ***********************************************************************/
-
-static void dc390_initDCB( PACB pACB, PDCB *ppDCB, UCHAR id, UCHAR lun )
-{
-    PEEprom	prom;
-    UCHAR	index;
-    PDCB pDCB, pDCB2;
-
-    pDCB = kmalloc (sizeof(DC390_DCB), GFP_ATOMIC);
-    DCBDEBUG(printk (KERN_INFO "DC390: alloc mem for DCB (ID %i, LUN %i): %p\n",	\
-		     id, lun, pDCB));
- 
-    *ppDCB = pDCB;
-    if (!pDCB) return;
-    pDCB2 = 0;
-    if( pACB->DCBCnt == 0 )
-    {
-	pACB->pLinkDCB = pDCB;
-	pACB->pDCBRunRobin = pDCB;
-    }
-    else
-    {
-	pACB->pLastDCB->pNextDCB = pDCB;
-    }
-   
-    pACB->DCBCnt++;
-   
-    pDCB->pNextDCB = pACB->pLinkDCB;
-    pACB->pLastDCB = pDCB;
-
-    pDCB->pDCBACB = pACB;
-    pDCB->TargetID = id;
-    pDCB->TargetLUN = lun;
-    pDCB->pWaitingSRB = NULL;
-    pDCB->pGoingSRB = NULL;
-    pDCB->GoingSRBCnt = 0;
-    pDCB->WaitSRBCnt = 0;
-    pDCB->pActiveSRB = NULL;
-    pDCB->TagMask = 0;
-    pDCB->MaxCommand = 1;
-    index = pACB->AdapterIndex;
-    pDCB->DCBFlag = 0;
-
-    /* Is there a corresp. LUN==0 device ? */
-    if (lun != 0)
-	pDCB2 = dc390_findDCB (pACB, id, 0);
-    prom = (PEEprom) &dc390_eepromBuf[index][id << 2];
-    /* Some values are for all LUNs: Copy them */
-    /* In a clean way: We would have an own structure for a SCSI-ID */
-    if (pDCB2)
-    {
-      pDCB->DevMode = pDCB2->DevMode;
-      pDCB->SyncMode = pDCB2->SyncMode;
-      pDCB->SyncPeriod = pDCB2->SyncPeriod;
-      pDCB->SyncOffset = pDCB2->SyncOffset;
-      pDCB->NegoPeriod = pDCB2->NegoPeriod;
-      
-      pDCB->CtrlR3 = pDCB2->CtrlR3;
-      pDCB->CtrlR4 = pDCB2->CtrlR4;
-      pDCB->Inquiry7 = pDCB2->Inquiry7;
-    }
-    else
-    {		
-      pDCB->DevMode = prom->EE_MODE1;
-      pDCB->SyncMode = 0;
-      pDCB->SyncPeriod = 0;
-      pDCB->SyncOffset = 0;
-      pDCB->NegoPeriod = (dc390_clock_period1[prom->EE_SPEED] * 25) >> 2;
-            
-      pDCB->CtrlR3 = FAST_CLK;
-      
-      pDCB->CtrlR4 = pACB->glitch_cfg | CTRL4_RESERVED;
-      if( dc390_eepromBuf[index][EE_MODE2] & ACTIVE_NEGATION)
-	pDCB->CtrlR4 |= NEGATE_REQACKDATA | NEGATE_REQACK;
-      pDCB->Inquiry7 = 0;
-    }
-
-    pACB->DCBmap[id] |= (1 << lun);
-    dc390_updateDCB(pACB, pDCB);
-}
-
 /***********************************************************************
  * Function : static void dc390_updateDCB()
  *
  * Purpose :  Set the configuration dependent DCB parameters
  ***********************************************************************/
 
-static void dc390_updateDCB (PACB pACB, PDCB pDCB)
+static void dc390_updateDCB (struct dc390_acb* pACB, struct dc390_dcb* pDCB)
 {
   pDCB->SyncMode &= EN_TAG_QUEUEING | SYNC_NEGO_DONE /*| EN_ATN_STOP*/;
   if (pDCB->DevMode & TAG_QUEUEING_) {
@@ -1674,15 +1514,15 @@
  * Inputs : psrb - pointer to this scsi request block structure
  ***********************************************************************/
 
-static void __inline__ dc390_initSRB( PSRB psrb )
+static void __inline__ dc390_initSRB( struct dc390_srb* psrb )
 {
   /* psrb->PhysSRB = virt_to_phys( psrb ); */
 }
 
 
-static void dc390_linkSRB( PACB pACB )
+static void dc390_linkSRB( struct dc390_acb* pACB )
 {
-    UINT   count, i;
+    u32   count, i;
 
     count = pACB->SRBCount;
     for( i=0; i<count; i++)
@@ -1705,10 +1545,10 @@
  *	    io_port, Irq, index: Resources and adapter index
  ***********************************************************************/
 
-static void __init dc390_initACB (PSH psh, ULONG io_port, UCHAR Irq, UCHAR index)
+static void __devinit dc390_initACB (struct Scsi_Host *psh, unsigned long io_port, u8 Irq, u8 index)
 {
-    PACB    pACB;
-    UCHAR   i;
+    struct dc390_acb*    pACB;
+    u8   i;
 
     psh->can_queue = MAX_CMD_QUEUE;
     psh->cmd_per_lun = MAX_CMD_PER_LUN;
@@ -1721,10 +1561,10 @@
     psh->dma_channel = -1;
     psh->last_reset = jiffies;
 	
-    pACB = (PACB) psh->hostdata;
+    pACB = (struct dc390_acb*) psh->hostdata;
 
     pACB->pScsiHost = psh;
-    pACB->IOPortBase = (USHORT) io_port;
+    pACB->IOPortBase = (u16) io_port;
     pACB->IRQLevel = Irq;
 
     DEBUG0(printk (KERN_INFO "DC390: Adapter index %i, ID %i, IO 0x%08x, IRQ 0x%02x\n",	\
@@ -1745,8 +1585,6 @@
     pACB->SRBCount = MAX_SRB_CNT;
     pACB->AdapterIndex = index;
     pACB->status = 0;
-    psh->this_id = dc390_eepromBuf[index][EE_ADAPT_SCSI_ID];
-    pACB->DeviceCnt = 0;
     pACB->DCBCnt = 0;
     pACB->TagMaxNum = 2 << dc390_eepromBuf[index][EE_TAG_CMD_NUM];
     pACB->ACBFlag = 0;
@@ -1778,13 +1616,13 @@
  * Outputs: 0 on success, -1 on error
  ***********************************************************************/
 
-static int __init dc390_initAdapter (PSH psh, ULONG io_port, UCHAR Irq, UCHAR index)
+static int __devinit dc390_initAdapter (struct Scsi_Host *psh, unsigned long io_port, u8 Irq, u8 index)
 {
-    PACB   pACB, pACB2;
-    UCHAR  dstate;
+    struct dc390_acb *pACB, *pACB2;
+    u8  dstate;
     int    i;
     
-    pACB = (PACB) psh->hostdata;
+    pACB = (struct dc390_acb*) psh->hostdata;
 
     if (request_region (io_port, psh->n_io_port, "tmscsim") == NULL) {
 	printk(KERN_ERR "DC390: register IO ports error!\n");
@@ -1849,120 +1687,256 @@
 }
 
 
-/***********************************************************************
- * Function : static int DC390_init (struct Scsi_Host *host, ...)
- *
- * Purpose :  initialize the internal structures for a given SCSI host
- *
- * Inputs : host - pointer to this host adapter's structure
- *	    io_port - IO ports mapped to this adapter
- *	    Irq - IRQ assigned to this adpater
- *	    struct pci_dev - PCI access handle
- *	    index - Adapter index
- *
- * Outputs: 0 on success, -1 on error
- *
- * Note: written in capitals, because the locking is only done here,
- *	not in DC390_detect, called from outside 
- ***********************************************************************/
+static void __devinit dc390_set_pci_cfg (struct pci_dev *pdev)
+{
+	u16 cmd;
+
+	pci_read_config_word(pdev, PCI_COMMAND, &cmd);
+	cmd |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_IO;
+	pci_write_config_word(pdev, PCI_COMMAND, cmd);
+	pci_write_config_word(pdev, PCI_STATUS, (PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY));
+}
 
-static int __init DC390_init (PSHT psht, ULONG io_port, UCHAR Irq, struct pci_dev *pdev, UCHAR index)
+/**
+ * dc390_slave_alloc - Called by the scsi mid layer to tell us about a new
+ * scsi device that we need to deal with.
+ *
+ * @scsi_device: The new scsi device that we need to handle.
+ */
+static int dc390_slave_alloc(struct scsi_device *scsi_device)
 {
-    PSH   psh;
-    PACB  pACB;
+	struct dc390_acb *pACB = (struct dc390_acb*) scsi_device->host->hostdata;
+	struct dc390_dcb *pDCB, *pDCB2 = 0;
+	uint id = scsi_device->id;
+	uint lun = scsi_device->lun;
 
-    if (dc390_CheckEEpromCheckSum (PDEV, index))
-    {
-	int speed;
-	dc390_adapname = "AM53C974";
-	printk (KERN_INFO "DC390_init: No EEPROM found! Trying default settings ...\n");
-	dc390_check_for_safe_settings ();
-	dc390_fill_with_defaults ();
-	dc390_EEprom_Override (index);
-	speed = dc390_clock_speed[tmscsim[1]];
-	printk (KERN_INFO "DC390: Used defaults: AdaptID=%i, SpeedIdx=%i (%i.%i MHz),"
-		" DevMode=0x%02x, AdaptMode=0x%02x, TaggedCmnds=%i (%i), DelayReset=%is\n", 
-		tmscsim[0], tmscsim[1], speed/10, speed%10,
-		(UCHAR)tmscsim[2], (UCHAR)tmscsim[3], tmscsim[4], 2 << (tmscsim[4]), tmscsim[5]);
-    }
-    else
-    {
-	dc390_check_for_safe_settings ();
-	dc390_EEprom_Override (index);
-    }
+	pDCB = kmalloc(sizeof(struct dc390_dcb), GFP_KERNEL);
+	if (!pDCB)
+		return -ENOMEM;
+	memset(pDCB, 0, sizeof(struct dc390_dcb));
+
+	if (!pACB->DCBCnt++) {
+		pACB->pLinkDCB = pDCB;
+		pACB->pDCBRunRobin = pDCB;
+	} else {
+		pACB->pLastDCB->pNextDCB = pDCB;
+	}
    
-    psh = scsi_register( psht, sizeof(DC390_ACB) );
-    if( !psh ) return( -1 );
-	
-    scsi_set_device(psh, &pdev->dev);
-    pACB = (PACB) psh->hostdata;
+	pDCB->pNextDCB = pACB->pLinkDCB;
+	pACB->pLastDCB = pDCB;
 
-    DEBUG0(printk(KERN_INFO "DC390: pSH = %8x, Index %02i\n", (UINT) psh, index));
+	pDCB->pDCBACB = pACB;
+	pDCB->TargetID = id;
+	pDCB->TargetLUN = lun;
+	pDCB->MaxCommand = 1;
 
-    dc390_initACB( psh, io_port, Irq, index );
-        
-    PDEVSET;
+	/*
+	 * Some values are for all LUNs: Copy them 
+	 * In a clean way: We would have an own structure for a SCSI-ID 
+	 */
+	if (lun && (pDCB2 = dc390_findDCB(pACB, id, 0))) {
+		pDCB->DevMode = pDCB2->DevMode;
+		pDCB->SyncMode = pDCB2->SyncMode;
+		pDCB->SyncPeriod = pDCB2->SyncPeriod;
+		pDCB->SyncOffset = pDCB2->SyncOffset;
+		pDCB->NegoPeriod = pDCB2->NegoPeriod;
+      
+		pDCB->CtrlR3 = pDCB2->CtrlR3;
+		pDCB->CtrlR4 = pDCB2->CtrlR4;
+		pDCB->Inquiry7 = pDCB2->Inquiry7;
+	} else {
+		u8 index = pACB->AdapterIndex;
+		PEEprom prom = (PEEprom) &dc390_eepromBuf[index][id << 2];
+
+		pDCB->DevMode = prom->EE_MODE1;
+		pDCB->NegoPeriod =
+			(dc390_clock_period1[prom->EE_SPEED] * 25) >> 2;
+		pDCB->CtrlR3 = FAST_CLK;
+		pDCB->CtrlR4 = pACB->glitch_cfg | CTRL4_RESERVED;
+		if (dc390_eepromBuf[index][EE_MODE2] & ACTIVE_NEGATION)
+			pDCB->CtrlR4 |= NEGATE_REQACKDATA | NEGATE_REQACK;
+	}
 
-    if( !dc390_initAdapter( psh, io_port, Irq, index ) )
-    {
-	DEBUG0(printk("DC390: pACB = %8x, pDCBmap = %8x, pSRB_array = %8x\n",\
-		      (UINT) pACB, (UINT) pACB->DCBmap, (UINT) pACB->SRB_array));
-	DEBUG0(printk("DC390: ACB size= %4x, DCB size= %4x, SRB size= %4x\n",\
-		      sizeof(DC390_ACB), sizeof(DC390_DCB), sizeof(DC390_SRB) ));
-        return (0);
-    }
-    else
-    {
-	scsi_unregister( psh );
-	return( -1 );
-    }
+	pACB->DCBmap[id] |= (1 << lun);
+	dc390_updateDCB(pACB, pDCB);
+
+	pACB->scan_devices = 1;
+	scsi_device->hostdata = pDCB;
+	return 0;
 }
 
-static void __init dc390_set_pci_cfg (PDEVDECL)
+/**
+ * dc390_slave_destroy - Called by the scsi mid layer to tell us about a
+ * device that is going away.
+ *
+ * @scsi_device: The scsi device that we need to remove.
+ */
+static void dc390_slave_destroy(struct scsi_device *scsi_device)
 {
-	USHORT cmd;
-	PCI_READ_CONFIG_WORD (PDEV, PCI_COMMAND, &cmd);
-	cmd |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_IO;
-	PCI_WRITE_CONFIG_WORD (PDEV, PCI_COMMAND, cmd);
-	PCI_WRITE_CONFIG_WORD (PDEV, PCI_STATUS, (PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY));
+	struct dc390_acb* pACB = (struct dc390_acb*) scsi_device->host->hostdata;
+	struct dc390_dcb* pDCB = (struct dc390_dcb*) scsi_device->hostdata;
+	struct dc390_dcb* pPrevDCB = pACB->pLinkDCB;
+
+	pACB->scan_devices = 0;
+
+	BUG_ON(pDCB->GoingSRBCnt > 1);
+	
+	pACB->DCBmap[pDCB->TargetID] &= ~(1 << pDCB->TargetLUN);
+   
+	if (pDCB == pACB->pLinkDCB) {
+		if (pACB->pLastDCB == pDCB) {
+			pDCB->pNextDCB = NULL;
+			pACB->pLastDCB = NULL;
+		}
+		pACB->pLinkDCB = pDCB->pNextDCB;
+	} else {
+		while (pPrevDCB->pNextDCB != pDCB)
+			pPrevDCB = pPrevDCB->pNextDCB;
+		pPrevDCB->pNextDCB = pDCB->pNextDCB;
+		if (pDCB == pACB->pLastDCB)
+			pACB->pLastDCB = pPrevDCB;
+	}
+
+	if (pDCB == pACB->pActiveDCB)
+		pACB->pActiveDCB = NULL;
+	if (pDCB == pACB->pLinkDCB)
+		pACB->pLinkDCB = pDCB->pNextDCB;
+	if (pDCB == pACB->pDCBRunRobin)
+		pACB->pDCBRunRobin = pDCB->pNextDCB;
+	kfree(pDCB); 
+	
+	pACB->DCBCnt--;
 }
 
-int __init DC390_detect (Scsi_Host_Template *psht)
+static int dc390_slave_configure(struct scsi_device *scsi_device)
 {
-    struct pci_dev *pdev = NULL;
-    UCHAR   irq;
-    ULONG   io_port;
+	struct dc390_acb* pACB = (struct dc390_acb*) scsi_device->host->hostdata;
+	pACB->scan_devices = 0;
+	return 0;
+}
 
-    dc390_pACB_start = NULL;
+static struct scsi_host_template driver_template = {
+	.module			= THIS_MODULE,
+	.proc_name		= "tmscsim", 
+	.proc_info		= DC390_proc_info,
+	.name			= DC390_BANNER " V" DC390_VERSION,
+	.slave_alloc		= dc390_slave_alloc,
+	.slave_configure	= dc390_slave_configure,
+	.slave_destroy		= dc390_slave_destroy,
+	.queuecommand		= DC390_queue_command,
+	.eh_abort_handler	= DC390_abort,
+	.eh_bus_reset_handler	= DC390_reset,
+	.bios_param		= DC390_bios_param,
+	.can_queue		= 42,
+	.this_id		= 7,
+	.sg_tablesize		= SG_ALL,
+	.cmd_per_lun		= 16,
+	.use_clustering		= DISABLE_CLUSTERING,
+};
 
-    if ( PCI_PRESENT )
-	    while ((pdev = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD53C974, pdev)))
-	{
-	    if (pci_enable_device (pdev))
-		continue;
+static int __devinit dc390_init_one(struct pci_dev *dev,
+				    const struct pci_device_id *id)
+{
+	struct Scsi_Host *scsi_host;
+	unsigned long io_port;
+	u8 irq;
+	struct dc390_acb*  pACB;
+	int ret = -ENOMEM;
+
+	if (pci_enable_device(dev))
+		return -ENODEV;
+
+	io_port = pci_resource_start(dev, 0);
+	irq = dev->irq;
+
+	/* allocate scsi host information (includes out adapter) */
+	scsi_host = scsi_host_alloc(&driver_template, sizeof(struct dc390_acb));
+	if (!scsi_host)
+		goto nomem;
+
+	pACB = (struct dc390_acb*) scsi_host->hostdata;
+
+	if (dc390_CheckEEpromCheckSum (dev, dc390_adapterCnt)) {
+		int speed;
+		dc390_adapname = "AM53C974";
+		printk(KERN_INFO "DC390_init: No EEPROM found! Trying default settings ...\n");
+		dc390_check_for_safe_settings();
+		dc390_fill_with_defaults();
+		dc390_EEprom_Override(dc390_adapterCnt);
+		speed = dc390_clock_speed[tmscsim[1]];
+		printk(KERN_INFO "DC390: Used defaults: AdaptID=%i, SpeedIdx=%i (%i.%i MHz),"
+		       " DevMode=0x%02x, AdaptMode=0x%02x, TaggedCmnds=%i (%i), DelayReset=%is\n", 
+		       tmscsim[0], tmscsim[1], speed/10, speed%10,
+		       (u8)tmscsim[2], (u8)tmscsim[3], tmscsim[4], 2 << (tmscsim[4]), tmscsim[5]);
+	} else {
+		dc390_check_for_safe_settings();
+		dc390_EEprom_Override(dc390_adapterCnt);
+	}
 
-	    if (pci_set_dma_mask(pdev, 0xffffffff)) {
-		    printk(KERN_ERR "DC390(%i): No suitable DMA available.\n", dc390_adapterCnt);
-		    continue;
-	    }
-	    PCI_GET_IO_AND_IRQ;
-	    DEBUG0(printk(KERN_INFO "DC390(%i): IO_PORT=%04x,IRQ=%x\n", dc390_adapterCnt, (UINT) io_port, irq));
+	DEBUG0(printk(KERN_INFO "DC390: pSH = %8x, Index %02i\n", (u32) scsi_host, dc390_adapterCnt));
 
-	    if( !DC390_init(psht, io_port, irq, PDEV, dc390_adapterCnt))
-	    {
-		pci_set_master(pdev);
-		dc390_set_pci_cfg (PDEV);
-		dc390_adapterCnt++;
-	    }
+	dc390_initACB(scsi_host, io_port, irq, dc390_adapterCnt);
+
+	pACB->pdev = dev;
+
+	if (dc390_initAdapter(scsi_host, io_port, irq, dc390_adapterCnt)) {
+		scsi_unregister(scsi_host);
+		ret = -EBUSY;
+		goto busy;
 	}
-    else
-	printk (KERN_ERR "DC390: No PCI BIOS found!\n");
-   
-    if (dc390_adapterCnt)
-	psht->proc_name = "tmscsim";
 
-    printk(KERN_INFO "DC390: %i adapters found\n", dc390_adapterCnt);
-    return( dc390_adapterCnt );
+	pci_set_master(dev);
+	dc390_set_pci_cfg(dev);
+	dc390_adapterCnt++;
+
+	/* get the scsi mid level to scan for new devices on the bus */
+	if (scsi_add_host(scsi_host, &dev->dev)) {
+		ret = -ENODEV;
+		goto nodev;
+	}
+	pci_set_drvdata(dev, scsi_host);
+	scsi_scan_host(scsi_host);
+
+	return 0;
+
+nodev:
+busy:
+	scsi_host_put(scsi_host);
+nomem:
+	pci_disable_device(dev);
+	return ret;
+}
+
+/**
+ * dc390_remove_one - Called to remove a single instance of the adapter.
+ *
+ * @dev: The PCI device to remove.
+ */
+static void __devexit dc390_remove_one(struct pci_dev *dev)
+{
+	struct Scsi_Host *scsi_host = pci_get_drvdata(dev);
+	unsigned long iflags;
+	struct dc390_acb* pACB = (struct dc390_acb*) scsi_host->hostdata;
+	u8 bval;
+
+	scsi_remove_host(scsi_host);
+
+	spin_lock_irqsave(scsi_host->host_lock, iflags);
+	pACB->ACBFlag = RESET_DEV;
+	bval = DC390_read8(CtrlReg1) | DIS_INT_ON_SCSI_RST;
+	DC390_write8 (CtrlReg1, bval);	/* disable interrupt */
+	if (pACB->Gmode2 & RST_SCSI_BUS)
+		dc390_ResetSCSIBus(pACB);
+	spin_unlock_irqrestore(scsi_host->host_lock, iflags);
+
+	del_timer_sync(&pACB->Waiting_Timer);
+
+	free_irq(scsi_host->irq, pACB);
+	release_region(scsi_host->io_port, scsi_host->n_io_port);
+
+	pci_disable_device(dev);
+	scsi_host_put(scsi_host);
+	pci_set_drvdata(dev, NULL);
 }
 
 /********************************************************************
@@ -1997,19 +1971,19 @@
 {
   int dev, spd, spd1;
   char *pos = buffer;
-  PACB pACB;
-  PDCB pDCB;
+  struct dc390_acb* pACB;
+  struct dc390_dcb* pDCB;
 
   pACB = dc390_pACB_start;
 
-  while(pACB != (PACB)-1)
+  while(pACB != (struct dc390_acb*)-1)
      {
 	if (shpnt == pACB->pScsiHost)
 		break;
 	pACB = pACB->pNextACB;
      }
 
-  if (pACB == (PACB)-1) return(-ESRCH);
+  if (pACB == (struct dc390_acb*)-1) return(-ESRCH);
 
   if(inout) /* Has data been written to the file ? */
       return -ENOSYS;
@@ -2035,7 +2009,7 @@
   SPRINTF("            Lost arbitrations %i, Sel. connected %i, Connected: %s\n", 
 	  pACB->SelLost, pACB->SelConn, pACB->Connected? "Yes": "No");
    
-  SPRINTF("Nr of attached devices: %i, Nr of DCBs: %i\n", pACB->DeviceCnt, pACB->DCBCnt);
+  SPRINTF("Nr of DCBs: %i\n", pACB->DCBCnt);
   SPRINTF("Map of attached LUNs: %02x %02x %02x %02x %02x %02x %02x %02x\n",
 	  pACB->DCBmap[0], pACB->DCBmap[1], pACB->DCBmap[2], pACB->DCBmap[3], 
 	  pACB->DCBmap[4], pACB->DCBmap[5], pACB->DCBmap[6], pACB->DCBmap[7]);
@@ -2070,7 +2044,7 @@
 	
     for (dev = 0; dev < pACB->DCBCnt; dev++)
     {
-	PSRB pSRB;
+	struct dc390_srb* pSRB;
 	if (pDCB->WaitSRBCnt) 
 		    SPRINTF ("DCB (%02i-%i): Waiting: %i:", pDCB->TargetID, pDCB->TargetLUN,
 			     pDCB->WaitSRBCnt);
@@ -2111,90 +2085,22 @@
 #undef YESNO
 #undef SPRINTF
 
-/***********************************************************************
- * Function : static int dc390_shutdown (struct Scsi_Host *host)
- *
- * Purpose : does a clean (we hope) shutdown of the SCSI chip.
- *	     Use prior to dumping core, unloading the driver, etc.
- *
- * Returns : 0 on success
- ***********************************************************************/
-static int dc390_shutdown (struct Scsi_Host *host)
-{
-    UCHAR    bval;
-    PACB pACB = (PACB)(host->hostdata);
-   
-/*  pACB->soft_reset(host); */
-
-    printk(KERN_INFO "DC390: shutdown\n");
-
-    pACB->ACBFlag = RESET_DEV;
-    bval = DC390_read8 (CtrlReg1);
-    bval |= DIS_INT_ON_SCSI_RST;
-    DC390_write8 (CtrlReg1, bval);	/* disable interrupt */
-    if (pACB->Gmode2 & RST_SCSI_BUS)
-		dc390_ResetSCSIBus (pACB);
-
-    if (timer_pending (&pACB->Waiting_Timer)) del_timer (&pACB->Waiting_Timer);
-    return( 0 );
-}
+static struct pci_driver dc390_driver = {
+	.name           = "tmscsim",
+	.id_table       = tmscsim_pci_tbl,
+	.probe          = dc390_init_one,
+	.remove         = __devexit_p(dc390_remove_one),
+};
 
-static void dc390_freeDCBs (struct Scsi_Host *host)
+static int __init dc390_module_init(void)
 {
-    PDCB pDCB, nDCB;
-    PACB pACB = (PACB)(host->hostdata);
-    
-    pDCB = pACB->pLinkDCB;
-    if (!pDCB) return;
-    do
-    {
-	nDCB = pDCB->pNextDCB;
-	DCBDEBUG(printk (KERN_INFO "DC390: Free DCB (ID %i, LUN %i): %p\n",\
-			 pDCB->TargetID, pDCB->TargetLUN, pDCB));
-	//kfree (pDCB);
-	dc390_remove_dev (pACB, pDCB);
-	pDCB = nDCB;
-    } while (pDCB && pACB->pLinkDCB);
-
+	return pci_module_init(&dc390_driver);
 }
 
-static int DC390_release (struct Scsi_Host *host)
+static void __exit dc390_module_exit(void)
 {
-    DC390_IFLAGS;
-    PACB pACB = (PACB)(host->hostdata);
-
-    DC390_LOCK_IO(host);
-
-    /* TO DO: We should check for outstanding commands first. */
-    dc390_shutdown (host);
-
-    if (host->irq != SCSI_IRQ_NONE)
-    {
-	DEBUG0(printk(KERN_INFO "DC390: Free IRQ %i\n",host->irq));
-	free_irq (host->irq, pACB);
-    }
+	pci_unregister_driver(&dc390_driver);
+}
 
-    release_region(host->io_port,host->n_io_port);
-    dc390_freeDCBs (host);
-    DC390_UNLOCK_IO(host);
-    scsi_unregister(host);
-    return( 1 );
-}
-
-static Scsi_Host_Template driver_template = {
-   .proc_name      = "tmscsim", 
-   .proc_info      = DC390_proc_info,
-   .name           = DC390_BANNER " V" DC390_VERSION,
-   .detect         = DC390_detect,
-   .release        = DC390_release,
-   .queuecommand   = DC390_queue_command,
-   .eh_abort_handler		= DC390_abort,
-   .eh_bus_reset_handler	= DC390_reset,
-   .bios_param     = DC390_bios_param,
-   .can_queue      = 42,
-   .this_id        = 7,
-   .sg_tablesize   = SG_ALL,
-   .cmd_per_lun    = 16,
-   .use_clustering = DISABLE_CLUSTERING,
-};
-#include "scsi_module.c"
+module_init(dc390_module_init);
+module_exit(dc390_module_exit);
--- diff/drivers/scsi/tmscsim.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/tmscsim.h	2004-07-01 21:32:44.000000000 +0100
@@ -22,8 +22,6 @@
 
 #define SEL_TIMEOUT		153	/* 250 ms selection timeout (@ 40 MHz) */
 
-#define END_SCAN		2
-
 #define pci_dma_lo32(a)			(a & 0xffffffff)
 
 typedef u8		UCHAR;	/*  8 bits */
@@ -31,222 +29,167 @@
 typedef u32		UINT;	/* 32 bits */
 typedef unsigned long	ULONG;	/* 32/64 bits */
 
-typedef UCHAR		*PUCHAR;
-typedef USHORT		*PUSHORT;
-typedef UINT		*PUINT;
-typedef ULONG		*PULONG;
-typedef Scsi_Host_Template	*PSHT;
-typedef struct Scsi_Host	*PSH;
-typedef Scsi_Device	*PSCSIDEV;
-typedef Scsi_Cmnd	*PSCSICMD;
-typedef void		*PVOID;
-typedef struct scatterlist  *PSGL, SGL;
-
-
-/*;-----------------------------------------------------------------------*/
-typedef  struct  _SyncMsg
-{
-UCHAR		ExtendMsg;
-UCHAR		ExtMsgLen;
-UCHAR		SyncXferReq;
-UCHAR		Period;
-UCHAR		ReqOffset;
-} SyncMsg;
-/*;-----------------------------------------------------------------------*/
-typedef  struct  _Capacity
-{
-ULONG		BlockCount;
-ULONG		BlockLength;
-} Capacity;
-/*;-----------------------------------------------------------------------*/
-typedef  struct  _SGentry
-{
-ULONG		SGXferDataPtr;
-ULONG		SGXferDataLen;
-} SGentry;
-
-typedef  struct  _SGentry1
-{
-ULONG		SGXLen;
-ULONG		SGXPtr;
-} SGentry1, *PSGE;
-
 
 /*
 ;-----------------------------------------------------------------------
 ; SCSI Request Block
 ;-----------------------------------------------------------------------
 */
-struct	_SRB
+struct dc390_srb
 {
-//UCHAR		CmdBlock[12];
+//u8		CmdBlock[12];
 
-struct _SRB	*pNextSRB;
-struct _DCB	*pSRBDCB;
-PSCSICMD	pcmd;
-PSGL		pSegmentList;
+struct dc390_srb	*pNextSRB;
+struct dc390_dcb	*pSRBDCB;
+struct scsi_cmnd	*pcmd;
+struct scatterlist	*pSegmentList;
 
 /* 0x10: */
-SGL		Segmentx;	/* make a one entry of S/G list table */
+struct scatterlist Segmentx;	/* make a one entry of S/G list table */
 
 /* 0x1c: */
-ULONG		SGBusAddr;	/*;a segment starting address as seen by AM53C974A*/
-ULONG		SGToBeXferLen;	/*; to be xfer length */
-ULONG		TotalXferredLen;
-ULONG		SavedTotXLen;
-UINT		SRBState;
+unsigned long	SGBusAddr;	/*;a segment starting address as seen by AM53C974A*/
+unsigned long	SGToBeXferLen;	/*; to be xfer length */
+unsigned long	TotalXferredLen;
+unsigned long	SavedTotXLen;
+u32		SRBState;
 
 /* 0x30: */
-UCHAR		SRBStatus;
-UCHAR		SRBFlag;	/*; b0-AutoReqSense,b6-Read,b7-write */
+u8		SRBStatus;
+u8		SRBFlag;	/*; b0-AutoReqSense,b6-Read,b7-write */
 				/*; b4-settimeout,b5-Residual valid */
-UCHAR		AdaptStatus;
-UCHAR		TargetStatus;
+u8		AdaptStatus;
+u8		TargetStatus;
 
-UCHAR		ScsiPhase;
-UCHAR		TagNumber;
-UCHAR		SGIndex;
-UCHAR		SGcount;
+u8		ScsiPhase;
+u8		TagNumber;
+u8		SGIndex;
+u8		SGcount;
 
 /* 0x38: */
-UCHAR		MsgCnt;
-UCHAR		EndMessage;
-UCHAR		RetryCnt;
-UCHAR		SavedSGCount;			
+u8		MsgCnt;
+u8		EndMessage;
+u8		RetryCnt;
+u8		SavedSGCount;			
 
-ULONG		Saved_Ptr;
+unsigned long	Saved_Ptr;
 
 /* 0x40: */
-UCHAR		MsgInBuf[6];
-UCHAR		MsgOutBuf[6];
+u8		MsgInBuf[6];
+u8		MsgOutBuf[6];
 
-//UCHAR		IORBFlag;	/*;81h-Reset, 2-retry */
+//u8		IORBFlag;	/*;81h-Reset, 2-retry */
 /* 0x4c: */
 };
 
 
-typedef  struct  _SRB	 DC390_SRB, *PSRB;
-
 /*
 ;-----------------------------------------------------------------------
 ; Device Control Block
 ;-----------------------------------------------------------------------
 */
-struct	_DCB
+struct dc390_dcb
 {
-struct _DCB	*pNextDCB;
-struct _ACB	*pDCBACB;
-
-/* Aborted Commands */
-//PSCSICMD	AboIORBhead;
-//PSCSICMD	AboIORBtail;
-//ULONG		AboIORBcnt;
+struct dc390_dcb	*pNextDCB;
+struct dc390_acb	*pDCBACB;
 
 /* 0x08: */
 /* Queued SRBs */
-PSRB		pWaitingSRB;
-PSRB		pWaitLast;
-PSRB		pGoingSRB;
-PSRB		pGoingLast;
-PSRB		pActiveSRB;
-UCHAR		WaitSRBCnt;	/* Not used */
-UCHAR		GoingSRBCnt;
+struct dc390_srb	*pWaitingSRB;
+struct dc390_srb	*pWaitLast;
+struct dc390_srb	*pGoingSRB;
+struct dc390_srb	*pGoingLast;
+struct dc390_srb	*pActiveSRB;
+u8		WaitSRBCnt;	/* Not used */
+u8		GoingSRBCnt;
 
-UCHAR		DevType;
-UCHAR		MaxCommand;
+u8		DevType;
+u8		MaxCommand;
 
 /* 0x20: */
-UINT		TagMask;
+u32		TagMask;
 
-UCHAR		TargetID;	/*; SCSI Target ID  (SCSI Only) */
-UCHAR		TargetLUN;	/*; SCSI Log.  Unit (SCSI Only) */
-UCHAR		DevMode;
-UCHAR		DCBFlag;
-
-UCHAR		CtrlR1;
-UCHAR		CtrlR3;
-UCHAR		CtrlR4;
-UCHAR		Inquiry7;
+u8		TargetID;	/*; SCSI Target ID  (SCSI Only) */
+u8		TargetLUN;	/*; SCSI Log.  Unit (SCSI Only) */
+u8		DevMode;
+u8		DCBFlag;
+
+u8		CtrlR1;
+u8		CtrlR3;
+u8		CtrlR4;
+u8		Inquiry7;
 
 /* 0x2c: */
-UCHAR		SyncMode;	/*; 0:async mode */
-UCHAR		NegoPeriod;	/*;for nego. */
-UCHAR		SyncPeriod;	/*;for reg. */
-UCHAR		SyncOffset;	/*;for reg. and nego.(low nibble) */
+u8		SyncMode;	/*; 0:async mode */
+u8		NegoPeriod;	/*;for nego. */
+u8		SyncPeriod;	/*;for reg. */
+u8		SyncOffset;	/*;for reg. and nego.(low nibble) */
 
 /* 0x30:*/
-//UCHAR		InqDataBuf[8];
-//UCHAR		CapacityBuf[8];
+//u8		InqDataBuf[8];
+//u8		CapacityBuf[8];
 ///* 0x40: */
 };
 
-typedef  struct  _DCB	 DC390_DCB, *PDCB;
+
 /*
 ;-----------------------------------------------------------------------
 ; Adapter Control Block
 ;-----------------------------------------------------------------------
 */
-struct	_ACB
+struct dc390_acb
 {
-PSH		pScsiHost;
-struct _ACB	*pNextACB;
-USHORT		IOPortBase;
-UCHAR		IRQLevel;
-UCHAR		status;
-
-UCHAR		SRBCount;
-UCHAR		AdapterIndex;	/*; nth Adapter this driver */
-UCHAR		DeviceCnt;
-UCHAR		DCBCnt;
-
-/* 0x10: */
-UCHAR		TagMaxNum;
-UCHAR		ACBFlag;
-UCHAR		Gmode2;
-UCHAR		scan_devices;
-
-PDCB		pLinkDCB;
-PDCB		pLastDCB;
-PDCB		pDCBRunRobin;
-
-PDCB		pActiveDCB;
-PSRB		pFreeSRB;
-PSRB		pTmpSRB;
+struct Scsi_Host *pScsiHost;
+struct dc390_acb	*pNextACB;
+u16		IOPortBase;
+u8		IRQLevel;
+u8		status;
+
+u8		SRBCount;
+u8		AdapterIndex;	/*; nth Adapter this driver */
+u8		DCBCnt;
+
+u8		TagMaxNum;
+u8		ACBFlag;
+u8		Gmode2;
+u8		scan_devices;
+
+struct dc390_dcb	*pLinkDCB;
+struct dc390_dcb	*pLastDCB;
+struct dc390_dcb	*pDCBRunRobin;
+
+struct dc390_dcb	*pActiveDCB;
+struct dc390_srb	*pFreeSRB;
+struct dc390_srb	*pTmpSRB;
+
+u8		msgin123[4];
+u8		DCBmap[MAX_SCSI_ID];
+u8		Connected;
+u8		pad;
 
-/* 0x2c: */
-UCHAR		msgin123[4];
-UCHAR		DCBmap[MAX_SCSI_ID];
-UCHAR		Connected;
-UCHAR		pad;
-
-/* 0x30: */
 #if defined(USE_SPINLOCKS) && USE_SPINLOCKS > 1 && (defined(CONFIG_SMP) || DEBUG_SPINLOCKS > 0)
 spinlock_t	lock;
 #endif
-UCHAR		sel_timeout;
-UCHAR		glitch_cfg;
+u8		sel_timeout;
+u8		glitch_cfg;
 
-UCHAR		MsgLen;
-UCHAR		Ignore_IRQ;	/* Not used */
+u8		MsgLen;
+u8		Ignore_IRQ;	/* Not used */
 
-PDEVDECL1;			/* Pointer to PCI cfg. space */
-/* 0x40/0x3c: */
-ULONG		Cmds;
-UINT		SelLost;
-UINT		SelConn;
-UINT		CmdInQ;
-UINT		CmdOutOfSRB;
+struct pci_dev	*pdev;
+
+unsigned long	Cmds;
+u32		SelLost;
+u32		SelConn;
+u32		CmdInQ;
+u32		CmdOutOfSRB;
 	
-/* 0x54/0x50: */
 struct timer_list	Waiting_Timer;
-/* 0x68/0x64: */
-DC390_SRB	TmpSRB;
-/* 0xcc/0xc8: */
-DC390_SRB	SRB_array[MAX_SRB_CNT]; 	/* 50 SRBs */
-/* 0xfa4/0xfa0: */
+
+struct dc390_srb	TmpSRB;
+struct dc390_srb	SRB_array[MAX_SRB_CNT]; 	/* 50 SRBs */
 };
 
-typedef  struct  _ACB	 DC390_ACB, *PACB;
 
 /*;-----------------------------------------------------------------------*/
 
@@ -411,17 +354,17 @@
 
 typedef struct	_SCSIInqData { /* INQUIRY */
 
-	UCHAR	 DevType;		/* Periph Qualifier & Periph Dev Type*/
-	UCHAR	 RMB_TypeMod;		/* rem media bit & Dev Type Modifier */
-	UCHAR	 Vers;			/* ISO, ECMA, & ANSI versions	     */
-	UCHAR	 RDF;			/* AEN, TRMIOP, & response data format*/
-	UCHAR	 AddLen;		/* length of additional data	     */
-	UCHAR	 Res1;			/* reserved			     */
-	UCHAR	 Res2;			/* reserved			     */
-	UCHAR	 Flags; 		/* RelADr,Wbus32,Wbus16,Sync,etc.    */
-	UCHAR	 VendorID[8];		/* Vendor Identification	     */
-	UCHAR	 ProductID[16]; 	/* Product Identification	     */
-	UCHAR	 ProductRev[4]; 	/* Product Revision		     */
+	u8	 DevType;		/* Periph Qualifier & Periph Dev Type*/
+	u8	 RMB_TypeMod;		/* rem media bit & Dev Type Modifier */
+	u8	 Vers;			/* ISO, ECMA, & ANSI versions	     */
+	u8	 RDF;			/* AEN, TRMIOP, & response data format*/
+	u8	 AddLen;		/* length of additional data	     */
+	u8	 Res1;			/* reserved			     */
+	u8	 Res2;			/* reserved			     */
+	u8	 Flags; 		/* RelADr,Wbus32,Wbus16,Sync,etc.    */
+	u8	 VendorID[8];		/* Vendor Identification	     */
+	u8	 ProductID[16]; 	/* Product Identification	     */
+	u8	 ProductRev[4]; 	/* Product Revision		     */
 
 
 } SCSI_INQDATA, *PSCSI_INQDATA;
@@ -470,10 +413,10 @@
 */
 typedef  struct  _EEprom
 {
-UCHAR	EE_MODE1;
-UCHAR	EE_SPEED;
-UCHAR	xx1;
-UCHAR	xx2;
+u8	EE_MODE1;
+u8	EE_SPEED;
+u8	xx1;
+u8	xx2;
 } EEprom, *PEEprom;
 
 #define REAL_EE_ADAPT_SCSI_ID 64
@@ -685,7 +628,7 @@
 	(inb (pACB->IOPortBase + (address)))
 
 #define DC390_read8_(address, base)		\
-	(inb ((USHORT)(base) + (address)))
+	(inb ((u16)(base) + (address)))
 
 #define DC390_read16(address)			\
 	(inw (pACB->IOPortBase + (address)))
@@ -697,7 +640,7 @@
 	outb ((value), pACB->IOPortBase + (address))
 
 #define DC390_write8_(address,value,base)	\
-	outb ((value), (USHORT)(base) + (address))
+	outb ((value), (u16)(base) + (address))
 
 #define DC390_write16(address,value)		\
 	outw ((value), pACB->IOPortBase + (address))
--- diff/drivers/scsi/u14-34f.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/u14-34f.c	2004-07-01 21:32:44.000000000 +0100
@@ -423,7 +423,7 @@
 #include <linux/spinlock.h>
 #include <scsi/scsicam.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <asm/dma.h>
 #include <asm/irq.h>
 
--- diff/drivers/scsi/ultrastor.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/ultrastor.c	2004-07-01 21:32:44.000000000 +0100
@@ -145,7 +145,7 @@
 
 #define ULTRASTOR_PRIVATE	/* Get the private stuff from ultrastor.h */
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "ultrastor.h"
 
 #define FALSE 0
--- diff/drivers/scsi/wd33c93.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/wd33c93.c	2004-07-01 21:32:44.000000000 +0100
@@ -82,8 +82,10 @@
 #include <linux/blkdev.h>
 #include <asm/irq.h>
 
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
 
 #include "wd33c93.h"
 
@@ -299,17 +301,6 @@
 	return x;
 }
 
-/* The 33c93 needs to be told which direction a command transfers its
- * data; we use this function to figure it out. Returns true if there
- * will be a DATA_OUT phase with this command, false otherwise.
- * (Thanks to Joerg Dorchain for the research and suggestion.)
- */
-static inline int
-is_dir_out(Scsi_Cmnd * cmd)
-{
-	return cmd->sc_data_direction == SCSI_DATA_WRITE;
-}
-
 static struct sx_period sx_table[] = {
 	{1, 0x20},
 	{252, 0x20},
@@ -348,17 +339,18 @@
 }
 
 int
-wd33c93_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+wd33c93_queuecommand(struct scsi_cmnd *cmd,
+		void (*done)(struct scsi_cmnd *))
 {
 	struct WD33C93_hostdata *hostdata;
-	Scsi_Cmnd *tmp;
+	struct scsi_cmnd *tmp;
 
 	hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata;
 
 	DB(DB_QUEUE_COMMAND,
 	   printk("Q-%d-%02x-%ld( ", cmd->device->id, cmd->cmnd[0], cmd->pid))
 
-/* Set up a few fields in the Scsi_Cmnd structure for our own use:
+/* Set up a few fields in the scsi_cmnd structure for our own use:
  *  - host_scribble is the pointer to the next cmd in the input queue
  *  - scsi_done points to the routine we call when a cmd is finished
  *  - result is what you'd expect
@@ -426,8 +418,9 @@
 		cmd->host_scribble = (uchar *) hostdata->input_Q;
 		hostdata->input_Q = cmd;
 	} else {		/* find the end of the queue */
-		for (tmp = (Scsi_Cmnd *) hostdata->input_Q; tmp->host_scribble;
-		     tmp = (Scsi_Cmnd *) tmp->host_scribble) ;
+		for (tmp = (struct scsi_cmnd *) hostdata->input_Q;
+		     tmp->host_scribble;
+		     tmp = (struct scsi_cmnd *) tmp->host_scribble) ;
 		tmp->host_scribble = (uchar *) cmd;
 	}
 
@@ -459,7 +452,7 @@
 	struct WD33C93_hostdata *hostdata =
 	    (struct WD33C93_hostdata *) instance->hostdata;
 	const wd33c93_regs regs = hostdata->regs;
-	Scsi_Cmnd *cmd, *prev;
+	struct scsi_cmnd *cmd, *prev;
 
 	DB(DB_EXECUTE, printk("EX("))
 	if (hostdata->selecting || hostdata->connected) {
@@ -472,13 +465,13 @@
 	 * for an idle target/lun.
 	 */
 
-	cmd = (Scsi_Cmnd *) hostdata->input_Q;
+	cmd = (struct scsi_cmnd *) hostdata->input_Q;
 	prev = 0;
 	while (cmd) {
 		if (!(hostdata->busy[cmd->device->id] & (1 << cmd->device->lun)))
 			break;
 		prev = cmd;
-		cmd = (Scsi_Cmnd *) cmd->host_scribble;
+		cmd = (struct scsi_cmnd *) cmd->host_scribble;
 	}
 
 	/* quit if queue empty or all possible targets are busy */
@@ -493,7 +486,7 @@
 	if (prev)
 		prev->host_scribble = cmd->host_scribble;
 	else
-		hostdata->input_Q = (Scsi_Cmnd *) cmd->host_scribble;
+		hostdata->input_Q = (struct scsi_cmnd *) cmd->host_scribble;
 
 #ifdef PROC_STATISTICS
 	hostdata->cmd_cnt[cmd->device->id]++;
@@ -503,7 +496,7 @@
 	 * Start the selection process
 	 */
 
-	if (is_dir_out(cmd))
+	if (cmd->sc_data_direction == DMA_TO_DEVICE)
 		write_wd33c93(regs, WD_DESTINATION_ID, cmd->device->id);
 	else
 		write_wd33c93(regs, WD_DESTINATION_ID, cmd->device->id | DSTID_DPD);
@@ -542,12 +535,12 @@
 		goto yes;
 	if (!(hostdata->input_Q))	/* input_Q empty? */
 		goto no;
-	for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev;
-	     prev = (Scsi_Cmnd *) prev->host_scribble) {
+	for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev;
+	     prev = (struct scsi_cmnd *) prev->host_scribble) {
 		if ((prev->device->id != cmd->device->id) ||
 		    (prev->device->lun != cmd->device->lun)) {
-			for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev;
-			     prev = (Scsi_Cmnd *) prev->host_scribble)
+			for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev;
+			     prev = (struct scsi_cmnd *) prev->host_scribble)
 				prev->SCp.phase = 1;
 			goto yes;
 		}
@@ -635,8 +628,8 @@
 
 		if ((cmd->SCp.phase == 0) && (hostdata->no_dma == 0)) {
 			if (hostdata->dma_setup(cmd,
-						(is_dir_out(cmd)) ? DATA_OUT_DIR
-						: DATA_IN_DIR))
+			    (cmd->sc_data_direction == DMA_TO_DEVICE) ?
+			     DATA_OUT_DIR : DATA_IN_DIR))
 				write_wd33c93_count(regs, 0);	/* guarantee a DATA_PHASE interrupt */
 			else {
 				write_wd33c93_count(regs,
@@ -699,7 +692,8 @@
 }
 
 static void
-transfer_bytes(const wd33c93_regs regs, Scsi_Cmnd * cmd, int data_in_dir)
+transfer_bytes(const wd33c93_regs regs, struct scsi_cmnd *cmd,
+		int data_in_dir)
 {
 	struct WD33C93_hostdata *hostdata;
 	unsigned long length;
@@ -774,7 +768,7 @@
 	struct WD33C93_hostdata *hostdata =
 	    (struct WD33C93_hostdata *) instance->hostdata;
 	const wd33c93_regs regs = hostdata->regs;
-	Scsi_Cmnd *patch, *cmd;
+	struct scsi_cmnd *patch, *cmd;
 	uchar asr, sr, phs, id, lun, *ucp, msg;
 	unsigned long length, flags;
 
@@ -788,7 +782,7 @@
 	hostdata->int_cnt++;
 #endif
 
-	cmd = (Scsi_Cmnd *) hostdata->connected;	/* assume we're connected */
+	cmd = (struct scsi_cmnd *) hostdata->connected;	/* assume we're connected */
 	sr = read_wd33c93(regs, WD_SCSI_STATUS);	/* clear the interrupt */
 	phs = read_wd33c93(regs, WD_COMMAND_PHASE);
 
@@ -828,7 +822,7 @@
 		    if (hostdata->state == S_RUNNING_LEVEL2)
 			hostdata->connected = NULL;
 		else {
-			cmd = (Scsi_Cmnd *) hostdata->selecting;	/* get a valid cmd */
+			cmd = (struct scsi_cmnd *) hostdata->selecting;	/* get a valid cmd */
 			hostdata->selecting = NULL;
 		}
 
@@ -861,7 +855,7 @@
 	case CSR_SELECT:
 		DB(DB_INTR, printk("SELECT"))
 		    hostdata->connected = cmd =
-		    (Scsi_Cmnd *) hostdata->selecting;
+		    (struct scsi_cmnd *) hostdata->selecting;
 		hostdata->selecting = NULL;
 
 		/* construct an IDENTIFY message with correct disconnect bit */
@@ -1307,7 +1301,7 @@
 		    if (hostdata->level2 <= L2_NONE) {
 
 			if (hostdata->selecting) {
-				cmd = (Scsi_Cmnd *) hostdata->selecting;
+				cmd = (struct scsi_cmnd *) hostdata->selecting;
 				hostdata->selecting = NULL;
 				hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun);
 				cmd->host_scribble =
@@ -1399,13 +1393,13 @@
 
 		/* Now we look for the command that's reconnecting. */
 
-		cmd = (Scsi_Cmnd *) hostdata->disconnected_Q;
+		cmd = (struct scsi_cmnd *) hostdata->disconnected_Q;
 		patch = NULL;
 		while (cmd) {
 			if (id == cmd->device->id && lun == cmd->device->lun)
 				break;
 			patch = cmd;
-			cmd = (Scsi_Cmnd *) cmd->host_scribble;
+			cmd = (struct scsi_cmnd *) cmd->host_scribble;
 		}
 
 		/* Hmm. Couldn't find a valid command.... What to do? */
@@ -1424,7 +1418,7 @@
 			patch->host_scribble = cmd->host_scribble;
 		else
 			hostdata->disconnected_Q =
-			    (Scsi_Cmnd *) cmd->host_scribble;
+			    (struct scsi_cmnd *) cmd->host_scribble;
 		hostdata->connected = cmd;
 
 		/* We don't need to worry about 'initialize_SCp()' or 'hostdata->busy[]'
@@ -1432,7 +1426,7 @@
 		 * But we DO need to fix the DPD bit so it's correct for this command.
 		 */
 
-		if (is_dir_out(cmd))
+		if (cmd->sc_data_direction == DMA_TO_DEVICE)
 			write_wd33c93(regs, WD_DESTINATION_ID, cmd->device->id);
 		else
 			write_wd33c93(regs, WD_DESTINATION_ID,
@@ -1522,7 +1516,7 @@
 }
 
 int
-wd33c93_host_reset(Scsi_Cmnd * SCpnt)
+wd33c93_host_reset(struct scsi_cmnd * SCpnt)
 {
 	struct Scsi_Host *instance;
 	struct WD33C93_hostdata *hostdata;
@@ -1557,12 +1551,12 @@
 }
 
 int
-wd33c93_abort(Scsi_Cmnd * cmd)
+wd33c93_abort(struct scsi_cmnd * cmd)
 {
 	struct Scsi_Host *instance;
 	struct WD33C93_hostdata *hostdata;
 	wd33c93_regs regs;
-	Scsi_Cmnd *tmp, *prev;
+	struct scsi_cmnd *tmp, *prev;
 
 	disable_irq(cmd->device->host->irq);
 
@@ -1575,7 +1569,7 @@
  *     from the input_Q.
  */
 
-	tmp = (Scsi_Cmnd *) hostdata->input_Q;
+	tmp = (struct scsi_cmnd *) hostdata->input_Q;
 	prev = 0;
 	while (tmp) {
 		if (tmp == cmd) {
@@ -1583,7 +1577,7 @@
 				prev->host_scribble = cmd->host_scribble;
 			else
 				hostdata->input_Q =
-				    (Scsi_Cmnd *) cmd->host_scribble;
+				    (struct scsi_cmnd *) cmd->host_scribble;
 			cmd->host_scribble = NULL;
 			cmd->result = DID_ABORT << 16;
 			printk
@@ -1594,7 +1588,7 @@
 			return SUCCESS;
 		}
 		prev = tmp;
-		tmp = (Scsi_Cmnd *) tmp->host_scribble;
+		tmp = (struct scsi_cmnd *) tmp->host_scribble;
 	}
 
 /*
@@ -1675,7 +1669,7 @@
  * an ABORT_SNOOZE and hope for the best...
  */
 
-	tmp = (Scsi_Cmnd *) hostdata->disconnected_Q;
+	tmp = (struct scsi_cmnd *) hostdata->disconnected_Q;
 	while (tmp) {
 		if (tmp == cmd) {
 			printk
@@ -1685,7 +1679,7 @@
 			enable_irq(cmd->device->host->irq);
 			return FAILED;
 		}
-		tmp = (Scsi_Cmnd *) tmp->host_scribble;
+		tmp = (struct scsi_cmnd *) tmp->host_scribble;
 	}
 
 /*
@@ -1921,7 +1915,7 @@
 	char *bp;
 	char tbuf[128];
 	struct WD33C93_hostdata *hd;
-	Scsi_Cmnd *cmd;
+	struct scsi_cmnd *cmd;
 	int x, i;
 	static int stop = 0;
 
@@ -2022,7 +2016,7 @@
 	if (hd->proc & PR_CONNECTED) {
 		strcat(bp, "\nconnected:     ");
 		if (hd->connected) {
-			cmd = (Scsi_Cmnd *) hd->connected;
+			cmd = (struct scsi_cmnd *) hd->connected;
 			sprintf(tbuf, " %ld-%d:%d(%02x)",
 				cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
 			strcat(bp, tbuf);
@@ -2030,22 +2024,22 @@
 	}
 	if (hd->proc & PR_INPUTQ) {
 		strcat(bp, "\ninput_Q:       ");
-		cmd = (Scsi_Cmnd *) hd->input_Q;
+		cmd = (struct scsi_cmnd *) hd->input_Q;
 		while (cmd) {
 			sprintf(tbuf, " %ld-%d:%d(%02x)",
 				cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
 			strcat(bp, tbuf);
-			cmd = (Scsi_Cmnd *) cmd->host_scribble;
+			cmd = (struct scsi_cmnd *) cmd->host_scribble;
 		}
 	}
 	if (hd->proc & PR_DISCQ) {
 		strcat(bp, "\ndisconnected_Q:");
-		cmd = (Scsi_Cmnd *) hd->disconnected_Q;
+		cmd = (struct scsi_cmnd *) hd->disconnected_Q;
 		while (cmd) {
 			sprintf(tbuf, " %ld-%d:%d(%02x)",
 				cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
 			strcat(bp, tbuf);
-			cmd = (Scsi_Cmnd *) cmd->host_scribble;
+			cmd = (struct scsi_cmnd *) cmd->host_scribble;
 		}
 	}
 	strcat(bp, "\n");
--- diff/drivers/scsi/wd33c93.h	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/wd33c93.h	2004-07-01 21:32:44.000000000 +0100
@@ -196,9 +196,9 @@
 } wd33c93_regs;
 
 
-typedef int (*dma_setup_t) (Scsi_Cmnd *SCpnt, int dir_in);
-typedef void (*dma_stop_t) (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
-             int status);
+typedef int (*dma_setup_t) (struct scsi_cmnd *SCpnt, int dir_in);
+typedef void (*dma_stop_t) (struct Scsi_Host *instance,
+		struct scsi_cmnd *SCpnt, int status);
 
 
 #define ILLEGAL_STATUS_BYTE   0xff
@@ -234,10 +234,10 @@
     uchar            *dma_bounce_buffer;
     unsigned int     dma_bounce_len;
     volatile uchar   busy[8];          /* index = target, bit = lun */
-    volatile Scsi_Cmnd *input_Q;       /* commands waiting to be started */
-    volatile Scsi_Cmnd *selecting;     /* trying to select this command */
-    volatile Scsi_Cmnd *connected;     /* currently connected command */
-    volatile Scsi_Cmnd *disconnected_Q;/* commands waiting for reconnect */
+    volatile struct scsi_cmnd *input_Q;       /* commands waiting to be started */
+    volatile struct scsi_cmnd *selecting;     /* trying to select this command */
+    volatile struct scsi_cmnd *connected;     /* currently connected command */
+    volatile struct scsi_cmnd *disconnected_Q;/* commands waiting for reconnect */
     uchar            state;            /* what we are currently doing */
     uchar            dma;              /* current state of DMA (on/off) */
     uchar            level2;           /* extent to which Level-2 commands are used */
@@ -335,11 +335,12 @@
 
 void wd33c93_init (struct Scsi_Host *instance, const wd33c93_regs regs,
          dma_setup_t setup, dma_stop_t stop, int clock_freq);
-int wd33c93_abort (Scsi_Cmnd *cmd);
-int wd33c93_queuecommand (Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *));
+int wd33c93_abort (struct scsi_cmnd *cmd);
+int wd33c93_queuecommand (struct scsi_cmnd *cmd,
+		void (*done)(struct scsi_cmnd *));
 void wd33c93_intr (struct Scsi_Host *instance);
 int wd33c93_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
-int wd33c93_host_reset (Scsi_Cmnd *);
+int wd33c93_host_reset (struct scsi_cmnd *);
 void wd33c93_release(void);
 
 #endif /* WD33C93_H */
--- diff/drivers/scsi/wd7000.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/scsi/wd7000.c	2004-07-01 21:32:44.000000000 +0100
@@ -183,8 +183,10 @@
 #include <asm/dma.h>
 #include <asm/io.h>
 
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
 #include <scsi/scsicam.h>
 
 
@@ -218,7 +220,7 @@
  *  In this version, sg_tablesize now defaults to WD7000_SG, and will
  *  be set to SG_NONE for older boards.  This is the reverse of the
  *  previous default, and was changed so that the driver-level
- *  Scsi_Host_Template would reflect the driver's support for scatter/
+ *  scsi_host_template would reflect the driver's support for scatter/
  *  gather.
  *
  *  Also, it has been reported that boards at Revision 6 support scatter/
@@ -435,8 +437,8 @@
  *  carrying SCB addresses to/from the 7000-FASST2.
  *
  *  Note also since SCBs are not "permanently" associated with mailboxes,
- *  there is no need to keep a global list of Scsi_Cmnd pointers indexed
- *  by OGMB.   Again, SCBs reference their Scsi_Cmnds directly, so mailbox
+ *  there is no need to keep a global list of scsi_cmnd pointers indexed
+ *  by OGMB.   Again, SCBs reference their scsi_cmnds directly, so mailbox
  *  indices need not be involved.
  */
 
@@ -463,7 +465,7 @@
 	unchar direc;		/* Transfer Direction                        */
 	unchar reserved2[6];	/* SCSI Command Descriptor Block             */
 	/* end of hardware SCB                       */
-	Scsi_Cmnd *SCpnt;	/* Scsi_Cmnd using this SCB                  */
+	struct scsi_cmnd *SCpnt;/* scsi_cmnd using this SCB                  */
 	Sgb sgb[WD7000_SG];	/* Scatter/gather list for this SCB          */
 	Adapter *host;		/* host adapter                              */
 	struct scb *next;	/* for lists of scbs                         */
@@ -799,8 +801,8 @@
 
 static inline short WAIT(unsigned port, unsigned mask, unsigned allof, unsigned noneof)
 {
-	register unsigned WAITbits;
-	register unsigned long WAITtimeout = jiffies + WAITnexttimeout;
+	unsigned WAITbits;
+	unsigned long WAITtimeout = jiffies + WAITnexttimeout;
 
 	while (time_before_eq(jiffies, WAITtimeout)) {
 		WAITbits = inb(port) & mask;
@@ -846,10 +848,10 @@
  */
 static inline Scb *alloc_scbs(struct Scsi_Host *host, int needed)
 {
-	register Scb *scb, *p = NULL;
+	Scb *scb, *p = NULL;
 	unsigned long flags;
-	register unsigned long timeout = jiffies + WAITnexttimeout;
-	register unsigned long now;
+	unsigned long timeout = jiffies + WAITnexttimeout;
+	unsigned long now;
 	int i;
 
 	if (needed <= 0)
@@ -936,7 +938,7 @@
  *  Note: this can also be used for ICBs; just cast to the parm type.
  */
 {
-	register int i, ogmb;
+	int i, ogmb;
 	unsigned long flags;
 	unchar start_ogmb;
 	Mailbox *ogmbs = host->mb.ogmb;
@@ -1034,23 +1036,26 @@
 
 #define wd7000_intr_ack(host)   outb (0, host->iobase + ASC_INTR_ACK)
 
-static void wd7000_intr_handle(int irq, void *dev_id, struct pt_regs *regs)
+
+static irqreturn_t wd7000_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
-	register int flag, icmb, errstatus, icmb_status;
-	register int host_error, scsi_error;
-	register Scb *scb;	/* for SCSI commands */
-	register IcbAny *icb;	/* for host commands */
-	register Scsi_Cmnd *SCpnt;
 	Adapter *host = (Adapter *) dev_id;
+	int flag, icmb, errstatus, icmb_status;
+	int host_error, scsi_error;
+	Scb *scb;	/* for SCSI commands */
+	IcbAny *icb;	/* for host commands */
+	struct scsi_cmnd *SCpnt;
 	Mailbox *icmbs = host->mb.icmb;
+	unsigned long flags;
 
+	spin_lock_irqsave(host->sh->host_lock, flags);
 	host->int_counter++;
 
-	dprintk("wd7000_intr_handle: irq = %d, host = 0x%06lx\n", irq, (long) host);
+	dprintk("wd7000_intr: irq = %d, host = 0x%06lx\n", irq, (long) host);
 
 	flag = inb(host->iobase + ASC_INTR_STAT);
 
-	dprintk("wd7000_intr_handle: intr stat = 0x%02x\n", flag);
+	dprintk("wd7000_intr: intr stat = 0x%02x\n", flag);
 
 	if (!(inb(host->iobase + ASC_STAT) & INT_IM)) {
 		/* NB: these are _very_ possible if IRQ 15 is being used, since
@@ -1061,79 +1066,70 @@
 		 * can sort these out.  Otherwise, electrical noise and other such
 		 * problems would be indistinguishable from valid interrupts...
 		 */
-		dprintk("wd7000_intr_handle: phantom interrupt...\n");
-		wd7000_intr_ack(host);
-		return;
+		dprintk("wd7000_intr: phantom interrupt...\n");
+		goto ack;
 	}
 
-	if (flag & MB_INTR) {
-		/* The interrupt is for a mailbox */
-		if (!(flag & IMB_INTR)) {
-			dprintk("wd7000_intr_handle: free outgoing mailbox\n");
-			/*
-			 * If sleep_on() and the "interrupt on free OGMB" command are
-			 * used in mail_out(), wake_up() should correspondingly be called
-			 * here.  For now, we don't need to do anything special.
-			 */
-			wd7000_intr_ack(host);
-			return;
-		} else {
-			/* The interrupt is for an incoming mailbox */
-			icmb = flag & MB_MASK;
-			icmb_status = icmbs[icmb].status;
-			if (icmb_status & 0x80) {	/* unsolicited - result in ICMB */
-				dprintk("wd7000_intr_handle: unsolicited interrupt 0x%02x\n", icmb_status);
-				wd7000_intr_ack(host);
-				return;
-			}
-			/* Aaaargh! (Zaga) */
-			scb = isa_bus_to_virt(scsi2int((unchar *) icmbs[icmb].scbptr));
-			icmbs[icmb].status = 0;
-			if (!(scb->op & ICB_OP_MASK)) {	/* an SCB is done */
-				SCpnt = scb->SCpnt;
-				if (--(SCpnt->SCp.phase) <= 0) {	/* all scbs are done */
-					host_error = scb->vue | (icmb_status << 8);
-					scsi_error = scb->status;
-					errstatus = make_code(host_error, scsi_error);
-					SCpnt->result = errstatus;
+	if (!(flag & MB_INTR))
+		goto ack;
 
-					free_scb(scb);
+	/* The interrupt is for a mailbox */
+	if (!(flag & IMB_INTR)) {
+		dprintk("wd7000_intr: free outgoing mailbox\n");
+		/*
+		 * If sleep_on() and the "interrupt on free OGMB" command are
+		 * used in mail_out(), wake_up() should correspondingly be called
+		 * here.  For now, we don't need to do anything special.
+		 */
+		goto ack;
+	}
 
-					SCpnt->scsi_done(SCpnt);
-				}
-			} else {	/* an ICB is done */
-				icb = (IcbAny *) scb;
-				icb->status = icmb_status;
-				icb->phase = 0;
-			}
-		}		/* incoming mailbox */
+	/* The interrupt is for an incoming mailbox */
+	icmb = flag & MB_MASK;
+	icmb_status = icmbs[icmb].status;
+	if (icmb_status & 0x80) {	/* unsolicited - result in ICMB */
+		dprintk("wd7000_intr: unsolicited interrupt 0x%02x\n", icmb_status);
+		goto ack;
 	}
 
-	wd7000_intr_ack(host);
+	/* Aaaargh! (Zaga) */
+	scb = isa_bus_to_virt(scsi2int((unchar *) icmbs[icmb].scbptr));
+	icmbs[icmb].status = 0;
+	if (scb->op & ICB_OP_MASK) {	/* an SCB is done */
+		icb = (IcbAny *) scb;
+		icb->status = icmb_status;
+		icb->phase = 0;
+		goto ack;
+	}
 
-	dprintk("wd7000_intr_handle: return from interrupt handler\n");
-}
+	SCpnt = scb->SCpnt;
+	if (--(SCpnt->SCp.phase) <= 0) {	/* all scbs are done */
+		host_error = scb->vue | (icmb_status << 8);
+		scsi_error = scb->status;
+		errstatus = make_code(host_error, scsi_error);
+		SCpnt->result = errstatus;
 
-static irqreturn_t do_wd7000_intr_handle(int irq, void *dev_id,
-					struct pt_regs *regs)
-{
-	unsigned long flags;
-	struct Scsi_Host *host = dev_id;
+		free_scb(scb);
 
-	spin_lock_irqsave(host->host_lock, flags);
-	wd7000_intr_handle(irq, dev_id, regs);
-	spin_unlock_irqrestore(host->host_lock, flags);
+		SCpnt->scsi_done(SCpnt);
+	}
+
+ ack:
+	dprintk("wd7000_intr: return from interrupt handler\n");
+	wd7000_intr_ack(host);
+
+	spin_unlock_irqrestore(host->sh->host_lock, flags);
 	return IRQ_HANDLED;
 }
 
-
-static int wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
+static int wd7000_queuecommand(struct scsi_cmnd *SCpnt,
+		void (*done)(struct scsi_cmnd *))
 {
-	register Scb *scb;
-	register Sgb *sgb;
-	register unchar *cdb = (unchar *) SCpnt->cmnd;
-	register unchar idlun;
-	register short cdblen;
+	Scb *scb;
+	Sgb *sgb;
+	unchar *cdb = (unchar *) SCpnt->cmnd;
+	unchar idlun;
+	short cdblen;
 	Adapter *host = (Adapter *) SCpnt->device->host->hostdata;
 
 	cdblen = SCpnt->cmd_len;
@@ -1293,7 +1289,7 @@
 		return 0;
 
 
-	if (request_irq(host->irq, do_wd7000_intr_handle, SA_INTERRUPT, "wd7000", host)) {
+	if (request_irq(host->irq, wd7000_intr, SA_INTERRUPT, "wd7000", host)) {
 		printk("wd7000_init: can't get IRQ %d.\n", host->irq);
 		return (0);
 	}
@@ -1434,7 +1430,7 @@
  *
  */
 
-static int wd7000_detect(Scsi_Host_Template * tpnt)
+static int wd7000_detect(struct scsi_host_template *tpnt)
 {
 	short present = 0, biosaddr_ptr, sig_ptr, i, pass;
 	short biosptr[NUM_CONFIGS];
@@ -1605,6 +1601,7 @@
 	return 0;
 }
 
+#if 0
 /*
  *  I have absolutely NO idea how to do an abort with the WD7000...
  */
@@ -1619,27 +1616,13 @@
 	}
 	return FAILED;
 }
-
-
-/*
- *  I also have no idea how to do a reset...
- */
-
-static int wd7000_bus_reset(Scsi_Cmnd * SCpnt)
-{
-	return FAILED;
-}
-
-static int wd7000_device_reset(Scsi_Cmnd * SCpnt)
-{
-	return FAILED;
-}
+#endif
 
 /*
  *  Last resort. Reinitialize the board.
  */
 
-static int wd7000_host_reset(Scsi_Cmnd * SCpnt)
+static int wd7000_host_reset(struct scsi_cmnd *SCpnt)
 {
 	Adapter *host = (Adapter *) SCpnt->device->host->hostdata;
 
@@ -1649,7 +1632,6 @@
 	return SUCCESS;
 }
 
-
 /*
  *  This was borrowed directly from aha1542.c. (Zaga)
  */
@@ -1705,15 +1687,13 @@
 MODULE_DESCRIPTION("Driver for the WD7000 series ISA controllers");
 MODULE_LICENSE("GPL");
 
-static Scsi_Host_Template driver_template = {
+static struct scsi_host_template driver_template = {
 	.proc_name		= "wd7000",
 	.proc_info		= wd7000_proc_info,
 	.name			= "Western Digital WD-7000",
 	.detect			= wd7000_detect,
 	.release		= wd7000_release,
 	.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,
--- diff/drivers/scsi/zalon.c	2004-05-19 22:12:12.000000000 +0100
+++ source/drivers/scsi/zalon.c	2004-07-01 21:32:44.000000000 +0100
@@ -4,27 +4,13 @@
  */
 
 #include <linux/init.h>
-#include <linux/types.h>
-#include <linux/stat.h>
-#include <linux/mm.h>
-#include <linux/blkdev.h>
-#include <linux/sched.h>
-#include <linux/version.h>
-#include <linux/config.h>
+#include <linux/interrupt.h>
 #include <linux/module.h>
-
-#include <scsi/scsicam.h>
-
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/irq.h>
+#include <linux/types.h>
 #include <asm/hardware.h>
-#include <asm/delay.h>
 #include <asm/io.h>
 
 #include "../parisc/gsc.h"
-#include "scsi.h"
-#include "hosts.h"
 
 #include "ncr53c8xx.h"
 
@@ -40,20 +26,18 @@
 #define IO_MODULE_IO_COMMAND	(12*4)
 #define IO_MODULE_IO_STATUS	(13*4)
 
-#define IOSTATUS_RY             0x40
-#define IOSTATUS_FE             0x80
-#define IOIIDATA_SMINT5L        0x40000000
-#define IOIIDATA_MINT5EN        0x20000000
-#define IOIIDATA_PACKEN         0x10000000
-#define IOIIDATA_PREFETCHEN     0x08000000
-#define IOIIDATA_IOII           0x00000020
+#define IOSTATUS_RY		0x40
+#define IOSTATUS_FE		0x80
+#define IOIIDATA_SMINT5L	0x40000000
+#define IOIIDATA_MINT5EN	0x20000000
+#define IOIIDATA_PACKEN		0x10000000
+#define IOIIDATA_PREFETCHEN	0x08000000
+#define IOIIDATA_IOII		0x00000020
 
 #define CMD_RESET		5
 
-static ncr_chip zalon720_chip __initdata = {
-	.device_id =	PSEUDO_720_ID,
+static struct ncr_chip zalon720_chip __initdata = {
 	.revision_id =	0x0f,
-	.name =		"720",
 	.burst_max =	3,
 	.offset_max =	8,
 	.nr_divisor =	4,
@@ -93,7 +77,7 @@
 }
 #endif
 
-static Scsi_Host_Template zalon7xx_template = {
+static struct scsi_host_template zalon7xx_template = {
 	.module		= THIS_MODULE,
 	.proc_name	= "zalon7xx",
 };
@@ -123,7 +107,7 @@
 	/* Setup the interrupts first.
 	** Later on request_irq() will register the handler.
 	*/
-        irq = gsc_alloc_irq(&gsc_irq);
+	irq = gsc_alloc_irq(&gsc_irq);
 
 	printk("%s: Zalon vers field is 0x%x, IRQ %d\n", __FUNCTION__,
 		zalon_vers, irq);
@@ -155,7 +139,7 @@
 
 	if (request_irq(irq, ncr53c8xx_intr, SA_SHIRQ, dev->dev.bus_id, host)) {
 		printk(KERN_ERR "%s: irq problem with %d, detaching\n ",
-		       dev->dev.bus_id, irq);
+			dev->dev.bus_id, irq);
 		goto fail;
 	}
 
--- diff/drivers/serial/8250.c	2004-05-19 22:12:15.000000000 +0100
+++ source/drivers/serial/8250.c	2004-07-01 21:32:44.000000000 +0100
@@ -832,7 +832,7 @@
 		if (unlikely(tty->flip.count >= TTY_FLIPBUF_SIZE)) {
 			tty->flip.work.func((void *)tty);
 			if (tty->flip.count >= TTY_FLIPBUF_SIZE)
-				return; // if TTY_DONT_FLIP is set
+				return;	/* if TTY_DONT_FLIP is set */
 		}
 		ch = serial_inp(up, UART_RX);
 		*tty->flip.char_buf_ptr = ch;
@@ -1193,12 +1193,21 @@
 	spin_unlock_irqrestore(&up->port.lock, flags);
 }
 
+#ifdef CONFIG_KGDB
+static int kgdb_irq = -1;
+#endif
+
 static int serial8250_startup(struct uart_port *port)
 {
 	struct uart_8250_port *up = (struct uart_8250_port *)port;
 	unsigned long flags;
 	int retval;
 
+#ifdef CONFIG_KGDB
+	if (up->port.irq == kgdb_irq)
+		return -EBUSY;
+#endif
+
 	up->capabilities = uart_config[up->port.type].flags;
 	up->mcr = 0;
 
@@ -1888,6 +1897,10 @@
 	for (i = 0; i < UART_NR; i++) {
 		struct uart_8250_port *up = &serial8250_ports[i];
 
+#ifdef CONFIG_KGDB
+		if (up->port.irq == kgdb_irq)
+			up->port.kgdb = 1;
+#endif
 		up->port.line = i;
 		up->port.ops = &serial8250_pops;
 		init_timer(&up->timer);
@@ -2171,6 +2184,31 @@
 	uart_resume_port(&serial8250_reg, &serial8250_ports[line].port);
 }
 
+#ifdef CONFIG_KGDB
+/*
+ * Find all the ports using the given irq and shut them down.
+ * Result should be that the irq will be released.
+ */
+void shutdown_for_kgdb(struct async_struct * info)
+{
+        int irq = info->state->irq;
+        struct uart_8250_port *up;
+	int ttyS;
+
+	kgdb_irq = irq;			/* save for later init */
+	for (ttyS = 0; ttyS < UART_NR; ttyS++){
+		up =  &serial8250_ports[ttyS];
+		if (up->port.irq == irq && (irq_lists + irq)->head) {
+#ifdef CONFIG_DEBUG_SPINLOCK   /* ugly business... */
+			if(up->port.lock.magic != SPINLOCK_MAGIC)
+				spin_lock_init(&up->port.lock);
+#endif
+			serial8250_shutdown(&up->port);
+		}
+        }
+}
+#endif	/* CONFIG_KGDB */
+
 static int __init serial8250_init(void)
 {
 	int ret, i;
--- diff/drivers/serial/8250_acpi.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/serial/8250_acpi.c	2004-07-01 21:32:44.000000000 +0100
@@ -57,28 +57,18 @@
 static acpi_status acpi_serial_ext_irq(struct serial_struct *req,
 				       struct acpi_resource_ext_irq *ext_irq)
 {
-	if (ext_irq->number_of_interrupts > 0) {
-#ifdef CONFIG_IA64
-		req->irq = acpi_register_irq(ext_irq->interrupts[0],
-	                  ext_irq->active_high_low, ext_irq->edge_level);
-#else
-		req->irq = ext_irq->interrupts[0];
-#endif
-	}
+	if (ext_irq->number_of_interrupts > 0)
+		req->irq = acpi_register_gsi(ext_irq->interrupts[0],
+	                  ext_irq->edge_level, ext_irq->active_high_low);
 	return AE_OK;
 }
 
 static acpi_status acpi_serial_irq(struct serial_struct *req,
 				   struct acpi_resource_irq *irq)
 {
-	if (irq->number_of_interrupts > 0) {
-#ifdef CONFIG_IA64
-		req->irq = acpi_register_irq(irq->interrupts[0],
-	                  irq->active_high_low, irq->edge_level);
-#else
-		req->irq = irq->interrupts[0];
-#endif
-	}
+	if (irq->number_of_interrupts > 0)
+		req->irq = acpi_register_gsi(irq->interrupts[0],
+	                  irq->edge_level, irq->active_high_low);
 	return AE_OK;
 }
 
--- diff/drivers/serial/8250_pnp.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/serial/8250_pnp.c	2004-07-01 21:32:44.000000000 +0100
@@ -361,9 +361,6 @@
 			    ((port->min == 0x2f8) ||
 			     (port->min == 0x3f8) ||
 			     (port->min == 0x2e8) ||
-#ifdef CONFIG_X86_PC9800
-			     (port->min == 0x8b0) ||
-#endif
 			     (port->min == 0x3e8)))
 				return 1;
 	}
@@ -382,7 +379,7 @@
  * PnP modems, alternatively we must hardcode all modems in pnp_devices[]
  * table.
  */
-static int __devinit serial_pnp_guess_board(struct pnp_dev *dev, int *flags)
+static int serial_pnp_guess_board(struct pnp_dev *dev)
 {
 	if (!(check_name(pnp_dev_name(dev)) || (dev->card && check_name(dev->card->name))))
 		return -ENODEV;
@@ -402,7 +399,7 @@
 	struct serial_struct serial_req;
 	int ret, line, flags = dev_id->driver_data;
 	if (flags & UNKNOWN_DEV) {
-		ret = serial_pnp_guess_board(dev, &flags);
+		ret = serial_pnp_guess_board(dev);
 		if (ret < 0)
 			return ret;
 	}
@@ -433,11 +430,17 @@
 		unregister_serial(line - 1);
 }
 
+static int serial_pnp_match(struct pnp_dev *dev)
+{
+	return serial_pnp_guess_board(dev);
+}
+
 static struct pnp_driver serial_pnp_driver = {
 	.name		= "serial",
 	.id_table	= pnp_dev_table,
 	.probe		= serial_pnp_probe,
 	.remove		= __devexit_p(serial_pnp_remove),
+	.match		= serial_pnp_match,
 };
 
 static int __init serial8250_pnp_init(void)
--- diff/drivers/serial/Kconfig	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/serial/Kconfig	2004-07-01 21:32:44.000000000 +0100
@@ -62,15 +62,6 @@
 
 	  If unsure, say N.
 
-config SERIAL_8250_HCDP
-	bool "Console device discovery via EFI HCDP table"
-	depends on IA64
-	depends on SERIAL_8250_CONSOLE=y
-	---help---
-	  If you wish to make the serial console port described by the EFI
-	  HCDP table available for use as serial console, say Y here.  See
-	  <http://www.dig64.org/specifications/DIG64_HCDPv10a_01.pdf>.
-
 config SERIAL_8250_CS
 	tristate "8250/16550 PCMCIA device support"
 	depends on PCMCIA && SERIAL_8250
@@ -518,19 +509,6 @@
 	depends on V850E_UART
 	select SERIAL_CORE_CONSOLE
 
-config SERIAL98
-	tristate "PC-9800 8251-based primary serial port support"
-	depends on X86_PC9800
-	select SERIAL_CORE
-	help
-	  If you want to use standard primary serial ports on PC-9800, 
-	  say Y.  Otherwise, say N.
-
-config SERIAL98_CONSOLE
-        bool "Support for console on PC-9800 standard serial port"
-        depends on SERIAL98=y
-	select SERIAL_CORE_CONSOLE
-
 config SERIAL_SH_SCI
 	tristate "SH SCI(F) serial port support"
 	depends on SUPERH || H8300
@@ -616,5 +594,96 @@
 	  on your PowerMac as the console, you can do so by answering
 	  Y to this option.
 
-endmenu
+config SERIAL_LH7A40X
+	tristate "Sharp LH7A40X embedded UART support"
+	depends on ARM && ARCH_LH7A40X
+	select SERIAL_CORE
+	help
+	  This enables support for the three on-board UARTs of the
+	  Sharp LH7A40X series CPUs.  Choose Y or M.
+
+config SERIAL_LH7A40X_CONSOLE
+	bool "Support for connsole on Sharp LH7A40X serial port"
+	depends on SERIAL_LH7A40X=y
+	select SERIAL_CORE_CONSOLE
+	help
+	  Say Y here if you wish to use one of the serial ports as the
+	  system console--the system console is the device which
+	  receives all kernel messages and warnings and which allows
+	  logins in single user mode.
+
+	  Even if you say Y here, the currently visible framebuffer console
+	  (/dev/tty0) will still be used as the default system console, but
+	  you can alter that using a kernel command line, for example
+	  "console=ttyAM1".
+
+config SERIAL_CPM
+	tristate "CPM2 SCC/SMC serial port support"
+	depends on CPM2 || 8xx
+	select SERIAL_CORE
+	help
+	  This driver supports the SCC and SMC serial ports on Motorola 
+	  embedded PowerPC that contain a CPM2 (8xxx) or a CPM1 (8xx)
+
+config SERIAL_CPM_CONSOLE
+	bool "Support for console on CPM2 SCC/SMC serial port"
+	depends on SERIAL_CPM=y
+	select SERIAL_CORE_CONSOLE
+	help
+	  Say Y here if you wish to use a SCC or SMC CPM UART as the system
+	  console (the system console is the device which receives all kernel
+	  messages and warnings and which allows logins in single user mode).
 
+	  Even if you say Y here, the currently visible framebuffer console
+	  (/dev/tty0) will still be used as the system console by default, but
+	  you can alter that using a kernel command line option such as
+	  "console=ttyCPM0". (Try "man bootparam" or see the documentation of
+	  your boot loader (lilo or loadlin) about how to pass options to the
+	  kernel at boot time.)
+
+config SERIAL_CPM_SCC1
+	bool "Support for SCC1 serial port"
+	depends on SERIAL_CPM=y
+	help
+	  Select the is option to use SCC1 as a serial port
+
+config SERIAL_CPM_SCC2
+	bool "Support for SCC2 serial port"
+	depends on SERIAL_CPM=y
+	help
+	  Select the is option to use SCC2 as a serial port
+
+config SERIAL_CPM_SCC3
+	bool "Support for SCC3 serial port"
+	depends on SERIAL_CPM=y
+	help
+	  Select the is option to use SCC3 as a serial port
+
+config SERIAL_CPM_SCC4
+	bool "Support for SCC4 serial port"
+	depends on SERIAL_CPM=y
+	help
+	  Select the is option to use SCC4 as a serial port
+
+config SERIAL_CPM_SMC1
+	bool "Support for SMC1 serial port"
+	depends on SERIAL_CPM=y
+	help
+	  Select the is option to use SMC1 as a serial port
+
+config SERIAL_CPM_SMC2
+	bool "Support for SMC2 serial port"
+	depends on SERIAL_CPM=y
+	help
+	  Select the is option to use SMC2 as a serial port
+
+config SERIAL_SGI_L1_CONSOLE
+	bool "SGI Altix L1 serial console support"
+	depends on IA64_GENERIC || IA64_SGI_SN2
+	select SERIAL_CORE
+	help
+		If you have an SGI Altix and you would like to use the system
+		controller serial port as your console (you want this!),
+		say Y.  Otherwise, say N.
+
+endmenu
--- diff/drivers/serial/Makefile	2004-05-19 22:12:15.000000000 +0100
+++ source/drivers/serial/Makefile	2004-07-01 21:32:44.000000000 +0100
@@ -9,7 +9,6 @@
 serial-8250-$(CONFIG_GSC) += 8250_gsc.o
 serial-8250-$(CONFIG_PCI) += 8250_pci.o
 serial-8250-$(CONFIG_PNP) += 8250_pnp.o
-serial-8250-$(CONFIG_SERIAL_8250_HCDP) += 8250_hcdp.o
 
 obj-$(CONFIG_SERIAL_CORE) += serial_core.o
 obj-$(CONFIG_SERIAL_21285) += 21285.o
@@ -33,9 +32,11 @@
 obj-$(CONFIG_SERIAL_68360) += 68360serial.o
 obj-$(CONFIG_SERIAL_COLDFIRE) += mcfserial.o
 obj-$(CONFIG_V850E_UART) += v850e_uart.o
-obj-$(CONFIG_SERIAL98) += serial98.o
 obj-$(CONFIG_SERIAL_PMACZILOG) += pmac_zilog.o
+obj-$(CONFIG_SERIAL_LH7A40X) += serial_lh7a40x.o
 obj-$(CONFIG_SERIAL_AU1X00) += au1x00_uart.o
 obj-$(CONFIG_SERIAL_DZ) += dz.o
 obj-$(CONFIG_SERIAL_SH_SCI) += sh-sci.o
 obj-$(CONFIG_SERIAL_BAST_SIO) += bast_sio.o
+obj-$(CONFIG_SERIAL_SGI_L1_CONSOLE) += sn_console.o
+obj-$(CONFIG_SERIAL_CPM) += cpm_uart/
--- diff/drivers/serial/amba-pl011.c	2004-05-19 22:12:15.000000000 +0100
+++ source/drivers/serial/amba-pl011.c	2004-07-01 21:32:44.000000000 +0100
@@ -44,6 +44,7 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/hardware/amba.h>
+#include <asm/hardware/clock.h>
 
 #if defined(CONFIG_SERIAL_AMBA_PL011_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 #define SUPPORT_SYSRQ
@@ -68,6 +69,7 @@
  */
 struct uart_amba_port {
 	struct uart_port	port;
+	struct clk		*clk;
 	unsigned int		im;	/* interrupt mask */
 	unsigned int		old_status;
 };
@@ -352,11 +354,20 @@
 	int retval;
 
 	/*
+	 * Try to enable the clock producer.
+	 */
+	retval = clk_enable(uap->clk);
+	if (retval)
+		goto out;
+
+	uap->port.uartclk = clk_get_rate(uap->clk);
+
+	/*
 	 * Allocate the IRQ
 	 */
 	retval = request_irq(uap->port.irq, pl011_int, 0, "uart-pl011", uap);
 	if (retval)
-		goto out;
+		goto clk_dis;
 
 	writew(UART011_IFLS_RX4_8|UART011_IFLS_TX4_8,
 	       uap->port.membase + UART011_IFLS);
@@ -391,6 +402,8 @@
 
 	return 0;
 
+ clk_dis:
+	clk_disable(uap->clk);
  out:
 	return retval;
 }
@@ -425,6 +438,11 @@
 	val = readw(uap->port.membase + UART011_LCRH);
 	val &= ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN);
 	writew(val, uap->port.membase + UART011_LCRH);
+
+	/*
+	 * Shut down the clock producer
+	 */
+	clk_disable(uap->clk);
 }
 
 static void
@@ -594,38 +612,40 @@
 #ifdef CONFIG_SERIAL_AMBA_PL011_CONSOLE
 
 static inline void
-pl011_console_write_char(struct uart_port *port, char ch)
+pl011_console_write_char(struct uart_amba_port *uap, char ch)
 {
 	unsigned int status;
 
 	do {
-		status = readw(port->membase + UART01x_FR);
+		status = readw(uap->port.membase + UART01x_FR);
 	} while (status & UART01x_FR_TXFF);
-	writew(ch, port->membase + UART01x_DR);
+	writew(ch, uap->port.membase + UART01x_DR);
 }
 
 static void
 pl011_console_write(struct console *co, const char *s, unsigned int count)
 {
-	struct uart_port *port = &amba_ports[co->index]->port;
+	struct uart_amba_port *uap = amba_ports[co->index];
 	unsigned int status, old_cr, new_cr;
 	int i;
 
+	clk_enable(uap->clk);
+
 	/*
 	 *	First save the CR then disable the interrupts
 	 */
-	old_cr = readw(port->membase + UART011_CR);
+	old_cr = readw(uap->port.membase + UART011_CR);
 	new_cr = old_cr & ~UART011_CR_CTSEN;
 	new_cr |= UART01x_CR_UARTEN | UART011_CR_TXE;
-	writew(new_cr, port->membase + UART011_CR);
+	writew(new_cr, uap->port.membase + UART011_CR);
 
 	/*
 	 *	Now, do each character
 	 */
 	for (i = 0; i < count; i++) {
-		pl011_console_write_char(port, s[i]);
+		pl011_console_write_char(uap, s[i]);
 		if (s[i] == '\n')
-			pl011_console_write_char(port, '\r');
+			pl011_console_write_char(uap, '\r');
 	}
 
 	/*
@@ -633,19 +653,21 @@
 	 *	and restore the TCR
 	 */
 	do {
-		status = readw(port->membase + UART01x_FR);
+		status = readw(uap->port.membase + UART01x_FR);
 	} while (status & UART01x_FR_BUSY);
-	writew(old_cr, port->membase + UART011_CR);
+	writew(old_cr, uap->port.membase + UART011_CR);
+
+	clk_disable(uap->clk);
 }
 
 static void __init
-pl011_console_get_options(struct uart_port *port, int *baud,
+pl011_console_get_options(struct uart_amba_port *uap, int *baud,
 			     int *parity, int *bits)
 {
-	if (readw(port->membase + UART011_CR) & UART01x_CR_UARTEN) {
+	if (readw(uap->port.membase + UART011_CR) & UART01x_CR_UARTEN) {
 		unsigned int lcr_h, ibrd, fbrd;
 
-		lcr_h = readw(port->membase + UART011_LCRH);
+		lcr_h = readw(uap->port.membase + UART011_LCRH);
 
 		*parity = 'n';
 		if (lcr_h & UART01x_LCRH_PEN) {
@@ -660,10 +682,10 @@
 		else
 			*bits = 8;
 
-		ibrd = readw(port->membase + UART011_IBRD);
-		fbrd = readw(port->membase + UART011_FBRD);
+		ibrd = readw(uap->port.membase + UART011_IBRD);
+		fbrd = readw(uap->port.membase + UART011_FBRD);
 
-		*baud = port->uartclk * 4 / (64 * ibrd + fbrd);
+		*baud = uap->port.uartclk * 4 / (64 * ibrd + fbrd);
 	}
 }
 
@@ -685,10 +707,12 @@
 		co->index = 0;
 	uap = amba_ports[co->index];
 
+	uap->port.uartclk = clk_get_rate(uap->clk);
+
 	if (options)
 		uart_parse_options(options, &baud, &parity, &bits, &flow);
 	else
-		pl011_console_get_options(&uap->port, &baud, &parity, &bits);
+		pl011_console_get_options(uap, &baud, &parity, &bits);
 
 	return uart_set_options(&uap->port, co, baud, parity, bits, flow);
 }
@@ -747,16 +771,21 @@
 	}
 
 	memset(uap, 0, sizeof(struct uart_amba_port));
+	uap->clk = clk_get(&dev->dev, "UARTCLK");
+	if (IS_ERR(uap->clk)) {
+		ret = PTR_ERR(uap->clk);
+		goto unmap;
+	}
+
+	ret = clk_use(uap->clk);
+	if (ret)
+		goto putclk;
+
 	uap->port.dev = &dev->dev;
 	uap->port.mapbase = dev->res.start;
 	uap->port.membase = base;
 	uap->port.iotype = UPIO_MEM;
 	uap->port.irq = dev->irq[0];
-#if 0 /* FIXME */
-	uap->port.uartclk = 14745600;
-#else
-	uap->port.uartclk = 24000000;
-#endif
 	uap->port.fifosize = 16;
 	uap->port.ops = &amba_pl011_pops;
 	uap->port.flags = UPF_BOOT_AUTOCONF;
@@ -769,6 +798,10 @@
 	if (ret) {
 		amba_set_drvdata(dev, NULL);
 		amba_ports[i] = NULL;
+		clk_unuse(uap->clk);
+ putclk:
+		clk_put(uap->clk);
+ unmap:
 		iounmap(base);
  free:
 		kfree(uap);
@@ -791,6 +824,8 @@
 			amba_ports[i] = NULL;
 
 	iounmap(uap->port.membase);
+	clk_unuse(uap->clk);
+	clk_put(uap->clk);
 	kfree(uap);
 	return 0;
 }
--- diff/drivers/serial/pxa.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/serial/pxa.c	2004-07-01 21:32:44.000000000 +0100
@@ -35,6 +35,7 @@
 #include <linux/circ_buf.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/device.h>
 
 #include <asm/io.h>
 #include <asm/hardware.h>
@@ -571,14 +572,9 @@
 	      unsigned int oldstate)
 {
 	struct uart_pxa_port *up = (struct uart_pxa_port *)port;
-	if (state) {
-		/* sleep */
-		CKEN &= ~up->cken;
-	} else {
-		/* wake */
-		CKEN |= up->cken;
+	pxa_set_cken(up->cken, !state);
+	if (!state)
 		udelay(1);
-	}
 }
 
 static void serial_pxa_release_port(struct uart_port *port)
@@ -809,26 +805,76 @@
 	.cons		= PXA_CONSOLE,
 };
 
-static int __init serial_pxa_init(void)
+static int serial_pxa_suspend(struct device *_dev, u32 state, u32 level)
 {
-	int i, ret;
+        struct uart_pxa_port *sport = dev_get_drvdata(_dev);
 
-	ret = uart_register_driver(&serial_pxa_reg);
-	if (ret)
-		return ret;
+        if (sport && level == SUSPEND_DISABLE)
+                uart_suspend_port(&serial_pxa_reg, &sport->port);
+
+        return 0;
+}
+
+static int serial_pxa_resume(struct device *_dev, u32 level)
+{
+        struct uart_pxa_port *sport = dev_get_drvdata(_dev);
 
-	for (i = 0; i < ARRAY_SIZE(serial_pxa_ports); i++)
-		uart_add_one_port(&serial_pxa_reg, &serial_pxa_ports[i].port);
+        if (sport && level == RESUME_ENABLE)
+                uart_resume_port(&serial_pxa_reg, &sport->port);
 
+        return 0;
+}
+
+static int serial_pxa_probe(struct device *_dev)
+{
+	struct platform_device *dev = to_platform_device(_dev);
+
+	serial_pxa_ports[dev->id].port.dev = _dev;
+	uart_add_one_port(&serial_pxa_reg, &serial_pxa_ports[dev->id].port);
+	dev_set_drvdata(_dev, &serial_pxa_ports[dev->id]);
 	return 0;
 }
 
-static void __exit serial_pxa_exit(void)
+static int serial_pxa_remove(struct device *_dev)
 {
-	int i;
+	struct uart_pxa_port *sport = dev_get_drvdata(_dev);
+
+	dev_set_drvdata(_dev, NULL);
+
+	if (sport)
+		uart_remove_one_port(&serial_pxa_reg, &sport->port);
+
+	return 0;
+}
+
+static struct device_driver serial_pxa_driver = {
+        .name           = "pxa2xx-uart",
+        .bus            = &platform_bus_type,
+        .probe          = serial_pxa_probe,
+        .remove         = serial_pxa_remove,
+
+	.suspend	= serial_pxa_suspend,
+	.resume		= serial_pxa_resume,
+};
+
+int __init serial_pxa_init(void)
+{
+	int ret;
 
-	for (i = 0; i < ARRAY_SIZE(serial_pxa_ports); i++)
-		uart_remove_one_port(&serial_pxa_reg, &serial_pxa_ports[i].port);
+	ret = uart_register_driver(&serial_pxa_reg);
+	if (ret != 0)
+		return ret;
+
+	ret = driver_register(&serial_pxa_driver);
+	if (ret != 0)
+		uart_unregister_driver(&serial_pxa_reg);
+
+	return ret;
+}
+
+void __exit serial_pxa_exit(void)
+{
+        driver_unregister(&serial_pxa_driver);
 	uart_unregister_driver(&serial_pxa_reg);
 }
 
--- diff/drivers/serial/serial_core.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/serial/serial_core.c	2004-07-01 21:32:44.000000000 +0100
@@ -1923,7 +1923,7 @@
 	 * Disable the console device before suspending.
 	 */
 	if (uart_console(port))
-		port->cons->flags &= ~CON_ENABLED;
+		console_stop(port->cons);
 
 	uart_change_pm(state, 3);
 
@@ -1945,7 +1945,7 @@
 	 */
 	if (uart_console(port)) {
 		uart_change_speed(state, NULL);
-		port->cons->flags |= CON_ENABLED;
+		console_start(port->cons);
 	}
 
 	if (state->info && state->info->flags & UIF_INITIALIZED) {
@@ -1990,6 +1990,11 @@
 {
 	unsigned int flags;
 
+#ifdef CONFIG_KGDB
+	if (port->kgdb)
+		return;
+#endif
+
 	/*
 	 * If there isn't a port here, don't do anything further.
 	 */
--- diff/drivers/serial/sh-sci.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/serial/sh-sci.c	2004-07-01 21:32:44.000000000 +0100
@@ -90,12 +90,12 @@
 
 #if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB)
 
-static void handle_error(struct sci_port *port)
+static void handle_error(struct uart_port *port)
 {				/* Clear error flags */
 	sci_out(port, SCxSR, SCxSR_ERROR_CLEAR(port));
 }
 
-static int get_char(struct sci_port *port)
+static int get_char(struct uart_port *port)
 {
 	unsigned long flags;
 	unsigned short status;
@@ -332,11 +332,11 @@
 
 #if defined(SCIF_ONLY) || defined(SCI_AND_SCIF)
 #if defined(CONFIG_CPU_SH3)
-/* For SH7707, SH7709, SH7709A, SH7729 */
+/* For SH7707, SH7709, SH7709A, SH7729, SH7300*/
 static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
 {
 	unsigned int fcr_val = 0;
-
+#if !defined(CONFIG_CPU_SUBTYPE_SH7300) /* SH7300 doesn't use RTS/CTS */
 	{
 		unsigned short data;
 
@@ -360,6 +360,7 @@
 		/* Set /RTS2 (bit6) = 0 */
 		ctrl_outb(data&0xbf, SCPDR);
 	}
+#endif
 	sci_out(port, SCFCR, fcr_val);
 }
 
@@ -420,7 +421,7 @@
 
 #if !defined(SCI_ONLY)
 	if (port->type == PORT_SCIF) {
-		txroom = 16 - (sci_in(port, SCFDR)>>8);
+		txroom = SCIF_TXROOM_MAX - (sci_in(port, SCFDR)>>8);
 	} else {
 		txroom = (sci_in(port, SCxSR) & SCI_TDRE)?1:0;
 	}
@@ -488,7 +489,7 @@
 	while (1) {
 #if !defined(SCI_ONLY)
 		if (port->type == PORT_SCIF) {
-			count = sci_in(port, SCFDR)&0x001f;
+			count = sci_in(port, SCFDR)&SCIF_RFDC_MASK ;
 		} else {
 			count = (sci_in(port, SCxSR)&SCxSR_RDxF(port))?1:0;
 		}
@@ -671,8 +672,7 @@
 		pr_debug("sci: BREAK detected\n");
 	}
 
-#if defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_ST40STB1) || \
-    defined(CONFIG_CPU_SUBTYPE_SH7760)
+#if defined(SCIF_ORER)
 	/* XXX: Handle SCIF overrun error */
 	if (port->type == PORT_SCIF && (sci_in(port, SCLSR) & SCIF_ORER) != 0) {
 		sci_out(port, SCLSR, 0);
@@ -726,6 +726,19 @@
 			sci_out(port, SCxSR, SCxSR_RDxF_CLEAR(port));
 		}
 	} else {
+#if defined(SCIF_ORER)
+		if((sci_in(port, SCLSR) & SCIF_ORER) != 0) {
+			struct tty_struct *tty = port->info->tty;
+
+			sci_out(port, SCLSR, 0);
+			if(tty->flip.count<TTY_FLIPBUF_SIZE) {
+				*tty->flip.flag_buf_ptr++ = TTY_OVERRUN;
+				tty->flip.count++;
+				tty_flip_buffer_push(tty);
+				pr_debug("scif: overrun error\n");
+			}
+		}
+#endif
 		sci_rx_interrupt(irq, ptr, regs);
 	}
 
@@ -748,6 +761,30 @@
 	return IRQ_HANDLED;
 }
 
+static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr, struct pt_regs *regs)
+{
+        unsigned short ssr_status, scr_status;
+        struct uart_port *port = ptr;
+
+        ssr_status = sci_in(port,SCxSR);
+        scr_status = sci_in(port,SCSCR);
+
+	/* Tx Interrupt */
+        if ((ssr_status&0x0020) && (scr_status&0x0080))
+                sci_tx_interrupt(irq, ptr, regs);
+	/* Rx Interrupt */
+        if ((ssr_status&0x0002) && (scr_status&0x0040))
+                sci_rx_interrupt(irq, ptr, regs);
+	/* Error Interrupt */
+        if ((ssr_status&0x0080) && (scr_status&0x0400))
+                sci_er_interrupt(irq, ptr, regs);
+	/* Break Interrupt */
+        if ((ssr_status&0x0010) && (scr_status&0x0200))
+                sci_br_interrupt(irq, ptr, regs);
+
+	return IRQ_HANDLED;
+}
+
 #ifdef CONFIG_CPU_FREQ
 /*
  * Here we define a transistion notifier so that we can update all of our
@@ -797,14 +834,26 @@
 	const char *desc[] = { "SCI Receive Error", "SCI Receive Data Full",
 			       "SCI Transmit Data Empty", "SCI Break" };
 
-	for (i = 0; i < ARRAY_SIZE(handlers); i++) {
-		if (!port->irqs[i])
-			continue;
-		if (request_irq(port->irqs[i], handlers[i], SA_INTERRUPT,
-				desc[i], port)) {
+	if (port->irqs[0] == port->irqs[1]) {
+		if (!port->irqs[0]) {
+			printk(KERN_ERR "sci: Cannot allocate irq.(IRQ=0)\n");
+			return -ENODEV;
+		}
+		if (request_irq(port->irqs[0], sci_mpxed_interrupt, SA_INTERRUPT,
+				"sci", port)) {
 			printk(KERN_ERR "sci: Cannot allocate irq.\n");
 			return -ENODEV;
 		}
+	} else {
+		for (i = 0; i < ARRAY_SIZE(handlers); i++) {
+			if (!port->irqs[i])
+				continue;
+			if (request_irq(port->irqs[i], handlers[i], SA_INTERRUPT,
+					desc[i], port)) {
+				printk(KERN_ERR "sci: Cannot allocate irq.\n");
+				return -ENODEV;
+			}
+		}
 	}
 
 	return 0;
@@ -814,11 +863,18 @@
 {
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(port->irqs); i++) {
-		if (!port->irqs[i])
-			continue;
+        if (port->irqs[0] == port->irqs[1]) {
+                if (!port->irqs[0])
+                        printk("sci: sci_free_irq error\n");
+		else
+                        free_irq(port->irqs[0], port);
+        } else {
+		for (i = 0; i < ARRAY_SIZE(port->irqs); i++) {
+			if (!port->irqs[i])
+				continue;
 
-		free_irq(port->irqs[i], port);
+			free_irq(port->irqs[i], port);
+		}
 	}
 }
 
@@ -873,7 +929,7 @@
 	/* Set RIE (Receive Interrupt Enable) bit in SCSCR */
 	local_irq_save(flags);
 	ctrl = sci_in(port, SCSCR);
-	ctrl |= SCI_CTRL_FLAGS_RIE;
+	ctrl |= SCI_CTRL_FLAGS_RIE | SCI_CTRL_FLAGS_REIE;
 	sci_out(port, SCSCR, ctrl);
 	local_irq_restore(flags);
 }
@@ -886,7 +942,7 @@
 	/* Clear RIE (Receive Interrupt Enable) bit in SCSCR */
 	local_irq_save(flags);
 	ctrl = sci_in(port, SCSCR);
-	ctrl &= ~SCI_CTRL_FLAGS_RIE;
+	ctrl &= ~(SCI_CTRL_FLAGS_RIE | SCI_CTRL_FLAGS_REIE);
 	sci_out(port, SCSCR, ctrl);
 	local_irq_restore(flags);
 }
@@ -976,7 +1032,7 @@
 		case 38400:	t = BPS_38400;	break;
 		case 57600:	t = BPS_57600;	break;
 		case 115200:	t = BPS_115200;	break;
-		default:	t = BPS_115200; break;
+		default:	t = SCBRR_VALUE(baud); break;
 	}
 
 	if (t > 0) {
@@ -1026,6 +1082,13 @@
 	struct sci_port *s = &sci_ports[port->line];
 
 	port->type = s->type;
+
+#if defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
+	if (port->mapbase == 0)
+		port->mapbase = onchip_remap(SCIF_ADDR_SH5, 1024, "SCIF");
+
+	port->membase = (void *)port->mapbase;
+#endif
 }
 
 static int sci_verify_port(struct uart_port *port, struct serial_struct *ser)
@@ -1119,6 +1182,36 @@
 		.irqs		= SH3_IRDA_IRQS,
 		.init_pins	= sci_init_pins_irda,
 	}
+#elif defined(CONFIG_CPU_SUBTYPE_SH7300)
+	{
+		.port	= {
+			.membase	= (void *)0xA4430000,
+			.mapbase	= 0xA4430000,
+			.iotype		= SERIAL_IO_MEM,
+			.irq		= 25,
+			.ops		= &sci_uart_ops,
+			.flags		= ASYNC_BOOT_AUTOCONF,
+			.line		= 0,
+		},
+		.type		= PORT_SCIF,
+		.irqs		= SH7300_SCIF0_IRQS,
+		.init_pins	= sci_init_pins_scif,
+	},
+#elif defined(CONFIG_SH_RTS7751R2D)
+	{
+		.port	= {
+			.membase	= (void *)0xffe80000,
+			.mapbase	= 0xffe80000,
+			.iotype		= SERIAL_IO_MEM,
+			.irq		= 43,
+			.ops		= &sci_uart_ops,
+			.flags		= ASYNC_BOOT_AUTOCONF,
+			.line		= 0,
+		},
+		.type		= PORT_SCIF,
+		.irqs		= SH4_SCIF_IRQS,
+		.init_pins	= sci_init_pins_scif,
+	},
 #elif defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7751)
 	{
 		.port	= {
@@ -1220,6 +1313,19 @@
 		.irqs		= SH4_SCIF_IRQS,
 		.init_pins	= sci_init_pins_scif,
 	},
+#elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
+	{
+		.port	= {
+			.iotype		= SERIAL_IO_MEM,
+			.irq		= 42,
+			.ops		= &sci_uart_ops,
+			.flags		= ASYNC_BOOT_AUTOCONF,
+			.line		= 0,
+		},
+		.type		= PORT_SCIF,
+		.irqs		= SH5_SCIF_IRQS,
+		.init_pins	= sci_init_pins_scif,
+	},
 #elif defined(CONFIG_H83007) || defined(CONFIG_H83068)
 	{
 		.port	= {
@@ -1338,6 +1444,11 @@
 	port = &serial_console_port->port;
 	port->type = serial_console_port->type;
 
+#ifdef CONFIG_SUPERH64
+	/* This is especially needed on sh64 to remap the SCIF */
+	sci_config_port(port, 0);
+#endif
+
 	/*
 	 * We need to set the initial uartclk here, since otherwise it will
 	 * only ever be setup at sci_init() time.
@@ -1374,18 +1485,7 @@
 
 static int __init sci_console_init(void)
 {
-#ifdef CONFIG_SH_EARLY_PRINTK
-	extern void sh_console_unregister(void);
-
-	/*
-	 * Now that the real console is available, unregister the one we
-	 * used while first booting.
-	 */
-	sh_console_unregister();
-#endif
-
 	register_console(&serial_console);
-
 	return 0;
 }
 
@@ -1452,7 +1552,6 @@
 static int __init kgdb_console_init(void)
 {
         register_console(&kgdb_console);
-
 	return 0;
 }
 
--- diff/drivers/serial/sh-sci.h	2004-05-19 22:12:15.000000000 +0100
+++ source/drivers/serial/sh-sci.h	2004-07-01 21:32:44.000000000 +0100
@@ -7,6 +7,7 @@
  *  Copyright (C) 2000  Greg Banks
  *  Copyright (C) 2002, 2003  Paul Mundt
  *  Modified to support multiple serial ports. Stuart Menefy (May 2000).
+ *  Modified to support SH7300(SH-Mobile) SCIF. Takashi Kusuda (Jun 2003).
  *  Modified to support H8/300 Series Yoshinori Sato (Feb 2004).
  */
 #include <linux/config.h>
@@ -36,12 +37,14 @@
 #define SH7760_SCIF0_IRQS { 52, 53, 55, 54 }
 #define SH7760_SCIF1_IRQS { 72, 73, 75, 74 }
 #define SH7760_SCIF2_IRQS { 76, 77, 79, 78 }
+#define SH7300_SCIF0_IRQS {80,  80,  80,  80 }
 #define H8300H_SCI_IRQS0 {52, 53, 54,   0 }
 #define H8300H_SCI_IRQS1 {56, 57, 58,   0 }
 #define H8300H_SCI_IRQS2 {60, 61, 62,   0 }
 #define H8S_SCI_IRQS0 {88, 89, 90,   0 }
 #define H8S_SCI_IRQS1 {92, 93, 94,   0 }
 #define H8S_SCI_IRQS2 {96, 97, 98,   0 }
+#define SH5_SCIF_IRQS {39, 40, 42,   0 }
 
 #if defined(CONFIG_CPU_SUBTYPE_SH7708)
 # define SCI_NPORTS 1
@@ -54,6 +57,13 @@
 # define SCPDR  0xA4000136 /* 8  bit SCI and SCIF */
 # define SCSCR_INIT(port)          0x30 /* TIE=0,RIE=0,TE=1,RE=1 */
 # define SCI_AND_SCIF
+#elif defined(CONFIG_SH_RTS7751R2D)
+# define SCI_NPORTS 1
+# define SCSPTR1 0xffe0001c /* 8  bit SCI */
+# define SCSPTR2 0xFFE80020 /* 16 bit SCIF */
+# define SCIF_ORER 0x0001   /* overrun error bit */
+# define SCSCR_INIT(port) 0x3a /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
+# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7751)
 # define SCI_NPORTS 2
 # define SCSPTR1 0xffe0001c /* 8  bit SCI */
@@ -68,9 +78,15 @@
 # define SCSPTR0 0xfe600000 /* 16 bit SCIF */
 # define SCSPTR1 0xfe610000 /* 16 bit SCIF */
 # define SCSPTR2 0xfe620000 /* 16 bit SCIF */
-# define SCIF_ORDER 0x0001  /* overrun error bit */
+# define SCIF_ORER 0x0001  /* overrun error bit */
 # define SCSCR_INIT(port)          0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
 # define SCIF_ONLY
+#elif defined(CONFIG_CPU_SUBTYPE_SH7300)
+# define SCI_NPORTS 1
+# define SCPCR  0xA4050116        /* 16 bit SCIF */
+# define SCPDR  0xA4050136        /* 16 bit SCIF */
+# define SCSCR_INIT(port)  0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */
+# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1)
 # define SCI_NPORTS 2
 # define SCSPTR1 0xffe00020 /* 16 bit SCIF */
@@ -78,6 +94,22 @@
 # define SCIF_ORER 0x0001   /* overrun error bit */
 # define SCSCR_INIT(port)          0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
 # define SCIF_ONLY
+#elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
+# include <asm/hardware.h>
+# define SCIF_BASE_ADDR    0x01030000
+# define SCIF_ADDR_SH5     PHYS_PERIPHERAL_BLOCK+SCIF_BASE_ADDR
+# define SCIF_PTR2_OFFS    0x0000020
+# define SCIF_LSR2_OFFS    0x0000024
+# define SCI_NPORTS 1
+# define SCI_INIT { \
+  { {}, PORT_SCIF, 0, \
+     SH5_SCIF_IRQS, sci_init_pins_scif }  \
+}
+# define SCSPTR2           ((port->mapbase)+SCIF_PTR2_OFFS) /* 16 bit SCIF */
+# define SCLSR2            ((port->mapbase)+SCIF_LSR2_OFFS) /* 16 bit SCIF */
+# define SCSCR_INIT(port)  0x38                           /* TIE=0,RIE=0,
+							     TE=1,RE=1,REIE=1 */
+# define SCIF_ONLY
 #elif defined(CONFIG_H83007) || defined(CONFIG_H83068)
 # define SCI_NPORTS 3
 # define SCSCR_INIT(port)          0x30 /* TIE=0,RIE=0,TE=1,RE=1 */
@@ -97,7 +129,11 @@
 #define SCI_CTRL_FLAGS_RIE  0x40 /* all */
 #define SCI_CTRL_FLAGS_TE   0x20 /* all */
 #define SCI_CTRL_FLAGS_RE   0x10 /* all */
-/*      SCI_CTRL_FLAGS_REIE 0x08  * 7750 SCIF */
+#if defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7751)
+#define SCI_CTRL_FLAGS_REIE 0x08 /* 7750 SCIF */
+#else
+#define SCI_CTRL_FLAGS_REIE 0
+#endif
 /*      SCI_CTRL_FLAGS_MPIE 0x08  * 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */
 /*      SCI_CTRL_FLAGS_TEIE 0x04  * 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */
 /*      SCI_CTRL_FLAGS_CKE1 0x02  * all */
@@ -125,7 +161,16 @@
 #define SCIF_RDF   0x0002 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */
 #define SCIF_DR    0x0001 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */
 
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+#define SCIF_ORER    0x0200
+#define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER)
+#define SCIF_RFDC_MASK 0x007f
+#define SCIF_TXROOM_MAX 64
+#else
 #define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK)
+#define SCIF_RFDC_MASK 0x001f
+#define SCIF_TXROOM_MAX 16
+#endif
 
 #if defined(SCI_ONLY)
 # define SCxSR_TEND(port)		SCI_TEND
@@ -145,14 +190,25 @@
 # define SCxSR_ERRORS(port)		SCIF_ERRORS
 # define SCxSR_RDxF(port)               SCIF_RDF
 # define SCxSR_TDxE(port)               SCIF_TDFE
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+# define SCxSR_ORER(port)		SCIF_ORER
+#else
 # define SCxSR_ORER(port)		0x0000
+#endif
 # define SCxSR_FER(port)		SCIF_FER
 # define SCxSR_PER(port)		SCIF_PER
 # define SCxSR_BRK(port)		SCIF_BRK
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+# define SCxSR_RDxF_CLEAR(port)         (sci_in(port,SCxSR)&0xfffc)
+# define SCxSR_ERROR_CLEAR(port)        (sci_in(port,SCxSR)&0xfd73)
+# define SCxSR_TDxE_CLEAR(port)         (sci_in(port,SCxSR)&0xffdf)
+# define SCxSR_BREAK_CLEAR(port)        (sci_in(port,SCxSR)&0xffe3)
+#else
 # define SCxSR_RDxF_CLEAR(port)		0x00fc
 # define SCxSR_ERROR_CLEAR(port)	0x0073
 # define SCxSR_TDxE_CLEAR(port)		0x00df
 # define SCxSR_BREAK_CLEAR(port)   	0x00e3
+#endif
 #else
 # define SCxSR_TEND(port)	 (((port)->type == PORT_SCI) ? SCI_TEND   : SCIF_TEND)
 # define SCxSR_ERRORS(port)	 (((port)->type == PORT_SCI) ? SCI_ERRORS : SCIF_ERRORS)
@@ -171,6 +227,7 @@
 /* SCFCR */
 #define SCFCR_RFRST 0x0002
 #define SCFCR_TFRST 0x0004
+#define SCFCR_TCRST 0x4000
 #define SCFCR_MCE   0x0008
 
 #define SCI_MAJOR		204
@@ -250,12 +307,17 @@
   }
 
 #ifdef CONFIG_CPU_SH3
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+#define SCIF_FNS(name, scif_offset, scif_size) \
+  CPU_SCIF_FNS(name, scif_offset, scif_size)
+#else
 #define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \
 		 sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \
                  h8_sci_offset, h8_sci_size) \
   CPU_SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh3_scif_offset, sh3_scif_size)
 #define SCIF_FNS(name, sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size) \
   CPU_SCIF_FNS(name, sh3_scif_offset, sh3_scif_size)
+#endif
 #elif defined(__H8300H__) || defined(__H8300S__)
 #define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \
 		 sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \
@@ -271,6 +333,19 @@
   CPU_SCIF_FNS(name, sh4_scif_offset, sh4_scif_size)
 #endif
 
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+SCIF_FNS(SCSMR,  0x00, 16)
+SCIF_FNS(SCBRR,  0x04,  8)
+SCIF_FNS(SCSCR,  0x08, 16)
+SCIF_FNS(SCTDSR, 0x0c,  8)
+SCIF_FNS(SCFER,  0x10, 16)
+SCIF_FNS(SCxSR,  0x14, 16)
+SCIF_FNS(SCFCR,  0x18, 16)
+SCIF_FNS(SCFDR,  0x1c, 16)
+SCIF_FNS(SCxTDR, 0x20,  8)
+SCIF_FNS(SCxRDR, 0x24,  8)
+SCIF_FNS(SCLSR,  0x24, 16)
+#else
 /*      reg      SCI/SH3   SCI/SH4  SCIF/SH3   SCIF/SH4  SCI/H8*/
 /*      name     off  sz   off  sz   off  sz   off  sz   off  sz*/
 SCIx_FNS(SCSMR,  0x00,  8, 0x00,  8, 0x00,  8, 0x00, 16, 0x00,  8)
@@ -281,8 +356,9 @@
 SCIx_FNS(SCxRDR, 0x0a,  8, 0x14,  8, 0x0A,  8, 0x14,  8, 0x05,  8)
 SCIF_FNS(SCFCR,                      0x0c,  8, 0x18, 16)
 SCIF_FNS(SCFDR,                      0x0e, 16, 0x1C, 16)
+SCIF_FNS(SCSPTR,                        0,  0, 0x20, 16)
 SCIF_FNS(SCLSR,                         0,  0, 0x24, 16)
-
+#endif
 #define sci_in(port, reg) sci_##reg##_in(port)
 #define sci_out(port, reg, value) sci_##reg##_out(port, value)
 
@@ -369,6 +445,13 @@
 	if (port->mapbase == 0xfe620000)
 		return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
 }
+#elif defined(CONFIG_CPU_SUBTYPE_SH7300)
+static inline int sci_rxd_in(struct uart_port *port)
+{
+        if (port->mapbase == 0xa4430000)
+                return ctrl_inb(SCPDR)&0x01 ? 1 : 0; /* SCIF0 */
+        return 1;
+}
 #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1)
 static inline int sci_rxd_in(struct uart_port *port)
 {
@@ -378,6 +461,11 @@
 		return ctrl_inw(SCSPTR2)&0x0001 ? 1 : 0; /* SCIF */
 
 }
+#elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
+static inline int sci_rxd_in(struct uart_port *port)
+{
+         return sci_in(port, SCSPTR)&0x0001 ? 1 : 0; /* SCIF */
+}
 #elif defined(__H8300H__) || defined(__H8300S__)
 static inline int sci_rxd_in(struct uart_port *port)
 {
@@ -420,7 +508,9 @@
 
 #define PCLK           (current_cpu_data.module_clock)
 
-#if !defined(__H8300H__) && !defined(__H8300S__)
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+#define SCBRR_VALUE(bps) ((PCLK+16*bps)/(16*bps)-1)
+#elif !defined(__H8300H__) && !defined(__H8300S__)
 #define SCBRR_VALUE(bps) ((PCLK+16*bps)/(32*bps)-1)
 #else
 #define SCBRR_VALUE(bps) (((CONFIG_CPU_CLOCK*1000/32)/bps)-1)
--- diff/drivers/serial/sunsu.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/serial/sunsu.c	2004-07-01 21:32:44.000000000 +0100
@@ -98,7 +98,7 @@
 	unsigned int		irq;
 
 #ifdef CONFIG_SERIO
-	struct serio		serio;
+	struct serio		*serio;
 	int			serio_open;
 #endif
 };
@@ -520,7 +520,7 @@
 		/* Stop-A is handled by drivers/char/keyboard.c now. */
 		if (up->su_type == SU_PORT_KBD) {
 #ifdef CONFIG_SERIO
-			serio_interrupt(&up->serio, ch, 0, regs);
+			serio_interrupt(up->serio, ch, 0, regs);
 #endif
 		} else if (up->su_type == SU_PORT_MS) {
 			int ret = suncore_mouse_baud_detection(ch, is_break);
@@ -534,7 +534,7 @@
 
 			case 0:
 #ifdef CONFIG_SERIO
-				serio_interrupt(&up->serio, ch, 0, regs);
+				serio_interrupt(up->serio, ch, 0, regs);
 #endif
 				break;
 			};
@@ -994,7 +994,7 @@
 
 static int sunsu_serio_write(struct serio *serio, unsigned char ch)
 {
-	struct uart_sunsu_port *up = serio->driver;
+	struct uart_sunsu_port *up = serio->port_data;
 	unsigned long flags;
 	int lsr;
 
@@ -1014,7 +1014,7 @@
 
 static int sunsu_serio_open(struct serio *serio)
 {
-	struct uart_sunsu_port *up = serio->driver;
+	struct uart_sunsu_port *up = serio->port_data;
 	unsigned long flags;
 	int ret;
 
@@ -1031,7 +1031,7 @@
 
 static void sunsu_serio_close(struct serio *serio)
 {
-	struct uart_sunsu_port *up = serio->driver;
+	struct uart_sunsu_port *up = serio->port_data;
 	unsigned long flags;
 
 	spin_lock_irqsave(&sunsu_serio_lock, flags);
@@ -1284,54 +1284,58 @@
 	.major			= TTY_MAJOR,
 };
 
-static int __init sunsu_kbd_ms_init(void)
+static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel)
 {
-	struct uart_sunsu_port *up;
-	int i;
+	struct serio *serio;
 
-	for (i = 0, up = sunsu_ports; i < 2; i++, up++) {
-		up->port.line = i;
-		up->port.type = PORT_UNKNOWN;
-		up->port.uartclk = (SU_BASE_BAUD * 16);
+	up->port.line = channel;
+	up->port.type = PORT_UNKNOWN;
+	up->port.uartclk = (SU_BASE_BAUD * 16);
 
-		if (up->su_type == SU_PORT_KBD)
-			up->cflag = B1200 | CS8 | CLOCAL | CREAD;
-		else
-			up->cflag = B4800 | CS8 | CLOCAL | CREAD;
+	if (up->su_type == SU_PORT_KBD)
+		up->cflag = B1200 | CS8 | CLOCAL | CREAD;
+	else
+		up->cflag = B4800 | CS8 | CLOCAL | CREAD;
 
-		sunsu_autoconfig(up);
-		if (up->port.type == PORT_UNKNOWN)
-			continue;
+	sunsu_autoconfig(up);
+	if (up->port.type == PORT_UNKNOWN)
+		return -1;
 
-		printk(KERN_INFO "su%d at 0x%p (irq = %s) is a %s\n",
-		       i,
-		       up->port.membase, __irq_itoa(up->irq),
-		       sunsu_type(&up->port));
+	printk(KERN_INFO "su%d at 0x%p (irq = %s) is a %s\n",
+	       channel,
+	       up->port.membase, __irq_itoa(up->irq),
+	       sunsu_type(&up->port));
 
 #ifdef CONFIG_SERIO
-		memset(&up->serio, 0, sizeof(up->serio));
+	up->serio = serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
+		memset(serio, 0, sizeof(serio));
 
-		up->serio.driver = up;
+		serio->port_data = up;
 
-		up->serio.type = SERIO_RS232;
+		serio->type = SERIO_RS232;
 		if (up->su_type == SU_PORT_KBD) {
-			up->serio.type |= SERIO_SUNKBD;
-			up->serio.name = "sukbd";
+			serio->type |= SERIO_SUNKBD;
+			strlcpy(serio->name, "sukbd", sizeof(serio->name));
 		} else {
-			up->serio.type |= (SERIO_SUN | (1 << 16));
-			up->serio.name = "sums";
+			serio->type |= (SERIO_SUN | (1 << 16));
+			strlcpy(serio->name, "sums", sizeof(serio->name));
 		}
-		up->serio.phys = (i == 0 ? "su/serio0" : "su/serio1");
+		strlcpy(serio->phys, (channel == 0 ? "su/serio0" : "su/serio1"),
+			sizeof(serio->phys));
 
-		up->serio.write = sunsu_serio_write;
-		up->serio.open = sunsu_serio_open;
-		up->serio.close = sunsu_serio_close;
+		serio->write = sunsu_serio_write;
+		serio->open = sunsu_serio_open;
+		serio->close = sunsu_serio_close;
 
-		serio_register_port(&up->serio);
+		serio_register_port(serio);
+	} else {
+		printk(KERN_WARNING "su%d: not enough memory for serio port\n",
+			channel);
+	}
 #endif
 
-		sunsu_startup(&up->port);
-	}
+	sunsu_startup(&up->port);
 	return 0;
 }
 
@@ -1680,10 +1684,12 @@
 	if (scan.msx != -1 && scan.kbx != -1) {
 		sunsu_ports[0].su_type = SU_PORT_MS;
 		sunsu_ports[0].port_node = scan.msnode;
+		sunsu_kbd_ms_init(&sunsu_ports[0], 0);
+
 		sunsu_ports[1].su_type = SU_PORT_KBD;
 		sunsu_ports[1].port_node = scan.kbnode;
+		sunsu_kbd_ms_init(&sunsu_ports[1], 1);
 
-		sunsu_kbd_ms_init();
 		return 0;
 	}
 
@@ -1715,7 +1721,10 @@
 		if (up->su_type == SU_PORT_MS ||
 		    up->su_type == SU_PORT_KBD) {
 #ifdef CONFIG_SERIO
-			serio_unregister_port(&up->serio);
+			if (up->serio) {
+				serio_unregister_port(up->serio);
+				up->serio = NULL;
+			}
 #endif
 		} else if (up->port.type != PORT_UNKNOWN) {
 			uart_remove_one_port(&sunsu_reg, &up->port);
--- diff/drivers/serial/sunzilog.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/serial/sunzilog.c	2004-07-01 21:32:44.000000000 +0100
@@ -107,7 +107,7 @@
 	unsigned char			prev_status;
 
 #ifdef CONFIG_SERIO
-	struct serio			serio;
+	struct serio			*serio;
 	int				serio_open;
 #endif
 };
@@ -291,7 +291,7 @@
 		/* Stop-A is handled by drivers/char/keyboard.c now. */
 #ifdef CONFIG_SERIO
 		if (up->serio_open)
-			serio_interrupt(&up->serio, ch, 0, regs);
+			serio_interrupt(up->serio, ch, 0, regs);
 #endif
 	} else if (ZS_IS_MOUSE(up)) {
 		int ret = suncore_mouse_baud_detection(ch, is_break);
@@ -306,7 +306,7 @@
 		case 0:
 #ifdef CONFIG_SERIO
 			if (up->serio_open)
-				serio_interrupt(&up->serio, ch, 0, regs);
+				serio_interrupt(up->serio, ch, 0, regs);
 #endif
 			break;
 		};
@@ -1295,7 +1295,7 @@
 
 static int sunzilog_serio_write(struct serio *serio, unsigned char ch)
 {
-	struct uart_sunzilog_port *up = serio->driver;
+	struct uart_sunzilog_port *up = serio->port_data;
 	unsigned long flags;
 
 	spin_lock_irqsave(&sunzilog_serio_lock, flags);
@@ -1309,7 +1309,7 @@
 
 static int sunzilog_serio_open(struct serio *serio)
 {
-	struct uart_sunzilog_port *up = serio->driver;
+	struct uart_sunzilog_port *up = serio->port_data;
 	unsigned long flags;
 	int ret;
 
@@ -1326,7 +1326,7 @@
 
 static void sunzilog_serio_close(struct serio *serio)
 {
-	struct uart_sunzilog_port *up = serio->driver;
+	struct uart_sunzilog_port *up = serio->port_data;
 	unsigned long flags;
 
 	spin_lock_irqsave(&sunzilog_serio_lock, flags);
@@ -1529,6 +1529,7 @@
 static void __init sunzilog_init_kbdms(struct uart_sunzilog_port *up, int channel)
 {
 	int baud, brg;
+	struct serio *serio;
 
 	if (channel == KEYBOARD_LINE) {
 		up->flags |= SUNZILOG_FLAG_CONS_KEYB;
@@ -1547,26 +1548,34 @@
 	sunzilog_convert_to_zs(up, up->cflag, 0, brg);
 
 #ifdef CONFIG_SERIO
-	memset(&up->serio, 0, sizeof(up->serio));
+	up->serio = serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+	if (serio) {
 
-	up->serio.driver = up;
+		memset(serio, 0, sizeof(serio));
 
-	up->serio.type = SERIO_RS232;
-	if (channel == KEYBOARD_LINE) {
-		up->serio.type |= SERIO_SUNKBD;
-		up->serio.name = "zskbd";
-	} else {
-		up->serio.type |= (SERIO_SUN | (1 << 16));
-		up->serio.name = "zsms";
-	}
-	up->serio.phys = (channel == KEYBOARD_LINE ?
-			  "zs/serio0" : "zs/serio1");
+		serio->port_data = up;
 
-	up->serio.write = sunzilog_serio_write;
-	up->serio.open = sunzilog_serio_open;
-	up->serio.close = sunzilog_serio_close;
+		serio->type = SERIO_RS232;
+		if (channel == KEYBOARD_LINE) {
+			serio->type |= SERIO_SUNKBD;
+			strlcpy(serio->name, "zskbd", sizeof(serio->name));
+		} else {
+			serio->type |= (SERIO_SUN | (1 << 16));
+			strlcpy(serio->name, "zsms", sizeof(serio->name));
+		}
+		strlcpy(serio->phys,
+			(channel == KEYBOARD_LINE ? "zs/serio0" : "zs/serio1"),
+			sizeof(serio->phys));
+
+		serio->write = sunzilog_serio_write;
+		serio->open = sunzilog_serio_open;
+		serio->close = sunzilog_serio_close;
 
-	serio_register_port(&up->serio);
+		serio_register_port(serio);
+	} else {
+		printk(KERN_WARNING "zs%d: not enough memory for serio port\n",
+			channel);
+	}
 #endif
 
 	sunzilog_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS);
@@ -1732,10 +1741,15 @@
 	for (i = 0; i < NUM_CHANNELS; i++) {
 		struct uart_sunzilog_port *up = &sunzilog_port_table[i];
 
-		if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up))
-			continue;
-
-		uart_remove_one_port(&sunzilog_reg, &up->port);
+		if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up)) {
+#ifdef CONFIG_SERIO
+			if (up->serio) {
+				serio_unregister_port(up->serio);
+				up->serio = NULL;
+			}
+#endif
+		} else
+			uart_remove_one_port(&sunzilog_reg, &up->port);
 	}
 
 	uart_unregister_driver(&sunzilog_reg);
--- diff/drivers/telephony/ixj.c	2004-05-19 22:12:16.000000000 +0100
+++ source/drivers/telephony/ixj.c	2004-07-01 21:32:44.000000000 +0100
@@ -461,8 +461,8 @@
 static int ixj_init_filter(IXJ *j, IXJ_FILTER * jf);
 static int ixj_init_filter_raw(IXJ *j, IXJ_FILTER_RAW * jfr);
 static int ixj_init_tone(IXJ *j, IXJ_TONE * ti);
-static int ixj_build_cadence(IXJ *j, IXJ_CADENCE * cp);
-static int ixj_build_filter_cadence(IXJ *j, IXJ_FILTER_CADENCE * cp);
+static int ixj_build_cadence(IXJ *j, IXJ_CADENCE __user * cp);
+static int ixj_build_filter_cadence(IXJ *j, IXJ_FILTER_CADENCE __user * cp);
 /* Serial Control Interface funtions */
 static int SCI_Control(IXJ *j, int control);
 static int SCI_Prepare(IXJ *j);
@@ -2855,7 +2855,7 @@
 	}
 }
 
-static ssize_t ixj_read(struct file * file_p, char *buf, size_t length, loff_t * ppos)
+static ssize_t ixj_read(struct file * file_p, char __user *buf, size_t length, loff_t * ppos)
 {
 	unsigned long i = *ppos;
 	IXJ * j = get_ixj(NUM(file_p->f_dentry->d_inode));
@@ -2910,7 +2910,7 @@
 	}
 }
 
-static ssize_t ixj_enhanced_read(struct file * file_p, char *buf, size_t length,
+static ssize_t ixj_enhanced_read(struct file * file_p, char __user *buf, size_t length,
 			  loff_t * ppos)
 {
 	int pre_retval;
@@ -2935,7 +2935,7 @@
 	return read_retval;
 }
 
-static ssize_t ixj_write(struct file *file_p, const char *buf, size_t count, loff_t * ppos)
+static ssize_t ixj_write(struct file *file_p, const char __user *buf, size_t count, loff_t * ppos)
 {
 	unsigned long i = *ppos;
 	IXJ *j = file_p->private_data;
@@ -2989,7 +2989,7 @@
 	return min(count, j->write_buffer_size);
 }
 
-static ssize_t ixj_enhanced_write(struct file * file_p, const char *buf, size_t count, loff_t * ppos)
+static ssize_t ixj_enhanced_write(struct file * file_p, const char __user *buf, size_t count, loff_t * ppos)
 {
 	int pre_retval;
 	ssize_t write_retval = 0;
@@ -5938,31 +5938,41 @@
 	ixj_WriteDSPCommand(0x3001, j);	/* Test External SRAM */
 }
 
-static int ixj_build_cadence(IXJ *j, IXJ_CADENCE * cp)
+static int ixj_build_cadence(IXJ *j, IXJ_CADENCE __user * cp)
 {
-	IXJ_CADENCE *lcp;
+	ixj_cadence *lcp;
+	IXJ_CADENCE_ELEMENT __user *cep;
 	IXJ_CADENCE_ELEMENT *lcep;
 	IXJ_TONE ti;
+	int err;
 
-	lcp = kmalloc(sizeof(IXJ_CADENCE), GFP_KERNEL);
+	lcp = kmalloc(sizeof(ixj_cadence), GFP_KERNEL);
 	if (lcp == NULL)
 		return -ENOMEM;
-	if (copy_from_user(lcp, (char *) cp, sizeof(IXJ_CADENCE)) || (unsigned)lcp->elements_used >= ~0U/sizeof(IXJ_CADENCE_ELEMENT) )
-        {
-                kfree(lcp);
-                return -EFAULT;
-        }
+
+	err = -EFAULT;
+	if (copy_from_user(&lcp->elements_used,
+			   &cp->elements_used, sizeof(int)))
+		goto out;
+	if (copy_from_user(&lcp->termination,
+			   &cp->termination, sizeof(IXJ_CADENCE_TERM)))
+		goto out;
+	if (get_user(cep, &cp->ce))
+		goto out;
+
+	err = -EINVAL;
+	if ((unsigned)lcp->elements_used >= ~0U/sizeof(IXJ_CADENCE_ELEMENT))
+		goto out;
+
+	err = -ENOMEM;
 	lcep = kmalloc(sizeof(IXJ_CADENCE_ELEMENT) * lcp->elements_used, GFP_KERNEL);
-	if (lcep == NULL) {
-		kfree(lcp);
-		return -ENOMEM;
-	}
-	if (copy_from_user(lcep, lcp->ce, sizeof(IXJ_CADENCE_ELEMENT) * lcp->elements_used))
-	{
-		kfree(lcep);
-		kfree(lcp);
-		return -EFAULT;
-	}
+	if (!lcep)
+		goto out;
+
+	err = -EFAULT;
+	if (copy_from_user(lcep, cep, sizeof(IXJ_CADENCE_ELEMENT) * lcp->elements_used))
+		goto out1;
+
 	if (j->cadence_t) {
 		kfree(j->cadence_t->ce);
 		kfree(j->cadence_t);
@@ -5982,9 +5992,14 @@
 	}
 	ixj_play_tone(j, lcp->ce[0].index);
 	return 1;
+out1:
+	kfree(lcep);
+out:
+	kfree(lcp);
+	return err;
 }
 
-static int ixj_build_filter_cadence(IXJ *j, IXJ_FILTER_CADENCE * cp)
+static int ixj_build_filter_cadence(IXJ *j, IXJ_FILTER_CADENCE __user * cp)
 {
 	IXJ_FILTER_CADENCE *lcp;
 	lcp = kmalloc(sizeof(IXJ_FILTER_CADENCE), GFP_KERNEL);
@@ -5994,7 +6009,7 @@
 		}
 		return -ENOMEM;
         }
-	if (copy_from_user(lcp, (char *) cp, sizeof(IXJ_FILTER_CADENCE))) {
+	if (copy_from_user(lcp, cp, sizeof(IXJ_FILTER_CADENCE))) {
 		if(ixjdebug & 0x0001) {
 			printk(KERN_INFO "Could not copy cadence to kernel\n");
 		}
@@ -6206,6 +6221,7 @@
 	IXJ_TONE ti;
 	IXJ_FILTER jf;
 	IXJ_FILTER_RAW jfr;
+	void __user *argp = (void __user *)arg;
 
 	unsigned int raise, mant;
 	unsigned int minor = iminor(inode);
@@ -6251,7 +6267,7 @@
 		retval = j->serial;
 		break;
 	case IXJCTL_VERSION:
-		if (copy_to_user((char *) arg, ixj_c_revision, strlen(ixj_c_revision))) 
+		if (copy_to_user(argp, ixj_c_revision, strlen(ixj_c_revision))) 
 			retval = -EFAULT;
 		break;
 	case PHONE_RING_CADENCE:
@@ -6259,7 +6275,7 @@
 		break;
 	case IXJCTL_CIDCW:
 		if(arg) {
-			if (copy_from_user(&j->cid_send, (char *)arg, sizeof(PHONE_CID))) {
+			if (copy_from_user(&j->cid_send, argp, sizeof(PHONE_CID))) {
 				retval = -EFAULT;
 				break;
 			}
@@ -6274,7 +6290,7 @@
                 /* Fall through */
  	case PHONE_RING_START:
 		if(arg) {
-			if (copy_from_user(&j->cid_send, (char *)arg, sizeof(PHONE_CID))) {
+			if (copy_from_user(&j->cid_send, argp, sizeof(PHONE_CID))) {
 				retval = -EFAULT;
 				break;
 			}
@@ -6432,22 +6448,22 @@
 			samplerate = arg;
 		break;
 	case IXJCTL_DRYBUFFER_READ:
-		put_user(j->drybuffer, (unsigned long *) arg);
+		put_user(j->drybuffer, (unsigned long __user *) argp);
 		break;
 	case IXJCTL_DRYBUFFER_CLEAR:
 		j->drybuffer = 0;
 		break;
 	case IXJCTL_FRAMES_READ:
-		put_user(j->framesread, (unsigned long *) arg);
+		put_user(j->framesread, (unsigned long __user *) argp);
 		break;
 	case IXJCTL_FRAMES_WRITTEN:
-		put_user(j->frameswritten, (unsigned long *) arg);
+		put_user(j->frameswritten, (unsigned long __user *) argp);
 		break;
 	case IXJCTL_READ_WAIT:
-		put_user(j->read_wait, (unsigned long *) arg);
+		put_user(j->read_wait, (unsigned long __user *) argp);
 		break;
 	case IXJCTL_WRITE_WAIT:
-		put_user(j->write_wait, (unsigned long *) arg);
+		put_user(j->write_wait, (unsigned long __user *) argp);
 		break;
 	case PHONE_MAXRINGS:
 		j->maxrings = arg;
@@ -6573,7 +6589,7 @@
                         12, 10, 16, 9, 8, 48, 5,
                         40, 40, 80, 40, 40, 6
                 };
-                if(copy_from_user(&pd, (void *)arg, sizeof(pd))) {
+                if(copy_from_user(&pd, argp, sizeof(pd))) {
                         retval = -EFAULT;
 			break;
 		}
@@ -6590,7 +6606,7 @@
                         default:val=proto_size[pd.type]*3;break;
                 }
                 pd.buf_min=pd.buf_max=pd.buf_opt=val;
-                if(copy_to_user((void *)arg, &pd, sizeof(pd)))
+                if(copy_to_user(argp, &pd, sizeof(pd)))
                         retval = -EFAULT;
         	break;
         }
@@ -6644,7 +6660,7 @@
 		ixj_write_vmwi(j, arg);
 		break;
 	case IXJCTL_CID:
-		if (copy_to_user((char *) arg, &j->cid, sizeof(PHONE_CID))) 
+		if (copy_to_user(argp, &j->cid, sizeof(PHONE_CID))) 
 			retval = -EFAULT;
 		j->ex.bits.caller_id = 0;
 		break;
@@ -6666,13 +6682,13 @@
 		break;
 	case PHONE_CAPABILITIES_LIST:
 		add_caps(j);
-		if (copy_to_user((char *) arg, j->caplist, sizeof(struct phone_capability) * j->caps)) 
+		if (copy_to_user(argp, j->caplist, sizeof(struct phone_capability) * j->caps)) 
 			retval = -EFAULT;
 		break;
 	case PHONE_CAPABILITIES_CHECK:
 		{
 			struct phone_capability cap;
-			if (copy_from_user(&cap, (char *) arg, sizeof(cap))) 
+			if (copy_from_user(&cap, argp, sizeof(cap))) 
 				retval = -EFAULT;
 			else {
 				add_caps(j);
@@ -6688,12 +6704,12 @@
 		j->ex.bits.pstn_ring = 0;
 		break;
 	case IXJCTL_SET_FILTER:
-		if (copy_from_user(&jf, (char *) arg, sizeof(jf))) 
+		if (copy_from_user(&jf, argp, sizeof(jf))) 
 			retval = -EFAULT;
 		retval = ixj_init_filter(j, &jf);
 		break;
 	case IXJCTL_SET_FILTER_RAW:
-		if (copy_from_user(&jfr, (char *) arg, sizeof(jfr))) 
+		if (copy_from_user(&jfr, argp, sizeof(jfr))) 
 			retval = -EFAULT;
 		else
 			retval = ixj_init_filter_raw(j, &jfr);
@@ -6705,19 +6721,19 @@
 			retval = j->filter_hist[arg];
 		break;
 	case IXJCTL_INIT_TONE:
-		if (copy_from_user(&ti, (char *) arg, sizeof(ti)))
+		if (copy_from_user(&ti, argp, sizeof(ti)))
 			retval = -EFAULT;
 		else
 			retval = ixj_init_tone(j, &ti);
 		break;
 	case IXJCTL_TONE_CADENCE:
-		retval = ixj_build_cadence(j, (IXJ_CADENCE *) arg);
+		retval = ixj_build_cadence(j, argp);
 		break;
 	case IXJCTL_FILTER_CADENCE:
-		retval = ixj_build_filter_cadence(j, (IXJ_FILTER_CADENCE *) arg);
+		retval = ixj_build_filter_cadence(j, argp);
 		break;
 	case IXJCTL_SIGCTL:
-		if (copy_from_user(&j->sigdef, (char *)arg, sizeof(IXJ_SIGDEF))) {
+		if (copy_from_user(&j->sigdef, argp, sizeof(IXJ_SIGDEF))) {
 			retval = -EFAULT;
 			break;
 		}
--- diff/drivers/telephony/ixj.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/telephony/ixj.h	2004-07-01 21:32:44.000000000 +0100
@@ -1167,6 +1167,12 @@
 ******************************************************************************/
 
 typedef struct {
+	int elements_used;
+	IXJ_CADENCE_TERM termination;
+	IXJ_CADENCE_ELEMENT *ce;
+} ixj_cadence;
+
+typedef struct {
 	struct phone_device p;
 	struct timer_list timer;
 	unsigned int board;
@@ -1220,8 +1226,8 @@
 	char tone_index;
 	char tone_state;
 	char maxrings;
-	IXJ_CADENCE *cadence_t;
-	IXJ_CADENCE *cadence_r;
+	ixj_cadence *cadence_t;
+	ixj_cadence *cadence_r;
 	int tone_cadence_state;
 	IXJ_CADENCE_F cadence_f[6];
 	DTMF dtmf;
--- diff/drivers/usb/Kconfig	2004-05-19 22:12:16.000000000 +0100
+++ source/drivers/usb/Kconfig	2004-07-01 21:32:44.000000000 +0100
@@ -7,7 +7,7 @@
 # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
 config USB
 	tristate "Support for Host-side USB"
-	depends on PCI || SA1111 || ARCH_OMAP1510 || ARCH_OMAP1610
+	depends on PCI || SA1111 || ARCH_OMAP1510 || ARCH_OMAP1610 || ARCH_LH7A404
 	---help---
 	  Universal Serial Bus (USB) is a specification for a serial bus
 	  subsystem which offers higher speeds and more features than the
--- diff/drivers/usb/class/audio.c	2004-05-19 22:12:16.000000000 +0100
+++ source/drivers/usb/class/audio.c	2004-07-01 21:32:44.000000000 +0100
@@ -212,9 +212,6 @@
 
 #define dprintk(x)
 
-#undef abs
-extern int abs(int __x) __attribute_const__; /* Shut up warning */
-
 /* --------------------------------------------------------------------- */
 
 /*
@@ -398,17 +395,6 @@
 
 /* --------------------------------------------------------------------- */
 
-/* prevent picking up a bogus abs macro */
-#undef abs
-static inline int abs(int x)
-{
-        if (x < 0)
-		return -x;
-	return x;
-}
-                                
-/* --------------------------------------------------------------------- */
-
 static inline unsigned ld2(unsigned int x)
 {
 	unsigned r = 0;
@@ -2008,6 +1994,7 @@
 {
 	struct usb_mixerdev *ms = (struct usb_mixerdev *)file->private_data;
 	int i, j, val;
+	int __user *user_arg = (int __user *)arg;
 
 	if (!ms->state->usbdev)
 		return -ENODEV;
@@ -2034,7 +2021,7 @@
 		return 0;
 	}
 	if (cmd == OSS_GETVERSION)
-		return put_user(SOUND_VERSION, (int *)arg);
+		return put_user(SOUND_VERSION, user_arg);
 	if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
 		return -EINVAL;
 	if (_IOC_DIR(cmd) == _IOC_READ) {
@@ -2043,27 +2030,27 @@
 			val = get_rec_src(ms);
 			if (val < 0)
 				return val;
-			return put_user(val, (int *)arg);
+			return put_user(val, user_arg);
 
 		case SOUND_MIXER_DEVMASK: /* Arg contains a bit for each supported device */
 			for (val = i = 0; i < ms->numch; i++)
 				val |= 1 << ms->ch[i].osschannel;
-			return put_user(val, (int *)arg);
+			return put_user(val, user_arg);
 
 		case SOUND_MIXER_RECMASK: /* Arg contains a bit for each supported recording source */
 			for (val = i = 0; i < ms->numch; i++)
 				if (ms->ch[i].slctunitid)
 					val |= 1 << ms->ch[i].osschannel;
-			return put_user(val, (int *)arg);
+			return put_user(val, user_arg);
 
 		case SOUND_MIXER_STEREODEVS: /* Mixer channels supporting stereo */
 			for (val = i = 0; i < ms->numch; i++)
 				if (ms->ch[i].flags & (MIXFLG_STEREOIN | MIXFLG_STEREOOUT))
 					val |= 1 << ms->ch[i].osschannel;
-			return put_user(val, (int *)arg);
+			return put_user(val, user_arg);
 			
 		case SOUND_MIXER_CAPS:
-			return put_user(SOUND_CAP_EXCL_INPUT, (int *)arg);
+			return put_user(SOUND_CAP_EXCL_INPUT, user_arg);
 
 		default:
 			i = _IOC_NR(cmd);
@@ -2071,7 +2058,7 @@
 				return -EINVAL;
 			for (j = 0; j < ms->numch; j++) {
 				if (ms->ch[j].osschannel == i) {
-					return put_user(ms->ch[j].value, (int *)arg);
+					return put_user(ms->ch[j].value, user_arg);
 				}
 			}
 			return -EINVAL;
@@ -2082,7 +2069,7 @@
 	ms->modcnt++;
 	switch (_IOC_NR(cmd)) {
 	case SOUND_MIXER_RECSRC: /* Arg contains a bit for each recording source */
-		if (get_user(val, (int *)arg))
+		if (get_user(val, user_arg))
 			return -EFAULT;
 		return set_rec_src(ms, val);
 
@@ -2093,11 +2080,11 @@
 		for (j = 0; j < ms->numch && ms->ch[j].osschannel != i; j++);
 		if (j >= ms->numch)
 			return -EINVAL;
-		if (get_user(val, (int *)arg))
+		if (get_user(val, user_arg))
 			return -EFAULT;
 		if (wrmixer(ms, j, val))
 			return -EIO;
-		return put_user(ms->ch[j].value, (int *)arg);
+		return put_user(ms->ch[j].value, user_arg);
 	}
 }
 
@@ -2370,6 +2357,7 @@
 {
 	struct usb_audiodev *as = (struct usb_audiodev *)file->private_data;
 	struct usb_audio_state *s = as->state;
+	int __user *user_arg = (int __user *)arg;
 	unsigned long flags;
 	audio_buf_info abinfo;
 	count_info cinfo;
@@ -2387,7 +2375,7 @@
 #endif
 	switch (cmd) {
 	case OSS_GETVERSION:
-		return put_user(SOUND_VERSION, (int *)arg);
+		return put_user(SOUND_VERSION, user_arg);
 
 	case SNDCTL_DSP_SYNC:
 		if (file->f_mode & FMODE_WRITE)
@@ -2399,7 +2387,7 @@
 
 	case SNDCTL_DSP_GETCAPS:
 		return put_user(DSP_CAP_DUPLEX | DSP_CAP_REALTIME | DSP_CAP_TRIGGER | 
-				DSP_CAP_MMAP | DSP_CAP_BATCH, (int *)arg);
+				DSP_CAP_MMAP | DSP_CAP_BATCH, user_arg);
 
 	case SNDCTL_DSP_RESET:
 		if (file->f_mode & FMODE_WRITE) {
@@ -2413,7 +2401,7 @@
 		return 0;
 
 	case SNDCTL_DSP_SPEED:
-		if (get_user(val, (int *)arg))
+		if (get_user(val, user_arg))
 			return -EFAULT;
 		if (val >= 0) {
 			if (val < 4000)
@@ -2423,10 +2411,12 @@
 			if (set_format(as, file->f_mode, AFMT_QUERY, val))
 				return -EIO;
 		}
-		return put_user((file->f_mode & FMODE_READ) ? as->usbin.dma.srate : as->usbout.dma.srate, (int *)arg);
+		return put_user((file->f_mode & FMODE_READ) ? 
+				as->usbin.dma.srate : as->usbout.dma.srate,
+				user_arg);
 
 	case SNDCTL_DSP_STEREO:
-		if (get_user(val, (int *)arg))
+		if (get_user(val, user_arg))
 			return -EFAULT;
 		val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
 		if (val)
@@ -2438,7 +2428,7 @@
 		return 0;
 
 	case SNDCTL_DSP_CHANNELS:
-		if (get_user(val, (int *)arg))
+		if (get_user(val, user_arg))
 			return -EFAULT;
 		if (val != 0) {
 			val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
@@ -2450,14 +2440,14 @@
 				return -EIO;
 		}
 		val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
-		return put_user(AFMT_ISSTEREO(val2) ? 2 : 1, (int *)arg);
+		return put_user(AFMT_ISSTEREO(val2) ? 2 : 1, user_arg);
 
 	case SNDCTL_DSP_GETFMTS: /* Returns a mask */
 		return put_user(AFMT_U8 | AFMT_U16_LE | AFMT_U16_BE |
-				AFMT_S8 | AFMT_S16_LE | AFMT_S16_BE, (int *)arg);
+				AFMT_S8 | AFMT_S16_LE | AFMT_S16_BE, user_arg);
 
 	case SNDCTL_DSP_SETFMT: /* Selects ONE fmt*/
-		if (get_user(val, (int *)arg))
+		if (get_user(val, user_arg))
 			return -EFAULT;
 		if (val != AFMT_QUERY) {
 			if (hweight32(val) != 1)
@@ -2471,7 +2461,7 @@
 				return -EIO;
 		}
 		val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
-		return put_user(val2 & ~AFMT_STEREO, (int *)arg);
+		return put_user(val2 & ~AFMT_STEREO, user_arg);
 
 	case SNDCTL_DSP_POST:
 		return 0;
@@ -2482,10 +2472,10 @@
 			val |= PCM_ENABLE_INPUT;
 		if (file->f_mode & FMODE_WRITE && as->usbout.flags & FLG_RUNNING) 
 			val |= PCM_ENABLE_OUTPUT;
-		return put_user(val, (int *)arg);
+		return put_user(val, user_arg);
 
 	case SNDCTL_DSP_SETTRIGGER:
-		if (get_user(val, (int *)arg))
+		if (get_user(val, user_arg))
 			return -EFAULT;
 		if (file->f_mode & FMODE_READ) {
 			if (val & PCM_ENABLE_INPUT) {
@@ -2543,7 +2533,7 @@
 		spin_lock_irqsave(&as->lock, flags);
 		val = as->usbout.dma.count;
 		spin_unlock_irqrestore(&as->lock, flags);
-		return put_user(val, (int *)arg);
+		return put_user(val, user_arg);
 
 	case SNDCTL_DSP_GETIPTR:
 		if (!(file->f_mode & FMODE_READ))
@@ -2577,14 +2567,14 @@
 		if (file->f_mode & FMODE_WRITE) {
 			if ((val = prog_dmabuf_out(as)))
 				return val;
-			return put_user(as->usbout.dma.fragsize, (int *)arg);
+			return put_user(as->usbout.dma.fragsize, user_arg);
 		}
 		if ((val = prog_dmabuf_in(as)))
 			return val;
-		return put_user(as->usbin.dma.fragsize, (int *)arg);
+		return put_user(as->usbin.dma.fragsize, user_arg);
 
 	case SNDCTL_DSP_SETFRAGMENT:
-		if (get_user(val, (int *)arg))
+		if (get_user(val, user_arg))
 			return -EFAULT;
 		if (file->f_mode & FMODE_READ) {
 			as->usbin.dma.ossfragshift = val & 0xffff;
@@ -2612,7 +2602,7 @@
 		if ((file->f_mode & FMODE_READ && as->usbin.dma.subdivision) ||
 		    (file->f_mode & FMODE_WRITE && as->usbout.dma.subdivision))
 			return -EINVAL;
-		if (get_user(val, (int *)arg))
+		if (get_user(val, user_arg))
 			return -EFAULT;
 		if (val != 1 && val != 2 && val != 4)
 			return -EINVAL;
@@ -2623,15 +2613,17 @@
 		return 0;
 
 	case SOUND_PCM_READ_RATE:
-		return put_user((file->f_mode & FMODE_READ) ? as->usbin.dma.srate : as->usbout.dma.srate, (int *)arg);
+		return put_user((file->f_mode & FMODE_READ) ? 
+				as->usbin.dma.srate : as->usbout.dma.srate,
+				user_arg);
 
 	case SOUND_PCM_READ_CHANNELS:
 		val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
-		return put_user(AFMT_ISSTEREO(val2) ? 2 : 1, (int *)arg);
+		return put_user(AFMT_ISSTEREO(val2) ? 2 : 1, user_arg);
 
 	case SOUND_PCM_READ_BITS:
 		val2 = (file->f_mode & FMODE_READ) ? as->usbin.dma.format : as->usbout.dma.format;
-		return put_user(AFMT_IS16BIT(val2) ? 16 : 8, (int *)arg);
+		return put_user(AFMT_IS16BIT(val2) ? 16 : 8, user_arg);
 
 	case SOUND_PCM_WRITE_FILTER:
 	case SNDCTL_DSP_SETSYNCRO:
--- diff/drivers/usb/class/cdc-acm.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/class/cdc-acm.c	2004-07-01 21:32:44.000000000 +0100
@@ -5,6 +5,7 @@
  * Copyright (c) 1999 Pavel Machek	<pavel@suse.cz>
  * Copyright (c) 1999 Johannes Erdfelt	<johannes@erdfelt.com>
  * Copyright (c) 2000 Vojtech Pavlik	<vojtech@suse.cz>
+ * Copyright (c) 2004 Oliver Neukum	<oliver@neukum.name>
  *
  * USB Abstract Control Model driver for USB modems and ISDN adapters
  *
@@ -27,6 +28,7 @@
  *	v0.22 - probe only the control interface. if usbcore doesn't choose the
  *		config we want, sysadmin changes bConfigurationValue in sysfs.
  *	v0.23 - use softirq for rx processing, as needed by tty layer
+ *	v0.24 - change probe method to evaluate CDC union descriptor
  */
 
 /*
@@ -59,6 +61,9 @@
 #include <asm/uaccess.h>
 #include <linux/usb.h>
 #include <asm/byteorder.h>
+#include <asm/unaligned.h>
+
+#include "cdc-acm.h"
 
 /*
  * Version Information
@@ -67,102 +72,12 @@
 #define DRIVER_AUTHOR "Armin Fuerst, Pavel Machek, Johannes Erdfelt, Vojtech Pavlik"
 #define DRIVER_DESC "USB Abstract Control Model driver for USB modems and ISDN adapters"
 
-/*
- * CMSPAR, some architectures can't have space and mark parity.
- */
-
-#ifndef CMSPAR
-#define CMSPAR			0
-#endif
-
-/*
- * Major and minor numbers.
- */
-
-#define ACM_TTY_MAJOR		166
-#define ACM_TTY_MINORS		32
-
-/*
- * Requests.
- */
-
-#define USB_RT_ACM		(USB_TYPE_CLASS | USB_RECIP_INTERFACE)
-
-#define ACM_REQ_COMMAND		0x00
-#define ACM_REQ_RESPONSE	0x01
-#define ACM_REQ_SET_FEATURE	0x02
-#define ACM_REQ_GET_FEATURE	0x03
-#define ACM_REQ_CLEAR_FEATURE	0x04
-
-#define ACM_REQ_SET_LINE	0x20
-#define ACM_REQ_GET_LINE	0x21
-#define ACM_REQ_SET_CONTROL	0x22
-#define ACM_REQ_SEND_BREAK	0x23
-
-/*
- * IRQs.
- */
-
-#define ACM_IRQ_NETWORK		0x00
-#define ACM_IRQ_LINE_STATE	0x20
-
-/*
- * Output control lines.
- */
-
-#define ACM_CTRL_DTR		0x01
-#define ACM_CTRL_RTS		0x02
-
-/*
- * Input control lines and line errors.
- */
-
-#define ACM_CTRL_DCD		0x01
-#define ACM_CTRL_DSR		0x02
-#define ACM_CTRL_BRK		0x04
-#define ACM_CTRL_RI		0x08
-
-#define ACM_CTRL_FRAMING	0x10
-#define ACM_CTRL_PARITY		0x20
-#define ACM_CTRL_OVERRUN	0x40
-
-/*
- * Line speed and caracter encoding.
- */
-
-struct acm_line {
-	__u32 speed;
-	__u8 stopbits;
-	__u8 parity;
-	__u8 databits;
-} __attribute__ ((packed));
-
-/*
- * Internal driver structures.
- */
-
-struct acm {
-	struct usb_device *dev;				/* the corresponding usb device */
-	struct usb_interface *control;			/* control interface */
-	struct usb_interface *data;			/* data interface */
-	struct tty_struct *tty;				/* the corresponding tty */
-	struct urb *ctrlurb, *readurb, *writeurb;	/* urbs */
-	struct acm_line line;				/* line coding (bits, stop, parity) */
-	struct work_struct work;			/* work queue entry for line discipline waking up */
-	struct tasklet_struct bh;			/* rx processing */
-	unsigned int ctrlin;				/* input control lines (DCD, DSR, RI, break, overruns) */
-	unsigned int ctrlout;				/* output control lines (DTR, RTS) */
-	unsigned int writesize;				/* max packet size for the output bulk endpoint */
-	unsigned int used;				/* someone has this acm's device open */
-	unsigned int minor;				/* acm minor number */
-	unsigned char throttle;				/* throttled by tty layer */
-	unsigned char clocal;				/* termios CLOCAL */
-};
-
 static struct usb_driver acm_driver;
 static struct tty_driver *acm_tty_driver;
 static struct acm *acm_table[ACM_TTY_MINORS];
 
+static DECLARE_MUTEX(open_sem);
+
 #define ACM_READY(acm)	(acm && acm->dev && acm->used)
 
 /*
@@ -195,7 +110,7 @@
 {
 	struct acm *acm = urb->context;
 	struct usb_ctrlrequest *dr = urb->transfer_buffer;
-	unsigned char *data = (unsigned char *)(dr + 1);
+	unsigned char *data;
 	int newctrl;
 	int status;
 
@@ -217,6 +132,7 @@
 	if (!ACM_READY(acm))
 		goto exit;
 
+	data = (unsigned char *)(dr + 1);
 	switch (dr->bRequest) {
 
 		case ACM_IRQ_NETWORK:
@@ -226,7 +142,7 @@
 
 		case ACM_IRQ_LINE_STATE:
 
-			newctrl = le16_to_cpup((__u16 *) data);
+			newctrl = le16_to_cpu(get_unaligned((__u16 *) data));
 
 			if (acm->tty && !acm->clocal && (acm->ctrlin & ~newctrl & ACM_CTRL_DCD)) {
 				dbg("calling hangup");
@@ -259,6 +175,7 @@
 static void acm_read_bulk(struct urb *urb, struct pt_regs *regs)
 {
 	struct acm *acm = urb->context;
+	dbg("Entering acm_read_bulk with status %d\n", urb->status);
 
 	if (!ACM_READY(acm))
 		return;
@@ -277,6 +194,7 @@
 	struct tty_struct *tty = acm->tty;
 	unsigned char *data = urb->transfer_buffer;
 	int i = 0;
+	dbg("Entering acm_rx_tasklet");
 
 	if (urb->actual_length > 0 && !acm->throttle)  {
 		for (i = 0; i < urb->actual_length && !acm->throttle; i++) {
@@ -287,14 +205,20 @@
 			}
 			tty_insert_flip_char(tty, data[i], 0);
 		}
+		dbg("Handed %d bytes to tty layer", i+1);
 		tty_flip_buffer_push(tty);
 	}
 
+	spin_lock(&acm->throttle_lock);
 	if (acm->throttle) {
+		dbg("Throtteling noticed");
 		memmove(data, data + i, urb->actual_length - i);
 		urb->actual_length -= i;
+		acm->resubmit_to_unthrottle = 1;
+		spin_unlock(&acm->throttle_lock);
 		return;
 	}
+	spin_unlock(&acm->throttle_lock);
 
 	urb->actual_length = 0;
 	urb->dev = acm->dev;
@@ -308,21 +232,25 @@
 static void acm_write_bulk(struct urb *urb, struct pt_regs *regs)
 {
 	struct acm *acm = (struct acm *)urb->context;
+	dbg("Entering acm_write_bulk with status %d\n", urb->status);
 
 	if (!ACM_READY(acm))
-		return;
+		goto out;
 
 	if (urb->status)
 		dbg("nonzero write bulk status received: %d", urb->status);
 
 	schedule_work(&acm->work);
+out:
+	acm->ready_for_write = 1;
 }
 
 static void acm_softint(void *private)
 {
 	struct acm *acm = private;
 	struct tty_struct *tty = acm->tty;
-
+	dbg("Entering acm_softint.\n");
+	
 	if (!ACM_READY(acm))
 		return;
 
@@ -339,6 +267,7 @@
 static int acm_tty_open(struct tty_struct *tty, struct file *filp)
 {
 	struct acm *acm = acm_table[tty->index];
+	dbg("Entering acm_tty_open.\n");
 
 	if (!acm || !acm->dev)
 		return -EINVAL;
@@ -346,30 +275,43 @@
 	tty->driver_data = acm;
 	acm->tty = tty;
 
-        lock_kernel();
+        down(&open_sem);
 
-	if (acm->used++) {
-                unlock_kernel();
-                return 0;
+	if (acm->used) {
+		goto done;
         }
 
-        unlock_kernel();
-
 	acm->ctrlurb->dev = acm->dev;
-	if (usb_submit_urb(acm->ctrlurb, GFP_KERNEL))
+	if (usb_submit_urb(acm->ctrlurb, GFP_KERNEL)) {
 		dbg("usb_submit_urb(ctrl irq) failed");
+		goto bail_out;
+	}
 
 	acm->readurb->dev = acm->dev;
-	if (usb_submit_urb(acm->readurb, GFP_KERNEL))
+	if (usb_submit_urb(acm->readurb, GFP_KERNEL)) {
 		dbg("usb_submit_urb(read bulk) failed");
+		goto bail_out_and_unlink;
+	}
 
-	acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS);
+	if (0 > acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS))
+		goto full_bailout;
 
 	/* force low_latency on so that our tty_push actually forces the data through, 
 	   otherwise it is scheduled, and with high data rates data can get lost. */
 	tty->low_latency = 1;
 
+done:
+	acm->used++;
+	up(&open_sem);
 	return 0;
+
+full_bailout:
+	usb_unlink_urb(acm->readurb);
+bail_out_and_unlink:
+	usb_unlink_urb(acm->ctrlurb);
+bail_out:
+	up(&open_sem);
+	return -EIO;
 }
 
 static void acm_tty_close(struct tty_struct *tty, struct file *filp)
@@ -379,6 +321,7 @@
 	if (!acm || !acm->used)
 		return;
 
+	down(&open_sem);
 	if (!--acm->used) {
 		if (acm->dev) {
 			acm_set_control(acm, acm->ctrlout = 0);
@@ -394,35 +337,40 @@
 			kfree(acm);
 		}
 	}
+	up(&open_sem);
 }
 
 static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count)
 {
 	struct acm *acm = tty->driver_data;
 	int stat;
+	dbg("Entering acm_tty_write to write %d bytes from %s space,\n", count, from_user ? "user" : "kernel");
 
 	if (!ACM_READY(acm))
 		return -EINVAL;
-	if (acm->writeurb->status == -EINPROGRESS)
+	if (!acm->ready_for_write)
 		return 0;
 	if (!count)
 		return 0;
 
 	count = (count > acm->writesize) ? acm->writesize : count;
 
+	dbg("Get %d bytes from %s space...", count, from_user ? "user" : "kernel");
 	if (from_user) {
-		if (copy_from_user(acm->writeurb->transfer_buffer, (void __user *)buf, count))
+		if (copy_from_user(acm->write_buffer, (void __user *)buf, count))
 			return -EFAULT;
 	} else
-		memcpy(acm->writeurb->transfer_buffer, buf, count);
+		memcpy(acm->write_buffer, buf, count);
+	dbg("  Successfully copied.\n");
 
 	acm->writeurb->transfer_buffer_length = count;
 	acm->writeurb->dev = acm->dev;
 
-	/* GFP_KERNEL probably works if from_user */
-	stat = usb_submit_urb(acm->writeurb, GFP_ATOMIC);
+	acm->ready_for_write = 0;
+	stat = usb_submit_urb(acm->writeurb, GFP_NOIO);
 	if (stat < 0) {
 		dbg("usb_submit_urb(write bulk) failed");
+		acm->ready_for_write = 1;
 		return stat;
 	}
 
@@ -434,7 +382,7 @@
 	struct acm *acm = tty->driver_data;
 	if (!ACM_READY(acm))
 		return -EINVAL;
-	return acm->writeurb->status == -EINPROGRESS ? 0 : acm->writesize;
+	return !acm->ready_for_write ? 0 : acm->writesize;
 }
 
 static int acm_tty_chars_in_buffer(struct tty_struct *tty)
@@ -442,7 +390,7 @@
 	struct acm *acm = tty->driver_data;
 	if (!ACM_READY(acm))
 		return -EINVAL;
-	return acm->writeurb->status == -EINPROGRESS ? acm->writeurb->transfer_buffer_length : 0;
+	return !acm->ready_for_write ? acm->writeurb->transfer_buffer_length : 0;
 }
 
 static void acm_tty_throttle(struct tty_struct *tty)
@@ -450,7 +398,9 @@
 	struct acm *acm = tty->driver_data;
 	if (!ACM_READY(acm))
 		return;
+	spin_lock_bh(&acm->throttle_lock);
 	acm->throttle = 1;
+	spin_unlock_bh(&acm->throttle_lock);
 }
 
 static void acm_tty_unthrottle(struct tty_struct *tty)
@@ -458,9 +408,13 @@
 	struct acm *acm = tty->driver_data;
 	if (!ACM_READY(acm))
 		return;
+	spin_lock_bh(&acm->throttle_lock);
 	acm->throttle = 0;
-	if (acm->readurb->status != -EINPROGRESS)
+	spin_unlock_bh(&acm->throttle_lock);
+	if (acm->resubmit_to_unthrottle) {
+		acm->resubmit_to_unthrottle = 0;
 		acm_read_bulk(acm->readurb, NULL);
+	}
 }
 
 static void acm_tty_break_ctl(struct tty_struct *tty, int state)
@@ -567,77 +521,121 @@
  * USB probe and disconnect routines.
  */
 
-#define CHECK_XFERTYPE(descr, xfer_type) (((descr)->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == xfer_type)
-			
 static int acm_probe (struct usb_interface *intf,
 		      const struct usb_device_id *id)
 {
-	struct usb_device *dev;
+	struct union_desc *union_header = NULL;
+	char *buffer = intf->altsetting->extra;
+	int buflen = intf->altsetting->extralen;
+	struct usb_interface *control_interface;
+	struct usb_interface *data_interface;
+	struct usb_endpoint_descriptor *epctrl;
+	struct usb_endpoint_descriptor *epread;
+	struct usb_endpoint_descriptor *epwrite;
+	struct usb_device *usb_dev = interface_to_usbdev(intf);
 	struct acm *acm;
-	struct usb_host_config *cfacm;
-	struct usb_interface *data = NULL;
-	struct usb_host_interface *ifcom, *ifdata = NULL;
-	struct usb_endpoint_descriptor *epctrl = NULL;
-	struct usb_endpoint_descriptor *epread = NULL;
-	struct usb_endpoint_descriptor *epwrite = NULL;
-	int readsize, ctrlsize, minor, j;
-	unsigned char *buf;
-
-	dev = interface_to_usbdev (intf);
-
-	cfacm = dev->actconfig;
-
-	/* We know we're probe()d with the control interface. */
-	ifcom = intf->cur_altsetting;
-
-	/* ACM doesn't guarantee the data interface is
-	 * adjacent to the control interface, or that if one
-	 * is there it's not for call management ... so find
-	 * it
-	 */
-	for (j = 0; j < cfacm->desc.bNumInterfaces; j++) {
-		ifdata = cfacm->interface[j]->cur_altsetting;
-		data = cfacm->interface[j];
-
-		if (ifdata->desc.bInterfaceClass == USB_CLASS_CDC_DATA
-		    && ifdata->desc.bNumEndpoints == 2) {
-			
-			epctrl = &ifcom->endpoint[0].desc;
-			epread = &ifdata->endpoint[0].desc;
-			epwrite = &ifdata->endpoint[1].desc;
-
-			if ((epctrl->bEndpointAddress & USB_DIR_IN) != USB_DIR_IN
-			    || !CHECK_XFERTYPE(epctrl,  USB_ENDPOINT_XFER_INT)
-			    || !CHECK_XFERTYPE(epread,  USB_ENDPOINT_XFER_BULK)
-			    || !CHECK_XFERTYPE(epwrite, USB_ENDPOINT_XFER_BULK)
-			    || ((epread->bEndpointAddress & USB_DIR_IN)
-			        ^ (epwrite->bEndpointAddress & USB_DIR_IN)) != USB_DIR_IN) {
-				/* not suitable */
-				goto next_interface;
-			}
-			
-			if ((epread->bEndpointAddress & USB_DIR_IN) != USB_DIR_IN) {
-				/* descriptors are swapped */
-				epread = &ifdata->endpoint[1].desc;
-				epwrite = &ifdata->endpoint[0].desc;
-			}
-			dev_dbg(&intf->dev, "found data interface at %d\n", j);
-			break;
-		} else {
-next_interface:
-			ifdata = NULL;
-			data = NULL;
+	int minor;
+	int ctrlsize,readsize;
+	u8 *buf;
+	u8 ac_management_function = 0;
+	u8 call_management_function = 0;
+	int call_interface_num = -1;
+	int data_interface_num;
+
+	if (!buffer) {
+		err("Wierd descriptor references");
+		return -EINVAL;
+	}
+
+	while (buflen > 0) {
+		if (buffer [1] != USB_DT_CS_INTERFACE) {
+			err("skipping garbage");
+			goto next_desc;
 		}
+
+		switch (buffer [2]) {
+			case CDC_UNION_TYPE: /* we've found it */
+				if (union_header) {
+					err("More than one union descriptor, skipping ...");
+					goto next_desc;
+				}
+				union_header = (struct union_desc *)buffer;
+				break;
+			case CDC_COUNTRY_TYPE: /* maybe somehow export */
+				break; /* for now we ignore it */
+			case CDC_AC_MANAGEMENT_TYPE:
+				ac_management_function = buffer[3];
+				break;
+			case CDC_CALL_MANAGEMENT_TYPE:
+				call_management_function = buffer[3];
+				call_interface_num = buffer[4];
+				if ((call_management_function & 3) != 3)
+					err("This device cannot do calls on its own. It is no modem.");
+				break;
+				
+			default:
+				err("Ignoring extra header");
+				break;
+			}
+next_desc:
+		buflen -= buffer[0];
+		buffer += buffer[0];
 	}
 
-	/* there's been a problem */
-	if (!ifdata) {
-		dev_dbg(&intf->dev, "data interface not found\n");
+	if (!union_header) {
+		dev_dbg(&intf->dev,"No union descriptor, giving up\n");
 		return -ENODEV;
+	}
 
+	control_interface = usb_ifnum_to_if(usb_dev, union_header->bMasterInterface0);
+	data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = union_header->bSlaveInterface0));
+	if (!control_interface || !data_interface) {
+		dev_dbg(&intf->dev,"no interfaces\n");
+		return -ENODEV;
 	}
+	
+	if (data_interface_num != call_interface_num)
+		dev_dbg(&intf->dev,"Seperate call control interface. That is not fully supported.");
 
+	if (usb_interface_claimed(data_interface)) { /* valid in this context */
+		dev_dbg(&intf->dev,"The data interface isn't available\n");
+		return -EBUSY;
+	}
+
+	/*workaround for switched interfaces */
+	if (data_interface->cur_altsetting->desc.bInterfaceClass != CDC_DATA_INTERFACE_TYPE) {
+		if (control_interface->cur_altsetting->desc.bInterfaceClass == CDC_DATA_INTERFACE_TYPE) {
+			struct usb_interface *t;
+			dev_dbg(&intf->dev,"Your device has switched interfaces.\n");
+
+			t = control_interface;
+			control_interface = data_interface;
+			data_interface = t;
+		} else {
+			return -EINVAL;
+		}
+	}
+	if (data_interface->cur_altsetting->desc.bNumEndpoints < 2)
+		return -EINVAL;
+
+	epctrl = &control_interface->cur_altsetting->endpoint[0].desc;
+	epread = &data_interface->cur_altsetting->endpoint[0].desc;
+	epwrite = &data_interface->cur_altsetting->endpoint[1].desc;
+
+
+	/* workaround for switched endpoints */
+	if ((epread->bEndpointAddress & USB_DIR_IN) != USB_DIR_IN) {
+		/* descriptors are swapped */
+		struct usb_endpoint_descriptor *t;
+		dev_dbg(&intf->dev,"The data interface has switched endpoints\n");
+		
+		t = epread;
+		epread = epwrite;
+		epwrite = t;
+	}
+	dbg("interfaces are valid");
 	for (minor = 0; minor < ACM_TTY_MINORS && acm_table[minor]; minor++);
+
 	if (acm_table[minor]) {
 		err("no more free acm devices");
 		return -ENODEV;
@@ -645,76 +643,77 @@
 
 	if (!(acm = kmalloc(sizeof(struct acm), GFP_KERNEL))) {
 		dev_dbg(&intf->dev, "out of memory (acm kmalloc)\n");
-		return -ENOMEM;
+		goto alloc_fail;
 	}
-	
 	memset(acm, 0, sizeof(struct acm));
 
 	ctrlsize = epctrl->wMaxPacketSize;
 	readsize = epread->wMaxPacketSize;
 	acm->writesize = epwrite->wMaxPacketSize;
-	acm->control = intf;
-	acm->data = data;
+	acm->control = control_interface;
+	acm->data = data_interface;
 	acm->minor = minor;
-	acm->dev = dev;
-
+	acm->dev = usb_dev;
+	acm->ctrl_caps = ac_management_function;
+	acm->ctrlsize = ctrlsize;
+	acm->readsize = readsize;
 	acm->bh.func = acm_rx_tasklet;
 	acm->bh.data = (unsigned long) acm;
 	INIT_WORK(&acm->work, acm_softint, acm);
+	spin_lock_init(&acm->throttle_lock);
+	acm->ready_for_write = 1;
 
-	if (!(buf = kmalloc(ctrlsize + readsize + acm->writesize, GFP_KERNEL))) {
-		dev_dbg(&intf->dev, "out of memory (buf kmalloc)\n");
-		kfree(acm);
-		return -ENOMEM;
+	buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
+	if (!buf) {
+		dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)\n");
+		goto alloc_fail2;
+	}
+	acm->ctrl_buffer = buf;
+
+	buf = usb_buffer_alloc(usb_dev, readsize, GFP_KERNEL, &acm->read_dma);
+	if (!buf) {
+		dev_dbg(&intf->dev, "out of memory (read buffer alloc)\n");
+		goto alloc_fail3;
 	}
+	acm->read_buffer = buf;
+
+	buf = usb_buffer_alloc(usb_dev, acm->writesize, GFP_KERNEL, &acm->write_dma);
+	if (!buf) {
+		dev_dbg(&intf->dev, "out of memory (write buffer alloc)\n");
+		goto alloc_fail4;
+	}
+	acm->write_buffer = buf;	
 
 	acm->ctrlurb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!acm->ctrlurb) {
 		dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)\n");
-		kfree(acm);
-		kfree(buf);
-		return -ENOMEM;
+		goto alloc_fail5;
 	}
 	acm->readurb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!acm->readurb) {
 		dev_dbg(&intf->dev, "out of memory (readurb kmalloc)\n");
-		usb_free_urb(acm->ctrlurb);
-		kfree(acm);
-		kfree(buf);
-		return -ENOMEM;
+		goto alloc_fail6;
 	}
 	acm->writeurb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!acm->writeurb) {
 		dev_dbg(&intf->dev, "out of memory (writeurb kmalloc)\n");
-		usb_free_urb(acm->readurb);
-		usb_free_urb(acm->ctrlurb);
-		kfree(acm);
-		kfree(buf);
-		return -ENOMEM;
+		goto alloc_fail7;
 	}
 
-	usb_fill_int_urb(acm->ctrlurb, dev, usb_rcvintpipe(dev, epctrl->bEndpointAddress),
-		buf, ctrlsize, acm_ctrl_irq, acm, epctrl->bInterval);
-
-	usb_fill_bulk_urb(acm->readurb, dev, usb_rcvbulkpipe(dev, epread->bEndpointAddress),
-		buf += ctrlsize, readsize, acm_read_bulk, acm);
-	acm->readurb->transfer_flags |= URB_NO_FSBR;
-
-	usb_fill_bulk_urb(acm->writeurb, dev, usb_sndbulkpipe(dev, epwrite->bEndpointAddress),
-		buf += readsize, acm->writesize, acm_write_bulk, acm);
-	acm->writeurb->transfer_flags |= URB_NO_FSBR;
-
-	if ( (j = usb_driver_claim_interface(&acm_driver, data, acm)) != 0) {
-		err("claim failed");
-		usb_free_urb(acm->ctrlurb);
-		usb_free_urb(acm->readurb);
-		usb_free_urb(acm->writeurb);
-		kfree(acm);
-		kfree(buf);
-		return j;
-	} 
-
-	tty_register_device(acm_tty_driver, minor, &intf->dev);
+	usb_fill_int_urb(acm->ctrlurb, usb_dev, usb_rcvintpipe(usb_dev, epctrl->bEndpointAddress),
+			 acm->ctrl_buffer, ctrlsize, acm_ctrl_irq, acm, epctrl->bInterval);
+	acm->ctrlurb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+	acm->ctrlurb->transfer_dma = acm->ctrl_dma;
+
+	usb_fill_bulk_urb(acm->readurb, usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress),
+			  acm->read_buffer, readsize, acm_read_bulk, acm);
+	acm->readurb->transfer_flags |= URB_NO_FSBR | URB_NO_TRANSFER_DMA_MAP;
+	acm->readurb->transfer_dma = acm->read_dma;
+
+	usb_fill_bulk_urb(acm->writeurb, usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress),
+			  acm->write_buffer, acm->writesize, acm_write_bulk, acm);
+	acm->writeurb->transfer_flags |= URB_NO_FSBR | URB_NO_TRANSFER_DMA_MAP;
+	acm->writeurb->transfer_dma = acm->write_dma;
 
 	dev_info(&intf->dev, "ttyACM%d: USB ACM device\n", minor);
 
@@ -724,21 +723,41 @@
 	acm->line.databits = 8;
 	acm_set_line(acm, &acm->line);
 
+	usb_driver_claim_interface(&acm_driver, data_interface, acm);
+
+	tty_register_device(acm_tty_driver, minor, &intf->dev);
+
 	acm_table[minor] = acm;
 	usb_set_intfdata (intf, acm);
 	return 0;
+
+alloc_fail7:
+	usb_free_urb(acm->readurb);
+alloc_fail6:
+	usb_free_urb(acm->ctrlurb);
+alloc_fail5:
+	usb_buffer_free(usb_dev, acm->writesize, acm->write_buffer, acm->write_dma);
+alloc_fail4:
+	usb_buffer_free(usb_dev, readsize, acm->read_buffer, acm->read_dma);
+alloc_fail3:
+	usb_buffer_free(usb_dev, ctrlsize, acm->ctrl_buffer, acm->ctrl_dma);
+alloc_fail2:
+	kfree(acm);
+alloc_fail:
+	return -ENOMEM;
 }
-#undef CHECK_XFERTYPE
 
 static void acm_disconnect(struct usb_interface *intf)
 {
 	struct acm *acm = usb_get_intfdata (intf);
+	struct usb_device *usb_dev = interface_to_usbdev(intf);
 
 	if (!acm || !acm->dev) {
 		dbg("disconnect on nonexisting interface");
 		return;
 	}
 
+	down(&open_sem);
 	acm->dev = NULL;
 	usb_set_intfdata (intf, NULL);
 
@@ -746,7 +765,11 @@
 	usb_unlink_urb(acm->readurb);
 	usb_unlink_urb(acm->writeurb);
 
-	kfree(acm->ctrlurb->transfer_buffer);
+	flush_scheduled_work(); /* wait for acm_softint */
+
+	usb_buffer_free(usb_dev, acm->writesize, acm->write_buffer, acm->write_dma);
+	usb_buffer_free(usb_dev, acm->readsize, acm->read_buffer, acm->read_dma);
+	usb_buffer_free(usb_dev, acm->ctrlsize, acm->ctrl_buffer, acm->ctrl_dma);
 
 	usb_driver_release_interface(&acm_driver, acm->data);
 
@@ -757,9 +780,12 @@
 		usb_free_urb(acm->readurb);
 		usb_free_urb(acm->writeurb);
 		kfree(acm);
+		up(&open_sem);
 		return;
 	}
 
+	up(&open_sem);
+
 	if (acm->tty)
 		tty_hangup(acm->tty);
 }
--- diff/drivers/usb/class/usblp.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/class/usblp.c	2004-07-01 21:32:44.000000000 +0100
@@ -75,6 +75,7 @@
 #define IOCNR_HP_SET_CHANNEL		4
 #define IOCNR_GET_BUS_ADDRESS		5
 #define IOCNR_GET_VID_PID		6
+#define IOCNR_SOFT_RESET		7
 /* Get device_id string: */
 #define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
 /* The following ioctls were added for http://hpoj.sourceforge.net: */
@@ -90,6 +91,8 @@
 #define LPIOC_GET_BUS_ADDRESS(len) _IOC(_IOC_READ, 'P', IOCNR_GET_BUS_ADDRESS, len)
 /* Get two-int array: [0]=vendor ID, [1]=product ID: */
 #define LPIOC_GET_VID_PID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_VID_PID, len)
+/* Perform class specific soft reset */
+#define LPIOC_SOFT_RESET _IOC(_IOC_NONE, 'P', IOCNR_SOFT_RESET, 0);
 
 /*
  * A DEVICE_ID string may include the printer's serial number.
@@ -587,6 +590,13 @@
 					usblp->minor, twoints[0], twoints[1]);
 				break;
 
+			case IOCNR_SOFT_RESET:
+				if (_IOC_DIR(cmd) != _IOC_NONE) {
+					retval = -EINVAL;
+					goto done;
+				}
+				retval = usblp_reset(usblp);
+				break;
 			default:
 				retval = -ENOTTY;
 		}
@@ -761,6 +771,7 @@
 			usblp->minor, usblp->readurb->status);
 		usblp->readurb->dev = usblp->dev;
  		usblp->readcount = 0;
+		usblp->rcomplete = 0;
 		if (usb_submit_urb(usblp->readurb, GFP_KERNEL) < 0)
 			dbg("error submitting urb");
 		count = -EIO;
--- diff/drivers/usb/core/devices.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/devices.c	2004-07-01 21:32:44.000000000 +0100
@@ -589,6 +589,8 @@
 		bus = list_entry(buslist, struct usb_bus, bus_list);
 
 		/* recurse through all children of the root hub */
+		if (!bus->root_hub)
+			continue;
 		down(&bus->root_hub->serialize);
 		ret = usb_device_dump(&buf, &nbytes, &skip_bytes, ppos, bus->root_hub, bus, 0, 0, 0);
 		up(&bus->root_hub->serialize);
--- diff/drivers/usb/core/devio.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/devio.c	2004-07-01 21:32:44.000000000 +0100
@@ -290,8 +290,11 @@
 		spin_lock_irqsave(&ps->lock, flags);
 	}
 	spin_unlock_irqrestore(&ps->lock, flags);
-	while ((as = async_getcompleted(ps)))
+	as = async_getcompleted(ps);
+	while (as) {
 		free_async(as);
+		as = async_getcompleted(ps);
+	}
 }
 
 static void destroy_async_on_interface (struct dev_state *ps, unsigned int ifnum)
@@ -558,7 +561,7 @@
 			if (usbfs_snoop) {
 				dev_info(&dev->dev, "control read: data ");
 				for (j = 0; j < ctrl.wLength; ++j)
-					printk ("%02x ", (unsigned char)((char *)ctrl.data)[j]);
+					printk ("%02x ", (unsigned char)(tbuf)[j]);
 				printk("\n");
 			}
 			if (copy_to_user(ctrl.data, tbuf, ctrl.wLength)) {
@@ -578,7 +581,7 @@
 		if (usbfs_snoop) {
 			dev_info(&dev->dev, "control write: data: ");
 			for (j = 0; j < ctrl.wLength; ++j)
-				printk ("%02x ", (unsigned char)((char *)ctrl.data)[j]);
+				printk ("%02x ", (unsigned char)(tbuf)[j]);
 			printk("\n");
 		}
 		i = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ctrl.bRequest, ctrl.bRequestType,
@@ -968,29 +971,27 @@
 static int processcompl(struct async *as)
 {
 	struct urb *urb = as->urb;
+	struct usbdevfs_urb __user *userurb = as->userurb;
 	unsigned int i;
 
 	if (as->userbuffer)
 		if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length))
 			return -EFAULT;
-	if (put_user(urb->status,
-		     &((struct usbdevfs_urb *)as->userurb)->status))
+	if (put_user(urb->status, &userurb->status))
 		return -EFAULT;
-	if (put_user(urb->actual_length,
-		     &((struct usbdevfs_urb *)as->userurb)->actual_length))
+	if (put_user(urb->actual_length, &userurb->actual_length))
 		return -EFAULT;
-	if (put_user(urb->error_count,
-		     &((struct usbdevfs_urb *)as->userurb)->error_count))
+	if (put_user(urb->error_count, &userurb->error_count))
 		return -EFAULT;
 
 	if (!(usb_pipeisoc(urb->pipe)))
 		return 0;
 	for (i = 0; i < urb->number_of_packets; i++) {
 		if (put_user(urb->iso_frame_desc[i].actual_length,
-			     &((struct usbdevfs_urb *)as->userurb)->iso_frame_desc[i].actual_length))
+			     &userurb->iso_frame_desc[i].actual_length))
 			return -EFAULT;
 		if (put_user(urb->iso_frame_desc[i].status,
-			     &((struct usbdevfs_urb *)as->userurb)->iso_frame_desc[i].status))
+			     &userurb->iso_frame_desc[i].status))
 			return -EFAULT;
 	}
 	return 0;
--- diff/drivers/usb/core/hcd-pci.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/hcd-pci.c	2004-07-01 21:32:44.000000000 +0100
@@ -229,7 +229,6 @@
 void usb_hcd_pci_remove (struct pci_dev *dev)
 {
 	struct usb_hcd		*hcd;
-	struct usb_device	*hub;
 
 	hcd = pci_get_drvdata(dev);
 	if (!hcd)
@@ -239,12 +238,11 @@
 	if (in_interrupt ())
 		BUG ();
 
-	hub = hcd->self.root_hub;
 	if (HCD_IS_RUNNING (hcd->state))
 		hcd->state = USB_STATE_QUIESCING;
 
 	dev_dbg (hcd->self.controller, "roothub graceful disconnect\n");
-	usb_disconnect (&hub);
+	usb_disconnect (&hcd->self.root_hub);
 
 	hcd->driver->stop (hcd);
 	hcd_buffer_destroy (hcd);
--- diff/drivers/usb/core/hcd.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/hcd.c	2004-07-01 21:32:44.000000000 +0100
@@ -764,8 +764,9 @@
  *
  * The USB host controller calls this function to register the root hub
  * properly with the USB subsystem.  It sets up the device properly in
- * the device model tree, and then calls usb_new_device() to register the
- * usb device.  It also assigns the root hub's USB address (always 1).
+ * the device tree and stores the root_hub pointer in the bus structure,
+ * then calls usb_new_device() to register the usb device.  It also
+ * assigns the root hub's USB address (always 1).
  */
 int usb_register_root_hub (struct usb_device *usb_dev, struct device *parent_dev)
 {
@@ -777,7 +778,10 @@
 	memset (&usb_dev->bus->devmap.devicemap, 0,
 			sizeof usb_dev->bus->devmap.devicemap);
 	set_bit (devnum, usb_dev->bus->devmap.devicemap);
-	usb_dev->state = USB_STATE_ADDRESS;
+	usb_set_device_state(usb_dev, USB_STATE_ADDRESS);
+
+	down (&usb_bus_list_lock);
+	usb_dev->bus->root_hub = usb_dev;
 
 	usb_dev->epmaxpacketin[0] = usb_dev->epmaxpacketout[0] = 64;
 	retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE);
@@ -787,14 +791,15 @@
 		return (retval < 0) ? retval : -EMSGSIZE;
 	}
 
-	(void) usb_get_dev (usb_dev);
 	down (&usb_dev->serialize);
 	retval = usb_new_device (usb_dev);
-	if (retval)
+	up (&usb_dev->serialize);
+	if (retval) {
+		usb_dev->bus->root_hub = NULL;
 		dev_err (parent_dev, "can't register root hub for %s, %d\n",
 				usb_dev->dev.bus_id, retval);
-	up (&usb_dev->serialize);
-	usb_put_dev (usb_dev);
+	}
+	up (&usb_bus_list_lock);
 	return retval;
 }
 EXPORT_SYMBOL (usb_register_root_hub);
@@ -1574,11 +1579,13 @@
 	unsigned		i;
 
 	/* hc's root hub is removed later removed in hcd->stop() */
-	hub->state = USB_STATE_NOTATTACHED;
+	down (&hub->serialize);
+	usb_set_device_state(hub, USB_STATE_NOTATTACHED);
 	for (i = 0; i < hub->maxchild; i++) {
 		if (hub->children [i])
 			usb_disconnect (&hub->children [i]);
 	}
+	up (&hub->serialize);
 }
 
 /**
--- diff/drivers/usb/core/hcd.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/hcd.h	2004-07-01 21:32:44.000000000 +0100
@@ -244,17 +244,10 @@
 					struct usb_bus *, unsigned port);
 extern int usb_new_device(struct usb_device *dev);
 extern void usb_disconnect(struct usb_device **);
-extern void usb_choose_address(struct usb_device *dev);
-extern void usb_release_address(struct usb_device *dev);
 
-/* exported to hub driver ONLY to support usb_reset_device () */
 extern int usb_get_configuration(struct usb_device *dev);
 extern void usb_destroy_configuration(struct usb_device *dev);
 
-/* use these only before the device's address has been set */
-#define usb_snddefctrl(dev)		((PIPE_CONTROL << 30))
-#define usb_rcvdefctrl(dev)		((PIPE_CONTROL << 30) | USB_DIR_IN)
-
 /*-------------------------------------------------------------------------*/
 
 /*
@@ -346,7 +339,8 @@
 extern int usb_register_root_hub (struct usb_device *usb_dev,
 		struct device *parent_dev);
 
-static inline int hcd_register_root (struct usb_hcd *hcd)
+static inline int hcd_register_root (struct usb_device *usb_dev,
+		struct usb_hcd *hcd)
 {
 	/* hcd->driver->start() reported can_wakeup, probably with
 	 * assistance from board's boot firmware.
@@ -356,8 +350,7 @@
 		dev_dbg (hcd->self.controller, "supports USB remote wakeup\n");
 	hcd->remote_wakeup = hcd->can_wakeup;
 
-	return usb_register_root_hub (
-		hcd_to_bus (hcd)->root_hub, hcd->self.controller);
+	return usb_register_root_hub (usb_dev, hcd->self.controller);
 }
 
 /*-------------------------------------------------------------------------*/
--- diff/drivers/usb/core/hub.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/hub.c	2004-07-01 21:32:44.000000000 +0100
@@ -9,6 +9,11 @@
  */
 
 #include <linux/config.h>
+#ifdef CONFIG_USB_DEBUG
+	#define DEBUG
+#else
+	#undef DEBUG
+#endif
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/module.h>
@@ -19,11 +24,6 @@
 #include <linux/slab.h>
 #include <linux/smp_lock.h>
 #include <linux/ioctl.h>
-#ifdef CONFIG_USB_DEBUG
-	#define DEBUG
-#else
-	#undef DEBUG
-#endif
 #include <linux/usb.h>
 #include <linux/usbdevice_fs.h>
 #include <linux/suspend.h>
@@ -36,11 +36,13 @@
 #include "hcd.h"
 #include "hub.h"
 
+/* Protect all struct usb_device state members */
+static spinlock_t device_state_lock = SPIN_LOCK_UNLOCKED;
+
 /* Wakes up khubd */
 static spinlock_t hub_event_lock = SPIN_LOCK_UNLOCKED;
 
 static LIST_HEAD(hub_event_list);	/* List of hubs needing servicing */
-static LIST_HEAD(hub_list);		/* List of all hubs (for cleanup) */
 
 static DECLARE_WAIT_QUEUE_HEAD(khubd_wait);
 static pid_t khubd_pid = 0;			/* PID of khubd */
@@ -229,6 +231,8 @@
 {
 	struct usb_hub *hub = (struct usb_hub *)urb->context;
 	int status;
+	int i;
+	unsigned long bits;
 
 	spin_lock(&hub_event_lock);
 	hub->urb_active = 0;
@@ -253,6 +257,11 @@
 	
 	/* let khubd handle things */
 	case 0:			/* we got data:  port status changed */
+		bits = 0;
+		for (i = 0; i < urb->actual_length; ++i)
+			bits |= ((unsigned long) ((*hub->buffer)[i]))
+					<< (i*8);
+		hub->event_bits[0] = bits;
 		break;
 	}
 
@@ -260,7 +269,7 @@
 
 	/* Something happened, let khubd figure it out */
 	if (list_empty(&hub->event_list)) {
-		list_add(&hub->event_list, &hub_event_list);
+		list_add_tail(&hub->event_list, &hub_event_list);
 		wake_up(&khubd_wait);
 	}
 
@@ -268,7 +277,7 @@
 	if ((status = usb_submit_urb (hub->urb, GFP_ATOMIC)) != 0
 			/* ENODEV means we raced disconnect() */
 			&& status != -ENODEV)
-		dev_err (&hub->intf->dev, "resubmit --> %d\n", urb->status);
+		dev_err (&hub->intf->dev, "resubmit --> %d\n", status);
 	if (status == 0)
 		hub->urb_active = 1;
 done:
@@ -632,7 +641,6 @@
 {
 	struct usb_hub *hub = usb_get_intfdata (intf);
 	DECLARE_COMPLETION(urb_complete);
-	unsigned long flags;
 
 	if (!hub)
 		return;
@@ -641,17 +649,13 @@
 		highspeed_hubs--;
 
 	usb_set_intfdata (intf, NULL);
-	spin_lock_irqsave(&hub_event_lock, flags);
+	spin_lock_irq(&hub_event_lock);
 	hub->urb_complete = &urb_complete;
 
 	/* Delete it and then reset it */
 	list_del_init(&hub->event_list);
-	list_del_init(&hub->hub_list);
-
-	spin_unlock_irqrestore(&hub_event_lock, flags);
 
-	down(&hub->khubd_sem); /* Wait for khubd to leave this hub alone. */
-	up(&hub->khubd_sem);
+	spin_unlock_irq(&hub_event_lock);
 
 	/* assuming we used keventd, it must quiesce too */
 	if (hub->has_indicators)
@@ -695,7 +699,6 @@
 	struct usb_device *hdev;
 	struct usb_hub *hub;
 	struct device *hub_dev;
-	unsigned long flags;
 
 	desc = intf->cur_altsetting;
 	hdev = interface_to_usbdev(intf);
@@ -711,23 +714,19 @@
 	}
 
 	/* Multiple endpoints? What kind of mutant ninja-hub is this? */
-	if (desc->desc.bNumEndpoints != 1) {
+	if (desc->desc.bNumEndpoints != 1)
 		goto descriptor_error;
-	}
 
 	endpoint = &desc->endpoint[0].desc;
 
 	/* Output endpoint? Curiouser and curiouser.. */
-	if (!(endpoint->bEndpointAddress & USB_DIR_IN)) {
+	if (!(endpoint->bEndpointAddress & USB_DIR_IN))
 		goto descriptor_error;
-	}
 
 	/* If it's not an interrupt endpoint, we'd better punt! */
 	if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
-			!= USB_ENDPOINT_XFER_INT) {
+			!= USB_ENDPOINT_XFER_INT)
 		goto descriptor_error;
-		return -EIO;
-	}
 
 	/* We found a hub */
 	dev_info (hub_dev, "USB hub found\n");
@@ -742,15 +741,8 @@
 
 	INIT_LIST_HEAD(&hub->event_list);
 	hub->intf = intf;
-	init_MUTEX(&hub->khubd_sem);
 	INIT_WORK(&hub->leds, led_work, hub);
 
-	/* Record the new hub's existence */
-	spin_lock_irqsave(&hub_event_lock, flags);
-	INIT_LIST_HEAD(&hub->hub_list);
-	list_add(&hub->hub_list, &hub_list);
-	spin_unlock_irqrestore(&hub_event_lock, flags);
-
 	usb_set_intfdata (intf, hub);
 
 	if (hdev->speed == USB_SPEED_HIGH)
@@ -827,6 +819,7 @@
 	return 0;
 }
 
+/* FIXME!  This routine should be subsumed into hub_reset */
 static void hub_start_disconnect(struct usb_device *hdev)
 {
 	struct usb_device *parent = hdev->parent;
@@ -845,6 +838,289 @@
 	dev_err(&hdev->dev, "cannot disconnect hub!\n");
 }
 
+
+static void recursively_mark_NOTATTACHED(struct usb_device *udev)
+{
+	int i;
+
+	for (i = 0; i < udev->maxchild; ++i) {
+		if (udev->children[i])
+			recursively_mark_NOTATTACHED(udev->children[i]);
+	}
+	udev->state = USB_STATE_NOTATTACHED;
+}
+
+/**
+ * usb_set_device_state - change a device's current state (usbcore-internal)
+ * @udev: pointer to device whose state should be changed
+ * @new_state: new state value to be stored
+ *
+ * udev->state is _not_ protected by the udev->serialize semaphore.  This
+ * is so that devices can be marked as disconnected as soon as possible,
+ * without having to wait for the semaphore to be released.  Instead,
+ * changes to the state must be protected by the device_state_lock spinlock.
+ *
+ * Once a device has been added to the device tree, all changes to its state
+ * should be made using this routine.  The state should _not_ be set directly.
+ *
+ * If udev->state is already USB_STATE_NOTATTACHED then no change is made.
+ * Otherwise udev->state is set to new_state, and if new_state is
+ * USB_STATE_NOTATTACHED then all of udev's descendant's states are also set
+ * to USB_STATE_NOTATTACHED.
+ */
+void usb_set_device_state(struct usb_device *udev,
+		enum usb_device_state new_state)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&device_state_lock, flags);
+	if (udev->state == USB_STATE_NOTATTACHED)
+		;	/* do nothing */
+	else if (new_state != USB_STATE_NOTATTACHED)
+		udev->state = new_state;
+	else
+		recursively_mark_NOTATTACHED(udev);
+	spin_unlock_irqrestore(&device_state_lock, flags);
+}
+
+
+static void choose_address(struct usb_device *udev)
+{
+	int		devnum;
+	struct usb_bus	*bus = udev->bus;
+
+	/* If khubd ever becomes multithreaded, this will need a lock */
+
+	/* Try to allocate the next devnum beginning at bus->devnum_next. */
+	devnum = find_next_zero_bit(bus->devmap.devicemap, 128,
+			bus->devnum_next);
+	if (devnum >= 128)
+		devnum = find_next_zero_bit(bus->devmap.devicemap, 128, 1);
+
+	bus->devnum_next = ( devnum >= 127 ? 1 : devnum + 1);
+
+	if (devnum < 128) {
+		set_bit(devnum, bus->devmap.devicemap);
+		udev->devnum = devnum;
+	}
+}
+
+static void release_address(struct usb_device *udev)
+{
+	if (udev->devnum > 0) {
+		clear_bit(udev->devnum, udev->bus->devmap.devicemap);
+		udev->devnum = -1;
+	}
+}
+
+/**
+ * usb_disconnect - disconnect a device (usbcore-internal)
+ * @pdev: pointer to device being disconnected
+ * Context: !in_interrupt ()
+ *
+ * Something got disconnected. Get rid of it, and all of its children.
+ * If *pdev is a normal device then the parent hub should be locked.
+ * If *pdev is a root hub then this routine will acquire the
+ * usb_bus_list_lock on behalf of the caller.
+ *
+ * Only hub drivers (including virtual root hub drivers for host
+ * controllers) should ever call this.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ */
+void usb_disconnect(struct usb_device **pdev)
+{
+	struct usb_device	*udev = *pdev;
+	int			i;
+
+	if (!udev) {
+		pr_debug ("%s nodev\n", __FUNCTION__);
+		return;
+	}
+
+	/* mark the device as inactive, so any further urb submissions for
+	 * this device will fail.
+	 */
+	usb_set_device_state(udev, USB_STATE_NOTATTACHED);
+
+	/* lock the bus list on behalf of HCDs unregistering their root hubs */
+	if (!udev->parent)
+		down(&usb_bus_list_lock);
+	down(&udev->serialize);
+
+	dev_info (&udev->dev, "USB disconnect, address %d\n", udev->devnum);
+
+	/* Free up all the children before we remove this device */
+	for (i = 0; i < USB_MAXCHILDREN; i++) {
+		if (udev->children[i])
+			usb_disconnect(&udev->children[i]);
+	}
+
+	/* deallocate hcd/hardware state ... nuking all pending urbs and
+	 * cleaning up all state associated with the current configuration
+	 */
+	usb_disable_device(udev, 0);
+
+	/* Free the device number, remove the /proc/bus/usb entry and
+	 * the sysfs attributes, and delete the parent's children[]
+	 * (or root_hub) pointer.
+	 */
+	dev_dbg (&udev->dev, "unregistering device\n");
+	release_address(udev);
+	usbfs_remove_device(udev);
+	usb_remove_sysfs_dev_files(udev);
+
+	/* Avoid races with recursively_mark_NOTATTACHED() */
+	spin_lock_irq(&device_state_lock);
+	*pdev = NULL;
+	spin_unlock_irq(&device_state_lock);
+
+	up(&udev->serialize);
+	if (!udev->parent)
+		up(&usb_bus_list_lock);
+
+	device_unregister(&udev->dev);
+}
+
+static int choose_configuration(struct usb_device *udev)
+{
+	int c, i;
+
+	/* NOTE: this should interact with hub power budgeting */
+
+	c = udev->config[0].desc.bConfigurationValue;
+	if (udev->descriptor.bNumConfigurations != 1) {
+		for (i = 0; i < udev->descriptor.bNumConfigurations; i++) {
+			struct usb_interface_descriptor	*desc;
+
+			/* heuristic:  Linux is more likely to have class
+			 * drivers, so avoid vendor-specific interfaces.
+			 */
+			desc = &udev->config[i].intf_cache[0]
+					->altsetting->desc;
+			if (desc->bInterfaceClass == USB_CLASS_VENDOR_SPEC)
+				continue;
+			/* COMM/2/all is CDC ACM, except 0xff is MSFT RNDIS */
+			if (desc->bInterfaceClass == USB_CLASS_COMM
+					&& desc->bInterfaceSubClass == 2
+					&& desc->bInterfaceProtocol == 0xff)
+				continue;
+			c = udev->config[i].desc.bConfigurationValue;
+			break;
+		}
+		dev_info(&udev->dev,
+			"configuration #%d chosen from %d choices\n",
+			c, udev->descriptor.bNumConfigurations);
+	}
+	return c;
+}
+
+#ifdef DEBUG
+static void show_string(struct usb_device *udev, char *id, int index)
+{
+	char *buf;
+
+	if (!index)
+		return;
+	if (!(buf = kmalloc(256, GFP_KERNEL)))
+		return;
+	if (usb_string(udev, index, buf, 256) > 0)
+		dev_printk(KERN_INFO, &udev->dev, "%s: %s\n", id, buf);
+	kfree(buf);
+}
+
+#else
+static inline void show_string(struct usb_device *udev, char *id, int index)
+{}
+#endif
+
+/**
+ * usb_new_device - perform initial device setup (usbcore-internal)
+ * @udev: newly addressed device (in ADDRESS state)
+ *
+ * This is called with devices which have been enumerated, but not yet
+ * configured.  The device descriptor is available, but not descriptors
+ * for any device configuration.  The caller must have locked udev and
+ * either the parent hub (if udev is a normal device) or else the
+ * usb_bus_list_lock (if udev is a root hub).  The parent's pointer to
+ * udev has already been installed, but udev is not yet visible through
+ * sysfs or other filesystem code.
+ *
+ * Returns 0 for success (device is configured and listed, with its
+ * interfaces, in sysfs); else a negative errno value.
+ *
+ * This call is synchronous, and may not be used in an interrupt context.
+ *
+ * Only the hub driver should ever call this; root hub registration
+ * uses it indirectly.
+ */
+int usb_new_device(struct usb_device *udev)
+{
+	int err;
+	int c;
+
+	err = usb_get_configuration(udev);
+	if (err < 0) {
+		dev_err(&udev->dev, "can't read configurations, error %d\n",
+			err);
+		goto fail;
+	}
+
+	/* Tell the world! */
+	dev_dbg(&udev->dev, "new device strings: Mfr=%d, Product=%d, "
+			"SerialNumber=%d\n",
+			udev->descriptor.iManufacturer,
+			udev->descriptor.iProduct,
+			udev->descriptor.iSerialNumber);
+
+	if (udev->descriptor.iProduct)
+		show_string(udev, "Product",
+				udev->descriptor.iProduct);
+	if (udev->descriptor.iManufacturer)
+		show_string(udev, "Manufacturer",
+				udev->descriptor.iManufacturer);
+	if (udev->descriptor.iSerialNumber)
+		show_string(udev, "SerialNumber",
+				udev->descriptor.iSerialNumber);
+
+	/* put device-specific files into sysfs */
+	err = device_add (&udev->dev);
+	if (err) {
+		dev_err(&udev->dev, "can't device_add, error %d\n", err);
+		goto fail;
+	}
+	usb_create_sysfs_dev_files (udev);
+
+	/* choose and set the configuration. that registers the interfaces
+	 * with the driver core, and lets usb device drivers bind to them.
+	 */
+	c = choose_configuration(udev);
+	if (c < 0)
+		dev_warn(&udev->dev,
+				"can't choose an initial configuration\n");
+	else {
+		err = usb_set_configuration(udev, c);
+		if (err) {
+			dev_err(&udev->dev, "can't set config #%d, error %d\n",
+					c, err);
+			usb_remove_sysfs_dev_files(udev);
+			device_del(&udev->dev);
+			goto fail;
+		}
+	}
+
+	/* USB device state == configured ... usable */
+
+	/* add a /proc/bus/usb entry */
+	usbfs_add_device(udev);
+	return 0;
+
+fail:
+	usb_set_device_state(udev, USB_STATE_NOTATTACHED);
+	return err;
+}
+
+
 static int hub_port_status(struct usb_device *hdev, int port,
 			       u16 *status, u16 *change)
 {
@@ -934,16 +1210,20 @@
 
 	/* Reset the port */
 	for (i = 0; i < PORT_RESET_TRIES; i++) {
-		set_port_feature(hdev, port + 1, USB_PORT_FEAT_RESET);
+		status = set_port_feature(hdev, port + 1, USB_PORT_FEAT_RESET);
+		if (status)
+			dev_err(hub_dev, "cannot reset port %d (err = %d)\n",
+					port + 1, status);
+		else
+			status = hub_port_wait_reset(hdev, port, udev, delay);
 
 		/* return on disconnect or reset */
-		status = hub_port_wait_reset(hdev, port, udev, delay);
 		if (status == -ENOTCONN || status == 0) {
 			clear_port_feature(hdev,
 				port + 1, USB_PORT_FEAT_C_RESET);
-			udev->state = status
+			usb_set_device_state(udev, status
 					? USB_STATE_NOTATTACHED
-					: USB_STATE_DEFAULT;
+					: USB_STATE_DEFAULT);
 			return status;
 		}
 
@@ -964,6 +1244,9 @@
 {
 	int ret;
 
+	if (hdev->children[port])
+		usb_set_device_state(hdev->children[port],
+				USB_STATE_NOTATTACHED);
 	ret = clear_port_feature(hdev, port + 1, USB_PORT_FEAT_ENABLE);
 	if (ret)
 		dev_err(hubdev(hdev), "cannot disable port %d (err = %d)\n",
@@ -975,57 +1258,62 @@
 /* USB 2.0 spec, 7.1.7.3 / fig 7-29:
  *
  * Between connect detection and reset signaling there must be a delay
- * of 100ms at least for debounce and power-settling. The corresponding
+ * of 100ms at least for debounce and power-settling.  The corresponding
  * timer shall restart whenever the downstream port detects a disconnect.
  * 
- * Apparently there are some bluetooth and irda-dongles and a number
- * of low-speed devices which require longer delays of about 200-400ms.
+ * Apparently there are some bluetooth and irda-dongles and a number of
+ * low-speed devices for which this debounce period may last over a second.
  * Not covered by the spec - but easy to deal with.
  *
- * This implementation uses 400ms minimum debounce timeout and checks
- * every 25ms for transient disconnects to restart the delay.
+ * This implementation uses a 1500ms total debounce timeout; if the
+ * connection isn't stable by then it returns -ETIMEDOUT.  It checks
+ * every 25ms for transient disconnects.  When the port status has been
+ * unchanged for 100ms it returns the port status.
  */
 
-#define HUB_DEBOUNCE_TIMEOUT	400
-#define HUB_DEBOUNCE_STEP	 25
-#define HUB_DEBOUNCE_STABLE	  4
+#define HUB_DEBOUNCE_TIMEOUT	1500
+#define HUB_DEBOUNCE_STEP	  25
+#define HUB_DEBOUNCE_STABLE	 100
 
 static int hub_port_debounce(struct usb_device *hdev, int port)
 {
 	int ret;
-	int delay_time, stable_count;
+	int total_time, stable_time = 0;
 	u16 portchange, portstatus;
-	unsigned connection;
-
-	connection = 0;
-	stable_count = 0;
-	for (delay_time = 0; delay_time < HUB_DEBOUNCE_TIMEOUT; delay_time += HUB_DEBOUNCE_STEP) {
-		msleep(HUB_DEBOUNCE_STEP);
+	unsigned connection = 0xffff;
 
+	for (total_time = 0; ; total_time += HUB_DEBOUNCE_STEP) {
 		ret = hub_port_status(hdev, port, &portstatus, &portchange);
 		if (ret < 0)
 			return ret;
 
-		if ((portstatus & USB_PORT_STAT_CONNECTION) == connection) {
-			if (connection) {
-				if (++stable_count == HUB_DEBOUNCE_STABLE)
-					break;
-			}
+		if (!(portchange & USB_PORT_STAT_C_CONNECTION) &&
+		     (portstatus & USB_PORT_STAT_CONNECTION) == connection) {
+			stable_time += HUB_DEBOUNCE_STEP;
+			if (stable_time >= HUB_DEBOUNCE_STABLE)
+				break;
 		} else {
-			stable_count = 0;
+			stable_time = 0;
+			connection = portstatus & USB_PORT_STAT_CONNECTION;
 		}
-		connection = portstatus & USB_PORT_STAT_CONNECTION;
 
-		if ((portchange & USB_PORT_STAT_C_CONNECTION)) {
-			clear_port_feature(hdev, port+1, USB_PORT_FEAT_C_CONNECTION);
+		if (portchange & USB_PORT_STAT_C_CONNECTION) {
+			clear_port_feature(hdev, port+1,
+					USB_PORT_FEAT_C_CONNECTION);
 		}
+
+		if (total_time >= HUB_DEBOUNCE_TIMEOUT)
+			break;
+		msleep(HUB_DEBOUNCE_STEP);
 	}
 
 	dev_dbg (hubdev (hdev),
-		"debounce: port %d: delay %dms stable %d status 0x%x\n",
-		port + 1, delay_time, stable_count, portstatus);
+		"debounce: port %d: total %dms stable %dms status 0x%x\n",
+		port + 1, total_time, stable_time, portstatus);
 
-	return (portstatus & USB_PORT_STAT_CONNECTION) ? 0 : -ENOTCONN;
+	if (stable_time < HUB_DEBOUNCE_STABLE)
+		return -ETIMEDOUT;
+	return portstatus;
 }
 
 static int hub_set_address(struct usb_device *udev)
@@ -1037,21 +1325,22 @@
 	if (udev->state != USB_STATE_DEFAULT &&
 			udev->state != USB_STATE_ADDRESS)
 		return -EINVAL;
-	retval = usb_control_msg(udev, usb_snddefctrl(udev),
+	retval = usb_control_msg(udev, (PIPE_CONTROL << 30) /* Address 0 */,
 		USB_REQ_SET_ADDRESS, 0, udev->devnum, 0,
 		NULL, 0, HZ * USB_CTRL_SET_TIMEOUT);
 	if (retval == 0)
-		udev->state = USB_STATE_ADDRESS;
+		usb_set_device_state(udev, USB_STATE_ADDRESS);
 	return retval;
 }
 
-/* reset device, (re)assign address, get device descriptor.
- * device connection is stable, no more debouncing needed.
- * returns device in USB_STATE_ADDRESS, except on error.
- * on error return, device is no longer usable (ref dropped).
+/* Reset device, (re)assign address, get device descriptor.
+ * Device connection must be stable, no more debouncing needed.
+ * Returns device in USB_STATE_ADDRESS, except on error.
  *
- * caller owns dev->serialize for the device, guarding against
- * config changes and disconnect processing.
+ * If this is called for an already-existing device (as part of
+ * usb_reset_device), the caller must own the device lock.  For a
+ * newly detected device that is not accessible through any global
+ * pointers, it's not necessary to lock the device.
  */
 static int
 hub_port_init (struct usb_device *hdev, struct usb_device *udev, int port)
@@ -1109,33 +1398,9 @@
 	udev->epmaxpacketin [0] = i;
 	udev->epmaxpacketout[0] = i;
  
-	/* set the address */
-	if (udev->devnum <= 0) {
-		usb_choose_address(udev);
-		if (udev->devnum <= 0)
-			goto fail;
-
-		/* Set up TT records, if needed  */
-		if (hdev->tt) {
-			udev->tt = hdev->tt;
-			udev->ttport = hdev->ttport;
-		} else if (udev->speed != USB_SPEED_HIGH
-				&& hdev->speed == USB_SPEED_HIGH) {
-			struct usb_hub	*hub;
- 
-			hub = usb_get_intfdata (hdev->actconfig
-							->interface[0]);
-			udev->tt = &hub->tt;
-			udev->ttport = port + 1;
-		}
-
-		/* force the right log message (below) at low speed */
-		oldspeed = USB_SPEED_UNKNOWN;
-	}
- 
 	dev_info (&udev->dev,
 			"%s %s speed USB device using address %d\n",
-			(oldspeed == USB_SPEED_UNKNOWN) ? "new" : "reset",
+			(udev->config) ? "reset" : "new",
 			({ char *speed; switch (udev->speed) {
 			case USB_SPEED_LOW:	speed = "low";	break;
 			case USB_SPEED_FULL:	speed = "full";	break;
@@ -1143,6 +1408,19 @@
 			default: 		speed = "?";	break;
 			}; speed;}),
 			udev->devnum);
+
+	/* Set up TT records, if needed  */
+	if (hdev->tt) {
+		udev->tt = hdev->tt;
+		udev->ttport = hdev->ttport;
+	} else if (udev->speed != USB_SPEED_HIGH
+			&& hdev->speed == USB_SPEED_HIGH) {
+		struct usb_hub *hub;
+
+		hub = usb_get_intfdata(hdev->actconfig->interface[0]);
+		udev->tt = &hub->tt;
+		udev->ttport = port + 1;
+	}
  
 	/* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way?
 	 * Because device hardware and firmware is sometimes buggy in
@@ -1164,12 +1442,7 @@
 			dev_err(&udev->dev,
 				"device not accepting address %d, error %d\n",
 				udev->devnum, retval);
- fail:
-			hub_port_disable(hdev, port);
-			usb_release_address(udev);
-			usb_put_dev(udev);
-			up(&usb_address0_sem);
-			return retval;
+			goto fail;
 		}
  
 		/* cope with hardware quirkiness:
@@ -1192,7 +1465,8 @@
 	if (udev->speed == USB_SPEED_FULL
 			&& (udev->epmaxpacketin [0]
 				!= udev->descriptor.bMaxPacketSize0)) {
-		usb_disable_endpoint(udev, 0);
+		usb_disable_endpoint(udev, 0 + USB_DIR_IN);
+		usb_disable_endpoint(udev, 0 + USB_DIR_OUT);
 		usb_endpoint_running(udev, 0, 1);
 		usb_endpoint_running(udev, 0, 0);
 		udev->epmaxpacketin [0] = udev->descriptor.bMaxPacketSize0;
@@ -1208,11 +1482,11 @@
 		goto fail;
 	}
 
-	/* now dev is visible to other tasks */
-	hdev->children[port] = udev;
+	retval = 0;
 
+fail:
 	up(&usb_address0_sem);
-	return 0;
+	return retval;
 }
 
 static void
@@ -1271,7 +1545,14 @@
 	}
 	return remaining;
 }
- 
+
+/* Handle physical or logical connection change events.
+ * This routine is called when:
+ * 	a port connection-change occurs;
+ *	a port enable-change occurs (often caused by EMI);
+ *	usb_reset_device() encounters changed descriptors (as from
+ *		a firmware download)
+ */
 static void hub_port_connect_change(struct usb_hub *hub, int port,
 					u16 portstatus, u16 portchange)
 {
@@ -1282,9 +1563,6 @@
 	dev_dbg (hub_dev,
 		"port %d, status %04x, change %04x, %s\n",
 		port + 1, portstatus, portchange, portspeed (portstatus));
- 
-	/* Clear the connection change status */
-	clear_port_feature(hdev, port + 1, USB_PORT_FEAT_C_CONNECTION);
 
 	if (hub->has_indicators) {
 		set_port_led(hdev, port + 1, HUB_LED_AUTO);
@@ -1294,6 +1572,18 @@
 	/* Disconnect any existing devices under this port */
 	if (hdev->children[port])
 		usb_disconnect(&hdev->children[port]);
+	clear_bit(port, hub->change_bits);
+
+	if (portchange & USB_PORT_STAT_C_CONNECTION) {
+		status = hub_port_debounce(hdev, port);
+		if (status < 0) {
+			dev_err (hub_dev,
+				"connect-debounce failed, port %d disabled\n",
+				port+1);
+			goto done;
+		}
+		portstatus = status;
+	}
 
 	/* Return now if nothing is connected */
 	if (!(portstatus & USB_PORT_STAT_CONNECTION)) {
@@ -1308,13 +1598,6 @@
   			goto done;
 		return;
 	}
-  
-	if (hub_port_debounce(hdev, port)) {
-		dev_err (hub_dev,
-			"connect-debounce failed, port %d disabled\n",
-			port+1);
-		goto done;
-	}
 
 	for (i = 0; i < SET_CONFIG_TRIES; i++) {
 		struct usb_device *udev;
@@ -1328,21 +1611,26 @@
 				"couldn't allocate port %d usb_device\n", port+1);
 			goto done;
 		}
-		udev->state = USB_STATE_POWERED;
-	  
+
+		usb_set_device_state(udev, USB_STATE_POWERED);
+
 		/* hub can tell if it's lowspeed already:  D- pullup (not D+) */
 		if (portstatus & USB_PORT_STAT_LOW_SPEED)
 			udev->speed = USB_SPEED_LOW;
 		else
 			udev->speed = USB_SPEED_UNKNOWN;
+ 
+		/* set the address */
+		choose_address(udev);
+		if (udev->devnum <= 0) {
+			status = -ENOTCONN;	/* Don't retry */
+			goto loop;
+		}
 
-		/* reset, set address, get descriptor, add to hub's children */
-		down (&udev->serialize);
+		/* reset and get descriptor */
 		status = hub_port_init(hdev, udev, port);
-		if (status == -ENOTCONN)
-			break;
 		if (status < 0)
-			continue;
+			goto loop;
 
 		/* consecutive bus-powered hubs aren't reliable; they can
 		 * violate the voltage drop budget.  if the new child has
@@ -1358,7 +1646,7 @@
 					&devstat);
 			if (status < 0) {
 				dev_dbg(&udev->dev, "get status %d ?\n", status);
-				continue;
+				goto loop;
 			}
 			cpu_to_le16s(&devstat);
 			if ((devstat & (1 << USB_DEVICE_SELF_POWERED)) == 0) {
@@ -1370,10 +1658,8 @@
 						INDICATOR_AMBER_BLINK;
 					schedule_work (&hub->leds);
 				}
-				hdev->children[port] = NULL;
-				usb_put_dev(udev);
-				hub_port_disable(hdev, port);
-				return;
+				status = -ENOTCONN;	/* Don't retry */
+				goto loop;
 			}
 		}
  
@@ -1383,13 +1669,37 @@
 				&& highspeed_hubs != 0)
 			check_highspeed (hub, udev, port);
 
+		/* Store the parent's children[] pointer.  At this point
+		 * udev becomes globally accessible, although presumably
+		 * no one will look at it until hdev is unlocked.
+		 */
+		down (&udev->serialize);
+		status = 0;
+
+		/* We mustn't add new devices if the parent hub has
+		 * been disconnected; we would race with the
+		 * recursively_mark_NOTATTACHED() routine.
+		 */
+		spin_lock_irq(&device_state_lock);
+		if (hdev->state == USB_STATE_NOTATTACHED)
+			status = -ENOTCONN;
+		else
+			hdev->children[port] = udev;
+		spin_unlock_irq(&device_state_lock);
+
 		/* Run it through the hoops (find a driver, etc) */
-		status = usb_new_device(udev);
-		if (status != 0) {
-			hdev->children[port] = NULL;
-			continue;
+		if (!status) {
+			status = usb_new_device(udev);
+			if (status) {
+				spin_lock_irq(&device_state_lock);
+				hdev->children[port] = NULL;
+				spin_unlock_irq(&device_state_lock);
+			}
 		}
+
 		up (&udev->serialize);
+		if (status)
+			goto loop;
 
 		status = hub_power_remaining(hub, hdev);
 		if (status)
@@ -1398,6 +1708,15 @@
 				2 * status);
 
 		return;
+
+loop:
+		hub_port_disable(hdev, port);
+		usb_disable_endpoint(udev, 0 + USB_DIR_IN);
+		usb_disable_endpoint(udev, 0 + USB_DIR_OUT);
+		release_address(udev);
+		usb_put_dev(udev);
+		if (status == -ENOTCONN)
+			break;
 	}
  
 done:
@@ -1406,7 +1725,6 @@
 
 static void hub_events(void)
 {
-	unsigned long flags;
 	struct list_head *tmp;
 	struct usb_device *hdev;
 	struct usb_hub *hub;
@@ -1416,6 +1734,7 @@
 	u16 portstatus;
 	u16 portchange;
 	int i, ret;
+	int connect_change;
 
 	/*
 	 *  We restart the list every time to avoid a deadlock with
@@ -1424,24 +1743,32 @@
 	 * Not the most efficient, but avoids deadlocks.
 	 */
 	while (1) {
-		spin_lock_irqsave(&hub_event_lock, flags);
 
-		if (list_empty(&hub_event_list))
+		/* Grab the first entry at the beginning of the list */
+		spin_lock_irq(&hub_event_lock);
+		if (list_empty(&hub_event_list)) {
+			spin_unlock_irq(&hub_event_lock);
 			break;
+		}
 
-		/* Grab the next entry from the beginning of the list */
 		tmp = hub_event_list.next;
+		list_del_init(tmp);
 
 		hub = list_entry(tmp, struct usb_hub, event_list);
 		hdev = interface_to_usbdev(hub->intf);
 		hub_dev = &hub->intf->dev;
 
-		list_del_init(tmp);
-
-		if (unlikely(down_trylock(&hub->khubd_sem)))
-			BUG();	/* never blocks, we were on list */
+		usb_get_dev(hdev);
+		spin_unlock_irq(&hub_event_lock);
 
-		spin_unlock_irqrestore(&hub_event_lock, flags);
+		/* Lock the device, then check to see if we were
+		 * disconnected while waiting for the lock to succeed. */
+		down(&hdev->serialize);
+		if (hdev->state != USB_STATE_CONFIGURED ||
+				!hdev->actconfig ||
+				hub != usb_get_intfdata(
+					hdev->actconfig->interface[0]))
+			goto loop;
 
 		if (hub->error) {
 			dev_dbg (hub_dev, "resetting for error %d\n",
@@ -1450,27 +1777,38 @@
 			if (hub_reset(hub)) {
 				dev_dbg (hub_dev,
 					"can't reset; disconnecting\n");
-				up(&hub->khubd_sem);
 				hub_start_disconnect(hdev);
-				continue;
+				goto loop;
 			}
 
 			hub->nerrors = 0;
 			hub->error = 0;
 		}
 
+		/* deal with port status changes */
 		for (i = 0; i < hub->descriptor->bNbrPorts; i++) {
-			ret = hub_port_status(hdev, i, &portstatus, &portchange);
-			if (ret < 0) {
+			connect_change = test_bit(i, hub->change_bits);
+			if (!test_and_clear_bit(i+1, hub->event_bits) &&
+					!connect_change)
+				continue;
+
+			ret = hub_port_status(hdev, i,
+					&portstatus, &portchange);
+			if (ret < 0)
 				continue;
-			}
 
 			if (portchange & USB_PORT_STAT_C_CONNECTION) {
-				hub_port_connect_change(hub, i, portstatus, portchange);
-			} else if (portchange & USB_PORT_STAT_C_ENABLE) {
-				dev_dbg (hub_dev,
-					"port %d enable change, status %08x\n",
-					i + 1, portstatus);
+				clear_port_feature(hdev,
+					i + 1, USB_PORT_FEAT_C_CONNECTION);
+				connect_change = 1;
+			}
+
+			if (portchange & USB_PORT_STAT_C_ENABLE) {
+				if (!connect_change)
+					dev_dbg (hub_dev,
+						"port %d enable change, "
+						"status %08x\n",
+						i + 1, portstatus);
 				clear_port_feature(hdev,
 					i + 1, USB_PORT_FEAT_C_ENABLE);
 
@@ -1481,15 +1819,14 @@
 				 * Works at least with mouse driver. 
 				 */
 				if (!(portstatus & USB_PORT_STAT_ENABLE)
-				    && (portstatus & USB_PORT_STAT_CONNECTION)
-				    && (hdev->children[i])) {
+				    && !connect_change
+				    && hdev->children[i]) {
 					dev_err (hub_dev,
 					    "port %i "
 					    "disabled by hub (EMI?), "
-					    "re-enabling...",
+					    "re-enabling...\n",
 						i + 1);
-					hub_port_connect_change(hub,
-						i, portstatus, portchange);
+					connect_change = 1;
 				}
 			}
 
@@ -1517,10 +1854,16 @@
 				clear_port_feature(hdev,
 					i + 1, USB_PORT_FEAT_C_RESET);
 			}
+
+			if (connect_change)
+				hub_port_connect_change(hub, i,
+						portstatus, portchange);
 		} /* end for i */
 
 		/* deal with hub status changes */
-		if (hub_hub_status(hub, &hubstatus, &hubchange) < 0)
+		if (test_and_clear_bit(0, hub->event_bits) == 0)
+			;	/* do nothing */
+		else if (hub_hub_status(hub, &hubstatus, &hubchange) < 0)
 			dev_err (hub_dev, "get_hub_status failed\n");
 		else {
 			if (hubchange & HUB_CHANGE_LOCAL_POWER) {
@@ -1534,10 +1877,12 @@
                         	hub_power_on(hub);
 			}
 		}
-		up(&hub->khubd_sem);
-        } /* end while (1) */
 
-	spin_unlock_irqrestore(&hub_event_lock, flags);
+loop:
+		up(&hdev->serialize);
+		usb_put_dev(hdev);
+
+        } /* end while (1) */
 }
 
 static int hub_thread(void *__unused)
@@ -1581,9 +1926,6 @@
 	.id_table =	hub_id_table,
 };
 
-/*
- * This should be a separate module.
- */
 int usb_hub_init(void)
 {
 	pid_t pid;
@@ -1659,23 +2001,34 @@
 				!= 0) {
 			dev_dbg(&udev->dev, "config index %d changed (#%d)\n",
 				index, buf->bConfigurationValue);
-/* FIXME enable this when we can re-enumerate after reset;
- * until then DFU-ish drivers need this and other workarounds
- */
-//			break;
+			break;
 		}
 	}
 	kfree(buf);
 	return index != udev->descriptor.bNumConfigurations;
 }
 
-/*
+/**
+ * usb_reset_devce - perform a USB port reset to reinitialize a device
+ * @udev: device to reset (not in SUSPENDED or NOTATTACHED state)
+ *
  * WARNING - don't reset any device unless drivers for all of its
  * interfaces are expecting that reset!  Maybe some driver->reset()
  * method should eventually help ensure sufficient cooperation.
  *
- * This is the same as usb_reset_device() except that the caller
- * already holds dev->serialize.  For example, it's safe to use
+ * Do a port reset, reassign the device's address, and establish its
+ * former operating configuration.  If the reset fails, or the device's
+ * descriptors change from their values before the reset, or the original
+ * configuration and altsettings cannot be restored, a flag will be set
+ * telling khubd to pretend the device has been disconnected and then
+ * re-connected.  All drivers will be unbound, and the device will be
+ * re-enumerated and probed all over again.
+ *
+ * Returns 0 if the reset succeeded, -ENODEV if the device has been
+ * flagged for logical disconnection, or some other negative error code
+ * if the reset wasn't even attempted.
+ *
+ * The caller must own the device lock.  For example, it's safe to use
  * this from a driver probe() routine after downloading new firmware.
  */
 int __usb_reset_device(struct usb_device *udev)
@@ -1683,13 +2036,23 @@
 	struct usb_device *parent = udev->parent;
 	struct usb_device_descriptor descriptor = udev->descriptor;
 	int i, ret, port = -1;
+	struct usb_hub *hub;
 
+	if (udev->state == USB_STATE_NOTATTACHED ||
+			udev->state == USB_STATE_SUSPENDED) {
+		dev_dbg(&udev->dev, "device reset not allowed in state %d\n",
+				udev->state);
+		return -EINVAL;
+	}
+
+	/* FIXME: This should be legal for regular hubs.  Root hubs may
+	 * have special requirements. */
 	if (udev->maxchild) {
 		/* this requires hub- or hcd-specific logic;
 		 * see hub_reset() and OHCI hc_restart()
 		 */
 		dev_dbg(&udev->dev, "%s for hub!\n", __FUNCTION__);
-		return -EINVAL;
+		return -EISDIR;
 	}
 
 	for (i = 0; i < parent->maxchild; i++)
@@ -1698,8 +2061,11 @@
 			break;
 		}
 
-	if (port < 0)
+	if (port < 0) {
+		/* If this ever happens, it's very bad */
+		dev_err(&udev->dev, "Can't locate device's port!\n");
 		return -ENOENT;
+	}
 
 	ret = hub_port_init(parent, udev, port);
 	if (ret < 0)
@@ -1726,7 +2092,7 @@
 			udev->actconfig->desc.bConfigurationValue, ret);
 		goto re_enumerate;
   	}
-	udev->state = USB_STATE_CONFIGURED;
+	usb_set_device_state(udev, USB_STATE_CONFIGURED);
 
 	for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
 		struct usb_interface *intf = udev->actconfig->interface[i];
@@ -1751,8 +2117,18 @@
 	return 0;
  
 re_enumerate:
-	/* FIXME make some task re-enumerate; don't just mark unusable */
-	udev->state = USB_STATE_NOTATTACHED;
+	hub_port_disable(parent, port);
+
+	hub = usb_get_intfdata(parent->actconfig->interface[0]);
+	set_bit(port, hub->change_bits);
+
+	spin_lock_irq(&hub_event_lock);
+	if (list_empty(&hub->event_list)) {
+		list_add_tail(&hub->event_list, &hub_event_list);
+		wake_up(&khubd_wait);
+	}
+	spin_unlock_irq(&hub_event_lock);
+
 	return -ENODEV;
 }
 EXPORT_SYMBOL(__usb_reset_device);
--- diff/drivers/usb/core/hub.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/hub.h	2004-07-01 21:32:45.000000000 +0100
@@ -202,11 +202,15 @@
 	int			error;		/* last reported error */
 	int			nerrors;	/* track consecutive errors */
 
-	struct list_head	hub_list;	/* all hubs */
 	struct list_head	event_list;	/* hubs w/data or errs ready */
+	unsigned long		event_bits[1];	/* status change bitmask */
+	unsigned long		change_bits[1];	/* ports with logical connect
+							status change */
+#if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */
+#error event_bits[] is too short!
+#endif
 
 	struct usb_hub_descriptor *descriptor;	/* class descriptor */
-	struct semaphore	khubd_sem;
 	struct usb_tt		tt;		/* Transaction Translator */
 
 	u8			power_budget;	/* in 2mA units; or zero */
@@ -216,4 +220,15 @@
 	struct work_struct	leds;
 };
 
+/* use this for low-powered root hubs */
+static inline void
+hub_set_power_budget (struct usb_device *hubdev, unsigned mA)
+{
+	struct usb_hub	*hub;
+
+	hub = (struct usb_hub *)
+		usb_get_intfdata (hubdev->actconfig->interface[0]);
+	hub->power_budget = min(mA,(unsigned)500)/2;
+}
+
 #endif /* __LINUX_HUB_H */
--- diff/drivers/usb/core/message.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/message.c	2004-07-01 21:32:45.000000000 +0100
@@ -566,22 +566,19 @@
  */
 int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char index, void *buf, int size)
 {
-	int i = 5;
+	int i;
 	int result;
 	
 	memset(buf,0,size);	// Make sure we parse really received data
 
-	while (i--) {
+	for (i = 0; i < 3; ++i) {
 		/* retry on length 0 or stall; some devices are flakey */
-		if ((result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
-				    USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
-				    (type << 8) + index, 0, buf, size,
-				    HZ * USB_CTRL_GET_TIMEOUT)) > 0
-				|| result != -EPIPE)
+		result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+				USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
+				(type << 8) + index, 0, buf, size,
+				HZ * USB_CTRL_GET_TIMEOUT);
+		if (!(result == 0 || result == -EPIPE))
 			break;
-
-		dev_dbg (&dev->dev, "RETRY descriptor, result %d\n", result);
-		result = -ENOMSG;
 	}
 	return result;
 }
@@ -830,6 +827,7 @@
 			interface = dev->actconfig->interface[i];
 			dev_dbg (&dev->dev, "unregistering interface %s\n",
 				interface->dev.bus_id);
+			usb_remove_sysfs_intf_files(interface);
 			device_del (&interface->dev);
 		}
 
@@ -842,7 +840,7 @@
 		}
 		dev->actconfig = 0;
 		if (dev->state == USB_STATE_CONFIGURED)
-			dev->state = USB_STATE_ADDRESS;
+			usb_set_device_state(dev, USB_STATE_ADDRESS);
 	}
 }
 
@@ -1047,7 +1045,7 @@
 			config->desc.bConfigurationValue, 0,
 			NULL, 0, HZ * USB_CTRL_SET_TIMEOUT);
 	if (retval < 0) {
-		dev->state = USB_STATE_ADDRESS;
+		usb_set_device_state(dev, USB_STATE_ADDRESS);
 		return retval;
 	}
 
@@ -1185,9 +1183,9 @@
 
 	dev->actconfig = cp;
 	if (!cp)
-		dev->state = USB_STATE_ADDRESS;
+		usb_set_device_state(dev, USB_STATE_ADDRESS);
 	else {
-		dev->state = USB_STATE_CONFIGURED;
+		usb_set_device_state(dev, USB_STATE_CONFIGURED);
 
 		/* Initialize the new interface structures and the
 		 * hc/hcd/usbcore interface/endpoint state.
@@ -1322,7 +1320,7 @@
 	 */
 
 	err = usb_get_string(dev, dev->string_langid, index, tbuf, 2);
-	if (err == -EPIPE) {
+	if (err == -EPIPE || err == 0) {
 		dev_dbg(&dev->dev, "RETRY string %d read/%d\n", index, 2);
 		err = usb_get_string(dev, dev->string_langid, index, tbuf, 2);
 	}
@@ -1331,7 +1329,7 @@
 	len=tbuf[0];	
 	
 	err = usb_get_string(dev, dev->string_langid, index, tbuf, len);
-	if (err == -EPIPE) {
+	if (err == -EPIPE || err == 0) {
 		dev_dbg(&dev->dev, "RETRY string %d read/%d\n", index, len);
 		err = usb_get_string(dev, dev->string_langid, index, tbuf, len);
 	}
--- diff/drivers/usb/core/sysfs.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/sysfs.c	2004-07-01 21:32:45.000000000 +0100
@@ -2,8 +2,8 @@
  * drivers/usb/core/sysfs.c
  *
  * (C) Copyright 2002 David Brownell
- * (C) Copyright 2002 Greg Kroah-Hartman
- * (C) Copyright 2002 IBM Corp.
+ * (C) Copyright 2002,2004 Greg Kroah-Hartman
+ * (C) Copyright 2002,2004 IBM Corp.
  *
  * All of the sysfs file attributes for usb devices and interfaces.
  *
@@ -162,29 +162,35 @@
 usb_descriptor_attr (bDeviceProtocol, "%02x\n")
 usb_descriptor_attr (bNumConfigurations, "%d\n")
 
+static struct attribute *dev_attrs[] = {
+	/* current configuration's attributes */
+	&dev_attr_bNumInterfaces.attr,
+	&dev_attr_bConfigurationValue.attr,
+	&dev_attr_bmAttributes.attr,
+	&dev_attr_bMaxPower.attr,
+	/* device attributes */
+	&dev_attr_idVendor.attr,
+	&dev_attr_idProduct.attr,
+	&dev_attr_bcdDevice.attr,
+	&dev_attr_bDeviceClass.attr,
+	&dev_attr_bDeviceSubClass.attr,
+	&dev_attr_bDeviceProtocol.attr,
+	&dev_attr_bNumConfigurations.attr,
+	&dev_attr_speed.attr,
+	&dev_attr_devnum.attr,
+	&dev_attr_version.attr,
+	&dev_attr_maxchild.attr,
+	NULL,
+};
+static struct attribute_group dev_attr_grp = {
+	.attrs = dev_attrs,
+};
 
 void usb_create_sysfs_dev_files (struct usb_device *udev)
 {
 	struct device *dev = &udev->dev;
 
-	/* current configuration's attributes */
-	device_create_file (dev, &dev_attr_bNumInterfaces);
-	device_create_file (dev, &dev_attr_bConfigurationValue);
-	device_create_file (dev, &dev_attr_bmAttributes);
-	device_create_file (dev, &dev_attr_bMaxPower);
-
-	/* device attributes */
-	device_create_file (dev, &dev_attr_idVendor);
-	device_create_file (dev, &dev_attr_idProduct);
-	device_create_file (dev, &dev_attr_bcdDevice);
-	device_create_file (dev, &dev_attr_bDeviceClass);
-	device_create_file (dev, &dev_attr_bDeviceSubClass);
-	device_create_file (dev, &dev_attr_bDeviceProtocol);
-	device_create_file (dev, &dev_attr_bNumConfigurations);
-
-	/* speed varies depending on how you connect the device */
-	device_create_file (dev, &dev_attr_speed);
-	// FIXME iff there are other speed configs, show how many
+	sysfs_create_group(&dev->kobj, &dev_attr_grp);
 
 	if (udev->descriptor.iManufacturer)
 		device_create_file (dev, &dev_attr_manufacturer);
@@ -192,10 +198,20 @@
 		device_create_file (dev, &dev_attr_product);
 	if (udev->descriptor.iSerialNumber)
 		device_create_file (dev, &dev_attr_serial);
+}
+
+void usb_remove_sysfs_dev_files (struct usb_device *udev)
+{
+	struct device *dev = &udev->dev;
 
-	device_create_file (dev, &dev_attr_devnum);
-	device_create_file (dev, &dev_attr_version);
-	device_create_file (dev, &dev_attr_maxchild);
+	sysfs_remove_group(&dev->kobj, &dev_attr_grp);
+
+	if (udev->descriptor.iManufacturer)
+		device_remove_file(dev, &dev_attr_manufacturer);
+	if (udev->descriptor.iProduct)
+		device_remove_file(dev, &dev_attr_product);
+	if (udev->descriptor.iSerialNumber)
+		device_remove_file(dev, &dev_attr_serial);
 }
 
 /* Interface fields */
@@ -217,13 +233,26 @@
 usb_intf_attr (bInterfaceProtocol, "%02x\n")
 usb_intf_attr (iInterface, "%02x\n")
 
+static struct attribute *intf_attrs[] = {
+	&dev_attr_bInterfaceNumber.attr,
+	&dev_attr_bAlternateSetting.attr,
+	&dev_attr_bNumEndpoints.attr,
+	&dev_attr_bInterfaceClass.attr,
+	&dev_attr_bInterfaceSubClass.attr,
+	&dev_attr_bInterfaceProtocol.attr,
+	&dev_attr_iInterface.attr,
+	NULL,
+};
+static struct attribute_group intf_attr_grp = {
+	.attrs = intf_attrs,
+};
+
 void usb_create_sysfs_intf_files (struct usb_interface *intf)
 {
-	device_create_file (&intf->dev, &dev_attr_bInterfaceNumber);
-	device_create_file (&intf->dev, &dev_attr_bAlternateSetting);
-	device_create_file (&intf->dev, &dev_attr_bNumEndpoints);
-	device_create_file (&intf->dev, &dev_attr_bInterfaceClass);
-	device_create_file (&intf->dev, &dev_attr_bInterfaceSubClass);
-	device_create_file (&intf->dev, &dev_attr_bInterfaceProtocol);
-	device_create_file (&intf->dev, &dev_attr_iInterface);
+	sysfs_create_group(&intf->dev.kobj, &intf_attr_grp);
+}
+
+void usb_remove_sysfs_intf_files (struct usb_interface *intf)
+{
+	sysfs_remove_group(&intf->dev.kobj, &intf_attr_grp);
 }
--- diff/drivers/usb/core/usb.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/usb.c	2004-07-01 21:32:45.000000000 +0100
@@ -883,6 +883,8 @@
 	     buslist != &usb_bus_list; 
 	     buslist = buslist->next) {
 		bus = container_of(buslist, struct usb_bus, bus_list);
+		if (!bus->root_hub)
+			continue;
 		dev = match_device(bus->root_hub, vendor_id, product_id);
 		if (dev)
 			goto exit;
@@ -945,235 +947,6 @@
 }
 
 /**
- * usb_disconnect - disconnect a device (usbcore-internal)
- * @pdev: pointer to device being disconnected
- * Context: !in_interrupt ()
- *
- * Something got disconnected. Get rid of it, and all of its children.
- *
- * Only hub drivers (including virtual root hub drivers for host
- * controllers) should ever call this.
- *
- * This call is synchronous, and may not be used in an interrupt context.
- */
-void usb_disconnect(struct usb_device **pdev)
-{
-	struct usb_device	*dev = *pdev;
-	struct usb_bus		*bus;
-	struct usb_operations	*ops;
-	int			i;
-
-	might_sleep ();
-
-	if (!dev) {
-		pr_debug ("%s nodev\n", __FUNCTION__);
-		return;
-	}
-	bus = dev->bus;
-	if (!bus) {
-		pr_debug ("%s nobus\n", __FUNCTION__);
-		return;
-	}
-	ops = bus->op;
-
-	*pdev = NULL;
-
-	/* mark the device as inactive, so any further urb submissions for
-	 * this device will fail.
-	 */
-	dev->state = USB_STATE_NOTATTACHED;
-	down(&dev->serialize);
-
-	dev_info (&dev->dev, "USB disconnect, address %d\n", dev->devnum);
-
-	/* Free up all the children before we remove this device */
-	for (i = 0; i < USB_MAXCHILDREN; i++) {
-		struct usb_device **child = dev->children + i;
-		if (*child)
-			usb_disconnect(child);
-	}
-
-	/* deallocate hcd/hardware state ... nuking all pending urbs and
-	 * cleaning up all state associated with the current configuration
-	 */
-	usb_disable_device(dev, 0);
-
-	/* Free the device number and remove the /proc/bus/usb entry */
-	dev_dbg (&dev->dev, "unregistering device\n");
-	usb_release_address(dev);
-	usbfs_remove_device(dev);
-	up(&dev->serialize);
-	device_unregister(&dev->dev);
-}
-
-/**
- * usb_choose_address - pick device address (usbcore-internal)
- * @dev: newly detected device (in DEFAULT state)
- *
- * Picks a device address.  It's up to the hub (or root hub) driver
- * to handle and manage enumeration, starting from the DEFAULT state.
- * Only hub drivers (but not virtual root hub drivers for host
- * controllers) should ever call this.
- */
-void usb_choose_address(struct usb_device *dev)
-{
-	int devnum;
-	// FIXME needs locking for SMP!!
-	/* why? this is called only from the hub thread, 
-	 * which hopefully doesn't run on multiple CPU's simultaneously 8-)
-	 */
-
-	/* Try to allocate the next devnum beginning at bus->devnum_next. */
-	devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, dev->bus->devnum_next);
-	if (devnum >= 128)
-		devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, 1);
-
-	dev->bus->devnum_next = ( devnum >= 127 ? 1 : devnum + 1);
-
-	if (devnum < 128) {
-		set_bit(devnum, dev->bus->devmap.devicemap);
-		dev->devnum = devnum;
-	}
-}
-
-/**
- * usb_release_address - deallocate device address (usbcore-internal)
- * @dev: newly removed device
- *
- * Removes and deallocates the address assigned to a device.
- * Only hub drivers (but not virtual root hub drivers for host
- * controllers) should ever call this.
- */
-void usb_release_address(struct usb_device *dev)
-{
-	if (dev->devnum > 0) {
-		clear_bit(dev->devnum, dev->bus->devmap.devicemap);
-		dev->devnum = -1;
-	}
-}
-
-
-static inline void usb_show_string(struct usb_device *dev, char *id, int index)
-{
-	char *buf;
-
-	if (!index)
-		return;
-	if (!(buf = kmalloc(256, GFP_KERNEL)))
-		return;
-	if (usb_string(dev, index, buf, 256) > 0)
-		dev_printk(KERN_INFO, &dev->dev, "%s: %s\n", id, buf);
-	kfree(buf);
-}
-
-static int usb_choose_configuration(struct usb_device *dev)
-{
-	int c, i;
-
-	c = dev->config[0].desc.bConfigurationValue;
-	if (dev->descriptor.bNumConfigurations != 1) {
-		for (i = 0; i < dev->descriptor.bNumConfigurations; i++) {
-			struct usb_interface_descriptor	*desc;
-
-			/* heuristic:  Linux is more likely to have class
-			 * drivers, so avoid vendor-specific interfaces.
-			 */
-			desc = &dev->config[i].intf_cache[0]
-					->altsetting->desc;
-			if (desc->bInterfaceClass == USB_CLASS_VENDOR_SPEC)
-				continue;
-			/* COMM/2/all is CDC ACM, except 0xff is MSFT RNDIS */
-			if (desc->bInterfaceClass == USB_CLASS_COMM
-					&& desc->bInterfaceSubClass == 2
-					&& desc->bInterfaceProtocol == 0xff)
-				continue;
-			c = dev->config[i].desc.bConfigurationValue;
-			break;
-		}
-		dev_info(&dev->dev,
-			"configuration #%d chosen from %d choices\n",
-			c, dev->descriptor.bNumConfigurations);
-	}
-	return c;
-}
-
-/*
- * usb_new_device - perform initial device setup (usbcore-internal)
- * @dev: newly addressed device (in ADDRESS state)
- *
- * This is called with devices which have been enumerated, but not yet
- * configured.  The device descriptor is available, but not descriptors
- * for any device configuration.  The caller owns dev->serialize, and
- * the device is not visible through sysfs or other filesystem code.
- *
- * Returns 0 for success (device is configured and listed, with its
- * interfaces, in sysfs); else a negative errno value.  On error, one
- * reference count to the device has been dropped.
- *
- * This call is synchronous, and may not be used in an interrupt context.
- *
- * Only the hub driver should ever call this; root hub registration
- * uses it only indirectly.
- */
-int usb_new_device(struct usb_device *dev)
-{
-	int err;
-	int c;
-
-	err = usb_get_configuration(dev);
-	if (err < 0) {
-		dev_err(&dev->dev, "can't read configurations, error %d\n",
-			err);
-		goto fail;
-	}
-
-	/* Tell the world! */
-	dev_dbg(&dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
-		dev->descriptor.iManufacturer, dev->descriptor.iProduct, dev->descriptor.iSerialNumber);
-
-#ifdef DEBUG
-	if (dev->descriptor.iProduct)
-		usb_show_string(dev, "Product", dev->descriptor.iProduct);
-	if (dev->descriptor.iManufacturer)
-		usb_show_string(dev, "Manufacturer", dev->descriptor.iManufacturer);
-	if (dev->descriptor.iSerialNumber)
-		usb_show_string(dev, "SerialNumber", dev->descriptor.iSerialNumber);
-#endif
-
-	/* put device-specific files into sysfs */
-	err = device_add (&dev->dev);
-	if (err) {
-		dev_err(&dev->dev, "can't device_add, error %d\n", err);
-		goto fail;
-	}
-	usb_create_sysfs_dev_files (dev);
-
-	/* choose and set the configuration. that registers the interfaces
-	 * with the driver core, and lets usb device drivers bind to them.
-	 * NOTE:  should interact with hub power budgeting.
-	 */
-	c = usb_choose_configuration(dev);
-	err = usb_set_configuration(dev, c);
-	if (err) {
-		dev_err(&dev->dev, "can't set config #%d, error %d\n", c, err);
-		device_del(&dev->dev);
-		goto fail;
-	}
-
-	/* USB device state == configured ... usable */
-
-	/* add a /proc/bus/usb entry */
-	usbfs_add_device(dev);
-
-	return 0;
-fail:
-	dev->state = USB_STATE_NOTATTACHED;
-	usb_release_address(dev);
-	usb_put_dev(dev);
-	return err;
-}
-
-/**
  * usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP
  * @dev: device the buffer will be used with
  * @size: requested buffer size
--- diff/drivers/usb/core/usb.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/core/usb.h	2004-07-01 21:32:45.000000000 +0100
@@ -1,7 +1,9 @@
 /* Functions local to drivers/usb/core/ */
 
 extern void usb_create_sysfs_dev_files (struct usb_device *dev);
+extern void usb_remove_sysfs_dev_files (struct usb_device *dev);
 extern void usb_create_sysfs_intf_files (struct usb_interface *intf);
+extern void usb_remove_sysfs_intf_files (struct usb_interface *intf);
 extern int usb_probe_interface (struct device *dev);
 extern int usb_unbind_interface (struct device *dev);
 
@@ -19,5 +21,8 @@
 		unsigned int size);
 extern int usb_set_configuration(struct usb_device *dev, int configuration);
 
+extern void usb_set_device_state(struct usb_device *udev,
+		enum usb_device_state new_state);
+
 /* for labeling diagnostics */
 extern const char *usbcore_name;
--- diff/drivers/usb/gadget/dummy_hcd.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/gadget/dummy_hcd.c	2004-07-01 21:32:45.000000000 +0100
@@ -146,8 +146,6 @@
 	u8				fifo_buf [FIFO_SIZE];
 	u16				devstatus;
 
-	struct hcd_dev			*hdev;
-
 	/*
 	 * MASTER/HOST side support
 	 */
@@ -159,6 +157,8 @@
 	struct completion		released;
 	unsigned			resuming:1;
 	unsigned long			re_timeout;
+
+	struct usb_device		*udev;
 };
 
 static struct dummy	*the_controller;
@@ -739,11 +739,9 @@
 	struct dummy_ep	*ep;
 
 	/* prevent any more requests */
-	dum->hdev = 0;
 	dum->address = 0;
 
-	/* this might not succeed ... */
-	del_timer (&dum->timer);
+	/* The timer is left running so that outstanding URBs can fail */
 
 	/* nuke any pending requests first, so driver i/o is quiesced */
 	list_for_each_entry (ep, &dum->gadget.ep_list, ep.ep_list)
@@ -784,7 +782,6 @@
 
 	driver_unregister (&driver->driver);
 
-	del_timer_sync (&dum->timer);
 	return 0;
 }
 EXPORT_SYMBOL (usb_gadget_unregister_driver);
@@ -825,8 +822,12 @@
 	dum = container_of (hcd, struct dummy, hcd);
 	spin_lock_irqsave (&dum->lock, flags);
 
-	if (!dum->hdev)
-		dum->hdev = urb->dev->hcpriv;
+	if (!dum->udev) {
+		dum->udev = urb->dev;
+		usb_get_dev (dum->udev);
+	} else if (unlikely (dum->udev != urb->dev))
+		dev_err (hardware, "usb_device address has changed!\n");
+
 	urb->hcpriv = dum;
 	if (usb_pipetype (urb->pipe) == PIPE_CONTROL)
 		urb->error_count = 1;		/* mark as a new urb */
@@ -994,10 +995,17 @@
 	return limit;
 }
 
+#define is_active(dum)	((dum->port_status & \
+		(USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE | \
+			USB_PORT_STAT_SUSPEND)) \
+		== (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE))
+
 static struct dummy_ep *find_endpoint (struct dummy *dum, u8 address)
 {
 	int		i;
 
+	if (!is_active (dum))
+		return NULL;
 	if ((address & ~USB_DIR_IN) == 0)
 		return &dum->ep [0];
 	for (i = 1; i < DUMMY_ENDPOINTS; i++) {
@@ -1011,6 +1019,8 @@
 	return NULL;
 }
 
+#undef is_active
+
 #define Dev_Request	(USB_TYPE_STANDARD | USB_RECIP_DEVICE)
 #define Dev_InRequest	(Dev_Request | USB_DIR_IN)
 #define Intf_Request	(USB_TYPE_STANDARD | USB_RECIP_INTERFACE)
@@ -1024,17 +1034,12 @@
 static void dummy_timer (unsigned long _dum)
 {
 	struct dummy		*dum = (struct dummy *) _dum;
-	struct hcd_dev		*hdev = dum->hdev;
+	struct hcd_dev		*hdev;
 	struct list_head	*entry, *tmp;
 	unsigned long		flags;
 	int			limit, total;
 	int			i;
 
-	if (!hdev) {
-		dev_err (hardware, "timer fired with device gone?\n");
-		return;
-	}
-
 	/* simplistic model for one frame's bandwidth */
 	switch (dum->gadget.speed) {
 	case USB_SPEED_LOW:
@@ -1055,6 +1060,14 @@
 
 	/* look at each urb queued by the host side driver */
 	spin_lock_irqsave (&dum->lock, flags);
+
+	if (!dum->udev) {
+		dev_err (hardware, "timer fired with no URBs pending?\n");
+		spin_unlock_irqrestore (&dum->lock, flags);
+		return;
+	}
+	hdev = dum->udev->hcpriv;
+
 	for (i = 0; i < DUMMY_ENDPOINTS; i++) {
 		if (!ep_name [i])
 			break;
@@ -1152,11 +1165,6 @@
 			case USB_REQ_SET_ADDRESS:
 				if (setup.bRequestType != Dev_Request)
 					break;
-				if (dum->address != 0) {
-					maybe_set_status (urb, -ETIMEDOUT);
-					urb->actual_length = 0;
-					goto return_urb;
-				}
 				dum->address = setup.wValue;
 				maybe_set_status (urb, 0);
 				dev_dbg (hardware, "set_address = %d\n",
@@ -1331,7 +1339,11 @@
 
 	/* want a 1 msec delay here */
 	if (!list_empty (&hdev->urb_list))
-		mod_timer (&dum->timer, jiffies + 1);
+		mod_timer (&dum->timer, jiffies + msecs_to_jiffies(1));
+	else {
+		usb_put_dev (dum->udev);
+		dum->udev = NULL;
+	}
 
 	spin_unlock_irqrestore (&dum->lock, flags);
 }
@@ -1404,9 +1416,8 @@
 			break;
 		case USB_PORT_FEAT_POWER:
 			dum->port_status = 0;
-			dum->address = 0;
-			dum->hdev = 0;
 			dum->resuming = 0;
+			stop_activity(dum, dum->driver);
 			break;
 		default:
 			dum->port_status &= ~(1 << wValue);
@@ -1569,10 +1580,12 @@
 	struct urb		*urb;
 	size_t			size = 0;
 	unsigned long		flags;
+	struct hcd_dev		*hdev;
 
 	spin_lock_irqsave (&dum->lock, flags);
-	if (dum->hdev) {
-		list_for_each_entry (urb, &dum->hdev->urb_list, urb_list) {
+	if (dum->udev) {
+		hdev = dum->udev->hcpriv;
+		list_for_each_entry (urb, &hdev->urb_list, urb_list) {
 			size_t		temp;
 
 			temp = show_urb (buf, PAGE_SIZE - size, urb);
@@ -1657,7 +1670,7 @@
 	INIT_LIST_HEAD (&hcd->dev_list);
 	usb_register_bus (bus);
 
-	bus->root_hub = root = usb_alloc_dev (0, bus, 0);
+	root = usb_alloc_dev (0, bus, 0);
 	if (!root) {
 		retval = -ENOMEM;
 clean1:
@@ -1671,14 +1684,16 @@
 	root->speed = USB_SPEED_HIGH;
 
 	/* ...then configured, so khubd sees us. */
-	if ((retval = hcd_register_root (&dum->hcd)) != 0) {
-		bus->root_hub = 0;
+	if ((retval = hcd_register_root (root, &dum->hcd)) != 0) {
 		usb_put_dev (root);
 clean2:
 		dum->hcd.state = USB_STATE_QUIESCING;
 		goto clean1;
 	}
 
+	/* only show a low-power port: just 8mA */
+	hub_set_power_budget (root, 8);
+
 	dum->started = 1;
 
 	if ((retval = dummy_register_udc (dum)) != 0) {
--- diff/drivers/usb/gadget/ether.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/gadget/ether.c	2004-07-01 21:32:45.000000000 +0100
@@ -118,6 +118,7 @@
 	unsigned		zlp:1;
 	unsigned		cdc:1;
 	unsigned		rndis:1;
+	unsigned		suspended:1;
 	u16			cdc_filter;
 	unsigned long		todo;
 #define	WORK_RX_MEMORY		0
@@ -233,7 +234,7 @@
 /* For CDC-incapable hardware, choose the simple cdc subset.
  * Anything that talks bulk (without notable bugs) can do this.
  */
-#ifdef CONFIG_USB_GADGET_PXA
+#ifdef CONFIG_USB_GADGET_PXA2XX
 #define	DEV_CONFIG_SUBSET
 #endif
 
@@ -1345,24 +1346,23 @@
 
 static void rndis_response_complete (struct usb_ep *ep, struct usb_request *req)
 {
-	struct eth_dev          *dev = ep->driver_data;
-	
 	if (req->status || req->actual != req->length)
 		DEBUG (dev, "rndis response complete --> %d, %d/%d\n",
 		       req->status, req->actual, req->length);
 
 	/* done sending after CDC_GET_ENCAPSULATED_RESPONSE */
-	rndis_free_response (dev->rndis_config, req->buf);
 }
 
 static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req)
 {
 	struct eth_dev          *dev = ep->driver_data;
+	int			status;
 	
 	/* received RNDIS command from CDC_SEND_ENCAPSULATED_COMMAND */
 	spin_lock(&dev->lock);
-	if (rndis_msg_parser (dev->rndis_config, (u8 *) req->buf))
-		ERROR(dev, "%s: rndis parse error\n", __FUNCTION__ );
+	status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf);
+	if (status < 0)
+		ERROR(dev, "%s: rndis parse error %d\n", __FUNCTION__, status);
 	spin_unlock(&dev->lock);
 }
 
@@ -1580,6 +1580,7 @@
 			if (buf) {
 				memcpy (req->buf, buf, value);
 				req->complete = rndis_response_complete;
+				rndis_free_response(dev->rndis_config, buf);
 			}
 			/* else stalls ... spec says to avoid that */
 		}
@@ -1596,6 +1597,8 @@
 	/* respond with data transfer before status phase? */
 	if (value >= 0) {
 		req->length = value;
+		req->zero = value < ctrl->wLength
+				&& (value % gadget->ep0->maxpacket) == 0;
 		value = usb_ep_queue (gadget->ep0, req, GFP_ATOMIC);
 		if (value < 0) {
 			DEBUG (dev, "ep_queue --> %d\n", value);
@@ -2064,6 +2067,16 @@
 	}
 }
 
+static void rndis_control_ack_complete (struct usb_ep *ep, struct usb_request *req)
+{
+	if (req->status || req->actual != req->length)
+		DEBUG (dev, "rndis control ack complete --> %d, %d/%d\n",
+		       req->status, req->actual, req->length);
+
+	usb_ep_free_buffer(ep, req->buf, req->dma, 8);
+	usb_ep_free_request(ep, req);
+}
+
 static int rndis_control_ack (struct net_device *net)
 {
 	struct eth_dev          *dev = (struct eth_dev *) net->priv;
@@ -2095,7 +2108,7 @@
 	 * CDC_NOTIFY_RESPONSE_AVAILABLE should work too
 	 */
 	resp->length = 8;
-	resp->complete = rndis_response_complete;
+	resp->complete = rndis_control_ack_complete;
 	
 	*((u32 *) resp->buf) = __constant_cpu_to_le32 (1);
 	*((u32 *) resp->buf + 1) = __constant_cpu_to_le32 (0);
@@ -2103,7 +2116,7 @@
 	length = usb_ep_queue (dev->status_ep, resp, GFP_ATOMIC);
 	if (length < 0) {
 		resp->status = 0;
-		rndis_response_complete (dev->status_ep, resp);
+		rndis_control_ack_complete (dev->status_ep, resp);
 	}
 	
 	return 0;
@@ -2302,17 +2315,6 @@
 		UTS_SYSNAME " " UTS_RELEASE "/%s",
 		gadget->name);
 
-	/* CDC subset ... recognized by Linux since 2.4.10, but Windows
-	 * drivers aren't widely available.
-	 */
-	if (!cdc) {
-		device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
-		device_desc.idVendor =
-			__constant_cpu_to_le16(SIMPLE_VENDOR_NUM);
-		device_desc.idProduct =
-			__constant_cpu_to_le16(SIMPLE_PRODUCT_NUM);
-	}
-
 	/* If there's an RNDIS configuration, that's what Windows wants to
 	 * be using ... so use these product IDs here and in the "linux.inf"
 	 * needed to install MSFT drivers.  Current Linux kernels will use
@@ -2326,6 +2328,16 @@
 			__constant_cpu_to_le16(RNDIS_PRODUCT_NUM);
 		snprintf (product_desc, sizeof product_desc,
 			"RNDIS/%s", driver_desc);
+
+	/* CDC subset ... recognized by Linux since 2.4.10, but Windows
+	 * drivers aren't widely available.
+	 */
+	} else if (!cdc) {
+		device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
+		device_desc.idVendor =
+			__constant_cpu_to_le16(SIMPLE_VENDOR_NUM);
+		device_desc.idProduct =
+			__constant_cpu_to_le16(SIMPLE_PRODUCT_NUM);
 	}
 
 	/* support optional vendor/distro customization */
@@ -2363,6 +2375,7 @@
 	EP_OUT_NAME = ep->name;
 	ep->driver_data = ep;	/* claim */
 
+#if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS)
 	/* CDC Ethernet control interface doesn't require a status endpoint.
 	 * Since some hosts expect one, try to allocate one anyway.
 	 */
@@ -2376,13 +2389,12 @@
 				"can't run RNDIS on %s\n",
 				gadget->name);
 			return -ENODEV;
-#ifdef	DEV_CONFIG_CDC
 		} else if (cdc) {
 			control_intf.bNumEndpoints = 0;
 			/* FIXME remove endpoint from descriptor list */
-#endif
 		}
 	}
+#endif
 
 	/* one config:  cdc, else minimal subset */
 	if (!cdc) {
@@ -2436,7 +2448,7 @@
 
 	/* Module params for these addresses should come from ID proms.
 	 * The host side address is used with CDC and RNDIS, and commonly
-	 * end ups in a persistent config database.
+	 * ends up in a persistent config database.
 	 */
 	get_ether_addr(dev_addr, net->dev_addr);
 	if (cdc || rndis) {
@@ -2554,6 +2566,26 @@
 
 /*-------------------------------------------------------------------------*/
 
+static void
+eth_suspend (struct usb_gadget *gadget)
+{
+	struct eth_dev		*dev = get_gadget_data (gadget);
+
+	DEBUG (dev, "suspend\n");
+	dev->suspended = 1;
+}
+
+static void
+eth_resume (struct usb_gadget *gadget)
+{
+	struct eth_dev		*dev = get_gadget_data (gadget);
+
+	DEBUG (dev, "resume\n");
+	dev->suspended = 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
 static struct usb_gadget_driver eth_driver = {
 #ifdef CONFIG_USB_GADGET_DUALSPEED
 	.speed		= USB_SPEED_HIGH,
@@ -2567,6 +2599,9 @@
 	.setup		= eth_setup,
 	.disconnect	= eth_disconnect,
 
+	.suspend	= eth_suspend,
+	.resume		= eth_resume,
+
 	.driver 	= {
 		.name		= (char *) shortname,
 		// .shutdown = ...
--- diff/drivers/usb/gadget/file_storage.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/gadget/file_storage.c	2004-07-01 21:32:45.000000000 +0100
@@ -1465,6 +1465,8 @@
 	/* Respond with data/status or defer until later? */
 	if (rc >= 0 && rc != DELAYED_STATUS) {
 		fsg->ep0req->length = rc;
+		fsg->ep0req->zero = rc < ctrl->wLength
+				&& (rc % gadget->ep0->maxpacket) == 0;
 		fsg->ep0req_name = (ctrl->bRequestType & USB_DIR_IN ?
 				"ep0-in" : "ep0-out");
 		rc = ep0_queue(fsg);
@@ -2501,7 +2503,7 @@
 		/* Store and send the Bulk-only CSW */
 		csw->Signature = __constant_cpu_to_le32(USB_BULK_CS_SIG);
 		csw->Tag = fsg->tag;
-		csw->Residue = fsg->residue;
+		csw->Residue = cpu_to_le32(fsg->residue);
 		csw->Status = status;
 
 		bh->inreq->length = USB_BULK_CS_WRAP_LEN;
@@ -2947,7 +2949,7 @@
 		fsg->data_dir = DATA_DIR_TO_HOST;
 	else
 		fsg->data_dir = DATA_DIR_FROM_HOST;
-	fsg->data_size = cbw->DataTransferLength;
+	fsg->data_size = le32_to_cpu(cbw->DataTransferLength);
 	if (fsg->data_size == 0)
 		fsg->data_dir = DATA_DIR_NONE;
 	fsg->lun = cbw->Lun;
@@ -3834,6 +3836,7 @@
 	}
 
 	/* Find all the endpoints we will use */
+	usb_ep_autoconfig_reset(gadget);
 	ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc);
 	if (!ep)
 		goto autoconf_fail;
--- diff/drivers/usb/gadget/inode.c	2004-05-19 22:12:17.000000000 +0100
+++ source/drivers/usb/gadget/inode.c	2004-07-01 21:32:45.000000000 +0100
@@ -20,7 +20,7 @@
  */
 
 
-#define	DEBUG 1			/* data to help fault diagnosis */
+// #define	DEBUG 			/* data to help fault diagnosis */
 // #define	VERBOSE		/* extra debug messages (success too) */
 
 #include <linux/init.h>
@@ -44,7 +44,8 @@
  * The gadgetfs API maps each endpoint to a file descriptor so that you
  * can use standard synchronous read/write calls for I/O.  There's some
  * O_NONBLOCK and O_ASYNC/FASYNC style i/o support.  Example usermode
- * drivers show how this works in practice.
+ * drivers show how this works in practice.  You can also use AIO to
+ * eliminate I/O gaps between requests, to help when streaming data.
  *
  * Key parts that must be USB-specific are protocols defining how the
  * read/write operations relate to the hardware state machines.  There
@@ -70,7 +71,7 @@
  */
 
 #define	DRIVER_DESC	"USB Gadget filesystem"
-#define	DRIVER_VERSION	"20 Aug 2003"
+#define	DRIVER_VERSION	"18 Nov 2003"
 
 static const char driver_desc [] = DRIVER_DESC;
 static const char shortname [] = "gadgetfs";
@@ -539,6 +540,177 @@
 	return status;
 }
 
+/*----------------------------------------------------------------------*/
+
+/* ASYNCHRONOUS ENDPOINT I/O OPERATIONS (bulk/intr/iso) */
+
+struct kiocb_priv {
+	struct usb_request	*req;
+	struct ep_data		*epdata;
+	void			*buf;
+	char __user		*ubuf;
+	unsigned		actual;
+};
+
+static int ep_aio_cancel(struct kiocb *iocb, struct io_event *e)
+{
+	struct kiocb_priv	*priv = (void *) &iocb->private;
+	struct ep_data		*epdata;
+	int			value;
+
+	local_irq_disable();
+	epdata = priv->epdata;
+	// spin_lock(&epdata->dev->lock);
+	kiocbSetCancelled(iocb);
+	if (likely(epdata && epdata->ep && priv->req))
+		value = usb_ep_dequeue (epdata->ep, priv->req);
+	else
+		value = -EINVAL;
+	// spin_unlock(&epdata->dev->lock);
+	local_irq_enable();
+
+	aio_put_req(iocb);
+	return value;
+}
+
+static long ep_aio_read_retry(struct kiocb *iocb)
+{
+	struct kiocb_priv	*priv = (void *) &iocb->private;
+	int			status = priv->actual;
+
+	/* we "retry" to get the right mm context for this: */
+	status = copy_to_user(priv->ubuf, priv->buf, priv->actual);
+	if (unlikely(0 != status))
+		status = -EFAULT;
+	else
+		status = priv->actual;
+	kfree(priv->buf);
+	aio_put_req(iocb);
+	return status;
+}
+
+static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req)
+{
+	struct kiocb		*iocb = req->context;
+	struct kiocb_priv	*priv = (void *) &iocb->private;
+	struct ep_data		*epdata = priv->epdata;
+
+	/* lock against disconnect (and ideally, cancel) */
+	spin_lock(&epdata->dev->lock);
+	priv->req = 0;
+	priv->epdata = 0;
+	if (NULL == iocb->ki_retry
+			|| unlikely(0 == req->actual)
+			|| unlikely(kiocbIsCancelled(iocb))) {
+		kfree(req->buf);
+		/* aio_complete() reports bytes-transferred _and_ faults */
+		if (unlikely(kiocbIsCancelled(iocb)))
+			aio_put_req(iocb);
+		else
+			aio_complete(iocb,
+				req->actual ? req->actual : req->status,
+				req->status);
+	} else {
+		/* retry() won't report both; so we hide some faults */
+		if (unlikely(0 != req->status))
+			DBG(epdata->dev, "%s fault %d len %d\n",
+				ep->name, req->status, req->actual);
+
+		priv->buf = req->buf;
+		priv->actual = req->actual;
+		kick_iocb(iocb);
+	}
+	spin_unlock(&epdata->dev->lock);
+
+	usb_ep_free_request(ep, req);
+	put_ep(epdata);
+}
+
+static ssize_t
+ep_aio_rwtail(struct kiocb *iocb, char *buf, size_t len, struct ep_data *epdata)
+{
+	struct kiocb_priv	*priv = (void *) &iocb->private;
+	struct usb_request	*req;
+	ssize_t			value;
+
+	value = get_ready_ep(iocb->ki_filp->f_flags, epdata);
+	if (unlikely(value < 0)) {
+		kfree(buf);
+		return value;
+	}
+
+	iocb->ki_cancel = ep_aio_cancel;
+	get_ep(epdata);
+	priv->epdata = epdata;
+	priv->actual = 0;
+
+	/* each kiocb is coupled to one usb_request, but we can't
+	 * allocate or submit those if the host disconnected.
+	 */
+	spin_lock_irq(&epdata->dev->lock);
+	if (likely(epdata->ep)) {
+		req = usb_ep_alloc_request(epdata->ep, GFP_ATOMIC);
+		if (likely(req)) {
+			priv->req = req;
+			req->buf = buf;
+			req->length = len;
+			req->complete = ep_aio_complete;
+			req->context = iocb;
+			value = usb_ep_queue(epdata->ep, req, GFP_ATOMIC);
+			if (unlikely(0 != value))
+				usb_ep_free_request(epdata->ep, req);
+		} else
+			value = -EAGAIN;
+	} else
+		value = -ENODEV;
+	spin_unlock_irq(&epdata->dev->lock);
+
+	up(&epdata->lock);
+
+	if (unlikely(value))
+		put_ep(epdata);
+	else
+		value = -EIOCBQUEUED;
+	return value;
+}
+
+static ssize_t
+ep_aio_read(struct kiocb *iocb, char __user *ubuf, size_t len, loff_t o)
+{
+	struct kiocb_priv	*priv = (void *) &iocb->private;
+	struct ep_data		*epdata = iocb->ki_filp->private_data;
+	char			*buf;
+
+	if (unlikely(epdata->desc.bEndpointAddress & USB_DIR_IN))
+		return -EINVAL;
+	buf = kmalloc(len, GFP_KERNEL);
+	if (unlikely(!buf))
+		return -ENOMEM;
+	iocb->ki_retry = ep_aio_read_retry;
+	priv->ubuf = ubuf;
+	return ep_aio_rwtail(iocb, buf, len, epdata);
+}
+
+static ssize_t
+ep_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t len, loff_t o)
+{
+	struct ep_data		*epdata = iocb->ki_filp->private_data;
+	char			*buf;
+
+	if (unlikely(!(epdata->desc.bEndpointAddress & USB_DIR_IN)))
+		return -EINVAL;
+	buf = kmalloc(len, GFP_KERNEL);
+	if (unlikely(!buf))
+		return -ENOMEM;
+	if (unlikely(copy_from_user(buf, ubuf, len) != 0)) {
+		kfree(buf);
+		return -EFAULT;
+	}
+	return ep_aio_rwtail(iocb, buf, len, epdata);
+}
+
+/*----------------------------------------------------------------------*/
+
 /* used after endpoint configuration */
 static struct file_operations ep_io_operations = {
 	.owner =	THIS_MODULE,
@@ -547,8 +719,8 @@
 	.ioctl =	ep_ioctl,
 	.release =	ep_release,
 
-	// .aio_read =	ep_aio_read,
-	// .aio_write =	ep_aio_write,
+	.aio_read =	ep_aio_read,
+	.aio_write =	ep_aio_write,
 };
 
 /* ENDPOINT INITIALIZATION
@@ -1320,6 +1492,8 @@
 	/* proceed with data transfer and status phases? */
 	if (value >= 0 && dev->state != STATE_SETUP) {
 		req->length = value;
+		req->zero = value < ctrl->wLength
+				&& (value % gadget->ep0->maxpacket) == 0;
 		value = usb_ep_queue (gadget->ep0, req, GFP_ATOMIC);
 		if (value < 0) {
 			DBG (dev, "ep_queue --> %d\n", value);
--- diff/drivers/usb/gadget/ndis.h	2004-05-19 22:12:17.000000000 +0100
+++ source/drivers/usb/gadget/ndis.h	2004-07-01 21:32:45.000000000 +0100
@@ -26,11 +26,41 @@
 #define NDIS_STATUS_MULTICAST_EXISTS      0xC001000A
 #define NDIS_STATUS_MULTICAST_NOT_FOUND   0xC001000B
 
+enum NDIS_DEVICE_POWER_STATE {
+	NdisDeviceStateUnspecified = 0,
+	NdisDeviceStateD0,
+	NdisDeviceStateD1,
+	NdisDeviceStateD2,
+	NdisDeviceStateD3,
+	NdisDeviceStateMaximum
+};
+
+struct NDIS_PM_WAKE_UP_CAPABILITIES {
+	enum NDIS_DEVICE_POWER_STATE  MinMagicPacketWakeUp;
+	enum NDIS_DEVICE_POWER_STATE  MinPatternWakeUp;
+	enum NDIS_DEVICE_POWER_STATE  MinLinkChangeWakeUp;
+};
+
 /* NDIS_PNP_CAPABILITIES.Flags constants */
 #define NDIS_DEVICE_WAKE_UP_ENABLE                0x00000001
 #define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE  0x00000002
 #define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE   0x00000004
 
+struct NDIS_PNP_CAPABILITIES {
+	u32					Flags;
+	struct NDIS_PM_WAKE_UP_CAPABILITIES	WakeUpCapabilities;
+};
+
+struct NDIS_PM_PACKET_PATTERN {
+	u32	Priority;
+	u32	Reserved;
+	u32	MaskSize;
+	u32	PatternOffset;
+	u32	PatternSize;
+	u32	PatternFlags;
+};
+
+
 /* Required Object IDs (OIDs) */
 #define OID_GEN_SUPPORTED_LIST            0x00010101
 #define OID_GEN_HARDWARE_STATUS           0x00010102
--- diff/drivers/usb/gadget/net2280.c	2004-05-19 22:12:17.000000000 +0100
+++ source/drivers/usb/gadget/net2280.c	2004-07-01 21:32:45.000000000 +0100
@@ -1902,6 +1902,8 @@
 		, &dev->usb->stdrsp);
 	writel (  (1 << USB_ROOT_PORT_WAKEUP_ENABLE)
 		| (1 << SELF_POWERED_USB_DEVICE)
+		/* erratum 0102 workaround */
+		| ((dev->chiprev == 0100) ? 0 : 1) << SUSPEND_IMMEDIATELY
 		| (1 << REMOTE_WAKEUP_SUPPORT)
 		| (1 << USB_DETECT_ENABLE)
 		| (1 << SELF_POWERED_STATUS)
@@ -1917,6 +1919,7 @@
 		| (1 << PCI_RETRY_ABORT_INTERRUPT_ENABLE)
 		| (1 << VBUS_INTERRUPT_ENABLE)
 		| (1 << ROOT_PORT_RESET_INTERRUPT_ENABLE)
+		| (1 << SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE)
 		, &dev->regs->pciirqenb1);
 
 	/* don't leave any writes posted */
@@ -2513,19 +2516,24 @@
 			return;
 	}
 
-	/* NOTE: we don't actually suspend the hardware; that starts to
-	 * interact with PCI power management, and needs something like a
-	 * controller->suspend() call to clear SUSPEND_REQUEST_INTERRUPT.
-	 * we shouldn't see resume interrupts.
-	 * for rev 0100, this also avoids erratum 0102.
+	/* NOTE: chip stays in PCI D0 state for now, but it could
+	 * enter D1 to save more power
 	 */
 	tmp = (1 << SUSPEND_REQUEST_CHANGE_INTERRUPT);
 	if (stat & tmp) {
-		if (dev->driver->suspend)
-			dev->driver->suspend (&dev->gadget);
+		writel (tmp, &dev->regs->irqstat1);
+		if (stat & (1 << SUSPEND_REQUEST_INTERRUPT)) {
+			if (dev->driver->suspend)
+				dev->driver->suspend (&dev->gadget);
+			/* we use SUSPEND_IMMEDIATELY */
+			stat &= ~(1 << SUSPEND_REQUEST_INTERRUPT);
+		} else {
+			if (dev->driver->resume)
+				dev->driver->resume (&dev->gadget);
+			/* at high speed, note erratum 0133 */
+		}
 		stat &= ~tmp;
 	}
-	stat &= ~(1 << SUSPEND_REQUEST_INTERRUPT);
 
 	/* clear any other status/irqs */
 	if (stat)
@@ -2533,6 +2541,7 @@
 
 	/* some status we can just ignore */
 	stat &= ~((1 << CONTROL_STATUS_INTERRUPT)
+			| (1 << SUSPEND_REQUEST_INTERRUPT)
 			| (1 << RESUME_INTERRUPT)
 			| (1 << SOF_INTERRUPT));
 	if (!stat)
--- diff/drivers/usb/gadget/pxa2xx_udc.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/gadget/pxa2xx_udc.c	2004-07-01 21:32:45.000000000 +0100
@@ -1406,7 +1406,7 @@
 
 #ifdef	CONFIG_ARCH_PXA
         /* Disable clock for USB device */
-        CKEN &= ~CKEN11_USB;
+	pxa_set_cken(CKEN11_USB, 0);
 #endif
 
 	ep0_idle (dev);
@@ -1452,7 +1452,7 @@
 
 #ifdef	CONFIG_ARCH_PXA
         /* Enable clock for USB device */
-        CKEN |= CKEN11_USB;
+	pxa_set_cken(CKEN11_USB, 1);
 #endif
 
 	/* try to clear these bits before we enable the udc */
--- diff/drivers/usb/gadget/rndis.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/gadget/rndis.c	2004-07-01 21:32:45.000000000 +0100
@@ -18,6 +18,9 @@
  * 
  * 03/25/2004 Kai-Uwe Bloem <linux-development@auerswald.de>
  * 		Fixed rndis_rm_hdr length bug.
+ *
+ * Copyright (C) 2004 by David Brownell
+ *		updates to merge with Linux 2.6, better match RNDIS spec
  */
 
 #include <linux/config.h>
@@ -35,28 +38,34 @@
 #include <asm/byteorder.h>
 #include <asm/system.h>
 
+
+#undef	RNDIS_PM
+#undef	VERBOSE
+
 #include "rndis.h"
 
 
 /* The driver for your USB chip needs to support ep0 OUT to work with
- * RNDIS, plus the same three descriptors as CDC Ethernet.
+ * RNDIS, plus all three CDC Ethernet endpoints (interrupt not optional).
  *
  * Windows hosts need an INF file like Documentation/usb/linux.inf
+ * and will be happier if you provide the host_addr module parameter.
  */
 
-#ifndef	__LITTLE_ENDIAN
-#warning this code is missing all cpu_to_leXX() calls ...
-#endif
-
 #if 0
-#define DEBUG if (rndis_debug) printk 
+#define DEBUG(str,args...) do { \
+	if (rndis_debug) \
+		printk(KERN_DEBUG str , ## args ); \
+	} while (0)
 static int rndis_debug = 0;
 
 module_param (rndis_debug, bool, 0);
 MODULE_PARM_DESC (rndis_debug, "enable debugging");
 
 #else
-#define DEBUG(str,args...) do{}while(0)
+
+#define rndis_debug		0
+#define DEBUG(str,args...)	do{}while(0)
 #endif
 
 #define RNDIS_MAX_CONFIGS	1
@@ -79,16 +88,14 @@
 
 static rndis_resp_t *rndis_add_response (int configNr, u32 length);
 
-/* FIXME OMITTED OIDs, that RNDIS-on-USB "must" support, include
- *  - power management (OID_PNP_CAPABILITIES, ...)
- *  - network wakeup (OID_PNP_ENABLE_WAKE_UP, ...)
- */
 
 /* NDIS Functions */
 static int gen_ndis_query_resp (int configNr, u32 OID, rndis_resp_t *r)
 {
 	int 			retval = -ENOTSUPP;
 	u32 			length = 0;
+	u32			*tmp;
+	int			i, count;
 	rndis_query_cmplt_type	*resp;
 
 	if (!r) return -ENOMEM;
@@ -97,11 +104,17 @@
 	if (!resp) return -ENOMEM;
 	
 	switch (OID) {
+
+	/* general oids (table 4-1) */
+
 	/* mandatory */
 	case OID_GEN_SUPPORTED_LIST:
 		DEBUG ("%s: OID_GEN_SUPPORTED_LIST\n", __FUNCTION__);
 		length = sizeof (oid_supported_list);
-		memcpy ((u8 *) resp + 24, oid_supported_list, length); 
+		count  = length / sizeof (u32);
+		tmp = (u32 *) ((u8 *)resp + 24);
+		for (i = 0; i < count; i++)
+			tmp[i] = cpu_to_le32 (oid_supported_list[i]);
 		retval = 0;
 		break;
 		
@@ -115,7 +128,7 @@
 		 * reddite ergo quae sunt Caesaris Caesari
 		 * et quae sunt Dei Deo!
 		 */
-		*((u32 *) resp + 6) = 0;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 		retval = 0;
 		break;
 		
@@ -123,7 +136,8 @@
 	case OID_GEN_MEDIA_SUPPORTED:
 		DEBUG("%s: OID_GEN_MEDIA_SUPPORTED\n", __FUNCTION__);
 		length = 4;
-		*((u32 *) resp + 6) = rndis_per_dev_params [configNr].medium;
+		*((u32 *) resp + 6) = cpu_to_le32 (
+					rndis_per_dev_params [configNr].medium);
 		retval = 0;
 		break;
 		
@@ -132,24 +146,21 @@
 		DEBUG("%s: OID_GEN_MEDIA_IN_USE\n", __FUNCTION__);
 		length = 4;
 		/* one medium, one transport... (maybe you do it better) */
-		*((u32 *) resp + 6) = rndis_per_dev_params [configNr].medium;
+		*((u32 *) resp + 6) = cpu_to_le32 (
+					rndis_per_dev_params [configNr].medium);
 		retval = 0;
 		break;
 		
-	case OID_GEN_MAXIMUM_LOOKAHEAD:
-		DEBUG("%s: OID_GEN_MAXIMUM_LOOKAHEAD\n", __FUNCTION__);
-		break;
-		
 	/* mandatory */
 	case OID_GEN_MAXIMUM_FRAME_SIZE:
 		DEBUG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].dev) {
 			length = 4;
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr]
-						.dev->mtu;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr].dev->mtu);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -160,30 +171,20 @@
 		length = 4;
 		if (rndis_per_dev_params [configNr].media_state
 			== NDIS_MEDIA_STATE_DISCONNECTED)
-		    *((u32 *) resp + 6) = 0;
+		    *((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 		else
-		    *((u32 *) resp + 6) = rndis_per_dev_params [configNr].speed;
+		    *((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr].speed);
 		retval = 0;
 		break;
-		
-	case OID_GEN_TRANSMIT_BUFFER_SPACE:
-		DEBUG("%s: OID_GEN_TRANSMIT_BUFFER_SPACE\n", __FUNCTION__);
-		length = 4;
-		*((u32 *) resp + 6) = 0;
-		retval = 0;
-		break;
-		
-	case OID_GEN_RECEIVE_BUFFER_SPACE:
-		DEBUG("%s: OID_GEN_RECEIVE_BUFFER_SPACE\n", __FUNCTION__);
-		break;
-		
+
 	/* mandatory */
 	case OID_GEN_TRANSMIT_BLOCK_SIZE:
 		DEBUG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].dev) {
 			length = 4;
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr]
-						.dev->mtu;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr].dev->mtu);
 			retval = 0;
 		}
 		break;
@@ -193,8 +194,8 @@
 		DEBUG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].dev) {
 			length = 4;
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr]
-						.dev->mtu;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr].dev->mtu);
 			retval = 0;
 		}
 		break;
@@ -203,7 +204,8 @@
 	case OID_GEN_VENDOR_ID:
 		DEBUG("%s: OID_GEN_VENDOR_ID\n", __FUNCTION__);
 		length = 4;
-		*((u32 *) resp + 6) = rndis_per_dev_params [configNr].vendorID;
+		*((u32 *) resp + 6) = cpu_to_le32 (
+			rndis_per_dev_params [configNr].vendorID);
 		retval = 0;
 		break;
 		
@@ -216,129 +218,92 @@
 		retval = 0;
 		break;
 
+	case OID_GEN_VENDOR_DRIVER_VERSION:
+		DEBUG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __FUNCTION__);
+		length = 4;
+		/* Created as LE */
+		*((u32 *) resp + 6) = rndis_driver_version;
+		retval = 0;
+		break;
+
 	/* mandatory */
 	case OID_GEN_CURRENT_PACKET_FILTER:
 		DEBUG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __FUNCTION__);
 		length = 4;
-		*((u32 *) resp + 6) = rndis_per_dev_params[configNr].filter;
+		*((u32 *) resp + 6) = cpu_to_le32 (
+					rndis_per_dev_params[configNr].filter);
 		retval = 0;
 		break;
-		
-	case OID_GEN_CURRENT_LOOKAHEAD:
-		DEBUG("%s: OID_GEN_CURRENT_LOOKAHEAD\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_DRIVER_VERSION:
-		DEBUG("%s: OID_GEN_DRIVER_VERSION\n", __FUNCTION__);
-		break;
-		
+
 	/* mandatory */
 	case OID_GEN_MAXIMUM_TOTAL_SIZE:
 		DEBUG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __FUNCTION__);
 		length = 4;
-		*((u32 *) resp + 6) = RNDIS_MAX_TOTAL_SIZE;
-		retval = 0;
-		break;
-		
-	case OID_GEN_PROTOCOL_OPTIONS:
-		DEBUG("%s: OID_GEN_PROTOCOL_OPTIONS\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_MAC_OPTIONS:
-		DEBUG("%s: OID_GEN_MAC_OPTIONS\n", __FUNCTION__);
-		length = 4;
-		*((u32 *) resp + 6) = NDIS_MAC_OPTION_RECEIVE_SERIALIZED | 
-		    NDIS_MAC_OPTION_FULL_DUPLEX;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32(
+					RNDIS_MAX_TOTAL_SIZE);
 		retval = 0;
 		break;
-		
+
 	/* mandatory */
 	case OID_GEN_MEDIA_CONNECT_STATUS:
 		DEBUG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __FUNCTION__);
 		length = 4;
-		*((u32 *) resp + 6) = rndis_per_dev_params [configNr]
-						.media_state;
+		*((u32 *) resp + 6) = cpu_to_le32 (
+					rndis_per_dev_params [configNr]
+						.media_state);
 		retval = 0;
 		break;
-		
-	case OID_GEN_MAXIMUM_SEND_PACKETS:
-		DEBUG("%s: OID_GEN_MAXIMUM_SEND_PACKETS\n", __FUNCTION__);
-		break;
-		
-	/* mandatory */
-	case OID_GEN_VENDOR_DRIVER_VERSION:
-		DEBUG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __FUNCTION__);
-		length = 4;
-		*((u32 *) resp + 6) = rndis_driver_version;
-		retval = 0;
-		break;
-		
-	case OID_GEN_SUPPORTED_GUIDS:
-		DEBUG("%s: OID_GEN_SUPPORTED_GUIDS\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_NETWORK_LAYER_ADDRESSES:
-		DEBUG("%s: OID_GEN_NETWORK_LAYER_ADDRESSES\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_TRANSPORT_HEADER_OFFSET:
-		DEBUG("%s: OID_GEN_TRANSPORT_HEADER_OFFSET\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_MACHINE_NAME:
-		DEBUG("%s: OID_GEN_MACHINE_NAME\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_RNDIS_CONFIG_PARAMETER:
-		DEBUG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER\n", __FUNCTION__);
+
+	case OID_GEN_PHYSICAL_MEDIUM:
+		DEBUG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __FUNCTION__);
 		length = 4;
-		*((u32 *) resp + 6) = 0;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 		retval = 0;
 		break;
-		
-	case OID_GEN_VLAN_ID:
-		DEBUG("%s: OID_GEN_VLAN_ID\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_MEDIA_CAPABILITIES:
-		DEBUG("%s: OID_GEN_MEDIA_CAPABILITIES\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_PHYSICAL_MEDIUM:
-		DEBUG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __FUNCTION__);
+
+	/* The RNDIS specification is incomplete/wrong.   Some versions
+	 * of MS-Windows expect OIDs that aren't specified there.  Other
+	 * versions emit undefined RNDIS messages. DOCUMENT ALL THESE!
+	 */
+	case OID_GEN_MAC_OPTIONS:		/* from WinME */
+		DEBUG("%s: OID_GEN_MAC_OPTIONS\n", __FUNCTION__);
 		length = 4;
-		*((u32 *) resp + 6) = 0;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32(
+			  NDIS_MAC_OPTION_RECEIVE_SERIALIZED
+			| NDIS_MAC_OPTION_FULL_DUPLEX);
 		retval = 0;
 		break;
-		
+
+	/* statistics OIDs (table 4-2) */
+
 	/* mandatory */
 	case OID_GEN_XMIT_OK:
 		DEBUG("%s: OID_GEN_XMIT_OK\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
 			length = 4;
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr]
-					.stats->tx_packets - 
+			*((u32 *) resp + 6) = cpu_to_le32 (
+			    rndis_per_dev_params [configNr].stats->tx_packets - 
 			    rndis_per_dev_params [configNr].stats->tx_errors -
-			    rndis_per_dev_params [configNr].stats->tx_dropped;
+			    rndis_per_dev_params [configNr].stats->tx_dropped);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
-		
+
 	/* mandatory */
 	case OID_GEN_RCV_OK:
 		DEBUG("%s: OID_GEN_RCV_OK\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
 			length = 4;
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->rx_packets - 
+			*((u32 *) resp + 6) = cpu_to_le32 (
+			    rndis_per_dev_params [configNr].stats->rx_packets - 
 			    rndis_per_dev_params [configNr].stats->rx_errors -
-			    rndis_per_dev_params [configNr].stats->rx_dropped;
+			    rndis_per_dev_params [configNr].stats->rx_dropped);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -348,11 +313,12 @@
 		DEBUG("%s: OID_GEN_XMIT_ERROR\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
 			length = 4;
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->tx_errors;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->tx_errors);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -361,11 +327,12 @@
 	case OID_GEN_RCV_ERROR:
 		DEBUG("%s: OID_GEN_RCV_ERROR\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->rx_errors;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->rx_errors);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -374,15 +341,17 @@
 	case OID_GEN_RCV_NO_BUFFER:
 		DEBUG("%s: OID_GEN_RCV_NO_BUFFER\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->rx_dropped;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->rx_dropped);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
-		
+
+#ifdef	RNDIS_OPTIONAL_STATS
 	case OID_GEN_DIRECTED_BYTES_XMIT:
 		DEBUG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __FUNCTION__);
 		/* 
@@ -392,14 +361,17 @@
 		 */
 		if (rndis_per_dev_params [configNr].stats) {
 			length = 4;
-			*((u32 *) resp + 6) = (rndis_per_dev_params [configNr].
-					stats->tx_packets - 
-			    rndis_per_dev_params [configNr].stats->tx_errors -
-			    rndis_per_dev_params [configNr].stats->tx_dropped)
-					*123;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				(rndis_per_dev_params [configNr]
+					.stats->tx_packets - 
+				 rndis_per_dev_params [configNr]
+					 .stats->tx_errors -
+				 rndis_per_dev_params [configNr]
+					 .stats->tx_dropped)
+				* 123);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -409,14 +381,17 @@
 		/* dito */
 		if (rndis_per_dev_params [configNr].stats) {
 			length = 4;
-			*((u32 *) resp + 6) = (rndis_per_dev_params [configNr].
-					stats->tx_packets - 
-			    rndis_per_dev_params [configNr].stats->tx_errors -
-			    rndis_per_dev_params [configNr].stats->tx_dropped)
-			    		/123;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				(rndis_per_dev_params [configNr]
+					.stats->tx_packets - 
+				 rndis_per_dev_params [configNr]
+					 .stats->tx_errors -
+				 rndis_per_dev_params [configNr]
+					 .stats->tx_dropped)
+				/ 123);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -424,11 +399,12 @@
 	case OID_GEN_MULTICAST_BYTES_XMIT:
 		DEBUG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->multicast*1234;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->multicast*1234);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -436,11 +412,12 @@
 	case OID_GEN_MULTICAST_FRAMES_XMIT:
 		DEBUG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->multicast;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->multicast);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -448,11 +425,12 @@
 	case OID_GEN_BROADCAST_BYTES_XMIT:
 		DEBUG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->tx_packets/42*255;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->tx_packets/42*255);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -460,35 +438,37 @@
 	case OID_GEN_BROADCAST_FRAMES_XMIT:
 		DEBUG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->tx_packets/42;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->tx_packets/42);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
 		
 	case OID_GEN_DIRECTED_BYTES_RCV:
 		DEBUG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __FUNCTION__);
-		*((u32 *) resp + 6) = 0;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 		retval = 0;
 		break;
 		
 	case OID_GEN_DIRECTED_FRAMES_RCV:
 		DEBUG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __FUNCTION__);
-		*((u32 *) resp + 6) = 0;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 		retval = 0;
 		break;
 		
 	case OID_GEN_MULTICAST_BYTES_RCV:
 		DEBUG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->multicast*1111;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->multicast * 1111);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -496,11 +476,12 @@
 	case OID_GEN_MULTICAST_FRAMES_RCV:
 		DEBUG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->multicast;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->multicast);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -508,11 +489,12 @@
 	case OID_GEN_BROADCAST_BYTES_RCV:
 		DEBUG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->rx_packets/42*255;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->rx_packets/42*255);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -520,11 +502,12 @@
 	case OID_GEN_BROADCAST_FRAMES_RCV:
 		DEBUG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->rx_packets/42;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->rx_packets/42);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -532,61 +515,25 @@
 	case OID_GEN_RCV_CRC_ERROR:
 		DEBUG("%s: OID_GEN_RCV_CRC_ERROR\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats) {
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr].
-					stats->rx_crc_errors;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->rx_crc_errors);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
 		
 	case OID_GEN_TRANSMIT_QUEUE_LENGTH:
 		DEBUG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __FUNCTION__);
-		*((u32 *) resp + 6) = 0;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 		retval = 0;
 		break;
-		
-	case OID_GEN_GET_TIME_CAPS:
-		DEBUG("%s: OID_GEN_GET_TIME_CAPS\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_GET_NETCARD_TIME:
-		DEBUG("%s: OID_GEN_GET_NETCARD_TIME\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_NETCARD_LOAD:
-		DEBUG("%s: OID_GEN_NETCARD_LOAD\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_DEVICE_PROFILE:
-		DEBUG("%s: OID_GEN_DEVICE_PROFILE\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_INIT_TIME_MS:
-		DEBUG("%s: OID_GEN_INIT_TIME_MS\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_RESET_COUNTS:
-		DEBUG("%s: OID_GEN_RESET_COUNTS\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_MEDIA_SENSE_COUNTS:
-		DEBUG("%s: OID_GEN_MEDIA_SENSE_COUNTS\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_FRIENDLY_NAME:
-		DEBUG("%s: OID_GEN_FRIENDLY_NAME\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_MINIPORT_INFO:
-		DEBUG("%s: OID_GEN_MINIPORT_INFO\n", __FUNCTION__);
-		break;
-		
-	case OID_GEN_RESET_VERIFY_PARAMETERS:
-		DEBUG("%s: OID_GEN_RESET_VERIFY_PARAMETERS\n", __FUNCTION__);
-		break;
-		
+#endif	/* RNDIS_OPTIONAL_STATS */
+
+	/* ieee802.3 OIDs (table 4-3) */
+
 	/* mandatory */
 	case OID_802_3_PERMANENT_ADDRESS:
 		DEBUG("%s: OID_802_3_PERMANENT_ADDRESS\n", __FUNCTION__);
@@ -597,7 +544,7 @@
 				length);
 			retval = 0;
 		} else {
-			*((u32 *) resp + 6) = 0;
+			*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 			retval = 0;
 		}
 		break;
@@ -619,7 +566,7 @@
 		DEBUG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__);
 		length = 4;
 		/* Multicast base address only */
-		*((u32 *) resp + 6) = 0xE0000000;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32 (0xE0000000);
 		retval = 0;
 		break;
 		
@@ -628,22 +575,25 @@
 		DEBUG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __FUNCTION__);
 		 length = 4;
 		/* Multicast base address only */
-		*((u32 *) resp + 6) = 1;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32 (1);
 		retval = 0;
 		break;
 		
 	case OID_802_3_MAC_OPTIONS:
 		DEBUG("%s: OID_802_3_MAC_OPTIONS\n", __FUNCTION__);
 		break;
-		
+
+	/* ieee802.3 statistics OIDs (table 4-4) */
+
 	/* mandatory */
 	case OID_802_3_RCV_ERROR_ALIGNMENT:
 		DEBUG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __FUNCTION__);
 		if (rndis_per_dev_params [configNr].stats)
 		{
 			length = 4;
-			*((u32 *) resp + 6) = rndis_per_dev_params [configNr]
-					.stats->rx_frame_errors;
+			*((u32 *) resp + 6) = cpu_to_le32 (
+				rndis_per_dev_params [configNr]
+					.stats->rx_frame_errors);
 			retval = 0;
 		}
 		break;
@@ -652,7 +602,7 @@
 	case OID_802_3_XMIT_ONE_COLLISION:
 		DEBUG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __FUNCTION__);
 		length = 4;
-		*((u32 *) resp + 6) = 0;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 		retval = 0;
 		break;
 		
@@ -660,10 +610,11 @@
 	case OID_802_3_XMIT_MORE_COLLISIONS:
 		DEBUG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __FUNCTION__);
 		length = 4;
-		*((u32 *) resp + 6) = 0;
+		*((u32 *) resp + 6) = __constant_cpu_to_le32 (0);
 		retval = 0;
 		break;
 		
+#ifdef	RNDIS_OPTIONAL_STATS
 	case OID_802_3_XMIT_DEFERRED:
 		DEBUG("%s: OID_802_3_XMIT_DEFERRED\n", __FUNCTION__);
 		/* TODO */
@@ -698,14 +649,46 @@
 		DEBUG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __FUNCTION__);
 		/* TODO */
 		break;		
-		
-	default: printk (KERN_ERR "%s: unknown OID 0x%08X\n", 
+#endif	/* RNDIS_OPTIONAL_STATS */
+
+#ifdef	RNDIS_PM
+	/* power management OIDs (table 4-5) */
+	case OID_PNP_CAPABILITIES:
+		DEBUG("%s: OID_PNP_CAPABILITIES\n", __FUNCTION__);
+
+		/* just PM, and remote wakeup on link status change
+		 * (not magic packet or pattern match)
+		 */
+		length = sizeof (struct NDIS_PNP_CAPABILITIES);
+		memset (resp, 0, length);
+		{
+			struct NDIS_PNP_CAPABILITIES *caps = (void *) resp;
+
+			caps->Flags = NDIS_DEVICE_WAKE_UP_ENABLE;
+			caps->WakeUpCapabilities.MinLinkChangeWakeUp 
+				 = NdisDeviceStateD3;
+
+			/* FIXME then use usb_gadget_wakeup(), and
+			 * set USB_CONFIG_ATT_WAKEUP in config desc
+			 */
+		}
+		retval = 0;
+		break;
+	case OID_PNP_QUERY_POWER:
+		DEBUG("%s: OID_PNP_QUERY_POWER\n", __FUNCTION__);
+		/* sure, handle any power state that maps to USB suspend */
+		retval = 0;
+		break;
+#endif
+
+	default:
+		printk (KERN_WARNING "%s: query unknown OID 0x%08X\n", 
 			 __FUNCTION__, OID);
 	}
 	
-	resp->InformationBufferOffset = 16;
-	resp->InformationBufferLength = length;
-	resp->MessageLength = 24 + length;
+	resp->InformationBufferOffset = __constant_cpu_to_le32 (16);
+	resp->InformationBufferLength = cpu_to_le32 (length);
+	resp->MessageLength = cpu_to_le32 (24 + length);
 	r->length = 24 + length;
 	return retval;
 }
@@ -715,9 +698,7 @@
 {
 	rndis_set_cmplt_type		*resp;
 	int 				i, retval = -ENOTSUPP;
-	struct rndis_config_parameter	*param;
 	struct rndis_params		*params;
-	u8 *cp;
 
 	if (!r)
 		return -ENOMEM;
@@ -725,20 +706,37 @@
 	if (!resp)
 		return -ENOMEM;
 
-	cp = (u8 *)resp;
+	DEBUG("set OID %08x value, len %d:\n", OID, buf_len);
+	for (i = 0; i < buf_len; i += 16) {
+		DEBUG ("%03d: "
+			" %02x %02x %02x %02x"
+			" %02x %02x %02x %02x"
+			" %02x %02x %02x %02x"
+			" %02x %02x %02x %02x"
+			"\n",
+			i,
+			buf[i], buf [i+1],
+				buf[i+2], buf[i+3],
+			buf[i+4], buf [i+5],
+				buf[i+6], buf[i+7],
+			buf[i+8], buf [i+9],
+				buf[i+10], buf[i+11],
+			buf[i+12], buf [i+13],
+				buf[i+14], buf[i+15]);
+	}
 
 	switch (OID) {
 	case OID_GEN_CURRENT_PACKET_FILTER:
 		params = &rndis_per_dev_params [configNr];
 		retval = 0;
 
-		/* FIXME use this NDIS_PACKET_TYPE_* bitflags to
+		/* FIXME use these NDIS_PACKET_TYPE_* bitflags to
 		 * filter packets in hard_start_xmit()
 		 * NDIS_PACKET_TYPE_x == CDC_PACKET_TYPE_x for x in:
 		 *	PROMISCUOUS, DIRECTED,
 		 *	MULTICAST, ALL_MULTICAST, BROADCAST
 		 */
-		params->filter = *(u32 *)buf;
+		params->filter = cpu_to_le32p((u32 *)buf);
 		DEBUG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n",
 			__FUNCTION__, params->filter);
 
@@ -763,23 +761,40 @@
 		DEBUG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__);
 		retval = 0;
 		break;
-		
+#if 0
 	case OID_GEN_RNDIS_CONFIG_PARAMETER:
-		DEBUG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER\n", __FUNCTION__);
+		{
+		struct rndis_config_parameter	*param;
 		param = (struct rndis_config_parameter *) buf;
-		if (param) {
-			for (i = 0; i < param->ParameterNameLength; i++) {
-				DEBUG ("%c", 
-				       *(buf + param->ParameterNameOffset + i));
-			}
-			DEBUG ("\n");
+		DEBUG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n",
+			__FUNCTION__,
+			min(cpu_to_le32(param->ParameterNameLength),80),
+			buf + param->ParameterNameOffset);
+		retval = 0;
 		}
-		
+		break;
+#endif
+
+#ifdef	RNDIS_PM
+	case OID_PNP_SET_POWER:
+		DEBUG ("OID_PNP_SET_POWER\n");
+		/* sure, handle any power state that maps to USB suspend */
 		retval = 0;
 		break;
-		
-	default: printk (KERN_ERR "%s: unknown OID 0x%08X\n", 
-			 __FUNCTION__, OID);
+
+	case OID_PNP_ENABLE_WAKE_UP:
+		/* always-connected ... */
+		DEBUG ("OID_PNP_ENABLE_WAKE_UP\n");
+		retval = 0;
+		break;
+
+	// no PM resume patterns supported (specified where?)
+	// so OID_PNP_{ADD,REMOVE}_WAKE_UP_PATTERN always fails
+#endif
+
+	default:
+		printk (KERN_WARNING "%s: set unknown OID 0x%08X, size %d\n", 
+			 __FUNCTION__, OID, buf_len);
 	}
 	
 	return retval;
@@ -804,22 +819,24 @@
 	
 	if (!resp) return -ENOMEM;
 	
-	resp->MessageType = REMOTE_NDIS_INITIALIZE_CMPLT;
-	resp->MessageLength = 52;
-	resp->RequestID = buf->RequestID;
-	resp->Status = RNDIS_STATUS_SUCCESS;
-	resp->MajorVersion = RNDIS_MAJOR_VERSION;
-	resp->MinorVersion = RNDIS_MINOR_VERSION;
-	resp->DeviceFlags = RNDIS_DF_CONNECTIONLESS;
-	resp->Medium = RNDIS_MEDIUM_802_3;
-	resp->MaxPacketsPerTransfer = 1;
-	resp->MaxTransferSize = rndis_per_dev_params [configNr].dev->mtu
+	resp->MessageType = __constant_cpu_to_le32 (
+			REMOTE_NDIS_INITIALIZE_CMPLT);
+	resp->MessageLength = __constant_cpu_to_le32 (52);
+	resp->RequestID = buf->RequestID; /* Still LE in msg buffer */
+	resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
+	resp->MajorVersion = __constant_cpu_to_le32 (RNDIS_MAJOR_VERSION);
+	resp->MinorVersion = __constant_cpu_to_le32 (RNDIS_MINOR_VERSION);
+	resp->DeviceFlags = __constant_cpu_to_le32 (RNDIS_DF_CONNECTIONLESS);
+	resp->Medium = __constant_cpu_to_le32 (RNDIS_MEDIUM_802_3);
+	resp->MaxPacketsPerTransfer = __constant_cpu_to_le32 (1);
+	resp->MaxTransferSize = cpu_to_le32 (
+		  rndis_per_dev_params [configNr].dev->mtu
 		+ sizeof (struct ethhdr)
 		+ sizeof (struct rndis_packet_msg_type)
-		+ 22;
-	resp->PacketAlignmentFactor = 0;
-	resp->AFListOffset = 0;
-	resp->AFListSize = 0;
+		+ 22);
+	resp->PacketAlignmentFactor = __constant_cpu_to_le32 (0);
+	resp->AFListOffset = __constant_cpu_to_le32 (0);
+	resp->AFListSize = __constant_cpu_to_le32 (0);
 	
 	if (rndis_per_dev_params [configNr].ack)
 	    rndis_per_dev_params [configNr].ack (
@@ -833,7 +850,7 @@
 	rndis_query_cmplt_type *resp;
 	rndis_resp_t            *r;
 	
-	DEBUG("%s: OID = %08X\n", __FUNCTION__, buf->OID);
+	// DEBUG("%s: OID = %08X\n", __FUNCTION__, cpu_to_le32(buf->OID));
 	if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP;
 	
 	/* 
@@ -847,17 +864,18 @@
 	
 	if (!resp) return -ENOMEM;
 	
-	resp->MessageType = REMOTE_NDIS_QUERY_CMPLT;
-	resp->MessageLength = 24;
-	resp->RequestID = buf->RequestID;
+	resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_QUERY_CMPLT);
+	resp->MessageLength = __constant_cpu_to_le32 (24);
+	resp->RequestID = buf->RequestID; /* Still LE in msg buffer */
 	
-	if (gen_ndis_query_resp (configNr, buf->OID, r)) {
+	if (gen_ndis_query_resp (configNr, cpu_to_le32 (buf->OID), r)) {
 		/* OID not supported */
-		resp->Status = RNDIS_STATUS_NOT_SUPPORTED;
-		resp->InformationBufferLength = 0;
-		resp->InformationBufferOffset = 0;
+		resp->Status = __constant_cpu_to_le32 (
+				RNDIS_STATUS_NOT_SUPPORTED);
+		resp->InformationBufferLength = __constant_cpu_to_le32 (0);
+		resp->InformationBufferOffset = __constant_cpu_to_le32 (0);
 	} else
-		resp->Status = RNDIS_STATUS_SUCCESS;
+		resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
 	
 	if (rndis_per_dev_params [configNr].ack)
 	    rndis_per_dev_params [configNr].ack (
@@ -867,38 +885,42 @@
 
 static int rndis_set_response (int configNr, rndis_set_msg_type *buf)
 {
+	u32			BufLength, BufOffset;
 	rndis_set_cmplt_type	*resp;
 	rndis_resp_t		*r;
-	int			i;
 	
 	r = rndis_add_response (configNr, sizeof (rndis_set_cmplt_type));
 	
 	if (!r) return -ENOMEM;
 	resp = (rndis_set_cmplt_type *) r->buf;
 	if (!resp) return -ENOMEM;
-	
-	DEBUG("%s: Length: %d\n", __FUNCTION__, buf->InformationBufferLength);
-	DEBUG("%s: Offset: %d\n", __FUNCTION__, buf->InformationBufferOffset);
+
+	BufLength = cpu_to_le32 (buf->InformationBufferLength);
+	BufOffset = cpu_to_le32 (buf->InformationBufferOffset);
+
+#ifdef	VERBOSE
+	DEBUG("%s: Length: %d\n", __FUNCTION__, BufLength);
+	DEBUG("%s: Offset: %d\n", __FUNCTION__, BufOffset);
 	DEBUG("%s: InfoBuffer: ", __FUNCTION__);
 	
-	for (i = 0; i < buf->InformationBufferLength; i++) {
-		DEBUG ("%02x ", *(((u8 *) buf) + i + 12 +
-		       buf->InformationBufferOffset));
+	for (i = 0; i < BufLength; i++) {
+		DEBUG ("%02x ", *(((u8 *) buf) + i + 8 + BufOffset));
 	}
 	
 	DEBUG ("\n");
+#endif
 	
-	resp->MessageType = REMOTE_NDIS_SET_CMPLT;
-	resp->MessageLength = 16;
-	resp->RequestID = buf->RequestID;
-	if (gen_ndis_set_resp (configNr, buf->OID, 
-			       ((u8 *) buf) + 28, 
-			       buf->InformationBufferLength, r))
-	    resp->Status = RNDIS_STATUS_NOT_SUPPORTED;
-	else resp->Status = RNDIS_STATUS_SUCCESS;
+	resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_SET_CMPLT);
+	resp->MessageLength = __constant_cpu_to_le32 (16);
+	resp->RequestID = buf->RequestID; /* Still LE in msg buffer */
+	if (gen_ndis_set_resp (configNr, cpu_to_le32 (buf->OID), 
+			       ((u8 *) buf) + 8 + BufOffset, BufLength, r))
+	    resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_NOT_SUPPORTED);
+	else resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
 	
 	if (rndis_per_dev_params [configNr].ack)
-	    rndis_per_dev_params [configNr].ack (rndis_per_dev_params [configNr].dev);
+	    rndis_per_dev_params [configNr].ack (
+	    		rndis_per_dev_params [configNr].dev);
 	
 	return 0;
 }
@@ -914,10 +936,11 @@
 	resp = (rndis_reset_cmplt_type *) r->buf;
 	if (!resp) return -ENOMEM;
 	
-	resp->MessageType = REMOTE_NDIS_RESET_CMPLT;
-	resp->MessageLength = 16;
-	resp->Status = RNDIS_STATUS_SUCCESS;
-	resp->AddressingReset = 1; /* resent information */
+	resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_RESET_CMPLT);
+	resp->MessageLength = __constant_cpu_to_le32 (16);
+	resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
+	/* resent information */
+	resp->AddressingReset = __constant_cpu_to_le32 (1);
 	
 	if (rndis_per_dev_params [configNr].ack)
 	    rndis_per_dev_params [configNr].ack (
@@ -938,10 +961,11 @@
 	resp = (rndis_keepalive_cmplt_type *) r->buf;
 	if (!resp) return -ENOMEM;
 		
-	resp->MessageType = REMOTE_NDIS_KEEPALIVE_CMPLT;
-	resp->MessageLength = 16;
-	resp->RequestID = buf->RequestID;
-	resp->Status = RNDIS_STATUS_SUCCESS;
+	resp->MessageType = __constant_cpu_to_le32 (
+			REMOTE_NDIS_KEEPALIVE_CMPLT);
+	resp->MessageLength = __constant_cpu_to_le32 (16);
+	resp->RequestID = buf->RequestID; /* Still LE in msg buffer */
+	resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
 	
 	if (rndis_per_dev_params [configNr].ack)
 	    rndis_per_dev_params [configNr].ack (
@@ -969,11 +993,12 @@
 	resp = (rndis_indicate_status_msg_type *) r->buf;
 	if (!resp) return -ENOMEM;
 	
-	resp->MessageType = REMOTE_NDIS_INDICATE_STATUS_MSG;
-	resp->MessageLength = 20;
-	resp->Status = status;
-	resp->StatusBufferLength = 0;
-	resp->StatusBufferOffset = 0;
+	resp->MessageType = __constant_cpu_to_le32 (
+			REMOTE_NDIS_INDICATE_STATUS_MSG);
+	resp->MessageLength = __constant_cpu_to_le32 (20);
+	resp->Status = cpu_to_le32 (status);
+	resp->StatusBufferLength = __constant_cpu_to_le32 (0);
+	resp->StatusBufferOffset = __constant_cpu_to_le32 (0);
 	
 	if (rndis_per_dev_params [configNr].ack) 
 	    rndis_per_dev_params [configNr].ack (
@@ -1014,8 +1039,8 @@
 		return -ENOMEM;
 	
 	tmp = (u32 *) buf; 
-	MsgType = *tmp;
-	MsgLength = *(tmp + 1);
+	MsgType   = cpu_to_le32p(tmp++);
+	MsgLength = cpu_to_le32p(tmp++);
 	
 	if (configNr >= RNDIS_MAX_CONFIGS)
 		return -ENOTSUPP;
@@ -1025,14 +1050,14 @@
 	switch (MsgType)
 	{
 	case REMOTE_NDIS_INITIALIZE_MSG:
-		DEBUG(KERN_INFO "%s: REMOTE_NDIS_INITIALIZE_MSG\n", 
+		DEBUG("%s: REMOTE_NDIS_INITIALIZE_MSG\n", 
 			__FUNCTION__ );
 		params->state = RNDIS_INITIALIZED;
 		return  rndis_init_response (configNr,
 					     (rndis_init_msg_type *) buf);
 		
 	case REMOTE_NDIS_HALT_MSG:
-		DEBUG(KERN_INFO "%s: REMOTE_NDIS_HALT_MSG\n",
+		DEBUG("%s: REMOTE_NDIS_HALT_MSG\n",
 			__FUNCTION__ );
 		params->state = RNDIS_UNINITIALIZED;
 		if (params->dev) {
@@ -1042,34 +1067,57 @@
 		return 0;
 		
 	case REMOTE_NDIS_QUERY_MSG:
-		DEBUG(KERN_INFO "%s: REMOTE_NDIS_QUERY_MSG\n", 
-			__FUNCTION__ );
 		return rndis_query_response (configNr, 
 					     (rndis_query_msg_type *) buf);
 		
 	case REMOTE_NDIS_SET_MSG:
-		DEBUG(KERN_INFO "%s: REMOTE_NDIS_SET_MSG\n", 
-			__FUNCTION__ );
 		return rndis_set_response (configNr, 
 					   (rndis_set_msg_type *) buf);
 		
 	case REMOTE_NDIS_RESET_MSG:
-		DEBUG(KERN_INFO "%s: REMOTE_NDIS_RESET_MSG\n", 
+		DEBUG("%s: REMOTE_NDIS_RESET_MSG\n", 
 			__FUNCTION__ );
 		return rndis_reset_response (configNr,
 					     (rndis_reset_msg_type *) buf);
 
 	case REMOTE_NDIS_KEEPALIVE_MSG:
 		/* For USB: host does this every 5 seconds */
-		DEBUG(KERN_INFO "%s: REMOTE_NDIS_KEEPALIVE_MSG\n", 
+#ifdef	VERBOSE
+		DEBUG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n", 
 			__FUNCTION__ );
+#endif
 		return rndis_keepalive_response (configNr,
 						 (rndis_keepalive_msg_type *) 
 						 buf);
 		
 	default: 
-		printk (KERN_ERR "%s: unknown RNDIS Message Type 0x%08X\n", 
-			__FUNCTION__ , MsgType);
+		/* At least Windows XP emits some undefined RNDIS messages.
+		 * In one case those messages seemed to relate to the host
+		 * suspending itself.
+		 */
+		printk (KERN_WARNING
+			"%s: unknown RNDIS message 0x%08X len %d\n", 
+			__FUNCTION__ , MsgType, MsgLength);
+		{
+			unsigned i;
+			for (i = 0; i < MsgLength; i += 16) {
+				DEBUG ("%03d: "
+					" %02x %02x %02x %02x"
+					" %02x %02x %02x %02x"
+					" %02x %02x %02x %02x"
+					" %02x %02x %02x %02x"
+					"\n",
+					i,
+					buf[i], buf [i+1],
+						buf[i+2], buf[i+3],
+					buf[i+4], buf [i+5],
+						buf[i+6], buf[i+7],
+					buf[i+8], buf [i+9],
+						buf[i+10], buf[i+11],
+					buf[i+12], buf [i+13],
+						buf[i+14], buf[i+15]);
+			}
+		}
 		break;
 	}
 	
@@ -1079,13 +1127,12 @@
 int rndis_register (int (* rndis_control_ack) (struct net_device *))
 {
 	u8 i;
-	DEBUG("%s: ", __FUNCTION__ );
 	
 	for (i = 0; i < RNDIS_MAX_CONFIGS; i++) {
 		if (!rndis_per_dev_params [i].used) {
 			rndis_per_dev_params [i].used = 1;
 			rndis_per_dev_params [i].ack = rndis_control_ack;
-			DEBUG("configNr = %d\n", i);
+			DEBUG("%s: configNr = %d\n", __FUNCTION__, i);
 			return i;
 		}
 	}
@@ -1145,10 +1192,10 @@
 	if (!skb) return;
 	skb_push (skb, sizeof (struct rndis_packet_msg_type));
 	memset (skb->data, 0, sizeof (struct rndis_packet_msg_type));
-	*((u32 *) skb->data) = 1;
-	*((u32 *) skb->data + 1) = skb->len;
-	*((u32 *) skb->data + 2) = 36;
-	*((u32 *) skb->data + 3) = skb->len - 44;
+	*((u32 *) skb->data) = __constant_cpu_to_le32 (1);
+	*((u32 *) skb->data + 1) = cpu_to_le32(skb->len);
+	*((u32 *) skb->data + 2) = __constant_cpu_to_le32 (36);
+	*((u32 *) skb->data + 3) = cpu_to_le32(skb->len - 44);
 	
 	return;
 }
@@ -1208,14 +1255,16 @@
 
 int rndis_rm_hdr (u8 *buf, u32 *length)
 {
-	u32 i, messageLen, dataOffset;
+	u32 i, messageLen, dataOffset, *tmp;
 	
+	tmp = (u32 *) buf; 
+
 	if (!buf || !length) return -1;
-	if (*((u32 *) buf) != 1) return -1;
+	if (cpu_to_le32p(tmp++) != 1) return -1;
 	
-	messageLen = *((u32 *) buf + 1);
-	
-	dataOffset = *((u32 *) buf + 2) + 8;
+	messageLen = cpu_to_le32p(tmp++);
+	dataOffset = cpu_to_le32p(tmp++) + 8;
+
 	if (messageLen < dataOffset || messageLen > *length) return -1;
 	
 	for (i = dataOffset; i < messageLen; i++)
--- diff/drivers/usb/gadget/rndis.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/gadget/rndis.h	2004-07-01 21:32:45.000000000 +0100
@@ -59,10 +59,18 @@
 
 #define RNDIS_MEDIUM_802_3		0x00000000U
 
+/* from drivers/net/sk98lin/h/skgepnmi.h */
+#define OID_PNP_CAPABILITIES			0xFD010100
+#define OID_PNP_SET_POWER			0xFD010101
+#define OID_PNP_QUERY_POWER			0xFD010102
+#define OID_PNP_ADD_WAKE_UP_PATTERN		0xFD010103
+#define OID_PNP_REMOVE_WAKE_UP_PATTERN		0xFD010104
+#define OID_PNP_ENABLE_WAKE_UP			0xFD010106
+
+
 /* supported OIDs */
 static const u32 oid_supported_list [] = 
 {
-	/* mandatory general */
 	/* the general stuff */
 	OID_GEN_SUPPORTED_LIST,
 	OID_GEN_HARDWARE_STATUS,
@@ -70,7 +78,6 @@
 	OID_GEN_MEDIA_IN_USE,
 	OID_GEN_MAXIMUM_FRAME_SIZE,
 	OID_GEN_LINK_SPEED,
-	OID_GEN_TRANSMIT_BUFFER_SPACE,
 	OID_GEN_TRANSMIT_BLOCK_SIZE,
 	OID_GEN_RECEIVE_BLOCK_SIZE,
 	OID_GEN_VENDOR_ID,
@@ -78,10 +85,11 @@
 	OID_GEN_VENDOR_DRIVER_VERSION,
 	OID_GEN_CURRENT_PACKET_FILTER,
 	OID_GEN_MAXIMUM_TOTAL_SIZE,
-	OID_GEN_MAC_OPTIONS,
 	OID_GEN_MEDIA_CONNECT_STATUS,
 	OID_GEN_PHYSICAL_MEDIUM,
+#if 0
 	OID_GEN_RNDIS_CONFIG_PARAMETER,
+#endif
 	
 	/* the statistical stuff */
 	OID_GEN_XMIT_OK,
@@ -89,6 +97,7 @@
 	OID_GEN_XMIT_ERROR,
 	OID_GEN_RCV_ERROR,
 	OID_GEN_RCV_NO_BUFFER,
+#ifdef	RNDIS_OPTIONAL_STATS
 	OID_GEN_DIRECTED_BYTES_XMIT,
 	OID_GEN_DIRECTED_FRAMES_XMIT,
 	OID_GEN_MULTICAST_BYTES_XMIT,
@@ -103,6 +112,7 @@
 	OID_GEN_BROADCAST_FRAMES_RCV,
 	OID_GEN_RCV_CRC_ERROR,
 	OID_GEN_TRANSMIT_QUEUE_LENGTH,
+#endif	/* RNDIS_OPTIONAL_STATS */
 
     	/* mandatory 802.3 */
 	/* the general stuff */
@@ -115,7 +125,30 @@
 	/* the statistical stuff */
 	OID_802_3_RCV_ERROR_ALIGNMENT,
 	OID_802_3_XMIT_ONE_COLLISION,
-	OID_802_3_XMIT_MORE_COLLISIONS
+	OID_802_3_XMIT_MORE_COLLISIONS,
+#ifdef	RNDIS_OPTIONAL_STATS
+	OID_802_3_XMIT_DEFERRED,
+	OID_802_3_XMIT_MAX_COLLISIONS,
+	OID_802_3_RCV_OVERRUN,
+	OID_802_3_XMIT_UNDERRUN,
+	OID_802_3_XMIT_HEARTBEAT_FAILURE,
+	OID_802_3_XMIT_TIMES_CRS_LOST,
+	OID_802_3_XMIT_LATE_COLLISIONS,
+#endif	/* RNDIS_OPTIONAL_STATS */
+
+#ifdef	RNDIS_PM
+	/* PM and wakeup are mandatory for USB: */
+
+	/* power management */
+	OID_PNP_CAPABILITIES,
+	OID_PNP_QUERY_POWER,
+	OID_PNP_SET_POWER,
+
+	/* wake up host */
+	OID_PNP_ENABLE_WAKE_UP,
+	OID_PNP_ADD_WAKE_UP_PATTERN,
+	OID_PNP_REMOVE_WAKE_UP_PATTERN,
+#endif
 };
 
 
--- diff/drivers/usb/gadget/serial.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/gadget/serial.c	2004-07-01 21:32:45.000000000 +0100
@@ -1573,6 +1573,8 @@
 	/* respond with data transfer before status phase? */
 	if (ret >= 0) {
 		req->length = ret;
+		req->zero = ret < ctrl->wLength
+				&& (ret % gadget->ep0->maxpacket) == 0;
 		ret = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
 		if (ret < 0) {
 			printk(KERN_ERR
--- diff/drivers/usb/gadget/zero.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/gadget/zero.c	2004-07-01 21:32:45.000000000 +0100
@@ -1037,6 +1037,8 @@
 	/* respond with data transfer before status phase? */
 	if (value >= 0) {
 		req->length = value;
+		req->zero = value < ctrl->wLength
+				&& (value % gadget->ep0->maxpacket) == 0;
 		value = usb_ep_queue (gadget->ep0, req, GFP_ATOMIC);
 		if (value < 0) {
 			DBG (dev, "ep_queue --> %d\n", value);
--- diff/drivers/usb/host/ehci-hcd.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/host/ehci-hcd.c	2004-07-01 21:32:45.000000000 +0100
@@ -290,16 +290,17 @@
 {
 	if (cap & (1 << 16)) {
 		int msec = 500;
+		struct pci_dev *pdev = to_pci_dev(ehci->hcd.self.controller);
 
 		/* request handoff to OS */
-		cap &= 1 << 24;
-		pci_write_config_dword (to_pci_dev(ehci->hcd.self.controller), where, cap);
+		cap |= 1 << 24;
+		pci_write_config_dword(pdev, where, cap);
 
 		/* and wait a while for it to happen */
 		do {
 			msleep(10);
 			msec -= 10;
-			pci_read_config_dword (to_pci_dev(ehci->hcd.self.controller), where, &cap);
+			pci_read_config_dword(pdev, where, &cap);
 		} while ((cap & (1 << 16)) && msec);
 		if (cap & (1 << 16)) {
 			ehci_err (ehci, "BIOS handoff failed (%d, %04x)\n",
@@ -424,7 +425,6 @@
 		ehci_mem_cleanup (ehci);
 		return retval;
 	}
-	writel (INTR_MASK, &ehci->regs->intr_enable);
 	writel (ehci->periodic_dma, &ehci->regs->frame_list);
 
 #ifdef	CONFIG_PCI
@@ -520,7 +520,7 @@
 
 	/* wire up the root hub */
 	bus = hcd_to_bus (hcd);
-	bus->root_hub = udev = usb_alloc_dev (NULL, bus, 0);
+	udev = usb_alloc_dev (NULL, bus, 0);
 	if (!udev) {
 done2:
 		ehci_mem_cleanup (ehci);
@@ -530,7 +530,8 @@
 	/*
 	 * Start, enabling full USB 2.0 functionality ... usb 1.1 devices
 	 * are explicitly handed to companion controller(s), so no TT is
-	 * involved with the root hub.
+	 * involved with the root hub.  (Except where one is integrated,
+	 * and there's no companion controller unless maybe for USB OTG.)
 	 */
 	ehci->reboot_notifier.notifier_call = ehci_reboot;
 	register_reboot_notifier (&ehci->reboot_notifier);
@@ -553,16 +554,17 @@
 	 * and device drivers may start it running.
 	 */
 	udev->speed = USB_SPEED_HIGH;
-	if (hcd_register_root (hcd) != 0) {
+	if (hcd_register_root (udev, hcd) != 0) {
 		if (hcd->state == USB_STATE_RUNNING)
 			ehci_ready (ehci);
 		ehci_reset (ehci);
-		bus->root_hub = 0;
 		usb_put_dev (udev); 
 		retval = -ENODEV;
 		goto done2;
 	}
 
+	writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */
+
 	create_debug_files (ehci);
 
 	return 0;
@@ -573,6 +575,7 @@
 static void ehci_stop (struct usb_hcd *hcd)
 {
 	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
+	u8			rh_ports, port;
 
 	ehci_dbg (ehci, "stop\n");
 
@@ -584,7 +587,16 @@
 		return;
 	}
 	del_timer_sync (&ehci->watchdog);
+
+	/* Turn off port power on all root hub ports. */
+	rh_ports = HCS_N_PORTS (ehci->hcs_params);
+	for (port = 1; port <= rh_ports; port++) {
+		ehci_hub_control(hcd, ClearPortFeature, USB_PORT_FEAT_POWER,
+			port, NULL, 0);
+	}
+
 	ehci_reset (ehci);
+	writel (0, &ehci->regs->intr_enable);
 
 	/* let companion controllers work when we aren't */
 	writel (0, &ehci->regs->configured_flag);
@@ -704,12 +716,6 @@
 
 	status = readl (&ehci->regs->status);
 
-	/* shared irq */
-	if (status == 0) {
-		spin_unlock (&ehci->lock);
-		return IRQ_NONE;
-	}
-
 	/* e.g. cardbus physical eject */
 	if (status == ~(u32) 0) {
 		ehci_dbg (ehci, "device removed\n");
@@ -717,8 +723,10 @@
 	}
 
 	status &= INTR_MASK;
-	if (!status)			/* irq sharing? */
-		goto done;
+	if (!status) {			/* irq sharing? */
+		spin_unlock(&ehci->lock);
+		return IRQ_NONE;
+	}
 
 	/* clear (just) interrupts */
 	writel (status, &ehci->regs->status);
@@ -789,7 +797,6 @@
 
 	if (bh)
 		ehci_work (ehci, regs);
-done:
 	spin_unlock (&ehci->lock);
 	return IRQ_HANDLED;
 }
--- diff/drivers/usb/host/ehci-sched.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/host/ehci-sched.c	2004-07-01 21:32:45.000000000 +0100
@@ -483,7 +483,7 @@
 		qh->start = frame;
 
 		/* reset S-frame and (maybe) C-frame masks */
-		qh->hw_info2 &= ~0xffff;
+		qh->hw_info2 &= ~__constant_cpu_to_le32(0xffff);
 		qh->hw_info2 |= cpu_to_le32 (1 << uframe) | c_mask;
 	} else
 		dbg ("reused previous qh %p schedule", qh);
--- diff/drivers/usb/host/hc_sl811_rh.c	2004-05-19 22:12:17.000000000 +0100
+++ source/drivers/usb/host/hc_sl811_rh.c	2004-07-01 21:32:45.000000000 +0100
@@ -557,18 +557,24 @@
 static int rh_connect_rh (hci_t * hci)
 {
 	struct usb_device *usb_dev;
+	int retval;
 
 	hci->rh.devnum = 0;
 	usb_dev = usb_alloc_dev (NULL, hci->bus, 0);
 	if (!usb_dev)
 		return -ENOMEM;
 
-	hci->bus->root_hub = usb_dev;
 	usb_dev->devnum = 1;
 	usb_dev->bus->devnum_next = usb_dev->devnum + 1;
 	set_bit (usb_dev->devnum, usb_dev->bus->devmap.devicemap);
 
-	if (usb_new_device (usb_dev) != 0) {
+	down (&usb_bus_list_lock);
+	hci->bus->root_hub = usb_dev;
+	retval = usb_new_device (usb_dev);
+	if (retval != 0)
+		hci->bus->root_hub = NULL;
+	up (&usb_bus_list_lock);
+	if (retval != 0) {
 		usb_put_dev (usb_dev);
 		return -ENODEV;
 	}
--- diff/drivers/usb/host/ohci-dbg.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/host/ohci-dbg.c	2004-07-01 21:32:45.000000000 +0100
@@ -134,13 +134,13 @@
 	struct ohci_regs	*regs = controller->regs;
 	u32			temp;
 
-	temp = readl (&regs->revision) & 0xff;
+	temp = ohci_readl (&regs->revision) & 0xff;
 	ohci_dbg_sw (controller, next, size,
 		"OHCI %d.%d, %s legacy support registers\n",
 		0x03 & (temp >> 4), (temp & 0x0f),
 		(temp & 0x10) ? "with" : "NO");
 
-	temp = readl (&regs->control);
+	temp = ohci_readl (&regs->control);
 	ohci_dbg_sw (controller, next, size,
 		"control 0x%03x%s%s%s HCFS=%s%s%s%s%s CBSR=%d\n",
 		temp,
@@ -155,7 +155,7 @@
 		temp & OHCI_CTRL_CBSR
 		);
 
-	temp = readl (&regs->cmdstatus);
+	temp = ohci_readl (&regs->cmdstatus);
 	ohci_dbg_sw (controller, next, size,
 		"cmdstatus 0x%05x SOC=%d%s%s%s%s\n", temp,
 		(temp & OHCI_SOC) >> 16,
@@ -166,26 +166,26 @@
 		);
 
 	ohci_dump_intr_mask (controller, "intrstatus",
-			readl (&regs->intrstatus), next, size);
+			ohci_readl (&regs->intrstatus), next, size);
 	ohci_dump_intr_mask (controller, "intrenable",
-			readl (&regs->intrenable), next, size);
+			ohci_readl (&regs->intrenable), next, size);
 	// intrdisable always same as intrenable
 
 	maybe_print_eds (controller, "ed_periodcurrent",
-			readl (&regs->ed_periodcurrent), next, size);
+			ohci_readl (&regs->ed_periodcurrent), next, size);
 
 	maybe_print_eds (controller, "ed_controlhead",
-			readl (&regs->ed_controlhead), next, size);
+			ohci_readl (&regs->ed_controlhead), next, size);
 	maybe_print_eds (controller, "ed_controlcurrent",
-			readl (&regs->ed_controlcurrent), next, size);
+			ohci_readl (&regs->ed_controlcurrent), next, size);
 
 	maybe_print_eds (controller, "ed_bulkhead",
-			readl (&regs->ed_bulkhead), next, size);
+			ohci_readl (&regs->ed_bulkhead), next, size);
 	maybe_print_eds (controller, "ed_bulkcurrent",
-			readl (&regs->ed_bulkcurrent), next, size);
+			ohci_readl (&regs->ed_bulkcurrent), next, size);
 
 	maybe_print_eds (controller, "donehead",
-			readl (&regs->donehead), next, size);
+			ohci_readl (&regs->donehead), next, size);
 }
 
 #define dbg_port_sw(hc,num,value,next,size) \
@@ -637,7 +637,7 @@
 			"hcca frame 0x%04x\n", OHCI_FRAME_NO(ohci->hcca));
 
 	/* other registers mostly affect frame timings */
-	rdata = readl (&regs->fminterval);
+	rdata = ohci_readl (&regs->fminterval);
 	temp = scnprintf (next, size,
 			"fmintvl 0x%08x %sFSMPS=0x%04x FI=0x%04x\n",
 			rdata, (rdata >> 31) ? " FIT" : "",
@@ -645,20 +645,20 @@
 	size -= temp;
 	next += temp;
 
-	rdata = readl (&regs->fmremaining);
+	rdata = ohci_readl (&regs->fmremaining);
 	temp = scnprintf (next, size, "fmremaining 0x%08x %sFR=0x%04x\n",
 			rdata, (rdata >> 31) ? " FRT" : "",
 			rdata & 0x3fff);
 	size -= temp;
 	next += temp;
 
-	rdata = readl (&regs->periodicstart);
+	rdata = ohci_readl (&regs->periodicstart);
 	temp = scnprintf (next, size, "periodicstart 0x%04x\n",
 			rdata & 0x3fff);
 	size -= temp;
 	next += temp;
 
-	rdata = readl (&regs->lsthresh);
+	rdata = ohci_readl (&regs->lsthresh);
 	temp = scnprintf (next, size, "lsthresh 0x%04x\n",
 			rdata & 0x3fff);
 	size -= temp;
--- diff/drivers/usb/host/ohci-hcd.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/host/ohci-hcd.c	2004-07-01 21:32:45.000000000 +0100
@@ -17,6 +17,7 @@
  *
  * History:
  * 
+ * 2004/03/24 LH7A404 support (Durgesh Pattamatta & Marc Singer)
  * 2004/02/04 use generic dma_* functions instead of pci_* (dsaxena@plexity.net)
  * 2003/02/24 show registers in sysfs (Kevin Brosius)
  *
@@ -393,7 +394,7 @@
 
 	/* boot firmware should have set this up (5.1.1.3.1) */
 	if (!ohci->fminterval) {
-		temp = readl (&ohci->regs->fminterval);
+		temp = ohci_readl (&ohci->regs->fminterval);
 		if (temp & 0x3fff0000)
 			ohci->fminterval = temp;
 		else
@@ -405,7 +406,7 @@
 	 * On PA-RISC, PDC can leave IR set incorrectly; ignore it there.
 	 */
 #ifndef __hppa__
-	if (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
+	if (ohci_readl (&ohci->regs->control) & OHCI_CTRL_IR) {
 		ohci_dbg (ohci, "USB HC TakeOver from BIOS/SMM\n");
 
 		/* this timeout is arbitrary.  we make it long, so systems
@@ -416,7 +417,7 @@
 
 		writel (OHCI_INTR_OC, &ohci->regs->intrenable);
 		writel (OHCI_OCR, &ohci->regs->cmdstatus);
-		while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
+		while (ohci_readl (&ohci->regs->control) & OHCI_CTRL_IR) {
 			msleep (10);
 			if (--temp == 0) {
 				ohci_err (ohci, "USB HC TakeOver failed!\n");
@@ -430,13 +431,13 @@
 	writel (OHCI_INTR_MIE, &ohci->regs->intrdisable);
 
 	ohci_dbg (ohci, "reset, control = 0x%x\n",
-		readl (&ohci->regs->control));
+		  ohci_readl (&ohci->regs->control));
 
   	/* Reset USB (needed by some controllers); RemoteWakeupConnected
 	 * saved if boot firmware (BIOS/SMM/...) told us it's connected
 	 * (for OHCI integrated on mainboard, it normally is)
 	 */
-	ohci->hc_control = readl (&ohci->regs->control);
+	ohci->hc_control = ohci_readl (&ohci->regs->control);
 	ohci->hc_control &= OHCI_CTRL_RWC;	/* hcfs 0 = RESET */
 	if (ohci->hc_control)
 		ohci->hcd.can_wakeup = 1;
@@ -450,13 +451,13 @@
 				&ohci->regs->roothub.portstatus [temp]);
 	}
 	// flush those pci writes
-	(void) readl (&ohci->regs->control);
+	(void) ohci_readl (&ohci->regs->control);
 	msleep (50);
 
 	/* HC Reset requires max 10 us delay */
 	writel (OHCI_HCR,  &ohci->regs->cmdstatus);
 	temp = 30;	/* ... allow extra time */
-	while ((readl (&ohci->regs->cmdstatus) & OHCI_HCR) != 0) {
+	while ((ohci_readl (&ohci->regs->cmdstatus) & OHCI_HCR) != 0) {
 		if (--temp == 0) {
 			ohci_err (ohci, "USB HC reset timed out!\n");
 			return -1;
@@ -473,7 +474,7 @@
 	 */
 	writel (ohci->hc_control, &ohci->regs->control);
 	// flush those pci writes
-	(void) readl (&ohci->regs->control);
+	(void) ohci_readl (&ohci->regs->control);
 
 	return 0;
 }
@@ -505,8 +506,8 @@
 	/* some OHCI implementations are finicky about how they init.
 	 * bogus values here mean not even enumeration could work.
 	 */
-	if ((readl (&ohci->regs->fminterval) & 0x3fff0000) == 0
-			|| !readl (&ohci->regs->periodicstart)) {
+	if ((ohci_readl (&ohci->regs->fminterval) & 0x3fff0000) == 0
+			|| !ohci_readl (&ohci->regs->periodicstart)) {
 		ohci_err (ohci, "init err\n");
 		return -EOVERFLOW;
 	}
@@ -548,7 +549,7 @@
 	writel (RH_HS_LPSC, &ohci->regs->roothub.status);
 	writel (power_switching ? RH_B_PPCM : 0, &ohci->regs->roothub.b);
 	// flush those pci writes
-	(void) readl (&ohci->regs->control);
+	(void) ohci_readl (&ohci->regs->control);
 
 	// POTPGT delay is bits 24-31, in 2 ms units.
 	mdelay ((roothub_a (ohci) >> 23) & 0x1fe);
@@ -560,7 +561,7 @@
 	}
  
 	/* connect the virtual root hub */
-	bus->root_hub = udev = usb_alloc_dev (NULL, bus, 0);
+	udev = usb_alloc_dev (NULL, bus, 0);
 	ohci->hcd.state = USB_STATE_RUNNING;
 	if (!udev) {
 		disable (ohci);
@@ -570,9 +571,8 @@
 	}
 
 	udev->speed = USB_SPEED_FULL;
-	if (hcd_register_root (&ohci->hcd) != 0) {
+	if (hcd_register_root (udev, &ohci->hcd) != 0) {
 		usb_put_dev (udev);
-		bus->root_hub = NULL;
 		disable (ohci);
 		ohci->hc_control &= ~OHCI_CTRL_HCFS;
 		writel (ohci->hc_control, &ohci->regs->control);
@@ -592,19 +592,20 @@
 	struct ohci_regs	*regs = ohci->regs;
  	int			ints; 
 
-	/* we can eliminate a (slow) readl() if _only_ WDH caused this irq */
+	/* we can eliminate a (slow) ohci_readl()
+	   if _only_ WDH caused this irq */
 	if ((ohci->hcca->done_head != 0)
 			&& ! (le32_to_cpup (&ohci->hcca->done_head) & 0x01)) {
 		ints =  OHCI_INTR_WDH;
 
 	/* cardbus/... hardware gone before remove() */
-	} else if ((ints = readl (&regs->intrstatus)) == ~(u32)0) {
+	} else if ((ints = ohci_readl (&regs->intrstatus)) == ~(u32)0) {
 		disable (ohci);
 		ohci_dbg (ohci, "device removed!\n");
 		return IRQ_HANDLED;
 
 	/* interrupt for some other device? */
-	} else if ((ints &= readl (&regs->intrenable)) == 0) {
+	} else if ((ints &= ohci_readl (&regs->intrenable)) == 0) {
 		return IRQ_NONE;
 	} 
 
@@ -650,7 +651,7 @@
 		writel (ints, &regs->intrstatus);
 		writel (OHCI_INTR_MIE, &regs->intrenable);	
 		// flush those pci writes
-		(void) readl (&ohci->regs->control);
+		(void) ohci_readl (&ohci->regs->control);
 	}
 
 	return IRQ_HANDLED;
@@ -798,6 +799,14 @@
 #include "ohci-omap.c"
 #endif
 
-#if !(defined(CONFIG_PCI) || defined(CONFIG_SA1111) || defined(CONFIG_ARCH_OMAP))
+#ifdef CONFIG_ARCH_LH7A404
+#include "ohci-lh7a404.c"
+#endif
+
+#if !(defined(CONFIG_PCI) \
+      || defined(CONFIG_SA1111) \
+      || defined(CONFIG_ARCH_OMAP) \
+      || defined (CONFIG_ARCH_LH7A404) \
+	)
 #error "missing bus glue for ohci-hcd"
 #endif
--- diff/drivers/usb/host/ohci-hub.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/host/ohci-hub.c	2004-07-01 21:32:45.000000000 +0100
@@ -20,20 +20,20 @@
  * till some bits (mostly reserved) are clear; ok for all revs.
  */
 #define read_roothub(hc, register, mask) ({ \
-	u32 temp = readl (&hc->regs->roothub.register); \
+	u32 temp = ohci_readl (&hc->regs->roothub.register); \
 	if (temp == -1) \
 		disable (hc); \
 	else if (hc->flags & OHCI_QUIRK_AMD756) \
 		while (temp & mask) \
-			temp = readl (&hc->regs->roothub.register); \
+			temp = ohci_readl (&hc->regs->roothub.register); \
 	temp; })
 
 static u32 roothub_a (struct ohci_hcd *hc)
 	{ return read_roothub (hc, a, 0xfc0fe000); }
 static inline u32 roothub_b (struct ohci_hcd *hc)
-	{ return readl (&hc->regs->roothub.b); }
+	{ return ohci_readl (&hc->regs->roothub.b); }
 static inline u32 roothub_status (struct ohci_hcd *hc)
-	{ return readl (&hc->regs->roothub.status); }
+	{ return ohci_readl (&hc->regs->roothub.status); }
 static u32 roothub_portstatus (struct ohci_hcd *hc, int i)
 	{ return read_roothub (hc, portstatus [i], 0xffe0fce0); }
 
@@ -83,14 +83,14 @@
 
 	spin_lock_irq (&ohci->lock);
 
-	ohci->hc_control = readl (&ohci->regs->control);
+	ohci->hc_control = ohci_readl (&ohci->regs->control);
 	switch (ohci->hc_control & OHCI_CTRL_HCFS) {
 	case OHCI_USB_RESUME:
 		ohci_dbg (ohci, "resume/suspend?\n");
 		ohci->hc_control &= ~OHCI_CTRL_HCFS;
 		ohci->hc_control |= OHCI_USB_RESET;
 		writel (ohci->hc_control, &ohci->regs->control);
-		(void) readl (&ohci->regs->control);
+		(void) ohci_readl (&ohci->regs->control);
 		/* FALL THROUGH */
 	case OHCI_USB_RESET:
 		status = -EBUSY;
@@ -109,7 +109,7 @@
 
 		ohci->hc_control &= ~OHCI_SCHED_ENABLES;
 		writel (ohci->hc_control, &ohci->regs->control);
-		ohci->hc_control = readl (&ohci->regs->control);
+		ohci->hc_control = ohci_readl (&ohci->regs->control);
 		writel (OHCI_INTR_SF, &ohci->regs->intrstatus);
 
 		/* sched disables take effect on the next frame,
@@ -120,7 +120,7 @@
 		while (limit > 0) {
 			udelay (250);
 			limit =- 250;
-			if (readl (&ohci->regs->intrstatus) & OHCI_INTR_SF)
+			if (ohci_readl (&ohci->regs->intrstatus) & OHCI_INTR_SF)
 				break;
 		}
 		dl_done_list (ohci, 0);
@@ -128,7 +128,7 @@
 	}
 	dl_done_list (ohci, 0);
 	finish_unlinks (ohci, OHCI_FRAME_NO(ohci->hcca), 0);
-	writel (readl (&ohci->regs->intrstatus), &ohci->regs->intrstatus);
+	writel (ohci_readl (&ohci->regs->intrstatus), &ohci->regs->intrstatus);
 
 	/* maybe resume can wake root hub */
 	if (ohci->hcd.remote_wakeup)
@@ -140,7 +140,7 @@
 	ohci->hc_control &= ~OHCI_CTRL_HCFS;
 	ohci->hc_control |= OHCI_USB_SUSPEND;
 	writel (ohci->hc_control, &ohci->regs->control);
-	(void) readl (&ohci->regs->control);
+	(void) ohci_readl (&ohci->regs->control);
 
 	/* no resumes until devices finish suspending */
 	ohci->next_statechange = jiffies + msecs_to_jiffies (5);
@@ -179,13 +179,13 @@
 		return -EAGAIN;
 
 	spin_lock_irq (&ohci->lock);
-	ohci->hc_control = readl (&ohci->regs->control);
+	ohci->hc_control = ohci_readl (&ohci->regs->control);
 	switch (ohci->hc_control & OHCI_CTRL_HCFS) {
 	case OHCI_USB_SUSPEND:
 		ohci->hc_control &= ~(OHCI_CTRL_HCFS|OHCI_SCHED_ENABLES);
 		ohci->hc_control |= OHCI_USB_RESUME;
 		writel (ohci->hc_control, &ohci->regs->control);
-		(void) readl (&ohci->regs->control);
+		(void) ohci_readl (&ohci->regs->control);
 		ohci_dbg (ohci, "resume root hub\n");
 		break;
 	case OHCI_USB_RESUME:
@@ -210,7 +210,7 @@
 	temp = roothub_a (ohci) & RH_A_NDP;
 	enables = 0;
 	while (temp--) {
-		u32 stat = readl (&ohci->regs->roothub.portstatus [temp]);
+		u32 stat = ohci_readl (&ohci->regs->roothub.portstatus [temp]);
 
 		/* force global, not selective, resume */
 		if (!(stat & RH_PS_PSS))
@@ -222,7 +222,7 @@
 	ohci->hcd.state = USB_STATE_RESUMING;
 	mdelay (20 /* usb 11.5.1.10 */ + 15);
 
-	temp = readl (&ohci->regs->control);
+	temp = ohci_readl (&ohci->regs->control);
 	temp &= OHCI_CTRL_HCFS;
 	if (temp != OHCI_USB_RESUME) {
 		ohci_err (ohci, "controller won't resume\n");
@@ -243,11 +243,11 @@
 	writel (OHCI_INTR_INIT, &ohci->regs->intrenable);
 	if (ohci->ed_rm_list)
 		writel (OHCI_INTR_SF, &ohci->regs->intrenable);
-	writel (readl (&ohci->regs->intrstatus), &ohci->regs->intrstatus);
+	writel (ohci_readl (&ohci->regs->intrstatus), &ohci->regs->intrstatus);
 
 	/* Then re-enable operations */
 	writel (OHCI_USB_OPER, &ohci->regs->control);
-	(void) readl (&ohci->regs->control);
+	(void) ohci_readl (&ohci->regs->control);
 	msleep (3);
 
 	temp = OHCI_CONTROL_INIT | OHCI_USB_OPER;
@@ -255,7 +255,7 @@
 		temp |= OHCI_CTRL_RWC;
 	ohci->hc_control = temp;
 	writel (temp, &ohci->regs->control);
-	(void) readl (&ohci->regs->control);
+	(void) ohci_readl (&ohci->regs->control);
 
 	/* TRSMRCY */
 	msleep (10);
@@ -290,7 +290,7 @@
 		writel (ohci->hc_control, &ohci->regs->control);
 		if (temp)
 			writel (status, &ohci->regs->cmdstatus);
-		(void) readl (&ohci->regs->control);
+		(void) ohci_readl (&ohci->regs->control);
 	}
 
 	ohci->hcd.state = USB_STATE_RUNNING;
@@ -332,7 +332,7 @@
 		if (!HCD_IS_RUNNING(ohci->hcd.state))
 			return -ESHUTDOWN;
 		ohci_err (ohci, "bogus NDP=%d, rereads as NDP=%d\n",
-			ports, readl (&ohci->regs->roothub.a) & RH_A_NDP);
+			ports, ohci_readl (&ohci->regs->roothub.a) & RH_A_NDP);
 		/* retry later; "should not happen" */
 		return 0;
 	}
@@ -496,7 +496,7 @@
 			goto error;
 		}
 		writel (temp, &ohci->regs->roothub.portstatus [wIndex]);
-		// readl (&ohci->regs->roothub.portstatus [wIndex]);
+		// ohci_readl (&ohci->regs->roothub.portstatus [wIndex]);
 		break;
 	case GetHubDescriptor:
 		ohci_hub_descriptor (ohci, (struct usb_hub_descriptor *) buf);
@@ -541,7 +541,7 @@
 				&ohci->regs->roothub.portstatus [wIndex]);
 			break;
 		case USB_PORT_FEAT_RESET:
-			temp = readl (&ohci->regs->roothub.portstatus [wIndex]);
+			temp = ohci_readl (&ohci->regs->roothub.portstatus [wIndex]);
 			if (temp & RH_PS_CCS)
 				writel (RH_PS_PRS,
 				    &ohci->regs->roothub.portstatus [wIndex]);
--- diff/drivers/usb/host/ohci-omap.c	2004-05-19 22:12:17.000000000 +0100
+++ source/drivers/usb/host/ohci-omap.c	2004-07-01 21:32:45.000000000 +0100
@@ -454,7 +454,6 @@
  */
 void usb_hcd_omap_remove (struct usb_hcd *hcd, struct omap_dev *dev)
 {
-	struct usb_device	*hub;
 	void *base;
 
 	info ("remove: %s, state %x", hcd->self.bus_name, hcd->state);
@@ -462,11 +461,10 @@
 	if (in_interrupt ())
 		BUG ();
 
-	hub = hcd->self.root_hub;
 	hcd->state = USB_STATE_QUIESCING;
 
 	dbg ("%s: roothub graceful disconnect", hcd->self.bus_name);
-	usb_disconnect (&hub);
+	usb_disconnect (&hcd->self.root_hub);
 
 	hcd->driver->stop (hcd);
 	hcd_buffer_destroy (hcd);
--- diff/drivers/usb/host/ohci-q.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/host/ohci-q.c	2004-07-01 21:32:45.000000000 +0100
@@ -321,7 +321,7 @@
 			if (!ed->hwNextED) {
 				ohci->hc_control &= ~OHCI_CTRL_CLE;
 				writel (ohci->hc_control, &ohci->regs->control);
-				// a readl() later syncs CLE with the HC
+				// a ohci_readl() later syncs CLE with the HC
 			} else
 				writel (le32_to_cpup (&ed->hwNextED),
 					&ohci->regs->ed_controlhead);
@@ -345,7 +345,7 @@
 			if (!ed->hwNextED) {
 				ohci->hc_control &= ~OHCI_CTRL_BLE;
 				writel (ohci->hc_control, &ohci->regs->control);
-				// a readl() later syncs BLE with the HC
+				// a ohci_readl() later syncs BLE with the HC
 			} else
 				writel (le32_to_cpup (&ed->hwNextED),
 					&ohci->regs->ed_bulkhead);
@@ -481,7 +481,7 @@
 	writel (OHCI_INTR_SF, &ohci->regs->intrstatus);
 	writel (OHCI_INTR_SF, &ohci->regs->intrenable);
 	// flush those writes, and get latest HCCA contents
-	(void) readl (&ohci->regs->control);
+	(void) ohci_readl (&ohci->regs->control);
 
 	/* SF interrupt might get delayed; record the frame counter value that
 	 * indicates when the HC isn't looking at it, so concurrent unlinks
--- diff/drivers/usb/host/ohci-sa1111.c	2004-05-19 22:12:17.000000000 +0100
+++ source/drivers/usb/host/ohci-sa1111.c	2004-07-01 21:32:45.000000000 +0100
@@ -237,7 +237,6 @@
  */
 void usb_hcd_sa1111_remove (struct usb_hcd *hcd, struct sa1111_dev *dev)
 {
-	struct usb_device	*hub;
 	void *base;
 
 	info ("remove: %s, state %x", hcd->self.bus_name, hcd->state);
@@ -245,11 +244,10 @@
 	if (in_interrupt ())
 		BUG ();
 
-	hub = hcd->self.root_hub;
 	hcd->state = USB_STATE_QUIESCING;
 
 	dbg ("%s: roothub graceful disconnect", hcd->self.bus_name);
-	usb_disconnect (&hub);
+	usb_disconnect (&hcd->self.root_hub);
 
 	hcd->driver->stop (hcd);
 	hcd->state = USB_STATE_HALT;
--- diff/drivers/usb/host/ohci.h	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/host/ohci.h	2004-07-01 21:32:45.000000000 +0100
@@ -429,3 +429,22 @@
 #	define ohci_vdbg(ohci, fmt, args...) do { } while (0)
 #endif
 
+#ifdef CONFIG_ARCH_LH7A404
+	/* Marc Singer: at the time this code was written, the LH7A404
+	 * had a problem reading the USB host registers.  This
+	 * implementation of the ohci_readl function performs the read
+	 * twice as a work-around.
+	 */
+static inline unsigned int ohci_readl (void* regs)
+{
+	*(volatile unsigned int*) regs;
+	return *(volatile unsigned int*) regs;
+}
+#else
+	/* Standard version of ohci_readl uses standard, platform
+	 * specific implementation. */
+static inline unsigned int ohci_readl (void* regs)
+{
+	return readl (regs);
+}
+#endif
--- diff/drivers/usb/host/uhci-debug.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/host/uhci-debug.c	2004-07-01 21:32:45.000000000 +0100
@@ -248,7 +248,7 @@
 static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len)
 {
 	char *out = buf;
-	unsigned int io_addr = uhci->io_addr;
+	unsigned long io_addr = uhci->io_addr;
 	unsigned short usbcmd, usbstat, usbint, usbfrnum;
 	unsigned int flbaseadd;
 	unsigned char sof;
--- diff/drivers/usb/host/uhci-hcd.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/host/uhci-hcd.c	2004-07-01 21:32:46.000000000 +0100
@@ -103,8 +103,8 @@
 static void hc_state_transitions(struct uhci_hcd *uhci);
 
 /* If a transfer is still active after this much time, turn off FSBR */
-#define IDLE_TIMEOUT	(HZ / 20)	/* 50 ms */
-#define FSBR_DELAY	(HZ / 20)	/* 50 ms */
+#define IDLE_TIMEOUT	msecs_to_jiffies(50)
+#define FSBR_DELAY	msecs_to_jiffies(50)
 
 /* When we timeout an idle transfer for FSBR, we'll switch it over to */
 /* depth first traversal. We'll do it in groups of this number of TD's */
@@ -1611,6 +1611,7 @@
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 	struct list_head list, *tmp, *head;
 	unsigned long flags;
+	int called_uhci_finish_completion = 0;
 
 	INIT_LIST_HEAD(&list);
 
@@ -1619,6 +1620,7 @@
 	    uhci_get_current_frame_number(uhci) != uhci->urb_remove_age) {
 		uhci_remove_pending_urbps(uhci);
 		uhci_finish_completion(hcd, NULL);
+		called_uhci_finish_completion = 1;
 	}
 
 	head = &uhci->urb_list;
@@ -1646,6 +1648,10 @@
 	}
 	spin_unlock_irqrestore(&uhci->schedule_lock, flags);
 
+	/* Wake up anyone waiting for an URB to complete */
+	if (called_uhci_finish_completion)
+		wake_up_all(&uhci->waitqh);
+
 	head = &list;
 	tmp = head->next;
 	while (tmp != head) {
@@ -1676,7 +1682,7 @@
 	init_timer(&uhci->stall_timer);
 	uhci->stall_timer.function = stall_callback;
 	uhci->stall_timer.data = (unsigned long)hcd;
-	uhci->stall_timer.expires = jiffies + (HZ / 10);
+	uhci->stall_timer.expires = jiffies + msecs_to_jiffies(100);
 	add_timer(&uhci->stall_timer);
 
 	return 0;
@@ -1756,7 +1762,7 @@
 static irqreturn_t uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs)
 {
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
-	unsigned int io_addr = uhci->io_addr;
+	unsigned long io_addr = uhci->io_addr;
 	unsigned short status;
 	struct list_head *tmp, *head;
 	unsigned int age;
@@ -1829,24 +1835,28 @@
 
 static void reset_hc(struct uhci_hcd *uhci)
 {
-	unsigned int io_addr = uhci->io_addr;
+	unsigned long io_addr = uhci->io_addr;
+
+	/* Turn off PIRQ, SMI, and all interrupts.  This also turns off
+	 * the BIOS's USB Legacy Support.
+	 */
+	pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
+	outw(0, uhci->io_addr + USBINTR);
 
 	/* Global reset for 50ms */
 	uhci->state = UHCI_RESET;
 	outw(USBCMD_GRESET, io_addr + USBCMD);
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout((HZ*50+999) / 1000);
+	msleep(50);
 	outw(0, io_addr + USBCMD);
 
 	/* Another 10ms delay */
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout((HZ*10+999) / 1000);
+	msleep(10);
 	uhci->resume_detect = 0;
 }
 
 static void suspend_hc(struct uhci_hcd *uhci)
 {
-	unsigned int io_addr = uhci->io_addr;
+	unsigned long io_addr = uhci->io_addr;
 
 	dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
 	uhci->state = UHCI_SUSPENDED;
@@ -1856,7 +1866,7 @@
 
 static void wakeup_hc(struct uhci_hcd *uhci)
 {
-	unsigned int io_addr = uhci->io_addr;
+	unsigned long io_addr = uhci->io_addr;
 
 	switch (uhci->state) {
 		case UHCI_SUSPENDED:		/* Start the resume */
@@ -1865,7 +1875,7 @@
 			/* Global resume for >= 20ms */
 			outw(USBCMD_FGR | USBCMD_EGSM, io_addr + USBCMD);
 			uhci->state = UHCI_RESUMING_1;
-			uhci->state_end = jiffies + (20*HZ+999) / 1000;
+			uhci->state_end = jiffies + msecs_to_jiffies(20);
 			break;
 
 		case UHCI_RESUMING_1:		/* End global resume */
@@ -1896,7 +1906,7 @@
 
 static int ports_active(struct uhci_hcd *uhci)
 {
-	unsigned int io_addr = uhci->io_addr;
+	unsigned long io_addr = uhci->io_addr;
 	int connection = 0;
 	int i;
 
@@ -1908,7 +1918,7 @@
 
 static int suspend_allowed(struct uhci_hcd *uhci)
 {
-	unsigned int io_addr = uhci->io_addr;
+	unsigned long io_addr = uhci->io_addr;
 	int i;
 
 	if (to_pci_dev(uhci_dev(uhci))->vendor != PCI_VENDOR_ID_INTEL)
@@ -1973,7 +1983,7 @@
 
 static void start_hc(struct uhci_hcd *uhci)
 {
-	unsigned int io_addr = uhci->io_addr;
+	unsigned long io_addr = uhci->io_addr;
 	int timeout = 1000;
 
 	/*
@@ -1990,7 +2000,9 @@
 		}
 	}
 
-	/* Turn on all interrupts */
+	/* Turn on PIRQ and all interrupts */
+	pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
+			USBLEGSUP_DEFAULT);
 	outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC | USBINTR_SP,
 		io_addr + USBINTR);
 
@@ -2054,15 +2066,10 @@
 
 	uhci->io_addr = (unsigned long) hcd->regs;
 
-	/* Turn off all interrupts */
-	outw(0, uhci->io_addr + USBINTR);
-
-	/* Maybe kick BIOS off this hardware.  Then reset, so we won't get
+	/* Kick BIOS off this hardware and reset, so we won't get
 	 * interrupts from any previous setup.
 	 */
 	reset_hc(uhci);
-	pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
-			USBLEGSUP_DEFAULT);
 	return 0;
 }
 
@@ -2178,7 +2185,7 @@
 
 	uhci->rh_numports = port;
 
-	hcd->self.root_hub = udev = usb_alloc_dev(NULL, &hcd->self, 0);
+	udev = usb_alloc_dev(NULL, &hcd->self, 0);
 	if (!udev) {
 		dev_err(uhci_dev(uhci), "unable to allocate root hub\n");
 		goto err_alloc_root_hub;
@@ -2254,13 +2261,18 @@
 		uhci->fl->frame[i] = cpu_to_le32(uhci->skelqh[irq]->dma_handle);
 	}
 
+	/*
+	 * Some architectures require a full mb() to enforce completion of
+	 * the memory writes above before the I/O transfers in start_hc().
+	 */
+	mb();
 	start_hc(uhci);
 
 	init_stall_timer(hcd);
 
 	udev->speed = USB_SPEED_FULL;
 
-	if (usb_register_root_hub(udev, uhci_dev(uhci)) != 0) {
+	if (hcd_register_root(udev, &uhci->hcd) != 0) {
 		dev_err(uhci_dev(uhci), "unable to start root hub\n");
 		retval = -ENOMEM;
 		goto err_start_root_hub;
@@ -2288,7 +2300,6 @@
 
 err_alloc_term_td:
 	usb_put_dev(udev);
-	hcd->self.root_hub = NULL;
 
 err_alloc_root_hub:
 	dma_pool_destroy(uhci->qh_pool);
@@ -2369,14 +2380,18 @@
 		/*
 		 * Some systems don't maintain the UHCI register values
 		 * during a PM suspend/resume cycle, so reinitialize
-		 * the Frame Number, the Framelist Base Address, and the
-		 * Interrupt Enable registers.
+		 * the Frame Number, Framelist Base Address, Interrupt
+		 * Enable, and Legacy Support registers.
 		 */
+		pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
+				0);
 		outw(uhci->saved_framenumber, uhci->io_addr + USBFRNUM);
 		outl(uhci->fl->dma_handle, uhci->io_addr + USBFLBASEADD);
 		outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC |
 				USBINTR_SP, uhci->io_addr + USBINTR);
 		uhci->resume_detect = 1;
+		pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
+				USBLEGSUP_DEFAULT);
 	} else {
 		reset_hc(uhci);
 		start_hc(uhci);
--- diff/drivers/usb/host/uhci-hub.c	2004-05-19 22:12:17.000000000 +0100
+++ source/drivers/usb/host/uhci-hub.c	2004-07-01 21:32:46.000000000 +0100
@@ -36,7 +36,7 @@
 static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
 {
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
-	unsigned int io_addr = uhci->io_addr;
+	unsigned long io_addr = uhci->io_addr;
 	int i;
 
 	*buf = 0;
@@ -69,7 +69,7 @@
 {
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 	int status, retval = 0, len = 0;
-	unsigned int port_addr = uhci->io_addr + USBPORTSC1 + 2 * (wIndex-1);
+	unsigned long port_addr = uhci->io_addr + USBPORTSC1 + 2 * (wIndex-1);
 	__u16 wPortChange, wPortStatus;
 
 	switch (typeReq) {
--- diff/drivers/usb/image/hpusbscsi.c	2004-05-19 22:12:17.000000000 +0100
+++ source/drivers/usb/image/hpusbscsi.c	2004-07-01 21:32:46.000000000 +0100
@@ -11,7 +11,7 @@
 #include <asm/atomic.h>
 #include <linux/blkdev.h>
 #include "../../scsi/scsi.h"
-#include "../../scsi/hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "hpusbscsi.h"
 
--- diff/drivers/usb/image/mdc800.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/image/mdc800.c	2004-07-01 21:32:46.000000000 +0100
@@ -667,10 +667,10 @@
 /*
  * The Device read callback Function
  */
-static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, loff_t *pos)
+static ssize_t mdc800_device_read (struct file *file, char __user *buf, size_t len, loff_t *pos)
 {
 	size_t left=len, sts=len; /* single transfer size */
-	char* ptr=buf;
+	char __user *ptr = buf;
 	long timeout;
 	DECLARE_WAITQUEUE(wait, current);
 
@@ -767,7 +767,7 @@
  * After this the driver initiates the request for the answer or
  * just waits until the camera becomes ready.
  */
-static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t len, loff_t *pos)
+static ssize_t mdc800_device_write (struct file *file, const char __user *buf, size_t len, loff_t *pos)
 {
 	size_t i=0;
 	DECLARE_WAITQUEUE(wait, current);
--- diff/drivers/usb/image/microtek.c	2004-05-19 22:12:17.000000000 +0100
+++ source/drivers/usb/image/microtek.c	2004-07-01 21:32:46.000000000 +0100
@@ -136,7 +136,7 @@
 #include <asm/atomic.h>
 #include <linux/blkdev.h>
 #include "../../scsi/scsi.h"
-#include "../../scsi/hosts.h"
+#include <scsi/scsi_host.h>
 
 #include "microtek.h"
 
--- diff/drivers/usb/input/Kconfig	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/input/Kconfig	2004-07-01 21:32:46.000000000 +0100
@@ -219,14 +219,16 @@
 	  module will be called xpad.
 	  
 config USB_ATI_REMOTE
-	tristate "ATI USB RF remote control"
+	tristate "ATI / X10 USB RF remote control"
 	depends on USB && INPUT
 	---help---
-	  Say Y here if you want to use one of ATI's USB remote controls.
-	  These are RF remotes with USB receivers. They come with many of ATI's 
-	  All-In-Wonder video cards.  This driver provides mouse pointer, left
-          and right mouse buttons, and maps all the other remote buttons to
-	  keypress events.
+	  Say Y here if you want to use an ATI or X10 "Lola" USB remote control.
+	  These are RF remotes with USB receivers. 
+	  The ATI remote comes with many of ATI's All-In-Wonder video cards.
+	  The X10 "Lola" remote is available at:
+	     http://www.x10.com/products/lola_sg1.htm
+	  This driver provides mouse pointer, left and right mouse buttons, 
+	  and maps all the other remote buttons to keypress events.
 	  
 	  To compile this driver as a module, choose M here: the module will be
 	  called ati_remote.
--- diff/drivers/usb/input/ati_remote.c	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/input/ati_remote.c	2004-07-01 21:32:46.000000000 +0100
@@ -16,6 +16,12 @@
  *
  *  Feb 2004: Torrey Hoffman <thoffman@arnor.net>
  *            Version 2.2.0
+ *  Jun 2004: Torrey Hoffman <thoffman@arnor.net>
+ *            Version 2.2.1
+ *            Added key repeat support contributed by:
+ *                Vincent Vanackere <vanackere@lif.univ-mrs.fr>
+ *            Added support for the "Lola" remote contributed by:
+ *                Seth Cohn <sethcohn@yahoo.com>
  *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
  *
@@ -41,6 +47,11 @@
  * "All-In-Wonder" video card packages.  The receiver self-identifies as a 
  * "USB Receiver" with manufacturer "X10 Wireless Technology Inc".
  *
+ * The "Lola" remote is available from X10.  See: 
+ *    http://www.x10.com/products/lola_sg1.htm
+ * The Lola is similar to the ATI remote but has no mouse support, and slightly
+ * different keys.
+ *
  * It is possible to use multiple receivers and remotes on multiple computers 
  * simultaneously by configuring them to use specific channels.
  * 
@@ -90,8 +101,9 @@
  
 #define ATI_REMOTE_VENDOR_ID 	0x0bc7
 #define ATI_REMOTE_PRODUCT_ID 	0x004
+#define LOLA_REMOTE_PRODUCT_ID 	0x002
 
-#define DRIVER_VERSION 	        "2.2.0"
+#define DRIVER_VERSION 	        "2.2.1"
 #define DRIVER_AUTHOR           "Torrey Hoffman <thoffman@arnor.net>"
 #define DRIVER_DESC             "ATI/X10 RF USB Remote Control"
 
@@ -113,6 +125,7 @@
  
 static struct usb_device_id ati_remote_table[] = {
 	{ USB_DEVICE(ATI_REMOTE_VENDOR_ID, ATI_REMOTE_PRODUCT_ID) },
+	{ USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA_REMOTE_PRODUCT_ID) },
 	{}	/* Terminating entry */
 };
 
@@ -134,10 +147,13 @@
 
 /* Duplicate event filtering time. 
  * Sequential, identical KIND_FILTERED inputs with less than
- * FILTER_TIME jiffies between them are dropped.  
- * (HZ >> 4) == 1/16th of a second and works well for me.
+ * FILTER_TIME jiffies between them are considered as repeat
+ * events. The hardware generates 5 events for the first keypress
+ * and we have to take this into account for an accurate repeat
+ * behaviour.
+ * (HZ / 20) == 50 ms and works well for me.
  */
-#define FILTER_TIME (HZ >> 4)
+#define FILTER_TIME (HZ / 20)
 
 static DECLARE_MUTEX(disconnect_sem);
 
@@ -161,6 +177,7 @@
 	unsigned char old_data[2];  /* Detect duplicate events */
 	unsigned long old_jiffies;
 	unsigned long acc_jiffies;  /* handle acceleration */
+	unsigned int repeat_count;
 	
 	char name[NAME_BUFSIZE];
 	char phys[NAME_BUFSIZE];
@@ -256,6 +273,12 @@
 	{KIND_FILTERED, 0xeb, 0x26, EV_KEY, KEY_FORWARD, 1},    /* (>>) */
 	{KIND_FILTERED, 0xed, 0x28, EV_KEY, KEY_STOP, 1},       /* ([]) */ 
 	{KIND_FILTERED, 0xee, 0x29, EV_KEY, KEY_PAUSE, 1},      /* ('') */
+	{KIND_FILTERED, 0xf0, 0x2b, EV_KEY, KEY_PREVIOUS, 1},   /* (<-) */
+	{KIND_FILTERED, 0xef, 0x2a, EV_KEY, KEY_NEXT, 1},       /* (>+) */
+	{KIND_FILTERED, 0xf2, 0x2D, EV_KEY, KEY_INFO, 1},       /* PLAYING */
+	{KIND_FILTERED, 0xf3, 0x2E, EV_KEY, KEY_HOME, 1},       /* TOP */
+	{KIND_FILTERED, 0xf4, 0x2F, EV_KEY, KEY_END, 1},        /* END */
+	{KIND_FILTERED, 0xf5, 0x30, EV_KEY, KEY_SELECT, 1},     /* SELECT */	
 	
 	{KIND_END, 0x00, 0x00, EV_MAX + 1, 0, 0}
 };
@@ -483,9 +506,20 @@
 		if ((ati_remote->old_data[0] == data[1]) && 
 	 		(ati_remote->old_data[1] == data[2]) && 
 	 		((ati_remote->old_jiffies + FILTER_TIME) > jiffies)) {
-			ati_remote->old_jiffies = jiffies;			
+			ati_remote->repeat_count++;
+		} 
+		else {
+			ati_remote->repeat_count = 0;
+		}
+		
+		ati_remote->old_data[0] = data[1];
+		ati_remote->old_data[1] = data[2];
+		ati_remote->old_jiffies = jiffies;
+
+		if ((ati_remote->repeat_count > 0)
+		    && (ati_remote->repeat_count < 5))
 			return;
-		}		
+		
 
 		input_regs(dev, regs);
 		input_event(dev, ati_remote_tbl[index].type,
@@ -494,9 +528,6 @@
 			ati_remote_tbl[index].code, 0);
 		input_sync(dev);
 
-		ati_remote->old_data[0] = data[1];
-		ati_remote->old_data[1] = data[2];
-		ati_remote->old_jiffies = jiffies;
 		return;
 	}			
 	
@@ -697,9 +728,9 @@
 
 	/* See if the offered device matches what we can accept */
 	if ((udev->descriptor.idVendor != ATI_REMOTE_VENDOR_ID) ||
-	    (udev->descriptor.idProduct != ATI_REMOTE_PRODUCT_ID)) {
+		( (udev->descriptor.idProduct != ATI_REMOTE_PRODUCT_ID) &&
+		  (udev->descriptor.idProduct != LOLA_REMOTE_PRODUCT_ID) ))
 		return -ENODEV;
-	}
 
 	/* Allocate and clear an ati_remote struct */
 	if (!(ati_remote = kmalloc(sizeof (struct ati_remote), GFP_KERNEL)))
@@ -856,4 +887,3 @@
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
-
--- diff/drivers/usb/input/hid-core.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/input/hid-core.c	2004-07-01 21:32:46.000000000 +0100
@@ -1324,12 +1324,14 @@
 	}
 
 	err = 0;
-	while ((ret = hid_wait_io(hid))) {
+	ret = hid_wait_io(hid);
+	while (ret) {
 		err |= ret;
 		if (test_bit(HID_CTRL_RUNNING, &hid->iofl))
 			usb_unlink_urb(hid->urbctrl);
 		if (test_bit(HID_OUT_RUNNING, &hid->iofl))
 			usb_unlink_urb(hid->urbout);
+		ret = hid_wait_io(hid);
 	}
 
 	if (err)
@@ -1428,6 +1430,11 @@
 #define USB_DEVICE_ID_1_PHIDGETSERVO_20	0x8101
 #define USB_DEVICE_ID_4_PHIDGETSERVO_20	0x8104
 
+#define USB_VENDOR_ID_CODEMERCS		0x07c0
+#define USB_DEVICE_ID_CODEMERCS_IOW40	0x1500
+#define USB_DEVICE_ID_CODEMERCS_IOW24	0x1501
+
+
 static struct hid_blacklist {
 	__u16 idVendor;
 	__u16 idProduct;
@@ -1442,20 +1449,20 @@
 	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_23, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_IGNORE },
-
 	{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 100, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 200, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 300, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 400, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 500, HID_QUIRK_IGNORE },
-
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PENPARTNER, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 1, HID_QUIRK_IGNORE },
--- diff/drivers/usb/input/hid-tmff.c	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/input/hid-tmff.c	2004-07-01 21:32:46.000000000 +0100
@@ -110,7 +110,7 @@
 {
 	struct tmff_device *private;
 	struct list_head *pos;
-	struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list);
+	struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
 
 	private = kmalloc(sizeof(struct tmff_device), GFP_KERNEL);
 	if (!private)
--- diff/drivers/usb/input/hiddev.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/input/hiddev.c	2004-07-01 21:32:46.000000000 +0100
@@ -295,7 +295,7 @@
 /*
  * "write" file op
  */
-static ssize_t hiddev_write(struct file * file, const char * buffer, size_t count, loff_t *ppos)
+static ssize_t hiddev_write(struct file * file, const char __user * buffer, size_t count, loff_t *ppos)
 {
 	return -EINVAL;
 }
@@ -303,7 +303,7 @@
 /*
  * "read" file op
  */
-static ssize_t hiddev_read(struct file * file, char * buffer, size_t count, loff_t *ppos)
+static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t count, loff_t *ppos)
 {
 	DECLARE_WAITQUEUE(wait, current);
 	struct hiddev_list *list = file->private_data;
@@ -406,6 +406,7 @@
 	struct hiddev_devinfo dinfo;
 	struct hid_report *report;
 	struct hid_field *field;
+	void __user *user_arg = (void __user *)arg;
 	int i;
 
 	if (!hiddev->exist)
@@ -414,7 +415,7 @@
 	switch (cmd) {
 
 	case HIDIOCGVERSION:
-		return put_user(HID_VERSION, (int *) arg);
+		return put_user(HID_VERSION, (int __user *)arg);
 
 	case HIDIOCAPPLICATION:
 		if (arg < 0 || arg >= hid->maxapplication)
@@ -439,13 +440,13 @@
 		dinfo.product = dev->descriptor.idProduct;
 		dinfo.version = dev->descriptor.bcdDevice;
 		dinfo.num_applications = hid->maxapplication;
-		if (copy_to_user((void *) arg, &dinfo, sizeof(dinfo)))
+		if (copy_to_user(user_arg, &dinfo, sizeof(dinfo)))
 			return -EFAULT;
 
 		return 0;
 
 	case HIDIOCGFLAG:
-		if (put_user(list->flags, (int *) arg))
+		if (put_user(list->flags, (int __user *)arg))
 			return -EFAULT;
 
 		return 0;
@@ -453,7 +454,7 @@
 	case HIDIOCSFLAG:
 		{
 			int newflags;
-			if (get_user(newflags, (int *) arg))
+			if (get_user(newflags, (int __user *)arg))
 				return -EFAULT;
 
 			if ((newflags & ~HIDDEV_FLAGS) != 0 ||
@@ -471,7 +472,7 @@
 			int idx, len;
 			char *buf;
 
-			if (get_user(idx, (int *) arg))
+			if (get_user(idx, (int __user *)arg))
 				return -EFAULT;
 
 			if ((buf = kmalloc(HID_STRING_SIZE, GFP_KERNEL)) == NULL)
@@ -482,7 +483,7 @@
 				return -EINVAL;
 			}
 
-			if (copy_to_user((void *) (arg+sizeof(int)), buf, len+1)) {
+			if (copy_to_user(user_arg+sizeof(int), buf, len+1)) {
 				kfree(buf);
 				return -EFAULT;
 			}
@@ -498,7 +499,7 @@
 		return 0;
 
 	case HIDIOCGREPORT:
-		if (copy_from_user(&rinfo, (void *) arg, sizeof(rinfo)))
+		if (copy_from_user(&rinfo, user_arg, sizeof(rinfo)))
 			return -EFAULT;
 
 		if (rinfo.report_type == HID_REPORT_TYPE_OUTPUT)
@@ -513,7 +514,7 @@
 		return 0;
 
 	case HIDIOCSREPORT:
-		if (copy_from_user(&rinfo, (void *) arg, sizeof(rinfo)))
+		if (copy_from_user(&rinfo, user_arg, sizeof(rinfo)))
 			return -EFAULT;
 
 		if (rinfo.report_type == HID_REPORT_TYPE_INPUT)
@@ -527,7 +528,7 @@
 		return 0;
 
 	case HIDIOCGREPORTINFO:
-		if (copy_from_user(&rinfo, (void *) arg, sizeof(rinfo)))
+		if (copy_from_user(&rinfo, user_arg, sizeof(rinfo)))
 			return -EFAULT;
 
 		if ((report = hiddev_lookup_report(hid, &rinfo)) == NULL)
@@ -535,13 +536,13 @@
 
 		rinfo.num_fields = report->maxfield;
 
-		if (copy_to_user((void *) arg, &rinfo, sizeof(rinfo)))
+		if (copy_to_user(user_arg, &rinfo, sizeof(rinfo)))
 			return -EFAULT;
 
 		return 0;
 
 	case HIDIOCGFIELDINFO:
-		if (copy_from_user(&finfo, (void *) arg, sizeof(finfo)))
+		if (copy_from_user(&finfo, user_arg, sizeof(finfo)))
 			return -EFAULT;
 		rinfo.report_type = finfo.report_type;
 		rinfo.report_id = finfo.report_id;
@@ -568,7 +569,7 @@
 		finfo.unit_exponent = field->unit_exponent;
 		finfo.unit = field->unit;
 
-		if (copy_to_user((void *) arg, &finfo, sizeof(finfo)))
+		if (copy_to_user(user_arg, &finfo, sizeof(finfo)))
 			return -EFAULT;
 
 		return 0;
@@ -578,7 +579,7 @@
 		if (!uref_multi)
 			return -ENOMEM;
 		uref = &uref_multi->uref;
-		if (copy_from_user(uref, (void *) arg, sizeof(*uref))) 
+		if (copy_from_user(uref, user_arg, sizeof(*uref))) 
 			goto fault;
 
 		rinfo.report_type = uref->report_type;
@@ -595,7 +596,7 @@
 
 		uref->usage_code = field->usage[uref->usage_index].hid;
 
-		if (copy_to_user((void *) arg, uref, sizeof(*uref)))
+		if (copy_to_user(user_arg, uref, sizeof(*uref)))
 			goto fault;
 
 		kfree(uref_multi);
@@ -611,11 +612,11 @@
 			return -ENOMEM;
 		uref = &uref_multi->uref;
 		if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) {
-			if (copy_from_user(uref_multi, (void *) arg, 
+			if (copy_from_user(uref_multi, user_arg, 
 					   sizeof(*uref_multi)))
 				goto fault;
 		} else {
-			if (copy_from_user(uref, (void *) arg, sizeof(*uref)))
+			if (copy_from_user(uref, user_arg, sizeof(*uref)))
 				goto fault;
 		}
 
@@ -638,21 +639,27 @@
 				goto inval;
 
 			field = report->field[uref->field_index];
-			if (uref->usage_index >= field->maxusage)
-				goto inval;
 
-			if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) {
-				if (uref_multi->num_values >= HID_MAX_USAGES || 
-				    uref->usage_index >= field->maxusage || 
-				   (uref->usage_index + uref_multi->num_values) >= field->maxusage)
+			if (cmd == HIDIOCGCOLLECTIONINDEX) {
+				if (uref->usage_index >= field->maxusage)
 					goto inval;
+			} else if (uref->usage_index >= field->report_count)
+				goto inval;
+
+			else if ((cmd == HIDIOCGUSAGES ||
+				  cmd == HIDIOCSUSAGES) &&
+				 (uref->usage_index + uref_multi->num_values >=
+				  field->report_count ||
+				  uref->usage_index + uref_multi->num_values <
+				  uref->usage_index))
+				goto inval;
+
 			}
-		}
 
 		switch (cmd) {
 			case HIDIOCGUSAGE:
 				uref->value = field->value[uref->usage_index];
-				if (copy_to_user((void *) arg, uref, sizeof(*uref)))
+				if (copy_to_user(user_arg, uref, sizeof(*uref)))
 					goto fault;
 				goto goodreturn;
 
@@ -667,7 +674,7 @@
 				for (i = 0; i < uref_multi->num_values; i++)
 					uref_multi->values[i] = 
 					    field->value[uref->usage_index + i];
-				if (copy_to_user((void *) arg, uref_multi, 
+				if (copy_to_user(user_arg, uref_multi, 
 						 sizeof(*uref_multi)))
 					goto fault;
 				goto goodreturn;
@@ -689,7 +696,7 @@
 		return -EINVAL;
 
 	case HIDIOCGCOLLECTIONINFO:
-		if (copy_from_user(&cinfo, (void *) arg, sizeof(cinfo)))
+		if (copy_from_user(&cinfo, user_arg, sizeof(cinfo)))
 			return -EFAULT;
 
 		if (cinfo.index >= hid->maxcollection)
@@ -699,7 +706,7 @@
 		cinfo.usage = hid->collection[cinfo.index].usage;
 		cinfo.level = hid->collection[cinfo.index].level;
 
-		if (copy_to_user((void *) arg, &cinfo, sizeof(cinfo)))
+		if (copy_to_user(user_arg, &cinfo, sizeof(cinfo)))
 			return -EFAULT;
 		return 0;
 
@@ -715,7 +722,7 @@
 			len = strlen(hid->name) + 1;
 			if (len > _IOC_SIZE(cmd))
 				 len = _IOC_SIZE(cmd);
-			return copy_to_user((char *) arg, hid->name, len) ?
+			return copy_to_user(user_arg, hid->name, len) ?
 				-EFAULT : len;
 		}
 
@@ -726,7 +733,7 @@
 			len = strlen(hid->phys) + 1;
 			if (len > _IOC_SIZE(cmd))
 				len = _IOC_SIZE(cmd);
-			return copy_to_user((char *) arg, hid->phys, len) ?
+			return copy_to_user(user_arg, hid->phys, len) ?
 				-EFAULT : len;
 		}
 	}
--- diff/drivers/usb/media/dabusb.c	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/dabusb.c	2004-07-01 21:32:46.000000000 +0100
@@ -476,7 +476,7 @@
 	return 0;
 }
 
-static ssize_t dabusb_read (struct file *file, char *buf, size_t count, loff_t * ppos)
+static ssize_t dabusb_read (struct file *file, char __user *buf, size_t count, loff_t * ppos)
 {
 	pdabusb_t s = (pdabusb_t) file->private_data;
 	unsigned long flags;
@@ -670,7 +670,7 @@
 			break;
 		}
 
-		if (copy_from_user (pbulk, (void *) arg, sizeof (bulk_transfer_t))) {
+		if (copy_from_user (pbulk, (void __user *) arg, sizeof (bulk_transfer_t))) {
 			ret = -EFAULT;
 			kfree (pbulk);
 			break;
@@ -678,18 +678,18 @@
 
 		ret=dabusb_bulk (s, pbulk);
 		if(ret==0)
-			if (copy_to_user((void *)arg, pbulk,
+			if (copy_to_user((void __user *)arg, pbulk,
 					 sizeof(bulk_transfer_t)))
 				ret = -EFAULT;
 		kfree (pbulk);
 		break;
 
 	case IOCTL_DAB_OVERRUNS:
-		ret = put_user (s->overruns, (unsigned int *) arg);
+		ret = put_user (s->overruns, (unsigned int __user *) arg);
 		break;
 
 	case IOCTL_DAB_VERSION:
-		ret = put_user (version, (unsigned int *) arg);
+		ret = put_user (version, (unsigned int __user *) arg);
 		break;
 
 	default:
--- diff/drivers/usb/media/konicawc.c	2004-06-30 14:25:53.000000000 +0100
+++ source/drivers/usb/media/konicawc.c	2004-07-01 21:32:46.000000000 +0100
@@ -324,7 +324,7 @@
         }
         urb->dev = uvd->dev;
         urb->status = 0;
-        ret = usb_submit_urb(urb, GFP_KERNEL);
+	ret = usb_submit_urb(urb, GFP_ATOMIC);
 	DEBUG(3, "submitting urb of length %d", urb->transfer_buffer_length);
         if(ret)
                 err("usb_submit_urb error (%d)", ret);
--- diff/drivers/usb/media/ov511.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/media/ov511.c	2004-07-01 21:32:46.000000000 +0100
@@ -4593,7 +4593,7 @@
 }
 
 static ssize_t
-ov51x_v4l1_read(struct file *file, char *buf, size_t cnt, loff_t *ppos)
+ov51x_v4l1_read(struct file *file, char __user *buf, size_t cnt, loff_t *ppos)
 {
 	struct video_device *vdev = file->private_data;
 	int noblock = file->f_flags&O_NONBLOCK;
--- diff/drivers/usb/media/ov511.h	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/ov511.h	2004-07-01 21:32:46.000000000 +0100
@@ -11,7 +11,7 @@
 #ifdef OV511_DEBUG
 	#define PDEBUG(level, fmt, args...) \
 		if (debug >= (level)) info("[%s:%d] " fmt, \
-		__PRETTY_FUNCTION__, __LINE__ , ## args)
+		__FUNCTION__, __LINE__ , ## args)
 #else
 	#define PDEBUG(level, fmt, args...) do {} while(0)
 #endif
--- diff/drivers/usb/media/pwc-ctrl.c	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/pwc-ctrl.c	2004-07-01 21:32:46.000000000 +0100
@@ -30,6 +30,7 @@
 #include <asm/uaccess.h> 
 #endif
 #include <asm/errno.h>
+#include <linux/version.h>
  
 #include "pwc.h"
 #include "pwc-ioctl.h"
@@ -127,19 +128,19 @@
 
 /* This tables contains entries for the 675/680/690 (Timon) camera, with
    4 different qualities (no compression, low, medium, high).
-   It lists the bandwidth requirements for said mode by its alternate interface 
+   It lists the bandwidth requirements for said mode by its alternate interface
    number. An alternate of 0 means that the mode is unavailable.
-   
-   There are 6 * 4 * 4 entries: 
+
+   There are 6 * 4 * 4 entries:
      6 different resolutions subqcif, qsif, qcif, sif, cif, vga
      6 framerates: 5, 10, 15, 20, 25, 30
      4 compression modi: none, low, medium, high
-     
-   When an uncompressed mode is not available, the next available compressed mode 
+
+   When an uncompressed mode is not available, the next available compressed mode
    will be chosen (unless the decompressor is absent). Sometimes there are only
    1 or 2 compressed modes available; in that case entries are duplicated.
 */
-struct Timon_table_entry 
+struct Timon_table_entry
 {
 	char alternate;			/* USB alternate interface */
 	unsigned short packetsize;	/* Normal packet size */
@@ -147,7 +148,7 @@
 	unsigned char mode[13];		/* precomputed mode settings for cam */
 };
 
-static struct Timon_table_entry Timon_table[PSZ_MAX][6][4] = 
+static struct Timon_table_entry Timon_table[PSZ_MAX][6][4] =
 {
 #include "pwc_timon.h"
 };
@@ -194,7 +195,7 @@
 	int i;
 	unsigned char *s;
 	char buf[100], *d;
-	
+
 	s = (unsigned char *)p;
 	d = buf;
 	*d = '\0';
@@ -230,7 +231,7 @@
 	unsigned char buf[3];
 	int ret, fps;
 	struct Nala_table_entry *pEntry;
-	int frames2frames[31] = 
+	int frames2frames[31] =
 	{ /* closest match of framerate */
 	   0,  0,  0,  0,  4,  /*  0-4  */
 	   5,  5,  7,  7, 10,  /*  5-9  */
@@ -267,9 +268,12 @@
 		Debug("Failed to send video command... %d\n", ret);
 		return ret;
 	}
-	if (pEntry->compressed && pdev->decompressor != NULL)
-		pdev->decompressor->init(pdev->release, buf, pdev->decompress_data);
-		
+	if (pEntry->compressed && pdev->decompressor != 0 && pdev->vpalette != VIDEO_PALETTE_RAW)
+		pdev->decompressor->init(pdev->type, pdev->release, buf, pdev->decompress_data);
+
+	pdev->cmd_len = 3;
+	memcpy(pdev->cmd_buf, buf, 3);
+
 	/* Set various parameters */
 	pdev->vframes = frames;
 	pdev->vsize = size;
@@ -303,13 +307,13 @@
 	if (size == PSZ_VGA && frames > 15)
 		return -EINVAL;
 	fps = (frames / 5) - 1;
-	
+
 	/* Find a supported framerate with progressively higher compression ratios
 	   if the preferred ratio is not available.
 	*/
 	pChoose = NULL;
 	if (pdev->decompressor == NULL) {
-#if PWC_DEBUG	
+#if PWC_DEBUG
 		Debug("Trying to find uncompressed mode.\n");
 #endif
 		pChoose = &Timon_table[size][fps][0];
@@ -319,7 +323,7 @@
 			pChoose = &Timon_table[size][fps][compression];
 			if (pChoose->alternate != 0)
 				break;
-			compression++;	
+			compression++;
 		}
 	}
 	if (pChoose == NULL || pChoose->alternate == 0)
@@ -332,9 +336,12 @@
 	if (ret < 0)
 		return ret;
 
-	if (pChoose->bandlength > 0)
-		pdev->decompressor->init(pdev->release, buf, pdev->decompress_data);
-	
+	if (pChoose->bandlength > 0 && pdev->decompressor != 0 && pdev->vpalette != VIDEO_PALETTE_RAW)
+		pdev->decompressor->init(pdev->type, pdev->release, buf, pdev->decompress_data);
+
+	pdev->cmd_len = 13;
+	memcpy(pdev->cmd_buf, buf, 13);
+
 	/* Set various parameters */
 	pdev->vframes = frames;
 	pdev->vsize = size;
@@ -342,7 +349,7 @@
 	pdev->valternate = pChoose->alternate;
 	pdev->image = pwc_image_sizes[size];
 	pdev->vbandlength = pChoose->bandlength;
-	if (pChoose->bandlength > 0) 
+	if (pChoose->bandlength > 0)
 		pdev->frame_size = (pChoose->bandlength * pdev->image.y) / 4;
 	else
 		pdev->frame_size = (pdev->image.x * pdev->image.y * 12) / 8;
@@ -352,33 +359,54 @@
 
 static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, int compression, int snapshot)
 {
-	struct Kiara_table_entry *pChoose;
+	struct Kiara_table_entry *pChoose = 0;
 	int fps, ret;
 	unsigned char buf[12];
-	
+	struct Kiara_table_entry RawEntry = {6, 773, 1272, {0xAD, 0xF4, 0x10, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x03, 0x80}};
+
 	if (size >= PSZ_MAX || frames < 5 || frames > 30 || compression < 0 || compression > 3)
 		return -EINVAL;
 	if (size == PSZ_VGA && frames > 15)
 		return -EINVAL;
 	fps = (frames / 5) - 1;
-	
-	/* Find a supported framerate with progressively higher compression ratios
-	   if the preferred ratio is not available.
-	*/
-	pChoose = NULL;
-	if (pdev->decompressor == NULL) {
-#if PWC_DEBUG	
-		Debug("Trying to find uncompressed mode.\n");
-#endif		
-		pChoose = &Kiara_table[size][fps][0];
+
+	/* special case: VGA @ 5 fps and snapshot is raw bayer mode */
+	if (size == PSZ_VGA && frames == 5 && snapshot)
+	{
+		/* Only available in case the raw palette is selected or 
+		   we have the decompressor available. This mode is 
+		   only available in compressed form 
+		*/
+		if (pdev->vpalette == VIDEO_PALETTE_RAW || pdev->decompressor != NULL)
+		{
+	                Info("Choosing VGA/5 BAYER mode (%d).\n", pdev->vpalette);
+			pChoose = &RawEntry;
+		}
+		else
+		{
+			Info("VGA/5 BAYER mode _must_ have a decompressor available, or use RAW palette.\n");
+		}
 	}
-	else {
-		while (compression <= 3) {
-			pChoose = &Kiara_table[size][fps][compression];
-			if (pChoose->alternate != 0)
-				break;
-			compression++;	
+	else
+	{
+        	/* Find a supported framerate with progressively higher compression ratios
+		   if the preferred ratio is not available.
+                   Skip this step when using RAW modes.
+		*/
+		if (pdev->decompressor == NULL && pdev->vpalette != VIDEO_PALETTE_RAW) {
+#if PWC_DEBUG
+			Debug("Trying to find uncompressed mode.\n");
+#endif
+			pChoose = &Kiara_table[size][fps][0];
 		}
+		else {
+			while (compression <= 3) {
+				pChoose = &Kiara_table[size][fps][compression];
+				if (pChoose->alternate != 0)
+					break;
+				compression++;
+			}
+   		}
 	}
 	if (pChoose == NULL || pChoose->alternate == 0)
 		return -ENOENT; /* Not supported. */
@@ -393,9 +421,11 @@
 	if (ret < 0)
 		return ret;
 
-	if (pChoose->bandlength > 0)
-		pdev->decompressor->init(pdev->release, buf, pdev->decompress_data);
-		
+	if (pChoose->bandlength > 0 && pdev->decompressor != 0 && pdev->vpalette != VIDEO_PALETTE_RAW)
+		pdev->decompressor->init(pdev->type, pdev->release, buf, pdev->decompress_data);
+
+	pdev->cmd_len = 12;
+	memcpy(pdev->cmd_buf, buf, 12);
 	/* All set and go */
 	pdev->vframes = frames;
 	pdev->vsize = size;
@@ -403,15 +433,15 @@
 	pdev->valternate = pChoose->alternate;
 	pdev->image = pwc_image_sizes[size];
 	pdev->vbandlength = pChoose->bandlength;
-	if (pChoose->bandlength > 0)
-		pdev->frame_size = (pChoose->bandlength * pdev->image.y) / 4;
-	else 
+	if (pdev->vbandlength > 0)
+		pdev->frame_size = (pdev->vbandlength * pdev->image.y) / 4;
+	else
 		pdev->frame_size = (pdev->image.x * pdev->image.y * 12) / 8;
-	pdev->frame_size += (pdev->frame_header_size + pdev->frame_trailer_size);
 	return 0;
 }
 
 
+
 /**
    @pdev: device structure
    @width: viewport width
@@ -422,14 +452,17 @@
  */
 int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot)
 {
-	int ret, size;
-	
+        int ret, size;
+
+        Trace(TRACE_FLOW, "set_video_mode(%dx%d @ %d, palette %d).\n", width, height, frames, pdev->vpalette);
 	size = pwc_decode_size(pdev, width, height);
 	if (size < 0) {
 		Debug("Could not find suitable size.\n");
 		return -ERANGE;
 	}
-	ret = -EINVAL;	
+	Debug("decode_size = %d.\n", size);
+
+        ret = -EINVAL;
 	switch(pdev->type) {
 	case 645:
 	case 646:
@@ -441,7 +474,7 @@
 	case 690:
 		ret = set_video_mode_Timon(pdev, size, frames, compression, snapshot);
 		break;
-		
+	
 	case 720:
 	case 730:
 	case 740:
@@ -459,6 +492,7 @@
 	}
 	pdev->view.x = width;
 	pdev->view.y = height;
+	pdev->frame_total_size = pdev->frame_size + pdev->frame_header_size + pdev->frame_trailer_size;
 	pwc_set_image_buffer_size(pdev);
 	Trace(TRACE_SIZE, "Set viewport to %dx%d, image size is %dx%d.\n", width, height, pwc_image_sizes[size].x, pwc_image_sizes[size].y);
 	return 0;
@@ -467,23 +501,33 @@
 
 void pwc_set_image_buffer_size(struct pwc_device *pdev)
 {
-	int factor, i, filler = 0;
+	int i, factor = 0, filler = 0;
 
-	factor = 6;
-	filler = 128;
+	/* for PALETTE_YUV420P */
+	switch(pdev->vpalette)
+	{
+	case VIDEO_PALETTE_YUV420P:
+		factor = 6;
+		filler = 128;
+		break;
+	case VIDEO_PALETTE_RAW:
+		factor = 6; /* can be uncompressed YUV420P */
+		filler = 0;
+		break;
+	}
 
 	/* Set sizes in bytes */
 	pdev->image.size = pdev->image.x * pdev->image.y * factor / 4;
 	pdev->view.size  = pdev->view.x  * pdev->view.y  * factor / 4;
 
 	/* Align offset, or you'll get some very weird results in
-	   YUV420 mode... x must be multiple of 4 (to get the Y's in 
+	   YUV420 mode... x must be multiple of 4 (to get the Y's in
 	   place), and y even (or you'll mixup U & V). This is less of a
 	   problem for YUV420P.
 	 */
 	pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC;
 	pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE;
-	
+
 	/* Fill buffers with gray or black */
 	for (i = 0; i < MAX_IMAGES; i++) {
 		if (pdev->image_ptr[i] != NULL)
@@ -499,13 +543,8 @@
 {
 	char buf;
 	int ret;
-	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_LUM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		BRIGHTNESS_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+
+	ret = RecvControlMsg(GET_LUM_CTL, BRIGHTNESS_FORMATTER, 1);	
 	if (ret < 0)
 		return ret;
 	return buf << 9;
@@ -520,12 +559,7 @@
 	if (value > 0xffff)
 		value = 0xffff;
 	buf = (value >> 9) & 0x7f;
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_LUM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		BRIGHTNESS_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	return SendControlMsg(SET_LUM_CTL, BRIGHTNESS_FORMATTER, 1);
 }
 
 /* CONTRAST */
@@ -534,13 +568,8 @@
 {
 	char buf;
 	int ret;
-	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_LUM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		CONTRAST_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+
+	ret = RecvControlMsg(GET_LUM_CTL, CONTRAST_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
 	return buf << 10;
@@ -555,12 +584,7 @@
 	if (value > 0xffff)
 		value = 0xffff;
 	buf = (value >> 10) & 0x3f;
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_LUM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		CONTRAST_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	return SendControlMsg(SET_LUM_CTL, CONTRAST_FORMATTER, 1);
 }
 
 /* GAMMA */
@@ -570,12 +594,7 @@
 	char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_LUM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		GAMMA_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = RecvControlMsg(GET_LUM_CTL, GAMMA_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
 	return buf << 11;
@@ -590,12 +609,7 @@
 	if (value > 0xffff)
 		value = 0xffff;
 	buf = (value >> 11) & 0x1f;
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_LUM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		GAMMA_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	return SendControlMsg(SET_LUM_CTL, GAMMA_FORMATTER, 1);
 }
 
 
@@ -608,12 +622,7 @@
 
 	if (pdev->type < 675)
 		return -1;
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_CHROM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = RecvControlMsg(GET_CHROM_CTL, pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1, 1);
 	if (ret < 0)
 		return ret;
 	return 32768 + buf * 327;
@@ -631,12 +640,7 @@
 		value = 0xffff;
 	/* saturation ranges from -100 to +100 */
 	buf = (value - 32768) / 327;
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_CHROM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	return SendControlMsg(SET_CHROM_CTL, pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1, 1);
 }
 
 /* AGC */
@@ -651,12 +655,7 @@
 	else
 		buf = 0xff; /* fixed */
 
-	ret = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_LUM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		AGC_MODE_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = SendControlMsg(SET_LUM_CTL, AGC_MODE_FORMATTER, 1);
 	
 	if (!mode && ret >= 0) {
 		if (value < 0)
@@ -664,12 +663,7 @@
 		if (value > 0xffff)
 			value = 0xffff;
 		buf = (value >> 10) & 0x3F;
-		ret = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-			SET_LUM_CTL,
-			USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-			PRESET_AGC_FORMATTER,
-			pdev->vcinterface,
-			&buf, 1, HZ / 2);
+		ret = SendControlMsg(SET_LUM_CTL, PRESET_AGC_FORMATTER, 1);
 	}
 	if (ret < 0)
 		return ret;
@@ -681,22 +675,12 @@
 	unsigned char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_LUM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		AGC_MODE_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = RecvControlMsg(GET_LUM_CTL, AGC_MODE_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
 
 	if (buf != 0) { /* fixed */
-		ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-			GET_LUM_CTL,
-			USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-			PRESET_AGC_FORMATTER,
-			pdev->vcinterface,
-			&buf, 1, HZ / 2);
+		ret = RecvControlMsg(GET_LUM_CTL, PRESET_AGC_FORMATTER, 1);
 		if (ret < 0)
 			return ret;
 		if (buf > 0x3F)
@@ -704,12 +688,7 @@
 		*value = (buf << 10);		
 	}
 	else { /* auto */
-		ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-			GET_STATUS_CTL,
-			USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-			READ_AGC_FORMATTER,
-			pdev->vcinterface,
-			&buf, 1, HZ / 2);
+		ret = RecvControlMsg(GET_STATUS_CTL, READ_AGC_FORMATTER, 1);
 		if (ret < 0)
 			return ret;
 		/* Gah... this value ranges from 0x00 ... 0x9F */
@@ -732,12 +711,7 @@
 	else
 		buf[0] = 0xff; /* fixed */
 	
-	ret = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_LUM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		SHUTTER_MODE_FORMATTER,
-		pdev->vcinterface,
-		buf, 1, HZ / 2);
+	ret = SendControlMsg(SET_LUM_CTL, SHUTTER_MODE_FORMATTER, 1);
 
 	if (!mode && ret >= 0) {
 		if (value < 0)
@@ -763,12 +737,7 @@
 			break;
 		}
 
-		ret = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-			SET_LUM_CTL,
-			USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-			PRESET_SHUTTER_FORMATTER,
-			pdev->vcinterface,
-			&buf, 2, HZ / 2);
+		ret = SendControlMsg(SET_LUM_CTL, PRESET_SHUTTER_FORMATTER, 2);
 	}
 	return ret;
 }	
@@ -787,12 +756,7 @@
 		buf = 0x00; /* active */
 	else
 		buf = 0xFF; /* power save */
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_STATUS_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		SET_POWER_SAVE_MODE_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	return SendControlMsg(SET_STATUS_CTL, SET_POWER_SAVE_MODE_FORMATTER, 1);
 }
 
 
@@ -801,32 +765,20 @@
 
 static inline int pwc_restore_user(struct pwc_device *pdev)
 {
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_STATUS_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		RESTORE_USER_DEFAULTS_FORMATTER,
-		pdev->vcinterface,
-		NULL, 0, HZ / 2);
+	char buf; /* dummy */
+	return SendControlMsg(SET_STATUS_CTL, RESTORE_USER_DEFAULTS_FORMATTER, 0);
 }
 
 static inline int pwc_save_user(struct pwc_device *pdev)
 {
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_STATUS_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		SAVE_USER_DEFAULTS_FORMATTER,
-		pdev->vcinterface,
-		NULL, 0, HZ / 2);
+	char buf; /* dummy */
+	return SendControlMsg(SET_STATUS_CTL, SAVE_USER_DEFAULTS_FORMATTER, 0);
 }
 
 static inline int pwc_restore_factory(struct pwc_device *pdev)
 {
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_STATUS_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		RESTORE_FACTORY_DEFAULTS_FORMATTER,
-		pdev->vcinterface,
-		NULL, 0, HZ / 2);
+	char buf; /* dummy */
+	return SendControlMsg(SET_STATUS_CTL, RESTORE_FACTORY_DEFAULTS_FORMATTER, 0);
 }
 
  /* ************************************************* */
@@ -854,12 +806,7 @@
 	
 	buf = mode & 0x07; /* just the lowest three bits */
 	
-	ret = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_CHROM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		WB_MODE_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = SendControlMsg(SET_CHROM_CTL, WB_MODE_FORMATTER, 1);
 	
 	if (ret < 0)
 		return ret;
@@ -871,12 +818,7 @@
 	unsigned char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_CHROM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		WB_MODE_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = RecvControlMsg(GET_CHROM_CTL, WB_MODE_FORMATTER, 1);
 
 	if (ret < 0) 
 		return ret;
@@ -891,34 +833,21 @@
 		value = 0;
 	if (value > 0xffff)
 		value = 0xffff;
-
-	/* only the msb are considered */
+	/* only the msb is considered */
 	buf = value >> 8;
-
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_CHROM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		PRESET_MANUAL_RED_GAIN_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	return SendControlMsg(SET_CHROM_CTL, PRESET_MANUAL_RED_GAIN_FORMATTER, 1);
 }
 
-static inline int pwc_get_red_gain(struct pwc_device *pdev)
+static inline int pwc_get_red_gain(struct pwc_device *pdev, int *value)
 {
 	unsigned char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
- 	        GET_CHROM_CTL, 
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-	        PRESET_MANUAL_RED_GAIN_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
-
+	ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_RED_GAIN_FORMATTER, 1);
 	if (ret < 0)
 	    return ret;
-	
-	return (buf << 8);
+	*value = buf << 8;
+	return 0;
 }
 
 
@@ -930,34 +859,21 @@
 		value = 0;
 	if (value > 0xffff)
 		value = 0xffff;
-
-	/* linear mapping of 0..0xffff to -0x80..0x7f */
-	buf = (value >> 8);
-
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_CHROM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		PRESET_MANUAL_BLUE_GAIN_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	/* only the msb is considered */
+	buf = value >> 8;
+	return SendControlMsg(SET_CHROM_CTL, PRESET_MANUAL_BLUE_GAIN_FORMATTER, 1);
 }
 
-static inline int pwc_get_blue_gain(struct pwc_device *pdev)
+static inline int pwc_get_blue_gain(struct pwc_device *pdev, int *value)
 {
 	unsigned char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-   	        GET_CHROM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		PRESET_MANUAL_BLUE_GAIN_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
-
+	ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_BLUE_GAIN_FORMATTER, 1);
 	if (ret < 0)
 	    return ret;
-	
-	return (buf << 8);
+	*value = buf << 8;
+	return 0;
 }
 
 
@@ -965,40 +881,28 @@
    internal red/blue gains, which may be different from the manual 
    gains set or read above.
  */   
-static inline int pwc_read_red_gain(struct pwc_device *pdev)
+static inline int pwc_read_red_gain(struct pwc_device *pdev, int *value)
 {
 	unsigned char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
- 	        GET_STATUS_CTL, 
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-	        READ_RED_GAIN_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
-
+	ret = RecvControlMsg(GET_STATUS_CTL, READ_RED_GAIN_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
-	
-	return (buf << 8);
+	*value = buf << 8;
+	return 0;
 }
 
-static inline int pwc_read_blue_gain(struct pwc_device *pdev)
+static inline int pwc_read_blue_gain(struct pwc_device *pdev, int *value)
 {
 	unsigned char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-   	        GET_STATUS_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		READ_BLUE_GAIN_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
-
+	ret = RecvControlMsg(GET_STATUS_CTL, READ_BLUE_GAIN_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
-	
-	return (buf << 8);
+	*value = buf << 8;
+	return 0;
 }
 
 
@@ -1008,28 +912,19 @@
 	
 	/* useful range is 0x01..0x20 */
 	buf = speed / 0x7f0;
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_CHROM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		AWB_CONTROL_SPEED_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1);
 }
 
-static inline int pwc_get_wb_speed(struct pwc_device *pdev)
+static inline int pwc_get_wb_speed(struct pwc_device *pdev, int *value)
 {
 	unsigned char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_CHROM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		AWB_CONTROL_SPEED_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
-	return (buf * 0x7f0);
+	*value = buf * 0x7f0;
+	return 0;
 }
 
 
@@ -1039,28 +934,19 @@
 	
 	/* useful range is 0x01..0x3F */
 	buf = (delay >> 10);
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_CHROM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		AWB_CONTROL_DELAY_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1);
 }
 
-static inline int pwc_get_wb_delay(struct pwc_device *pdev)
+static inline int pwc_get_wb_delay(struct pwc_device *pdev, int *value)
 {
 	unsigned char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_CHROM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		AWB_CONTROL_DELAY_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
-	return (buf << 10);
+	*value = buf << 10;
+	return 0;
 }
 
 
@@ -1115,12 +1001,7 @@
 		buf = 0xff; /* auto contour on */
 	else
 		buf = 0x0; /* auto contour off */
-	ret = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_LUM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		AUTO_CONTOUR_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = SendControlMsg(SET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
 	
@@ -1130,12 +1011,7 @@
 		contour = 0xffff;
 	
 	buf = (contour >> 10); /* contour preset is [0..3f] */
-	ret = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_LUM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		PRESET_CONTOUR_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = SendControlMsg(SET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1);
 	if (ret < 0)	
 		return ret;	
 	return 0;
@@ -1146,26 +1022,16 @@
 	unsigned char buf;
 	int ret;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_LUM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		AUTO_CONTOUR_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = RecvControlMsg(GET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
 
 	if (buf == 0) {
 		/* auto mode off, query current preset value */
-		ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-			GET_LUM_CTL,
-			USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-			PRESET_CONTOUR_FORMATTER,
-			pdev->vcinterface,
-			&buf, 1, HZ / 2);
+		ret = RecvControlMsg(GET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1);
 		if (ret < 0)	
 			return ret;
-		*contour =  (buf << 10);
+		*contour = buf << 10;
 	}
 	else
 		*contour = -1;
@@ -1181,28 +1047,19 @@
 		buf = 0xff;
 	else
 		buf = 0x0;
-	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
-		SET_LUM_CTL,
-		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		BACK_LIGHT_COMPENSATION_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	return SendControlMsg(SET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1);
 }
 
-static inline int pwc_get_backlight(struct pwc_device *pdev)
+static inline int pwc_get_backlight(struct pwc_device *pdev, int *backlight)
 {
 	int ret;
 	unsigned char buf;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_LUM_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		BACK_LIGHT_COMPENSATION_FORMATTER,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = RecvControlMsg(GET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
-	return buf;
+	*backlight = buf;
+	return 0;
 }
 
 
@@ -1217,7 +1074,7 @@
 	return SendControlMsg(SET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1);
 }
 
-static inline int pwc_get_flicker(struct pwc_device *pdev)
+static inline int pwc_get_flicker(struct pwc_device *pdev, int *flicker)
 {
 	int ret;
 	unsigned char buf;
@@ -1225,7 +1082,8 @@
 	ret = RecvControlMsg(GET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
-	return buf;
+	*flicker = buf;
+	return 0;
 }
 
 
@@ -1241,7 +1099,7 @@
 	return SendControlMsg(SET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1);
 }
 
-static inline int pwc_get_dynamic_noise(struct pwc_device *pdev)
+static inline int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise)
 {
 	int ret;
 	unsigned char buf;
@@ -1249,14 +1107,15 @@
 	ret = RecvControlMsg(GET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1);
 	if (ret < 0)
 		return ret;
-	return buf;
+	*noise = buf;
+	return 0;
 }
 
 int pwc_mpt_reset(struct pwc_device *pdev, int flags)
 {
 	unsigned char buf;
 	
-	buf = flags & 0x03; // only lower two bits are currently used 
+	buf = flags & 0x03; // only lower two bits are currently used
 	return SendControlMsg(SET_MPT_CTL, PT_RESET_CONTROL_FORMATTER, 1);
 }
 
@@ -1293,7 +1152,7 @@
 }
 
 
-int pwc_get_cmos_sensor(struct pwc_device *pdev)
+int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor)
 {
 	unsigned char buf;
 	int ret = -1, request;
@@ -1305,24 +1164,60 @@
 	else
 		request = SENSOR_TYPE_FORMATTER2;
 	
-	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
-		GET_STATUS_CTL,
-		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-		request,
-		pdev->vcinterface,
-		&buf, 1, HZ / 2);
+	ret = RecvControlMsg(GET_STATUS_CTL, request, 1);
 	if (ret < 0)
 		return ret;
 	if (pdev->type < 675)
-		return buf | 0x100;
+		*sensor = buf | 0x100;
 	else
-		return buf;
+		*sensor = buf;
+	return 0;
 }
 
 
  /* End of Add-Ons                                    */
  /* ************************************************* */
 
+/* Linux 2.5.something and 2.6 pass direct pointers to arguments of
+   ioctl() calls. With 2.4, you have to do tedious copy_from_user()
+   and copy_to_user() calls. With these macros we circumvent this,
+   and let me maintain only one source file. The functionality is
+   exactly the same otherwise.
+ */   
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
+
+/* define local variable for arg */
+#define ARG_DEF(ARG_type, ARG_name)\
+	ARG_type *ARG_name = arg;
+/* copy arg to local variable */	
+#define ARG_IN(ARG_name) /* nothing */
+/* argument itself (referenced) */
+#define ARGR(ARG_name) (*ARG_name)
+/* argument address */
+#define ARGA(ARG_name) ARG_name
+/* copy local variable to arg */
+#define ARG_OUT(ARG_name) /* nothing */
+
+#else
+
+#define ARG_DEF(ARG_type, ARG_name)\
+	ARG_type ARG_name;
+#define ARG_IN(ARG_name)\
+	if (copy_from_user(&ARG_name, arg, sizeof(ARG_name))) {\
+		ret = -EFAULT;\
+		break;\
+	}
+#define ARGR(ARG_name) ARG_name
+#define ARGA(ARG_name) &ARG_name
+#define ARG_OUT(ARG_name)\
+	if (copy_to_user(arg, &ARG_name, sizeof(ARG_name))) {\
+		ret = -EFAULT;\
+		break;\
+	}
+
+#endif
+
 int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
 {
 	int ret = 0;
@@ -1351,225 +1246,254 @@
 	
 	case VIDIOCPWCSCQUAL:
 	{	
-		int *qual = arg;
+		ARG_DEF(int, qual)
 
-		if (*qual < 0 || *qual > 3)
+		ARG_IN(qual)
+		if (ARGR(qual) < 0 || ARGR(qual) > 3)
 			ret = -EINVAL;
 		else
-			ret = pwc_try_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, *qual, pdev->vsnapshot);
+			ret = pwc_try_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, ARGR(qual), pdev->vsnapshot);
 		if (ret >= 0)
-			pdev->vcompression = *qual;
+			pdev->vcompression = ARGR(qual);
 		break;
 	}
 	
 	case VIDIOCPWCGCQUAL:
 	{
-		int *qual = arg;
+		ARG_DEF(int, qual)
 		
-		*qual = pdev->vcompression;
+		ARGR(qual) = pdev->vcompression;
+		ARG_OUT(qual)
 		break;
 	}
-
+	
 	case VIDIOCPWCPROBE:
 	{
-		struct pwc_probe *probe = arg;
+		ARG_DEF(struct pwc_probe, probe)
 		
-		strcpy(probe->name, pdev->vdev.name);
-		probe->type = pdev->type;
+		strcpy(ARGR(probe).name, pdev->vdev->name);
+		ARGR(probe).type = pdev->type;
+		ARG_OUT(probe)
+		break;
+	}
+
+	case VIDIOCPWCGSERIAL:
+	{
+		ARG_DEF(struct pwc_serial, serial)
+		
+		strcpy(ARGR(serial).serial, pdev->serial);
+		ARG_OUT(serial)
 		break;
 	}
 
 	case VIDIOCPWCSAGC:
 	{
-		int *agc = arg;
+		ARG_DEF(int, agc)
 
-		if (pwc_set_agc(pdev, *agc < 0 ? 1 : 0, *agc))
+		ARG_IN(agc)
+		if (pwc_set_agc(pdev, ARGR(agc) < 0 ? 1 : 0, ARGR(agc)))
 			ret = -EINVAL;
 		break;
 	}
 	
 	case VIDIOCPWCGAGC:
 	{
-		int *agc = arg;
+		ARG_DEF(int, agc)
 		
-		if (pwc_get_agc(pdev, agc))
+		if (pwc_get_agc(pdev, ARGA(agc)))
 			ret = -EINVAL;
+		ARG_OUT(agc)
 		break;
 	}
 	
 	case VIDIOCPWCSSHUTTER:
 	{
-		int *shutter_speed = arg;
+		ARG_DEF(int, shutter_speed)
 
-		ret = pwc_set_shutter_speed(pdev, *shutter_speed < 0 ? 1 : 0, *shutter_speed);
+		ARG_IN(shutter_speed)
+		ret = pwc_set_shutter_speed(pdev, ARGR(shutter_speed) < 0 ? 1 : 0, ARGR(shutter_speed));
 		break;
 	}
 	
         case VIDIOCPWCSAWB:
 	{
-		struct pwc_whitebalance *wb = arg;
+		ARG_DEF(struct pwc_whitebalance, wb)
 		
-		ret = pwc_set_awb(pdev, wb->mode);
-		if (ret >= 0 && wb->mode == PWC_WB_MANUAL) {
-			pwc_set_red_gain(pdev, wb->manual_red);
-			pwc_set_blue_gain(pdev, wb->manual_blue);
+		ARG_IN(wb)
+		ret = pwc_set_awb(pdev, ARGR(wb).mode);
+		if (ret >= 0 && ARGR(wb).mode == PWC_WB_MANUAL) {
+			pwc_set_red_gain(pdev, ARGR(wb).manual_red);
+			pwc_set_blue_gain(pdev, ARGR(wb).manual_blue);
 		}
 		break;
 	}
 
 	case VIDIOCPWCGAWB:
 	{
-		struct pwc_whitebalance *wb = arg;
+		ARG_DEF(struct pwc_whitebalance, wb)
 
-		memset(wb, 0, sizeof(*wb));
-		wb->mode = pwc_get_awb(pdev);
-		if (wb->mode < 0)
+		memset(ARGA(wb), 0, sizeof(struct pwc_whitebalance));
+		ARGR(wb).mode = pwc_get_awb(pdev);
+		if (ARGR(wb).mode < 0)
 			ret = -EINVAL;
 		else {
-			if (wb->mode == PWC_WB_MANUAL) {
-				wb->manual_red = pwc_get_red_gain(pdev);
-				wb->manual_blue = pwc_get_blue_gain(pdev);
+			if (ARGR(wb).mode == PWC_WB_MANUAL) {
+				ret = pwc_get_red_gain(pdev, &ARGR(wb).manual_red);
+				if (ret < 0)
+					break;
+				ret = pwc_get_blue_gain(pdev, &ARGR(wb).manual_blue);
+				if (ret < 0)
+					break;
 			}
-			if (wb->mode == PWC_WB_AUTO) {
-				wb->read_red = pwc_read_red_gain(pdev);
-				wb->read_blue = pwc_read_blue_gain(pdev);
+			if (ARGR(wb).mode == PWC_WB_AUTO) {
+				ret = pwc_read_red_gain(pdev, &ARGR(wb).read_red);
+				if (ret < 0)
+					break;
+ 				ret =pwc_read_blue_gain(pdev, &ARGR(wb).read_blue);
+ 				if (ret < 0)
+ 					break;
 			}
 		}
+		ARG_OUT(wb)
 		break;
 	}
 	
 	case VIDIOCPWCSAWBSPEED:
 	{
-		struct pwc_wb_speed *wbs = arg;
+		ARG_DEF(struct pwc_wb_speed, wbs)
 		
-		if (wbs->control_speed > 0) {
-			ret = pwc_set_wb_speed(pdev, wbs->control_speed);
+		if (ARGR(wbs).control_speed > 0) {
+			ret = pwc_set_wb_speed(pdev, ARGR(wbs).control_speed);
 		}
-		if (wbs->control_delay > 0) {
-			ret = pwc_set_wb_delay(pdev, wbs->control_delay);
+		if (ARGR(wbs).control_delay > 0) {
+			ret = pwc_set_wb_delay(pdev, ARGR(wbs).control_delay);
 		}
 		break;
 	}
 	
 	case VIDIOCPWCGAWBSPEED:
 	{
-		struct pwc_wb_speed *wbs = arg;
+		ARG_DEF(struct pwc_wb_speed, wbs)
 		
-		ret = pwc_get_wb_speed(pdev);
+		ret = pwc_get_wb_speed(pdev, &ARGR(wbs).control_speed);
 		if (ret < 0)
 			break;
-		wbs->control_speed = ret;
-		ret = pwc_get_wb_delay(pdev);
+		ret = pwc_get_wb_delay(pdev, &ARGR(wbs).control_delay);
 		if (ret < 0)
 			break;
-		wbs->control_delay = ret;
+		ARG_OUT(wbs)
 		break;
 	}
 
         case VIDIOCPWCSLED:
 	{
-		struct pwc_leds *leds = arg;
+		ARG_DEF(struct pwc_leds, leds)
 
-		ret = pwc_set_leds(pdev, leds->led_on, leds->led_off);
+		ARG_IN(leds)
+		ret = pwc_set_leds(pdev, ARGR(leds).led_on, ARGR(leds).led_off);
 	    	break;
 	}
 
 
 	case VIDIOCPWCGLED:
 	{
-		struct pwc_leds *leds = arg;
+		ARG_DEF(struct pwc_leds, leds)
 		
-		ret = pwc_get_leds(pdev, &leds->led_on, &leds->led_off); 
+		ret = pwc_get_leds(pdev, &ARGR(leds).led_on, &ARGR(leds).led_off);
+		ARG_OUT(leds)
 		break;
 	}
 
 	case VIDIOCPWCSCONTOUR:
 	{
-		int *contour = arg;
+		ARG_DEF(int, contour)
 
-		ret = pwc_set_contour(pdev, *contour);
+		ARG_IN(contour)
+		ret = pwc_set_contour(pdev, ARGR(contour));
 		break;
 	}
 			
 	case VIDIOCPWCGCONTOUR:
 	{
-		int *contour = arg;
+		ARG_DEF(int, contour)
 		
-		ret = pwc_get_contour(pdev, contour);
+		ret = pwc_get_contour(pdev, ARGA(contour));
+		ARG_OUT(contour)
 		break;
 	}
 	
 	case VIDIOCPWCSBACKLIGHT:
 	{
-		int *backlight = arg;
+		ARG_DEF(int, backlight)
 		
-		ret = pwc_set_backlight(pdev, *backlight);
+		ARG_IN(backlight)
+		ret = pwc_set_backlight(pdev, ARGR(backlight));
 		break;
 	}
 
 	case VIDIOCPWCGBACKLIGHT:
 	{
-		int *backlight = arg;
+		ARG_DEF(int, backlight)
 		
-		ret = pwc_get_backlight(pdev);
-		if (ret >= 0)
-			*backlight = ret;
+		ret = pwc_get_backlight(pdev, ARGA(backlight));
+		ARG_OUT(backlight)
 		break;
 	}
 	
 	case VIDIOCPWCSFLICKER:
 	{
-		int *flicker = arg;
+		ARG_DEF(int, flicker)
 		
-		ret = pwc_set_flicker(pdev, *flicker);
+		ARG_IN(flicker)
+		ret = pwc_set_flicker(pdev, ARGR(flicker));
 		break;
 	}
 
 	case VIDIOCPWCGFLICKER:
 	{
-		int *flicker = arg;
+		ARG_DEF(int, flicker)
 		
-		ret = pwc_get_flicker(pdev);
-		if (ret >= 0)
-			*flicker = ret;
+		ret = pwc_get_flicker(pdev, ARGA(flicker));
+		ARG_OUT(flicker)
 		break;
 	}
 	
 	case VIDIOCPWCSDYNNOISE:
 	{
-		int *dynnoise = arg;
+		ARG_DEF(int, dynnoise)
 		
-		ret = pwc_set_dynamic_noise(pdev, *dynnoise);
+		ARG_IN(dynnoise)
+		ret = pwc_set_dynamic_noise(pdev, ARGR(dynnoise));
 		break;
 	}
 	
 	case VIDIOCPWCGDYNNOISE:
 	{
-		int *dynnoise = arg;
+		ARG_DEF(int, dynnoise)
 
-		ret = pwc_get_dynamic_noise(pdev);
-		if (ret < 0)
-			break;
-		*dynnoise = ret;
+		ret = pwc_get_dynamic_noise(pdev, ARGA(dynnoise));
+		ARG_OUT(dynnoise);
 		break;
 	}
 
 	case VIDIOCPWCGREALSIZE:
 	{
-		struct pwc_imagesize *size = arg;
+		ARG_DEF(struct pwc_imagesize, size)
 		
-		size->width = pdev->image.x;
-		size->height = pdev->image.y;
+		ARGR(size).width = pdev->image.x;
+		ARGR(size).height = pdev->image.y;
+		ARG_OUT(size)
 		break;
  	}
  	
  	case VIDIOCPWCMPTRESET:
  	{
- 		int *flags = arg;
- 		
  		if (pdev->features & FEATURE_MOTOR_PANTILT)
  		{
-			ret = pwc_mpt_reset(pdev, *flags);
+	 		ARG_DEF(int, flags)
+
+ 			ARG_IN(flags)
+			ret = pwc_mpt_reset(pdev, ARGR(flags));
  			if (ret >= 0)
  			{
  				pdev->pan_angle = 0;
@@ -1582,11 +1506,15 @@
  		}
  		break;		
  	}
+ 	
  	case VIDIOCPWCMPTGRANGE:
  	{
  		if (pdev->features & FEATURE_MOTOR_PANTILT)
  		{
- 			memcpy(arg, &pdev->angle_range, sizeof(struct pwc_mpt_range));
+ 			ARG_DEF(struct pwc_mpt_range, range)
+ 			
+ 			ARGR(range) = pdev->angle_range;
+ 			ARG_OUT(range)
  		}
  		else
  		{	
@@ -1597,23 +1525,25 @@
  	
  	case VIDIOCPWCMPTSANGLE:
  	{
- 		struct pwc_mpt_angles *angles = arg;
  		int new_pan, new_tilt;
  		
  		if (pdev->features & FEATURE_MOTOR_PANTILT)
  		{
+	 		ARG_DEF(struct pwc_mpt_angles, angles)
+
+	 		ARG_IN(angles)
 			/* The camera can only set relative angles, so
 			   do some calculations when getting an absolute angle .
 			 */
-			if (angles->absolute)
+			if (ARGR(angles).absolute)
 			{
- 				new_pan  = angles->pan; 
- 				new_tilt = angles->tilt;
+ 				new_pan  = ARGR(angles).pan; 
+ 				new_tilt = ARGR(angles).tilt;
  			}
  			else
  			{
- 				new_pan  = pdev->pan_angle  + angles->pan;
- 				new_tilt = pdev->tilt_angle + angles->tilt;
+ 				new_pan  = pdev->pan_angle  + ARGR(angles).pan;
+ 				new_tilt = pdev->tilt_angle + ARGR(angles).tilt;
 			}
 			/* check absolute ranges */
 			if (new_pan  < pdev->angle_range.pan_min  ||
@@ -1649,17 +1579,19 @@
  			ret = -ENXIO;
  		}
  		break;
- 	} 
- 	
+ 	}
+
  	case VIDIOCPWCMPTGANGLE:
  	{
- 		struct pwc_mpt_angles *angles = arg;
  		
  		if (pdev->features & FEATURE_MOTOR_PANTILT)
  		{
- 			angles->absolute = 1;
- 			angles->pan  = pdev->pan_angle;
- 			angles->tilt = pdev->tilt_angle;
+	 		ARG_DEF(struct pwc_mpt_angles, angles)
+
+ 			ARGR(angles).absolute = 1;
+ 			ARGR(angles).pan  = pdev->pan_angle;
+ 			ARGR(angles).tilt = pdev->tilt_angle;
+ 			ARG_OUT(angles)
  		}
  		else
  		{
@@ -1670,19 +1602,34 @@
  
  	case VIDIOCPWCMPTSTATUS:
  	{
- 		struct pwc_mpt_status *status = arg;
- 	
  		if (pdev->features & FEATURE_MOTOR_PANTILT)
  		{
- 			ret = pwc_mpt_get_status(pdev, status);
+ 			ARG_DEF(struct pwc_mpt_status, status)
+ 			
+ 			ret = pwc_mpt_get_status(pdev, ARGA(status));
+ 			ARG_OUT(status)
  		}
  		else
  		{
  			ret = -ENXIO;
  		}
-  		break;
-  	}
-  	
+ 		break;
+	}
+
+	case VIDIOCPWCGVIDCMD:
+	{
+		ARG_DEF(struct pwc_video_command, cmd);
+		
+                ARGR(cmd).type = pdev->type;
+		ARGR(cmd).release = pdev->release;
+		ARGR(cmd).command_len = pdev->cmd_len;
+		memcpy(&ARGR(cmd).command_buf, pdev->cmd_buf, pdev->cmd_len);
+		ARGR(cmd).bandlength = pdev->vbandlength;
+		ARGR(cmd).frame_size = pdev->frame_size;
+		ARG_OUT(cmd)
+		break;
+	}
+
 	default:
 		ret = -ENOIOCTLCMD;
 		break;
--- diff/drivers/usb/media/pwc-if.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/media/pwc-if.c	2004-07-01 21:32:46.000000000 +0100
@@ -1,6 +1,6 @@
-/* Linux driver for Philips webcam 
+/* Linux driver for Philips webcam
    USB and Video4Linux interface part.
-   (C) 1999-2003 Nemosoft Unv.
+   (C) 1999-2004 Nemosoft Unv.
 
    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
@@ -42,7 +42,7 @@
    - Alistar Moire: QuickCam 3000 Pro device/product ID
    - Tony Hoyle: Creative Labs Webcam 5 device/product ID
    - Mark Burazin: solving hang in VIDIOCSYNC when camera gets unplugged
-   - Jk Fang: SOTEC Afina Eye ID
+   - Jk Fang: Sotec Afina Eye ID
    - Xavier Roche: QuickCam Pro 4000 ID
    - Jens Knudsen: QuickCam Zoom ID
    - J. Debert: QuickCam for Notebooks ID
@@ -90,6 +90,7 @@
 	{ USB_DEVICE(0x041E, 0x400C) }, /* Creative Webcam 5 */
 	{ USB_DEVICE(0x041E, 0x4011) }, /* Creative Webcam Pro Ex */
 	{ USB_DEVICE(0x04CC, 0x8116) }, /* Afina Eye */
+	{ USB_DEVICE(0x06BE, 0x8116) }, /* new Afina Eye */
 	{ USB_DEVICE(0x0d81, 0x1910) }, /* Visionite */
 	{ USB_DEVICE(0x0d81, 0x1900) },
 	{ }
@@ -129,7 +130,7 @@
 
 static int pwc_video_open(struct inode *inode, struct file *file);
 static int pwc_video_close(struct inode *inode, struct file *file);
-static ssize_t pwc_video_read(struct file *file, char *buf,
+static ssize_t pwc_video_read(struct file *file, char __user *buf,
 			  size_t count, loff_t *ppos);
 static unsigned int pwc_video_poll(struct file *file, poll_table *wait);
 static int  pwc_video_ioctl(struct inode *inode, struct file *file,
@@ -151,7 +152,9 @@
 	.name =		"Philips Webcam",	/* Filled in later */
 	.type =		VID_TYPE_CAPTURE,
 	.hardware =	VID_HARDWARE_PWC,
+	.release =	video_device_release,
 	.fops =         &pwc_fops,
+	.minor =        -1,
 };
 
 /***************************************************************************/
@@ -258,7 +261,7 @@
 		return -ENXIO;
 	}
 #endif	
-	/* Allocate Isochronous pipe buffers */
+	/* Allocate Isochronuous pipe buffers */
 	for (i = 0; i < MAX_ISO_BUFS; i++) {
 		if (pdev->sbuf[i].data == NULL) {
 			kbuf = kmalloc(ISO_BUFFER_SIZE, GFP_KERNEL);
@@ -443,7 +446,7 @@
 {
 	int ret;
 	unsigned long flags;
-	
+
 	ret = 0;
 	spin_lock_irqsave(&pdev->ptrlock, flags);
 	if (pdev->fill_frame != NULL) {
@@ -488,7 +491,7 @@
 
 /**
   \brief Reset all buffers, pointers and lists, except for the image_used[] buffer.
-  
+
   If the image_used[] buffer is cleared too, mmap()/VIDIOCSYNC will run into trouble.
  */
 static void pwc_reset_buffers(struct pwc_device *pdev)
@@ -525,7 +528,7 @@
 {
 	int ret = 0;
 	unsigned long flags;
-	
+
 	spin_lock_irqsave(&pdev->ptrlock, flags);
 	/* First grab our read_frame; this is removed from all lists, so
 	   we can release the lock after this without problems */
@@ -548,7 +551,7 @@
 			Trace(TRACE_SEQUENCE, "Decompressing frame %d\n", pdev->read_frame->sequence);
 #endif
 			/* Decompression is a lenghty process, so it's outside of the lock.
-			   This gives the isoc_handler the opportunity to fill more frames 
+			   This gives the isoc_handler the opportunity to fill more frames
 			   in the mean time.
 			*/
 			spin_unlock_irqrestore(&pdev->ptrlock, flags);
@@ -643,7 +646,7 @@
 	else {
 		fillptr = fbuf->data + fbuf->filled;
 	}
-	
+
 	/* Reset ISOC error counter. We did get here, after all. */
 	pdev->visoc_errors = 0;
 
@@ -662,8 +665,8 @@
 					pdev->vsync = 2;
 
 					/* ...copy data to frame buffer, if possible */
-					if (flen + fbuf->filled > pdev->frame_size) {
-						Trace(TRACE_FLOW, "Frame buffer overflow (flen = %d, frame_size = %d).\n", flen, pdev->frame_size);
+					if (flen + fbuf->filled > pdev->frame_total_size) {
+						Trace(TRACE_FLOW, "Frame buffer overflow (flen = %d, frame_total_size = %d).\n", flen, pdev->frame_total_size);
 						pdev->vsync = 0; /* Hmm, let's wait for an EOF (end-of-frame) */
 						pdev->vframes_error++;
 					}
@@ -728,7 +731,7 @@
 						pdev->drop_frames--;
 					else {
 						/* Check for underflow first */
-						if (fbuf->filled < pdev->frame_size) {
+						if (fbuf->filled < pdev->frame_total_size) {
 							Trace(TRACE_FLOW, "Frame buffer underflow (%d bytes); discarded.\n", fbuf->filled);
 							pdev->vframes_error++;
 						}
@@ -817,7 +820,7 @@
 	
 	if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) {
 		Err("Failed to find packet size for video endpoint in current alternate setting.\n");
-		return -ENFILE; /* Odd error, that should be noticeable */
+		return -ENFILE; /* Odd error, that should be noticable */
 	}
 
 	/* Set alternate interface */
@@ -874,7 +877,7 @@
 		if (ret)
 			Err("isoc_init() submit_urb %d failed with error %d\n", i, ret);
 		else
-			Trace(TRACE_OPEN, "URB 0x%p submitted.\n", pdev->sbuf[i].urb);
+			Trace(TRACE_MEMORY, "URB 0x%p submitted.\n", pdev->sbuf[i].urb);
 	}
 
 	/* All is done... */
@@ -886,7 +889,7 @@
 static void pwc_isoc_cleanup(struct pwc_device *pdev)
 {
 	int i;
-	
+
 	Trace(TRACE_OPEN, ">> pwc_isoc_cleanup()\n");
 	if (pdev == NULL)
 		return;
@@ -937,9 +940,9 @@
 		        Trace(TRACE_FLOW, "pwc_set_video_mode attempt 2 failed.\n");
 		}
 	}
-	if (start == 0) 
+	if (start == 0)
 	{
-		if (pwc_isoc_init(pdev) < 0) 
+		if (pwc_isoc_init(pdev) < 0)
 		{
 			Info("Failed to restart ISOC transfers in pwc_try_video_mode.\n");
 			ret = -EAGAIN; /* let's try again, who knows if it works a second time */
@@ -972,27 +975,31 @@
 		Trace(TRACE_OPEN, "Doing first time initialization.\n");
 		pdev->usb_init = 1;
 		
-		if (pwc_trace & TRACE_OPEN) {
+		if (pwc_trace & TRACE_OPEN)
+		{
 			/* Query sensor type */
 			const char *sensor_type = NULL;
+			int ret;
 
-			i = pwc_get_cmos_sensor(pdev);
-			switch(i) {
-			case -1: /* Unknown, show nothing */; break;
-			case 0x00:  sensor_type = "Hyundai CMOS sensor"; break;
-			case 0x20:  sensor_type = "Sony CCD sensor + TDA8787"; break;
-			case 0x2E:  sensor_type = "Sony CCD sensor + Exas 98L59"; break;
-			case 0x2F:  sensor_type = "Sony CCD sensor + ADI 9804"; break;
-			case 0x30:  sensor_type = "Sharp CCD sensor + TDA8787"; break;
-			case 0x3E:  sensor_type = "Sharp CCD sensor + Exas 98L59"; break;
-			case 0x3F:  sensor_type = "Sharp CCD sensor + ADI 9804"; break;
-			case 0x40:  sensor_type = "UPA 1021 sensor"; break;
-			case 0x100: sensor_type = "VGA sensor"; break;
-			case 0x101: sensor_type = "PAL MR sensor"; break;
-			default:    sensor_type = "unknown type of sensor"; break;
+			ret = pwc_get_cmos_sensor(pdev, &i);
+			if (ret >= 0)
+			{
+				switch(i) {
+				case 0x00:  sensor_type = "Hyundai CMOS sensor"; break;
+				case 0x20:  sensor_type = "Sony CCD sensor + TDA8787"; break;
+				case 0x2E:  sensor_type = "Sony CCD sensor + Exas 98L59"; break;
+				case 0x2F:  sensor_type = "Sony CCD sensor + ADI 9804"; break;
+				case 0x30:  sensor_type = "Sharp CCD sensor + TDA8787"; break;
+				case 0x3E:  sensor_type = "Sharp CCD sensor + Exas 98L59"; break;
+				case 0x3F:  sensor_type = "Sharp CCD sensor + ADI 9804"; break;
+				case 0x40:  sensor_type = "UPA 1021 sensor"; break;
+				case 0x100: sensor_type = "VGA sensor"; break;
+				case 0x101: sensor_type = "PAL MR sensor"; break;
+				default:    sensor_type = "unknown type of sensor"; break;
+				}
 			}
 			if (sensor_type != NULL)
-				Info("This %s camera is equipped with a %s (%d).\n", pdev->vdev.name, sensor_type, i);
+				Info("This %s camera is equipped with a %s (%d).\n", pdev->vdev->name, sensor_type, i);
 		}
 	}
 
@@ -1037,6 +1044,7 @@
 
 	/* Set some defaults */
 	pdev->vsnapshot = 0;
+
 	/* Start iso pipe for video; first try the last used video size
 	   (or the default one); if that fails try QCIF/10 or QSIF/10;
 	   it that fails too, give up.
@@ -1090,7 +1098,7 @@
 
 	/* Dump statistics, but only if a reasonable amount of frames were
 	   processed (to prevent endless log-entries in case of snap-shot
-	   programs) 
+	   programs)
 	 */
 	if (pdev->vframe_count > 20)
 		Info("Closing video device: %d frames received, dumped %d frames, %d frames with errors.\n", pdev->vframe_count, pdev->vframes_dumped, pdev->vframes_error);
@@ -1111,7 +1119,7 @@
 			Info("Failed to set LED on/off time.\n");
 		if (power_save) {
 			i = pwc_camera_power(pdev, 0);
-			if (i < 0) 
+			if (i < 0)
 				Err("Failed to power down camera (%d)\n", i);
 		}
 	}
@@ -1132,13 +1140,14 @@
                 device is tricky anyhow.
  */
 
-static ssize_t pwc_video_read(struct file *file, char *buf,
+static ssize_t pwc_video_read(struct file *file, char __user *buf,
 			  size_t count, loff_t *ppos)
 {
 	struct video_device *vdev = file->private_data;
 	struct pwc_device *pdev;
 	int noblock = file->f_flags & O_NONBLOCK;
 	DECLARE_WAITQUEUE(wait, current);
+        int bytes_to_read;
 
 	Trace(TRACE_READ, "video_read(0x%p, %p, %d) called.\n", vdev, buf, count);
 	if (vdev == NULL)
@@ -1175,20 +1184,25 @@
 		}
 		remove_wait_queue(&pdev->frameq, &wait);
 		set_current_state(TASK_RUNNING);
-	                                                                                                                                                                                
+                                                                                                                                                                                
 		/* Decompress and release frame */
 		if (pwc_handle_frame(pdev))
 			return -EFAULT;
 	}
 
 	Trace(TRACE_READ, "Copying data to user space.\n");
+	if (pdev->vpalette == VIDEO_PALETTE_RAW)
+		bytes_to_read = pdev->frame_size;
+	else
+ 		bytes_to_read = pdev->view.size;
+
 	/* copy bytes to user space; we allow for partial reads */
-	if (count + pdev->image_read_pos > pdev->view.size)
-		count = pdev->view.size - pdev->image_read_pos;
+	if (count + pdev->image_read_pos > bytes_to_read)
+		count = bytes_to_read - pdev->image_read_pos;
 	if (copy_to_user(buf, pdev->image_ptr[pdev->fill_image] + pdev->image_read_pos, count))
 		return -EFAULT;
 	pdev->image_read_pos += count;
-	if (pdev->image_read_pos >= pdev->view.size) { /* All data has been read */
+	if (pdev->image_read_pos >= bytes_to_read) { /* All data has been read */
 		pdev->image_read_pos = 0;
 		pwc_next_image(pdev);
 	}
@@ -1260,7 +1274,7 @@
 		}
 
 		case VIDIOCSCHAN:
-		{	
+		{
 			/* The spec says the argument is an integer, but
 			   the bttv driver uses a video_channel arg, which
 			   makes sense becasue it also has the norm flag.
@@ -1278,8 +1292,6 @@
 			struct video_picture *p = arg;
 			int val;
 
-			p->colour = 0x8000;
-			p->hue = 0x8000;
 			val = pwc_get_brightness(pdev);
 			if (val >= 0)
 				p->brightness = val;
@@ -1302,11 +1314,11 @@
 			else
 				p->colour = 0xffff;
 			p->depth = 24;
-			p->palette = VIDEO_PALETTE_YUV420P;
+			p->palette = pdev->vpalette;
 			p->hue = 0xFFFF; /* N/A */
 			break;
 		}
-		
+
 		case VIDIOCSPICT:
 		{
 			struct video_picture *p = arg;
@@ -1318,13 +1330,22 @@
 			                is used exactly once in the uncompress
 			                routine.
 			 */
-			if (p->palette && p->palette != VIDEO_PALETTE_YUV420P) {
-				return -EINVAL;
-			}
 			pwc_set_brightness(pdev, p->brightness);
 			pwc_set_contrast(pdev, p->contrast);
 			pwc_set_gamma(pdev, p->whiteness);
 			pwc_set_saturation(pdev, p->colour);
+			if (p->palette && p->palette != pdev->vpalette) {
+				switch (p->palette) {
+					case VIDEO_PALETTE_YUV420P:
+					case VIDEO_PALETTE_RAW:
+						pdev->vpalette = p->palette;
+						return pwc_try_video_mode(pdev, pdev->image.x, pdev->image.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot);
+						break;
+					default:
+						return -EINVAL;
+						break;
+				}
+			}
 			break;
 		}
 
@@ -1398,13 +1419,23 @@
 			   various palettes... The driver doesn't support
 			   such small images, so I'm working around it.
 			 */
-			if (vm->format && vm->format != VIDEO_PALETTE_YUV420P)
-				return -EINVAL;
-			 
+			if (vm->format)
+			{
+				switch (vm->format)
+				{
+					case VIDEO_PALETTE_YUV420P:
+					case VIDEO_PALETTE_RAW:
+						break;
+					default:
+						return -EINVAL;
+						break;
+				}
+			}
+
 			if ((vm->width != pdev->view.x || vm->height != pdev->view.y) &&
 			    (vm->width >= pdev->view_min.x && vm->height >= pdev->view_min.y)) {
 				int ret;
-				
+
 				Trace(TRACE_OPEN, "VIDIOCMCAPTURE: changing size to please xawtv :-(.\n");
 				ret = pwc_try_video_mode(pdev, vm->width, vm->height, pdev->vframes, pdev->vcompression, pdev->vsnapshot);
 				if (ret)
@@ -1523,7 +1554,7 @@
 		{
 			struct video_unit *vu = arg;
 			
-			vu->video = pdev->vdev.minor & 0x3F;
+			vu->video = pdev->vdev->minor & 0x3F;
 			vu->audio = -1; /* not known yet */
 			vu->vbi = -1;
 			vu->radio = -1;
@@ -1636,12 +1667,12 @@
 			type_id = 690;
 			break;
 		case 0x0310:
-			Info("Philips PCVC730K (ToUCam Fun) USB webcam detected.\n");
+			Info("Philips PCVC730K (ToUCam Fun)/PCVC830 (ToUCam II) USB webcam detected.\n");
 			name = "Philips 730 webcam";
 			type_id = 730;
 			break;
 		case 0x0311:
-			Info("Philips PCVC740K (ToUCam Pro) USB webcam detected.\n");
+			Info("Philips PCVC740K (ToUCam Pro)/PCVC840 (ToUCam II) USB webcam detected.\n");
 			name = "Philips 740 webcam";
 			type_id = 740;
 			break;
@@ -1755,17 +1786,44 @@
 			break;
 		}
 	}
-	else if (vendor_id == 0x04cc) { 
+	else if (vendor_id == 0x04cc) {
 		switch(product_id) {
 		case 0x8116:
 			Info("Sotec Afina Eye USB webcam detected.\n");
 			name = "Sotec Afina Eye";
 			type_id = 730;
-			break;  
+			break;
+		default:
+			return -ENODEV;
+			break;
+		}
+	}
+	else if (vendor_id == 0x06be) {
+		switch(product_id) {
+		case 0x8116:
+			/* Basicly the same as the Sotec Afina Eye */                
+			Info("AME CU-001 USB webcam detected.\n");
+			name = "AME CU-001";
+			type_id = 730;
+			break;
+		default:
+			return -ENODEV;
+			break;
+		}
+	}
+	else if (vendor_id == 0x06be) {
+		switch(product_id) {
+		case 0x8116:
+			/* This is essentially the same cam as the Sotec Afina Eye */
+			Info("AME Co. Afina Eye USB webcam detected.\n");
+			name = "AME Co. Afina Eye";
+			type_id = 750;
+			break;
 		default:
 			return -ENODEV;
 			break;
 		}
+	
 	}
 	else if (vendor_id == 0x0d81) {
 		switch(product_id) {
@@ -1804,6 +1862,7 @@
 	pdev->type = type_id;
 	pdev->vsize = default_size;
 	pdev->vframes = default_fps;
+	strcpy(pdev->serial, serial_number);
 	pdev->features = features;
 	if (vendor_id == 0x046D && product_id == 0x08B5)
 	{
@@ -1815,8 +1874,6 @@
 		pdev->angle_range.pan_max  =  7000;
 		pdev->angle_range.tilt_min = -3000;
 		pdev->angle_range.tilt_max =  2500;
-		pdev->angle_range.zoom_min = -1;
-		pdev->angle_range.zoom_max = -1;
 	}
 
 	init_MUTEX(&pdev->modlock);
@@ -1826,11 +1883,19 @@
 	init_waitqueue_head(&pdev->frameq);
 	pdev->vcompression = pwc_preferred_compression;
 
-	memcpy(&pdev->vdev, &pwc_template, sizeof(pwc_template));
-	strcpy(pdev->vdev.name, name);
-	pdev->vdev.owner = THIS_MODULE;
-	pdev->vdev.priv = pdev;
-	
+	/* Allocate video_device structure */
+	pdev->vdev = video_device_alloc();
+	if (pdev->vdev == 0)
+	{
+		Err("Err, cannot allocate video_device struture. Failing probe.");
+		kfree(pdev);
+		return -ENOMEM;
+	}
+	memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template));
+	strcpy(pdev->vdev->name, name);
+	pdev->vdev->owner = THIS_MODULE;
+	video_set_drvdata(pdev->vdev, pdev);
+
 	pdev->release = udev->descriptor.bcdDevice;
 	Trace(TRACE_PROBE, "Release: %04x\n", pdev->release);
 
@@ -1848,15 +1913,16 @@
 		}
 	}
 
-	pdev->vdev.release = video_device_release;
-	i = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, video_nr);
+	pdev->vdev->release = video_device_release;
+	i = video_register_device(pdev->vdev, VFL_TYPE_GRABBER, video_nr);
 	if (i < 0) {
 		Err("Failed to register as video device (%d).\n", i);
+		video_device_release(pdev->vdev); /* Drip... drip... drip... */
 		kfree(pdev); /* Oops, no memory leaks please */
 		return -EIO;
 	}
 	else {
-		Info("Registered as /dev/video%d.\n", pdev->vdev.minor & 0x3F);
+		Info("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F);
 	}
 
 	/* occupy slot */
@@ -1894,14 +1960,14 @@
 		Err("pwc_disconnect() Magic number failed. Consult your scrolls and try again.\n");
 		goto disconnect_out;
 	}
-#endif	
+#endif
 	
 	/* We got unplugged; this is signalled by an EPIPE error code */
 	if (pdev->vopen) {
 		Info("Disconnected while webcam is in use!\n");
 		pdev->error_status = EPIPE;
 	}
-	
+
 	/* Alert waiting processes */
 	wake_up_interruptible(&pdev->frameq);
 	/* Wait until device is closed */
@@ -1909,7 +1975,7 @@
 		schedule();
 	/* Device is now closed, so we can safely unregister it */
 	Trace(TRACE_PROBE, "Unregistering video device in disconnect().\n");
-	video_unregister_device(&pdev->vdev); 
+	video_unregister_device(pdev->vdev);
 
 	/* Free memory (don't set pdev to 0 just yet) */
 	kfree(pdev);
@@ -1928,7 +1994,7 @@
 static int pwc_atoi(const char *s)
 {
 	int k = 0;
-	
+
 	k = 0;
 	while (*s != '\0' && *s >= '0' && *s <= '9') {
 		k = 10 * k + (*s - '0');
@@ -1971,7 +2037,7 @@
 MODULE_PARM_DESC(dev_hint, "Device node hints");
 
 MODULE_DESCRIPTION("Philips & OEM USB webcam driver");
-MODULE_AUTHOR("Nemosoft Unv. <nemosoft@smcc.demon.nl>");
+MODULE_AUTHOR("Nemosoft Unv. <webcam@smcc.demon.nl>");
 MODULE_LICENSE("GPL");
 
 static int __init usb_pwc_init(void)
@@ -1979,9 +2045,10 @@
 	int i, sz;
 	char *sizenames[PSZ_MAX] = { "sqcif", "qsif", "qcif", "sif", "cif", "vga" };
 
-	Info("Philips PCA645/646 + PCVC675/680/690 + PCVC730/740/750 webcam module version " PWC_VERSION " loaded.\n");
-	Info("Also supports the Askey VC010, various Logitech QuickCams, Samsung MPC-C10 and MPC-C30,\n");
-	Info("the Creative WebCam 5, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.\n");
+	Info("Philips webcam module version " PWC_VERSION " loaded.\n");
+	Info("Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.\n");
+	Info("Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,\n");
+	Info("the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.\n");
 
 	if (fps) {
 		if (fps < 4 || fps > 30) {
@@ -1991,7 +2058,7 @@
 		default_fps = fps;
 		Info("Default framerate set to %d.\n", default_fps);
 	}
-	
+
 	if (size) {
 		/* string; try matching with array */
 		for (sz = 0; sz < PSZ_MAX; sz++) {
@@ -2041,12 +2108,12 @@
 	if (leds[1] >= 0)
 		led_off = leds[1];
 
-	/* Big device node whoopla. Basically, it allows you to assign a 
-	   device node (/dev/videoX) to a camera, based on its type 
+	/* Big device node whoopla. Basicly, it allows you to assign a
+	   device node (/dev/videoX) to a camera, based on its type
 	   & serial number. The format is [type[.serialnumber]:]node.
 
-           Any camera that isn't matched by these rules gets the next 
-           available free device node.
+	   Any camera that isn't matched by these rules gets the next
+	   available free device node.
 	 */
 	for (i = 0; i < MAX_DEV_HINTS; i++) {
 		char *s, *colon, *dot;
--- diff/drivers/usb/media/pwc-ioctl.h	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/pwc-ioctl.h	2004-07-01 21:32:46.000000000 +0100
@@ -1,8 +1,8 @@
 #ifndef PWC_IOCTL_H
 #define PWC_IOCTL_H
 
-/* (C) 2001-2003 Nemosoft Unv.    webcam@smcc.demon.nl
-   
+/* (C) 2001-2004 Nemosoft Unv.    webcam@smcc.demon.nl
+
    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
@@ -18,19 +18,24 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
-/*         This is pwc-ioctl.h belonging to PWC 8.10                        */
+/* This is pwc-ioctl.h belonging to PWC 8.12.1
+   It contains structures and defines to communicate from user space
+   directly to the driver.
+ */
 
-/* 
+/*
    Changes
-   2001/08/03  Alvarado   Added ioctl constants to access methods for 
+   2001/08/03  Alvarado   Added ioctl constants to access methods for
                           changing white balance and red/blue gains
    2002/12/15  G. H. Fernandez-Toribio   VIDIOCGREALSIZE
+   2003/12/13  Nemosft Unv. Some modifications to make interfacing to
+               PWCX easier
  */
 
 /* These are private ioctl() commands, specific for the Philips webcams.
    They contain functions not found in other webcams, and settings not
-   specified in the Video4Linux API. 
-   
+   specified in the Video4Linux API.
+
    The #define names are built up like follows:
    VIDIOC		VIDeo IOCtl prefix
          PWC		Philps WebCam
@@ -40,13 +45,21 @@
  */
 
 
+ /* Enumeration of image sizes */
+#define PSZ_SQCIF	0x00
+#define PSZ_QSIF	0x01
+#define PSZ_QCIF	0x02
+#define PSZ_SIF		0x03
+#define PSZ_CIF		0x04
+#define PSZ_VGA		0x05
+#define PSZ_MAX		6
 
 
 /* The frame rate is encoded in the video_window.flags parameter using
    the upper 16 bits, since some flags are defined nowadays. The following
    defines provide a mask and shift to filter out this value.
-   
-   In 'Snapshot' mode the camera freezes its automatic exposure and colour 
+
+   In 'Snapshot' mode the camera freezes its automatic exposure and colour
    balance controls.
  */
 #define PWC_FPS_SHIFT		16
@@ -55,14 +68,26 @@
 #define PWC_FPS_SNAPSHOT	0x00400000
 
 
+/* structure for transfering x & y coordinates */
+struct pwc_coord
+{
+	int x, y;		/* guess what */
+	int size;		/* size, or offset */
+};
+
 
+/* Used with VIDIOCPWCPROBE */
 struct pwc_probe
 {
 	char name[32];
 	int type;
 };
 
-
+struct pwc_serial
+{
+	char serial[30];	/* String with serial number. Contains terminating 0 */
+};
+	
 /* pwc_whitebalance.mode values */
 #define PWC_WB_INDOOR		0
 #define PWC_WB_OUTDOOR		1
@@ -78,7 +103,6 @@
    otherwise undefined.
    'read_red' and 'read_blue' are read-only.
 */   
-   
 struct pwc_whitebalance
 {
 	int mode;
@@ -117,7 +141,7 @@
 #define PWC_MPT_TILT		0x02
 #define PWC_MPT_TIMEOUT		0x04 /* for status */
 
-/* Set angles; when absolute = 1, the angle is absolute and the 
+/* Set angles; when absolute != 0, the angle is absolute and the 
    driver calculates the relative offset for you. This can only
    be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns
    absolute angles.
@@ -127,18 +151,14 @@
 	int absolute;		/* write-only */
 	int pan;		/* degrees * 100 */
 	int tilt;		/* degress * 100 */
-	int zoom;		/* N/A, set to -1 */
 };
 
 /* Range of angles of the camera, both horizontally and vertically.
-   The zoom is not used, maybe in the future...
-
  */
 struct pwc_mpt_range
 {
 	int pan_min, pan_max;		/* degrees * 100 */
 	int tilt_min, tilt_max;
-	int zoom_min, zoom_max;		/* -1, -1 */
 };
 
 struct pwc_mpt_status
@@ -149,6 +169,30 @@
 };
 
 
+/* This is used for out-of-kernel decompression. With it, you can get
+   all the necessary information to initialize and use the decompressor
+   routines in standalone applications.
+ */   
+struct pwc_video_command
+{
+	int type;		/* camera type (645, 675, 730, etc.) */
+	int release;		/* release number */
+
+        int size;		/* one of PSZ_* */
+        int alternate;
+	int command_len;	/* length of USB video command */
+	unsigned char command_buf[13];	/* Actual USB video command */
+	int bandlength;		/* >0 = compressed */
+	int frame_size;		/* Size of one (un)compressed frame */
+};
+
+/* Flags for PWCX subroutines. Not all modules honour all flags. */
+#define PWCX_FLAG_PLANAR	0x0001
+#define PWCX_FLAG_BAYER		0x0008
+
+
+/* IOCTL definitions */
+
  /* Restore user settings */
 #define VIDIOCPWCRUSER		_IO('v', 192)
  /* Save user settings */
@@ -169,16 +213,19 @@
 #define VIDIOCPWCGCQUAL		_IOR('v', 195, int)
 
 
+/* Retrieve serial number of camera */
+#define VIDIOCPWCGSERIAL	_IOR('v', 198, struct pwc_serial)
+
  /* This is a probe function; since so many devices are supported, it
     becomes difficult to include all the names in programs that want to
     check for the enhanced Philips stuff. So in stead, try this PROBE;
-    it returns a structure with the original name, and the corresponding 
+    it returns a structure with the original name, and the corresponding
     Philips type.
     To use, fill the structure with zeroes, call PROBE and if that succeeds,
     compare the name with that returned from VIDIOCGCAP; they should be the
     same. If so, you can be assured it is a Philips (OEM) cam and the type
     is valid.
- */    
+ */
 #define VIDIOCPWCPROBE		_IOR('v', 199, struct pwc_probe)
 
  /* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */
@@ -225,5 +272,8 @@
 #define VIDIOCPWCMPTSANGLE	_IOW('v', 212, struct pwc_mpt_angles)
 #define VIDIOCPWCMPTGANGLE	_IOR('v', 212, struct pwc_mpt_angles)
 #define VIDIOCPWCMPTSTATUS	_IOR('v', 213, struct pwc_mpt_status)
- 
+
+ /* Get the USB set-video command; needed for initializing libpwcx */
+#define VIDIOCPWCGVIDCMD	_IOR('v', 215, struct pwc_video_command)
+
 #endif
--- diff/drivers/usb/media/pwc-misc.c	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/pwc-misc.c	2004-07-01 21:32:46.000000000 +0100
@@ -15,13 +15,13 @@
    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/slab.h>
 
 #include "pwc.h"
 
-struct pwc_coord pwc_image_sizes[PSZ_MAX] = 
+struct pwc_coord pwc_image_sizes[PSZ_MAX] =
 {
 	{ 128,  96, 0 },
 	{ 160, 120, 0 },
@@ -36,11 +36,30 @@
 {
 	int i, find;
 
-	/* Make sure we don't go beyond our max size */
-	if (width > pdev->view_max.x || height > pdev->view_max.y)
-		return -1;
+	/* Make sure we don't go beyond our max size.
+           NB: we have different limits for RAW and normal modes. In case
+           you don't have the decompressor loaded or use RAW mode, 
+           the maximum viewable size is smaller.
+        */
+	if (pdev->vpalette == VIDEO_PALETTE_RAW)
+	{
+		if (width > pdev->abs_max.x || height > pdev->abs_max.y)
+		{
+			Debug("VIDEO_PALETTE_RAW: going beyond abs_max.\n");
+                	return -1;
+                }
+	}
+	else
+	{
+		if (width > pdev->view_max.x || height > pdev->view_max.y)
+		{
+			Debug("VIDEO_PALETTE_ not RAW: going beyond view_max.\n");
+			return -1;
+		}
+	}
+
 	/* Find the largest size supported by the camera that fits into the
-	   requested size. 
+	   requested size.
 	 */
 	find = -1;
 	for (i = 0; i < PSZ_MAX; i++) {
@@ -62,6 +81,8 @@
 		pdev->view_min.y =  96;
 		pdev->view_max.x = 352;
 		pdev->view_max.y = 288;
+                pdev->abs_max.x  = 352;
+                pdev->abs_max.y  = 288;
 		pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QCIF | 1 << PSZ_CIF;
 		pdev->vcinterface = 2;
 		pdev->vendpoint = 4;
@@ -77,13 +98,14 @@
 		if (pdev->decompressor != NULL) {
 			pdev->view_max.x = 640;
 			pdev->view_max.y = 480;
-			pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QSIF | 1 << PSZ_QCIF | 1 << PSZ_SIF | 1 << PSZ_CIF | 1 << PSZ_VGA;
 		}
 		else {
 			pdev->view_max.x = 352;
 			pdev->view_max.y = 288;
-			pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QSIF | 1 << PSZ_QCIF | 1 << PSZ_SIF | 1 << PSZ_CIF;
 		}
+		pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QSIF | 1 << PSZ_QCIF | 1 << PSZ_SIF | 1 << PSZ_CIF | 1 << PSZ_VGA;
+                pdev->abs_max.x = 640;
+                pdev->abs_max.y = 480;
 		pdev->vcinterface = 3;
 		pdev->vendpoint = 4;
 		pdev->frame_header_size = 0;
@@ -99,24 +121,26 @@
 		if (pdev->decompressor != NULL) {
 			pdev->view_max.x = 640;
 			pdev->view_max.y = 480;
-			pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF | 1 << PSZ_VGA;
 		}
 		else {
-			/* Tell CIF, even though SIF really is the maximum, but some tools really need CIF */
+			/* We use CIF, not SIF since some tools really need CIF. So we cheat a bit. */
 			pdev->view_max.x = 352;
 			pdev->view_max.y = 288;
-			pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF;
 		}
+		pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF | 1 << PSZ_VGA;
+                pdev->abs_max.x = 640;
+                pdev->abs_max.y = 480;
 		pdev->vcinterface = 3;
 		pdev->vendpoint = 5;
 		pdev->frame_header_size = TOUCAM_HEADER_SIZE;
 		pdev->frame_trailer_size = TOUCAM_TRAILER_SIZE;
 		break;
 	}
+	pdev->vpalette = VIDEO_PALETTE_YUV420P; /* default */
 	pdev->view_min.size = pdev->view_min.x * pdev->view_min.y;
 	pdev->view_max.size = pdev->view_max.x * pdev->view_max.y;
-	/* length of image, in YUV format */
-	pdev->len_per_image = (pdev->view_max.size * 3) / 2;
+	/* length of image, in YUV format; always allocate enough memory. */
+	pdev->len_per_image = (pdev->abs_max.x * pdev->abs_max.y * 3) / 2;
 }
 
 
--- diff/drivers/usb/media/pwc-uncompress.c	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/pwc-uncompress.c	2004-07-01 21:32:46.000000000 +0100
@@ -1,4 +1,4 @@
-/* Linux driver for Philips webcam 
+/* Linux driver for Philips webcam
    Decompression frontend.
    (C) 1999-2003 Nemosoft Unv. (webcam@smcc.demon.nl)
 
@@ -21,7 +21,9 @@
    themselves. It also has a decompressor wrapper function.
 */
 
+#include <asm/current.h>
 #include <asm/types.h>
+// #include <linux/sched.h>
 
 #include "pwc.h"
 #include "pwc-uncompress.h"
@@ -81,7 +83,6 @@
 	u16 *src;
 	u16 *dsty, *dstu, *dstv;
 
-	
 	if (pdev == NULL)
 		return -EFAULT;
 #if defined(__KERNEL__) && defined(PWC_MAGIC)
@@ -97,16 +98,24 @@
 	image = pdev->image_ptr[pdev->fill_image];
 	if (!image)
 		return -EFAULT;
-	
+
 	yuv = fbuf->data + pdev->frame_header_size;  /* Skip header */
-	if (pdev->vbandlength == 0) { 
+
+	/* Raw format; that's easy... */
+	if (pdev->vpalette == VIDEO_PALETTE_RAW)
+	{
+		memcpy(image, yuv, pdev->frame_size);
+		return 0;
+	}
+
+	if (pdev->vbandlength == 0) {
 		/* Uncompressed mode. We copy the data into the output buffer,
 		   using the viewport size (which may be larger than the image
 		   size). Unfortunately we have to do a bit of byte stuffing
 		   to get the desired output format/size.
 		 */
-			/* 
-			 * We do some byte shuffling here to go from the 
+			/*
+			 * We do some byte shuffling here to go from the
 			 * native format to YUV420P.
 			 */
 			src = (u16 *)yuv;
@@ -140,15 +149,21 @@
 					dstu += (stride >> 1);
 			}
 	}
-	else { 
-		/* Compressed; the decompressor routines will write the data 
+	else {
+		/* Compressed; the decompressor routines will write the data
 		   in planar format immediately.
 		 */
+		int flags;
+                
+                flags = PWCX_FLAG_PLANAR;
+                if (pdev->vsize == PSZ_VGA && pdev->vframes == 5 && pdev->vsnapshot)
+                	flags |= PWCX_FLAG_BAYER;
+
 		if (pdev->decompressor)
 			pdev->decompressor->decompress(
 				&pdev->image, &pdev->view, &pdev->offset,
 				yuv, image,
-				1,
+				flags,
 				pdev->decompress_data, pdev->vbandlength);
 		else
 			return -ENXIO; /* No such device or address: missing decompressor */
--- diff/drivers/usb/media/pwc-uncompress.h	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/pwc-uncompress.h	2004-07-01 21:32:46.000000000 +0100
@@ -24,9 +24,15 @@
 #define PWC_UNCOMPRESS_H
 
 #include <linux/config.h>
+#include <linux/linkage.h>
 #include <linux/list.h>
 
-#include "pwc.h"
+#include "pwc-ioctl.h"
+
+/* from pwc-dec.h */
+#define PWCX_FLAG_PLANAR        0x0001
+/* */
+
 
 #ifdef __cplusplus
 extern "C" {
@@ -42,10 +48,11 @@
 	int  type;		/* type of camera (645, 680, etc) */
 	int  table_size;	/* memory needed */
 
-	void (* init)(int release, void *buffer, void *table);	/* Initialization routine; should be called after each set_video_mode */
+	void (* init)(int type, int release, void *buffer, void *table);	/* Initialization routine; should be called after each set_video_mode */
 	void (* exit)(void);	/* Cleanup routine */
-	void (* decompress)(struct pwc_coord *image, struct pwc_coord *view, struct pwc_coord *offset,
-                            void *src, void *dst, int planar,
+	void (* decompress)(struct pwc_coord *image, struct pwc_coord *view,
+			    struct pwc_coord *offset,
+                            void *src, void *dst, int flags,
 	                    void *table, int bandlength);
 	void (* lock)(void);	/* make sure module cannot be unloaded */
 	void (* unlock)(void);	/* release lock on module */
--- diff/drivers/usb/media/pwc.h	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/pwc.h	2004-07-01 21:32:46.000000000 +0100
@@ -22,15 +22,15 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
-#include <linux/smp_lock.h>
-#include <linux/spinlock.h>
 #include <linux/usb.h>
+#include <linux/spinlock.h>
 #include <linux/videodev.h>
 #include <linux/wait.h>
-
+#include <linux/smp_lock.h>
 #include <asm/semaphore.h>
 #include <asm/errno.h>
 
+#include "pwc-uncompress.h"
 #include "pwc-ioctl.h"
 
 /* Defines and structures for the Philips webcam */
@@ -65,9 +65,9 @@
 #define FEATURE_MOTOR_PANTILT		0x0001
 
 /* Version block */
-#define PWC_MAJOR	8
-#define PWC_MINOR	12
-#define PWC_VERSION 	"8.12"
+#define PWC_MAJOR	9
+#define PWC_MINOR	0
+#define PWC_VERSION 	"9.0.1"
 #define PWC_NAME 	"pwc"
 
 /* Turn certain features on/off */
@@ -90,12 +90,6 @@
 /* Absolute maximum number of buffers available for mmap() */
 #define MAX_IMAGES 		10
 
-struct pwc_coord
-{
-	int x, y;		/* guess what */
-	int size;		/* size, or offset */
-};
-
 /* The following structures were based on cpia.h. Why reinvent the wheel? :-) */
 struct pwc_iso_buf
 {
@@ -118,7 +112,7 @@
 
 struct pwc_device
 {
-   struct video_device vdev;
+   struct video_device *vdev;
 #ifdef PWC_MAGIC
    int magic;
 #endif
@@ -128,6 +122,7 @@
    int type;                    /* type of cam (645, 646, 675, 680, 690, 720, 730, 740, 750) */
    int release;			/* release number */
    int features;		/* feature bits */
+   char serial[30];		/* serial number (string) */
    int error_status;		/* set when something goes wrong with the cam (unplugged, USB errors) */
    int usb_init;		/* set when the cam has been initialized over USB */
 
@@ -137,6 +132,7 @@
    int vcinterface;		/* video control interface */
    int valternate;		/* alternate interface needed */
    int vframes, vsize;		/* frames-per-second & size (see PSZ_*) */
+   int vpalette;		/* palette: 420P, RAW or RGBBAYER */
    int vframe_count;		/* received frames */
    int vframes_dumped; 		/* counter for dumped frames */
    int vframes_error;		/* frames received in error */
@@ -148,6 +144,9 @@
    char vsnapshot;		/* snapshot mode */
    char vsync;			/* used by isoc handler */
    char vmirror;		/* for ToUCaM series */
+   
+   int cmd_len;
+   unsigned char cmd_buf[13];
 
    /* The image acquisition requires 3 to 4 steps:
       1. data is gathered in short packets from the USB controller
@@ -169,8 +168,9 @@
    struct pwc_frame_buf *full_frames, *full_frames_tail;	/* all filled frames */
    struct pwc_frame_buf *fill_frame;	/* frame currently being filled */
    struct pwc_frame_buf *read_frame;	/* frame currently read by user process */
-   int frame_size;
    int frame_header_size, frame_trailer_size;
+   int frame_size;
+   int frame_total_size; /* including header & trailer */
    int drop_frames;
 #if PWC_DEBUG
    int sequence;			/* Debugging aid */
@@ -187,7 +187,8 @@
       a gray or black border. view_min <= image <= view <= view_max;
     */
    int image_mask;			/* bitmask of supported sizes */
-   struct pwc_coord view_min, view_max;	/* minimum and maximum sizes */
+   struct pwc_coord view_min, view_max;	/* minimum and maximum viewable sizes */
+   struct pwc_coord abs_max;            /* maximum supported size with compression */
    struct pwc_coord image, view;	/* image and viewport size */
    struct pwc_coord offset;		/* offset within the viewport */
 
@@ -213,16 +214,6 @@
 #endif
 };
 
-/* Enumeration of image sizes */
-#define PSZ_SQCIF	0x00
-#define PSZ_QSIF	0x01
-#define PSZ_QCIF	0x02
-#define PSZ_SIF		0x03
-#define PSZ_CIF		0x04
-#define PSZ_VGA		0x05
-#define PSZ_MAX		6
-
-
 
 #ifdef __cplusplus
 extern "C" {
@@ -259,7 +250,7 @@
 extern int pwc_set_saturation(struct pwc_device *pdev, int value);
 extern int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value);
 extern int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value);
-extern int pwc_get_cmos_sensor(struct pwc_device *pdev);
+extern int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor);
 
 /* Power down or up the camera; not supported by all models */
 extern int pwc_camera_power(struct pwc_device *pdev, int power);
--- diff/drivers/usb/media/se401.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/media/se401.c	2004-07-01 21:32:46.000000000 +0100
@@ -1121,7 +1121,7 @@
 	return video_usercopy(inode, file, cmd, arg, se401_do_ioctl);
 }
 
-static ssize_t se401_read(struct file *file, char *buf,
+static ssize_t se401_read(struct file *file, char __user *buf,
 		     size_t count, loff_t *ppos)
 {
 	int realcount=count, ret=0;
--- diff/drivers/usb/media/stv680.c	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/stv680.c	2004-07-01 21:32:46.000000000 +0100
@@ -1309,7 +1309,7 @@
 	return 0;
 }
 
-static ssize_t stv680_read (struct file *file, char *buf,
+static ssize_t stv680_read (struct file *file, char __user *buf,
 			size_t count, loff_t *ppos)
 {
 	struct video_device *dev = file->private_data;
--- diff/drivers/usb/media/usbvideo.c	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/media/usbvideo.c	2004-07-01 21:32:46.000000000 +0100
@@ -46,7 +46,7 @@
 			      unsigned int cmd, unsigned long arg);
 static int usbvideo_v4l_mmap(struct file *file, struct vm_area_struct *vma);
 static int usbvideo_v4l_open(struct inode *inode, struct file *file);
-static ssize_t usbvideo_v4l_read(struct file *file, char *buf,
+static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf,
 			     size_t count, loff_t *ppos);
 static int usbvideo_v4l_close(struct inode *inode, struct file *file);
 
@@ -1587,7 +1587,7 @@
  * 20-Oct-2000 Created.
  * 01-Nov-2000 Added mutex (uvd->lock).
  */
-static ssize_t usbvideo_v4l_read(struct file *file, char *buf,
+static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf,
 		      size_t count, loff_t *ppos)
 {
 	struct uvd *uvd = file->private_data;
--- diff/drivers/usb/media/vicam.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/media/vicam.c	2004-07-01 21:32:46.000000000 +0100
@@ -523,9 +523,9 @@
 }
 
 static int
-vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsigned long ul_arg)
+vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsigned long arg)
 {
-	void *arg = (void *)ul_arg;
+	void __user *user_arg = (void __user *)arg;
 	struct vicam_camera *cam = file->private_data;
 	int retval = 0;
 
@@ -549,7 +549,7 @@
 			b.minwidth = 320;	/* VIDEOSIZE_48_48 */
 			b.minheight = 240;
 
-			if (copy_to_user(arg, &b, sizeof (b)))
+			if (copy_to_user(user_arg, &b, sizeof(b)))
 				retval = -EFAULT;
 
 			break;
@@ -560,7 +560,7 @@
 			struct video_channel v;
 
 			DBG("VIDIOCGCHAN\n");
-			if (copy_from_user(&v, arg, sizeof (v))) {
+			if (copy_from_user(&v, user_arg, sizeof(v))) {
 				retval = -EFAULT;
 				break;
 			}
@@ -576,7 +576,7 @@
 			v.type = VIDEO_TYPE_CAMERA;
 			v.norm = 0;
 
-			if (copy_to_user(arg, &v, sizeof (v)))
+			if (copy_to_user(user_arg, &v, sizeof(v)))
 				retval = -EFAULT;
 			break;
 		}
@@ -585,7 +585,7 @@
 		{
 			int v;
 
-			if (copy_from_user(&v, arg, sizeof (v)))
+			if (copy_from_user(&v, user_arg, sizeof(v)))
 				retval = -EFAULT;
 			DBG("VIDIOCSCHAN %d\n", v);
 
@@ -604,8 +604,7 @@
 			vp.brightness = cam->gain << 8;
 			vp.depth = 24;
 			vp.palette = VIDEO_PALETTE_RGB24;
-			if (copy_to_user
-			    (arg, &vp, sizeof (struct video_picture)))
+			if (copy_to_user(user_arg, &vp, sizeof (struct video_picture)))
 				retval = -EFAULT;
 			break;
 		}
@@ -614,7 +613,7 @@
 		{
 			struct video_picture vp;
 			
-			if (copy_from_user(&vp, arg, sizeof(vp))) {
+			if (copy_from_user(&vp, user_arg, sizeof(vp))) {
 				retval = -EFAULT;
 				break;
 			}
@@ -646,8 +645,7 @@
 
 			DBG("VIDIOCGWIN\n");
 
-			if (copy_to_user
-			    ((void *) arg, (void *) &vw, sizeof (vw)))
+			if (copy_to_user(user_arg, (void *)&vw, sizeof(vw)))
 				retval = -EFAULT;
 
 			// I'm not sure what the deal with a capture window is, it is very poorly described
@@ -660,7 +658,7 @@
 
 			struct video_window vw;
 
-			if (copy_from_user(&vw, arg, sizeof(vw))) {
+			if (copy_from_user(&vw, user_arg, sizeof(vw))) {
 				retval = -EFAULT;
 				break;
 			}
@@ -687,8 +685,7 @@
 			for (i = 0; i < VICAM_FRAMES; i++)
 				vm.offsets[i] = VICAM_MAX_FRAME_SIZE * i;
 
-			if (copy_to_user
-			    ((void *) arg, (void *) &vm, sizeof (vm)))
+			if (copy_to_user(user_arg, (void *)&vm, sizeof(vm)))
 				retval = -EFAULT;
 
 			break;
@@ -699,8 +696,7 @@
 			struct video_mmap vm;
 			// int video_size;
 
-			if (copy_from_user
-			    ((void *) &vm, (void *) arg, sizeof (vm))) {
+			if (copy_from_user((void *)&vm, user_arg, sizeof(vm))) {
 				retval = -EFAULT;
 				break;
 			}
@@ -723,7 +719,7 @@
 		{
 			int frame;
 
-			if (copy_from_user((void *) &frame, arg, sizeof (int))) {
+			if (copy_from_user((void *)&frame, user_arg, sizeof(int))) {
 				retval = -EFAULT;
 				break;
 			}
@@ -1003,7 +999,7 @@
 }
 
 static ssize_t
-vicam_read( struct file *file, char *buf, size_t count, loff_t *ppos )
+vicam_read( struct file *file, char __user *buf, size_t count, loff_t *ppos )
 {
 	struct vicam_camera *cam = file->private_data;
 
--- diff/drivers/usb/media/w9968cf.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/media/w9968cf.c	2004-07-01 21:32:46.000000000 +0100
@@ -388,7 +388,7 @@
 static struct file_operations w9968cf_fops;
 static int w9968cf_open(struct inode*, struct file*);
 static int w9968cf_release(struct inode*, struct file*);
-static ssize_t w9968cf_read(struct file*, char*, size_t, loff_t*);
+static ssize_t w9968cf_read(struct file*, char __user *, size_t, loff_t*);
 static int w9968cf_mmap(struct file*, struct vm_area_struct*);
 static int w9968cf_ioctl(struct inode*, struct file*, unsigned, unsigned long);
 static int w9968cf_v4l_ioctl(struct inode*, struct file*, unsigned int, void*);
@@ -444,8 +444,8 @@
 /* High-level CMOS sensor control functions */
 static int w9968cf_sensor_set_control(struct w9968cf_device*,int cid,int val);
 static int w9968cf_sensor_get_control(struct w9968cf_device*,int cid,int *val);
-static inline int w9968cf_sensor_cmd(struct w9968cf_device*, 
-                                     unsigned int cmd, void *arg);
+static int w9968cf_sensor_cmd(struct w9968cf_device*, 
+                              unsigned int cmd, void *arg);
 static int w9968cf_sensor_init(struct w9968cf_device*);
 static int w9968cf_sensor_update_settings(struct w9968cf_device*);
 static int w9968cf_sensor_get_picture(struct w9968cf_device*);
@@ -461,7 +461,7 @@
 static int w9968cf_set_picture(struct w9968cf_device*, struct video_picture);
 static int w9968cf_set_window(struct w9968cf_device*, struct video_window);
 static inline u16 w9968cf_valid_palette(u16 palette);
-static inline u16 w9968cf_valid_depth(u16 palette);
+static u16 w9968cf_valid_depth(u16 palette);
 static inline u8 w9968cf_need_decompression(u16 palette);
 static int w9968cf_postprocess_frame(struct w9968cf_device*, 
                                      struct w9968cf_frame_t*);
@@ -1959,7 +1959,7 @@
   Return the depth corresponding to the given palette.
   Palette _must_ be supported !
   --------------------------------------------------------------------------*/
-static inline u16 w9968cf_valid_depth(u16 palette)
+static u16 w9968cf_valid_depth(u16 palette)
 {
 	u8 i=0;
 	while (w9968cf_formatlist[i].palette != palette)
@@ -2178,7 +2178,7 @@
 }
 
 
-static inline int
+static int
 w9968cf_sensor_cmd(struct w9968cf_device* cam, unsigned int cmd, void* arg)
 {
 	struct i2c_client* c = cam->sensor_client;
@@ -2770,7 +2770,7 @@
 
 
 static ssize_t
-w9968cf_read(struct file* filp, char* buf, size_t count, loff_t* f_pos)
+w9968cf_read(struct file* filp, char __user * buf, size_t count, loff_t* f_pos)
 {
 	struct w9968cf_device* cam;
 	struct w9968cf_frame_t* fr;
@@ -2915,6 +2915,7 @@
                   unsigned int cmd, void* arg)
 {
 	struct w9968cf_device* cam;
+	void __user *user_arg = (void __user *)arg;
 	const char* v4l1_ioctls[] = {
 		"?", "CGAP", "GCHAN", "SCHAN", "GTUNER", "STUNER", 
 		"GPICT", "SPICT", "CCAPTURE", "GWIN", "SWIN", "GFBUF",
@@ -2948,7 +2949,7 @@
 		cap.maxheight = (cam->upscaling && w9968cf_vppmod_present)
 		                ? W9968CF_MAX_HEIGHT : cam->maxheight;
 
-		if (copy_to_user(arg, &cap, sizeof(cap)))
+		if (copy_to_user(user_arg, &cap, sizeof(cap)))
 			return -EFAULT;
 
 		DBG(5, "VIDIOCGCAP successfully called.")
@@ -2958,7 +2959,7 @@
 	case VIDIOCGCHAN: /* get video channel informations */
 	{
 		struct video_channel chan;
-		if (copy_from_user(&chan, arg, sizeof(chan)))
+		if (copy_from_user(&chan, user_arg, sizeof(chan)))
 			return -EFAULT;
 
 		if (chan.channel != 0)
@@ -2970,7 +2971,7 @@
 		chan.type = VIDEO_TYPE_CAMERA;
 		chan.norm = VIDEO_MODE_AUTO;
 
-		if (copy_to_user(arg, &chan, sizeof(chan)))
+		if (copy_to_user(user_arg, &chan, sizeof(chan)))
 			return -EFAULT;
 
 		DBG(5, "VIDIOCGCHAN successfully called.")
@@ -2981,7 +2982,7 @@
 	{
 		struct video_channel chan;
 
-		if (copy_from_user(&chan, arg, sizeof(chan)))
+		if (copy_from_user(&chan, user_arg, sizeof(chan)))
 			return -EFAULT;
 
 		if (chan.channel != 0)
@@ -2996,7 +2997,7 @@
 		if (w9968cf_sensor_get_picture(cam))
 			return -EIO;
 
-		if (copy_to_user(arg, &cam->picture, sizeof(cam->picture)))
+		if (copy_to_user(user_arg, &cam->picture, sizeof(cam->picture)))
 			return -EFAULT;
 
 		DBG(5, "VIDIOCGPICT successfully called.")
@@ -3008,7 +3009,7 @@
 		struct video_picture pict;
 		int err = 0;
 
-		if (copy_from_user(&pict, arg, sizeof(pict)))
+		if (copy_from_user(&pict, user_arg, sizeof(pict)))
 			return -EFAULT;
 
 		if ( (cam->force_palette || !w9968cf_vppmod_present) 
@@ -3087,7 +3088,7 @@
 		struct video_window win;
 		int err = 0;
 
-		if (copy_from_user(&win, arg, sizeof(win)))
+		if (copy_from_user(&win, user_arg, sizeof(win)))
 			return -EFAULT;
 
 		DBG(6, "VIDIOCSWIN called: clipcount=%d, flags=%d, "
@@ -3141,7 +3142,7 @@
 
 	case VIDIOCGWIN: /* get current window properties */
 	{
-		if (copy_to_user(arg,&cam->window,sizeof(struct video_window)))
+		if (copy_to_user(user_arg, &cam->window, sizeof(struct video_window)))
 			return -EFAULT;
 
 		DBG(5, "VIDIOCGWIN successfully called.")
@@ -3159,7 +3160,7 @@
 			mbuf.offsets[i] = (unsigned long)cam->frame[i].buffer -
 			                  (unsigned long)cam->frame[0].buffer;
 
-		if (copy_to_user(arg, &mbuf, sizeof(mbuf)))
+		if (copy_to_user(user_arg, &mbuf, sizeof(mbuf)))
 			return -EFAULT;
 
 		DBG(5, "VIDIOCGMBUF successfully called.")
@@ -3172,7 +3173,7 @@
 		struct w9968cf_frame_t* fr;
 		int err = 0;
 
-		if (copy_from_user(&mmap, arg, sizeof(mmap)))
+		if (copy_from_user(&mmap, user_arg, sizeof(mmap)))
 			return -EFAULT;
 
 		DBG(6, "VIDIOCMCAPTURE called: frame #%d, format=%s, %dx%d",
@@ -3295,7 +3296,7 @@
 		struct w9968cf_frame_t* fr;
 		int err = 0;
 
-		if (copy_from_user(&f_num, arg, sizeof(f_num)))
+		if (copy_from_user(&f_num, user_arg, sizeof(f_num)))
 			return -EFAULT;
 
 		if (f_num >= cam->nbuffers) {
@@ -3348,7 +3349,7 @@
 			.teletext = VIDEO_NO_UNIT,
 		};
 
-		if (copy_to_user(arg, &unit, sizeof(unit)))
+		if (copy_to_user(user_arg, &unit, sizeof(unit)))
 			return -EFAULT;
 
 		DBG(5, "VIDIOCGUNIT successfully called.")
@@ -3360,7 +3361,7 @@
 
 	case VIDIOCGFBUF:
 	{
-		if (clear_user(arg, sizeof(struct video_buffer)))
+		if (clear_user(user_arg, sizeof(struct video_buffer)))
 			return -EFAULT;
 
 		DBG(5, "VIDIOCGFBUF successfully called.")
@@ -3370,7 +3371,7 @@
 	case VIDIOCGTUNER:
 	{
 		struct video_tuner tuner;
-		if (copy_from_user(&tuner, arg, sizeof(tuner)))
+		if (copy_from_user(&tuner, user_arg, sizeof(tuner)))
 			return -EFAULT;
 
 		if (tuner.tuner != 0)
@@ -3383,7 +3384,7 @@
 		tuner.mode = VIDEO_MODE_AUTO;
 		tuner.signal = 0xffff;
 
-		if (copy_to_user(arg, &tuner, sizeof(tuner)))
+		if (copy_to_user(user_arg, &tuner, sizeof(tuner)))
 			return -EFAULT;
 
 		DBG(5, "VIDIOCGTUNER successfully called.")
@@ -3393,7 +3394,7 @@
 	case VIDIOCSTUNER:
 	{
 		struct video_tuner tuner;
-		if (copy_from_user(&tuner, arg, sizeof(tuner)))
+		if (copy_from_user(&tuner, user_arg, sizeof(tuner)))
 			return -EFAULT;
 
 		if (tuner.tuner != 0)
--- diff/drivers/usb/media/w9968cf.h	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/media/w9968cf.h	2004-07-01 21:32:46.000000000 +0100
@@ -293,7 +293,7 @@
 		warn(fmt, ## args); \
 	else if ((level) >= 5) \
 		info("[%s:%d] " fmt, \
-		     __PRETTY_FUNCTION__, __LINE__ , ## args); \
+		     __FUNCTION__, __LINE__ , ## args); \
 } \
 }
 #else
--- diff/drivers/usb/misc/auerswald.c	2004-05-19 22:12:18.000000000 +0100
+++ source/drivers/usb/misc/auerswald.c	2004-07-01 21:32:46.000000000 +0100
@@ -1452,6 +1452,8 @@
         audevinfo_t devinfo;
         pauerswald_t cp = NULL;
 	unsigned int u;
+	unsigned int __user *user_arg = (unsigned int __user *)arg;
+
         dbg ("ioctl");
 
 	/* get the mutexes */
@@ -1483,14 +1485,14 @@
 		u   = ccp->auerdev
 		   && (ccp->scontext.id != AUH_UNASSIGNED)
 		   && !list_empty (&cp->bufctl.free_buff_list);
-	        ret = put_user (u, (unsigned int *) arg);
+	        ret = put_user (u, user_arg);
 		break;
 
 	/* return != 0 if connected to a service channel */
 	case IOCTL_AU_CONNECT:
 		dbg ("IOCTL_AU_CONNECT");
 		u = (ccp->scontext.id != AUH_UNASSIGNED);
-	        ret = put_user (u, (unsigned int *) arg);
+	        ret = put_user (u, user_arg);
 		break;
 
 	/* return != 0 if Receive Data available */
@@ -1511,14 +1513,14 @@
 				u = 1;
 			}
 		}
-	        ret = put_user (u, (unsigned int *) arg);
+	        ret = put_user (u, user_arg);
 		break;
 
 	/* return the max. buffer length for the device */
 	case IOCTL_AU_BUFLEN:
 		dbg ("IOCTL_AU_BUFLEN");
 		u = cp->maxControlLength;
-	        ret = put_user (u, (unsigned int *) arg);
+	        ret = put_user (u, user_arg);
 		break;
 
 	/* requesting a service channel */
@@ -1527,7 +1529,7 @@
                 /* requesting a service means: release the previous one first */
 		auerswald_removeservice (cp, &ccp->scontext);
 		/* get the channel number */
-		ret = get_user (u, (unsigned int *) arg);
+		ret = get_user (u, user_arg);
 		if (ret) {
 			break;
 		}
@@ -1564,7 +1566,7 @@
         case IOCTL_AU_SLEN:
 		dbg ("IOCTL_AU_SLEN");
 		u = AUSI_DLEN;
-	        ret = put_user (u, (unsigned int *) arg);
+	        ret = put_user (u, user_arg);
 		break;
 
 	default:
--- diff/drivers/usb/misc/legousbtower.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/misc/legousbtower.c	2004-07-01 21:32:46.000000000 +0100
@@ -236,8 +236,8 @@
 
 
 /* local function prototypes */
-static ssize_t tower_read	(struct file *file, char *buffer, size_t count, loff_t *ppos);
-static ssize_t tower_write	(struct file *file, const char *buffer, size_t count, loff_t *ppos);
+static ssize_t tower_read	(struct file *file, char __user *buffer, size_t count, loff_t *ppos);
+static ssize_t tower_write	(struct file *file, const char __user *buffer, size_t count, loff_t *ppos);
 static inline void tower_delete (struct lego_usb_tower *dev);
 static int tower_open		(struct inode *inode, struct file *file);
 static int tower_release	(struct inode *inode, struct file *file);
@@ -560,7 +560,7 @@
 /**
  *	tower_read
  */
-static ssize_t tower_read (struct file *file, char *buffer, size_t count, loff_t *ppos)
+static ssize_t tower_read (struct file *file, char __user *buffer, size_t count, loff_t *ppos)
 {
 	struct lego_usb_tower *dev;
 	size_t bytes_to_read;
@@ -651,7 +651,7 @@
 /**
  *	tower_write
  */
-static ssize_t tower_write (struct file *file, const char *buffer, size_t count, loff_t *ppos)
+static ssize_t tower_write (struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
 {
 	struct lego_usb_tower *dev;
 	size_t bytes_to_write;
--- diff/drivers/usb/misc/phidgetservo.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/misc/phidgetservo.c	2004-07-01 21:32:46.000000000 +0100
@@ -17,6 +17,10 @@
  *
  * CAUTION: Generally you should use 0 < degrees < 180 as anything else
  * is probably beyond the range of your servo and may damage it.
+ *
+ * Jun 16, 2004: Sean Young <sean@mess.org>
+ *  - cleanups
+ *  - was using memory after kfree()
  */
 
 #include <linux/config.h>
@@ -33,19 +37,36 @@
 #define DRIVER_AUTHOR "Sean Young <sean@mess.org>"
 #define DRIVER_DESC "USB PhidgetServo Driver"
 
-#define VENDOR_ID_GLAB			0x06c2
-#define DEVICE_ID_4MOTOR_SERVO_30	0x0038
-#define DEVICE_ID_1MOTOR_SERVO_30	0x0039
-
-#define VENDOR_ID_WISEGROUP		0x0925
-#define DEVICE_ID_1MOTOR_SERVO_20	0x8101
-#define DEVICE_ID_4MOTOR_SERVO_20	0x8104
+#define VENDOR_ID_GLAB				0x06c2
+#define DEVICE_ID_GLAB_PHIDGETSERVO_QUAD	0x0038
+#define DEVICE_ID_GLAB_PHIDGETSERVO_UNI		0x0039
+
+#define VENDOR_ID_WISEGROUP			0x0925
+#define VENDOR_ID_WISEGROUP_PHIDGETSERVO_QUAD	0x8101
+#define VENDOR_ID_WISEGROUP_PHIDGETSERVO_UNI	0x8104
+
+#define SERVO_VERSION_30			0x01
+#define SERVO_COUNT_QUAD			0x02
 
 static struct usb_device_id id_table[] = {
-	{USB_DEVICE(VENDOR_ID_GLAB, DEVICE_ID_4MOTOR_SERVO_30)},
-	{USB_DEVICE(VENDOR_ID_GLAB, DEVICE_ID_1MOTOR_SERVO_30)},
-	{USB_DEVICE(VENDOR_ID_WISEGROUP, DEVICE_ID_4MOTOR_SERVO_20)},
-	{USB_DEVICE(VENDOR_ID_WISEGROUP, DEVICE_ID_1MOTOR_SERVO_20)},
+	{
+		USB_DEVICE(VENDOR_ID_GLAB, DEVICE_ID_GLAB_PHIDGETSERVO_QUAD), 
+		.driver_info = SERVO_VERSION_30 | SERVO_COUNT_QUAD 
+	},
+	{
+		USB_DEVICE(VENDOR_ID_GLAB, DEVICE_ID_GLAB_PHIDGETSERVO_UNI),
+		.driver_info = SERVO_VERSION_30 
+	},
+	{
+		USB_DEVICE(VENDOR_ID_WISEGROUP, 
+				VENDOR_ID_WISEGROUP_PHIDGETSERVO_QUAD),
+		.driver_info = SERVO_COUNT_QUAD 
+	},
+	{
+		USB_DEVICE(VENDOR_ID_WISEGROUP, 
+				VENDOR_ID_WISEGROUP_PHIDGETSERVO_UNI),
+		.driver_info = 0
+	},
 	{}
 };
 
@@ -53,14 +74,13 @@
 
 struct phidget_servo {
 	struct usb_device *udev;
-	int version;
-	int quad_servo;
+	ulong type;
 	int pulse[4];
 	int degrees[4];
 	int minutes[4];
 };
 
-static void
+static int
 change_position_v30(struct phidget_servo *servo, int servo_no, int degrees, 
 								int minutes)
 {
@@ -71,7 +91,7 @@
 	if (!buffer) {
 		dev_err(&servo->udev->dev, "%s - out of memory\n",
 			__FUNCTION__);
-		return;
+		return -ENOMEM;
 	}
 
 	/*
@@ -124,12 +144,13 @@
 	retval = usb_control_msg(servo->udev,
 				 usb_sndctrlpipe(servo->udev, 0),
 				 0x09, 0x21, 0x0200, 0x0000, buffer, 6, 2 * HZ);
-	if (retval != 6)
-		dev_err(&servo->udev->dev, "retval = %d\n", retval);
+
 	kfree(buffer);
+
+	return retval;
 }
 
-static void
+static int
 change_position_v20(struct phidget_servo *servo, int servo_no, int degrees,
 								int minutes)
 {
@@ -140,7 +161,7 @@
 	if (!buffer) {
 		dev_err(&servo->udev->dev, "%s - out of memory\n",
 			__FUNCTION__);
-		return;
+		return -ENOMEM;
 	}
 
 	/*
@@ -171,16 +192,17 @@
 	retval = usb_control_msg(servo->udev,
 				 usb_sndctrlpipe(servo->udev, 0),
 				 0x09, 0x21, 0x0200, 0x0000, buffer, 2, 2 * HZ);
-	if (retval != 2)
-		dev_err(&servo->udev->dev, "retval = %d\n", retval);
+
 	kfree(buffer);
+
+	return retval;
 }
 
 #define show_set(value)	\
 static ssize_t set_servo##value (struct device *dev,			\
 					const char *buf, size_t count)	\
 {									\
-	int degrees, minutes;						\
+	int degrees, minutes, retval;					\
 	struct usb_interface *intf = to_usb_interface (dev);		\
 	struct phidget_servo *servo = usb_get_intfdata (intf);		\
 									\
@@ -195,12 +217,14 @@
 		return -EINVAL;						\
 	}								\
 									\
-	if (servo->version >= 3) 					\
-		change_position_v30 (servo, value, degrees, minutes);	\
+	if (servo->type & SERVO_VERSION_30)				\
+		retval = change_position_v30 (servo, value, degrees, 	\
+							minutes);	\
 	else 								\
-		change_position_v20 (servo, value, degrees, minutes);	\
+		retval = change_position_v20 (servo, value, degrees, 	\
+							minutes);	\
 									\
-	return count;							\
+	return retval < 0 ? retval : count;				\
 }									\
 									\
 static ssize_t show_servo##value (struct device *dev, char *buf) 	\
@@ -223,7 +247,7 @@
 servo_probe(struct usb_interface *interface, const struct usb_device_id *id)
 {
 	struct usb_device *udev = interface_to_usbdev(interface);
-	struct phidget_servo *dev = NULL;
+	struct phidget_servo *dev;
 
 	dev = kmalloc(sizeof (struct phidget_servo), GFP_KERNEL);
 	if (dev == NULL) {
@@ -233,37 +257,21 @@
 	memset(dev, 0x00, sizeof (*dev));
 
 	dev->udev = usb_get_dev(udev);
-	switch (udev->descriptor.idVendor) {
-	case VENDOR_ID_WISEGROUP:
-		dev->version = 2;
-		break;
-	case VENDOR_ID_GLAB:
-		dev->version = 3;
-		break;
-	}
-	switch (udev->descriptor.idProduct) {
-	case DEVICE_ID_4MOTOR_SERVO_20:
-	case DEVICE_ID_4MOTOR_SERVO_30:
-		dev->quad_servo = 1;
-		break;
-	case DEVICE_ID_1MOTOR_SERVO_20:
-	case DEVICE_ID_1MOTOR_SERVO_30:
-		dev->quad_servo = 0;
-		break;
-	}
-
+	dev->type = id->driver_info;
 	usb_set_intfdata(interface, dev);
 
 	device_create_file(&interface->dev, &dev_attr_servo0);
-	if (dev->quad_servo) {
+	if (dev->type & SERVO_COUNT_QUAD) {
 		device_create_file(&interface->dev, &dev_attr_servo1);
 		device_create_file(&interface->dev, &dev_attr_servo2);
 		device_create_file(&interface->dev, &dev_attr_servo3);
 	}
 
 	dev_info(&interface->dev, "USB %d-Motor PhidgetServo v%d.0 attached\n",
-		 dev->quad_servo ? 4 : 1, dev->version);
-	if (dev->version == 2) 
+		dev->type & SERVO_COUNT_QUAD ? 4 : 1,
+		dev->type & SERVO_VERSION_30 ? 3 : 2);
+
+	if(!(dev->type & SERVO_VERSION_30))
 		dev_info(&interface->dev,
 			 "WARNING: v2.0 not tested! Please report if it works.\n");
 
@@ -279,7 +287,7 @@
 	usb_set_intfdata(interface, NULL);
 
 	device_remove_file(&interface->dev, &dev_attr_servo0);
-	if (dev->quad_servo) {
+	if (dev->type & SERVO_COUNT_QUAD) {
 		device_remove_file(&interface->dev, &dev_attr_servo1);
 		device_remove_file(&interface->dev, &dev_attr_servo2);
 		device_remove_file(&interface->dev, &dev_attr_servo3);
@@ -287,10 +295,11 @@
 
 	usb_put_dev(dev->udev);
 
-	kfree(dev);
-
 	dev_info(&interface->dev, "USB %d-Motor PhidgetServo v%d.0 detached\n",
-		 dev->quad_servo ? 4 : 1, dev->version);
+		dev->type & SERVO_COUNT_QUAD ? 4 : 1,
+		dev->type & SERVO_VERSION_30 ? 3 : 2);
+
+	kfree(dev);
 }
 
 static struct usb_driver servo_driver = {
@@ -304,7 +313,7 @@
 static int __init
 phidget_servo_init(void)
 {
-	int retval = 0;
+	int retval;
 
 	retval = usb_register(&servo_driver);
 	if (retval)
--- diff/drivers/usb/misc/usbtest.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/misc/usbtest.c	2004-07-01 21:32:46.000000000 +0100
@@ -459,8 +459,8 @@
  * or remote wakeup (which needs human interaction).
  */
 
-static int realworld = 1;
-MODULE_PARM (realworld, "i");
+static unsigned realworld = 1;
+module_param (realworld, uint, 0);
 MODULE_PARM_DESC (realworld, "clear to demand stricter ch9 compliance");
 
 static int get_altsetting (struct usbtest_dev *dev)
@@ -1808,17 +1808,17 @@
 
 /*-------------------------------------------------------------------------*/
 
-static int force_interrupt = 0;
-MODULE_PARM (force_interrupt, "i");
+static unsigned force_interrupt = 0;
+module_param (force_interrupt, uint, 0);
 MODULE_PARM_DESC (force_interrupt, "0 = test default; else interrupt");
 
 #ifdef	GENERIC
-static int vendor;
-MODULE_PARM (vendor, "h");
+static unsigned short vendor;
+module_param(vendor, ushort, 0);
 MODULE_PARM_DESC (vendor, "vendor code (from usb-if)");
 
-static int product;
-MODULE_PARM (product, "h");
+static unsigned short product;
+module_param(product, ushort, 0);
 MODULE_PARM_DESC (product, "product code (from vendor)");
 #endif
 
--- diff/drivers/usb/net/kaweth.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/net/kaweth.c	2004-07-01 21:32:46.000000000 +0100
@@ -62,7 +62,7 @@
 #include <asm/semaphore.h>
 #include <asm/byteorder.h>
 
-#define DEBUG
+#undef DEBUG
 
 #ifdef DEBUG
 #define kaweth_dbg(format, arg...) printk(KERN_DEBUG __FILE__ ": " format "\n" ,##arg)
@@ -592,7 +592,7 @@
 
 	struct sk_buff *skb;
 
-	if(unlikely(urb->status == -ECONNRESET || urb->status == -ECONNABORTED))
+	if(unlikely(urb->status == -ECONNRESET || urb->status == -ECONNABORTED || urb->status == -ESHUTDOWN))
 	/* we are killed - set a flag and wake the disconnect handler */
 	{
 		kaweth->end = 1;
--- diff/drivers/usb/net/pegasus.h	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/net/pegasus.h	2004-07-01 21:32:46.000000000 +0100
@@ -121,6 +121,7 @@
 #define	VENDOR_ADMTEK		0x07a6
 #define	VENDOR_AEILAB		0x3334
 #define	VENDOR_ALLIEDTEL	0x07c9
+#define	VENDOR_ATEN		0x0557
 #define	VENDOR_BELKIN		0x050d
 #define	VENDOR_BILLIONTON	0x08dd
 #define	VENDOR_COMPAQ		0x049f
@@ -150,6 +151,8 @@
 
 PEGASUS_DEV( "3Com USB Ethernet 3C460B", VENDOR_3COM, 0x4601,
 		DEFAULT_GPIO_RESET | PEGASUS_II )
+PEGASUS_DEV( "ATEN USB Ethernet UC-110T", VENDOR_ATEN, 0x2007,
+		DEFAULT_GPIO_RESET | PEGASUS_II )
 PEGASUS_DEV( "USB HPNA/Ethernet", VENDOR_ABOCOM, 0x110c,
 		DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA )
 PEGASUS_DEV( "USB HPNA/Ethernet", VENDOR_ABOCOM, 0x4104,
--- diff/drivers/usb/net/rtl8150.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/net/rtl8150.c	2004-07-01 21:32:46.000000000 +0100
@@ -398,6 +398,21 @@
 	usb_unlink_urb(dev->ctrl_urb);
 }
 
+static inline struct sk_buff *pull_skb(rtl8150_t *dev)
+{
+	struct sk_buff *skb;
+	int i;
+
+	for (i = 0; i < RX_SKB_POOL_SIZE; i++) {
+		if (dev->rx_skb_pool[i]) {
+			skb = dev->rx_skb_pool[i];
+			dev->rx_skb_pool[i] = NULL;
+			return skb;
+		}
+	}
+	return NULL;
+}
+
 static void read_bulk_callback(struct urb *urb, struct pt_regs *regs)
 {
 	rtl8150_t *dev;
@@ -603,21 +618,6 @@
 			dev_kfree_skb(dev->rx_skb_pool[i]);
 }
 
-static inline struct sk_buff *pull_skb(rtl8150_t *dev)
-{
-	struct sk_buff *skb;
-	int i;
-
-	for (i = 0; i < RX_SKB_POOL_SIZE; i++) {
-		if (dev->rx_skb_pool[i]) {
-			skb = dev->rx_skb_pool[i];
-			dev->rx_skb_pool[i] = NULL;
-			return skb;
-		}
-	}
-	return NULL;
-}
-
 static int enable_net_traffic(rtl8150_t * dev)
 {
 	u8 cr, tcr, rcr, msr;
--- diff/drivers/usb/net/usbnet.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/net/usbnet.c	2004-07-01 21:32:46.000000000 +0100
@@ -104,6 +104,8 @@
  * 		disconnect; other cleanups. (db)  Flush net1080 fifos
  * 		after several sequential framing errors. (Johannes Erdfelt)
  * 22-aug-2003	AX8817X support (Dave Hollis).
+ * 14-jun-2004  Trivial patch for AX8817X based Buffalo LUA-U2-KTX in Japan
+ *		(Neil Bortnak)
  *
  *-------------------------------------------------------------------------*/
 
@@ -1157,6 +1159,7 @@
 
 	status = get_ethernet_addr (dev, info->ether);
 	if (status < 0) {
+		usb_set_intfdata(info->data, NULL);
 		usb_driver_release_interface (&usbnet_driver, info->data);
 		return status;
 	}
@@ -3204,6 +3207,10 @@
 	// ATEN UC210T
 	USB_DEVICE (0x0557, 0x2009),
 	.driver_info =  (unsigned long) &ax8817x_info,
+}, {
+	// Buffalo LUA-U2-KTX
+	USB_DEVICE (0x0411, 0x003d),
+	.driver_info =  (unsigned long) &ax8817x_info,
 },
 #endif
 
--- diff/drivers/usb/serial/bus.c	2004-05-19 22:12:19.000000000 +0100
+++ source/drivers/usb/serial/bus.c	2004-07-01 21:32:46.000000000 +0100
@@ -78,8 +78,8 @@
 	minor = port->number;
 	tty_register_device (usb_serial_tty_driver, minor, dev);
 	dev_info(&port->serial->dev->dev, 
-		 "%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)\n",
-		 driver->name, minor, minor);
+		 "%s converter now attached to ttyUSB%d\n",
+		 driver->name, minor);
 
 exit:
 	return retval;
--- diff/drivers/usb/serial/ftdi_sio.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/serial/ftdi_sio.c	2004-07-01 21:32:46.000000000 +0100
@@ -1022,7 +1022,7 @@
 }
 
 
-static int get_serial_info(struct usb_serial_port * port, struct serial_struct * retinfo)
+static int get_serial_info(struct usb_serial_port * port, struct serial_struct __user * retinfo)
 {
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	struct serial_struct tmp;
@@ -1039,7 +1039,7 @@
 } /* get_serial_info */
 
 
-static int set_serial_info(struct usb_serial_port * port, struct serial_struct * newinfo)
+static int set_serial_info(struct usb_serial_port * port, struct serial_struct __user * newinfo)
 { /* set_serial_info */
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	struct serial_struct new_serial;
@@ -1504,6 +1504,7 @@
 	if (status) {
 		err("%s - failed submitting write urb, error %d", __FUNCTION__, status);
 		count = status;
+		kfree (buffer);
 	}
 
 	/* we are done with this urb, so let the host driver
@@ -2042,7 +2043,7 @@
 
 	case TIOCMBIS: /* turns on (Sets) the lines as specified by the mask */
 		dbg("%s TIOCMBIS", __FUNCTION__);
- 	        if (get_user(mask, (unsigned long *) arg))
+ 	        if (get_user(mask, (unsigned long __user *) arg))
 			return -EFAULT;
   	        if (mask & TIOCM_DTR){
 			if ((ret = set_dtr(port, HIGH)) < 0) {
@@ -2061,7 +2062,7 @@
 
 	case TIOCMBIC: /* turns off (Clears) the lines as specified by the mask */
 		dbg("%s TIOCMBIC", __FUNCTION__);
- 	        if (get_user(mask, (unsigned long *) arg))
+ 	        if (get_user(mask, (unsigned long __user *) arg))
 			return -EFAULT;
   	        if (mask & TIOCM_DTR){
 			if ((ret = set_dtr(port, LOW)) < 0){
@@ -2088,10 +2089,10 @@
 		 */
 
 	case TIOCGSERIAL: /* gets serial port data */
-		return get_serial_info(port, (struct serial_struct *) arg);
+		return get_serial_info(port, (struct serial_struct __user *) arg);
 
 	case TIOCSSERIAL: /* sets serial port data */
-		return set_serial_info(port, (struct serial_struct *) arg);
+		return set_serial_info(port, (struct serial_struct __user *) arg);
 
 	/*
 	 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
--- diff/drivers/usb/serial/io_edgeport.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/serial/io_edgeport.c	2004-07-01 21:32:46.000000000 +0100
@@ -1705,7 +1705,7 @@
  * 	    transmit holding register is empty.  This functionality
  * 	    allows an RS485 driver to be written in user space. 
  *****************************************************************************/
-static int get_lsr_info(struct edgeport_port *edge_port, unsigned int *value)
+static int get_lsr_info(struct edgeport_port *edge_port, unsigned int __user *value)
 {
 	unsigned int result = 0;
 
@@ -1720,7 +1720,7 @@
 	return 0;
 }
 
-static int get_number_bytes_avail(struct edgeport_port *edge_port, unsigned int *value)
+static int get_number_bytes_avail(struct edgeport_port *edge_port, unsigned int __user *value)
 {
 	unsigned int result = 0;
 	struct tty_struct *tty = edge_port->port->tty;
@@ -1790,7 +1790,7 @@
 	return result;
 }
 
-static int get_serial_info(struct edgeport_port *edge_port, struct serial_struct * retinfo)
+static int get_serial_info(struct edgeport_port *edge_port, struct serial_struct __user *retinfo)
 {
 	struct serial_struct tmp;
 
@@ -1812,7 +1812,6 @@
 //	tmp.hub6		= state->hub6;
 //	tmp.io_type		= state->io_type;
 
-
 	if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
 		return -EFAULT;
 	return 0;
@@ -1838,17 +1837,17 @@
 		// return number of bytes available
 		case TIOCINQ:
 			dbg("%s (%d) TIOCINQ", __FUNCTION__,  port->number);
-			return get_number_bytes_avail(edge_port, (unsigned int *) arg);
+			return get_number_bytes_avail(edge_port, (unsigned int __user *) arg);
 			break;
 
 		case TIOCSERGETLSR:
 			dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__,  port->number);
-			return get_lsr_info(edge_port, (unsigned int *) arg);
+			return get_lsr_info(edge_port, (unsigned int __user *) arg);
 			return 0;
 
 		case TIOCGSERIAL:
 			dbg("%s (%d) TIOCGSERIAL", __FUNCTION__,  port->number);
-			return get_serial_info(edge_port, (struct serial_struct *) arg);
+			return get_serial_info(edge_port, (struct serial_struct __user *) arg);
 
 		case TIOCSSERIAL:
 			dbg("%s (%d) TIOCSSERIAL", __FUNCTION__,  port->number);
@@ -1893,7 +1892,7 @@
 			icount.buf_overrun = cnow.buf_overrun;
 
 			dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,  port->number, icount.rx, icount.tx );
-			if (copy_to_user((void *)arg, &icount, sizeof(icount)))
+			if (copy_to_user((void __user *)arg, &icount, sizeof(icount)))
 				return -EFAULT;
 			return 0;
 	}
--- diff/drivers/usb/serial/io_ti.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/serial/io_ti.c	2004-07-01 21:32:46.000000000 +0100
@@ -2428,7 +2428,7 @@
 	return result;
 }
 
-static int get_serial_info (struct edgeport_port *edge_port, struct serial_struct * retinfo)
+static int get_serial_info (struct edgeport_port *edge_port, struct serial_struct __user *retinfo)
 {
 	struct serial_struct tmp;
 
@@ -2477,7 +2477,7 @@
 
 		case TIOCGSERIAL:
 			dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number);
-			return get_serial_info(edge_port, (struct serial_struct *) arg);
+			return get_serial_info(edge_port, (struct serial_struct __user *) arg);
 			break;
 
 		case TIOCSSERIAL:
@@ -2510,7 +2510,7 @@
 		case TIOCGICOUNT:
 			dbg ("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,
 			     port->number, edge_port->icount.rx, edge_port->icount.tx);
-			if (copy_to_user((void *)arg, &edge_port->icount, sizeof(edge_port->icount)))
+			if (copy_to_user((void __user *)arg, &edge_port->icount, sizeof(edge_port->icount)))
 				return -EFAULT;
 			return 0;
 	}
--- diff/drivers/usb/serial/kl5kusb105.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/serial/kl5kusb105.c	2004-07-01 21:32:46.000000000 +0100
@@ -926,6 +926,7 @@
 			   unsigned int cmd, unsigned long arg)
 {
 	struct klsi_105_private *priv = usb_get_serial_port_data(port);
+	void __user *user_arg = (void __user *)arg;
 	
 	dbg("%scmd=0x%x", __FUNCTION__, cmd);
 
@@ -948,13 +949,12 @@
 
 	     dbg("%s - TCGETS data faked/incomplete", __FUNCTION__);
 
-	     retval = verify_area(VERIFY_WRITE, (void *)arg,
+	     retval = verify_area(VERIFY_WRITE, user_arg,
 				  sizeof(struct termios));
-
 	     if (retval)
-			 return(retval);
+			 return retval;
 
-	     if (kernel_termios_to_user_termios((struct termios *)arg,  
+	     if (kernel_termios_to_user_termios((struct termios __user *)arg,
 						&priv->termios))
 		     return -EFAULT;
 	     return(0);
@@ -965,14 +965,13 @@
 
 		dbg("%s - TCSETS not handled", __FUNCTION__);
 
-		retval = verify_area(VERIFY_READ, (void *)arg,
+		retval = verify_area(VERIFY_READ, user_arg,
 				     sizeof(struct termios));
-
 		if (retval)
-			    return(retval);
+			    return retval;
 
 		if (user_termios_to_kernel_termios(&priv->termios,
-						  (struct termios *)arg))
+						  (struct termios __user *)arg))
 			return -EFAULT;
 		klsi_105_set_termios(port, &priv->termios);
 		return(0);
--- diff/drivers/usb/serial/kobil_sct.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/serial/kobil_sct.c	2004-07-01 21:32:46.000000000 +0100
@@ -643,6 +643,7 @@
 	unsigned char *transfer_buffer;
 	int transfer_buffer_length = 8;
 	char *settings;
+	void __user *user_arg = (void __user *)arg;
 
 	priv = usb_get_serial_port_data(port);
 	if ((priv->device_type == KOBIL_USBTWIN_PRODUCT_ID) || (priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID)) {
@@ -652,12 +653,12 @@
 
 	switch (cmd) {
 	case TCGETS:   // 0x5401
-		result = verify_area(VERIFY_WRITE, (void *)arg, sizeof(struct termios));
+		result = verify_area(VERIFY_WRITE, user_arg, sizeof(struct termios));
 		if (result) {
 			dbg("%s - port %d Error in verify_area", __FUNCTION__, port->number);
 			return(result);
 		}
-		if (kernel_termios_to_user_termios((struct termios *)arg,
+		if (kernel_termios_to_user_termios((struct termios __user *)arg,
 						   &priv->internal_termios))
 			return -EFAULT;
 		return 0;
@@ -667,13 +668,13 @@
 			dbg("%s - port %d Error: port->tty->termios is NULL", __FUNCTION__, port->number);
 			return -ENOTTY;
 		}
-		result = verify_area(VERIFY_READ, (void *)arg, sizeof(struct termios));
+		result = verify_area(VERIFY_READ, user_arg, sizeof(struct termios));
 		if (result) {
 			dbg("%s - port %d Error in verify_area", __FUNCTION__, port->number);
 			return result;
 		}
 		if (user_termios_to_kernel_termios(&priv->internal_termios,
-						   (struct termios *)arg))
+						   (struct termios __user *)arg))
 			return -EFAULT;
 		
 		settings = (unsigned char *) kmalloc(50, GFP_KERNEL);  
--- diff/drivers/usb/serial/pl2303.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/serial/pl2303.c	2004-07-01 21:32:46.000000000 +0100
@@ -62,7 +62,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v0.10"
+#define DRIVER_VERSION "v0.11"
 #define DRIVER_DESC "Prolific PL2303 USB to serial adaptor driver"
 
 
@@ -172,20 +172,38 @@
 	.shutdown =		pl2303_shutdown,
 };
 
+enum pl2303_type {
+	type_0,		/* don't know the difference between type 0 and */
+	type_1,		/* type 1, until someone from prolific tells us... */
+	HX,		/* HX version of the pl2303 chip */
+};
+
 struct pl2303_private {
 	spinlock_t lock;
 	wait_queue_head_t delta_msr_wait;
 	u8 line_control;
 	u8 line_status;
 	u8 termios_initialized;
+	enum pl2303_type type;
 };
 
 
 static int pl2303_startup (struct usb_serial *serial)
 {
 	struct pl2303_private *priv;
+	enum pl2303_type type = type_0;
 	int i;
 
+	if (serial->dev->descriptor.bDeviceClass == 0x02)
+		type = type_0;
+	else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40)
+		type = HX;
+	else if (serial->dev->descriptor.bDeviceClass == 0x00)
+		type = type_1;
+	else if (serial->dev->descriptor.bDeviceClass == 0xFF)
+		type = type_1;
+	dbg("device type: %d", type);
+
 	for (i = 0; i < serial->num_ports; ++i) {
 		priv = kmalloc (sizeof (struct pl2303_private), GFP_KERNEL);
 		if (!priv)
@@ -193,6 +211,7 @@
 		memset (priv, 0x00, sizeof (struct pl2303_private));
 		spin_lock_init(&priv->lock);
 		init_waitqueue_head(&priv->delta_msr_wait);
+		priv->type = type;
 		usb_set_serial_port_data(serial->port[i], priv);
 	}
 	return 0;
@@ -395,20 +414,27 @@
 	     buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
 
 	if (cflag & CRTSCTS) {
-		i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
-				     VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
-				     0x0, 0x41, NULL, 0, 100);
-		dbg ("0x40:0x1:0x0:0x41  %d", i);
+		__u16 index;
+		if (priv->type == HX)
+			index = 0x61;
+		else
+			index = 0x41;
+		i = usb_control_msg(serial->dev, 
+				    usb_sndctrlpipe(serial->dev, 0),
+				    VENDOR_WRITE_REQUEST,
+				    VENDOR_WRITE_REQUEST_TYPE,
+				    0x0, index, NULL, 0, 100);
+		dbg ("0x40:0x1:0x0:0x%x  %d", index, i);
 	}
 
 	kfree (buf);
-}       
-
+} 
 
 static int pl2303_open (struct usb_serial_port *port, struct file *filp)
 {
 	struct termios tmp_termios;
 	struct usb_serial *serial = port->serial;
+	struct pl2303_private *priv = usb_get_serial_port_data(port);
 	unsigned char *buf;
 	int result;
 
@@ -439,6 +465,18 @@
 	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 1);
 	FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
 	FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
+	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0, 1);
+	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 1, 0);
+ 
+	if (priv->type == HX) {
+		/* HX chip */
+		SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 0x44);
+		/* reset upstream data pipes */
+          	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 8, 0);
+        	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 9, 0);
+	} else {
+		SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 0x24);
+	}
 
 	kfree(buf);
 
--- diff/drivers/usb/serial/visor.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/serial/visor.c	2004-07-01 21:32:47.000000000 +0100
@@ -247,6 +247,8 @@
 		.driver_info = (kernel_ulong_t)&palm_os_4_probe },
 	{ USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID),
 		.driver_info = (kernel_ulong_t)&palm_os_4_probe },
+	{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID),
+		.driver_info = (kernel_ulong_t)&palm_os_4_probe },
 	{ },					/* optional parameter entry */
 	{ }					/* Terminating entry */
 };
@@ -290,6 +292,7 @@
 	{ USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID) },
 	{ USB_DEVICE(GARMIN_VENDOR_ID, GARMIN_IQUE_3600_ID) },
 	{ USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID) },
+	{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID) },
 	{ },					/* optional parameter entry */
 	{ }					/* Terminating entry */
 };
@@ -515,6 +518,7 @@
 		dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
 			__FUNCTION__, status);
 		count = status;
+		kfree (buffer);
 	} else {
 		bytes_out += count;
 	}
@@ -795,7 +799,7 @@
 		dev_err(dev, "%s - error %d getting connection info\n",
 			__FUNCTION__, retval);
 	else
-		usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
+		usb_serial_debug_data (__FILE__, __FUNCTION__, retval, transfer_buffer);
 
 	kfree (transfer_buffer);
 	return 0;
@@ -881,18 +885,19 @@
 
 	/* Only do this endpoint hack for the Handspring devices with
 	 * interrupt in endpoints, which for now are the Treo devices. */
-	if ((serial->dev->descriptor.idVendor != HANDSPRING_VENDOR_ID) ||
+	if (!((serial->dev->descriptor.idVendor == HANDSPRING_VENDOR_ID) ||
+	      (serial->dev->descriptor.idVendor == KYOCERA_VENDOR_ID)) ||
 	    (serial->num_interrupt_in == 0))
 		return 0;
 
 	dbg("%s", __FUNCTION__);
 
 	/*
-	* It appears that Treos want to use the 1st interrupt endpoint to
-	* communicate with the 2nd bulk out endpoint, so let's swap the 1st
-	* and 2nd bulk in and interrupt endpoints.  Note that swapping the
-	* bulk out endpoints would break lots of apps that want to communicate
-	* on the second port.
+	* It appears that Treos and Kyoceras want to use the 
+	* 1st bulk in endpoint to communicate with the 2nd bulk out endpoint, 
+	* so let's swap the 1st and 2nd bulk in and interrupt endpoints.  
+	* Note that swapping the bulk out endpoints would break lots of 
+	* apps that want to communicate on the second port.
 	*/
 #define COPY_PORT(dest, src)						\
 	dest->read_urb = src->read_urb;					\
--- diff/drivers/usb/serial/visor.h	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/serial/visor.h	2004-07-01 21:32:47.000000000 +0100
@@ -55,6 +55,9 @@
 #define ACEECA_VENDOR_ID		0x4766
 #define ACEECA_MEZ1000_ID		0x0001
 
+#define KYOCERA_VENDOR_ID		0x0C88
+#define KYOCERA_7135_ID			0x0021 
+
 /****************************************************************************
  * Handspring Visor Vendor specific request codes (bRequest values)
  * A big thank you to Handspring for providing the following information.
--- diff/drivers/usb/serial/whiteheat.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/serial/whiteheat.c	2004-07-01 21:32:47.000000000 +0100
@@ -835,6 +835,7 @@
 static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
 {
 	struct serial_struct serstruct;
+	void __user *user_arg = (void __user *)arg;
 
 	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
 
@@ -851,13 +852,13 @@
 			serstruct.close_delay = CLOSING_DELAY;
 			serstruct.closing_wait = CLOSING_DELAY;
 
-			if (copy_to_user((void *)arg, &serstruct, sizeof(serstruct)))
+			if (copy_to_user(user_arg, &serstruct, sizeof(serstruct)))
 				return -EFAULT;
 
 			break;
 
 		case TIOCSSERIAL:
-			if (copy_from_user(&serstruct, (void *)arg, sizeof(serstruct)))
+			if (copy_from_user(&serstruct, user_arg, sizeof(serstruct)))
 				return -EFAULT;
 
 			/*
--- diff/drivers/usb/storage/Kconfig	2004-05-19 22:12:20.000000000 +0100
+++ source/drivers/usb/storage/Kconfig	2004-07-01 21:32:47.000000000 +0100
@@ -23,6 +23,28 @@
 	  Say Y here in order to have the USB Mass Storage code generate
 	  verbose debugging messages.
 
+config USB_STORAGE_RW_DETECT
+	bool "USB Mass Storage Write-Protected Media Detection (EXPERIMENTAL)"
+	depends on USB_STORAGE && EXPERIMENTAL
+	help
+	  Say Y here in order to have the USB Mass Storage code indicate to
+	  the SCSI layer that using MODE SENSE(6) and MODE SENSE(10) to
+	  determine if the media is write-protected is a good thing to do.
+
+	  Many devices have historically had trouble with these commands,
+	  hence the default 2.6.x behavior has been to suppress their use.
+	  2.4.x used these commands with (at best) mixed results, often
+	  crashing the firmware of the device.  However, the SCSI layer now
+	  issues these commands in a manner more consistent with other
+	  "popular" OSes, in an attempt to improve compatibility.
+
+	  Saying Y here allows these commands to be sent to a USB device.
+	  If you find a device this doesn't work for, switch to N and let
+	  us know at usb-storage@lists.one-eyed-alien.net
+
+	  If you say N here, the kernel will assume that all disk-like USB
+	  devices are write-enabled.
+
 config USB_STORAGE_DATAFAB
 	bool "Datafab Compact Flash Reader support (EXPERIMENTAL)"
 	depends on USB_STORAGE && EXPERIMENTAL
--- diff/drivers/usb/storage/jumpshot.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/storage/jumpshot.c	2004-07-01 21:32:47.000000000 +0100
@@ -471,7 +471,7 @@
 
 		// build the reply
 		//
-		((u32 *) ptr)[0] = cpu_to_be32(info->sectors);
+		((u32 *) ptr)[0] = cpu_to_be32(info->sectors - 1);
 		((u32 *) ptr)[1] = cpu_to_be32(info->ssize);
 		usb_stor_set_xfer_buf(ptr, 8, srb);
 
--- diff/drivers/usb/storage/scsiglue.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/storage/scsiglue.c	2004-07-01 21:32:47.000000000 +0100
@@ -48,13 +48,13 @@
 #include "usb.h"
 #include "debug.h"
 #include "transport.h"
+#include "protocol.h"
 
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <scsi/scsi_devinfo.h>
 #include <scsi/scsi_host.h>
 
-
 /***********************************************************************
  * Host functions 
  ***********************************************************************/
@@ -68,10 +68,13 @@
 {
 	/*
 	 * Set default bflags. These can be overridden for individual
-	 * models and vendors via the scsi devinfo mechanism.
+	 * models and vendors via the scsi devinfo mechanism.  The only
+	 * flag we need is to force 36-byte INQUIRYs; we don't use any
+	 * of the extra data and many devices choke if asked for more or
+	 * less than 36 bytes.
 	 */
-	sdev->sdev_bflags = (BLIST_MS_SKIP_PAGE_08 | BLIST_MS_SKIP_PAGE_3F |
-			     BLIST_USE_10_BYTE_MS);
+	sdev->sdev_bflags = BLIST_INQUIRY_36;
+
 	return 0;
 }
 
@@ -95,11 +98,48 @@
 	 * reduce the maximum transfer size to 64 KB = 128 sectors. */
 
 #define USB_VENDOR_ID_GENESYS	0x05e3		// Needs a standard location
+
 	if (us->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS &&
-			us->pusb_dev->speed == USB_SPEED_HIGH)
+			us->pusb_dev->speed == USB_SPEED_HIGH &&
+			sdev->request_queue->max_sectors > 128)
 		blk_queue_max_sectors(sdev->request_queue, 128);
 
-	/* this is to satisify the compiler, tho I don't think the 
+	/* We can't put these settings in slave_alloc() because that gets
+	 * called before the device type is known.  Consequently these
+	 * settings can't be overridden via the scsi devinfo mechanism. */
+	if (sdev->type == TYPE_DISK) {
+
+		/* Disk-type devices use MODE SENSE(6) if the protocol
+		 * (SubClass) is Transparent SCSI, otherwise they use
+		 * MODE SENSE(10). */
+		if (us->subclass != US_SC_SCSI)
+			sdev->use_10_for_ms = 1;
+
+		/* Many disks only accept MODE SENSE transfer lengths of
+		 * 192 bytes (that's what Windows uses). */
+		sdev->use_192_bytes_for_3f = 1;
+
+		/* A number of devices have problems with MODE SENSE for
+		 * page x08, so we will skip it. */
+		sdev->skip_ms_page_8 = 1;
+
+#ifndef CONFIG_USB_STORAGE_RW_DETECT
+		/* Some devices may not like MODE SENSE with page=0x3f.
+		 * Now that we're using 192-byte transfers this may no
+		 * longer be a problem.  So this will be a configuration
+		 * option. */
+		sdev->skip_ms_page_3f = 1;
+#endif
+
+	} else {
+
+		/* Non-disk-type devices don't need to blacklist any pages
+		 * or to force 192-byte transfer lengths for MODE SENSE.
+		 * But they do need to use MODE SENSE(10). */
+		sdev->use_10_for_ms = 1;
+	}
+
+	/* this is to satisfy the compiler, tho I don't think the 
 	 * return code is ever checked anywhere. */
 	return 0;
 }
@@ -409,6 +449,9 @@
 	/* emulated HBA */
 	.emulated =			TRUE,
 
+	/* we do our own delay after a device or bus reset */
+	.skip_settle_delay =		1,
+
 	/* sysfs device attributes */
 	.sdev_attrs =			sysfs_device_attr_list,
 
--- diff/drivers/usb/storage/transport.c	2004-06-30 14:25:54.000000000 +0100
+++ source/drivers/usb/storage/transport.c	2004-07-01 21:32:47.000000000 +0100
@@ -708,6 +708,12 @@
 			srb->sense_buffer[0] = 0x0;
 		}
 	}
+
+	/* Did we transfer less than the minimum amount required? */
+	if (srb->result == SAM_STAT_GOOD &&
+			srb->request_bufflen - srb->resid < srb->underflow)
+		srb->result = (DID_ERROR << 16) | (SUGGEST_RETRY << 24);
+
 	return;
 
 	/* abort processing: the bulk-only transport requires a reset
@@ -908,26 +914,29 @@
 				 USB_RECIP_INTERFACE,
 				 0, us->ifnum, us->iobuf, 1, HZ);
 
+	US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", 
+		  result, us->iobuf[0]);
+
+	/* if we have a successful request, return the result */
+	if (result == 1)
+		return us->iobuf[0];
+
 	/* 
 	 * Some devices (i.e. Iomega Zip100) need this -- apparently
 	 * the bulk pipes get STALLed when the GetMaxLUN request is
 	 * processed.   This is, in theory, harmless to all other devices
 	 * (regardless of if they stall or not).
 	 */
-	if (result < 0) {
+	if (result == -EPIPE) {
 		usb_stor_clear_halt(us, us->recv_bulk_pipe);
 		usb_stor_clear_halt(us, us->send_bulk_pipe);
+		/* return the default -- no LUNs */
+		return 0;
 	}
 
-	US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", 
-		  result, us->iobuf[0]);
-
-	/* if we have a successful request, return the result */
-	if (result == 1)
-		return us->iobuf[0];
-
-	/* return the default -- no LUNs */
-	return 0;
+	/* An answer or a STALL are the only valid responses.  If we get
+	 * something else, return an indication of error */
+	return -1;
 }
 
 int usb_stor_Bulk_transport(Scsi_Cmnd *srb, struct us_data *us)
@@ -1110,10 +1119,11 @@
 		goto Done;
 	}
 
-	/* long wait for reset, so unlock to allow disconnects */
-	up(&us->dev_semaphore);
-	msleep(6000);
-	down(&us->dev_semaphore);
+ 	/* Give the device some time to recover from the reset,
+ 	 * but don't delay disconnect processing. */
+ 	wait_event_interruptible_timeout(us->dev_reset_wait,
+ 			test_bit(US_FLIDX_DISCONNECTING, &us->flags),
+ 			HZ*6);
 	if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
 		US_DEBUGP("Reset interrupted by disconnect\n");
 		goto Done;
--- diff/drivers/usb/storage/unusual_devs.h	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/usb/storage/unusual_devs.h	2004-07-01 21:32:47.000000000 +0100
@@ -207,7 +207,7 @@
 UNUSUAL_DEV(  0x04e6, 0x0006, 0x0100, 0x0205, 
 		"Shuttle",
 		"eUSB MMC Adapter",
-		US_SC_SCSI, US_PR_CB, NULL, 
+		US_SC_SCSI, US_PR_DEVICE, NULL, 
 		US_FL_SINGLE_LUN), 
 
 UNUSUAL_DEV(  0x04e6, 0x0007, 0x0100, 0x0200, 
@@ -359,13 +359,19 @@
 UNUSUAL_DEV(  0x0595, 0x4343, 0x0000, 0x2210,
 		"Fujifilm",
 		"Digital Camera EX-20 DSC",
-		US_SC_8070, US_PR_CBI, NULL, 0 ),
+		US_SC_8070, US_PR_DEVICE, NULL, 0 ),
 
 UNUSUAL_DEV(  0x059f, 0xa601, 0x0200, 0x0200, 
 		"LaCie",
 		"USB Hard Disk",
 		US_SC_RBC, US_PR_CB, NULL, 0 ), 
 
+/* Submitted by Jol Bourquard <numlock@freesurf.ch> */
+UNUSUAL_DEV(  0x05ab, 0x0060, 0x1104, 0x1110,
+		"In-System",
+		"PyroGate External CD-ROM Enclosure (FCD-523)",
+		US_SC_SCSI, US_PR_BULK, NULL, 0 ),
+
 #ifdef CONFIG_USB_STORAGE_ISD200
 UNUSUAL_DEV(  0x05ab, 0x0031, 0x0100, 0x0110,
 		"In-System",
@@ -396,8 +402,8 @@
 UNUSUAL_DEV(  0x05dc, 0x0001, 0x0000, 0x0001,
 		"Lexar",
 		"Jumpshot USB CF Reader",
-		US_SC_DEVICE, US_PR_JUMPSHOT, NULL,
-		US_FL_MODE_XLATE ),
+		US_SC_SCSI, US_PR_JUMPSHOT, NULL,
+		US_FL_NEED_OVERRIDE | US_FL_MODE_XLATE ),
 #endif
 
 /* Reported by Blake Matheny <bmatheny@purdue.edu> */
@@ -628,20 +634,14 @@
  * - Some cameras with idProduct=0x1001 and bcdDevice=0x1000 have
  *   bInterfaceProtocol=0x00 (US_PR_CBI) while others have 0x01 (US_PR_CB).
  *   So don't remove the US_PR_CB override!
+ * - Cameras with bcdDevice=0x9009 require the US_SC_8070 override.
  */
-UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9009,
+UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9999,
 		"Casio",
 		"QV DigitalCamera",
-		US_SC_DEVICE, US_PR_CB, NULL,
+		US_SC_8070, US_PR_CB, NULL,
 		US_FL_NEED_OVERRIDE | US_FL_FIX_INQUIRY ),
 
-/* Later Casio cameras apparently tell the truth */
-UNUSUAL_DEV( 0x07cf, 0x1001, 0x9010, 0x9999,
-		"Casio",
-		"QV DigitalCamera",
-		US_SC_DEVICE, US_PR_DEVICE, NULL,
-		US_FL_FIX_INQUIRY ),
-
 /* Submitted by Hartmut Wahl <hwahl@hwahl.de>*/
 UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0001,
 		"Samsung",
--- diff/drivers/usb/storage/usb.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/usb/storage/usb.c	2004-07-01 21:32:47.000000000 +0100
@@ -266,6 +266,7 @@
 static int usb_stor_control_thread(void * __us)
 {
 	struct us_data *us = (struct us_data *)__us;
+	struct Scsi_Host *host = us->host;
 
 	lock_kernel();
 
@@ -283,19 +284,21 @@
 	complete(&(us->notify));
 
 	for(;;) {
-		struct Scsi_Host *host;
 		US_DEBUGP("*** thread sleeping.\n");
 		if(down_interruptible(&us->sema))
 			break;
 			
 		US_DEBUGP("*** thread awakened.\n");
 
+		/* lock the device pointers */
+		down(&(us->dev_semaphore));
+
 		/* if us->srb is NULL, we are being asked to exit */
 		if (us->srb == NULL) {
 			US_DEBUGP("-- exit command received\n");
+			up(&(us->dev_semaphore));
 			break;
 		}
-		host = us->srb->device->host;
 
 		/* lock access to the state */
 		scsi_lock(host);
@@ -306,23 +309,20 @@
 			goto SkipForAbort;
 		}
 
-		/* set the state and release the lock */
-		us->sm_state = US_STATE_RUNNING;
-		scsi_unlock(host);
-
-		/* lock the device pointers */
-		down(&(us->dev_semaphore));
-
 		/* don't do anything if we are disconnecting */
 		if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
 			US_DEBUGP("No command during disconnect\n");
-			us->srb->result = DID_BAD_TARGET << 16;
+			goto SkipForDisconnect;
 		}
 
+		/* set the state and release the lock */
+		us->sm_state = US_STATE_RUNNING;
+		scsi_unlock(host);
+
 		/* reject the command if the direction indicator 
 		 * is UNKNOWN
 		 */
-		else if (us->srb->sc_data_direction == SCSI_DATA_UNKNOWN) {
+		if (us->srb->sc_data_direction == SCSI_DATA_UNKNOWN) {
 			US_DEBUGP("UNKNOWN data direction\n");
 			us->srb->result = DID_ERROR << 16;
 		}
@@ -362,9 +362,6 @@
 			us->proto_handler(us->srb, us);
 		}
 
-		/* unlock the device pointers */
-		up(&(us->dev_semaphore));
-
 		/* lock access to the state */
 		scsi_lock(host);
 
@@ -374,7 +371,7 @@
 				   us->srb->result);
 			us->srb->scsi_done(us->srb);
 		} else {
-			SkipForAbort:
+SkipForAbort:
 			US_DEBUGP("scsi command aborted\n");
 		}
 
@@ -387,9 +384,13 @@
 			complete(&(us->notify));
 
 		/* empty the queue, reset the state, and release the lock */
+SkipForDisconnect:
 		us->srb = NULL;
 		us->sm_state = US_STATE_IDLE;
 		scsi_unlock(host);
+
+		/* unlock the device pointers */
+		up(&(us->dev_semaphore));
 	} /* for (;;) */
 
 	/* notify the exit routine that we're actually exiting now 
@@ -423,10 +424,8 @@
 	us->pusb_intf = intf;
 	us->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
 
-	/* Store our private data in the interface and increment the
-	 * device's reference count */
+	/* Store our private data in the interface */
 	usb_set_intfdata(intf, us);
-	usb_get_dev(us->pusb_dev);
 
 	/* Allocate the device-related DMA-mapped buffers */
 	us->cr = usb_buffer_alloc(us->pusb_dev, sizeof(*us->cr),
@@ -754,8 +753,14 @@
 	down(&us->dev_semaphore);
 
 	/* For bulk-only devices, determine the max LUN value */
-	if (us->protocol == US_PR_BULK)
-		us->max_lun = usb_stor_Bulk_max_lun(us);
+	if (us->protocol == US_PR_BULK) {
+		p = usb_stor_Bulk_max_lun(us);
+		if (p < 0) {
+			up(&us->dev_semaphore);
+			return p;
+		}
+		us->max_lun = p;
+	}
 
 	/* Just before we start our control thread, initialize
 	 * the device if it needs initialization */
@@ -764,19 +769,6 @@
 
 	up(&us->dev_semaphore);
 
-	/* Start up our control thread */
-	us->sm_state = US_STATE_IDLE;
-	p = kernel_thread(usb_stor_control_thread, us, CLONE_VM);
-	if (p < 0) {
-		printk(KERN_WARNING USB_STORAGE 
-		       "Unable to start control thread\n");
-		return p;
-	}
-	us->pid = p;
-
-	/* Wait for the thread to start */
-	wait_for_completion(&(us->notify));
-
 	/*
 	 * Since this is a new device, we need to register a SCSI
 	 * host definition with the higher SCSI layers.
@@ -784,69 +776,61 @@
 	us->host = scsi_host_alloc(&usb_stor_host_template, sizeof(us));
 	if (!us->host) {
 		printk(KERN_WARNING USB_STORAGE
-			"Unable to register the scsi host\n");
+			"Unable to allocate the scsi host\n");
 		return -EBUSY;
 	}
 
 	/* Set the hostdata to prepare for scanning */
 	us->host->hostdata[0] = (unsigned long) us;
 
-	return 0;
-}
-
-/* Dissociate from the USB device */
-static void dissociate_dev(struct us_data *us)
-{
-	US_DEBUGP("-- %s\n", __FUNCTION__);
-	down(&us->dev_semaphore);
-
-	/* Free the device-related DMA-mapped buffers */
-	if (us->cr) {
-		usb_buffer_free(us->pusb_dev, sizeof(*us->cr), us->cr,
-				us->cr_dma);
-		us->cr = NULL;
-	}
-	if (us->iobuf) {
-		usb_buffer_free(us->pusb_dev, US_IOBUF_SIZE, us->iobuf,
-				us->iobuf_dma);
-		us->iobuf = NULL;
+	/* Start up our control thread */
+	us->sm_state = US_STATE_IDLE;
+	p = kernel_thread(usb_stor_control_thread, us, CLONE_VM);
+	if (p < 0) {
+		printk(KERN_WARNING USB_STORAGE 
+		       "Unable to start control thread\n");
+		return p;
 	}
+	us->pid = p;
 
-	/* Remove our private data from the interface and decrement the
-	 * device's reference count */
-	usb_set_intfdata(us->pusb_intf, NULL);
-	usb_put_dev(us->pusb_dev);
+	/* Wait for the thread to start */
+	wait_for_completion(&(us->notify));
 
-	us->pusb_dev = NULL;
-	us->pusb_intf = NULL;
-	up(&us->dev_semaphore);
+	return 0;
 }
 
-/* Release all our static and dynamic resources */
+/* Release all our dynamic resources */
 void usb_stor_release_resources(struct us_data *us)
 {
-	/*
-	 * The host must already have been removed
-	 * and dissociate_dev() must have been called.
-	 */
-
-	/* Finish the SCSI host removal sequence */
-	if (us->host) {
-		us->host->hostdata[0] = 0;
-		scsi_host_put(us->host);
-	}
+	US_DEBUGP("-- %s\n", __FUNCTION__);
 
-	/* Kill the control thread
-	 *
-	 * Enqueue the command, wake up the thread, and wait for 
-	 * notification that it has exited.
+	/* Kill the control thread.  The SCSI host must already have been
+	 * removed so it won't try to queue any more commands.
 	 */
 	if (us->pid) {
+
+		/* Wait for the thread to be idle */
+		down(&us->dev_semaphore);
 		US_DEBUGP("-- sending exit command to thread\n");
 		BUG_ON(us->sm_state != US_STATE_IDLE);
+
+		/* If the SCSI midlayer queued a final command just before
+		 * scsi_remove_host() was called, us->srb might not be
+		 * NULL.  We can overwrite it safely, because the midlayer
+		 * will not wait for the command to finish.  Also the
+		 * control thread will already have been awakened.
+		 * That's okay, an extra up() on us->sema won't hurt.
+		 *
+		 * Enqueue the command, wake up the thread, and wait for 
+		 * notification that it has exited.
+		 */
+		scsi_lock(us->host);
 		us->srb = NULL;
-		up(&(us->sema));
-		wait_for_completion(&(us->notify));
+		scsi_unlock(us->host);
+		up(&us->dev_semaphore);
+
+		up(&us->sema);
+		wait_for_completion(&us->notify);
 	}
 
 	/* Call the destructor routine, if it exists */
@@ -855,15 +839,36 @@
 		us->extra_destructor(us->extra);
 	}
 
+	/* Finish the host removal sequence */
+	if (us->host)
+		scsi_host_put(us->host);
+
 	/* Free the extra data and the URB */
 	if (us->extra)
 		kfree(us->extra);
 	if (us->current_urb)
 		usb_free_urb(us->current_urb);
 
+}
+
+/* Dissociate from the USB device */
+static void dissociate_dev(struct us_data *us)
+{
+	US_DEBUGP("-- %s\n", __FUNCTION__);
+
+	/* Free the device-related DMA-mapped buffers */
+	if (us->cr)
+		usb_buffer_free(us->pusb_dev, sizeof(*us->cr), us->cr,
+				us->cr_dma);
+	if (us->iobuf)
+		usb_buffer_free(us->pusb_dev, US_IOBUF_SIZE, us->iobuf,
+				us->iobuf_dma);
+
+	/* Remove our private data from the interface */
+	usb_set_intfdata(us->pusb_intf, NULL);
+
 	/* Free the structure itself */
 	kfree(us);
-	US_DEBUGP("-- %s finished\n", __FUNCTION__);
 }
 
 /* Probe to see if we can drive a newly-connected USB device */
@@ -889,6 +894,7 @@
 	init_MUTEX(&(us->dev_semaphore));
 	init_MUTEX_LOCKED(&(us->sema));
 	init_completion(&(us->notify));
+	init_waitqueue_head(&us->dev_reset_wait);
 
 	/* Associate the us_data structure with the USB device */
 	result = associate_dev(us, intf);
@@ -959,8 +965,8 @@
 	/* We come here if there are any problems */
 BadDevice:
 	US_DEBUGP("storage_probe() failed\n");
-	dissociate_dev(us);
 	usb_stor_release_resources(us);
+	dissociate_dev(us);
 	return result;
 }
 
@@ -971,20 +977,20 @@
 
 	US_DEBUGP("storage_disconnect() called\n");
 
-	/* Prevent new USB transfers and stop the current command */
+	/* Prevent new USB transfers, stop the current command, and
+	 * interrupt a device-reset delay */
 	set_bit(US_FLIDX_DISCONNECTING, &us->flags);
 	usb_stor_stop_transport(us);
+	wake_up(&us->dev_reset_wait);
 
-	/* Dissociate from the USB device */
-	dissociate_dev(us);
-
+	/* Wait for the current command to finish, then remove the host */
+	down(&us->dev_semaphore);
+	up(&us->dev_semaphore);
 	scsi_remove_host(us->host);
 
-	/* TODO: somehow, wait for the device to
-	 * be 'idle' (tasklet completion) */
-
-	/* Release all our other resources */
+	/* Wait for everything to become idle and release all our resources */
 	usb_stor_release_resources(us);
+	dissociate_dev(us);
 }
 
 /***********************************************************************
@@ -1017,47 +1023,6 @@
 	 */
 	US_DEBUGP("-- calling usb_deregister()\n");
 	usb_deregister(&usb_storage_driver) ;
-
-#if 0
-	/* While there are still virtual hosts, unregister them
-	 * Note that it's important to do this completely before removing
-	 * the structures because of possible races with the /proc
-	 * interface
-	 */
-	for (next = us_list; next; next = next->next) {
-		US_DEBUGP("-- calling scsi_unregister_host()\n");
-		scsi_unregister_host(&usb_stor_host_template);
-	}
-
-	/* While there are still structures, free them.  Note that we are
-	 * now race-free, since these structures can no longer be accessed
-	 * from either the SCSI command layer or the /proc interface
-	 */
-	while (us_list) {
-		/* keep track of where the next one is */
-		next = us_list->next;
-
-		/* If there's extra data in the us_data structure then
-		 * free that first */
-		if (us_list->extra) {
-			/* call the destructor routine, if it exists */
-			if (us_list->extra_destructor) {
-				US_DEBUGP("-- calling extra_destructor()\n");
-				us_list->extra_destructor(us_list->extra);
-			}
-
-			/* destroy the extra data */
-			US_DEBUGP("-- freeing the data structure\n");
-			kfree(us_list->extra);
-		}
-
-		/* free the structure itself */
-		kfree (us_list);
-
-		/* advance the list pointer */
-		us_list = next;
-	}
-#endif
 }
 
 module_init(usb_stor_init);
--- diff/drivers/usb/storage/usb.h	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/usb/storage/usb.h	2004-07-01 21:32:47.000000000 +0100
@@ -158,9 +158,10 @@
 	dma_addr_t		cr_dma;		 /* buffer DMA addresses */
 	dma_addr_t		iobuf_dma;
 
-	/* mutual exclusion structures */
+	/* mutual exclusion and synchronization structures */
 	struct semaphore	sema;		 /* to sleep thread on   */
-	struct completion	notify;		 /* thread begin/end	    */
+	struct completion	notify;		 /* thread begin/end	 */
+	wait_queue_head_t	dev_reset_wait;  /* wait during reset    */
 
 	/* subdriver information */
 	void			*extra;		 /* Any extra data          */
--- diff/drivers/video/Kconfig	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/Kconfig	2004-07-01 21:32:47.000000000 +0100
@@ -40,7 +40,7 @@
 
 config FB_CIRRUS
 	tristate "Cirrus Logic support"
-	depends on FB && (AMIGA || PCI) && BROKEN
+	depends on FB && (AMIGA || PCI)
 	---help---
 	  This enables support for Cirrus Logic GD542x/543x based boards on
 	  Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum.
@@ -424,6 +424,8 @@
 config FB_RIVA
 	tristate "nVidia Riva support"
 	depends on FB && PCI
+	select I2C_ALGOBIT if FB_RIVA_I2C
+	select I2C if FB_RIVA_I2C
 	help
 	  This driver supports graphics boards with the nVidia Riva/Geforce
 	  chips.
@@ -432,6 +434,18 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called rivafb.
 
+config FB_RIVA_I2C
+       bool "Enable DDC Support"
+       depends on FB_RIVA
+       help
+	  This enables I2C support for nVidia Chipsets.  This is used
+	  only for getting EDID information from the attached display
+	  allowing for robust video mode handling and switching.
+
+	  Because fbdev-2.6 requires that drivers must be able to
+	  independently validate video mode parameters, you should say Y
+	  here.
+
 config FB_I810
 	tristate "Intel 810/815 support (EXPERIMENTAL)"
 	depends on FB && AGP && AGP_INTEL && EXPERIMENTAL && PCI	
--- diff/drivers/video/Makefile	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/Makefile	2004-07-01 21:32:47.000000000 +0100
@@ -39,7 +39,7 @@
 obj-$(CONFIG_FB_OF)               += offb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o
 obj-$(CONFIG_FB_IMSTT)            += imsttfb.o cfbimgblt.o
 obj-$(CONFIG_FB_RETINAZ3)         += retz3fb.o
-obj-$(CONFIG_FB_CIRRUS)		  += cirrusfb.o
+obj-$(CONFIG_FB_CIRRUS)		  += cirrusfb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o
 obj-$(CONFIG_FB_TRIDENT)	  += tridentfb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o
 obj-$(CONFIG_FB_S3TRIO)           += S3triofb.o
 obj-$(CONFIG_FB_TGA)              += tgafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o 
--- diff/drivers/video/acornfb.c	2004-05-19 22:12:20.000000000 +0100
+++ source/drivers/video/acornfb.c	2004-07-01 21:32:47.000000000 +0100
@@ -1246,6 +1246,8 @@
 
 /*
  * This enables the unused memory to be freed on older Acorn machines.
+ * We are freeing memory on behalf of the architecture initialisation
+ * code here.
  */
 static inline void
 free_unused_pages(unsigned int virtual_start, unsigned int virtual_end)
@@ -1268,7 +1270,7 @@
 		 */
 		page = virt_to_page(virtual_start);
 		ClearPageReserved(page);
-		atomic_set(&page->count, 1);
+		set_page_count(page, 1);
 		free_page(virtual_start);
 
 		virtual_start += PAGE_SIZE;
--- diff/drivers/video/aty/radeon_accel.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/aty/radeon_accel.c	2004-07-01 21:32:47.000000000 +0100
@@ -33,13 +33,13 @@
   
 	if (info->state != FBINFO_STATE_RUNNING)
 		return;
-	if (radeon_accel_disabled()) {
+	if (info->flags & FBINFO_HWACCEL_DISABLED) {
 		cfb_fillrect(info, region);
 		return;
 	}
 
-	vxres = info->var.xres;
-	vyres = info->var.yres;
+	vxres = info->var.xres_virtual;
+	vyres = info->var.yres_virtual;
 
 	memcpy(&modded, region, sizeof(struct fb_fillrect));
 
@@ -99,13 +99,13 @@
   
 	if (info->state != FBINFO_STATE_RUNNING)
 		return;
-	if (radeon_accel_disabled()) {
+	if (info->flags & FBINFO_HWACCEL_DISABLED) {
 		cfb_copyarea(info, area);
 		return;
 	}
 
-	vxres = info->var.xres;
-	vyres = info->var.yres;
+	vxres = info->var.xres_virtual;
+	vyres = info->var.yres_virtual;
 
 	if(!modded.width || !modded.height ||
 	   modded.sx >= vxres || modded.sy >= vyres ||
--- diff/drivers/video/aty/radeon_base.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/aty/radeon_base.c	2004-07-01 21:32:47.000000000 +0100
@@ -242,8 +242,6 @@
 static int nomtrr = 0;
 #endif
 
-int radeonfb_noaccel = 0;
-
 /*
  * prototypes
  */
@@ -810,9 +808,8 @@
 	/* XXX I'm adjusting xres_virtual to the pitch, that may help XFree
 	 * with some panels, though I don't quite like this solution
 	 */
-  	if (radeon_accel_disabled()) {
+  	if (rinfo->info->flags & FBINFO_HWACCEL_DISABLED) {
 		v.xres_virtual = v.xres_virtual & ~7ul;
-		v.accel_flags = 0;
 	} else {
 		pitch = ((v.xres_virtual * ((v.bits_per_pixel + 1) / 8) + 0x3f)
  				& ~(0x3f)) >> 6;
@@ -858,6 +855,7 @@
         if (rinfo->asleep)
         	return 0;
 
+	radeon_fifo_wait(2);
         OUTREG(CRTC_OFFSET, ((var->yoffset * var->xres_virtual + var->xoffset)
 			     * var->bits_per_pixel / 8) & ~7);
         return 0;
@@ -882,11 +880,12 @@
 			if (!rinfo->is_mobility)
 				return -EINVAL;
 
-			rc = get_user(value, (__u32*)arg);
+			rc = get_user(value, (__u32 __user *)arg);
 
 			if (rc)
 				return rc;
 
+			radeon_fifo_wait(2);
 			if (value & 0x01) {
 				tmp = INREG(LVDS_GEN_CNTL);
 
@@ -926,7 +925,7 @@
 			if (CRTC_CRT_ON & tmp)
 				value |= 0x02;
 
-			return put_user(value, (__u32*)arg);
+			return put_user(value, (__u32 __user *)arg);
 		default:
 			return -EINVAL;
 	}
@@ -963,6 +962,7 @@
                         break;
         }
 
+	radeon_fifo_wait(1);
 	switch (rinfo->mon1_type) {
 		case MT_LCD:
 			OUTREG(LVDS_GEN_CNTL, val2);
@@ -1021,6 +1021,7 @@
         if (!rinfo->asleep) {
         	u32 dac_cntl2, vclk_cntl = 0;
         	
+		radeon_fifo_wait(9);
 		if (rinfo->is_mobility) {
 			vclk_cntl = INPLL(VCLK_ECP_CNTL);
 			OUTPLL(VCLK_ECP_CNTL, vclk_cntl & ~PIXCLK_DAC_ALWAYS_ONb);
@@ -1112,6 +1113,8 @@
 {
 	int i;
 
+	radeon_fifo_wait(20);
+
 	/* Workaround from XFree */
 	if (rinfo->is_mobility) {
 	        /* A temporal workaround for the occational blanking on certain laptop panels. 
@@ -1198,6 +1201,8 @@
 {
 	struct radeonfb_info *rinfo = (struct radeonfb_info *)data;
 
+	radeon_fifo_wait(3);
+
 	OUTREG(LVDS_GEN_CNTL, rinfo->pending_lvds_gen_cntl);
 	if (rinfo->pending_pixclks_cntl) {
 		OUTPLL(PIXCLKS_CNTL, rinfo->pending_pixclks_cntl);
@@ -1222,6 +1227,7 @@
 
 	radeon_screen_blank(rinfo, VESA_POWERDOWN);
 
+	radeon_fifo_wait(31);
 	for (i=0; i<10; i++)
 		OUTREG(common_regs[i].reg, common_regs[i].val);
 
@@ -1249,6 +1255,7 @@
 	radeon_write_pll_regs(rinfo, mode);
 
 	if ((primary_mon == MT_DFP) || (primary_mon == MT_LCD)) {
+		radeon_fifo_wait(10);
 		OUTREG(FP_CRTC_H_TOTAL_DISP, mode->fp_crtc_h_total_disp);
 		OUTREG(FP_CRTC_V_TOTAL_DISP, mode->fp_crtc_v_total_disp);
 		OUTREG(FP_H_SYNC_STRT_WID, mode->fp_h_sync_strt_wid);
@@ -1288,6 +1295,7 @@
 
 	radeon_screen_blank(rinfo, VESA_NO_BLANKING);
 
+	radeon_fifo_wait(2);
 	OUTPLL(VCLK_ECP_CNTL, mode->vclk_ecp_cntl);
 	
 	return;
@@ -1524,7 +1532,7 @@
 	newmode.crtc_v_sync_strt_wid = (((vSyncStart - 1) & 0xfff) |
 					 (vsync_wid << 16) | (v_sync_pol  << 23));
 
-	if (!radeon_accel_disabled()) {
+	if (!(info->flags & FBINFO_HWACCEL_DISABLED)) {
 		/* We first calculate the engine pitch */
 		rinfo->pitch = ((mode->xres_virtual * ((mode->bits_per_pixel + 1) / 8) + 0x3f)
  				& ~(0x3f)) >> 6;
@@ -1672,12 +1680,11 @@
 	if (!rinfo->asleep) {
 		radeon_write_mode (rinfo, &newmode);
 		/* (re)initialize the engine */
-		if (!radeon_accel_disabled())
+		if (!(info->flags & FBINFO_HWACCEL_DISABLED))
 			radeonfb_engine_init (rinfo);
-	
 	}
 	/* Update fix */
-	if (!radeon_accel_disabled())
+	if (!(info->flags & FBINFO_HWACCEL_DISABLED))
         	info->fix.line_length = rinfo->pitch*64;
         else
 		info->fix.line_length = mode->xres_virtual
@@ -1696,7 +1703,7 @@
 
 
 
-static ssize_t radeonfb_read(struct file *file, char *buf, size_t count, loff_t *ppos)
+static ssize_t radeonfb_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 {
 	unsigned long p = *ppos;
 	struct inode *inode = file->f_dentry->d_inode;
@@ -1723,7 +1730,7 @@
 	return count;
 }
 
-static ssize_t radeonfb_write(struct file *file, const char *buf, size_t count,
+static ssize_t radeonfb_write(struct file *file, const char __user *buf, size_t count,
 			      loff_t *ppos)
 {
 	unsigned long p = *ppos;
@@ -1782,9 +1789,13 @@
 	info->currcon = -1;
 	info->par = rinfo;
 	info->pseudo_palette = rinfo->pseudo_palette;
-        info->flags = FBINFO_FLAG_DEFAULT;
-        info->fbops = &radeonfb_ops;
-        info->screen_base = (char *)rinfo->fb_base;
+	info->flags = FBINFO_DEFAULT
+		    | FBINFO_HWACCEL_COPYAREA
+		    | FBINFO_HWACCEL_FILLRECT
+		    | FBINFO_HWACCEL_XPAN
+		    | FBINFO_HWACCEL_YPAN;
+	info->fbops = &radeonfb_ops;
+	info->screen_base = (char *)rinfo->fb_base;
 
 	/* Fill fix common fields */
 	strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id));
@@ -1798,17 +1809,11 @@
         info->fix.type_aux = 0;
         info->fix.mmio_start = rinfo->mmio_base_phys;
         info->fix.mmio_len = RADEON_REGSIZE;
-	if (radeon_accel_disabled())
-	        info->fix.accel = FB_ACCEL_NONE;
-	else
-		info->fix.accel = FB_ACCEL_ATI_RADEON;
 
 	fb_alloc_cmap(&info->cmap, 256, 0);
 
-	if (radeon_accel_disabled())
-		info->var.accel_flags &= ~FB_ACCELF_TEXT;
-	else
-		info->var.accel_flags |= FB_ACCELF_TEXT;
+	if (noaccel)
+		info->flags |= FBINFO_HWACCEL_DISABLED;
 
         return 0;
 }
@@ -1864,6 +1869,7 @@
 	del_timer_sync(&rinfo->lvds_timer);
 
 	lvds_gen_cntl |= (LVDS_BL_MOD_EN | LVDS_BLON);
+	radeon_fifo_wait(3);
 	if (on && (level > BACKLIGHT_OFF)) {
 		lvds_gen_cntl |= LVDS_DIGON;
 		if (!(lvds_gen_cntl & LVDS_ON)) {
@@ -2136,6 +2142,7 @@
           u32 tom = INREG(NB_TOM);
           tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024);
  
+ 		radeon_fifo_wait(6);
           OUTREG(MC_FB_LOCATION, tom);
           OUTREG(DISPLAY_BASE_ADDR, (tom & 0xffff) << 16);
           OUTREG(CRTC2_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16);
@@ -2255,9 +2262,17 @@
 
 	/*
 	 * Map the BIOS ROM if any and retreive PLL parameters from
-	 * either BIOS or Open Firmware
+	 * the BIOS. We skip that on mobility chips as the real panel
+	 * values we need aren't in the ROM but in the BIOS image in
+	 * memory. This is definitely not the best meacnism though,
+	 * we really need the arch code to tell us which is the "primary"
+	 * video adapter to use the memory image (or better, the arch
+	 * should provide us a copy of the BIOS image to shield us from
+	 * archs who would store that elsewhere and/or could initialize
+	 * more than one adapter during boot).
 	 */
-	radeon_map_ROM(rinfo, pdev);
+	if (!rinfo->is_mobility)
+		radeon_map_ROM(rinfo, pdev);
 
 	/*
 	 * On x86, the primary display on laptop may have it's BIOS
@@ -2270,6 +2285,12 @@
 		radeon_find_mem_vbios(rinfo);
 #endif /* __i386__ */
 
+	/* If both above failed, try the BIOS ROM again for mobility
+	 * chips
+	 */
+	if (rinfo->bios_seg == NULL && rinfo->is_mobility)
+		radeon_map_ROM(rinfo, pdev);
+
 	/* Get informations about the board's PLL */
 	radeon_get_pllinfo(rinfo);
 
@@ -2424,7 +2445,6 @@
 
 int __init radeonfb_init (void)
 {
-	radeonfb_noaccel = noaccel;
 	return pci_module_init (&radeonfb_driver);
 }
 
@@ -2446,7 +2466,7 @@
 			continue;
 
 		if (!strncmp(this_opt, "noaccel", 7)) {
-			noaccel = radeonfb_noaccel = 1;
+			noaccel = 1;
 		} else if (!strncmp(this_opt, "mirror", 6)) {
 			mirror = 1;
 		} else if (!strncmp(this_opt, "force_dfp", 9)) {
--- diff/drivers/video/aty/radeon_pm.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/aty/radeon_pm.c	2004-07-01 21:32:47.000000000 +0100
@@ -859,7 +859,7 @@
 
 	fb_set_suspend(info, 1);
 
-	if (!radeon_accel_disabled()) {
+	if (!(info->flags & FBINFO_HWACCEL_DISABLED)) {
 		/* Make sure engine is reset */
 		radeon_engine_idle();
 		radeonfb_engine_reset(rinfo);
--- diff/drivers/video/aty/radeonfb.h	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/aty/radeonfb.h	2004-07-01 21:32:47.000000000 +0100
@@ -516,12 +516,6 @@
 	printk(KERN_ERR "radeonfb: Idle Timeout !\n");
 }
 
-static inline int radeon_accel_disabled(void)
-{
-	extern int radeonfb_noaccel;
-	return radeonfb_noaccel;
-}
-
 #define radeon_engine_idle()		_radeon_engine_idle(rinfo)
 #define radeon_fifo_wait(entries)	_radeon_fifo_wait(rinfo,entries)
 
--- diff/drivers/video/cirrusfb.c	2004-05-19 22:12:20.000000000 +0100
+++ source/drivers/video/cirrusfb.c	2004-07-01 21:32:47.000000000 +0100
@@ -1,10 +1,13 @@
 /*
- * drivers/video/clgenfb.c - driver for Cirrus Logic chipsets
+ * drivers/video/cirrusfb.c - driver for Cirrus Logic chipsets
  *
  * Copyright 1999-2001 Jeff Garzik <jgarzik@pobox.com>
  *
  * Contributors (thanks, all!)
  *
+ * 	David Eger:
+ * 	Overhaul for Linux 2.6
+ *
  *      Jeff Rugen:
  *      Major contributions;  Motorola PowerStack (PPC and PCI) support,
  *      GD54xx, 1280x1024 mode support, change MCLK based on VCLK.
@@ -15,9 +18,9 @@
  *	Lars Hecking:
  *	Amiga updates and testing.
  *
- * Original clgenfb author:  Frank Neumann
+ * Original cirrusfb author:  Frank Neumann
  *
- * Based on retz3fb.c and clgen.c:
+ * Based on retz3fb.c and cirrusfb.c:
  *      Copyright (C) 1997 Jes Sorensen
  *      Copyright (C) 1996 Frank Neumann
  *
@@ -31,7 +34,7 @@
  *
  */
 
-#define CLGEN_VERSION "1.9.9.1"
+#define CIRRUSFB_VERSION "2.0-pre2"
 
 #include <linux/config.h>
 #include <linux/module.h>
@@ -63,15 +66,8 @@
 #define isPReP 0
 #endif
 
-#include <video/fbcon.h>
-#include <video/fbcon-mfb.h>
-#include <video/fbcon-cfb8.h>
-#include <video/fbcon-cfb16.h>
-#include <video/fbcon-cfb24.h>
-#include <video/fbcon-cfb32.h>
-
-#include "clgenfb.h"
-#include "vga.h"
+#include "video/vga.h"
+#include "video/cirrus.h"
 
 
 /*****************************************************************
@@ -81,20 +77,20 @@
  */
 
 /* enable debug output? */
-/* #define CLGEN_DEBUG 1 */
+/* #define CIRRUSFB_DEBUG 1 */
 
 /* disable runtime assertions? */
-/* #define CLGEN_NDEBUG */
+/* #define CIRRUSFB_NDEBUG */
 
 /* debug output */
-#ifdef CLGEN_DEBUG
+#ifdef CIRRUSFB_DEBUG
 #define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
 #else
 #define DPRINTK(fmt, args...)
 #endif
 
 /* debugging assertions */
-#ifndef CLGEN_NDEBUG
+#ifndef CIRRUSFB_NDEBUG
 #define assert(expr) \
         if(!(expr)) { \
         printk( "Assertion failed! %s,%s,%s,line=%d\n",\
@@ -136,24 +132,25 @@
 	BT_ALPINE,	/* GD543x/4x */
 	BT_GD5480,
 	BT_LAGUNA,	/* GD546x */
-} clgen_board_t;
+} cirrusfb_board_t;
 
 
 /*
  * per-board-type information, used for enumerating and abstracting
  * chip-specific information
- * NOTE: MUST be in the same order as clgen_board_t in order to
+ * NOTE: MUST be in the same order as cirrusfb_board_t in order to
  * use direct indexing on this array
  * NOTE: '__initdata' cannot be used as some of this info
  * is required at runtime.  Maybe separate into an init-only and
  * a run-time table?
  */
-static const struct clgen_board_info_rec {
-	clgen_board_t btype;	/* chipset enum, not strictly necessary, as
-				 * clgen_board_info[] is directly indexed
+static const struct cirrusfb_board_info_rec {
+	cirrusfb_board_t btype;	/* chipset enum, not strictly necessary, as
+				 * cirrusfb_board_info[] is directly indexed
 				 * by this value */
 	char *name;		/* ASCII name of chipset */
-	long maxclock;		/* maximum video clock */
+	long maxclock[5];		/* maximum video clock */
+	/* for  1/4bpp, 8bpp 15/16bpp, 24bpp, 32bpp - numbers from xorg code */
 	unsigned init_sr07 : 1;	/* init SR07 during init_vgachip() */
 	unsigned init_sr1f : 1; /* write SR1F during init_vgachip() */
 	unsigned scrn_start_bit19 : 1; /* construct bit 19 of screen start address */
@@ -166,11 +163,12 @@
 	unsigned char sr07_8bpp_mux;
 
 	unsigned char sr1f;	/* SR1F VGA initial register value */
-} clgen_board_info[] = {
+} cirrusfb_board_info[] = {
 	{ BT_NONE, }, /* dummy record */
 	{ BT_SD64,
 		"CL SD64",
-		140000,		/* the SD64/P4 have a higher max. videoclock */
+		{ 140000, 140000, 140000, 140000, 140000, },	/* guess */
+		/* the SD64/P4 have a higher max. videoclock */
 		TRUE,
 		TRUE,
 		TRUE,
@@ -182,7 +180,7 @@
 		0x20 },
 	{ BT_PICCOLO,
 		"CL Piccolo",
-		90000,
+		{ 90000, 90000, 90000, 90000, 90000 },	/* guess */
 		TRUE,
 		TRUE,
 		FALSE,
@@ -194,7 +192,7 @@
 		0x22 },
 	{ BT_PICASSO,
 		"CL Picasso",
-		90000,
+		{ 90000, 90000, 90000, 90000, 90000, },	/* guess */
 		TRUE,
 		TRUE,
 		FALSE,
@@ -206,7 +204,7 @@
 		0x22 },
 	{ BT_SPECTRUM,
 		"CL Spectrum",
-		90000,
+		{ 90000, 90000, 90000, 90000, 90000, },	/* guess */
 		TRUE,
 		TRUE,
 		FALSE,
@@ -218,7 +216,7 @@
 		0x22 },
 	{ BT_PICASSO4,
 		"CL Picasso4",
-		140000,		/* the SD64/P4 have a higher max. videoclock */
+		{ 135100, 135100, 85500, 85500, 0 },
 		TRUE,
 		FALSE,
 		TRUE,
@@ -230,7 +228,7 @@
 		0 },
 	{ BT_ALPINE,
 		"CL Alpine",
-		110000,		/* 135100 for some, 85500 for others */
+		{ 85500, 85500, 50000, 28500, 0}, /* for the GD5430.  GD5446 can do more... */
 		TRUE,
 		TRUE,
 		TRUE,
@@ -242,7 +240,7 @@
 		0x1C },
 	{ BT_GD5480,
 		"CL GD5480",
-		90000,
+		{ 135100, 200000, 200000, 135100, 135100 },
 		TRUE,
 		TRUE,
 		TRUE,
@@ -254,7 +252,7 @@
 		0x1C },
 	{ BT_LAGUNA,
 		"CL Laguna",
-		135100,
+		{ 135100, 135100, 135100, 135100, 135100, }, /* guess */
 		FALSE,
 		FALSE,
 		TRUE,
@@ -268,34 +266,34 @@
 
 
 #ifdef CONFIG_PCI
-/* the list of PCI devices for which we probe, and the
- * order in which we do it */
-static const struct {
-	clgen_board_t btype;
-	const char *nameOverride; /* XXX unused... for now */
-	unsigned short device;
-} clgen_pci_probe_list[] __initdata = {
-	{ BT_ALPINE, NULL, PCI_DEVICE_ID_CIRRUS_5436 },
-	{ BT_ALPINE, NULL, PCI_DEVICE_ID_CIRRUS_5434_8 },
-	{ BT_ALPINE, NULL, PCI_DEVICE_ID_CIRRUS_5434_4 },
-	{ BT_ALPINE, NULL, PCI_DEVICE_ID_CIRRUS_5430 }, /* GD-5440 has identical id */
-	{ BT_ALPINE, NULL, PCI_DEVICE_ID_CIRRUS_7543 },
-	{ BT_ALPINE, NULL, PCI_DEVICE_ID_CIRRUS_7548 },
-	{ BT_GD5480, NULL, PCI_DEVICE_ID_CIRRUS_5480 }, /* MacPicasso probably */
-	{ BT_PICASSO4, NULL, PCI_DEVICE_ID_CIRRUS_5446 }, /* Picasso 4 is a GD5446 */
-	{ BT_LAGUNA, "CL Laguna", PCI_DEVICE_ID_CIRRUS_5462 },
-	{ BT_LAGUNA, "CL Laguna 3D", PCI_DEVICE_ID_CIRRUS_5464 },
-	{ BT_LAGUNA, "CL Laguna 3DA", PCI_DEVICE_ID_CIRRUS_5465 },
+#define CHIP(id, btype) \
+	{ PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_##id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (btype) }
+
+static struct pci_device_id cirrusfb_pci_table[] = {
+	CHIP( CIRRUS_5436, 	BT_ALPINE ),
+	CHIP( CIRRUS_5434_8, 	BT_ALPINE ),
+	CHIP( CIRRUS_5434_4, 	BT_ALPINE ),
+	CHIP( CIRRUS_5430, 	BT_ALPINE ), /* GD-5440 has identical id */
+	CHIP( CIRRUS_7543, 	BT_ALPINE ),
+	CHIP( CIRRUS_7548, 	BT_ALPINE ),
+	CHIP( CIRRUS_5480,	BT_GD5480 ), /* MacPicasso probably */
+	CHIP( CIRRUS_5446,	BT_PICASSO4 ), /* Picasso 4 is a GD5446 */
+	CHIP( CIRRUS_5462,	BT_LAGUNA ), /* CL Laguna */
+	CHIP( CIRRUS_5464,	BT_LAGUNA ), /* CL Laguna 3D */
+	CHIP( CIRRUS_5465,	BT_LAGUNA ), /* CL Laguna 3DA*/
+	{ 0, }
 };
+MODULE_DEVICE_TABLE(pci, cirrusfb_pci_table);
+#undef CHIP
 #endif /* CONFIG_PCI */
 
 
 #ifdef CONFIG_ZORRO
 static const struct {
-	clgen_board_t btype;
+	cirrusfb_board_t btype;
 	zorro_id id, id2;
 	unsigned long size;
-} clgen_zorro_probe_list[] __initdata = {
+} cirrusfb_zorro_probe_list[] __initdata = {
 	{ BT_SD64,
 		ZORRO_PROD_HELFRICH_SD64_RAM,
 		ZORRO_PROD_HELFRICH_SD64_REG,
@@ -320,10 +318,7 @@
 #endif /* CONFIG_ZORRO */
 
 
-
-struct clgenfb_par {
-	struct fb_var_screeninfo var;
-
+struct cirrusfb_regs {
 	__u32 line_length;	/* in BYTES! */
 	__u32 visual;
 	__u32 type;
@@ -355,47 +350,36 @@
 
 
 
-#ifdef CLGEN_DEBUG
+#ifdef CIRRUSFB_DEBUG
 typedef enum {
         CRT,
         SEQ
-} clgen_dbg_reg_class_t;
-#endif                          /* CLGEN_DEBUG */
+} cirrusfb_dbg_reg_class_t;
+#endif                          /* CIRRUSFB_DEBUG */
 
 
 
 
 /* info about board */
-struct clgenfb_info {
-	struct fb_info_gen gen;
+struct cirrusfb_info {
+	struct fb_info *info;
 
 	caddr_t fbmem;
-	caddr_t regs;
+	caddr_t regbase;
 	caddr_t mem;
 	unsigned long size;
-	clgen_board_t btype;
-	int smallboard;
+	cirrusfb_board_t btype;
 	unsigned char SFR;	/* Shadow of special function register */
 
 	unsigned long fbmem_phys;
 	unsigned long fbregs_phys;
 
-	struct clgenfb_par currentmode;
+	struct cirrusfb_regs currentmode;
+	int blank_mode;
 
+	u32	pseudo_palette[17];
 	struct { u8 red, green, blue, pad; } palette[256];
 
-	union {
-#ifdef FBCON_HAS_CFB16
-		u16 cfb16[16];
-#endif
-#ifdef FBCON_HAS_CFB24
-		u32 cfb24[16];
-#endif
-#ifdef FBCON_HAS_CFB32
-		u32 cfb32[16];
-#endif
-	} fbcon_cmap;
-
 #ifdef CONFIG_ZORRO
 	unsigned long board_addr,
 		      board_size;
@@ -407,17 +391,9 @@
 };
 
 
-
-
-static struct display disp;
-
-static struct clgenfb_info boards[MAX_NUM_BOARDS];	/* the boards */
-
-static unsigned clgen_def_mode = 1;
+static unsigned cirrusfb_def_mode = 1;
 static int noaccel = 0;
 
-
-
 /*
  *    Predefined Video Modes
  */
@@ -425,7 +401,7 @@
 static const struct {
 	const char *name;
 	struct fb_var_screeninfo var;
-} clgenfb_predefined[] __initdata =
+} cirrusfb_predefined[] =
 
 {
 	{"Autodetect",		/* autodetect mode */
@@ -473,171 +449,90 @@
 	}
 };
 
-#define NUM_TOTAL_MODES    ARRAY_SIZE(clgenfb_predefined)
-static struct fb_var_screeninfo clgenfb_default;
-
-/*
- *    Frame Buffer Name
- */
-
-static const char *clgenfb_name = "CLgen";
+#define NUM_TOTAL_MODES    ARRAY_SIZE(cirrusfb_predefined)
 
 /****************************************************************************/
 /**** BEGIN PROTOTYPES ******************************************************/
 
 
 /*--- Interface used by the world ------------------------------------------*/
-int clgenfb_init (void);
-int clgenfb_setup (char *options);
+int cirrusfb_init (void);
+int cirrusfb_setup (char *options);
 
-static int clgenfb_open (struct fb_info *info, int user);
-static int clgenfb_release (struct fb_info *info, int user);
-
-static int clgenfb_setcolreg (unsigned regno, unsigned red, unsigned green,
-			      unsigned blue, unsigned transp,
-			      struct fb_info *info);
+int cirrusfb_open (struct fb_info *info, int user);
+int cirrusfb_release (struct fb_info *info, int user);
+int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
+			unsigned blue, unsigned transp,
+			struct fb_info *info);
+int cirrusfb_check_var (struct fb_var_screeninfo *var,
+			struct fb_info *info);
+int cirrusfb_set_par (struct fb_info *info);
+int cirrusfb_pan_display (struct fb_var_screeninfo *var,
+			  struct fb_info *info);
+int cirrusfb_blank (int blank_mode, struct fb_info *info);
+void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region);
+void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
+void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image);
 
 /* function table of the above functions */
-static struct fb_ops clgenfb_ops = {
-	.owner =	THIS_MODULE,
-	.fb_open =	clgenfb_open,
-	.fb_release =	clgenfb_release,
-	.fb_get_fix =	fbgen_get_fix,
-	.fb_get_var =	fbgen_get_var,
-	.fb_set_var =	fbgen_set_var,
-	.fb_get_cmap =	fbgen_get_cmap,
-	.fb_set_cmap =	gen_set_cmap,
-	.fb_setcolreg =	clgenfb_setcolreg,
-	.fb_pan_display =fbgen_pan_display,
-	.fb_blank =	fbgen_blank,
+static struct fb_ops cirrusfb_ops = {
+	.owner		= THIS_MODULE,
+	.fb_open	= cirrusfb_open,
+	.fb_release 	= cirrusfb_release,
+	.fb_setcolreg	= cirrusfb_setcolreg,
+	.fb_check_var	= cirrusfb_check_var,
+	.fb_set_par	= cirrusfb_set_par,
+	.fb_pan_display = cirrusfb_pan_display,
+	.fb_blank	= cirrusfb_blank,
+	.fb_fillrect	= cirrusfb_fillrect,
+	.fb_copyarea	= cirrusfb_copyarea,
+	.fb_imageblit	= cirrusfb_imageblit,
+	.fb_cursor	= soft_cursor,
 };
 
 /*--- Hardware Specific Routines -------------------------------------------*/
-static void clgen_detect (void);
-static int clgen_encode_fix (struct fb_fix_screeninfo *fix, const void *par,
-			     struct fb_info_gen *info);
-static int clgen_decode_var (const struct fb_var_screeninfo *var, void *par,
-			     struct fb_info_gen *info);
-static int clgen_encode_var (struct fb_var_screeninfo *var, const void *par,
-			     struct fb_info_gen *info);
-static void clgen_get_par (void *par, struct fb_info_gen *info);
-static void clgen_set_par (const void *par, struct fb_info_gen *info);
-static int clgen_getcolreg (unsigned regno, unsigned *red, unsigned *green,
-			    unsigned *blue, unsigned *transp,
-			    struct fb_info *info);
-static int clgen_pan_display (const struct fb_var_screeninfo *var,
-			      struct fb_info_gen *info);
-static int clgen_blank (int blank_mode, struct fb_info_gen *info);
-
-static void clgen_set_disp (const void *par, struct display *disp,
-			    struct fb_info_gen *info);
-
-/* function table of the above functions */
-static struct fbgen_hwswitch clgen_hwswitch =
-{
-	clgen_detect,
-	clgen_encode_fix,
-	clgen_decode_var,
-	clgen_encode_var,
-	clgen_get_par,
-	clgen_set_par,
-	clgen_getcolreg,
-	clgen_pan_display,
-	clgen_blank,
-	clgen_set_disp
-};
-
-/* Text console acceleration */
-
-#ifdef FBCON_HAS_CFB8
-static void fbcon_clgen8_bmove (struct display *p, int sy, int sx,
-				int dy, int dx, int height, int width);
-static void fbcon_clgen8_clear (struct vc_data *conp, struct display *p,
-				int sy, int sx, int height, int width);
-
-static struct display_switch fbcon_clgen_8 = {
-	.setup =	fbcon_cfb8_setup,
-	.bmove =	fbcon_clgen8_bmove,
-	.clear =	fbcon_clgen8_clear,
-	.putc =		fbcon_cfb8_putc,
-	.putcs =	fbcon_cfb8_putcs,
-	.revc =		fbcon_cfb8_revc,
-	.clear_margins =fbcon_cfb8_clear_margins,
-	.fontwidthmask =FONTWIDTH (4) | FONTWIDTH (8) | FONTWIDTH (12) | FONTWIDTH (16)
-};
-#endif
-#ifdef FBCON_HAS_CFB16
-static void fbcon_clgen16_bmove (struct display *p, int sy, int sx,
-				 int dy, int dx, int height, int width);
-static void fbcon_clgen16_clear (struct vc_data *conp, struct display *p,
-				 int sy, int sx, int height, int width);
-static struct display_switch fbcon_clgen_16 = {
-	.setup =	fbcon_cfb16_setup,
-	.bmove =	fbcon_clgen16_bmove,
-	.clear =	fbcon_clgen16_clear,
-	.putc =		fbcon_cfb16_putc,
-	.putcs =	fbcon_cfb16_putcs,
-	.revc =		fbcon_cfb16_revc,
-	.clear_margins =fbcon_cfb16_clear_margins,
-	.fontwidthmask =FONTWIDTH (4) | FONTWIDTH (8) | FONTWIDTH (12) | FONTWIDTH (16)
-};
-#endif
-#ifdef FBCON_HAS_CFB32
-static void fbcon_clgen32_bmove (struct display *p, int sy, int sx,
-				 int dy, int dx, int height, int width);
-static void fbcon_clgen32_clear (struct vc_data *conp, struct display *p,
-				 int sy, int sx, int height, int width);
-static struct display_switch fbcon_clgen_32 = {
-	.setup =	fbcon_cfb32_setup,
-	.bmove =	fbcon_clgen32_bmove,
-	.clear =	fbcon_clgen32_clear,
-	.putc =		fbcon_cfb32_putc,
-	.putcs =	fbcon_cfb32_putcs,
-	.revc =		fbcon_cfb32_revc,
-	.clear_margins =fbcon_cfb32_clear_margins,
-	.fontwidthmask =FONTWIDTH (4) | FONTWIDTH (8) | FONTWIDTH (12) | FONTWIDTH (16)
-};
-#endif
-
-
-
+static int cirrusfb_decode_var (const struct fb_var_screeninfo *var,
+				struct cirrusfb_regs *regs,
+				const struct fb_info *info);
 /*--- Internal routines ----------------------------------------------------*/
-static void init_vgachip (struct clgenfb_info *fb_info);
-static void switch_monitor (struct clgenfb_info *fb_info, int on);
-static void WGen (const struct clgenfb_info *fb_info,
+static void init_vgachip (struct cirrusfb_info *cinfo);
+static void switch_monitor (struct cirrusfb_info *cinfo, int on);
+static void WGen (const struct cirrusfb_info *cinfo,
 		  int regnum, unsigned char val);
-static unsigned char RGen (const struct clgenfb_info *fb_info, int regnum);
-static void AttrOn (const struct clgenfb_info *fb_info);
-static void WHDR (const struct clgenfb_info *fb_info, unsigned char val);
-static void WSFR (struct clgenfb_info *fb_info, unsigned char val);
-static void WSFR2 (struct clgenfb_info *fb_info, unsigned char val);
-static void WClut (struct clgenfb_info *fb_info, unsigned char regnum, unsigned char red,
+static unsigned char RGen (const struct cirrusfb_info *cinfo, int regnum);
+static void AttrOn (const struct cirrusfb_info *cinfo);
+static void WHDR (const struct cirrusfb_info *cinfo, unsigned char val);
+static void WSFR (struct cirrusfb_info *cinfo, unsigned char val);
+static void WSFR2 (struct cirrusfb_info *cinfo, unsigned char val);
+static void WClut (struct cirrusfb_info *cinfo, unsigned char regnum, unsigned char red,
 		   unsigned char green,
 		   unsigned char blue);
 #if 0
-static void RClut (struct clgenfb_info *fb_info, unsigned char regnum, unsigned char *red,
+static void RClut (struct cirrusfb_info *cinfo, unsigned char regnum, unsigned char *red,
 		   unsigned char *green,
 		   unsigned char *blue);
 #endif
-static void clgen_WaitBLT (caddr_t regbase);
-static void clgen_BitBLT (caddr_t regbase, u_short curx, u_short cury,
-			  u_short destx, u_short desty,
-			  u_short width, u_short height,
-			  u_short line_length);
-static void clgen_RectFill (struct clgenfb_info *fb_info, u_short x, u_short y,
-			    u_short width, u_short height,
-			    u_char color, u_short line_length);
+static void cirrusfb_WaitBLT (caddr_t regbase);
+static void cirrusfb_BitBLT (caddr_t regbase, int bits_per_pixel,
+			     u_short curx, u_short cury,
+			     u_short destx, u_short desty,
+			     u_short width, u_short height,
+			     u_short line_length);
+static void cirrusfb_RectFill (caddr_t regbase, int bits_per_pixel,
+			       u_short x, u_short y,
+			       u_short width, u_short height,
+			       u_char color, u_short line_length);
 
 static void bestclock (long freq, long *best,
 		       long *nom, long *den,
 		       long *div, long maxfreq);
 
-#ifdef CLGEN_DEBUG
-static void clgen_dump (void);
-static void clgen_dbg_reg_dump (caddr_t regbase);
-static void clgen_dbg_print_regs (caddr_t regbase, clgen_dbg_reg_class_t reg_class,...);
-static void clgen_dbg_print_byte (const char *name, unsigned char val);
-#endif /* CLGEN_DEBUG */
+#ifdef CIRRUSFB_DEBUG
+static void cirrusfb_dump (void);
+static void cirrusfb_dbg_reg_dump (caddr_t regbase);
+static void cirrusfb_dbg_print_regs (caddr_t regbase, cirrusfb_dbg_reg_class_t reg_class,...);
+static void cirrusfb_dbg_print_byte (const char *name, unsigned char val);
+#endif /* CIRRUSFB_DEBUG */
 
 /*** END   PROTOTYPES ********************************************************/
 /*****************************************************************************/
@@ -646,18 +541,18 @@
 static int opencount = 0;
 
 /*--- Open /dev/fbx ---------------------------------------------------------*/
-static int clgenfb_open (struct fb_info *info, int user)
+int cirrusfb_open (struct fb_info *info, int user)
 {
 	if (opencount++ == 0)
-		switch_monitor ((struct clgenfb_info *) info, 1);
+		switch_monitor (info->par, 1);
 	return 0;
 }
 
 /*--- Close /dev/fbx --------------------------------------------------------*/
-static int clgenfb_release (struct fb_info *info, int user)
+int cirrusfb_release (struct fb_info *info, int user)
 {
 	if (--opencount == 0)
-		switch_monitor ((struct clgenfb_info *) info, 0);
+		switch_monitor (info->par, 0);
 	return 0;
 }
 
@@ -665,67 +560,8 @@
 /****************************************************************************/
 /**** BEGIN Hardware specific Routines **************************************/
 
-static void clgen_detect (void)
-{
-	DPRINTK ("ENTER\n");
-	DPRINTK ("EXIT\n");
-}
-
-static int clgen_encode_fix (struct fb_fix_screeninfo *fix, const void *par,
-			     struct fb_info_gen *info)
-{
-	struct clgenfb_par *_par = (struct clgenfb_par *) par;
-	struct clgenfb_info *_info = (struct clgenfb_info *) info;
-
-	DPRINTK ("ENTER\n");
-
-	memset (fix, 0, sizeof (struct fb_fix_screeninfo));
-	strcpy (fix->id, clgenfb_name);
-
-	if (_info->btype == BT_GD5480) {
-		/* Select proper byte-swapping aperture */
-		switch (_par->var.bits_per_pixel) {
-		case 1:
-		case 8:
-			fix->smem_start = _info->fbmem_phys;
-			break;
-		case 16:
-			fix->smem_start = _info->fbmem_phys + 1 * MB_;
-			break;
-		case 24:
-		case 32:
-			fix->smem_start = _info->fbmem_phys + 2 * MB_;
-			break;
-		}
-	} else {
-		fix->smem_start = _info->fbmem_phys;
-	}
-
-	/* monochrome: only 1 memory plane */
-	/* 8 bit and above: Use whole memory area */
-	fix->smem_len = _par->var.bits_per_pixel == 1 ? _info->size / 4
-	    : _info->size;
-	fix->type = _par->type;
-	fix->type_aux = 0;
-	fix->visual = _par->visual;
-	fix->xpanstep = 1;
-	fix->ypanstep = 1;
-	fix->ywrapstep = 0;
-	fix->line_length = _par->line_length;
-
-	/* FIXME: map region at 0xB8000 if available, fill in here */
-	fix->mmio_start = 0;
-	fix->mmio_len = 0;
-	fix->accel = FB_ACCEL_NONE;
-
-	DPRINTK ("EXIT\n");
-	return 0;
-}
-
-
-
 /* Get a good MCLK value */
-static long clgen_get_mclk (long freq, int bpp, long *div)
+static long cirrusfb_get_mclk (long freq, int bpp, long *div)
 {
 	long mclk;
 
@@ -765,227 +601,253 @@
 	return mclk;
 }
 
-static int clgen_decode_var (const struct fb_var_screeninfo *var, void *par,
-			     struct fb_info_gen *info)
+int cirrusfb_check_var(struct fb_var_screeninfo *var,
+		       struct fb_info *info)
 {
-	long freq;
-	long maxclock;
-	int xres, hfront, hsync, hback;
-	int yres, vfront, vsync, vback;
+	struct cirrusfb_info *cinfo = info->par;
 	int nom, den;		/* translyting from pixels->bytes */
-	int i;
-	static struct {
-		int xres, yres;
-	} modes[] = { {
-			1600, 1280
-	}, {
-		1280, 1024
-	}, {
-		1024, 768
-	},
-	{
-		800, 600
-	}, {
-		640, 480
-	}, {
-		-1, -1
-	}
-	};
-
-	struct clgenfb_par *_par = (struct clgenfb_par *) par;
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) info;
-
-	assert (var != NULL);
-	assert (par != NULL);
-	assert (info != NULL);
-
-	DPRINTK ("ENTER\n");
-
-	DPRINTK ("Requested: %dx%dx%d\n", var->xres, var->yres, var->bits_per_pixel);
-	DPRINTK ("  virtual: %dx%d\n", var->xres_virtual, var->yres_virtual);
-	DPRINTK ("   offset: (%d,%d)\n", var->xoffset, var->yoffset);
-	DPRINTK ("grayscale: %d\n", var->grayscale);
-
-	memset (par, 0, sizeof (struct clgenfb_par));
-
-	_par->var = *var;
+	int yres, i;
+	static struct { int xres, yres; } modes[] =
+	{ { 1600, 1280 },
+	  { 1280, 1024 },
+	  { 1024, 768 },
+	  { 800, 600 },
+	  { 640, 480 },
+	  { -1, -1 } };
 
 	switch (var->bits_per_pixel) {
-	case 1:
+	case 0 ... 1:
+		var->bits_per_pixel = 1;
 		nom = 4;
 		den = 8;
 		break;		/* 8 pixel per byte, only 1/4th of mem usable */
 	case 2 ... 8:
-		_par->var.bits_per_pixel = 8;
+		var->bits_per_pixel = 8;
 		nom = 1;
 		den = 1;
 		break;		/* 1 pixel == 1 byte */
 	case 9 ... 16:
-		_par->var.bits_per_pixel = 16;
+		var->bits_per_pixel = 16;
 		nom = 2;
 		den = 1;
 		break;		/* 2 bytes per pixel */
 	case 17 ... 24:
-		_par->var.bits_per_pixel = 24;
+		var->bits_per_pixel = 24;
 		nom = 3;
 		den = 1;
 		break;		/* 3 bytes per pixel */
 	case 25 ... 32:
-		_par->var.bits_per_pixel = 32;
+		var->bits_per_pixel = 32;
 		nom = 4;
 		den = 1;
 		break;		/* 4 bytes per pixel */
 	default:
-		printk ("clgen: mode %dx%dx%d rejected...color depth not supported.\n",
+		printk ("cirrusfb: mode %dx%dx%d rejected...color depth not supported.\n",
 			var->xres, var->yres, var->bits_per_pixel);
 		DPRINTK ("EXIT - EINVAL error\n");
 		return -EINVAL;
 	}
 
-	if (_par->var.xres * nom / den * _par->var.yres > fb_info->size) {
-		printk ("clgen: mode %dx%dx%d rejected...resolution too high to fit into video memory!\n",
+	if (var->xres * nom / den * var->yres > cinfo->size) {
+		printk ("cirrusfb: mode %dx%dx%d rejected...resolution too high to fit into video memory!\n",
 			var->xres, var->yres, var->bits_per_pixel);
 		DPRINTK ("EXIT - EINVAL error\n");
 		return -EINVAL;
 	}
+
 	/* use highest possible virtual resolution */
-	if (_par->var.xres_virtual == -1 &&
-	    _par->var.yres_virtual == -1) {
-		printk ("clgen: using maximum available virtual resolution\n");
+	if (var->xres_virtual == -1 &&
+	    var->yres_virtual == -1) {
+		printk ("cirrusfb: using maximum available virtual resolution\n");
 		for (i = 0; modes[i].xres != -1; i++) {
-			if (modes[i].xres * nom / den * modes[i].yres < fb_info->size / 2)
+			if (modes[i].xres * nom / den * modes[i].yres < cinfo->size / 2)
 				break;
 		}
 		if (modes[i].xres == -1) {
-			printk ("clgen: could not find a virtual resolution that fits into video memory!!\n");
+			printk ("cirrusfb: could not find a virtual resolution that fits into video memory!!\n");
 			DPRINTK ("EXIT - EINVAL error\n");
 			return -EINVAL;
 		}
-		_par->var.xres_virtual = modes[i].xres;
-		_par->var.yres_virtual = modes[i].yres;
+		var->xres_virtual = modes[i].xres;
+		var->yres_virtual = modes[i].yres;
+
+		printk ("cirrusfb: virtual resolution set to maximum of %dx%d\n",
+			var->xres_virtual, var->yres_virtual);
+	}
 
-		printk ("clgen: virtual resolution set to maximum of %dx%d\n",
-			_par->var.xres_virtual, _par->var.yres_virtual);
-	} else if (_par->var.xres_virtual == -1) {
-		/* FIXME: maximize X virtual resolution only */
-	} else if (_par->var.yres_virtual == -1) {
-		/* FIXME: maximize Y virtual resolution only */
-	}
-	if (_par->var.xoffset < 0)
-		_par->var.xoffset = 0;
-	if (_par->var.yoffset < 0)
-		_par->var.yoffset = 0;
+	if (var->xres_virtual < var->xres)
+		var->xres_virtual = var->xres;
+	if (var->yres_virtual < var->yres)
+		var->yres_virtual = var->yres;
+
+	if (var->xoffset < 0)
+		var->xoffset = 0;
+	if (var->yoffset < 0)
+		var->yoffset = 0;
 
 	/* truncate xoffset and yoffset to maximum if too high */
-	if (_par->var.xoffset > _par->var.xres_virtual - _par->var.xres)
-		_par->var.xoffset = _par->var.xres_virtual - _par->var.xres - 1;
-
-	if (_par->var.yoffset > _par->var.yres_virtual - _par->var.yres)
-		_par->var.yoffset = _par->var.yres_virtual - _par->var.yres - 1;
+	if (var->xoffset > var->xres_virtual - var->xres)
+		var->xoffset = var->xres_virtual - var->xres - 1;
+	if (var->yoffset > var->yres_virtual - var->yres)
+		var->yoffset = var->yres_virtual - var->yres - 1;
 
-	switch (_par->var.bits_per_pixel) {
+	switch (var->bits_per_pixel) {
 	case 1:
-		_par->line_length = _par->var.xres_virtual / 8;
-		_par->visual = FB_VISUAL_MONO10;
 		break;
 
 	case 8:
-		_par->line_length = _par->var.xres_virtual;
-		_par->visual = FB_VISUAL_PSEUDOCOLOR;
-		_par->var.red.offset = 0;
-		_par->var.red.length = 6;
-		_par->var.green.offset = 0;
-		_par->var.green.length = 6;
-		_par->var.blue.offset = 0;
-		_par->var.blue.length = 6;
+		var->red.offset = 0;
+		var->red.length = 6;
+		var->green.offset = 0;
+		var->green.length = 6;
+		var->blue.offset = 0;
+		var->blue.length = 6;
 		break;
 
 	case 16:
-		_par->line_length = _par->var.xres_virtual * 2;
-		_par->visual = FB_VISUAL_DIRECTCOLOR;
 		if(isPReP) {
-			_par->var.red.offset = 2;
-			_par->var.green.offset = -3;
-			_par->var.blue.offset = 8;
+			var->red.offset = 2;
+			var->green.offset = -3;
+			var->blue.offset = 8;
 		} else {
-			_par->var.red.offset = 10;
-			_par->var.green.offset = 5;
-			_par->var.blue.offset = 0;
-		}
-		_par->var.red.length = 5;
-		_par->var.green.length = 5;
-		_par->var.blue.length = 5;
+			var->red.offset = 10;
+			var->green.offset = 5;
+			var->blue.offset = 0;
+		}
+		var->red.length = 5;
+		var->green.length = 5;
+		var->blue.length = 5;
 		break;
 
 	case 24:
-		_par->line_length = _par->var.xres_virtual * 3;
-		_par->visual = FB_VISUAL_DIRECTCOLOR;
 		if(isPReP) {
-			_par->var.red.offset = 8;
-			_par->var.green.offset = 16;
-			_par->var.blue.offset = 24;
+			var->red.offset = 8;
+			var->green.offset = 16;
+			var->blue.offset = 24;
 		} else {
-			_par->var.red.offset = 16;
-			_par->var.green.offset = 8;
-			_par->var.blue.offset = 0;
-		}
-		_par->var.red.length = 8;
-		_par->var.green.length = 8;
-		_par->var.blue.length = 8;
+			var->red.offset = 16;
+			var->green.offset = 8;
+			var->blue.offset = 0;
+		}
+		var->red.length = 8;
+		var->green.length = 8;
+		var->blue.length = 8;
 		break;
 
 	case 32:
-		_par->line_length = _par->var.xres_virtual * 4;
-		_par->visual = FB_VISUAL_DIRECTCOLOR;
 		if(isPReP) {
-			_par->var.red.offset = 8;
-			_par->var.green.offset = 16;
-			_par->var.blue.offset = 24;
+			var->red.offset = 8;
+			var->green.offset = 16;
+			var->blue.offset = 24;
 		} else {
-			_par->var.red.offset = 16;
-			_par->var.green.offset = 8;
-			_par->var.blue.offset = 0;
-		}
-		_par->var.red.length = 8;
-		_par->var.green.length = 8;
-		_par->var.blue.length = 8;
+			var->red.offset = 16;
+			var->green.offset = 8;
+			var->blue.offset = 0;
+		}
+		var->red.length = 8;
+		var->green.length = 8;
+		var->blue.length = 8;
 		break;
 
 	default:
-		DPRINTK("Unsupported bpp size: %d\n", _par->var.bits_per_pixel);
+		DPRINTK("Unsupported bpp size: %d\n", var->bits_per_pixel);
 		assert (FALSE);
 		/* should never occur */
 		break;
 	}
 
-	_par->var.red.msb_right =
-	    _par->var.green.msb_right =
-	    _par->var.blue.msb_right =
-	    _par->var.transp.offset =
-	    _par->var.transp.length =
-	    _par->var.transp.msb_right = 0;
+	var->red.msb_right =
+	    var->green.msb_right =
+	    var->blue.msb_right =
+	    var->transp.offset =
+	    var->transp.length =
+	    var->transp.msb_right = 0;
+
+	yres = var->yres;
+	if (var->vmode & FB_VMODE_DOUBLE)
+		yres *= 2;
+	else if (var->vmode & FB_VMODE_INTERLACED)
+		yres = (yres + 1) / 2;
+
+	if (yres >= 1280) {
+		printk (KERN_WARNING "cirrusfb: ERROR: VerticalTotal >= 1280; special treatment required! (TODO)\n");
+		DPRINTK ("EXIT - EINVAL error\n");
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static int cirrusfb_decode_var (const struct fb_var_screeninfo *var,
+				struct cirrusfb_regs *regs,
+				const struct fb_info *info)
+{
+	long freq;
+	long maxclock;
+	int maxclockidx = 0;
+	struct cirrusfb_info *cinfo = info->par;
+	int xres, hfront, hsync, hback;
+	int yres, vfront, vsync, vback;
+
+	switch(var->bits_per_pixel) {
+	case 1:
+		regs->line_length = var->xres_virtual / 8;
+		regs->visual = FB_VISUAL_MONO10;
+		maxclockidx = 0;
+		break;
+
+	case 8:
+		regs->line_length = var->xres_virtual;
+		regs->visual = FB_VISUAL_PSEUDOCOLOR;
+		maxclockidx = 1;
+		break;
+
+	case 16:
+		regs->line_length = var->xres_virtual * 2;
+		regs->visual = FB_VISUAL_DIRECTCOLOR;
+		maxclockidx = 2;
+		break;
+
+	case 24:
+		regs->line_length = var->xres_virtual * 3;
+		regs->visual = FB_VISUAL_DIRECTCOLOR;
+		maxclockidx = 3;
+		break;
+
+	case 32:
+		regs->line_length = var->xres_virtual * 4;
+		regs->visual = FB_VISUAL_DIRECTCOLOR;
+		maxclockidx = 4;
+		break;
+
+	default:
+		DPRINTK("Unsupported bpp size: %d\n", var->bits_per_pixel);
+		assert (FALSE);
+		/* should never occur */
+		break;
+	}
 
-	_par->type = FB_TYPE_PACKED_PIXELS;
+	regs->type = FB_TYPE_PACKED_PIXELS;
 
 	/* convert from ps to kHz */
 	freq = 1000000000 / var->pixclock;
 
 	DPRINTK ("desired pixclock: %ld kHz\n", freq);
 
-	maxclock = clgen_board_info[fb_info->btype].maxclock;
-	_par->multiplexing = 0;
+	maxclock = cirrusfb_board_info[cinfo->btype].maxclock[maxclockidx];
+	regs->multiplexing = 0;
 
 	/* If the frequency is greater than we can support, we might be able
 	 * to use multiplexing for the video mode */
 	if (freq > maxclock) {
-		switch (fb_info->btype) {
+		switch (cinfo->btype) {
 		case BT_ALPINE:
 		case BT_GD5480:
-			_par->multiplexing = 1;
+			regs->multiplexing = 1;
 			break;
 
 		default:
-			printk (KERN_WARNING "clgen: ERROR: Frequency greater than maxclock (%ld kHz)\n", maxclock);
+			printk (KERN_WARNING "cirrusfb: ERROR: Frequency greater than maxclock (%ld kHz)\n", maxclock);
 			DPRINTK ("EXIT - return -EINVAL\n");
 			return -EINVAL;
 		}
@@ -996,274 +858,256 @@
 	switch (var->bits_per_pixel) {
 	case 16:
 	case 32:
-		if (_par->HorizRes <= 800)
+		if (regs->HorizRes <= 800)
 			freq /= 2;	/* Xbh has this type of clock for 32-bit */
 		break;
 	}
 #endif
 
-	bestclock (freq, &_par->freq, &_par->nom, &_par->den, &_par->div,
+	bestclock (freq, &regs->freq, &regs->nom, &regs->den, &regs->div,
 		   maxclock);
-	_par->mclk = clgen_get_mclk (freq, _par->var.bits_per_pixel, &_par->divMCLK);
+	regs->mclk = cirrusfb_get_mclk (freq, var->bits_per_pixel, &regs->divMCLK);
 
-	xres = _par->var.xres;
-	hfront = _par->var.right_margin;
-	hsync = _par->var.hsync_len;
-	hback = _par->var.left_margin;
-
-	yres = _par->var.yres;
-	vfront = _par->var.lower_margin;
-	vsync = _par->var.vsync_len;
-	vback = _par->var.upper_margin;
+	xres = var->xres;
+	hfront = var->right_margin;
+	hsync = var->hsync_len;
+	hback = var->left_margin;
+
+	yres = var->yres;
+	vfront = var->lower_margin;
+	vsync = var->vsync_len;
+	vback = var->upper_margin;
 
-	if (_par->var.vmode & FB_VMODE_DOUBLE) {
+	if (var->vmode & FB_VMODE_DOUBLE) {
 		yres *= 2;
 		vfront *= 2;
 		vsync *= 2;
 		vback *= 2;
-	} else if (_par->var.vmode & FB_VMODE_INTERLACED) {
+	} else if (var->vmode & FB_VMODE_INTERLACED) {
 		yres = (yres + 1) / 2;
 		vfront = (vfront + 1) / 2;
 		vsync = (vsync + 1) / 2;
 		vback = (vback + 1) / 2;
 	}
-	_par->HorizRes = xres;
-	_par->HorizTotal = (xres + hfront + hsync + hback) / 8 - 5;
-	_par->HorizDispEnd = xres / 8 - 1;
-	_par->HorizBlankStart = xres / 8;
-	_par->HorizBlankEnd = _par->HorizTotal + 5;	/* does not count with "-5" */
-	_par->HorizSyncStart = (xres + hfront) / 8 + 1;
-	_par->HorizSyncEnd = (xres + hfront + hsync) / 8 + 1;
-
-	_par->VertRes = yres;
-	_par->VertTotal = yres + vfront + vsync + vback - 2;
-	_par->VertDispEnd = yres - 1;
-	_par->VertBlankStart = yres;
-	_par->VertBlankEnd = _par->VertTotal;
-	_par->VertSyncStart = yres + vfront - 1;
-	_par->VertSyncEnd = yres + vfront + vsync - 1;
-
-	if (_par->VertRes >= 1024) {
-		_par->VertTotal /= 2;
-		_par->VertSyncStart /= 2;
-		_par->VertSyncEnd /= 2;
-		_par->VertDispEnd /= 2;
-	}
-	if (_par->multiplexing) {
-		_par->HorizTotal /= 2;
-		_par->HorizSyncStart /= 2;
-		_par->HorizSyncEnd /= 2;
-		_par->HorizDispEnd /= 2;
-	}
-	if (_par->VertRes >= 1280) {
-		printk (KERN_WARNING "clgen: ERROR: VerticalTotal >= 1280; special treatment required! (TODO)\n");
-		DPRINTK ("EXIT - EINVAL error\n");
-		return -EINVAL;
+	regs->HorizRes = xres;
+	regs->HorizTotal = (xres + hfront + hsync + hback) / 8 - 5;
+	regs->HorizDispEnd = xres / 8 - 1;
+	regs->HorizBlankStart = xres / 8;
+	regs->HorizBlankEnd = regs->HorizTotal + 5;	/* does not count with "-5" */
+	regs->HorizSyncStart = (xres + hfront) / 8 + 1;
+	regs->HorizSyncEnd = (xres + hfront + hsync) / 8 + 1;
+
+	regs->VertRes = yres;
+	regs->VertTotal = yres + vfront + vsync + vback - 2;
+	regs->VertDispEnd = yres - 1;
+	regs->VertBlankStart = yres;
+	regs->VertBlankEnd = regs->VertTotal;
+	regs->VertSyncStart = yres + vfront - 1;
+	regs->VertSyncEnd = yres + vfront + vsync - 1;
+
+	if (regs->VertRes >= 1024) {
+		regs->VertTotal /= 2;
+		regs->VertSyncStart /= 2;
+		regs->VertSyncEnd /= 2;
+		regs->VertDispEnd /= 2;
+	}
+	if (regs->multiplexing) {
+		regs->HorizTotal /= 2;
+		regs->HorizSyncStart /= 2;
+		regs->HorizSyncEnd /= 2;
+		regs->HorizDispEnd /= 2;
 	}
-	DPRINTK ("EXIT\n");
-	return 0;
-}
-
-
-static int clgen_encode_var (struct fb_var_screeninfo *var, const void *par,
-			     struct fb_info_gen *info)
-{
-	DPRINTK ("ENTER\n");
-
-	*var = ((struct clgenfb_par *) par)->var;
 
-	DPRINTK ("EXIT\n");
 	return 0;
 }
 
-/* get current video mode */
-static void clgen_get_par (void *par, struct fb_info_gen *info)
-{
-	struct clgenfb_par *_par = (struct clgenfb_par *) par;
-	struct clgenfb_info *_info = (struct clgenfb_info *) info;
-
-	DPRINTK ("ENTER\n");
-
-	*_par = _info->currentmode;
-
-	DPRINTK ("EXIT\n");
-}
 
-static void clgen_set_mclk (const struct clgenfb_info *fb_info, int val, int div)
+static void cirrusfb_set_mclk (const struct cirrusfb_info *cinfo, int val, int div)
 {
-	assert (fb_info != NULL);
+	assert (cinfo != NULL);
 
 	if (div == 2) {
 		/* VCLK = MCLK/2 */
-		unsigned char old = vga_rseq (fb_info->regs, CL_SEQR1E);
-		vga_wseq (fb_info->regs, CL_SEQR1E, old | 0x1);
-		vga_wseq (fb_info->regs, CL_SEQR1F, 0x40 | (val & 0x3f));
+		unsigned char old = vga_rseq (cinfo->regbase, CL_SEQR1E);
+		vga_wseq (cinfo->regbase, CL_SEQR1E, old | 0x1);
+		vga_wseq (cinfo->regbase, CL_SEQR1F, 0x40 | (val & 0x3f));
 	} else if (div == 1) {
 		/* VCLK = MCLK */
-		unsigned char old = vga_rseq (fb_info->regs, CL_SEQR1E);
-		vga_wseq (fb_info->regs, CL_SEQR1E, old & ~0x1);
-		vga_wseq (fb_info->regs, CL_SEQR1F, 0x40 | (val & 0x3f));
+		unsigned char old = vga_rseq (cinfo->regbase, CL_SEQR1E);
+		vga_wseq (cinfo->regbase, CL_SEQR1E, old & ~0x1);
+		vga_wseq (cinfo->regbase, CL_SEQR1F, 0x40 | (val & 0x3f));
 	} else {
-		vga_wseq (fb_info->regs, CL_SEQR1F, val & 0x3f);
+		vga_wseq (cinfo->regbase, CL_SEQR1F, val & 0x3f);
 	}
 }
 
 /*************************************************************************
-	clgen_set_par()
+	cirrusfb_set_par_foo()
 
 	actually writes the values for a new video mode into the hardware,
 **************************************************************************/
-static void clgen_set_par (const void *par, struct fb_info_gen *info)
+static int cirrusfb_set_par_foo (struct fb_info *info)
 {
+	struct cirrusfb_info *cinfo = info->par;
+	struct fb_var_screeninfo *var = &info->var;
+	struct cirrusfb_regs regs;
+	caddr_t regbase = cinfo->regbase;
 	unsigned char tmp;
-	int offset = 0;
-	struct clgenfb_par *_par = (struct clgenfb_par *) par;
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) info;
-	const struct clgen_board_info_rec *bi;
+	int offset = 0, err;
+	const struct cirrusfb_board_info_rec *bi;
 
 	DPRINTK ("ENTER\n");
 	DPRINTK ("Requested mode: %dx%dx%d\n",
-	       _par->var.xres, _par->var.yres, _par->var.bits_per_pixel);
-	DPRINTK ("pixclock: %d\n", _par->var.pixclock);
+	       var->xres, var->yres, var->bits_per_pixel);
+	DPRINTK ("pixclock: %d\n", var->pixclock);
+
+	init_vgachip (cinfo);
 
-	bi = &clgen_board_info[fb_info->btype];
+	err = cirrusfb_decode_var(var, &regs, info);
+	if(err) {
+		/* should never happen */
+		DPRINTK("mode change aborted.  invalid var.\n");
+		return -EINVAL;
+	}
+
+	bi = &cirrusfb_board_info[cinfo->btype];
 
 
 	/* unlock register VGA_CRTC_H_TOTAL..CRT7 */
-	vga_wcrt (fb_info->regs, VGA_CRTC_V_SYNC_END, 0x20);	/* previously: 0x00) */
+	vga_wcrt (regbase, VGA_CRTC_V_SYNC_END, 0x20);	/* previously: 0x00) */
 
 	/* if debugging is enabled, all parameters get output before writing */
-	DPRINTK ("CRT0: %ld\n", _par->HorizTotal);
-	vga_wcrt (fb_info->regs, VGA_CRTC_H_TOTAL, _par->HorizTotal);
+	DPRINTK ("CRT0: %ld\n", regs.HorizTotal);
+	vga_wcrt (regbase, VGA_CRTC_H_TOTAL, regs.HorizTotal);
 
-	DPRINTK ("CRT1: %ld\n", _par->HorizDispEnd);
-	vga_wcrt (fb_info->regs, VGA_CRTC_H_DISP, _par->HorizDispEnd);
+	DPRINTK ("CRT1: %ld\n", regs.HorizDispEnd);
+	vga_wcrt (regbase, VGA_CRTC_H_DISP, regs.HorizDispEnd);
 
-	DPRINTK ("CRT2: %ld\n", _par->HorizBlankStart);
-	vga_wcrt (fb_info->regs, VGA_CRTC_H_BLANK_START, _par->HorizBlankStart);
+	DPRINTK ("CRT2: %ld\n", regs.HorizBlankStart);
+	vga_wcrt (regbase, VGA_CRTC_H_BLANK_START, regs.HorizBlankStart);
 
-	DPRINTK ("CRT3: 128+%ld\n", _par->HorizBlankEnd % 32);	/*  + 128: Compatible read */
-	vga_wcrt (fb_info->regs, VGA_CRTC_H_BLANK_END, 128 + (_par->HorizBlankEnd % 32));
+	DPRINTK ("CRT3: 128+%ld\n", regs.HorizBlankEnd % 32);	/*  + 128: Compatible read */
+	vga_wcrt (regbase, VGA_CRTC_H_BLANK_END, 128 + (regs.HorizBlankEnd % 32));
 
-	DPRINTK ("CRT4: %ld\n", _par->HorizSyncStart);
-	vga_wcrt (fb_info->regs, VGA_CRTC_H_SYNC_START, _par->HorizSyncStart);
+	DPRINTK ("CRT4: %ld\n", regs.HorizSyncStart);
+	vga_wcrt (regbase, VGA_CRTC_H_SYNC_START, regs.HorizSyncStart);
 
-	tmp = _par->HorizSyncEnd % 32;
-	if (_par->HorizBlankEnd & 32)
+	tmp = regs.HorizSyncEnd % 32;
+	if (regs.HorizBlankEnd & 32)
 		tmp += 128;
 	DPRINTK ("CRT5: %d\n", tmp);
-	vga_wcrt (fb_info->regs, VGA_CRTC_H_SYNC_END, tmp);
+	vga_wcrt (regbase, VGA_CRTC_H_SYNC_END, tmp);
 
-	DPRINTK ("CRT6: %ld\n", _par->VertTotal & 0xff);
-	vga_wcrt (fb_info->regs, VGA_CRTC_V_TOTAL, (_par->VertTotal & 0xff));
+	DPRINTK ("CRT6: %ld\n", regs.VertTotal & 0xff);
+	vga_wcrt (regbase, VGA_CRTC_V_TOTAL, (regs.VertTotal & 0xff));
 
 	tmp = 16;		/* LineCompare bit #9 */
-	if (_par->VertTotal & 256)
+	if (regs.VertTotal & 256)
 		tmp |= 1;
-	if (_par->VertDispEnd & 256)
+	if (regs.VertDispEnd & 256)
 		tmp |= 2;
-	if (_par->VertSyncStart & 256)
+	if (regs.VertSyncStart & 256)
 		tmp |= 4;
-	if (_par->VertBlankStart & 256)
+	if (regs.VertBlankStart & 256)
 		tmp |= 8;
-	if (_par->VertTotal & 512)
+	if (regs.VertTotal & 512)
 		tmp |= 32;
-	if (_par->VertDispEnd & 512)
+	if (regs.VertDispEnd & 512)
 		tmp |= 64;
-	if (_par->VertSyncStart & 512)
+	if (regs.VertSyncStart & 512)
 		tmp |= 128;
 	DPRINTK ("CRT7: %d\n", tmp);
-	vga_wcrt (fb_info->regs, VGA_CRTC_OVERFLOW, tmp);
+	vga_wcrt (regbase, VGA_CRTC_OVERFLOW, tmp);
 
 	tmp = 0x40;		/* LineCompare bit #8 */
-	if (_par->VertBlankStart & 512)
+	if (regs.VertBlankStart & 512)
 		tmp |= 0x20;
-	if (_par->var.vmode & FB_VMODE_DOUBLE)
+	if (var->vmode & FB_VMODE_DOUBLE)
 		tmp |= 0x80;
 	DPRINTK ("CRT9: %d\n", tmp);
-	vga_wcrt (fb_info->regs, VGA_CRTC_MAX_SCAN, tmp);
+	vga_wcrt (regbase, VGA_CRTC_MAX_SCAN, tmp);
 
-	DPRINTK ("CRT10: %ld\n", _par->VertSyncStart & 0xff);
-	vga_wcrt (fb_info->regs, VGA_CRTC_V_SYNC_START, (_par->VertSyncStart & 0xff));
+	DPRINTK ("CRT10: %ld\n", regs.VertSyncStart & 0xff);
+	vga_wcrt (regbase, VGA_CRTC_V_SYNC_START, (regs.VertSyncStart & 0xff));
 
-	DPRINTK ("CRT11: 64+32+%ld\n", _par->VertSyncEnd % 16);
-	vga_wcrt (fb_info->regs, VGA_CRTC_V_SYNC_END, (_par->VertSyncEnd % 16 + 64 + 32));
+	DPRINTK ("CRT11: 64+32+%ld\n", regs.VertSyncEnd % 16);
+	vga_wcrt (regbase, VGA_CRTC_V_SYNC_END, (regs.VertSyncEnd % 16 + 64 + 32));
 
-	DPRINTK ("CRT12: %ld\n", _par->VertDispEnd & 0xff);
-	vga_wcrt (fb_info->regs, VGA_CRTC_V_DISP_END, (_par->VertDispEnd & 0xff));
+	DPRINTK ("CRT12: %ld\n", regs.VertDispEnd & 0xff);
+	vga_wcrt (regbase, VGA_CRTC_V_DISP_END, (regs.VertDispEnd & 0xff));
 
-	DPRINTK ("CRT15: %ld\n", _par->VertBlankStart & 0xff);
-	vga_wcrt (fb_info->regs, VGA_CRTC_V_BLANK_START, (_par->VertBlankStart & 0xff));
+	DPRINTK ("CRT15: %ld\n", regs.VertBlankStart & 0xff);
+	vga_wcrt (regbase, VGA_CRTC_V_BLANK_START, (regs.VertBlankStart & 0xff));
 
-	DPRINTK ("CRT16: %ld\n", _par->VertBlankEnd & 0xff);
-	vga_wcrt (fb_info->regs, VGA_CRTC_V_BLANK_END, (_par->VertBlankEnd & 0xff));
+	DPRINTK ("CRT16: %ld\n", regs.VertBlankEnd & 0xff);
+	vga_wcrt (regbase, VGA_CRTC_V_BLANK_END, (regs.VertBlankEnd & 0xff));
 
 	DPRINTK ("CRT18: 0xff\n");
-	vga_wcrt (fb_info->regs, VGA_CRTC_LINE_COMPARE, 0xff);
+	vga_wcrt (regbase, VGA_CRTC_LINE_COMPARE, 0xff);
 
 	tmp = 0;
-	if (_par->var.vmode & FB_VMODE_INTERLACED)
+	if (var->vmode & FB_VMODE_INTERLACED)
 		tmp |= 1;
-	if (_par->HorizBlankEnd & 64)
+	if (regs.HorizBlankEnd & 64)
 		tmp |= 16;
-	if (_par->HorizBlankEnd & 128)
+	if (regs.HorizBlankEnd & 128)
 		tmp |= 32;
-	if (_par->VertBlankEnd & 256)
+	if (regs.VertBlankEnd & 256)
 		tmp |= 64;
-	if (_par->VertBlankEnd & 512)
+	if (regs.VertBlankEnd & 512)
 		tmp |= 128;
 
 	DPRINTK ("CRT1a: %d\n", tmp);
-	vga_wcrt (fb_info->regs, CL_CRT1A, tmp);
+	vga_wcrt (regbase, CL_CRT1A, tmp);
 
 	/* set VCLK0 */
 	/* hardware RefClock: 14.31818 MHz */
 	/* formula: VClk = (OSC * N) / (D * (1+P)) */
 	/* Example: VClk = (14.31818 * 91) / (23 * (1+1)) = 28.325 MHz */
 
-	vga_wseq (fb_info->regs, CL_SEQRB, _par->nom);
-	tmp = _par->den << 1;
-	if (_par->div != 0)
+	vga_wseq (regbase, CL_SEQRB, regs.nom);
+	tmp = regs.den << 1;
+	if (regs.div != 0)
 		tmp |= 1;
 
-	if ((fb_info->btype == BT_SD64) ||
-	    (fb_info->btype == BT_ALPINE) ||
-	    (fb_info->btype == BT_GD5480))
+	if ((cinfo->btype == BT_SD64) ||
+	    (cinfo->btype == BT_ALPINE) ||
+	    (cinfo->btype == BT_GD5480))
 		tmp |= 0x80;	/* 6 bit denom; ONLY 5434!!! (bugged me 10 days) */
 
 	DPRINTK ("CL_SEQR1B: %ld\n", (long) tmp);
-	vga_wseq (fb_info->regs, CL_SEQR1B, tmp);
+	vga_wseq (regbase, CL_SEQR1B, tmp);
 
-	if (_par->VertRes >= 1024)
+	if (regs.VertRes >= 1024)
 		/* 1280x1024 */
-		vga_wcrt (fb_info->regs, VGA_CRTC_MODE, 0xc7);
+		vga_wcrt (regbase, VGA_CRTC_MODE, 0xc7);
 	else
 		/* mode control: VGA_CRTC_START_HI enable, ROTATE(?), 16bit
 		 * address wrap, no compat. */
-		vga_wcrt (fb_info->regs, VGA_CRTC_MODE, 0xc3);
+		vga_wcrt (regbase, VGA_CRTC_MODE, 0xc3);
 
-/* HAEH?        vga_wcrt (fb_info->regs, VGA_CRTC_V_SYNC_END, 0x20);  * previously: 0x00  unlock VGA_CRTC_H_TOTAL..CRT7 */
+/* HAEH?        vga_wcrt (regbase, VGA_CRTC_V_SYNC_END, 0x20);  * previously: 0x00  unlock VGA_CRTC_H_TOTAL..CRT7 */
 
 	/* don't know if it would hurt to also program this if no interlaced */
 	/* mode is used, but I feel better this way.. :-) */
-	if (_par->var.vmode & FB_VMODE_INTERLACED)
-		vga_wcrt (fb_info->regs, VGA_CRTC_REGS, _par->HorizTotal / 2);
+	if (var->vmode & FB_VMODE_INTERLACED)
+		vga_wcrt (regbase, VGA_CRTC_REGS, regs.HorizTotal / 2);
 	else
-		vga_wcrt (fb_info->regs, VGA_CRTC_REGS, 0x00);	/* interlace control */
+		vga_wcrt (regbase, VGA_CRTC_REGS, 0x00);	/* interlace control */
 
-	vga_wseq (fb_info->regs, VGA_SEQ_CHARACTER_MAP, 0);
+	vga_wseq (regbase, VGA_SEQ_CHARACTER_MAP, 0);
 
 	/* adjust horizontal/vertical sync type (low/high) */
 	tmp = 0x03;		/* enable display memory & CRTC I/O address for color mode */
-	if (_par->var.sync & FB_SYNC_HOR_HIGH_ACT)
+	if (var->sync & FB_SYNC_HOR_HIGH_ACT)
 		tmp |= 0x40;
-	if (_par->var.sync & FB_SYNC_VERT_HIGH_ACT)
+	if (var->sync & FB_SYNC_VERT_HIGH_ACT)
 		tmp |= 0x80;
-	WGen (fb_info, VGA_MIS_W, tmp);
+	WGen (cinfo, VGA_MIS_W, tmp);
 
-	vga_wcrt (fb_info->regs, VGA_CRTC_PRESET_ROW, 0);	/* Screen A Preset Row-Scan register */
-	vga_wcrt (fb_info->regs, VGA_CRTC_CURSOR_START, 0);	/* text cursor on and start line */
-	vga_wcrt (fb_info->regs, VGA_CRTC_CURSOR_END, 31);	/* text cursor end line */
+	vga_wcrt (regbase, VGA_CRTC_PRESET_ROW, 0);	/* Screen A Preset Row-Scan register */
+	vga_wcrt (regbase, VGA_CRTC_CURSOR_START, 0);	/* text cursor on and start line */
+	vga_wcrt (regbase, VGA_CRTC_CURSOR_END, 31);	/* text cursor end line */
 
 	/******************************************************
 	 *
@@ -1272,12 +1116,12 @@
 	 */
 
 	/* programming for different color depths */
-	if (_par->var.bits_per_pixel == 1) {
-		DPRINTK ("clgen: preparing for 1 bit deep display\n");
-		vga_wgfx (fb_info->regs, VGA_GFX_MODE, 0);	/* mode register */
+	if (var->bits_per_pixel == 1) {
+		DPRINTK ("cirrusfb: preparing for 1 bit deep display\n");
+		vga_wgfx (regbase, VGA_GFX_MODE, 0);	/* mode register */
 
 		/* SR07 */
-		switch (fb_info->btype) {
+		switch (cinfo->btype) {
 		case BT_SD64:
 		case BT_PICCOLO:
 		case BT_PICASSO:
@@ -1286,48 +1130,48 @@
 		case BT_ALPINE:
 		case BT_GD5480:
 			DPRINTK (" (for GD54xx)\n");
-			vga_wseq (fb_info->regs, CL_SEQR7,
-				  _par->multiplexing ?
+			vga_wseq (regbase, CL_SEQR7,
+				  regs.multiplexing ?
 				  	bi->sr07_1bpp_mux : bi->sr07_1bpp);
 			break;
 
 		case BT_LAGUNA:
 			DPRINTK (" (for GD546x)\n");
-			vga_wseq (fb_info->regs, CL_SEQR7,
-				vga_rseq (fb_info->regs, CL_SEQR7) & ~0x01);
+			vga_wseq (regbase, CL_SEQR7,
+				vga_rseq (regbase, CL_SEQR7) & ~0x01);
 			break;
 
 		default:
-			printk (KERN_WARNING "clgen: unknown Board\n");
+			printk (KERN_WARNING "cirrusfb: unknown Board\n");
 			break;
 		}
 
 		/* Extended Sequencer Mode */
-		switch (fb_info->btype) {
+		switch (cinfo->btype) {
 		case BT_SD64:
 			/* setting the SEQRF on SD64 is not necessary (only during init) */
 			DPRINTK ("(for SD64)\n");
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x1a);		/*  MCLK select */
+			vga_wseq (regbase, CL_SEQR1F, 0x1a);		/*  MCLK select */
 			break;
 
 		case BT_PICCOLO:
 			DPRINTK ("(for Piccolo)\n");
 /* ### ueberall 0x22? */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* ##vorher 1c MCLK select */
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* evtl d0 bei 1 bit? avoid FIFO underruns..? */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* ##vorher 1c MCLK select */
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* evtl d0 bei 1 bit? avoid FIFO underruns..? */
 			break;
 
 		case BT_PICASSO:
 			DPRINTK ("(for Picasso)\n");
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* ##vorher 22 MCLK select */
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xd0);	/* ## vorher d0 avoid FIFO underruns..? */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* ##vorher 22 MCLK select */
+			vga_wseq (regbase, CL_SEQRF, 0xd0);	/* ## vorher d0 avoid FIFO underruns..? */
 			break;
 
 		case BT_SPECTRUM:
 			DPRINTK ("(for Spectrum)\n");
 /* ### ueberall 0x22? */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* ##vorher 1c MCLK select */
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* evtl d0? avoid FIFO underruns..? */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* ##vorher 1c MCLK select */
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* evtl d0? avoid FIFO underruns..? */
 			break;
 
 		case BT_PICASSO4:
@@ -1339,18 +1183,18 @@
 			break;
 
 		default:
-			printk (KERN_WARNING "clgen: unknown Board\n");
+			printk (KERN_WARNING "cirrusfb: unknown Board\n");
 			break;
 		}
 
-		WGen (fb_info, VGA_PEL_MSK, 0x01);	/* pixel mask: pass-through for first plane */
-		if (_par->multiplexing)
-			WHDR (fb_info, 0x4a);	/* hidden dac reg: 1280x1024 */
+		WGen (cinfo, VGA_PEL_MSK, 0x01);	/* pixel mask: pass-through for first plane */
+		if (regs.multiplexing)
+			WHDR (cinfo, 0x4a);	/* hidden dac reg: 1280x1024 */
 		else
-			WHDR (fb_info, 0);	/* hidden dac: nothing */
-		vga_wseq (fb_info->regs, VGA_SEQ_MEMORY_MODE, 0x06);	/* memory mode: odd/even, ext. memory */
-		vga_wseq (fb_info->regs, VGA_SEQ_PLANE_WRITE, 0x01);	/* plane mask: only write to first plane */
-		offset = _par->var.xres_virtual / 16;
+			WHDR (cinfo, 0);	/* hidden dac: nothing */
+		vga_wseq (regbase, VGA_SEQ_MEMORY_MODE, 0x06);	/* memory mode: odd/even, ext. memory */
+		vga_wseq (regbase, VGA_SEQ_PLANE_WRITE, 0x01);	/* plane mask: only write to first plane */
+		offset = var->xres_virtual / 16;
 	}
 
 	/******************************************************
@@ -1359,9 +1203,9 @@
 	 *
 	 */
 
-	else if (_par->var.bits_per_pixel == 8) {
-		DPRINTK ("clgen: preparing for 8 bit deep display\n");
-		switch (fb_info->btype) {
+	else if (var->bits_per_pixel == 8) {
+		DPRINTK ("cirrusfb: preparing for 8 bit deep display\n");
+		switch (cinfo->btype) {
 		case BT_SD64:
 		case BT_PICCOLO:
 		case BT_PICASSO:
@@ -1370,52 +1214,52 @@
 		case BT_ALPINE:
 		case BT_GD5480:
 			DPRINTK (" (for GD54xx)\n");
-			vga_wseq (fb_info->regs, CL_SEQR7,
-				  _par->multiplexing ?
+			vga_wseq (regbase, CL_SEQR7,
+				  regs.multiplexing ?
 				  	bi->sr07_8bpp_mux : bi->sr07_8bpp);
 			break;
 
 		case BT_LAGUNA:
 			DPRINTK (" (for GD546x)\n");
-			vga_wseq (fb_info->regs, CL_SEQR7,
-				vga_rseq (fb_info->regs, CL_SEQR7) | 0x01);
+			vga_wseq (regbase, CL_SEQR7,
+				vga_rseq (regbase, CL_SEQR7) | 0x01);
 			break;
 
 		default:
-			printk (KERN_WARNING "clgen: unknown Board\n");
+			printk (KERN_WARNING "cirrusfb: unknown Board\n");
 			break;
 		}
 
-		switch (fb_info->btype) {
+		switch (cinfo->btype) {
 		case BT_SD64:
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x1d);		/* MCLK select */
+			vga_wseq (regbase, CL_SEQR1F, 0x1d);		/* MCLK select */
 			break;
 
 		case BT_PICCOLO:
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* ### vorher 1c MCLK select */
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* ### vorher 1c MCLK select */
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
 			break;
 
 		case BT_PICASSO:
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* ### vorher 1c MCLK select */
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* ### vorher 1c MCLK select */
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
 			break;
 
 		case BT_SPECTRUM:
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* ### vorher 1c MCLK select */
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* ### vorher 1c MCLK select */
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
 			break;
 
 		case BT_PICASSO4:
 #ifdef CONFIG_ZORRO
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb8);	/* ### INCOMPLETE!! */
+			vga_wseq (regbase, CL_SEQRF, 0xb8);	/* ### INCOMPLETE!! */
 #endif
-/*          vga_wseq (fb_info->regs, CL_SEQR1F, 0x1c); */
+/*          vga_wseq (regbase, CL_SEQR1F, 0x1c); */
 			break;
 
 		case BT_ALPINE:
 			DPRINTK (" (for GD543x)\n");
-			clgen_set_mclk (fb_info, _par->mclk, _par->divMCLK);
+			cirrusfb_set_mclk (cinfo, regs.mclk, regs.divMCLK);
 			/* We already set SRF and SR1F */
 			break;
 
@@ -1426,19 +1270,19 @@
 			break;
 
 		default:
-			printk (KERN_WARNING "clgen: unknown Board\n");
+			printk (KERN_WARNING "cirrusfb: unknown Board\n");
 			break;
 		}
 
-		vga_wgfx (fb_info->regs, VGA_GFX_MODE, 64);	/* mode register: 256 color mode */
-		WGen (fb_info, VGA_PEL_MSK, 0xff);	/* pixel mask: pass-through all planes */
-		if (_par->multiplexing)
-			WHDR (fb_info, 0x4a);	/* hidden dac reg: 1280x1024 */
+		vga_wgfx (regbase, VGA_GFX_MODE, 64);	/* mode register: 256 color mode */
+		WGen (cinfo, VGA_PEL_MSK, 0xff);	/* pixel mask: pass-through all planes */
+		if (regs.multiplexing)
+			WHDR (cinfo, 0x4a);	/* hidden dac reg: 1280x1024 */
 		else
-			WHDR (fb_info, 0);	/* hidden dac: nothing */
-		vga_wseq (fb_info->regs, VGA_SEQ_MEMORY_MODE, 0x0a);	/* memory mode: chain4, ext. memory */
-		vga_wseq (fb_info->regs, VGA_SEQ_PLANE_WRITE, 0xff);	/* plane mask: enable writing to all 4 planes */
-		offset = _par->var.xres_virtual / 8;
+			WHDR (cinfo, 0);	/* hidden dac: nothing */
+		vga_wseq (regbase, VGA_SEQ_MEMORY_MODE, 0x0a);	/* memory mode: chain4, ext. memory */
+		vga_wseq (regbase, VGA_SEQ_PLANE_WRITE, 0xff);	/* plane mask: enable writing to all 4 planes */
+		offset = var->xres_virtual / 8;
 	}
 
 	/******************************************************
@@ -1447,74 +1291,74 @@
 	 *
 	 */
 
-	else if (_par->var.bits_per_pixel == 16) {
-		DPRINTK ("clgen: preparing for 16 bit deep display\n");
-		switch (fb_info->btype) {
+	else if (var->bits_per_pixel == 16) {
+		DPRINTK ("cirrusfb: preparing for 16 bit deep display\n");
+		switch (cinfo->btype) {
 		case BT_SD64:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0xf7);	/* Extended Sequencer Mode: 256c col. mode */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x1e);		/* MCLK select */
+			vga_wseq (regbase, CL_SEQR7, 0xf7);	/* Extended Sequencer Mode: 256c col. mode */
+			vga_wseq (regbase, CL_SEQR1F, 0x1e);		/* MCLK select */
 			break;
 
 		case BT_PICCOLO:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x87);
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* MCLK select */
+			vga_wseq (regbase, CL_SEQR7, 0x87);
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* MCLK select */
 			break;
 
 		case BT_PICASSO:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x27);
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* MCLK select */
+			vga_wseq (regbase, CL_SEQR7, 0x27);
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* MCLK select */
 			break;
 
 		case BT_SPECTRUM:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x87);
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* MCLK select */
+			vga_wseq (regbase, CL_SEQR7, 0x87);
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* MCLK select */
 			break;
 
 		case BT_PICASSO4:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x27);
-/*          vga_wseq (fb_info->regs, CL_SEQR1F, 0x1c);  */
+			vga_wseq (regbase, CL_SEQR7, 0x27);
+/*          vga_wseq (regbase, CL_SEQR1F, 0x1c);  */
 			break;
 
 		case BT_ALPINE:
 			DPRINTK (" (for GD543x)\n");
-			if (_par->HorizRes >= 1024)
-				vga_wseq (fb_info->regs, CL_SEQR7, 0xa7);
+			if (regs.HorizRes >= 1024)
+				vga_wseq (regbase, CL_SEQR7, 0xa7);
 			else
-				vga_wseq (fb_info->regs, CL_SEQR7, 0xa3);
-			clgen_set_mclk (fb_info, _par->mclk, _par->divMCLK);
+				vga_wseq (regbase, CL_SEQR7, 0xa3);
+			cirrusfb_set_mclk (cinfo, regs.mclk, regs.divMCLK);
 			break;
 
 		case BT_GD5480:
 			DPRINTK (" (for GD5480)\n");
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x17);
+			vga_wseq (regbase, CL_SEQR7, 0x17);
 			/* We already set SRF and SR1F */
 			break;
 
 		case BT_LAGUNA:
 			DPRINTK (" (for GD546x)\n");
-			vga_wseq (fb_info->regs, CL_SEQR7,
-				vga_rseq (fb_info->regs, CL_SEQR7) & ~0x01);
+			vga_wseq (regbase, CL_SEQR7,
+				vga_rseq (regbase, CL_SEQR7) & ~0x01);
 			break;
 
 		default:
-			printk (KERN_WARNING "CLGEN: unknown Board\n");
+			printk (KERN_WARNING "CIRRUSFB: unknown Board\n");
 			break;
 		}
 
-		vga_wgfx (fb_info->regs, VGA_GFX_MODE, 64);	/* mode register: 256 color mode */
-		WGen (fb_info, VGA_PEL_MSK, 0xff);	/* pixel mask: pass-through all planes */
+		vga_wgfx (regbase, VGA_GFX_MODE, 64);	/* mode register: 256 color mode */
+		WGen (cinfo, VGA_PEL_MSK, 0xff);	/* pixel mask: pass-through all planes */
 #ifdef CONFIG_PCI
-		WHDR (fb_info, 0xc0);	/* Copy Xbh */
+		WHDR (cinfo, 0xc0);	/* Copy Xbh */
 #elif defined(CONFIG_ZORRO)
 		/* FIXME: CONFIG_PCI and CONFIG_ZORRO may be defined both */
-		WHDR (fb_info, 0xa0);	/* hidden dac reg: nothing special */
+		WHDR (cinfo, 0xa0);	/* hidden dac reg: nothing special */
 #endif
-		vga_wseq (fb_info->regs, VGA_SEQ_MEMORY_MODE, 0x0a);	/* memory mode: chain4, ext. memory */
-		vga_wseq (fb_info->regs, VGA_SEQ_PLANE_WRITE, 0xff);	/* plane mask: enable writing to all 4 planes */
-		offset = _par->var.xres_virtual / 4;
+		vga_wseq (regbase, VGA_SEQ_MEMORY_MODE, 0x0a);	/* memory mode: chain4, ext. memory */
+		vga_wseq (regbase, VGA_SEQ_PLANE_WRITE, 0xff);	/* plane mask: enable writing to all 4 planes */
+		offset = var->xres_virtual / 4;
 	}
 
 	/******************************************************
@@ -1523,66 +1367,66 @@
 	 *
 	 */
 
-	else if (_par->var.bits_per_pixel == 32) {
-		DPRINTK ("clgen: preparing for 24/32 bit deep display\n");
-		switch (fb_info->btype) {
+	else if (var->bits_per_pixel == 32) {
+		DPRINTK ("cirrusfb: preparing for 24/32 bit deep display\n");
+		switch (cinfo->btype) {
 		case BT_SD64:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0xf9);	/* Extended Sequencer Mode: 256c col. mode */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x1e);		/* MCLK select */
+			vga_wseq (regbase, CL_SEQR7, 0xf9);	/* Extended Sequencer Mode: 256c col. mode */
+			vga_wseq (regbase, CL_SEQR1F, 0x1e);		/* MCLK select */
 			break;
 
 		case BT_PICCOLO:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x85);
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* MCLK select */
+			vga_wseq (regbase, CL_SEQR7, 0x85);
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* MCLK select */
 			break;
 
 		case BT_PICASSO:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x25);
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* MCLK select */
+			vga_wseq (regbase, CL_SEQR7, 0x25);
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* MCLK select */
 			break;
 
 		case BT_SPECTRUM:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x85);
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
-			vga_wseq (fb_info->regs, CL_SEQR1F, 0x22);		/* MCLK select */
+			vga_wseq (regbase, CL_SEQR7, 0x85);
+			vga_wseq (regbase, CL_SEQRF, 0xb0);	/* Fast Page-Mode writes */
+			vga_wseq (regbase, CL_SEQR1F, 0x22);		/* MCLK select */
 			break;
 
 		case BT_PICASSO4:
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x25);
-/*          vga_wseq (fb_info->regs, CL_SEQR1F, 0x1c);  */
+			vga_wseq (regbase, CL_SEQR7, 0x25);
+/*          vga_wseq (regbase, CL_SEQR1F, 0x1c);  */
 			break;
 
 		case BT_ALPINE:
 			DPRINTK (" (for GD543x)\n");
-			vga_wseq (fb_info->regs, CL_SEQR7, 0xa9);
-			clgen_set_mclk (fb_info, _par->mclk, _par->divMCLK);
+			vga_wseq (regbase, CL_SEQR7, 0xa9);
+			cirrusfb_set_mclk (cinfo, regs.mclk, regs.divMCLK);
 			break;
 
 		case BT_GD5480:
 			DPRINTK (" (for GD5480)\n");
-			vga_wseq (fb_info->regs, CL_SEQR7, 0x19);
+			vga_wseq (regbase, CL_SEQR7, 0x19);
 			/* We already set SRF and SR1F */
 			break;
 
 		case BT_LAGUNA:
 			DPRINTK (" (for GD546x)\n");
-			vga_wseq (fb_info->regs, CL_SEQR7,
-				vga_rseq (fb_info->regs, CL_SEQR7) & ~0x01);
+			vga_wseq (regbase, CL_SEQR7,
+				vga_rseq (regbase, CL_SEQR7) & ~0x01);
 			break;
 
 		default:
-			printk (KERN_WARNING "clgen: unknown Board\n");
+			printk (KERN_WARNING "cirrusfb: unknown Board\n");
 			break;
 		}
 
-		vga_wgfx (fb_info->regs, VGA_GFX_MODE, 64);	/* mode register: 256 color mode */
-		WGen (fb_info, VGA_PEL_MSK, 0xff);	/* pixel mask: pass-through all planes */
-		WHDR (fb_info, 0xc5);	/* hidden dac reg: 8-8-8 mode (24 or 32) */
-		vga_wseq (fb_info->regs, VGA_SEQ_MEMORY_MODE, 0x0a);	/* memory mode: chain4, ext. memory */
-		vga_wseq (fb_info->regs, VGA_SEQ_PLANE_WRITE, 0xff);	/* plane mask: enable writing to all 4 planes */
-		offset = _par->var.xres_virtual / 4;
+		vga_wgfx (regbase, VGA_GFX_MODE, 64);	/* mode register: 256 color mode */
+		WGen (cinfo, VGA_PEL_MSK, 0xff);	/* pixel mask: pass-through all planes */
+		WHDR (cinfo, 0xc5);	/* hidden dac reg: 8-8-8 mode (24 or 32) */
+		vga_wseq (regbase, VGA_SEQ_MEMORY_MODE, 0x0a);	/* memory mode: chain4, ext. memory */
+		vga_wseq (regbase, VGA_SEQ_PLANE_WRITE, 0xff);	/* plane mask: enable writing to all 4 planes */
+		offset = var->xres_virtual / 4;
 	}
 
 	/******************************************************
@@ -1592,47 +1436,47 @@
 	 */
 
 	else {
-		printk (KERN_ERR "clgen: What's this?? requested color depth == %d.\n",
-			_par->var.bits_per_pixel);
+		printk (KERN_ERR "cirrusfb: What's this?? requested color depth == %d.\n",
+			var->bits_per_pixel);
 	}
 
-	vga_wcrt (fb_info->regs, VGA_CRTC_OFFSET, offset & 0xff);
+	vga_wcrt (regbase, VGA_CRTC_OFFSET, offset & 0xff);
 	tmp = 0x22;
 	if (offset & 0x100)
 		tmp |= 0x10;	/* offset overflow bit */
 
-	vga_wcrt (fb_info->regs, CL_CRT1B, tmp);	/* screen start addr #16-18, fastpagemode cycles */
+	vga_wcrt (regbase, CL_CRT1B, tmp);	/* screen start addr #16-18, fastpagemode cycles */
 
-	if (fb_info->btype == BT_SD64 ||
-	    fb_info->btype == BT_PICASSO4 ||
-	    fb_info->btype == BT_ALPINE ||
-	    fb_info->btype == BT_GD5480)
-		vga_wcrt (fb_info->regs, CL_CRT1D, 0x00);	/* screen start address bit 19 */
-
-	vga_wcrt (fb_info->regs, VGA_CRTC_CURSOR_HI, 0);	/* text cursor location high */
-	vga_wcrt (fb_info->regs, VGA_CRTC_CURSOR_LO, 0);	/* text cursor location low */
-	vga_wcrt (fb_info->regs, VGA_CRTC_UNDERLINE, 0);	/* underline row scanline = at very bottom */
-
-	vga_wattr (fb_info->regs, VGA_ATC_MODE, 1);	/* controller mode */
-	vga_wattr (fb_info->regs, VGA_ATC_OVERSCAN, 0);		/* overscan (border) color */
-	vga_wattr (fb_info->regs, VGA_ATC_PLANE_ENABLE, 15);	/* color plane enable */
-	vga_wattr (fb_info->regs, CL_AR33, 0);	/* pixel panning */
-	vga_wattr (fb_info->regs, VGA_ATC_COLOR_PAGE, 0);	/* color select */
+	if (cinfo->btype == BT_SD64 ||
+	    cinfo->btype == BT_PICASSO4 ||
+	    cinfo->btype == BT_ALPINE ||
+	    cinfo->btype == BT_GD5480)
+		vga_wcrt (regbase, CL_CRT1D, 0x00);	/* screen start address bit 19 */
+
+	vga_wcrt (regbase, VGA_CRTC_CURSOR_HI, 0);	/* text cursor location high */
+	vga_wcrt (regbase, VGA_CRTC_CURSOR_LO, 0);	/* text cursor location low */
+	vga_wcrt (regbase, VGA_CRTC_UNDERLINE, 0);	/* underline row scanline = at very bottom */
+
+	vga_wattr (regbase, VGA_ATC_MODE, 1);	/* controller mode */
+	vga_wattr (regbase, VGA_ATC_OVERSCAN, 0);		/* overscan (border) color */
+	vga_wattr (regbase, VGA_ATC_PLANE_ENABLE, 15);	/* color plane enable */
+	vga_wattr (regbase, CL_AR33, 0);	/* pixel panning */
+	vga_wattr (regbase, VGA_ATC_COLOR_PAGE, 0);	/* color select */
 
 	/* [ EGS: SetOffset(); ] */
 	/* From SetOffset(): Turn on VideoEnable bit in Attribute controller */
-	AttrOn (fb_info);
+	AttrOn (cinfo);
 
-	vga_wgfx (fb_info->regs, VGA_GFX_SR_VALUE, 0);	/* set/reset register */
-	vga_wgfx (fb_info->regs, VGA_GFX_SR_ENABLE, 0);		/* set/reset enable */
-	vga_wgfx (fb_info->regs, VGA_GFX_COMPARE_VALUE, 0);	/* color compare */
-	vga_wgfx (fb_info->regs, VGA_GFX_DATA_ROTATE, 0);	/* data rotate */
-	vga_wgfx (fb_info->regs, VGA_GFX_PLANE_READ, 0);	/* read map select */
-	vga_wgfx (fb_info->regs, VGA_GFX_MISC, 1);	/* miscellaneous register */
-	vga_wgfx (fb_info->regs, VGA_GFX_COMPARE_MASK, 15);	/* color don't care */
-	vga_wgfx (fb_info->regs, VGA_GFX_BIT_MASK, 255);	/* bit mask */
+	vga_wgfx (regbase, VGA_GFX_SR_VALUE, 0);	/* set/reset register */
+	vga_wgfx (regbase, VGA_GFX_SR_ENABLE, 0);		/* set/reset enable */
+	vga_wgfx (regbase, VGA_GFX_COMPARE_VALUE, 0);	/* color compare */
+	vga_wgfx (regbase, VGA_GFX_DATA_ROTATE, 0);	/* data rotate */
+	vga_wgfx (regbase, VGA_GFX_PLANE_READ, 0);	/* read map select */
+	vga_wgfx (regbase, VGA_GFX_MISC, 1);	/* miscellaneous register */
+	vga_wgfx (regbase, VGA_GFX_COMPARE_MASK, 15);	/* color don't care */
+	vga_wgfx (regbase, VGA_GFX_BIT_MASK, 255);	/* bit mask */
 
-	vga_wseq (fb_info->regs, CL_SEQR12, 0x0);	/* graphics cursor attributes: nothing special */
+	vga_wseq (regbase, CL_SEQR12, 0x0);	/* graphics cursor attributes: nothing special */
 
 	/* finally, turn on everything - turn off "FullBandwidth" bit */
 	/* also, set "DotClock%2" bit where requested */
@@ -1643,149 +1487,112 @@
 	tmp |= 0x08;
 */
 
-	vga_wseq (fb_info->regs, VGA_SEQ_CLOCK_MODE, tmp);
+	vga_wseq (regbase, VGA_SEQ_CLOCK_MODE, tmp);
 	DPRINTK ("CL_SEQR1: %d\n", tmp);
 
-	fb_info->currentmode = *_par;
+	cinfo->currentmode = regs;
+	info->fix.type = regs.type;
+	info->fix.visual = regs.visual;
+	info->fix.line_length = regs.line_length;
 
-	DPRINTK ("virtual offset: (%d,%d)\n", _par->var.xoffset, _par->var.yoffset);
 	/* pan to requested offset */
-	clgen_pan_display (&fb_info->currentmode.var, (struct fb_info_gen *) fb_info);
+	cirrusfb_pan_display (var, info);
 
-#ifdef CLGEN_DEBUG
-	clgen_dump ();
+#ifdef CIRRUSFB_DEBUG
+	cirrusfb_dump ();
 #endif
 
 	DPRINTK ("EXIT\n");
-	return;
+	return 0;
 }
 
-
-static int clgen_getcolreg (unsigned regno, unsigned *red, unsigned *green,
-			    unsigned *blue, unsigned *transp,
-			    struct fb_info *info)
+/* for some reason incomprehensible to me, cirrusfb requires that you write
+ * the registers twice for the settings to take..grr. -dte */
+int cirrusfb_set_par (struct fb_info *info)
 {
-    struct clgenfb_info *fb_info = (struct clgenfb_info *)info;
-
-    if (regno > 255)
-	return 1;
-    *red = fb_info->palette[regno].red;
-    *green = fb_info->palette[regno].green;
-    *blue = fb_info->palette[regno].blue;
-    *transp = 0;
-    return 0;
+	cirrusfb_set_par_foo (info);
+	return cirrusfb_set_par_foo (info);
 }
 
-
-static int clgenfb_setcolreg (unsigned regno, unsigned red, unsigned green,
-			      unsigned blue, unsigned transp,
-			      struct fb_info *info)
+int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
+			unsigned blue, unsigned transp,
+			struct fb_info *info)
 {
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) info;
+	struct cirrusfb_info *cinfo = info->par;
 
 	if (regno > 255)
 		return -EINVAL;
 
-#ifdef FBCON_HAS_CFB8
-	switch (fb_info->currentmode.var.bits_per_pixel) {
-	case 8:
-		/* "transparent" stuff is completely ignored. */
-		WClut (fb_info, regno, red >> 10, green >> 10, blue >> 10);
-		break;
-	default:
-		/* do nothing */
-		break;
-	}
-#endif	/* FBCON_HAS_CFB8 */
-
-	fb_info->palette[regno].red = red;
-	fb_info->palette[regno].green = green;
-	fb_info->palette[regno].blue = blue;
-
-	if (regno >= 16)
-		return 0;
-
-	switch (fb_info->currentmode.var.bits_per_pixel) {
-
-#ifdef FBCON_HAS_CFB16
-	case 16:
-		assert (regno < 16);
-		if(isPReP) {
-			fb_info->fbcon_cmap.cfb16[regno] =
-			    ((red & 0xf800) >> 9) |
-			    ((green & 0xf800) >> 14) |
-			    ((green & 0xf800) << 2) |
-			    ((blue & 0xf800) >> 3);
-		} else {
-			fb_info->fbcon_cmap.cfb16[regno] =
-			    ((red & 0xf800) >> 1) |
-			    ((green & 0xf800) >> 6) |
-			    ((blue & 0xf800) >> 11);
+	if (info->fix.visual == FB_VISUAL_TRUECOLOR) {
+		u32 v;
+		red >>= (16 - info->var.red.length);
+		green >>= (16 - info->var.green.length);
+		blue >>= (16 - info->var.blue.length);
+
+		if (regno>=16)
+			return 1;
+		v = (red << info->var.red.offset) |
+		    (green << info->var.green.offset) |
+		    (blue << info->var.blue.offset);
+
+		switch (info->var.bits_per_pixel) {
+			case 8:
+				((u8*)(info->pseudo_palette))[regno] = v;
+				break;
+			case 16:
+				((u16*)(info->pseudo_palette))[regno] = v;
+				break;
+			case 24:
+			case 32:
+				((u32*)(info->pseudo_palette))[regno] = v;
+				break;
 		}
-#endif /* FBCON_HAS_CFB16 */
+		return 0;
+	}
 
-#ifdef FBCON_HAS_CFB24
-	case 24:
-		assert (regno < 16);
-		fb_info->fbcon_cmap.cfb24[regno] =
-			(red   << fb_info->currentmode.var.red.offset)   |
-			(green << fb_info->currentmode.var.green.offset) |
-			(blue  << fb_info->currentmode.var.blue.offset);
-		break;
-#endif /* FBCON_HAS_CFB24 */
+	cinfo->palette[regno].red = red;
+	cinfo->palette[regno].green = green;
+	cinfo->palette[regno].blue = blue;
 
-#ifdef FBCON_HAS_CFB32
-	case 32:
-		assert (regno < 16);
-		if(isPReP) {
-			fb_info->fbcon_cmap.cfb32[regno] =
-			    ((red & 0xff00)) |
-			    ((green & 0xff00) << 8) |
-			    ((blue & 0xff00) << 16);
-		} else {
-			fb_info->fbcon_cmap.cfb32[regno] =
-			    ((red & 0xff00) << 8) |
-			    ((green & 0xff00)) |
-			    ((blue & 0xff00) >> 8);
-		}
-		break;
-#endif /* FBCON_HAS_CFB32 */
-	default:
-		/* do nothing */
-		break;
+	if (info->var.bits_per_pixel == 8) {
+			WClut (cinfo, regno, red >> 10, green >> 10, blue >> 10);
 	}
 
 	return 0;
+
 }
 
 /*************************************************************************
-	clgen_pan_display()
+	cirrusfb_pan_display()
 
 	performs display panning - provided hardware permits this
 **************************************************************************/
-static int clgen_pan_display (const struct fb_var_screeninfo *var,
-			      struct fb_info_gen *info)
+int cirrusfb_pan_display (struct fb_var_screeninfo *var,
+			  struct fb_info *info)
 {
 	int xoffset = 0;
 	int yoffset = 0;
 	unsigned long base;
 	unsigned char tmp = 0, tmp2 = 0, xpix;
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) info;
+	struct cirrusfb_info *cinfo = info->par;
 
 	DPRINTK ("ENTER\n");
+	DPRINTK ("virtual offset: (%d,%d)\n", var->xoffset, var->yoffset);
 
 	/* no range checks for xoffset and yoffset,   */
-	/* as fbgen_pan_display has already done this */
+	/* as fb_pan_display has already done this */
+	if (var->vmode & FB_VMODE_YWRAP)
+		return -EINVAL;
 
-	fb_info->currentmode.var.xoffset = var->xoffset;
-	fb_info->currentmode.var.yoffset = var->yoffset;
+	info->var.xoffset = var->xoffset;
+	info->var.yoffset = var->yoffset;
 
-	xoffset = var->xoffset * fb_info->currentmode.var.bits_per_pixel / 8;
+	xoffset = var->xoffset * info->var.bits_per_pixel / 8;
 	yoffset = var->yoffset;
 
-	base = yoffset * fb_info->currentmode.line_length + xoffset;
+	base = yoffset * cinfo->currentmode.line_length + xoffset;
 
-	if (fb_info->currentmode.var.bits_per_pixel == 1) {
+	if (info->var.bits_per_pixel == 1) {
 		/* base is already correct */
 		xpix = (unsigned char) (var->xoffset % 8);
 	} else {
@@ -1793,9 +1600,11 @@
 		xpix = (unsigned char) ((xoffset % 4) * 2);
 	}
 
+        cirrusfb_WaitBLT(cinfo->regbase); /* make sure all the BLT's are done */
+
 	/* lower 8 + 8 bits of screen start address */
-	vga_wcrt (fb_info->regs, VGA_CRTC_START_LO, (unsigned char) (base & 0xff));
-	vga_wcrt (fb_info->regs, VGA_CRTC_START_HI, (unsigned char) (base >> 8));
+	vga_wcrt (cinfo->regbase, VGA_CRTC_START_LO, (unsigned char) (base & 0xff));
+	vga_wcrt (cinfo->regbase, VGA_CRTC_START_HI, (unsigned char) (base >> 8));
 
 	/* construct bits 16, 17 and 18 of screen start address */
 	if (base & 0x10000)
@@ -1805,29 +1614,30 @@
 	if (base & 0x40000)
 		tmp |= 0x08;
 
-	tmp2 = (vga_rcrt (fb_info->regs, CL_CRT1B) & 0xf2) | tmp;	/* 0xf2 is %11110010, exclude tmp bits */
-	vga_wcrt (fb_info->regs, CL_CRT1B, tmp2);
+	tmp2 = (vga_rcrt (cinfo->regbase, CL_CRT1B) & 0xf2) | tmp;	/* 0xf2 is %11110010, exclude tmp bits */
+	vga_wcrt (cinfo->regbase, CL_CRT1B, tmp2);
 
 	/* construct bit 19 of screen start address */
-	if (clgen_board_info[fb_info->btype].scrn_start_bit19) {
+	if (cirrusfb_board_info[cinfo->btype].scrn_start_bit19) {
 		tmp2 = 0;
 		if (base & 0x80000)
 			tmp2 = 0x80;
-		vga_wcrt (fb_info->regs, CL_CRT1D, tmp2);
+		vga_wcrt (cinfo->regbase, CL_CRT1D, tmp2);
 	}
 
 	/* write pixel panning value to AR33; this does not quite work in 8bpp */
 	/* ### Piccolo..? Will this work? */
-	if (fb_info->currentmode.var.bits_per_pixel == 1)
-		vga_wattr (fb_info->regs, CL_AR33, xpix);
+	if (info->var.bits_per_pixel == 1)
+		vga_wattr (cinfo->regbase, CL_AR33, xpix);
 
+	cirrusfb_WaitBLT (cinfo->regbase);
 
 	DPRINTK ("EXIT\n");
 	return (0);
 }
 
 
-static int clgen_blank (int blank_mode, struct fb_info_gen *info)
+int cirrusfb_blank (int blank_mode, struct fb_info *info)
 {
 	/*
 	 *  Blank the screen if blank_mode != 0, else unblank. If blank == NULL
@@ -1840,57 +1650,51 @@
 	 *    blank_mode == 4: powerdown
 	 */
 	unsigned char val;
-	static int current_mode = 0;
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) info;
+	struct cirrusfb_info *cinfo = info->par;
+	int current_mode = cinfo->blank_mode;
 
 	DPRINTK ("ENTER, blank mode = %d\n", blank_mode);
 
-	if (current_mode == blank_mode) {
+	if (info->state != FBINFO_STATE_RUNNING ||
+	    current_mode == blank_mode) {
 		DPRINTK ("EXIT, returning 0\n");
 		return 0;
 	}
 
 	/* Undo current */
-	switch (current_mode) {
-	case 0:		/* Screen is normal */
-		break;
-	case 1:		/* Screen is blanked */
-		val = vga_rseq (fb_info->regs, VGA_SEQ_CLOCK_MODE);
-		vga_wseq (fb_info->regs, VGA_SEQ_CLOCK_MODE, val & 0xdf);	/* clear "FullBandwidth" bit */
-		break;
-	case 2:		/* vsync suspended */
-	case 3:		/* hsync suspended */
-	case 4:		/* sceen is powered down */
-		vga_wgfx (fb_info->regs, CL_GRE, 0x00);
-		break;
-	default:
-		DPRINTK ("EXIT, returning 1\n");
-		return 1;
+	if (current_mode != VESA_NO_BLANKING) {
+		/* unblank the screen */
+		val = vga_rseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE);
+		vga_wseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE, val & 0xdf);	/* clear "FullBandwidth" bit */
+		/* and undo VESA suspend trickery */
+		vga_wgfx (cinfo->regbase, CL_GRE, 0x00);
 	}
 
 	/* set new */
+	if(blank_mode != VESA_NO_BLANKING) {
+		/* blank the screen */
+		val = vga_rseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE);
+		vga_wseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE, val | 0x20);	/* set "FullBandwidth" bit */
+	}
+
 	switch (blank_mode) {
-	case 0:		/* Unblank screen */
+	case VESA_NO_BLANKING:
 		break;
-	case 1:		/* Blank screen */
-		val = vga_rseq (fb_info->regs, VGA_SEQ_CLOCK_MODE);
-		vga_wseq (fb_info->regs, VGA_SEQ_CLOCK_MODE, val | 0x20);	/* set "FullBandwidth" bit */
+	case VESA_VSYNC_SUSPEND:
+		vga_wgfx (cinfo->regbase, CL_GRE, 0x04);
 		break;
-	case 2:		/* suspend vsync */
-		vga_wgfx (fb_info->regs, CL_GRE, 0x04);
+	case VESA_HSYNC_SUSPEND:
+		vga_wgfx (cinfo->regbase, CL_GRE, 0x02);
 		break;
-	case 3:		/* suspend hsync */
-		vga_wgfx (fb_info->regs, CL_GRE, 0x02);
-		break;
-	case 4:		/* powerdown */
-		vga_wgfx (fb_info->regs, CL_GRE, 0x06);
+	case VESA_POWERDOWN:
+		vga_wgfx (cinfo->regbase, CL_GRE, 0x06);
 		break;
 	default:
 		DPRINTK ("EXIT, returning 1\n");
 		return 1;
 	}
 
-	current_mode = blank_mode;
+	cinfo->blank_mode = blank_mode;
 	DPRINTK ("EXIT, returning 0\n");
 	return 0;
 }
@@ -1898,45 +1702,45 @@
 /****************************************************************************/
 /**** BEGIN Internal Routines ***********************************************/
 
-static void __init init_vgachip (struct clgenfb_info *fb_info)
+static void init_vgachip (struct cirrusfb_info *cinfo)
 {
-	const struct clgen_board_info_rec *bi;
+	const struct cirrusfb_board_info_rec *bi;
 
 	DPRINTK ("ENTER\n");
 
-	assert (fb_info != NULL);
+	assert (cinfo != NULL);
 
-	bi = &clgen_board_info[fb_info->btype];
+	bi = &cirrusfb_board_info[cinfo->btype];
 
 	/* reset board globally */
-	switch (fb_info->btype) {
+	switch (cinfo->btype) {
 	case BT_PICCOLO:
-		WSFR (fb_info, 0x01);
+		WSFR (cinfo, 0x01);
 		udelay (500);
-		WSFR (fb_info, 0x51);
+		WSFR (cinfo, 0x51);
 		udelay (500);
 		break;
 	case BT_PICASSO:
-		WSFR2 (fb_info, 0xff);
+		WSFR2 (cinfo, 0xff);
 		udelay (500);
 		break;
 	case BT_SD64:
 	case BT_SPECTRUM:
-		WSFR (fb_info, 0x1f);
+		WSFR (cinfo, 0x1f);
 		udelay (500);
-		WSFR (fb_info, 0x4f);
+		WSFR (cinfo, 0x4f);
 		udelay (500);
 		break;
 	case BT_PICASSO4:
-		vga_wcrt (fb_info->regs, CL_CRT51, 0x00);	/* disable flickerfixer */
+		vga_wcrt (cinfo->regbase, CL_CRT51, 0x00);	/* disable flickerfixer */
 		mdelay (100);
-		vga_wgfx (fb_info->regs, CL_GR2F, 0x00);	/* from Klaus' NetBSD driver: */
-		vga_wgfx (fb_info->regs, CL_GR33, 0x00);	/* put blitter into 542x compat */
-		vga_wgfx (fb_info->regs, CL_GR31, 0x00);	/* mode */
+		vga_wgfx (cinfo->regbase, CL_GR2F, 0x00);	/* from Klaus' NetBSD driver: */
+		vga_wgfx (cinfo->regbase, CL_GR33, 0x00);	/* put blitter into 542x compat */
+		vga_wgfx (cinfo->regbase, CL_GR31, 0x00);	/* mode */
 		break;
 
 	case BT_GD5480:
-		vga_wgfx (fb_info->regs, CL_GR2F, 0x00);	/* from Klaus' NetBSD driver: */
+		vga_wgfx (cinfo->regbase, CL_GR2F, 0x00);	/* from Klaus' NetBSD driver: */
 		break;
 
 	case BT_ALPINE:
@@ -1944,220 +1748,190 @@
 		break;
 
 	default:
-		printk (KERN_ERR "clgen: Warning: Unknown board type\n");
+		printk (KERN_ERR "cirrusfb: Warning: Unknown board type\n");
 		break;
 	}
 
-	assert (fb_info->size > 0); /* make sure RAM size set by this point */
-
-	/* assume it's a "large memory" board (2/4 MB) */
-	fb_info->smallboard = FALSE;
+	assert (cinfo->size > 0); /* make sure RAM size set by this point */
 
 	/* the P4 is not fully initialized here; I rely on it having been */
 	/* inited under AmigaOS already, which seems to work just fine    */
 	/* (Klaus advised to do it this way)                              */
 
-	if (fb_info->btype != BT_PICASSO4) {
-		WGen (fb_info, CL_VSSM, 0x10);	/* EGS: 0x16 */
-		WGen (fb_info, CL_POS102, 0x01);
-		WGen (fb_info, CL_VSSM, 0x08);	/* EGS: 0x0e */
+	if (cinfo->btype != BT_PICASSO4) {
+		WGen (cinfo, CL_VSSM, 0x10);	/* EGS: 0x16 */
+		WGen (cinfo, CL_POS102, 0x01);
+		WGen (cinfo, CL_VSSM, 0x08);	/* EGS: 0x0e */
 
-		if (fb_info->btype != BT_SD64)
-			WGen (fb_info, CL_VSSM2, 0x01);
+		if (cinfo->btype != BT_SD64)
+			WGen (cinfo, CL_VSSM2, 0x01);
 
-		vga_wseq (fb_info->regs, CL_SEQR0, 0x03);	/* reset sequencer logic */
+		vga_wseq (cinfo->regbase, CL_SEQR0, 0x03);	/* reset sequencer logic */
 
-		vga_wseq (fb_info->regs, VGA_SEQ_CLOCK_MODE, 0x21);	/* FullBandwidth (video off) and 8/9 dot clock */
-		WGen (fb_info, VGA_MIS_W, 0xc1);	/* polarity (-/-), disable access to display memory, VGA_CRTC_START_HI base address: color */
+		vga_wseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE, 0x21);	/* FullBandwidth (video off) and 8/9 dot clock */
+		WGen (cinfo, VGA_MIS_W, 0xc1);	/* polarity (-/-), disable access to display memory, VGA_CRTC_START_HI base address: color */
 
-/*      vga_wgfx (fb_info->regs, CL_GRA, 0xce);    "magic cookie" - doesn't make any sense to me.. */
-		vga_wseq (fb_info->regs, CL_SEQR6, 0x12);	/* unlock all extension registers */
+/*      vga_wgfx (cinfo->regbase, CL_GRA, 0xce);    "magic cookie" - doesn't make any sense to me.. */
+		vga_wseq (cinfo->regbase, CL_SEQR6, 0x12);	/* unlock all extension registers */
 
-		vga_wgfx (fb_info->regs, CL_GR31, 0x04);	/* reset blitter */
+		vga_wgfx (cinfo->regbase, CL_GR31, 0x04);	/* reset blitter */
 
-		switch (fb_info->btype) {
+		switch (cinfo->btype) {
 		case BT_GD5480:
-			vga_wseq (fb_info->regs, CL_SEQRF, 0x98);
+			vga_wseq (cinfo->regbase, CL_SEQRF, 0x98);
 			break;
 		case BT_ALPINE:
 			break;
 		case BT_SD64:
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb8);
+			vga_wseq (cinfo->regbase, CL_SEQRF, 0xb8);
 			break;
 		default:
-			vga_wseq (fb_info->regs, CL_SEQR16, 0x0f);
-			vga_wseq (fb_info->regs, CL_SEQRF, 0xb0);
+			vga_wseq (cinfo->regbase, CL_SEQR16, 0x0f);
+			vga_wseq (cinfo->regbase, CL_SEQRF, 0xb0);
 			break;
 		}
 	}
-	vga_wseq (fb_info->regs, VGA_SEQ_PLANE_WRITE, 0xff);	/* plane mask: nothing */
-	vga_wseq (fb_info->regs, VGA_SEQ_CHARACTER_MAP, 0x00);	/* character map select: doesn't even matter in gx mode */
-	vga_wseq (fb_info->regs, VGA_SEQ_MEMORY_MODE, 0x0e);	/* memory mode: chain-4, no odd/even, ext. memory */
+	vga_wseq (cinfo->regbase, VGA_SEQ_PLANE_WRITE, 0xff);	/* plane mask: nothing */
+	vga_wseq (cinfo->regbase, VGA_SEQ_CHARACTER_MAP, 0x00);	/* character map select: doesn't even matter in gx mode */
+	vga_wseq (cinfo->regbase, VGA_SEQ_MEMORY_MODE, 0x0e);	/* memory mode: chain-4, no odd/even, ext. memory */
 
 	/* controller-internal base address of video memory */
 	if (bi->init_sr07)
-		vga_wseq (fb_info->regs, CL_SEQR7, bi->sr07);
+		vga_wseq (cinfo->regbase, CL_SEQR7, bi->sr07);
 
-	/*  vga_wseq (fb_info->regs, CL_SEQR8, 0x00); *//* EEPROM control: shouldn't be necessary to write to this at all.. */
+	/*  vga_wseq (cinfo->regbase, CL_SEQR8, 0x00); *//* EEPROM control: shouldn't be necessary to write to this at all.. */
 
-	vga_wseq (fb_info->regs, CL_SEQR10, 0x00);		/* graphics cursor X position (incomplete; position gives rem. 3 bits */
-	vga_wseq (fb_info->regs, CL_SEQR11, 0x00);		/* graphics cursor Y position (..."... ) */
-	vga_wseq (fb_info->regs, CL_SEQR12, 0x00);		/* graphics cursor attributes */
-	vga_wseq (fb_info->regs, CL_SEQR13, 0x00);		/* graphics cursor pattern address */
+	vga_wseq (cinfo->regbase, CL_SEQR10, 0x00);		/* graphics cursor X position (incomplete; position gives rem. 3 bits */
+	vga_wseq (cinfo->regbase, CL_SEQR11, 0x00);		/* graphics cursor Y position (..."... ) */
+	vga_wseq (cinfo->regbase, CL_SEQR12, 0x00);		/* graphics cursor attributes */
+	vga_wseq (cinfo->regbase, CL_SEQR13, 0x00);		/* graphics cursor pattern address */
 
 	/* writing these on a P4 might give problems..  */
-	if (fb_info->btype != BT_PICASSO4) {
-		vga_wseq (fb_info->regs, CL_SEQR17, 0x00);		/* configuration readback and ext. color */
-		vga_wseq (fb_info->regs, CL_SEQR18, 0x02);		/* signature generator */
+	if (cinfo->btype != BT_PICASSO4) {
+		vga_wseq (cinfo->regbase, CL_SEQR17, 0x00);		/* configuration readback and ext. color */
+		vga_wseq (cinfo->regbase, CL_SEQR18, 0x02);		/* signature generator */
 	}
 
 	/* MCLK select etc. */
 	if (bi->init_sr1f)
-		vga_wseq (fb_info->regs, CL_SEQR1F, bi->sr1f);
+		vga_wseq (cinfo->regbase, CL_SEQR1F, bi->sr1f);
 
-	vga_wcrt (fb_info->regs, VGA_CRTC_PRESET_ROW, 0x00);	/* Screen A preset row scan: none */
-	vga_wcrt (fb_info->regs, VGA_CRTC_CURSOR_START, 0x20);	/* Text cursor start: disable text cursor */
-	vga_wcrt (fb_info->regs, VGA_CRTC_CURSOR_END, 0x00);	/* Text cursor end: - */
-	vga_wcrt (fb_info->regs, VGA_CRTC_START_HI, 0x00);	/* Screen start address high: 0 */
-	vga_wcrt (fb_info->regs, VGA_CRTC_START_LO, 0x00);	/* Screen start address low: 0 */
-	vga_wcrt (fb_info->regs, VGA_CRTC_CURSOR_HI, 0x00);	/* text cursor location high: 0 */
-	vga_wcrt (fb_info->regs, VGA_CRTC_CURSOR_LO, 0x00);	/* text cursor location low: 0 */
-
-	vga_wcrt (fb_info->regs, VGA_CRTC_UNDERLINE, 0x00);	/* Underline Row scanline: - */
-	vga_wcrt (fb_info->regs, VGA_CRTC_MODE, 0xc3);	/* mode control: timing enable, byte mode, no compat modes */
-	vga_wcrt (fb_info->regs, VGA_CRTC_LINE_COMPARE, 0x00);	/* Line Compare: not needed */
+	vga_wcrt (cinfo->regbase, VGA_CRTC_PRESET_ROW, 0x00);	/* Screen A preset row scan: none */
+	vga_wcrt (cinfo->regbase, VGA_CRTC_CURSOR_START, 0x20);	/* Text cursor start: disable text cursor */
+	vga_wcrt (cinfo->regbase, VGA_CRTC_CURSOR_END, 0x00);	/* Text cursor end: - */
+	vga_wcrt (cinfo->regbase, VGA_CRTC_START_HI, 0x00);	/* Screen start address high: 0 */
+	vga_wcrt (cinfo->regbase, VGA_CRTC_START_LO, 0x00);	/* Screen start address low: 0 */
+	vga_wcrt (cinfo->regbase, VGA_CRTC_CURSOR_HI, 0x00);	/* text cursor location high: 0 */
+	vga_wcrt (cinfo->regbase, VGA_CRTC_CURSOR_LO, 0x00);	/* text cursor location low: 0 */
+
+	vga_wcrt (cinfo->regbase, VGA_CRTC_UNDERLINE, 0x00);	/* Underline Row scanline: - */
+	vga_wcrt (cinfo->regbase, VGA_CRTC_MODE, 0xc3);	/* mode control: timing enable, byte mode, no compat modes */
+	vga_wcrt (cinfo->regbase, VGA_CRTC_LINE_COMPARE, 0x00);	/* Line Compare: not needed */
 	/* ### add 0x40 for text modes with > 30 MHz pixclock */
-	vga_wcrt (fb_info->regs, CL_CRT1B, 0x02);	/* ext. display controls: ext.adr. wrap */
+	vga_wcrt (cinfo->regbase, CL_CRT1B, 0x02);	/* ext. display controls: ext.adr. wrap */
 
-	vga_wgfx (fb_info->regs, VGA_GFX_SR_VALUE, 0x00);	/* Set/Reset registes: - */
-	vga_wgfx (fb_info->regs, VGA_GFX_SR_ENABLE, 0x00);	/* Set/Reset enable: - */
-	vga_wgfx (fb_info->regs, VGA_GFX_COMPARE_VALUE, 0x00);	/* Color Compare: - */
-	vga_wgfx (fb_info->regs, VGA_GFX_DATA_ROTATE, 0x00);	/* Data Rotate: - */
-	vga_wgfx (fb_info->regs, VGA_GFX_PLANE_READ, 0x00);	/* Read Map Select: - */
-	vga_wgfx (fb_info->regs, VGA_GFX_MODE, 0x00);	/* Mode: conf. for 16/4/2 color mode, no odd/even, read/write mode 0 */
-	vga_wgfx (fb_info->regs, VGA_GFX_MISC, 0x01);	/* Miscellaneous: memory map base address, graphics mode */
-	vga_wgfx (fb_info->regs, VGA_GFX_COMPARE_MASK, 0x0f);	/* Color Don't care: involve all planes */
-	vga_wgfx (fb_info->regs, VGA_GFX_BIT_MASK, 0xff);	/* Bit Mask: no mask at all */
-	if (fb_info->btype == BT_ALPINE)
-		vga_wgfx (fb_info->regs, CL_GRB, 0x20);	/* (5434 can't have bit 3 set for bitblt) */
+	vga_wgfx (cinfo->regbase, VGA_GFX_SR_VALUE, 0x00);	/* Set/Reset registes: - */
+	vga_wgfx (cinfo->regbase, VGA_GFX_SR_ENABLE, 0x00);	/* Set/Reset enable: - */
+	vga_wgfx (cinfo->regbase, VGA_GFX_COMPARE_VALUE, 0x00);	/* Color Compare: - */
+	vga_wgfx (cinfo->regbase, VGA_GFX_DATA_ROTATE, 0x00);	/* Data Rotate: - */
+	vga_wgfx (cinfo->regbase, VGA_GFX_PLANE_READ, 0x00);	/* Read Map Select: - */
+	vga_wgfx (cinfo->regbase, VGA_GFX_MODE, 0x00);	/* Mode: conf. for 16/4/2 color mode, no odd/even, read/write mode 0 */
+	vga_wgfx (cinfo->regbase, VGA_GFX_MISC, 0x01);	/* Miscellaneous: memory map base address, graphics mode */
+	vga_wgfx (cinfo->regbase, VGA_GFX_COMPARE_MASK, 0x0f);	/* Color Don't care: involve all planes */
+	vga_wgfx (cinfo->regbase, VGA_GFX_BIT_MASK, 0xff);	/* Bit Mask: no mask at all */
+	if (cinfo->btype == BT_ALPINE)
+		vga_wgfx (cinfo->regbase, CL_GRB, 0x20);	/* (5434 can't have bit 3 set for bitblt) */
 	else
-		vga_wgfx (fb_info->regs, CL_GRB, 0x28);	/* Graphics controller mode extensions: finer granularity, 8byte data latches */
+		vga_wgfx (cinfo->regbase, CL_GRB, 0x28);	/* Graphics controller mode extensions: finer granularity, 8byte data latches */
 
-	vga_wgfx (fb_info->regs, CL_GRC, 0xff);	/* Color Key compare: - */
-	vga_wgfx (fb_info->regs, CL_GRD, 0x00);	/* Color Key compare mask: - */
-	vga_wgfx (fb_info->regs, CL_GRE, 0x00);	/* Miscellaneous control: - */
-	/*  vga_wgfx (fb_info->regs, CL_GR10, 0x00); *//* Background color byte 1: - */
-/*  vga_wgfx (fb_info->regs, CL_GR11, 0x00); */
-
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE0, 0x00);	/* Attribute Controller palette registers: "identity mapping" */
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE1, 0x01);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE2, 0x02);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE3, 0x03);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE4, 0x04);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE5, 0x05);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE6, 0x06);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE7, 0x07);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE8, 0x08);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTE9, 0x09);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTEA, 0x0a);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTEB, 0x0b);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTEC, 0x0c);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTED, 0x0d);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTEE, 0x0e);
-	vga_wattr (fb_info->regs, VGA_ATC_PALETTEF, 0x0f);
-
-	vga_wattr (fb_info->regs, VGA_ATC_MODE, 0x01);	/* Attribute Controller mode: graphics mode */
-	vga_wattr (fb_info->regs, VGA_ATC_OVERSCAN, 0x00);	/* Overscan color reg.: reg. 0 */
-	vga_wattr (fb_info->regs, VGA_ATC_PLANE_ENABLE, 0x0f);	/* Color Plane enable: Enable all 4 planes */
-/* ###  vga_wattr (fb_info->regs, CL_AR33, 0x00); * Pixel Panning: - */
-	vga_wattr (fb_info->regs, VGA_ATC_COLOR_PAGE, 0x00);	/* Color Select: - */
-
-	WGen (fb_info, VGA_PEL_MSK, 0xff);	/* Pixel mask: no mask */
-
-	if (fb_info->btype != BT_ALPINE && fb_info->btype != BT_GD5480)
-		WGen (fb_info, VGA_MIS_W, 0xc3);	/* polarity (-/-), enable display mem, VGA_CRTC_START_HI i/o base = color */
-
-	vga_wgfx (fb_info->regs, CL_GR31, 0x04);	/* BLT Start/status: Blitter reset */
-	vga_wgfx (fb_info->regs, CL_GR31, 0x00);	/* - " -           : "end-of-reset" */
-
-	/* CLUT setup */
-	WClut (fb_info, 0, 0x00, 0x00, 0x00);	/* background: black */
-	WClut (fb_info, 1, 0x3f, 0x3f, 0x3f);	/* foreground: white */
-	WClut (fb_info, 2, 0x00, 0x20, 0x00);
-	WClut (fb_info, 3, 0x00, 0x20, 0x20);
-	WClut (fb_info, 4, 0x20, 0x00, 0x00);
-	WClut (fb_info, 5, 0x20, 0x00, 0x20);
-	WClut (fb_info, 6, 0x20, 0x10, 0x00);
-	WClut (fb_info, 7, 0x20, 0x20, 0x20);
-	WClut (fb_info, 8, 0x10, 0x10, 0x10);
-	WClut (fb_info, 9, 0x10, 0x10, 0x30);
-	WClut (fb_info, 10, 0x10, 0x30, 0x10);
-	WClut (fb_info, 11, 0x10, 0x30, 0x30);
-	WClut (fb_info, 12, 0x30, 0x10, 0x10);
-	WClut (fb_info, 13, 0x30, 0x10, 0x30);
-	WClut (fb_info, 14, 0x30, 0x30, 0x10);
-	WClut (fb_info, 15, 0x30, 0x30, 0x30);
-
-	/* the rest a grey ramp */
-	{
-		int i;
+	vga_wgfx (cinfo->regbase, CL_GRC, 0xff);	/* Color Key compare: - */
+	vga_wgfx (cinfo->regbase, CL_GRD, 0x00);	/* Color Key compare mask: - */
+	vga_wgfx (cinfo->regbase, CL_GRE, 0x00);	/* Miscellaneous control: - */
+	/*  vga_wgfx (cinfo->regbase, CL_GR10, 0x00); *//* Background color byte 1: - */
+/*  vga_wgfx (cinfo->regbase, CL_GR11, 0x00); */
+
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE0, 0x00);	/* Attribute Controller palette registers: "identity mapping" */
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE1, 0x01);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE2, 0x02);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE3, 0x03);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE4, 0x04);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE5, 0x05);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE6, 0x06);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE7, 0x07);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE8, 0x08);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTE9, 0x09);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTEA, 0x0a);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTEB, 0x0b);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTEC, 0x0c);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTED, 0x0d);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTEE, 0x0e);
+	vga_wattr (cinfo->regbase, VGA_ATC_PALETTEF, 0x0f);
+
+	vga_wattr (cinfo->regbase, VGA_ATC_MODE, 0x01);	/* Attribute Controller mode: graphics mode */
+	vga_wattr (cinfo->regbase, VGA_ATC_OVERSCAN, 0x00);	/* Overscan color reg.: reg. 0 */
+	vga_wattr (cinfo->regbase, VGA_ATC_PLANE_ENABLE, 0x0f);	/* Color Plane enable: Enable all 4 planes */
+/* ###  vga_wattr (cinfo->regbase, CL_AR33, 0x00); * Pixel Panning: - */
+	vga_wattr (cinfo->regbase, VGA_ATC_COLOR_PAGE, 0x00);	/* Color Select: - */
 
-		for (i = 16; i < 256; i++)
-			WClut (fb_info, i, i >> 2, i >> 2, i >> 2);
-	}
+	WGen (cinfo, VGA_PEL_MSK, 0xff);	/* Pixel mask: no mask */
 
+	if (cinfo->btype != BT_ALPINE && cinfo->btype != BT_GD5480)
+		WGen (cinfo, VGA_MIS_W, 0xc3);	/* polarity (-/-), enable display mem, VGA_CRTC_START_HI i/o base = color */
+
+	vga_wgfx (cinfo->regbase, CL_GR31, 0x04);	/* BLT Start/status: Blitter reset */
+	vga_wgfx (cinfo->regbase, CL_GR31, 0x00);	/* - " -           : "end-of-reset" */
 
 	/* misc... */
-	WHDR (fb_info, 0);	/* Hidden DAC register: - */
+	WHDR (cinfo, 0);	/* Hidden DAC register: - */
 
-	printk (KERN_INFO "clgen: This board has %ld bytes of DRAM memory\n", fb_info->size);
+	printk (KERN_DEBUG "cirrusfb: This board has %ld bytes of DRAM memory\n", cinfo->size);
 	DPRINTK ("EXIT\n");
 	return;
 }
 
-static void switch_monitor (struct clgenfb_info *fb_info, int on)
+static void switch_monitor (struct cirrusfb_info *cinfo, int on)
 {
 #ifdef CONFIG_ZORRO /* only works on Zorro boards */
 	static int IsOn = 0;	/* XXX not ok for multiple boards */
 
 	DPRINTK ("ENTER\n");
 
-	if (fb_info->btype == BT_PICASSO4)
+	if (cinfo->btype == BT_PICASSO4)
 		return;		/* nothing to switch */
-	if (fb_info->btype == BT_ALPINE)
+	if (cinfo->btype == BT_ALPINE)
 		return;		/* nothing to switch */
-	if (fb_info->btype == BT_GD5480)
+	if (cinfo->btype == BT_GD5480)
 		return;		/* nothing to switch */
-	if (fb_info->btype == BT_PICASSO) {
+	if (cinfo->btype == BT_PICASSO) {
 		if ((on && !IsOn) || (!on && IsOn))
-			WSFR (fb_info, 0xff);
+			WSFR (cinfo, 0xff);
 
 		DPRINTK ("EXIT\n");
 		return;
 	}
 	if (on) {
-		switch (fb_info->btype) {
+		switch (cinfo->btype) {
 		case BT_SD64:
-			WSFR (fb_info, fb_info->SFR | 0x21);
+			WSFR (cinfo, cinfo->SFR | 0x21);
 			break;
 		case BT_PICCOLO:
-			WSFR (fb_info, fb_info->SFR | 0x28);
+			WSFR (cinfo, cinfo->SFR | 0x28);
 			break;
 		case BT_SPECTRUM:
-			WSFR (fb_info, 0x6f);
+			WSFR (cinfo, 0x6f);
 			break;
 		default: /* do nothing */ break;
 		}
 	} else {
-		switch (fb_info->btype) {
+		switch (cinfo->btype) {
 		case BT_SD64:
-			WSFR (fb_info, fb_info->SFR & 0xde);
+			WSFR (cinfo, cinfo->SFR & 0xde);
 			break;
 		case BT_PICCOLO:
-			WSFR (fb_info, fb_info->SFR & 0xd7);
+			WSFR (cinfo, cinfo->SFR & 0xd7);
 			break;
 		case BT_SPECTRUM:
-			WSFR (fb_info, 0x4f);
+			WSFR (cinfo, 0x4f);
 			break;
 		default: /* do nothing */ break;
 		}
@@ -2167,238 +1941,130 @@
 #endif /* CONFIG_ZORRO */
 }
 
-static void clgen_set_disp (const void *par, struct display *disp,
-			    struct fb_info_gen *info)
-{
-	struct clgenfb_par *_par = (struct clgenfb_par *) par;
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) info;
-	int accel_text;
-
-	DPRINTK ("ENTER\n");
-
-	assert (_par != NULL);
-	assert (fb_info != NULL);
-
-	accel_text = _par->var.accel_flags & FB_ACCELF_TEXT;
 
-	printk ("Cirrus Logic video mode: ");
-	info->info.screen_base = (char *) fb_info->fbmem;
-	switch (_par->var.bits_per_pixel) {
-#ifdef FBCON_HAS_MFB
-	case 1:
-		printk ("monochrome\n");
-		if (fb_info->btype == BT_GD5480)
-			info->info.screen_base = (char *) fb_info->fbmem;
-		disp->dispsw = &fbcon_mfb;
-		break;
-#endif
-#ifdef FBCON_HAS_CFB8
-	case 8:
-		printk ("8 bit color depth\n");
-		if (fb_info->btype == BT_GD5480)
-			info->info.screen_base = (char *) fb_info->fbmem;
-		if (accel_text)
-			disp->dispsw = &fbcon_clgen_8;
-		else
-			disp->dispsw = &fbcon_cfb8;
-		break;
-#endif
-#ifdef FBCON_HAS_CFB16
-	case 16:
-		printk ("16 bit color depth\n");
-		if (accel_text)
-			disp->dispsw = &fbcon_clgen_16;
-		else
-			disp->dispsw = &fbcon_cfb16;
-		if (fb_info->btype == BT_GD5480)
-			info->info.screen_base = (char *) fb_info->fbmem + 1 * MB_;
-		disp->dispsw_data = fb_info->fbcon_cmap.cfb16;
-		break;
-#endif
-#ifdef FBCON_HAS_CFB24
-	case 24:
-		printk ("24 bit color depth\n");
-		disp->dispsw = &fbcon_cfb24;
-		if (fb_info->btype == BT_GD5480)
-			info->info.screen_base = (char *) fb_info->fbmem + 2 * MB_;
-		disp->dispsw_data = fb_info->fbcon_cmap.cfb24;
-		break;
-#endif
-#ifdef FBCON_HAS_CFB32
-	case 32:
-		printk ("32 bit color depth\n");
-		if (accel_text)
-			disp->dispsw = &fbcon_clgen_32;
-		else
-			disp->dispsw = &fbcon_cfb32;
-		if (fb_info->btype == BT_GD5480)
-			info->info.screen_base = (char *) fb_info->fbmem + 2 * MB_;
-		disp->dispsw_data = fb_info->fbcon_cmap.cfb32;
-		break;
-#endif
-
-	default:
-		printk ("unsupported color depth\n");
-		disp->dispsw = &fbcon_dummy;
-		disp->dispsw_data = NULL;
-		break;
+/******************************************/
+/* Linux 2.6-style  accelerated functions */
+/******************************************/
+
+static void cirrusfb_prim_fillrect(struct cirrusfb_info *cinfo,
+				   const struct fb_fillrect *region)
+{
+	int m; /* bytes per pixel */
+	if(cinfo->info->var.bits_per_pixel == 1) {
+		cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel,
+				  region->dx / 8, region->dy,
+				  region->width / 8, region->height,
+				  region->color,
+				  cinfo->currentmode.line_length);
+	} else {
+		m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8;
+		cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel,
+				  region->dx * m, region->dy,
+				  region->width * m, region->height,
+				  region->color,
+				  cinfo->currentmode.line_length);
 	}
-
-	DPRINTK ("EXIT\n");
+	return;
 }
 
-#ifdef FBCON_HAS_CFB8
-static void fbcon_clgen8_bmove (struct display *p, int sy, int sx,
-				int dy, int dx, int height, int width)
+void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region)
 {
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) p->fb_info;
-
-	DPRINTK ("ENTER\n");
+	struct cirrusfb_info *cinfo = info->par;
+	struct fb_fillrect modded;
+	int vxres, vyres;
 
-	sx *= fontwidth (p);
-	sy *= fontheight (p);
-	dx *= fontwidth (p);
-	dy *= fontheight (p);
-	width *= fontwidth (p);
-	height *= fontheight (p);
-
-	clgen_BitBLT (fb_info->regs, (unsigned short) sx, (unsigned short) sy,
-		      (unsigned short) dx, (unsigned short) dy,
-		      (unsigned short) width, (unsigned short) height,
-		      fb_info->currentmode.line_length);
+	if (info->state != FBINFO_STATE_RUNNING)
+		return;
+	if (info->flags & FBINFO_HWACCEL_DISABLED) {
+		cfb_fillrect(info, region);
+		return;
+	}
 
-	DPRINTK ("EXIT\n");
-}
+	vxres = info->var.xres_virtual;
+	vyres = info->var.yres_virtual;
 
-static void fbcon_clgen8_clear (struct vc_data *conp, struct display *p,
-				int sy, int sx, int height, int width)
-{
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) p->fb_info;
-	unsigned short col;
+	memcpy(&modded, region, sizeof(struct fb_fillrect));
 
-	DPRINTK ("ENTER\n");
+	if(!modded.width || !modded.height ||
+	   modded.dx >= vxres || modded.dy >= vyres)
+		return;
 
-	sx *= fontwidth (p);
-	sy *= fontheight (p);
-	width *= fontwidth (p);
-	height *= fontheight (p);
-
-	col = attr_bgcol_ec (p, conp);
-	col &= 0xff;
-
-	clgen_RectFill (fb_info, (unsigned short) sx, (unsigned short) sy,
-			(unsigned short) width, (unsigned short) height,
-			col, fb_info->currentmode.line_length);
+	if(modded.dx + modded.width  > vxres) modded.width  = vxres - modded.dx;
+	if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy;
 
-	DPRINTK ("EXIT\n");
+	cirrusfb_prim_fillrect(cinfo, &modded);
 }
 
-#endif
-
-#ifdef FBCON_HAS_CFB16
-static void fbcon_clgen16_bmove (struct display *p, int sy, int sx,
-				 int dy, int dx, int height, int width)
+static void cirrusfb_prim_copyarea(struct cirrusfb_info *cinfo,
+				   const struct fb_copyarea *area)
 {
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) p->fb_info;
-
-	DPRINTK ("ENTER\n");
-
-	sx *= fontwidth (p) * 2;	/* 2 bytes/pixel */
-	sy *= fontheight (p);
-	dx *= fontwidth (p) * 2;	/* 2 bytes/pixel */
-	dy *= fontheight (p);
-	width *= fontwidth (p) * 2;	/* 2 bytes/pixel */
-	height *= fontheight (p);
-
-	clgen_BitBLT (fb_info->regs, (unsigned short) sx, (unsigned short) sy,
-		      (unsigned short) dx, (unsigned short) dy,
-		      (unsigned short) width, (unsigned short) height,
-		      fb_info->currentmode.line_length);
-
-	DPRINTK ("EXIT\n");
+	int m; /* bytes per pixel */
+	if(cinfo->info->var.bits_per_pixel == 1) {
+		cirrusfb_BitBLT(cinfo->regbase, cinfo->info->var.bits_per_pixel,
+				area->sx / 8, area->sy,
+				area->dx / 8, area->dy,
+				area->width / 8, area->height,
+				cinfo->currentmode.line_length);
+	} else {
+		m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8;
+		cirrusfb_BitBLT(cinfo->regbase, cinfo->info->var.bits_per_pixel,
+				area->sx * m, area->sy,
+				area->dx * m, area->dy,
+				area->width * m, area->height,
+				cinfo->currentmode.line_length);
+	}
+	return;
 }
 
-static void fbcon_clgen16_clear (struct vc_data *conp, struct display *p,
-				 int sy, int sx, int height, int width)
-{
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) p->fb_info;
-	unsigned short col;
-
-	DPRINTK ("ENTER\n");
-
-	sx *= fontwidth (p) * 2;	/* 2 bytes/pixel */
-	sy *= fontheight (p);
-	width *= fontwidth (p) * 2;	/* 2 bytes/pixel? */
-	height *= fontheight (p);
-
-	col = attr_bgcol_ec (p, conp);
-	col &= 0xff;
-
-	clgen_RectFill (fb_info, (unsigned short) sx, (unsigned short) sy,
-			(unsigned short) width, (unsigned short) height,
-			col, fb_info->currentmode.line_length);
 
-	DPRINTK ("EXIT\n");
-}
+void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
+{
+	struct cirrusfb_info *cinfo = info->par;
+	struct fb_copyarea modded;
+	u32 vxres, vyres;
+	modded.sx = area->sx;
+	modded.sy = area->sy;
+	modded.dx = area->dx;
+	modded.dy = area->dy;
+	modded.width  = area->width;
+	modded.height = area->height;
 
-#endif
+	if (info->state != FBINFO_STATE_RUNNING)
+		return;
+	if (info->flags & FBINFO_HWACCEL_DISABLED) {
+		cfb_copyarea(info, area);
+		return;
+	}
 
-#ifdef FBCON_HAS_CFB32
-static void fbcon_clgen32_bmove (struct display *p, int sy, int sx,
-				 int dy, int dx, int height, int width)
-{
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) p->fb_info;
+	vxres = info->var.xres_virtual;
+	vyres = info->var.yres_virtual;
 
-	DPRINTK ("ENTER\n");
+	if(!modded.width || !modded.height ||
+	   modded.sx >= vxres || modded.sy >= vyres ||
+	   modded.dx >= vxres || modded.dy >= vyres)
+		return;
 
-	sx *= fontwidth (p) * 4;	/* 4 bytes/pixel */
-	sy *= fontheight (p);
-	dx *= fontwidth (p) * 4;	/* 4 bytes/pixel */
-	dy *= fontheight (p);
-	width *= fontwidth (p) * 4;	/* 4 bytes/pixel */
-	height *= fontheight (p);
-
-	clgen_BitBLT (fb_info->regs, (unsigned short) sx, (unsigned short) sy,
-		      (unsigned short) dx, (unsigned short) dy,
-		      (unsigned short) width, (unsigned short) height,
-		      fb_info->currentmode.line_length);
+	if(modded.sx + modded.width > vxres)  modded.width = vxres - modded.sx;
+	if(modded.dx + modded.width > vxres)  modded.width = vxres - modded.dx;
+	if(modded.sy + modded.height > vyres) modded.height = vyres - modded.sy;
+	if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy;
 
-	DPRINTK ("EXIT\n");
+	cirrusfb_prim_copyarea(cinfo, &modded);
 }
 
-static void fbcon_clgen32_clear (struct vc_data *conp, struct display *p,
-				 int sy, int sx, int height, int width)
+void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image)
 {
-	struct clgenfb_info *fb_info = (struct clgenfb_info *) p->fb_info;
-
-	unsigned short col;
-
-	DPRINTK ("ENTER\n");
-
-	sx *= fontwidth (p) * 4;	/* 4 bytes/pixel */
-	sy *= fontheight (p);
-	width *= fontwidth (p) * 4;	/* 4 bytes/pixel? */
-	height *= fontheight (p);
-
-	col = attr_bgcol_ec (p, conp);
-	col &= 0xff;
-
-	clgen_RectFill (fb_info, (unsigned short) sx, (unsigned short) sy,
-			(unsigned short) width, (unsigned short) height,
-			col, fb_info->currentmode.line_length);
+	struct cirrusfb_info *cinfo = info->par;
 
-	DPRINTK ("EXIT\n");
+        cirrusfb_WaitBLT(cinfo->regbase);
+	cfb_imageblit(info, image);
 }
 
-#endif				/* FBCON_HAS_CFB32 */
-
-
-
 
 #ifdef CONFIG_PPC_PREP
 #define PREP_VIDEO_BASE ((volatile unsigned long) 0xC0000000)
 #define PREP_IO_BASE    ((volatile unsigned char *) 0x80000000)
-static void __init get_prep_addrs (unsigned long *display, unsigned long *registers)
+static void get_prep_addrs (unsigned long *display, unsigned long *registers)
 {
 	DPRINTK ("ENTER\n");
 
@@ -2411,8 +2077,6 @@
 #endif				/* CONFIG_PPC_PREP */
 
 
-
-
 #ifdef CONFIG_PCI
 static int release_io_ports = 0;
 
@@ -2420,7 +2084,7 @@
  * based on the DRAM bandwidth bit and DRAM bank switching bit.  This
  * works with 1MB, 2MB and 4MB configurations (which the Motorola boards
  * seem to have. */
-static unsigned int __init clgen_get_memsize (caddr_t regbase)
+static unsigned int cirrusfb_get_memsize (caddr_t regbase)
 {
 	unsigned long mem;
 	unsigned char SRF;
@@ -2443,40 +2107,14 @@
 		mem *= 2;
 	}
 	/* TODO: Handling of GD5446/5480 (see XF86 sources ...) */
-	return mem;
 
 	DPRINTK ("EXIT\n");
+	return mem;
 }
 
 
 
-static struct pci_dev * __init clgen_pci_dev_get (clgen_board_t *btype)
-{
-	struct pci_dev *pdev;
-	int i;
-
-	DPRINTK ("ENTER\n");
-
-	for (i = 0; i < ARRAY_SIZE(clgen_pci_probe_list); i++) {
-		pdev = NULL;
-		while ((pdev = pci_find_device (PCI_VENDOR_ID_CIRRUS,
-				clgen_pci_probe_list[i].device, pdev)) != NULL) {
-			if (pci_enable_device(pdev) == 0) {
-				*btype = clgen_pci_probe_list[i].btype;
-				DPRINTK ("EXIT, returning pdev=%p\n", pdev);
-				return pdev;
-			}
-		}
-	}
-
-	DPRINTK ("EXIT, returning NULL\n");
-	return NULL;
-}
-
-
-
-
-static void __init get_pci_addrs (const struct pci_dev *pdev,
+static void get_pci_addrs (const struct pci_dev *pdev,
 			   unsigned long *display, unsigned long *registers)
 {
 	assert (pdev != NULL);
@@ -2504,93 +2142,117 @@
 }
 
 
-static void __exit clgen_pci_unmap (struct clgenfb_info *info)
+static void __devexit cirrusfb_pci_unmap (struct cirrusfb_info *cinfo)
 {
-	iounmap (info->fbmem);
-	release_mem_region(info->fbmem_phys, info->size);
+	struct pci_dev *pdev = cinfo->pdev;
 
+	iounmap(cinfo->fbmem);
 #if 0 /* if system didn't claim this region, we would... */
 	release_mem_region(0xA0000, 65535);
 #endif
-
 	if (release_io_ports)
 		release_region(0x3C0, 32);
+	pci_release_regions(pdev);
+	framebuffer_release(cinfo->info);
+	pci_disable_device(pdev);
 }
 
 
-static int __init clgen_pci_setup (struct clgenfb_info *info,
-				   clgen_board_t *btype)
+static struct cirrusfb_info *cirrusfb_pci_setup (struct pci_dev *pdev,
+				   		 const struct pci_device_id *ent)
 {
-	struct pci_dev *pdev;
+	struct cirrusfb_info *cinfo;
+	struct fb_info *info;
+	cirrusfb_board_t btype;
 	unsigned long board_addr, board_size;
+	int ret;
 
-	DPRINTK ("ENTER\n");
+	ret = pci_enable_device(pdev);
+	if (ret < 0) {
+		printk(KERN_ERR "cirrusfb: Cannot enable PCI device\n");
+		goto err_out;
+	}
 
-	pdev = clgen_pci_dev_get (btype);
-	if (!pdev) {
-		printk (KERN_INFO "cirrusfb: couldn't find Cirrus Logic PCI device\n");
-		DPRINTK ("EXIT, returning 1\n");
-		return 1;
+	info = framebuffer_alloc(sizeof(struct cirrusfb_info), &pdev->dev);
+	if (!info) {
+		printk(KERN_ERR "cirrusfb: could not allocate memory\n");
+		ret = -ENOMEM;
+		goto err_disable;
 	}
+
+	cinfo = info->par;
+	cinfo->info = info;
+	cinfo->pdev = pdev;
+	cinfo->btype = btype = (cirrusfb_board_t) ent->driver_data;
+
 	DPRINTK (" Found PCI device, base address 0 is 0x%lx, btype set to %d\n",
-		 pdev->resource[0].start, *btype);
+		pdev->resource[0].start, btype);
 	DPRINTK (" base address 1 is 0x%lx\n", pdev->resource[1].start);
 
-	info->pdev = pdev;
-
 	if(isPReP) {
-		/* Xbh does this, though 0 seems to be the init value */
-		pcibios_write_config_dword (0, pdev->devfn, PCI_BASE_ADDRESS_0,
-			0x00000000);
-
+		pci_write_config_dword (pdev, PCI_BASE_ADDRESS_0, 0x00000000);
 #ifdef CONFIG_PPC_PREP
-		get_prep_addrs (&board_addr, &info->fbregs_phys);
+		get_prep_addrs (&board_addr, &cinfo->fbregs_phys);
 #endif
+		/* PReP dies if we ioremap the IO registers, but it works w/out... */
+		cinfo->regbase = (char *) cinfo->fbregs_phys;
 	} else {
 		DPRINTK ("Attempt to get PCI info for Cirrus Graphics Card\n");
-		get_pci_addrs (pdev, &board_addr, &info->fbregs_phys);
+		get_pci_addrs (pdev, &board_addr, &cinfo->fbregs_phys);
+		cinfo->regbase = 0;		/* FIXME: this forces VGA.  alternatives? */
 	}
 
-	DPRINTK ("Board address: 0x%lx, register address: 0x%lx\n", board_addr, info->fbregs_phys);
-
-	if(isPReP) {
-		/* PReP dies if we ioremap the IO registers, but it works w/out... */
-		info->regs = (char *) info->fbregs_phys;
-	} else
-		info->regs = 0;		/* FIXME: this forces VGA.  alternatives? */
+	DPRINTK ("Board address: 0x%lx, register address: 0x%lx\n", board_addr, cinfo->fbregs_phys);
 
-	if (*btype == BT_GD5480) {
-		board_size = 32 * MB_;
-	} else {
-		board_size = clgen_get_memsize (info->regs);
-	}
+	board_size = (btype == BT_GD5480) ?
+		32 * MB_ : cirrusfb_get_memsize (cinfo->regbase);
 
-	if (!request_mem_region(board_addr, board_size, "clgenfb")) {
-		printk(KERN_ERR "clgen: cannot reserve region 0x%lx, abort\n",
+	ret = pci_request_regions(pdev, "cirrusfb");
+	if (ret <0) {
+		printk(KERN_ERR "cirrusfb: cannot reserve region 0x%lx, abort\n",
 		       board_addr);
-		return -1;
+		goto err_release_fb;
 	}
 #if 0 /* if the system didn't claim this region, we would... */
-	if (!request_mem_region(0xA0000, 65535, "clgenfb")) {
-		printk(KERN_ERR "clgen: cannot reserve region 0x%lx, abort\n",
+	if (!request_mem_region(0xA0000, 65535, "cirrusfb")) {
+		printk(KERN_ERR "cirrusfb: cannot reserve region 0x%lx, abort\n"
+,
 		       0xA0000L);
-		release_mem_region(board_addr, board_size);
-		return -1;
+		ret = -EBUSY;
+		goto err_release_regions;
 	}
 #endif
-	if (request_region(0x3C0, 32, "clgenfb"))
+	if (request_region(0x3C0, 32, "cirrusfb"))
 		release_io_ports = 1;
 
-	info->fbmem = ioremap (board_addr, board_size);
-	info->fbmem_phys = board_addr;
-	info->size = board_size;
+	cinfo->fbmem = ioremap(board_addr, board_size);
+	if (!cinfo->fbmem) {
+		ret = -EIO;
+		goto err_release_legacy;
+	}
 
-	printk (" RAM (%lu kB) at 0x%lx, ", info->size / KB_, board_addr);
+	cinfo->fbmem_phys = board_addr;
+	cinfo->size = board_size;
 
+	printk (" RAM (%lu kB) at 0xx%lx, ", cinfo->size / KB_, board_addr);
 	printk ("Cirrus Logic chipset on PCI bus\n");
 
-	DPRINTK ("EXIT, returning 0\n");
-	return 0;
+	return cinfo;
+
+err_release_legacy:
+	if (release_io_ports)
+		release_region(0x3C0, 32);
+#if 0
+	release_mem_region(0xA0000, 65535);
+err_release_regions:
+#endif
+	pci_release_regions(pdev);
+err_release_fb:
+	framebuffer_release(info);
+err_disable:
+	pci_disable_device(pdev);
+err_out:
+	return ERR_PTR(ret);
 }
 #endif				/* CONFIG_PCI */
 
@@ -2598,9 +2260,9 @@
 
 
 #ifdef CONFIG_ZORRO
-static int __init clgen_zorro_find (struct zorro_dev **z_o,
+static int cirrusfb_zorro_find (struct zorro_dev **z_o,
 				    struct zorro_dev **z2_o,
-				    clgen_board_t *btype, unsigned long *size)
+				    cirrusfb_board_t *btype, unsigned long *size)
 {
 	struct zorro_dev *z = NULL;
 	int i;
@@ -2608,251 +2270,319 @@
 	assert (z_o != NULL);
 	assert (btype != NULL);
 
-	for (i = 0; i < ARRAY_SIZE(clgen_zorro_probe_list); i++)
-		if ((z = zorro_find_device(clgen_zorro_probe_list[i].id, NULL)))
+	for (i = 0; i < ARRAY_SIZE(cirrusfb_zorro_probe_list); i++)
+		if ((z = zorro_find_device(cirrusfb_zorro_probe_list[i].id, NULL)))
 			break;
 
 	if (z) {
 		*z_o = z;
-		if (clgen_zorro_probe_list[i].id2)
-			*z2_o = zorro_find_device(clgen_zorro_probe_list[i].id2, NULL);
+		if (cirrusfb_zorro_probe_list[i].id2)
+			*z2_o = zorro_find_device(cirrusfb_zorro_probe_list[i].id2, NULL);
 		else
 			*z2_o = NULL;
 
-		*btype = clgen_zorro_probe_list[i].btype;
-		*size = clgen_zorro_probe_list[i].size;
+		*btype = cirrusfb_zorro_probe_list[i].btype;
+		*size = cirrusfb_zorro_probe_list[i].size;
 
-		printk (KERN_INFO "clgen: %s board detected; ",
-			clgen_board_info[*btype].name);
+		printk (KERN_INFO "cirrusfb: %s board detected; ",
+			cirrusfb_board_info[*btype].name);
 
 		return 0;
 	}
 
-	printk (KERN_NOTICE "clgen: no supported board found.\n");
-	return -1;
+	printk (KERN_NOTICE "cirrusfb: no supported board found.\n");
+	return -ENODEV;
 }
 
 
-static void __exit clgen_zorro_unmap (struct clgenfb_info *info)
+static void __devexit cirrusfb_zorro_unmap (struct cirrusfb_info *cinfo)
 {
-	release_mem_region(info->board_addr, info->board_size);
+	release_mem_region(cinfo->board_addr, cinfo->board_size);
 
-	if (info->btype == BT_PICASSO4) {
-		iounmap ((void *)info->board_addr);
-		iounmap ((void *)info->fbmem_phys);
+	if (cinfo->btype == BT_PICASSO4) {
+		cinfo->regbase -= 0x600000;
+		iounmap ((void *)cinfo->regbase);
+		iounmap ((void *)cinfo->fbmem);
 	} else {
-		if (info->board_addr > 0x01000000)
-			iounmap ((void *)info->board_addr);
+		if (cinfo->board_addr > 0x01000000)
+			iounmap ((void *)cinfo->fbmem);
 	}
+	framebuffer_release(cinfo->info);
 }
 
 
-static int __init clgen_zorro_setup (struct clgenfb_info *info,
-				     clgen_board_t *btype)
+static struct cirrusfb_info *cirrusfb_zorro_setup(void)
 {
+	struct cirrusfb_info *cinfo;
+	struct fb_info *info;
+	cirrusfb_board_t btype;
 	struct zorro_dev *z = NULL, *z2 = NULL;
 	unsigned long board_addr, board_size, size;
+	int ret;
 
-	assert (info != NULL);
-	assert (btype != NULL);
-
-	if (clgen_zorro_find (&z, &z2, btype, &size))
-		return -1;
+	ret = cirrusfb_zorro_find (&z, &z2, &btype, &size);
+	if (ret < 0)
+		goto err_out;
+
+	info = framebuffer_alloc(sizeof(struct cirrusfb_info), &z->dev);
+	if (!info) {
+		printk (KERN_ERR "cirrusfb: could not allocate memory\n");
+		ret = -ENOMEM;
+		goto err_out;
+	}
+
+	cinfo = info->par;
+	cinfo->info = info;
+	cinfo->btype = btype;
 
 	assert (z > 0);
 	assert (z2 >= 0);
-	assert (*btype != BT_NONE);
+	assert (btype != BT_NONE);
 
-	info->board_addr = board_addr = z->resource.start;
-	info->board_size = board_size = z->resource.end-z->resource.start+1;
-	info->size = size;
+	cinfo->board_addr = board_addr = z->resource.start;
+	cinfo->board_size = board_size = z->resource.end-z->resource.start+1;
+	cinfo->size = size;
 
-	if (!request_mem_region(board_addr, board_size, "clgenfb")) {
-		printk(KERN_ERR "clgen: cannot reserve region 0x%lx, abort\n",
+	if (!request_mem_region(board_addr, board_size, "cirrusfb")) {
+		printk(KERN_ERR "cirrusfb: cannot reserve region 0x%lx, abort\n",
 		       board_addr);
-		return -1;
+		ret = -EBUSY;
+		goto err_release_fb;
 	}
 
 	printk (" RAM (%lu MB) at $%lx, ", board_size / MB_, board_addr);
 
-	if (*btype == BT_PICASSO4) {
+	ret = -EIO;
+
+	if (btype == BT_PICASSO4) {
 		printk (" REG at $%lx\n", board_addr + 0x600000);
 
 		/* To be precise, for the P4 this is not the */
 		/* begin of the board, but the begin of RAM. */
 		/* for P4, map in its address space in 2 chunks (### TEST! ) */
 		/* (note the ugly hardcoded 16M number) */
-		info->regs = ioremap (board_addr, 16777216);
-		DPRINTK ("clgen: Virtual address for board set to: $%p\n", info->regs);
-		info->regs += 0x600000;
-		info->fbregs_phys = board_addr + 0x600000;
-
-		info->fbmem_phys = board_addr + 16777216;
-		info->fbmem = ioremap (info->fbmem_phys, 16777216);
+		cinfo->regbase = ioremap (board_addr, 16777216);
+		if (!cinfo->regbase)
+			goto err_release_region;
+
+		DPRINTK ("cirrusfb: Virtual address for board set to: $%p\n", cinfo->regbase);
+		cinfo->regbase += 0x600000;
+		cinfo->fbregs_phys = board_addr + 0x600000;
+
+		cinfo->fbmem_phys = board_addr + 16777216;
+		cinfo->fbmem = ioremap (info->fbmem_phys, 16777216);
+		if (!cinfo->fbmem)
+			goto err_unmap_regbase;
 	} else {
 		printk (" REG at $%lx\n", (unsigned long) z2->resource.start);
 
-		info->fbmem_phys = board_addr;
+		cinfo->fbmem_phys = board_addr;
 		if (board_addr > 0x01000000)
-			info->fbmem = ioremap (board_addr, board_size);
+			cinfo->fbmem = ioremap (board_addr, board_size);
 		else
-			info->fbmem = (caddr_t) ZTWO_VADDR (board_addr);
+			cinfo->fbmem = (caddr_t) ZTWO_VADDR (board_addr);
+		if (!cinfo->fbmem)
+			goto err_release_region;
 
 		/* set address for REG area of board */
-		info->regs = (caddr_t) ZTWO_VADDR (z2->resource.start);
-		info->fbregs_phys = z2->resource.start;
+		cinfo->regbase = (caddr_t) ZTWO_VADDR (z2->resource.start);
+		cinfo->fbregs_phys = z2->resource.start;
 
-		DPRINTK ("clgen: Virtual address for board set to: $%p\n", info->regs);
+		DPRINTK ("cirrusfb: Virtual address for board set to: $%p\n", cinfo->regbase);
 	}
 
 	printk (KERN_INFO "Cirrus Logic chipset on Zorro bus\n");
 
 	return 0;
+
+err_unmap_regbase:
+	/* Parental advisory: explicit hack */
+	iounmap(cinfo->regbase - 0x600000);
+err_release_region:
+	release_region(board_addr, board_size);
+err_release_fb:
+	framebuffer_release(info);
+err_out:
+	return ERR_PTR(ret);
 }
 #endif /* CONFIG_ZORRO */
 
-
-
-/********************************************************************/
-/* clgenfb_init() - master initialization function                  */
-/********************************************************************/
-int __init clgenfb_init(void)
+static int cirrusfb_set_fbinfo(struct cirrusfb_info *cinfo)
 {
-	int err, j, k;
+	struct fb_info *info = cinfo->info;
+	struct fb_var_screeninfo *var = &info->var;
+
+	info->currcon = -1;
+	info->par = cinfo;
+	info->pseudo_palette = cinfo->pseudo_palette;
+	info->flags = FBINFO_DEFAULT
+		    | FBINFO_HWACCEL_XPAN
+		    | FBINFO_HWACCEL_YPAN
+		    | FBINFO_HWACCEL_FILLRECT
+		    | FBINFO_HWACCEL_COPYAREA;
+	if (noaccel)
+		info->flags |= FBINFO_HWACCEL_DISABLED;
+	info->fbops = &cirrusfb_ops;
+	info->screen_base = cinfo->fbmem;
+	if (cinfo->btype == BT_GD5480) {
+		if (var->bits_per_pixel == 16)
+			info->screen_base += 1 * MB_;
+		if (var->bits_per_pixel == 24 || var->bits_per_pixel == 32)
+			info->screen_base += 2 * MB_;
+	}
 
-	clgen_board_t btype = BT_NONE;
-	struct clgenfb_info *fb_info = NULL;
+	/* Fill fix common fields */
+	strlcpy(info->fix.id, cirrusfb_board_info[cinfo->btype].name,
+		sizeof(info->fix.id));
 
-	DPRINTK ("ENTER\n");
+	/* monochrome: only 1 memory plane */
+	/* 8 bit and above: Use whole memory area */
+	info->fix.smem_start = cinfo->fbmem_phys;
+	info->fix.smem_len   = (var->bits_per_pixel == 1) ? cinfo->size / 4 : cinfo->size;
+	info->fix.type       = cinfo->currentmode.type;
+	info->fix.type_aux   = 0;
+	info->fix.visual     = cinfo->currentmode.visual;
+	info->fix.xpanstep   = 1;
+	info->fix.ypanstep   = 1;
+	info->fix.ywrapstep  = 0;
+	info->fix.line_length = cinfo->currentmode.line_length;
 
-	printk (KERN_INFO "clgen: Driver for Cirrus Logic based graphic boards, v" CLGEN_VERSION "\n");
+	/* FIXME: map region at 0xB8000 if available, fill in here */
+	info->fix.mmio_start = cinfo->fbregs_phys;
+	info->fix.mmio_len   = 0;
+	info->fix.accel = FB_ACCEL_NONE;
 
-	fb_info = &boards[0];	/* FIXME support multiple boards ... */
+	fb_alloc_cmap(&info->cmap, 256, 0);
 
-#ifdef CONFIG_PCI
-	if (clgen_pci_setup (fb_info, &btype)) { /* Also does OF setup */
-		DPRINTK ("EXIT, returning -ENXIO\n");
-		return -ENXIO;
-	}
+	return 0;
+}
 
+#if defined(CONFIG_PCI)
+#define cirrusfb_unmap cirrusfb_pci_unmap
+#define cirrusfb_bus_setup cirrusfb_pci_setup
 #elif defined(CONFIG_ZORRO)
-	/* FIXME: CONFIG_PCI and CONFIG_ZORRO may both be defined */
-	if (clgen_zorro_setup (fb_info, &btype)) {
-		DPRINTK ("EXIT, returning -ENXIO\n");
-		return -ENXIO;
+#define cirrusfb_unmap cirrusfb_zorro_unmap
+#define cirrusfb_bus_setup cirrusfb_zorro_setup
+#endif
+
+
+static int cirrusfb_pci_register (struct pci_dev *pdev,
+				  const struct pci_device_id *ent)
+{
+	struct fb_info *info;
+	struct cirrusfb_info *cinfo = NULL;
+	int err;
+	cirrusfb_board_t btype;
+
+	DPRINTK ("ENTER\n");
+
+	printk (KERN_INFO "cirrusfb: Driver for Cirrus Logic based graphic boards, v" CIRRUSFB_VERSION "\n");
+
+	cinfo = cirrusfb_bus_setup(pdev, ent);
+
+	if (IS_ERR(cinfo)) {
+		err = PTR_ERR(cinfo);
+		goto err_out;
 	}
 
-#else
-#error This driver requires Zorro or PCI bus.
-#endif				/* !CONFIG_PCI, !CONFIG_ZORRO */
+	info = cinfo->info;
+	btype = cinfo->btype;
 
 	/* sanity checks */
 	assert (btype != BT_NONE);
-	assert (btype == clgen_board_info[btype].btype);
+	assert (btype == cirrusfb_board_info[btype].btype);
 
-	fb_info->btype = btype;
+	DPRINTK ("cirrusfb: (RAM start set to: 0x%p)\n", cinfo->fbmem);
 
-	DPRINTK ("clgen: (RAM start set to: 0x%p)\n", fb_info->fbmem);
+	/* Make pretend we've set the var so our structures are in a "good" */
+	/* state, even though we haven't written the mode to the hw yet...  */
+	info->var = cirrusfb_predefined[cirrusfb_def_mode].var;
+	info->var.activate = FB_ACTIVATE_NOW;
 
-	if (noaccel)
-	{
-		printk("clgen: disabling text acceleration support\n");
-#ifdef FBCON_HAS_CFB8
-		fbcon_clgen_8.bmove = fbcon_cfb8_bmove;
-		fbcon_clgen_8.clear = fbcon_cfb8_clear;
-#endif
-#ifdef FBCON_HAS_CFB16
-		fbcon_clgen_16.bmove = fbcon_cfb16_bmove;
-		fbcon_clgen_16.clear = fbcon_cfb16_clear;
-#endif
-#ifdef FBCON_HAS_CFB32
-		fbcon_clgen_32.bmove = fbcon_cfb32_bmove;
-		fbcon_clgen_32.clear = fbcon_cfb32_clear;
-#endif
+	err = cirrusfb_decode_var(&info->var, &cinfo->currentmode, info);
+	if (err < 0) {
+		/* should never happen */
+		DPRINTK("choking on default var... umm, no good.\n");
+		goto err_unmap_cirrusfb;
 	}
 
-	init_vgachip (fb_info);
-
-	/* set up a few more things, register framebuffer driver etc */
-	fb_info->gen.parsize = sizeof (struct clgenfb_par);
-	fb_info->gen.fbhw = &clgen_hwswitch;
-
-	strlcpy (fb_info->gen.info.modename, clgen_board_info[btype].name,
-		 sizeof (fb_info->gen.info.modename));
-
-	fb_info->gen.info.fbops = &clgenfb_ops;
-	fb_info->gen.info.disp = &disp;
-	fb_info->gen.info.currcon = -1;
-	fb_info->gen.info.changevar = NULL;
-	fb_info->gen.info.switch_con = &fbgen_switch;
-	fb_info->gen.info.updatevar = &fbgen_update_var;
-	fb_info->gen.info.flags = FBINFO_FLAG_DEFAULT;
-
-	for (j = 0; j < 256; j++) {
-		if (j < 16) {
-			k = color_table[j];
-			fb_info->palette[j].red = default_red[k];
-			fb_info->palette[j].green = default_grn[k];
-			fb_info->palette[j].blue = default_blu[k];
-		} else {
-			fb_info->palette[j].red =
-			fb_info->palette[j].green =
-			fb_info->palette[j].blue = j;
-		}
-	}
+	/* set all the vital stuff */
+	cirrusfb_set_fbinfo(cinfo);
 
-	/* now that we know the board has been registered n' stuff, we */
-	/* can finally initialize it to a default mode */
-	clgenfb_default = clgenfb_predefined[clgen_def_mode].var;
-	clgenfb_default.activate = FB_ACTIVATE_NOW;
-	clgenfb_default.yres_virtual = 480 * 3;		/* for fast scrolling (YPAN-Mode) */
-	err = fbgen_do_set_var (&clgenfb_default, 1, &fb_info->gen);
+	pci_set_drvdata(pdev, info);
 
-	if (err) {
-		DPRINTK ("EXIT, returning -EINVAL\n");
-		return -EINVAL;
+	err = register_framebuffer(info);
+	if (err < 0) {
+		printk (KERN_ERR "cirrusfb: could not register fb device; err = %d!\n", err);
+		goto err_dealloc_cmap;
 	}
 
-	disp.var = clgenfb_default;
-	fbgen_set_disp (-1, &fb_info->gen);
-	do_install_cmap (0, &fb_info->gen.info);
-
-	err = register_framebuffer (&fb_info->gen.info);
-	if (err) {
-		printk (KERN_ERR "clgen: ERROR - could not register fb device; err = %d!\n", err);
-		DPRINTK ("EXIT, returning -EINVAL\n");
-		return -EINVAL;
-	}
 	DPRINTK ("EXIT, returning 0\n");
 	return 0;
-}
 
+err_dealloc_cmap:
+	fb_dealloc_cmap(&info->cmap);
+err_unmap_cirrusfb:
+	cirrusfb_unmap(cinfo);
+err_out:
+	return err;
+}
 
 
-    /*
-     *  Cleanup (only needed for module)
-     */
-static void __exit clgenfb_cleanup (struct clgenfb_info *info)
+static void __devexit cirrusfb_cleanup (struct fb_info *info)
 {
+	struct cirrusfb_info *cinfo = info->par;
 	DPRINTK ("ENTER\n");
 
 #ifdef CONFIG_ZORRO
-	switch_monitor (info, 0);
-
-	clgen_zorro_unmap (info);
-#else
-	clgen_pci_unmap (info);
-#endif				/* CONFIG_ZORRO */
+	switch_monitor (cinfo, 0);
+#endif
 
-	unregister_framebuffer ((struct fb_info *) info);
+	unregister_framebuffer (info);
+	fb_dealloc_cmap (&info->cmap);
 	printk ("Framebuffer unregistered\n");
+	cirrusfb_unmap (cinfo);
 
 	DPRINTK ("EXIT\n");
 }
 
 
+void __devexit cirrusfb_pci_unregister (struct pci_dev *pdev)
+{
+	struct fb_info *info = pci_get_drvdata(pdev);
+	DPRINTK ("ENTER\n");
+
+	cirrusfb_cleanup (info);
+
+	DPRINTK ("EXIT\n");
+}
+
+static struct pci_driver cirrusfb_driver = {
+	.name	= "cirrusfb",
+	.id_table	= cirrusfb_pci_table,
+	.probe		= cirrusfb_pci_register,
+	.remove		= __devexit_p(cirrusfb_pci_unregister),
+#ifdef CONFIG_PM
+#if 0
+	.suspend	= cirrusfb_pci_suspend,
+	.resume		= cirrusfb_pci_resume,
+#endif
+#endif
+};
+
+int __init cirrusfb_init(void)
+{
+#ifdef CONFIG_ZORRO
+	return cirrusfb_pci_register(NULL, NULL);
+#else
+	return pci_module_init(&cirrusfb_driver);
+#endif
+}
+
+
+
 #ifndef MODULE
-int __init clgenfb_setup(char *options) {
+int __init cirrusfb_setup(char *options) {
 	char *this_opt, s[32];
 	int i;
 
@@ -2864,12 +2594,12 @@
 	while ((this_opt = strsep (&options, ",")) != NULL) {	
 		if (!*this_opt) continue;
 
-		DPRINTK("clgenfb_setup: option '%s'\n", this_opt);
+		DPRINTK("cirrusfb_setup: option '%s'\n", this_opt);
 
 		for (i = 0; i < NUM_TOTAL_MODES; i++) {
-			sprintf (s, "mode:%s", clgenfb_predefined[i].name);
+			sprintf (s, "mode:%s", cirrusfb_predefined[i].name);
 			if (strcmp (this_opt, s) == 0)
-				clgen_def_mode = i;
+				cirrusfb_def_mode = i;
 		}
 		if (!strcmp(this_opt, "noaccel"))
 			noaccel = 1;
@@ -2887,19 +2617,15 @@
 MODULE_DESCRIPTION("Accelerated FBDev driver for Cirrus Logic chips");
 MODULE_LICENSE("GPL");
 
-static void __exit clgenfb_exit (void)
+void __exit cirrusfb_exit (void)
 {
-	DPRINTK ("ENTER\n");
-
-	clgenfb_cleanup (&boards[0]);	/* FIXME: support multiple boards */
-
-	DPRINTK ("EXIT\n");
+	pci_unregister_driver (&cirrusfb_driver);
 }
 
 #ifdef MODULE
-module_init(clgenfb_init);
+module_init(cirrusfb_init);
+module_exit(cirrusfb_exit);
 #endif
-module_exit(clgenfb_exit);
 
 
 /**********************************************************************/
@@ -2910,55 +2636,55 @@
 /**********************************************************************/
 
 /*** WGen() - write into one of the external/general registers ***/
-static void WGen (const struct clgenfb_info *fb_info,
+static void WGen (const struct cirrusfb_info *cinfo,
 		  int regnum, unsigned char val)
 {
 	unsigned long regofs = 0;
 
-	if (fb_info->btype == BT_PICASSO) {
+	if (cinfo->btype == BT_PICASSO) {
 		/* Picasso II specific hack */
 /*              if (regnum == VGA_PEL_IR || regnum == VGA_PEL_D || regnum == CL_VSSM2) */
 		if (regnum == VGA_PEL_IR || regnum == VGA_PEL_D)
 			regofs = 0xfff;
 	}
 
-	vga_w (fb_info->regs, regofs + regnum, val);
+	vga_w (cinfo->regbase, regofs + regnum, val);
 }
 
 /*** RGen() - read out one of the external/general registers ***/
-static unsigned char RGen (const struct clgenfb_info *fb_info, int regnum)
+static unsigned char RGen (const struct cirrusfb_info *cinfo, int regnum)
 {
 	unsigned long regofs = 0;
 
-	if (fb_info->btype == BT_PICASSO) {
+	if (cinfo->btype == BT_PICASSO) {
 		/* Picasso II specific hack */
 /*              if (regnum == VGA_PEL_IR || regnum == VGA_PEL_D || regnum == CL_VSSM2) */
 		if (regnum == VGA_PEL_IR || regnum == VGA_PEL_D)
 			regofs = 0xfff;
 	}
 
-	return vga_r (fb_info->regs, regofs + regnum);
+	return vga_r (cinfo->regbase, regofs + regnum);
 }
 
 /*** AttrOn() - turn on VideoEnable for Attribute controller ***/
-static void AttrOn (const struct clgenfb_info *fb_info)
+static void AttrOn (const struct cirrusfb_info *cinfo)
 {
-	assert (fb_info != NULL);
+	assert (cinfo != NULL);
 
 	DPRINTK ("ENTER\n");
 
-	if (vga_rcrt (fb_info->regs, CL_CRT24) & 0x80) {
+	if (vga_rcrt (cinfo->regbase, CL_CRT24) & 0x80) {
 		/* if we're just in "write value" mode, write back the */
 		/* same value as before to not modify anything */
-		vga_w (fb_info->regs, VGA_ATT_IW,
-		       vga_r (fb_info->regs, VGA_ATT_R));
+		vga_w (cinfo->regbase, VGA_ATT_IW,
+		       vga_r (cinfo->regbase, VGA_ATT_R));
 	}
 	/* turn on video bit */
-/*      vga_w (fb_info->regs, VGA_ATT_IW, 0x20); */
-	vga_w (fb_info->regs, VGA_ATT_IW, 0x33);
+/*      vga_w (cinfo->regbase, VGA_ATT_IW, 0x20); */
+	vga_w (cinfo->regbase, VGA_ATT_IW, 0x33);
 
 	/* dummy write on Reg0 to be on "write index" mode next time */
-	vga_w (fb_info->regs, VGA_ATT_IW, 0x00);
+	vga_w (cinfo->regbase, VGA_ATT_IW, 0x00);
 
 	DPRINTK ("EXIT\n");
 }
@@ -2969,127 +2695,127 @@
  * registers of their functional group) here is a specialized routine for
  * accessing the HDR
  */
-static void WHDR (const struct clgenfb_info *fb_info, unsigned char val)
+static void WHDR (const struct cirrusfb_info *cinfo, unsigned char val)
 {
 	unsigned char dummy;
 
-	if (fb_info->btype == BT_PICASSO) {
+	if (cinfo->btype == BT_PICASSO) {
 		/* Klaus' hint for correct access to HDR on some boards */
 		/* first write 0 to pixel mask (3c6) */
-		WGen (fb_info, VGA_PEL_MSK, 0x00);
+		WGen (cinfo, VGA_PEL_MSK, 0x00);
 		udelay (200);
 		/* next read dummy from pixel address (3c8) */
-		dummy = RGen (fb_info, VGA_PEL_IW);
+		dummy = RGen (cinfo, VGA_PEL_IW);
 		udelay (200);
 	}
 	/* now do the usual stuff to access the HDR */
 
-	dummy = RGen (fb_info, VGA_PEL_MSK);
+	dummy = RGen (cinfo, VGA_PEL_MSK);
 	udelay (200);
-	dummy = RGen (fb_info, VGA_PEL_MSK);
+	dummy = RGen (cinfo, VGA_PEL_MSK);
 	udelay (200);
-	dummy = RGen (fb_info, VGA_PEL_MSK);
+	dummy = RGen (cinfo, VGA_PEL_MSK);
 	udelay (200);
-	dummy = RGen (fb_info, VGA_PEL_MSK);
+	dummy = RGen (cinfo, VGA_PEL_MSK);
 	udelay (200);
 
-	WGen (fb_info, VGA_PEL_MSK, val);
+	WGen (cinfo, VGA_PEL_MSK, val);
 	udelay (200);
 
-	if (fb_info->btype == BT_PICASSO) {
+	if (cinfo->btype == BT_PICASSO) {
 		/* now first reset HDR access counter */
-		dummy = RGen (fb_info, VGA_PEL_IW);
+		dummy = RGen (cinfo, VGA_PEL_IW);
 		udelay (200);
 
 		/* and at the end, restore the mask value */
 		/* ## is this mask always 0xff? */
-		WGen (fb_info, VGA_PEL_MSK, 0xff);
+		WGen (cinfo, VGA_PEL_MSK, 0xff);
 		udelay (200);
 	}
 }
 
 
 /*** WSFR() - write to the "special function register" (SFR) ***/
-static void WSFR (struct clgenfb_info *fb_info, unsigned char val)
+static void WSFR (struct cirrusfb_info *cinfo, unsigned char val)
 {
 #ifdef CONFIG_ZORRO
-	assert (fb_info->regs != NULL);
-	fb_info->SFR = val;
-	z_writeb (val, fb_info->regs + 0x8000);
+	assert (cinfo->regbase != NULL);
+	cinfo->SFR = val;
+	z_writeb (val, cinfo->regbase + 0x8000);
 #endif
 }
 
 /* The Picasso has a second register for switching the monitor bit */
-static void WSFR2 (struct clgenfb_info *fb_info, unsigned char val)
+static void WSFR2 (struct cirrusfb_info *cinfo, unsigned char val)
 {
 #ifdef CONFIG_ZORRO
 	/* writing an arbitrary value to this one causes the monitor switcher */
 	/* to flip to Amiga display */
-	assert (fb_info->regs != NULL);
-	fb_info->SFR = val;
-	z_writeb (val, fb_info->regs + 0x9000);
+	assert (cinfo->regbase != NULL);
+	cinfo->SFR = val;
+	z_writeb (val, cinfo->regbase + 0x9000);
 #endif
 }
 
 
 /*** WClut - set CLUT entry (range: 0..63) ***/
-static void WClut (struct clgenfb_info *fb_info, unsigned char regnum, unsigned char red,
+static void WClut (struct cirrusfb_info *cinfo, unsigned char regnum, unsigned char red,
 	    unsigned char green, unsigned char blue)
 {
 	unsigned int data = VGA_PEL_D;
 
 	/* address write mode register is not translated.. */
-	vga_w (fb_info->regs, VGA_PEL_IW, regnum);
+	vga_w (cinfo->regbase, VGA_PEL_IW, regnum);
 
-	if (fb_info->btype == BT_PICASSO || fb_info->btype == BT_PICASSO4 ||
-	    fb_info->btype == BT_ALPINE || fb_info->btype == BT_GD5480) {
+	if (cinfo->btype == BT_PICASSO || cinfo->btype == BT_PICASSO4 ||
+	    cinfo->btype == BT_ALPINE || cinfo->btype == BT_GD5480) {
 		/* but DAC data register IS, at least for Picasso II */
-		if (fb_info->btype == BT_PICASSO)
+		if (cinfo->btype == BT_PICASSO)
 			data += 0xfff;
-		vga_w (fb_info->regs, data, red);
-		vga_w (fb_info->regs, data, green);
-		vga_w (fb_info->regs, data, blue);
+		vga_w (cinfo->regbase, data, red);
+		vga_w (cinfo->regbase, data, green);
+		vga_w (cinfo->regbase, data, blue);
 	} else {
-		vga_w (fb_info->regs, data, blue);
-		vga_w (fb_info->regs, data, green);
-		vga_w (fb_info->regs, data, red);
+		vga_w (cinfo->regbase, data, blue);
+		vga_w (cinfo->regbase, data, green);
+		vga_w (cinfo->regbase, data, red);
 	}
 }
 
 
 #if 0
 /*** RClut - read CLUT entry (range 0..63) ***/
-static void RClut (struct clgenfb_info *fb_info, unsigned char regnum, unsigned char *red,
+static void RClut (struct cirrusfb_info *cinfo, unsigned char regnum, unsigned char *red,
 	    unsigned char *green, unsigned char *blue)
 {
 	unsigned int data = VGA_PEL_D;
 
-	vga_w (fb_info->regs, VGA_PEL_IR, regnum);
+	vga_w (cinfo->regbase, VGA_PEL_IR, regnum);
 
-	if (fb_info->btype == BT_PICASSO || fb_info->btype == BT_PICASSO4 ||
-	    fb_info->btype == BT_ALPINE || fb_info->btype == BT_GD5480) {
-		if (fb_info->btype == BT_PICASSO)
+	if (cinfo->btype == BT_PICASSO || cinfo->btype == BT_PICASSO4 ||
+	    cinfo->btype == BT_ALPINE || cinfo->btype == BT_GD5480) {
+		if (cinfo->btype == BT_PICASSO)
 			data += 0xfff;
-		*red = vga_r (fb_info->regs, data);
-		*green = vga_r (fb_info->regs, data);
-		*blue = vga_r (fb_info->regs, data);
+		*red = vga_r (cinfo->regbase, data);
+		*green = vga_r (cinfo->regbase, data);
+		*blue = vga_r (cinfo->regbase, data);
 	} else {
-		*blue = vga_r (fb_info->regs, data);
-		*green = vga_r (fb_info->regs, data);
-		*red = vga_r (fb_info->regs, data);
+		*blue = vga_r (cinfo->regbase, data);
+		*green = vga_r (cinfo->regbase, data);
+		*red = vga_r (cinfo->regbase, data);
 	}
 }
 #endif
 
 
 /*******************************************************************
-	clgen_WaitBLT()
+	cirrusfb_WaitBLT()
 
 	Wait for the BitBLT engine to complete a possible earlier job
 *********************************************************************/
 
 /* FIXME: use interrupts instead */
-static inline void clgen_WaitBLT (caddr_t regbase)
+static void cirrusfb_WaitBLT (caddr_t regbase)
 {
 	/* now busy-wait until we're done */
 	while (vga_rgfx (regbase, CL_GR31) & 0x08)
@@ -3097,13 +2823,14 @@
 }
 
 /*******************************************************************
-	clgen_BitBLT()
+	cirrusfb_BitBLT()
 
 	perform accelerated "scrolling"
 ********************************************************************/
 
-static void clgen_BitBLT (caddr_t regbase, u_short curx, u_short cury, u_short destx, u_short desty,
-		   u_short width, u_short height, u_short line_length)
+static void cirrusfb_BitBLT (caddr_t regbase, int bits_per_pixel,
+			     u_short curx, u_short cury, u_short destx, u_short desty,
+		  	     u_short width, u_short height, u_short line_length)
 {
 	u_short nwidth, nheight;
 	u_long nsrc, ndest;
@@ -3134,8 +2861,6 @@
 		ndest = desty * line_length + destx + nheight * line_length + nwidth;
 	}
 
-        clgen_WaitBLT(regbase);
-
 	/*
 	   run-down of registers to be programmed:
 	   destination pitch
@@ -3149,6 +2874,8 @@
 	   start/stop
 	 */
 
+        cirrusfb_WaitBLT(regbase);
+
 	/* pitch: set to line_length */
 	vga_wgfx (regbase, CL_GR24, line_length & 0xff);	/* dest pitch low */
 	vga_wgfx (regbase, CL_GR25, (line_length >> 8));	/* dest pitch hi */
@@ -3187,12 +2914,12 @@
 
 
 /*******************************************************************
-	clgen_RectFill()
+	cirrusfb_RectFill()
 
 	perform accelerated rectangle fill
 ********************************************************************/
 
-static void clgen_RectFill (struct clgenfb_info *fb_info,
+static void cirrusfb_RectFill (caddr_t regbase, int bits_per_pixel,
 		     u_short x, u_short y, u_short width, u_short height,
 		     u_char color, u_short line_length)
 {
@@ -3207,61 +2934,61 @@
 
 	ndest = (y * line_length) + x;
 
-        clgen_WaitBLT(fb_info->regs);
+        cirrusfb_WaitBLT(regbase);
 
 	/* pitch: set to line_length */
-	vga_wgfx (fb_info->regs, CL_GR24, line_length & 0xff);	/* dest pitch low */
-	vga_wgfx (fb_info->regs, CL_GR25, (line_length >> 8));	/* dest pitch hi */
-	vga_wgfx (fb_info->regs, CL_GR26, line_length & 0xff);	/* source pitch low */
-	vga_wgfx (fb_info->regs, CL_GR27, (line_length >> 8));	/* source pitch hi */
+	vga_wgfx (regbase, CL_GR24, line_length & 0xff);	/* dest pitch low */
+	vga_wgfx (regbase, CL_GR25, (line_length >> 8));	/* dest pitch hi */
+	vga_wgfx (regbase, CL_GR26, line_length & 0xff);	/* source pitch low */
+	vga_wgfx (regbase, CL_GR27, (line_length >> 8));	/* source pitch hi */
 
 	/* BLT width: actual number of pixels - 1 */
-	vga_wgfx (fb_info->regs, CL_GR20, nwidth & 0xff);	/* BLT width low */
-	vga_wgfx (fb_info->regs, CL_GR21, (nwidth >> 8));	/* BLT width hi */
+	vga_wgfx (regbase, CL_GR20, nwidth & 0xff);	/* BLT width low */
+	vga_wgfx (regbase, CL_GR21, (nwidth >> 8));	/* BLT width hi */
 
 	/* BLT height: actual number of lines -1 */
-	vga_wgfx (fb_info->regs, CL_GR22, nheight & 0xff);		/* BLT height low */
-	vga_wgfx (fb_info->regs, CL_GR23, (nheight >> 8));		/* BLT width hi */
+	vga_wgfx (regbase, CL_GR22, nheight & 0xff);		/* BLT height low */
+	vga_wgfx (regbase, CL_GR23, (nheight >> 8));		/* BLT width hi */
 
 	/* BLT destination */
-	vga_wgfx (fb_info->regs, CL_GR28, (u_char) (ndest & 0xff));	/* BLT dest low */
-	vga_wgfx (fb_info->regs, CL_GR29, (u_char) (ndest >> 8));	/* BLT dest mid */
-	vga_wgfx (fb_info->regs, CL_GR2A, (u_char) (ndest >> 16));		/* BLT dest hi */
+	vga_wgfx (regbase, CL_GR28, (u_char) (ndest & 0xff));	/* BLT dest low */
+	vga_wgfx (regbase, CL_GR29, (u_char) (ndest >> 8));	/* BLT dest mid */
+	vga_wgfx (regbase, CL_GR2A, (u_char) (ndest >> 16));		/* BLT dest hi */
 
 	/* BLT source: set to 0 (is a dummy here anyway) */
-	vga_wgfx (fb_info->regs, CL_GR2C, 0x00);	/* BLT src low */
-	vga_wgfx (fb_info->regs, CL_GR2D, 0x00);	/* BLT src mid */
-	vga_wgfx (fb_info->regs, CL_GR2E, 0x00);	/* BLT src hi */
+	vga_wgfx (regbase, CL_GR2C, 0x00);	/* BLT src low */
+	vga_wgfx (regbase, CL_GR2D, 0x00);	/* BLT src mid */
+	vga_wgfx (regbase, CL_GR2E, 0x00);	/* BLT src hi */
 
 	/* This is a ColorExpand Blt, using the */
 	/* same color for foreground and background */
-	vga_wgfx (fb_info->regs, VGA_GFX_SR_VALUE, color);	/* foreground color */
-	vga_wgfx (fb_info->regs, VGA_GFX_SR_ENABLE, color);	/* background color */
+	vga_wgfx (regbase, VGA_GFX_SR_VALUE, color);	/* foreground color */
+	vga_wgfx (regbase, VGA_GFX_SR_ENABLE, color);	/* background color */
 
 	op = 0xc0;
-	if (fb_info->currentmode.var.bits_per_pixel == 16) {
-		vga_wgfx (fb_info->regs, CL_GR10, color);	/* foreground color */
-		vga_wgfx (fb_info->regs, CL_GR11, color);	/* background color */
+	if (bits_per_pixel == 16) {
+		vga_wgfx (regbase, CL_GR10, color);	/* foreground color */
+		vga_wgfx (regbase, CL_GR11, color);	/* background color */
 		op = 0x50;
 		op = 0xd0;
-	} else if (fb_info->currentmode.var.bits_per_pixel == 32) {
-		vga_wgfx (fb_info->regs, CL_GR10, color);	/* foreground color */
-		vga_wgfx (fb_info->regs, CL_GR11, color);	/* background color */
-		vga_wgfx (fb_info->regs, CL_GR12, color);	/* foreground color */
-		vga_wgfx (fb_info->regs, CL_GR13, color);	/* background color */
-		vga_wgfx (fb_info->regs, CL_GR14, 0);	/* foreground color */
-		vga_wgfx (fb_info->regs, CL_GR15, 0);	/* background color */
+	} else if (bits_per_pixel == 32) {
+		vga_wgfx (regbase, CL_GR10, color);	/* foreground color */
+		vga_wgfx (regbase, CL_GR11, color);	/* background color */
+		vga_wgfx (regbase, CL_GR12, color);	/* foreground color */
+		vga_wgfx (regbase, CL_GR13, color);	/* background color */
+		vga_wgfx (regbase, CL_GR14, 0);	/* foreground color */
+		vga_wgfx (regbase, CL_GR15, 0);	/* background color */
 		op = 0x50;
 		op = 0xf0;
 	}
 	/* BLT mode: color expand, Enable 8x8 copy (faster?) */
-	vga_wgfx (fb_info->regs, CL_GR30, op);	/* BLT mode */
+	vga_wgfx (regbase, CL_GR30, op);	/* BLT mode */
 
 	/* BLT ROP: SrcCopy */
-	vga_wgfx (fb_info->regs, CL_GR32, 0x0d);	/* BLT ROP */
+	vga_wgfx (regbase, CL_GR32, 0x0d);	/* BLT ROP */
 
 	/* and finally: GO! */
-	vga_wgfx (fb_info->regs, CL_GR31, 0x02);	/* BLT Start/status */
+	vga_wgfx (regbase, CL_GR31, 0x02);	/* BLT Start/status */
 
 	DPRINTK ("EXIT\n");
 }
@@ -3349,10 +3076,10 @@
  * -------------------------------------------------------------------------
  */
 
-#ifdef CLGEN_DEBUG
+#ifdef CIRRUSFB_DEBUG
 
 /**
- * clgen_dbg_print_byte
+ * cirrusfb_dbg_print_byte
  * @name: name associated with byte value to be displayed
  * @val: byte value to be displayed
  *
@@ -3363,7 +3090,7 @@
  */
 
 static
-void clgen_dbg_print_byte (const char *name, unsigned char val)
+void cirrusfb_dbg_print_byte (const char *name, unsigned char val)
 {
 	DPRINTK ("%8s = 0x%02X (bits 7-0: %c%c%c%c%c%c%c%c)\n",
 		 name, val,
@@ -3379,7 +3106,7 @@
 
 
 /**
- * clgen_dbg_print_regs
+ * cirrusfb_dbg_print_regs
  * @base: If using newmmio, the newmmio base address, otherwise %NULL
  * @reg_class: type of registers to read: %CRT, or %SEQ
  *
@@ -3390,7 +3117,7 @@
  */
 
 static
-void clgen_dbg_print_regs (caddr_t regbase, clgen_dbg_reg_class_t reg_class,...)
+void cirrusfb_dbg_print_regs (caddr_t regbase, cirrusfb_dbg_reg_class_t reg_class,...)
 {
 	va_list list;
 	unsigned char val = 0;
@@ -3416,7 +3143,7 @@
 			break;
 		}
 
-		clgen_dbg_print_byte (name, val);
+		cirrusfb_dbg_print_byte (name, val);
 
 		name = va_arg (list, char *);
 	}
@@ -3426,35 +3153,35 @@
 
 
 /**
- * clgen_dump
- * @clgeninfo:
+ * cirrusfb_dump
+ * @cirrusfbinfo:
  *
  * DESCRIPTION:
  */
 
 static
-void clgen_dump (void)
+void cirrusfb_dump (void)
 {
-	clgen_dbg_reg_dump (NULL);
+	cirrusfb_dbg_reg_dump (NULL);
 }
 
 
 /**
- * clgen_dbg_reg_dump
+ * cirrusfb_dbg_reg_dump
  * @base: If using newmmio, the newmmio base address, otherwise %NULL
  *
  * DESCRIPTION:
- * Dumps a list of interesting VGA and CLGEN registers.  If @base is %NULL,
+ * Dumps a list of interesting VGA and CIRRUSFB registers.  If @base is %NULL,
  * old-style I/O ports are queried for information, otherwise MMIO is
  * used at the given @base address to query the information.
  */
 
 static
-void clgen_dbg_reg_dump (caddr_t regbase)
+void cirrusfb_dbg_reg_dump (caddr_t regbase)
 {
-	DPRINTK ("CLGEN VGA CRTC register dump:\n");
+	DPRINTK ("CIRRUSFB VGA CRTC register dump:\n");
 
-	clgen_dbg_print_regs (regbase, CRT,
+	cirrusfb_dbg_print_regs (regbase, CRT,
 			   "CR00", 0x00,
 			   "CR01", 0x01,
 			   "CR02", 0x02,
@@ -3506,9 +3233,9 @@
 
 	DPRINTK ("\n");
 
-	DPRINTK ("CLGEN VGA SEQ register dump:\n");
+	DPRINTK ("CIRRUSFB VGA SEQ register dump:\n");
 
-	clgen_dbg_print_regs (regbase, SEQ,
+	cirrusfb_dbg_print_regs (regbase, SEQ,
 			   "SR00", 0x00,
 			   "SR01", 0x01,
 			   "SR02", 0x02,
@@ -3540,5 +3267,5 @@
 	DPRINTK ("\n");
 }
 
-#endif				/* CLGEN_DEBUG */
+#endif				/* CIRRUSFB_DEBUG */
 
--- diff/drivers/video/console/fbcon.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/console/fbcon.c	2004-07-01 21:32:47.000000000 +0100
@@ -101,7 +101,7 @@
 #endif
 
 struct display fb_display[MAX_NR_CONSOLES];
-char con2fb_map[MAX_NR_CONSOLES];
+signed char con2fb_map[MAX_NR_CONSOLES];
 static int logo_height;
 static int logo_lines;
 static int logo_shown = -1;
@@ -118,6 +118,9 @@
 /* font data */
 static char fontname[40];
 
+/* current fb_info */
+static int info_idx =  -1;
+
 #define REFCOUNT(fd)	(((int *)(fd))[-1])
 #define FNTSIZE(fd)	(((int *)(fd))[-2])
 #define FNTCHARCNT(fd)	(((int *)(fd))[-3])
@@ -165,6 +168,8 @@
 static int fbcon_font_op(struct vc_data *vc, struct console_font_op *op);
 static int fbcon_set_palette(struct vc_data *vc, unsigned char *table);
 static int fbcon_scrolldelta(struct vc_data *vc, int lines);
+void accel_clear_margins(struct vc_data *vc, struct fb_info *info,
+			 int bottom_only);
 
 
 /*
@@ -177,6 +182,7 @@
 static __inline__ void ypan_down(struct vc_data *vc, int count);
 static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int sx,
 			    int dy, int dx, int height, int width, u_int y_break);
+static void fbcon_set_disp(struct fb_info *info, struct vc_data *vc);
 
 #ifdef CONFIG_MAC
 /*
@@ -194,9 +200,14 @@
 static void fb_flashcursor(void *private)
 {
 	struct fb_info *info = (struct fb_info *) private;
+	struct vc_data *vc = NULL;
+
+	if (info->currcon != -1)
+		vc = vc_cons[info->currcon].d;
 
-	if (!info || info->state != FBINFO_STATE_RUNNING ||
-	    info->cursor.rop == ROP_COPY)
+	if (info->state != FBINFO_STATE_RUNNING ||
+	    info->cursor.rop == ROP_COPY || !vc || !CON_IS_VISIBLE(vc)
+	    || registered_fb[(int) con2fb_map[vc->vc_num]] != info)
 		return;
 	acquire_console_sem();
 	info->cursor.enable ^= 1;
@@ -218,17 +229,12 @@
 }
 #endif
 	
-static void cursor_timer_handler(unsigned long dev_addr);
-
-static struct timer_list cursor_timer =
-		TIMER_INITIALIZER(cursor_timer_handler, 0, 0);
-
 static void cursor_timer_handler(unsigned long dev_addr)
 {
 	struct fb_info *info = (struct fb_info *) dev_addr;
 	
-	schedule_work(&info->queue);	
-	mod_timer(&cursor_timer, jiffies + HZ/5);
+	schedule_work(&info->queue);
+	mod_timer(&info->cursor_timer, jiffies + HZ/5);
 }
 
 int __init fb_console_setup(char *this_opt)
@@ -285,6 +291,28 @@
 
 __setup("fbcon=", fb_console_setup);
 
+static int search_fb_in_map(int idx)
+{
+	int i;
+
+	for (i = 0; i < MAX_NR_CONSOLES; i++) {
+		if (con2fb_map[i] == idx)
+			return 1;
+	}
+	return 0;
+}
+
+static int search_for_mapped_con(void)
+{
+	int i;
+
+	for (i = 0; i < MAX_NR_CONSOLES; i++) {
+		if (con2fb_map[i] != -1)
+			return 1;
+	}
+	return 0;
+}
+
 /**
  *	set_con2fb_map - map console to frame buffer device
  *	@unit: virtual console number to map
@@ -296,12 +324,74 @@
 int set_con2fb_map(int unit, int newidx)
 {
 	struct vc_data *vc = vc_cons[unit].d;
+	int oldidx = con2fb_map[unit];
+	struct fb_info *info = registered_fb[newidx];
+	struct fb_info *oldinfo = registered_fb[oldidx];
+	int found;
+
+	if (!search_for_mapped_con()) {
+		info_idx = newidx;
+		fb_console_init();
+		return 0;
+	}
 
+	if (oldidx == newidx)
+		return 0;
 	if (!vc)
-		return -ENODEV;
+	    return -ENODEV;
+	found = search_fb_in_map(newidx);
+
+	acquire_console_sem();
 	con2fb_map[unit] = newidx;
-	fbcon_is_default = (vc->vc_sw == &fb_con) ? 1 : 0;
-	return take_over_console(&fb_con, unit, unit, fbcon_is_default);
+	if (!found) {
+		if (!try_module_get(info->fbops->owner)) {
+			release_console_sem();
+			return -ENODEV;
+		}
+		if (info->fbops->fb_open && info->fbops->fb_open(info, 0)) {
+			module_put(info->fbops->owner);
+			release_console_sem();
+			return -ENODEV;
+		}
+	}
+
+	/*
+	 * If old fb is not mapped to any of the consoles,
+	 * fbcon should release it.
+	 */
+	if (oldinfo && !search_fb_in_map(oldidx)) {
+		int err;
+
+		if (info->queue.func == fb_flashcursor)
+			del_timer_sync(&oldinfo->cursor_timer);
+		if (oldinfo->fbops->fb_release) {
+			err = oldinfo->fbops->fb_release(oldinfo, 0);
+			if (err) {
+				con2fb_map[unit] = oldidx;
+				release_console_sem();
+				return err;
+			}
+		}
+		module_put(oldinfo->fbops->owner);
+	}
+	info->currcon = -1;
+	if (!found) {
+		if (!info->queue.func || info->queue.func == fb_flashcursor) {
+			if (!info->queue.func)
+				INIT_WORK(&info->queue, fb_flashcursor, info);
+
+			init_timer(&info->cursor_timer);
+			info->cursor_timer.function = cursor_timer_handler;
+			info->cursor_timer.expires = jiffies + HZ / 5;
+			info->cursor_timer.data = (unsigned long ) info;
+			add_timer(&info->cursor_timer);
+		}
+	}
+	if (info->fbops->fb_set_par)
+		info->fbops->fb_set_par(info);
+	fbcon_set_disp(info, vc);
+	release_console_sem();
+	return 0;
 }
 
 /*
@@ -443,9 +533,8 @@
 	struct vc_data *vc = vc_cons[fg_console].d;
 	struct font_desc *font = NULL;
 	struct module *owner;
-	struct fb_info *info;
-	static int done = 0;
-	int cols, rows;
+	struct fb_info *info = NULL;
+	int rows, cols;
 	int irqres;
 
 	irqres = 1;
@@ -453,20 +542,24 @@
 	 *  If num_registered_fb is zero, this is a call for the dummy part.
 	 *  The frame buffer devices weren't initialized yet.
 	 */
-	if (!num_registered_fb || done)
+	if (!num_registered_fb || info_idx == -1)
 		return display_desc;
-	done = 1;
-
-	info = registered_fb[0];	
-	if (!info)	return NULL;
+	/*
+	 * Instead of blindly using registered_fb[0], we use info_idx, set by
+	 * fb_console_init();
+	 */
+	info = registered_fb[info_idx];
+	if (!info)
+		return NULL;
 	info->currcon = -1;
 	
 	owner = info->fbops->owner;
 	if (!try_module_get(owner))
 		return NULL;
-	if (info->fbops->fb_open && info->fbops->fb_open(info, 0))
+	if (info->fbops->fb_open && info->fbops->fb_open(info, 0)) {
 		module_put(owner);
-	
+		return NULL;
+	}
 	if (info->fix.type != FB_TYPE_TEXT) {
 		if (fbcon_softback_size) {
 			if (!softback_buf) {
@@ -503,15 +596,8 @@
 		vc->vc_font.charcount = 256; /* FIXME  Need to support more fonts */
 	}
 
-	/*
-	 * We must always set the mode. The mode of the previous console
-	 * driver could be in the same resolution but we are using different
-	 * hardware so we have to initialize the hardware.
-	 */
-	if (info->fbops->fb_set_par)
-		info->fbops->fb_set_par(info);
-	cols = info->var.xres/vc->vc_font.width;
-	rows = info->var.yres/vc->vc_font.height;
+	cols = info->var.xres / vc->vc_font.width;
+	rows = info->var.yres / vc->vc_font.height;
 	vc_resize(vc->vc_num, cols, rows);
 
 	DPRINTK("mode:   %s\n", info->fix.id);
@@ -585,10 +671,12 @@
 	 * default timer to flash the cursor. */
 	if (!info->queue.func) {
 		INIT_WORK(&info->queue, fb_flashcursor, info);
-		
-		cursor_timer.expires = jiffies + HZ / 5;
-		cursor_timer.data = (unsigned long ) info;
-		add_timer(&cursor_timer);
+
+		init_timer(&info->cursor_timer);
+		info->cursor_timer.function = cursor_timer_handler;
+		info->cursor_timer.expires = jiffies + HZ / 5;
+		info->cursor_timer.data = (unsigned long ) info;
+		add_timer(&info->cursor_timer);
 	}
 	return display_desc;
 }
@@ -599,10 +687,13 @@
 	struct vc_data **default_mode = vc->vc_display_fg;
 	struct display *t, *p = &fb_display[vc->vc_num];
 	int display_fg = (*default_mode)->vc_num;
-	int logo = 1, rows, cols, charcnt = 256;
+	int logo = 1, new_rows, new_cols, rows, cols, charcnt = 256;
 	unsigned short *save = NULL, *r, *q;
+	int cap = info->flags;
 
-	if (vc->vc_num != display_fg || (info->flags & FBINFO_FLAG_MODULE) ||
+	if (info_idx == -1 || info == NULL)
+	    return;
+	if (vc->vc_num != display_fg || (info->flags & FBINFO_MODULE) ||
 	    (info->fix.type == FB_TYPE_TEXT))
 		logo = 0;
 
@@ -611,16 +702,17 @@
 	/* If we are not the first console on this
 	   fb, copy the font from that console */
 	t = &fb_display[display_fg];
-	vc->vc_font.width = (*default_mode)->vc_font.width;
-	vc->vc_font.height = (*default_mode)->vc_font.height;
-	vc->vc_font.data = p->fontdata = t->fontdata;
-	p->userfont = t->userfont;
-	if (p->userfont) {
-		REFCOUNT(p->fontdata)++;
-		charcnt = FNTCHARCNT(p->fontdata);
+	if (!vc->vc_font.data) {
+		vc->vc_font.data = p->fontdata = t->fontdata;
+		vc->vc_font.width = (*default_mode)->vc_font.width;
+		vc->vc_font.height = (*default_mode)->vc_font.height;
+		p->userfont = t->userfont;
+		if (p->userfont)
+			REFCOUNT(p->fontdata)++;
+		con_copy_unimap(vc->vc_num, display_fg);
 	}
-	con_copy_unimap(vc->vc_num, display_fg);
-
+	if (p->userfont)
+		charcnt = FNTCHARCNT(p->fontdata);
 	vc->vc_can_do_color = info->var.bits_per_pixel != 1;
 	vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800;
 	if (charcnt == 256) {
@@ -630,24 +722,36 @@
 		if (vc->vc_can_do_color)
 			vc->vc_complement_mask <<= 1;
 	}
+	cols = vc->vc_cols;
+	rows = vc->vc_rows;
+	new_cols = info->var.xres / vc->vc_font.width;
+	new_rows = info->var.yres / vc->vc_font.height;
+	vc_resize(vc->vc_num, new_cols, new_rows);
+	/*
+	 * We must always set the mode. The mode of the previous console
+	 * driver could be in the same resolution but we are using different
+	 * hardware so we have to initialize the hardware.
+	 *
+	 * We need to do it in fbcon_init() to prevent screen corruption.
+	 */
+	if (CON_IS_VISIBLE(vc) && info->fbops->fb_set_par)
+		info->fbops->fb_set_par(info);
 
-	cols = info->var.xres / vc->vc_font.width;
-	rows = info->var.yres / vc->vc_font.height;
-	vc_resize(vc->vc_num, cols, rows);
 
-	if (info->var.accel_flags)
-		p->scrollmode = SCROLL_YNOMOVE;
-	else
-		p->scrollmode = SCROLL_YREDRAW;
+	if ((cap & FBINFO_HWACCEL_COPYAREA) &&
+	    !(cap & FBINFO_HWACCEL_DISABLED))
+		p->scrollmode = SCROLL_ACCEL;
+	else /* default to something safe */
+		p->scrollmode = SCROLL_REDRAW;
 
 	/*
 	 *  ++guenther: console.c:vc_allocate() relies on initializing
 	 *  vc_{cols,rows}, but we must not set those if we are only
 	 *  resizing the console.
 	 */
-	if (init) {
-		vc->vc_cols = cols;
-		vc->vc_rows = rows;
+	if (!init) {
+		vc->vc_cols = new_cols;
+		vc->vc_rows = new_rows;
 	}
 
 	if (logo) {
@@ -664,14 +768,15 @@
 		for (r = q - logo_lines * cols; r < q; r++)
 			if (scr_readw(r) != vc->vc_video_erase_char)
 				break;
-		if (r != q && rows >= rows + logo_lines) {
-			save = kmalloc(logo_lines * cols * 2, GFP_KERNEL);
+		if (r != q && new_rows >= rows + logo_lines) {
+			save = kmalloc(logo_lines * new_cols * 2, GFP_KERNEL);
 			if (save) {
+				int i = cols < new_cols ? cols : new_cols;
 				scr_memsetw(save, vc->vc_video_erase_char,
-					    logo_lines * cols * 2);
+					    logo_lines * new_cols * 2);
 				r = q - step;
-				for (cnt = 0; cnt < logo_lines; cnt++, r += cols)
-					scr_memcpyw(save + cnt * cols, r, 2 * cols);
+				for (cnt = 0; cnt < logo_lines; cnt++, r += i)
+					scr_memcpyw(save + cnt * new_cols, r, 2 * i);
 				r = q;
 			}
 		}
@@ -687,19 +792,19 @@
 				vc->vc_pos += logo_lines * vc->vc_size_row;
 			}
 		}
-		scr_memsetw((unsigned short *) vc->vc_origin,
-			    vc->vc_video_erase_char,
-			    vc->vc_size_row * logo_lines);
-
 		if (CON_IS_VISIBLE(vc) && vt_cons[vc->vc_num]->vc_mode == KD_TEXT) {
 			accel_clear_margins(vc, info, 0);
 			update_screen(vc->vc_num);
 		}
+		scr_memsetw((unsigned short *) vc->vc_origin,
+			    vc->vc_video_erase_char,
+			    vc->vc_size_row * logo_lines);
+
 		if (save) {
 			q = (unsigned short *) (vc->vc_origin +
 						vc->vc_size_row *
 						rows);
-			scr_memcpyw(q, save, logo_lines * cols * 2);
+			scr_memcpyw(q, save, logo_lines * new_cols * 2);
 			vc->vc_y += logo_lines;
 			vc->vc_pos += logo_lines * vc->vc_size_row;
 			kfree(save);
@@ -730,6 +835,8 @@
 {
 	struct display *p = &fb_display[vc->vc_num];
 
+	if (info_idx != -1)
+	    return;
 	fbcon_free_font(p);
 }
 
@@ -924,7 +1031,8 @@
 			cursor.set |= FB_CUR_SETHOT;
 		}
 
-		if ((cursor.set & FB_CUR_SETSIZE) || ((vc->vc_cursor_type & 0x0f) != p->cursor_shape)) {
+		if ((cursor.set & FB_CUR_SETSIZE) || ((vc->vc_cursor_type & 0x0f) != p->cursor_shape)
+		    || info->cursor.mask == NULL) {
 			char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC);
 			int cur_height, size, i = 0;
 
@@ -983,6 +1091,57 @@
 	return 0;
 }
 
+static void fbcon_set_disp(struct fb_info *info, struct vc_data *vc)
+{
+	struct display *p = &fb_display[vc->vc_num], *t;
+	struct vc_data **default_mode = vc->vc_display_fg;
+	int display_fg = (*default_mode)->vc_num;
+	int rows, cols, charcnt = 256;
+
+	info->var.xoffset = info->var.yoffset = p->yscroll = 0;
+	t = &fb_display[display_fg];
+	if (!vc->vc_font.data) {
+		vc->vc_font.data = p->fontdata = t->fontdata;
+		vc->vc_font.width = (*default_mode)->vc_font.width;
+		vc->vc_font.height = (*default_mode)->vc_font.height;
+		p->userfont = t->userfont;
+		if (p->userfont)
+			REFCOUNT(p->fontdata)++;
+		con_copy_unimap(vc->vc_num, display_fg);
+	}
+	if (p->userfont)
+		charcnt = FNTCHARCNT(p->fontdata);
+
+	vc->vc_can_do_color = info->var.bits_per_pixel != 1;
+	vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800;
+	if (charcnt == 256) {
+		vc->vc_hi_font_mask = 0;
+	} else {
+		vc->vc_hi_font_mask = 0x100;
+		if (vc->vc_can_do_color)
+			vc->vc_complement_mask <<= 1;
+	}
+	cols = info->var.xres / vc->vc_font.width;
+	rows = info->var.yres / vc->vc_font.height;
+	vc_resize(vc->vc_num, cols, rows);
+	if (CON_IS_VISIBLE(vc)) {
+		update_screen(vc->vc_num);
+		if (softback_buf) {
+			int l = fbcon_softback_size / vc->vc_size_row;
+
+			if (l > 5)
+				softback_end = softback_buf + l *
+					vc->vc_size_row;
+			else {
+				/* Smaller scrollback makes no sense, and 0
+				   would screw the operation totally */
+				softback_top = 0;
+			}
+		}
+	}
+	switch_screen(fg_console);
+}
+
 static __inline__ void ywrap_up(struct vc_data *vc, int count)
 {
 	struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]];
@@ -1245,7 +1404,7 @@
 {
 	struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]];
 	struct display *p = &fb_display[vc->vc_num];
-	int scroll_partial = !(p->scrollmode & __SCROLL_YNOPARTIAL);
+	int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK;
 
 	if (!info->fbops->fb_blank && console_blanked)
 		return 0;
@@ -1269,15 +1428,15 @@
 			fbcon_softback_note(vc, t, count);
 		if (logo_shown >= 0)
 			goto redraw_up;
-		switch (p->scrollmode & __SCROLL_YMASK) {
-		case __SCROLL_YMOVE:
+		switch (p->scrollmode) {
+		case SCROLL_ACCEL:
 			accel_bmove(vc, info, t + count, 0, t, 0,
 					 b - t - count, vc->vc_cols);
 			accel_clear(vc, info, b - count, 0, count,
 					 vc->vc_cols);
 			break;
 
-		case __SCROLL_YWRAP:
+		case SCROLL_WRAP:
 			if (b - t - count > 3 * vc->vc_rows >> 2) {
 				if (t > 0)
 					fbcon_bmove(vc, 0, 0, count, 0, t,
@@ -1287,15 +1446,15 @@
 					fbcon_bmove(vc, b - count, 0, b, 0,
 						    vc->vc_rows - b,
 						    vc->vc_cols);
-			} else if (p->scrollmode & __SCROLL_YPANREDRAW)
-				goto redraw_up;
-			else
+			} else if (info->flags & FBINFO_READS_FAST)
 				fbcon_bmove(vc, t + count, 0, t, 0,
 					    b - t - count, vc->vc_cols);
+			else
+				goto redraw_up;
 			fbcon_clear(vc, b - count, 0, count, vc->vc_cols);
 			break;
 
-		case __SCROLL_YPAN:
+		case SCROLL_PAN:
 			if ((p->yscroll + count <=
 			     2 * (p->vrows - vc->vc_rows))
 			    && ((!scroll_partial && (b - t == vc->vc_rows))
@@ -1310,15 +1469,15 @@
 					fbcon_bmove(vc, b - count, 0, b, 0,
 						    vc->vc_rows - b,
 						    vc->vc_cols);
-			} else if (p->scrollmode & __SCROLL_YPANREDRAW)
-				goto redraw_up;
-			else
+			} else if (info->flags & FBINFO_READS_FAST)
 				fbcon_bmove(vc, t + count, 0, t, 0,
 					    b - t - count, vc->vc_cols);
+			else
+				goto redraw_up;
 			fbcon_clear(vc, b - count, 0, count, vc->vc_cols);
 			break;
 
-		case __SCROLL_YREDRAW:
+		case SCROLL_REDRAW:
 		      redraw_up:
 			fbcon_redraw(vc, p, t, b - t - count,
 				     count * vc->vc_cols);
@@ -1336,14 +1495,14 @@
 	case SM_DOWN:
 		if (count > vc->vc_rows)	/* Maximum realistic size */
 			count = vc->vc_rows;
-		switch (p->scrollmode & __SCROLL_YMASK) {
-		case __SCROLL_YMOVE:
+		switch (p->scrollmode) {
+		case SCROLL_ACCEL:
 			accel_bmove(vc, info, t, 0, t + count, 0,
 					 b - t - count, vc->vc_cols);
 			accel_clear(vc, info, t, 0, count, vc->vc_cols);
 			break;
 
-		case __SCROLL_YWRAP:
+		case SCROLL_WRAP:
 			if (b - t - count > 3 * vc->vc_rows >> 2) {
 				if (vc->vc_rows - b > 0)
 					fbcon_bmove(vc, b, 0, b - count, 0,
@@ -1353,15 +1512,15 @@
 				if (t > 0)
 					fbcon_bmove(vc, count, 0, 0, 0, t,
 						    vc->vc_cols);
-			} else if (p->scrollmode & __SCROLL_YPANREDRAW)
-				goto redraw_down;
-			else
+			} else if (info->flags & FBINFO_READS_FAST)
 				fbcon_bmove(vc, t, 0, t + count, 0,
 					    b - t - count, vc->vc_cols);
+			else
+				goto redraw_down;
 			fbcon_clear(vc, t, 0, count, vc->vc_cols);
 			break;
 
-		case __SCROLL_YPAN:
+		case SCROLL_PAN:
 			if ((count - p->yscroll <= p->vrows - vc->vc_rows)
 			    && ((!scroll_partial && (b - t == vc->vc_rows))
 				|| (scroll_partial
@@ -1375,15 +1534,15 @@
 				if (t > 0)
 					fbcon_bmove(vc, count, 0, 0, 0, t,
 						    vc->vc_cols);
-			} else if (p->scrollmode & __SCROLL_YPANREDRAW)
-				goto redraw_down;
-			else
+			} else if (info->flags & FBINFO_READS_FAST)
 				fbcon_bmove(vc, t, 0, t + count, 0,
 					    b - t - count, vc->vc_cols);
+			else
+				goto redraw_down;
 			fbcon_clear(vc, t, 0, count, vc->vc_cols);
 			break;
 
-		case __SCROLL_YREDRAW:
+		case SCROLL_REDRAW:
 		      redraw_down:
 			fbcon_redraw(vc, p, b - 1, b - t - count,
 				     -count * vc->vc_cols);
@@ -1467,21 +1626,27 @@
 
 static __inline__ void updatescrollmode(struct display *p, struct fb_info *info, struct vc_data *vc)
 {
-	int m;
-
-	if (p->scrollmode & __SCROLL_YFIXED)
-		return;
-	if (divides(info->fix.ywrapstep, vc->vc_font.height) &&
-	    divides(vc->vc_font.height, info->var.yres_virtual))
-		m = __SCROLL_YWRAP;
-	else if (divides(info->fix.ypanstep, vc->vc_font.height) &&
-		 info->var.yres_virtual >= info->var.yres + vc->vc_font.height)
-		m = __SCROLL_YPAN;
-	else if (p->scrollmode & __SCROLL_YNOMOVE)
-		m = __SCROLL_YREDRAW;
-	else
-		m = __SCROLL_YMOVE;
-	p->scrollmode = (p->scrollmode & ~__SCROLL_YMASK) | m;
+	int cap = info->flags;
+	int good_pan = (cap & FBINFO_HWACCEL_YPAN)
+		 && divides(info->fix.ypanstep, vc->vc_font.height)
+		 && info->var.yres_virtual >= 2*info->var.yres;
+	int good_wrap = (cap & FBINFO_HWACCEL_YWRAP)
+		 && divides(info->fix.ywrapstep, vc->vc_font.height)
+		 && divides(vc->vc_font.height, info->var.yres_virtual);
+	int reading_fast = cap & FBINFO_READS_FAST;
+	int fast_copyarea = (cap & FBINFO_HWACCEL_COPYAREA) && !(cap & FBINFO_HWACCEL_DISABLED);
+
+	if (good_wrap || good_pan) {
+		if (reading_fast || fast_copyarea)
+			p->scrollmode = good_wrap ? SCROLL_WRAP : SCROLL_PAN;
+		else
+			p->scrollmode = SCROLL_REDRAW;
+	} else {
+		if (reading_fast || fast_copyarea)
+			p->scrollmode = SCROLL_ACCEL;
+		else
+			p->scrollmode = SCROLL_REDRAW;
+	}
 }
 
 static int fbcon_resize(struct vc_data *vc, unsigned int width, 
@@ -1505,9 +1670,10 @@
 		if (!info->fbops->fb_set_par)
 			return -EINVAL;
 
-		sprintf(mode, "%dx%d", var.xres, var.yres);
-		err = fb_find_mode(&var, info, mode, NULL, 0, NULL,
-					info->var.bits_per_pixel);
+		snprintf(mode, 40, "%ix%i", var.xres, var.yres);
+		err = fb_find_mode(&var, info, mode, info->monspecs.modedb,
+				   info->monspecs.modedb_len, NULL,
+				   info->var.bits_per_pixel);
 		if (!err || width > var.xres/fw || height > var.yres/fh)
 			return -EINVAL;
 		DPRINTK("resize now %ix%i\n", var.xres, var.yres);
@@ -1529,6 +1695,7 @@
 {
 	struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]];
 	struct display *p = &fb_display[vc->vc_num];
+	int i;
 
 	if (softback_top) {
 		int l = fbcon_softback_size / vc->vc_size_row;
@@ -1555,12 +1722,26 @@
 	}
 	if (info)
 		info->var.yoffset = p->yscroll = 0;
-        fbcon_resize(vc, vc->vc_cols, vc->vc_rows);
-	switch (p->scrollmode & __SCROLL_YMASK) {
-	case __SCROLL_YWRAP:
+
+	/*
+	 * FIXME: If we have multiple fbdev's loaded, we need to
+	 * update all info->currcon.  Perhaps, we can place this
+	 * in a centralized structure, but this might break some
+	 * drivers.
+	 *
+	 * info->currcon = vc->vc_num;
+	 */
+	for (i = 0; i < FB_MAX; i++) {
+		if (registered_fb[i] != NULL)
+			registered_fb[i]->currcon = vc->vc_num;
+	}
+
+ 	fbcon_resize(vc, vc->vc_cols, vc->vc_rows);
+	switch (p->scrollmode) {
+	case SCROLL_WRAP:
 		scrollback_phys_max = p->vrows - vc->vc_rows;
 		break;
-	case __SCROLL_YPAN:
+	case SCROLL_PAN:
 		scrollback_phys_max = p->vrows - 2 * vc->vc_rows;
 		if (scrollback_phys_max < 0)
 			scrollback_phys_max = 0;
@@ -1572,14 +1753,23 @@
 	scrollback_max = 0;
 	scrollback_current = 0;
 
-	info->currcon = vc->vc_num;
-	
 	update_var(vc->vc_num, info);
 	fbcon_set_palette(vc, color_table); 	
 
 	if (vt_cons[vc->vc_num]->vc_mode == KD_TEXT)
 		accel_clear_margins(vc, info, 0);
 	if (logo_shown == -2) {
+		struct fb_fillrect rect;
+		int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
+
+		logo_shown = fg_console;
+		rect.color = attr_bgcol_ec(bgshift, vc);
+		rect.rop = ROP_COPY;
+		rect.dx = rect.dy = 0;
+		rect.width = info->var.xres;
+		rect.height = logo_lines * vc->vc_font.height;
+		info->fbops->fb_fillrect(info, &rect);
+
 		logo_shown = fg_console;
 		/* This is protected above by initmem_freed */
 		fb_show_logo(info);
@@ -2133,11 +2323,11 @@
 
 	offset = p->yscroll - scrollback_current;
 	limit = p->vrows;
-	switch (p->scrollmode && __SCROLL_YMASK) {
-	case __SCROLL_YWRAP:
+	switch (p->scrollmode) {
+	case SCROLL_WRAP:
 		info->var.vmode |= FB_VMODE_YWRAP;
 		break;
-	case __SCROLL_YPAN:
+	case SCROLL_PAN:
 		limit -= vc->vc_rows;
 		info->var.vmode &= ~FB_VMODE_YWRAP;
 		break;
@@ -2178,6 +2368,57 @@
 
 	update_screen(vc->vc_num);
 }
+
+static void fbcon_modechanged(struct fb_info *info)
+{
+	struct vc_data *vc = vc_cons[info->currcon].d;
+	struct display *p;
+	int rows, cols;
+
+	if (info->currcon < 0 || vt_cons[info->currcon]->vc_mode !=
+	    KD_TEXT)
+		return;
+	p = &fb_display[vc->vc_num];
+
+	info->var.xoffset = info->var.yoffset = p->yscroll = 0;
+	vc->vc_can_do_color = info->var.bits_per_pixel != 1;
+	vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800;
+
+	if (CON_IS_VISIBLE(vc)) {
+		cols = info->var.xres / vc->vc_font.width;
+		rows = info->var.yres / vc->vc_font.height;
+		vc_resize(vc->vc_num, cols, rows);
+		switch (p->scrollmode) {
+		case SCROLL_WRAP:
+			scrollback_phys_max = p->vrows - vc->vc_rows;
+			break;
+		case SCROLL_PAN:
+			scrollback_phys_max = p->vrows - 2 * vc->vc_rows;
+			if (scrollback_phys_max < 0)
+				scrollback_phys_max = 0;
+			break;
+		default:
+			scrollback_phys_max = 0;
+			break;
+		}
+		scrollback_max = 0;
+		scrollback_current = 0;
+		update_var(vc->vc_num, info);
+		fbcon_set_palette(vc, color_table);
+		update_screen(vc->vc_num);
+		if (softback_buf) {
+			int l = fbcon_softback_size / vc->vc_size_row;
+			if (l > 5)
+				softback_end = softback_buf + l * vc->vc_size_row;
+			else {
+				/* Smaller scrollback makes no sense, and 0
+				   would screw the operation totally */
+				softback_top = 0;
+			}
+		}
+	}
+}
+
 static int fbcon_event_notify(struct notifier_block *self, 
 			      unsigned long action, void *data)
 {
@@ -2190,7 +2431,11 @@
 	case FB_EVENT_RESUME:
 		fbcon_resumed(info);
 		break;
+	case FB_EVENT_MODE_CHANGE:
+		fbcon_modechanged(info);
+		break;
 	}
+
 	return 0;
 }
 
@@ -2221,27 +2466,42 @@
 	.con_resize             = fbcon_resize,
 };
 
-static struct notifier_block fbcon_event_notifer = {
+static struct notifier_block fbcon_event_notifier = {
 	.notifier_call	= fbcon_event_notify,
 };
-
 static int fbcon_event_notifier_registered;
 
 int __init fb_console_init(void)
 {
-	int err;
+	int err, i;
+
+	for (i = 0; i < MAX_NR_CONSOLES; i++)
+		con2fb_map[i] = -1;
 
 	if (!num_registered_fb)
 		return -ENODEV;
 
+	if (info_idx == -1) {
+		for (i = 0; i < FB_MAX; i++) {
+			if (registered_fb[i] != NULL) {
+				info_idx = i;
+				break;
+			}
+		}
+	}
+	for (i = first_fb_vc; i <= last_fb_vc; i++)
+		con2fb_map[i] = info_idx;
 	err = take_over_console(&fb_con, first_fb_vc, last_fb_vc,
 				fbcon_is_default);
-	if (err)
+	if (err) {
+		for (i = first_fb_vc; i <= last_fb_vc; i++) {
+			con2fb_map[i] = -1;
+		}
 		return err;
-
+	}
 	acquire_console_sem();
 	if (!fbcon_event_notifier_registered) {
-		fb_register_client(&fbcon_event_notifer);
+		fb_register_client(&fbcon_event_notifier);
 		fbcon_event_notifier_registered = 1;
 	} 
 	release_console_sem();
@@ -2254,7 +2514,7 @@
 {
 	acquire_console_sem();
 	if (fbcon_event_notifier_registered) {
-		fb_unregister_client(&fbcon_event_notifer);
+		fb_unregister_client(&fbcon_event_notifier);
 		fbcon_event_notifier_registered = 0;
 	}
 	release_console_sem();
--- diff/drivers/video/console/fbcon.h	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/console/fbcon.h	2004-07-01 21:32:47.000000000 +0100
@@ -36,7 +36,7 @@
 };
 
 /* drivers/video/console/fbcon.c */
-extern char con2fb_map[MAX_NR_CONSOLES];
+extern signed char con2fb_map[MAX_NR_CONSOLES];
 extern int set_con2fb_map(int unit, int newidx);
 
     /*
@@ -67,40 +67,27 @@
      *  Scroll Method
      */
      
-/* Internal flags */
-#define __SCROLL_YPAN		0x001
-#define __SCROLL_YWRAP		0x002
-#define __SCROLL_YMOVE		0x003
-#define __SCROLL_YREDRAW	0x004
-#define __SCROLL_YMASK		0x00f
-#define __SCROLL_YFIXED		0x010
-#define __SCROLL_YNOMOVE	0x020
-#define __SCROLL_YPANREDRAW	0x040
-#define __SCROLL_YNOPARTIAL	0x080
-
-/* Only these should be used by the drivers */
-/* Which one should you use? If you have a fast card and slow bus,
-   then probably just 0 to indicate fbcon should choose between
-   YWRAP/YPAN+MOVE/YMOVE. On the other side, if you have a fast bus
-   and even better if your card can do fonting (1->8/32bit painting),
-   you should consider either SCROLL_YREDRAW (if your card is
-   able to do neither YPAN/YWRAP), or SCROLL_YNOMOVE.
-   The best is to test it with some real life scrolling (usually, not
-   all lines on the screen are filled completely with non-space characters,
-   and REDRAW performs much better on such lines, so don't cat a file
-   with every line covering all screen columns, it would not be the right
-   benchmark).
+/* There are several methods fbcon can use to move text around the screen:
+ *
+ * + use the hardware engine to move the text
+ *    (hw-accelerated copyarea() and fillrect())
+ * + use hardware-supported panning on a large virtual screen
+ * + amifb can not only pan, but also wrap the display by N lines
+ *    (i.e. visible line i = physical line (i+N) % yres).
+ * + read what's already rendered on the screen and
+ *     write it in a different place (this is cfb_copyarea())
+ * + re-render the text to the screen
+ *
+ * Whether to use wrapping or panning can only be figured out at
+ * runtime (when we know whether our font height is a multiple
+ * of the pan/wrap step)
+ *
  */
-#define SCROLL_YREDRAW		(__SCROLL_YFIXED|__SCROLL_YREDRAW)
-#define SCROLL_YNOMOVE		(__SCROLL_YNOMOVE|__SCROLL_YPANREDRAW)
 
-/* SCROLL_YNOPARTIAL, used in combination with the above, is for video
-   cards which can not handle using panning to scroll a portion of the
-   screen without excessive flicker.  Panning will only be used for
-   whole screens.
- */
-/* Namespace consistency */
-#define SCROLL_YNOPARTIAL	__SCROLL_YNOPARTIAL
+#define SCROLL_ACCEL	0x001
+#define SCROLL_PAN	0x002
+#define SCROLL_WRAP	0x003
+#define SCROLL_REDRAW	0x004
 
 extern int fb_console_init(void);
 
--- diff/drivers/video/console/sticore.c	2004-05-19 22:12:22.000000000 +0100
+++ source/drivers/video/console/sticore.c	2004-07-01 21:32:47.000000000 +0100
@@ -22,7 +22,6 @@
 #include <linux/pci.h>
 #include <linux/font.h>
 
-#include <asm/pgalloc.h>
 #include <asm/hardware.h>
 #include <asm/parisc-device.h>
 #include <asm/cacheflush.h>
--- diff/drivers/video/console/vgacon.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/console/vgacon.c	2004-07-01 21:32:47.000000000 +0100
@@ -963,6 +963,8 @@
 		p = (c->vc_visible_origin - vga_vram_base - ul + we) % we +
 		    lines * c->vc_size_row;
 		st = (c->vc_origin - vga_vram_base - ul + we) % we;
+		if (st < 2 * margin)
+			margin = 0;
 		if (p < margin)
 			p = 0;
 		if (p > st - margin)
--- diff/drivers/video/fbmem.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/fbmem.c	2004-07-01 21:32:47.000000000 +0100
@@ -73,8 +73,8 @@
 extern int cyber2000fb_setup(char*);
 extern int retz3fb_init(void);
 extern int retz3fb_setup(char*);
-extern int clgenfb_init(void);
-extern int clgenfb_setup(char*);
+extern int cirrusfb_init(void);
+extern int cirrusfb_setup(char*);
 extern int hitfb_init(void);
 extern int vfb_init(void);
 extern int vfb_setup(char*);
@@ -172,6 +172,7 @@
 extern int kyrofb_setup(char*);
 extern int mc68x328fb_init(void);
 extern int mc68x328fb_setup(char *);
+extern int asiliantfb_init(void);
 
 static struct {
 	const char *name;
@@ -203,8 +204,8 @@
 #ifdef CONFIG_FB_PM3
 	{ "pm3fb", pm3fb_init, pm3fb_setup },
 #endif           
-#ifdef CONFIG_FB_CLGEN
-	{ "clgenfb", clgenfb_init, clgenfb_setup },
+#ifdef CONFIG_FB_CIRRUS
+	{ "cirrusfb", cirrusfb_init, cirrusfb_setup },
 #endif
 #ifdef CONFIG_FB_ATY
 	{ "atyfb", atyfb_init, atyfb_setup },
@@ -385,6 +386,9 @@
 #ifdef CONFIG_FB_68328
 	{ "68328fb", mc68x328fb_init, mc68x328fb_setup },
 #endif
+#ifdef CONFIG_FB_ASILIANT
+	{ "asiliantfb", asiliantfb_init, NULL },
+#endif
 
 	/*
 	 * Generic drivers that don't use resource management (yet)
@@ -802,7 +806,7 @@
 }
 
 static ssize_t
-fb_read(struct file *file, char *buf, size_t count, loff_t *ppos)
+fb_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 {
 	unsigned long p = *ppos;
 	struct inode *inode = file->f_dentry->d_inode;
@@ -839,7 +843,7 @@
 }
 
 static ssize_t
-fb_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
 	unsigned long p = *ppos;
 	struct inode *inode = file->f_dentry->d_inode;
@@ -916,26 +920,30 @@
 	
 	if (cursor.set & FB_CUR_SETSHAPE) {
 		int size = ((cursor.image.width + 7) >> 3) * cursor.image.height;		
+		char *data, *mask;
+
 		if ((cursor.image.height != info->cursor.image.height) ||
 		    (cursor.image.width != info->cursor.image.width))
 			cursor.set |= FB_CUR_SETSIZE;
 		
-		cursor.image.data = kmalloc(size, GFP_KERNEL);
-		if (!cursor.image.data)
+		data = kmalloc(size, GFP_KERNEL);
+		if (!data)
 			return -ENOMEM;
 		
-		cursor.mask = kmalloc(size, GFP_KERNEL);
-		if (!cursor.mask) {
-			kfree(cursor.image.data);
+		mask = kmalloc(size, GFP_KERNEL);
+		if (!mask) {
+			kfree(data);
 			return -ENOMEM;
 		}
 		
-		if (copy_from_user(cursor.image.data, sprite->image.data, size) ||
-		    copy_from_user(cursor.mask, sprite->mask, size)) { 
-			kfree(cursor.image.data);
-			kfree(cursor.mask);
+		if (copy_from_user(data, sprite->image.data, size) ||
+		    copy_from_user(mask, sprite->mask, size)) {
+			kfree(data);
+			kfree(mask);
 			return -EFAULT;
 		}
+		cursor.image.data = data;
+		cursor.mask = mask;
 	}
 	info->cursor.set = cursor.set;
 	info->cursor.rop = cursor.rop;
@@ -990,7 +998,11 @@
 
 			fb_set_cmap(&info->cmap, 1, info);
 
-			notifier_call_chain(&fb_notifier_list, FB_EVENT_MODE_CHANGE, info);
+			if (info->flags & FBINFO_MISC_MODECHANGEUSER) {
+				notifier_call_chain(&fb_notifier_list,
+						    FB_EVENT_MODE_CHANGE, info);
+				info->flags &= ~FBINFO_MISC_MODECHANGEUSER;
+			}
 		}
 	}
 	return 0;
@@ -1041,7 +1053,9 @@
 		if (copy_from_user(&var, (void *) arg, sizeof(var)))
 			return -EFAULT;
 		acquire_console_sem();
+		info->flags |= FBINFO_MISC_MODECHANGEUSER;
 		i = fb_set_var(info, &var);
+		info->flags &= ~FBINFO_MISC_MODECHANGEUSER;
 		release_console_sem();
 		if (i) return i;
 		if (copy_to_user((void *) arg, &var, sizeof(var)))
@@ -1096,11 +1110,10 @@
 #endif /* CONFIG_KMOD */
 		if (!registered_fb[con2fb.framebuffer])
 		    return -EINVAL;
-		if (con2fb.console != 0)
-			set_con2fb_map(con2fb.console-1, con2fb.framebuffer);
-		else
-			fb_console_init();		
-		return 0;
+		if (con2fb.console > 0 && con2fb.console < MAX_NR_CONSOLES)
+			return set_con2fb_map(con2fb.console-1,
+					      con2fb.framebuffer);
+		return -EINVAL;
 #endif	/* CONFIG_FRAMEBUFFER_CONSOLE */
 	case FBIOBLANK:
 		acquire_console_sem();
--- diff/drivers/video/imsttfb.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/imsttfb.c	2004-07-01 21:32:47.000000000 +0100
@@ -1267,48 +1267,49 @@
 	      u_long arg, struct fb_info *info)
 {
 	struct imstt_par *par = (struct imstt_par *) info->par;
+	void __user *argp = (void __user *)arg;
 	__u32 reg[2];
 	__u8 idx[2];
 
 	switch (cmd) {
 		case FBIMSTT_SETREG:
-			if (copy_from_user(reg, (void *)arg, 8) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0]))
+			if (copy_from_user(reg, argp, 8) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0]))
 				return -EFAULT;
 			write_reg_le32(par->dc_regs, reg[0], reg[1]);
 			return 0;
 		case FBIMSTT_GETREG:
-			if (copy_from_user(reg, (void *)arg, 4) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0]))
+			if (copy_from_user(reg, argp, 4) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0]))
 				return -EFAULT;
 			reg[1] = read_reg_le32(par->dc_regs, reg[0]);
-			if (copy_to_user((void *)(arg + 4), &reg[1], 4))
+			if (copy_to_user((void __user *)(arg + 4), &reg[1], 4))
 				return -EFAULT;
 			return 0;
 		case FBIMSTT_SETCMAPREG:
-			if (copy_from_user(reg, (void *)arg, 8) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0]))
+			if (copy_from_user(reg, argp, 8) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0]))
 				return -EFAULT;
 			write_reg_le32(((u_int *)par->cmap_regs), reg[0], reg[1]);
 			return 0;
 		case FBIMSTT_GETCMAPREG:
-			if (copy_from_user(reg, (void *)arg, 4) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0]))
+			if (copy_from_user(reg, argp, 4) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0]))
 				return -EFAULT;
 			reg[1] = read_reg_le32(((u_int *)par->cmap_regs), reg[0]);
-			if (copy_to_user((void *)(arg + 4), &reg[1], 4))
+			if (copy_to_user((void __user *)(arg + 4), &reg[1], 4))
 				return -EFAULT;
 			return 0;
 		case FBIMSTT_SETIDXREG:
-			if (copy_from_user(idx, (void *)arg, 2))
+			if (copy_from_user(idx, argp, 2))
 				return -EFAULT;
 			par->cmap_regs[PIDXHI] = 0;		eieio();
 			par->cmap_regs[PIDXLO] = idx[0];	eieio();
 			par->cmap_regs[PIDXDATA] = idx[1];	eieio();
 			return 0;
 		case FBIMSTT_GETIDXREG:
-			if (copy_from_user(idx, (void *)arg, 1))
+			if (copy_from_user(idx, argp, 1))
 				return -EFAULT;
 			par->cmap_regs[PIDXHI] = 0;		eieio();
 			par->cmap_regs[PIDXLO] = idx[0];	eieio();
 			idx[1] = par->cmap_regs[PIDXDATA];
-			if (copy_to_user((void *)(arg + 1), &idx[1], 1))
+			if (copy_to_user((void __user *)(arg + 1), &idx[1], 1))
 				return -EFAULT;
 			return 0;
 		default:
--- diff/drivers/video/kyro/fbdev.c	2004-05-19 22:12:22.000000000 +0100
+++ source/drivers/video/kyro/fbdev.c	2004-07-01 21:32:47.000000000 +0100
@@ -592,11 +592,11 @@
 {
 	overlay_create ol_create;
 	overlay_viewport_set ol_viewport_set;
+	void __user *argp = (void __user *)arg;
 
 	switch (cmd) {
 	case KYRO_IOCTL_OVERLAY_CREATE:
-		copy_from_user((void *) &ol_create, (void *) arg,
-			       sizeof(overlay_create));
+		copy_from_user(&ol_create, argp, sizeof(overlay_create));
 
 		if (kyro_dev_overlay_create(ol_create.ulWidth,
 					    ol_create.ulHeight, 0) < 0) {
@@ -606,7 +606,7 @@
 		}
 		break;
 	case KYRO_IOCTL_OVERLAY_VIEWPORT_SET:
-		copy_from_user((void *) &ol_viewport_set, (void *) arg,
+		copy_from_user(&ol_viewport_set, argp,
 			       sizeof(overlay_viewport_set));
 
 		if (kyro_dev_overlay_viewport_set(ol_viewport_set.xOrgin,
@@ -627,13 +627,13 @@
 		}
 		break;
 	case KYRO_IOCTL_UVSTRIDE:
-		copy_to_user((void *)arg, (void *)&deviceInfo.ulOverlayUVStride, sizeof(unsigned long));
+		copy_to_user(argp, &deviceInfo.ulOverlayUVStride, sizeof(unsigned long));
 		break;
 	case KYRO_IOCTL_STRIDE:
-		copy_to_user((void *)arg, (void *)&deviceInfo.ulOverlayStride, sizeof(unsigned long));
+		copy_to_user(argp, &deviceInfo.ulOverlayStride, sizeof(unsigned long));
 		break;
 	case KYRO_IOCTL_OVERLAY_OFFSET:
-		copy_to_user((void *)arg, (void *)&deviceInfo.ulOverlayOffset, sizeof(unsigned long));
+		copy_to_user(argp, &deviceInfo.ulOverlayOffset, sizeof(unsigned long));
 		break;
 	}
 
--- diff/drivers/video/matrox/matroxfb_base.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/matrox/matroxfb_base.c	2004-07-01 21:32:47.000000000 +0100
@@ -874,6 +874,7 @@
 			  unsigned int cmd, unsigned long arg,
 			  struct fb_info *info)
 {
+	void __user *argp = (void __user *)arg;
 	MINFO_FROM_INFO(info);
 	
 	DBG(__FUNCTION__)
@@ -891,7 +892,7 @@
 				err = matroxfb_get_vblank(PMINFO &vblank);
 				if (err)
 					return err;
-				if (copy_to_user((struct fb_vblank*)arg, &vblank, sizeof(vblank)))
+				if (copy_to_user(argp, &vblank, sizeof(vblank)))
 					return -EFAULT;
 				return 0;
 			}
@@ -899,7 +900,7 @@
 			{
 				u_int32_t crt;
 
-				if (get_user(crt, (u_int32_t *)arg))
+				if (get_user(crt, (u_int32_t __user *)arg))
 					return -EFAULT;
 
 				return matroxfb_wait_for_sync(PMINFO crt);
@@ -910,7 +911,7 @@
 				struct matrox_altout *oproc;
 				int val;
 
-				if (copy_from_user(&mom, (struct matroxioc_output_mode*)arg, sizeof(mom)))
+				if (copy_from_user(&mom, argp, sizeof(mom)))
 					return -EFAULT;
 				if (mom.output >= MATROXFB_MAX_OUTPUTS)
 					return -ENXIO;
@@ -960,7 +961,7 @@
 				struct matrox_altout *oproc;
 				int val;
 
-				if (copy_from_user(&mom, (struct matroxioc_output_mode*)arg, sizeof(mom)))
+				if (copy_from_user(&mom, argp, sizeof(mom)))
 					return -EFAULT;
 				if (mom.output >= MATROXFB_MAX_OUTPUTS)
 					return -ENXIO;
@@ -975,7 +976,7 @@
 				up_read(&ACCESS_FBINFO(altout.lock));
 				if (val)
 					return val;
-				if (copy_to_user((struct matroxioc_output_mode*)arg, &mom, sizeof(mom)))
+				if (copy_to_user(argp, &mom, sizeof(mom)))
 					return -EFAULT;
 				return 0;
 			}
@@ -985,7 +986,7 @@
 				int i;
 				int changes;
 
-				if (copy_from_user(&tmp, (u_int32_t*)arg, sizeof(tmp)))
+				if (copy_from_user(&tmp, argp, sizeof(tmp)))
 					return -EFAULT;
 				for (i = 0; i < 32; i++) {
 					if (tmp & (1 << i)) {
@@ -1040,7 +1041,7 @@
 						conn |= 1 << i;
 					}
 				}
-				if (put_user(conn, (u_int32_t*)arg))
+				if (put_user(conn, (u_int32_t __user *)arg))
 					return -EFAULT;
 				return 0;
 			}
@@ -1065,7 +1066,7 @@
 					if (conn & MATROXFB_OUTPUT_CONN_SECONDARY)
 						conn &= ~MATROXFB_OUTPUT_CONN_DFP;
 				}
-				if (put_user(conn, (u_int32_t*)arg))
+				if (put_user(conn, (u_int32_t __user *)arg))
 					return -EFAULT;
 				return 0;
 			}
@@ -1079,7 +1080,7 @@
 						conn |= 1 << i;
 					}
 				}
-				if (put_user(conn, (u_int32_t*)arg))
+				if (put_user(conn, (u_int32_t __user *)arg))
 					return -EFAULT;
 				return 0;
 			}
@@ -1093,7 +1094,7 @@
 				sprintf(r.bus_info, "PCI:%s", pci_name(ACCESS_FBINFO(pcidev)));
 				r.version = KERNEL_VERSION(1,0,0);
 				r.capabilities = V4L2_CAP_VIDEO_OUTPUT;
-				if (copy_to_user((void*)arg, &r, sizeof(r)))
+				if (copy_to_user(argp, &r, sizeof(r)))
 					return -EFAULT;
 				return 0;
 				
@@ -1103,7 +1104,7 @@
 				struct v4l2_queryctrl qctrl;
 				int err;
 
-				if (copy_from_user(&qctrl, (struct v4l2_queryctrl*)arg, sizeof(qctrl)))
+				if (copy_from_user(&qctrl, argp, sizeof(qctrl)))
 					return -EFAULT;
 
 				down_read(&ACCESS_FBINFO(altout).lock);
@@ -1116,7 +1117,7 @@
 				}
 				up_read(&ACCESS_FBINFO(altout).lock);
 				if (err >= 0 &&
-				    copy_to_user((struct v4l2_queryctrl*)arg, &qctrl, sizeof(qctrl)))
+				    copy_to_user(argp, &qctrl, sizeof(qctrl)))
 					return -EFAULT;
 				return err;
 			}
@@ -1125,7 +1126,7 @@
 				struct v4l2_control ctrl;
 				int err;
 
-				if (copy_from_user(&ctrl, (struct v4l2_control*)arg, sizeof(ctrl)))
+				if (copy_from_user(&ctrl, argp, sizeof(ctrl)))
 					return -EFAULT;
 
 				down_read(&ACCESS_FBINFO(altout).lock);
@@ -1138,7 +1139,7 @@
 				}
 				up_read(&ACCESS_FBINFO(altout).lock);
 				if (err >= 0 &&
-				    copy_to_user((struct v4l2_control*)arg, &ctrl, sizeof(ctrl)))
+				    copy_to_user(argp, &ctrl, sizeof(ctrl)))
 					return -EFAULT;
 				return err;
 			}
@@ -1147,7 +1148,7 @@
 				struct v4l2_control ctrl;
 				int err;
 
-				if (copy_from_user(&ctrl, (struct v4l2_control*)arg, sizeof(ctrl)))
+				if (copy_from_user(&ctrl, argp, sizeof(ctrl)))
 					return -EFAULT;
 
 				down_read(&ACCESS_FBINFO(altout).lock);
--- diff/drivers/video/matrox/matroxfb_crtc2.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/matrox/matroxfb_crtc2.c	2004-07-01 21:32:47.000000000 +0100
@@ -437,7 +437,7 @@
 				err = matroxfb_dh_get_vblank(m2info, &vblank);
 				if (err)
 					return err;
-				if (copy_to_user((struct fb_vblank*)arg, &vblank, sizeof(vblank)))
+				if (copy_to_user((void __user *)arg, &vblank, sizeof(vblank)))
 					return -EFAULT;
 				return 0;
 			}
@@ -445,7 +445,7 @@
 			{
 				u_int32_t crt;
 
-				if (get_user(crt, (u_int32_t *)arg))
+				if (get_user(crt, (u_int32_t __user *)arg))
 					return -EFAULT;
 
 				if (crt != 0)
@@ -464,7 +464,7 @@
 				int out;
 				int changes;
 
-				if (get_user(tmp, (u_int32_t*)arg))
+				if (get_user(tmp, (u_int32_t __user *)arg))
 					return -EFAULT;
 				for (out = 0; out < 32; out++) {
 					if (tmp & (1 << out)) {
@@ -514,7 +514,7 @@
 						conn |= 1 << out;
 					}
 				}
-				if (put_user(conn, (u_int32_t*)arg))
+				if (put_user(conn, (u_int32_t __user *)arg))
 					return -EFAULT;
 				return 0;
 			}
@@ -539,7 +539,7 @@
 						tmp = 0;
 					}
 				}
-				if (put_user(tmp, (u_int32_t*)arg))
+				if (put_user(tmp, (u_int32_t __user *)arg))
 					return -EFAULT;
 				return 0;
 			}
--- diff/drivers/video/modedb.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/modedb.c	2004-07-01 21:32:47.000000000 +0100
@@ -490,6 +490,7 @@
 	int res_specified = 0, bpp_specified = 0, refresh_specified = 0;
 	unsigned int xres = 0, yres = 0, bpp = default_bpp, refresh = 0;
 	int yres_specified = 0;
+	u32 best = -1, diff = -1;
 
 	for (i = namelen-1; i >= 0; i--) {
 	    switch (name[i]) {
@@ -529,8 +530,8 @@
 	}
 done:
 	for (i = refresh_specified; i >= 0; i--) {
-	    DPRINTK("Trying specified video mode%s\n",
-		    i ? "" : " (ignoring refresh rate)");
+	    DPRINTK("Trying specified video mode%s %ix%i\n",
+		    i ? "" : " (ignoring refresh rate)", xres, yres);
 	    for (j = 0; j < dbsize; j++)
 		if ((name_matches(db[j], name, namelen) ||
 		     (res_specified && res_matches(db[j], xres, yres))) &&
@@ -538,6 +539,22 @@
 		    !fb_try_mode(var, info, &db[j], bpp))
 		    return 2-i;
 	}
+	DPRINTK("Trying best-fit modes\n");
+	for (i = 0; i < dbsize; i++) {
+	    if (xres <= db[i].xres && yres <= db[i].yres) {
+		DPRINTK("Trying %ix%i\n", db[i].xres, db[i].yres);
+		if (!fb_try_mode(var, info, &db[i], bpp)) {
+		    if (diff > (db[i].xres - xres) + (db[i].yres - yres)) {
+			diff = (db[i].xres - xres) + (db[i].yres - yres);
+			best = i;
+		    }
+		}
+	    }
+	}
+	if (best != -1) {
+	    fb_try_mode(var, info, &db[best], bpp);
+	    return 5;
+	}
     }
 
     DPRINTK("Trying default video mode\n");
--- diff/drivers/video/pxafb.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/pxafb.c	2004-07-01 21:32:47.000000000 +0100
@@ -42,7 +42,6 @@
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/mach-types.h>
 #include <asm/uaccess.h>
 #include <asm/arch/bitfield.h>
 #include <asm/arch/pxafb.h>
@@ -109,10 +108,13 @@
 	u_int val, ret = 1;
 
 	if (regno < fbi->palette_size) {
-		val  = ((red   >>  0) & 0xf800);
-		val |= ((green >>  5) & 0x07e0);
-		val |= ((blue  >> 11) & 0x001f);
-
+		if (fbi->fb.var.grayscale) {
+			val = ((blue >> 8) & 0x00ff);
+		} else {
+			val  = ((red   >>  0) & 0xf800);
+			val |= ((green >>  5) & 0x07e0);
+			val |= ((blue  >> 11) & 0x001f);
+		}
 		fbi->palette_cpu[regno] = val;
 		ret = 0;
 	}
@@ -150,7 +152,7 @@
 	switch (fbi->fb.fix.visual) {
 	case FB_VISUAL_TRUECOLOR:
 		/*
-		 * 12 or 16-bit True Colour.  We encode the RGB value
+		 * 16-bit True Colour.  We encode the RGB value
 		 * according to the RGB bitfield information.
 		 */
 		if (regno < 16) {
@@ -242,7 +244,7 @@
 	 * The pixel packing format is described on page 7-11 of the
 	 * PXA2XX Developer's Manual.
          */
-	if ( var->bits_per_pixel == 16 ) {
+	if (var->bits_per_pixel == 16) {
 		var->red.offset   = 11; var->red.length   = 5;
 		var->green.offset = 5;  var->green.length = 6;
 		var->blue.offset  = 0;  var->blue.length  = 5;
@@ -297,7 +299,10 @@
 
 	fbi->fb.fix.line_length = var->xres_virtual *
 				  var->bits_per_pixel / 8;
-	fbi->palette_size = var->bits_per_pixel == 8 ? 256 : 16;
+	if (var->bits_per_pixel == 16)
+		fbi->palette_size = 0;
+	else
+		fbi->palette_size = var->bits_per_pixel == 1 ? 4 : 1 << var->bits_per_pixel;
 
 	palette_mem_size = fbi->palette_size * sizeof(u16);
 
@@ -311,6 +316,11 @@
 	 */
 	pxafb_set_truecolor(fbi->fb.fix.visual == FB_VISUAL_TRUECOLOR);
 
+	if (fbi->fb.var.bits_per_pixel == 16)
+		fb_dealloc_cmap(&fbi->fb.cmap);
+	else
+		fb_alloc_cmap(&fbi->fb.cmap, 1<<fbi->fb.var.bits_per_pixel, 0);
+
 	pxafb_activate_var(var, fbi);
 
 	return 0;
@@ -349,7 +359,7 @@
 /*
  * pxafb_blank():
  *	Blank the display by setting all palette values to zero.  Note, the
- * 	12 and 16 bpp modes don't really use the palette, so this will not
+ * 	16 bpp mode does not really use the palette, so this will not
  *      blank the display in all modes.
  */
 static int pxafb_blank(int blank, struct fb_info *info)
@@ -514,7 +524,7 @@
 	 * the YRES parameter.
 	 */
 	lines_per_panel = var->yres;
-	if (fbi->lccr0 & LCCR0_SDS)
+	if ((fbi->lccr0 & LCCR0_SDS) == LCCR0_Dual)
 		lines_per_panel /= 2;
 
 	new_regs.lccr2 =
@@ -566,20 +576,16 @@
 	fbi->dmadesc_palette_cpu->fidr  = 0;
 	fbi->dmadesc_palette_cpu->ldcmd = (fbi->palette_size * 2) | LDCMD_PAL;
 
-	if( var->bits_per_pixel < 12)
-	{
-		/* assume any mode with <12 bpp is palette driven */
-		fbi->dmadesc_palette_cpu->fdadr = fbi->dmadesc_fbhigh_dma;
-		fbi->dmadesc_fbhigh_cpu->fdadr = fbi->dmadesc_palette_dma;
-		fbi->fdadr0 = fbi->dmadesc_palette_dma; /* flips back and forth between pal and fbhigh */
-	}
-	else
-	{
+	if (var->bits_per_pixel == 16) {
 		/* palette shouldn't be loaded in true-color mode */
 		fbi->dmadesc_fbhigh_cpu->fdadr = fbi->dmadesc_fbhigh_dma;
 		fbi->fdadr0 = fbi->dmadesc_fbhigh_dma; /* no pal just fbhigh */
 		/* init it to something, even though we won't be using it */
 		fbi->dmadesc_palette_cpu->fdadr = fbi->dmadesc_palette_dma;
+	} else {
+		fbi->dmadesc_palette_cpu->fdadr = fbi->dmadesc_fbhigh_dma;
+		fbi->dmadesc_fbhigh_cpu->fdadr = fbi->dmadesc_palette_dma;
+		fbi->fdadr0 = fbi->dmadesc_palette_dma; /* flips back and forth between pal and fbhigh */
 	}
 
 #if 0
@@ -696,7 +702,7 @@
 	}
 
 	else {
-	        printk( KERN_ERR "pxafb_setup_gpio: unable to determine bits per pixel\n");
+	        printk(KERN_ERR "pxafb_setup_gpio: unable to determine bits per pixel\n");
         }
 }
 
@@ -1010,7 +1016,7 @@
 	struct pxafb_mach_info *inf = dev->platform_data;
 
 	/* Alloc the pxafb_info and pseudo_palette in one step */
-	fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 17, GFP_KERNEL);
+	fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL);
 	if (!fbi)
 		return NULL;
 
@@ -1123,11 +1129,11 @@
 				res_specified = 1;
 			}
 		done:
-			if ( res_specified ) {
-				dev_info(dev, "overriding resolution: %dx%x\n", xres, yres);
+			if (res_specified) {
+				dev_info(dev, "overriding resolution: %dx%d\n", xres, yres);
 				inf->xres = xres; inf->yres = yres;
 			}
-			if ( bpp_specified )
+			if (bpp_specified)
 				switch (bpp) {
 				case 1:
 				case 2:
@@ -1142,7 +1148,7 @@
 				}
                 } else if (!strncmp(this_opt, "pixclock:", 9)) {
                         inf->pixclock = simple_strtoul(this_opt+9, NULL, 0);
-			dev_info(dev, "override pixclock: %u\n", inf->pixclock);
+			dev_info(dev, "override pixclock: %ld\n", inf->pixclock);
                 } else if (!strncmp(this_opt, "left:", 5)) {
                         inf->left_margin = simple_strtoul(this_opt+5, NULL, 0);
 			dev_info(dev, "override left: %u\n", inf->left_margin);
@@ -1162,7 +1168,7 @@
                         inf->vsync_len = simple_strtoul(this_opt+9, NULL, 0);
 			dev_info(dev, "override vsynclen: %u\n", inf->vsync_len);
                 } else if (!strncmp(this_opt, "hsync:", 6)) {
-                        if ( simple_strtoul(this_opt+6, NULL, 0) == 0 ) {
+                        if (simple_strtoul(this_opt+6, NULL, 0) == 0) {
 				dev_info(dev, "override hsync: Active Low\n");
 				inf->sync &= ~FB_SYNC_HOR_HIGH_ACT;
 			} else {
@@ -1170,7 +1176,7 @@
 				inf->sync |= FB_SYNC_HOR_HIGH_ACT;
 			}
                 } else if (!strncmp(this_opt, "vsync:", 6)) {
-                        if ( simple_strtoul(this_opt+6, NULL, 0) == 0 ) {
+                        if (simple_strtoul(this_opt+6, NULL, 0) == 0) {
 				dev_info(dev, "override vsync: Active Low\n");
 				inf->sync &= ~FB_SYNC_VERT_HIGH_ACT;
 			} else {
@@ -1178,7 +1184,7 @@
 				inf->sync |= FB_SYNC_VERT_HIGH_ACT;
 			}
                 } else if (!strncmp(this_opt, "dpc:", 4)) {
-                        if ( simple_strtoul(this_opt+4, NULL, 0) == 0 ) {
+                        if (simple_strtoul(this_opt+4, NULL, 0) == 0) {
 				dev_info(dev, "override double pixel clock: false\n");
 				inf->lccr3 &= ~LCCR3_DPC;
 			} else {
@@ -1186,20 +1192,20 @@
 				inf->lccr3 |= LCCR3_DPC;
 			}
                 } else if (!strncmp(this_opt, "outputen:", 9)) {
-                        if ( simple_strtoul(this_opt+9, NULL, 0) == 0 ) {
+                        if (simple_strtoul(this_opt+9, NULL, 0) == 0) {
 				dev_info(dev, "override output enable: active low\n");
-				inf->lccr3 = ( inf->lccr3 & ~LCCR3_OEP ) | LCCR3_OutEnL;
+				inf->lccr3 = (inf->lccr3 & ~LCCR3_OEP) | LCCR3_OutEnL;
 			} else {
 				dev_info(dev, "override output enable: active high\n");
-				inf->lccr3 = ( inf->lccr3 & ~LCCR3_OEP ) | LCCR3_OutEnH;
+				inf->lccr3 = (inf->lccr3 & ~LCCR3_OEP) | LCCR3_OutEnH;
 			}
                 } else if (!strncmp(this_opt, "pixclockpol:", 12)) {
-                        if ( simple_strtoul(this_opt+12, NULL, 0) == 0 ) {
+                        if (simple_strtoul(this_opt+12, NULL, 0) == 0) {
 				dev_info(dev, "override pixel clock polarity: falling edge\n");
-				inf->lccr3 = ( inf->lccr3 & ~LCCR3_PCP ) | LCCR3_PixFlEdg;
+				inf->lccr3 = (inf->lccr3 & ~LCCR3_PCP) | LCCR3_PixFlEdg;
 			} else {
 				dev_info(dev, "override pixel clock polarity: rising edge\n");
-				inf->lccr3 = ( inf->lccr3 & ~LCCR3_PCP ) | LCCR3_PixRsEdg;
+				inf->lccr3 = (inf->lccr3 & ~LCCR3_PCP) | LCCR3_PixRsEdg;
 			}
                 } else if (!strncmp(this_opt, "color", 5)) {
 			inf->lccr0 = (inf->lccr0 & ~LCCR0_CMS) | LCCR0_Color;
@@ -1231,7 +1237,6 @@
 {
 	struct pxafb_info *fbi;
 	struct pxafb_mach_info *inf;
-	unsigned long flags;
 	int ret;
 
 	dev_dbg(dev, "pxafb_probe\n");
@@ -1244,7 +1249,7 @@
 
 #ifdef CONFIG_FB_PXA_PARAMETERS
 	ret = pxafb_parse_options(dev, g_options);
-	if ( ret < 0 )
+	if (ret < 0)
 		goto failed;
 #endif
 
@@ -1252,23 +1257,23 @@
         /* Check for various illegal bit-combinations. Currently only
 	 * a warning is given. */
 
-        if ( inf->lccr0 & LCCR0_INVALID_CONFIG_MASK )
+        if (inf->lccr0 & LCCR0_INVALID_CONFIG_MASK)
                 dev_warn(dev, "machine LCCR0 setting contains illegal bits: %08x\n",
                         inf->lccr0 & LCCR0_INVALID_CONFIG_MASK);
-        if ( inf->lccr3 & LCCR3_INVALID_CONFIG_MASK )
+        if (inf->lccr3 & LCCR3_INVALID_CONFIG_MASK)
                 dev_warn(dev, "machine LCCR3 setting contains illegal bits: %08x\n",
                         inf->lccr3 & LCCR3_INVALID_CONFIG_MASK);
-        if ( inf->lccr0 & LCCR0_DPD &&
-             ( ( inf->lccr0 & LCCR0_PAS ) != LCCR0_Pas ||
-               ( inf->lccr0 & LCCR0_SDS ) != LCCR0_Sngl ||
-               ( inf->lccr0 & LCCR0_CMS ) != LCCR0_Mono ) )
+        if (inf->lccr0 & LCCR0_DPD &&
+	    ((inf->lccr0 & LCCR0_PAS) != LCCR0_Pas ||
+	     (inf->lccr0 & LCCR0_SDS) != LCCR0_Sngl ||
+	     (inf->lccr0 & LCCR0_CMS) != LCCR0_Mono))
                 dev_warn(dev, "Double Pixel Data (DPD) mode is only valid in passive mono"
 			 " single panel mode\n");
-        if ( (inf->lccr0 & LCCR0_PAS) == LCCR0_Act &&
-             ( inf->lccr0 & LCCR0_SDS ) == LCCR0_Dual )
+        if ((inf->lccr0 & LCCR0_PAS) == LCCR0_Act &&
+	    (inf->lccr0 & LCCR0_SDS) == LCCR0_Dual)
                 dev_warn(dev, "Dual panel only valid in passive mode\n");
-        if ( (inf->lccr0 & LCCR0_PAS ) == LCCR0_Pas &&
-             (inf->upper_margin || inf->lower_margin) )
+        if ((inf->lccr0 & LCCR0_PAS) == LCCR0_Pas &&
+             (inf->upper_margin || inf->lower_margin))
                 dev_warn(dev, "Upper and lower margins must be 0 in passive mode\n");
 #endif
 
@@ -1295,9 +1300,7 @@
 		goto failed;
 	}
 	/* enable LCD controller clock */
-	local_irq_save(flags);
-	CKEN |= CKEN16_LCD;
-	local_irq_restore(flags);
+	pxa_set_cken(CKEN16_LCD, 1);
 
 	ret = request_irq(IRQ_LCD, pxafb_handle_irq, SA_INTERRUPT, "LCD", fbi);
 	if (ret) {
--- diff/drivers/video/radeonfb.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/radeonfb.c	2004-07-01 21:32:47.000000000 +0100
@@ -1544,7 +1544,7 @@
 					break;
 			}
 
-			rc = get_user(value, (__u32*)arg);
+			rc = get_user(value, (__u32 __user *)arg);
 
 			if (rc)
 				return rc;
@@ -1598,7 +1598,7 @@
 			if (CRTC_CRT_ON & tmp)
 				value |= 0x02;
 
-			return put_user(value, (__u32*)arg);
+			return put_user(value, (__u32 __user *)arg);
 		default:
 			return -EINVAL;
 	}
--- diff/drivers/video/riva/Makefile	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/riva/Makefile	2004-07-01 21:32:47.000000000 +0100
@@ -2,6 +2,10 @@
 # Makefile for the Riva framebuffer driver
 #
 
-obj-$(CONFIG_FB_RIVA) += rivafb.o
+obj-$(CONFIG_FB_RIVA)     += rivafb.o
 
-rivafb-objs := fbdev.o riva_hw.o nv_driver.o
+rivafb-objs               := fbdev.o riva_hw.o nv_driver.o
+
+ifdef CONFIG_FB_RIVA_I2C
+	rivafb-objs       += rivafb-i2c.o
+endif
--- diff/drivers/video/riva/fbdev.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/riva/fbdev.c	2004-07-01 21:32:47.000000000 +0100
@@ -296,9 +296,8 @@
 static int nomtrr __initdata = 0;
 #endif
 
-#ifndef MODULE
 static char *mode_option __initdata = NULL;
-#endif
+static int  strictmode       = 0;
 
 static struct fb_fix_screeninfo rivafb_fix = {
 	.id		= "nVidia",
@@ -493,54 +492,30 @@
  * rivafb_cursor()
  */
 static void rivafb_load_cursor_image(struct riva_par *par, u8 *data8,
-				     u8 *mask8, u16 bg, u16 fg, u32 w, u32 h)
+				     u16 bg, u16 fg, u32 w, u32 h)
 {
 	int i, j, k = 0;
-	u32 b, m, tmp;
+	u32 b, tmp;
 	u32 *data = (u32 *)data8;
-	u32 *mask = (u32 *)mask8;
 
 	for (i = 0; i < h; i++) {
 		b = *data++;
-		m = *mask++;
 		reverse_order(&b);
 		
 		for (j = 0; j < w/2; j++) {
 			tmp = 0;
 #if defined (__BIG_ENDIAN)
-			if (m & (1 << 31)) {
-				fg |= 1 << 15;
-				bg |= 1 << 15;
-			}
 			tmp = (b & (1 << 31)) ? fg << 16 : bg << 16;
 			b <<= 1;
-			m <<= 1;
-
-			if (m & (1 << 31)) {
-				fg |= 1 << 15;
-				bg |= 1 << 15;
-			}
 			tmp |= (b & (1 << 31)) ? fg : bg;
 			b <<= 1;
-			m <<= 1;
 #else
-			if (m & 1) {
-				fg |= 1 << 15;
-				bg |= 1 << 15;
-			}
 			tmp = (b & 1) ? fg : bg;
 			b >>= 1;
-			m >>= 1;
-			
-			if (m & 1) {
-				fg |= 1 << 15;
-				bg |= 1 << 15;
-			}
 			tmp |= (b & 1) ? fg << 16 : bg << 16;
 			b >>= 1;
-			m >>= 1;
 #endif
-			writel(tmp, par->riva.CURSOR + k++);
+			writel(tmp, &par->riva.CURSOR[k++]);
 		}
 		k += (MAX_CURS - w)/2;
 	}
@@ -833,6 +808,24 @@
 	rivafb_blank(0, info);
 }
 
+static void riva_update_var(struct fb_var_screeninfo *var, struct fb_videomode *modedb)
+{
+	var->xres = var->xres_virtual = modedb->xres;
+	var->yres = modedb->yres;
+        if (var->yres_virtual < var->yres)
+	    var->yres_virtual = var->yres;
+        var->xoffset = var->yoffset = 0;
+        var->pixclock = modedb->pixclock;
+        var->left_margin = modedb->left_margin;
+        var->right_margin = modedb->right_margin;
+        var->upper_margin = modedb->upper_margin;
+        var->lower_margin = modedb->lower_margin;
+        var->hsync_len = modedb->hsync_len;
+        var->vsync_len = modedb->vsync_len;
+        var->sync = modedb->sync;
+        var->vmode = modedb->vmode;
+}
+
 /**
  * rivafb_do_maximize - 
  * @info: pointer to fb_info object containing info for current riva board
@@ -872,7 +865,7 @@
 		       "using maximum available virtual resolution\n");
 		for (i = 0; modes[i].xres != -1; i++) {
 			if (modes[i].xres * nom / den * modes[i].yres <
-			    info->fix.smem_len / 2)
+			    info->fix.smem_len)
 				break;
 		}
 		if (modes[i].xres == -1) {
@@ -927,35 +920,47 @@
 		       "virtual Y resolution (%d) is smaller than real\n", var->yres_virtual);
 		return -EINVAL;
 	}
+	if (var->xres_virtual > 0x7fff)
+	    var->xres_virtual = 0x7fff;
+	if (var->yres_virtual > 0x7fff)
+	    var->yres_virtual = 0x7fff;
 	return 0;
 }
 
+static void
+riva_set_pattern(struct riva_par *par, int clr0, int clr1, int pat0, int pat1)
+{
+	RIVA_FIFO_FREE(par->riva, Patt, 4);
+	par->riva.Patt->Color0        = clr0;
+	par->riva.Patt->Color1        = clr1;
+	par->riva.Patt->Monochrome[0] = pat0;
+	par->riva.Patt->Monochrome[1] = pat1;
+}
+
 /* acceleration routines */
 inline void wait_for_idle(struct riva_par *par)
 {
 	while (par->riva.Busy(&par->riva));
 }
 
-/* set copy ROP, no mask */
-static void riva_setup_ROP(struct riva_par *par)
+/*
+ * Set ROP.  Translate X rop into ROP3.  Internal routine.
+ */
+static void
+riva_set_rop_solid(struct riva_par *par, int rop)
 {
-	RIVA_FIFO_FREE(par->riva, Patt, 5);
-	par->riva.Patt->Shape = 0;
-	par->riva.Patt->Color0 = 0xffffffff;
-	par->riva.Patt->Color1 = 0xffffffff;
-	par->riva.Patt->Monochrome[0] = 0xffffffff;
-	par->riva.Patt->Monochrome[1] = 0xffffffff;
+	riva_set_pattern(par, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
+        RIVA_FIFO_FREE(par->riva, Rop, 1);
+        par->riva.Rop->Rop3 = rop;
 
-	RIVA_FIFO_FREE(par->riva, Rop, 1);
-	par->riva.Rop->Rop3 = 0xCC;
 }
 
 void riva_setup_accel(struct riva_par *par)
 {
 	RIVA_FIFO_FREE(par->riva, Clip, 2);
 	par->riva.Clip->TopLeft     = 0x0;
-	par->riva.Clip->WidthHeight = 0x80008000;
-	riva_setup_ROP(par);
+	par->riva.Clip->WidthHeight = 0x7fff7fff;
+	riva_set_rop_solid(par, 0xcc);
 	wait_for_idle(par);
 }
 
@@ -1043,7 +1048,9 @@
 
 static int rivafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
 {
+	struct fb_monspecs *specs = &info->monspecs;
 	int nom, den;		/* translating from pixels->bytes */
+	int mode_valid = 0;
 	
 	switch (var->bits_per_pixel) {
 	case 1 ... 8:
@@ -1094,6 +1101,73 @@
 		return -EINVAL;
 	}
 
+	if (!strictmode) {
+		if (!fb_validate_mode(var, info))
+			mode_valid = 1;
+	}
+
+	/* find best mode from modedb */
+	if (!mode_valid && specs->modedb_len) {
+		int i, best, best_refresh, best_x, best_y, diff_x, diff_y;
+
+		best_refresh = best = best_x = best_y = 0;
+		diff_x = diff_y = -1;
+
+		for (i = 0; i < specs->modedb_len; i++) {
+			if (var->xres <= specs->modedb[i].xres &&
+			    !(specs->modedb[i].flag & FB_MODE_IS_CALCULATED) &&
+			    specs->modedb[i].xres - var->xres < diff_x) {
+				best_x = specs->modedb[i].xres;
+				diff_x = best_x - var->xres;
+			}
+			if (!diff_x) break;
+		}
+
+		if (diff_x != -1) {
+			for (i = 0; i < specs->modedb_len; i++) {
+				if (best_x == specs->modedb[i].xres &&
+				    var->yres <= specs->modedb[i].yres &&
+				    !(specs->modedb[i].flag &
+				      FB_MODE_IS_CALCULATED) &&
+				    specs->modedb[i].yres-var->yres < diff_y) {
+					best_y = specs->modedb[i].yres;
+					diff_y = best_y - var->yres;
+				}
+				if (!diff_y) break;
+			}
+		}
+
+		if (diff_y != -1) {
+			for (i = 0; i < specs->modedb_len; i++) {
+				if (best_x == specs->modedb[i].xres &&
+				    best_y == specs->modedb[i].yres &&
+				    !(specs->modedb[i].flag &
+				      FB_MODE_IS_CALCULATED) &&
+				    specs->modedb[i].refresh > best_refresh) {
+					best_refresh=specs->modedb[i].refresh;
+					best = i;
+				}
+			}
+		}
+
+		if (best_refresh) {
+			riva_update_var(var, &specs->modedb[best]);
+			mode_valid = 1;
+		}
+	}
+
+	/* calculate modeline if supported by monitor */
+	if (!mode_valid && info->monspecs.gtf) {
+		if (!fb_get_mode(FB_MAXTIMINGS, 0, var, info))
+			mode_valid = 1;
+	}
+	if (!mode_valid && info->monspecs.modedb_len)
+		return -EINVAL;
+
+	if (var->xres_virtual < var->xres)
+		var->xres_virtual = var->xres;
+	if (var->yres_virtual <= var->yres)
+		var->yres_virtual = -1;
 	if (rivafb_do_maximize(info, var, nom, den) < 0)
 		return -EINVAL;
 
@@ -1329,8 +1403,7 @@
 		break;
 	}
 
-	RIVA_FIFO_FREE(par->riva, Rop, 1);
-	par->riva.Rop->Rop3 = rop;
+	riva_set_rop_solid(par, rop);
 
 	RIVA_FIFO_FREE(par->riva, Bitmap, 1);
 	par->riva.Bitmap->Color1A = color;
@@ -1338,10 +1411,12 @@
 	RIVA_FIFO_FREE(par->riva, Bitmap, 2);
 	par->riva.Bitmap->UnclippedRectangle[0].TopLeft =
 			(rect->dx << 16) | rect->dy;
+	mb();
 	par->riva.Bitmap->UnclippedRectangle[0].WidthHeight =
 			(rect->width << 16) | rect->height;
-	RIVA_FIFO_FREE(par->riva, Rop, 1);
-	par->riva.Rop->Rop3 = 0xCC;	// back to COPY
+	mb();
+	riva_set_rop_solid(par, 0xcc);
+
 }
 
 /**
@@ -1362,8 +1437,9 @@
 	RIVA_FIFO_FREE(par->riva, Blt, 3);
 	par->riva.Blt->TopLeftSrc  = (region->sy << 16) | region->sx;
 	par->riva.Blt->TopLeftDst  = (region->dy << 16) | region->dx;
+	mb();
 	par->riva.Blt->WidthHeight = (region->height << 16) | region->width;
-	wait_for_idle(par);
+	mb();
 }
 
 static inline void convert_bgcolor_16(u32 *col)
@@ -1372,6 +1448,7 @@
 		| ((*col & 0x000003E0) << 6)
 		| ((*col & 0x0000001F) << 3)
 		|	   0xFF000000;
+	mb();
 }
 
 /**
@@ -1478,7 +1555,6 @@
 {
 	struct riva_par *par = (struct riva_par *) info->par;
 	u8 data[MAX_CURS * MAX_CURS/8];
-	u8 mask[MAX_CURS * MAX_CURS/8];
 	u16 fg, bg;
 	int i;
 
@@ -1508,7 +1584,7 @@
 		info->cursor.image.fg_color = cursor->image.fg_color;
 	}
 
-	if (cursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETCMAP)) {
+	if (cursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETCMAP | FB_CUR_SETCUR)) {
 		u32 bg_idx = info->cursor.image.bg_color;
 		u32 fg_idx = info->cursor.image.fg_color;
 		u32 s_pitch = (info->cursor.image.width+7) >> 3;
@@ -1517,34 +1593,35 @@
 		u8 *msk = (u8 *) info->cursor.mask;
 		u8 src[64];	
 		
+		info->cursor.image.data = cursor->image.data;
 		switch (info->cursor.rop) {
 		case ROP_XOR:
-			for (i = 0; i < s_pitch * info->cursor.image.height; i++)
-					src[i] = dat[i] ^ msk[i];
+			for (i = 0; i < s_pitch * info->cursor.image.height;
+			     i++)
+				src[i] = dat[i] ^ msk[i];
 			break;
 		case ROP_COPY:
 		default:
-			for (i = 0; i < s_pitch * info->cursor.image.height; i++)
-				
-					src[i] = dat[i] & msk[i];
+			for (i = 0; i < s_pitch * info->cursor.image.height;
+			     i++)
+				src[i] = dat[i] & msk[i];
 			break;
 		}
 		
-		fb_move_buf_aligned(info, &info->sprite, data, d_pitch, src, s_pitch, info->cursor.image.height);
-
-		fb_move_buf_aligned(info, &info->sprite, mask, d_pitch, msk, s_pitch, info->cursor.image.height);
+		fb_move_buf_aligned(info, &info->sprite, data, d_pitch, src,
+				    s_pitch, info->cursor.image.height);
 
 		bg = ((info->cmap.red[bg_idx] & 0xf8) << 7) |
 		     ((info->cmap.green[bg_idx] & 0xf8) << 2) |
-		     ((info->cmap.blue[bg_idx] & 0xf8) >> 3);
+		     ((info->cmap.blue[bg_idx] & 0xf8) >> 3) | 1 << 15;
 
 		fg = ((info->cmap.red[fg_idx] & 0xf8) << 7) |
 		     ((info->cmap.green[fg_idx] & 0xf8) << 2) |
-		     ((info->cmap.blue[fg_idx] & 0xf8) >> 3);
+		     ((info->cmap.blue[fg_idx] & 0xf8) >> 3) | 1 << 15;
 
 		par->riva.LockUnlock(&par->riva, 0);
 
-		rivafb_load_cursor_image(par, data, mask, bg, fg,
+		rivafb_load_cursor_image(par, data, bg, fg,
 					 info->cursor.image.width, 
 					 info->cursor.image.height);
 	}
@@ -1586,24 +1663,19 @@
 
 static int __devinit riva_set_fbinfo(struct fb_info *info)
 {
-	struct riva_par *par = (struct riva_par *) info->par;
 	unsigned int cmap_len;
 
-	info->flags = FBINFO_FLAG_DEFAULT;
+	info->flags = FBINFO_DEFAULT
+		    | FBINFO_HWACCEL_XPAN
+		    | FBINFO_HWACCEL_YPAN
+		    | FBINFO_HWACCEL_COPYAREA
+		    | FBINFO_HWACCEL_FILLRECT
+		    | FBINFO_HWACCEL_IMAGEBLIT;
 	info->var = rivafb_default_var;
-	info->fix = rivafb_fix;
-	info->fbops = &riva_fb_ops;
+	info->fix.visual = (info->var.bits_per_pixel == 8) ?
+				FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
 	info->pseudo_palette = pseudo_palette;
 
-#ifndef MODULE
-	if (mode_option)
-		fb_find_mode(&info->var, info, mode_option,
-			     NULL, 0, NULL, 8);
-#endif
-	if (par->use_default_var)
-		/* We will use the modified default var */
-		info->var = rivafb_default_var;
-
 	cmap_len = riva_get_cmap_len(&info->var);
 	fb_alloc_cmap(&info->cmap, cmap_len, 0);	
 
@@ -1611,7 +1683,8 @@
 	info->pixmap.buf_align = 4;
 	info->pixmap.scan_align = 4;
 	info->pixmap.flags = FB_PIXMAP_SYSTEM;
-	return 0;
+	info->var.yres_virtual = -1;
+	return (rivafb_check_var(&info->var, info));
 }
 
 #ifdef CONFIG_PPC_OF
@@ -1645,77 +1718,35 @@
 }
 #endif /* CONFIG_PPC_OF */
 
-static int riva_dfp_parse_EDID(struct riva_par *par)
+static void riva_update_default_var(struct fb_var_screeninfo *var, struct fb_info *info)
 {
-	unsigned char *block = par->EDID;
-
-	if (!block)
-		return 0;
+	struct fb_monspecs *specs = &info->monspecs;
+	struct fb_videomode modedb;
 
-	/* jump to detailed timing block section */
-	block += 54;
-
-	par->clock = (block[0] + (block[1] << 8));
-	par->panel_xres = (block[2] + ((block[4] & 0xf0) << 4));
-	par->hblank = (block[3] + ((block[4] & 0x0f) << 8));
-	par->panel_yres = (block[5] + ((block[7] & 0xf0) << 4));
-	par->vblank = (block[6] + ((block[7] & 0x0f) << 8));
-	par->hOver_plus = (block[8] + ((block[11] & 0xc0) << 2));
-	par->hSync_width = (block[9] + ((block[11] & 0x30) << 4));
-	par->vOver_plus = ((block[10] >> 4) + ((block[11] & 0x0c) << 2));
-	par->vSync_width = ((block[10] & 0x0f) + ((block[11] & 0x03) << 4));
-	par->interlaced = ((block[17] & 0x80) >> 7);
-	par->synct = ((block[17] & 0x18) >> 3);
-	par->misc = ((block[17] & 0x06) >> 1);
-	par->hAct_high = par->vAct_high = 0;
-	if (par->synct == 3) {
-		if (par->misc & 2)
-			par->hAct_high = 1;
-		if (par->misc & 1)
-			par->vAct_high = 1;
+	/* respect mode options */
+	if (mode_option) {
+		fb_find_mode(var, info, mode_option,
+			     specs->modedb, specs->modedb_len,
+			     NULL, 8);
+	} else if (specs->modedb != NULL) {
+		/* get preferred timing */
+		if (info->monspecs.misc & FB_MISC_1ST_DETAIL) {
+			int i;
+
+			for (i = 0; i < specs->modedb_len; i++) {
+				if (specs->modedb[i].flag & FB_MODE_IS_FIRST) {
+					modedb = specs->modedb[i];
+					break;
+				}
+			}
+		} else {
+			/* otherwise, get first mode in database */
+			modedb = specs->modedb[0];
+		}
+		var->bits_per_pixel = 8;
+		riva_update_var(var, &modedb);
 	}
-
-	printk(KERN_INFO PFX
-			"detected DFP panel size from EDID: %dx%d\n", 
-			par->panel_xres, par->panel_yres);
-	par->got_dfpinfo = 1;
-	return 1;
-}
-
-static void riva_update_default_var(struct fb_info *info)
-{
-	struct fb_var_screeninfo *var = &rivafb_default_var;
-	struct riva_par *par = (struct riva_par *) info->par;
-
-        var->xres = par->panel_xres;
-        var->yres = par->panel_yres;
-        var->xres_virtual = par->panel_xres;
-        var->yres_virtual = par->panel_yres;
-        var->xoffset = var->yoffset = 0;
-        var->bits_per_pixel = 8;
-        var->pixclock = 100000000 / par->clock;
-        var->left_margin = (par->hblank - par->hOver_plus - par->hSync_width);
-        var->right_margin = par->hOver_plus;
-        var->upper_margin = (par->vblank - par->vOver_plus - par->vSync_width);
-        var->lower_margin = par->vOver_plus;
-        var->hsync_len = par->hSync_width;
-        var->vsync_len = par->vSync_width;
-        var->sync = 0;
-
-        if (par->synct == 3) {
-                if (par->hAct_high)
-                        var->sync |= FB_SYNC_HOR_HIGH_ACT;
-                if (par->vAct_high)
-                        var->sync |= FB_SYNC_VERT_HIGH_ACT;
-        }
- 
-        var->vmode = 0;
-        if (par->interlaced)
-                var->vmode |= FB_VMODE_INTERLACED;
-
 	var->accel_flags |= FB_ACCELF_TEXT;
-        
-        par->use_default_var = 1;
 }
 
 
@@ -1726,19 +1757,27 @@
 		printk("rivafb: could not retrieve EDID from OF\n");
 #else
 	/* XXX use other methods later */
+#ifdef CONFIG_FB_RIVA_I2C
+	struct riva_par *par = (struct riva_par *) info->par;
+
+	riva_create_i2c_busses(par);
+	riva_probe_i2c_connector(par, 1, &par->EDID);
+	riva_delete_i2c_busses(par);
+#endif
 #endif
 }
 
 
-static void riva_get_dfpinfo(struct fb_info *info)
+static void riva_get_edidinfo(struct fb_info *info)
 {
+	struct fb_var_screeninfo *var = &rivafb_default_var;
 	struct riva_par *par = (struct riva_par *) info->par;
 
-	if (riva_dfp_parse_EDID(par))
-		riva_update_default_var(info);
+	fb_edid_to_monspecs(par->EDID, &info->monspecs);
+	riva_update_default_var(var, info);
 
 	/* if user specified flatpanel, we respect that */
-	if (par->got_dfpinfo == 1)
+	if (info->monspecs.input & FB_DISP_DDI)
 		par->FlatPanel = 1;
 }
 
@@ -1768,6 +1807,7 @@
 
 	memset(info, 0, sizeof(struct fb_info));
 	memset(default_par, 0, sizeof(struct riva_par));
+	default_par->pdev = pd;
 
 	info->pixmap.addr = kmalloc(64 * 1024, GFP_KERNEL);
 	if (info->pixmap.addr == NULL)
@@ -1815,10 +1855,6 @@
 
 	info->par = default_par;
 
-	riva_get_EDID(info, pd);
-
-	riva_get_dfpinfo(info);
-
 	switch (default_par->riva.Architecture) {
 	case NV_ARCH_03:
 		/* Riva128's PRAMIN is in the "framebuffer" space
@@ -1883,6 +1919,11 @@
 	}
 #endif /* CONFIG_MTRR */
 
+	info->fbops = &riva_fb_ops;
+	info->fix = rivafb_fix;
+	riva_get_EDID(info, pd);
+	riva_get_edidinfo(info);
+
 	if (riva_set_fbinfo(info) < 0) {
 		printk(KERN_ERR PFX "error setting initial video mode\n");
 		goto err_out_iounmap_fb;
@@ -1991,6 +2032,8 @@
 		} else if (!strncmp(this_opt, "nomtrr", 6)) {
 			nomtrr = 1;
 #endif
+		} else if (!strncmp(this_opt, "strictmode", 10)) {
+			strictmode = 1;
 		} else
 			mode_option = this_opt;
 	}
@@ -2039,6 +2082,8 @@
 #ifdef CONFIG_MTRR
 MODULE_PARM(nomtrr, "i");
 MODULE_PARM_DESC(nomtrr, "Disables MTRR support (0 or 1=disabled) (default=0)");
+MODULE_PARM(strictmode, "i");
+MODULE_PARM_DESC(strictmode, "Only use video modes from EDID");
 #endif
 #endif /* MODULE */
 
--- diff/drivers/video/riva/rivafb.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/riva/rivafb.h	2004-07-01 21:32:47.000000000 +0100
@@ -4,6 +4,10 @@
 #include <linux/config.h>
 #include <linux/fb.h>
 #include <video/vga.h>
+#include <linux/i2c.h>
+#include <linux/i2c-id.h>
+#include <linux/i2c-algo-bit.h>
+
 #include "riva_hw.h"
 
 /* GGI compatibility macros */
@@ -12,6 +16,12 @@
 #define NUM_GRC_REGS		0x09
 #define NUM_ATC_REGS		0x15
 
+/* I2C */
+#define DDC_SCL_READ_MASK       (1 << 2)
+#define DDC_SCL_WRITE_MASK      (1 << 5)
+#define DDC_SDA_READ_MASK       (1 << 3)
+#define DDC_SDA_WRITE_MASK      (1 << 4)
+
 /* holds the state of the VGA core and extended Riva hw state from riva_hw.c.
  * From KGI originally. */
 struct riva_regs {
@@ -23,6 +33,15 @@
 	RIVA_HW_STATE ext;
 };
 
+struct riva_par;
+
+struct riva_i2c_chan {
+	struct riva_par *par;
+	unsigned long   ddc_base;
+	struct i2c_adapter adapter;
+	struct i2c_algo_bit_data algo;
+};
+
 struct riva_par {
 	RIVA_HW_INST riva;	/* interface to riva_hw.c */
 
@@ -36,26 +55,22 @@
 	u32 cursor_data[32 * 32/4];
 	int cursor_reset;
 	unsigned char *EDID;
-
-	int panel_xres, panel_yres;
-	int hOver_plus, hSync_width, hblank;
-	int vOver_plus, vSync_width, vblank;
-	int hAct_high, vAct_high, interlaced;
-	int synct, misc, clock;
-
-	int use_default_var;
-	int got_dfpinfo;
 	unsigned int Chipset;
 	int forceCRTC;
 	Bool SecondCRTC;
 	int FlatPanel;
+	struct pci_dev *pdev;
 #ifdef CONFIG_MTRR
 	struct { int vram; int vram_valid; } mtrr;
 #endif
+	struct riva_i2c_chan chan[3];
 };
 
 void riva_common_setup(struct riva_par *);
 unsigned long riva_get_memlen(struct riva_par *);
 unsigned long riva_get_maxdclk(struct riva_par *);
+void riva_delete_i2c_busses(struct riva_par *par);
+void riva_create_i2c_busses(struct riva_par *par);
+int riva_probe_i2c_connector(struct riva_par *par, int conn, u8 **out_edid);
 
 #endif /* __RIVAFB_H */
--- diff/drivers/video/sa1100fb.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/sa1100fb.c	2004-07-01 21:32:47.000000000 +0100
@@ -328,17 +328,17 @@
 
 #ifdef CONFIG_SA1100_COLLIE
 static struct sa1100fb_mach_info collie_info __initdata = {
-	pixclock:	171521,		bpp:		16,
-	xres:		320,		yres:		240,
+	.pixclock	= 171521,	.bpp		= 16,
+	.xres		= 320,		.yres		= 240,
 
-	hsync_len:	5,		vsync_len:	1,
-	left_margin:	11,		upper_margin:	2,
-	right_margin:	30,		lower_margin:	0,
+	.hsync_len	= 5,		.vsync_len	= 1,
+	.left_margin	= 11,		.upper_margin	= 2,
+	.right_margin	= 30,		.lower_margin	= 0,
 
-	sync:		FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 
-	lccr0:		LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
-	lccr3:		LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2),
+	.lccr0		= LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
+	.lccr3		= LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2),
 };
 #endif
 
--- diff/drivers/video/sis/300vtbl.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/300vtbl.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * Register settings for SiS 300 series
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -52,20 +50,7 @@
  *
  */
 
-typedef struct _SiS300_StStruct
-{
-	UCHAR St_ModeID;
-	USHORT St_ModeFlag;
-	UCHAR St_StTableIndex;
-	UCHAR St_CRT2CRTC;
-	UCHAR St_ResInfo;
-	UCHAR VB_StTVFlickerIndex;
-	UCHAR VB_StTVEdgeIndex;
-	UCHAR VB_StTVYFilterIndex;
-	UCHAR St_PDC;
-} SiS300_StStruct;
-
-static const SiS300_StStruct  SiS300_SModeIDTable[] =
+static const SiS_StStruct  SiS300_SModeIDTable[] =
 {
 	{0x01,0x9208,0x01,0x00,0x00,0x00,0x00,0x00, 0},
 	{0x01,0x1210,0x14,0x01,0x01,0x00,0x00,0x00, 0},
@@ -89,206 +74,168 @@
 	{0xff,     0,   0,   0,   0,   0,   0,   0, 0}
 };
 
-typedef struct _SiS300_ExtStruct
+static const SiS_ExtStruct  SiS300_EModeIDTable[] =
 {
-	UCHAR  Ext_ModeID;
-	USHORT Ext_ModeFlag;
-	UCHAR  Ext_ModeOffset;
-	USHORT Ext_VESAID;
-	UCHAR  Ext_RESINFO;
-	UCHAR  VB_ExtTVFlickerIndex;
-	UCHAR  VB_ExtTVEdgeIndex;
-	UCHAR  VB_ExtTVYFilterIndex;
-	UCHAR  VB_ExtTVYFilterIndexROM661;
-	UCHAR  REFindex;
-} SiS300_ExtStruct;
-
-static const SiS300_ExtStruct  SiS300_EModeIDTable[] =
-{
-	{0x6a,0x2212,0x04,0x0102,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00},  /* 800x600x? */
-	{0x2e,0x0a1b,0x03,0x0101,SIS_RI_640x480,  0x00,0x00,0x00,0x00,0x08},
-	{0x2f,0x021b,0x03,0x0100,SIS_RI_640x400,  0x00,0x00,0x00,0x00,0x10},  /* 640x400x8 */
-	{0x30,0x2a1b,0x04,0x0103,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00},
-	{0x31,0x0a1b,0x0a,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11},  /* 720x480x8 */
-	{0x32,0x2a1b,0x0a,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12},  /* 720x576x8 */
-	{0x33,0x0a1d,0x0a,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11},  /* 720x480x16 */
-	{0x34,0x2a1d,0x0a,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12},  /* 720x576x16 */
-	{0x35,0x0a1f,0x0a,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11},  /* 720x480x32 */
-	{0x36,0x2a1f,0x0a,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12},  /* 720x576x32 */
-	{0x37,0x0212,0x05,0x0104,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13},  /* 1024x768x? */
-	{0x38,0x0a1b,0x05,0x0105,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13},  /* 1024x768x8 */
-	{0x3a,0x0e3b,0x06,0x0107,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a},  /* 1280x1024x8 */
-	{0x3c,0x063b,0x07,0x0130,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e},
-	{0x3d,0x067d,0x07,0x0131,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e},
-	{0x40,0x921c,0x00,0x010d,SIS_RI_320x200,  0x00,0x00,0x00,0x00,0x23},  /* 320x200x15 */
-	{0x41,0x921d,0x00,0x010e,SIS_RI_320x200,  0x00,0x00,0x00,0x00,0x23},  /* 320x200x16 */
-	{0x43,0x0a1c,0x03,0x0110,SIS_RI_640x480,  0x00,0x00,0x00,0x00,0x08},
-	{0x44,0x0a1d,0x03,0x0111,SIS_RI_640x480,  0x00,0x00,0x00,0x00,0x08},
-	{0x46,0x2a1c,0x04,0x0113,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00},  /* 800x600x15 */
-	{0x47,0x2a1d,0x04,0x0114,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00},  /* 800x600x16 */
-	{0x49,0x0a3c,0x05,0x0116,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13},
-	{0x4a,0x0a3d,0x05,0x0117,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13},
-	{0x4c,0x0e7c,0x06,0x0119,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a},
-	{0x4d,0x0e7d,0x06,0x011a,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a},
-	{0x50,0x921b,0x00,0x0132,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x24},  /* 320x240x8  */
-	{0x51,0xb21b,0x01,0x0133,SIS_RI_400x300,  0x00,0x00,0x00,0x00,0x25},  /* 400x300x8  */
-	{0x52,0x921b,0x02,0x0134,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x26},  /* 512x384x8  */
-	{0x56,0x921d,0x00,0x0135,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x24},  /* 320x240x16 */
-	{0x57,0xb21d,0x01,0x0136,SIS_RI_400x300,  0x00,0x00,0x00,0x00,0x25},  /* 400x300x16 */
-	{0x58,0x921d,0x02,0x0137,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x26},  /* 512x384x16 */
-	{0x59,0x921b,0x00,0x0138,SIS_RI_320x200,  0x00,0x00,0x00,0x00,0x23},  /* 320x200x8  */
-	{0x5c,0x921f,0x02,0x0000,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x26},  /* 512x384x32 */
-	{0x5d,0x021d,0x03,0x0139,SIS_RI_640x400,  0x00,0x00,0x00,0x00,0x10},  /* 640x400x16 */
- 	{0x5e,0x021f,0x03,0x0000,SIS_RI_640x400,  0x00,0x00,0x00,0x00,0x10},  /* 640x400x32 */
-	{0x62,0x0a3f,0x03,0x013a,SIS_RI_640x480,  0x00,0x00,0x00,0x00,0x08},
-	{0x63,0x2a3f,0x04,0x013b,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00},  /* 800x600x32 */
-	{0x64,0x0a7f,0x05,0x013c,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13},
-	{0x65,0x0eff,0x06,0x013d,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a},
-	{0x66,0x06ff,0x07,0x013e,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e},
-	{0x68,0x067b,0x08,0x013f,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27},
-	{0x69,0x06fd,0x08,0x0140,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27},
-	{0x6b,0x07ff,0x08,0x0000,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27},
-	{0x6c,0x067b,0x09,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28},  /* 2048x1536x8 - not in BIOS! */
-	{0x6d,0x06fd,0x09,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28},  /* 2048x1536x16 - not in BIOS! */
-	{0x70,0x2a1b,0x04,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d},  /* 800x480x8 */
-	{0x71,0x0a1b,0x05,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30},  /* 1024x576x8 */
-	{0x74,0x0a1d,0x05,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30},  /* 1024x576x16 */
-	{0x75,0x0e3d,0x06,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x33},  /* 1280x720x16 */
-	{0x76,0x2a1f,0x04,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d},  /* 800x480x32 */
-	{0x77,0x0a3f,0x05,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30},  /* 1024x576x32 */
-	{0x78,0x0eff,0x06,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x33},  /* 1280x720x32 */
-	{0x79,0x0e3b,0x06,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x33},  /* 1280x720x8 */
-	{0x7a,0x2a1d,0x04,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d},  /* 800x480x16 */
-	{0x7c,0x0a3b,0x06,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x29},  /* 1280x960x8 */
-	{0x7d,0x0a7d,0x06,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x29},  /* 1280x960x16 */
-	{0x7e,0x0aff,0x06,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x29},  /* 1280x960x32 */
-	{0x20,0x0a1b,0x05,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b},  /* 1024x600 */
-	{0x21,0x0a3d,0x05,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b},
-	{0x22,0x0a7f,0x05,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b},
-	{0x23,0x0a1b,0x0c,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c},  /* 1152x768 */
-	{0x24,0x0a3d,0x0c,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c},
-	{0x25,0x0a7f,0x0c,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c},
-	{0x29,0x0e1b,0x0c,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36},  /* 1152x864 */
-	{0x2a,0x0e3d,0x0c,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36},
-	{0x2b,0x0e7f,0x0c,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36},
-	{0x39,0x2a1b,0x0d,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x38},  /* 848x480 */
-	{0x3b,0x2a3d,0x0d,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x38},
-	{0x3e,0x2a7f,0x0d,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x38},
-	{0x3f,0x2a1b,0x0d,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3a},  /* 856x480 */
-	{0x42,0x2a3d,0x0d,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3a},
-	{0x45,0x2a7f,0x0d,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3a},
-	{0x48,0x223b,0x0e,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3c},  /* 1360x768 */
-	{0x4b,0x227d,0x0e,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3c},
-	{0x4e,0x22ff,0x0e,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3c},
-	{0x4f,0x921f,0x00,0x0000,SIS_RI_320x200,  0x00,0x00,0x00,0x00,0x23},  /* 320x200x32 */
-	{0x53,0x921f,0x00,0x0000,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x24},  /* 320x240x32 */
-	{0x54,0xb21f,0x01,0x0000,SIS_RI_400x300,  0x00,0x00,0x00,0x00,0x25},  /* 400x300x32 */
-	{0x55,0x2e3b,0x06,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3d},  /* 1280x768   */
-	{0x5a,0x2e7d,0x06,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3d},
-	{0x5b,0x2eff,0x06,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3d},
-	{0x5f,0x2a1b,0x0f,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3e},  /* 768x576x8 */
-	{0x60,0x2a1d,0x0f,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3e},  /* 768x576x16 */
-	{0x61,0x2a1f,0x0f,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3e},  /* 768x576x32 */
-	{0x67,0x2e3b,0x0e,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x3f},  /* 1360x1024x8 (BARCO) */
-	{0x6f,0x2e7d,0x0e,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x3f},  /* 1360x1024x16 (BARCO) */
-	{0x72,0x2eff,0x0e,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x3f},  /* 1360x1024x32 (BARCO) */
-	{0xff,0x0000,0x00,0xffff,0,               0x00,0x00,0x00,0x00,0x00}
-};
-
-typedef struct _SiS300_Ext2Struct
-{
-	USHORT Ext_InfoFlag;
-	UCHAR  Ext_CRT1CRTC;  /* Index in SiS300_CRT1Table */
-	UCHAR  Ext_CRTVCLK;   /* Index in VCLK array */
-	UCHAR  Ext_CRT2CRTC;  /* Index in LCD Paneltype arrays (&3f) */
-	UCHAR  ModeID;
-	USHORT XRes;
-	USHORT YRes;
-	UCHAR  Ext_PDC;
-} SiS300_Ext2Struct;
-
-static const SiS300_Ext2Struct  SiS300_RefIndex[] =
-{
-	{0x085f,0x0d,0x03,0x05,0x6a, 800, 600, 0}, /* 00 */
-	{0x0467,0x0e,0x44,0x05,0x6a, 800, 600, 0}, /* 01 */
-	{0x0067,0x0f,0x07,0x48,0x6a, 800, 600, 0}, /* 02 - CRT1CRTC was 0x4f */
-	{0x0067,0x10,0x06,0x8b,0x6a, 800, 600, 0}, /* 03 */
-	{0x0147,0x11,0x08,0x00,0x6a, 800, 600, 0}, /* 04 */
-	{0x0147,0x12,0x0c,0x00,0x6a, 800, 600, 0}, /* 05 */
-	{0x0047,0x11,0x4e,0x00,0x6a, 800, 600, 0}, /* 06 - CRT1CRTC was 0x51 */
-	{0x0047,0x11,0x13,0x00,0x6a, 800, 600, 0}, /* 07 */
-	{0xc85f,0x05,0x00,0x04,0x2e, 640, 480, 0}, /* 08 */
-	{0xc067,0x06,0x02,0x04,0x2e, 640, 480, 0}, /* 09 */
-	{0xc067,0x07,0x02,0x47,0x2e, 640, 480, 0}, /* 0a */
-	{0xc067,0x08,0x03,0x8a,0x2e, 640, 480, 0}, /* 0b */
-	{0xc047,0x09,0x05,0x00,0x2e, 640, 480, 0}, /* 0c */
-	{0xc047,0x0a,0x08,0x00,0x2e, 640, 480, 0}, /* 0d */
-	{0xc047,0x0b,0x0a,0x00,0x2e, 640, 480, 0}, /* 0e */
-	{0xc047,0x0c,0x10,0x00,0x2e, 640, 480, 0}, /* 0f */
-	{0x487f,0x04,0x00,0x00,0x2f, 640, 400, 0}, /* 10 */
-	{0xc04f,0x31,0x01,0x06,0x31, 720, 480, 0}, /* 11 */
-	{0x004f,0x32,0x03,0x06,0x32, 720, 576, 0}, /* 12 */
-	{0x0187,0x15,0x05,0x00,0x37,1024, 768, 0}, /* 13 */
-        {0xc877,0x16,0x09,0x06,0x37,1024, 768, 0}, /* 14 */
-	{0xc067,0x17,0x0b,0x49,0x37,1024, 768, 0}, /* 15 - CRT1CRTC was 0x97 */
-	{0x0267,0x18,0x0d,0x00,0x37,1024, 768, 0}, /* 16 */
-	{0x0047,0x19,0x11,0x8c,0x37,1024, 768, 0}, /* 17 - CRT1CRTC was 0x59 */
-	{0x0047,0x1a,0x52,0x00,0x37,1024, 768, 0}, /* 18 */
-	{0x0007,0x1b,0x16,0x00,0x37,1024, 768, 0}, /* 19 - CRT1CRTC was 0x5b */
-	{0x0387,0x1c,0x4d,0x00,0x3a,1280,1024, 0}, /* 1a - CRT1CRTC was 0x5c */
-	{0x0077,0x1d,0x14,0x07,0x3a,1280,1024, 0}, /* 1b */
-	{0x0047,0x1e,0x17,0x00,0x3a,1280,1024, 0}, /* 1c */
-	{0x0007,0x1f,0x98,0x00,0x3a,1280,1024, 0}, /* 1d */
-	{0x0007,0x20,0x59,0x00,0x3c,1600,1200, 0}, /* 1e - CRT1CRTC was 0x60 */
-	{0x0007,0x21,0x5a,0x00,0x3c,1600,1200, 0}, /* 1f */
-	{0x0007,0x22,0x1b,0x00,0x3c,1600,1200, 0}, /* 20 */
-	{0x0007,0x23,0x1d,0x00,0x3c,1600,1200, 0}, /* 21 - CRT1CRTC was 0x63 */
-	{0x0007,0x24,0x1e,0x00,0x3c,1600,1200, 0}, /* 22 */
-	{0x407f,0x00,0x00,0x00,0x40, 320, 200, 0}, /* 23 */
-	{0xc07f,0x01,0x00,0x04,0x50, 320, 240, 0}, /* 24 */
-	{0x0077,0x02,0x04,0x05,0x51, 400, 300, 0}, /* 25 */
-	{0xc877,0x03,0x09,0x06,0x52, 512, 384, 0}, /* 26 */  /* was c077 */
-	{0x8207,0x25,0x1f,0x00,0x68,1920,1440, 0}, /* 27 */
-	{0x0007,0x26,0x20,0x00,0x6c,2048,1536, 0}, /* 28 */
-	{0x0067,0x27,0x14,0x08,0x6e,1280, 960, 0}, /* 29 - TW: 1280x960-60 */
-	{0x0027,0x45,0x3c,0x08,0x6e,1280, 960, 0}, /* 2a - TW: 1280x960-85 */
-	{0xc077,0x33,0x09,0x06,0x20,1024, 600, 0}, /* 2b */
-	{0xc077,0x34,0x0b,0x06,0x23,1152, 768, 0}, /* 2c */	/* VCLK 0x09 */
-	{0x0057,0x35,0x27,0x08,0x70, 800, 480, 0}, /* 2d */
-	{0x0047,0x36,0x37,0x08,0x70, 800, 480, 0}, /* 2e */
-	{0x0047,0x37,0x08,0x08,0x70, 800, 480, 0}, /* 2f */
-	{0x0057,0x38,0x09,0x09,0x71,1024, 576, 0}, /* 30 */
-	{0x0047,0x39,0x38,0x09,0x71,1024, 576, 0}, /* 31 */
-	{0x0047,0x3a,0x11,0x09,0x71,1024, 576, 0}, /* 32 */
-	{0x0057,0x3b,0x39,0x0a,0x75,1280, 720, 0}, /* 33 */
-	{0x0047,0x3c,0x3a,0x0a,0x75,1280, 720, 0}, /* 34 */
-	{0x0007,0x3d,0x3b,0x0a,0x75,1280, 720, 0}, /* 35 */
-	{0x0047,0x3e,0x34,0x06,0x29,1152, 864, 0}, /* 36 1152x864-75Hz */
-	{0x0047,0x44,0x3a,0x06,0x29,1152, 864, 0}, /* 37 1152x864-85Hz */
-	{0x00c7,0x3f,0x28,0x00,0x39, 848, 480, 0}, /* 38 848x480-38Hzi */
-	{0xc067,0x40,0x3d,0x0b,0x39, 848, 480, 0}, /* 39 848x480-60Hz  */
-	{0x00c7,0x41,0x28,0x00,0x3f, 856, 480, 0}, /* 3a 856x480-38Hzi */
-	{0xc047,0x42,0x28,0x00,0x3f, 856, 480, 0}, /* 3b 856x480-60Hz  */
-	{0x0067,0x43,0x3e,0x0c,0x48,1360, 768, 0}, /* 3c 1360x768-60Hz */
-	{0x0077,0x46,0x3f,0x08,0x55,1280, 768, 0}, /* 3d 1280x768-60Hz */
-	{0x004f,0x47,0x03,0x06,0x5f, 768, 576, 0}, /* 3e 768x576 */
-	{0x0027,0x48,0x13,0x08,0x67,1360,1024, 0}, /* 3f 1360x1024-59Hz (BARCO1366 only) */
-	{0xffff,   0,   0,   0,   0,   0,   0, 0}
-};
-
-typedef struct _SiS_VBModeIDTableStruct
-{
-	UCHAR  ModeID;
-	UCHAR  VB_TVDelayIndex;
-	UCHAR  VB_TVFlickerIndex;
-	UCHAR  VB_TVPhaseIndex;
-	UCHAR  VB_TVYFilterIndex;
-	UCHAR  VB_LCDDelayIndex;
-	UCHAR  _VB_LCDHIndex;
-	UCHAR  _VB_LCDVIndex;
-}SiS_VBModeIDTableStruct;
+	{0x6a,0x2212,0x0102,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00,-1},  /* 800x600x? */
+	{0x2e,0x0a1b,0x0101,SIS_RI_640x480,  0x00,0x00,0x00,0x00,0x08,-1},
+	{0x2f,0x021b,0x0100,SIS_RI_640x400,  0x00,0x00,0x00,0x00,0x10,-1},  /* 640x400x8 */
+	{0x30,0x2a1b,0x0103,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00,-1},
+	{0x31,0x0a1b,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11,-1},  /* 720x480x8 */
+	{0x32,0x2a1b,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12,-1},  /* 720x576x8 */
+	{0x33,0x0a1d,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11,-1},  /* 720x480x16 */
+	{0x34,0x2a1d,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12,-1},  /* 720x576x16 */
+	{0x35,0x0a1f,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11,-1},  /* 720x480x32 */
+	{0x36,0x2a1f,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12,-1},  /* 720x576x32 */
+	{0x37,0x0212,0x0104,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13,-1},  /* 1024x768x? */
+	{0x38,0x0a1b,0x0105,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13,-1},  /* 1024x768x8 */
+	{0x3a,0x0e3b,0x0107,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a,-1},  /* 1280x1024x8 */
+	{0x3c,0x063b,0x0130,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e,-1},
+	{0x3d,0x067d,0x0131,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e,-1},
+	{0x40,0x921c,0x010d,SIS_RI_320x200,  0x00,0x00,0x00,0x00,0x23,-1},  /* 320x200x15 */
+	{0x41,0x921d,0x010e,SIS_RI_320x200,  0x00,0x00,0x00,0x00,0x23,-1},  /* 320x200x16 */
+	{0x43,0x0a1c,0x0110,SIS_RI_640x480,  0x00,0x00,0x00,0x00,0x08,-1},
+	{0x44,0x0a1d,0x0111,SIS_RI_640x480,  0x00,0x00,0x00,0x00,0x08,-1},
+	{0x46,0x2a1c,0x0113,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00,-1},  /* 800x600x15 */
+	{0x47,0x2a1d,0x0114,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00,-1},  /* 800x600x16 */
+	{0x49,0x0a3c,0x0116,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13,-1},
+	{0x4a,0x0a3d,0x0117,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13,-1},
+	{0x4c,0x0e7c,0x0119,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a,-1},
+	{0x4d,0x0e7d,0x011a,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a,-1},
+	{0x50,0x921b,0x0132,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x24,-1},  /* 320x240x8  */
+	{0x51,0xb21b,0x0133,SIS_RI_400x300,  0x00,0x00,0x00,0x00,0x25,-1},  /* 400x300x8  */
+	{0x52,0x921b,0x0134,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x26,-1},  /* 512x384x8  */
+	{0x56,0x921d,0x0135,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x24,-1},  /* 320x240x16 */
+	{0x57,0xb21d,0x0136,SIS_RI_400x300,  0x00,0x00,0x00,0x00,0x25,-1},  /* 400x300x16 */
+	{0x58,0x921d,0x0137,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x26,-1},  /* 512x384x16 */
+	{0x59,0x921b,0x0138,SIS_RI_320x200,  0x00,0x00,0x00,0x00,0x23,-1},  /* 320x200x8  */
+	{0x5c,0x921f,0x0000,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x26,-1},  /* 512x384x32 */
+	{0x5d,0x021d,0x0139,SIS_RI_640x400,  0x00,0x00,0x00,0x00,0x10,-1},  /* 640x400x16 */
+ 	{0x5e,0x021f,0x0000,SIS_RI_640x400,  0x00,0x00,0x00,0x00,0x10,-1},  /* 640x400x32 */
+	{0x62,0x0a3f,0x013a,SIS_RI_640x480,  0x00,0x00,0x00,0x00,0x08,-1},
+	{0x63,0x2a3f,0x013b,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00,-1},  /* 800x600x32 */
+	{0x64,0x0a7f,0x013c,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13,-1},
+	{0x65,0x0eff,0x013d,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a,-1},
+	{0x66,0x06ff,0x013e,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e,-1},
+	{0x68,0x067b,0x013f,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1},
+	{0x69,0x06fd,0x0140,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1},
+	{0x6b,0x07ff,0x0000,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1},
+	{0x6c,0x067b,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28,-1},  /* 2048x1536x8 - not in BIOS! */
+	{0x6d,0x06fd,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28,-1},  /* 2048x1536x16 - not in BIOS! */
+	{0x70,0x2a1b,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d,-1},  /* 800x480x8 */
+	{0x71,0x0a1b,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1},  /* 1024x576x8 */
+	{0x74,0x0a1d,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1},  /* 1024x576x16 */
+	{0x75,0x0e3d,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x33,-1},  /* 1280x720x16 */
+	{0x76,0x2a1f,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d,-1},  /* 800x480x32 */
+	{0x77,0x0a3f,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1},  /* 1024x576x32 */
+	{0x78,0x0eff,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x33,-1},  /* 1280x720x32 */
+	{0x79,0x0e3b,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x33,-1},  /* 1280x720x8 */
+	{0x7a,0x2a1d,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d,-1},  /* 800x480x16 */
+	{0x7c,0x0a3b,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x29,-1},  /* 1280x960x8 */
+	{0x7d,0x0a7d,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x29,-1},  /* 1280x960x16 */
+	{0x7e,0x0aff,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x29,-1},  /* 1280x960x32 */
+	{0x20,0x0a1b,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b,-1},  /* 1024x600 */
+	{0x21,0x0a3d,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b,-1},
+	{0x22,0x0a7f,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b,-1},
+	{0x23,0x0a1b,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c,-1},  /* 1152x768 */
+	{0x24,0x0a3d,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c,-1},
+	{0x25,0x0a7f,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c,-1},
+	{0x29,0x0e1b,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36,-1},  /* 1152x864 */
+	{0x2a,0x0e3d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36,-1},
+	{0x2b,0x0e7f,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36,-1},
+	{0x39,0x2a1b,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x38,-1},  /* 848x480 */
+	{0x3b,0x2a3d,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x38,-1},
+	{0x3e,0x2a7f,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x38,-1},
+	{0x3f,0x2a1b,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3a,-1},  /* 856x480 */
+	{0x42,0x2a3d,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3a,-1},
+	{0x45,0x2a7f,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3a,-1},
+	{0x48,0x223b,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3c,-1},  /* 1360x768 */
+	{0x4b,0x227d,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3c,-1},
+	{0x4e,0x22ff,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3c,-1},
+	{0x4f,0x921f,0x0000,SIS_RI_320x200,  0x00,0x00,0x00,0x00,0x23,-1},  /* 320x200x32 */
+	{0x53,0x921f,0x0000,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x24,-1},  /* 320x240x32 */
+	{0x54,0xb21f,0x0000,SIS_RI_400x300,  0x00,0x00,0x00,0x00,0x25,-1},  /* 400x300x32 */
+	{0x55,0x2e3b,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3d,-1},  /* 1280x768   */
+	{0x5a,0x2e7d,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3d,-1},
+	{0x5b,0x2eff,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3d,-1},
+	{0x5f,0x2a1b,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3e,-1},  /* 768x576x8 */
+	{0x60,0x2a1d,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3e,-1},  /* 768x576x16 */
+	{0x61,0x2a1f,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3e,-1},  /* 768x576x32 */
+	{0x67,0x2e3b,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x3f,-1},  /* 1360x1024x8 (BARCO) */
+	{0x6f,0x2e7d,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x3f,-1},  /* 1360x1024x16 (BARCO) */
+	{0x72,0x2eff,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x3f,-1},  /* 1360x1024x32 (BARCO) */
+	{0xff,0x0000,0xffff,0,               0x00,0x00,0x00,0x00,0x00}
+};
+
+static const SiS_Ext2Struct  SiS300_RefIndex[] =
+{
+	{0x085f,0x0d,0x03,0x05,0x05,0x6a, 800, 600, 0}, /* 00 */
+	{0x0467,0x0e,0x44,0x05,0x05,0x6a, 800, 600, 0}, /* 01 */
+	{0x0067,0x0f,0x07,0x48,0x00,0x6a, 800, 600, 0}, /* 02 - CRT1CRTC was 0x4f */
+	{0x0067,0x10,0x06,0x8b,0x00,0x6a, 800, 600, 0}, /* 03 */
+	{0x0147,0x11,0x08,0x00,0x00,0x6a, 800, 600, 0}, /* 04 */
+	{0x0147,0x12,0x0c,0x00,0x00,0x6a, 800, 600, 0}, /* 05 */
+	{0x0047,0x11,0x4e,0x00,0x00,0x6a, 800, 600, 0}, /* 06 - CRT1CRTC was 0x51 */
+	{0x0047,0x11,0x13,0x00,0x00,0x6a, 800, 600, 0}, /* 07 */
+	{0xc85f,0x05,0x00,0x04,0x04,0x2e, 640, 480, 0}, /* 08 */
+	{0xc067,0x06,0x02,0x04,0x04,0x2e, 640, 480, 0}, /* 09 */
+	{0xc067,0x07,0x02,0x47,0x04,0x2e, 640, 480, 0}, /* 0a */
+	{0xc067,0x08,0x03,0x8a,0x04,0x2e, 640, 480, 0}, /* 0b */
+	{0xc047,0x09,0x05,0x00,0x00,0x2e, 640, 480, 0}, /* 0c */
+	{0xc047,0x0a,0x08,0x00,0x00,0x2e, 640, 480, 0}, /* 0d */
+	{0xc047,0x0b,0x0a,0x00,0x00,0x2e, 640, 480, 0}, /* 0e */
+	{0xc047,0x0c,0x10,0x00,0x00,0x2e, 640, 480, 0}, /* 0f */
+	{0x487f,0x04,0x00,0x00,0x00,0x2f, 640, 400, 0}, /* 10 */
+	{0xc04f,0x31,0x01,0x06,0x00,0x31, 720, 480, 0}, /* 11 */
+	{0x004f,0x32,0x03,0x06,0x00,0x32, 720, 576, 0}, /* 12 */
+	{0x0187,0x15,0x05,0x00,0x00,0x37,1024, 768, 0}, /* 13 */
+        {0xc877,0x16,0x09,0x06,0x06,0x37,1024, 768, 0}, /* 14 */
+	{0xc067,0x17,0x0b,0x49,0x06,0x37,1024, 768, 0}, /* 15 - CRT1CRTC was 0x97 */
+	{0x0267,0x18,0x0d,0x00,0x06,0x37,1024, 768, 0}, /* 16 */
+	{0x0047,0x19,0x11,0x8c,0x00,0x37,1024, 768, 0}, /* 17 - CRT1CRTC was 0x59 */
+	{0x0047,0x1a,0x52,0x00,0x00,0x37,1024, 768, 0}, /* 18 */
+	{0x0007,0x1b,0x16,0x00,0x00,0x37,1024, 768, 0}, /* 19 - CRT1CRTC was 0x5b */
+	{0x0387,0x1c,0x4d,0x00,0x00,0x3a,1280,1024, 0}, /* 1a - CRT1CRTC was 0x5c */
+	{0x0077,0x1d,0x14,0x07,0x00,0x3a,1280,1024, 0}, /* 1b */
+	{0x0047,0x1e,0x17,0x00,0x00,0x3a,1280,1024, 0}, /* 1c */
+	{0x0007,0x1f,0x98,0x00,0x00,0x3a,1280,1024, 0}, /* 1d */
+	{0x0007,0x20,0x59,0x00,0x00,0x3c,1600,1200, 0}, /* 1e - CRT1CRTC was 0x60 */
+	{0x0007,0x21,0x5a,0x00,0x00,0x3c,1600,1200, 0}, /* 1f */
+	{0x0007,0x22,0x1b,0x00,0x00,0x3c,1600,1200, 0}, /* 20 */
+	{0x0007,0x23,0x1d,0x00,0x00,0x3c,1600,1200, 0}, /* 21 - CRT1CRTC was 0x63 */
+	{0x0007,0x24,0x1e,0x00,0x00,0x3c,1600,1200, 0}, /* 22 */
+	{0x407f,0x00,0x00,0x00,0x00,0x40, 320, 200, 0}, /* 23 */
+	{0xc07f,0x01,0x00,0x04,0x04,0x50, 320, 240, 0}, /* 24 */
+	{0x0077,0x02,0x04,0x05,0x05,0x51, 400, 300, 0}, /* 25 */
+	{0xc877,0x03,0x09,0x06,0x06,0x52, 512, 384, 0}, /* 26 */  /* was c077 */
+	{0x8207,0x25,0x1f,0x00,0x00,0x68,1920,1440, 0}, /* 27 */
+	{0x0007,0x26,0x20,0x00,0x00,0x6c,2048,1536, 0}, /* 28 */
+	{0x0067,0x27,0x14,0x08,0x0a,0x6e,1280, 960, 0}, /* 29 - 1280x960-60 */
+	{0x0027,0x45,0x3c,0x08,0x0a,0x6e,1280, 960, 0}, /* 2a - 1280x960-85 */
+	{0xc077,0x33,0x09,0x06,0x00,0x20,1024, 600, 0}, /* 2b */
+	{0xc077,0x34,0x0b,0x06,0x00,0x23,1152, 768, 0}, /* 2c */	/* VCLK 0x09 */
+	{0x0057,0x35,0x27,0x08,0x00,0x70, 800, 480, 0}, /* 2d */
+	{0x0047,0x36,0x37,0x08,0x00,0x70, 800, 480, 0}, /* 2e */
+	{0x0047,0x37,0x08,0x08,0x00,0x70, 800, 480, 0}, /* 2f */
+	{0x0057,0x38,0x09,0x09,0x00,0x71,1024, 576, 0}, /* 30 */
+	{0x0047,0x39,0x38,0x09,0x00,0x71,1024, 576, 0}, /* 31 */
+	{0x0047,0x3a,0x11,0x09,0x00,0x71,1024, 576, 0}, /* 32 */
+	{0x0057,0x3b,0x39,0x0a,0x00,0x75,1280, 720, 0}, /* 33 */
+	{0x0047,0x3c,0x3a,0x0a,0x00,0x75,1280, 720, 0}, /* 34 */
+	{0x0007,0x3d,0x3b,0x0a,0x00,0x75,1280, 720, 0}, /* 35 */
+	{0x0047,0x3e,0x34,0x06,0x00,0x29,1152, 864, 0}, /* 36 1152x864-75Hz */
+	{0x0047,0x44,0x3a,0x06,0x00,0x29,1152, 864, 0}, /* 37 1152x864-85Hz */
+	{0x00c7,0x3f,0x28,0x00,0x00,0x39, 848, 480, 0}, /* 38 848x480-38Hzi */
+	{0xc067,0x40,0x3d,0x0b,0x0b,0x39, 848, 480, 0}, /* 39 848x480-60Hz  */
+	{0x00c7,0x41,0x28,0x00,0x00,0x3f, 856, 480, 0}, /* 3a 856x480-38Hzi */
+	{0xc047,0x42,0x28,0x00,0x00,0x3f, 856, 480, 0}, /* 3b 856x480-60Hz  */
+	{0x0067,0x43,0x3e,0x0c,0x0b,0x48,1360, 768, 0}, /* 3c 1360x768-60Hz */
+	{0x0077,0x46,0x3f,0x08,0x00,0x55,1280, 768, 0}, /* 3d 1280x768-60Hz */
+	{0x004f,0x47,0x03,0x06,0x00,0x5f, 768, 576, 0}, /* 3e 768x576 */
+	{0x0027,0x48,0x13,0x08,0x08,0x67,1360,1024, 0}, /* 3f 1360x1024-59Hz (BARCO1366 only) */
+	{0xffff,   0,   0,   0,   0,   0,   0,   0, 0}
+};
 
-static const SiS_VBModeIDTableStruct  SiS300_VBModeIDTable[] =
+static const SiS_VBModeStruct SiS300_VBModeIDTable[] =
 {
 	{0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
 	{0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01},
@@ -355,12 +302,7 @@
 	{0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
 };
 
-typedef struct _SiS300_CRT1TableStruct
-{
-	UCHAR CR[17];
-} SiS300_CRT1TableStruct;
-
-static const SiS300_CRT1TableStruct  SiS300_CRT1Table[] =
+static const SiS_CRT1TableStruct  SiS300_CRT1Table[] =
 {
 #if 1
  {{0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,    /* 0x00 - 320x200 */
@@ -625,13 +567,7 @@
    0x00}}   /* 0x48 */
 };
 
-typedef struct _SiS300_MCLKDataStruct
-{
-	UCHAR SR28,SR29,SR2A;
-	USHORT CLOCK;
-} SiS300_MCLKDataStruct;
-
-static const SiS300_MCLKDataStruct  SiS300_MCLKData_630[] =
+static const SiS_MCLKDataStruct  SiS300_MCLKData_630[] =
 {
 	{ 0x5a,0x64,0x80, 66},
 	{ 0xb3,0x45,0x80, 83},
@@ -643,7 +579,7 @@
 	{ 0x37,0x61,0x80,100}
 };
 
-static const SiS300_MCLKDataStruct  SiS300_MCLKData_300[] =
+static const SiS_MCLKDataStruct  SiS300_MCLKData_300[] =
 {
 	{ 0x68,0x43,0x80,125},
 	{ 0x68,0x43,0x80,125},
@@ -655,13 +591,7 @@
 	{ 0x37,0x61,0x80,100}
 };
 
-typedef struct _SiS300_VCLKDataStruct
-{
-	UCHAR SR2B,SR2C;
-	USHORT CLOCK;
-} SiS300_VCLKDataStruct;
-
-static const SiS300_VCLKDataStruct  SiS300_VCLKData[] =
+static SiS_VCLKDataStruct SiS300_VCLKData[] =
 {
 	{ 0x1b,0xe1, 25}, /* 0x00 */
 	{ 0x4e,0xe4, 28}, /* 0x01 */
@@ -736,14 +666,7 @@
 	{ 0x37,0x61,100}, /* 0x43 */  /* 1280x960 LCD */
 	{ 0xe3,0x9a,106}, /* 0x44 */  /* 1360x1024 - special for Barco iQ R300 */
 	{ 0xe2,0x46,135}, /* 0x45 */  /* 1280x1024-75, better clock for VGA2 */
-	{ 0xff,0x00,  0}
-};
-
-static const UCHAR  SiS300_ScreenOffset[] =
-{
-	0x14,0x19,0x20,0x28,0x32,0x40,0x50,
-        0x64,0x78,0x80,0x2d,0x35,0x48,0x35,
-	0x55,0x30,0xff
+	{    0,   0,  0}  /* 0x46 custom (will be filled out) */
 };
 
 #ifndef LINUX_XF86
@@ -789,12 +712,7 @@
 static UCHAR SiS300_CR49[2];
 #endif
 
-typedef struct _SiS300_PanelDelayTblStruct
-{
-	UCHAR timer[2];
-} SiS300_PanelDelayTblStruct;
-
-static const SiS300_PanelDelayTblStruct  SiS300_PanelDelayTbl[] =
+static const SiS_PanelDelayTblStruct  SiS300_PanelDelayTbl[] =
 {
 	{{0x05,0xaa}},
 	{{0x05,0x14}},
@@ -815,7 +733,7 @@
 };
 
 #if 0
-static const SiS300_PanelDelayTblStruct  SiS300_PanelDelayTblLVDS[] =
+static const SiS_PanelDelayTblStruct  SiS300_PanelDelayTblLVDS[] =
 {
 	{{0x05,0xaa}},
 	{{0x05,0x14}},
@@ -840,28 +758,18 @@
 /* SIS VIDEO BRIDGE ----------------------------------------- */
 /**************************************************************/
 
-typedef struct _SiS300_LCDDataStruct
+static const SiS_LCDDataStruct  SiS300_St2LCD1024x768Data[] =
 {
-	USHORT RVBHCMAX;
-	USHORT RVBHCFACT;
-	USHORT VGAHT;
-	USHORT VGAVT;
-	USHORT LCDHT;
-	USHORT LCDVT;
-} SiS300_LCDDataStruct;
-
-static const SiS300_LCDDataStruct  SiS300_StLCD1024x768Data[] =
-{
-	{   66,  31, 992, 510,1320, 816},
-	{   66,  31, 992, 510,1320, 816},
-	{  176,  75, 900, 510,1320, 816},
-	{  176,  75, 900, 510,1320, 816},
-	{   66,  31, 992, 510,1320, 816},
-	{   27,  16,1024, 650,1350, 832},
+	{   62,  25, 800, 546,1344, 806},
+	{   32,  15, 930, 546,1344, 806},
+	{   32,  15, 930, 546,1344, 806},
+	{  104,  45, 945, 496,1344, 806},
+	{   62,  25, 800, 546,1344, 806},
+	{   31,  18,1008, 624,1344, 806},
 	{    1,   1,1344, 806,1344, 806}
 };
 
-static const SiS300_LCDDataStruct  SiS300_ExtLCD1024x768Data[] =
+static const SiS_LCDDataStruct  SiS300_ExtLCD1024x768Data[] =
 {
 	{   12,   5, 896, 512,1344, 806},
 	{   12,   5, 896, 510,1344, 806},
@@ -878,30 +786,19 @@
 	{    1,   1,1344, 806,1344, 806}
 };
 
-static const SiS300_LCDDataStruct  SiS300_St2LCD1024x768Data[] =
-{
-	{   62,  25, 800, 546,1344, 806},
-	{   32,  15, 930, 546,1344, 806},
-	{   32,  15, 930, 546,1344, 806},
-	{  104,  45, 945, 496,1344, 806},
-	{   62,  25, 800, 546,1344, 806},
-	{   31,  18,1008, 624,1344, 806},
-	{    1,   1,1344, 806,1344, 806}
-};
-
-static const SiS300_LCDDataStruct  SiS300_StLCD1280x1024Data[] =
+static const SiS_LCDDataStruct  SiS300_St2LCD1280x1024Data[] =
 {
-	{    4,   1, 880, 510,1650,1088},
-	{    4,   1, 880, 510,1650,1088},
+	{   22,   5, 800, 510,1650,1088},
+	{   22,   5, 800, 510,1650,1088},
 	{  176,  45, 900, 510,1650,1088},
 	{  176,  45, 900, 510,1650,1088},
-	{    4,   1, 880, 510,1650,1088},
+	{   22,   5, 800, 510,1650,1088},
 	{   13,   5,1024, 675,1560,1152},
 	{   16,   9,1266, 804,1688,1072},
 	{    1,   1,1688,1066,1688,1066}
 };
 
-static const SiS300_LCDDataStruct  SiS300_ExtLCD1280x1024Data[] =
+static const SiS_LCDDataStruct  SiS300_ExtLCD1280x1024Data[] =
 {
 	{  211,  60,1024, 501,1688,1066},
 	{  211,  60,1024, 508,1688,1066},
@@ -913,74 +810,18 @@
 	{    1,   1,1688,1066,1688,1066}
 };
 
-static const SiS300_LCDDataStruct  SiS300_St2LCD1280x1024Data[] =
-{
-	{   22,   5, 800, 510,1650,1088},
-	{   22,   5, 800, 510,1650,1088},
-	{  176,  45, 900, 510,1650,1088},
-	{  176,  45, 900, 510,1650,1088},
-	{   22,   5, 800, 510,1650,1088},
-	{   13,   5,1024, 675,1560,1152},
-	{   16,   9,1266, 804,1688,1072},
-	{    1,   1,1688,1066,1688,1066}
-};
-
-static const SiS300_LCDDataStruct  SiS300_NoScaleData1024x768[] =
-{
-	{    1,   1, 800, 449, 800, 449},
-	{    1,   1, 800, 449, 800, 449},
-	{    1,   1, 900, 449, 900, 449},
-	{    1,   1, 900, 449, 900, 449},
-	{    1,   1, 800, 525, 800, 525},
-	{    1,   1,1056, 628,1056, 628},
-	{    1,   1,1344, 806,1344, 806},
-	{    1,   1,1688,1066,1688,1066}
-};
-
-static const SiS300_LCDDataStruct  SiS300_NoScaleData1280x1024[] =  /* TW: Fake */
-{
-	{    1,   1, 800, 449, 800, 449},
-	{    1,   1, 800, 449, 800, 449},
-	{    1,   1, 900, 449, 900, 449},
-	{    1,   1, 900, 449, 900, 449},
-	{    1,   1, 800, 525, 800, 525},
-	{    1,   1,1056, 628,1056, 628},
-	{    1,   1,1344, 806,1344, 806},
-	{    1,   1,1688,1066,1688,1066}
-};
-
-typedef struct _SiS300_Part2PortTblStruct
-{
- 	UCHAR CR[12];
-} SiS300_Part2PortTblStruct;
-
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1024x768_1[] =
+static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_1[] =
 { /* VESA Timing */
- {{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
- {{0x2c,0x12,0x9a,0xae,0x88,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
- {{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}},
- {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}},
- {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}}
+  {{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
+  {{0x2c,0x12,0x9a,0xae,0x88,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
+  {{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
+  {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+  {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}},
+  {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}},
+  {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}}
 };
 
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_1[] =
-{	/* TW: Temporary data, invalid */
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
-};
-
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1400x1050_1[] =
-{	/* TW: Temporary data, invalid */
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
-};
-
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1600x1200_1[] =
-{	/* TW: Temporary data, invalid */
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
-};
-
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1024x768_2[] =
+static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_2[] =
 {  /* Non-VESA */
  {{0x28,0x12,0xa3,0xd0,0xaa,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
  {{0x2c,0x12,0x9a,0xae,0x88,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
@@ -991,38 +832,23 @@
  {{0x36,0x13,0x13,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}}
 };
 
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_2[] =
+static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_3[] =
 {
  {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
 };
 
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1400x1050_2[] =
+static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_1[] =
 {
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
-};
-
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1600x1200_2[] =
-{	/* TW: Temporary data, invalid */
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
-};
-
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1024x768_3[] =
-{	/* TW: Temporary data, invalid */
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
-};
-
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_3[] =
-{	/* TW: Temporary data, invalid */
   {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
 };
 
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1400x1050_3[] =
-{	/* TW: Temporary data, invalid */
-  {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
+static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_2[] =
+{
+ {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
 };
 
-static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1600x1200_3[] =
-{	/* TW: Temporary data, invalid */
+static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_3[] =
+{
   {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
 };
 
@@ -1030,15 +856,7 @@
 /* LVDS/Chrontel -------------------------------------------- */
 /**************************************************************/
 
-typedef struct _SiS300_LVDSDataStruct
-{
-	USHORT VGAHT;
-	USHORT VGAVT;
-	USHORT LCDHT;
-	USHORT LCDVT;
-} SiS300_LVDSDataStruct;
-
-static const SiS300_LVDSDataStruct  SiS300_CHTVUPALData[] =
+static const SiS_LVDSDataStruct  SiS300_CHTVUPALData[] =
 {
 	{1008, 625,1008, 625},
 	{1008, 625,1008, 625},
@@ -1048,7 +866,7 @@
 	{ 936, 836, 936, 836}
 };
 
-static const SiS300_LVDSDataStruct  SiS300_CHTVOPALData[] =
+static const SiS_LVDSDataStruct  SiS300_CHTVOPALData[] =
 {
 	{1008, 625,1008, 625},
 	{1008, 625,1008, 625},
@@ -1058,7 +876,7 @@
 	{ 960, 750, 960, 750}
 };
 
-static const SiS300_LVDSDataStruct  SiS300_CHTVSOPALData[] =
+static const SiS_LVDSDataStruct  SiS300_CHTVSOPALData[] =
 {
 	{1008, 625,1008, 625},
 	{1008, 625,1008, 625},
@@ -1068,13 +886,8 @@
 	{ 944, 625, 944, 625}
 };
 
-typedef struct _SiS300_LVDSDesStruct
-{
-	USHORT LCDHDES;
-	USHORT LCDVDES;
-} SiS300_LVDSDesStruct;
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType00_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType00_1[] =
 {
 	{ 1059, 626 },   /* 2.08 */
 	{ 1059, 624 },
@@ -1098,7 +911,7 @@
 #endif
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType01_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType01_1[] =
 {
 	{   0,   0 },  /* 2.08 */
 	{   0,   0 },
@@ -1122,7 +935,7 @@
 #endif
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType02_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType02_1[] =
 {
 	{ 1059, 626 },  /* 2.08 */
 	{ 1059, 624 },
@@ -1146,7 +959,7 @@
 #endif
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType03_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType03_1[] =
 {
 	{   8, 436},
 	{   8, 440},
@@ -1159,7 +972,7 @@
 	{1343, 794}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType04_1[] =	/* 1280x1024 */
+static const SiS_LVDSDesStruct  SiS300_PanelType04_1[] =	/* 1280x1024 */
 {
 	{1343, 798},
 	{1343, 794},
@@ -1172,7 +985,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType05_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType05_1[] =
 {
 	{1343, 798},
 	{1343, 794},
@@ -1185,7 +998,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType06_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType06_1[] =	/* Clevo Trumpion 1024x768 */
 {
 	{1343, 798},
 	{1343, 794},
@@ -1198,7 +1011,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType07_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType07_1[] =
 {
 	{1343, 798},
 	{1343, 794},
@@ -1211,7 +1024,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType08_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType08_1[] =
 {
 	{1059, 626},
 	{1059, 624},
@@ -1224,7 +1037,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType09_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType09_1[] =
 {
 	{1343, 798},
 	{1343, 794},
@@ -1237,7 +1050,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0a_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0a_1[] =
 {
 	{1059, 626},
 	{1059, 624},
@@ -1250,7 +1063,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0b_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0b_1[] =
 {
 	{1343,   0},
 	{1343,   0},
@@ -1263,7 +1076,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0c_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0c_1[] =
 {
 	{1343, 798},
 	{1343, 794},
@@ -1276,7 +1089,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0d_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0d_1[] =
 {
 	{1343, 798},
 	{1343, 794},
@@ -1289,7 +1102,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0e_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0e_1[] =
 {
 	{1343, 798},
 	{1343, 794},
@@ -1302,7 +1115,7 @@
 	{   0,   0}     /* 1280x960 - not applicable */
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0f_1[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0f_1[] =
 {
 	{1343, 798},
 	{1343, 794},
@@ -1315,7 +1128,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType00_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType00_2[] =
 {
 	{976, 527},
 	{976, 502},
@@ -1328,7 +1141,7 @@
 	{  0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType01_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType01_2[] =
 {
 	{1152, 622},
 	{1152, 597},
@@ -1341,7 +1154,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType02_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType02_2[] =
 {
 	{976, 527},
 	{976, 502},
@@ -1354,7 +1167,7 @@
 	{  0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType03_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType03_2[] =
 {
 	{1152, 622},
 	{1152, 597},
@@ -1367,7 +1180,7 @@
 	{1152, 597}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType04_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType04_2[] =
 {
 	{1152, 622},
 	{1152, 597},
@@ -1380,7 +1193,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType05_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType05_2[] =
 {
 	{1152, 622},
 	{1152, 597},
@@ -1393,7 +1206,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType06_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType06_2[] =
 {
 	{1152, 622},
 	{1152, 597},
@@ -1406,7 +1219,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType07_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType07_2[] =
 {
  	{1152, 622},
  	{1152, 597},
@@ -1419,7 +1232,7 @@
 	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType08_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType08_2[] =
 {
  	{976, 527},
  	{976, 502},
@@ -1432,7 +1245,7 @@
  	{  0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType09_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType09_2[] =
 {
  	{1152, 622},
  	{1152, 597},
@@ -1445,7 +1258,7 @@
  	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0a_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0a_2[] =
 {
  	{976, 527},
  	{976, 502},
@@ -1458,7 +1271,7 @@
  	{  0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0b_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0b_2[] =
 {
  	{ 1152, 700},
  	{ 1152, 675},
@@ -1471,7 +1284,7 @@
  	{    0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0c_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0c_2[] =
 {
  	{1152, 622},
  	{1152, 597},
@@ -1484,7 +1297,7 @@
  	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0d_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0d_2[] =
 {
  	{1152, 622},
  	{1152, 597},
@@ -1497,7 +1310,7 @@
  	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0e_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0e_2[] =
 {
  	{1152, 622},
  	{1152, 597},
@@ -1510,7 +1323,7 @@
  	{   0,   0}
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType0f_2[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType0f_2[] =
 {
  	{1152, 622},
  	{1152, 597},
@@ -1523,8 +1336,36 @@
  	{   0,   0}
 };
 
+static const SiS_LVDSDesStruct  SiS300_PanelTypeNS_1[]=
+{
+	{ 0,   0},
+	{ 0,   0},
+	{ 0,   0},
+	{ 0,   0},
+	{ 0,   0},
+	{ 0,   0},
+	{ 0, 805},
+	{ 0,   0},
+	{ 0,   0},
+	{ 0,   0}
+};
+
+static const SiS_LVDSDesStruct  SiS300_PanelTypeNS_2[] =
+{
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0}
+};
+
 /* Custom data for Barco iQ R200/300/400 (BIOS 2.00.07) */
-static const SiS300_LVDSDesStruct  SiS300_PanelType04_1a[] =	/* 1280x1024 (1366x1024) */
+static const SiS_LVDSDesStruct  SiS300_PanelType04_1a[] =	/* 1280x1024 (1366x1024) */
 {
 	{1330, 798},  /* 320x200 */
 	{1330, 794},
@@ -1537,7 +1378,7 @@
 	{   0,   0}   /* 1360x1024          */
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType04_2a[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType04_2a[] =
 {
 	{1152, 622},
 	{1152, 597},
@@ -1551,7 +1392,7 @@
 };
 
 /* Custom data for Barco iQ G200/300/400 (BIOS 2.00.07) */
-static const SiS300_LVDSDesStruct  SiS300_PanelType04_1b[] =	/* 1024x768 */
+static const SiS_LVDSDesStruct  SiS300_PanelType04_1b[] =	/* 1024x768 */
 {
 	{1330, 798},  /* 320x200 */
 	{1330, 794},
@@ -1562,7 +1403,7 @@
 	{   0, 805}   /* 1024x768 / 512x384 */
 };
 
-static const SiS300_LVDSDesStruct  SiS300_PanelType04_2b[] =
+static const SiS_LVDSDesStruct  SiS300_PanelType04_2b[] =
 {
 	{1152, 622},
 	{1152, 597},
@@ -1575,12 +1416,7 @@
 
 /* CRT1 CRTC for slave modes */
 
-typedef struct _SiS300_LVDSCRT1DataStruct
-{
-UCHAR CR[15];
-} SiS300_LVDSCRT1DataStruct;
-
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT1800x600_1[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT1800x600_1[] =
 {
 	{{0x65,0x4f,0x89,0x56,0x83,0xaf,0x1f,
 	  0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
@@ -1602,7 +1438,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT1800x600_1_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT1800x600_1_H[] =
 {
 	{{0x30,0x27,0x94,0x2c,0x92,0xaf,0x1f,
 	  0x90,0x85,0x8f,0xab,0x30,0x00,0x04,
@@ -1624,7 +1460,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT11024x768_1[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT11024x768_1[] =
 {
 	{{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
 	  0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
@@ -1649,7 +1485,7 @@
 	  0x01}}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT11024x768_1_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT11024x768_1_H[] =
 {
 	{{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
 	  0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
@@ -1698,7 +1534,7 @@
 #endif
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT11280x1024_1[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT11280x1024_1[] =
 {
 	{{0x63,0x4f,0x87,0x54,0x9f,0xb4,0x1f,
 	  0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
@@ -1723,7 +1559,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT11280x1024_1_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT11280x1024_1_H[] =
 {
 	{{0x2f,0x27,0x93,0x2b,0x90,0xb4,0x1f,
 	  0x92,0x89,0x8f,0xb5,0x30,0x00,0x04,
@@ -1748,7 +1584,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT1800x600_2[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT1800x600_2[] =
 {
 	{{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
 	  0xf4,0x88,0x8f,0x73,0x20,0x00,0x06,
@@ -1770,7 +1606,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT1800x600_2_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT1800x600_2_H[] =
 {
 	{{0x3d,0x27,0x81,0x32,0x1a,0x72,0x3e,
 	  0xf4,0x88,0x8f,0x73,0x20,0x00,0x05,
@@ -1792,7 +1628,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT11024x768_2[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT11024x768_2[] =
 {
 	{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
 	  0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
@@ -1817,7 +1653,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT11024x768_2_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT11024x768_2_H[] =
 {
 	{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
 	  0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
@@ -1842,7 +1678,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT11280x1024_2[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT11280x1024_2[] =
 {
 	{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
 	  0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
@@ -1867,7 +1703,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_LVDSCRT11280x1024_2_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT11280x1024_2_H[] =
 {
 	{{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
 	  0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
@@ -1892,7 +1728,64 @@
 	  0x01}}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_CHTVCRT1UNTSC[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT1XXXxXXX_1[] =
+{
+ {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
+   0x00}},
+ {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
+   0x00}},
+ {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
+   0x00}},
+ {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
+   0x00}},
+ {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
+   0xe9,0x8b,0xe7,0x04,0x00,0x00,0x05,
+   0x00}},
+ {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
+   0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
+   0x01}},
+ {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
+   0x02,0x88,0xff,0x25,0x10,0x00,0x02,
+   0x01}},
+ {{0xce,0x9f,0x92,0xa8,0x14,0x28,0x5a,
+   0x00,0x84,0xff,0x29,0x09,0x00,0x07,
+   0x01}},
+ {{0xce,0x9f,0x92,0xa9,0x17,0x24,0xf5,
+   0x02,0x88,0xff,0x25,0x10,0x00,0x07,
+   0x01}}
+};
+
+static const SiS_LVDSCRT1DataStruct  SiS300_LVDSCRT1XXXxXXX_1_H[] =
+{
+ {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
+   0x00}},
+ {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
+   0x00}},
+ {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
+   0x00}},
+ {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
+   0x00}},
+ {{0x38,0x27,0x9c,0x2c,0x80,0x0b,0x3e,
+   0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
+   0x00}},
+ {{0x4d,0x31,0x91,0x3b,0x03,0x72,0xf0,
+   0x58,0x8c,0x57,0x73,0x20,0x00,0x01,
+   0x01}},
+ {{0x63,0x3f,0x87,0x4a,0x92,0x24,0xf5,
+   0x02,0x88,0xff,0x25,0x10,0x00,0x01,
+   0x01}}
+};
+
+
+static const SiS_LVDSCRT1DataStruct  SiS300_CHTVCRT1UNTSC[] =
 {
 	{{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
 	  0xe8,0x84,0x8f,0x57,0x20,0x00,0x01,
@@ -1914,7 +1807,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_CHTVCRT1ONTSC[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_CHTVCRT1ONTSC[] =
 {
 	{{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
 	  0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01,
@@ -1936,7 +1829,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_CHTVCRT1UPAL[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_CHTVCRT1UPAL[] =
 {
 	{{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
 	  0xf8,0x83,0x8f,0x70,0x20,0x00,0x05,
@@ -1958,7 +1851,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_CHTVCRT1OPAL[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_CHTVCRT1OPAL[] =
 {
 	{{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
 	  0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
@@ -1980,7 +1873,7 @@
 	  0x01 }}
 };
 
-static const SiS300_LVDSCRT1DataStruct  SiS300_CHTVCRT1SOPAL[] =
+static const SiS_LVDSCRT1DataStruct  SiS300_CHTVCRT1SOPAL[] =
 {
 	{{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
 	  0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
@@ -2002,12 +1895,7 @@
 	  0x01 }}
 };
 
-typedef struct _SiS300_CHTVRegDataStruct
-{
-	UCHAR Reg[16];
-} SiS300_CHTVRegDataStruct;
-
-static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_UNTSC[] =
+static const SiS_CHTVRegDataStruct SiS300_CHTVReg_UNTSC[] =
 {
 	{{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
 	{{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
@@ -2017,7 +1905,7 @@
 	{{0x8d,0xc4,0x00,0x3b,0xfb,0,0,0,0,0,0,0,0,0,0,0}}  /* Mode 24: 800x600 NTSC 7/10 */
 };
 
-static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_ONTSC[] =
+static const SiS_CHTVRegDataStruct SiS300_CHTVReg_ONTSC[] =
 {
 	{{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
 	{{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
@@ -2027,7 +1915,7 @@
 	{{0x8c,0xb4,0x00,0x32,0xf9,0,0,0,0,0,0,0,0,0,0,0}}  /* Mode 23: 800x600 NTSC 3/4 */
 };
 
-static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_UPAL[] =
+static const SiS_CHTVRegDataStruct SiS300_CHTVReg_UPAL[] =
 {
 	{{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}},
 	{{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
@@ -2038,7 +1926,7 @@
 
 };
 
-static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_OPAL[] =
+static const SiS_CHTVRegDataStruct SiS300_CHTVReg_OPAL[] =
 {
 	{{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 9: 640x400 PAL 1/1 */
 	{{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
@@ -2049,7 +1937,7 @@
 
 };
 
-static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_SOPAL[] =
+static const SiS_CHTVRegDataStruct SiS300_CHTVReg_SOPAL[] =
 {
 	{{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 9: 640x400 PAL 1/1 */
 	{{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
--- diff/drivers/video/sis/310vtbl.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/310vtbl.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * Register settings for SiS 315/330 series
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -52,20 +50,7 @@
  *
  */
 
-typedef struct _SiS310_StStruct
-{
-	UCHAR St_ModeID;
-	USHORT St_ModeFlag;
-	UCHAR St_StTableIndex;
-	UCHAR St_CRT2CRTC;
-	UCHAR St_ResInfo;
-	UCHAR VB_StTVFlickerIndex;
-	UCHAR VB_StTVEdgeIndex;
-	UCHAR VB_StTVYFilterIndex;
-	UCHAR St_PDC;
-} SiS310_StStruct;
-
-static const SiS310_StStruct SiS310_SModeIDTable[]=
+static const SiS_StStruct SiS310_SModeIDTable[]=
 {
 	{0x01,0x9208,0x01,0x00,0x00,0x00,0x01,0x00, 0x40},
 	{0x01,0x1210,0x14,0x01,0x01,0x00,0x01,0x00, 0x40},
@@ -89,207 +74,192 @@
 	{0xff,0x0000,0x00,0x00,0x00,0x00,0x00,0x00, 0x40}
 };
 
-typedef struct _SiS310_ExtStruct
+static const SiS_ExtStruct  SiS310_EModeIDTable[]=
 {
-	UCHAR  Ext_ModeID;
-	USHORT Ext_ModeFlag;
-	UCHAR  Ext_ModeOffset;
-	USHORT Ext_VESAID;
-	UCHAR  Ext_RESINFO;
-	UCHAR  VB_ExtTVFlickerIndex;
-	UCHAR  VB_ExtTVEdgeIndex;
-	UCHAR  VB_ExtTVYFilterIndex;
-	UCHAR  VB_ExtTVYFilterIndexROM661;
-	UCHAR  REFindex;
-} SiS310_ExtStruct;
-
-static const SiS310_ExtStruct  SiS310_EModeIDTable[]=
-{
-	{0x6a,0x2212,0x04,0x0102,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00}, /* 800x600x? */
-	{0x2e,0x0a1b,0x03,0x0101,SIS_RI_640x480,  0x00,0x00,0x05,0x05,0x08}, /* 640x480x8 */
-        {0x2f,0x0a1b,0x03,0x0100,SIS_RI_640x400,  0x00,0x00,0x05,0x05,0x10}, /* 640x400x8 */
-	{0x30,0x2a1b,0x04,0x0103,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00}, /* 800x600x8 */
-        {0x31,0x0a1b,0x0a,0x0000,SIS_RI_720x480,  0x00,0x00,0x06,0x06,0x11}, /* 720x480x8 */
-	{0x32,0x0a1b,0x0a,0x0000,SIS_RI_720x576,  0x00,0x00,0x06,0x06,0x12}, /* 720x576x8 */
-	{0x33,0x0a1d,0x0a,0x0000,SIS_RI_720x480,  0x00,0x00,0x06,0x06,0x11}, /* 720x480x16 */
-	{0x34,0x2a1d,0x0a,0x0000,SIS_RI_720x576,  0x00,0x00,0x06,0x06,0x12}, /* 720x576x16 */
-	{0x35,0x0a1f,0x0a,0x0000,SIS_RI_720x480,  0x00,0x00,0x06,0x06,0x11}, /* 720x480x32 */
-	{0x36,0x2a1f,0x0a,0x0000,SIS_RI_720x576,  0x00,0x00,0x06,0x06,0x12}, /* 720x576x32 */
-	{0x37,0x0212,0x05,0x0104,SIS_RI_1024x768, 0x00,0x00,0x08,0x07,0x13}, /* 1024x768x? */
-	{0x38,0x0a1b,0x05,0x0105,SIS_RI_1024x768, 0x00,0x00,0x08,0x07,0x13}, /* 1024x768x8 */
-	{0x3a,0x0e3b,0x06,0x0107,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a}, /* 1280x1024x8 */
-	{0x3c,0x0e3b,0x07,0x0130,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e}, /* 1600x1200x8 */
-	{0x3d,0x0e7d,0x07,0x0131,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e}, /* 1600x1200x16 */
-	{0x40,0x9a1c,0x00,0x010d,SIS_RI_320x200,  0x00,0x00,0x04,0x04,0x25}, /* 320x200x15 */
-	{0x41,0x9a1d,0x00,0x010e,SIS_RI_320x200,  0x00,0x00,0x04,0x04,0x25}, /* 320x200x16 */
-	{0x43,0x0a1c,0x03,0x0110,SIS_RI_640x480,  0x00,0x00,0x05,0x05,0x08},
-	{0x44,0x0a1d,0x03,0x0111,SIS_RI_640x480,  0x00,0x00,0x05,0x05,0x08}, /* 640x480x16 */
-	{0x46,0x2a1c,0x04,0x0113,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00},
-	{0x47,0x2a1d,0x04,0x0114,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00}, /* 800x600x16 */
-	{0x49,0x0a3c,0x05,0x0116,SIS_RI_1024x768, 0x00,0x00,0x00,0x07,0x13},
-	{0x4a,0x0a3d,0x05,0x0117,SIS_RI_1024x768, 0x00,0x00,0x08,0x07,0x13}, /* 1024x768x16 */
-	{0x4c,0x0e7c,0x06,0x0119,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a},
-	{0x4d,0x0e7d,0x06,0x011a,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a}, /* 1280x1024x16 */
-	{0x50,0x9a1b,0x00,0x0132,SIS_RI_320x240,  0x00,0x00,0x04,0x04,0x26}, /* 320x240x8  */
-	{0x51,0xba1b,0x01,0x0133,SIS_RI_400x300,  0x00,0x00,0x07,0x07,0x27}, /* 400x300x8  */
-  	{0x52,0xba1b,0x02,0x0134,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x28}, /* 512x384x8  */
-	{0x56,0x9a1d,0x00,0x0135,SIS_RI_320x240,  0x00,0x00,0x04,0x04,0x26}, /* 320x240x16 */
-	{0x57,0xba1d,0x01,0x0136,SIS_RI_400x300,  0x00,0x00,0x07,0x07,0x27}, /* 400x300x16 */
- 	{0x58,0xba1d,0x02,0x0137,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x28}, /* 512x384x16 */
-	{0x59,0x9a1b,0x00,0x0138,SIS_RI_320x200,  0x00,0x00,0x04,0x04,0x25}, /* 320x200x8  */
-	{0x5a,0x021b,0x00,0x0138,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x3f}, /* 320x240x8  fstn */
-	{0x5b,0x0a1d,0x00,0x0135,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x3f}, /* 320x240x16 fstn */
-	{0x5c,0xba1f,0x02,0x0000,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x28}, /* 512x384x32 */
-	{0x5d,0x0a1d,0x03,0x0139,SIS_RI_640x400,  0x00,0x00,0x05,0x07,0x10},
-	{0x5e,0x0a1f,0x03,0x0000,SIS_RI_640x400,  0x00,0x00,0x05,0x07,0x10}, /* 640x400x32 */
-	{0x62,0x0a3f,0x03,0x013a,SIS_RI_640x480,  0x00,0x00,0x05,0x05,0x08}, /* 640x480x32 */
-	{0x63,0x2a3f,0x04,0x013b,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00}, /* 800x600x32 */
-	{0x64,0x0a7f,0x05,0x013c,SIS_RI_1024x768, 0x00,0x00,0x08,0x07,0x13}, /* 1024x768x32 */
-	{0x65,0x0eff,0x06,0x013d,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a}, /* 1280x1024x32 */
-	{0x66,0x0eff,0x07,0x013e,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e}, /* 1600x1200x32 */
-	{0x68,0x067b,0x08,0x013f,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x29}, /* 1920x1440x8 */
-	{0x69,0x06fd,0x08,0x0140,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x29}, /* 1920x1440x16 */
-	{0x6b,0x07ff,0x08,0x0141,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x29}, /* 1920x1440x32 */
-	{0x6c,0x067b,0x09,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x2f}, /* 2048x1536x8 */
-	{0x6d,0x06fd,0x09,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x2f}, /* 2048x1536x16 */
-	{0x6e,0x07ff,0x09,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x2f}, /* 2048x1536x32 */
-	{0x70,0x2a1b,0x04,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x07,0x34}, /* 800x480x8 */
-	{0x71,0x0a1b,0x05,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x37}, /* 1024x576x8 */
-	{0x74,0x0a1d,0x05,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x37}, /* 1024x576x16 */
-	{0x75,0x0a3d,0x06,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x3a}, /* 1280x720x16 */
-	{0x76,0x2a1f,0x04,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x07,0x34}, /* 800x480x32 */
-	{0x77,0x0a1f,0x05,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x37}, /* 1024x576x32 */
-	{0x78,0x0a3f,0x06,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x3a}, /* 1280x720x32 */
-	{0x79,0x0a3b,0x06,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x3a}, /* 1280x720x8 */
-	{0x7a,0x2a1d,0x04,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x07,0x34}, /* 800x480x16 */
-	{0x7c,0x0e3b,0x06,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x3d}, /* 1280x960x8 */
-	{0x7d,0x0e7d,0x06,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x3d}, /* 1280x960x16 */
-	{0x7e,0x0eff,0x06,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x3d}, /* 1280x960x32 */
-	{0x23,0x0e3b,0x06,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40}, /* 1280x768x8 */
-	{0x24,0x0e7d,0x06,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40}, /* 1280x768x16 */
-	{0x25,0x0eff,0x06,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40}, /* 1280x768x32 */
-	{0x26,0x0e3b,0x0c,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x41}, /* 1400x1050x8 */
-	{0x27,0x0e7d,0x0c,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x41}, /* 1400x1050x16 */
-	{0x28,0x0eff,0x0c,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x41}, /* 1400x1050x32*/
-	{0x29,0x0e1b,0x0d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43}, /* 1152x864 */
-	{0x2a,0x0e3d,0x0d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43},
-	{0x2b,0x0e7f,0x0d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43},
-	{0x39,0x2a1b,0x0b,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x45}, /* 848x480 */
-	{0x3b,0x2a3d,0x0b,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x45},
-	{0x3e,0x2a7f,0x0b,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x45},
-	{0x3f,0x2a1b,0x0b,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x47}, /* 856x480 */
-	{0x42,0x2a3d,0x0b,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x47},
-	{0x45,0x2a7f,0x0b,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x47},
-	{0x48,0x2a1b,0x0e,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x49}, /* 1360x768 */
-	{0x4b,0x2a3d,0x0e,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x49},
-	{0x4e,0x2a7f,0x0e,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x49},
-	{0x4f,0x9a1f,0x00,0x0000,SIS_RI_320x200,  0x00,0x00,0x04,0x04,0x25}, /* 320x200x32 */
-	{0x53,0x9a1f,0x00,0x0000,SIS_RI_320x240,  0x00,0x00,0x04,0x04,0x26}, /* 320x240x32 */
-	{0x54,0xba1f,0x01,0x0000,SIS_RI_400x300,  0x00,0x00,0x07,0x07,0x27}, /* 400x300x32 */
-	{0x5f,0x2a1b,0x0f,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4a}, /* 768x576x8 */
-	{0x60,0x2a1d,0x0f,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4a}, /* 768x576x16 */
-	{0x61,0x2a1f,0x0f,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4a}, /* 768x576x32 */
-	{0xff,0x0000,0x00,0x0000,0,               0x00,0x00,0x00,0x00,0x00}
-};
-
-typedef struct _SiS310_Ext2Struct
-{
-	USHORT Ext_InfoFlag;
-	UCHAR  Ext_CRT1CRTC;
-	UCHAR  Ext_CRTVCLK;
-	UCHAR  Ext_CRT2CRTC;
-	UCHAR  ModeID;
-	USHORT XRes;
-	USHORT YRes;
-	UCHAR  Ext_PDC;
-} SiS310_Ext2Struct;
-
-static const SiS310_Ext2Struct SiS310_RefIndex[]=
-{
-	{0x085f,0x0d,0x03,0x05,0x6a, 800, 600, 0x40}, /* 0x0 */
-	{0x0067,0x0e,0x04,0x05,0x6a, 800, 600, 0x40}, /* 0x1 */
-	{0x0067,0x0f,0x08,0x48,0x6a, 800, 600, 0x40}, /* 0x2 */
-	{0x0067,0x10,0x07,0x8b,0x6a, 800, 600, 0x40}, /* 0x3 */
-	{0x0047,0x11,0x0a,0x00,0x6a, 800, 600, 0x40}, /* 0x4 */
-	{0x0047,0x12,0x0d,0x00,0x6a, 800, 600, 0x40}, /* 0x5 */
-	{0x0047,0x13,0x13,0x00,0x6a, 800, 600, 0x20}, /* 0x6 */
-	{0x0107,0x14,0x1c,0x00,0x6a, 800, 600, 0x20}, /* 0x7 */
-	{0xc85f,0x05,0x00,0x04,0x2e, 640, 480, 0x40}, /* 0x8 */
-	{0xc067,0x06,0x02,0x04,0x2e, 640, 480, 0x40}, /* 0x9 */
-	{0xc067,0x07,0x02,0x47,0x2e, 640, 480, 0x40}, /* 0xa */
-	{0xc067,0x08,0x03,0x8a,0x2e, 640, 480, 0x40}, /* 0xb */
-	{0xc047,0x09,0x05,0x00,0x2e, 640, 480, 0x40}, /* 0xc */
-	{0xc047,0x0a,0x09,0x00,0x2e, 640, 480, 0x40}, /* 0xd */
-	{0xc047,0x0b,0x0e,0x00,0x2e, 640, 480, 0x40}, /* 0xe */
-	{0xc047,0x0c,0x15,0x00,0x2e, 640, 480, 0x40}, /* 0xf */
-	{0x487f,0x04,0x00,0x00,0x2f, 640, 400, 0x30}, /* 0x10 */
-	{0xc04f,0x3c,0x01,0x06,0x31, 720, 480, 0x30}, /* 0x11 */
-	{0x004f,0x3d,0x03,0x06,0x32, 720, 576, 0x30}, /* 0x12 */
-	{0x0087,0x15,0x06,0x00,0x37,1024, 768, 0x30}, /* 0x13 */
-	{0xc877,0x16,0x0b,0x06,0x37,1024, 768, 0x20}, /* 0x14 */
-	{0xc067,0x17,0x0f,0x49,0x37,1024, 768, 0x20}, /* 0x15 */
-	{0x0067,0x18,0x11,0x00,0x37,1024, 768, 0x20}, /* 0x16 */
-	{0x0047,0x19,0x16,0x8c,0x37,1024, 768, 0x20}, /* 0x17 */
-	{0x0107,0x1a,0x1b,0x00,0x37,1024, 768, 0x10}, /* 0x18 */
-	{0x0107,0x1b,0x1f,0x00,0x37,1024, 768, 0x10}, /* 0x19 */
-	{0x0087,0x1c,0x11,0x00,0x3a,1280,1024, 0x30}, /* 0x1a */
-	{0x0137,0x1d,0x19,0x07,0x3a,1280,1024, 0x00}, /* 0x1b */
-	{0x0107,0x1e,0x1e,0x00,0x3a,1280,1024, 0x00}, /* 0x1c */
-	{0x0207,0x1f,0x20,0x00,0x3a,1280,1024, 0x00}, /* 0x1d */
-	{0x0227,0x20,0x21,0x09,0x3c,1600,1200, 0x00}, /* 0x1e */
-	{0x0407,0x21,0x22,0x00,0x3c,1600,1200, 0x00}, /* 0x1f */
-	{0x0407,0x22,0x23,0x00,0x3c,1600,1200, 0x00}, /* 0x20 */
-	{0x0407,0x23,0x25,0x00,0x3c,1600,1200, 0x00}, /* 0x21 */
-	{0x0007,0x24,0x26,0x00,0x3c,1600,1200, 0x00}, /* 0x22 */
-	{0x0007,0x25,0x2c,0x00,0x3c,1600,1200, 0x00}, /* 0x23 */
-	{0x0007,0x26,0x34,0x00,0x3c,1600,1200, 0x00}, /* 0x24 */
-	{0x407f,0x00,0x00,0x00,0x40, 320, 200, 0x30}, /* 0x25 */
-	{0xc07f,0x01,0x00,0x04,0x50, 320, 240, 0x30}, /* 0x26 */
-	{0x007f,0x02,0x04,0x05,0x51, 400, 300, 0x30}, /* 0x27 */
-	{0xc077,0x03,0x0b,0x06,0x52, 512, 384, 0x30}, /* 0x28 */
-	{0x8007,0x27,0x27,0x00,0x68,1920,1440, 0x00}, /* 0x29 */
-	{0x4007,0x28,0x29,0x00,0x68,1920,1440, 0x00}, /* 0x2a */
-	{0x4007,0x29,0x2e,0x00,0x68,1920,1440, 0x00}, /* 0x2b */
-	{0x4007,0x2a,0x30,0x00,0x68,1920,1440, 0x00}, /* 0x2c */
-	{0x4007,0x2b,0x35,0x00,0x68,1920,1440, 0x00}, /* 0x2d */
-	{0x4005,0x2c,0x39,0x00,0x68,1920,1440, 0x00}, /* 0x2e */
-	{0x4007,0x2d,0x2b,0x00,0x6c,2048,1536, 0x00}, /* 0x2f */
-	{0x4007,0x2e,0x31,0x00,0x6c,2048,1536, 0x00}, /* 0x30 */
-	{0x4007,0x2f,0x33,0x00,0x6c,2048,1536, 0x00}, /* 0x31 */
-	{0x4007,0x30,0x37,0x00,0x6c,2048,1536, 0x00}, /* 0x32 */
-	{0x4005,0x31,0x38,0x00,0x6c,2048,1536, 0x00}, /* 0x33 */
-	{0x0057,0x32,0x40,0x08,0x70, 800, 480, 0x30}, /* 0x34 */
-	{0x0047,0x33,0x07,0x08,0x70, 800, 480, 0x30}, /* 0x35 */
-	{0x0047,0x34,0x0a,0x08,0x70, 800, 480, 0x30}, /* 0x36 */
-	{0x0057,0x35,0x0b,0x09,0x71,1024, 576, 0x30}, /* 0x37 */
-	{0x0047,0x36,0x11,0x09,0x71,1024, 576, 0x30}, /* 0x38 */
-	{0x0047,0x37,0x16,0x09,0x71,1024, 576, 0x30}, /* 0x39 */
-	{0x0117,0x38,0x19,0x0a,0x75,1280, 720, 0x30}, /* 0x3a */
-	{0x0107,0x39,0x1e,0x0a,0x75,1280, 720, 0x30}, /* 0x3b */
-	{0x0207,0x3a,0x20,0x0a,0x75,1280, 720, 0x30}, /* 0x3c */
-	{0x0127,0x3b,0x19,0x08,0x7c,1280, 960, 0x30}, /* 0x3d */
-	{0x0227,0x4c,0x59,0x08,0x7c,1280, 960, 0x20}, /* 0x3e */
-	{0xc07f,0x4e,0x00,0x06,0x5a, 320, 240, 0x30}, /* 0x3f */    /* FSTN 320x240 */
-        {0x0077,0x42,0x5b,0x08,0x23,1280, 768, 0x30}, /* 0x40 */    /* TW: 0x5b was 0x12 */
-	{0x0127,0x43,0x4d,0x08,0x26,1400,1050, 0x30}, /* 0x41 */
-	{0x0207,0x4b,0x5a,0x08,0x26,1400,1050, 0x30}, /* 0x42 Non-BIOS, new */
-	{0x0107,0x44,0x19,0x00,0x29,1152, 864, 0x30}, /* 0x43 Non-BIOS, new */
-	{0x0107,0x4a,0x1e,0x00,0x29,1152, 864, 0x30}, /* 0x44 Non-BIOS, new */
-	{0x0087,0x45,0x57,0x00,0x39, 848, 480, 0x30}, /* 0x45 848x480-38Hzi - Non-BIOS, new */
-	{0xc067,0x46,0x55,0x0b,0x39, 848, 480, 0x30}, /* 0x46 848x480-60Hz  - Non-BIOS, new */
-	{0x0087,0x47,0x57,0x00,0x3f, 856, 480, 0x30}, /* 0x47 856x480-38Hzi - Non-BIOS, new */
-	{0xc047,0x48,0x57,0x00,0x3f, 856, 480, 0x30}, /* 0x48 856x480-60Hz  - Non-BIOS, new */
-	{0x0067,0x49,0x58,0x0c,0x48,1360, 768, 0x30}, /* 0x49 1360x768-60Hz - Non-BIOS, new */
-	{0x004f,0x4d,0x03,0x06,0x5f, 768, 576, 0x30}, /* 0x4a 768x576 */
-	{0xffff,0x00,0x00,0x00,0x00,   0,   0, 0}
+	{0x6a,0x2212,0x0102,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00, 3}, /* 800x600x? */
+	{0x2e,0x0a1b,0x0101,SIS_RI_640x480,  0x00,0x00,0x05,0x05,0x08, 2}, /* 640x480x8 */
+        {0x2f,0x0a1b,0x0100,SIS_RI_640x400,  0x00,0x00,0x05,0x05,0x10, 0}, /* 640x400x8 */
+	{0x30,0x2a1b,0x0103,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00, 3}, /* 800x600x8 */
+        {0x31,0x4a1b,0x0000,SIS_RI_720x480,  0x00,0x00,0x06,0x06,0x11,-1}, /* 720x480x8 */
+	{0x32,0x4a1b,0x0000,SIS_RI_720x576,  0x00,0x00,0x06,0x06,0x12,-1}, /* 720x576x8 */
+	{0x33,0x4a1d,0x0000,SIS_RI_720x480,  0x00,0x00,0x06,0x06,0x11,-1}, /* 720x480x16 */
+	{0x34,0x6a1d,0x0000,SIS_RI_720x576,  0x00,0x00,0x06,0x06,0x12,-1}, /* 720x576x16 */
+	{0x35,0x4a1f,0x0000,SIS_RI_720x480,  0x00,0x00,0x06,0x06,0x11,-1}, /* 720x480x32 */
+	{0x36,0x6a1f,0x0000,SIS_RI_720x576,  0x00,0x00,0x06,0x06,0x12,-1}, /* 720x576x32 */
+	{0x37,0x0212,0x0104,SIS_RI_1024x768, 0x00,0x00,0x08,0x07,0x13, 4}, /* 1024x768x? */
+	{0x38,0x0a1b,0x0105,SIS_RI_1024x768, 0x00,0x00,0x08,0x07,0x13, 4}, /* 1024x768x8 */
+	{0x3a,0x0e3b,0x0107,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a, 8}, /* 1280x1024x8 */
+	{0x3c,0x0e3b,0x0130,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e,10}, /* 1600x1200x8 */
+	{0x3d,0x0e7d,0x0131,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e,10}, /* 1600x1200x16 */
+	{0x40,0x9a1c,0x010d,SIS_RI_320x200,  0x00,0x00,0x04,0x04,0x25, 0}, /* 320x200x15 */
+	{0x41,0x9a1d,0x010e,SIS_RI_320x200,  0x00,0x00,0x04,0x04,0x25, 0}, /* 320x200x16 */
+	{0x43,0x0a1c,0x0110,SIS_RI_640x480,  0x00,0x00,0x05,0x05,0x08, 2},
+	{0x44,0x0a1d,0x0111,SIS_RI_640x480,  0x00,0x00,0x05,0x05,0x08, 2}, /* 640x480x16 */
+	{0x46,0x2a1c,0x0113,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00, 3},
+	{0x47,0x2a1d,0x0114,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00, 3}, /* 800x600x16 */
+	{0x49,0x0a3c,0x0116,SIS_RI_1024x768, 0x00,0x00,0x00,0x07,0x13, 4},
+	{0x4a,0x0a3d,0x0117,SIS_RI_1024x768, 0x00,0x00,0x08,0x07,0x13, 4}, /* 1024x768x16 */
+	{0x4c,0x0e7c,0x0119,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a, 8},
+	{0x4d,0x0e7d,0x011a,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a, 8}, /* 1280x1024x16 */
+	{0x50,0x9a1b,0x0132,SIS_RI_320x240,  0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x8  */
+	{0x51,0xba1b,0x0133,SIS_RI_400x300,  0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x8  */
+  	{0x52,0xba1b,0x0134,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x28, 4}, /* 512x384x8  */
+	{0x56,0x9a1d,0x0135,SIS_RI_320x240,  0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x16 */
+	{0x57,0xba1d,0x0136,SIS_RI_400x300,  0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x16 */
+ 	{0x58,0xba1d,0x0137,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x28, 4}, /* 512x384x16 */
+	{0x59,0x9a1b,0x0138,SIS_RI_320x200,  0x00,0x00,0x04,0x04,0x25, 0}, /* 320x200x8  */
+	{0x5a,0x021b,0x0138,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x3f, 2}, /* 320x240x8  fstn */
+	{0x5b,0x0a1d,0x0135,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x3f, 2}, /* 320x240x16 fstn */
+	{0x5c,0xba1f,0x0000,SIS_RI_512x384,  0x00,0x00,0x00,0x00,0x28, 4}, /* 512x384x32 */
+	{0x5d,0x0a1d,0x0139,SIS_RI_640x400,  0x00,0x00,0x05,0x07,0x10, 0},
+	{0x5e,0x0a1f,0x0000,SIS_RI_640x400,  0x00,0x00,0x05,0x07,0x10, 0}, /* 640x400x32 */
+	{0x62,0x0a3f,0x013a,SIS_RI_640x480,  0x00,0x00,0x05,0x05,0x08, 2}, /* 640x480x32 */
+	{0x63,0x2a3f,0x013b,SIS_RI_800x600,  0x00,0x00,0x07,0x06,0x00, 3}, /* 800x600x32 */
+	{0x64,0x0a7f,0x013c,SIS_RI_1024x768, 0x00,0x00,0x08,0x07,0x13, 4}, /* 1024x768x32 */
+	{0x65,0x0eff,0x013d,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a, 8}, /* 1280x1024x32 */
+	{0x66,0x0eff,0x013e,SIS_RI_1600x1200,0x00,0x00,0x00,0x00,0x1e,10}, /* 1600x1200x32 */
+	{0x68,0x067b,0x013f,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x29,-1}, /* 1920x1440x8 */
+	{0x69,0x06fd,0x0140,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x29,-1}, /* 1920x1440x16 */
+	{0x6b,0x07ff,0x0141,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x29,-1}, /* 1920x1440x32 */
+	{0x6c,0x067b,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x2f,-1}, /* 2048x1536x8 */
+	{0x6d,0x06fd,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x2f,-1}, /* 2048x1536x16 */
+	{0x6e,0x07ff,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x2f,-1}, /* 2048x1536x32 */
+	{0x70,0x6a1b,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x07,0x34,-1}, /* 800x480x8 */
+	{0x71,0x4a1b,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x37,-1}, /* 1024x576x8 */
+	{0x74,0x4a1d,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x37,-1}, /* 1024x576x16 */
+	{0x75,0x0a3d,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x3a, 5}, /* 1280x720x16 */
+	{0x76,0x6a1f,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x07,0x34,-1}, /* 800x480x32 */
+	{0x77,0x4a1f,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x37,-1}, /* 1024x576x32 */
+	{0x78,0x0a3f,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x3a, 5}, /* 1280x720x32 */
+	{0x79,0x0a3b,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x3a, 5}, /* 1280x720x8 */
+	{0x7a,0x6a1d,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x07,0x34,-1}, /* 800x480x16 */
+	{0x7c,0x0e3b,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x3d,-1}, /* 1280x960x8 */
+	{0x7d,0x0e7d,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x3d,-1}, /* 1280x960x16 */
+	{0x7e,0x0eff,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x3d,-1}, /* 1280x960x32 */
+	{0x23,0x0e3b,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40, 6}, /* 1280x768x8 */
+	{0x24,0x0e7d,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40, 6}, /* 1280x768x16 */
+	{0x25,0x0eff,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40, 6}, /* 1280x768x32 */
+	{0x26,0x0e3b,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x41, 9}, /* 1400x1050x8 */
+	{0x27,0x0e7d,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x41, 9}, /* 1400x1050x16 */
+	{0x28,0x0eff,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x41, 9}, /* 1400x1050x32*/
+	{0x29,0x4e1b,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43,-1}, /* 1152x864 */
+	{0x2a,0x4e3d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43,-1},
+	{0x2b,0x4e7f,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43,-1},
+	{0x39,0x6a1b,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x45,-1}, /* 848x480 */
+	{0x3b,0x6a3d,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x45,-1},
+	{0x3e,0x6a7f,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x45,-1},
+	{0x3f,0x6a1b,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x47,-1}, /* 856x480 */
+	{0x42,0x6a3d,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x47,-1},
+	{0x45,0x6a7f,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x47,-1},
+	{0x48,0x6a3b,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x49,-1}, /* 1360x768 */
+	{0x4b,0x6a7d,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x49,-1},
+	{0x4e,0x6aff,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x49,-1},
+	{0x4f,0x9a1f,0x0000,SIS_RI_320x200,  0x00,0x00,0x04,0x04,0x25, 0}, /* 320x200x32 */
+	{0x53,0x9a1f,0x0000,SIS_RI_320x240,  0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x32 */
+	{0x54,0xba1f,0x0000,SIS_RI_400x300,  0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x32 */
+	{0x5f,0x6a1b,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4a,-1}, /* 768x576 */
+	{0x60,0x6a1d,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4a,-1},
+	{0x61,0x6a3f,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4a,-1},
+	{0x14,0x0e3b,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4b, 7}, /* 1280x800 */
+	{0x15,0x0e7d,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4b, 7},
+	{0x16,0x0eff,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4b, 7},
+	{0x17,0x0e3b,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4c, 9}, /* 1680x1050 */
+	{0x18,0x0e7d,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4c, 9},
+	{0x19,0x0eff,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4c, 9},
+	{0x2c,0x267b,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4d,-1}, /* 1920x1080(i) */
+	{0x2d,0x26fd,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4d,-1},
+	{0x73,0x27ff,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4d,-1},
+	{0x1d,0x6a1b,0x0000,SIS_RI_960x540,  0x00,0x00,0x00,0x00,0x4e,-1}, /* 960x540 */
+	{0x1e,0x6a3d,0x0000,SIS_RI_960x540,  0x00,0x00,0x00,0x00,0x4e,-1},
+	{0x1f,0x6a7f,0x0000,SIS_RI_960x540,  0x00,0x00,0x00,0x00,0x4e,-1},
+	{0xff,0x0000,0x0000,0,               0x00,0x00,0x00,0x00,0x00,-1}
+};
+
+static const SiS_Ext2Struct SiS310_RefIndex[]=
+{
+	{0x085f,0x0d,0x03,0x05,0x05,0x6a, 800, 600, 0x40}, /* 0x0 */
+	{0x0067,0x0e,0x04,0x05,0x05,0x6a, 800, 600, 0x40}, /* 0x1 */
+	{0x0067,0x0f,0x08,0x48,0x05,0x6a, 800, 600, 0x40}, /* 0x2 */
+	{0x0067,0x10,0x07,0x8b,0x05,0x6a, 800, 600, 0x40}, /* 0x3 */
+	{0x0047,0x11,0x0a,0x00,0x05,0x6a, 800, 600, 0x40}, /* 0x4 */
+	{0x0047,0x12,0x0d,0x00,0x05,0x6a, 800, 600, 0x40}, /* 0x5 */
+	{0x0047,0x13,0x13,0x00,0x05,0x6a, 800, 600, 0x20}, /* 0x6 */
+	{0x0107,0x14,0x1c,0x00,0x05,0x6a, 800, 600, 0x20}, /* 0x7 */
+	{0xc85f,0x05,0x00,0x04,0x04,0x2e, 640, 480, 0x40}, /* 0x8 */
+	{0xc067,0x06,0x02,0x04,0x04,0x2e, 640, 480, 0x40}, /* 0x9 */
+	{0xc067,0x07,0x02,0x47,0x04,0x2e, 640, 480, 0x40}, /* 0xa */
+	{0xc067,0x08,0x03,0x8a,0x04,0x2e, 640, 480, 0x40}, /* 0xb */
+	{0xc047,0x09,0x05,0x00,0x04,0x2e, 640, 480, 0x40}, /* 0xc */
+	{0xc047,0x0a,0x09,0x00,0x04,0x2e, 640, 480, 0x40}, /* 0xd */
+	{0xc047,0x0b,0x0e,0x00,0x04,0x2e, 640, 480, 0x40}, /* 0xe */
+	{0xc047,0x0c,0x15,0x00,0x04,0x2e, 640, 480, 0x40}, /* 0xf */
+	{0x487f,0x04,0x00,0x00,0x00,0x2f, 640, 400, 0x30}, /* 0x10 */
+	{0xc06f,0x3c,0x01,0x06,0x13,0x31, 720, 480, 0x30}, /* 0x11 */
+	{0x006f,0x3d,0x03,0x06,0x14,0x32, 720, 576, 0x30}, /* 0x12 */
+	{0x0087,0x15,0x06,0x00,0x06,0x37,1024, 768, 0x30}, /* 0x13 */
+	{0xc877,0x16,0x0b,0x06,0x06,0x37,1024, 768, 0x20}, /* 0x14 */
+	{0xc067,0x17,0x0f,0x49,0x06,0x37,1024, 768, 0x20}, /* 0x15 */
+	{0x0067,0x18,0x11,0x00,0x06,0x37,1024, 768, 0x20}, /* 0x16 */
+	{0x0047,0x19,0x16,0x8c,0x06,0x37,1024, 768, 0x20}, /* 0x17 */
+	{0x0107,0x1a,0x1b,0x00,0x06,0x37,1024, 768, 0x10}, /* 0x18 */
+	{0x0107,0x1b,0x1f,0x00,0x06,0x37,1024, 768, 0x10}, /* 0x19 */
+	{0x0087,0x1c,0x11,0x00,0x07,0x3a,1280,1024, 0x30}, /* 0x1a */
+	{0x0137,0x1d,0x19,0x07,0x07,0x3a,1280,1024, 0x00}, /* 0x1b */
+	{0x0107,0x1e,0x1e,0x00,0x07,0x3a,1280,1024, 0x00}, /* 0x1c */
+	{0x0207,0x1f,0x20,0x00,0x07,0x3a,1280,1024, 0x00}, /* 0x1d */
+	{0x0227,0x20,0x21,0x09,0x09,0x3c,1600,1200, 0x00}, /* 0x1e */
+	{0x0407,0x21,0x22,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x1f */
+	{0x0407,0x22,0x23,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x20 */
+	{0x0407,0x23,0x25,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x21 */
+	{0x0007,0x24,0x26,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x22 */
+	{0x0007,0x25,0x2c,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x23 */
+	{0x0007,0x26,0x34,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x24 */
+	{0x407f,0x00,0x00,0x00,0x00,0x40, 320, 200, 0x30}, /* 0x25 */
+	{0xc07f,0x01,0x00,0x04,0x04,0x50, 320, 240, 0x30}, /* 0x26 */
+	{0x007f,0x02,0x04,0x05,0x05,0x51, 400, 300, 0x30}, /* 0x27 */
+	{0xc077,0x03,0x0b,0x06,0x06,0x52, 512, 384, 0x30}, /* 0x28 */
+	{0x8007,0x27,0x27,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x29 */
+	{0x4007,0x28,0x29,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2a */
+	{0x4007,0x29,0x2e,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2b */
+	{0x4007,0x2a,0x30,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2c */
+	{0x4007,0x2b,0x35,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2d */
+	{0x4005,0x2c,0x39,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2e */
+	{0x4007,0x2d,0x2b,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x2f */
+	{0x4007,0x2e,0x31,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x30 */
+	{0x4007,0x2f,0x33,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x31 */
+	{0x4007,0x30,0x37,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x32 */
+	{0x4005,0x31,0x38,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x33 */
+	{0x0077,0x32,0x40,0x08,0x18,0x70, 800, 480, 0x30}, /* 0x34 */
+	{0x0047,0x33,0x07,0x08,0x18,0x70, 800, 480, 0x30}, /* 0x35 */
+	{0x0047,0x34,0x0a,0x08,0x18,0x70, 800, 480, 0x30}, /* 0x36 */
+	{0x0077,0x35,0x0b,0x09,0x19,0x71,1024, 576, 0x30}, /* 0x37 */
+	{0x0047,0x36,0x11,0x09,0x19,0x71,1024, 576, 0x30}, /* 0x38 */
+	{0x0047,0x37,0x16,0x09,0x19,0x71,1024, 576, 0x30}, /* 0x39 */
+	{0x1137,0x38,0x19,0x0a,0x0c,0x75,1280, 720, 0x30}, /* 0x3a */
+	{0x1107,0x39,0x1e,0x0a,0x0c,0x75,1280, 720, 0x30}, /* 0x3b */
+	{0x1307,0x3a,0x20,0x0a,0x0c,0x75,1280, 720, 0x30}, /* 0x3c */
+	{0x0127,0x3b,0x19,0x08,0x0a,0x7c,1280, 960, 0x30}, /* 0x3d */
+	{0x0227,0x4c,0x59,0x08,0x0a,0x7c,1280, 960, 0x20}, /* 0x3e */
+	{0xc07f,0x4e,0x00,0x06,0x04,0x5a, 320, 240, 0x30}, /* 0x3f */    /* FSTN 320x240 */
+        {0x0077,0x42,0x5b,0x08,0x11,0x23,1280, 768, 0x30}, /* 0x40 */    /* 0x5b was 0x12 */
+	{0x0127,0x43,0x4d,0x08,0x0b,0x26,1400,1050, 0x30}, /* 0x41 */
+	{0x0207,0x4b,0x5a,0x08,0x0b,0x26,1400,1050, 0x30}, /* 0x42 1400x1050-75Hz */
+	{0x0127,0x44,0x19,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x43 1152x864-75Hz  */
+	{0x0127,0x4a,0x1e,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x44 1152x864-85Hz  */
+	{0x0087,0x45,0x57,0x00,0x16,0x39, 848, 480, 0x30}, /* 0x45 848x480-38Hzi  */
+	{0xc067,0x46,0x55,0x0b,0x16,0x39, 848, 480, 0x30}, /* 0x46 848x480-60Hz   */
+	{0x0087,0x47,0x57,0x00,0x17,0x3f, 856, 480, 0x30}, /* 0x47 856x480-38Hzi  */
+	{0xc067,0x48,0x57,0x00,0x17,0x3f, 856, 480, 0x30}, /* 0x48 856x480-60Hz   */
+	{0x0067,0x49,0x58,0x0c,0x1b,0x48,1360, 768, 0x30}, /* 0x49 1360x768-60Hz  */
+	{0x006f,0x4d,0x03,0x06,0x15,0x5f, 768, 576, 0x30}, /* 0x4a 768x576-56Hz   */
+	{0x0067,0x4f,0x5c,0x08,0x0d,0x14,1280, 800, 0x30}, /* 0x4b 1280x800-60Hz  */
+	{0x0067,0x50,0x5d,0x0c,0x0e,0x17,1680,1050, 0x30}, /* 0x4c 1680x1050-60Hz */
+	{0x0087,0x51,0x69,0x00,0x00,0x2c,1920,1080, 0x30}, /* 0x4d 1920x1080 60Hzi */
+	{0x0067,0x52,0x6a,0x00,0x1c,0x1d, 960, 540, 0x30}, /* 0x4e 960x540 60Hz */
+	{0xffff,0x00,0x00,0x00,0x00,0x00,   0,   0,    0}
 };
 
-typedef struct _SiS310_CRT1TableStruct
-{
- 	UCHAR CR[17];
-} SiS310_CRT1TableStruct;
-
-static const SiS310_CRT1TableStruct SiS310_CRT1Table[]=
+static const SiS_CRT1TableStruct SiS310_CRT1Table[]=
 {
  {{0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
    0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x00,
@@ -310,7 +280,7 @@
  {{0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e,
    0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05,
    0x00}}, /* 0x5 */
-#endif   
+#endif
  {{0x5f,0x4f,0x4f,0x83,0x55,0x81,0x0b,0x3e,    /* 0x05 - corrected 640x480-60 */
    0xe9,0x8b,0xdf,0xe8,0x0c,0x00,0x00,0x05,
    0x00}},
@@ -329,16 +299,16 @@
    0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x05,
    0x00}}, /* 0x8 */
  {{0x65,0x4f,0x4f,0x89,0x58,0x80,0xfb,0x1f,
-   0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x05,  /* TW: Corrected VBE */
+   0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x05,  /* Corrected VBE */
    0x61}}, /* 0x9 */
  {{0x65,0x4f,0x4f,0x89,0x58,0x80,0x01,0x3e,
    0xe0,0x83,0xdf,0xdf,0x02,0x00,0x00,0x05,
    0x61}}, /* 0xa */
  {{0x67,0x4f,0x4f,0x8b,0x58,0x81,0x0d,0x3e,
-   0xe0,0x83,0xdf,0xdf,0x0e,0x00,0x00,0x05,  /* TW: Corrected VBE */
+   0xe0,0x83,0xdf,0xdf,0x0e,0x00,0x00,0x05,  /* Corrected VBE */
    0x61}}, /* 0xb */
  {{0x65,0x4f,0x4f,0x89,0x57,0x9f,0xfb,0x1f,
-   0xe6,0x8a,0xdf,0xdf,0xfc,0x10,0x00,0x01,  /* TW: Corrected VDE, VBE */
+   0xe6,0x8a,0xdf,0xdf,0xfc,0x10,0x00,0x01,  /* Corrected VDE, VBE */
    0x00}}, /* 0xc */
  {{0x7b,0x63,0x63,0x9f,0x6a,0x93,0x6f,0xf0,
    0x58,0x8a,0x57,0x57,0x70,0x20,0x00,0x05,
@@ -466,7 +436,7 @@
  {{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf1,
    0xad,0x81,0x3f,0x3f,0x1f,0x30,0x00,0x02,
    0x01}}, /* 0x36 */
- {{0xa7,0x7f,0x7f,0x88,0x89,0x95,0x26,0xf1,   /* TW: 95 was 15 - illegal HBE! */
+ {{0xa7,0x7f,0x7f,0x88,0x89,0x95,0x26,0xf1,   /* 95 was 15 - illegal HBE! */
    0xb1,0x85,0x3f,0x3f,0x27,0x30,0x00,0x02,
    0x01}}, /* 0x37 */
  {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0xc4,
@@ -498,7 +468,7 @@
  {{0x81,0x6a,0x6a,0x85,0x70,0x00,0x0f,0x3e,
    0xeb,0x8e,0xdf,0xdf,0x10,0x00,0x00,0x02,
    0x00}}, /* 0x3f */
- {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x1e,0xf1,   /* TW: The following from 650/LVDS BIOS */
+ {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x1e,0xf1,
    0xae,0x85,0x57,0x57,0x1f,0x30,0x00,0x02,
    0x01}},  /* 0x40 */
  {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf5,
@@ -510,31 +480,31 @@
  {{0xe6,0xae,0xae,0x8a,0xbd,0x90,0x3d,0x10,
    0x1a,0x8d,0x19,0x19,0x3e,0x2f,0x00,0x03,
    0x00}},  /* 0x43 */
- {{0xc3,0x8f,0x8f,0x87,0x9b,0x0b,0x82,0xef, /* New, 1152x864-75, not in BIOS */
+ {{0xc3,0x8f,0x8f,0x87,0x9b,0x0b,0x82,0xef, /* 1152x864-75 */
    0x60,0x83,0x5f,0x5f,0x83,0x10,0x00,0x07,
    0x01}},  /* 0x44 */
- {{0x86,0x69,0x69,0x8A,0x74,0x06,0x8C,0x15, /* New, 848x480-38i, not in BIOS */
+ {{0x86,0x69,0x69,0x8A,0x74,0x06,0x8C,0x15, /* 848x480-38i */
    0x4F,0x83,0xEF,0xEF,0x8D,0x30,0x00,0x02,
    0x00}},  /* 0x45 */
- {{0x83,0x69,0x69,0x87,0x6f,0x1d,0x03,0x3E, /* New, 848x480-60, not in BIOS */
+ {{0x83,0x69,0x69,0x87,0x6f,0x1d,0x03,0x3E, /* 848x480-60 */
    0xE5,0x8d,0xDF,0xe4,0x04,0x00,0x00,0x06,
    0x00}},  /* 0x46 */
- {{0x86,0x6A,0x6A,0x8A,0x74,0x06,0x8C,0x15, /* New, 856x480-38i, not in BIOS */
+ {{0x86,0x6A,0x6A,0x8A,0x74,0x06,0x8C,0x15, /* 856x480-38i */
    0x4F,0x83,0xEF,0xEF,0x8D,0x30,0x00,0x02,
    0x00}},  /* 0x47 */
- {{0x81,0x6A,0x6A,0x85,0x70,0x00,0x0F,0x3E, /* New, 856x480-60, not in BIOS */
+ {{0x81,0x6A,0x6A,0x85,0x70,0x00,0x0F,0x3E, /* 856x480-60 */
    0xEB,0x8E,0xDF,0xDF,0x10,0x00,0x00,0x02,
    0x00}},  /* 0x48 */
- {{0xdd,0xa9,0xa9,0x81,0xb4,0x97,0x26,0xfd, /* New, 1360x768-60, not in BIOS */
+ {{0xdd,0xa9,0xa9,0x81,0xb4,0x97,0x26,0xfd, /* 1360x768-60 */
    0x01,0x8d,0xff,0x00,0x27,0x10,0x00,0x03,
    0x01}},  /* 0x49 */
- {{0xd9,0x8f,0x8f,0x9d,0xba,0x0a,0x8a,0xff, /* New, 1152x864-84, not in any BIOS   */
+ {{0xd9,0x8f,0x8f,0x9d,0xba,0x0a,0x8a,0xff, /* 1152x864-84  */
    0x60,0x8b,0x5f,0x5f,0x8b,0x10,0x00,0x03,
    0x01}},  /* 0x4a */
- {{0xea,0xae,0xae,0x8e,0xba,0x82,0x40,0x10, /* New, 1400x1050-75, not in any BIOS  */
+ {{0xea,0xae,0xae,0x8e,0xba,0x82,0x40,0x10, /* 1400x1050-75  */
    0x1b,0x87,0x19,0x1a,0x41,0x0f,0x00,0x03,
    0x00}},  /* 0x4b */
- {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0xf1,0xff, /* New, 1280x960-85, not in any BIOS */
+ {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0xf1,0xff, /* 1280x960-85 */
    0xc0,0x83,0xbf,0xbf,0xf2,0x10,0x00,0x07,
    0x01}},  /* 0x4c */
  {{0x7b,0x5f,0x63,0x9f,0x6a,0x93,0x6f,0xf0, /* 768x576 */
@@ -542,16 +512,22 @@
    0x01}},  /* 0x4d */
  {{0x2d,0x27,0x28,0x90,0x2c,0x80,0x0b,0x3e, /* FSTN 320x480, TEMP - possibly invalid */
    0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x00,
-   0x00}}   /* 0x4e */
+   0x00}},  /* 0x4e */
+ {{0xcd,0x9f,0x9f,0x91,0xab,0x1c,0x3a,0xff, /* 1280x800-60 */
+   0x20,0x83,0x1f,0x1f,0x3b,0x10,0x00,0x07,
+   0x21}},  /* 0x4f */
+ {{0x15,0xd1,0xd1,0x99,0xe2,0x19,0x3d,0x10, /* 1680x1050-60 */
+   0x1a,0x8d,0x19,0x19,0x3e,0x2f,0x01,0x0c,
+   0x20}},  /* 0x50 */
+ {{0x0e,0xef,0xef,0x92,0xfe,0x03,0x30,0xf0, /* 1920x1080-60i */
+   0x1e,0x83,0x1b,0x1c,0x31,0x00,0x01,0x00,
+   0x61}},  /* 0x51 */
+ {{0x85,0x77,0x77,0x89,0x7d,0x01,0x31,0xf0, /* 960x540-60 */
+   0x1e,0x84,0x1b,0x1c,0x32,0x00,0x00,0x02,
+   0x41}}   /* 0x52 */
 };
 
-typedef struct _SiS310_MCLKDataStruct
-{
-	UCHAR SR28,SR29,SR2A;
-	USHORT CLOCK;
-} SiS310_MCLKDataStruct;
-
-static const SiS310_MCLKDataStruct SiS310_MCLKData_0_315[] =
+static const SiS_MCLKDataStruct SiS310_MCLKData_0_315[] =
 {
 	{ 0x3b,0x22,0x01,143},
 	{ 0x5c,0x23,0x01,166},
@@ -563,7 +539,7 @@
 	{ 0x5c,0x23,0x01,166}
 };
 
-static const SiS310_MCLKDataStruct SiS310_MCLKData_0_650[] =
+static const SiS_MCLKDataStruct SiS310_MCLKData_0_650[] =
 {
 	{ 0x5a,0x64,0x82, 66},
 	{ 0xb3,0x45,0x82, 83},
@@ -575,7 +551,7 @@
 	{ 0x37,0x22,0x82,133}
 };
 
-static const SiS310_MCLKDataStruct SiS310_MCLKData_0_330[] =
+static const SiS_MCLKDataStruct SiS310_MCLKData_0_330[] =
 {
 	{ 0x5c,0x23,0x01,166},
 	{ 0x5c,0x23,0x01,166},
@@ -587,7 +563,7 @@
 	{ 0x79,0x06,0x01,250}
 };
 
-static const SiS310_MCLKDataStruct SiS310_MCLKData_0_660[] =  /* TODO */
+static const SiS_MCLKDataStruct SiS310_MCLKData_0_660[] =
 {
 	{ 0x5c,0x23,0x82,166},
 	{ 0x5c,0x23,0x82,166},
@@ -599,7 +575,19 @@
 	{ 0x37,0x21,0x82,200}
 };
 
-static const SiS310_MCLKDataStruct SiS310_MCLKData_1[] =
+static const SiS_MCLKDataStruct SiS310_MCLKData_0_760[] =
+{
+	{ 0x37,0x22,0x82,133},
+	{ 0x5c,0x23,0x82,166},
+	{ 0x65,0x23,0x82,183},
+	{ 0x7c,0x08,0x82,200},
+	{ 0x29,0x21,0x82,150},
+	{ 0x5c,0x23,0x82,166},
+	{ 0x65,0x23,0x82,183},
+	{ 0x37,0x21,0x82,200}
+};
+
+static const SiS_MCLKDataStruct SiS310_MCLKData_1[] = /* ECLK */
 {
         { 0x29,0x21,0x82,150},
 	{ 0x5c,0x23,0x82,166},
@@ -611,13 +599,7 @@
 	{ 0x37,0x22,0x82,133}
 };
 
-typedef struct _SiS310_VCLKDataStruct
-{
-	UCHAR SR2B,SR2C;
-	USHORT CLOCK;
-} SiS310_VCLKDataStruct;
-
-static const SiS310_VCLKDataStruct SiS310_VCLKData[]=
+static SiS_VCLKDataStruct SiS310_VCLKData[]=
 {
 	{ 0x1b,0xe1, 25}, /* 0x00 */
 	{ 0x4e,0xe4, 28}, /* 0x01 */
@@ -630,7 +612,7 @@
 	{ 0x53,0xe2, 50}, /* 0x08 */
 	{ 0x74,0x67, 52}, /* 0x09 */
 	{ 0x6d,0x66, 56}, /* 0x0a */
-	{ 0x5a,0x64, 65}, /* 0x0b */  /* TW: was 6c c3 - WRONG */
+	{ 0x5a,0x64, 65}, /* 0x0b */  /* was 6c c3 - WRONG */
 	{ 0x46,0x44, 67}, /* 0x0c */
 	{ 0xb1,0x46, 68}, /* 0x0d */
 	{ 0xd3,0x4a, 72}, /* 0x0e */
@@ -677,49 +659,58 @@
 	{ 0xea,0x08,340}, /* 0x37 */
 	{ 0xe8,0x07,376}, /* 0x38 */
 	{ 0xde,0x06,389}, /* 0x39 */
-	{ 0x52,0x2a, 54}, /* 0x3a */  /* 301 TV */
-	{ 0x52,0x6a, 27}, /* 0x3b */  /* 301 TV */
-	{ 0x62,0x24, 70}, /* 0x3c */  /* 301 TV */
-	{ 0x62,0x64, 70}, /* 0x3d */  /* 301 TV */
-	{ 0xa8,0x4c, 30}, /* 0x3e */  /* 301 TV */
-	{ 0x20,0x26, 33}, /* 0x3f */  /* 301 TV */
+	{ 0x52,0x2a, 54}, /* 0x3a 301 TV */
+	{ 0x52,0x6a, 27}, /* 0x3b 301 TV */
+	{ 0x62,0x24, 70}, /* 0x3c 301 TV */
+	{ 0x62,0x64, 70}, /* 0x3d 301 TV */
+	{ 0xa8,0x4c, 30}, /* 0x3e 301 TV */
+	{ 0x20,0x26, 33}, /* 0x3f 301 TV */
 	{ 0x31,0xc2, 39}, /* 0x40 */
-	{ 0x60,0x36, 30}, /* 0x41 */  /* Chrontel */
-	{ 0x40,0x4a, 28}, /* 0x42 */  /* Chrontel */
-	{ 0x9f,0x46, 44}, /* 0x43 */  /* Chrontel */
+	{ 0x60,0x36, 30}, /* 0x41 Chrontel */
+	{ 0x40,0x4a, 28}, /* 0x42 Chrontel */
+	{ 0x9f,0x46, 44}, /* 0x43 Chrontel */
 	{ 0x97,0x2c, 26}, /* 0x44 */
-	{ 0x44,0xe4, 25}, /* 0x45 */  /* Chrontel */
-	{ 0x7e,0x32, 47}, /* 0x46 */  /* Chrontel */
-	{ 0x8a,0x24, 31}, /* 0x47 */  /* Chrontel */
-	{ 0x97,0x2c, 26}, /* 0x48 */  /* Chrontel */
+	{ 0x44,0xe4, 25}, /* 0x45 Chrontel */
+	{ 0x7e,0x32, 47}, /* 0x46 Chrontel */
+	{ 0x8a,0x24, 31}, /* 0x47 Chrontel */
+	{ 0x97,0x2c, 26}, /* 0x48 Chrontel */
 	{ 0xce,0x3c, 39}, /* 0x49 */
-	{ 0x52,0x4a, 36}, /* 0x4a */  /* Chrontel */
+	{ 0x52,0x4a, 36}, /* 0x4a Chrontel */
 	{ 0x34,0x61, 95}, /* 0x4b */
 	{ 0x78,0x27,108}, /* 0x4c - was 102 */
-	{ 0x66,0x43,123}, /* 0x4d */  /* Modes 0x26-0x28 (1400x1050) */
+	{ 0x66,0x43,123}, /* 0x4d Modes 0x26-0x28 (1400x1050) */
 	{ 0x41,0x4e, 21}, /* 0x4e */
-	{ 0xa1,0x4a, 29}, /* 0x4f */  /* Chrontel */
+	{ 0xa1,0x4a, 29}, /* 0x4f Chrontel */
 	{ 0x19,0x42, 42}, /* 0x50 */
-	{ 0x54,0x46, 58}, /* 0x51 */  /* Chrontel */
+	{ 0x54,0x46, 58}, /* 0x51 Chrontel */
 	{ 0x25,0x42, 61}, /* 0x52 */
-	{ 0x44,0x44, 66}, /* 0x53 */  /* Chrontel */
-	{ 0x3a,0x62, 70}, /* 0x54 */  /* Chrontel */
-	{ 0x62,0xc6, 34}, /* 0x55 - added for 848x480-60 (not in any BIOS) */
-	{ 0x6a,0xc6, 37}, /* 0x56 - added for 848x480-75 (not in any BIOS)    - TEMP */
-	{ 0xbf,0xc8, 35}, /* 0x57 - added for 856x480-38i,60 (not in any BIOS) */
-	{ 0x30,0x23, 88}, /* 0x58 - added for 1360x768-62 (is 60Hz!) (not in any BIOS) */
-	{ 0x52,0x07,149}, /* 0x59 - added for 1280x960-85 (Not in any BIOS) */
-	{ 0x56,0x07,156}, /* 0x5a - added for 1400x1050-75 */
-   	{ 0x70,0x29, 81}  /* 0x5b - added for 1280x768 LCD */
-};
-
-typedef struct _SiS310_VBVCLKDataStruct
-{
-	UCHAR Part4_A,Part4_B;
-	USHORT CLOCK;
-} SiS310_VBVCLKDataStruct;
+	{ 0x44,0x44, 66}, /* 0x53 Chrontel */
+	{ 0x3a,0x62, 70}, /* 0x54 Chrontel */
+	{ 0x62,0xc6, 34}, /* 0x55 848x480-60 */
+	{ 0x6a,0xc6, 37}, /* 0x56 848x480-75 - TEMP */
+	{ 0xbf,0xc8, 35}, /* 0x57 856x480-38i,60 */
+	{ 0x30,0x23, 88}, /* 0x58 1360x768-62 (is 60Hz!) */
+	{ 0x52,0x07,149}, /* 0x59 1280x960-85 */
+	{ 0x56,0x07,156}, /* 0x5a 1400x1050-75 */
+   	{ 0x70,0x29, 81}, /* 0x5b 1280x768 LCD */
+	{ 0x45,0x25, 83}, /* 0x5c 1280x800  */
+	{ 0x70,0x0a,147}, /* 0x5d 1680x1050 */
+	{ 0x70,0x24,162}, /* 0x5e 1600x1200 */
+	{ 0x5a,0x64, 65}, /* 0x5f 1280x720 - temp */
+	{ 0x63,0x46, 68}, /* 0x60 1280x768_2 */
+	{ 0x31,0x42, 79}, /* 0x61 1280x768_3 - temp */
+	{    0,   0,  0}, /* 0x62 - custom (will be filled out at run-time) */
+	{ 0x5a,0x64, 65}, /* 0x63 1280x720 (LCD LVDS) */
+	{ 0x70,0x28, 90}, /* 0x64 1152x864@60 */
+	{ 0x41,0xc4, 32}, /* 0x65 848x480@60 */
+	{ 0x5c,0xc6, 32}, /* 0x66 856x480@60 */
+	{ 0x76,0xe7, 27}, /* 0x67 720x480@60 */
+	{ 0x5f,0xc6, 33}, /* 0x68 720/768x576@60 */
+	{ 0x52,0x27, 75}, /* 0x69 1920x1080i 60Hz interlaced */
+	{ 0x7c,0x6b, 38}  /* 0x6a 960x540@60 */
+};
 
-static const SiS310_VBVCLKDataStruct SiS310_VBVCLKData[]=
+static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]=
 {
 	{ 0x1b,0xe1, 25}, /* 0x00 */
 	{ 0x4e,0xe4, 28}, /* 0x01 */
@@ -732,7 +723,7 @@
 	{ 0x53,0x47, 50}, /* 0x08 */
 	{ 0x74,0x67, 52}, /* 0x09 */
 	{ 0x6d,0x66, 56}, /* 0x0a */
-	{ 0x35,0x62, 65}, /* 0x0b */  /* Was 0x5a,0x64 - 650/LVDS+301 bios: 35,62  */
+	{ 0x35,0x62, 65}, /* 0x0b */  /* Was 0x5a,0x64 - 650/LVDS+301: 35,62  */
 	{ 0x46,0x44, 67}, /* 0x0c */
 	{ 0xb1,0x46, 68}, /* 0x0d */
 	{ 0xd3,0x4a, 72}, /* 0x0e */
@@ -785,47 +776,55 @@
 	{ 0xea,0x08,340}, /* 0x37 */
 	{ 0xe8,0x07,376}, /* 0x38 */
 	{ 0xde,0x06,389}, /* 0x39 */
-	{ 0x52,0x2a, 54}, /* 0x3a */  /* 301 TV */
-	{ 0x52,0x6a, 27}, /* 0x3b */  /* 301 TV */
-	{ 0x62,0x24, 70}, /* 0x3c */  /* 301 TV */
-	{ 0x62,0x64, 70}, /* 0x3d */  /* 301 TV */
-	{ 0xa8,0x4c, 30}, /* 0x3e */  /* 301 TV */
-	{ 0x20,0x26, 33}, /* 0x3f */  /* 301 TV */
+	{ 0x52,0x2a, 54}, /* 0x3a 301 TV - start */
+	{ 0x52,0x6a, 27}, /* 0x3b 301 TV */
+	{ 0x62,0x24, 70}, /* 0x3c 301 TV */
+	{ 0x62,0x64, 70}, /* 0x3d 301 TV */
+	{ 0xa8,0x4c, 30}, /* 0x3e 301 TV */
+	{ 0x20,0x26, 33}, /* 0x3f 301 TV */
 	{ 0x31,0xc2, 39}, /* 0x40 */
-	{ 0x2e,0x48, 25}, /* 0x41 */  /* Replacement for LCD on 315 for index 0 */
-	{ 0x24,0x46, 25}, /* 0x42 */  /* Replacement for LCD on 315 for modes 0x01, 0x03, 0x0f, 0x10, 0x12 */
-	{ 0x26,0x64, 28}, /* 0x43 */  /* Replacement for LCD on 315 for index 1 */
-	{ 0x37,0x64, 40}, /* 0x44 */  /* Replacement for LCD on 315 for index 4 */
-	{ 0xa1,0x42,108}, /* 0x45 */  /* 1280x960 LCD */
-	{ 0x37,0x61,100}, /* 0x46 */  /* 1280x960 LCD */
+	{ 0x2e,0x48, 25}, /* 0x41 Replacement for LCD on 315 for index 0 */
+	{ 0x24,0x46, 25}, /* 0x42 Replacement for LCD on 315 for modes 0x01, 0x03, 0x0f, 0x10, 0x12 */
+	{ 0x26,0x64, 28}, /* 0x43 Replacement for LCD on 315 for index 1 */
+	{ 0x37,0x64, 40}, /* 0x44 Replacement for LCD on 315 for index 4 */
+	{ 0xa1,0x42,108}, /* 0x45 1280x960 LCD */
+	{ 0x37,0x61,100}, /* 0x46 1280x960 LCD */
 	{ 0x78,0x27,108}, /* 0x47 */
-	{ 0x97,0x2c, 26}, /* 0x48 */  /* UNUSED - Entries from here new, not in any BIOS */
-	{ 0xce,0x3c, 39}, /* 0x49 */  /* UNUSED */
-	{ 0x52,0x4a, 36}, /* 0x4a */  /* UNUSED */
-	{ 0x34,0x61, 95}, /* 0x4b */  /* UNUSED */
-	{ 0x78,0x27,108}, /* 0x4c */  /* UNUSED */
-	{ 0x66,0x43,123}, /* 0x4d */  /* 1400x1050-60 */
-	{ 0x41,0x4e, 21}, /* 0x4e */  /* UNUSED */
-	{ 0xa1,0x4a, 29}, /* 0x4f */  /* UNUSED */
-	{ 0x19,0x42, 42}, /* 0x50 */  /* UNUSED */
-	{ 0x54,0x46, 58}, /* 0x51 */  /* UNUSED */
-	{ 0x25,0x42, 61}, /* 0x52 */  /* UNUSED */
-	{ 0x44,0x44, 66}, /* 0x53 */  /* UNUSED */
-	{ 0x3a,0x62, 70}, /* 0x54 */  /* UNUSED */
-	{ 0x62,0xc6, 34}, /* 0x55 */  /* 848x480-60 */
-	{ 0x6a,0xc6, 37}, /* 0x56 */  /* 848x480-75 - TEMP, UNUSED */
-	{ 0xbf,0xc8, 35}, /* 0x57 */  /* 856x480-38i,60  */
-	{ 0x30,0x23, 88}, /* 0x58 */  /* 1360x768-62 (is 60Hz!) TEMP, UNUSED */
-	{ 0x52,0x07,149}, /* 0x59 */  /* 1280x960-85  */
-	{ 0x56,0x07,156}, /* 0x5a */  /* 1400x1050-75 */
-   	{ 0x70,0x29, 81}  /* 0x5b */  /* 1280x768 LCD */
-};
-
-static const UCHAR SiS310_ScreenOffset[] =
-{
-        0x14,0x19,0x20,0x28,0x32,0x40,0x50,0x64,
-	0x78,0x80,0x2d,0x35,0x57,0x48,0x55,0x30,
-	0xff
+	{ 0x97,0x2c, 26}, /* 0x48 UNUSED */
+	{ 0xce,0x3c, 39}, /* 0x49 UNUSED */
+	{ 0x52,0x4a, 36}, /* 0x4a UNUSED */
+	{ 0x34,0x61, 95}, /* 0x4b UNUSED */
+	{ 0x78,0x27,108}, /* 0x4c UNUSED */
+	{ 0x66,0x43,123}, /* 0x4d 1400x1050-60 */
+	{ 0x41,0x4e, 21}, /* 0x4e UNUSED */
+	{ 0xa1,0x4a, 29}, /* 0x4f UNUSED */
+	{ 0x19,0x42, 42}, /* 0x50 UNUSED */
+	{ 0x54,0x46, 58}, /* 0x51 UNUSED */
+	{ 0x25,0x42, 61}, /* 0x52 UNUSED */
+	{ 0x44,0x44, 66}, /* 0x53 UNUSED */
+	{ 0x3a,0x62, 70}, /* 0x54 UNUSED */
+	{ 0x62,0xc6, 34}, /* 0x55 848x480-60 */
+	{ 0x6a,0xc6, 37}, /* 0x56 848x480-75 - TEMP, UNUSED */
+	{ 0xbf,0xc8, 35}, /* 0x57 856x480-38i,60  */
+	{ 0x30,0x23, 88}, /* 0x58 1360x768-62 (is 60Hz!) TEMP, UNUSED */
+	{ 0x52,0x07,149}, /* 0x59 1280x960-85  */
+	{ 0x56,0x07,156}, /* 0x5a 1400x1050-75 */
+   	{ 0x70,0x29, 81}, /* 0x5b 1280x768 LCD */
+	{ 0x45,0x25, 83}, /* 0x5c 1280x800 LCD - (was 0x9c,0x62, 69 - wrong?) */
+	{ 0xbe,0x44,121}, /* 0x5d 1680x1050 LCD */
+	{ 0x70,0x24,162}, /* 0x5e 1600x1200 LCD */
+	{ 0x52,0x27, 75}, /* 0x5f 1280x720 LCD TMDS + HDTV (correct) */
+	{ 0x63,0x46, 68}, /* 0x60 1280x768_2 */
+	{ 0x31,0x42, 79}, /* 0x61 1280x768_3 - temp */
+	{    0,   0,  0}, /* 0x62 - custom (will be filled out at run-time) */
+	{ 0x5a,0x64, 65}, /* 0x63 1280x720 (LCD LVDS) */
+	{ 0x70,0x28, 90}, /* 0x64 1152x864@60 */
+	{ 0x41,0xc4, 32}, /* 0x65 848x480@60 */
+	{ 0x5c,0xc6, 32}, /* 0x66 856x480@60 */
+	{ 0x76,0xe7, 27}, /* 0x67 720x480@60 */
+	{ 0x5f,0xc6, 33}, /* 0x68 720/768x576@60 */
+	{ 0x52,0x27, 75}, /* 0x69 1920x1080i 60Hz interlaced (UNUSED) */
+	{ 0x7c,0x6b, 38}  /* 0x6a 960x540@60 */
 };
 
 static const DRAM4Type SiS310_SR15[8] = {
@@ -873,12 +872,7 @@
 static const USHORT SiS310_YCSenseData2    = 0x016b;
 #endif
 
-typedef struct _SiS310_PanelDelayTblStruct
-{
- 	UCHAR timer[2];
-} SiS310_PanelDelayTblStruct;
-
-static const SiS310_PanelDelayTblStruct SiS310_PanelDelayTbl[]=
+static const SiS_PanelDelayTblStruct SiS310_PanelDelayTbl[]=
 {
         {{0x10,0x40}},
 	{{0x10,0x40}},
@@ -898,7 +892,7 @@
 	{{0x10,0x40}}
 };
 
-static const SiS310_PanelDelayTblStruct SiS310_PanelDelayTblLVDS[]=
+static const SiS_PanelDelayTblStruct SiS310_PanelDelayTblLVDS[]=
 {
 	{{0x28,0xc8}},
 	{{0x28,0xc8}},
@@ -922,28 +916,18 @@
 /* SIS VIDEO BRIDGE ----------------------------------------- */
 /**************************************************************/
 
-typedef struct _SiS310_LCDDataStruct
-{
-	USHORT RVBHCMAX;
-	USHORT RVBHCFACT;
-	USHORT VGAHT;
-	USHORT VGAVT;
-	USHORT LCDHT;
-	USHORT LCDVT;
-} SiS310_LCDDataStruct;
-
-static const SiS310_LCDDataStruct  SiS310_StLCD1024x768Data[]=
+static const SiS_LCDDataStruct  SiS310_St2LCD1024x768Data[] =
 {
 	{   62,  25, 800, 546,1344, 806},
 	{   32,  15, 930, 546,1344, 806},
-	{   32,  15, 930, 546,1344, 806},
+        {   62,  25, 800, 546,1344, 806},
 	{  104,  45, 945, 496,1344, 806},
 	{   62,  25, 800, 546,1344, 806},
 	{   31,  18,1008, 624,1344, 806},
 	{    1,   1,1344, 806,1344, 806}
 };
 
-static const SiS310_LCDDataStruct  SiS310_ExtLCD1024x768Data[] =   
+static const SiS_LCDDataStruct  SiS310_ExtLCD1024x768Data[] =
 {
 	{   42,  25,1536, 419,1344, 806},
 	{   48,  25,1536, 369,1344, 806},
@@ -951,28 +935,10 @@
 	{   48,  25,1536, 369,1344, 806},
 	{   12,   5, 896, 500,1344, 806},
 	{   42,  25,1024, 625,1344, 806},
-	{    1,   1,1344, 806,1344, 806},
-	{   12,   5, 896, 500,1344, 806},
-	{   42,  25,1024, 625,1344, 806},
-	{    1,   1,1344, 806,1344, 806},
-	{   12,   5, 896, 500,1344, 806},
-	{   42,  25,1024, 625,1344, 806},
-	{    1,   1,1344, 806,1344, 806}
-	 
-};
-
-static const SiS310_LCDDataStruct  SiS310_St2LCD1024x768Data[] =  
-{
-	{   62,  25, 800, 546,1344, 806},
-	{   32,  15, 930, 546,1344, 806},
-        {   62,  25, 800, 546,1344, 806},    
-	{  104,  45, 945, 496,1344, 806},
-	{   62,  25, 800, 546,1344, 806},
-	{   31,  18,1008, 624,1344, 806},
 	{    1,   1,1344, 806,1344, 806}
 };
 
-static const SiS310_LCDDataStruct  SiS310_StLCD1280x1024Data[] =
+static const SiS_LCDDataStruct  SiS310_St2LCD1280x1024Data[] =
 {
 	{   22,   5, 800, 510,1650,1088},
 	{   22,   5, 800, 510,1650,1088},
@@ -984,7 +950,7 @@
 	{    1,   1,1688,1066,1688,1066}
 };
 
-static const SiS310_LCDDataStruct  SiS310_ExtLCD1280x1024Data[] =
+static const SiS_LCDDataStruct  SiS310_ExtLCD1280x1024Data[] =
 {
 	{  211,  60,1024, 501,1688,1066},
 	{  211,  60,1024, 508,1688,1066},
@@ -993,53 +959,10 @@
 	{  211,  60,1024, 500,1688,1066},
 	{  211,  75,1024, 625,1688,1066},
 	{  211, 120,1280, 798,1688,1066},
-	{    1,   1,1688,1066,1688,1066},
-	{    1,   1,1800,1000,1688,1066}  /* 1280x960 - does not work, use panel scaler instead */
-};
-
-static const SiS310_LCDDataStruct  SiS310_St2LCD1280x1024Data[] =
-{
-	{   22,   5, 800, 510,1650,1088},
-	{   22,   5, 800, 510,1650,1088},
-	{  176,  45, 900, 510,1650,1088},
-	{  176,  45, 900, 510,1650,1088},
-	{   22,   5, 800, 510,1650,1088},
-	{   13,   5,1024, 675,1560,1152},
-	{   16,   9,1266, 804,1688,1072},
 	{    1,   1,1688,1066,1688,1066}
 };
 
-static const SiS310_LCDDataStruct  SiS310_NoScaleData1024x768[] =  
-{
-        {    1,   1,1344, 806,1344, 806},
-	{    1,   1,1344, 806,1344, 806},
-	{    1,   1,1344, 806,1344, 806},
-	{    1,   1,1344, 806,1344, 806},  /* 640x400 - does not work */
-	{    1,   1,1344, 806,1344, 806},  /* 640x480 - does not work */
-	{    1,   1,1344, 806,1344, 806},
-	{    1,   1,1344, 806,1344, 806},
-	{    1,   1,1344, 806,1344, 806}
-};
-
-static const SiS310_LCDDataStruct  SiS310_NoScaleData1280x1024[] =
-{
-        {    1,   1,1688,1066,1688,1066},
-	{    1,   1,1688,1066,1688,1066},
-	{    1,   1,1688,1066,1688,1066},
-	{    1,   1,1688,1066,1688,1066},
-	{    1,   1,1688,1066,1688,1066},
-	{    1,   1,1688,1066,1688,1066},
-	{    1,   1,1688,1066,1688,1066},
-	{    1,   1,1688,1066,1688,1066},
-	{    1,   1,1688,1066,1688,1066}
-};
-
-typedef struct _SiS310_Part2PortTblStruct
-{
- 	UCHAR CR[12];
-} SiS310_Part2PortTblStruct;
-
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1024x768_1[] =
+static const SiS_Part2PortTblStruct SiS310_CRT2Part2_1024x768_1[] =
 {
  {{0x25,0x12,0xc9,0xdc,0xb6,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
  {{0x2c,0x12,0x9a,0xae,0x88,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
@@ -1047,646 +970,37 @@
  {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
  {{0x38,0x13,0x16,0x0c,0xe6,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
  {{0x38,0x18,0x16,0x00,0x00,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
- {{0x36,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x25,0x12,0xc9,0xdc,0xb6,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}
+ {{0x36,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}
 };
 
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1024x768_2[] =
-{
- {{0x25,0x12,0x51,0x6e,0x48,0x99,0x35,0x89,0x47,0xc1,0x49,0x33}},
- {{0x2c,0x12,0x38,0x55,0x2f,0x99,0x35,0x89,0x47,0xc1,0x49,0x33}},
- {{0x25,0x12,0x51,0x6e,0x48,0x99,0x35,0x89,0x47,0xc1,0x49,0x33}},
- {{0x2c,0x12,0x38,0x55,0x2f,0xc1,0x35,0xb1,0x47,0xe9,0x71,0x33}},
- {{0x2d,0x12,0x79,0x96,0x70,0x99,0x35,0x89,0x47,0xc1,0x49,0x33}},
- {{0x29,0x12,0xb5,0xd2,0xac,0xe9,0x35,0xd9,0x47,0x11,0x99,0x33}},
- {{0x36,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},  /* others  */
-/* 0x36,0x13,0x02,0x25,0xff,0x03,0x45,0x09,0x07,0xf9,0x00,0x24        my      */
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
-};
+/* *** LCDA *** */
 
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1024x768_3[] =
-{
-#if 1   /* Data from 650/301LVx 1.10.6s and others */
- {{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
- {{0x2c,0x13,0x9a,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
- {{0x25,0x13,0xc9,0x24,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x38,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
- {{0x38,0x18,0x16,0x00,0x00,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
- {{0x36,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x25,0x13,0xc9,0x25,0xff,0xf9,0x45,0x09,0x07,0xf9,0x09,0x24}}
+#if 0
+static const SiS_LVDSDataStruct  SiS_LCDA1600x1200Data_1[]=
+{ /* Clevo, 651+301C */
+	{1200, 450, 2048,1250},
+	{1200, 400, 2048,1250},
+	{1280, 450, 2048,1250},
+	{1280, 400, 2048,1250},
+	{1200, 530, 2048,1250},
+	{1360, 650, 2048,1250},
+	{1584, 818, 2048,1250},
+	{1688,1066, 2048,1250},
+	{1688,1066, 2048,1250},
+#if 0
+	{2048,1250, 2048,1250}   /* this should be correct */
 #endif
-#if 0    /* Data from my 301LV */
- {{0x36,0x13,0x02,0x25,0xff,0x21,0x45,0x09,0x07,0x88,0x09,0x24}},   /* TEST */
- {{0x36,0x13,0x02,0x25,0xff,0x21,0x45,0x09,0x07,0x88,0x09,0x24}},
- {{0x36,0x13,0x02,0x25,0xff,0x21,0x45,0x09,0x07,0x88,0x09,0x24}},
- {{0x36,0x13,0x02,0x25,0xff,0x21,0x45,0x09,0x07,0x88,0x09,0x24}},
- {{0x36,0x13,0x02,0x25,0xff,0x21,0x45,0x09,0x07,0x88,0x09,0x24}},
- {{0x36,0x13,0x02,0x25,0xff,0x21,0x45,0x09,0x07,0x88,0x09,0x24}},
- {{0x36,0x13,0x02,0x25,0xff,0x21,0x45,0x09,0x07,0x88,0x09,0x24}},
- {{0x36,0x13,0x02,0x25,0xff,0x21,0x45,0x09,0x07,0x88,0x09,0x24}},
- {{0x36,0x13,0x02,0x25,0xff,0x21,0x45,0x09,0x07,0x88,0x09,0x24}}
+#if 1
+	{2160,1250, 2048,1250}   /* ? */
 #endif
 };
-
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1280x1024_1[] =
-{ /* Acer; BIOS data invalid, last row taken from _3 */
- {{0x25,0x12,0x51,0x6E,0x48,0x99,0x35,0x89,0x47,0xC1,0x49,0x33}},
- {{0x2C,0x12,0x38,0x55,0x2F,0x99,0x35,0x89,0x47,0xC1,0x49,0x33}},
- {{0x25,0x12,0x51,0x6E,0x48,0x99,0x35,0x89,0x47,0xC1,0x49,0x33}},
- {{0x2C,0x12,0x38,0x55,0x2F,0xC1,0x35,0xB1,0x47,0xE9,0x71,0x33}},
- {{0x2D,0x12,0x79,0x96,0x70,0x99,0x35,0x89,0x47,0xC1,0x49,0x33}},
- {{0x29,0x12,0xB5,0xD2,0xAC,0xE9,0x35,0xD9,0x47,0x11,0x99,0x33}},
- {{0x36,0x13,0x02,0x25,0xFF,0x03,0x45,0x09,0x07,0xF9,0x00,0x24}},
- {{0x47,0x1C,0x14,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}}
-};
-
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1280x1024_2[] =
-{ /* Acer */
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
-};
-
-/*   1     2    4    5    6   1c   1d   1f   20   21   23   25   */
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1280x1024_3[] =
-{ /* Acer */
- {{0x31,0x1B,0xC4,0xDA,0xB0,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}},
- {{0x34,0x1B,0x9F,0xC0,0x80,0xB8,0x23,0x0A,0x07,0x14,0x8A,0x12}},
- {{0x3E,0x1B,0xCF,0xF0,0xB0,0xB8,0x23,0x0A,0x07,0x14,0x8A,0x12}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x48,0x1C,0x15,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}},
- {{0x48,0x1C,0x15,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}},
- {{0x48,0x1C,0x15,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}},
- {{0x47,0x1C,0x14,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}}
-};
-
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1400x1050_1[] =
-{
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x32}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x32}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x32}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x32}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}}
-};
-
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1400x1050_2[] =
-{
- {{0x2b,0x12,0xd9,0xe5,0xd5,0x2c,0x23,0x98,0x27,0x3e,0x08,0x42}},
- {{0x22,0x12,0xc0,0xcc,0xbc,0x2c,0x23,0x98,0x27,0x3e,0x08,0x42}},
- {{0x2b,0x12,0xd9,0xe5,0xd5,0x2c,0x23,0x98,0x27,0x3e,0x08,0x42}},
- {{0x22,0x12,0xc0,0xcc,0xbc,0x2c,0x23,0x98,0x27,0x3e,0x08,0x42}},
- {{0x33,0x13,0x01,0x0d,0xfd,0x2c,0x23,0x98,0x27,0x3e,0x08,0x42}},
- {{0x3f,0x1b,0x3d,0x49,0x39,0x54,0x23,0xc0,0x27,0x66,0x30,0x42}},
- {{0x33,0x1b,0x91,0x9d,0x8d,0x8c,0x23,0xf8,0x27,0x9e,0x68,0x42}},
- {{0x43,0x24,0x11,0x1d,0x0d,0xcc,0x23,0x38,0x37,0xde,0xa8,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}}
-};
-
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1400x1050_3[] =
-{
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x32}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x32}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x32}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x32}},
- {{0x43,0x24,0x21,0x29,0x19,0xea,0x23,0x0a,0x07,0x32,0xc6,0x32}}
-};
-
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1600x1200_1[] =
-{
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}}
-};
-
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1600x1200_2[] =
-{
- {{0x32,0x1B,0x2C,0x52,0x20,0x80,0x20,0x52,0x30,0xA3,0x3A,0x02}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x32,0x1B,0x2C,0x52,0x20,0x80,0x20,0x52,0x30,0xA3,0x3A,0x02}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x3A,0x1B,0x54,0x7A,0x48,0x80,0x24,0x52,0x30,0xA3,0x3A,0x02}},
- {{0x36,0x1B,0x90,0xB6,0x84,0xA8,0x24,0x7A,0x30,0xCB,0x62,0x02}},
- {{0x3A,0x1C,0xE4,0x0A,0xD8,0xE0,0x24,0xB2,0x30,0x03,0x9A,0x02}},
- {{0x4A,0x24,0x64,0x8A,0x58,0x20,0x34,0xF2,0x30,0x43,0xDA,0x52}},
- {{0x47,0x24,0x71,0x97,0x65,0x3E,0x34,0x10,0x40,0x61,0xF8,0x02}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}}
-};
-
-static const SiS310_Part2PortTblStruct SiS310_CRT2Part2_1600x1200_3[] =
-{
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}},
- {{0x4C,0x24,0xC8,0xE1,0xAF,0x70,0x34,0x0A,0x07,0xFC,0x2A,0x53}}
-};
-
-/* CRT1 CRTC for LCDA */
-
-typedef struct _SiS310_LCDACRT1DataStruct
-{
- 	UCHAR CR[17];
-}SiS310_LCDACRT1DataStruct;
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11024x768_1[]=
-{
- {{0x73,0x4f,0x4f,0x97,0x59,0x84,0xb4,0x1f,
-   0x92,0x89,0x8f,0x8f,0xb5,0x30,0x00,0x05,
-   0x00}},
- {{0x73,0x4f,0x4f,0x97,0x59,0x84,0x82,0x1f,
-   0x60,0x87,0x5d,0x5d,0x83,0x10,0x00,0x05,
-   0x00}},
- {{0x73,0x4f,0x4f,0x97,0x59,0x84,0xb4,0x1f,
-   0x92,0x89,0x8f,0x8f,0xb5,0x30,0x00,0x05,
-   0x00}},
- {{0x73,0x4f,0x4f,0x97,0x59,0x84,0x82,0x1f,
-   0x60,0x87,0x5d,0x5d,0x83,0x10,0x00,0x05,
-   0x00}},
- {{0x73,0x4f,0x4f,0x97,0x59,0x84,0x04,0x3e,
-   0xE2,0x89,0xdf,0xdf,0x05,0x00,0x00,0x05,
-   0x00}},
- {{0x87,0x63,0x63,0x8B,0x6D,0x18,0x7c,0xf0,
-   0x5A,0x81,0x57,0x57,0x7D,0x00,0x00,0x06,
-   0x01}},
- {{0xA3,0x7f,0x7f,0x87,0x89,0x94,0x24,0xf5,
-   0x02,0x89,0xff,0xff,0x25,0x10,0x00,0x02,
-   0x01}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11024x768_1_H[]=
-{
- {{0x4b,0x27,0x27,0x8f,0x31,0x1c,0xb4,0x1f,
-   0x92,0x89,0x8f,0x8f,0xb5,0x30,0x00,0x05,
-   0x00}},
- {{0x4b,0x27,0x27,0x8f,0x31,0x1c,0x82,0x1f,
-   0x60,0x87,0x5D,0x5D,0x83,0x10,0x00,0x05,
-   0x00}},
- {{0x4b,0x27,0x27,0x8f,0x31,0x1c,0xb4,0x1f,
-   0x92,0x89,0x8f,0x8f,0xb5,0x30,0x00,0x05,
-   0x00}},
- {{0x4b,0x27,0x27,0x8f,0x31,0x1c,0x82,0x1f,
-   0x60,0x87,0x5D,0x5D,0x83,0x10,0x00,0x05,
-   0x00}},
- {{0x4b,0x27,0x27,0x8f,0x31,0x1c,0x04,0x3e,
-   0xE2,0x89,0xDf,0xDf,0x05,0x00,0x00,0x05,
-   0x00}},
- {{0x55,0x31,0x31,0x99,0x3b,0x06,0x7c,0xf0,
-   0x5A,0x81,0x57,0x57,0x7D,0x00,0x00,0x01,
-   0x01}},
- {{0x63,0x3F,0x3F,0x87,0x49,0x94,0x24,0xF5,
-   0x02,0x89,0xFF,0xFF,0x25,0x10,0x00,0x01,
-   0x01}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11024x768_2[]=
-{
- {{0xa3,0x4f,0x4f,0x0f,0x6e,0x1f,0x24,0xbb,
-   0x4a,0x81,0x8f,0xdb,0xda,0x20,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x0f,0x6e,0x1f,0x24,0xbb,
-   0x31,0x88,0x5d,0xc2,0xc1,0x20,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x0f,0x6e,0x1f,0x24,0xbb,
-   0x4a,0x81,0x8f,0xdb,0xda,0x20,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x0f,0x6e,0x1f,0x24,0xbb,
-   0x31,0x88,0x5d,0xc2,0xc1,0x20,0x00,0x06,
-   0x01}},
- {{0xa3,0x4f,0x4f,0x0f,0x6e,0x1f,0x24,0xb3,
-   0x72,0x89,0xdf,0x03,0x02,0x30,0x00,0x06,
-   0x01}},
- {{0xa3,0x63,0x63,0x98,0x78,0x19,0x24,0xf1,
-   0xbb,0x82,0x57,0x57,0x25,0x10,0x00,0x02,
-   0x01}},
- {{0xa3,0x7f,0x7f,0x87,0x89,0x94,0x24,0xf5,
-   0x02,0x89,0xff,0xff,0x25,0x10,0x00,0x02,
-   0x01}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11024x768_2_H[]=
-{
- {{0x7b,0x27,0x27,0x0f,0x46,0x97,0x24,0xbb,
-   0x4a,0x81,0x8f,0xdb,0xda,0x20,0x00,0x01,
-   0x00 }},
- {{0x7b,0x27,0x27,0x0f,0x46,0x97,0x24,0xbb,
-   0x31,0x88,0x5d,0xc2,0xc1,0x20,0x00,0x01,
-   0x00 }},
- {{0x7b,0x27,0x27,0x0f,0x46,0x97,0x24,0xbb,
-   0x4a,0x81,0x8f,0xdb,0xda,0x20,0x00,0x01,
-   0x00 }},
- {{0x7b,0x27,0x27,0x0f,0x46,0x97,0x24,0xbb,
-   0x31,0x88,0x5d,0xc2,0xc1,0x20,0x00,0x01,
-   0x00 }},
- {{0x7b,0x27,0x27,0x0f,0x46,0x97,0x24,0xb3,
-   0x72,0x89,0xdf,0x03,0x02,0x30,0x00,0x01,
-   0x01 }},
- {{0x71,0x31,0x31,0x98,0x46,0x17,0x24,0xf1,
-   0xbb,0x82,0x57,0x57,0x25,0x10,0x00,0x02,
-   0x01 }},
- {{0x63,0x3f,0x3f,0x87,0x4c,0x97,0x24,0xf5,
-   0x0f,0x86,0xff,0xff,0x25,0x30,0x00,0x01,
-   0x01 }}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11280x1024_1[]=
-{ /* Acer */
- {{0x7e,0x4f,0x4f,0x82,0x58,0x04,0xb8,0x1f,
-   0x90,0x84,0x8f,0x8f,0xb9,0x30,0x00,0x06,
-   0x00}},
- {{0x7e,0x4f,0x4f,0x82,0x58,0x04,0x86,0x1f,
-   0x5e,0x82,0x5d,0x5d,0x87,0x10,0x00,0x06,
-   0x00}},
- {{0x7e,0x4f,0x4f,0x82,0x58,0x04,0xb8,0x1f,
-   0x90,0x84,0x8f,0x8f,0xb9,0x30,0x00,0x06,
-   0x00}},
- {{0x7e,0x4f,0x4f,0x82,0x58,0x04,0x86,0x1f,
-   0x5e,0x82,0x5d,0x5d,0x87,0x10,0x00,0x06,
-   0x00}},
- {{0x7e,0x4f,0x4f,0x82,0x58,0x04,0x08,0x3e,
-   0xe0,0x84,0xdf,0xdf,0x09,0x00,0x00,0x06,
-   0x00}},
- {{0x92,0x63,0x63,0x96,0x6c,0x18,0x80,0xf0,
-   0x58,0x8c,0x57,0x57,0x81,0x20,0x00,0x06,
-   0x01}},
- {{0xae,0x7f,0x7f,0x92,0x88,0x94,0x28,0xf5,
-   0x00,0x84,0xff,0xff,0x29,0x10,0x00,0x02,
-   0x01}},
- {{0xce,0x9f,0x9f,0x92,0xa8,0x14,0x28,0x5a,
-   0x00,0x84,0xff,0xff,0x29,0x01,0x00,0x07,
-   0x01}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11280x1024_1_H[]=
-{  /* Acer */
- {{0x56,0x27,0x27,0x9a,0x31,0x1c,0xb8,0x1f,
-   0x90,0x84,0x8f,0x8f,0xb9,0x30,0x00,0x05,
-   0x00}},
- {{0x56,0x27,0x27,0x9a,0x31,0x1c,0x86,0x1f,
-   0x5e,0x82,0x5d,0x5d,0x87,0x10,0x00,0x05,
-   0x00}},
- {{0x56,0x27,0x27,0x9a,0x31,0x1c,0xb8,0x1f,
-   0x90,0x84,0x8f,0x8f,0xb9,0x30,0x00,0x05,
-   0x00}},
- {{0x56,0x27,0x27,0x9a,0x31,0x1c,0x86,0x1f,
-   0x5e,0x82,0x5d,0x5d,0x87,0x10,0x00,0x05,
-   0x01}},
- {{0x56,0x27,0x27,0x9a,0x31,0x1c,0x08,0x3e,
-   0xe0,0x84,0xdf,0xdf,0x09,0x00,0x00,0x05,
-   0x00}},
- {{0x60,0x31,0x31,0x84,0x3a,0x86,0x80,0xf0,
-   0x58,0x8c,0x57,0x57,0x81,0x20,0x00,0x01,
-   0x01}},
- {{0x6e,0x3f,0x3f,0x92,0x48,0x94,0x28,0xf5,
-   0x00,0x84,0xff,0xff,0x29,0x10,0x00,0x01,
-   0x01}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11280x1024_2[]=
-{  /* Illegal data in BIOS (Acer, Compaq) */
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x4a,0x80,0x8f,0x8f,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x31,0x87,0x5d,0x5d,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x4a,0x80,0x8f,0x8f,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x31,0x87,0x5d,0x5d,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x72,0x88,0xdf,0xdf,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x63,0x63,0x87,0x78,0x89,0x24,0xf1,
-   0xae,0x84,0x57,0x57,0x25,0x30,0x00,0x02,
-   0x01}},
- {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf5,
-   0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
-   0x01}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11280x1024_2_H[]=
-{  /* Illegal data in BIOS (Acer, Compaq) */
- {{0x4f,0x27,0x27,0x93,0x39,0x81,0x24,0xbb,
-   0x4a,0x80,0x8f,0x8f,0x25,0x30,0x00,0x01,
-   0x00 }},
- {{0x4f,0x27,0x27,0x93,0x39,0x81,0x24,0xbb,
-   0x31,0x87,0x5d,0x5d,0x25,0x30,0x00,0x01,
-   0x00 }},
- {{0x4f,0x27,0x27,0x93,0x39,0x81,0x24,0xbb,
-   0x4a,0x80,0x8f,0x8f,0x25,0x30,0x00,0x01,
-   0x00 }},
- {{0x4f,0x27,0x27,0x93,0x39,0x81,0x24,0xbb,
-   0x31,0x87,0x5d,0x5d,0x25,0x30,0x00,0x01,
-   0x00 }},
- {{0x4f,0x27,0x27,0x93,0x39,0x81,0x24,0xbb,
-   0x72,0x88,0xdf,0xdf,0x25,0x30,0x00,0x01,
-   0x00 }},
- {{0x4f,0x31,0x31,0x93,0x3e,0x86,0x24,0xf1,
-   0xae,0x84,0x57,0x57,0x25,0x30,0x00,0x01,
-   0x01 }},
- {{0x4f,0x3f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
-   0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x01,
-   0x01 }}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11400x1050_1[]=
-{
- {{0x6f,0x4f,0x4f,0x93,0x54,0x82,0x9e,0x1f,
-   0x93,0x86,0x8f,0x8f,0x9f,0x30,0x00,0x05,
-   0x00}},
- {{0x6f,0x4f,0x4f,0x93,0x54,0x82,0x6c,0x1f,
-   0x60,0x84,0x5d,0x5d,0x6d,0x10,0x00,0x05,
-   0x00}},
- {{0x6f,0x4f,0x4f,0x93,0x54,0x82,0x9e,0x1f,
-   0x93,0x86,0x8f,0x8f,0x9f,0x30,0x00,0x05,
-   0x00}},
- {{0x6f,0x4f,0x4f,0x93,0x54,0x82,0x6c,0x1f,
-   0x60,0x84,0x5d,0x5d,0x6d,0x10,0x00,0x05,
-   0x00}},
- {{0x6f,0x4f,0x4f,0x93,0x54,0x82,0xee,0x1f,
-   0xe2,0x86,0xdf,0xdf,0xef,0x10,0x00,0x05,
-   0x00}},
- {{0x83,0x63,0x63,0x87,0x68,0x16,0x66,0xf0,
-   0x5a,0x8e,0x57,0x57,0x67,0x20,0x00,0x06,
-   0x01}},
- {{0x9f,0x7f,0x7f,0x83,0x84,0x92,0x0e,0xf5,
-   0x02,0x86,0xff,0xff,0x0f,0x10,0x00,0x02,
-   0x01}},
- {{0xbf,0x9f,0x9f,0x83,0xa4,0x12,0x0e,0x5a,
-   0x02,0x86,0xff,0xff,0x0f,0x09,0x00,0x07,
-   0x01}},
- {{0xce,0xae,0xae,0x92,0xb3,0x01,0x28,0x10,
-   0x1a,0x80,0x19,0x19,0x29,0x0f,0x00,0x03,
-   0x00}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11400x1050_1_H[]=
-{
-  {{0x47,0x27,0x27,0x8b,0x2c,0x1a,0x9e,0x1f,
-    0x93,0x86,0x8f,0x8f,0x9f,0x30,0x00,0x05,
-    0x00}},
-  {{0x47,0x27,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
-    0x60,0x84,0x5d,0x5d,0x6d,0x10,0x00,0x05,
-    0x00}},
-  {{0x47,0x27,0x27,0x8b,0x30,0x1e,0x9e,0x1f,
-    0x92,0x86,0x8f,0x8f,0x9f,0x30,0x00,0x05,
-    0x00}},
-  {{0x47,0x27,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
-    0x60,0x84,0x5d,0x5d,0x6d,0x10,0x00,0x05,
-    0x00}},
-  {{0x47,0x27,0x27,0x8b,0x2c,0x1a,0xee,0x1f,
-    0xe2,0x86,0xdf,0xdf,0xef,0x10,0x00,0x05,
-    0x00}},
-  {{0x51,0x31,0x31,0x95,0x36,0x04,0x66,0xf0,
-    0x5a,0x8e,0x57,0x57,0x67,0x20,0x00,0x01,
-    0x01}},
-  {{0x5f,0x3f,0x3f,0x83,0x44,0x92,0x0e,0xf5,
-    0x02,0x86,0xff,0xff,0x0f,0x10,0x00,0x01,
-    0x01}},
-  {{0x6f,0x4f,0x4f,0x93,0x54,0x82,0x0e,0x5a,
-    0x02,0x86,0xff,0xff,0x0f,0x09,0x00,0x05,
-    0x01}},
-  {{0x76,0x56,0x56,0x9a,0x5b,0x89,0x28,0x10,
-    0x1c,0x80,0x19,0x19,0x29,0x0b,0x00,0x05,
-    0x00}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11400x1050_2[]=
-{
- {{0xce,0x4f,0x4f,0x92,0x8c,0x1a,0x28,0x9a,
-   0xdb,0x8f,0x8f,0x8f,0x29,0x21,0x00,0x03,
-   0x00}},
- {{0xce,0x4f,0x4f,0x92,0x8c,0x1a,0x28,0x9a,
-   0xc2,0x86,0x5d,0x5d,0x29,0x01,0x00,0x03,
-   0x01}},
- {{0xce,0x4f,0x4f,0x92,0x8c,0x1a,0x28,0x9a,
-   0xdb,0x8f,0x8f,0x8f,0x29,0x21,0x00,0x03,
-   0x00}},
- {{0xce,0x4f,0x4f,0x92,0x8c,0x1a,0x28,0x9a,
-   0xc2,0x86,0x5d,0x5d,0x29,0x01,0x00,0x03,
-   0x00}},
- {{0xce,0x4f,0x4f,0x92,0x8c,0x1a,0x28,0x9e,
-   0x03,0x87,0xdf,0xdf,0x29,0x01,0x00,0x03,
-   0x00}},
- {{0xce,0x63,0x63,0x92,0x96,0x04,0x28,0xd4,
-   0x3f,0x83,0x57,0x57,0x29,0x01,0x00,0x07,
-   0x01}},
- {{0xce,0x7f,0x7f,0x92,0xa4,0x12,0x28,0xd4,
-   0x93,0x87,0xff,0xff,0x29,0x21,0x00,0x07,
-   0x01}},
- {{0xce,0x9f,0x9f,0x92,0xb4,0x02,0x28,0x5a,
-   0x13,0x87,0xff,0xff,0x29,0x29,0x00,0x03,
-   0x01}},
- {{0xce,0xae,0xae,0x92,0xbc,0x0a,0x28,0x10,
-   0x20,0x84,0x19,0x19,0x29,0x0f,0x00,0x03,
-   0x00}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11400x1050_2_H[]=
-{
- {{0xa6,0x27,0x27,0x8a,0x64,0x92,0x28,0x9a,
-   0xdb,0x8f,0x8f,0x8f,0x29,0x21,0x00,0x06,
-   0x00}},
- {{0xa6,0x27,0x27,0x8a,0x64,0x92,0x28,0x9a,
-   0xc2,0x86,0x5d,0x5d,0x29,0x01,0x00,0x06,
-   0x00}},
- {{0xa6,0x27,0x27,0x8a,0x64,0x92,0x28,0x9a,
-   0xdb,0x8f,0x8f,0x8f,0x29,0x21,0x00,0x06,
-   0x00}},
- {{0xa6,0x27,0x27,0x8a,0x64,0x92,0x28,0x9a,
-   0xc2,0x86,0x5d,0x5d,0x29,0x01,0x00,0x06,
-   0x00}},
- {{0xa6,0x27,0x27,0x8a,0x64,0x92,0x28,0x9e,
-   0x03,0x87,0xdf,0xdf,0x29,0x01,0x00,0x06,
-   0x00}},
- {{0x9c,0x31,0x31,0x80,0x64,0x92,0x28,0xd4,
-   0x3f,0x83,0x57,0x57,0x29,0x01,0x00,0x06,
-   0x01}},
- {{0x8e,0x3f,0x3f,0x92,0x64,0x12,0x28,0xd4,
-   0x93,0x87,0xff,0xff,0x29,0x21,0x00,0x06,
-   0x01}},
- {{0x7e,0x4f,0x4f,0x82,0x64,0x12,0x28,0x5a,
-   0x13,0x87,0xff,0xff,0x29,0x29,0x00,0x06,
-   0x01}},
- {{0x76,0x56,0x56,0x9a,0x64,0x92,0x28,0x10,
-   0x20,0x84,0x19,0x19,0x29,0x0f,0x00,0x05,
-   0x00}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11600x1200_1[]=
-{
- {{0x83,0x4F,0x4F,0x87,0x51,0x09,0xC0,0x1F,
-   0x90,0x84,0x8F,0x8F,0xC1,0x30,0x00,0x06,
-   0x00}},
- {{0x83,0x4F,0x4F,0x87,0x51,0x09,0x8E,0x1F,
-   0x5E,0x82,0x5D,0x5D,0x8F,0x10,0x00,0x06,
-   0x00}},
- {{0x83,0x4F,0x4F,0x87,0x51,0x09,0xC0,0x1F,
-   0x90,0x84,0x8F,0x8F,0xC1,0x30,0x00,0x06,
-   0x00}},
- {{0x83,0x4F,0x4F,0x87,0x51,0x09,0x8E,0x1F,
-   0x5E,0x82,0x5D,0x5D,0x8F,0x10,0x00,0x06,
-   0x00}},
- {{0x83,0x4F,0x4F,0x87,0x51,0x09,0x10,0x3E,
-   0xE0,0x84,0xDF,0xDF,0x11,0x00,0x00,0x06,
-   0x00}},
- {{0x97,0x63,0x63,0x9B,0x65,0x1D,0x88,0xF0,
-   0x58,0x8C,0x57,0x57,0x89,0x20,0x00,0x06,
-   0x01}},
- {{0xB3,0x7F,0x7F,0x97,0x81,0x99,0x30,0xF5,
-   0x00,0x84,0xFF,0xFF,0x31,0x10,0x00,0x02,
-   0x01}},
- {{0xD3,0x9F,0x9F,0x97,0xA1,0x19,0x30,0x5A,
-   0x00,0x84,0xFF,0xFF,0x31,0x09,0x00,0x07,
-   0x01}},
- {{0xE2,0xAE,0xAE,0x86,0xB0,0x88,0x4A,0x10,
-   0x1A,0x8E,0x19,0x19,0x4B,0x2F,0x00,0x03,
-   0x00}},
- {{0xFB,0xC7,0xC7,0x9F,0xC9,0x81,0xE0,0x10,
-   0xB0,0x84,0xAF,0xAF,0xE1,0x2F,0x00,0x07,
-   0x00}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11600x1200_1_H[]=
-{
- {{0x69,0x27,0x27,0x8D,0x30,0x88,0xC0,0x1F,
-   0x90,0x84,0x8F,0x8F,0xC1,0x30,0x00,0x01,
-   0x00}},
- {{0x69,0x27,0x27,0x8D,0x30,0x88,0x8E,0x1F,
-   0x5E,0x82,0x5D,0x5D,0x87,0x10,0x00,0x01,
-   0x00}},
- {{0x69,0x27,0x27,0x8D,0x30,0x88,0xC0,0x1F,
-   0x90,0x84,0x8F,0x8F,0xC1,0x30,0x00,0x01,
-   0x00}},
- {{0x69,0x27,0x27,0x8D,0x30,0x88,0x8E,0x1F,
-   0x5E,0x82,0x5D,0x5D,0x87,0x10,0x00,0x01,
-   0x00}},
- {{0x69,0x27,0x27,0x8D,0x30,0x88,0x10,0x3E,
-   0xE0,0x84,0xDF,0xDF,0x11,0x00,0x00,0x01,
-   0x00}},
- {{0x73,0x31,0x31,0x97,0x3A,0x92,0x88,0xF0,
-   0x58,0x8C,0x57,0x57,0x89,0x20,0x00,0x01,
-   0x01}},
- {{0x81,0x3F,0x3F,0x85,0x48,0x00,0x30,0xF5,
-   0x00,0x84,0xFF,0xFF,0x31,0x10,0x00,0x06,
-   0x01}},
- {{0x91,0x4F,0x4F,0x95,0x58,0x10,0x30,0x5A,
-   0x00,0x84,0xFF,0xFF,0x31,0x09,0x00,0x06,
-   0x01}},
- {{0xD4,0x9F,0x9F,0x98,0xA8,0x00,0x30,0x5A,
-   0x00,0x84,0xFF,0xFF,0x31,0x09,0x00,0x03,
-   0x01}},
- {{0xA5,0x63,0x63,0x89,0x6C,0x84,0xE0,0x10,
-   0xB0,0x84,0xAF,0xAF,0xE1,0x2F,0x00,0x02,
-   0x00}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11600x1200_2[]=
-{
- {{0x09,0x4F,0x4F,0x8D,0xA3,0x1B,0xE0,0x9E,
-   0x37,0x8B,0x8F,0x8F,0xE1,0x21,0x01,0x04,
-   0x00}},
- {{0x09,0x4F,0x4F,0x8D,0xA3,0x1B,0xE0,0x9E,
-   0x1E,0x82,0x5D,0x5D,0xE1,0x01,0x01,0x04,
-   0x00}},
- {{0x09,0x4F,0x4F,0x8D,0xA3,0x1B,0xE0,0x9E,
-   0x37,0x8B,0x8F,0x8F,0xE1,0x21,0x01,0x04,
-   0x00}},
- {{0x09,0x4F,0x4F,0x8D,0xA3,0x1B,0xE0,0x9E,
-   0x1E,0x82,0x5D,0x5D,0xE1,0x01,0x01,0x04,
-   0x00}},
- {{0x09,0x4F,0x4F,0x8D,0xA3,0x1B,0xE0,0x9E,
-   0x5F,0x83,0xDF,0xDF,0xE1,0x01,0x01,0x04,
-   0x00}},
- {{0x09,0x63,0x63,0x8D,0xAD,0x05,0xE0,0xD4,
-   0x9B,0x8F,0x57,0x57,0xE1,0x21,0x01,0x00,
-   0x01}},
- {{0x09,0x7F,0x7F,0x8D,0xBB,0x13,0xE0,0xD4,
-   0xEF,0x83,0xFF,0xFF,0xE1,0x21,0x01,0x00,
-   0x01}},
- {{0x09,0x9F,0x9F,0x8D,0xCB,0x03,0xE0,0x5A,
-   0x6F,0x83,0xFF,0xFF,0xE1,0x29,0x01,0x04,
-   0x01}},
- {{0xD4,0x9F,0x9F,0x98,0xA8,0x00,0x30,0x5A,
-   0x00,0x84,0xFF,0xFF,0x31,0x09,0x00,0x03,
-   0x01}},
- {{0x09,0xC7,0xC7,0x8D,0xDF,0x17,0xE0,0x10,
-   0xC7,0x8B,0xAF,0xAF,0xE1,0x0F,0x01,0x04,
-   0x00}}
-};
-
-static const SiS310_LCDACRT1DataStruct  SiS310_LCDACRT11600x1200_2_H[]=
-{
- {{0xE1,0x27,0x27,0x85,0x7B,0x93,0xE0,0x9E,
-   0x37,0x8B,0x8F,0x8F,0xE1,0x21,0x00,0x03,
-   0x00}},
- {{0xE1,0x27,0x27,0x85,0x7B,0x93,0xE0,0x9E,
-   0x1E,0x82,0x5D,0x5D,0xE1,0x01,0x00,0x03,
-   0x00}},
- {{0xE1,0x27,0x27,0x85,0x7B,0x93,0xE0,0x9E,
-   0x37,0x8B,0x8F,0x8F,0xE1,0x21,0x00,0x03,
-   0x00}},
- {{0xE1,0x27,0x27,0x85,0x7B,0x93,0xE0,0x9E,
-   0x1E,0x82,0x5D,0x5D,0xE1,0x01,0x00,0x03,
-   0x00}},
- {{0xE1,0x27,0x27,0x85,0x7B,0x93,0xE0,0x9E,
-   0x5F,0x83,0xDF,0xDF,0xE1,0x01,0x00,0x03,
-   0x00}},
- {{0xD7,0x31,0x31,0x9B,0x7B,0x13,0xE0,0xD4,
-   0x9B,0x8F,0x57,0x57,0xE1,0x21,0x00,0x03,
-   0x01}},
- {{0xC9,0x3F,0x3F,0x8D,0x7B,0x13,0xE0,0xD4,
-   0xEF,0x83,0xFF,0xFF,0xE1,0x21,0x00,0x03,
-   0x01}},
- {{0xB9,0x4F,0x4F,0x9D,0x7B,0x93,0xE0,0x5A,
-   0x6F,0x83,0xFF,0xFF,0xE1,0x29,0x00,0x02,
-   0x01}},
- {{0xD4,0x9F,0x9F,0x98,0xA8,0x00,0x30,0x5A,
-   0x00,0x84,0xFF,0xFF,0x31,0x09,0x00,0x03,
-   0x01}},
- {{0xA5,0x63,0x63,0x89,0x7B,0x93,0xE0,0x10,
-   0xC7,0x8B,0xAF,0xAF,0xE1,0x0F,0x00,0x02,
-   0x00}}
-};
-
+#endif
 
 /**************************************************************/
 /* LVDS, CHRONTEL ------------------------------------------- */
 /**************************************************************/
 
-typedef struct _SiS310_LVDSDataStruct
-{
-	USHORT VGAHT;
-	USHORT VGAVT;
-	USHORT LCDHT;
-	USHORT LCDVT;
-} SiS310_LVDSDataStruct;
-
-static const SiS310_LVDSDataStruct  SiS310_CHTVUPALData[]=
+static const SiS_LVDSDataStruct  SiS310_CHTVUPALData[]=
 {
 	{1008, 625,1008, 625},
 	{1008, 625,1008, 625},
@@ -1697,7 +1011,7 @@
 	{1400,1000,1400,1000}
 };
 
-static const SiS310_LVDSDataStruct  SiS310_CHTVOPALData[]=
+static const SiS_LVDSDataStruct  SiS310_CHTVOPALData[]=
 {
 	{1008, 625,1008, 625},
 	{1008, 625,1008, 625},
@@ -1708,7 +1022,7 @@
         {1400, 875,1400, 875}
 };
 
-static const SiS310_LVDSDataStruct  SiS310_CHTVUPALMData[]=
+static const SiS_LVDSDataStruct  SiS310_CHTVUPALMData[]=
 {
 	{ 840, 600, 840, 600},
 	{ 840, 600, 840, 600},
@@ -1719,7 +1033,7 @@
         {1160, 945,1160, 945}
 };
 
-static const SiS310_LVDSDataStruct  SiS310_CHTVOPALMData[]=
+static const SiS_LVDSDataStruct  SiS310_CHTVOPALMData[]=
 {
 	{ 840, 525, 840, 525},
 	{ 840, 525, 840, 525},
@@ -1730,7 +1044,7 @@
         {1160, 840,1160, 840}
 };
 
-static const SiS310_LVDSDataStruct  SiS310_CHTVUPALNData[]=
+static const SiS_LVDSDataStruct  SiS310_CHTVUPALNData[]=
 {
 	{1008, 625,1008, 625},
 	{1008, 625,1008, 625},
@@ -1741,7 +1055,7 @@
 	{1400,1000,1400,1000}
 };
 
-static const SiS310_LVDSDataStruct  SiS310_CHTVOPALNData[]=
+static const SiS_LVDSDataStruct  SiS310_CHTVOPALNData[]=
 {
 	{1008, 625,1008, 625},
 	{1008, 625,1008, 625},
@@ -1752,7 +1066,7 @@
         {1400, 875,1400, 875}
 };
 
-static const SiS310_LVDSDataStruct  SiS310_CHTVSOPALData[]=   /* TW: (super overscan - no effect on 7019) */
+static const SiS_LVDSDataStruct  SiS310_CHTVSOPALData[]=   /* (super overscan - no effect on 7019) */
 {
 	{1008, 625,1008, 625},
 	{1008, 625,1008, 625},
@@ -1763,13 +1077,8 @@
         {1400, 875,1400, 875}
 };
 
-typedef struct _SiS310_LVDSDesStruct
-{
-	USHORT LCDHDES;
-	USHORT LCDVDES;
-} SiS310_LVDSDesStruct;
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType00_1[]=  /* 800x600 */
+static const SiS_LVDSDesStruct  SiS310_PanelType00_1[]=  /* 800x600 */
 {
 	{ 0, 0},
 	{ 0, 0},
@@ -1782,7 +1091,7 @@
 	{ 0, 0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType01_1[]=  /* 1024x768 */
+static const SiS_LVDSDesStruct  SiS310_PanelType01_1[]=  /* 1024x768 */
 {
 	{ 0, 0},
 	{ 0, 0},
@@ -1795,7 +1104,7 @@
 	{ 0, 0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType02_1[]=  /* 1280x1024 */
+static const SiS_LVDSDesStruct  SiS310_PanelType02_1[]=  /* 1280x1024 */
 {
 	{ 0, 0},
 	{ 0, 0},
@@ -1810,7 +1119,7 @@
 };
 
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType03_1[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType03_1[]=
 {
 	{ 0, 0},
 	{ 0, 0},
@@ -1823,7 +1132,7 @@
 	{ 0, 0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType04_1[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType04_1[]=
 {
 	{1343, 798},
 	{1343, 794},
@@ -1836,7 +1145,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType05_1[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType05_1[]=
 {
 	{1343, 798},
 	{1343, 794},
@@ -1849,7 +1158,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType06_1[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType06_1[]=
 {
 	{1343, 798},
 	{1343, 794},
@@ -1862,7 +1171,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType07_1[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType07_1[]=
 {
 	{1343, 798},
 	{1343, 794},
@@ -1875,7 +1184,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType08_1[]=   /* 1400x1050 */
+static const SiS_LVDSDesStruct  SiS310_PanelType08_1[]=   /* 1400x1050 */
 {
 	{ 0, 0},
 	{ 0, 0},
@@ -1890,7 +1199,7 @@
 	{ 0, 0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType09_1[]=   /* 1280x768 */
+static const SiS_LVDSDesStruct  SiS310_PanelType09_1[]=   /* 1280x768 */
 {
 	{ 0, 0},
 	{ 0, 0},
@@ -1905,7 +1214,7 @@
 	{ 0, 0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0a_1[]=  /* 1600x1200 */
+static const SiS_LVDSDesStruct  SiS310_PanelType0a_1[]=  /* 1600x1200 */
 {
 	{ 0, 0},
 	{ 0, 0},
@@ -1920,7 +1229,7 @@
 	{ 0, 0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0b_1[]=  /* 640x480_2 */
+static const SiS_LVDSDesStruct  SiS310_PanelType0b_1[]=  /* 640x480_2 */
 {
 	{ 0, 524},
 	{ 0, 524},
@@ -1932,7 +1241,7 @@
 	{ 0, 524}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0c_1[]=  /* 640x480_3 */
+static const SiS_LVDSDesStruct  SiS310_PanelType0c_1[]=  /* 640x480_3 */
 {
 	{ 0, 524},
 	{ 0, 524},
@@ -1944,7 +1253,7 @@
 	{ 0, 524}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0d_1[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType0d_1[]=
 {
 	{1343, 798},
 	{1343, 794},
@@ -1957,7 +1266,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0e_1[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType0e_1[]=
 {
 	{1343, 798},
 	{1343, 794},
@@ -1970,7 +1279,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0f_1[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType0f_1[]=
 {
 	{1343, 798},
 	{1343, 794},
@@ -1983,7 +1292,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType00_2[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType00_2[]=
 {
 	{980, 528},
 	{980, 503},
@@ -1996,7 +1305,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType01_2[]= 
+static const SiS_LVDSDesStruct  SiS310_PanelType01_2[]=
 {
 	{1152, 622},
 	{1152, 597},
@@ -2009,7 +1318,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType02_2[]= 
+static const SiS_LVDSDesStruct  SiS310_PanelType02_2[]=
 {
 	{1368, 754},
 	{1368, 729},
@@ -2024,7 +1333,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType03_2[]=  
+static const SiS_LVDSDesStruct  SiS310_PanelType03_2[]=
 {
 	{ 0,   0},
 	{ 0,   0},
@@ -2035,7 +1344,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType04_2[]=  
+static const SiS_LVDSDesStruct  SiS310_PanelType04_2[]=
 {
 	{ 0,   0},
 	{ 0,   0},
@@ -2048,7 +1357,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType05_2[]=  
+static const SiS_LVDSDesStruct  SiS310_PanelType05_2[]=
 {
 	{1152, 622},
 	{1152, 597},
@@ -2061,7 +1370,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType06_2[]=  
+static const SiS_LVDSDesStruct  SiS310_PanelType06_2[]=
 {
 	{1152, 622},
 	{1152, 597},
@@ -2074,7 +1383,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType07_2[]=  
+static const SiS_LVDSDesStruct  SiS310_PanelType07_2[]=
 {
 	{1152, 622},
 	{1152, 597},
@@ -2087,7 +1396,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType08_2[]=  /* 1400x1050 */
+static const SiS_LVDSDesStruct  SiS310_PanelType08_2[]=  /* 1400x1050 */
 {
 	{1308, 741},
 	{1308, 716},
@@ -2102,7 +1411,7 @@
 	{   0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType09_2[]= /* 1280x768 */
+static const SiS_LVDSDesStruct  SiS310_PanelType09_2[]= /* 1280x768 */
 {
 	{1083, 622},
 	{1083, 597},
@@ -2115,7 +1424,7 @@
 	{   0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0a_2[]=  /* 1600x1200 */
+static const SiS_LVDSDesStruct  SiS310_PanelType0a_2[]=  /* 1600x1200 */
 {
 	{1568, 920},
 	{1568, 895},
@@ -2141,7 +1450,7 @@
 #endif
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0b_2[]=  /* 640x480_2 */
+static const SiS_LVDSDesStruct  SiS310_PanelType0b_2[]=  /* 640x480_2 */
 {
 	{1152, 622},
 	{1152, 597},
@@ -2154,7 +1463,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0c_2[]=  /* 640x480_3 */
+static const SiS_LVDSDesStruct  SiS310_PanelType0c_2[]=  /* 640x480_3 */
 {
 	{1152, 622},
 	{1152, 597},
@@ -2167,7 +1476,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0d_2[]=  
+static const SiS_LVDSDesStruct  SiS310_PanelType0d_2[]=
 {
 	{1152, 622},
 	{1152, 597},
@@ -2180,7 +1489,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0e_2[]=
+static const SiS_LVDSDesStruct  SiS310_PanelType0e_2[]=
 {
 	{1152, 622},
 	{1152, 597},
@@ -2193,7 +1502,7 @@
 	{ 0,   0}
 };
 
-static const SiS310_LVDSDesStruct  SiS310_PanelType0f_2[] =
+static const SiS_LVDSDesStruct  SiS310_PanelType0f_2[] =
 {
 	{1152, 622},
 	{1152, 597},
@@ -2206,14 +1515,37 @@
 	{ 0,   0}
 };
 
-/* CRT1 CRTC for SlaveModes and LCDA */
+static const SiS_LVDSDesStruct  SiS310_PanelTypeNS_1[]=
+{
+	{ 8,   0},
+	{ 8,   0},
+	{ 8,   0},
+	{ 8,   0},
+	{ 8,   0},
+	{ 0,   0},
+	{ 0,   0},
+	{ 0,   0},
+	{ 0, 806},
+	{ 0,   0}
+};
 
-typedef struct _SiS310_LVDSCRT1DataStruct
+static const SiS_LVDSDesStruct  SiS310_PanelTypeNS_2[] =
 {
- 	UCHAR CR[15];
-} SiS310_LVDSCRT1DataStruct;
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0},
+	{ 0 , 0}
+};
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT1800x600_1[] =
+/* CRT1 CRTC for SlaveModes and LCDA */
+
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT1800x600_1[] =
 {
  {{0x6b,0x4f,0x8f,0x55,0x85,0xaa,0x1f,
    0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
@@ -2235,7 +1567,7 @@
    0x01 }}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT1800x600_1_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT1800x600_1_H[] =
 {
  {{0x43,0x27,0x87,0x2d,0x1d,0xaa,0x1f,
    0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
@@ -2257,7 +1589,7 @@
    0x01 }}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT1800x600_2[]=
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT1800x600_2[]=
 {
  {{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
    0xff,0x84,0x8f,0x73,0x00,0x00,0x06,
@@ -2279,7 +1611,7 @@
    0x01 }}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT1800x600_2_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT1800x600_2_H[] =
 {
  {{0x57,0x27,0x9b,0x3a,0x0a,0x72,0x3e,
    0xff,0x84,0x8f,0x73,0x00,0x00,0x01,
@@ -2301,7 +1633,7 @@
    0x01 }}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11024x768_1[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11024x768_1[] =
 {
  {{0x73,0x4f,0x97,0x53,0x84,0xb4,0x1f,
    0x92,0x89,0x8f,0xb5,0x30,0x00,0x05,
@@ -2326,7 +1658,7 @@
    0x01}}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11024x768_1_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11024x768_1_H[] =
 {
  {{0x4b,0x27,0x8f,0x2b,0x1c,0xb4,0x1f,
    0x92,0x89,0x8f,0xb5,0x30,0x00,0x05,
@@ -2351,7 +1683,7 @@
    0x01 }}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11024x768_2[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11024x768_2[] =
 {
  {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
    0x57,0x8e,0x8f,0x25,0x30,0x00,0x06,
@@ -2376,7 +1708,7 @@
    0x01 }}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11024x768_2_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11024x768_2_H[] =
 {
  {{0x7b,0x27,0x9f,0x46,0x97,0x24,0xbb,
    0x57,0x8e,0x8f,0x25,0x30,0x00,0x01,
@@ -2401,7 +1733,7 @@
    0x01 }}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11280x1024_1[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11280x1024_1[] =
 {
  {{0x7e,0x4f,0x82,0x58,0x04,0xb8,0x1f,
    0x90,0x84,0x8f,0xb9,0x30,0x00,0x06,
@@ -2429,7 +1761,7 @@
    0x01}}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11280x1024_1_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11280x1024_1_H[] =
 {
  {{0x56,0x27,0x9a,0x31,0x1c,0xb8,0x1f,
    0x90,0x84,0x8f,0xb9,0x30,0x00,0x05,
@@ -2454,7 +1786,7 @@
    0x01}}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11280x1024_2[] =  
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11280x1024_2[] =
 {
  {{0xce,0x72,0x91,0x81,0x8f,0x28,0x92,
    0xc8,0x8c,0x5d,0x5c,0x01,0x00,0x02,
@@ -2482,7 +1814,7 @@
    0x01}}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11280x1024_2_H[] = 
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11280x1024_2_H[] =
 {
  {{0xa6,0x4a,0x89,0x59,0x07,0x28,0x92,
    0xc8,0x8c,0x5d,0x5c,0x01,0x00,0x06,
@@ -2507,7 +1839,7 @@
    0x01}}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11400x1050_1[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11400x1050_1[] =
 {
   {{0x6f,0x4f,0x93,0x54,0x82,0x9e,0x1f,
     0x8f,0x81,0x8f,0x9f,0x30,0x00,0x05,
@@ -2567,7 +1899,7 @@
 #endif   
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11400x1050_1_H[] = 
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11400x1050_1_H[] =
 {
  {{0x47,0x27,0x8b,0x2c,0x1a,0x9e,0x1f,
    0x8f,0x81,0x8f,0x9f,0x30,0x00,0x05,
@@ -2627,7 +1959,7 @@
 #endif   
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11400x1050_2[] =  
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11400x1050_2[] =
 {
  {{0xce,0x72,0x91,0x84,0x92,0x28,0x92,
    0xd7,0x8b,0x5d,0x5c,0x21,0x00,0x02,
@@ -2687,7 +2019,7 @@
 #endif   
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11400x1050_2_H[] =  
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11400x1050_2_H[] =
 {
  {{0xa6,0x4a,0x89,0x5c,0x0a,0x28,0x92,
    0xd7,0x8b,0x5d,0x5c,0x21,0x00,0x06,
@@ -2747,7 +2079,7 @@
 #endif   
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11600x1200_1[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11600x1200_1[] =
 {
  {{0x83,0x4F,0x87,0x5B,0x13,0x06,0x3E,
    0xB3,0x86,0x8F,0x07,0x20,0x00,0x06,
@@ -2813,7 +2145,7 @@
 #endif
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11600x1200_1_H[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11600x1200_1_H[] =
 {
  {{0x5B,0x27,0x9F,0x33,0x0B,0x06,0x2E,
    0xB3,0x86,0x8F,0x07,0x20,0x00,0x01,
@@ -2879,7 +2211,7 @@
 #endif
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11600x1200_2[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11600x1200_2[] =
 {
  {{0xFB,0x87,0x86,0x97,0x0F,0x26,0x97,
    0x43,0x86,0xDB,0xDA,0x11,0x00,0x07,
@@ -2945,7 +2277,7 @@
 #endif
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_LVDSCRT11600x1200_2_H[] = 
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT11600x1200_2_H[] =
 {
  {{0xD3,0x5F,0x9E,0x6F,0x07,0x26,0x97,
    0x43,0x86,0xDB,0xDA,0x11,0x00,0x02,
@@ -3011,9 +2343,66 @@
 #endif
 };
 
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT1XXXxXXX_1[] =
+{
+ {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
+   0x00}},
+ {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
+   0x00}},
+ {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
+   0x00}},
+ {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
+   0x00}},
+ {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
+   0xe9,0x8b,0xe7,0x04,0x00,0x00,0x05,
+   0x00}},
+ {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
+   0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
+   0x01}},
+ {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
+   0x02,0x88,0xff,0x25,0x10,0x00,0x02,
+   0x01}},
+ {{0xce,0x9f,0x92,0xa8,0x14,0x28,0x5a,
+   0x00,0x84,0xff,0x29,0x09,0x00,0x07,
+   0x01}},
+ {{0xce,0x9f,0x92,0xa9,0x17,0x24,0xf5,
+   0x02,0x88,0xff,0x25,0x10,0x00,0x07,
+   0x01}}
+};
+
+static const SiS_LVDSCRT1DataStruct  SiS310_LVDSCRT1XXXxXXX_1_H[] =
+{
+ {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
+   0x00}},
+ {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
+   0x00}},
+ {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
+   0x00}},
+ {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
+   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
+   0x00}},
+ {{0x38,0x27,0x9c,0x2c,0x80,0x0b,0x3e,
+   0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
+   0x00}},
+ {{0x4d,0x31,0x91,0x3b,0x03,0x72,0xf0,
+   0x58,0x8c,0x57,0x73,0x20,0x00,0x01,
+   0x01}},
+ {{0x63,0x3f,0x87,0x4a,0x92,0x24,0xf5,
+   0x02,0x88,0xff,0x25,0x10,0x00,0x01,
+   0x01}}
+};
+
+
 /* CRT1 CRTC for Chrontel TV slave modes */
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_CHTVCRT1UNTSC[] =  
+static const SiS_LVDSCRT1DataStruct  SiS310_CHTVCRT1UNTSC[] =
 { 
  {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
    0xe8,0x84,0x8f,0x57,0x20,0x00,0x01,
@@ -3038,7 +2427,7 @@
    0x01}}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_CHTVCRT1ONTSC[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_CHTVCRT1ONTSC[] =
 {
  {{0x63,0x4f,0x87,0x5a,0x9f,0x0b,0x3e,
    0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01,
@@ -3063,7 +2452,7 @@
    0x01 }}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_CHTVCRT1UPAL[] =    
+static const SiS_LVDSCRT1DataStruct  SiS310_CHTVCRT1UPAL[] =
 { 
  {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
    0xf8,0x83,0x8f,0x70,0x20,0x00,0x05,
@@ -3088,7 +2477,7 @@
    0x01}}
 };
 
-static const SiS310_LVDSCRT1DataStruct  SiS310_CHTVCRT1OPAL[] =
+static const SiS_LVDSCRT1DataStruct  SiS310_CHTVCRT1OPAL[] =
 {
  {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
    0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
@@ -3113,12 +2502,8 @@
    0x01 }}
 };
 
-typedef struct _SiS310_CHTVRegDataStruct
-{
- 	UCHAR Reg[16];
-} SiS310_CHTVRegDataStruct;
 
-static const SiS310_CHTVRegDataStruct SiS310_CHTVReg_UNTSC[] =
+static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UNTSC[] =
 {
  {{0x4a,0x77,0xbb,0x94,0x84,0x48,0xfe,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
  {{0x4a,0x77,0xbb,0x94,0x84,0x48,0xfe,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
@@ -3138,7 +2523,7 @@
       for PAL-M and PAL-N all above is corrected.
     */
 
-static const SiS310_CHTVRegDataStruct SiS310_CHTVReg_ONTSC[] =
+static const SiS_CHTVRegDataStruct SiS310_CHTVReg_ONTSC[] =
 {
  {{0x49,0x77,0xbb,0x7b,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
  {{0x49,0x77,0xbb,0x7b,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
@@ -3149,7 +2534,7 @@
  {{0xed,0x77,0xbb,0x66,0x8c,0x21,0x02,0x5a,0x04,0x00,0x80,0x1f,0x9f,0xc1,0x0c,0x00}}
 };
 
-static const SiS310_CHTVRegDataStruct SiS310_CHTVReg_UPAL[] =
+static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPAL[] =
 {
  {{0x41,0x7f,0xb7,0x34,0xad,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
  {{0x41,0x7f,0xb7,0x80,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
@@ -3160,7 +2545,7 @@
  {{0xe5,0x7f,0xb7,0x1d,0xa7,0x3e,0x04,0x5a,0x05,0x00,0x80,0x20,0x3e,0xe4,0x22,0x00}}
 };
 
-static const SiS310_CHTVRegDataStruct SiS310_CHTVReg_OPAL[] =
+static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPAL[] =
 {
  {{0x41,0x7f,0xb7,0x36,0xad,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
  {{0x41,0x7f,0xb7,0x86,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
@@ -3171,7 +2556,7 @@
  {{0xe4,0x7f,0xb7,0x1e,0xaf,0x29,0x37,0x5a,0x05,0x00,0x80,0x25,0x8c,0xb2,0x2a,0x00}}
 };
 
-static const SiS310_CHTVRegDataStruct SiS310_CHTVReg_UPALM[] =
+static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPALM[] =
 {
  {{0x52,0x77,0xbb,0x94,0x84,0x48,0xfe,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
  {{0x52,0x77,0xbb,0x94,0x84,0x48,0xfe,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
@@ -3187,7 +2572,7 @@
 #endif
 };
 
-static const SiS310_CHTVRegDataStruct SiS310_CHTVReg_OPALM[] =
+static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPALM[] =
 {
  {{0x51,0x77,0xbb,0x7b,0x84,0x34,0x00,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
  {{0x51,0x77,0xbb,0x7b,0x84,0x34,0x00,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
@@ -3203,7 +2588,7 @@
 #endif
 };
 
-static const SiS310_CHTVRegDataStruct SiS310_CHTVReg_UPALN[] =
+static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPALN[] =
 {
  {{0x41,0x7f,0xb7,0x34,0xad,0x50,0x34,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}},
  {{0x41,0x7f,0xb7,0x80,0x85,0x50,0x00,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}},
@@ -3219,7 +2604,7 @@
 #endif
 };
 
-static const SiS310_CHTVRegDataStruct SiS310_CHTVReg_OPALN[] =
+static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPALN[] =
 {
  {{0x41,0x7f,0xb7,0x36,0xad,0x50,0x34,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}},
  {{0x41,0x7f,0xb7,0x86,0x85,0x50,0x00,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}},
--- diff/drivers/video/sis/init.c	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/init.c	2004-07-01 21:32:47.000000000 +0100
@@ -1,8 +1,9 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * Mode initializing code (CRT1 section) for
  * for SiS 300/305/540/630/730 and
- *     SiS 315/550/650/M650/651/661FX/M661FX/740/741/M741/330/660/M660/760/M760
+ *     SiS 315/550/650/M650/651/661FX/M661FX/740/741(GX)/M741/330/660/M660/760/M760
  * (Universal module for Linux kernel framebuffer and XFree86 4.x)
  *
  * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
@@ -34,13 +35,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -78,13 +76,13 @@
 
 #if defined(ALLOC_PRAGMA)
 #pragma alloc_text(PAGE,SiSSetMode)
-#pragma alloc_text(PAGE,SiSInit)
 #endif
 
 /*********************************************/
 /*         POINTER INITIALIZATION            */
 /*********************************************/
 
+#if defined(SIS300) || defined(SIS315H)
 static void
 InitCommonPointer(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
@@ -134,16 +132,17 @@
    SiS_Pr->pSiS_OutputSelect = &SiS_OutputSelect;
    SiS_Pr->pSiS_SoftSetting  = &SiS_SoftSetting;
 
+   SiS_Pr->SiS_LCD1280x720Data      = SiS_LCD1280x720Data;
+   SiS_Pr->SiS_StLCD1280x768_2Data  = SiS_StLCD1280x768_2Data;
+   SiS_Pr->SiS_ExtLCD1280x768_2Data = SiS_ExtLCD1280x768_2Data;
+   SiS_Pr->SiS_LCD1280x768_3Data    = SiS_LCD1280x768_3Data;
+   SiS_Pr->SiS_LCD1280x800Data      = SiS_LCD1280x800Data;
    SiS_Pr->SiS_LCD1280x960Data      = SiS_LCD1280x960Data;
-   SiS_Pr->SiS_ExtLCD1400x1050Data  = SiS_ExtLCD1400x1050Data;
-   SiS_Pr->SiS_ExtLCD1600x1200Data  = SiS_ExtLCD1600x1200Data;
    SiS_Pr->SiS_StLCD1400x1050Data   = SiS_StLCD1400x1050Data;
+   SiS_Pr->SiS_ExtLCD1400x1050Data  = SiS_ExtLCD1400x1050Data;
+   SiS_Pr->SiS_LCD1680x1050Data     = SiS_LCD1680x1050Data;
    SiS_Pr->SiS_StLCD1600x1200Data   = SiS_StLCD1600x1200Data;
-   SiS_Pr->SiS_NoScaleData1400x1050 = SiS_NoScaleData1400x1050;
-   SiS_Pr->SiS_NoScaleData1600x1200 = SiS_NoScaleData1600x1200;
-   SiS_Pr->SiS_ExtLCD1280x768Data   = SiS_ExtLCD1280x768Data;
-   SiS_Pr->SiS_StLCD1280x768Data    = SiS_StLCD1280x768Data;
-   SiS_Pr->SiS_NoScaleData1280x768  = SiS_NoScaleData1280x768;
+   SiS_Pr->SiS_ExtLCD1600x1200Data  = SiS_ExtLCD1600x1200Data;
    SiS_Pr->SiS_NoScaleData          = SiS_NoScaleData;
 
    SiS_Pr->SiS_LVDS320x480Data_1   = SiS_LVDS320x480Data_1;
@@ -172,41 +171,12 @@
    SiS_Pr->SiS_LVDS640x480Data_1   = SiS_LVDS640x480Data_1;
    SiS_Pr->SiS_LVDS640x480Data_2   = SiS_LVDS640x480Data_2;
 
-   SiS_Pr->SiS_LVDSBARCO1366Data_1 = SiS_LVDSBARCO1366Data_1;
-   SiS_Pr->SiS_LVDSBARCO1366Data_2 = SiS_LVDSBARCO1366Data_2;
-   SiS_Pr->SiS_LVDSBARCO1024Data_1 = SiS_LVDSBARCO1024Data_1;
-   SiS_Pr->SiS_LVDSBARCO1024Data_2 = SiS_LVDSBARCO1024Data_2;
    SiS_Pr->SiS_LVDS848x480Data_1   = SiS_LVDS848x480Data_1;
    SiS_Pr->SiS_LVDS848x480Data_2   = SiS_LVDS848x480Data_2;
-
-   SiS_Pr->SiS_CHTVUNTSCData = SiS_CHTVUNTSCData;
-   SiS_Pr->SiS_CHTVONTSCData = SiS_CHTVONTSCData;
-
-   SiS_Pr->SiS_LCDA1024x768Data_1  = SiS_LCDA1024x768Data_1;
-   SiS_Pr->SiS_LCDA1024x768Data_2  = SiS_LCDA1024x768Data_2;
-   SiS_Pr->SiS_LCDA1280x1024Data_1 = SiS_LCDA1280x1024Data_1;
-   SiS_Pr->SiS_LCDA1280x1024Data_2 = SiS_LCDA1280x1024Data_2;
-   SiS_Pr->SiS_LCDA1400x1050Data_1 = SiS_LCDA1400x1050Data_1;
-   SiS_Pr->SiS_LCDA1400x1050Data_2 = SiS_LCDA1400x1050Data_2;
-   SiS_Pr->SiS_LCDA1600x1200Data_1 = SiS_LCDA1600x1200Data_1;
-   SiS_Pr->SiS_LCDA1600x1200Data_2 = SiS_LCDA1600x1200Data_2;
-
-   SiS_Pr->LVDS1024x768Des_1  = SiS_PanelType1076_1;
-   SiS_Pr->LVDS1280x1024Des_1 = SiS_PanelType1210_1;
-   SiS_Pr->LVDS1400x1050Des_1 = SiS_PanelType1296_1;
-   SiS_Pr->LVDS1600x1200Des_1 = SiS_PanelType1600_1;
-   SiS_Pr->LVDS1024x768Des_2  = SiS_PanelType1076_2;
-   SiS_Pr->LVDS1280x1024Des_2 = SiS_PanelType1210_2;
-   SiS_Pr->LVDS1400x1050Des_2 = SiS_PanelType1296_2;
-   SiS_Pr->LVDS1600x1200Des_2 = SiS_PanelType1600_2;
-
-   SiS_Pr->SiS_PanelTypeNS_1 = SiS_PanelTypeNS_1;
-   SiS_Pr->SiS_PanelTypeNS_2 = SiS_PanelTypeNS_2;
-
-   SiS_Pr->SiS_CHTVUNTSCDesData = SiS_CHTVUNTSCDesData;
-   SiS_Pr->SiS_CHTVONTSCDesData = SiS_CHTVONTSCDesData;
-   SiS_Pr->SiS_CHTVUPALDesData  = SiS_CHTVUPALDesData;
-   SiS_Pr->SiS_CHTVOPALDesData  = SiS_CHTVOPALDesData;
+   SiS_Pr->SiS_LVDSBARCO1024Data_1 = SiS_LVDSBARCO1024Data_1;
+   SiS_Pr->SiS_LVDSBARCO1024Data_2 = SiS_LVDSBARCO1024Data_2;
+   SiS_Pr->SiS_LVDSBARCO1366Data_1 = SiS_LVDSBARCO1366Data_1;
+   SiS_Pr->SiS_LVDSBARCO1366Data_2 = SiS_LVDSBARCO1366Data_2;
 
    SiS_Pr->SiS_LVDSCRT11280x768_1    = SiS_LVDSCRT11280x768_1;
    SiS_Pr->SiS_LVDSCRT11024x600_1    = SiS_LVDSCRT11024x600_1;
@@ -221,15 +191,25 @@
    SiS_Pr->SiS_LVDSCRT11024x600_2_H  = SiS_LVDSCRT11024x600_2_H;
    SiS_Pr->SiS_LVDSCRT11152x768_2_H  = SiS_LVDSCRT11152x768_2_H;
    SiS_Pr->SiS_LVDSCRT1320x480_1     = SiS_LVDSCRT1320x480_1;
-   SiS_Pr->SiS_LVDSCRT1XXXxXXX_1     = SiS_LVDSCRT1XXXxXXX_1;
-   SiS_Pr->SiS_LVDSCRT1XXXxXXX_1_H   = SiS_LVDSCRT1XXXxXXX_1_H;
    SiS_Pr->SiS_LVDSCRT1640x480_1     = SiS_LVDSCRT1640x480_1;
    SiS_Pr->SiS_LVDSCRT1640x480_1_H   = SiS_LVDSCRT1640x480_1_H;
    SiS_Pr->SiS_LVDSCRT1640x480_2     = SiS_LVDSCRT1640x480_2;
    SiS_Pr->SiS_LVDSCRT1640x480_2_H   = SiS_LVDSCRT1640x480_2_H;
    SiS_Pr->SiS_LVDSCRT1640x480_3     = SiS_LVDSCRT1640x480_3;
    SiS_Pr->SiS_LVDSCRT1640x480_3_H   = SiS_LVDSCRT1640x480_3_H;
+
+   SiS_Pr->SiS_CHTVUNTSCData = SiS_CHTVUNTSCData;
+   SiS_Pr->SiS_CHTVONTSCData = SiS_CHTVONTSCData;
+
+   SiS_Pr->SiS_CHTVUNTSCDesData = SiS_CHTVUNTSCDesData;
+   SiS_Pr->SiS_CHTVONTSCDesData = SiS_CHTVONTSCDesData;
+   SiS_Pr->SiS_CHTVUPALDesData  = SiS_CHTVUPALDesData;
+   SiS_Pr->SiS_CHTVOPALDesData  = SiS_CHTVOPALDesData;
+
+   SiS_Pr->SiS_PanelMinLVDS   = Panel_800x600;    /* lowest value LVDS/LCDA */
+   SiS_Pr->SiS_PanelMin301    = Panel_1024x768;   /* lowest value 301 */
 }
+#endif
 
 #ifdef SIS300
 static void
@@ -265,19 +245,18 @@
    SiS_StandTable[0x1c].CRTC[4] = 0x54;
    SiS_StandTable[0x1c].CRTC[5] = 0x80;
 
-   SiS_Pr->SiS_SModeIDTable  = (SiS_StStruct *)SiS300_SModeIDTable;
-   SiS_Pr->SiS_VBModeIDTable = (SiS_VBModeStruct *)SiS300_VBModeIDTable;
-   SiS_Pr->SiS_EModeIDTable  = (SiS_ExtStruct *)SiS300_EModeIDTable;
-   SiS_Pr->SiS_RefIndex      = (SiS_Ext2Struct *)SiS300_RefIndex;
-   SiS_Pr->SiS_CRT1Table     = (SiS_CRT1TableStruct *)SiS300_CRT1Table;
+   SiS_Pr->SiS_SModeIDTable  = SiS300_SModeIDTable;
+   SiS_Pr->SiS_VBModeIDTable = SiS300_VBModeIDTable;
+   SiS_Pr->SiS_EModeIDTable  = SiS300_EModeIDTable;
+   SiS_Pr->SiS_RefIndex      = SiS300_RefIndex;
+   SiS_Pr->SiS_CRT1Table     = SiS300_CRT1Table;
    if(HwInfo->jChipType == SIS_300) {
-      SiS_Pr->SiS_MCLKData_0    = (SiS_MCLKDataStruct *)SiS300_MCLKData_300; /* 300 */
+      SiS_Pr->SiS_MCLKData_0    = SiS300_MCLKData_300; /* 300 */
    } else {
-      SiS_Pr->SiS_MCLKData_0    = (SiS_MCLKDataStruct *)SiS300_MCLKData_630; /* 630, 730 */
+      SiS_Pr->SiS_MCLKData_0    = SiS300_MCLKData_630; /* 630, 730 */
    }
-   SiS_Pr->SiS_VCLKData      = (SiS_VCLKDataStruct *)SiS300_VCLKData;
+   SiS_Pr->SiS_VCLKData      = SiS300_VCLKData;
    SiS_Pr->SiS_VBVCLKData    = (SiS_VBVCLKDataStruct *)SiS300_VCLKData;
-   SiS_Pr->SiS_ScreenOffset  = SiS300_ScreenOffset;
 
    SiS_Pr->SiS_SR15  = SiS300_SR15;
 
@@ -306,97 +285,102 @@
    SiS_Pr->pSiS_YCSenseData2    = &SiS300_YCSenseData2;
 #endif
 
-   SiS_Pr->SiS_StLCD1024x768Data    = (SiS_LCDDataStruct *)SiS300_StLCD1024x768Data;
-   SiS_Pr->SiS_ExtLCD1024x768Data   = (SiS_LCDDataStruct *)SiS300_ExtLCD1024x768Data;
-   SiS_Pr->SiS_St2LCD1024x768Data   = (SiS_LCDDataStruct *)SiS300_St2LCD1024x768Data;
-   SiS_Pr->SiS_StLCD1280x1024Data   = (SiS_LCDDataStruct *)SiS300_StLCD1280x1024Data;
-   SiS_Pr->SiS_ExtLCD1280x1024Data  = (SiS_LCDDataStruct *)SiS300_ExtLCD1280x1024Data;
-   SiS_Pr->SiS_St2LCD1280x1024Data  = (SiS_LCDDataStruct *)SiS300_St2LCD1280x1024Data;
-   SiS_Pr->SiS_NoScaleData1024x768  = (SiS_LCDDataStruct *)SiS300_NoScaleData1024x768;
-   SiS_Pr->SiS_NoScaleData1280x1024 = (SiS_LCDDataStruct *)SiS300_NoScaleData1280x1024;
-
-   SiS_Pr->SiS_PanelDelayTbl     = (SiS_PanelDelayTblStruct *)SiS300_PanelDelayTbl;
-   SiS_Pr->SiS_PanelDelayTblLVDS = (SiS_PanelDelayTblStruct *)SiS300_PanelDelayTbl;
-#if 0
-   SiS_Pr->SiS_PanelDelayTblLVDS = (SiS_PanelDelayTblStruct *)SiS300_PanelDelayTblLVDS;
-#endif
+   SiS_Pr->SiS_PanelDelayTbl     = SiS300_PanelDelayTbl;
+   SiS_Pr->SiS_PanelDelayTblLVDS = SiS300_PanelDelayTbl;
 
-   SiS_Pr->SiS_CHTVUPALData  = (SiS_LVDSDataStruct *)SiS300_CHTVUPALData;
-   SiS_Pr->SiS_CHTVOPALData  = (SiS_LVDSDataStruct *)SiS300_CHTVOPALData;
-   SiS_Pr->SiS_CHTVUPALMData = SiS_CHTVUNTSCData; 			   /* not supported on 300 series */
-   SiS_Pr->SiS_CHTVOPALMData = SiS_CHTVONTSCData; 			   /* not supported on 300 series */
-   SiS_Pr->SiS_CHTVUPALNData = (SiS_LVDSDataStruct *)SiS300_CHTVUPALData;  /* not supported on 300 series */
-   SiS_Pr->SiS_CHTVOPALNData = (SiS_LVDSDataStruct *)SiS300_CHTVOPALData;  /* not supported on 300 series */
-   SiS_Pr->SiS_CHTVSOPALData = (SiS_LVDSDataStruct *)SiS300_CHTVSOPALData;
-
-   SiS_Pr->SiS_PanelType00_1 = (SiS_LVDSDesStruct *)SiS300_PanelType00_1;
-   SiS_Pr->SiS_PanelType01_1 = (SiS_LVDSDesStruct *)SiS300_PanelType01_1;
-   SiS_Pr->SiS_PanelType02_1 = (SiS_LVDSDesStruct *)SiS300_PanelType02_1;
-   SiS_Pr->SiS_PanelType03_1 = (SiS_LVDSDesStruct *)SiS300_PanelType03_1;
-   SiS_Pr->SiS_PanelType04_1 = (SiS_LVDSDesStruct *)SiS300_PanelType04_1;
-   SiS_Pr->SiS_PanelType05_1 = (SiS_LVDSDesStruct *)SiS300_PanelType05_1;
-   SiS_Pr->SiS_PanelType06_1 = (SiS_LVDSDesStruct *)SiS300_PanelType06_1;
-   SiS_Pr->SiS_PanelType07_1 = (SiS_LVDSDesStruct *)SiS300_PanelType07_1;
-   SiS_Pr->SiS_PanelType08_1 = (SiS_LVDSDesStruct *)SiS300_PanelType08_1;
-   SiS_Pr->SiS_PanelType09_1 = (SiS_LVDSDesStruct *)SiS300_PanelType09_1;
-   SiS_Pr->SiS_PanelType0a_1 = (SiS_LVDSDesStruct *)SiS300_PanelType0a_1;
-   SiS_Pr->SiS_PanelType0b_1 = (SiS_LVDSDesStruct *)SiS300_PanelType0b_1;
-   SiS_Pr->SiS_PanelType0c_1 = (SiS_LVDSDesStruct *)SiS300_PanelType0c_1;
-   SiS_Pr->SiS_PanelType0d_1 = (SiS_LVDSDesStruct *)SiS300_PanelType0d_1;
-   SiS_Pr->SiS_PanelType0e_1 = (SiS_LVDSDesStruct *)SiS300_PanelType0e_1;
-   SiS_Pr->SiS_PanelType0f_1 = (SiS_LVDSDesStruct *)SiS300_PanelType0f_1;
-   SiS_Pr->SiS_PanelType00_2 = (SiS_LVDSDesStruct *)SiS300_PanelType00_2;
-   SiS_Pr->SiS_PanelType01_2 = (SiS_LVDSDesStruct *)SiS300_PanelType01_2;
-   SiS_Pr->SiS_PanelType02_2 = (SiS_LVDSDesStruct *)SiS300_PanelType02_2;
-   SiS_Pr->SiS_PanelType03_2 = (SiS_LVDSDesStruct *)SiS300_PanelType03_2;
-   SiS_Pr->SiS_PanelType04_2 = (SiS_LVDSDesStruct *)SiS300_PanelType04_2;
-   SiS_Pr->SiS_PanelType05_2 = (SiS_LVDSDesStruct *)SiS300_PanelType05_2;
-   SiS_Pr->SiS_PanelType06_2 = (SiS_LVDSDesStruct *)SiS300_PanelType06_2;
-   SiS_Pr->SiS_PanelType07_2 = (SiS_LVDSDesStruct *)SiS300_PanelType07_2;
-   SiS_Pr->SiS_PanelType08_2 = (SiS_LVDSDesStruct *)SiS300_PanelType08_2;
-   SiS_Pr->SiS_PanelType09_2 = (SiS_LVDSDesStruct *)SiS300_PanelType09_2;
-   SiS_Pr->SiS_PanelType0a_2 = (SiS_LVDSDesStruct *)SiS300_PanelType0a_2;
-   SiS_Pr->SiS_PanelType0b_2 = (SiS_LVDSDesStruct *)SiS300_PanelType0b_2;
-   SiS_Pr->SiS_PanelType0c_2 = (SiS_LVDSDesStruct *)SiS300_PanelType0c_2;
-   SiS_Pr->SiS_PanelType0d_2 = (SiS_LVDSDesStruct *)SiS300_PanelType0d_2;
-   SiS_Pr->SiS_PanelType0e_2 = (SiS_LVDSDesStruct *)SiS300_PanelType0e_2;
-   SiS_Pr->SiS_PanelType0f_2 = (SiS_LVDSDesStruct *)SiS300_PanelType0f_2;
+   SiS_Pr->SiS_ExtLCD1024x768Data   = SiS300_ExtLCD1024x768Data;
+   SiS_Pr->SiS_St2LCD1024x768Data   = SiS300_St2LCD1024x768Data;
+   SiS_Pr->SiS_ExtLCD1280x1024Data  = SiS300_ExtLCD1280x1024Data;
+   SiS_Pr->SiS_St2LCD1280x1024Data  = SiS300_St2LCD1280x1024Data;
+
+   SiS_Pr->SiS_CRT2Part2_1024x768_1  = SiS300_CRT2Part2_1024x768_1;
+   SiS_Pr->SiS_CRT2Part2_1280x1024_1 = SiS300_CRT2Part2_1280x1024_1;
+   SiS_Pr->SiS_CRT2Part2_1024x768_2  = SiS300_CRT2Part2_1024x768_2;
+   SiS_Pr->SiS_CRT2Part2_1280x1024_2 = SiS300_CRT2Part2_1280x1024_2;
+   SiS_Pr->SiS_CRT2Part2_1024x768_3  = SiS300_CRT2Part2_1024x768_3;
+   SiS_Pr->SiS_CRT2Part2_1280x1024_3 = SiS300_CRT2Part2_1280x1024_3;
+
+   SiS_Pr->SiS_CHTVUPALData  = SiS300_CHTVUPALData;
+   SiS_Pr->SiS_CHTVOPALData  = SiS300_CHTVOPALData;
+   SiS_Pr->SiS_CHTVUPALMData = SiS_CHTVUNTSCData;    /* not supported on 300 series */
+   SiS_Pr->SiS_CHTVOPALMData = SiS_CHTVONTSCData;    /* not supported on 300 series */
+   SiS_Pr->SiS_CHTVUPALNData = SiS300_CHTVUPALData;  /* not supported on 300 series */
+   SiS_Pr->SiS_CHTVOPALNData = SiS300_CHTVOPALData;  /* not supported on 300 series */
+   SiS_Pr->SiS_CHTVSOPALData = SiS300_CHTVSOPALData;
+
+   SiS_Pr->SiS_PanelType00_1 = SiS300_PanelType00_1;
+   SiS_Pr->SiS_PanelType01_1 = SiS300_PanelType01_1;
+   SiS_Pr->SiS_PanelType02_1 = SiS300_PanelType02_1;
+   SiS_Pr->SiS_PanelType03_1 = SiS300_PanelType03_1;
+   SiS_Pr->SiS_PanelType04_1 = SiS300_PanelType04_1;
+   SiS_Pr->SiS_PanelType05_1 = SiS300_PanelType05_1;
+   SiS_Pr->SiS_PanelType06_1 = SiS300_PanelType06_1;
+   SiS_Pr->SiS_PanelType07_1 = SiS300_PanelType07_1;
+   SiS_Pr->SiS_PanelType08_1 = SiS300_PanelType08_1;
+   SiS_Pr->SiS_PanelType09_1 = SiS300_PanelType09_1;
+   SiS_Pr->SiS_PanelType0a_1 = SiS300_PanelType0a_1;
+   SiS_Pr->SiS_PanelType0b_1 = SiS300_PanelType0b_1;
+   SiS_Pr->SiS_PanelType0c_1 = SiS300_PanelType0c_1;
+   SiS_Pr->SiS_PanelType0d_1 = SiS300_PanelType0d_1;
+   SiS_Pr->SiS_PanelType0e_1 = SiS300_PanelType0e_1;
+   SiS_Pr->SiS_PanelType0f_1 = SiS300_PanelType0f_1;
+   SiS_Pr->SiS_PanelType00_2 = SiS300_PanelType00_2;
+   SiS_Pr->SiS_PanelType01_2 = SiS300_PanelType01_2;
+   SiS_Pr->SiS_PanelType02_2 = SiS300_PanelType02_2;
+   SiS_Pr->SiS_PanelType03_2 = SiS300_PanelType03_2;
+   SiS_Pr->SiS_PanelType04_2 = SiS300_PanelType04_2;
+   SiS_Pr->SiS_PanelType05_2 = SiS300_PanelType05_2;
+   SiS_Pr->SiS_PanelType06_2 = SiS300_PanelType06_2;
+   SiS_Pr->SiS_PanelType07_2 = SiS300_PanelType07_2;
+   SiS_Pr->SiS_PanelType08_2 = SiS300_PanelType08_2;
+   SiS_Pr->SiS_PanelType09_2 = SiS300_PanelType09_2;
+   SiS_Pr->SiS_PanelType0a_2 = SiS300_PanelType0a_2;
+   SiS_Pr->SiS_PanelType0b_2 = SiS300_PanelType0b_2;
+   SiS_Pr->SiS_PanelType0c_2 = SiS300_PanelType0c_2;
+   SiS_Pr->SiS_PanelType0d_2 = SiS300_PanelType0d_2;
+   SiS_Pr->SiS_PanelType0e_2 = SiS300_PanelType0e_2;
+   SiS_Pr->SiS_PanelType0f_2 = SiS300_PanelType0f_2;
+   SiS_Pr->SiS_PanelTypeNS_1 = SiS300_PanelTypeNS_1;
+   SiS_Pr->SiS_PanelTypeNS_2 = SiS300_PanelTypeNS_2;
 
    if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) {
-      SiS_Pr->SiS_PanelType04_1 = (SiS_LVDSDesStruct *)SiS300_PanelType04_1a;
-      SiS_Pr->SiS_PanelType04_2 = (SiS_LVDSDesStruct *)SiS300_PanelType04_2a;
+      SiS_Pr->SiS_PanelType04_1 = SiS300_PanelType04_1a;
+      SiS_Pr->SiS_PanelType04_2 = SiS300_PanelType04_2a;
    }
    if(SiS_Pr->SiS_CustomT == CUT_BARCO1024) {
-      SiS_Pr->SiS_PanelType04_1 = (SiS_LVDSDesStruct *)SiS300_PanelType04_1b;
-      SiS_Pr->SiS_PanelType04_2 = (SiS_LVDSDesStruct *)SiS300_PanelType04_2b;
+      SiS_Pr->SiS_PanelType04_1 = SiS300_PanelType04_1b;
+      SiS_Pr->SiS_PanelType04_2 = SiS300_PanelType04_2b;
    }
 
-   SiS_Pr->SiS_LVDSCRT1800x600_1     = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT1800x600_1;
-   SiS_Pr->SiS_LVDSCRT11024x768_1    = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT11024x768_1;
-   SiS_Pr->SiS_LVDSCRT11280x1024_1   = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT11280x1024_1;
-   SiS_Pr->SiS_LVDSCRT1800x600_1_H   = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT1800x600_1_H;
-   SiS_Pr->SiS_LVDSCRT11024x768_1_H  = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT11024x768_1_H;
-   SiS_Pr->SiS_LVDSCRT11280x1024_1_H = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT11280x1024_1_H;
-   SiS_Pr->SiS_LVDSCRT1800x600_2     = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT1800x600_2;
-   SiS_Pr->SiS_LVDSCRT11024x768_2    = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT11024x768_2;
-   SiS_Pr->SiS_LVDSCRT11280x1024_2   = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT11280x1024_2;
-   SiS_Pr->SiS_LVDSCRT1800x600_2_H   = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT1800x600_2_H;
-   SiS_Pr->SiS_LVDSCRT11024x768_2_H  = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT11024x768_2_H;
-   SiS_Pr->SiS_LVDSCRT11280x1024_2_H = (SiS_LVDSCRT1DataStruct *)SiS300_LVDSCRT11280x1024_2_H;
-   SiS_Pr->SiS_CHTVCRT1UNTSC = (SiS_LVDSCRT1DataStruct *)SiS300_CHTVCRT1UNTSC;
-   SiS_Pr->SiS_CHTVCRT1ONTSC = (SiS_LVDSCRT1DataStruct *)SiS300_CHTVCRT1ONTSC;
-   SiS_Pr->SiS_CHTVCRT1UPAL  = (SiS_LVDSCRT1DataStruct *)SiS300_CHTVCRT1UPAL;
-   SiS_Pr->SiS_CHTVCRT1OPAL  = (SiS_LVDSCRT1DataStruct *)SiS300_CHTVCRT1OPAL;
-   SiS_Pr->SiS_CHTVCRT1SOPAL = (SiS_LVDSCRT1DataStruct *)SiS300_CHTVCRT1SOPAL;
-   SiS_Pr->SiS_CHTVReg_UNTSC = (SiS_CHTVRegDataStruct *)SiS300_CHTVReg_UNTSC;
-   SiS_Pr->SiS_CHTVReg_ONTSC = (SiS_CHTVRegDataStruct *)SiS300_CHTVReg_ONTSC;
-   SiS_Pr->SiS_CHTVReg_UPAL  = (SiS_CHTVRegDataStruct *)SiS300_CHTVReg_UPAL;
-   SiS_Pr->SiS_CHTVReg_OPAL  = (SiS_CHTVRegDataStruct *)SiS300_CHTVReg_OPAL;
-   SiS_Pr->SiS_CHTVReg_UPALM = (SiS_CHTVRegDataStruct *)SiS300_CHTVReg_UNTSC;  /* not supported on 300 series */
-   SiS_Pr->SiS_CHTVReg_OPALM = (SiS_CHTVRegDataStruct *)SiS300_CHTVReg_ONTSC;  /* not supported on 300 series */
-   SiS_Pr->SiS_CHTVReg_UPALN = (SiS_CHTVRegDataStruct *)SiS300_CHTVReg_UPAL;   /* not supported on 300 series */
-   SiS_Pr->SiS_CHTVReg_OPALN = (SiS_CHTVRegDataStruct *)SiS300_CHTVReg_OPAL;   /* not supported on 300 series */
-   SiS_Pr->SiS_CHTVReg_SOPAL = (SiS_CHTVRegDataStruct *)SiS300_CHTVReg_SOPAL;
+   SiS_Pr->SiS_LVDSCRT1800x600_1     = SiS300_LVDSCRT1800x600_1;
+   SiS_Pr->SiS_LVDSCRT1800x600_1_H   = SiS300_LVDSCRT1800x600_1_H;
+   SiS_Pr->SiS_LVDSCRT1800x600_2     = SiS300_LVDSCRT1800x600_2;
+   SiS_Pr->SiS_LVDSCRT1800x600_2_H   = SiS300_LVDSCRT1800x600_2_H;
+   SiS_Pr->SiS_LVDSCRT11024x768_1    = SiS300_LVDSCRT11024x768_1;
+   SiS_Pr->SiS_LVDSCRT11024x768_1_H  = SiS300_LVDSCRT11024x768_1_H;
+   SiS_Pr->SiS_LVDSCRT11024x768_2    = SiS300_LVDSCRT11024x768_2;
+   SiS_Pr->SiS_LVDSCRT11024x768_2_H  = SiS300_LVDSCRT11024x768_2_H;
+   SiS_Pr->SiS_LVDSCRT11280x1024_1   = SiS300_LVDSCRT11280x1024_1;
+   SiS_Pr->SiS_LVDSCRT11280x1024_1_H = SiS300_LVDSCRT11280x1024_1_H;
+   SiS_Pr->SiS_LVDSCRT11280x1024_2   = SiS300_LVDSCRT11280x1024_2;
+   SiS_Pr->SiS_LVDSCRT11280x1024_2_H = SiS300_LVDSCRT11280x1024_2_H;
+   SiS_Pr->SiS_LVDSCRT1XXXxXXX_1     = SiS300_LVDSCRT1XXXxXXX_1;
+   SiS_Pr->SiS_LVDSCRT1XXXxXXX_1_H   = SiS300_LVDSCRT1XXXxXXX_1_H;
+
+   SiS_Pr->SiS_CHTVCRT1UNTSC = SiS300_CHTVCRT1UNTSC;
+   SiS_Pr->SiS_CHTVCRT1ONTSC = SiS300_CHTVCRT1ONTSC;
+   SiS_Pr->SiS_CHTVCRT1UPAL  = SiS300_CHTVCRT1UPAL;
+   SiS_Pr->SiS_CHTVCRT1OPAL  = SiS300_CHTVCRT1OPAL;
+   SiS_Pr->SiS_CHTVCRT1SOPAL = SiS300_CHTVCRT1SOPAL;
+   SiS_Pr->SiS_CHTVReg_UNTSC = SiS300_CHTVReg_UNTSC;
+   SiS_Pr->SiS_CHTVReg_ONTSC = SiS300_CHTVReg_ONTSC;
+   SiS_Pr->SiS_CHTVReg_UPAL  = SiS300_CHTVReg_UPAL;
+   SiS_Pr->SiS_CHTVReg_OPAL  = SiS300_CHTVReg_OPAL;
+   SiS_Pr->SiS_CHTVReg_UPALM = SiS300_CHTVReg_UNTSC;  /* not supported on 300 series */
+   SiS_Pr->SiS_CHTVReg_OPALM = SiS300_CHTVReg_ONTSC;  /* not supported on 300 series */
+   SiS_Pr->SiS_CHTVReg_UPALN = SiS300_CHTVReg_UPAL;   /* not supported on 300 series */
+   SiS_Pr->SiS_CHTVReg_OPALN = SiS300_CHTVReg_OPAL;   /* not supported on 300 series */
+   SiS_Pr->SiS_CHTVReg_SOPAL = SiS300_CHTVReg_SOPAL;
    SiS_Pr->SiS_CHTVVCLKUNTSC = SiS300_CHTVVCLKUNTSC;
    SiS_Pr->SiS_CHTVVCLKONTSC = SiS300_CHTVVCLKONTSC;
    SiS_Pr->SiS_CHTVVCLKUPAL  = SiS300_CHTVVCLKUPAL;
@@ -406,40 +390,6 @@
    SiS_Pr->SiS_CHTVVCLKUPALN = SiS300_CHTVVCLKUPAL;   /* not supported on 300 series */
    SiS_Pr->SiS_CHTVVCLKOPALN = SiS300_CHTVVCLKOPAL;   /* not supported on 300 series */
    SiS_Pr->SiS_CHTVVCLKSOPAL = SiS300_CHTVVCLKSOPAL;
-
-   SiS_Pr->SiS_CRT2Part2_1024x768_1  = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1024x768_1;
-   SiS_Pr->SiS_CRT2Part2_1280x1024_1 = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1280x1024_1;
-   SiS_Pr->SiS_CRT2Part2_1400x1050_1 = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1400x1050_1;
-   SiS_Pr->SiS_CRT2Part2_1600x1200_1 = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1600x1200_1;
-   SiS_Pr->SiS_CRT2Part2_1024x768_2  = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1024x768_2;
-   SiS_Pr->SiS_CRT2Part2_1280x1024_2 = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1280x1024_2;
-   SiS_Pr->SiS_CRT2Part2_1400x1050_2 = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1400x1050_2;
-   SiS_Pr->SiS_CRT2Part2_1600x1200_2 = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1600x1200_2;
-   SiS_Pr->SiS_CRT2Part2_1024x768_3  = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1024x768_3;
-   SiS_Pr->SiS_CRT2Part2_1280x1024_3 = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1280x1024_3;
-   SiS_Pr->SiS_CRT2Part2_1400x1050_3 = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1400x1050_3;
-   SiS_Pr->SiS_CRT2Part2_1600x1200_3 = (SiS_Part2PortTblStruct *)SiS300_CRT2Part2_1600x1200_3;
-
-   /* LCDResInfo will on 300 series be translated to 315 series definitions */
-   SiS_Pr->SiS_Panel320x480   = Panel_320x480;
-   SiS_Pr->SiS_Panel640x480   = Panel_640x480;
-   SiS_Pr->SiS_Panel800x600   = Panel_800x600;
-   SiS_Pr->SiS_Panel1024x768  = Panel_1024x768;
-   SiS_Pr->SiS_Panel1280x1024 = Panel_1280x1024;
-   SiS_Pr->SiS_Panel1280x960  = Panel_1280x960;
-   SiS_Pr->SiS_Panel1024x600  = Panel_1024x600;
-   SiS_Pr->SiS_Panel1152x768  = Panel_1152x768;
-   SiS_Pr->SiS_Panel1280x768  = Panel_1280x768;
-   SiS_Pr->SiS_Panel1600x1200 = 255;  		   /* Something illegal */
-   SiS_Pr->SiS_Panel1400x1050 = 255;
-   SiS_Pr->SiS_Panel640x480_2 = 255;
-   SiS_Pr->SiS_Panel640x480_3 = 255;
-   SiS_Pr->SiS_Panel1152x864  = 255;
-   SiS_Pr->SiS_PanelMax       = Panel_320x480;     /* highest value */
-   SiS_Pr->SiS_PanelMinLVDS   = Panel_800x600;     /* Lowest value LVDS */
-   SiS_Pr->SiS_PanelMin301    = Panel_1024x768;    /* lowest value 301 */
-   SiS_Pr->SiS_PanelCustom    = Panel_Custom;
-   SiS_Pr->SiS_PanelBarco1366 = Panel_Barco1366;
 }
 #endif
 
@@ -477,23 +427,24 @@
    SiS_StandTable[0x1c].CRTC[4] = 0x55;
    SiS_StandTable[0x1c].CRTC[5] = 0x81;
 
-   SiS_Pr->SiS_SModeIDTable  = (SiS_StStruct *)SiS310_SModeIDTable;
-   SiS_Pr->SiS_EModeIDTable  = (SiS_ExtStruct *)SiS310_EModeIDTable;
+   SiS_Pr->SiS_SModeIDTable  = SiS310_SModeIDTable;
+   SiS_Pr->SiS_EModeIDTable  = SiS310_EModeIDTable;
    SiS_Pr->SiS_RefIndex      = (SiS_Ext2Struct *)SiS310_RefIndex;
-   SiS_Pr->SiS_CRT1Table     = (SiS_CRT1TableStruct *)SiS310_CRT1Table;
-   if(HwInfo->jChipType >= SIS_661) {
-      SiS_Pr->SiS_MCLKData_0 = (SiS_MCLKDataStruct *)SiS310_MCLKData_0_660;  /* 661/741/760 */
+   SiS_Pr->SiS_CRT1Table     = SiS310_CRT1Table;
+   if(HwInfo->jChipType >= SIS_760) {
+      SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_760;  /* 760 */
+   } else if(HwInfo->jChipType >= SIS_661) {
+      SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_660;  /* 661/741 */
    } else if(HwInfo->jChipType == SIS_330) {
-      SiS_Pr->SiS_MCLKData_0 = (SiS_MCLKDataStruct *)SiS310_MCLKData_0_330;  /* 330 */
+      SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_330;  /* 330 */
    } else if(HwInfo->jChipType > SIS_315PRO) {
-      SiS_Pr->SiS_MCLKData_0 = (SiS_MCLKDataStruct *)SiS310_MCLKData_0_650;  /* 550, 650, 740 */
+      SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_650;  /* 550, 650, 740 */
    } else {
-      SiS_Pr->SiS_MCLKData_0 = (SiS_MCLKDataStruct *)SiS310_MCLKData_0_315;  /* 315 */
+      SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_315;  /* 315 */
    }
-   SiS_Pr->SiS_MCLKData_1    = (SiS_MCLKDataStruct *)SiS310_MCLKData_1;
-   SiS_Pr->SiS_VCLKData      = (SiS_VCLKDataStruct *)SiS310_VCLKData;
-   SiS_Pr->SiS_VBVCLKData    = (SiS_VBVCLKDataStruct *)SiS310_VBVCLKData;
-   SiS_Pr->SiS_ScreenOffset  = SiS310_ScreenOffset;
+   SiS_Pr->SiS_MCLKData_1    = SiS310_MCLKData_1;
+   SiS_Pr->SiS_VCLKData      = SiS310_VCLKData;
+   SiS_Pr->SiS_VBVCLKData    = SiS310_VBVCLKData;
 
    SiS_Pr->SiS_SR15  = SiS310_SR15;
 
@@ -522,124 +473,96 @@
    SiS_Pr->pSiS_YCSenseData2    = &SiS310_YCSenseData2;
 #endif
 
-   SiS_Pr->SiS_StLCD1024x768Data    = (SiS_LCDDataStruct *)SiS310_StLCD1024x768Data;
-   SiS_Pr->SiS_ExtLCD1024x768Data   = (SiS_LCDDataStruct *)SiS310_ExtLCD1024x768Data;
-   SiS_Pr->SiS_St2LCD1024x768Data   = (SiS_LCDDataStruct *)SiS310_St2LCD1024x768Data;
-   SiS_Pr->SiS_StLCD1280x1024Data   = (SiS_LCDDataStruct *)SiS310_StLCD1280x1024Data;
-   SiS_Pr->SiS_ExtLCD1280x1024Data  = (SiS_LCDDataStruct *)SiS310_ExtLCD1280x1024Data;
-   SiS_Pr->SiS_St2LCD1280x1024Data  = (SiS_LCDDataStruct *)SiS310_St2LCD1280x1024Data;
-   SiS_Pr->SiS_NoScaleData1024x768  = (SiS_LCDDataStruct *)SiS310_NoScaleData1024x768;
-   SiS_Pr->SiS_NoScaleData1280x1024 = (SiS_LCDDataStruct *)SiS310_NoScaleData1280x1024;
-
-   SiS_Pr->SiS_PanelDelayTbl     = (SiS_PanelDelayTblStruct *)SiS310_PanelDelayTbl;
-   SiS_Pr->SiS_PanelDelayTblLVDS = (SiS_PanelDelayTblStruct *)SiS310_PanelDelayTblLVDS;
-
-   SiS_Pr->SiS_CHTVUPALData  = (SiS_LVDSDataStruct *)SiS310_CHTVUPALData;
-   SiS_Pr->SiS_CHTVOPALData  = (SiS_LVDSDataStruct *)SiS310_CHTVOPALData;
-   SiS_Pr->SiS_CHTVUPALMData = (SiS_LVDSDataStruct *)SiS310_CHTVUPALMData;
-   SiS_Pr->SiS_CHTVOPALMData = (SiS_LVDSDataStruct *)SiS310_CHTVOPALMData;
-   SiS_Pr->SiS_CHTVUPALNData = (SiS_LVDSDataStruct *)SiS310_CHTVUPALNData;
-   SiS_Pr->SiS_CHTVOPALNData = (SiS_LVDSDataStruct *)SiS310_CHTVOPALNData;
-   SiS_Pr->SiS_CHTVSOPALData = (SiS_LVDSDataStruct *)SiS310_CHTVSOPALData;
-
-   SiS_Pr->SiS_PanelType00_1 = (SiS_LVDSDesStruct *)SiS310_PanelType00_1;
-   SiS_Pr->SiS_PanelType01_1 = (SiS_LVDSDesStruct *)SiS310_PanelType01_1;
-   SiS_Pr->SiS_PanelType02_1 = (SiS_LVDSDesStruct *)SiS310_PanelType02_1;
-   SiS_Pr->SiS_PanelType03_1 = (SiS_LVDSDesStruct *)SiS310_PanelType03_1;
-   SiS_Pr->SiS_PanelType04_1 = (SiS_LVDSDesStruct *)SiS310_PanelType04_1;
-   SiS_Pr->SiS_PanelType05_1 = (SiS_LVDSDesStruct *)SiS310_PanelType05_1;
-   SiS_Pr->SiS_PanelType06_1 = (SiS_LVDSDesStruct *)SiS310_PanelType06_1;
-   SiS_Pr->SiS_PanelType07_1 = (SiS_LVDSDesStruct *)SiS310_PanelType07_1;
-   SiS_Pr->SiS_PanelType08_1 = (SiS_LVDSDesStruct *)SiS310_PanelType08_1;
-   SiS_Pr->SiS_PanelType09_1 = (SiS_LVDSDesStruct *)SiS310_PanelType09_1;
-   SiS_Pr->SiS_PanelType0a_1 = (SiS_LVDSDesStruct *)SiS310_PanelType0a_1;
-   SiS_Pr->SiS_PanelType0b_1 = (SiS_LVDSDesStruct *)SiS310_PanelType0b_1;
-   SiS_Pr->SiS_PanelType0c_1 = (SiS_LVDSDesStruct *)SiS310_PanelType0c_1;
-   SiS_Pr->SiS_PanelType0d_1 = (SiS_LVDSDesStruct *)SiS310_PanelType0d_1;
-   SiS_Pr->SiS_PanelType0e_1 = (SiS_LVDSDesStruct *)SiS310_PanelType0e_1;
-   SiS_Pr->SiS_PanelType0f_1 = (SiS_LVDSDesStruct *)SiS310_PanelType0f_1;
-   SiS_Pr->SiS_PanelType00_2 = (SiS_LVDSDesStruct *)SiS310_PanelType00_2;
-   SiS_Pr->SiS_PanelType01_2 = (SiS_LVDSDesStruct *)SiS310_PanelType01_2;
-   SiS_Pr->SiS_PanelType02_2 = (SiS_LVDSDesStruct *)SiS310_PanelType02_2;
-   SiS_Pr->SiS_PanelType03_2 = (SiS_LVDSDesStruct *)SiS310_PanelType03_2;
-   SiS_Pr->SiS_PanelType04_2 = (SiS_LVDSDesStruct *)SiS310_PanelType04_2;
-   SiS_Pr->SiS_PanelType05_2 = (SiS_LVDSDesStruct *)SiS310_PanelType05_2;
-   SiS_Pr->SiS_PanelType06_2 = (SiS_LVDSDesStruct *)SiS310_PanelType06_2;
-   SiS_Pr->SiS_PanelType07_2 = (SiS_LVDSDesStruct *)SiS310_PanelType07_2;
-   SiS_Pr->SiS_PanelType08_2 = (SiS_LVDSDesStruct *)SiS310_PanelType08_2;
-   SiS_Pr->SiS_PanelType09_2 = (SiS_LVDSDesStruct *)SiS310_PanelType09_2;
-   SiS_Pr->SiS_PanelType0a_2 = (SiS_LVDSDesStruct *)SiS310_PanelType0a_2;
-   SiS_Pr->SiS_PanelType0b_2 = (SiS_LVDSDesStruct *)SiS310_PanelType0b_2;
-   SiS_Pr->SiS_PanelType0c_2 = (SiS_LVDSDesStruct *)SiS310_PanelType0c_2;
-   SiS_Pr->SiS_PanelType0d_2 = (SiS_LVDSDesStruct *)SiS310_PanelType0d_2;
-   SiS_Pr->SiS_PanelType0e_2 = (SiS_LVDSDesStruct *)SiS310_PanelType0e_2;
-   SiS_Pr->SiS_PanelType0f_2 = (SiS_LVDSDesStruct *)SiS310_PanelType0f_2;
-
-   SiS_Pr->SiS_CRT2Part2_1024x768_1  = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1024x768_1;
-   SiS_Pr->SiS_CRT2Part2_1280x1024_1 = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1280x1024_1;
-   SiS_Pr->SiS_CRT2Part2_1400x1050_1 = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1400x1050_1;
-   SiS_Pr->SiS_CRT2Part2_1600x1200_1 = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1600x1200_1;
-   SiS_Pr->SiS_CRT2Part2_1024x768_2  = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1024x768_2;
-   SiS_Pr->SiS_CRT2Part2_1280x1024_2 = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1280x1024_2;
-   SiS_Pr->SiS_CRT2Part2_1400x1050_2 = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1400x1050_2;
-   SiS_Pr->SiS_CRT2Part2_1600x1200_2 = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1600x1200_2;
-   SiS_Pr->SiS_CRT2Part2_1024x768_3  = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1024x768_3;
-   SiS_Pr->SiS_CRT2Part2_1280x1024_3 = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1280x1024_3;
-   SiS_Pr->SiS_CRT2Part2_1400x1050_3 = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1400x1050_3;
-   SiS_Pr->SiS_CRT2Part2_1600x1200_3 = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_1600x1200_3;
-
-   SiS_Pr->SiS_LVDSCRT1800x600_1     = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT1800x600_1;
-   SiS_Pr->SiS_LVDSCRT11024x768_1    = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11024x768_1;
-   SiS_Pr->SiS_LVDSCRT11280x1024_1   = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11280x1024_1;
-   SiS_Pr->SiS_LVDSCRT11400x1050_1   = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11400x1050_1;
-   SiS_Pr->SiS_LVDSCRT11600x1200_1   = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11600x1200_1;
-   SiS_Pr->SiS_LVDSCRT1800x600_1_H   = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT1800x600_1_H;
-   SiS_Pr->SiS_LVDSCRT11024x768_1_H  = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11024x768_1_H;
-   SiS_Pr->SiS_LVDSCRT11280x1024_1_H = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11280x1024_1_H;
-   SiS_Pr->SiS_LVDSCRT11400x1050_1_H = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11400x1050_1_H;
-   SiS_Pr->SiS_LVDSCRT11600x1200_1_H = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11600x1200_1_H;
-   SiS_Pr->SiS_LVDSCRT1800x600_2     = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT1800x600_2;
-   SiS_Pr->SiS_LVDSCRT11024x768_2    = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11024x768_2;
-   SiS_Pr->SiS_LVDSCRT11280x1024_2   = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11280x1024_2;
-   SiS_Pr->SiS_LVDSCRT11400x1050_2   = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11400x1050_2;
-   SiS_Pr->SiS_LVDSCRT11600x1200_2   = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11600x1200_2;
-   SiS_Pr->SiS_LVDSCRT1800x600_2_H   = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT1800x600_2_H;
-   SiS_Pr->SiS_LVDSCRT11024x768_2_H  = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11024x768_2_H;
-   SiS_Pr->SiS_LVDSCRT11280x1024_2_H = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11280x1024_2_H;
-   SiS_Pr->SiS_LVDSCRT11400x1050_2_H = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11400x1050_2_H;
-   SiS_Pr->SiS_LVDSCRT11600x1200_2_H = (SiS_LVDSCRT1DataStruct *)SiS310_LVDSCRT11600x1200_2_H;
-   SiS_Pr->SiS_CHTVCRT1UNTSC         = (SiS_LVDSCRT1DataStruct *)SiS310_CHTVCRT1UNTSC;
-   SiS_Pr->SiS_CHTVCRT1ONTSC         = (SiS_LVDSCRT1DataStruct *)SiS310_CHTVCRT1ONTSC;
-   SiS_Pr->SiS_CHTVCRT1UPAL          = (SiS_LVDSCRT1DataStruct *)SiS310_CHTVCRT1UPAL;
-   SiS_Pr->SiS_CHTVCRT1OPAL          = (SiS_LVDSCRT1DataStruct *)SiS310_CHTVCRT1OPAL;
-   SiS_Pr->SiS_CHTVCRT1SOPAL         = (SiS_LVDSCRT1DataStruct *)SiS310_CHTVCRT1OPAL;
-
-   SiS_Pr->SiS_CHTVReg_UNTSC = (SiS_CHTVRegDataStruct *)SiS310_CHTVReg_UNTSC;
-   SiS_Pr->SiS_CHTVReg_ONTSC = (SiS_CHTVRegDataStruct *)SiS310_CHTVReg_ONTSC;
-   SiS_Pr->SiS_CHTVReg_UPAL  = (SiS_CHTVRegDataStruct *)SiS310_CHTVReg_UPAL;
-   SiS_Pr->SiS_CHTVReg_OPAL  = (SiS_CHTVRegDataStruct *)SiS310_CHTVReg_OPAL;
-   SiS_Pr->SiS_CHTVReg_UPALM = (SiS_CHTVRegDataStruct *)SiS310_CHTVReg_UPALM;
-   SiS_Pr->SiS_CHTVReg_OPALM = (SiS_CHTVRegDataStruct *)SiS310_CHTVReg_OPALM;
-   SiS_Pr->SiS_CHTVReg_UPALN = (SiS_CHTVRegDataStruct *)SiS310_CHTVReg_UPALN;
-   SiS_Pr->SiS_CHTVReg_OPALN = (SiS_CHTVRegDataStruct *)SiS310_CHTVReg_OPALN;
-   SiS_Pr->SiS_CHTVReg_SOPAL = (SiS_CHTVRegDataStruct *)SiS310_CHTVReg_OPAL;
-
-   SiS_Pr->SiS_LCDACRT11024x768_1    = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11024x768_1;
-   SiS_Pr->SiS_LCDACRT11280x1024_1   = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11280x1024_1;
-   SiS_Pr->SiS_LCDACRT11400x1050_1   = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11400x1050_1;
-   SiS_Pr->SiS_LCDACRT11600x1200_1   = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11600x1200_1;
-   SiS_Pr->SiS_LCDACRT11024x768_1_H  = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11024x768_1_H;
-   SiS_Pr->SiS_LCDACRT11280x1024_1_H = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11280x1024_1_H;
-   SiS_Pr->SiS_LCDACRT11400x1050_1_H = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11400x1050_1_H;
-   SiS_Pr->SiS_LCDACRT11600x1200_1_H = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11600x1200_1_H;
-   SiS_Pr->SiS_LCDACRT11024x768_2    = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11024x768_2;
-   SiS_Pr->SiS_LCDACRT11280x1024_2   = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11280x1024_2;
-   SiS_Pr->SiS_LCDACRT11400x1050_2   = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11400x1050_2;
-   SiS_Pr->SiS_LCDACRT11600x1200_2   = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11600x1200_2;
-   SiS_Pr->SiS_LCDACRT11024x768_2_H  = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11024x768_2_H;
-   SiS_Pr->SiS_LCDACRT11280x1024_2_H = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11280x1024_2_H;
-   SiS_Pr->SiS_LCDACRT11400x1050_2_H = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11400x1050_2_H;
-   SiS_Pr->SiS_LCDACRT11600x1200_2_H = (SiS_LCDACRT1DataStruct *)SiS310_LCDACRT11600x1200_2_H;
+   SiS_Pr->SiS_PanelDelayTbl     = SiS310_PanelDelayTbl;
+   SiS_Pr->SiS_PanelDelayTblLVDS = SiS310_PanelDelayTblLVDS;
+
+   SiS_Pr->SiS_St2LCD1024x768Data   = SiS310_St2LCD1024x768Data;
+   SiS_Pr->SiS_ExtLCD1024x768Data   = SiS310_ExtLCD1024x768Data;
+   SiS_Pr->SiS_St2LCD1280x1024Data  = SiS310_St2LCD1280x1024Data;
+   SiS_Pr->SiS_ExtLCD1280x1024Data  = SiS310_ExtLCD1280x1024Data;
+
+   SiS_Pr->SiS_CRT2Part2_1024x768_1  = SiS310_CRT2Part2_1024x768_1;
+
+   SiS_Pr->SiS_PanelType00_1 = SiS310_PanelType00_1;
+   SiS_Pr->SiS_PanelType01_1 = SiS310_PanelType01_1;
+   SiS_Pr->SiS_PanelType02_1 = SiS310_PanelType02_1;
+   SiS_Pr->SiS_PanelType03_1 = SiS310_PanelType03_1;
+   SiS_Pr->SiS_PanelType04_1 = SiS310_PanelType04_1;
+   SiS_Pr->SiS_PanelType05_1 = SiS310_PanelType05_1;
+   SiS_Pr->SiS_PanelType06_1 = SiS310_PanelType06_1;
+   SiS_Pr->SiS_PanelType07_1 = SiS310_PanelType07_1;
+   SiS_Pr->SiS_PanelType08_1 = SiS310_PanelType08_1;
+   SiS_Pr->SiS_PanelType09_1 = SiS310_PanelType09_1;
+   SiS_Pr->SiS_PanelType0a_1 = SiS310_PanelType0a_1;
+   SiS_Pr->SiS_PanelType0b_1 = SiS310_PanelType0b_1;
+   SiS_Pr->SiS_PanelType0c_1 = SiS310_PanelType0c_1;
+   SiS_Pr->SiS_PanelType0d_1 = SiS310_PanelType0d_1;
+   SiS_Pr->SiS_PanelType0e_1 = SiS310_PanelType0e_1;
+   SiS_Pr->SiS_PanelType0f_1 = SiS310_PanelType0f_1;
+   SiS_Pr->SiS_PanelType00_2 = SiS310_PanelType00_2;
+   SiS_Pr->SiS_PanelType01_2 = SiS310_PanelType01_2;
+   SiS_Pr->SiS_PanelType02_2 = SiS310_PanelType02_2;
+   SiS_Pr->SiS_PanelType03_2 = SiS310_PanelType03_2;
+   SiS_Pr->SiS_PanelType04_2 = SiS310_PanelType04_2;
+   SiS_Pr->SiS_PanelType05_2 = SiS310_PanelType05_2;
+   SiS_Pr->SiS_PanelType06_2 = SiS310_PanelType06_2;
+   SiS_Pr->SiS_PanelType07_2 = SiS310_PanelType07_2;
+   SiS_Pr->SiS_PanelType08_2 = SiS310_PanelType08_2;
+   SiS_Pr->SiS_PanelType09_2 = SiS310_PanelType09_2;
+   SiS_Pr->SiS_PanelType0a_2 = SiS310_PanelType0a_2;
+   SiS_Pr->SiS_PanelType0b_2 = SiS310_PanelType0b_2;
+   SiS_Pr->SiS_PanelType0c_2 = SiS310_PanelType0c_2;
+   SiS_Pr->SiS_PanelType0d_2 = SiS310_PanelType0d_2;
+   SiS_Pr->SiS_PanelType0e_2 = SiS310_PanelType0e_2;
+   SiS_Pr->SiS_PanelType0f_2 = SiS310_PanelType0f_2;
+   SiS_Pr->SiS_PanelTypeNS_1 = SiS310_PanelTypeNS_1;
+   SiS_Pr->SiS_PanelTypeNS_2 = SiS310_PanelTypeNS_2;
+
+   SiS_Pr->SiS_CHTVUPALData  = SiS310_CHTVUPALData;
+   SiS_Pr->SiS_CHTVOPALData  = SiS310_CHTVOPALData;
+   SiS_Pr->SiS_CHTVUPALMData = SiS310_CHTVUPALMData;
+   SiS_Pr->SiS_CHTVOPALMData = SiS310_CHTVOPALMData;
+   SiS_Pr->SiS_CHTVUPALNData = SiS310_CHTVUPALNData;
+   SiS_Pr->SiS_CHTVOPALNData = SiS310_CHTVOPALNData;
+   SiS_Pr->SiS_CHTVSOPALData = SiS310_CHTVSOPALData;
+
+   SiS_Pr->SiS_LVDSCRT1800x600_1     = SiS310_LVDSCRT1800x600_1;
+   SiS_Pr->SiS_LVDSCRT11024x768_1    = SiS310_LVDSCRT11024x768_1;
+   SiS_Pr->SiS_LVDSCRT11280x1024_1   = SiS310_LVDSCRT11280x1024_1;
+   SiS_Pr->SiS_LVDSCRT11400x1050_1   = SiS310_LVDSCRT11400x1050_1;
+   SiS_Pr->SiS_LVDSCRT11600x1200_1   = SiS310_LVDSCRT11600x1200_1;
+   SiS_Pr->SiS_LVDSCRT1800x600_1_H   = SiS310_LVDSCRT1800x600_1_H;
+   SiS_Pr->SiS_LVDSCRT11024x768_1_H  = SiS310_LVDSCRT11024x768_1_H;
+   SiS_Pr->SiS_LVDSCRT11280x1024_1_H = SiS310_LVDSCRT11280x1024_1_H;
+   SiS_Pr->SiS_LVDSCRT11400x1050_1_H = SiS310_LVDSCRT11400x1050_1_H;
+   SiS_Pr->SiS_LVDSCRT11600x1200_1_H = SiS310_LVDSCRT11600x1200_1_H;
+   SiS_Pr->SiS_LVDSCRT1800x600_2     = SiS310_LVDSCRT1800x600_2;
+   SiS_Pr->SiS_LVDSCRT11024x768_2    = SiS310_LVDSCRT11024x768_2;
+   SiS_Pr->SiS_LVDSCRT11280x1024_2   = SiS310_LVDSCRT11280x1024_2;
+   SiS_Pr->SiS_LVDSCRT11400x1050_2   = SiS310_LVDSCRT11400x1050_2;
+   SiS_Pr->SiS_LVDSCRT11600x1200_2   = SiS310_LVDSCRT11600x1200_2;
+   SiS_Pr->SiS_LVDSCRT1800x600_2_H   = SiS310_LVDSCRT1800x600_2_H;
+   SiS_Pr->SiS_LVDSCRT11024x768_2_H  = SiS310_LVDSCRT11024x768_2_H;
+   SiS_Pr->SiS_LVDSCRT11280x1024_2_H = SiS310_LVDSCRT11280x1024_2_H;
+   SiS_Pr->SiS_LVDSCRT11400x1050_2_H = SiS310_LVDSCRT11400x1050_2_H;
+   SiS_Pr->SiS_LVDSCRT11600x1200_2_H = SiS310_LVDSCRT11600x1200_2_H;
+   SiS_Pr->SiS_LVDSCRT1XXXxXXX_1     = SiS310_LVDSCRT1XXXxXXX_1;
+   SiS_Pr->SiS_LVDSCRT1XXXxXXX_1_H   = SiS310_LVDSCRT1XXXxXXX_1_H;
+   SiS_Pr->SiS_CHTVCRT1UNTSC         = SiS310_CHTVCRT1UNTSC;
+   SiS_Pr->SiS_CHTVCRT1ONTSC         = SiS310_CHTVCRT1ONTSC;
+   SiS_Pr->SiS_CHTVCRT1UPAL          = SiS310_CHTVCRT1UPAL;
+   SiS_Pr->SiS_CHTVCRT1OPAL          = SiS310_CHTVCRT1OPAL;
+   SiS_Pr->SiS_CHTVCRT1SOPAL         = SiS310_CHTVCRT1OPAL;
+
+   SiS_Pr->SiS_CHTVReg_UNTSC = SiS310_CHTVReg_UNTSC;
+   SiS_Pr->SiS_CHTVReg_ONTSC = SiS310_CHTVReg_ONTSC;
+   SiS_Pr->SiS_CHTVReg_UPAL  = SiS310_CHTVReg_UPAL;
+   SiS_Pr->SiS_CHTVReg_OPAL  = SiS310_CHTVReg_OPAL;
+   SiS_Pr->SiS_CHTVReg_UPALM = SiS310_CHTVReg_UPALM;
+   SiS_Pr->SiS_CHTVReg_OPALM = SiS310_CHTVReg_OPALM;
+   SiS_Pr->SiS_CHTVReg_UPALN = SiS310_CHTVReg_UPALN;
+   SiS_Pr->SiS_CHTVReg_OPALN = SiS310_CHTVReg_OPALN;
+   SiS_Pr->SiS_CHTVReg_SOPAL = SiS310_CHTVReg_OPAL;
 
    SiS_Pr->SiS_CHTVVCLKUNTSC = SiS310_CHTVVCLKUNTSC;
    SiS_Pr->SiS_CHTVVCLKONTSC = SiS310_CHTVVCLKONTSC;
@@ -648,28 +571,8 @@
    SiS_Pr->SiS_CHTVVCLKUPALM = SiS310_CHTVVCLKUPALM;
    SiS_Pr->SiS_CHTVVCLKOPALM = SiS310_CHTVVCLKOPALM;
    SiS_Pr->SiS_CHTVVCLKUPALN = SiS310_CHTVVCLKUPALN;
-   SiS_Pr->SiS_CHTVVCLKOPALN = SiS310_CHTVVCLKOPALN;   
+   SiS_Pr->SiS_CHTVVCLKOPALN = SiS310_CHTVVCLKOPALN;
    SiS_Pr->SiS_CHTVVCLKSOPAL = SiS310_CHTVVCLKOPAL;
-
-   SiS_Pr->SiS_Panel320x480   = Panel_320x480;
-   SiS_Pr->SiS_Panel640x480   = Panel_640x480;
-   SiS_Pr->SiS_Panel800x600   = Panel_800x600;
-   SiS_Pr->SiS_Panel1024x768  = Panel_1024x768;
-   SiS_Pr->SiS_Panel1280x1024 = Panel_1280x1024;
-   SiS_Pr->SiS_Panel1280x960  = Panel_1280x960;
-   SiS_Pr->SiS_Panel1600x1200 = Panel_1600x1200;
-   SiS_Pr->SiS_Panel1400x1050 = Panel_1400x1050;
-   SiS_Pr->SiS_Panel1152x768  = Panel_1152x768;
-   SiS_Pr->SiS_Panel1152x864  = Panel_1152x864;
-   SiS_Pr->SiS_Panel1280x768  = Panel_1280x768;
-   SiS_Pr->SiS_Panel1024x600  = Panel_1024x600;
-   SiS_Pr->SiS_Panel640x480_2 = Panel_640x480_2;
-   SiS_Pr->SiS_Panel640x480_3 = Panel_640x480_3;
-   SiS_Pr->SiS_PanelMax       = Panel_320x480;    /* highest value */
-   SiS_Pr->SiS_PanelMinLVDS   = Panel_800x600;    /* lowest value LVDS/LCDA */
-   SiS_Pr->SiS_PanelMin301    = Panel_1024x768;   /* lowest value 301 */
-   SiS_Pr->SiS_PanelCustom    = Panel_Custom;
-   SiS_Pr->SiS_PanelBarco1366 = 255;
 }
 #endif
 
@@ -710,7 +613,8 @@
 /*********************************************/
 
 USHORT
-SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN)
+SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay,
+              int Depth, BOOLEAN FSTN, int LCDwidth, int LCDheight)
 {
    USHORT ModeIndex = 0;
 
@@ -734,54 +638,58 @@
 	  else if(VDisplay == 400) ModeIndex = ModeIndex_640x400[Depth];
           break;
      case 720:
-          if(!(VBFlags & CRT1_LCDA)) {
-             if(VDisplay == 480)      ModeIndex = ModeIndex_720x480[Depth];
-             else if(VDisplay == 576) ModeIndex = ModeIndex_720x576[Depth];
-          }
+          if(VDisplay == 480)      ModeIndex = ModeIndex_720x480[Depth];
+          else if(VDisplay == 576) ModeIndex = ModeIndex_720x576[Depth];
           break;
      case 768:
-          if(!(VBFlags & CRT1_LCDA)) {
-             if(VDisplay == 576) ModeIndex = ModeIndex_768x576[Depth];
-          }
+          if(VDisplay == 576) ModeIndex = ModeIndex_768x576[Depth];
 	  break;
      case 800:
-	  if(VDisplay == 600)    ModeIndex = ModeIndex_800x600[Depth];
-	  else if(!(VBFlags & CRT1_LCDA)) {
-	     if(VDisplay == 480) ModeIndex = ModeIndex_800x480[Depth];
-	  }
+	  if(VDisplay == 600)      ModeIndex = ModeIndex_800x600[Depth];
+	  else if(VDisplay == 480) ModeIndex = ModeIndex_800x480[Depth];
           break;
      case 848:
-          if(!(VBFlags & CRT1_LCDA)) {
-	     if(VDisplay == 480) ModeIndex = ModeIndex_848x480[Depth];
-	  }
+	  if(VDisplay == 480) ModeIndex = ModeIndex_848x480[Depth];
 	  break;
      case 856:
-          if(!(VBFlags & CRT1_LCDA)) {
-	     if(VDisplay == 480) ModeIndex = ModeIndex_856x480[Depth];
+	  if(VDisplay == 480) ModeIndex = ModeIndex_856x480[Depth];
+	  break;
+     case 960:
+	  if(VGAEngine == SIS_315_VGA) {
+	     if(VDisplay == 540) ModeIndex = ModeIndex_960x540[Depth];
 	  }
 	  break;
      case 1024:
-          if(VDisplay == 768) ModeIndex = ModeIndex_1024x768[Depth];
-	  else if(!(VBFlags & CRT1_LCDA)) {
-	     if(VDisplay == 576)    ModeIndex = ModeIndex_1024x576[Depth];
-	     else if(VGAEngine == SIS_300_VGA) {
-	        if(VDisplay == 600) ModeIndex = ModeIndex_1024x600[Depth];
-             }
+          if(VDisplay == 768)      ModeIndex = ModeIndex_1024x768[Depth];
+	  else if(VDisplay == 576) ModeIndex = ModeIndex_1024x576[Depth];
+	  else if((!(VBFlags & CRT1_LCDA)) && (VGAEngine == SIS_300_VGA)) {
+	     if(VDisplay == 600) ModeIndex = ModeIndex_1024x600[Depth];
 	  }
           break;
      case 1152:
-          if(!(VBFlags & CRT1_LCDA)) {
-             if(VDisplay == 864)    ModeIndex = ModeIndex_1152x864[Depth];
-             else if(VGAEngine == SIS_300_VGA) {
-	        if(VDisplay == 768) ModeIndex = ModeIndex_1152x768[Depth];
-             }
+          if(VDisplay == 864) ModeIndex = ModeIndex_1152x864[Depth];
+          if((!(VBFlags & CRT1_LCDA)) && (VGAEngine == SIS_300_VGA)) {
+	     if(VDisplay == 768) ModeIndex = ModeIndex_1152x768[Depth];
 	  }
 	  break;
      case 1280:
-          if(VDisplay == 1024)        ModeIndex = ModeIndex_1280x1024[Depth];
-	  else if(!(VBFlags & CRT1_LCDA)) {
-             if(VDisplay == 960)      ModeIndex = ModeIndex_1280x960[Depth];
-	     else if(VDisplay == 720) ModeIndex = ModeIndex_1280x720[Depth];
+          if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];
+	  else if(VDisplay == 800) {
+	     if(VGAEngine == SIS_315_VGA) {
+	        if((VBFlags & CRT1_LCDA) && (LCDwidth == 1280) && (LCDheight == 800)) {
+	           ModeIndex = ModeIndex_1280x800[Depth];
+	        } else if(!(VBFlags & CRT1_LCDA)) {
+	           ModeIndex = ModeIndex_1280x800[Depth];
+	        }
+	     }
+	  } else if(VDisplay == 720) {
+	     if((VBFlags & CRT1_LCDA) && (LCDwidth == 1280) && (LCDheight == 720)) {
+	        ModeIndex = ModeIndex_1280x720[Depth];
+	     } else if(!(VBFlags & CRT1_LCDA)) {
+	        ModeIndex = ModeIndex_1280x720[Depth];
+	     }
+	  } else if(!(VBFlags & CRT1_LCDA)) {
+             if(VDisplay == 960) ModeIndex = ModeIndex_1280x960[Depth];
 	     else if(VDisplay == 768) {
 	        if(VGAEngine == SIS_300_VGA) {
 	           ModeIndex = ModeIndex_300_1280x768[Depth];
@@ -792,23 +700,39 @@
 	  }
           break;
      case 1360:
+          if(VDisplay == 768) ModeIndex = ModeIndex_1360x768[Depth];
           if(!(VBFlags & CRT1_LCDA)) {
-	     if(VDisplay == 768)     ModeIndex = ModeIndex_1360x768[Depth];
-	     else if(VGAEngine == SIS_300_VGA) {
+	     if(VGAEngine == SIS_300_VGA) {
 	        if(VDisplay == 1024) ModeIndex = ModeIndex_300_1360x1024[Depth];
              }
 	  }
           break;
      case 1400:
           if(VGAEngine == SIS_315_VGA) {
-	     if(VDisplay == 1050) ModeIndex = ModeIndex_1400x1050[Depth];
+	     if(VDisplay == 1050) {
+	        if((VBFlags & CRT1_LCDA) &&
+	           (((LCDwidth == 1400) && (LCDheight == 1050)) ||
+		    ((LCDwidth == 1600) && (LCDheight == 1200)))) {
+	           ModeIndex = ModeIndex_1400x1050[Depth];
+	        } else if(!(VBFlags & CRT1_LCDA)) {
+	           ModeIndex = ModeIndex_1400x1050[Depth];
+	        }
+	     }
 	  }
           break;
      case 1600:
           if(VDisplay == 1200) ModeIndex = ModeIndex_1600x1200[Depth];
           break;
+     case 1680:
+          if(VGAEngine == SIS_315_VGA) {
+             if(VDisplay == 1050) ModeIndex = ModeIndex_1680x1050[Depth];
+	  }
+          break;
      case 1920:
           if(!(VBFlags & CRT1_LCDA)) {
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 1080) ModeIndex = ModeIndex_1920x1080[Depth];
+	     }
              if(VDisplay == 1440) ModeIndex = ModeIndex_1920x1440[Depth];
 	  }
           break;
@@ -851,14 +775,18 @@
              break;
      	case 400:
 	     if(CustomT != CUT_PANEL848) {
-          	if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];
+	        if(!((VGAEngine == SIS_300_VGA) && (VBFlags & VB_TRUMPION))) {
+          	   if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];
+		}
 	     }
              break;
 	case 512:
 	     if(CustomT != CUT_PANEL848) {
-		if(VDisplay == 384) {
+	        if(!((VGAEngine == SIS_300_VGA) && (VBFlags & VB_TRUMPION))) {
 		   if(LCDwidth != 1024 || LCDheight != 600) {
-		      ModeIndex = ModeIndex_512x384[Depth];
+		      if(VDisplay == 384) {
+		         ModeIndex = ModeIndex_512x384[Depth];
+		      }
 		   }
 		}
 	     }
@@ -898,6 +826,9 @@
 	        if((VDisplay == 768) && (LCDheight == 768)) {
 		   ModeIndex = ModeIndex_310_1280x768[Depth];
 		}
+		if((VDisplay == 800) && (LCDheight == 800)) {
+		   ModeIndex = ModeIndex_310_1280x768[Depth];
+		}
 	     }
 	     break;
 	case 1360:
@@ -940,17 +871,54 @@
 	     if(VDisplay == 480)      ModeIndex = ModeIndex_640x480[Depth];
 	     else if(VDisplay == 400) ModeIndex = ModeIndex_640x400[Depth];
 	     break;
+	case 720:
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 480)      ModeIndex = ModeIndex_720x480[Depth];
+		else if(VDisplay == 576) ModeIndex = ModeIndex_720x576[Depth];
+	     }
+	     break;
+	case 768:
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 576) ModeIndex = ModeIndex_768x576[Depth];
+	     }
+	     break;
 	case 800:
 	     if(VDisplay == 600) ModeIndex = ModeIndex_800x600[Depth];
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 480) ModeIndex = ModeIndex_800x480[Depth];
+	     }
+	     break;
+	case 848:
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 480) ModeIndex = ModeIndex_848x480[Depth];
+	     }
+	     break;
+	case 856:
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 480) ModeIndex = ModeIndex_856x480[Depth];
+	     }
+	     break;
+	case 960:
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 540) ModeIndex = ModeIndex_960x540[Depth];
+	     }
 	     break;
 	case 1024:
 	     if(VDisplay == 768) ModeIndex = ModeIndex_1024x768[Depth];
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 576) ModeIndex = ModeIndex_1024x576[Depth];
+	     }
+	     break;
+	case 1152:
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 864) ModeIndex = ModeIndex_1152x864[Depth];
+	     }
 	     break;
 	case 1280:
 	     if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];
 	     else if(VDisplay == 768) {
-		if((LCDheight == 768) ||
-		   ((LCDheight == 1024) && (VBFlags & (VB_301|VB_301B|VB_301C|VB_302B)))) {
+		if((LCDheight == 768) ||  (LCDwidth == 1680) ||
+		   (VBFlags & VB_SISTMDS)) {
 		   if(VGAEngine == SIS_300_VGA) {
 		      ModeIndex = ModeIndex_300_1280x768[Depth];
 		   } else {
@@ -958,24 +926,49 @@
 		   }
 		}
 	     } else if(VDisplay == 960) {
-	        if((LCDheight == 960) ||
-		   ((LCDheight == 1024) && (VBFlags & (VB_301|VB_301B|VB_301C|VB_302B)))) {
+	        if((LCDheight == 960) || (VBFlags & VB_SISTMDS)) {
 		   ModeIndex = ModeIndex_1280x960[Depth];
 		}
+	     } else if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 800) {
+		   if((LCDheight == 800) || (LCDwidth == 1680) ||
+		      (VBFlags & VB_SISTMDS)) {
+		      ModeIndex = ModeIndex_1280x800[Depth];
+		   }
+		} else if(VDisplay == 720) {
+		   if((LCDheight == 720) || (LCDwidth == 1680) || (LCDwidth == 1400) ||
+		      (VBFlags & VB_SISTMDS)) {
+		      ModeIndex = ModeIndex_1280x720[Depth];
+		   }
+		}
+	     }
+	     break;
+	case 1360:
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 768) ModeIndex = ModeIndex_1360x768[Depth];
 	     }
 	     break;
 	case 1400:
 	     if(VGAEngine == SIS_315_VGA) {
 	        if(VBFlags & (VB_301B | VB_301C | VB_302B | VB_302LV | VB_302ELV)) {
-		   if(LCDheight != 1200) {
-	              if(VDisplay == 1050) ModeIndex = ModeIndex_1400x1050[Depth];
+		   if((LCDwidth == 1400) || (LCDwidth == 1600) || (LCDwidth == 1680)) {
+		      ModeIndex = ModeIndex_1400x1050[Depth];
 		   }
 		}
 	     }
 	     break;
 	case 1600:
-	     if(VBFlags & (VB_301C | VB_302B | VB_302LV | VB_302ELV)) {
-	        if(VDisplay == 1200) ModeIndex = ModeIndex_1600x1200[Depth];
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VBFlags & (VB_301C | VB_302B | VB_302LV | VB_302ELV)) {
+	           if(VDisplay == 1200) ModeIndex = ModeIndex_1600x1200[Depth];
+		}
+	     }
+	     break;
+	case 1680:
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VBFlags & (VB_301C | VB_302B | VB_302LV | VB_302ELV)) {
+	           if(VDisplay == 1050) ModeIndex = ModeIndex_1680x1050[Depth];
+		}
 	     }
 	     break;
       }
@@ -1024,8 +1017,8 @@
              if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];
              break;
       	case 512:
-	     if( ((VBFlags & TV_YPBPR) && (VBFlags & (TV_YPBPR525P | TV_YPBPR750P | TV_YPBPR1080I))) ||
-	         (VBFlags & TV_HIVISION) 					    		     ||
+	     if( ((VBFlags & TV_YPBPR) && (VBFlags & (TV_YPBPR750P | TV_YPBPR1080I))) ||
+	         (VBFlags & TV_HIVISION) 					      ||
 	         ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) ) {
 	        if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];
 	     }
@@ -1037,17 +1030,19 @@
 	case 720:
 	     if((!(VBFlags & TV_HIVISION)) && (!((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I)))) {
                 if(VDisplay == 480) {
-		   if((VBFlags & TV_YPBPR) || (VBFlags & (TV_NTSC | TV_PALM)))
+		   /* if((VBFlags & TV_YPBPR) || (VBFlags & (TV_NTSC | TV_PALM))) */
                       ModeIndex = ModeIndex_720x480[Depth];
                 } else if(VDisplay == 576) {
-		   if((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL))
+		   if( ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR750P)) ||
+		       ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) )
                       ModeIndex = ModeIndex_720x576[Depth];
                 }
 	     }
              break;
 	case 768:
 	     if((!(VBFlags & TV_HIVISION)) && (!((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I)))) {
-	        if((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) {
+	        if( ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR750P)) ||
+		    ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) ) {
           	   if(VDisplay == 576) ModeIndex = ModeIndex_768x576[Depth];
 		}
              }
@@ -1072,9 +1067,16 @@
 	     }
 	     break;
 	case 1280:
-	     if((VBFlags & TV_HIVISION) || ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I))) {
-	        if(VDisplay == 720)       ModeIndex = ModeIndex_1280x720[Depth];
-		else if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];
+	     if(VDisplay == 720) {
+	        if((VBFlags & TV_HIVISION) ||
+		   ((VBFlags & TV_YPBPR) && (VBFlags & (TV_YPBPR1080I | TV_YPBPR750P)))) {
+	           ModeIndex = ModeIndex_1280x720[Depth];
+		}
+	     } else if(VDisplay == 1024) {
+	        if((VBFlags & TV_HIVISION) ||
+		   ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I))) {
+	           ModeIndex = ModeIndex_1280x1024[Depth];
+		}
 	     }
 	     break;
       }
@@ -1122,6 +1124,11 @@
 	case 856:
 		if(VDisplay == 480) ModeIndex = ModeIndex_856x480[Depth];
 		break;
+	case 960:
+		if(VGAEngine == SIS_315_VGA) {
+		   if(VDisplay == 540) ModeIndex = ModeIndex_960x540[Depth];
+		}
+		break;
 	case 1024:
 		if(VDisplay == 768)      ModeIndex = ModeIndex_1024x768[Depth];
 		else if(VDisplay == 576) ModeIndex = ModeIndex_1024x576[Depth];
@@ -1141,6 +1148,7 @@
 		   }
 		} else if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];
 		else if(VDisplay == 720)    ModeIndex = ModeIndex_1280x720[Depth];
+		else if(VDisplay == 800)    ModeIndex = ModeIndex_1280x800[Depth];
 		else if(VDisplay == 960)    ModeIndex = ModeIndex_1280x960[Depth];
 		break;
         case 1360:
@@ -1158,6 +1166,13 @@
 		   }
 		}
 		break;
+	case 1680:
+		if(VGAEngine == SIS_315_VGA) {
+		   if(VBFlags & (VB_301B|VB_301C|VB_302B)) {
+	              if(VDisplay == 1050) ModeIndex = ModeIndex_1680x1050[Depth];
+		   }
+		}
+		break;
    }
 
    return ModeIndex;
@@ -1255,13 +1270,13 @@
 void
 SiS_DisplayOn(SiS_Private *SiS_Pr)
 {
-   SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x01,0xDF,0x00);
+   SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x01,0xDF);
 }
 
 void
 SiS_DisplayOff(SiS_Private *SiS_Pr)
 {
-   SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x01,0xDF,0x20);
+   SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x01,0x20);
 }
 
 
@@ -1308,9 +1323,11 @@
    /* (SR11 is used for DDC and in enable/disablebridge) */
    SiS_Pr->SiS_SensibleSR11 = FALSE;
    SiS_Pr->SiS_MyCR63 = 0x63;
-   if(HwInfo->jChipType >= SIS_661) {
-      SiS_Pr->SiS_SensibleSR11 = TRUE;
+   if(HwInfo->jChipType >= SIS_330) {
       SiS_Pr->SiS_MyCR63 = 0x53;
+      if(HwInfo->jChipType >= SIS_661) {
+         SiS_Pr->SiS_SensibleSR11 = TRUE;
+      }
    }
 
    /* You should use the macros, not these flags directly */
@@ -1350,6 +1367,10 @@
 	 }
       }
    }
+   if(HwInfo->jChipType == SIS_760) {
+      temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x78);
+      if(temp1 & 0x30) SiS_Pr->SiS_SysFlags |= SF_760LFB;
+   }
 }
 
 /*********************************************/
@@ -1411,7 +1432,7 @@
 void
 SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-   ULONG   temp;
+   USHORT temp;
 
    SiS_Pr->SiS_IF_DEF_LVDS = 0;
    SiS_Pr->SiS_IF_DEF_TRUMPION = 0;
@@ -1422,18 +1443,19 @@
 
    SiS_Pr->SiS_ChrontelInit = 0;
 
+   /* Check for SiS30x first */
+   temp = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x00);
+   if((temp == 1) || (temp == 2)) return;
+
    switch(HwInfo->jChipType) {
 #ifdef SIS300
    case SIS_540:
    case SIS_630:
    case SIS_730:
-        /* Check for SiS30x first */
-        temp = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x00);
-	if((temp == 1) || (temp == 2)) return;
       	temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37);
       	temp = (temp & 0x0E) >> 1;
-      	if((temp >= 2) && (temp <= 5)) SiS_Pr->SiS_IF_DEF_LVDS = 1;
-      	if(temp == 3)   SiS_Pr->SiS_IF_DEF_TRUMPION = 1;
+      	if((temp >= 2) && (temp <= 5)) 	SiS_Pr->SiS_IF_DEF_LVDS = 1;
+      	if(temp == 3)   		SiS_Pr->SiS_IF_DEF_TRUMPION = 1;
       	if((temp == 4) || (temp == 5)) {
 		/* Save power status (and error check) - UNUSED */
 		SiS_Pr->SiS_Backup70xx = SiS_GetCH700x(SiS_Pr, 0x0e);
@@ -1448,8 +1470,8 @@
    case SIS_330:
         temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37);
       	temp = (temp & 0x0E) >> 1;
-      	if((temp >= 2) && (temp <= 3)) SiS_Pr->SiS_IF_DEF_LVDS = 1;
-      	if(temp == 3)  SiS_Pr->SiS_IF_DEF_CH70xx = 2;
+      	if((temp >= 2) && (temp <= 3)) 	SiS_Pr->SiS_IF_DEF_LVDS = 1;
+      	if(temp == 3)  			SiS_Pr->SiS_IF_DEF_CH70xx = 2;
         break;
    case SIS_661:
    case SIS_741:
@@ -1457,9 +1479,9 @@
    case SIS_760:
         temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38);
       	temp = (temp & 0xe0) >> 5;
-      	if((temp >= 2) && (temp <= 3)) SiS_Pr->SiS_IF_DEF_LVDS = 1;
-      	if(temp == 3)  SiS_Pr->SiS_IF_DEF_CH70xx = 2;
-	if(temp == 4)  SiS_Pr->SiS_IF_DEF_CONEX = 1;  /* Not yet supported */
+      	if((temp >= 2) && (temp <= 3)) 	SiS_Pr->SiS_IF_DEF_LVDS = 1;
+      	if(temp == 3)  			SiS_Pr->SiS_IF_DEF_CH70xx = 2;
+	if(temp == 4)  			SiS_Pr->SiS_IF_DEF_CONEX = 1;  /* Not yet supported */
         break;
 #endif
    default:
@@ -1487,44 +1509,78 @@
 /*        HELPER: Determine ROM usage        */
 /*********************************************/
 
+BOOLEAN
+SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
+{
+   UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
+   USHORT romversoffs, romvmaj = 1, romvmin = 0;
+
+   if(HwInfo->jChipType >= SIS_661) {
+      if((ROMAddr[0x1a] == 'N') &&
+         (ROMAddr[0x1b] == 'e') &&
+         (ROMAddr[0x1c] == 'w') &&
+         (ROMAddr[0x1d] == 'V')) {
+	 return TRUE;
+      }
+      romversoffs = ROMAddr[0x16] | (ROMAddr[0x17] << 8);
+      if(romversoffs) {
+	 if((ROMAddr[romversoffs+1] == '.') || (ROMAddr[romversoffs+4] == '.')) {
+	    romvmaj = ROMAddr[romversoffs] - '0';
+	    romvmin = ((ROMAddr[romversoffs+2] -'0') * 10) + (ROMAddr[romversoffs+3] - '0');
+	 }
+      }
+      if((romvmaj != 0) || (romvmin >= 92)) {
+	 return TRUE;
+      }
+   } else if(IS_SIS650740) {
+      if((ROMAddr[0x1a] == 'N') &&
+         (ROMAddr[0x1b] == 'e') &&
+         (ROMAddr[0x1c] == 'w') &&
+         (ROMAddr[0x1d] == 'V')) {
+	 return TRUE;
+      }
+   }
+   return FALSE;
+}
+
 static void
 SiSDetermineROMUsage(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
    UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
+   USHORT romptr = 0;
+
+   SiS_Pr->SiS_UseROM = FALSE;
+   SiS_Pr->SiS_ROMNew = FALSE;
 
    if((ROMAddr) && (HwInfo->UseROM)) {
-      if((ROMAddr[0x00] != 0x55) || (ROMAddr[0x01] != 0xAA)) {
-         SiS_Pr->SiS_UseROM = FALSE;
-      } else if(HwInfo->jChipType == SIS_300) {
-        /* 300: We check if the code starts below 0x220 by
-	 * checking the jmp instruction at the beginning
-	 * of the BIOS image.
-	 */
-	 if((ROMAddr[3] == 0xe9) &&
-	    ((ROMAddr[5] << 8) | ROMAddr[4]) > 0x21a)
+      if(HwInfo->jChipType == SIS_300) {
+         /* 300: We check if the code starts below 0x220 by
+	  * checking the jmp instruction at the beginning
+	  * of the BIOS image.
+	  */
+	 if((ROMAddr[3] == 0xe9) && ((ROMAddr[5] << 8) | ROMAddr[4]) > 0x21a)
 	    SiS_Pr->SiS_UseROM = TRUE;
-	 else
-	    SiS_Pr->SiS_UseROM = FALSE;
       } else if(HwInfo->jChipType < SIS_315H) {
-#if 0
-        /* Rest of 300 series: We don't use the ROM image if
-	 * the BIOS version < 2.0.0 as such old BIOSes don't
-	 * have the needed data at the expected locations.
-	 */
-         if(ROMAddr[0x06] < '2')  SiS_Pr->SiS_UseROM = FALSE;
-	 else                     SiS_Pr->SiS_UseROM = TRUE;
-#else
-	/* Sony's VAIO BIOS 1.09 follows the standard, so perhaps
-	 * the others do as well
-	 */
+	 /* Sony's VAIO BIOS 1.09 follows the standard, so perhaps
+	  * the others do as well
+	  */
 	 SiS_Pr->SiS_UseROM = TRUE;
-#endif
       } else {
-         /* 315/330 series stick to the standard */
+         /* 315/330 series stick to the standard(s) */
 	 SiS_Pr->SiS_UseROM = TRUE;
+	 if((SiS_Pr->SiS_ROMNew = SiSDetermineROMLayout661(SiS_Pr, HwInfo))) {
+	    /* Find out about LCD data table entry size */
+	    if((romptr = SISGETROMW(0x0102))) {
+	       if(ROMAddr[romptr + (32 * 16)] == 0xff)
+	          SiS_Pr->SiS661LCD2TableSize = 32;
+	       else if(ROMAddr[romptr + (34 * 16)] == 0xff)
+	          SiS_Pr->SiS661LCD2TableSize = 34;
+	       else if(ROMAddr[romptr + (36 * 16)] == 0xff)
+	          SiS_Pr->SiS661LCD2TableSize = 36;  /* 0.94 final */
+	    }
+	 }
       }
-   } else SiS_Pr->SiS_UseROM = FALSE;
-
+   }
 }
 
 /*********************************************/
@@ -1609,7 +1665,8 @@
 
   SiS_Pr->SiS_VBType = 0;
 
-  if(SiS_Pr->SiS_IF_DEF_LVDS == 1) return;
+  if((SiS_Pr->SiS_IF_DEF_LVDS) || (SiS_Pr->SiS_IF_DEF_CONEX))
+     return;
 
   flag = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x00);
 
@@ -1620,7 +1677,6 @@
   if(flag >= 2) {
      SiS_Pr->SiS_VBType = VB_SIS302B;
   } else if(flag == 1) {
-     SiS_Pr->SiS_VBType = VB_SIS301;
      if(rev >= 0xC0) {
        	SiS_Pr->SiS_VBType = VB_SIS301C;
      } else if(rev >= 0xB0) {
@@ -1628,102 +1684,22 @@
 	/* Check if 30xB DH version (no LCD support, use Panel Link instead) */
     	nolcd = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x23);
         if(!(nolcd & 0x02)) SiS_Pr->SiS_VBType |= VB_NoLCD;
+     } else {
+        SiS_Pr->SiS_VBType = VB_SIS301;
      }
   }
   if(SiS_Pr->SiS_VBType & (VB_SIS301B | VB_SIS301C | VB_SIS302B)) {
-     if(rev >= 0xD0) {
-	SiS_Pr->SiS_VBType &= ~(VB_SIS301B | VB_SIS301C | VB_SIS302B | VB_NoLCD);
-	if(rev >= 0xE0) {
-	   flag = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x39);
-	   if(flag == 0xff)
-	      SiS_Pr->SiS_VBType |= VB_SIS302LV;
-	   else
-	      SiS_Pr->SiS_VBType |= VB_SIS302ELV;
-	} else {
-	   SiS_Pr->SiS_VBType |= VB_SIS301LV;
-	}
+     if(rev >= 0xE0) {
+	flag = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x39);
+	if(flag == 0xff) SiS_Pr->SiS_VBType = VB_SIS302LV;
+	else 	 	 SiS_Pr->SiS_VBType = VB_SIS301C;  /* VB_SIS302ELV; */
+     } else if(rev >= 0xD0) {
+	SiS_Pr->SiS_VBType = VB_SIS301LV;
      }
   }
 }
 
 /*********************************************/
-/*            HELPER: GetDRAMSize            */
-/*********************************************/
-
-#ifndef LINUX_XF86
-static ULONG
-GetDRAMSize(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
-{
-  ULONG   AdapterMemorySize = 0;
-#ifdef SIS315H
-  USHORT  counter;
-#endif
-
-  switch(HwInfo->jChipType) {
-#ifdef SIS315H
-  case SIS_315H:
-  case SIS_315:
-  case SIS_315PRO:
-    	counter = SiS_GetReg(SiS_Pr->SiS_P3c4,0x14);
-	AdapterMemorySize = 1 << ((counter & 0xF0) >> 4);
-	counter >>= 2;
-	counter &= 0x03;
-	if(counter == 0x02) {
-		AdapterMemorySize += (AdapterMemorySize / 2);      /* DDR asymetric */
-	} else if(counter != 0) {
-		AdapterMemorySize <<= 1;                           /* SINGLE_CHANNEL_2_RANK or DUAL_CHANNEL_1_RANK */
-	}
-	AdapterMemorySize *= (1024*1024);
-        break;
-
-  case SIS_330:
-    	counter = SiS_GetReg(SiS_Pr->SiS_P3c4,0x14);
-	AdapterMemorySize = 1 << ((counter & 0xF0) >> 4);
-	counter &= 0x0c;
-	if(counter != 0) {
-		AdapterMemorySize <<= 1;
-	}
-	AdapterMemorySize *= (1024*1024);
-	break;
-
-  case SIS_550:
-  case SIS_650:
-  case SIS_740:
-  	counter = SiS_GetReg(SiS_Pr->SiS_P3c4,0x14) & 0x3F;
-      	counter++;
-      	AdapterMemorySize = counter * 4;
-      	AdapterMemorySize *= (1024*1024);
-	break;
-
-  case SIS_661:
-  case SIS_741:
-  case SIS_660:
-  case SIS_760:
-        counter = (SiS_GetReg(SiS_Pr->SiS_P3c4,0x79) & 0xf0) >> 4;
-	AdapterMemorySize = 1 << counter;
-      	AdapterMemorySize *= (1024*1024);
-        break;
-#endif
-
-#ifdef SIS300
-  case SIS_300:
-  case SIS_540:
-  case SIS_630:
-  case SIS_730:
-      	AdapterMemorySize = SiS_GetReg(SiS_Pr->SiS_P3c4,0x14) & 0x3F;
-      	AdapterMemorySize++;
-      	AdapterMemorySize *= (1024*1024);
-	break;
-#endif
-  default:
-        break;
-  }
-
-  return AdapterMemorySize;
-}
-#endif
-
-/*********************************************/
 /*           HELPER: Check RAM size          */
 /*********************************************/
 
@@ -1732,8 +1708,8 @@
 SiS_CheckMemorySize(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
                     USHORT ModeNo, USHORT ModeIdIndex)
 {
+  USHORT AdapterMemSize = HwInfo->ulVideoMemorySize / (1024*1024);
   USHORT memorysize,modeflag;
-  ULONG  temp;
 
   if(SiS_Pr->UseCustomMode) {
      modeflag = SiS_Pr->CModeFlag;
@@ -1749,11 +1725,8 @@
   memorysize >>= MemorySizeShift;		/* Get required memory size */
   memorysize++;
 
-  temp = GetDRAMSize(SiS_Pr, HwInfo);       	/* Get adapter memory size (in MB) */
-  temp /= (1024*1024);
-
-  if(temp < memorysize) return(FALSE);
-  else return(TRUE);
+  if(AdapterMemSize < memorysize) return FALSE;
+  return TRUE;
 }
 #endif
 
@@ -1767,11 +1740,14 @@
 {
    UCHAR data, temp;
 
-   if(*SiS_Pr->pSiS_SoftSetting & SoftDRAMType) {
-     data = *SiS_Pr->pSiS_SoftSetting & 0x03;
+   if((*SiS_Pr->pSiS_SoftSetting) & SoftDRAMType) {
+     data = (*SiS_Pr->pSiS_SoftSetting) & 0x03;
    } else {
      if(HwInfo->jChipType >= SIS_661) {
         data = SiS_GetReg(SiS_Pr->SiS_P3d4,0x78) & 0x07;
+	if(SiS_Pr->SiS_ROMNew) {
+	   data = ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x78) & 0xc0) >> 6);
+	}
      } else if(IS_SIS550650740) {
         data = SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x07;
      } else {	/* 315, 330 */
@@ -1798,10 +1774,14 @@
 USHORT
 SiS_GetMCLK(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
+  UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
   USHORT index;
 
   index = SiS_Get310DRAMType(SiS_Pr, HwInfo);
   if(HwInfo->jChipType >= SIS_661) {
+     if(SiS_Pr->SiS_ROMNew) {
+        return((USHORT)(SISGETROMW((0x90 + (index * 5) + 3))));
+     }
      return(SiS_Pr->SiS_MCLKData_0[index].CLOCK);
   } else if(index >= 4) {
      index -= 4;
@@ -1827,20 +1807,17 @@
 
   if(SiS_Pr->SiS_ModeType >= ModeEGA) {
      if(ModeNo > 0x13) {
-        AdapterMemorySize = GetDRAMSize(SiS_Pr, HwInfo);
-        SiS_SetMemory(VideoMemoryAddress,AdapterMemorySize,0);
+        SiS_SetMemory(VideoMemoryAddress, AdapterMemorySize, 0);
      } else {
         pBuffer = (USHORT *)VideoMemoryAddress;
-        for(i=0; i<0x4000; i++)
-           pBuffer[i] = 0x0000;
+        for(i=0; i<0x4000; i++) pBuffer[i] = 0x0000;
      }
   } else {
-     pBuffer = (USHORT *)VideoMemoryAddress;
      if(SiS_Pr->SiS_ModeType < ModeCGA) {
-        for(i=0; i<0x4000; i++)
-           pBuffer[i] = 0x0720;
+        pBuffer = (USHORT *)VideoMemoryAddress;
+        for(i=0; i<0x4000; i++) pBuffer[i] = 0x0720;
      } else {
-        SiS_SetMemory(VideoMemoryAddress,0x8000,0);
+        SiS_SetMemory(VideoMemoryAddress, 0x8000, 0);
      }
   }
 }
@@ -1896,10 +1873,10 @@
    UCHAR index;
 
    if(ModeNo <= 0x13) {
-     	index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_StTableIndex;
+      index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_StTableIndex;
    } else {
-     	if(SiS_Pr->SiS_ModeType <= 0x02) index = 0x1B;    /* 02 -> ModeEGA  */
-     	else index = 0x0F;
+      if(SiS_Pr->SiS_ModeType <= ModeEGA) index = 0x1B;
+      else index = 0x0F;
    }
    return index;
 }
@@ -1914,7 +1891,7 @@
     USHORT temp,temp1,temp2;
 
     if((ModeNo != 0x03) && (ModeNo != 0x10) && (ModeNo != 0x12))
-       return(1);
+       return(TRUE);
     temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x11);
     SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x11,0x80);
     temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x00);
@@ -1924,13 +1901,13 @@
     SiS_SetReg(SiS_Pr->SiS_P3d4,0x11,temp);
     if((HwInfo->jChipType >= SIS_315H) ||
        (HwInfo->jChipType == SIS_300)) {
-       if(temp2 == 0x55) return(0);
-       else return(1);
+       if(temp2 == 0x55) return(FALSE);
+       else return(TRUE);
     } else {
-       if(temp2 != 0x55) return(1);
+       if(temp2 != 0x55) return(TRUE);
        else {
           SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x35,0x01);
-          return(0);
+          return(FALSE);
        }
     }
 }
@@ -1944,6 +1921,43 @@
 }
 
 /*********************************************/
+/*            HELPER: ENABLE CRT1            */
+/*********************************************/
+
+static void
+SiS_SetupCR5x(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
+{
+   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
+      if(IS_SIS650) {
+	 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
+	 if(IS_SIS651) SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x20);
+	 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
+      } else if(IS_SIS661741660760) {
+         SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x61,0xf7);
+	 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
+	 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
+	 if(!SiS_Pr->SiS_ROMNew) {
+	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x3a,0xef);
+	 }
+      }
+   }
+}
+
+static void
+SiS_HandleCRT1(SiS_Private *SiS_Pr)
+{
+  SiS_SetRegAND(SiS_Pr->SiS_P3d4,SiS_Pr->SiS_MyCR63,0xbf);
+#if 0
+  if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x15) & 0x01)) {
+     if((SiS_GetReg(SiS_Pr->SiS_P3c4,0x15) & 0x0a) ||
+        (SiS_GetReg(SiS_Pr->SiS_P3c4,0x16) & 0x01)) {
+        SiS_SetRegOR(SiS_Pr->SiS_P3d4,SiS_Pr->SiS_MyCR63,0x40);
+     }
+  }
+#endif
+}
+
+/*********************************************/
 /*           HELPER: GetColorDepth           */
 /*********************************************/
 
@@ -1977,28 +1991,22 @@
 SiS_GetOffset(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
               USHORT RefreshRateTableIndex,PSIS_HW_INFO HwInfo)
 {
-  USHORT temp,colordepth,infoflag;
+  USHORT xres, temp, colordepth, infoflag;
 
   if(SiS_Pr->UseCustomMode) {
      infoflag = SiS_Pr->CInfoFlag;
-     temp = SiS_Pr->CHDisplay / 16;
+     xres = SiS_Pr->CHDisplay;
   } else {
      infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
-     temp = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeOffset;
-     temp = SiS_Pr->SiS_ScreenOffset[temp];
+     xres = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes;
   }
 
   colordepth = SiS_GetColorDepth(SiS_Pr,ModeNo,ModeIdIndex);
 
+  temp = xres / 16;
   if(infoflag & InterlaceMode) temp <<= 1;
-
   temp *= colordepth;
-
-  if( ( ((ModeNo >= 0x26) && (ModeNo <= 0x28)) ||
-        ModeNo == 0x3f ||
-	ModeNo == 0x42 ||
-	ModeNo == 0x45 ) ||
-      (SiS_Pr->UseCustomMode && (SiS_Pr->CHDisplay % 16)) ) {
+  if(xres % 16) {
      colordepth >>= 1;
      temp += colordepth;
   }
@@ -2103,9 +2111,15 @@
      CRTCdata = SiS_Pr->SiS_StandTable[StandTableIndex].CRTC[i];
      SiS_SetReg(SiS_Pr->SiS_P3d4,i,CRTCdata);                     /* Set CRTC(3d4) */
   }
-  if( ( (HwInfo->jChipType == SIS_630) ||
-        (HwInfo->jChipType == SIS_730) )  &&
-      (HwInfo->jChipRevision >= 0x30) ) {       	   /* for 630S0 */
+  if(HwInfo->jChipType >= SIS_661) {
+     SiS_SetupCR5x(SiS_Pr, HwInfo);
+     for(i = 0x13; i <= 0x14; i++) {
+        CRTCdata = SiS_Pr->SiS_StandTable[StandTableIndex].CRTC[i];
+        SiS_SetReg(SiS_Pr->SiS_P3d4,i,CRTCdata);
+     }
+  } else if( ( (HwInfo->jChipType == SIS_630) ||
+               (HwInfo->jChipType == SIS_730) )  &&
+             (HwInfo->jChipRevision >= 0x30) ) {       	   /* for 630S0 */
      if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
         if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToTV)) {
            SiS_SetReg(SiS_Pr->SiS_P3d4,0x18,0xFE);
@@ -2206,7 +2220,7 @@
 /*********************************************/
 
 static void
-SiS_ClearExt1Regs(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
+SiS_ClearExt1Regs(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo)
 {
   USHORT i;
 
@@ -2216,6 +2230,11 @@
 
   if(HwInfo->jChipType >= SIS_315H) {
      SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x37,0xFE);
+     if(ModeNo <= 0x13) {
+        if(ModeNo == 0x06 || ModeNo >= 0x0e) {
+	   SiS_SetReg(SiS_Pr->SiS_P3c4,0x0e,0x20);
+	}
+     }
   }
 }
 
@@ -2279,45 +2298,6 @@
 /*                  CRTC/2                   */
 /*********************************************/
 
-#ifdef SIS315H
-static void
-SiS_GetLCDACRT1Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
-		   USHORT RefreshRateTableIndex, USHORT *ResIndex,
-		   USHORT *DisplayType)
- {
-  USHORT modeflag = 0;
-
-  if(ModeNo <= 0x13) {
-     modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-     *ResIndex = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
-  } else {
-     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-     *ResIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
-  }
-
-  *ResIndex &= 0x3F;
-
-  *DisplayType = SiS_Pr->SiS_LCDResInfo;
-  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) *DisplayType += 32;
-  if(modeflag & HalfDCLK)                 *DisplayType += 16;
-
-  if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-        *DisplayType = 100;
-	if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) *DisplayType += 2;
-        if(modeflag & HalfDCLK)                 *DisplayType += 1;
-     }
-  } else if(SiS_Pr->SiS_CustomT == CUT_CLEVO1024) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-        *DisplayType = 104;
-	if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) *DisplayType += 2;
-        if(modeflag & HalfDCLK)                 *DisplayType += 1;
-     }
-  }
-
-}
-#endif
-
 static void
 SiS_SetCRT1CRTC(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
                 USHORT RefreshRateTableIndex,
@@ -2325,10 +2305,6 @@
 {
   UCHAR  index;
   USHORT temp,i,j,modeflag;
-#ifdef SIS315H
-  USHORT ResIndex,DisplayType;
-  const SiS_LCDACRT1DataStruct *LCDACRT1Ptr = NULL;
-#endif
 
   SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x11,0x7f);		/* unlock cr0-7 */
 
@@ -2336,7 +2312,7 @@
 
      modeflag = SiS_Pr->CModeFlag;
 
-     for(i=0,j=0;i<=07;i++,j++) {
+     for(i=0,j=0;i<=7;i++,j++) {
         SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]);
      }
      for(j=0x10;i<=10;i++,j++) {
@@ -2354,7 +2330,7 @@
 
      temp = (SiS_Pr->CCRT1CRTC[16] & 0x01) << 5;
      if(modeflag & DoubleScanMode) temp |= 0x80;
-     SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0xDF,temp);
+     SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0x5F,temp);
 
   } else {
 
@@ -2364,87 +2340,28 @@
         modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
      }
 
-     if((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
+     index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
 
-#ifdef SIS315H
-
-        SiS_GetLCDACRT1Ptr(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, &ResIndex, &DisplayType);
-
-        switch(DisplayType) {
-        case Panel_1024x768      : LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11024x768_1;     break;
-        case Panel_1280x1024     : LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11280x1024_1;    break;
-        case Panel_1400x1050     : LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11400x1050_1;    break;
-        case Panel_1600x1200     : LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11600x1200_1;    break;
-        case Panel_1024x768  + 16: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11024x768_1_H;   break;
-        case Panel_1280x1024 + 16: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11280x1024_1_H;  break;
-        case Panel_1400x1050 + 16: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11400x1050_1_H;  break;
-        case Panel_1600x1200 + 16: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11600x1200_1_H;  break;
-        case Panel_1024x768  + 32: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11024x768_2;     break;
-        case Panel_1280x1024 + 32: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11280x1024_2;    break;
-        case Panel_1400x1050 + 32: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11400x1050_2;    break;
-        case Panel_1600x1200 + 32: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11600x1200_2;    break;
-        case Panel_1024x768  + 48: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11024x768_2_H;   break;
-        case Panel_1280x1024 + 48: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11280x1024_2_H;  break;
-        case Panel_1400x1050 + 48: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11400x1050_2_H;  break;
-        case Panel_1600x1200 + 48: LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11600x1200_2_H;  break;
-        case 100:	  	   LCDACRT1Ptr = Compaq1280x1024_LCDACRT1_1;         break;
-        case 101:		   LCDACRT1Ptr = Compaq1280x1024_LCDACRT1_1_H;       break;
-        case 102:		   LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11280x1024_2;    break;
-        case 103:		   LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11280x1024_2_H;  break;
-        case 104:		   LCDACRT1Ptr = Clevo1024x768_LCDACRT1_1;           break;
-        case 105:		   LCDACRT1Ptr = Clevo1024x768_LCDACRT1_1_H;         break;
-        case 106:		   LCDACRT1Ptr = Clevo1024x768_LCDACRT1_2;           break;
-        case 107:		   LCDACRT1Ptr = Clevo1024x768_LCDACRT1_2_H;         break;
-        default:                   LCDACRT1Ptr = SiS_Pr->SiS_LCDACRT11024x768_1;     break;
-        }
-
-        for(i=0, j=0; i<=0x07; i++, j++) {
-           SiS_SetReg(SiS_Pr->SiS_P3d4,i,(LCDACRT1Ptr+ResIndex)->CR[j]);
-        }
-        for(i=0x10, j=8; i<=0x12; i++, j++) {
-           SiS_SetReg(SiS_Pr->SiS_P3d4,i,(LCDACRT1Ptr+ResIndex)->CR[j]);
-        }
-        for(i=0x15, j=11; i<=0x16; i++, j++) {
-           SiS_SetReg(SiS_Pr->SiS_P3d4,i,(LCDACRT1Ptr+ResIndex)->CR[j]);
-        }
-        for(i=0x0A, j=13; i<=0x0C; i++, j++) {
-           SiS_SetReg(SiS_Pr->SiS_P3c4,i,(LCDACRT1Ptr+ResIndex)->CR[j]);
-        }
-
-        temp = (LCDACRT1Ptr+ResIndex)->CR[16] & 0xE0;
-        SiS_SetReg(SiS_Pr->SiS_P3c4,0x0E,temp);
-
-        temp = ((LCDACRT1Ptr+ResIndex)->CR[16] & 0x01) << 5;
-        if(modeflag & DoubleScanMode) temp |= 0x80;
-        SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0xDF,temp);
-
-#endif
-
-     } else {
-
-        index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
-
-        for(i=0,j=0;i<=07;i++,j++) {
-          SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]);
-        }
-        for(j=0x10;i<=10;i++,j++) {
-          SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]);
-        }
-        for(j=0x15;i<=12;i++,j++) {
-          SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]);
-        }
-        for(j=0x0A;i<=15;i++,j++) {
-          SiS_SetReg(SiS_Pr->SiS_P3c4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]);
-        }
+     for(i=0,j=0;i<=7;i++,j++) {
+        SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]);
+     }
+     for(j=0x10;i<=10;i++,j++) {
+        SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]);
+     }
+     for(j=0x15;i<=12;i++,j++) {
+        SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]);
+     }
+     for(j=0x0A;i<=15;i++,j++) {
+        SiS_SetReg(SiS_Pr->SiS_P3c4,j,SiS_Pr->SiS_CRT1Table[index].CR[i]);
+     }
 
-        temp = SiS_Pr->SiS_CRT1Table[index].CR[16] & 0xE0;
-        SiS_SetReg(SiS_Pr->SiS_P3c4,0x0E,temp);
+     temp = SiS_Pr->SiS_CRT1Table[index].CR[16] & 0xE0;
+     SiS_SetReg(SiS_Pr->SiS_P3c4,0x0E,temp);
 
-        temp = ((SiS_Pr->SiS_CRT1Table[index].CR[16]) & 0x01) << 5;
-        if(modeflag & DoubleScanMode)  temp |= 0x80;
-        SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0xDF,temp);
+     temp = ((SiS_Pr->SiS_CRT1Table[index].CR[16]) & 0x01) << 5;
+     if(modeflag & DoubleScanMode)  temp |= 0x80;
+     SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0x5F,temp);
 
-     }
   }
 
   if(SiS_Pr->SiS_ModeType > ModeVGA) SiS_SetReg(SiS_Pr->SiS_P3d4,0x14,0x4F);
@@ -2482,7 +2399,7 @@
 
    DisplayUnit <<= 5;
    temp = (DisplayUnit & 0xff00) >> 8;
-   if (DisplayUnit & 0xff) temp++;
+   if(DisplayUnit & 0xff) temp++;
    temp++;
    SiS_SetReg(SiS_Pr->SiS_P3c4,0x10,temp);
 }
@@ -2917,7 +2834,8 @@
 {
   USHORT modeflag;
 
-  SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x3D,0xFE);  /* disable auto-threshold */
+  /* disable auto-threshold */
+  SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x3D,0xFE);
 
   if(SiS_Pr->UseCustomMode) {
      modeflag = SiS_Pr->CModeFlag;
@@ -2925,30 +2843,19 @@
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
   }
 
-  if(HwInfo->jChipType >= SIS_661) {
-     SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,0xAE);
-     SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x09,0xF0);
-     if(ModeNo > 0x13) {
+  SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,0xAE);
+  SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x09,0xF0);
+  if(ModeNo > 0x13) {
+     if(HwInfo->jChipType >= SIS_661) {
         if(!(modeflag & HalfDCLK)) {
 	   SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,0x34);
-	   if(ModeNo != 0x38) {
-	      SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x3D,0x01);
-	   }
+	   SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x3D,0x01);
 	}
-     }
-  } else {
-     if(ModeNo > 0x13) {
-        if( (!(modeflag & DoubleScanMode)) || (!(modeflag & HalfDCLK))) {
+     } else {
+        if((!(modeflag & DoubleScanMode)) || (!(modeflag & HalfDCLK))) {
            SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,0x34);
-           SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x09,0xF0);
            SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x3D,0x01);
-        } else {
-           SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,0xAE);
-           SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x09,0xF0);
-        }
-     } else {
-        SiS_SetReg(SiS_Pr->SiS_P3c4,0x08,0xAE);
-        SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x09,0xF0);
+	}
      }
   }
 }
@@ -2963,33 +2870,29 @@
                  USHORT ModeNo, USHORT RefreshRateTableIndex,
                  USHORT ModeIdIndex)
 {
-  USHORT data, data2=0;
-  USHORT VCLK, index=0;
+  USHORT data=0, VCLK=0, index=0;
 
-  if(ModeNo <= 0x13) VCLK = 0;
-  else {
+  if(ModeNo > 0x13) {
      if(SiS_Pr->UseCustomMode) {
         VCLK = SiS_Pr->CSRClock;
      } else {
         index = SiS_GetVCLK2Ptr(SiS_Pr,ModeNo,ModeIdIndex,
-	               RefreshRateTableIndex,HwInfo);
+	                      RefreshRateTableIndex,HwInfo);
         VCLK = SiS_Pr->SiS_VCLKData[index].CLOCK;
      }
   }
 
-  if(HwInfo->jChipType < SIS_315H) {		/* 300 series */
+  if(HwInfo->jChipType < SIS_315H) {
 
-     data2 = 0x00;
-     if(VCLK > 150) data2 |= 0x80;
-     SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0x7B,data2);
+     if(VCLK > 150) data |= 0x80;
+     SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0x7B,data);
 
-     data2 = 0x00;
-     if(VCLK >= 150) data2 |= 0x08;
-     SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x32,0xF7,data2);
+     data = 0x00;
+     if(VCLK >= 150) data |= 0x08;
+     SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x32,0xF7,data);
 
-  } else { 					/* 315 series */
+  } else {
 
-     data = 0;
      if(VCLK >= 166) data |= 0x0c;
      SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x32,0xf3,data);
 
@@ -2998,23 +2901,31 @@
      }
   }
 
-  data2 = 0x03;
-  if((VCLK >= 135) && (VCLK < 160))      data2 = 0x02;
-  else if((VCLK >= 160) && (VCLK < 260)) data2 = 0x01;
-  else if(VCLK >= 260)                   data2 = 0x00;
+  /* DAC speed */
+  if(HwInfo->jChipType >= SIS_661) {
 
-  if(HwInfo->jChipType == SIS_540) {
-     if((VCLK == 203) || (VCLK < 234)) data2 = 0x02;
-  }
+     SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0xE8,0x10);
 
-  if(HwInfo->jChipType < SIS_315H) {
-     SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0xFC,data2);  	/* DAC speed */
   } else {
-     if(HwInfo->jChipType > SIS_315PRO) {
-        /* This "if" is done in 330 and 650/LVDS/301LV BIOSes; Not in 315 BIOS */
-        if(ModeNo > 0x13) data2 &= 0xfc;
+
+     data = 0x03;
+     if((VCLK >= 135) && (VCLK < 160))      data = 0x02;
+     else if((VCLK >= 160) && (VCLK < 260)) data = 0x01;
+     else if(VCLK >= 260)                   data = 0x00;
+
+     if(HwInfo->jChipType == SIS_540) {
+        if((VCLK == 203) || (VCLK < 234))   data = 0x02;
+     }
+
+     if(HwInfo->jChipType < SIS_315H) {
+        SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0xFC,data);
+     } else {
+        if(HwInfo->jChipType > SIS_315PRO) {
+           if(ModeNo > 0x13) data &= 0xfc;
+        }
+        SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0xF8,data);
      }
-     SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0xF8,data2);  	/* DAC speed */
+
   }
 }
 
@@ -3022,75 +2933,51 @@
 SiS_SetCRT1ModeRegs(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
                     USHORT ModeNo,USHORT ModeIdIndex,USHORT RefreshRateTableIndex)
 {
-  USHORT data,data2;
-  USHORT infoflag=0,modeflag;
+  USHORT data,infoflag=0,modeflag;
   USHORT resindex,xres;
 #ifdef SIS315H
-  USHORT data3;
+  USHORT data2,data3;
   ULONG  longdata;
-#if 0
-  resinfo = 0;
-#endif
+  UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
 #endif
 
   if(SiS_Pr->UseCustomMode) {
      modeflag = SiS_Pr->CModeFlag;
      infoflag = SiS_Pr->CInfoFlag;
+     xres = SiS_Pr->CHDisplay;
   } else {
+     resindex = SiS_GetResInfo(SiS_Pr,ModeNo,ModeIdIndex);
      if(ModeNo > 0x13) {
     	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
     	infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag;
-#ifdef SIS315H
-#if 0
-	resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
-#endif
-#endif
+	xres = SiS_Pr->SiS_ModeResInfo[resindex].HTotal;
      } else {
     	modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
+	xres = SiS_Pr->SiS_StResInfo[resindex].HTotal;
      }
   }
 
   /* Disable DPMS */
   SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1F,0x3F);
 
-  if(ModeNo > 0x13) data = infoflag;
-  else data = 0;
-
-  data2 = 0;
+  data = 0;
   if(ModeNo > 0x13) {
-     if(SiS_Pr->SiS_ModeType > 0x02) {
-        data2 |= 0x02;
-        data2 |= ((SiS_Pr->SiS_ModeType - ModeVGA) << 2);
-     }
-  }
-
-#ifdef TWDEBUG
-  xf86DrvMsg(0, X_INFO, "Debug: Mode infoflag = %x, Chiptype %d\n",
-  	data, HwInfo->jChipType);
-#endif
-
-  if(data & InterlaceMode) data2 |= 0x20;
-  SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x06,0xC0,data2);
-
-  if(SiS_Pr->UseCustomMode) {
-     xres = SiS_Pr->CHDisplay;
-  } else {
-     resindex = SiS_GetResInfo(SiS_Pr,ModeNo,ModeIdIndex);
-     if(ModeNo <= 0x13) {
-      	xres = SiS_Pr->SiS_StResInfo[resindex].HTotal;
-     } else {
-      	xres = SiS_Pr->SiS_ModeResInfo[resindex].HTotal;
+     if(SiS_Pr->SiS_ModeType > ModeEGA) {
+        data |= 0x02;
+        data |= ((SiS_Pr->SiS_ModeType - ModeVGA) << 2);
      }
+     if(infoflag & InterlaceMode) data |= 0x20;
   }
+  SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x06,0xC0,data);
 
   if(HwInfo->jChipType != SIS_300) {
-     data = 0x0000;
+     data = 0;
      if(infoflag & InterlaceMode) {
-        if(xres <= 800) data = 0x0020;
+        if(xres <= 800)       data = 0x0020;
         else if(xres <= 1024) data = 0x0035;
-        else data = 0x0048;
+        else                  data = 0x0048;
      }
-     SiS_SetReg(SiS_Pr->SiS_P3d4,0x19,(data & 0x00FF));
+     SiS_SetReg(SiS_Pr->SiS_P3d4,0x19,(data & 0xFF));
      SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x1a,0xFC,(data >> 8));
   }
 
@@ -3098,18 +2985,12 @@
      SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x01,0x08);
   }
 
+  data = 0;
+  if(modeflag & LineCompareOff) data = 0x08;
   if(HwInfo->jChipType == SIS_300) {
-     if(modeflag & LineCompareOff) {
-        SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x0F,0x08);
-     } else {
-        SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x0F,0xF7);
-     }
+     SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0F,0xF7,data);
   } else {
-     if(modeflag & LineCompareOff) {
-        SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0F,0xB7,0x08);
-     } else {
-        SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x0F,0xB7);
-     }
+     SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0F,0xB7,data);
      if(SiS_Pr->SiS_ModeType == ModeEGA) {
         if(ModeNo > 0x13) {
   	   SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x0F,0x40);
@@ -3117,9 +2998,13 @@
      }
   }
 
+  if(HwInfo->jChipType >= SIS_661) {
+     SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x31,0xfb);
+  }
+
 #ifdef SIS315H
-  /* 315 BIOS sets SR17 at this point */
   if(HwInfo->jChipType == SIS_315PRO) {
+
      data = SiS_Get310DRAMType(SiS_Pr, HwInfo);
      data = SiS_Pr->SiS_SR15[2][data];
      if(SiS_Pr->SiS_ModeType == ModeText) {
@@ -3138,12 +3023,18 @@
 	}
      }
      SiS_SetReg(SiS_Pr->SiS_P3c4,0x17,data);
-  }
 
-  /* 330 BIOS sets SR17 at this point */
-  if(HwInfo->jChipType == SIS_330) {
+  } else if( (HwInfo->jChipType == SIS_330) ||
+             ((HwInfo->jChipType == SIS_760) && (SiS_Pr->SiS_SysFlags & SF_760LFB))) {
+
      data = SiS_Get310DRAMType(SiS_Pr, HwInfo);
-     data = SiS_Pr->SiS_SR15[2][data];
+     if(HwInfo->jChipType == SIS_330) {
+        data = SiS_Pr->SiS_SR15[2][data];
+     } else {
+        if(SiS_Pr->SiS_ROMNew) 	    data = ROMAddr[0xf6];
+        else if(SiS_Pr->SiS_UseROM) data = ROMAddr[0x100 + data];
+	else                        data = 0xba;
+     }
      if(SiS_Pr->SiS_ModeType <= ModeEGA) {
         data &= 0xc7;
      } else {
@@ -3156,31 +3047,38 @@
 	}
 
 	data3 = SiS_GetColorDepth(SiS_Pr,ModeNo,ModeIdIndex) >> 1;
-	if(!data3) data3++;
-
-	data2 *= data3;
+	if(data3) data2 *= data3;
 
 	longdata = SiS_GetMCLK(SiS_Pr, HwInfo) * 1024;
 
 	data2 = longdata / data2;
 
-	if(SiS_Pr->SiS_ModeType != Mode16Bpp) {
-           if(data2 >= 0x19c)      data = 0xba;
-	   else if(data2 >= 0x140) data = 0x7a;
-	   else if(data2 >= 0x101) data = 0x3a;
-	   else if(data2 >= 0xf5)  data = 0x32;
-	   else if(data2 >= 0xe2)  data = 0x2a;
-	   else if(data2 >= 0xc4)  data = 0x22;
-	   else if(data2 >= 0xac)  data = 0x1a;
-	   else if(data2 >= 0x9e)  data = 0x12;
-	   else if(data2 >= 0x8e)  data = 0x0a;
+	if(HwInfo->jChipType == SIS_330) {
+	   if(SiS_Pr->SiS_ModeType != Mode16Bpp) {
+              if     (data2 >= 0x19c) data = 0xba;
+	      else if(data2 >= 0x140) data = 0x7a;
+	      else if(data2 >= 0x101) data = 0x3a;
+	      else if(data2 >= 0xf5)  data = 0x32;
+	      else if(data2 >= 0xe2)  data = 0x2a;
+	      else if(data2 >= 0xc4)  data = 0x22;
+	      else if(data2 >= 0xac)  data = 0x1a;
+	      else if(data2 >= 0x9e)  data = 0x12;
+	      else if(data2 >= 0x8e)  data = 0x0a;
+	      else                    data = 0x02;
+	   } else {
+	      if(data2 >= 0x127)      data = 0xba;
+	      else                    data = 0x7a;
+	   }
+	} else {  /* 760+LFB */
+	   if     (data2 >= 0x190) data = 0xba;
+	   else if(data2 >= 0xff)  data = 0x7a;
+	   else if(data2 >= 0xd3)  data = 0x3a;
+	   else if(data2 >= 0xa9)  data = 0x1a;
+	   else if(data2 >= 0x93)  data = 0x0a;
 	   else                    data = 0x02;
-	 } else {
-	   if(data2 >= 0x127)      data = 0xba;
-	   else                    data = 0x7a;
-	 }
-      }
-      SiS_SetReg(SiS_Pr->SiS_P3c4,0x17,data);
+	}
+     }
+     SiS_SetReg(SiS_Pr->SiS_P3c4,0x17,data);
   }
 #endif
 
@@ -3202,46 +3100,6 @@
      } else {
         SiS_SetReg(SiS_Pr->SiS_P3d4,0x52,0x6c);
      }
-#if 0   /* What is SR0E[D5:6]? */
-     if(HwInfo->jChipType >= SIS_661) {
-        data = 0;
-        if((ModeNo == 6) || ((ModeNo >= 0x0e) && (ModeNo <= 0x13))) {
-	   data |= 0x20;
-	}
-	if(SiS_Pr->SiS_ModeType != ModeVGA) {
-	   if(SiS_Pr->UseCustomMode) {
-              if((xres >= 640) && (SiS_Pr->CVDisplay >= 480)) {
-	         data |= 0x40;
-	      }
-	      if((xres > 1280) && (SiS_Pr->CVDisplay > 1024)) {
-	         data |= 0x60;
-	      }
-	   }
-	} else if(ModeNo > 0x13) {   /* These are in the CRT1 table, and set by CRT1CRTC */
-	   if(resinfo >= SIS_RI_640x480) {
-	      if(resinfo <= SIS_RI_2048x1536) {
-	         data |= 0x40;
-		 if(resinfo > SIS_RI_1280x1024) {
-		    data |= 0x60;
-		    if(resinfo != SIS_RI_1600x1200) {
-		       data = SiS_GetReg(SiS_Pr->SiS_P3c4,0x0e);
-		       data += 0x60;
-		       SiS_SetReg(SiS_Pr->SiS_P3c4,0x0e);
-		       data = 0;
-		    }
-		 }
-	      }
-	      if(resinfo == SIS_RI_1152x864) {
-		 data = 0x40;
-	      }
-	      if(resinfo == SIS_RI_1400x1050) { /* TW */
-		 data = 0x60;
-	      }
-	   }
-	}
-	SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x0e,data);
-     }
-#endif
   }
 #endif
 }
@@ -3416,7 +3274,7 @@
   SiS_SetCRTCRegs(SiS_Pr, HwInfo, StandTableIndex);
   SiS_SetATTRegs(SiS_Pr, StandTableIndex, HwInfo);
   SiS_SetGRCRegs(SiS_Pr, StandTableIndex);
-  SiS_ClearExt1Regs(SiS_Pr,HwInfo);
+  SiS_ClearExt1Regs(SiS_Pr, HwInfo, ModeNo);
   SiS_ResetCRT1VCLK(SiS_Pr, HwInfo);
 
   SiS_Pr->SiS_SelectCRT2Rate = 0;
@@ -3482,21 +3340,28 @@
 }
 
 /*********************************************/
-/*            HELPER: ENABLE CRT1            */
+/*         HELPER: RESET VIDEO BRIDGE        */
 /*********************************************/
 
 static void
-SiS_HandleCRT1(SiS_Private *SiS_Pr)
+SiS_ResetVB(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-  SiS_SetRegAND(SiS_Pr->SiS_P3d4,SiS_Pr->SiS_MyCR63,0xbf);
-#if 0
-  if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x15) & 0x01)) {
-     if((SiS_GetReg(SiS_Pr->SiS_P3c4,0x15) & 0x0a) ||
-        (SiS_GetReg(SiS_Pr->SiS_P3c4,0x16) & 0x01)) {
-        SiS_SetRegOR(SiS_Pr->SiS_P3d4,SiS_Pr->SiS_MyCR63,0x40);
-     }
-  }
-#endif
+   UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
+   USHORT temp;
+
+   if(SiS_Pr->SiS_UseROM) {
+      if(HwInfo->jChipType < SIS_330) {
+         temp = ROMAddr[VB310Data_1_2_Offset] | 0x40;
+	 if(SiS_Pr->SiS_ROMNew) temp = ROMAddr[0x80] | 0x40;
+         SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
+      } else if(HwInfo->jChipType >= SIS_661) {
+         temp = ROMAddr[0x7e];
+         if(SiS_Pr->SiS_ROMNew) temp = ROMAddr[0x80];
+         if(HwInfo->jChipType >= SIS_660)                  temp |= 0x40;
+         else if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x7b) >= 100) temp |= 0x40;
+         SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
+      }
+   }
 }
 
 /*********************************************/
@@ -3585,13 +3450,12 @@
 SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,USHORT ModeNo)
 #endif
 {
-   ULONG   temp;
    USHORT  ModeIdIndex;
-   UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
    SISIOADDRESS BaseAddr = HwInfo->ulIOAddress;
    unsigned char backupreg=0;
 #ifndef LINUX_XF86
    USHORT  KeepLockReg;
+   ULONG   temp;
 
    SiS_Pr->UseCustomMode = FALSE;
    SiS_Pr->CRT1UsesCustomMode = FALSE;
@@ -3605,7 +3469,7 @@
    SiSRegInit(SiS_Pr, BaseAddr);
    SiS_GetSysFlags(SiS_Pr, HwInfo);
 
-#ifdef LINUX_XF86
+#if defined(LINUX_XF86) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(__AMD64__))
    if(pScrn) SiS_Pr->SiS_VGAINFO = SiS_GetSetBIOSScratch(pScrn, 0x489, 0xff);
    else
 #endif
@@ -3615,20 +3479,13 @@
    SiSSetLVDSetc(SiS_Pr, HwInfo);
    SiSDetermineROMUsage(SiS_Pr, HwInfo);
 
-   if(!SiS_Pr->UseCustomMode) {
-      ModeNo = ((ModeNo & 0x80) << 8) | (ModeNo & 0x7f);
-   }
+   SiS_Pr->SiS_flag_clearbuffer = 0;
 
-#ifdef LINUX_XF86
-   /* We never clear the buffer in X */
-   ModeNo |= 0x8000;
+   if(!SiS_Pr->UseCustomMode) {
+#ifndef LINUX_XF86
+      if(!(ModeNo & 0x80)) SiS_Pr->SiS_flag_clearbuffer = 1;
 #endif
-
-   if(ModeNo & 0x8000) {
-     	ModeNo &= 0x7fff;
-     	SiS_Pr->SiS_flag_clearbuffer = 0;
-   } else {
-     	SiS_Pr->SiS_flag_clearbuffer = 1;
+      ModeNo &= 0x7f;
    }
 
 #ifndef LINUX_XF86
@@ -3650,23 +3507,9 @@
 
    if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
       if(HwInfo->jChipType >= SIS_315H) {
-         SiS_UnLockCRT2(SiS_Pr,HwInfo);
-	 if(ROMAddr && SiS_Pr->SiS_UseROM) {
-	    if(HwInfo->jChipType < SIS_330) {
-               temp = ROMAddr[VB310Data_1_2_Offset];
-	       temp |= 0x40;
-	       SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
-            }
-	    if(HwInfo->jChipType > SIS_330) {
-	       temp = ROMAddr[0x7e];
-	       if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x7b) >= 100) temp |= 0x40;
-	       SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
-	    }
-	 }
+         SiS_ResetVB(SiS_Pr, HwInfo);
 	 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x32,0x10);
-
 	 SiS_SetRegOR(SiS_Pr->SiS_Part2Port,0x00,0x0c);
-
          backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38);
       } else {
          backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35);
@@ -3687,27 +3530,7 @@
 #endif
 
    if(HwInfo->jChipType >= SIS_315H) {
-#if 0
-      if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x17) & 0x08)  {
-         if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-            if(ModeNo != 0x10)  SiS_Pr->SiS_SetFlag |= SetDOSMode;
-         } else if((IS_SIS651) && (SiS_Pr->SiS_VBType & VB_NoLCD)) {
-            SiS_Pr->SiS_SetFlag |= SetDOSMode;
-         }
-      }
-#endif
-
-      if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-         if(IS_SIS650) {
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
-	    if(IS_SIS651) SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x20);
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
-	 } else if(IS_SIS661741660760) {
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x3a,0xef);
-	 }
-      }
+      SiS_SetupCR5x(SiS_Pr, HwInfo);
    }
 
    if(SiS_Pr->UseCustomMode) {
@@ -3751,7 +3574,7 @@
 
    if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
       if(HwInfo->jChipType >= SIS_315H) {
-         if(HwInfo->jChipType < SIS_661) {
+         if(!SiS_Pr->SiS_ROMNew) {
 	    if(SiS_IsVAMode(SiS_Pr,HwInfo)) {
 	       SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x35,0x01);
 	    } else {
@@ -3840,9 +3663,7 @@
 SiSBIOSSetModeCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
                DisplayModePtr mode, BOOLEAN IsCustom)
 {
-   ULONG   temp;
    USHORT  ModeIdIndex;
-   UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
    SISIOADDRESS BaseAddr = HwInfo->ulIOAddress;
    UShort  ModeNo   = 0;
    unsigned char backupreg=0;
@@ -3879,7 +3700,11 @@
    SiSRegInit(SiS_Pr, BaseAddr);
    SiSInitPtr(SiS_Pr, HwInfo);
    SiS_GetSysFlags(SiS_Pr, HwInfo);
+#if (defined(i386) || defined(__i386) || defined(__i386__) || defined(__AMD64__))
    SiS_Pr->SiS_VGAINFO = SiS_GetSetBIOSScratch(pScrn, 0x489, 0xff);
+#else
+   SiS_Pr->SiS_VGAINFO = 0x11;
+#endif
    SiSInitPCIetc(SiS_Pr, HwInfo);
    SiSSetLVDSetc(SiS_Pr, HwInfo);
    SiSDetermineROMUsage(SiS_Pr, HwInfo);
@@ -3941,23 +3766,9 @@
 
    if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
       if(HwInfo->jChipType >= SIS_315H) {
-         SiS_UnLockCRT2(SiS_Pr,HwInfo);
-         if(ROMAddr && SiS_Pr->SiS_UseROM) {
-	    if(HwInfo->jChipType < SIS_330) {
-               temp = ROMAddr[VB310Data_1_2_Offset];
-	       temp |= 0x40;
-               SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
-            }
-	    if(HwInfo->jChipType > SIS_330) {
-	       temp = ROMAddr[0x7e];
-	       if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x7b) >= 100) temp |= 0x40;
-	       SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
-	    }
-	 }
+	 SiS_ResetVB(SiS_Pr, HwInfo);
 	 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x32,0x10);
-
 	 SiS_SetRegOR(SiS_Pr->SiS_Part2Port,0x00,0x0c);
-
          backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38);
       } else {
          backupreg = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35);
@@ -3999,7 +3810,7 @@
 
    if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
       if(HwInfo->jChipType >= SIS_315H) {
-         if(HwInfo->jChipType < SIS_661) {
+         if(!SiS_Pr->SiS_ROMNew) {
 	    if(SiS_IsVAMode(SiS_Pr,HwInfo)) {
 	       SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x35,0x01);
 	    } else {
@@ -4069,7 +3880,11 @@
    SiSInitPtr(SiS_Pr, HwInfo);
    SiSRegInit(SiS_Pr, BaseAddr);
    SiS_GetSysFlags(SiS_Pr, HwInfo);
+#if (defined(i386) || defined(__i386) || defined(__i386__) || defined(__AMD64__))
    SiS_Pr->SiS_VGAINFO = SiS_GetSetBIOSScratch(pScrn, 0x489, 0xff);
+#else
+   SiS_Pr->SiS_VGAINFO = 0x11;
+#endif
    SiSInitPCIetc(SiS_Pr, HwInfo);
    SiSSetLVDSetc(SiS_Pr, HwInfo);
    SiSDetermineROMUsage(SiS_Pr, HwInfo);
@@ -4107,27 +3922,7 @@
    SiS_SetLowModeTest(SiS_Pr, ModeNo, HwInfo);
 
    if(HwInfo->jChipType >= SIS_315H) {
-#if 0
-      if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x17) & 0x08)  {
-         if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-            if(ModeNo != 0x10)  SiS_Pr->SiS_SetFlag |= SetDOSMode;
-         } else if((IS_SIS651) && (SiS_Pr->SiS_VBType & VB_NoLCD)) {
-            SiS_Pr->SiS_SetFlag |= SetDOSMode;
-         }
-      }
-#endif
-
-      if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-         if(IS_SIS650) {
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
-	    if(IS_SIS651) SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x20);
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
-	 } else if(IS_SIS661741660760) {
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x3a,0xef);
-	 }
-      }
+      SiS_SetupCR5x(SiS_Pr, HwInfo);
    }
 
    /* Set mode on CRT1 */
@@ -4296,12 +4091,188 @@
 }
 #endif
 
+#ifndef GETBITSTR
+#define BITMASK(h,l)    	(((unsigned)(1U << ((h)-(l)+1))-1)<<(l))
+#define GENMASK(mask)   	BITMASK(1?mask,0?mask)
+#define GETBITS(var,mask)   	(((var) & GENMASK(mask)) >> (0?mask))
+#define GETBITSTR(val,from,to)  ((GETBITS(val,from)) << (0?to))
+#endif
+
+static void
+SiS_CalcCRRegisters(SiS_Private *SiS_Pr, int depth)
+{
+   SiS_Pr->CCRT1CRTC[0]  =  ((SiS_Pr->CHTotal >> 3) - 5) & 0xff;		/* CR0 */
+   SiS_Pr->CCRT1CRTC[1]  =  (SiS_Pr->CHDisplay >> 3) - 1;			/* CR1 */
+   SiS_Pr->CCRT1CRTC[2]  =  (SiS_Pr->CHBlankStart >> 3) - 1;			/* CR2 */
+   SiS_Pr->CCRT1CRTC[3]  =  (((SiS_Pr->CHBlankEnd >> 3) - 1) & 0x1F) | 0x80;	/* CR3 */
+   SiS_Pr->CCRT1CRTC[4]  =  (SiS_Pr->CHSyncStart >> 3) + 3;			/* CR4 */
+   SiS_Pr->CCRT1CRTC[5]  =  ((((SiS_Pr->CHBlankEnd >> 3) - 1) & 0x20) << 2) |	/* CR5 */
+       			    (((SiS_Pr->CHSyncEnd >> 3) + 3) & 0x1F);
+
+   SiS_Pr->CCRT1CRTC[6]  =  (SiS_Pr->CVTotal - 2) & 0xFF;			/* CR6 */
+   SiS_Pr->CCRT1CRTC[7]  =  (((SiS_Pr->CVTotal - 2) & 0x100) >> 8)		/* CR7 */
+ 	 		  | (((SiS_Pr->CVDisplay - 1) & 0x100) >> 7)
+	 		  | ((SiS_Pr->CVSyncStart & 0x100) >> 6)
+	 	  	  | (((SiS_Pr->CVBlankStart - 1) & 0x100) >> 5)
+			  | 0x10
+	 		  | (((SiS_Pr->CVTotal - 2) & 0x200)   >> 4)
+	 		  | (((SiS_Pr->CVDisplay - 1) & 0x200) >> 3)
+	 		  | ((SiS_Pr->CVSyncStart & 0x200) >> 2);
+
+   SiS_Pr->CCRT1CRTC[16] = ((((SiS_Pr->CVBlankStart - 1) & 0x200) >> 4) >> 5); 	/* CR9 */
+
+   if(depth != 8) {
+      if(SiS_Pr->CHDisplay >= 1600)      SiS_Pr->CCRT1CRTC[16] |= 0x60;		/* SRE */
+      else if(SiS_Pr->CHDisplay >= 640)  SiS_Pr->CCRT1CRTC[16] |= 0x40;
+   }
+
+#if 0
+   if (mode->VScan >= 32)
+	regp->CRTC[9] |= 0x1F;
+   else if (mode->VScan > 1)
+	regp->CRTC[9] |= mode->VScan - 1;
+#endif
+
+   SiS_Pr->CCRT1CRTC[8] =  (SiS_Pr->CVSyncStart     ) & 0xFF;			/* CR10 */
+   SiS_Pr->CCRT1CRTC[9] =  ((SiS_Pr->CVSyncEnd      ) & 0x0F) | 0x80;		/* CR11 */
+   SiS_Pr->CCRT1CRTC[10] = (SiS_Pr->CVDisplay    - 1) & 0xFF;			/* CR12 */
+   SiS_Pr->CCRT1CRTC[11] = (SiS_Pr->CVBlankStart - 1) & 0xFF;			/* CR15 */
+   SiS_Pr->CCRT1CRTC[12] = (SiS_Pr->CVBlankEnd   - 1) & 0xFF;			/* CR16 */
+
+   SiS_Pr->CCRT1CRTC[13] =							/* SRA */
+                        GETBITSTR((SiS_Pr->CVTotal     -2), 10:10, 0:0) |
+                        GETBITSTR((SiS_Pr->CVDisplay   -1), 10:10, 1:1) |
+                        GETBITSTR((SiS_Pr->CVBlankStart-1), 10:10, 2:2) |
+                        GETBITSTR((SiS_Pr->CVSyncStart   ), 10:10, 3:3) |
+                        GETBITSTR((SiS_Pr->CVBlankEnd  -1),   8:8, 4:4) |
+                        GETBITSTR((SiS_Pr->CVSyncEnd     ),   4:4, 5:5) ;
+
+   SiS_Pr->CCRT1CRTC[14] =							/* SRB */
+                        GETBITSTR((SiS_Pr->CHTotal      >> 3) - 5, 9:8, 1:0) |
+                        GETBITSTR((SiS_Pr->CHDisplay    >> 3) - 1, 9:8, 3:2) |
+                        GETBITSTR((SiS_Pr->CHBlankStart >> 3) - 1, 9:8, 5:4) |
+                        GETBITSTR((SiS_Pr->CHSyncStart  >> 3) + 3, 9:8, 7:6) ;
+
+
+   SiS_Pr->CCRT1CRTC[15] =							/* SRC */
+                        GETBITSTR((SiS_Pr->CHBlankEnd >> 3) - 1, 7:6, 1:0) |
+                        GETBITSTR((SiS_Pr->CHSyncEnd  >> 3) + 3, 5:5, 2:2) ;
+}
+
+void
+SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex)
+{
+   USHORT modeflag, tempax, tempbx, VGAHDE = SiS_Pr->SiS_VGAHDE;
+   int i,j;
+
+   /* 1:1 data: use data set by setcrt1crtc() */
+   if(SiS_Pr->SiS_LCDInfo & LCDPass11) return;
+
+   if(ModeNo <= 0x13) {
+     modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
+   } else if(SiS_Pr->UseCustomMode) {
+     modeflag = SiS_Pr->CModeFlag;
+   } else {
+     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+   }
+
+   if(modeflag & HalfDCLK) VGAHDE >>= 1;
+
+   SiS_Pr->CHDisplay = VGAHDE;
+   SiS_Pr->CHBlankStart = VGAHDE;
+
+   SiS_Pr->CVDisplay = SiS_Pr->SiS_VGAVDE;
+   SiS_Pr->CVBlankStart = SiS_Pr->SiS_VGAVDE;
+
+   tempbx = SiS_Pr->PanelHT - SiS_Pr->PanelXRes;
+   tempax = SiS_Pr->SiS_VGAHDE;  /* not /2 ! */
+   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+      tempax = SiS_Pr->PanelXRes;
+   }
+   tempbx += tempax;
+   if(modeflag & HalfDCLK) tempbx -= VGAHDE;
+   SiS_Pr->CHTotal = SiS_Pr->CHBlankEnd = tempbx;
+
+   tempax = VGAHDE;
+   tempbx = SiS_Pr->CHTotal;
+   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+      tempbx = SiS_Pr->PanelXRes;
+      if(modeflag & HalfDCLK) tempbx >>= 1;
+      tempax += ((tempbx - tempax) >> 1);
+   }
+
+   tempax += SiS_Pr->PanelHRS;
+   SiS_Pr->CHSyncStart = tempax;
+   tempax += SiS_Pr->PanelHRE;
+   SiS_Pr->CHSyncEnd = tempax;
+
+   tempbx = SiS_Pr->PanelVT - SiS_Pr->PanelYRes;
+   tempax = SiS_Pr->SiS_VGAVDE;
+   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+      tempax = SiS_Pr->PanelYRes;
+   }
+   SiS_Pr->CVTotal = SiS_Pr->CVBlankEnd = tempbx + tempax;
+
+   tempax = SiS_Pr->SiS_VGAVDE;
+   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+      tempax += (SiS_Pr->PanelYRes - tempax) >> 1;
+   }
+   tempax += SiS_Pr->PanelVRS;
+   SiS_Pr->CVSyncStart = tempax;
+   tempax += SiS_Pr->PanelVRE;
+   SiS_Pr->CVSyncEnd = tempax;
+
+   SiS_CalcCRRegisters(SiS_Pr, 8);
+   SiS_Pr->CCRT1CRTC[16] &= ~0xE0;
+
+   SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x11,0x7f);
+
+   for(i=0,j=0;i<=7;i++,j++) {
+      SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]);
+   }
+   for(j=0x10;i<=10;i++,j++) {
+      SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]);
+   }
+   for(j=0x15;i<=12;i++,j++) {
+      SiS_SetReg(SiS_Pr->SiS_P3d4,j,SiS_Pr->CCRT1CRTC[i]);
+   }
+   for(j=0x0A;i<=15;i++,j++) {
+      SiS_SetReg(SiS_Pr->SiS_P3c4,j,SiS_Pr->CCRT1CRTC[i]);
+   }
+
+   tempax = SiS_Pr->CCRT1CRTC[16] & 0xE0;
+   SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0E,0x1F,tempax);
+
+   tempax = (SiS_Pr->CCRT1CRTC[16] & 0x01) << 5;
+   if(modeflag & DoubleScanMode) tempax |= 0x80;
+   SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,0x5F,tempax);
+
+#ifdef TWDEBUG
+   xf86DrvMsg(0, X_INFO, "%d %d %d %d  %d %d %d %d  (%d %d %d %d)\n",
+       	SiS_Pr->CHDisplay, SiS_Pr->CHSyncStart, SiS_Pr->CHSyncEnd, SiS_Pr->CHTotal,
+	SiS_Pr->CVDisplay, SiS_Pr->CVSyncStart, SiS_Pr->CVSyncEnd, SiS_Pr->CVTotal,
+	SiS_Pr->CHBlankStart, SiS_Pr->CHBlankEnd, SiS_Pr->CVBlankStart, SiS_Pr->CVBlankEnd);
+
+   xf86DrvMsg(0, X_INFO, " {{0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,\n",
+   	SiS_Pr->CCRT1CRTC[0], SiS_Pr->CCRT1CRTC[1],
+	SiS_Pr->CCRT1CRTC[2], SiS_Pr->CCRT1CRTC[3],
+	SiS_Pr->CCRT1CRTC[4], SiS_Pr->CCRT1CRTC[5],
+	SiS_Pr->CCRT1CRTC[6], SiS_Pr->CCRT1CRTC[7]);
+   xf86DrvMsg(0, X_INFO, "   0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,\n",
+   	SiS_Pr->CCRT1CRTC[8], SiS_Pr->CCRT1CRTC[9],
+	SiS_Pr->CCRT1CRTC[10], SiS_Pr->CCRT1CRTC[11],
+	SiS_Pr->CCRT1CRTC[12], SiS_Pr->CCRT1CRTC[13],
+	SiS_Pr->CCRT1CRTC[14], SiS_Pr->CCRT1CRTC[15]);
+   xf86DrvMsg(0, X_INFO, "   0x%02x}},\n", SiS_Pr->CCRT1CRTC[16]);
+#endif
+}
 
 /* ================ XFREE86 ================= */
 
 /* Helper functions */
 
 #ifdef LINUX_XF86
+
 USHORT
 SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode, int VBFlags)
 {
@@ -4382,73 +4353,16 @@
 
    pSiS->SiS_Pr->CSRClock = (pSiS->SiS_Pr->CDClock / 1000) + 1;
 
-   pSiS->SiS_Pr->CCRT1CRTC[0]  =  ((pSiS->SiS_Pr->CHTotal >> 3) - 5) & 0xff;
-   pSiS->SiS_Pr->CCRT1CRTC[1]  =  (pSiS->SiS_Pr->CHDisplay >> 3) - 1;
-   pSiS->SiS_Pr->CCRT1CRTC[2]  =  (pSiS->SiS_Pr->CHBlankStart >> 3) - 1;
-   pSiS->SiS_Pr->CCRT1CRTC[3]  =  (((pSiS->SiS_Pr->CHBlankEnd >> 3) - 1) & 0x1F) | 0x80;
-   pSiS->SiS_Pr->CCRT1CRTC[4]  =  (pSiS->SiS_Pr->CHSyncStart >> 3) + 3;
-   pSiS->SiS_Pr->CCRT1CRTC[5]  =  ((((pSiS->SiS_Pr->CHBlankEnd >> 3) - 1) & 0x20) << 2) |
-       				  (((pSiS->SiS_Pr->CHSyncEnd >> 3) + 3) & 0x1F);
-
-   pSiS->SiS_Pr->CCRT1CRTC[6]  =  (pSiS->SiS_Pr->CVTotal - 2) & 0xFF;
-   pSiS->SiS_Pr->CCRT1CRTC[7]  =  (((pSiS->SiS_Pr->CVTotal - 2) & 0x100) >> 8)
- 	 			| (((pSiS->SiS_Pr->CVDisplay - 1) & 0x100) >> 7)
-	 			| ((pSiS->SiS_Pr->CVSyncStart & 0x100) >> 6)
-	 			| (((pSiS->SiS_Pr->CVBlankStart - 1) & 0x100) >> 5)
-	 			| 0x10
-	 			| (((pSiS->SiS_Pr->CVTotal - 2) & 0x200)   >> 4)
-	 			| (((pSiS->SiS_Pr->CVDisplay - 1) & 0x200) >> 3)
-	 			| ((pSiS->SiS_Pr->CVSyncStart & 0x200) >> 2);
-
-   pSiS->SiS_Pr->CCRT1CRTC[16] = ((((pSiS->SiS_Pr->CVBlankStart - 1) & 0x200) >> 4) >> 5); 	/* cr9 */
-
-#if 0
-   if (mode->VScan >= 32)
-	regp->CRTC[9] |= 0x1F;
-   else if (mode->VScan > 1)
-	regp->CRTC[9] |= mode->VScan - 1;
-#endif
-
-   pSiS->SiS_Pr->CCRT1CRTC[8] =  (pSiS->SiS_Pr->CVSyncStart     ) & 0xFF;		/* cr10 */
-   pSiS->SiS_Pr->CCRT1CRTC[9] =  ((pSiS->SiS_Pr->CVSyncEnd      ) & 0x0F) | 0x80;	/* cr11 */
-   pSiS->SiS_Pr->CCRT1CRTC[10] = (pSiS->SiS_Pr->CVDisplay    - 1) & 0xFF;		/* cr12 */
-   pSiS->SiS_Pr->CCRT1CRTC[11] = (pSiS->SiS_Pr->CVBlankStart - 1) & 0xFF;		/* cr15 */
-   pSiS->SiS_Pr->CCRT1CRTC[12] = (pSiS->SiS_Pr->CVBlankEnd   - 1) & 0xFF;		/* cr16 */
-
-   pSiS->SiS_Pr->CCRT1CRTC[13] =
-                        GETBITSTR((pSiS->SiS_Pr->CVTotal     -2), 10:10, 0:0) |
-                        GETBITSTR((pSiS->SiS_Pr->CVDisplay   -1), 10:10, 1:1) |
-                        GETBITSTR((pSiS->SiS_Pr->CVBlankStart-1), 10:10, 2:2) |
-                        GETBITSTR((pSiS->SiS_Pr->CVSyncStart   ), 10:10, 3:3) |
-                        GETBITSTR((pSiS->SiS_Pr->CVBlankEnd  -1),   8:8, 4:4) |
-                        GETBITSTR((pSiS->SiS_Pr->CVSyncEnd     ),   4:4, 5:5) ;
-
-   pSiS->SiS_Pr->CCRT1CRTC[14] =
-                        GETBITSTR((pSiS->SiS_Pr->CHTotal      >> 3) - 5, 9:8, 1:0) |
-                        GETBITSTR((pSiS->SiS_Pr->CHDisplay    >> 3) - 1, 9:8, 3:2) |
-                        GETBITSTR((pSiS->SiS_Pr->CHBlankStart >> 3) - 1, 9:8, 5:4) |
-                        GETBITSTR((pSiS->SiS_Pr->CHSyncStart  >> 3) + 3, 9:8, 7:6) ;
-
-
-   pSiS->SiS_Pr->CCRT1CRTC[15] =
-                        GETBITSTR((pSiS->SiS_Pr->CHBlankEnd >> 3) - 1, 7:6, 1:0) |
-                        GETBITSTR((pSiS->SiS_Pr->CHSyncEnd  >> 3) + 3, 5:5, 2:2) ;
+   SiS_CalcCRRegisters(pSiS->SiS_Pr, depth);
 
    switch(depth) {
-   case 8:
-      	pSiS->SiS_Pr->CModeFlag |= 0x223b;
-	break;
-   case 16:
-      	pSiS->SiS_Pr->CModeFlag |= 0x227d;
-	break;
-   case 32:
-      	pSiS->SiS_Pr->CModeFlag |= 0x22ff;
-	break;		
-   default: 
-   	return 0;	
-   }	
-   
-   if(pSiS->SiS_Pr->CFlags & V_DBLSCAN) 
+   case 8:  pSiS->SiS_Pr->CModeFlag |= 0x223b; break;
+   case 16: pSiS->SiS_Pr->CModeFlag |= 0x227d; break;
+   case 32: pSiS->SiS_Pr->CModeFlag |= 0x22ff; break;
+   default: return 0;
+   }
+
+   if(pSiS->SiS_Pr->CFlags & V_DBLSCAN)
       pSiS->SiS_Pr->CModeFlag |= DoubleScanMode;
 
    if((pSiS->SiS_Pr->CVDisplay >= 1024)	||
@@ -4472,33 +4386,23 @@
 
    pSiS->SiS_Pr->UseCustomMode = TRUE;
 #ifdef TWDEBUG
-   xf86DrvMsg(0, X_INFO, "Custom mode %dx%d:\n", 
+   xf86DrvMsg(0, X_INFO, "Custom mode %dx%d:\n",
    	pSiS->SiS_Pr->CHDisplay,pSiS->SiS_Pr->CVDisplay);
    xf86DrvMsg(0, X_INFO, "Modeflag %04x, Infoflag %04x\n",
    	pSiS->SiS_Pr->CModeFlag, pSiS->SiS_Pr->CInfoFlag);
    xf86DrvMsg(0, X_INFO, " {{0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,\n",
-   	pSiS->SiS_Pr->CCRT1CRTC[0],
-	pSiS->SiS_Pr->CCRT1CRTC[1],
-	pSiS->SiS_Pr->CCRT1CRTC[2],
-	pSiS->SiS_Pr->CCRT1CRTC[3],
-	pSiS->SiS_Pr->CCRT1CRTC[4],
-	pSiS->SiS_Pr->CCRT1CRTC[5],
-	pSiS->SiS_Pr->CCRT1CRTC[6],
-	pSiS->SiS_Pr->CCRT1CRTC[7]);
+   	pSiS->SiS_Pr->CCRT1CRTC[0], pSiS->SiS_Pr->CCRT1CRTC[1],
+	pSiS->SiS_Pr->CCRT1CRTC[2], pSiS->SiS_Pr->CCRT1CRTC[3],
+	pSiS->SiS_Pr->CCRT1CRTC[4], pSiS->SiS_Pr->CCRT1CRTC[5],
+	pSiS->SiS_Pr->CCRT1CRTC[6], pSiS->SiS_Pr->CCRT1CRTC[7]);
    xf86DrvMsg(0, X_INFO, "  0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,\n",
-   	pSiS->SiS_Pr->CCRT1CRTC[8],
-	pSiS->SiS_Pr->CCRT1CRTC[9],
-	pSiS->SiS_Pr->CCRT1CRTC[10],
-	pSiS->SiS_Pr->CCRT1CRTC[11],
-	pSiS->SiS_Pr->CCRT1CRTC[12],
-	pSiS->SiS_Pr->CCRT1CRTC[13],
-	pSiS->SiS_Pr->CCRT1CRTC[14],
-	pSiS->SiS_Pr->CCRT1CRTC[15]);
+   	pSiS->SiS_Pr->CCRT1CRTC[8], pSiS->SiS_Pr->CCRT1CRTC[9],
+	pSiS->SiS_Pr->CCRT1CRTC[10], pSiS->SiS_Pr->CCRT1CRTC[11],
+	pSiS->SiS_Pr->CCRT1CRTC[12], pSiS->SiS_Pr->CCRT1CRTC[13],
+	pSiS->SiS_Pr->CCRT1CRTC[14], pSiS->SiS_Pr->CCRT1CRTC[15]);
    xf86DrvMsg(0, X_INFO, "  0x%02x}},\n", pSiS->SiS_Pr->CCRT1CRTC[16]);
    xf86DrvMsg(0, X_INFO, "Clock: 0x%02x, 0x%02x, %d\n",
-   	pSiS->SiS_Pr->CSR2B,
-	pSiS->SiS_Pr->CSR2C,
-	pSiS->SiS_Pr->CSRClock);
+   	pSiS->SiS_Pr->CSR2B, pSiS->SiS_Pr->CSR2C, pSiS->SiS_Pr->CSRClock);
 #endif
    return 1;
 }
@@ -4615,7 +4519,7 @@
       /* Horizontal display enable end */
       HDE = (cr_data & 0xff) |
             ((unsigned short) (sr_data & 0x0C) << 6);
-      E = HDE + 1;
+      E = HDE + 1;  /* 0x80 0x64 */
 
       cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[4];
 	/* inSISIDXREG(SISCR, 0x04, cr_data); */
@@ -4623,7 +4527,7 @@
       /* Horizontal retrace (=sync) start */
       HRS = (cr_data & 0xff) |
             ((unsigned short) (sr_data & 0xC0) << 2);
-      F = HRS - E - 3;
+      F = HRS - E - 3;  /* 0x06 0x06 */
 
       cr_data = pSiS->SiS_Pr->SiS_CRT1Table[index].CR[2];
 	/* inSISIDXREG(SISCR, 0x02, cr_data); */
@@ -4653,7 +4557,7 @@
       B = (temp > 0) ? temp : (temp + 256);
 
       temp = HRE - ((E + F + 3) & 63);
-      C = (temp > 0) ? temp : (temp + 64);
+      C = (temp > 0) ? temp : (temp + 64); /* 0x0b 0x0b */
 
       D = B - F - C;
 
@@ -5159,10 +5063,7 @@
 int
 sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
 			 unsigned char modeno, unsigned char rateindex,
-			 ULONG *left_margin, ULONG *right_margin, 
-			 ULONG *upper_margin, ULONG *lower_margin,
-			 ULONG *hsync_len, ULONG *vsync_len,
-			 ULONG *sync, ULONG *vmode)
+			 struct fb_var_screeninfo *var)
 {
     USHORT ModeNo = modeno;
     USHORT ModeIdIndex = 0, index = 0;
@@ -5185,7 +5086,7 @@
        return 0;
 #endif
     }
-    
+
     if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return 0;
 
     RefreshRateTableIndex = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex;
@@ -5250,15 +5151,15 @@
 	 /* Terrible hack, but the correct CRTC data for
 	  * these modes only produces a black screen...
 	  */
-       *left_margin = (400 - 376);
-       *right_margin = (328 - 320);
-       *hsync_len = (376 - 328);
+       var->left_margin = (400 - 376);
+       var->right_margin = (328 - 320);
+       var->hsync_len = (376 - 328);
 
     } else {
 
-       *left_margin = D * 8;
-       *right_margin = F * 8;
-       *hsync_len = C * 8;
+       var->left_margin = D * 8;
+       var->right_margin = F * 8;
+       var->hsync_len = C * 8;
 
     }
 
@@ -5320,47 +5221,47 @@
 
     D = B - F - C;
       
-    *upper_margin = D;
-    *lower_margin = F;
-    *vsync_len = C;
+    var->upper_margin = D;
+    var->lower_margin = F;
+    var->vsync_len = C;
 
     if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x8000)
-       *sync &= ~FB_SYNC_VERT_HIGH_ACT;
+       var->sync &= ~FB_SYNC_VERT_HIGH_ACT;
     else
-       *sync |= FB_SYNC_VERT_HIGH_ACT;
+       var->sync |= FB_SYNC_VERT_HIGH_ACT;
 
     if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x4000)       
-       *sync &= ~FB_SYNC_HOR_HIGH_ACT;
+       var->sync &= ~FB_SYNC_HOR_HIGH_ACT;
     else
-       *sync |= FB_SYNC_HOR_HIGH_ACT;
+       var->sync |= FB_SYNC_HOR_HIGH_ACT;
 		
-    *vmode = FB_VMODE_NONINTERLACED;
+    var->vmode = FB_VMODE_NONINTERLACED;
     if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080)
-       *vmode = FB_VMODE_INTERLACED;
+       var->vmode = FB_VMODE_INTERLACED;
     else {
-      j = 0;
-      while(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeID != 0xff) {
+       j = 0;
+       while(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeID != 0xff) {
           if(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeID ==
 	                  SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].ModeID) {
               if(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeFlag & DoubleScanMode) {
-	      	  *vmode = FB_VMODE_DOUBLE;
+	      	  var->vmode = FB_VMODE_DOUBLE;
               }
 	      break;
           }
 	  j++;
-      }
+       }
     }       
 
-    if((*vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) {
+    if((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) {
 #if 0  /* Do this? */
-       *upper_margin <<= 1;
-       *lower_margin <<= 1;
-       *vsync_len <<= 1;
-#endif
-    } else if((*vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
-       *upper_margin >>= 1;
-       *lower_margin >>= 1;
-       *vsync_len >>= 1;
+       var->upper_margin <<= 1;
+       var->lower_margin <<= 1;
+       var->vsync_len <<= 1;
+#endif
+    } else if((var->vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
+       var->upper_margin >>= 1;
+       var->lower_margin >>= 1;
+       var->vsync_len >>= 1;
     }
 
     return 1;       
--- diff/drivers/video/sis/init.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/init.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * Data and prototypes for init.c
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -101,6 +99,7 @@
 const USHORT  ModeIndex_800x600[]      = {0x30, 0x47, 0x00, 0x63};
 const USHORT  ModeIndex_848x480[]      = {0x39, 0x3b, 0x00, 0x3e};
 const USHORT  ModeIndex_856x480[]      = {0x3f, 0x42, 0x00, 0x45};
+const USHORT  ModeIndex_960x540[]      = {0x1d, 0x1e, 0x00, 0x1f};  /* 315 series only */
 const USHORT  ModeIndex_1024x768[]     = {0x38, 0x4a, 0x00, 0x64};
 const USHORT  ModeIndex_1024x576[]     = {0x71, 0x74, 0x00, 0x77};
 const USHORT  ModeIndex_1024x600[]     = {0x20, 0x21, 0x00, 0x22};  /* 300 series only */
@@ -111,10 +110,13 @@
 const USHORT  ModeIndex_300_1280x768[] = {0x55, 0x5a, 0x00, 0x5b};
 const USHORT  ModeIndex_310_1280x768[] = {0x23, 0x24, 0x00, 0x25};
 const USHORT  ModeIndex_1280x720[]     = {0x79, 0x75, 0x00, 0x78};
+const USHORT  ModeIndex_1280x800[]     = {0x14, 0x15, 0x00, 0x16};
 const USHORT  ModeIndex_1360x768[]     = {0x48, 0x4b, 0x00, 0x4e};
 const USHORT  ModeIndex_300_1360x1024[]= {0x67, 0x6f, 0x00, 0x72};  /* 300 series, BARCO only */
 const USHORT  ModeIndex_1400x1050[]    = {0x26, 0x27, 0x00, 0x28};  /* 315 series only */
+const USHORT  ModeIndex_1680x1050[]    = {0x17, 0x18, 0x00, 0x19};  /* 315 series only */
 const USHORT  ModeIndex_1600x1200[]    = {0x3c, 0x3d, 0x00, 0x66};
+const USHORT  ModeIndex_1920x1080[]    = {0x2c, 0x2d, 0x00, 0x73};  /* 315 series only */
 const USHORT  ModeIndex_1920x1440[]    = {0x68, 0x69, 0x00, 0x6b};
 const USHORT  ModeIndex_300_2048x1536[]= {0x6c, 0x6d, 0x00, 0x00};
 const USHORT  ModeIndex_310_2048x1536[]= {0x6c, 0x6d, 0x00, 0x6e};
@@ -253,9 +255,14 @@
 	{ 1024, 600, 8,16},   /* 0x19 */
 	{ 1152, 768, 8,16},   /* 0x1a */
 	{  768, 576, 8,16},   /* 0x1b */
-	{ 1360,1024, 8,16}    /* 0x1c */
+	{ 1360,1024, 8,16},   /* 0x1c */
+	{ 1680,1050, 8,16},   /* 0x1d */
+	{ 1280, 800, 8,16},   /* 0x1e */
+	{ 1920,1080, 8,16},   /* 0x1f */
+	{  960, 540, 8,16}    /* 0x20 */
 };
 
+#if defined(SIS300) || defined(SIS315H)
 static SiS_StandTableStruct SiS_StandTable[]=
 {
 /* 0x00: MD_0_200 */
@@ -694,6 +701,7 @@
    0xff}
  }
 };
+#endif
 
 /**************************************************************/
 /* SIS VIDEO BRIDGE ----------------------------------------- */
@@ -839,7 +847,8 @@
  {   36,  25,1060, 648,1270, 530, 438,   0, 438,0xeb,0x05,0x25,0x16},  /* 800x600, 400x300 - better */
  {    3,   2,1080, 619,1270, 540, 438,   0, 438,0xf3,0x00,0x1d,0x20},  /* 720x576 */
  {    1,   1,1170, 821,1270, 520, 686,   0, 686,0xF3,0x00,0x1D,0x20},  /* 1024x768 */
- {    1,   1,1170, 821,1270, 520, 686,   0, 686,0xF3,0x00,0x1D,0x20}   /* 1024x768 (for NTSC equ) */
+ {    1,   1,1170, 821,1270, 520, 686,   0, 686,0xF3,0x00,0x1D,0x20},  /* 1024x768 (for NTSC equ) */
+ {    9,   4, 848, 528,1270, 530,   0,   0,  50,0xf5,0xfb,0x1b,0x2a}   /* 720x480 test */
 };
 
 static const SiS_TVDataStruct  SiS_StNTSCData[] =
@@ -921,6 +930,22 @@
 
 static const SiS_TVDataStruct  SiS_Ext750pData[] =
 {
+#if 1
+ {  143,  65, 0x35a,0x1bb,0x4f6,0x1b8,0x0ab,  0, 0x0ab, 0x00,0x00,0x00,0x00},
+ {   88,  35, 0x35a,0x189,0x4f6,0x1b8,0x0ab,  0, 0x0ab, 0x00,0x00,0x00,0x00},
+ {   18,   5, 0x339,0x1ae,0x500,0x2d0,0x05c,  0, 0x05c, 0x00,0x00,0x00,0x00},
+ {  143,  70, 0x39c,0x189,0x4f6,0x1b8,0x05c,  0, 0x05c, 0x00,0x00,0x00,0x00},
+ {   99,  32, 0x320,0x1fe,0x500,0x2d0,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 640x480  */
+ {    5,   4, 0x5d8,0x29e,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 800x600  */
+#if 0
+ {    2,   1, 0x35a,0x1f7,0x4f6,0x1e0,    0,128,     0, 0x00,0x00,0x00,0x00},  /* 720x480  */
+#endif
+ {   99,  32, 0x320,0x1fe,0x500,0x2d0,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 720x480 test WORKS */
+ {   68,  64, 0x55f,0x346,0x500,0x2a8,0x27e,  0,     0, 0x00,0x00,0x00,0x00},  /* 1024x768 */
+ {    5,   2, 0x3a7,0x226,0x500,0x2a8,    0,128,     0, 0x00,0x00,0x00,0x00},  /* 720x576  */
+ {   25,  24, 0x5d8,0x2f3,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00}   /* 1280x720 WORKS */
+#endif
+#if 0
  {    3,   1, 0x3a7,0x1d6,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},
  {   24,   7, 0x3a7,0x1a4,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},
  {    3,   1, 0x3a7,0x1d6,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},
@@ -929,63 +954,105 @@
  {    5,   4, 0x5d8,0x29e,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 800x600   */
  {    2,   1, 0x35a,0x1f7,0x4f6,0x1e0,    0,128,     0, 0x00,0x00,0x00,0x00},  /* 720x480   */
  {   68,  64, 0x55f,0x346,0x500,0x2a8,0x27e,  0,     0, 0x00,0x00,0x00,0x00},  /* 1024x768  */
+ {   25,  24, 0x5d8,0x2f3,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00}   /* 1280x720  */
+#endif
+#if 0
+ {  136,  35, 0x339,0x181,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* TEST (0.93) BAD */
+ {   17,   6, 0x339,0x203,0x460,0x2a8,   50,  0,    50, 0x00,0x00,0x00,0x00},
+ {  136,  35, 0x339,0x181,0x460,0x2a8,   50,  0,    50, 0x00,0x00,0x00,0x00},
+ {   17,   6, 0x339,0x203,0x460,0x2a8,   50,  0,    50, 0x00,0x00,0x00,0x00},
+ {   85,  46, 0x3f4,0x27b,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 640x480   */
+ {   17,  16, 0x55f,0x323,0x460,0x2a8,0x2b6,  0,     0, 0x00,0x00,0x00,0x00},  /* 800x600   */
+ {  136,  35, 0x339,0x181,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 720x480   */
+ {  187,  74, 0x39d,0x203,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 1024x768  */
+ {   25,  24, 0x5d8,0x2f3,0x460,0x2a8,   50,  0,    50, 0x00,0x00,0x00,0x00}   /* 1280x720  */
+#endif
 };
 
-static const SiS_LCDDataStruct  SiS_LCD1280x960Data[] =
+static const SiS_LCDDataStruct  SiS_LCD1280x720Data[] =
 {
-	{    9,   2, 800, 500,1800,1000},
-	{    9,   2, 800, 500,1800,1000},
-	{    4,   1, 900, 500,1800,1000},
-	{    4,   1, 900, 500,1800,1000},
-	{    9,   2, 800, 500,1800,1000},
-	{   30,  11,1056, 625,1800,1000},
-	{    5,   3,1350, 800,1800,1000},
-	{    1,   1,1576,1050,1576,1050},
-	{    1,   1,1800,1000,1800,1000}
-};
-
-/* 1280x768 panel data from Fujitsu 7911 (VL-17WDX8).
- * Other 1280x768 panels (with clock != 81000, HTxVT != 1688x802)
- * will be treated as custom panels.
+	{  14,    5,  864,  432, 1344,  806 }, /* 640x400 */
+	{  16,    5,  864,  378, 1344,  806 },
+	{  14,    5,  864,  432, 1344,  806 },
+	{  16,    5,  864,  378, 1344,  806 },
+	{  24,   11,  924,  523, 1344,  806 }, /* 640x480 */
+	{   7,    5, 1152,  664, 1344,  806 }, /* 800x600 */
+	{   0,    0,    0,    0,    0,    0 },
+	{   0,    0,    0,    0,    0,    0 },
+	{   0,    0,    0,    0,    0,    0 },
+	{   0,    0,    0,    0,    0,    0 },
+	{   1,    1, 1344,  806, 1344,  806 }  /* 1280x720 */
+};
+
+/* About 1280x768: For TMDS, Panel_1280x768 will only be set if
+ * the panel is a Fujitsu 7911 (VL-17WDX8) (with clock 81, 1688x802)
+ * Other TMDS panels of this resolution will be treated as custom.
+ * For LVDS, we know two types. Data follows:
  */
 
-static const SiS_LCDDataStruct  SiS_StLCD1280x768Data[] =
+static const SiS_LCDDataStruct  SiS_StLCD1280x768_2Data[] =
 {
-	{ 211,  100, 2100,  408, 1688,  802 }, /* These values are *wrong* */
-	{ 211,   64, 1536,  358, 1688,  802 }, /* (which is why they aren't used yet) */
-	{ 211,  100, 2100,  408, 1688,  802 },
-	{ 211,   64, 1536,  358, 1688,  802 },
-	{ 211,   48,  840,  488, 1688,  802 },
-	{ 211,   72, 1008,  609, 1688,  802 },
-	{ 211,  128, 1400,  776, 1688,  802 },
-	{ 211,  205, 1680, 1041, 1688,  802 },
-	{ 1,      1, 1688,  802, 1688,  802 }  /* That's the only one that is correct */
-};
-
-static const SiS_LCDDataStruct  SiS_ExtLCD1280x768Data[] =
-{
-	{ 211,  100, 2100,  408, 1688,  802 }, /* These values are *wrong* */
-	{ 211,   64, 1536,  358, 1688,  802 }, /* (which is why they aren't used yet) */
-	{ 211,  100, 2100,  408, 1688,  802 },
-	{ 211,   64, 1536,  358, 1688,  802 },
-	{ 211,   48,  840,  488, 1688,  802 },
-	{ 211,   72, 1008,  609, 1688,  802 },
-	{ 211,  128, 1400,  776, 1688,  802 },
-	{ 211,  205, 1680, 1041, 1688,  802 },
-	{ 1,      1, 1688,  802, 1688,  802 }  /* That's the only one that is correct */
-};
-
-static const SiS_LCDDataStruct  SiS_NoScaleData1280x768[] =
-{
-        { 1, 1, 1688,  802, 1688,  802},
-	{ 1, 1, 1688,  802, 1688,  802},
-	{ 1, 1, 1688,  802, 1688,  802},
-	{ 1, 1, 1688,  802, 1688,  802},
-	{ 1, 1, 1688,  802, 1688,  802},
-	{ 1, 1, 1688,  802, 1688,  802},
-	{ 1, 1, 1688,  802, 1688,  802},
-	{ 1, 1, 1688,  802, 1688,  802},
-	{ 1, 1, 1688,  802, 1688,  802}
+	{  64,   21,  858,  434, 1408,  806 }, /* 640x400 */
+	{  32,    9,  858,  372, 1408,  806 },
+	{  64,   21,  858,  434, 1408,  806 },
+	{  32,    9,  858,  372, 1408,  806 },
+	{ 143,   68, 1024,  527, 1408,  806 }, /* 640x480 */
+	{  64,   51, 1364,  663, 1408,  806 }, /* 800x600 */
+	{  88,   81, 1296,  806, 1408,  806 }, /* 1024x768 */
+	{   0,    0,    0,    0,    0,    0 },
+	{   1,    1, 1408,  806, 1408,  806 }  /* 1280x768 */
+};
+
+static const SiS_LCDDataStruct  SiS_ExtLCD1280x768_2Data[] =
+{
+	{  64,   25, 1056,  422, 1408,  806 }, /*, 664 */
+	{ 128,   39,  884,  396, 1408,  806 }, /*, 640 */
+	{  64,   25, 1056,  422, 1408,  806 }, /*, 664 */
+	{ 128,   39,  884,  396, 1408,  806 }, /*, 640 */
+	{  32,   15, 1056,  513, 1408,  806 }, /*, 664 */
+	{ 176,  125, 1280,  640, 1408,  806 }, /*, 768 */
+	{  88,   81, 1296,  806, 1408,  806 },
+	{   0,    0,    0,    0,    0,    0 },
+	{   1,    1, 1408,  806, 1408,  806 }
+};
+
+static const SiS_LCDDataStruct  SiS_LCD1280x768_3Data[] =
+{
+	{  64,   25, 1056,  422, 1664,  798 },			/* 640x400 */
+	{ 128,   39,  884,  396, 1408,  806 }, /* ,640 */
+	{  64,   25, 1056,  422, 1664,  798 },			/* 640x400 */
+	{ 128,   39,  884,  396, 1408,  806 }, /* ,640 */
+	{  32,   15, 1056,  513, 1408,  806 }, /* ,664 */	/* 640x480 */
+	{ 176,  125, 1280,  640, 1408,  806 }, /* ,768 */	/* 800x600 */
+	{  64,   61, 1342,  806, 1408,  806 },			/* 1024x768 */
+	{   0,    0,    0,    0,    0,    0 },
+	{   1,    1, 1408,  806, 1408,  806 }			/* 1280x768 */
+};
+
+static const SiS_LCDDataStruct  SiS_LCD1280x800Data[] =
+{
+	{ 128,   51, 1122,  412, 1408,  816 }, /* 640x400 */
+	{ 128,   49, 1232,  361, 1408,  816 },
+	{ 128,   51, 1122,  412, 1408,  816 },
+	{ 128,   49, 1232,  361, 1408,  816 },
+	{   8,    3,  880,  491, 1408,  816 }, /* 640x480 */
+	{  11,    6, 1024,  612, 1408,  816 }, /* 800x600 */
+	{  22,   21, 1400,  784, 1408,  816 }, /* 1024x768 */
+	{   0,    0,    0,    0,    0,    0 },
+	{   1,    1, 1408,  816, 1408,  816 }  /* 1280x800 */
+};
+
+static const SiS_LCDDataStruct  SiS_LCD1280x960Data[] =
+{
+	{    9,   2,  800,  500, 1800, 1000 },
+	{    9,   2,  800,  500, 1800, 1000 },
+	{    4,   1,  900,  500, 1800, 1000 },
+	{    4,   1,  900,  500, 1800, 1000 },
+	{    9,   2,  800,  500, 1800, 1000 },
+	{   30,  11, 1056,  625, 1800, 1000 },
+	{    5,   3, 1350,  800, 1800, 1000 },
+	{    1,   1, 1576, 1050, 1576, 1050 },
+	{    1,   1, 1800, 1000, 1800, 1000 }
 };
 
 static const SiS_LCDDataStruct  SiS_StLCD1400x1050Data[] =
@@ -1003,28 +1070,37 @@
 
 static const SiS_LCDDataStruct  SiS_ExtLCD1400x1050Data[] =
 {
-	{ 211,  100, 2100,  408, 1688, 1066 },
+/*	{ 211,   60, 1260,  410, 1688, 1066 },    640x400 (6330) */
+	{ 211,  100, 2100,  408, 1688, 1066 }, /* 640x400 (6325) WORKS */
 	{ 211,   64, 1536,  358, 1688, 1066 },
 	{ 211,  100, 2100,  408, 1688, 1066 },
 	{ 211,   64, 1536,  358, 1688, 1066 },
-	{ 211,   48,  840,  488, 1688, 1066 },
-	{ 211,   72, 1008,  609, 1688, 1066 },
-	{ 211,  128, 1400,  776, 1688, 1066 },
-	{ 211,  205, 1680, 1041, 1688, 1066 },
-	{   1,    1, 1688, 1066, 1688, 1066 }
-};
-
-static const SiS_LCDDataStruct  SiS_NoScaleData1400x1050[] =
-{
-	{ 1, 1, 1688, 1066, 1688, 1066 },
-	{ 1, 1, 1688, 1066, 1688, 1066 },
-	{ 1, 1, 1688, 1066, 1688, 1066 },
-	{ 1, 1, 1688, 1066, 1688, 1066 },
-	{ 1, 1, 1688, 1066, 1688, 1066 },
-	{ 1, 1, 1688, 1066, 1688, 1066 },
-	{ 1, 1, 1688, 1066, 1688, 1066 },
-	{ 1, 1, 1688, 1066, 1688, 1066 },
-	{ 1, 1, 1688, 1066, 1688, 1066 }
+/*	{ 211,   80, 1400,  490, 1688, 1066 },    640x480 (6330) */
+	{ 211,   48,  840,  488, 1688, 1066 }, /* 640x480 (6325) WORKS */
+/*	{ 211,  117, 1638,  613, 1688, 1066 },    800x600 (6330) */
+	{ 211,   72, 1008,  609, 1688, 1066 }, /* 800x600 (6325) WORKS */
+	{ 211,  128, 1400,  776, 1688, 1066 }, /* 1024x768 */
+	{ 211,  205, 1680, 1041, 1688, 1066 }, /* 1280x1024 - not used (always unscaled) */
+	{   1,    1, 1688, 1066, 1688, 1066 }, /* 1400x1050 */
+	{   0,    0,    0,    0,    0,    0 }, /* kludge */
+	{ 211,  120, 1400,  730, 1688, 1066 }  /* 1280x720 */
+};
+
+static const SiS_LCDDataStruct  SiS_LCD1680x1050Data[] =
+{
+	{  95,   24, 1260,  410, 1900, 1066 }, /*  0 640x400 */
+	{  10,    3, 1710,  362, 1900, 1066 },
+	{  95,   24, 1260,  410, 1900, 1066 },
+	{  10,    3, 1710,  362, 1900, 1066 },
+	{  95,   32, 1400,  490, 1900, 1066 }, /*  4 640x480 */
+	{  95,   42, 1470,  610, 1900, 1066 }, /*  5 800x600 */
+	{  95,   64, 1750,  784, 1900, 1066 }, /*  6 1024x768 */
+	{  95,   94, 1900, 1055, 1900, 1066 }, /*  7 1280x1024 */
+	{  41,   31, 1900,  806, 1900, 1066 }, /*  8 1280x768 */
+	{  95,   69, 1800,  817, 1900, 1066 }, /*  9 1280x800 patch */
+	{  13,    9, 1900,  739, 1900, 1066 }, /* 10 1280x720 */
+	{  95,   94, 1880, 1066, 1900, 1066 }, /* 11 1400x1050 patch */
+	{   1,    1, 1900, 1066, 1900, 1066 }  /* 12 1680x1050 */
 };
 
 static const SiS_LCDDataStruct  SiS_StLCD1600x1200Data[] =
@@ -1037,440 +1113,59 @@
 	{ 4,  1,1080, 625, 2160, 1250 },
 	{ 5,  2,1350, 800, 2160, 1250 },
 	{135,88,1600,1100, 2160, 1250 },
-	{135,88,1600,1100, 2160, 1250 },
+	{72, 49,1680,1092, 2160, 1250 },
 	{ 1,  1,2160,1250, 2160, 1250 }
 };
 
 static const SiS_LCDDataStruct  SiS_ExtLCD1600x1200Data[] =
 {
-	{27, 4, 800, 500, 2160, 1250 },
+	{72,11, 990, 422, 2160, 1250 }, /* 640x400 (6330) WORKS */
+/*	{27, 4, 800, 500, 2160, 1250 },    640x400 (6235) */
 	{27, 4, 800, 500, 2160, 1250 },
 	{ 6, 1, 900, 500, 2160, 1250 },
 	{ 6, 1, 900, 500, 2160, 1250 },
-	{27, 1, 800, 500, 2160, 1250 },
+	{45, 8, 960, 505, 2160, 1250 }, /* 640x480 (6330) WORKS */
+/*	{27, 1, 800, 500, 2160, 1250 },    640x480 (6325) */
 	{ 4, 1,1080, 625, 2160, 1250 },
 	{ 5, 2,1350, 800, 2160, 1250 },
-	{27,16,1500,1064, 2160, 1250 },
-	{27,16,1500,1064, 2160, 1250 },
+	{27,16,1500,1064, 2160, 1250 }, /* 1280x1024 */
+	{72,49,1680,1092, 2160, 1250 }, /* 1400x1050 (6330, was not supported on 6325) */
 	{ 1, 1,2160,1250, 2160, 1250 }
 };
 
-static const SiS_LCDDataStruct  SiS_NoScaleData1600x1200[] =
-{
-        {1,  1, 2160, 1250, 2048, 1250},
-	{1,  1, 2160, 1250, 2048, 1250},
-	{1,  1, 2160, 1250, 2048, 1250},
-	{1,  1, 2160, 1250, 2048, 1250},
-	{1,  1, 2160, 1250, 2048, 1250},
-	{1,  1, 2160, 1250, 2048, 1250},
-	{1,  1, 2160, 1250, 2048, 1250},
-	{1,  1, 2160, 1250, 2048, 1250},
-	{1,  1, 2160, 1250, 2048, 1250},
-	{1,  1, 2160, 1250, 2048, 1250},
-};
-
 static const SiS_LCDDataStruct  SiS_NoScaleData[] =
 {
-	{ 1, 1, 800, 449, 800, 449 },
+	{ 1, 1, 800, 449, 800, 449 },  /* 0x00: 320x200, 640x400 */
 	{ 1, 1, 800, 449, 800, 449 },
 	{ 1, 1, 900, 449, 900, 449 },
 	{ 1, 1, 900, 449, 900, 449 },
-	{ 1, 1, 800, 525, 800, 525 },
-	{ 1, 1,1056, 628,1056, 628 },
-	{ 1, 1,1344, 806,1344, 806 },
-	{ 1, 1,1688,1066,1688,1066 },
-        { 1, 1,1688, 802,1688, 802 },  /* 1280x768: 802 was 806 in both cases */
-        { 1, 1,2160,1250,2160,1250 },  /* 1600x1200 */
-	{ 1, 1,1800,1000,1800,1000 }   /* 1280x960 */
-};
-
-/* *** LCDA *** */
-
-static const SiS_LVDSDataStruct  SiS_LCDA1024x768Data_1[]=
-{
-	{  960, 438,1344, 806},
-	{  960, 388,1344, 806},
-	{ 1040, 438,1344, 806},
-	{ 1040, 388,1344, 806},
-	{  960, 518,1344, 806},   /* 640x480 */
-	{ 1120, 638,1344, 806},   /* 800x600 */
-	{ 1344, 806,1344, 806},   /* 1024x768 */
-#if 0
-	{ 840, 438,1344, 806},
-	{ 840, 409,1344, 806},
-	{ 840, 438,1344, 806},
-	{ 840, 409,1344, 806},
-	{ 840, 518,1344, 806},   /* 640x480 */
-	{1050, 638,1344, 806},   /* 800x600 */
-	{1344, 806,1344, 806},   /* 1024x768 */
-#endif
-};
-
-static const SiS_LVDSDataStruct  SiS_LCDA1024x768Data_2[]=
-{
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-};
-
-static const SiS_LVDSDataStruct  SiS_LCDA1280x1024Data_1[]=
-{ /* Acer, Compaq */
-	{1048, 442,1688,1066},
-	{1048, 392,1688,1066},
-	{1128, 442,1688,1066},
-	{1128, 392,1688,1066},
-	{1048, 522,1688,1066},
-	{1208, 642,1688,1066},
-	{1432, 810,1688,1066},
-	{1688,1066,1688,1066}
-};
-
-static const SiS_LVDSDataStruct  SiS_LCDA1280x1024Data_2[]=
-{ /* Corrected (illegal in Acer, correct in Compaq) */
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066}
-};
-
-static const SiS_LVDSDataStruct  SiS_LCDA1400x1050Data_1[]=
-{ /* Clevo */
-        { 928, 416, 1688,1066},
-	{ 928, 366, 1688,1066},
-	{1008, 416, 1688,1066},
-	{1008, 366, 1688,1066},
-	{1200, 530, 1688,1066},
-	{1088, 616, 1688,1066},
-	{1312, 784, 1688,1066},
-	{1568,1040, 1688,1066},
-	{1688,1066, 1688,1066}
-};
-
-static const SiS_LVDSDataStruct  SiS_LCDA1400x1050Data_2[]=
-{ /* Clevo */
-    	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066}
-};
-
-static const SiS_LVDSDataStruct  SiS_LCDA1600x1200Data_1[]=
-{ /* Clevo (Temporary data)  */
-	{1200, 450, 2048,1250},
-	{1200, 400, 2048,1250},
-	{1280, 450, 2048,1250},
-	{1280, 400, 2048,1250},
-	{1200, 530, 2048,1250},
-	{1360, 650, 2048,1250},
-	{1584, 818, 2048,1250},
-	{1688,1066, 2048,1250},
-	{1688,1066, 2048,1250},
-	{2048,1250, 2048,1250}   /* this should be correct */
-#if 0
-	{2160,1250, 2048,1250}   /* ? */
-#endif
-};
-
-static const SiS_LVDSDataStruct  SiS_LCDA1600x1200Data_2[]=
-{ /* Clevo (Temporary data. Seems invalid.) */
-	{2160,1250, 2160,1250},
-	{2160,1250, 2160,1250},
-	{2160,1250, 2160,1250},
-	{2160,1250, 2160,1250},
-	{2160,1250, 2160,1250},
-	{2160,1250, 2160,1250},
-	{2160,1250, 2160,1250},
-	{2160,1250, 2160,1250},
-	{2160,1250, 2160,1250},
-	{2160,1250, 2160,1250}
-};
-
-/* LVDS SKEW for LCDA */
-
-static const SiS_LVDSDesStruct SiS_PanelType1076_1[]=
-{  /* 1024x768 */
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},   /* 805; was 0, 0 -> top line cut away (26/09/03) */
-};
-
-static const SiS_LVDSDesStruct SiS_PanelType1076_2[]=
-{  /* 1024x768; not expanded */
-	{ 1184, 622 },
-	{ 1184, 597 },
-	{ 1184, 622 },
-	{ 1184, 597 },
-	{ 1152, 650 },  /* 622 */
-	{ 1232, 722 },
-	{    0, 0   },  /* 805; was 0, 0 -> top line cut away (26/09/03) */
-};
-
-static const SiS_LVDSDesStruct SiS_PanelType1210_1[]=
-{  /* 1280x1024 */
-	{ 0 ,    0},
-	{ 0 ,    0},
-	{ 0 ,    0},
-	{ 0 ,    0},
-	{ 0 ,    0},
-	{ 0 ,    0},
-	{ 0 ,    0},
-	{ 0 , 1065},  /* Acer */
-	{ 0 ,    0}
-};
-
-static const SiS_LVDSDesStruct SiS_PanelType1210_2[]=
-{  /* 1280x1024; not expanded */
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0}
-};
-
-static const SiS_LVDSDesStruct SiS_PanelType1296_1[]=
-{  /* 1400x1050 */
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 1065}   /* Was 0,0 */
-};
-
-static const SiS_LVDSDesStruct SiS_PanelType1296_2[]=
-{  /* 1400x1050; not expanded */
-	{ 1308, 741 },
-	{ 1308, 716 },
-	{ 1308, 741 },
-	{ 1308, 716 },
-	{ 1308, 781 },
-	{ 1388, 841 },
-	{ 1500, 925 },
-	{ 1628,1053 },
-	{    0,1065 }
-#if 0
-	{ 808 , 740},
-	{ 0   , 715},
-	{ 632 , 740},
-	{ 632 , 715},
-	{ 1307, 780},
-	{ 1387,1157},
-	{ 1499, 924},
-	{ 1627,1052},
-	{ 0 , 0}
-#endif
-};
-
-static const SiS_LVDSDesStruct SiS_PanelType1600_1[]=
-{  /* 1600x1200 */
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0}
-};
-
-static const SiS_LVDSDesStruct SiS_PanelType1600_2[]=
-{  /* 1600x1200; not expanded */
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0}
-};
-
-#ifdef SIS315H
-
-/* LCDA CRT1 custom data */
-
-static const SiS_LCDACRT1DataStruct  Compaq1280x1024_LCDACRT1_1[]=
-{
- {{0x7e,0x4f,0x4f,0x82,0x58,0x06,0xb8,0x1f,
-   0x90,0x84,0x8f,0x8f,0xb9,0x30,0x00,0x06,
-   0x00}},
- {{0x7e,0x4f,0x4f,0x82,0x58,0x06,0x86,0x1f,
-   0x5e,0x82,0x5d,0x5d,0x87,0x10,0x00,0x06,
-   0x00}},
- {{0x7e,0x4f,0x4f,0x82,0x58,0x06,0xb8,0x1f,
-   0x90,0x84,0x8f,0x8f,0xb9,0x30,0x00,0x06,
-   0x00}},
- {{0x7e,0x4f,0x4f,0x82,0x58,0x06,0x86,0x1f,
-   0x5e,0x82,0x5d,0x5d,0x87,0x10,0x00,0x06,
-   0x00}},
- {{0x7e,0x4f,0x4f,0x82,0x58,0x06,0x08,0x3e,
-   0xe0,0x84,0xdf,0xdf,0x09,0x00,0x00,0x06,
-   0x00}},
- {{0x92,0x63,0x63,0x96,0x6c,0x1a,0x80,0xf0,
-   0x58,0x8c,0x57,0x57,0x81,0x20,0x00,0x06,
-   0x01}},
- {{0xae,0x7f,0x7f,0x92,0x88,0x96,0x28,0xf5,
-   0x00,0x84,0xff,0xff,0x29,0x10,0x00,0x02,
-   0x01}},
- {{0xce,0x9f,0x9f,0x92,0xa8,0x16,0x28,0x5a,
-   0x00,0x84,0xff,0xff,0x29,0x01,0x00,0x07,
-   0x01}}
-};
-
-static const SiS_LCDACRT1DataStruct  Compaq1280x1024_LCDACRT1_1_H[]=
-{
- {{0x56,0x27,0x27,0x9a,0x30,0x1e,0xb8,0x1f,
-   0x90,0x84,0x8f,0x8f,0xb9,0x30,0x00,0x05,
-   0x00}},
- {{0x3c,0x4f,0x4f,0x82,0x58,0x06,0x86,0xd1,
-   0xbc,0x80,0xbb,0xbb,0xe5,0x00,0x00,0x06,
-   0x01}},
- {{0x56,0x27,0x27,0x9a,0x30,0x1e,0xb8,0x1f,
-   0x90,0x84,0x8f,0x8f,0xb9,0x30,0x00,0x05,
-   0x00}},
- {{0x3c,0x4f,0x4f,0x82,0x58,0x06,0x86,0xd1,
-   0xbc,0x80,0xbb,0xbb,0xe5,0x00,0x00,0x06,
-   0x01}},
- {{0x56,0x27,0x27,0x9a,0x30,0x1e,0x08,0x3e,
-   0xe0,0x84,0xdf,0xdf,0x09,0x00,0x00,0x05,
-   0x00}},
- {{0x60,0x31,0x31,0x84,0x3a,0x88,0x80,0xf0,
-   0x58,0x8c,0x57,0x57,0x81,0x20,0x00,0x01,
-   0x01}},
- {{0x6e,0x3f,0x3f,0x92,0x48,0x96,0x28,0xf5,
-   0x00,0x84,0xff,0xff,0x29,0x10,0x00,0x01,
-   0x01}}
+	{ 1, 1, 800, 525, 800, 525 },  /* 0x04: 320x240, 640x480  */
+	{ 1, 1,1056, 628,1056, 628 },  /* 0x05: 400x300, 800x600  */
+	{ 1, 1,1344, 806,1344, 806 },  /* 0x06: 512x384, 1024x768 */
+	{ 1, 1,1688,1066,1688,1066 },  /* 0x07: 1280x1024 */
+        { 1, 1,1688, 802,1688, 802 },  /* 0x08: 1280x768: Fujitsu, TMDS only */
+        { 1, 1,2160,1250,2160,1250 },  /* 0x09: 1600x1200 */
+	{ 1, 1,1800,1000,1800,1000 },  /* 0x0a: 1280x960  */
+	{ 1, 1,1688,1066,1688,1066 },  /* 0x0b: 1400x1050 */
+	{ 1, 1,1650, 750,1650, 750 },  /* 0x0c: 1280x720 (TMDS, projector)  */
+	{ 1, 1,1656, 841,1656, 841 },  /* 0x0d: 1280x800 (was: 1408, 816) */
+	{ 1, 1,1900,1066,1900,1066 },  /* 0x0e: 1680x1050 (LVDS) */
+	{ 1, 1,1408, 806,1408, 806 },  /* 0x0f: 1280x768_2 */
+	{ 1, 1,1664, 798,1664, 798 },  /* 0x10: 1280x768_3 */
+	{ 1, 1,1688, 802,1688, 802 },  /* 0x11: 1280x768: Std, TMDS only */
+	{ 1, 1,1344, 806,1344, 806 },  /* 0x12: 1280x720 (LVDS)  */
+	{ 1, 1, 896, 497, 896, 497 },  /* 0x13: 720x480 */
+	{ 1, 1, 912, 597, 912, 597 },  /* 0x14: 720x576 */
+	{ 1, 1, 912, 597, 912, 597 },  /* 0x15: 768x576 */
+	{ 1, 1,1056, 497,1056, 497 },  /* 0x16: 848x480 */
+	{ 1, 1,1064, 497,1064, 497 },  /* 0x17: 856x480 */
+	{ 1, 1,1056, 497,1056, 497 },  /* 0x18: 800x480 */
+	{ 1, 1,1328, 739,1328, 739 },  /* 0x19: 1024x576 */
+	{ 1, 1,1680, 892,1680, 892 },  /* 0x1a: 1152x864 */
+	{ 1, 1,1808, 808,1808, 808 },  /* 0x1b: 1360x768 */
+	{ 1, 1,1104, 563,1104, 563 }   /* 0x1c: 960x540 */
 };
 
-static const SiS_LCDACRT1DataStruct  Clevo1024x768_LCDACRT1_1[]=
-{
- {{0x73,0x4f,0x4f,0x97,0x55,0x86,0xc4,0x1f,
-   0x92,0x89,0x8f,0x8f,0xb5,0x30,0x00,0x05,
-   0x00}},
- {{0x73,0x4f,0x4f,0x97,0x55,0x86,0x97,0x1f,
-   0x60,0x87,0x5d,0x5d,0x83,0x10,0x00,0x05,
-   0x00}},
- {{0x73,0x4f,0x4f,0x97,0x55,0x86,0xc4,0x1f,
-   0x92,0x89,0x8f,0x8f,0xb5,0x30,0x00,0x05,
-   0x00}},
- {{0x73,0x4f,0x4f,0x97,0x55,0x86,0x97,0x1f,
-   0x60,0x87,0x5d,0x5d,0x83,0x10,0x00,0x05,
-   0x00}},
- {{0x73,0x4f,0x4f,0x97,0x55,0x86,0x04,0x3e,
-   0xE2,0x89,0xDf,0xDf,0x05,0x00,0x00,0x05,
-   0x00}},
- {{0x87,0x63,0x63,0x8B,0x69,0x1A,0x7c,0xf0,
-   0x5A,0x8F,0x57,0x57,0x7D,0x20,0x00,0x26,
-   0x01}},
- {{0xA3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf5,
-   0x02,0x88,0xFf,0xFf,0x25,0x10,0x00,0x02,
-   0x01}}
-};
-
-static const SiS_LCDACRT1DataStruct  Clevo1024x768_LCDACRT1_1_H[]=
-{
- {{0x4b,0x27,0x27,0x8f,0x2b,0x03,0xc4,0x1f,
-   0x92,0x89,0x8f,0x8f,0xb5,0x30,0x00,0x44,
-   0x00}},
- {{0x4b,0x27,0x27,0x8f,0x2b,0x03,0x97,0x1f,
-   0x60,0x87,0x5D,0x5D,0x83,0x01,0x00,0x44,
-   0x00}},
- {{0x4b,0x27,0x27,0x8f,0x2b,0x03,0xc4,0x1f,
-   0x92,0x89,0x8f,0x8f,0xb5,0x30,0x00,0x44,
-   0x00}},
- {{0x4b,0x27,0x27,0x8f,0x2b,0x03,0x97,0x1f,
-   0x60,0x87,0x5D,0x5D,0x83,0x01,0x00,0x44,
-   0x00}},
- {{0x4b,0x27,0x27,0x8f,0x32,0x1b,0x04,0x3e,
-   0xE2,0x89,0xDf,0xDf,0x05,0x00,0x00,0x45,
-   0x00}},
- {{0x55,0x31,0x31,0x99,0x46,0x1d,0x7c,0xf0,
-   0x5A,0x8F,0x57,0x57,0x7D,0x20,0x00,0x55,
-   0x01}},
- {{0x63,0x3F,0x3F,0x87,0x4A,0x93,0x24,0xF5,
-   0x02,0x88,0xFF,0xFF,0x25,0x10,0x00,0x01,
-   0x01}}
-};
-
-static const SiS_LCDACRT1DataStruct  Clevo1024x768_LCDACRT1_2[]=
-{
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x4a,0x80,0x8f,0x8f,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x31,0x87,0x5d,0x5d,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x4a,0x80,0x8f,0x8f,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x31,0x87,0x5d,0x5d,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x4f,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
-   0x72,0x88,0xdf,0xdf,0x25,0x30,0x00,0x06,
-   0x00}},
- {{0xa3,0x63,0x63,0x87,0x78,0x89,0x24,0xf1,
-   0xae,0x84,0x57,0x57,0x25,0x30,0x00,0x02,
-   0x01}},
- {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf5,
-   0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
-   0x01}}
-};
-
-static const SiS_LCDACRT1DataStruct  Clevo1024x768_LCDACRT1_2_H[]=
-{
- {{0x7b,0x27,0x27,0x9f,0x46,0x97,0x24,0xbb,
-   0x57,0x8e,0x8f,0x8f,0x25,0x30,0x00,0x01,
-   0x00 }},
- {{0x7b,0x27,0x27,0x9f,0x46,0x97,0x24,0xbb,
-   0x3e,0x85,0x5d,0x5d,0x25,0x10,0x00,0x01,
-   0x00 }},
- {{0x7b,0x27,0x27,0x9f,0x46,0x97,0x24,0xbb,
-   0x57,0x8e,0x8f,0x8f,0x25,0x30,0x00,0x01,
-   0x00 }},
- {{0x7b,0x27,0x27,0x9f,0x46,0x97,0x24,0xbb,
-   0x3e,0x85,0x5d,0x5d,0x25,0x10,0x00,0x01,
-   0x00 }},
- {{0x7b,0x27,0x27,0x9f,0x46,0x97,0x24,0xbb,
-   0x7f,0x86,0xdf,0xdf,0x25,0x10,0x00,0x01,
-   0x00 }},
- {{0x71,0x31,0x31,0x95,0x46,0x97,0x24,0xf1,
-   0xbb,0x82,0x57,0x57,0x25,0x10,0x00,0x01,
-   0x01 }},
- {{0x63,0x3f,0x3f,0x87,0x46,0x97,0x24,0xf5,
-   0x0f,0x86,0xff,0xff,0x25,0x30,0x00,0x01,
-   0x01 }}
-};
-
-#endif  /* 315 */
 
 /**************************************************************/
 /* LVDS ----------------------------------------------------- */
@@ -1521,9 +1216,7 @@
 	{ 848, 389,1060, 629},
 	{ 848, 518,1060, 629},
 	{1056, 628,1056, 628},
-	{1056, 628,1056, 628},
-	{ 800, 449,1000, 644},
-	{ 800, 525,1000, 635}
+	{1056, 628,1056, 628}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS800x600Data_2[]=
@@ -1534,9 +1227,7 @@
 	{1056, 628,1056, 628},
 	{1056, 628,1056, 628},
 	{1056, 628,1056, 628},
-	{1056, 628,1056, 628},
-	{ 800, 449,1000, 644},
-	{ 800, 525,1000, 635}
+	{1056, 628,1056, 628}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1024x768Data_1[]=
@@ -1548,8 +1239,6 @@
 	{ 840, 518,1344, 806},   /* 640x480 */
 	{1050, 638,1344, 806},   /* 800x600 */
 	{1344, 806,1344, 806},   /* 1024x768 */
-	{ 800, 449,1280, 801},
-	{ 800, 525,1280, 813}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1024x768Data_2[]=
@@ -1561,11 +1250,8 @@
 	{1344, 806,1344, 806},
 	{1344, 806,1344, 806},
 	{1344, 806,1344, 806},
-	{ 800, 449,1280, 801},
-	{ 800, 525,1280, 813}
 };
 
-
 static const SiS_LVDSDataStruct  SiS_LVDS1280x1024Data_1[]=
 {
 	{1048, 442,1688,1066},
@@ -1716,9 +1402,7 @@
 	{ 840, 560,1344, 800},
 	{ 840, 689,1344, 800},
 	{1050, 800,1344, 800},
-	{1344, 800,1344, 800},
-	{ 800, 449,1280, 789},
-	{ 800, 525,1280, 785}
+	{1344, 800,1344, 800}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1024x600Data_2[] =
@@ -1729,9 +1413,7 @@
 	{1344, 800,1344, 800},
 	{1344, 800,1344, 800},
 	{1344, 800,1344, 800},
-	{1344, 800,1344, 800},
-	{ 800, 449,1280, 801},
-	{ 800, 525,1280, 813}
+	{1344, 800,1344, 800}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1152x768Data_1[] =
@@ -1742,9 +1424,7 @@
 	{ 840, 409,1344, 806},
 	{ 840, 518,1344, 806},
 	{1050, 638,1344, 806},
-	{1344, 806,1344, 806},
-	{ 800, 449,1280, 801},
-	{ 800, 525,1280, 813}
+	{1344, 806,1344, 806}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1152x768Data_2[] =
@@ -1755,9 +1435,7 @@
 	{1344, 806,1344, 806},
 	{1344, 806,1344, 806},
 	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{ 800, 449,1280, 801},
-	{ 800, 525,1280, 813}
+	{1344, 806,1344, 806}
 };
 
 /* Pass 1:1 data */
@@ -1770,7 +1448,7 @@
 	{ 800, 525,  800, 525},  /*  640x480   */
 	{1056, 628, 1056, 628},  /*  800x600   */
 	{1344, 806, 1344, 806},  /* 1024x768   */
-	{1344,1066, 1344,1066},  /* 1280x1024  */  /* INSERTED ! */
+	{1688,1066, 1688,1066},  /* 1280x1024  */  /* INSERTED ! */
  	{1688, 806, 1688, 806},  /* 1280x768   */
 	/* No other panels ! */
 };
@@ -1885,36 +1563,6 @@
         {1160, 840,1160, 840}
 };
 
-/* LVDS Skew */
-
-static const SiS_LVDSDesStruct  SiS_PanelTypeNS_1[]=
-{
-	{ 8,   0},
-	{ 8,   0},
-	{ 8,   0},
-	{ 8,   0},
-	{ 8,   0},
-	{ 0,   0},
-	{ 0,   0},
-	{ 0,   0},
-	{ 0, 806},
-	{ 0,   0}
-};
-
-static const SiS_LVDSDesStruct  SiS_PanelTypeNS_2[] =
-{
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0},
-	{ 0 , 0}
-};
-
 /* Chrontel TV Skew */
 
 static const SiS_LVDSDesStruct  SiS_CHTVUNTSCDesData[]=
@@ -2453,63 +2101,6 @@
    0x01}}
 };
 
-static const SiS_LVDSCRT1DataStruct  SiS_LVDSCRT1XXXxXXX_1[] =
-{
- {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
-   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
-   0x00}},
- {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
-   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
-   0x00}},
- {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
-   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
-   0x00}},
- {{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
-   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
-   0x00}},
- {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
-   0xe9,0x8b,0xe7,0x04,0x00,0x00,0x05,
-   0x00}},
- {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
-   0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
-   0x01}},
- {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
-   0x02,0x88,0xff,0x25,0x10,0x00,0x02,
-   0x01}},
- {{0xce,0x9f,0x92,0xa8,0x14,0x28,0x5a,
-   0x00,0x84,0xff,0x29,0x09,0x00,0x07,
-   0x01}},
- {{0xce,0x9f,0x92,0xa9,0x17,0x24,0xf5,
-   0x02,0x88,0xff,0x25,0x10,0x00,0x07,
-   0x01}}
-};
-
-static const SiS_LVDSCRT1DataStruct  SiS_LVDSCRT1XXXxXXX_1_H[] =
-{
- {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
-   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
-   0x00}},
- {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
-   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
-   0x00}},
- {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
-   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
-   0x00}},
- {{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
-   0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
-   0x00}},
- {{0x38,0x27,0x9c,0x2c,0x80,0x0b,0x3e,
-   0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
-   0x00}},
- {{0x4d,0x31,0x91,0x3b,0x03,0x72,0xf0,
-   0x58,0x8c,0x57,0x73,0x20,0x00,0x01,
-   0x01}},
- {{0x63,0x3f,0x87,0x4a,0x92,0x24,0xf5,
-   0x02,0x88,0xff,0x25,0x10,0x00,0x01,
-   0x01}}
-};
-
-
 /**************************************************************/
 /* COMMON --------------------------------------------------- */
 /**************************************************************/
@@ -2770,7 +2361,8 @@
    { 0x0000 }
 };
 
-USHORT  SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN);
+USHORT  SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay,
+			  int Depth, BOOLEAN FSTN, int LCDwith, int LCDheight);
 USHORT  SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN,
                           USHORT CustomT, int LCDwith, int LCDheight);
 USHORT  SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth);
@@ -2791,6 +2383,7 @@
 void	SiS_DisplayOff(SiS_Private *SiS_Pr);
 void	SiSRegInit(SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
 void	SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
+BOOLEAN SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
 void	SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable);
 void	SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable);
 void	SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
@@ -2801,6 +2394,7 @@
 USHORT	SiS_GetOffset(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
               USHORT RefreshRateTableIndex,PSIS_HW_INFO HwInfo);
 void	SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo, USHORT ModeIdIndex);
+void	SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex);
 #ifdef LINUX_XF86
 BOOLEAN	SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,ScrnInfoPtr pScrn,USHORT ModeNo, BOOLEAN dosetpitch);
 BOOLEAN	SiSBIOSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
@@ -2821,10 +2415,7 @@
 			      unsigned char modeno, unsigned char rateindex);
 int    sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
 			 unsigned char modeno, unsigned char rateindex,
-			 ULONG *left_margin, ULONG *right_margin,
-			 ULONG *upper_margin, ULONG *lower_margin,
-			 ULONG *hsync_len, ULONG *vsync_len,
-			 ULONG *sync, ULONG *vmode);
+			 struct fb_var_screeninfo *var);
 BOOLEAN sisfb_gettotalfrommode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
 		       unsigned char modeno, int *htotal, int *vtotal, unsigned char rateindex);
 #endif
--- diff/drivers/video/sis/init301.c	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/init301.c	2004-07-01 21:32:47.000000000 +0100
@@ -1,9 +1,10 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * Mode initializing code (CRT2 section)
  * for SiS 300/305/540/630/730 and
- *     SiS 315/550/650/M650/651/661FX/M661xX/740/741/M741/330/660/M660/760/M760
- * (Universal module for Linux kernel framebuffer and XFree86 4.x)
+ *     SiS 315/550/650/M650/651/661FX/M661xX/740/741(GX)/M741/330/660/M660/760/M760
+ * (Universal module for Linux kernel framebuffer and XFree86/X.org 4.x)
  *
  * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
  *
@@ -34,13 +35,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -76,10 +74,6 @@
 
 #include "init301.h"
 
-#if 0
-#define TWNEWPANEL
-#endif
-
 #ifdef SIS300
 #include "oem300.h"
 #endif
@@ -91,6 +85,8 @@
 #define SiS_I2CDELAY      1000
 #define SiS_I2CDELAYSHORT  150
 
+static USHORT SiS_GetBIOSLCDResInfo(SiS_Private *SiS_Pr);
+
 /*********************************************/
 /*         HELPER: Lock/Unlock CRT2          */
 /*********************************************/
@@ -98,29 +94,19 @@
 void
 SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-  if(HwInfo->jChipType >= SIS_315H)
-     SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2f,0x01);
-  else
-     SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x24,0x01);
+   if(HwInfo->jChipType >= SIS_315H)
+      SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2f,0x01);
+   else
+      SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x24,0x01);
 }
 
 void
 SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-  if(HwInfo->jChipType >= SIS_315H)
-     SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x2F,0xFE);
-  else
-     SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x24,0xFE);
-}
-
-/*********************************************/
-/*            HELPER: Enable CRT2            */
-/*********************************************/
-
-void
-SiS_EnableCRT2(SiS_Private *SiS_Pr)
-{
-  SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);
+   if(HwInfo->jChipType >= SIS_315H)
+      SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x2F,0xFE);
+   else
+      SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x24,0xFE);
 }
 
 /*********************************************/
@@ -130,7 +116,10 @@
 static void
 SiS_SetRegSR11ANDOR(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT DataAND, USHORT DataOR)
 {
-   if(HwInfo->jChipType >= SIS_661) DataAND &= 0x0f;
+   if(HwInfo->jChipType >= SIS_661) {
+      DataAND &= 0x0f;
+      DataOR  &= 0x0f;
+   }
    SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x11,DataAND,DataOR);
 }
 
@@ -138,117 +127,45 @@
 /*    HELPER: Get Pointer to LCD structure   */
 /*********************************************/
 
-/* For 661 series only */
 #ifdef SIS315H
-#if 0   /* Need to wait until hardware using this really exists */
 static UCHAR *
-GetLCDPtr661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, int tabletype,
-             USHORT ModeNo, USHORT ModeIdIndex, USHORT RRTI)
+GetLCDStructPtr661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-  UCHAR *ROMAddr =  HwInfo->pjVirtualRomBase;
-  UCHAR *tableptr = NULL;
-  UCHAR tablelengths[] = { 8, 7, 6, 6, 8, 6, 0, 0, 0 };
-  USHORT modeflag, CRT2Index, tablelength, lcdid, myid, tableptri;
-
-  if(ModeNo <= 0x13) {
-     modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-     CRT2Index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
-  } else {
-     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-     CRT2Index = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRT2CRTC;
-     /* This is total bullshit: */
-     if(SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO == SIS_RI_720x576) CRT2Index = 10;
-  }
-
-  if(tabletype <= 1) {
-#if 0	/* Not yet implemented */
-     if(ModeNo <= 0x13) {
-        CRT2Index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex]. + 5;
-     } else {
-        CRT2Index = SiS_Pr->SiS_RefIndex[RRTI]. + 5;
-     }
-     if(tabletype & 1) CRT2Index >>= 4;
-#endif
-  }
-
-  CRT2Index &= 0x0f;
-
-  tablelength = tablelengths[tabletype];
-  if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
-     if((tabletype == 5) || (tabletype == 7)) tablelength = 8;
-     if((tabletype == 3) || (tabletype == 8)) tablelength = 8;
-  }
-
-  if(!tablelength) return NULL;
-
-  tableptri = ROMAddr[0x222] | (ROMAddr[0x223] << 8);
-  tableptri += (tabletype << 1);
-  if(!tableptri) return NULL;
-  tableptr = &ROMAddr[tableptri];
+   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
+   UCHAR  *myptr = NULL;
+   USHORT romindex = 0;
 
-  do {
-     lcdid = tableptr[0];
-     if(lcdid == 0xff) break;
-     myid = SiS_Pr->SiS_LCDResInfo;
-     if((lcdid & 0x80) && (lcdid != 0x80)) {
-        lcdid &= 0x7f;
-	myid = SiS_Pr->SiS_LCDTypeInfo;
-     }
-     if(SiS_Pr->SiS_LCDInfo & LCDPass11) myid &= ~0x1f;
-
-     if(myid == lcdid) {
-	lcdid = tableptr[1] | (tableptr[2] << 8);
-	myid = SiS_Pr->SiS_LCDInfo661;
-	if(modeflag & HalfDCLK) myid |= 0x200;
-	if(ModeNo <= 0x13)      myid |= 0x400;
-	lcdid &= myid;
-	myid = tableptr[3] | (tableptr[4] << 8);
-	if(lcdid == myid) break;
-     }
-     tableptr += 7;
-  } while (1);
-
-  if(lcdid == myid) {
-     lcdid = tableptr[5] | (tableptr[6] << 8);
-     lcdid += (tablelength * CRT2Index);
-     return((UCHAR *)&ROMAddr[lcdid]);
-  }
+   /* Use the BIOS tables only for LVDS panels; DVI is unreliable
+    * due to the variaty of panels the BIOS doesn't know about.
+    */
 
-  return NULL;
+   if((SiS_Pr->SiS_ROMNew) && (SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) {
+      myptr = (UCHAR *)SiS_LCDStruct661;
+      romindex = SISGETROMW(0x100);
+      if(romindex) {
+         romindex += ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x7d) & 0x1f) * 26);
+         myptr = &ROMAddr[romindex];
+      }
+   }
+   return myptr;
 }
-#endif
 
-static UCHAR *
-GetLCDStructPtr661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
+static USHORT
+GetLCDStructPtr661_2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
    UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
-   USHORT lcdres = SiS_Pr->SiS_LCDResInfo;
-   USHORT lcdtype = SiS_Pr->SiS_LCDTypeInfo;
-   USHORT romindex=0;
-   UCHAR  *myptr = NULL;
-   UCHAR  lcdid;
+   USHORT romptr = 0;
 
-   if((ROMAddr) && SiS_Pr->SiS_UseROM) {
-      romindex = ROMAddr[0x256] | (ROMAddr[0x257] << 8);
-   }
-   if(romindex) {
-      myptr = &ROMAddr[romindex];
-   } else {
-      myptr = (UCHAR *)SiS_LCDStruct661;
-   }
+   /* Use the BIOS tables only for LVDS panels; DVI is unreliable
+    * due to the variaty of panels the BIOS doesn't know about.
+    */
 
-   while(myptr[0] != 0xff) {
-      lcdid = myptr[0];
-      if((lcdid & 0x80) && (lcdid != 0x80)) {
-         lcdres = lcdtype;
-	 lcdid &= 0x7f;
-      }
-      if(lcdid == lcdres) break;
-      myptr += 26;
+   if((SiS_Pr->SiS_ROMNew) && (SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) {
+      romptr = SISGETROMW(0x102);
+      romptr += ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4) * SiS_Pr->SiS661LCD2TableSize);
    }
-   if(myptr[0] == 0xff) return NULL;
 
-   return myptr;
+   return(romptr);
 }
 #endif
 
@@ -261,71 +178,72 @@
                    USHORT RefreshRateTableIndex, USHORT *i,
 		   PSIS_HW_INFO HwInfo)
 {
-  USHORT tempax,tempbx,infoflag;
-
-  tempbx = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].ModeID;
+  USHORT checkmask=0,modeid,infoflag;
 
-  tempax = 0;
+  modeid = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].ModeID;
 
   if(SiS_Pr->SiS_VBType & VB_SISVB) {
 
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) {
 
-      	tempax |= SupportRAMDAC2;
+      	checkmask |= SupportRAMDAC2;
 	if(HwInfo->jChipType >= SIS_315H) {
-	   tempax |= SupportRAMDAC2_135;
+	   checkmask |= SupportRAMDAC2_135;
 	   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-	      tempax |= SupportRAMDAC2_162;
+	      checkmask |= SupportRAMDAC2_162;
 	      if(SiS_Pr->SiS_VBType & VB_SIS301C) {
-		 tempax |= SupportRAMDAC2_202;
+		 checkmask |= SupportRAMDAC2_202;
 	      }
 	   }
 	}
 
      } else if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
 
-     	tempax |= SupportLCD;
+     	checkmask |= SupportLCD;
 	if(HwInfo->jChipType >= SIS_315H) {
-	   if(SiS_Pr->SiS_VBType & VB_SIS301B302B) {
-	      if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-	         if(tempbx == 0x2e) {  /* 640x480 */
-		    tempax |= Support64048060Hz;
-		 }
+	   if(SiS_Pr->SiS_VBType & VB_SISVB) {
+	      if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+	         if(modeid == 0x2e) checkmask |= Support64048060Hz;
 	      }
 	   }
 	}
 
      } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
 
-      	tempax |= SupportHiVision;
+      	checkmask |= SupportHiVision;
 
      } else if(SiS_Pr->SiS_VBInfo & (SetCRT2ToYPbPr525750|SetCRT2ToAVIDEO|SetCRT2ToSVIDEO|SetCRT2ToSCART)) {
 
-        tempax |= SupportTV;
+        checkmask |= SupportTV;
 	if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-	   tempax |= SupportTV1024;
+	   checkmask |= SupportTV1024;
+	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {
+	      if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) {
+	         checkmask |= SupportYPbPr750p;
+	      }
+	   }
 	}
 
      }
 
-  } else {	/* for LVDS  */
+  } else {	/* LVDS */
 
      if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
      	if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-           tempax |= SupportCHTV;
+           checkmask |= SupportCHTV;
       	}
      }
 
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-     	tempax |= SupportLCD;
+     	checkmask |= SupportLCD;
      }
 
   }
 
   /* Look backwards in table for matching CRT2 mode */
-  for(; SiS_Pr->SiS_RefIndex[RefreshRateTableIndex+(*i)].ModeID == tempbx; (*i)--) {
+  for(; SiS_Pr->SiS_RefIndex[RefreshRateTableIndex+(*i)].ModeID == modeid; (*i)--) {
      infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag;
-     if(infoflag & tempax) return(1);
+     if(infoflag & checkmask) return TRUE;
      if((*i) == 0) break;
   }
 
@@ -333,17 +251,17 @@
    * for a matching CRT2 mode if no mode was found yet.
    */
   for((*i) = 0; ; (*i)++) {
-     if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].ModeID != tempbx) {
-     	return(0);
+     if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].ModeID != modeid) {
+     	return FALSE;
      }
      infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag;
-     if(infoflag & tempax) return(1);
+     if(infoflag & checkmask) return TRUE;
   }
-  return(1);
+  return TRUE;
 }
 
 /*********************************************/
-/*              Get rate pointer             */
+/*              Get rate index               */
 /*********************************************/
 
 USHORT
@@ -361,20 +279,19 @@
   /* Do NOT check for UseCustomMode here, will skrew up FIFO */
   if(ModeNo == 0xfe) return 0;
 
-  if(ModeNo <= 0x13)
+  if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-  else
+  } else {
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+  }
 
   if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-     	if(modeflag & HalfDCLK) return(0);
+     	if(modeflag & HalfDCLK) return 0;
      }
   }
 
-  if(ModeNo < 0x14) return(0xFFFF);
-
-  /* CR33 holds refresh rate index for CRT1 [3:0] and CRT2 [7:4]. */
+  if(ModeNo < 0x14) return 0xFFFF;
 
   index = (SiS_GetReg(SiS_Pr->SiS_P3d4,0x33) >> SiS_Pr->SiS_SelectCRT2Rate) & 0x0F;
   backupindex = index;
@@ -389,7 +306,7 @@
 	}
 	if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
 	   if(!(SiS_Pr->SiS_VBType & VB_NoLCD)) {
-              temp = LCDRefreshIndex[SiS_Pr->SiS_LCDResInfo];
+              temp = LCDRefreshIndex[SiS_GetBIOSLCDResInfo(SiS_Pr)];
               if(index > temp) index = temp;
 	   }
 	}
@@ -462,37 +379,39 @@
 /*    HELPER: GET SOME DATA FROM BIOS ROM    */
 /*********************************************/
 
+#ifdef SIS300
 static BOOLEAN
 SiS_CR36BIOSWord23b(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
+  UCHAR *ROMAddr = (UCHAR *)HwInfo->pjVirtualRomBase;
   USHORT temp,temp1;
-  UCHAR *ROMAddr;
 
-  if((ROMAddr = (UCHAR *)HwInfo->pjVirtualRomBase) && SiS_Pr->SiS_UseROM) {
+  if(SiS_Pr->SiS_UseROM) {
      if((ROMAddr[0x233] == 0x12) && (ROMAddr[0x234] == 0x34)) {
         temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) & 0xff) >> 4);
-        temp1 = (ROMAddr[0x23c] << 8) | ROMAddr[0x23b];
-        if(temp1 & temp) return(1);
+        temp1 = SISGETROMW(0x23b);
+        if(temp1 & temp) return TRUE;
      }
   }
-  return(0);
+  return FALSE;
 }
 
 static BOOLEAN
 SiS_CR36BIOSWord23d(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
+  UCHAR *ROMAddr = (UCHAR *)HwInfo->pjVirtualRomBase;
   USHORT temp,temp1;
-  UCHAR *ROMAddr;
 
-  if((ROMAddr = (UCHAR *)HwInfo->pjVirtualRomBase) && SiS_Pr->SiS_UseROM) {
+  if(SiS_Pr->SiS_UseROM) {
      if((ROMAddr[0x233] == 0x12) && (ROMAddr[0x234] == 0x34)) {
         temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) & 0xff) >> 4);
-        temp1 = (ROMAddr[0x23e] << 8) | ROMAddr[0x23d];
-        if(temp1 & temp) return(1);
+        temp1 = SISGETROMW(0x23d);
+        if(temp1 & temp) return TRUE;
      }
   }
-  return(0);
+  return FALSE;
 }
+#endif
 
 /*********************************************/
 /*          HELPER: DELAY FUNCTIONS          */
@@ -508,6 +427,7 @@
   }
 }
 
+#if defined(SIS300) || defined(SIS315H)
 static void
 SiS_GenericDelay(SiS_Private *SiS_Pr, USHORT delay)
 {
@@ -522,6 +442,7 @@
      delay--;
   }
 }
+#endif
 
 #ifdef SIS315H
 static void
@@ -533,6 +454,7 @@
 }
 #endif
 
+#if defined(SIS300) || defined(SIS315H)
 static void
 SiS_ShortDelay(SiS_Private *SiS_Pr, USHORT delay)
 {
@@ -540,12 +462,15 @@
      SiS_GenericDelay(SiS_Pr,0x42);
   }
 }
+#endif
 
 static void
 SiS_PanelDelay(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT DelayTime)
 {
+#if defined(SIS300) || defined(SIS315H)
   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
   USHORT PanelID, DelayIndex, Delay=0;
+#endif
 
   if(HwInfo->jChipType < SIS_315H) {
 
@@ -560,23 +485,19 @@
          Delay = 3;
       } else {
          if(DelayTime >= 2) DelayTime -= 2;
-
          if(!(DelayTime & 0x01)) {
        	    Delay = SiS_Pr->SiS_PanelDelayTbl[DelayIndex].timer[0];
          } else {
        	    Delay = SiS_Pr->SiS_PanelDelayTbl[DelayIndex].timer[1];
          }
-	 if((ROMAddr) && (SiS_Pr->SiS_UseROM)) {
+	 if(SiS_Pr->SiS_UseROM) {
             if(ROMAddr[0x220] & 0x40) {
-               if(!(DelayTime & 0x01)) {
-	          Delay = (USHORT)ROMAddr[0x225];
-               } else {
-	    	  Delay = (USHORT)ROMAddr[0x226];
-               }
+               if(!(DelayTime & 0x01)) Delay = (USHORT)ROMAddr[0x225];
+               else 	    	       Delay = (USHORT)ROMAddr[0x226];
             }
          }
       }
-      SiS_ShortDelay(SiS_Pr,Delay);
+      SiS_ShortDelay(SiS_Pr, Delay);
 
 #endif  /* SIS300 */
 
@@ -584,11 +505,19 @@
 
 #ifdef SIS315H
 
-      if(HwInfo->jChipType >= SIS_330) return;
+      if((HwInfo->jChipType >= SIS_661)    ||
+         (HwInfo->jChipType <= SIS_315PRO) ||
+	 (HwInfo->jChipType == SIS_330)) {
+
+         if(!(DelayTime & 0x01)) {
+	    SiS_DDC2Delay(SiS_Pr, 0x1000);
+         } else {
+	    SiS_DDC2Delay(SiS_Pr, 0x4000);
+         }
 
-      if((SiS_Pr->SiS_IF_DEF_LVDS == 1) ||
+      } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* ||
          (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-	 (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {			/* 315 series, LVDS; Special */
+	 (SiS_Pr->SiS_CustomT == CUT_CLEVO1400) */ ) {			/* 315 series, LVDS; Special */
 
          if(SiS_Pr->SiS_IF_DEF_CH70xx == 0) {
             PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);
@@ -609,7 +538,7 @@
                } else {
        		  Delay = SiS_Pr->SiS_PanelDelayTblLVDS[DelayIndex].timer[1];
                }
-	       if((ROMAddr) && (SiS_Pr->SiS_UseROM)) {
+	       if((SiS_Pr->SiS_UseROM) && (!(SiS_Pr->SiS_ROMNew))) {
                   if(ROMAddr[0x13c] & 0x40) {
                      if(!(DelayTime & 0x01)) {
 	    	        Delay = (USHORT)ROMAddr[0x17e];
@@ -619,7 +548,7 @@
                   }
                }
             }
-	    SiS_ShortDelay(SiS_Pr,Delay);
+	    SiS_ShortDelay(SiS_Pr, Delay);
 	 }
 
       } else if(SiS_Pr->SiS_VBType & VB_SISVB) {			/* 315 series, all bridges */
@@ -662,7 +591,6 @@
   USHORT watchdog;
 
   if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x1f) & 0xc0) return;
-
   if(!(SiS_GetReg(SiS_Pr->SiS_P3d4,0x17) & 0x80)) return;
 
   watchdog = 65535;
@@ -671,6 +599,7 @@
   while((!(SiS_GetRegByte(SiS_Pr->SiS_P3da) & 0x08)) && --watchdog);
 }
 
+#if defined(SIS300) || defined(SIS315H)
 static void
 SiS_WaitRetrace2(SiS_Private *SiS_Pr, USHORT reg)
 {
@@ -681,6 +610,7 @@
   watchdog = 65535;
   while((!(SiS_GetReg(SiS_Pr->SiS_Part1Port,reg) & 0x02)) && --watchdog);
 }
+#endif
 
 static void
 SiS_WaitVBRetrace(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
@@ -718,10 +648,10 @@
        tempal = SiS_GetRegByte(SiS_Pr->SiS_P3da);
        if(temp & 0x01) {
           if((tempal & 0x08))  continue;
-          if(!(tempal & 0x08)) break;
+          else break;
        } else {
           if(!(tempal & 0x08)) continue;
-          if((tempal & 0x08))  break;
+          else break;
        }
     }
     temp ^= 0x01;
@@ -742,15 +672,14 @@
 /*               HELPER: MISC                */
 /*********************************************/
 
+#ifdef SIS300
 static BOOLEAN
 SiS_Is301B(SiS_Private *SiS_Pr)
 {
-  USHORT flag;
-
-  flag = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x01);
-  if(flag >= 0xb0) return TRUE;
+  if(SiS_GetReg(SiS_Pr->SiS_Part4Port,0x01) >= 0xb0) return TRUE;
   return FALSE;
 }
+#endif
 
 static BOOLEAN
 SiS_CRT2IsLCD(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
@@ -796,6 +725,16 @@
   return FALSE;
 }
 
+#ifdef SIS315H
+static BOOLEAN
+SiS_IsVAorLCD(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
+{
+  if(SiS_IsVAMode(SiS_Pr,HwInfo))   return TRUE;
+  if(SiS_CRT2IsLCD(SiS_Pr, HwInfo)) return TRUE;
+  return FALSE;
+}
+#endif
+
 static BOOLEAN
 SiS_IsDualLink(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
@@ -815,7 +754,7 @@
 SiS_TVEnabled(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
   if((SiS_GetReg(SiS_Pr->SiS_Part2Port,0x00) & 0x0f) != 0x0c) return TRUE;
-  if(SiS_Pr->SiS_VBType & (VB_301C | VB_SIS301LV302LV)) {
+  if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS301LV302LV)) {
      if(SiS_GetReg(SiS_Pr->SiS_Part2Port,0x4d) & 0x10) return TRUE;
   }
   return FALSE;
@@ -835,11 +774,8 @@
 static BOOLEAN
 SiS_WeHaveBacklightCtrl(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-  USHORT flag;
-
   if((HwInfo->jChipType >= SIS_315H) && (HwInfo->jChipType < SIS_661)) {
-     flag = SiS_GetReg(SiS_Pr->SiS_P3d4,0x79);
-     if(flag & 0x10) return TRUE;
+     if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x79) & 0x10) return TRUE;
   }
   return FALSE;
 }
@@ -935,12 +871,12 @@
   USHORT flag;
 
   if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-     return FALSE;
+     return TRUE;
   } else if(SiS_Pr->SiS_VBType & VB_SISVB) {
      flag = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x00);
-     if((flag == 1) || (flag == 2)) return FALSE;
+     if((flag == 1) || (flag == 2)) return TRUE;
   }
-  return TRUE;
+  return FALSE;
 }
 
 static BOOLEAN
@@ -948,21 +884,21 @@
 {
   USHORT flag;
 
-  if(!(SiS_BridgeIsOn(SiS_Pr))) {
+  if(SiS_BridgeIsOn(SiS_Pr)) {
      flag = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00);
      if(HwInfo->jChipType < SIS_315H) {
        flag &= 0xa0;
-       if((flag == 0x80) || (flag == 0x20)) return FALSE;
+       if((flag == 0x80) || (flag == 0x20)) return TRUE;
      } else {
        flag &= 0x50;
-       if((flag == 0x40) || (flag == 0x10)) return FALSE;
+       if((flag == 0x40) || (flag == 0x10)) return TRUE;
      }
   }
-  return TRUE;
+  return FALSE;
 }
 
 static BOOLEAN
-SiS_BridgeInSlave(SiS_Private *SiS_Pr)
+SiS_BridgeInSlavemode(SiS_Private *SiS_Pr)
 {
   USHORT flag1;
 
@@ -985,7 +921,7 @@
    if(!(SiS_Pr->SiS_ChSW)) return;
 
 #ifndef LINUX_XF86
-   SiS_SetRegLong(0xcf8,0x80000874);		   /* get ACPI base */
+   SiS_SetRegLong(0xcf8,0x80000874);		       /* get ACPI base */
    acpibase = SiS_GetRegLong(0xcfc);
 #else
    acpibase = pciReadLong(0x00000800, 0x74);
@@ -1003,22 +939,19 @@
 }
 
 void
-SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo,
-              USHORT ModeIdIndex,PSIS_HW_INFO HwInfo,
-	      int checkcrt2mode)
+SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
+              PSIS_HW_INFO HwInfo, int checkcrt2mode)
 {
   USHORT tempax,tempbx,temp;
   USHORT modeflag, resinfo=0;
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
+  } else if(SiS_Pr->UseCustomMode) {
+     modeflag = SiS_Pr->CModeFlag;
   } else {
-     if(SiS_Pr->UseCustomMode) {
-        modeflag = SiS_Pr->CModeFlag;
-     } else {
-   	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-	resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
-     }
+     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+     resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
   }
 
   SiS_Pr->SiS_SetFlag = 0;
@@ -1026,7 +959,7 @@
   SiS_Pr->SiS_ModeType = modeflag & ModeInfoFlag;
 
   tempbx = 0;
-  if(SiS_BridgeIsOn(SiS_Pr) == 0) {
+  if(SiS_BridgeIsOn(SiS_Pr)) {
     	temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30);
 #if 0
    	if(HwInfo->jChipType < SIS_661) {
@@ -1054,7 +987,7 @@
 		 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x31,0xbf);
 	      }
 	      if(!(SiS_GetReg(SiS_Pr->SiS_P3d4,0x31) & (DriverMode >> 8))) {
-	         /* Reset LCDA setting */
+	         /* Reset LCDA setting if not driver mode */
 		 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x38,0xfc);
 	      }
 	      if(IS_SIS650) {
@@ -1071,6 +1004,11 @@
           	 tempbx |= SetCRT2ToLCDA;
 	      }
 	   }
+
+	   if(SiS_Pr->SiS_VBType & (VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV)) {
+	      tempbx &= ~(SetCRT2ToRAMDAC);
+	   }
+
 	   if(HwInfo->jChipType >= SIS_661) {
 	      tempbx &= ~(SetCRT2ToYPbPr525750 | SetCRT2ToHiVision);
 	      temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38);
@@ -1148,24 +1086,12 @@
 				SetPALTV 	   |
 				SwitchCRT2	   |
 				SetSimuScanMode );
-      	   if(tempbx & SetCRT2ToLCDA) {
-              tempbx &= (clearmask | SetCRT2ToLCDA);
-      	   }
-	   if(tempbx & SetCRT2ToRAMDAC) {
-              tempbx &= (clearmask | SetCRT2ToRAMDAC);
-      	   }
-	   if(tempbx & SetCRT2ToLCD) {
-              tempbx &= (clearmask | SetCRT2ToLCD);
-      	   }
-	   if(tempbx & SetCRT2ToSCART) {
-              tempbx &= (clearmask | SetCRT2ToSCART);
-      	   }
-	   if(tempbx & SetCRT2ToHiVision) {
-              tempbx &= (clearmask | SetCRT2ToHiVision);
-      	   }
-	   if(tempbx & SetCRT2ToYPbPr525750) {
-	      tempbx &= (clearmask | SetCRT2ToYPbPr525750);
-	   }
+      	   if(tempbx & SetCRT2ToLCDA)        tempbx &= (clearmask | SetCRT2ToLCDA);
+	   if(tempbx & SetCRT2ToRAMDAC)      tempbx &= (clearmask | SetCRT2ToRAMDAC);
+	   if(tempbx & SetCRT2ToLCD)         tempbx &= (clearmask | SetCRT2ToLCD);
+	   if(tempbx & SetCRT2ToSCART)       tempbx &= (clearmask | SetCRT2ToSCART);
+	   if(tempbx & SetCRT2ToHiVision)    tempbx &= (clearmask | SetCRT2ToHiVision);
+	   if(tempbx & SetCRT2ToYPbPr525750) tempbx &= (clearmask | SetCRT2ToYPbPr525750);
    	} else {
 	   if(HwInfo->jChipType >= SIS_315H) {
 	      if(tempbx & SetCRT2ToLCDA) {
@@ -1193,14 +1119,12 @@
       	   }
     	}
 
-    	if(!(tempbx & DriverMode)){
-      	   tempbx |= SetSimuScanMode;
-    	}
+    	if(!(tempbx & DriverMode)) tempbx |= SetSimuScanMode;
 
 	/* LVDS/CHRONTEL (LCD/TV) and 301BDH (LCD) can only be slave in 8bpp modes */
 	if(SiS_Pr->SiS_ModeType <= ModeVGA) {
 	   if( (SiS_Pr->SiS_IF_DEF_LVDS == 1) ||
-	       ((tempbx & SetCRT2ToLCD) && (SiS_Pr->SiS_VBType & VB_NoLCD)) ) {
+	       ((SiS_Pr->SiS_VBType & VB_NoLCD) && (tempbx & SetCRT2ToLCD)) ) {
 	       modeflag &= (~CRT2Mode);
 	   }
 	}
@@ -1218,9 +1142,9 @@
 	         }
               }
       	   } else {
-              if(!(SiS_BridgeIsEnabled(SiS_Pr,HwInfo))) {
+              if(SiS_BridgeIsEnabled(SiS_Pr,HwInfo)) {
           	 if(!(tempbx & DriverMode)) {
-            	    if(SiS_BridgeInSlave(SiS_Pr)) {
+            	    if(SiS_BridgeInSlavemode(SiS_Pr)) {
 		       tempbx |= SetSimuScanMode;
             	    }
                  }
@@ -1346,7 +1270,7 @@
 	   if(HwInfo->jChipType >= SIS_330) romindex = 0x11b;
         }
         if(temp) {
-           if(romindex && ROMAddr && SiS_Pr->SiS_UseROM) {
+           if(romindex && SiS_Pr->SiS_UseROM && (!(SiS_Pr->SiS_ROMNew))) {
 	      OutputSelect = ROMAddr[romindex];
 	      if(!(OutputSelect & EnablePALMN)) {
                  SiS_SetRegAND(SiS_Pr->SiS_P3d4,temp,0x3F);
@@ -1443,6 +1367,22 @@
 	} else if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
 	   SiS_Pr->SiS_TVMode |= (TVSetHiVision | TVSetPAL);
 	}
+	if(SiS_Pr->SiS_VBInfo & (SetCRT2ToYPbPr525750 | SetCRT2ToHiVision)) {
+	   if(resinfo == SIS_RI_800x480 || resinfo == SIS_RI_1024x576 || resinfo == SIS_RI_1280x720) {
+	      SiS_Pr->SiS_TVMode |= TVAspect169;
+	   } else {
+	      temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x39);
+	      if(temp1 & 0x02) {
+		 if(SiS_Pr->SiS_TVMode & (TVSetYPbPr750p | TVSetHiVision)) {
+		    SiS_Pr->SiS_TVMode |= TVAspect169;
+		 } else {
+		    SiS_Pr->SiS_TVMode |= TVAspect43LB;
+		 }
+	      } else {
+		 SiS_Pr->SiS_TVMode |= TVAspect43;
+	      }
+	   }
+	}
      }
   }
 
@@ -1493,13 +1433,74 @@
 #ifdef TWDEBUG
   xf86DrvMsg(0, X_INFO, "(init301: TVMode %x, VBInfo %x)\n", SiS_Pr->SiS_TVMode, SiS_Pr->SiS_VBInfo);
 #endif
-
 }
 
 /*********************************************/
 /*               GET LCD INFO                */
 /*********************************************/
 
+static USHORT
+SiS_GetBIOSLCDResInfo(SiS_Private *SiS_Pr)
+{
+   USHORT temp = SiS_Pr->SiS_LCDResInfo;
+   /* Translate my LCDResInfo to BIOS value */
+   if(temp == Panel_1280x768_2)  temp = Panel_1280x768;
+   if(temp == Panel_1280x768_3)  temp = Panel_1280x768;
+   return temp;
+}
+
+static void
+SiS_GetLCDInfoBIOS(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
+{
+#ifdef SIS315H
+   UCHAR  *ROMAddr;
+   USHORT temp;
+
+#ifdef TWDEBUG
+   xf86DrvMsg(0, X_INFO, "Paneldata driver: [%d %d] [H %d %d] [V %d %d] [C %d 0x%02x 0x%02x]\n",
+      	SiS_Pr->PanelHT, SiS_Pr->PanelVT,
+	SiS_Pr->PanelHRS, SiS_Pr->PanelHRE,
+	SiS_Pr->PanelVRS, SiS_Pr->PanelVRE,
+	SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].CLOCK,
+	SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].Part4_A,
+	SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].Part4_B);
+#endif
+
+   if((ROMAddr = GetLCDStructPtr661(SiS_Pr, HwInfo))) {
+      if((temp = SISGETROMW(6)) != SiS_Pr->PanelHT) {
+         SiS_Pr->SiS_NeedRomModeData = TRUE;
+	 SiS_Pr->PanelHT  = temp;
+      }
+      if((temp = SISGETROMW(8)) != SiS_Pr->PanelVT) {
+         SiS_Pr->SiS_NeedRomModeData = TRUE;
+         SiS_Pr->PanelVT  = temp;
+      }
+      SiS_Pr->PanelHRS = SISGETROMW(10);
+      SiS_Pr->PanelHRE = SISGETROMW(12);
+      SiS_Pr->PanelVRS = SISGETROMW(14);
+      SiS_Pr->PanelVRE = SISGETROMW(16);
+      SiS_Pr->PanelVCLKIdx315 = VCLK_CUSTOM_315;
+      SiS_Pr->SiS_VCLKData[VCLK_CUSTOM_315].CLOCK =
+	 SiS_Pr->SiS_VBVCLKData[VCLK_CUSTOM_315].CLOCK = (USHORT)((UCHAR)ROMAddr[18]);
+      SiS_Pr->SiS_VCLKData[VCLK_CUSTOM_315].SR2B =
+	 SiS_Pr->SiS_VBVCLKData[VCLK_CUSTOM_315].Part4_A = ROMAddr[19];
+      SiS_Pr->SiS_VCLKData[VCLK_CUSTOM_315].SR2C =
+	 SiS_Pr->SiS_VBVCLKData[VCLK_CUSTOM_315].Part4_B = ROMAddr[20];
+
+#ifdef TWDEBUG
+      xf86DrvMsg(0, X_INFO, "Paneldata BIOS:  [%d %d] [H %d %d] [V %d %d] [C %d 0x%02x 0x%02x]\n",
+      	SiS_Pr->PanelHT, SiS_Pr->PanelVT,
+	SiS_Pr->PanelHRS, SiS_Pr->PanelHRE,
+	SiS_Pr->PanelVRS, SiS_Pr->PanelVRE,
+	SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].CLOCK,
+	SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].Part4_A,
+	SiS_Pr->SiS_VBVCLKData[SiS_Pr->PanelVCLKIdx315].Part4_B);
+#endif
+
+   }
+#endif
+}
+
 void
 SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
 		  PSIS_HW_INFO HwInfo)
@@ -1515,50 +1516,60 @@
          { 0,  1,  2,  3,  7,  4,  5,  8,
 	   0,  0, 10,  0,  0,  0,  0, 15 };
 
-  SiS_Pr->SiS_LCDResInfo = 0;
+  SiS_Pr->SiS_LCDResInfo  = 0;
   SiS_Pr->SiS_LCDTypeInfo = 0;
-  SiS_Pr->SiS_LCDInfo = 0;
+  SiS_Pr->SiS_LCDInfo     = 0;
+  SiS_Pr->PanelHRS        = 999; /* HSync start */
+  SiS_Pr->PanelHRE        = 999; /* HSync end */
+  SiS_Pr->PanelVRS        = 999; /* VSync start */
+  SiS_Pr->PanelVRE        = 999; /* VSync end */
+  SiS_Pr->SiS_NeedRomModeData = FALSE;
 
-  if(SiS_Pr->UseCustomMode) {
+  if(!(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA))) return;
+
+  if(ModeNo <= 0x13) {
+     modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
+  } else if(SiS_Pr->UseCustomMode) {
      modeflag = SiS_Pr->CModeFlag;
   } else {
-     if(ModeNo <= 0x13) {
-    	modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-     } else {
-    	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-    	resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
-     }
+     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+     resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
   }
 
-  if(!(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA))) return;
-
   temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);
+  if(!temp) return;
 
-  if((HwInfo->jChipType < SIS_315H) || (HwInfo->jChipType >= SIS_661)) {
+  if((HwInfo->jChipType >= SIS_661) || (SiS_Pr->SiS_ROMNew)) {
+     SiS_Pr->SiS_LCDTypeInfo = (SiS_GetReg(SiS_Pr->SiS_P3d4,0x39) & 0x7c) >> 2;
+  } else if((HwInfo->jChipType < SIS_315H) || (HwInfo->jChipType >= SIS_661)) {
      SiS_Pr->SiS_LCDTypeInfo = temp >> 4;
   } else {
      SiS_Pr->SiS_LCDTypeInfo = (temp & 0x0F) - 1;
   }
   temp &= 0x0f;
   if(HwInfo->jChipType < SIS_315H) {
-      /* Translate 300 series LCDRes to 315 series for unified usage */
-      temp = SiS300SeriesLCDRes[temp];
+     /* Translate 300 series LCDRes to 315 series for unified usage */
+     temp = SiS300SeriesLCDRes[temp];
   }
-  SiS_Pr->SiS_LCDResInfo = temp;
 
-  if(SiS_Pr->SiS_VBType & VB_SISVB) {
-     if(SiS_Pr->SiS_LCDResInfo < SiS_Pr->SiS_PanelMin301)
-	SiS_Pr->SiS_LCDResInfo = SiS_Pr->SiS_PanelMin301;
-  } else {
-     if(SiS_Pr->SiS_LCDResInfo < SiS_Pr->SiS_PanelMinLVDS)
-	SiS_Pr->SiS_LCDResInfo = SiS_Pr->SiS_PanelMinLVDS;
+  if(HwInfo->jChipType == SIS_550) {
+     if(temp == Panel310_640x480_2) temp = Panel_640x480_2;
+     if(temp == Panel310_640x480_3) temp = Panel_640x480_3;
   }
 
-  if((!SiS_Pr->CP_HaveCustomData) || (SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_PanelCustom)) {
-     if(SiS_Pr->SiS_LCDResInfo > SiS_Pr->SiS_PanelMax)
-  	SiS_Pr->SiS_LCDResInfo = SiS_Pr->SiS_Panel1024x768;
+  if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {	/* SiS LVDS */
+     if(temp == Panel310_1280x768) {
+        temp = Panel_1280x768_2;
+#ifdef SIS315H
+	if((myptr = GetLCDStructPtr661(SiS_Pr, HwInfo))) {
+	   if((myptr[8] | (myptr[9] << 8)) == 798) temp = Panel_1280x768_3;
+	}
+#endif
+     }
   }
 
+  SiS_Pr->SiS_LCDResInfo = temp;
+
   if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
      if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) {
         SiS_Pr->SiS_LCDResInfo = Panel_Barco1366;
@@ -1567,113 +1578,306 @@
      }
   }
 
+  if(SiS_Pr->SiS_VBType & VB_SISVB) {
+     if(SiS_Pr->SiS_LCDResInfo < SiS_Pr->SiS_PanelMin301)
+	SiS_Pr->SiS_LCDResInfo = SiS_Pr->SiS_PanelMin301;
+  } else {
+     if(SiS_Pr->SiS_LCDResInfo < SiS_Pr->SiS_PanelMinLVDS)
+	SiS_Pr->SiS_LCDResInfo = SiS_Pr->SiS_PanelMinLVDS;
+  }
+
+  SiS_Pr->PanelVCLKIdx300 = VCLK65_300;
+  SiS_Pr->PanelVCLKIdx315 = VCLK108_2_315;
+
   switch(SiS_Pr->SiS_LCDResInfo) {
-     case Panel_800x600:   SiS_Pr->PanelXRes =  800; SiS_Pr->PanelYRes =  600; break;
-     case Panel_1024x768:  SiS_Pr->PanelXRes = 1024; SiS_Pr->PanelYRes =  768; break;
-     case Panel_1280x1024: SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes = 1024; break;
-     case Panel_640x480_3:
+     case Panel_320x480:    SiS_Pr->PanelXRes =  320; SiS_Pr->PanelYRes =  480;
+     			    SiS_Pr->PanelHT   =  400; SiS_Pr->PanelVT   =  525;
+			    SiS_Pr->PanelVCLKIdx300 = VCLK28;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK28;
+			    break;
      case Panel_640x480_2:
-     case Panel_640x480:   SiS_Pr->PanelXRes =  640; SiS_Pr->PanelYRes =  480; break;
-     case Panel_1024x600:  SiS_Pr->PanelXRes = 1024; SiS_Pr->PanelYRes =  600; break;
-     case Panel_1152x864:  SiS_Pr->PanelXRes = 1152; SiS_Pr->PanelYRes =  864; break;
-     case Panel_1280x960:  SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  960; break;
-     case Panel_1152x768:  SiS_Pr->PanelXRes = 1152; SiS_Pr->PanelYRes =  768; break;
-     case Panel_1400x1050: SiS_Pr->PanelXRes = 1400; SiS_Pr->PanelYRes = 1050; break;
-     case Panel_1280x768:  SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  768; break;
-     case Panel_1600x1200: SiS_Pr->PanelXRes = 1600; SiS_Pr->PanelYRes = 1200; break;
-     case Panel_320x480:   SiS_Pr->PanelXRes =  320; SiS_Pr->PanelYRes =  480; break;
-     case Panel_Custom:    SiS_Pr->PanelXRes = SiS_Pr->CP_MaxX;
-    			   SiS_Pr->PanelYRes = SiS_Pr->CP_MaxY;
-			   break;
-     case Panel_Barco1366: SiS_Pr->PanelXRes = 1360; SiS_Pr->PanelYRes = 1024; break;
-     case Panel_848x480:   SiS_Pr->PanelXRes =  848; SiS_Pr->PanelYRes =  480; break;
-     default:		   SiS_Pr->PanelXRes = 1024; SiS_Pr->PanelYRes =  768; break;
+     case Panel_640x480_3:  SiS_Pr->PanelXRes =  640; SiS_Pr->PanelYRes =  480;
+     			    SiS_Pr->PanelVRS  =   24; SiS_Pr->PanelVRE  =    3;
+			    SiS_Pr->PanelVCLKIdx300 = VCLK28;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK28;
+			    break;
+     case Panel_640x480:    SiS_Pr->PanelXRes =  640; SiS_Pr->PanelYRes =  480;
+     			    			      SiS_Pr->PanelVRE  =    3;
+			    SiS_Pr->PanelVCLKIdx300 = VCLK28;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK28;
+			    break;
+     case Panel_800x600:    SiS_Pr->PanelXRes =  800; SiS_Pr->PanelYRes =  600;
+     			    SiS_Pr->PanelHT   = 1056; SiS_Pr->PanelVT   =  628;
+			    SiS_Pr->PanelHRS  =   40; SiS_Pr->PanelHRE  =  128;
+			    SiS_Pr->PanelVRS  =    1; SiS_Pr->PanelVRE  =    4;
+			    SiS_Pr->PanelVCLKIdx300 = VCLK40;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK40;
+			    break;
+     case Panel_1024x600:   SiS_Pr->PanelXRes = 1024; SiS_Pr->PanelYRes =  600;
+     			    SiS_Pr->PanelHT   = 1344; SiS_Pr->PanelVT   =  800;
+			    SiS_Pr->PanelHRS  =   24; SiS_Pr->PanelHRE  =  136;
+			    SiS_Pr->PanelVRS  =    2 /* 88 */ ; SiS_Pr->PanelVRE  =    6;
+     			    SiS_Pr->PanelVCLKIdx300 = VCLK65_300;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK65_315;
+     			    break;
+     case Panel_1024x768:   SiS_Pr->PanelXRes = 1024; SiS_Pr->PanelYRes =  768;
+     			    SiS_Pr->PanelHT   = 1344; SiS_Pr->PanelVT   =  806;
+			    SiS_Pr->PanelHRS  =   24; SiS_Pr->PanelHRE  =  136;
+			    SiS_Pr->PanelVRS  =    3; SiS_Pr->PanelVRE  =    6;
+			    if(HwInfo->jChipType < SIS_315H) {
+			       SiS_Pr->PanelHRS = 23;
+			       			      SiS_Pr->PanelVRE  =    5;
+			    }
+			    SiS_Pr->PanelVCLKIdx300 = VCLK65_300;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK65_315;
+			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
+			    break;
+     case Panel_1152x768:   SiS_Pr->PanelXRes = 1152; SiS_Pr->PanelYRes =  768;
+     			    SiS_Pr->PanelHT   = 1344; SiS_Pr->PanelVT   =  806;
+			    SiS_Pr->PanelHRS  =   24;
+			    SiS_Pr->PanelVRS  =    3; SiS_Pr->PanelVRE  =    6;
+			    if(HwInfo->jChipType < SIS_315H) {
+			       SiS_Pr->PanelHRS = 23;
+			       			      SiS_Pr->PanelVRE  =    5;
+			    }
+     			    SiS_Pr->PanelVCLKIdx300 = VCLK65_300;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK65_315;
+     			    break;
+     case Panel_1152x864:   SiS_Pr->PanelXRes = 1152; SiS_Pr->PanelYRes =  864;
+     			    break;
+     case Panel_1280x720:   SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  720;
+     			    SiS_Pr->PanelHT   = 1650; SiS_Pr->PanelVT   =  750;
+			    SiS_Pr->PanelHRS  =  110; SiS_Pr->PanelHRE  =   40;
+			    SiS_Pr->PanelVRS  =    5; SiS_Pr->PanelVRE  =    5;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK_1280x720;
+			    /* Data above for TMDS (projector); get from BIOS for LVDS */
+			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
+			    break;
+     case Panel_1280x768:   SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  768;
+     			    SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   =  802;
+			    SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRS  =  112;
+			    SiS_Pr->PanelVRS  =    3; SiS_Pr->PanelVRE  =    6;
+			    SiS_Pr->PanelVCLKIdx300 = VCLK81_300;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK81_315;
+			    break;
+     case Panel_1280x768_2: SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  768;
+     			    SiS_Pr->PanelHT   = 1408; SiS_Pr->PanelVT   =  806;
+			    SiS_Pr->PanelHRS  =   16; SiS_Pr->PanelHRE  =   64;
+			    SiS_Pr->PanelVRS  =    3; SiS_Pr->PanelVRE  =    6;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK_1280x768_2;
+			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
+			    break;
+     case Panel_1280x768_3: SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  768;
+     			    SiS_Pr->PanelHT   = 1664; SiS_Pr->PanelVT   =  798;
+			    SiS_Pr->PanelHRS   =  64; SiS_Pr->PanelHRE  =  128;
+			    SiS_Pr->PanelVRS   =   3; SiS_Pr->PanelVRE  =    7;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK_1280x768_3;
+			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
+			    break;
+     case Panel_1280x800:   SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  800;
+     			    SiS_Pr->PanelHT   = 1656; SiS_Pr->PanelVT   =  841;  /* 1408, 816 */
+			    SiS_Pr->PanelHRS   =  32; SiS_Pr->PanelHRE  =  312;  /*   16,  64 */
+			    SiS_Pr->PanelVRS   =  16; SiS_Pr->PanelVRE  =    8;  /*    4,   3 */
+			    SiS_Pr->PanelVCLKIdx315 = VCLK83_315;
+			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
+			    break;
+     case Panel_1280x960:   SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  960;
+     			    SiS_Pr->PanelHT   = 1800; SiS_Pr->PanelVT   = 1000;
+			    SiS_Pr->PanelVCLKIdx300 = VCLK108_3_300;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK108_3_315;
+		 	    if(resinfo == SIS_RI_1280x1024) {
+			       SiS_Pr->PanelVCLKIdx300 = VCLK100_300;
+			       SiS_Pr->PanelVCLKIdx315 = VCLK100_315;
+			    }
+			    break;
+     case Panel_1280x1024:  SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes = 1024;
+     			    SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   = 1066;
+			    SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRE  =  112;
+			    SiS_Pr->PanelVRS  =    1; SiS_Pr->PanelVRE  =    3;
+			    SiS_Pr->PanelVCLKIdx300 = VCLK108_3_300;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK108_2_315;
+			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
+			    break;
+     case Panel_1400x1050:  SiS_Pr->PanelXRes = 1400; SiS_Pr->PanelYRes = 1050;
+     			    SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   = 1066;
+			    SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRE  =  112; /* HRE OK for LVDS, not for LCDA */
+			    SiS_Pr->PanelVRS  =    1; SiS_Pr->PanelVRE  =    3;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK108_2_315;
+			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
+			    break;
+     case Panel_1600x1200:  SiS_Pr->PanelXRes = 1600; SiS_Pr->PanelYRes = 1200;
+     			    SiS_Pr->PanelHT   = 2160; SiS_Pr->PanelVT   = 1250;
+			    SiS_Pr->PanelHRS  =   64; SiS_Pr->PanelHRE  =  192;
+			    SiS_Pr->PanelVRS  =    1; SiS_Pr->PanelVRE  =    3;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK162_315;
+			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
+			    break;
+     case Panel_1680x1050:  SiS_Pr->PanelXRes = 1680; SiS_Pr->PanelYRes = 1050;
+     			    SiS_Pr->PanelHT   = 1900; SiS_Pr->PanelVT   = 1066;
+			    SiS_Pr->PanelHRS  =   26; SiS_Pr->PanelHRE  =   76;
+			    SiS_Pr->PanelVRS  =    3; SiS_Pr->PanelVRE  =    6;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK121_315;
+			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
+			    break;
+     case Panel_Custom:     SiS_Pr->PanelXRes = SiS_Pr->CP_MaxX;
+    			    SiS_Pr->PanelYRes = SiS_Pr->CP_MaxY;
+			    SiS_Pr->PanelHT   = SiS_Pr->CHTotal;
+			    SiS_Pr->PanelVT   = SiS_Pr->CVTotal;
+			    if(SiS_Pr->CP_PreferredIndex != -1) {
+			       SiS_Pr->PanelXRes = SiS_Pr->CP_HDisplay[SiS_Pr->CP_PreferredIndex];
+    			       SiS_Pr->PanelYRes = SiS_Pr->CP_VDisplay[SiS_Pr->CP_PreferredIndex];
+			       SiS_Pr->PanelHT   = SiS_Pr->CP_HTotal[SiS_Pr->CP_PreferredIndex];
+			       SiS_Pr->PanelVT   = SiS_Pr->CP_VTotal[SiS_Pr->CP_PreferredIndex];
+			       SiS_Pr->PanelHRS  = SiS_Pr->CP_HSyncStart[SiS_Pr->CP_PreferredIndex];
+			       SiS_Pr->PanelHRE  = SiS_Pr->CP_HSyncEnd[SiS_Pr->CP_PreferredIndex];
+			       SiS_Pr->PanelVRS  = SiS_Pr->CP_VSyncStart[SiS_Pr->CP_PreferredIndex];
+			       SiS_Pr->PanelVRE  = SiS_Pr->CP_VSyncEnd[SiS_Pr->CP_PreferredIndex];
+			       SiS_Pr->PanelHRS -= SiS_Pr->PanelXRes;
+			       SiS_Pr->PanelHRE -= SiS_Pr->PanelHRS;
+			       SiS_Pr->PanelVRS -= SiS_Pr->PanelYRes;
+			       SiS_Pr->PanelVRE -= SiS_Pr->PanelVRS;
+			    }
+			    break;
+     case Panel_Barco1366:  SiS_Pr->PanelXRes = 1360; SiS_Pr->PanelYRes = 1024;
+     			    SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   = 1066;
+     			    break;
+     case Panel_848x480:    SiS_Pr->PanelXRes =  848; SiS_Pr->PanelYRes =  480;
+     			    SiS_Pr->PanelHT   = 1088; SiS_Pr->PanelVT   =  525;
+     			    break;
+     default:		    SiS_Pr->PanelXRes = 1024; SiS_Pr->PanelYRes =  768;
+     			    SiS_Pr->PanelHT   = 1344; SiS_Pr->PanelVT   =  806;
+			    break;
   }
 
   temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37);
-  if(HwInfo->jChipType < SIS_661) {
-     temp &= ~0xe;
-  } else {
+  SiS_Pr->SiS_LCDInfo = temp & ~0x000e;
+
+  if(!(SiS_Pr->UsePanelScaler))        SiS_Pr->SiS_LCDInfo &= ~DontExpandLCD;
+  else if(SiS_Pr->UsePanelScaler == 1) SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+
 #ifdef SIS315H
-     if(!(temp & 0x10)) {
-        if(temp & 0x08) temp |= LCDPass11;
+  if(HwInfo->jChipType >= SIS_661) {
+     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+        if(temp & 0x08) SiS_Pr->SiS_LCDInfo |= LCDPass11;
      }
-     temp &= ~0xe;
      if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-        myptr = GetLCDStructPtr661(SiS_Pr, HwInfo);
-        if(myptr) {
-           if(myptr[2] & 0x01) temp |= LCDDualLink;
-        }
+        if(SiS_Pr->SiS_ROMNew) {
+	   if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	} else if((myptr = GetLCDStructPtr661(SiS_Pr, HwInfo))) {
+           if(myptr[2] & 0x01) SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	}
+     }
+  } else if(HwInfo->jChipType >= SIS_315H) {
+     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+        if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x39) & 0x01) SiS_Pr->SiS_LCDInfo |= LCDPass11;
      }
+     if((SiS_Pr->SiS_ROMNew) && (!(SiS_Pr->PanelSelfDetected))) {
+        SiS_Pr->SiS_LCDInfo &= ~(LCDRGB18Bit);
+	temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35);
+        if(temp & 0x01) SiS_Pr->SiS_LCDInfo |= LCDRGB18Bit;
+	if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+	   if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	}
+     }
+  }
 #endif
+
+  if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
+     /* Always center screen on LVDS (if scaling is disabled) */
+     SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+  } else if(SiS_Pr->SiS_VBType & VB_SISVB) {
+     if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+        /* Always center screen on SiS LVDS (if scaling is disabled) */
+        SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+     } else {
+        /* By default, pass 1:1 on SiS TMDS (if scaling is disabled) */
+        SiS_Pr->SiS_LCDInfo |= LCDPass11;
+        if(SiS_Pr->CenterScreen == 1) SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+     }
   }
-  SiS_Pr->SiS_LCDInfo = temp;
 
   if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
      if(SiS_Pr->SiS_CustomT == CUT_PANEL848) {
-        SiS_Pr->SiS_LCDInfo = 0x80 | 0x40 | 0x20;   /* neg h/v sync, RGB24 */
+        SiS_Pr->SiS_LCDInfo = 0x80 | 0x40 | 0x20;   /* neg h/v sync, RGB24(D0 = 0) */
      }
   }
 
-  if(!(SiS_Pr->UsePanelScaler))        SiS_Pr->SiS_LCDInfo &= ~DontExpandLCD;
-  else if(SiS_Pr->UsePanelScaler == 1) SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-
   if(SiS_Pr->SiS_VBType & VB_SISVB) {
      if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) {
-	   /* For non-standard LCD resolution, we let the panel scale */
-           SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-	   if(ModeNo == 0x7c || ModeNo == 0x7d || ModeNo == 0x7e) {
-	      /* We do not scale to 1280x960 (B/C bridges only) */
-              SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	   }
-	   if(((HwInfo->jChipType >= SIS_315H) && (ModeNo == 0x23 || ModeNo == 0x24 || ModeNo == 0x25)) ||
-	      ((HwInfo->jChipType < SIS_315H)  && (ModeNo == 0x55 || ModeNo == 0x5a || ModeNo == 0x5b))) {
-	      /* We do not scale to 1280x768 (B/C bridges only) */
-              SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	   }
-	   if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
-	      /* No non-scaling data available for LV bridges */
-	      SiS_Pr->SiS_LCDInfo &= ~DontExpandLCD;
-	   }
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768) {
-           /* No idea about the timing and zoom factors */
-           SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) {
-	   if(ModeNo == 0x3a || ModeNo == 0x4d || ModeNo == 0x65) {
-	      /* We do not scale to 1280x1024 (all bridges) */
-	      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	   }
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) {
-	   if(SiS_Pr->SiS_VBType & VB_SIS301B302B) {
-	      /* No idea about the timing and zoom factors (C bridge only) */
-	      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	   }
-	}
-	if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-	   if(SiS_Pr->SiS_CustomT == CUT_CLEVO1024) {
-              if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-	         SiS_Pr->SiS_LCDInfo &= ~DontExpandLCD;
-	      }
-	   }
+        if(modeflag & NoSupportLCDScale) {
+	   /* No scaling for this mode on any panel */
+	   SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	}
+        switch(SiS_Pr->SiS_LCDResInfo) {
+        case Panel_Custom:
+		/* For non-standard LCD resolution, we let the panel scale */
+           	SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+		break;
+	case Panel_1280x720:
+	      	if(SiS_Pr->PanelHT == 1650) {
+		   SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+		}
+	case Panel_1280x768:	/* TMDS only */
+		/* No idea about the timing and zoom factors */
+           	SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+		break;
+	case Panel_1280x960:
+	 	SiS_Pr->SiS_LCDInfo &= ~DontExpandLCD;
+		break;
+	case Panel_1280x1024:
+	        if(SiS_Pr->SiS_VBType & VB_SISTMDS) {
+		   if(ModeNo == 0x7c || ModeNo == 0x7d || ModeNo == 0x7e ||
+		      ModeNo == 0x79 || ModeNo == 0x75 || ModeNo == 0x78 ||
+		      ModeNo == 0x14 || ModeNo == 0x15 || ModeNo == 0x16) {
+	      	      /* We do not scale to 1280x720/800/960 (B/C bridges only) */
+                      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	           }
+	           if(((HwInfo->jChipType >= SIS_315H) &&
+		       (ModeNo == 0x23 || ModeNo == 0x24 || ModeNo == 0x25)) ||
+	              ((HwInfo->jChipType < SIS_315H)  &&
+		       (ModeNo == 0x55 || ModeNo == 0x5a || ModeNo == 0x5b))) {
+	              /* We do not scale to 1280x768 (B/C bridges only) */
+                      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	           }
+		}
+		break;
+	case Panel_1400x1050:
+	 	if(SiS_Pr->SiS_VBType & VB_SISTMDS) {
+	  	   if(ModeNo == 0x7c || ModeNo == 0x7d || ModeNo == 0x7e ||
+		      ModeNo == 0x79 || ModeNo == 0x75 || ModeNo == 0x78 ||
+		      ModeNo == 0x14 || ModeNo == 0x15 || ModeNo == 0x16 ||
+		      ModeNo == 0x23 || ModeNo == 0x24 || ModeNo == 0x25) {
+	      	      /* Do not scale to 1280x720/768/800/960 (B/C bridges only) */
+                      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	           }
+		}
+		if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+		   if(ModeNo == 0x79 || ModeNo == 0x75 || ModeNo == 0x78) {
+		      if(SiS_Pr->UsePanelScaler == -1) {
+		         /* Do not scale to 1280x720 by default (LVDS bridges) */
+	      	         SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+		      }
+		   }
+		}
+		if(ModeNo == 0x3a || ModeNo == 0x4d || ModeNo == 0x65) {
+	      	   /* Do not scale to 1280x1024 (all bridges) */
+	      	   SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	   	}
+		break;
+	case Panel_1600x1200:
+		if(SiS_Pr->SiS_VBType & VB_SISTMDS) {
+	      	   /* No idea about the timing and zoom factors (C bridge only) */
+	      	   SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	   	}
+		break;
 	}
      }
   }
 
-  if(HwInfo->jChipType >= SIS_315H) {
-#ifdef SIS315H
-     if(HwInfo->jChipType < SIS_661) {
-        if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x39) & 0x01) {
-           SiS_Pr->SiS_LCDInfo &= (~DontExpandLCD);
-	   SiS_Pr->SiS_LCDInfo |= LCDPass11;
-	}
-     }
-#endif
-  } else {
 #ifdef SIS300
+  if(HwInfo->jChipType < SIS_315H) {
      if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-        if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+        if(SiS_Pr->SiS_UseROM) {
 	   if((ROMAddr[0x233] == 0x12) && (ROMAddr[0x234] == 0x34)) {
               if(!(ROMAddr[0x235] & 0x02)) {
 	         SiS_Pr->SiS_LCDInfo &= (~DontExpandLCD);
@@ -1685,34 +1889,63 @@
            SiS_Pr->SiS_LCDInfo &= (~DontExpandLCD);
 	}
      }
+  }
 #endif
+
+  /* Special cases */
+  if(SiS_Pr->SiS_IF_DEF_TRUMPION) {
+     SiS_Pr->SiS_LCDInfo |= (DontExpandLCD | LCDPass11);
+  }
+
+  if(SiS_Pr->SiS_LCDResInfo == Panel_640x480) {
+     SiS_Pr->SiS_LCDInfo |= LCDPass11;
+  }
+
+  if(SiS_Pr->UseCustomMode) {
+     SiS_Pr->SiS_LCDInfo |= (DontExpandLCD | LCDPass11);
+  }
+
+  /* (In)validate LCDPass11 flag */
+  if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
+     SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
   }
 
-  /* Trumpion: Assume non-expanding */
-  if(SiS_Pr->SiS_IF_DEF_TRUMPION != 0) {
-     SiS_Pr->SiS_LCDInfo &= (~DontExpandLCD);
+  /* Special cases */
+  if( (SiS_Pr->SiS_IF_DEF_FSTN)              ||
+      (SiS_Pr->SiS_IF_DEF_DSTN)              ||
+      (SiS_Pr->SiS_CustomT == CUT_BARCO1366) ||
+      (SiS_Pr->SiS_CustomT == CUT_BARCO1024) ||
+      (SiS_Pr->SiS_CustomT == CUT_PANEL848) ) {
+     SiS_Pr->PanelHRS = 999;
+     SiS_Pr->PanelHRE = 999;
   }
 
-  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-     SiS_Pr->SiS_LCDInfo &= (~LCDPass11);
+  if( (SiS_Pr->SiS_CustomT == CUT_BARCO1366) ||
+      (SiS_Pr->SiS_CustomT == CUT_BARCO1024) ||
+      (SiS_Pr->SiS_CustomT == CUT_PANEL848) ) {
+     SiS_Pr->PanelVRS = 999;
+     SiS_Pr->PanelVRE = 999;
   }
 
 #ifdef SIS315H
   if((HwInfo->jChipType >= SIS_315H) && (HwInfo->jChipType < SIS_661)) {
-     if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-	/* Enable 302LV/302ELV dual link mode.
-	 * For 661, this is done above.
-	 */
-        if((SiS_Pr->SiS_CustomT == CUT_CLEVO1024) &&
-	   (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)) {
-	   /* (Sets this in SenseLCD; new paneltypes) */
-	   SiS_Pr->SiS_LCDInfo |= LCDDualLink;
-	}
-        if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) ||
-	   (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) ||
-           (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)) {
-	   SiS_Pr->SiS_LCDInfo |= LCDDualLink;
-	}
+     if(!(SiS_Pr->SiS_ROMNew)) {
+        if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+	   /* Enable 302LV/302ELV dual link mode.
+	    * For 661, this is done above.
+	    */
+           if((SiS_Pr->SiS_CustomT == CUT_CLEVO1024) &&
+	      (SiS_Pr->SiS_LCDResInfo == Panel_1024x768)) {
+	      /* (Sets this in SenseLCD; new paneltypes) */
+	      SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	   }
+           if((SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) ||
+	      (SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) ||
+              (SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) ||
+	      (SiS_Pr->SiS_LCDResInfo == Panel_1680x1050)) {
+	      SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	   }
+        }
      }
   }
 #endif
@@ -1720,37 +1953,37 @@
   if(!((HwInfo->jChipType < SIS_315H) && (SiS_Pr->SiS_SetFlag & SetDOSMode))) {
 
      if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x600) {
-	   if(ModeNo > 0x13) {
-	      if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
-                 if((resinfo == SIS_RI_800x600) || (resinfo == SIS_RI_400x300)) {
-                    SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+	if(SiS_Pr->SiS_IF_DEF_TRUMPION == 0) {
+	   if(ModeNo == 0x12) {
+	      if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
+	         SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+	      }
+	   } else if(ModeNo > 0x13) {
+	      if(SiS_Pr->SiS_LCDResInfo == Panel_1024x600) {
+	         if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
+	            if((resinfo == SIS_RI_800x600) || (resinfo == SIS_RI_400x300)) {
+                       SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+		    }
 		 }
-              }
-           }
-        }
-	if(ModeNo == 0x12) {
-	   if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
-	      SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+	      }
 	   }
 	}
      }
 
      if(modeflag & HalfDCLK) {
-        if(SiS_Pr->SiS_IF_DEF_TRUMPION == 0) {
-           if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
-	      if(!(((SiS_Pr->SiS_IF_DEF_LVDS == 1) || (HwInfo->jChipType < SIS_315H)) &&
-	                                      (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480))) {
-                 if(ModeNo > 0x13) {
-                    if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-                       if(resinfo == SIS_RI_512x384) SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
-                    } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600) {
-                       if(resinfo == SIS_RI_400x300) SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
-                    }
-                 }
-	      } else SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
-           } else SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
-        } else SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+        if(SiS_Pr->SiS_IF_DEF_TRUMPION == 1) {
+	   SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+        } else if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+	   SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+	} else if(SiS_Pr->SiS_LCDResInfo == Panel_640x480) {
+	   SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+	} else if(ModeNo > 0x13) {
+           if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
+              if(resinfo == SIS_RI_512x384) SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+           } else if(SiS_Pr->SiS_LCDResInfo == Panel_800x600) {
+              if(resinfo == SIS_RI_400x300) SiS_Pr->SiS_SetFlag |= EnableLVDSDDA;
+           }
+	}
      }
 
   }
@@ -1763,14 +1996,6 @@
      SiS_Pr->SiS_SetFlag |= LCDVESATiming;
   }
 
-  SiS_Pr->SiS_LCDInfo661 = 0;
-  if(SiS_Pr->SiS_SetFlag & LCDVESATiming) SiS_Pr->SiS_LCDInfo661 |= 0x0001;
-  if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA) SiS_Pr->SiS_LCDInfo661 |= 0x0002;
-  if(SiS_Pr->SiS_LCDInfo & LCDPass11)     SiS_Pr->SiS_LCDInfo661 |= 0x0008;
-  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) SiS_Pr->SiS_LCDInfo661 |= 0x0010;
-  SiS_Pr->SiS_LCDInfo661 |= (SiS_Pr->SiS_LCDInfo & 0xe0);
-  if(SiS_Pr->SiS_LCDInfo & LCDDualLink)   SiS_Pr->SiS_LCDInfo661 |= 0x0100;
-
 #ifdef LINUX_KERNEL
 #ifdef TWDEBUG
   printk(KERN_DEBUG "sisfb: (LCDInfo=0x%04x LCDResInfo=0x%02x LCDTypeInfo=0x%02x)\n",
@@ -1792,54 +2017,21 @@
 SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
                 USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo)
 {
-  USHORT tempbx;
-  const USHORT LCDXlat0VCLK[4]    = {VCLK40,       VCLK40,       VCLK40,       VCLK40};
-  const USHORT LVDSXlat1VCLK[4]   = {VCLK40,       VCLK40,       VCLK40,       VCLK40};
-  const USHORT LVDSXlat4VCLK[4]   = {VCLK28,       VCLK28,       VCLK28,       VCLK28};
-#ifdef SIS300
-  const USHORT LCDXlat1VCLK300[4] = {VCLK65_300,   VCLK65_300,   VCLK65_300,   VCLK65_300};
-  const USHORT LCDXlat2VCLK300[4] = {VCLK108_2_300,VCLK108_2_300,VCLK108_2_300,VCLK108_2_300};
-  const USHORT LVDSXlat2VCLK300[4]= {VCLK65_300,   VCLK65_300,   VCLK65_300,   VCLK65_300};
-  const USHORT LVDSXlat3VCLK300[4]= {VCLK65_300,   VCLK65_300,   VCLK65_300,   VCLK65_300};
-#endif
-#ifdef SIS315H
-  const USHORT LCDXlat1VCLK310[4] = {VCLK65_315,   VCLK65_315,   VCLK65_315,   VCLK65_315};
-  const USHORT LCDXlat2VCLK310[4] = {VCLK108_2_315,VCLK108_2_315,VCLK108_2_315,VCLK108_2_315};
-  const USHORT LVDSXlat2VCLK310[4]= {VCLK65_315,   VCLK65_315,   VCLK65_315,   VCLK65_315};
-  const USHORT LVDSXlat3VCLK310[4]= {VCLK108_2_315,VCLK108_2_315,VCLK108_2_315,VCLK108_2_315};
-#endif
-  USHORT CRT2Index,VCLKIndex=0;
-  USHORT modeflag,resinfo;
-  const UCHAR  *CHTVVCLKPtr = NULL;
-  const USHORT *LCDXlatVCLK1 = NULL;
-  const USHORT *LCDXlatVCLK2 = NULL;
-  const USHORT *LVDSXlatVCLK2 = NULL;
-  const USHORT *LVDSXlatVCLK3 = NULL;
-
-  if(HwInfo->jChipType >= SIS_315H) {
-#ifdef SIS315H
-     LCDXlatVCLK1 = LCDXlat1VCLK310;
-     LCDXlatVCLK2 = LCDXlat2VCLK310;
-     LVDSXlatVCLK2 = LVDSXlat2VCLK310;
-     LVDSXlatVCLK3 = LVDSXlat3VCLK310;
-#endif
-  } else {
-#ifdef SIS300
-     LCDXlatVCLK1 = LCDXlat1VCLK300;
-     LCDXlatVCLK2 = LCDXlat2VCLK300;
-     LVDSXlatVCLK2 = LVDSXlat2VCLK300;
-     LVDSXlatVCLK3 = LVDSXlat3VCLK300;
-#endif
-  }
+  USHORT CRT2Index,VCLKIndex=0,VCLKIndexGEN=0;
+  USHORT modeflag,resinfo,tempbx;
+  const UCHAR *CHTVVCLKPtr = NULL;
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
      resinfo = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo;
      CRT2Index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
+     VCLKIndexGEN = (SiS_GetRegByte((SiS_Pr->SiS_P3ca+0x02)) >> 2) & 0x03;
   } else {
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
      resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
      CRT2Index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
+     VCLKIndexGEN = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
+     if(HwInfo->jChipType < SIS_315H) VCLKIndexGEN &= 0x3f;
   }
 
   if(SiS_Pr->SiS_VBType & VB_SISVB) {    /* 30x/B/LV */
@@ -1847,50 +2039,34 @@
      if(SiS_Pr->SiS_SetFlag & ProgrammingCRT2) {
 
         CRT2Index >>= 6;
-        if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {      /*  LCD */
+        if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {      	/*  LCD */
 
            if(HwInfo->jChipType < SIS_315H) {
-	      if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600) {
-	         VCLKIndex = LCDXlat0VCLK[CRT2Index];
-	      } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-	    	 VCLKIndex = LCDXlatVCLK1[CRT2Index];
-	      } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x600) {
-	    	 VCLKIndex = LCDXlatVCLK1[CRT2Index];
-	      } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1152x768) {
-	    	 VCLKIndex = LCDXlatVCLK1[CRT2Index];
-	      } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768) {
-	         VCLKIndex = VCLK81_300;	/* guessed */
-	      } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x960) {
-		 VCLKIndex = VCLK108_3_300;
-		 if(resinfo == SIS_RI_1280x1024) VCLKIndex = VCLK100_300;
-	      } else {
-	    	 VCLKIndex = LCDXlatVCLK2[CRT2Index];
-	      }
+	      VCLKIndex = SiS_Pr->PanelVCLKIdx300;
 	   } else {
-	      if( (SiS_Pr->SiS_VBType & VB_SIS301LV302LV) ||
-	          (!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) ) {
-      	         if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-		    VCLKIndex = VCLK108_2_315;
-		 } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768) {
-		    VCLKIndex = VCLK81_315;  	/* guessed */
-		 } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) {
-		    VCLKIndex = VCLK108_2_315;
-		 } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) {
-		    VCLKIndex = VCLK162_315;
-		 } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x960) {
-		    VCLKIndex = VCLK108_3_315;
-		    if(resinfo == SIS_RI_1280x1024) VCLKIndex = VCLK100_315;
-		 } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-		    VCLKIndex = LCDXlatVCLK1[CRT2Index];
-	         } else {
-		    VCLKIndex = LCDXlatVCLK2[CRT2Index];
-      	         }
-	      } else {
-                 VCLKIndex = (UCHAR)SiS_GetRegByte((USHORT)(SiS_Pr->SiS_P3ca+0x02));  /*  Port 3cch */
-         	 VCLKIndex = ((VCLKIndex >> 2) & 0x03);
-        	 if(ModeNo > 0x13) {
-          	    VCLKIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
-        	 }
+	      VCLKIndex = SiS_Pr->PanelVCLKIdx315;
+	      if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+	         VCLKIndex = VCLKIndexGEN;
+		 switch(resinfo) {
+		 /* Only those whose IndexGEN doesn't match VBVCLK array: */
+		 case SIS_RI_1280x720: VCLKIndex = VCLK_1280x720;
+		 		       if(SiS_Pr->SiS_LCDResInfo == Panel_1280x720) {
+		                          if(SiS_Pr->PanelHT == 1344) {
+					     VCLKIndex = VCLK_1280x720_2;
+					  }
+				       }
+		 		       break;
+		 case SIS_RI_720x480:  VCLKIndex = VCLK_720x480;  break;
+		 case SIS_RI_720x576:  VCLKIndex = VCLK_720x576;  break;
+		 case SIS_RI_768x576:  VCLKIndex = VCLK_768x576;  break;
+		 case SIS_RI_848x480:  VCLKIndex = VCLK_848x480;  break;
+		 case SIS_RI_856x480:  VCLKIndex = VCLK_856x480;  break;
+		 case SIS_RI_800x480:  VCLKIndex = VCLK_800x480;  break;
+		 case SIS_RI_1024x576: VCLKIndex = VCLK_1024x576; break;
+		 case SIS_RI_1152x864: VCLKIndex = VCLK_1152x864; break;
+		 case SIS_RI_1360x768: VCLKIndex = VCLK_1360x768; break;
+		 }
+
 		 if(ModeNo <= 0x13) {
 		    if(HwInfo->jChipType <= SIS_315PRO) {
 		       if(SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC == 1) VCLKIndex = 0x42;
@@ -1906,34 +2082,28 @@
 	      }
 	   }
 
-        } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {                 /*  TV */
+        } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {                 	/*  TV */
 
 	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
-              if(SiS_Pr->SiS_TVMode & TVRPLLDIV2XO) VCLKIndex = HiTVVCLKDIV2;
-     	      else                                  VCLKIndex = HiTVVCLK;
+              if(SiS_Pr->SiS_TVMode & TVRPLLDIV2XO) 		VCLKIndex = HiTVVCLKDIV2;
+     	      else                                  		VCLKIndex = HiTVVCLK;
               if(SiS_Pr->SiS_TVMode & TVSetTVSimuMode) {
-            	 if(modeflag & Charx8Dot) 	    VCLKIndex = HiTVSimuVCLK;
-            	 else 			  	    VCLKIndex = HiTVTextVCLK;
+            	 if(modeflag & Charx8Dot) 	    		VCLKIndex = HiTVSimuVCLK;
+            	 else 			  	    		VCLKIndex = HiTVTextVCLK;
               }
-           } else if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) VCLKIndex = YPbPr750pVCLK - TVCLKBASE_315;
-	   else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p)   VCLKIndex = TVVCLKDIV2;
-	   else if(SiS_Pr->SiS_TVMode & TVRPLLDIV2XO)     VCLKIndex = TVVCLKDIV2;
-           else         		            	  VCLKIndex = TVVCLK;
+           } else if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) 	VCLKIndex = YPbPr750pVCLK;
+	   else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p)   	VCLKIndex = TVVCLKDIV2;
+	   else if(SiS_Pr->SiS_TVMode & TVRPLLDIV2XO)     	VCLKIndex = TVVCLKDIV2;
+           else         		            	  	VCLKIndex = TVVCLK;
 
-	   if(HwInfo->jChipType < SIS_315H) {
-              VCLKIndex += TVCLKBASE_300;
-  	   } else {
-	      VCLKIndex += TVCLKBASE_315;
-	   }
+	   if(HwInfo->jChipType < SIS_315H) VCLKIndex += TVCLKBASE_300;
+  	   else 	                    VCLKIndex += TVCLKBASE_315;
 
-        } else {         					/* VGA2 */
+        } else {         						/* VGA2 */
 
-           VCLKIndex = (UCHAR)SiS_GetRegByte((USHORT)(SiS_Pr->SiS_P3ca+0x02));
-           VCLKIndex = ((VCLKIndex >> 2) & 0x03);
-           if(ModeNo > 0x13) {
-              VCLKIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
-	      if(HwInfo->jChipType < SIS_315H) {
-          	 VCLKIndex &= 0x3f;
+	   VCLKIndex = VCLKIndexGEN;
+	   if(HwInfo->jChipType < SIS_315H) {
+              if(ModeNo > 0x13) {
 		 if( (HwInfo->jChipType == SIS_630) &&
 		     (HwInfo->jChipRevision >= 0x30)) {
 		    if(VCLKIndex == 0x14) VCLKIndex = 0x34;
@@ -1946,12 +2116,9 @@
 
      } else {   /* If not programming CRT2 */
 
-        VCLKIndex = (UCHAR)SiS_GetRegByte((USHORT)(SiS_Pr->SiS_P3ca+0x02));
-        VCLKIndex = ((VCLKIndex >> 2) & 0x03);
-        if(ModeNo > 0x13) {
-           VCLKIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
-	   if(HwInfo->jChipType < SIS_315H) {
-              VCLKIndex &= 0x3f;
+        VCLKIndex = VCLKIndexGEN;
+	if(HwInfo->jChipType < SIS_315H) {
+           if(ModeNo > 0x13) {
 	      if( (HwInfo->jChipType != SIS_630) &&
 		  (HwInfo->jChipType != SIS_300) ) {
 		 if(VCLKIndex == 0x1b) VCLKIndex = 0x35;
@@ -1964,7 +2131,7 @@
 
      VCLKIndex = CRT2Index;
 
-     if(SiS_Pr->SiS_SetFlag & ProgrammingCRT2) {  /* programming CRT2 */
+     if(SiS_Pr->SiS_SetFlag & ProgrammingCRT2) {
 
         if( (SiS_Pr->SiS_IF_DEF_CH70xx != 0) && (SiS_Pr->SiS_VBInfo & SetCRT2ToTV) ) {
 
@@ -2000,32 +2167,16 @@
 
         } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
 
-	   VCLKIndex >>= 6;
-     	   if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600) ||
-	      (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel320x480))
-     	      VCLKIndex = LVDSXlat1VCLK[VCLKIndex];
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480   ||
-	           SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2 ||
-		   SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3)
-	      VCLKIndex = LVDSXlat4VCLK[VCLKIndex];
-     	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)
-     	      VCLKIndex = LVDSXlatVCLK2[VCLKIndex];
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x600)
-              VCLKIndex = LVDSXlatVCLK2[VCLKIndex];
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1152x768)
-              VCLKIndex = LVDSXlatVCLK2[VCLKIndex];
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768)
-	      VCLKIndex = VCLK68_315;
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)
-	      VCLKIndex = VCLK162_315;
-     	   else
-	      VCLKIndex = LVDSXlatVCLK3[VCLKIndex];
-
-	   if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) {
-	      /* Special Timing: Barco iQ Pro R series */
-	      VCLKIndex = 0x44;
+	   if(HwInfo->jChipType < SIS_315H) {
+	      VCLKIndex = SiS_Pr->PanelVCLKIdx300;
+	   } else {
+	      VCLKIndex = SiS_Pr->PanelVCLKIdx315;
 	   }
 
+	   /* Special Timing: Barco iQ Pro R series */
+	   if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) VCLKIndex = 0x44;
+
+	   /* Special Timing: 848x480 parallel lvds */
 	   if(SiS_Pr->SiS_CustomT == CUT_PANEL848) {
 	      if(HwInfo->jChipType < SIS_315H) {
 		 VCLKIndex = VCLK34_300;
@@ -2038,28 +2189,22 @@
 
         } else {
 
-	   VCLKIndex = (UCHAR)SiS_GetRegByte((USHORT)(SiS_Pr->SiS_P3ca+0x02));
-           VCLKIndex = ((VCLKIndex >> 2) & 0x03);
-           if(ModeNo > 0x13) {
-              VCLKIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
-	      if(HwInfo->jChipType < SIS_315H) {
-    	 	 VCLKIndex &= 0x3F;
+	   VCLKIndex = VCLKIndexGEN;
+	   if(HwInfo->jChipType < SIS_315H) {
+              if(ModeNo > 0x13) {
+		 if( (HwInfo->jChipType == SIS_630) &&
+                     (HwInfo->jChipRevision >= 0x30) ) {
+		    if(VCLKIndex == 0x14) VCLKIndex = 0x2e;
+	         }
               }
-	      if( (HwInfo->jChipType == SIS_630) &&
-                  (HwInfo->jChipRevision >= 0x30) ) {
-		 if(VCLKIndex == 0x14) VCLKIndex = 0x2e;
-	      }
 	   }
         }
 
      } else {  /* if not programming CRT2 */
 
-        VCLKIndex = (UCHAR)SiS_GetRegByte((USHORT)(SiS_Pr->SiS_P3ca+0x02));
-        VCLKIndex = ((VCLKIndex >> 2) & 0x03);
-        if(ModeNo > 0x13) {
-           VCLKIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
-           if(HwInfo->jChipType < SIS_315H) {
-	      VCLKIndex &= 0x3F;
+        VCLKIndex = VCLKIndexGEN;
+	if(HwInfo->jChipType < SIS_315H) {
+           if(ModeNo > 0x13) {
 	      if( (HwInfo->jChipType != SIS_630) &&
 	          (HwInfo->jChipType != SIS_300) ) {
 		 if(VCLKIndex == 0x1b) VCLKIndex = 0x35;
@@ -2094,21 +2239,20 @@
 {
   USHORT i,j,modeflag;
   USHORT tempcl,tempah=0;
-#ifdef SIS300
-  USHORT temp;
+#if defined(SIS300) || defined(SIS315H)
+  USHORT tempbl;
 #endif
 #ifdef SIS315H
-  USHORT tempbl, tempah2, tempbl2;
+  UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
+  USHORT tempah2, tempbl2;
 #endif
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
+  } else if(SiS_Pr->UseCustomMode) {
+     modeflag = SiS_Pr->CModeFlag;
   } else {
-     if(SiS_Pr->UseCustomMode) {
-        modeflag = SiS_Pr->CModeFlag;
-     } else {
-    	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-     }
+     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
   }
 
   /* BIOS does not do this (neither 301 nor LVDS) */
@@ -2123,6 +2267,9 @@
   } else {
 
      for(i=0,j=4; i<3; i++,j++) SiS_SetReg(SiS_Pr->SiS_Part1Port,j,0);
+     if(HwInfo->jChipType >= SIS_315H) {
+        SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x02,0x7F);
+     }
 
      tempcl = SiS_Pr->SiS_ModeType;
 
@@ -2132,14 +2279,14 @@
 
         /* For 301BDH: (with LCD via LVDS) */
         if(SiS_Pr->SiS_VBType & VB_NoLCD) {
-	   temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32);
-	   temp &= 0xef;
-	   temp |= 0x02;
+	   tempbl = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32);
+	   tempbl &= 0xef;
+	   tempbl |= 0x02;
 	   if((SiS_Pr->SiS_VBInfo & SetCRT2ToTV) || (SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC)) {
-	      temp |= 0x10;
-	      temp &= 0xfd;
+	      tempbl |= 0x10;
+	      tempbl &= 0xfd;
 	   }
-	   SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp);
+	   SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,tempbl);
         }
 
         if(ModeNo > 0x13) {
@@ -2226,8 +2373,8 @@
         }
 
         if((HwInfo->jChipType < SIS_315H) && (SiS_Pr->SiS_VBType & VB_SIS301)) {
-	   if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) ||
-	      (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x960)) {
+	   if((SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) ||
+	      (SiS_Pr->SiS_LCDResInfo == Panel_1280x960)) {
 	      tempah |= 0x80;
 	   }
         } else {
@@ -2254,9 +2401,9 @@
        	   }
         }
 
-	if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) ||
-	   (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x960)  ||
-	   ((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) &&
+	if((SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) ||
+	   (SiS_Pr->SiS_LCDResInfo == Panel_1280x960)  ||
+	   ((SiS_Pr->SiS_LCDResInfo == Panel_Custom) &&
 	    (SiS_Pr->CP_MaxX >= 1280) && (SiS_Pr->CP_MaxY >= 960))) {
 	   tempah |= 0x80;
         }
@@ -2344,10 +2491,11 @@
 	 * in a 650 box (Jake). What is the criteria?
 	 */
 
-	if((IS_SIS740) || (HwInfo->jChipType >= SIS_661)) {
+	if((IS_SIS740) || (HwInfo->jChipType >= SIS_661) || (SiS_Pr->SiS_ROMNew)) {
 	   tempah = 0x30;
 	   tempbl = 0xc0;
-	   if(SiS_Pr->SiS_VBInfo & DisableCRT2Display) {
+	   if((SiS_Pr->SiS_VBInfo & DisableCRT2Display) ||
+	      ((SiS_Pr->SiS_ROMNew) && (!(ROMAddr[0x5b] & 0x04)))) {
 	      tempah = 0x00;
 	      tempbl = 0x00;
 	   }
@@ -2378,23 +2526,23 @@
 
 	if(IS_SIS740) {
 	   tempah = 0x80;
-	   if(SiS_Pr->SiS_VBInfo & DisableCRT2Display) {
-	      tempah = 0x00;
-	   }
+	   if(SiS_Pr->SiS_VBInfo & DisableCRT2Display) tempah = 0x00;
 	   SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x23,0x7f,tempah);
 	} else {
 	   tempah = 0x00;
            tempbl = 0x7f;
            if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
               tempbl = 0xff;
-	      if(!(SiS_IsDualEdge(SiS_Pr, HwInfo))) {
-	         tempah = 0x80;
-	      }
+	      if(!(SiS_IsDualEdge(SiS_Pr, HwInfo))) tempah = 0x80;
            }
            SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x23,tempbl,tempah);
 	}
 
-	/* 661: Sets p4 27 and 34 here, done in SetGroup4 here */
+#if 0
+	if(SiS_Pr->SiS_VBType & VB_SIS301C) {
+	   SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x3a,0xc0);
+	}
+#endif
 
 #endif /* SIS315H */
 
@@ -2423,9 +2571,7 @@
 	   tempbl = 0xfb;
            if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
               tempah = 0x00;
-	      if(SiS_IsDualEdge(SiS_Pr, HwInfo)) {
-	         tempbl = 0xff;
-	      }
+	      if(SiS_IsDualEdge(SiS_Pr, HwInfo)) tempbl = 0xff;
            }
 	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,tempbl,tempah);
 
@@ -2456,14 +2602,8 @@
 USHORT
 SiS_GetResInfo(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex)
 {
-  USHORT resindex;
-
-  if(ModeNo <= 0x13)
-     resindex = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo;
-  else
-     resindex = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
-
-  return(resindex);
+  if(ModeNo <= 0x13) return((USHORT)SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo);
+  else               return((USHORT)SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO);
 }
 
 static void
@@ -2473,8 +2613,12 @@
   USHORT xres,yres,modeflag=0,resindex;
 
   if(SiS_Pr->UseCustomMode) {
-     SiS_Pr->SiS_VGAHDE = SiS_Pr->SiS_HDE = SiS_Pr->CHDisplay;
-     SiS_Pr->SiS_VGAVDE = SiS_Pr->SiS_VDE = SiS_Pr->CVDisplay;
+     xres = SiS_Pr->CHDisplay;
+     if(SiS_Pr->CModeFlag & HalfDCLK) xres *= 2;
+     SiS_Pr->SiS_VGAHDE = SiS_Pr->SiS_HDE = xres;
+     yres = SiS_Pr->CVDisplay;
+     if(SiS_Pr->CModeFlag & DoubleScanMode) yres *= 2;
+     SiS_Pr->SiS_VGAVDE = SiS_Pr->SiS_VDE = yres;
      return;
   }
 
@@ -2489,7 +2633,7 @@
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
   }
 
-  if((!SiS_Pr->SiS_IF_DEF_DSTN) && (!SiS_Pr->SiS_IF_DEF_FSTN)) {
+  if(!SiS_Pr->SiS_IF_DEF_DSTN && !SiS_Pr->SiS_IF_DEF_FSTN) {
 
      if((HwInfo->jChipType >= SIS_315H) && (SiS_Pr->SiS_IF_DEF_LVDS == 1)) {
         if((ModeNo != 0x03) && (SiS_Pr->SiS_SetFlag & SetDOSMode)) {
@@ -2500,72 +2644,66 @@
         }
      }
 
-     if(ModeNo > 0x13) {
-  	if(modeflag & HalfDCLK)       xres *= 2;
-  	if(modeflag & DoubleScanMode) yres *= 2;
-     }
+     if(modeflag & HalfDCLK)       xres *= 2;
+     if(modeflag & DoubleScanMode) yres *= 2;
 
   }
 
-  if(SiS_Pr->SiS_VBType & VB_SISVB) {
-        if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
+  if((SiS_Pr->SiS_VBType & VB_SISVB) && (!(SiS_Pr->SiS_VBType & VB_NoLCD))) {
+
+#if 0
+        if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCDA | SetCRT2ToLCD | SetCRT2ToHiVision)) {
            if(xres == 720) xres = 640;
-	} else {
-	   if(SiS_Pr->SiS_VBType & VB_NoLCD) {           /* 301BDH */
-	        if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToHiVision)) {
-                   if(xres == 720) xres = 640;
-		}
-		if(SiS_Pr->SiS_SetFlag & SetDOSMode) {
-	           yres = 400;
-	           if(HwInfo->jChipType >= SIS_315H) {
-	              if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x17) & 0x80) yres = 480;
-	           } else {
-	              if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) yres = 480;
-	           }
-	        }
-	   } else {
-	      if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToHiVision)) {
-	         if(xres == 720) xres = 640;
-	      }
-	      if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-		 if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) {
-		    if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
-        	       if(yres == 1024) yres = 1056;
-      		    }
-		 } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-		    if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
-		       /* BIOS bug - does this regardless of scaling */
-      		       if(yres == 400) yres = 405;
-		    }
-      		    if(yres == 350) yres = 360;
-      		    if(SiS_Pr->SiS_SetFlag & LCDVESATiming) {
-        	       if(yres == 360) yres = 375;
-      		    }
-   	         } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-      		    if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
-        	       if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
-          	          if(yres == 350) yres = 357;
-          	          if(yres == 400) yres = 420;
-            	          if(yres == 480) yres = 525;
-        	       }
-      		    }
-    	         }
+	}
+#endif
+
+	if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+	   switch(SiS_Pr->SiS_LCDResInfo) {
+	   case Panel_1024x768:
+	      if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
+                 if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
+          	    if(yres == 350) yres = 357;
+          	    if(yres == 400) yres = 420;
+            	    if(yres == 480) yres = 525;
+        	 }
+      	      }
+	      break;
+	   case Panel_1280x1024:
+	      if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
+		 /* BIOS bug - does this regardless of scaling */
+      		 if(yres == 400) yres = 405;
 	      }
+      	      if(yres == 350) yres = 360;
+      	      if(SiS_Pr->SiS_SetFlag & LCDVESATiming) {
+                 if(yres == 360) yres = 375;
+      	      }
+	      break;
+	   case Panel_1600x1200:
+	      if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
+        	 if(yres == 1024) yres = 1056;
+      	      }
+	      break;
 	   }
 	}
+
   } else {
-    	if(xres == 720) xres = 640;
-	if(SiS_Pr->SiS_SetFlag & SetDOSMode) {
-	   yres = 400;
-	   if(HwInfo->jChipType >= SIS_315H) {
-	      if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x17) & 0x80) yres = 480;
-	   } else {
-	      if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) yres = 480;
-	   }
-	   if(SiS_Pr->SiS_IF_DEF_DSTN || SiS_Pr->SiS_IF_DEF_FSTN) {
-	      yres = 480;
-	   }
+
+     if(SiS_Pr->SiS_VBType & VB_SISVB) {
+        if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToHiVision)) {
+           if(xres == 720) xres = 640;
 	}
+     } else if(xres == 720) xres = 640;
+
+     if(SiS_Pr->SiS_SetFlag & SetDOSMode) {
+	yres = 400;
+        if(HwInfo->jChipType >= SIS_315H) {
+           if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x17) & 0x80) yres = 480;
+        } else {
+           if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) yres = 480;
+        }
+        if(SiS_Pr->SiS_IF_DEF_DSTN || SiS_Pr->SiS_IF_DEF_FSTN)  yres = 480;
+     }
+
   }
   SiS_Pr->SiS_VGAHDE = SiS_Pr->SiS_HDE = xres;
   SiS_Pr->SiS_VGAVDE = SiS_Pr->SiS_VDE = yres;
@@ -2580,103 +2718,84 @@
 		   USHORT RefreshRateTableIndex, USHORT *ResIndex,
 		   USHORT *DisplayType)
  {
-  USHORT tempbx,modeflag=0;
-  USHORT Flag,CRT2CRTC;
+  USHORT modeflag=0;
 
   if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
      if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
         if(!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) return FALSE;
      }
   } else if(SiS_Pr->SiS_VBType & VB_SISVB) {
-     if(!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) return FALSE;
+     if(!(SiS_Pr->SiS_VBInfo & SetInSlaveMode))    return FALSE;
   } else
      return FALSE;
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-     CRT2CRTC = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
+     (*ResIndex) = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
   } else {
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-     CRT2CRTC = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
+     (*ResIndex) = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
   }
 
-  Flag = 1;
-  tempbx = 0;
-  if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
-     if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {
-        Flag = 0;
-        tempbx = 18;
-        if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx++;
-        if(SiS_Pr->SiS_TVMode & TVSetPAL) {
-      	   tempbx += 2;
-	   if(SiS_Pr->SiS_ModeType > ModeVGA) {
-	      if(SiS_Pr->SiS_CHSOverScan) tempbx = 99;
-	   }
-	   if(SiS_Pr->SiS_TVMode & TVSetPALM) {
-	      tempbx = 18;  /* PALM uses NTSC data */
-	      if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx++;
-	   } else if(SiS_Pr->SiS_TVMode & TVSetPALN) {
-	      tempbx = 20;  /* PALN uses PAL data  */
-	      if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx++;
-	   }
-        }
+  (*ResIndex) &= 0x3F;
+
+  if((SiS_Pr->SiS_IF_DEF_CH70xx) && (SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {
+     (*DisplayType) = 18;
+     if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) (*DisplayType)++;
+     if(SiS_Pr->SiS_TVMode & TVSetPAL) {
+      	(*DisplayType) += 2;
+	if(SiS_Pr->SiS_ModeType > ModeVGA) {
+	   if(SiS_Pr->SiS_CHSOverScan) (*DisplayType) = 99;
+	}
+	if(SiS_Pr->SiS_TVMode & TVSetPALM) {
+	   (*DisplayType) = 18;  /* PALM uses NTSC data */
+	   if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) (*DisplayType)++;
+	} else if(SiS_Pr->SiS_TVMode & TVSetPALN) {
+	   (*DisplayType) = 20;  /* PALN uses PAL data  */
+	   if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) (*DisplayType)++;
+	}
      }
-  }
-  if(Flag) {
-     tempbx = SiS_Pr->SiS_LCDResInfo;
-     tempbx -= SiS_Pr->SiS_PanelMinLVDS;
-     if(SiS_Pr->SiS_LCDResInfo <= SiS_Pr->SiS_Panel1280x1024) {
-        if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx += 6;
-        if(modeflag & HalfDCLK) tempbx += 3;
-     } else {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) {
-           tempbx = 14;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx += 2;
-	   if(modeflag & HalfDCLK) tempbx++;
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x600) {
-           tempbx = 23;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx += 2;
-	   if(modeflag & HalfDCLK) tempbx++;
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1152x768) {
-           tempbx = 27;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx += 2;
-	   if(modeflag & HalfDCLK) tempbx++;
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) {
-           tempbx = 36;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx += 2;
-	   if(modeflag & HalfDCLK) tempbx++;
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768) {
-           tempbx = 40;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx += 2;
-	   if(modeflag & HalfDCLK) tempbx++;
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) {
-           tempbx = 54;
-	   if(modeflag & HalfDCLK) tempbx++;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2) {
-           tempbx = 52;
-	   if(modeflag & HalfDCLK) tempbx++;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480) {
-           tempbx = 50;
-	   if(modeflag & HalfDCLK) tempbx++;
-        }
+  } else {
+     switch(SiS_Pr->SiS_LCDResInfo) {
+     case Panel_640x480:   (*DisplayType) = 50; break;
+     case Panel_640x480_2: (*DisplayType) = 52; break;
+     case Panel_640x480_3: (*DisplayType) = 54; break;
+     case Panel_800x600:   (*DisplayType) =  0; break;
+     case Panel_1024x600:  (*DisplayType) = 23; break;
+     case Panel_1024x768:  (*DisplayType) =  4; break;
+     case Panel_1152x768:  (*DisplayType) = 27; break;
+     case Panel_1280x768:  (*DisplayType) = 40; break;
+     case Panel_1280x1024: (*DisplayType) =  8; break;
+     case Panel_1400x1050: (*DisplayType) = 14; break;
+     case Panel_1600x1200: (*DisplayType) = 36; break;
+     default: return FALSE;
+     }
+
+     if(modeflag & HalfDCLK) (*DisplayType)++;
 
+     switch(SiS_Pr->SiS_LCDResInfo) {
+     case Panel_640x480:
+     case Panel_640x480_2:
+     case Panel_640x480_3:
+        break;
+     default:
+        if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) (*DisplayType) += 2;
      }
+
      if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
-        tempbx = 12;
-	if(modeflag & HalfDCLK) tempbx++;
+        (*DisplayType) = 12;
+	if(modeflag & HalfDCLK) (*DisplayType)++;
      }
   }
 
 #if 0
   if(SiS_Pr->SiS_IF_DEF_FSTN) {
      if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel320x480){
-        tempbx = 22;
+        (*DisplayType) = 22;
      }
   }
 #endif
 
-  *ResIndex = CRT2CRTC & 0x3F;
-  *DisplayType = tempbx;
   return TRUE;
 }
 
@@ -2685,8 +2804,7 @@
 	       USHORT RefreshRateTableIndex,USHORT *CRT2Index,USHORT *ResIndex,
 	       PSIS_HW_INFO HwInfo)
 {
-  USHORT tempbx=0,tempal=0;
-  USHORT Flag,resinfo=0;
+  USHORT tempbx=0,tempal=0,resinfo=0;
 
   if(ModeNo <= 0x13) {
      tempal = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
@@ -2699,55 +2817,35 @@
 
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {                            /* LCD */
 
-	if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x960) {
-	   tempbx = 15;
-  	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) {
-	   tempbx = 20;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)         tempbx = 21;
-	   else if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx = 22;
- 	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) {
-	   tempbx = 23;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)         tempbx = 24;
-	   else if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx = 25;
-#if 0
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768) {
-	   tempbx = 26;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)         tempbx = 27;
-	   else if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx = 28;
-#endif
- 	} else if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-	   if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
-	      if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)       tempbx = 13;
-	      else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) tempbx = 14;
-	      else {
-	         tempbx = 29;
-		 if(ModeNo >= 0x13) {
-	            /* see below */
-	            if(resinfo == SIS_RI_1280x960) tempal = 10;
-	         }
-              }
-	   } else {
-	      tempbx = 29;
-	      if(ModeNo >= 0x13) {
-	         /* 1280x768 and 1280x960 have same CRT2CRTC,
-	          * so we change it here if 1280x960 is chosen
-	          */
-	         if(resinfo == SIS_RI_1280x960) tempal = 10;
+        tempbx = SiS_Pr->SiS_LCDResInfo;
+	if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx += 32;
+
+	if(SiS_Pr->SiS_LCDResInfo == Panel_1680x1050) {
+	   if     (resinfo == SIS_RI_1280x800)  tempal =  9;
+	   else if(resinfo == SIS_RI_1400x1050) tempal = 11;
+	}
+
+  	if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {  /* Pass 1:1 only (center-screen handled outside) */
+	   tempbx = 100;
+	   if(ModeNo >= 0x13) {
+	      tempal = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC_NS;
+	      if((SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes == 1280) &&
+	         (SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].YRes ==  768)) {
+	         /* Special for Fujitsu 7911 (VL-17WDX8), others custom */
+	         if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768)        tempal = 0x08;
+		 else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768_2) tempal = 0x0f;
+		 else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768_3) tempal = 0x10;
 	      }
-   	   }
-	} else {
-      	   tempbx = SiS_Pr->SiS_LCDResInfo - SiS_Pr->SiS_Panel1024x768;
-      	   if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
-              tempbx += 10;
-       	   }
+	   }
 	}
 
 #ifdef SIS315H
 	if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
-	   if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-	      tempbx = 50;
-	      if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)         tempbx = 51;
-	      else if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx = 52;
+	   if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) {
+	      if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
+	         tempbx = 200;
+	         if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx++;
+	      }
 	   }
 	}
 #endif
@@ -2783,12 +2881,20 @@
 	      (resinfo == SIS_RI_720x576) ||
 	      (resinfo == SIS_RI_768x576)) {
 	      tempal = 6;
+	      if(SiS_Pr->SiS_TVMode & (TVSetPAL | TVSetPALN)) {
+	         if(resinfo == SIS_RI_720x480) tempal = 9;
+	      }
 	   }
 	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {
               if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) {
-	         if(resinfo == SIS_RI_1024x768) {
+	         if(resinfo == SIS_RI_1024x768) tempal = 8;
+	      }
+	      if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) {
+		 if((resinfo == SIS_RI_720x576) ||
+	            (resinfo == SIS_RI_768x576)) {
 	            tempal = 8;
 	         }
+		 if(resinfo == SIS_RI_1280x720) tempal = 9;
 	      }
 	   }
 	}
@@ -2799,70 +2905,54 @@
 
   } else {   /* LVDS, 301B-DH (if running on LCD) */
 
-     Flag = 1;
      tempbx = 0;
-     if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
-        if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {
-           Flag = 0;
-           tempbx = 10;
-	   if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;
-           if(SiS_Pr->SiS_TVMode & TVSetPAL) {
-	      tempbx += 2;
-	      if(SiS_Pr->SiS_ModeType > ModeVGA) {
-		 if(SiS_Pr->SiS_CHSOverScan) tempbx = 99;
-	      }
-	      if(SiS_Pr->SiS_TVMode & TVSetPALM) {
-		 tempbx = 90;
-		 if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;
-	      } else if(SiS_Pr->SiS_TVMode & TVSetPALN) {
-		 tempbx = 92;
-		 if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;
-	      }
-           }
-        }
-     }
-
-     if(Flag) {
-
-	if(SiS_Pr->SiS_LCDResInfo <= SiS_Pr->SiS_Panel1280x1024) {
-	   tempbx = SiS_Pr->SiS_LCDResInfo - SiS_Pr->SiS_PanelMinLVDS;
-   	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx += 3;
-
-	   if(SiS_Pr->SiS_CustomT == CUT_BARCO1024) {
-	      tempbx = 82;
-	      if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx++;
+     if((SiS_Pr->SiS_IF_DEF_CH70xx) && (SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {
+        tempbx = 10;
+	if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;
+        if(SiS_Pr->SiS_TVMode & TVSetPAL) {
+	   tempbx += 2;
+	   if(SiS_Pr->SiS_ModeType > ModeVGA) {
+	      if(SiS_Pr->SiS_CHSOverScan) tempbx = 99;
 	   }
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768) {
-	   tempbx = 18;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx++;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480) {
-	   tempbx = 6;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2) {
-	   tempbx = 30;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) {
-	   tempbx = 30;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x600) {
-	   tempbx = 15;
-  	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx += 2;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1152x768) {
-	   tempbx = 16;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx += 2;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) {
-	   tempbx = 8;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx++;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) {
-	   tempbx = 21;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx++;
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelBarco1366) {
-	   tempbx = 80;
-   	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx++;
+	   if(SiS_Pr->SiS_TVMode & TVSetPALM) {
+	      tempbx = 90;
+	      if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;
+	   } else if(SiS_Pr->SiS_TVMode & TVSetPALN) {
+	      tempbx = 92;
+	      if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;
+	   }
+        }
+     } else {
+        switch(SiS_Pr->SiS_LCDResInfo) {
+	case Panel_640x480:   tempbx = 6;  break;
+	case Panel_640x480_2: tempbx = 30; break;
+	case Panel_640x480_3: tempbx = 30; break;
+	case Panel_800x600:   tempbx = 0;  break;
+	case Panel_1024x600:  tempbx = 15; break;
+	case Panel_1024x768:  tempbx = 2;  break;
+	case Panel_1152x768:  tempbx = 17; break;
+	case Panel_1280x768:  tempbx = 18; break;
+	case Panel_1280x1024: tempbx = 4;  break;
+	case Panel_1400x1050: tempbx = 8;  break;
+	case Panel_1600x1200: tempbx = 21; break;
+	case Panel_Barco1366: tempbx = 80; break;
+	}
+
+	switch(SiS_Pr->SiS_LCDResInfo) {
+	case Panel_640x480:
+	case Panel_640x480_2:
+	case Panel_640x480_3:
+	   break;
+	default:
+	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
 	}
 
-	if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
-	   tempbx = 7;
-        }
+	if(SiS_Pr->SiS_LCDInfo & LCDPass11) tempbx = 7;
 
-	if(SiS_Pr->SiS_CustomT == CUT_PANEL848) {
+	if(SiS_Pr->SiS_CustomT == CUT_BARCO1024) {
+	   tempbx = 82;
+	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx++;
+	} else if(SiS_Pr->SiS_CustomT == CUT_PANEL848) {
 	   tempbx = 84;
 	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx++;
 	}
@@ -2870,45 +2960,17 @@
      }
 
      if(SiS_Pr->SiS_SetFlag & SetDOSMode) {
-        if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) tempal = 7;
+        if(SiS_Pr->SiS_LCDResInfo != Panel_640x480) tempal = 7;
   	if(HwInfo->jChipType < SIS_315H) {
 	   if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) tempal++;
 	}
      }
 
-     *CRT2Index = tempbx;
-     *ResIndex = tempal & 0x1F;
+     (*CRT2Index) = tempbx;
+     (*ResIndex) = tempal & 0x1F;
   }
 }
 
-#ifdef SIS315H
-static void
-SiS_GetCRT2PtrA(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
-		USHORT RefreshRateTableIndex,USHORT *CRT2Index,
-		USHORT *ResIndex)
-{
-  USHORT tempbx,tempal;
-
-  tempbx = SiS_Pr->SiS_LCDResInfo;
-
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)      tempbx = 4;
-  else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) tempbx = 3;
-  else tempbx -= SiS_Pr->SiS_Panel1024x768;
-
-  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx += 5;
-
-  if(ModeNo <= 0x13)
-     tempal = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
-  else
-     tempal = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
-
-  /* No customs required yet (Clevo, Compaq, etc) */
-
-  *CRT2Index = tempbx;
-  *ResIndex = tempal & 0x1F;
-}
-#endif
-
 static void
 SiS_GetRAMDAC2DATA(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
                    USHORT RefreshRateTableIndex,PSIS_HW_INFO HwInfo)
@@ -2969,8 +3031,7 @@
 
 static void
 SiS_GetCRT2DataLVDS(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
-                    USHORT RefreshRateTableIndex,
-		    PSIS_HW_INFO HwInfo)
+                    USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo)
 {
    USHORT CRT2Index, ResIndex;
    const SiS_LVDSDataStruct *LVDSData = NULL;
@@ -2988,23 +3049,55 @@
       SiS_Pr->SiS_RY4COE = 0;
    }
 
-   if((SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
+   if((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
 
 #ifdef SIS315H
-      SiS_GetCRT2PtrA(SiS_Pr,ModeNo,ModeIdIndex,RefreshRateTableIndex,
-                      &CRT2Index,&ResIndex);
-
-      switch (CRT2Index) {
-      	case  0:  LVDSData = SiS_Pr->SiS_LCDA1024x768Data_1;    break;
-      	case  1:  LVDSData = SiS_Pr->SiS_LCDA1280x1024Data_1;   break;
-	case  3:  LVDSData = SiS_Pr->SiS_LCDA1400x1050Data_1;   break;
-	case  4:  LVDSData = SiS_Pr->SiS_LCDA1600x1200Data_1;   break;
-      	case  5:  LVDSData = SiS_Pr->SiS_LCDA1024x768Data_2;    break;
-      	case  6:  LVDSData = SiS_Pr->SiS_LCDA1280x1024Data_2;   break;
-	case  8:  LVDSData = SiS_Pr->SiS_LCDA1400x1050Data_2;   break;
-	case  9:  LVDSData = SiS_Pr->SiS_LCDA1600x1200Data_2;   break;
-	default:  LVDSData = SiS_Pr->SiS_LCDA1024x768Data_1;    break;
+      if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+         if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
+	    if(SiS_Pr->UseCustomMode) {
+	       SiS_Pr->SiS_VGAHT = SiS_Pr->SiS_HT = SiS_Pr->CHTotal;
+	       SiS_Pr->SiS_VGAVT = SiS_Pr->SiS_VT = SiS_Pr->CVTotal;
+	    } else {
+	       if(ModeNo < 0x13) {
+	          ResIndex = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
+	       } else {
+	          ResIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC_NS;
+		  /* Special for our 3 types, others custom (works with default) */
+		  if((SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes == 1280) &&
+	             (SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].YRes ==  768)) {
+	             if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768)        ResIndex = 0x08;
+		     else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768_2) ResIndex = 0x0f;
+		     else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768_3) ResIndex = 0x10;
+	          }
+		  /* Special for 1280x720 TMDS <> LVDS */
+		  if((SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes == 1280) &&
+	             (SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].YRes ==  720)) {
+		     if(SiS_Pr->SiS_LCDResInfo == Panel_1280x720) {
+		        if(SiS_Pr->PanelHT == 1344) ResIndex = 0x12;
+		     }
+	          }
+	       }
+	       SiS_Pr->SiS_VGAHT = SiS_Pr->SiS_NoScaleData[ResIndex].VGAHT;
+               SiS_Pr->SiS_VGAVT = SiS_Pr->SiS_NoScaleData[ResIndex].VGAVT;
+               SiS_Pr->SiS_HT    = SiS_Pr->SiS_NoScaleData[ResIndex].LCDHT;
+               SiS_Pr->SiS_VT    = SiS_Pr->SiS_NoScaleData[ResIndex].LCDVT;
+	    }
+	 } else {
+     	    SiS_Pr->SiS_VGAHT = SiS_Pr->SiS_HT = SiS_Pr->PanelHT;
+            SiS_Pr->SiS_VGAVT = SiS_Pr->SiS_VT = SiS_Pr->PanelVT;
+	 }
+      } else {
+	 /* This handles custom modes and custom panels */
+	 SiS_Pr->SiS_HDE = SiS_Pr->PanelXRes;
+         SiS_Pr->SiS_VDE = SiS_Pr->PanelYRes;
+         SiS_Pr->SiS_HT  = SiS_Pr->PanelHT;
+         SiS_Pr->SiS_VT  = SiS_Pr->PanelVT;
+	 SiS_Pr->SiS_VGAHT = SiS_Pr->PanelHT - (SiS_Pr->PanelXRes - SiS_Pr->SiS_VGAHDE);
+	 SiS_Pr->SiS_VGAVT = SiS_Pr->PanelVT - (SiS_Pr->PanelYRes - SiS_Pr->SiS_VGAVDE);
       }
+
+      SiS_CalcLCDACRT1Timing(SiS_Pr,ModeNo,ModeIdIndex);
+
 #endif
 
    } else {
@@ -3015,7 +3108,7 @@
       }
 
       SiS_GetCRT2Ptr(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex,
-                     &CRT2Index, &ResIndex, HwInfo);
+                     		&CRT2Index, &ResIndex, HwInfo);
 
       /* 301BDH needs LVDS Data */
       if((SiS_Pr->SiS_VBType & VB_NoLCD) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {
@@ -3023,72 +3116,59 @@
       }
 
       switch (CRT2Index) {
-      	case  0:  LVDSData = SiS_Pr->SiS_LVDS800x600Data_1;    break;
-      	case  1:  LVDSData = SiS_Pr->SiS_LVDS1024x768Data_1;   break;
-      	case  2:  LVDSData = SiS_Pr->SiS_LVDS1280x1024Data_1;  break;
-      	case  3:  LVDSData = SiS_Pr->SiS_LVDS800x600Data_2;    break;
-      	case  4:  LVDSData = SiS_Pr->SiS_LVDS1024x768Data_2;   break;
-      	case  5:  LVDSData = SiS_Pr->SiS_LVDS1280x1024Data_2;  break;
-	case  6:  LVDSData = SiS_Pr->SiS_LVDS640x480Data_1;    break;
-        case  7:  LVDSData = SiS_Pr->SiS_LVDSXXXxXXXData_1;    break;
-	case  8:  LVDSData = SiS_Pr->SiS_LVDS1400x1050Data_1;  break;
-	case  9:  LVDSData = SiS_Pr->SiS_LVDS1400x1050Data_2;  break;
-      	case 10:  LVDSData = SiS_Pr->SiS_CHTVUNTSCData;        break;
-      	case 11:  LVDSData = SiS_Pr->SiS_CHTVONTSCData;        break;
-      	case 12:  LVDSData = SiS_Pr->SiS_CHTVUPALData;         break;
-      	case 13:  LVDSData = SiS_Pr->SiS_CHTVOPALData;         break;
-      	case 14:  LVDSData = SiS_Pr->SiS_LVDS320x480Data_1;    break;
-	case 15:  LVDSData = SiS_Pr->SiS_LVDS1024x600Data_1;   break;
-	case 16:  LVDSData = SiS_Pr->SiS_LVDS1152x768Data_1;   break;
-	case 17:  LVDSData = SiS_Pr->SiS_LVDS1024x600Data_2;   break;
-	case 18:  LVDSData = SiS_Pr->SiS_LVDS1152x768Data_2;   break;
-	case 19:  LVDSData = SiS_Pr->SiS_LVDS1280x768Data_1;   break;
-	case 20:  LVDSData = SiS_Pr->SiS_LVDS1280x768Data_2;   break;
-	case 21:  LVDSData = SiS_Pr->SiS_LVDS1600x1200Data_1;  break;
-	case 22:  LVDSData = SiS_Pr->SiS_LVDS1600x1200Data_2;  break;
-	case 30:  LVDSData = SiS_Pr->SiS_LVDS640x480Data_2;    break;
-	case 80:  LVDSData = SiS_Pr->SiS_LVDSBARCO1366Data_1;  break;
-	case 81:  LVDSData = SiS_Pr->SiS_LVDSBARCO1366Data_2;  break;
-	case 82:  LVDSData = SiS_Pr->SiS_LVDSBARCO1024Data_1;  break;
-	case 83:  LVDSData = SiS_Pr->SiS_LVDSBARCO1024Data_2;  break;
-	case 84:  LVDSData = SiS_Pr->SiS_LVDS848x480Data_1;    break;
-	case 85:  LVDSData = SiS_Pr->SiS_LVDS848x480Data_2;    break;
-	case 90:  LVDSData = SiS_Pr->SiS_CHTVUPALMData;        break;
-      	case 91:  LVDSData = SiS_Pr->SiS_CHTVOPALMData;        break;
-      	case 92:  LVDSData = SiS_Pr->SiS_CHTVUPALNData;        break;
-      	case 93:  LVDSData = SiS_Pr->SiS_CHTVOPALNData;        break;
-	case 99:  LVDSData = SiS_Pr->SiS_CHTVSOPALData;	       break;  /* Super Overscan */
-	default:  LVDSData = SiS_Pr->SiS_LVDS1024x768Data_1;   break;
-      }
-   }
-
-   SiS_Pr->SiS_VGAHT = (LVDSData+ResIndex)->VGAHT;
-   SiS_Pr->SiS_VGAVT = (LVDSData+ResIndex)->VGAVT;
-   SiS_Pr->SiS_HT    = (LVDSData+ResIndex)->LCDHT;
-   SiS_Pr->SiS_VT    = (LVDSData+ResIndex)->LCDVT;
+      	 case  0: LVDSData = SiS_Pr->SiS_LVDS800x600Data_1;    break;
+	 case  1: LVDSData = SiS_Pr->SiS_LVDS800x600Data_2;    break;
+      	 case  2: LVDSData = SiS_Pr->SiS_LVDS1024x768Data_1;   break;
+	 case  3: LVDSData = SiS_Pr->SiS_LVDS1024x768Data_2;   break;
+      	 case  4: LVDSData = SiS_Pr->SiS_LVDS1280x1024Data_1;  break;
+      	 case  5: LVDSData = SiS_Pr->SiS_LVDS1280x1024Data_2;  break;
+	 case  6: LVDSData = SiS_Pr->SiS_LVDS640x480Data_1;    break;
+         case  7: LVDSData = SiS_Pr->SiS_LVDSXXXxXXXData_1;    break;
+	 case  8: LVDSData = SiS_Pr->SiS_LVDS1400x1050Data_1;  break;
+	 case  9: LVDSData = SiS_Pr->SiS_LVDS1400x1050Data_2;  break;
+      	 case 10: LVDSData = SiS_Pr->SiS_CHTVUNTSCData;        break;
+      	 case 11: LVDSData = SiS_Pr->SiS_CHTVONTSCData;        break;
+      	 case 12: LVDSData = SiS_Pr->SiS_CHTVUPALData;         break;
+      	 case 13: LVDSData = SiS_Pr->SiS_CHTVOPALData;         break;
+      	 case 14: LVDSData = SiS_Pr->SiS_LVDS320x480Data_1;    break;
+	 case 15: LVDSData = SiS_Pr->SiS_LVDS1024x600Data_1;   break;
+	 case 16: LVDSData = SiS_Pr->SiS_LVDS1024x600Data_2;   break;
+	 case 17: LVDSData = SiS_Pr->SiS_LVDS1152x768Data_1;   break;
+	 case 18: LVDSData = SiS_Pr->SiS_LVDS1152x768Data_2;   break;
+	 case 19: LVDSData = SiS_Pr->SiS_LVDS1280x768Data_1;   break;
+	 case 20: LVDSData = SiS_Pr->SiS_LVDS1280x768Data_2;   break;
+	 case 21: LVDSData = SiS_Pr->SiS_LVDS1600x1200Data_1;  break;
+	 case 22: LVDSData = SiS_Pr->SiS_LVDS1600x1200Data_2;  break;
+	 case 30: LVDSData = SiS_Pr->SiS_LVDS640x480Data_2;    break;
+	 case 80: LVDSData = SiS_Pr->SiS_LVDSBARCO1366Data_1;  break;
+	 case 81: LVDSData = SiS_Pr->SiS_LVDSBARCO1366Data_2;  break;
+	 case 82: LVDSData = SiS_Pr->SiS_LVDSBARCO1024Data_1;  break;
+	 case 83: LVDSData = SiS_Pr->SiS_LVDSBARCO1024Data_2;  break;
+	 case 84: LVDSData = SiS_Pr->SiS_LVDS848x480Data_1;    break;
+	 case 85: LVDSData = SiS_Pr->SiS_LVDS848x480Data_2;    break;
+	 case 90: LVDSData = SiS_Pr->SiS_CHTVUPALMData;        break;
+      	 case 91: LVDSData = SiS_Pr->SiS_CHTVOPALMData;        break;
+      	 case 92: LVDSData = SiS_Pr->SiS_CHTVUPALNData;        break;
+      	 case 93: LVDSData = SiS_Pr->SiS_CHTVOPALNData;        break;
+	 case 99: LVDSData = SiS_Pr->SiS_CHTVSOPALData;	       break;  /* Super Overscan */
+	 default: LVDSData = SiS_Pr->SiS_LVDS1024x768Data_1;   break;
+      }
+
+      SiS_Pr->SiS_VGAHT = (LVDSData+ResIndex)->VGAHT;
+      SiS_Pr->SiS_VGAVT = (LVDSData+ResIndex)->VGAVT;
+      SiS_Pr->SiS_HT    = (LVDSData+ResIndex)->LCDHT;
+      SiS_Pr->SiS_VT    = (LVDSData+ResIndex)->LCDVT;
 
-   if(SiS_Pr->SiS_VBType & VB_SISVB) {
-
-      if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
-         SiS_Pr->SiS_HDE = SiS_Pr->PanelXRes;
-         SiS_Pr->SiS_VDE = SiS_Pr->PanelYRes;
-      }
-
-   } else {
-
-      if(SiS_Pr->SiS_IF_DEF_TRUMPION == 0) {
+      if(!(SiS_Pr->SiS_VBType & VB_SISVB)) {
          if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {
-            if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-               if((!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) || (SiS_Pr->SiS_SetFlag & SetDOSMode)) {
-	          SiS_Pr->SiS_HDE = SiS_Pr->PanelXRes;
-                  SiS_Pr->SiS_VDE = SiS_Pr->PanelYRes;
-
-	 	  if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) {
-		     if(ResIndex < 0x08) {
-		        SiS_Pr->SiS_HDE = 1280;
-                        SiS_Pr->SiS_VDE = 1024;
-		     }
-		  }
+            if((!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) || (SiS_Pr->SiS_SetFlag & SetDOSMode)) {
+	       SiS_Pr->SiS_HDE = SiS_Pr->PanelXRes;
+               SiS_Pr->SiS_VDE = SiS_Pr->PanelYRes;
+	       if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) {
+		  if(ResIndex < 0x08) {
+		     SiS_Pr->SiS_HDE = 1280;
+                     SiS_Pr->SiS_VDE = 1024;
+                  }
                }
             }
          }
@@ -3101,23 +3181,38 @@
                    USHORT RefreshRateTableIndex,
 		   PSIS_HW_INFO HwInfo)
 {
-  USHORT tempax,tempbx,modeflag;
-  USHORT resinfo;
-  USHORT CRT2Index,ResIndex;
+  UCHAR  *ROMAddr = NULL;
+  USHORT tempax,tempbx,modeflag,romptr=0;
+  USHORT resinfo,CRT2Index,ResIndex;
   const SiS_LCDDataStruct *LCDPtr = NULL;
   const SiS_TVDataStruct  *TVPtr  = NULL;
+#ifdef SIS315H
+  SHORT  resinfo661;
+#endif
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
      resinfo = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo;
+  } else if(SiS_Pr->UseCustomMode) {
+     modeflag = SiS_Pr->CModeFlag;
+     resinfo = 0;
   } else {
-     if(SiS_Pr->UseCustomMode) {
-        modeflag = SiS_Pr->CModeFlag;
-	resinfo = 0;
-     } else {
-    	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-    	resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+     resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+#ifdef SIS315H
+     resinfo661 = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].ROMMODEIDX661;
+     if( (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)   &&
+         (SiS_Pr->SiS_SetFlag & LCDVESATiming) &&
+         (resinfo661 >= 0)                     &&
+	 (SiS_Pr->SiS_NeedRomModeData) ) {
+        if((ROMAddr = GetLCDStructPtr661(SiS_Pr, HwInfo))) {
+	   if((romptr = (SISGETROMW(21)))) {
+              romptr += (resinfo661 * 10);
+	      ROMAddr = HwInfo->pjVirtualRomBase;
+	   }
+	}
      }
+#endif
   }
   
   SiS_Pr->SiS_NewFlickerMode = 0;
@@ -3145,6 +3240,7 @@
      } else {
 
         SiS_GetRAMDAC2DATA(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
+
      }
 
   } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
@@ -3153,20 +3249,20 @@
                     &CRT2Index,&ResIndex,HwInfo);
 
      switch(CRT2Index) {
-       case  2:  TVPtr = SiS_Pr->SiS_ExtHiTVData;   break;
-       case  3:  TVPtr = SiS_Pr->SiS_ExtPALData;    break;
-       case  4:  TVPtr = SiS_Pr->SiS_ExtNTSCData;   break;
-       case  5:  TVPtr = SiS_Pr->SiS_Ext525iData;   break;
-       case  6:  TVPtr = SiS_Pr->SiS_Ext525pData;   break;
-       case  7:  TVPtr = SiS_Pr->SiS_Ext750pData;   break;
-       case  8:  TVPtr = SiS_Pr->SiS_StPALData;     break;
-       case  9:  TVPtr = SiS_Pr->SiS_StNTSCData;    break;
-       case 10:  TVPtr = SiS_Pr->SiS_St525iData;    break;
-       case 11:  TVPtr = SiS_Pr->SiS_St525pData;    break;
-       case 12:  TVPtr = SiS_Pr->SiS_St750pData;    break;
-       case 13:  TVPtr = SiS_Pr->SiS_St1HiTVData;   break;
-       case 14:  TVPtr = SiS_Pr->SiS_St2HiTVData;   break;
-       default:  TVPtr = SiS_Pr->SiS_StPALData;     break;
+        case  2: TVPtr = SiS_Pr->SiS_ExtHiTVData;   break;
+        case  3: TVPtr = SiS_Pr->SiS_ExtPALData;    break;
+        case  4: TVPtr = SiS_Pr->SiS_ExtNTSCData;   break;
+        case  5: TVPtr = SiS_Pr->SiS_Ext525iData;   break;
+        case  6: TVPtr = SiS_Pr->SiS_Ext525pData;   break;
+        case  7: TVPtr = SiS_Pr->SiS_Ext750pData;   break;
+        case  8: TVPtr = SiS_Pr->SiS_StPALData;     break;
+        case  9: TVPtr = SiS_Pr->SiS_StNTSCData;    break;
+        case 10: TVPtr = SiS_Pr->SiS_St525iData;    break;
+        case 11: TVPtr = SiS_Pr->SiS_St525pData;    break;
+        case 12: TVPtr = SiS_Pr->SiS_St750pData;    break;
+        case 13: TVPtr = SiS_Pr->SiS_St1HiTVData;   break;
+        case 14: TVPtr = SiS_Pr->SiS_St2HiTVData;   break;
+        default: TVPtr = SiS_Pr->SiS_StPALData;     break;
      }
 
      SiS_Pr->SiS_RVBHCMAX  = (TVPtr+ResIndex)->RVBHCMAX;
@@ -3247,10 +3343,11 @@
 
   } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
 
+     SiS_Pr->SiS_RVBHCMAX  = 1;
+     SiS_Pr->SiS_RVBHCFACT = 1;
+
      if(SiS_Pr->UseCustomMode) {
 
-        SiS_Pr->SiS_RVBHCMAX  = 1;
-        SiS_Pr->SiS_RVBHCFACT = 1;
         SiS_Pr->SiS_VGAHT     = SiS_Pr->CHTotal;
         SiS_Pr->SiS_VGAVT     = SiS_Pr->CVTotal;
         SiS_Pr->SiS_HT        = SiS_Pr->CHTotal;
@@ -3260,58 +3357,85 @@
 
      } else {
 
-        SiS_GetCRT2Ptr(SiS_Pr,ModeNo,ModeIdIndex,RefreshRateTableIndex,
-                      &CRT2Index,&ResIndex,HwInfo);
+        BOOLEAN gotit = FALSE;
+
+        if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {
+
+           SiS_Pr->SiS_VGAHT     = SiS_Pr->PanelHT;
+           SiS_Pr->SiS_VGAVT     = SiS_Pr->PanelVT;
+           SiS_Pr->SiS_HT        = SiS_Pr->PanelHT;
+           SiS_Pr->SiS_VT        = SiS_Pr->PanelVT;
+	   gotit = TRUE;
+
+	} else if( (!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) && (romptr) && (ROMAddr) ) {
+
+#ifdef SIS315H
+	   SiS_Pr->SiS_RVBHCMAX  = ROMAddr[romptr];
+           SiS_Pr->SiS_RVBHCFACT = ROMAddr[romptr+1];
+           SiS_Pr->SiS_VGAHT     = ROMAddr[romptr+2] | ((ROMAddr[romptr+3] & 0x0f) << 8);
+           SiS_Pr->SiS_VGAVT     = ROMAddr[romptr+4] | ((ROMAddr[romptr+3] & 0xf0) << 4);
+           SiS_Pr->SiS_HT        = ROMAddr[romptr+5] | ((ROMAddr[romptr+6] & 0x0f) << 8);
+           SiS_Pr->SiS_VT        = ROMAddr[romptr+7] | ((ROMAddr[romptr+6] & 0xf0) << 4);
+	   if(SiS_Pr->SiS_VGAHT) gotit = TRUE;
+#endif
+
+	}
 
-        switch(CRT2Index) {
-         case  0: LCDPtr = SiS_Pr->SiS_ExtLCD1024x768Data;        break; /* VESA Timing */
-         case  1: LCDPtr = SiS_Pr->SiS_ExtLCD1280x1024Data;       break; /* VESA Timing */
-         case  5: LCDPtr = SiS_Pr->SiS_StLCD1024x768Data;         break; /* Obviously unused */
-         case  6: LCDPtr = SiS_Pr->SiS_StLCD1280x1024Data;        break; /* Obviously unused */
-         case 10: LCDPtr = SiS_Pr->SiS_St2LCD1024x768Data;        break; /* Non-VESA Timing */
-         case 11: LCDPtr = SiS_Pr->SiS_St2LCD1280x1024Data;       break; /* Non-VESA Timing */
-         case 13: LCDPtr = SiS_Pr->SiS_NoScaleData1024x768;       break; /* Non-expanding */
-         case 14: LCDPtr = SiS_Pr->SiS_NoScaleData1280x1024;      break; /* Non-expanding */
-         case 15: LCDPtr = SiS_Pr->SiS_LCD1280x960Data;           break; /* 1280x960 */
-         case 20: LCDPtr = SiS_Pr->SiS_ExtLCD1400x1050Data;       break; /* VESA Timing */
-         case 21: LCDPtr = SiS_Pr->SiS_NoScaleData1400x1050;      break; /* Non-expanding (let panel scale) */
-         case 22: LCDPtr = SiS_Pr->SiS_StLCD1400x1050Data;        break; /* Non-VESA Timing (let panel scale) */
-         case 23: LCDPtr = SiS_Pr->SiS_ExtLCD1600x1200Data;       break; /* VESA Timing */
-         case 24: LCDPtr = SiS_Pr->SiS_NoScaleData1600x1200;      break; /* Non-expanding */
-         case 25: LCDPtr = SiS_Pr->SiS_StLCD1600x1200Data;        break; /* Non-VESA Timing */
-         case 26: LCDPtr = SiS_Pr->SiS_ExtLCD1280x768Data;        break; /* VESA Timing */
-         case 27: LCDPtr = SiS_Pr->SiS_NoScaleData1280x768;       break; /* Non-expanding */
-         case 28: LCDPtr = SiS_Pr->SiS_StLCD1280x768Data;         break; /* Non-VESA Timing */
-         case 29: LCDPtr = SiS_Pr->SiS_NoScaleData;	          break; /* Generic no-scale data */
-#ifdef SIS315H
-	 case 50: LCDPtr = (SiS_LCDDataStruct *)SiS310_ExtCompaq1280x1024Data;	break;
-	 case 51: LCDPtr = SiS_Pr->SiS_NoScaleData1280x1024;			break;
-	 case 52: LCDPtr = SiS_Pr->SiS_St2LCD1280x1024Data;	  		break;
-#endif
-         default: LCDPtr = SiS_Pr->SiS_ExtLCD1024x768Data;	  break;
-        }
-
-        SiS_Pr->SiS_RVBHCMAX  = (LCDPtr+ResIndex)->RVBHCMAX;
-        SiS_Pr->SiS_RVBHCFACT = (LCDPtr+ResIndex)->RVBHCFACT;
-        SiS_Pr->SiS_VGAHT     = (LCDPtr+ResIndex)->VGAHT;
-        SiS_Pr->SiS_VGAVT     = (LCDPtr+ResIndex)->VGAVT;
-        SiS_Pr->SiS_HT        = (LCDPtr+ResIndex)->LCDHT;
-        SiS_Pr->SiS_VT        = (LCDPtr+ResIndex)->LCDVT;
+	if(!gotit) {
+
+           SiS_GetCRT2Ptr(SiS_Pr,ModeNo,ModeIdIndex,RefreshRateTableIndex,
+                          &CRT2Index,&ResIndex,HwInfo);
+
+           switch(CRT2Index) {
+	      case Panel_1024x768      : LCDPtr = SiS_Pr->SiS_ExtLCD1024x768Data;   break;
+	      case Panel_1024x768  + 32: LCDPtr = SiS_Pr->SiS_St2LCD1024x768Data;   break;
+	      case Panel_1280x720      :
+	      case Panel_1280x720  + 32: LCDPtr = SiS_Pr->SiS_LCD1280x720Data;      break;
+	      case Panel_1280x768_2    : LCDPtr = SiS_Pr->SiS_ExtLCD1280x768_2Data; break;
+              case Panel_1280x768_2+ 32: LCDPtr = SiS_Pr->SiS_StLCD1280x768_2Data;  break;
+	      case Panel_1280x768_3    :
+	      case Panel_1280x768_3+ 32: LCDPtr = SiS_Pr->SiS_LCD1280x768_3Data;    break;
+	      case Panel_1280x800      :
+	      case Panel_1280x800  + 32: LCDPtr = SiS_Pr->SiS_LCD1280x800Data;      break;
+	      case Panel_1280x960      :
+	      case Panel_1280x960  + 32: LCDPtr = SiS_Pr->SiS_LCD1280x960Data;      break;
+              case Panel_1280x1024     : LCDPtr = SiS_Pr->SiS_ExtLCD1280x1024Data;  break;
+              case Panel_1280x1024 + 32: LCDPtr = SiS_Pr->SiS_St2LCD1280x1024Data;  break;
+              case Panel_1400x1050     : LCDPtr = SiS_Pr->SiS_ExtLCD1400x1050Data;  break;
+              case Panel_1400x1050 + 32: LCDPtr = SiS_Pr->SiS_StLCD1400x1050Data;   break;
+              case Panel_1600x1200     : LCDPtr = SiS_Pr->SiS_ExtLCD1600x1200Data;  break;
+              case Panel_1600x1200 + 32: LCDPtr = SiS_Pr->SiS_StLCD1600x1200Data;   break;
+	      case Panel_1680x1050     :
+	      case Panel_1680x1050 + 32: LCDPtr = SiS_Pr->SiS_LCD1680x1050Data;     break;
+	      case 100		       : LCDPtr = SiS_Pr->SiS_NoScaleData;	    break;
+#ifdef SIS315H
+	      case 200                 : LCDPtr = SiS310_ExtCompaq1280x1024Data;    break;
+	      case 201                 : LCDPtr = SiS_Pr->SiS_St2LCD1280x1024Data;  break;
+#endif
+              default                  : LCDPtr = SiS_Pr->SiS_ExtLCD1024x768Data;   break;
+           }
 
 #ifdef TWDEBUG
-        xf86DrvMsg(0, X_INFO,
-    	    "GetCRT2Data: Index %d ResIndex %d\n", CRT2Index, ResIndex);
+           xf86DrvMsg(0, X_INFO, "GetCRT2Data: Index %d ResIndex %d\n", CRT2Index, ResIndex);
 #endif
 
-	if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-           tempax = 1024;
+           SiS_Pr->SiS_RVBHCMAX  = (LCDPtr+ResIndex)->RVBHCMAX;
+           SiS_Pr->SiS_RVBHCFACT = (LCDPtr+ResIndex)->RVBHCFACT;
+           SiS_Pr->SiS_VGAHT     = (LCDPtr+ResIndex)->VGAHT;
+           SiS_Pr->SiS_VGAVT     = (LCDPtr+ResIndex)->VGAVT;
+           SiS_Pr->SiS_HT        = (LCDPtr+ResIndex)->LCDHT;
+           SiS_Pr->SiS_VT        = (LCDPtr+ResIndex)->LCDVT;
+
+        }
+
+	tempax = SiS_Pr->PanelXRes;
+        tempbx = SiS_Pr->PanelYRes;
+
+	if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
            if(SiS_Pr->SiS_SetFlag & LCDVESATiming) {
               if(HwInfo->jChipType < SIS_315H) {
                  if     (SiS_Pr->SiS_VGAVDE == 350) tempbx = 560;
                  else if(SiS_Pr->SiS_VGAVDE == 400) tempbx = 640;
-                 else                               tempbx = 768;
-              } else {
-                 tempbx = 768;
               }
            } else {
               if     (SiS_Pr->SiS_VGAVDE == 357) tempbx = 527;
@@ -3320,43 +3444,27 @@
               else if(SiS_Pr->SiS_VGAVDE == 600) tempbx = 775;
               else if(SiS_Pr->SiS_VGAVDE == 350) tempbx = 560;
               else if(SiS_Pr->SiS_VGAVDE == 400) tempbx = 640;
-              else                               tempbx = 768;
            }
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-           tempax = 1280;
-           if     (SiS_Pr->SiS_VGAVDE == 360) tempbx = 768;
-           else if(SiS_Pr->SiS_VGAVDE == 375) tempbx = 800;
-           else if(SiS_Pr->SiS_VGAVDE == 405) tempbx = 864;
-           else                               tempbx = 1024;
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x960) {
-           tempax = 1280;
+	} else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x960) {
            if     (SiS_Pr->SiS_VGAVDE == 350)  tempbx = 700;
            else if(SiS_Pr->SiS_VGAVDE == 400)  tempbx = 800;
            else if(SiS_Pr->SiS_VGAVDE == 1024) tempbx = 960;
-           else                                tempbx = 960;
-	} else if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) &&
-	          (HwInfo->jChipType >= SIS_661)) {
-	   tempax = 1400;
-	   tempbx = 1050;
-	   if(SiS_Pr->SiS_VGAVDE == 1024) {
-	      tempax = 1280;
-	      tempbx = 1024;
-	   }
-        } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) {
-           tempax = 1600;
-	   tempbx = 1200;
-	   if((HwInfo->jChipType < SIS_661) || (!(SiS_Pr->SiS_SetFlag & LCDVESATiming))) {
+	} else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) {
+           if     (SiS_Pr->SiS_VGAVDE == 360) tempbx = 768;
+           else if(SiS_Pr->SiS_VGAVDE == 375) tempbx = 800;
+           else if(SiS_Pr->SiS_VGAVDE == 405) tempbx = 864;
+        } else if(SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) {
+	   if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
               if     (SiS_Pr->SiS_VGAVDE == 350)  tempbx = 875;
               else if(SiS_Pr->SiS_VGAVDE == 400)  tempbx = 1000;
            }
-        } else {
-	   tempax = SiS_Pr->PanelXRes;
-           tempbx = SiS_Pr->PanelYRes;
-	}
+        }
+
         if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
            tempax = SiS_Pr->SiS_VGAHDE;
            tempbx = SiS_Pr->SiS_VGAVDE;
         }
+
         SiS_Pr->SiS_HDE = tempax;
         SiS_Pr->SiS_VDE = tempbx;
      }
@@ -3370,31 +3478,15 @@
 
   if(SiS_Pr->SiS_VBType & VB_SISVB) {
 
-     if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-
-        if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
-
-           SiS_GetCRT2DataLVDS(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
-
-        } else {
-
-	   if((SiS_Pr->SiS_VBType & VB_NoLCD) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {
-
-	      /* Need LVDS Data for LCD on 301B-DH */
-	      SiS_GetCRT2DataLVDS(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
-
-	   } else {
-
-	      SiS_GetCRT2Data301(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
-
-           }
-
-        }
-
+     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
+        SiS_GetCRT2DataLVDS(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
      } else {
-
-     	SiS_GetCRT2Data301(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
-
+	if((SiS_Pr->SiS_VBType & VB_NoLCD) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {
+	   /* Need LVDS Data for LCD on 301B-DH */
+	   SiS_GetCRT2DataLVDS(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
+	} else {
+	   SiS_GetCRT2Data301(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
+        }
      }
 
   } else {
@@ -3405,7 +3497,7 @@
 }
 
 /*********************************************/
-/*            GET LVDS DES DATA              */
+/*         GET LVDS DES (SKEW) DATA          */
 /*********************************************/
 
 static void
@@ -3413,106 +3505,55 @@
                   USHORT RefreshRateTableIndex, USHORT *PanelIndex,
 		  USHORT *ResIndex, PSIS_HW_INFO HwInfo)
 {
-  USHORT tempbx,tempal,modeflag;
+  USHORT modeflag;
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-     tempal = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
+     (*ResIndex) = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
   } else {
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-     tempal = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
+     (*ResIndex) = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
   }
 
-  tempbx = 0;
+  (*ResIndex) &= 0x1F;
+  (*PanelIndex) = 0;
+
   if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-        tempbx = 50;
-        if((SiS_Pr->SiS_TVMode & TVSetPAL) && (!(SiS_Pr->SiS_TVMode & TVSetPALM))) tempbx += 2;
-        if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;
+        (*PanelIndex) = 50;
+        if((SiS_Pr->SiS_TVMode & TVSetPAL) && (!(SiS_Pr->SiS_TVMode & TVSetPALM))) (*PanelIndex) += 2;
+        if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) (*PanelIndex) += 1;
         /* Nothing special needed for SOverscan    */
-        /*     PALM uses NTSC data, PALN uses PAL data */
+        /* PALM uses NTSC data, PALN uses PAL data */
      }
   }
 
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-     tempbx = SiS_Pr->SiS_LCDTypeInfo;
+     *PanelIndex = SiS_Pr->SiS_LCDTypeInfo;
      if(HwInfo->jChipType >= SIS_661) {
         /* As long as we don's use the BIOS tables, we
 	 * need to convert the TypeInfo as for 315 series
 	 */
-        tempbx = SiS_Pr->SiS_LCDResInfo - 1;
+        (*PanelIndex) = SiS_Pr->SiS_LCDResInfo - 1;
      }
-     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx += 16;
-     if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
-        tempbx = 32;
-        if(modeflag & HalfDCLK) tempbx++;
+     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+        (*PanelIndex) += 16;
+        if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
+           (*PanelIndex) = 32;
+           if(modeflag & HalfDCLK) (*PanelIndex)++;
+	}
      }
   }
 
   if(SiS_Pr->SiS_SetFlag & SetDOSMode) {
-     if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480)  {
-        tempal = 0x07;
+     if(SiS_Pr->SiS_LCDResInfo != Panel_640x480) {
+        (*ResIndex) = 7;
         if(HwInfo->jChipType < SIS_315H) {
-           if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) tempal++;
+           if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) (*ResIndex)++;
         }
      }
   }
-
-  *PanelIndex = tempbx;
-  *ResIndex = tempal & 0x1F;
-}
-
-#ifdef SIS315H
-static void
-SiS_GetLVDSDesPtrA(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
-                   USHORT RefreshRateTableIndex, USHORT *PanelIndex, USHORT *ResIndex,
-		   PSIS_HW_INFO HwInfo)
-{
-  USHORT tempbx=0,tempal;
-
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050)      tempbx = 2;
-  else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) tempbx = 3;
-  else tempbx = SiS_Pr->SiS_LCDResInfo - 2;
-
-  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx += 4;
-
-  if(SiS_Pr->SiS_CustomT == CUT_CLEVO1024) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-        if(SiS_IsDualLink(SiS_Pr, HwInfo)) {
-	   tempbx = 80;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
-	}
-     }
-  }
-  if((SiS_Pr->SiS_CustomT == CUT_UNIWILL1024) ||
-     (SiS_Pr->SiS_CustomT == CUT_UNIWILL10242)) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-	tempbx = 82;
-	if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
-     }
-  }
-  if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-	tempbx = 84;
-	if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
-     }
-  }
-  if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-	tempbx = 86;
-	if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
-     }
-  }
-
-  if(ModeNo <= 0x13)
-     tempal = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
-  else
-     tempal = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
-
-  *PanelIndex = tempbx;
-  *ResIndex = tempal & 0x1F;
 }
-#endif
 
 static void
 SiS_GetLVDSDesData(SiS_Private *SiS_Pr, USHORT ModeNo,USHORT ModeIdIndex,
@@ -3522,39 +3563,45 @@
   USHORT PanelIndex,ResIndex;
   const  SiS_LVDSDesStruct *PanelDesPtr = NULL;
 
-  if((SiS_Pr->UseCustomMode) ||
-     (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) ||
-     (SiS_Pr->SiS_CustomT == CUT_PANEL848)) {
-     SiS_Pr->SiS_LCDHDES = 0;
-     SiS_Pr->SiS_LCDVDES = 0;
+  SiS_Pr->SiS_LCDHDES = 0;
+  SiS_Pr->SiS_LCDVDES = 0;
+
+  if( (SiS_Pr->UseCustomMode) 		         ||
+      (SiS_Pr->SiS_LCDResInfo == Panel_Custom)   ||
+      (SiS_Pr->SiS_CustomT == CUT_PANEL848)      ||
+      ((SiS_Pr->SiS_VBType & VB_SISVB) &&
+       (SiS_Pr->SiS_LCDInfo & DontExpandLCD) &&
+       (SiS_Pr->SiS_LCDInfo & LCDPass11)) ) {
      return;
   }
 
   if((SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
 
 #ifdef SIS315H
-     SiS_GetLVDSDesPtrA(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex,
-                        &PanelIndex, &ResIndex, HwInfo);
-
-     switch (PanelIndex)
-     {
-     	case  0: PanelDesPtr = SiS_Pr->LVDS1024x768Des_1;   break;  /* --- expanding --- */
-     	case  1: PanelDesPtr = SiS_Pr->LVDS1280x1024Des_1;  break;
-	case  2: PanelDesPtr = SiS_Pr->LVDS1400x1050Des_1;  break;
-	case  3: PanelDesPtr = SiS_Pr->LVDS1600x1200Des_1;  break;
-     	case  4: PanelDesPtr = SiS_Pr->LVDS1024x768Des_2;   break;  /* --- non expanding --- */
-     	case  5: PanelDesPtr = SiS_Pr->LVDS1280x1024Des_2;  break;
-	case  6: PanelDesPtr = SiS_Pr->LVDS1400x1050Des_2;  break;
-	case  7: PanelDesPtr = SiS_Pr->LVDS1600x1200Des_2;  break;
-	case 80: PanelDesPtr = (SiS_LVDSDesStruct *)Clevo1024x768Des_1;   break;  /*  custom  */
-	case 81: PanelDesPtr = (SiS_LVDSDesStruct *)Clevo1024x768Des_2;   break;
-	case 82: PanelDesPtr = (SiS_LVDSDesStruct *)Uniwill1024x768Des_1; break;
-	case 83: PanelDesPtr = (SiS_LVDSDesStruct *)Uniwill1024x768Des_2; break;
-	case 84: PanelDesPtr = (SiS_LVDSDesStruct *)Compaq1280x1024Des_1; break;
-	case 85: PanelDesPtr = (SiS_LVDSDesStruct *)Compaq1280x1024Des_2; break;
-	case 86: PanelDesPtr = (SiS_LVDSDesStruct *)Asus1024x768Des_1;    break;  /*  custom  */
-	case 87: PanelDesPtr = (SiS_LVDSDesStruct *)Asus1024x768Des_2;    break;
-	default: PanelDesPtr = SiS_Pr->LVDS1024x768Des_1;   break;
+     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+        /* non-pass 1:1 only, see above */
+        if(SiS_Pr->SiS_VGAHDE != SiS_Pr->PanelXRes) {
+           SiS_Pr->SiS_LCDHDES = SiS_Pr->SiS_HT - ((SiS_Pr->PanelXRes - SiS_Pr->SiS_VGAHDE) / 2);
+	}
+	if(SiS_Pr->SiS_VGAVDE != SiS_Pr->PanelYRes) {
+	   SiS_Pr->SiS_LCDVDES = SiS_Pr->SiS_VT - ((SiS_Pr->PanelYRes - SiS_Pr->SiS_VGAVDE) / 2);
+	}
+     }
+     if(SiS_Pr->SiS_VGAVDE == SiS_Pr->PanelYRes) {
+        switch(SiS_Pr->SiS_CustomT) {
+        case CUT_UNIWILL1024:
+        case CUT_UNIWILL10242:
+        case CUT_CLEVO1400:
+	   if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
+	      SiS_Pr->SiS_LCDVDES = SiS_Pr->PanelVT - 1;
+	   }
+	   break;
+	}
+	if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) {
+	   if(SiS_Pr->SiS_CustomT != CUT_COMPAQ1280) {
+	      SiS_Pr->SiS_LCDVDES = SiS_Pr->PanelVT - 1;
+	   }
+	}
      }
 #endif
 
@@ -3563,87 +3610,68 @@
      SiS_GetLVDSDesPtr(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex,
                        &PanelIndex, &ResIndex, HwInfo);
 
-     switch (PanelIndex)
-     {
-     	case  0: PanelDesPtr = SiS_Pr->SiS_PanelType00_1;   break;   /* ---  */
-     	case  1: PanelDesPtr = SiS_Pr->SiS_PanelType01_1;   break;
-     	case  2: PanelDesPtr = SiS_Pr->SiS_PanelType02_1;   break;
-     	case  3: PanelDesPtr = SiS_Pr->SiS_PanelType03_1;   break;
-     	case  4: PanelDesPtr = SiS_Pr->SiS_PanelType04_1;   break;
-     	case  5: PanelDesPtr = SiS_Pr->SiS_PanelType05_1;   break;
-     	case  6: PanelDesPtr = SiS_Pr->SiS_PanelType06_1;   break;
-     	case  7: PanelDesPtr = SiS_Pr->SiS_PanelType07_1;   break;
-     	case  8: PanelDesPtr = SiS_Pr->SiS_PanelType08_1;   break;
-     	case  9: PanelDesPtr = SiS_Pr->SiS_PanelType09_1;   break;
-     	case 10: PanelDesPtr = SiS_Pr->SiS_PanelType0a_1;   break;
-     	case 11: PanelDesPtr = SiS_Pr->SiS_PanelType0b_1;   break;
-     	case 12: PanelDesPtr = SiS_Pr->SiS_PanelType0c_1;   break;
-     	case 13: PanelDesPtr = SiS_Pr->SiS_PanelType0d_1;   break;
-     	case 14: PanelDesPtr = SiS_Pr->SiS_PanelType0e_1;   break;
-     	case 15: PanelDesPtr = SiS_Pr->SiS_PanelType0f_1;   break;
-     	case 16: PanelDesPtr = SiS_Pr->SiS_PanelType00_2;   break;    /* --- */
-     	case 17: PanelDesPtr = SiS_Pr->SiS_PanelType01_2;   break;
-     	case 18: PanelDesPtr = SiS_Pr->SiS_PanelType02_2;   break;
-     	case 19: PanelDesPtr = SiS_Pr->SiS_PanelType03_2;   break;
-     	case 20: PanelDesPtr = SiS_Pr->SiS_PanelType04_2;   break;
-     	case 21: PanelDesPtr = SiS_Pr->SiS_PanelType05_2;   break;
-     	case 22: PanelDesPtr = SiS_Pr->SiS_PanelType06_2;   break;
-     	case 23: PanelDesPtr = SiS_Pr->SiS_PanelType07_2;   break;
-     	case 24: PanelDesPtr = SiS_Pr->SiS_PanelType08_2;   break;
-     	case 25: PanelDesPtr = SiS_Pr->SiS_PanelType09_2;   break;
-     	case 26: PanelDesPtr = SiS_Pr->SiS_PanelType0a_2;   break;
-     	case 27: PanelDesPtr = SiS_Pr->SiS_PanelType0b_2;   break;
-     	case 28: PanelDesPtr = SiS_Pr->SiS_PanelType0c_2;   break;
-     	case 29: PanelDesPtr = SiS_Pr->SiS_PanelType0d_2;   break;
-     	case 30: PanelDesPtr = SiS_Pr->SiS_PanelType0e_2;   break;
-     	case 31: PanelDesPtr = SiS_Pr->SiS_PanelType0f_2;   break;
-	case 32: PanelDesPtr = SiS_Pr->SiS_PanelTypeNS_1;   break;    /* pass 1:1 */
-	case 33: PanelDesPtr = SiS_Pr->SiS_PanelTypeNS_2;   break;
-     	case 50: PanelDesPtr = SiS_Pr->SiS_CHTVUNTSCDesData;   break; /* TV */
-     	case 51: PanelDesPtr = SiS_Pr->SiS_CHTVONTSCDesData;   break;
-     	case 52: PanelDesPtr = SiS_Pr->SiS_CHTVUPALDesData;    break;
-     	case 53: PanelDesPtr = SiS_Pr->SiS_CHTVOPALDesData;    break;
-	default:
-		 if(HwInfo->jChipType < SIS_315H)
-		    PanelDesPtr = SiS_Pr->SiS_PanelType0e_1;
-		 else
-		    PanelDesPtr = SiS_Pr->SiS_PanelType01_1;
-		 break;
-     }
-  }
-  SiS_Pr->SiS_LCDHDES = (PanelDesPtr+ResIndex)->LCDHDES;
-  SiS_Pr->SiS_LCDVDES = (PanelDesPtr+ResIndex)->LCDVDES;
-
-  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD){
-     if((SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
-        if(ModeNo <= 0x13) {
-           modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-	   if(!(modeflag & HalfDCLK)) {
-	      SiS_Pr->SiS_LCDHDES = 632;
-	   }
-        }
-     } else {
-        if(!(SiS_Pr->SiS_SetFlag & SetDOSMode)) {
-           if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1280x1024) {
-              if(SiS_Pr->SiS_LCDResInfo >= SiS_Pr->SiS_Panel1024x768) {
-                 if(ModeNo <= 0x13) {
-	            modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-	            if(HwInfo->jChipType < SIS_315H) {
-	               if(!(modeflag & HalfDCLK)) SiS_Pr->SiS_LCDHDES = 320;
-	            } else {
-	               if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)
-	                  SiS_Pr->SiS_LCDHDES = 480;
-                       if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050)
-	                  SiS_Pr->SiS_LCDHDES = 804;
-		       if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)
-	                  SiS_Pr->SiS_LCDHDES = 704;
-                       if(!(modeflag & HalfDCLK)) {
-                          SiS_Pr->SiS_LCDHDES = 320;
-	                  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050)
-	                     SiS_Pr->SiS_LCDHDES = 632;
-		          else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)
-	                     SiS_Pr->SiS_LCDHDES = 542;
-                       }
+     switch(PanelIndex) {
+     	case  0: PanelDesPtr = SiS_Pr->SiS_PanelType00_1;    break;   /* ---  */
+     	case  1: PanelDesPtr = SiS_Pr->SiS_PanelType01_1;    break;
+     	case  2: PanelDesPtr = SiS_Pr->SiS_PanelType02_1;    break;
+     	case  3: PanelDesPtr = SiS_Pr->SiS_PanelType03_1;    break;
+     	case  4: PanelDesPtr = SiS_Pr->SiS_PanelType04_1;    break;
+     	case  5: PanelDesPtr = SiS_Pr->SiS_PanelType05_1;    break;
+     	case  6: PanelDesPtr = SiS_Pr->SiS_PanelType06_1;    break;
+     	case  7: PanelDesPtr = SiS_Pr->SiS_PanelType07_1;    break;
+     	case  8: PanelDesPtr = SiS_Pr->SiS_PanelType08_1;    break;
+     	case  9: PanelDesPtr = SiS_Pr->SiS_PanelType09_1;    break;
+     	case 10: PanelDesPtr = SiS_Pr->SiS_PanelType0a_1;    break;
+     	case 11: PanelDesPtr = SiS_Pr->SiS_PanelType0b_1;    break;
+     	case 12: PanelDesPtr = SiS_Pr->SiS_PanelType0c_1;    break;
+     	case 13: PanelDesPtr = SiS_Pr->SiS_PanelType0d_1;    break;
+     	case 14: PanelDesPtr = SiS_Pr->SiS_PanelType0e_1;    break;
+     	case 15: PanelDesPtr = SiS_Pr->SiS_PanelType0f_1;    break;
+     	case 16: PanelDesPtr = SiS_Pr->SiS_PanelType00_2;    break;    /* --- */
+     	case 17: PanelDesPtr = SiS_Pr->SiS_PanelType01_2;    break;
+     	case 18: PanelDesPtr = SiS_Pr->SiS_PanelType02_2;    break;
+     	case 19: PanelDesPtr = SiS_Pr->SiS_PanelType03_2;    break;
+     	case 20: PanelDesPtr = SiS_Pr->SiS_PanelType04_2;    break;
+     	case 21: PanelDesPtr = SiS_Pr->SiS_PanelType05_2;    break;
+     	case 22: PanelDesPtr = SiS_Pr->SiS_PanelType06_2;    break;
+     	case 23: PanelDesPtr = SiS_Pr->SiS_PanelType07_2;    break;
+     	case 24: PanelDesPtr = SiS_Pr->SiS_PanelType08_2;    break;
+     	case 25: PanelDesPtr = SiS_Pr->SiS_PanelType09_2;    break;
+     	case 26: PanelDesPtr = SiS_Pr->SiS_PanelType0a_2;    break;
+     	case 27: PanelDesPtr = SiS_Pr->SiS_PanelType0b_2;    break;
+     	case 28: PanelDesPtr = SiS_Pr->SiS_PanelType0c_2;    break;
+     	case 29: PanelDesPtr = SiS_Pr->SiS_PanelType0d_2;    break;
+     	case 30: PanelDesPtr = SiS_Pr->SiS_PanelType0e_2;    break;
+     	case 31: PanelDesPtr = SiS_Pr->SiS_PanelType0f_2;    break;
+	case 32: PanelDesPtr = SiS_Pr->SiS_PanelTypeNS_1;    break;    /* pass 1:1 */
+	case 33: PanelDesPtr = SiS_Pr->SiS_PanelTypeNS_2;    break;
+     	case 50: PanelDesPtr = SiS_Pr->SiS_CHTVUNTSCDesData; break;    /* TV */
+     	case 51: PanelDesPtr = SiS_Pr->SiS_CHTVONTSCDesData; break;
+     	case 52: PanelDesPtr = SiS_Pr->SiS_CHTVUPALDesData;  break;
+     	case 53: PanelDesPtr = SiS_Pr->SiS_CHTVOPALDesData;  break;
+	default: return;
+     }
+
+     SiS_Pr->SiS_LCDHDES = (PanelDesPtr+ResIndex)->LCDHDES;
+     SiS_Pr->SiS_LCDVDES = (PanelDesPtr+ResIndex)->LCDVDES;
+
+     if((ModeNo <= 0x13) && (SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
+        modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
+        if((SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
+	   if(!(modeflag & HalfDCLK)) SiS_Pr->SiS_LCDHDES = 632;
+        } else if(!(SiS_Pr->SiS_SetFlag & SetDOSMode)) {
+           if(SiS_Pr->SiS_LCDResInfo != Panel_1280x1024) {
+              if(SiS_Pr->SiS_LCDResInfo >= Panel_1024x768) {
+	         if(HwInfo->jChipType < SIS_315H) {
+	            if(!(modeflag & HalfDCLK)) SiS_Pr->SiS_LCDHDES = 320;
+	         } else {
+	            if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768)  SiS_Pr->SiS_LCDHDES = 480;
+                    if(SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) SiS_Pr->SiS_LCDHDES = 804;
+		    if(SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) SiS_Pr->SiS_LCDHDES = 704;
+                    if(!(modeflag & HalfDCLK)) {
+                       SiS_Pr->SiS_LCDHDES = 320;
+	               if(SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) SiS_Pr->SiS_LCDHDES = 632;
+		       if(SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) SiS_Pr->SiS_LCDHDES = 542;
                     }
                  }
               }
@@ -3654,18 +3682,6 @@
 }
 
 /*********************************************/
-/*          SET CRT2 AUTO-THRESHOLD          */
-/*********************************************/
-
-#ifdef SIS315H
-static void
-SiS_CRT2AutoThreshold(SiS_Private *SiS_Pr)
-{
-  SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x01,0x40);
-}
-#endif
-
-/*********************************************/
 /*           DISABLE VIDEO BRIDGE            */
 /*********************************************/
 
@@ -3683,55 +3699,40 @@
 
   if(SiS_Pr->SiS_VBType & VB_SISVB) {
 
-      if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {   /* ===== For 30xB/LV ===== */
+     if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {   /* ===== For 30xB/LV ===== */
 
         if(HwInfo->jChipType < SIS_315H) {
 
 #ifdef SIS300	   /* 300 series */
 
-           if(HwInfo->jChipType == SIS_300) {  /* For 300+301LV (A907) */
-
-	      if(!(SiS_CR36BIOSWord23b(SiS_Pr,HwInfo))) {
-	         if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
-	            SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x26,0xFE);
-		    SiS_PanelDelay(SiS_Pr, HwInfo, 3);
-		 }
+	   if(!(SiS_CR36BIOSWord23b(SiS_Pr,HwInfo))) {
+	      if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	         SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x26,0xFE);
+	      } else {
+		 SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xF7,0x08);
 	      }
+	      SiS_PanelDelay(SiS_Pr, HwInfo, 3);
+	   }
+	   if(SiS_Is301B(SiS_Pr)) {
 	      SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1f,0x3f);
 	      SiS_ShortDelay(SiS_Pr,1);
-	      SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x00,0xDF);
-	      SiS_DisplayOff(SiS_Pr);
-	      SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
-	      SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1E,0xDF);
-	      if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
-	         if( (!(SiS_CRT2IsLCD(SiS_Pr, HwInfo))) ||
-	             (!(SiS_CR36BIOSWord23d(SiS_Pr, HwInfo))) ) {
-	            SiS_PanelDelay(SiS_Pr, HwInfo, 2);
-                    SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x26,0xFD);
-		 }
-	      }
-
-	   } else {
-
-	      if(!(SiS_CR36BIOSWord23b(SiS_Pr,HwInfo))) {
-	         SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xF7,0x08);
-	         SiS_PanelDelay(SiS_Pr, HwInfo, 3);
-	      }
-	      if(SiS_Is301B(SiS_Pr)) {
-	         SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1f,0x3f);
-	         SiS_ShortDelay(SiS_Pr,1);
-	      }
-	      SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x00,0xDF);
-	      SiS_DisplayOff(SiS_Pr);
-	      SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
-	      SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1E,0xDF);
-	      SiS_UnLockCRT2(SiS_Pr,HwInfo);
+           }
+	   SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x00,0xDF);
+	   SiS_DisplayOff(SiS_Pr);
+	   SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
+	   SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1E,0xDF);
+	   SiS_UnLockCRT2(SiS_Pr,HwInfo);
+	   if(!(SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) {
 	      SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x01,0x80);
 	      SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x02,0x40);
-	      if( (!(SiS_CRT2IsLCD(SiS_Pr, HwInfo))) ||
-	          (!(SiS_CR36BIOSWord23d(SiS_Pr, HwInfo))) ) {
-	         SiS_PanelDelay(SiS_Pr, HwInfo, 2);
-                 SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xFB,0x04);
+	   }
+	   if( (!(SiS_CRT2IsLCD(SiS_Pr, HwInfo))) ||
+	       (!(SiS_CR36BIOSWord23d(SiS_Pr, HwInfo))) ) {
+	      SiS_PanelDelay(SiS_Pr, HwInfo, 2);
+	      if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+                 SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x26,0xFD);
+	      } else {
+		 SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xFB,0x04);
 	      }
 	   }
 
@@ -3741,149 +3742,99 @@
 
 #ifdef SIS315H	   /* 315 series */
 
-           if(IS_SIS550650740660) {		/* 550, 650, 740, 660 */
+	   BOOLEAN custom1 = ((SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
+	                      (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) ? TRUE : FALSE;
+
+	   modenum = SiS_GetReg(SiS_Pr->SiS_P3d4,0x34) & 0x7f;
 
-	      modenum = SiS_GetReg(SiS_Pr->SiS_P3d4,0x34) & 0x7f;
+           if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
 
-              if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {			/* LV */
 #ifdef SET_EMI
-	         if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-		    if(SiS_Pr->SiS_CustomT != CUT_CLEVO1400) {
-	               SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
-		    }
+	      if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+		 if(SiS_Pr->SiS_CustomT != CUT_CLEVO1400) {
+	            SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
 		 }
+	      }
 #endif
-		 if( (modenum <= 0x13) ||
-		     (!(SiS_IsDualEdge(SiS_Pr,HwInfo))) ||
-		     (SiS_IsVAMode(SiS_Pr,HwInfo)) ) {
-	     	    SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x26,0xFE);
-		    if((SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-		       (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {
-		       SiS_PanelDelay(SiS_Pr, HwInfo, 3);
-		    }
-	         }
+	      if( (modenum <= 0x13)                  ||
+		  (SiS_IsVAMode(SiS_Pr,HwInfo))      ||
+		  (!(SiS_IsDualEdge(SiS_Pr,HwInfo))) ) {
+	     	 SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x26,0xFE);
+		 if(custom1) SiS_PanelDelay(SiS_Pr, HwInfo, 3);
+	      }
 
-		 if((SiS_Pr->SiS_CustomT != CUT_COMPAQ1280) &&
-		    (SiS_Pr->SiS_CustomT != CUT_CLEVO1400)) {
-		    SiS_DDC2Delay(SiS_Pr,0xff00);
-		    SiS_DDC2Delay(SiS_Pr,0xe000);
+	      if(!custom1) {
+		 SiS_DDC2Delay(SiS_Pr,0xff00);
+		 SiS_DDC2Delay(SiS_Pr,0xe000);
+	         SiS_SetRegByte(SiS_Pr->SiS_P3c6,0x00);
+                 pushax = SiS_GetReg(SiS_Pr->SiS_P3c4,0x06);
+		 if(IS_SIS740) {
+		    SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x06,0xE3);
+		 }
+	         SiS_PanelDelay(SiS_Pr, HwInfo, 3);
+	      }
 
-	            SiS_SetRegByte(SiS_Pr->SiS_P3c6,0x00);
+           }
 
-                    pushax = SiS_GetReg(SiS_Pr->SiS_P3c4,0x06);
+	   if(!(SiS_IsNotM650orLater(SiS_Pr, HwInfo))) {
+	      tempah = 0xef;
+	      if(SiS_IsVAMode(SiS_Pr,HwInfo)) tempah = 0xf7;
+	      SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x4c,tempah);
+	   }
 
-		    if(IS_SIS740) {
-		       SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x06,0xE3);
-		    }
+	   if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	      SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1F,~0x10);
+	   }
 
-	            SiS_PanelDelay(SiS_Pr, HwInfo, 3);
+	   tempah = 0x3f;
+	   if(SiS_IsDualEdge(SiS_Pr,HwInfo)) {
+	      tempah = 0x7f;
+	      if(!(SiS_IsVAMode(SiS_Pr,HwInfo))) tempah = 0xbf;
+	   }
+	   SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1F,tempah);
 
-		    if(!(SiS_IsNotM650orLater(SiS_Pr, HwInfo))) {
-	               tempah = 0xef;
-	               if(SiS_IsVAMode(SiS_Pr,HwInfo)) {
-	                  tempah = 0xf7;
-                       }
-	               SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x4c,tempah);
-	            }
-		 }
+           if((SiS_IsVAMode(SiS_Pr,HwInfo)) ||
+	      ((SiS_Pr->SiS_VBType & VB_SIS301LV302LV) && (modenum <= 0x13))) {
 
-              } else if(SiS_Pr->SiS_VBType & VB_NoLCD) {			/* B-DH */
+	      SiS_DisplayOff(SiS_Pr);
+	      if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+		 SiS_PanelDelay(SiS_Pr, HwInfo, 2);
+	      }
+	      SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
+	      SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x1E,0xDF);
 
-	         if(!(SiS_IsNotM650orLater(SiS_Pr,HwInfo))) {
-	            SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x4c,0xef);
-	         }
+	   }
 
-	      }
+	   if((!(SiS_IsVAMode(SiS_Pr,HwInfo))) ||
+	      ((SiS_Pr->SiS_VBType & VB_SIS301LV302LV) && (modenum <= 0x13))) {
 
-	      if((SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-	         (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {
-	         SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1F,0xef);
+	      if(!(SiS_IsDualEdge(SiS_Pr,HwInfo))) {
+		 SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x00,0xdf);
+		 SiS_DisplayOff(SiS_Pr);
 	      }
+	      SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x00,0x80);
 
-              if((SiS_Pr->SiS_VBType & VB_SIS301B302B) ||
-	         (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-		 (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {
-	         tempah = 0x3f;
-	         if(SiS_IsDualEdge(SiS_Pr,HwInfo)) {
-	            tempah = 0x7f;
-	            if(!(SiS_IsVAMode(SiS_Pr,HwInfo))) {
-		       tempah = 0xbf;
-                    }
-	         }
-	         SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1F,tempah);
+	      if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+		 SiS_PanelDelay(SiS_Pr, HwInfo, 2);
 	      }
 
-              if((SiS_IsVAMode(SiS_Pr,HwInfo)) ||
-	         ((SiS_Pr->SiS_VBType & VB_SIS301LV302LV) && (modenum <= 0x13))) {
-
-	         if((SiS_Pr->SiS_VBType & VB_SIS301B302B) ||
-		    (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-		    (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {
-		    SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x1E,0xDF);
-		    SiS_DisplayOff(SiS_Pr);
-		    SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
-		 } else {
-	            SiS_DisplayOff(SiS_Pr);
-	            SiS_PanelDelay(SiS_Pr, HwInfo, 2);
-	            SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
-	            SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x1E,0xDF);
-		    if((SiS_Pr->SiS_VBType & VB_SIS301LV302LV) && (modenum <= 0x13)) {
-		       SiS_DisplayOff(SiS_Pr);
-	               SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x00,0x80);
-	               SiS_PanelDelay(SiS_Pr, HwInfo, 2);
-	               SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
-	               temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00);
-                       SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x00,0x10);
-	               SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1E,0xDF);
-	               SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp);
-		    }
-		 }
-
-	      } else {
-
-	         if((SiS_Pr->SiS_VBType & VB_SIS301B302B) ||
-		    (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-		    (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {
-		    if(!(SiS_IsDualEdge(SiS_Pr,HwInfo))) {
-		       SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x00,0xdf);
-		       SiS_DisplayOff(SiS_Pr);
-		    }
-		    SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x00,0x80);
-		 } else {
-                    SiS_DisplayOff(SiS_Pr);
-	            SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x00,0x80);
-	            SiS_PanelDelay(SiS_Pr, HwInfo, 2);
-		 }
-
-		 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
-	         temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00);
-                 SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x00,0x10);
-	         SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1E,0xDF);
-	         SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp);
-
-	      }
+	      SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
+	      temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00);
+              SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x00,0x10);
+	      SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1E,0xDF);
+	      SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp);
 
-	      if((SiS_Pr->SiS_VBType & VB_SIS301LV302LV) &&
-	         (SiS_Pr->SiS_CustomT != CUT_COMPAQ1280) &&
-		 (SiS_Pr->SiS_CustomT != CUT_CLEVO1400)) {
+	   }
 
-		 SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1f,~0x10);
+	   if(SiS_IsNotM650orLater(SiS_Pr,HwInfo)) {
+	      SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x2e,0x7f);
+	   }
 
-	         tempah = 0x3f;
-	         if(SiS_IsDualEdge(SiS_Pr,HwInfo)) {
-	            tempah = 0x7f;
-	            if(!(SiS_IsVAMode(SiS_Pr,HwInfo))) {
-		       tempah = 0xbf;
-                    }
-	         }
-	         SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1F,tempah);
+	   if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
 
-		 if(SiS_IsNotM650orLater(SiS_Pr,HwInfo)) {
-	            SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x2e,0x7f);
-		 }
+	      if(!custom1) {
 
 	         if(!(SiS_IsVAMode(SiS_Pr,HwInfo))) {
-	            SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x00,0xdf);
 	            if(!(SiS_CRT2IsLCD(SiS_Pr,HwInfo))) {
 	               if(!(SiS_IsDualEdge(SiS_Pr,HwInfo))) {
 		          SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x26,0xFD);
@@ -3894,95 +3845,39 @@
 	         SiS_SetReg(SiS_Pr->SiS_P3c4,0x06,pushax);
 
 		 if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-	            if( (SiS_IsVAMode(SiS_Pr, HwInfo)) ||
-	                (SiS_CRT2IsLCD(SiS_Pr, HwInfo)) ) {
+	            if(SiS_IsVAorLCD(SiS_Pr, HwInfo)) {
 		       SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 20);
 		    }
 	         }
 
-  	      } else if(SiS_Pr->SiS_VBType & VB_NoLCD) {
-
-	         /* NIL */
+	      } else {
 
-	      } else if((SiS_Pr->SiS_VBType & VB_SIS301B302B) ||
-	                (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-			(SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {
-
-		 if(!(SiS_IsNotM650orLater(SiS_Pr,HwInfo))) {
-	            tempah = 0xef;
-	            if(SiS_IsDualEdge(SiS_Pr,HwInfo)) {
-		       if(modenum > 0x13) {
-	                  tempah = 0xf7;
-		       }
-                    }
-	            SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x4c,tempah);
-		 }
-		 if((SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-		    (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {
-		    if((SiS_IsVAMode(SiS_Pr,HwInfo)) ||
-		       (!(SiS_IsDualEdge(SiS_Pr,HwInfo)))) {
-		       if((!(SiS_WeHaveBacklightCtrl(SiS_Pr, HwInfo))) ||
-		          (!(SiS_CRT2IsLCD(SiS_Pr, HwInfo)))) {
-			  SiS_PanelDelay(SiS_Pr, HwInfo, 2);
-	     	          SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x26,0xFD);
-			  SiS_PanelDelay(SiS_Pr, HwInfo, 4);
-	               }
+		 if((SiS_IsVAMode(SiS_Pr,HwInfo)) ||
+		    (!(SiS_IsDualEdge(SiS_Pr,HwInfo)))) {
+		    if((!(SiS_WeHaveBacklightCtrl(SiS_Pr, HwInfo))) ||
+		       (!(SiS_CRT2IsLCD(SiS_Pr, HwInfo)))) {
+		       SiS_PanelDelay(SiS_Pr, HwInfo, 2);
+	     	       SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x26,0xFD);
+		       SiS_PanelDelay(SiS_Pr, HwInfo, 4);
 		    }
 		 }
 
 	      }
-
-	  } else {			/* 315, 330 - all bridge types */
-
-	     if(SiS_Is301B(SiS_Pr)) {
-	        tempah = 0x3f;
-	        if(SiS_IsDualEdge(SiS_Pr,HwInfo)) {
-	           tempah = 0x7f;
-	           if(!(SiS_IsVAMode(SiS_Pr,HwInfo))) {
-		      tempah = 0xbf;
-                   }
-	        }
-	        SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1F,tempah);
-	        if(SiS_IsVAMode(SiS_Pr,HwInfo)) {
-	           SiS_DisplayOff(SiS_Pr);
-		   SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
-	        }
-	     }
-	     if( (!(SiS_Is301B(SiS_Pr))) ||
-	         (!(SiS_IsVAMode(SiS_Pr,HwInfo))) ) {
-
- 	 	if( (!(SiS_Is301B(SiS_Pr))) ||
-		    (!(SiS_IsDualEdge(SiS_Pr,HwInfo))) ) {
-
-	           SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x00,0xDF);
-	           SiS_DisplayOff(SiS_Pr);
-
-		}
-
-                SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x00,0x80);
-
-                SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x32,0xDF);
-
-	        temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00);
-                SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x00,0x10);
-	        SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1E,0xDF);
-	        SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp);
-
-	     }
-
-	  }    /* 315/330 */
+           }
 
 #endif /* SIS315H */
 
 	}
 
-      } else {     /* ============ For 301 ================ */
+     } else {     /* ============ For 301 ================ */
 
         if(HwInfo->jChipType < SIS_315H) {
+#ifdef SIS300
            if(!(SiS_CR36BIOSWord23b(SiS_Pr,HwInfo))) {
 	      SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xF7,0x08);
 	      SiS_PanelDelay(SiS_Pr, HwInfo, 3);
 	   }
+#endif
 	}
 
         SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x00,0xDF);           /* disable VB */
@@ -4000,12 +3895,14 @@
 	    SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);
 	    SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp);
 	} else {
+#ifdef SIS300
             SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1E,0xDF);            /* disable CRT2 */
 	    if( (!(SiS_CRT2IsLCD(SiS_Pr, HwInfo))) ||
 	        (!(SiS_CR36BIOSWord23d(SiS_Pr,HwInfo))) ) {
 		SiS_PanelDelay(SiS_Pr, HwInfo, 2);
 		SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xFB,0x04);
 	    }
+#endif
 	}
 
       }
@@ -4064,6 +3961,10 @@
 
 #ifdef SIS315H	/* 315 series */
 
+        if(!(SiS_IsNotM650orLater(SiS_Pr,HwInfo))) {
+          SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x4c,~0x18);
+        }
+
 	if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
 
 	   if(HwInfo->jChipType == SIS_740) {
@@ -4194,7 +4095,6 @@
   BOOLEAN delaylong = FALSE;
 #endif
 
-
   if(SiS_Pr->SiS_VBType & VB_SISVB) {
 
     if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {   /* ====== For 301B et al  ====== */
@@ -4203,28 +4103,55 @@
 
 #ifdef SIS300     /* 300 series */
 
-         if(HwInfo->jChipType == SIS_300) {
-
-	    if(SiS_CRT2IsLCD(SiS_Pr, HwInfo)) {
-	       if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
-	          SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x02);
-	          if(!(SiS_CR36BIOSWord23d(SiS_Pr, HwInfo))) {
-	             SiS_PanelDelay(SiS_Pr, HwInfo, 0);
-	          }
+	 if(SiS_CRT2IsLCD(SiS_Pr, HwInfo)) {
+	    if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	       SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x02);
+	    } else if(SiS_Pr->SiS_VBType & VB_NoLCD) {
+	       SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xFB,0x00);
+	    }
+	    if(SiS_Pr->SiS_VBType & (VB_SIS301LV302LV | VB_NoLCD)) {
+	       if(!(SiS_CR36BIOSWord23d(SiS_Pr, HwInfo))) {
+	          SiS_PanelDelay(SiS_Pr, HwInfo, 0);
 	       }
 	    }
+	 }
+
+	 if((SiS_Pr->SiS_VBType & VB_NoLCD) &&
+	    (SiS_CRT2IsLCD(SiS_Pr, HwInfo))) {
+
+	    SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);   		/* Enable CRT2 */
+            SiS_DisplayOn(SiS_Pr);
+	    SiS_UnLockCRT2(SiS_Pr,HwInfo);
+	    SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x02,0xBF);
+	    if(SiS_BridgeInSlavemode(SiS_Pr)) {
+      	       SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x01,0x1F);
+      	    } else {
+      	       SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x01,0x1F,0x40);
+            }
+	    if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x40)) {
+	       if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x16) & 0x10)) {
+		  if(!(SiS_CR36BIOSWord23b(SiS_Pr,HwInfo))) {
+		     SiS_PanelDelay(SiS_Pr, HwInfo, 1);
+                  }
+		  SiS_WaitVBRetrace(SiS_Pr,HwInfo);
+                  SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xF7,0x00);
+               }
+	    }
+
+	 } else {
+
 	    temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF;             /* lock mode */
-            if(SiS_BridgeInSlave(SiS_Pr)) {
+            if(SiS_BridgeInSlavemode(SiS_Pr)) {
                tempah = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30);
-               if(!(tempah & SetCRT2ToRAMDAC))  temp |= 0x20;
+               if(!(tempah & SetCRT2ToRAMDAC)) temp |= 0x20;
             }
             SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp);
 	    SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);
 	    SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x00,0x1F,0x20);        /* enable VB processor */
 	    SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x1F,0xC0);
 	    SiS_DisplayOn(SiS_Pr);
-	    if(SiS_CRT2IsLCD(SiS_Pr, HwInfo)) {
-	       if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	    if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	       if(SiS_CRT2IsLCD(SiS_Pr, HwInfo)) {
 	          if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x16) & 0x10)) {
 		     if(!(SiS_CR36BIOSWord23b(SiS_Pr,HwInfo))) {
 		        SiS_PanelDelay(SiS_Pr, HwInfo, 1);
@@ -4234,440 +4161,279 @@
 	       }
 	    }
 
-	 } else {
+	 }
 
-	    if((SiS_Pr->SiS_VBType & VB_NoLCD) &&
-	       (SiS_CRT2IsLCD(SiS_Pr, HwInfo))) {
-	       /* This is only for LCD output on 301B-DH via LVDS */
-	       SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xFB,0x00);
-	       if(!(SiS_CR36BIOSWord23d(SiS_Pr,HwInfo))) {
-	          SiS_PanelDelay(SiS_Pr, HwInfo, 0);
-	       }
-	       SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);   /* Enable CRT2 */
-               SiS_DisplayOn(SiS_Pr);
-	       SiS_UnLockCRT2(SiS_Pr,HwInfo);
-	       SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x02,0xBF);
-	       if(SiS_BridgeInSlave(SiS_Pr)) {
-      		  SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x01,0x1F);
-      	       } else {
-      		  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x01,0x1F,0x40);
-               }
-	       if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x40)) {
-	           if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x16) & 0x10)) {
-		       if(!(SiS_CR36BIOSWord23b(SiS_Pr,HwInfo))) {
-		           SiS_PanelDelay(SiS_Pr, HwInfo, 1);
-                       }
-		       SiS_WaitVBRetrace(SiS_Pr,HwInfo);
-                       SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xF7,0x00);
-                   }
-	       }
-            } else {
-	       temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF;             /* lock mode */
-               if(SiS_BridgeInSlave(SiS_Pr)) {
-                  tempah = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30);
-                  if(!(tempah & SetCRT2ToRAMDAC))  temp |= 0x20;
-               }
-               SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp);
-	       SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);
-	       SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x00,0x1F,0x20);        /* enable VB processor */
-	       SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x1F,0xC0);
-	       SiS_DisplayOn(SiS_Pr);
-	    }
 
-         }
 #endif /* SIS300 */
 
       } else {
 
 #ifdef SIS315H    /* 315 series */
 
-	 if(IS_SIS550650740660) {		/* 550, 650, 740, 660 */
+#ifdef SET_EMI
+	 UCHAR   r30=0, r31=0, r32=0, r33=0, cr36=0;
+	 /* USHORT  emidelay=0; */
+#endif
+
+	 if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	    SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1f,0xef);
+#ifdef SET_EMI
+	    if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+	       SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
+	    }
+#endif
+	 }
+
+         if(!(SiS_IsNotM650orLater(SiS_Pr, HwInfo))) {
+	    tempah = 0x10;
+	    if(SiS_LCDAEnabled(SiS_Pr, HwInfo)) {
+	       if(SiS_TVEnabled(SiS_Pr, HwInfo)) tempah = 0x18;
+	       else 			         tempah = 0x08;
+	    }
+	    SiS_SetReg(SiS_Pr->SiS_Part1Port,0x4c,tempah);
+	 }
 
-	    UCHAR r30=0, r31=0, r32=0, r33=0, cr36=0;
+	 if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
 
-	    if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	    SiS_SetRegByte(SiS_Pr->SiS_P3c6,0x00);
+	    SiS_DisplayOff(SiS_Pr);
+	    pushax = SiS_GetReg(SiS_Pr->SiS_P3c4,0x06);
+	    if(IS_SIS740) {
+	       SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x06,0xE3);
+	    }
 
-	       if((SiS_Pr->SiS_CustomT != CUT_COMPAQ1280) &&
-	          (SiS_Pr->SiS_CustomT != CUT_CLEVO1400)) {
-	          SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x1f,0xef);
-#ifdef SET_EMI
+	    if(SiS_IsVAorLCD(SiS_Pr, HwInfo)) {
+               if(!(SiS_GetReg(SiS_Pr->SiS_Part4Port,0x26) & 0x02)) {
+		  SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 2);
+		  SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x02);
+		  SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 2);
 		  if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-	             SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
+		     SiS_GenericDelay(SiS_Pr, 0x4500);
 		  }
-#endif
 	       }
+	    }
 
-               if(!(SiS_IsNotM650orLater(SiS_Pr,HwInfo))) {
-	          tempah = 0x10;
-		  if(SiS_LCDAEnabled(SiS_Pr, HwInfo)) {
-		     if(SiS_TVEnabled(SiS_Pr, HwInfo)) tempah = 0x18;
-		     else 			       tempah = 0x08;
-		  }
-		  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x4c,tempah);
-	       }
+	    if(!(SiS_GetReg(SiS_Pr->SiS_P3d4,0x31) & 0x40)) {
+               SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 10);
+	       delaylong = TRUE;
+	    }
 
-	       if((SiS_Pr->SiS_CustomT != CUT_COMPAQ1280) &&
-	          (SiS_Pr->SiS_CustomT != CUT_CLEVO1400)) {
-	          SiS_SetRegByte(SiS_Pr->SiS_P3c6,0x00);
-	          SiS_DisplayOff(SiS_Pr);
-	          pushax = SiS_GetReg(SiS_Pr->SiS_P3c4,0x06);
-	          if(IS_SIS740) {
-	             SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x06,0xE3);
-	          }
-	       }
-
-	       if( (SiS_IsVAMode(SiS_Pr,HwInfo)) ||
-	           (SiS_CRT2IsLCD(SiS_Pr, HwInfo)) ) {
-                  if(!(SiS_GetReg(SiS_Pr->SiS_Part4Port,0x26) & 0x02)) {
-		     if((SiS_Pr->SiS_CustomT != CUT_COMPAQ1280) &&
-		        (SiS_Pr->SiS_CustomT != CUT_CLEVO1400)) {
-		        SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 2);
-			SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x02);
-			if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-			   SiS_GenericDelay(SiS_Pr, 0x4500);
-			}
-	                SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 2);
-		     } else {
-		        SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x02);
-			SiS_PanelDelay(SiS_Pr, HwInfo, 0);
-		     }
-	          }
-	       }
-
-               if((SiS_Pr->SiS_CustomT != CUT_COMPAQ1280) &&
-	          (SiS_Pr->SiS_CustomT != CUT_CLEVO1400)) {
-	          if(!(SiS_GetReg(SiS_Pr->SiS_P3d4,0x31) & 0x40)) {
-                     SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 10);
-		     delaylong = TRUE;
-		  }
-	       }
+	 }
 
-	    } else if(SiS_Pr->SiS_VBType & VB_NoLCD) {
+	 if(!(SiS_IsVAMode(SiS_Pr,HwInfo))) {
 
-	       if(!(SiS_IsNotM650orLater(SiS_Pr,HwInfo))) {
-	          SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x4c,0x10);
+            temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF;
+	    if(SiS_BridgeInSlavemode(SiS_Pr)) {
+               tempah = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30);
+               if(!(tempah & SetCRT2ToRAMDAC)) {
+		  if(!(SiS_LCDAEnabled(SiS_Pr, HwInfo))) temp |= 0x20;
 	       }
+            }
+            SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp);
 
-  	    } else if(SiS_Pr->SiS_VBType & VB_SIS301B302B) {
+	    SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);                   /* enable CRT2 */
 
-	       if(!(SiS_IsNotM650orLater(SiS_Pr,HwInfo))) {
-	          tempah = 0x10;
-		  if(SiS_LCDAEnabled(SiS_Pr, HwInfo)) {
-		     if(SiS_TVEnabled(SiS_Pr, HwInfo)) tempah = 0x18;
-		     else 			       tempah = 0x08;
-		  }
-		  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x4c,tempah);
-	       }
+	    SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x2e,0x7f);
+	    SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2e,0x80);
 
+	    if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	       SiS_PanelDelay(SiS_Pr, HwInfo, 2);
 	    }
 
-	    if(!(SiS_IsVAMode(SiS_Pr,HwInfo))) {
-               temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF;
-	       if(SiS_BridgeInSlave(SiS_Pr)) {
-                  tempah = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30);
-                  if(!(tempah & SetCRT2ToRAMDAC)) {
-		     if(!(SiS_LCDAEnabled(SiS_Pr, HwInfo))) temp |= 0x20;
-		  }
-               }
-               SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp);
+	 } else {
 
-	       SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);                   /* enable CRT2 */
+	    SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x1e,0x20);
 
-	       if((SiS_Pr->SiS_VBType & VB_SIS301B302B) ||
-	          (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-		  (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {
-	          SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x2e,0x7f);
-		  temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x2e);
-		  if(!(temp & 0x80)) {
-		     SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2e,0x80);
-		  }
-	       } else {
-	          SiS_PanelDelay(SiS_Pr, HwInfo, 2);
-	       }
-	    } else {
-	       SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x1e,0x20);
-	    }
+	 }
 
-	    SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x00,0x1f,0x20);
+	 SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x00,0x1f,0x20);
+	 SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2e,0x80);
 
-	    if((SiS_Pr->SiS_VBType & VB_SIS301B302B) ||
-	       (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-	       (SiS_Pr->SiS_CustomT == CUT_CLEVO1400)) {
-	       temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x2e);
-	       if(!(temp & 0x80)) {
-		  SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2e,0x80);
-	       }
-	    }
+	 tempah = 0xc0;
+	 if(SiS_IsDualEdge(SiS_Pr, HwInfo)) {
+	    tempah = 0x80;
+	    if(!(SiS_IsVAMode(SiS_Pr, HwInfo))) tempah = 0x40;
+	 }
+         SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x1F,tempah);
 
-	    tempah = 0xc0;
-	    if(SiS_IsDualEdge(SiS_Pr, HwInfo)) {
-	       tempah = 0x80;
-	       if(!(SiS_IsVAMode(SiS_Pr, HwInfo))) {
-	          tempah = 0x40;
-               }
-	    }
-            SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x1F,tempah);
+	 if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
 
-	    if((SiS_Pr->SiS_VBType & VB_SIS301B302B) ||
-	       (((SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
-	         (SiS_Pr->SiS_CustomT == CUT_CLEVO1400))     &&
-	        (!(SiS_WeHaveBacklightCtrl(SiS_Pr,HwInfo))))) {
-               SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x00,0x7f);
-	    }
+	    SiS_PanelDelay(SiS_Pr, HwInfo, 2);
 
-	    if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	    SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x1f,0x10);
+	    SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2e,0x80);
 
-	       if((SiS_Pr->SiS_CustomT != CUT_COMPAQ1280) &&
-	          (SiS_Pr->SiS_CustomT != CUT_CLEVO1400)) {
-	          SiS_PanelDelay(SiS_Pr, HwInfo, 2);
-	       }
-#ifdef COMPAQ_HACK
-	       if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
-	          SiS_PanelDelay(SiS_Pr, HwInfo, 2);
+	    if(SiS_Pr->SiS_CustomT != CUT_CLEVO1400) {
+#ifdef SET_EMI
+	       if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+	          SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
 	       }
 #endif
+	       SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x27,0x0c);
 
-	       SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x1f,0x10);
-
-	       if(SiS_Pr->SiS_CustomT != CUT_CLEVO1400) {
+	       if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
 #ifdef SET_EMI
-	          if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-	             SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
-		  }
-#endif
-	          SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x27,0x0c);
-#ifdef SET_EMI
-	          if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-
-		     cr36 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);
+		  cr36 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);
 
-		     /*                                              (P4_30|0x40)  */
-		     /* Compal 1400x1050: 0x05, 0x60, 0x00                YES  (1.10.7w;  CR36=69)      */
-		     /* Compal 1400x1050: 0x0d, 0x70, 0x40                YES  (1.10.7x;  CR36=69)      */
-		     /* Acer   1280x1024: 0x12, 0xd0, 0x6b                NO   (1.10.9k;  CR36=73)      */
-		     /* Compaq 1280x1024: 0x0d, 0x70, 0x6b                YES  (1.12.04b; CR36=03)      */
-		     /* Clevo   1024x768: 0x05, 0x60, 0x33                NO   (1.10.8e;  CR36=12, DL!) */
-		     /* Clevo   1024x768: 0x0d, 0x70, 0x40 (if type == 3) YES  (1.10.8y;  CR36=?2)      */
-		     /* Clevo   1024x768: 0x05, 0x60, 0x33 (if type != 3) YES  (1.10.8y;  CR36=?2)      */
-		     /* Asus    1024x768: ?                                ?   (1.10.8o;  CR36=?2)      */
-		     /* Asus    1024x768: 0x08, 0x10, 0x3c (problematic)  YES  (1.10.8q;  CR36=22)      */
-
-		     if(SiS_Pr->HaveEMI) {
-		        r30 = SiS_Pr->EMI_30;
-			r31 = SiS_Pr->EMI_31;
-			r32 = SiS_Pr->EMI_32;
-			r33 = SiS_Pr->EMI_33;
-		     } else {
-		        r30 = 0;
+		  if(SiS_Pr->SiS_ROMNew) {
+		     UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
+		     USHORT romptr   = GetLCDStructPtr661_2(SiS_Pr, HwInfo);
+		     if(romptr) {
+		        SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x20);
+			SiS_Pr->EMI_30 = 0;
+			SiS_Pr->EMI_31 = ROMAddr[romptr + 14];
+			SiS_Pr->EMI_32 = ROMAddr[romptr + 15];
+			SiS_Pr->EMI_33 = ROMAddr[romptr + 16];
+			if(ROMAddr[romptr + 1] & 0x10) SiS_Pr->EMI_30 = 0x40;
+			/* emidelay = SISGETROMW((romptr + 0x22)); */
+			SiS_Pr->HaveEMI = SiS_Pr->HaveEMILCD = SiS_Pr->OverruleEMI = TRUE;
 		     }
+		  }
 
-		     /* EMI_30 is read at driver start; however, the BIOS sets this
-		      * (if it is used) only if the LCD is in use. In case we caught
-		      * the machine while on TV output, this bit is not set and we
-		      * don't know if it should be set - hence our detection is wrong.
-		      * Work-around this here:
-		      */
-
-		     if((!SiS_Pr->HaveEMI) || (!SiS_Pr->HaveEMILCD)) {
-		        if((cr36 & 0x0f) == 0x02) {			/* 1024x768 */
-		           r30 |= 0x40;
-			   if(SiS_Pr->SiS_CustomT == CUT_CLEVO1024) {
-			      r30 &= ~0x40;
-			   }
-		        } else if((cr36 & 0x0f) == 0x03) {		/* 1280x1024 */
-		           r30 |= 0x40;
-			   if(SiS_Pr->SiS_CustomT != CUT_COMPAQ1280) {
-			      r30 &= ~0x40;
-			   }
-		        } else if((cr36 & 0x0f) == 0x09) {		/* 1400x1050 */
-		           r30 |= 0x40;
-		        } else if((cr36 & 0x0f) == 0x0b) {		/* 1600x1200 - unknown */
-		           r30 |= 0x40;
-		        }
-                     }
+		  /*                                              (P4_30|0x40)  */
+		  /* Compal 1400x1050: 0x05, 0x60, 0x00                YES  (1.10.7w;  CR36=69)      */
+		  /* Compal 1400x1050: 0x0d, 0x70, 0x40                YES  (1.10.7x;  CR36=69)      */
+		  /* Acer   1280x1024: 0x12, 0xd0, 0x6b                NO   (1.10.9k;  CR36=73)      */
+		  /* Compaq 1280x1024: 0x0d, 0x70, 0x6b                YES  (1.12.04b; CR36=03)      */
+		  /* Clevo   1024x768: 0x05, 0x60, 0x33                NO   (1.10.8e;  CR36=12, DL!) */
+		  /* Clevo   1024x768: 0x0d, 0x70, 0x40 (if type == 3) YES  (1.10.8y;  CR36=?2)      */
+		  /* Clevo   1024x768: 0x05, 0x60, 0x33 (if type != 3) YES  (1.10.8y;  CR36=?2)      */
+		  /* Asus    1024x768: ?                                ?   (1.10.8o;  CR36=?2)      */
+		  /* Asus    1024x768: 0x08, 0x10, 0x3c (problematic)  YES  (1.10.8q;  CR36=22)      */
+
+		  if(SiS_Pr->HaveEMI) {
+		     r30 = SiS_Pr->EMI_30; r31 = SiS_Pr->EMI_31;
+		     r32 = SiS_Pr->EMI_32; r33 = SiS_Pr->EMI_33;
+		  } else {
+		     r30 = 0;
+		  }
 
-		     if(!SiS_Pr->HaveEMI) {
-		        if((cr36 & 0x0f) == 0x02) {
+		  /* EMI_30 is read at driver start; however, the BIOS sets this
+		   * (if it is used) only if the LCD is in use. In case we caught
+		   * the machine while on TV output, this bit is not set and we
+		   * don't know if it should be set - hence our detection is wrong.
+		   * Work-around this here:
+		   */
+
+		  if((!SiS_Pr->HaveEMI) || (!SiS_Pr->HaveEMILCD)) {
+		     switch((cr36 & 0x0f)) {
+		     case 2:
+			r30 |= 0x40;
+			if(SiS_Pr->SiS_CustomT == CUT_CLEVO1024) r30 &= ~0x40;
+			if(!SiS_Pr->HaveEMI) {
+			   r31 = 0x05; r32 = 0x60; r33 = 0x33;
 			   if((cr36 & 0xf0) == 0x30) {
 			      r31 = 0x0d; r32 = 0x70; r33 = 0x40;
-			   } else {
-			      r31 = 0x05; r32 = 0x60; r33 = 0x33;
 			   }
-		        } else if((cr36 & 0x0f) == 0x03) {
+			}
+			break;
+		     case 3:  /* 1280x1024 */
+			if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) r30 |= 0x40;
+			if(!SiS_Pr->HaveEMI) {
+			   r31 = 0x12; r32 = 0xd0; r33 = 0x6b;
 			   if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
 			      r31 = 0x0d; r32 = 0x70; r33 = 0x6b;
-			   } else {
-			      r31 = 0x12; r32 = 0xd0; r33 = 0x6b;
 			   }
-			} else if((cr36 & 0x0f) == 0x09) {
+			}
+			break;
+		     case 9:  /* 1400x1050 */
+			r30 |= 0x40;
+			if(!SiS_Pr->HaveEMI) {
+			   r31 = 0x05; r32 = 0x60; r33 = 0x00;
 			   if(SiS_Pr->SiS_CustomT == CUT_COMPAL1400_2) {
 			      r31 = 0x0d; r32 = 0x70; r33 = 0x40;  /* BIOS values */
-			   } else {
-			      r31 = 0x05; r32 = 0x60; r33 = 0x00;
 			   }
-			} else {
+			}
+			break;
+		     case 11: /* 1600x1200 - unknown */
+			r30 |= 0x40;
+			if(!SiS_Pr->HaveEMI) {
 			   r31 = 0x05; r32 = 0x60; r33 = 0x00;
 			}
 		     }
+                  }
 
-		     /* BIOS values don't work so well sometimes */
-		     if(!SiS_Pr->OverruleEMI) {
+		  /* BIOS values don't work so well sometimes */
+		  if(!SiS_Pr->OverruleEMI) {
 #ifdef COMPAL_HACK
-		        if(SiS_Pr->SiS_CustomT == CUT_COMPAL1400_2) {
-		           if((cr36 & 0x0f) == 0x09) {
-			      r30 = 0x60; r31 = 0x05; r32 = 0x60; r33 = 0x00;
-			   }
- 		        }
+		     if(SiS_Pr->SiS_CustomT == CUT_COMPAL1400_2) {
+		        if((cr36 & 0x0f) == 0x09) {
+			   r30 = 0x60; r31 = 0x05; r32 = 0x60; r33 = 0x00;
+			}
+ 		     }
 #endif
 #ifdef COMPAQ_HACK
-		        if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
-		           if((cr36 & 0x0f) == 0x03) {
-			      r30 = 0x20; r31 = 0x12; r32 = 0xd0; r33 = 0x6b;     /* rev 1 */
-			   }
+		     if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
+		        if((cr36 & 0x0f) == 0x03) {
+			   r30 = 0x20; r31 = 0x12; r32 = 0xd0; r33 = 0x6b;
 			}
+		     }
 #endif
 #ifdef ASUS_HACK
-		        if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
-		           if((cr36 & 0x0f) == 0x02) {
-			      /* r30 = 0x60; r31 = 0x05; r32 = 0x60; r33 = 0x33;  */   /* rev 2 */
-			      /* r30 = 0x20; r31 = 0x05; r32 = 0x60; r33 = 0x33;  */   /* rev 3 */
-			      /* r30 = 0x60; r31 = 0x0d; r32 = 0x70; r33 = 0x40;  */   /* rev 4 */
-			      /* r30 = 0x20; r31 = 0x0d; r32 = 0x70; r33 = 0x40;  */   /* rev 5 */
-			   }
+		     if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
+		        if((cr36 & 0x0f) == 0x02) {
+			   /* r30 = 0x60; r31 = 0x05; r32 = 0x60; r33 = 0x33;  */   /* rev 2 */
+			   /* r30 = 0x20; r31 = 0x05; r32 = 0x60; r33 = 0x33;  */   /* rev 3 */
+			   /* r30 = 0x60; r31 = 0x0d; r32 = 0x70; r33 = 0x40;  */   /* rev 4 */
+			   /* r30 = 0x20; r31 = 0x0d; r32 = 0x70; r33 = 0x40;  */   /* rev 5 */
 			}
-#endif
- 		     }
-		     if(!(SiS_Pr->OverruleEMI && (!r30) && (!r31) && (!r32) && (!r33))) {
-		        SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x20);
 		     }
-		     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x31,r31);
-		     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x32,r32);
-		     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x33,r33);
-		     if(!(SiS_Pr->OverruleEMI && (!r30) && (!r31) && (!r32) && (!r33))) {
-		        SiS_SetReg(SiS_Pr->SiS_Part4Port,0x34,0x10);
-		     } else {
-		        SiS_SetReg(SiS_Pr->SiS_Part4Port,0x34,0x00);
-		     }
-		     if( (SiS_IsVAMode(SiS_Pr,HwInfo)) ||
-	                 (SiS_CRT2IsLCD(SiS_Pr, HwInfo)) ) {
-	                if(r30 & 0x40) {
-		           SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 5);
-			   if(delaylong) {
-			      SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 5);
-			      delaylong = FALSE;
-			   }
-			   SiS_WaitVBRetrace(SiS_Pr,HwInfo);
-			   if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
-			      SiS_GenericDelay(SiS_Pr, 0x500);
-			   }
-	                   SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x40);
-	                }
-		     }
-		  }
 #endif
-	       }
-
-	       if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
-
-	          if( (SiS_IsVAMode(SiS_Pr,HwInfo)) ||
-	              (SiS_CRT2IsLCD(SiS_Pr, HwInfo)) ) {
-		     SiS_DisplayOn(SiS_Pr);
-		     SiS_PanelDelay(SiS_Pr, HwInfo, 1);
-		     SiS_WaitVBRetrace(SiS_Pr, HwInfo);
-		     SiS_PanelDelay(SiS_Pr, HwInfo, 3);
-		     if(!(SiS_WeHaveBacklightCtrl(SiS_Pr,HwInfo))) {
-		        SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x01);
-	  	     }
-		  }
-
-	       } else if(SiS_Pr->SiS_CustomT == CUT_CLEVO1400) {
+ 		  }
 
-	          if(!(SiS_WeHaveBacklightCtrl(SiS_Pr,HwInfo))) {
-	             if( (SiS_IsVAMode(SiS_Pr, HwInfo)) ||
-	                 (SiS_CRT2IsLCD(SiS_Pr, HwInfo)) ) {
-		        SiS_DisplayOn(SiS_Pr);
-		        SiS_PanelDelay(SiS_Pr, HwInfo, 1);
-		        SiS_WaitVBRetrace(SiS_Pr,HwInfo);
-		        SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x01);
-		     }
+		  if(!(SiS_Pr->OverruleEMI && (!r30) && (!r31) && (!r32) && (!r33))) {
+		     SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x20);
 		  }
+		  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x31,r31);
+		  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x32,r32);
+		  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x33,r33);
+#endif	/* SET_EMI */
 
-	       } else {
+		  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x34,0x10);
 
-	          SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2e,0x80);
-	          if(!(SiS_WeHaveBacklightCtrl(SiS_Pr,HwInfo))) {
-	             if( (SiS_IsVAMode(SiS_Pr,HwInfo)) ||
-	                 ((SiS_CRT2IsLCD(SiS_Pr, HwInfo))) ) {
-		        SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 10);
-		        if(delaylong) {
-			   SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 10);
-		        }
-                        SiS_WaitVBRetrace(SiS_Pr,HwInfo);
-			if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+#ifdef SET_EMI
+		  if( (SiS_LCDAEnabled(SiS_Pr, HwInfo)) ||
+	              (SiS_CRT2IsLCD(SiS_Pr, HwInfo)) ) {
+	             if(r30 & 0x40) {
+		        SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 5);
+			if(delaylong) {
+			   SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 5);
+			   delaylong = FALSE;
+			}
+			SiS_WaitVBRetrace(SiS_Pr,HwInfo);
+			if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
 			   SiS_GenericDelay(SiS_Pr, 0x500);
 			}
-		        SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x01);
+	                SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x40);
 	             }
-	          }
-
-	          SiS_SetReg(SiS_Pr->SiS_P3c4,0x06,pushax);
-	          SiS_DisplayOn(SiS_Pr);
-	          SiS_SetRegByte(SiS_Pr->SiS_P3c6,0xff);
-
-	          if(!(SiS_WeHaveBacklightCtrl(SiS_Pr,HwInfo))) {
-	             SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x00,0x7f);
-	          }
-
+		  }
+#endif
 	       }
-
 	    }
 
-	 } else {			/* 315, 330 */
-
-	    if(!(SiS_IsVAMode(SiS_Pr,HwInfo))) {
-	       temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF;
-	       if(SiS_BridgeInSlave(SiS_Pr)) {
-                  tempah = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30);
-                  if(!(tempah & SetCRT2ToRAMDAC))  temp |= 0x20;
-               }
-               SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp);
-
-	       SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);                   /* enable CRT2 */
-
-	       temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x2E);
-               if(!(temp & 0x80))
-                  SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2E,0x80);
-            }
-
-	    SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x00,0x1f,0x20);
-
-	    if(SiS_Is301B(SiS_Pr)) {
-
-	       temp=SiS_GetReg(SiS_Pr->SiS_Part1Port,0x2E);
-               if(!(temp & 0x80))
-                  SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2E,0x80);
-
-	       tempah = 0xc0;
-	       if(SiS_IsDualEdge(SiS_Pr,HwInfo)) {
-	          tempah = 0x80;
-	          if(!(SiS_IsVAMode(SiS_Pr,HwInfo))) {
-	             tempah = 0x40;
-                  }
+	    if(!(SiS_WeHaveBacklightCtrl(SiS_Pr,HwInfo))) {
+	       if(SiS_IsVAorLCD(SiS_Pr, HwInfo)) {
+		  SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 10);
+		  if(delaylong) {
+		     SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 10);
+		  }
+                  SiS_WaitVBRetrace(SiS_Pr,HwInfo);
+		  if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+	 	     SiS_GenericDelay(SiS_Pr, 0x500);
+		  }
+		  SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x01);
 	       }
-               SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x1F,tempah);
-
-	       SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x00,0x7f);
-
-	    } else {
+	    }
 
-	       SiS_VBLongWait(SiS_Pr);
-               SiS_DisplayOn(SiS_Pr);
-	       SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x00,0x7F);
-               SiS_VBLongWait(SiS_Pr);
+	    SiS_SetReg(SiS_Pr->SiS_P3c4,0x06,pushax);
+	    SiS_DisplayOn(SiS_Pr);
+	    SiS_SetRegByte(SiS_Pr->SiS_P3c6,0xff);
 
-	    }
+	 }
 
-	 }   /* 315, 330 */
+	 if(!(SiS_WeHaveBacklightCtrl(SiS_Pr,HwInfo))) {
+	    SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x00,0x7f);
+	 }
 
 #endif /* SIS315H */
 
@@ -4683,9 +4449,9 @@
        }
 
        temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x32) & 0xDF;          /* lock mode */
-       if(SiS_BridgeInSlave(SiS_Pr)) {
+       if(SiS_BridgeInSlavemode(SiS_Pr)) {
           tempah = SiS_GetReg(SiS_Pr->SiS_P3d4,0x30);
-          if(!(tempah & SetCRT2ToRAMDAC))  temp |= 0x20;
+          if(!(tempah & SetCRT2ToRAMDAC)) temp |= 0x20;
        }
        SiS_SetReg(SiS_Pr->SiS_P3c4,0x32,temp);
 
@@ -4734,11 +4500,11 @@
 	  }
        }
 
-       SiS_EnableCRT2(SiS_Pr);
+       SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);
        SiS_DisplayOn(SiS_Pr);
        SiS_UnLockCRT2(SiS_Pr,HwInfo);
        SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x02,0xBF);
-       if(SiS_BridgeInSlave(SiS_Pr)) {
+       if(SiS_BridgeInSlavemode(SiS_Pr)) {
       	  SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x01,0x1F);
        } else {
       	  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x01,0x1F,0x40);
@@ -4770,6 +4536,10 @@
 
 #ifdef SIS315H    /* 315 series */
 
+       if(!(SiS_IsNotM650orLater(SiS_Pr,HwInfo))) {
+          SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x4c,0x18);
+       }
+
        if(SiS_Pr->SiS_IF_DEF_CH70xx == 0) {
 	  if(SiS_CRT2IsLCD(SiS_Pr, HwInfo)) {
 	     SiS_SetRegSR11ANDOR(SiS_Pr,HwInfo,0xFB,0x00);
@@ -4777,7 +4547,7 @@
           }
        }
 
-       SiS_EnableCRT2(SiS_Pr);
+       SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);
        SiS_UnLockCRT2(SiS_Pr,HwInfo);
 
        SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x2e,0xf7);
@@ -4868,33 +4638,31 @@
 /*         SET PART 1 REGISTER GROUP         */
 /*********************************************/
 
-/********** Set CRT2 OFFSET / PITCH **********/
+/* Set CRT2 OFFSET / PITCH */
 static void
-SiS_SetCRT2Offset(SiS_Private *SiS_Pr,USHORT ModeNo,
-                  USHORT ModeIdIndex ,USHORT RefreshRateTableIndex,
-	          PSIS_HW_INFO HwInfo)
+SiS_SetCRT2Offset(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
+	          USHORT RRTI, PSIS_HW_INFO HwInfo)
 {
   USHORT offset;
   UCHAR temp;
 
   if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) return;
 
-  offset = SiS_GetOffset(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex,
-                         HwInfo);
+  offset = SiS_GetOffset(SiS_Pr,ModeNo,ModeIdIndex,RRTI,HwInfo);
 
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2 ||
-     SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) offset >>= 1;
+  if((SiS_Pr->SiS_LCDResInfo == Panel_640x480_2) ||
+     (SiS_Pr->SiS_LCDResInfo == Panel_640x480_3)) {
+     offset >>= 1;
+  }
 
-  temp = (UCHAR)(offset & 0xFF);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x07,temp);
-  temp = (UCHAR)(offset >> 8);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x09,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x07,(offset & 0xFF));
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x09,(offset >> 8));
   temp = (UCHAR)(((offset >> 3) & 0xFF) + 1);
   if(offset % 8) temp++;
   SiS_SetReg(SiS_Pr->SiS_Part1Port,0x03,temp);
 }
 
-/************* Set CRT2 Sync *************/
+/* Set CRT2 sync and PanelLink mode */
 static void
 SiS_SetCRT2Sync(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT RefreshRateTableIndex,
                 PSIS_HW_INFO HwInfo)
@@ -4916,23 +4684,27 @@
      } else if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && (SiS_Pr->SiS_LCDInfo & LCDSync)) {
         tempah = SiS_Pr->SiS_LCDInfo;
      } else tempah = infoflag >> 8;
-
      tempah &= 0xC0;
-
      tempah |= 0x20;
      if(!(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit)) tempah |= 0x10;
-
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
         if((SiS_Pr->SiS_CustomT == CUT_BARCO1366) ||
            (SiS_Pr->SiS_CustomT == CUT_BARCO1024)) {
-	   tempah |= 0xc0;
+	   tempah |= 0xf0;
+        }
+	if( (SiS_Pr->SiS_IF_DEF_FSTN) ||
+            (SiS_Pr->SiS_IF_DEF_DSTN) ||
+            (SiS_Pr->SiS_IF_DEF_TRUMPION) ||
+            (SiS_Pr->SiS_CustomT == CUT_PANEL848) ) {
+           tempah |= 0x30;
         }
      }
-
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
         if(HwInfo->jChipType >= SIS_315H) {
            tempah >>= 3;
+	   tempah &= 0x18;
            SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,0xE7,tempah);
+	   /* Don't care about 12/18/24 bit mode - TV is via VGA, not PL */
         } else {
            SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0F,0xe0);
         }
@@ -4949,19 +4721,21 @@
         if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {			/* 630 - 301B(-DH) */
 
 	   tempah = infoflag >> 8;
+	   tempbl = 0;
            if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
 	      if(SiS_Pr->SiS_LCDInfo & LCDSync) {
 	         tempah = SiS_Pr->SiS_LCDInfo;
+		 tempbl = (tempah >> 6) & 0x03;
               }
            }
            tempah &= 0xC0;
-
            tempah |= 0x20;
            if(!(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit)) tempah |= 0x10;
-
- 	   tempah &= 0x3f;
-  	   tempah |= tempbl;
+  	   tempah |= 0xc0;
            SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0F,tempah);
+	   if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && (!(SiS_Pr->SiS_VBType & VB_NoLCD))) {
+	      SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1a,0xf0,tempbl);
+	   }
 
         } else {							/* 630 - 301 */
 
@@ -4979,43 +4753,72 @@
 
 #ifdef SIS315H  /* ------- 315 series ------ */
 
-        if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {	  		/* 315 - 30xLV */
+        if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {	  		/* 315 - LVDS */
 
-	   if(((SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) &&
-	       (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024)) ||
-	      ((SiS_Pr->SiS_CustomT == CUT_CLEVO1400)  &&
-	       (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050))) {
+	   tempbl = 0;
+	   if((SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) &&
+	      (SiS_Pr->SiS_LCDResInfo == Panel_1280x1024)) {
 	      tempah = infoflag >> 8;
+	      if(SiS_Pr->SiS_LCDInfo & LCDSync) {
+	        tempbl = ((SiS_Pr->SiS_LCDInfo & 0xc0) >> 6);
+	      }
+	   } else if((SiS_Pr->SiS_CustomT == CUT_CLEVO1400)  &&
+	             (SiS_Pr->SiS_LCDResInfo == Panel_1400x1050)) {
+       	      tempah = infoflag >> 8;
+	      tempbl = 0x03;
 	   } else {
               tempah = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37);
+	      tempbl = (tempah >> 6) & 0x03;
+	      tempbl |= 0x08;
+	      if(!(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit)) tempbl |= 0x04;
 	   }
 	   tempah &= 0xC0;
-
            tempah |= 0x20;
            if(!(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit)) tempah |= 0x10;
+	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)   tempah |= 0xc0;
            SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0F,tempah);
+	   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
+	      if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+	         SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1a,0xf0,tempbl);
+	      }
+	   }
 
-        } else {							/* 315 - 301, 301B */
+        } else {							/* 315 - TMDS */
 
-           tempah = infoflag >> 8;
+           tempah = tempbl = infoflag >> 8;
 	   if(!SiS_Pr->UseCustomMode) {
-	      if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+	      tempbl = 0;
+	      if((SiS_Pr->SiS_VBType & VB_SIS301C) && (SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC)) {
+	         if(ModeNo <= 0x13) {
+	            tempah = SiS_GetRegByte((SiS_Pr->SiS_P3ca+0x02));
+  	         }
+	      }
+	      if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
 	         if(SiS_Pr->SiS_LCDInfo & LCDSync) {
 	            tempah = SiS_Pr->SiS_LCDInfo;
+		    tempbl = (tempah >> 6) & 0x03;
 	         }
 	      }
 	   }
 	   tempah &= 0xC0;
-
            tempah |= 0x20;
            if(!(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit)) tempah |= 0x10;
-
-	   if(SiS_Pr->SiS_VBType & VB_NoLCD) {			/* TEST, imitate BIOS bug */
-	      if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-	         tempah |= 0xc0;
+	   if(SiS_Pr->SiS_VBType & VB_NoLCD) {
+	      /* Imitate BIOS bug */
+	      if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)  tempah |= 0xc0;
+	   }
+	   if((SiS_Pr->SiS_VBType & VB_SIS301C) && (SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC)) {
+	      tempah >>= 3;
+	      tempah &= 0x18;
+	      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,0xe7,tempah);
+	   } else {
+              SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0F,tempah);
+	      if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
+	         if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+	            SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1a,0xf0,tempbl);
+		 }
 	      }
 	   }
-           SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0F,tempah);
 
         }
 #endif  /* SIS315H */
@@ -5023,7 +4826,7 @@
    }
 }
 
-/******** Set CRT2 FIFO on 300/630/730 *******/
+/* Set CRT2 FIFO on 300/630/730 */
 #ifdef SIS300
 static void
 SiS_SetCRT2FIFO_300(SiS_Private *SiS_Pr,USHORT ModeNo,
@@ -5078,7 +4881,7 @@
 
   if(!SiS_Pr->CRT1UsesCustomMode) {
 
-     CRT1ModeNo = SiS_Pr->SiS_CRT1Mode;                                 	/* get CRT1 ModeNo */
+     CRT1ModeNo = SiS_Pr->SiS_CRT1Mode;                                 /* get CRT1 ModeNo */
      SiS_SearchModeID(SiS_Pr, &CRT1ModeNo, &modeidindex);
      SiS_Pr->SiS_SetFlag &= (~ProgrammingCRT2);
      SiS_Pr->SiS_SelectCRT2Rate = 0;
@@ -5087,7 +4890,7 @@
      if(CRT1ModeNo >= 0x13) {
         index = SiS_Pr->SiS_RefIndex[refreshratetableindex].Ext_CRTVCLK;
         index &= 0x3F;
-        VCLK = SiS_Pr->SiS_VCLKData[index].CLOCK;				/* Get VCLK */
+        VCLK = SiS_Pr->SiS_VCLKData[index].CLOCK;			/* Get VCLK */
 
 	colorth = SiS_GetColorDepth(SiS_Pr,CRT1ModeNo,modeidindex); 	/* Get colordepth */
         colorth >>= 1;
@@ -5097,9 +4900,9 @@
   } else {
 
      CRT1ModeNo = 0xfe;
-     VCLK = SiS_Pr->CSRClock_CRT1;						/* Get VCLK */
+     VCLK = SiS_Pr->CSRClock_CRT1;					/* Get VCLK */
      data2 = (SiS_Pr->CModeFlag_CRT1 & ModeInfoFlag) - 2;
-     switch(data2) {								/* Get color depth */
+     switch(data2) {							/* Get color depth */
         case 0 : colorth = 1; break;
         case 1 : colorth = 1; break;
         case 2 : colorth = 2; break;
@@ -5246,10 +5049,10 @@
 
        index = SiS_GetVCLK2Ptr(SiS_Pr,CRT2ModeNo,modeidindex,
                                refreshratetableindex,HwInfo);
-       VCLK = SiS_Pr->SiS_VCLKData[index].CLOCK;                         	/* Get VCLK  */
+       VCLK = SiS_Pr->SiS_VCLKData[index].CLOCK;                /* Get VCLK  */
 
        if((SiS_Pr->SiS_CustomT == CUT_BARCO1366) || (SiS_Pr->SiS_CustomT == CUT_BARCO1024)) {
-          if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+          if(SiS_Pr->SiS_UseROM) {
 	     if(ROMAddr[0x220] & 0x01) {
                 VCLK = ROMAddr[0x229] | (ROMAddr[0x22a] << 8);
 	     }
@@ -5259,11 +5062,11 @@
     } else {
 
        CRT2ModeNo = 0xfe;
-       VCLK = SiS_Pr->CSRClock;							/* Get VCLK */
+       VCLK = SiS_Pr->CSRClock;					/* Get VCLK */
 
     }
 
-    colorth = SiS_GetColorDepth(SiS_Pr,CRT2ModeNo,modeidindex);   	/* Get colordepth */
+    colorth = SiS_GetColorDepth(SiS_Pr,CRT2ModeNo,modeidindex); /* Get colordepth */
     colorth >>= 1;
     if(!colorth) colorth++;
 
@@ -5282,8 +5085,8 @@
     if(HwInfo->jChipType == SIS_300) {
        if(data <= 0x0f) temp = (temp & (~0x1F)) | 0x13;
        else             temp = (temp & (~0x1F)) | 0x16;
-       if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-       		temp = (temp & (~0x1F)) | 0x13;
+       if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) {
+       	  temp = (temp & (~0x1F)) | 0x13;
        }
     } else {
        if( ( (HwInfo->jChipType == SIS_630) ||
@@ -5313,359 +5116,114 @@
 }
 #endif
 
-/**** Set CRT2 FIFO on 315/330 series ****/
+/* Set CRT2 FIFO on 315/330 series */
 #ifdef SIS315H
 static void
-SiS_SetCRT2FIFO_310(SiS_Private *SiS_Pr)
+SiS_SetCRT2FIFO_310(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
   SiS_SetReg(SiS_Pr->SiS_Part1Port,0x01,0x3B);
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x02,~0x3F,0x04);
+  if( (HwInfo->jChipType == SIS_760)      &&
+      (SiS_Pr->SiS_SysFlags & SF_760LFB)  &&
+      (SiS_Pr->SiS_ModeType == Mode32Bpp) &&
+      (SiS_Pr->SiS_VGAHDE >= 1280)	  &&
+      (SiS_Pr->SiS_VGAVDE >= 1024) ) {
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x2f,0x03);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x01,0x3b);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x4d,0xc0);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x2f,0x01);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x4d,0xc0);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,0x6e);
+  } else {
+     SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x02,~0x3f,0x04);
+  }
+
 }
 #endif
 
-/*************** Set LCD-A ***************/
-#ifdef SIS315H
-static void
-SiS_SetGroup1_LCDA(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
-                   PSIS_HW_INFO HwInfo, USHORT RefreshRateTableIndex)
+static USHORT
+SiS_GetVGAHT2(SiS_Private *SiS_Pr)
 {
-  USHORT modeflag,resinfo;
-  USHORT push2,tempax,tempbx,tempcx,temp;
-  ULONG tempeax=0,tempebx,tempecx,tempvcfact;
+  ULONG tempax,tempbx;
 
-  /* This is not supported with LCDA */
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) return;
-  if(SiS_Pr->UseCustomMode) return;
+  tempbx = (SiS_Pr->SiS_VGAVT - SiS_Pr->SiS_VGAVDE) * SiS_Pr->SiS_RVBHCMAX;
+  tempax = (SiS_Pr->SiS_VT - SiS_Pr->SiS_VDE) * SiS_Pr->SiS_RVBHCFACT;
+  tempax = (tempax * SiS_Pr->SiS_HT) / tempbx;
+  return((USHORT)tempax);
+}
 
-  if(IS_SIS330) {
-     SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x10);			/* Xabre 1.01.03 */
-  } else if(IS_SIS740) {
-     if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {					/* 740/LVDS */
-        SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,0xfb,0x04);      	/* 740/LVDS */
-	SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x03);
-     } else if(SiS_Pr->SiS_VBType & VB_SISVB) {
-        SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x10);			/* 740/301LV, 301BDH */
-     }
-  } else {
-     if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {					/* 650/LVDS */
-        SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,0xfb,0x04);      	/* 650/LVDS */
-	SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x00);			/* 650/LVDS 1.10.07 */
-     } else if(SiS_Pr->SiS_VBType & VB_SISVB) {
-        SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x2D,0x0f);			/* 650/30xLv 1.10.6s */
-     }
-  }
+/* Set Part 1 / SiS bridge slave mode */
+static void
+SiS_SetGroup1_301(SiS_Private *SiS_Pr, USHORT ModeNo,USHORT ModeIdIndex,
+                  PSIS_HW_INFO HwInfo,USHORT RefreshRateTableIndex)
+{
+  USHORT  push1,push2;
+  USHORT  tempax,tempbx,tempcx,temp;
+  USHORT  resinfo,modeflag,xres=0;
+  unsigned char p1_7, p1_8;
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
      resinfo = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo;
+  } else if(SiS_Pr->UseCustomMode) {
+     modeflag = SiS_Pr->CModeFlag;
+     resinfo = 0;
+     xres = SiS_Pr->CHDisplay;
   } else {
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
      resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+     xres = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes;
   }
 
-  tempax = SiS_Pr->SiS_LCDHDES;
-
-  temp = (tempax & 0x0007);                        		/* BPLHDESKEW[2:0]   */
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1A,temp);                         /* Part1_1Ah  */
-  temp = (tempax >> 3) & 0x00FF;                               	/* BPLHDESKEW[10:3]  */
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x16,temp);                         /* Part1_16h  */
-
-  tempbx = SiS_Pr->SiS_HDE;
-  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-     tempbx = SiS_Pr->PanelXRes;
-  }
-
-  tempax += tempbx;	                                    	/* HDE + HSKEW = lcdhdee  */
-  if(tempax >= SiS_Pr->SiS_HT) tempax -= SiS_Pr->SiS_HT;
-
-  temp = tempax;
-  if(SiS_Pr->SiS_VBType & VB_SISVB) {
-     if(temp & 0x07) temp += 8;
-  }
-  temp >>= 3;                                        		/* BPLHDEE  */
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x17,temp);                        	/* Part1_17h  */
-
-  tempcx = (SiS_Pr->SiS_HT - tempbx) >> 2;     	            	/* (HT-HDE) / 4  */
-
-  /* 650/30xLV 1.10.6s, 740/LVDS */
-  if( ((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) ||
-      ((SiS_Pr->SiS_IF_DEF_LVDS == 1) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) ) {
-     if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600)        tempcx = 0x28;
- 	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)  tempcx = 0x18;
-	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) tempcx = 0x30;
-	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) tempcx = 0x40;
-	else                                                          tempcx = 0x30;
-     }
-  }
-
-  tempcx += tempax;  	                                  	/* lcdhrs  */
-  if(tempcx >= SiS_Pr->SiS_HT) tempcx -= SiS_Pr->SiS_HT;
-
-  temp = (tempcx >> 3) & 0x00FF;				/* BPLHRS */
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x14,temp);                 		/* Part1_14h  */
+  /* The following is only done if bridge is in slave mode: */
 
-  temp += 10;
-  if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-        if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-	   temp += 6;
-	   if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel800x600) {
-	      temp++;
-	      if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1024x768) {
-	         temp += 7;
-		 if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1600x1200) {
-		    temp -= 10;
-		 }
-	      }
-	   }
-	}
+  if((HwInfo->jChipType >= SIS_661) && (ModeNo > 0x13)) {
+     if(xres >= 1600) {
+        SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x31,0x04);
      }
   }
-  temp &= 0x1F;
-  temp |= ((tempcx & 0x07) << 5);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x15,temp);                         /* Part1_15h  */
 
-  if(SiS_Pr->SiS_IF_DEF_TRUMPION == 0) {
-     tempax = SiS_Pr->PanelYRes;
-  } else {
-     tempax = SiS_Pr->SiS_VGAVDE;
-  }
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x03,0xff);                  /* set MAX HT */
 
-  tempbx = SiS_Pr->SiS_LCDVDES + tempax;
-  if(tempbx >= SiS_Pr->SiS_VT) tempbx -= SiS_Pr->SiS_VT;
-  push2 = tempbx;
+  if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)  modeflag |= Charx8Dot;
 
-  tempcx = (SiS_Pr->SiS_VGAVT - SiS_Pr->SiS_VGAVDE) >> 2;
+  if(modeflag & Charx8Dot) tempcx = 0x08;
+  else                     tempcx = 0x09;
 
-  if( ((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) ||
-      ((SiS_Pr->SiS_IF_DEF_LVDS == 1) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) ) {
-     if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600)         tempcx = 1;
-   	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)   tempcx = 3;
-	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768)   tempcx = 3;
-	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024)  tempcx = 1;
-	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050)  tempcx = 1;
-	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)  tempcx = 1;
-	else                                                           tempcx = 0x0057;
-     }
-  }
+  tempax = SiS_Pr->SiS_VGAHDE;                                 	/* 0x04 Horizontal Display End */
+  if(modeflag & HalfDCLK) tempax >>= 1;
+  tempax = ((tempax / tempcx) - 1) & 0xff;
+  tempbx = tempax;
 
-  tempbx += tempcx;
-  if(SiS_Pr->SiS_VBType & VB_SISVB) {
-     tempbx++;                                                	/* BPLVRS  */
-  }
-  if(tempbx >= SiS_Pr->SiS_VT) tempbx -= SiS_Pr->SiS_VT;
-  temp = tempbx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x18,temp);                             /* Part1_18h  */
+  temp = tempax;
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x04,temp);
 
-  tempcx >>= 3;
-  if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-        if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-	   if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600)         tempcx = 3;
-   	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)   tempcx = 5;
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768)   tempcx = 5;
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024)  tempcx = 5;
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050)  tempcx = 2;
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)  tempcx = 2;
-	}
+  if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
+     if(!(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)) {
+        temp += 2;
      }
   }
-  tempcx += tempbx;
-  tempcx++;                                                	/* BPLVRE  */
-  temp = tempcx & 0x000F;
-  if(SiS_Pr->SiS_VBType & VB_SISVB) {
-     temp |= 0xC0;
-     SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0xF0,temp); 		/* Part1_19h  */
-  } else {
-     SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0xF0,temp);
+  if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
+     if(resinfo == SIS_RI_800x600) temp -= 2;
   }
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x05,temp);                 /* 0x05 Horizontal Display Start */
 
-  temp = ((tempbx >> 8) & 0x07) << 3;
-  if(SiS_Pr->SiS_VGAVDE != SiS_Pr->SiS_VDE) temp |= 0x40;
-  if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA)   temp |= 0x40;
-  if(SiS_Pr->SiS_VBType & VB_SISVB) {
-     /* Don't check Part1Port,0x00 -> is not being set if LCDA! */
-     /* We check SR06 instead here: */
-     if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) {
-        if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x06) & 0x10) temp |= 0x80;
-     }
-  } else {
-     if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) {
-        if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x01) temp |= 0x80;
-     }
-  }
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1A,0x07,temp);            /* Part1_1Ah */
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x06,0x03);                 /* 0x06 Horizontal Blank end     */
 
-  tempbx = push2;                                      		/* BPLVDEE */
+  tempax = 0xFFFF;
+  if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) tempax = SiS_GetVGAHT2(SiS_Pr);
+  if(tempax >= SiS_Pr->SiS_VGAHT) tempax = SiS_Pr->SiS_VGAHT;
+  if(modeflag & HalfDCLK)         tempax >>= 1;
+  tempax = (tempax / tempcx) - 5;
+  tempcx = tempax;
 
-  tempcx = SiS_Pr->SiS_LCDVDES;                        		/* NPLVDES */
-  if(!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600) {
-        if(resinfo == SIS_RI_800x600) tempcx++;
-     }
-  }
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480) {
-     tempbx = tempcx = SiS_Pr->SiS_VGAVDE;
-     tempbx--;
-  }
-
-  temp = ((tempbx >> 8) & 0x07) << 3;
-  temp = temp | ((tempcx >> 8) & 0x07);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1D,temp);                          /* Part1_1Dh */
-  temp = tempbx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1C,temp);                          /* Part1_1Ch  */
-  temp = tempcx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1B,temp);                          /* Part1_1Bh  */
-
-  tempeax = SiS_Pr->SiS_VGAVDE << 18;
-  tempebx = SiS_Pr->SiS_VDE;
-  temp = (USHORT)(tempeax % tempebx);
-  tempeax = tempeax / tempebx;
-  if(temp) tempeax++;
-  tempvcfact = tempeax;
-
-  temp = (USHORT)(tempeax & 0x00FF);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x37,temp);
-
-  temp = (USHORT)((tempeax & 0x00FF00) >> 8);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x36,temp);
-
-  temp = (USHORT)((tempeax & 0x00030000) >> 16);
-  if(SiS_Pr->SiS_VDE == SiS_Pr->SiS_VGAVDE) temp |= 0x04;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x35,temp);
-
-  if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302ELV)) {
-     temp = (USHORT)(tempeax & 0x00FF);
-     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x3c,temp);
-     temp = (USHORT)((tempeax & 0x00FF00) >> 8);
-     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x3b,temp);
-     temp = (USHORT)(((tempeax & 0x00030000) >> 16) << 6);
-     SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0x3f,temp);
-     temp = 0;
-     if(SiS_Pr->SiS_VDE != SiS_Pr->SiS_VGAVDE) temp |= 0x08;
-     SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x30,0xf3,temp);
-  }
-
-  tempeax = SiS_Pr->SiS_VGAHDE << 16;
-  tempebx = SiS_Pr->SiS_HDE;
-  temp = tempeax % tempebx;
-  tempeax /= tempebx;
-  if(temp) tempeax++;
-  if(tempebx == SiS_Pr->SiS_VGAHDE) tempeax = 0xFFFF;
-  tempecx = tempeax;
-  tempeax = ((SiS_Pr->SiS_VGAHDE << 16) / tempecx) - 1;
-  tempecx = (tempecx << 16) | (tempeax & 0xFFFF);
-  temp = (USHORT)(tempecx & 0x00FF);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1F,temp);                          /* Part1_1Fh  */
-
-  tempeax = (SiS_Pr->SiS_VGAVDE << 18) / tempvcfact;
-  tempbx = (USHORT)(tempeax & 0x0FFFF);
-
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) tempbx--;
-
-  if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA)  tempbx = 1;
-
-  temp = ((tempbx >> 8) & 0x07) << 3;
-  temp = temp | ((tempecx >> 8) & 0x07);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x20,temp);                         /* Part1_20h */
-
-  temp = tempbx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x21,temp);                         /* Part1_21h */
-
-  tempecx >>= 16;   	                                  	/* BPLHCFACT  */
-  if(modeflag & HalfDCLK) tempecx >>= 1;
-  temp = (USHORT)((tempecx & 0x0000FF00) >> 8);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x22,temp);                         /* Part1_22h */
-
-  temp = (USHORT)(tempecx & 0x000000FF);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x23,temp);
-
-  if((SiS_Pr->SiS_IF_DEF_LVDS == 1) || (SiS_Pr->SiS_VBInfo & VB_SIS301LV302LV)) {
-     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1e,0x20);
-  }
-}
-#endif  /* SIS 315 */
-
-static USHORT
-SiS_GetVGAHT2(SiS_Private *SiS_Pr)
-{
-  ULONG tempax,tempbx;
-
-  tempbx = ((SiS_Pr->SiS_VGAVT - SiS_Pr->SiS_VGAVDE) * SiS_Pr->SiS_RVBHCMAX) & 0xFFFF;
-  tempax = (SiS_Pr->SiS_VT - SiS_Pr->SiS_VDE) * SiS_Pr->SiS_RVBHCFACT;
-  tempax = (tempax * SiS_Pr->SiS_HT) / tempbx;
-  return((USHORT) tempax);
-}
-
-/******* Set Part 1 / SiS bridge *********/
-static void
-SiS_SetGroup1_301(SiS_Private *SiS_Pr, USHORT ModeNo,USHORT ModeIdIndex,
-                  PSIS_HW_INFO HwInfo,USHORT RefreshRateTableIndex)
-{
-  USHORT  push1,push2;
-  USHORT  tempax,tempbx,tempcx,temp;
-  USHORT  resinfo,modeflag;
-  unsigned char p1_7, p1_8;
-
-  if(ModeNo <= 0x13) {
-     modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-     resinfo = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo;
-  } else {
-     if(SiS_Pr->UseCustomMode) {
-        modeflag = SiS_Pr->CModeFlag;
-	resinfo = 0;
-     } else {
-    	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-    	resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
-     }
-  }
-
-  /* The following is only done if bridge is in slave mode: */
-
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x03,0xff);                  /* set MAX HT */
-
-  if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)  modeflag |= Charx8Dot;
-
-  if(modeflag & Charx8Dot) tempcx = 0x08;
-  else                     tempcx = 0x09;
-
-  tempax = SiS_Pr->SiS_VGAHDE;                                 	/* 0x04 Horizontal Display End */
-  if(modeflag & HalfDCLK) tempax >>= 1;
-  tempax = ((tempax / tempcx) - 1) & 0xff;
-  tempbx = tempax;
-
-  temp = tempax;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x04,temp);
-
-  if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-     if(!(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)) {
-        temp += 2;
-     }
-  }
-  if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
-     if(resinfo == SIS_RI_800x600) temp -= 2;
-  }
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x05,temp);                 /* 0x05 Horizontal Display Start */
-
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x06,0x03);                 /* 0x06 Horizontal Blank end     */
-
-  tempax = 0xFFFF;
-  if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) tempax = SiS_GetVGAHT2(SiS_Pr);
-  if(tempax >= SiS_Pr->SiS_VGAHT) tempax = SiS_Pr->SiS_VGAHT;
-  if(modeflag & HalfDCLK)         tempax >>= 1;
-  tempax = (tempax / tempcx) - 5;
-  tempcx = tempax;
-
-  if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
-     temp = tempcx - 1;
-     if(!(modeflag & HalfDCLK)) {
-        temp -= 6;
-        if(SiS_Pr->SiS_TVMode & TVSetTVSimuMode) {
-           temp -= 2;
-           if(ModeNo > 0x13) temp -= 10;
-        }
+  if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
+     temp = tempcx - 1;
+     if(!(modeflag & HalfDCLK)) {
+        temp -= 6;
+        if(SiS_Pr->SiS_TVMode & TVSetTVSimuMode) {
+           temp -= 2;
+           if(ModeNo > 0x13) temp -= 10;
+        }
      }
   } else {
      tempcx = (tempcx + tempbx) >> 1;
@@ -5684,21 +5242,20 @@
      } else {
         if(!(modeflag & HalfDCLK)) {
            temp -= 4;
-           if((SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1280x960) &&
-	      (SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1600x1200)) {
+           if((SiS_Pr->SiS_LCDResInfo != Panel_1280x960) &&
+	      (SiS_Pr->SiS_LCDResInfo != Panel_1600x1200)) {
               if(SiS_Pr->SiS_VGAHDE >= 800) {
                  temp -= 7;
 	         if(HwInfo->jChipType < SIS_315H) {
-	            /* 650/301LV(x) does not do this, 630/301B, 300/301LV do */
                     if(SiS_Pr->SiS_ModeType == ModeEGA) {
                        if(SiS_Pr->SiS_VGAVDE == 1024) {
                           temp += 15;
-                          if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1280x1024)
+                          if(SiS_Pr->SiS_LCDResInfo != Panel_1280x1024)
 		  	     temp += 7;
                        }
                     }
 	         }
-		 if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1400x1050) {
+		 if(SiS_Pr->SiS_LCDResInfo != Panel_1400x1050) {
                     if(SiS_Pr->SiS_VGAHDE >= 1280) {
                        if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) temp += 28;
 		    }
@@ -5762,6 +5319,10 @@
 	      p1_7 = 0xab;
 	   }
 	}
+     } else {
+        if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) {
+	   if(modeflag & HalfDCLK) p1_7 = 0x30;
+	}
      }
   }
 
@@ -5784,7 +5345,7 @@
   else if(tempbx == 525) tempbx = 480;
   push2 = tempbx;
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
       	if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
            if     (tempbx == 350) tempbx += 5;
            else if(tempbx == 480) tempbx += 5;
@@ -5830,7 +5391,7 @@
 	tempbx += (tempax << 1);
      }
   } else if(HwInfo->jChipType >= SIS_315H) {
-     if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1400x1050) {
+     if(SiS_Pr->SiS_LCDResInfo != Panel_1400x1050) {
 	tempbx += (tempax << 1);
      }
   }
@@ -5907,521 +5468,465 @@
      }
   }
   SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1A,temp);                	/* 0x1A SR0E */
+
+  temp = SiS_GetRegByte((SiS_Pr->SiS_P3ca+0x02));
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1b,temp);
 }
 
-/*********** Set Part 1 / LVDS ***********/
+/* Setup panel link
+ * This is used for LVDS, LCDA and Chrontel TV output
+ * 300/LVDS+TV, 300/301B-DH, 315/LVDS+TV, 315/LCDA
+ */
 static void
 SiS_SetGroup1_LVDS(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
- 		   PSIS_HW_INFO HwInfo, USHORT RefreshRateTableIndex)
+                   PSIS_HW_INFO HwInfo, USHORT RefreshRateTableIndex)
 {
-  USHORT modeflag, resinfo;
-  USHORT push1, push2, tempax, tempbx, tempcx, temp;
+  USHORT modeflag,resinfo;
+  USHORT push2,tempax,tempbx,tempcx,temp;
+  ULONG tempeax=0,tempebx,tempecx,tempvcfact=0;
+  BOOLEAN islvds = FALSE, issis  = FALSE, chkdclkfirst = FALSE;
+#ifdef SIS300
+  USHORT crt2crtc;
+#endif
 #ifdef SIS315H
   USHORT pushcx;
 #endif
-  ULONG  tempeax=0, tempebx, tempecx, tempvcfact=0;
-
-  /* This is not supported on LVDS */
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) return;
-  if(SiS_Pr->UseCustomMode) return;
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
      resinfo = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo;
+#ifdef SIS300
+     crt2crtc = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
+#endif
+  } else if(SiS_Pr->UseCustomMode) {
+     modeflag = SiS_Pr->CModeFlag;
+     resinfo = 0;
+#ifdef SIS300
+     crt2crtc = 0;
+#endif
   } else {
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
      resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+#ifdef SIS300
+     crt2crtc = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
+#endif
   }
 
-  /* Set up Panel Link */
-
-  /* 1. Horizontal setup */
-
-  tempax = SiS_Pr->SiS_LCDHDES;
-
-  if((!SiS_Pr->SiS_IF_DEF_FSTN) && (!SiS_Pr->SiS_IF_DEF_DSTN)) {
-     if( (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480) &&
-         (!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) ) {
-  	   tempax -= 8;
-     }
+  /* is lvds if really LVDS, or SiS 301B-DH with external LVDS transmitter */
+  if((SiS_Pr->SiS_IF_DEF_LVDS == 1) ||
+     ((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBType & VB_NoLCD))) {
+     islvds = TRUE;
   }
 
-  tempcx = SiS_Pr->SiS_HT;    				  /* Horiz. Total */
-
-  tempbx = SiS_Pr->SiS_HDE;                               /* Horiz. Display End */
+  /* is really sis if sis bridge, but not 301B-DH */
+  if((SiS_Pr->SiS_VBType & VB_SISVB) && (!(SiS_Pr->SiS_VBType & VB_NoLCD))) {
+     issis = TRUE;
+  }
 
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2 ||
-     SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) {
-     tempbx >>= 1;
+  if((HwInfo->jChipType >= SIS_315H) && (islvds) && (!(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA))) {
+     if((!SiS_Pr->SiS_IF_DEF_FSTN) && (!SiS_Pr->SiS_IF_DEF_DSTN)) {
+        chkdclkfirst = TRUE;
+     }
   }
 
-  if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
-     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-        if(SiS_Pr->SiS_IF_DEF_FSTN || SiS_Pr->SiS_IF_DEF_DSTN) {
-	   tempbx = SiS_Pr->PanelXRes;
-	} else if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-	   tempbx = SiS_Pr->PanelXRes;
-	   if(SiS_Pr->SiS_CustomT == CUT_BARCO1024) {
-	      tempbx = 800;
-	      if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel800x600) {
-	         tempbx = 1024;
+#ifdef SIS315H
+  if((HwInfo->jChipType >= SIS_315H) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) {
+     if(IS_SIS330) {
+        SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x10);
+     } else if(IS_SIS740) {
+        if(islvds) {
+           SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,0xfb,0x04);
+	   SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x03);
+        } else if(SiS_Pr->SiS_VBType & VB_SISVB) {
+           SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x10);
+        }
+     } else {
+        if(islvds) {
+           SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,0xfb,0x04);
+	   SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x00);
+        } else if(SiS_Pr->SiS_VBType & VB_SISVB) {
+           SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x2D,0x0f);
+	   if(SiS_Pr->SiS_VBType & VB_SIS301C) {
+	      if((SiS_Pr->SiS_LCDResInfo == Panel_1024x768) ||
+	         (SiS_Pr->SiS_LCDResInfo == Panel_1280x1024)) {
+	         SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x20);
 	      }
 	   }
         }
      }
   }
-  tempcx = (tempcx - tempbx) >> 2;		 /* HT-HDE / 4 */
-
-  push1 = tempax;
-
-  tempax += tempbx;
-
-  if(tempax >= SiS_Pr->SiS_HT) tempax -= SiS_Pr->SiS_HT;
+#endif
 
-  push2 = tempax;
+  /* Horizontal */
 
-  if((!SiS_Pr->SiS_IF_DEF_FSTN) &&
-     (!SiS_Pr->SiS_IF_DEF_DSTN) &&
-     (SiS_Pr->SiS_CustomT != CUT_BARCO1366) &&
-     (SiS_Pr->SiS_CustomT != CUT_BARCO1024) &&
-     (SiS_Pr->SiS_CustomT != CUT_PANEL848)) {
-     if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
-        if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-           if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-     	      if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600)        tempcx = 0x0028;
-	      else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x600)  tempcx = 0x0018;
-     	      else if( (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) ||
-	            (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1152x768) ) {
-	  	   if(HwInfo->jChipType < SIS_315H) {
-		      if(SiS_Pr->SiS_VBType & VB_SISVB) {
-		         tempcx = 0x0017;  /* A901; sometimes 0x0018; */
-		      } else {
-		         tempcx = 0x0017;
-#ifdef TWNEWPANEL
-			 tempcx = 0x0018;
-#endif
-		      }
-		   } else {
-		      tempcx = 0x0018;
-		   }
-	      }
-	      else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768)  tempcx = 0x0028;
-	      else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) tempcx = 0x0030;
-	      else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) tempcx = 0x0030;
-	      else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) tempcx = 0x0040;
+  tempax = SiS_Pr->SiS_LCDHDES;
+  if(islvds) {
+     if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+        if((!SiS_Pr->SiS_IF_DEF_FSTN) && (!SiS_Pr->SiS_IF_DEF_DSTN)) {
+           if((SiS_Pr->SiS_LCDResInfo == Panel_640x480) &&
+              (!(SiS_Pr->SiS_VBInfo & SetInSlaveMode))) {
+  	      tempax -= 8;
 	   }
-        }
+	}
      }
   }
 
-  tempcx += tempax;                              /* lcdhrs  */
-  if(tempcx >= SiS_Pr->SiS_HT) tempcx -= SiS_Pr->SiS_HT;
-
-  tempax = tempcx >> 3;                          /* BPLHRS */
-  temp = tempax & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x14,temp);		 /* Part1_14h; Panel Link Horizontal Retrace Start  */
+  temp = (tempax & 0x0007);
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1A,temp);			/* BPLHDESKEW[2:0]   */
+  temp = (tempax >> 3) & 0x00FF;
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x16,temp);			/* BPLHDESKEW[10:3]  */
 
-  if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
-     temp = (tempax & 0x00FF) + 2;
-  } else {
-     temp = (tempax & 0x00FF) + 10;
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-        if((!SiS_Pr->SiS_IF_DEF_DSTN) &&
-	   (!SiS_Pr->SiS_IF_DEF_FSTN) &&
-	   (SiS_Pr->SiS_CustomT != CUT_BARCO1366) &&
-	   (SiS_Pr->SiS_CustomT != CUT_BARCO1024) &&
-	   (SiS_Pr->SiS_CustomT != CUT_PANEL848)) {
-           if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-	      temp += 6;
-              if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel800x600) {
-	         temp++;
-	         if(HwInfo->jChipType >= SIS_315H) {
-	            if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1024x768) {
-	               temp += 7;
-		       if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1600x1200) {
-		          temp -= 0x14;
-			  if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1280x768) {
-			     temp -= 10;
-			  }
-		       }
-	            }
-	         }
-	      }
-           }
-        }
+  tempbx = SiS_Pr->SiS_HDE;
+  if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+     if((SiS_Pr->SiS_LCDResInfo == Panel_640x480_2) ||
+        (SiS_Pr->SiS_LCDResInfo == Panel_640x480_3)) {
+        tempbx >>= 1;
+     }
+     if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+        tempbx = SiS_Pr->PanelXRes;
      }
   }
 
-  temp &= 0x1F;
-  temp |= ((tempcx & 0x0007) << 5);
-#if 0
-  if(SiS_Pr->SiS_IF_DEF_FSTN) temp = 0x20;       /* WRONG? BIOS loads cl, not ah */
-#endif
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x15,temp);    	 /* Part1_15h; Panel Link Horizontal Retrace End/Skew */
-
-  tempbx = push2;
-  tempcx = push1;                                /* lcdhdes  */
+  tempax += tempbx;
+  if(tempax >= SiS_Pr->SiS_HT) tempax -= SiS_Pr->SiS_HT;
 
-  temp = (tempcx & 0x0007);                      /* BPLHDESKEW  */
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1A,temp);   	 /* Part1_1Ah; Panel Link Vertical Retrace Start (2:0) */
+  temp = tempax;
+  if(temp & 0x07) temp += 8;
+  temp >>= 3;
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x17,temp);			/* BPLHDEE  */
 
-  tempcx >>= 3;                                  /* BPLHDES */
-  temp = (tempcx & 0x00FF);
-#if 0 /* Not 550 FSTN */
-  if(HwInfo->jChipType >= SIS_315H) {
-     if(ModeNo == 0x5b) temp--; */
-  }
-#endif
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x16,temp);    	 /* Part1_16h; Panel Link Horizontal Display Enable Start  */
+  tempcx = (SiS_Pr->SiS_HT - tempbx) >> 2;
 
-  if((HwInfo->jChipType < SIS_315H) ||
-     (SiS_Pr->SiS_IF_DEF_FSTN) ||
-     (SiS_Pr->SiS_IF_DEF_DSTN)) {
-     if(tempbx & 0x07) tempbx += 8;
-  }
-  tempbx >>= 3;                                  /* BPLHDEE  */
-  temp = tempbx & 0x00FF;
-#if 0 /* Not 550 FSTN */
-  if(HwInfo->jChipType >= SIS_315H) {
-     if(ModeNo == 0x5b) temp--;
+  if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+     if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+        if(SiS_Pr->PanelHRS != 999) tempcx = SiS_Pr->PanelHRS;
+     }
   }
-#endif
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x17,temp);   	 /* Part1_17h; Panel Link Horizontal Display Enable End  */
 
-  /* 2. Vertical setup */
+  tempcx += tempax;
+  if(tempcx >= SiS_Pr->SiS_HT) tempcx -= SiS_Pr->SiS_HT;
 
-  if(HwInfo->jChipType < SIS_315H) {
-     tempcx = SiS_Pr->SiS_VGAVT;
-     tempbx = SiS_Pr->SiS_VGAVDE;
-     if((SiS_Pr->SiS_CustomT != CUT_BARCO1366) && (SiS_Pr->SiS_CustomT != CUT_BARCO1024)) {
-        if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-           if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-	      tempbx = SiS_Pr->PanelYRes;
+  temp = (tempcx >> 3) & 0x00FF;
+  if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+     if(SiS_Pr->SiS_IF_DEF_TRUMPION) {
+        if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
+           switch(ModeNo) {
+           case 0x04:
+           case 0x05:
+           case 0x0d: temp = 0x56; break;
+           case 0x10: temp = 0x60; break;
+           case 0x13: temp = 0x5f; break;
+           case 0x40:
+           case 0x41:
+           case 0x4f:
+           case 0x43:
+           case 0x44:
+           case 0x62:
+           case 0x56:
+           case 0x53:
+           case 0x5d:
+           case 0x5e: temp = 0x54; break;
            }
-	}
+        }
      }
-     tempcx -= tempbx;
+  }
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x14,temp);			/* BPLHRS */
 
+  if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+     temp += 2;
+     if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+        temp += 8;
+        if(SiS_Pr->PanelHRE != 999) {
+           temp = tempcx + SiS_Pr->PanelHRE;
+	   if(temp >= SiS_Pr->SiS_HT) temp -= SiS_Pr->SiS_HT;
+	   temp >>= 3;
+        }
+     }
   } else {
-
-     tempcx = SiS_Pr->SiS_VGAVT - SiS_Pr->SiS_VGAVDE;           /* VGAVT-VGAVDE  */
-
+     temp += 10;
   }
 
-  tempbx = SiS_Pr->SiS_LCDVDES;	   		 	 	/* VGAVDES  */
-  push1 = tempbx;
+  temp &= 0x1F;
+  temp |= ((tempcx & 0x07) << 5);
+#if 0
+  if(SiS_Pr->SiS_IF_DEF_FSTN) temp = 0x20;       		/* WRONG? BIOS loads cl, not ah */
+#endif
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x15,temp);			/* BPLHRE */
+
+  /* Vertical */
 
   tempax = SiS_Pr->SiS_VGAVDE;
-
-  if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-     if((SiS_Pr->SiS_CustomT == CUT_BARCO1366) || (SiS_Pr->SiS_CustomT == CUT_BARCO1024)) {
-        if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-           tempax = 600;
-	   if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel800x600) {
-	      tempax = 768;
-	   }
-	}
-     } else if( (SiS_Pr->SiS_IF_DEF_TRUMPION == 0)   &&
-                (!(SiS_Pr->SiS_LCDInfo & LCDPass11)) &&
-                ((SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) ||
-	         (SiS_Pr->SiS_IF_DEF_FSTN) ||
-	         (SiS_Pr->SiS_IF_DEF_DSTN)) ) {
+  if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+     if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
 	tempax = SiS_Pr->PanelYRes;
      }
   }
 
-  tempbx += tempax;
+  tempbx = SiS_Pr->SiS_LCDVDES + tempax;
   if(tempbx >= SiS_Pr->SiS_VT) tempbx -= SiS_Pr->SiS_VT;
 
   push2 = tempbx;
 
-  tempcx >>= 1;
-
-  if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) &&
-     (SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) &&
-     (SiS_Pr->SiS_CustomT != CUT_BARCO1366) &&
-     (SiS_Pr->SiS_CustomT != CUT_BARCO1024) &&
-     (SiS_Pr->SiS_CustomT != CUT_PANEL848)) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2 ||
-        SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) {
-	tempcx = 0x0017;
-     } else if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
-        if(SiS_Pr->SiS_IF_DEF_FSTN || SiS_Pr->SiS_IF_DEF_DSTN) {
-	   if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600)         tempcx = 0x0003;
-  	   else if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) ||
-	           (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768)) tempcx = 0x0003;
-           else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024)  tempcx = 0x0001;
-           else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050)  tempcx = 0x0001;
-	   else 							  tempcx = 0x0057;
-        } else  {
-     	   if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600)         tempcx = 0x0001;
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x600)   tempcx = 0x0001;
-     	   else if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) ||
-	           (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1152x768)) {
-		   if(HwInfo->jChipType < SIS_315H) {
-		      if(SiS_Pr->SiS_VBType & VB_SISVB) {
-		         tempcx = 0x0002;   /* A901; sometimes 0x0003; */
-		      } else {
-			 tempcx = 0x0002;
-#ifdef TWNEWPANEL
-			 tempcx = 0x0003;
-#endif
-		      }
-		   } else tempcx = 0x0003;
-           }
-     	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768)  tempcx = 0x0003;
-     	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) tempcx = 0x0001;
-     	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) tempcx = 0x0001;
-	   else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) tempcx = 0x0001;
-     	   else 							 tempcx = 0x0057;
+  tempcx = SiS_Pr->SiS_VGAVT - SiS_Pr->SiS_VGAVDE;
+  if(HwInfo->jChipType < SIS_315H) {
+     if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+        if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+	   tempcx = SiS_Pr->SiS_VGAVT - SiS_Pr->PanelYRes;
 	}
      }
   }
+  if(islvds) tempcx >>= 1;
+  else       tempcx >>= 2;
 
-  tempbx += tempcx;			 	/* BPLVRS  */
-
-  if((HwInfo->jChipType < SIS_315H) ||
-     (SiS_Pr->SiS_IF_DEF_FSTN) ||
-     (SiS_Pr->SiS_IF_DEF_DSTN)) {
-     tempbx++;
+  if( (SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) &&
+      (!(SiS_Pr->SiS_LCDInfo & LCDPass11)) 		    &&
+      (SiS_Pr->PanelVRS != 999) ) {
+     tempcx = SiS_Pr->PanelVRS;
+     tempbx += tempcx;
+     if(issis) tempbx++;
+  } else {
+     tempbx += tempcx;
+     if(HwInfo->jChipType < SIS_315H) tempbx++;
+     else if(issis)                   tempbx++;
   }
 
-  if(tempbx >= SiS_Pr->SiS_VT) tempbx -= SiS_Pr->SiS_VT;
+  if(tempbx >= SiS_Pr->SiS_VT) tempbx -= SiS_Pr->SiS_VT;	/* BPLVRS  */
 
   temp = tempbx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x18,temp);       	 /* Part1_18h; Panel Link Vertical Retrace Start  */
+  if(SiS_Pr->SiS_IF_DEF_TRUMPION) {
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
+        if(ModeNo == 0x10) temp = 0xa9;
+     }
+  }
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x18,temp);
 
   tempcx >>= 3;
+  tempcx++;
 
-  if((!(SiS_Pr->SiS_LCDInfo & LCDPass11)) &&
-     (SiS_Pr->SiS_CustomT != CUT_BARCO1366) &&
-     (SiS_Pr->SiS_CustomT != CUT_BARCO1024) &&
-     (SiS_Pr->SiS_CustomT != CUT_PANEL848)) {
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-        if( (HwInfo->jChipType < SIS_315H) &&
-            (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480) )     tempcx = 0x0001;
-	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2)  tempcx = 0x0002;
-	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3)  tempcx = 0x0002;
-        else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600)    tempcx = 0x0003;
-        else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x600)   tempcx = 0x0005;
-        else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1152x768)   tempcx = 0x0005;
-	else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768)   tempcx = 0x0011;
-        else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024)  tempcx = 0x0005;
-        else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050)  tempcx = 0x0002;
-        else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)  tempcx = 0x0011;
-        else if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480)  {
-     		if(HwInfo->jChipType < SIS_315H) {
-		   if(SiS_Pr->SiS_VBType & VB_SISVB) {
-		      tempcx = 0x0004;   /* A901; Other BIOS sets 0x0005; */
-		   } else {
-		      tempcx = 0x0004;
-#ifdef TWNEWPANEL
-		      tempcx = 0x0005;
-#endif
-		   }
-		} else {
-		   tempcx = 0x0005;
-		}
-        }
+  if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+     if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+        if(SiS_Pr->PanelVRE != 999) tempcx = SiS_Pr->PanelVRE;
      }
   }
 
-  tempcx = tempcx + tempbx + 1;                  /* BPLVRE  */
+  tempcx += tempbx;
   temp = tempcx & 0x000F;
-  if(SiS_Pr->SiS_IF_DEF_FSTN ||
-     SiS_Pr->SiS_IF_DEF_DSTN ||
-     (SiS_Pr->SiS_CustomT == CUT_BARCO1366) ||
-     (SiS_Pr->SiS_CustomT == CUT_BARCO1024) ||
-     (SiS_Pr->SiS_CustomT == CUT_PANEL848)) {
-     temp |= 0x30;
-  }
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0xf0,temp); /* Part1_19h; Panel Link Vertical Retrace End (3:0); Misc.  */
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0xF0,temp);	/* BPLVRE  */
 
-  temp = ((tempbx & 0x0700) >> 8) << 3;          /* BPLDESKEW =0 */
+  temp = ((tempbx >> 8) & 0x07) << 3;
   if(SiS_Pr->SiS_IF_DEF_FSTN || SiS_Pr->SiS_IF_DEF_DSTN) {
      if(SiS_Pr->SiS_HDE != 640) {
-        if(SiS_Pr->SiS_VGAVDE != SiS_Pr->SiS_VDE)   temp |= 0x40;
+        if(SiS_Pr->SiS_VGAVDE != SiS_Pr->SiS_VDE)  temp |= 0x40;
      }
-  } else if(SiS_Pr->SiS_VGAVDE != SiS_Pr->SiS_VDE)  temp |= 0x40;
-  if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA)           temp |= 0x40;
-  if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) {
-     if(HwInfo->jChipType >= SIS_315H) {
-        if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x01) {
-           temp |= 0x80;
+  } else if(SiS_Pr->SiS_VGAVDE != SiS_Pr->SiS_VDE) temp |= 0x40;
+  if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA)          temp |= 0x40;
+  tempbx = 0x87;
+  if((HwInfo->jChipType >= SIS_315H) ||
+     (HwInfo->jChipRevision >= 0x30)) {
+     tempbx = 0x07;
+     if((SiS_Pr->SiS_IF_DEF_CH70xx == 1) && (SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {
+	if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x03)    temp |= 0x80;
+     }
+     /* Chrontel 701x operates in 24bit mode (8-8-8, 2x12bit mutliplexed) via VGA2 */
+     if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) {
+	if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
+	   if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x06) & 0x10)      temp |= 0x80;
+	} else {
+	   if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x01) temp |= 0x80;
+	}
+     }
+  }
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1A,tempbx,temp);
+
+  tempbx = push2;                                      		/* BPLVDEE */
+
+  tempcx = SiS_Pr->SiS_LCDVDES;                        		/* BPLVDES */
+
+  if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+     switch(SiS_Pr->SiS_LCDResInfo) {
+     case Panel_640x480:
+        tempbx = SiS_Pr->SiS_VGAVDE - 1;
+        tempcx = SiS_Pr->SiS_VGAVDE;
+	break;
+     case Panel_800x600:
+        if(!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) {
+           if(resinfo == SIS_RI_800x600) tempcx++;
         }
-     } else {
-	if( (HwInfo->jChipType == SIS_630) ||
-	    (HwInfo->jChipType == SIS_730) ) {
-	   if(HwInfo->jChipRevision >= 0x30) {
-	      temp |= 0x80;
+	break;
+     case Panel_1024x600:
+        if(!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) {
+           if(resinfo == SIS_RI_1024x600) tempcx++;
+           if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+	      if(resinfo == SIS_RI_800x600) tempcx++;
 	   }
-	}
+        }
+	break;
+     case Panel_1024x768:
+        if(HwInfo->jChipType < SIS_315H) {
+           if(!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) {
+              if(resinfo == SIS_RI_1024x768) tempcx++;
+	   }
+        }
+	break;
      }
   }
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1A,0x87,temp);  /* Part1_1Ah; Panel Link Control Signal (7:3); Vertical Retrace Start (2:0) */
 
-  if (HwInfo->jChipType < SIS_315H) {
+  temp = ((tempbx >> 8) & 0x07) << 3;
+  temp = temp | ((tempcx >> 8) & 0x07);
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1D,temp);
+  /* if(SiS_Pr->SiS_IF_DEF_FSTN) tempbx++;  */
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1C,tempbx);
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1B,tempcx);
 
-#ifdef SIS300      /* 300 series */
+  /* Vertical scaling */
 
-        tempeax = SiS_Pr->SiS_VGAVDE << 6;
-        temp = (USHORT)(tempeax % (ULONG)SiS_Pr->SiS_VDE);
-        tempeax = tempeax / (ULONG)SiS_Pr->SiS_VDE;
-        if(temp != 0) tempeax++;
-        tempebx = tempeax;                         /* BPLVCFACT  */
+  if(HwInfo->jChipType < SIS_315H) {
 
-  	if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA) {
-	   tempebx = 0x003F;
-	}
+#ifdef SIS300      /* 300 series */
+     tempeax = SiS_Pr->SiS_VGAVDE << 6;
+     temp = (tempeax % (ULONG)SiS_Pr->SiS_VDE);
+     tempeax = tempeax / (ULONG)SiS_Pr->SiS_VDE;
+     if(temp) tempeax++;
 
-  	temp = (USHORT)(tempebx & 0x00FF);
-  	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1E,temp);      /* Part1_1Eh; Panel Link Vertical Scaling Factor */
+     if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA) tempeax = 0x3F;
 
+     temp = (USHORT)(tempeax & 0x00FF);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1E,temp);      	/* BPLVCFACT */
+     tempvcfact = temp;
 #endif /* SIS300 */
 
   } else {
 
 #ifdef SIS315H  /* 315 series */
+     tempeax = SiS_Pr->SiS_VGAVDE << 18;
+     tempebx = SiS_Pr->SiS_VDE;
+     temp = (tempeax % tempebx);
+     tempeax = tempeax / tempebx;
+     if(temp) tempeax++;
+     tempvcfact = tempeax;
 
-        if(HwInfo->jChipType == SIS_740) {
-           SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x1E,0x03);
-        } else {
-	   SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1E,0x23);
-	}
-
-	tempeax = SiS_Pr->SiS_VGAVDE << 18;
-    	temp = (USHORT)(tempeax % (ULONG)SiS_Pr->SiS_VDE);
-    	tempeax = tempeax / SiS_Pr->SiS_VDE;
-    	if(temp != 0) tempeax++;
-    	tempebx = tempeax;                         /* BPLVCFACT  */
-        tempvcfact = tempeax;
-    	temp = (USHORT)(tempebx & 0x00FF);
-    	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x37,temp);      /* Part1_37h; Panel Link Vertical Scaling Factor */
-    	temp = (USHORT)((tempebx & 0x00FF00) >> 8);
-    	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x36,temp);      /* Part1_36h; Panel Link Vertical Scaling Factor */
-    	temp = (USHORT)((tempebx & 0x00030000) >> 16);
-	temp &= 0x03;
-    	if(SiS_Pr->SiS_VDE == SiS_Pr->SiS_VGAVDE) temp |= 0x04;
-    	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x35,temp);      /* Part1_35h; Panel Link Vertical Scaling Factor */
-
-#endif /* SIS315H */
-
-  }
-
-  tempbx = push2;                                  /* BPLVDEE  */
-  tempcx = push1;
-
-  push1 = temp;
-
-  if(!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) {
-   	if(!SiS_Pr->SiS_IF_DEF_FSTN && !SiS_Pr->SiS_IF_DEF_DSTN) {
-		if(HwInfo->jChipType < SIS_315H) {
-			if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x600) {
-      				if(resinfo == SIS_RI_1024x600) tempcx++;
-				if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-					if(resinfo == SIS_RI_800x600) tempcx++;
-		    		}
-			} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600) {
-      				if(resinfo == SIS_RI_800x600)  tempcx++;
-				if(resinfo == SIS_RI_1024x768) tempcx++; /* Doesnt make sense anyway... */
-			} else  if(resinfo == SIS_RI_1024x768) tempcx++;
-		} else {
-			if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel800x600) {
-      				if(resinfo == SIS_RI_800x600)  tempcx++;
-			}
-		}
-	}
-  }
+     temp = (USHORT)(tempeax & 0x00FF);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x37,temp);
+     temp = (USHORT)((tempeax & 0x00FF00) >> 8);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x36,temp);
+     temp = (USHORT)((tempeax & 0x00030000) >> 16);
+     if(SiS_Pr->SiS_VDE == SiS_Pr->SiS_VGAVDE) temp |= 0x04;
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x35,temp);
 
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480) {
-     if((!SiS_Pr->SiS_IF_DEF_FSTN) && (!SiS_Pr->SiS_IF_DEF_DSTN)) {
-        tempcx = SiS_Pr->SiS_VGAVDE;
-        tempbx = SiS_Pr->SiS_VGAVDE - 1;
+     if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302ELV)) {
+        temp = (USHORT)(tempeax & 0x00FF);
+        SiS_SetReg(SiS_Pr->SiS_Part4Port,0x3c,temp);
+        temp = (USHORT)((tempeax & 0x00FF00) >> 8);
+        SiS_SetReg(SiS_Pr->SiS_Part4Port,0x3b,temp);
+        temp = (USHORT)(((tempeax & 0x00030000) >> 16) << 6);
+        SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0x3f,temp);
+        temp = 0;
+        if(SiS_Pr->SiS_VDE != SiS_Pr->SiS_VGAVDE) temp |= 0x08;
+        SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x30,0xf3,temp);
      }
-  }
-
-  temp = ((tempbx & 0x0700) >> 8) << 3;
-  temp |= ((tempcx & 0x0700) >> 8);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1D,temp);     	/* Part1_1Dh; Vertical Display Overflow; Control Signal */
-
-  temp = tempbx & 0x00FF;
-  /* if(SiS_Pr->SiS_IF_DEF_FSTN) temp++;  */
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1C,temp);      	/* Part1_1Ch; Panel Link Vertical Display Enable End  */
+#endif
 
-  temp = tempcx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1B,temp);      	/* Part1_1Bh; Panel Link Vertical Display Enable Start  */
+  }
 
-  /* 3. Additional horizontal setup (scaling, etc) */
+  /* Horizontal scaling */
 
-  tempecx = SiS_Pr->SiS_VGAHDE;
-  if(HwInfo->jChipType >= SIS_315H) {
-     if((!SiS_Pr->SiS_IF_DEF_FSTN) && (!SiS_Pr->SiS_IF_DEF_DSTN)) {
-        if(modeflag & HalfDCLK) tempecx >>= 1;
-     }
+  tempeax = SiS_Pr->SiS_VGAHDE;		/* 1f = ( (VGAHDE * 65536) / ( (VGAHDE * 65536) / HDE ) ) - 1*/
+  if(chkdclkfirst) {
+     if(modeflag & HalfDCLK) tempeax >>= 1;
   }
-  tempebx = SiS_Pr->SiS_HDE;
-  if(tempecx == tempebx) tempeax = 0xFFFF;
-  else {
-     tempeax = tempecx;
-     tempeax <<= 16;
-     temp = (USHORT)(tempeax % tempebx);
-     tempeax = tempeax / tempebx;
+  tempebx = tempeax << 16;
+  if(SiS_Pr->SiS_HDE == tempeax) {
+     tempecx = 0xFFFF;
+  } else {
+     tempecx = tempebx / SiS_Pr->SiS_HDE;
      if(HwInfo->jChipType >= SIS_315H) {
-        if(temp) tempeax++;
+        if(tempebx % SiS_Pr->SiS_HDE) tempecx++;
      }
   }
-  tempecx = tempeax;
 
   if(HwInfo->jChipType >= SIS_315H) {
-     tempeax = SiS_Pr->SiS_VGAHDE;
-     if((!SiS_Pr->SiS_IF_DEF_FSTN) && (!SiS_Pr->SiS_IF_DEF_DSTN)) {
-        if(modeflag & HalfDCLK) tempeax >>= 1;
-     }
-     tempeax <<= 16;
-     tempeax = (tempeax / tempecx) - 1;
+     tempeax = (tempebx / tempecx) - 1;
   } else {
      tempeax = ((SiS_Pr->SiS_VGAHT << 16) / tempecx) - 1;
   }
-  tempecx <<= 16;
-  tempecx |= (tempeax & 0xFFFF);
+  tempecx = (tempecx << 16) | (tempeax & 0xFFFF);
   temp = (USHORT)(tempecx & 0x00FF);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1F,temp);  	 /* Part1_1Fh; Panel Link DDA Operational Number in each horiz. line */
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1F,temp);
 
-  tempbx = SiS_Pr->SiS_VDE;
   if(HwInfo->jChipType >= SIS_315H) {
      tempeax = (SiS_Pr->SiS_VGAVDE << 18) / tempvcfact;
-     tempbx = (USHORT)(tempeax & 0x0FFFF);
+     tempbx = (USHORT)(tempeax & 0xFFFF);
   } else {
      tempeax = SiS_Pr->SiS_VGAVDE << 6;
-     tempbx = push1 & 0x3f;
+     tempbx = tempvcfact & 0x3f;
      if(tempbx == 0) tempbx = 64;
      tempeax /= tempbx;
-     tempbx = (USHORT)(tempeax & 0x0FFFF);
+     tempbx = (USHORT)(tempeax & 0xFFFF);
   }
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) tempbx--;
+  if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) tempbx--;
   if(SiS_Pr->SiS_SetFlag & EnableLVDSDDA) {
      if((!SiS_Pr->SiS_IF_DEF_FSTN) && (!SiS_Pr->SiS_IF_DEF_DSTN)) tempbx = 1;
-     else if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480)  tempbx = 1;
+     else if(SiS_Pr->SiS_LCDResInfo != Panel_640x480)             tempbx = 1;
   }
 
-  temp = ((tempbx & 0xFF00) >> 8) << 3;
-  temp |= (USHORT)((tempecx & 0x0700) >> 8);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x20,temp);  	/* Part1_20h; Overflow register */
-
-  temp = tempbx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x21,temp);  	/* Part1_21h; Panel Link Vertical Accumulator Register */
+  temp = ((tempbx >> 8) & 0x07) << 3;
+  temp = temp | ((tempecx >> 8) & 0x07);
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x20,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x21,tempbx);
 
-  tempecx >>= 16;                               /* BPLHCFACT  */
-  if((HwInfo->jChipType < SIS_315H) || (SiS_Pr->SiS_IF_DEF_FSTN) || (SiS_Pr->SiS_IF_DEF_DSTN)) {
+  tempecx >>= 16;   	                                  	/* BPLHCFACT  */
+  if(!chkdclkfirst) {
      if(modeflag & HalfDCLK) tempecx >>= 1;
   }
   temp = (USHORT)((tempecx & 0xFF00) >> 8);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x22,temp);     	/* Part1_22h; Panel Link Horizontal Scaling Factor High */
-
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x22,temp);
   temp = (USHORT)(tempecx & 0x00FF);
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x23,temp);         /* Part1_22h; Panel Link Horizontal Scaling Factor Low */
+  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x23,temp);
+
+#ifdef SIS315H
+  if(HwInfo->jChipType >= SIS_315H) {
+     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
+        if((islvds) || (SiS_Pr->SiS_VBInfo & VB_SIS301LV302LV)) {
+           SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1e,0x20);
+	}
+     } else {
+        if(islvds) {
+           if(HwInfo->jChipType == SIS_740) {
+              SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x1e,0x03);
+           } else {
+	      SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1e,0x23);
+           }
+        }
+     }
+  }
+#endif
+
+#ifdef SIS300
+  if(SiS_Pr->SiS_IF_DEF_TRUMPION) {
+     int i;
+     UCHAR TrumpMode13[4]   = { 0x01, 0x10, 0x2c, 0x00 };
+     UCHAR TrumpMode10_1[4] = { 0x01, 0x10, 0x27, 0x00 };
+     UCHAR TrumpMode10_2[4] = { 0x01, 0x16, 0x10, 0x00 };
 
-  /* 630/301B and 630/LVDS do something for 640x480 panels here */
+     SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x02,0xbf);
+     for(i=0; i<5; i++) {
+        SiS_SetTrumpionBlock(SiS_Pr, &SiS300_TrumpionData[crt2crtc][0]);
+     }
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
+        if(ModeNo == 0x13) {
+	   for(i=0; i<4; i++) {
+	      SiS_SetTrumpionBlock(SiS_Pr, &TrumpMode13[0]);
+	   }
+	} else if(ModeNo == 0x10) {
+	   for(i=0; i<4; i++) {
+	      SiS_SetTrumpionBlock(SiS_Pr, &TrumpMode10_1[0]);
+	      SiS_SetTrumpionBlock(SiS_Pr, &TrumpMode10_2[0]);
+	   }
+	}
+     }
+     SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x02,0x40);
+  }
+#endif
 
 #ifdef SIS315H
   if(SiS_Pr->SiS_IF_DEF_FSTN || SiS_Pr->SiS_IF_DEF_DSTN) {
@@ -6431,10 +5936,10 @@
      SiS_SetReg(SiS_Pr->SiS_Part1Port,0x28,0x87);
      SiS_SetReg(SiS_Pr->SiS_Part1Port,0x29,0x5A);
      SiS_SetReg(SiS_Pr->SiS_Part1Port,0x2A,0x4B);
-     SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x44,~0x007,0x03);
+     SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x44,~0x07,0x03);
      tempax = SiS_Pr->SiS_HDE;                       		/* Blps = lcdhdee(lcdhdes+HDE) + 64 */
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2 ||
-        SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) tempax >>= 1;
+     if(SiS_Pr->SiS_LCDResInfo == Panel_640x480_2 ||
+        SiS_Pr->SiS_LCDResInfo == Panel_640x480_3) tempax >>= 1;
      tempax += 64;
      temp = tempax & 0x00FF;
      SiS_SetReg(SiS_Pr->SiS_Part1Port,0x38,temp);
@@ -6448,8 +5953,8 @@
      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x3C,~0x007,0x00);
 
      tempax = SiS_Pr->SiS_VDE;
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2 ||
-        SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) tempax >>= 1;
+     if(SiS_Pr->SiS_LCDResInfo == Panel_640x480_2 ||
+        SiS_Pr->SiS_LCDResInfo == Panel_640x480_3) tempax >>= 1;
      tempax >>= 1;
      temp = tempax & 0x00FF;
      SiS_SetReg(SiS_Pr->SiS_Part1Port,0x3B,temp);
@@ -6457,8 +5962,8 @@
      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x3C,~0x038,temp);
 
      tempeax = SiS_Pr->SiS_HDE;
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2 ||
-        SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) tempeax >>= 1;
+     if(SiS_Pr->SiS_LCDResInfo == Panel_640x480_2 ||
+        SiS_Pr->SiS_LCDResInfo == Panel_640x480_3) tempeax >>= 1;
      tempeax <<= 2;                       			/* BDxFIFOSTOP = (HDE*4)/128 */
      tempebx = 128;
      temp = (USHORT)(tempeax % tempebx);
@@ -6472,8 +5977,8 @@
      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x3C,~0x040,0x00);
 
      tempax = SiS_Pr->SiS_HDE;
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2 ||
-        SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) tempax >>= 1;
+     if(SiS_Pr->SiS_LCDResInfo == Panel_640x480_2 ||
+        SiS_Pr->SiS_LCDResInfo == Panel_640x480_3) tempax >>= 1;
      tempax >>= 4;                        			/* BDxWadroff = HDE*4/8/8 */
      pushcx = tempax;
      temp = tempax & 0x00FF;
@@ -6482,8 +5987,8 @@
      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x44,~0x0F8,temp);
 
      tempax = SiS_Pr->SiS_VDE;                             	/* BDxWadrst1 = BDxWadrst0 + BDxWadroff * VDE */
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_2 ||
-        SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480_3) tempax >>= 1;
+     if(SiS_Pr->SiS_LCDResInfo == Panel_640x480_2 ||
+        SiS_Pr->SiS_LCDResInfo == Panel_640x480_3) tempax >>= 1;
      tempeax = (tempax * pushcx);
      tempebx = 0x00100000 + tempeax;
      temp = (USHORT)tempebx & 0x000000FF;
@@ -6525,496 +6030,380 @@
      }
   }
 #endif  /* SIS315H */
-
 }
 
-/************** Set Part 1 ***************/
+/* Set Part 1 */
 static void
 SiS_SetGroup1(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
               PSIS_HW_INFO HwInfo, USHORT RefreshRateTableIndex)
 {
-  UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
-  USHORT  temp=0, tempax=0, tempbx=0, tempcx=0;
-  USHORT  pushbx=0, CRT1Index=0;
+#if defined(SIS300) || defined(SIS315H)
+  UCHAR   *ROMAddr = HwInfo->pjVirtualRomBase;
+#endif
+  USHORT  temp=0, tempax=0, tempbx=0, tempcx=0, bridgeadd=0;
+  USHORT  pushbx=0, CRT1Index=0, modeflag, resinfo=0;
 #ifdef SIS315H
   USHORT  tempbl=0;
 #endif
-  USHORT  modeflag, resinfo=0;
+
+  if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
+     SiS_SetGroup1_LVDS(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, RefreshRateTableIndex);
+     return;
+  }
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
+  } else if(SiS_Pr->UseCustomMode) {
+     modeflag = SiS_Pr->CModeFlag;
   } else {
-     if(SiS_Pr->UseCustomMode) {
-	modeflag = SiS_Pr->CModeFlag;
-     } else {
-    	CRT1Index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
-    	resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
-	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-     }
+     CRT1Index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
+     resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
   }
 
-  if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
-
-#ifdef SIS315H
-     SiS_SetCRT2Sync(SiS_Pr, ModeNo, RefreshRateTableIndex, HwInfo);
-     SiS_SetGroup1_LCDA(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, RefreshRateTableIndex);
-#endif
-
-  } else {
+  SiS_SetCRT2Offset(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
 
-     if( (HwInfo->jChipType >= SIS_315H) &&
+  if( ! ((HwInfo->jChipType >= SIS_315H) &&
          (SiS_Pr->SiS_IF_DEF_LVDS == 1) &&
-	 (SiS_Pr->SiS_VBInfo & SetInSlaveMode) ) {
-
-        SiS_SetCRT2Sync(SiS_Pr, ModeNo, RefreshRateTableIndex, HwInfo);
-
-     } else {
-
-        SiS_SetCRT2Offset(SiS_Pr, ModeNo, ModeIdIndex,
-      		          RefreshRateTableIndex, HwInfo);
+         (SiS_Pr->SiS_VBInfo & SetInSlaveMode)) ) {
 
-        if (HwInfo->jChipType < SIS_315H ) {
+     if(HwInfo->jChipType < SIS_315H ) {
 #ifdef SIS300
-    	      SiS_SetCRT2FIFO_300(SiS_Pr, ModeNo, HwInfo);
+  	SiS_SetCRT2FIFO_300(SiS_Pr, ModeNo, HwInfo);
 #endif
-        } else {
+     } else {
 #ifdef SIS315H
-              SiS_SetCRT2FIFO_310(SiS_Pr);
+        SiS_SetCRT2FIFO_310(SiS_Pr, HwInfo);
 #endif
-	}
-
-        SiS_SetCRT2Sync(SiS_Pr, ModeNo, RefreshRateTableIndex, HwInfo);
+     }
 
-	/* 1. Horizontal setup */
+     /* 1. Horizontal setup */
 
-        if(HwInfo->jChipType < SIS_315H ) {
+     if(HwInfo->jChipType < SIS_315H ) {
 
 #ifdef SIS300   /* ------------- 300 series --------------*/
 
-    		temp = (SiS_Pr->SiS_VGAHT - 1) & 0x0FF;   			/* BTVGA2HT 0x08,0x09 */
-    		SiS_SetReg(SiS_Pr->SiS_Part1Port,0x08,temp);                   /* CRT2 Horizontal Total */
+    	temp = (SiS_Pr->SiS_VGAHT - 1) & 0x0FF;   		  /* BTVGA2HT 0x08,0x09 */
+    	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x08,temp);              /* CRT2 Horizontal Total */
 
-    		temp = (((SiS_Pr->SiS_VGAHT - 1) & 0xFF00) >> 8) << 4;
-    		SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x09,0x0f,temp);          /* CRT2 Horizontal Total Overflow [7:4] */
+    	temp = (((SiS_Pr->SiS_VGAHT - 1) & 0xFF00) >> 8) << 4;
+    	SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x09,0x0f,temp);    /* CRT2 Horizontal Total Overflow [7:4] */
 
-    		temp = (SiS_Pr->SiS_VGAHDE + 12) & 0x0FF;                       /* BTVGA2HDEE 0x0A,0x0C */
-    		SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0A,temp);                   /* CRT2 Horizontal Display Enable End */
+    	temp = (SiS_Pr->SiS_VGAHDE + 12) & 0x0FF;                 /* BTVGA2HDEE 0x0A,0x0C */
+    	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0A,temp);              /* CRT2 Horizontal Display Enable End */
 
-    		pushbx = SiS_Pr->SiS_VGAHDE + 12;                               /* bx  BTVGA@HRS 0x0B,0x0C */
-    		tempcx = (SiS_Pr->SiS_VGAHT - SiS_Pr->SiS_VGAHDE) >> 2;
-    		tempbx = pushbx + tempcx;
-    		tempcx <<= 1;
-    		tempcx += tempbx;
-
-    		if(SiS_Pr->SiS_VBType & VB_SISVB) {
-
-		   if(SiS_Pr->UseCustomMode) {
-		      tempbx = SiS_Pr->CHSyncStart + 12;
-		      tempcx = SiS_Pr->CHSyncEnd + 12;
-		   }
+	pushbx = SiS_Pr->SiS_VGAHDE + 12;                         /* bx  BTVGA2HRS 0x0B,0x0C */
+    	tempcx = (SiS_Pr->SiS_VGAHT - SiS_Pr->SiS_VGAHDE) >> 2;
+    	tempbx = pushbx + tempcx;
+    	tempcx <<= 1;
+    	tempcx += tempbx;
 
-      		   if(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) {
-		      unsigned char cr4, cr14, cr5, cr15;
-		      if(SiS_Pr->UseCustomMode) {
-		         cr4  = SiS_Pr->CCRT1CRTC[4];
-			 cr14 = SiS_Pr->CCRT1CRTC[14];
-			 cr5  = SiS_Pr->CCRT1CRTC[5];
-			 cr15 = SiS_Pr->CCRT1CRTC[15];
-		      } else {
-		         cr4  = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[4];
-			 cr14 = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[14];
-			 cr5  = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[5];
-			 cr15 = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[15];
-		      }
-        	      tempbx = ((cr4 | ((cr14 & 0xC0) << 2)) - 1) << 3;
-        	      tempcx = (((cr5 & 0x1F) | ((cr15 & 0x04) << (6-2))) - 1) << 3;
-      		   }
-
-    		   if((SiS_Pr->SiS_VBInfo & SetCRT2ToTV) && (resinfo == SIS_RI_1024x768)){
-        	      if(!(SiS_Pr->SiS_TVMode & TVSetPAL)){
-      			 tempbx = 1040;
-      			 tempcx = 1042;
-      		      }
-    		   }
-	        }
+	bridgeadd = 12;
 
-    		temp = tempbx & 0x00FF;
-    		SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0B,temp);                   /* CRT2 Horizontal Retrace Start */
 #endif /* SIS300 */
 
- 	} else {
+     } else {
 
 #ifdef SIS315H  /* ------------------- 315/330 series --------------- */
 
-	        tempcx = SiS_Pr->SiS_VGAHT;				       /* BTVGA2HT 0x08,0x09 */
-		if(modeflag & HalfDCLK) {
-		    if(SiS_Pr->SiS_VBType & VB_SISVB) {
-		       tempcx >>= 1;
-		    } else {
-		       tempax = SiS_Pr->SiS_VGAHDE >> 1;
-		       tempcx = SiS_Pr->SiS_HT - SiS_Pr->SiS_HDE + tempax;
-		       if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-			  tempcx = SiS_Pr->SiS_HT - tempax;
-		       }
-		    }
-		}
-		tempcx--;
+	tempcx = SiS_Pr->SiS_VGAHT;				  /* BTVGA2HT 0x08,0x09 */
+	if(modeflag & HalfDCLK) {
+	   if(SiS_Pr->SiS_VBType & VB_SISVB) {
+	      tempcx >>= 1;
+	   } else {
+	      tempax = SiS_Pr->SiS_VGAHDE >> 1;
+	      tempcx = SiS_Pr->SiS_HT - SiS_Pr->SiS_HDE + tempax;
+	      if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+	         tempcx = SiS_Pr->SiS_HT - tempax;
+	      }
+	   }
+	}
+	tempcx--;
+	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x08,tempcx);            /* CRT2 Horizontal Total */
+	temp = (tempcx >> 4) & 0xF0;
+	SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x09,0x0F,temp);    /* CRT2 Horizontal Total Overflow [7:4] */
 
-		temp = tempcx & 0xff;
-		SiS_SetReg(SiS_Pr->SiS_Part1Port,0x08,temp);                  /* CRT2 Horizontal Total */
+	tempcx = SiS_Pr->SiS_VGAHT;				  /* BTVGA2HDEE 0x0A,0x0C */
+	tempbx = SiS_Pr->SiS_VGAHDE;
+	tempcx -= tempbx;
+	tempcx >>= 2;
+	if(modeflag & HalfDCLK) {
+	   tempbx >>= 1;
+	   tempcx >>= 1;
+	}
+	tempbx += 16;
 
-		temp = ((tempcx & 0xff00) >> 8) << 4;
-		SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x09,0x0F,temp);         /* CRT2 Horizontal Total Overflow [7:4] */
+	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0A,tempbx);            /* CRT2 Horizontal Display Enable End */
 
-		tempcx = SiS_Pr->SiS_VGAHT;				       /* BTVGA2HDEE 0x0A,0x0C */
-		tempbx = SiS_Pr->SiS_VGAHDE;
-		tempcx -= tempbx;
-		tempcx >>= 2;
-		if(modeflag & HalfDCLK) {
-		   tempbx >>= 1;
-		   tempcx >>= 1;
-		}
-		tempbx += 16;
+	pushbx = tempbx;
+	tempcx >>= 1;
+	tempbx += tempcx;
+	tempcx += tempbx;
 
-		temp = tempbx & 0xff;
-		SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0A,temp);                  /* CRT2 Horizontal Display Enable End */
+	bridgeadd = 16;
 
-		pushbx = tempbx;
-		tempcx >>= 1;
-		tempbx += tempcx;
-		tempcx += tempbx;
-
-		if(SiS_Pr->SiS_VBType & VB_SISVB) {
-
-		   if(HwInfo->jChipType >= SIS_661) {
-		      if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) ||
-		         (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024)) {
-			 if(resinfo == SIS_RI_1280x1024) {
-		            tempcx = 0x30;
-			 } else if(resinfo == SIS_RI_1600x1200) {
-			    tempcx = 0xff;
-			 }
-		      }
-		   }
+	if(SiS_Pr->SiS_VBType & VB_SISVB) {
+	   if(HwInfo->jChipType >= SIS_661) {
+	      if((SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) ||
+		 (SiS_Pr->SiS_LCDResInfo == Panel_1280x1024)) {
+		 if(resinfo == SIS_RI_1280x1024) {
+		    tempcx = (tempcx & 0xff00) | 0x30;
+		 } else if(resinfo == SIS_RI_1600x1200) {
+		    tempcx = (tempcx & 0xff00) | 0xff;
+		 }
+	      }
+	   }
+        }
 
-		   if(SiS_Pr->UseCustomMode) {
-		      tempbx = SiS_Pr->CHSyncStart + 16;
-		      tempcx = SiS_Pr->CHSyncEnd + 16;
-		      tempax = SiS_Pr->SiS_VGAHT;
-		      if(modeflag & HalfDCLK) tempax >>= 1;
-		      tempax--;
-		      if(tempcx > tempax)  tempcx = tempax;
-		   }
+#endif  /* SIS315H */
 
-             	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) {
-		      unsigned char cr4, cr14, cr5, cr15;
-		      if(SiS_Pr->UseCustomMode) {
-		         cr4  = SiS_Pr->CCRT1CRTC[4];
-			 cr14 = SiS_Pr->CCRT1CRTC[14];
-			 cr5  = SiS_Pr->CCRT1CRTC[5];
-			 cr15 = SiS_Pr->CCRT1CRTC[15];
-		      } else {
-		         cr4  = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[4];
-			 cr14 = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[14];
-			 cr5  = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[5];
-			 cr15 = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[15];
-		      }
-                      tempbx = ((cr4 | ((cr14 & 0xC0) << 2)) - 3) << 3; 		/* (VGAHRS-3)*8 */
-                      tempcx = (((cr5 & 0x1f) | ((cr15 & 0x04) << (5-2))) - 3) << 3; 	/* (VGAHRE-3)*8 */
-		      tempcx &= 0x00FF;
-		      tempcx |= (tempbx & 0xFF00);
-                      tempbx += 16;
-                      tempcx += 16;
-		      tempax = SiS_Pr->SiS_VGAHT;
-		      if(modeflag & HalfDCLK) tempax >>= 1;
-		      tempax--;
-		      if(tempcx > tempax)  tempcx = tempax;
-             	   }
-
-		   if(SiS_Pr->SiS_TVMode & TVSetNTSC1024) {
-      		      tempbx = 1040;
-      		      tempcx = 1042;
-      	     	   }
+     }  /* 315/330 series */
 
-                }
+     if(SiS_Pr->SiS_VBType & VB_SISVB) {
 
-		temp = tempbx & 0xff;
-	 	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0B,temp);                 /* CRT2 Horizontal Retrace Start */
-#endif  /* SIS315H */
+        if(SiS_Pr->UseCustomMode) {
+	   tempbx = SiS_Pr->CHSyncStart + bridgeadd;
+	   tempcx = SiS_Pr->CHSyncEnd + bridgeadd;
+	   tempax = SiS_Pr->SiS_VGAHT;
+	   if(modeflag & HalfDCLK) tempax >>= 1;
+	   tempax--;
+	   if(tempcx > tempax) tempcx = tempax;
+	}
+
+	if(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) {
+	   unsigned char cr4, cr14, cr5, cr15;
+	   if(SiS_Pr->UseCustomMode) {
+	      cr4  = SiS_Pr->CCRT1CRTC[4];
+	      cr14 = SiS_Pr->CCRT1CRTC[14];
+	      cr5  = SiS_Pr->CCRT1CRTC[5];
+	      cr15 = SiS_Pr->CCRT1CRTC[15];
+	   } else {
+	      cr4  = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[4];
+	      cr14 = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[14];
+	      cr5  = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[5];
+	      cr15 = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[15];
+	   }
+           tempbx = ((cr4 | ((cr14 & 0xC0) << 2)) - 3) << 3; 		    /* (VGAHRS-3)*8 */
+           tempcx = (((cr5 & 0x1f) | ((cr15 & 0x04) << (5-2))) - 3) << 3;   /* (VGAHRE-3)*8 */
+	   tempcx &= 0x00FF;
+	   tempcx |= (tempbx & 0xFF00);
+           tempbx += bridgeadd;
+           tempcx += bridgeadd;
+	   tempax = SiS_Pr->SiS_VGAHT;
+	   if(modeflag & HalfDCLK) tempax >>= 1;
+	   tempax--;
+	   if(tempcx > tempax) tempcx = tempax;
+        }
 
-     	}  /* 315/330 series */
+        if(SiS_Pr->SiS_TVMode & TVSetNTSC1024) {
+      	   tempbx = 1040;
+      	   tempcx = 1044;   /* HWCursor bug! */
+        }
 
-  	/* The following is done for all bridge/chip types/series */
+     }
 
-  	tempax = tempbx & 0xFF00;
-  	tempbx = pushbx;
-  	tempbx = (tempbx & 0x00FF) | ((tempbx & 0xFF00) << 4);
-  	tempax |= (tempbx & 0xFF00);
-  	temp = (tempax & 0xFF00) >> 8;
-  	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0C,temp);                        /* Overflow */
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0B,tempbx);            	  /* CRT2 Horizontal Retrace Start */
 
-  	temp = tempcx & 0x00FF;
-  	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0D,temp);                        /* CRT2 Horizontal Retrace End */
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0D,tempcx);               /* CRT2 Horizontal Retrace End */
 
-  	/* 2. Vertical setup */
+     temp = ((tempbx >> 8) & 0x0F) | ((pushbx >> 4) & 0xF0);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0C,temp);		  /* Overflow */
 
-  	tempcx = SiS_Pr->SiS_VGAVT - 1;
-  	temp = tempcx & 0x00FF;
+     /* 2. Vertical setup */
 
-	if(HwInfo->jChipType < SIS_661) {
-           if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-	      if(HwInfo->jChipType < SIS_315H) {
-	         if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
-	            if(SiS_Pr->SiS_VBInfo & (SetCRT2ToSVIDEO | SetCRT2ToAVIDEO)) {
-	               temp--;
-	            }
-                 }
-	      } else {
- 	         temp--;
+     tempcx = SiS_Pr->SiS_VGAVT - 1;
+     temp = tempcx & 0x00FF;
+
+     if(HwInfo->jChipType < SIS_661) {
+        if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
+	   if(HwInfo->jChipType < SIS_315H) {
+	      if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
+	         if(SiS_Pr->SiS_VBInfo & (SetCRT2ToSVIDEO | SetCRT2ToAVIDEO)) {
+	            temp--;
+	         }
               }
-           } else if(HwInfo->jChipType >= SIS_315H) {
-	      temp--;
-	   }
+	   } else {
+ 	      temp--;
+           }
+        } else if(HwInfo->jChipType >= SIS_315H) {
+	   temp--;
 	}
-  	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0E,temp);                        /* CRT2 Vertical Total */
+     }
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0E,temp);                 /* CRT2 Vertical Total */
 
-  	tempbx = SiS_Pr->SiS_VGAVDE - 1;
-  	temp = tempbx & 0x00FF;
-  	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0F,temp);                        /* CRT2 Vertical Display Enable End */
-
-  	temp = ((tempbx & 0xFF00) << 3) >> 8;
-  	temp |= ((tempcx & 0xFF00) >> 8);
-  	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x12,temp);                        /* Overflow (and HWCursor Test Mode) */
-
-	if((HwInfo->jChipType >= SIS_315H) && (HwInfo->jChipType < SIS_661)) {
-           tempbx++;
-   	   tempax = tempbx;
-	   tempcx++;
-	   tempcx -= tempax;
-	   tempcx >>= 2;
-	   tempbx += tempcx;
-	   if(tempcx < 4) tempcx = 4;
-	   tempcx >>= 2;
-	   tempcx += tempbx;
-	   tempcx++;
-	} else {
-  	   tempbx = (SiS_Pr->SiS_VGAVT + SiS_Pr->SiS_VGAVDE) >> 1;                 /*  BTVGA2VRS     0x10,0x11   */
-  	   tempcx = ((SiS_Pr->SiS_VGAVT - SiS_Pr->SiS_VGAVDE) >> 4) + tempbx + 1;  /*  BTVGA2VRE     0x11        */
-	}
+     tempbx = SiS_Pr->SiS_VGAVDE - 1;
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x0F,tempbx);               /* CRT2 Vertical Display Enable End */
 
-  	if(SiS_Pr->SiS_VBType & VB_SISVB) {
+     temp = ((tempbx >> 5) & 0x38) | ((tempcx >> 8) & 0x07);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x12,temp);                 /* Overflow */
+
+     if((HwInfo->jChipType >= SIS_315H) && (HwInfo->jChipType < SIS_661)) {
+        tempbx++;
+   	tempax = tempbx;
+	tempcx++;
+	tempcx -= tempax;
+	tempcx >>= 2;
+	tempbx += tempcx;
+	if(tempcx < 4) tempcx = 4;
+	tempcx >>= 2;
+	tempcx += tempbx;
+	tempcx++;
+     } else {
+  	tempbx = (SiS_Pr->SiS_VGAVT + SiS_Pr->SiS_VGAVDE) >> 1;                 /*  BTVGA2VRS     0x10,0x11   */
+  	tempcx = ((SiS_Pr->SiS_VGAVT - SiS_Pr->SiS_VGAVDE) >> 4) + tempbx + 1;  /*  BTVGA2VRE     0x11        */
+     }
 
+     if(SiS_Pr->SiS_VBType & VB_SISVB) {
+	if(SiS_Pr->UseCustomMode) {
+	   tempbx = SiS_Pr->CVSyncStart;
+	   tempcx = SiS_Pr->CVSyncEnd;
+	}
+        if(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) {
+	   unsigned char cr8, cr7, cr13;
 	   if(SiS_Pr->UseCustomMode) {
-	      tempbx = SiS_Pr->CVSyncStart;
-	      tempcx = (tempcx & 0xFF00) | (SiS_Pr->CVSyncEnd & 0x00FF);
-	   }
+	      cr8    = SiS_Pr->CCRT1CRTC[8];
+	      cr7    = SiS_Pr->CCRT1CRTC[7];
+	      cr13   = SiS_Pr->CCRT1CRTC[13];
+	      tempcx = SiS_Pr->CCRT1CRTC[9];
+	   } else {
+	      cr8    = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[8];
+	      cr7    = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[7];
+	      cr13   = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[13];
+	      tempcx = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[9];
+	   }
+      	   tempbx = cr8;
+      	   if(cr7  & 0x04) tempbx |= 0x0100;
+      	   if(cr7  & 0x80) tempbx |= 0x0200;
+      	   if(cr13 & 0x08) tempbx |= 0x0400;
+       	}
+     }
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x10,tempbx);               /* CRT2 Vertical Retrace Start */
 
-    	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) {
-	      unsigned char cr8, cr7, cr13, cr9;
-	      if(SiS_Pr->UseCustomMode) {
-	         cr8  = SiS_Pr->CCRT1CRTC[8];
-		 cr7  = SiS_Pr->CCRT1CRTC[7];
-		 cr13 = SiS_Pr->CCRT1CRTC[13];
-		 cr9  = SiS_Pr->CCRT1CRTC[9];
-	      } else {
-	         cr8  = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[8];
-		 cr7  = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[7];
-		 cr13 = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[13];
-		 cr9  = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[9];
-	      }
-      	      tempbx = cr8;
-      	      if(cr7 & 0x04)  tempbx |= 0x0100;
-      	      if(cr7 & 0x80)  tempbx |= 0x0200;
-      	      if(cr13 & 0x08) tempbx |= 0x0400;
-      	      tempcx = (tempcx & 0xFF00) | (cr9 & 0x00FF);
-    	   }
-  	}
-  	temp = tempbx & 0x00FF;
-  	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x10,temp);           /* CRT2 Vertical Retrace Start */
-
-  	temp = ((tempbx & 0xFF00) >> 8) << 4;
-  	temp |= (tempcx & 0x000F);
-  	SiS_SetReg(SiS_Pr->SiS_Part1Port,0x11,temp);           /* CRT2 Vert. Retrace End; Overflow; "Enable CRTC Check" */
+     temp = ((tempbx >> 4) & 0x70) | (tempcx & 0x0F);
+     SiS_SetReg(SiS_Pr->SiS_Part1Port,0x11,temp);                 /* CRT2 Vert. Retrace End; Overflow */
 
-  	/* 3. Panel compensation delay */
+     /* 3. Panel delay compensation */
 
-  	if(HwInfo->jChipType < SIS_315H) {
+     if(HwInfo->jChipType < SIS_315H) {
 
 #ifdef SIS300  /* ---------- 300 series -------------- */
 
-	   if(SiS_Pr->SiS_VBType & VB_SISVB) {
-	        temp = 0x20;
+	if(SiS_Pr->SiS_VBType & VB_SISVB) {
+	   temp = 0x20;
+	   if(HwInfo->jChipType == SIS_300) {
+	      temp = 0x10;
+	      if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768)  temp = 0x2c;
+	      if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) temp = 0x20;
+	   }
+	   if(SiS_Pr->SiS_VBType & VB_SIS301) {
+	      if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) temp = 0x20;
+	   }
+	   if(SiS_Pr->SiS_LCDResInfo == Panel_1280x960)     temp = 0x24;
+	   if(SiS_Pr->SiS_LCDResInfo == Panel_Custom)       temp = 0x2c;
+	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) 	    temp = 0x08;
+	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
+      	      if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) 	    temp = 0x2c;
+      	      else 					    temp = 0x20;
+    	   }
+	   if(SiS_Pr->SiS_UseROM) {
+	      if(ROMAddr[0x220] & 0x80) {
+	         if(SiS_Pr->SiS_VBInfo & SetCRT2ToTVNoYPbPrHiVision)
+	   	    temp = ROMAddr[0x221];
+		 else if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision)
+		    temp = ROMAddr[0x222];
+		 else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024)
+		    temp = ROMAddr[0x223];
+		 else
+		    temp = ROMAddr[0x224];
+		 temp &= 0x3c;
+	      }
+	   }
+	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+	      if(SiS_Pr->PDC != -1)  temp = SiS_Pr->PDC & 0x3c;
+	   }
 
-		if(HwInfo->jChipType == SIS_300) {
-		   temp = 0x10;
-		   if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)  temp = 0x2c;
-		   if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) temp = 0x20;
-		}
-		if(SiS_Pr->SiS_VBType & VB_SIS301) {
-		   if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) temp = 0x20;
-		}
-		if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x960)     temp = 0x24;
-		if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom)       temp = 0x2c;
-		if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) 		temp = 0x08;
-		if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
-      		   if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) 	temp = 0x2c;
-      		   else 					temp = 0x20;
-    	        }
-		if((ROMAddr) && (SiS_Pr->SiS_UseROM)) {
-		    if(ROMAddr[0x220] & 0x80) {
-		        if(SiS_Pr->SiS_VBInfo & SetCRT2ToTVNoYPbPrHiVision)
-				temp = ROMAddr[0x221];
-			else if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision)
-				temp = ROMAddr[0x222];
-		        else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024)
-				temp = ROMAddr[0x223];
-			else
-				temp = ROMAddr[0x224];
-			temp &= 0x3c;
-		    }
-		}
-		if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-		   if(SiS_Pr->PDC) {
-			temp = SiS_Pr->PDC & 0x3c;
-		   }
-		}
-	   } else {
-	        temp = 0x20;
-		if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {
-		   if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480) temp = 0x04;
-		}
-		if((ROMAddr) && SiS_Pr->SiS_UseROM) {
-		    if(ROMAddr[0x220] & 0x80) {
-		        temp = ROMAddr[0x220] & 0x3c;
-		    }
-		}
-		if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-		   if(SiS_Pr->PDC) {
-		      temp = SiS_Pr->PDC & 0x3c;
-		   }
-		}
+	} else {
+	   temp = 0x20;
+	   if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {
+	      if(SiS_Pr->SiS_LCDResInfo == Panel_640x480) temp = 0x04;
+	   }
+	   if(SiS_Pr->SiS_UseROM) {
+	      if(ROMAddr[0x220] & 0x80) {
+	         temp = ROMAddr[0x220] & 0x3c;
+	      }
 	   }
+	   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+	      if(SiS_Pr->PDC != -1) temp = SiS_Pr->PDC & 0x3c;
+	   }
+        }
 
-    	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x03C,temp);         /* Panel Link Delay Compensation; (Software Command Reset; Power Saving) */
+    	SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp);   /* Panel Link Delay Compensation; (Software Command Reset; Power Saving) */
 
 #endif  /* SIS300 */
 
-  	} else {
+     } else {
 
 #ifdef SIS315H   /* --------------- 315/330 series ---------------*/
 
-   	   if(HwInfo->jChipType < SIS_661) {
-
-	      if(SiS_Pr->SiS_VBType & VB_SISVB) {
+        if(HwInfo->jChipType < SIS_661) {
 
-                 temp = 0x10;
-                 if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)  temp = 0x2c;
-    	         if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) temp = 0x20;
-    	         if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x960)  temp = 0x24;
-		 if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom)    temp = 0x2c;
-		 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-		    temp = 0x08;
-		    if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
-		       if(SiS_Pr->SiS_VBInfo & SetInSlaveMode)  temp = 0x2c;
-      		       else 					temp = 0x20;
-		    }
-		 }
-		 if((SiS_Pr->SiS_VBType & VB_SIS301B302B) && (!(SiS_Pr->SiS_VBType & VB_NoLCD))) {
-		    tempbl = 0x00;
-		    if((ROMAddr) && (SiS_Pr->SiS_UseROM)) {
-		       if(HwInfo->jChipType < SIS_330) {
-		          if(ROMAddr[0x13c] & 0x80) tempbl = 0xf0;
-		       } else {
-		          if(ROMAddr[0x1bc] & 0x80) tempbl = 0xf0;
-		       }
-		    }
-		 } else {  /* LV (550/301LV checks ROM byte, other LV BIOSes do not) */
-		    tempbl = 0xF0;
-		 }
-		 if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD|SetCRT2ToLCDA)) {
-		    if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
-		       if(SiS_Pr->PDC) {
-		          temp = SiS_Pr->PDC;
-		          tempbl = 0;
-		       }
-		    }
-		 }
+	   if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
 
-	      } else {  /* LVDS */
+	      if(HwInfo->jChipType == SIS_740) temp = 0x03;
+	      else 		               temp = 0x00;
 
-	         if(HwInfo->jChipType == SIS_740) {
-		    temp = 0x03;
-	         } else {
-		    temp = 0x00;
-		 }
-	 	 if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) temp = 0x0a;
-		 tempbl = 0xF0;
-		 if(HwInfo->jChipType == SIS_650) {
-		    if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
-		       if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) tempbl = 0x0F;
-		    }
+	      if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) temp = 0x0a;
+	      tempbl = 0xF0;
+	      if(HwInfo->jChipType == SIS_650) {
+		 if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
+		    if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) tempbl = 0x0F;
 		 }
+	      }
 
-		 if(SiS_Pr->SiS_IF_DEF_DSTN || SiS_Pr->SiS_IF_DEF_FSTN) {
-		    temp = 0x08;
-		    tempbl = 0;
-		    if((ROMAddr) && (SiS_Pr->SiS_UseROM)) {
-		       if(ROMAddr[0x13c] & 0x80) tempbl = 0xf0;
-		    }
+	      if(SiS_Pr->SiS_IF_DEF_DSTN || SiS_Pr->SiS_IF_DEF_FSTN) {
+		 temp = 0x08;
+		 tempbl = 0;
+		 if((SiS_Pr->SiS_UseROM) && (!(SiS_Pr->SiS_ROMNew))) {
+		    if(ROMAddr[0x13c] & 0x80) tempbl = 0xf0;
 		 }
 	      }
 
 	      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2D,tempbl,temp);	    /* Panel Link Delay Compensation */
+	   }
 
-	   } /* < 661 */
+	} /* < 661 */
 
-    	   tempax = 0;
-    	   if (modeflag & DoubleScanMode) tempax |= 0x80;
-    	   if (modeflag & HalfDCLK)       tempax |= 0x40;
-    	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2C,0x3f,tempax);
+    	tempax = 0;
+    	if(modeflag & DoubleScanMode) tempax |= 0x80;
+    	if(modeflag & HalfDCLK)       tempax |= 0x40;
+    	SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2C,0x3f,tempax);
 
 #endif  /* SIS315H */
 
-  	}
-
-     }  /* Slavemode */
+     }
 
-     if(SiS_Pr->SiS_VBType & VB_SISVB) {
+  }  /* Slavemode */
 
+  if(SiS_Pr->SiS_VBType & VB_SISVB) {
+     if((SiS_Pr->SiS_VBType & VB_NoLCD) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {
         /* For 301BDH with LCD, we set up the Panel Link */
-        if( (SiS_Pr->SiS_VBType & VB_NoLCD) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) ) {
-
-	    SiS_SetGroup1_LVDS(SiS_Pr, ModeNo, ModeIdIndex,
-	                       HwInfo, RefreshRateTableIndex);
-
-        } else if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
-
-    	    SiS_SetGroup1_301(SiS_Pr, ModeNo, ModeIdIndex,
-	                      HwInfo, RefreshRateTableIndex);
-        }
-
+	SiS_SetGroup1_LVDS(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, RefreshRateTableIndex);
+     } else if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
+    	SiS_SetGroup1_301(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, RefreshRateTableIndex);
+     }
+  } else {
+     if(HwInfo->jChipType < SIS_315H) {
+	SiS_SetGroup1_LVDS(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, RefreshRateTableIndex);
      } else {
-
-        if(HwInfo->jChipType < SIS_315H) {
-
-	   SiS_SetGroup1_LVDS(SiS_Pr, ModeNo, ModeIdIndex,
-	                        HwInfo, RefreshRateTableIndex);
+	if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
+           if((!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) || (SiS_Pr->SiS_VBInfo & SetInSlaveMode)) {
+    	      SiS_SetGroup1_LVDS(SiS_Pr, ModeNo,ModeIdIndex, HwInfo,RefreshRateTableIndex);
+           }
 	} else {
-
-	   if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
-              if((!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) || (SiS_Pr->SiS_VBInfo & SetInSlaveMode)) {
-    	          SiS_SetGroup1_LVDS(SiS_Pr, ModeNo,ModeIdIndex,
-	                              HwInfo,RefreshRateTableIndex);
-              }
-	   } else {
-	      SiS_SetGroup1_LVDS(SiS_Pr, ModeNo,ModeIdIndex,
-	                         HwInfo,RefreshRateTableIndex);
-	   }
-
+	   SiS_SetGroup1_LVDS(SiS_Pr, ModeNo,ModeIdIndex, HwInfo,RefreshRateTableIndex);
 	}
-
      }
-  } /* LCDA */
+  }
 }
 
 /*********************************************/
@@ -7025,9 +6414,8 @@
 static UCHAR *
 SiS_GetGroup2CLVXPtr(SiS_Private *SiS_Pr, int tabletype, PSIS_HW_INFO HwInfo)
 {
-   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
    const UCHAR  *tableptr = NULL;
-   USHORT a, b, p = 0;
+   USHORT       a, b, p = 0;
 
    a = SiS_Pr->SiS_VGAHDE;
    b = SiS_Pr->SiS_HDE;
@@ -7036,66 +6424,33 @@
       b = SiS_Pr->SiS_VDE;
    }
 
-   if((HwInfo->jChipType >= SIS_661) && (ROMAddr = (UCHAR *)HwInfo->pjVirtualRomBase) && SiS_Pr->SiS_UseROM) {
-
-      if(a < b) {
-         p = ROMAddr[0x278] | (ROMAddr[0x279] << 8);
-      } else if(a == b) {
-         p = ROMAddr[0x27a] | (ROMAddr[0x27b] << 8);
-      } else {
-         if(SiS_Pr->SiS_TVMode & TVSetPAL) {
-	    p = ROMAddr[0x27e] | (ROMAddr[0x27f] << 8);
-	 } else {
-	    p = ROMAddr[0x27c] | (ROMAddr[0x27d] << 8);
-	 }
-	 if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {
-	    if(SiS_Pr->SiS_TVMode & TVSetYPbPr525i) 	 p = ROMAddr[0x280] | (ROMAddr[0x281] << 8);
-	    else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) p = ROMAddr[0x282] | (ROMAddr[0x283] << 8);
-	    else 				 	 p = ROMAddr[0x284] | (ROMAddr[0x285] << 8);
-	 } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
-	    p = ROMAddr[0x286] | (ROMAddr[0x287] << 8);
-	 }
-	 do {
-	    if((ROMAddr[p] | ROMAddr[p+1] << 8) == a) break;
-	    p += 0x42;
-	 } while((ROMAddr[p] | ROMAddr[p+1] << 8) != 0xffff);
-	 if((ROMAddr[p] | ROMAddr[p+1] << 8) == 0xffff) p -= 0x42;
-      }
-      p += 2;
-      return(&ROMAddr[p]);
-
+   if(a < b) {
+      tableptr = SiS_Part2CLVX_1;
+   } else if(a == b) {
+      tableptr = SiS_Part2CLVX_2;
    } else {
-
-      if(a < b) {
-         tableptr = SiS_Part2CLVX_1;
-      } else if(a == b) {
-         tableptr = SiS_Part2CLVX_2;
+      if(SiS_Pr->SiS_TVMode & TVSetPAL) {
+	 tableptr = SiS_Part2CLVX_4;
       } else {
-         if(SiS_Pr->SiS_TVMode & TVSetPAL) {
-	    tableptr = SiS_Part2CLVX_4;
-	 } else {
-	    tableptr = SiS_Part2CLVX_3;
-	 }
-	 if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {
-	    if(SiS_Pr->SiS_TVMode & TVSetYPbPr525i) 	 tableptr = SiS_Part2CLVX_3;
-	    else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) tableptr = SiS_Part2CLVX_3;
-	    else 				         tableptr = SiS_Part2CLVX_5;
-
-	 } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
-	    tableptr = SiS_Part2CLVX_6;
-	 }
-	 do {
-	    if((tableptr[p] | tableptr[p+1] << 8) == a) break;
-	    p += 0x42;
-	 } while((tableptr[p] | tableptr[p+1] << 8) != 0xffff);
-	 if((tableptr[p] | tableptr[p+1] << 8) == 0xffff) p -= 0x42;
+	 tableptr = SiS_Part2CLVX_3;
       }
-      p += 2;
-      return((UCHAR *)&tableptr[p]);
+      if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {
+	 if(SiS_Pr->SiS_TVMode & TVSetYPbPr525i) 	tableptr = SiS_Part2CLVX_3;
+	 else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) 	tableptr = SiS_Part2CLVX_3;
+	 else 				         	tableptr = SiS_Part2CLVX_5;
+      } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
+	 tableptr = SiS_Part2CLVX_6;
+      }
+      do {
+	 if((tableptr[p] | tableptr[p+1] << 8) == a) break;
+	 p += 0x42;
+      } while((tableptr[p] | tableptr[p+1] << 8) != 0xffff);
+      if((tableptr[p] | tableptr[p+1] << 8) == 0xffff) p -= 0x42;
    }
+   p += 2;
+   return((UCHAR *)&tableptr[p]);
 }
 
-
 static void
 SiS_SetGroup2_C_ELV(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
 	      	    USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo)
@@ -7121,49 +6476,97 @@
    SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x4e,0xeb,temp);
 }
 
-static void
+static BOOLEAN
 SiS_GetCRT2Part2Ptr(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
 		    USHORT RefreshRateTableIndex,USHORT *CRT2Index,
 		    USHORT *ResIndex,PSIS_HW_INFO HwInfo)
 {
-  USHORT tempbx,tempal;
+
+  if(HwInfo->jChipType < SIS_315H) return FALSE;
 
   if(ModeNo <= 0x13)
-      	tempal = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
+     (*ResIndex) = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
   else
-      	tempal = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
+     (*ResIndex) = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
 
-  tempbx = SiS_Pr->SiS_LCDResInfo;
+  (*ResIndex) &= 0x3f;
+  (*CRT2Index) = 0;
 
-  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)      tempbx += 16;
-  else if(SiS_Pr->SiS_SetFlag & LCDVESATiming) tempbx += 32;
-
-  if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-        tempbx = 100;
-        if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)      tempbx = 101;
-  	else if(SiS_Pr->SiS_SetFlag & LCDVESATiming) tempbx = 102;
-     }
-  } else if(SiS_Pr->SiS_CustomT == CUT_CLEVO1024) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-        if(SiS_IsDualLink(SiS_Pr, HwInfo)) {
-           tempbx = 103;
-           if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)      tempbx = 104;
-  	   else if(SiS_Pr->SiS_SetFlag & LCDVESATiming) tempbx = 105;
-	}
-     }
-  } else if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-        if(SiS_Pr->SiS_SetFlag & LCDVESATiming) tempbx = 106;
+  if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
+     if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
+        (*CRT2Index) = 200;
      }
   }
 
-  *CRT2Index = tempbx;
-  *ResIndex = tempal & 0x3F;
+  if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
+        if(SiS_Pr->SiS_SetFlag & LCDVESATiming) (*CRT2Index) = 206;
+     }
+  }
+  return(((*CRT2Index) != 0));
 }
 #endif
 
 #ifdef SIS300
+static void
+SiS_Group2LCDSpecial(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo, USHORT crt2crtc)
+{
+   USHORT tempcx;
+   const UCHAR atable[] = {
+       0xc3,0x9e,0xc3,0x9e,0x02,0x02,0x02,
+       0xab,0x87,0xab,0x9e,0xe7,0x02,0x02
+   };
+
+   if(!SiS_Pr->UseCustomMode) {
+      if( ( ( (HwInfo->jChipType == SIS_630) ||
+              (HwInfo->jChipType == SIS_730) ) &&
+            (HwInfo->jChipRevision > 2) )  &&
+          (SiS_Pr->SiS_LCDResInfo == Panel_1024x768) &&
+          (!(SiS_Pr->SiS_SetFlag & LCDVESATiming))  &&
+          (!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) ) {
+         if(ModeNo == 0x13) {
+            SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,0xB9);
+            SiS_SetReg(SiS_Pr->SiS_Part2Port,0x05,0xCC);
+            SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,0xA6);
+         } else {
+            if((crt2crtc & 0x3F) == 4) {
+               SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x2B);
+               SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x13);
+               SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,0xE5);
+               SiS_SetReg(SiS_Pr->SiS_Part2Port,0x05,0x08);
+               SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,0xE2);
+            }
+         }
+      }
+
+      if(HwInfo->jChipType < SIS_315H) {
+         if(SiS_Pr->SiS_LCDTypeInfo == 0x0c) {
+            crt2crtc &= 0x1f;
+            tempcx = 0;
+            if(!(SiS_Pr->SiS_VBInfo & SetNotSimuMode)) {
+               if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
+                  tempcx += 7;
+               }
+            }
+            tempcx += crt2crtc;
+            if(crt2crtc >= 4) {
+               SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,0xff);
+            }
+
+            if(!(SiS_Pr->SiS_VBInfo & SetNotSimuMode)) {
+               if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
+                  if(crt2crtc == 4) {
+                     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x28);
+                  }
+               }
+            }
+            SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x18);
+            SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,atable[tempcx]);
+         }
+      }
+   }
+}
+
 /* For ECS A907. Highly preliminary. */
 static void
 SiS_Set300Part2Regs(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
@@ -7232,15 +6635,81 @@
 	if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750)) {
 	   if(SiS_Pr->SiS_TVMode & TVSetPALM) {
 	      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x14);
+	      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x1b);
 	   } else {
-	      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x15);
+	      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x14);  /* 15 */
+	      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x1a);  /* 1b */
+	   }
+	}
+     }
+  } else {
+     if((ModeNo == 0x38) || (ModeNo == 0x4a) || (ModeNo == 0x64) ||
+        (ModeNo == 0x52) || (ModeNo == 0x58) || (ModeNo == 0x5c)) {
+        SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x1b);  /* 21 */
+        SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x54);  /* 5a */
+     } else {
+        SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x1a);  /* 21 */
+        SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x53);  /* 5a */
+     }
+  }
+}
+
+static void
+SiS_SetGroup2_Tail(SiS_Private *SiS_Pr, USHORT ModeNo)
+{
+  USHORT temp;
+
+  if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
+     if(SiS_Pr->SiS_VGAVDE == 525) {
+	temp = 0xc3;
+	if(SiS_Pr->SiS_ModeType <= ModeVGA) {
+	   temp++;
+	   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) temp += 2;
+	}
+	SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp);
+	SiS_SetReg(SiS_Pr->SiS_Part2Port,0x30,0xb3);
+     } else if(SiS_Pr->SiS_VGAVDE == 420) {
+	temp = 0x4d;
+	if(SiS_Pr->SiS_ModeType <= ModeVGA) {
+	   temp++;
+	   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) temp++;
+	}
+	SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp);
+     }
+  }
+
+  if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) {
+	if(SiS_Pr->SiS_VBType & VB_SIS301B302B) {
+	   SiS_SetRegOR(SiS_Pr->SiS_Part2Port,0x1a,0x03);
+	   /* Not always for LV, see SetGrp2 */
+	}
+	temp = 1;
+	if(ModeNo <= 0x13) temp = 3;
+	SiS_SetReg(SiS_Pr->SiS_Part2Port,0x0b,temp);
+     }
+#if 0
+     /* 651+301C, for 1280x768 - do I really need that? */
+     if((SiS_Pr->SiS_PanelXRes == 1280) && (SiS_Pr->SiS_PanelYRes == 768)) {
+        if(SiS_Pr->SiS_VBInfo & SetSimuScanMode) {
+	   if(((SiS_Pr->SiS_HDE == 640) && (SiS_Pr->SiS_VDE == 480)) ||
+	      ((SiS_Pr->SiS_HDE == 320) && (SiS_Pr->SiS_VDE == 240))) {
+	      SiS_SetReg(SiS_Part2Port,0x01,0x2b);
+	      SiS_SetReg(SiS_Part2Port,0x02,0x13);
+	      SiS_SetReg(SiS_Part2Port,0x04,0xe5);
+	      SiS_SetReg(SiS_Part2Port,0x05,0x08);
+	      SiS_SetReg(SiS_Part2Port,0x06,0xe2);
+	      SiS_SetReg(SiS_Part2Port,0x1c,0x21);
+	      SiS_SetReg(SiS_Part2Port,0x1d,0x45);
+	      SiS_SetReg(SiS_Part2Port,0x1f,0x0b);
+	      SiS_SetReg(SiS_Part2Port,0x20,0x00);
+	      SiS_SetReg(SiS_Part2Port,0x21,0xa9);
+	      SiS_SetReg(SiS_Part2Port,0x23,0x0b);
+	      SiS_SetReg(SiS_Part2Port,0x25,0x04);
 	   }
-	   SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x1b);
 	}
      }
-  } else {
-     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x21);
-     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x5a);
+#endif
   }
 }
 
@@ -7248,37 +6717,27 @@
 SiS_SetGroup2(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,USHORT RefreshRateTableIndex,
 	      PSIS_HW_INFO HwInfo)
 {
-  USHORT      i, j, tempax, tempbx, tempcx, temp;
-  USHORT      push1, push2, modeflag, crt2crtc;
-  ULONG       longtemp, tempeax;
+  USHORT      i, j, tempax, tempbx, tempcx, tempch, tempcl, temp;
+  USHORT      push2, modeflag, crt2crtc, bridgeoffset;
+  ULONG       longtemp;
   const       UCHAR *PhasePoint;
   const       UCHAR *TimingPoint;
 #ifdef SIS315H
   USHORT      resindex, CRT2Index;
   const       SiS_Part2PortTblStruct *CRT2Part2Ptr = NULL;
-#endif
-#ifdef SIS300
-  const UCHAR atable[] = {
-       0xc3,0x9e,0xc3,0x9e,0x02,0x02,0x02,
-       0xab,0x87,0xab,0x9e,0xe7,0x02,0x02
-  };
-#endif
 
-#ifdef SIS315H   
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) return;
 #endif
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
      crt2crtc = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
+  } else if(SiS_Pr->UseCustomMode) {
+     modeflag = SiS_Pr->CModeFlag;
+     crt2crtc = 0;
   } else {
-     if(SiS_Pr->UseCustomMode) {
-        modeflag = SiS_Pr->CModeFlag;
-	crt2crtc = 0;
-     } else {
-        modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-    	crt2crtc = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
-     }
+     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+     crt2crtc = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
   }
 
   temp = 0;
@@ -7395,7 +6854,7 @@
 
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) 	tempax = 950;
   else if(SiS_Pr->SiS_TVMode & TVSetPAL)      	tempax = 520;
-  else 			            		tempax = 440;
+  else 			            		tempax = 440; /* NTSC, YPbPr 525, 750 */
 
   if( ( (!(SiS_Pr->SiS_VBInfo & SetCRT2ToTVNoHiVision)) && (SiS_Pr->SiS_VDE <= tempax) ) ||
       ( (SiS_Pr->SiS_VBInfo & SetCRT2ToTVNoHiVision) &&
@@ -7411,10 +6870,10 @@
      temp = tempax + (USHORT)TimingPoint[1];
      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,temp);
 
-     if((SiS_Pr->SiS_VBInfo & SetCRT2ToTVNoHiVision) && (SiS_Pr->SiS_VGAHDE >= 1024)) {
+     if((SiS_Pr->SiS_VBInfo & SetCRT2ToTVNoYPbPrHiVision) && (SiS_Pr->SiS_VGAHDE >= 1024)) {
         if(SiS_Pr->SiS_TVMode & TVSetPAL) {
-           SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x19);
-           SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x52);
+           SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x1b);  /* 19 */
+           SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x54);  /* 52 */
         } else {
            SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x17);
            SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x1d);
@@ -7427,199 +6886,157 @@
   if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempcx >>= 1;
   tempcx--;
   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) tempcx--;
-  temp = tempcx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1B,temp);
-  temp = (tempcx & 0xFF00) >> 8;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1D,0xF0,temp);
-
-  tempcx++;
-  if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) tempcx++;
-  tempcx >>= 1;
-
-  push1 = tempcx;
+  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1B,tempcx);
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1D,0xF0,((tempcx >> 8) & 0x0f));
 
+  tempcx = SiS_Pr->SiS_HT >> 1;
+  if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempcx >>= 1;
   tempcx += 7;
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) tempcx -= 4;
-  temp = (tempcx & 0x00FF) << 4;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x22,0x0F,temp);
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x22,0x0F,((tempcx << 4) & 0xf0));
 
-  tempbx = TimingPoint[j] | ((TimingPoint[j+1]) << 8);
+  tempbx = TimingPoint[j] | (TimingPoint[j+1] << 8);
   tempbx += tempcx;
-
-  temp = tempbx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x24,temp);
-  temp = ((tempbx & 0xFF00) >> 8) << 4;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x25,0x0F,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x24,tempbx);
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x25,0x0F,((tempbx >> 4) & 0xf0));
 
   tempbx += 8;
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
      tempbx -= 4;
      tempcx = tempbx;
   }
-  temp = (tempbx & 0x00FF) << 4;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x29,0x0F,temp);
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x29,0x0F,((tempbx << 4) & 0xf0));
 
   j += 2;
-  tempcx += ((TimingPoint[j] | ((TimingPoint[j+1]) << 8)));
-  temp = tempcx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x27,temp);
-  temp = ((tempcx & 0xFF00) >> 8) << 4;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x28,0x0F,temp);
+  tempcx += (TimingPoint[j] | (TimingPoint[j+1] << 8));
+  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x27,tempcx);
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x28,0x0F,((tempcx >> 4) & 0xf0));
 
   tempcx += 8;
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) tempcx -= 4;
-  temp = (tempcx & 0x00FF) << 4;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x2A,0x0F,temp);
-
-  tempcx = push1;
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x2A,0x0F,((tempcx << 4) & 0xf0));
 
+  tempcx = SiS_Pr->SiS_HT >> 1;
+  if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempcx >>= 1;
   j += 2;
   tempcx -= (TimingPoint[j] | ((TimingPoint[j+1]) << 8));
-  temp = (tempcx & 0x00FF) << 4;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x2D,0x0F,temp);
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x2D,0x0F,((tempcx << 4) & 0xf0));
 
   tempcx -= 11;
   if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {
      tempcx = SiS_GetVGAHT2(SiS_Pr) - 1;
   }
-  temp = tempcx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2E,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2E,tempcx);
 
   tempbx = SiS_Pr->SiS_VDE;
-  if(SiS_Pr->SiS_VGAVDE == 360) tempbx = 746;
-  if(SiS_Pr->SiS_VGAVDE == 375) tempbx = 746;
-  if(SiS_Pr->SiS_VGAVDE == 405) tempbx = 853;
-  if(HwInfo->jChipType < SIS_315H) {
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) tempbx >>= 1;
-  } else {
-     if( (SiS_Pr->SiS_VBInfo & SetCRT2ToTV) &&
-         (!(SiS_Pr->SiS_TVMode & (TVSetYPbPr525p|TVSetYPbPr750p))) ) {
-	tempbx >>= 1;
-	if(SiS_Pr->SiS_TVMode & TVSetTVSimuMode) {
-	   if(ModeNo <= 0x13) {
-	      if(crt2crtc == 1) tempbx++;
-	   }
+  if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+     if(SiS_Pr->SiS_VGAVDE == 360) tempbx = 746;
+     if(SiS_Pr->SiS_VGAVDE == 375) tempbx = 746;
+     if(SiS_Pr->SiS_VGAVDE == 405) tempbx = 853;
+  } else if( (SiS_Pr->SiS_VBInfo & SetCRT2ToTV) &&
+             (!(SiS_Pr->SiS_TVMode & (TVSetYPbPr525p|TVSetYPbPr750p))) ) {
+     tempbx >>= 1;
+     if(HwInfo->jChipType >= SIS_315H) {
+        if(SiS_Pr->SiS_TVMode & TVSetTVSimuMode) {
+	   if((ModeNo <= 0x13) && (crt2crtc == 1)) tempbx++;
 	} else if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
-	   if(crt2crtc == 4) {
-              if(SiS_Pr->SiS_ModeType <= 3) tempbx++;
+	   if(SiS_Pr->SiS_ModeType <= ModeVGA) {
+	      if(crt2crtc == 4) tempbx++;
 	   }
 	}
      }
-  }
-  tempbx -= 2;
-  temp = tempbx & 0x00FF;
-  if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
      if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
-        if((ModeNo == 0x2f) || (ModeNo == 0x5d) || (ModeNo == 0x5e)) temp++;
-     }
-  }
-
-  if(HwInfo->jChipType < SIS_661) {
-     /* From 1.10.7w - doesn't make sense */
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-        if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
-           if(!(SiS_Pr->SiS_TVMode & TVSetPAL)) {
-	      if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {   /* SetFlag?? */
-	         if(ModeNo == 0x03) temp++;
-	      }
-	   }
+        if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
+	   if((ModeNo == 0x2f) || (ModeNo == 0x5d) || (ModeNo == 0x5e)) tempbx++;
+	}
+	if(!(SiS_Pr->SiS_TVMode & TVSetPAL)) {
+	   if(ModeNo == 0x03) tempbx++; /* From 1.10.7w - doesn't make sense */
         }
      }
   }
-  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2F,temp);
+  tempbx -= 2;
+  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2F,tempbx);
 
   temp = (tempcx >> 8) & 0x0F;
-  temp |= (((tempbx >> 8) << 6) & 0xC0);
-  if(!(SiS_Pr->SiS_VBInfo & (SetCRT2ToHiVision | SetCRT2ToYPbPr525750 | SetCRT2ToSCART))) {
+  temp |= ((tempbx >> 2) & 0xC0);
+  if(SiS_Pr->SiS_VBInfo & (SetCRT2ToSVIDEO | SetCRT2ToAVIDEO)) {
      temp |= 0x10;
-     if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToSVIDEO)) temp |= 0x20;
+     if(SiS_Pr->SiS_VBInfo & SetCRT2ToAVIDEO) temp |= 0x20;
   }
   SiS_SetReg(SiS_Pr->SiS_Part2Port,0x30,temp);
 
-  if((HwInfo->jChipType > SIS_315H) && (HwInfo->jChipType < SIS_661)) {
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-        if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302LV | VB_SIS302ELV)) {
-           if( (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) ||
-               (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) ) {
-              SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x10,0x60);
-	   }
-        }
+  if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302LV | VB_SIS302ELV)) {
+     SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x10,0xdf,((tempbx & 0x0400) >> 5));
+  }
+
+#if 0
+  /* TEST qqqq */
+  if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {
+     for(i=0x01, j=0; i<=0x2D; i++, j++) {
+        SiS_SetReg(SiS_Pr->SiS_Part2Port,i,TimingPoint[j]);
+     }
+     for(i=0x39; i<=0x45; i++, j++) {
+        SiS_SetReg(SiS_Pr->SiS_Part2Port,i,TimingPoint[j]);
      }
   }
+#endif
 
   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
      tempbx = SiS_Pr->SiS_VDE;
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-        if(!(SiS_Pr->SiS_TVMode & (TVSetYPbPr525p | TVSetYPbPr750p))) {
-           tempbx >>= 1;
-	}
+     if( (SiS_Pr->SiS_VBInfo & SetCRT2ToTV) &&
+         (!(SiS_Pr->SiS_TVMode & (TVSetYPbPr525p | TVSetYPbPr750p))) ) {
+        tempbx >>= 1;
      }
      tempbx -= 3;
-     if(HwInfo->jChipType >= SIS_661) {
-        if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302LV | VB_SIS302ELV)) {  /* Why not 301B/LV? */
-           temp = 0;
-	   if(tempcx & 0x0400) temp |= 0x20;
-	   if(tempbx & 0x0400) temp |= 0x40;
-	   SiS_SetReg(SiS_Pr->SiS_Part4Port,0x10,temp);
-	}
-     }
-     tempbx &= 0x03ff;
-     temp = ((tempbx & 0xFF00) >> 8) << 5;
-     temp |= 0x18;
+     temp = ((tempbx >> 3) & 0x60) | 0x18;
      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x46,temp);
-     temp = tempbx & 0x00FF;
-     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x47,temp);
+     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x47,tempbx);
 
+     if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302LV | VB_SIS302ELV)) {
+	SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x10,0xbf,((tempbx & 0x0400) >> 4));
+     }
   }
 
   tempbx = 0;
   if(!(modeflag & HalfDCLK)) {
      if(SiS_Pr->SiS_VGAHDE >= SiS_Pr->SiS_HDE) {
         tempax = 0;
-        tempbx |= 0x2000;
+        tempbx |= 0x20;
      }
   }
 
-  tempcx = 0x0101;
+  tempch = tempcl = 0x01;
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
      if(SiS_Pr->SiS_VGAHDE >= 1024) {
         if((!(modeflag & HalfDCLK)) || (HwInfo->jChipType < SIS_315H)) {
-           tempcx = 0x1920;
+           tempch = 0x19;
+	   tempcl = 0x20;
            if(SiS_Pr->SiS_VGAHDE >= 1280) {
-              tempcx = 0x1420;
-              tempbx &= ~0x2000;
+              tempch = 0x14;
+              tempbx &= ~0x20;
            }
         }
      }
   }
 
-  if(!(tempbx & 0x2000)) {
-     if(modeflag & HalfDCLK) {
-        tempcx = (tempcx & 0xFF00) | ((tempcx << 1) & 0x00FF);
-     }
-     longtemp = (SiS_Pr->SiS_VGAHDE * ((tempcx & 0xFF00) >> 8)) / (tempcx & 0x00FF);
-     longtemp <<= 13;
-     if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-     	longtemp <<= 3;
-     }
-     tempeax = longtemp / SiS_Pr->SiS_HDE;
-     if(longtemp % SiS_Pr->SiS_HDE) tempeax++;
-     tempax = (USHORT)tempeax;
-     tempbx |= (tempax & 0x1F00);
-     tempcx = (tempax & 0xFF00) >> (8 + 5);
+  if(!(tempbx & 0x20)) {
+     if(modeflag & HalfDCLK) tempcl <<= 1;
+     longtemp = ((SiS_Pr->SiS_VGAHDE * tempch) / tempcl) << 13;
+     if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) longtemp <<= 3;
+     tempax = longtemp / SiS_Pr->SiS_HDE;
+     if(longtemp % SiS_Pr->SiS_HDE) tempax++;
+     tempbx |= ((tempax >> 8) & 0x1F);
+     tempcx = tempax >> 13;
   }
 
   SiS_SetReg(SiS_Pr->SiS_Part2Port,0x44,tempax);
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x45,0xC0,(tempbx >> 8));
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x45,0xC0,tempbx);
 
   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
 
-     temp = tempcx & 0x0007;
-     if(tempbx & 0x2000) temp = 0;
-     if((HwInfo->jChipType < SIS_661) || (!(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD))) {
-        temp |= 0x18;
-     }
-     SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x46,0xE0,temp);
+     tempcx &= 0x07;
+     if(tempbx & 0x20) tempcx = 0;
+     SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x46,0xF8,tempcx);
 
      if(SiS_Pr->SiS_TVMode & TVSetPAL) {
         tempbx = 0x0382;
@@ -7628,11 +7045,9 @@
         tempbx = 0x0369;
         tempcx = 0x0061;
      }
-     temp = (tempbx & 0x00FF) ;
-     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x4B,temp);
-     temp = (tempcx & 0x00FF) ;
-     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x4C,temp);
-     temp = (tempcx & 0x0300) >> (8 - 2);
+     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x4B,tempbx);
+     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x4C,tempcx);
+     temp = (tempcx & 0x0300) >> 6;
      temp |= ((tempbx >> 8) & 0x03);
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {
         temp |= 0x10;
@@ -7642,7 +7057,7 @@
      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x4D,temp);
 
      temp = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x43);
-     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x43,(USHORT)(temp - 3));
+     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x43,(temp - 3));
 
      SiS_SetTVSpecial(SiS_Pr, ModeNo);
 
@@ -7657,7 +7072,7 @@
   if(SiS_Pr->SiS_TVMode & TVSetPALM) {
      if(!(SiS_Pr->SiS_TVMode & TVSetNTSC1024)) {
         temp = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x01);
-        SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,temp - 1);
+        SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,(temp - 1));
      }
      SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x00,0xEF);
   }
@@ -7675,13 +7090,11 @@
   tempbx = SiS_Pr->SiS_HDE;
   if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempbx >>= 1;
   tempbx--;			         	/* RHACTE = HDE - 1 */
-  temp = tempbx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2C,temp);
-  temp = (tempbx & 0xFF00) >> 4;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x2B,0x0F,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2C,tempbx);
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x2B,0x0F,((tempbx >> 4) & 0xf0));
 
   temp = 0x01;
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
+  if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) {
      if(SiS_Pr->SiS_ModeType == ModeEGA) {
         if(SiS_Pr->SiS_VGAHDE >= 1024) {
            temp = 0x02;
@@ -7696,49 +7109,19 @@
   SiS_SetReg(SiS_Pr->SiS_Part2Port,0x0B,temp);
 
   tempbx = SiS_Pr->SiS_VDE - 1;
-  temp = tempbx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x03,temp);
-  temp = ((tempbx & 0xFF00) >> 8) & 0x07;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x0C,0xF8,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x03,tempbx);
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x0C,0xF8,((tempbx >> 8) & 0x07));
 
   tempcx = SiS_Pr->SiS_VT - 1;
-  temp = tempcx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x19,temp);
-
-  temp = ((tempcx & 0xFF00) >> 8) << 5;
-
-  /* Enable dithering; only do this for 32bpp mode */
+  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x19,tempcx);
+  temp = (tempcx >> 3) & 0xE0;
   if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) {
+     /* Enable dithering; only do this for 32bpp mode */
      if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x01) {
         temp |= 0x10;
      }
   }
-
-  /* Must do special for Compaq1280; Acer1280 OK, Clevo1400 OK, COMPAL1400 OK */
-  /* Compaq1280 panel loses sync if using CR37 sync info. */
-  if((SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {
-     if((HwInfo->jChipType >= SIS_315H) && (SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) {
-	if((SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) &&
-	   (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024)) {
-	   if(SiS_Pr->SiS_LCDInfo & LCDSync) {
-	      temp |= ((SiS_Pr->SiS_LCDInfo & 0xc0) >> 6);
-	   }
-	} else if((SiS_Pr->SiS_CustomT == CUT_CLEVO1400) &&
-	          (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050)) {
-	   temp |= 0x03;
-	} else {
-           temp |= (SiS_GetReg(SiS_Pr->SiS_P3d4,0x37) >> 6);
-	   temp |= 0x08;
-	   if(!(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit)) temp |= 0x04;
-	}
-     } else {
-        if(SiS_Pr->SiS_LCDInfo & LCDSync) {
-	   temp |= ((SiS_Pr->SiS_LCDInfo & 0xc0) >> 6);
-	}
-     }
-  }
-
-  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1A,temp);
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1A,0x0f,temp);
 
   SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x09,0xF0);
   SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x0A,0xF0);
@@ -7746,154 +7129,13 @@
   SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x17,0xFB);
   SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x18,0xDF);
 
-#if 0  /* Use the 315/330 series code for now */
-  if((HwInfo->jChipType >= SIS_661)          &&
-     (SiS_Pr->SiS_VBType & VB_SIS301LV302LV) &&
-     (ROMAddr && SiS_Pr->SiS_UseROM)) {
-
-      /* This is done for the LVDS bridges only, since
-       * the TMDS panels already work correctly with
-       * the old code. Besides, we only do that if
-       * we can get the data from the ROM, I am tired
-       * of carrying a lot of tables around.
-       */
-
-#ifdef SIS315H 							/* ------------ 661/741/760 series --------- */
-      UCHAR *myptr = NULL, myptr1 = NULL;
-
-      myptr = (UCHAR *)GetLCDPtr661(SiS_Pr, HwInfo, 6, ModeNo, ModeIdIndex, RefreshRateTableIndex);
-      myptr1 = (UCHAR *)GetLCDStructPtr661(SiS_Pr, HwInfo);
-
-      tempbx = (myptr[3] | (myptr[4] << 8)) & 0x0fff;
-      tempcx = SiS_Pr->PanelYRes;
-      if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
-         tempcx = SiS_Pr->SiS_VDE;
-      }
-
-      tempcx += tempbx;
-      if(tempcx >= SiS_Pr->SiS_VT) tempcx -= SiS_Pr->SiS_VT;
-
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x05,tempbx);
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,tempcx);
-
-      tempcx &= 0x07ff;
-      tempbx &= 0x07ff;
-      temp = (tempcx >> 8) << 3;
-      temp |= (tempbx >> 8);
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,temp);
-
-      tempbx = (myptr[4] | (myptr[5] << 8)) >> 4;
-      tempcx = myptr1[6];
-      if(SiS_Pr->SiS_LCDInfo & LCDPass11) tempcx = myptr[7];
-
-      tempcx += tempbx;
-      if(tempcx >= SiS_Pr->SiS_VT) tempcx -= SiS_Pr->SiS_VT;
-
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,tempbx);
-      temp = tempcx & 0x000f;
-      temp |= ((tempbx & 0x0f00) >> 4);
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,temp);
-
-      tempax = SiS_Pr->SiS_HT;
-      tempbx = (myptr[0] | (myptr[1] << 8)) & 0x0fff;
-      tempcx = SiS_Pr->PanelXRes;
-      if(SiS_Pr->SiS_LCDInfo & LCDPass11) tempcx = SiS_Pr->SiS_HDE;
-
-      if(SiS_IsDualLink(SiS_Pr, HwInfo)) {
-         tempax >>= 1;
-	 tempbx >>= 1;
-	 tempcx >>= 1;
-      }
-      if(SiS_Pr->SiS_VBType & VB_SIS302LV)                 tempbx++;
-      if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302ELV)) tempbx++;
-
-      tempcx += tempbx;
-      if(tempcx >= tempax) tempcx -= tempax;
-
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1f,tempbx);
-      temp = ((tempbx & 0xff00) >> 8) << 4;
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x20,temp);
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x23,tempcx);
-      temp = tempcx >> 8;
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x25,temp);
-
-      tempax = SiS_Pr->SiS_HT;
-      tempbx = (myptr[1] | (myptr[2] << 8)) >> 4;
-      tempcx = myptr1[5];
-      if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
-         tempcx = myptr[6];
-      }
-      if(SiS_IsDualLink(SiS_Pr, HwInfo)) {
-         tempax >>= 1;
-	 tempbx >>= 1;
-	 tempcx >>= 1;
-      }
-      if(SiS_Pr->SiS_VBType & VB_SIS302LV) tempbx++;
-
-      tempcx += tempbx;
-      if(tempcx >= tempax) tempcx -= tempax;
-
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1c,tempbx);
-      temp = (tempbx & 0x0f00) >> 4;
-      SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1d,0x0f,temp);
-      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x21,tempcx);
-
-      if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
-         if(SiS_Pr->SiS_VGAVDE == 525) {
-	    temp = 0xc3;
-	    if(SiS_Pr->SiS_ModeType <= ModeVGA) {
-	       temp++;
-	       if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) temp += 2;
-	    }
-	    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp);
-	    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x30,0xb3);
-	 } else if(SiS_Pr->SiS_VGAVDE == 420) {
-	    temp = 0x4d;
-	    if(SiS_Pr->SiS_ModeType <= ModeVGA) {
-	       temp++;
-	       if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) temp++;
-	    }
-	    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp);
-	 }
-      }
-
-#endif
-
-  } else
-#endif
-         if((HwInfo->jChipType >= SIS_315H)                    &&
-            (SiS_Pr->SiS_VBType & VB_SIS301LV302LV)            &&
-            ((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768)  ||
-             (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) ||
-             (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) ||
-             (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)) ) {
-
-#ifdef SIS315H 							/* ------------- 315/330 series ------------ */
-
-      SiS_GetCRT2Part2Ptr(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex,
-                          &CRT2Index, &resindex, HwInfo);
-
+#ifdef SIS315H
+  if(SiS_GetCRT2Part2Ptr(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex,
+                          			&CRT2Index, &resindex, HwInfo)) {
       switch(CRT2Index) {
-        case Panel_1024x768      : CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1024x768_1;  break;  /* "Normal" */
-        case Panel_1280x1024     : CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1280x1024_1; break;
-	case Panel_1400x1050     : CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1400x1050_1; break;
-	case Panel_1600x1200     : CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1600x1200_1; break;
-        case Panel_1024x768  + 16: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1024x768_2;  break;  /* Non-Expanding */
-        case Panel_1280x1024 + 16: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1280x1024_2; break;
-	case Panel_1400x1050 + 16: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1400x1050_2; break;
-	case Panel_1600x1200 + 16: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1600x1200_2; break;
-        case Panel_1024x768  + 32: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1024x768_3;  break;  /* VESA Timing */
-        case Panel_1280x1024 + 32: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1280x1024_3; break;
-	case Panel_1400x1050 + 32: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1400x1050_3; break;
-	case Panel_1600x1200 + 32: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1600x1200_3; break;
-	case 100:		   CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Compaq1280x1024_1; break;  /* Custom */
-	case 101:		   CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Compaq1280x1024_2; break;
-	case 102:		   CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Compaq1280x1024_3; break;
-	case 103:		   CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Clevo1024x768_1; break;    /* Custom */
-	case 104:		   CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Clevo1024x768_2; break;
-	case 105:		   CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Clevo1024x768_3; break;
-	case 106:		   CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Asus1024x768_3; break;
-	default:                   CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1024x768_3;  break;
+        case 200: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1024x768_1;   break;
+	case 206: CRT2Part2Ptr = SiS310_CRT2Part2_Asus1024x768_3;    break;
+	default:  CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1024x768_3;   break;
       }
 
       SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x01,0x80,(CRT2Part2Ptr+resindex)->CR[0]);
@@ -7910,58 +7152,34 @@
       SiS_SetReg(SiS_Pr->SiS_Part2Port,0x23,(CRT2Part2Ptr+resindex)->CR[10]);
       SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x25,0x0f,(CRT2Part2Ptr+resindex)->CR[11]);
 
-      if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
-        if(SiS_Pr->SiS_VGAVDE == 525) {
-	  temp = 0xc3;
-	  if(SiS_Pr->SiS_ModeType <= ModeVGA) {
-	     temp++;
-	     if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) temp += 2;
-	  }
-	  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp);
-	  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x30,0xb3);
-	} else if(SiS_Pr->SiS_VGAVDE == 420) {
-	  temp = 0x4d;
-	  if(SiS_Pr->SiS_ModeType <= ModeVGA) {
-	     temp++;
-	     if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) temp++;
-	  }
-	  SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp);
-	}
-     }
-
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) {
-	   /* See Sync above, 0x1a */
-	   temp = 1;
-	   if(ModeNo <= 0x13) temp = 3;
-	   SiS_SetReg(SiS_Pr->SiS_Part2Port,0x0b,temp);
-	}
-     }
-#endif
+      SiS_SetGroup2_Tail(SiS_Pr, ModeNo);
 
-  } else {   /* ------ 300 series and other bridges, other LCD resolutions ------ */
 
-      /* Using this on the 301B with an auto-expanding 1024 panel (CR37=1) makes
-       * the panel scale at modes < 1024 (no black bars); if the panel is non-expanding,
-       * the bridge scales all modes to 1024.
-       * !!! Malfunction at 640x480 and 640x400 when panel is auto-expanding - black screen !!!
-       */
+  } else {
+#endif
 
-    tempcx = SiS_Pr->SiS_VT;
-    tempbx = SiS_Pr->PanelYRes;
+    /* Checked for 1024x768, 1280x1024, 1400x1050, 1600x1200 */
+    /*             Clevo dual-link 1024x768 */
+    /* 		   Compaq 1280x1024 has HT 1696 sometimes (calculation OK, if given HT is correct)  */
+    /*		   Acer: OK, but uses different setting for VESA timing at 640/800/1024 and 640x400 */
 
     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-       tempbx = SiS_Pr->SiS_VDE - 1;
-       tempcx--;
-    }
-
-    tempax = 1;
-    if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) {
-       if(tempbx != SiS_Pr->SiS_VDE) {
-          tempax = tempbx;
-          if(tempax < SiS_Pr->SiS_VDE) {
-             tempax = 0;
-             tempcx = 0;
+       if((SiS_Pr->SiS_LCDInfo & LCDPass11) || (SiS_Pr->PanelYRes == SiS_Pr->SiS_VDE)) {
+          tempbx = SiS_Pr->SiS_VDE - 1;
+          tempcx = SiS_Pr->SiS_VT - 1;
+       } else {
+          tempbx = SiS_Pr->SiS_VDE + ((SiS_Pr->PanelYRes - SiS_Pr->SiS_VDE) / 2);
+	  tempcx = SiS_Pr->SiS_VT - ((SiS_Pr->PanelYRes - SiS_Pr->SiS_VDE) / 2);
+       }
+    } else {
+       tempbx = SiS_Pr->PanelYRes;
+       tempcx = SiS_Pr->SiS_VT;
+       tempax = 1;
+       if(SiS_Pr->PanelYRes != SiS_Pr->SiS_VDE) {
+          tempax = SiS_Pr->PanelYRes;
+	  /* if(SiS_Pr->SiS_VGAVDE == 525) tempax += 0x3c;   */  /* 651+301C */
+          if(SiS_Pr->PanelYRes < SiS_Pr->SiS_VDE) {
+             tempax = tempcx = 0;
           } else {
              tempax -= SiS_Pr->SiS_VDE;
           }
@@ -7971,29 +7189,55 @@
        tempbx -= tempax; /* lcdvdee */
     }
 
-    /* Non-expanding: lcdvdees = tempcx = VT-1; lcdvdee = tempbx = VDE-1 */
+    /* Non-expanding: lcdvdes = tempcx = VT-1; lcdvdee = tempbx = VDE-1 */
 
 #ifdef TWDEBUG
     xf86DrvMsg(0, X_INFO, "lcdvdes 0x%x lcdvdee 0x%x\n", tempcx, tempbx);
 #endif
 
-    temp = tempcx & 0x00FF;   				/* RVEQ1EQ=lcdvdes */
-    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x05,temp);
-    temp = tempbx & 0x00FF;   				/* RVEQ2EQ=lcdvdee */
-    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,temp);
+    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x05,tempcx);	/* lcdvdes  */
+    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,tempbx);	/* lcdvdee  */
 
-    temp = ((tempbx & 0xFF00) >> 8) << 3;
-    temp |= ((tempcx & 0xFF00) >> 8);
+    temp = (tempbx >> 5) & 0x38;
+    temp |= ((tempcx >> 8) & 0x07);
     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,temp);
 
-    tempbx = SiS_Pr->SiS_VT;    /* push2; */
-    tempax = SiS_Pr->SiS_VDE;   /* push1; */
-    tempcx = (tempbx - tempax) >> 4;
-    tempbx += tempax;
-    tempbx >>= 1;
-    if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx -= 10;
+    tempax = SiS_Pr->SiS_VDE;
+    if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {
+       tempax = SiS_Pr->PanelYRes;
+    }
+    tempcx = (SiS_Pr->SiS_VT - tempax) >> 4;
+    if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {
+       if(SiS_Pr->PanelYRes != SiS_Pr->SiS_VDE) {
+	  tempcx = (SiS_Pr->SiS_VT - tempax) / 10;
+       }
+    }
+
+    tempbx = ((SiS_Pr->SiS_VT + SiS_Pr->SiS_VDE) >> 1) - 1;
+    if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+       if(SiS_Pr->PanelYRes != SiS_Pr->SiS_VDE) {
+          if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) { /* ? */
+             tempax = SiS_Pr->SiS_VT - SiS_Pr->PanelYRes;
+	     if(tempax % 4) { tempax >>= 2; tempax++; }
+	     else           { tempax >>= 2;           }
+             tempbx -= (tempax - 1);
+	  } else {
+	     tempbx -= 10;
+	     if(tempbx <= SiS_Pr->SiS_VDE) tempbx = SiS_Pr->SiS_VDE + 1;
+	  }
+       }
+    }
+    if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
+       tempbx++;
+       if((!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) || (crt2crtc == 6)) {
+          if(SiS_Pr->SiS_SetFlag & LCDVESATiming) {
+	     tempbx = 770;
+	     tempcx = 3;
+	  }
+       }
+    }
 
-    /* non-expanding: lcdvrs = tempbx = ((VT + VDE) / 2) - 10 */
+    /* non-expanding: lcdvrs = ((VT + VDE) / 2) - 10 */
 
     if(SiS_Pr->UseCustomMode) {
        tempbx = SiS_Pr->CVSyncStart;
@@ -8003,12 +7247,11 @@
     xf86DrvMsg(0, X_INFO, "lcdvrs 0x%x\n", tempbx);
 #endif
 
-    temp = tempbx & 0x00FF;   				/* RTVACTEE = lcdvrs */
-    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,temp);
+    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,tempbx);	    /* lcdvrs */
 
-    temp = ((tempbx & 0xFF00) >> 8) << 4;
+    temp = (tempbx >> 4) & 0xF0;
     tempbx += (tempcx + 1);
-    temp |= (tempbx & 0x000F);
+    temp |= (tempbx & 0x0F);
 
     if(SiS_Pr->UseCustomMode) {
        temp &= 0xf0;
@@ -8021,149 +7264,103 @@
 
     SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,temp);
 
-    /* Code from 630/301B (I+II) BIOS */
-
 #ifdef SIS300
-    if(!SiS_Pr->UseCustomMode) {
-       if( ( ( (HwInfo->jChipType == SIS_630) ||
-               (HwInfo->jChipType == SIS_730) ) &&
-             (HwInfo->jChipRevision > 2) )  &&
-           (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) &&
-           (!(SiS_Pr->SiS_SetFlag & LCDVESATiming))  &&
-           (!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) ) {
-          if(ModeNo == 0x13) {
-             SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,0xB9);
-             SiS_SetReg(SiS_Pr->SiS_Part2Port,0x05,0xCC);
-             SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,0xA6);
-          } else {
-             if((crt2crtc & 0x3F) == 4) {
-                SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x2B);
-                SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x13);
-                SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,0xE5);
-                SiS_SetReg(SiS_Pr->SiS_Part2Port,0x05,0x08);
-                SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,0xE2);
-             }
-          }
-       }
-
-       if(HwInfo->jChipType < SIS_315H) {
-          if(SiS_Pr->SiS_LCDTypeInfo == 0x0c) {
-             crt2crtc &= 0x1f;
-             tempcx = 0;
-             if(!(SiS_Pr->SiS_VBInfo & SetNotSimuMode)) {
-                if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
-                   tempcx += 7;
-                }
-             }
-             tempcx += crt2crtc;
-             if(crt2crtc >= 4) {
-                SiS_SetReg(SiS_Pr->SiS_Part2Port,0x06,0xff);
-             }
+    SiS_Group2LCDSpecial(SiS_Pr, HwInfo, ModeNo, crt2crtc);
+#endif
 
-             if(!(SiS_Pr->SiS_VBInfo & SetNotSimuMode)) {
-                if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
-                   if(crt2crtc == 4) {
-                      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,0x28);
-                   }
-                }
-             }
-             SiS_SetReg(SiS_Pr->SiS_Part2Port,0x02,0x18);
-             SiS_SetReg(SiS_Pr->SiS_Part2Port,0x04,atable[tempcx]);
-          }
+    bridgeoffset = 7;
+    if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)          bridgeoffset += 2;
+    if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302ELV)) bridgeoffset++;
+    if(SiS_IsDualLink(SiS_Pr, HwInfo))        		 bridgeoffset++;
+
+    temp = 0;
+    if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {
+       if(SiS_Pr->PanelXRes != SiS_Pr->SiS_HDE) {
+          temp = SiS_Pr->SiS_HT - ((SiS_Pr->PanelXRes - SiS_Pr->SiS_HDE) / 2);
+	  if(SiS_IsDualLink(SiS_Pr, HwInfo)) temp >>= 1;
        }
     }
-#endif
-
-    tempcx = (SiS_Pr->SiS_HT - SiS_Pr->SiS_HDE) >> 2;     /* (HT - HDE) >> 2 */
-    tempbx = SiS_Pr->SiS_HDE + 7;            		  /* lcdhdee         */
-    if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-       tempbx += 2;
+    temp += bridgeoffset;
+    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1F,temp);  	     /* lcdhdes */
+    SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x20,0x0F,((temp >> 4) & 0xf0));
+
+    tempcx = SiS_Pr->SiS_HT;
+    tempax = tempbx = SiS_Pr->SiS_HDE;
+    if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {
+       if(SiS_Pr->PanelXRes != SiS_Pr->SiS_HDE) {
+          tempax = SiS_Pr->PanelXRes;
+          tempbx = SiS_Pr->PanelXRes - ((SiS_Pr->PanelXRes - SiS_Pr->SiS_HDE) / 2);
+       }
+    }
+    if(SiS_IsDualLink(SiS_Pr, HwInfo)) {
+       tempcx >>= 1;
+       tempbx >>= 1;
+       tempax >>= 1;
     }
-    push1 = tempbx;
 
 #ifdef TWDEBUG
     xf86DrvMsg(0, X_INFO, "lcdhdee 0x%x\n", tempbx);
 #endif
 
-    temp = tempbx & 0x00FF;    			          /* RHEQPLE = lcdhdee */
-    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x23,temp);
-    temp = (tempbx & 0xFF00) >> 8;
-    SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x25,0xF0,temp);
-
-    temp = 7;
-    if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-       temp += 2;
-    }
-    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1F,temp);  	  /* RHBLKE = lcdhdes[7:0] */
-    SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x20,0x0F);	  /* lcdhdes [11:8] */
+    tempbx += bridgeoffset;
+
+    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x23,tempbx);	    /* lcdhdee */
+    SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x25,0xF0,((tempbx >> 8) & 0x0f));
+
+    tempcx = (tempcx - tempax) >> 2;
 
     tempbx += tempcx;
     push2 = tempbx;
 
-    if(SiS_Pr->UseCustomMode) {
-       tempbx = SiS_Pr->CHSyncStart + 7;
-       if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-          tempbx += 2;
+    if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) {
+       if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+          if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
+             if(SiS_Pr->SiS_HDE == 1280) tempbx = (tempbx & 0xff00) | 0x47;
+	  }
        }
     }
 
+    if(SiS_Pr->UseCustomMode) {
+       tempbx = SiS_Pr->CHSyncStart;
+       if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempbx >>= 1;
+       tempbx += bridgeoffset;
+    }
+
 #ifdef TWDEBUG
     xf86DrvMsg(0, X_INFO, "lcdhrs 0x%x\n", tempbx);
 #endif
 
-    temp = tempbx & 0x00FF;            		          /* RHBURSTS = lcdhrs */
-    if(!SiS_Pr->UseCustomMode) {
-       if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-          if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-             if(SiS_Pr->SiS_HDE == 1280) temp = 0x47;
-          }
-       }
-    }
-    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1C,temp);
-    temp = (tempbx & 0x0F00) >> 4;
-    SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1D,0x0F,temp);
+    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1C,tempbx);	    /* lcdhrs */
+    SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1D,0x0F,((tempbx >> 4) & 0xf0));
 
     tempbx = push2;
+
     tempcx <<= 1;
+    if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {
+       if(SiS_Pr->PanelXRes != SiS_Pr->SiS_HDE) tempcx >>= 2;
+    }
     tempbx += tempcx;
 
     if(SiS_Pr->UseCustomMode) {
-       tempbx = SiS_Pr->CHSyncEnd + 7;
-       if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-          tempbx += 2;
-       }
+       tempbx = SiS_Pr->CHSyncEnd;
+       if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempbx >>= 1;
+       tempbx += bridgeoffset;
     }
 
 #ifdef TWDEBUG
     xf86DrvMsg(0, X_INFO, "lcdhre 0x%x\n", tempbx);
 #endif
 
-    temp = tempbx & 0x00FF;            		          /* RHSYEXP2S = lcdhre */
-    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x21,temp);
+    SiS_SetReg(SiS_Pr->SiS_Part2Port,0x21,tempbx);	    /* lcdhre */
 
-    if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) {
-       if(SiS_Pr->SiS_VGAVDE == 525) {
-          if(SiS_Pr->SiS_ModeType <= ModeVGA)
-    	     temp=0xC6;
-          else
-       	     temp=0xC3;
-          SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp);
-          SiS_SetReg(SiS_Pr->SiS_Part2Port,0x30,0xB3);
-       } else if(SiS_Pr->SiS_VGAVDE == 420) {
-          if(SiS_Pr->SiS_ModeType <= ModeVGA)
-	     temp=0x4F;
-          else
-       	     temp=0x4D;
-          SiS_SetReg(SiS_Pr->SiS_Part2Port,0x2f,temp);
-       }
-    }
+    SiS_SetGroup2_Tail(SiS_Pr, ModeNo);
 
 #ifdef SIS300
-    SiS_Set300Part2Regs(SiS_Pr, HwInfo, ModeIdIndex,
-                        RefreshRateTableIndex, ModeNo);
+    SiS_Set300Part2Regs(SiS_Pr, HwInfo, ModeIdIndex, RefreshRateTableIndex, ModeNo);
+#endif
+#ifdef SIS315H
+  } /* CRT2-LCD from table */
 #endif
-
-  } /* HwInfo */
 }
 
 /*********************************************/
@@ -8174,26 +7371,14 @@
 SiS_SetGroup3(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
               PSIS_HW_INFO HwInfo)
 {
-  USHORT modeflag, i;
-  const UCHAR  *tempdi;
+  USHORT 	i;
+  const UCHAR  	*tempdi;
 
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) return;
 
-  if(ModeNo<=0x13) {
-     modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-  } else {
-     if(SiS_Pr->UseCustomMode) {
-        modeflag = SiS_Pr->CModeFlag;
-     } else {
-    	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-     }
-  }
-
 #ifndef SIS_CP
   SiS_SetReg(SiS_Pr->SiS_Part3Port,0x00,0x00);
-#endif
-
-#ifdef SIS_CP
+#else
   SIS_CP_INIT301_CP
 #endif
 
@@ -8216,11 +7401,6 @@
      tempdi = SiS_Pr->SiS_HiTVGroup3Data;
      if(SiS_Pr->SiS_TVMode & TVSetTVSimuMode) {
         tempdi = SiS_Pr->SiS_HiTVGroup3Simu;
-#if 0
-        if(!(modeflag & Charx8Dot)) {
-           tempdi = SiS_Pr->SiS_HiTVGroup3Text;
-        }
-#endif
      }
   } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToYPbPr525750) {
      if(!(SiS_Pr->SiS_TVMode & TVSetYPbPr525i)) {
@@ -8229,7 +7409,7 @@
      }
   }
   if(tempdi) {
-     for(i=0; i<=0x3E; i++){
+     for(i=0; i<=0x3E; i++) {
         SiS_SetReg(SiS_Pr->SiS_Part3Port,i,tempdi[i]);
      }
      if(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302ELV)) {
@@ -8239,11 +7419,9 @@
      }
   }
 
-  if(!(SiS_Pr->SiS_VBInfo & (SetCRT2ToHiVision | SetCRT2ToYPbPr525750))) {
 #ifdef SIS_CP
-     SIS_CP_INIT301_CP2
+  SIS_CP_INIT301_CP2
 #endif
-  }
 }
 
 /*********************************************/
@@ -8252,11 +7430,37 @@
 
 #ifdef SIS315H
 static void
-SiS_SetGroup4_C_ELV(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
+SiS_ShiftXPos(SiS_Private *SiS_Pr, int shift)
 {
-   USHORT temp, temp1;
+   USHORT temp, temp1, temp2;
 
-   if(!(SiS_Pr->SiS_VBType & (VB_SIS301C | VB_SIS302ELV))) return;
+   temp1 = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x1f);
+   temp2 = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x20);
+   temp = (USHORT)((int)((temp1 | ((temp2 & 0xf0) << 4))) + shift);
+   SiS_SetReg(SiS_Pr->SiS_Part2Port,0x1f,temp);
+   SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x20,0x0f,((temp >> 4) & 0xf0));
+   temp = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x2b) & 0x0f;
+   temp = (USHORT)((int)(temp) + shift);
+   SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x2b,0xf0,(temp & 0x0f));
+   temp1 = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x43);
+   temp2 = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x42);
+   temp = (USHORT)((int)((temp1 | ((temp2 & 0xf0) << 4))) + shift);
+   SiS_SetReg(SiS_Pr->SiS_Part2Port,0x43,temp);
+   SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x42,0x0f,((temp >> 4) & 0xf0));
+}
+
+static void
+SiS_SetGroup4_C_ELV(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+                    USHORT ModeNo, USHORT ModeIdIndex)
+{
+   USHORT temp, temp1, resinfo = 0;
+
+   if(!(SiS_Pr->SiS_VBType & VB_SIS301C)) return;
+   if(!(SiS_Pr->SiS_VBInfo & (SetCRT2ToHiVision | SetCRT2ToYPbPr525750))) return;
+
+   if(ModeNo > 0x13) {
+      resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+   }
 
    SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x3a,0x08);
    temp = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x3a);
@@ -8267,28 +7471,37 @@
          SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x25,0xf8);
       }
       SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x0f,0xfb);
-      temp = 0;
-      if(!(SiS_Pr->SiS_TVMode & TVSetYPbPr750p)) {
-         temp |= 0x0002;
-         if(!(SiS_Pr->SiS_TVMode & TVSetYPbPr525p)) {
-	    temp ^= 0x0402;
-	    if(!(SiS_Pr->SiS_TVMode & TVSetHiVision)) {
-	       temp ^= 0x0002;
-	    }
-	 }
-      }
+      if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p)      temp = 0x0000;
+      else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) temp = 0x0002;
+      else if(SiS_Pr->SiS_TVMode & TVSetHiVision)  temp = 0x0400;
+      else					   temp = 0x0402;
       if(HwInfo->jChipType >= SIS_661) {
-         temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x39);
-         if(temp1 & 0x01) temp |= 0x10;
-         if(temp1 & 0x02) temp |= 0x01;
-	 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x26,0xec,(temp & 0xff));
+         temp1 = 0;
+	 if(SiS_Pr->SiS_TVMode & TVAspect43) temp1 = 4;
+	 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x0f,0xfb,temp1);
+	 if(SiS_Pr->SiS_TVMode & TVAspect43LB) temp |= 0x01;
+	 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x26,0x7c,(temp & 0xff));
       } else {
          temp1 = SiS_GetReg(SiS_Pr->SiS_P3d4,0x3b) & 0x03;
 	 if(temp1 == 0x01) temp |= 0x01;
 	 if(temp1 == 0x03) temp |= 0x04;  /* ? why not 0x10? */
-	 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x26,0xea,(temp & 0xff));
+	 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x26,0xf8,(temp & 0xff));
       }
       SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0xfb,(temp >> 8));
+
+      if(HwInfo->jChipType >= SIS_661) { 		/* ? */
+         if(SiS_Pr->SiS_TVMode & TVAspect43) {
+            if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) {
+	       if(resinfo == SIS_RI_1024x768) {
+	          SiS_ShiftXPos(SiS_Pr, 97);
+	       } else {
+	          SiS_ShiftXPos(SiS_Pr, 111);
+	       }
+	    } else if(SiS_Pr->SiS_TVMode & TVSetHiVision) {
+	       SiS_ShiftXPos(SiS_Pr, 136);
+	    }
+         }
+      }
    }
 }
 #endif
@@ -8330,25 +7543,22 @@
   SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x12,temp);
 }
 
-/* Set 301 VGA2 registers */
 static void
 SiS_SetGroup4(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
   	      USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo)
 {
-  USHORT tempax,tempcx,tempbx,modeflag,temp,temp2,resinfo;
+  USHORT tempax,tempcx,tempbx,modeflag,temp,resinfo;
   ULONG tempebx,tempeax,templong;
 
   if(ModeNo <= 0x13) {
      modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
      resinfo = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo;
+  } else if(SiS_Pr->UseCustomMode) {
+     modeflag = SiS_Pr->CModeFlag;
+     resinfo = 0;
   } else {
-     if(SiS_Pr->UseCustomMode) {
-        modeflag = SiS_Pr->CModeFlag;
-	resinfo = 0;
-     } else {
-    	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-	resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
-     }
+     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
+     resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
   }
 
   if(HwInfo->jChipType >= SIS_315H) {
@@ -8371,186 +7581,151 @@
 	   if(SiS_IsDualLink(SiS_Pr, HwInfo)) {
 	      SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x27,0x2c);
 	   }
-#ifdef SET_EMI
+
 	   if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
 	      SiS_SetReg(SiS_Pr->SiS_Part4Port,0x2a,0x00);
+#ifdef SET_EMI
 	      SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
+#endif
 	      SiS_SetReg(SiS_Pr->SiS_Part4Port,0x34,0x10);
 	   }
-#endif
 	}
    	return;
      }
   }
 
-  temp = SiS_Pr->SiS_RVBHCFACT;
-  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x13,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x13,SiS_Pr->SiS_RVBHCFACT);
 
   tempbx = SiS_Pr->SiS_RVBHCMAX;
-  temp = tempbx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x14,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x14,tempbx);
 
-  temp2 = (((tempbx & 0xFF00) >> 8) << 7) & 0x00ff;
+  temp = (tempbx >> 1) & 0x80;
 
   tempcx = SiS_Pr->SiS_VGAHT - 1;
-  temp = tempcx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x16,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x16,tempcx);
 
-  temp = (((tempcx & 0xFF00) >> 8) << 3) & 0x00ff;
-  temp2 |= temp;
+  temp |= ((tempcx >> 5) & 0x78);
 
   tempcx = SiS_Pr->SiS_VGAVT - 1;
-  if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV))  tempcx -= 5;
-
-  temp = tempcx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x17,temp);
+  if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) tempcx -= 5;
+  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x17,tempcx);
 
-  temp = temp2 | ((tempcx & 0xFF00) >> 8);
+  temp |= ((tempcx >> 8) & 0x07);
   SiS_SetReg(SiS_Pr->SiS_Part4Port,0x15,temp);
 
   tempbx = SiS_Pr->SiS_VGAHDE;
-  if(modeflag & HalfDCLK)  tempbx >>= 1;
-  if(HwInfo->jChipType >= SIS_661) {
-     if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempbx >>= 1;
-  }
+  if(modeflag & HalfDCLK)            tempbx >>= 1;
+  if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempbx >>= 1;
 
-  temp = 0xA0;
-  if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
+  if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
      temp = 0;
-     if(tempbx > 800) {
-        temp = 0xA0;
-        if(tempbx != 1024) {
-           temp = 0xC0;
-           if(tempbx != 1280) temp = 0;
-	}
-     }
-  } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-     if(tempbx <= 800) {
-        temp = 0x80;
-     }
+     if(tempbx > 800)        temp = 0x60;
+  } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
+     temp = 0;
+     if(tempbx == 1024)      temp = 0xA0;
+     else if(tempbx > 1024)  temp = 0xC0;
+  } else if(SiS_Pr->SiS_TVMode & (TVSetYPbPr525p | TVSetYPbPr750p)) {
+     temp = 0;
+     if(tempbx >= 1280)      temp = 0x40;
+     else if(tempbx >= 1024) temp = 0x20;
   } else {
      temp = 0x80;
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-        temp = 0;
-        if(tempbx > 800) temp = 0x60;
-     }
-  }
-
-  if(SiS_Pr->SiS_TVMode & (TVSetYPbPr525p | TVSetYPbPr750p)) {
-     temp = 0;
-     if(SiS_Pr->SiS_VGAHDE == 1024) temp = 0x20;
-  }
-
-  if(HwInfo->jChipType < SIS_661) {
-     if(SiS_IsDualLink(SiS_Pr, HwInfo)) temp = 0;
+     if(tempbx >= 1024)      temp = 0xA0;
   }
 
   if(SiS_Pr->SiS_VBType & VB_SIS301) {
-     if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1280x1024)
-        temp |= 0x0A;
+     if(SiS_Pr->SiS_LCDResInfo != Panel_1280x1024) temp |= 0x0A;
   }
 
   SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x0E,0x10,temp);
 
+  tempeax = SiS_Pr->SiS_VGAVDE;
   tempebx = SiS_Pr->SiS_VDE;
-
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToHiVision) {
      if(!(temp & 0xE0)) tempebx >>=1;
   }
 
   tempcx = SiS_Pr->SiS_RVBHRS;
-  temp = tempcx & 0x00FF;
-  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x18,temp);
+  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x18,tempcx);
+  tempcx >>= 8;
+  tempcx |= 0x40;
 
-  tempeax = SiS_Pr->SiS_VGAVDE;
-  tempcx |= 0x4000;
   if(tempeax <= tempebx) {
-     tempcx ^= 0x4000;
+     tempcx ^= 0x40;
   } else {
      tempeax -= tempebx;
   }
 
-  templong = (tempeax * 256 * 1024) % tempebx;
-  tempeax = (tempeax * 256 * 1024) / tempebx;
-  tempebx = tempeax;
-  if(templong != 0) tempebx++;
+  tempeax *= (256 * 1024);
+  templong = tempeax % tempebx;
+  tempeax /= tempebx;
+  if(templong) tempeax++;
 
-  temp = (USHORT)(tempebx & 0x000000FF);
+  temp = (USHORT)(tempeax & 0x000000FF);
   SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1B,temp);
-  temp = (USHORT)((tempebx & 0x0000FF00) >> 8);
+  temp = (USHORT)((tempeax & 0x0000FF00) >> 8);
   SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1A,temp);
-
-  tempbx = (USHORT)(tempebx >> 16);
-  temp = tempbx & 0x00FF;
-  temp <<= 4;
-  temp |= ((tempcx & 0xFF00) >> 8);
+  temp = (USHORT)((tempeax >> 12) & 0x70); /* sic! */
+  temp |= (tempcx & 0x4F);
   SiS_SetReg(SiS_Pr->SiS_Part4Port,0x19,temp);
 
   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
 
      SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1C,0x28);
 
+     /* Calc Linebuffer max address and set/clear decimode */
      tempbx = 0;
+     if(SiS_Pr->SiS_TVMode & (TVSetHiVision | TVSetYPbPr750p)) tempbx = 0x08;
      tempax = SiS_Pr->SiS_VGAHDE;
-     if(modeflag & HalfDCLK) 		tempax >>= 1;
+     if(modeflag & HalfDCLK)            tempax >>= 1;
      if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempax >>= 1;
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-	if(tempax > 800) tempax -= 800;
-     } else {
-        if(tempax > 800) {
-	   tempbx = 8;
-           if(tempax == 1024)
-	      tempax *= 25;
-           else
-	      tempax *= 20;
-
+     if(tempax > 800) {
+        if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+	   tempax -= 800;
+	} else {  /* 651+301C: Only if TVNoHiviNoYPbPr */
+	   tempbx = 0x08;
+           if(tempax == 1024) tempax *= 25;
+           else	              tempax *= 20;
 	   temp = tempax % 32;
 	   tempax /= 32;
-	   tempax--;
-	   if (temp!=0) tempax++;
-        }
+	   if(temp) tempax++;
+	   tempax++;
+	   if((SiS_Pr->SiS_VBInfo & SetCRT2ToTVNoYPbPrHiVision) ||
+	      (SiS_Pr->SiS_TVMode & TVSetYPbPr525i)) {
+	      if(resinfo == SIS_RI_1024x768) {
+	         /* Otherwise white line at right edge */
+	         tempax = (tempax & 0xff00) | 0x20;
+	      }
+	   }
+	}
      }
      tempax--;
-     temp = ((tempax & 0xFF00) >> 8) & 0x03;
-     if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {			/* From 1.10.7w */
-	if(ModeNo > 0x13) {					/* From 1.10.7w */
-	   if(resinfo == SIS_RI_1024x768) tempax = 0x1f;	/* From 1.10.7w */
-	}							/* From 1.10.7w */
-     }								/* From 1.10.7w */
-     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1D,tempax & 0x00FF);
-     temp <<= 4;
-     temp |= tempbx;
+     temp = ((tempax >> 4) & 0x30) | tempbx;
+     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1D,tempax);
      SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1E,temp);
 
-     if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
-	if(IS_SIS550650740660) {
-	   temp = 0x0026;  /* 1.10.7w; 1.10.8r; needs corresponding code in Dis/EnableBridge! */
-	} else {
-	   temp = 0x0036;
-	}
-     } else {
-	temp = 0x0036;
+     temp = 0x0036; tempbx = 0xD0;
+     if((IS_SIS550650740660) && (SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) {
+	temp = 0x0026; tempbx = 0xC0; /* See En/DisableBridge() */
      }
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
         if(!(SiS_Pr->SiS_TVMode & (TVSetNTSC1024 | TVSetHiVision | TVSetYPbPr750p | TVSetYPbPr525p))) {
 	   temp |= 0x01;
 	   if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
 	      if(!(SiS_Pr->SiS_TVMode & TVSetTVSimuMode)) {
-  	         temp &= 0xFE;
+  	         temp &= ~0x01;
 	      }
 	   }
 	}
      }
-     SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x1F,0xC0,temp);
+     SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x1F,tempbx,temp);
 
-     tempbx = SiS_Pr->SiS_HT;
+     tempbx = SiS_Pr->SiS_HT >> 1;
      if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempbx >>= 1;
-     tempbx >>= 1;
      tempbx -= 2;
-     temp = ((tempbx & 0x0700) >> 8) << 3;
+     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x22,tempbx);
+     temp = (tempbx >> 5) & 0x38;
      SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x21,0xC0,temp);
-     temp = tempbx & 0x00FF;
-     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x22,temp);
 
      if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
 	if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
@@ -8562,13 +7737,13 @@
 	      SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x27,0x2c);
 	   }
 	}
-#ifdef SET_EMI
 	if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
 	   SiS_SetReg(SiS_Pr->SiS_Part4Port,0x2a,0x00);
+#ifdef SET_EMI
 	   SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
+#endif
 	   SiS_SetReg(SiS_Pr->SiS_Part4Port,0x34,0x10);
 	}
-#endif
      }
 
   }  /* 301B */
@@ -8580,7 +7755,6 @@
 /*         SET PART 5 REGISTER GROUP         */
 /*********************************************/
 
-/* Set 301 Palette address port registers */
 static void
 SiS_SetGroup5(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
               PSIS_HW_INFO HwInfo)
@@ -8590,7 +7764,7 @@
 
   if(SiS_Pr->SiS_ModeType == ModeVGA) {
      if(!(SiS_Pr->SiS_VBInfo & (SetInSlaveMode | LoadDACFlag))) {
-        SiS_EnableCRT2(SiS_Pr);
+        SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20);
         SiS_LoadDAC(SiS_Pr, HwInfo, ModeNo, ModeIdIndex);
      }
   }
@@ -8608,11 +7782,8 @@
   USHORT ResIndex,DisplayType;
   const SiS_LVDSCRT1DataStruct *LVDSCRT1Ptr=NULL;
 
-  if(ModeNo <= 0x13) {
-     modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
-  } else {
-     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-  }
+  if(ModeNo <= 0x13) modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
+  else               modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
 
   if((SiS_Pr->SiS_CustomT == CUT_BARCO1366) ||
      (SiS_Pr->SiS_CustomT == CUT_BARCO1024) ||
@@ -8620,7 +7791,9 @@
      return;
 
   if(!(SiS_GetLVDSCRT1Ptr(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex,
-                          &ResIndex, &DisplayType))) return;
+                          &ResIndex, &DisplayType))) {
+     return;
+  }
 
   if(HwInfo->jChipType < SIS_315H) {
      if(SiS_Pr->SiS_SetFlag & SetDOSMode) return;
@@ -8628,16 +7801,16 @@
 
   switch(DisplayType) {
     case 0 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT1800x600_1;           break;
-    case 1 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11024x768_1;          break;
-    case 2 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11280x1024_1;         break;
-    case 3 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT1800x600_1_H;         break;
-    case 4 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11024x768_1_H;        break;
-    case 5 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11280x1024_1_H;       break;
-    case 6 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT1800x600_2;           break;
-    case 7 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11024x768_2;          break;
-    case 8 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11280x1024_2;         break;
-    case 9 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT1800x600_2_H;         break;
-    case 10: LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11024x768_2_H;        break;
+    case 1 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT1800x600_1_H;         break;
+    case 2 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT1800x600_2;           break;
+    case 3 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT1800x600_2_H;         break;
+    case 4 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11024x768_1;          break;
+    case 5 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11024x768_1_H;        break;
+    case 6 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11024x768_2;          break;
+    case 7 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11024x768_2_H;        break;
+    case 8 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11280x1024_1;         break;
+    case 9 : LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11280x1024_1_H;       break;
+    case 10: LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11280x1024_2;         break;
     case 11: LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11280x1024_2_H;       break;
     case 12: LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT1XXXxXXX_1;           break;
     case 13: LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT1XXXxXXX_1_H;         break;
@@ -8676,7 +7849,7 @@
     default: LVDSCRT1Ptr = SiS_Pr->SiS_LVDSCRT11024x768_1;          break;
   }
 
-  SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x11,0x7f);                        /*unlock cr0-7  */
+  SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x11,0x7f);
 
   tempah = (LVDSCRT1Ptr + ResIndex)->CR[0];
   SiS_SetReg(SiS_Pr->SiS_P3d4,0x00,tempah);
@@ -8711,12 +7884,6 @@
   tempah <<= 5;
   if(modeflag & DoubleScanMode)  tempah |= 0x080;
   SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x09,~0x020,tempah);
-
-  /* 650/LVDS BIOS - doesn't make sense */
-  if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-     if(modeflag & HalfDCLK)
-        SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x11,0x7f);
-  }
 }
 
 /*********************************************/
@@ -8731,7 +7898,7 @@
   USHORT clkbase, vclkindex=0;
   UCHAR  sr2b, sr2c;
 
-  if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel640x480) || (SiS_Pr->SiS_IF_DEF_TRUMPION == 1)) {
+  if((SiS_Pr->SiS_LCDResInfo == Panel_640x480) || (SiS_Pr->SiS_LCDInfo & LCDPass11)) {
 	SiS_Pr->SiS_SetFlag &= (~ProgrammingCRT2);
         if((SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK & 0x3f) == 2) {
 	   RefreshRateTableIndex--;
@@ -8748,7 +7915,7 @@
   sr2c = SiS_Pr->SiS_VCLKData[vclkindex].SR2C;
 
   if((SiS_Pr->SiS_CustomT == CUT_BARCO1366) || (SiS_Pr->SiS_CustomT == CUT_BARCO1024)) {
-     if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+     if(SiS_Pr->SiS_UseROM) {
 	if(ROMAddr[0x220] & 0x01) {
            sr2b = ROMAddr[0x227];
 	   sr2c = ROMAddr[0x228];
@@ -8763,7 +7930,6 @@
      }
   }
 
-  SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x86);
   SiS_SetReg(SiS_Pr->SiS_P3c4,0x31,0x20);
   SiS_SetReg(SiS_Pr->SiS_P3c4,clkbase,sr2b);
   SiS_SetReg(SiS_Pr->SiS_P3c4,clkbase+1,sr2c);
@@ -8783,14 +7949,17 @@
 SiS_SetCHTVReg(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
                USHORT RefreshRateTableIndex)
 {
-  USHORT temp, tempbx, tempcl;
+#if defined(SIS300) || defined(SIS315H)
+  USHORT temp, tempbx;
+#endif
+  USHORT tempcl;
   USHORT TVType, resindex;
   const SiS_CHTVRegDataStruct *CHTVRegData = NULL;
 
   if(ModeNo <= 0x13)
-    	tempcl = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
+     tempcl = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
   else
-    	tempcl = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
+     tempcl = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
 
   TVType = 0;
   if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) TVType += 1;
@@ -8808,16 +7977,16 @@
 	}
   }
   switch(TVType) {
-    	case  0: CHTVRegData = SiS_Pr->SiS_CHTVReg_UNTSC; break;
-    	case  1: CHTVRegData = SiS_Pr->SiS_CHTVReg_ONTSC; break;
-    	case  2: CHTVRegData = SiS_Pr->SiS_CHTVReg_UPAL;  break;
-    	case  3: CHTVRegData = SiS_Pr->SiS_CHTVReg_OPAL;  break;
-	case  4: CHTVRegData = SiS_Pr->SiS_CHTVReg_UPALM; break;
-    	case  5: CHTVRegData = SiS_Pr->SiS_CHTVReg_OPALM; break;
-    	case  6: CHTVRegData = SiS_Pr->SiS_CHTVReg_UPALN; break;
-    	case  7: CHTVRegData = SiS_Pr->SiS_CHTVReg_OPALN; break;
-	case  8: CHTVRegData = SiS_Pr->SiS_CHTVReg_SOPAL; break;
-	default: CHTVRegData = SiS_Pr->SiS_CHTVReg_OPAL;  break;
+     case  0: CHTVRegData = SiS_Pr->SiS_CHTVReg_UNTSC; break;
+     case  1: CHTVRegData = SiS_Pr->SiS_CHTVReg_ONTSC; break;
+     case  2: CHTVRegData = SiS_Pr->SiS_CHTVReg_UPAL;  break;
+     case  3: CHTVRegData = SiS_Pr->SiS_CHTVReg_OPAL;  break;
+     case  4: CHTVRegData = SiS_Pr->SiS_CHTVReg_UPALM; break;
+     case  5: CHTVRegData = SiS_Pr->SiS_CHTVReg_OPALM; break;
+     case  6: CHTVRegData = SiS_Pr->SiS_CHTVReg_UPALN; break;
+     case  7: CHTVRegData = SiS_Pr->SiS_CHTVReg_OPALN; break;
+     case  8: CHTVRegData = SiS_Pr->SiS_CHTVReg_SOPAL; break;
+     default: CHTVRegData = SiS_Pr->SiS_CHTVReg_OPAL;  break;
   }
   resindex = tempcl & 0x3F;
 
@@ -9089,21 +8258,21 @@
   /* Set up Power up/down timing */
 
   if(HwInfo->jChipType == SIS_740) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
         if(SiS_Pr->SiS_CustomT == CUT_ASUSL3000D) tableptr = asus1024_740;
         else    			          tableptr = table1024_740;
-     } else if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) ||
-               (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) ||
-	       (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)) {
+     } else if((SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) ||
+               (SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) ||
+	       (SiS_Pr->SiS_LCDResInfo == Panel_1600x1200)) {
 	if(SiS_Pr->SiS_CustomT == CUT_ASUSL3000D) tableptr = asus1400_740;
         else					  tableptr = table1400_740;
      } else return;
   } else {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
         tableptr = table1024_650;
-     } else if((SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) ||
-               (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) ||
-	       (SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200)) {
+     } else if((SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) ||
+               (SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) ||
+	       (SiS_Pr->SiS_LCDResInfo == Panel_1600x1200)) {
         tableptr = table1400_650;
      } else return;
   }
@@ -9139,45 +8308,35 @@
   int i;
 
   if(HwInfo->jChipType == SIS_740) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-        tableptr = table1024_740;
-     } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-        tableptr = table1280_740;
-     } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) {
-        tableptr = table1400_740;
-     } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) {
-        tableptr = table1600_740;
-     } else return;
-  } else {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-        tableptr = table1024_650;
-     } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
-        tableptr = table1280_650;
-     } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) {
-        tableptr = table1400_650;
-     } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) {
-        tableptr = table1600_650;
-     } else return;
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768)       tableptr = table1024_740;
+     else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) tableptr = table1280_740;
+     else if(SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) tableptr = table1400_740;
+     else if(SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) tableptr = table1600_740;
+     else return;
+  } else {
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768)       tableptr = table1024_650;
+     else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) tableptr = table1280_650;
+     else if(SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) tableptr = table1400_650;
+     else if(SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) tableptr = table1600_650;
+     else return;
   }
 
   tempbh = SiS_GetCH701x(SiS_Pr,0x74);
   if((tempbh == 0xf6) || (tempbh == 0xc7)) {
      tempbh = SiS_GetCH701x(SiS_Pr,0x73);
      if(tempbh == 0xc8) {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) return;
+        if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) return;
      } else if(tempbh == 0xdb) {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) return;
-	if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) return;
+        if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) return;
+	if(SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) return;
      } else if(tempbh == 0xde) {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) return;
+        if(SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) return;
      }
   }
 
-  if(HwInfo->jChipType == SIS_740) {
-     tempbh = 0x0d;
-  } else {
-     tempbh = 0x0c;
-  }
+  if(HwInfo->jChipType == SIS_740) tempbh = 0x0d;
+  else     			   tempbh = 0x0c;
+
   for(i = 0; i < tempbh; i++) {
      SiS_SetCH701x(SiS_Pr,(tableptr[i] << 8) | regtable[i]);
   }
@@ -9564,13 +8723,12 @@
 
    SiS_GetCRT2Data(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
 
-   /* Set up Panel Link for LVDS, 301BDH and 30xLV(for LCDA) */
+   /* Set up Panel Link for LVDS and LCDA */
+   SiS_Pr->SiS_LCDHDES = SiS_Pr->SiS_LCDVDES = 0;
    if( (SiS_Pr->SiS_IF_DEF_LVDS == 1) ||
        ((SiS_Pr->SiS_VBType & VB_NoLCD) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) ||
        ((HwInfo->jChipType >= SIS_315H) && (SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)) ) {
       SiS_GetLVDSDesData(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
-   } else {
-      SiS_Pr->SiS_LCDHDES = SiS_Pr->SiS_LCDVDES = 0;
    }
 
 #ifdef LINUX_XF86
@@ -9598,13 +8756,15 @@
       	   SiS_SetGroup3(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
       	   SiS_SetGroup4(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, HwInfo);
 #ifdef SIS315H
-	   SiS_SetGroup4_C_ELV(SiS_Pr, HwInfo);
+	   SiS_SetGroup4_C_ELV(SiS_Pr, HwInfo, ModeNo, ModeIdIndex);
 #endif
       	   SiS_SetGroup5(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
 
+	   SiS_SetCRT2Sync(SiS_Pr, ModeNo, RefreshRateTableIndex, HwInfo);
+
 	   /* For 301BDH (Panel link initialization): */
 	   if((SiS_Pr->SiS_VBType & VB_NoLCD) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD)) {
-	      if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
+	      if(SiS_Pr->SiS_LCDResInfo != Panel_640x480) {
 		 if(!((SiS_Pr->SiS_SetFlag & SetDOSMode) && ((ModeNo == 0x03) || (ModeNo == 0x10)))) {
 		    if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
 		       SiS_ModCRT1CRTC(SiS_Pr,ModeNo,ModeIdIndex,
@@ -9619,15 +8779,13 @@
 
    } else {
 
-        if(SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel640x480) {
-	   if(SiS_Pr->SiS_IF_DEF_TRUMPION == 0) {
-    	      SiS_ModCRT1CRTC(SiS_Pr,ModeNo,ModeIdIndex,
-	                      RefreshRateTableIndex,HwInfo);
-	   }
+        SiS_SetCRT2Sync(SiS_Pr, ModeNo, RefreshRateTableIndex, HwInfo);
+
+        if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+    	   SiS_ModCRT1CRTC(SiS_Pr,ModeNo,ModeIdIndex,RefreshRateTableIndex,HwInfo);
 	}
 
-        SiS_SetCRT2ECLK(SiS_Pr,ModeNo,ModeIdIndex,
-	                RefreshRateTableIndex,HwInfo);
+        SiS_SetCRT2ECLK(SiS_Pr,ModeNo,ModeIdIndex,RefreshRateTableIndex,HwInfo);
 
 	if(SiS_Pr->SiS_SetFlag & LowModeTests) {
      	   if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
@@ -9639,8 +8797,7 @@
 		 }
 	      }
 	      if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
-       		 SiS_SetCHTVReg(SiS_Pr,ModeNo,ModeIdIndex,
-		               RefreshRateTableIndex);
+       		 SiS_SetCHTVReg(SiS_Pr,ModeNo,ModeIdIndex,RefreshRateTableIndex);
 	      }
      	   }
 	}
@@ -9651,7 +8808,7 @@
    if(HwInfo->jChipType < SIS_315H) {
       if(SiS_Pr->SiS_SetFlag & LowModeTests) {
 	 if(SiS_Pr->SiS_UseOEM) {
-	    if((SiS_Pr->SiS_UseROM) && ROMAddr && (SiS_Pr->SiS_UseOEM == -1)) {
+	    if((SiS_Pr->SiS_UseROM) && (SiS_Pr->SiS_UseOEM == -1)) {
 	       if((ROMAddr[0x233] == 0x12) && (ROMAddr[0x234] == 0x34)) {
 	          SiS_OEM300Setting(SiS_Pr,HwInfo,ModeNo,ModeIdIndex,
 	       			    RefreshRateTableIndex);
@@ -9684,13 +8841,11 @@
       if(SiS_Pr->SiS_SetFlag & LowModeTests) {
 	 if(HwInfo->jChipType < SIS_661) {
 	    SiS_FinalizeLCD(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
-            if(SiS_Pr->SiS_UseOEM) {
-               SiS_OEM310Setting(SiS_Pr, HwInfo, ModeNo, ModeIdIndex);
-            }
+            SiS_OEM310Setting(SiS_Pr, HwInfo, ModeNo, ModeIdIndex);
 	 } else {
 	    SiS_OEM661Setting(SiS_Pr, HwInfo, ModeNo, ModeIdIndex, RefreshRateTableIndex);
 	 }
-         SiS_CRT2AutoThreshold(SiS_Pr);
+         SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x01,0x40);
       }
    }
 #endif
@@ -9761,6 +8916,63 @@
   }
 }
 
+#ifdef SIS300
+static UCHAR *
+SiS_SetTrumpBlockLoop(SiS_Private *SiS_Pr, UCHAR *dataptr)
+{
+  int i, j, num;
+  USHORT tempah,temp;
+  UCHAR *mydataptr;
+
+  for(i=0; i<20; i++) {				/* Do 20 attempts to write */
+     mydataptr = dataptr;
+     num = *mydataptr++;
+     if(!num) return mydataptr;
+     if(i) {
+        SiS_SetStop(SiS_Pr);
+	SiS_DDC2Delay(SiS_Pr,SiS_I2CDELAYSHORT*2);
+     }
+     if(SiS_SetStart(SiS_Pr)) continue;		/* Set start condition */
+     tempah = SiS_Pr->SiS_DDC_DeviceAddr;
+     temp = SiS_WriteDDC2Data(SiS_Pr,tempah);	/* Write DAB (S0=0=write) */
+     if(temp) continue;				/*    (ERROR: no ack) */
+     tempah = *mydataptr++;
+     temp = SiS_WriteDDC2Data(SiS_Pr,tempah);	/* Write register number */
+     if(temp) continue;				/*    (ERROR: no ack) */
+     for(j=0; j<num; j++) {
+        tempah = *mydataptr++;
+        temp = SiS_WriteDDC2Data(SiS_Pr,tempah);/* Write DAB (S0=0=write) */
+	if(temp) break;
+     }
+     if(temp) continue;
+     if(SiS_SetStop(SiS_Pr)) continue;
+     return mydataptr;
+  }
+  return NULL;
+}
+
+static BOOLEAN
+SiS_SetTrumpionBlock(SiS_Private *SiS_Pr, UCHAR *dataptr)
+{
+  SiS_Pr->SiS_DDC_DeviceAddr = 0xF0;  		/* DAB (Device Address Byte) */
+  SiS_Pr->SiS_DDC_Index = 0x11;			/* Bit 0 = SC;  Bit 1 = SD */
+  SiS_Pr->SiS_DDC_Data  = 0x02;              	/* Bitmask in IndexReg for Data */
+  SiS_Pr->SiS_DDC_Clk   = 0x01;              	/* Bitmask in IndexReg for Clk */
+  SiS_SetupDDCN(SiS_Pr);
+
+  SiS_SetSwitchDDC2(SiS_Pr);
+
+  while(*dataptr) {
+     dataptr = SiS_SetTrumpBlockLoop(SiS_Pr, dataptr);
+     if(!dataptr) return FALSE;
+  }
+#ifdef TWDEBUG
+  xf86DrvMsg(0, X_INFO, "Trumpion block success\n");
+#endif
+  return TRUE;
+}
+#endif
+
 /* The Chrontel 700x is connected to the 630/730 via
  * the 630/730's DDC/I2C port.
  *
@@ -9796,6 +9008,20 @@
   return FALSE;
 }
 
+#ifdef SIS300
+/* Write Trumpion register */
+void
+SiS_SetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx)
+{
+  SiS_Pr->SiS_DDC_DeviceAddr = 0xF0;  		/* DAB (Device Address Byte) */
+  SiS_Pr->SiS_DDC_Index = 0x11;			/* Bit 0 = SC;  Bit 1 = SD */
+  SiS_Pr->SiS_DDC_Data  = 0x02;              	/* Bitmask in IndexReg for Data */
+  SiS_Pr->SiS_DDC_Clk   = 0x01;              	/* Bitmask in IndexReg for Clk */
+  SiS_SetupDDCN(SiS_Pr);
+  SiS_SetChReg(SiS_Pr, tempbx, 0);
+}
+#endif
+
 /* Write to Chrontel 700x */
 /* Parameter is [Data (S15-S8) | Register no (S7-S0)] */
 void
@@ -9831,17 +9057,16 @@
   SiS_Pr->SiS_DDC_Clk   = 0x04;                 /* Bitmask in IndexReg for Clk */
   SiS_SetupDDCN(SiS_Pr);
   SiS_Pr->SiS_DDC_DeviceAddr = 0xEA;  		/* DAB (Device Address Byte) */
-
   SiS_SetChReg(SiS_Pr, tempbx, 0);
 }
 
 void
 SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx)
 {
-   if(SiS_Pr->SiS_IF_DEF_CH70xx == 1)
-      SiS_SetCH700x(SiS_Pr,tempbx);
-   else
-      SiS_SetCH701x(SiS_Pr,tempbx);
+  if(SiS_Pr->SiS_IF_DEF_CH70xx == 1)
+     SiS_SetCH700x(SiS_Pr,tempbx);
+  else
+     SiS_SetCH701x(SiS_Pr,tempbx);
 }
 
 static USHORT
@@ -9873,6 +9098,21 @@
   return 0xFFFF;
 }
 
+#ifdef SIS300
+/* Read from Trumpion */
+USHORT
+SiS_GetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx)
+{
+  SiS_Pr->SiS_DDC_DeviceAddr = 0xF0;	/* DAB */
+  SiS_Pr->SiS_DDC_Index = 0x11;		/* Bit 0 = SC;  Bit 1 = SD */
+  SiS_Pr->SiS_DDC_Data  = 0x02;         /* Bitmask in IndexReg for Data */
+  SiS_Pr->SiS_DDC_Clk   = 0x01;         /* Bitmask in IndexReg for Clk */
+  SiS_SetupDDCN(SiS_Pr);
+  SiS_Pr->SiS_DDC_ReadAddr = tempbx;
+  return(SiS_GetChReg(SiS_Pr,0));
+}
+#endif
+
 /* Read from Chrontel 700x */
 /* Parameter is [Register no (S7-S0)] */
 USHORT
@@ -9925,10 +9165,10 @@
 USHORT
 SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx)
 {
-   if(SiS_Pr->SiS_IF_DEF_CH70xx == 1)
-      return(SiS_GetCH700x(SiS_Pr, tempbx));
-   else
-      return(SiS_GetCH701x(SiS_Pr, tempbx));
+  if(SiS_Pr->SiS_IF_DEF_CH70xx == 1)
+     return(SiS_GetCH700x(SiS_Pr, tempbx));
+  else
+     return(SiS_GetCH701x(SiS_Pr, tempbx));
 }
 
 /* Our own DDC functions */
@@ -10315,6 +9555,8 @@
    for(i=0; i<7; i++) SiS_Pr->CP_DataValid[i] = FALSE;
    SiS_Pr->CP_HaveCustomData = FALSE;
    SiS_Pr->CP_MaxX = SiS_Pr->CP_MaxY = SiS_Pr->CP_MaxClock = 0;
+   SiS_Pr->CP_PreferredX = SiS_Pr->CP_PreferredY = 0;
+   SiS_Pr->CP_PreferredIndex = -1;
 
    if(!(pSiS->VBFlags & (VB_301|VB_301B|VB_301C|VB_302B))) return 0;
    if(pSiS->VBFlags & VB_30xBDH) return 0;
@@ -10409,12 +9651,14 @@
 	 SiS_Pr->CP_PreferredY = yres;
 
          switch(xres) {
+#if 0	    /* Treat as custom */
             case 800:
 	        if(yres == 600) {
 	     	   paneltype = Panel_800x600;
 	     	   checkexpand = TRUE;
 	        }
 	        break;
+#endif
             case 1024:
 	        if(yres == 768) {
 	     	   paneltype = Panel_1024x768;
@@ -10452,9 +9696,11 @@
 #if 0	    /* Treat this as custom, as we have no valid timing data yet */
 	    case 1600:
 	        if(pSiS->VGAEngine == SIS_315_VGA) {
-	           if(yres == 1200) {
-	              paneltype = Panel310_1600x1200;
-		      checkexpand = TRUE;
+		   if(pSiS->VBFlags & VB_301C) {
+	              if(yres == 1200) {
+	                 paneltype = Panel310_1600x1200;
+		         checkexpand = TRUE;
+		      }
 	           }
 	        }
       	        break;
@@ -10580,6 +9826,10 @@
 	          if(yres > SiS_Pr->CP_MaxY) SiS_Pr->CP_MaxY = yres;
 		  if(SiS_Pr->CP_Clock[i] > SiS_Pr->CP_MaxClock) SiS_Pr->CP_MaxClock = SiS_Pr->CP_Clock[i];
 
+		  if((SiS_Pr->CP_PreferredX == xres) && (SiS_Pr->CP_PreferredY == yres)) {
+	             SiS_Pr->CP_PreferredIndex = i;
+	          }
+
 		  SiS_Pr->CP_Vendor = buffer[9] | (buffer[8] << 8);
 		  SiS_Pr->CP_Product = buffer[10] | (buffer[11] << 8);
 
@@ -10660,28 +9910,20 @@
       SiS_Pr->CP_MaxX = xres = buffer[0x76] | (buffer[0x77] << 8);
       SiS_Pr->CP_MaxY = yres = buffer[0x78] | (buffer[0x79] << 8);
       switch(xres) {
+#if 0
          case 800:
 	     if(yres == 600) {
 	     	paneltype = Panel_800x600;
 	     	checkexpand = TRUE;
 	     }
 	     break;
+#endif
          case 1024:
 	     if(yres == 768) {
 	     	paneltype = Panel_1024x768;
 	     	checkexpand = TRUE;
 	     }
 	     break;
-	 case 1152:
-	     if(yres == 768) {
-	        if(pSiS->VGAEngine == SIS_300_VGA) {
-		   paneltype = Panel300_1152x768;
-		} else {
-		   paneltype = Panel310_1152x768;
-		}
-	     	checkexpand = TRUE;
-	     }
-	     break;
 	 case 1280:
 	     if(yres == 960) {
 	        if(pSiS->VGAEngine == SIS_315_VGA) {
@@ -10706,9 +9948,11 @@
 #if 0    /* Treat this one as custom since we have no timing data yet */
 	 case 1600:
 	     if(pSiS->VGAEngine == SIS_315_VGA) {
-	        if(yres == 1200) {
-	           paneltype = Panel310_1600x1200;
-		   checkexpand = TRUE;
+	        if(pSiS->VBFlags & VB_301C) {
+	           if(yres == 1200) {
+	              paneltype = Panel310_1600x1200;
+		      checkexpand = TRUE;
+		   }
 	        }
 	     }
       	     break;
@@ -10810,6 +10054,10 @@
 
 	       if(SiS_Pr->CP_Clock[i] > SiS_Pr->CP_MaxClock) SiS_Pr->CP_MaxClock = SiS_Pr->CP_Clock[i];
 
+	       if((SiS_Pr->CP_MaxX == xres) && (SiS_Pr->CP_MaxY == yres)) {
+	          SiS_Pr->CP_PreferredIndex = i;
+	       }
+
 	       SiS_Pr->CP_HSync_P[i] = (buffer[index + 17] & 0x02) ? TRUE : FALSE;
 	       SiS_Pr->CP_VSync_P[i] = (buffer[index + 17] & 0x04) ? TRUE : FALSE;
 	       SiS_Pr->CP_SyncValid[i] = TRUE;
@@ -10864,14 +10112,18 @@
    if(paneltype) {
        if(!SiS_Pr->CP_PreferredX) SiS_Pr->CP_PreferredX = SiS_Pr->CP_MaxX;
        if(!SiS_Pr->CP_PreferredY) SiS_Pr->CP_PreferredY = SiS_Pr->CP_MaxY;
-       cr37 &= 0xf1;
-       SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x36,0xf0,paneltype);
-       SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x37,0xf1,cr37);
        SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x32,0x08);
+       SiS_SetReg(SiS_Pr->SiS_P3d4,0x36,paneltype);
+       cr37 &= 0xf1;
+       SiS_SetRegANDOR(SiS_Pr->SiS_P3d4,0x37,0x0c,cr37);
+       SiS_Pr->PanelSelfDetected = TRUE;
 #ifdef TWDEBUG
        xf86DrvMsgVerb(pSiS->pScrn->scrnIndex, X_PROBED, 3, 
-       	"CRT2: [DDC LCD results: 0x%02x, 0x%02x]\n", paneltype, cr37);
+       	   "CRT2: [DDC LCD results: 0x%02x, 0x%02x]\n", paneltype, cr37);
 #endif	
+   } else {
+       SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x32,~0x08);
+       SiS_SetReg(SiS_Pr->SiS_P3d4,0x36,0x00);
    }
    return 0;
 }
@@ -11148,13 +10400,13 @@
   USHORT romptr;
 
   if(HwInfo->jChipType < SIS_330) {
-     romptr = ROMAddr[0x128] | (ROMAddr[0x129] << 8);
+     romptr = SISGETROMW(0x128);
      if(SiS_Pr->SiS_VBType & VB_SIS301B302B)
-        romptr = ROMAddr[0x12a] | (ROMAddr[0x12b] << 8);
+        romptr = SISGETROMW(0x12a);
   } else {
-     romptr = ROMAddr[0x1a8] | (ROMAddr[0x1a9] << 8);
+     romptr = SISGETROMW(0x1a8);
      if(SiS_Pr->SiS_VBType & VB_SIS301B302B)
-        romptr = ROMAddr[0x1aa] | (ROMAddr[0x1ab] << 8);
+        romptr = SISGETROMW(0x1aa);
   }
   return(romptr);
 }
@@ -11166,13 +10418,13 @@
   USHORT romptr;
 
   if(HwInfo->jChipType < SIS_330) {
-     romptr = ROMAddr[0x120] | (ROMAddr[0x121] << 8);
+     romptr = SISGETROMW(0x120);
      if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)
-        romptr = ROMAddr[0x122] | (ROMAddr[0x123] << 8);
+        romptr = SISGETROMW(0x122);
   } else {
-     romptr = ROMAddr[0x1a0] | (ROMAddr[0x1a1] << 8);
+     romptr = SISGETROMW(0x1a0);
      if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)
-        romptr = ROMAddr[0x1a2] | (ROMAddr[0x1a3] << 8);
+        romptr = SISGETROMW(0x1a2);
   }
   return(romptr);
 }
@@ -11184,13 +10436,13 @@
   USHORT romptr;
 
   if(HwInfo->jChipType < SIS_330) {
-     romptr = ROMAddr[0x114] | (ROMAddr[0x115] << 8);
+     romptr = SISGETROMW(0x114);
      if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)
-        romptr = ROMAddr[0x11a] | (ROMAddr[0x11b] << 8);
+        romptr = SISGETROMW(0x11a);
   } else {
-     romptr = ROMAddr[0x194] | (ROMAddr[0x195] << 8);
+     romptr = SISGETROMW(0x194);
      if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)
-        romptr = ROMAddr[0x19a] | (ROMAddr[0x19b] << 8);
+        romptr = SISGETROMW(0x19a);
   }
   return(romptr);
 }
@@ -11212,9 +10464,9 @@
      }
   }
 
-  index = SiS_Pr->SiS_LCDResInfo & 0x0F;
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050)      index -= 5;
-  else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1600x1200) index -= 6;
+  index = SiS_GetBIOSLCDResInfo(SiS_Pr) & 0x0F;
+  if(SiS_Pr->SiS_LCDResInfo == Panel_1400x1050)      index -= 5;
+  else if(SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) index -= 6;
   index--;
   index *= 3;
   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) index += 2;
@@ -11227,12 +10479,9 @@
 {
   USHORT index;
 
-  index = SiS_Pr->SiS_LCDResInfo & 0x0F;
-  index--;
-  index *= 3;
-  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) index += 2;
+  index = ((SiS_GetBIOSLCDResInfo(SiS_Pr) & 0x0F) - 1) * 3;
+  if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)         index += 2;
   else if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) index++;
-
   return index;
 }
 
@@ -11258,7 +10507,7 @@
 }
 
 static ULONG
-GetOEMTVPtr661_2(SiS_Private *SiS_Pr)
+GetOEMTVPtr661_2_GEN(SiS_Private *SiS_Pr, int addme)
 {
    USHORT index = 0, temp = 0;
 
@@ -11275,7 +10524,7 @@
    if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
       if((!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) ||
          (SiS_Pr->SiS_TVMode & TVSetTVSimuMode)) {
-	 index += 8;
+	 index += addme;
 	 temp++;
       }
       temp += 0x0100;
@@ -11283,16 +10532,37 @@
    return(ULONG)(index | (temp << 16));
 }
 
+static ULONG
+GetOEMTVPtr661_2_OLD(SiS_Private *SiS_Pr)
+{
+   return(GetOEMTVPtr661_2_GEN(SiS_Pr, 8));
+}
+
+#if 0
+static ULONG
+GetOEMTVPtr661_2_NEW(SiS_Private *SiS_Pr)
+{
+   return(GetOEMTVPtr661_2_GEN(SiS_Pr, 6));
+}
+#endif
+
 static int
 GetOEMTVPtr661(SiS_Private *SiS_Pr)
 {
    int index = 0;
 
-   if(SiS_Pr->SiS_TVMode & TVSetPAL)       index = 2;
-   if(SiS_Pr->SiS_TVMode & TVSetHiVision)  index = 4;
-   if(SiS_Pr->SiS_TVMode & TVSetYPbPr525i) index = 6;
-   if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) index = 8;
-   if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) index = 10;
+   if(SiS_Pr->SiS_TVMode & TVSetPAL)          index = 2;
+   if(SiS_Pr->SiS_ROMNew) {
+      if(SiS_Pr->SiS_TVMode & TVSetYPbPr525i) index = 4;
+      if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) index = 6;
+      if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) index = 8;
+      if(SiS_Pr->SiS_TVMode & TVSetHiVision)  index = 10;
+   } else {
+      if(SiS_Pr->SiS_TVMode & TVSetHiVision)  index = 4;
+      if(SiS_Pr->SiS_TVMode & TVSetYPbPr525i) index = 6;
+      if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) index = 8;
+      if(SiS_Pr->SiS_TVMode & TVSetYPbPr750p) index = 10;
+   }
 
    if(SiS_Pr->SiS_TVMode & TVSetTVSimuMode) index++;
 
@@ -11306,15 +10576,21 @@
   USHORT delay=0,index,myindex,temp,romptr=0;
   BOOLEAN dochiptest = TRUE;
 
+  if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
+     SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x20,0xbf);
+  } else {
+     SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x35,0x7f);
+  }
+
   /* Find delay (from ROM, internal tables, PCI subsystem) */
 
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) {			/* ------------ VGA */
      
-     if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+     if((SiS_Pr->SiS_UseROM) && (!(SiS_Pr->SiS_ROMNew))) {
         romptr = GetRAMDACromptr(SiS_Pr, HwInfo);
-	if(!romptr) return;
-	delay = ROMAddr[romptr];
-     } else {
+     }
+     if(romptr) delay = ROMAddr[romptr];
+     else {
         delay = 0x04;
         if(SiS_Pr->SiS_VBType & VB_SIS301B302B) {
 	   if(IS_SIS650) {
@@ -11326,8 +10602,7 @@
 	   } else {
 	      delay = 0x0c;
 	   }
-	}
-        if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
+	} else if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
            delay = 0x00;
 	}
      }
@@ -11336,13 +10611,39 @@
 
      BOOLEAN gotitfrompci = FALSE;
 
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) return;
+     /* Could we detect a PDC for LCD or did we get a user-defined? If yes, use it */
+
+     if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+	if(SiS_Pr->PDC != -1) {
+           SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0xf0,((SiS_Pr->PDC >> 1) & 0x0f));
+	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x35,0x7f,((SiS_Pr->PDC & 0x01) << 7));
+	   return;
+	}
+     } else {
+	if(SiS_Pr->PDCA != -1) {
+	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0x0f,((SiS_Pr->PDCA << 3) & 0xf0));
+	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x20,0xbf,((SiS_Pr->PDCA & 0x01) << 6));
+	   return;
+	}
+     }
 
-     /* Could we detect a PDC for LCD? If yes, use it */
+     /* Custom Panel? */
 
-     if(SiS_Pr->PDC) {
+     if(SiS_Pr->SiS_LCDResInfo == Panel_Custom) {
         if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
-	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0x0f,((SiS_Pr->PDC & 0x0f) << 4));
+	   delay = 0x00;
+	   if((SiS_Pr->PanelXRes <= 1280) && (SiS_Pr->PanelYRes <= 1024)) {
+	      delay = 0x20;
+	   }
+	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0x0f,delay);
+	} else {
+	   delay = 0x0c;
+	   if(SiS_Pr->SiS_VBType & VB_SIS301C) delay = 0x03;
+	   else if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
+	      if(IS_SIS740) delay = 0x01;
+	      else          delay = 0x03;
+	   }
+	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0xf0,delay);
 	}
         return;
      }
@@ -11355,7 +10656,7 @@
      switch(SiS_Pr->SiS_CustomT) {
      case CUT_COMPAQ1280:
      case CUT_COMPAQ12802:
-	if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
+	if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) {
 	   gotitfrompci = TRUE;
 	   dochiptest = FALSE;
 	   delay = 0x03;
@@ -11363,15 +10664,13 @@
 	break;
      case CUT_CLEVO1400:
      case CUT_CLEVO14002:
-	/* if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) { */
-	   gotitfrompci = TRUE;
-	   dochiptest = FALSE;
-	   delay = 0x02;
-	/* } */
+	gotitfrompci = TRUE;
+	dochiptest = FALSE;
+	delay = 0x02;
 	break;
      case CUT_CLEVO1024:
      case CUT_CLEVO10242:
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
+        if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
 	   gotitfrompci = TRUE;
 	   dochiptest = FALSE;
 	   delay = 0x33;
@@ -11392,12 +10691,12 @@
 
            if(SiS_IsNotM650orLater(SiS_Pr, HwInfo)) {
 
-              if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+              if((SiS_Pr->SiS_UseROM) && (!(SiS_Pr->SiS_ROMNew))) {
 	         /* Always use the second pointer on 650; some BIOSes */
                  /* still carry old 301 data at the first location    */
-	         /* romptr = ROMAddr[0x120] | (ROMAddr[0x121] << 8);  */
+	         /* romptr = SISGETROMW(0x120);                       */
 	         /* if(SiS_Pr->SiS_VBType & VB_SIS302LV)              */
-	         romptr = ROMAddr[0x122] | (ROMAddr[0x123] << 8);
+	         romptr = SISGETROMW(0x122);
 	         if(!romptr) return;
 	         delay = ROMAddr[(romptr + index)];
 	      } else {
@@ -11412,10 +10711,13 @@
 
           }
 
-        } else if((ROMAddr) && SiS_Pr->SiS_UseROM &&
-	          (SiS_Pr->SiS_LCDResInfo != SiS_Pr->SiS_Panel1280x1024)) {
+        } else if(SiS_Pr->SiS_UseROM 			      &&
+		  (!(SiS_Pr->SiS_ROMNew))		      &&
+	          (SiS_Pr->SiS_LCDResInfo != Panel_1280x1024) &&
+		  (SiS_Pr->SiS_LCDResInfo != Panel_1280x768)  &&
+		  (SiS_Pr->SiS_LCDResInfo != Panel_1280x960)) {
 
-	   /* Data for 1280x1024 wrong in BIOS */
+	   /* Data for 1280x1024 wrong in 301B BIOS */
            romptr = GetLCDromptr(SiS_Pr, HwInfo);
 	   if(!romptr) return;
 	   delay = ROMAddr[(romptr + index)];
@@ -11430,7 +10732,11 @@
            delay = SiS310_LCDDelayCompensation_301[myindex];
 	   if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
 	      if(IS_SIS740) delay = 0x01;
+	      else if(HwInfo->jChipType <= SIS_315PRO) delay = SiS310_LCDDelayCompensation_3xx301LV[myindex];
 	      else          delay = SiS310_LCDDelayCompensation_650301LV[myindex];
+	   } else if(SiS_Pr->SiS_VBType & VB_SIS301C) {
+	      if(IS_SIS740) delay = 0x01;  /* ? */
+	      else          delay = 0x03;
 	   } else if(SiS_Pr->SiS_VBType & VB_SIS301B302B) {
 	      if(IS_SIS740) delay = 0x01;
 	      else          delay = SiS310_LCDDelayCompensation_3xx301B[myindex];
@@ -11453,12 +10759,12 @@
 
         if(SiS_IsNotM650orLater(SiS_Pr,HwInfo)) {
 
-           if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+           if((SiS_Pr->SiS_UseROM) && (!(SiS_Pr->SiS_ROMNew))) {
 	      /* Always use the second pointer on 650; some BIOSes */
               /* still carry old 301 data at the first location    */
-              /* romptr = ROMAddr[0x114] | (ROMAddr[0x115] << 8);  */
-	      /* if(SiS_Pr->SiS_VBType & VB_SIS302LV) */
-	      romptr = ROMAddr[0x11a] | (ROMAddr[0x11b] << 8);
+              /* romptr = SISGETROMW(0x114);			   */
+	      /* if(SiS_Pr->SiS_VBType & VB_SIS302LV)              */
+	      romptr = SISGETROMW(0x11a);
 	      if(!romptr) return;
 	      delay = ROMAddr[romptr + index];
 
@@ -11491,7 +10797,7 @@
 	   }
         }
 
-     } else if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+     } else if((SiS_Pr->SiS_UseROM) && (!(SiS_Pr->SiS_ROMNew))) {
 
         romptr = GetTVromptr(SiS_Pr, HwInfo);
 	if(!romptr) return;
@@ -11507,14 +10813,16 @@
         if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
 	   if(IS_SIS740) {
 	      delay = SiS310_TVDelayCompensation_740301B[index];
+	      /* LV: use 301 data? BIOS bug? */
 	   } else {
               delay = SiS310_TVDelayCompensation_301B[index];
+	      if(SiS_Pr->SiS_VBType & VB_SIS301C) delay = 0x02;
 	   }
 	}
 
      }
 
-     if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x13) & 0x04) {  /* LCDA */
+     if(SiS_LCDAEnabled(SiS_Pr, HwInfo)) {
 	delay &= 0x0f;
 	dochiptest = FALSE;
      }
@@ -11580,15 +10888,18 @@
   temp >>= 1;  	  /* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */
   temp1 = temp;
 
-  if(ROMAddr && SiS_Pr->SiS_UseROM) {
+  if(SiS_Pr->SiS_UseROM && (!(SiS_Pr->SiS_ROMNew))) {
      if(HwInfo->jChipType >= SIS_661) {
-	romptr = ROMAddr[0x260] | (ROMAddr[0x261] << 8);
-	temp1 = GetOEMTVPtr661(SiS_Pr);
+        temp1 = GetOEMTVPtr661(SiS_Pr);
         temp1 >>= 1;
+        romptr = SISGETROMW(0x260);
+        if(HwInfo->jChipType >= SIS_760) {
+	   romptr = SISGETROMW(0x360);
+	}
      } else if(HwInfo->jChipType >= SIS_330) {
-        romptr = ROMAddr[0x192] | (ROMAddr[0x193] << 8);
+        romptr = SISGETROMW(0x192);
      } else {
-        romptr = ROMAddr[0x112] | (ROMAddr[0x113] << 8);
+        romptr = SISGETROMW(0x112);
      }
   }
 
@@ -11610,24 +10921,25 @@
   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
   USHORT index,temp,temp1,romptr=0;
 
-  temp = GetTVPtrIndex(SiS_Pr);
-  temp >>= 1;              	/* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */
-  temp1 = temp;
+  temp = temp1 = GetTVPtrIndex(SiS_Pr) >> 1; 	/* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */
 
-  if(ModeNo<=0x13)
+  if(ModeNo <= 0x13)
      index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].VB_StTVEdgeIndex;
   else
      index = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].VB_ExtTVEdgeIndex;
 
-  if(ROMAddr && SiS_Pr->SiS_UseROM) {
+  if(SiS_Pr->SiS_UseROM && (!(SiS_Pr->SiS_ROMNew))) {
      if(HwInfo->jChipType >= SIS_661) {
-	romptr = ROMAddr[0x26c] | (ROMAddr[0x26d] << 8);
+        romptr = SISGETROMW(0x26c);
+        if(HwInfo->jChipType >= SIS_760) {
+	   romptr = SISGETROMW(0x36c);
+	}
 	temp1 = GetOEMTVPtr661(SiS_Pr);
         temp1 >>= 1;
      } else if(HwInfo->jChipType >= SIS_330) {
-        romptr = ROMAddr[0x1a4] | (ROMAddr[0x1a5] << 8);
+        romptr = SISGETROMW(0x1a4);
      } else {
-        romptr = ROMAddr[0x124] | (ROMAddr[0x125] << 8);
+        romptr = SISGETROMW(0x124);
      }
   }
 
@@ -11645,62 +10957,15 @@
 SetYFilter(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
            USHORT ModeNo,USHORT ModeIdIndex)
 {
-  UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
-  USHORT index, myindex, oldindex,temp, i, j, flag1 = 0, flag2 = 0, romptr = 0;
-  ULONG  lindex;
+  USHORT index, temp, i, j;
 
-  if(ModeNo<=0x13) {
-    index =  SiS_Pr->SiS_SModeIDTable[ModeIdIndex].VB_StTVYFilterIndex;
+  if(ModeNo <= 0x13) {
+     index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].VB_StTVYFilterIndex;
   } else {
-    index =  SiS_Pr->SiS_EModeIDTable[ModeIdIndex].VB_ExtTVYFilterIndex;
-  }
-
-  oldindex = index;
-
-  if((HwInfo->jChipType >= SIS_661) && ROMAddr && SiS_Pr->SiS_UseROM) {
-     if(ModeNo > 0x13) {
-        index =  SiS_Pr->SiS_EModeIDTable[ModeIdIndex].VB_ExtTVYFilterIndexROM661;
-     }
-     lindex = GetOEMTVPtr661_2(SiS_Pr);
-     if(lindex & 0x00ff0000) flag1 = 1;
-     if(lindex & 0xff000000) flag2 = 1;
-     lindex &= 0xffff;
-
-     /* NTSC-J: Use PAL filters */
-     if(SiS_Pr->SiS_TVMode & TVSetNTSCJ) lindex = 1;
-
-     romptr = ROMAddr[0x268] | (ROMAddr[0x269] << 8);
-     if(flag1) myindex = index * 7;
-     else      myindex = index << 2;
-
-     if(romptr) {
-        romptr += (lindex << 1);
-        romptr = (ROMAddr[romptr] | (ROMAddr[romptr+1] << 8)) + myindex;
-	if(romptr) {
-           if((!flag1) && (flag2)) {
-	      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x35,0x00);
-	      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x36,0x00);
-	      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x37,0x00);
-	      SiS_SetReg(SiS_Pr->SiS_Part2Port,0x38,ROMAddr[romptr++]);
-           } else {
-	      for(i=0x35; i<=0x38; i++) {
-                 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,ROMAddr[romptr++]);
-              }
-           }
-           if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-	      for(j=0, i=0x48; i<=0x4a; i++, j++) {
-                 SiS_SetReg(SiS_Pr->SiS_Part2Port,i,ROMAddr[romptr++]);
-              }
-           }
-           return;
-	}
-     }
+     index = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].VB_ExtTVYFilterIndex;
   }
 
-  index = oldindex;
-
-  temp = GetTVPtrIndex(SiS_Pr);
-  temp >>= 1;  			/* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */
+  temp = GetTVPtrIndex(SiS_Pr) >> 1;  /* 0: NTSC/YPbPr, 1: PAL, 2: HiTV */
 
   if(SiS_Pr->SiS_TVMode & TVSetNTSCJ)	     temp = 1;  /* NTSC-J uses PAL */
   else if(SiS_Pr->SiS_TVMode & TVSetPALM)    temp = 3;  /* PAL-M */
@@ -11734,21 +10999,11 @@
   /* NTSC-J data not in BIOS, and already set in SetGroup2 */
   if(SiS_Pr->SiS_TVMode & TVSetNTSCJ) return;
 
-  if(HwInfo->jChipType >= SIS_661) {
-     lindex = GetOEMTVPtr661_2(SiS_Pr) & 0xffff;
+  if((HwInfo->jChipType >= SIS_661) || SiS_Pr->SiS_ROMNew) {
+     lindex = GetOEMTVPtr661_2_OLD(SiS_Pr) & 0xffff;
      lindex <<= 2;
-     if((ROMAddr) && SiS_Pr->SiS_UseROM) {
-        romptr = ROMAddr[0x264] | (ROMAddr[0x265] << 8);
-     }
-     if(romptr) {
-	romptr += lindex;
-	for(j=0, i=0x31; i<=0x34; i++, j++) {
-           SiS_SetReg(SiS_Pr->SiS_Part2Port,i,ROMAddr[romptr + j]);
-        }
-     } else {
-        for(j=0, i=0x31; i<=0x34; i++, j++) {
-           SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS661_TVPhase[lindex + j]);
-        }
+     for(j=0, i=0x31; i<=0x34; i++, j++) {
+        SiS_SetReg(SiS_Pr->SiS_Part2Port,i,SiS661_TVPhase[lindex + j]);
      }
      return;
   }
@@ -11766,20 +11021,20 @@
   /* 0: NTSC Graphics, 1: NTSC Text,    2: PAL Graphics,
    * 3: PAL Text,      4: HiTV Graphics 5: HiTV Text
    */
-  if((ROMAddr) && SiS_Pr->SiS_UseROM) {
-     romptr = ROMAddr[0x116] | (ROMAddr[0x117] << 8);
+  if(SiS_Pr->SiS_UseROM) {
+     romptr = SISGETROMW(0x116);
      if(HwInfo->jChipType >= SIS_330) {
-        romptr = ROMAddr[0x196] | (ROMAddr[0x197] << 8);
+        romptr = SISGETROMW(0x196);
      }
      if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-        romptr = ROMAddr[0x11c] | (ROMAddr[0x11d] << 8);
+        romptr = SISGETROMW(0x11c);
 	if(HwInfo->jChipType >= SIS_330) {
-	   romptr = ROMAddr[0x19c] | (ROMAddr[0x19d] << 8);
+	   romptr = SISGETROMW(0x19c);
 	}
 	if((SiS_Pr->SiS_VBInfo & SetInSlaveMode) && (!(SiS_Pr->SiS_TVMode & TVSetTVSimuMode))) {
-	   romptr = ROMAddr[0x116] | (ROMAddr[0x117] << 8);
+	   romptr = SISGETROMW(0x116);
 	   if(HwInfo->jChipType >= SIS_330) {
-              romptr = ROMAddr[0x196] | (ROMAddr[0x197] << 8);
+              romptr = SISGETROMW(0x196);
            }
 	}
      }
@@ -11832,7 +11087,7 @@
       SetAntiFlicker(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
       SetPhaseIncr(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
       SetYFilter(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
-      if(!(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)) {
+      if(SiS_Pr->SiS_VBType & VB_SIS301) {
          SetEdgeEnhance(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
       }
    }
@@ -11842,65 +11097,108 @@
 SetDelayComp661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo,
                 USHORT ModeIdIndex, USHORT RTI)
 {
-   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
    USHORT delay = 0, romptr = 0, index;
-   UCHAR  *myptr = NULL;
-   UCHAR  temp;
+   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
 
    if(!(SiS_Pr->SiS_VBInfo & (SetCRT2ToTV | SetCRT2ToLCD | SetCRT2ToLCDA | SetCRT2ToRAMDAC)))
       return;
 
-   delay = SiS_Pr->SiS_RefIndex[RTI].Ext_PDC;
+   /* 1. New ROM: VGA2 and LCD/LCDA-Pass1:1 */
+
+   if(SiS_Pr->SiS_ROMNew) {
+      if((SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) 			||
+         ((SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) &&
+	  (SiS_Pr->SiS_LCDInfo & LCDPass11))) {
+         index = 25;
+         if(SiS_Pr->UseCustomMode) {
+	    index = SiS_Pr->CSRClock;
+         } else if(ModeNo > 0x13) {
+            index = SiS_GetVCLK2Ptr(SiS_Pr,ModeNo,ModeIdIndex,RTI,HwInfo);
+            index = SiS_Pr->SiS_VCLKData[index].CLOCK;
+         }
+	 if(index < 25) index = 25;
+         index = ((index / 25) - 1) << 1;
+         if((ROMAddr[0x5b] & 0x80) || (SiS_Pr->SiS_VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToLCD))) {
+	    index++;
+	 }
+	 romptr = SISGETROMW(0x104);  /* 0x4ae */
+         delay = ROMAddr[romptr + index];
+         if(SiS_Pr->SiS_VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToLCD)) {
+            SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0xf0,((delay >> 1) & 0x0f));
+            SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x35,0x7f,((delay & 0x01) << 7));
+         } else {
+            SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0x0f,((delay << 3) & 0xf0));
+	    SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x20,0xbf,((delay & 0x01) << 6));
+         }
+         return;
+      }
+   }
+
+   /* 2. Old ROM: VGA2 and LCD/LCDA-Pass 1:1 */
 
-   delay &= 0xf0;
-   delay >>= 4;
-   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) delay <<= 12;  /* BIOS: 8, wrong */
+   if(SiS_Pr->UseCustomMode) delay = 0x04;
+   else if(ModeNo <= 0x13)   delay = 0x04;
+   else                      delay = (SiS_Pr->SiS_RefIndex[RTI].Ext_PDC >> 4);
+   delay |= (delay << 8);
 
    if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
+
+      /* 3. TV */
+
       index = GetOEMTVPtr661(SiS_Pr);
-      if((ROMAddr) && SiS_Pr->SiS_UseROM) {
-         romptr = ROMAddr[0x25c] | (ROMAddr[0x25d] << 8);
-         if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-            romptr = ROMAddr[0x25e] | (ROMAddr[0x25f] << 8);
-         }
-      }
-      if(romptr) myptr = &ROMAddr[romptr];
-      if(!myptr) {
-         myptr = (UCHAR *)SiS_TVDelay661_301;
-	 if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-	    myptr = (UCHAR *)SiS_TVDelay661_301B;
-	 }
+      if(SiS_Pr->SiS_ROMNew) {
+         romptr = SISGETROMW(0x106);  /* 0x4ba */
+         delay = ROMAddr[romptr + index];
+      } else {
+         delay = 0x04;
       }
-      delay = myptr[index];
-      if(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x13) & 0x04) delay >>= 4;  /* Should test dual edge */
+
    } else if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
-      if(SiS_Pr->PDC) {
-         delay = SiS_Pr->PDC & 0x0f;
-	 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
-            delay |= (delay << 12);
+
+      /* 4. LCD, LCDA (for new ROM only LV and non-Pass 1:1) */
+
+      if( (SiS_Pr->SiS_LCDResInfo != Panel_Custom) &&
+          ((romptr = GetLCDStructPtr661_2(SiS_Pr, HwInfo))) ) {
+
+	 /* For LV, the BIOS must know about the correct value */
+	 delay = ROMAddr[romptr + 0x0d];		/* LCD  */
+	 delay |= (ROMAddr[romptr + 0x0c] << 8);	/* LCDA */
+
+      } else {
+
+         /* TMDS: Set our own, since BIOS has no idea - TODO: Find out about values */
+         if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+            if((SiS_Pr->PanelXRes <= 1024) && (SiS_Pr->PanelYRes <= 768)) {
+	       delay = 0x0404;
+            } else if((SiS_Pr->PanelXRes <= 1280) && (SiS_Pr->PanelYRes <= 1024)) {
+	       delay = 0x0404;
+            } else if((SiS_Pr->PanelXRes <= 1400) && (SiS_Pr->PanelYRes <= 1050)) {
+	       delay = 0x1004;
+            } else
+	       delay = 0x0000;
+         }
+
+	 /* Override by detected or user-set values */
+	 /* (but only if, for some reason, we can't read value from BIOS) */
+         if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && (SiS_Pr->PDC != -1)) {
+            delay = SiS_Pr->PDC & 0x1f;
          }
-      } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) {
-         delay = 0x4444;  /* TEST THIS */
-      } else if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
-         myptr = GetLCDStructPtr661(SiS_Pr, HwInfo);
-         if(myptr) delay = myptr[4];
-         else delay = 0x44;
-         if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
-            delay |= (delay << 8);
+         if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) && (SiS_Pr->PDCA != -1)) {
+            delay = (SiS_Pr->PDCA & 0x1f) << 8;
          }
+
       }
-   }
 
-   temp = SiS_GetReg(SiS_Pr->SiS_Part1Port,0x2d);
-   if(SiS_Pr->SiS_VBInfo & (SetCRT2ToTV | SetCRT2ToLCD | SetCRT2ToRAMDAC)) {
-      temp &= 0xf0;
-      temp |= (delay & 0x000f);
    }
+
    if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
-      temp &= 0x0f;
-      temp |= ((delay & 0xf000) >> 8);
+      delay >>= 8;
+      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0x0f,((delay << 3) & 0xf0));
+      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x20,0xbf,((delay & 0x01) << 6));
+   } else {
+      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0xf0,((delay >> 1) & 0x0f));
+      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x35,0x7f,((delay & 0x01) << 7));
    }
-   SiS_SetReg(SiS_Pr->SiS_Part1Port,0x2d,temp);
 }
 
 static void
@@ -11909,38 +11207,50 @@
    USHORT infoflag;
    UCHAR temp;
 
-   infoflag = SiS_Pr->SiS_RefIndex[RTI].Ext_InfoFlag;
-   if(ModeNo <= 0x13) {
-      infoflag = SiS_GetRegByte(SiS_Pr->SiS_P3ca+2);
-   }
-   infoflag &= 0xc0;
    if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+
+      if(ModeNo <= 0x13) {
+         infoflag = SiS_GetRegByte(SiS_Pr->SiS_P3ca+2);
+      } else if(SiS_Pr->UseCustomMode) {
+         infoflag = SiS_Pr->CInfoFlag;
+      } else {
+         infoflag = SiS_Pr->SiS_RefIndex[RTI].Ext_InfoFlag;
+      }
+      infoflag &= 0xc0;
+
       temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37);
-      if(temp & 0x20) infoflag = temp;
+      if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
+         temp &= 0x3f;
+	 temp |= infoflag;
+      } else {
+         if(temp & 0x20) infoflag = temp;
+      }
       if(temp & 0x01) infoflag |= 0x01;
-   }
-   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-      temp = 0x0c;
-      if(infoflag & 0x01) temp ^= 0x14;  /* BIOS: 18, wrong */
-      temp |= (infoflag >> 6);
-      SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1a,0xe0,temp);
-   }
-   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
-      temp = 0;
-      if(infoflag & 0x01) temp |= 0x80;
-      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1a,0x7f,temp);
-      temp = 0x30;
-      if(infoflag & 0x01) temp = 0x20;
-      infoflag &= 0xc0;
-      temp |= infoflag;
-      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0f,temp);
+
+      if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+         temp = 0x0c;
+         if(infoflag & 0x01) temp ^= 0x14;  /* BIOS: 18, wrong */
+         temp |= (infoflag >> 6);
+         SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1a,0xe0,temp);
+      } else {
+         temp = 0;
+         if(infoflag & 0x01) temp |= 0x80;
+         SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1a,0x7f,temp);
+         temp = 0x30;
+         if(infoflag & 0x01) temp = 0x20;
+         infoflag &= 0xc0;
+         temp |= infoflag;
+         SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0f,temp);
+      }
+
    }
 }
 
 static void
 SetPanelParms661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-   UCHAR *myptr;
+   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
+   USHORT romptr, temp1, temp2;
 
    if(SiS_Pr->SiS_VBType & (VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV)) {
       if(SiS_Pr->LVDSHL != -1) {
@@ -11948,16 +11258,24 @@
       }
    }
 
-   myptr = GetLCDStructPtr661(SiS_Pr, HwInfo);
-   if(myptr) {
-      if(SiS_Pr->SiS_VBType & (VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV)) {
-         if(SiS_Pr->LVDSHL == -1) {
-            SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x24,0xE0,myptr[1] & 0x1f);
-	 } else {
-	    SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x24,0xE3,myptr[1] & 0x1c);
+   if(SiS_Pr->SiS_ROMNew) {
+
+      if((romptr = GetLCDStructPtr661_2(SiS_Pr, HwInfo))) {
+         if(SiS_Pr->SiS_VBType & (VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV)) {
+            temp1 = (ROMAddr[romptr] & 0x03) | 0x0c;
+	    temp2 = 0xfc;
+	    if(SiS_Pr->LVDSHL != -1) {
+	      temp1 &= 0xfc;
+	      temp2 = 0xf3;
+	    }
+	    SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x24,temp2,temp1);
+         }
+	 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
+            temp1 = (ROMAddr[romptr + 1] & 0x80) >> 1;
+            SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x0d,0xbf,temp1);
 	 }
       }
-      SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x0d,0x3f,myptr[2] & 0xc0);
+
    }
 }
 
@@ -11978,7 +11296,7 @@
          SetPhaseIncr(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
          SetYFilter(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
          SetAntiFlicker(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
-         if(!(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV)) {
+         if(SiS_Pr->SiS_VBType & VB_SIS301) {
             SetEdgeEnhance(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
          }
       }
@@ -12007,7 +11325,7 @@
      }
   }
 
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) return;
+  if(SiS_Pr->SiS_LCDResInfo == Panel_Custom) return;
   if(SiS_Pr->UseCustomMode) return;
 
   switch(SiS_Pr->SiS_CustomT) {
@@ -12037,7 +11355,7 @@
   }
 
   if(SiS_Pr->SiS_CustomT == CUT_CLEVO1024) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
         /* Maybe all panels? */
         if(SiS_Pr->LVDSHL == -1) {
            SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x24,0xfc,0x01);
@@ -12048,7 +11366,7 @@
 
   if(SiS_Pr->SiS_CustomT == CUT_CLEVO10242) {
      if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
-        if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
+        if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
 	   if(SiS_Pr->LVDSHL == -1) {
 	      /* Maybe all panels? */
               SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x24,0xfc,0x01);
@@ -12068,15 +11386,15 @@
   }
 
   if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
-     if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
-#ifdef SET_EMI
+     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
 	if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
 	   SiS_SetReg(SiS_Pr->SiS_Part4Port,0x2a,0x00);
+#ifdef SET_EMI
 	   SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
+#endif
 	   SiS_SetReg(SiS_Pr->SiS_Part4Port,0x34,0x10);
 	}
-#endif
-     } else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x1024) {
+     } else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) {
         if(SiS_Pr->LVDSHL == -1) {
            /* Maybe ACER only? */
            SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x24,0xfc,0x01);
@@ -12084,9 +11402,9 @@
      }
      tempch = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4;
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
-	if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1400x1050) {
+	if(SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) {
 	   SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1f,0x76);
-	} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
+	} else if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
 	   if(tempch == 0x03) {
 	      SiS_SetReg(SiS_Pr->SiS_Part1Port,0x18,0x02);
 	      SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1b,0x25);
@@ -12167,7 +11485,7 @@
 	tempbh >>= 4;
 	tempbl = SiS_GetReg(SiS_Pr->SiS_Part2Port,0x04);
 	tempbx = (tempbh << 8) | tempbl;
-	if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
+	if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
 	   if((resinfo == SIS_RI_1024x768) || (!(SiS_Pr->SiS_LCDInfo & DontExpandLCD))) {
 	      if(SiS_Pr->SiS_SetFlag & LCDVESATiming) {
 	      	 tempbx = 770;
@@ -12258,19 +11576,16 @@
 
     tempbx = (SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) & 0x0f) - 2;
     if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx += 4;
-    if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
+    if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
        if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx += 3;
     }
-    if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+    if(SiS_Pr->SiS_UseROM) {
        if(ROMAddr[0x235] & 0x80) {
           tempbx = SiS_Pr->SiS_LCDTypeInfo;
           if(Flag) {
-	     romptr = ROMAddr[0x255] | (ROMAddr[0x256] << 8);
-	     if(romptr) {
-	        tempbx = ROMAddr[romptr + SiS_Pr->SiS_LCDTypeInfo];
-	     } else {
-	        tempbx = customtable300[SiS_Pr->SiS_LCDTypeInfo];
-	     }
+	     romptr = SISGETROMW(0x255);
+	     if(romptr) tempbx = ROMAddr[romptr + SiS_Pr->SiS_LCDTypeInfo];
+	     else       tempbx = customtable300[SiS_Pr->SiS_LCDTypeInfo];
              if(tempbx == 0xFF) return 0xFFFF;
           }
 	  tempbx <<= 1;
@@ -12281,13 +11596,10 @@
   } else {
 
     if(Flag) {
-       if((ROMAddr) && SiS_Pr->SiS_UseROM) {
-          romptr = ROMAddr[0x255] | (ROMAddr[0x256] << 8);
-	  if(romptr) {
-	     tempbx = ROMAddr[romptr + SiS_Pr->SiS_LCDTypeInfo];
-	  } else {
-	     tempbx = 0xff;
-	  }
+       if(SiS_Pr->SiS_UseROM) {
+          romptr = SISGETROMW(0x255);
+	  if(romptr) tempbx = ROMAddr[romptr + SiS_Pr->SiS_LCDTypeInfo];
+	  else 	     tempbx = 0xff;
        } else {
           tempbx = customtable630[SiS_Pr->SiS_LCDTypeInfo];
        }
@@ -12311,12 +11623,12 @@
   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
   USHORT index,temp,romptr=0;
 
-  if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) return;
+  if(SiS_Pr->SiS_LCDResInfo == Panel_Custom) return;
 
-  if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+  if(SiS_Pr->SiS_UseROM) {
      if(!(ROMAddr[0x237] & 0x01)) return;
      if(!(ROMAddr[0x237] & 0x02)) return;
-     romptr = ROMAddr[0x24b] | (ROMAddr[0x24c] << 8);
+     romptr = SISGETROMW(0x24b);
   }
 
   /* The Panel Compensation Delay should be set according to tables
@@ -12326,7 +11638,7 @@
    * Thus we don't set this if the user select a custom pdc or if
    * we otherwise detected a valid pdc.
    */
-  if(SiS_Pr->PDC) return;
+  if(SiS_Pr->PDC != -1) return;
 
   temp = GetOEMLCDPtr(SiS_Pr,HwInfo, 0);
 
@@ -12338,7 +11650,7 @@
   if(HwInfo->jChipType != SIS_300) {
      if(romptr) {
 	romptr += (temp * 2);
-	romptr = ROMAddr[romptr] | (ROMAddr[romptr + 1] << 8);
+	romptr = SISGETROMW(romptr);
 	romptr += index;
 	temp = ROMAddr[romptr];
      } else {
@@ -12349,21 +11661,21 @@
         }
      }
   } else {
-     if((ROMAddr) && SiS_Pr->SiS_UseROM && (ROMAddr[0x235] & 0x80)) {
+     if(SiS_Pr->SiS_UseROM && (ROMAddr[0x235] & 0x80)) {
 	if(romptr) {
 	   romptr += (temp * 2);
-	   romptr = ROMAddr[romptr] | (ROMAddr[romptr + 1] << 8);
+	   romptr = SISGETROMW(romptr);
 	   romptr += index;
 	   temp = ROMAddr[romptr];
 	} else {
 	   temp = SiS300_OEMLCDDelay5[temp][index];
 	}
      } else {
-        if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+        if(SiS_Pr->SiS_UseROM) {
 	   romptr = ROMAddr[0x249] | (ROMAddr[0x24a] << 8);
 	   if(romptr) {
 	      romptr += (temp * 2);
-	      romptr = ROMAddr[romptr] | (ROMAddr[romptr + 1] << 8);
+	      romptr = SISGETROMW(romptr);
 	      romptr += index;
 	      temp = ROMAddr[romptr];
 	   } else {
@@ -12386,7 +11698,7 @@
   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
   USHORT index,temp;
 
-  if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+  if((SiS_Pr->SiS_UseROM) {
      if(!(ROMAddr[0x237] & 0x01)) return;
      if(!(ROMAddr[0x237] & 0x04)) return;
      /* No rom pointer in BIOS header! */
@@ -12436,10 +11748,10 @@
   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
   USHORT index,temp,romptr=0;
 
-  if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+  if(SiS_Pr->SiS_UseROM) {
      if(!(ROMAddr[0x238] & 0x01)) return;
      if(!(ROMAddr[0x238] & 0x02)) return;
-     romptr = ROMAddr[0x241] | (ROMAddr[0x242] << 8);
+     romptr = SISGETROMW(0x241);
   }
 
   temp = GetOEMTVPtr(SiS_Pr);
@@ -12448,7 +11760,7 @@
 
   if(romptr) {
      romptr += (temp * 2);
-     romptr = ROMAddr[romptr] | (ROMAddr[romptr + 1] << 8);
+     romptr = SISGETROMW(romptr);
      romptr += index;
      temp = ROMAddr[romptr];
   } else {
@@ -12459,7 +11771,7 @@
      }
   }
   temp &= 0x3c;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp);  /* index 0A D[6:4] */
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp);
 }
 
 static void
@@ -12469,10 +11781,10 @@
   UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
   USHORT index,temp,romptr=0;
 
-  if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+  if(SiS_Pr->SiS_UseROM) {
      if(!(ROMAddr[0x238] & 0x01)) return;
      if(!(ROMAddr[0x238] & 0x04)) return;
-     romptr = ROMAddr[0x243] | (ROMAddr[0x244] << 8);
+     romptr = SISGETROMW(0x243);
   }
 
   temp = GetOEMTVPtr(SiS_Pr);
@@ -12481,14 +11793,14 @@
 
   if(romptr) {
      romptr += (temp * 2);
-     romptr = ROMAddr[romptr] | (ROMAddr[romptr + 1] << 8);
+     romptr = SISGETROMW(romptr);
      romptr += index;
      temp = ROMAddr[romptr];
   } else {
      temp = SiS300_OEMTVFlicker[temp][index];
   }
   temp &= 0x70;
-  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x0A,0x8F,temp);  /* index 0A D[6:4] */
+  SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x0A,0x8F,temp);
 }
 
 static void
@@ -12502,10 +11814,10 @@
 
   if(SiS_Pr->SiS_TVMode & (TVSetNTSC1024 | TVSetNTSCJ | TVSetPALM | TVSetPALN)) return;
 
-  if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+  if(SiS_Pr->SiS_UseROM) {
      if(!(ROMAddr[0x238] & 0x01)) return;
      if(!(ROMAddr[0x238] & 0x08)) return;
-     romptr = ROMAddr[0x245] | (ROMAddr[0x246] << 8);
+     romptr = SISGETROMW(0x245);
   }
 
   temp = GetOEMTVPtr(SiS_Pr);
@@ -12519,7 +11831,7 @@
   } else {
      if(romptr) {
         romptr += (temp * 2);
-	romptr = ROMAddr[romptr] | (ROMAddr[romptr + 1] << 8);
+	romptr = SISGETROMW(romptr);
 	romptr += (index * 4);
         for(i=0x31, j=0; i<=0x34; i++, j++) {
 	   SiS_SetReg(SiS_Pr->SiS_Part2Port,i,ROMAddr[romptr + j]);
@@ -12541,10 +11853,10 @@
 
   if(SiS_Pr->SiS_VBInfo & (SetCRT2ToSCART | SetCRT2ToHiVision | SetCRT2ToYPbPr525750)) return;
 
-  if((ROMAddr) && SiS_Pr->SiS_UseROM) {
+  if(SiS_Pr->SiS_UseROM) {
      if(!(ROMAddr[0x238] & 0x01)) return;
      if(!(ROMAddr[0x238] & 0x10)) return;
-     romptr = ROMAddr[0x247] | (ROMAddr[0x248] << 8);
+     romptr = SISGETROMW(0x247);
   }
 
   temp = GetOEMTVPtr(SiS_Pr);
@@ -12565,7 +11877,7 @@
   } else {
       if((romptr) && (!(SiS_Pr->SiS_TVMode & (TVSetPALM|TVSetPALN)))) {
          romptr += (temp * 2);
-	 romptr = ROMAddr[romptr] | (ROMAddr[romptr + 1] << 8);
+	 romptr = SISGETROMW(romptr);
 	 romptr += (index * 4);
 	 for(i=0x35, j=0; i<=0x38; i++, j++) {
        	    SiS_SetReg(SiS_Pr->SiS_Part2Port,i,ROMAddr[romptr + j]);
--- diff/drivers/video/sis/init301.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/init301.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * Data and prototypes for init301.c
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -91,29 +89,41 @@
     0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b,
     0x0c,0x50,0x00,0x97,0x00,0xda,0x4a,0x17,
     0x7d,0x05,0x4b,0x00,0x00,0xe2,0x00,0x02,
-    0x03,0x0a,0x65,0x9d,0x08,0x92,0x8f,0x40,
-    0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x53,
+    0x03,0x0a,0x65,0x9d /*0x8d*/,0x08,0x92,0x8f,0x40,
+    0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x53 /*0x50*/,
     0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00
   },
   {
     0x1d,0x11,0x06,0x09,0x0b,0x0c,0x0c,0x0c,
     0x98,0x0a,0x01,0x0d,0x06,0x0d,0x04,0x0a,
     0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
-    0x0c,0x50,0xb2,0x9f,0x16,0x59,0x4f,0x13,
+    0x0c,0x50,0xb2,0x9f,0x16,0x59,0x4c /*0x4f*/,0x13,
     0xad,0x11,0xad,0x1d,0x40,0x8a,0x3d,0xb8,
-    0x51,0x5e,0x60,0x49,0x7d,0x92,0x0f,0x40,
+    0x51,0x5e,0x60,0x57 /*0x49*/,0x7b /*0x7d*/,0x92,0x0f,0x40,
     0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x4b,
     0x43,0x41,0x11,0x00,0xfc,0xff,0x32,0x00
   },
   {
+#if 1
     0x13,0x1d,0xe8,0x09,0x09,0xed,0x0c,0x0c,
     0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a,
     0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
-    0xed,0x50,0x70,0x9f,0x16,0x59,0x2b,0x13,
+    0xed,0x50,0x70,0x9f,0x16,0x59,0x21 /*0x2b*/,0x13,
     0x27,0x0b,0x27,0xfc,0x30,0x27,0x1c,0xb0,
-    0x4b,0x4b,0x6f,0x2f,0x63,0x92,0x0f,0x40,
+    0x4b,0x4b,0x65 /*0x6f*/,0x2f,0x63,0x92,0x0f,0x40,
     0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x27,
     0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00
+#endif
+#if 0
+    0x2a,0x14,0xe8,0x09,0x09,0xed,0x0c,0x0c,  /* TEST (0.93) - BAD */
+    0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a,
+    0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
+    0xed,0x50,0x70,0x9e,0x16,0x57,0x6c,0x13,
+    0x27,0x0b,0x27,0xfb,0x30,0x27,0x15,0xb0,
+    0x3b,0xdb,0x61,0x24,0x78,0x92,0x0f,0xff,
+    0xff,0xff,0xff,0xff,0xff,0xff,0x14,0x6f,
+    0x00,0x52,0xbb,0x00,0xd5,0xf7,0xa2,0x00
+#endif
   }
 };
 
@@ -139,7 +149,7 @@
     0x18, 0x1d, 0x23, 0x28, 0x4c, 0xaa, 0x01
 };
 
-/* 301C / 302ELV (?) extended Part2 TV registers */
+/* 301C / 302ELV extended Part2 TV registers */
 
 static const UCHAR SiS_Part2CLVX_1[] = {
     0x00,0x00,
@@ -208,28 +218,84 @@
     0x00,0x04,
     0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E,0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D,
     0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D,0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C,
-    0x7C,0x14,0x14,0x7C,0x7C,0x12,0x15,0x7D,0x7C,0x10,0x17,0x1D /* 0x7D? */ ,0x7C,0x0D,0x18,0x7F,
+    0x7C,0x14,0x14,0x7C,0x7C,0x12,0x15,0x7D,0x7C,0x10,0x17,0x7D,0x7C,0x0D,0x18,0x7F,
     0x7D,0x0B,0x19,0x7F,0x7D,0x09,0x1A,0x00,0x7D,0x07,0x1A,0x02,0x7E,0x05,0x1B,0x02,
     0xFF,0xFF,
 };
 
-
 #ifdef SIS315H
-/* 661 et al LCD data structure */
+/* 661 et al LCD data structure (0.94.0) */
 static const UCHAR SiS_LCDStruct661[] = {
-    /* 1600x1200 */
-    0x0B,0xEA,0x81,0x10,0x00,0xC0,0x03,0x21,0x5A,0x23,0x5A,0x23,0x02,
-    0x14,0x0A,0x02,0x00,0x30,0x10,0x5A,0x10,0x10,0x0A,0xC0,0x30,0x10,
-    /* 1400x1050 */
-    0x09,0xEA,0x81,0x80,0xA3,0x70,0x03,0x19,0xD2,0x2A,0xF8,0x2F,0x02,
-    0x14,0x0A,0x02,0x00,0x30,0x10,0x5A,0x10,0x10,0x0A,0xC0,0x30,0x10,
-    /* 1280x1024 */
-    0x03,0xEA,0x81,0x40,0xA1,0x70,0x03,0x19,0xD2,0x2A,0xF8,0x2F,0x02,
-    0x14,0x0A,0x02,0x00,0x30,0x10,0x5A,0x10,0x10,0x0A,0xC0,0x30,0x10,
     /* 1024x768 */
-    0x02,0xEA,0x80,0x00,0x11,0x88,0x06,0x0B,0xF5,0x6C,0x35,0x62,0x02,
-    0x14,0x0A,0x02,0x00,0x30,0x10,0x5A,0x10,0x10,0x0A,0xC0,0x28,0x10,
-    0xFF,
+/*  type|CR37|   HDE   |   VDE   |    HT   |    VT   |   hss    | hse   */
+    0x02,0xC0,0x00,0x04,0x00,0x03,0x40,0x05,0x26,0x03,0x10,0x00,0x88,
+    0x00,0x02,0x00,0x06,0x00,0x41,0x5A,0x64,0x00,0x00,0x00,0x00,0x04,
+    /*  | vss      |   vse  |clck|  clock  |CRT2DataP|CRT2DataP|idx     */
+    /*					      VESA    non-VESA  noscale */
+    /* 1280x1024 */
+    0x03,0xC0,0x00,0x05,0x00,0x04,0x98,0x06,0x2A,0x04,0x30,0x00,0x70,
+    0x00,0x01,0x00,0x03,0x00,0x6C,0xF8,0x2F,0x00,0x00,0x00,0x00,0x08,
+    /* 1400x1050 */
+    0x09,0x20,0x78,0x05,0x1A,0x04,0x98,0x06,0x2A,0x04,0x18,0x00,0x38,
+    0x00,0x01,0x00,0x03,0x00,0x6C,0xF8,0x2F,0x00,0x00,0x00,0x00,0x09,
+    /* 1600x1200 */
+    0x0B,0xC0,0x40,0x06,0xB0,0x04,0x70,0x08,0xE2,0x04,0x40,0x00,0xC0,
+    0x00,0x01,0x00,0x03,0x00,0xA2,0x70,0x24,0x00,0x00,0x00,0x00,0x0B,
+    /* 1280x768 */
+    0x0A,0xC0,0x00,0x05,0x00,0x03,0x80,0x05,0x26,0x03,0x10,0x00,0x40,
+    0x00,0x03,0x00,0x06,0x00,0x44,0x63,0x46,0x00,0x00,0x00,0x00,0x06,
+    /* 1280x720 */
+    0x0E,0xE0,0x00,0x05,0xD0,0x02,0x80,0x05,0x26,0x03,0x10,0x00,0x02,
+    0x00,0x01,0x00,0x06,0x00,0x45,0x9C,0x62,0x00,0x00,0x00,0x00,0x05,
+    /* 1280x800 */
+    0x0C,0xE0,0x00,0x05,0x20,0x03,0x80,0x05,0x30,0x03,0x10,0x00,0x40,
+    0x00,0x04,0x00,0x03,0x00,0x45,0x9C,0x62,0x00,0x00,0x00,0x00,0x07,
+    /* 1680x1050 */
+    0x0D,0xE0,0x90,0x06,0x1A,0x04,0x6C,0x07,0x2A,0x04,0x1A,0x00,0x4C,
+    0x00,0x03,0x00,0x06,0x00,0x79,0xBE,0x44,0x00,0x00,0x00,0x00,0x06,
+    /* 1280x768 (not in 0.93) */
+    0x0A,0xC0,0x00,0x05,0x00,0x03,0x80,0x06,0x1E,0x03,0x40,0x00,0x80,
+    0x00,0x03,0x00,0x07,0x00,0x4F,0x00,0x00,0x00,0x00,0x00,0x00,0x06
+};
+#endif
+
+#ifdef SIS300
+static UCHAR SiS300_TrumpionData[7][80] = {
+  { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
+    0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23,
+    0x00,0x00,0x03,0x28,0x03,0x10,0x05,0x08,0x40,0x10,0x00,0x10,0x04,0x23,0x00,0x23,
+    0x03,0x11,0x60,0xBC,0x01,0xFF,0x03,0xFF,0x19,0x01,0x00,0x05,0x09,0x04,0x04,0x05,
+    0x04,0x0C,0x09,0x05,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5A,0x01,0xBE,0x01,0x00 },
+  { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x27,0x00,0x80,0x02,
+    0x20,0x03,0x07,0x00,0x5E,0x01,0x0D,0x02,0x60,0x0C,0x30,0x11,0x00,0x00,0x04,0x23,
+    0x00,0x00,0x03,0x80,0x03,0x28,0x06,0x08,0x40,0x11,0x00,0x11,0x04,0x23,0x00,0x23,
+    0x03,0x11,0x60,0x90,0x01,0xFF,0x0F,0xF4,0x19,0x01,0x00,0x05,0x01,0x00,0x04,0x05,
+    0x04,0x0C,0x02,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEC,0x57,0x01,0xBE,0x01,0x00 },
+  { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x8A,0x00,0xD8,0x02,
+    0x84,0x03,0x16,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x1C,0x00,0x20,0x04,0x23,
+    0x00,0x01,0x03,0x53,0x03,0x28,0x06,0x08,0x40,0x1C,0x00,0x16,0x04,0x23,0x00,0x23,
+    0x03,0x11,0x60,0xD9,0x01,0xFF,0x0F,0xF4,0x18,0x07,0x05,0x05,0x13,0x04,0x04,0x05,
+    0x01,0x0B,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x59,0x01,0xBE,0x01,0x00 },
+  { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x72,0x00,0xD8,0x02,
+    0x84,0x03,0x16,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x1C,0x00,0x20,0x04,0x23,
+    0x00,0x01,0x03,0x53,0x03,0x28,0x06,0x08,0x40,0x1C,0x00,0x16,0x04,0x23,0x00,0x23,
+    0x03,0x11,0x60,0xDA,0x01,0xFF,0x0F,0xF4,0x18,0x07,0x05,0x05,0x13,0x04,0x04,0x05,
+    0x01,0x0B,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 },
+  { 0x02,0x0A,0x02,0x00,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
+    0x20,0x03,0x16,0x00,0xE0,0x01,0x0D,0x02,0x60,0x0C,0x30,0x98,0x00,0x00,0x04,0x23,
+    0x00,0x01,0x03,0x45,0x03,0x48,0x06,0x08,0x40,0x98,0x00,0x98,0x04,0x23,0x00,0x23,
+    0x03,0x11,0x60,0xF4,0x01,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x05,0x01,0x00,0x05,0x05,
+    0x04,0x0C,0x08,0x05,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5B,0x01,0xBE,0x01,0x00 },
+  { 0x02,0x0A,0x02,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0xBF,0x00,0x20,0x03,
+    0x20,0x04,0x0D,0x00,0x58,0x02,0x71,0x02,0x80,0x0C,0x30,0x9A,0x00,0xFA,0x03,0x1D,
+    0x00,0x01,0x03,0x22,0x03,0x28,0x06,0x08,0x40,0x98,0x00,0x98,0x04,0x1D,0x00,0x1D,
+    0x03,0x11,0x60,0x39,0x03,0x40,0x05,0xF4,0x18,0x07,0x02,0x06,0x04,0x01,0x06,0x0B,
+    0x02,0x0A,0x20,0x19,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5B,0x01,0xBE,0x01,0x00 },
+  { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0xEF,0x00,0x00,0x04,
+    0x40,0x05,0x13,0x00,0x00,0x03,0x26,0x03,0x88,0x0C,0x30,0x90,0x00,0x00,0x04,0x23,
+    0x00,0x01,0x03,0x24,0x03,0x28,0x06,0x08,0x40,0x90,0x00,0x90,0x04,0x23,0x00,0x23,
+    0x03,0x11,0x60,0x40,0x05,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x08,0x01,0x00,0x08,0x01,
+    0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5B,0x01,0xBE,0x01,0x00 }
 };
 #endif
 
@@ -271,46 +337,51 @@
 void   	SiS_Chrontel701xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
 void   	SiS_Chrontel701xBLOff(SiS_Private *SiS_Pr);
 #endif /* 315 */
+#ifdef SIS300
+void    SiS_SetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx);
+USHORT  SiS_GetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx);
+static  BOOLEAN SiS_SetTrumpionBlock(SiS_Private *SiS_Pr, UCHAR *dataptr);
+#endif
 
-USHORT   SiS_ReadDDC1Bit(SiS_Private *SiS_Pr);
-void     SiS_SetSwitchDDC2(SiS_Private *SiS_Pr);
-USHORT   SiS_SetStart(SiS_Private *SiS_Pr);
-USHORT   SiS_SetStop(SiS_Private *SiS_Pr);
-void     SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime);
-USHORT   SiS_SetSCLKLow(SiS_Private *SiS_Pr);
-USHORT   SiS_SetSCLKHigh(SiS_Private *SiS_Pr);
-USHORT   SiS_ReadDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
-USHORT   SiS_WriteDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
-USHORT   SiS_CheckACK(SiS_Private *SiS_Pr);
-
-USHORT   SiS_InitDDCRegs(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
-                         USHORT adaptnum, USHORT DDCdatatype, BOOLEAN checkcr32);
-USHORT   SiS_WriteDABDDC(SiS_Private *SiS_Pr);
-USHORT   SiS_PrepareReadDDC(SiS_Private *SiS_Pr);
-USHORT   SiS_PrepareDDC(SiS_Private *SiS_Pr);
-void     SiS_SendACK(SiS_Private *SiS_Pr, USHORT yesno);
-USHORT   SiS_DoProbeDDC(SiS_Private *SiS_Pr);
-USHORT   SiS_ProbeDDC(SiS_Private *SiS_Pr);
-USHORT   SiS_ReadDDC(SiS_Private *SiS_Pr, USHORT DDCdatatype, unsigned char *buffer);
-USHORT   SiS_HandleDDC(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
-		       USHORT adaptnum, USHORT DDCdatatype, unsigned char *buffer);
+USHORT  SiS_ReadDDC1Bit(SiS_Private *SiS_Pr);
+void    SiS_SetSwitchDDC2(SiS_Private *SiS_Pr);
+USHORT  SiS_SetStart(SiS_Private *SiS_Pr);
+USHORT  SiS_SetStop(SiS_Private *SiS_Pr);
+void    SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime);
+USHORT  SiS_SetSCLKLow(SiS_Private *SiS_Pr);
+USHORT  SiS_SetSCLKHigh(SiS_Private *SiS_Pr);
+USHORT  SiS_ReadDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
+USHORT  SiS_WriteDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
+USHORT  SiS_CheckACK(SiS_Private *SiS_Pr);
+
+USHORT  SiS_InitDDCRegs(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
+                        USHORT adaptnum, USHORT DDCdatatype, BOOLEAN checkcr32);
+USHORT  SiS_WriteDABDDC(SiS_Private *SiS_Pr);
+USHORT  SiS_PrepareReadDDC(SiS_Private *SiS_Pr);
+USHORT  SiS_PrepareDDC(SiS_Private *SiS_Pr);
+void    SiS_SendACK(SiS_Private *SiS_Pr, USHORT yesno);
+USHORT  SiS_DoProbeDDC(SiS_Private *SiS_Pr);
+USHORT  SiS_ProbeDDC(SiS_Private *SiS_Pr);
+USHORT  SiS_ReadDDC(SiS_Private *SiS_Pr, USHORT DDCdatatype, unsigned char *buffer);
+USHORT  SiS_HandleDDC(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
+		      USHORT adaptnum, USHORT DDCdatatype, unsigned char *buffer);
 #ifdef LINUX_XF86
-USHORT   SiS_SenseLCDDDC(SiS_Private *SiS_Pr, SISPtr pSiS);
-USHORT   SiS_SenseVGA2DDC(SiS_Private *SiS_Pr, SISPtr pSiS);
+USHORT  SiS_SenseLCDDDC(SiS_Private *SiS_Pr, SISPtr pSiS);
+USHORT  SiS_SenseVGA2DDC(SiS_Private *SiS_Pr, SISPtr pSiS);
 #endif
 
 #ifdef SIS315H
-void     SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-                           USHORT ModeNo,USHORT ModeIdIndex);
-void     SiS_OEM661Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-                           USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI);
-void     SiS_FinalizeLCD(SiS_Private *, USHORT, USHORT, PSIS_HW_INFO);
+void    SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+                          USHORT ModeNo,USHORT ModeIdIndex);
+void    SiS_OEM661Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+                          USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI);
+void    SiS_FinalizeLCD(SiS_Private *, USHORT, USHORT, PSIS_HW_INFO);
 #endif
 #ifdef SIS300
-void     SiS_OEM300Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-                           USHORT ModeNo, USHORT ModeIdIndex, USHORT RefTabindex);
-void     SetOEMLCDData2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-			USHORT ModeNo, USHORT ModeIdIndex,USHORT RefTableIndex);
+void    SiS_OEM300Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+                          USHORT ModeNo, USHORT ModeIdIndex, USHORT RefTabindex);
+void    SetOEMLCDData2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+		       USHORT ModeNo, USHORT ModeIdIndex,USHORT RefTableIndex);
 #endif
 
 extern void     SiS_SetReg(SISIOADDRESS, USHORT, USHORT);
@@ -338,5 +409,6 @@
 extern void     SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO,USHORT ModeNo,
                             USHORT ModeIdIndex);
 
+extern void	SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex);
 
 #endif
--- diff/drivers/video/sis/initdef.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/initdef.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * Global definitions for init.c and init301.c
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -72,6 +70,8 @@
 #define IS_SIS650740660         (IS_SIS650 || IS_SIS740 || IS_SIS661741660760)
 #define IS_SIS550650740660      (IS_SIS550 || IS_SIS650740660)
 
+#define SISGETROMW(x)		(ROMAddr[(x)] | (ROMAddr[(x)+1] << 8))
+
 /* SiS_VBType */
 #define VB_SIS301	      	0x0001
 #define VB_SIS301B        	0x0002
@@ -85,6 +85,8 @@
 #define VB_SIS301B302B          (VB_SIS301B|VB_SIS301C|VB_SIS302B)
 #define VB_SIS301LV302LV        (VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV)
 #define VB_SISVB		(VB_SIS301 | VB_SIS301BLV302BLV)
+#define VB_SISTMDS		(VB_SIS301 | VB_SIS301B302B)
+#define VB_SISLVDS		VB_SIS301LV302LV
 
 /* VBInfo */
 #define SetSimuScanMode         0x0001   /* CR 30 */
@@ -137,6 +139,7 @@
 #define CRT2Mode                0x0800
 #define HalfDCLK                0x1000
 #define NoSupportSimuTV         0x2000
+#define NoSupportLCDScale	0x4000 /* TMDS: No scaling possible (no matter what panel) */
 #define DoubleScanMode          0x8000
 
 /* Infoflag */
@@ -145,7 +148,7 @@
 #define SupportCHTV 		0x0800
 #define Support64048060Hz       0x0800  /* Special for 640x480 LCD */
 #define SupportHiVision         0x0010
-#define SupportYPbPr            0x1000  /* TODO */
+#define SupportYPbPr750p        0x1000
 #define SupportLCD              0x0020
 #define SupportRAMDAC2          0x0040	/* All           (<= 100Mhz) */
 #define SupportRAMDAC2_135      0x0100  /* All except DH (<= 135Mhz) */
@@ -174,19 +177,22 @@
 #define TVSetPALM		0x0004
 #define TVSetPALN		0x0008
 #define TVSetCHOverScan		0x0010
-#define TVSetYPbPr525i		0x0020
-#define TVSetYPbPr525p		0x0040
-#define TVSetYPbPr750p		0x0080
-#define TVSetHiVision		0x0100  /* = 1080i, software-wise identical */
-#define TVSetTVSimuMode		0x0800
-#define TVRPLLDIV2XO		0x1000
-#define TVSetNTSC1024		0x2000
-
-/* YPbPr flag (>=315, <661) */
-#define YPbPr525p               0x0001	/* 525p */
-#define YPbPr750p               0x0002	/* 750p */
-#define YPbPr525i               0x0004	/* 525p */
-#define YPbPrHiVision           0x0008	/* HiVision or 1080i (bridge type dependent) */
+#define TVSetYPbPr525i		0x0020 /* new 0x10 */
+#define TVSetYPbPr525p		0x0040 /* new 0x20 */
+#define TVSetYPbPr750p		0x0080 /* new 0x40 */
+#define TVSetHiVision		0x0100 /* new 0x80; = 1080i, software-wise identical */
+#define TVSetTVSimuMode		0x0200 /* new 0x200, prev. 0x800 */
+#define TVRPLLDIV2XO		0x0400 /* prev 0x1000 */
+#define TVSetNTSC1024		0x0800 /* new 0x100, prev. 0x2000 */
+#define TVAspect43		0x2000
+#define TVAspect169		0x4000
+#define TVAspect43LB		0x8000
+
+/* YPbPr flag (>=315, <661; converted to TVMode) */
+#define YPbPr525p               0x0001
+#define YPbPr750p               0x0002
+#define YPbPr525i               0x0004
+#define YPbPrHiVision           0x0008
 #define YPbPrModeMask           (YPbPr750p | YPbPr525p | YPbPr525i | YPbPrHiVision)
 
 /* SysFlags (to identify special versions) */
@@ -198,6 +204,7 @@
 #define SF_IsM661		0x0020
 #define SF_IsM741		0x0040
 #define SF_IsM760		0x0080
+#define SF_760LFB		0x8000  /* 760: We have LFB */
 
 /* CR32 (Newer 630, and 315 series)
 
@@ -269,7 +276,7 @@
 #define LCDRGB18Bit           0x0001
 #define LCDNonExpanding       0x0010
 #define LCDSync               0x0020
-#define LCDPass11             0x0100
+#define LCDPass11             0x0100   /* 0: center screen, 1: Pass 1:1 data */
 #define LCDDualLink	      0x0200
 
 #define DontExpandLCD	      LCDNonExpanding
@@ -305,7 +312,7 @@
 #define EnablePALMN             0x40   /* Romflag: 1 = Allow PALM/PALN */
 
 /* CR39 (650 only) */
-#define LCDPass1_1		0x01   /* LVDS only; set by driver to pass 1:1 data to LVDS output  */
+#define LCDPass1_1		0x01   /* 0: center screen, 1: pass 1:1 data output  */
 #define Enable302LV_DualLink    0x04   /* 302LV only; enable dual link */
 
 /* CR39 (661 and later)
@@ -348,7 +355,7 @@
 #define Panel300_1024x600       0x06
 #define Panel300_1152x768       0x07
 #define Panel300_1280x768       0x0a
-#define Panel300_320x480        0x0e 	/* fstn - TW: This is fake, can be any */
+#define Panel300_320x480        0x0e 	/* fstn - This is fake, can be any */
 #define Panel300_Custom		0x0f
 #define Panel300_Barco1366      0x10
 
@@ -368,8 +375,24 @@
 #define Panel310_320x480        0x0e    /* fstn - TW: This is fake, can be any */
 #define Panel310_Custom		0x0f
 
+#define Panel661_800x600        0x01
+#define Panel661_1024x768       0x02
+#define Panel661_1280x1024      0x03
+#define Panel661_640x480        0x04
+#define Panel661_1024x600       0x05
+#define Panel661_1152x864       0x06
+#define Panel661_1280x960       0x07
+#define Panel661_1152x768       0x08
+#define Panel661_1400x1050      0x09
+#define Panel661_1280x768       0x0a
+#define Panel661_1600x1200      0x0b
+#define Panel661_1280x800       0x0c
+#define Panel661_1680x1050      0x0d
+#define Panel661_1280x720       0x0e
+#define Panel661_Custom		0x0f
+
 #define Panel_800x600           0x01	/* Unified values */
-#define Panel_1024x768          0x02
+#define Panel_1024x768          0x02    /* MUST match BIOS values from 0-e */
 #define Panel_1280x1024         0x03
 #define Panel_640x480           0x04
 #define Panel_1024x600          0x05
@@ -377,16 +400,19 @@
 #define Panel_1280x960          0x07
 #define Panel_1152x768          0x08	/* LVDS only */
 #define Panel_1400x1050         0x09
-#define Panel_1280x768          0x0a    /* LVDS only */
+#define Panel_1280x768          0x0a    /* 30xB/C and LVDS only (BIOS: all) */
 #define Panel_1600x1200         0x0b
-#define Panel_640x480_2		0x0c
-#define Panel_640x480_3		0x0d
-#define Panel_320x480           0x0e    /* fstn - TW: This is fake, can be any */
-#define Panel_Custom		0x0f
-#define Panel_Barco1366         0x10
-#define Panel_848x480		0x11
-#define Panel_1280x800		0x12    /* 661etc: 0x0c */
-#define Panel_1680x1050         0x13    /* 661etc: 0x0d */
+#define Panel_1280x800		0x0c    /* 661etc  */
+#define Panel_1680x1050         0x0d    /* 661etc  */
+#define Panel_1280x720		0x0e    /* 661etc  */
+#define Panel_Custom		0x0f	/* MUST BE 0x0f (for DVI DDC detection */
+#define Panel_320x480           0x10    /* SiS 550 fstn - TW: This is fake, can be any */
+#define Panel_Barco1366         0x11
+#define Panel_848x480		0x12
+#define Panel_640x480_2		0x13    /* SiS 550 */
+#define Panel_640x480_3		0x14    /* SiS 550 */
+#define Panel_1280x768_2        0x15	/* 30xLV */
+#define Panel_1280x768_3        0x16    /* 30xLV */
 
 /* Index in ModeResInfo table */
 #define SIS_RI_320x200    0
@@ -411,13 +437,17 @@
 #define SIS_RI_856x480   19
 #define SIS_RI_1280x768  20
 #define SIS_RI_1400x1050 21
-#define SIS_RI_1152x864  22  /* Up to this SiS conforming */
+#define SIS_RI_1152x864  22  /* Up to here SiS conforming */
 #define SIS_RI_848x480   23
 #define SIS_RI_1360x768  24
 #define SIS_RI_1024x600  25
 #define SIS_RI_1152x768  26
 #define SIS_RI_768x576   27
 #define SIS_RI_1360x1024 28
+#define SIS_RI_1680x1050 29
+#define SIS_RI_1280x800  30
+#define SIS_RI_1920x1080 31
+#define SIS_RI_960x540   32
 
 /* CR5F */
 #define IsM650                  0x80
@@ -445,14 +475,32 @@
 #define VCLK108_3_300           0x42   /* Index in VCLKData table (300) */
 #define VCLK100_300             0x43   /* Index in VCLKData table (300) */
 #define VCLK34_300              0x3d   /* Index in VCLKData table (300) */
+#define VCLK_CUSTOM_300		0x46
 #define VCLK65_315              0x0b   /* Index in (VB)VCLKData table (315) */
 #define VCLK108_2_315           0x19   /* Index in (VB)VCLKData table (315) */
 #define VCLK81_315		0x5b   /* Index in (VB)VCLKData table (315) */
-#define VCLK162_315             0x21   /* Index in (VB)VCLKData table (315) */
+#define VCLK162_315             0x5e   /* Index in (VB)VCLKData table (315) */
 #define VCLK108_3_315           0x45   /* Index in VBVCLKData table (315) */
 #define VCLK100_315             0x46   /* Index in VBVCLKData table (315) */
-#define VCLK34_315              0x55   /* Index in VBVCLKData table (315) */
+#define VCLK34_315              0x55
 #define VCLK68_315		0x0d
+#define VCLK69_315		0x5c   /* deprecated ! Index in VBVCLKData table (315) */
+#define VCLK83_315		0x5c   /* Index in VBVCLKData table (315) */
+#define VCLK121_315		0x5d   /* Index in VBVCLKData table (315) */
+#define VCLK_1280x720		0x5f
+#define VCLK_1280x768_2		0x60
+#define VCLK_1280x768_3		0x61
+#define VCLK_CUSTOM_315		0x62
+#define VCLK_1280x720_2		0x63
+#define VCLK_720x480		0x67
+#define VCLK_720x576		0x68
+#define VCLK_768x576		0x68
+#define VCLK_848x480		0x65
+#define VCLK_856x480		0x66
+#define VCLK_800x480		0x65
+#define VCLK_1024x576		0x51
+#define VCLK_1152x864		0x64
+#define VCLK_1360x768		0x58
 
 #define TVCLKBASE_300		0x21   /* Indices on TV clocks in VCLKData table (300) */
 #define TVCLKBASE_315	        0x3a   /* Indices on TV clocks in (VB)VCLKData table (315) */
@@ -462,7 +510,7 @@
 #define HiTVVCLK                0x03   /* Index relative to TVCLKBASE */
 #define HiTVSimuVCLK            0x04   /* Index relative to TVCLKBASE */
 #define HiTVTextVCLK            0x05   /* Index relative to TVCLKBASE */
-#define YPbPr750pVCLK		0x0f   /* NOT relative to TVCLKBASE ! */
+#define YPbPr750pVCLK		0x25   /* Index relative to TVCLKBASE; was 0x0f NOT relative */
 
 /* ------------------------------ */
 
@@ -563,7 +611,7 @@
 
 /*
   =============================================================
-   			  for 315 series
+   		  for 315 series (old data layout)
   =============================================================
 */
 #define SoftDRAMType        0x80
--- diff/drivers/video/sis/oem300.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/oem300.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * OEM Data for 300 series
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
--- diff/drivers/video/sis/oem310.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/oem310.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * OEM Data for 315/330 series
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -91,7 +89,7 @@
 		 0x02,0x02,0x02
 };
 
-static const UCHAR SiS310_LCDDelayCompensation_651301LV[] =	  /* M650/651 301LV */
+static const UCHAR SiS310_LCDDelayCompensation_651301LV[] =	  	/* M650/651 301LV */
 {
                  0x33,0x33,0x33,    /*   800x600 (guessed) - new: PanelType, not PanelRes ! */
 		 0x33,0x33,0x33,    /*  1024x768 */
@@ -110,7 +108,7 @@
 		 0x33,0x33,0x33
 };
 
-static const UCHAR SiS310_LCDDelayCompensation_651302LV[] =	   /* M650/651 302LV */
+static const UCHAR SiS310_LCDDelayCompensation_651302LV[] =	   	/* M650/651 302LV */
 {
                  0x33,0x33,0x33,    /*   800x600 (guessed) */
 		 0x33,0x33,0x33,    /*  1024x768 */
@@ -129,7 +127,7 @@
 		 0x33,0x33,0x33
 };
 
-static const UCHAR SiS310_LCDDelayCompensation_3xx301B[] =	   	/* 30xB,LV */
+static const UCHAR SiS310_LCDDelayCompensation_3xx301B[] =	   	/* 30xB */
 {
 		 0x01,0x01,0x01,    /*   800x600 */
 		 0x0C,0x0C,0x0C,    /*  1024x768 */
@@ -148,6 +146,25 @@
 		 0x02,0x02,0x02
 };
 
+static const UCHAR SiS310_LCDDelayCompensation_3xx301LV[] =	   	/* 315+30xLV */
+{
+		 0x01,0x01,0x01,    /*   800x600 */
+		 0x04,0x04,0x04,    /*  1024x768 (A531/BIOS 1.14.05f: 4 - works with 6 */
+		 0x0C,0x0C,0x0C,    /* 1280x1024 */
+                 0x08,0x08,0x08,    /*   640x480 */
+		 0x0C,0x0C,0x0C,    /*  1024x600 (guessed) */
+		 0x0C,0x0C,0x0C,    /*  1152x864 (guessed) */
+		 0x0C,0x0C,0x0C,    /*  1280x960 (guessed) */
+		 0x0C,0x0C,0x0C,    /*  1152x768 (guessed) */
+		 0x0C,0x0C,0x0C,    /* 1400x1050 (guessed) */
+		 0x0C,0x0C,0x0C,    /*  1280x768 (guessed) */
+		 0x0C,0x0C,0x0C,    /* 1600x1200 (guessed) */
+		 0x02,0x02,0x02,
+		 0x02,0x02,0x02,
+		 0x02,0x02,0x02,
+		 0x02,0x02,0x02
+};
+
 static const UCHAR SiS310_TVDelayCompensation_301[] = 		/* 301 */
 {
 		 0x02,0x02,    /* NTSC Enhanced, Standard */
@@ -169,13 +186,6 @@
 		 0x05,0x05
 };
 
-static const UCHAR SiS310_TVDelayCompensation_LVDS[] =		/* LVDS */
-{
-		 0x0a,0x0a,
-		 0x0a,0x0a,
-		 0x0a,0x0a
-};
-
 static const UCHAR SiS310_TVDelayCompensation_651301LV[] =	/* M650, 651, 301LV */
 {
 		 0x33,0x33,
@@ -210,6 +220,13 @@
 		 0x44,0x44
 };
 
+static const UCHAR SiS310_TVDelayCompensation_LVDS[] =		/* LVDS */
+{
+		 0x0a,0x0a,
+		 0x0a,0x0a,
+		 0x0a,0x0a
+};
+
 static const UCHAR SiS310_TVAntiFlick1[6][2] =
 {
             {0x4,0x0},
@@ -412,141 +429,6 @@
 	{    1,   1,1696,1066,1696,1066}
 };
 
-static const SiS_Part2PortTblStruct SiS310_CRT2Part2_Compaq1280x1024_1[] =
-{
- {{0x3F,0x1B,0xD0,0xF0,0xB0,0xB8,0x23,0x0A,0x07,0x14,0x8A,0x12}},
- {{0x35,0x1B,0xA0,0xC0,0x80,0xB8,0x23,0x0A,0x07,0x14,0x8A,0x12}},
- {{0x3F,0x1B,0xD0,0xF0,0xB0,0xB8,0x23,0x0A,0x07,0x14,0x8A,0x12}},
- {{0x3F,0x1B,0xD0,0xF0,0xB0,0xB8,0x23,0x0A,0x07,0x14,0x8A,0x12}},
- {{0x45,0x1C,0x20,0x3F,0xFF,0xB8,0x23,0x0A,0x07,0x14,0x8A,0x12}},
- {{0x49,0x1C,0x40,0x7F,0xFF,0xAD,0x23,0x0A,0x07,0xF3,0x8A,0x12}},
- {{0x4C,0x1C,0x18,0x2F,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}},
- {{0x48,0x1C,0x15,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}}
-};
-
-static const SiS_Part2PortTblStruct SiS310_CRT2Part2_Compaq1280x1024_2[] =
-{
- {{0x2B,0x12,0xD9,0xE5,0xD5,0x2C,0x23,0x98,0x27,0x3E,0x08,0x42}},
- {{0x22,0x12,0xC0,0xCC,0xBC,0x2C,0x23,0x98,0x27,0x3E,0x08,0x42}},
- {{0x2B,0x12,0xD9,0xE5,0xD5,0x2C,0x23,0x98,0x27,0x3E,0x08,0x42}},
- {{0x22,0x12,0xC0,0xCC,0xBC,0x2C,0x23,0x98,0x27,0x3E,0x08,0x42}},
- {{0x33,0x13,0x01,0x0D,0xFD,0x2C,0x23,0x98,0x27,0x3E,0x08,0x42}},
- {{0x3F,0x1B,0x3D,0x49,0x39,0x54,0x23,0xC0,0x27,0x66,0x30,0x42}},
- {{0x33,0x1B,0x91,0x9D,0x8D,0x8C,0x23,0xF8,0x27,0x9E,0x68,0x42}},
- {{0x43,0x24,0x11,0x1D,0x0D,0xCC,0x23,0x38,0x37,0xDE,0xA8,0x42}},
- {{0x43,0x24,0x21,0x29,0x19,0xEA,0x23,0x0A,0x07,0x32,0xC6,0x42}}
-};
-
-static const SiS_Part2PortTblStruct SiS310_CRT2Part2_Compaq1280x1024_3[] =
-{
- {{0x47,0x1C,0x14,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}},
- {{0x47,0x1C,0x14,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}},
- {{0x47,0x1C,0x14,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}},
- {{0x47,0x1C,0x14,0x29,0xFF,0xBD,0x23,0x0A,0x07,0x23,0x8A,0x12}},
- {{0x47,0x1C,0x14,0x29,0xFF,0xBE,0x23,0x0A,0x07,0x26,0x8A,0x42}},
- {{0x47,0x1C,0x14,0x29,0xFF,0xBE,0x23,0x0A,0x07,0x26,0x8A,0x42}},
- {{0x47,0x1C,0x14,0x29,0xFF,0xBE,0x23,0x0A,0x07,0x26,0x8A,0x42}},
- {{0x47,0x1C,0x14,0x29,0xFF,0xBE,0x23,0x0A,0x07,0x26,0x8A,0x42}}
-};
-
-/* LCDA CRT2 data is std */
-
-static const SiS_LVDSDesStruct Compaq1280x1024Des_1[] =
-{
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 }
-};
-
-static const SiS_LVDSDesStruct Compaq1280x1024Des_2[] =
-{
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 }
-};
-
-/* Clevo L285/287 (dual-link 1024x768) */
-
-static const SiS_Part2PortTblStruct SiS310_CRT2Part2_Clevo1024x768_1[] =
-{
- {{0x25,0x12,0xC9,0xDC,0xB6,0x59,0x45,0x09,0x07,0xF9,0x09,0x24}},
- {{0x2C,0x12,0x9A,0xAE,0x88,0x59,0x45,0x09,0x07,0xF9,0x09,0x24}},
- {{0x25,0x12,0xC9,0xDC,0xB6,0x59,0x45,0x09,0x07,0xF9,0x09,0x24}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x38,0x13,0x16,0x0C,0xE6,0x59,0x45,0x09,0x07,0xF9,0x09,0x24}},
- {{0x38,0x18,0x16,0x00,0x00,0x59,0x45,0x09,0x07,0xF9,0x09,0x24}},
- {{0x36,0x13,0x13,0x25,0xFF,0x59,0x45,0x09,0x07,0xF9,0x09,0x24}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x25,0x12,0xC9,0xDC,0xB6,0x59,0x45,0x09,0x07,0xF9,0x09,0x24}}
-};
-
-static const SiS_Part2PortTblStruct SiS310_CRT2Part2_Clevo1024x768_2[] =
-{
- {{0x25,0x12,0x51,0x6E,0x48,0xCC,0x12,0x89,0x47,0x1C,0x49,0x33}},
- {{0x2C,0x12,0x38,0x55,0x2F,0xCC,0x12,0x89,0x47,0x1C,0x49,0x33}},
- {{0x25,0x12,0x51,0x6E,0x48,0xCC,0x12,0x89,0x47,0x1C,0x49,0x33}},
- {{0x2C,0x12,0x38,0x55,0x2F,0xE0,0x12,0xB1,0x47,0x30,0x71,0x33}},
- {{0x2D,0x12,0x79,0x96,0x70,0xCC,0x12,0x89,0x47,0x1C,0x49,0x33}},
- {{0x29,0x12,0xB5,0xD2,0xAC,0xF4,0x12,0xD9,0x47,0x44,0x99,0x33}},
- {{0x36,0x13,0x13,0x25,0xFF,0x32,0x22,0x0A,0x07,0x82,0x0A,0x12}},
-#if 0
- {{0x25,0x12,0x51,0x6E,0x48,0x99,0x35,0x89,0x47,0xC1,0x49,0x33}},
- {{0x2C,0x12,0x38,0x55,0x2F,0x99,0x35,0x89,0x47,0xC1,0x49,0x33}},
- {{0x25,0x12,0x51,0x6E,0x48,0x99,0x35,0x89,0x47,0xC1,0x49,0x33}},
- {{0x2C,0x12,0x38,0x55,0x2F,0xC1,0x35,0xB1,0x47,0xE9,0x71,0x33}},
- {{0x2D,0x12,0x79,0x96,0x70,0x99,0x35,0x89,0x47,0xC1,0x49,0x33}},
- {{0x29,0x12,0xB5,0xD2,0xAC,0xE9,0x35,0xD9,0x47,0x11,0x99,0x33}},
- {{0x36,0x13,0x13,0x25,0xFF,0x59,0x45,0x09,0x07,0xF9,0x09,0x24}}
-#endif
-};
-
-static const SiS_Part2PortTblStruct SiS310_CRT2Part2_Clevo1024x768_3[] =
-{
- {{0x36,0x13,0x13,0x25,0xFF,0x32,0x22,0x0A,0x07,0x82,0x0A,0x12}}, /* Corrected */
- {{0x36,0x13,0x13,0x25,0xFF,0x32,0x22,0x0A,0x07,0x82,0x0A,0x12}},
- {{0x36,0x13,0x13,0x25,0xFF,0x32,0x22,0x0A,0x07,0x82,0x0A,0x12}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x36,0x13,0x13,0x25,0xFF,0x32,0x22,0x0A,0x07,0x82,0x0A,0x12}},
- {{0x36,0x13,0x13,0x25,0xFF,0x32,0x22,0x0A,0x07,0x82,0x0A,0x12}},
- {{0x36,0x13,0x13,0x25,0xFF,0x32,0x22,0x0A,0x07,0x82,0x0A,0x12}},
- {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
- {{0x25,0x13,0xC9,0x25,0xFF,0x59,0x45,0x09,0x07,0xF9,0x09,0x24}}
-};
-
-/* CRT2 data is std */
-
-static const SiS_LVDSDesStruct Clevo1024x768Des_1[] =
-{
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 }
-};
-
-static const SiS_LVDSDesStruct Clevo1024x768Des_2[] =
-{
-  { 1184, 622 },
-  { 1184, 597 },
-  { 1184, 622 },
-  { 1184, 597 },
-  { 1152, 622 },
-  { 1232, 722 },
-  {    0,   0 }
-};
-
 /* Asus A2xxxH _2 */
 
 static const SiS_Part2PortTblStruct SiS310_CRT2Part2_Asus1024x768_3[] =
@@ -562,52 +444,6 @@
  {{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}
 };
 
-static const SiS_LVDSDesStruct Asus1024x768Des_1[] =
-{
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 }
-};
 
-static const SiS_LVDSDesStruct Asus1024x768Des_2[] =
-{
-  { 1184, 622 },
-  { 1184, 597 },
-  { 1184, 622 },
-  { 1184, 597 },
-  { 1152, 622 },
-  { 1232, 722 },
-  {    0,   0 }
-};
-
-/* CRT2 data is std */
-
-/* Uniwill N243S9, ECS A928 */
-
-static const SiS_LVDSDesStruct Uniwill1024x768Des_1[] =
-{
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 0 },
-  { 0, 805 }
-};
-
-static const SiS_LVDSDesStruct Uniwill1024x768Des_2[] =
-{
-  { 1184, 622 },
-  { 1184, 597 },
-  { 1184, 622 },
-  { 1184, 597 },
-  { 1152, 650 },
-  { 1232, 722 },
-  {    0, 805 },
-};
 
 
--- diff/drivers/video/sis/osdef.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/osdef.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * OS depending defines
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -54,95 +52,77 @@
  */
 
 /* The choices are: */
-
 #define LINUX_KERNEL	   /* Kernel framebuffer */
 /* #define LINUX_XF86 */   /* XFree86 */
 
-/**********************************************************************/
-#ifdef LINUX_KERNEL  /* -------------------------- */
-#include <linux/config.h>
-#include <linux/version.h>
-
-#ifdef CONFIG_FB_SIS_300
-#define SIS300
-#endif
-
-#ifdef CONFIG_FB_SIS_315
-#define SIS315H
-#endif
-
-#if 1
-#define SISFBACCEL	/* Include 2D acceleration */
-#endif
-
-#endif
-
-#ifdef LINUX_XF86 /* ----------------------------- */
-#define SIS300
-#define SIS315H
-#endif
-
-/**********************************************************************/
-#ifdef LINUX_XF86
-#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
-#define SiS_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
-#endif
-
-#ifdef LINUX_KERNEL
-#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
-#define SiS_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
-#endif
-
-/**********************************************************************/
-
 #ifdef OutPortByte
 #undef OutPortByte
-#endif /* OutPortByte */
+#endif
 
 #ifdef OutPortWord
 #undef OutPortWord
-#endif /* OutPortWord */
+#endif
 
 #ifdef OutPortLong
 #undef OutPortLong
-#endif /* OutPortLong */
+#endif
 
 #ifdef InPortByte
 #undef InPortByte
-#endif /* InPortByte */
+#endif
 
 #ifdef InPortWord
 #undef InPortWord
-#endif /* InPortWord */
+#endif
 
 #ifdef InPortLong
 #undef InPortLong
-#endif /* InPortLong */
+#endif
 
 /**********************************************************************/
-/*  LINUX XF86                                                        */
+/*  LINUX KERNEL                                                      */
 /**********************************************************************/
 
-#ifdef LINUX_XF86
-#define OutPortByte(p,v) outb((CARD16)(p),(CARD8)(v))
-#define OutPortWord(p,v) outw((CARD16)(p),(CARD16)(v))
-#define OutPortLong(p,v) outl((CARD16)(p),(CARD32)(v))
-#define InPortByte(p)    inb((CARD16)(p))
-#define InPortWord(p)    inw((CARD16)(p))
-#define InPortLong(p)    inl((CARD16)(p))
+#ifdef LINUX_KERNEL
+#include <linux/config.h>
+
+#ifdef CONFIG_FB_SIS_300
+#define SIS300
+#endif
+
+#ifdef CONFIG_FB_SIS_315
+#define SIS315H
+#endif
+
+#if !defined(SIS300) && !defined(SIS315H)
+#warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is set
+#warning sisfb will not work!
+#endif
+
+#define OutPortByte(p,v) outb((u8)(v),(SISIOADDRESS)(p))
+#define OutPortWord(p,v) outw((u16)(v),(SISIOADDRESS)(p))
+#define OutPortLong(p,v) outl((u32)(v),(SISIOADDRESS)(p))
+#define InPortByte(p)    inb((SISIOADDRESS)(p))
+#define InPortWord(p)    inw((SISIOADDRESS)(p))
+#define InPortLong(p)    inl((SISIOADDRESS)(p))
+#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize)
 #endif
 
 /**********************************************************************/
-/*  LINUX KERNEL                                                      */
+/*  XFree86, X.org                                                    */
 /**********************************************************************/
 
-#ifdef LINUX_KERNEL
-#define OutPortByte(p,v) outb((u8)(v),(u16)(p))
-#define OutPortWord(p,v) outw((u16)(v),(u16)(p))
-#define OutPortLong(p,v) outl((u32)(v),(u16)(p))
-#define InPortByte(p)    inb((u16)(p))
-#define InPortWord(p)    inw((u16)(p))
-#define InPortLong(p)    inl((u16)(p))
+#ifdef LINUX_XF86
+#define SIS300
+#define SIS315H
+
+#define OutPortByte(p,v) outb((IOADDRESS)(p),(CARD8)(v))
+#define OutPortWord(p,v) outw((IOADDRESS)(p),(CARD16)(v))
+#define OutPortLong(p,v) outl((IOADDRESS)(p),(CARD32)(v))
+#define InPortByte(p)    inb((IOADDRESS)(p))
+#define InPortWord(p)    inw((IOADDRESS)(p))
+#define InPortLong(p)    inl((IOADDRESS)(p))
+#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
 #endif
 
 
--- diff/drivers/video/sis/sis.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/sis.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,10 +1,505 @@
+/*
+ * SiS 300/630/730/540/315/550/650/651/M650/661FX/M661FX/740/741/330/760
+ * frame buffer driver for Linux kernels >=2.4.14 and >=2.6.3
+ *
+ * Copyright (C) 2001-2004 Thomas Winischhofer, Vienna, Austria.
+ *
+ * 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 named License,
+ * or 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
+ */
+
 #ifndef _SIS_H
 #define _SIS_H
 
-#if 1
-#define TWDEBUG(x)
+#include <linux/config.h>
+#include <linux/version.h>
+
+#include "osdef.h"
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#include <video/sisfb.h>
 #else
+#include <linux/sisfb.h>
+#endif
+
+#include "vgatypes.h"
+#include "vstruct.h"
+
+#define VER_MAJOR                 1
+#define VER_MINOR                 7
+#define VER_LEVEL                 12
+
+#undef SIS_CONFIG_COMPAT
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#include <linux/spinlock.h>
+#ifdef CONFIG_COMPAT
+#include <linux/ioctl32.h>
+#define SIS_CONFIG_COMPAT
+#endif
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19)
+#ifdef __x86_64__
+/* Shouldn't we check for CONFIG_IA32_EMULATION here? */
+#include <asm/ioctl32.h>
+#define SIS_CONFIG_COMPAT
+#endif
+#endif
+
+#undef SISFBDEBUG
+
+#ifdef SISFBDEBUG
+#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
 #define TWDEBUG(x) printk(KERN_INFO x "\n");
+#else
+#define DPRINTK(fmt, args...)
+#define TWDEBUG(x)
+#endif
+
+#define SISFAIL(x) do { printk(x "\n"); return -EINVAL; } while(0)
+
+/* To be included in pci_ids.h */
+#ifndef PCI_DEVICE_ID_SI_650_VGA
+#define PCI_DEVICE_ID_SI_650_VGA  0x6325
+#endif
+#ifndef PCI_DEVICE_ID_SI_650
+#define PCI_DEVICE_ID_SI_650      0x0650
+#endif
+#ifndef PCI_DEVICE_ID_SI_651
+#define PCI_DEVICE_ID_SI_651      0x0651
+#endif
+#ifndef PCI_DEVICE_ID_SI_740
+#define PCI_DEVICE_ID_SI_740      0x0740
+#endif
+#ifndef PCI_DEVICE_ID_SI_330
+#define PCI_DEVICE_ID_SI_330      0x0330
+#endif
+#ifndef PCI_DEVICE_ID_SI_660_VGA
+#define PCI_DEVICE_ID_SI_660_VGA  0x6330
+#endif
+#ifndef PCI_DEVICE_ID_SI_661
+#define PCI_DEVICE_ID_SI_661      0x0661
+#endif
+#ifndef PCI_DEVICE_ID_SI_741
+#define PCI_DEVICE_ID_SI_741      0x0741
+#endif
+#ifndef PCI_DEVICE_ID_SI_660
+#define PCI_DEVICE_ID_SI_660      0x0660
+#endif
+#ifndef PCI_DEVICE_ID_SI_760
+#define PCI_DEVICE_ID_SI_760      0x0760
+#endif
+
+/* To be included in fb.h */
+#ifndef FB_ACCEL_SIS_GLAMOUR_2
+#define FB_ACCEL_SIS_GLAMOUR_2	  40	/* SiS 315, 65x, 740, 661, 741  */
+#endif
+#ifndef FB_ACCEL_SIS_XABRE
+#define FB_ACCEL_SIS_XABRE        41	/* SiS 330 ("Xabre"), 760 	*/
+#endif
+
+#define MAX_ROM_SCAN              0x10000
+
+/* ivideo->caps */
+#define HW_CURSOR_CAP             0x80
+#define TURBO_QUEUE_CAP           0x40
+#define AGP_CMD_QUEUE_CAP         0x20
+#define VM_CMD_QUEUE_CAP          0x10
+#define MMIO_CMD_QUEUE_CAP        0x08
+
+/* For 300 series */
+#define TURBO_QUEUE_AREA_SIZE     0x80000 /* 512K */
+#define HW_CURSOR_AREA_SIZE_300   0x1000  /* 4K */
+
+/* For 315/Xabre series */
+#define COMMAND_QUEUE_AREA_SIZE   0x80000 /* 512K */
+#define COMMAND_QUEUE_THRESHOLD   0x1F
+#define HW_CURSOR_AREA_SIZE_315   0x4000  /* 16K */
+
+#define SIS_OH_ALLOC_SIZE         4000
+#define SENTINEL                  0x7fffffff
+
+#define SEQ_ADR                   0x14
+#define SEQ_DATA                  0x15
+#define DAC_ADR                   0x18
+#define DAC_DATA                  0x19
+#define CRTC_ADR                  0x24
+#define CRTC_DATA                 0x25
+#define DAC2_ADR                  (0x16-0x30)
+#define DAC2_DATA                 (0x17-0x30)
+#define VB_PART1_ADR              (0x04-0x30)
+#define VB_PART1_DATA             (0x05-0x30)
+#define VB_PART2_ADR              (0x10-0x30)
+#define VB_PART2_DATA             (0x11-0x30)
+#define VB_PART3_ADR              (0x12-0x30)
+#define VB_PART3_DATA             (0x13-0x30)
+#define VB_PART4_ADR              (0x14-0x30)
+#define VB_PART4_DATA             (0x15-0x30)
+
+#define SISSR			  ivideo->SiS_Pr.SiS_P3c4
+#define SISCR                     ivideo->SiS_Pr.SiS_P3d4
+#define SISDACA                   ivideo->SiS_Pr.SiS_P3c8
+#define SISDACD                   ivideo->SiS_Pr.SiS_P3c9
+#define SISPART1                  ivideo->SiS_Pr.SiS_Part1Port
+#define SISPART2                  ivideo->SiS_Pr.SiS_Part2Port
+#define SISPART3                  ivideo->SiS_Pr.SiS_Part3Port
+#define SISPART4                  ivideo->SiS_Pr.SiS_Part4Port
+#define SISPART5                  ivideo->SiS_Pr.SiS_Part5Port
+#define SISDAC2A                  SISPART5
+#define SISDAC2D                  (SISPART5 + 1)
+#define SISMISCR                  (ivideo->SiS_Pr.RelIO + 0x1c)
+#define SISMISCW                  ivideo->SiS_Pr.SiS_P3c2
+#define SISINPSTAT		  (ivideo->SiS_Pr.RelIO + 0x2a)
+#define SISPEL			  ivideo->SiS_Pr.SiS_P3c6
+
+#define IND_SIS_PASSWORD          0x05  /* SRs */
+#define IND_SIS_COLOR_MODE        0x06
+#define IND_SIS_RAMDAC_CONTROL    0x07
+#define IND_SIS_DRAM_SIZE         0x14
+#define IND_SIS_MODULE_ENABLE     0x1E
+#define IND_SIS_PCI_ADDRESS_SET   0x20
+#define IND_SIS_TURBOQUEUE_ADR    0x26
+#define IND_SIS_TURBOQUEUE_SET    0x27
+#define IND_SIS_POWER_ON_TRAP     0x38
+#define IND_SIS_POWER_ON_TRAP2    0x39
+#define IND_SIS_CMDQUEUE_SET      0x26
+#define IND_SIS_CMDQUEUE_THRESHOLD  0x27
+
+#define IND_SIS_AGP_IO_PAD        0x48
+
+#define SIS_CRT2_WENABLE_300 	  0x24  /* Part1 */
+#define SIS_CRT2_WENABLE_315 	  0x2F
+
+#define SIS_PASSWORD              0x86  /* SR05 */
+#define SIS_INTERLACED_MODE       0x20  /* SR06 */
+#define SIS_8BPP_COLOR_MODE       0x0
+#define SIS_15BPP_COLOR_MODE      0x1
+#define SIS_16BPP_COLOR_MODE      0x2
+#define SIS_32BPP_COLOR_MODE      0x4
+
+#define SIS_ENABLE_2D             0x40  /* SR1E */
+
+#define SIS_MEM_MAP_IO_ENABLE     0x01  /* SR20 */
+#define SIS_PCI_ADDR_ENABLE       0x80
+
+#define SIS_AGP_CMDQUEUE_ENABLE   0x80  /* 315/330 series SR26 */
+#define SIS_VRAM_CMDQUEUE_ENABLE  0x40
+#define SIS_MMIO_CMD_ENABLE       0x20
+#define SIS_CMD_QUEUE_SIZE_512k   0x00
+#define SIS_CMD_QUEUE_SIZE_1M     0x04
+#define SIS_CMD_QUEUE_SIZE_2M     0x08
+#define SIS_CMD_QUEUE_SIZE_4M     0x0C
+#define SIS_CMD_QUEUE_RESET       0x01
+#define SIS_CMD_AUTO_CORR	  0x02
+
+#define SIS_SIMULTANEOUS_VIEW_ENABLE  0x01  /* CR30 */
+#define SIS_MODE_SELECT_CRT2      0x02
+#define SIS_VB_OUTPUT_COMPOSITE   0x04
+#define SIS_VB_OUTPUT_SVIDEO      0x08
+#define SIS_VB_OUTPUT_SCART       0x10
+#define SIS_VB_OUTPUT_LCD         0x20
+#define SIS_VB_OUTPUT_CRT2        0x40
+#define SIS_VB_OUTPUT_HIVISION    0x80
+
+#define SIS_VB_OUTPUT_DISABLE     0x20  /* CR31 */
+#define SIS_DRIVER_MODE           0x40
+
+#define SIS_VB_COMPOSITE          0x01  /* CR32 */
+#define SIS_VB_SVIDEO             0x02
+#define SIS_VB_SCART              0x04
+#define SIS_VB_LCD                0x08
+#define SIS_VB_CRT2               0x10
+#define SIS_CRT1                  0x20
+#define SIS_VB_HIVISION           0x40
+#define SIS_VB_YPBPR              0x80
+#define SIS_VB_TV                 (SIS_VB_COMPOSITE | SIS_VB_SVIDEO | \
+                                   SIS_VB_SCART | SIS_VB_HIVISION | SIS_VB_YPBPR)
+
+#define SIS_EXTERNAL_CHIP_MASK    	   0x0E  /* CR37 (< SiS 660) */
+#define SIS_EXTERNAL_CHIP_SIS301           0x01  /* in CR37 << 1 ! */
+#define SIS_EXTERNAL_CHIP_LVDS             0x02
+#define SIS_EXTERNAL_CHIP_TRUMPION         0x03
+#define SIS_EXTERNAL_CHIP_LVDS_CHRONTEL    0x04
+#define SIS_EXTERNAL_CHIP_CHRONTEL         0x05
+#define SIS310_EXTERNAL_CHIP_LVDS          0x02
+#define SIS310_EXTERNAL_CHIP_LVDS_CHRONTEL 0x03
+
+#define SIS_AGP_2X                0x20  /* CR48 */
+
+#define HW_DEVICE_EXTENSION	  SIS_HW_INFO
+#define PHW_DEVICE_EXTENSION      PSIS_HW_INFO
+
+/* Useful macros */
+#define inSISREG(base)          inb(base)
+#define outSISREG(base,val)     outb(val,base)
+#define orSISREG(base,val)      do { \
+                                  u8 __Temp = inb(base); \
+                                  outSISREG(base, __Temp | (val)); \
+                                } while (0)
+#define andSISREG(base,val)     do { \
+                                  u8 __Temp = inb(base); \
+                                  outSISREG(base, __Temp & (val)); \
+                                } while (0)
+#define inSISIDXREG(base,idx,var)   do { \
+                                      outb(idx,base); var=inb((base)+1); \
+                                    } while (0)
+#define outSISIDXREG(base,idx,val)  do { \
+                                      outb(idx,base); outb((val),(base)+1); \
+                                    } while (0)
+#define orSISIDXREG(base,idx,val)   do { \
+                                      u8 __Temp; \
+                                      outb(idx,base);   \
+                                      __Temp = inb((base)+1)|(val); \
+                                      outSISIDXREG(base,idx,__Temp); \
+                                    } while (0)
+#define andSISIDXREG(base,idx,and)  do { \
+                                      u8 __Temp; \
+                                      outb(idx,base);   \
+                                      __Temp = inb((base)+1)&(and); \
+                                      outSISIDXREG(base,idx,__Temp); \
+                                    } while (0)
+#define setSISIDXREG(base,idx,and,or)   do { \
+                                          u8 __Temp; \
+                                          outb(idx,base);   \
+                                          __Temp = (inb((base)+1)&(and))|(or); \
+                                          outSISIDXREG(base,idx,__Temp); \
+                                        } while (0)
+
+/* MMIO access macros */
+#define MMIO_IN8(base, offset)  readb((base+offset))
+#define MMIO_IN16(base, offset) readw((base+offset))
+#define MMIO_IN32(base, offset) readl((base+offset))
+
+#define MMIO_OUT8(base, offset, val)  writeb(((u8)(val)), (base+offset))
+#define MMIO_OUT16(base, offset, val) writew(((u16)(val)), (base+offset))
+#define MMIO_OUT32(base, offset, val) writel(((u32)(val)), (base+offset))
+
+/* Queue control MMIO registers */
+#define Q_BASE_ADDR		0x85C0  /* Base address of software queue */
+#define Q_WRITE_PTR		0x85C4  /* Current write pointer */
+#define Q_READ_PTR		0x85C8  /* Current read pointer */
+#define Q_STATUS		0x85CC  /* queue status */
+
+#define MMIO_QUEUE_PHYBASE      Q_BASE_ADDR
+#define MMIO_QUEUE_WRITEPORT    Q_WRITE_PTR
+#define MMIO_QUEUE_READPORT     Q_READ_PTR
+
+enum _SIS_CMDTYPE {
+	MMIO_CMD = 0,
+	AGP_CMD_QUEUE,
+	VM_CMD_QUEUE,
+};
+typedef unsigned int SIS_CMDTYPE;
+
+/* Our "par" */
+struct sis_video_info {
+	int		cardnumber;
+	struct fb_info  *memyselfandi;
+
+	SIS_HW_INFO 	sishw_ext;
+	SiS_Private  	SiS_Pr;
+
+	sisfb_info 	sisfbinfo;	/* For ioctl SISFB_GET_INFO */
+
+	struct fb_var_screeninfo default_var;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+	struct fb_fix_screeninfo sisfb_fix;
+	u32 		pseudo_palette[17];
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+	struct display 		 sis_disp;
+	struct display_switch 	 sisfb_sw;
+	struct {
+		u16 red, green, blue, pad;
+	} 		sis_palette[256];
+	union {
+#ifdef FBCON_HAS_CFB16
+		u16 cfb16[16];
+#endif
+#ifdef FBCON_HAS_CFB32
+		u32 cfb32[16];
+#endif
+	} 		sis_fbcon_cmap;
+#endif
+
+        struct sisfb_monitor {
+		u16 hmin;
+		u16 hmax;
+		u16 vmin;
+		u16 vmax;
+		u32 dclockmax;
+		u8  feature;
+		BOOLEAN datavalid;
+	} 		sisfb_thismonitor;
+
+	int           	chip_id;
+	char		myid[40];
+
+	struct pci_dev  *nbridge;
+
+	int		mni;	/* Mode number index */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+	int  		currcon;
+#endif
+
+	unsigned long	video_size;
+	unsigned long 	video_base;
+	unsigned long	mmio_size;
+	unsigned long 	mmio_base;
+	unsigned long 	vga_base;
+
+	unsigned long  	video_vbase;
+	unsigned long 	mmio_vbase;
+	char  *	      	bios_vbase;
+	char  *	      	bios_abase;
+
+	int 		mtrr;
+
+	u32		sisfb_mem;
+
+	u32 		sisfb_parm_mem;
+	int 	   	sisfb_accel;
+	int 		sisfb_ypan;
+	int 		sisfb_max;
+	int 		sisfb_userom;
+	int 		sisfb_useoem;
+	int		sisfb_mode_idx;
+	int		sisfb_parm_rate;
+	int		sisfb_crt1off;
+	int		sisfb_forcecrt1;
+	int		sisfb_crt2type;
+	int		sisfb_crt2flags;
+	int 		sisfb_dstn;
+	int 		sisfb_fstn;
+	int		sisfb_tvplug;
+	int		sisfb_tvstd;
+	int		sisfb_filter;
+	int		sisfb_nocrt2rate;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+	int		sisfb_inverse;
+#endif
+
+	u32 		heapstart;        /* offset  */
+	unsigned long  	sisfb_heap_start; /* address */
+	unsigned long  	sisfb_heap_end;   /* address */
+	u32 	      	sisfb_heap_size;
+	int		havenoheap;
+#if 0
+	SIS_HEAP       	sisfb_heap;
 #endif
 
+
+	int    		video_bpp;
+	int    		video_cmap_len;
+	int    		video_width;
+	int    		video_height;
+	unsigned int 	refresh_rate;
+
+	unsigned int 	chip;
+	u8   		revision_id;
+
+	int    		video_linelength;	/* real pitch */
+	int		scrnpitchCRT1;		/* pitch regarding interlace */
+
+        u16 		DstColor;		/* For 2d acceleration */
+	u32  		SiS310_AccelDepth;
+	u32  		CommandReg;
+	int		cmdqueuelength;
+
+	spinlock_t     	lockaccel;		/* Do not use outside of kernel! */
+
+        unsigned int   	pcibus;
+	unsigned int   	pcislot;
+	unsigned int   	pcifunc;
+
+	int 	       	accel;
+
+	u16 		subsysvendor;
+	u16 		subsysdevice;
+
+	u32  		vbflags;		/* Replacing deprecated stuff from above */
+	u32  		currentvbflags;
+
+	int		lcdxres, lcdyres;
+	int		lcddefmodeidx, tvdefmodeidx, defmodeidx;
+
+	int    		current_bpp;
+	int    		current_width;
+	int    		current_height;
+	int    		current_htotal;
+	int    		current_vtotal;
+	int		current_linelength;
+	__u32  		current_pixclock;
+	int    		current_refresh_rate;
+
+	u8  		mode_no;
+	u8  		rate_idx;
+	int    		modechanged;
+	unsigned char 	modeprechange;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+	u8 		sisfb_lastrates[128];
+#endif
+
+	int  		newrom;
+	int  		registered;
+#ifdef SIS_CONFIG_COMPAT
+	int		ioctl32registered;
+	int		ioctl32vblankregistered;
+#endif
+
+	int 		sisvga_engine;
+	int 		hwcursor_size;
+	int 		CRT2_write_enable;
+	u8            	caps;
+
+	u8 		detectedpdc;
+	u8 		detectedpdca;
+	u8 		detectedlcda;
+
+	unsigned long 	hwcursor_vbase;
+
+	int 		chronteltype;
+	int    		tvxpos, tvypos;
+	u8              p2_1f,p2_20,p2_2b,p2_42,p2_43,p2_01,p2_02;
+	int		tvx, tvy;
+
+	u8 		sisfblocked;
+
+	struct sis_video_info *next;
+};
+
+typedef struct _SIS_OH {
+	struct _SIS_OH *poh_next;
+	struct _SIS_OH *poh_prev;
+	u32            offset;
+	u32            size;
+} SIS_OH;
+
+typedef struct _SIS_OHALLOC {
+	struct _SIS_OHALLOC *poha_next;
+	SIS_OH aoh[1];
+} SIS_OHALLOC;
+
+typedef struct _SIS_HEAP {
+	SIS_OH      oh_free;
+	SIS_OH      oh_used;
+	SIS_OH      *poh_freelist;
+	SIS_OHALLOC *poha_chain;
+	u32         max_freesize;
+	struct sis_video_info *vinfo;
+} SIS_HEAP;
+
 #endif
--- diff/drivers/video/sis/sis_accel.c	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/sis_accel.c	2004-07-01 21:32:47.000000000 +0100
@@ -18,9 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
  *
- * Based on the XFree86 driver's sis300_accel.c which is
- *     Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
- * and sis310_accel.c which is
+ * Based on the XFree86/X.org driver which is
  *     Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
  *
  * Author: Thomas Winischhofer <thomas@winischhofer.net>
@@ -33,36 +31,16 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
 #include <linux/fb.h>
 #include <linux/console.h>
 #include <linux/selection.h>
 #include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-#include <linux/vt_kern.h>
 #include <linux/capability.h>
 #include <linux/fs.h>
-#include <linux/agp_backend.h>
-
 #include <linux/types.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include <linux/sisfb.h>
-#else
-#include <video/sisfb.h>
-#endif
-
 #include <asm/io.h>
 
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
-
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 #include <video/fbcon.h>
 #include <video/fbcon-cfb8.h>
@@ -71,17 +49,10 @@
 #include <video/fbcon-cfb32.h>
 #endif
 
-#include "osdef.h"
-#include "vgatypes.h"
-#include "vstruct.h"
-#include "sis_accel.h"
 #include "sis.h"
+#include "sis_accel.h"
 
-extern struct     video_info ivideo;
-extern VGA_ENGINE sisvga_engine;
-extern int sisfb_accel;
-
-static const int sisALUConv[] =
+static const u8 sisALUConv[] =
 {
     0x00,       /* dest = 0;            0,      GXclear,        0 */
     0x88,       /* dest &= src;         DSa,    GXand,          0x1 */
@@ -101,7 +72,7 @@
     0xFF,       /* dest = 0xFF;         1,      GXset,          0xF */
 };
 /* same ROP but with Pattern as Source */
-static const int sisPatALUConv[] =
+static const u8 sisPatALUConv[] =
 {
     0x00,       /* dest = 0;            0,      GXclear,        0 */
     0xA0,       /* dest &= src;         DPa,    GXand,          0x1 */
@@ -122,26 +93,26 @@
 };
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,34)
-static const unsigned char myrops[] = {
+static const int myrops[] = {
    	3, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
-   };
+};
 #endif
 
 /* 300 series ----------------------------------------------------- */
 #ifdef CONFIG_FB_SIS_300
 static void
-SiS300Sync(void)
+SiS300Sync(struct sis_video_info *ivideo)
 {
 	SiS300Idle
 }
 
 static void
-SiS300SetupForScreenToScreenCopy(int xdir, int ydir, int rop,
-                                unsigned int planemask, int trans_color)
+SiS300SetupForScreenToScreenCopy(struct sis_video_info *ivideo, int xdir, int ydir,
+                                 int rop, int trans_color)
 {
-	SiS300SetupDSTColorDepth(ivideo.DstColor);
-	SiS300SetupSRCPitch(ivideo.video_linelength)
-	SiS300SetupDSTRect(ivideo.video_linelength, -1)
+	SiS300SetupDSTColorDepth(ivideo->DstColor);
+	SiS300SetupSRCPitch(ivideo->video_linelength)
+	SiS300SetupDSTRect(ivideo->video_linelength, 0xffff)
 
 	if(trans_color != -1) {
 		SiS300SetupROP(0x0A)
@@ -159,29 +130,28 @@
 }
 
 static void
-SiS300SubsequentScreenToScreenCopy(int src_x, int src_y, int dst_x, int dst_y,
-                                int width, int height)
+SiS300SubsequentScreenToScreenCopy(struct sis_video_info *ivideo, int src_x,
+				   int src_y, int dst_x, int dst_y, int width, int height)
 {
-	long srcbase, dstbase;
+	u32 srcbase = 0, dstbase = 0;
 
-	srcbase = dstbase = 0;
-	if (src_y >= 2048) {
-		srcbase = ivideo.video_linelength * src_y;
+	if(src_y >= 2048) {
+		srcbase = ivideo->video_linelength * src_y;
 		src_y = 0;
 	}
-	if (dst_y >= 2048) {
-		dstbase = ivideo.video_linelength * dst_y;
+	if(dst_y >= 2048) {
+		dstbase = ivideo->video_linelength * dst_y;
 		dst_y = 0;
 	}
 
 	SiS300SetupSRCBase(srcbase);
 	SiS300SetupDSTBase(dstbase);
 
-	if(!(ivideo.CommandReg & X_INC))  {
+	if(!(ivideo->CommandReg & X_INC))  {
 		src_x += width-1;
 		dst_x += width-1;
 	}
-	if(!(ivideo.CommandReg & Y_INC))  {
+	if(!(ivideo->CommandReg & Y_INC))  {
 		src_y += height-1;
 		dst_y += height-1;
 	}
@@ -192,23 +162,22 @@
 }
 
 static void
-SiS300SetupForSolidFill(int color, int rop, unsigned int planemask)
+SiS300SetupForSolidFill(struct sis_video_info *ivideo, u32 color, int rop)
 {
 	SiS300SetupPATFG(color)
-	SiS300SetupDSTRect(ivideo.video_linelength, -1)
-	SiS300SetupDSTColorDepth(ivideo.DstColor);
+	SiS300SetupDSTRect(ivideo->video_linelength, 0xffff)
+	SiS300SetupDSTColorDepth(ivideo->DstColor);
 	SiS300SetupROP(sisPatALUConv[rop])
 	SiS300SetupCMDFlag(PATFG)
 }
 
 static void
-SiS300SubsequentSolidFillRect(int x, int y, int w, int h)
+SiS300SubsequentSolidFillRect(struct sis_video_info *ivideo, int x, int y, int w, int h)
 {
-	long dstbase;
+	u32 dstbase = 0;
 
-	dstbase = 0;
 	if(y >= 2048) {
-		dstbase = ivideo.video_linelength * y;
+		dstbase = ivideo->video_linelength * y;
 		y = 0;
 	}
 	SiS300SetupDSTBase(dstbase)
@@ -223,19 +192,18 @@
 
 #ifdef CONFIG_FB_SIS_315
 static void
-SiS310Sync(void)
+SiS310Sync(struct sis_video_info *ivideo)
 {
 	SiS310Idle
 }
 
 static void
-SiS310SetupForScreenToScreenCopy(int xdir, int ydir, int rop,
-                                unsigned int planemask, int trans_color)
+SiS310SetupForScreenToScreenCopy(struct sis_video_info *ivideo, int rop, int trans_color)
 {
-	SiS310SetupDSTColorDepth(ivideo.DstColor);
-	SiS310SetupSRCPitch(ivideo.video_linelength)
-	SiS310SetupDSTRect(ivideo.video_linelength, -1)
-	if (trans_color != -1) {
+	SiS310SetupDSTColorDepth(ivideo->DstColor);
+	SiS310SetupSRCPitch(ivideo->video_linelength)
+	SiS310SetupDSTRect(ivideo->video_linelength, 0xffff)
+	if(trans_color != -1) {
 		SiS310SetupROP(0x0A)
 		SiS310SetupSRCTrans(trans_color)
 		SiS310SetupCMDFlag(TRANSPARENT_BITBLT)
@@ -244,20 +212,17 @@
 		/* Set command - not needed, both 0 */
 		/* SiSSetupCMDFlag(BITBLT | SRCVIDEO) */
 	}
-	SiS310SetupCMDFlag(ivideo.SiS310_AccelDepth)
+	SiS310SetupCMDFlag(ivideo->SiS310_AccelDepth)
 	/* The 315 series is smart enough to know the direction */
 }
 
 static void
-SiS310SubsequentScreenToScreenCopy(int src_x, int src_y, int dst_x, int dst_y,
-                                int width, int height)
+SiS310SubsequentScreenToScreenCopy(struct sis_video_info *ivideo, int src_x, int src_y,
+			 int dst_x, int dst_y, int width, int height)
 {
-	long srcbase, dstbase;
-	int mymin, mymax;
-
-	srcbase = dstbase = 0;
-	mymin = min(src_y, dst_y);
-	mymax = max(src_y, dst_y);
+	u32 srcbase = 0, dstbase = 0;
+	int mymin = min(src_y, dst_y);
+	int mymax = max(src_y, dst_y);
 	
 	/* Although the chip knows the direction to use
 	 * if the source and destination areas overlap, 
@@ -271,18 +236,18 @@
 	 */
 	if((mymax - mymin) < height) { 
 	   if((src_y >= 2048) || (dst_y >= 2048)) {	      
-	      srcbase = ivideo.video_linelength * mymin;
-	      dstbase = ivideo.video_linelength * mymin;
+	      srcbase = ivideo->video_linelength * mymin;
+	      dstbase = ivideo->video_linelength * mymin;
 	      src_y -= mymin;
 	      dst_y -= mymin;
 	   }
 	} else {
 	   if(src_y >= 2048) {
-	      srcbase = ivideo.video_linelength * src_y;
+	      srcbase = ivideo->video_linelength * src_y;
 	      src_y = 0;
 	   }
 	   if(dst_y >= 2048) {
-	      dstbase = ivideo.video_linelength * dst_y;
+	      dstbase = ivideo->video_linelength * dst_y;
 	      dst_y = 0;
 	   }
 	}
@@ -296,23 +261,22 @@
 }
 
 static void
-SiS310SetupForSolidFill(int color, int rop, unsigned int planemask)
+SiS310SetupForSolidFill(struct sis_video_info *ivideo, u32 color, int rop)
 {
 	SiS310SetupPATFG(color)
-	SiS310SetupDSTRect(ivideo.video_linelength, -1)
-	SiS310SetupDSTColorDepth(ivideo.DstColor);
+	SiS310SetupDSTRect(ivideo->video_linelength, 0xffff)
+	SiS310SetupDSTColorDepth(ivideo->DstColor);
 	SiS310SetupROP(sisPatALUConv[rop])
-	SiS310SetupCMDFlag(PATFG | ivideo.SiS310_AccelDepth)
+	SiS310SetupCMDFlag(PATFG | ivideo->SiS310_AccelDepth)
 }
 
 static void
-SiS310SubsequentSolidFillRect(int x, int y, int w, int h)
+SiS310SubsequentSolidFillRect(struct sis_video_info *ivideo, int x, int y, int w, int h)
 {
-	long dstbase;
+	u32 dstbase = 0;
 
-	dstbase = 0;
 	if(y >= 2048) {
-		dstbase = ivideo.video_linelength * y;
+		dstbase = ivideo->video_linelength * y;
 		y = 0;
 	}
 	SiS310SetupDSTBase(dstbase)
@@ -327,23 +291,23 @@
 
 /* The exported routines */
 
-int sisfb_initaccel(void)
+int sisfb_initaccel(struct sis_video_info *ivideo)
 {
 #ifdef SISFB_USE_SPINLOCKS
-    spin_lock_init(&ivideo.lockaccel);
+    spin_lock_init(&ivideo->lockaccel);
 #endif
     return(0);
 }
 
-void sisfb_syncaccel(void)
+void sisfb_syncaccel(struct sis_video_info *ivideo)
 {
-    if(sisvga_engine == SIS_300_VGA) {
+    if(ivideo->sisvga_engine == SIS_300_VGA) {
 #ifdef CONFIG_FB_SIS_300
-    	SiS300Sync();
+    	SiS300Sync(ivideo);
 #endif
     } else {
 #ifdef CONFIG_FB_SIS_315
-    	SiS310Sync();
+    	SiS310Sync(ivideo);
 #endif
     }
 }
@@ -352,18 +316,19 @@
 
 int fbcon_sis_sync(struct fb_info *info)
 {
+   struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
    CRITFLAGS
 
-   if(!ivideo.accel)
+   if(!ivideo->accel)
    	return 0;
 
-   if(sisvga_engine == SIS_300_VGA) {
+   if(ivideo->sisvga_engine == SIS_300_VGA) {
 #ifdef CONFIG_FB_SIS_300
-      SiS300Sync();
+      SiS300Sync(ivideo);
 #endif
    } else {
 #ifdef CONFIG_FB_SIS_315
-      SiS310Sync();
+      SiS310Sync(ivideo);
 #endif
    }
    CRITEND
@@ -372,42 +337,53 @@
 
 void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
 {
-   int col=0;
+   struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
+   u32 col = 0;
+   u32 vxres = info->var.xres_virtual;
+   u32 vyres = info->var.yres_virtual;
+   int width, height;
    CRITFLAGS
 
-   TWDEBUG("Inside sis_fillrect");
-   if(!rect->width || !rect->height)
-   	return;
+   if(info->state != FBINFO_STATE_RUNNING) {
+	return;
+   }
 
-   if(!ivideo.accel) {
+   if(!ivideo->accel) {
 	cfb_fillrect(info, rect);
 	return;
    }
    
+   if(!rect->width || !rect->height || rect->dx >= vxres || rect->dy >= vyres) {
+	return;
+   }
+
+   /* Clipping */
+   width = ((rect->dx + rect->width) > vxres) ? (vxres - rect->dx) : rect->width;
+   height = ((rect->dy + rect->height) > vyres) ? (vyres - rect->dy) : rect->height;
+
    switch(info->var.bits_per_pixel) {
 	case 8:  col = rect->color;
 		 break;
-	case 16: col = ((u32 *)(info->pseudo_palette))[rect->color];
-		 break;
+	case 16:
 	case 32: col = ((u32 *)(info->pseudo_palette))[rect->color];
 		 break;
    }
 
-   if(sisvga_engine == SIS_300_VGA) {
+   if(ivideo->sisvga_engine == SIS_300_VGA) {
 #ifdef CONFIG_FB_SIS_300
       CRITBEGIN
-      SiS300SetupForSolidFill(col, myrops[rect->rop], 0);
-      SiS300SubsequentSolidFillRect(rect->dx, rect->dy, rect->width, rect->height);
+      SiS300SetupForSolidFill(ivideo, col, myrops[rect->rop]);
+      SiS300SubsequentSolidFillRect(ivideo, rect->dx, rect->dy, width, height);
       CRITEND
-      SiS300Sync();
+      SiS300Sync(ivideo);
 #endif
    } else {
 #ifdef CONFIG_FB_SIS_315
       CRITBEGIN
-      SiS310SetupForSolidFill(col, myrops[rect->rop], 0);
-      SiS310SubsequentSolidFillRect(rect->dx, rect->dy, rect->width, rect->height);
+      SiS310SetupForSolidFill(ivideo, col, myrops[rect->rop]);
+      SiS310SubsequentSolidFillRect(ivideo, rect->dx, rect->dy, width, height);
       CRITEND
-      SiS310Sync();
+      SiS310Sync(ivideo);
 #endif
    }
 
@@ -415,38 +391,58 @@
 
 void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area)
 {
-   int xdir, ydir;
+   struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
+   u32 vxres = info->var.xres_virtual;
+   u32 vyres = info->var.yres_virtual;
+   int width = area->width;
+   int height = area->height;
    CRITFLAGS
 
-   TWDEBUG("Inside sis_copyarea");
-   if(!ivideo.accel) {
+   if(info->state != FBINFO_STATE_RUNNING) {
+	return;
+   }
+
+   if(!ivideo->accel) {
    	cfb_copyarea(info, area);
 	return;
    }
 
-   if(!area->width || !area->height)
+   if(!width || !height ||
+      area->sx >= vxres || area->sy >= vyres ||
+      area->dx >= vxres || area->dy >= vyres) {
    	return;
+   }
 
-   if(area->sx < area->dx) xdir = 0;
-   else                    xdir = 1;
-   if(area->sy < area->dy) ydir = 0;
-   else                    ydir = 1;
+   /* Clipping */
+   if((area->sx + width) > vxres) width = vxres - area->sx;
+   if((area->dx + width) > vxres) width = vxres - area->dx;
+   if((area->sy + height) > vyres) height = vyres - area->sy;
+   if((area->dy + height) > vyres) height = vyres - area->dy;
 
-   if(sisvga_engine == SIS_300_VGA) {
+   if(ivideo->sisvga_engine == SIS_300_VGA) {
 #ifdef CONFIG_FB_SIS_300
+      int xdir, ydir;
+
+      if(area->sx < area->dx) xdir = 0;
+      else                    xdir = 1;
+      if(area->sy < area->dy) ydir = 0;
+      else                    ydir = 1;
+
       CRITBEGIN
-      SiS300SetupForScreenToScreenCopy(xdir, ydir, 3, 0, -1);
-      SiS300SubsequentScreenToScreenCopy(area->sx, area->sy, area->dx, area->dy, area->width, area->height);
+      SiS300SetupForScreenToScreenCopy(ivideo, xdir, ydir, 3, -1);
+      SiS300SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy, area->dx, area->dy,
+      					 width, height);
       CRITEND
-      SiS300Sync();
+      SiS300Sync(ivideo);
 #endif
    } else {
 #ifdef CONFIG_FB_SIS_315
       CRITBEGIN
-      SiS310SetupForScreenToScreenCopy(xdir, ydir, 3, 0, -1);
-      SiS310SubsequentScreenToScreenCopy(area->sx, area->sy, area->dx, area->dy, area->width, area->height);
+      SiS310SetupForScreenToScreenCopy(ivideo, 3, -1);
+      SiS310SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy, area->dx, area->dy,
+      					 width, height);
       CRITEND
-      SiS310Sync();
+      SiS310Sync(ivideo);
 #endif
    }
 }
@@ -458,11 +454,12 @@
 void fbcon_sis_bmove(struct display *p, int srcy, int srcx,
 			    int dsty, int dstx, int height, int width)
 {
-        int xdir, ydir;
+	struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
+
 	CRITFLAGS
 
-	if(!ivideo.accel) {
-	    switch(ivideo.video_bpp) {
+	if(!ivideo->accel) {
+	    switch(ivideo->video_bpp) {
 	    case 8:
 #ifdef FBCON_HAS_CFB8
 	       fbcon_cfb8_bmove(p, srcy, srcx, dsty, dstx, height, width);
@@ -489,30 +486,28 @@
 	width *= fontwidth(p);
 	height *= fontheight(p);
 
-	if(srcx < dstx) xdir = 0;
-	else            xdir = 1;
-	if(srcy < dsty) ydir = 0;
-	else            ydir = 1;
-
-	if(sisvga_engine == SIS_300_VGA) {
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
 #ifdef CONFIG_FB_SIS_300
+	   int xdir, ydir;
+
+	   if(srcx < dstx) xdir = 0;
+	   else            xdir = 1;
+	   if(srcy < dsty) ydir = 0;
+	   else            ydir = 1;
+
 	   CRITBEGIN
-	   SiS300SetupForScreenToScreenCopy(xdir, ydir, 3, 0, -1);
-	   SiS300SubsequentScreenToScreenCopy(srcx, srcy, dstx, dsty, width, height);
+	   SiS300SetupForScreenToScreenCopy(ivideo, xdir, ydir, 3, -1);
+	   SiS300SubsequentScreenToScreenCopy(ivideo, srcx, srcy, dstx, dsty, width, height);
 	   CRITEND
-	   SiS300Sync();
+	   SiS300Sync(ivideo);
 #endif
 	} else {
 #ifdef CONFIG_FB_SIS_315
 	   CRITBEGIN
-	   SiS310SetupForScreenToScreenCopy(xdir, ydir, 3, 0, -1);
-	   SiS310SubsequentScreenToScreenCopy(srcx, srcy, dstx, dsty, width, height);
+	   SiS310SetupForScreenToScreenCopy(ivideo, 3, -1);
+	   SiS310SubsequentScreenToScreenCopy(ivideo, srcx, srcy, dstx, dsty, width, height);
 	   CRITEND
-	   SiS310Sync();
-#if 0
-	   printk(KERN_INFO "sis_bmove sx %d sy %d dx %d dy %d w %d h %d\n",
-		srcx, srcy, dstx, dsty, width, height);
-#endif
+	   SiS310Sync(ivideo);
 #endif
 	}
 }
@@ -520,6 +515,7 @@
 static void fbcon_sis_clear(struct vc_data *conp, struct display *p,
 			int srcy, int srcx, int height, int width, int color)
 {
+        struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
 	CRITFLAGS
 
 	srcx *= fontwidth(p);
@@ -527,21 +523,21 @@
 	width *= fontwidth(p);
 	height *= fontheight(p);
 
-	if(sisvga_engine == SIS_300_VGA) {
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
 #ifdef CONFIG_FB_SIS_300
 	   CRITBEGIN
-	   SiS300SetupForSolidFill(color, 3, 0);
-	   SiS300SubsequentSolidFillRect(srcx, srcy, width, height);
+	   SiS300SetupForSolidFill(ivideo, color, 3);
+	   SiS300SubsequentSolidFillRect(ivideo, srcx, srcy, width, height);
 	   CRITEND
-	   SiS300Sync();
+	   SiS300Sync(ivideo);
 #endif
 	} else {
 #ifdef CONFIG_FB_SIS_315
 	   CRITBEGIN
-	   SiS310SetupForSolidFill(color, 3, 0);
-	   SiS310SubsequentSolidFillRect(srcx, srcy, width, height);
+	   SiS310SetupForSolidFill(ivideo, color, 3);
+	   SiS310SubsequentSolidFillRect(ivideo, srcx, srcy, width, height);
 	   CRITEND
-	   SiS310Sync();
+	   SiS310Sync(ivideo);
 #endif
 	}
 }
@@ -549,9 +545,10 @@
 void fbcon_sis_clear8(struct vc_data *conp, struct display *p,
 			int srcy, int srcx, int height, int width)
 {
+	struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
 	u32 bgx;
 
-	if(!ivideo.accel) {
+	if(!ivideo->accel) {
 #ifdef FBCON_HAS_CFB8
 	    fbcon_cfb8_clear(conp, p, srcy, srcx, height, width);
 #endif
@@ -565,8 +562,10 @@
 void fbcon_sis_clear16(struct vc_data *conp, struct display *p,
 			int srcy, int srcx, int height, int width)
 {
+        struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
 	u32 bgx;
-	if(!ivideo.accel) {
+
+	if(!ivideo->accel) {
 #ifdef FBCON_HAS_CFB16
 	    fbcon_cfb16_clear(conp, p, srcy, srcx, height, width);
 #endif
@@ -580,9 +579,10 @@
 void fbcon_sis_clear32(struct vc_data *conp, struct display *p,
 			int srcy, int srcx, int height, int width)
 {
+	struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
 	u32 bgx;
 
-	if(!ivideo.accel) {
+	if(!ivideo->accel) {
 #ifdef FBCON_HAS_CFB32
 	    fbcon_cfb32_clear(conp, p, srcy, srcx, height, width);
 #endif
@@ -595,10 +595,11 @@
 
 void fbcon_sis_revc(struct display *p, int srcx, int srcy)
 {
+	struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
 	CRITFLAGS
 
-	if(!ivideo.accel) {
-	    switch(ivideo.video_bpp) {
+	if(!ivideo->accel) {
+	    switch(ivideo->video_bpp) {
 	    case 16:
 #ifdef FBCON_HAS_CFB16
 	       fbcon_cfb16_revc(p, srcx, srcy);
@@ -616,59 +617,59 @@
 	srcx *= fontwidth(p);
 	srcy *= fontheight(p);
 
-	if(sisvga_engine == SIS_300_VGA) {
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
 #ifdef CONFIG_FB_SIS_300
 	   CRITBEGIN
-	   SiS300SetupForSolidFill(0, 0x0a, 0);
-	   SiS300SubsequentSolidFillRect(srcx, srcy, fontwidth(p), fontheight(p));
+	   SiS300SetupForSolidFill(ivideo, 0, 0x0a);
+	   SiS300SubsequentSolidFillRect(ivideo, srcx, srcy, fontwidth(p), fontheight(p));
 	   CRITEND
-	   SiS300Sync();
+	   SiS300Sync(ivideo);
 #endif
 	} else {
 #ifdef CONFIG_FB_SIS_315
 	   CRITBEGIN
-	   SiS310SetupForSolidFill(0, 0x0a, 0);
-	   SiS310SubsequentSolidFillRect(srcx, srcy, fontwidth(p), fontheight(p));
+	   SiS310SetupForSolidFill(ivideo, 0, 0x0a);
+	   SiS310SubsequentSolidFillRect(ivideo, srcx, srcy, fontwidth(p), fontheight(p));
 	   CRITEND
-	   SiS310Sync();
+	   SiS310Sync(ivideo);
 #endif
 	}
 }
 
 #ifdef FBCON_HAS_CFB8
 struct display_switch fbcon_sis8 = {
-	.setup			= fbcon_cfb8_setup,
-	.bmove			= fbcon_sis_bmove,
-	.clear			= fbcon_sis_clear8,
-	.putc			= fbcon_cfb8_putc,
-	.putcs			= fbcon_cfb8_putcs,
-	.revc			= fbcon_cfb8_revc,
-	.clear_margins		= fbcon_cfb8_clear_margins,
-	.fontwidthmask		= FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
+	.setup		= fbcon_cfb8_setup,
+	.bmove		= fbcon_sis_bmove,
+	.clear		= fbcon_sis_clear8,
+	.putc		= fbcon_cfb8_putc,
+	.putcs		= fbcon_cfb8_putcs,
+	.revc		= fbcon_cfb8_revc,
+	.clear_margins	= fbcon_cfb8_clear_margins,
+	.fontwidthmask	= FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
 };
 #endif
 #ifdef FBCON_HAS_CFB16
 struct display_switch fbcon_sis16 = {
-	.setup			= fbcon_cfb16_setup,
-	.bmove			= fbcon_sis_bmove,
-	.clear			= fbcon_sis_clear16,
-	.putc			= fbcon_cfb16_putc,
-	.putcs			= fbcon_cfb16_putcs,
-	.revc			= fbcon_sis_revc,
-	.clear_margins		= fbcon_cfb16_clear_margins,
-	.fontwidthmask		= FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
+	.setup		= fbcon_cfb16_setup,
+	.bmove		= fbcon_sis_bmove,
+	.clear		= fbcon_sis_clear16,
+	.putc		= fbcon_cfb16_putc,
+	.putcs		= fbcon_cfb16_putcs,
+	.revc		= fbcon_sis_revc,
+	.clear_margins	= fbcon_cfb16_clear_margins,
+	.fontwidthmask	= FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
 };
 #endif
 #ifdef FBCON_HAS_CFB32
 struct display_switch fbcon_sis32 = {
-	.setup			= fbcon_cfb32_setup,
-	.bmove			= fbcon_sis_bmove,
-	.clear			= fbcon_sis_clear32,
-	.putc			= fbcon_cfb32_putc,
-	.putcs			= fbcon_cfb32_putcs,
-	.revc			= fbcon_sis_revc,
-	.clear_margins		= fbcon_cfb32_clear_margins,
-	.fontwidthmask		= FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
+	.setup		= fbcon_cfb32_setup,
+	.bmove		= fbcon_sis_bmove,
+	.clear		= fbcon_sis_clear32,
+	.putc		= fbcon_cfb32_putc,
+	.putcs		= fbcon_cfb32_putcs,
+	.revc		= fbcon_sis_revc,
+	.clear_margins	= fbcon_cfb32_clear_margins,
+	.fontwidthmask	= FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
 };
 #endif
 
--- diff/drivers/video/sis/sis_accel.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/sis_accel.h	2004-07-01 21:32:47.000000000 +0100
@@ -36,8 +36,8 @@
 
 #ifdef SISFB_USE_SPINLOCKS
 #include <linux/spinlock.h>
-#define CRITBEGIN  spin_lock_irqsave(&ivideo.lockaccel), critflags);
-#define CRITEND	   spin_unlock_irqrestore(&ivideo.lockaccel), critflags);
+#define CRITBEGIN  spin_lock_irqsave(&ivideo->lockaccel, critflags);
+#define CRITEND	   spin_unlock_irqrestore(&ivideo->lockaccel, critflags);
 #define CRITFLAGS  unsigned long critflags;
 #else
 #define CRITBEGIN
@@ -65,7 +65,6 @@
 #define A3D_FUNCTION		0x00000008  /* 3D command ? */
 #define	CLEAR_Z_BUFFER		0x00000009  /* ? */
 #define GRADIENT_FILL		0x0000000A  /* Gradient fill */
-#define STRETCH_BITBLT		0x0000000B  /* Stretched Blit */
 
 /* source select */
 #define SRCVIDEO                0x00000000  /* source is video RAM */
@@ -98,11 +97,6 @@
 #define DSTAGP                  0x02000000
 #define DSTVIDEO                0x02000000
 
-/* Line */
-#define LINE_STYLE              0x00800000
-#define NO_RESET_COUNTER        0x00400000
-#define NO_LAST_PIXEL           0x00200000
-
 /* Subfunctions for Color/Enhanced Color Expansion (315 only) */
 #define COLOR_TO_MONO		0x00100000
 #define AA_TEXT			0x00200000
@@ -134,212 +128,142 @@
 
 #define PATTERN_REG		0x8300  /* 384 bytes pattern buffer */
 
-/* Line registers */
-#define LINE_X0			SRC_Y
-#define LINE_X1			DST_Y
-#define LINE_Y0			SRC_X
-#define LINE_Y1			DST_X
-#define LINE_COUNT		RECT_WIDTH
-#define LINE_STYLE_PERIOD	RECT_HEIGHT
-#define LINE_STYLE_0		MONO_MASK
-#define LINE_STYLE_1		0x8230
-#define LINE_XN			PATTERN_REG
-#define LINE_YN			PATTERN_REG+2
-
 /* Transparent bitblit registers */
 #define TRANS_DST_KEY_HIGH	PAT_FGCOLOR
 #define TRANS_DST_KEY_LOW	PAT_BGCOLOR
 #define TRANS_SRC_KEY_HIGH	SRC_FGCOLOR
 #define TRANS_SRC_KEY_LOW	SRC_BGCOLOR
 
-/* Queue */
-#define Q_BASE_ADDR		0x85C0  /* Base address of software queue (?) */
-#define Q_WRITE_PTR		0x85C4  /* Current write pointer (?) */
-#define Q_READ_PTR		0x85C8  /* Current read pointer (?) */
-#define Q_STATUS		0x85CC  /* queue status */
-
-
-#define MMIO_IN8(base, offset) \
-	*(volatile u8 *)(((u8*)(base)) + (offset))
-#define MMIO_IN16(base, offset) \
-	*(volatile u16 *)(void *)(((u8*)(base)) + (offset))
-#define MMIO_IN32(base, offset) \
-	*(volatile u32 *)(void *)(((u8*)(base)) + (offset))
-#define MMIO_OUT8(base, offset, val) \
-	*(volatile u8 *)(((u8*)(base)) + (offset)) = (val)
-#define MMIO_OUT16(base, offset, val) \
-	*(volatile u16 *)(void *)(((u8*)(base)) + (offset)) = (val)
-#define MMIO_OUT32(base, offset, val) \
-	*(volatile u32 *)(void *)(((u8*)(base)) + (offset)) = (val)
+/* Store queue length in par */
+#define CmdQueLen ivideo->cmdqueuelength
 
 /* ------------- SiS 300 series -------------- */
 
-/* Macros to do useful things with the SIS BitBLT engine */
-
-/* BR(16) (0x8420):
+/* BR(16) (0x8240):
 
    bit 31 2D engine: 1 is idle,
    bit 30 3D engine: 1 is idle,
    bit 29 Command queue: 1 is empty
-
    bits 28:24: Current CPU driven BitBlt buffer stage bit[4:0]
-
    bits 15:0:  Current command queue length
 
 */
 
-/* TW: BR(16)+2 = 0x8242 */
-
-int     CmdQueLen;
-
 #define SiS300Idle \
   { \
-  while( (MMIO_IN16(ivideo.mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){}; \
-  while( (MMIO_IN16(ivideo.mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){}; \
-  while( (MMIO_IN16(ivideo.mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){}; \
-  CmdQueLen=MMIO_IN16(ivideo.mmio_vbase, 0x8240); \
+  	while((MMIO_IN16(ivideo->mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){}; \
+  	while((MMIO_IN16(ivideo->mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){}; \
+  	while((MMIO_IN16(ivideo->mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){}; \
+  	CmdQueLen = MMIO_IN16(ivideo->mmio_vbase, 0x8240); \
   }
-/* TW: (do three times, because 2D engine seems quite unsure about whether or not it's idle) */
+/* (do three times, because 2D engine seems quite unsure about whether or not it's idle) */
 
 #define SiS300SetupSRCBase(base) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(0), base);\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(0), base);\
+	CmdQueLen--;
 
 #define SiS300SetupSRCPitch(pitch) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT16(ivideo.mmio_vbase, BR(1), pitch);\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT16(ivideo->mmio_vbase, BR(1), pitch);\
+	CmdQueLen--;
 
 #define SiS300SetupSRCXY(x,y) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(2), (x)<<16 | (y) );\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(2), (x)<<16 | (y) );\
+	CmdQueLen--;
 
 #define SiS300SetupDSTBase(base) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(4), base);\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(4), base);\
+	CmdQueLen--;
 
 #define SiS300SetupDSTXY(x,y) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(3), (x)<<16 | (y) );\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(3), (x)<<16 | (y) );\
+	CmdQueLen--;
 
 #define SiS300SetupDSTRect(x,y) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(5), (y)<<16 | (x) );\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(5), (y)<<16 | (x) );\
+	CmdQueLen--;
 
 #define SiS300SetupDSTColorDepth(bpp) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT16(ivideo.mmio_vbase, BR(1)+2, bpp);\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT16(ivideo->mmio_vbase, BR(1)+2, bpp);\
+	CmdQueLen--;
 
 #define SiS300SetupRect(w,h) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(6), (h)<<16 | (w) );\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(6), (h)<<16 | (w) );\
+	CmdQueLen--;
 
 #define SiS300SetupPATFG(color) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(7), color);\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(7), color);\
+	CmdQueLen--;
 
 #define SiS300SetupPATBG(color) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(8), color);\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(8), color);\
+	CmdQueLen--;
 
 #define SiS300SetupSRCFG(color) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(9), color);\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(9), color);\
+	CmdQueLen--;
 
 #define SiS300SetupSRCBG(color) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(10), color);\
-                CmdQueLen --;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(10), color);\
+	CmdQueLen--;
 
 /* 0x8224 src colorkey high */
 /* 0x8228 src colorkey low */
 /* 0x821c dest colorkey high */
 /* 0x8220 dest colorkey low */
 #define SiS300SetupSRCTrans(color) \
-                if (CmdQueLen <= 1)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, 0x8224, color);\
-		MMIO_OUT32(ivideo.mmio_vbase, 0x8228, color);\
-		CmdQueLen -= 2;
+	if(CmdQueLen <= 1) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, 0x8224, color);\
+	MMIO_OUT32(ivideo->mmio_vbase, 0x8228, color);\
+	CmdQueLen -= 2;
 
 #define SiS300SetupDSTTrans(color) \
-		if (CmdQueLen <= 1)  SiS300Idle;\
-		MMIO_OUT32(ivideo.mmio_vbase, 0x821C, color); \
-		MMIO_OUT32(ivideo.mmio_vbase, 0x8220, color); \
-                CmdQueLen -= 2;
+	if(CmdQueLen <= 1) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, 0x821C, color); \
+	MMIO_OUT32(ivideo->mmio_vbase, 0x8220, color); \
+	CmdQueLen -= 2;
 
 #define SiS300SetupMONOPAT(p0,p1) \
-                if (CmdQueLen <= 1)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(11), p0);\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(12), p1);\
-                CmdQueLen -= 2;
+	if(CmdQueLen <= 1) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(11), p0);\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(12), p1);\
+	CmdQueLen -= 2;
 
 #define SiS300SetupClipLT(left,top) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(13), ((left) & 0xFFFF) | (top)<<16 );\
-                CmdQueLen--;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(13), ((left) & 0xFFFF) | (top)<<16 );\
+	CmdQueLen--;
 
 #define SiS300SetupClipRB(right,bottom) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(14), ((right) & 0xFFFF) | (bottom)<<16 );\
-                CmdQueLen--;
+	if(CmdQueLen <= 0) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(14), ((right) & 0xFFFF) | (bottom)<<16 );\
+	CmdQueLen--;
 
 /* General */
 #define SiS300SetupROP(rop) \
-                ivideo.CommandReg = (rop) << 8;
+	ivideo->CommandReg = (rop) << 8;
 
 #define SiS300SetupCMDFlag(flags) \
-                ivideo.CommandReg |= (flags);
+	ivideo->CommandReg |= (flags);
 
 #define SiS300DoCMD \
-                if (CmdQueLen <= 1)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(15), ivideo.CommandReg); \
-                MMIO_OUT32(ivideo.mmio_vbase, BR(16), 0);\
-                CmdQueLen -= 2;
-
-/* Line */
-#define SiS300SetupX0Y0(x,y) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(2), (y)<<16 | (x) );\
-                CmdQueLen--;
-
-#define SiS300SetupX1Y1(x,y) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(3), (y)<<16 | (x) );\
-                CmdQueLen--;
-
-#define SiS300SetupLineCount(c) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT16(ivideo.mmio_vbase, BR(6), c);\
-                CmdQueLen--;
-
-#define SiS300SetupStylePeriod(p) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT16(ivideo.mmio_vbase, BR(6)+2, p);\
-                CmdQueLen--;
-
-#define SiS300SetupStyleLow(ls) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(11), ls);\
-                CmdQueLen--;
-
-#define SiS300SetupStyleHigh(ls) \
-                if (CmdQueLen <= 0)  SiS300Idle;\
-                MMIO_OUT32(ivideo.mmio_vbase, BR(12), ls);\
-                CmdQueLen--;
-
+	if(CmdQueLen <= 1) SiS300Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, BR(15), ivideo->CommandReg); \
+	MMIO_OUT32(ivideo->mmio_vbase, BR(16), 0);\
+	CmdQueLen -= 2;
 
-
-/* -------------- SiS 315 series --------------- */
+/* -------------- SiS 315/330 series --------------- */
 
 /* Q_STATUS:
    bit 31 = 1: All engines idle and all queues empty
@@ -353,179 +277,131 @@
    bits 23:16: 2D counter 3
    bits 15:8:  2D counter 2
    bits 7:0:   2D counter 1
-
-   Where is the command queue length (current amount of commands the queue
-   can accept) on the 315 series?
 */
 
-/* TW: FIXME: CmdQueLen is... where....? */
-/* We assume a length of 4 bytes per command; since 512K of
- * of RAM are allocated, the number of commands is easily
- * calculated (assuming that there is no 3D support yet)
- * We calculate it very cautiously (128K only) and let the
- * rest to the (never?)-to-come (?) 3D engine. (The 3D engine
- * can use a similar technique, using the remaining 384K,
- * hence a queue overflow is avoided)
- * UPDATE: This technique causes a terrible system latency
- * on integrated chipsets. Disable the queue handling for
- * now.
- */
 #define SiS310Idle \
   { \
-  while( (MMIO_IN16(ivideo.mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \
-  while( (MMIO_IN16(ivideo.mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \
-  CmdQueLen = 0; \
-  /*CmdQueLen = ((128 * 1024) / 4) - 64; */ \
+  	while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \
+  	while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \
+  	CmdQueLen = 0; \
   }
 
 #define SiS310SetupSRCBase(base) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, SRC_ADDR, base);\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, SRC_ADDR, base);\
+	CmdQueLen--;
 
 #define SiS310SetupSRCPitch(pitch) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT16(ivideo.mmio_vbase, SRC_PITCH, pitch);\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT16(ivideo->mmio_vbase, SRC_PITCH, pitch);\
+	CmdQueLen--;
 
 #define SiS310SetupSRCXY(x,y) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, SRC_Y, (x)<<16 | (y) );\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, SRC_Y, (x)<<16 | (y) );\
+	CmdQueLen--;
 
 #define SiS310SetupDSTBase(base) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, DST_ADDR, base);\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, DST_ADDR, base);\
+	CmdQueLen--;
 
 #define SiS310SetupDSTXY(x,y) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, DST_Y, (x)<<16 | (y) );\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, DST_Y, (x)<<16 | (y) );\
+	CmdQueLen--;
 
 #define SiS310SetupDSTRect(x,y) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, DST_PITCH, (y)<<16 | (x) );\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, DST_PITCH, (y)<<16 | (x) );\
+	CmdQueLen--;
 
 #define SiS310SetupDSTColorDepth(bpp) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT16(ivideo.mmio_vbase, AGP_BASE, bpp);\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT16(ivideo->mmio_vbase, AGP_BASE, bpp);\
+	CmdQueLen--;
 
 #define SiS310SetupRect(w,h) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, RECT_WIDTH, (h)<<16 | (w) );\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, RECT_WIDTH, (h)<<16 | (w) );\
+	CmdQueLen--;
 
 #define SiS310SetupPATFG(color) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, PAT_FGCOLOR, color);\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, PAT_FGCOLOR, color);\
+	CmdQueLen--;
 
 #define SiS310SetupPATBG(color) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, PAT_BGCOLOR, color);\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, PAT_BGCOLOR, color);\
+	CmdQueLen--;
 
 #define SiS310SetupSRCFG(color) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, SRC_FGCOLOR, color);\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, SRC_FGCOLOR, color);\
+	CmdQueLen--;
 
 #define SiS310SetupSRCBG(color) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, SRC_BGCOLOR, color);\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, SRC_BGCOLOR, color);\
+	CmdQueLen--;
 
 #define SiS310SetupSRCTrans(color) \
-      if (CmdQueLen <= 1)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, TRANS_SRC_KEY_HIGH, color);\
-      MMIO_OUT32(ivideo.mmio_vbase, TRANS_SRC_KEY_LOW, color);\
-      CmdQueLen -= 2;
+	if(CmdQueLen <= 1) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, TRANS_SRC_KEY_HIGH, color);\
+	MMIO_OUT32(ivideo->mmio_vbase, TRANS_SRC_KEY_LOW, color);\
+	CmdQueLen -= 2;
 
 #define SiS310SetupDSTTrans(color) \
-      if (CmdQueLen <= 1)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, TRANS_DST_KEY_HIGH, color); \
-      MMIO_OUT32(ivideo.mmio_vbase, TRANS_DST_KEY_LOW, color); \
-      CmdQueLen -= 2;
+	if(CmdQueLen <= 1) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, TRANS_DST_KEY_HIGH, color); \
+	MMIO_OUT32(ivideo->mmio_vbase, TRANS_DST_KEY_LOW, color); \
+	CmdQueLen -= 2;
 
 #define SiS310SetupMONOPAT(p0,p1) \
-      if (CmdQueLen <= 1)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, MONO_MASK, p0);\
-      MMIO_OUT32(ivideo.mmio_vbase, MONO_MASK+4, p1);\
-      CmdQueLen -= 2;
+	if(CmdQueLen <= 1) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, MONO_MASK, p0);\
+	MMIO_OUT32(ivideo->mmio_vbase, MONO_MASK+4, p1);\
+	CmdQueLen -= 2;
 
 #define SiS310SetupClipLT(left,top) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, LEFT_CLIP, ((left) & 0xFFFF) | (top)<<16 );\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, LEFT_CLIP, ((left) & 0xFFFF) | (top)<<16 );\
+	CmdQueLen--;
 
 #define SiS310SetupClipRB(right,bottom) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, RIGHT_CLIP, ((right) & 0xFFFF) | (bottom)<<16 );\
-      CmdQueLen--;
+	if(CmdQueLen <= 0) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, RIGHT_CLIP, ((right) & 0xFFFF) | (bottom)<<16 );\
+	CmdQueLen--;
 
 #define SiS310SetupROP(rop) \
-      ivideo.CommandReg = (rop) << 8;
+	ivideo->CommandReg = (rop) << 8;
 
 #define SiS310SetupCMDFlag(flags) \
-      ivideo.CommandReg |= (flags);
+	ivideo->CommandReg |= (flags);
 
 #define SiS310DoCMD \
-      if (CmdQueLen <= 1)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, COMMAND_READY, ivideo.CommandReg); \
-      MMIO_OUT32(ivideo.mmio_vbase, FIRE_TRIGGER, 0); \
-      CmdQueLen -= 2;
-
-#define SiS310SetupX0Y0(x,y) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, LINE_X0, (y)<<16 | (x) );\
-      CmdQueLen--;
-
-#define SiS310SetupX1Y1(x,y) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, LINE_X1, (y)<<16 | (x) );\
-      CmdQueLen--;
-
-#define SiS310SetupLineCount(c) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT16(ivideo.mmio_vbase, LINE_COUNT, c);\
-      CmdQueLen--;
-
-#define SiS310SetupStylePeriod(p) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT16(ivideo.mmio_vbase, LINE_STYLE_PERIOD, p);\
-      CmdQueLen--;
-
-#define SiS310SetupStyleLow(ls) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, LINE_STYLE_0, ls);\
-      CmdQueLen--;
-
-#define SiS310SetupStyleHigh(ls) \
-      if (CmdQueLen <= 0)  SiS310Idle;\
-      MMIO_OUT32(ivideo.mmio_vbase, LINE_STYLE_1, ls);\
-      CmdQueLen--;
+	if(CmdQueLen <= 1) SiS310Idle;\
+	MMIO_OUT32(ivideo->mmio_vbase, COMMAND_READY, ivideo->CommandReg); \
+	MMIO_OUT32(ivideo->mmio_vbase, FIRE_TRIGGER, 0); \
+	CmdQueLen -= 2;
 
-int  sisfb_initaccel(void);
-void sisfb_syncaccel(void);
 
-extern struct video_info ivideo;
+int  sisfb_initaccel(struct sis_video_info *ivideo);
+void sisfb_syncaccel(struct sis_video_info *ivideo);
 
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,33)
 void fbcon_sis_bmove(struct display *p, int srcy, int srcx, int dsty,
-                     int dstx, int height, int width);
+			int dstx, int height, int width);
 void fbcon_sis_revc(struct display *p, int srcy, int srcx);
 void fbcon_sis_clear8(struct vc_data *conp, struct display *p, int srcy,
-                      int srcx, int height, int width);
+			int srcx, int height, int width);
 void fbcon_sis_clear16(struct vc_data *conp, struct display *p, int srcy,
-                       int srcx, int height, int width);
+			int srcx, int height, int width);
 void fbcon_sis_clear32(struct vc_data *conp, struct display *p, int srcy,
-                       int srcx, int height, int width);
+			int srcx, int height, int width);
 #endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,34)
-extern int sisfb_accel;
 void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
 void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area);
 #endif
--- diff/drivers/video/sis/sis_main.c	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/sis_main.c	2004-07-01 21:32:47.000000000 +0100
@@ -1,6 +1,7 @@
 /*
- * SiS 300/630/730/540/315/550/650/651/M650/661FX/M661FX/740/741/M741/330/760
- * frame buffer driver for Linux kernels 2.4.x and 2.5.x
+ * SiS 300/305/540/630(S)/730(S)
+ * SiS 315(H/PRO)/55x/(M)65x/(M)661(F/M)X/740/741(GX)/330/(M)760
+ * frame buffer driver for Linux kernels >= 2.4.14 and >=2.6.3
  *
  * Copyright (C) 2001-2004 Thomas Winischhofer, Vienna, Austria.
  *
@@ -20,8 +21,8 @@
  *
  * Author:   	Thomas Winischhofer <thomas@winischhofer.net>
  *
- * Author of code base:
- *		SiS (www.sis.com.tw)
+ * Author of (practically wiped) code base:
+ *		SiS (www.sis.com)
  *	 	Copyright (C) 1999 Silicon Integrated Systems, Inc.
  *
  * See http://www.winischhofer.net/ for more information and updates
@@ -34,7 +35,11 @@
 #include <linux/config.h>
 #include <linux/version.h>
 #include <linux/module.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#include <linux/moduleparam.h>
+#endif
 #include <linux/kernel.h>
+#include <linux/spinlock.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
@@ -47,28 +52,12 @@
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/pci.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 #include <linux/vmalloc.h>
-#endif
 #include <linux/vt_kern.h>
 #include <linux/capability.h>
 #include <linux/fs.h>
-#include <linux/agp_backend.h>
 #include <linux/types.h>
 #include <asm/uaccess.h>
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-#include <linux/spinlock.h>
-#endif
-
-#include "osdef.h"
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-#include <video/sisfb.h>
-#else
-#include <linux/sisfb.h>
-#endif
-
 #include <asm/io.h>
 #ifdef CONFIG_MTRR
 #include <asm/mtrr.h>
@@ -82,32 +71,16 @@
 #include <video/fbcon-cfb32.h>
 #endif
 
-#include "vgatypes.h"
-#include "sis_main.h"
 #include "sis.h"
+#include "sis_main.h"
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-#error "This version of sisfb requires at least 2.6.0"
-#else
-#if 0
-#define NEWFBDEV		/* Define this as soon as new fvdev code has been merged */
-#endif
-#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,3)
+#error "This version of sisfb requires at least 2.6.3"
 #endif
-
-/* -------------------- Macro definitions ---------------------------- */
-
-#undef SISFBDEBUG 	/* TW: no debugging */
-
-#ifdef SISFBDEBUG
-#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
-#else
-#define DPRINTK(fmt, args...)
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#ifdef SISFBACCEL
 #ifdef FBCON_HAS_CFB8
 extern struct display_switch fbcon_sis8;
 #endif
@@ -118,174 +91,289 @@
 extern struct display_switch fbcon_sis32;
 #endif
 #endif
-#endif
 
-/* --------------- Hardware Access Routines -------------------------- */
+/* ------------------ Internal helper routines ----------------- */
 
-void sisfb_set_reg4(u16 port, unsigned long data)
+static void __init
+sisfb_setdefaultparms(void)
 {
-	outl((u32) (data & 0xffffffff), port);
+	sisfb_off 		= 0;
+	sisfb_parm_mem 		= 0;
+	sisfb_accel 		= -1;
+	sisfb_ypan      	= -1;
+	sisfb_max 		= -1;
+	sisfb_userom    	= -1;
+        sisfb_useoem    	= -1;
+#ifdef MODULE
+	/* Module: "None" for 2.4, default mode for 2.5+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+	sisfb_mode_idx 		= -1;
+#else
+	sisfb_mode_idx  	= MODE_INDEX_NONE;
+#endif
+#else
+	/* Static: Default mode */
+	sisfb_mode_idx  	= -1;
+#endif
+	sisfb_parm_rate 	= -1;
+	sisfb_crt1off 		= 0;
+	sisfb_forcecrt1 	= -1;
+	sisfb_crt2type  	= -1;
+	sisfb_crt2flags 	= 0;
+	sisfb_pdc 		= 0xff;
+	sisfb_pdca 		= 0xff;
+	sisfb_scalelcd  	= -1;
+	sisfb_specialtiming 	= CUT_NONE;
+	sisfb_lvdshl 		= -1;
+	sisfb_dstn     		= 0;
+	sisfb_fstn 		= 0;
+	sisfb_tvplug    	= -1;
+	sisfb_tvstd     	= -1;
+	sisfb_tvxposoffset 	= 0;
+	sisfb_tvyposoffset 	= 0;
+	sisfb_filter 		= -1;
+	sisfb_nocrt2rate 	= 0;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+	sisfb_inverse   	= 0;
+	sisfb_fontname[0] 	= 0;
+#endif
+#if !defined(__i386__) && !defined(__x86_64__)
+	sisfb_resetcard 	= 0;
+	sisfb_videoram  	= 0;
+#endif
 }
 
-u32 sisfb_get_reg3(u16 port)
+static void __init
+sisfb_search_vesamode(unsigned int vesamode, BOOLEAN quiet)
 {
-	u32 data;
+	int i = 0, j = 0;
 
-	data = inl(port);
-	return (data);
-}
+	/* BEWARE: We don't know the hardware specs yet and there is no ivideo */
+
+	if(vesamode == 0) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+		sisfb_mode_idx = MODE_INDEX_NONE;
+#else
+		if(!quiet) {
+		   printk(KERN_ERR "sisfb: Invalid mode. Using default.\n");
+		}
+		sisfb_mode_idx = DEFAULT_MODE;
+#endif
+		return;
+	}
+
+	vesamode &= 0x1dff;  /* Clean VESA mode number from other flags */
 
-/* ------------ Interface for init & mode switching code ------------- */
+	while(sisbios_mode[i++].mode_no[0] != 0) {
+		if( (sisbios_mode[i-1].vesa_mode_no_1 == vesamode) ||
+		    (sisbios_mode[i-1].vesa_mode_no_2 == vesamode) ) {
+		    if(sisfb_fstn) {
+		       if(sisbios_mode[i-1].mode_no[1] == 0x50 ||
+		          sisbios_mode[i-1].mode_no[1] == 0x56 ||
+		          sisbios_mode[i-1].mode_no[1] == 0x53) continue;
+	            } else {
+		       if(sisbios_mode[i-1].mode_no[1] == 0x5a ||
+		          sisbios_mode[i-1].mode_no[1] == 0x5b) continue;
+		    }
+		    sisfb_mode_idx = i - 1;
+		    j = 1;
+		    break;
+		}
+	}
+	if((!j) && !quiet) printk(KERN_ERR "sisfb: Invalid VESA mode 0x%x'\n", vesamode);
+}
 
-BOOLEAN
-sisfb_query_VGA_config_space(PSIS_HW_INFO psishw_ext,
-	unsigned long offset, unsigned long set, unsigned long *value)
+static void
+sisfb_search_mode(char *name, BOOLEAN quiet)
 {
-	static struct pci_dev *pdev = NULL;
-	static unsigned char init = 0, valid_pdev = 0;
+	int i = 0;
+	unsigned int j = 0, xres = 0, yres = 0, depth = 0, rate = 0;
+	char strbuf[16], strbuf1[20];
+	char *nameptr = name;
 
-	if (!set)
-		DPRINTK("sisfb: Get VGA offset 0x%lx\n", offset);
-	else
-		DPRINTK("sisfb: Set offset 0x%lx to 0x%lx\n", offset, *value);
+	/* BEWARE: We don't know the hardware specs yet and there is no ivideo */
 
-	if (!init) {
-		init = TRUE;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,74)
-		pci_for_each_dev(pdev) {
-#else
-		while((pdev = pci_find_device(PCI_VENDOR_ID_SI, PCI_ANY_ID, pdev))) {
-#endif
-			DPRINTK("sisfb: Current: 0x%x, target: 0x%x\n",
-			         pdev->device, ivideo.chip_id);
-			if ((pdev->vendor == PCI_VENDOR_ID_SI)
-			           && (pdev->device == ivideo.chip_id)) {
-				valid_pdev = TRUE;
-				break;
-			}
-		}
+	if(name == NULL) {
+	   if(!quiet) {
+	      printk(KERN_ERR "sisfb: Internal error, using default mode.\n");
+	   }
+	   sisfb_mode_idx = DEFAULT_MODE;
+	   return;
 	}
 
-	if (!valid_pdev) {
-		printk(KERN_DEBUG "sisfb: Can't find SiS %d VGA device.\n",
-				ivideo.chip_id);
-		return FALSE;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+        if(!strnicmp(name, sisbios_mode[MODE_INDEX_NONE].name, strlen(name))) {
+	   if(!quiet) {
+	      printk(KERN_ERR "sisfb: Mode 'none' not supported anymore. Using default.\n");
+	   }
+	   sisfb_mode_idx = DEFAULT_MODE;
+	   return;
 	}
+#endif
+	if(strlen(name) <= 19) {
+	   strcpy(strbuf1, name);
+	   for(i=0; i<strlen(strbuf1); i++) {
+	      if(strbuf1[i] < '0' || strbuf1[i] > '9') strbuf1[i] = ' ';
+	   }
 
-	if (set == 0)
-		pci_read_config_dword(pdev, offset, (u32 *)value);
-	else
-		pci_write_config_dword(pdev, offset, (u32)(*value));
+	   /* This does some fuzzy mode naming detection */
+	   if(sscanf(strbuf1, "%u %u %u %u", &xres, &yres, &depth, &rate) == 4) {
+	      if((rate <= 32) || (depth > 32)) {
+	         j = rate; rate = depth; depth = j;
+	      }
+	      sprintf(strbuf, "%ux%ux%u", xres, yres, depth);
+	      nameptr = strbuf;
+	      sisfb_parm_rate = rate;
+	   } else if(sscanf(strbuf1, "%u %u %u", &xres, &yres, &depth) == 3) {
+	      sprintf(strbuf, "%ux%ux%u", xres, yres, depth);
+	      nameptr = strbuf;
+	   } else {
+	      xres = 0;
+	      if((sscanf(strbuf1, "%u %u", &xres, &yres) == 2) && (xres != 0)) {
+	         sprintf(strbuf, "%ux%ux8", xres, yres);
+	         nameptr = strbuf;
+	      } else {
+	         sisfb_search_vesamode(simple_strtoul(name, NULL, 0), quiet);
+	         return;
+	      }
+	   }
+	}
 
-	return TRUE;
+	i = 0; j = 0;
+	while(sisbios_mode[i].mode_no[0] != 0) {
+		if(!strnicmp(nameptr, sisbios_mode[i++].name, strlen(nameptr))) {
+		   	if(sisfb_fstn) {
+		      		if(sisbios_mode[i-1].mode_no[1] == 0x50 ||
+		         	   sisbios_mode[i-1].mode_no[1] == 0x56 ||
+		         	   sisbios_mode[i-1].mode_no[1] == 0x53) continue;
+	           	} else {
+		      		if(sisbios_mode[i-1].mode_no[1] == 0x5a ||
+		         	   sisbios_mode[i-1].mode_no[1] == 0x5b) continue;
+		   	}
+		   	sisfb_mode_idx = i - 1;
+		   	j = 1;
+		   	break;
+		}
+	}
+	if((!j) && !quiet) printk(KERN_ERR "sisfb: Invalid mode '%s'\n", nameptr);
 }
 
-BOOLEAN sisfb_query_north_bridge_space(PSIS_HW_INFO psishw_ext,
-	unsigned long offset, unsigned long set, unsigned long *value)
+#ifndef MODULE
+static void __devinit
+sisfb_get_vga_mode_from_kernel(void)
 {
-	static struct pci_dev *pdev = NULL;
-	static unsigned char init = 0, valid_pdev = 0;
-	u16 nbridge_id = 0;
-
-	if (!init) {
-		init = TRUE;
-		switch (ivideo.chip) {
-#ifdef CONFIG_FB_SIS_300
-		case SIS_540:
-			nbridge_id = PCI_DEVICE_ID_SI_540;
-			break;
-		case SIS_630:
-			nbridge_id = PCI_DEVICE_ID_SI_630;
-			break;
-		case SIS_730:
-			nbridge_id = PCI_DEVICE_ID_SI_730;
-			break;
+#if (defined(__i386__) || defined(__x86_64__)) && defined(CONFIG_VIDEO_SELECT)
+   	char mymode[32];
+	int  mydepth = screen_info.lfb_depth;
+
+	if(screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB) return;
+
+	if( (screen_info.lfb_width >= 320) && (screen_info.lfb_width <= 2048) &&
+	    (screen_info.lfb_height >= 200) && (screen_info.lfb_height <= 1536) &&
+	    (mydepth >= 8) && (mydepth <= 32) ) {
+
+	    if(mydepth == 24) mydepth = 32;
+
+	    sprintf(mymode, "%ux%ux%u", screen_info.lfb_width,
+	    				screen_info.lfb_height,
+					mydepth);
+
+	    printk(KERN_DEBUG "sisfb: Using vga mode %s pre-set by kernel as default\n", mymode);
+
+	    sisfb_search_mode(mymode, TRUE);
+	}
 #endif
-#ifdef CONFIG_FB_SIS_315
-		case SIS_550:
-			nbridge_id = PCI_DEVICE_ID_SI_550;
-			break;
-		case SIS_650:
-			nbridge_id = PCI_DEVICE_ID_SI_650;
-			break;
-		case SIS_740:
-			nbridge_id = PCI_DEVICE_ID_SI_740;
-			break;
-		case SIS_661:
-			nbridge_id = PCI_DEVICE_ID_SI_660;
-			break;
-		case SIS_741:
-			nbridge_id = PCI_DEVICE_ID_SI_741;
-			break;
-		case SIS_660:
-			nbridge_id = PCI_DEVICE_ID_SI_660;
-			break;
-		case SIS_760:
-			nbridge_id = PCI_DEVICE_ID_SI_760;
-			break;
+	return;
+}
 #endif
-		default:
-			nbridge_id = 0;
-			break;
-		}
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,74)
-		pci_for_each_dev(pdev) {
-#else
-		while((pdev = pci_find_device(PCI_VENDOR_ID_SI, PCI_ANY_ID, pdev))) {
-#endif
-			DPRINTK("Current: 0x%x, target: 0x%x\n",
-					pdev->device, ivideo.chip_id);
-			if ((pdev->vendor == PCI_VENDOR_ID_SI)
-					&& (pdev->device == nbridge_id)) {
-				valid_pdev = TRUE;
-				break;
-			}
-		}
-	}
+static void __init
+sisfb_search_crt2type(const char *name)
+{
+	int i = 0;
 
-	if (!valid_pdev) {
-		printk(KERN_DEBUG "sisfb: Can't find SiS %d North Bridge device.\n",
-				nbridge_id);
-		return FALSE;
+	/* BEWARE: We don't know the hardware specs yet and there is no ivideo */
+
+	if(name == NULL) return;
+
+	while(sis_crt2type[i].type_no != -1) {
+	   	if(!strnicmp(name, sis_crt2type[i].name, strlen(sis_crt2type[i].name))) {
+	      		sisfb_crt2type = sis_crt2type[i].type_no;
+	      		sisfb_tvplug = sis_crt2type[i].tvplug_no;
+	      		sisfb_crt2flags = sis_crt2type[i].flags;
+	      		break;
+	   	}
+	   	i++;
 	}
 
-	if (set == 0)
-		pci_read_config_dword(pdev, offset, (u32 *)value);
-	else
-		pci_write_config_dword(pdev, offset, (u32)(*value));
+	sisfb_dstn = (sisfb_crt2flags & FL_550_DSTN) ? 1 : 0;
+	sisfb_fstn = (sisfb_crt2flags & FL_550_FSTN) ? 1 : 0;
 
-	return TRUE;
+	if(sisfb_crt2type < 0) {
+		printk(KERN_ERR "sisfb: Invalid CRT2 type: %s\n", name);
+	}
 }
 
-/* ------------------ Internal helper routines ----------------- */
-
-static BOOLEAN sisfb_verify_rate(struct sisfb_monitor *monitor, int mode_idx, int rate_idx, int rate)
+static void __init
+sisfb_search_tvstd(const char *name)
 {
-	int htotal, vtotal;
-	unsigned int dclock, hsync;
-
-	if(!monitor->datavalid) return TRUE;
+	int i = 0;
 
-	if(mode_idx < 0) return FALSE;
+	/* BEWARE: We don't know the hardware specs yet and there is no ivideo */
 
-	if(rate < (monitor->vmin - 1)) return FALSE;
-	if(rate > (monitor->vmax + 1)) return FALSE;
+	if(name == NULL) return;
 
-	if(sisfb_gettotalfrommode(&SiS_Pr, &sishw_ext, sisbios_mode[mode_idx].mode_no,
-	                          &htotal, &vtotal, rate_idx)) {
-		dclock = (htotal * vtotal * rate) / 1000;
-		if(dclock > (monitor->dclockmax + 1000)) return FALSE;
-		hsync = dclock / htotal;
-		if(hsync < (monitor->hmin - 1)) return FALSE;
-		if(hsync > (monitor->hmax + 1)) return FALSE;
-        } else {
-	  	return FALSE;
+	while(sis_tvtype[i].type_no != -1) {
+	   	if(!strnicmp(name, sis_tvtype[i].name, strlen(sis_tvtype[i].name))) {
+	      		sisfb_tvstd = sis_tvtype[i].type_no;
+	      		break;
+	   	}
+	   	i++;
 	}
-	return TRUE;
-};
+}
+
+static void __init
+sisfb_search_specialtiming(const char *name)
+{
+	int i = 0;
+	BOOLEAN found = FALSE;
+
+	/* BEWARE: We don't know the hardware specs yet and there is no ivideo */
+
+	if(name == NULL) return;
+
+	if(!strnicmp(name, "none", 4)) {
+	        sisfb_specialtiming = CUT_FORCENONE;
+		printk(KERN_DEBUG "sisfb: Special timing disabled\n");
+	} else {
+	   while(mycustomttable[i].chipID != 0) {
+	      if(!strnicmp(name,mycustomttable[i].optionName, strlen(mycustomttable[i].optionName))) {
+		 sisfb_specialtiming = mycustomttable[i].SpecialID;
+		 found = TRUE;
+		 printk(KERN_INFO "sisfb: Special timing for %s %s forced (\"%s\")\n",
+		 	mycustomttable[i].vendorName, mycustomttable[i].cardName,
+		 	mycustomttable[i].optionName);
+		 break;
+	      }
+	      i++;
+	   }
+	   if(!found) {
+	      printk(KERN_WARNING "sisfb: Invalid SpecialTiming parameter, valid are:");
+	      printk(KERN_WARNING "\t\"none\" (to disable special timings)\n");
+	      i = 0;
+	      while(mycustomttable[i].chipID != 0) {
+		 printk(KERN_WARNING "\t\"%s\" (for %s %s)\n",
+		     mycustomttable[i].optionName,
+		     mycustomttable[i].vendorName,
+		     mycustomttable[i].cardName);
+		 i++;
+	      }
+           }
+ 	}
+}
 
-static BOOLEAN sisfb_interpret_edid(struct sisfb_monitor *monitor, u8 *buffer)
+static BOOLEAN __devinit
+sisfb_interpret_edid(struct sisfb_monitor *monitor, u8 *buffer)
 {
 	int i, j, xres, yres, refresh, index;
 	u32 emodes;
@@ -385,7 +473,8 @@
  	return(monitor->datavalid);
 }
 
-static void sisfb_handle_ddc(struct sisfb_monitor *monitor, int crtno)
+static void __devinit
+sisfb_handle_ddc(struct sis_video_info *ivideo, struct sisfb_monitor *monitor, int crtno)
 {
 	USHORT  temp, i, realcrtno = crtno;
    	u8      buffer[256];
@@ -393,14 +482,15 @@
 	monitor->datavalid = FALSE;
 
 	if(crtno) {
-       	   if(ivideo.vbflags & CRT2_LCD)      realcrtno = 1;
-      	   else if(ivideo.vbflags & CRT2_VGA) realcrtno = 2;
+       	   if(ivideo->vbflags & CRT2_LCD)      realcrtno = 1;
+      	   else if(ivideo->vbflags & CRT2_VGA) realcrtno = 2;
       	   else return;
    	}
 
-	if((sisfb_crt1off) && (!crtno)) return;
+	if((ivideo->sisfb_crt1off) && (!crtno)) return;
 
-    	temp = SiS_HandleDDC(&SiS_Pr, ivideo.vbflags, sisvga_engine, realcrtno, 0, &buffer[0]);
+    	temp = SiS_HandleDDC(&ivideo->SiS_Pr, ivideo->vbflags, ivideo->sisvga_engine,
+				realcrtno, 0, &buffer[0]);
    	if((!temp) || (temp == 0xffff)) {
       	   printk(KERN_INFO "sisfb: CRT%d DDC probing failed\n", crtno + 1);
 	   return;
@@ -415,7 +505,7 @@
       	   if(temp & 0x02) {
 	      i = 3;  /* Number of retrys */
 	      do {
-	    	 temp = SiS_HandleDDC(&SiS_Pr, ivideo.vbflags, sisvga_engine,
+	    	 temp = SiS_HandleDDC(&ivideo->SiS_Pr, ivideo->vbflags, ivideo->sisvga_engine,
 				     realcrtno, 1, &buffer[0]);
 	      } while((temp) && i--);
               if(!temp) {
@@ -435,194 +525,117 @@
 	}
 }
 
-static void sisfb_search_vesamode(unsigned int vesamode, BOOLEAN quiet)
+static BOOLEAN
+sisfb_verify_rate(struct sis_video_info *ivideo, struct sisfb_monitor *monitor,
+		int mode_idx, int rate_idx, int rate)
 {
-	int i = 0, j = 0;
+	int htotal, vtotal;
+	unsigned int dclock, hsync;
 
-	if(vesamode == 0) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-		sisfb_mode_idx = MODE_INDEX_NONE;
-#else
-		if(!quiet)
-		   printk(KERN_ERR "sisfb: Mode 'none' not supported anymore. Using default.\n");
-		sisfb_mode_idx = DEFAULT_MODE;
+	if(!monitor->datavalid) return TRUE;
+
+	if(mode_idx < 0) return FALSE;
+
+	/* Skip for 320x200, 320x240, 640x400 */
+    	switch(sisbios_mode[mode_idx].mode_no[ivideo->mni]) {
+    	case 0x59:
+    	case 0x41:
+    	case 0x4f:
+    	case 0x50:
+    	case 0x56:
+    	case 0x53:
+    	case 0x2f:
+    	case 0x5d:
+    	case 0x5e:
+    		return TRUE;
+#ifdef CONFIG_FB_SIS_315
+	case 0x5a:
+	case 0x5b:
+		if(ivideo->sisvga_engine == SIS_315_VGA) return TRUE;
 #endif
-		return;
-	}
+    	}
 
-	vesamode &= 0x1dff;  /* Clean VESA mode number from other flags */
+	if(rate < (monitor->vmin - 1)) return FALSE;
+	if(rate > (monitor->vmax + 1)) return FALSE;
 
-	while(sisbios_mode[i++].mode_no != 0) {
-		if( (sisbios_mode[i-1].vesa_mode_no_1 == vesamode) ||
-		    (sisbios_mode[i-1].vesa_mode_no_2 == vesamode) ) {
-		    if(sisfb_fstn) {
-		       if(sisbios_mode[i-1].mode_no == 0x50 ||
-		          sisbios_mode[i-1].mode_no == 0x56 ||
-		          sisbios_mode[i-1].mode_no == 0x53) continue;
-	            } else {
-		       if(sisbios_mode[i-1].mode_no == 0x5a ||
-		          sisbios_mode[i-1].mode_no == 0x5b) continue;
-		    }
-		    sisfb_mode_idx = i - 1;
-		    j = 1;
-		    break;
-		}
+	if(sisfb_gettotalfrommode(&ivideo->SiS_Pr, &ivideo->sishw_ext,
+				  sisbios_mode[mode_idx].mode_no[ivideo->mni],
+	                          &htotal, &vtotal, rate_idx)) {
+		dclock = (htotal * vtotal * rate) / 1000;
+		if(dclock > (monitor->dclockmax + 1000)) return FALSE;
+		hsync = dclock / htotal;
+		if(hsync < (monitor->hmin - 1)) return FALSE;
+		if(hsync > (monitor->hmax + 1)) return FALSE;
+        } else {
+	  	return FALSE;
 	}
-	if((!j) && !quiet) printk(KERN_ERR "sisfb: Invalid VESA mode 0x%x'\n", vesamode);
+	return TRUE;
 }
 
-static void sisfb_search_mode(char *name, BOOLEAN quiet)
+static int
+sisfb_validate_mode(struct sis_video_info *ivideo, int myindex, u32 vbflags)
 {
-	int i = 0;
-	unsigned int j = 0, xres = 0, yres = 0, depth = 0, rate = 0;
-	char strbuf[16], strbuf1[20];
-	char *nameptr = name;
-
-	if(name == NULL) {
-	   if(!quiet)
-	      printk(KERN_ERR "sisfb: Internal error, using default mode.\n");
-	   sisfb_mode_idx = DEFAULT_MODE;
-	   return;
-	}
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-        if (!strnicmp(name, sisbios_mode[MODE_INDEX_NONE].name, strlen(name))) {
-	   if(!quiet)
-	      printk(KERN_ERR "sisfb: Mode 'none' not supported anymore. Using default.\n");
-	   sisfb_mode_idx = DEFAULT_MODE;
-	   return;
-	}
-#endif
-	if(strlen(name) <= 19) {
-	   strcpy(strbuf1, name);
-	   for(i=0; i<strlen(strbuf1); i++) {
-	      if(strbuf1[i] < '0' || strbuf1[i] > '9') strbuf1[i] = ' ';
-	   }
-
-	   /* This does some fuzzy mode naming detection */
-	   if(sscanf(strbuf1, "%u %u %u %u", &xres, &yres, &depth, &rate) == 4) {
-	      if((rate <= 32) || (depth > 32)) {
-	         j = rate; rate = depth; depth = j;
-	      }
-	      sprintf(strbuf, "%ux%ux%u", xres, yres, depth);
-	      nameptr = strbuf;
-	      ivideo.refresh_rate = sisfb_parm_rate = rate;
-	   } else if(sscanf(strbuf1, "%u %u %u", &xres, &yres, &depth) == 3) {
-	      sprintf(strbuf, "%ux%ux%u", xres, yres, depth);
-	      nameptr = strbuf;
-	   } else {
-	      xres = 0;
-	      if((sscanf(strbuf1, "%u %u", &xres, &yres) == 2) && (xres != 0)) {
-	         sprintf(strbuf, "%ux%ux8", xres, yres);
-	         nameptr = strbuf;
-	      } else {
-	         sisfb_search_vesamode(simple_strtoul(name, NULL, 0), quiet);
-	         return;
-	      }
-	   }
-	}
-
-	i = 0; j = 0;
-	while(sisbios_mode[i].mode_no != 0) {
-		if(!strnicmp(nameptr, sisbios_mode[i++].name, strlen(nameptr))) {
-		   if(sisfb_fstn) {
-		      if(sisbios_mode[i-1].mode_no == 0x50 ||
-		         sisbios_mode[i-1].mode_no == 0x56 ||
-		         sisbios_mode[i-1].mode_no == 0x53) continue;
-	           } else {
-		      if(sisbios_mode[i-1].mode_no == 0x5a ||
-		         sisbios_mode[i-1].mode_no == 0x5b) continue;
-		   }
-		   sisfb_mode_idx = i - 1;
-		   j = 1;
-		   break;
-		}
-	}
-	if((!j) && !quiet) printk(KERN_ERR "sisfb: Invalid mode '%s'\n", nameptr);
-
-}
-
-static int sisfb_validate_mode(int myindex, unsigned long vbflags)
-{
-   u16 xres, yres, myres;
+   u16 xres=0, yres, myres;
 
 #ifdef CONFIG_FB_SIS_300
-   if(sisvga_engine == SIS_300_VGA) {
+   if(ivideo->sisvga_engine == SIS_300_VGA) {
       if(!(sisbios_mode[myindex].chipset & MD_SIS300)) return(-1);
    }
 #endif
 #ifdef CONFIG_FB_SIS_315
-   if(sisvga_engine == SIS_315_VGA) {
+   if(ivideo->sisvga_engine == SIS_315_VGA) {
       if(!(sisbios_mode[myindex].chipset & MD_SIS315)) return(-1);
    }
 #endif
 
    myres = sisbios_mode[myindex].yres;
 
-   switch (vbflags & VB_DISPTYPE_DISP2) {
+   switch(vbflags & VB_DISPTYPE_DISP2) {
+
      case CRT2_LCD:
-	switch (sishw_ext.ulCRT2LCDType) {
-	case LCD_640x480:  xres =  640; yres =  480;  break;
-	case LCD_800x600:  xres =  800; yres =  600;  break;
-        case LCD_1024x600: xres = 1024; yres =  600;  break;
-	case LCD_1024x768: xres = 1024; yres =  768;  break;
-	case LCD_1152x768: xres = 1152; yres =  768;  break;
-	case LCD_1280x960: xres = 1280; yres =  960;  break;
-	case LCD_1280x768: xres = 1280; yres =  768;  break;
-	case LCD_1280x1024:xres = 1280; yres = 1024;  break;
-	case LCD_1400x1050:xres = 1400; yres = 1050;  break;
-	case LCD_1600x1200:xres = 1600; yres = 1200;  break;
-	case LCD_320x480:  xres =  320; yres =  480;  break; /* FSTN (old) */
-	case LCD_640x480_2:
-	case LCD_640x480_3:xres =  640; yres =  480;  break; /* FSTN (new) */
-	default:           xres =    0; yres =    0;  break;
-	}
 
-	if(SiS_Pr.SiS_CustomT == CUT_BARCO1366) {
-	   xres = 1360; yres = 1024;
-	}
+        xres = ivideo->lcdxres; yres = ivideo->lcdyres;
 
-	if(SiS_Pr.SiS_CustomT == CUT_PANEL848) {
-	   xres = 848;  yres =  480;
-	} else {
-	   if(sisbios_mode[myindex].xres > xres) return(-1);
-           if(myres > yres) return(-1);
+	if(ivideo->SiS_Pr.SiS_CustomT != CUT_PANEL848) {
+	   	if(sisbios_mode[myindex].xres > xres) return(-1);
+           	if(myres > yres) return(-1);
 	}
 
 	if(vbflags & (VB_LVDS | VB_30xBDH)) {
 	   if(sisbios_mode[myindex].xres == 320) {
 	      if((myres == 240) || (myres == 480)) {
-		 if(!sisfb_fstn) {
-		    if(sisbios_mode[myindex].mode_no == 0x5a ||
-		       sisbios_mode[myindex].mode_no == 0x5b)
+		 if(!ivideo->sisfb_fstn) {
+		    if(sisbios_mode[myindex].mode_no[1] == 0x5a ||
+		       sisbios_mode[myindex].mode_no[1] == 0x5b)
 		       return(-1);
 		 } else {
-		    if(sisbios_mode[myindex].mode_no == 0x50 ||
-		       sisbios_mode[myindex].mode_no == 0x56 ||
-		       sisbios_mode[myindex].mode_no == 0x53)
+		    if(sisbios_mode[myindex].mode_no[1] == 0x50 ||
+		       sisbios_mode[myindex].mode_no[1] == 0x56 ||
+		       sisbios_mode[myindex].mode_no[1] == 0x53)
 		       return(-1);
 		 }
 	      }
 	   }
 	}
 
-	if(SiS_GetModeID_LCD(sisvga_engine, vbflags, sisbios_mode[myindex].xres, sisbios_mode[myindex].yres,
-	                     0, sisfb_fstn, SiS_Pr.SiS_CustomT, xres, yres) < 0x14) {
-	   return(-1);
+	if(SiS_GetModeID_LCD(ivideo->sisvga_engine, vbflags, sisbios_mode[myindex].xres,
+			     sisbios_mode[myindex].yres, 0, ivideo->sisfb_fstn,
+			     ivideo->SiS_Pr.SiS_CustomT, xres, yres) < 0x14) {
+	   	return(-1);
 	}
 	break;
 
      case CRT2_TV:
-	if(SiS_GetModeID_TV(sisvga_engine, vbflags, sisbios_mode[myindex].xres,
+	if(SiS_GetModeID_TV(ivideo->sisvga_engine, vbflags, sisbios_mode[myindex].xres,
 	                    sisbios_mode[myindex].yres, 0) < 0x14) {
-	   return(-1);
+	   	return(-1);
 	}
 	break;
 
      case CRT2_VGA:
-        if(SiS_GetModeID_VGA2(sisvga_engine, vbflags, sisbios_mode[myindex].xres,
-	                    sisbios_mode[myindex].yres, 0) < 0x14) {
-	   return(-1);
+        if(SiS_GetModeID_VGA2(ivideo->sisvga_engine, vbflags, sisbios_mode[myindex].xres,
+	                      sisbios_mode[myindex].yres, 0) < 0x14) {
+	   	return(-1);
 	}
 	break;
      }
@@ -630,49 +643,8 @@
      return(myindex);
 }
 
-static void sisfb_search_crt2type(const char *name)
-{
-	int i = 0;
-
-	if(name == NULL)
-		return;
-
-	while(sis_crt2type[i].type_no != -1) {
-		if (!strnicmp(name, sis_crt2type[i].name, strlen(sis_crt2type[i].name))) {
-			sisfb_crt2type = sis_crt2type[i].type_no;
-			sisfb_tvplug = sis_crt2type[i].tvplug_no;
-			sisfb_dstn = (sis_crt2type[i].flags & FL_550_DSTN) ? 1 : 0;
-			sisfb_fstn = (sis_crt2type[i].flags & FL_550_FSTN) ? 1 : 0;
-			break;
-		}
-		i++;
-	}
-	if(sisfb_crt2type < 0)
-		printk(KERN_ERR "sisfb: Invalid CRT2 type: %s\n", name);
-        if(ivideo.chip != SIS_550) {
-	   sisfb_dstn = sisfb_fstn = 0;
-	}
-}
-
-static void sisfb_search_queuemode(const char *name)
-{
-	int i = 0;
-
-	if(name == NULL)
-		return;
-
-	while (sis_queuemode[i].type_no != -1) {
-		if (!strnicmp(name, sis_queuemode[i].name, strlen(sis_queuemode[i].name))) {
-			sisfb_queuemode = sis_queuemode[i].type_no;
-			break;
-		}
-		i++;
-	}
-	if (sisfb_queuemode < 0)
-		printk(KERN_ERR "sisfb: Invalid queuemode type: %s\n", name);
-}
-
-static u8 sisfb_search_refresh_rate(unsigned int rate, int mode_idx)
+static u8
+sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate, int mode_idx)
 {
 	u16 xres, yres;
 	int i = 0;
@@ -680,116 +652,64 @@
 	xres = sisbios_mode[mode_idx].xres;
 	yres = sisbios_mode[mode_idx].yres;
 
-	sisfb_rate_idx = 0;
-	while ((sisfb_vrate[i].idx != 0) && (sisfb_vrate[i].xres <= xres)) {
-		if ((sisfb_vrate[i].xres == xres) && (sisfb_vrate[i].yres == yres)) {
-			if (sisfb_vrate[i].refresh == rate) {
-				sisfb_rate_idx = sisfb_vrate[i].idx;
+	ivideo->rate_idx = 0;
+	while((sisfb_vrate[i].idx != 0) && (sisfb_vrate[i].xres <= xres)) {
+		if((sisfb_vrate[i].xres == xres) && (sisfb_vrate[i].yres == yres)) {
+			if(sisfb_vrate[i].refresh == rate) {
+				ivideo->rate_idx = sisfb_vrate[i].idx;
 				break;
-			} else if (sisfb_vrate[i].refresh > rate) {
-				if ((sisfb_vrate[i].refresh - rate) <= 3) {
+			} else if(sisfb_vrate[i].refresh > rate) {
+				if((sisfb_vrate[i].refresh - rate) <= 3) {
 					DPRINTK("sisfb: Adjusting rate from %d up to %d\n",
 						rate, sisfb_vrate[i].refresh);
-					sisfb_rate_idx = sisfb_vrate[i].idx;
-					ivideo.refresh_rate = sisfb_vrate[i].refresh;
-				} else if (((rate - sisfb_vrate[i-1].refresh) <= 2)
+					ivideo->rate_idx = sisfb_vrate[i].idx;
+					ivideo->refresh_rate = sisfb_vrate[i].refresh;
+				} else if(((rate - sisfb_vrate[i-1].refresh) <= 2)
 						&& (sisfb_vrate[i].idx != 1)) {
 					DPRINTK("sisfb: Adjusting rate from %d down to %d\n",
 						rate, sisfb_vrate[i-1].refresh);
-					sisfb_rate_idx = sisfb_vrate[i-1].idx;
-					ivideo.refresh_rate = sisfb_vrate[i-1].refresh;
+					ivideo->rate_idx = sisfb_vrate[i-1].idx;
+					ivideo->refresh_rate = sisfb_vrate[i-1].refresh;
 				} 
 				break;
 			} else if((rate - sisfb_vrate[i].refresh) <= 2) {
 				DPRINTK("sisfb: Adjusting rate from %d down to %d\n",
 						rate, sisfb_vrate[i].refresh);
-	           		sisfb_rate_idx = sisfb_vrate[i].idx;
+	           		ivideo->rate_idx = sisfb_vrate[i].idx;
 		   		break;
 	       		}
 		}
 		i++;
 	}
-	if (sisfb_rate_idx > 0) {
-		return sisfb_rate_idx;
+	if(ivideo->rate_idx > 0) {
+		return ivideo->rate_idx;
 	} else {
-		printk(KERN_INFO
-			"sisfb: Unsupported rate %d for %dx%d\n", rate, xres, yres);
+		printk(KERN_INFO "sisfb: Unsupported rate %d for %dx%d\n",
+				rate, xres, yres);
 		return 0;
 	}
 }
 
-static void sisfb_search_tvstd(const char *name)
-{
-	int i = 0;
-
-	if(name == NULL)
-		return;
-
-	while (sis_tvtype[i].type_no != -1) {
-		if (!strnicmp(name, sis_tvtype[i].name, strlen(sis_tvtype[i].name))) {
-			ivideo.vbflags |= sis_tvtype[i].type_no;
-			break;
-		}
-		i++;
-	}
-}
-
-static void sisfb_search_specialtiming(const char *name)
-{
-	int i = 0;
-	BOOLEAN found = FALSE;
-
-	if(name == NULL)
-		return;
-
-	if(!strnicmp(name, "none", 4)) {
-	        SiS_Pr.SiS_CustomT = CUT_FORCENONE;
-		printk(KERN_DEBUG "sisfb: Special timing disabled\n");
-	} else {
-	   while(mycustomttable[i].chipID != 0) {
-	      if(!strnicmp(name,mycustomttable[i].optionName, strlen(mycustomttable[i].optionName))) {
-		 SiS_Pr.SiS_CustomT = mycustomttable[i].SpecialID;
-		 found = TRUE;
-		 printk(KERN_INFO "sisfb: Special timing for %s %s forced (\"%s\")\n",
-		 	mycustomttable[i].vendorName, mycustomttable[i].cardName,
-		 	mycustomttable[i].optionName);
-		 break;
-	      }
-	      i++;
-	   }
-	   if(!found) {
-	      printk(KERN_WARNING "sisfb: Invalid SpecialTiming parameter, valid are:");
-	      printk(KERN_WARNING "\t\"none\" (to disable special timings)\n");
-	      i = 0;
-	      while(mycustomttable[i].chipID != 0) {
-		 printk(KERN_WARNING "\t\"%s\" (for %s %s)\n",
-		     mycustomttable[i].optionName,
-		     mycustomttable[i].vendorName,
-		     mycustomttable[i].cardName);
-		 i++;
-	      }
-           }
- 	}
-}
-
-static BOOLEAN sisfb_bridgeisslave(void)
+static BOOLEAN
+sisfb_bridgeisslave(struct sis_video_info *ivideo)
 {
    unsigned char P1_00;
 
-   if(!(ivideo.vbflags & VB_VIDEOBRIDGE)) return FALSE;
+   if(!(ivideo->vbflags & VB_VIDEOBRIDGE)) return FALSE;
 
    inSISIDXREG(SISPART1,0x00,P1_00);
-   if( ((sisvga_engine == SIS_300_VGA) && (P1_00 & 0xa0) == 0x20) ||
-       ((sisvga_engine == SIS_315_VGA) && (P1_00 & 0x50) == 0x10) ) {
+   if( ((ivideo->sisvga_engine == SIS_300_VGA) && (P1_00 & 0xa0) == 0x20) ||
+       ((ivideo->sisvga_engine == SIS_315_VGA) && (P1_00 & 0x50) == 0x10) ) {
 	   return TRUE;
    } else {
            return FALSE;
    }
 }
 
-static BOOLEAN sisfballowretracecrt1(void)
+static BOOLEAN
+sisfballowretracecrt1(struct sis_video_info *ivideo)
 {
-   unsigned char temp;
+   u8 temp;
 
    inSISIDXREG(SISCR,0x17,temp);
    if(!(temp & 0x80)) return FALSE;
@@ -800,20 +720,21 @@
    return TRUE;
 }
 
-static BOOLEAN sisfbcheckvretracecrt1(void)
+static BOOLEAN
+sisfbcheckvretracecrt1(struct sis_video_info *ivideo)
 {
-
-   if(!sisfballowretracecrt1()) return FALSE;
+   if(!sisfballowretracecrt1(ivideo)) return FALSE;
 
    if(inSISREG(SISINPSTAT) & 0x08) return TRUE;
    else 			   return FALSE;
 }
 
-static void sisfbwaitretracecrt1(void)
+static void
+sisfbwaitretracecrt1(struct sis_video_info *ivideo)
 {
    int watchdog;
 
-   if(!sisfballowretracecrt1()) return;
+   if(!sisfballowretracecrt1(ivideo)) return;
 
    watchdog = 65536;
    while((!(inSISREG(SISINPSTAT) & 0x08)) && --watchdog);
@@ -821,19 +742,15 @@
    while((inSISREG(SISINPSTAT) & 0x08) && --watchdog);
 }
 
-static BOOLEAN sisfbcheckvretracecrt2(void)
+static BOOLEAN
+sisfbcheckvretracecrt2(struct sis_video_info *ivideo)
 {
    unsigned char temp, reg;
 
-   switch(sisvga_engine) {
-   case SIS_300_VGA:
-   	reg = 0x25;
-	break;
-   case SIS_315_VGA:
-   	reg = 0x30;
-	break;
-   default:
-        return FALSE;
+   switch(ivideo->sisvga_engine) {
+   case SIS_300_VGA: reg = 0x25; break;
+   case SIS_315_VGA: reg = 0x30; break;
+   default:          return FALSE;
    }
 
    inSISIDXREG(SISPART1, reg, temp);
@@ -841,19 +758,67 @@
    else 	   return TRUE;
 }
 
-static BOOLEAN sisfb_CheckVBRetrace(void)
+static BOOLEAN
+sisfb_CheckVBRetrace(struct sis_video_info *ivideo)
 {
-   if(ivideo.currentvbflags & VB_DISPTYPE_DISP2) {
-      if(sisfb_bridgeisslave()) {
-         return(sisfbcheckvretracecrt1());
+   if(ivideo->currentvbflags & VB_DISPTYPE_DISP2) {
+      if(sisfb_bridgeisslave(ivideo)) {
+         return(sisfbcheckvretracecrt1(ivideo));
       } else {
-         return(sisfbcheckvretracecrt2());
+         return(sisfbcheckvretracecrt2(ivideo));
       }
    } 
-   return(sisfbcheckvretracecrt1());
+   return(sisfbcheckvretracecrt1(ivideo));
+}
+
+static u32
+sisfb_setupvbblankflags(struct sis_video_info *ivideo, u32 *vcount, u32 *hcount)
+{
+   u8 idx, reg1, reg2, reg3, reg4;
+   u32 ret = 0;
+
+   (*vcount) = (*hcount) = 0;
+
+   if((ivideo->currentvbflags & VB_DISPTYPE_DISP2) && (!(sisfb_bridgeisslave(ivideo)))) {
+      ret |= (FB_VBLANK_HAVE_VSYNC  |
+      	      FB_VBLANK_HAVE_HBLANK |
+              FB_VBLANK_HAVE_VBLANK |
+	      FB_VBLANK_HAVE_VCOUNT |
+	      FB_VBLANK_HAVE_HCOUNT);
+      switch(ivideo->sisvga_engine) {
+         case SIS_300_VGA: idx = 0x25; break;
+	 default:
+         case SIS_315_VGA: idx = 0x30; break;
+      }
+      inSISIDXREG(SISPART1,(idx+0),reg1); /* 30 */
+      inSISIDXREG(SISPART1,(idx+1),reg2); /* 31 */
+      inSISIDXREG(SISPART1,(idx+2),reg3); /* 32 */
+      inSISIDXREG(SISPART1,(idx+3),reg4); /* 33 */
+      if(!(reg1 & 0x01)) ret |= FB_VBLANK_VBLANKING;
+      if(!(reg1 & 0x02)) ret |= FB_VBLANK_VSYNCING;
+      if(!(reg4 & 0x80)) ret |= FB_VBLANK_HBLANKING;
+      (*vcount) = reg3 | ((reg4 & 0x70) << 4);
+      (*hcount) = reg2 | ((reg4 & 0x0f) << 8);
+   } else if(sisfballowretracecrt1(ivideo)) {
+      ret |= (FB_VBLANK_HAVE_VSYNC  |
+              FB_VBLANK_HAVE_VBLANK |
+	      FB_VBLANK_HAVE_VCOUNT |
+	      FB_VBLANK_HAVE_HCOUNT);
+      reg1 = inSISREG(SISINPSTAT);
+      if(reg1 & 0x08) ret |= FB_VBLANK_VSYNCING;
+      if(reg1 & 0x01) ret |= FB_VBLANK_VBLANKING;
+      inSISIDXREG(SISCR,0x20,reg1);
+      inSISIDXREG(SISCR,0x1b,reg1);
+      inSISIDXREG(SISCR,0x1c,reg2);
+      inSISIDXREG(SISCR,0x1d,reg3);
+      (*vcount) = reg2 | ((reg3 & 0x07) << 8);
+      (*hcount) = (reg1 | ((reg3 & 0x10) << 4)) << 3;
+   }
+   return ret;
 }
 
-static int sisfb_myblank(int blank)
+static int
+sisfb_myblank(struct sis_video_info *ivideo, int blank)
 {
    u8 sr01, sr11, sr1f, cr63=0, p2_0, p1_13;
    BOOLEAN backlight = TRUE;
@@ -908,63 +873,64 @@
       return 1;
    }
 
-   if(ivideo.currentvbflags & VB_DISPTYPE_CRT1) {
+   if(ivideo->currentvbflags & VB_DISPTYPE_CRT1) {
 
-      setSISIDXREG(SISSR, 0x01, ~0x20, sr01);
+      if( (!ivideo->sisfb_thismonitor.datavalid) ||
+          ((ivideo->sisfb_thismonitor.datavalid) &&
+           (ivideo->sisfb_thismonitor.feature & 0xe0))) {
 
-      if( (!sisfb_thismonitor.datavalid) ||
-          ((sisfb_thismonitor.datavalid) &&
-           (sisfb_thismonitor.feature & 0xe0))) {
-
-	 if(sisvga_engine == SIS_315_VGA) {
-	    setSISIDXREG(SISCR, SiS_Pr.SiS_MyCR63, 0xbf, cr63);
+	 if(ivideo->sisvga_engine == SIS_315_VGA) {
+	    setSISIDXREG(SISCR, ivideo->SiS_Pr.SiS_MyCR63, 0xbf, cr63);
 	 }
 
-	 setSISIDXREG(SISSR, 0x1f, 0x3f, sr1f);
+	 if(!(sisfb_bridgeisslave(ivideo))) {
+	    setSISIDXREG(SISSR, 0x01, ~0x20, sr01);
+	    setSISIDXREG(SISSR, 0x1f, 0x3f, sr1f);
+	 }
       }
 
    }
 
-   if(ivideo.currentvbflags & CRT2_LCD) {
+   if(ivideo->currentvbflags & CRT2_LCD) {
 
-      if(ivideo.vbflags & (VB_301LV|VB_302LV|VB_302ELV)) {
+      if(ivideo->vbflags & (VB_301LV|VB_302LV|VB_302ELV)) {
 	 if(backlight) {
-	    SiS_SiS30xBLOn(&SiS_Pr, &sishw_ext);
+	    SiS_SiS30xBLOn(&ivideo->SiS_Pr, &ivideo->sishw_ext);
 	 } else {
-	    SiS_SiS30xBLOff(&SiS_Pr, &sishw_ext);
+	    SiS_SiS30xBLOff(&ivideo->SiS_Pr, &ivideo->sishw_ext);
 	 }
-      } else if(sisvga_engine == SIS_315_VGA) {
-	 if(ivideo.vbflags & VB_CHRONTEL) {
+      } else if(ivideo->sisvga_engine == SIS_315_VGA) {
+	 if(ivideo->vbflags & VB_CHRONTEL) {
 	    if(backlight) {
-	       SiS_Chrontel701xBLOn(&SiS_Pr,&sishw_ext);
+	       SiS_Chrontel701xBLOn(&ivideo->SiS_Pr,&ivideo->sishw_ext);
 	    } else {
-	       SiS_Chrontel701xBLOff(&SiS_Pr);
+	       SiS_Chrontel701xBLOff(&ivideo->SiS_Pr);
 	    }
 	 }
       }
 
-      if(((sisvga_engine == SIS_300_VGA) &&
-          (ivideo.vbflags & (VB_301|VB_30xBDH|VB_LVDS))) ||
-         ((sisvga_engine == SIS_315_VGA) &&
-          ((ivideo.vbflags & (VB_LVDS | VB_CHRONTEL)) == VB_LVDS))) {
+      if(((ivideo->sisvga_engine == SIS_300_VGA) &&
+          (ivideo->vbflags & (VB_301|VB_30xBDH|VB_LVDS))) ||
+         ((ivideo->sisvga_engine == SIS_315_VGA) &&
+          ((ivideo->vbflags & (VB_LVDS | VB_CHRONTEL)) == VB_LVDS))) {
           setSISIDXREG(SISSR, 0x11, ~0x0c, sr11);
       }
 
-      if(sisvga_engine == SIS_300_VGA) {
-         if((ivideo.vbflags & (VB_301B|VB_301C|VB_302B)) &&
-            (!(ivideo.vbflags & VB_30xBDH))) {
+      if(ivideo->sisvga_engine == SIS_300_VGA) {
+         if((ivideo->vbflags & (VB_301B|VB_301C|VB_302B)) &&
+            (!(ivideo->vbflags & VB_30xBDH))) {
 	    setSISIDXREG(SISPART1, 0x13, 0x3f, p1_13);
 	 }
-      } else if(sisvga_engine == SIS_315_VGA) {
-         if((ivideo.vbflags & (VB_301B|VB_301C|VB_302B)) &&
-            (!(ivideo.vbflags & VB_30xBDH))) {
+      } else if(ivideo->sisvga_engine == SIS_315_VGA) {
+         if((ivideo->vbflags & (VB_301B|VB_301C|VB_302B)) &&
+            (!(ivideo->vbflags & VB_30xBDH))) {
 	    setSISIDXREG(SISPART2, 0x00, 0x1f, p2_0);
 	 }
       }
 
-   } else if(ivideo.currentvbflags & CRT2_VGA) {
+   } else if(ivideo->currentvbflags & CRT2_VGA) {
 
-      if(ivideo.vbflags & (VB_301B|VB_301C|VB_302B)) {
+      if(ivideo->vbflags & (VB_301B|VB_301C|VB_302B)) {
          setSISIDXREG(SISPART2, 0x00, 0x1f, p2_0);
       }
 
@@ -975,35 +941,122 @@
 
 /* ----------- FBDev related routines for all series ----------- */
 
-static void sisfb_set_vparms(void)
+static int
+sisfb_get_cmap_len(const struct fb_var_screeninfo *var)
 {
-   switch(ivideo.video_bpp) {
-   case 8:
-       	ivideo.DstColor = 0x0000;
-	ivideo.SiS310_AccelDepth = 0x00000000;
-	ivideo.video_cmap_len = 256;
-       	break;
-   case 16:
-       	ivideo.DstColor = 0x8000;
-       	ivideo.SiS310_AccelDepth = 0x00010000;
-	ivideo.video_cmap_len = 16;
-       	break;
-   case 32:
-       	ivideo.DstColor = 0xC000;
-	ivideo.SiS310_AccelDepth = 0x00020000;
-	ivideo.video_cmap_len = 16;
-       	break;
-   default:
- 	ivideo.video_cmap_len = 16;
-	printk(KERN_ERR "sisfb: Unsupported depth %d", ivideo.video_bpp);
-	ivideo.accel = 0;
-	break;
-   }
+	return (var->bits_per_pixel == 8) ? 256 : 16;
+}
+
+static void
+sisfb_set_vparms(struct sis_video_info *ivideo)
+{
+   	switch(ivideo->video_bpp) {
+	case 8:
+		ivideo->DstColor = 0x0000;
+		ivideo->SiS310_AccelDepth = 0x00000000;
+		ivideo->video_cmap_len = 256;
+		break;
+	case 16:
+		ivideo->DstColor = 0x8000;
+		ivideo->SiS310_AccelDepth = 0x00010000;
+		ivideo->video_cmap_len = 16;
+		break;
+	case 32:
+		ivideo->DstColor = 0xC000;
+		ivideo->SiS310_AccelDepth = 0x00020000;
+		ivideo->video_cmap_len = 16;
+		break;
+	default:
+		ivideo->video_cmap_len = 16;
+		printk(KERN_ERR "sisfb: Unsupported depth %d", ivideo->video_bpp);
+		ivideo->accel = 0;
+		break;
+   	}
+}
+
+static int
+sisfb_calc_maxyres(struct sis_video_info *ivideo, struct fb_var_screeninfo *var)
+{
+	int maxyres = ivideo->heapstart / (var->xres_virtual * (var->bits_per_pixel >> 3));
+
+	if(maxyres > 32767) maxyres = 32767;
+
+	return maxyres;
+}
+
+static void
+sisfb_calc_pitch(struct sis_video_info *ivideo, struct fb_var_screeninfo *var)
+{
+	ivideo->video_linelength = var->xres_virtual * (var->bits_per_pixel >> 3);
+	ivideo->scrnpitchCRT1 = ivideo->video_linelength;
+	if(!(ivideo->currentvbflags & CRT1_LCDA)) {
+		if((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) {
+			ivideo->scrnpitchCRT1 <<= 1;
+		}
+	}
+
+}
+
+static void
+sisfb_set_pitch(struct sis_video_info *ivideo)
+{
+   	BOOLEAN isslavemode = FALSE;
+	unsigned short HDisplay1 = ivideo->scrnpitchCRT1 >> 3;
+	unsigned short HDisplay2 = ivideo->video_linelength >> 3;
+
+   	if(sisfb_bridgeisslave(ivideo)) isslavemode = TRUE;
+
+   	/* We need to set pitch for CRT1 if bridge is in slave mode, too */
+   	if((ivideo->currentvbflags & VB_DISPTYPE_DISP1) || (isslavemode)) {
+   		outSISIDXREG(SISCR,0x13,(HDisplay1 & 0xFF));
+   		setSISIDXREG(SISSR,0x0E,0xF0,(HDisplay1 >> 8));
+	}
+
+   	/* We must not set the pitch for CRT2 if bridge is in slave mode */
+   	if((ivideo->currentvbflags & VB_DISPTYPE_DISP2) && (!isslavemode)) {
+		orSISIDXREG(SISPART1,ivideo->CRT2_write_enable,0x01);
+   		outSISIDXREG(SISPART1,0x07,(HDisplay2 & 0xFF));
+   		setSISIDXREG(SISPART1,0x09,0xF0,(HDisplay2 >> 8));
+   	}
+}
+
+static void
+sisfb_bpp_to_var(struct sis_video_info *ivideo, struct fb_var_screeninfo *var)
+{
+	ivideo->video_cmap_len = sisfb_get_cmap_len(var);
+
+	switch(var->bits_per_pixel) {
+	case 8:
+		var->red.offset = var->green.offset = var->blue.offset = 0;
+		var->red.length = var->green.length = var->blue.length = 6;
+		break;
+	case 16:
+		var->red.offset = 11;
+		var->red.length = 5;
+		var->green.offset = 5;
+		var->green.length = 6;
+		var->blue.offset = 0;
+		var->blue.length = 5;
+		var->transp.offset = 0;
+		var->transp.length = 0;
+		break;
+	case 32:
+		var->red.offset = 16;
+		var->red.length = 8;
+		var->green.offset = 8;
+		var->green.length = 8;
+		var->blue.offset = 0;
+		var->blue.length = 8;
+		var->transp.offset = 24;
+		var->transp.length = 8;
+		break;
+	}
 }
 
-static int sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
-		      struct fb_info *info)
+static int
+sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive, struct fb_info *info)
 {
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 	unsigned int htotal = 0, vtotal = 0;
 	unsigned int drate = 0, hrate = 0;
 	int found_mode = 0;
@@ -1033,52 +1086,51 @@
 	}
 
 	if(pixclock && htotal && vtotal) {
-	   drate = 1000000000 / pixclock;
-	   hrate = (drate * 1000) / htotal;
-	   ivideo.refresh_rate = (unsigned int) (hrate * 2 / vtotal);
-	} else ivideo.refresh_rate = 60;
-
-#if 0
-	printk(KERN_DEBUG "sisfb: Change mode to %dx%dx%d-%dHz\n",
-		var->xres,var->yres,var->bits_per_pixel,ivideo.refresh_rate);
-#endif
+	   	drate = 1000000000 / pixclock;
+	   	hrate = (drate * 1000) / htotal;
+	   	ivideo->refresh_rate = (unsigned int) (hrate * 2 / vtotal);
+	} else {
+	   	ivideo->refresh_rate = 60;
+	}
 
-	old_mode = sisfb_mode_idx;
-	sisfb_mode_idx = 0;
+	old_mode = ivideo->sisfb_mode_idx;
+	ivideo->sisfb_mode_idx = 0;
 
-	while( (sisbios_mode[sisfb_mode_idx].mode_no != 0) &&
-	       (sisbios_mode[sisfb_mode_idx].xres <= var->xres) ) {
-		if( (sisbios_mode[sisfb_mode_idx].xres == var->xres) &&
-		    (sisbios_mode[sisfb_mode_idx].yres == var->yres) &&
-		    (sisbios_mode[sisfb_mode_idx].bpp == var->bits_per_pixel)) {
-			sisfb_mode_no = sisbios_mode[sisfb_mode_idx].mode_no;
+	while( (sisbios_mode[ivideo->sisfb_mode_idx].mode_no[0] != 0) &&
+	       (sisbios_mode[ivideo->sisfb_mode_idx].xres <= var->xres) ) {
+		if( (sisbios_mode[ivideo->sisfb_mode_idx].xres == var->xres) &&
+		    (sisbios_mode[ivideo->sisfb_mode_idx].yres == var->yres) &&
+		    (sisbios_mode[ivideo->sisfb_mode_idx].bpp == var->bits_per_pixel)) {
+			ivideo->mode_no = sisbios_mode[ivideo->sisfb_mode_idx].mode_no[ivideo->mni];
 			found_mode = 1;
 			break;
 		}
-		sisfb_mode_idx++;
+		ivideo->sisfb_mode_idx++;
 	}
 
-	if(found_mode)
-		sisfb_mode_idx = sisfb_validate_mode(sisfb_mode_idx, ivideo.currentvbflags);
-	else
-		sisfb_mode_idx = -1;
+	if(found_mode) {
+		ivideo->sisfb_mode_idx = sisfb_validate_mode(ivideo,
+				ivideo->sisfb_mode_idx, ivideo->currentvbflags);
+	} else {
+		ivideo->sisfb_mode_idx = -1;
+	}
 
-       	if(sisfb_mode_idx < 0) {
+       	if(ivideo->sisfb_mode_idx < 0) {
 		printk(KERN_ERR "sisfb: Mode %dx%dx%d not supported\n", var->xres,
 		       var->yres, var->bits_per_pixel);
-		sisfb_mode_idx = old_mode;
+		ivideo->sisfb_mode_idx = old_mode;
 		return -EINVAL;
 	}
 
-	if(sisfb_search_refresh_rate(ivideo.refresh_rate, sisfb_mode_idx) == 0) {
-		sisfb_rate_idx = sisbios_mode[sisfb_mode_idx].rate_idx;
-		ivideo.refresh_rate = 60;
+	if(sisfb_search_refresh_rate(ivideo, ivideo->refresh_rate, ivideo->sisfb_mode_idx) == 0) {
+		ivideo->rate_idx = sisbios_mode[ivideo->sisfb_mode_idx].rate_idx;
+		ivideo->refresh_rate = 60;
 	}
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-	if(sisfb_thismonitor.datavalid) {
-	   if(!sisfb_verify_rate(&sisfb_thismonitor, sisfb_mode_idx,
-	                         sisfb_rate_idx, ivideo.refresh_rate)) {
+	if(ivideo->sisfb_thismonitor.datavalid) {
+	   if(!sisfb_verify_rate(ivideo, &ivideo->sisfb_thismonitor, ivideo->sisfb_mode_idx,
+	                         ivideo->rate_idx, ivideo->refresh_rate)) {
 	      printk(KERN_INFO "sisfb: WARNING: Refresh rate exceeds monitor specs!\n");
 	   }
 	}
@@ -1089,64 +1141,77 @@
 #else
 	if(isactive) {
 #endif
-		sisfb_pre_setmode();
+		sisfb_pre_setmode(ivideo);
 
-		if(SiSSetMode(&SiS_Pr, &sishw_ext, sisfb_mode_no) == 0) {
-			printk(KERN_ERR "sisfb: Setting mode[0x%x] failed\n", sisfb_mode_no);
+		if(SiSSetMode(&ivideo->SiS_Pr, &ivideo->sishw_ext, ivideo->mode_no) == 0) {
+			printk(KERN_ERR "sisfb: Setting mode[0x%x] failed\n", ivideo->mode_no);
 			return -EINVAL;
 		}
 
 		outSISIDXREG(SISSR, IND_SIS_PASSWORD, SIS_PASSWORD);
 
-		ivideo.video_bpp = sisbios_mode[sisfb_mode_idx].bpp;
-		ivideo.video_vwidth = ivideo.video_width = sisbios_mode[sisfb_mode_idx].xres;
-		ivideo.video_vheight = ivideo.video_height = sisbios_mode[sisfb_mode_idx].yres;
-		ivideo.org_x = ivideo.org_y = 0;
-		ivideo.video_linelength = ivideo.video_width * (ivideo.video_bpp >> 3);
-		ivideo.accel = 0;
-		if(sisfb_accel) {
-		   ivideo.accel = (var->accel_flags & FB_ACCELF_TEXT) ? -1 : 0;
-		}
-
-		sisfb_set_vparms();
-
-		ivideo.current_width = ivideo.video_width;
-		ivideo.current_height = ivideo.video_height;
-		ivideo.current_bpp = ivideo.video_bpp;
-		ivideo.current_htotal = htotal;
-		ivideo.current_vtotal = vtotal;
-		ivideo.current_pixclock = var->pixclock;
-		ivideo.current_refresh_rate = ivideo.refresh_rate;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-                sisfb_lastrates[sisfb_mode_no] = ivideo.refresh_rate;
+		sisfb_post_setmode(ivideo);
+
+		ivideo->video_bpp    = sisbios_mode[ivideo->sisfb_mode_idx].bpp;
+		ivideo->video_width  = sisbios_mode[ivideo->sisfb_mode_idx].xres;
+		ivideo->video_height = sisbios_mode[ivideo->sisfb_mode_idx].yres;
+
+		sisfb_calc_pitch(ivideo, var);
+		sisfb_set_pitch(ivideo);
+
+		ivideo->accel = 0;
+#if defined(FBINFO_HWACCEL_DISABLED) && defined(FBINFO_HWACCEL_XPAN)
+#ifdef STUPID_ACCELF_TEXT_SHIT
+		if(var->accel_flags & FB_ACCELF_TEXT) {
+			info->flags &= ~FBINFO_HWACCEL_DISABLED;
+		} else {
+			info->flags |= FBINFO_HWACCEL_DISABLED;
+		}
+#endif
+		if(!(info->flags & FBINFO_HWACCEL_DISABLED)) ivideo->accel = -1;
+#else
+		if(var->accel_flags & FB_ACCELF_TEXT) ivideo->accel = -1;
 #endif
 
-		sisfb_post_setmode();
+		sisfb_set_vparms(ivideo);
 
+		ivideo->current_width = ivideo->video_width;
+		ivideo->current_height = ivideo->video_height;
+		ivideo->current_bpp = ivideo->video_bpp;
+		ivideo->current_htotal = htotal;
+		ivideo->current_vtotal = vtotal;
+		ivideo->current_linelength = ivideo->video_linelength;
+		ivideo->current_pixclock = var->pixclock;
+		ivideo->current_refresh_rate = ivideo->refresh_rate;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+                ivideo->sisfb_lastrates[ivideo->mode_no] = ivideo->refresh_rate;
+#endif
 	}
+
 	return 0;
 }
 
-static int sisfb_pan_var(struct fb_var_screeninfo *var)
+static int
+sisfb_pan_var(struct sis_video_info *ivideo, struct fb_var_screeninfo *var)
 {
 	unsigned int base;
 
-	if (var->xoffset > (var->xres_virtual - var->xres)) {
+	if(var->xoffset > (var->xres_virtual - var->xres)) {
 		return -EINVAL;
 	}
 	if(var->yoffset > (var->yres_virtual - var->yres)) {
 		return -EINVAL;
 	}
 
-	base = var->yoffset * var->xres_virtual + var->xoffset;
+	base = (var->yoffset * var->xres_virtual) + var->xoffset;
 
         /* calculate base bpp dep. */
         switch(var->bits_per_pixel) {
+	case 32:
+            	break;
         case 16:
         	base >>= 1;
         	break;
-	case 32:
-            	break;
 	case 8:
         default:
         	base >>= 2;
@@ -1158,81 +1223,27 @@
         outSISIDXREG(SISCR, 0x0D, base & 0xFF);
 	outSISIDXREG(SISCR, 0x0C, (base >> 8) & 0xFF);
 	outSISIDXREG(SISSR, 0x0D, (base >> 16) & 0xFF);
-	if(sisvga_engine == SIS_315_VGA) {
+	if(ivideo->sisvga_engine == SIS_315_VGA) {
 		setSISIDXREG(SISSR, 0x37, 0xFE, (base >> 24) & 0x01);
 	}
-        if(ivideo.currentvbflags & VB_DISPTYPE_DISP2) {
-		orSISIDXREG(SISPART1, sisfb_CRT2_write_enable, 0x01);
+        if(ivideo->currentvbflags & VB_DISPTYPE_DISP2) {
+		orSISIDXREG(SISPART1, ivideo->CRT2_write_enable, 0x01);
         	outSISIDXREG(SISPART1, 0x06, (base & 0xFF));
         	outSISIDXREG(SISPART1, 0x05, ((base >> 8) & 0xFF));
         	outSISIDXREG(SISPART1, 0x04, ((base >> 16) & 0xFF));
-		if(sisvga_engine == SIS_315_VGA) {
+		if(ivideo->sisvga_engine == SIS_315_VGA) {
 			setSISIDXREG(SISPART1, 0x02, 0x7F, ((base >> 24) & 0x01) << 7);
 		}
         }
 	return 0;
 }
 
-static void sisfb_bpp_to_var(struct fb_var_screeninfo *var)
-{
-	switch(var->bits_per_pixel) {
-	   case 8:
-	   	var->red.offset = var->green.offset = var->blue.offset = 0;
-		var->red.length = var->green.length = var->blue.length = 6;
-		ivideo.video_cmap_len = 256;
-		break;
-	   case 16:
-		var->red.offset = 11;
-		var->red.length = 5;
-		var->green.offset = 5;
-		var->green.length = 6;
-		var->blue.offset = 0;
-		var->blue.length = 5;
-		var->transp.offset = 0;
-		var->transp.length = 0;
-		ivideo.video_cmap_len = 16;
-		break;
-	   case 32:
-		var->red.offset = 16;
-		var->red.length = 8;
-		var->green.offset = 8;
-		var->green.length = 8;
-		var->blue.offset = 0;
-		var->blue.length = 8;
-		var->transp.offset = 24;
-		var->transp.length = 8;
-		ivideo.video_cmap_len = 16;
-		break;
-	}
-}
-
-void sis_dispinfo(struct ap_data *rec)
-{
-	rec->minfo.bpp      = ivideo.video_bpp;
-	rec->minfo.xres     = ivideo.video_width;
-	rec->minfo.yres     = ivideo.video_height;
-	rec->minfo.v_xres   = ivideo.video_vwidth;
-	rec->minfo.v_yres   = ivideo.video_vheight;
-	rec->minfo.org_x    = ivideo.org_x;
-	rec->minfo.org_y    = ivideo.org_y;
-	rec->minfo.vrate    = ivideo.refresh_rate;
-	rec->iobase         = ivideo.vga_base - 0x30;
-	rec->mem_size       = ivideo.video_size;
-	rec->disp_state     = ivideo.disp_state;
-	rec->version        = (VER_MAJOR << 24) | (VER_MINOR << 16) | VER_LEVEL;
-	rec->hasVB          = ivideo.hasVB;
-	rec->TV_type        = ivideo.TV_type;
-	rec->TV_plug        = ivideo.TV_plug;
-	rec->chip           = ivideo.chip;
-	rec->vbflags	    = ivideo.vbflags;
-	rec->currentvbflags = ivideo.currentvbflags;
-}
-
-/* ------------ FBDev related routines for 2.4 series ----------- */
-
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-
-static void sisfb_crtc_to_var(struct fb_var_screeninfo *var)
+/* ------------ FBDev related routines for 2.4 series ----------- */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+
+static void
+sisfb_crtc_to_var(struct sis_video_info *ivideo, struct fb_var_screeninfo *var)
 {
 	u16 VRE, VBE, VRS, VBS, VDE, VT;
 	u16 HRE, HBE, HRS, HBS, HDE, HT;
@@ -1247,50 +1258,55 @@
 	else
 	   var->vmode = FB_VMODE_NONINTERLACED;
 
-	switch ((sr_data & 0x1C) >> 2) {
-	   case SIS_8BPP_COLOR_MODE:
+	switch((sr_data & 0x1C) >> 2) {
+	case SIS_8BPP_COLOR_MODE:
 		var->bits_per_pixel = 8;
 		break;
-	   case SIS_16BPP_COLOR_MODE:
+	case SIS_16BPP_COLOR_MODE:
 		var->bits_per_pixel = 16;
 		break;
-	   case SIS_32BPP_COLOR_MODE:
+	case SIS_32BPP_COLOR_MODE:
 		var->bits_per_pixel = 32;
 		break;
 	}
 
-	sisfb_bpp_to_var(var);
+	sisfb_bpp_to_var(ivideo, var);
 	
 	inSISIDXREG(SISSR, 0x0A, sr_data);
-
         inSISIDXREG(SISCR, 0x06, cr_data);
-
         inSISIDXREG(SISCR, 0x07, cr_data2);
 
-	VT = (cr_data & 0xFF) | ((u16) (cr_data2 & 0x01) << 8) |
-	     ((u16) (cr_data2 & 0x20) << 4) | ((u16) (sr_data & 0x01) << 10);
+	VT = (cr_data & 0xFF) |
+	     ((u16) (cr_data2 & 0x01) << 8) |
+	     ((u16) (cr_data2 & 0x20) << 4) |
+	     ((u16) (sr_data  & 0x01) << 10);
 	A = VT + 2;
 
 	inSISIDXREG(SISCR, 0x12, cr_data);
 
-	VDE = (cr_data & 0xff) | ((u16) (cr_data2 & 0x02) << 7) |
-	      ((u16) (cr_data2 & 0x40) << 3) | ((u16) (sr_data & 0x02) << 9);
+	VDE = (cr_data & 0xff) |
+	      ((u16) (cr_data2 & 0x02) << 7) |
+	      ((u16) (cr_data2 & 0x40) << 3) |
+	      ((u16) (sr_data  & 0x02) << 9);
 	E = VDE + 1;
 
 	inSISIDXREG(SISCR, 0x10, cr_data);
 
-	VRS = (cr_data & 0xff) | ((u16) (cr_data2 & 0x04) << 6) |
-	      ((u16) (cr_data2 & 0x80) << 2) | ((u16) (sr_data & 0x08) << 7);
+	VRS = (cr_data & 0xff) |
+	      ((u16) (cr_data2 & 0x04) << 6) |
+	      ((u16) (cr_data2 & 0x80) << 2) |
+	      ((u16) (sr_data  & 0x08) << 7);
 	F = VRS + 1 - E;
 
 	inSISIDXREG(SISCR, 0x15, cr_data);
-
 	inSISIDXREG(SISCR, 0x09, cr_data3);
 
 	if(cr_data3 & 0x80) var->vmode = FB_VMODE_DOUBLE;
 
-	VBS = (cr_data & 0xff) | ((u16) (cr_data2 & 0x08) << 5) |
-	      ((u16) (cr_data3 & 0x20) << 4) | ((u16) (sr_data & 0x04) << 8);
+	VBS = (cr_data & 0xff) |
+	      ((u16) (cr_data2 & 0x08) << 5) |
+	      ((u16) (cr_data3 & 0x20) << 4) |
+	      ((u16) (sr_data & 0x04) << 8);
 
 	inSISIDXREG(SISCR, 0x16, cr_data);
 
@@ -1324,7 +1340,6 @@
 	}
 
 	inSISIDXREG(SISSR, 0x0b, sr_data);
-
 	inSISIDXREG(SISCR, 0x00, cr_data);
 
 	HT = (cr_data & 0xff) | ((u16) (sr_data & 0x03) << 8);
@@ -1345,13 +1360,12 @@
 	HBS = (cr_data & 0xff) | ((u16) (sr_data & 0x30) << 4);
 
 	inSISIDXREG(SISSR, 0x0c, sr_data);
-
 	inSISIDXREG(SISCR, 0x03, cr_data);
-
 	inSISIDXREG(SISCR, 0x05, cr_data2);
 
-	HBE = (cr_data & 0x1f) | ((u16) (cr_data2 & 0x80) >> 2) |
-	      ((u16) (sr_data & 0x03) << 6);
+	HBE = (cr_data & 0x1f) |
+	      ((u16) (cr_data2 & 0x80) >> 2) |
+	      ((u16) (sr_data  & 0x03) << 6);
 	HRE = (cr_data2 & 0x1f) | ((sr_data & 0x04) << 3);
 
 	temp = HBE - ((E - 1) & 255);
@@ -1362,7 +1376,10 @@
 
 	D = B - F - C;
 
-	var->xres = var->xres_virtual = E * 8;
+	var->xres = E * 8;
+	if(var->xres_virtual < var->xres) {
+		var->xres_virtual = var->xres;
+	}
 
 	if((var->xres == 320) &&
 	   (var->yres == 200 || var->yres == 240)) {
@@ -1399,14 +1416,13 @@
 	if((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) {
 	   VT <<= 1;
 	}
-	hrate = ivideo.refresh_rate * VT / 2;
+	hrate = ivideo->refresh_rate * VT / 2;
 	drate = (hrate * HT) / 1000;
 	var->pixclock = (u32) (1000000000 / drate);
 
-	if(sisfb_ypan) {
-	   maxyres = ivideo.heapstart / (var->xres * (var->bits_per_pixel >> 3));
-	   if(maxyres > 32767) maxyres = 32767;
-	   if(sisfb_max) {
+	if(ivideo->sisfb_ypan) {
+	   maxyres = sisfb_calc_maxyres(ivideo, var);
+	   if(ivideo->sisfb_max) {
 	      var->yres_virtual = maxyres;
 	   } else {
 	      if(var->yres_virtual > maxyres) {
@@ -1416,42 +1432,48 @@
 	   if(var->yres_virtual <= var->yres) {
 	      var->yres_virtual = var->yres;
 	   }
-	} else
+	} else {
 	   var->yres_virtual = var->yres;
+	}
 
 }
 
-static int sis_getcolreg(unsigned regno, unsigned *red, unsigned *green, unsigned *blue,
-			 unsigned *transp, struct fb_info *fb_info)
+static int
+sis_getcolreg(unsigned regno, unsigned *red, unsigned *green, unsigned *blue,
+			 unsigned *transp, struct fb_info *info)
 {
-	if (regno >= ivideo.video_cmap_len)
-		return 1;
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 
-	*red = sis_palette[regno].red;
-	*green = sis_palette[regno].green;
-	*blue = sis_palette[regno].blue;
+	if(regno >= ivideo->video_cmap_len) return 1;
+
+	*red   = ivideo->sis_palette[regno].red;
+	*green = ivideo->sis_palette[regno].green;
+	*blue  = ivideo->sis_palette[regno].blue;
 	*transp = 0;
+
 	return 0;
 }
 
-static int sisfb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
-                           unsigned transp, struct fb_info *fb_info)
+static int
+sisfb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
+                           unsigned transp, struct fb_info *info)
 {
-	if (regno >= ivideo.video_cmap_len)
-		return 1;
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
+
+	if(regno >= ivideo->video_cmap_len) return 1;
 
-	sis_palette[regno].red = red;
-	sis_palette[regno].green = green;
-	sis_palette[regno].blue = blue;
+	ivideo->sis_palette[regno].red   = red;
+	ivideo->sis_palette[regno].green = green;
+	ivideo->sis_palette[regno].blue  = blue;
 
-	switch (ivideo.video_bpp) {
+	switch(ivideo->video_bpp) {
 #ifdef FBCON_HAS_CFB8
 	case 8:
 	        outSISREG(SISDACA, regno);
 		outSISREG(SISDACD, (red >> 10));
 		outSISREG(SISDACD, (green >> 10));
 		outSISREG(SISDACD, (blue >> 10));
-		if (ivideo.currentvbflags & VB_DISPTYPE_DISP2) {
+		if(ivideo->currentvbflags & VB_DISPTYPE_DISP2) {
 		        outSISREG(SISDAC2A, regno);
 			outSISREG(SISDAC2D, (red >> 8));
 			outSISREG(SISDAC2D, (green >> 8));
@@ -1461,317 +1483,250 @@
 #endif
 #ifdef FBCON_HAS_CFB16
 	case 16:
-		sis_fbcon_cmap.cfb16[regno] =
+		ivideo->sis_fbcon_cmap.cfb16[regno] =
 		    ((red & 0xf800)) | ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11);
 		break;
 #endif
 #ifdef FBCON_HAS_CFB32
 	case 32:
-		red >>= 8;
+		red   >>= 8;
 		green >>= 8;
-		blue >>= 8;
-		sis_fbcon_cmap.cfb32[regno] = (red << 16) | (green << 8) | (blue);
+		blue  >>= 8;
+		ivideo->sis_fbcon_cmap.cfb32[regno] = (red << 16) | (green << 8) | (blue);
 		break;
 #endif
 	}
+
 	return 0;
 }
 
-static void sisfb_set_disp(int con, struct fb_var_screeninfo *var,
-                           struct fb_info *info)
+static void
+sisfb_set_disp(int con, struct fb_var_screeninfo *var, struct fb_info *info)
 {
+	struct sis_video_info    *ivideo = (struct sis_video_info *)info->par;
+	struct display           *display;
+	struct display_switch    *sw;
 	struct fb_fix_screeninfo fix;
 	long   flags;
-	struct display *display;
-	struct display_switch *sw;
 
-	if(con >= 0)
-		display = &fb_display[con];
-	else
-		display = &sis_disp;
+	display = (con >= 0) ? &fb_display[con] : &ivideo->sis_disp;
 
-	sisfb_get_fix(&fix, con, 0);
+	sisfb_get_fix(&fix, con, info);
 
-	display->screen_base = ivideo.video_vbase;
+	display->var = *var;
+	display->screen_base = (char *)ivideo->video_vbase;
 	display->visual = fix.visual;
 	display->type = fix.type;
 	display->type_aux = fix.type_aux;
 	display->ypanstep = fix.ypanstep;
 	display->ywrapstep = fix.ywrapstep;
 	display->line_length = fix.line_length;
-	display->next_line = fix.line_length;
 	display->can_soft_blank = 1;
-	display->inverse = sisfb_inverse;
-	display->var = *var;
+	display->inverse = ivideo->sisfb_inverse;
+	display->next_line = fix.line_length;
 
 	save_flags(flags);
 
-	switch (ivideo.video_bpp) {
+	switch(ivideo->video_bpp) {
 #ifdef FBCON_HAS_CFB8
-	   case 8:
-#ifdef SISFBACCEL
-		sw = ivideo.accel ? &fbcon_sis8 : &fbcon_cfb8;
-#else
-		sw = &fbcon_cfb8;
-#endif
+	case 8:	sw = ivideo->accel ? &fbcon_sis8 : &fbcon_cfb8;
 		break;
 #endif
 #ifdef FBCON_HAS_CFB16
-	   case 16:
-#ifdef SISFBACCEL
-		sw = ivideo.accel ? &fbcon_sis16 : &fbcon_cfb16;
-#else
-		sw = &fbcon_cfb16;
-#endif
-		display->dispsw_data = sis_fbcon_cmap.cfb16;
+	case 16:sw = ivideo->accel ? &fbcon_sis16 : &fbcon_cfb16;
+		display->dispsw_data = &ivideo->sis_fbcon_cmap.cfb16;
 		break;
 #endif
 #ifdef FBCON_HAS_CFB32
-	   case 32:
-#ifdef SISFBACCEL
-		sw = ivideo.accel ? &fbcon_sis32 : &fbcon_cfb32;
-#else
-		sw = &fbcon_cfb32;
-#endif
-		display->dispsw_data = sis_fbcon_cmap.cfb32;
+	case 32:sw = ivideo->accel ? &fbcon_sis32 : &fbcon_cfb32;
+		display->dispsw_data = &ivideo->sis_fbcon_cmap.cfb32;
 		break;
 #endif
-	   default:
-		sw = &fbcon_dummy;
-		return;
+	default:sw = &fbcon_dummy;
+		break;
 	}
-	memcpy(&sisfb_sw, sw, sizeof(*sw));
-	display->dispsw = &sisfb_sw;
+	memcpy(&ivideo->sisfb_sw, sw, sizeof(*sw));
+	display->dispsw = &ivideo->sisfb_sw;
+
 	restore_flags(flags);
 
-        if(sisfb_ypan) {
+        if(ivideo->sisfb_ypan) {
   	    /* display->scrollmode = 0;  */
 	} else {
 	    display->scrollmode = SCROLL_YREDRAW;
-	    sisfb_sw.bmove = fbcon_redraw_bmove;
+	    ivideo->sisfb_sw.bmove = fbcon_redraw_bmove;
 	}
 }
 
-static void sisfb_do_install_cmap(int con, struct fb_info *info)
+static void
+sisfb_do_install_cmap(int con, struct fb_info *info)
 {
-        if (con != currcon)
-		return;
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 
-        if (fb_display[con].cmap.len)
+        if(con != ivideo->currcon) return;
+
+        if(fb_display[con].cmap.len) {
 		fb_set_cmap(&fb_display[con].cmap, 1, sisfb_setcolreg, info);
-        else
-		fb_set_cmap(fb_default_cmap(ivideo.video_cmap_len), 1,
-			    sisfb_setcolreg, info);
+        } else {
+		int size = sisfb_get_cmap_len(&fb_display[con].var);
+		fb_set_cmap(fb_default_cmap(size), 1, sisfb_setcolreg, info);
+	}
 }
 
-
-static int sisfb_get_var(struct fb_var_screeninfo *var, int con,
-			 struct fb_info *info)
+static int
+sisfb_get_var(struct fb_var_screeninfo *var, int con, struct fb_info *info)
 {
-	if(con == -1)
-		memcpy(var, &default_var, sizeof(struct fb_var_screeninfo));
-	else
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
+
+	if(con == -1) {
+		memcpy(var, &ivideo->default_var, sizeof(struct fb_var_screeninfo));
+	} else {
 		*var = fb_display[con].var;
+	}
 
-	if(sisfb_fstn) {
-	   if (var->xres == 320 && var->yres == 480)
-		var->yres = 240;
+	if(ivideo->sisfb_fstn) {
+	   	if(var->xres == 320 && var->yres == 480) var->yres = 240;
         }
 
 	return 0;
 }
 
-static int sisfb_set_var(struct fb_var_screeninfo *var, int con,
-			 struct fb_info *info)
+static int
+sisfb_set_var(struct fb_var_screeninfo *var, int con, struct fb_info *info)
 {
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 	int err;
-	unsigned int cols, rows;
 
 	fb_display[con].var.activate = FB_ACTIVATE_NOW;
-        if(sisfb_do_set_var(var, con == currcon, info)) {
-		sisfb_crtc_to_var(var);
+
+        if(sisfb_do_set_var(var, con == ivideo->currcon, info)) {
+		sisfb_crtc_to_var(ivideo, var);
 		return -EINVAL;
 	}
 
-	sisfb_crtc_to_var(var);
+	sisfb_crtc_to_var(ivideo, var);
 
 	sisfb_set_disp(con, var, info);
 
-	if(info->changevar)
-		(*info->changevar) (con);
+	if(info->changevar) {
+		(*info->changevar)(con);
+	}
 
-	if((err = fb_alloc_cmap(&fb_display[con].cmap, 0, 0)))
+	if((err = fb_alloc_cmap(&fb_display[con].cmap, 0, 0))) {
 		return err;
+	}
 
 	sisfb_do_install_cmap(con, info);
 
-	cols = sisbios_mode[sisfb_mode_idx].cols;
-	rows = sisbios_mode[sisfb_mode_idx].rows;
-#if 0
-	/* Why was this called here? */
+#if 0	/* Why was this called here? */
+	unsigned int cols, rows;
+	cols = sisbios_mode[ivideo->sisfb_mode_idx].cols;
+	rows = sisbios_mode[ivideo->sisfb_mode_idx].rows;
  	vc_resize_con(rows, cols, fb_display[con].conp->vc_num);
 #endif
-
 	return 0;
 }
 
-static int sisfb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
-			  struct fb_info *info)
+static int
+sisfb_get_cmap(struct fb_cmap *cmap, int kspc, int con, struct fb_info *info)
 {
-        if (con == currcon)
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
+	struct display *display;
+
+	display = (con >= 0) ? &fb_display[con] : &ivideo->sis_disp;
+
+        if(con == ivideo->currcon) {
+
 		return fb_get_cmap(cmap, kspc, sis_getcolreg, info);
 
-	else if (fb_display[con].cmap.len)
-		fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
-	else
-		fb_copy_cmap(fb_default_cmap(ivideo.video_cmap_len), cmap, kspc ? 0 : 2);
+	} else if(display->cmap.len) {
+
+		fb_copy_cmap(&display->cmap, cmap, kspc ? 0 : 2);
+
+	} else {
+
+		int size = sisfb_get_cmap_len(&display->var);
+		fb_copy_cmap(fb_default_cmap(size), cmap, kspc ? 0 : 2);
+
+	}
 
 	return 0;
 }
 
-static int sisfb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
-			  struct fb_info *info)
+static int
+sisfb_set_cmap(struct fb_cmap *cmap, int kspc, int con, struct fb_info *info)
 {
-	int err;
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
+	struct display *display;
+	int err, size;
 
-	if (!fb_display[con].cmap.len) {
-		err = fb_alloc_cmap(&fb_display[con].cmap, ivideo.video_cmap_len, 0);
-		if (err)
-			return err;
+	display = (con >= 0) ? &fb_display[con] : &ivideo->sis_disp;
+
+	size = sisfb_get_cmap_len(&display->var);
+	if(display->cmap.len != size) {
+		err = fb_alloc_cmap(&display->cmap, size, 0);
+		if(err)	return err;
 	}
         
-	if (con == currcon)
+	if(con == ivideo->currcon) {
 		return fb_set_cmap(cmap, kspc, sisfb_setcolreg, info);
-
-	else
-		fb_copy_cmap(cmap, &fb_display[con].cmap, kspc ? 0 : 1);
+	} else {
+		fb_copy_cmap(cmap, &display->cmap, kspc ? 0 : 1);
+	}
 
 	return 0;
 }
 
-static int sisfb_pan_display(struct fb_var_screeninfo *var, int con,
-			     struct fb_info* info)
+static int
+sisfb_pan_display(struct fb_var_screeninfo *var, int con, struct fb_info* info)
 {
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 	int err;
 
-	if (var->vmode & FB_VMODE_YWRAP) {
-		if (var->yoffset < 0 || var->yoffset >= fb_display[con].var.yres_virtual || var->xoffset)
-			return -EINVAL;
-	} else {
-		if (var->xoffset+fb_display[con].var.xres > fb_display[con].var.xres_virtual ||
-		    var->yoffset+fb_display[con].var.yres > fb_display[con].var.yres_virtual)
-			return -EINVAL;
+	if(var->vmode & FB_VMODE_YWRAP) return -EINVAL;
+
+	if((var->xoffset+fb_display[con].var.xres > fb_display[con].var.xres_virtual) ||
+	   (var->yoffset+fb_display[con].var.yres > fb_display[con].var.yres_virtual)) {
+		return -EINVAL;
 	}
 
-        if(con == currcon) {
-	   if((err = sisfb_pan_var(var)) < 0) return err;
+        if(con == ivideo->currcon) {
+	   	if((err = sisfb_pan_var(ivideo, var)) < 0) return err;
 	}
 
 	fb_display[con].var.xoffset = var->xoffset;
 	fb_display[con].var.yoffset = var->yoffset;
-	if (var->vmode & FB_VMODE_YWRAP)
-		fb_display[con].var.vmode |= FB_VMODE_YWRAP;
-	else
-		fb_display[con].var.vmode &= ~FB_VMODE_YWRAP;
-
-	return 0;
-}
-
-static int sisfb_mmap(struct fb_info *info, struct file *file,
-		      struct vm_area_struct *vma)
-{
-	struct fb_var_screeninfo var;
-	unsigned long start;
-	unsigned long off;
-	u32 len, mmio_off;
-
-	if(vma->vm_pgoff > (~0UL >> PAGE_SHIFT))  return -EINVAL;
-
-	off = vma->vm_pgoff << PAGE_SHIFT;
-
-	start = (unsigned long) ivideo.video_base;
-	len = PAGE_ALIGN((start & ~PAGE_MASK) + ivideo.video_size);
-#if 0
-	if (off >= len) {
-		off -= len;
-#endif
-	/* By Jake Page: Treat mmap request with offset beyond heapstart
-	 *               as request for mapping the mmio area 
-	 */
-	mmio_off = PAGE_ALIGN((start & ~PAGE_MASK) + ivideo.heapstart);
-	if(off >= mmio_off) {
-		off -= mmio_off;		
-		sisfb_get_var(&var, currcon, info);
-		if(var.accel_flags) return -EINVAL;
-
-		start = (unsigned long) ivideo.mmio_base;
-		len = PAGE_ALIGN((start & ~PAGE_MASK) + sisfb_mmio_size);
-	}
-
-	start &= PAGE_MASK;
-	if((vma->vm_end - vma->vm_start + off) > len)	return -EINVAL;
-
-	off += start;
-	vma->vm_pgoff = off >> PAGE_SHIFT;
-	vma->vm_flags |= VM_IO;   /* by Jake Page; is that really needed? */
-
-#if defined(__i386__) || defined(__x86_64__)
-	if (boot_cpu_data.x86 > 3)
-		pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
-#endif
-        /* RedHat requires vma as the first paramater to the following call */
-	if (io_remap_page_range(vma->vm_start, off, vma->vm_end - vma->vm_start,
-				vma->vm_page_prot))
-		return -EAGAIN;
 
 	return 0;
 }
 
-static void sis_get_glyph(struct fb_info *info, SIS_GLYINFO *gly)
+static int
+sisfb_update_var(int con, struct fb_info *info)
 {
-	struct display *p = &fb_display[currcon];
-	u16 c;
-	u8 *cdat;
-	int widthb;
-	u8 *gbuf = gly->gmask;
-	int size;
-
-	gly->fontheight = fontheight(p);
-	gly->fontwidth = fontwidth(p);
-	widthb = (fontwidth(p) + 7) / 8;
-
-	c = gly->ch & p->charmask;
-	if (fontwidth(p) <= 8)
-		cdat = p->fontdata + c * fontheight(p);
-	else
-		cdat = p->fontdata + (c * fontheight(p) << 1);
-
-	size = fontheight(p) * widthb;
-	memcpy(gbuf, cdat, size);
-	gly->ngmask = size;
-}
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 
-static int sisfb_update_var(int con, struct fb_info *info)
-{
-        return(sisfb_pan_var(&fb_display[con].var));
+        return(sisfb_pan_var(ivideo, &fb_display[con].var));
 }
 
-static int sisfb_switch(int con, struct fb_info *info)
+static int
+sisfb_switch(int con, struct fb_info *info)
 {
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 	int cols, rows;
 
-        if(fb_display[currcon].cmap.len)
-		fb_get_cmap(&fb_display[currcon].cmap, 1, sis_getcolreg, info);
+        if(fb_display[ivideo->currcon].cmap.len) {
+		fb_get_cmap(&fb_display[ivideo->currcon].cmap, 1, sis_getcolreg, info);
+	}
 
 	fb_display[con].var.activate = FB_ACTIVATE_NOW;
 
-	if(!memcmp(&fb_display[con].var, &fb_display[currcon].var,
-	                           sizeof(struct fb_var_screeninfo))) {
-		currcon = con;
+	if(!memcmp(&fb_display[con].var, &fb_display[ivideo->currcon].var,
+	                           	sizeof(struct fb_var_screeninfo))) {
+		ivideo->currcon = con;
 		return 1;
 	}
 
-	currcon = con;
+	ivideo->currcon = con;
 
 	sisfb_do_set_var(&fb_display[con].var, 1, info);
 
@@ -1779,8 +1734,8 @@
 
 	sisfb_do_install_cmap(con, info);
 
-	cols = sisbios_mode[sisfb_mode_idx].cols;
-	rows = sisbios_mode[sisfb_mode_idx].rows;
+	cols = sisbios_mode[ivideo->sisfb_mode_idx].cols;
+	rows = sisbios_mode[ivideo->sisfb_mode_idx].rows;
 	vc_resize_con(rows, cols, fb_display[con].conp->vc_num);
 
 	sisfb_update_var(con, info);
@@ -1788,55 +1743,46 @@
 	return 1;
 }
 
-static void sisfb_blank(int blank, struct fb_info *info)
+static void
+sisfb_blank(int blank, struct fb_info *info)
 {
-	sisfb_myblank(blank);
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
+
+	sisfb_myblank(ivideo, blank);
 }
 #endif
 
-/* ------------ FBDev related routines for 2.5 series ----------- */
+/* ------------ FBDev related routines for 2.6 series ----------- */
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 
-static int sisfb_open(struct fb_info *info, int user)
+static int
+sisfb_open(struct fb_info *info, int user)
 {
-    return 0;
+    	return 0;
 }
 
-static int sisfb_release(struct fb_info *info, int user)
+static int
+sisfb_release(struct fb_info *info, int user)
 {
-    return 0;
+    	return 0;
 }
 
-static int sisfb_get_cmap_len(const struct fb_var_screeninfo *var)
+static int
+sisfb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
+		unsigned transp, struct fb_info *info)
 {
-	int rc = 16;		
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 
-	switch(var->bits_per_pixel) {
-	case 8:
-		rc = 256;	
-		break;
-	case 16:
-	case 32:
-		rc = 16;
-		break;
-	}
-	return rc;
-}
+	if(regno >= sisfb_get_cmap_len(&info->var)) return 1;
 
-static int sisfb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
-                           unsigned transp, struct fb_info *info)
-{
-	if (regno >= sisfb_get_cmap_len(&info->var))
-		return 1;
-
-	switch (info->var.bits_per_pixel) {
+	switch(info->var.bits_per_pixel) {
 	case 8:
 	        outSISREG(SISDACA, regno);
 		outSISREG(SISDACD, (red >> 10));
 		outSISREG(SISDACD, (green >> 10));
 		outSISREG(SISDACD, (blue >> 10));
-		if (ivideo.currentvbflags & VB_DISPTYPE_DISP2) {
+		if(ivideo->currentvbflags & VB_DISPTYPE_DISP2) {
 		        outSISREG(SISDAC2A, regno);
 			outSISREG(SISDAC2D, (red >> 8));
 			outSISREG(SISDAC2D, (green >> 8));
@@ -1851,28 +1797,31 @@
 		red >>= 8;
 		green >>= 8;
 		blue >>= 8;
-		((u32 *) (info->pseudo_palette))[regno] =
-			(red << 16) | (green << 8) | (blue);
+		((u32 *)(info->pseudo_palette))[regno] =
+				(red << 16) | (green << 8) | (blue);
 		break;
 	}
 	return 0;
 }
 
-static int sisfb_set_par(struct fb_info *info)
+static int
+sisfb_set_par(struct fb_info *info)
 {
 	int err;
 
-        if((err = sisfb_do_set_var(&info->var, 1, info)))
+        if((err = sisfb_do_set_var(&info->var, 1, info))) {
 		return err;
+	}
 
 	sisfb_get_fix(&info->fix, info->currcon, info);
 
 	return 0;
 }
 
-static int sisfb_check_var(struct fb_var_screeninfo *var,
-                           struct fb_info *info)
+static int
+sisfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
 {
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 	unsigned int htotal = 0, vtotal = 0, myrateindex = 0;
 	unsigned int drate = 0, hrate = 0, maxyres;
 	int found_mode = 0;
@@ -1902,12 +1851,12 @@
 	}
 
 	search_idx = 0;
-	while( (sisbios_mode[search_idx].mode_no != 0) &&
+	while( (sisbios_mode[search_idx].mode_no[0] != 0) &&
 	       (sisbios_mode[search_idx].xres <= var->xres) ) {
 		if( (sisbios_mode[search_idx].xres == var->xres) &&
 		    (sisbios_mode[search_idx].yres == var->yres) &&
 		    (sisbios_mode[search_idx].bpp == var->bits_per_pixel)) {
-		        if(sisfb_validate_mode(search_idx, ivideo.currentvbflags) > 0) {
+		        if(sisfb_validate_mode(ivideo, search_idx, ivideo->currentvbflags) > 0) {
 			   found_mode = 1;
 			   break;
 			}
@@ -1916,13 +1865,12 @@
 	}
 
 	if(!found_mode) {
-
                 search_idx = 0;
-		while(sisbios_mode[search_idx].mode_no != 0) {
+		while(sisbios_mode[search_idx].mode_no[0] != 0) {
 		   if( (var->xres <= sisbios_mode[search_idx].xres) &&
 		       (var->yres <= sisbios_mode[search_idx].yres) &&
 		       (var->bits_per_pixel == sisbios_mode[search_idx].bpp) ) {
-		          if(sisfb_validate_mode(search_idx, ivideo.currentvbflags) > 0) {
+		          if(sisfb_validate_mode(ivideo,search_idx, ivideo->currentvbflags) > 0) {
 			     found_mode = 1;
 			     break;
 			  }
@@ -1946,24 +1894,25 @@
 		}
 	}
 
-	if( ((ivideo.vbflags & VB_LVDS) ||			/* Slave modes on LVDS and 301B-DH */
-	     ((ivideo.vbflags & VB_30xBDH) && (ivideo.currentvbflags & CRT2_LCD))) &&
+	if( ((ivideo->vbflags & VB_LVDS) ||			/* Slave modes on LVDS and 301B-DH */
+	     ((ivideo->vbflags & VB_30xBDH) && (ivideo->currentvbflags & CRT2_LCD))) &&
 	    (var->bits_per_pixel == 8) ) {
 	    	refresh_rate = 60;
 		recalc_clock = TRUE;
-	} else if( (ivideo.current_htotal == htotal) &&		/* x=x & y=y & c=c -> assume depth change */
-	    	   (ivideo.current_vtotal == vtotal) &&
-	    	   (ivideo.current_pixclock == pixclock) ) {
+	} else if( (ivideo->current_htotal == htotal) &&	/* x=x & y=y & c=c -> assume depth change */
+	    	   (ivideo->current_vtotal == vtotal) &&
+	    	   (ivideo->current_pixclock == pixclock) ) {
 		drate = 1000000000 / pixclock;
 	        hrate = (drate * 1000) / htotal;
 	        refresh_rate = (unsigned int) (hrate * 2 / vtotal);
-	} else if( ( (ivideo.current_htotal != htotal) ||	/* x!=x | y!=y & c=c -> invalid pixclock */
-	    	     (ivideo.current_vtotal != vtotal) ) &&
-	    	   (ivideo.current_pixclock == var->pixclock) ) {
-		if(sisfb_lastrates[sisbios_mode[search_idx].mode_no]) {
-			refresh_rate = sisfb_lastrates[sisbios_mode[search_idx].mode_no];
-		} else if(sisfb_parm_rate != -1) {
-			refresh_rate = sisfb_parm_rate;
+	} else if( ( (ivideo->current_htotal != htotal) ||	/* x!=x | y!=y & c=c -> invalid pixclock */
+	    	     (ivideo->current_vtotal != vtotal) ) &&
+	    	   (ivideo->current_pixclock == var->pixclock) ) {
+		if(ivideo->sisfb_lastrates[sisbios_mode[search_idx].mode_no[ivideo->mni]]) {
+			refresh_rate = ivideo->sisfb_lastrates[sisbios_mode[search_idx].mode_no[ivideo->mni]];
+		} else if(ivideo->sisfb_parm_rate != -1) {
+			/* Sic, sisfb_parm_rate - want to know originally desired rate here */
+			refresh_rate = ivideo->sisfb_parm_rate;
 		} else {
 			refresh_rate = 60;
 		}
@@ -1972,56 +1921,51 @@
 		drate = 1000000000 / pixclock;
 	   	hrate = (drate * 1000) / htotal;
 	   	refresh_rate = (unsigned int) (hrate * 2 / vtotal);
-	} else if(ivideo.current_refresh_rate) {
-		refresh_rate = ivideo.current_refresh_rate;
+	} else if(ivideo->current_refresh_rate) {
+		refresh_rate = ivideo->current_refresh_rate;
 		recalc_clock = TRUE;
 	} else {
 		refresh_rate = 60;
 		recalc_clock = TRUE;
 	}
 
-	myrateindex = sisfb_search_refresh_rate(refresh_rate, search_idx);
+	myrateindex = sisfb_search_refresh_rate(ivideo, refresh_rate, search_idx);
 
 	/* Eventually recalculate timing and clock */
 	if(recalc_clock) {
 	   if(!myrateindex) myrateindex = sisbios_mode[search_idx].rate_idx;
-	   var->pixclock = (u32) (1000000000 / sisfb_mode_rate_to_dclock(&SiS_Pr, &sishw_ext,
-						sisbios_mode[search_idx].mode_no, myrateindex));
-	   sisfb_mode_rate_to_ddata(&SiS_Pr, &sishw_ext,
-		 			sisbios_mode[search_idx].mode_no, myrateindex,
-		 			&var->left_margin, &var->right_margin,
-		 			&var->upper_margin, &var->lower_margin,
-		 			&var->hsync_len, &var->vsync_len,
-		 			&var->sync, &var->vmode);
+	   var->pixclock = (u32) (1000000000 / sisfb_mode_rate_to_dclock(&ivideo->SiS_Pr,
+	   					&ivideo->sishw_ext,
+						sisbios_mode[search_idx].mode_no[ivideo->mni],
+						myrateindex));
+	   sisfb_mode_rate_to_ddata(&ivideo->SiS_Pr, &ivideo->sishw_ext,
+		 		    sisbios_mode[search_idx].mode_no[ivideo->mni], myrateindex,	var);
 	   if((var->vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
-		var->pixclock <<= 1;
+	      var->pixclock <<= 1;
 	   }
 	}
 
-	if(sisfb_thismonitor.datavalid) {
-	   if(!sisfb_verify_rate(&sisfb_thismonitor, search_idx,
+	if(ivideo->sisfb_thismonitor.datavalid) {
+	   if(!sisfb_verify_rate(ivideo, &ivideo->sisfb_thismonitor, search_idx,
 	                         myrateindex, refresh_rate)) {
 	      printk(KERN_INFO "sisfb: WARNING: Refresh rate exceeds monitor specs!\n");
 	   }
 	}
 
 	/* Adapt RGB settings */
-	sisfb_bpp_to_var(var);	
+	sisfb_bpp_to_var(ivideo, var);
 	
 	/* Sanity check for offsets */
-	if (var->xoffset < 0)
-		var->xoffset = 0;
-	if (var->yoffset < 0)
-		var->yoffset = 0;
+	if(var->xoffset < 0) var->xoffset = 0;
+	if(var->yoffset < 0) var->yoffset = 0;
 
-	/* Horiz-panning not supported */
-	if(var->xres != var->xres_virtual)
-		var->xres_virtual = var->xres;
+	if(var->xres > var->xres_virtual) {
+	   var->xres_virtual = var->xres;
+	}
 
-	if(sisfb_ypan) {
-	   maxyres = ivideo.heapstart / (var->xres * (var->bits_per_pixel >> 3));
-	   if(maxyres > 32767) maxyres = 32767;
-	   if(sisfb_max) {
+	if(ivideo->sisfb_ypan) {
+	   maxyres = sisfb_calc_maxyres(ivideo, var);
+	   if(ivideo->sisfb_max) {
 	      var->yres_virtual = maxyres;
 	   } else {
 	      if(var->yres_virtual > maxyres) {
@@ -2040,310 +1984,241 @@
 	}
 	
 	/* Truncate offsets to maximum if too high */
-	if(var->xoffset > var->xres_virtual - var->xres)
-		var->xoffset = var->xres_virtual - var->xres - 1;
+	if(var->xoffset > var->xres_virtual - var->xres) {
+	   var->xoffset = var->xres_virtual - var->xres - 1;
+	}
 
-	if(var->yoffset > var->yres_virtual - var->yres)
-		var->yoffset = var->yres_virtual - var->yres - 1;
+	if(var->yoffset > var->yres_virtual - var->yres) {
+	   var->yoffset = var->yres_virtual - var->yres - 1;
+	}
 	
 	/* Set everything else to 0 */
 	var->red.msb_right = 
-	    var->green.msb_right =
-	    var->blue.msb_right =
-	    var->transp.offset = var->transp.length = var->transp.msb_right = 0;		
+	var->green.msb_right =
+	var->blue.msb_right =
+	var->transp.offset =
+	var->transp.length =
+	var->transp.msb_right = 0;
 
 	return 0;
 }
 
-static int sisfb_pan_display(struct fb_var_screeninfo *var,
-			     struct fb_info* info)
+static int
+sisfb_pan_display(struct fb_var_screeninfo *var, struct fb_info* info)
 {
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 	int err;
 
-	if (var->xoffset > (var->xres_virtual - var->xres))
+	if(var->xoffset > (var->xres_virtual - var->xres)) {
 		return -EINVAL;
-	if (var->yoffset > (var->yres_virtual - var->yres))
+	}
+	if(var->yoffset > (var->yres_virtual - var->yres)) {
 		return -EINVAL;
-
-	if (var->vmode & FB_VMODE_YWRAP) {
-		if (var->yoffset < 0 ||
-		    var->yoffset >= info->var.yres_virtual ||
-		    var->xoffset)
-		    	return -EINVAL;
-	} else {
-		if (var->xoffset + info->var.xres > info->var.xres_virtual ||
-		    var->yoffset + info->var.yres > info->var.yres_virtual)
-			return -EINVAL;
 	}
-    
-	if((err = sisfb_pan_var(var)) < 0) return err;
-
-	info->var.xoffset = var->xoffset;
-	info->var.yoffset = var->yoffset;
-	if (var->vmode & FB_VMODE_YWRAP)
-		info->var.vmode |= FB_VMODE_YWRAP;
-	else
-		info->var.vmode &= ~FB_VMODE_YWRAP;
-
-	return 0;
-}
-
-static int sisfb_mmap(struct fb_info *info, struct file *file,
-		      struct vm_area_struct *vma)
-{
-	unsigned long start;
-	unsigned long off;
-	u32 len, mmio_off;
 
-	if(vma->vm_pgoff > (~0UL >> PAGE_SHIFT))  return -EINVAL;
-
-	off = vma->vm_pgoff << PAGE_SHIFT;
-
-	start = (unsigned long) ivideo.video_base;
-	len = PAGE_ALIGN((start & ~PAGE_MASK) + ivideo.video_size);
-#if 0
-	if (off >= len) {
-		off -= len;
-#endif
-	/* By Jake Page: Treat mmap request with offset beyond heapstart
-	 *               as request for mapping the mmio area 
-	 */
-	mmio_off = PAGE_ALIGN((start & ~PAGE_MASK) + ivideo.heapstart);
-	if(off >= mmio_off) {
-		off -= mmio_off;		
-		if(info->var.accel_flags) return -EINVAL;
+	if(var->vmode & FB_VMODE_YWRAP) return -EINVAL;
 
-		start = (unsigned long) ivideo.mmio_base;
-		len = PAGE_ALIGN((start & ~PAGE_MASK) + sisfb_mmio_size);
+	if(var->xoffset + info->var.xres > info->var.xres_virtual ||
+	   var->yoffset + info->var.yres > info->var.yres_virtual) {
+		return -EINVAL;
 	}
 
-	start &= PAGE_MASK;
-	if((vma->vm_end - vma->vm_start + off) > len)	return -EINVAL;
+	if((err = sisfb_pan_var(ivideo, var)) < 0) return err;
 
-	off += start;
-	vma->vm_pgoff = off >> PAGE_SHIFT;
-	vma->vm_flags |= VM_IO;   /* by Jake Page; is that really needed? */
-
-#if defined(__i386__) || defined(__x86_64__)
-	if (boot_cpu_data.x86 > 3)
-		pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
-#endif
-	if (io_remap_page_range(vma, vma->vm_start, off, vma->vm_end - vma->vm_start,
-				vma->vm_page_prot))
-		return -EAGAIN;
+	info->var.xoffset = var->xoffset;
+	info->var.yoffset = var->yoffset;
 
 	return 0;
 }
 
-static int sisfb_blank(int blank, struct fb_info *info)
+static int
+sisfb_blank(int blank, struct fb_info *info)
 {
-	return(sisfb_myblank(blank));
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
+
+	return(sisfb_myblank(ivideo, blank));
 }
 
 #endif
 
 /* ----------- FBDev related routines for all series ---------- */
 
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-static int sisfb_ioctl(struct inode *inode, struct file *file,
-		       unsigned int cmd, unsigned long arg,
-		       struct fb_info *info)
-#else
-static int sisfb_ioctl(struct inode *inode, struct file *file,
-		       unsigned int cmd, unsigned long arg, int con,
-		       struct fb_info *info)
-#endif
-{
-	struct sis_memreq sismemreq;
-	struct ap_data sisapdata;
-	unsigned long sismembase = 0;
+static int
+sisfb_ioctl(struct inode *inode, struct file *file,
+            unsigned int cmd, unsigned long arg,
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-	SIS_GLYINFO sisglyinfo;
+	    int con,
 #endif
+	    struct fb_info *info)
+{
+	struct sis_video_info 	*ivideo = (struct sis_video_info *)info->par;
+	struct sis_memreq 	sismemreq;
+	struct fb_vblank  	sisvbblank;
+	sisfb_info        	x;
+	u32			gpu32 = 0;
+	static int 		count = 0;
+	u32 __user		*argp = (u32 __user *) arg;
 
 	switch (cmd) {
 	   case FBIO_ALLOC:
-		if(!capable(CAP_SYS_RAWIO))
+		if(!capable(CAP_SYS_RAWIO)) {
 			return -EPERM;
-		if(copy_from_user(&sismemreq, (void *)arg, sizeof(sismemreq)))
+		}
+		if(copy_from_user(&sismemreq, argp, sizeof(sismemreq))) {
 		   	return -EFAULT;
+		}
         	sis_malloc(&sismemreq);
-		if(copy_to_user((void *)arg, &sismemreq, sizeof(sismemreq))) {
-			sis_free(sismemreq.offset);
+		if(copy_to_user(argp, &sismemreq, sizeof(sismemreq))) {
+			sis_free((u32)sismemreq.offset);
 		    	return -EFAULT;
 		}
 		break;
+
 	   case FBIO_FREE:
-		if(!capable(CAP_SYS_RAWIO))
+		if(!capable(CAP_SYS_RAWIO)) {
 			return -EPERM;
-		if(get_user(sismembase, (unsigned long *) arg))
+		}
+		if(get_user(gpu32, argp)) {
 			return -EFAULT;
-		sis_free(sismembase);
+		}
+		sis_free(gpu32);
 		break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-	   case FBIOGET_GLYPH:
-	        if(copy_from_user(&sisglyinfo, (void *)arg, sizeof(sisglyinfo)))
+
+	   case FBIOGET_VBLANK:
+		sisvbblank.count = 0;
+		sisvbblank.flags = sisfb_setupvbblankflags(ivideo, &sisvbblank.vcount, &sisvbblank.hcount);
+		if(copy_to_user(argp, &sisvbblank, sizeof(sisvbblank))) {
 			return -EFAULT;
-                sis_get_glyph(info, &sisglyinfo);
+		}
 		break;
-	   case FBIOPUT_MODEINFO:
-		{
-			struct mode_info x;
 
-			if(copy_from_user(&x, (void *)arg, sizeof(x)))
-				return -EFAULT;
+	   case SISFB_GET_INFO_SIZE:
+	        return put_user(sizeof(sisfb_info), argp);
 
-			ivideo.video_bpp        = x.bpp;
-			ivideo.video_width      = x.xres;
-			ivideo.video_height     = x.yres;
-			ivideo.video_vwidth     = x.v_xres;
-			ivideo.video_vheight    = x.v_yres;
-			ivideo.org_x            = x.org_x;
-			ivideo.org_y            = x.org_y;
-			ivideo.refresh_rate     = x.vrate;
-			ivideo.video_linelength = ivideo.video_vwidth * (ivideo.video_bpp >> 3);
-			sisfb_set_vparms();
-			break;
+	   case SISFB_GET_INFO_OLD:
+	        if(++count < 50) {
+	           printk(KERN_INFO "sisfb: Deprecated ioctl call received - update your application!\n");
 		}
-#endif
-	   case FBIOGET_HWCINFO:
-		{
-			unsigned long myhwcoffset = 0;
-
-			if(sisfb_caps & HW_CURSOR_CAP)
-				myhwcoffset = sisfb_hwcursor_vbase -
-				    (unsigned long) ivideo.video_vbase;
-
-			return put_user(myhwcoffset, (unsigned long *)arg);
-
-			break;
+	   case SISFB_GET_INFO:  /* For communication with X driver */
+		x.sisfb_id         = SISFB_ID;
+		x.sisfb_version    = VER_MAJOR;
+		x.sisfb_revision   = VER_MINOR;
+		x.sisfb_patchlevel = VER_LEVEL;
+		x.chip_id = ivideo->chip_id;
+		x.memory = ivideo->video_size / 1024;
+		x.heapstart = ivideo->heapstart / 1024;
+		if(ivideo->modechanged) {
+		   x.fbvidmode = ivideo->mode_no;
+		} else {
+		   x.fbvidmode = ivideo->modeprechange;
 		}
-	   case FBIOGET_DISPINFO:
-	   	sis_dispinfo(&sisapdata);
-		if(copy_to_user((void *)arg, &sisapdata, sizeof(sisapdata)))
+		x.sisfb_caps = ivideo->caps;
+		x.sisfb_tqlen = 512; /* yet fixed */
+		x.sisfb_pcibus = ivideo->pcibus;
+		x.sisfb_pcislot = ivideo->pcislot;
+		x.sisfb_pcifunc = ivideo->pcifunc;
+		x.sisfb_lcdpdc = ivideo->detectedpdc;
+		x.sisfb_lcdpdca = ivideo->detectedpdca;
+		x.sisfb_lcda = ivideo->detectedlcda;
+		x.sisfb_vbflags = ivideo->vbflags;
+		x.sisfb_currentvbflags = ivideo->currentvbflags;
+		x.sisfb_scalelcd = ivideo->SiS_Pr.UsePanelScaler;
+		x.sisfb_specialtiming = ivideo->SiS_Pr.SiS_CustomT;
+		x.sisfb_haveemi = ivideo->SiS_Pr.HaveEMI ? 1 : 0;
+		x.sisfb_haveemilcd = ivideo->SiS_Pr.HaveEMILCD ? 1 : 0;
+		x.sisfb_emi30 = ivideo->SiS_Pr.EMI_30;
+		x.sisfb_emi31 = ivideo->SiS_Pr.EMI_31;
+		x.sisfb_emi32 = ivideo->SiS_Pr.EMI_32;
+		x.sisfb_emi33 = ivideo->SiS_Pr.EMI_33;
+		x.sisfb_tvxpos = (u16)(ivideo->tvxpos + 32);
+		x.sisfb_tvypos = (u16)(ivideo->tvypos + 32);
+
+		if(copy_to_user(argp, &x, sizeof(x))) {
 			return -EFAULT;
-		break;
-	   case SISFB_GET_INFO:  /* For communication with X driver */
-	        {
-			sisfb_info x;
+		}
+	        break;
 
-			x.sisfb_id = SISFB_ID;
-			x.sisfb_version = VER_MAJOR;
-			x.sisfb_revision = VER_MINOR;
-			x.sisfb_patchlevel = VER_LEVEL;
-			x.chip_id = ivideo.chip_id;
-			x.memory = ivideo.video_size / 1024;
-			x.heapstart = ivideo.heapstart / 1024;
-			x.fbvidmode = sisfb_mode_no;
-			x.sisfb_caps = sisfb_caps;
-			x.sisfb_tqlen = 512; /* yet fixed */
-			x.sisfb_pcibus = ivideo.pcibus;
-			x.sisfb_pcislot = ivideo.pcislot;
-			x.sisfb_pcifunc = ivideo.pcifunc;
-			x.sisfb_lcdpdc = sisfb_detectedpdc;
-			x.sisfb_lcda = sisfb_detectedlcda;
-			x.sisfb_vbflags = ivideo.vbflags;
-			x.sisfb_currentvbflags = ivideo.currentvbflags;
-			x.sisfb_scalelcd = SiS_Pr.UsePanelScaler;
-			x.sisfb_specialtiming = SiS_Pr.SiS_CustomT;
-			x.sisfb_haveemi = SiS_Pr.HaveEMI ? 1 : 0;
-			x.sisfb_haveemilcd = SiS_Pr.HaveEMILCD ? 1 : 0;
-			x.sisfb_emi30 = SiS_Pr.EMI_30;
-			x.sisfb_emi31 = SiS_Pr.EMI_31;
-			x.sisfb_emi32 = SiS_Pr.EMI_32;
-			x.sisfb_emi33 = SiS_Pr.EMI_33;
-			if(copy_to_user((void *)arg, &x, sizeof(x)))
-				return -EFAULT;
-	                break;
+	   case SISFB_GET_VBRSTATUS_OLD:
+	   	if(++count < 50) {
+	           printk(KERN_INFO "sisfb: Deprecated ioctl call received - update your application!\n");
 		}
 	   case SISFB_GET_VBRSTATUS:
-	        {
-			if(sisfb_CheckVBRetrace())
-				return put_user(1UL, (unsigned long *) arg);
-			else
-				return put_user(0UL, (unsigned long *) arg);
-			break;
+	        if(sisfb_CheckVBRetrace(ivideo)) {
+			return put_user((u32)1, argp);
+		} else {
+			return put_user((u32)0, argp);
+		}
+
+	   case SISFB_GET_AUTOMAXIMIZE_OLD:
+	   	if(++count < 50) {
+	           printk(KERN_INFO "sisfb: Deprecated ioctl call received - update your application!\n");
 		}
 	   case SISFB_GET_AUTOMAXIMIZE:
-	        {
-			if(sisfb_max)
-				return put_user(1UL, (unsigned long *) arg);
-			else
-				return put_user(0UL, (unsigned long *) arg);
-			break;
+	        if(ivideo->sisfb_max) return put_user((u32)1, argp);
+		else 	              return put_user((u32)0, argp);
+
+	   case SISFB_SET_AUTOMAXIMIZE_OLD:
+	   	if(++count < 50) {
+		   printk(KERN_INFO "sisfb: Deprecated ioctl call received - update your application!\n");
 		}
 	   case SISFB_SET_AUTOMAXIMIZE:
-	        {
-			unsigned long newmax;
+		if(copy_from_user(&gpu32, argp, sizeof(gpu32))) {
+			return -EFAULT;
+		}
+		ivideo->sisfb_max = (gpu32) ? 1 : 0;
+		break;
+
+	   case SISFB_SET_TVPOSOFFSET:
+		if(copy_from_user(&gpu32, argp, sizeof(gpu32))) {
+			return -EFAULT;
+		}
+		sisfb_set_TVxposoffset(ivideo, ((int)(gpu32 >> 16)) - 32);
+		sisfb_set_TVyposoffset(ivideo, ((int)(gpu32 & 0xffff)) - 32);
+		break;
 
-			if(copy_from_user(&newmax, (unsigned long *)arg, sizeof(newmax)))
-				return -EFAULT;
+	   case SISFB_GET_TVPOSOFFSET:
+	        return put_user((u32)(((ivideo->tvxpos+32)<<16)|((ivideo->tvypos+32)&0xffff)), argp);
 
-			if(newmax) sisfb_max = 1;
-			else	   sisfb_max = 0;
-			break;
+	   case SISFB_SET_LOCK:
+		if(copy_from_user(&gpu32, argp, sizeof(gpu32))) {
+			return -EFAULT;
 		}
+		ivideo->sisfblocked = (gpu32) ? 1 : 0;
+		break;
+
 	   default:
 		return -EINVAL;
 	}
 	return 0;
 }
 
-
-static int sisfb_get_fix(struct fb_fix_screeninfo *fix, int con,
-			 struct fb_info *info)
+static int
+sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info)
 {
-	memset(fix, 0, sizeof(struct fb_fix_screeninfo));
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)	
-	strcpy(fix->id, sis_fb_info->modename);
-#else
-	strcpy(fix->id, myid);
-#endif	
+	struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
 
-	fix->smem_start = ivideo.video_base;
+	memset(fix, 0, sizeof(struct fb_fix_screeninfo));
 
-        if((!sisfb_mem) || (sisfb_mem > (ivideo.video_size/1024))) {
-	    if(sisvga_engine == SIS_300_VGA) {
-	       if(ivideo.video_size > 0x1000000) {
-	          	fix->smem_len = 0xc00000;
-	       } else if(ivideo.video_size > 0x800000)
-		  	fix->smem_len = 0x800000;
-	       else
-		  	fix->smem_len = 0x400000;
-            } else {
-	       	fix->smem_len = ivideo.video_size - 0x100000;
-	    }
-        } else
-		fix->smem_len = sisfb_mem * 1024;
+	strcpy(fix->id, ivideo->myid);
 
+	fix->smem_start  = ivideo->video_base;
+	fix->smem_len    = ivideo->sisfb_mem;
 	fix->type        = FB_TYPE_PACKED_PIXELS;
 	fix->type_aux    = 0;
-	if(ivideo.video_bpp == 8)
-	   fix->visual = FB_VISUAL_PSEUDOCOLOR;
-	else
-	   fix->visual = FB_VISUAL_TRUECOLOR;
-	fix->xpanstep    = 0;
-
-        if(sisfb_ypan) 	 fix->ypanstep = 1;
-
+	fix->visual      = (ivideo->video_bpp == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
+	fix->xpanstep    = 1;
+	fix->ypanstep 	 = (ivideo->sisfb_ypan) ? 1 : 0;
 	fix->ywrapstep   = 0;
-	fix->line_length = ivideo.video_linelength;
-	fix->mmio_start  = ivideo.mmio_base;
-	fix->mmio_len    = sisfb_mmio_size;
-	if(sisvga_engine == SIS_300_VGA) 
+	fix->line_length = ivideo->video_linelength;
+	fix->mmio_start  = ivideo->mmio_base;
+	fix->mmio_len    = ivideo->mmio_size;
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
 	   fix->accel    = FB_ACCEL_SIS_GLAMOUR;
-	else if((ivideo.chip == SIS_330) || (ivideo.chip == SIS_760))
+	} else if((ivideo->chip == SIS_330) || (ivideo->chip == SIS_760)) {
 	   fix->accel    = FB_ACCEL_SIS_XABRE;
-	else
+	} else {
 	   fix->accel    = FB_ACCEL_SIS_GLAMOUR_2;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-	fix->reserved[0] = ivideo.video_size & 0xFFFF;
-	fix->reserved[1] = (ivideo.video_size >> 16) & 0xFFFF;
-	fix->reserved[2] = sisfb_caps;
-#endif
+	}
 
 	return 0;
 }
@@ -2359,458 +2234,416 @@
 	.fb_get_cmap	= sisfb_get_cmap,
 	.fb_set_cmap	= sisfb_set_cmap,
         .fb_pan_display = sisfb_pan_display,
-	.fb_ioctl	= sisfb_ioctl,
-	.fb_mmap	= sisfb_mmap,
+	.fb_ioctl	= sisfb_ioctl
 };
 #endif
 
-
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 static struct fb_ops sisfb_ops = {
-	.owner        =	THIS_MODULE,
-	.fb_open      = sisfb_open,
-	.fb_release   = sisfb_release,
-	.fb_check_var = sisfb_check_var,
-	.fb_set_par   = sisfb_set_par,
-	.fb_setcolreg = sisfb_setcolreg,
+	.owner          = THIS_MODULE,
+	.fb_open        = sisfb_open,
+	.fb_release     = sisfb_release,
+	.fb_check_var   = sisfb_check_var,
+	.fb_set_par     = sisfb_set_par,
+	.fb_setcolreg   = sisfb_setcolreg,
         .fb_pan_display = sisfb_pan_display,
-        .fb_blank     = sisfb_blank,
-	.fb_fillrect  = fbcon_sis_fillrect,
-	.fb_copyarea  = fbcon_sis_copyarea,
-	.fb_imageblit = cfb_imageblit,
-	.fb_cursor    = soft_cursor,	
-	.fb_sync      = fbcon_sis_sync,
-	.fb_ioctl     =	sisfb_ioctl,
-	.fb_mmap      =	sisfb_mmap,
+        .fb_blank       = sisfb_blank,
+	.fb_fillrect    = fbcon_sis_fillrect,
+	.fb_copyarea    = fbcon_sis_copyarea,
+	.fb_imageblit   = cfb_imageblit,
+	.fb_cursor      = soft_cursor,
+	.fb_sync        = fbcon_sis_sync,
+	.fb_ioctl       = sisfb_ioctl
 };
 #endif
 
-
 /* ---------------- Chip generation dependent routines ---------------- */
 
-#ifdef CONFIG_FB_SIS_300 /* for SiS 300/630/540/730 */
-
-static int sisfb_get_dram_size_300(void)
+static struct pci_dev * sisfb_get_northbridge(int basechipid)
 {
 	struct pci_dev *pdev = NULL;
-	int pdev_valid = 0;
-	u8  pci_data, reg;
-	u16 nbridge_id;
-
-	switch (ivideo.chip) {
-	   case SIS_540:
-		nbridge_id = PCI_DEVICE_ID_SI_540;
-		break;
-	   case SIS_630:
-		nbridge_id = PCI_DEVICE_ID_SI_630;
-		break;
-	   case SIS_730:
-		nbridge_id = PCI_DEVICE_ID_SI_730;
-		break;
-	   default:
-		nbridge_id = 0;
-		break;
-	}
-
-	if (nbridge_id == 0) {  /* 300 */
-
-	        inSISIDXREG(SISSR, IND_SIS_DRAM_SIZE,reg);
-		ivideo.video_size =
-		        ((unsigned int) ((reg & SIS_DRAM_SIZE_MASK) + 1) << 20);
+	int nbridgenum, nbridgeidx, i;
+	const unsigned short nbridgeids[] = {
+		PCI_DEVICE_ID_SI_540,	/* for SiS 540 VGA */
+		PCI_DEVICE_ID_SI_630,	/* for SiS 630/730 VGA */
+		PCI_DEVICE_ID_SI_730,
+		PCI_DEVICE_ID_SI_550,   /* for SiS 550 VGA */
+		PCI_DEVICE_ID_SI_650,   /* for SiS 650/651/740 VGA */
+		PCI_DEVICE_ID_SI_651,
+		PCI_DEVICE_ID_SI_740,
+		PCI_DEVICE_ID_SI_661,	/* for SiS 661/741/660/760 VGA */
+		PCI_DEVICE_ID_SI_741,
+		PCI_DEVICE_ID_SI_660,
+		PCI_DEVICE_ID_SI_760
+	};
 
-	} else {		/* 540, 630, 730 */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,74)
-		pci_for_each_dev(pdev) {
-#else
-		while((pdev = pci_find_device(PCI_VENDOR_ID_SI, PCI_ANY_ID, pdev))) {
+    	switch(basechipid) {
+#ifdef CONFIG_FB_SIS_300
+	case SIS_540:	nbridgeidx = 0; nbridgenum = 1; break;
+	case SIS_630:	nbridgeidx = 1; nbridgenum = 2; break;
 #endif
-			if ((pdev->vendor == PCI_VENDOR_ID_SI)
-				       && (pdev->device == nbridge_id)) {
-				pci_read_config_byte(pdev, IND_BRI_DRAM_STATUS, &pci_data);
-				pci_data = (pci_data & BRI_DRAM_SIZE_MASK) >> 4;
-				ivideo.video_size = (unsigned int)(1 << (pci_data+21));
-				pdev_valid = 1;
-
-				reg = SIS_DATA_BUS_64 << 6;
-				switch (pci_data) {
-				   case BRI_DRAM_SIZE_2MB:
-					reg |= SIS_DRAM_SIZE_2MB;
-					break;
-				   case BRI_DRAM_SIZE_4MB:
-					reg |= SIS_DRAM_SIZE_4MB;
-					break;
-				   case BRI_DRAM_SIZE_8MB:
-					reg |= SIS_DRAM_SIZE_8MB;
-					break;
-				   case BRI_DRAM_SIZE_16MB:
-					reg |= SIS_DRAM_SIZE_16MB;
-					break;
-				   case BRI_DRAM_SIZE_32MB:
-					reg |= SIS_DRAM_SIZE_32MB;
-					break;
-				   case BRI_DRAM_SIZE_64MB:
-					reg |= SIS_DRAM_SIZE_64MB;
-					break;
-				}
-				outSISIDXREG(SISSR, IND_SIS_DRAM_SIZE, reg);
-				break;
-			}  
-		}
-	
-		if (!pdev_valid)  return -1;
+#ifdef CONFIG_FB_SIS_315
+	case SIS_550:   nbridgeidx = 3; nbridgenum = 1; break;
+	case SIS_650:	nbridgeidx = 4; nbridgenum = 3; break;
+	case SIS_660:	nbridgeidx = 7; nbridgenum = 4; break;
+#endif
+	default:	return NULL;
 	}
-	return 0;
+	for(i = 0; i < nbridgenum; i++) {
+		if((pdev = pci_find_device(PCI_VENDOR_ID_SI, nbridgeids[nbridgeidx+i], NULL))) break;
+	}
+	return pdev;
 }
 
-#endif  /* CONFIG_FB_SIS_300 */
-
-
-#ifdef CONFIG_FB_SIS_315    /* for SiS 315/550/650/740/330/661/741/760 */
-
-static int sisfb_get_dram_size_315(void)
+static int __devinit sisfb_get_dram_size(struct sis_video_info *ivideo)
 {
-	u8  reg = 0;
-
-	if(ivideo.chip == SIS_550 ||
-	   ivideo.chip == SIS_650 ||
-	   ivideo.chip == SIS_740) {
-
-                inSISIDXREG(SISSR, IND_SIS_DRAM_SIZE, reg);
-		reg &= 0x3f;
-		reg++;
-		reg <<= 2;
-		ivideo.video_size = reg << 20;
-		return 0;
+#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
+	u8 reg;
+#endif
 
-	} else if(ivideo.chip == SIS_661 ||
-	          ivideo.chip == SIS_741 ||
-		  ivideo.chip == SIS_660 ||
-		  ivideo.chip == SIS_760) {
+	ivideo->video_size = 0;
 
+	switch(ivideo->chip) {
+#ifdef CONFIG_FB_SIS_300
+	case SIS_300:
+	        inSISIDXREG(SISSR, 0x14, reg);
+		ivideo->video_size = ((reg & 0x3F) + 1) << 20;
+		break;
+	case SIS_540:
+	case SIS_630:
+	case SIS_730:
+	   	if(!ivideo->nbridge) return -1;
+	   	pci_read_config_byte(ivideo->nbridge, 0x63, &reg);
+		ivideo->video_size = 1 << (((reg & 0x70) >> 4) + 21);
+		break;
+#endif
+#ifdef CONFIG_FB_SIS_315
+	case SIS_315H:
+	case SIS_315PRO:
+	case SIS_315:
+	   	inSISIDXREG(SISSR, 0x14, reg);
+		ivideo->video_size = (1 << ((reg & 0xf0) >> 4)) << 20;
+		switch((reg >> 2) & 0x03) {
+		case 0x01:
+		case 0x03:
+		   ivideo->video_size <<= 1;
+		   break;
+		case 0x02:
+		   ivideo->video_size += (ivideo->video_size/2);
+		}
+	   	break;
+	case SIS_330:
+	   	inSISIDXREG(SISSR, 0x14, reg);
+		ivideo->video_size = (1 << ((reg & 0xf0) >> 4)) << 20;
+		if(reg & 0x0c) ivideo->video_size <<= 1;
+	   	break;
+	case SIS_550:
+	case SIS_650:
+	case SIS_740:
+	    	inSISIDXREG(SISSR, 0x14, reg);
+		ivideo->video_size = (((reg & 0x3f) + 1) << 2) << 20;
+		break;
+	case SIS_661:
+	case SIS_741:
+	     	inSISIDXREG(SISCR, 0x79, reg);
+		ivideo->video_size = (1 << ((reg & 0xf0) >> 4)) << 20;
+	   	break;
+	case SIS_660:
+	case SIS_760:
 		inSISIDXREG(SISCR, 0x79, reg);
-		reg &= 0xf0;
-		reg >>= 4;
-		ivideo.video_size = (1 << reg) << 20;
-		return 0;
-
-	} else {	/* 315, 330 */
-
-	        inSISIDXREG(SISSR, IND_SIS_DRAM_SIZE, reg);
-		ivideo.video_size = (1 << ((reg & 0xf0) >> 4)) << 20;
-
-		reg &= SIS315_DUAL_CHANNEL_MASK;
-		reg >>= 2;
-
-		if(ivideo.chip == SIS_330) {
-
-		   if(reg) ivideo.video_size <<= 1;
-		
-		} else {
-		   
-		   switch (reg) {
-		      case SIS315_SINGLE_CHANNEL_2_RANK:
-			   ivideo.video_size <<= 1;
-			   break;
-		      case SIS315_DUAL_CHANNEL_1_RANK:
-			   ivideo.video_size <<= 1;
-			   break;
-		      case SIS315_ASYM_DDR:		/* TW: DDR asymetric */
-			   ivideo.video_size += (ivideo.video_size/2);
-			   break;
-		   }
+		reg = (reg & 0xf0) >> 4;
+		if(reg)	ivideo->video_size = (1 << reg) << 20;
+		inSISIDXREG(SISCR, 0x78, reg);
+		reg &= 0x30;
+		if(reg) {
+		   if(reg == 0x10) ivideo->video_size += (32 << 20);
+		   else		   ivideo->video_size += (64 << 20);
 		}
-
-		return 0;
+	   	break;
+#endif
+	default:
+		return -1;
 	}
-	
-	return -1;
-	
+	return 0;
 }
 
-#endif   /* CONFIG_FB_SIS_315 */
-
-
-/* -------------- video bridge detection --------------- */
+/* -------------- video bridge device detection --------------- */
 
-static void sisfb_detect_VB_connect()
+static void __devinit sisfb_detect_VB_connect(struct sis_video_info *ivideo)
 {
-	u8 sr16, sr17, cr32, temp;
+	u8 cr32, temp;
 
-	if(sisvga_engine == SIS_300_VGA) {
+#ifdef CONFIG_FB_SIS_300
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
+		inSISIDXREG(SISSR, 0x17, temp);
+		if((temp & 0x0F) && (ivideo->chip != SIS_300)) {
+			/* PAL/NTSC is stored on SR16 on such machines */
+			if(!(ivideo->vbflags & (TV_PAL | TV_NTSC | TV_PALM | TV_PALN))) {
+		   		inSISIDXREG(SISSR, 0x16, temp);
+				if(temp & 0x20)
+					ivideo->vbflags |= TV_PAL;
+				else
+					ivideo->vbflags |= TV_NTSC;
+			}
+		}
+	}
+#endif
 
-		inSISIDXREG(SISSR, IND_SIS_SCRATCH_REG_17, sr17);
+	inSISIDXREG(SISCR, 0x32, cr32);
 
-		if ((sr17 & 0x0F) && (ivideo.chip != SIS_300)) {
+	if(cr32 & SIS_CRT1) {
+		ivideo->sisfb_crt1off = 0;
+	} else {
+		ivideo->sisfb_crt1off = (cr32 & 0xDF) ? 1 : 0;
+	}
 
-			/* Old BIOSes store the detected CRT2 type in SR17
-		 	 * instead of CR32. However, since our detection
-			 * routines store their results to CR32, we now copy
-			 * the remaining bits (for LCD and VGA) to CR32 for
-			 * unified usage.
-			 * SR17[0] CRT1    [1] LCD     [2] TV    [3] VGA2
-			 *     [4] AVIDEO  [5] SVIDEO
-			 */
+	ivideo->vbflags &= ~(CRT2_TV | CRT2_LCD | CRT2_VGA);
 
-#if 0
-			if (sr17 & 0x01) orSISIDXREG(SISCR, 0x32, SIS_CRT1);
-			else		 andSISIDXREG(SISCR, 0x32, ~SIS_CRT1);
+	if(cr32 & SIS_VB_TV)   ivideo->vbflags |= CRT2_TV;
+	if(cr32 & SIS_VB_LCD)  ivideo->vbflags |= CRT2_LCD;
+	if(cr32 & SIS_VB_CRT2) ivideo->vbflags |= CRT2_VGA;
 
-			if (sr17 & 0x02) orSISIDXREG(SISCR, 0x32, SIS_VB_LCD);
-			else		 andSISIDXREG(SISCR, 0x32, ~SIS_VB_LCD);
+	/* Check given parms for hardware compatibility.
+	 * (Cannot do this in the search_xx routines since we don't
+	 * know what hardware we are running on then)
+	 */
 
-			/* no HiVision and no DVI connector here */
-			andSISIDXREG(SISCR, 0x32, ~0xc0);
-#endif
+	if(ivideo->chip != SIS_550) {
+	   ivideo->sisfb_dstn = ivideo->sisfb_fstn = 0;
+	}
 
-			/* PAL/NTSC is stored on SR16 on such machines */
-			if (!(ivideo.vbflags & (TV_PAL | TV_NTSC))) {
-		   		inSISIDXREG(SISSR, IND_SIS_SCRATCH_REG_16, sr16);
-				if (sr16 & 0x20)
-					ivideo.vbflags |= TV_PAL;
-				else
-					ivideo.vbflags |= TV_NTSC;
-			}
+	if(ivideo->sisfb_tvplug != -1) {
+	   if( (ivideo->sisvga_engine != SIS_315_VGA) ||
+	       (!(ivideo->vbflags & (VB_301C|VB_301LV|VB_302LV))) ) {
+	      if(ivideo->sisfb_tvplug & TV_YPBPR) {
+	         ivideo->sisfb_tvplug = -1;
+		 printk(KERN_ERR "sisfb: YPbPr not supported\n");
+	      }
+	   }
+	}
+	if(ivideo->sisfb_tvplug != -1) {
+	   if( (ivideo->sisvga_engine != SIS_315_VGA) ||
+	       (!(ivideo->vbflags & (VB_301|VB_301B|VB_302B))) ) {
+	      if(ivideo->sisfb_tvplug & TV_HIVISION) {
+	         ivideo->sisfb_tvplug = -1;
+		 printk(KERN_ERR "sisfb: HiVision not supported\n");
+	      }
+	   }
+	}
+	if(ivideo->sisfb_tvstd != -1) {
+	   if( (!(ivideo->vbflags & VB_SISBRIDGE)) &&
+	       (!((ivideo->sisvga_engine == SIS_315_VGA) && (ivideo->vbflags & VB_CHRONTEL))) ) {
+	      if(ivideo->sisfb_tvstd & (TV_PALN | TV_PALN | TV_NTSCJ)) {
+	         ivideo->sisfb_tvstd = -1;
+	         printk(KERN_ERR "sisfb: PALM/PALN/NTSCJ not supported\n");
+	      }
+	   }
+	}
 
+	/* Detect/set TV plug & type */
+	if(ivideo->sisfb_tvplug != -1) {
+		ivideo->vbflags |= ivideo->sisfb_tvplug;
+	} else {
+		if(cr32 & SIS_VB_YPBPR)     	 ivideo->vbflags |= (TV_YPBPR|TV_YPBPR525I); /* default: 480i */
+		else if(cr32 & SIS_VB_HIVISION)  ivideo->vbflags |= TV_HIVISION;
+		else if(cr32 & SIS_VB_SCART)     ivideo->vbflags |= TV_SCART;
+	 	else {
+			if(cr32 & SIS_VB_SVIDEO)    ivideo->vbflags |= TV_SVIDEO;
+			if(cr32 & SIS_VB_COMPOSITE) ivideo->vbflags |= TV_AVIDEO;
 		}
-
 	}
 
-	inSISIDXREG(SISCR, IND_SIS_SCRATCH_REG_CR32, cr32);
-
-	if (cr32 & SIS_CRT1)
-		sisfb_crt1off = 0;
-	else {
-		if (cr32 & 0x5F)
-			sisfb_crt1off = 1;
-		else
-			sisfb_crt1off = 0;
-	}
-
-	ivideo.vbflags &= ~(CRT2_TV | CRT2_LCD | CRT2_VGA);
-
-	if (cr32 & SIS_VB_TV)
-		ivideo.vbflags |= CRT2_TV;
-	if (cr32 & SIS_VB_LCD)
-		ivideo.vbflags |= CRT2_LCD;
-	if (cr32 & SIS_VB_CRT2)
-		ivideo.vbflags |= CRT2_VGA;
-
-	/* TW: Detect/set TV plug & type */
-	if(sisfb_tvplug != -1)
-	        ivideo.vbflags |= sisfb_tvplug;
-
-	if (cr32 & SIS_VB_SVIDEO)
-		ivideo.vbflags |= TV_SVIDEO;
-	else if (cr32 & SIS_VB_COMPOSITE)
-		ivideo.vbflags |= TV_AVIDEO;
-	else if (cr32 & SIS_VB_SCART)
-		ivideo.vbflags |= TV_SCART;
-
-	if (!(ivideo.vbflags & (TV_PAL | TV_NTSC))) {
-		if(sisvga_engine == SIS_300_VGA) {
-	        	inSISIDXREG(SISSR, IND_SIS_POWER_ON_TRAP, temp);
-			if (temp & 0x01)
-				ivideo.vbflags |= TV_PAL;
-			else
-				ivideo.vbflags |= TV_NTSC;
-		} else if((ivideo.chip <= SIS_315PRO) || (ivideo.chip >= SIS_330)) {
-
+	if(!(ivideo->vbflags & (TV_YPBPR | TV_HIVISION))) {
+	    if(ivideo->sisfb_tvstd != -1) {
+	       ivideo->vbflags &= ~(TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ);
+	       ivideo->vbflags |= ivideo->sisfb_tvstd;
+	    }
+	    if(ivideo->vbflags & TV_SCART) {
+	       ivideo->vbflags &= ~(TV_NTSC | TV_PALM | TV_PALN | TV_NTSCJ);
+	       ivideo->vbflags |= TV_PAL;
+	    }
+	    if(!(ivideo->vbflags & (TV_PAL | TV_NTSC | TV_PALM | TV_PALN | TV_NTSCJ))) {
+		if(ivideo->sisvga_engine == SIS_300_VGA) {
+	        	inSISIDXREG(SISSR, 0x38, temp);
+			if(temp & 0x01) ivideo->vbflags |= TV_PAL;
+			else		ivideo->vbflags |= TV_NTSC;
+		} else if((ivideo->chip <= SIS_315PRO) || (ivideo->chip >= SIS_330)) {
                 	inSISIDXREG(SISSR, 0x38, temp);
-			if(temp & 0x01)
-				ivideo.vbflags |= TV_PAL;
-			else
-				ivideo.vbflags |= TV_NTSC;
-
+			if(temp & 0x01) ivideo->vbflags |= TV_PAL;
+			else		ivideo->vbflags |= TV_NTSC;
 	    	} else {
-
 	        	inSISIDXREG(SISCR, 0x79, temp);
-			if(temp & 0x20)
-				ivideo.vbflags |= TV_PAL;
-			else
-				ivideo.vbflags |= TV_NTSC;
+			if(temp & 0x20)	ivideo->vbflags |= TV_PAL;
+			else		ivideo->vbflags |= TV_NTSC;
 	    	}
+	    }
 	}
 
-	/* TW: Copy forceCRT1 option to CRT1off if option is given */
-    	if (sisfb_forcecrt1 != -1) {
-    		if(sisfb_forcecrt1) sisfb_crt1off = 0;
-		else                sisfb_crt1off = 1;
+	/* Copy forceCRT1 option to CRT1off if option is given */
+    	if(ivideo->sisfb_forcecrt1 != -1) {
+    	   ivideo->sisfb_crt1off = (ivideo->sisfb_forcecrt1) ? 0 : 1;
     	}
-
 }
 
-static void sisfb_get_VB_type(void)
+static void __devinit sisfb_get_VB_type(struct sis_video_info *ivideo)
 {
-	u8 vb_chipid;
-	u8 reg;
 	char stdstr[]    = "sisfb: Detected";
 	char bridgestr[] = "video bridge";
-	char lvdsstr[]   = "LVDS transmitter";
-  	char chrstr[]    = "Chrontel TV encoder";
-
-	ivideo.hasVB = HASVB_NONE;
-	sishw_ext.ujVBChipID = VB_CHIP_UNKNOWN;
-	sishw_ext.Is301BDH = FALSE;
-	sishw_ext.usExternalChip = 0;
+	u8 vb_chipid;
+	u8 reg;
 
 	inSISIDXREG(SISPART4, 0x00, vb_chipid);
-	switch (vb_chipid) {
-	   case 0x01:
-		ivideo.hasVB = HASVB_301;
+	switch(vb_chipid) {
+	case 0x01:
 		inSISIDXREG(SISPART4, 0x01, reg);
 		if(reg < 0xb0) {
-			ivideo.vbflags |= VB_301;
-			sishw_ext.ujVBChipID = VB_CHIP_301;
+			ivideo->vbflags |= VB_301;
 			printk(KERN_INFO "%s SiS301 %s\n", stdstr, bridgestr);
 		} else if(reg < 0xc0) {
-		 	ivideo.vbflags |= VB_301B;
-			sishw_ext.ujVBChipID = VB_CHIP_301B;
+		 	ivideo->vbflags |= VB_301B;
 			inSISIDXREG(SISPART4,0x23,reg);
 			if(!(reg & 0x02)) {
-			   sishw_ext.Is301BDH = TRUE;
-			   ivideo.vbflags |= VB_30xBDH;
+			   ivideo->vbflags |= VB_30xBDH;
 			   printk(KERN_INFO "%s SiS301B-DH %s\n", stdstr, bridgestr);
 			} else {
 			   printk(KERN_INFO "%s SiS301B %s\n", stdstr, bridgestr);
 			}
 		} else if(reg < 0xd0) {
-		 	ivideo.vbflags |= VB_301C;
-			sishw_ext.ujVBChipID = VB_CHIP_301C;
+		 	ivideo->vbflags |= VB_301C;
 			printk(KERN_INFO "%s SiS301C %s\n", stdstr, bridgestr);
 		} else if(reg < 0xe0) {
-			ivideo.vbflags |= VB_301LV;
-			sishw_ext.ujVBChipID = VB_CHIP_301LV;
+			ivideo->vbflags |= VB_301LV;
 			printk(KERN_INFO "%s SiS301LV %s\n", stdstr, bridgestr);
 		} else if(reg <= 0xe1) {
 		        inSISIDXREG(SISPART4,0x39,reg);
 			if(reg == 0xff) {
-			   ivideo.vbflags |= VB_302LV;
-			   sishw_ext.ujVBChipID = VB_CHIP_302LV;
+			   ivideo->vbflags |= VB_302LV;
 			   printk(KERN_INFO "%s SiS302LV %s\n", stdstr, bridgestr);
 			} else {
-			   ivideo.vbflags |= VB_302ELV;
-			   sishw_ext.ujVBChipID = VB_CHIP_302ELV;
+			   ivideo->vbflags |= VB_301C;
+			   printk(KERN_INFO "%s SiS301C(P4) %s\n", stdstr, bridgestr);
+#if 0
+			   ivideo->vbflags |= VB_302ELV;
 			   printk(KERN_INFO "%s SiS302ELV %s\n", stdstr, bridgestr);
+#endif
 			}
 		}
 		break;
-	   case 0x02:
-		ivideo.hasVB = HASVB_302;
-		inSISIDXREG(SISPART4, 0x01, reg);
-		if(reg < 0xd0) {
-			ivideo.vbflags |= VB_302B;
-			sishw_ext.ujVBChipID = VB_CHIP_302B;
-			inSISIDXREG(SISPART4,0x23,reg);
-		  	if(!(reg & 0x02)) {
-			   sishw_ext.Is301BDH = TRUE;
-			   ivideo.vbflags |= VB_30xBDH;
-			   printk(KERN_INFO "%s SiS302B-DH %s\n", stdstr, bridgestr);
-			} else {
-			   printk(KERN_INFO "%s SiS302B %s\n", stdstr, bridgestr);
-			}
-		} else if(reg < 0xe0) {
-		 	ivideo.vbflags |= VB_301LV;
-			sishw_ext.ujVBChipID = VB_CHIP_301LV;
-			printk(KERN_INFO "%s SiS301LV %s\n", stdstr, bridgestr);
-		} else if(reg <= 0xe1) {
-			ivideo.vbflags |= VB_302LV;
-			sishw_ext.ujVBChipID = VB_CHIP_302LV;
-			printk(KERN_INFO "%s SiS302LV %s\n", stdstr, bridgestr);
-		}
+	case 0x02:
+		ivideo->vbflags |= VB_302B;
+		printk(KERN_INFO "%s SiS302B %s\n", stdstr, bridgestr);
 		break;
 	}
 
-	if((!(ivideo.vbflags & VB_VIDEOBRIDGE)) && (ivideo.chip != SIS_300)) {
-		inSISIDXREG(SISCR, IND_SIS_SCRATCH_REG_CR37, reg);
+	if((!(ivideo->vbflags & VB_VIDEOBRIDGE)) && (ivideo->chip != SIS_300)) {
+		inSISIDXREG(SISCR, 0x37, reg);
 		reg &= SIS_EXTERNAL_CHIP_MASK;
 		reg >>= 1;
-		if(sisvga_engine == SIS_300_VGA) {
-			switch (reg) {
+		if(ivideo->sisvga_engine == SIS_300_VGA) {
+#ifdef CONFIG_FB_SIS_300
+			switch(reg) {
 			   case SIS_EXTERNAL_CHIP_LVDS:
-				ivideo.hasVB = HASVB_LVDS;
-				ivideo.vbflags |= VB_LVDS;
-				sishw_ext.usExternalChip = 0x01;
-				printk(KERN_INFO "%s %s\n", stdstr, lvdsstr);
+				ivideo->vbflags |= VB_LVDS;
 				break;
 			   case SIS_EXTERNAL_CHIP_TRUMPION:
-				ivideo.hasVB = HASVB_TRUMPION;
-				sishw_ext.usExternalChip = 0x02;
-				printk(KERN_INFO "%s Trumpion LCD scaler\n", stdstr);
+				ivideo->vbflags |= VB_TRUMPION;
 				break;
 			   case SIS_EXTERNAL_CHIP_CHRONTEL:
-				ivideo.hasVB = HASVB_CHRONTEL;
-				ivideo.vbflags |= VB_CHRONTEL;
-				sishw_ext.usExternalChip = 0x04;
-				printk(KERN_INFO "%s %s\n", stdstr, chrstr);
+				ivideo->vbflags |= VB_CHRONTEL;
 				break;
 			   case SIS_EXTERNAL_CHIP_LVDS_CHRONTEL:
-				ivideo.hasVB = HASVB_LVDS_CHRONTEL;
-				ivideo.vbflags |= (VB_LVDS | VB_CHRONTEL);
-				sishw_ext.usExternalChip = 0x05;
-				printk(KERN_INFO "%s %s and %s\n", stdstr, lvdsstr, chrstr);
+				ivideo->vbflags |= (VB_LVDS | VB_CHRONTEL);
 				break;
 			}
-		} else if(ivideo.chip < SIS_661) {
+			if(ivideo->vbflags & VB_CHRONTEL) ivideo->chronteltype = 1;
+#endif
+		} else if(ivideo->chip < SIS_661) {
+#ifdef CONFIG_FB_SIS_315
 			switch (reg) {
 	 	   	   case SIS310_EXTERNAL_CHIP_LVDS:
-				ivideo.hasVB = HASVB_LVDS;
-				ivideo.vbflags |= VB_LVDS;
-				sishw_ext.usExternalChip = 0x01;
-				printk(KERN_INFO "%s %s\n", stdstr, lvdsstr);
+				ivideo->vbflags |= VB_LVDS;
 				break;
 		   	   case SIS310_EXTERNAL_CHIP_LVDS_CHRONTEL:
-				ivideo.hasVB = HASVB_LVDS_CHRONTEL;
-				ivideo.vbflags |= (VB_LVDS | VB_CHRONTEL);
-				sishw_ext.usExternalChip = 0x05;
-				printk(KERN_INFO "%s %s and %s\n", stdstr, lvdsstr, chrstr);
+				ivideo->vbflags |= (VB_LVDS | VB_CHRONTEL);
 				break;
 			}
+			if(ivideo->vbflags & VB_CHRONTEL) ivideo->chronteltype = 2;
+#endif
+		} else if(ivideo->chip >= SIS_661) {
+#ifdef CONFIG_FB_SIS_315
+			inSISIDXREG(SISCR, 0x38, reg);
+			reg >>= 5;
+			switch(reg) {
+			   case 0x02:
+				ivideo->vbflags |= VB_LVDS;
+				break;
+			   case 0x03:
+				ivideo->vbflags |= (VB_LVDS | VB_CHRONTEL);
+				break;
+			   case 0x04:
+				ivideo->vbflags |= (VB_LVDS | VB_CONEXANT);
+				break;
+			}
+			if(ivideo->vbflags & VB_CHRONTEL) ivideo->chronteltype = 2;
+#endif
+		}
+		if(ivideo->vbflags & VB_LVDS) {
+		   printk(KERN_INFO "%s LVDS transmitter\n", stdstr);
+		}
+		if(ivideo->vbflags & VB_TRUMPION) {
+		   printk(KERN_INFO "%s Trumpion Zurac LCD scaler\n", stdstr);
+		}
+		if(ivideo->vbflags & VB_CHRONTEL) {
+		   printk(KERN_INFO "%s Chrontel TV encoder\n", stdstr);
+		}
+		if(ivideo->vbflags & VB_CONEXANT) {
+		   printk(KERN_INFO "%s Conexant external device\n", stdstr);
 		}
-
 	}
 
-	if(ivideo.vbflags & VB_SISBRIDGE) {
-		SiS_Sense30x();
-	} else if(ivideo.vbflags & VB_CHRONTEL) {
-		SiS_SenseCh();
+	if(ivideo->vbflags & VB_SISBRIDGE) {
+		SiS_Sense30x(ivideo);
+	} else if(ivideo->vbflags & VB_CHRONTEL) {
+		SiS_SenseCh(ivideo);
 	}
-
 }
 
 /* ------------------ Sensing routines ------------------ */
 
-static BOOLEAN
-sisfb_test_DDC1(void)
+static BOOLEAN __devinit sisfb_test_DDC1(struct sis_video_info *ivideo)
 {
     unsigned short old;
     int count = 48;
 
-    old = SiS_ReadDDC1Bit(&SiS_Pr);
+    old = SiS_ReadDDC1Bit(&ivideo->SiS_Pr);
     do {
-       if(old != SiS_ReadDDC1Bit(&SiS_Pr)) break;
+       	if(old != SiS_ReadDDC1Bit(&ivideo->SiS_Pr)) break;
     } while(count--);
     return (count == -1) ? FALSE : TRUE;
 }
 
-static void
-sisfb_sense_crt1(void)
+static void __devinit sisfb_sense_crt1(struct sis_video_info *ivideo)
 {
-    unsigned char SR1F, CR63=0, CR17;
-    unsigned short temp = 0xffff;
-    int i;
     BOOLEAN mustwait = FALSE;
+    u8  SR1F, CR17;
+#ifdef CONFIG_FB_SIS_315
+    u8  CR63=0;
+#endif
+    u16 temp = 0xffff;
+    int i;
 
     inSISIDXREG(SISSR,0x1F,SR1F);
     orSISIDXREG(SISSR,0x1F,0x04);
     andSISIDXREG(SISSR,0x1F,0x3F);
     if(SR1F & 0xc0) mustwait = TRUE;
 
-    if(sisvga_engine == SIS_315_VGA) {
-       inSISIDXREG(SISCR,SiS_Pr.SiS_MyCR63,CR63);
+#ifdef CONFIG_FB_SIS_315
+    if(ivideo->sisvga_engine == SIS_315_VGA) {
+       inSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,CR63);
        CR63 &= 0x40;
-       andSISIDXREG(SISCR,SiS_Pr.SiS_MyCR63,0xBF);
+       andSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,0xBF);
     }
+#endif
 
     inSISIDXREG(SISCR,0x17,CR17);
     CR17 &= 0x80;
@@ -2822,25 +2655,46 @@
     }
 
     if(mustwait) {
-       for(i=0; i < 10; i++) sisfbwaitretracecrt1();
+       for(i=0; i < 10; i++) sisfbwaitretracecrt1(ivideo);
     }
 
-    i = 3;
-    do {
-       temp = SiS_HandleDDC(&SiS_Pr, ivideo.vbflags, sisvga_engine, 0, 0, NULL);
-    } while(((temp == 0) || (temp == 0xffff)) && i--);
+#ifdef CONFIG_FB_SIS_315
+    if(ivideo->chip >= SIS_330) {
+       andSISIDXREG(SISCR,0x32,~0x20);
+       if(ivideo->chip >= SIS_340) {
+          outSISIDXREG(SISCR, 0x57, 0x4a);
+       } else {
+          outSISIDXREG(SISCR, 0x57, 0x5f);
+       }
+       orSISIDXREG(SISCR, 0x53, 0x02);
+       while((inSISREG(SISINPSTAT)) & 0x01)    break;
+       while(!((inSISREG(SISINPSTAT)) & 0x01)) break;
+       if((inSISREG(SISMISCW)) & 0x10) temp = 1;
+       andSISIDXREG(SISCR, 0x53, 0xfd);
+       andSISIDXREG(SISCR, 0x57, 0x00);
+    }
+#endif
+
+    if(temp == 0xffff) {
+       i = 3;
+       do {
+          temp = SiS_HandleDDC(&ivideo->SiS_Pr, ivideo->vbflags, ivideo->sisvga_engine, 0, 0, NULL);
+       } while(((temp == 0) || (temp == 0xffff)) && i--);
 
-    if((temp == 0) || (temp == 0xffff)) {
-       if(sisfb_test_DDC1()) temp = 1;
+       if((temp == 0) || (temp == 0xffff)) {
+          if(sisfb_test_DDC1(ivideo)) temp = 1;
+       }
     }
 
     if((temp) && (temp != 0xffff)) {
        orSISIDXREG(SISCR,0x32,0x20);
     }
 
-    if(sisvga_engine == SIS_315_VGA) {
-       setSISIDXREG(SISCR,SiS_Pr.SiS_MyCR63,0xBF,CR63);
+#ifdef CONFIG_FB_SIS_315
+    if(ivideo->sisvga_engine == SIS_315_VGA) {
+       setSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,0xBF,CR63);
     }
+#endif
 
     setSISIDXREG(SISCR,0x17,0x7F,CR17);
 
@@ -2848,225 +2702,207 @@
 }
 
 /* Determine and detect attached devices on SiS30x */
-static int
-SISDoSense(int tempbl, int tempbh, int tempcl, int tempch)
+static int __devinit SISDoSense(struct sis_video_info *ivideo, u16 type, u16 test)
 {
-    int temp;
+    int temp, mytest, result, i, j;
 
-    outSISIDXREG(SISPART4,0x11,tempbl);
-    temp = tempbh | tempcl;
-    setSISIDXREG(SISPART4,0x10,0xe0,temp);
-    SiS_DDC2Delay(&SiS_Pr, 0x1000);
-    tempch &= 0x7f;
-    inSISIDXREG(SISPART4,0x03,temp);
-    temp ^= 0x0e;
-    temp &= tempch;
-    return((temp == tempch));
+    for(j = 0; j < 10; j++) {
+       result = 0;
+       for(i = 0; i < 3; i++) {
+          mytest = test;
+          outSISIDXREG(SISPART4,0x11,(type & 0x00ff));
+          temp = (type >> 8) | (mytest & 0x00ff);
+          setSISIDXREG(SISPART4,0x10,0xe0,temp);
+          SiS_DDC2Delay(&ivideo->SiS_Pr, 0x1500);
+          mytest >>= 8;
+          mytest &= 0x7f;
+          inSISIDXREG(SISPART4,0x03,temp);
+          temp ^= 0x0e;
+          temp &= mytest;
+          if(temp == mytest) result++;
+#if 1
+	  outSISIDXREG(SISPART4,0x11,0x00);
+	  andSISIDXREG(SISPART4,0x10,0xe0);
+	  SiS_DDC2Delay(&ivideo->SiS_Pr, 0x1000);
+#endif
+       }
+       if((result == 0) || (result >= 2)) break;
+    }
+    return(result);
 }
 
-static void
-SiS_Sense30x(void)
+static void __devinit SiS_Sense30x(struct sis_video_info *ivideo)
 {
-  u8 backupP4_0d,backupP2_00;
-  u8 svhs_bl, svhs_bh;
-  u8 svhs_cl, svhs_ch;
-  u8 cvbs_bl, cvbs_bh;
-  u8 cvbs_cl, cvbs_ch;
-  u8 vga2_bl, vga2_bh;
-  u8 vga2_cl, vga2_ch;
-  int myflag, result, haveresult, i, j;
-  char stdstr[] = "sisfb: Detected";
-  char tvstr[]  = "TV connected to";
-
-  inSISIDXREG(SISPART4,0x0d,backupP4_0d);
-  if(!(ivideo.vbflags & (VB_301C|VB_302ELV))) {
-     outSISIDXREG(SISPART4,0x0d,(backupP4_0d | 0x04));
-  }
-
-  inSISIDXREG(SISPART2,0x00,backupP2_00);
-  outSISIDXREG(SISPART2,0x00,(backupP2_00 | 0x1c));
-
-  if(sisvga_engine == SIS_300_VGA) {
-
-	if(ivideo.vbflags & (VB_301B|VB_301C|VB_302B|VB_301LV|VB_302LV)) {
-	   	vga2_bh = 0x01; vga2_bl = 0x90;
-	   	svhs_bh = 0x01; svhs_bl = 0x6b;
-	   	cvbs_bh = 0x01; cvbs_bl = 0x74;
-	} else {
-		vga2_bh = 0x00; vga2_bl = 0xd1;
-        	svhs_bh = 0x00; svhs_bl = 0xb9;
-		cvbs_bh = 0x00; cvbs_bl = 0xb3;
-	}
-	inSISIDXREG(SISPART4,0x01,myflag);
-	if(myflag & 0x04) {
-	   vga2_bh = 0x00; vga2_bl = 0xfd;
-	   svhs_bh = 0x00; svhs_bl = 0xdd;
-	   cvbs_bh = 0x00; cvbs_bl = 0xee;
-	}
-	vga2_ch = 0x0e;	vga2_cl = 0x08;
-	svhs_ch = 0x04;	svhs_cl = 0x04;
-	cvbs_ch = 0x08; cvbs_cl = 0x04;
-	if(ivideo.vbflags & (VB_301LV|VB_302LV)) {
-	   	vga2_bh = 0x00; vga2_bl = 0x00;
-	   	vga2_ch = 0x00; vga2_cl = 0x00;
-	 }
-	if(ivideo.chip == SIS_300) {
-	   inSISIDXREG(SISSR,0x3b,myflag);
-	   if(!(myflag & 0x01)) {
-	      	vga2_bh = 0x00; vga2_bl = 0x00;
-	      	vga2_ch = 0x00; vga2_cl = 0x00;
-	   }
-	}
+    u8  backupP4_0d,backupP2_00,backupP2_4d,backupSR_1e,biosflag=0;
+    u16 svhs=0, svhs_c=0;
+    u16 cvbs=0, cvbs_c=0;
+    u16 vga2=0, vga2_c=0;
+    int myflag, result;
+    char stdstr[] = "sisfb: Detected";
+    char tvstr[]  = "TV connected to";
+
+    if(ivideo->vbflags & VB_301) {
+       svhs = 0x00b9; cvbs = 0x00b3; vga2 = 0x00d1;
+       inSISIDXREG(SISPART4,0x01,myflag);
+       if(myflag & 0x04) {
+	  svhs = 0x00dd; cvbs = 0x00ee; vga2 = 0x00fd;
+       }
+    } else if(ivideo->vbflags & (VB_301B | VB_302B)) {
+       svhs = 0x016b; cvbs = 0x0174; vga2 = 0x0190;
+    } else if(ivideo->vbflags & (VB_301LV | VB_302LV)) {
+       svhs = 0x0200; cvbs = 0x0100;
+    } else if(ivideo->vbflags & (VB_301C | VB_302ELV)) {
+       svhs = 0x016b; cvbs = 0x0110; vga2 = 0x0190;
+    } else return;
+
+    vga2_c = 0x0e08; svhs_c = 0x0404; cvbs_c = 0x0804;
+    if(ivideo->vbflags & (VB_301LV|VB_302LV|VB_302ELV)) {
+       svhs_c = 0x0408; cvbs_c = 0x0808;
+    }
+    biosflag = 2;
 
-  } else {
-
-	if(ivideo.vbflags & (VB_301B|VB_302B)) {
-		vga2_bh = 0x01; vga2_bl = 0x90;
-		svhs_bh = 0x01; svhs_bl = 0x6b;
-		cvbs_bh = 0x01; cvbs_bl = 0x74;
-	} else if(ivideo.vbflags & (VB_301C|VB_302ELV)) {
-	      	vga2_bh = 0x01; vga2_bl = 0x90;
-	      	svhs_bh = 0x01; svhs_bl = 0x6b;
-	      	cvbs_bh = 0x01; cvbs_bl = 0x10;
-	} else if(ivideo.vbflags & (VB_301LV|VB_302LV)) {
-	      	vga2_bh = 0x00; vga2_bl = 0x00;
-	      	svhs_bh = 0x02; svhs_bl = 0x00;
-	      	cvbs_bh = 0x01; cvbs_bl = 0x00;
-	} else {
-		vga2_bh = 0x00; vga2_bl = 0xd1;
-        	svhs_bh = 0x00; svhs_bl = 0xb9;
-		cvbs_bh = 0x00; cvbs_bl = 0xb3;
-		inSISIDXREG(SISPART4,0x01,myflag);
-	        if(myflag & 0x04) {
-	           vga2_bh = 0x00; vga2_bl = 0xfd;
-	           svhs_bh = 0x00; svhs_bl = 0xdd;
-	           cvbs_bh = 0x00; cvbs_bl = 0xee;
-	        }
-	}
+    if(ivideo->chip == SIS_300) {
+       inSISIDXREG(SISSR,0x3b,myflag);
+       if(!(myflag & 0x01)) vga2 = vga2_c = 0;
+    }
 
-	if(ivideo.vbflags & (VB_301LV|VB_302LV|VB_302ELV)) {
-	   vga2_bh = 0x00; vga2_bl = 0x00;
-	   vga2_ch = 0x00; vga2_cl = 0x00;
-	   svhs_ch = 0x04; svhs_cl = 0x08;
-	   cvbs_ch = 0x08; cvbs_cl = 0x08;
-	} else {
-	   vga2_ch = 0x0e; vga2_cl = 0x08;
-	   svhs_ch = 0x04; svhs_cl = 0x04;
-	   cvbs_ch = 0x08; cvbs_cl = 0x04;
-	}
-    } 
-
-    if(vga2_ch || vga2_cl || vga2_bh || vga2_bl) {
-       haveresult = 0;
-       for(j = 0; j < 10; j++) {
-          result = 0;
-          for(i = 0; i < 3; i++) {
-             if(SISDoSense(vga2_bl, vga2_bh, vga2_cl, vga2_ch))
-	        result++;
-          }
-	  if((result == 0) || (result >= 2)) break;
-       }
-       if(result) {
-          printk(KERN_INFO "%s secondary VGA connection\n", stdstr);
-	  orSISIDXREG(SISCR, 0x32, 0x10);
-       } else {
-	  andSISIDXREG(SISCR, 0x32, ~0x10);
+    inSISIDXREG(SISSR,0x1e,backupSR_1e);
+    orSISIDXREG(SISSR,0x1e,0x20);
+
+    inSISIDXREG(SISPART4,0x0d,backupP4_0d);
+    if(ivideo->vbflags & VB_301C) {
+       setSISIDXREG(SISPART4,0x0d,~0x07,0x01);
+    } else {
+       orSISIDXREG(SISPART4,0x0d,0x04);
+    }
+    SiS_DDC2Delay(&ivideo->SiS_Pr, 0x2000);
+
+    inSISIDXREG(SISPART2,0x00,backupP2_00);
+    outSISIDXREG(SISPART2,0x00,((backupP2_00 | 0x1c) & 0xfc));
+
+    inSISIDXREG(SISPART2,0x4d,backupP2_4d);
+    if(ivideo->vbflags & (VB_301C|VB_301LV|VB_302LV|VB_302ELV)) {
+       outSISIDXREG(SISPART2,0x4d,(backupP2_4d & ~0x10));
+    }
+
+    if(!(ivideo->vbflags & VB_301C)) {
+       SISDoSense(ivideo, 0, 0);
+    }
+
+    andSISIDXREG(SISCR, 0x32, ~0x14);
+
+    if(vga2_c || vga2) {
+       if(SISDoSense(ivideo, vga2, vga2_c)) {
+          if(biosflag & 0x01) {
+	     printk(KERN_INFO "%s %s SCART output\n", stdstr, tvstr);
+	     orSISIDXREG(SISCR, 0x32, 0x04);
+	  } else {
+	     printk(KERN_INFO "%s secondary VGA connection\n", stdstr);
+	     orSISIDXREG(SISCR, 0x32, 0x10);
+	  }
        }
     }
 
-    if(ivideo.vbflags & (VB_301C|VB_302ELV)) {
+    andSISIDXREG(SISCR, 0x32, 0x3f);
+
+    if(ivideo->vbflags & VB_301C) {
        orSISIDXREG(SISPART4,0x0d,0x04);
     }
 
-    haveresult = 0;
-    for(j = 0; j < 10; j++) {
-       result = 0;
-       for(i = 0; i < 3; i++) {
-          if(SISDoSense(svhs_bl, svhs_bh, svhs_cl, svhs_ch))
-	        result++;
+    if((ivideo->sisvga_engine == SIS_315_VGA) &&
+       (ivideo->vbflags & (VB_301C|VB_301LV|VB_302LV|VB_302ELV))) {
+       outSISIDXREG(SISPART2,0x4d,(backupP2_4d | 0x10));
+       SiS_DDC2Delay(&ivideo->SiS_Pr, 0x2000);
+       if((result = SISDoSense(ivideo, svhs, 0x0604))) {
+          if((result = SISDoSense(ivideo, cvbs, 0x0804))) {
+	     printk(KERN_INFO "%s %s YPbPr component output\n", stdstr, tvstr);
+	     orSISIDXREG(SISCR,0x32,0x80);
+	  }
        }
-       if((result == 0) || (result >= 2)) break;
-    }
-    if(result) {
-        printk(KERN_INFO "%s %s SVIDEO output\n", stdstr, tvstr);
-	ivideo.vbflags |= TV_SVIDEO;
-	orSISIDXREG(SISCR, 0x32, 0x02);
-	andSISIDXREG(SISCR, 0x32, ~0x05);
+       outSISIDXREG(SISPART2,0x4d,backupP2_4d);
     }
 
-    if(!result) {
+    andSISIDXREG(SISCR, 0x32, ~0x03);
 
-	haveresult = 0;
-       	for(j = 0; j < 10; j++) {
-           result = 0;
-           for(i = 0; i < 3; i++) {
-              if(SISDoSense(cvbs_bl, cvbs_bh, cvbs_cl, cvbs_ch))
-	        result++;
-           }
-           if((result == 0) || (result >= 2)) break;
-        }
-	if(result) {
-	    printk(KERN_INFO "%s %s COMPOSITE output\n", stdstr, tvstr);
-	    ivideo.vbflags |= TV_AVIDEO;
-	    orSISIDXREG(SISCR, 0x32, 0x01);
-	    andSISIDXREG(SISCR, 0x32, ~0x06);
-	} else {
-	    andSISIDXREG(SISCR, 0x32, ~0x07);
-	}
+    if(!(ivideo->vbflags & TV_YPBPR)) {
+       if((result = SISDoSense(ivideo, svhs, svhs_c))) {
+          printk(KERN_INFO "%s %s SVIDEO output\n", stdstr, tvstr);
+          orSISIDXREG(SISCR, 0x32, 0x02);
+       }
+       if((biosflag & 0x02) || (!result)) {
+          if(SISDoSense(ivideo, cvbs, cvbs_c)) {
+	     printk(KERN_INFO "%s %s COMPOSITE output\n", stdstr, tvstr);
+	     orSISIDXREG(SISCR, 0x32, 0x01);
+          }
+       }
     }
-    SISDoSense(0, 0, 0, 0);
+
+    SISDoSense(ivideo, 0, 0);
 
     outSISIDXREG(SISPART2,0x00,backupP2_00);
     outSISIDXREG(SISPART4,0x0d,backupP4_0d);
+    outSISIDXREG(SISSR,0x1e,backupSR_1e);
+
+    if(ivideo->vbflags & VB_301C) {
+       inSISIDXREG(SISPART2,0x00,biosflag);
+       if(biosflag & 0x20) {
+          for(myflag = 2; myflag > 0; myflag--) {
+	     biosflag ^= 0x20;
+	     outSISIDXREG(SISPART2,0x00,biosflag);
+	  }
+       }
+    }
+
+    outSISIDXREG(SISPART2,0x00,backupP2_00);
 }
 
 /* Determine and detect attached TV's on Chrontel */
-static void
-SiS_SenseCh(void)
+static void __devinit SiS_SenseCh(struct sis_video_info *ivideo)
 {
-
-   u8 temp1, temp2;
+#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
+    u8 temp1, temp2;
+    char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
+#endif
 #ifdef CONFIG_FB_SIS_300
-   unsigned char test[3];
-   int i;
+    unsigned char test[3];
+    int i;
 #endif
-   char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
 
-   if(ivideo.chip < SIS_315H) {
+    if(ivideo->chip < SIS_315H) {
 
 #ifdef CONFIG_FB_SIS_300
-       SiS_Pr.SiS_IF_DEF_CH70xx = 1;		/* Chrontel 700x */
-       SiS_SetChrontelGPIO(&SiS_Pr, 0x9c);	/* Set general purpose IO for Chrontel communication */
-       SiS_DDC2Delay(&SiS_Pr, 1000);
-       temp1 = SiS_GetCH700x(&SiS_Pr, 0x25);
+       ivideo->SiS_Pr.SiS_IF_DEF_CH70xx = 1;		/* Chrontel 700x */
+       SiS_SetChrontelGPIO(&ivideo->SiS_Pr, 0x9c);	/* Set general purpose IO for Chrontel communication */
+       SiS_DDC2Delay(&ivideo->SiS_Pr, 1000);
+       temp1 = SiS_GetCH700x(&ivideo->SiS_Pr, 0x25);
        /* See Chrontel TB31 for explanation */
-       temp2 = SiS_GetCH700x(&SiS_Pr, 0x0e);
+       temp2 = SiS_GetCH700x(&ivideo->SiS_Pr, 0x0e);
        if(((temp2 & 0x07) == 0x01) || (temp2 & 0x04)) {
-	  SiS_SetCH700x(&SiS_Pr, 0x0b0e);
-	  SiS_DDC2Delay(&SiS_Pr, 300);
+	  SiS_SetCH700x(&ivideo->SiS_Pr, 0x0b0e);
+	  SiS_DDC2Delay(&ivideo->SiS_Pr, 300);
        }
-       temp2 = SiS_GetCH700x(&SiS_Pr, 0x25);
+       temp2 = SiS_GetCH700x(&ivideo->SiS_Pr, 0x25);
        if(temp2 != temp1) temp1 = temp2;
 
        if((temp1 >= 0x22) && (temp1 <= 0x50)) {
 	   /* Read power status */
-	   temp1 = SiS_GetCH700x(&SiS_Pr, 0x0e);
+	   temp1 = SiS_GetCH700x(&ivideo->SiS_Pr, 0x0e);
 	   if((temp1 & 0x03) != 0x03) {
      	        /* Power all outputs */
-		SiS_SetCH700x(&SiS_Pr, 0x0B0E);
-		SiS_DDC2Delay(&SiS_Pr, 300);
+		SiS_SetCH700x(&ivideo->SiS_Pr, 0x0B0E);
+		SiS_DDC2Delay(&ivideo->SiS_Pr, 300);
 	   }
 	   /* Sense connected TV devices */
 	   for(i = 0; i < 3; i++) {
-	       SiS_SetCH700x(&SiS_Pr, 0x0110);
-	       SiS_DDC2Delay(&SiS_Pr, 0x96);
-	       SiS_SetCH700x(&SiS_Pr, 0x0010);
-	       SiS_DDC2Delay(&SiS_Pr, 0x96);
-	       temp1 = SiS_GetCH700x(&SiS_Pr, 0x10);
+	       SiS_SetCH700x(&ivideo->SiS_Pr, 0x0110);
+	       SiS_DDC2Delay(&ivideo->SiS_Pr, 0x96);
+	       SiS_SetCH700x(&ivideo->SiS_Pr, 0x0010);
+	       SiS_DDC2Delay(&ivideo->SiS_Pr, 0x96);
+	       temp1 = SiS_GetCH700x(&ivideo->SiS_Pr, 0x10);
 	       if(!(temp1 & 0x08))       test[i] = 0x02;
 	       else if(!(temp1 & 0x02))  test[i] = 0x01;
 	       else                      test[i] = 0;
-	       SiS_DDC2Delay(&SiS_Pr, 0x96);
+	       SiS_DDC2Delay(&ivideo->SiS_Pr, 0x96);
 	   }
 
 	   if(test[0] == test[1])      temp1 = test[0];
@@ -3079,42 +2915,42 @@
 	   }
 	   if(temp1 == 0x02) {
 		printk(KERN_INFO "%s SVIDEO output\n", stdstr);
-		ivideo.vbflags |= TV_SVIDEO;
+		ivideo->vbflags |= TV_SVIDEO;
 		orSISIDXREG(SISCR, 0x32, 0x02);
 		andSISIDXREG(SISCR, 0x32, ~0x05);
 	   } else if (temp1 == 0x01) {
 		printk(KERN_INFO "%s CVBS output\n", stdstr);
-		ivideo.vbflags |= TV_AVIDEO;
+		ivideo->vbflags |= TV_AVIDEO;
 		orSISIDXREG(SISCR, 0x32, 0x01);
 		andSISIDXREG(SISCR, 0x32, ~0x06);
 	   } else {
- 		SiS_SetCH70xxANDOR(&SiS_Pr, 0x010E,0xF8);
+ 		SiS_SetCH70xxANDOR(&ivideo->SiS_Pr, 0x010E,0xF8);
 		andSISIDXREG(SISCR, 0x32, ~0x07);
 	   }
        } else if(temp1 == 0) {
-	  SiS_SetCH70xxANDOR(&SiS_Pr, 0x010E,0xF8);
+	  SiS_SetCH70xxANDOR(&ivideo->SiS_Pr, 0x010E,0xF8);
 	  andSISIDXREG(SISCR, 0x32, ~0x07);
        }
        /* Set general purpose IO for Chrontel communication */
-       SiS_SetChrontelGPIO(&SiS_Pr, 0x00);
+       SiS_SetChrontelGPIO(&ivideo->SiS_Pr, 0x00);
 #endif
 
-   } else {
+    } else {
 
 #ifdef CONFIG_FB_SIS_315
-	SiS_Pr.SiS_IF_DEF_CH70xx = 2;		/* Chrontel 7019 */
-        temp1 = SiS_GetCH701x(&SiS_Pr, 0x49);
-	SiS_SetCH701x(&SiS_Pr, 0x2049);
-	SiS_DDC2Delay(&SiS_Pr, 0x96);
-	temp2 = SiS_GetCH701x(&SiS_Pr, 0x20);
+	ivideo->SiS_Pr.SiS_IF_DEF_CH70xx = 2;		/* Chrontel 7019 */
+        temp1 = SiS_GetCH701x(&ivideo->SiS_Pr, 0x49);
+	SiS_SetCH701x(&ivideo->SiS_Pr, 0x2049);
+	SiS_DDC2Delay(&ivideo->SiS_Pr, 0x96);
+	temp2 = SiS_GetCH701x(&ivideo->SiS_Pr, 0x20);
 	temp2 |= 0x01;
-	SiS_SetCH701x(&SiS_Pr, (temp2 << 8) | 0x20);
-	SiS_DDC2Delay(&SiS_Pr, 0x96);
+	SiS_SetCH701x(&ivideo->SiS_Pr, (temp2 << 8) | 0x20);
+	SiS_DDC2Delay(&ivideo->SiS_Pr, 0x96);
 	temp2 ^= 0x01;
-	SiS_SetCH701x(&SiS_Pr, (temp2 << 8) | 0x20);
-	SiS_DDC2Delay(&SiS_Pr, 0x96);
-	temp2 = SiS_GetCH701x(&SiS_Pr, 0x20);
-	SiS_SetCH701x(&SiS_Pr, (temp1 << 8) | 0x49);
+	SiS_SetCH701x(&ivideo->SiS_Pr, (temp2 << 8) | 0x20);
+	SiS_DDC2Delay(&ivideo->SiS_Pr, 0x96);
+	temp2 = SiS_GetCH701x(&ivideo->SiS_Pr, 0x20);
+	SiS_SetCH701x(&ivideo->SiS_Pr, (temp1 << 8) | 0x49);
         temp1 = 0;
 	if(temp2 & 0x02) temp1 |= 0x01;
 	if(temp2 & 0x10) temp1 |= 0x01;
@@ -3123,13 +2959,13 @@
 	switch(temp1) {
 	case 0x01:
 	     printk(KERN_INFO "%s CVBS output\n", stdstr);
-	     ivideo.vbflags |= TV_AVIDEO;
+	     ivideo->vbflags |= TV_AVIDEO;
 	     orSISIDXREG(SISCR, 0x32, 0x01);
 	     andSISIDXREG(SISCR, 0x32, ~0x06);
              break;
 	case 0x02:
 	     printk(KERN_INFO "%s SVIDEO output\n", stdstr);
-	     ivideo.vbflags |= TV_SVIDEO;
+	     ivideo->vbflags |= TV_SVIDEO;
 	     orSISIDXREG(SISCR, 0x32, 0x02);
 	     andSISIDXREG(SISCR, 0x32, ~0x05);
              break;
@@ -3142,336 +2978,171 @@
 	     andSISIDXREG(SISCR, 0x32, ~0x07);
 	}
 #endif
-
-   }
+    }
 }
 
-
 /* ------------------------ Heap routines -------------------------- */
 
-static int sisfb_heap_init(void)
+static u32 __devinit
+sisfb_getheapstart(struct sis_video_info *ivideo)
 {
-	SIS_OH *poh;
-	u8 temp=0;
-#ifdef CONFIG_FB_SIS_315
-	int            agp_enabled = 1;
-	u32            agp_size;
-	unsigned long *cmdq_baseport = 0;
-	unsigned long *read_port = 0;
-	unsigned long *write_port = 0;
-	SIS_CMDTYPE    cmd_type;
-#ifndef AGPOFF
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-	struct agp_kern_info  *agp_info;
-	struct agp_memory     *agp;
-#else
-	agp_kern_info  *agp_info;
-	agp_memory     *agp;
-#endif
-	u32            agp_phys;
-#endif
-#endif
-/*     The heap start is either set manually using the "mem" parameter, or
- *     defaults as follows:
- *     -) If more than 16MB videoRAM available, let our heap start at 12MB.
- *     -) If more than  8MB videoRAM available, let our heap start at  8MB.
- *     -) If 4MB or less is available, let it start at 4MB.
- *     This is for avoiding a clash with X driver which uses the beginning
- *     of the videoRAM. To limit size of X framebuffer, use Option MaxXFBMem
- *     in XF86Config-4.
- *     The heap start can also be specified by parameter "mem" when starting the sisfb
- *     driver. sisfb mem=1024 lets heap starts at 1MB, etc.
- *
- *     On the 315 and Xabre series, the default is a 1MB heap since DRI is not
- *     supported there.
- */
-     if ((!sisfb_mem) || (sisfb_mem > (ivideo.video_size/1024))) {
-        if(sisvga_engine == SIS_300_VGA) {
-           if (ivideo.video_size > 0x1000000) {
-	        ivideo.heapstart = 0xc00000;
-	   } else if (ivideo.video_size > 0x800000) {
-	        ivideo.heapstart = 0x800000;
+	u32 ret = ivideo->sisfb_parm_mem * 1024;
+	u32 max = ivideo->video_size - ivideo->hwcursor_size;
+	u32 def;
+
+	/* Calculate heap start = end of memory for console
+	 *
+	 * CCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDDDDDHHHHQQQQQQQQQQ
+	 * C = console, D = heap, H = HWCursor, Q = cmd-queue
+	 *
+	 * Basically given by "mem" parameter
+	 *
+	 * maximum = videosize - cmd_queue - hwcursor
+	 *           (results in a heap of size 0)
+	 * default = SiS 300: depends on videosize
+	 *           SiS 315/330: 32k below max
+	 */
+
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
+	   max -= TURBO_QUEUE_AREA_SIZE;
+	   if(ivideo->video_size > 0x1000000) {
+	      def = 0xc00000;
+	   } else if(ivideo->video_size > 0x800000) {
+	      def = 0x800000;
 	   } else {
-		ivideo.heapstart = 0x400000;
+	      def = 0x400000;
 	   }
 	} else {
-	   ivideo.heapstart = ivideo.video_size - 0x100000;
+	   max -= COMMAND_QUEUE_AREA_SIZE;
+	   def = max - 0x8000;
 	}
-     } else {
-           ivideo.heapstart = sisfb_mem * 1024;
-     }
-     sisfb_heap_start = (unsigned long) (ivideo.video_vbase + ivideo.heapstart);
-     printk(KERN_INFO "sisfb: Memory heap starting at %dK\n",
-     					(int)(ivideo.heapstart / 1024));
 
-     sisfb_heap_end = (unsigned long) ivideo.video_vbase + ivideo.video_size;
-     sisfb_heap_size = sisfb_heap_end - sisfb_heap_start;
+        if((!ret) || (ret > max) || (ivideo->cardnumber != 0)) {
+	   ret = def;
+        }
 
-#ifdef CONFIG_FB_SIS_315
-     if (sisvga_engine == SIS_315_VGA) {
-        /* Now initialize the 315/330 series' command queue mode.
-	 * On 315, there are three queue modes available which
-	 * are chosen by setting bits 7:5 in SR26:
-	 * 1. MMIO queue mode (bit 5, 0x20). The hardware will keep
-	 *    track of the queue, the FIFO, command parsing and so
-	 *    on. This is the one comparable to the 300 series.
-	 * 2. VRAM queue mode (bit 6, 0x40). In this case, one will
-	 *    have to do queue management himself. Register 0x85c4 will
-	 *    hold the location of the next free queue slot, 0x85c8
-	 *    is the "queue read pointer" whose way of working is
-	 *    unknown to me. Anyway, this mode would require a
-	 *    translation of the MMIO commands to some kind of
-	 *    accelerator assembly and writing these commands
-	 *    to the memory location pointed to by 0x85c4.
-	 *    We will not use this, as nobody knows how this
-	 *    "assembly" works, and as it would require a complete
-	 *    re-write of the accelerator code.
-	 * 3. AGP queue mode (bit 7, 0x80). Works as 2., but keeps the
-	 *    queue in AGP memory space.
-	 *
-	 * SR26 bit 4 is called "Bypass H/W queue".
-	 * SR26 bit 1 is called "Enable Command Queue Auto Correction"
-	 * SR26 bit 0 resets the queue
-	 * Size of queue memory is encoded in bits 3:2 like this:
-	 *    00  (0x00)  512K
-	 *    01  (0x04)  1M
-	 *    10  (0x08)  2M
-	 *    11  (0x0C)  4M
-	 * The queue location is to be written to 0x85C0.
-	 *
-         */
-	cmdq_baseport = (unsigned long *)(ivideo.mmio_vbase + MMIO_QUEUE_PHYBASE);
-	write_port    = (unsigned long *)(ivideo.mmio_vbase + MMIO_QUEUE_WRITEPORT);
-	read_port     = (unsigned long *)(ivideo.mmio_vbase + MMIO_QUEUE_READPORT);
-
-	DPRINTK("AGP base: 0x%p, read: 0x%p, write: 0x%p\n", cmdq_baseport, read_port, write_port);
-
-	agp_size  = COMMAND_QUEUE_AREA_SIZE;
-
-#ifndef AGPOFF
-	if (sisfb_queuemode == AGP_CMD_QUEUE) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-		agp_info = vmalloc(sizeof(*agp_info));
-		memset((void*)agp_info, 0x00, sizeof(*agp_info));
-#else
-		agp_info = vmalloc(sizeof(agp_kern_info));
-		memset((void*)agp_info, 0x00, sizeof(agp_kern_info));
-#endif
-		agp_copy_info(agp_info);
+	return ret;
+}
 
-		agp_backend_acquire();
+static int __devinit
+sisfb_heap_init(struct sis_video_info *ivideo)
+{
+     SIS_OH *poh;
 
-		agp = agp_allocate_memory(COMMAND_QUEUE_AREA_SIZE/PAGE_SIZE,
-					  AGP_NORMAL_MEMORY);
-		if (agp == NULL) {
-			DPRINTK("sisfb: Allocating AGP buffer failed.\n");
-			agp_enabled = 0;
-		} else {
-			if (agp_bind_memory(agp, agp->pg_start) != 0) {
-				DPRINTK("sisfb: AGP: Failed to bind memory\n");
-				/* TODO: Free AGP memory here */
-				agp_enabled = 0;
-			} else {
-				agp_enable(0);
-			}
-		}
-	}
-#else
-	agp_enabled = 0;
-#endif
+     ivideo->heapstart = ivideo->sisfb_mem = sisfb_getheapstart(ivideo);
 
-	/* Now select the queue mode */
+     ivideo->sisfb_heap_start = ivideo->video_vbase + ivideo->heapstart;
+     ivideo->sisfb_heap_end   = ivideo->video_vbase + ivideo->video_size;
 
-	if ((agp_enabled) && (sisfb_queuemode == AGP_CMD_QUEUE)) {
-		cmd_type = AGP_CMD_QUEUE;
-		printk(KERN_INFO "sisfb: Using AGP queue mode\n");
-/*	} else if (sisfb_heap_size >= COMMAND_QUEUE_AREA_SIZE)  */
-        } else if (sisfb_queuemode == VM_CMD_QUEUE) {
-		cmd_type = VM_CMD_QUEUE;
-		printk(KERN_INFO "sisfb: Using VRAM queue mode\n");
-	} else {
-		printk(KERN_INFO "sisfb: Using MMIO queue mode\n");
-		cmd_type = MMIO_CMD;
-	}
+     /* Initialize command queue (We use MMIO only) */
 
-	switch (agp_size) {
-	   case 0x80000:
-		temp = SIS_CMD_QUEUE_SIZE_512k;
-		break;
-	   case 0x100000:
-		temp = SIS_CMD_QUEUE_SIZE_1M;
-		break;
-	   case 0x200000:
-		temp = SIS_CMD_QUEUE_SIZE_2M;
-		break;
-	   case 0x400000:
-		temp = SIS_CMD_QUEUE_SIZE_4M;
-		break;
-	}
+#ifdef CONFIG_FB_SIS_315
+     if(ivideo->sisvga_engine == SIS_315_VGA) {
+        u32 tempq = 0;
+	u8  temp = 0;
 
-	switch (cmd_type) {
-	   case AGP_CMD_QUEUE:
-#ifndef AGPOFF
-		DPRINTK("sisfb: AGP buffer base = 0x%lx, offset = 0x%x, size = %dK\n",
-			agp_info->aper_base, agp->physical, agp_size/1024);
+        ivideo->sisfb_heap_end -= COMMAND_QUEUE_AREA_SIZE;
 
-		agp_phys = agp_info->aper_base + agp->physical;
+	outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_THRESHOLD, COMMAND_QUEUE_THRESHOLD);
+	outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, SIS_CMD_QUEUE_RESET);
 
-		outSISIDXREG(SISCR,  IND_SIS_AGP_IO_PAD, 0);
-		outSISIDXREG(SISCR,  IND_SIS_AGP_IO_PAD, SIS_AGP_2X);
+	tempq = MMIO_IN32(ivideo->mmio_vbase, MMIO_QUEUE_READPORT);
+	MMIO_OUT32(ivideo->mmio_vbase, MMIO_QUEUE_WRITEPORT, tempq);
 
-                outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_THRESHOLD, COMMAND_QUEUE_THRESHOLD);
+	temp = SIS_CMD_QUEUE_SIZE_512k;
+	temp |= (SIS_MMIO_CMD_ENABLE | SIS_CMD_AUTO_CORR);
+	outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, temp);
 
-		outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, SIS_CMD_QUEUE_RESET);
+	tempq = (u32)(ivideo->video_size - COMMAND_QUEUE_AREA_SIZE);
+	MMIO_OUT32(ivideo->mmio_vbase, MMIO_QUEUE_PHYBASE, tempq);
 
-		*write_port = *read_port;
+	ivideo->caps |= MMIO_CMD_QUEUE_CAP;
+     }
+#endif
 
-		temp |= SIS_AGP_CMDQUEUE_ENABLE;
-		outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, temp);
+#ifdef CONFIG_FB_SIS_300
+     if(ivideo->sisvga_engine == SIS_300_VGA) {
+     	unsigned long tqueue_pos;
+	u8 tq_state;
 
-		*cmdq_baseport = agp_phys;
+	ivideo->sisfb_heap_end -= TURBO_QUEUE_AREA_SIZE;
 
-		sisfb_caps |= AGP_CMD_QUEUE_CAP;
-#endif
-		break;
+	tqueue_pos = (ivideo->video_size - TURBO_QUEUE_AREA_SIZE) / (64 * 1024);
 
-	   case VM_CMD_QUEUE:
-		sisfb_heap_end -= COMMAND_QUEUE_AREA_SIZE;
-		sisfb_heap_size -= COMMAND_QUEUE_AREA_SIZE;
+	inSISIDXREG(SISSR, IND_SIS_TURBOQUEUE_SET, tq_state);
+	tq_state |= 0xf0;
+	tq_state &= 0xfc;
+	tq_state |= (u8)(tqueue_pos >> 8);
+	outSISIDXREG(SISSR, IND_SIS_TURBOQUEUE_SET, tq_state);
 
-		outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_THRESHOLD, COMMAND_QUEUE_THRESHOLD);
+	outSISIDXREG(SISSR, IND_SIS_TURBOQUEUE_ADR, (u8)(tqueue_pos & 0xff));
 
-		outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, SIS_CMD_QUEUE_RESET);
+	ivideo->caps |= TURBO_QUEUE_CAP;
+     }
+#endif
 
-		*write_port = *read_port;
+     /* Reserve memory for the HWCursor */
+     ivideo->sisfb_heap_end -= ivideo->hwcursor_size;
+     ivideo->hwcursor_vbase = ivideo->sisfb_heap_end;
+     ivideo->caps |= HW_CURSOR_CAP;
 
-		temp |= SIS_VRAM_CMDQUEUE_ENABLE;
-		outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, temp);
+     ivideo->sisfb_heap_size = ivideo->sisfb_heap_end - ivideo->sisfb_heap_start;
 
-		*cmdq_baseport = ivideo.video_size - COMMAND_QUEUE_AREA_SIZE;
+     if(ivideo->cardnumber == 0) {
 
-		sisfb_caps |= VM_CMD_QUEUE_CAP;
+     	printk(KERN_INFO "sisfb: Memory heap starting at %dK, size %dK\n",
+     		(int)(ivideo->heapstart / 1024), (int)(ivideo->sisfb_heap_size / 1024));
 
-		DPRINTK("sisfb: VM Cmd Queue offset = 0x%lx, size is %dK\n",
-			*cmdq_baseport, COMMAND_QUEUE_AREA_SIZE/1024);
-		break;
+	sisfb_heap.vinfo = ivideo;
 
-	   default:  /* MMIO */
-	   	sisfb_heap_end -= COMMAND_QUEUE_AREA_SIZE;
-		sisfb_heap_size -= COMMAND_QUEUE_AREA_SIZE;
+     	sisfb_heap.poha_chain = NULL;
+     	sisfb_heap.poh_freelist = NULL;
 
-		outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_THRESHOLD, COMMAND_QUEUE_THRESHOLD);
-		outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, SIS_CMD_QUEUE_RESET);
+     	poh = sisfb_poh_new_node();
+     	if(poh == NULL) return 1;
 
-		*write_port = *read_port;
+     	poh->poh_next = &sisfb_heap.oh_free;
+     	poh->poh_prev = &sisfb_heap.oh_free;
+     	poh->size = ivideo->sisfb_heap_size;
+     	poh->offset = ivideo->heapstart;
 
-		/* Set Auto_Correction bit */
-		temp |= (SIS_MMIO_CMD_ENABLE | SIS_CMD_AUTO_CORR);
-		outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, temp);
+     	sisfb_heap.oh_free.poh_next = poh;
+     	sisfb_heap.oh_free.poh_prev = poh;
+     	sisfb_heap.oh_free.size = 0;
+     	sisfb_heap.max_freesize = poh->size;
 
-		*cmdq_baseport = ivideo.video_size - COMMAND_QUEUE_AREA_SIZE;
+     	sisfb_heap.oh_used.poh_next = &sisfb_heap.oh_used;
+     	sisfb_heap.oh_used.poh_prev = &sisfb_heap.oh_used;
+     	sisfb_heap.oh_used.size = SENTINEL;
 
-		sisfb_caps |= MMIO_CMD_QUEUE_CAP;
+     } else {
 
-		DPRINTK("sisfb: MMIO Cmd Queue offset = 0x%lx, size is %dK\n",
-			*cmdq_baseport, COMMAND_QUEUE_AREA_SIZE/1024);
-		break;
-	}
-     } /* sisvga_engine = 315 */
-#endif
+        printk(KERN_INFO "Skipped heap initialization for secondary cards\n");
 
-#ifdef CONFIG_FB_SIS_300
-     if (sisvga_engine == SIS_300_VGA) {
-  	    /* Now initialize TurboQueue. TB is always located at the very
-	     * top of the video RAM. */
-	    if (sisfb_heap_size >= TURBO_QUEUE_AREA_SIZE) {
-		unsigned int  tqueue_pos;
-		u8 tq_state;
-
-		tqueue_pos = (ivideo.video_size -
-		       TURBO_QUEUE_AREA_SIZE) / (64 * 1024);
-
-		temp = (u8) (tqueue_pos & 0xff);
-
-		inSISIDXREG(SISSR, IND_SIS_TURBOQUEUE_SET, tq_state);
-		tq_state |= 0xf0;
-		tq_state &= 0xfc;
-		tq_state |= (u8) (tqueue_pos >> 8);
-		outSISIDXREG(SISSR, IND_SIS_TURBOQUEUE_SET, tq_state);
-
-		outSISIDXREG(SISSR, IND_SIS_TURBOQUEUE_ADR, temp);
-
-		sisfb_caps |= TURBO_QUEUE_CAP;
-
-		sisfb_heap_end -= TURBO_QUEUE_AREA_SIZE;
-		sisfb_heap_size -= TURBO_QUEUE_AREA_SIZE;
-		DPRINTK("sisfb: TurboQueue start at 0x%lx, size is %dK\n",
-			sisfb_heap_end, TURBO_QUEUE_AREA_SIZE/1024);
-	    }
      }
-#endif
-     /* Now reserve memory for the HWCursor. It is always located at the very
-        top of the videoRAM, right below the TB memory area (if used). */
-     if (sisfb_heap_size >= sisfb_hwcursor_size) {
-		sisfb_heap_end -= sisfb_hwcursor_size;
-		sisfb_heap_size -= sisfb_hwcursor_size;
-		sisfb_hwcursor_vbase = sisfb_heap_end;
 
-		sisfb_caps |= HW_CURSOR_CAP;
-
-		DPRINTK("sisfb: Hardware Cursor start at 0x%lx, size is %dK\n",
-			sisfb_heap_end, sisfb_hwcursor_size/1024);
-     }
+     return 0;
+}
 
-     sisfb_heap.poha_chain = NULL;
-     sisfb_heap.poh_freelist = NULL;
-
-     poh = sisfb_poh_new_node();
-
-     if(poh == NULL)  return 1;
-	
-     poh->poh_next = &sisfb_heap.oh_free;
-     poh->poh_prev = &sisfb_heap.oh_free;
-     poh->size = sisfb_heap_end - sisfb_heap_start + 1;
-     poh->offset = sisfb_heap_start - (unsigned long) ivideo.video_vbase;
-
-     DPRINTK("sisfb: Heap start:0x%p, end:0x%p, len=%dk\n",
-		(char *) sisfb_heap_start, (char *) sisfb_heap_end,
-		(unsigned int) poh->size / 1024);
-
-     DPRINTK("sisfb: First Node offset:0x%x, size:%dk\n",
-		(unsigned int) poh->offset, (unsigned int) poh->size / 1024);
-
-     sisfb_heap.oh_free.poh_next = poh;
-     sisfb_heap.oh_free.poh_prev = poh;
-     sisfb_heap.oh_free.size = 0;
-     sisfb_heap.max_freesize = poh->size;
-
-     sisfb_heap.oh_used.poh_next = &sisfb_heap.oh_used;
-     sisfb_heap.oh_used.poh_prev = &sisfb_heap.oh_used;
-     sisfb_heap.oh_used.size = SENTINEL;
-
-     return 0;
-}
-
-static SIS_OH *sisfb_poh_new_node(void)
+static SIS_OH *
+sisfb_poh_new_node(void)
 {
 	int           i;
 	unsigned long cOhs;
 	SIS_OHALLOC   *poha;
 	SIS_OH        *poh;
 
-	if (sisfb_heap.poh_freelist == NULL) {
-		poha = kmalloc(OH_ALLOC_SIZE, GFP_KERNEL);
+	if(sisfb_heap.poh_freelist == NULL) {
+		poha = kmalloc(SIS_OH_ALLOC_SIZE, GFP_KERNEL);
 		if(!poha) return NULL;
 
 		poha->poha_next = sisfb_heap.poha_chain;
 		sisfb_heap.poha_chain = poha;
 
-		cOhs = (OH_ALLOC_SIZE - sizeof(SIS_OHALLOC)) / sizeof(SIS_OH) + 1;
+		cOhs = (SIS_OH_ALLOC_SIZE - sizeof(SIS_OHALLOC)) / sizeof(SIS_OH) + 1;
 
 		poh = &poha->aoh[0];
-		for (i = cOhs - 1; i != 0; i--) {
+		for(i = cOhs - 1; i != 0; i--) {
 			poh->poh_next = poh + 1;
 			poh = poh + 1;
 		}
@@ -3486,21 +3157,22 @@
 	return (poh);
 }
 
-static SIS_OH *sisfb_poh_allocate(unsigned long size)
+static SIS_OH *
+sisfb_poh_allocate(u32 size)
 {
 	SIS_OH *pohThis;
 	SIS_OH *pohRoot;
 	int     bAllocated = 0;
 
-	if (size > sisfb_heap.max_freesize) {
-		DPRINTK("sisfb: Can't allocate %dk size on offscreen\n",
+	if(size > sisfb_heap.max_freesize) {
+		DPRINTK("sisfb: Can't allocate %dk video memory\n",
 			(unsigned int) size / 1024);
 		return (NULL);
 	}
 
 	pohThis = sisfb_heap.oh_free.poh_next;
 
-	while (pohThis != &sisfb_heap.oh_free) {
+	while(pohThis != &sisfb_heap.oh_free) {
 		if (size <= pohThis->size) {
 			bAllocated = 1;
 			break;
@@ -3508,19 +3180,19 @@
 		pohThis = pohThis->poh_next;
 	}
 
-	if (!bAllocated) {
-		DPRINTK("sisfb: Can't allocate %dk size on offscreen\n",
+	if(!bAllocated) {
+		DPRINTK("sisfb: Can't allocate %dk video memory\n",
 			(unsigned int) size / 1024);
 		return (NULL);
 	}
 
-	if (size == pohThis->size) {
+	if(size == pohThis->size) {
 		pohRoot = pohThis;
 		sisfb_delete_node(pohThis);
 	} else {
 		pohRoot = sisfb_poh_new_node();
 
-		if (pohRoot == NULL) {
+		if(pohRoot == NULL) {
 			return (NULL);
 		}
 
@@ -3539,7 +3211,8 @@
 	return (pohRoot);
 }
 
-static void sisfb_delete_node(SIS_OH *poh)
+static void
+sisfb_delete_node(SIS_OH *poh)
 {
 	SIS_OH *poh_prev;
 	SIS_OH *poh_next;
@@ -3549,10 +3222,10 @@
 
 	poh_prev->poh_next = poh_next;
 	poh_next->poh_prev = poh_prev;
-
 }
 
-static void sisfb_insert_node(SIS_OH *pohList, SIS_OH *poh)
+static void
+sisfb_insert_node(SIS_OH *pohList, SIS_OH *poh)
 {
 	SIS_OH *pohTemp;
 
@@ -3565,15 +3238,16 @@
 	poh->poh_next = pohTemp;
 }
 
-static SIS_OH *sisfb_poh_free(unsigned long base)
+static SIS_OH *
+sisfb_poh_free(u32 base)
 {
 	SIS_OH *pohThis;
 	SIS_OH *poh_freed;
 	SIS_OH *poh_prev;
 	SIS_OH *poh_next;
-	unsigned long ulUpper;
-	unsigned long ulLower;
-	int foundNode = 0;
+	u32     ulUpper;
+	u32     ulLower;
+	int     foundNode = 0;
 
 	poh_freed = sisfb_heap.oh_used.poh_next;
 
@@ -3586,7 +3260,7 @@
 		poh_freed = poh_freed->poh_next;
 	}
 
-	if (!foundNode)  return (NULL);
+	if(!foundNode) return(NULL);
 
 	sisfb_heap.max_freesize += poh_freed->size;
 
@@ -3596,12 +3270,10 @@
 
 	pohThis = sisfb_heap.oh_free.poh_next;
 
-	while (pohThis != &sisfb_heap.oh_free) {
-		if (pohThis->offset == ulUpper) {
+	while(pohThis != &sisfb_heap.oh_free) {
+		if(pohThis->offset == ulUpper) {
 			poh_next = pohThis;
-		}
-			else if ((pohThis->offset + pohThis->size) ==
-				 ulLower) {
+		} else if((pohThis->offset + pohThis->size) == ulLower) {
 			poh_prev = pohThis;
 		}
 		pohThis = pohThis->poh_next;
@@ -3609,65 +3281,73 @@
 
 	sisfb_delete_node(poh_freed);
 
-	if (poh_prev && poh_next) {
+	if(poh_prev && poh_next) {
 		poh_prev->size += (poh_freed->size + poh_next->size);
 		sisfb_delete_node(poh_next);
 		sisfb_free_node(poh_freed);
 		sisfb_free_node(poh_next);
-		return (poh_prev);
+		return(poh_prev);
 	}
 
-	if (poh_prev) {
+	if(poh_prev) {
 		poh_prev->size += poh_freed->size;
 		sisfb_free_node(poh_freed);
-		return (poh_prev);
+		return(poh_prev);
 	}
 
-	if (poh_next) {
+	if(poh_next) {
 		poh_next->size += poh_freed->size;
 		poh_next->offset = poh_freed->offset;
 		sisfb_free_node(poh_freed);
-		return (poh_next);
+		return(poh_next);
 	}
 
 	sisfb_insert_node(&sisfb_heap.oh_free, poh_freed);
 
-	return (poh_freed);
+	return(poh_freed);
 }
 
-static void sisfb_free_node(SIS_OH *poh)
+static void
+sisfb_free_node(SIS_OH *poh)
 {
 	if(poh == NULL) return;
 
 	poh->poh_next = sisfb_heap.poh_freelist;
 	sisfb_heap.poh_freelist = poh;
-
 }
 
-void sis_malloc(struct sis_memreq *req)
+void
+sis_malloc(struct sis_memreq *req)
 {
-	SIS_OH *poh;
+	struct sis_video_info *ivideo = sisfb_heap.vinfo;
+	SIS_OH *poh = NULL;
 
-	poh = sisfb_poh_allocate(req->size);
+	if((ivideo) && (!ivideo->havenoheap)) {
+	   poh = sisfb_poh_allocate((u32)req->size);
+	}
 
 	if(poh == NULL) {
-		req->offset = 0;
-		req->size = 0;
-		DPRINTK("sisfb: Video RAM allocation failed\n");
+	   req->offset = req->size = 0;
+	   DPRINTK("sisfb: Video RAM allocation failed\n");
 	} else {
-		DPRINTK("sisfb: Video RAM allocation succeeded: 0x%p\n",
-			(char *) (poh->offset + (unsigned long) ivideo.video_vbase));
-
-		req->offset = poh->offset;
-		req->size = poh->size;
+	   req->offset = poh->offset;
+	   req->size = poh->size;
+	   DPRINTK("sisfb: Video RAM allocation succeeded: 0x%lx\n",
+	   	    (poh->offset + ivideo->video_vbase));
 	}
 }
 
-void sis_free(unsigned long base)
+/* sis_free: u32 because "base" is offset inside video ram, can never be >4GB */
+
+void
+sis_free(u32 base)
 {
+	struct sis_video_info *ivideo = sisfb_heap.vinfo;
 	SIS_OH *poh;
 
-	poh = sisfb_poh_free(base);
+	if((!ivideo) || (ivideo->havenoheap)) return;
+
+	poh = sisfb_poh_free((u32)base);
 
 	if(poh == NULL) {
 		DPRINTK("sisfb: sisfb_poh_free() failed at base 0x%x\n",
@@ -3677,125 +3357,313 @@
 
 /* --------------------- SetMode routines ------------------------- */
 
-static void sisfb_pre_setmode(void)
+static void
+sisfb_pre_setmode(struct sis_video_info *ivideo)
 {
-	u8 cr30 = 0, cr31 = 0, cr33 = 0, cr35 = 0;
+	u8 cr30 = 0, cr31 = 0, cr33 = 0, cr35 = 0, cr38 = 0;
+	int tvregnum = 0;
 
-	ivideo.currentvbflags &= (VB_VIDEOBRIDGE | VB_DISPTYPE_DISP2);
+	ivideo->currentvbflags &= (VB_VIDEOBRIDGE | VB_DISPTYPE_DISP2);
 
 	inSISIDXREG(SISCR, 0x31, cr31);
 	cr31 &= ~0x60;
 	cr31 |= 0x04;
 
-	cr33 = sisfb_rate_idx & 0x0F;
+	cr33 = ivideo->rate_idx & 0x0F;
+
+#ifdef CONFIG_FB_SIS_315
+	if(ivideo->sisvga_engine == SIS_315_VGA) {
+	   if(ivideo->chip >= SIS_661) {
+	      inSISIDXREG(SISCR, 0x38, cr38);
+	      cr38 &= ~0x07;  /* Clear LCDA/DualEdge and YPbPr bits */
+	   } else {
+	      tvregnum = 0x38;
+	      inSISIDXREG(SISCR, tvregnum, cr38);
+	      cr38 &= ~0x3b;  /* Clear LCDA/DualEdge and YPbPr bits */
+	   }
+	}
+#endif
+#ifdef CONFIG_FB_SIS_300
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
+	   tvregnum = 0x35;
+	   inSISIDXREG(SISCR, tvregnum, cr38);
+	}
+#endif
+
+	SiS_SetEnableDstn(&ivideo->SiS_Pr, FALSE);
+	SiS_SetEnableFstn(&ivideo->SiS_Pr, FALSE);
 
-	SiS_SetEnableDstn(&SiS_Pr, FALSE);
-	SiS_SetEnableFstn(&SiS_Pr, FALSE);
+	switch(ivideo->currentvbflags & VB_DISPTYPE_DISP2) {
 
-	switch (ivideo.currentvbflags & VB_DISPTYPE_DISP2) {
 	   case CRT2_TV:
-		ivideo.disp_state = DISPTYPE_TV;
-		if (ivideo.vbflags & TV_SVIDEO) {
-			cr30 = (SIS_VB_OUTPUT_SVIDEO | SIS_SIMULTANEOUS_VIEW_ENABLE);
-			ivideo.currentvbflags |= TV_SVIDEO;
-			ivideo.TV_plug = TVPLUG_SVIDEO;
-		} else if (ivideo.vbflags & TV_AVIDEO) {
-			cr30 = (SIS_VB_OUTPUT_COMPOSITE | SIS_SIMULTANEOUS_VIEW_ENABLE);
-			ivideo.currentvbflags |= TV_AVIDEO;
-			ivideo.TV_plug = TVPLUG_COMPOSITE;
-		} else if (ivideo.vbflags & TV_SCART) {
-			cr30 = (SIS_VB_OUTPUT_SCART | SIS_SIMULTANEOUS_VIEW_ENABLE);
-			ivideo.currentvbflags |= TV_SCART;
-			ivideo.TV_plug = TVPLUG_SCART;
-		}
-		cr31 |= SIS_DRIVER_MODE;
-
-		if(!(ivideo.vbflags & TV_HIVISION)) {
-	        	if (ivideo.vbflags & TV_PAL) {
-		 		cr31 |= 0x01;
-				cr35 |= 0x01;
-				ivideo.currentvbflags |= TV_PAL;
-				ivideo.TV_type = TVMODE_PAL;
-                	} else {
-		       		cr31 &= ~0x01;
-				cr35 &= ~0x01;
-				ivideo.currentvbflags |= TV_NTSC;
-				ivideo.TV_type = TVMODE_NTSC;
-			}
-		}
-		break;
+	      cr38 &= ~0xc0;   /* Clear PAL-M / PAL-N bits */
+	      if((ivideo->vbflags & TV_YPBPR) && (ivideo->vbflags & (VB_301C|VB_301LV|VB_302LV))) {
+#ifdef CONFIG_FB_SIS_315
+	         if(ivideo->chip >= SIS_661) {
+	            cr38 |= 0x04;
+	            if(ivideo->vbflags & TV_YPBPR525P)       cr35 |= 0x20;
+		    else if(ivideo->vbflags & TV_YPBPR750P)  cr35 |= 0x40;
+		    else if(ivideo->vbflags & TV_YPBPR1080I) cr35 |= 0x60;
+		    cr30 |= SIS_SIMULTANEOUS_VIEW_ENABLE;
+		    cr35 &= ~0x01;
+		    ivideo->currentvbflags |= (TV_YPBPR | (ivideo->vbflags & TV_YPBPRALL));
+	         } else if(ivideo->sisvga_engine == SIS_315_VGA) {
+	            cr30 |= (0x80 | SIS_SIMULTANEOUS_VIEW_ENABLE);
+		    cr38 |= 0x08;
+	            if(ivideo->vbflags & TV_YPBPR525P)       cr38 |= 0x10;
+		    else if(ivideo->vbflags & TV_YPBPR750P)  cr38 |= 0x20;
+		    else if(ivideo->vbflags & TV_YPBPR1080I) cr38 |= 0x30;
+		    cr31 &= ~0x01;
+		    ivideo->currentvbflags |= (TV_YPBPR | (ivideo->vbflags & TV_YPBPRALL));
+	         }
+#endif
+	      } else if((ivideo->vbflags & TV_HIVISION) && (ivideo->vbflags & (VB_301|VB_301B|VB_302B))) {
+	         if(ivideo->chip >= SIS_661) {
+	            cr38 |= 0x04;
+	            cr35 |= 0x60;
+	         } else {
+	            cr30 |= 0x80;
+	         }
+		 cr30 |= SIS_SIMULTANEOUS_VIEW_ENABLE;
+	         cr31 |= 0x01;
+	         cr35 |= 0x01;
+		 ivideo->currentvbflags |= TV_HIVISION;
+	      } else if(ivideo->vbflags & TV_SCART) {
+		 cr30 = (SIS_VB_OUTPUT_SCART | SIS_SIMULTANEOUS_VIEW_ENABLE);
+		 cr31 |= 0x01;
+		 cr35 |= 0x01;
+		 ivideo->currentvbflags |= TV_SCART;
+	      } else {
+		 if(ivideo->vbflags & TV_SVIDEO) {
+		    cr30 = (SIS_VB_OUTPUT_SVIDEO | SIS_SIMULTANEOUS_VIEW_ENABLE);
+		    ivideo->currentvbflags |= TV_SVIDEO;
+		 }
+		 if(ivideo->vbflags & TV_AVIDEO) {
+		    cr30 = (SIS_VB_OUTPUT_COMPOSITE | SIS_SIMULTANEOUS_VIEW_ENABLE);
+		    ivideo->currentvbflags |= TV_AVIDEO;
+		 }
+	      }
+	      cr31 |= SIS_DRIVER_MODE;
+
+	      if(ivideo->vbflags & (TV_AVIDEO|TV_SVIDEO)) {
+	         if(ivideo->vbflags & TV_PAL) {
+		    cr31 |= 0x01; cr35 |= 0x01;
+		    ivideo->currentvbflags |= TV_PAL;
+		    if(ivideo->vbflags & TV_PALM) {
+		       cr38 |= 0x40; cr35 |= 0x04;
+		       ivideo->currentvbflags |= TV_PALM;
+		    } else if(ivideo->vbflags & TV_PALN) {
+		       cr38 |= 0x80; cr35 |= 0x08;
+		       ivideo->currentvbflags |= TV_PALN;
+	  	    }
+                 } else {
+		    cr31 &= ~0x01; cr35 &= ~0x01;
+		    ivideo->currentvbflags |= TV_NTSC;
+		    if(ivideo->vbflags & TV_NTSCJ) {
+		       cr38 |= 0x40; cr35 |= 0x02;
+		       ivideo->currentvbflags |= TV_NTSCJ;
+	 	    }
+		 }
+	      }
+	      break;
+
 	   case CRT2_LCD:
-		ivideo.disp_state = DISPTYPE_LCD;
-		cr30  = (SIS_VB_OUTPUT_LCD | SIS_SIMULTANEOUS_VIEW_ENABLE);
-		cr31 |= SIS_DRIVER_MODE;
-		SiS_SetEnableDstn(&SiS_Pr, sisfb_dstn);
-	        SiS_SetEnableFstn(&SiS_Pr, sisfb_fstn);
-		break;
+	      cr30  = (SIS_VB_OUTPUT_LCD | SIS_SIMULTANEOUS_VIEW_ENABLE);
+	      cr31 |= SIS_DRIVER_MODE;
+	      SiS_SetEnableDstn(&ivideo->SiS_Pr, ivideo->sisfb_dstn);
+	      SiS_SetEnableFstn(&ivideo->SiS_Pr, ivideo->sisfb_fstn);
+	      break;
+
 	   case CRT2_VGA:
-		ivideo.disp_state = DISPTYPE_CRT2;
-		cr30 = (SIS_VB_OUTPUT_CRT2 | SIS_SIMULTANEOUS_VIEW_ENABLE);
-		cr31 |= SIS_DRIVER_MODE;
-		if(sisfb_nocrt2rate) {
-			cr33 |= (sisbios_mode[sisfb_mode_idx].rate_idx << 4);
-		} else {
-			cr33 |= ((sisfb_rate_idx & 0x0F) << 4);
-		}
-		break;
+	      cr30 = (SIS_VB_OUTPUT_CRT2 | SIS_SIMULTANEOUS_VIEW_ENABLE);
+	      cr31 |= SIS_DRIVER_MODE;
+	      if(ivideo->sisfb_nocrt2rate) {
+		 cr33 |= (sisbios_mode[ivideo->sisfb_mode_idx].rate_idx << 4);
+	      } else {
+		 cr33 |= ((ivideo->rate_idx & 0x0F) << 4);
+	      }
+	      break;
+
 	   default:	/* disable CRT2 */
-		cr30 = 0x00;
-		cr31 |= (SIS_DRIVER_MODE | SIS_VB_OUTPUT_DISABLE);
+	      cr30 = 0x00;
+	      cr31 |= (SIS_DRIVER_MODE | SIS_VB_OUTPUT_DISABLE);
 	}
 
-	if(ivideo.chip >= SIS_661) {
-	   cr31 &= ~0x01;
-	   /* Leave overscan bit alone */
-	   setSISIDXREG(SISCR, 0x35, ~0x10, cr35);
-	}
-	outSISIDXREG(SISCR, IND_SIS_SCRATCH_REG_CR30, cr30);
-	outSISIDXREG(SISCR, IND_SIS_SCRATCH_REG_CR31, cr31);
-	outSISIDXREG(SISCR, IND_SIS_SCRATCH_REG_CR33, cr33);
+	outSISIDXREG(SISCR, 0x30, cr30);
+	outSISIDXREG(SISCR, 0x33, cr33);
 
+	if(ivideo->chip >= SIS_661) {
 #ifdef CONFIG_FB_SIS_315
-        if(sisvga_engine == SIS_315_VGA) {
-	   /* Clear LCDA and PAL-N/M bits */
-	   andSISIDXREG(SISCR,0x38,~0x03);
-	   if(ivideo.chip < SIS_661) {
-	      andSISIDXREG(SISCR,0x38,~0xc0);
-	   }
+	   cr31 &= ~0x01;                          /* Clear PAL flag (now in CR35) */
+	   setSISIDXREG(SISCR, 0x35, ~0x10, cr35); /* Leave overscan bit alone */
+	   cr38 &= 0x07;                           /* Use only LCDA and HiVision/YPbPr bits */
+	   setSISIDXREG(SISCR, 0x38, 0xf8, cr38);
+#endif
+	} else if(ivideo->chip != SIS_300) {
+	   outSISIDXREG(SISCR, tvregnum, cr38);
 	}
+	outSISIDXREG(SISCR, 0x31, cr31);
+
+	if(ivideo->accel) sisfb_syncaccel(ivideo);
+
+	ivideo->SiS_Pr.SiS_UseOEM = ivideo->sisfb_useoem;
+}
+
+/* Fix SR11 for 661 and later */
+#ifdef CONFIG_FB_SIS_315
+static void
+sisfb_fixup_SR11(struct sis_video_info *ivideo)
+{
+    u8  tmpreg;
+
+    if(ivideo->chip >= SIS_661) {
+       inSISIDXREG(SISSR,0x11,tmpreg);
+       if(tmpreg & 0x20) {
+          inSISIDXREG(SISSR,0x3e,tmpreg);
+	  tmpreg = (tmpreg + 1) & 0xff;
+	  outSISIDXREG(SISSR,0x3e,tmpreg);
+	  inSISIDXREG(SISSR,0x11,tmpreg);
+       }
+       if(tmpreg & 0xf0) {
+          andSISIDXREG(SISSR,0x11,0x0f);
+       }
+    }
+}
 #endif
 
-	if(ivideo.accel) sisfb_syncaccel();
+static void sisfb_set_TVxposoffset(struct sis_video_info *ivideo, int val)
+{
+   if(val > 32) val = 32;
+   if(val < -32) val = -32;
+   ivideo->tvxpos = val;
+
+   if(ivideo->sisfblocked) return;
+   if(!ivideo->modechanged) return;
+
+   if(ivideo->currentvbflags & CRT2_TV) {
+
+      if(ivideo->vbflags & VB_CHRONTEL) {
+
+	 int x = ivideo->tvx;
+
+	 switch(ivideo->chronteltype) {
+	 case 1:
+	     x += val;
+	     if(x < 0) x = 0;
+	     outSISIDXREG(SISSR,0x05,0x86);
+	     SiS_SetCH700x(&ivideo->SiS_Pr, (((x & 0xff) << 8) | 0x0a));
+	     SiS_SetCH70xxANDOR(&ivideo->SiS_Pr, (((x & 0x0100) << 1) | 0x08),0xFD);
+	     break;
+	 case 2:
+	     /* Not supported by hardware */
+	     break;
+	 }
+
+      } else if(ivideo->vbflags & VB_SISBRIDGE) {
+
+	 u8 p2_1f,p2_20,p2_2b,p2_42,p2_43;
+	 unsigned short temp;
 
-	SiS_Pr.SiS_UseOEM = sisfb_useoem;
+	 p2_1f = ivideo->p2_1f;
+	 p2_20 = ivideo->p2_20;
+	 p2_2b = ivideo->p2_2b;
+	 p2_42 = ivideo->p2_42;
+	 p2_43 = ivideo->p2_43;
+
+	 temp = p2_1f | ((p2_20 & 0xf0) << 4);
+	 temp += (val * 2);
+	 p2_1f = temp & 0xff;
+	 p2_20 = (temp & 0xf00) >> 4;
+	 p2_2b = ((p2_2b & 0x0f) + (val * 2)) & 0x0f;
+	 temp = p2_43 | ((p2_42 & 0xf0) << 4);
+	 temp += (val * 2);
+	 p2_43 = temp & 0xff;
+	 p2_42 = (temp & 0xf00) >> 4;
+	 outSISIDXREG(SISPART2,0x1f,p2_1f);
+	 setSISIDXREG(SISPART2,0x20,0x0F,p2_20);
+	 setSISIDXREG(SISPART2,0x2b,0xF0,p2_2b);
+	 setSISIDXREG(SISPART2,0x42,0x0F,p2_42);
+	 outSISIDXREG(SISPART2,0x43,p2_43);
+      }
+   }
 }
 
-static void sisfb_post_setmode(void)
+static void sisfb_set_TVyposoffset(struct sis_video_info *ivideo, int val)
+{
+   if(val > 32) val = 32;
+   if(val < -32) val = -32;
+   ivideo->tvypos = val;
+
+   if(ivideo->sisfblocked) return;
+   if(!ivideo->modechanged) return;
+
+   if(ivideo->currentvbflags & CRT2_TV) {
+
+      if(ivideo->vbflags & VB_CHRONTEL) {
+
+	 int y = ivideo->tvy;
+
+	 switch(ivideo->chronteltype) {
+	 case 1:
+	    y -= val;
+	    if(y < 0) y = 0;
+	    outSISIDXREG(SISSR,0x05,0x86);
+	    SiS_SetCH700x(&ivideo->SiS_Pr, (((y & 0xff) << 8) | 0x0b));
+	    SiS_SetCH70xxANDOR(&ivideo->SiS_Pr, ((y & 0x0100) | 0x08),0xFE);
+	    break;
+	 case 2:
+	    /* Not supported by hardware */
+	    break;
+	 }
+
+      } else if(ivideo->vbflags & VB_SISBRIDGE) {
+
+	 char p2_01, p2_02;
+	 val /= 2;
+	 p2_01 = ivideo->p2_01;
+	 p2_02 = ivideo->p2_02;
+
+	 p2_01 += val;
+	 p2_02 += val;
+	 while((p2_01 <= 0) || (p2_02 <= 0)) {
+	    p2_01 += 2;
+	    p2_02 += 2;
+	 }
+	 outSISIDXREG(SISPART2,0x01,p2_01);
+	 outSISIDXREG(SISPART2,0x02,p2_02);
+      }
+   }
+}
+
+static void
+sisfb_post_setmode(struct sis_video_info *ivideo)
 {
-	u8 reg;
 	BOOLEAN crt1isoff = FALSE;
+	BOOLEAN doit = TRUE;
+#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
+	u8 reg;
+#endif
 #ifdef CONFIG_FB_SIS_315
 	u8 reg1;
 #endif
-#ifdef CONFIG_FB_SIS_300
-	BOOLEAN doit = TRUE;
-#endif
-	/* We can't switch off CRT1 if bridge is in slave mode */
-	if(ivideo.vbflags & VB_VIDEOBRIDGE) {
-#ifdef CONFIG_FB_SIS_300
-		if(sisvga_engine == SIS_300_VGA) {
-			inSISIDXREG(SISPART1, 0x00, reg);
-			if((reg & 0xa0) == 0x20) {
-				doit = FALSE;
-			}
-		}
+
+	outSISIDXREG(SISSR,0x05,0x86);
+
+#ifdef CONFIG_FB_SIS_315
+	sisfb_fixup_SR11(ivideo);
 #endif
-	} else sisfb_crt1off = 0;
 
-	if(sisvga_engine == SIS_300_VGA) {
+	/* Now we actually HAVE changed the display mode */
+        ivideo->modechanged = 1;
+
+	/* We can't switch off CRT1 if bridge is in slave mode */
+	if(ivideo->vbflags & VB_VIDEOBRIDGE) {
+		if(sisfb_bridgeisslave(ivideo)) doit = FALSE;
+	} else ivideo->sisfb_crt1off = 0;
 
 #ifdef CONFIG_FB_SIS_300
-	   if((sisfb_crt1off) && (doit)) {
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
+	   if((ivideo->sisfb_crt1off) && (doit)) {
 	        crt1isoff = TRUE;
 		reg = 0x00;
 	   } else {
@@ -3803,12 +3671,11 @@
 		reg = 0x80;
 	   }
 	   setSISIDXREG(SISCR, 0x17, 0x7f, reg);
+	}
 #endif
-
-	} else {
-
 #ifdef CONFIG_FB_SIS_315
-	   if(sisfb_crt1off) {
+	if(ivideo->sisvga_engine == SIS_315_VGA) {
+	   if((ivideo->sisfb_crt1off) && (doit)) {
 	        crt1isoff = TRUE;
 		reg  = 0x40;
 		reg1 = 0xc0;
@@ -3818,66 +3685,89 @@
 		reg1 = 0x00;
 
 	   }
-	   setSISIDXREG(SISCR, SiS_Pr.SiS_MyCR63, ~0x40, reg);
+	   setSISIDXREG(SISCR, ivideo->SiS_Pr.SiS_MyCR63, ~0x40, reg);
 	   setSISIDXREG(SISSR, 0x1f, ~0xc0, reg1);
-#endif
-
 	}
+#endif
 
 	if(crt1isoff) {
-	   ivideo.currentvbflags &= ~VB_DISPTYPE_CRT1;
-	   ivideo.currentvbflags |= VB_SINGLE_MODE;
-	   ivideo.disp_state |= DISPMODE_SINGLE;
+	   ivideo->currentvbflags &= ~VB_DISPTYPE_CRT1;
+	   ivideo->currentvbflags |= VB_SINGLE_MODE;
 	} else {
-	   ivideo.currentvbflags |= VB_DISPTYPE_CRT1;
-	   ivideo.disp_state |= DISPTYPE_CRT1;
-	   if(ivideo.currentvbflags & VB_DISPTYPE_CRT2) {
-	  	ivideo.currentvbflags |= VB_MIRROR_MODE;
-		ivideo.disp_state |= DISPMODE_MIRROR;
+	   ivideo->currentvbflags |= VB_DISPTYPE_CRT1;
+	   if(ivideo->currentvbflags & VB_DISPTYPE_CRT2) {
+	  	ivideo->currentvbflags |= VB_MIRROR_MODE;
 	   } else {
-	 	ivideo.currentvbflags |= VB_SINGLE_MODE;
-		ivideo.disp_state |= DISPMODE_SINGLE;
+	 	ivideo->currentvbflags |= VB_SINGLE_MODE;
 	   }
 	}
 
         andSISIDXREG(SISSR, IND_SIS_RAMDAC_CONTROL, ~0x04);
 
-	if((ivideo.currentvbflags & CRT2_TV) && (ivideo.vbflags & VB_301)) {  /* Set filter for SiS301 */
+	if(ivideo->currentvbflags & CRT2_TV) {
+	   if(ivideo->vbflags & VB_SISBRIDGE) {
+	      inSISIDXREG(SISPART2,0x1f,ivideo->p2_1f);
+	      inSISIDXREG(SISPART2,0x20,ivideo->p2_20);
+	      inSISIDXREG(SISPART2,0x2b,ivideo->p2_2b);
+	      inSISIDXREG(SISPART2,0x42,ivideo->p2_42);
+	      inSISIDXREG(SISPART2,0x43,ivideo->p2_43);
+	      inSISIDXREG(SISPART2,0x01,ivideo->p2_01);
+	      inSISIDXREG(SISPART2,0x02,ivideo->p2_02);
+	   } else if(ivideo->vbflags & VB_CHRONTEL) {
+	      if(ivideo->chronteltype == 1) {
+	         ivideo->tvx = SiS_GetCH700x(&ivideo->SiS_Pr, 0x0a);
+	         ivideo->tvx |= (((SiS_GetCH700x(&ivideo->SiS_Pr, 0x08) & 0x02) >> 1) << 8);
+	         ivideo->tvy = SiS_GetCH700x(&ivideo->SiS_Pr, 0x0b);
+	         ivideo->tvy |= ((SiS_GetCH700x(&ivideo->SiS_Pr, 0x08) & 0x01) << 8);
+ 	      }
+	   }
+	}
+
+	if(ivideo->tvxpos) {
+   	   sisfb_set_TVxposoffset(ivideo, ivideo->tvxpos);
+	}
+	if(ivideo->tvypos) {
+   	   sisfb_set_TVyposoffset(ivideo, ivideo->tvypos);
+	}
+
+	if((ivideo->currentvbflags & CRT2_TV) && (ivideo->vbflags & VB_301)) {  /* Set filter for SiS301 */
+
+	   	unsigned char filter_tb = 0;
 
-		switch (ivideo.video_width) {
+		switch (ivideo->video_width) {
 		   case 320:
-			filter_tb = (ivideo.vbflags & TV_NTSC) ? 4 : 12;
+			filter_tb = (ivideo->vbflags & TV_NTSC) ? 4 : 12;
 			break;
 		   case 640:
-			filter_tb = (ivideo.vbflags & TV_NTSC) ? 5 : 13;
+			filter_tb = (ivideo->vbflags & TV_NTSC) ? 5 : 13;
 			break;
 		   case 720:
-			filter_tb = (ivideo.vbflags & TV_NTSC) ? 6 : 14;
+			filter_tb = (ivideo->vbflags & TV_NTSC) ? 6 : 14;
 			break;
 		   case 400:
 		   case 800:
-			filter_tb = (ivideo.vbflags & TV_NTSC) ? 7 : 15;
+			filter_tb = (ivideo->vbflags & TV_NTSC) ? 7 : 15;
 			break;
 		   default:
-			filter = -1;
+			ivideo->sisfb_filter = -1;
 			break;
 		}
 
-		orSISIDXREG(SISPART1, sisfb_CRT2_write_enable, 0x01);
+		orSISIDXREG(SISPART1, ivideo->CRT2_write_enable, 0x01);
 
-		if(ivideo.vbflags & TV_NTSC) {
+		if(ivideo->vbflags & TV_NTSC) {
 
 		        andSISIDXREG(SISPART2, 0x3a, 0x1f);
 
-			if (ivideo.vbflags & TV_SVIDEO) {
+			if (ivideo->vbflags & TV_SVIDEO) {
 
 			        andSISIDXREG(SISPART2, 0x30, 0xdf);
 
-			} else if (ivideo.vbflags & TV_AVIDEO) {
+			} else if (ivideo->vbflags & TV_AVIDEO) {
 
 			        orSISIDXREG(SISPART2, 0x30, 0x20);
 
-				switch (ivideo.video_width) {
+				switch (ivideo->video_width) {
 				case 640:
 				        outSISIDXREG(SISPART2, 0x35, 0xEB);
 					outSISIDXREG(SISPART2, 0x36, 0x04);
@@ -3900,19 +3790,19 @@
 				}
 			}
 
-		} else if(ivideo.vbflags & TV_PAL) {
+		} else if(ivideo->vbflags & TV_PAL) {
 
 			andSISIDXREG(SISPART2, 0x3A, 0x1F);
 
-			if (ivideo.vbflags & TV_SVIDEO) {
+			if (ivideo->vbflags & TV_SVIDEO) {
 
 			        andSISIDXREG(SISPART2, 0x30, 0xDF);
 
-			} else if (ivideo.vbflags & TV_AVIDEO) {
+			} else if (ivideo->vbflags & TV_AVIDEO) {
 
 			        orSISIDXREG(SISPART2, 0x30, 0x20);
 
-				switch (ivideo.video_width) {
+				switch (ivideo->video_width) {
 				case 640:
 					outSISIDXREG(SISPART2, 0x35, 0xF1);
 					outSISIDXREG(SISPART2, 0x36, 0xF7);
@@ -3936,129 +3826,137 @@
 			}
 		}
 
-		if ((filter >= 0) && (filter <= 7)) {
-			DPRINTK("FilterTable[%d]-%d: %02x %02x %02x %02x\n", filter_tb, filter,
-				sis_TV_filter[filter_tb].filter[filter][0],
-				sis_TV_filter[filter_tb].filter[filter][1],
-				sis_TV_filter[filter_tb].filter[filter][2],
-				sis_TV_filter[filter_tb].filter[filter][3]
-			);
-			outSISIDXREG(SISPART2, 0x35, (sis_TV_filter[filter_tb].filter[filter][0]));
-			outSISIDXREG(SISPART2, 0x36, (sis_TV_filter[filter_tb].filter[filter][1]));
-			outSISIDXREG(SISPART2, 0x37, (sis_TV_filter[filter_tb].filter[filter][2]));
-			outSISIDXREG(SISPART2, 0x38, (sis_TV_filter[filter_tb].filter[filter][3]));
+		if((ivideo->sisfb_filter >= 0) && (ivideo->sisfb_filter <= 7)) {
+		   outSISIDXREG(SISPART2,0x35,(sis_TV_filter[filter_tb].filter[ivideo->sisfb_filter][0]));
+		   outSISIDXREG(SISPART2,0x36,(sis_TV_filter[filter_tb].filter[ivideo->sisfb_filter][1]));
+		   outSISIDXREG(SISPART2,0x37,(sis_TV_filter[filter_tb].filter[ivideo->sisfb_filter][2]));
+		   outSISIDXREG(SISPART2,0x38,(sis_TV_filter[filter_tb].filter[ivideo->sisfb_filter][3]));
 		}
 	  
 	}
-
 }
 
 #ifndef MODULE
-int sisfb_setup(char *options)
+int __init sisfb_setup(char *options)
 {
 	char *this_opt;
 	
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-	sisfb_fontname[0] = '\0';
-#endif
-
-	ivideo.refresh_rate = 0;
-	SiS_Pr.SiS_CustomT = CUT_NONE;
-	SiS_Pr.UsePanelScaler = -1;
-	SiS_Pr.LVDSHL = -1;
+	sisfb_setdefaultparms();
 
         printk(KERN_DEBUG "sisfb: Options %s\n", options);
 
-	if (!options || !*options)
+	if(!options || !(*options)) {
 		return 0;
+	}
 
 	while((this_opt = strsep(&options, ",")) != NULL) {
 
-		if (!*this_opt)	continue;
+		if(!(*this_opt)) continue;
 
-		if (!strnicmp(this_opt, "mode:", 5)) {
+		if(!strnicmp(this_opt, "off", 3)) {
+			sisfb_off = 1;
+		} else if(!strnicmp(this_opt, "forcecrt2type:", 14)) {
+			/* Need to check crt2 type first for fstn/dstn */
+			sisfb_search_crt2type(this_opt + 14);
+		} else if(!strnicmp(this_opt, "tvmode:",7)) {
+		        sisfb_search_tvstd(this_opt + 7);
+                } else if(!strnicmp(this_opt, "tvstandard:",11)) {
+			sisfb_search_tvstd(this_opt + 7);
+		} else if(!strnicmp(this_opt, "mode:", 5)) {
 			sisfb_search_mode(this_opt + 5, FALSE);
-		} else if (!strnicmp(this_opt, "vesa:", 5)) {
+		} else if(!strnicmp(this_opt, "vesa:", 5)) {
 			sisfb_search_vesamode(simple_strtoul(this_opt + 5, NULL, 0), FALSE);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-		} else if (!strnicmp(this_opt, "inverse", 7)) {
+		} else if(!strnicmp(this_opt, "inverse", 7)) {
 			sisfb_inverse = 1;
 			/* fb_invert_cmaps(); */
-		} else if (!strnicmp(this_opt, "font:", 5)) {
-			strncpy(sisfb_fontname, this_opt + 5, sizeof(sisfb_fontname) - 1);
-			sisfb_fontname[sizeof(sisfb_fontname) - 1] = '\0';
-#endif
-		} else if (!strnicmp(this_opt, "vrate:", 6)) {
-			ivideo.refresh_rate = simple_strtoul(this_opt + 6, NULL, 0);
-			sisfb_parm_rate = ivideo.refresh_rate;
-		} else if (!strnicmp(this_opt, "rate:", 5)) {
-			ivideo.refresh_rate = simple_strtoul(this_opt + 5, NULL, 0);
-			sisfb_parm_rate = ivideo.refresh_rate;
-		} else if (!strnicmp(this_opt, "off", 3)) {
-			sisfb_off = 1;
-		} else if (!strnicmp(this_opt, "crt1off", 7)) {
-			sisfb_crt1off = 1;
-		} else if (!strnicmp(this_opt, "filter:", 7)) {
-			filter = (int)simple_strtoul(this_opt + 7, NULL, 0);
-		} else if (!strnicmp(this_opt, "forcecrt2type:", 14)) {
-			sisfb_search_crt2type(this_opt + 14);
-		} else if (!strnicmp(this_opt, "forcecrt1:", 10)) {
+		} else if(!strnicmp(this_opt, "font:", 5)) {
+		        if(strlen(this_opt + 5) < 40) {
+			   strncpy(sisfb_fontname, this_opt + 5, sizeof(sisfb_fontname) - 1);
+			   sisfb_fontname[sizeof(sisfb_fontname) - 1] = '\0';
+			}
+#endif
+		} else if(!strnicmp(this_opt, "rate:", 5)) {
+			sisfb_parm_rate = simple_strtoul(this_opt + 5, NULL, 0);
+		} else if(!strnicmp(this_opt, "filter:", 7)) {
+			sisfb_filter = (int)simple_strtoul(this_opt + 7, NULL, 0);
+		} else if(!strnicmp(this_opt, "forcecrt1:", 10)) {
 			sisfb_forcecrt1 = (int)simple_strtoul(this_opt + 10, NULL, 0);
-                } else if (!strnicmp(this_opt, "tvmode:",7)) {
-		        sisfb_search_tvstd(this_opt + 7);
-                } else if (!strnicmp(this_opt, "tvstandard:",11)) {
-			sisfb_search_tvstd(this_opt + 7);
-                } else if (!strnicmp(this_opt, "mem:",4)) {
-		        sisfb_mem = simple_strtoul(this_opt + 4, NULL, 0);
-		} else if (!strnicmp(this_opt, "queuemode:", 10)) {
-			sisfb_search_queuemode(this_opt + 10);
-		} else if (!strnicmp(this_opt, "pdc:", 4)) {
+                } else if(!strnicmp(this_opt, "mem:",4)) {
+		        sisfb_parm_mem = simple_strtoul(this_opt + 4, NULL, 0);
+		} else if(!strnicmp(this_opt, "pdc:", 4)) {
 		        sisfb_pdc = simple_strtoul(this_opt + 4, NULL, 0);
-		} else if (!strnicmp(this_opt, "noaccel", 7)) {
+		} else if(!strnicmp(this_opt, "pdc1:", 5)) {
+		        sisfb_pdca = simple_strtoul(this_opt + 5, NULL, 0);
+		} else if(!strnicmp(this_opt, "noaccel", 7)) {
 			sisfb_accel = 0;
-		} else if (!strnicmp(this_opt, "noypan", 6)) {
+		} else if(!strnicmp(this_opt, "accel", 5)) {
+			sisfb_accel = -1;
+		} else if(!strnicmp(this_opt, "noypan", 6)) {
 		        sisfb_ypan = 0;
-		} else if (!strnicmp(this_opt, "nomax", 5)) {
+		} else if(!strnicmp(this_opt, "ypan", 4)) {
+		        sisfb_ypan = -1;
+		} else if(!strnicmp(this_opt, "nomax", 5)) {
 		        sisfb_max = 0;
-		} else if (!strnicmp(this_opt, "userom:", 7)) {
+		} else if(!strnicmp(this_opt, "max", 3)) {
+		        sisfb_max = -1;
+		} else if(!strnicmp(this_opt, "userom:", 7)) {
 			sisfb_userom = (int)simple_strtoul(this_opt + 7, NULL, 0);
-		} else if (!strnicmp(this_opt, "useoem:", 7)) {
+		} else if(!strnicmp(this_opt, "useoem:", 7)) {
 			sisfb_useoem = (int)simple_strtoul(this_opt + 7, NULL, 0);
-		} else if (!strnicmp(this_opt, "nocrt2rate", 10)) {
+		} else if(!strnicmp(this_opt, "nocrt2rate", 10)) {
 			sisfb_nocrt2rate = 1;
-	 	} else if (!strnicmp(this_opt, "scalelcd:", 9)) {
+	 	} else if(!strnicmp(this_opt, "scalelcd:", 9)) {
 		        unsigned long temp = 2;
 		        temp = simple_strtoul(this_opt + 9, NULL, 0);
 		        if((temp == 0) || (temp == 1)) {
-			   SiS_Pr.UsePanelScaler = temp ^ 1;
+			   sisfb_scalelcd = temp ^ 1;
+		        }
+		} else if(!strnicmp(this_opt, "tvxposoffset:", 13)) {
+		        int temp = 0;
+		        temp = (int)simple_strtol(this_opt + 13, NULL, 0);
+		        if((temp >= -32) && (temp <= 32)) {
+			   sisfb_tvxposoffset = temp;
 		        }
-		} else if (!strnicmp(this_opt, "specialtiming:", 14)) {
+		} else if(!strnicmp(this_opt, "tvyposoffset:", 13)) {
+		        int temp = 0;
+		        temp = (int)simple_strtol(this_opt + 13, NULL, 0);
+		        if((temp >= -32) && (temp <= 32)) {
+			   sisfb_tvyposoffset = temp;
+		        }
+		} else if(!strnicmp(this_opt, "specialtiming:", 14)) {
 			sisfb_search_specialtiming(this_opt + 14);
-		} else if (!strnicmp(this_opt, "lvdshl:", 7)) {
-		        unsigned long temp = 4;
+		} else if(!strnicmp(this_opt, "lvdshl:", 7)) {
+		        int temp = 4;
 		        temp = simple_strtoul(this_opt + 7, NULL, 0);
 		        if((temp >= 0) && (temp <= 3)) {
-			   SiS_Pr.LVDSHL = temp;
+			   sisfb_lvdshl = temp;
 		        }
 		} else if(this_opt[0] >= '0' && this_opt[0] <= '9') {
 			sisfb_search_mode(this_opt, TRUE);
+#if !defined(__i386__) && !defined(__x86_64__)
+	        } else if(!strnicmp(this_opt, "resetcard", 9)) {
+		  	sisfb_resetcard = 1;
+	        } else if(!strnicmp(this_opt, "videoram:", 9)) {
+		  	sisfb_videoram = simple_strtoul(this_opt + 9, NULL, 0);
+#endif
 		} else {
 			printk(KERN_INFO "sisfb: Invalid option %s\n", this_opt);
 		}
 
-		/* TW: Acceleration only with MMIO mode */
-		if((sisfb_queuemode != -1) && (sisfb_queuemode != MMIO_CMD)) {
-			sisfb_accel = 0;
-		}
-
 	}
+
+
+
 	return 0;
 }
 #endif
 
-static char *sis_find_rom(void)
+static char * __devinit sis_find_rom(struct pci_dev *pdev)
 {
-#if defined(__i386__)
+	struct sis_video_info *ivideo = pci_get_drvdata(pdev);
+
+#if defined(__i386__) || defined(__x86_64__)
         u32  segstart;
         unsigned char *rom_base, *rom;
         int  romptr;
@@ -4066,292 +3964,972 @@
 
         for(segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) {
 
-                rom_base = (char *)ioremap(segstart, 0x10000);
-		if(!rom_base) continue;
+            rom_base = (unsigned char *)ioremap(segstart, 0x10000);
+	    if(!rom_base) continue;
 
-                if((*rom_base != 0x55) || (*(rom_base + 1) != 0xaa)) {
-                   iounmap(rom_base);
-                   continue;
-                }
+	    if((readb(rom_base) != 0x55) || (readb(rom_base + 1) != 0xaa)) {
+	       iounmap(rom_base);
+               continue;
+	    }
 
-		romptr = (unsigned short)(*(rom_base + 0x18) | (*(rom_base + 0x19) << 8));
-		if(romptr > (0x10000 - 8)) {
-		   iounmap(rom_base);
-		   continue;
-		}
+	    romptr = (unsigned short)(readb(rom_base + 0x18) | (readb(rom_base + 0x19) << 8));
+	    if(romptr > (0x10000 - 8)) {
+	       iounmap(rom_base);
+	       continue;
+	    }
 
-		rom = rom_base + romptr;
+	    rom = rom_base + romptr;
 
-		if((*rom != 'P') || (*(rom + 1) != 'C') || (*(rom + 2) != 'I') || (*(rom + 3) != 'R')) {
-		   iounmap(rom_base);
-		   continue;
-		}
+	    if((readb(rom)     != 'P') || (readb(rom + 1) != 'C') ||
+	       (readb(rom + 2) != 'I') || (readb(rom + 3) != 'R')) {
+	       iounmap(rom_base);
+	       continue;
+	    }
 
-		pciid = (*(rom + 4)) | ((*(rom + 5)) << 8);
-		if(pciid != 0x1039) {
-		   iounmap(rom_base);
-		   continue;
-		}
+	    pciid = readb(rom + 4) | (readb(rom + 5) << 8);
+	    if(pciid != 0x1039) {
+	       iounmap(rom_base);
+	       continue;
+	    }
 
-		pciid = (*(rom + 6)) | ((*(rom + 7)) << 8);
-		if(pciid == ivideo.chip_id) return rom_base;
+	    pciid = readb(rom + 6) | (readb(rom + 7) << 8);
+	    if(pciid == ivideo->chip_id) return rom_base;
 
-		iounmap(rom_base);
+	    iounmap(rom_base);
         }
+#else
+	unsigned char *rom_base, *rom, *myrombase = NULL;
+        int  romptr;
+	unsigned short pciid;
+	u32 backup;
+
+	pci_read_config_dword(pdev, PCI_ROM_ADDRESS, &backup);
+	pci_write_config_dword(pdev, PCI_ROM_ADDRESS,
+			(ivideo->video_base & PCI_ROM_ADDRESS_MASK) | PCI_ROM_ADDRESS_ENABLE);
+
+	rom_base = ioremap(ivideo->video_base, 65536);
+	if(rom_base) {
+	   if((readb(rom_base) == 0x55) && (readb(rom_base + 1) == 0xaa)) {
+	      romptr = (u16)(readb(rom_base + 0x18) | (readb(rom_base + 0x19) << 8));
+	      if(romptr <= (0x10000 - 8)) {
+	         rom = rom_base + romptr;
+		 if((readb(rom)     == 'P') && (readb(rom + 1) == 'C') &&
+		    (readb(rom + 2) == 'I') && (readb(rom + 3) == 'R')) {
+		    pciid = readb(rom + 4) | (readb(rom + 5) << 8);
+		    if(pciid == 0x1039) {
+		       pciid = readb(rom + 6) | (readb(rom + 7) << 8);
+		       if(pciid == ivideo->chip_id) {
+		          if((myrombase = vmalloc(65536))) {
+			     memcpy_fromio(myrombase, rom_base, 65536);
+			  }
+		       }
+		    }
+		 }
+	      }
+	   }
+	   iounmap(rom_base);
+	}
+        pci_write_config_dword(pdev, PCI_ROM_ADDRESS, backup);
+	if(myrombase) return myrombase;
 #endif
         return NULL;
 }
 
+#ifdef CONFIG_FB_SIS_300
+static int __devinit
+sisfb_chkbuswidth300(struct pci_dev *pdev, ULONG FBAddress)
+{
+	struct sis_video_info *ivideo = pci_get_drvdata(pdev);
+	int i, j;
+	USHORT temp;
+	UCHAR reg;
+
+	andSISIDXREG(SISSR,0x15,0xFB);
+	orSISIDXREG(SISSR,0x15,0x04);
+   	outSISIDXREG(SISSR,0x13,0x00);
+   	outSISIDXREG(SISSR,0x14,0xBF);
+
+	for(i=0; i<2; i++) {
+	   temp = 0x1234;
+	   for(j=0; j<4; j++) {
+	      writew(temp, FBAddress);
+	      if(readw(FBAddress) == temp) break;
+	      orSISIDXREG(SISSR,0x3c,0x01);
+	      inSISIDXREG(SISSR,0x05,reg);
+	      inSISIDXREG(SISSR,0x05,reg);
+	      andSISIDXREG(SISSR,0x3c,0xfe);
+	      inSISIDXREG(SISSR,0x05,reg);
+	      inSISIDXREG(SISSR,0x05,reg);
+	      temp++;
+	   }
+	}
+
+	writel(0x01234567L, FBAddress);
+	writel(0x456789ABL, (FBAddress+4));
+	writel(0x89ABCDEFL, (FBAddress+8));
+	writel(0xCDEF0123L, (FBAddress+12));
+	inSISIDXREG(SISSR,0x3b,reg);
+	if(reg & 0x01) {
+	   if(readl((FBAddress+12)) == 0xCDEF0123L) return(4);  /* Channel A 128bit */
+	}
+	if(readl((FBAddress+4)) == 0x456789ABL)     return(2);  /* Channel B 64bit */
+	return(1);						/* 32bit */
+}
+
+static void __devinit
+sisfb_setramsize300(struct pci_dev *pdev)
+{
+	struct  sis_video_info *ivideo = pci_get_drvdata(pdev);
+  	ULONG 	FBAddr = (ULONG)ivideo->sishw_ext.pjVideoMemoryAddress, Addr;
+	USHORT 	SR13, SR14=0, buswidth, Done, data, TotalCapacity, PhysicalAdrOtherPage=0;
+	int     PseudoRankCapacity, PseudoTotalCapacity, PseudoAdrPinCount;
+   	int     RankCapacity, AdrPinCount, BankNumHigh, BankNumMid, MB2Bank;
+   	int     PageCapacity, PhysicalAdrHigh, PhysicalAdrHalfPage, i, j, k;
+	const 	USHORT SiS_DRAMType[17][5] = {
+			{0x0C,0x0A,0x02,0x40,0x39},
+			{0x0D,0x0A,0x01,0x40,0x48},
+			{0x0C,0x09,0x02,0x20,0x35},
+			{0x0D,0x09,0x01,0x20,0x44},
+			{0x0C,0x08,0x02,0x10,0x31},
+			{0x0D,0x08,0x01,0x10,0x40},
+			{0x0C,0x0A,0x01,0x20,0x34},
+			{0x0C,0x09,0x01,0x08,0x32},
+			{0x0B,0x08,0x02,0x08,0x21},
+			{0x0C,0x08,0x01,0x08,0x30},
+			{0x0A,0x08,0x02,0x04,0x11},
+			{0x0B,0x0A,0x01,0x10,0x28},
+			{0x09,0x08,0x02,0x02,0x01},
+			{0x0B,0x09,0x01,0x08,0x24},
+			{0x0B,0x08,0x01,0x04,0x20},
+			{0x0A,0x08,0x01,0x02,0x10},
+			{0x09,0x08,0x01,0x01,0x00}
+		};
+
+        buswidth = sisfb_chkbuswidth300(pdev, FBAddr);
+
+   	MB2Bank = 16;
+   	Done = 0;
+   	for(i = 6; i >= 0; i--) {
+      	   if(Done) break;
+      	   PseudoRankCapacity = 1 << i;
+      	   for(j = 4; j >= 1; j--) {
+              if(Done) break;
+              PseudoTotalCapacity = PseudoRankCapacity * j;
+              PseudoAdrPinCount = 15 - j;
+              if(PseudoTotalCapacity <= 64) {
+                 for(k = 0; k <= 16; k++) {
+                    if(Done) break;
+                    RankCapacity = buswidth * SiS_DRAMType[k][3];
+                    AdrPinCount = SiS_DRAMType[k][2] + SiS_DRAMType[k][0];
+                    if(RankCapacity == PseudoRankCapacity)
+                       if(AdrPinCount <= PseudoAdrPinCount) {
+                          if(j == 3) {             /* Rank No */
+                             BankNumHigh = RankCapacity * MB2Bank * 3 - 1;
+                             BankNumMid  = RankCapacity * MB2Bank * 1 - 1;
+                          } else {
+                             BankNumHigh = RankCapacity * MB2Bank * j - 1;
+                             BankNumMid  = RankCapacity * MB2Bank * j / 2 - 1;
+                          }
+                          PageCapacity = (1 << SiS_DRAMType[k][1]) * buswidth * 4;
+                          PhysicalAdrHigh = BankNumHigh;
+                          PhysicalAdrHalfPage = (PageCapacity / 2 + PhysicalAdrHigh) % PageCapacity;
+                          PhysicalAdrOtherPage = PageCapacity * SiS_DRAMType[k][2] + PhysicalAdrHigh;
+                          /* Write data */
+                          andSISIDXREG(SISSR,0x15,0xFB); /* Test */
+                          orSISIDXREG(SISSR,0x15,0x04);  /* Test */
+                          TotalCapacity = SiS_DRAMType[k][3] * buswidth;
+                          SR13 = SiS_DRAMType[k][4];
+                          if(buswidth == 4) SR14 = (TotalCapacity - 1) | 0x80;
+                          if(buswidth == 2) SR14 = (TotalCapacity - 1) | 0x40;
+                          if(buswidth == 1) SR14 = (TotalCapacity - 1) | 0x00;
+                          outSISIDXREG(SISSR,0x13,SR13);
+                          outSISIDXREG(SISSR,0x14,SR14);
+                          Addr = FBAddr + BankNumHigh * 64 * 1024 + PhysicalAdrHigh;
+                          /* *((USHORT *)(Addr)) = (USHORT)PhysicalAdrHigh; */
+			  writew(((USHORT)PhysicalAdrHigh), Addr);
+                          Addr = FBAddr + BankNumMid * 64 * 1024 + PhysicalAdrHigh;
+                          /* *((USHORT *)(Addr)) = (USHORT)BankNumMid; */
+			  writew(((USHORT)BankNumMid), Addr);
+                          Addr = FBAddr + BankNumHigh * 64 * 1024 + PhysicalAdrHalfPage;
+                          /* *((USHORT *)(Addr)) = (USHORT)PhysicalAdrHalfPage; */
+			  writew(((USHORT)PhysicalAdrHalfPage), Addr);
+                          Addr = FBAddr + BankNumHigh * 64 * 1024 + PhysicalAdrOtherPage;
+                          /* *((USHORT *)(Addr)) = PhysicalAdrOtherPage; */
+			  writew(((USHORT)PhysicalAdrOtherPage), Addr);
+                          /* Read data */
+                          Addr = FBAddr + BankNumHigh * 64 * 1024 + PhysicalAdrHigh;
+                          data = readw(Addr); /* *((USHORT *)(Addr)); */
+                          if(data == PhysicalAdrHigh) Done = 1;
+                       }  /* if */
+                 }  /* for k */
+              }  /* if */
+      	   }  /* for j */
+   	}  /* for i */
+}
+
+static void __devinit sisfb_post_sis300(struct pci_dev *pdev)
+{
+	struct sis_video_info *ivideo = pci_get_drvdata(pdev);
+	u8  reg, v1, v2, v3, v4, v5, v6, v7, v8;
+	u16 index, rindex, memtype = 0;
+
+	outSISIDXREG(SISSR,0x05,0x86);
+
+	if(ivideo->sishw_ext.UseROM) {
+	   if(ivideo->sishw_ext.pjVirtualRomBase[0x52] & 0x80) {
+	      memtype = ivideo->sishw_ext.pjVirtualRomBase[0x52];
+ 	   } else {
+	      inSISIDXREG(SISSR,0x3a,memtype);
+	   }
+	   memtype &= 0x07;
+	}
 
+	if(ivideo->revision_id <= 0x13) {
+	   v1 = 0x44; v2 = 0x42; v3 = 0x80;
+	   v4 = 0x44; v5 = 0x42; v6 = 0x80;
+	} else {
+	   v1 = 0x68; v2 = 0x43; v3 = 0x80;  /* Assume 125Mhz MCLK */
+	   v4 = 0x68; v5 = 0x43; v6 = 0x80;  /* Assume 125Mhz ECLK */
+	   if(ivideo->sishw_ext.UseROM) {
+	      index = memtype * 5;
+	      rindex = index + 0x54;
+	      v1 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	      v2 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	      v3 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	      rindex = index + 0x7c;
+	      v4 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	      v5 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	      v6 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	   }
+	}
+	outSISIDXREG(SISSR,0x28,v1);
+	outSISIDXREG(SISSR,0x29,v2);
+	outSISIDXREG(SISSR,0x2a,v3);
+	outSISIDXREG(SISSR,0x2e,v4);
+	outSISIDXREG(SISSR,0x2f,v5);
+	outSISIDXREG(SISSR,0x30,v6);
+	v1 = 0x10;
+	if(ivideo->sishw_ext.UseROM) v1 = ivideo->sishw_ext.pjVirtualRomBase[0xa4];
+	outSISIDXREG(SISSR,0x07,v1);       /* DAC speed */
+	outSISIDXREG(SISSR,0x11,0x0f);     /* DDC, power save */
+	v1 = 0x01; v2 = 0x43; v3 = 0x1e; v4 = 0x2a;
+	v5 = 0x06; v6 = 0x00; v7 = 0x00; v8 = 0x00;
+	if(ivideo->sishw_ext.UseROM) {
+	   memtype += 0xa5;
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[memtype];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[memtype + 8];
+	   v3 = ivideo->sishw_ext.pjVirtualRomBase[memtype + 16];
+	   v4 = ivideo->sishw_ext.pjVirtualRomBase[memtype + 24];
+	   v5 = ivideo->sishw_ext.pjVirtualRomBase[memtype + 32];
+	   v6 = ivideo->sishw_ext.pjVirtualRomBase[memtype + 40];
+	   v7 = ivideo->sishw_ext.pjVirtualRomBase[memtype + 48];
+	   v8 = ivideo->sishw_ext.pjVirtualRomBase[memtype + 56];
+	}
+	if(ivideo->revision_id >= 0x80) v3 &= 0xfd;
+	outSISIDXREG(SISSR,0x15,v1);       /* Ram type (assuming 0, BIOS 0xa5 step 8) */
+	outSISIDXREG(SISSR,0x16,v2);
+	outSISIDXREG(SISSR,0x17,v3);
+	outSISIDXREG(SISSR,0x18,v4);
+	outSISIDXREG(SISSR,0x19,v5);
+	outSISIDXREG(SISSR,0x1a,v6);
+	outSISIDXREG(SISSR,0x1b,v7);
+	outSISIDXREG(SISSR,0x1c,v8);	   /* ---- */
+	andSISIDXREG(SISSR,0x15,0xfb);
+	orSISIDXREG(SISSR,0x15,0x04);
+	if(ivideo->sishw_ext.UseROM) {
+	   if(ivideo->sishw_ext.pjVirtualRomBase[0x53] & 0x02) {
+	      orSISIDXREG(SISSR,0x19,0x20);
+	   }
+	}
+	v1 = 0x04;			   /* DAC pedestal (BIOS 0xe5) */
+	if(ivideo->revision_id >= 0x80) v1 |= 0x01;
+	outSISIDXREG(SISSR,0x1f,v1);
+	outSISIDXREG(SISSR,0x20,0xa0);     /* linear & relocated io */
+	v1 = 0xf6; v2 = 0x0d; v3 = 0x00;
+	if(ivideo->sishw_ext.UseROM) {
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[0xe8];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[0xe9];
+	   v3 = ivideo->sishw_ext.pjVirtualRomBase[0xea];
+	}
+	outSISIDXREG(SISSR,0x23,v1);
+	outSISIDXREG(SISSR,0x24,v2);
+	outSISIDXREG(SISSR,0x25,v3);
+	outSISIDXREG(SISSR,0x21,0x84);
+	outSISIDXREG(SISSR,0x22,0x00);
+	outSISIDXREG(SISCR,0x37,0x00);
+	orSISIDXREG(SISPART1,0x24,0x01);   /* unlock crt2 */
+	outSISIDXREG(SISPART1,0x00,0x00);
+	v1 = 0x40; v2 = 0x11;
+	if(ivideo->sishw_ext.UseROM) {
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[0xec];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[0xeb];
+	}
+	outSISIDXREG(SISPART1,0x02,v1);
+	if(ivideo->revision_id >= 0x80) v2 &= ~0x01;
+	inSISIDXREG(SISPART4,0x00,reg);
+	if((reg == 1) || (reg == 2)) {
+	   outSISIDXREG(SISCR,0x37,0x02);
+	   outSISIDXREG(SISPART2,0x00,0x1c);
+	   v4 = 0x00; v5 = 0x00; v6 = 0x10;
+	   if(ivideo->sishw_ext.UseROM) {
+	      v4 = ivideo->sishw_ext.pjVirtualRomBase[0xf5];
+	      v5 = ivideo->sishw_ext.pjVirtualRomBase[0xf6];
+	      v6 = ivideo->sishw_ext.pjVirtualRomBase[0xf7];
+	   }
+	   outSISIDXREG(SISPART4,0x0d,v4);
+	   outSISIDXREG(SISPART4,0x0e,v5);
+	   outSISIDXREG(SISPART4,0x10,v6);
+	   outSISIDXREG(SISPART4,0x0f,0x3f);
+	   inSISIDXREG(SISPART4,0x01,reg);
+	   if(reg >= 0xb0) {
+	      inSISIDXREG(SISPART4,0x23,reg);
+	      reg &= 0x20;
+	      reg <<= 1;
+	      outSISIDXREG(SISPART4,0x23,reg);
+	   }
+	} else {
+	   v2 &= ~0x10;
+	}
+	outSISIDXREG(SISSR,0x32,v2);
+	andSISIDXREG(SISPART1,0x24,0xfe);  /* Lock CRT2 */
+	inSISIDXREG(SISSR,0x16,reg);
+	reg &= 0xc3;
+	outSISIDXREG(SISCR,0x35,reg);
+	outSISIDXREG(SISCR,0x83,0x00);
+#if !defined(__i386__) && !defined(__x86_64__)
+	if(sisfb_videoram) {
+	   outSISIDXREG(SISSR,0x13,0x28);  /* ? */
+	   reg = ((sisfb_videoram >> 10) - 1) | 0x40;
+	   outSISIDXREG(SISSR,0x14,reg);
+	} else {
+#endif
+	   /* Need to map max FB size for finding out about RAM size */
+	   ivideo->sishw_ext.pjVideoMemoryAddress = ioremap(ivideo->video_base, 0x4000000);
+	   if(ivideo->sishw_ext.pjVideoMemoryAddress) {
+	      sisfb_setramsize300(pdev);
+	      iounmap(ivideo->sishw_ext.pjVideoMemoryAddress);
+	   } else {
+	      printk(KERN_DEBUG "sisfb: Failed to map memory for size detection, assuming 8MB\n");
+	      outSISIDXREG(SISSR,0x13,0x28);  /* ? */
+	      outSISIDXREG(SISSR,0x14,0x47);  /* 8MB, 64bit default */
+	   }
+#if !defined(__i386__) && !defined(__x86_64__)
+	}
+#endif
+	if(ivideo->sishw_ext.UseROM) {
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[0xe6];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[0xe7];
+	} else {
+	   inSISIDXREG(SISSR,0x3a,reg);
+	   if((reg & 0x30) == 0x30) {
+	      v1 = 0x04; /* PCI */
+	      v2 = 0x92;
+	   } else {
+	      v1 = 0x14; /* AGP */
+	      v2 = 0xb2;
+	   }
+	}
+	outSISIDXREG(SISSR,0x21,v1);
+	outSISIDXREG(SISSR,0x22,v2);
+}
+#endif
 
-int __init sisfb_init(void)
+#ifdef CONFIG_FB_SIS_315
+static void __devinit sisfb_post_sis315330(struct pci_dev *pdev)
 {
-	struct pci_dev *pdev = NULL;
-	struct board *b;
-	int pdev_valid = 0;
-	u32 reg32;
-	u16 reg16;
-	u8  reg;
+#ifdef YET_TO_BE_DONE
+	struct sis_video_info *ivideo = pci_get_drvdata(pdev);
+	u8  reg, v1, v2, v3, v4, v5, v6, v7, v8;
+	u16 index, rindex, memtype = 0;
+	u32 reg1_32, reg2_32, reg3_32;
+	int i;
+
+	/* Unlock */
+	/* outSISIDXREG(0x3c4,0x05,0x86); */
+	outSISIDXREG(SISSR,0x05,0x86);
+
+	/* Enable relocated i/o ports */
+	/* setSISIDXREG(0x3c4,0x20,~0x10,0x20); */
+	setSISIDXREG(SISSR,0x20,~0x10,0x20);
+
+	/* Clear regs */
+	for(i = 0; i < 0x22; i++) {
+	   outSISIDXREG(SISSR,(0x06 + i),0x00);
+	}
+	v1 = 0x0d;
+	if( is 330) v1 = 0x0b;
+	for(i = 0; i < v1; i++) {
+	   outSISIDXREG(SISSR,(0x31 + i),0x00);
+	}
+	for(i = 0; i < 0x10; i++) {
+	   outSISIDXREG(SISCR,(0x30 + i),0x00);
+	}
+
+	/* Reset clocks */
+	reg = inSISREG(SISMISCR);
+	outSISIDXREG(SISSR,0x28,0x81);
+	outSISIDXREG(SISSR,0x2A,0x00);
+	outSISIDXREG(SISSR,0x29,0xE1);
+	outSISREG(SISMISCW,(reg | 0x0c));
+	outSISIDXREG(SISSR,0x2B,0x81);
+	outSISIDXREG(SISSR,0x2D,0x00);
+	outSISIDXREG(SISSR,0x2C,0xE1);
+	outSISIDXREG(SISSR,0x2E,0x81);
+	outSISIDXREG(SISSR,0x30,0x00);
+	outSISIDXREG(SISSR,0x2F,0xE1);
+	SiS_DDC2Delay(....);
+	outSISREG(SISMISCW,reg);
+
+	/* Get memory type */
+	if(ivideo->sishw_ext.UseROM) {
+	   if(ivideo->sishw_ext.pjVirtualRomBase[0x52] & 0x80)) {
+	      memtype = ivideo->sishw_ext.pjVirtualRomBase[0x52];
+ 	   } else {
+	      inSISIDXREG(SISSR,0x3a,memtype);
+	   }
+	   memtype &= 0x03;
+	   if( is 330 ) {
+	      if(memtype <= 1) memtype = 0;
+	      else {
+	         inSISIDXREG(SISCR,0x5F,reg);
+		 reg &= 0x30;
+		 switch(reg) {
+		 case 0x00: memtype = 1; break;
+		 case 0x10: memtype = 3; break;
+		 case 0x20: memtype = 3; break;
+		 default:   memtype = 2;
+		 }
+	      }
+	   }
+	}
 
-#if 0
-	/* for DOC VB */
-	sisfb_set_reg4(0xcf8,0x800000e0);
-	reg32 = sisfb_get_reg3(0xcfc);
-	reg32 = reg32 | 0x00001000;
-	sisfb_set_reg4(0xcfc,reg32);
+	/* Set clocks */
+	v1 = 0x3b; v2 = 0x22; v3 = 0x01;  /* Assume 143Mhz MCLK */
+	v4 = 0x5c; v5 = 0x23; v6 = 0x01;  /* Assume 166Mhz ECLK */
+	if(ivideo->sishw_ext.UseROM) {
+	   index = memtype * 5;
+	   rindex = index + 0x54;
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	   v3 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	   rindex = index + 0x68;
+	   v4 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	   v5 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	   v6 = ivideo->sishw_ext.pjVirtualRomBase[rindex++];
+	}
+	outSISIDXREG(SISSR,0x28,v1);
+	outSISIDXREG(SISSR,0x29,v2);
+	outSISIDXREG(SISSR,0x2a,v3);
+	if( is 330 ) {
+	   inSISIDXREG(SISSR,0x3a,reg);
+	   reg &= 0x03;
+	   if(reg >= 2) {
+	      ...
+	   }
 	}
-#endif
+	outSISIDXREG(SISSR,0x2e,v4);
+	outSISIDXREG(SISSR,0x2f,v5);
+	outSISIDXREG(SISSR,0x30,v6);
+
+	/* End of comp with 330 */
+
+	v1 = 0x18;
+	if(ivideo->sishw_ext.UseROM) v1 = ivideo->sishw_ext.pjVirtualRomBase[0x7c];
+	outSISIDXREG(SISSR,0x07,v1);
+	outSISIDXREG(SISSR,0x11,0x0f);
+
+	v1 = 0x00; v2 = 0x0f; v3 = 0xba; v4 = 0xa9;
+	v5 = 0xa0; v6 = 0x00; v7 = 0x30;
+	if(ivideo->sishw_ext.UseROM) {
+	   index = memtype + 0x7d;
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[index];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[index + 4];
+	   v3 = ivideo->sishw_ext.pjVirtualRomBase[index + 8];
+	   v4 = ivideo->sishw_ext.pjVirtualRomBase[index + 12];
+	   v5 = ivideo->sishw_ext.pjVirtualRomBase[index + 16];
+	   v6 = ivideo->sishw_ext.pjVirtualRomBase[index + 20];
+	   v7 = ivideo->sishw_ext.pjVirtualRomBase[index + 24];
+	}
+	outSISIDXREG(SISSR,0x15,v1);       /* Ram type (assuming 0, BIOS 0x7d step 4) */
+	outSISIDXREG(SISSR,0x16,v2);
+	outSISIDXREG(SISSR,0x17,v3);
+	outSISIDXREG(SISSR,0x18,v4);
+	outSISIDXREG(SISSR,0x19,v5);
+	outSISIDXREG(SISSR,0x1a,v6);
+	outSISIDXREG(SISSR,0x1b,v7);
+	outSISIDXREG(SISSR,0x1c,v8);	   /* ---- */
+
+	v1 = 0x77; v2 = 0x77; v3 = 0x00; v4 = 0x5b; v5 = 0x00;
+	if(ivideo->sishw_ext.UseROM) {
+	   index = memtype + 0xa2;
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[index];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[index + 4];
+	   v3 = ivideo->sishw_ext.pjVirtualRomBase[index + 8];
+	   v4 = ivideo->sishw_ext.pjVirtualRomBase[index + 12];
+	   v5 = ivideo->sishw_ext.pjVirtualRomBase[index + 16];
+	}
+	outSISIDXREG(SISCR,0x40,v1);
+	outSISIDXREG(SISCR,0x41,v2);
+	outSISIDXREG(SISCR,0x42,v3);
+	outSISIDXREG(SISCR,0x43,v4);
+	outSISIDXREG(SISCR,0x44,v5);
+
+	if( is 330 ) {
+
+	   v1 = 0x;
+	   if(ivideo->sishw_ext.UseROM) {
+	      v1 = ivideo->sishw_ext.pjVirtualRomBase[0xBA];
+	   }
+	   outSISIDXREG(SISCR,0x59,v1);
+
+	   v1 = 0x; v2 = 0x; v3 = 0x; v4 = 0x;
+	   v5 = 0x; v6 = 0x; v7 = 0x; v8 = 0x;
+	   if(ivideo->sishw_ext.UseROM) {
+	      index = memtype + 0xbe;
+	      v1 = ivideo->sishw_ext.pjVirtualRomBase[index];
+	      v2 = ivideo->sishw_ext.pjVirtualRomBase[index + 4];
+	      v3 = ivideo->sishw_ext.pjVirtualRomBase[index + 8];
+	      v4 = ivideo->sishw_ext.pjVirtualRomBase[index + 12];
+	      v5 = ivideo->sishw_ext.pjVirtualRomBase[index + 16];
+	      v6 = ivideo->sishw_ext.pjVirtualRomBase[index + 20];
+	      v7 = ivideo->sishw_ext.pjVirtualRomBase[index + 24];
+	      v8 = ivideo->sishw_ext.pjVirtualRomBase[index + 28];
+	   }
+	   outSISIDXREG(SISCR,0x68,v1);
+	   outSISIDXREG(SISCR,0x69,v2);
+	   outSISIDXREG(SISCR,0x6a,v3);
+	   outSISIDXREG(SISCR,0x6b,v4);
+	   outSISIDXREG(SISCR,0x6c,v5);
+	   outSISIDXREG(SISCR,0x6d,v6);
+	   outSISIDXREG(SISCR,0x6e,v7);
+	   outSISIDXREG(SISCR,0x6f,v8);
+
+	   v1 = 0x20;
+	   inSISIDXREG(SISSR,0x3b,reg);
+
+	   if(!(reg & 0x04)) {
+	      inSISIDXREG(SISCR,0x5F,reg);
+	      reg &= 0x30;
+	      if(reg) v1 = 0x23;
+	   }
+	   outSISIDXREG(SISCR,0x48,v1);
+	   outSISIDXREG(SISCR,0x4c,0x20);
 
-	if (sisfb_off)
-		return -ENXIO;
+	   xx= xxx();
+	   if(xx >= 1) {
+	      v1 = 0x;
+	      if(ivideo->sishw_ext.UseROM) {
+	         v1 = ivideo->sishw_ext.pjVirtualRomBase[0xBA];
+	      }
+	      outSISIDXREG(SISCR,0x59,v1);
+	   }
 
-	sisfb_registered = 0;
-	sisfb_thismonitor.datavalid = FALSE;
 
-	memset(&sishw_ext, 0, sizeof(sishw_ext));
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-        memset(&sisfb_lastrates[0], 0, 128);
+	} else {
+
+	   outSISIDXREG(SISCR,0x48,0x23);
+
+	   andSISIDXREG(SISSR,0x16,0x0f);
+	   if(memtype <= 1) {
+	      orSISIDXREG(SISSR,0x16,0x80);
+	   } else {
+	      v1 = 0x0f;
+	      if(ivideo->sishw_ext.UseROM) {
+	         v1 = ivideo->sishw_ext.pjVirtualRomBase[0x81 + memtype];
+	      }
+	      if(!(v1 & 0x10)) v2 = 0xc0;
+	      else             v2 = 0xd0;
+	      orSISIDXREG(SISSR,0x16,v2);
+	      andSISIDXREG(SISSR,0x16,0x0f);
+	      if(!(v1 & 0x10)) v2 = 0x80;
+	      else             v2 = 0xA0;
+	      orSISIDXREG(SISSR,0x16,v2);
+ 	   }
+
+	   if(memtype >= 2) {
+	      const u8 sr3cseq1[] = { 0xc0,0xe0,0xf0,0xe0,0xf0,0xa0,0xb0,0xa0,0xb0,0x90,0xd0 };
+	      const u8 sr3cseq2[] = { 0xc0,0xa0,0xb0,0xa0,0xb0,0xe0,0xf0,0xa0,0xb0,0x90,0xd0 };
+	      for(i = 0; i < 11; i++) {
+	         outSISIDXREG(SISSR,0x3c,sr3cseq1[i]);
+	      }
+	      outSISIDXREG(SISSR,0x3d,0x00);
+	      outSISIDXREG(SISSR,0x3d,0x04);
+	      SiS_DDC2Delay(0x200);
+	      v1 = inSISIDXREG(SISCR,0xEC);
+	      v2 = inSISIDXREG(SISCR,0xED);
+	      reg1_32 = (v2 << 8) | v1;
+	      outSISIDXREG(SISSR,0x3D,0x00);
+	      for(i = 0; i < 11; i++) {
+	         outSISIDXREG(SISSR,0x3c,sr3cseq2[i]);
+	      }
+	      outSISIDXREG(SISSR,0x3d,0x00);
+	      outSISIDXREG(SISSR,0x3d,0x04);
+	      SiS_DDC2Delay(0x200);
+	      v1 = inSISIDXREG(SISCR,0xEC);
+	      v2 = inSISIDXREG(SISCR,0xED);
+	      reg2_32 = (v2 << 8) | v1;
+	      outSISIDXREG(SISSR,0x3D,0x00);
+	      reg3_32 = reg2_32 << 1;
+	      reg2_32 >>= 1;
+	      reg3_32 += reg2_32;
+	      v1 = 0x40;
+	      if(reg3_32 > reg1_32) v1 = 0x10;
+	         outSISIDXREG(SISCR,0x59,v1);
+	   }
+
+	}
+
+	v1 = 0x00;
+	if(ivideo->sishw_ext.UseROM) {
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[0x99];
+	}
+	outSISIDXREG(SISSR,0x1f,v1);
+
+	outSISIDXREG(SISSR,0x20,0x20);
+
+	v1 = 0xf6; v2 = 0x0d; v3 = 0x33;
+	if(ivideo->sishw_ext.UseROM) {
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[0x9c];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[0x9d];
+	   v3 = ivideo->sishw_ext.pjVirtualRomBase[0x9e];
+	}
+	outSISIDXREG(SISSR,0x23,v1);
+	outSISIDXREG(SISSR,0x24,v2);
+	outSISIDXREG(SISSR,0x25,v3);
+
+	outSISIDXREG(SISSR,0x21,0x84);
+	outSISIDXREG(SISSR,0x22,0x00);
+	outSISIDXREG(SISSR,0x27,0x1f);
+
+	v1 = 0x00; v2 = 0x00;
+	if(ivideo->sishw_ext.UseROM) {
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[0x9F];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[0xA1];
+	}
+	outSISIDXREG(SISSR,0x31,v1);
+	outSISIDXREG(SISSR,0x33,v2);
+
+	v1 = 0x11;
+	if(ivideo->sishw_ext.UseROM) {
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[0xA0];
+	}
+	v2 = inSISIDXREG(SISPART4,0x00);
+	if((v2 != 1) && (v2 != 2)) v1 &= 0xef;
+	outSISIDXREG(SISSR,0x32,v1);
+
+	/* AGP */
+	pci_read_config_long(pdev, 0x50, &reg1_32);
+	reg1_32 >>= 20;
+	reg1_32 &= 0x0f;
+	if(reg1_32 == 1) {
+	   v1 = 0xAA; v2 = 0x33;
+	   if(ivideo->sishw_ext.UseROM) {
+	      v1 = ivideo->sishw_ext.pjVirtualRomBase[0xF7];
+	      v2 = ivideo->sishw_ext.pjVirtualRomBase[0x9E];
+	   }
+	} else {
+	   v1 = 0x88; v2 = 0x03;
+	   if(ivideo->sishw_ext.UseROM) {
+	      v1 = ivideo->sishw_ext.pjVirtualRomBase[0xF8];
+	      v2 = ivideo->sishw_ext.pjVirtualRomBase[0xF6];
+	   }
+	}
+	outSISIDXREG(SISCR,0x49,v1);
+	outSISIDXREG(SISSR,0x25,v2);
+
+	v1 = inSISIDXREG(SISPART4,0x00);
+	if((v1 == 1) || (v1 == 2)) {
+	   orSISIDXREG(SISPART1,0x2F,0x01);  /* Unlock CRT2 */
+	   outSISIDXREG(SISPART1,0x00,0x00);
+	   v1 = 0x00;
+	   if(ivideo->sishw_ext.UseROM) {
+	      v1 = ivideo->sishw_ext.pjVirtualRomBase[0xb6];
+	   }
+	   outSISIDXREG(SISPART1,0x02,v1);
+	   outSISIDXREG(SISPART1,0x2E,0x08);
+	   outSISIDXREG(SISPART2,0x00,0x1c);
+	   v1 = 0x40; v2 = 0x00; v3 = 0x80;
+	   if(ivideo->sishw_ext.UseROM) {
+	      v1 = ivideo->sishw_ext.pjVirtualRomBase[0xb7];
+	      v2 = ivideo->sishw_ext.pjVirtualRomBase[0xb8];
+	      v3 = ivideo->sishw_ext.pjVirtualRomBase[0xbb];
+	   }
+	   outSISIDXREG(SISPART4,0x0d,v1);
+	   outSISIDXREG(SISPART4,0x0e,v2);
+	   outSISIDXREG(SISPART4,0x10,v3);
+	   outSISIDXREG(SISPART4,0x0F,0x3F);
+
+	   inSISIDXREG(SISPART4,0x01,reg);
+	   if(reg >= 0xb0) {
+	      inSISIDXREG(SISPART4,0x23,reg);
+	      reg &= 0x20;
+	      reg <<= 1;
+	      outSISIDXREG(SISPART4,0x23,reg);
+	   }
+	}
+	outSISIDXREG(SISCR,0x37,0x02); /* Why? */
+
+	outSISIDXREG(SISCR,0x83,0x00);
+	outSISIDXREG(SISCR,0x90,0x00);
+	andSISIDXREG(SISSR,0x5B,0xDF);
+	outSISIDXREG(SISVID,0x00,0x86);
+	outSISIDXREG(SISVID,0x32,0x00);
+	outSISIDXREG(SISVID,0x30,0x00);
+	outSISIDXREG(SISVID,0x32,0x01);
+	outSISIDXREG(SISVID,0x30,0x00);
+	orSISIDXREG(SISCR,0x63,0x80);
+	/* End of Init1 */
+
+	/* Set Mode 0x2e */
+
+	/* Ramsize */
+	orSISIDXREG(SISSR,0x16,0x0f);
+	orSISIDXREG(SISSR,0x18,0xA9);
+	orSISIDXREG(SISSR,0x19,0xA0);
+	orSISIDXREG(SISSR,0x1B,0x30);
+	andSISIDXREG(SISSR,0x17,0xF8);
+	orSISIDXREG(SISSR,0x19,0x03);
+	andSIDIDXREG(SISSR,0x13,0x00);
+
+	/* Need to map max FB size for finding out about RAM size */
+	ivideo->sishw_ext.pjVideoMemoryAddress = ioremap(ivideo->video_base, 0x4000000);
+	if(ivideo->sishw_ext.pjVideoMemoryAddress) {
+	   /* Find out about bus width */
+	   if(memtype <= 1) {
+	      outSISIDXREG(SISSR,0x14,0x02);
+	      andSISIDXREG(SISSR,0x16,0x0F);
+	      orSISIDXREG(SISSR,0x16,0x80);
+
+	      ...
+
+	   } else {
+
+	      ...
+
+	   }
+
+	   /* Find out about size */
+
+
+	   iounmap(ivideo->sishw_ext.pjVideoMemoryAddress);
+	} else {
+	   printk(KERN_DEBUG "sisfb: Failed to map memory for size detection, assuming 8MB\n");
+	   outSISIDXREG(SISSR,0x14,0x??);  /* 8MB, 64bit default */
+	}
+
+	/* AGP (Missing: Checks for VIA and AMD hosts) */
+	v1 = 0xA5; v2 = 0xFB;
+	if(ivideo->sishw_ext.UseROM) {
+	   v1 = ivideo->sishw_ext.pjVirtualRomBase[0x9A];
+	   v2 = ivideo->sishw_ext.pjVirtualRomBase[0x9B];
+	}
+	outSISIDXREG(SISSR,0x21,v1);
+	outSISIDXREG(SISSR,0x22,v2);
+
 #endif
-	
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)	
-	memset(&sis_disp, 0, sizeof(sis_disp));
+	return;
+}
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,74)
-	pci_for_each_dev(pdev) {
+
+int __devinit sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+{
+	struct sisfb_chip_info 	*chipinfo = &sisfb_chip_info[ent->driver_data];
+	struct sis_video_info 	*ivideo = NULL;
+	struct fb_info 		*sis_fb_info = NULL;
+	u16 reg16;
+	u8  reg;
+	int sisvga_enabled = 0, i;
+
+	if(sisfb_off) return -ENXIO;
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,3))
+	sis_fb_info = framebuffer_alloc(sizeof(*ivideo), &pdev->dev);
+	if(!sis_fb_info) return -ENOMEM;
 #else
-	while((pdev = pci_find_device(PCI_VENDOR_ID_SI, PCI_ANY_ID, pdev))) {
+	sis_fb_info = kmalloc(sizeof(*sis_fb_info) + sizeof(*ivideo), GFP_KERNEL);
+	if(!sis_fb_info) return -ENOMEM;
+	memset(sis_fb_info, 0, sizeof(*sis_fb_info) + sizeof(*ivideo));
+	sis_fb_info->par = ((char *)sis_fb_info + sizeof(*sis_fb_info));
 #endif
-		for (b = sisdev_list; b->vendor; b++) {
-			if ((b->vendor == pdev->vendor)
-			    && (b->device == pdev->device)) {
-				pdev_valid = 1;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && defined(NEWFBDEV)
-				sis_fb_info = framebuffer_alloc(0, &pdev->dev);
-#else
-				sis_fb_info = kmalloc(sizeof(*sis_fb_info), GFP_KERNEL);
+
+	ivideo = (struct sis_video_info *)sis_fb_info->par;
+	ivideo->memyselfandi = sis_fb_info;
+
+	if(card_list == NULL) {
+	   ivideo->cardnumber = 0;
+	} else {
+	   struct sis_video_info *countvideo = card_list;
+	   ivideo->cardnumber = 1;
+	   while ((countvideo = countvideo->next) != NULL) ivideo->cardnumber++;
+	}
+
+	strncpy(ivideo->myid, chipinfo->chip_name, 30);
+
+	ivideo->chip_id = pdev->device;
+	pci_read_config_byte(pdev, PCI_REVISION_ID, &ivideo->revision_id);
+	ivideo->sishw_ext.jChipRevision = ivideo->revision_id;
+	pci_read_config_word(pdev, PCI_COMMAND, &reg16);
+	sisvga_enabled = reg16 & 0x01;
+	ivideo->pcibus = pdev->bus->number;
+	ivideo->pcislot = PCI_SLOT(pdev->devfn);
+	ivideo->pcifunc = PCI_FUNC(pdev->devfn);
+	ivideo->subsysvendor = pdev->subsystem_vendor;
+	ivideo->subsysdevice = pdev->subsystem_device;
+#ifdef SIS_CONFIG_COMPAT
+	ivideo->ioctl32registered = 0;
+	ivideo->ioctl32vblankregistered = 0;
 #endif
-				if(!sis_fb_info) return -ENOMEM;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) || (!(defined(NEWFBDEV)))
-				memset(sis_fb_info, 0, sizeof(*sis_fb_info));
+
+#ifndef MODULE
+	if(sisfb_mode_idx == -1) {
+		sisfb_get_vga_mode_from_kernel();
+	}
 #endif
+
+	ivideo->chip = chipinfo->chip;
+	ivideo->sisvga_engine = chipinfo->vgaengine;
+	ivideo->hwcursor_size = chipinfo->hwcursor_size;
+	ivideo->CRT2_write_enable = chipinfo->CRT2_write_enable;
+	ivideo->mni = chipinfo->mni;
+
+	ivideo->detectedpdc  = 0xff;
+	ivideo->detectedpdca = 0xff;
+	ivideo->detectedlcda = 0xff;
+
+	ivideo->sisfb_thismonitor.datavalid = FALSE;
+
+	ivideo->sisfb_parm_mem = sisfb_parm_mem;
+	ivideo->sisfb_accel = sisfb_accel;
+	ivideo->sisfb_ypan = sisfb_ypan;
+	ivideo->sisfb_max = sisfb_max;
+	ivideo->sisfb_userom = sisfb_userom;
+	ivideo->sisfb_useoem = sisfb_useoem;
+	ivideo->sisfb_mode_idx = sisfb_mode_idx;
+	ivideo->sisfb_parm_rate = sisfb_parm_rate;
+	ivideo->sisfb_crt1off = sisfb_crt1off;
+	ivideo->sisfb_forcecrt1 = sisfb_forcecrt1;
+	ivideo->sisfb_crt2type = sisfb_crt2type;
+	ivideo->sisfb_crt2flags = sisfb_crt2flags;
+	/* pdc(a), scalelcd, special timing, lvdshl handled below */
+	ivideo->sisfb_dstn = sisfb_dstn;
+	ivideo->sisfb_fstn = sisfb_fstn;
+	ivideo->sisfb_tvplug = sisfb_tvplug;
+	ivideo->sisfb_tvstd = sisfb_tvstd;
+	ivideo->tvxpos = sisfb_tvxposoffset;
+	ivideo->tvypos = sisfb_tvyposoffset;
+	ivideo->sisfb_filter = sisfb_filter;
+	ivideo->sisfb_nocrt2rate = sisfb_nocrt2rate;
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-				strcpy(sis_fb_info->modename, b->name);
-#else				
-				strcpy(myid, b->name);
-#endif				
-				ivideo.chip_id = pdev->device;
-				pci_read_config_byte(pdev, PCI_REVISION_ID,
-				                     &ivideo.revision_id);
-				pci_read_config_word(pdev, PCI_COMMAND, &reg16);
-				sishw_ext.jChipRevision = ivideo.revision_id;
-				sisvga_enabled = reg16 & 0x01;
-				ivideo.pcibus = pdev->bus->number;
-				ivideo.pcislot = PCI_SLOT(pdev->devfn);
-				ivideo.pcifunc = PCI_FUNC(pdev->devfn);
-				ivideo.subsysvendor = pdev->subsystem_vendor;
-				ivideo.subsysdevice = pdev->subsystem_device;
-				break;
-			}
-		}
+	ivideo->sisfb_inverse = sisfb_inverse;
+#endif
 
-		if (pdev_valid)
-			break;
+	ivideo->refresh_rate = 0;
+	if(ivideo->sisfb_parm_rate != -1) {
+	   ivideo->refresh_rate = ivideo->sisfb_parm_rate;
+	}
+
+	ivideo->SiS_Pr.UsePanelScaler = sisfb_scalelcd;
+	ivideo->SiS_Pr.CenterScreen = -1;
+	ivideo->SiS_Pr.SiS_CustomT = sisfb_specialtiming;
+	ivideo->SiS_Pr.LVDSHL = sisfb_lvdshl;
+
+	ivideo->SiS_Pr.SiS_Backup70xx = 0xff;
+        ivideo->SiS_Pr.SiS_CHOverScan = -1;
+        ivideo->SiS_Pr.SiS_ChSW = FALSE;
+	ivideo->SiS_Pr.SiS_UseLCDA = FALSE;
+	ivideo->SiS_Pr.HaveEMI = FALSE;
+	ivideo->SiS_Pr.HaveEMILCD = FALSE;
+	ivideo->SiS_Pr.OverruleEMI = FALSE;
+	ivideo->SiS_Pr.SiS_SensibleSR11 = FALSE;
+	ivideo->SiS_Pr.SiS_MyCR63 = 0x63;
+	ivideo->SiS_Pr.PDC  = -1;
+	ivideo->SiS_Pr.PDCA = -1;
+#ifdef CONFIG_FB_SIS_315
+	if(ivideo->chip >= SIS_330) {
+	   ivideo->SiS_Pr.SiS_MyCR63 = 0x53;
+	   if(ivideo->chip >= SIS_661) {
+	      ivideo->SiS_Pr.SiS_SensibleSR11 = TRUE;
+	   }
 	}
+#endif
 
-	if (!pdev_valid)
-		return -ENODEV;
+	memcpy(&ivideo->default_var, &my_default_var, sizeof(my_default_var));
 
-	switch (ivideo.chip_id) {
+	pci_set_drvdata(pdev, ivideo);
+
+	/* Patch special cases */
+	if((ivideo->nbridge = sisfb_get_northbridge(ivideo->chip))) {
+		switch(ivideo->nbridge->device) {
 #ifdef CONFIG_FB_SIS_300
-	   case PCI_DEVICE_ID_SI_300:
-		ivideo.chip = SIS_300;
-		sisvga_engine = SIS_300_VGA;
-		sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_300 * 2;  /* New X driver uses 2 buffers */
-		sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_300;
-		break;
-	   case PCI_DEVICE_ID_SI_630_VGA:
-		{
-			ivideo.chip = SIS_630;
-			sisfb_set_reg4(0xCF8, 0x80000000);
-			reg32 = sisfb_get_reg3(0xCFC);
-			if(reg32 == 0x07301039) {
-				ivideo.chip = SIS_730;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-				strcpy(sis_fb_info->modename, "SIS 730");
-#else
-				strcpy(myid, "SIS 730");
-#endif
-			}
-			sisvga_engine = SIS_300_VGA;
-			sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_300 * 2;
-			sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_300;
-			break;
-		}
-	   case PCI_DEVICE_ID_SI_540_VGA:
-		ivideo.chip = SIS_540;
-		sisvga_engine = SIS_300_VGA;
-		sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_300 * 2;
-		sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_300;
-		break;
+		case PCI_DEVICE_ID_SI_730:
+		   	ivideo->chip = SIS_730;
+			strcpy(ivideo->myid, "SiS 730");
+		   	break;
 #endif
 #ifdef CONFIG_FB_SIS_315
-	   case PCI_DEVICE_ID_SI_315H:
-		ivideo.chip = SIS_315H;
-		sisvga_engine = SIS_315_VGA;
-		sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_315 * 2;
-		sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_315;
-		break;
-	   case PCI_DEVICE_ID_SI_315:
-		ivideo.chip = SIS_315;
-		sisvga_engine = SIS_315_VGA;
-		sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_315 * 2;
-		sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_315;
-		break;
-	   case PCI_DEVICE_ID_SI_315PRO:
-		ivideo.chip = SIS_315PRO;
-		sisvga_engine = SIS_315_VGA;
-		sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_315 * 2;
-		sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_315;
-		break;
-	   case PCI_DEVICE_ID_SI_550_VGA:
-		ivideo.chip = SIS_550;
-		sisvga_engine = SIS_315_VGA;
-		sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_315 * 2;
-		sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_315;
-		break;
-	   case PCI_DEVICE_ID_SI_650_VGA:
-	   	{
-			ivideo.chip = SIS_650;  
-			sisfb_set_reg4(0xCF8, 0x80000000);
-			reg32 = sisfb_get_reg3(0xCFC);
-			if(reg32 == 0x07401039) {
-				ivideo.chip = SIS_740;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-				strcpy(sis_fb_info->modename, "SIS 740");
-#else
-				strcpy(myid, "SIS 740");
-#endif
-			}
-			sisvga_engine = SIS_315_VGA;
-			sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_315 * 2;
-			sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_315;
+		case PCI_DEVICE_ID_SI_651:
+			/* ivideo->chip is ok */
+			strcpy(ivideo->myid, "SiS 651");
 			break;
-		}
-	   case PCI_DEVICE_ID_SI_330:
-		ivideo.chip = SIS_330;
-		sisvga_engine = SIS_315_VGA;
-		sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_315 * 2;
-		sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_315;
-		break;
-	   case PCI_DEVICE_ID_SI_660_VGA:
-	   	{
-			sisfb_set_reg4(0xCF8, 0x80000000);
-			reg32 = sisfb_get_reg3(0xCFC);
-			if(reg32 == 0x07601039) {
-				ivideo.chip = SIS_760;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-				strcpy(sis_fb_info->modename, "SIS 760");
-#else
-				strcpy(myid, "SIS 760");
-#endif
-			} else if(reg32 == 0x06601039) {
-				ivideo.chip = SIS_660;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-				strcpy(sis_fb_info->modename, "SIS 660");
-#else
-				strcpy(myid, "SIS 660");
-#endif
-			} else if(reg32 == 0x07411039) {
-				ivideo.chip = SIS_741;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-				strcpy(sis_fb_info->modename, "SIS 741");
-#else
-				strcpy(myid, "SIS 741");
-#endif
-			} else {
-				ivideo.chip = SIS_661;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-				strcpy(sis_fb_info->modename, "SIS 661");
-#else
-				strcpy(myid, "SIS 661");
-#endif
-			}
-			sisvga_engine = SIS_315_VGA;
-			sisfb_hwcursor_size = HW_CURSOR_AREA_SIZE_315 * 2;
-			sisfb_CRT2_write_enable = IND_SIS_CRT2_WRITE_ENABLE_315;
+		case PCI_DEVICE_ID_SI_740:
+		   	ivideo->chip = SIS_740;
+			strcpy(ivideo->myid, "SiS 740");
+			break;
+		case PCI_DEVICE_ID_SI_661:
+		   	ivideo->chip = SIS_661;
+			strcpy(ivideo->myid, "SiS 661");
+			break;
+		case PCI_DEVICE_ID_SI_741:
+		   	ivideo->chip = SIS_741;
+			strcpy(ivideo->myid, "SiS 741");
+			break;
+		case PCI_DEVICE_ID_SI_760:
+		   	ivideo->chip = SIS_760;
+			strcpy(ivideo->myid, "SiS 760");
 			break;
-		}
 #endif
-           default:
-	   	kfree(sis_fb_info);
-	        return -ENODEV;
+		}
 	}
-	sishw_ext.jChipType = ivideo.chip;
 
-	/* for Debug */
-	if( (sishw_ext.jChipType == SIS_315PRO) ||
-	    (sishw_ext.jChipType == SIS_315) )
-		sishw_ext.jChipType = SIS_315H;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+	strcpy(sis_fb_info->modename, ivideo->myid);
+#endif
+
+	ivideo->sishw_ext.jChipType = ivideo->chip;
 
-	ivideo.video_base = pci_resource_start(pdev, 0);
-	ivideo.mmio_base = pci_resource_start(pdev, 1);
-	sishw_ext.ulIOAddress = SiS_Pr.RelIO = pci_resource_start(pdev, 2) + 0x30;
-	ivideo.vga_base = (unsigned short) sishw_ext.ulIOAddress;
+#ifdef CONFIG_FB_SIS_315
+	if((ivideo->sishw_ext.jChipType == SIS_315PRO) ||
+	   (ivideo->sishw_ext.jChipType == SIS_315)) {
+		ivideo->sishw_ext.jChipType = SIS_315H;
+	}
+#endif
 
-	sisfb_mmio_size =  pci_resource_len(pdev, 1);
+	ivideo->video_base = pci_resource_start(pdev, 0);
+	ivideo->mmio_base  = pci_resource_start(pdev, 1);
+	ivideo->mmio_size  = pci_resource_len(pdev, 1);
+	ivideo->SiS_Pr.RelIO = pci_resource_start(pdev, 2) + 0x30;
+	ivideo->sishw_ext.ulIOAddress = ivideo->vga_base = ivideo->SiS_Pr.RelIO;
 
 	if(!sisvga_enabled) {
-	   if(pci_enable_device(pdev)) {
-	      kfree(sis_fb_info);
-	      return -EIO;
-	   }
+	   	if(pci_enable_device(pdev)) {
+	      		pci_set_drvdata(pdev, NULL);
+	      		kfree(sis_fb_info);
+	      		return -EIO;
+	   	}
 	}
 
-	SiS_Pr.SiS_Backup70xx = 0xff;
-        SiS_Pr.SiS_CHOverScan = -1;
-        SiS_Pr.SiS_ChSW = FALSE;
-	SiS_Pr.SiS_UseLCDA = FALSE;
-	SiS_Pr.HaveEMI = FALSE;
-	SiS_Pr.HaveEMILCD = FALSE;
-	SiS_Pr.OverruleEMI = FALSE;
-	SiS_Pr.SiS_SensibleSR11 = FALSE;
-	SiS_Pr.SiS_MyCR63 = 0x63;
-	if(ivideo.chip >= SIS_661) {
-	   SiS_Pr.SiS_SensibleSR11 = TRUE;
-	   SiS_Pr.SiS_MyCR63 = 0x53;
-	}
-	SiSRegInit(&SiS_Pr, sishw_ext.ulIOAddress);
+	SiSRegInit(&ivideo->SiS_Pr, ivideo->sishw_ext.ulIOAddress);
 
 #ifdef CONFIG_FB_SIS_300
-	/* TW: Find PCI systems for Chrontel/GPIO communication setup */
-	if(ivideo.chip == SIS_630) {
-	   int i=0;
+	/* Find PCI systems for Chrontel/GPIO communication setup */
+	if(ivideo->chip == SIS_630) {
+	   i=0;
            do {
-	      if(mychswtable[i].subsysVendor == ivideo.subsysvendor &&
-	         mychswtable[i].subsysCard   == ivideo.subsysdevice) {
-		 SiS_Pr.SiS_ChSW = TRUE;
+	      if(mychswtable[i].subsysVendor == ivideo->subsysvendor &&
+	         mychswtable[i].subsysCard   == ivideo->subsysdevice) {
+		 ivideo->SiS_Pr.SiS_ChSW = TRUE;
 		 printk(KERN_DEBUG "sisfb: Identified [%s %s] requiring Chrontel/GPIO setup\n",
 		        mychswtable[i].vendorName, mychswtable[i].cardName);
 		 break;
@@ -4361,14 +4939,41 @@
 	}
 #endif
 
-        outSISIDXREG(SISSR, IND_SIS_PASSWORD, SIS_PASSWORD);
+        outSISIDXREG(SISSR, 0x05, 0x86);
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)		
-#ifdef MODULE
+	if( (!sisvga_enabled)
+#if !defined(__i386__) && !defined(__x86_64__)
+		  	      || (sisfb_resetcard)
+#endif
+			      			   ) {
+	   	for(i = 0x30; i <= 0x3f; i++) {
+	      		outSISIDXREG(SISCR,i,0x00);
+	   	}
+	}
+
+	/* Find out about current video mode */
 	inSISIDXREG(SISCR,0x34,reg);
+	if(reg & 0x7f) {
+		ivideo->modeprechange = reg & 0x7f;
+	} else {
+		ivideo->modeprechange = 0x03;
+#if defined(__i386__) || defined(__x86_64__)
+		{
+			unsigned char *tt = ioremap(0, 0x1000);
+			if(tt) {
+			   	ivideo->modeprechange = tt[0x449];
+			   	iounmap(tt);
+			}
+		}
+#endif
+	}
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#ifdef MODULE
 	if((reg & 0x80) && (reg != 0xff)) {
-	   if((sisbios_mode[sisfb_mode_idx].mode_no) != 0xFF) {
+	   if((sisbios_mode[ivideo->sisfb_mode_idx].mode_no[ivideo->mni]) != 0xFF) {
 	      printk(KERN_INFO "sisfb: Cannot initialize display mode, X server is active\n");
+	      pci_set_drvdata(pdev, NULL);
 	      kfree(sis_fb_info);
 	      return -EBUSY;
 	   }
@@ -4376,96 +4981,82 @@
 #endif	
 #endif
 
-	if (sisvga_engine == SIS_315_VGA) {
-		switch (ivideo.chip) {
-		   case SIS_315H:
-		   case SIS_315:
-		   case SIS_330:
-			sishw_ext.bIntegratedMMEnabled = TRUE;
-			break;
-		   case SIS_550:
-		   case SIS_650:
-		   case SIS_740:
-		   case SIS_661:
-		   case SIS_741:
-		   case SIS_660:
-		   case SIS_760:
-			sishw_ext.bIntegratedMMEnabled = TRUE;
-			break;
-		   default:
-			break;
-		}
-	} else if (sisvga_engine == SIS_300_VGA) {
-		if (ivideo.chip == SIS_300) {
-			sishw_ext.bIntegratedMMEnabled = TRUE;
-		} else {
-		        inSISIDXREG(SISSR, IND_SIS_SCRATCH_REG_1A, reg);
-			if (reg & SIS_SCRATCH_REG_1A_MASK)
-				sishw_ext.bIntegratedMMEnabled = TRUE;
-			else
-				sishw_ext.bIntegratedMMEnabled = FALSE;
-		}
+	ivideo->sishw_ext.bIntegratedMMEnabled = TRUE;
+#ifdef CONFIG_FB_SIS_300
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
+	   if(ivideo->chip != SIS_300) {
+	      inSISIDXREG(SISSR, 0x1a, reg);
+	      if(!(reg & 0x10)) {
+		 ivideo->sishw_ext.bIntegratedMMEnabled = FALSE;
+	      }
+	   }
 	}
+#endif
 
-	if(sisfb_userom) {
-	    sishw_ext.pjVirtualRomBase = sis_find_rom();
-	    if(sishw_ext.pjVirtualRomBase) {
-		printk(KERN_INFO "sisfb: Video ROM found and mapped to %p\n",
-		        sishw_ext.pjVirtualRomBase);
-		sishw_ext.UseROM = TRUE;
+	ivideo->bios_vbase = ivideo->bios_abase = NULL;
+	if(ivideo->sisfb_userom) {
+	    ivideo->sishw_ext.pjVirtualRomBase = sis_find_rom(pdev);
+#if defined(__i386__) || defined(__x86_64__)
+	    ivideo->bios_vbase = ivideo->sishw_ext.pjVirtualRomBase;	/* mapped */
+#else
+	    ivideo->bios_abase = ivideo->sishw_ext.pjVirtualRomBase;	/* allocated */
+#endif
+	    if(ivideo->sishw_ext.pjVirtualRomBase) {
+		printk(KERN_INFO "sisfb: Video ROM found and %s to 0x%p\n",
+			ivideo->bios_vbase ? "mapped" : "copied",
+		        ivideo->sishw_ext.pjVirtualRomBase);
+		ivideo->sishw_ext.UseROM = TRUE;
 	    } else {
-	        sishw_ext.UseROM = FALSE;
+	        ivideo->sishw_ext.UseROM = FALSE;
 	        printk(KERN_INFO "sisfb: Video ROM not found\n");
 	    }
 	} else {
-	    sishw_ext.pjVirtualRomBase = NULL;
-	    sishw_ext.UseROM = FALSE;
+	    ivideo->sishw_ext.pjVirtualRomBase = NULL;
+	    ivideo->sishw_ext.UseROM = FALSE;
 	    printk(KERN_INFO "sisfb: Video ROM usage disabled\n");
 	}
-	sishw_ext.bSkipDramSizing = 0;
-	sishw_ext.pQueryVGAConfigSpace = &sisfb_query_VGA_config_space;
-	sishw_ext.pQueryNorthBridgeSpace = &sisfb_query_north_bridge_space;
 
         /* Find systems for special custom timing */
-	if(SiS_Pr.SiS_CustomT == CUT_NONE) {
-	   int i=0, j;
+	if(ivideo->SiS_Pr.SiS_CustomT == CUT_NONE) {
+	   int j;
 	   unsigned char *biosver = NULL;
            unsigned char *biosdate = NULL;
 	   BOOLEAN footprint;
-	   unsigned long chksum = 0;
+	   u32 chksum = 0;
 
-	   if(sishw_ext.UseROM) {
-	      biosver = sishw_ext.pjVirtualRomBase + 0x06;
-	      biosdate = sishw_ext.pjVirtualRomBase + 0x2c;
-              for(i=0; i<32768; i++) chksum += sishw_ext.pjVirtualRomBase[i];
+	   if(ivideo->sishw_ext.UseROM) {
+	      biosver = ivideo->sishw_ext.pjVirtualRomBase + 0x06;
+	      biosdate = ivideo->sishw_ext.pjVirtualRomBase + 0x2c;
+              for(i=0; i<32768; i++) chksum += ivideo->sishw_ext.pjVirtualRomBase[i];
 	   }
 
 	   i=0;
            do {
-	      if( (mycustomttable[i].chipID == ivideo.chip) &&
+	      if( (mycustomttable[i].chipID == ivideo->chip) &&
 	          ((!strlen(mycustomttable[i].biosversion)) ||
-		   (sishw_ext.UseROM &&
+		   (ivideo->sishw_ext.UseROM &&
 		   (!strncmp(mycustomttable[i].biosversion, biosver, strlen(mycustomttable[i].biosversion))))) &&
 	          ((!strlen(mycustomttable[i].biosdate)) ||
-		   (sishw_ext.UseROM &&
+		   (ivideo->sishw_ext.UseROM &&
 		   (!strncmp(mycustomttable[i].biosdate, biosdate, strlen(mycustomttable[i].biosdate))))) &&
 		  ((!mycustomttable[i].bioschksum) ||
-		   (sishw_ext.UseROM &&
+		   (ivideo->sishw_ext.UseROM &&
 	           (mycustomttable[i].bioschksum == chksum)))	&&
-		  (mycustomttable[i].pcisubsysvendor == ivideo.subsysvendor) &&
-		  (mycustomttable[i].pcisubsyscard == ivideo.subsysdevice) ) {
+		  (mycustomttable[i].pcisubsysvendor == ivideo->subsysvendor) &&
+		  (mycustomttable[i].pcisubsyscard == ivideo->subsysdevice) ) {
 		 footprint = TRUE;
-	         for(j=0; j<5; j++) {
+	         for(j = 0; j < 5; j++) {
 	            if(mycustomttable[i].biosFootprintAddr[j]) {
-		       if(sishw_ext.UseROM) {
-	                  if(sishw_ext.pjVirtualRomBase[mycustomttable[i].biosFootprintAddr[j]] !=
-		      		mycustomttable[i].biosFootprintData[j])
-		          footprint = FALSE;
+		       if(ivideo->sishw_ext.UseROM) {
+	                  if(ivideo->sishw_ext.pjVirtualRomBase[mycustomttable[i].biosFootprintAddr[j]] !=
+		      		mycustomttable[i].biosFootprintData[j]) {
+		             footprint = FALSE;
+			  }
 		       } else footprint = FALSE;
 		    }
 	         }
 	         if(footprint) {
-	 	    SiS_Pr.SiS_CustomT = mycustomttable[i].SpecialID;
+	 	    ivideo->SiS_Pr.SiS_CustomT = mycustomttable[i].SpecialID;
 		    printk(KERN_DEBUG "sisfb: Identified [%s %s], special timing applies\n",
 		        mycustomttable[i].vendorName,
 			mycustomttable[i].cardName);
@@ -4479,466 +5070,502 @@
 	}
 
 #ifdef CONFIG_FB_SIS_300
-	/* Mode numbers for 1280x768 are different for 300 and 315 series */
-	if(sisvga_engine == SIS_300_VGA) {
-		sisbios_mode[MODEINDEX_1280x768].mode_no = 0x55;
-		sisbios_mode[MODEINDEX_1280x768+1].mode_no = 0x5a;
-		sisbios_mode[MODEINDEX_1280x768+2].mode_no = 0x5b;
-		sisbios_mode[MODEINDEX_1280x768+3].mode_no = 0x5b;
-	}
-#endif
-
-	sishw_ext.pSR = vmalloc(sizeof(SIS_DSReg) * SR_BUFFER_SIZE);
-	if (sishw_ext.pSR == NULL) {
-		printk(KERN_ERR "sisfb: Fatal error: Allocating SRReg space failed.\n");
-		kfree(sis_fb_info);
-		return -ENODEV;
-	}
-	sishw_ext.pSR[0].jIdx = sishw_ext.pSR[0].jVal = 0xFF;
-
-	sishw_ext.pCR = vmalloc(sizeof(SIS_DSReg) * CR_BUFFER_SIZE);
-	if (sishw_ext.pCR == NULL) {
-	        vfree(sishw_ext.pSR);
-		printk(KERN_ERR "sisfb: Fatal error: Allocating CRReg space failed.\n");
-		kfree(sis_fb_info);
-		return -ENODEV;
-	}
-	sishw_ext.pCR[0].jIdx = sishw_ext.pCR[0].jVal = 0xFF;
-
-#ifdef CONFIG_FB_SIS_300
-	if(sisvga_engine == SIS_300_VGA) {
-		if(!sisvga_enabled) {
-		        /* Mapping Max FB Size for 300 Init */
-			sishw_ext.pjVideoMemoryAddress = ioremap(ivideo.video_base, 0x4000000);
-			if((sisfb_mode_idx < 0) || ((sisbios_mode[sisfb_mode_idx].mode_no) != 0xFF)) {
-				outSISIDXREG(SISSR, IND_SIS_PASSWORD, SIS_PASSWORD);
+	if(ivideo->sisvga_engine == SIS_300_VGA) {
+		if( (!sisvga_enabled)
+#if !defined(__i386__) && !defined(__x86_64__)
+		    		      || (sisfb_resetcard)
+#endif
+		  					   ) {
+			if(ivideo->chip == SIS_300) {
+				sisfb_post_sis300(pdev);
 			}
 		}
-		if(sisfb_get_dram_size_300()) {
-		        vfree(sishw_ext.pSR);
-			vfree(sishw_ext.pCR);
-			printk(KERN_ERR "sisfb: Fatal error: Unable to determine RAM size\n");
-			kfree(sis_fb_info);
-			return -ENODEV;
-		}
 	}
 #endif
 
 #ifdef CONFIG_FB_SIS_315
-	if (sisvga_engine == SIS_315_VGA) {
-		if (!sisvga_enabled) {
-			/* Mapping Max FB Size for 315 Init */
-			sishw_ext.pjVideoMemoryAddress = ioremap(ivideo.video_base, 0x8000000);
-			if((sisfb_mode_idx < 0) || ((sisbios_mode[sisfb_mode_idx].mode_no) != 0xFF)) {
-				outSISIDXREG(SISSR, IND_SIS_PASSWORD, SIS_PASSWORD);
-				sishw_ext.bSkipDramSizing = TRUE;
-				sishw_ext.pSR[0].jIdx = 0x13;
-				sishw_ext.pSR[1].jIdx = 0x14;
-				sishw_ext.pSR[2].jIdx = 0xFF;
-				inSISIDXREG(SISSR, 0x13, sishw_ext.pSR[0].jVal);
-				inSISIDXREG(SISSR, 0x14, sishw_ext.pSR[1].jVal);
-				sishw_ext.pSR[2].jVal = 0xFF;
+	if(ivideo->sisvga_engine == SIS_315_VGA) {
+		if( (!sisvga_enabled)
+#if !defined(__i386__) && !defined(__x86_64__)
+		    		     || (sisfb_resetcard)
+#endif
+		  					  ) {
+			if((ivideo->chip == SIS_315H)   ||
+			   (ivideo->chip == SIS_315)    ||
+			   (ivideo->chip == SIS_315PRO) ||
+			   (ivideo->chip == SIS_330)) {
+				sisfb_post_sis315330(pdev);
 			}
 		}
-		if(sisfb_get_dram_size_315()) {
-			vfree(sishw_ext.pSR);
-			vfree(sishw_ext.pCR);
-			printk(KERN_INFO "sisfb: Fatal error: Unable to determine RAM size.\n");
-			kfree(sis_fb_info);
-			return -ENODEV;
-		}
 	}
 #endif
 
-	if((sisfb_mode_idx < 0) || ((sisbios_mode[sisfb_mode_idx].mode_no) != 0xFF)) { 
+	if(sisfb_get_dram_size(ivideo)) {
+		printk(KERN_INFO "sisfb: Fatal error: Unable to determine RAM size.\n");
+		if(ivideo->bios_abase) vfree(ivideo->bios_abase);
+		pci_set_drvdata(pdev, NULL);
+		kfree(sis_fb_info);
+		return -ENODEV;
+	}
 
+	if((ivideo->sisfb_mode_idx < 0) ||
+	   ((sisbios_mode[ivideo->sisfb_mode_idx].mode_no[ivideo->mni]) != 0xFF)) {
 	        /* Enable PCI_LINEAR_ADDRESSING and MMIO_ENABLE  */
 	        orSISIDXREG(SISSR, IND_SIS_PCI_ADDRESS_SET, (SIS_PCI_ADDR_ENABLE | SIS_MEM_MAP_IO_ENABLE));
-
                 /* Enable 2D accelerator engine */
 	        orSISIDXREG(SISSR, IND_SIS_MODULE_ENABLE, SIS_ENABLE_2D);
-
 	}
 
-	sishw_ext.ulVideoMemorySize = ivideo.video_size;
-
-	if(sisvga_engine == SIS_300_VGA) sisfb_pdc &= 0x3c;
-	if(sisfb_pdc) {
-	    SiS_Pr.PDC = sisfb_pdc;
-	} else {
-	    SiS_Pr.PDC = 0;
+	if(sisfb_pdc != 0xff) {
+	   if(ivideo->sisvga_engine == SIS_300_VGA) sisfb_pdc &= 0x3c;
+	   else				            sisfb_pdc &= 0x1f;
+	   ivideo->SiS_Pr.PDC = sisfb_pdc;
 	}
+#ifdef CONFIG_FB_SIS_315
+	if(ivideo->sisvga_engine == SIS_315_VGA) {
+	   if(sisfb_pdca != 0xff) ivideo->SiS_Pr.PDCA = sisfb_pdca & 0x1f;
+	}
+#endif
 
-	if(!request_mem_region(ivideo.video_base, ivideo.video_size, "sisfb FB")) {
+	if(!request_mem_region(ivideo->video_base, ivideo->video_size, "sisfb FB")) {
 		printk(KERN_ERR "sisfb: Fatal error: Unable to reserve frame buffer memory\n");
 		printk(KERN_ERR "sisfb: Is there another framebuffer driver active?\n");
-		vfree(sishw_ext.pSR);
-		vfree(sishw_ext.pCR);
+		if(ivideo->bios_abase) vfree(ivideo->bios_abase);
+		if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
+		pci_set_drvdata(pdev, NULL);
 		kfree(sis_fb_info);
 		return -ENODEV;
 	}
 
-	if(!request_mem_region(ivideo.mmio_base, sisfb_mmio_size, "sisfb MMIO")) {
+	if(!request_mem_region(ivideo->mmio_base, ivideo->mmio_size, "sisfb MMIO")) {
 		printk(KERN_ERR "sisfb: Fatal error: Unable to reserve MMIO region\n");
-		release_mem_region(ivideo.video_base, ivideo.video_size);
-		vfree(sishw_ext.pSR);
-		vfree(sishw_ext.pCR);
+		release_mem_region(ivideo->video_base, ivideo->video_size);
+		if(ivideo->bios_abase) vfree(ivideo->bios_abase);
+		if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
+		pci_set_drvdata(pdev, NULL);
 		kfree(sis_fb_info);
 		return -ENODEV;
 	}
 
-	ivideo.video_vbase = sishw_ext.pjVideoMemoryAddress = ioremap(ivideo.video_base, ivideo.video_size);
-	if(!ivideo.video_vbase) {
+	ivideo->video_vbase = (unsigned long)ioremap(ivideo->video_base, ivideo->video_size);
+	ivideo->sishw_ext.pjVideoMemoryAddress = (unsigned char *)ivideo->video_vbase;
+	if(!ivideo->video_vbase) {
 	   	printk(KERN_ERR "sisfb: Fatal error: Unable to map frame buffer memory\n");
-	   	release_mem_region(ivideo.video_base, ivideo.video_size);
-	   	release_mem_region(ivideo.mmio_base, sisfb_mmio_size);
-	   	vfree(sishw_ext.pSR);
-	   	vfree(sishw_ext.pCR);
+	   	release_mem_region(ivideo->video_base, ivideo->video_size);
+	   	release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
+		if(ivideo->bios_abase) vfree(ivideo->bios_abase);
+		if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
+		pci_set_drvdata(pdev, NULL);
 	   	kfree(sis_fb_info);
 	   	return -ENODEV;
 	}
 
-	ivideo.mmio_vbase = ioremap(ivideo.mmio_base, sisfb_mmio_size);
-	if(!ivideo.mmio_vbase) {
+	ivideo->mmio_vbase = (unsigned long)ioremap(ivideo->mmio_base, ivideo->mmio_size);
+	if(!ivideo->mmio_vbase) {
 	   	printk(KERN_ERR "sisfb: Fatal error: Unable to map MMIO region\n");
-	   	iounmap(ivideo.video_vbase);
-	   	release_mem_region(ivideo.video_base, ivideo.video_size);
-	   	release_mem_region(ivideo.mmio_base, sisfb_mmio_size);
-	   	vfree(sishw_ext.pSR);
-	   	vfree(sishw_ext.pCR);
+	   	iounmap((void *)ivideo->video_vbase);
+	   	release_mem_region(ivideo->video_base, ivideo->video_size);
+	   	release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
+		if(ivideo->bios_abase) vfree(ivideo->bios_abase);
+		if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
+		pci_set_drvdata(pdev, NULL);
 	   	kfree(sis_fb_info);
 	   	return -ENODEV;
 	}
 
-	printk(KERN_INFO "sisfb: Framebuffer at 0x%lx, mapped to 0x%p, size %dk\n",
-	       	ivideo.video_base, ivideo.video_vbase, ivideo.video_size / 1024);
+	printk(KERN_INFO "sisfb: Framebuffer at 0x%lx, mapped to 0x%lx, size %ldk\n",
+	       	ivideo->video_base, ivideo->video_vbase, ivideo->video_size / 1024);
 
-	printk(KERN_INFO "sisfb: MMIO at 0x%lx, mapped to 0x%p, size %ldk\n",
-	       	ivideo.mmio_base, ivideo.mmio_vbase, sisfb_mmio_size / 1024);
+	printk(KERN_INFO "sisfb: MMIO at 0x%lx, mapped to 0x%lx, size %ldk\n",
+	       	ivideo->mmio_base, ivideo->mmio_vbase, ivideo->mmio_size / 1024);
 
-	if(sisfb_heap_init()) {
+	if((ivideo->havenoheap = sisfb_heap_init(ivideo))) {
 		printk(KERN_WARNING "sisfb: Failed to initialize offscreen memory heap\n");
 	}
 
-	ivideo.mtrr = (unsigned int) 0;
+	/* Used for clearing the screen only, therefore respect our mem limit */
+	ivideo->sishw_ext.ulVideoMemorySize = ivideo->sisfb_mem;
 
-	ivideo.vbflags = 0;
+	ivideo->mtrr = 0;
 
-	if((sisfb_mode_idx < 0) || ((sisbios_mode[sisfb_mode_idx].mode_no) != 0xFF)) {
+	ivideo->vbflags = 0;
+	ivideo->lcddefmodeidx = DEFAULT_LCDMODE;
+	ivideo->tvdefmodeidx  = DEFAULT_TVMODE;
+	ivideo->defmodeidx    = DEFAULT_MODE;
 
-		sishw_ext.ujVBChipID = VB_CHIP_UNKNOWN;
-		sishw_ext.Is301BDH = FALSE;
-		sishw_ext.usExternalChip = 0;
+	ivideo->newrom = SiSDetermineROMLayout661(&ivideo->SiS_Pr, &ivideo->sishw_ext);
 
-		sisfb_sense_crt1();
+	if((ivideo->sisfb_mode_idx < 0) ||
+	   ((sisbios_mode[ivideo->sisfb_mode_idx].mode_no[ivideo->mni]) != 0xFF)) {
 
-		sisfb_get_VB_type();
+		sisfb_sense_crt1(ivideo);
 
-		if(ivideo.vbflags & VB_VIDEOBRIDGE) {
-			sisfb_detect_VB_connect();
+		sisfb_get_VB_type(ivideo);
+
+		if(ivideo->vbflags & VB_VIDEOBRIDGE) {
+			sisfb_detect_VB_connect(ivideo);
 		}
 
-		ivideo.currentvbflags = ivideo.vbflags & VB_VIDEOBRIDGE;
+		ivideo->currentvbflags = ivideo->vbflags & (VB_VIDEOBRIDGE | TV_STANDARD);
 
-		if(ivideo.vbflags & VB_VIDEOBRIDGE) {
-		   if(sisfb_crt2type != -1) {
-		      if((sisfb_crt2type == CRT2_LCD) && (ivideo.vbflags & CRT2_LCD)) {
-		         ivideo.currentvbflags |= CRT2_LCD;
-		      } else if(sisfb_crt2type != CRT2_LCD) {
-		         ivideo.currentvbflags |= sisfb_crt2type;
+		if(ivideo->vbflags & VB_VIDEOBRIDGE) {
+		   if(ivideo->sisfb_crt2type != -1) {
+		      if((ivideo->sisfb_crt2type == CRT2_LCD) && (ivideo->vbflags & CRT2_LCD)) {
+		         ivideo->currentvbflags |= CRT2_LCD;
+		      } else if(ivideo->sisfb_crt2type != CRT2_LCD) {
+		         ivideo->currentvbflags |= ivideo->sisfb_crt2type;
 		      }
 		   } else {
 		      /* Chrontel 700x TV detection often unreliable, therefore use a
 		       * different default order on such machines
 		       */
-		      if((sisvga_engine == SIS_300_VGA) && (ivideo.vbflags & VB_CHRONTEL)) {
-		         if(ivideo.vbflags & CRT2_LCD)      ivideo.currentvbflags |= CRT2_LCD;
-		         else if(ivideo.vbflags & CRT2_TV)  ivideo.currentvbflags |= CRT2_TV;
-		         else if(ivideo.vbflags & CRT2_VGA) ivideo.currentvbflags |= CRT2_VGA;
+		      if((ivideo->sisvga_engine == SIS_300_VGA) && (ivideo->vbflags & VB_CHRONTEL)) {
+		         if(ivideo->vbflags & CRT2_LCD)      ivideo->currentvbflags |= CRT2_LCD;
+		         else if(ivideo->vbflags & CRT2_TV)  ivideo->currentvbflags |= CRT2_TV;
+		         else if(ivideo->vbflags & CRT2_VGA) ivideo->currentvbflags |= CRT2_VGA;
 		      } else {
-		         if(ivideo.vbflags & CRT2_TV)       ivideo.currentvbflags |= CRT2_TV;
-		         else if(ivideo.vbflags & CRT2_LCD) ivideo.currentvbflags |= CRT2_LCD;
-		         else if(ivideo.vbflags & CRT2_VGA) ivideo.currentvbflags |= CRT2_VGA;
+		         if(ivideo->vbflags & CRT2_TV)       ivideo->currentvbflags |= CRT2_TV;
+		         else if(ivideo->vbflags & CRT2_LCD) ivideo->currentvbflags |= CRT2_LCD;
+		         else if(ivideo->vbflags & CRT2_VGA) ivideo->currentvbflags |= CRT2_VGA;
 		      }
 		   }
 		}
 
-		if(ivideo.vbflags & CRT2_LCD) {
-		   inSISIDXREG(SISCR, IND_SIS_LCD_PANEL, reg);
+		if(ivideo->vbflags & CRT2_LCD) {
+		   inSISIDXREG(SISCR, 0x36, reg);
 		   reg &= 0x0f;
-		   if(sisvga_engine == SIS_300_VGA) {
-		      sishw_ext.ulCRT2LCDType = sis300paneltype[reg];
+		   if(ivideo->sisvga_engine == SIS_300_VGA) {
+		      ivideo->sishw_ext.ulCRT2LCDType = sis300paneltype[reg];
+		   } else if(ivideo->chip >= SIS_661) {
+		      ivideo->sishw_ext.ulCRT2LCDType = sis661paneltype[reg];
 		   } else {
-		      sishw_ext.ulCRT2LCDType = sis310paneltype[reg];
+		      ivideo->sishw_ext.ulCRT2LCDType = sis310paneltype[reg];
+		      if((ivideo->chip == SIS_550) && (sisfb_fstn)) {
+		         if((ivideo->sishw_ext.ulCRT2LCDType != LCD_640x480_2) &&
+			    (ivideo->sishw_ext.ulCRT2LCDType != LCD_640x480_3)) {
+		      	    ivideo->sishw_ext.ulCRT2LCDType = LCD_320x480;
+			 }
+		      }
+		   }
+		   if(ivideo->sishw_ext.ulCRT2LCDType == LCD_UNKNOWN) {
+		      ivideo->sishw_ext.ulCRT2LCDType = LCD_1024x768;
+		      printk(KERN_DEBUG "sisfb: Illegal panel ID (%02x), assuming 1024x768\n", reg);
+		   }
+		   for(i = 0; i < SIS_LCD_NUMBER; i++) {
+		      if(ivideo->sishw_ext.ulCRT2LCDType == sis_lcd_data[i].lcdtype) {
+		         ivideo->lcdxres = sis_lcd_data[i].xres;
+			 ivideo->lcdyres = sis_lcd_data[i].yres;
+			 ivideo->lcddefmodeidx = sis_lcd_data[i].default_mode_idx;
+			 break;
+		      }
 		   }
+		   if(ivideo->SiS_Pr.SiS_CustomT == CUT_BARCO1366) {
+	   		ivideo->lcdxres = 1360; ivideo->lcdyres = 1024; ivideo->lcddefmodeidx = 99;
+		   } else if(ivideo->SiS_Pr.SiS_CustomT == CUT_PANEL848) {
+	   		ivideo->lcdxres =  848; ivideo->lcdyres =  480; ivideo->lcddefmodeidx = 47;
+		   }
+		   printk(KERN_DEBUG "sisfb: Detected %dx%d flat panel\n",
+		   		ivideo->lcdxres, ivideo->lcdyres);
 		}
-		
-		sisfb_detectedpdc = 0;
 
 #ifdef CONFIG_FB_SIS_300
                 /* Save the current PanelDelayCompensation if the LCD is currently used */
-		if(sisvga_engine == SIS_300_VGA) {
-	           if(ivideo.vbflags & (VB_LVDS | VB_30xBDH)) {
+		if(ivideo->sisvga_engine == SIS_300_VGA) {
+	           if(ivideo->vbflags & (VB_LVDS | VB_30xBDH)) {
 		       int tmp;
 		       inSISIDXREG(SISCR,0x30,tmp);
 		       if(tmp & 0x20) {
 		          /* Currently on LCD? If yes, read current pdc */
-		          inSISIDXREG(SISPART1,0x13,sisfb_detectedpdc);
-			  sisfb_detectedpdc &= 0x3c;
-			  if(SiS_Pr.PDC == 0) {
+		          inSISIDXREG(SISPART1,0x13,ivideo->detectedpdc);
+			  ivideo->detectedpdc &= 0x3c;
+			  if(ivideo->SiS_Pr.PDC == -1) {
 			     /* Let option override detection */
-			     SiS_Pr.PDC = sisfb_detectedpdc;
+			     ivideo->SiS_Pr.PDC = ivideo->detectedpdc;
 			  }
-			  printk(KERN_INFO
-			         "sisfb: Detected LCD PanelDelayCompensation %d\n",
-  			         sisfb_detectedpdc);
+			  printk(KERN_INFO "sisfb: Detected LCD PDC 0x%02x\n",
+  			         ivideo->detectedpdc);
 		       }
-		       if((SiS_Pr.PDC) && (SiS_Pr.PDC != sisfb_detectedpdc)) {
-		          printk(KERN_INFO
-			         "sisfb: Using LCD PanelDelayCompensation %d\n",
-				 SiS_Pr.PDC);
+		       if((ivideo->SiS_Pr.PDC != -1) && (ivideo->SiS_Pr.PDC != ivideo->detectedpdc)) {
+		          printk(KERN_INFO "sisfb: Using LCD PDC 0x%02x\n",
+				 ivideo->SiS_Pr.PDC);
 		       }
 	           }
 		}
 #endif
 
-	        sisfb_detectedlcda = 0xff;
-
 #ifdef CONFIG_FB_SIS_315
+		if(ivideo->sisvga_engine == SIS_315_VGA) {
+
+		   /* Try to find about LCDA */
+		   if(ivideo->vbflags & (VB_301C | VB_302B | VB_301LV | VB_302LV | VB_302ELV)) {
+		      int tmp;
+		      inSISIDXREG(SISPART1,0x13,tmp);
+		      if(tmp & 0x04) {
+		         ivideo->SiS_Pr.SiS_UseLCDA = TRUE;
+		         ivideo->detectedlcda = 0x03;
+		      }
+	           }
 
-		if(sisvga_engine == SIS_315_VGA) {
 		   /* Save PDC */
-		   if(ivideo.vbflags & (VB_301LV | VB_302LV | VB_302ELV)) {
+		   if(ivideo->vbflags & (VB_301LV | VB_302LV | VB_302ELV)) {
 		      int tmp;
 		      inSISIDXREG(SISCR,0x30,tmp);
-		      if(tmp & 0x20) {
+		      if((tmp & 0x20) || (ivideo->detectedlcda != 0xff)) {
 		         /* Currently on LCD? If yes, read current pdc */
-		         inSISIDXREG(SISPART1,0x2D,sisfb_detectedpdc);
-			 if(SiS_Pr.PDC == 0) {
-			    /* Let option override detection */
-			    SiS_Pr.PDC = sisfb_detectedpdc;
+			 u8 pdc;
+		         inSISIDXREG(SISPART1,0x2D,pdc);
+			 ivideo->detectedpdc  = (pdc & 0x0f) << 1;
+			 ivideo->detectedpdca = (pdc & 0xf0) >> 3;
+			 inSISIDXREG(SISPART1,0x35,pdc);
+			 ivideo->detectedpdc |= ((pdc >> 7) & 0x01);
+			 inSISIDXREG(SISPART1,0x20,pdc);
+			 ivideo->detectedpdca |= ((pdc >> 6) & 0x01);
+			 if(ivideo->newrom) {
+			    /* New ROM invalidates other PDC resp. */
+			    if(ivideo->detectedlcda != 0xff) {
+			       ivideo->detectedpdc = 0xff;
+			    } else {
+			       ivideo->detectedpdca = 0xff;
+			    }
+			 }
+			 if(ivideo->SiS_Pr.PDC == -1) {
+			    if(ivideo->detectedpdc != 0xff) {
+			       ivideo->SiS_Pr.PDC = ivideo->detectedpdc;
+			    }
+			 }
+			 if(ivideo->SiS_Pr.PDCA == -1) {
+			    if(ivideo->detectedpdca != 0xff) {
+			       ivideo->SiS_Pr.PDCA = ivideo->detectedpdca;
+			    }
+			 }
+			 if(ivideo->detectedpdc != 0xff) {
+			    printk(KERN_INFO
+			         "sisfb: Detected LCD PDC 0x%02x (for LCD=CRT2)\n",
+  			          ivideo->detectedpdc);
+			 }
+			 if(ivideo->detectedpdca != 0xff) {
+			    printk(KERN_INFO
+			         "sisfb: Detected LCD PDC1 0x%02x (for LCD=CRT1)\n",
+  			          ivideo->detectedpdca);
 			 }
-			 printk(KERN_INFO
-			        "sisfb: Detected LCD PanelDelayCompensation %d\n",
-  			         sisfb_detectedpdc);
-		      }
-		      if((SiS_Pr.PDC) && (SiS_Pr.PDC != sisfb_detectedpdc)) {
-		         printk(KERN_INFO
-			         "sisfb: Using LCD PanelDelayCompensation %d\n",
-				 SiS_Pr.PDC);
 		      }
+
 		      /* Save EMI */
-		      if(ivideo.vbflags & (VB_302LV | VB_302ELV)) {
-		         inSISIDXREG(SISPART4,0x30,SiS_Pr.EMI_30);
-			 inSISIDXREG(SISPART4,0x31,SiS_Pr.EMI_31);
-			 inSISIDXREG(SISPART4,0x32,SiS_Pr.EMI_32);
-			 inSISIDXREG(SISPART4,0x33,SiS_Pr.EMI_33);
-			 SiS_Pr.HaveEMI = TRUE;
-			 if(tmp & 0x20) SiS_Pr.HaveEMILCD = TRUE;
+		      if(ivideo->vbflags & (VB_302LV | VB_302ELV)) {
+		         inSISIDXREG(SISPART4,0x30,ivideo->SiS_Pr.EMI_30);
+			 inSISIDXREG(SISPART4,0x31,ivideo->SiS_Pr.EMI_31);
+			 inSISIDXREG(SISPART4,0x32,ivideo->SiS_Pr.EMI_32);
+			 inSISIDXREG(SISPART4,0x33,ivideo->SiS_Pr.EMI_33);
+			 ivideo->SiS_Pr.HaveEMI = TRUE;
+			 if((tmp & 0x20) || (ivideo->detectedlcda != 0xff)) {
+			  	ivideo->SiS_Pr.HaveEMILCD = TRUE;
+			 }
 		      }
 		   }
 
-		   /* Try to find about LCDA */
-		   if(ivideo.vbflags & (VB_301C | VB_302B | VB_301LV | VB_302LV | VB_302ELV)) {
-		      int tmp;
-		      inSISIDXREG(SISCR,0x34,tmp);
-		      if((tmp <= 0x13) || (tmp == 0xff)) {
-		         /* Currently on LCDA? (Some BIOSes leave CR38) */
-		         inSISIDXREG(SISCR,0x38,tmp);
-			 if((tmp & 0x03) == 0x03)  SiS_Pr.SiS_UseLCDA = TRUE;
-			 else {
-			    /* Currently on LCDA? (Some newer BIOSes set D0 in CR35) */
-			    inSISIDXREG(SISCR,0x35,tmp);
-			    if(tmp & 0x01) SiS_Pr.SiS_UseLCDA = TRUE;
-			    else {
-			       /* Currently on LCD? If so, we can find out
-			        * by peeking the mode register
-				*/
-			       inSISIDXREG(SISCR,0x30,tmp);
-			       if(tmp & 0x20) {
-			          inSISIDXREG(SISPART1,0x13,tmp);
-				  if(tmp & 0x04) SiS_Pr.SiS_UseLCDA = TRUE;
-			       }
-			    }
-			 }
+		   /* Let user override detected PDCs (all bridges) */
+		   if(ivideo->vbflags & (VB_301B | VB_301C | VB_301LV | VB_302LV | VB_302ELV)) {
+		      if((ivideo->SiS_Pr.PDC != -1) && (ivideo->SiS_Pr.PDC != ivideo->detectedpdc)) {
+		         printk(KERN_INFO "sisfb: Using LCD PDC 0x%02x (for LCD=CRT2)\n",
+				 ivideo->SiS_Pr.PDC);
 		      }
-		      if(SiS_Pr.SiS_UseLCDA) {
-		         sisfb_detectedlcda = 0x03;
-		         printk(KERN_DEBUG
-			        "sisfb: Bridge uses LCDA for low resolution and text modes\n");
+		      if((ivideo->SiS_Pr.PDCA != -1) && (ivideo->SiS_Pr.PDCA != ivideo->detectedpdca)) {
+		         printk(KERN_INFO "sisfb: Using LCD PDC1 0x%02x (for LCD=CRT1)\n",
+				 ivideo->SiS_Pr.PDCA);
 		      }
-	          }
+		   }
+
 		}
 #endif
 
-		if (!sisfb_crt1off) {
-		   	sisfb_handle_ddc(&sisfb_thismonitor, 0);
+		if(!ivideo->sisfb_crt1off) {
+		   	sisfb_handle_ddc(ivideo, &ivideo->sisfb_thismonitor, 0);
 		} else {
-		   	if ((ivideo.vbflags & (VB_301|VB_301B|VB_301C|VB_302B)) &&
-		      	    (ivideo.vbflags & (CRT2_VGA | CRT2_LCD))) {
-		      		sisfb_handle_ddc(&sisfb_thismonitor, 1);
+		   	if((ivideo->vbflags & (VB_301|VB_301B|VB_301C|VB_302B)) &&
+		      	   (ivideo->vbflags & (CRT2_VGA | CRT2_LCD))) {
+		      		sisfb_handle_ddc(ivideo, &ivideo->sisfb_thismonitor, 1);
 		   	}
 		}
 
-		if (sisfb_mode_idx >= 0)
-			sisfb_mode_idx = sisfb_validate_mode(sisfb_mode_idx, ivideo.currentvbflags);
+		if(ivideo->sisfb_mode_idx >= 0) {
+			int bu = ivideo->sisfb_mode_idx;
+			ivideo->sisfb_mode_idx = sisfb_validate_mode(ivideo,
+					ivideo->sisfb_mode_idx, ivideo->currentvbflags);
+			if(bu != ivideo->sisfb_mode_idx) {
+				printk(KERN_ERR "Mode %dx%dx%d failed validation\n",
+					sisbios_mode[bu].xres,
+					sisbios_mode[bu].yres,
+					sisbios_mode[bu].bpp);
+			}
+		}
 
-		if (sisfb_mode_idx < 0) {
-			switch (ivideo.currentvbflags & VB_DISPTYPE_DISP2) {
+		if(ivideo->sisfb_mode_idx < 0) {
+			switch(ivideo->currentvbflags & VB_DISPTYPE_DISP2) {
 			   case CRT2_LCD:
-				sisfb_mode_idx = DEFAULT_LCDMODE;
+				ivideo->sisfb_mode_idx = ivideo->lcddefmodeidx;
 				break;
 			   case CRT2_TV:
-				sisfb_mode_idx = DEFAULT_TVMODE;
+				ivideo->sisfb_mode_idx = ivideo->tvdefmodeidx;
 				break;
 			   default:
-				sisfb_mode_idx = DEFAULT_MODE;
+				ivideo->sisfb_mode_idx = ivideo->defmodeidx;
 				break;
 			}
 		}
 
-		sisfb_mode_no = sisbios_mode[sisfb_mode_idx].mode_no;
+		ivideo->mode_no = sisbios_mode[ivideo->sisfb_mode_idx].mode_no[ivideo->mni];
 
-		if (ivideo.refresh_rate != 0)
-			sisfb_search_refresh_rate(ivideo.refresh_rate, sisfb_mode_idx);
+		if(ivideo->refresh_rate != 0) {
+			sisfb_search_refresh_rate(ivideo, ivideo->refresh_rate, ivideo->sisfb_mode_idx);
+		}
 
-		if (sisfb_rate_idx == 0) {
-			sisfb_rate_idx = sisbios_mode[sisfb_mode_idx].rate_idx;
-			ivideo.refresh_rate = 60;
+		if(ivideo->rate_idx == 0) {
+			ivideo->rate_idx = sisbios_mode[ivideo->sisfb_mode_idx].rate_idx;
+			ivideo->refresh_rate = 60;
 		}
 
-		if (sisfb_thismonitor.datavalid) {
-			if(!sisfb_verify_rate(&sisfb_thismonitor, sisfb_mode_idx,
-			                      sisfb_rate_idx, ivideo.refresh_rate)) {
+		if(ivideo->sisfb_thismonitor.datavalid) {
+			if(!sisfb_verify_rate(ivideo, &ivideo->sisfb_thismonitor, ivideo->sisfb_mode_idx,
+			                      ivideo->rate_idx, ivideo->refresh_rate)) {
 				printk(KERN_INFO "sisfb: WARNING: Refresh rate exceeds monitor specs!\n");
 			}
 		}
 
-		ivideo.video_bpp = sisbios_mode[sisfb_mode_idx].bpp;
-		ivideo.video_vwidth = ivideo.video_width = sisbios_mode[sisfb_mode_idx].xres;
-		ivideo.video_vheight = ivideo.video_height = sisbios_mode[sisfb_mode_idx].yres;
-		ivideo.org_x = ivideo.org_y = 0;
-		ivideo.video_linelength = ivideo.video_width * (ivideo.video_bpp >> 3);
+		ivideo->video_bpp = sisbios_mode[ivideo->sisfb_mode_idx].bpp;
+		ivideo->video_width = sisbios_mode[ivideo->sisfb_mode_idx].xres;
+		ivideo->video_height = sisbios_mode[ivideo->sisfb_mode_idx].yres;
 
-		sisfb_set_vparms();
+		sisfb_set_vparms(ivideo);
 		
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)	
 
 		/* ---------------- For 2.4: Now switch the mode ------------------ */		
 		
 		printk(KERN_INFO "sisfb: Mode is %dx%dx%d (%dHz)\n",
-	       		ivideo.video_width, ivideo.video_height, ivideo.video_bpp,
-			ivideo.refresh_rate);
+	       		ivideo->video_width, ivideo->video_height, ivideo->video_bpp,
+			ivideo->refresh_rate);
 
-		sisfb_pre_setmode();
+		sisfb_pre_setmode(ivideo);
 
-		if (SiSSetMode(&SiS_Pr, &sishw_ext, sisfb_mode_no) == 0) {
+		if(SiSSetMode(&ivideo->SiS_Pr, &ivideo->sishw_ext, ivideo->mode_no) == 0) {
 			printk(KERN_ERR "sisfb: Fatal error: Setting mode[0x%x] failed\n",
-				sisfb_mode_no);
-			vfree(sishw_ext.pSR);
-			vfree(sishw_ext.pCR);
-			release_mem_region(ivideo.video_base, ivideo.video_size);
-			release_mem_region(ivideo.mmio_base, sisfb_mmio_size);
+									ivideo->mode_no);
+			iounmap((void *)ivideo->video_vbase);
+			iounmap((void *)ivideo->mmio_vbase);
+			release_mem_region(ivideo->video_base, ivideo->video_size);
+			release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
+			if(ivideo->bios_abase) vfree(ivideo->bios_abase);
+			if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
+			pci_set_drvdata(pdev, NULL);
 			kfree(sis_fb_info);
 			return -EINVAL;
 		}
 
 		outSISIDXREG(SISSR, IND_SIS_PASSWORD, SIS_PASSWORD);
 
-		sisfb_post_setmode();
-
-		ivideo.accel = 0;
-		if(sisfb_accel) {
-		   ivideo.accel = -1;
-		   default_var.accel_flags |= FB_ACCELF_TEXT;
-		   sisfb_initaccel();
-		}
+		sisfb_post_setmode(ivideo);
 
 		/* Maximize regardless of sisfb_max at startup */
-		default_var.yres_virtual = 32767;
-		sisfb_crtc_to_var(&default_var);
+		ivideo->default_var.yres_virtual = 32767;
+
+		/* Force reset of x virtual in crtc_to_var */
+		ivideo->default_var.xres_virtual = 0;
+
+		sisfb_crtc_to_var(ivideo, &ivideo->default_var);
+
+		sisfb_calc_pitch(ivideo, &ivideo->default_var);
+		sisfb_set_pitch(ivideo);
+
+		ivideo->accel = 0;
+		if(ivideo->sisfb_accel) {
+		   ivideo->accel = -1;
+		   ivideo->default_var.accel_flags |= FB_ACCELF_TEXT;
+		}
+		sisfb_initaccel(ivideo);
 		
-		sis_fb_info->node = -1;
+		sis_fb_info->node  = -1;
 		sis_fb_info->flags = FBINFO_FLAG_DEFAULT;
-		sis_fb_info->blank = &sisfb_blank;
 		sis_fb_info->fbops = &sisfb_ops;
+		sis_fb_info->disp  = &ivideo->sis_disp;
+		sis_fb_info->blank = &sisfb_blank;
 		sis_fb_info->switch_con = &sisfb_switch;
-		sis_fb_info->updatevar = &sisfb_update_var;
-		sis_fb_info->changevar = NULL;
-		sis_fb_info->disp = &sis_disp;
+		sis_fb_info->updatevar  = &sisfb_update_var;
+		sis_fb_info->changevar  = NULL;
 		strcpy(sis_fb_info->fontname, sisfb_fontname);
 
-		sisfb_set_disp(-1, &default_var, sis_fb_info);
+		sisfb_set_disp(-1, &ivideo->default_var, sis_fb_info);
 
-#else		/* --------- For 2.5: Setup a somewhat sane default var ------------ */
+#else		/* --------- For 2.6: Setup a somewhat sane default var ------------ */
 
 		printk(KERN_INFO "sisfb: Default mode is %dx%dx%d (%dHz)\n",
-	       		ivideo.video_width, ivideo.video_height, ivideo.video_bpp,
-			ivideo.refresh_rate);
+	       		ivideo->video_width, ivideo->video_height, ivideo->video_bpp,
+			ivideo->refresh_rate);
 
-		default_var.xres = default_var.xres_virtual = ivideo.video_width;
-		default_var.yres = default_var.yres_virtual = ivideo.video_height;
-		default_var.bits_per_pixel = ivideo.video_bpp;
+		ivideo->default_var.xres = ivideo->default_var.xres_virtual = ivideo->video_width;
+		ivideo->default_var.yres = ivideo->default_var.yres_virtual = ivideo->video_height;
+		ivideo->default_var.bits_per_pixel = ivideo->video_bpp;
 
-		sisfb_bpp_to_var(&default_var);
+		sisfb_bpp_to_var(ivideo, &ivideo->default_var);
 		
-		default_var.pixclock = (u32) (1000000000 /
-				sisfb_mode_rate_to_dclock(&SiS_Pr, &sishw_ext,
-						sisfb_mode_no, sisfb_rate_idx));
+		ivideo->default_var.pixclock = (u32) (1000000000 /
+				sisfb_mode_rate_to_dclock(&ivideo->SiS_Pr, &ivideo->sishw_ext,
+						ivideo->mode_no, ivideo->rate_idx));
 						
-		if(sisfb_mode_rate_to_ddata(&SiS_Pr, &sishw_ext,
-			 sisfb_mode_no, sisfb_rate_idx,
-			 &default_var.left_margin, &default_var.right_margin, 
-			 &default_var.upper_margin, &default_var.lower_margin,
-			 &default_var.hsync_len, &default_var.vsync_len,
-			 &default_var.sync, &default_var.vmode)) {
-		   if((default_var.vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
-		      default_var.pixclock <<= 1;
+		if(sisfb_mode_rate_to_ddata(&ivideo->SiS_Pr, &ivideo->sishw_ext,
+			 	ivideo->mode_no, ivideo->rate_idx, &ivideo->default_var)) {
+		   if((ivideo->default_var.vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
+		      ivideo->default_var.pixclock <<= 1;
 	   	   }
 	        }
 
-		ivideo.accel = 0;
-		if(sisfb_accel) {
-		   ivideo.accel = -1;
-		   default_var.accel_flags |= FB_ACCELF_TEXT;
-		   sisfb_initaccel();
-		}
-
-		if(sisfb_ypan) {
+		if(ivideo->sisfb_ypan) {
 		   /* Maximize regardless of sisfb_max at startup */
-	    	   default_var.yres_virtual =
-				ivideo.heapstart / (default_var.xres * (default_var.bits_per_pixel >> 3));
-		   if(default_var.yres_virtual > 32767) default_var.yres_virtual = 32767;
-	    	   if(default_var.yres_virtual <= default_var.yres) {
-	              default_var.yres_virtual = default_var.yres;
+	    	   ivideo->default_var.yres_virtual = sisfb_calc_maxyres(ivideo, &ivideo->default_var);
+	    	   if(ivideo->default_var.yres_virtual < ivideo->default_var.yres) {
+	              ivideo->default_var.yres_virtual = ivideo->default_var.yres;
 	    	   }
 		}
 
+		sisfb_calc_pitch(ivideo, &ivideo->default_var);
+
+		ivideo->accel = 0;
+		if(ivideo->sisfb_accel) {
+		   ivideo->accel = -1;
+#ifdef STUPID_ACCELF_TEXT_SHIT
+		   ivideo->default_var.accel_flags |= FB_ACCELF_TEXT;
+#endif
+		}
+		sisfb_initaccel(ivideo);
+
+#if defined(FBINFO_HWACCEL_DISABLED) && defined(FBINFO_HWACCEL_XPAN)
+		sis_fb_info->flags = FBINFO_DEFAULT 		|
+				     FBINFO_HWACCEL_YPAN 	|
+				     FBINFO_HWACCEL_XPAN 	|
+				     FBINFO_HWACCEL_COPYAREA 	|
+				     FBINFO_HWACCEL_FILLRECT 	|
+				     ((ivideo->accel) ? 0 : FBINFO_HWACCEL_DISABLED);
+#else
 		sis_fb_info->flags = FBINFO_FLAG_DEFAULT;
-		sis_fb_info->var = default_var;
-		sis_fb_info->fix = sisfb_fix;
-		sis_fb_info->par = &ivideo;
-		sis_fb_info->screen_base = ivideo.video_vbase;
-		sis_fb_info->fbops = &sisfb_ops;
-#ifdef NEWFBDEV
-		sis_fb_info->class_dev.dev = &pdev->dev;
 #endif
+		sis_fb_info->var = ivideo->default_var;
+		sis_fb_info->fix = ivideo->sisfb_fix;
+		sis_fb_info->screen_base = (char *)ivideo->video_vbase;
+		sis_fb_info->fbops = &sisfb_ops;
+
 		sisfb_get_fix(&sis_fb_info->fix, -1, sis_fb_info);
-		sis_fb_info->pseudo_palette = pseudo_palette;
+		sis_fb_info->pseudo_palette = ivideo->pseudo_palette;
 		
 		fb_alloc_cmap(&sis_fb_info->cmap, 256 , 0);
-#endif
+#endif		/* 2.6 */
 
-		printk(KERN_INFO "sisfb: Initial vbflags 0x%lx\n", ivideo.vbflags);
+		printk(KERN_DEBUG "sisfb: Initial vbflags 0x%lx\n", (unsigned long)ivideo->vbflags);
 
 #ifdef CONFIG_MTRR
-		ivideo.mtrr = mtrr_add((unsigned int) ivideo.video_base,
-				(unsigned int) ivideo.video_size,
-				MTRR_TYPE_WRCOMB, 1);
-		if(ivideo.mtrr) {
-			printk(KERN_INFO "sisfb: Added MTRRs\n");
+		ivideo->mtrr = mtrr_add(ivideo->video_base, ivideo->video_size,
+					MTRR_TYPE_WRCOMB, 1);
+		if(!ivideo->mtrr) {
+			printk(KERN_DEBUG "sisfb: Failed to add MTRRs\n");
 		}
-
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
@@ -4946,39 +5573,157 @@
 #endif
 
 		if(register_framebuffer(sis_fb_info) < 0) {
-			vfree(sishw_ext.pSR);
-			vfree(sishw_ext.pCR);
-			release_mem_region(ivideo.video_base, ivideo.video_size);
-			release_mem_region(ivideo.mmio_base, sisfb_mmio_size);
 			printk(KERN_ERR "sisfb: Fatal error: Failed to register framebuffer\n");
+			iounmap((void *)ivideo->video_vbase);
+			iounmap((void *)ivideo->mmio_vbase);
+			release_mem_region(ivideo->video_base, ivideo->video_size);
+			release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
+			if(ivideo->bios_abase) vfree(ivideo->bios_abase);
+			if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
+			pci_set_drvdata(pdev, NULL);
 			kfree(sis_fb_info);
 			return -EINVAL;
 		}
 
-		sisfb_registered = 1;			
+		ivideo->registered = 1;
 
-		printk(KERN_DEBUG "sisfb: Installed SISFB_GET_INFO ioctl (%x)\n", SISFB_GET_INFO);
-		printk(KERN_DEBUG "sisfb: Installed SISFB_GET_VBRSTATUS ioctl (%x)\n", SISFB_GET_VBRSTATUS);
-		
-		printk(KERN_INFO "sisfb: 2D acceleration is %s, scrolling mode %s\n",
-		     sisfb_accel ? "enabled" : "disabled",
-		     sisfb_ypan  ? (sisfb_max ? "ypan (auto-max)" : "ypan (no auto-max)") : "redraw");
+		/* Enlist us */
+		ivideo->next = card_list;
+		card_list = ivideo;
 
+#ifdef SIS_CONFIG_COMPAT
+		{
+		int ret;
+		/* Our ioctls are all "32/64bit compatible" */
+		if(register_ioctl32_conversion(FBIOGET_VBLANK, NULL)) {
+		   printk(KERN_ERR "sisfb: Error registering FBIOGET_VBLANK ioctl32 translation\n");
+		} else {
+		   ivideo->ioctl32vblankregistered = 1;
+		}
+		ret =  register_ioctl32_conversion(FBIO_ALLOC,             NULL);
+		ret |= register_ioctl32_conversion(FBIO_FREE,              NULL);
+		ret |= register_ioctl32_conversion(SISFB_GET_INFO_SIZE,    NULL);
+		ret |= register_ioctl32_conversion(SISFB_GET_INFO,         NULL);
+		ret |= register_ioctl32_conversion(SISFB_GET_TVPOSOFFSET,  NULL);
+		ret |= register_ioctl32_conversion(SISFB_SET_TVPOSOFFSET,  NULL);
+		ret |= register_ioctl32_conversion(SISFB_SET_LOCK,         NULL);
+		ret |= register_ioctl32_conversion(SISFB_GET_VBRSTATUS,    NULL);
+		ret |= register_ioctl32_conversion(SISFB_GET_AUTOMAXIMIZE, NULL);
+		ret |= register_ioctl32_conversion(SISFB_SET_AUTOMAXIMIZE, NULL);
+		if(ret)	printk(KERN_ERR "sisfb: Error registering ioctl32 translations\n");
+		else    ivideo->ioctl32registered = 1;
+		}
+#endif
+
+		printk(KERN_INFO "sisfb: 2D acceleration is %s, y-panning %s\n",
+		     ivideo->sisfb_accel ? "enabled" : "disabled",
+		     ivideo->sisfb_ypan  ?
+		     	(ivideo->sisfb_max ? "enabled (auto-max)" : "enabled (no auto-max)") : "disabled");
+
+
+		printk(KERN_INFO "fb%d: %s frame buffer device, Version %d.%d.%d\n",
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-		printk(KERN_INFO "fb%d: %s frame buffer device, Version %d.%d.%02d\n",
-	       		GET_FB_IDX(sis_fb_info->node), sis_fb_info->modename, VER_MAJOR, VER_MINOR,
-	       		VER_LEVEL);		     
+	       		GET_FB_IDX(sis_fb_info->node),
 #else
-		printk(KERN_INFO "fb%d: %s frame buffer device, Version %d.%d.%02d\n",
-	       		sis_fb_info->node, myid, VER_MAJOR, VER_MINOR, VER_LEVEL);
+	       		sis_fb_info->node,
 #endif
+			ivideo->myid, VER_MAJOR, VER_MINOR, VER_LEVEL);
 
 		printk(KERN_INFO "sisfb: (C) 2001-2004 Thomas Winischhofer.\n");
 
 	}	/* if mode = "none" */
+
 	return 0;
 }
 
+/*****************************************************/
+/*                PCI DEVICE HANDLING                */
+/*****************************************************/
+
+static void __devexit sisfb_remove(struct pci_dev *pdev)
+{
+	struct sis_video_info *ivideo = pci_get_drvdata(pdev);
+	struct fb_info        *sis_fb_info = ivideo->memyselfandi;
+	int                   registered = ivideo->registered;
+
+#ifdef SIS_CONFIG_COMPAT
+	if(ivideo->ioctl32vblankregistered) {
+		if(unregister_ioctl32_conversion(FBIOGET_VBLANK)) {
+			printk(KERN_ERR "sisfb: Error unregistering FBIOGET_VBLANK ioctl32 translation\n");
+		}
+	}
+	if(ivideo->ioctl32registered) {
+		int ret;
+		ret =  unregister_ioctl32_conversion(FBIO_ALLOC);
+		ret |= unregister_ioctl32_conversion(FBIO_FREE);
+		ret |= unregister_ioctl32_conversion(SISFB_GET_INFO_SIZE);
+		ret |= unregister_ioctl32_conversion(SISFB_GET_INFO);
+		ret |= unregister_ioctl32_conversion(SISFB_GET_TVPOSOFFSET);
+		ret |= unregister_ioctl32_conversion(SISFB_SET_TVPOSOFFSET);
+		ret |= unregister_ioctl32_conversion(SISFB_SET_LOCK);
+		ret |= unregister_ioctl32_conversion(SISFB_GET_VBRSTATUS);
+		ret |= unregister_ioctl32_conversion(SISFB_GET_AUTOMAXIMIZE);
+		ret |= unregister_ioctl32_conversion(SISFB_SET_AUTOMAXIMIZE);
+		if(ret)	printk(KERN_ERR "sisfb: Error unregistering ioctl32 translations\n");
+	}
+#endif
+
+	/* Unmap */
+	iounmap((void *)ivideo->video_vbase);
+	iounmap((void *)ivideo->mmio_vbase);
+	if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
+	if(ivideo->bios_abase)    vfree(ivideo->bios_abase);
+
+	/* Release mem regions */
+	release_mem_region(ivideo->video_base, ivideo->video_size);
+	release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
+
+#ifdef CONFIG_MTRR
+	/* Release MTRR region */
+	if(ivideo->mtrr) {
+		mtrr_del(ivideo->mtrr, ivideo->video_base, ivideo->video_size);
+	}
+#endif
+
+	/* Unregister the framebuffer */
+	if(ivideo->registered) {
+		unregister_framebuffer(sis_fb_info);
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,3))
+		framebuffer_release(sis_fb_info);
+#else
+		kfree(sis_fb_info);
+#endif
+	}
+
+	pci_set_drvdata(pdev, NULL);
+
+	/* TODO: Restore the initial mode
+	 * This sounds easy but is as good as impossible
+	 * on many machines with SiS chip and video bridge
+	 * since text modes are always set up differently
+	 * from machine to machine. Depends on the type
+	 * of integration between chipset and bridge.
+	 */
+	if(registered) {
+	   printk(KERN_INFO "sisfb: Restoring of text mode not supported yet\n");
+	}
+};
+
+static struct pci_driver sisfb_driver = {
+	.name		= "sisfb",
+	.id_table 	= sisfb_pci_table,
+	.probe 		= sisfb_probe,
+	.remove 	= __devexit_p(sisfb_remove)
+};
+
+int __init sisfb_init(void)
+{
+	return(pci_module_init(&sisfb_driver));
+}
+
+/*****************************************************/
+/*                      MODULE                       */
+/*****************************************************/
 
 #ifdef MODULE
 
@@ -4989,202 +5734,240 @@
 static unsigned int mem = 0;
 static char         *forcecrt2type = NULL;
 static int          forcecrt1 = -1;
-static char         *queuemode = NULL;
-static int          pdc = 0;
+static int          pdc = -1;
+static int          pdc1 = -1;
 static int          noaccel = -1;
 static int          noypan  = -1;
 static int	    nomax = -1;
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 static int          inverse = 0;
 #endif
-static int          userom = 1;
+static int          userom = -1;
 static int          useoem = -1;
 static char         *tvstandard = NULL;
 static int	    nocrt2rate = 0;
 static int          scalelcd = -1;
 static char	    *specialtiming = NULL;
 static int	    lvdshl = -1;
+static int	    tvxposoffset = 0, tvyposoffset = 0;
+static int	    filter = -1;
+#if !defined(__i386__) && !defined(__x86_64__)
+static int	    resetcard = 0;
+static int	    videoram = 0;
+#endif
 
-MODULE_DESCRIPTION("SiS 300/540/630/730/315/550/650/651/661/740/741/330/760 framebuffer driver");
+MODULE_DESCRIPTION("SiS 300/540/630/730/315/550/65x/661/74x/330/760 framebuffer device driver");
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Thomas Winischhofer <thomas@winischhofer.net>; SiS; Various others");
+MODULE_AUTHOR("Thomas Winischhofer <thomas@winischhofer.net>, Others");
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+MODULE_PARM(mem, "i");
+MODULE_PARM(noaccel, "i");
+MODULE_PARM(noypan, "i");
+MODULE_PARM(nomax, "i");
+MODULE_PARM(userom, "i");
+MODULE_PARM(useoem, "i");
 MODULE_PARM(mode, "s");
-MODULE_PARM_DESC(mode,
-       "\nSelects the desired display mode in the format [X]x[Y]x[Depth], eg.\n"
-         "1024x768x16. Other formats supported include XxY-Depth and\n"
-	 "XxY-Depth@Rate. If the parameter is only one (decimal or hexadecimal)\n"
-	 "number, it will be interpreted as a VESA mode number. (default: none if\n"
-	 "sisfb is a module; this leaves the console untouched and the driver will\n"
-	 "only do the video memory management for eg. DRM/DRI; 800x600x8 if sisfb\n"
-	 "is in the kernel)");
+MODULE_PARM(vesa, "i");
+MODULE_PARM(rate, "i");
+MODULE_PARM(forcecrt1, "i");
+MODULE_PARM(forcecrt2type, "s");
+MODULE_PARM(scalelcd, "i");
+MODULE_PARM(pdc, "i");
+MODULE_PARM(pdc1, "i");
+MODULE_PARM(specialtiming, "s");
+MODULE_PARM(lvdshl, "i");
+MODULE_PARM(tvstandard, "s");
+MODULE_PARM(tvxposoffset, "i");
+MODULE_PARM(tvyposoffset, "i");
+MODULE_PARM(filter, "i");
+MODULE_PARM(nocrt2rate, "i");
+MODULE_PARM(inverse, "i");
+#if !defined(__i386__) && !defined(__x86_64__)
+MODULE_PARM(resetcard, "i");
+MODULE_PARM(videoram, "i");
+#endif
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+module_param(mem, int, 0);
+module_param(noaccel, int, 0);
+module_param(noypan, int, 0);
+module_param(nomax, int, 0);
+module_param(userom, int, 0);
+module_param(useoem, int, 0);
+module_param(mode, charp, 0);
+module_param(vesa, int, 0);
+module_param(rate, int, 0);
+module_param(forcecrt1, int, 0);
+module_param(forcecrt2type, charp, 0);
+module_param(scalelcd, int, 0);
+module_param(pdc, int, 0);
+module_param(pdc1, int, 0);
+module_param(specialtiming, charp, 0);
+module_param(lvdshl, int, 0);
+module_param(tvstandard, charp, 0);
+module_param(tvxposoffset, int, 0);
+module_param(tvyposoffset, int, 0);
+module_param(filter, int, 0);
+module_param(nocrt2rate, int, 0);
+#if !defined(__i386__) && !defined(__x86_64__)
+module_param(resetcard, int, 0);
+module_param(videoram, int, 0);
 #endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)	 
-MODULE_PARM(mode, "s");
-MODULE_PARM_DESC(mode,
-       "\nSelects the desired default display mode in the format XxYxDepth,\n"
-         "eg. 1024x768x16. Other formats supported include XxY-Depth and\n"
-	 "XxY-Depth@Rate. If the parameter is only one (decimal or hexadecimal)\n"
-	 "number, it will be interpreted as a VESA mode number. (default: 800x600x8)");
 #endif
 
+MODULE_PARM_DESC(mem,
+	"\nDetermines the beginning of the video memory heap in KB. This heap is used\n"
+	  "for video RAM management for eg. DRM/DRI. On 300 series, the default depends\n"
+	  "on the amount of video RAM available. If 8MB of video RAM or less is available,\n"
+	  "the heap starts at 4096KB, if between 8 and 16MB are available at 8192KB,\n"
+	  "otherwise at 12288KB. On 315 and Xabre series, the heap size is 32KB by default.\n"
+	  "The value is to be specified without 'KB' and must match the MaxXFBMem setting\n"
+	  "for XFree86 4.x/X.org 6.7 and later.\n");
+
+MODULE_PARM_DESC(noaccel,
+        "\nIf set to anything other than 0, 2D acceleration will be disabled.\n"
+	  "(default: 0)\n");
+
+MODULE_PARM_DESC(noypan,
+        "\nIf set to anything other than 0, y-panning will be disabled and scrolling\n"
+ 	  "will be performed by redrawing the screen. (default: 0)\n");
+
+MODULE_PARM_DESC(nomax,
+        "\nIf y-panning is enabled, sisfb will by default use the entire available video\n"
+	  "memory for the virtual screen in order to optimize scrolling performance. If\n"
+	  "this is set to anything other than 0, sisfb will not do this and thereby \n"
+	  "enable the user to positively specify a virtual Y size of the screen using\n"
+	  "fbset. (default: 0)\n");
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-MODULE_PARM(vesa, "i");
+MODULE_PARM_DESC(mode,
+        "\nSelects the desired display mode in the format [X]x[Y]x[Depth], eg.\n"
+          "1024x768x16. Other formats supported include XxY-Depth and\n"
+ 	  "XxY-Depth@Rate. If the parameter is only one (decimal or hexadecimal)\n"
+	  "number, it will be interpreted as a VESA mode number. (default: none if\n"
+	  "sisfb is a module; this leaves the console untouched and the driver will\n"
+	  "only do the video memory management for eg. DRM/DRI; 800x600x8 if sisfb\n"
+	  "is in the kernel)\n");
 MODULE_PARM_DESC(vesa,
-       "\nSelects the desired display mode by VESA defined mode number, eg. 0x117\n"
-         "(default: 0x0000 if sisfb is a module; this leaves the console untouched\n"
-	 "and the driver will only do the video memory management for eg. DRM/DRI;\n"
-	 "0x0103 if sisfb is in the kernel)");
+        "\nSelects the desired display mode by VESA defined mode number, eg. 0x117\n"
+          "(default: 0x0000 if sisfb is a module; this leaves the console untouched\n"
+	  "and the driver will only do the video memory management for eg. DRM/DRI;\n"
+	  "0x0103 if sisfb is in the kernel)\n");
 #endif
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-MODULE_PARM(vesa, "i");
+MODULE_PARM_DESC(mode,
+       "\nSelects the desired default display mode in the format XxYxDepth,\n"
+         "eg. 1024x768x16. Other formats supported include XxY-Depth and\n"
+	 "XxY-Depth@Rate. If the parameter is only one (decimal or hexadecimal)\n"
+	 "number, it will be interpreted as a VESA mode number. (default: 800x600x8)\n");
+
 MODULE_PARM_DESC(vesa,
        "\nSelects the desired default display mode by VESA defined mode number, eg.\n"
-         "0x117 (default: 0x0103)");
+         "0x117 (default: 0x0103)\n");
 #endif
 
-MODULE_PARM(rate, "i");
 MODULE_PARM_DESC(rate,
 	"\nSelects the desired vertical refresh rate for CRT1 (external VGA) in Hz.\n"
 	  "If the mode is specified in the format XxY-Depth@Rate, this parameter\n"
-	  "will be ignored (default: 60)");
-
-MODULE_PARM(crt1off,   "i");
-MODULE_PARM_DESC(crt1off,
-	"(Deprecated, please use forcecrt1)");
-
-MODULE_PARM(filter, "i");
-MODULE_PARM_DESC(filter,
-	"\nSelects TV flicker filter type (only for systems with a SiS301 video bridge).\n"
-	  "(Possible values 0-7, default: [no filter])");
-
-MODULE_PARM(queuemode,   "s");
-MODULE_PARM_DESC(queuemode,
-	"\nSelects the queue mode on 315/550/65x/74x/330/760. Possible choices are AGP, VRAM,\n"
-  	  "MMIO. AGP is only available if the kernel has AGP support. The queue mode is\n"
-	  "important to programs using the 2D/3D accelerator of the SiS chip. The modes\n"
-	  "require a totally different way of programming the engines. If any mode than\n"
-	  "MMIO is selected, sisfb will disable its own 2D acceleration. On\n"
-	  "300/540/630/730, this option is ignored. (default: MMIO)");
+	  "will be ignored (default: 60)\n");
 
-/* TW: "Import" the options from the X driver */
-MODULE_PARM(mem,    "i");
-MODULE_PARM_DESC(mem,
-	"\nDetermines the beginning of the video memory heap in KB. This heap is used\n"
-	  "for video RAM management for eg. DRM/DRI. On 300 series, the default depends\n"
-	  "on the amount of video RAM available. If 8MB of video RAM or less is available,\n"
-	  "the heap starts at 4096KB, if between 8 and 16MB are available at 8192KB,\n"
-	  "otherwise at 12288KB. On 315 and Xabre series, the heap is 1MB by default. The\n"
-	  "value is to be specified without 'KB' and should match the MaxXFBMem setting for\n"
-	  "XFree 4.x (x>=2).");
+MODULE_PARM_DESC(forcecrt1,
+	"\nNormally, the driver autodetects whether or not CRT1 (external VGA) is \n"
+	  "connected. With this option, the detection can be overridden (1=CRT1 ON,\n"
+	  "0=CRT1 OFF) (default: [autodetected])\n");
 
-MODULE_PARM(forcecrt2type, "s");
 MODULE_PARM_DESC(forcecrt2type,
 	"\nIf this option is omitted, the driver autodetects CRT2 output devices, such as\n"
 	  "LCD, TV or secondary VGA. With this option, this autodetection can be\n"
 	  "overridden. Possible parameters are LCD, TV, VGA or NONE. NONE disables CRT2.\n"
-	  "On systems with a 301(B/LV) bridge, parameters SVIDEO, COMPOSITE or SCART can be\n"
-	  "used instead of TV to override the TV detection. (default: [autodetected])");
+	  "On systems with a SiS video bridge, parameters SVIDEO, COMPOSITE or SCART can\n"
+	  "be used instead of TV to override the TV detection. Furthermore, on systems\n"
+	  "with a SiS video bridge, SVIDEO+COMPOSITE, HIVISION, YPBPR480I, YPBPR480P,\n"
+	  "YPBPR720P and YPBPR1080I are understood. However, whether or not these work\n"
+	  "depends on the very hardware in use. (default: [autodetected])\n");
 
-MODULE_PARM(forcecrt1, "i");
-MODULE_PARM_DESC(forcecrt1,
-	"\nNormally, the driver autodetects whether or not CRT1 (external VGA) is \n"
-	  "connected. With this option, the detection can be overridden (1=CRT1 ON,\n"
-	  " 0=CRT1 off) (default: [autodetected])");
+MODULE_PARM_DESC(scalelcd,
+	"\nSetting this to 1 will force the driver to scale the LCD image to the panel's\n"
+	  "native resolution. Setting it to 0 will disable scaling; LVDS panels will\n"
+	  "show black bars around the image, TMDS panels will probably do the scaling\n"
+	  "themselves. Default: 1 on LVDS panels, 0 on TMDS panels\n");
 
-MODULE_PARM(pdc, "i");
 MODULE_PARM_DESC(pdc,
         "\nThis is for manually selecting the LCD panel delay compensation. The driver\n"
 	  "should detect this correctly in most cases; however, sometimes this is not\n"
 	  "possible. If you see 'small waves' on the LCD, try setting this to 4, 32 or 24\n"
-	  "on a 300 series chipset; 3 or 51 on a 315 series chipset. If the problem persists,\n"
+	  "on a 300 series chipset; 6 on a 315 series chipset. If the problem persists,\n"
 	  "try other values (on 300 series: between 4 and 60 in steps of 4; on 315 series:\n"
-	  "and value from 0 to 255). (default: [autodetected])");
-
-MODULE_PARM(noaccel, "i");
-MODULE_PARM_DESC(noaccel,
-        "\nIf set to anything other than 0, 2D acceleration will be disabled.\n"
-	  "(default: 0)");
-
-MODULE_PARM(noypan, "i");
-MODULE_PARM_DESC(noypan,
-        "\nIf set to anything other than 0, y-panning will be disabled and scrolling\n"
- 	  "will be performed by redrawing the screen. (default: 0)");
-
-MODULE_PARM(nomax, "i");
-MODULE_PARM_DESC(nomax,
-        "\nIf y-panning is enabled, sisfb will by default use the entire available video\n"
-	  "memory for the virtual screen in order to optimize scrolling performance. If this\n"
-	  "is set to anything other than 0, sisfb will not do this and thereby enable the user\n"
-	  "to positively specify a virtual Y size of the screen using fbset. (default: 0)\n");
+	  "any value from 0 to 31). (default: autodetected, if LCD is active during start)\n");
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)	
-MODULE_PARM(inverse, "i");
-MODULE_PARM_DESC(inverse,
-        "\nSetting this to anything but 0 should invert the display colors, but this\n"
-	  "does not seem to work. (default: 0)");
-#endif	
+#ifdef CONFIG_FB_SIS_315
+MODULE_PARM_DESC(pdc1,
+        "\nThis is same as pdc, but for LCD-via CRT1. Hence, this is for the 315/330\n"
+	  "series only. (default: autodetected if LCD is in LCD-via-CRT1 mode during\n"
+	  "startup) - Note: currently, this has no effect because LCD-via-CRT1 is not\n"
+	  "implemented yet.\n");
+#endif
 
-MODULE_PARM(userom, "i");
-MODULE_PARM_DESC(userom,
-        "\nSetting this to 0 keeps sisfb from using the video BIOS data which is needed\n"
-	  "for some LCD and TV setup. (default: 1)");
+MODULE_PARM_DESC(specialtiming,
+	"\nPlease refer to documentation for more information on this option.\n");
 
-MODULE_PARM(useoem, "i");
-MODULE_PARM_DESC(useoem,
-        "\nSetting this to 0 keeps sisfb from using its internel OEM data for some LCD\n"
-	  "panels and TV connector types. (default: [auto])");
+MODULE_PARM_DESC(lvdshl,
+	"\nPlease refer to documentation for more information on this option.\n");
 
-MODULE_PARM(tvstandard, "s");
 MODULE_PARM_DESC(tvstandard,
 	"\nThis allows overriding the BIOS default for the TV standard. Valid choices are\n"
-	  "pal and ntsc. (default: [auto])");
+	  "pal, ntsc, palm and paln. (default: [auto; pal or ntsc only])\n");
+
+MODULE_PARM_DESC(tvxposoffset,
+	"\nRelocate TV output horizontally. Possible parameters: -32 through 32.\n"
+	  "Default: 0\n");
+
+MODULE_PARM_DESC(tvyposoffset,
+	"\nRelocate TV output vertically. Possible parameters: -32 through 32.\n"
+	  "Default: 0\n");
+
+MODULE_PARM_DESC(filter,
+	"\nSelects TV flicker filter type (only for systems with a SiS301 video bridge).\n"
+	  "(Possible values 0-7, default: [no filter])\n");
 
-MODULE_PARM(nocrt2rate, "i");
 MODULE_PARM_DESC(nocrt2rate,
 	"\nSetting this to 1 will force the driver to use the default refresh rate for\n"
-	  "CRT2 if CRT2 type is VGA. (default: 0, use same rate as CRT1)");
-
-MODULE_PARM(scalelcd, "i");
-MODULE_PARM_DESC(scalelcd,
-	"\nSetting this to 1 will force the driver to scale the LCD image to the panel's\n"
-	  "native resolution. Setting it to 0 will disable scaling; if the panel can scale\n"
-	  "by itself, it will probably do this, otherwise you will see a black bar around\n"
-	  "the screen image. Default: [autodetect if panel can scale]");
+	  "CRT2 if CRT2 type is VGA. (default: 0, use same rate as CRT1)\n");
 
-MODULE_PARM(specialtiming, "s");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+MODULE_PARM_DESC(inverse,
+        "\nSetting this to anything but 0 should invert the display colors, but this\n"
+	  "does not seem to work. (default: 0)\n");
+#endif
 
-MODULE_PARM(lvdshl, "i");
+#if !defined(__i386__) && !defined(__x86_64__)
+#ifdef CONFIG_FB_SIS_300
+MODULE_PARM_DESC(resetcard,
+	"\nSet this to 1 in order to reset (POST) the card on non-x86 machines where\n"
+	  "the BIOS did not POST the card (only supported for SiS 300/305 currently).\n"
+	  "Default: 0\n");
 
+MODULE_PARM_DESC(videoram,
+	"\nSet this to the amount of video RAM (in kilobyte) the card has. Required on\n"
+	  "some non-x86 architectures where the memory auto detection fails. Only\n"
+	  "relevant if resetcard is set, too. Default: [auto-detect]\n");
+#endif
+#endif
 
-int init_module(void)
+int __init sisfb_init_module(void)
 {
-	int err;
+	sisfb_setdefaultparms();
 
-	SiS_Pr.UsePanelScaler = -1;
-	SiS_Pr.SiS_CustomT = CUT_NONE;
-	SiS_Pr.LVDSHL = -1;
-
-	ivideo.refresh_rate = sisfb_parm_rate = rate;
+	if(rate) sisfb_parm_rate = rate;
 
 	if((scalelcd == 0) || (scalelcd == 1)) {
-	   SiS_Pr.UsePanelScaler = scalelcd ^ 1;
+	   sisfb_scalelcd = scalelcd ^ 1;
 	}
 
-	if(mode)
-		sisfb_search_mode(mode, FALSE);
-	else if(vesa != -1)
-		sisfb_search_vesamode(vesa, FALSE);
-	else
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-		/* For 2.4, set mode=none if no mode is given  */
-		sisfb_mode_idx = MODE_INDEX_NONE;
-#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-		/* For 2.5, we don't need this "mode=none" stuff anymore */
-		sisfb_mode_idx = DEFAULT_MODE;
-#endif
+	/* Need to check crt2 type first for fstn/dstn */
 
 	if(forcecrt2type)
 		sisfb_search_crt2type(forcecrt2type);
@@ -5192,16 +5975,16 @@
 	if(tvstandard)
 		sisfb_search_tvstd(tvstandard);
 
-	if(crt1off == 0)
-		sisfb_crt1off = 1;
-	else
-		sisfb_crt1off = 0;
+	if(mode)
+		sisfb_search_mode(mode, FALSE);
+	else if(vesa != -1)
+		sisfb_search_vesamode(vesa, FALSE);
+
+	sisfb_crt1off = (crt1off == 0) ? 1 : 0;
 
 	sisfb_forcecrt1 = forcecrt1;
-	if(forcecrt1 == 1)
-		sisfb_crt1off = 0;
-	else if(forcecrt1 == 0)
-		sisfb_crt1off = 1;
+	if(forcecrt1 == 1)      sisfb_crt1off = 0;
+	else if(forcecrt1 == 0) sisfb_crt1off = 1;
 
 	if(noaccel == 1)      sisfb_accel = 0;
 	else if(noaccel == 0) sisfb_accel = 1;
@@ -5214,84 +5997,48 @@
 	
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 	if(inverse)           sisfb_inverse = 1;
-	sisfb_fontname[0] = '\0';
 #endif
 
-	if(mem)		      sisfb_mem = mem;
+	if(mem)		      sisfb_parm_mem = mem;
 
-	sisfb_userom = userom;
+	if(userom != -1)      sisfb_userom = userom;
+	if(useoem != -1)      sisfb_useoem = useoem;
 
-	sisfb_useoem = useoem;
-
-	if (queuemode)        sisfb_search_queuemode(queuemode);
-	
-	/* If other queuemode than MMIO, disable 2D accel and ypan */
-	if((sisfb_queuemode != -1) && (sisfb_queuemode != MMIO_CMD)) {
-	        sisfb_accel = 0;
-	}
-
-        if(pdc) sisfb_pdc = pdc & 0x3c;
+        if(pdc != -1)  sisfb_pdc  = (pdc  & 0x7f);
+	if(pdc1 != -1) sisfb_pdca = (pdc1 & 0x1f);
 
 	sisfb_nocrt2rate = nocrt2rate;
 
 	if(specialtiming)
 		sisfb_search_specialtiming(specialtiming);
 
-	if((lvdshl >= 0) && (lvdshl <= 3)) SiS_Pr.LVDSHL = lvdshl;
-
-	if((err = sisfb_init()) < 0) return err;
-
-	return 0;
-}
+	if((lvdshl >= 0) && (lvdshl <= 3))  sisfb_lvdshl = lvdshl;
 
-void cleanup_module(void)
-{
-	/* Unmap */
-	iounmap(ivideo.video_vbase);
-	iounmap(ivideo.mmio_vbase);
+	if(filter != -1) sisfb_filter = filter;
 
-	/* Release mem regions */
-	release_mem_region(ivideo.video_base, ivideo.video_size);
-	release_mem_region(ivideo.mmio_base, sisfb_mmio_size);
+	sisfb_tvxposoffset = tvxposoffset;
+	sisfb_tvyposoffset = tvyposoffset;
 
-#ifdef CONFIG_MTRR
-	/* Release MTRR region */
-	if(ivideo.mtrr) {
-		mtrr_del(ivideo.mtrr,
-		      (unsigned int)ivideo.video_base,
-	              (unsigned int)ivideo.video_size);
-	}
+#if !defined(__i386__) && !defined(__x86_64__)
+ 	sisfb_resetcard = (resetcard) ? 1 : 0;
+	if(videoram)    sisfb_videoram = videoram;
 #endif
 
-	/* Unregister the framebuffer */
-	if(sisfb_registered) {
-		unregister_framebuffer(sis_fb_info);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (defined(NEWFBDEV))
-		framebuffer_release(sis_fb_info);
-#else
-		kfree(sis_fb_info);
-#endif
-	}
+        return(sisfb_init());
+}
 
-	if(sishw_ext.pSR) vfree(sishw_ext.pSR);
-	if(sishw_ext.pCR) vfree(sishw_ext.pCR);
-	
-	/* TODO: Restore the initial mode
-	 * This sounds easy but is as good as impossible
-	 * on many machines with SiS chip and video bridge
-	 * since text modes are always set up differently
-	 * from machine to machine. Depends on the type
-	 * of integration between chipset and bridge.
-	 */
-	
-	printk(KERN_INFO "sisfb: Module unloaded\n");
+static void __exit sisfb_remove_module(void)
+{
+	pci_unregister_driver(&sisfb_driver);
+	printk(KERN_DEBUG "sisfb: Module unloaded\n");
 }
 
-#endif
+module_init(sisfb_init_module);
+module_exit(sisfb_remove_module);
+
+#endif 	   /*  /MODULE  */
 
 EXPORT_SYMBOL(sis_malloc);
 EXPORT_SYMBOL(sis_free);
-EXPORT_SYMBOL(sis_dispinfo);
 
-EXPORT_SYMBOL(ivideo);
-                                                                                           
+
--- diff/drivers/video/sis/sis_main.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/sis_main.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,6 +1,7 @@
 /*
- * SiS 300/630/730/540/315/550/650/651/M650/661FX/M661FX/740/741/330/760
- * frame buffer driver for Linux kernels 2.4.x and 2.5.x
+ * SiS 300/305/540/630(S)/730(S)
+ * SiS 315(H/PRO)/55x/(M)65x/(M)661(F/M)X/740/741(GX)/330/(M)760
+ * frame buffer driver for Linux kernels >=2.4.14 and >=2.6.3
  *
  * Copyright (C) 2001-2004 Thomas Winischhofer, Vienna, Austria.
  *
@@ -22,304 +23,15 @@
 #ifndef _SISFB_MAIN
 #define _SISFB_MAIN
 
-#include "vstruct.h"
-
-/* ------------------- Constant Definitions ------------------------- */
-
-#define AGPOFF     /* default is turn off AGP */
-
-#define SISFAIL(x) do { printk(x "\n"); return -EINVAL; } while(0)
-
-#define VER_MAJOR                 1
-#define VER_MINOR                 6
-#define VER_LEVEL                 25
+#include <linux/spinlock.h>
 
+#include "vstruct.h"
 #include "sis.h"
 
-/* To be included in pci_ids.h */
-#ifndef PCI_DEVICE_ID_SI_650_VGA
-#define PCI_DEVICE_ID_SI_650_VGA  0x6325
-#endif
-#ifndef PCI_DEVICE_ID_SI_650
-#define PCI_DEVICE_ID_SI_650      0x0650
-#endif
-#ifndef PCI_DEVICE_ID_SI_740
-#define PCI_DEVICE_ID_SI_740      0x0740
-#endif
-#ifndef PCI_DEVICE_ID_SI_330
-#define PCI_DEVICE_ID_SI_330      0x0330
-#endif
-#ifndef PCI_DEVICE_ID_SI_660_VGA
-#define PCI_DEVICE_ID_SI_660_VGA  0x6330
-#endif
-#ifndef PCI_DEVICE_ID_SI_660
-#define PCI_DEVICE_ID_SI_660      0x0661
-#endif
-#ifndef PCI_DEVICE_ID_SI_741
-#define PCI_DEVICE_ID_SI_741      0x0741
-#endif
-#ifndef PCI_DEVICE_ID_SI_660
-#define PCI_DEVICE_ID_SI_660      0x0660
-#endif
-#ifndef PCI_DEVICE_ID_SI_760
-#define PCI_DEVICE_ID_SI_760      0x0760
-#endif
-
-/* To be included in fb.h */
-#ifndef FB_ACCEL_SIS_GLAMOUR_2
-#define FB_ACCEL_SIS_GLAMOUR_2  40	/* SiS 315, 65x, 740, 661, 741  */
-#endif
-#ifndef FB_ACCEL_SIS_XABRE
-#define FB_ACCEL_SIS_XABRE      41	/* SiS 330 ("Xabre"), 760 	*/
-#endif
-
-#define MAX_ROM_SCAN              0x10000
-
-#define HW_CURSOR_CAP             0x80
-#define TURBO_QUEUE_CAP           0x40
-#define AGP_CMD_QUEUE_CAP         0x20
-#define VM_CMD_QUEUE_CAP          0x10
-#define MMIO_CMD_QUEUE_CAP        0x08
-
-/* For 300 series */
-#ifdef CONFIG_FB_SIS_300
-#define TURBO_QUEUE_AREA_SIZE     0x80000 /* 512K */
-#endif
-
-/* For 315/Xabre series */
-#ifdef CONFIG_FB_SIS_315
-#define COMMAND_QUEUE_AREA_SIZE   0x80000 /* 512K */
-#define COMMAND_QUEUE_THRESHOLD   0x1F
-#endif
-
-#define HW_CURSOR_AREA_SIZE_315   0x4000  /* 16K */
-#define HW_CURSOR_AREA_SIZE_300   0x1000  /* 4K */
-
-#define OH_ALLOC_SIZE             4000
-#define SENTINEL                  0x7fffffff
-
-#define SEQ_ADR                   0x14
-#define SEQ_DATA                  0x15
-#define DAC_ADR                   0x18
-#define DAC_DATA                  0x19
-#define CRTC_ADR                  0x24
-#define CRTC_DATA                 0x25
-#define DAC2_ADR                  (0x16-0x30)
-#define DAC2_DATA                 (0x17-0x30)
-#define VB_PART1_ADR              (0x04-0x30)
-#define VB_PART1_DATA             (0x05-0x30)
-#define VB_PART2_ADR              (0x10-0x30)
-#define VB_PART2_DATA             (0x11-0x30)
-#define VB_PART3_ADR              (0x12-0x30)
-#define VB_PART3_DATA             (0x13-0x30)
-#define VB_PART4_ADR              (0x14-0x30)
-#define VB_PART4_DATA             (0x15-0x30)
-
-#define SISSR			  SiS_Pr.SiS_P3c4
-#define SISCR                     SiS_Pr.SiS_P3d4
-#define SISDACA                   SiS_Pr.SiS_P3c8
-#define SISDACD                   SiS_Pr.SiS_P3c9
-#define SISPART1                  SiS_Pr.SiS_Part1Port
-#define SISPART2                  SiS_Pr.SiS_Part2Port
-#define SISPART3                  SiS_Pr.SiS_Part3Port
-#define SISPART4                  SiS_Pr.SiS_Part4Port
-#define SISPART5                  SiS_Pr.SiS_Part5Port
-#define SISDAC2A                  SISPART5
-#define SISDAC2D                  (SISPART5 + 1)
-#define SISMISCR                  (SiS_Pr.RelIO + 0x1c)
-#define SISMISCW                  SiS_Pr.SiS_P3c2
-#define SISINPSTAT		  (SiS_Pr.RelIO + 0x2a)
-#define SISPEL			  SiS_Pr.SiS_P3c6
-
-#define IND_SIS_PASSWORD          0x05  /* SRs */
-#define IND_SIS_COLOR_MODE        0x06
-#define IND_SIS_RAMDAC_CONTROL    0x07
-#define IND_SIS_DRAM_SIZE         0x14
-#define IND_SIS_SCRATCH_REG_16    0x16
-#define IND_SIS_SCRATCH_REG_17    0x17
-#define IND_SIS_SCRATCH_REG_1A    0x1A
-#define IND_SIS_MODULE_ENABLE     0x1E
-#define IND_SIS_PCI_ADDRESS_SET   0x20
-#define IND_SIS_TURBOQUEUE_ADR    0x26
-#define IND_SIS_TURBOQUEUE_SET    0x27
-#define IND_SIS_POWER_ON_TRAP     0x38
-#define IND_SIS_POWER_ON_TRAP2    0x39
-#define IND_SIS_CMDQUEUE_SET      0x26
-#define IND_SIS_CMDQUEUE_THRESHOLD  0x27
-
-#define IND_SIS_SCRATCH_REG_CR30  0x30  /* CRs */
-#define IND_SIS_SCRATCH_REG_CR31  0x31
-#define IND_SIS_SCRATCH_REG_CR32  0x32
-#define IND_SIS_SCRATCH_REG_CR33  0x33
-#define IND_SIS_LCD_PANEL         0x36
-#define IND_SIS_SCRATCH_REG_CR37  0x37
-#define IND_SIS_AGP_IO_PAD        0x48
-
-#define IND_BRI_DRAM_STATUS       0x63 /* PCI config memory size offset */
-
-#define MMIO_QUEUE_PHYBASE        0x85C0
-#define MMIO_QUEUE_WRITEPORT      0x85C4
-#define MMIO_QUEUE_READPORT       0x85C8
-
-#define IND_SIS_CRT2_WRITE_ENABLE_300 0x24
-#define IND_SIS_CRT2_WRITE_ENABLE_315 0x2F
-
-#define SIS_PASSWORD              0x86  /* SR05 */
-#define SIS_INTERLACED_MODE       0x20  /* SR06 */
-#define SIS_8BPP_COLOR_MODE       0x0 
-#define SIS_15BPP_COLOR_MODE      0x1 
-#define SIS_16BPP_COLOR_MODE      0x2 
-#define SIS_32BPP_COLOR_MODE      0x4 
-#define SIS_DRAM_SIZE_MASK        0x3F  /* 300/630/730 SR14 */
-#define SIS_DRAM_SIZE_1MB         0x00
-#define SIS_DRAM_SIZE_2MB         0x01
-#define SIS_DRAM_SIZE_4MB         0x03
-#define SIS_DRAM_SIZE_8MB         0x07
-#define SIS_DRAM_SIZE_16MB        0x0F
-#define SIS_DRAM_SIZE_32MB        0x1F
-#define SIS_DRAM_SIZE_64MB        0x3F
-#define SIS_DATA_BUS_MASK         0xC0
-#define SIS_DATA_BUS_32           0x00
-#define SIS_DATA_BUS_64           0x01
-#define SIS_DATA_BUS_128          0x02
-
-#define SIS315_DATA_BUS_MASK      0x02
-#define SIS315_DATA_BUS_64        0x00
-#define SIS315_DATA_BUS_128       0x01
-#define SIS315_DUAL_CHANNEL_MASK  0x0C
-#define SIS315_SINGLE_CHANNEL_1_RANK  	0x0
-#define SIS315_SINGLE_CHANNEL_2_RANK  	0x1
-#define SIS315_ASYM_DDR		  	0x02
-#define SIS315_DUAL_CHANNEL_1_RANK    	0x3
-
-#define SIS_SCRATCH_REG_1A_MASK   0x10
-
-#define SIS_ENABLE_2D             0x40  /* SR1E */
-
-#define SIS_MEM_MAP_IO_ENABLE     0x01  /* SR20 */
-#define SIS_PCI_ADDR_ENABLE       0x80
-
-#define SIS_AGP_CMDQUEUE_ENABLE   0x80  /* 315/650/740 SR26 */
-#define SIS_VRAM_CMDQUEUE_ENABLE  0x40
-#define SIS_MMIO_CMD_ENABLE       0x20
-#define SIS_CMD_QUEUE_SIZE_512k   0x00
-#define SIS_CMD_QUEUE_SIZE_1M     0x04
-#define SIS_CMD_QUEUE_SIZE_2M     0x08
-#define SIS_CMD_QUEUE_SIZE_4M     0x0C
-#define SIS_CMD_QUEUE_RESET       0x01
-#define SIS_CMD_AUTO_CORR	  0x02
-
-#define SIS_SIMULTANEOUS_VIEW_ENABLE  0x01  /* CR30 */
-#define SIS_MODE_SELECT_CRT2      0x02
-#define SIS_VB_OUTPUT_COMPOSITE   0x04
-#define SIS_VB_OUTPUT_SVIDEO      0x08
-#define SIS_VB_OUTPUT_SCART       0x10
-#define SIS_VB_OUTPUT_LCD         0x20
-#define SIS_VB_OUTPUT_CRT2        0x40
-#define SIS_VB_OUTPUT_HIVISION    0x80
-
-#define SIS_VB_OUTPUT_DISABLE     0x20  /* CR31 */
-#define SIS_DRIVER_MODE           0x40
-
-#define SIS_VB_COMPOSITE          0x01  /* CR32 */
-#define SIS_VB_SVIDEO             0x02
-#define SIS_VB_SCART              0x04
-#define SIS_VB_LCD                0x08
-#define SIS_VB_CRT2               0x10
-#define SIS_CRT1                  0x20
-#define SIS_VB_HIVISION           0x40
-#define SIS_VB_DVI                0x80
-#define SIS_VB_TV                 (SIS_VB_COMPOSITE | SIS_VB_SVIDEO | \
-                                   SIS_VB_SCART | SIS_VB_HIVISION)
-
-#define SIS_EXTERNAL_CHIP_MASK    	   0x0E  /* CR37 (< SiS 660) */
-#define SIS_EXTERNAL_CHIP_SIS301           0x01  /* in CR37 << 1 ! */
-#define SIS_EXTERNAL_CHIP_LVDS             0x02  /* in CR37 << 1 ! */
-#define SIS_EXTERNAL_CHIP_TRUMPION         0x03  /* in CR37 << 1 ! */
-#define SIS_EXTERNAL_CHIP_LVDS_CHRONTEL    0x04  /* in CR37 << 1 ! */
-#define SIS_EXTERNAL_CHIP_CHRONTEL         0x05  /* in CR37 << 1 ! */
-#define SIS310_EXTERNAL_CHIP_LVDS          0x02  /* in CR37 << 1 ! */
-#define SIS310_EXTERNAL_CHIP_LVDS_CHRONTEL 0x03  /* in CR37 << 1 ! */
-
-#define SIS_AGP_2X                0x20  /* CR48 */
-
-#define BRI_DRAM_SIZE_MASK        0x70  /* PCI bridge config data */
-#define BRI_DRAM_SIZE_2MB         0x00
-#define BRI_DRAM_SIZE_4MB         0x01
-#define BRI_DRAM_SIZE_8MB         0x02
-#define BRI_DRAM_SIZE_16MB        0x03
-#define BRI_DRAM_SIZE_32MB        0x04
-#define BRI_DRAM_SIZE_64MB        0x05
-
-#define HW_DEVICE_EXTENSION	  SIS_HW_INFO
-#define PHW_DEVICE_EXTENSION      PSIS_HW_INFO
-
-#define SR_BUFFER_SIZE            5
-#define CR_BUFFER_SIZE            5
-
-/* entries for disp_state - deprecated as of 1.6.02 */
-#define DISPTYPE_CRT1       0x00000008L
-#define DISPTYPE_CRT2       0x00000004L
-#define DISPTYPE_LCD        0x00000002L
-#define DISPTYPE_TV         0x00000001L
-#define DISPTYPE_DISP1      DISPTYPE_CRT1
-#define DISPTYPE_DISP2      (DISPTYPE_CRT2 | DISPTYPE_LCD | DISPTYPE_TV)
-#define DISPMODE_SINGLE	    0x00000020L
-#define DISPMODE_MIRROR	    0x00000010L
-#define DISPMODE_DUALVIEW   0x00000040L
-
-/* Deprecated as of 1.6.02 - use vbflags instead */
-#define HASVB_NONE      	0x00
-#define HASVB_301       	0x01
-#define HASVB_LVDS      	0x02
-#define HASVB_TRUMPION  	0x04
-#define HASVB_LVDS_CHRONTEL	0x10
-#define HASVB_302       	0x20
-#define HASVB_303       	0x40
-#define HASVB_CHRONTEL  	0x80
-
-/* Useful macros */
-#define inSISREG(base)          inb(base)
-#define outSISREG(base,val)     outb(val,base)
-#define orSISREG(base,val)      do { \
-                                  unsigned char __Temp = inb(base); \
-                                  outSISREG(base, __Temp | (val)); \
-                                } while (0)
-#define andSISREG(base,val)     do { \
-                                  unsigned char __Temp = inb(base); \
-                                  outSISREG(base, __Temp & (val)); \
-                                } while (0)
-#define inSISIDXREG(base,idx,var)   do { \
-                                      outb(idx,base); var=inb((base)+1); \
-                                    } while (0)
-#define outSISIDXREG(base,idx,val)  do { \
-                                      outb(idx,base); outb((val),(base)+1); \
-                                    } while (0)
-#define orSISIDXREG(base,idx,val)   do { \
-                                      unsigned char __Temp; \
-                                      outb(idx,base);   \
-                                      __Temp = inb((base)+1)|(val); \
-                                      outSISIDXREG(base,idx,__Temp); \
-                                    } while (0)
-#define andSISIDXREG(base,idx,and)  do { \
-                                      unsigned char __Temp; \
-                                      outb(idx,base);   \
-                                      __Temp = inb((base)+1)&(and); \
-                                      outSISIDXREG(base,idx,__Temp); \
-                                    } while (0)
-#define setSISIDXREG(base,idx,and,or)   do { \
-                                          unsigned char __Temp; \
-                                          outb(idx,base);   \
-                                          __Temp = (inb((base)+1)&(and))|(or); \
-                                          outSISIDXREG(base,idx,__Temp); \
-                                        } while (0)
-
-/* ------------------- Global Variables ----------------------------- */
-
-/* Fbcon variables */
-static struct fb_info *sis_fb_info;
+#define MODE_INDEX_NONE           0  /* index for mode=none */
 
-static struct fb_var_screeninfo default_var = {
+/* Fbcon stuff */
+static struct fb_var_screeninfo my_default_var = {
 	.xres            = 0,
 	.yres            = 0,
 	.xres_virtual    = 0,
@@ -346,125 +58,110 @@
 	.vsync_len       = 0,
 	.sync            = 0,
 	.vmode           = FB_VMODE_NONINTERLACED,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-	.reserved        = {0, 0, 0, 0, 0, 0}
-#endif
 };
 
+/* Boot-time parameters */
+static int sisfb_off = 0;
+static int sisfb_parm_mem = 0;
+static int sisfb_accel = -1;
+static int sisfb_ypan = -1;
+static int sisfb_max = -1;
+static int sisfb_userom = 1;
+static int sisfb_useoem = -1;
+#ifdef MODULE
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-static struct fb_fix_screeninfo sisfb_fix = {
-	.id		= "SiS",
-	.type		= FB_TYPE_PACKED_PIXELS,
-	.xpanstep	= 0,
-	.ypanstep	= 1,
-};
-static char myid[40];
-static u32 pseudo_palette[17];
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static struct display sis_disp;
-
-static struct display_switch sisfb_sw;	
-
-static struct {
-	u16 blue, green, red, pad;
-} sis_palette[256];
-
-static union {
-#ifdef FBCON_HAS_CFB16
-	u16 cfb16[16];
-#endif
-#ifdef FBCON_HAS_CFB32
-	u32 cfb32[16];
+static int sisfb_mode_idx = -1;
+#else
+static int sisfb_mode_idx = MODE_INDEX_NONE;  /* Don't use a mode by default if we are a module */
 #endif
-} sis_fbcon_cmap;
-
-static int sisfb_inverse = 0;
-static int currcon = 0;
+#else
+static int sisfb_mode_idx = -1;               /* Use a default mode if we are inside the kernel */
 #endif
-
-/* global flags */
-static int sisfb_off = 0;
+static int sisfb_parm_rate = -1;
 static int sisfb_crt1off = 0;
 static int sisfb_forcecrt1 = -1;
-static int sisvga_enabled = 0;
-static int sisfb_userom = 1;
-static int sisfb_useoem = -1;
-static int sisfb_parm_rate = -1;
-static int sisfb_registered = 0;
-static int sisfb_mem = 0;
-static int sisfb_pdc = 0;
-static int sisfb_ypan = -1;
-static int sisfb_max = -1;
-static int sisfb_nocrt2rate = 0;
+static int sisfb_crt2type  = -1;	/* CRT2 type (for overriding autodetection) */
+static int sisfb_crt2flags = 0;
+static int sisfb_pdc = 0xff;
+static int sisfb_pdca = 0xff;
+static int sisfb_scalelcd = -1;
+static int sisfb_specialtiming = CUT_NONE;
+static int sisfb_lvdshl = -1;
 static int sisfb_dstn = 0;
 static int sisfb_fstn = 0;
-
-VGA_ENGINE sisvga_engine = UNKNOWN_VGA;
-int 	   sisfb_accel = -1;
-
-/* These are to adapted according to VGA_ENGINE type */
-static int sisfb_hwcursor_size = 0;
-static int sisfb_CRT2_write_enable = 0;
-
-int sisfb_crt2type  = -1;	/* CRT2 type (for overriding autodetection) */
-int sisfb_tvplug    = -1;	/* Tv plug type (for overriding autodetection) */
-
-int sisfb_queuemode = -1; 	/* Use MMIO queue mode by default (315 series only) */
-
-unsigned char sisfb_detectedpdc = 0;
-
-unsigned char sisfb_detectedlcda = 0xff;
-
-/* data for sis hardware ("par") */
-struct video_info ivideo;
-
-/* For ioctl SISFB_GET_INFO */
-sisfb_info sisfbinfo;
-
-/* Hardware info; contains data on hardware */
-SIS_HW_INFO sishw_ext;
-
-/* SiS private structure */
-SiS_Private  SiS_Pr;
-
-/* Card parameters */
-static unsigned long sisfb_mmio_size = 0;
-static u8            sisfb_caps = 0;
-
-typedef enum _SIS_CMDTYPE {
-	MMIO_CMD = 0,
-	AGP_CMD_QUEUE,
-	VM_CMD_QUEUE,
-} SIS_CMDTYPE;
+static int sisfb_tvplug = -1;		/* Tv plug type (for overriding autodetection) */
+static int sisfb_tvstd  = -1;
+static int sisfb_tvxposoffset = 0;
+static int sisfb_tvyposoffset = 0;
+static int sisfb_filter = -1;
+static int sisfb_nocrt2rate = 0;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+static int  sisfb_inverse = 0;
+static char sisfb_fontname[40];
+#endif
+#if !defined(__i386__) && !defined(__x86_64__)
+static int sisfb_resetcard = 0;
+static int sisfb_videoram = 0;
+#endif
 
 /* List of supported chips */
-static struct board {
-	u16 vendor, device;
-	const char *name;
-} sisdev_list[] = {
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300,     "SIS 300"},
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540_VGA, "SIS 540 VGA"},
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630_VGA, "SIS 630/730 VGA"},
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315H,    "SIS 315H"},
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315,     "SIS 315"},
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315PRO,  "SIS 315PRO"},
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_550_VGA, "SIS 550 VGA"},
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650_VGA, "SIS 65x/M65x/740 VGA"},
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_330,     "SIS 330"},
-	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_660_VGA, "SIS 661FX/M661FX/741/760 VGA"},
-	{0, 0, NULL}
+static struct sisfb_chip_info {
+        int 		chip;
+	int 		vgaengine;
+	int		mni;
+	int 		hwcursor_size;
+	int		CRT2_write_enable;
+	const char 	*chip_name;
+} sisfb_chip_info[] __devinitdata = {
+	{ SIS_300,    SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 300/305" },
+	{ SIS_540,    SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 540" },
+	{ SIS_630,    SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 630" },
+	{ SIS_315H,   SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 315H" },
+	{ SIS_315,    SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 315" },
+	{ SIS_315PRO, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 315PRO" },
+	{ SIS_550,    SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 55x" },
+	{ SIS_650,    SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 650" },
+	{ SIS_330,    SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 330" },
+	{ SIS_660,    SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 660" },
 };
 
+static struct pci_device_id __devinitdata sisfb_pci_table[] = {
+#ifdef CONFIG_FB_SIS_300
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
+#endif
+#ifdef CONFIG_FB_SIS_315
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315H,    PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315PRO,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5},
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_550_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6},
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7},
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_330,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8},
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_660_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9},
+#endif
+	{ 0 }
+};
+
+MODULE_DEVICE_TABLE(pci, sisfb_pci_table);
+
+static struct sis_video_info *card_list = NULL;
+
+/* TODO: This is not handled card-wise because the DRM
+   does not refer to a unique fb when calling sis_alloc
+   or sis_free. Therefore, this is handled globally for
+   now (hoping that nobody is crazy enough to run two
+   SiS cards at the same time).
+ */
+SIS_HEAP       	sisfb_heap;
+
 #define MD_SIS300 1
 #define MD_SIS315 2
 
 /* Mode table */
-/* NOT const - will be patched for 1280x768 mode number chaos reasons */
-struct _sisbios_mode {
+static const struct _sisbios_mode {
 	char name[15];
-	u8 mode_no;
+	u8  mode_no[2];
 	u16 vesa_mode_no_1;  /* "SiS defined" VESA mode number */
 	u16 vesa_mode_no_2;  /* Real VESA mode numbers */
 	u16 xres;
@@ -475,190 +172,231 @@
 	u16 rows;
 	u8  chipset;
 } sisbios_mode[] = {
-#define MODE_INDEX_NONE           0  /* index for mode=none */
-	{"none",         0xff, 0x0000, 0x0000,    0,    0,  0, 0,   0,  0, MD_SIS300|MD_SIS315},
-	{"320x200x8",    0x59, 0x0138, 0x0000,  320,  200,  8, 1,  40, 12, MD_SIS300|MD_SIS315},
-	{"320x200x16",   0x41, 0x010e, 0x0000,  320,  200, 16, 1,  40, 12, MD_SIS300|MD_SIS315},
-	{"320x200x24",   0x4f, 0x0000, 0x0000,  320,  200, 32, 1,  40, 12, MD_SIS300|MD_SIS315},  /* TW: That's for people who mix up color- and fb depth */
-	{"320x200x32",   0x4f, 0x0000, 0x0000,  320,  200, 32, 1,  40, 12, MD_SIS300|MD_SIS315},
-	{"320x240x8",    0x50, 0x0132, 0x0000,  320,  240,  8, 1,  40, 15, MD_SIS300|MD_SIS315},
-	{"320x240x16",   0x56, 0x0135, 0x0000,  320,  240, 16, 1,  40, 15, MD_SIS300|MD_SIS315},
-	{"320x240x24",   0x53, 0x0000, 0x0000,  320,  240, 32, 1,  40, 15, MD_SIS300|MD_SIS315},
-	{"320x240x32",   0x53, 0x0000, 0x0000,  320,  240, 32, 1,  40, 15, MD_SIS300|MD_SIS315},
-	{"320x240x8",    0x5a, 0x0132, 0x0000,  320,  480,  8, 1,  40, 30,           MD_SIS315},  /* TW: FSTN */
-	{"320x240x16",   0x5b, 0x0135, 0x0000,  320,  480, 16, 1,  40, 30,           MD_SIS315},  /* TW: FSTN */
-	{"400x300x8",    0x51, 0x0133, 0x0000,  400,  300,  8, 1,  50, 18, MD_SIS300|MD_SIS315},
-	{"400x300x16",   0x57, 0x0136, 0x0000,  400,  300, 16, 1,  50, 18, MD_SIS300|MD_SIS315},
-	{"400x300x24",   0x54, 0x0000, 0x0000,  400,  300, 32, 1,  50, 18, MD_SIS300|MD_SIS315},
-	{"400x300x32",   0x54, 0x0000, 0x0000,  400,  300, 32, 1,  50, 18, MD_SIS300|MD_SIS315},
-	{"512x384x8",    0x52, 0x0000, 0x0000,  512,  384,  8, 1,  64, 24, MD_SIS300|MD_SIS315},
-	{"512x384x16",   0x58, 0x0000, 0x0000,  512,  384, 16, 1,  64, 24, MD_SIS300|MD_SIS315},
-	{"512x384x24",   0x5c, 0x0000, 0x0000,  512,  384, 32, 1,  64, 24, MD_SIS300|MD_SIS315},
-	{"512x384x32",   0x5c, 0x0000, 0x0000,  512,  384, 32, 1,  64, 24, MD_SIS300|MD_SIS315},
-	{"640x400x8",    0x2f, 0x0000, 0x0000,  640,  400,  8, 1,  80, 25, MD_SIS300|MD_SIS315},
-	{"640x400x16",   0x5d, 0x0000, 0x0000,  640,  400, 16, 1,  80, 25, MD_SIS300|MD_SIS315},
-	{"640x400x24",   0x5e, 0x0000, 0x0000,  640,  400, 32, 1,  80, 25, MD_SIS300|MD_SIS315},
-	{"640x400x32",   0x5e, 0x0000, 0x0000,  640,  400, 32, 1,  80, 25, MD_SIS300|MD_SIS315},
-	{"640x480x8",    0x2e, 0x0101, 0x0101,  640,  480,  8, 1,  80, 30, MD_SIS300|MD_SIS315},
-	{"640x480x16",   0x44, 0x0111, 0x0111,  640,  480, 16, 1,  80, 30, MD_SIS300|MD_SIS315},
-	{"640x480x24",   0x62, 0x013a, 0x0112,  640,  480, 32, 1,  80, 30, MD_SIS300|MD_SIS315},
-	{"640x480x32",   0x62, 0x013a, 0x0112,  640,  480, 32, 1,  80, 30, MD_SIS300|MD_SIS315},
-	{"720x480x8",    0x31, 0x0000, 0x0000,  720,  480,  8, 1,  90, 30, MD_SIS300|MD_SIS315},
-	{"720x480x16",   0x33, 0x0000, 0x0000,  720,  480, 16, 1,  90, 30, MD_SIS300|MD_SIS315},
-	{"720x480x24",   0x35, 0x0000, 0x0000,  720,  480, 32, 1,  90, 30, MD_SIS300|MD_SIS315},
-	{"720x480x32",   0x35, 0x0000, 0x0000,  720,  480, 32, 1,  90, 30, MD_SIS300|MD_SIS315},
-	{"720x576x8",    0x32, 0x0000, 0x0000,  720,  576,  8, 1,  90, 36, MD_SIS300|MD_SIS315},
-	{"720x576x16",   0x34, 0x0000, 0x0000,  720,  576, 16, 1,  90, 36, MD_SIS300|MD_SIS315},
-	{"720x576x24",   0x36, 0x0000, 0x0000,  720,  576, 32, 1,  90, 36, MD_SIS300|MD_SIS315},
-	{"720x576x32",   0x36, 0x0000, 0x0000,  720,  576, 32, 1,  90, 36, MD_SIS300|MD_SIS315},
-	{"768x576x8",    0x5f, 0x0000, 0x0000,  768,  576,  8, 1,  96, 36, MD_SIS300|MD_SIS315},
-	{"768x576x16",   0x60, 0x0000, 0x0000,  768,  576, 16, 1,  96, 36, MD_SIS300|MD_SIS315},
-	{"768x576x24",   0x61, 0x0000, 0x0000,  768,  576, 32, 1,  96, 36, MD_SIS300|MD_SIS315},
-	{"768x576x32",   0x61, 0x0000, 0x0000,  768,  576, 32, 1,  96, 36, MD_SIS300|MD_SIS315},
-	{"800x480x8",    0x70, 0x0000, 0x0000,  800,  480,  8, 1, 100, 30, MD_SIS300|MD_SIS315},
-	{"800x480x16",   0x7a, 0x0000, 0x0000,  800,  480, 16, 1, 100, 30, MD_SIS300|MD_SIS315},
-	{"800x480x24",   0x76, 0x0000, 0x0000,  800,  480, 32, 1, 100, 30, MD_SIS300|MD_SIS315},
-	{"800x480x32",   0x76, 0x0000, 0x0000,  800,  480, 32, 1, 100, 30, MD_SIS300|MD_SIS315},
+/*0*/	{"none",         {0xff,0xff}, 0x0000, 0x0000,    0,    0,  0, 0,   0,  0, MD_SIS300|MD_SIS315},
+	{"320x200x8",    {0x59,0x59}, 0x0138, 0x0000,  320,  200,  8, 1,  40, 12, MD_SIS300|MD_SIS315},
+	{"320x200x16",   {0x41,0x41}, 0x010e, 0x0000,  320,  200, 16, 1,  40, 12, MD_SIS300|MD_SIS315},
+	{"320x200x24",   {0x4f,0x4f}, 0x0000, 0x0000,  320,  200, 32, 1,  40, 12, MD_SIS300|MD_SIS315},  /* That's for people who mix up color- and fb depth */
+	{"320x200x32",   {0x4f,0x4f}, 0x0000, 0x0000,  320,  200, 32, 1,  40, 12, MD_SIS300|MD_SIS315},
+	{"320x240x8",    {0x50,0x50}, 0x0132, 0x0000,  320,  240,  8, 1,  40, 15, MD_SIS300|MD_SIS315},
+	{"320x240x16",   {0x56,0x56}, 0x0135, 0x0000,  320,  240, 16, 1,  40, 15, MD_SIS300|MD_SIS315},
+	{"320x240x24",   {0x53,0x53}, 0x0000, 0x0000,  320,  240, 32, 1,  40, 15, MD_SIS300|MD_SIS315},
+	{"320x240x32",   {0x53,0x53}, 0x0000, 0x0000,  320,  240, 32, 1,  40, 15, MD_SIS300|MD_SIS315},
+	{"320x240x8",    {0x5a,0x5a}, 0x0132, 0x0000,  320,  480,  8, 1,  40, 30,           MD_SIS315},  /* FSTN */
+/*10*/	{"320x240x16",   {0x5b,0x5b}, 0x0135, 0x0000,  320,  480, 16, 1,  40, 30,           MD_SIS315},  /* FSTN */
+	{"400x300x8",    {0x51,0x51}, 0x0133, 0x0000,  400,  300,  8, 1,  50, 18, MD_SIS300|MD_SIS315},
+	{"400x300x16",   {0x57,0x57}, 0x0136, 0x0000,  400,  300, 16, 1,  50, 18, MD_SIS300|MD_SIS315},
+	{"400x300x24",   {0x54,0x54}, 0x0000, 0x0000,  400,  300, 32, 1,  50, 18, MD_SIS300|MD_SIS315},
+	{"400x300x32",   {0x54,0x54}, 0x0000, 0x0000,  400,  300, 32, 1,  50, 18, MD_SIS300|MD_SIS315},
+	{"512x384x8",    {0x52,0x52}, 0x0000, 0x0000,  512,  384,  8, 1,  64, 24, MD_SIS300|MD_SIS315},
+	{"512x384x16",   {0x58,0x58}, 0x0000, 0x0000,  512,  384, 16, 1,  64, 24, MD_SIS300|MD_SIS315},
+	{"512x384x24",   {0x5c,0x5c}, 0x0000, 0x0000,  512,  384, 32, 1,  64, 24, MD_SIS300|MD_SIS315},
+	{"512x384x32",   {0x5c,0x5c}, 0x0000, 0x0000,  512,  384, 32, 1,  64, 24, MD_SIS300|MD_SIS315},
+	{"640x400x8",    {0x2f,0x2f}, 0x0000, 0x0000,  640,  400,  8, 1,  80, 25, MD_SIS300|MD_SIS315},
+/*20*/	{"640x400x16",   {0x5d,0x5d}, 0x0000, 0x0000,  640,  400, 16, 1,  80, 25, MD_SIS300|MD_SIS315},
+	{"640x400x24",   {0x5e,0x5e}, 0x0000, 0x0000,  640,  400, 32, 1,  80, 25, MD_SIS300|MD_SIS315},
+	{"640x400x32",   {0x5e,0x5e}, 0x0000, 0x0000,  640,  400, 32, 1,  80, 25, MD_SIS300|MD_SIS315},
+	{"640x480x8",    {0x2e,0x2e}, 0x0101, 0x0101,  640,  480,  8, 1,  80, 30, MD_SIS300|MD_SIS315},
+	{"640x480x16",   {0x44,0x44}, 0x0111, 0x0111,  640,  480, 16, 1,  80, 30, MD_SIS300|MD_SIS315},
+	{"640x480x24",   {0x62,0x62}, 0x013a, 0x0112,  640,  480, 32, 1,  80, 30, MD_SIS300|MD_SIS315},
+	{"640x480x32",   {0x62,0x62}, 0x013a, 0x0112,  640,  480, 32, 1,  80, 30, MD_SIS300|MD_SIS315},
+	{"720x480x8",    {0x31,0x31}, 0x0000, 0x0000,  720,  480,  8, 1,  90, 30, MD_SIS300|MD_SIS315},
+	{"720x480x16",   {0x33,0x33}, 0x0000, 0x0000,  720,  480, 16, 1,  90, 30, MD_SIS300|MD_SIS315},
+	{"720x480x24",   {0x35,0x35}, 0x0000, 0x0000,  720,  480, 32, 1,  90, 30, MD_SIS300|MD_SIS315},
+/*30*/	{"720x480x32",   {0x35,0x35}, 0x0000, 0x0000,  720,  480, 32, 1,  90, 30, MD_SIS300|MD_SIS315},
+	{"720x576x8",    {0x32,0x32}, 0x0000, 0x0000,  720,  576,  8, 1,  90, 36, MD_SIS300|MD_SIS315},
+	{"720x576x16",   {0x34,0x34}, 0x0000, 0x0000,  720,  576, 16, 1,  90, 36, MD_SIS300|MD_SIS315},
+	{"720x576x24",   {0x36,0x36}, 0x0000, 0x0000,  720,  576, 32, 1,  90, 36, MD_SIS300|MD_SIS315},
+	{"720x576x32",   {0x36,0x36}, 0x0000, 0x0000,  720,  576, 32, 1,  90, 36, MD_SIS300|MD_SIS315},
+	{"768x576x8",    {0x5f,0x5f}, 0x0000, 0x0000,  768,  576,  8, 1,  96, 36, MD_SIS300|MD_SIS315},
+	{"768x576x16",   {0x60,0x60}, 0x0000, 0x0000,  768,  576, 16, 1,  96, 36, MD_SIS300|MD_SIS315},
+	{"768x576x24",   {0x61,0x61}, 0x0000, 0x0000,  768,  576, 32, 1,  96, 36, MD_SIS300|MD_SIS315},
+	{"768x576x32",   {0x61,0x61}, 0x0000, 0x0000,  768,  576, 32, 1,  96, 36, MD_SIS300|MD_SIS315},
+	{"800x480x8",    {0x70,0x70}, 0x0000, 0x0000,  800,  480,  8, 1, 100, 30, MD_SIS300|MD_SIS315},
+/*40*/	{"800x480x16",   {0x7a,0x7a}, 0x0000, 0x0000,  800,  480, 16, 1, 100, 30, MD_SIS300|MD_SIS315},
+	{"800x480x24",   {0x76,0x76}, 0x0000, 0x0000,  800,  480, 32, 1, 100, 30, MD_SIS300|MD_SIS315},
+	{"800x480x32",   {0x76,0x76}, 0x0000, 0x0000,  800,  480, 32, 1, 100, 30, MD_SIS300|MD_SIS315},
 #define DEFAULT_MODE              43 /* index for 800x600x8 */
 #define DEFAULT_LCDMODE           43 /* index for 800x600x8 */
 #define DEFAULT_TVMODE            43 /* index for 800x600x8 */
-	{"800x600x8",    0x30, 0x0103, 0x0103,  800,  600,  8, 2, 100, 37, MD_SIS300|MD_SIS315},
-	{"800x600x16",   0x47, 0x0114, 0x0114,  800,  600, 16, 2, 100, 37, MD_SIS300|MD_SIS315},
-	{"800x600x24",   0x63, 0x013b, 0x0115,  800,  600, 32, 2, 100, 37, MD_SIS300|MD_SIS315},
-	{"800x600x32",   0x63, 0x013b, 0x0115,  800,  600, 32, 2, 100, 37, MD_SIS300|MD_SIS315},
-	{"848x480x8",    0x39, 0x0000, 0x0000,  848,  480,  8, 2, 106, 30, MD_SIS300|MD_SIS315},
-	{"848x480x16",   0x3b, 0x0000, 0x0000,  848,  480, 16, 2, 106, 30, MD_SIS300|MD_SIS315},
-	{"848x480x24",   0x3e, 0x0000, 0x0000,  848,  480, 32, 2, 106, 30, MD_SIS300|MD_SIS315},
-	{"848x480x32",   0x3e, 0x0000, 0x0000,  848,  480, 32, 2, 106, 30, MD_SIS300|MD_SIS315},
-	{"856x480x8",    0x3f, 0x0000, 0x0000,  856,  480,  8, 2, 107, 30, MD_SIS300|MD_SIS315},
-	{"856x480x16",   0x42, 0x0000, 0x0000,  856,  480, 16, 2, 107, 30, MD_SIS300|MD_SIS315},
-	{"856x480x24",   0x45, 0x0000, 0x0000,  856,  480, 32, 2, 107, 30, MD_SIS300|MD_SIS315},
-	{"856x480x32",   0x45, 0x0000, 0x0000,  856,  480, 32, 2, 107, 30, MD_SIS300|MD_SIS315},
-	{"1024x576x8",   0x71, 0x0000, 0x0000, 1024,  576,  8, 1, 128, 36, MD_SIS300|MD_SIS315},
-	{"1024x576x16",  0x74, 0x0000, 0x0000, 1024,  576, 16, 1, 128, 36, MD_SIS300|MD_SIS315},
-	{"1024x576x24",  0x77, 0x0000, 0x0000, 1024,  576, 32, 1, 128, 36, MD_SIS300|MD_SIS315},
-	{"1024x576x32",  0x77, 0x0000, 0x0000, 1024,  576, 32, 1, 128, 36, MD_SIS300|MD_SIS315},
-	{"1024x600x8",   0x20, 0x0000, 0x0000, 1024,  600,  8, 1, 128, 37, MD_SIS300          },
-	{"1024x600x16",  0x21, 0x0000, 0x0000, 1024,  600, 16, 1, 128, 37, MD_SIS300          },
-	{"1024x600x24",  0x22, 0x0000, 0x0000, 1024,  600, 32, 1, 128, 37, MD_SIS300          },
-	{"1024x600x32",  0x22, 0x0000, 0x0000, 1024,  600, 32, 1, 128, 37, MD_SIS300          },
-	{"1024x768x8",   0x38, 0x0105, 0x0105, 1024,  768,  8, 2, 128, 48, MD_SIS300|MD_SIS315},
-	{"1024x768x16",  0x4a, 0x0117, 0x0117, 1024,  768, 16, 2, 128, 48, MD_SIS300|MD_SIS315},
-	{"1024x768x24",  0x64, 0x013c, 0x0118, 1024,  768, 32, 2, 128, 48, MD_SIS300|MD_SIS315},
-	{"1024x768x32",  0x64, 0x013c, 0x0118, 1024,  768, 32, 2, 128, 48, MD_SIS300|MD_SIS315},
-	{"1152x768x8",   0x23, 0x0000, 0x0000, 1152,  768,  8, 1, 144, 48, MD_SIS300          },
-	{"1152x768x16",  0x24, 0x0000, 0x0000, 1152,  768, 16, 1, 144, 48, MD_SIS300          },
-	{"1152x768x24",  0x25, 0x0000, 0x0000, 1152,  768, 32, 1, 144, 48, MD_SIS300          },
-	{"1152x768x32",  0x25, 0x0000, 0x0000, 1152,  768, 32, 1, 144, 48, MD_SIS300          },
-	{"1152x864x8",   0x29, 0x0000, 0x0000, 1152,  864,  8, 1, 144, 54, MD_SIS300|MD_SIS315},
-	{"1152x864x16",  0x2a, 0x0000, 0x0000, 1152,  864, 16, 1, 144, 54, MD_SIS300|MD_SIS315},
-	{"1152x864x24",  0x2b, 0x0000, 0x0000, 1152,  864, 32, 1, 144, 54, MD_SIS300|MD_SIS315},
-	{"1152x864x32",  0x2b, 0x0000, 0x0000, 1152,  864, 32, 1, 144, 54, MD_SIS300|MD_SIS315},
-	{"1280x720x8",   0x79, 0x0000, 0x0000, 1280,  720,  8, 1, 160, 45, MD_SIS300|MD_SIS315},
-	{"1280x720x16",  0x75, 0x0000, 0x0000, 1280,  720, 16, 1, 160, 45, MD_SIS300|MD_SIS315},
-	{"1280x720x24",  0x78, 0x0000, 0x0000, 1280,  720, 32, 1, 160, 45, MD_SIS300|MD_SIS315},
-	{"1280x720x32",  0x78, 0x0000, 0x0000, 1280,  720, 32, 1, 160, 45, MD_SIS300|MD_SIS315},
-#define MODEINDEX_1280x768 79
-	{"1280x768x8",   0x23, 0x0000, 0x0000, 1280,  768,  8, 1, 160, 48, MD_SIS300|MD_SIS315},
-	{"1280x768x16",  0x24, 0x0000, 0x0000, 1280,  768, 16, 1, 160, 48, MD_SIS300|MD_SIS315},
-	{"1280x768x24",  0x25, 0x0000, 0x0000, 1280,  768, 32, 1, 160, 48, MD_SIS300|MD_SIS315},
-	{"1280x768x32",  0x25, 0x0000, 0x0000, 1280,  768, 32, 1, 160, 48, MD_SIS300|MD_SIS315},
-	{"1280x960x8",   0x7c, 0x0000, 0x0000, 1280,  960,  8, 1, 160, 60, MD_SIS300|MD_SIS315},
-	{"1280x960x16",  0x7d, 0x0000, 0x0000, 1280,  960, 16, 1, 160, 60, MD_SIS300|MD_SIS315},
-	{"1280x960x24",  0x7e, 0x0000, 0x0000, 1280,  960, 32, 1, 160, 60, MD_SIS300|MD_SIS315},
-	{"1280x960x32",  0x7e, 0x0000, 0x0000, 1280,  960, 32, 1, 160, 60, MD_SIS300|MD_SIS315},
-	{"1280x1024x8",  0x3a, 0x0107, 0x0107, 1280, 1024,  8, 2, 160, 64, MD_SIS300|MD_SIS315},
-	{"1280x1024x16", 0x4d, 0x011a, 0x011a, 1280, 1024, 16, 2, 160, 64, MD_SIS300|MD_SIS315},
-	{"1280x1024x24", 0x65, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315},
-	{"1280x1024x32", 0x65, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315},
-	{"1360x768x8",   0x48, 0x0000, 0x0000, 1360,  768,  8, 1, 170, 48, MD_SIS300|MD_SIS315},
-	{"1360x768x16",  0x4b, 0x0000, 0x0000, 1360,  768, 16, 1, 170, 48, MD_SIS300|MD_SIS315},
-	{"1360x768x24",  0x4e, 0x0000, 0x0000, 1360,  768, 32, 1, 170, 48, MD_SIS300|MD_SIS315},
-	{"1360x768x32",  0x4e, 0x0000, 0x0000, 1360,  768, 32, 1, 170, 48, MD_SIS300|MD_SIS315},
-	{"1360x1024x8",  0x67, 0x0000, 0x0000, 1360, 1024,  8, 1, 170, 64, MD_SIS300          },
-	{"1360x1024x16", 0x6f, 0x0000, 0x0000, 1360, 1024, 16, 1, 170, 64, MD_SIS300          },
-	{"1360x1024x24", 0x72, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300          },
-	{"1360x1024x32", 0x72, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300          },
-	{"1400x1050x8",  0x26, 0x0000, 0x0000, 1400, 1050,  8, 1, 175, 65,           MD_SIS315},
-	{"1400x1050x16", 0x27, 0x0000, 0x0000, 1400, 1050, 16, 1, 175, 65,           MD_SIS315},
-	{"1400x1050x24", 0x28, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,           MD_SIS315},
-	{"1400x1050x32", 0x28, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,           MD_SIS315},
-	{"1600x1200x8",  0x3c, 0x0130, 0x011c, 1600, 1200,  8, 1, 200, 75, MD_SIS300|MD_SIS315},
-	{"1600x1200x16", 0x3d, 0x0131, 0x011e, 1600, 1200, 16, 1, 200, 75, MD_SIS300|MD_SIS315},
-	{"1600x1200x24", 0x66, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315},
-	{"1600x1200x32", 0x66, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315},
-	{"1920x1440x8",  0x68, 0x013f, 0x0000, 1920, 1440,  8, 1, 240, 75, MD_SIS300|MD_SIS315},
-	{"1920x1440x16", 0x69, 0x0140, 0x0000, 1920, 1440, 16, 1, 240, 75, MD_SIS300|MD_SIS315},
-	{"1920x1440x24", 0x6b, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315},
-	{"1920x1440x32", 0x6b, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315},
-	{"2048x1536x8",  0x6c, 0x0000, 0x0000, 2048, 1536,  8, 1, 256, 96,           MD_SIS315},
-	{"2048x1536x16", 0x6d, 0x0000, 0x0000, 2048, 1536, 16, 1, 256, 96,           MD_SIS315},
-	{"2048x1536x24", 0x6e, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,           MD_SIS315},
-	{"2048x1536x32", 0x6e, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,           MD_SIS315},
-	{"\0", 0x00, 0, 0, 0, 0, 0, 0, 0}
+	{"800x600x8",    {0x30,0x30}, 0x0103, 0x0103,  800,  600,  8, 2, 100, 37, MD_SIS300|MD_SIS315},
+	{"800x600x16",   {0x47,0x47}, 0x0114, 0x0114,  800,  600, 16, 2, 100, 37, MD_SIS300|MD_SIS315},
+	{"800x600x24",   {0x63,0x63}, 0x013b, 0x0115,  800,  600, 32, 2, 100, 37, MD_SIS300|MD_SIS315},
+	{"800x600x32",   {0x63,0x63}, 0x013b, 0x0115,  800,  600, 32, 2, 100, 37, MD_SIS300|MD_SIS315},
+	{"848x480x8",    {0x39,0x39}, 0x0000, 0x0000,  848,  480,  8, 2, 106, 30, MD_SIS300|MD_SIS315},
+	{"848x480x16",   {0x3b,0x3b}, 0x0000, 0x0000,  848,  480, 16, 2, 106, 30, MD_SIS300|MD_SIS315},
+	{"848x480x24",   {0x3e,0x3e}, 0x0000, 0x0000,  848,  480, 32, 2, 106, 30, MD_SIS300|MD_SIS315},
+/*50*/	{"848x480x32",   {0x3e,0x3e}, 0x0000, 0x0000,  848,  480, 32, 2, 106, 30, MD_SIS300|MD_SIS315},
+	{"856x480x8",    {0x3f,0x3f}, 0x0000, 0x0000,  856,  480,  8, 2, 107, 30, MD_SIS300|MD_SIS315},
+	{"856x480x16",   {0x42,0x42}, 0x0000, 0x0000,  856,  480, 16, 2, 107, 30, MD_SIS300|MD_SIS315},
+	{"856x480x24",   {0x45,0x45}, 0x0000, 0x0000,  856,  480, 32, 2, 107, 30, MD_SIS300|MD_SIS315},
+	{"856x480x32",   {0x45,0x45}, 0x0000, 0x0000,  856,  480, 32, 2, 107, 30, MD_SIS300|MD_SIS315},
+	{"960x540x8",    {0x1d,0x1d}, 0x0000, 0x0000,  960,  540,  8, 1, 120, 33,           MD_SIS315},
+	{"960x540x16",   {0x1e,0x1e}, 0x0000, 0x0000,  960,  540, 16, 1, 120, 33,           MD_SIS315},
+	{"960x540x24",   {0x1f,0x1f}, 0x0000, 0x0000,  960,  540, 32, 1, 120, 33,           MD_SIS315},
+	{"960x540x32",   {0x1f,0x1f}, 0x0000, 0x0000,  960,  540, 32, 1, 120, 33,           MD_SIS315},
+	{"1024x576x8",   {0x71,0x71}, 0x0000, 0x0000, 1024,  576,  8, 1, 128, 36, MD_SIS300|MD_SIS315},
+/*60*/	{"1024x576x16",  {0x74,0x74}, 0x0000, 0x0000, 1024,  576, 16, 1, 128, 36, MD_SIS300|MD_SIS315},
+	{"1024x576x24",  {0x77,0x77}, 0x0000, 0x0000, 1024,  576, 32, 1, 128, 36, MD_SIS300|MD_SIS315},
+	{"1024x576x32",  {0x77,0x77}, 0x0000, 0x0000, 1024,  576, 32, 1, 128, 36, MD_SIS300|MD_SIS315},
+	{"1024x600x8",   {0x20,0x20}, 0x0000, 0x0000, 1024,  600,  8, 1, 128, 37, MD_SIS300          },
+	{"1024x600x16",  {0x21,0x21}, 0x0000, 0x0000, 1024,  600, 16, 1, 128, 37, MD_SIS300          },
+	{"1024x600x24",  {0x22,0x22}, 0x0000, 0x0000, 1024,  600, 32, 1, 128, 37, MD_SIS300          },
+	{"1024x600x32",  {0x22,0x22}, 0x0000, 0x0000, 1024,  600, 32, 1, 128, 37, MD_SIS300          },
+	{"1024x768x8",   {0x38,0x38}, 0x0105, 0x0105, 1024,  768,  8, 2, 128, 48, MD_SIS300|MD_SIS315},
+	{"1024x768x16",  {0x4a,0x4a}, 0x0117, 0x0117, 1024,  768, 16, 2, 128, 48, MD_SIS300|MD_SIS315},
+	{"1024x768x24",  {0x64,0x64}, 0x013c, 0x0118, 1024,  768, 32, 2, 128, 48, MD_SIS300|MD_SIS315},
+/*70*/	{"1024x768x32",  {0x64,0x64}, 0x013c, 0x0118, 1024,  768, 32, 2, 128, 48, MD_SIS300|MD_SIS315},
+	{"1152x768x8",   {0x23,0x23}, 0x0000, 0x0000, 1152,  768,  8, 1, 144, 48, MD_SIS300          },
+	{"1152x768x16",  {0x24,0x24}, 0x0000, 0x0000, 1152,  768, 16, 1, 144, 48, MD_SIS300          },
+	{"1152x768x24",  {0x25,0x25}, 0x0000, 0x0000, 1152,  768, 32, 1, 144, 48, MD_SIS300          },
+	{"1152x768x32",  {0x25,0x25}, 0x0000, 0x0000, 1152,  768, 32, 1, 144, 48, MD_SIS300          },
+	{"1152x864x8",   {0x29,0x29}, 0x0000, 0x0000, 1152,  864,  8, 1, 144, 54, MD_SIS300|MD_SIS315},
+	{"1152x864x16",  {0x2a,0x2a}, 0x0000, 0x0000, 1152,  864, 16, 1, 144, 54, MD_SIS300|MD_SIS315},
+	{"1152x864x24",  {0x2b,0x2b}, 0x0000, 0x0000, 1152,  864, 32, 1, 144, 54, MD_SIS300|MD_SIS315},
+	{"1152x864x32",  {0x2b,0x2b}, 0x0000, 0x0000, 1152,  864, 32, 1, 144, 54, MD_SIS300|MD_SIS315},
+	{"1280x720x8",   {0x79,0x79}, 0x0000, 0x0000, 1280,  720,  8, 1, 160, 45, MD_SIS300|MD_SIS315},
+/*80*/	{"1280x720x16",  {0x75,0x75}, 0x0000, 0x0000, 1280,  720, 16, 1, 160, 45, MD_SIS300|MD_SIS315},
+	{"1280x720x24",  {0x78,0x78}, 0x0000, 0x0000, 1280,  720, 32, 1, 160, 45, MD_SIS300|MD_SIS315},
+	{"1280x720x32",  {0x78,0x78}, 0x0000, 0x0000, 1280,  720, 32, 1, 160, 45, MD_SIS300|MD_SIS315},
+	{"1280x768x8",   {0x55,0x23}, 0x0000, 0x0000, 1280,  768,  8, 1, 160, 48, MD_SIS300|MD_SIS315},
+	{"1280x768x16",  {0x5a,0x24}, 0x0000, 0x0000, 1280,  768, 16, 1, 160, 48, MD_SIS300|MD_SIS315},
+	{"1280x768x24",  {0x5b,0x25}, 0x0000, 0x0000, 1280,  768, 32, 1, 160, 48, MD_SIS300|MD_SIS315},
+	{"1280x768x32",  {0x5b,0x25}, 0x0000, 0x0000, 1280,  768, 32, 1, 160, 48, MD_SIS300|MD_SIS315},
+	{"1280x800x8",   {0x14,0x14}, 0x0000, 0x0000, 1280,  800,  8, 1, 160, 50,           MD_SIS315},
+	{"1280x800x16",  {0x15,0x15}, 0x0000, 0x0000, 1280,  800, 16, 1, 160, 50,           MD_SIS315},
+	{"1280x800x24",  {0x16,0x16}, 0x0000, 0x0000, 1280,  800, 32, 1, 160, 50,           MD_SIS315},
+/*90*/	{"1280x800x32",  {0x16,0x16}, 0x0000, 0x0000, 1280,  800, 32, 1, 160, 50,           MD_SIS315},
+	{"1280x960x8",   {0x7c,0x7c}, 0x0000, 0x0000, 1280,  960,  8, 1, 160, 60, MD_SIS300|MD_SIS315},
+	{"1280x960x16",  {0x7d,0x7d}, 0x0000, 0x0000, 1280,  960, 16, 1, 160, 60, MD_SIS300|MD_SIS315},
+	{"1280x960x24",  {0x7e,0x7e}, 0x0000, 0x0000, 1280,  960, 32, 1, 160, 60, MD_SIS300|MD_SIS315},
+	{"1280x960x32",  {0x7e,0x7e}, 0x0000, 0x0000, 1280,  960, 32, 1, 160, 60, MD_SIS300|MD_SIS315},
+	{"1280x1024x8",  {0x3a,0x3a}, 0x0107, 0x0107, 1280, 1024,  8, 2, 160, 64, MD_SIS300|MD_SIS315},
+	{"1280x1024x16", {0x4d,0x4d}, 0x011a, 0x011a, 1280, 1024, 16, 2, 160, 64, MD_SIS300|MD_SIS315},
+	{"1280x1024x24", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315},
+	{"1280x1024x32", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315},
+	{"1360x768x8",   {0x48,0x48}, 0x0000, 0x0000, 1360,  768,  8, 1, 170, 48, MD_SIS300|MD_SIS315},
+/*100*/	{"1360x768x16",  {0x4b,0x4b}, 0x0000, 0x0000, 1360,  768, 16, 1, 170, 48, MD_SIS300|MD_SIS315},
+	{"1360x768x24",  {0x4e,0x4e}, 0x0000, 0x0000, 1360,  768, 32, 1, 170, 48, MD_SIS300|MD_SIS315},
+	{"1360x768x32",  {0x4e,0x4e}, 0x0000, 0x0000, 1360,  768, 32, 1, 170, 48, MD_SIS300|MD_SIS315},
+	{"1360x1024x8",  {0x67,0x67}, 0x0000, 0x0000, 1360, 1024,  8, 1, 170, 64, MD_SIS300          },
+	{"1360x1024x16", {0x6f,0x6f}, 0x0000, 0x0000, 1360, 1024, 16, 1, 170, 64, MD_SIS300          },
+	{"1360x1024x24", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300          },
+	{"1360x1024x32", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300          },
+	{"1400x1050x8",  {0x26,0x26}, 0x0000, 0x0000, 1400, 1050,  8, 1, 175, 65,           MD_SIS315},
+	{"1400x1050x16", {0x27,0x27}, 0x0000, 0x0000, 1400, 1050, 16, 1, 175, 65,           MD_SIS315},
+	{"1400x1050x24", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,           MD_SIS315},
+/*110*/	{"1400x1050x32", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,           MD_SIS315},
+	{"1600x1200x8",  {0x3c,0x3c}, 0x0130, 0x011c, 1600, 1200,  8, 1, 200, 75, MD_SIS300|MD_SIS315},
+	{"1600x1200x16", {0x3d,0x3d}, 0x0131, 0x011e, 1600, 1200, 16, 1, 200, 75, MD_SIS300|MD_SIS315},
+	{"1600x1200x24", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315},
+	{"1600x1200x32", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315},
+	{"1680x1050x8",  {0x17,0x17}, 0x0000, 0x0000, 1680, 1050,  8, 1, 210, 65,           MD_SIS315},
+	{"1680x1050x16", {0x18,0x18}, 0x0000, 0x0000, 1680, 1050, 16, 1, 210, 65,           MD_SIS315},
+	{"1680x1050x24", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65,           MD_SIS315},
+	{"1680x1050x32", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65,           MD_SIS315},
+	{"1920x1080x8",  {0x2c,0x2c}, 0x0000, 0x0000, 1920, 1080,  8, 1, 240, 67,           MD_SIS315},
+/*120*/	{"1920x1080x16", {0x2d,0x2d}, 0x0000, 0x0000, 1920, 1080, 16, 1, 240, 67,           MD_SIS315},
+	{"1920x1080x24", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67,           MD_SIS315},
+	{"1920x1080x32", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67,           MD_SIS315},
+	{"1920x1440x8",  {0x68,0x68}, 0x013f, 0x0000, 1920, 1440,  8, 1, 240, 75, MD_SIS300|MD_SIS315},
+	{"1920x1440x16", {0x69,0x69}, 0x0140, 0x0000, 1920, 1440, 16, 1, 240, 75, MD_SIS300|MD_SIS315},
+	{"1920x1440x24", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315},
+	{"1920x1440x32", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315},
+	{"2048x1536x8",  {0x6c,0x6c}, 0x0000, 0x0000, 2048, 1536,  8, 1, 256, 96,           MD_SIS315},
+	{"2048x1536x16", {0x6d,0x6d}, 0x0000, 0x0000, 2048, 1536, 16, 1, 256, 96,           MD_SIS315},
+	{"2048x1536x24", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,           MD_SIS315},
+/*130*/	{"2048x1536x32", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,           MD_SIS315},
+	{"\0", {0x00,0x00}, 0, 0, 0, 0, 0, 0, 0}
+};
+
+#define SIS_LCD_NUMBER 17
+static const struct _sis_lcd_data {
+	u32 lcdtype;
+	u16 xres;
+	u16 yres;
+	u8  default_mode_idx;
+} sis_lcd_data[] = {
+	{ LCD_640x480,    640,  480,  23 },
+	{ LCD_800x600,    800,  600,  43 },
+	{ LCD_1024x600,  1024,  600,  63 },
+	{ LCD_1024x768,  1024,  768,  67 },
+	{ LCD_1152x768,  1152,  768,  71 },
+	{ LCD_1152x864,  1152,  864,  75 },
+	{ LCD_1280x720,  1280,  720,  79 },
+	{ LCD_1280x768,  1280,  768,  83 },
+	{ LCD_1280x800,  1280,  800,  87 },
+	{ LCD_1280x960,  1280,  960,  91 },
+	{ LCD_1280x1024, 1280, 1024,  95 },
+	{ LCD_1400x1050, 1400, 1050, 107 },
+	{ LCD_1680x1050, 1680, 1050, 115 },
+	{ LCD_1600x1200, 1600, 1200, 111 },
+	{ LCD_640x480_2,  640,  480,  23 },
+	{ LCD_640x480_3,  640,  480,  23 },
+	{ LCD_320x480,    320,  480,   9 },
 };
 
-/* mode-related variables */
-#ifdef MODULE
-int sisfb_mode_idx = MODE_INDEX_NONE;  /* Don't use a mode by default if we are a module */
-#else
-int sisfb_mode_idx = -1;               /* Use a default mode if we are inside the kernel */
-#endif
-u8  sisfb_mode_no  = 0;
-u8  sisfb_rate_idx = 0;
-
 /* CR36 evaluation */
 const USHORT sis300paneltype[] =
     { LCD_UNKNOWN,   LCD_800x600,   LCD_1024x768,  LCD_1280x1024,
       LCD_1280x960,  LCD_640x480,   LCD_1024x600,  LCD_1152x768,
-      LCD_1024x768,  LCD_1024x768,  LCD_1024x768,  LCD_1024x768,
-      LCD_1024x768,  LCD_1024x768,  LCD_320x480,   LCD_1024x768 };
+      LCD_UNKNOWN,   LCD_UNKNOWN,   LCD_UNKNOWN,   LCD_UNKNOWN,
+      LCD_UNKNOWN,   LCD_UNKNOWN,   LCD_UNKNOWN,   LCD_UNKNOWN };
 
 const USHORT sis310paneltype[] =
     { LCD_UNKNOWN,   LCD_800x600,   LCD_1024x768,  LCD_1280x1024,
       LCD_640x480,   LCD_1024x600,  LCD_1152x864,  LCD_1280x960,
       LCD_1152x768,  LCD_1400x1050, LCD_1280x768,  LCD_1600x1200,
-      LCD_640x480_2, LCD_640x480_3, LCD_320x480,   LCD_1024x768 };
+      LCD_640x480_2, LCD_640x480_3, LCD_UNKNOWN,   LCD_UNKNOWN };
+
+const USHORT sis661paneltype[] =
+    { LCD_UNKNOWN,   LCD_800x600,   LCD_1024x768,  LCD_1280x1024,
+      LCD_640x480,   LCD_1024x600,  LCD_1152x864,  LCD_1280x960,
+      LCD_1152x768,  LCD_1400x1050, LCD_1280x768,  LCD_1600x1200,
+      LCD_1280x800,  LCD_1680x1050, LCD_1280x720,  LCD_UNKNOWN };
 
 #define FL_550_DSTN 0x01
 #define FL_550_FSTN 0x02
+#define FL_300      0x04
+#define FL_315      0x08
 
-static const struct _sis_crt2type {
-	char name[10];
-	int type_no;
-	int tvplug_no;
-	unsigned short flags;
-} sis_crt2type[] = {
-	{"NONE", 	0, 		-1,        0},
-	{"LCD",  	CRT2_LCD, 	-1,        0},
-	{"TV",   	CRT2_TV, 	-1,        0},
-	{"VGA",  	CRT2_VGA, 	-1,        0},
-	{"SVIDEO", 	CRT2_TV, 	TV_SVIDEO, 0},
-	{"COMPOSITE", 	CRT2_TV, 	TV_AVIDEO, 0},
-	{"SCART", 	CRT2_TV, 	TV_SCART,  0},
-	{"DSTN",        CRT2_LCD,       -1,        FL_550_DSTN},
-	{"FSTN",        CRT2_LCD,       -1,        FL_550_FSTN},
-	{"\0",  	-1, 		-1,        0}
-};
-
-/* Queue mode selection for 310 series */
-static const struct _sis_queuemode {
-	char name[6];
-	int type_no;
-} sis_queuemode[] = {
-	{"AGP",  	AGP_CMD_QUEUE},
-	{"VRAM", 	VM_CMD_QUEUE},
-	{"MMIO", 	MMIO_CMD},
-	{"\0",   	-1}
+static struct _sis_crt2type {
+	char name[32];
+	u32 type_no;
+	u32 tvplug_no;
+	u16 flags;
+} sis_crt2type[] __initdata = {
+	{"NONE", 	     0, 	-1,                     FL_300|FL_315},
+	{"LCD",  	     CRT2_LCD, 	-1,                     FL_300|FL_315},
+	{"TV",   	     CRT2_TV, 	-1,                     FL_300|FL_315},
+	{"VGA",  	     CRT2_VGA, 	-1,                     FL_300|FL_315},
+	{"SVIDEO", 	     CRT2_TV, 	TV_SVIDEO,              FL_300|FL_315},
+	{"COMPOSITE", 	     CRT2_TV, 	TV_AVIDEO,              FL_300|FL_315},
+	{"CVBS", 	     CRT2_TV, 	TV_AVIDEO,              FL_300|FL_315},
+	{"SVIDEO+COMPOSITE", CRT2_TV,   TV_AVIDEO|TV_SVIDEO,    FL_300|FL_315},
+	{"COMPOSITE+SVIDEO", CRT2_TV,   TV_AVIDEO|TV_SVIDEO,    FL_300|FL_315},
+	{"SVIDEO+CVBS",      CRT2_TV,   TV_AVIDEO|TV_SVIDEO,    FL_300|FL_315},
+	{"CVBS+SVIDEO",      CRT2_TV,   TV_AVIDEO|TV_SVIDEO,    FL_300|FL_315},
+	{"SCART", 	     CRT2_TV, 	TV_SCART,               FL_300|FL_315},
+	{"HIVISION",	     CRT2_TV,   TV_HIVISION,            FL_315},
+	{"YPBPR480I",	     CRT2_TV,   TV_YPBPR|TV_YPBPR525I,  FL_315},
+	{"YPBPR480P",	     CRT2_TV,   TV_YPBPR|TV_YPBPR525P,  FL_315},
+	{"YPBPR720P",	     CRT2_TV,   TV_YPBPR|TV_YPBPR750P,  FL_315},
+	{"YPBPR1080I",	     CRT2_TV,   TV_YPBPR|TV_YPBPR1080I, FL_315},
+	{"DSTN",             CRT2_LCD,  -1,                     FL_315|FL_550_DSTN},
+	{"FSTN",             CRT2_LCD,  -1,                     FL_315|FL_550_FSTN},
+	{"\0",  	     -1, 	-1,                     0}
 };
 
 /* TV standard */
-static const struct _sis_tvtype {
+static struct _sis_tvtype {
 	char name[6];
-	int type_no;
-} sis_tvtype[] = {
+	u32 type_no;
+} sis_tvtype[] __initdata = {
 	{"PAL",  	TV_PAL},
 	{"NTSC", 	TV_NTSC},
+	{"PALM",  	TV_PAL|TV_PALM},
+	{"PALN",  	TV_PAL|TV_PALN},
+	{"NTSCJ",  	TV_NTSC|TV_NTSCJ},
 	{"\0",   	-1}
 };
 
@@ -687,6 +425,7 @@
 	{7,  800,  600, 120,  TRUE}, {8,  800,  600, 160,  TRUE},
 	{1,  848,  480,  39,  TRUE}, {2,  848,  480,  60,  TRUE},
 	{1,  856,  480,  39,  TRUE}, {2,  856,  480,  60,  TRUE},
+	{1,  960,  540,  60,  TRUE},
 	{1, 1024,  576,  60,  TRUE}, {2, 1024,  576,  75,  TRUE}, {3, 1024,  576,  85,  TRUE},
 	{1, 1024,  600,  60,  TRUE},
 	{1, 1024,  768,  43,  TRUE}, {2, 1024,  768,  60,  TRUE}, {3, 1024,  768,  70, FALSE},
@@ -696,6 +435,7 @@
 	{1, 1152,  864,  75,  TRUE}, {2, 1152,  864,  84,  TRUE},
 	{1, 1280,  720,  60,  TRUE}, {2, 1280,  720,  75,  TRUE}, {3, 1280,  720,  85,  TRUE},
 	{1, 1280,  768,  60,  TRUE},
+	{1, 1280,  800,  60,  TRUE},
 	{1, 1280,  960,  60,  TRUE}, {2, 1280,  960,  85,  TRUE},
 	{1, 1280, 1024,  43,  TRUE}, {2, 1280, 1024,  60,  TRUE}, {3, 1280, 1024,  75,  TRUE},
 	{4, 1280, 1024,  85,  TRUE},
@@ -705,6 +445,8 @@
 	{1, 1600, 1200,  60,  TRUE}, {2, 1600, 1200,  65,  TRUE}, {3, 1600, 1200,  70,  TRUE},
 	{4, 1600, 1200,  75,  TRUE}, {5, 1600, 1200,  85,  TRUE}, {6, 1600, 1200, 100,  TRUE},
 	{7, 1600, 1200, 120,  TRUE},
+	{1, 1680, 1050,  60,  TRUE},
+	{1, 1920, 1080,  30,  TRUE},
 	{1, 1920, 1440,  60,  TRUE}, {2, 1920, 1440,  65,  TRUE}, {3, 1920, 1440,  70,  TRUE},
 	{4, 1920, 1440,  75,  TRUE}, {5, 1920, 1440,  85,  TRUE}, {6, 1920, 1440, 100,  TRUE},
 	{1, 2048, 1536,  60,  TRUE}, {2, 2048, 1536,  65,  TRUE}, {3, 2048, 1536,  70,  TRUE},
@@ -712,16 +454,6 @@
 	{0,    0,    0,   0, FALSE}
 };
 
-static struct sisfb_monitor {
-	u16 hmin;
-	u16 hmax;
-	u16 vmin;
-	u16 vmax;
-	u32 dclockmax;
-	u8  feature;
-	BOOLEAN datavalid;
-} sisfb_thismonitor;
-
 static const struct _sisfbddcsmodes {
 	u32 mask;
 	u16 h;
@@ -760,35 +492,33 @@
        { 1920, 1440, 75, 113,297000}
 };
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-static u8 sisfb_lastrates[128];
-#endif
-
-static const struct _chswtable {
-    int subsysVendor;
-    int subsysCard;
+#ifdef CONFIG_FB_SIS_300
+static struct _chswtable {
+    u16  subsysVendor;
+    u16  subsysCard;
     char *vendorName;
     char *cardName;
-} mychswtable[] = {
+} mychswtable[] __devinitdata = {
         { 0x1631, 0x1002, "Mitachi", "0x1002" },
 	{ 0x1071, 0x7521, "Mitac"  , "7521P"  },
 	{ 0,      0,      ""       , ""       }
 };
+#endif
 
-static const struct _customttable {
-    unsigned short chipID;
-    char *biosversion;
-    char *biosdate;
-    unsigned long bioschksum;
-    unsigned short biosFootprintAddr[5];
-    unsigned char biosFootprintData[5];
-    unsigned short pcisubsysvendor;
-    unsigned short pcisubsyscard;
-    char *vendorName;
-    char *cardName;
-    unsigned long SpecialID;
-    char *optionName;
-} mycustomttable[] = {
+static struct _customttable {
+    u16   chipID;
+    char  *biosversion;
+    char  *biosdate;
+    u32   bioschksum;
+    u16   biosFootprintAddr[5];
+    u8    biosFootprintData[5];
+    u16   pcisubsysvendor;
+    u16   pcisubsyscard;
+    char  *vendorName;
+    char  *cardName;
+    u32   SpecialID;
+    char  *optionName;
+} mycustomttable[] __devinitdata = {
 	{ SIS_630, "2.00.07", "09/27/2002-13:38:25",
 	  0x3240A8,
 	  { 0x220, 0x227, 0x228, 0x229, 0x0ee },
@@ -917,46 +647,6 @@
 	}
 };
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-/* Offscreen layout */
-typedef struct _SIS_GLYINFO {
-	unsigned char ch;
-	int fontwidth;
-	int fontheight;
-	u8 gmask[72];
-	int ngmask;
-} SIS_GLYINFO;
-
-static char sisfb_fontname[40];
-#endif
-
-typedef struct _SIS_OH {
-	struct _SIS_OH *poh_next;
-	struct _SIS_OH *poh_prev;
-	unsigned long offset;
-	unsigned long size;
-} SIS_OH;
-
-typedef struct _SIS_OHALLOC {
-	struct _SIS_OHALLOC *poha_next;
-	SIS_OH aoh[1];
-} SIS_OHALLOC;
-
-typedef struct _SIS_HEAP {
-	SIS_OH oh_free;
-	SIS_OH oh_used;
-	SIS_OH *poh_freelist;
-	SIS_OHALLOC *poha_chain;
-	unsigned long max_freesize;
-} SIS_HEAP;
-
-static unsigned long sisfb_hwcursor_vbase;
-
-static unsigned long sisfb_heap_start;
-static unsigned long sisfb_heap_end;
-static unsigned long sisfb_heap_size;
-static SIS_HEAP      sisfb_heap;
-
 static const struct _sis_TV_filter {
 	u8 filter[9][4];
 } sis_TV_filter[] = {
@@ -1106,9 +796,6 @@
 	   {0xFF,0xFF,0xFF,0xFF} }}
 };
 
-static int           filter = -1;
-static unsigned char filter_tb;
-
 /* ---------------------- Prototypes ------------------------- */
 
 /* Interface used by the world */
@@ -1119,7 +806,11 @@
 /* Interface to the low level console driver */
 int             sisfb_init(void);
 
+
 /* fbdev routines */
+static int      sisfb_get_fix(struct fb_fix_screeninfo *fix, int con,
+			      struct fb_info *info);
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 static int      sisfb_get_fix(struct fb_fix_screeninfo *fix, 
 			      int con,
@@ -1130,7 +821,8 @@
 static int      sisfb_set_var(struct fb_var_screeninfo *var, 
 			      int con,
 			      struct fb_info *info);
-static void     sisfb_crtc_to_var(struct fb_var_screeninfo *var);			      
+static void     sisfb_crtc_to_var(struct sis_video_info *ivideo,
+			          struct fb_var_screeninfo *var);
 static int      sisfb_get_cmap(struct fb_cmap *cmap, 
 			       int kspc, 
 			       int con,
@@ -1153,108 +845,67 @@
 			      struct fb_info *fb_info);
 static void     sisfb_do_install_cmap(int con, 
                                       struct fb_info *info);
-static void     sis_get_glyph(struct fb_info *info, 
-                              SIS_GLYINFO *gly);
-static int 	sisfb_mmap(struct fb_info *info, struct file *file,
-		           struct vm_area_struct *vma);	
 static int      sisfb_ioctl(struct inode *inode, struct file *file,
 		       	    unsigned int cmd, unsigned long arg, int con,
 		       	    struct fb_info *info);		      
 #endif			
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+static int      sisfb_ioctl(struct inode *inode, struct file *file,
+		       	    unsigned int cmd, unsigned long arg,
+		       	    struct fb_info *info);
 static int      sisfb_set_par(struct fb_info *info);
 static int      sisfb_blank(int blank, 
                             struct fb_info *info);			
-static int 	sisfb_mmap(struct fb_info *info, struct file *file,
-		           struct vm_area_struct *vma);			    
 extern void     fbcon_sis_fillrect(struct fb_info *info, 
                                    const struct fb_fillrect *rect);
 extern void     fbcon_sis_copyarea(struct fb_info *info, 
                                    const struct fb_copyarea *area);
 extern int      fbcon_sis_sync(struct fb_info *info);
-static int      sisfb_ioctl(struct inode *inode, 
-	 		    struct file *file,
-		       	    unsigned int cmd, 
-			    unsigned long arg, 
-		       	    struct fb_info *info);
-extern int	sisfb_mode_rate_to_dclock(SiS_Private *SiS_Pr, 
-			      PSIS_HW_INFO HwDeviceExtension,
-			      unsigned char modeno, unsigned char rateindex);	
-extern int      sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension,
-			 unsigned char modeno, unsigned char rateindex,
-			 unsigned int *left_margin, unsigned int *right_margin, 
-			 unsigned int *upper_margin, unsigned int *lower_margin,
-			 unsigned int *hsync_len, unsigned int *vsync_len,
-			 unsigned int *sync, unsigned int *vmode);
 #endif
 			
-static int      sisfb_get_fix(struct fb_fix_screeninfo *fix, int con,
-			      struct fb_info *info);
-
 /* Internal 2D accelerator functions */
-extern int      sisfb_initaccel(void);
-extern void     sisfb_syncaccel(void);
+extern int      sisfb_initaccel(struct sis_video_info *ivideo);
+extern void     sisfb_syncaccel(struct sis_video_info *ivideo);
 
 /* Internal general routines */
 static void     sisfb_search_mode(char *name, BOOLEAN quiet);
-static int      sisfb_validate_mode(int modeindex, unsigned long vbflags);
-static u8       sisfb_search_refresh_rate(unsigned int rate, int index);
+static int      sisfb_validate_mode(struct sis_video_info *ivideo, int modeindex, u32 vbflags);
+static u8       sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate,
+			int index);
 static int      sisfb_setcolreg(unsigned regno, unsigned red, unsigned green,
 			unsigned blue, unsigned transp,
 			struct fb_info *fb_info);
 static int      sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
 		      	struct fb_info *info);
-static void     sisfb_pre_setmode(void);
-static void     sisfb_post_setmode(void);
+static void     sisfb_pre_setmode(struct sis_video_info *ivideo);
+static void     sisfb_post_setmode(struct sis_video_info *ivideo);
+static char *   sis_find_rom(struct pci_dev *pdev);
+static BOOLEAN  sisfb_CheckVBRetrace(struct sis_video_info *ivideo);
+static BOOLEAN  sisfbcheckvretracecrt2(struct sis_video_info *ivideo);
+static BOOLEAN  sisfbcheckvretracecrt1(struct sis_video_info *ivideo);
+static BOOLEAN  sisfb_bridgeisslave(struct sis_video_info *ivideo);
+static void     sisfb_detect_VB_connect(struct sis_video_info *ivideo);
+static void     sisfb_get_VB_type(struct sis_video_info *ivideo);
+static void     sisfb_set_TVxposoffset(struct sis_video_info *ivideo, int val);
+static void     sisfb_set_TVyposoffset(struct sis_video_info *ivideo, int val);
 
-static char *   sis_find_rom(void);
-static BOOLEAN  sisfb_CheckVBRetrace(void);
-static BOOLEAN  sisfbcheckvretracecrt2(void);
-static BOOLEAN  sisfbcheckvretracecrt1(void);
-static BOOLEAN  sisfb_bridgeisslave(void);
-static void     sisfb_detect_VB_connect(void);
-static void     sisfb_get_VB_type(void);
-
-static void     sisfb_handle_ddc(struct sisfb_monitor *monitor, int crtno);
-static BOOLEAN  sisfb_interpret_edid(struct sisfb_monitor *monitor, unsigned char *buffer);
-
-/* SiS-specific Export functions */
-void            sis_dispinfo(struct ap_data *rec);
+/* SiS-specific exported functions */
 void            sis_malloc(struct sis_memreq *req);
-void            sis_free(unsigned long base);
-
-/* Internal hardware access routines */
-void            sisfb_set_reg4(u16 port, unsigned long data);
-u32             sisfb_get_reg3(u16 port);
-
-/* Chipset-dependent internal routines */
-#ifdef CONFIG_FB_SIS_300
-static int      sisfb_get_dram_size_300(void);
-#endif
-#ifdef CONFIG_FB_SIS_315
-static int      sisfb_get_dram_size_315(void);
-#endif
+void            sis_free(u32 base);
 
 /* Internal heap routines */
-static int      sisfb_heap_init(void);
+static int      sisfb_heap_init(struct sis_video_info *ivideo);
 static SIS_OH   *sisfb_poh_new_node(void);
-static SIS_OH   *sisfb_poh_allocate(unsigned long size);
+static SIS_OH   *sisfb_poh_allocate(u32 size);
 static void     sisfb_delete_node(SIS_OH *poh);
 static void     sisfb_insert_node(SIS_OH *pohList, SIS_OH *poh);
-static SIS_OH   *sisfb_poh_free(unsigned long base);
+static SIS_OH   *sisfb_poh_free(u32 base);
 static void     sisfb_free_node(SIS_OH *poh);
 
-/* Internal routines to access PCI configuration space */
-BOOLEAN         sisfb_query_VGA_config_space(PSIS_HW_INFO psishw_ext,
-	          	unsigned long offset, unsigned long set, unsigned long *value);
-BOOLEAN         sisfb_query_north_bridge_space(PSIS_HW_INFO psishw_ext,
-	         	unsigned long offset, unsigned long set, unsigned long *value);
-
 /* Sensing routines */
-static void     SiS_Sense30x(void);
-static int      SISDoSense(int tempbl, int tempbh, int tempcl, int tempch);
-static void     SiS_SenseCh(void);
+static void     SiS_Sense30x(struct sis_video_info *ivideo);
+static void     SiS_SenseCh(struct sis_video_info *ivideo);
 
 /* Routines from init.c/init301.c */
 extern USHORT   SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN);
@@ -1268,10 +919,20 @@
 extern void     SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable);
 extern void     SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable);
 
+extern BOOLEAN  SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
+
 extern BOOLEAN  sisfb_gettotalfrommode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension,
 		       unsigned char modeno, int *htotal, int *vtotal, unsigned char rateindex);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+extern int	sisfb_mode_rate_to_dclock(SiS_Private *SiS_Pr,
+		    	PSIS_HW_INFO HwDeviceExtension,
+			unsigned char modeno, unsigned char rateindex);
+extern int      sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension,
+			unsigned char modeno, unsigned char rateindex,
+			struct fb_var_screeninfo *var);
+#endif
 
-/* Chrontel TV functions */
+/* Chrontel TV, DDC and DPMS functions */
 extern USHORT 	SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempbx);
 extern void 	SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempbx);
 extern USHORT 	SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempbx);
@@ -1279,13 +940,13 @@
 extern void     SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh);
 extern void     SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime);
 extern void     SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo);
-extern USHORT   SiS_HandleDDC(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
+extern USHORT   SiS_HandleDDC(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine,
 		              USHORT adaptnum, USHORT DDCdatatype, unsigned char *buffer);
 extern USHORT   SiS_ReadDDC1Bit(SiS_Private *SiS_Pr);
 extern void 	SiS_Chrontel701xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceInfo);
 extern void 	SiS_Chrontel701xBLOff(SiS_Private *SiS_Pr);
 extern void 	SiS_SiS30xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceInfo);
 extern void 	SiS_SiS30xBLOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceInfo);
-
-			
 #endif
+
+
--- diff/drivers/video/sis/vgatypes.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/vgatypes.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * General type definitions for universal mode switching modules
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -121,21 +119,17 @@
 #endif
 #endif
 
-#ifndef LINUX_KERNEL   /* For the linux kernel, this is defined in sisfb.h */
-#ifndef SIS_CHIP_TYPE
-typedef enum _SIS_CHIP_TYPE {
+enum _SIS_CHIP_TYPE {
     SIS_VGALegacy = 0,
-#ifdef LINUX_XF86
     SIS_530,
     SIS_OLD,
-#endif
     SIS_300,
     SIS_630,
     SIS_730,
     SIS_540,
     SIS_315H,   /* SiS 310 */
     SIS_315,
-    SIS_315PRO, /* SiS 325 */
+    SIS_315PRO,
     SIS_550,
     SIS_650,
     SIS_740,
@@ -144,29 +138,13 @@
     SIS_741,
     SIS_660,
     SIS_760,
+    SIS_761,
+    SIS_340,
     MAX_SIS_CHIP
-} SIS_CHIP_TYPE;
-#endif
-#endif
-
-#ifndef SIS_VB_CHIP_TYPE
-typedef enum _SIS_VB_CHIP_TYPE {
-    VB_CHIP_Legacy = 0,
-    VB_CHIP_301,
-    VB_CHIP_301B,
-    VB_CHIP_301LV,
-    VB_CHIP_302,
-    VB_CHIP_302B,
-    VB_CHIP_302LV,
-    VB_CHIP_301C,
-    VB_CHIP_302ELV,
-    VB_CHIP_UNKNOWN, /* other video bridge or no video bridge */
-    MAX_VB_CHIP
-} SIS_VB_CHIP_TYPE;
-#endif
+};
 
-#ifndef SIS_LCD_TYPE
-typedef enum _SIS_LCD_TYPE {
+#ifdef LINUX_KERNEL
+enum _SIS_LCD_TYPE {
     LCD_INVALID = 0,
     LCD_800x600,
     LCD_1024x768,
@@ -176,28 +154,22 @@
     LCD_1600x1200,
     LCD_1920x1440,
     LCD_2048x1536,
-    LCD_320x480,       /* FSTN, DSTN */
+    LCD_320x480,       /* FSTN */
     LCD_1400x1050,
     LCD_1152x864,
     LCD_1152x768,
     LCD_1280x768,
     LCD_1024x600,
-    LCD_640x480_2,     /* FSTN, DSTN */
-    LCD_640x480_3,     /* FSTN, DSTN */
+    LCD_640x480_2,     /* DSTN */
+    LCD_640x480_3,     /* DSTN */
     LCD_848x480,
     LCD_1280x800,
     LCD_1680x1050,
+    LCD_1280x720,
     LCD_CUSTOM,
     LCD_UNKNOWN
-} SIS_LCD_TYPE;
-#endif
-
-#ifndef PSIS_DSReg
-typedef struct _SIS_DSReg
-{
-  UCHAR  jIdx;
-  UCHAR  jVal;
-} SIS_DSReg, *PSIS_DSReg;
+};
+typedef unsigned int SIS_LCD_TYPE;
 #endif
 
 #ifndef SIS_HW_INFO
@@ -220,97 +192,84 @@
                                  /* of Linear VGA memory */
 
     ULONG  ulVideoMemorySize;    /* size, in bytes, of the memory on the board */
-    SISIOADDRESS ulIOAddress;    /* base I/O address of VGA ports (0x3B0) */
+
+    SISIOADDRESS ulIOAddress;    /* base I/O address of VGA ports (0x3B0; relocated) */
+
     UCHAR  jChipType;            /* Used to Identify SiS Graphics Chip */
-                                 /* defined in the data structure type  */
-                                 /* "SIS_CHIP_TYPE" */
+                                 /* defined in the enum "SIS_CHIP_TYPE" (above or sisfb.h) */
 
     UCHAR  jChipRevision;        /* Used to Identify SiS Graphics Chip Revision */
-    UCHAR  ujVBChipID;           /* the ID of video bridge */
-                                 /* defined in the data structure type */
-                                 /* "SIS_VB_CHIP_TYPE" */
-#ifdef LINUX_KERNEL
-    BOOLEAN Is301BDH;
-#endif
 
-    USHORT usExternalChip;       /* NO VB or other video bridge (other than  */
-                                 /* SiS video bridge) */
-
-    ULONG  ulCRT2LCDType;        /* defined in the data structure type */
-                                 /* "SIS_LCD_TYPE" */
-                                     
     BOOLEAN bIntegratedMMEnabled;/* supporting integration MM enable */
-                                      
-    BOOLEAN bSkipDramSizing;     /* True: Skip video memory sizing. */
 
 #ifdef LINUX_KERNEL
-    PSIS_DSReg  pSR;             /* restore SR registers in initial function. */
-                                 /* end data :(idx, val) =  (FF, FF). */
-                                 /* Note : restore SR registers if  */
-                                 /* bSkipDramSizing = TRUE */
-
-    PSIS_DSReg  pCR;             /* restore CR registers in initial function. */
-                                 /* end data :(idx, val) =  (FF, FF) */
-                                 /* Note : restore cR registers if  */
-                                 /* bSkipDramSizing = TRUE */
-#endif
-
-    PSIS_QUERYSPACE  pQueryVGAConfigSpace; /* Get/Set VGA Configuration  */
-                                           /* space */
- 
-    PSIS_QUERYSPACE  pQueryNorthBridgeSpace;/* Get/Set North Bridge  */
-                                            /* space  */
+    ULONG  ulCRT2LCDType;        /* defined in the data structure type */
+                                 /* "SIS_LCD_TYPE" */
+#endif
 };
 #endif
 
-/* Addtional IOCTL for communication sisfb <> X driver        */
+/* Addtional IOCTLs for communication sisfb <> X driver        */
 /* If changing this, sisfb.h must also be changed (for sisfb) */
 
 #ifdef LINUX_XF86  /* We don't want the X driver to depend on the kernel source */
 
 /* ioctl for identifying and giving some info (esp. memory heap start) */
-#define SISFB_GET_INFO    0x80046ef8  /* Wow, what a terrible hack... */
+#define SISFB_GET_INFO_SIZE	0x8004f300
+#define SISFB_GET_INFO		0x8000f301  /* Must be patched with result from ..._SIZE at D[29:16] */
+/* deprecated ioctl number (for older versions of sisfb) */
+#define SISFB_GET_INFO_OLD    	0x80046ef8
+
+/* ioctls for tv parameters (position) */
+#define SISFB_SET_TVPOSOFFSET   0x4004f304
+
+/* lock sisfb from register access */
+#define SISFB_SET_LOCK		0x4004f306
 
 /* Structure argument for SISFB_GET_INFO ioctl  */
 typedef struct _SISFB_INFO sisfb_info, *psisfb_info;
 
 struct _SISFB_INFO {
-	unsigned long sisfb_id;         /* for identifying sisfb */
+	CARD32 	sisfb_id;         	/* for identifying sisfb */
 #ifndef SISFB_ID
 #define SISFB_ID	  0x53495346    /* Identify myself with 'SISF' */
 #endif
- 	int    chip_id;			/* PCI ID of detected chip */
-	int    memory;			/* video memory in KB which sisfb manages */
-	int    heapstart;               /* heap start (= sisfb "mem" argument) in KB */
-	unsigned char fbvidmode;	/* current sisfb mode */
+ 	CARD32 	chip_id;		/* PCI ID of detected chip */
+	CARD32	memory;			/* video memory in KB which sisfb manages */
+	CARD32	heapstart;             	/* heap start (= sisfb "mem" argument) in KB */
+	CARD8 	fbvidmode;		/* current sisfb mode */
+
+	CARD8 	sisfb_version;
+	CARD8	sisfb_revision;
+	CARD8 	sisfb_patchlevel;
+
+	CARD8 	sisfb_caps;		/* sisfb's capabilities */
+
+	CARD32 	sisfb_tqlen;		/* turbo queue length (in KB) */
 
-	unsigned char sisfb_version;
-	unsigned char sisfb_revision;
-	unsigned char sisfb_patchlevel;
+	CARD32 	sisfb_pcibus;      	/* The card's PCI ID */
+	CARD32 	sisfb_pcislot;
+	CARD32 	sisfb_pcifunc;
 
-	unsigned char sisfb_caps;	/* sisfb's capabilities */
+	CARD8 	sisfb_lcdpdc;
 
-	int    sisfb_tqlen;		/* turbo queue length (in KB) */
+	CARD8	sisfb_lcda;
 
-	unsigned int sisfb_pcibus;      /* The card's PCI ID */
-	unsigned int sisfb_pcislot;
-	unsigned int sisfb_pcifunc;
+	CARD32	sisfb_vbflags;
+	CARD32	sisfb_currentvbflags;
 
-	unsigned char sisfb_lcdpdc;
-	
-	unsigned char sisfb_lcda;
+	CARD32 	sisfb_scalelcd;
+	CARD32 	sisfb_specialtiming;
 
-	unsigned long sisfb_vbflags;
-	unsigned long sisfb_currentvbflags;
+	CARD8 	sisfb_haveemi;
+	CARD8 	sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
+	CARD8 	sisfb_haveemilcd;
 
-	int sisfb_scalelcd;
-	unsigned long sisfb_specialtiming;
+	CARD8 	sisfb_lcdpdca;
 
-	unsigned char sisfb_haveemi;
-	unsigned char sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
-	unsigned char sisfb_haveemilcd;
+	CARD16  sisfb_tvxpos, sisfb_tvypos;  	/* Warning: Values + 32 ! */
 
-	char reserved[213]; 		/* for future use */
+	CARD8 reserved[208]; 			/* for future use */
 };
 #endif
 
--- diff/drivers/video/sis/vstruct.h	2004-05-19 22:12:23.000000000 +0100
+++ source/drivers/video/sis/vstruct.h	2004-07-01 21:32:47.000000000 +0100
@@ -1,4 +1,5 @@
 /* $XFree86$ */
+/* $XdotOrg$ */
 /*
  * General structure definitions for universal mode switching modules
  *
@@ -31,13 +32,10 @@
  * * 2) Redistributions in binary form must reproduce the above copyright
  * *    notice, this list of conditions and the following disclaimer in the
  * *    documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * *    must display the following acknowledgement: "This product includes
- * *    software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -164,7 +162,6 @@
 {
 	UCHAR  Ext_ModeID;
 	USHORT Ext_ModeFlag;
-	UCHAR  Ext_ModeOffset;
 	USHORT Ext_VESAID;
 	UCHAR  Ext_RESINFO;
 	UCHAR  VB_ExtTVFlickerIndex;
@@ -172,6 +169,7 @@
 	UCHAR  VB_ExtTVYFilterIndex;
 	UCHAR  VB_ExtTVYFilterIndexROM661;
 	UCHAR  REFindex;
+	CHAR   ROMMODEIDX661;
 } SiS_ExtStruct;
 
 typedef struct _SiS_Ext2Struct
@@ -180,6 +178,7 @@
 	UCHAR  Ext_CRT1CRTC;
 	UCHAR  Ext_CRTVCLK;
 	UCHAR  Ext_CRT2CRTC;
+	UCHAR  Ext_CRT2CRTC_NS;
 	UCHAR  ModeID;
 	USHORT XRes;
 	USHORT YRes;
@@ -228,6 +227,8 @@
 	UCHAR  YChar;
 } SiS_ModeResInfoStruct;
 
+
+
 typedef UCHAR DRAM4Type[4];
 
 /* Defines for SiS_CustomT */
@@ -289,18 +290,21 @@
         USHORT SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
 #endif
 	BOOLEAN SiS_UseROM;
-	int    SiS_CHOverScan;
+	BOOLEAN SiS_ROMNew;
+	BOOLEAN SiS_NeedRomModeData;
+	BOOLEAN PanelSelfDetected;
+	int     SiS_CHOverScan;
 	BOOLEAN SiS_CHSOverScan;
 	BOOLEAN SiS_ChSW;
 	BOOLEAN SiS_UseLCDA;
-	int    SiS_UseOEM;
-	ULONG  SiS_CustomT;
-	USHORT SiS_Backup70xx;
+	int     SiS_UseOEM;
+	ULONG   SiS_CustomT;
+	USHORT  SiS_Backup70xx;
 	BOOLEAN HaveEMI;
 	BOOLEAN HaveEMILCD;
 	BOOLEAN OverruleEMI;
 	UCHAR  EMI_30,EMI_31,EMI_32,EMI_33;
-	UCHAR  PDC;
+	SHORT  PDC, PDCA;
 	UCHAR  SiS_MyCR63;
 	USHORT SiS_CRT1Mode;
 	USHORT SiS_flag_clearbuffer;
@@ -346,28 +350,13 @@
 	USHORT SiS_DDC_DeviceAddr;
 	USHORT SiS_DDC_ReadAddr;
 	USHORT SiS_DDC_SecAddr;
+	USHORT SiS_ChrontelInit;
 	BOOLEAN SiS_SensibleSR11;
-	USHORT SiS_Panel800x600;
-	USHORT SiS_Panel1024x768;
-	USHORT SiS_Panel1280x1024;
-	USHORT SiS_Panel1600x1200;
-	USHORT SiS_Panel1280x960;
-	USHORT SiS_Panel1400x1050;
-	USHORT SiS_Panel320x480;
-	USHORT SiS_Panel1152x768;
-	USHORT SiS_Panel1280x768;
-	USHORT SiS_Panel1024x600;
-	USHORT SiS_Panel640x480;
-	USHORT SiS_Panel640x480_2;
-	USHORT SiS_Panel640x480_3;
-	USHORT SiS_Panel1152x864;
-	USHORT SiS_PanelCustom;
-	USHORT SiS_PanelBarco1366;
-	USHORT SiS_PanelMax;
+	USHORT SiS661LCD2TableSize;
+
 	USHORT SiS_PanelMinLVDS;
 	USHORT SiS_PanelMin301;
-	USHORT SiS_ChrontelInit;
-	
+
 	const SiS_StStruct          *SiS_SModeIDTable;
 	SiS_StandTableStruct        *SiS_StandTable;
 	const SiS_ExtStruct         *SiS_EModeIDTable;
@@ -376,11 +365,10 @@
 	const SiS_CRT1TableStruct   *SiS_CRT1Table;
 	const SiS_MCLKDataStruct    *SiS_MCLKData_0;
 	const SiS_MCLKDataStruct    *SiS_MCLKData_1;
-	const SiS_VCLKDataStruct    *SiS_VCLKData;
-	const SiS_VBVCLKDataStruct  *SiS_VBVCLKData;
+	SiS_VCLKDataStruct    	    *SiS_VCLKData;
+	SiS_VBVCLKDataStruct        *SiS_VBVCLKData;
 	const SiS_StResInfoStruct   *SiS_StResInfo;
 	const SiS_ModeResInfoStruct *SiS_ModeResInfo;
-	const UCHAR                 *SiS_ScreenOffset;
 
 	const UCHAR                 *pSiS_OutputSelect;
 	const UCHAR                 *pSiS_SoftSetting;
@@ -410,6 +398,12 @@
 	const USHORT *pSiS_VideoSenseData2;
 	const USHORT *pSiS_YCSenseData2;
 #endif
+
+	const SiS_PanelDelayTblStruct *SiS_PanelDelayTbl;
+	const SiS_PanelDelayTblStruct *SiS_PanelDelayTblLVDS;
+
+	/* SiS bridge */
+
 	const UCHAR *SiS_NTSCPhase;
 	const UCHAR *SiS_PALPhase;
 	const UCHAR *SiS_NTSCPhase2;
@@ -421,24 +415,21 @@
 	const UCHAR *SiS_SpecialPhase;
 	const UCHAR *SiS_SpecialPhaseM;
 	const UCHAR *SiS_SpecialPhaseJ;
-	const SiS_LCDDataStruct  *SiS_StLCD1024x768Data;
 	const SiS_LCDDataStruct  *SiS_ExtLCD1024x768Data;
 	const SiS_LCDDataStruct  *SiS_St2LCD1024x768Data;
-	const SiS_LCDDataStruct  *SiS_StLCD1280x1024Data;
+	const SiS_LCDDataStruct  *SiS_LCD1280x720Data;
+	const SiS_LCDDataStruct  *SiS_StLCD1280x768_2Data;
+	const SiS_LCDDataStruct  *SiS_ExtLCD1280x768_2Data;
+	const SiS_LCDDataStruct  *SiS_LCD1280x768_3Data;
+	const SiS_LCDDataStruct  *SiS_LCD1280x800Data;
+	const SiS_LCDDataStruct  *SiS_LCD1280x960Data;
 	const SiS_LCDDataStruct  *SiS_ExtLCD1280x1024Data;
 	const SiS_LCDDataStruct  *SiS_St2LCD1280x1024Data;
-	const SiS_LCDDataStruct  *SiS_NoScaleData1024x768;
-	const SiS_LCDDataStruct  *SiS_NoScaleData1280x1024;
-	const SiS_LCDDataStruct  *SiS_LCD1280x960Data;
-	const SiS_LCDDataStruct  *SiS_NoScaleData1400x1050;
-	const SiS_LCDDataStruct  *SiS_NoScaleData1600x1200;
-	const SiS_LCDDataStruct  *SiS_NoScaleData1280x768;
 	const SiS_LCDDataStruct  *SiS_StLCD1400x1050Data;
-	const SiS_LCDDataStruct  *SiS_StLCD1600x1200Data;
-	const SiS_LCDDataStruct  *SiS_StLCD1280x768Data;
 	const SiS_LCDDataStruct  *SiS_ExtLCD1400x1050Data;
+	const SiS_LCDDataStruct  *SiS_StLCD1600x1200Data;
 	const SiS_LCDDataStruct  *SiS_ExtLCD1600x1200Data;
-	const SiS_LCDDataStruct  *SiS_ExtLCD1280x768Data;
+	const SiS_LCDDataStruct  *SiS_LCD1680x1050Data;
 	const SiS_LCDDataStruct  *SiS_NoScaleData;
 	const SiS_TVDataStruct   *SiS_StPALData;
 	const SiS_TVDataStruct   *SiS_ExtPALData;
@@ -464,8 +455,16 @@
 	const UCHAR *SiS_HiTVTextTiming;
 	const UCHAR *SiS_HiTVGroup3Text;
 #endif
-	const SiS_PanelDelayTblStruct *SiS_PanelDelayTbl;
-	const SiS_PanelDelayTblStruct *SiS_PanelDelayTblLVDS;
+
+	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_1;
+	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_1;
+	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_2;
+	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_2;
+	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_3;
+	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_3;
+
+	/* LVDS, Chrontel */
+
 	const SiS_LVDSDataStruct  *SiS_LVDS800x600Data_1;
 	const SiS_LVDSDataStruct  *SiS_LVDS800x600Data_2;
 	const SiS_LVDSDataStruct  *SiS_LVDS1024x768Data_1;
@@ -487,14 +486,6 @@
 	const SiS_LVDSDataStruct  *SiS_LVDS640x480Data_1;
 	const SiS_LVDSDataStruct  *SiS_LVDS640x480Data_2;
 	const SiS_LVDSDataStruct  *SiS_LVDS320x480Data_1;
-	const SiS_LVDSDataStruct  *SiS_LCDA1024x768Data_1;
-	const SiS_LVDSDataStruct  *SiS_LCDA1024x768Data_2;
-	const SiS_LVDSDataStruct  *SiS_LCDA1280x1024Data_1;
-	const SiS_LVDSDataStruct  *SiS_LCDA1280x1024Data_2;
-	const SiS_LVDSDataStruct  *SiS_LCDA1400x1050Data_1;
-	const SiS_LVDSDataStruct  *SiS_LCDA1400x1050Data_2;
-	const SiS_LVDSDataStruct  *SiS_LCDA1600x1200Data_1;
-	const SiS_LVDSDataStruct  *SiS_LCDA1600x1200Data_2;
 	const SiS_LVDSDataStruct  *SiS_LVDSXXXxXXXData_1;
 	const SiS_LVDSDataStruct  *SiS_LVDSBARCO1366Data_1;
 	const SiS_LVDSDataStruct  *SiS_LVDSBARCO1366Data_2;
@@ -511,6 +502,7 @@
 	const SiS_LVDSDataStruct  *SiS_CHTVUPALNData;
 	const SiS_LVDSDataStruct  *SiS_CHTVOPALNData;
 	const SiS_LVDSDataStruct  *SiS_CHTVSOPALData;
+
 	const SiS_LVDSDesStruct  *SiS_PanelType00_1;
 	const SiS_LVDSDesStruct  *SiS_PanelType01_1;
 	const SiS_LVDSDesStruct  *SiS_PanelType02_1;
@@ -545,20 +537,11 @@
 	const SiS_LVDSDesStruct  *SiS_PanelType0e_2;
 	const SiS_LVDSDesStruct  *SiS_PanelType0f_2;
 	const SiS_LVDSDesStruct  *SiS_PanelTypeNS_2;
-
-	const SiS_LVDSDesStruct  *LVDS1024x768Des_1;
-	const SiS_LVDSDesStruct  *LVDS1280x1024Des_1;
-	const SiS_LVDSDesStruct  *LVDS1400x1050Des_1;
-	const SiS_LVDSDesStruct  *LVDS1600x1200Des_1;
-	const SiS_LVDSDesStruct  *LVDS1024x768Des_2;
-	const SiS_LVDSDesStruct  *LVDS1280x1024Des_2;
-	const SiS_LVDSDesStruct  *LVDS1400x1050Des_2;
-	const SiS_LVDSDesStruct  *LVDS1600x1200Des_2;
-
 	const SiS_LVDSDesStruct  *SiS_CHTVUNTSCDesData;
 	const SiS_LVDSDesStruct  *SiS_CHTVONTSCDesData;
 	const SiS_LVDSDesStruct  *SiS_CHTVUPALDesData;
 	const SiS_LVDSDesStruct  *SiS_CHTVOPALDesData;
+
 	const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1800x600_1;
 	const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11024x768_1;
 	const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT11280x1024_1;
@@ -599,44 +582,13 @@
 	const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1640x480_2_H;
 	const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1640x480_3;
 	const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1640x480_3_H;
+	const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1320x480_1;
 	const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1UNTSC;
 	const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1ONTSC;
 	const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1UPAL;
 	const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1OPAL;
 	const SiS_LVDSCRT1DataStruct  *SiS_CHTVCRT1SOPAL;
 
-	const SiS_LVDSCRT1DataStruct  *SiS_LVDSCRT1320x480_1;
-
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11024x768_1;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11280x1024_1;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11400x1050_1;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11600x1200_1;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11024x768_1_H;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11280x1024_1_H;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11400x1050_1_H;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11600x1200_1_H;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11024x768_2;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11280x1024_2;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11400x1050_2;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11600x1200_2;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11024x768_2_H;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11280x1024_2_H;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11400x1050_2_H;
-	const SiS_LCDACRT1DataStruct  *SiS_LCDACRT11600x1200_2_H;
-
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_1;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_1;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1400x1050_1;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1600x1200_1;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_2;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_2;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1400x1050_2;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1600x1200_2;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_3;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_3;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1400x1050_3;
-	const SiS_Part2PortTblStruct *SiS_CRT2Part2_1600x1200_3;
-
 	const SiS_CHTVRegDataStruct *SiS_CHTVReg_UNTSC;
 	const SiS_CHTVRegDataStruct *SiS_CHTVReg_ONTSC;
 	const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPAL;
@@ -646,6 +598,7 @@
 	const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPALN;
 	const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPALN;
 	const SiS_CHTVRegDataStruct *SiS_CHTVReg_SOPAL;
+
 	const UCHAR *SiS_CHTVVCLKUNTSC;
 	const UCHAR *SiS_CHTVVCLKONTSC;
 	const UCHAR *SiS_CHTVVCLKUPAL;
@@ -656,9 +609,13 @@
 	const UCHAR *SiS_CHTVVCLKOPALN;
 	const UCHAR *SiS_CHTVVCLKSOPAL;
 
-	USHORT  PanelXRes;
-	USHORT  PanelYRes;
-	
+	USHORT  PanelXRes, PanelHT;
+	USHORT  PanelYRes, PanelVT;
+	USHORT  PanelHRS,  PanelHRE;
+  	USHORT 	PanelVRS,  PanelVRE;
+	USHORT  PanelVCLKIdx300;
+	USHORT  PanelVCLKIdx315;
+
 	BOOLEAN UseCustomMode;
 	BOOLEAN CRT1UsesCustomMode;
 	USHORT  CHDisplay;
@@ -700,10 +657,11 @@
 	UCHAR Backup_1d;
 	
 	int     UsePanelScaler;
+	int	CenterScreen;
 
 	USHORT  CP_Vendor, CP_Product;
 	BOOLEAN CP_HaveCustomData;
-	int     CP_PreferredX, CP_PreferredY;
+	int     CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
 	int	CP_MaxX, CP_MaxY, CP_MaxClock;
 	BOOLEAN CP_Supports64048075;
 	int     CP_HDisplay[7], CP_VDisplay[7];	/* For Custom LCD panel dimensions */
--- diff/drivers/video/skeletonfb.c	2004-05-19 22:12:21.000000000 +0100
+++ source/drivers/video/skeletonfb.c	2004-07-01 21:32:47.000000000 +0100
@@ -539,7 +539,13 @@
     info.fbops = &xxxfb_ops;
     info.fix = xxxfb_fix;
     info.pseudo_palette = pseudo_palette;
-    info.flags = FBINFO_FLAG_DEFAULT;
+
+    /*
+     * Set up flags to indicate what sort of acceleration your
+     * driver can provide (pan/wrap/copyarea/etc.) and whether it
+     * is a module -- see FBINFO_* in include/linux/fb.h
+     */
+    info.flags = FBINFO_DEFAULT;
     info.par = current_par;
 
     /*
--- diff/drivers/video/sstfb.c	2004-05-19 22:12:21.000000000 +0100
+++ source/drivers/video/sstfb.c	2004-07-01 21:32:47.000000000 +0100
@@ -790,7 +790,7 @@
 		
 	/* fills lfb with #arg pixels */
 	case _IOW('F', 0xdc, u32):	/* 0x46dc */
-		if (copy_from_user(&val, (void *)arg, sizeof(val)))
+		if (copy_from_user(&val, (void __user *)arg, sizeof(val)))
 			return -EFAULT;
 		if (val > info->fix.smem_len)
 			val = info->fix.smem_len;
@@ -801,7 +801,7 @@
 		
 	/* change VGA pass_through mode */
 	case _IOW('F', 0xdd, u32):	/* 0x46dd */
-		if (copy_from_user(&val, (void *)arg, sizeof(val)))
+		if (copy_from_user(&val, (void __user *)arg, sizeof(val)))
 			return -EFAULT;
 		pci_read_config_dword(sst_dev, PCI_INIT_ENABLE, &tmp);
 		pci_write_config_dword(sst_dev, PCI_INIT_ENABLE,
--- diff/drivers/video/tdfxfb.c	2004-06-30 14:25:55.000000000 +0100
+++ source/drivers/video/tdfxfb.c	2004-07-01 21:32:47.000000000 +0100
@@ -1101,7 +1101,7 @@
 		 */
 		u8 *cursorbase = (u8 *) info->cursor.image.data;
 		char *bitmap = (char *)cursor->image.data;
-		char *mask = cursor->mask;
+		const char *mask = cursor->mask;
 		int i, j, k, h = 0;
 
 		for (i = 0; i < 64; i++) {
--- diff/fs/Kconfig	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/Kconfig	2004-07-01 21:32:47.000000000 +0100
@@ -672,6 +672,25 @@
 	  To compile this as a module, choose M here: the module will be called
 	  vfat.
 
+config FAT_DEFAULT_CODEPAGE
+	int "Default codepage for FAT"
+	depends on MSDOS_FS || VFAT_FS
+	default 437
+	help
+	  This option should be set to the codepage of your FAT filesystems.
+	  It can be overridden with the 'codepage' mount option.
+
+config FAT_DEFAULT_IOCHARSET
+	string "Default iocharset for FAT"
+	depends on VFAT_FS
+	default "iso8859-1"
+	help
+	  Set this to the default I/O character set you'd like FAT to use.
+	  It should probably match the character set that most of your
+	  FAT filesystems use, and can be overridded with the 'iocharset'
+	  mount option for FAT filesystems.  Note that UTF8 is *not* a
+	  supported charset for FAT filesystems.
+
 config UMSDOS_FS
 #dep_tristate '    UMSDOS: Unix-like file system on top of standard MSDOS fs' CONFIG_UMSDOS_FS $CONFIG_MSDOS_FS
 # UMSDOS is temprory broken
@@ -1450,11 +1469,13 @@
 	  If unsure, say N.
 
 config NFSD_TCP
-	bool "Provide NFS server over TCP support (EXPERIMENTAL)"
-	depends on NFSD && EXPERIMENTAL
+	bool "Provide NFS server over TCP support"
+	depends on NFSD
+	default y
 	help
-	  Enable NFS service over TCP connections.  This the officially
-	  still experimental, but seems to work well.
+	  If you want your NFS server to support TCP connections, say Y here.
+	  TCP connections usually perform better than the default UDP when
+	  the network is lossy or congested.  If unsure, say Y.
 
 config ROOT_NFS
 	bool "Root file system on NFS"
@@ -1562,7 +1583,7 @@
 	  smbmount from samba 2.2.0 or later supports this.
 
 config CIFS
-	tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)(EXPERIMENTAL)"
+	tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)"
 	depends on INET
 	select NLS
 	help
@@ -1592,7 +1613,16 @@
         depends on CIFS
         help
           Enabling this option will cause statistics for each server share
-	  mounted by the cifs client to be displayed in /proc/fs/cifs/DebugData
+	  mounted by the cifs client to be displayed in /proc/fs/cifs/Stats
+
+config CIFS_POSIX
+        bool "CIFS POSIX Extensions (EXPERIMENTAL)"
+        depends on CIFS
+        help
+          Enabling this option will cause the cifs client to attempt to
+	  negotiate a newer dialect with servers, such as Samba 3.0.5
+	  or later, that optionally can handle more POSIX like (rather
+	  than Windows like) file behavior.  If unsure, say N.
 
 config NCP_FS
 	tristate "NCP file system support (to mount NetWare volumes)"
--- diff/fs/affs/amigaffs.c	2004-05-19 22:12:24.000000000 +0100
+++ source/fs/affs/amigaffs.c	2004-07-01 21:32:47.000000000 +0100
@@ -201,7 +201,7 @@
 			goto done;
 	}
 
-	while ((ino = be32_to_cpu(AFFS_TAIL(sb, bh)->link_chain))) {
+	while ((ino = be32_to_cpu(AFFS_TAIL(sb, bh)->link_chain)) != 0) {
 		if (ino == link_ino) {
 			ino = AFFS_TAIL(sb, link_bh)->link_chain;
 			AFFS_TAIL(sb, bh)->link_chain = ino;
@@ -458,7 +458,6 @@
 	if (!(sb->s_flags & MS_RDONLY))
 		printk(KERN_WARNING "AFFS: Remounting filesystem read-only\n");
 	sb->s_flags |= MS_RDONLY;
-	AFFS_SB(sb)->s_flags |= SF_READONLY;	/* Don't allow to remount rw */
 }
 
 void
--- diff/fs/affs/bitmap.c	2004-05-19 22:12:24.000000000 +0100
+++ source/fs/affs/bitmap.c	2004-07-01 21:32:47.000000000 +0100
@@ -272,8 +272,7 @@
 	return 0;
 }
 
-int
-affs_init_bitmap(struct super_block *sb)
+int affs_init_bitmap(struct super_block *sb, int *flags)
 {
 	struct affs_bm_info *bm;
 	struct buffer_head *bmap_bh = NULL, *bh = NULL;
@@ -282,13 +281,13 @@
 	int i, res = 0;
 	struct affs_sb_info *sbi = AFFS_SB(sb);
 
-	if (sb->s_flags & MS_RDONLY)
+	if (*flags & MS_RDONLY)
 		return 0;
 
 	if (!AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag) {
 		printk(KERN_NOTICE "AFFS: Bitmap invalid - mounting %s read only\n",
 			sb->s_id);
-		sb->s_flags |= MS_RDONLY;
+		*flags |= MS_RDONLY;
 		return 0;
 	}
 
@@ -301,7 +300,7 @@
 	bm = sbi->s_bitmap = kmalloc(size, GFP_KERNEL);
 	if (!sbi->s_bitmap) {
 		printk(KERN_ERR "AFFS: Bitmap allocation failed\n");
-		return 1;
+		return -ENOMEM;
 	}
 	memset(sbi->s_bitmap, 0, size);
 
@@ -316,13 +315,13 @@
 		bh = affs_bread(sb, bm->bm_key);
 		if (!bh) {
 			printk(KERN_ERR "AFFS: Cannot read bitmap\n");
-			res = 1;
+			res = -EIO;
 			goto out;
 		}
 		if (affs_checksum_block(sb, bh)) {
 			printk(KERN_WARNING "AFFS: Bitmap %u invalid - mounting %s read only.\n",
 			       bm->bm_key, sb->s_id);
-			sb->s_flags |= MS_RDONLY;
+			*flags |= MS_RDONLY;
 			goto out;
 		}
 		pr_debug("AFFS: read bitmap block %d: %d\n", blk, bm->bm_key);
@@ -338,7 +337,7 @@
 		bmap_bh = affs_bread(sb, be32_to_cpu(bmap_blk[blk]));
 		if (!bmap_bh) {
 			printk(KERN_ERR "AFFS: Cannot read bitmap extension\n");
-			res = 1;
+			res = -EIO;
 			goto out;
 		}
 		bmap_blk = (u32 *)bmap_bh->b_data;
@@ -383,3 +382,17 @@
 	affs_brelse(bmap_bh);
 	return res;
 }
+
+void affs_free_bitmap(struct super_block *sb)
+{
+	struct affs_sb_info *sbi = AFFS_SB(sb);
+
+	if (!sbi->s_bitmap)
+		return;
+
+	affs_brelse(sbi->s_bmap_bh);
+	sbi->s_bmap_bh = NULL;
+	sbi->s_last_bmap = ~0;
+	kfree(sbi->s_bitmap);
+	sbi->s_bitmap = NULL;
+}
--- diff/fs/affs/inode.c	2004-05-19 22:12:24.000000000 +0100
+++ source/fs/affs/inode.c	2004-07-01 21:32:47.000000000 +0100
@@ -249,7 +249,7 @@
 		goto out;
 	}
 
-	inode_setattr(inode, attr);
+	error = inode_setattr(inode, attr);
 	if (!error && (attr->ia_valid & ATTR_MODE))
 		mode_to_prot(inode);
 out:
--- diff/fs/affs/super.c	2004-05-19 22:12:24.000000000 +0100
+++ source/fs/affs/super.c	2004-07-01 21:32:47.000000000 +0100
@@ -51,10 +51,9 @@
 		mark_buffer_dirty(sbi->s_root_bh);
 	}
 
-	affs_brelse(sbi->s_bmap_bh);
 	if (sbi->s_prefix)
 		kfree(sbi->s_prefix);
-	kfree(sbi->s_bitmap);
+	affs_free_bitmap(sb);
 	affs_brelse(sbi->s_root_bh);
 	kfree(sbi);
 	sb->s_fs_info = NULL;
@@ -288,6 +287,7 @@
 	gid_t			 gid;
 	int			 reserved;
 	unsigned long		 mount_flags;
+	int			 tmp_flags;	/* fix remount prototype... */
 
 	pr_debug("AFFS: read_super(%s)\n",data ? (const char *)data : "no options");
 
@@ -399,7 +399,6 @@
 		printk(KERN_NOTICE "AFFS: Dircache FS - mounting %s read only\n",
 			sb->s_id);
 		sb->s_flags |= MS_RDONLY;
-		sbi->s_flags |= SF_READONLY;
 	}
 	switch (chksum) {
 		case MUFS_FS:
@@ -455,8 +454,10 @@
 	sbi->s_root_bh = root_bh;
 	/* N.B. after this point s_root_bh must be released */
 
-	if (affs_init_bitmap(sb))
+	tmp_flags = sb->s_flags;
+	if (affs_init_bitmap(sb, &tmp_flags))
 		goto out_error;
+	sb->s_flags = tmp_flags;
 
 	/* set up enough so that it can read an inode */
 
@@ -498,7 +499,7 @@
 	int			 reserved;
 	int			 root_block;
 	unsigned long		 mount_flags;
-	unsigned long		 read_only = sbi->s_flags & SF_READONLY;
+	int			 res = 0;
 
 	pr_debug("AFFS: remount(flags=0x%x,opts=\"%s\")\n",*flags,data);
 
@@ -507,7 +508,7 @@
 	if (!parse_options(data,&uid,&gid,&mode,&reserved,&root_block,
 	    &blocksize,&sbi->s_prefix,sbi->s_volume,&mount_flags))
 		return -EINVAL;
-	sbi->s_flags = mount_flags | read_only;
+	sbi->s_flags = mount_flags;
 	sbi->s_mode  = mode;
 	sbi->s_uid   = uid;
 	sbi->s_gid   = gid;
@@ -518,14 +519,11 @@
 		sb->s_dirt = 1;
 		while (sb->s_dirt)
 			affs_write_super(sb);
-		sb->s_flags |= MS_RDONLY;
-	} else if (!(sbi->s_flags & SF_READONLY)) {
-		sb->s_flags &= ~MS_RDONLY;
-	} else {
-		affs_warning(sb,"remount","Cannot remount fs read/write because of errors");
-		return -EINVAL;
-	}
-	return 0;
+		affs_free_bitmap(sb);
+	} else
+		res = affs_init_bitmap(sb, flags);
+
+	return res;
 }
 
 static int
--- diff/fs/affs/symlink.c	2004-05-19 22:12:24.000000000 +0100
+++ source/fs/affs/symlink.c	2004-07-01 21:32:47.000000000 +0100
@@ -78,7 +78,8 @@
 };
 
 struct inode_operations affs_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.setattr	= affs_notify_change,
 };
--- diff/fs/afs/super.c	2004-05-19 22:12:25.000000000 +0100
+++ source/fs/afs/super.c	2004-07-01 21:32:47.000000000 +0100
@@ -172,7 +172,7 @@
 	options[PAGE_SIZE - 1] = 0;
 
 	ret = 0;
-	while ((key = strsep(&options, ",")))
+	while ((key = strsep(&options, ",")) != 0)
 	{
 		value = strchr(key, '=');
 		if (value)
--- diff/fs/aio.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/aio.c	2004-07-01 21:32:47.000000000 +0100
@@ -27,6 +27,7 @@
 #include <linux/aio.h>
 #include <linux/highmem.h>
 #include <linux/workqueue.h>
+#include <linux/security.h>
 
 #include <asm/kmap_types.h>
 #include <asm/uaccess.h>
@@ -395,6 +396,8 @@
 	req->ki_cancel = NULL;
 	req->ki_retry = NULL;
 	req->ki_obj.user = NULL;
+	req->ki_dtor = NULL;
+	req->private = NULL;
 
 	/* Check if the completion queue has enough free space to
 	 * accept an event from this io.
@@ -435,9 +438,13 @@
 
 static inline void really_put_req(struct kioctx *ctx, struct kiocb *req)
 {
+	if (req->ki_dtor)
+		req->ki_dtor(req);
 	req->ki_ctx = NULL;
 	req->ki_filp = NULL;
 	req->ki_obj.user = NULL;
+	req->ki_dtor = NULL;
+	req->private = NULL;
 	kmem_cache_free(kiocb_cachep, req);
 	ctx->reqs_active--;
 
@@ -617,6 +624,7 @@
 		queue_work(aio_wq, &ctx->wq);
 	}
 }
+EXPORT_SYMBOL(kick_iocb);
 
 /* aio_complete
  *	Called when the io request on the given iocb is complete.
@@ -1036,6 +1044,9 @@
 		ret = -EFAULT;
 		if (unlikely(!access_ok(VERIFY_WRITE, buf, iocb->aio_nbytes)))
 			goto out_put_req;
+		ret = security_file_permission (file, MAY_READ);
+		if (ret)
+			goto out_put_req;
 		ret = -EINVAL;
 		if (file->f_op->aio_read)
 			ret = file->f_op->aio_read(req, buf,
@@ -1048,6 +1059,9 @@
 		ret = -EFAULT;
 		if (unlikely(!access_ok(VERIFY_READ, buf, iocb->aio_nbytes)))
 			goto out_put_req;
+		ret = security_file_permission (file, MAY_WRITE);
+		if (ret)
+			goto out_put_req;
 		ret = -EINVAL;
 		if (file->f_op->aio_write)
 			ret = file->f_op->aio_write(req, buf,
--- diff/fs/autofs/root.c	2004-05-19 22:12:25.000000000 +0100
+++ source/fs/autofs/root.c	2004-07-01 21:32:47.000000000 +0100
@@ -468,7 +468,7 @@
 
 /* Get/set timeout ioctl() operation */
 static inline int autofs_get_set_timeout(struct autofs_sb_info *sbi,
-					 unsigned long *p)
+					 unsigned long __user *p)
 {
 	unsigned long ntimeout;
 
@@ -485,7 +485,7 @@
 }
 
 /* Return protocol version */
-static inline int autofs_get_protover(int *p)
+static inline int autofs_get_protover(int __user *p)
 {
 	return put_user(AUTOFS_PROTO_VERSION, p);
 }
@@ -494,7 +494,7 @@
 static inline int autofs_expire_run(struct super_block *sb,
 				    struct autofs_sb_info *sbi,
 				    struct vfsmount *mnt,
-				    struct autofs_packet_expire *pkt_p)
+				    struct autofs_packet_expire __user *pkt_p)
 {
 	struct autofs_dir_ent *ent;
 	struct autofs_packet_expire pkt;
@@ -526,6 +526,7 @@
 			     unsigned int cmd, unsigned long arg)
 {
 	struct autofs_sb_info *sbi = autofs_sbi(inode->i_sb);
+	void __user *argp = (void __user *)arg;
 
 	DPRINTK(("autofs_ioctl: cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u\n",cmd,arg,sbi,process_group(current)));
 
@@ -545,12 +546,12 @@
 		autofs_catatonic_mode(sbi);
 		return 0;
 	case AUTOFS_IOC_PROTOVER: /* Get protocol version */
-		return autofs_get_protover((int *)arg);
+		return autofs_get_protover(argp);
 	case AUTOFS_IOC_SETTIMEOUT:
-		return autofs_get_set_timeout(sbi,(unsigned long *)arg);
+		return autofs_get_set_timeout(sbi, argp);
 	case AUTOFS_IOC_EXPIRE:
 		return autofs_expire_run(inode->i_sb, sbi, filp->f_vfsmnt,
-					 (struct autofs_packet_expire *)arg);
+					 argp);
 	default:
 		return -ENOSYS;
 	}
--- diff/fs/autofs/symlink.c	2004-05-19 22:12:25.000000000 +0100
+++ source/fs/autofs/symlink.c	2004-07-01 21:32:47.000000000 +0100
@@ -12,19 +12,14 @@
 
 #include "autofs_i.h"
 
-static int autofs_readlink(struct dentry *dentry, char *buffer, int buflen)
-{
-	char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data;
-	return vfs_readlink(dentry, buffer, buflen, s);
-}
-
 static int autofs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data;
-	return vfs_follow_link(nd, s);
+	nd_set_link(nd, s);
+	return 0;
 }
 
 struct inode_operations autofs_symlink_inode_operations = {
-	.readlink	= autofs_readlink,
+	.readlink	= generic_readlink,
 	.follow_link	= autofs_follow_link
 };
--- diff/fs/autofs/waitq.c	2004-05-19 22:12:25.000000000 +0100
+++ source/fs/autofs/waitq.c	2004-07-01 21:32:47.000000000 +0100
@@ -183,7 +183,7 @@
 {
 	struct autofs_wait_queue *wq, **wql;
 
-	for ( wql = &sbi->queues ; (wq = *wql) ; wql = &wq->next ) {
+	for ( wql = &sbi->queues ; (wq = *wql) != 0 ; wql = &wq->next ) {
 		if ( wq->wait_queue_token == wait_queue_token )
 			break;
 	}
--- diff/fs/autofs4/symlink.c	2004-05-19 22:12:25.000000000 +0100
+++ source/fs/autofs4/symlink.c	2004-07-01 21:32:47.000000000 +0100
@@ -12,21 +12,14 @@
 
 #include "autofs_i.h"
 
-static int autofs4_readlink(struct dentry *dentry, char *buffer, int buflen)
-{
-	struct autofs_info *ino = autofs4_dentry_ino(dentry);
-
-	return vfs_readlink(dentry, buffer, buflen, ino->u.symlink);
-}
-
 static int autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	struct autofs_info *ino = autofs4_dentry_ino(dentry);
-
-	return vfs_follow_link(nd, ino->u.symlink);
+	nd_set_link(nd, (char *)ino->u.symlink);
+	return 0;
 }
 
 struct inode_operations autofs4_symlink_inode_operations = {
-	.readlink	= autofs4_readlink,
+	.readlink	= generic_readlink,
 	.follow_link	= autofs4_follow_link
 };
--- diff/fs/autofs4/waitq.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/autofs4/waitq.c	2004-07-01 21:32:47.000000000 +0100
@@ -275,7 +275,7 @@
 	struct autofs_wait_queue *wq, **wql;
 
 	down(&sbi->wq_sem);
-	for ( wql = &sbi->queues ; (wq = *wql) ; wql = &wq->next ) {
+	for ( wql = &sbi->queues ; (wq = *wql) != 0 ; wql = &wq->next ) {
 		if ( wq->wait_queue_token == wait_queue_token )
 			break;
 	}
--- diff/fs/bad_inode.c	2004-05-19 22:12:24.000000000 +0100
+++ source/fs/bad_inode.c	2004-07-01 21:32:47.000000000 +0100
@@ -13,6 +13,7 @@
 #include <linux/stat.h>
 #include <linux/time.h>
 #include <linux/smp_lock.h>
+#include <linux/namei.h>
 
 /*
  * The follow_link operation is special: it must behave as a no-op
@@ -21,7 +22,8 @@
  */
 static int bad_follow_link(struct dentry *dent, struct nameidata *nd)
 {
-	return vfs_follow_link(nd, ERR_PTR(-EIO));
+	nd_set_link(nd, ERR_PTR(-EIO));
+	return 0;
 }
 
 static int return_EIO(void)
--- diff/fs/befs/linuxvfs.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/befs/linuxvfs.c	2004-07-01 21:32:47.000000000 +0100
@@ -14,6 +14,7 @@
 #include <linux/buffer_head.h>
 #include <linux/vfs.h>
 #include <linux/parser.h>
+#include <linux/namei.h>
 
 #include "befs.h"
 #include "btree.h"
@@ -40,8 +41,8 @@
 static void befs_destroy_inode(struct inode *inode);
 static int befs_init_inodecache(void);
 static void befs_destroy_inodecache(void);
-static int befs_readlink(struct dentry *, char __user *, int);
-static int befs_follow_link(struct dentry *, struct nameidata *nd);
+static int befs_follow_link(struct dentry *, struct nameidata *);
+static void befs_put_link(struct dentry *, struct nameidata *);
 static int befs_utf2nls(struct super_block *sb, const char *in, int in_len,
 			char **out, int *out_len);
 static int befs_nls2utf(struct super_block *sb, const char *in, int in_len,
@@ -85,8 +86,9 @@
 };
 
 static struct inode_operations befs_symlink_inode_operations = {
-	.readlink	= befs_readlink,
+	.readlink	= generic_readlink,
 	.follow_link	= befs_follow_link,
+	.put_link	= befs_put_link,
 };
 
 /* 
@@ -462,71 +464,40 @@
 static int
 befs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
-	struct super_block *sb = dentry->d_sb;
 	befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
 	char *link;
-	int res;
 
 	if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
+		struct super_block *sb = dentry->d_sb;
 		befs_data_stream *data = &befs_ino->i_data.ds;
-		befs_off_t linklen = data->size;
+		befs_off_t len = data->size;
 
 		befs_debug(sb, "Follow long symlink");
 
-		link = kmalloc(linklen, GFP_NOFS);
-		if (link == NULL)
-			return -ENOMEM;
-
-		if (befs_read_lsymlink(sb, data, link, linklen) != linklen) {
+		link = kmalloc(len, GFP_NOFS);
+		if (!link) {
+			link = ERR_PTR(-ENOMEM);
+		} else if (befs_read_lsymlink(sb, data, link, len) != len) {
 			kfree(link);
 			befs_error(sb, "Failed to read entire long symlink");
-			return -EIO;
+			link = ERR_PTR(-EIO);
 		}
-
-		res = vfs_follow_link(nd, link);
-
-		kfree(link);
 	} else {
 		link = befs_ino->i_data.symlink;
-		res = vfs_follow_link(nd, link);
 	}
 
-	return res;
+	nd_set_link(nd, link);
+	return 0;
 }
 
-static int
-befs_readlink(struct dentry *dentry, char __user *buffer, int buflen)
+static void befs_put_link(struct dentry *dentry, struct nameidata *nd)
 {
-	struct super_block *sb = dentry->d_sb;
 	befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
-	char *link;
-	int res;
-
 	if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
-		befs_data_stream *data = &befs_ino->i_data.ds;
-		befs_off_t linklen = data->size;
-
-		befs_debug(sb, "Read long symlink");
-
-		link = kmalloc(linklen, GFP_NOFS);
-		if (link == NULL)
-			return -ENOMEM;
-
-		if (befs_read_lsymlink(sb, data, link, linklen) != linklen) {
-			kfree(link);
-			befs_error(sb, "Failed to read entire long symlink");
-			return -EIO;
-		}
-
-		res = vfs_readlink(dentry, buffer, buflen, link);
-
-		kfree(link);
-	} else {
-		link = befs_ino->i_data.symlink;
-		res = vfs_readlink(dentry, buffer, buflen, link);
+		char *p = nd_get_link(nd);
+		if (!IS_ERR(p))
+			kfree(p);
 	}
-
-	return res;
 }
 
 /*
--- diff/fs/binfmt_aout.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/binfmt_aout.c	2004-07-01 21:32:47.000000000 +0100
@@ -27,7 +27,6 @@
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/cacheflush.h>
 
 static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs);
@@ -141,14 +140,14 @@
 /* make sure we actually have a data and stack area to dump */
 	set_fs(USER_DS);
 #ifdef __sparc__
-	if (verify_area(VERIFY_READ, (void *) START_DATA(dump), dump.u_dsize))
+	if (verify_area(VERIFY_READ, (void __user *)START_DATA(dump), dump.u_dsize))
 		dump.u_dsize = 0;
-	if (verify_area(VERIFY_READ, (void *) START_STACK(dump), dump.u_ssize))
+	if (verify_area(VERIFY_READ, (void __user *)START_STACK(dump), dump.u_ssize))
 		dump.u_ssize = 0;
 #else
-	if (verify_area(VERIFY_READ, (void *) START_DATA(dump), dump.u_dsize << PAGE_SHIFT))
+	if (verify_area(VERIFY_READ, (void __user *)START_DATA(dump), dump.u_dsize << PAGE_SHIFT))
 		dump.u_dsize = 0;
-	if (verify_area(VERIFY_READ, (void *) START_STACK(dump), dump.u_ssize << PAGE_SHIFT))
+	if (verify_area(VERIFY_READ, (void __user *)START_STACK(dump), dump.u_ssize << PAGE_SHIFT))
 		dump.u_ssize = 0;
 #endif
 
@@ -194,17 +193,18 @@
  * memory and creates the pointer tables from them, and puts their
  * addresses on the "stack", returning the new stack pointer value.
  */
-static unsigned long * create_aout_tables(char * p, struct linux_binprm * bprm)
+static unsigned long __user *create_aout_tables(char __user *p, struct linux_binprm * bprm)
 {
-	char **argv, **envp;
-	unsigned long * sp;
+	char __user * __user *argv;
+	char __user * __user *envp;
+	unsigned long __user *sp;
 	int argc = bprm->argc;
 	int envc = bprm->envc;
 
-	sp = (unsigned long *) ((-(unsigned long)sizeof(char *)) & (unsigned long) p);
+	sp = (void __user *)((-(unsigned long)sizeof(char *)) & (unsigned long) p);
 #ifdef __sparc__
 	/* This imposes the proper stack alignment for a new process. */
-	sp = (unsigned long *) (((unsigned long) sp) & ~7);
+	sp = (void __user *) (((unsigned long) sp) & ~7);
 	if ((envc+argc+3)&1) --sp;
 #endif
 #ifdef __alpha__
@@ -221,9 +221,9 @@
 	put_user(0x3e9, --sp);
 #endif
 	sp -= envc+1;
-	envp = (char **) sp;
+	envp = (char __user * __user *) sp;
 	sp -= argc+1;
-	argv = (char **) sp;
+	argv = (char __user * __user *) sp;
 #if defined(__i386__) || defined(__mc68000__) || defined(__arm__) || defined(__arch_um__)
 	put_user((unsigned long) envp,--sp);
 	put_user((unsigned long) argv,--sp);
@@ -307,7 +307,7 @@
 		(current->mm->start_data = N_DATADDR(ex));
 	current->mm->brk = ex.a_bss +
 		(current->mm->start_brk = N_BSSADDR(ex));
-	current->mm->free_area_cache = TASK_UNMAPPED_BASE;
+	current->mm->free_area_cache = current->mm->mmap_base;
 
 	current->mm->rss = 0;
 	current->mm->mmap = NULL;
@@ -421,7 +421,7 @@
 	}
 
 	current->mm->start_stack =
-		(unsigned long) create_aout_tables((char *) bprm->p, bprm);
+		(unsigned long) create_aout_tables((char __user *) bprm->p, bprm);
 #ifdef __alpha__
 	regs->gp = ex.a_gpvalue;
 #endif
--- diff/fs/binfmt_elf.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/binfmt_elf.c	2004-07-01 21:32:47.000000000 +0100
@@ -40,7 +40,6 @@
 
 #include <asm/uaccess.h>
 #include <asm/param.h>
-#include <asm/pgalloc.h>
 
 #include <linux/elf.h>
 
@@ -204,6 +203,9 @@
 	if (k_platform) {
 		NEW_AUX_ENT(AT_PLATFORM, (elf_addr_t)(long)u_platform);
 	}
+	if (bprm->interp_flags & BINPRM_FLAGS_EXECFD) {
+		NEW_AUX_ENT(AT_EXECFD, (elf_addr_t) bprm->interp_data);
+	}
 #undef NEW_AUX_ENT
 	/* AT_NULL is zero; clear the rest too */
 	memset(&elf_info[ei_index], 0,
@@ -491,6 +493,7 @@
 	char passed_fileno[6];
 	struct files_struct *files;
 	int executable_stack = EXSTACK_DEFAULT;
+	unsigned long def_flags = 0;
 	
 	/* Get the exec-header */
 	elf_ex = *((struct elfhdr *) bprm->buf);
@@ -622,7 +625,10 @@
 				executable_stack = EXSTACK_ENABLE_X;
 			else
 				executable_stack = EXSTACK_DISABLE_X;
+			break;
 		}
+	if (i == elf_ex.e_phnum)
+		def_flags |= VM_EXEC | VM_MAYEXEC;
 
 	/* Some simple consistency checks for the interpreter */
 	if (elf_interpreter) {
@@ -690,6 +696,7 @@
 	current->mm->end_code = 0;
 	current->mm->mmap = NULL;
 	current->flags &= ~PF_FORKNOEXEC;
+	current->mm->def_flags = def_flags;
 
 	/* Do this immediately, since STACK_TOP as used in setup_arg_pages
 	   may depend on the personality.  */
@@ -698,7 +705,7 @@
 	/* Do this so that we can load the interpreter, if need be.  We will
 	   change some of these later */
 	current->mm->rss = 0;
-	current->mm->free_area_cache = TASK_UNMAPPED_BASE;
+	current->mm->free_area_cache = current->mm->mmap_base;
 	retval = setup_arg_pages(bprm, executable_stack);
 	if (retval < 0) {
 		send_sig(SIGKILL, current, 0);
--- diff/fs/binfmt_flat.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/binfmt_flat.c	2004-07-01 21:32:47.000000000 +0100
@@ -40,7 +40,6 @@
 #include <asm/byteorder.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/unaligned.h>
 #include <asm/cacheflush.h>
 
--- diff/fs/binfmt_misc.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/binfmt_misc.c	2004-07-01 21:32:47.000000000 +0100
@@ -39,6 +39,8 @@
 
 enum {Enabled, Magic};
 #define MISC_FMT_PRESERVE_ARGV0 (1<<31)
+#define MISC_FMT_OPEN_BINARY (1<<30)
+#define MISC_FMT_CREDENTIALS (1<<29)
 
 typedef struct {
 	struct list_head list;
@@ -102,10 +104,12 @@
 static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
 {
 	Node *fmt;
-	struct file * file;
+	struct file * interp_file = NULL;
 	char iname[BINPRM_BUF_SIZE];
 	char *iname_addr = iname;
 	int retval;
+	int fd_binary = -1;
+	struct files_struct *files = NULL;
 
 	retval = -ENOEXEC;
 	if (!enabled)
@@ -120,33 +124,102 @@
 	if (!fmt)
 		goto _ret;
 
-	allow_write_access(bprm->file);
-	fput(bprm->file);
-	bprm->file = NULL;
-
-	/* Build args for interpreter */
 	if (!(fmt->flags & MISC_FMT_PRESERVE_ARGV0)) {
 		remove_arg_zero(bprm);
 	}
-	retval = copy_strings_kernel(1, &bprm->interp, bprm);
-	if (retval < 0) goto _ret; 
-	bprm->argc++;
-	retval = copy_strings_kernel(1, &iname_addr, bprm);
-	if (retval < 0) goto _ret; 
+
+	if (fmt->flags & MISC_FMT_OPEN_BINARY) {
+
+		files = current->files;
+		retval = unshare_files();
+		if (retval < 0)
+			goto _ret;
+		if (files == current->files) {
+			put_files_struct(files);
+			files = NULL;
+		}
+		/* if the binary should be opened on behalf of the
+		 * interpreter than keep it open and assign descriptor
+		 * to it */
+ 		fd_binary = get_unused_fd();
+ 		if (fd_binary < 0) {
+ 			retval = fd_binary;
+ 			goto _unshare;
+ 		}
+ 		fd_install(fd_binary, bprm->file);
+
+		/* if the binary is not readable than enforce mm->dumpable=0
+		   regardless of the interpreter's permissions */
+		if (permission(bprm->file->f_dentry->d_inode, MAY_READ, NULL))
+			bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
+
+		allow_write_access(bprm->file);
+		bprm->file = NULL;
+
+		/* mark the bprm that fd should be passed to interp */
+		bprm->interp_flags |= BINPRM_FLAGS_EXECFD;
+		bprm->interp_data = fd_binary;
+
+ 	} else {
+ 		allow_write_access(bprm->file);
+ 		fput(bprm->file);
+ 		bprm->file = NULL;
+ 	}
+	/* make argv[1] be the path to the binary */
+	retval = copy_strings_kernel (1, &bprm->interp, bprm);
+	if (retval < 0)
+		goto _error;
 	bprm->argc++;
-	bprm->interp = iname;	/* for binfmt_script */
 
-	file = open_exec(iname);
-	retval = PTR_ERR(file);
-	if (IS_ERR(file))
-		goto _ret;
-	bprm->file = file;
+	/* add the interp as argv[0] */
+	retval = copy_strings_kernel (1, &iname_addr, bprm);
+	if (retval < 0)
+		goto _error;
+	bprm->argc ++;
 
-	retval = prepare_binprm(bprm);
-	if (retval >= 0)
-		retval = search_binary_handler(bprm, regs);
+	bprm->interp = iname;	/* for binfmt_script */
+
+	interp_file = open_exec (iname);
+	retval = PTR_ERR (interp_file);
+	if (IS_ERR (interp_file))
+		goto _error;
+
+	bprm->file = interp_file;
+	if (fmt->flags & MISC_FMT_CREDENTIALS) {
+		/*
+		 * No need to call prepare_binprm(), it's already been
+		 * done.  bprm->buf is stale, update from interp_file.
+		 */
+		memset(bprm->buf, 0, BINPRM_BUF_SIZE);
+		retval = kernel_read(bprm->file, 0, bprm->buf, BINPRM_BUF_SIZE);
+	} else
+		retval = prepare_binprm (bprm);
+
+	if (retval < 0)
+		goto _error;
+
+	retval = search_binary_handler (bprm, regs);
+	if (retval < 0)
+		goto _error;
+
+	if (files) {
+		steal_locks(files);
+		put_files_struct(files);
+		files = NULL;
+	}
 _ret:
 	return retval;
+_error:
+	if (fd_binary > 0)
+		sys_close(fd_binary);
+	bprm->interp_flags = 0;
+	bprm->interp_data = 0;
+_unshare:
+	if (files) {
+		put_files_struct(current->files);
+		current->files = files;
+	}
+	goto _ret;
 }
 
 /* Command parsers */
@@ -191,9 +264,39 @@
 	return p - from;
 }
 
+static inline char * check_special_flags (char * sfs, Node * e)
+{
+	char * p = sfs;
+	int cont = 1;
+
+	/* special flags */
+	while (cont) {
+		switch (*p) {
+			case 'P':
+				p++;
+				e->flags |= MISC_FMT_PRESERVE_ARGV0;
+				break;
+			case 'O':
+				p++;
+				e->flags |= MISC_FMT_OPEN_BINARY;
+				break;
+			case 'C':
+				p++;
+				/* this flags also implies the
+				   open-binary flag */
+				e->flags |= (MISC_FMT_CREDENTIALS |
+						MISC_FMT_OPEN_BINARY);
+				break;
+			default:
+				cont = 0;
+		}
+	}
+
+	return p;
+}
 /*
  * This registers a new binary format, it recognises the syntax
- * ':name:type:offset:magic:mask:interpreter:'
+ * ':name:type:offset:magic:mask:interpreter:flags'
  * where the ':' is the IFS, that can be chosen with the first char
  */
 static Node *create_entry(const char __user *buffer, size_t count)
@@ -293,10 +396,8 @@
 	if (!e->interpreter[0])
 		goto Einval;
 
-	if (*p == 'P') {
-		p++;
-		e->flags |= MISC_FMT_PRESERVE_ARGV0;
-	}
+
+	p = check_special_flags (p, e);
 
 	if (*p == '\n')
 		p++;
@@ -346,6 +447,7 @@
 {
 	char *dp;
 	char *status = "disabled";
+	const char * flags = "flags: ";
 
 	if (test_bit(Enabled, &e->flags))
 		status = "enabled";
@@ -357,6 +459,22 @@
 
 	sprintf(page, "%s\ninterpreter %s\n", status, e->interpreter);
 	dp = page + strlen(page);
+
+	/* print the special flags */
+	sprintf (dp, "%s", flags);
+	dp += strlen (flags);
+	if (e->flags & MISC_FMT_PRESERVE_ARGV0) {
+		*dp ++ = 'P';
+	}
+	if (e->flags & MISC_FMT_OPEN_BINARY) {
+		*dp ++ = 'O';
+	}
+	if (e->flags & MISC_FMT_CREDENTIALS) {
+		*dp ++ = 'C';
+	}
+	*dp ++ = '\n';
+
+
 	if (!test_bit(Magic, &e->flags)) {
 		sprintf(dp, "extension .%s\n", e->magic);
 	} else {
--- diff/fs/bio.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/bio.c	2004-07-01 21:32:47.000000000 +0100
@@ -116,6 +116,8 @@
 	bio->bi_idx = 0;
 	bio->bi_phys_segments = 0;
 	bio->bi_hw_segments = 0;
+	bio->bi_hw_front_size = 0;
+	bio->bi_hw_back_size = 0;
 	bio->bi_size = 0;
 	bio->bi_max_vecs = 0;
 	bio->bi_end_io = NULL;
@@ -304,14 +306,15 @@
 	 * make this too complex.
 	 */
 
-	while (bio_phys_segments(q, bio) >= q->max_phys_segments
-	    || bio_hw_segments(q, bio) >= q->max_hw_segments) {
+	while (bio->bi_phys_segments >= q->max_phys_segments
+	       || bio->bi_hw_segments >= q->max_hw_segments
+	       || BIOVEC_VIRT_OVERSIZE(bio->bi_size)) {
 
 		if (retried_segments)
 			return 0;
 
-		bio->bi_flags &= ~(1 << BIO_SEG_VALID);
 		retried_segments = 1;
+		blk_recount_segments(q, bio);
 	}
 
 	/*
@@ -341,6 +344,11 @@
 		}
 	}
 
+	/* If we may be able to merge these biovecs, force a recount */
+	if (bio->bi_vcnt && (BIOVEC_PHYS_MERGEABLE(bvec-1, bvec) ||
+	    BIOVEC_VIRT_MERGEABLE(bvec-1, bvec)))
+		bio->bi_flags &= ~(1 << BIO_SEG_VALID);
+
 	bio->bi_vcnt++;
 	bio->bi_phys_segments++;
 	bio->bi_hw_segments++;
--- diff/fs/block_dev.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/block_dev.c	2004-07-01 21:32:47.000000000 +0100
@@ -64,8 +64,6 @@
 
 int set_blocksize(struct block_device *bdev, int size)
 {
-	int oldsize;
-
 	/* Size must be a power of two, and between 512 and PAGE_SIZE */
 	if (size > PAGE_SIZE || size < 512 || (size & (size-1)))
 		return -EINVAL;
@@ -74,15 +72,13 @@
 	if (size < bdev_hardsect_size(bdev))
 		return -EINVAL;
 
-	oldsize = bdev->bd_block_size;
-	if (oldsize == size)
-		return 0;
-
-	/* Ok, we're actually changing the blocksize.. */
-	sync_blockdev(bdev);
-	bdev->bd_block_size = size;
-	bdev->bd_inode->i_blkbits = blksize_bits(size);
-	kill_bdev(bdev);
+	/* Don't change the size if it is same as current */
+	if (bdev->bd_block_size != size) {
+		sync_blockdev(bdev);
+		bdev->bd_block_size = size;
+		bdev->bd_inode->i_blkbits = blksize_bits(size);
+		kill_bdev(bdev);
+	}
 	return 0;
 }
 
@@ -90,12 +86,15 @@
 
 int sb_set_blocksize(struct super_block *sb, int size)
 {
-	int bits;
-	if (set_blocksize(sb->s_bdev, size) < 0)
+	int bits = 9; /* 2^9 = 512 */
+
+	if (set_blocksize(sb->s_bdev, size))
 		return 0;
+	/* If we get here, we know size is power of two
+	 * and it's value is between 512 and PAGE_SIZE */
 	sb->s_blocksize = size;
-	for (bits = 9, size >>= 9; size >>= 1; bits++)
-		;
+	for (size >>= 10; size; size >>= 1)
+		++bits;
 	sb->s_blocksize_bits = bits;
 	return sb->s_blocksize;
 }
--- diff/fs/buffer.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/buffer.c	2004-07-01 21:32:47.000000000 +0100
@@ -213,7 +213,7 @@
 	if (uptodate) {
 		set_buffer_uptodate(bh);
 	} else {
-		if (printk_ratelimit()) {
+		if (!buffer_eopnotsupp(bh) && printk_ratelimit()) {
 			buffer_io_error(bh);
 			printk(KERN_WARNING "lost page write due to "
 					"I/O error on %s\n",
@@ -947,7 +947,7 @@
 	spin_unlock(&mapping->private_lock);
 
 	if (!TestSetPageDirty(page)) {
-		spin_lock_irq(&mapping->tree_lock);
+		read_lock_irq(&mapping->tree_lock);
 		if (page->mapping) {	/* Race with truncate? */
 			if (!mapping->backing_dev_info->memory_backed)
 				inc_page_state(nr_dirty);
@@ -955,7 +955,7 @@
 						page_index(page),
 						PAGECACHE_TAG_DIRTY);
 		}
-		spin_unlock_irq(&mapping->tree_lock);
+		read_unlock_irq(&mapping->tree_lock);
 		__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
 	}
 	
@@ -2753,21 +2753,33 @@
 	if (bio->bi_size)
 		return 1;
 
+	if (err == -EOPNOTSUPP) {
+		set_bit(BIO_EOPNOTSUPP, &bio->bi_flags);
+		set_bit(BH_Eopnotsupp, &bh->b_state);
+	}
+
 	bh->b_end_io(bh, test_bit(BIO_UPTODATE, &bio->bi_flags));
 	bio_put(bio);
 	return 0;
 }
 
-void submit_bh(int rw, struct buffer_head * bh)
+int submit_bh(int rw, struct buffer_head * bh)
 {
 	struct bio *bio;
+	int ret = 0;
 
 	BUG_ON(!buffer_locked(bh));
 	BUG_ON(!buffer_mapped(bh));
 	BUG_ON(!bh->b_end_io);
 
-	/* Only clear out a write error when rewriting */
-	if (test_set_buffer_req(bh) && rw == WRITE)
+	if (buffer_ordered(bh) && (rw == WRITE))
+		rw = WRITE_BARRIER;
+
+	/*
+	 * Only clear out a write error when rewriting, should this
+	 * include WRITE_SYNC as well?
+	 */
+	if (test_set_buffer_req(bh) && (rw == WRITE || rw == WRITE_BARRIER))
 		clear_buffer_write_io_error(bh);
 
 	/*
@@ -2789,7 +2801,14 @@
 	bio->bi_end_io = end_bio_bh_io_sync;
 	bio->bi_private = bh;
 
+	bio_get(bio);
 	submit_bio(rw, bio);
+
+	if (bio_flagged(bio, BIO_EOPNOTSUPP))
+		ret = -EOPNOTSUPP;
+
+	bio_put(bio);
+	return ret;
 }
 
 /**
@@ -2848,20 +2867,30 @@
 
 /*
  * For a data-integrity writeout, we need to wait upon any in-progress I/O
- * and then start new I/O and then wait upon it.
+ * and then start new I/O and then wait upon it.  The caller must have a ref on
+ * the buffer_head.
  */
-void sync_dirty_buffer(struct buffer_head *bh)
+int sync_dirty_buffer(struct buffer_head *bh)
 {
+	int ret = 0;
+
 	WARN_ON(atomic_read(&bh->b_count) < 1);
 	lock_buffer(bh);
 	if (test_clear_buffer_dirty(bh)) {
 		get_bh(bh);
 		bh->b_end_io = end_buffer_write_sync;
-		submit_bh(WRITE, bh);
+		ret = submit_bh(WRITE, bh);
 		wait_on_buffer(bh);
+		if (buffer_eopnotsupp(bh)) {
+			clear_buffer_eopnotsupp(bh);
+			ret = -EOPNOTSUPP;
+		}
+		if (!ret && !buffer_uptodate(bh))
+			ret = -EIO;
 	} else {
 		unlock_buffer(bh);
 	}
+	return ret;
 }
 
 /*
--- diff/fs/cifs/AUTHORS	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/AUTHORS	2004-07-01 21:32:47.000000000 +0100
@@ -31,7 +31,7 @@
 and debug of problems they have found:  Jochen Dolze, David Blaine,
 Rene Scharfe, Martin Josefsson, Alexander Wild, Anthony Liguori,
 Lars Muller, Urban Widmark, Massimiliano Ferrero, Howard Owen,
-Olaf Kirch, Kieron Briggs and others. 
+Olaf Kirch, Kieron Briggs, Nick Millington and others. 
 
 And thanks to the IBM LTC and Power test teams and SuSE testers for
 finding multiple bugs during excellent stress test runs.
--- diff/fs/cifs/CHANGES	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/CHANGES	2004-07-01 21:32:47.000000000 +0100
@@ -1,9 +1,27 @@
+Version 1.20
+------------
+Make transaction counts more consistent. Merge /proc/fs/cifs/SimultaneousOps
+info into /proc/fs/cifs/DebugData
+
+Version 1.19
+------------
+Fix /proc/fs/cifs/Stats and DebugData display to handle larger
+amounts of return data. Properly limit requests to MAX_REQ (50
+is the usual maximum active multiplex SMB/CIFS requests per server).
+Do not kill cifsd (and thus hurt the other SMB session) when more than one
+session to the same server (but with different userids) exists and one
+of the two user's smb sessions is being removed while leaving the other.
+Do not loop reconnecting in cifsd demultiplex thread when admin
+kills the thread without going through unmount.
+
 Version 1.18
 ------------
 Do not rename hardlinked files (since that should be a noop). Flush
 cached write behind data when reopening a file after session abend,
 except when already in write. Grab per socket sem during reconnect 
-to avoid oops in sendmsg if overlapping with reconnect.
+to avoid oops in sendmsg if overlapping with reconnect. Do not
+reset cached inode file size on readdir for files open for write on 
+client.
 
 
 Version 1.17
--- diff/fs/cifs/cifs_debug.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/cifs_debug.c	2004-07-01 21:32:47.000000000 +0100
@@ -62,12 +62,17 @@
 		     int count, int *eof, void *data)
 {
 	struct list_head *tmp;
+	struct list_head *tmp1;
+	struct mid_q_entry * mid_entry;
 	struct cifsSesInfo *ses;
 	struct cifsTconInfo *tcon;
 	int i;
 	int length = 0;
-	char *buf_start = buf;
+	char * original_buf = buf;
 
+	*beginBuffer = buf + offset;
+
+	
 	length =
 	    sprintf(buf,
 		    "Display Internal CIFS Data Structures for Debugging\n"
@@ -94,7 +99,7 @@
 				ses->server->secMode,
 				atomic_read(&ses->server->inFlight));
 			
-			/* length = sprintf(buf, "\nMIDs: \n");
+			length = sprintf(buf, "\nMIDs: \n");
 			buf += length;
 
 			spin_lock(&GlobalMid_Lock);
@@ -103,11 +108,11 @@
 					mid_q_entry,
 					qhead);
 				if(mid_entry) {
-					length = sprintf(buf,"State: %d com: %d pid: %d tsk: %p\n",mid_entry->midState,mid_entry->command,mid_entry->pid,mid_entry->tsk);
+					length = sprintf(buf,"State: %d com: %d pid: %d tsk: %p mid %d\n",mid_entry->midState,mid_entry->command,mid_entry->pid,mid_entry->tsk,mid_entry->mid);
 					buf += length;
 				}
 			}
-			spin_unlock(&GlobalMid_Lock); */
+			spin_unlock(&GlobalMid_Lock); 
 		}
 
 	}
@@ -152,19 +157,22 @@
 	length = sprintf(buf, "\n");
 	buf += length;
 
-	*eof = 1;
 	/* BB add code to dump additional info such as TCP session info now */
-	/*
-	   if (offset >= (buf - buf_start)) 
-	   {
-	   *beginBuffer = buf;
-	   return 0;
-	   }
-	   *beginBuffer = buf + offset;
-	   if ((buf - buf_start - offset) > count)
-	   return count;
-   else */
-	return (buf - buf_start - offset);
+	/* Now calculate total size of returned data */
+	length = buf - original_buf;
+
+	if(offset + count >= length)
+		*eof = 1;
+	if(length < offset) {
+		*eof = 1;
+		return 0;
+	} else {
+		length = length - offset;
+	}
+	if (length > count)
+		length = count;
+
+	return length;
 }
 
 int
@@ -183,12 +191,14 @@
 #ifdef CONFIG_CIFS_STATS
 int
 cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
-		  int length, int *eof, void *data)
+		  int count, int *eof, void *data)
 {
-	int item_length,i;
+	int item_length,i,length;
 	struct list_head *tmp;
 	struct cifsTconInfo *tcon;
 
+	*beginBuffer = buf + offset;
+
 	length = sprintf(buf,
 			"Resources in use\nCIFS Session: %d\n",
 			sesInfoAllocCount.counter);
@@ -235,10 +245,12 @@
 			atomic_read(&tcon->num_reads),
 			(long long)(tcon->bytes_read));
 		buf += item_length;
+		length += item_length;
 		item_length = sprintf(buf,"\nWrites: %d Bytes: %lld",
 			atomic_read(&tcon->num_writes),
 			(long long)(tcon->bytes_written));
 		buf += item_length;
+		length += item_length;
 		item_length = sprintf(buf,
 			"\nOpens: %d Deletes: %d\nMkdirs: %d Rmdirs: %d",
 			atomic_read(&tcon->num_opens),
@@ -247,10 +259,29 @@
 			atomic_read(&tcon->num_rmdirs));
 		buf += item_length;
 		length += item_length;
+		item_length = sprintf(buf,
+			"\nRenames: %d T2 Renames %d",
+			atomic_read(&tcon->num_renames),
+			atomic_read(&tcon->num_t2renames));
+		buf += item_length;
+		length += item_length;
 	}
 	read_unlock(&GlobalSMBSeslock);
 
+	buf += sprintf(buf,"\n");
+	length++;
 
+	if(offset + count >= length)
+		*eof = 1;
+	if(length < offset) {
+		*eof = 1;
+		return 0;
+	} else {
+		length = length - offset;
+	}
+	if (length > count)
+		length = count;
+		
 	return length;
 }
 #endif
--- diff/fs/cifs/cifsfs.h	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/cifsfs.h	2004-07-01 21:32:47.000000000 +0100
@@ -93,5 +93,5 @@
 			 size_t, int);
 extern ssize_t	cifs_getxattr(struct dentry *, const char *, void *, size_t);
 extern ssize_t	cifs_listxattr(struct dentry *, char *, size_t);
-#define CIFS_VERSION   "1.18"
+#define CIFS_VERSION   "1.20"
 #endif				/* _CIFSFS_H */
--- diff/fs/cifs/cifsglob.h	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/cifsglob.h	2004-07-01 21:32:47.000000000 +0100
@@ -211,6 +211,8 @@
 	atomic_t num_deletes;
 	atomic_t num_mkdirs;
 	atomic_t num_rmdirs;
+	atomic_t num_renames;
+	atomic_t num_t2renames;
 	__u64    bytes_read;
 	__u64    bytes_written;
 	spinlock_t stat_lock;
--- diff/fs/cifs/cifsproto.h	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/cifsproto.h	2004-07-01 21:32:47.000000000 +0100
@@ -63,10 +63,10 @@
 extern int cifs_get_inode_info(struct inode **pinode,
 			const unsigned char *search_path, 
 			FILE_ALL_INFO * pfile_info,
-			struct super_block *sb);
+			struct super_block *sb, int xid);
 extern int cifs_get_inode_info_unix(struct inode **pinode,
 			const unsigned char *search_path,
-			struct super_block *sb);
+			struct super_block *sb,int xid);
 
 extern int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo, 
 			struct nls_table * nls_info);
--- diff/fs/cifs/cifssmb.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/cifssmb.c	2004-07-01 21:32:47.000000000 +0100
@@ -315,8 +315,6 @@
 		return 0;  
 	}
 
-/* BB remove (from server) list of shares - but with smp safety  BB */
-/* BB is ses active - do we need to check here - but how? BB */
 	if((tcon->ses == 0) || (tcon->ses->server == 0)) {    
 		up(&tcon->tconSem);
 		return -EIO;
@@ -387,6 +385,7 @@
 			spin_lock(&GlobalMid_Lock);
 			ses->server->tcpStatus = CifsExiting;
 			spin_unlock(&GlobalMid_Lock);
+			rc = -ESHUTDOWN;
 		}
 	}
 	if (pSMB)
@@ -819,14 +818,20 @@
 	pSMB->AndXCommand = 0xFF;	/* none */
 	pSMB->Fid = smb_file_id; /* netfid stays le */
 
-	pSMB->Locks[0].Pid = cpu_to_le16(current->tgid);
-	temp = cpu_to_le64(len);
-	pSMB->Locks[0].LengthLow = (__u32)(len & 0xFFFFFFFF);
-	pSMB->Locks[0].LengthHigh =  (__u32)(len>>32);
-	temp = cpu_to_le64(offset);
-	pSMB->Locks[0].OffsetLow = (__u32)(offset & 0xFFFFFFFF);
-	pSMB->Locks[0].OffsetHigh = (__u32)(offset>>32);
-	pSMB->ByteCount = sizeof (LOCKING_ANDX_RANGE);
+	if(numLock != 0) {
+		pSMB->Locks[0].Pid = cpu_to_le16(current->tgid);
+		/* BB where to store pid high? */
+		temp = cpu_to_le64(len);
+		pSMB->Locks[0].LengthLow = (__u32)(temp & 0xFFFFFFFF);
+		pSMB->Locks[0].LengthHigh =  (__u32)(temp>>32);
+		temp = cpu_to_le64(offset);
+		pSMB->Locks[0].OffsetLow = (__u32)(temp & 0xFFFFFFFF);
+		pSMB->Locks[0].OffsetHigh = (__u32)(temp>>32);
+		pSMB->ByteCount = sizeof (LOCKING_ANDX_RANGE);
+	} else {
+		/* oplock break */
+		pSMB->ByteCount = 0;
+	}
 	pSMB->hdr.smb_buf_length += pSMB->ByteCount;
 	pSMB->ByteCount = cpu_to_le16(pSMB->ByteCount);
 
@@ -941,7 +946,14 @@
 			 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
 	if (rc) {
 		cFYI(1, ("Send error in rename = %d", rc));
+	} 
+
+#ifdef CONFIG_CIFS_STATS
+	  else {
+		atomic_inc(&tcon->num_renames);
 	}
+#endif
+
 	if (pSMB)
 		cifs_buf_release(pSMB);
 
@@ -1017,7 +1029,11 @@
 	if (rc) {
 		cFYI(1,("Send error in Rename (by file handle) = %d", rc));
 	}
-
+#ifdef CONFIG_CIFS_STATS
+	  else {
+		atomic_inc(&pTcon->num_t2renames);
+	}
+#endif
 	if (pSMB)
 		cifs_buf_release(pSMB);
 
--- diff/fs/cifs/connect.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/connect.c	2004-07-01 21:32:47.000000000 +0100
@@ -175,7 +175,7 @@
 			if(server->tcpStatus != CifsExiting)
 				server->tcpStatus = CifsGood;
 			spin_unlock(&GlobalMid_Lock);
-			atomic_set(&server->inFlight,0);
+	/*		atomic_set(&server->inFlight,0);*/
 			wake_up(&server->response_q);
 		}
 	}
@@ -253,13 +253,12 @@
 				/* some servers kill tcp session rather than returning
 					smb negprot error in which case reconnecting here is
 					not going to help - return error to mount */
-				spin_lock(&GlobalMid_Lock);
-				server->tcpStatus = CifsExiting;
-				spin_unlock(&GlobalMid_Lock);
-				wake_up(&server->response_q);
 				break;
 			}
-
+			if(length == -EINTR) { 
+				cFYI(1,("cifsd thread killed"));
+				break;
+			}
 			cFYI(1,("Reconnecting after unexpected peek error %d",length));
 			cifs_reconnect(server);
 			csocket = server->ssocket;
@@ -292,11 +291,6 @@
 					/* if nack on negprot (rather than 
 					ret of smb negprot error) reconnecting
 					not going to help, ret error to mount */
-					spin_lock(&GlobalMid_Lock);
-					server->tcpStatus = CifsExiting;
-					spin_unlock(&GlobalMid_Lock);
-					/* wake up thread doing negprot */
-					wake_up(&server->response_q);
 					break;
 				} else {
 					/* give server a second to
@@ -407,15 +401,19 @@
 	}
 	spin_lock(&GlobalMid_Lock);
 	server->tcpStatus = CifsExiting;
-	spin_unlock(&GlobalMid_Lock);
+	server->tsk = NULL;
 	atomic_set(&server->inFlight, 0);
+	spin_unlock(&GlobalMid_Lock);
 	/* Although there should not be any requests blocked on 
 	this queue it can not hurt to be paranoid and try to wake up requests
 	that may haven been blocked when more than 50 at time were on the wire 
 	to the same server - they now will see the session is in exit state
 	and get out of SendReceive.  */
-	wake_up_all(&server->request_q);   
-	server->tsk = NULL;
+	wake_up_all(&server->request_q);
+	/* give those requests time to exit */
+	set_current_state(TASK_INTERRUPTIBLE);
+	schedule_timeout(HZ/8);
+
 	if(server->ssocket) {
 		sock_release(csocket);
 		server->ssocket = NULL;
@@ -453,7 +451,7 @@
 		spin_unlock(&GlobalMid_Lock);
 		read_unlock(&GlobalSMBSeslock);
 		set_current_state(TASK_INTERRUPTIBLE);
-		/* 1/8th of sec should be more than enough time for them to exit */
+		/* 1/8th of sec is more than enough time for them to exit */
 		schedule_timeout(HZ/8); 
 	}
 
@@ -468,7 +466,8 @@
 	}
 	kfree(server);
 
-	cFYI(1, ("About to exit from demultiplex thread"));
+	set_current_state(TASK_INTERRUPTIBLE);
+	schedule_timeout(HZ/4);
 	return 0;
 }
 
@@ -1357,31 +1356,37 @@
 			}
 		}
 	}
-	if (pSesInfo->capabilities & CAP_LARGE_FILES) {
-		cFYI(0, ("Large files supported "));
-		sb->s_maxbytes = (u64) 1 << 63;
-	} else
-		sb->s_maxbytes = (u64) 1 << 31;	/* 2 GB */
+	if(pSesInfo) {
+		if (pSesInfo->capabilities & CAP_LARGE_FILES) {
+			sb->s_maxbytes = (u64) 1 << 63;
+		} else
+			sb->s_maxbytes = (u64) 1 << 31;	/* 2 GB */
+	}
 
 /* on error free sesinfo and tcon struct if needed */
 	if (rc) {
+		/* if session setup failed, use count is zero but
+		we still need to free cifsd thread */
 		if(atomic_read(&srvTcp->socketUseCount) == 0) {
 			spin_lock(&GlobalMid_Lock);
 			srvTcp->tcpStatus = CifsExiting;
 			spin_unlock(&GlobalMid_Lock);
+			if(srvTcp->tsk)
+				send_sig(SIGKILL,srvTcp->tsk,1);
 		}
 		 /* If find_unc succeeded then rc == 0 so we can not end */
-		if (tcon)  /* up here accidently freeing someone elses tcon struct */
+		if (tcon)  /* up accidently freeing someone elses tcon struct */
 			tconInfoFree(tcon);
 		if (existingCifsSes == 0) {
 			if (pSesInfo) {
-				if (pSesInfo->server) {
-					if (pSesInfo->Suid)
-						CIFSSMBLogoff(xid, pSesInfo);
-					if(pSesInfo->server->tsk)
+				if ((pSesInfo->server) && 
+				    (pSesInfo->status == CifsGood)) {
+					int temp_rc;
+					temp_rc = CIFSSMBLogoff(xid, pSesInfo);
+					/* if the socketUseCount is now zero */
+					if((temp_rc == -ESHUTDOWN) &&
+					   (pSesInfo->server->tsk))
 						send_sig(SIGKILL,pSesInfo->server->tsk,1);
-					set_current_state(TASK_INTERRUPTIBLE);
-					schedule_timeout(HZ / 4);	/* give captive thread time to exit */
 				} else
 					cFYI(1, ("No session or bad tcon"));
 				sesInfoFree(pSesInfo);
@@ -2769,6 +2774,7 @@
 	int rc = 0;
 	int xid;
 	struct cifsSesInfo *ses = NULL;
+	struct task_struct *cifsd_task;
 
 	xid = GetXid();
 
@@ -2781,19 +2787,19 @@
 		}
 		tconInfoFree(cifs_sb->tcon);
 		if ((ses) && (ses->server)) {
+			/* save off task so we do not refer to ses later */
+			cifsd_task = ses->server->tsk;
 			cFYI(1, ("About to do SMBLogoff "));
 			rc = CIFSSMBLogoff(xid, ses);
 			if (rc == -EBUSY) {
 				FreeXid(xid);
 				return 0;
-			}
- 
-			set_current_state(TASK_INTERRUPTIBLE);
-			schedule_timeout(HZ / 4);	/* give captive thread time to exit */
-			if((ses->server) && (ses->server->ssocket)) {            
-				cFYI(1,("Waking up socket by sending it signal "));
-				send_sig(SIGKILL,ses->server->tsk,1);
-			}
+			} else if (rc == -ESHUTDOWN) {
+				cFYI(1,("Waking up socket by sending it signal"));
+				send_sig(SIGKILL,cifsd_task,1);
+				rc = 0;
+			} /* else - we have an smb session
+				left on this socket do not kill cifsd */
 		} else
 			cFYI(1, ("No session or bad tcon"));
 	}
--- diff/fs/cifs/dir.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/dir.c	2004-07-01 21:32:47.000000000 +0100
@@ -233,10 +233,10 @@
 	/* BB server might mask mode so we have to query for Unix case*/
 		if (pTcon->ses->capabilities & CAP_UNIX)
 			rc = cifs_get_inode_info_unix(&newinode, full_path,
-						 inode->i_sb);
+						 inode->i_sb,xid);
 		else {
 			rc = cifs_get_inode_info(&newinode, full_path,
-						 buf, inode->i_sb);
+						 buf, inode->i_sb,xid);
 			if(newinode)
 				newinode->i_mode = mode;
 		}
@@ -329,7 +329,7 @@
 			device_number, cifs_sb->local_nls);
 		if(!rc) {
 			rc = cifs_get_inode_info_unix(&newinode, full_path,
-						inode->i_sb);
+						inode->i_sb,xid);
 			direntry->d_op = &cifs_dentry_ops;
 			if(rc == 0)
 				d_instantiate(direntry, newinode);
@@ -389,10 +389,10 @@
 
 	if (pTcon->ses->capabilities & CAP_UNIX)
 		rc = cifs_get_inode_info_unix(&newInode, full_path,
-					      parent_dir_inode->i_sb);
+					      parent_dir_inode->i_sb,xid);
 	else
 		rc = cifs_get_inode_info(&newInode, full_path, NULL,
-					 parent_dir_inode->i_sb);
+					 parent_dir_inode->i_sb,xid);
 
 	if ((rc == 0) && (newInode != NULL)) {
 		direntry->d_op = &cifs_dentry_ops;
--- diff/fs/cifs/file.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/file.c	2004-07-01 21:32:47.000000000 +0100
@@ -215,10 +215,10 @@
 				}
 				if (pTcon->ses->capabilities & CAP_UNIX)
 					rc = cifs_get_inode_info_unix(&file->f_dentry->d_inode,
-						full_path, inode->i_sb);
+						full_path, inode->i_sb,xid);
 				else
 					rc = cifs_get_inode_info(&file->f_dentry->d_inode,
-						full_path, buf, inode->i_sb);
+						full_path, buf, inode->i_sb,xid);
 
 				if((oplock & 0xF) == OPLOCK_EXCLUSIVE) {
 					pCifsInode->clientCanCacheAll = TRUE;
@@ -367,10 +367,10 @@
 				pCifsInode->clientCanCacheRead = FALSE;
 				if (pTcon->ses->capabilities & CAP_UNIX)
 					rc = cifs_get_inode_info_unix(&inode,
-						full_path, inode->i_sb);
+						full_path, inode->i_sb,xid);
 				else
 					rc = cifs_get_inode_info(&inode,
-						full_path, NULL, inode->i_sb);
+						full_path, NULL, inode->i_sb,xid);
 			} /* else we are writing out data to server already
 			and could deadlock if we tried to flush data, and 
 			since we do not know if we have data that would
@@ -588,9 +588,10 @@
 	if(file->f_dentry == NULL)
 		return -EBADF;
 
-	xid = GetXid();
-
 	cifs_sb = CIFS_SB(file->f_dentry->d_sb);
+	if(cifs_sb == NULL) {
+		return -EBADF;
+	}
 	pTcon = cifs_sb->tcon;
 
 	/*cFYI(1,
@@ -598,11 +599,12 @@
 	   *poffset, file->f_dentry->d_name.name)); */
 
 	if (file->private_data == NULL) {
-		FreeXid(xid);
 		return -EBADF;
+	} else {
+		open_file = (struct cifsFileInfo *) file->private_data;
 	}
-	open_file = (struct cifsFileInfo *) file->private_data;
-
+	
+	xid = GetXid();
 	if(file->f_dentry->d_inode == NULL) {
 		FreeXid(xid);
 		return -EBADF;
@@ -620,10 +622,21 @@
 			if(file->private_data == NULL) {
 				/* file has been closed on us */
 				FreeXid(xid);
+			/* if we have gotten here we have written some data
+			and blocked, and the file has been freed on us
+			while we blocked so return what we managed to write */
 				return total_written;
+			} 
+			if(open_file->closePend) {
+				FreeXid(xid);
+				if(total_written)
+					return total_written;
+				else
+					return -EBADF;
 			}
-			if ((open_file->invalidHandle) && (!open_file->closePend)) {
-				if((file->f_dentry == NULL) || (file->f_dentry->d_inode == NULL)) {
+			if (open_file->invalidHandle) {
+				if((file->f_dentry == NULL) ||
+				   (file->f_dentry->d_inode == NULL)) {
 					FreeXid(xid);
 					return total_written;
 				}
@@ -1521,6 +1534,7 @@
 			if(*ptmp_inode == NULL)
 				return;
 			d_instantiate(tmp_dentry, *ptmp_inode);
+			insert_inode_hash(*ptmp_inode);
 		}
 	} else {
 		tmp_dentry = d_alloc(file->f_dentry, qstring);
@@ -1532,12 +1546,11 @@
 			
 		*ptmp_inode = new_inode(file->f_dentry->d_sb);
 		tmp_dentry->d_op = &cifs_dentry_ops;
-		cFYI(0, (" instantiate dentry 0x%p with inode 0x%p ",
-			 tmp_dentry, *ptmp_inode));
 		if(*ptmp_inode == NULL)
 			return;
 		d_instantiate(tmp_dentry, *ptmp_inode);
 		d_rehash(tmp_dentry);
+		insert_inode_hash(*ptmp_inode);
 	}
 
 	tmp_dentry->d_time = jiffies;
@@ -2123,6 +2136,7 @@
 	.writepage = cifs_writepage,
 	.prepare_write = cifs_prepare_write, 
 	.commit_write = cifs_commit_write,
+	.set_page_dirty = __set_page_dirty_nobuffers,
    /* .sync_page = cifs_sync_page, */
 	/*.direct_IO = */
 };
--- diff/fs/cifs/inode.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -35,9 +35,8 @@
 int
 cifs_get_inode_info_unix(struct inode **pinode,
 			 const unsigned char *search_path,
-			 struct super_block *sb)
+			 struct super_block *sb,int xid)
 {
-	int xid;
 	int rc = 0;
 	FILE_UNIX_BASIC_INFO findData;
 	struct cifsTconInfo *pTcon;
@@ -45,8 +44,6 @@
 	struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
 	char *tmp_path;
 
-	xid = GetXid();
-
 	pTcon = cifs_sb->tcon;
 	cFYI(1, (" Getting info on %s ", search_path));
 	/* we could have done a find first instead but this returns more info */
@@ -62,7 +59,6 @@
 				    strnlen(search_path, MAX_PATHCONF) + 1,
 				    GFP_KERNEL);
 			if (tmp_path == NULL) {
-				FreeXid(xid);
 				return -ENOMEM;
 			}
         /* have to skip first of the double backslash of UNC name */
@@ -75,7 +71,6 @@
 
 			/* BB fix up inode etc. */
 		} else if (rc) {
-			FreeXid(xid);
 			return rc;
 		}
 
@@ -85,9 +80,12 @@
 		/* get new inode */
 		if (*pinode == NULL) {
 			*pinode = new_inode(sb);
+			if(*pinode == NULL) 
+				return -ENOMEM;
+			insert_inode_hash(*pinode);
 		}
+			
 		inode = *pinode;
-
 		cifsInfo = CIFS_I(inode);
 
 		cFYI(1, (" Old time %ld ", cifsInfo->time));
@@ -172,15 +170,13 @@
 					   inode->i_rdev);
 		}
 	}
-	FreeXid(xid);
 	return rc;
 }
 
 int
 cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path, 
-		FILE_ALL_INFO * pfindData, struct super_block *sb)
+		FILE_ALL_INFO * pfindData, struct super_block *sb, int xid)
 {
-	int xid;
 	int rc = 0;
 	struct cifsTconInfo *pTcon;
 	struct inode *inode;
@@ -188,15 +184,12 @@
 	char *tmp_path;
 	char *buf = NULL;
 
-	xid = GetXid();
-
 	pTcon = cifs_sb->tcon;
 	cFYI(1,("Getting info on %s ", search_path));
 
 	if((pfindData == NULL) && (*pinode != NULL)) {
 		if(CIFS_I(*pinode)->clientCanCacheRead) {
 			cFYI(1,("No need to revalidate inode sizes on cached file "));
-			FreeXid(xid);
 			return rc;
 		}
 	}
@@ -221,7 +214,6 @@
 			if (tmp_path == NULL) {
 				if(buf)
 					kfree(buf);
-				FreeXid(xid);
 				return -ENOMEM;
 			}
 
@@ -235,7 +227,6 @@
 		} else if (rc) {
 			if(buf)
 				kfree(buf);
-			FreeXid(xid);
 			return rc;
 		}
 	} else {
@@ -244,8 +235,10 @@
 		/* get new inode */
 		if (*pinode == NULL) {
 			*pinode = new_inode(sb);
+			if(*pinode == NULL)
+				return -ENOMEM;
+			insert_inode_hash(*pinode);
 		}
-
 		inode = *pinode;
 		cifsInfo = CIFS_I(inode);
 		pfindData->Attributes = le32_to_cpu(pfindData->Attributes);
@@ -332,22 +325,23 @@
 	}
 	if(buf)
 	    kfree(buf);
-	FreeXid(xid);
 	return rc;
 }
 
 void
 cifs_read_inode(struct inode *inode)
 {				/* gets root inode */
-
+	int xid;
 	struct cifs_sb_info *cifs_sb;
 
 	cifs_sb = CIFS_SB(inode->i_sb);
-
+	xid = GetXid();
 	if (cifs_sb->tcon->ses->capabilities & CAP_UNIX)
-		cifs_get_inode_info_unix(&inode, "", inode->i_sb);
+		cifs_get_inode_info_unix(&inode, "", inode->i_sb,xid);
 	else
-		cifs_get_inode_info(&inode, "", NULL, inode->i_sb);
+		cifs_get_inode_info(&inode, "", NULL, inode->i_sb,xid);
+	/* can not call macro FreeXid here since in a void func */
+	_FreeXid(xid);
 }
 
 int
@@ -473,10 +467,10 @@
 		inode->i_nlink++;
 		if (pTcon->ses->capabilities & CAP_UNIX)
 			rc = cifs_get_inode_info_unix(&newinode, full_path,
-						      inode->i_sb);
+						      inode->i_sb,xid);
 		else
 			rc = cifs_get_inode_info(&newinode, full_path,NULL,
-						 inode->i_sb);
+						 inode->i_sb,xid);
 
 		direntry->d_op = &cifs_dentry_ops;
 		d_instantiate(direntry, newinode);
@@ -698,7 +692,7 @@
 
 	if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) {
 		rc = cifs_get_inode_info_unix(&direntry->d_inode, full_path,
-					 direntry->d_sb);
+					 direntry->d_sb,xid);
 		if(rc) {
 			cFYI(1,("error on getting revalidate info %d",rc));
 /*			if(rc != -ENOENT)
@@ -706,7 +700,7 @@
 		}
 	} else {
 		rc = cifs_get_inode_info(&direntry->d_inode, full_path, NULL,
-				    direntry->d_sb);
+				    direntry->d_sb,xid);
 		if(rc) {
 			cFYI(1,("error on getting revalidate info %d",rc));
 /*			if(rc != -ENOENT)
@@ -954,7 +948,8 @@
 	}
 
 	/* do not  need local check to inode_check_ok since the server does that */
-	inode_setattr(direntry->d_inode, attrs);
+	if (!rc)
+		rc = inode_setattr(direntry->d_inode, attrs);
 	if (full_path)
 		kfree(full_path);
 	FreeXid(xid);
--- diff/fs/cifs/link.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/link.c	2004-07-01 21:32:48.000000000 +0100
@@ -188,10 +188,10 @@
 	if (rc == 0) {
 		if (pTcon->ses->capabilities & CAP_UNIX)
 			rc = cifs_get_inode_info_unix(&newinode, full_path,
-						      inode->i_sb);
+						      inode->i_sb,xid);
 		else
 			rc = cifs_get_inode_info(&newinode, full_path, NULL,
-						 inode->i_sb);
+						 inode->i_sb,xid);
 
 		if (rc != 0) {
 			cFYI(1,
--- diff/fs/cifs/transport.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/cifs/transport.c	2004-07-01 21:32:48.000000000 +0100
@@ -200,23 +200,41 @@
 	}
 
 	/* Ensure that we do not send more than 50 overlapping requests 
-		to the same server. We may make this configurable later or
-		use ses->maxReq */
-
-	/* can not count locking commands against the total since
-		they are allowed to block on server */
-	if(long_op < 3) {
-		/* update # of requests on the wire to this server */
-		atomic_inc(&ses->server->inFlight); 
-	}
- 
-	if(atomic_read(&ses->server->inFlight) > CIFS_MAX_REQ) {
-		wait_event(ses->server->request_q,atomic_read(&ses->server->inFlight) <= CIFS_MAX_REQ);
+	   to the same server. We may make this configurable later or
+	   use ses->maxReq */
+	if(long_op == -1) {
+		/* oplock breaks must not be held up */
+		atomic_inc(&ses->server->inFlight);
+	} else {
+		spin_lock(&GlobalMid_Lock); 
+		while(1) {        
+			if(atomic_read(&ses->server->inFlight) >= CIFS_MAX_REQ){
+				spin_unlock(&GlobalMid_Lock);
+				wait_event(ses->server->request_q,
+					atomic_read(&ses->server->inFlight)
+					 < CIFS_MAX_REQ);
+				spin_lock(&GlobalMid_Lock);
+			} else {
+				if(ses->server->tcpStatus == CifsExiting) {
+					spin_unlock(&GlobalMid_Lock);
+					return -ENOENT;
+				}
+
+			/* can not count locking commands against total since
+			   they are allowed to block on server */
+					
+				if(long_op < 3) {
+				/* update # of requests on the wire to server */
+					atomic_inc(&ses->server->inFlight);
+				}
+				spin_unlock(&GlobalMid_Lock);
+				break;
+			}
+		}
 	}
-
 	/* make sure that we sign in the same order that we send on this socket 
-		and avoid races inside tcp sendmsg code that could cause corruption
-		of smb data */
+	   and avoid races inside tcp sendmsg code that could cause corruption
+	   of smb data */
 
 	down(&ses->server->tcpSem); 
 
--- diff/fs/coda/cnode.c	2004-05-19 22:12:25.000000000 +0100
+++ source/fs/coda/cnode.c	2004-07-01 21:32:48.000000000 +0100
@@ -17,8 +17,9 @@
 }
 
 static struct inode_operations coda_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.setattr	= coda_setattr,
 };
 
--- diff/fs/compat.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/compat.c	2004-07-01 21:32:48.000000000 +0100
@@ -34,6 +34,7 @@
 #include <linux/syscalls.h>
 #include <linux/ctype.h>
 #include <linux/module.h>
+#include <linux/dirent.h>
 #include <linux/dnotify.h>
 #include <linux/highuid.h>
 #include <linux/sunrpc/svc.h>
@@ -797,6 +798,260 @@
 	return retval;
 }
 
+#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
+#define COMPAT_ROUND_UP(x) (((x)+sizeof(compat_long_t)-1) & \
+				~(sizeof(compat_long_t)-1))
+
+struct compat_old_linux_dirent {
+	compat_ulong_t	d_ino;
+	compat_ulong_t	d_offset;
+	unsigned short	d_namlen;
+	char		d_name[1];
+};
+
+struct compat_readdir_callback {
+	struct compat_old_linux_dirent __user *dirent;
+	int result;
+};
+
+static int compat_fillonedir(void *__buf, const char *name, int namlen,
+			loff_t offset, ino_t ino, unsigned int d_type)
+{
+	struct compat_readdir_callback *buf = __buf;
+	struct compat_old_linux_dirent __user *dirent;
+
+	if (buf->result)
+		return -EINVAL;
+	buf->result++;
+	dirent = buf->dirent;
+	if (!access_ok(VERIFY_WRITE, (unsigned long)dirent,
+			(unsigned long)(dirent->d_name + namlen + 1) -
+				(unsigned long)dirent))
+		goto efault;
+	if (	__put_user(ino, &dirent->d_ino) ||
+		__put_user(offset, &dirent->d_offset) ||
+		__put_user(namlen, &dirent->d_namlen) ||
+		__copy_to_user(dirent->d_name, name, namlen) ||
+		__put_user(0, dirent->d_name + namlen))
+		goto efault;
+	return 0;
+efault:
+	buf->result = -EFAULT;
+	return -EFAULT;
+}
+
+asmlinkage long compat_old_readdir(unsigned int fd,
+	struct compat_old_linux_dirent __user *dirent, unsigned int count)
+{
+	int error;
+	struct file *file;
+	struct compat_readdir_callback buf;
+
+	error = -EBADF;
+	file = fget(fd);
+	if (!file)
+		goto out;
+
+	buf.result = 0;
+	buf.dirent = dirent;
+
+	error = vfs_readdir(file, compat_fillonedir, &buf);
+	if (error >= 0)
+		error = buf.result;
+
+	fput(file);
+out:
+	return error;
+}
+
+struct compat_linux_dirent {
+	compat_ulong_t	d_ino;
+	compat_ulong_t	d_off;
+	unsigned short	d_reclen;
+	char		d_name[1];
+};
+
+struct compat_getdents_callback {
+	struct compat_linux_dirent __user *current_dir;
+	struct compat_linux_dirent __user *previous;
+	int count;
+	int error;
+};
+
+static int compat_filldir(void *__buf, const char *name, int namlen,
+		loff_t offset, ino_t ino, unsigned int d_type)
+{
+	struct compat_linux_dirent __user * dirent;
+	struct compat_getdents_callback *buf = __buf;
+	int reclen = COMPAT_ROUND_UP(NAME_OFFSET(dirent) + namlen + 2);
+
+	buf->error = -EINVAL;	/* only used if we fail.. */
+	if (reclen > buf->count)
+		return -EINVAL;
+	dirent = buf->previous;
+	if (dirent) {
+		if (__put_user(offset, &dirent->d_off))
+			goto efault;
+	}
+	dirent = buf->current_dir;
+	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;
+	if (__put_user(d_type, (char  __user *) dirent + reclen - 1))
+		goto efault;
+	buf->previous = dirent;
+	dirent = (void __user *)dirent + reclen;
+	buf->current_dir = dirent;
+	buf->count -= reclen;
+	return 0;
+efault:
+	buf->error = -EFAULT;
+	return -EFAULT;
+}
+
+asmlinkage long compat_sys_getdents(unsigned int fd,
+		struct compat_linux_dirent __user *dirent, unsigned int count)
+{
+	struct file * file;
+	struct compat_linux_dirent __user * lastdirent;
+	struct compat_getdents_callback buf;
+	int error;
+
+	error = -EFAULT;
+	if (!access_ok(VERIFY_WRITE, dirent, count))
+		goto out;
+
+	error = -EBADF;
+	file = fget(fd);
+	if (!file)
+		goto out;
+
+	buf.current_dir = dirent;
+	buf.previous = NULL;
+	buf.count = count;
+	buf.error = 0;
+
+	error = vfs_readdir(file, compat_filldir, &buf);
+	if (error < 0)
+		goto out_putf;
+	error = buf.error;
+	lastdirent = buf.previous;
+	if (lastdirent) {
+		if (put_user(file->f_pos, &lastdirent->d_off))
+			error = -EFAULT;
+		else
+			error = count - buf.count;
+	}
+
+out_putf:
+	fput(file);
+out:
+	return error;
+}
+
+#ifndef __ARCH_OMIT_COMPAT_SYS_GETDENTS64
+#define COMPAT_ROUND_UP64(x) (((x)+sizeof(u64)-1) & ~(sizeof(u64)-1))
+
+struct compat_getdents_callback64 {
+	struct linux_dirent64 __user *current_dir;
+	struct linux_dirent64 __user *previous;
+	int count;
+	int error;
+};
+
+static int compat_filldir64(void * __buf, const char * name, int namlen, loff_t offset,
+		     ino_t ino, unsigned int d_type)
+{
+	struct linux_dirent64 __user *dirent;
+	struct compat_getdents_callback64 *buf = __buf;
+	int jj = NAME_OFFSET(dirent);
+	int reclen = COMPAT_ROUND_UP64(jj + namlen + 1);
+	u64 off;
+
+	buf->error = -EINVAL;	/* only used if we fail.. */
+	if (reclen > buf->count)
+		return -EINVAL;
+	dirent = buf->previous;
+
+	if (dirent) {
+		if (__put_user(offset, (u32 __user *)&dirent->d_off))
+			goto efault;
+		if (__put_user(offset >> 32,
+				((u32 __user *)&dirent->d_off) + 1))
+			goto efault;
+	}
+	dirent = buf->current_dir;
+	if ((__put_user(ino, (u32 __user *)&dirent->d_ino))
+	 || (__put_user(ino >> 32, ((u32 __user *)&dirent->d_ino) + 1)))
+		goto efault;
+	off = 0;
+	if ((__put_user(off, (u32 __user *)&dirent->d_off))
+	 || (__put_user(off >> 32, ((u32 __user *)&dirent->d_off) + 1)))
+		goto efault;
+	if (__put_user(reclen, &dirent->d_reclen))
+		goto efault;
+	if (__put_user(d_type, &dirent->d_type))
+		goto efault;
+	if (copy_to_user(dirent->d_name, name, namlen))
+		goto efault;
+	if (__put_user(0, dirent->d_name + namlen))
+		goto efault;
+	buf->previous = dirent;
+	dirent = (void __user *)dirent + reclen;
+	buf->current_dir = dirent;
+	buf->count -= reclen;
+	return 0;
+efault:
+	buf->error = -EFAULT;
+	return -EFAULT;
+}
+
+asmlinkage long compat_sys_getdents64(unsigned int fd,
+		struct linux_dirent64 __user * dirent, unsigned int count)
+{
+	struct file * file;
+	struct linux_dirent64 __user * lastdirent;
+	struct compat_getdents_callback64 buf;
+	int error;
+
+	error = -EFAULT;
+	if (!access_ok(VERIFY_WRITE, dirent, count))
+		goto out;
+
+	error = -EBADF;
+	file = fget(fd);
+	if (!file)
+		goto out;
+
+	buf.current_dir = dirent;
+	buf.previous = NULL;
+	buf.count = count;
+	buf.error = 0;
+
+	error = vfs_readdir(file, compat_filldir64, &buf);
+	if (error < 0)
+		goto out_putf;
+	error = buf.error;
+	lastdirent = buf.previous;
+	if (lastdirent) {
+		typeof(lastdirent->d_off) d_off = file->f_pos;
+		__put_user(d_off, (u32 __user *)&lastdirent->d_off);
+		__put_user(d_off >> 32, ((u32 __user *)&lastdirent->d_off) + 1);
+		error = count - buf.count;
+	}
+
+out_putf:
+	fput(file);
+out:
+	return error;
+}
+#endif /* ! __ARCH_OMIT_COMPAT_SYS_GETDENTS64 */
+
 static ssize_t compat_do_readv_writev(int type, struct file *file,
 			       const struct compat_iovec __user *uvector,
 			       unsigned long nr_segs, loff_t *pos)
@@ -1118,14 +1373,14 @@
 	int retval;
 	int i;
 
-	sched_balance_exec();
-
 	file = open_exec(filename);
 
 	retval = PTR_ERR(file);
 	if (IS_ERR(file))
 		return retval;
 
+	sched_exec();
+
 	bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
 	memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0]));
 
--- diff/fs/compat_ioctl.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/compat_ioctl.c	2004-07-01 21:32:48.000000000 +0100
@@ -115,6 +115,8 @@
 #include <linux/filter.h>
 #include <linux/msdos_fs.h>
 
+#include <linux/hiddev.h>
+
 #undef INCLUDES
 #endif
 
--- diff/fs/dcache.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/dcache.c	2004-07-01 21:32:48.000000000 +0100
@@ -30,10 +30,12 @@
 #include <linux/security.h>
 #include <linux/seqlock.h>
 #include <linux/swap.h>
+#include <linux/bootmem.h>
 
-#define DCACHE_PARANOIA 1
 /* #define DCACHE_DEBUG 1 */
 
+int sysctl_vfs_cache_pressure = 100;
+
 spinlock_t dcache_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
 seqlock_t rename_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED;
 
@@ -64,9 +66,9 @@
 	.age_limit = 45,
 };
 
-static void d_callback(void *arg)
+static void d_callback(struct rcu_head *head)
 {
-	struct dentry * dentry = (struct dentry *)arg;
+	struct dentry * dentry = container_of(head, struct dentry, d_rcu);
 
 	if (dname_external(dentry))
 		kfree(dentry->d_name.name);
@@ -81,7 +83,7 @@
 {
 	if (dentry->d_op && dentry->d_op->d_release)
 		dentry->d_op->d_release(dentry);
- 	call_rcu(&dentry->d_rcu, d_callback, dentry);
+ 	call_rcu(&dentry->d_rcu, d_callback);
 }
 
 /*
@@ -663,7 +665,7 @@
 			return -1;
 		prune_dcache(nr);
 	}
-	return dentry_stat.nr_unused;
+	return (dentry_stat.nr_unused / 100) * sysctl_vfs_cache_pressure;
 }
 
 /**
@@ -1561,13 +1563,25 @@
 }
 __setup("dhash_entries=", set_dhash_entries);
 
-static void __init dcache_init(unsigned long mempages)
+static void __init dcache_init_early(void)
 {
-	struct hlist_head *d;
-	unsigned long order;
-	unsigned int nr_hash;
-	int i;
+	int loop;
+
+	dentry_hashtable =
+		alloc_large_system_hash("Dentry cache",
+					sizeof(struct hlist_head),
+					dhash_entries,
+					13,
+					0,
+					&d_hash_shift,
+					&d_hash_mask);
+
+	for (loop = 0; loop < (1 << d_hash_shift); loop++)
+		INIT_HLIST_HEAD(&dentry_hashtable[loop]);
+}
 
+static void __init dcache_init(unsigned long mempages)
+{
 	/* 
 	 * A constructor could be added for stable state like the lists,
 	 * but it is probably not worth it because of the cache nature
@@ -1580,45 +1594,6 @@
 					 NULL, NULL);
 	
 	set_shrinker(DEFAULT_SEEKS, shrink_dcache_memory);
-
-	if (!dhash_entries)
-		dhash_entries = PAGE_SHIFT < 13 ?
-				mempages >> (13 - PAGE_SHIFT) :
-				mempages << (PAGE_SHIFT - 13);
-
-	dhash_entries *= sizeof(struct hlist_head);
-	for (order = 0; ((1UL << order) << PAGE_SHIFT) < dhash_entries; order++)
-		;
-
-	do {
-		unsigned long tmp;
-
-		nr_hash = (1UL << order) * PAGE_SIZE /
-			sizeof(struct hlist_head);
-		d_hash_mask = (nr_hash - 1);
-
-		tmp = nr_hash;
-		d_hash_shift = 0;
-		while ((tmp >>= 1UL) != 0UL)
-			d_hash_shift++;
-
-		dentry_hashtable = (struct hlist_head *)
-			__get_free_pages(GFP_ATOMIC, order);
-	} while (dentry_hashtable == NULL && --order >= 0);
-
-	printk(KERN_INFO "Dentry cache hash table entries: %d (order: %ld, %ld bytes)\n",
-			nr_hash, order, (PAGE_SIZE << order));
-
-	if (!dentry_hashtable)
-		panic("Failed to allocate dcache hash table\n");
-
-	d = dentry_hashtable;
-	i = nr_hash;
-	do {
-		INIT_HLIST_HEAD(d);
-		d++;
-		i--;
-	} while (i);
 }
 
 /* SLAB cache for __getname() consumers */
@@ -1632,6 +1607,12 @@
 extern void bdev_cache_init(void);
 extern void chrdev_init(void);
 
+void __init vfs_caches_init_early(void)
+{
+	dcache_init_early();
+	inode_init_early();
+}
+
 void __init vfs_caches_init(unsigned long mempages)
 {
 	unsigned long reserve;
--- diff/fs/devfs/base.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/devfs/base.c	2004-07-01 21:32:48.000000000 +0100
@@ -2490,28 +2490,11 @@
 	return 0;
 }				/*  End Function devfs_mknod  */
 
-static int devfs_readlink(struct dentry *dentry, char *buffer, int buflen)
-{
-	int err;
-	struct devfs_entry *de;
-
-	de = get_devfs_entry_from_vfs_inode(dentry->d_inode);
-	if (!de)
-		return -ENODEV;
-	err = vfs_readlink(dentry, buffer, buflen, de->u.symlink.linkname);
-	return err;
-}				/*  End Function devfs_readlink  */
-
 static int devfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
-	int err;
-	struct devfs_entry *de;
-
-	de = get_devfs_entry_from_vfs_inode(dentry->d_inode);
-	if (!de)
-		return -ENODEV;
-	err = vfs_follow_link(nd, de->u.symlink.linkname);
-	return err;
+	struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode);
+	nd_set_link(nd, p ? p->u.symlink.linkname : ERR_PTR(-ENODEV));
+	return 0;
 }				/*  End Function devfs_follow_link  */
 
 static struct inode_operations devfs_iops = {
@@ -2529,7 +2512,7 @@
 };
 
 static struct inode_operations devfs_symlink_iops = {
-	.readlink = devfs_readlink,
+	.readlink = generic_readlink,
 	.follow_link = devfs_follow_link,
 	.setattr = devfs_notify_change,
 };
--- diff/fs/direct-io.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/direct-io.c	2004-07-01 21:32:48.000000000 +0100
@@ -395,7 +395,7 @@
 		for (page_no = 0; page_no < bio->bi_vcnt; page_no++) {
 			struct page *page = bvec[page_no].bv_page;
 
-			if (dio->rw == READ)
+			if (dio->rw == READ && !PageCompound(page))
 				set_page_dirty_lock(page);
 			page_cache_release(page);
 		}
@@ -990,6 +990,13 @@
 		}
 	} /* end iovec loop */
 
+	if (ret == -ENOTBLK && rw == WRITE) {
+		/*
+		 * The remaining part of the request will be
+		 * be handled by buffered I/O when we return
+		 */
+		ret = 0;
+	}
 	/*
 	 * There may be some unwritten disk at the end of a part-written
 	 * fs-block-sized block.  Go zero that now.
@@ -1089,13 +1096,6 @@
 			aio_complete(iocb, ret, 0);
 		kfree(dio);
 	}
-	if (ret == -ENOTBLK && rw == WRITE) {
-		/*
-		 * The entire request will be be handled by buffered I/O
-		 * when we return
-		 */
-		ret = 0;
-	}
 	return ret;
 }
 
--- diff/fs/dnotify.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/dnotify.c	2004-07-01 21:32:48.000000000 +0100
@@ -23,7 +23,6 @@
 
 int dir_notify_enable = 1;
 
-static rwlock_t dn_lock = RW_LOCK_UNLOCKED;
 static kmem_cache_t *dn_cache;
 
 static void redo_inode_mask(struct inode *inode)
@@ -46,7 +45,7 @@
 	inode = filp->f_dentry->d_inode;
 	if (!S_ISDIR(inode->i_mode))
 		return;
-	write_lock(&dn_lock);
+	spin_lock(&inode->i_lock);
 	prev = &inode->i_dnotify;
 	while ((dn = *prev) != NULL) {
 		if ((dn->dn_owner == id) && (dn->dn_filp == filp)) {
@@ -57,7 +56,7 @@
 		}
 		prev = &dn->dn_next;
 	}
-	write_unlock(&dn_lock);
+	spin_unlock(&inode->i_lock);
 }
 
 int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
@@ -81,7 +80,7 @@
 	dn = kmem_cache_alloc(dn_cache, SLAB_KERNEL);
 	if (dn == NULL)
 		return -ENOMEM;
-	write_lock(&dn_lock);
+	spin_lock(&inode->i_lock);
 	prev = &inode->i_dnotify;
 	while ((odn = *prev) != NULL) {
 		if ((odn->dn_owner == id) && (odn->dn_filp == filp)) {
@@ -104,12 +103,13 @@
 	inode->i_dnotify_mask |= arg & ~DN_MULTISHOT;
 	dn->dn_next = inode->i_dnotify;
 	inode->i_dnotify = dn;
-out:
-	write_unlock(&dn_lock);
-	return error;
+	spin_unlock(&inode->i_lock);
+	return 0;
+
 out_free:
+	spin_unlock(&inode->i_lock);
 	kmem_cache_free(dn_cache, dn);
-	goto out;
+	return error;
 }
 
 void __inode_dir_notify(struct inode *inode, unsigned long event)
@@ -119,7 +119,7 @@
 	struct fown_struct *	fown;
 	int			changed = 0;
 
-	write_lock(&dn_lock);
+	spin_lock(&inode->i_lock);
 	prev = &inode->i_dnotify;
 	while ((dn = *prev) != NULL) {
 		if ((dn->dn_mask & event) == 0) {
@@ -138,7 +138,7 @@
 	}
 	if (changed)
 		redo_inode_mask(inode);
-	write_unlock(&dn_lock);
+	spin_unlock(&inode->i_lock);
 }
 
 EXPORT_SYMBOL(__inode_dir_notify);
--- diff/fs/eventpoll.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/eventpoll.c	2004-07-01 21:32:48.000000000 +0100
@@ -29,6 +29,7 @@
 #include <linux/spinlock.h>
 #include <linux/syscalls.h>
 #include <linux/rwsem.h>
+#include <linux/rbtree.h>
 #include <linux/wait.h>
 #include <linux/eventpoll.h>
 #include <linux/mount.h>
@@ -100,22 +101,6 @@
 /* Maximum number of poll wake up nests we are allowing */
 #define EP_MAX_POLLWAKE_NESTS 4
 
-/* Maximum size of the hash in bits ( 2^N ) */
-#define EP_MAX_HASH_BITS 17
-
-/* Minimum size of the hash in bits ( 2^N ) */
-#define EP_MIN_HASH_BITS 9
-
-/* Number of hash entries ( "struct list_head" ) inside a page */
-#define EP_HENTRY_X_PAGE (PAGE_SIZE / sizeof(struct list_head))
-
-/* Maximum size of the hash in pages */
-#define EP_MAX_HPAGES ((1 << EP_MAX_HASH_BITS) / EP_HENTRY_X_PAGE + 1)
-
-/* Number of pages allocated for an "hbits" sized hash table */
-#define EP_HASH_PAGES(hbits) ((int) ((1 << (hbits)) / EP_HENTRY_X_PAGE + \
-				     ((1 << (hbits)) % EP_HENTRY_X_PAGE ? 1: 0)))
-
 /* Macro to allocate a "struct epitem" from the slab cache */
 #define EPI_MEM_ALLOC()	(struct epitem *) kmem_cache_alloc(epi_cache, SLAB_KERNEL)
 
@@ -131,6 +116,22 @@
 /* Fast test to see if the file is an evenpoll file */
 #define IS_FILE_EPOLL(f) ((f)->f_op == &eventpoll_fops)
 
+/* Setup the structure that is used as key for the rb-tree */
+#define EP_SET_FFD(p, f, d) do { (p)->file = (f); (p)->fd = (d); } while (0)
+
+/* Compare rb-tree keys */
+#define EP_CMP_FFD(p1, p2) ((p1)->file > (p2)->file ? +1: \
+			    ((p1)->file < (p2)->file ? -1: (p1)->fd - (p2)->fd))
+
+/* Special initialization for the rb-tree node to detect linkage */
+#define EP_RB_INITNODE(n) (n)->rb_parent = (n)
+
+/* Removes a node from the rb-tree and marks it for a fast is-linked check */
+#define EP_RB_ERASE(n, r) do { rb_erase(n, r); (n)->rb_parent = (n); } while (0)
+
+/* Fast check to verify that the item is linked to the main rb-tree */
+#define EP_RB_LINKED(n) ((n)->rb_parent != (n))
+
 /*
  * Remove the item from the list and perform its initialization.
  * This is useful for us because we can test if the item is linked
@@ -147,6 +148,12 @@
 /* Get the "struct epitem" from an epoll queue wrapper */
 #define EP_ITEM_FROM_EPQUEUE(p) (container_of(p, struct ep_pqueue, pt)->epi)
 
+
+struct epoll_filefd {
+	struct file *file;
+	int fd;
+};
+
 /*
  * Node that is linked into the "wake_task_list" member of the "struct poll_safewake".
  * It is used to keep track on all tasks that are currently inside the wake_up() code
@@ -195,11 +202,8 @@
 	/* List of ready file descriptors */
 	struct list_head rdllist;
 
-	/* Size of the hash */
-	unsigned int hashbits;
-
-	/* Pages for the "struct epitem" hash */
-	char *hpages[EP_MAX_HPAGES];
+	/* RB-Tree root used to store monitored fd structs */
+	struct rb_root rbr;
 };
 
 /* Wait structure used by the poll hooks */
@@ -225,14 +229,14 @@
  * have an entry of this type linked to the hash.
  */
 struct epitem {
-	/* List header used to link this structure to the eventpoll hash */
-	struct list_head llink;
+	/* RB-Tree node used to link this structure to the eventpoll rb-tree */
+	struct rb_node rbn;
 
 	/* List header used to link this structure to the eventpoll ready list */
 	struct list_head rdllink;
 
-	/* The file descriptor this item refers to */
-	int fd;
+	/* The file descriptor information this item refers to */
+	struct epoll_filefd ffd;
 
 	/* Number of active wait queue attached to poll operations */
 	int nwait;
@@ -243,9 +247,6 @@
 	/* The "container" of this item */
 	struct eventpoll *ep;
 
-	/* The file this item refers to */
-	struct file *file;
-
 	/* The structure that describe the interested events and the source fd */
 	struct epoll_event event;
 
@@ -278,22 +279,15 @@
 
 static void ep_poll_safewake_init(struct poll_safewake *psw);
 static void ep_poll_safewake(struct poll_safewake *psw, wait_queue_head_t *wq);
-static unsigned int ep_get_hash_bits(unsigned int hintsize);
 static int ep_getfd(int *efd, struct inode **einode, struct file **efile);
-static int ep_alloc_pages(char **pages, int numpages);
-static int ep_free_pages(char **pages, int numpages);
-static int ep_file_init(struct file *file, unsigned int hashbits);
-static unsigned int ep_hash_index(struct eventpoll *ep, struct file *file,
-				  int fd);
-static struct list_head *ep_hash_entry(struct eventpoll *ep,
-				       unsigned int index);
-static int ep_init(struct eventpoll *ep, unsigned int hashbits);
+static int ep_file_init(struct file *file);
 static void ep_free(struct eventpoll *ep);
 static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd);
 static void ep_use_epitem(struct epitem *epi);
 static void ep_release_epitem(struct epitem *epi);
 static void ep_ptable_queue_proc(struct file *file, wait_queue_head_t *whead,
 				 poll_table *pt);
+static void ep_rbtree_insert(struct eventpoll *ep, struct epitem *epi);
 static int ep_insert(struct eventpoll *ep, struct epoll_event *event,
 		     struct file *tfile, int fd);
 static int ep_modify(struct eventpoll *ep, struct epitem *epi,
@@ -424,19 +418,6 @@
 }
 
 
-/*
- * Calculate the size of the hash in bits. The returned size will be
- * bounded between EP_MIN_HASH_BITS and EP_MAX_HASH_BITS.
- */
-static unsigned int ep_get_hash_bits(unsigned int hintsize)
-{
-	unsigned int i, val;
-
-	for (i = 0, val = 1; val < hintsize && i < EP_MAX_HASH_BITS; i++, val <<= 1);
-	return i <  EP_MIN_HASH_BITS ?	EP_MIN_HASH_BITS: i;
-}
-
-
 /* Used to initialize the epoll bits inside the "struct file" */
 void eventpoll_init_file(struct file *file)
 {
@@ -492,7 +473,6 @@
 asmlinkage long sys_epoll_create(int size)
 {
 	int error, fd;
-	unsigned int hashbits;
 	struct inode *inode;
 	struct file *file;
 
@@ -504,9 +484,6 @@
 	if (size <= 0)
 		goto eexit_1;
 
-	/* Correctly size the hash */
-	hashbits = ep_get_hash_bits((unsigned int) size);
-
 	/*
 	 * Creates all the items needed to setup an eventpoll file. That is,
 	 * a file structure, and inode and a free file descriptor.
@@ -516,7 +493,7 @@
 		goto eexit_1;
 
 	/* Setup the file internal data structure ( "struct eventpoll" ) */
-	error = ep_file_init(file, hashbits);
+	error = ep_file_init(file);
 	if (error)
 		goto eexit_2;
 
@@ -768,114 +745,32 @@
 }
 
 
-static int ep_alloc_pages(char **pages, int numpages)
+static int ep_file_init(struct file *file)
 {
-	int i;
-
-	for (i = 0; i < numpages; i++) {
-		pages[i] = (char *) __get_free_pages(GFP_KERNEL, 0);
-		if (!pages[i]) {
-			for (--i; i >= 0; i--) {
-				ClearPageReserved(virt_to_page(pages[i]));
-				free_pages((unsigned long) pages[i], 0);
-			}
-			return -ENOMEM;
-		}
-		SetPageReserved(virt_to_page(pages[i]));
-	}
-	return 0;
-}
-
-
-static int ep_free_pages(char **pages, int numpages)
-{
-	int i;
-
-	for (i = 0; i < numpages; i++) {
-		ClearPageReserved(virt_to_page(pages[i]));
-		free_pages((unsigned long) pages[i], 0);
-	}
-	return 0;
-}
-
-
-static int ep_file_init(struct file *file, unsigned int hashbits)
-{
-	int error;
 	struct eventpoll *ep;
 
 	if (!(ep = kmalloc(sizeof(struct eventpoll), GFP_KERNEL)))
 		return -ENOMEM;
 
 	memset(ep, 0, sizeof(*ep));
-
-	error = ep_init(ep, hashbits);
-	if (error) {
-		kfree(ep);
-		return error;
-	}
-
-	file->private_data = ep;
-
-	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_file_init() ep=%p\n",
-		     current, ep));
-	return 0;
-}
-
-
-/*
- * Calculate the index of the hash relative to "file".
- */
-static unsigned int ep_hash_index(struct eventpoll *ep, struct file *file, int fd)
-{
-	unsigned long ptr = (unsigned long) file ^ (fd << ep->hashbits);
-
-	return (unsigned int) hash_ptr((void *) ptr, ep->hashbits);
-}
-
-
-/*
- * Returns the hash entry ( struct list_head * ) of the passed index.
- */
-static struct list_head *ep_hash_entry(struct eventpoll *ep, unsigned int index)
-{
-
-	return (struct list_head *) (ep->hpages[index / EP_HENTRY_X_PAGE] +
-				     (index % EP_HENTRY_X_PAGE) * sizeof(struct list_head));
-}
-
-
-static int ep_init(struct eventpoll *ep, unsigned int hashbits)
-{
-	int error;
-	unsigned int i, hsize;
-
 	rwlock_init(&ep->lock);
 	init_rwsem(&ep->sem);
 	init_waitqueue_head(&ep->wq);
 	init_waitqueue_head(&ep->poll_wait);
 	INIT_LIST_HEAD(&ep->rdllist);
+	ep->rbr = RB_ROOT;
 
-	/* Hash allocation and setup */
-	ep->hashbits = hashbits;
-	error = ep_alloc_pages(ep->hpages, EP_HASH_PAGES(ep->hashbits));
-	if (error)
-		goto eexit_1;
-
-	/* Initialize hash buckets */
-	for (i = 0, hsize = 1 << hashbits; i < hsize; i++)
-		INIT_LIST_HEAD(ep_hash_entry(ep, i));
+	file->private_data = ep;
 
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_file_init() ep=%p\n",
+		     current, ep));
 	return 0;
-eexit_1:
-	return error;
 }
 
 
 static void ep_free(struct eventpoll *ep)
 {
-	unsigned int i, hsize;
-	struct list_head *lsthead, *lnk;
+	struct rb_node *rbp;
 	struct epitem *epi;
 
 	/* We need to release all tasks waiting for these file */
@@ -893,16 +788,12 @@
 	down(&epsem);
 
 	/*
-	 * Walks through the whole hash by unregistering poll callbacks.
+	 * Walks through the whole tree by unregistering poll callbacks.
 	 */
-	for (i = 0, hsize = 1 << ep->hashbits; i < hsize; i++) {
-		lsthead = ep_hash_entry(ep, i);
+	for (rbp = rb_first(&ep->rbr); rbp; rbp = rb_next(rbp)) {
+		epi = rb_entry(rbp, struct epitem, rbn);
 
-		list_for_each(lnk, lsthead) {
-			epi = list_entry(lnk, struct epitem, llink);
-
-			ep_unregister_pollwait(ep, epi);
-		}
+		ep_unregister_pollwait(ep, epi);
 	}
 
 	/*
@@ -911,20 +802,12 @@
 	 * write-holding "sem" we can be sure that no file cleanup code will hit
 	 * us during this operation. So we can avoid the lock on "ep->lock".
 	 */
-	for (i = 0, hsize = 1 << ep->hashbits; i < hsize; i++) {
-		lsthead = ep_hash_entry(ep, i);
-
-		while (!list_empty(lsthead)) {
-			epi = list_entry(lsthead->next, struct epitem, llink);
-
-			ep_remove(ep, epi);
-		}
+	while ((rbp = rb_first(&ep->rbr)) != 0) {
+		epi = rb_entry(rbp, struct epitem, rbn);
+		ep_remove(ep, epi);
 	}
 
 	up(&epsem);
-
-	/* Free hash pages */
-	ep_free_pages(ep->hpages, EP_HASH_PAGES(ep->hashbits));
 }
 
 
@@ -935,29 +818,33 @@
  */
 static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd)
 {
+	int kcmp;
 	unsigned long flags;
-	struct list_head *lsthead, *lnk;
-	struct epitem *epi = NULL;
+	struct rb_node *rbp;
+	struct epitem *epi, *epir = NULL;
+	struct epoll_filefd ffd;
 
+	EP_SET_FFD(&ffd, file, fd);
 	read_lock_irqsave(&ep->lock, flags);
-
-	lsthead = ep_hash_entry(ep, ep_hash_index(ep, file, fd));
-	list_for_each(lnk, lsthead) {
-		epi = list_entry(lnk, struct epitem, llink);
-
-		if (epi->file == file && epi->fd == fd) {
+	for (rbp = ep->rbr.rb_node; rbp; ) {
+		epi = rb_entry(rbp, struct epitem, rbn);
+		kcmp = EP_CMP_FFD(&ffd, &epi->ffd);
+		if (kcmp > 0)
+			rbp = rbp->rb_right;
+		else if (kcmp < 0)
+			rbp = rbp->rb_left;
+		else {
 			ep_use_epitem(epi);
+			epir = epi;
 			break;
 		}
-		epi = NULL;
 	}
-
 	read_unlock_irqrestore(&ep->lock, flags);
 
 	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_find(%p) -> %p\n",
-		     current, file, epi));
+		     current, file, epir));
 
-	return epi;
+	return epir;
 }
 
 
@@ -1009,6 +896,26 @@
 }
 
 
+static void ep_rbtree_insert(struct eventpoll *ep, struct epitem *epi)
+{
+	int kcmp;
+	struct rb_node **p = &ep->rbr.rb_node, *parent = NULL;
+	struct epitem *epic;
+
+	while (*p) {
+		parent = *p;
+		epic = rb_entry(parent, struct epitem, rbn);
+		kcmp = EP_CMP_FFD(&epi->ffd, &epic->ffd);
+		if (kcmp > 0)
+			p = &parent->rb_right;
+		else
+			p = &parent->rb_left;
+	}
+	rb_link_node(&epi->rbn, parent, p);
+	rb_insert_color(&epi->rbn, &ep->rbr);
+}
+
+
 static int ep_insert(struct eventpoll *ep, struct epoll_event *event,
 		     struct file *tfile, int fd)
 {
@@ -1022,14 +929,13 @@
 		goto eexit_1;
 
 	/* Item initialization follow here ... */
-	INIT_LIST_HEAD(&epi->llink);
+	EP_RB_INITNODE(&epi->rbn);
 	INIT_LIST_HEAD(&epi->rdllink);
 	INIT_LIST_HEAD(&epi->fllink);
 	INIT_LIST_HEAD(&epi->txlink);
 	INIT_LIST_HEAD(&epi->pwqlist);
 	epi->ep = ep;
-	epi->file = tfile;
-	epi->fd = fd;
+	EP_SET_FFD(&epi->ffd, tfile, fd);
 	epi->event = *event;
 	atomic_set(&epi->usecnt, 1);
 	epi->nwait = 0;
@@ -1061,8 +967,8 @@
 	/* We have to drop the new item inside our item list to keep track of it */
 	write_lock_irqsave(&ep->lock, flags);
 
-	/* Add the current item to the hash table */
-	list_add(&epi->llink, ep_hash_entry(ep, ep_hash_index(ep, tfile, fd)));
+	/* Add the current item to the rb-tree */
+	ep_rbtree_insert(ep, epi);
 
 	/* If the file is already "ready" we drop it inside the ready list */
 	if ((revents & event->events) && !EP_IS_LINKED(&epi->rdllink)) {
@@ -1126,7 +1032,7 @@
 	 * Get current event bits. We can safely use the file* here because
 	 * its usage count has been increased by the caller of this function.
 	 */
-	revents = epi->file->f_op->poll(epi->file, NULL);
+	revents = epi->ffd.file->f_op->poll(epi->ffd.file, NULL);
 
 	write_lock_irqsave(&ep->lock, flags);
 
@@ -1137,7 +1043,7 @@
 	 * If the item is not linked to the hash it means that it's on its
 	 * way toward the removal. Do nothing in this case.
 	 */
-	if (EP_IS_LINKED(&epi->llink)) {
+	if (EP_RB_LINKED(&epi->rbn)) {
 		/*
 		 * If the item is "hot" and it is not registered inside the ready
 		 * list, push it inside. If the item is not "hot" and it is currently
@@ -1205,7 +1111,7 @@
 	 * The check protect us from doing a double unlink ( crash ).
 	 */
 	error = -ENOENT;
-	if (!EP_IS_LINKED(&epi->llink))
+	if (!EP_RB_LINKED(&epi->rbn))
 		goto eexit_1;
 
 	/*
@@ -1216,11 +1122,11 @@
 	epi->event.events = 0;
 
 	/*
-	 * At this point is safe to do the job, unlink the item from our list.
+	 * At this point is safe to do the job, unlink the item from our rb-tree.
 	 * This operation togheter with the above check closes the door to
 	 * double unlinks.
 	 */
-	EP_LIST_DEL(&epi->llink);
+	EP_RB_ERASE(&epi->rbn, &ep->rbr);
 
 	/*
 	 * If the item we are going to remove is inside the ready file descriptors
@@ -1247,7 +1153,7 @@
 {
 	int error;
 	unsigned long flags;
-	struct file *file = epi->file;
+	struct file *file = epi->ffd.file;
 
 	/*
 	 * Removes poll wait queue hooks. We _have_ to do this without holding
@@ -1446,7 +1352,7 @@
 		 * because we are holding the "sem" in read and this will
 		 * guarantee that both the file and the item will not vanish.
 		 */
-		revents = epi->file->f_op->poll(epi->file, NULL);
+		revents = epi->ffd.file->f_op->poll(epi->ffd.file, NULL);
 
 		/*
 		 * Set the return event set for the current file descriptor.
@@ -1497,7 +1403,7 @@
 		 * item is set to have an Edge Triggered behaviour, we don't have
 		 * to push it back either.
 		 */
-		if (EP_IS_LINKED(&epi->llink) && !(epi->event.events & EPOLLET) &&
+		if (EP_RB_LINKED(&epi->rbn) && !(epi->event.events & EPOLLET) &&
 		    (epi->revents & epi->event.events) && !EP_IS_LINKED(&epi->rdllink)) {
 			list_add_tail(&epi->rdllink, &ep->rdllist);
 			ricnt++;
--- diff/fs/exec.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/exec.c	2004-07-01 21:32:48.000000000 +0100
@@ -48,7 +48,6 @@
 #include <linux/rmap.h>
 
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/mmu_context.h>
 
 #ifdef CONFIG_KMOD
@@ -431,6 +430,7 @@
 			mpnt->vm_flags = VM_STACK_FLAGS & ~VM_EXEC;
 		else
 			mpnt->vm_flags = VM_STACK_FLAGS;
+		mpnt->vm_flags |= mm->def_flags;
 		mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7];
 		insert_vm_struct(mm, mpnt);
 		mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
@@ -546,6 +546,7 @@
 	tsk->active_mm = mm;
 	activate_mm(active_mm, mm);
 	task_unlock(tsk);
+	arch_pick_mmap_layout(mm);
 	if (old_mm) {
 		if (active_mm != old_mm) BUG();
 		mmput(old_mm);
@@ -839,7 +840,8 @@
 	flush_thread();
 
 	if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || 
-	    permission(bprm->file->f_dentry->d_inode,MAY_READ, NULL))
+	    permission(bprm->file->f_dentry->d_inode,MAY_READ, NULL) ||
+	    (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP))
 		current->mm->dumpable = 0;
 
 	/* An exec changes our domain. We are no longer part of the thread
@@ -1080,7 +1082,7 @@
 	if (IS_ERR(file))
 		return retval;
 
-	sched_balance_exec();
+	sched_exec();
 
 	bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
 	memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0]));
@@ -1088,6 +1090,8 @@
 	bprm.file = file;
 	bprm.filename = filename;
 	bprm.interp = filename;
+	bprm.interp_flags = 0;
+	bprm.interp_data = 0;
 	bprm.sh_bang = 0;
 	bprm.loader = 0;
 	bprm.exec = 0;
--- diff/fs/ext2/inode.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/ext2/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -1276,8 +1276,8 @@
 		if (error)
 			return error;
 	}
-	inode_setattr(inode, iattr);
-	if (iattr->ia_valid & ATTR_MODE)
+	error = inode_setattr(inode, iattr);
+	if (!error && (iattr->ia_valid & ATTR_MODE))
 		error = ext2_acl_chmod(inode);
 	return error;
 }
--- diff/fs/ext2/symlink.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/ext2/symlink.c	2004-07-01 21:32:48.000000000 +0100
@@ -19,23 +19,19 @@
 
 #include "ext2.h"
 #include "xattr.h"
-
-static int
-ext2_readlink(struct dentry *dentry, char __user *buffer, int buflen)
-{
-	struct ext2_inode_info *ei = EXT2_I(dentry->d_inode);
-	return vfs_readlink(dentry, buffer, buflen, (char *)ei->i_data);
-}
+#include <linux/namei.h>
 
 static int ext2_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	struct ext2_inode_info *ei = EXT2_I(dentry->d_inode);
-	return vfs_follow_link(nd, (char *)ei->i_data);
+	nd_set_link(nd, (char *)ei->i_data);
+	return 0;
 }
 
 struct inode_operations ext2_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.setxattr	= ext2_setxattr,
 	.getxattr	= ext2_getxattr,
 	.listxattr	= ext2_listxattr,
@@ -43,7 +39,7 @@
 };
  
 struct inode_operations ext2_fast_symlink_inode_operations = {
-	.readlink	= ext2_readlink,
+	.readlink	= generic_readlink,
 	.follow_link	= ext2_follow_link,
 	.setxattr	= ext2_setxattr,
 	.getxattr	= ext2_getxattr,
--- diff/fs/ext3/Makefile	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/ext3/Makefile	2004-07-01 21:32:48.000000000 +0100
@@ -5,7 +5,7 @@
 obj-$(CONFIG_EXT3_FS) += ext3.o
 
 ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
-	   ioctl.o namei.o super.o symlink.o hash.o
+	   ioctl.o namei.o super.o symlink.o hash.o resize.o
 
 ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
 ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
--- diff/fs/ext3/acl.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/ext3/acl.c	2004-07-01 21:32:48.000000000 +0100
@@ -428,7 +428,9 @@
 	error = posix_acl_chmod_masq(clone, inode->i_mode);
 	if (!error) {
 		handle_t *handle;
+		int retries = 0;
 
+	retry:
 		handle = ext3_journal_start(inode, EXT3_DATA_TRANS_BLOCKS);
 		if (IS_ERR(handle)) {
 			error = PTR_ERR(handle);
@@ -437,6 +439,9 @@
 		}
 		error = ext3_set_acl(handle, inode, ACL_TYPE_ACCESS, clone);
 		ext3_journal_stop(handle);
+		if (error == -ENOSPC &&
+		    ext3_should_retry_alloc(inode->i_sb, &retries))
+			goto retry;
 	}
 out:
 	posix_acl_release(clone);
@@ -516,7 +521,7 @@
 {
 	handle_t *handle;
 	struct posix_acl *acl;
-	int error;
+	int error, retries = 0;
 
 	if (!test_opt(inode->i_sb, POSIX_ACL))
 		return -EOPNOTSUPP;
@@ -535,11 +540,14 @@
 	} else
 		acl = NULL;
 
+retry:
 	handle = ext3_journal_start(inode, EXT3_DATA_TRANS_BLOCKS);
 	if (IS_ERR(handle))
 		return PTR_ERR(handle);
 	error = ext3_set_acl(handle, inode, type, acl);
 	ext3_journal_stop(handle);
+	if (error == -ENOSPC && ext3_should_retry_alloc(inode->i_sb, &retries))
+		goto retry;
 
 release_and_out:
 	posix_acl_release(acl);
--- diff/fs/ext3/balloc.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/ext3/balloc.c	2004-07-01 21:32:48.000000000 +0100
@@ -96,9 +96,87 @@
 error_out:
 	return bh;
 }
+/*
+ * The reservation window structure operations
+ * --------------------------------------------
+ * Operations include:
+ * dump, find, add, remove, is_empty, find_next_reservable_window, etc.
+ *
+ * We use sorted double linked list for the per-filesystem reservation
+ * window list. (like in vm_region).
+ *
+ * Initially, we keep those small operations in the abstract functions,
+ * so later if we need a better searching tree than double linked-list,
+ * we could easily switch to that without changing too much
+ * code.
+ */
+static inline void rsv_window_dump(struct reserve_window *head, char *fn)
+{
+	struct reserve_window *rsv;
+
+	printk("Block Allocation Reservation Windows Map (%s):\n", fn);
+	list_for_each_entry(rsv, &head->rsv_list, rsv_list) {
+		printk("reservation window 0x%p start:  %d, end:  %d\n",
+			 rsv, rsv->rsv_start, rsv->rsv_end);
+	}
+}
+
+static int
+goal_in_my_reservation(struct reserve_window *rsv, int goal,
+			unsigned int group, struct super_block * sb)
+{
+	unsigned long group_first_block, group_last_block;
+
+	group_first_block = le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block) +
+				group * EXT3_BLOCKS_PER_GROUP(sb);
+	group_last_block = group_first_block + EXT3_BLOCKS_PER_GROUP(sb) - 1;
+
+	if ((rsv->rsv_start > group_last_block) ||
+	    (rsv->rsv_end < group_first_block))
+		return 0;
+	if ((goal >= 0) && ((goal + group_first_block < rsv->rsv_start)
+		|| (goal + group_first_block > rsv->rsv_end)))
+		return 0;
+	return 1;
+}
+
+static inline void rsv_window_add(struct reserve_window *rsv,
+					struct reserve_window *prev)
+{
+	/* insert the new reservation window after the head */
+	list_add(&rsv->rsv_list, &prev->rsv_list);
+}
+
+static inline void rsv_window_remove(struct reserve_window *rsv)
+{
+	rsv->rsv_start = 0;
+	rsv->rsv_end = 0;
+		rsv->rsv_alloc_hit = 0;
+	list_del(&rsv->rsv_list);
+	INIT_LIST_HEAD(&rsv->rsv_list);
+}
+
+static inline int rsv_is_empty(struct reserve_window *rsv)
+{
+	/* a valid reservation end block could not be 0 */
+	return (rsv->rsv_end == 0);
+}
+
+void ext3_discard_reservation(struct inode *inode)
+{
+	struct ext3_inode_info *ei = EXT3_I(inode);
+	struct reserve_window *rsv = &ei->i_rsv_window;
+	spinlock_t *rsv_lock = &EXT3_SB(inode->i_sb)->s_rsv_window_lock;
+
+	if (!rsv_is_empty(rsv)) {
+		spin_lock(rsv_lock);
+		rsv_window_remove(rsv);
+		spin_unlock(rsv_lock);
+	}
+}
 
 /* Free given blocks, update quota and i_blocks field */
-void ext3_free_blocks (handle_t *handle, struct inode * inode,
+void ext3_free_blocks(handle_t *handle, struct inode *inode,
 			unsigned long block, unsigned long count)
 {
 	struct buffer_head *bitmap_bh = NULL;
@@ -275,7 +353,7 @@
 error_return:
 	brelse(bitmap_bh);
 	ext3_std_error(sb, err);
-	if (dquot_freed_blocks)
+	if (dquot_freed_blocks && !(EXT3_I(inode)->i_state & EXT3_STATE_RESIZE))
 		DQUOT_FREE_BLOCK(inode, dquot_freed_blocks);
 	return;
 }
@@ -296,7 +374,7 @@
  * data-writes at some point, and disable it for metadata allocations or
  * sync-data inodes.
  */
-static inline int ext3_test_allocatable(int nr, struct buffer_head *bh)
+static int ext3_test_allocatable(int nr, struct buffer_head *bh)
 {
 	int ret;
 	struct journal_head *jh = bh2jh(bh);
@@ -313,6 +391,33 @@
 	return ret;
 }
 
+static int
+bitmap_search_next_usable_block(int start, struct buffer_head *bh,
+					int maxblocks)
+{
+	int next;
+	struct journal_head *jh = bh2jh(bh);
+
+	/*
+	 * The bitmap search --- search forward alternately through the actual
+	 * bitmap and the last-committed copy until we find a bit free in
+	 * both
+	 */
+	while (start < maxblocks) {
+		next = ext3_find_next_zero_bit(bh->b_data, maxblocks, start);
+		if (next >= maxblocks)
+			return -1;
+		if (ext3_test_allocatable(next, bh))
+			return next;
+		jbd_lock_bh_state(bh);
+		if (jh->b_committed_data)
+			start = ext3_find_next_zero_bit(jh->b_committed_data,
+						 	maxblocks, next);
+		jbd_unlock_bh_state(bh);
+	}
+	return -1;
+}
+
 /*
  * Find an allocatable block in a bitmap.  We honour both the bitmap and
  * its last-committed copy (if that exists), and perform the "most
@@ -325,7 +430,6 @@
 {
 	int here, next;
 	char *p, *r;
-	struct journal_head *jh = bh2jh(bh);
 
 	if (start > 0) {
 		/*
@@ -337,6 +441,8 @@
 		 * next 64-bit boundary is simple..
 		 */
 		int end_goal = (start + 63) & ~63;
+		if (end_goal > maxblocks)
+			end_goal = maxblocks;
 		here = ext3_find_next_zero_bit(bh->b_data, end_goal, start);
 		if (here < end_goal && ext3_test_allocatable(here, bh))
 			return here;
@@ -351,7 +457,7 @@
 	r = memscan(p, 0, (maxblocks - here + 7) >> 3);
 	next = (r - ((char *)bh->b_data)) << 3;
 
-	if (next < maxblocks && ext3_test_allocatable(next, bh))
+	if (next < maxblocks && next >= start && ext3_test_allocatable(next, bh))
 		return next;
 
 	/*
@@ -359,19 +465,8 @@
 	 * bitmap and the last-committed copy until we find a bit free in
 	 * both
 	 */
-	while (here < maxblocks) {
-		next = ext3_find_next_zero_bit(bh->b_data, maxblocks, here);
-		if (next >= maxblocks)
-			return -1;
-		if (ext3_test_allocatable(next, bh))
-			return next;
-		jbd_lock_bh_state(bh);
-		if (jh->b_committed_data)
-			here = ext3_find_next_zero_bit(jh->b_committed_data,
-						 	maxblocks, next);
-		jbd_unlock_bh_state(bh);
-	}
-	return -1;
+	here = bitmap_search_next_usable_block(here, bh, maxblocks);
+	return here;
 }
 
 /*
@@ -407,62 +502,494 @@
  */
 static int
 ext3_try_to_allocate(struct super_block *sb, handle_t *handle, int group,
-		struct buffer_head *bitmap_bh, int goal, int *errp)
+	struct buffer_head *bitmap_bh, int goal, struct reserve_window *my_rsv)
 {
-	int i;
-	int fatal;
-	int credits = 0;
+	int group_first_block, start, end;
 
-	*errp = 0;
-
-	/*
-	 * Make sure we use undo access for the bitmap, because it is critical
-	 * that we do the frozen_data COW on bitmap buffers in all cases even
-	 * if the buffer is in BJ_Forget state in the committing transaction.
-	 */
-	BUFFER_TRACE(bitmap_bh, "get undo access for new block");
-	fatal = ext3_journal_get_undo_access(handle, bitmap_bh, &credits);
-	if (fatal) {
-		*errp = fatal;
-		goto fail;
+	/* we do allocation within the reservation window if we have a window */
+	if (my_rsv) {
+		group_first_block =
+			le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block) +
+			group * EXT3_BLOCKS_PER_GROUP(sb);
+		if (my_rsv->rsv_start >= group_first_block)
+			start = my_rsv->rsv_start - group_first_block;
+		else
+			/* reservation window cross group boundary */
+			start = 0;
+		end = my_rsv->rsv_end - group_first_block + 1;
+		if (end > EXT3_BLOCKS_PER_GROUP(sb))
+			/* reservation window crosses group boundary */
+			end = EXT3_BLOCKS_PER_GROUP(sb);
+		if ((start <= goal) && (goal < end))
+			start = goal;
+		else
+			goal = -1;
+	} else {
+		if (goal > 0)
+			start = goal;
+		else
+			start = 0;
+		end = EXT3_BLOCKS_PER_GROUP(sb);
 	}
 
+	BUG_ON(start > EXT3_BLOCKS_PER_GROUP(sb));
+
 repeat:
 	if (goal < 0 || !ext3_test_allocatable(goal, bitmap_bh)) {
-		goal = find_next_usable_block(goal, bitmap_bh,
-					EXT3_BLOCKS_PER_GROUP(sb));
+		goal = find_next_usable_block(start, bitmap_bh, end);
 		if (goal < 0)
 			goto fail_access;
+		if (!my_rsv) {
+			int i;
 
-		for (i = 0; i < 7 && goal > 0 &&
-				ext3_test_allocatable(goal - 1, bitmap_bh);
-			i++, goal--);
+			for (i = 0; i < 7 && goal > start &&
+					ext3_test_allocatable(goal - 1,
+								bitmap_bh);
+					i++, goal--)
+				;
+		}
 	}
+	start = goal;
 
 	if (!claim_block(sb_bgl_lock(EXT3_SB(sb), group), goal, bitmap_bh)) {
 		/*
 		 * The block was allocated by another thread, or it was
 		 * allocated and then freed by another thread
 		 */
+		start++;
 		goal++;
-		if (goal >= EXT3_BLOCKS_PER_GROUP(sb))
+		if (start >= end)
 			goto fail_access;
 		goto repeat;
 	}
+	if (my_rsv)
+		my_rsv->rsv_alloc_hit++;
+	return goal;
+fail_access:
+	return -1;
+}
+
+/**
+ * 	find_next_reservable_window():
+ *		find a reservable space within the given range
+ *		It does not allocate the reservation window for now
+ *		alloc_new_reservation() will do the work later.
+ *
+ * 	@search_head: the head of the searching list;
+ *		This is not necessary the list head of the whole filesystem
+ *
+ *		we have both head and start_block to assist the search
+ *		for the reservable space. The list start from head,
+ *		but we will shift to the place where start_block is,
+ *		then start from there, we looking for a resevable space.
+ *
+ *	@fs_rsv_head: per-filesystem reervation list head.
+ *
+ * 	@size: the target new reservation window size
+ * 	@group_first_block: the first block we consider to start
+ *			the real search from
+ *
+ * 	@last_block:
+ *		the maxium block number that our goal reservable space
+ *		could start from. This is normally the last block in this
+ *		group. The search will end when we found the start of next
+ *		possiblereservable space is out of this boundary.
+ *		This could handle the cross bounday reservation window request.
+ *
+ * 	basically we search from the given range, rather than the whole
+ * 	reservation double linked list, (start_block, last_block)
+ * 	to find a free region that of of my size and has not
+ * 	been reserved.
+ *
+ *	on succeed, it returns the reservation window to be append to.
+ *	failed, return NULL.
+ */
+static inline
+struct reserve_window *find_next_reservable_window(
+				struct reserve_window *search_head,
+				struct reserve_window *fs_rsv_head,
+				unsigned long size, int *start_block,
+				int last_block)
+{
+	struct reserve_window *rsv;
+	int cur;
+
+	/* TODO:make the start of the reservation window byte alligned */
+	/*cur = *start_block & 8;*/
+	cur = *start_block;
+	rsv = list_entry(search_head->rsv_list.next,
+				struct reserve_window, rsv_list);
+	while (rsv != fs_rsv_head) {
+		if (cur + size <= rsv->rsv_start) {
+	 		/*
+			 * Found a reserveable space big enough.  We could
+			 * have a reservation across the group boundary here
+		 	 */
+			break;
+		}
+		if (cur <= rsv->rsv_end)
+			cur = rsv->rsv_end + 1;
+
+		/* TODO?
+		 * in the case we could not find a reservable space
+		 * that is what is expected, during the re-search, we could
+		 * remember what's the largest reservable space we could have
+		 * and return that one.
+		 *
+		 * For now it will fail if we could not find the reservable
+		 * space with expected-size (or more)...
+		 */
+		rsv = list_entry(rsv->rsv_list.next,
+				struct reserve_window, rsv_list);
+		if (cur > last_block)
+			return NULL;		/* fail */
+	}
+	/*
+	 * we come here either :
+	 * when we rearch to the end of the whole list,
+	 * and there is empty reservable space after last entry in the list.
+	 * append it to the end of the list.
+	 *
+	 * or we found one reservable space in the middle of the list,
+	 * return the reservation window that we could append to.
+	 * succeed.
+	 */
+	*start_block = cur;
+	return list_entry(rsv->rsv_list.prev, struct reserve_window, rsv_list);
+}
+
+/**
+ * 	alloc_new_reservation()--allocate a new reservation window
+ *		if there is an existing reservation, discard it first
+ *		then allocate the new one from there
+ *		otherwise allocate the new reservation from the given
+ *		start block, or the beginning of the group, if a goal
+ *		is not given.
+ *
+ *		To make a new reservation, we search part of the filesystem
+ *		reservation list(the list that inside the group).
+ *
+ *		If we have a old reservation, the search goal is the end of
+ *		last reservation. If we do not have a old reservatio, then we
+ *		start from a given goal, or the first block of the group, if
+ *		the goal is not given.
+ *
+ *		We first find a reservable space after the goal, then from
+ *		there,we check the bitmap for the first free block after
+ *		it. If there is no free block until the end of group, then the
+ *		whole group is full, we failed. Otherwise, check if the free
+ *		block is inside the expected reservable space, if so, we
+ *		succeed.
+ *		If the first free block is outside the reseravle space, then
+ *		start from the first free block, we search for next avalibale
+ *		space, and go on.
+ *
+ *	on succeed, a new reservation will be found and inserted into the list
+ *	It contains at least one free block, and it is not overlap with other
+ *	reservation window.
+ *
+ *	failed: we failed to found a reservation window in this group
+ *
+ *	@rsv: the reservation
+ *
+ *	@goal: The goal.  It is where the search for a
+ *		free reservable space should start from.
+ *		if we have a old reservation, start_block is the end of
+ *		old reservation. Otherwise,
+ *		if we have a goal(goal >0 ), then start from there,
+ *		no goal(goal = -1), we start from the first block
+ *		of the group.
+ *
+ *	@sb: the super block
+ *	@group: the group we are trying to do allocate in
+ *	@bitmap_bh: the block group block bitmap
+ */
+static int alloc_new_reservation(struct reserve_window *my_rsv,
+		int goal, struct super_block *sb,
+		unsigned int group, struct buffer_head *bitmap_bh)
+{
+	struct reserve_window *search_head;
+	int group_first_block, group_end_block, start_block;
+	int first_free_block;
+	int reservable_space_start;
+	struct reserve_window *prev_rsv;
+	struct reserve_window *fs_rsv_head = &EXT3_SB(sb)->s_rsv_window_head;
+	unsigned long size;
+
+	group_first_block = le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block) +
+				group * EXT3_BLOCKS_PER_GROUP(sb);
+	group_end_block = group_first_block + EXT3_BLOCKS_PER_GROUP(sb) - 1;
+
+	if (goal < 0)
+		start_block = group_first_block;
+	else
+		start_block = goal + group_first_block;
+
+	size = atomic_read(&my_rsv->rsv_goal_size);
+	/* if we have a old reservation, start the search from the old rsv */
+	if (!rsv_is_empty(my_rsv)) {
+		/*
+		 * if the old reservation is cross group boundary
+		 * we will come here when we just failed to allocate from
+		 * the first part of the window. We still have another part
+		 * that belongs to the next group. In this case, there is no
+		 * point to discard our window and try to allocate a new one
+		 * in this group(which will fail). we should
+		 * keep the reservation window, just simply move on.
+		 *
+		 * Maybe we could shift the start block of the reservation
+		 * window to the first block of next group.
+		 */
+
+		if ((my_rsv->rsv_start <= group_end_block) &&
+				(my_rsv->rsv_end > group_end_block))
+			return -1;
+
+		/* remember where we are before we discard the old one */
+		if (my_rsv->rsv_end + 1 > start_block)
+			start_block = my_rsv->rsv_end + 1;
+		search_head = my_rsv;
+		if ((my_rsv->rsv_alloc_hit > (my_rsv->rsv_end - my_rsv->rsv_start + 1) / 2)) {
+			/*
+			 * if we previously allocation hit ration is greater than half
+			 * we double the size of reservation window next time
+			 * otherwise keep the same
+			 */
+			size = size * 2;
+			if (size > EXT3_MAX_RESERVE_BLOCKS)
+				size = EXT3_MAX_RESERVE_BLOCKS;
+			atomic_set(&my_rsv->rsv_goal_size, size);
+		}
+	}
+	else {
+		/*
+		 * we don't have a reservation,
+		 * we set our goal(start_block) and
+		 * the list head for the search
+		 */
+		search_head = fs_rsv_head;
+	}
+
+	/*
+	 * find_next_reservable_window() simply find a reservable window
+	 * inside the given range(start_block, group_end_block).
+	 *
+	 * To make sure the reservation window has a free bit inside it, we
+	 * need to check the bitmap after we found a reservable window.
+	 */
+retry:
+	prev_rsv = find_next_reservable_window(search_head, fs_rsv_head, size,
+						&start_block, group_end_block);
+	if (prev_rsv == NULL)
+		goto failed;
+	reservable_space_start = start_block;
+	/*
+	 * On success, find_next_reservable_window() returns the
+	 * reservation window where there is a reservable space after it.
+	 * Before we reserve this reservable space, we need
+	 * to make sure there is at least a free block inside this region.
+	 *
+	 * searching the first free bit on the block bitmap and copy of
+	 * last committed bitmap alternatively, until we found a allocatable
+	 * block. Search start from the start block of the reservable space
+	 * we just found.
+	 */
+	first_free_block = bitmap_search_next_usable_block(
+			reservable_space_start - group_first_block,
+			bitmap_bh, group_end_block - group_first_block + 1);
 
-	BUFFER_TRACE(bitmap_bh, "journal_dirty_metadata for bitmap block");
-	fatal = ext3_journal_dirty_metadata(handle, bitmap_bh);
+	if (first_free_block < 0) {
+		/*
+		 * no free block left on the bitmap, no point
+		 * to reserve the space. return failed.
+		 */
+		goto failed;
+	}
+	start_block = first_free_block + group_first_block;
+	/*
+	 * check if the first free block is within the
+	 * free space we just found
+	 */
+	if ((start_block >= reservable_space_start) &&
+	  (start_block < reservable_space_start + size))
+		goto found_rsv_window;
+	/*
+	 * if the first free bit we found is out of the reservable space
+	 * this means there is no free block on the reservable space
+	 * we should continue search for next reservable space,
+	 * start from where the free block is,
+	 * we also shift the list head to where we stopped last time
+	 */
+	search_head = prev_rsv;
+	goto retry;
+
+found_rsv_window:
+	/*
+	 * great! the reservable space contains some free blocks.
+	 * if the search returns that we should add the new
+	 * window just next to where the old window, we don't
+ 	 * need to remove the old window first then add it to the
+	 * same place, just update the new start and new end.
+	 */
+	if (my_rsv != prev_rsv)  {
+		if (!rsv_is_empty(my_rsv))
+			rsv_window_remove(my_rsv);
+		rsv_window_add(my_rsv, prev_rsv);
+	}
+	my_rsv->rsv_start = reservable_space_start;
+	my_rsv->rsv_end = my_rsv->rsv_start + size - 1;
+	return 0;		/* succeed */
+failed:
+	return -1;		/* failed */
+}
+
+/*
+ * This is the main function used to allocate a new block and its reservation
+ * window.
+ *
+ * Each time when a new block allocation is need, first try to allocate from
+ * its own reservation.  If it does not have a reservation window, instead of
+ * looking for a free bit on bitmap first, then look up the reservation list to
+ * see if it is inside somebody else's reservation window, we try to allocate a
+ * reservation window for it start from the goal first. Then do the block
+ * allocation within the reservation window.
+ *
+ * This will aviod keep searching the reservation list again and again when
+ * someboday is looking for a free block(without reservation), and there are
+ * lots of free blocks, but they are all being reserved
+ *
+ * We use a sorted double linked list for the per-filesystem reservation list.
+ * The insert, remove and find a free space(non-reserved) operations for the
+ * sorted double linked list should be fast.
+ *
+ */
+static int
+ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle,
+			unsigned int group, struct buffer_head *bitmap_bh,
+			int goal, struct reserve_window * my_rsv,
+			int *errp)
+{
+	spinlock_t *rsv_lock;
+	unsigned long group_first_block;
+	int ret = 0;
+	int fatal;
+	int credits = 0;
+
+	*errp = 0;
+
+	/*
+	 * Make sure we use undo access for the bitmap, because it is critical
+	 * that we do the frozen_data COW on bitmap buffers in all cases even
+	 * if the buffer is in BJ_Forget state in the committing transaction.
+	 */
+	BUFFER_TRACE(bitmap_bh, "get undo access for new block");
+	fatal = ext3_journal_get_undo_access(handle, bitmap_bh, &credits);
 	if (fatal) {
 		*errp = fatal;
-		goto fail;
+		return -1;
+	}
+
+	/*
+	 * we don't deal with reservation when
+	 * filesystem is mounted without reservation
+	 * or the file is not a regular file
+	 * of last attemp of allocating a block with reservation turn on failed
+	 */
+	if (my_rsv == NULL ) {
+		ret = ext3_try_to_allocate(sb, handle, group, bitmap_bh, goal, NULL);
+		goto out;
+	}
+	rsv_lock = &EXT3_SB(sb)->s_rsv_window_lock;
+	/*
+	 * goal is a group relative block number (if there is a goal)
+	 * 0 < goal < EXT3_BLOCKS_PER_GROUP(sb)
+	 * first block is a filesystem wide block number
+	 * first block is the block number of the first block in this group
+	 */
+	group_first_block = le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block) +
+			group * EXT3_BLOCKS_PER_GROUP(sb);
+
+	/*
+	 * Basically we will allocate a new block from inode's reservation
+	 * window.
+	 *
+	 * We need to allocate a new reservation window, if:
+	 * a) inode does not have a reservation window; or
+	 * b) last attemp of allocating a block from existing reservation
+	 *    failed; or
+	 * c) we come here with a goal and with a reservation window
+	 *
+	 * We do not need to allocate a new reservation window if we come here
+	 * at the beginning with a goal and the goal is inside the window, or
+	 * or we don't have a goal but already have a reservation window.
+	 * then we could go to allocate from the reservation window directly.
+	 */
+	while (1) {
+		if (rsv_is_empty(my_rsv) || (ret < 0) ||
+			!goal_in_my_reservation(my_rsv, goal, group, sb)) {
+			spin_lock(rsv_lock);
+			ret = alloc_new_reservation(my_rsv, goal, sb,
+							group, bitmap_bh);
+			spin_unlock(rsv_lock);
+			if (ret < 0)
+				break;			/* failed */
+
+			if (!goal_in_my_reservation(my_rsv, goal, group, sb))
+				goal = -1;
+		}
+		if ((my_rsv->rsv_start >= group_first_block + EXT3_BLOCKS_PER_GROUP(sb))
+			|| (my_rsv->rsv_end < group_first_block))
+			BUG();
+		ret = ext3_try_to_allocate(sb, handle, group, bitmap_bh, goal,
+					my_rsv);
+		if (ret >= 0)
+			break;				/* succeed */
+	}
+out:
+	if (ret >= 0) {
+		BUFFER_TRACE(bitmap_bh, "journal_dirty_metadata for "
+					"bitmap block");
+		fatal = ext3_journal_dirty_metadata(handle, bitmap_bh);
+		if (fatal) {
+			*errp = fatal;
+			return -1;
+		}
+		return ret;
 	}
-	return goal;
 
-fail_access:
 	BUFFER_TRACE(bitmap_bh, "journal_release_buffer");
 	ext3_journal_release_buffer(handle, bitmap_bh, credits);
-fail:
-	return -1;
+	return ret;
+}
+
+static int ext3_has_free_blocks(struct ext3_sb_info *sbi)
+{
+	int free_blocks, root_blocks;
+
+	free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
+	root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
+	if (free_blocks < root_blocks + 1 && !capable(CAP_SYS_RESOURCE) &&
+		sbi->s_resuid != current->fsuid &&
+		(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
+		return 0;
+	}
+	return 1;
+}
+
+/*
+ * ext3_should_retry_alloc() is called when ENOSPC is returned, and if
+ * it is profitable to retry the operation, this function will wait
+ * for the current or commiting transaction to complete, and then
+ * return TRUE.
+ */
+int ext3_should_retry_alloc(struct super_block *sb, int *retries)
+{
+	if (!ext3_has_free_blocks(EXT3_SB(sb)) || (*retries)++ > 3)
+		return 0;
+
+	jbd_debug(1, "%s: retrying operation after ENOSPC\n", sb->s_id);
+
+	return journal_force_commit_nested(EXT3_SB(sb)->s_journal);
 }
 
 /*
@@ -473,23 +1000,24 @@
  * bitmap, and then for any free bit if that fails.
  * This function also updates quota and i_blocks field.
  */
-int
-ext3_new_block(handle_t *handle, struct inode *inode, unsigned long goal,
-		u32 *prealloc_count, u32 *prealloc_block, int *errp)
-{
-	struct buffer_head *bitmap_bh = NULL;	/* bh */
-	struct buffer_head *gdp_bh;		/* bh2 */
-	int group_no;				/* i */
-	int ret_block;				/* j */
-	int bgi;				/* blockgroup iteration index */
-	int target_block;			/* tmp */
+int ext3_new_block(handle_t *handle, struct inode *inode,
+			unsigned long goal, int *errp)
+{
+	struct buffer_head *bitmap_bh = NULL;
+	struct buffer_head *gdp_bh;
+	int group_no;
+	int goal_group;
+	int ret_block;
+	int bgi;			/* blockgroup iteration index */
+	int target_block;
 	int fatal = 0, err;
 	int performed_allocation = 0;
-	int free_blocks, root_blocks;
+	int free_blocks;
 	struct super_block *sb;
 	struct ext3_group_desc *gdp;
 	struct ext3_super_block *es;
 	struct ext3_sb_info *sbi;
+	struct reserve_window *my_rsv = NULL;
 #ifdef EXT3FS_DEBUG
 	static int goal_hits, goal_attempts;
 #endif
@@ -511,12 +1039,9 @@
 	sbi = EXT3_SB(sb);
 	es = EXT3_SB(sb)->s_es;
 	ext3_debug("goal=%lu.\n", goal);
-
-	free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
-	root_blocks = le32_to_cpu(es->s_r_blocks_count);
-	if (free_blocks < root_blocks + 1 && !capable(CAP_SYS_RESOURCE) &&
-		sbi->s_resuid != current->fsuid &&
-		(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
+	if (test_opt(sb, RESERVATION) && S_ISREG(inode->i_mode))
+		my_rsv = &EXT3_I(inode)->i_rsv_window;
+	if (!ext3_has_free_blocks(sbi)) {
 		*errp = -ENOSPC;
 		goto out;
 	}
@@ -533,6 +1058,8 @@
 	if (!gdp)
 		goto io_error;
 
+	goal_group = group_no;
+retry:
 	free_blocks = le16_to_cpu(gdp->bg_free_blocks_count);
 	if (free_blocks > 0) {
 		ret_block = ((goal - le32_to_cpu(es->s_first_data_block)) %
@@ -540,8 +1067,8 @@
 		bitmap_bh = read_block_bitmap(sb, group_no);
 		if (!bitmap_bh)
 			goto io_error;
-		ret_block = ext3_try_to_allocate(sb, handle, group_no,
-					bitmap_bh, ret_block, &fatal);
+		ret_block = ext3_try_to_allocate_with_rsv(sb, handle, group_no,
+					bitmap_bh, ret_block, my_rsv, &fatal);
 		if (fatal)
 			goto out;
 		if (ret_block >= 0)
@@ -569,14 +1096,25 @@
 		bitmap_bh = read_block_bitmap(sb, group_no);
 		if (!bitmap_bh)
 			goto io_error;
-		ret_block = ext3_try_to_allocate(sb, handle, group_no,
-						bitmap_bh, -1, &fatal);
+		ret_block = ext3_try_to_allocate_with_rsv(sb, handle, group_no,
+					bitmap_bh, -1, my_rsv, &fatal);
 		if (fatal)
 			goto out;
 		if (ret_block >= 0) 
 			goto allocated;
 	}
-
+	/*
+	 * We may end up a bogus ealier ENOSPC error due to
+	 * filesystem is "full" of reservations, but
+	 * there maybe indeed free blocks avaliable on disk
+	 * In this case, we just forget about the reservations
+	 * just do block allocation as without reservations.
+	 */
+	if (my_rsv) {
+		my_rsv = NULL;
+		group_no = goal_group;
+		goto retry;
+	}
 	/* No space left on the device */
 	*errp = -ENOSPC;
 	goto out;
--- diff/fs/ext3/file.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/ext3/file.c	2004-07-01 21:32:48.000000000 +0100
@@ -33,8 +33,10 @@
  */
 static int ext3_release_file (struct inode * inode, struct file * filp)
 {
-	if (filp->f_mode & FMODE_WRITE)
-		ext3_discard_prealloc (inode);
+	/* if we are the last writer on the inode, drop the block reservation */
+	if ((filp->f_mode & FMODE_WRITE) &&
+			(atomic_read(&inode->i_writecount) == 1))
+		ext3_discard_reservation(inode);
 	if (is_dx(inode) && filp->private_data)
 		ext3_htree_free_dir_info(filp->private_data);
 
--- diff/fs/ext3/ialloc.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/ext3/ialloc.c	2004-07-01 21:32:48.000000000 +0100
@@ -581,10 +581,11 @@
 	ei->i_file_acl = 0;
 	ei->i_dir_acl = 0;
 	ei->i_dtime = 0;
-#ifdef EXT3_PREALLOCATE
-	ei->i_prealloc_block = 0;
-	ei->i_prealloc_count = 0;
-#endif
+	ei->i_rsv_window.rsv_start = 0;
+	ei->i_rsv_window.rsv_end = 0;
+	atomic_set(&ei->i_rsv_window.rsv_goal_size, EXT3_DEFAULT_RESERVE_BLOCKS);
+	ei->i_rsv_window.rsv_alloc_hit = 0;
+	INIT_LIST_HEAD(&ei->i_rsv_window.rsv_list);
 	ei->i_block_group = group;
 
 	ext3_set_inode_flags(inode);
--- diff/fs/ext3/inode.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/ext3/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -177,19 +177,6 @@
 }
 
 /*
- * Called at each iput()
- *
- * The inode may be "bad" if ext3_read_inode() saw an error from
- * ext3_get_inode(), so we need to check that to avoid freeing random disk
- * blocks.
- */
-void ext3_put_inode(struct inode *inode)
-{
-	if (!is_bad_inode(inode))
-		ext3_discard_prealloc(inode);
-}
-
-/*
  * Called at the last iput() if i_nlink is zero.
  */
 void ext3_delete_inode (struct inode * inode)
@@ -242,62 +229,12 @@
 	clear_inode(inode);	/* We must guarantee clearing of inode... */
 }
 
-void ext3_discard_prealloc (struct inode * inode)
-{
-#ifdef EXT3_PREALLOCATE
-	struct ext3_inode_info *ei = EXT3_I(inode);
-	/* Writer: ->i_prealloc* */
-	if (ei->i_prealloc_count) {
-		unsigned short total = ei->i_prealloc_count;
-		unsigned long block = ei->i_prealloc_block;
-		ei->i_prealloc_count = 0;
-		ei->i_prealloc_block = 0;
-		/* Writer: end */
-		ext3_free_blocks (inode, block, total);
-	}
-#endif
-}
-
 static int ext3_alloc_block (handle_t *handle,
 			struct inode * inode, unsigned long goal, int *err)
 {
 	unsigned long result;
 
-#ifdef EXT3_PREALLOCATE
-#ifdef EXT3FS_DEBUG
-	static unsigned long alloc_hits, alloc_attempts;
-#endif
-	struct ext3_inode_info *ei = EXT3_I(inode);
-	/* Writer: ->i_prealloc* */
-	if (ei->i_prealloc_count &&
-	    (goal == ei->i_prealloc_block ||
-	     goal + 1 == ei->i_prealloc_block))
-	{
-		result = ei->i_prealloc_block++;
-		ei->i_prealloc_count--;
-		/* Writer: end */
-		ext3_debug ("preallocation hit (%lu/%lu).\n",
-			    ++alloc_hits, ++alloc_attempts);
-	} else {
-		ext3_discard_prealloc (inode);
-		ext3_debug ("preallocation miss (%lu/%lu).\n",
-			    alloc_hits, ++alloc_attempts);
-		if (S_ISREG(inode->i_mode))
-			result = ext3_new_block (inode, goal, 
-				 &ei->i_prealloc_count,
-				 &ei->i_prealloc_block, err);
-		else
-			result = ext3_new_block (inode, goal, 0, 0, err);
-		/*
-		 * AKPM: this is somewhat sticky.  I'm not surprised it was
-		 * disabled in 2.2's ext3.  Need to integrate b_committed_data
-		 * guarding with preallocation, if indeed preallocation is
-		 * effective.
-		 */
-	}
-#else
-	result = ext3_new_block (handle, inode, goal, 0, 0, err);
-#endif
+	result = ext3_new_block (handle, inode, goal, err);
 	return result;
 }
 
@@ -881,26 +818,42 @@
 	handle_t *handle = journal_current_handle();
 	int ret = 0;
 
-	if (handle && handle->h_buffer_credits <= EXT3_RESERVE_TRANS_BLOCKS) {
+	if (!handle)
+		goto get_block;		/* A read */
+
+	if (handle->h_transaction->t_state == T_LOCKED) {
+		/*
+		 * Huge direct-io writes can hold off commits for long
+		 * periods of time.  Let this commit run.
+		 */
+		ext3_journal_stop(handle);
+		handle = ext3_journal_start(inode, DIO_CREDITS);
+		if (IS_ERR(handle))
+			ret = PTR_ERR(handle);
+		goto get_block;
+	}
+
+	if (handle->h_buffer_credits <= EXT3_RESERVE_TRANS_BLOCKS) {
 		/*
 		 * Getting low on buffer credits...
 		 */
-		if (!ext3_journal_extend(handle, DIO_CREDITS)) {
+		ret = ext3_journal_extend(handle, DIO_CREDITS);
+		if (ret > 0) {
 			/*
-			 * Couldn't extend the transaction.  Start a new one
+			 * Couldn't extend the transaction.  Start a new one.
 			 */
 			ret = ext3_journal_restart(handle, DIO_CREDITS);
 		}
 	}
+
+get_block:
 	if (ret == 0)
 		ret = ext3_get_block_handle(handle, inode, iblock,
 					bh_result, create, 0);
-	if (ret == 0)
-		bh_result->b_size = (1 << inode->i_blkbits);
+	bh_result->b_size = (1 << inode->i_blkbits);
 	return ret;
 }
 
-
 /*
  * `handle' can be NULL if create is zero
  */
@@ -958,52 +911,17 @@
 			       int block, int create, int *err)
 {
 	struct buffer_head * bh;
-	int prev_blocks;
-
-	prev_blocks = inode->i_blocks;
 
-	bh = ext3_getblk (handle, inode, block, create, err);
+	bh = ext3_getblk(handle, inode, block, create, err);
 	if (!bh)
 		return bh;
-#ifdef EXT3_PREALLOCATE
-	/*
-	 * If the inode has grown, and this is a directory, then use a few
-	 * more of the preallocated blocks to keep directory fragmentation
-	 * down.  The preallocated blocks are guaranteed to be contiguous.
-	 */
-	if (create &&
-	    S_ISDIR(inode->i_mode) &&
-	    inode->i_blocks > prev_blocks &&
-	    EXT3_HAS_COMPAT_FEATURE(inode->i_sb,
-				    EXT3_FEATURE_COMPAT_DIR_PREALLOC)) {
-		int i;
-		struct buffer_head *tmp_bh;
-
-		for (i = 1;
-		     EXT3_I(inode)->i_prealloc_count &&
-		     i < EXT3_SB(inode->i_sb)->s_es->s_prealloc_dir_blocks;
-		     i++) {
-			/*
-			 * ext3_getblk will zero out the contents of the
-			 * directory for us
-			 */
-			tmp_bh = ext3_getblk(handle, inode,
-						block+i, create, err);
-			if (!tmp_bh) {
-				brelse (bh);
-				return 0;
-			}
-			brelse (tmp_bh);
-		}
-	}
-#endif
 	if (buffer_uptodate(bh))
 		return bh;
-	ll_rw_block (READ, 1, &bh);
-	wait_on_buffer (bh);
+	ll_rw_block(READ, 1, &bh);
+	wait_on_buffer(bh);
 	if (buffer_uptodate(bh))
 		return bh;
-	brelse (bh);
+	put_bh(bh);
 	*err = -EIO;
 	return NULL;
 }
@@ -1080,7 +998,7 @@
 	struct inode *inode = page->mapping->host;
 	int ret, needed_blocks = ext3_writepage_trans_blocks(inode);
 	handle_t *handle;
-	int tried_commit = 0;
+	int retries = 0;
 
 retry:
 	handle = ext3_journal_start(inode, needed_blocks);
@@ -1089,19 +1007,8 @@
 		goto out;
 	}
 	ret = block_prepare_write(page, from, to, ext3_get_block);
-	if (ret) {
-		if (ret != -ENOSPC || tried_commit)
-			goto prepare_write_failed;
-		/*
-		 * It could be that there _is_ free space, but it's all tied up
-		 * in uncommitted bitmaps.  So force a commit here, which makes
-		 * those blocks allocatable and try again.
-		 */
-		tried_commit = 1;
-		handle->h_sync = 1;
-		ext3_journal_stop(handle);
-		goto retry;
-	}
+	if (ret)
+		goto prepare_write_failed;
 
 	if (ext3_should_journal_data(inode)) {
 		ret = walk_page_buffers(handle, page_buffers(page),
@@ -1110,6 +1017,8 @@
 prepare_write_failed:
 	if (ret)
 		ext3_journal_stop(handle);
+	if (ret == -ENOSPC && ext3_should_retry_alloc(inode->i_sb, &retries))
+		goto retry;
 out:
 	return ret;
 }
@@ -2148,7 +2057,7 @@
 	if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
 		return;
 
-	ext3_discard_prealloc(inode);
+	ext3_discard_reservation(inode);
 
 	/*
 	 * We have to lock the EOF page here, because lock_page() nests
@@ -2304,8 +2213,10 @@
 	struct buffer_head *bh;
 	struct ext3_group_desc * gdp;
 
+
 	if ((ino != EXT3_ROOT_INO &&
 		ino != EXT3_JOURNAL_INO &&
+		ino != EXT3_RESIZE_INO &&
 		ino < EXT3_FIRST_INO(sb)) ||
 		ino > le32_to_cpu(
 			EXT3_SB(sb)->s_es->s_inodes_count)) {
@@ -2541,11 +2452,11 @@
 	}
 	ei->i_disksize = inode->i_size;
 	inode->i_generation = le32_to_cpu(raw_inode->i_generation);
-#ifdef EXT3_PREALLOCATE
-	ei->i_prealloc_count = 0;
-#endif
 	ei->i_block_group = iloc.block_group;
-
+	ei->i_rsv_window.rsv_start = 0;
+	ei->i_rsv_window.rsv_end= 0;
+	atomic_set(&ei->i_rsv_window.rsv_goal_size, EXT3_DEFAULT_RESERVE_BLOCKS);
+	INIT_LIST_HEAD(&ei->i_rsv_window.rsv_list);
 	/*
 	 * NOTE! The in-memory inode i_data array is in little-endian order
 	 * even on big-endian machines: we do NOT byteswap the block numbers!
--- diff/fs/ext3/ioctl.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/ext3/ioctl.c	2004-07-01 21:32:48.000000000 +0100
@@ -20,6 +20,7 @@
 {
 	struct ext3_inode_info *ei = EXT3_I(inode);
 	unsigned int flags;
+	unsigned short rsv_window_size;
 
 	ext3_debug ("cmd = %u, arg = %lu\n", cmd, arg);
 
@@ -151,6 +152,74 @@
 			return ret;
 		}
 #endif
+	case EXT3_IOC_GETRSVSZ:
+		if (test_opt(inode->i_sb, RESERVATION) && S_ISREG(inode->i_mode)) {
+			rsv_window_size = atomic_read(&ei->i_rsv_window.rsv_goal_size);
+			return put_user(rsv_window_size, (int *)arg);
+		}
+		return -ENOTTY;
+	case EXT3_IOC_SETRSVSZ:
+		if (!test_opt(inode->i_sb, RESERVATION) ||!S_ISREG(inode->i_mode))
+			return -ENOTTY;
+
+		if (IS_RDONLY(inode))
+			return -EROFS;
+
+		if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER))
+			return -EACCES;
+
+		if (get_user(rsv_window_size, (int *)arg))
+			return -EFAULT;
+
+		if (rsv_window_size > EXT3_MAX_RESERVE_BLOCKS)
+			rsv_window_size = EXT3_MAX_RESERVE_BLOCKS;
+		atomic_set(&ei->i_rsv_window.rsv_goal_size, rsv_window_size);
+		return 0;
+	case EXT3_IOC_GROUP_EXTEND: {
+		unsigned long n_blocks_count;
+		struct super_block *sb = inode->i_sb;
+		int err;
+
+		if (!capable(CAP_SYS_RESOURCE))
+			return -EACCES;
+
+		if (sb->s_flags & MS_RDONLY)
+			return -EROFS;
+
+		if (get_user(n_blocks_count, (__u32 *)arg))
+			return -EFAULT;
+
+		err = ext3_group_extend(sb, EXT3_SB(sb)->s_es, n_blocks_count);
+		journal_lock_updates(EXT3_SB(sb)->s_journal);
+		journal_flush(EXT3_SB(sb)->s_journal);
+		journal_unlock_updates(EXT3_SB(sb)->s_journal);
+
+		return err;
+	}
+	case EXT3_IOC_GROUP_ADD: {
+		struct ext3_new_group_data input;
+		struct super_block *sb = inode->i_sb;
+		int err;
+
+		if (!capable(CAP_SYS_RESOURCE))
+			return -EACCES;
+
+		if (inode->i_sb->s_flags & MS_RDONLY)
+			return -EROFS;
+
+		if (copy_from_user(&input, (struct ext3_new_group_input *)arg,
+				sizeof(input)))
+			return -EFAULT;
+
+		err = ext3_group_add(sb, &input);
+		journal_lock_updates(EXT3_SB(sb)->s_journal);
+		journal_flush(EXT3_SB(sb)->s_journal);
+		journal_unlock_updates(EXT3_SB(sb)->s_journal);
+
+		return err;
+	}
+
+
 	default:
 		return -ENOTTY;
 	}
--- diff/fs/ext3/namei.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/ext3/namei.c	2004-07-01 21:32:48.000000000 +0100
@@ -557,6 +557,8 @@
 		    ((hinfo->hash == start_hash) &&
 		     (hinfo->minor_hash < start_minor_hash)))
 			continue;
+		if (de->inode == 0)
+			continue;
 		if ((err = ext3_htree_store_dirent(dir_file,
 				   hinfo->hash, hinfo->minor_hash, de)) != 0) {
 			brelse(bh);
@@ -1630,8 +1632,9 @@
 {
 	handle_t *handle; 
 	struct inode * inode;
-	int err;
+	int err, retries = 0;
 
+retry:
 	handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS +
 					EXT3_INDEX_EXTRA_TRANS_BLOCKS + 3 +
 					2*EXT3_QUOTA_INIT_BLOCKS);
@@ -1650,6 +1653,8 @@
 		err = ext3_add_nondir(handle, dentry, inode);
 	}
 	ext3_journal_stop(handle);
+	if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
+		goto retry;
 	return err;
 }
 
@@ -1658,11 +1663,12 @@
 {
 	handle_t *handle;
 	struct inode *inode;
-	int err;
+	int err, retries = 0;
 
 	if (!new_valid_dev(rdev))
 		return -EINVAL;
 
+retry:
 	handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS +
 			 		EXT3_INDEX_EXTRA_TRANS_BLOCKS + 3 +
 					2*EXT3_QUOTA_INIT_BLOCKS);
@@ -1682,6 +1688,8 @@
 		err = ext3_add_nondir(handle, dentry, inode);
 	}
 	ext3_journal_stop(handle);
+	if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
+		goto retry;
 	return err;
 }
 
@@ -1691,11 +1699,12 @@
 	struct inode * inode;
 	struct buffer_head * dir_block;
 	struct ext3_dir_entry_2 * de;
-	int err;
+	int err, retries = 0;
 
 	if (dir->i_nlink >= EXT3_LINK_MAX)
 		return -EMLINK;
 
+retry:
 	handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS +
 					EXT3_INDEX_EXTRA_TRANS_BLOCKS + 3 +
 					2*EXT3_QUOTA_INIT_BLOCKS);
@@ -1753,6 +1762,8 @@
 	d_instantiate(dentry, inode);
 out_stop:
 	ext3_journal_stop(handle);
+	if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
+		goto retry;
 	return err;
 }
 
@@ -2092,12 +2103,13 @@
 {
 	handle_t *handle;
 	struct inode * inode;
-	int l, err;
+	int l, err, retries = 0;
 
 	l = strlen(symname)+1;
 	if (l > dir->i_sb->s_blocksize)
 		return -ENAMETOOLONG;
 
+retry:
 	handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS +
 			 		EXT3_INDEX_EXTRA_TRANS_BLOCKS + 5 +
 					2*EXT3_QUOTA_INIT_BLOCKS);
@@ -2136,6 +2148,8 @@
 	err = ext3_add_nondir(handle, dentry, inode);
 out_stop:
 	ext3_journal_stop(handle);
+	if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
+		goto retry;
 	return err;
 }
 
@@ -2144,11 +2158,12 @@
 {
 	handle_t *handle;
 	struct inode *inode = old_dentry->d_inode;
-	int err;
+	int err, retries = 0;
 
 	if (inode->i_nlink >= EXT3_LINK_MAX)
 		return -EMLINK;
 
+retry:
 	handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS +
 					EXT3_INDEX_EXTRA_TRANS_BLOCKS);
 	if (IS_ERR(handle))
@@ -2163,6 +2178,8 @@
 
 	err = ext3_add_nondir(handle, dentry, inode);
 	ext3_journal_stop(handle);
+	if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
+		goto retry;
 	return err;
 }
 
--- diff/fs/ext3/super.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/ext3/super.c	2004-07-01 21:32:48.000000000 +0100
@@ -493,10 +493,9 @@
 		printk(KERN_INFO "ext3_inode_cache: not all structures were freed\n");
 }
 
-#ifdef CONFIG_EXT3_FS_POSIX_ACL
-
 static void ext3_clear_inode(struct inode *inode)
 {
+#ifdef CONFIG_EXT3_FS_POSIX_ACL
        if (EXT3_I(inode)->i_acl &&
            EXT3_I(inode)->i_acl != EXT3_ACL_NOT_CACHED) {
                posix_acl_release(EXT3_I(inode)->i_acl);
@@ -507,11 +506,10 @@
                posix_acl_release(EXT3_I(inode)->i_default_acl);
                EXT3_I(inode)->i_default_acl = EXT3_ACL_NOT_CACHED;
        }
-}
-
-#else
-# define ext3_clear_inode NULL
 #endif
+	if (!is_bad_inode(inode))
+		ext3_discard_reservation(inode);
+}
 
 #ifdef CONFIG_QUOTA
 
@@ -561,7 +559,6 @@
 	.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,
@@ -582,12 +579,13 @@
 	Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid,
 	Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, Opt_err_ro,
 	Opt_nouid32, Opt_check, Opt_nocheck, Opt_debug, Opt_oldalloc, Opt_orlov,
-	Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl, Opt_noload,
+	Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl,
+	Opt_reservation, Opt_noreservation, Opt_noload,
 	Opt_commit, Opt_journal_update, Opt_journal_inum,
 	Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0,
-	Opt_ignore, Opt_err,
+	Opt_ignore, Opt_barrier, Opt_err, Opt_resize,
 };
 
 static match_table_t tokens = {
@@ -614,6 +612,8 @@
 	{Opt_nouser_xattr, "nouser_xattr"},
 	{Opt_acl, "acl"},
 	{Opt_noacl, "noacl"},
+	{Opt_reservation, "reservation"},
+	{Opt_noreservation, "noreservation"},
 	{Opt_noload, "noload"},
 	{Opt_commit, "commit=%u"},
 	{Opt_journal_update, "journal=update"},
@@ -632,7 +632,9 @@
 	{Opt_ignore, "noquota"},
 	{Opt_ignore, "quota"},
 	{Opt_ignore, "usrquota"},
-	{Opt_err, NULL}
+	{Opt_barrier, "barrier=%u"},
+	{Opt_err, NULL},
+	{Opt_resize, "resize"},
 };
 
 static unsigned long get_sb_block(void **data)
@@ -656,7 +658,7 @@
 }
 
 static int parse_options (char * options, struct super_block *sb,
-			  unsigned long * inum, int is_remount)
+			  unsigned long * inum, unsigned long *n_blocks_count, int is_remount)
 {
 	struct ext3_sb_info *sbi = EXT3_SB(sb);
 	char * p;
@@ -767,6 +769,12 @@
 			printk("EXT3 (no)acl options not supported\n");
 			break;
 #endif
+		case Opt_reservation:
+			set_opt(sbi->s_mount_opt, RESERVATION);
+			break;
+		case Opt_noreservation:
+			clear_opt(sbi->s_mount_opt, RESERVATION);
+			break;
 		case Opt_journal_update:
 			/* @@@ FIXME */
 			/* Eventually we will want to be able to create
@@ -897,8 +905,25 @@
 		case Opt_abort:
 			set_opt(sbi->s_mount_opt, ABORT);
 			break;
+		case Opt_barrier:
+			if (match_int(&args[0], &option))
+				return 0;
+			if (option)
+				set_opt(sbi->s_mount_opt, BARRIER);
+			else
+				clear_opt(sbi->s_mount_opt, BARRIER);
+			break;
 		case Opt_ignore:
 			break;
+		case Opt_resize:
+			if (!n_blocks_count) {
+				printk("EXT3-fs: resize option only available "
+					"for remount\n");
+				return 0;
+			}
+			match_int(&args[0], &option);
+			*n_blocks_count = option;
+			break;
 		default:
 			printk (KERN_ERR
 				"EXT3-fs: Unrecognized mount option \"%s\" "
@@ -1288,7 +1313,9 @@
 	sbi->s_resuid = le16_to_cpu(es->s_def_resuid);
 	sbi->s_resgid = le16_to_cpu(es->s_def_resgid);
 
-	if (!parse_options ((char *) data, sb, &journal_inum, 0))
+	set_opt(sbi->s_mount_opt, RESERVATION);
+
+	if (!parse_options ((char *) data, sb, &journal_inum, NULL, 0))
 		goto failed_mount;
 
 	sb->s_flags |= MS_ONE_SECOND;
@@ -1462,6 +1489,14 @@
 	sbi->s_gdb_count = db_count;
 	get_random_bytes(&sbi->s_next_generation, sizeof(u32));
 	spin_lock_init(&sbi->s_next_gen_lock);
+	/* per fileystem reservation list head & lock */
+	spin_lock_init(&sbi->s_rsv_window_lock);
+	INIT_LIST_HEAD(&sbi->s_rsv_window_head.rsv_list);
+	sbi->s_rsv_window_head.rsv_start = 0;
+	sbi->s_rsv_window_head.rsv_end = 0;
+	sbi->s_rsv_window_head.rsv_alloc_hit = 0;
+	atomic_set(&sbi->s_rsv_window_head.rsv_goal_size, 0);
+
 	/*
 	 * set up enough so that it can read an inode
 	 */
@@ -1599,16 +1634,23 @@
  * initial mount, once the journal has been initialised but before we've
  * done any recovery; and again on any subsequent remount. 
  */
-static void ext3_init_journal_params(struct ext3_sb_info *sbi, 
-				     journal_t *journal)
+static void ext3_init_journal_params(struct super_block *sb, journal_t *journal)
 {
+	struct ext3_sb_info *sbi = EXT3_SB(sb);
+
 	if (sbi->s_commit_interval)
 		journal->j_commit_interval = sbi->s_commit_interval;
 	/* We could also set up an ext3-specific default for the commit
 	 * interval here, but for now we'll just fall back to the jbd
 	 * default. */
-}
 
+	spin_lock(&journal->j_state_lock);
+	if (test_opt(sb, BARRIER))
+		journal->j_flags |= JFS_BARRIER;
+	else
+		journal->j_flags &= ~JFS_BARRIER;
+	spin_unlock(&journal->j_state_lock);
+}
 
 static journal_t *ext3_get_journal(struct super_block *sb, int journal_inum)
 {
@@ -1646,7 +1688,7 @@
 		return NULL;
 	}
 	journal->j_private = sb;
-	ext3_init_journal_params(EXT3_SB(sb), journal);
+	ext3_init_journal_params(sb, journal);
 	return journal;
 }
 
@@ -1731,7 +1773,7 @@
 		goto out_journal;
 	}
 	EXT3_SB(sb)->journal_bdev = bdev;
-	ext3_init_journal_params(EXT3_SB(sb), journal);
+	ext3_init_journal_params(sb, journal);
 	return journal;
 out_journal:
 	journal_destroy(journal);
@@ -2013,11 +2055,12 @@
 	struct ext3_super_block * es;
 	struct ext3_sb_info *sbi = EXT3_SB(sb);
 	unsigned long tmp;
+	unsigned long n_blocks_count = 0;
 
 	/*
 	 * Allow the "check" option to be passed as a remount option.
 	 */
-	if (!parse_options(data, sb, &tmp, 1))
+	if (!parse_options(data, sb, &tmp, &n_blocks_count, 1))
 		return -EINVAL;
 
 	if (sbi->s_mount_opt & EXT3_MOUNT_ABORT)
@@ -2028,9 +2071,10 @@
 
 	es = sbi->s_es;
 
-	ext3_init_journal_params(sbi, sbi->s_journal);
+	ext3_init_journal_params(sb, sbi->s_journal);
 
-	if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
+	if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY) ||
+		n_blocks_count > le32_to_cpu(es->s_blocks_count)) {
 		if (sbi->s_mount_opt & EXT3_MOUNT_ABORT)
 			return -EROFS;
 
@@ -2069,6 +2113,8 @@
 			 */
 			ext3_clear_journal_err(sb, es);
 			sbi->s_mount_state = le16_to_cpu(es->s_state);
+			if ((ret = ext3_group_extend(sb, es, n_blocks_count)))
+				return ret;
 			if (!ext3_setup_super (sb, es, 0))
 				sb->s_flags &= ~MS_RDONLY;
 		}
--- diff/fs/ext3/symlink.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/ext3/symlink.c	2004-07-01 21:32:48.000000000 +0100
@@ -20,24 +20,20 @@
 #include <linux/fs.h>
 #include <linux/jbd.h>
 #include <linux/ext3_fs.h>
+#include <linux/namei.h>
 #include "xattr.h"
 
-static int
-ext3_readlink(struct dentry *dentry, char __user *buffer, int buflen)
-{
-	struct ext3_inode_info *ei = EXT3_I(dentry->d_inode);
-	return vfs_readlink(dentry, buffer, buflen, (char*)ei->i_data);
-}
-
 static int ext3_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	struct ext3_inode_info *ei = EXT3_I(dentry->d_inode);
-	return vfs_follow_link(nd, (char*)ei->i_data);
+	nd_set_link(nd, (char*)ei->i_data);
+	return 0;
 }
 
 struct inode_operations ext3_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.setxattr	= ext3_setxattr,
 	.getxattr	= ext3_getxattr,
 	.listxattr	= ext3_listxattr,
@@ -45,8 +41,8 @@
 };
 
 struct inode_operations ext3_fast_symlink_inode_operations = {
-	.readlink	= ext3_readlink,	/* BKL not held.  Don't need */
-	.follow_link	= ext3_follow_link,	/* BKL not held.  Don't need */
+	.readlink	= generic_readlink,
+	.follow_link	= ext3_follow_link,
 	.setxattr	= ext3_setxattr,
 	.getxattr	= ext3_getxattr,
 	.listxattr	= ext3_listxattr,
--- diff/fs/ext3/xattr.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/ext3/xattr.c	2004-07-01 21:32:48.000000000 +0100
@@ -787,7 +787,7 @@
 				EXT3_I(inode)->i_block_group *
 				EXT3_BLOCKS_PER_GROUP(sb);
 			int block = ext3_new_block(handle,
-				inode, goal, 0, 0, &error);
+				inode, goal, &error);
 			if (error)
 				goto cleanup;
 			ea_idebug(inode, "creating block %d", block);
@@ -875,8 +875,9 @@
 	       const void *value, size_t value_len, int flags)
 {
 	handle_t *handle;
-	int error;
+	int error, retries = 0;
 
+retry:
 	handle = ext3_journal_start(inode, EXT3_DATA_TRANS_BLOCKS);
 	if (IS_ERR(handle)) {
 		error = PTR_ERR(handle);
@@ -886,6 +887,9 @@
 		error = ext3_xattr_set_handle(handle, inode, name_index, name,
 					      value, value_len, flags);
 		error2 = ext3_journal_stop(handle);
+		if (error == -ENOSPC &&
+		    ext3_should_retry_alloc(inode->i_sb, &retries))
+			goto retry;
 		if (error == 0)
 			error = error2;
 	}
--- diff/fs/fat/inode.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/fat/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -23,6 +23,14 @@
 #include <linux/parser.h>
 #include <asm/unaligned.h>
 
+#ifndef CONFIG_FAT_DEFAULT_IOCHARSET
+/* if user don't select VFAT, this is undefined. */
+#define CONFIG_FAT_DEFAULT_IOCHARSET	""
+#endif
+
+static int fat_default_codepage = CONFIG_FAT_DEFAULT_CODEPAGE;
+static char fat_default_iocharset[] = CONFIG_FAT_DEFAULT_IOCHARSET;
+
 /*
  * New FAT inode stuff. We do the following:
  *	a) i_ino is constant and has nothing with on-disk location.
@@ -166,20 +174,17 @@
 	if (sbi->nls_disk) {
 		unload_nls(sbi->nls_disk);
 		sbi->nls_disk = NULL;
-		sbi->options.codepage = 0;
+		sbi->options.codepage = fat_default_codepage;
 	}
 	if (sbi->nls_io) {
 		unload_nls(sbi->nls_io);
 		sbi->nls_io = NULL;
 	}
-	/*
-	 * Note: the iocharset option might have been specified
-	 * without enabling nls_io, so check for it here.
-	 */
-	if (sbi->options.iocharset) {
+	if (sbi->options.iocharset != fat_default_iocharset) {
 		kfree(sbi->options.iocharset);
-		sbi->options.iocharset = NULL;
+		sbi->options.iocharset = fat_default_iocharset;
 	}
+
 	sb->s_fs_info = NULL;
 	kfree(sbi);
 }
@@ -196,11 +201,11 @@
 		seq_printf(m, ",gid=%u", opts->fs_gid);
 	seq_printf(m, ",fmask=%04o", opts->fs_fmask);
 	seq_printf(m, ",dmask=%04o", opts->fs_dmask);
-	if (sbi->nls_disk)
+	if (sbi->nls_disk && opts->codepage != fat_default_codepage)
 		seq_printf(m, ",codepage=%s", sbi->nls_disk->charset);
 	if (isvfat) {
-		if (sbi->nls_io
-		    && strcmp(sbi->nls_io->charset, CONFIG_NLS_DEFAULT))
+		if (sbi->nls_io &&
+		    strcmp(opts->iocharset, fat_default_iocharset))
 			seq_printf(m, ",iocharset=%s", sbi->nls_io->charset);
 
 		switch (opts->shortname) {
@@ -331,14 +336,15 @@
 	char *p;
 	substring_t args[MAX_OPT_ARGS];
 	int option;
+	char *iocharset;
 
 	opts->isvfat = is_vfat;
 
 	opts->fs_uid = current->uid;
 	opts->fs_gid = current->gid;
 	opts->fs_fmask = opts->fs_dmask = current->fs->umask;
-	opts->codepage = 0;
-	opts->iocharset = NULL;
+	opts->codepage = fat_default_codepage;
+	opts->iocharset = fat_default_iocharset;
 	if (is_vfat)
 		opts->shortname = VFAT_SFN_DISPLAY_LOWER|VFAT_SFN_CREATE_WIN95;
 	else
@@ -351,7 +357,7 @@
 	*debug = 0;
 
 	if (!options)
-		return 1;
+		return 0;
 
 	while ((p = strsep(&options, ",")) != NULL) {
 		int token;
@@ -437,10 +443,12 @@
 
 		/* vfat specific */
 		case Opt_charset:
-			kfree(opts->iocharset);
-			opts->iocharset = match_strdup(&args[0]);
-			if (!opts->iocharset)
-				return 0;
+			if (opts->iocharset != fat_default_iocharset)
+				kfree(opts->iocharset);
+			iocharset = match_strdup(&args[0]);
+			if (!iocharset)
+				return -ENOMEM;
+			opts->iocharset = iocharset;
 			break;
 		case Opt_shortname_lower:
 			opts->shortname = VFAT_SFN_DISPLAY_LOWER
@@ -486,14 +494,19 @@
 		default:
 			printk(KERN_ERR "FAT: Unrecognized mount option \"%s\" "
 			       "or missing value\n", p);
-			return 0;
+			return -EINVAL;
 		}
 	}
+	/* UTF8 doesn't provide FAT semantics */
+	if (!strcmp(opts->iocharset, "utf8")) {
+		printk(KERN_ERR "FAT: utf8 is not a recommended IO charset"
+		       " for FAT filesystems, filesystem will be case sensitive!\n");
+	}
 
 	if (opts->unicode_xlate)
 		opts->utf8 = 0;
 	
-	return 1;
+	return 0;
 }
 
 static int fat_calc_dir_size(struct inode *inode)
@@ -784,7 +797,7 @@
 	struct msdos_sb_info *sbi;
 	u16 logical_sector_size;
 	u32 total_sectors, total_clusters, fat_clusters, rootdir_sectors;
-	int debug, cp, first;
+	int debug, first;
 	unsigned int media;
 	long error;
 	char buf[50];
@@ -801,8 +814,8 @@
 	sb->s_export_op = &fat_export_ops;
 	sbi->dir_ops = fs_dir_inode_ops;
 
-	error = -EINVAL;
-	if (!parse_options(data, isvfat, &debug, &sbi->options))
+	error = parse_options(data, isvfat, &debug, &sbi->options);
+	if (error)
 		goto out_fail;
 
 	fat_cache_init(sb);
@@ -1009,31 +1022,21 @@
 	}
 
 	error = -EINVAL;
-	cp = sbi->options.codepage ? sbi->options.codepage : 437;
-	sprintf(buf, "cp%d", cp);
+	sprintf(buf, "cp%d", sbi->options.codepage);
 	sbi->nls_disk = load_nls(buf);
 	if (!sbi->nls_disk) {
-		/* Fail only if explicit charset specified */
-		if (sbi->options.codepage != 0) {
-			printk(KERN_ERR "FAT: codepage %s not found\n", buf);
-			goto out_fail;
-		}
-		sbi->options.codepage = 0; /* already 0?? */
-		sbi->nls_disk = load_nls_default();
+		printk(KERN_ERR "FAT: codepage %s not found\n", buf);
+		goto out_fail;
 	}
 
 	/* FIXME: utf8 is using iocharset for upper/lower conversion */
 	if (sbi->options.isvfat) {
-		if (sbi->options.iocharset != NULL) {
-			sbi->nls_io = load_nls(sbi->options.iocharset);
-			if (!sbi->nls_io) {
-				printk(KERN_ERR
-				       "FAT: IO charset %s not found\n",
-				       sbi->options.iocharset);
-				goto out_fail;
-			}
-		} else
-			sbi->nls_io = load_nls_default();
+		sbi->nls_io = load_nls(sbi->options.iocharset);
+		if (!sbi->nls_io) {
+			printk(KERN_ERR "FAT: IO charset %s not found\n",
+			       sbi->options.iocharset);
+			goto out_fail;
+		}
 	}
 
 	error = -ENOMEM;
@@ -1068,7 +1071,7 @@
 		unload_nls(sbi->nls_io);
 	if (sbi->nls_disk)
 		unload_nls(sbi->nls_disk);
-	if (sbi->options.iocharset)
+	if (sbi->options.iocharset != fat_default_iocharset)
 		kfree(sbi->options.iocharset);
 	sb->s_fs_info = NULL;
 	kfree(sbi);
--- diff/fs/fcntl.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/fcntl.c	2004-07-01 21:32:48.000000000 +0100
@@ -212,7 +212,7 @@
 	return ret;
 }
 
-#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | FASYNC | O_DIRECT)
+#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | FASYNC | O_DIRECT | O_NOATIME)
 
 static int setfl(int fd, struct file * filp, unsigned long arg)
 {
@@ -223,6 +223,11 @@
 	if (!(arg & O_APPEND) && IS_APPEND(inode))
 		return -EPERM;
 
+	/* O_NOATIME can only be set by the owner or superuser */
+	if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME))
+		if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER))
+			return -EPERM;
+
 	/* required for strict SunOS emulation */
 	if (O_NONBLOCK != O_NDELAY)
 	       if (arg & O_NDELAY)
--- diff/fs/freevxfs/vxfs_immed.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/freevxfs/vxfs_immed.c	2004-07-01 21:32:48.000000000 +0100
@@ -32,12 +32,12 @@
  */
 #include <linux/fs.h>
 #include <linux/pagemap.h>
+#include <linux/namei.h>
 
 #include "vxfs.h"
 #include "vxfs_inode.h"
 
 
-static int	vxfs_immed_readlink(struct dentry *, char __user *, int);
 static int	vxfs_immed_follow_link(struct dentry *, struct nameidata *);
 
 static int	vxfs_immed_readpage(struct file *, struct page *);
@@ -49,7 +49,7 @@
  * but do all work directly on the inode.
  */
 struct inode_operations vxfs_immed_symlink_iops = {
-	.readlink =		vxfs_immed_readlink,
+	.readlink =		generic_readlink,
 	.follow_link =		vxfs_immed_follow_link,
 };
 
@@ -60,28 +60,6 @@
 	.readpage =		vxfs_immed_readpage,
 };
 
-
-/**
- * vxfs_immed_readlink - read immed symlink
- * @dp:		dentry for the link
- * @bp:		output buffer
- * @buflen:	length of @bp
- *
- * Description:
- *   vxfs_immed_readlink calls vfs_readlink to read the link
- *   described by @dp into userspace.
- *
- * Returns:
- *   Number of bytes successfully copied to userspace.
- */
-static int
-vxfs_immed_readlink(struct dentry *dp, char __user *bp, int buflen)
-{
-	struct vxfs_inode_info		*vip = VXFS_INO(dp->d_inode);
-
-	return (vfs_readlink(dp, bp, buflen, vip->vii_immed.vi_immed));
-}
-
 /**
  * vxfs_immed_follow_link - follow immed symlink
  * @dp:		dentry for the link
@@ -98,8 +76,8 @@
 vxfs_immed_follow_link(struct dentry *dp, struct nameidata *np)
 {
 	struct vxfs_inode_info		*vip = VXFS_INO(dp->d_inode);
-
-	return (vfs_follow_link(np, vip->vii_immed.vi_immed));
+	nd_set_link(np, vip->vii_immed.vi_immed);
+	return 0;
 }
 
 /**
--- diff/fs/fs-writeback.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/fs-writeback.c	2004-07-01 21:32:48.000000000 +0100
@@ -225,6 +225,7 @@
 			 * The inode is clean, unused
 			 */
 			list_move(&inode->i_list, &inode_unused);
+			inodes_stat.nr_unused++;
 		}
 	}
 	wake_up_inode(inode);
@@ -302,14 +303,20 @@
 		long pages_skipped;
 
 		if (bdi->memory_backed) {
+			list_move(&inode->i_list, &sb->s_dirty);
 			if (sb == blockdev_superblock) {
 				/*
 				 * Dirty memory-backed blockdev: the ramdisk
-				 * driver does this.
+				 * driver does this.  Skip just this inode
 				 */
-				list_move(&inode->i_list, &sb->s_dirty);
 				continue;
 			}
+			/*
+			 * Dirty memory-backed inode against a filesystem other
+			 * than the kernel-internal bdev filesystem.  Skip the
+			 * entire superblock.
+			 */
+			break;
 		}
 
 		if (wbc->nonblocking && bdi_write_congested(bdi)) {
--- diff/fs/hfs/super.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/hfs/super.c	2004-07-01 21:32:48.000000000 +0100
@@ -161,7 +161,7 @@
 	if (!options)
 		return 1;
 
-	while ((this_char = strsep(&options, ","))) {
+	while ((this_char = strsep(&options, ",")) != 0) {
 		if (!*this_char)
 			continue;
 		value = strchr(this_char, '=');
--- diff/fs/hfsplus/bnode.c	2004-05-19 22:12:26.000000000 +0100
+++ source/fs/hfsplus/bnode.c	2004-07-01 21:32:48.000000000 +0100
@@ -34,7 +34,7 @@
 	memcpy(buf, kmap(*pagep) + off, l);
 	kunmap(*pagep);
 
-	while ((len -= l)) {
+	while ((len -= l) != 0) {
 		buf += l;
 		l = min(len, (int)PAGE_CACHE_SIZE);
 		memcpy(buf, kmap(*++pagep), l);
@@ -87,7 +87,7 @@
 	set_page_dirty(*pagep);
 	kunmap(*pagep);
 
-	while ((len -= l)) {
+	while ((len -= l) != 0) {
 		buf += l;
 		l = min(len, (int)PAGE_CACHE_SIZE);
 		memcpy(kmap(*++pagep), buf, l);
@@ -117,7 +117,7 @@
 	set_page_dirty(*pagep);
 	kunmap(*pagep);
 
-	while ((len -= l)) {
+	while ((len -= l) != 0) {
 		l = min(len, (int)PAGE_CACHE_SIZE);
 		memset(kmap(*++pagep), 0, l);
 		set_page_dirty(*pagep);
@@ -150,7 +150,7 @@
 		set_page_dirty(*dst_page);
 		kunmap(*dst_page);
 
-		while ((len -= l)) {
+		while ((len -= l) != 0) {
 			l = min(len, (int)PAGE_CACHE_SIZE);
 			memcpy(kmap(*++dst_page), kmap(*++src_page), l);
 			kunmap(*src_page);
@@ -258,7 +258,7 @@
 			set_page_dirty(*dst_page);
 			kunmap(*dst_page);
 
-			while ((len -= l)) {
+			while ((len -= l) != 0) {
 				l = min(len, (int)PAGE_CACHE_SIZE);
 				memmove(kmap(*++dst_page), kmap(*++src_page), l);
 				kunmap(*src_page);
--- diff/fs/hfsplus/wrapper.c	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hfsplus/wrapper.c	2004-07-01 21:32:48.000000000 +0100
@@ -135,7 +135,7 @@
 		return -EINVAL;
 	HFSPLUS_SB(sb).alloc_blksz = blocksize;
 	HFSPLUS_SB(sb).alloc_blksz_shift = 0;
-	while (blocksize >>= 1)
+	while ((blocksize >>= 1) != 0)
 		HFSPLUS_SB(sb).alloc_blksz_shift++;
 	blocksize = min(HFSPLUS_SB(sb).alloc_blksz, (u32)PAGE_SIZE);
 
--- diff/fs/hpfs/alloc.c	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hpfs/alloc.c	2004-07-01 21:32:48.000000000 +0100
@@ -79,16 +79,16 @@
 	} else {
 		if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) goto uls;
 	}
-	/*if (!tstbits(bmp, nr + n, n + forward)) {
+	if (!tstbits(bmp, nr, n + forward)) {
 		ret = bs + nr;
 		goto rt;
 	}
-	if (!tstbits(bmp, nr + 2*n, n + forward)) {
+	/*if (!tstbits(bmp, nr + n, n + forward)) {
 		ret = bs + nr + n;
 		goto rt;
 	}*/
 	q = nr + n; b = 0;
-	while ((a = tstbits(bmp, q, n + forward))) {
+	while ((a = tstbits(bmp, q, n + forward)) != 0) {
 		q += a;
 		if (n != 1) q = ((q-1)&~(n-1))+n;
 		if (!b) {
@@ -103,9 +103,11 @@
 		goto rt;
 	}
 	nr >>= 5;
-	for (i = nr + 1; i != nr; i++, i &= 0x1ff) {
-		if (!bmp[i]) continue;
-		if (n + forward >= 0x3f && bmp[i] != -1) continue;
+	/*for (i = nr + 1; i != nr; i++, i &= 0x1ff) {*/
+	i = nr;
+	do {
+		if (!bmp[i]) goto cont;
+		if (n + forward >= 0x3f && bmp[i] != -1) goto cont;
 		q = i<<5;
 		if (i > 0) {
 			unsigned k = bmp[i-1];
@@ -114,7 +116,7 @@
 			}
 		}
 		if (n != 1) q = ((q-1)&~(n-1))+n;
-		while ((a = tstbits(bmp, q, n + forward))) {
+		while ((a = tstbits(bmp, q, n + forward)) != 0) {
 			q += a;
 			if (n != 1) q = ((q-1)&~(n-1))+n;
 			if (q>>5 > i) break;
@@ -123,7 +125,9 @@
 			ret = bs + q;
 			goto rt;
 		}
-	}
+		cont:
+		i++, i &= 0x1ff;
+	} while (i != nr);
 	rt:
 	if (ret) {
 		if (hpfs_sb(s)->sb_chk && ((ret >> 14) != (bs >> 14) || (bmp[(ret & 0x3fff) >> 5] | ~(((1 << n) - 1) << (ret & 0x1f))) != 0xffffffff)) {
@@ -152,46 +156,57 @@
 secno hpfs_alloc_sector(struct super_block *s, secno near, unsigned n, int forward, int lock)
 {
 	secno sec;
-	unsigned i;
+	int i;
 	unsigned n_bmps;
 	struct hpfs_sb_info *sbi = hpfs_sb(s);
-	int b = sbi->sb_c_bitmap;
 	int f_p = 0;
+	int near_bmp;
 	if (forward < 0) {
 		forward = -forward;
 		f_p = 1;
 	}
 	if (lock) hpfs_lock_creation(s);
-	if (near && near < sbi->sb_fs_size)
+	n_bmps = (sbi->sb_fs_size + 0x4000 - 1) >> 14;
+	if (near && near < sbi->sb_fs_size) {
 		if ((sec = alloc_in_bmp(s, near, n, f_p ? forward : forward/4))) goto ret;
+		near_bmp = near >> 14;
+	} else near_bmp = n_bmps / 2;
+	/*
 	if (b != -1) {
 		if ((sec = alloc_in_bmp(s, b<<14, n, f_p ? forward : forward/2))) {
 			b &= 0x0fffffff;
 			goto ret;
 		}
 		if (b > 0x10000000) if ((sec = alloc_in_bmp(s, (b&0xfffffff)<<14, n, f_p ? forward : 0))) goto ret;
-	}	
-	n_bmps = (sbi->sb_fs_size + 0x4000 - 1) >> 14;
-	for (i = 0; i < n_bmps / 2; i++) {
-		if ((sec = alloc_in_bmp(s, (n_bmps/2+i) << 14, n, forward))) {
-			sbi->sb_c_bitmap = n_bmps/2+i;
+	*/
+	if (!f_p) if (forward > sbi->sb_max_fwd_alloc) forward = sbi->sb_max_fwd_alloc;
+	less_fwd:
+	for (i = 0; i < n_bmps; i++) {
+		if (near_bmp+i < n_bmps && ((sec = alloc_in_bmp(s, (near_bmp+i) << 14, n, forward)))) {
+			sbi->sb_c_bitmap = near_bmp+i;
 			goto ret;
 		}	
-		if ((sec = alloc_in_bmp(s, (n_bmps/2-i-1) << 14, n, forward))) {
-			sbi->sb_c_bitmap = n_bmps/2-i-1;
+		if (!forward) {
+			if (near_bmp-i-1 >= 0 && ((sec = alloc_in_bmp(s, (near_bmp-i-1) << 14, n, forward)))) {
+				sbi->sb_c_bitmap = near_bmp-i-1;
+				goto ret;
+			}
+		} else {
+			if (near_bmp+i >= n_bmps && ((sec = alloc_in_bmp(s, (near_bmp+i-n_bmps) << 14, n, forward)))) {
+				sbi->sb_c_bitmap = near_bmp+i-n_bmps;
+				goto ret;
+			}
+		}
+		if (i == 1 && sbi->sb_c_bitmap != -1 && ((sec = alloc_in_bmp(s, (sbi->sb_c_bitmap) << 14, n, forward)))) {
 			goto ret;
 		}
 	}
-	if ((sec = alloc_in_bmp(s, (n_bmps-1) << 14, n, forward))) {
-		sbi->sb_c_bitmap = n_bmps-1;
-		goto ret;
-	}
 	if (!f_p) {
-		for (i = 0; i < n_bmps; i++)
-			if ((sec = alloc_in_bmp(s, i << 14, n, 0))) {
-				sbi->sb_c_bitmap = 0x10000000 + i;
-				goto ret;
-			}
+		if (forward) {
+			sbi->sb_max_fwd_alloc = forward * 3 / 4;
+			forward /= 2;
+			goto less_fwd;
+		}
 	}
 	sec = 0;
 	ret:
@@ -262,6 +277,7 @@
 {
 	struct quad_buffer_head qbh;
 	unsigned *bmp;
+	struct hpfs_sb_info *sbi = hpfs_sb(s);
 	/*printk("2 - ");*/
 	if (!n) return;
 	if (sec < 0x12) {
@@ -269,6 +285,8 @@
 		return;
 	}
 	lock_super(s);
+	sbi->sb_max_fwd_alloc += n > 0xffff ? 0xffff : n;
+	if (sbi->sb_max_fwd_alloc > 0xffffff) sbi->sb_max_fwd_alloc = 0xffffff;
 	new_map:
 	if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "free"))) {
 		unlock_super(s);
@@ -321,7 +339,7 @@
 	}
 	hpfs_brelse4(&qbh);
 	i = 0;
-	if (hpfs_sb(s)->sb_c_bitmap != -1 ) {
+	if (hpfs_sb(s)->sb_c_bitmap != -1) {
 		bmp = hpfs_map_bitmap(s, b, &qbh, "chkdn1");
 		goto chk_bmp;
 	}
--- diff/fs/hpfs/anode.c	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hpfs/anode.c	2004-07-01 21:32:48.000000000 +0100
@@ -113,7 +113,7 @@
 			brelse(bh);
 			return -1;
 		}
-		se = node;
+		se = !fnod ? node : (node + 16384) & ~16383;
 	}	
 	if (!(se = hpfs_alloc_sector(s, se, 1, fsecno*ALLOC_M>ALLOC_FWD_MAX ? ALLOC_FWD_MAX : fsecno*ALLOC_M<ALLOC_FWD_MIN ? ALLOC_FWD_MIN : fsecno*ALLOC_M, 1))) {
 		brelse(bh);
@@ -192,7 +192,6 @@
 		}
 		up = up != node ? anode->up : -1;
 		btree->u.internal[btree->n_used_nodes - 1].file_secno = /*fs*/-1;
-		if (up == -1) anode->up = ra;
 		mark_buffer_dirty(bh);
 		brelse(bh);
 		a = na;
--- diff/fs/hpfs/buffer.c	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hpfs/buffer.c	2004-07-01 21:32:48.000000000 +0100
@@ -31,6 +31,8 @@
 {
 	struct buffer_head *bh;
 
+	cond_resched();
+
 	*bhp = bh = sb_bread(s, secno);
 	if (bh != NULL)
 		return bh->b_data;
@@ -47,6 +49,8 @@
 	struct buffer_head *bh;
 	/*return hpfs_map_sector(s, secno, bhp, 0);*/
 
+	cond_resched();
+
 	if ((*bhp = bh = sb_getblk(s, secno)) != NULL) {
 		if (!buffer_uptodate(bh)) wait_on_buffer(bh);
 		set_buffer_uptodate(bh);
@@ -65,6 +69,8 @@
 	struct buffer_head *bh;
 	char *data;
 
+	cond_resched();
+
 	if (secno & 3) {
 		printk("HPFS: hpfs_map_4sectors: unaligned read\n");
 		return 0;
@@ -116,6 +122,8 @@
 void *hpfs_get_4sectors(struct super_block *s, unsigned secno,
                           struct quad_buffer_head *qbh)
 {
+	cond_resched();
+
 	if (secno & 3) {
 		printk("HPFS: hpfs_get_4sectors: unaligned read\n");
 		return 0;
--- diff/fs/hpfs/ea.c	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hpfs/ea.c	2004-07-01 21:32:48.000000000 +0100
@@ -234,7 +234,7 @@
 		}
 		pos += ea->namelen + ea->valuelen + 5;
 	}
-	if (!fnode->ea_size_s) {
+	if (!fnode->ea_offs) {
 		/*if (fnode->ea_size_s) {
 			hpfs_error(s, "fnode %08x: ea_size_s == %03x, ea_offs == 0",
 				inode->i_ino, fnode->ea_size_s);
@@ -242,15 +242,13 @@
 		}*/
 		fnode->ea_offs = 0xc4;
 	}
-	if (fnode->ea_offs < 0xc4 || fnode->ea_offs + fnode->ea_size_s > 0x200) {
+	if (fnode->ea_offs < 0xc4 || fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s > 0x200) {
 		hpfs_error(s, "fnode %08x: ea_offs == %03x, ea_size_s == %03x",
 			inode->i_ino, fnode->ea_offs, fnode->ea_size_s);
 		return;
 	}
 	if ((fnode->ea_size_s || !fnode->ea_size_l) &&
-	     fnode->ea_offs + fnode->ea_size_s + strlen(key) + size + 5 <= 0x200) {
-		/* I'm not sure ... maybe we overwrite ACL here. I have no info
-		   on it right now :-( */
+	     fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s + strlen(key) + size + 5 <= 0x200) {
 		ea = fnode_end_ea(fnode);
 		*(char *)ea = 0;
 		ea->namelen = strlen(key);
--- diff/fs/hpfs/hpfs.h	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hpfs/hpfs.h	2004-07-01 21:32:48.000000000 +0100
@@ -408,7 +408,7 @@
   unsigned file_size;			/* file length, bytes */
   unsigned n_needea;			/* number of EA's with NEEDEA set */
   char user_id[16];			/* unused */
-  unsigned ea_offs;			/* offset from start of fnode
+  unsigned short ea_offs;		/* offset from start of fnode
 					   to first fnode-resident ea */
   char dasd_limit_treshhold;
   char dasd_limit_delta;
--- diff/fs/hpfs/hpfs_fn.h	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hpfs/hpfs_fn.h	2004-07-01 21:32:48.000000000 +0100
@@ -87,6 +87,7 @@
 					/*	128 bytes lowercasing table */
 	unsigned *sb_bmp_dir;		/* main bitmap directory */
 	unsigned sb_c_bitmap;		/* current bitmap */
+	unsigned sb_max_fwd_alloc;	/* max forwad allocation */
 	struct semaphore hpfs_creation_de; /* when creating dirents, nobody else
 					   can alloc blocks */
 	/*unsigned sb_mounting : 1;*/
@@ -141,12 +142,12 @@
 
 static inline struct extended_attribute *fnode_ea(struct fnode *fnode)
 {
-	return (struct extended_attribute *)((char *)fnode + fnode->ea_offs);
+	return (struct extended_attribute *)((char *)fnode + fnode->ea_offs + fnode->acl_size_s);
 }
 
 static inline struct extended_attribute *fnode_end_ea(struct fnode *fnode)
 {
-	return (struct extended_attribute *)((char *)fnode + fnode->ea_offs + fnode->ea_size_s);
+	return (struct extended_attribute *)((char *)fnode + fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s);
 }
 
 static inline struct extended_attribute *next_ea(struct extended_attribute *ea)
--- diff/fs/hpfs/inode.c	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hpfs/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -144,11 +144,11 @@
 void hpfs_write_inode_ea(struct inode *i, struct fnode *fnode)
 {
 	struct hpfs_inode_info *hpfs_inode = hpfs_i(i);
-	if (fnode->acl_size_l || fnode->acl_size_s) {
-		/* Some unknown structures like ACL may be in fnode,
-		   we'd better not overwrite them */
+	/*if (fnode->acl_size_l || fnode->acl_size_s) {
+		   Some unknown structures like ACL may be in fnode,
+		   we'd better not overwrite them
 		hpfs_error(i->i_sb, "fnode %08x has some unknown HPFS386 stuctures", i->i_ino);
-	} else if (hpfs_sb(i->i_sb)->sb_eas >= 2) {
+	} else*/ if (hpfs_sb(i->i_sb)->sb_eas >= 2) {
 		u32 ea;
 		if ((i->i_uid != hpfs_sb(i->i_sb)->sb_uid) || hpfs_inode->i_ea_uid) {
 			ea = cpu_to_le32(i->i_uid);
@@ -218,16 +218,18 @@
 	struct hpfs_dirent *de;
 	if (i->i_ino == hpfs_sb(i->i_sb)->sb_root) return;
 	if (!(fnode = hpfs_map_fnode(i->i_sb, i->i_ino, &bh))) return;
-	if (i->i_ino != hpfs_sb(i->i_sb)->sb_root) {
+	if (i->i_ino != hpfs_sb(i->i_sb)->sb_root && i->i_nlink) {
 		if (!(de = map_fnode_dirent(i->i_sb, i->i_ino, fnode, &qbh))) {
 			brelse(bh);
 			return;
 		}
 	} else de = NULL;
 	if (S_ISREG(i->i_mode)) {
-		fnode->file_size = de->file_size = i->i_size;
+		fnode->file_size = i->i_size;
+		if (de) de->file_size = i->i_size;
 	} else if (S_ISDIR(i->i_mode)) {
-		fnode->file_size = de->file_size = 0;
+		fnode->file_size = 0;
+		if (de) de->file_size = 0;
 	}
 	hpfs_write_inode_ea(i, fnode);
 	if (de) {
--- diff/fs/hpfs/map.c	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hpfs/map.c	2004-07-01 21:32:48.000000000 +0100
@@ -142,7 +142,7 @@
 				}
 			}
 			if (fnode->ea_size_s && ((signed int)fnode->ea_offs < 0xc4 ||
-			   (signed int)fnode->ea_offs + fnode->ea_size_s > 0x200)) {
+			   (signed int)fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s > 0x200)) {
 				hpfs_error(s, "bad EA info in fnode %08x: ea_offs == %04x ea_size_s == %04x",
 					ino, fnode->ea_offs, fnode->ea_size_s);
 				goto bail;
@@ -225,14 +225,16 @@
 			}
 			for (p = 20; p < dnode->first_free; p += d[p] + (d[p+1] << 8)) {
 				struct hpfs_dirent *de = (struct hpfs_dirent *)((char *)dnode + p);
-				if (de->length > 292 || (de->length < 32) || (de->length & 3)) {
+				if (de->length > 292 || (de->length < 32) || (de->length & 3) || p + de->length > 2048) {
 					hpfs_error(s, "bad dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp);
 					goto bail;
 				}
 				if (((31 + de->namelen + de->down*4 + 3) & ~3) != de->length) {
+					if (((31 + de->namelen + de->down*4 + 3) & ~3) < de->length && s->s_flags & MS_RDONLY) goto ok;
 					hpfs_error(s, "namelen does not match dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp);
 					goto bail;
 				}
+				ok:
 				if (hpfs_sb(s)->sb_chk >= 2) b |= 1 << de->down;
 				if (de->down) if (de_down_pointer(de) < 0x10) {
 					hpfs_error(s, "bad down pointer in dnode %08x, dirent %03x, last %03x", secno, p, pp);
--- diff/fs/hpfs/super.c	2004-05-19 22:12:27.000000000 +0100
+++ source/fs/hpfs/super.c	2004-07-01 21:32:48.000000000 +0100
@@ -542,6 +542,7 @@
 	sbi->sb_was_error = 0;
 	sbi->sb_cp_table = NULL;
 	sbi->sb_c_bitmap = -1;
+	sbi->sb_max_fwd_alloc = 0xffffff;
 	
 	/* Load bitmap directory */
 	if (!(sbi->sb_bmp_dir = hpfs_load_bitmap_directory(s, superblock->bitmaps)))
--- diff/fs/hugetlbfs/inode.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/hugetlbfs/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -196,6 +196,7 @@
 
 	hlist_del_init(&inode->i_hash);
 	list_del_init(&inode->i_list);
+	list_del_init(&inode->i_sb_list);
 	inode->i_state |= I_FREEING;
 	inodes_stat.nr_inodes--;
 	spin_unlock(&inode_lock);
@@ -238,6 +239,7 @@
 	hlist_del_init(&inode->i_hash);
 out_truncate:
 	list_del_init(&inode->i_list);
+	list_del_init(&inode->i_sb_list);
 	inode->i_state |= I_FREEING;
 	inodes_stat.nr_inodes--;
 	spin_unlock(&inode_lock);
@@ -329,9 +331,6 @@
 	if (error)
 		goto out;
 
-	error = security_inode_setattr(dentry, attr);
-	if (error)
-		goto out;
 	if (ia_valid & ATTR_SIZE) {
 		error = -EINVAL;
 		if (!(attr->ia_size & ~HPAGE_MASK))
@@ -720,8 +719,11 @@
 
 static int can_do_hugetlb_shm(void)
 {
-	return likely(capable(CAP_IPC_LOCK) ||
-			in_group_p(sysctl_hugetlb_shm_group));
+	if (capable(CAP_IPC_LOCK))
+		return 1;
+	if (sysctl_hugetlb_shm_group == 0)
+		return 0;
+	return in_group_p(sysctl_hugetlb_shm_group);
 }
 
 struct file *hugetlb_zero_setup(size_t size)
--- diff/fs/inode.c	2004-06-30 14:25:56.000000000 +0100
+++ source/fs/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -20,6 +20,7 @@
 #include <linux/security.h>
 #include <linux/pagemap.h>
 #include <linux/cdev.h>
+#include <linux/bootmem.h>
 
 /*
  * This is needed for the following functions:
@@ -195,7 +196,7 @@
 	sema_init(&inode->i_sem, 1);
 	init_rwsem(&inode->i_alloc_sem);
 	INIT_RADIX_TREE(&inode->i_data.page_tree, GFP_ATOMIC);
-	spin_lock_init(&inode->i_data.tree_lock);
+	rwlock_init(&inode->i_data.tree_lock);
 	spin_lock_init(&inode->i_data.i_mmap_lock);
 	atomic_set(&inode->i_data.truncate_count, 0);
 	INIT_LIST_HEAD(&inode->i_data.private_list);
@@ -294,7 +295,7 @@
 /*
  * Invalidate all inodes for a device.
  */
-static int invalidate_list(struct list_head *head, struct super_block * sb, struct list_head * dispose)
+static int invalidate_list(struct list_head *head, struct list_head *dispose)
 {
 	struct list_head *next;
 	int busy = 0, count = 0;
@@ -307,12 +308,11 @@
 		next = next->next;
 		if (tmp == head)
 			break;
-		inode = list_entry(tmp, struct inode, i_list);
-		if (inode->i_sb != sb)
-			continue;
+		inode = list_entry(tmp, struct inode, i_sb_list);
 		invalidate_inode_buffers(inode);
 		if (!atomic_read(&inode->i_count)) {
 			hlist_del_init(&inode->i_hash);
+			list_del(&inode->i_sb_list);
 			list_move(&inode->i_list, dispose);
 			inode->i_state |= I_FREEING;
 			count++;
@@ -348,10 +348,7 @@
 
 	down(&iprune_sem);
 	spin_lock(&inode_lock);
-	busy = invalidate_list(&inode_in_use, sb, &throw_away);
-	busy |= invalidate_list(&inode_unused, sb, &throw_away);
-	busy |= invalidate_list(&sb->s_dirty, sb, &throw_away);
-	busy |= invalidate_list(&sb->s_io, sb, &throw_away);
+	busy = invalidate_list(&sb->s_inodes, &throw_away);
 	spin_unlock(&inode_lock);
 
 	dispose_list(&throw_away);
@@ -451,6 +448,7 @@
 				continue;
 		}
 		hlist_del_init(&inode->i_hash);
+		list_del_init(&inode->i_sb_list);
 		list_move(&inode->i_list, &freeable);
 		inode->i_state |= I_FREEING;
 		nr_pruned++;
@@ -487,7 +485,7 @@
 		if (gfp_mask & __GFP_FS)
 			prune_icache(nr);
 	}
-	return inodes_stat.nr_unused;
+	return (inodes_stat.nr_unused / 100) * sysctl_vfs_cache_pressure;
 }
 
 static void __wait_on_freeing_inode(struct inode *inode);
@@ -561,6 +559,7 @@
 		spin_lock(&inode_lock);
 		inodes_stat.nr_inodes++;
 		list_add(&inode->i_list, &inode_in_use);
+		list_add(&inode->i_sb_list, &sb->s_inodes);
 		inode->i_ino = ++last_ino;
 		inode->i_state = 0;
 		spin_unlock(&inode_lock);
@@ -609,6 +608,7 @@
 
 			inodes_stat.nr_inodes++;
 			list_add(&inode->i_list, &inode_in_use);
+			list_add(&inode->i_sb_list, &sb->s_inodes);
 			hlist_add_head(&inode->i_hash, head);
 			inode->i_state = I_LOCK|I_NEW;
 			spin_unlock(&inode_lock);
@@ -657,6 +657,7 @@
 			inode->i_ino = ino;
 			inodes_stat.nr_inodes++;
 			list_add(&inode->i_list, &inode_in_use);
+			list_add(&inode->i_sb_list, &sb->s_inodes);
 			hlist_add_head(&inode->i_hash, head);
 			inode->i_state = I_LOCK|I_NEW;
 			spin_unlock(&inode_lock);
@@ -993,6 +994,7 @@
 	struct super_operations *op = inode->i_sb->s_op;
 
 	list_del_init(&inode->i_list);
+	list_del_init(&inode->i_sb_list);
 	inode->i_state|=I_FREEING;
 	inodes_stat.nr_inodes--;
 	spin_unlock(&inode_lock);
@@ -1038,6 +1040,7 @@
 		hlist_del_init(&inode->i_hash);
 	}
 	list_del_init(&inode->i_list);
+	list_del_init(&inode->i_sb_list);
 	inode->i_state|=I_FREEING;
 	inodes_stat.nr_inodes--;
 	spin_unlock(&inode_lock);
@@ -1226,36 +1229,23 @@
 /* Function back in dquot.c */
 int remove_inode_dquot_ref(struct inode *, int, struct list_head *);
 
-void remove_dquot_ref(struct super_block *sb, int type, struct list_head *tofree_head)
+void remove_dquot_ref(struct super_block *sb, int type,
+			struct list_head *tofree_head)
 {
 	struct inode *inode;
-	struct list_head *act_head;
 
 	if (!sb->dq_op)
 		return;	/* nothing to do */
 	spin_lock(&inode_lock);	/* This lock is for inodes code */
-	/* We don't have to lock against quota code - test IS_QUOTAINIT is just for speedup... */
- 
-	list_for_each(act_head, &inode_in_use) {
-		inode = list_entry(act_head, struct inode, i_list);
-		if (inode->i_sb == sb && IS_QUOTAINIT(inode))
-			remove_inode_dquot_ref(inode, type, tofree_head);
-	}
-	list_for_each(act_head, &inode_unused) {
-		inode = list_entry(act_head, struct inode, i_list);
-		if (inode->i_sb == sb && IS_QUOTAINIT(inode))
-			remove_inode_dquot_ref(inode, type, tofree_head);
-	}
-	list_for_each(act_head, &sb->s_dirty) {
-		inode = list_entry(act_head, struct inode, i_list);
-		if (IS_QUOTAINIT(inode))
-			remove_inode_dquot_ref(inode, type, tofree_head);
-	}
-	list_for_each(act_head, &sb->s_io) {
-		inode = list_entry(act_head, struct inode, i_list);
+	/*
+	 * We don't have to lock against quota code - test IS_QUOTAINIT is
+	 * just for speedup...
+	 */
+
+	list_for_each_entry(inode, &sb->s_inodes, i_sb_list)
 		if (IS_QUOTAINIT(inode))
 			remove_inode_dquot_ref(inode, type, tofree_head);
-	}
+
 	spin_unlock(&inode_lock);
 }
 
@@ -1345,55 +1335,30 @@
 /*
  * Initialize the waitqueues and inode hash table.
  */
+void __init inode_init_early(void)
+{
+	int loop;
+
+	inode_hashtable =
+		alloc_large_system_hash("Inode-cache",
+					sizeof(struct hlist_head),
+					ihash_entries,
+					14,
+					0,
+					&i_hash_shift,
+					&i_hash_mask);
+
+	for (loop = 0; loop < (1 << i_hash_shift); loop++)
+		INIT_HLIST_HEAD(&inode_hashtable[loop]);
+}
+
 void __init inode_init(unsigned long mempages)
 {
-	struct hlist_head *head;
-	unsigned long order;
-	unsigned int nr_hash;
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(i_wait_queue_heads); i++)
 		init_waitqueue_head(&i_wait_queue_heads[i].wqh);
 
-	if (!ihash_entries)
-		ihash_entries = PAGE_SHIFT < 14 ?
-				mempages >> (14 - PAGE_SHIFT) :
-				mempages << (PAGE_SHIFT - 14);
-
-	ihash_entries *= sizeof(struct hlist_head);
-	for (order = 0; ((1UL << order) << PAGE_SHIFT) < ihash_entries; order++)
-		;
-
-	do {
-		unsigned long tmp;
-
-		nr_hash = (1UL << order) * PAGE_SIZE /
-			sizeof(struct hlist_head);
-		i_hash_mask = (nr_hash - 1);
-
-		tmp = nr_hash;
-		i_hash_shift = 0;
-		while ((tmp >>= 1UL) != 0UL)
-			i_hash_shift++;
-
-		inode_hashtable = (struct hlist_head *)
-			__get_free_pages(GFP_ATOMIC, order);
-	} while (inode_hashtable == NULL && --order >= 0);
-
-	printk("Inode-cache hash table entries: %d (order: %ld, %ld bytes)\n",
-			nr_hash, order, (PAGE_SIZE << order));
-
-	if (!inode_hashtable)
-		panic("Failed to allocate inode hash table\n");
-
-	head = inode_hashtable;
-	i = nr_hash;
-	do {
-		INIT_HLIST_HEAD(head);
-		head++;
-		i--;
-	} while (i);
-
 	/* inode slab cache */
 	inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode),
 				0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, init_once,
--- diff/fs/ioctl.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ioctl.c	2004-07-01 21:32:48.000000000 +0100
@@ -4,11 +4,13 @@
  *  Copyright (C) 1991, 1992  Linus Torvalds
  */
 
+#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/smp_lock.h>
 #include <linux/file.h>
 #include <linux/fs.h>
 #include <linux/security.h>
+#include <linux/module.h>
 
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
@@ -133,3 +135,11 @@
 out:
 	return error;
 }
+
+/*
+ * Platforms implementing 32 bit compatibility ioctl handlers in
+ * modules need this exported
+ */
+#ifdef CONFIG_COMPAT
+EXPORT_SYMBOL(sys_ioctl);
+#endif
--- diff/fs/isofs/Makefile	2004-05-19 22:12:28.000000000 +0100
+++ source/fs/isofs/Makefile	2004-07-01 21:32:48.000000000 +0100
@@ -4,7 +4,7 @@
 
 obj-$(CONFIG_ISO9660_FS) += isofs.o
 
-isofs-objs-y 			:= namei.o inode.o dir.o util.o rock.o
+isofs-objs-y 			:= namei.o inode.o dir.o util.o rock.o export.o
 isofs-objs-$(CONFIG_JOLIET)	+= joliet.o
 isofs-objs-$(CONFIG_ZISOFS)	+= compress.o
 isofs-objs			:= $(isofs-objs-y)
--- diff/fs/isofs/dir.c	2004-05-19 22:12:28.000000000 +0100
+++ source/fs/isofs/dir.c	2004-07-01 21:32:48.000000000 +0100
@@ -64,7 +64,8 @@
 			break;
 
 		/* Convert remaining ';' to '.' */
-		if (c == ';')
+		/* Also '/' to '.' (broken Acorn-generated ISO9660 images) */
+		if (c == ';' || c == '/')
 			c = '.';
 
 		new[i] = c;
@@ -106,8 +107,8 @@
 {
 	unsigned long bufsize = ISOFS_BUFFER_SIZE(inode);
 	unsigned char bufbits = ISOFS_BUFFER_BITS(inode);
-	unsigned int block, offset;
-	int inode_number = 0;	/* Quiet GCC */
+	unsigned long block, offset, block_saved, offset_saved;
+	unsigned long inode_number = 0;	/* Quiet GCC */
 	struct buffer_head *bh = NULL;
 	int len;
 	int map;
@@ -129,8 +130,6 @@
 		}
 
 		de = (struct iso_directory_record *) (bh->b_data + offset);
-		if (first_de)
-			inode_number = (bh->b_blocknr << bufbits) + offset;
 
 		de_len = *(unsigned char *) de;
 
@@ -147,6 +146,8 @@
 			continue;
 		}
 
+		block_saved = block;
+		offset_saved = offset;
 		offset += de_len;
 
 		/* Make sure we have a full directory entry */
@@ -166,6 +167,15 @@
 			de = tmpde;
 		}
 
+		if (first_de) {
+			isofs_normalize_block_and_offset(de,
+							 &block_saved,
+							 &offset_saved);
+			inode_number = isofs_get_ino(block_saved,
+						     offset_saved,
+						     bufbits);
+		}
+
 		if (de->flags[-sbi->s_high_sierra] & 0x80) {
 			first_de = 0;
 			filp->f_pos += de_len;
--- diff/fs/isofs/inode.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/isofs/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -7,6 +7,8 @@
  *      1995  Mark Dobie - allow mounting of some weird VideoCDs and PhotoCDs.
  *	1997  Gordon Chaffee - Joliet CDs
  *	1998  Eric Lammerts - ISO 9660 Level 3
+ *	2004  Paul Serice - Inode Support pushed out from 4GB to 128GB
+ *	2004  Paul Serice - NFS Export Operations
  */
 
 #include <linux/config.h>
@@ -135,20 +137,6 @@
 	.remount_fs	= isofs_remount,
 };
 
-/* the export_operations structure for describing
- * how to export (e.g. via kNFSd) is deliberately
- * empty.
- * This means that the filesystem want to use iget
- * to map an inode number into an inode.
- * The lack of a get_parent operation means that 
- * if something isn't in the cache, then you cannot
- * access it.
- * It should be possible to write a get_parent,
- * but it would be a bit hairy...
- */
-static struct export_operations isofs_export_ops = {
-};
-
 
 static struct dentry_operations isofs_dentry_ops[] = {
 	{
@@ -738,19 +726,14 @@
 	/* Set this for reference. Its not currently used except on write
 	   which we don't have .. */
 	   
-	/* RDE: data zone now byte offset! */
-
-	first_data_zone = ((isonum_733 (rootp->extent) +
-			  isonum_711 (rootp->ext_attr_length))
-			 << sbi->s_log_zone_size);
+	first_data_zone = isonum_733 (rootp->extent) +
+			  isonum_711 (rootp->ext_attr_length);
 	sbi->s_firstdatazone = first_data_zone;
 #ifndef BEQUIET
 	printk(KERN_DEBUG "Max size:%ld   Log zone size:%ld\n",
 	       sbi->s_max_size,
 	       1UL << sbi->s_log_zone_size);
-	printk(KERN_DEBUG "First datazone:%ld   Root inode number:%ld\n",
-	       sbi->s_firstdatazone >> sbi->s_log_zone_size,
-	       sbi->s_firstdatazone);
+	printk(KERN_DEBUG "First datazone:%ld\n", sbi->s_firstdatazone);
 	if(sbi->s_high_sierra)
 		printk(KERN_DEBUG "Disc in High Sierra format.\n");
 #endif
@@ -767,9 +750,8 @@
 		pri = (struct iso_primary_descriptor *) sec;
 		rootp = (struct iso_directory_record *)
 			pri->root_directory_record;
-		first_data_zone = ((isonum_733 (rootp->extent) +
-			  	isonum_711 (rootp->ext_attr_length))
-				 << sbi->s_log_zone_size);
+		first_data_zone = isonum_733 (rootp->extent) +
+			  	isonum_711 (rootp->ext_attr_length);
 	}
 
 	/*
@@ -835,7 +817,7 @@
 	 * the s_rock flag. Once we have the final s_rock value,
 	 * we then decide whether to use the Joliet descriptor.
 	 */
-	inode = iget(s, sbi->s_firstdatazone);
+	inode = isofs_iget(s, sbi->s_firstdatazone, 0);
 
 	/*
 	 * If this disk has both Rock Ridge and Joliet on it, then we
@@ -854,7 +836,7 @@
 			printk(KERN_DEBUG 
 				"ISOFS: changing to secondary root\n");
 			iput(inode);
-			inode = iget(s, sbi->s_firstdatazone);
+			inode = isofs_iget(s, sbi->s_firstdatazone, 0);
 		}
 	}
 
@@ -952,7 +934,7 @@
 	unsigned long b_off;
 	unsigned offset, sect_size;
 	unsigned int firstext;
-	unsigned long nextino;
+	unsigned long nextblk, nextoff;
 	long iblock = (long)iblock_s;
 	int section, rv;
 	struct iso_inode_info *ei = ISOFS_I(inode);
@@ -970,7 +952,8 @@
 	offset    = 0;
 	firstext  = ei->i_first_extent;
 	sect_size = ei->i_section_size >> ISOFS_BUFFER_BITS(inode);
-	nextino   = ei->i_next_section_ino;
+	nextblk   = ei->i_next_section_block;
+	nextoff   = ei->i_next_section_offset;
 	section   = 0;
 
 	while ( nblocks ) {
@@ -987,25 +970,28 @@
 			goto abort;
 		}
 		
-		if (nextino) {
+		if (nextblk) {
 			while (b_off >= (offset + sect_size)) {
 				struct inode *ninode;
 				
 				offset += sect_size;
-				if (nextino == 0)
+				if (nextblk == 0)
 					goto abort;
-				ninode = iget(inode->i_sb, nextino);
+				ninode = isofs_iget(inode->i_sb, nextblk, nextoff);
 				if (!ninode)
 					goto abort;
 				firstext  = ISOFS_I(ninode)->i_first_extent;
-				sect_size = ISOFS_I(ninode)->i_section_size;
-				nextino   = ISOFS_I(ninode)->i_next_section_ino;
+				sect_size = ISOFS_I(ninode)->i_section_size >> ISOFS_BUFFER_BITS(ninode);
+				nextblk   = ISOFS_I(ninode)->i_next_section_block;
+				nextoff   = ISOFS_I(ninode)->i_next_section_offset;
 				iput(ninode);
 				
 				if (++section > 100) {
 					printk("isofs_get_blocks: More than 100 file sections ?!?, aborting...\n");
-					printk("isofs_get_blocks: ino=%lu block=%ld firstext=%u sect_size=%u nextino=%lu\n",
-					       inode->i_ino, iblock, firstext, (unsigned) sect_size, nextino);
+					printk("isofs_get_blocks: block=%ld firstext=%u sect_size=%u "
+					       "nextblk=%lu nextoff=%lu\n",
+					       iblock, firstext, (unsigned) sect_size,
+					       nextblk, nextoff);
 					goto abort;
 				}
 			}
@@ -1044,7 +1030,7 @@
 	return isofs_get_blocks(inode, iblock, &bh_result, 1) ? 0 : -EIO;
 }
 
-static int isofs_bmap(struct inode *inode, int block)
+static int isofs_bmap(struct inode *inode, sector_t block)
 {
 	struct buffer_head dummy;
 	int error;
@@ -1097,21 +1083,25 @@
 
 static int isofs_read_level3_size(struct inode * inode)
 {
-	unsigned long f_pos = inode->i_ino;
 	unsigned long bufsize = ISOFS_BUFFER_SIZE(inode);
 	int high_sierra = ISOFS_SB(inode->i_sb)->s_high_sierra;
 	struct buffer_head * bh = NULL;
-	unsigned long block, offset;
+	unsigned long block, offset, block_saved, offset_saved;
 	int i = 0;
 	int more_entries = 0;
 	struct iso_directory_record * tmpde = NULL;
 	struct iso_inode_info *ei = ISOFS_I(inode);
 
 	inode->i_size = 0;
-	ei->i_next_section_ino = 0;
 
-	block = f_pos >> ISOFS_BUFFER_BITS(inode);
-	offset = f_pos & (bufsize-1);
+	/* The first 16 blocks are reserved as the System Area.  Thus,
+	 * no inodes can appear in block 0.  We use this to flag that
+	 * this is the last section. */
+	ei->i_next_section_block = 0;
+	ei->i_next_section_offset = 0;
+
+	block = ei->i_iget5_block;
+	offset = ei->i_iget5_offset;
 
 	do {
 		struct iso_directory_record * de;
@@ -1128,12 +1118,13 @@
 		if (de_len == 0) {
 			brelse(bh);
 			bh = NULL;
-			f_pos = (f_pos + ISOFS_BLOCK_SIZE) & ~(ISOFS_BLOCK_SIZE - 1);
-			block = f_pos >> ISOFS_BUFFER_BITS(inode);
+			++block;
 			offset = 0;
 			continue;
 		}
 
+		block_saved = block;
+		offset_saved = offset;
 		offset += de_len;
 
 		/* Make sure we have a full directory entry */
@@ -1159,12 +1150,13 @@
 		}
 
 		inode->i_size += isonum_733(de->size);
-		if (i == 1)
-			ei->i_next_section_ino = f_pos;
+		if (i == 1) {
+			ei->i_next_section_block = block_saved;
+			ei->i_next_section_offset = offset_saved;
+		}
 
 		more_entries = de->flags[-high_sierra] & 0x80;
 
-		f_pos += de_len;
 		i++;
 		if(i > 100)
 			goto out_toomany;
@@ -1190,8 +1182,8 @@
 out_toomany:
 	printk(KERN_INFO "isofs_read_level3_size: "
 		"More than 100 file sections ?!?, aborting...\n"
-	  	"isofs_read_level3_size: inode=%lu ino=%lu\n",
-		inode->i_ino, f_pos);
+	  	"isofs_read_level3_size: inode=%lu\n",
+		inode->i_ino);
 	goto out;
 }
 
@@ -1200,21 +1192,22 @@
 	struct super_block *sb = inode->i_sb;
 	struct isofs_sb_info *sbi = ISOFS_SB(sb);
 	unsigned long bufsize = ISOFS_BUFFER_SIZE(inode);
-	int block = inode->i_ino >> ISOFS_BUFFER_BITS(inode);
+	unsigned long block;
 	int high_sierra = sbi->s_high_sierra;
 	struct buffer_head * bh = NULL;
 	struct iso_directory_record * de;
 	struct iso_directory_record * tmpde = NULL;
 	unsigned int de_len;
 	unsigned long offset;
-	int i;
 	struct iso_inode_info *ei = ISOFS_I(inode);
 
+	block = ei->i_iget5_block;
 	bh = sb_bread(inode->i_sb, block);
 	if (!bh)
 		goto out_badread;
 
-	offset = (inode->i_ino & (bufsize - 1));
+	offset = ei->i_iget5_offset;
+
 	de = (struct iso_directory_record *) (bh->b_data + offset);
 	de_len = *(unsigned char *) de;
 
@@ -1235,6 +1228,10 @@
 		de = tmpde;
 	}
 
+	inode->i_ino = isofs_get_ino(ei->i_iget5_block,
+				     ei->i_iget5_offset,
+				     ISOFS_BUFFER_BITS(inode));
+
 	/* Assume it is a normal-format file unless told otherwise */
 	ei->i_file_format = isofs_file_normal;
 
@@ -1250,14 +1247,6 @@
 		inode->i_mode = sbi->s_mode;
 		inode->i_nlink = 1;
 	        inode->i_mode |= S_IFREG;
-		/* If there are no periods in the name,
-		 * then set the execute permission bit
-		 */
-		for(i=0; i< de->name_len[0]; i++)
-			if(de->name[i]=='.' || de->name[i]==';')
-				break;
-		if(i == de->name_len[0] || de->name[i] == ';')
-			inode->i_mode |= S_IXUGO; /* execute permission */
 	}
 	inode->i_uid = sbi->s_uid;
 	inode->i_gid = sbi->s_gid;
@@ -1271,35 +1260,19 @@
 	if(de->flags[-high_sierra] & 0x80) {
 		if(isofs_read_level3_size(inode)) goto fail;
 	} else {
-		ei->i_next_section_ino = 0;
+		ei->i_next_section_block = 0;
+		ei->i_next_section_offset = 0;
 		inode->i_size = isonum_733 (de->size);
 	}
 
 	/*
-	 * The ISO-9660 filesystem only stores 32 bits for file size.
-	 * mkisofs handles files up to 2GB-2 = 2147483646 = 0x7FFFFFFE bytes
-	 * in size. This is according to the large file summit paper from 1996.
-	 * WARNING: ISO-9660 filesystems > 1 GB and even > 2 GB are fully
-	 *	    legal. Do not prevent to use DVD's schilling@fokus.gmd.de
-	 */
-	if ((inode->i_size < 0 || inode->i_size > 0x7FFFFFFE) &&
-	    sbi->s_cruft == 'n') {
-		printk(KERN_WARNING "Warning: defective CD-ROM.  "
-		       "Enabling \"cruft\" mount option.\n");
-		sbi->s_cruft = 'y';
-	}
-
-	/*
 	 * Some dipshit decided to store some other bit of information
-	 * in the high byte of the file length.  Catch this and holler.
-	 * WARNING: this will make it impossible for a file to be > 16MB
-	 * on the CDROM.
+	 * in the high byte of the file length.  Truncate size in case
+	 * this CDROM was mounted with the cruft option.
 	 */
 
-	if (sbi->s_cruft == 'y' &&
-	    inode->i_size & 0xff000000) {
+	if (sbi->s_cruft == 'y')
 		inode->i_size &= 0x00ffffff;
-	}
 
 	if (de->interleave[0]) {
 		printk("Interleaved files not (yet) supported.\n");
@@ -1385,6 +1358,61 @@
 	goto out;
 }
 
+struct isofs_iget5_callback_data {
+	unsigned long block;
+	unsigned long offset;
+};
+
+static int isofs_iget5_test(struct inode *ino, void *data)
+{
+	struct iso_inode_info *i = ISOFS_I(ino);
+	struct isofs_iget5_callback_data *d =
+		(struct isofs_iget5_callback_data*)data;
+	return (i->i_iget5_block == d->block)
+	       && (i->i_iget5_offset == d->offset);
+}
+
+static int isofs_iget5_set(struct inode *ino, void *data)
+{
+	struct iso_inode_info *i = ISOFS_I(ino);
+	struct isofs_iget5_callback_data *d =
+		(struct isofs_iget5_callback_data*)data;
+	i->i_iget5_block = d->block;
+	i->i_iget5_offset = d->offset;
+	return 0;
+}
+
+/* Store, in the inode's containing structure, the block and block
+ * offset that point to the underlying meta-data for the inode.  The
+ * code below is otherwise similar to the iget() code in
+ * include/linux/fs.h */
+struct inode *isofs_iget(struct super_block *sb,
+			 unsigned long block,
+			 unsigned long offset)
+{
+	unsigned long hashval;
+	struct inode *inode;
+	struct isofs_iget5_callback_data data;
+
+	data.block = block;
+	data.offset = offset;
+
+	hashval = (block << sb->s_blocksize_bits) | offset;
+
+	inode = iget5_locked(sb,
+			     hashval,
+			     &isofs_iget5_test,
+			     &isofs_iget5_set,
+			     &data);
+
+	if (inode && (inode->i_state & I_NEW)) {
+		sb->s_op->read_inode(inode);
+		unlock_new_inode(inode);
+	}
+
+	return inode;
+}
+
 #ifdef LEAK_CHECK
 #undef malloc
 #undef free_s
--- diff/fs/isofs/namei.c	2004-05-19 22:12:28.000000000 +0100
+++ source/fs/isofs/namei.c	2004-07-01 21:32:48.000000000 +0100
@@ -17,6 +17,7 @@
 #include <linux/config.h>	/* Joliet? */
 #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
+#include <linux/dcache.h>
 
 #include <asm/uaccess.h>
 
@@ -59,12 +60,12 @@
  */
 static unsigned long
 isofs_find_entry(struct inode *dir, struct dentry *dentry,
+	unsigned long *block_rv, unsigned long* offset_rv,
 	char * tmpname, struct iso_directory_record * tmpde)
 {
-	unsigned long inode_number;
 	unsigned long bufsize = ISOFS_BUFFER_SIZE(dir);
 	unsigned char bufbits = ISOFS_BUFFER_BITS(dir);
-	unsigned int block, f_pos, offset;
+	unsigned long block, f_pos, offset, block_saved, offset_saved;
 	struct buffer_head * bh = NULL;
 	struct isofs_sb_info *sbi = ISOFS_SB(dir->i_sb);
 
@@ -87,7 +88,6 @@
 		}
 
 		de = (struct iso_directory_record *) (bh->b_data + offset);
-		inode_number = (bh->b_blocknr << bufbits) + offset;
 
 		de_len = *(unsigned char *) de;
 		if (!de_len) {
@@ -99,6 +99,8 @@
 			continue;
 		}
 
+		block_saved = bh->b_blocknr;
+		offset_saved = offset;
 		offset += de_len;
 		f_pos += de_len;
 
@@ -150,8 +152,13 @@
 			match = (isofs_cmp(dentry,dpnt,dlen) == 0);
 		}
 		if (match) {
+			isofs_normalize_block_and_offset(de,
+							 &block_saved,
+							 &offset_saved);
+                        *block_rv = block_saved;
+                        *offset_rv = offset_saved;
 			if (bh) brelse(bh);
-			return inode_number;
+			return 1;
 		}
 	}
 	if (bh) brelse(bh);
@@ -160,7 +167,8 @@
 
 struct dentry *isofs_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd)
 {
-	unsigned long ino;
+	int found;
+	unsigned long block, offset;
 	struct inode *inode;
 	struct page *page;
 
@@ -171,19 +179,23 @@
 		return ERR_PTR(-ENOMEM);
 
 	lock_kernel();
-	ino = isofs_find_entry(dir, dentry, page_address(page),
-			       1024 + page_address(page));
+	found = isofs_find_entry(dir, dentry,
+				 &block, &offset,
+				 page_address(page),
+				 1024 + page_address(page));
 	__free_page(page);
 
 	inode = NULL;
-	if (ino) {
-		inode = iget(dir->i_sb, ino);
+	if (found) {
+		inode = isofs_iget(dir->i_sb, block, offset);
 		if (!inode) {
 			unlock_kernel();
 			return ERR_PTR(-EACCES);
 		}
 	}
 	unlock_kernel();
+	if (inode)
+		return d_splice_alias(inode, dentry);
 	d_add(dentry, inode);
 	return NULL;
 }
--- diff/fs/isofs/rock.c	2004-05-19 22:12:28.000000000 +0100
+++ source/fs/isofs/rock.c	2004-07-01 21:32:48.000000000 +0100
@@ -306,9 +306,7 @@
 	goto out;
       case SIG('C','L'):
 	ISOFS_I(inode)->i_first_extent = isonum_733(rr->u.CL.location);
-	reloc = iget(inode->i_sb,
-		     (ISOFS_I(inode)->i_first_extent <<
-		      ISOFS_SB(inode->i_sb)->s_log_zone_size));
+	reloc = isofs_iget(inode->i_sb, ISOFS_I(inode)->i_first_extent, 0);
 	if (!reloc)
 		goto out;
 	inode->i_mode = reloc->i_mode;
@@ -447,15 +445,15 @@
 static int rock_ridge_symlink_readpage(struct file *file, struct page *page)
 {
 	struct inode *inode = page->mapping->host;
+        struct iso_inode_info *ei = ISOFS_I(inode);
 	char *link = kmap(page);
 	unsigned long bufsize = ISOFS_BUFFER_SIZE(inode);
-	unsigned char bufbits = ISOFS_BUFFER_BITS(inode);
 	struct buffer_head *bh;
 	char *rpnt = link;
 	unsigned char *pnt;
 	struct iso_directory_record *raw_inode;
 	CONTINUE_DECLS;
-	int block;
+	unsigned long block, offset;
 	int sig;
 	int len;
 	unsigned char *chr;
@@ -464,20 +462,21 @@
 	if (!ISOFS_SB(inode->i_sb)->s_rock)
 		panic ("Cannot have symlink with high sierra variant of iso filesystem\n");
 
-	block = inode->i_ino >> bufbits;
+	block = ei->i_iget5_block;
 	lock_kernel();
 	bh = sb_bread(inode->i_sb, block);
 	if (!bh)
 		goto out_noread;
 
-	pnt = (unsigned char *) bh->b_data + (inode->i_ino & (bufsize - 1));
+        offset = ei->i_iget5_offset;
+	pnt = (unsigned char *) bh->b_data + offset;
 
 	raw_inode = (struct iso_directory_record *) pnt;
 
 	/*
 	 * If we go past the end of the buffer, there is some sort of error.
 	 */
-	if ((inode->i_ino & (bufsize - 1)) + *pnt > bufsize)
+	if (offset + *pnt > bufsize)
 		goto out_bad_span;
 
 	/* Now test for possible Rock Ridge extensions which will override
--- diff/fs/jbd/commit.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/jbd/commit.c	2004-07-01 21:32:48.000000000 +0100
@@ -503,7 +503,7 @@
 start_journal_io:
 			for (i = 0; i < bufs; i++) {
 				struct buffer_head *bh = wbuf[i];
-				set_buffer_locked(bh);
+				lock_buffer(bh);
 				clear_buffer_dirty(bh);
 				set_buffer_uptodate(bh);
 				bh->b_end_io = journal_end_buffer_io_sync;
@@ -639,10 +639,38 @@
 	JBUFFER_TRACE(descriptor, "write commit block");
 	{
 		struct buffer_head *bh = jh2bh(descriptor);
+		int ret;
+		int barrier_done = 0;
 
 		set_buffer_dirty(bh);
-		sync_dirty_buffer(bh);
-		if (unlikely(!buffer_uptodate(bh)))
+		if (journal->j_flags & JFS_BARRIER) {
+			set_buffer_ordered(bh);
+			barrier_done = 1;
+		}
+		ret = sync_dirty_buffer(bh);
+		/* is it possible for another commit to fail at roughly
+		 * the same time as this one?  If so, we don't want to
+		 * trust the barrier flag in the super, but instead want
+		 * to remember if we sent a barrier request
+		 */
+		if (ret == -EOPNOTSUPP && barrier_done) {
+			char b[BDEVNAME_SIZE];
+
+			printk(KERN_WARNING
+				"JBD: barrier-based sync failed on %s - "
+				"disabling barriers\n",
+				bdevname(journal->j_dev, b));
+			spin_lock(&journal->j_state_lock);
+			journal->j_flags &= ~JFS_BARRIER;
+			spin_unlock(&journal->j_state_lock);
+
+			/* And try again, without the barrier */
+			clear_buffer_ordered(bh);
+			set_buffer_uptodate(bh);
+			set_buffer_dirty(bh);
+			ret = sync_dirty_buffer(bh);
+		}
+		if (unlikely(ret == -EIO))
 			err = -EIO;
 		put_bh(bh);		/* One for getblk() */
 		journal_put_journal_head(descriptor);
--- diff/fs/jbd/journal.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/jbd/journal.c	2004-07-01 21:32:48.000000000 +0100
@@ -73,6 +73,7 @@
 EXPORT_SYMBOL(journal_clear_err);
 EXPORT_SYMBOL(log_wait_commit);
 EXPORT_SYMBOL(journal_start_commit);
+EXPORT_SYMBOL(journal_force_commit_nested);
 EXPORT_SYMBOL(journal_wipe);
 EXPORT_SYMBOL(journal_blocks_per_page);
 EXPORT_SYMBOL(journal_invalidatepage);
@@ -465,6 +466,39 @@
 }
 
 /*
+ * Force and wait upon a commit if the calling process is not within
+ * transaction.  This is used for forcing out undo-protected data which contains
+ * bitmaps, when the fs is running out of space.
+ *
+ * We can only force the running transaction if we don't have an active handle;
+ * otherwise, we will deadlock.
+ *
+ * Returns true if a transaction was started.
+ */
+int journal_force_commit_nested(journal_t *journal)
+{
+	transaction_t *transaction = NULL;
+	tid_t tid;
+
+	spin_lock(&journal->j_state_lock);
+	if (journal->j_running_transaction && !current->journal_info) {
+		transaction = journal->j_running_transaction;
+		__log_start_commit(journal, transaction->t_tid);
+	} else if (journal->j_committing_transaction)
+		transaction = journal->j_committing_transaction;
+
+	if (!transaction) {
+		spin_unlock(&journal->j_state_lock);
+		return 0;	/* Nothing to retry */
+	}
+
+	tid = transaction->t_tid;
+	spin_unlock(&journal->j_state_lock);
+	log_wait_commit(journal, tid);
+	return 1;
+}
+
+/*
  * Start a commit of the current running transaction (if any).  Returns true
  * if a transaction was started, and fills its tid in at *ptid
  */
@@ -1680,9 +1714,17 @@
 	if (buffer_jbd(bh)) {
 		jh = bh2jh(bh);
 	} else {
-		J_ASSERT_BH(bh,
-			(atomic_read(&bh->b_count) > 0) ||
-			(bh->b_page && bh->b_page->mapping));
+		if (!(atomic_read(&bh->b_count) > 0 ||
+				(bh->b_page && bh->b_page->mapping))) {
+			printk(KERN_EMERG "%s: bh->b_count=%d\n",
+				__FUNCTION__, atomic_read(&bh->b_count));
+			printk(KERN_EMERG "%s: bh->b_page=%p\n",
+				__FUNCTION__, bh->b_page);
+			if (bh->b_page)
+				printk(KERN_EMERG "%s: "
+						"bh->b_page->mapping=%p\n",
+					__FUNCTION__, bh->b_page->mapping);
+		}
 
 		if (!new_jh) {
 			jbd_unlock_bh_journal_head(bh);
--- diff/fs/jbd/transaction.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/jbd/transaction.c	2004-07-01 21:32:48.000000000 +0100
@@ -939,7 +939,6 @@
 int journal_dirty_data(handle_t *handle, struct buffer_head *bh)
 {
 	journal_t *journal = handle->h_transaction->t_journal;
-	int need_brelse = 0;
 	struct journal_head *jh;
 
 	if (is_handle_aborted(handle))
@@ -1024,24 +1023,6 @@
 				goto no_journal;
 			}
 
-			/*
-			 * This buffer may be undergoing writeout in commit.  We
-			 * can't return from here and let the caller dirty it
-			 * again because that can cause the write-out loop in
-			 * commit to never terminate.
-			 */
-			if (buffer_dirty(bh)) {
-				get_bh(bh);
-				spin_unlock(&journal->j_list_lock);
-				jbd_unlock_bh_state(bh);
-				need_brelse = 1;
-				sync_dirty_buffer(bh);
-				jbd_lock_bh_state(bh);
-				spin_lock(&journal->j_list_lock);
-				/* The buffer may become locked again at any
-				   time if it is redirtied */
-			}
-
 			/* journal_clean_data_list() may have got there first */
 			if (jh->b_transaction != NULL) {
 				JBUFFER_TRACE(jh, "unfile from commit");
@@ -1071,10 +1052,6 @@
 no_journal:
 	spin_unlock(&journal->j_list_lock);
 	jbd_unlock_bh_state(bh);
-	if (need_brelse) {
-		BUFFER_TRACE(bh, "brelse");
-		__brelse(bh);
-	}
 	JBUFFER_TRACE(jh, "exit");
 	journal_put_journal_head(jh);
 	return 0;
--- diff/fs/jffs2/symlink.c	2004-05-19 22:12:28.000000000 +0100
+++ source/fs/jffs2/symlink.c	2004-07-01 21:32:48.000000000 +0100
@@ -15,43 +15,31 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
+#include <linux/namei.h>
 #include "nodelist.h"
 
-int jffs2_readlink(struct dentry *dentry, char *buffer, int buflen);
-int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd);
+static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd);
+static void jffs2_put_link(struct dentry *dentry, struct nameidata *nd);
 
 struct inode_operations jffs2_symlink_inode_operations =
 {	
-	.readlink =	jffs2_readlink,
+	.readlink =	generic_readlink,
 	.follow_link =	jffs2_follow_link,
+	.put_link =	jffs2_put_link,
 	.setattr =	jffs2_setattr
 };
 
-int jffs2_readlink(struct dentry *dentry, char *buffer, int buflen)
-{
-	unsigned char *kbuf;
-	int ret;
-
-	kbuf = jffs2_getlink(JFFS2_SB_INFO(dentry->d_inode->i_sb), JFFS2_INODE_INFO(dentry->d_inode));
-	if (IS_ERR(kbuf))
-		return PTR_ERR(kbuf);
-
-	ret = vfs_readlink(dentry, buffer, buflen, kbuf);
-	kfree(kbuf);
-	return ret;
-}
-
-int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
+static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	unsigned char *buf;
-	int ret;
-
 	buf = jffs2_getlink(JFFS2_SB_INFO(dentry->d_inode->i_sb), JFFS2_INODE_INFO(dentry->d_inode));
+	nd_set_link(nd, buf);
+	return 0;
+}
 
-	if (IS_ERR(buf))
-		return PTR_ERR(buf);
-
-	ret = vfs_follow_link(nd, buf);
-	kfree(buf);
-	return ret;
+static void jffs2_put_link(struct dentry *dentry, struct nameidata *nd)
+{
+	char *s = nd_get_link(nd);
+	if (!IS_ERR(s))
+		kfree(s);
 }
--- diff/fs/jfs/acl.c	2004-05-19 22:12:28.000000000 +0100
+++ source/fs/jfs/acl.c	2004-07-01 21:32:48.000000000 +0100
@@ -281,9 +281,9 @@
 	if (rc)
 		return rc;
 
-	inode_setattr(inode, iattr);
+	rc = inode_setattr(inode, iattr);
 
-	if (iattr->ia_valid & ATTR_MODE)
+	if (!rc && (iattr->ia_valid & ATTR_MODE))
 		rc = jfs_acl_chmod(inode);
 
 	return rc;
--- diff/fs/jfs/jfs_btree.h	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/jfs/jfs_btree.h	2004-07-01 21:32:48.000000000 +0100
@@ -147,7 +147,7 @@
 	printk("btstack dump:\n");
 	for (i = 0; i < MAXTREEHEIGHT; i++)
 		printk(KERN_ERR "bn = %Lx, index = %d\n",
-		       btstack->stack[i].bn,
+		       (long long)btstack->stack[i].bn,
 		       btstack->stack[i].index);
 }
 
--- diff/fs/jfs/jfs_dtree.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/jfs/jfs_dtree.c	2004-07-01 21:32:48.000000000 +0100
@@ -374,6 +374,8 @@
 		return index;
 	}
 	if (index == (MAX_INLINE_DIRTABLE_ENTRY + 1)) {
+		struct dir_table_slot temp_table[12];
+
 		/*
 		 * It's time to move the inline table to an external
 		 * page and begin to build the xtree
@@ -385,7 +387,6 @@
 		 * Save the table, we're going to overwrite it with the
 		 * xtree root
 		 */
-		struct dir_table_slot temp_table[12];
 		memcpy(temp_table, &jfs_ip->i_dirtable, sizeof(temp_table));
 
 		/*
--- diff/fs/jfs/jfs_extent.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/jfs/jfs_extent.c	2004-07-01 21:32:48.000000000 +0100
@@ -533,7 +533,7 @@
 		nb = nblks = *nblocks;
 
 	/* try to allocate blocks */
-	while ((rc = dbAlloc(ip, hint, nb, &daddr))) {
+	while ((rc = dbAlloc(ip, hint, nb, &daddr)) != 0) {
 		/* if something other than an out of space error,
 		 * stop and return this error.
 		 */
--- diff/fs/jfs/jfs_logmgr.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/jfs/jfs_logmgr.c	2004-07-01 21:32:48.000000000 +0100
@@ -2321,7 +2321,7 @@
 		DECLARE_WAITQUEUE(wq, current);
 
 		spin_lock_irq(&log_redrive_lock);
-		while ((bp = log_redrive_list)) {
+		while ((bp = log_redrive_list) != 0) {
 			log_redrive_list = bp->l_redrive_next;
 			bp->l_redrive_next = NULL;
 			spin_unlock_irq(&log_redrive_lock);
--- diff/fs/jfs/jfs_txnmgr.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/jfs/jfs_txnmgr.c	2004-07-01 21:32:48.000000000 +0100
@@ -2580,7 +2580,7 @@
 	TXN_LOCK();
 	xtlck = (struct tlock *) &jfs_ip->atlhead;
 
-	while ((lid = xtlck->next)) {
+	while ((lid = xtlck->next) != 0) {
 		tlck = lid_to_tlock(lid);
 		if (tlck->flag & tlckFREELOCK) {
 			xtlck->next = tlck->next;
--- diff/fs/jfs/symlink.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/jfs/symlink.c	2004-07-01 21:32:48.000000000 +0100
@@ -17,23 +17,19 @@
  */
 
 #include <linux/fs.h>
+#include <linux/namei.h>
 #include "jfs_incore.h"
 #include "jfs_xattr.h"
 
 static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	char *s = JFS_IP(dentry->d_inode)->i_inline;
-	return vfs_follow_link(nd, s);
-}
-
-static int jfs_readlink(struct dentry *dentry, char __user *buffer, int buflen)
-{
-	char *s = JFS_IP(dentry->d_inode)->i_inline;
-	return vfs_readlink(dentry, buffer, buflen, s);
+	nd_set_link(nd, s);
+	return 0;
 }
 
 struct inode_operations jfs_symlink_inode_operations = {
-	.readlink	= jfs_readlink,
+	.readlink	= generic_readlink,
 	.follow_link	= jfs_follow_link,
 	.setxattr	= jfs_setxattr,
 	.getxattr	= jfs_getxattr,
--- diff/fs/lockd/host.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/lockd/host.c	2004-07-01 21:32:48.000000000 +0100
@@ -76,7 +76,7 @@
 	if (time_after_eq(jiffies, next_gc))
 		nlm_gc_hosts();
 
-	for (hp = &nlm_hosts[hash]; (host = *hp); hp = &host->h_next) {
+	for (hp = &nlm_hosts[hash]; (host = *hp) != 0; hp = &host->h_next) {
 		if (host->h_proto != proto)
 			continue;
 		if (host->h_version != version)
@@ -145,7 +145,7 @@
 	down(&nlm_host_sema);
 	for (hash = 0 ; hash < NLM_HOST_NRHASH; hash++) {
 		struct nlm_host *host, **hp;
-		for (hp = &nlm_hosts[hash]; (host = *hp) ; hp = &host->h_next) {
+		for (hp = &nlm_hosts[hash]; (host = *hp) != 0; hp = &host->h_next) {
 			if (host->h_server &&
 			    host->h_killed == 0) {
 				nlm_get_host(host);
--- diff/fs/lockd/svclock.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/lockd/svclock.c	2004-07-01 21:32:48.000000000 +0100
@@ -67,7 +67,7 @@
 		while ((b = *bp) && time_before_eq(b->b_when,when) && b->b_when != NLM_NEVER)
 			bp = &b->b_next;
 	} else
-		while ((b = *bp))
+		while ((b = *bp) != 0)
 			bp = &b->b_next;
 
 	block->b_queued = 1;
@@ -86,7 +86,7 @@
 
 	if (!block->b_queued)
 		return 1;
-	for (bp = &nlm_blocked; (b = *bp); bp = &b->b_next) {
+	for (bp = &nlm_blocked; (b = *bp) != 0; bp = &b->b_next) {
 		if (b == block) {
 			*bp = block->b_next;
 			block->b_queued = 0;
@@ -111,7 +111,7 @@
 				file, lock->fl.fl_pid,
 				(long long)lock->fl.fl_start,
 				(long long)lock->fl.fl_end, lock->fl.fl_type);
-	for (head = &nlm_blocked; (block = *head); head = &block->b_next) {
+	for (head = &nlm_blocked; (block = *head) != 0; head = &block->b_next) {
 		fl = &block->b_call.a_args.lock.fl;
 		dprintk("lockd: check f=%p pd=%d %Ld-%Ld ty=%d cookie=%x\n",
 				block->b_file, fl->fl_pid,
@@ -468,7 +468,7 @@
 	struct nlm_block	**bp, *block;
 
 	dprintk("lockd: VFS unblock notification for block %p\n", fl);
-	for (bp = &nlm_blocked; (block = *bp); bp = &block->b_next) {
+	for (bp = &nlm_blocked; (block = *bp) != 0; bp = &block->b_next) {
 		if (nlm_compare_locks(&block->b_call.a_args.lock.fl, fl)) {
 			nlmsvc_insert_block(block, 0);
 			svc_wake_up(block->b_daemon);
@@ -653,7 +653,7 @@
 	dprintk("nlmsvc_retry_blocked(%p, when=%ld)\n",
 			nlm_blocked,
 			nlm_blocked? nlm_blocked->b_when : 0);
-	while ((block = nlm_blocked)) {
+	while ((block = nlm_blocked) != 0) {
 		if (block->b_when == NLM_NEVER)
 			break;
 	        if (time_after(block->b_when,jiffies))
--- diff/fs/lockd/svcshare.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/lockd/svcshare.c	2004-07-01 21:32:48.000000000 +0100
@@ -71,7 +71,7 @@
 	struct nlm_share	*share, **shpp;
 	struct xdr_netobj	*oh = &argp->lock.oh;
 
-	for (shpp = &file->f_shares; (share = *shpp); shpp = &share->s_next) {
+	for (shpp = &file->f_shares; (share = *shpp) != 0; shpp = &share->s_next) {
 		if (share->s_host == host && nlm_cmp_owner(share, oh)) {
 			*shpp = share->s_next;
 			kfree(share);
--- diff/fs/minix/inode.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/minix/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -343,8 +343,9 @@
 };
 
 static struct inode_operations minix_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.getattr	= minix_getattr,
 };
 
--- diff/fs/namei.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/namei.c	2004-07-01 21:32:48.000000000 +0100
@@ -316,7 +316,7 @@
 {
 	umode_t	mode = inode->i_mode;
 
-	if ((inode->i_op && inode->i_op->permission))
+	if (inode->i_op && inode->i_op->permission)
 		return -EAGAIN;
 
 	if (current->fsuid == inode->i_uid)
@@ -330,6 +330,9 @@
 	if ((inode->i_mode & S_IXUGO) && capable(CAP_DAC_OVERRIDE))
 		goto ok;
 
+	if (S_ISDIR(inode->i_mode) && capable(CAP_DAC_OVERRIDE))
+		goto ok;
+
 	if (S_ISDIR(inode->i_mode) && capable(CAP_DAC_READ_SEARCH))
 		goto ok;
 
@@ -395,6 +398,8 @@
 	return result;
 }
 
+static int __vfs_follow_link(struct nameidata *, const char *);
+
 /*
  * This limits recursive symlink follows to 8, while
  * limiting consecutive symlinks to 40.
@@ -405,19 +410,30 @@
 static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	int err = -ELOOP;
-	if (current->link_count >= 5)
+	if (current->link_count >= MAX_NESTED_LINKS)
 		goto loop;
 	if (current->total_link_count >= 40)
 		goto loop;
+	BUG_ON(nd->depth >= MAX_NESTED_LINKS);
 	cond_resched();
 	err = security_inode_follow_link(dentry, nd);
 	if (err)
 		goto loop;
 	current->link_count++;
 	current->total_link_count++;
+	nd->depth++;
 	touch_atime(nd->mnt, dentry);
+	nd_set_link(nd, NULL);
 	err = dentry->d_inode->i_op->follow_link(dentry, nd);
+	if (!err) {
+		char *s = nd_get_link(nd);
+		if (s)
+			err = __vfs_follow_link(nd, s);
+		if (dentry->d_inode->i_op->put_link)
+			dentry->d_inode->i_op->put_link(dentry, nd);
+	}
 	current->link_count--;
+	nd->depth--;
 	return err;
 loop:
 	path_release(nd);
@@ -587,7 +603,7 @@
 		goto return_reval;
 
 	inode = nd->dentry->d_inode;
-	if (current->link_count)
+	if (nd->depth)
 		lookup_flags = LOOKUP_FOLLOW;
 
 	/* At this point we know we have a real path component. */
@@ -795,6 +811,7 @@
 		 */
 		nd_root.last_type = LAST_ROOT;
 		nd_root.flags = nd->flags;
+		nd_root.depth = 0;
 		memcpy(&nd_root.intent, &nd->intent, sizeof(nd_root.intent));
 		read_lock(&current->fs->lock);
 		nd_root.mnt = mntget(current->fs->rootmnt);
@@ -867,6 +884,7 @@
 
 	nd->last_type = LAST_ROOT; /* if there are only slashes... */
 	nd->flags = flags;
+	nd->depth = 0;
 
 	read_lock(&current->fs->lock);
 	if (*name=='/') {
@@ -1206,6 +1224,11 @@
 			return -EPERM;
 	}
 
+	/* O_NOATIME can only be set by the owner or superuser */
+	if (flag & O_NOATIME)
+		if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER))
+			return -EPERM;
+
 	/*
 	 * Ensure there are no outstanding leases on the file.
 	 */
@@ -1380,7 +1403,15 @@
 	if (error)
 		goto exit_dput;
 	touch_atime(nd->mnt, dentry);
+	nd_set_link(nd, NULL);
 	error = dentry->d_inode->i_op->follow_link(dentry, nd);
+	if (!error) {
+		char *s = nd_get_link(nd);
+		if (s)
+			error = __vfs_follow_link(nd, s);
+		if (dentry->d_inode->i_op->put_link)
+			dentry->d_inode->i_op->put_link(dentry, nd);
+	}
 	dput(dentry);
 	if (error)
 		return error;
@@ -2161,8 +2192,26 @@
 	return len;
 }
 
-static inline int
-__vfs_follow_link(struct nameidata *nd, const char *link)
+/*
+ * A helper for ->readlink().  This should be used *ONLY* for symlinks that
+ * have ->follow_link() touching nd only in nd_set_link().  Using (or not
+ * using) it for any given inode is up to filesystem.
+ */
+int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
+{
+	struct nameidata nd;
+	int res;
+	nd.depth = 0;
+	res = dentry->d_inode->i_op->follow_link(dentry, &nd);
+	if (!res) {
+		res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd));
+		if (dentry->d_inode->i_op->put_link)
+			dentry->d_inode->i_op->put_link(dentry, &nd);
+	}
+	return res;
+}
+
+static int __vfs_follow_link(struct nameidata *nd, const char *link)
 {
 	int res = 0;
 	char *name;
@@ -2177,7 +2226,7 @@
 	}
 	res = link_path_walk(link, nd);
 out:
-	if (current->link_count || res || nd->last_type!=LAST_NORM)
+	if (nd->depth || res || nd->last_type!=LAST_NORM)
 		return res;
 	/*
 	 * If it is an iterative symlinks resolution in open_namei() we
@@ -2237,6 +2286,30 @@
 	return res;
 }
 
+int page_follow_link_light(struct dentry *dentry, struct nameidata *nd)
+{
+	struct page *page;
+	char *s = page_getlink(dentry, &page);
+	if (!IS_ERR(s)) {
+		nd_set_link(nd, s);
+		s = NULL;
+	}
+	return PTR_ERR(s);
+}
+
+void page_put_link(struct dentry *dentry, struct nameidata *nd)
+{
+	if (!IS_ERR(nd_get_link(nd))) {
+		struct page *page;
+		page = find_get_page(dentry->d_inode->i_mapping, 0);
+		if (!page)
+			BUG();
+		kunmap(page);
+		page_cache_release(page);
+		page_cache_release(page);
+	}
+}
+
 int page_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	struct page *page = NULL;
@@ -2291,8 +2364,9 @@
 }
 
 struct inode_operations page_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 };
 
 EXPORT_SYMBOL(__user_walk);
@@ -2305,6 +2379,8 @@
 EXPORT_SYMBOL(lookup_hash);
 EXPORT_SYMBOL(lookup_one_len);
 EXPORT_SYMBOL(page_follow_link);
+EXPORT_SYMBOL(page_follow_link_light);
+EXPORT_SYMBOL(page_put_link);
 EXPORT_SYMBOL(page_readlink);
 EXPORT_SYMBOL(page_symlink);
 EXPORT_SYMBOL(page_symlink_inode_operations);
@@ -2324,3 +2400,4 @@
 EXPORT_SYMBOL(vfs_rmdir);
 EXPORT_SYMBOL(vfs_symlink);
 EXPORT_SYMBOL(vfs_unlink);
+EXPORT_SYMBOL(generic_readlink);
--- diff/fs/ncpfs/dir.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/ncpfs/dir.c	2004-07-01 21:32:48.000000000 +0100
@@ -762,12 +762,12 @@
 int ncp_conn_logged_in(struct super_block *sb)
 {
 	struct ncp_server* server = NCP_SBP(sb);
-	struct nw_info_struct i;
 	int result;
 
 	if (ncp_single_volume(server)) {
 		int len;
 		struct dentry* dent;
+		__u32 volNumber, dirEntNum, DosDirNum;
 		__u8 __name[NCP_MAXPATHLEN + 1];
 
 		len = sizeof(__name);
@@ -776,7 +776,7 @@
 		if (result)
 			goto out;
 		result = -ENOENT;
-		if (ncp_lookup_volume(server, __name, &i)) {
+		if (ncp_get_volume_root(server, __name, &volNumber, &dirEntNum, &DosDirNum)) {
 			PPRINTK("ncp_conn_logged_in: %s not found\n",
 				server->m.mounted_vol);
 			goto out;
@@ -785,9 +785,9 @@
 		if (dent) {
 			struct inode* ino = dent->d_inode;
 			if (ino) {
-				NCP_FINFO(ino)->volNumber = i.volNumber;
-				NCP_FINFO(ino)->dirEntNum = i.dirEntNum;
-				NCP_FINFO(ino)->DosDirNum = i.DosDirNum;
+				NCP_FINFO(ino)->volNumber = volNumber;
+				NCP_FINFO(ino)->dirEntNum = dirEntNum;
+				NCP_FINFO(ino)->DosDirNum = DosDirNum;
 			} else {
 				DPRINTK("ncpfs: sb->s_root->d_inode == NULL!\n");
 			}
--- diff/fs/ncpfs/inode.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/ncpfs/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -873,7 +873,9 @@
 				tmpattr.ia_valid = ATTR_MODE;
 				tmpattr.ia_mode = attr->ia_mode;
 
-				inode_setattr(inode, &tmpattr);
+				result = inode_setattr(inode, &tmpattr);
+				if (result)
+					goto out;
 			}
 		}
 #endif
@@ -899,13 +901,17 @@
 		   closing the file */
 		ncp_inode_close(inode);
 		result = ncp_make_closed(inode);
+		if (result)
+			goto out;
 		{
 			struct iattr tmpattr;
 			
 			tmpattr.ia_valid = ATTR_SIZE;
 			tmpattr.ia_size = attr->ia_size;
 			
-			inode_setattr(inode, &tmpattr);
+			result = inode_setattr(inode, &tmpattr);
+			if (result)
+				goto out;
 		}
 	}
 	if ((attr->ia_valid & ATTR_CTIME) != 0) {
--- diff/fs/ncpfs/ioctl.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/ncpfs/ioctl.c	2004-07-01 21:32:48.000000000 +0100
@@ -29,6 +29,155 @@
 /* maximum negotiable packet size */
 #define NCP_PACKET_SIZE_INTERNAL 65536
 
+static int
+ncp_get_fs_info(struct ncp_server* server, struct inode* inode, struct ncp_fs_info __user *arg)
+{
+	struct ncp_fs_info info;
+
+	if ((permission(inode, MAY_WRITE, NULL) != 0)
+	    && (current->uid != server->m.mounted_uid)) {
+		return -EACCES;
+	}
+	if (copy_from_user(&info, arg, sizeof(info)))
+		return -EFAULT;
+
+	if (info.version != NCP_GET_FS_INFO_VERSION) {
+		DPRINTK("info.version invalid: %d\n", info.version);
+		return -EINVAL;
+	}
+	/* TODO: info.addr = server->m.serv_addr; */
+	SET_UID(info.mounted_uid, server->m.mounted_uid);
+	info.connection		= server->connection;
+	info.buffer_size	= server->buffer_size;
+	info.volume_number	= NCP_FINFO(inode)->volNumber;
+	info.directory_id	= NCP_FINFO(inode)->DosDirNum;
+
+	if (copy_to_user(arg, &info, sizeof(info)))
+		return -EFAULT;
+	return 0;
+}
+
+static int
+ncp_get_fs_info_v2(struct ncp_server* server, struct inode* inode, struct ncp_fs_info_v2 __user * arg)
+{
+	struct ncp_fs_info_v2 info2;
+
+	if ((permission(inode, MAY_WRITE, NULL) != 0)
+	    && (current->uid != server->m.mounted_uid)) {
+		return -EACCES;
+	}
+	if (copy_from_user(&info2, arg, sizeof(info2)))
+		return -EFAULT;
+
+	if (info2.version != NCP_GET_FS_INFO_VERSION_V2) {
+		DPRINTK("info.version invalid: %d\n", info2.version);
+		return -EINVAL;
+	}
+	info2.mounted_uid   = server->m.mounted_uid;
+	info2.connection    = server->connection;
+	info2.buffer_size   = server->buffer_size;
+	info2.volume_number = NCP_FINFO(inode)->volNumber;
+	info2.directory_id  = NCP_FINFO(inode)->DosDirNum;
+	info2.dummy1 = info2.dummy2 = info2.dummy3 = 0;
+
+	if (copy_to_user(arg, &info2, sizeof(info2)))
+		return -EFAULT;
+	return 0;
+}
+
+#ifdef CONFIG_NCPFS_NLS
+/* Here we are select the iocharset and the codepage for NLS.
+ * Thanks Petr Vandrovec for idea and many hints.
+ */
+static int
+ncp_set_charsets(struct ncp_server* server, struct ncp_nls_ioctl __user *arg)
+{
+	struct ncp_nls_ioctl user;
+	struct nls_table *codepage;
+	struct nls_table *iocharset;
+	struct nls_table *oldset_io;
+	struct nls_table *oldset_cp;
+
+	if (!capable(CAP_SYS_ADMIN))
+		return -EACCES;
+	if (server->root_setuped)
+		return -EBUSY;
+
+	if (copy_from_user(&user, arg, sizeof(user)))
+		return -EFAULT;
+
+	codepage = NULL;
+	user.codepage[NCP_IOCSNAME_LEN] = 0;
+	if (!user.codepage[0] || !strcmp(user.codepage, "default"))
+		codepage = load_nls_default();
+	else {
+		codepage = load_nls(user.codepage);
+		if (!codepage) {
+			return -EBADRQC;
+		}
+	}
+
+	iocharset = NULL;
+	user.iocharset[NCP_IOCSNAME_LEN] = 0;
+	if (!user.iocharset[0] || !strcmp(user.iocharset, "default")) {
+		iocharset = load_nls_default();
+		NCP_CLR_FLAG(server, NCP_FLAG_UTF8);
+	} else if (!strcmp(user.iocharset, "utf8")) {
+		iocharset = load_nls_default();
+		NCP_SET_FLAG(server, NCP_FLAG_UTF8);
+	} else {
+		iocharset = load_nls(user.iocharset);
+		if (!iocharset) {
+			unload_nls(codepage);
+			return -EBADRQC;
+		}
+		NCP_CLR_FLAG(server, NCP_FLAG_UTF8);
+	}
+
+	oldset_cp = server->nls_vol;
+	server->nls_vol = codepage;
+	oldset_io = server->nls_io;
+	server->nls_io = iocharset;
+
+	if (oldset_cp)
+		unload_nls(oldset_cp);
+	if (oldset_io)
+		unload_nls(oldset_io);
+
+	return 0;
+}
+
+static int
+ncp_get_charsets(struct ncp_server* server, struct ncp_nls_ioctl __user *arg)
+{
+	struct ncp_nls_ioctl user;
+	int len;
+
+	memset(&user, 0, sizeof(user));
+	if (server->nls_vol && server->nls_vol->charset) {
+		len = strlen(server->nls_vol->charset);
+		if (len > NCP_IOCSNAME_LEN)
+			len = NCP_IOCSNAME_LEN;
+		strncpy(user.codepage, server->nls_vol->charset, len);
+		user.codepage[len] = 0;
+	}
+
+	if (NCP_IS_FLAG(server, NCP_FLAG_UTF8))
+		strcpy(user.iocharset, "utf8");
+	else if (server->nls_io && server->nls_io->charset) {
+		len = strlen(server->nls_io->charset);
+		if (len > NCP_IOCSNAME_LEN)
+			len = NCP_IOCSNAME_LEN;
+		strncpy(user.iocharset,	server->nls_io->charset, len);
+		user.iocharset[len] = 0;
+	}
+
+	if (copy_to_user(arg, &user, sizeof(user)))
+		return -EFAULT;
+	return 0;
+}
+#endif /* CONFIG_NCPFS_NLS */
+
 int ncp_ioctl(struct inode *inode, struct file *filp,
 	      unsigned int cmd, unsigned long arg)
 {
@@ -36,6 +185,7 @@
 	int result;
 	struct ncp_ioctl_request request;
 	char* bouncebuffer;
+	void __user *argp = (void __user *)arg;
 
 	switch (cmd) {
 	case NCP_IOC_NCPREQUEST:
@@ -44,8 +194,7 @@
 		    && (current->uid != server->m.mounted_uid)) {
 			return -EACCES;
 		}
-		if (copy_from_user(&request, (struct ncp_ioctl_request *) arg,
-			       sizeof(request)))
+		if (copy_from_user(&request, argp, sizeof(request)))
 			return -EFAULT;
 
 		if ((request.function > 255)
@@ -96,60 +245,10 @@
 		return ncp_conn_logged_in(inode->i_sb);
 
 	case NCP_IOC_GET_FS_INFO:
-		{
-			struct ncp_fs_info info;
-
-			if ((permission(inode, MAY_WRITE, NULL) != 0)
-			    && (current->uid != server->m.mounted_uid)) {
-				return -EACCES;
-			}
-			if (copy_from_user(&info, (struct ncp_fs_info *) arg, 
-				sizeof(info)))
-				return -EFAULT;
-
-			if (info.version != NCP_GET_FS_INFO_VERSION) {
-				DPRINTK("info.version invalid: %d\n", info.version);
-				return -EINVAL;
-			}
-			/* TODO: info.addr = server->m.serv_addr; */
-			SET_UID(info.mounted_uid, server->m.mounted_uid);
-			info.connection		= server->connection;
-			info.buffer_size	= server->buffer_size;
-			info.volume_number	= NCP_FINFO(inode)->volNumber;
-			info.directory_id	= NCP_FINFO(inode)->DosDirNum;
-
-			if (copy_to_user((struct ncp_fs_info *) arg, &info, 
-				sizeof(info))) return -EFAULT;
-			return 0;
-		}
+		return ncp_get_fs_info(server, inode, argp);
 
 	case NCP_IOC_GET_FS_INFO_V2:
-		{
-			struct ncp_fs_info_v2 info2;
-
-			if ((permission(inode, MAY_WRITE, NULL) != 0)
-			    && (current->uid != server->m.mounted_uid)) {
-				return -EACCES;
-			}
-			if (copy_from_user(&info2, (struct ncp_fs_info_v2 *) arg, 
-				sizeof(info2)))
-				return -EFAULT;
-
-			if (info2.version != NCP_GET_FS_INFO_VERSION_V2) {
-				DPRINTK("info.version invalid: %d\n", info2.version);
-				return -EINVAL;
-			}
-			info2.mounted_uid   = server->m.mounted_uid;
-			info2.connection    = server->connection;
-			info2.buffer_size   = server->buffer_size;
-			info2.volume_number = NCP_FINFO(inode)->volNumber;
-			info2.directory_id  = NCP_FINFO(inode)->DosDirNum;
-			info2.dummy1 = info2.dummy2 = info2.dummy3 = 0;
-
-			if (copy_to_user((struct ncp_fs_info_v2 *) arg, &info2, 
-				sizeof(info2))) return -EFAULT;
-			return 0;
-		}
+		return ncp_get_fs_info_v2(server, inode, argp);
 
 	case NCP_IOC_GETMOUNTUID2:
 		{
@@ -160,7 +259,7 @@
 			{
 				return -EACCES;
 			}
-			if (put_user(tmp, (unsigned long*) arg)) 
+			if (put_user(tmp, (unsigned long __user *)argp)) 
 				return -EFAULT;
 			return 0;
 		}
@@ -193,15 +292,14 @@
 				sr.namespace = 0;
 				sr.dirEntNum = 0;
 			}
-			if (copy_to_user((struct ncp_setroot_ioctl*)arg, 
-				    	  &sr, 
-					  sizeof(sr))) return -EFAULT;
+			if (copy_to_user(argp, &sr, sizeof(sr)))
+				return -EFAULT;
 			return 0;
 		}
 	case NCP_IOC_SETROOT:
 		{
 			struct ncp_setroot_ioctl sr;
-			unsigned int vnum, de, dosde;
+			__u32 vnum, de, dosde;
 			struct dentry* dentry;
 
 			if (!capable(CAP_SYS_ADMIN))
@@ -209,9 +307,8 @@
 				return -EACCES;
 			}
 			if (server->root_setuped) return -EBUSY;
-			if (copy_from_user(&sr,
-					   (struct ncp_setroot_ioctl*)arg, 
-					   sizeof(sr))) return -EFAULT;
+			if (copy_from_user(&sr, argp, sizeof(sr)))
+				return -EFAULT;
 			if (sr.volNumber < 0) {
 				server->m.mounted_vol[0] = 0;
 				vnum = NCP_NUMBER_OF_VOLUMES;
@@ -219,15 +316,10 @@
 				dosde = 0;
 			} else if (sr.volNumber >= NCP_NUMBER_OF_VOLUMES) {
 				return -EINVAL;
-			} else {
-				struct nw_info_struct ni;
-				
-				if (ncp_mount_subdir(server, &ni, sr.volNumber,
-						sr.namespace, sr.dirEntNum))
-					return -ENOENT;
-				vnum = ni.volNumber;
-				de = ni.dirEntNum;
-				dosde = ni.DosDirNum;
+			} else if (ncp_mount_subdir(server, sr.volNumber,
+						sr.namespace, sr.dirEntNum,
+						&vnum, &de, &dosde)) {
+				return -ENOENT;
 			}
 			
 			dentry = inode->i_sb->s_root;
@@ -254,13 +346,13 @@
 		{
 			return -EACCES;
 		}
-		if (arg) {
+		if (argp) {
 			if (server->sign_wanted)
 			{
 				struct ncp_sign_init sign;
 
-				if (copy_from_user(&sign, (struct ncp_sign_init *) arg,
-				      sizeof(sign))) return -EFAULT;
+				if (copy_from_user(&sign, argp, sizeof(sign)))
+					return -EFAULT;
 				memcpy(server->sign_root,sign.sign_root,8);
 				memcpy(server->sign_last,sign.sign_last,16);
 				server->sign_active = 1;
@@ -278,7 +370,7 @@
 			return -EACCES;
 		}
 		
-                if (put_user(server->sign_wanted, (int*) arg))
+                if (put_user(server->sign_wanted, (int __user *)argp))
 			return -EFAULT;
                 return 0;
 	case NCP_IOC_SET_SIGN_WANTED:
@@ -291,7 +383,7 @@
 				return -EACCES;
 			}
 			/* get only low 8 bits... */
-			if (get_user(newstate, (unsigned char *) arg))
+			if (get_user(newstate, (unsigned char __user *)argp))
 				return -EFAULT;
 			if (server->sign_active) {
 				/* cannot turn signatures OFF when active */
@@ -315,8 +407,8 @@
 			struct ncp_lock_ioctl	 rqdata;
 			int result;
 
-			if (copy_from_user(&rqdata, (struct ncp_lock_ioctl*)arg,
-				sizeof(rqdata))) return -EFAULT;
+			if (copy_from_user(&rqdata, argp, sizeof(rqdata)))
+				return -EFAULT;
 			if (rqdata.origin != 0)
 				return -EINVAL;
 			/* check for cmd */
@@ -386,9 +478,8 @@
 			struct ncp_objectname_ioctl user;
 			size_t outl;
 
-			if (copy_from_user(&user, 
-					   (struct ncp_objectname_ioctl*)arg,
-					   sizeof(user))) return -EFAULT;
+			if (copy_from_user(&user, argp, sizeof(user)))
+				return -EFAULT;
 			user.auth_type = server->auth.auth_type;
 			outl = user.object_name_len;
 			user.object_name_len = server->auth.object_name_len;
@@ -399,9 +490,8 @@
 						 server->auth.object_name,
 						 outl)) return -EFAULT;
 			}
-			if (copy_to_user((struct ncp_objectname_ioctl*)arg,
-					 &user,
-					 sizeof(user))) return -EFAULT;
+			if (copy_to_user(argp, &user, sizeof(user)))
+				return -EFAULT;
 			return 0;
 		}
 	case NCP_IOC_SETOBJECTNAME:
@@ -416,9 +506,8 @@
 			void* oldprivate;
 			size_t oldprivatelen;
 
-			if (copy_from_user(&user, 
-					   (struct ncp_objectname_ioctl*)arg,
-					   sizeof(user))) return -EFAULT;
+			if (copy_from_user(&user, argp, sizeof(user)))
+				return -EFAULT;
 			if (user.object_name_len > NCP_OBJECT_NAME_MAX_LEN)
 				return -ENOMEM;
 			if (user.object_name_len) {
@@ -456,9 +545,8 @@
 			struct ncp_privatedata_ioctl user;
 			size_t outl;
 
-			if (copy_from_user(&user, 
-					   (struct ncp_privatedata_ioctl*)arg,
-					   sizeof(user))) return -EFAULT;
+			if (copy_from_user(&user, argp, sizeof(user)))
+				return -EFAULT;
 			outl = user.len;
 			user.len = server->priv.len;
 			if (outl > user.len) outl = user.len;
@@ -467,9 +555,8 @@
 						 server->priv.data,
 						 outl)) return -EFAULT;
 			}
-			if (copy_to_user((struct ncp_privatedata_ioctl*)arg,
-					 &user,
-					 sizeof(user))) return -EFAULT;
+			if (copy_to_user(argp, &user, sizeof(user)))
+				return -EFAULT;
 			return 0;
 		}
 	case NCP_IOC_SETPRIVATEDATA:
@@ -482,9 +569,8 @@
 			void* old;
 			size_t oldlen;
 
-			if (copy_from_user(&user, 
-					   (struct ncp_privatedata_ioctl*)arg,
-					   sizeof(user))) return -EFAULT;
+			if (copy_from_user(&user, argp, sizeof(user)))
+				return -EFAULT;
 			if (user.len > NCP_PRIVATE_DATA_MAX_LEN)
 				return -ENOMEM;
 			if (user.len) {
@@ -508,105 +594,14 @@
 		}
 
 #ifdef CONFIG_NCPFS_NLS
-/* Here we are select the iocharset and the codepage for NLS.
- * Thanks Petr Vandrovec for idea and many hints.
- */
 	case NCP_IOC_SETCHARSETS:
-		if (!capable(CAP_SYS_ADMIN))
-			return -EACCES;
-		if (server->root_setuped)
-			return -EBUSY;
-
-		{
-			struct ncp_nls_ioctl user;
-			struct nls_table *codepage;
-			struct nls_table *iocharset;
-			struct nls_table *oldset_io;
-			struct nls_table *oldset_cp;
-			
-			if (copy_from_user(&user, (struct ncp_nls_ioctl*)arg,
-					sizeof(user)))
-				return -EFAULT;
-
-			codepage = NULL;
-			user.codepage[NCP_IOCSNAME_LEN] = 0;
-			if (!user.codepage[0] ||
-					!strcmp(user.codepage, "default"))
-				codepage = load_nls_default();
-			else {
-				codepage = load_nls(user.codepage);
-				if (!codepage) {
-					return -EBADRQC;
-				}
-			}
-
-			iocharset = NULL;
-			user.iocharset[NCP_IOCSNAME_LEN] = 0;
-			if (!user.iocharset[0] ||
-					!strcmp(user.iocharset, "default")) {
-				iocharset = load_nls_default();
-				NCP_CLR_FLAG(server, NCP_FLAG_UTF8);
-			} else {
-				if (!strcmp(user.iocharset, "utf8")) {
-					iocharset = load_nls_default();
-					NCP_SET_FLAG(server, NCP_FLAG_UTF8);
-				} else {
-					iocharset = load_nls(user.iocharset);
-					if (!iocharset) {
-						unload_nls(codepage);
-						return -EBADRQC;
-					}
-					NCP_CLR_FLAG(server, NCP_FLAG_UTF8);
-				}
-			}
-
-			oldset_cp = server->nls_vol;
-			server->nls_vol = codepage;
-			oldset_io = server->nls_io;
-			server->nls_io = iocharset;
-
-			if (oldset_cp)
-				unload_nls(oldset_cp);
-			if (oldset_io)
-				unload_nls(oldset_io);
-
-			return 0;
-		}
+		return ncp_set_charsets(server, argp);
 		
-	case NCP_IOC_GETCHARSETS: /* not tested */
-		{
-			struct ncp_nls_ioctl user;
-			int len;
+	case NCP_IOC_GETCHARSETS:
+		return ncp_get_charsets(server, argp);
 
-			memset(&user, 0, sizeof(user));
-			if (server->nls_vol && server->nls_vol->charset) {
-				len = strlen(server->nls_vol->charset);
-				if (len > NCP_IOCSNAME_LEN)
-					len = NCP_IOCSNAME_LEN;
-				strncpy(user.codepage,
-						server->nls_vol->charset, len);
-				user.codepage[len] = 0;
-			}
-
-			if (NCP_IS_FLAG(server, NCP_FLAG_UTF8))
-				strcpy(user.iocharset, "utf8");
-			else
-				if (server->nls_io && server->nls_io->charset) {
-					len = strlen(server->nls_io->charset);
-					if (len > NCP_IOCSNAME_LEN)
-						len = NCP_IOCSNAME_LEN;
-					strncpy(user.iocharset,
-						server->nls_io->charset, len);
-					user.iocharset[len] = 0;
-				}
-
-			if (copy_to_user((struct ncp_nls_ioctl*)arg, &user,
-					sizeof(user)))
-				return -EFAULT;
-
-			return 0;
-		}
 #endif /* CONFIG_NCPFS_NLS */
+
 	case NCP_IOC_SETDENTRYTTL:
 		if ((permission(inode, MAY_WRITE, NULL) != 0) &&
 				 (current->uid != server->m.mounted_uid))
@@ -614,7 +609,7 @@
 		{
 			u_int32_t user;
 
-			if (copy_from_user(&user, (u_int32_t*)arg, sizeof(user)))
+			if (copy_from_user(&user, argp, sizeof(user)))
 				return -EFAULT;
 			/* 20 secs at most... */
 			if (user > 20000)
@@ -627,7 +622,7 @@
 	case NCP_IOC_GETDENTRYTTL:
 		{
 			u_int32_t user = (server->dentry_ttl * 1000) / HZ;
-			if (copy_to_user((u_int32_t*)arg, &user, sizeof(user)))
+			if (copy_to_user(argp, &user, sizeof(user)))
 				return -EFAULT;
 			return 0;
 		}
@@ -643,7 +638,7 @@
 			return -EACCES;
 		}
 		SET_UID(uid, server->m.mounted_uid);
-		if (put_user(uid, (__kernel_uid_t *) arg))
+		if (put_user(uid, (__kernel_uid_t __user *)argp))
 			return -EFAULT;
 		return 0;
 	}
--- diff/fs/ncpfs/ncplib_kernel.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ncpfs/ncplib_kernel.c	2004-07-01 21:32:48.000000000 +0100
@@ -536,37 +536,34 @@
 }
 
 int
-ncp_mount_subdir(struct ncp_server *server, struct nw_info_struct *i,
-			__u8 volNumber, __u8 srcNS, __u32 dirEntNum)
+ncp_mount_subdir(struct ncp_server *server,
+		 __u8 volNumber, __u8 srcNS, __u32 dirEntNum,
+		 __u32* volume, __u32* newDirEnt, __u32* newDosEnt)
 {
 	int dstNS;
 	int result;
-	__u32 newDirEnt;
-	__u32 newDosEnt;
 	
 	dstNS = ncp_get_known_namespace(server, volNumber);
 	if ((result = ncp_ObtainSpecificDirBase(server, srcNS, dstNS, volNumber, 
-				      dirEntNum, NULL, &newDirEnt, &newDosEnt)) != 0)
+				      dirEntNum, NULL, newDirEnt, newDosEnt)) != 0)
 	{
 		return result;
 	}
 	server->name_space[volNumber] = dstNS;
-	i->volNumber = volNumber;
-	i->dirEntNum = newDirEnt;
-	i->DosDirNum = newDosEnt;
+	*volume = volNumber;
 	server->m.mounted_vol[1] = 0;
 	server->m.mounted_vol[0] = 'X';
 	return 0;
 }
 
 int 
-ncp_lookup_volume(struct ncp_server *server, char *volname,
-		      struct nw_info_struct *target)
+ncp_get_volume_root(struct ncp_server *server, const char *volname,
+		    __u32* volume, __u32* dirent, __u32* dosdirent)
 {
 	int result;
-	int volnum;
+	__u8 volnum;
 
-	DPRINTK("ncp_lookup_volume: looking up vol %s\n", volname);
+	DPRINTK("ncp_get_volume_root: looking up vol %s\n", volname);
 
 	ncp_init_request(server);
 	ncp_add_byte(server, 22);	/* Subfunction: Generate dir handle */
@@ -585,16 +582,31 @@
 		ncp_unlock_server(server);
 		return result;
 	}
-	memset(target, 0, sizeof(*target));
-	target->DosDirNum = target->dirEntNum = ncp_reply_dword(server, 4);
-	target->volNumber = volnum = ncp_reply_byte(server, 8);
+	*dirent = *dosdirent = ncp_reply_dword(server, 4);
+	volnum = ncp_reply_byte(server, 8);
 	ncp_unlock_server(server);
+	*volume = volnum;
 
 	server->name_space[volnum] = ncp_get_known_namespace(server, volnum);
 
 	DPRINTK("lookup_vol: namespace[%d] = %d\n",
 		volnum, server->name_space[volnum]);
 
+	return 0;
+}
+
+int
+ncp_lookup_volume(struct ncp_server *server, const char *volname,
+		  struct nw_info_struct *target)
+{
+	int result;
+
+	memset(target, 0, sizeof(*target));
+	result = ncp_get_volume_root(server, volname,
+			&target->volNumber, &target->dirEntNum, &target->DosDirNum);
+	if (result) {
+		return result;
+	}
 	target->nameLen = strlen(volname);
 	memcpy(target->entryName, volname, target->nameLen+1);
 	target->attributes = aDIR;
--- diff/fs/ncpfs/ncplib_kernel.h	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ncpfs/ncplib_kernel.h	2004-07-01 21:32:48.000000000 +0100
@@ -70,7 +70,9 @@
 int ncp_obtain_info(struct ncp_server *server, struct inode *, char *,
 		struct nw_info_struct *target);
 int ncp_obtain_nfs_info(struct ncp_server *server, struct nw_info_struct *target);
-int ncp_lookup_volume(struct ncp_server *, char *, struct nw_info_struct *);
+int ncp_get_volume_root(struct ncp_server *server, const char *volname,
+			__u32 *volume, __u32 *dirent, __u32 *dosdirent);
+int ncp_lookup_volume(struct ncp_server *, const char *, struct nw_info_struct *);
 int ncp_modify_file_or_subdir_dos_info(struct ncp_server *, struct inode *,
 	 __u32, const struct nw_modify_dos_info *info);
 int ncp_modify_file_or_subdir_dos_info_path(struct ncp_server *, struct inode *,
@@ -111,8 +113,8 @@
 #endif	/* CONFIG_NCPFS_IOCTL_LOCKING */
 
 int
-ncp_mount_subdir(struct ncp_server *, struct nw_info_struct *,
-			__u8, __u8, __u32);
+ncp_mount_subdir(struct ncp_server *, __u8, __u8, __u32,
+		 __u32* volume, __u32* dirent, __u32* dosdirent);
 int ncp_dirhandle_alloc(struct ncp_server *, __u8 vol, __u32 dirent, __u8 *dirhandle);
 int ncp_dirhandle_free(struct ncp_server *, __u8 dirhandle);
 
--- diff/fs/nfs/direct.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/nfs/direct.c	2004-07-01 21:32:48.000000000 +0100
@@ -475,7 +475,7 @@
 	struct address_space *mapping = file->f_mapping;
 	struct inode *inode = mapping->host;
 	struct iovec iov = {
-		.iov_base = (char *)buf,
+		.iov_base = buf,
 		.iov_len = count,
 	};
 
--- diff/fs/nfs/idmap.c	2004-05-19 22:12:29.000000000 +0100
+++ source/fs/nfs/idmap.c	2004-07-01 21:32:48.000000000 +0100
@@ -75,9 +75,10 @@
 	struct idmap_hashtable idmap_group_hash;
 };
 
-static ssize_t   idmap_pipe_upcall(struct file *, struct rpc_pipe_msg *, char *,
-                     size_t);
-static ssize_t   idmap_pipe_downcall(struct file *, const char *, size_t);
+static ssize_t   idmap_pipe_upcall(struct file *, struct rpc_pipe_msg *,
+		     char __user *, size_t);
+static ssize_t   idmap_pipe_downcall(struct file *, const char __user *,
+		     size_t);
 void             idmap_pipe_destroy_msg(struct rpc_pipe_msg *);
 
 static unsigned int fnvhash32(const void *, size_t);
@@ -332,7 +333,7 @@
 /* RPC pipefs upcall/downcall routines */
 static ssize_t
 idmap_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg,
-    char *dst, size_t buflen)
+    char __user *dst, size_t buflen)
 {
         char *data = (char *)msg->data + msg->copied;
         ssize_t mlen = msg->len - msg->copied;
@@ -353,7 +354,7 @@
 }
 
 static ssize_t
-idmap_pipe_downcall(struct file *filp, const char *src, size_t mlen)
+idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
 {
         struct rpc_inode *rpci = RPC_I(filp->f_dentry->d_inode);
 	struct idmap *idmap = (struct idmap *)rpci->private;
--- diff/fs/nfsctl.c	2004-05-19 22:12:24.000000000 +0100
+++ source/fs/nfsctl.c	2004-07-01 21:32:48.000000000 +0100
@@ -32,6 +32,7 @@
 	nd.dentry = dget(nd.mnt->mnt_root);
 	nd.last_type = LAST_ROOT;
 	nd.flags = 0;
+	nd.depth = 0;
 
 	error = path_walk(name, &nd);
 	if (error)
--- diff/fs/nfsd/nfs4proc.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/nfsd/nfs4proc.c	2004-07-01 21:32:48.000000000 +0100
@@ -135,9 +135,11 @@
 {
 	int status;
 
-	dprintk("NFSD: do_open_fhandle\n");
+	/* Only reclaims from previously confirmed clients are valid */
+	if ((status = nfs4_check_open_reclaim(&open->op_clientid)))
+		return status;
 
-	/* we don't know the target directory, and therefore can not
+	/* We don't know the target directory, and therefore can not
 	* set the change info
 	*/
 
@@ -172,8 +174,7 @@
 	if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS)
 		return nfserr_grace;
 
-	if (nfs4_in_no_grace() &&
-		           open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
+	if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
 		return nfserr_no_grace;
 
 	/* This check required by spec. */
@@ -318,7 +319,7 @@
 	return status;
 }
 
-static inline int
+static int
 nfsd4_create(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_create *create)
 {
 	struct svc_fh resfh;
@@ -435,7 +436,7 @@
 	return status;
 }
 
-static inline int
+static int
 nfsd4_lookupp(struct svc_rqst *rqstp, struct svc_fh *current_fh)
 {
 	struct svc_fh tmp_fh;
@@ -773,13 +774,20 @@
 		    struct nfsd4_compoundres *resp)
 {
 	struct nfsd4_op	*op;
-	struct svc_fh	current_fh;
-	struct svc_fh	save_fh;
+	struct svc_fh	*current_fh = NULL;
+	struct svc_fh	*save_fh = NULL;
 	int		slack_space;    /* in words, not bytes! */
 	int		status;
 
-	fh_init(&current_fh, NFS4_FHSIZE);
-	fh_init(&save_fh, NFS4_FHSIZE);
+	status = nfserr_resource;
+	current_fh = kmalloc(sizeof(*current_fh), GFP_KERNEL);
+	if (current_fh == NULL)
+		goto out;
+	fh_init(current_fh, NFS4_FHSIZE);
+	save_fh = kmalloc(sizeof(*save_fh), GFP_KERNEL);
+	if (save_fh == NULL)
+		goto out;
+	fh_init(save_fh, NFS4_FHSIZE);
 
 	resp->xbuf = &rqstp->rq_res;
 	resp->p = rqstp->rq_res.head[0].iov_base + rqstp->rq_res.head[0].iov_len;
@@ -831,7 +839,7 @@
 		* SETATTR NOFILEHANDLE error handled in nfsd4_setattr
 		* due to required returned bitmap argument
 		*/
-		if ((!current_fh.fh_dentry) &&
+		if ((!current_fh->fh_dentry) &&
 		   !((op->opnum == OP_PUTFH) || (op->opnum == OP_PUTROOTFH) ||
 		   (op->opnum == OP_SETCLIENTID) ||
 		   (op->opnum == OP_SETCLIENTID_CONFIRM) ||
@@ -843,105 +851,105 @@
 		}
 		switch (op->opnum) {
 		case OP_ACCESS:
-			op->status = nfsd4_access(rqstp, &current_fh, &op->u.access);
+			op->status = nfsd4_access(rqstp, current_fh, &op->u.access);
 			break;
 		case OP_CLOSE:
-			op->status = nfsd4_close(rqstp, &current_fh, &op->u.close);
+			op->status = nfsd4_close(rqstp, current_fh, &op->u.close);
 			if (op->u.close.cl_stateowner)
 				op->replay =
 					&op->u.close.cl_stateowner->so_replay;
 			break;
 		case OP_COMMIT:
-			op->status = nfsd4_commit(rqstp, &current_fh, &op->u.commit);
+			op->status = nfsd4_commit(rqstp, current_fh, &op->u.commit);
 			break;
 		case OP_CREATE:
-			op->status = nfsd4_create(rqstp, &current_fh, &op->u.create);
+			op->status = nfsd4_create(rqstp, current_fh, &op->u.create);
 			break;
 		case OP_GETATTR:
-			op->status = nfsd4_getattr(rqstp, &current_fh, &op->u.getattr);
+			op->status = nfsd4_getattr(rqstp, current_fh, &op->u.getattr);
 			break;
 		case OP_GETFH:
-			op->status = nfsd4_getfh(&current_fh, &op->u.getfh);
+			op->status = nfsd4_getfh(current_fh, &op->u.getfh);
 			break;
 		case OP_LINK:
-			op->status = nfsd4_link(rqstp, &current_fh, &save_fh, &op->u.link);
+			op->status = nfsd4_link(rqstp, current_fh, save_fh, &op->u.link);
 			break;
 		case OP_LOCK:
-			op->status = nfsd4_lock(rqstp, &current_fh, &op->u.lock);
+			op->status = nfsd4_lock(rqstp, current_fh, &op->u.lock);
 			if (op->u.lock.lk_stateowner)
 				op->replay =
 					&op->u.lock.lk_stateowner->so_replay;
 			break;
 		case OP_LOCKT:
-			op->status = nfsd4_lockt(rqstp, &current_fh, &op->u.lockt);
+			op->status = nfsd4_lockt(rqstp, current_fh, &op->u.lockt);
 			break;
 		case OP_LOCKU:
-			op->status = nfsd4_locku(rqstp, &current_fh, &op->u.locku);
+			op->status = nfsd4_locku(rqstp, current_fh, &op->u.locku);
 			if (op->u.locku.lu_stateowner)
 				op->replay =
 					&op->u.locku.lu_stateowner->so_replay;
 			break;
 		case OP_LOOKUP:
-			op->status = nfsd4_lookup(rqstp, &current_fh, &op->u.lookup);
+			op->status = nfsd4_lookup(rqstp, current_fh, &op->u.lookup);
 			break;
 		case OP_LOOKUPP:
-			op->status = nfsd4_lookupp(rqstp, &current_fh);
+			op->status = nfsd4_lookupp(rqstp, current_fh);
 			break;
 		case OP_NVERIFY:
-			op->status = nfsd4_verify(rqstp, &current_fh, &op->u.nverify);
+			op->status = nfsd4_verify(rqstp, current_fh, &op->u.nverify);
 			if (op->status == nfserr_not_same)
 				op->status = nfs_ok;
 			break;
 		case OP_OPEN:
-			op->status = nfsd4_open(rqstp, &current_fh, &op->u.open);
+			op->status = nfsd4_open(rqstp, current_fh, &op->u.open);
 			if (op->u.open.op_stateowner)
 				op->replay =
 					&op->u.open.op_stateowner->so_replay;
 			break;
 		case OP_OPEN_CONFIRM:
-			op->status = nfsd4_open_confirm(rqstp, &current_fh, &op->u.open_confirm);
+			op->status = nfsd4_open_confirm(rqstp, current_fh, &op->u.open_confirm);
 			if (op->u.open_confirm.oc_stateowner)
 				op->replay =
 					&op->u.open_confirm.oc_stateowner->so_replay;
 			break;
 		case OP_OPEN_DOWNGRADE:
-			op->status = nfsd4_open_downgrade(rqstp, &current_fh, &op->u.open_downgrade);
+			op->status = nfsd4_open_downgrade(rqstp, current_fh, &op->u.open_downgrade);
 			if (op->u.open_downgrade.od_stateowner)
 				op->replay =
 					&op->u.open_downgrade.od_stateowner->so_replay;
 			break;
 		case OP_PUTFH:
-			op->status = nfsd4_putfh(rqstp, &current_fh, &op->u.putfh);
+			op->status = nfsd4_putfh(rqstp, current_fh, &op->u.putfh);
 			break;
 		case OP_PUTROOTFH:
-			op->status = nfsd4_putrootfh(rqstp, &current_fh);
+			op->status = nfsd4_putrootfh(rqstp, current_fh);
 			break;
 		case OP_READ:
-			op->status = nfsd4_read(rqstp, &current_fh, &op->u.read);
+			op->status = nfsd4_read(rqstp, current_fh, &op->u.read);
 			break;
 		case OP_READDIR:
-			op->status = nfsd4_readdir(rqstp, &current_fh, &op->u.readdir);
+			op->status = nfsd4_readdir(rqstp, current_fh, &op->u.readdir);
 			break;
 		case OP_READLINK:
-			op->status = nfsd4_readlink(rqstp, &current_fh, &op->u.readlink);
+			op->status = nfsd4_readlink(rqstp, current_fh, &op->u.readlink);
 			break;
 		case OP_REMOVE:
-			op->status = nfsd4_remove(rqstp, &current_fh, &op->u.remove);
+			op->status = nfsd4_remove(rqstp, current_fh, &op->u.remove);
 			break;
 		case OP_RENAME:
-			op->status = nfsd4_rename(rqstp, &current_fh, &save_fh, &op->u.rename);
+			op->status = nfsd4_rename(rqstp, current_fh, save_fh, &op->u.rename);
 			break;
 		case OP_RENEW:
 			op->status = nfsd4_renew(&op->u.renew);
 			break;
 		case OP_RESTOREFH:
-			op->status = nfsd4_restorefh(&current_fh, &save_fh);
+			op->status = nfsd4_restorefh(current_fh, save_fh);
 			break;
 		case OP_SAVEFH:
-			op->status = nfsd4_savefh(&current_fh, &save_fh);
+			op->status = nfsd4_savefh(current_fh, save_fh);
 			break;
 		case OP_SETATTR:
-			op->status = nfsd4_setattr(rqstp, &current_fh, &op->u.setattr);
+			op->status = nfsd4_setattr(rqstp, current_fh, &op->u.setattr);
 			break;
 		case OP_SETCLIENTID:
 			op->status = nfsd4_setclientid(rqstp, &op->u.setclientid);
@@ -950,12 +958,12 @@
 			op->status = nfsd4_setclientid_confirm(rqstp, &op->u.setclientid_confirm);
 			break;
 		case OP_VERIFY:
-			op->status = nfsd4_verify(rqstp, &current_fh, &op->u.verify);
+			op->status = nfsd4_verify(rqstp, current_fh, &op->u.verify);
 			if (op->status == nfserr_same)
 				op->status = nfs_ok;
 			break;
 		case OP_WRITE:
-			op->status = nfsd4_write(rqstp, &current_fh, &op->u.write);
+			op->status = nfsd4_write(rqstp, current_fh, &op->u.write);
 			break;
 		case OP_RELEASE_LOCKOWNER:
 			op->status = nfsd4_release_lockowner(rqstp, &op->u.release_lockowner);
@@ -976,22 +984,13 @@
 	}
 
 out:
-	if (args->ops != args->iops) {
-		kfree(args->ops);
-		args->ops = args->iops;
-	}
-	if (args->tmpp) {
-		kfree(args->tmpp);
-		args->tmpp = NULL;
-	}
-	while (args->to_free) {
-		struct tmpbuf *tb = args->to_free;
-		args->to_free = tb->next;
-		kfree(tb->buf);
-		kfree(tb);
-	}
-	fh_put(&current_fh);
-	fh_put(&save_fh);
+	nfsd4_release_compoundargs(args);
+	if (current_fh)
+		fh_put(current_fh);
+	kfree(current_fh);
+	if (save_fh)
+		fh_put(save_fh);
+	kfree(save_fh);
 	return status;
 }
 
--- diff/fs/nfsd/nfs4state.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/nfsd/nfs4state.c	2004-07-01 21:32:48.000000000 +0100
@@ -51,6 +51,9 @@
 #define NFSDDBG_FACILITY                NFSDDBG_PROC
 
 /* Globals */
+static time_t lease_time = 90;     /* default lease time */
+static time_t old_lease_time = 90; /* past incarnation lease time */
+static u32 nfs4_reclaim_init = 0;
 time_t boot_time;
 static time_t grace_end = 0;
 static u32 current_clientid = 1;
@@ -82,7 +85,7 @@
  * 	protects clientid_hashtbl[], clientstr_hashtbl[],
  * 	unconfstr_hashtbl[], uncofid_hashtbl[].
  */
-static struct semaphore client_sema;
+static DECLARE_MUTEX(client_sema);
 
 void
 nfs4_lock_state(void)
@@ -131,8 +134,11 @@
 	((id) & CLIENT_HASH_MASK)
 #define clientstr_hashval(name, namelen) \
 	(opaque_hashval((name), (namelen)) & CLIENT_HASH_MASK)
-
-/* conf_id_hashtbl[], and conf_str_hashtbl[] hold confirmed
+/*
+ * reclaim_str_hashtbl[] holds known client info from previous reset/reboot
+ * used in reboot/reset lease grace period processing
+ *
+ * conf_id_hashtbl[], and conf_str_hashtbl[] hold confirmed
  * setclientid_confirmed info. 
  *
  * unconf_str_hastbl[] and unconf_id_hashtbl[] hold unconfirmed 
@@ -144,6 +150,8 @@
  * close_lru holds (open) stateowner queue ordered by nfs4_stateowner.so_time
  * for last close replay.
  */
+static struct list_head	reclaim_str_hashtbl[CLIENT_HASH_SIZE];
+static int reclaim_str_hashtbl_size;
 static struct list_head	conf_id_hashtbl[CLIENT_HASH_SIZE];
 static struct list_head	conf_str_hashtbl[CLIENT_HASH_SIZE];
 static struct list_head	unconf_str_hashtbl[CLIENT_HASH_SIZE];
@@ -339,6 +347,95 @@
 	renew_client(clp);
 }
 
+
+/* a helper function for parse_callback */
+static int
+parse_octet(unsigned int *lenp, char **addrp)
+{
+	unsigned int len = *lenp;
+	char *p = *addrp;
+	int n = -1;
+	char c;
+
+	for (;;) {
+		if (!len)
+			break;
+		len--;
+		c = *p++;
+		if (c == '.')
+			break;
+		if ((c < '0') || (c > '9')) {
+			n = -1;
+			break;
+		}
+		if (n < 0)
+			n = 0;
+		n = (n * 10) + (c - '0');
+		if (n > 255) {
+			n = -1;
+			break;
+		}
+	}
+	*lenp = len;
+	*addrp = p;
+	return n;
+}
+
+/* parse and set the setclientid ipv4 callback address */
+int
+parse_ipv4(unsigned int addr_len, char *addr_val, unsigned int *cbaddrp, unsigned short *cbportp)
+{
+	int temp = 0;
+	u32 cbaddr = 0;
+	u16 cbport = 0;
+	u32 addrlen = addr_len;
+	char *addr = addr_val;
+	int i, shift;
+
+	/* ipaddress */
+	shift = 24;
+	for(i = 4; i > 0  ; i--) {
+		if ((temp = parse_octet(&addrlen, &addr)) < 0) {
+			return 0;
+		}
+		cbaddr |= (temp << shift);
+		if(shift > 0)
+		shift -= 8;
+	}
+	*cbaddrp = cbaddr;
+
+	/* port */
+	shift = 8;
+	for(i = 2; i > 0  ; i--) {
+		if ((temp = parse_octet(&addrlen, &addr)) < 0) {
+			return 0;
+		}
+		cbport |= (temp << shift);
+		if(shift > 0)
+			shift -= 8;
+	}
+	*cbportp = cbport;
+	return 1;
+}
+
+void
+gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se)
+{
+	struct nfs4_callback *cb = &clp->cl_callback;
+
+	if( !(parse_ipv4(se->se_callback_addr_len, se->se_callback_addr_val,
+		         &cb->cb_addr, &cb->cb_port))) {
+		printk(KERN_INFO "NFSD: BAD callback address. client will not receive delegations\n");
+		cb->cb_parsed = 0;
+		return;
+	}
+	cb->cb_netid.len = se->se_callback_netid_len;
+	cb->cb_netid.data = se->se_callback_netid_val;
+        cb->cb_prog = se->se_callback_prog;
+        cb->cb_ident = se->se_callback_ident;
+        cb->cb_parsed = 1;
+}
+
 /*
  * RFC 3010 has a complex implmentation description of processing a 
  * SETCLIENTID request consisting of 5 bullets, labeled as 
@@ -450,6 +547,7 @@
 		copy_cred(&new->cl_cred,&rqstp->rq_cred);
 		gen_clid(new);
 		gen_confirm(new);
+		gen_callback(new, setclid);
 		add_to_unconfirmed(new, strhashval);
 	} else if (cmp_verf(&conf->cl_verifier, &clverifier)) {
 		/*
@@ -477,6 +575,7 @@
 		copy_cred(&new->cl_cred,&rqstp->rq_cred);
 		copy_clid(new, conf);
 		gen_confirm(new);
+		gen_callback(new, setclid);
 		add_to_unconfirmed(new,strhashval);
 	} else if (!unconf) {
 		/*
@@ -494,6 +593,7 @@
 		copy_cred(&new->cl_cred,&rqstp->rq_cred);
 		gen_clid(new);
 		gen_confirm(new);
+		gen_callback(new, setclid);
 		add_to_unconfirmed(new, strhashval);
 	} else if (!cmp_verf(&conf->cl_confirm, &unconf->cl_confirm)) {
 		/*	
@@ -519,6 +619,7 @@
 		copy_cred(&new->cl_cred,&rqstp->rq_cred);
 		gen_clid(new);
 		gen_confirm(new);
+		gen_callback(new, setclid);
 		add_to_unconfirmed(new, strhashval);
 	} else {
 		/* No cases hit !!! */
@@ -529,7 +630,6 @@
 	setclid->se_clientid.cl_boot = new->cl_clientid.cl_boot;
 	setclid->se_clientid.cl_id = new->cl_clientid.cl_id;
 	memcpy(setclid->se_confirm.data, new->cl_confirm.data, sizeof(setclid->se_confirm.data));
-	printk(KERN_INFO "NFSD: this client will not receive delegations\n");
 	status = nfs_ok;
 out:
 	nfs4_unlock_state();
@@ -1510,10 +1610,12 @@
 
 	status = nfserr_bad_stateid;
 
-	/* for new lock stateowners, check that the lock->v.new.open_stateid
-	 * refers to an open stateowner, and that the lockclid
-	 * (nfs4_lock->v.new.clientid) is the same as the
-	 * open_stateid->st_stateowner->so_client->clientid
+	/* for new lock stateowners:
+	 * check that the lock->v.new.open_stateid
+	 * refers to an open stateowner
+	 *
+	 * check that the lockclid (nfs4_lock->v.new.clientid) is the same
+	 * as the open_stateid->st_stateowner->so_client->clientid
 	 */
 	if (lockclid) {
 		struct nfs4_stateowner *sop = stp->st_stateowner;
@@ -1599,6 +1701,17 @@
 }
 
 /*
+ * eventually, this will perform an upcall to the 'state daemon' as well as
+ * set the cl_first_state field.
+ */
+void
+first_state(struct nfs4_client *clp)
+{
+	if (!clp->cl_first_state)
+		clp->cl_first_state = get_seconds();
+}
+
+/*
  * nfs4_unlock_state(); called in encode
  */
 int
@@ -1635,6 +1748,7 @@
 		         stp->st_stateid.si_fileid,
 		         stp->st_stateid.si_generation);
 	status = nfs_ok;
+	first_state(sop->so_client);
 out:
 	return status;
 }
@@ -1850,6 +1964,21 @@
 		deny->ld_type = NFS4_WRITE_LT;
 }
 
+static struct nfs4_stateowner *
+find_lockstateowner(struct xdr_netobj *owner, clientid_t *clid)
+{
+	struct nfs4_stateowner *local = NULL;
+	int i;
+
+	for (i = 0; i < LOCK_HASH_SIZE; i++) {
+		list_for_each_entry(local, &lock_ownerid_hashtbl[i], so_idhash) {
+			if(!cmp_owner_str(local, owner, clid))
+				continue;
+			return local;
+		}
+	}
+	return NULL;
+}
 
 static int
 find_lockstateowner_str(unsigned int hashval, struct xdr_netobj *owner, clientid_t *clid, struct nfs4_stateowner **op) {
@@ -1969,7 +2098,7 @@
 
 	if (nfs4_in_grace() && !lock->lk_reclaim)
 		return nfserr_grace;
-	if (nfs4_in_no_grace() && lock->lk_reclaim)
+	if (!nfs4_in_grace() && lock->lk_reclaim)
 		return nfserr_no_grace;
 
 	if (check_lock_length(lock->lk_offset, lock->lk_length))
@@ -1992,7 +2121,11 @@
 			printk("NFSD: nfsd4_lock: clientid is stale!\n");
 			goto out;
 		}
-		/* does the clientid in the lock owner own the open stateid? */
+
+		/* is the new lock seqid presented by the client zero? */
+		status = nfserr_bad_seqid;
+		if (lock->v.new.lock_seqid != 0)
+			goto out;
 
 		/* validate and update open stateid and open seqid */
 		status = nfs4_preprocess_seqid_op(current_fh, 
@@ -2011,15 +2144,15 @@
 		strhashval = lock_ownerstr_hashval(fp->fi_inode, 
 				open_sop->so_client->cl_clientid.cl_id, 
 				lock->v.new.owner);
-
 		/* 
 		 * If we already have this lock owner, the client is in 
 		 * error (or our bookeeping is wrong!) 
 		 * for asking for a 'new lock'.
 		 */
 		status = nfserr_bad_stateid;
-		if (find_lockstateowner_str(strhashval, &lock->v.new.owner,
-					&lock->v.new.clientid, &lock_sop))
+		lock_sop = find_lockstateowner(&lock->v.new.owner,
+						&lock->v.new.clientid);
+		if (lock_sop)
 			goto out;
 		status = nfserr_resource;
 		if (!(lock->lk_stateowner = alloc_init_lock_stateowner(strhashval, open_sop->so_client, open_stp, lock)))
@@ -2315,7 +2448,7 @@
 	clientid_t *clid = &rlockowner->rl_clientid;
 	struct nfs4_stateowner *local = NULL;
 	struct xdr_netobj *owner = &rlockowner->rl_owner;
-	int status, i;
+	int status;
 
 	dprintk("nfsd4_release_lockowner clientid: (%08x/%08x):\n",
 		clid->cl_boot, clid->cl_id);
@@ -2330,34 +2463,136 @@
 
 	nfs4_lock_state();
 
-	/* find the lockowner */
         status = nfs_ok;
-	for (i=0; i < LOCK_HASH_SIZE; i++)
-		list_for_each_entry(local, &lock_ownerstr_hashtbl[i], so_strhash)
-			if(cmp_owner_str(local, owner, clid)) {
-				struct nfs4_stateid *stp;
-
-				/* check for any locks held by any stateid
-				 * associated with the (lock) stateowner */
-				status = nfserr_locks_held;
-				list_for_each_entry(stp, &local->so_perfilestate,
-						    st_perfilestate) {
-					if(stp->st_vfs_set) {
-						if (check_for_locks(&stp->st_vfs_file,
-								    local))
-							goto out;
-					}
-				}
-				/* no locks held by (lock) stateowner */
-				status = nfs_ok;
-				release_stateowner(local);
-				goto out;
+	local = find_lockstateowner(owner, clid);
+	if (local) {
+		struct nfs4_stateid *stp;
+
+		/* check for any locks held by any stateid
+		 * associated with the (lock) stateowner */
+		status = nfserr_locks_held;
+		list_for_each_entry(stp, &local->so_perfilestate,
+				st_perfilestate) {
+			if(stp->st_vfs_set) {
+				if (check_for_locks(&stp->st_vfs_file, local))
+					goto out;
 			}
+		}
+		/* no locks held by (lock) stateowner */
+		status = nfs_ok;
+		release_stateowner(local);
+	}
 out:
 	nfs4_unlock_state();
 	return status;
 }
 
+static inline struct nfs4_client_reclaim *
+alloc_reclaim(int namelen)
+{
+	struct nfs4_client_reclaim *crp = NULL;
+
+	crp = kmalloc(sizeof(struct nfs4_client_reclaim), GFP_KERNEL);
+	if (!crp)
+		return NULL;
+	crp->cr_name.data = kmalloc(namelen, GFP_KERNEL);
+	if (!crp->cr_name.data) {
+		kfree(crp);
+		return NULL;
+	}
+       	return crp;
+}
+
+/*
+ * failure => all reset bets are off, nfserr_no_grace...
+ */
+static int
+nfs4_client_to_reclaim(struct nfs4_client *clp)
+{
+	unsigned int strhashval;
+	struct nfs4_client_reclaim *crp = NULL;
+
+	crp = alloc_reclaim(clp->cl_name.len);
+	if (!crp)
+		return 0;
+	strhashval = clientstr_hashval(clp->cl_name.data, clp->cl_name.len);
+	INIT_LIST_HEAD(&crp->cr_strhash);
+	list_add(&crp->cr_strhash, &reclaim_str_hashtbl[strhashval]);
+	memcpy(crp->cr_name.data, clp->cl_name.data, clp->cl_name.len);
+	crp->cr_name.len = clp->cl_name.len;
+	crp->cr_first_state = clp->cl_first_state;
+	crp->cr_expired = 0;
+	return 1;
+}
+
+static void
+nfs4_release_reclaim(void)
+{
+	struct nfs4_client_reclaim *crp = NULL;
+	int i;
+
+	BUG_ON(!nfs4_reclaim_init);
+	for (i = 0; i < CLIENT_HASH_SIZE; i++) {
+		while (!list_empty(&reclaim_str_hashtbl[i])) {
+			crp = list_entry(reclaim_str_hashtbl[i].next,
+			                struct nfs4_client_reclaim, cr_strhash);
+			list_del(&crp->cr_strhash);
+			kfree(crp->cr_name.data);
+			kfree(crp);
+			reclaim_str_hashtbl_size--;
+		}
+	}
+	BUG_ON(reclaim_str_hashtbl_size);
+}
+
+/*
+ * called from OPEN, CLAIM_PREVIOUS with a new clientid. */
+struct nfs4_client_reclaim *
+nfs4_find_reclaim_client(clientid_t *clid)
+{
+	unsigned int idhashval = clientid_hashval(clid->cl_id);
+	unsigned int strhashval;
+	struct nfs4_client *clp, *client = NULL;
+	struct nfs4_client_reclaim *crp = NULL;
+
+
+	/* find clientid in conf_id_hashtbl */
+	list_for_each_entry(clp, &conf_id_hashtbl[idhashval], cl_idhash) {
+		if (cmp_clid(&clp->cl_clientid, clid)) {
+			client = clp;
+			break;
+		}
+	}
+	if (!client)
+		return NULL;
+
+	/* find clp->cl_name in reclaim_str_hashtbl */
+	strhashval = clientstr_hashval(client->cl_name.data,
+	                              client->cl_name.len);
+	list_for_each_entry(crp, &reclaim_str_hashtbl[strhashval], cr_strhash) {
+		if(cmp_name(&crp->cr_name, &client->cl_name)) {
+			return crp;
+		}
+	}
+	return NULL;
+}
+
+/*
+* Called from OPEN. Look for clientid in reclaim list.
+*/
+int
+nfs4_check_open_reclaim(clientid_t *clid)
+{
+	struct nfs4_client_reclaim *crp;
+
+	if ((crp = nfs4_find_reclaim_client(clid)) == NULL)
+		return nfserr_reclaim_bad;
+	if (crp->cr_expired)
+		return nfserr_no_grace;
+	return nfs_ok;
+}
+
+
 /* 
  * Start and stop routines
  */
@@ -2366,10 +2601,16 @@
 nfs4_state_init(void)
 {
 	int i;
-	time_t start = get_seconds();
+	time_t grace_time;
 
 	if (nfs4_init)
 		return;
+	if (!nfs4_reclaim_init) {
+		for (i = 0; i < CLIENT_HASH_SIZE; i++)
+			INIT_LIST_HEAD(&reclaim_str_hashtbl[i]);
+		reclaim_str_hashtbl_size = 0;
+		nfs4_reclaim_init = 1;
+	}
 	for (i = 0; i < CLIENT_HASH_SIZE; i++) {
 		INIT_LIST_HEAD(&conf_id_hashtbl[i]);
 		INIT_LIST_HEAD(&conf_str_hashtbl[i]);
@@ -2396,27 +2637,36 @@
 
 	INIT_LIST_HEAD(&close_lru);
 	INIT_LIST_HEAD(&client_lru);
-	init_MUTEX(&client_sema);
-	boot_time = start;
-	grace_end = start + NFSD_LEASE_TIME;
+	boot_time = get_seconds();
+	grace_time = max(old_lease_time, lease_time);
+	if (reclaim_str_hashtbl_size == 0)
+		grace_time = 0;
+	if (grace_time)
+		printk("NFSD: starting %ld-second grace period\n", grace_time);
+	grace_end = boot_time + grace_time;
 	INIT_WORK(&laundromat_work,laundromat_main, NULL);
 	schedule_delayed_work(&laundromat_work, NFSD_LEASE_TIME*HZ);
 	nfs4_init = 1;
-
 }
 
 int
 nfs4_in_grace(void)
 {
-	return time_before(get_seconds(), (unsigned long)grace_end);
+	return get_seconds() < grace_end;
 }
 
-int
-nfs4_in_no_grace(void)
+void
+set_no_grace(void)
 {
-	return (grace_end < get_seconds());
+	printk("NFSD: ERROR in reboot recovery.  State reclaims will fail.\n");
+	grace_end = get_seconds();
 }
 
+time_t
+nfs4_lease_time(void)
+{
+	return lease_time;
+}
 
 static void
 __nfs4_state_shutdown(void)
@@ -2454,6 +2704,61 @@
 nfs4_state_shutdown(void)
 {
 	nfs4_lock_state();
+	nfs4_release_reclaim();
+	__nfs4_state_shutdown();
+	nfs4_unlock_state();
+}
+
+/*
+ * Called when leasetime is changed.
+ *
+ * if nfsd is not started, simply set the global lease.
+ *
+ * if nfsd(s) are running, lease change requires nfsv4 state to be reset.
+ * e.g: boot_time is reset, existing nfs4_client structs are
+ * used to fill reclaim_str_hashtbl, then all state (except for the
+ * reclaim_str_hashtbl) is re-initialized.
+ *
+ * if the old lease time is greater than the new lease time, the grace
+ * period needs to be set to the old lease time to allow clients to reclaim
+ * their state. XXX - we may want to set the grace period == lease time
+ * after an initial grace period == old lease time
+ *
+ * if an error occurs in this process, the new lease is set, but the server
+ * will not honor OPEN or LOCK reclaims, and will return nfserr_no_grace
+ * which means OPEN/LOCK/READ/WRITE will fail during grace period.
+ *
+ * clients will attempt to reset all state with SETCLIENTID/CONFIRM, and
+ * OPEN and LOCK reclaims.
+ */
+void
+nfs4_reset_lease(time_t leasetime)
+{
+	struct nfs4_client *clp;
+	int i;
+
+	printk("NFSD: New leasetime %ld\n",leasetime);
+	if (!nfs4_init)
+		return;
+	nfs4_lock_state();
+	old_lease_time = lease_time;
+	lease_time = leasetime;
+
+	nfs4_release_reclaim();
+
+	/* populate reclaim_str_hashtbl with current confirmed nfs4_clientid */
+	for (i = 0; i < CLIENT_HASH_SIZE; i++) {
+		list_for_each_entry(clp, &conf_id_hashtbl[i], cl_idhash) {
+			if (!nfs4_client_to_reclaim(clp)) {
+				nfs4_release_reclaim();
+				goto init_state;
+			}
+			reclaim_str_hashtbl_size++;
+		}
+	}
+init_state:
 	__nfs4_state_shutdown();
+	nfs4_state_init();
 	nfs4_unlock_state();
 }
+
--- diff/fs/nfsd/nfs4xdr.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/nfsd/nfs4xdr.c	2004-07-01 21:32:48.000000000 +0100
@@ -287,27 +287,40 @@
 	return p;
 }
 
-char *savemem(struct nfsd4_compoundargs *argp, u32 *p, int nbytes)
+static int
+defer_free(struct nfsd4_compoundargs *argp,
+		void (*release)(const void *), void *p)
 {
 	struct tmpbuf *tb;
+
+	tb = kmalloc(sizeof(*tb), GFP_KERNEL);
+	if (!tb)
+		return -ENOMEM;
+	tb->buf = p;
+	tb->release = release;
+	tb->next = argp->to_free;
+	argp->to_free = tb;
+	return 0;
+}
+
+char *savemem(struct nfsd4_compoundargs *argp, u32 *p, int nbytes)
+{
+	void *new = NULL;
 	if (p == argp->tmp) {
-		p = kmalloc(nbytes, GFP_KERNEL);
-		if (!p) return NULL;
+		new = kmalloc(nbytes, GFP_KERNEL);
+		if (!new) return NULL;
+		p = new;
 		memcpy(p, argp->tmp, nbytes);
 	} else {
 		if (p != argp->tmpp)
 			BUG();
 		argp->tmpp = NULL;
 	}
-	tb = kmalloc(sizeof(*tb), GFP_KERNEL);
-	if (!tb) {
-		kfree(p);
+	if (defer_free(argp, kfree, p)) {
+		kfree(new);
 		return NULL;
-	}
-	tb->buf = p;
-	tb->next = argp->to_free;
-	argp->to_free = tb;
-	return (char*)p;
+	} else
+		return (char *)p;
 }
 
 
@@ -1288,18 +1301,11 @@
         NF4SOCK, NF4BAD,  NF4LNK, NF4BAD,
 };
 
-static inline int
-xdr_padding(int l)
-{
-       return 3 - ((l - 1) & 3); /* smallest i>=0 such that (l+i)%4 = 0 */
-}
-
 static int
 nfsd4_encode_name(struct svc_rqst *rqstp, int group, uid_t id,
 			u32 **p, int *buflen)
 {
 	int status;
-	u32 len;
 
 	if (*buflen < (XDR_QUADLEN(IDMAP_NAMESZ) << 2) + 4)
 		return nfserr_resource;
@@ -1309,11 +1315,8 @@
 		status = nfsd_map_uid_to_name(rqstp, id, (u8 *)(*p + 1));
 	if (status < 0)
 		return nfserrno(status);
-	len = (unsigned)status;
-	*(*p)++ = htonl(len);
-	memset((u8 *)*p + len, 0, xdr_padding(len));
-	*p += XDR_QUADLEN(len);
-	*buflen -= (XDR_QUADLEN(len) << 2) + 4;
+	*p = xdr_encode_opaque(*p, NULL, status);
+	*buflen -= (XDR_QUADLEN(status) << 2) + 4;
 	BUG_ON(*buflen < 0);
 	return 0;
 }
@@ -2471,6 +2474,24 @@
         return xdr_ressize_check(rqstp, p);
 }
 
+void nfsd4_release_compoundargs(struct nfsd4_compoundargs *args)
+{
+	if (args->ops != args->iops) {
+		kfree(args->ops);
+		args->ops = args->iops;
+	}
+	if (args->tmpp) {
+		kfree(args->tmpp);
+		args->tmpp = NULL;
+	}
+	while (args->to_free) {
+		struct tmpbuf *tb = args->to_free;
+		args->to_free = tb->next;
+		tb->release(tb->buf);
+		kfree(tb);
+	}
+}
+
 int
 nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, u32 *p, struct nfsd4_compoundargs *args)
 {
@@ -2487,20 +2508,7 @@
 
 	status = nfsd4_decode_compound(args);
 	if (status) {
-		if (args->ops != args->iops) {
-			kfree(args->ops);
-			args->ops = args->iops;
-		}
-		if (args->tmpp) {
-			kfree(args->tmpp);
-			args->tmpp = NULL;
-		}
-		while (args->to_free) {
-			struct tmpbuf *tb = args->to_free;
-			args->to_free = tb->next;
-			kfree(tb->buf);
-			kfree(tb);
-		}
+		nfsd4_release_compoundargs(args);
 	}
 	return !status;
 }
--- diff/fs/nfsd/nfsctl.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/nfsd/nfsctl.c	2004-07-01 21:32:48.000000000 +0100
@@ -36,7 +36,7 @@
 #include <asm/uaccess.h>
 
 /*
- *	We have a single directory with 8 nodes in it.
+ *	We have a single directory with 9 nodes in it.
  */
 enum {
 	NFSD_Root = 1,
@@ -50,6 +50,7 @@
 	NFSD_List,
 	NFSD_Fh,
 	NFSD_Threads,
+	NFSD_Leasetime,
 };
 
 /*
@@ -64,6 +65,7 @@
 static ssize_t write_getfs(struct file *file, char *buf, size_t size);
 static ssize_t write_filehandle(struct file *file, char *buf, size_t size);
 static ssize_t write_threads(struct file *file, char *buf, size_t size);
+static ssize_t write_leasetime(struct file *file, char *buf, size_t size);
 
 static ssize_t (*write_op[])(struct file *, char *, size_t) = {
 	[NFSD_Svc] = write_svc,
@@ -75,6 +77,7 @@
 	[NFSD_Getfs] = write_getfs,
 	[NFSD_Fh] = write_filehandle,
 	[NFSD_Threads] = write_threads,
+	[NFSD_Leasetime] = write_leasetime,
 };
 
 /* an argresp is stored in an allocated page and holds the 
@@ -393,6 +396,29 @@
 	return strlen(buf);
 }
 
+extern time_t nfs4_leasetime(void);
+
+static ssize_t write_leasetime(struct file *file, char *buf, size_t size)
+{
+	/* if size > 10 seconds, call
+	 * nfs4_reset_lease() then write out the new lease (seconds) as reply
+	 */
+	char *mesg = buf;
+	int rv;
+
+	if (size > 0) {
+		int lease;
+		rv = get_int(&mesg, &lease);
+		if (rv)
+			return rv;
+		if (lease < 10 || lease > 3600)
+			return -EINVAL;
+		nfs4_reset_lease(lease);
+	}
+	sprintf(buf, "%ld\n", nfs4_lease_time());
+	return strlen(buf);
+}
+
 /*----------------------------------------------------------------------------*/
 /*
  *	populating the filesystem.
@@ -411,6 +437,9 @@
 		[NFSD_List] = {"exports", &exports_operations, S_IRUGO},
 		[NFSD_Fh] = {"filehandle", &transaction_ops, S_IWUSR|S_IRUSR},
 		[NFSD_Threads] = {"threads", &transaction_ops, S_IWUSR|S_IRUSR},
+#ifdef CONFIG_NFSD_V4
+		[NFSD_Leasetime] = {"nfsv4leasetime", &transaction_ops, S_IWUSR|S_IRUSR},
+#endif
 		/* last one */ {""}
 	};
 	return simple_fill_super(sb, 0x6e667364, nfsd_files);
--- diff/fs/nls/Kconfig	2004-05-19 22:12:30.000000000 +0100
+++ source/fs/nls/Kconfig	2004-07-01 21:32:48.000000000 +0100
@@ -332,6 +332,14 @@
 	  say Y here if you want to include the DOS codepage for Russian and
 	  Bulgarian and Belarusian.
 
+config NLS_ASCII
+	tristate "ASCII (United States)"
+	depends on NLS
+	help
+	  An ASCII NLS module is needed if you want to override the
+	  DEFAULT NLS with this very basic charset and don't want any
+	  non-ASCII characters to be translated.
+
 config NLS_ISO8859_1
 	tristate "NLS ISO 8859-1  (Latin 1; Western European Languages)"
 	depends on NLS
--- diff/fs/nls/Makefile	2004-05-19 22:12:30.000000000 +0100
+++ source/fs/nls/Makefile	2004-07-01 21:32:48.000000000 +0100
@@ -26,6 +26,7 @@
 obj-$(CONFIG_NLS_CODEPAGE_950)	+= nls_cp950.o
 obj-$(CONFIG_NLS_CODEPAGE_1250) += nls_cp1250.o
 obj-$(CONFIG_NLS_CODEPAGE_1251)	+= nls_cp1251.o
+obj-$(CONFIG_NLS_ASCII)		+= nls_ascii.o
 obj-$(CONFIG_NLS_ISO8859_1)	+= nls_iso8859-1.o
 obj-$(CONFIG_NLS_ISO8859_2)	+= nls_iso8859-2.o
 obj-$(CONFIG_NLS_ISO8859_3)	+= nls_iso8859-3.o
--- diff/fs/ntfs/ChangeLog	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/ChangeLog	2004-07-01 21:32:48.000000000 +0100
@@ -35,6 +35,51 @@
 	- Enable the code for setting the NT4 compatibility flag when we start
 	  making NTFS 1.2 specific modifications.
 
+2.1.15 - .
+
+	- Add new element itype.index.collation_rule to the ntfs inode
+	  structure and set it appropriately in ntfs_read_locked_inode().
+	- Implement a new inode type "index" to allow efficient access to the
+	  indices found in various system files and adapt inode handling
+	  accordingly (fs/ntfs/inode.[hc]).  An index inode is essentially an
+	  attribute inode (NInoAttr() is true) with an attribute type of
+	  AT_INDEX_ALLOCATION.  As such, it is no longer allowed to call
+	  ntfs_attr_iget() with an attribute type of AT_INDEX_ALLOCATION as
+	  there would be no way to distinguish between normal attribute inodes
+	  and index inodes.  The function to obtain an index inode is
+	  ntfs_index_iget() and it uses the helper function
+	  ntfs_read_locked_index_inode().  Note, we do not overload
+	  ntfs_attr_iget() as indices consist of multiple attributes so using
+	  ntfs_attr_iget() to obtain an index inode would be confusing.
+	- Ensure that there is no overflow when doing page->index <<
+	  PAGE_CACHE_SHIFT by casting page->index to s64 in fs/ntfs/aops.c.
+	- Use atomic kmap instead of kmap() in fs/ntfs/aops.c::ntfs_read_page()
+	  and ntfs_read_block().
+	- Use case sensitive attribute lookups instead of case insensitive ones.
+	- Lock all page cache pages belonging to mst protected attributes while
+	  accessing them to ensure we never see corrupt data while the page is
+	  under writeout.
+	- Add framework for generic ntfs collation (fs/ntfs/collation.[hc]).
+	  We have ntfs_is_collation_rule_supported() to check if the collation
+	  rule you want to use is supported and ntfs_collation() which actually
+	  collates two data items.  We currently only support COLLATION_BINARY
+	  and COLLATION_NTOFS_ULONG but support for other collation rules will
+	  be added as the need arises.
+	- Add a new type, ntfs_index_context, to allow retrieval of an index
+	  entry using the corresponding index key.  To get an index context,
+	  use ntfs_index_ctx_get() and to release it, use ntfs_index_ctx_put().
+	  This also adds a new slab cache for the index contexts.  To lookup a
+	  key in an index inode, use ntfs_index_lookup().  After modifying an
+	  index entry, call ntfs_index_entry_flush_dcache_page() followed by
+	  ntfs_index_entry_mark_dirty() to ensure the changes are written out
+	  to disk.  For details see fs/ntfs/index.[hc].  Note, at present, if
+	  an index entry is in the index allocation attribute rather than the
+	  index root attribute it will not be written out (you will get a
+	  warning message about discarded changes instead).
+	- Load the quota file ($Quota) and check if quota tracking is enabled
+	  and if so, mark the quotas out of date.  This causes windows to
+	  rescan the volume on boot and update all quota entries.
+
 2.1.14 - Fix an NFSd caused deadlock reported by several users.
 
 	- Modify fs/ntfs/ntfs_readdir() to copy the index root attribute value
--- diff/fs/ntfs/Makefile	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/Makefile	2004-07-01 21:32:48.000000000 +0100
@@ -2,10 +2,11 @@
 
 obj-$(CONFIG_NTFS_FS) += ntfs.o
 
-ntfs-objs := aops.o attrib.o compress.o debug.o dir.o file.o inode.o mft.o \
-	     mst.o namei.o super.o sysctl.o unistr.o upcase.o
+ntfs-objs := aops.o attrib.o collate.o compress.o debug.o dir.o file.o \
+	     index.o inode.o mft.o mst.o namei.o super.o sysctl.o unistr.o \
+	     upcase.o
 
-EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.14\"
+EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.15-WIP\"
 
 ifeq ($(CONFIG_NTFS_DEBUG),y)
 EXTRA_CFLAGS += -DDEBUG
@@ -14,5 +15,5 @@
 ifeq ($(CONFIG_NTFS_RW),y)
 EXTRA_CFLAGS += -DNTFS_RW
 
-ntfs-objs += logfile.o
+ntfs-objs += logfile.o quota.o
 endif
--- diff/fs/ntfs/aops.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/aops.c	2004-07-01 21:32:48.000000000 +0100
@@ -62,7 +62,8 @@
 
 		set_buffer_uptodate(bh);
 
-		file_ofs = (page->index << PAGE_CACHE_SHIFT) + bh_offset(bh);
+		file_ofs = ((s64)page->index << PAGE_CACHE_SHIFT) +
+				bh_offset(bh);
 		/* Check for the current buffer head overflowing. */
 		if (file_ofs + bh->b_size > ni->initialized_size) {
 			char *addr;
@@ -190,7 +191,7 @@
 		return -ENOMEM;
 	}
 
-	iblock = page->index << (PAGE_CACHE_SHIFT - blocksize_bits);
+	iblock = (s64)page->index << (PAGE_CACHE_SHIFT - blocksize_bits);
 	lblock = (ni->allocated_size + blocksize - 1) >> blocksize_bits;
 	zblock = (ni->initialized_size + blocksize - 1) >> blocksize_bits;
 
@@ -204,6 +205,8 @@
 	rl = NULL;
 	nr = i = 0;
 	do {
+		u8 *kaddr;
+
 		if (unlikely(buffer_uptodate(bh)))
 			continue;
 		if (unlikely(buffer_mapped(bh))) {
@@ -279,9 +282,10 @@
 		bh->b_blocknr = -1UL;
 		clear_buffer_mapped(bh);
 handle_zblock:
-		memset(kmap(page) + i * blocksize, 0, blocksize);
+		kaddr = kmap_atomic(page, KM_USER0);
+		memset(kaddr + i * blocksize, 0, blocksize);
 		flush_dcache_page(page);
-		kunmap(page);
+		kunmap_atomic(kaddr, KM_USER0);
 		set_buffer_uptodate(bh);
 	} while (i++, iblock++, (bh = bh->b_this_page) != head);
 
@@ -343,7 +347,7 @@
 {
 	s64 attr_pos;
 	ntfs_inode *ni, *base_ni;
-	char *addr;
+	u8 *kaddr;
 	attr_search_context *ctx;
 	MFT_RECORD *mrec;
 	u32 attr_len;
@@ -362,6 +366,7 @@
 
 	ni = NTFS_I(page->mapping->host);
 
+	/* NInoNonResident() == NInoIndexAllocPresent() */
 	if (NInoNonResident(ni)) {
 		/*
 		 * Only unnamed $DATA attributes can be compressed or
@@ -398,7 +403,7 @@
 		goto unm_err_out;
 	}
 	if (unlikely(!lookup_attr(ni->type, ni->name, ni->name_len,
-			IGNORE_CASE, 0, NULL, 0, ctx))) {
+			CASE_SENSITIVE, 0, NULL, 0, ctx))) {
 		err = -ENOENT;
 		goto put_unm_err_out;
 	}
@@ -409,22 +414,22 @@
 	/* The total length of the attribute value. */
 	attr_len = le32_to_cpu(ctx->attr->data.resident.value_length);
 
-	addr = kmap(page);
+	kaddr = kmap_atomic(page, KM_USER0);
 	/* Copy over in bounds data, zeroing the remainder of the page. */
 	if (attr_pos < attr_len) {
 		u32 bytes = attr_len - attr_pos;
 		if (bytes > PAGE_CACHE_SIZE)
 			bytes = PAGE_CACHE_SIZE;
 		else if (bytes < PAGE_CACHE_SIZE)
-			memset(addr + bytes, 0, PAGE_CACHE_SIZE - bytes);
+			memset(kaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
 		/* Copy the data to the page. */
-		memcpy(addr, attr_pos + (char*)ctx->attr +
+		memcpy(kaddr, attr_pos + (char*)ctx->attr +
 				le16_to_cpu(
 				ctx->attr->data.resident.value_offset), bytes);
 	} else
-		memset(addr, 0, PAGE_CACHE_SIZE);
+		memset(kaddr, 0, PAGE_CACHE_SIZE);
 	flush_dcache_page(page);
-	kunmap(page);
+	kunmap_atomic(kaddr, KM_USER0);
 
 	SetPageUptodate(page);
 put_unm_err_out:
@@ -440,6 +445,7 @@
 
 /**
  * ntfs_write_block - write a @page to the backing store
+ * @wbc:	writeback control structure
  * @page:	page cache page to write out
  *
  * This function is for writing pages belonging to non-resident, non-mst
@@ -508,7 +514,7 @@
 	/* NOTE: Different naming scheme to ntfs_read_block()! */
 
 	/* The first block in the page. */
-	block = page->index << (PAGE_CACHE_SHIFT - blocksize_bits);
+	block = (s64)page->index << (PAGE_CACHE_SHIFT - blocksize_bits);
 
 	/* The first out of bounds block for the data size. */
 	dblock = (vi->i_size + blocksize - 1) >> blocksize_bits;
@@ -768,8 +774,54 @@
 }
 
 /**
+ * ntfs_write_mst_block - write a @page to the backing store
+ * @wbc:	writeback control structure
+ * @page:	page cache page to write out
+ *
+ * This function is for writing pages belonging to non-resident, mst protected
+ * attributes to their backing store.  The only supported attribute is the
+ * index allocation attribute.  Both directory inodes and index inodes are
+ * supported.
+ *
+ * The page must remain locked for the duration of the write because we apply
+ * the mst fixups, write, and then undo the fixups, so if we were to unlock the
+ * page before undoing the fixups, any other user of the page will see the
+ * page contents as corrupt.
+ *
+ * Return 0 on success and -errno on error.
+ *
+ * Based on ntfs_write_block(), ntfs_mft_writepage(), and
+ * write_mft_record_nolock().
+ */
+static int ntfs_write_mst_block(struct writeback_control *wbc,
+		struct page *page)
+{
+	struct inode *vi;
+	ntfs_inode *ni;
+	ntfs_volume *vol;
+
+	vi = page->mapping->host;
+	ni = NTFS_I(vi);
+	vol = ni->vol;
+	ntfs_debug("Entering for inode 0x%lx, attribute type 0x%x, page index "
+			"0x%lx.", vi->i_ino, ni->type, page->index);
+	BUG_ON(!NInoNonResident(ni));
+	BUG_ON(!NInoMstProtected(ni));
+	BUG_ON(!(S_ISDIR(vi->i_mode) ||
+			(NInoAttr(ni) && ni->type == AT_INDEX_ALLOCATION)));
+	BUG_ON(PageWriteback(page));
+	set_page_writeback(page);
+	unlock_page(page);
+	end_page_writeback(page);
+	ntfs_warning(vi->i_sb, "Writing to index allocation attribute is not "
+			"supported yet.  Discarding written data.");
+	return 0;
+}
+
+/**
  * ntfs_writepage - write a @page to the backing store
  * @page:	page cache page to write out
+ * @wbc:	writeback control structure
  *
  * For non-resident attributes, ntfs_writepage() writes the @page by calling
  * the ntfs version of the generic block_write_full_page() function,
@@ -812,6 +864,7 @@
 
 	ni = NTFS_I(vi);
 
+	/* NInoNonResident() == NInoIndexAllocPresent() */
 	if (NInoNonResident(ni)) {
 		/*
 		 * Only unnamed $DATA attributes can be compressed, encrypted,
@@ -843,7 +896,6 @@
 				return -EOPNOTSUPP;
 			}
 		}
-
 		/* We have to zero every time due to mmap-at-end-of-file. */
 		if (page->index >= (vi->i_size >> PAGE_CACHE_SHIFT)) {
 			/* The page straddles i_size. */
@@ -853,16 +905,9 @@
 			flush_dcache_page(page);
 			kunmap_atomic(kaddr, KM_USER0);
 		}
-
-		// TODO: Implement and remove this check.
-		if (NInoMstProtected(ni)) {
-			unlock_page(page);
-			ntfs_error(vi->i_sb, "Writing to MST protected "
-					"attributes is not supported yet. "
-					"Sorry.");
-			return -EOPNOTSUPP;
-		}
-
+		/* Handle mst protected attributes. */
+		if (NInoMstProtected(ni))
+			return ntfs_write_mst_block(wbc, page);
 		/* Normal data stream. */
 		return ntfs_write_block(wbc, page);
 	}
@@ -893,7 +938,7 @@
 		goto err_out;
 	}
 	if (unlikely(!lookup_attr(ni->type, ni->name, ni->name_len,
-			IGNORE_CASE, 0, NULL, 0, ctx))) {
+			CASE_SENSITIVE, 0, NULL, 0, ctx))) {
 		err = -ENOENT;
 		goto err_out;
 	}
@@ -1042,7 +1087,7 @@
 		return -ENOMEM;
 
 	/* The first block in the page. */
-	block = page->index << (PAGE_CACHE_SHIFT - blocksize_bits);
+	block = (s64)page->index << (PAGE_CACHE_SHIFT - blocksize_bits);
 
 	/*
 	 * The first out of bounds block for the allocated size. No need to
@@ -1667,7 +1712,7 @@
 		goto err_out;
 	}
 	if (unlikely(!lookup_attr(ni->type, ni->name, ni->name_len,
-			IGNORE_CASE, 0, NULL, 0, ctx))) {
+			CASE_SENSITIVE, 0, NULL, 0, ctx))) {
 		err = -ENOENT;
 		goto err_out;
 	}
@@ -1783,7 +1828,7 @@
 	.prepare_write	= ntfs_prepare_write,	/* Prepare page and buffers
 						   ready to receive data. */
 	.commit_write	= ntfs_commit_write,	/* Commit received data. */
-#endif
+#endif /* NTFS_RW */
 };
 
 /**
@@ -1794,4 +1839,7 @@
 	.readpage	= ntfs_readpage,	/* Fill page with data. */
 	.sync_page	= block_sync_page,	/* Currently, just unplugs the
 						   disk request queue. */
+#ifdef NTFS_RW
+	.writepage	= ntfs_writepage,	/* Write dirty page to disk. */
+#endif /* NTFS_RW */
 };
--- diff/fs/ntfs/attrib.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/attrib.c	2004-07-01 21:32:48.000000000 +0100
@@ -963,7 +963,7 @@
 		err = -ENOMEM;
 		goto err_out;
 	}
-	if (!lookup_attr(ni->type, ni->name, ni->name_len, IGNORE_CASE, vcn,
+	if (!lookup_attr(ni->type, ni->name, ni->name_len, CASE_SENSITIVE, vcn,
 			NULL, 0, ctx)) {
 		put_attr_search_ctx(ctx);
 		err = -ENOENT;
@@ -1343,8 +1343,8 @@
  * base inode).
  *
  * After finishing with the attribute/mft record you need to call
- * release_attr_search_ctx() to cleanup the search context (unmapping any
- * mapped inodes, etc).
+ * put_attr_search_ctx() to cleanup the search context (unmapping any mapped
+ * inodes, etc).
  *
  * Return TRUE if the search was successful and FALSE if not. When TRUE,
  * @ctx->attr is the found attribute and it is in mft record @ctx->mrec. When
@@ -1614,8 +1614,8 @@
  * continue searches where they were left off at.
  *
  * After finishing with the attribute/mft record you need to call
- * release_attr_search_ctx() to cleanup the search context (unmapping any
- * mapped inodes, etc).
+ * put_attr_search_ctx() to cleanup the search context (unmapping any mapped
+ * inodes, etc).
  *
  * Return TRUE if the search was successful and FALSE if not. When TRUE,
  * @ctx->attr is the found attribute and it is in mft record @ctx->mrec. When
--- diff/fs/ntfs/dir.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/dir.c	2004-07-01 21:32:48.000000000 +0100
@@ -63,6 +63,14 @@
  * This is to avoid polluting the dcache with short file names. We want them to
  * work but we don't care for how quickly one can access them. This also fixes
  * the dcache aliasing issues.
+ *
+ * Locking:  - Caller must hold i_sem on the directory.
+ *	     - Each page cache page in the index allocation mapping must be
+ *	       locked whilst being accessed otherwise we may find a corrupt
+ *	       page due to it being under ->writepage at the moment which
+ *	       applies the mst protection fixups before writing out and then
+ *	       removes them again after the write is complete after which it 
+ *	       unlocks the page.
  */
 MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
 		const int uname_len, ntfs_name **res)
@@ -83,6 +91,8 @@
 	u8 *kaddr;
 	ntfs_name *name = NULL;
 
+	BUG_ON(!S_ISDIR(VFS_I(dir_ni)->i_mode));
+	BUG_ON(NInoAttr(dir_ni));
 	/* Get hold of the mft record for the directory. */
 	m = map_mft_record(dir_ni);
 	if (unlikely(IS_ERR(m))) {
@@ -309,6 +319,7 @@
 		err = PTR_ERR(page);
 		goto err_out;
 	}
+	lock_page(page);
 	kaddr = (u8*)page_address(page);
 fast_descend_into_child_node:
 	/* Get to the index allocation block. */
@@ -429,6 +440,7 @@
 				*res = NULL;
 			}
 			mref = le64_to_cpu(ie->data.dir.indexed_file);
+			unlock_page(page);
 			ntfs_unmap_page(page);
 			return mref;
 		}
@@ -461,6 +473,7 @@
 						"this message to "
 						"linux-ntfs-dev@lists."
 						"sourceforge.net.");
+				unlock_page(page);
 				ntfs_unmap_page(page);
 				goto dir_err_out;
 			}
@@ -543,6 +556,7 @@
 					vol->cluster_size_bits >>
 					PAGE_CACHE_SHIFT)
 				goto fast_descend_into_child_node;
+			unlock_page(page);
 			ntfs_unmap_page(page);
 			goto descend_into_child_node;
 		}
@@ -557,12 +571,14 @@
 	 * associated with it.
 	 */
 	if (name) {
+		unlock_page(page);
 		ntfs_unmap_page(page);
 		return name->mref;
 	}
 	ntfs_debug("Entry not found.");
 	err = -ENOENT;
 unm_err_out:
+	unlock_page(page);
 	ntfs_unmap_page(page);
 err_out:
 	if (ctx)
@@ -778,6 +794,7 @@
 		err = PTR_ERR(page);
 		goto err_out;
 	}
+	lock_page(page);
 	kaddr = (u8*)page_address(page);
 fast_descend_into_child_node:
 	/* Get to the index allocation block. */
@@ -880,6 +897,7 @@
 				vol->upcase, vol->upcase_len)) {
 found_it2:
 			mref = le64_to_cpu(ie->data.dir.indexed_file);
+			unlock_page(page);
 			ntfs_unmap_page(page);
 			return mref;
 		}
@@ -944,6 +962,7 @@
 					vol->cluster_size_bits >>
 					PAGE_CACHE_SHIFT)
 				goto fast_descend_into_child_node;
+			unlock_page(page);
 			ntfs_unmap_page(page);
 			goto descend_into_child_node;
 		}
@@ -956,6 +975,7 @@
 	ntfs_debug("Entry not found.");
 	err = -ENOENT;
 unm_err_out:
+	unlock_page(page);
 	ntfs_unmap_page(page);
 err_out:
 	if (ctx)
@@ -988,6 +1008,7 @@
  * @ndir:	ntfs inode of current directory
  * @index_type:	specifies whether @iu is an index root or an index allocation
  * @iu:		index root or index allocation attribute to which @ie belongs
+ * @ia_page:	page in which the index allocation buffer @ie is in resides
  * @ie:		current index entry
  * @name:	buffer to use for the converted name
  * @dirent:	vfs filldir callback context
@@ -995,13 +1016,24 @@
  *
  * Convert the Unicode @name to the loaded NLS and pass it to the @filldir
  * callback.
+ *
+ * If @index_type is INDEX_TYPE_ALLOCATION, @ia_page is the locked page
+ * containing the index allocation block containing the index entry @ie.
+ * Otherwise, @ia_page is NULL.
+ *
+ * Note, we drop (and then reacquire) the page lock on @ia_page across the
+ * @filldir() call otherwise we would deadlock with NFSd when it calls ->lookup
+ * since ntfs_lookup() will lock the same page.  As an optimization, we do not
+ * retake the lock if we are returning a non-zero value as ntfs_readdir()
+ * would need to drop the lock immediately anyway.
  */
 static inline int ntfs_filldir(ntfs_volume *vol, loff_t *fpos,
 		ntfs_inode *ndir, const INDEX_TYPE index_type,
-		index_union iu, INDEX_ENTRY *ie, u8 *name,
-		void *dirent, filldir_t filldir)
+		index_union iu, struct page *ia_page, INDEX_ENTRY *ie,
+		u8 *name, void *dirent, filldir_t filldir)
 {
-	int name_len;
+	unsigned long mref;
+	int name_len, rc;
 	unsigned dt_type;
 	FILE_NAME_TYPE_FLAGS name_type;
 
@@ -1039,24 +1071,42 @@
 		dt_type = DT_DIR;
 	else
 		dt_type = DT_REG;
+	mref = MREF_LE(ie->data.dir.indexed_file);
+	/*
+	 * Drop the page lock otherwise we deadlock with NFS when it calls
+	 * ->lookup since ntfs_lookup() will lock the same page.
+	 */
+	if (index_type == INDEX_TYPE_ALLOCATION)
+		unlock_page(ia_page);
 	ntfs_debug("Calling filldir for %s with len %i, fpos 0x%llx, inode "
-			"0x%lx, DT_%s.", name, name_len, *fpos,
-			MREF_LE(ie->data.dir.indexed_file),
+			"0x%lx, DT_%s.", name, name_len, *fpos, mref,
 			dt_type == DT_DIR ? "DIR" : "REG");
-	return filldir(dirent, name, name_len, *fpos,
-			MREF_LE(ie->data.dir.indexed_file), dt_type);
+	rc = filldir(dirent, name, name_len, *fpos, mref, dt_type);
+	/* Relock the page but not if we are aborting ->readdir. */
+	if (!rc && index_type == INDEX_TYPE_ALLOCATION)
+		lock_page(ia_page);
+	return rc;
 }
 
 /*
- * VFS calls readdir without BKL but with i_sem held. This protects the VFS
- * parts (e.g. ->f_pos and ->i_size, and it also protects against directory
- * modifications).
- *
  * We use the same basic approach as the old NTFS driver, i.e. we parse the
  * index root entries and then the index allocation entries that are marked
  * as in use in the index bitmap.
+ *
  * While this will return the names in random order this doesn't matter for
- * readdir but OTOH results in a faster readdir.
+ * ->readdir but OTOH results in a faster ->readdir.
+ *
+ * VFS calls ->readdir without BKL but with i_sem held. This protects the VFS
+ * parts (e.g. ->f_pos and ->i_size, and it also protects against directory
+ * modifications).
+ *
+ * Locking:  - Caller must hold i_sem on the directory.
+ *	     - Each page cache page in the index allocation mapping must be
+ *	       locked whilst being accessed otherwise we may find a corrupt
+ *	       page due to it being under ->writepage at the moment which
+ *	       applies the mst protection fixups before writing out and then
+ *	       removes them again after the write is complete after which it 
+ *	       unlocks the page.
  */
 static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
 {
@@ -1186,8 +1236,8 @@
 		if (ir_pos > (u8*)ie - (u8*)ir)
 			continue;
 		/* Submit the name to the filldir callback. */
-		rc = ntfs_filldir(vol, &fpos, ndir, INDEX_TYPE_ROOT, ir, ie,
-				name, dirent, filldir);
+		rc = ntfs_filldir(vol, &fpos, ndir, INDEX_TYPE_ROOT, ir, NULL,
+				ie, name, dirent, filldir);
 		if (rc) {
 			kfree(ir);
 			goto abort;
@@ -1268,8 +1318,10 @@
 	/* If the current index buffer is in the same page we reuse the page. */
 	if ((prev_ia_pos & PAGE_CACHE_MASK) != (ia_pos & PAGE_CACHE_MASK)) {
 		prev_ia_pos = ia_pos;
-		if (likely(ia_page != NULL))
+		if (likely(ia_page != NULL)) {
+			unlock_page(ia_page);
 			ntfs_unmap_page(ia_page);
+		}
 		/*
 		 * Map the page cache page containing the current ia_pos,
 		 * reading it from disk if necessary.
@@ -1281,6 +1333,7 @@
 			ia_page = NULL;
 			goto err_out;
 		}
+		lock_page(ia_page);
 		kaddr = (u8*)page_address(ia_page);
 	}
 	/* Get the current index buffer. */
@@ -1358,10 +1411,16 @@
 		/* Skip index block entry if continuing previous readdir. */
 		if (ia_pos - ia_start > (u8*)ie - (u8*)ia)
 			continue;
-		/* Submit the name to the filldir callback. */
+		/*
+		 * Submit the name to the @filldir callback.  Note,
+		 * ntfs_filldir() drops the lock on @ia_page but it retakes it
+		 * before returning, unless a non-zero value is returned in
+		 * which case the page is left unlocked.
+		 */
 		rc = ntfs_filldir(vol, &fpos, ndir, INDEX_TYPE_ALLOCATION, ia,
-				ie, name, dirent, filldir);
+				ia_page, ie, name, dirent, filldir);
 		if (rc) {
+			/* @ia_page is already unlocked in this case. */
 			ntfs_unmap_page(ia_page);
 			ntfs_unmap_page(bmp_page);
 			goto abort;
@@ -1369,8 +1428,10 @@
 	}
 	goto find_next_index_buffer;
 unm_EOD:
-	if (ia_page)
+	if (ia_page) {
+		unlock_page(ia_page);
 		ntfs_unmap_page(ia_page);
+	}
 	ntfs_unmap_page(bmp_page);
 EOD:
 	/* We are finished, set fpos to EOD. */
@@ -1390,8 +1451,10 @@
 err_out:
 	if (bmp_page)
 		ntfs_unmap_page(bmp_page);
-	if (ia_page)
+	if (ia_page) {
+		unlock_page(ia_page);
 		ntfs_unmap_page(ia_page);
+	}
 	if (ir)
 		kfree(ir);
 	if (name)
--- diff/fs/ntfs/inode.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -134,6 +134,8 @@
 typedef int (*set_t)(struct inode *, void *);
 static int ntfs_read_locked_inode(struct inode *vi);
 static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi);
+static int ntfs_read_locked_index_inode(struct inode *base_vi,
+		struct inode *vi);
 
 /**
  * ntfs_iget - obtain a struct inode corresponding to a specific normal inode
@@ -201,6 +203,9 @@
  * initialized, and finally ntfs_read_locked_attr_inode() is called to read the
  * attribute and fill in the inode structure.
  *
+ * Note, for index allocation attributes, you need to use ntfs_index_iget()
+ * instead of ntfs_attr_iget() as working with indices is a lot more complex.
+ *
  * Return the struct inode of the attribute inode on success. Check the return
  * value with IS_ERR() and if true, the function failed and the error code is
  * obtained from PTR_ERR().
@@ -212,6 +217,9 @@
 	ntfs_attr na;
 	int err;
 
+	/* Make sure no one calls ntfs_attr_iget() for indices. */
+	BUG_ON(type == AT_INDEX_ALLOCATION);
+
 	na.mft_no = base_vi->i_ino;
 	na.type = type;
 	na.name = name;
@@ -241,6 +249,61 @@
 	return vi;
 }
 
+/**
+ * ntfs_index_iget - obtain a struct inode corresponding to an index
+ * @base_vi:	vfs base inode containing the index related attributes
+ * @name:	Unicode name of the index
+ * @name_len:	length of @name in Unicode characters
+ *
+ * Obtain the (fake) struct inode corresponding to the index specified by @name
+ * and @name_len, which is present in the base mft record specified by the vfs
+ * inode @base_vi.
+ *
+ * If the index inode is in the cache, it is just returned with an increased
+ * reference count.  Otherwise, a new struct inode is allocated and
+ * initialized, and finally ntfs_read_locked_index_inode() is called to read
+ * the index related attributes and fill in the inode structure.
+ *
+ * Return the struct inode of the index inode on success. Check the return
+ * value with IS_ERR() and if true, the function failed and the error code is
+ * obtained from PTR_ERR().
+ */
+struct inode *ntfs_index_iget(struct inode *base_vi, ntfschar *name,
+		u32 name_len)
+{
+	struct inode *vi;
+	ntfs_attr na;
+	int err;
+
+	na.mft_no = base_vi->i_ino;
+	na.type = AT_INDEX_ALLOCATION;
+	na.name = name;
+	na.name_len = name_len;
+
+	vi = iget5_locked(base_vi->i_sb, na.mft_no, (test_t)ntfs_test_inode,
+			(set_t)ntfs_init_locked_inode, &na);
+	if (!vi)
+		return ERR_PTR(-ENOMEM);
+
+	err = 0;
+
+	/* If this is a freshly allocated inode, need to read it now. */
+	if (vi->i_state & I_NEW) {
+		err = ntfs_read_locked_index_inode(base_vi, vi);
+		unlock_new_inode(vi);
+	}
+	/*
+	 * There is no point in keeping bad index inodes around.  This also
+	 * simplifies things in that we never need to check for bad index
+	 * inodes elsewhere.
+	 */
+	if (err) {
+		iput(vi);
+		vi = ERR_PTR(err);
+	}
+	return vi;
+}
+
 struct inode *ntfs_alloc_big_inode(struct super_block *sb)
 {
 	ntfs_inode *ni;
@@ -319,6 +382,7 @@
 	ni->itype.index.bmp_ino = NULL;
 	ni->itype.index.block_size = 0;
 	ni->itype.index.vcn_size = 0;
+	ni->itype.index.collation_rule = 0;
 	ni->itype.index.block_size_bits = 0;
 	ni->itype.index.vcn_size_bits = 0;
 	init_MUTEX(&ni->extent_lock);
@@ -438,9 +502,7 @@
  *
  * The only fields in @vi that we need to/can look at when the function is
  * called are i_sb, pointing to the mounted device's super block, and i_ino,
- * the number of the inode to load. If this is a fake inode, i.e. NInoAttr(),
- * then the fields type, name, and name_len are also valid, and describe the
- * attribute which this fake inode represents.
+ * the number of the inode to load.
  *
  * ntfs_read_locked_inode() maps, pins and locks the mft record number i_ino
  * for reading and sets up the necessary @vi fields as well as initializing
@@ -449,12 +511,12 @@
  * Q: What locks are held when the function is called?
  * A: i_state has I_LOCK set, hence the inode is locked, also
  *    i_count is set to 1, so it is not going to go away
- *    i_flags is set to 0 and we have no business touching it. Only an ioctl()
+ *    i_flags is set to 0 and we have no business touching it.  Only an ioctl()
  *    is allowed to write to them. We should of course be honouring them but
  *    we need to do that using the IS_* macros defined in include/linux/fs.h.
  *    In any case ntfs_read_locked_inode() has nothing to do with i_flags.
  *
- * Return 0 on success and -errno on error. In the error case, the inode will
+ * Return 0 on success and -errno on error.  In the error case, the inode will
  * have had make_bad_inode() executed on it.
  */
 static int ntfs_read_locked_inode(struct inode *vi)
@@ -730,6 +792,7 @@
 					"COLLATION_FILE_NAME. Not allowed.");
 			goto unm_err_out;
 		}
+		ni->itype.index.collation_rule = ir->collation_rule;
 		ni->itype.index.block_size = le32_to_cpu(ir->index_block_size);
 		if (ni->itype.index.block_size &
 				(ni->itype.index.block_size - 1)) {
@@ -1050,8 +1113,8 @@
  * @base_vi:	base inode
  * @vi:		attribute inode to read
  *
- * ntfs_read_locked_attr_inode() is called from the ntfs_attr_iget() to read
- * the attribute inode described by @vi into memory from the base mft record
+ * ntfs_read_locked_attr_inode() is called from ntfs_attr_iget() to read the
+ * attribute inode described by @vi into memory from the base mft record
  * described by @base_ni.
  *
  * ntfs_read_locked_attr_inode() maps, pins and locks the base inode for
@@ -1061,6 +1124,9 @@
  * Q: What locks are held when the function is called?
  * A: i_state has I_LOCK set, hence the inode is locked, also
  *    i_count is set to 1, so it is not going to go away
+ *
+ * Return 0 on success and -errno on error.  In the error case, the inode will
+ * have had make_bad_inode() executed on it.
  */
 static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi)
 {
@@ -1103,7 +1169,7 @@
 	}
 
 	/* Find the attribute. */
-	if (!lookup_attr(ni->type, ni->name, ni->name_len, IGNORE_CASE, 0,
+	if (!lookup_attr(ni->type, ni->name, ni->name_len, CASE_SENSITIVE, 0,
 			NULL, 0, ctx))
 		goto unm_err_out;
 
@@ -1288,6 +1354,261 @@
 }
 
 /**
+ * ntfs_read_locked_index_inode - read an index inode from its base inode
+ * @base_vi:	base inode
+ * @vi:		index inode to read
+ *
+ * ntfs_read_locked_index_inode() is called from ntfs_index_iget() to read the
+ * index inode described by @vi into memory from the base mft record described
+ * by @base_ni.
+ *
+ * ntfs_read_locked_index_inode() maps, pins and locks the base inode for
+ * reading and looks up the attributes relating to the index described by @vi
+ * before setting up the necessary fields in @vi as well as initializing the
+ * ntfs inode.
+ *
+ * Note, index inodes are essentially attribute inodes (NInoAttr() is true)
+ * with the attribute type set to AT_INDEX_ALLOCATION.  Apart from that, they
+ * are setup like directory inodes since directories are a special case of
+ * indices ao they need to be treated in much the same way.  Most importantly,
+ * for small indices the index allocation attribute might not actually exist.
+ * However, the index root attribute always exists but this does not need to
+ * have an inode associated with it and this is why we define a new inode type
+ * index.  Also, like for directories, we need to have an attribute inode for
+ * the bitmap attribute corresponding to the index allocation attribute and we
+ * can store this in the appropriate field of the inode, just like we do for
+ * normal directory inodes.
+ *
+ * Q: What locks are held when the function is called?
+ * A: i_state has I_LOCK set, hence the inode is locked, also
+ *    i_count is set to 1, so it is not going to go away
+ *
+ * Return 0 on success and -errno on error.  In the error case, the inode will
+ * have had make_bad_inode() executed on it.
+ */
+static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
+{
+	ntfs_volume *vol = NTFS_SB(vi->i_sb);
+	ntfs_inode *ni, *base_ni, *bni;
+	struct inode *bvi;
+	MFT_RECORD *m;
+	attr_search_context *ctx;
+	INDEX_ROOT *ir;
+	u8 *ir_end, *index_end;
+	int err = 0;
+
+	ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino);
+	ntfs_init_big_inode(vi);
+	ni	= NTFS_I(vi);
+	base_ni = NTFS_I(base_vi);
+	/* Just mirror the values from the base inode. */
+	vi->i_blksize	= base_vi->i_blksize;
+	vi->i_version	= base_vi->i_version;
+	vi->i_uid	= base_vi->i_uid;
+	vi->i_gid	= base_vi->i_gid;
+	vi->i_nlink	= base_vi->i_nlink;
+	vi->i_mtime	= base_vi->i_mtime;
+	vi->i_ctime	= base_vi->i_ctime;
+	vi->i_atime	= base_vi->i_atime;
+	vi->i_generation = ni->seq_no = base_ni->seq_no;
+	/* Set inode type to zero but preserve permissions. */
+	vi->i_mode	= base_vi->i_mode & ~S_IFMT;
+	/* Map the mft record for the base inode. */
+	m = map_mft_record(base_ni);
+	if (IS_ERR(m)) {
+		err = PTR_ERR(m);
+		goto err_out;
+	}
+	ctx = get_attr_search_ctx(base_ni, m);
+	if (!ctx) {
+		err = -ENOMEM;
+		goto unm_err_out;
+	}
+	/* Find the index root attribute. */
+	if (!lookup_attr(AT_INDEX_ROOT, ni->name, ni->name_len, CASE_SENSITIVE,
+			0, NULL, 0, ctx)) {
+		ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is missing.");
+		goto unm_err_out;
+	}
+	/* Set up the state. */
+	if (ctx->attr->non_resident) {
+		ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is not resident.  "
+				"Not allowed.");
+		goto unm_err_out;
+	}
+	/* Compressed/encrypted/sparse index root is not allowed. */
+	if (ctx->attr->flags & (ATTR_COMPRESSION_MASK | ATTR_IS_ENCRYPTED |
+			ATTR_IS_SPARSE)) {
+		ntfs_error(vi->i_sb, "Found compressed/encrypted/sparse index "
+				"root attribute.  Not allowed.");
+		goto unm_err_out;
+	}
+	ir = (INDEX_ROOT*)((u8*)ctx->attr +
+			le16_to_cpu(ctx->attr->data.resident.value_offset));
+	ir_end = (u8*)ir + le32_to_cpu(ctx->attr->data.resident.value_length);
+	if (ir_end > (u8*)ctx->mrec + vol->mft_record_size) {
+		ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is corrupt.");
+		goto unm_err_out;
+	}
+	index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length);
+	if (index_end > ir_end) {
+		ntfs_error(vi->i_sb, "Index is corrupt.");
+		goto unm_err_out;
+	}
+	if (ir->type) {
+		ntfs_error(vi->i_sb, "Index type is not 0 (type is 0x%x).  "
+				"Not allowed.", le32_to_cpu(ir->type));
+		goto unm_err_out;
+	}
+	ni->itype.index.collation_rule = ir->collation_rule;
+	ntfs_debug("Index collation rule is 0x%x.",
+			le32_to_cpu(ir->collation_rule));
+	ni->itype.index.block_size = le32_to_cpu(ir->index_block_size);
+	if (ni->itype.index.block_size & (ni->itype.index.block_size - 1)) {
+		ntfs_error(vi->i_sb, "Index block size (%u) is not a power of "
+				"two.", ni->itype.index.block_size);
+		goto unm_err_out;
+	}
+	if (ni->itype.index.block_size > PAGE_CACHE_SIZE) {
+		ntfs_error(vi->i_sb, "Index block size (%u) > PAGE_CACHE_SIZE "
+				"(%ld) is not supported.  Sorry.",
+				ni->itype.index.block_size, PAGE_CACHE_SIZE);
+		err = -EOPNOTSUPP;
+		goto unm_err_out;
+	}
+	if (ni->itype.index.block_size < NTFS_BLOCK_SIZE) {
+		ntfs_error(vi->i_sb, "Index block size (%u) < NTFS_BLOCK_SIZE "
+				"(%i) is not supported.  Sorry.",
+				ni->itype.index.block_size, NTFS_BLOCK_SIZE);
+		err = -EOPNOTSUPP;
+		goto unm_err_out;
+	}
+	ni->itype.index.block_size_bits = ffs(ni->itype.index.block_size) - 1;
+	/* Determine the size of a vcn in the index. */
+	if (vol->cluster_size <= ni->itype.index.block_size) {
+		ni->itype.index.vcn_size = vol->cluster_size;
+		ni->itype.index.vcn_size_bits = vol->cluster_size_bits;
+	} else {
+		ni->itype.index.vcn_size = vol->sector_size;
+		ni->itype.index.vcn_size_bits = vol->sector_size_bits;
+	}
+	/* Check for presence of index allocation attribute. */
+	if (!(ir->index.flags & LARGE_INDEX)) {
+		/* No index allocation. */
+		vi->i_size = ni->initialized_size = ni->allocated_size = 0;
+		/* We are done with the mft record, so we release it. */
+		put_attr_search_ctx(ctx);
+		unmap_mft_record(base_ni);
+		m = NULL;
+		ctx = NULL;
+		goto skip_large_index_stuff;
+	} /* LARGE_INDEX:  Index allocation present.  Setup state. */
+	NInoSetIndexAllocPresent(ni);
+	/* Find index allocation attribute. */
+	reinit_attr_search_ctx(ctx);
+	if (!lookup_attr(AT_INDEX_ALLOCATION, ni->name, ni->name_len,
+			CASE_SENSITIVE, 0, NULL, 0, ctx)) {
+		ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is not "
+				"present but $INDEX_ROOT indicated it is.");
+		goto unm_err_out;
+	}
+	if (!ctx->attr->non_resident) {
+		ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is "
+				"resident.");
+		goto unm_err_out;
+	}
+	if (ctx->attr->flags & ATTR_IS_ENCRYPTED) {
+		ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is "
+				"encrypted.");
+		goto unm_err_out;
+	}
+	if (ctx->attr->flags & ATTR_IS_SPARSE) {
+		ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is sparse.");
+		goto unm_err_out;
+	}
+	if (ctx->attr->flags & ATTR_COMPRESSION_MASK) {
+		ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is "
+				"compressed.");
+		goto unm_err_out;
+	}
+	if (ctx->attr->data.non_resident.lowest_vcn) {
+		ntfs_error(vi->i_sb, "First extent of $INDEX_ALLOCATION "
+				"attribute has non zero lowest_vcn.  Inode is "
+				"corrupt. You should run chkdsk.");
+		goto unm_err_out;
+	}
+	vi->i_size = sle64_to_cpu(ctx->attr->data.non_resident.data_size);
+	ni->initialized_size = sle64_to_cpu(
+			ctx->attr->data.non_resident.initialized_size);
+	ni->allocated_size = sle64_to_cpu(
+			ctx->attr->data.non_resident.allocated_size);
+	/*
+	 * We are done with the mft record, so we release it.  Otherwise
+	 * we would deadlock in ntfs_attr_iget().
+	 */
+	put_attr_search_ctx(ctx);
+	unmap_mft_record(base_ni);
+	m = NULL;
+	ctx = NULL;
+	/* Get the index bitmap attribute inode. */
+	bvi = ntfs_attr_iget(base_vi, AT_BITMAP, ni->name, ni->name_len);
+	if (unlikely(IS_ERR(bvi))) {
+		ntfs_error(vi->i_sb, "Failed to get bitmap attribute.");
+		err = PTR_ERR(bvi);
+		goto unm_err_out;
+	}
+	bni = NTFS_I(bvi);
+	if (NInoCompressed(bni) || NInoEncrypted(bni) ||
+			NInoSparse(bni)) {
+		ntfs_error(vi->i_sb, "$BITMAP attribute is compressed "
+				"and/or encrypted and/or sparse.");
+		goto iput_unm_err_out;
+	}
+	/* Consistency check bitmap size vs. index allocation size. */
+	if ((bvi->i_size << 3) < (vi->i_size >>
+			ni->itype.index.block_size_bits)) {
+		ntfs_error(vi->i_sb, "Index bitmap too small (0x%llx) "
+				"for index allocation (0x%llx).",
+				bvi->i_size << 3, vi->i_size);
+		goto iput_unm_err_out;
+	}
+	ni->itype.index.bmp_ino = bvi;
+skip_large_index_stuff:
+	/* Setup the operations for this index inode. */
+	vi->i_op = NULL;
+	vi->i_fop = NULL;
+	vi->i_mapping->a_ops = &ntfs_mst_aops;
+	vi->i_blocks = ni->allocated_size >> 9;
+
+	/*
+	 * Make sure the base inode doesn't go away and attach it to the
+	 * index inode.
+	 */
+	igrab(base_vi);
+	ni->ext.base_ntfs_ino = base_ni;
+	ni->nr_extents = -1;
+
+	ntfs_debug("Done.");
+	return 0;
+
+iput_unm_err_out:
+	iput(bvi);
+unm_err_out:
+	if (!err)
+		err = -EIO;
+	if (ctx)
+		put_attr_search_ctx(ctx);
+	if (m)
+		unmap_mft_record(base_ni);
+err_out:
+	ntfs_error(vi->i_sb, "Failed with error code %i while reading index "
+			"inode (mft_no 0x%lx, name_len %i.", -err, vi->i_ino,
+			ni->name_len);
+	make_bad_inode(vi);
+	return err;
+}
+
+/**
  * ntfs_read_inode_mount - special read_inode for mount time use only
  * @vi:		inode to read
  *
@@ -1712,21 +2033,39 @@
  * The VFS calls ntfs_put_inode() every time the inode reference count (i_count)
  * is about to be decremented (but before the decrement itself.
  *
- * If the inode @vi is a directory with a single reference, we need to put the
- * attribute inode for the directory index bitmap, if it is present, otherwise
- * the directory inode would remain pinned for ever (or rather until umount()
- * time.
+ * If the inode @vi is a directory with two references, one of which is being
+ * dropped, we need to put the attribute inode for the directory index bitmap,
+ * if it is present, otherwise the directory inode would remain pinned for
+ * ever.
+ *
+ * If the inode @vi is an index inode with only one reference which is being
+ * dropped, we need to put the attribute inode for the index bitmap, if it is
+ * present, otherwise the index inode would disappear and the attribute inode
+ * for the index bitmap would no longer be referenced from anywhere and thus it
+ * would remain pinned for ever.
  */
 void ntfs_put_inode(struct inode *vi)
 {
-	if (S_ISDIR(vi->i_mode) && (atomic_read(&vi->i_count) == 2)) {
-		ntfs_inode *ni;
+	ntfs_inode *ni;
 
-		ni = NTFS_I(vi);
-		if (NInoIndexAllocPresent(ni) && ni->itype.index.bmp_ino) {
-			iput(ni->itype.index.bmp_ino);
-			ni->itype.index.bmp_ino = NULL;
+	if (S_ISDIR(vi->i_mode)) {
+		if (atomic_read(&vi->i_count) == 2) {
+			ni = NTFS_I(vi);
+			if (NInoIndexAllocPresent(ni) &&
+					ni->itype.index.bmp_ino) {
+				iput(ni->itype.index.bmp_ino);
+				ni->itype.index.bmp_ino = NULL;
+			}
 		}
+		return;
+	}
+	if (atomic_read(&vi->i_count) != 1)
+		return;
+	ni = NTFS_I(vi);
+	if (NInoAttr(ni) && (ni->type == AT_INDEX_ALLOCATION) &&
+			NInoIndexAllocPresent(ni) && ni->itype.index.bmp_ino) {
+		iput(ni->itype.index.bmp_ino);
+		ni->itype.index.bmp_ino = NULL;
 	}
 	return;
 }
@@ -2009,7 +2348,7 @@
 		goto unm_err_out;
 	}
 	if (unlikely(!lookup_attr(AT_STANDARD_INFORMATION, NULL, 0,
-			IGNORE_CASE, 0, NULL, 0, ctx))) {
+			CASE_SENSITIVE, 0, NULL, 0, ctx))) {
 		put_attr_search_ctx(ctx);
 		err = -ENOENT;
 		goto unm_err_out;
--- diff/fs/ntfs/inode.h	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/inode.h	2004-07-01 21:32:48.000000000 +0100
@@ -90,16 +90,18 @@
 	u8 *attr_list;		/* Attribute list value itself. */
 	run_list attr_list_rl;	/* Run list for the attribute list value. */
 	union {
-		struct { /* It is a directory or $MFT. */
+		struct { /* It is a directory, $MFT, or an index inode. */
 			struct inode *bmp_ino;	/* Attribute inode for the
-						   directory index $BITMAP. */
+						   index $BITMAP. */
 			u32 block_size;		/* Size of an index block. */
 			u32 vcn_size;		/* Size of a vcn in this
-						   directory index. */
+						   index. */
+			COLLATION_RULES collation_rule; /* The collation rule
+						   for the index. */
 			u8 block_size_bits; 	/* Log2 of the above. */
 			u8 vcn_size_bits;	/* Log2 of the above. */
 		} index;
-		struct { /* It is a compressed file or fake inode. */
+		struct { /* It is a compressed file or an attribute inode. */
 			s64 size;		/* Copy of compressed_size from
 						   $DATA. */
 			u32 block_size;		/* Size of a compression block
@@ -260,6 +262,8 @@
 extern struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no);
 extern struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPES type,
 		ntfschar *name, u32 name_len);
+extern struct inode *ntfs_index_iget(struct inode *base_vi, ntfschar *name,
+		u32 name_len);
 
 extern struct inode *ntfs_alloc_big_inode(struct super_block *sb);
 extern void ntfs_destroy_big_inode(struct inode *inode);
--- diff/fs/ntfs/layout.h	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/layout.h	2004-07-01 21:32:48.000000000 +0100
@@ -459,21 +459,21 @@
  *	equal then the second u32 values would be compared, etc.
  */
 typedef enum {
-	COLLATION_BINARY	 = const_cpu_to_le32(0), /* Collate by binary
-					compare where the first byte is most
-					significant. */
-	COLLATION_FILE_NAME	 = const_cpu_to_le32(1), /* Collate file names
-					as Unicode strings. */
-	COLLATION_UNICODE_STRING = const_cpu_to_le32(2), /* Collate Unicode
+	COLLATION_BINARY	 = const_cpu_to_le32(0x00), /* Collate by
+					binary compare where the first byte is
+					most significant. */
+	COLLATION_FILE_NAME	 = const_cpu_to_le32(0x01), /* Collate file
+					names as Unicode strings. */
+	COLLATION_UNICODE_STRING = const_cpu_to_le32(0x02), /* Collate Unicode
 					strings by comparing their binary
 					Unicode values, except that when a
 					character can be uppercased, the upper
 					case value collates before the lower
 					case one. */
-	COLLATION_NTOFS_ULONG		= const_cpu_to_le32(16),
-	COLLATION_NTOFS_SID		= const_cpu_to_le32(17),
-	COLLATION_NTOFS_SECURITY_HASH	= const_cpu_to_le32(18),
-	COLLATION_NTOFS_ULONGS		= const_cpu_to_le32(19),
+	COLLATION_NTOFS_ULONG		= const_cpu_to_le32(0x10),
+	COLLATION_NTOFS_SID		= const_cpu_to_le32(0x11),
+	COLLATION_NTOFS_SECURITY_HASH	= const_cpu_to_le32(0x12),
+	COLLATION_NTOFS_ULONGS		= const_cpu_to_le32(0x13),
 } COLLATION_RULES;
 
 /*
@@ -2019,8 +2019,9 @@
 	s64 limit;		/* Hard quota (-1 if not limited). */
 	s64 exceeded_time;	/* How long the soft quota has been exceeded. */
 	SID sid;		/* The SID of the user/object associated with
-				   this quota entry. Equals zero for the quota
-				   defaults entry. */
+				   this quota entry.  Equals zero for the quota
+				   defaults entry (and in fact on a WinXP
+				   volume, it is not present at all). */
 } __attribute__ ((__packed__)) QUOTA_CONTROL_ENTRY;
 
 /*
@@ -2033,17 +2034,26 @@
 } PREDEFINED_OWNER_IDS;
 
 /*
+ * Current constants for quota control entries.
+ */
+typedef enum {
+	/* Current version. */
+	QUOTA_VERSION	= 2,
+} QUOTA_CONTROL_ENTRY_CONSTANTS;
+
+/*
  * Index entry flags (16-bit).
  */
 typedef enum {
-	INDEX_ENTRY_NODE = const_cpu_to_le16(1), /* This entry contains a sub-node,
-					      i.e. a reference to an index
-					      block in form of a virtual
+	INDEX_ENTRY_NODE = const_cpu_to_le16(1), /* This entry contains a
+					      sub-node, i.e. a reference to an
+					      index block in form of a virtual
 					      cluster number (see below). */
-	INDEX_ENTRY_END  = const_cpu_to_le16(2), /* This signifies the last entry in
-					      an index block. The index entry
-					      does not represent a file but it
-					      can point to a sub-node. */
+	INDEX_ENTRY_END  = const_cpu_to_le16(2), /* This signifies the last
+					      entry in an index block.  The
+					      index entry does not represent a
+					      file but it can point to a
+					      sub-node. */
 	INDEX_ENTRY_SPACE_FILLER = 0xffff, /* Just to force 16-bit width. */
 } __attribute__ ((__packed__)) INDEX_ENTRY_FLAGS;
 
--- diff/fs/ntfs/logfile.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/logfile.c	2004-07-01 21:32:48.000000000 +0100
@@ -672,7 +672,7 @@
  * @log_vi:	struct inode of loaded journal $LogFile to empty
  *
  * Empty the contents of the $LogFile journal @log_vi and return TRUE on
- * success FALSE on error.
+ * success and FALSE on error.
  *
  * This function assumes that the $LogFile journal has already been consistency
  * checked by a call to ntfs_check_logfile() and that ntfs_is_logfile_clean()
--- diff/fs/ntfs/malloc.h	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/malloc.h	2004-07-01 21:32:48.000000000 +0100
@@ -37,13 +37,10 @@
 static inline void *ntfs_malloc_nofs(unsigned long size)
 {
 	if (likely(size <= PAGE_SIZE)) {
-		if (likely(size)) {
-			/* kmalloc() has per-CPU caches so is faster for now. */
-			return kmalloc(PAGE_SIZE, GFP_NOFS);
-			/* return (void *)__get_free_page(GFP_NOFS |
-					__GFP_HIGHMEM); */
-		}
-		BUG();
+		BUG_ON(!size);
+		/* kmalloc() has per-CPU caches so is faster for now. */
+		return kmalloc(PAGE_SIZE, GFP_NOFS);
+		/* return (void *)__get_free_page(GFP_NOFS | __GFP_HIGHMEM); */
 	}
 	if (likely(size >> PAGE_SHIFT < num_physpages))
 		return __vmalloc(size, GFP_NOFS | __GFP_HIGHMEM, PAGE_KERNEL);
@@ -54,8 +51,9 @@
 {
 	if (likely(((unsigned long)addr < VMALLOC_START) ||
 			((unsigned long)addr >= VMALLOC_END ))) {
-		return kfree(addr);
-		/* return free_page((unsigned long)addr); */
+		kfree(addr);
+		/* free_page((unsigned long)addr); */
+		return;
 	}
 	vfree(addr);
 }
--- diff/fs/ntfs/mft.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/mft.c	2004-07-01 21:32:48.000000000 +0100
@@ -746,8 +746,8 @@
 	/*
 	 * If the ntfs_inode is clean no need to do anything.  If it is dirty,
 	 * mark it as clean now so that it can be redirtied later on if needed.
-	 * There is no danger of races as as long as the caller is holding the
-	 * locks for the mft record @m and the page it is in.
+	 * There is no danger of races since the caller is holding the locks
+	 * for the mft record @m and the page it is in.
 	 */
 	if (!NInoTestClearDirty(ni))
 		goto done;
@@ -915,6 +915,7 @@
 	int nr, i, j;
 	BOOL is_dirty = FALSE;
 
+	BUG_ON(!PageLocked(page));
 	BUG_ON(mft_vi != vol->mft_ino);
 	/* The first mft record number in the page. */
 	mft_no = page->index << (PAGE_CACHE_SHIFT - vol->mft_record_size_bits);
--- diff/fs/ntfs/namei.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/namei.c	2004-07-01 21:32:48.000000000 +0100
@@ -92,6 +92,8 @@
  *    file name in the WIN32 namespace corresponding to the matched short file
  *    name. We then convert the name to the current NLS code page, and proceed
  *    searching for a dentry with this name, etc, as in case 2), above.
+ *
+ * Locking: Caller must hold i_sem on the directory.
  */
 static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent,
 		struct nameidata *nd)
@@ -383,7 +385,7 @@
 		return ERR_PTR(-ENOMEM);
 	}
 try_next:
-	if (unlikely(!lookup_attr(AT_FILE_NAME, NULL, 0, IGNORE_CASE, 0,
+	if (unlikely(!lookup_attr(AT_FILE_NAME, NULL, 0, CASE_SENSITIVE, 0,
 			NULL, 0, ctx))) {
 		put_attr_search_ctx(ctx);
 		unmap_mft_record(ni);
--- diff/fs/ntfs/ntfs.h	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/ntfs.h	2004-07-01 21:32:48.000000000 +0100
@@ -24,6 +24,7 @@
 #ifndef _LINUX_NTFS_H
 #define _LINUX_NTFS_H
 
+#include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/compiler.h>
@@ -58,6 +59,7 @@
 extern kmem_cache_t *ntfs_inode_cache;
 extern kmem_cache_t *ntfs_big_inode_cache;
 extern kmem_cache_t *ntfs_attr_ctx_cache;
+extern kmem_cache_t *ntfs_index_ctx_cache;
 
 /* The various operations structs defined throughout the driver files. */
 extern struct super_operations ntfs_sops;
--- diff/fs/ntfs/super.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/super.c	2004-07-01 21:32:48.000000000 +0100
@@ -32,6 +32,9 @@
 #include "ntfs.h"
 #include "sysctl.h"
 #include "logfile.h"
+#include "quota.h"
+#include "dir.h"
+#include "index.h"
 
 /* Number of mounted file systems which have compression enabled. */
 static unsigned long ntfs_nr_compression_users;
@@ -413,7 +416,8 @@
 	 * flags are set.  Also, empty the logfile journal as it would become
 	 * stale as soon as something is written to the volume and mark the
 	 * volume dirty so that chkdsk is run if the volume is not umounted
-	 * cleanly.
+	 * cleanly.  Finally, mark the quotas out of date so Windows rescans
+	 * the volume on boot and updates them.
 	 *
 	 * When remounting read-only, mark the volume clean if no volume errors
 	 * have occured.
@@ -460,6 +464,12 @@
 			NVolSetErrors(vol);
 			return -EROFS;
 		}
+		if (!ntfs_mark_quotas_out_of_date(vol)) {
+			ntfs_error(sb, "Failed to mark quotas out of date%s",
+					es);
+			NVolSetErrors(vol);
+			return -EROFS;
+		}
 	} else if (!(sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY)) {
 		/* Remounting read-only. */
 		if (!NVolErrors(vol)) {
@@ -875,6 +885,7 @@
 	struct inode *tmp_ino;
 	ntfs_inode *tmp_ni;
 
+	ntfs_debug("Entering.");
 	/* Get mft mirror inode. */
 	tmp_ino = ntfs_iget(vol->sb, FILE_MFTMirr);
 	if (IS_ERR(tmp_ino) || is_bad_inode(tmp_ino)) {
@@ -906,6 +917,7 @@
 	tmp_ni->itype.index.block_size = vol->mft_record_size;
 	tmp_ni->itype.index.block_size_bits = vol->mft_record_size_bits;
 	vol->mftmirr_ino = tmp_ino;
+	ntfs_debug("Done.");
 	return TRUE;
 }
 
@@ -1054,6 +1066,76 @@
 	return TRUE;
 }
 
+/**
+ * load_and_init_quota - load and setup the quota file for a volume if present
+ * @vol:	ntfs super block describing device whose quota file to load
+ *
+ * Return TRUE on success or FALSE on error.  If $Quota is not present, we
+ * leave vol->quota_ino as NULL and return success.
+ */
+static BOOL load_and_init_quota(ntfs_volume *vol)
+{
+	MFT_REF mref;
+	struct inode *tmp_ino;
+	ntfs_name *name = NULL;
+	static const ntfschar Quota[7] = { const_cpu_to_le16('$'),
+			const_cpu_to_le16('Q'), const_cpu_to_le16('u'),
+			const_cpu_to_le16('o'), const_cpu_to_le16('t'),
+			const_cpu_to_le16('a'), const_cpu_to_le16(0) };
+	static ntfschar Q[3] = { const_cpu_to_le16('$'),
+			const_cpu_to_le16('Q'), const_cpu_to_le16(0) };
+
+	ntfs_debug("Entering.");
+	/*
+	 * Find the inode number for the quota file by looking up the filename
+	 * $Quota in the extended system files directory $Extend.
+	 */
+	down(&vol->extend_ino->i_sem);
+	mref = ntfs_lookup_inode_by_name(NTFS_I(vol->extend_ino), Quota, 6,
+			&name);
+	up(&vol->extend_ino->i_sem);
+	if (IS_ERR_MREF(mref)) {
+		/*
+		 * If the file does not exist, quotas are disabled and have
+		 * never been enabled on this volume, just return success.
+		 */
+		if (MREF_ERR(mref) == -ENOENT) {
+			ntfs_debug("$Quota not present.  Volume does not have "
+					"quotas enabled.");
+			/*
+			 * No need to try to set quotas out of date if they are
+			 * not enabled.
+			 */
+			NVolSetQuotaOutOfDate(vol);
+			return TRUE;
+		}
+		/* A real error occured. */
+		ntfs_error(vol->sb, "Failed to find inode number for $Quota.");
+		return FALSE;
+	}
+	/* We do not care for the type of match that was found. */
+	if (name)
+		kfree(name);
+	/* Get the inode. */
+	tmp_ino = ntfs_iget(vol->sb, MREF(mref));
+	if (IS_ERR(tmp_ino) || is_bad_inode(tmp_ino)) {
+		if (!IS_ERR(tmp_ino))
+			iput(tmp_ino);
+		ntfs_error(vol->sb, "Failed to load $Quota.");
+		return FALSE;
+	}
+	vol->quota_ino = tmp_ino;
+	/* Get the $Q index allocation attribute. */
+	tmp_ino = ntfs_index_iget(vol->quota_ino, Q, 2);
+	if (IS_ERR(tmp_ino)) {
+		ntfs_error(vol->sb, "Failed to load $Quota/$Q index.");
+		return FALSE;
+	}
+	vol->quota_q_ino = tmp_ino;
+	ntfs_debug("Done.");
+	return TRUE;
+}
+
 #endif /* NTFS_RW */
 
 /**
@@ -1436,20 +1518,66 @@
 	}
 	// FIXME: Initialize security.
 	/* Get the extended system files' directory inode. */
-	tmp_ino = ntfs_iget(sb, FILE_Extend);
-	if (IS_ERR(tmp_ino) || is_bad_inode(tmp_ino)) {
-		if (!IS_ERR(tmp_ino))
-			iput(tmp_ino);
+	vol->extend_ino = ntfs_iget(sb, FILE_Extend);
+	if (IS_ERR(vol->extend_ino) || is_bad_inode(vol->extend_ino)) {
+		if (!IS_ERR(vol->extend_ino))
+			iput(vol->extend_ino);
 		ntfs_error(sb, "Failed to load $Extend.");
 		goto iput_sec_err_out;
 	}
-	// FIXME: Do something. E.g. want to delete the $UsnJrnl if exists.
-	// Note we might be doing this at the wrong level; we might want to
-	// d_alloc_root() and then do a "normal" open(2) of $Extend\$UsnJrnl
-	// rather than using ntfs_iget here, as we don't know the inode number
-	// for the files in $Extend directory.
-	iput(tmp_ino);
+#ifdef NTFS_RW
+	/* Find the quota file, load it if present, and set it up. */
+	if (!load_and_init_quota(vol)) {
+		static const char *es1 = "Failed to load $Quota";
+		static const char *es2 = ".  Run chkdsk.";
+
+		/* If a read-write mount, convert it to a read-only mount. */
+		if (!(sb->s_flags & MS_RDONLY)) {
+			if (!(vol->on_errors & (ON_ERRORS_REMOUNT_RO |
+					ON_ERRORS_CONTINUE))) {
+				ntfs_error(sb, "%s and neither on_errors="
+						"continue nor on_errors="
+						"remount-ro was specified%s",
+						es1, es2);
+				goto iput_quota_err_out;
+			}
+			sb->s_flags |= MS_RDONLY | MS_NOATIME | MS_NODIRATIME;
+			ntfs_error(sb, "%s.  Mounting read-only%s", es1, es2);
+		} else
+			ntfs_warning(sb, "%s.  Will not be able to remount "
+					"read-write%s", es1, es2);
+		/* This will prevent a read-write remount. */
+		NVolSetErrors(vol);
+	}
+	/* If (still) a read-write mount, mark the quotas out of date. */
+	if (!(sb->s_flags & MS_RDONLY) &&
+			!ntfs_mark_quotas_out_of_date(vol)) {
+		static const char *es1 = "Failed to mark quotas out of date";
+		static const char *es2 = ".  Run chkdsk.";
+
+		/* Convert to a read-only mount. */
+		if (!(vol->on_errors & (ON_ERRORS_REMOUNT_RO |
+				ON_ERRORS_CONTINUE))) {
+			ntfs_error(sb, "%s and neither on_errors=continue nor "
+					"on_errors=remount-ro was specified%s",
+					es1, es2);
+			goto iput_quota_err_out;
+		}
+		ntfs_error(sb, "%s.  Mounting read-only%s", es1, es2);
+		sb->s_flags |= MS_RDONLY | MS_NOATIME | MS_NODIRATIME;
+		NVolSetErrors(vol);
+	}
+	// TODO: Delete or checkpoint the $UsnJrnl if it exists.
+#endif /* NTFS_RW */
 	return TRUE;
+#ifdef NTFS_RW
+iput_quota_err_out:
+	if (vol->quota_q_ino)
+		iput(vol->quota_q_ino);
+	if (vol->quota_ino)
+		iput(vol->quota_ino);
+	iput(vol->extend_ino);
+#endif /* NTFS_RW */
 iput_sec_err_out:
 	iput(vol->secure_ino);
 iput_root_err_out:
@@ -1496,6 +1624,12 @@
 
 	/* NTFS 3.0+ specific. */
 	if (vol->major_ver >= 3) {
+		if (vol->quota_q_ino)
+			ntfs_commit_inode(vol->quota_q_ino);
+		if (vol->quota_ino)
+			ntfs_commit_inode(vol->quota_ino);
+		if (vol->extend_ino)
+			ntfs_commit_inode(vol->extend_ino);
 		if (vol->secure_ino)
 			ntfs_commit_inode(vol->secure_ino);
 	}
@@ -1544,6 +1678,20 @@
 
 	/* NTFS 3.0+ specific clean up. */
 	if (vol->major_ver >= 3) {
+#ifdef NTFS_RW
+		if (vol->quota_q_ino) {
+			iput(vol->quota_q_ino);
+			vol->quota_q_ino = NULL;
+		}
+		if (vol->quota_ino) {
+			iput(vol->quota_ino);
+			vol->quota_ino = NULL;
+		}
+#endif /* NTFS_RW */
+		if (vol->extend_ino) {
+			iput(vol->extend_ino);
+			vol->extend_ino = NULL;
+		}
 		if (vol->secure_ino) {
 			iput(vol->secure_ino);
 			vol->secure_ino = NULL;
@@ -2018,7 +2166,6 @@
 	init_rwsem(&vol->mftbmp_lock);
 #ifdef NTFS_RW
 	vol->mftmirr_ino = NULL;
-	vol->mftmirr_size = 0;
 	vol->logfile_ino = NULL;
 #endif /* NTFS_RW */
 	vol->lcnbmp_ino = NULL;
@@ -2026,10 +2173,11 @@
 	vol->vol_ino = NULL;
 	vol->root_ino = NULL;
 	vol->secure_ino = NULL;
-	vol->uid = vol->gid = 0;
-	vol->flags = 0;
-	vol->on_errors = 0;
-	vol->mft_zone_multiplier = 0;
+	vol->extend_ino = NULL;
+#ifdef NTFS_RW
+	vol->quota_ino = NULL;
+	vol->quota_q_ino = NULL;
+#endif /* NTFS_RW */
 	vol->nls_map = NULL;
 
 	/*
@@ -2178,23 +2326,48 @@
 	}
 	ntfs_error(sb, "Failed to allocate root directory.");
 	/* Clean up after the successful load_system_files() call from above. */
+	// TODO: Use ntfs_put_super() instead of repeating all this code...
+	// FIXME: Should mark the volume clean as the error is most likely
+	// 	  -ENOMEM.
 	iput(vol->vol_ino);
 	vol->vol_ino = NULL;
 	/* NTFS 3.0+ specific clean up. */
 	if (vol->major_ver >= 3) {
-		iput(vol->secure_ino);
-		vol->secure_ino = NULL;
+#ifdef NTFS_RW
+		if (vol->quota_q_ino) {
+			iput(vol->quota_q_ino);
+			vol->quota_q_ino = NULL;
+		}
+		if (vol->quota_ino) {
+			iput(vol->quota_ino);
+			vol->quota_ino = NULL;
+		}
+#endif /* NTFS_RW */
+		if (vol->extend_ino) {
+			iput(vol->extend_ino);
+			vol->extend_ino = NULL;
+		}
+		if (vol->secure_ino) {
+			iput(vol->secure_ino);
+			vol->secure_ino = NULL;
+		}
 	}
 	iput(vol->root_ino);
 	vol->root_ino = NULL;
 	iput(vol->lcnbmp_ino);
 	vol->lcnbmp_ino = NULL;
-#ifdef NTFS_RW
-	iput(vol->mftmirr_ino);
-	vol->mftmirr_ino = NULL;
-#endif /* NTFS_RW */
 	iput(vol->mftbmp_ino);
 	vol->mftbmp_ino = NULL;
+#ifdef NTFS_RW
+	if (vol->logfile_ino) {
+		iput(vol->logfile_ino);
+		vol->logfile_ino = NULL;
+	}
+	if (vol->mftmirr_ino) {
+		iput(vol->mftmirr_ino);
+		vol->mftmirr_ino = NULL;
+	}
+#endif /* NTFS_RW */
 	vol->upcase_len = 0;
 	if (vol->upcase != default_upcase)
 		ntfs_free(vol->upcase);
@@ -2220,10 +2393,9 @@
 	up(&ntfs_lock);
 iput_tmp_ino_err_out_now:
 	iput(tmp_ino);
-	if (vol->mft_ino && vol->mft_ino != tmp_ino) {
+	if (vol->mft_ino && vol->mft_ino != tmp_ino)
 		iput(vol->mft_ino);
-		vol->mft_ino = NULL;
-	}
+	vol->mft_ino = NULL;
 	/*
 	 * This is needed to get ntfs_clear_extent_inode() called for each
 	 * inode we have ever called ntfs_iget()/iput() on, otherwise we A)
@@ -2270,10 +2442,11 @@
 }
 
 /*
- * Slab cache to optimize allocations and deallocations of attribute search
- * contexts.
+ * Slab caches to optimize allocations and deallocations of attribute search
+ * contexts and index contexts, respectively.
  */
 kmem_cache_t *ntfs_attr_ctx_cache;
+kmem_cache_t *ntfs_index_ctx_cache;
 
 /* A global default upcase table and a corresponding reference count. */
 wchar_t *default_upcase = NULL;
@@ -2300,6 +2473,7 @@
 };
 
 /* Stable names for the slab caches. */
+static const char ntfs_index_ctx_cache_name[] = "ntfs_index_ctx_cache";
 static const char ntfs_attr_ctx_cache_name[] = "ntfs_attr_ctx_cache";
 static const char ntfs_name_cache_name[] = "ntfs_name_cache";
 static const char ntfs_inode_cache_name[] = "ntfs_inode_cache";
@@ -2326,13 +2500,21 @@
 
 	ntfs_debug("Debug messages are enabled.");
 
+	ntfs_index_ctx_cache = kmem_cache_create(ntfs_index_ctx_cache_name,
+			sizeof(ntfs_index_context), 0 /* offset */,
+			SLAB_HWCACHE_ALIGN, NULL /* ctor */, NULL /* dtor */);
+	if (!ntfs_index_ctx_cache) {
+		printk(KERN_CRIT "NTFS: Failed to create %s!\n",
+				ntfs_index_ctx_cache_name);
+		goto ictx_err_out;
+	}
 	ntfs_attr_ctx_cache = kmem_cache_create(ntfs_attr_ctx_cache_name,
 			sizeof(attr_search_context), 0 /* offset */,
 			SLAB_HWCACHE_ALIGN, NULL /* ctor */, NULL /* dtor */);
 	if (!ntfs_attr_ctx_cache) {
 		printk(KERN_CRIT "NTFS: Failed to create %s!\n",
 				ntfs_attr_ctx_cache_name);
-		goto ctx_err_out;
+		goto actx_err_out;
 	}
 
 	ntfs_name_cache = kmem_cache_create(ntfs_name_cache_name,
@@ -2385,7 +2567,9 @@
 	kmem_cache_destroy(ntfs_name_cache);
 name_err_out:
 	kmem_cache_destroy(ntfs_attr_ctx_cache);
-ctx_err_out:
+actx_err_out:
+	kmem_cache_destroy(ntfs_index_ctx_cache);
+ictx_err_out:
 	if (!err) {
 		printk(KERN_CRIT "NTFS: Aborting NTFS file system driver "
 				"registration...\n");
@@ -2414,6 +2598,9 @@
 	if (kmem_cache_destroy(ntfs_attr_ctx_cache) && (err = 1))
 		printk(KERN_CRIT "NTFS: Failed to destory %s.\n",
 				ntfs_attr_ctx_cache_name);
+	if (kmem_cache_destroy(ntfs_index_ctx_cache) && (err = 1))
+		printk(KERN_CRIT "NTFS: Failed to destory %s.\n",
+				ntfs_index_ctx_cache_name);
 	if (err)
 		printk(KERN_CRIT "NTFS: This causes memory to leak! There is "
 				"probably a BUG in the driver! Please report "
--- diff/fs/ntfs/volume.h	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/ntfs/volume.h	2004-07-01 21:32:48.000000000 +0100
@@ -103,6 +103,13 @@
 					   directory. */
 	struct inode *secure_ino;	/* The VFS inode of $Secure (NTFS3.0+
 					   only, otherwise NULL). */
+	struct inode *extend_ino;	/* The VFS inode of $Extend (NTFS3.0+
+					   only, otherwise NULL). */
+#ifdef NTFS_RW
+	/* $Quota stuff is NTFS3.0+ specific.  Unused/NULL otherwise. */
+	struct inode *quota_ino;	/* The VFS inode of $Quota. */
+	struct inode *quota_q_ino;	/* Attribute inode for $Quota/$Q. */
+#endif /* NTFS_RW */
 	struct nls_table *nls_map;
 } ntfs_volume;
 
@@ -117,6 +124,7 @@
 				      Otherwise be case insensitive and create
 				      file names in WIN32 namespace. */
 	NV_LogFileEmpty,	/* 1: $LogFile journal is empty. */
+	NV_QuotaOutOfDate,	/* 1: $Quota is out of date. */
 } ntfs_volume_flags;
 
 /*
@@ -142,5 +150,6 @@
 NVOL_FNS(ShowSystemFiles)
 NVOL_FNS(CaseSensitive)
 NVOL_FNS(LogFileEmpty)
+NVOL_FNS(QuotaOutOfDate)
 
 #endif /* _LINUX_NTFS_VOLUME_H */
--- diff/fs/partitions/Kconfig	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/partitions/Kconfig	2004-07-01 21:32:48.000000000 +0100
@@ -187,13 +187,6 @@
 
 	  If unsure, say N.
 
-config NEC98_PARTITION
-	bool "NEC PC-9800 partition table support" if PARTITION_ADVANCED
-	default y if !PARTITION_ADVANCED && X86_PC9800
-	help
-	  Say Y here if you would like to be able to read the hard disk
-	  partition table format used by NEC PC-9800 machines.
-
 config SGI_PARTITION
 	bool "SGI partition support" if PARTITION_ADVANCED
 	default y if !PARTITION_ADVANCED && (SGI_IP22 || SGI_IP27)
--- diff/fs/partitions/check.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/partitions/check.c	2004-07-01 21:32:48.000000000 +0100
@@ -29,7 +29,6 @@
 #include "ldm.h"
 #include "mac.h"
 #include "msdos.h"
-#include "nec98.h"
 #include "osf.h"
 #include "sgi.h"
 #include "sun.h"
--- diff/fs/partitions/msdos.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/partitions/msdos.c	2004-07-01 21:32:48.000000000 +0100
@@ -422,8 +422,8 @@
 	 * On the second pass look inside *BSD, Unixware and Solaris partitions.
 	 */
 
-	state->next = DOS_EXTENDED_PARTITION;
-	for (slot = 1 ; slot < DOS_EXTENDED_PARTITION ; slot++, p++) {
+	state->next = 5;
+	for (slot = 1 ; slot <= 4 ; slot++, p++) {
 		u32 start = START_SECT(p)*sector_size;
 		u32 size = NR_SECTS(p)*sector_size;
 		if (!size)
@@ -450,7 +450,7 @@
 
 	/* second pass - output for each on a separate line */
 	p = (struct partition *) (0x1be + data);
-	for (slot = 1 ; slot < DOS_EXTENDED_PARTITION ; slot++, p++) {
+	for (slot = 1 ; slot <= 4 ; slot++, p++) {
 		unsigned char id = SYS_IND(p);
 		int n;
 
--- diff/fs/proc/base.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/proc/base.c	2004-07-01 21:32:48.000000000 +0100
@@ -1463,7 +1463,8 @@
 /*
  * /proc/self:
  */
-static int proc_self_readlink(struct dentry *dentry, char *buffer, int buflen)
+static int proc_self_readlink(struct dentry *dentry, char __user *buffer,
+			      int buflen)
 {
 	char tmp[30];
 	sprintf(tmp, "%d", current->tgid);
@@ -1747,7 +1748,9 @@
 		ino_t ino = fake_ino(tgid,PROC_TGID_INO);
 		unsigned long j = PROC_NUMBUF;
 
-		do buf[--j] = '0' + (tgid % 10); while (tgid/=10);
+		do
+			buf[--j] = '0' + (tgid % 10);
+		while ((tgid /= 10) != 0);
 
 		if (filldir(dirent, buf+j, PROC_NUMBUF-j, filp->f_pos, ino, DT_DIR) < 0) {
 			filp->f_version = tgid;
@@ -1799,7 +1802,7 @@
 
 		do
 			buf[--j] = '0' + (tid % 10);
-		while (tid /= 10);
+		while ((tid /= 10) != 0);
 
 		if (filldir(dirent, buf+j, PROC_NUMBUF-j, pos, ino, DT_DIR) < 0)
 			break;
--- diff/fs/proc/generic.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/proc/generic.c	2004-07-01 21:32:48.000000000 +0100
@@ -17,6 +17,7 @@
 #include <linux/smp_lock.h>
 #include <linux/init.h>
 #include <linux/idr.h>
+#include <linux/namei.h>
 #include <asm/uaccess.h>
 #include <asm/bitops.h>
 
@@ -288,18 +289,20 @@
  */
 static unsigned int get_inode_number(void)
 {
-	unsigned int i, inum = 0;
+	int i, inum = 0;
+	int error;
 
 retry:
 	if (idr_pre_get(&proc_inum_idr, GFP_KERNEL) == 0)
 		return 0;
 
 	spin_lock(&proc_inum_lock);
-	i = idr_get_new(&proc_inum_idr, NULL);
+	error = idr_get_new(&proc_inum_idr, NULL, &i);
 	spin_unlock(&proc_inum_lock);
-
-	if (i == -1)
+	if (error == -EAGAIN)
 		goto retry;
+	else if (error)
+		return 0;
 
 	inum = (i & MAX_ID_MASK) + PROC_DYNAMIC_FIRST;
 
@@ -319,21 +322,14 @@
 	spin_unlock(&proc_inum_lock);
 }
 
-static int
-proc_readlink(struct dentry *dentry, char __user *buffer, int buflen)
-{
-	char *s = PDE(dentry->d_inode)->data;
-	return vfs_readlink(dentry, buffer, buflen, s);
-}
-
 static int proc_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
-	char *s = PDE(dentry->d_inode)->data;
-	return vfs_follow_link(nd, s);
+	nd_set_link(nd, PDE(dentry->d_inode)->data);
+	return 0;
 }
 
 static struct inode_operations proc_link_inode_operations = {
-	.readlink	= proc_readlink,
+	.readlink	= generic_readlink,
 	.follow_link	= proc_follow_link,
 };
 
--- diff/fs/proc/kcore.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/proc/kcore.c	2004-07-01 21:32:48.000000000 +0100
@@ -18,6 +18,7 @@
 #include <linux/elfcore.h>
 #include <linux/vmalloc.h>
 #include <linux/highmem.h>
+#include <linux/init.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
@@ -84,8 +85,6 @@
 	return 0;
 }
 
-extern char saved_command_line[];
-
 static size_t get_kcore_size(int *nphdr, size_t *elf_buflen)
 {
 	size_t try, size;
--- diff/fs/proc/proc_misc.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/proc/proc_misc.c	2004-07-01 21:32:48.000000000 +0100
@@ -47,7 +47,6 @@
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
-#include <asm/pgalloc.h>
 #include <asm/tlb.h>
 #include <asm/div64.h>
 
@@ -67,9 +66,6 @@
 extern int get_exec_domain_list(char *);
 extern int get_dma_list(char *);
 extern int get_locks_status (char *, char **, off_t, int);
-#ifdef CONFIG_SGI_DS1286
-extern int get_ds1286_status(char *);
-#endif
 
 static int proc_calc_metrics(char *page, char **start, off_t off,
 				 int count, int *eof, int len)
@@ -522,22 +518,12 @@
 static int cmdline_read_proc(char *page, char **start, off_t off,
 				 int count, int *eof, void *data)
 {
-	extern char saved_command_line[];
 	int len;
 
 	len = sprintf(page, "%s\n", saved_command_line);
 	return proc_calc_metrics(page, start, off, count, eof, len);
 }
 
-#ifdef CONFIG_SGI_DS1286
-static int ds1286_read_proc(char *page, char **start, off_t off,
-				 int count, int *eof, void *data)
-{
-	int len = get_ds1286_status(page);
-	return proc_calc_metrics(page, start, off, count, eof, len);
-}
-#endif
-
 static int locks_read_proc(char *page, char **start, off_t off,
 				 int count, int *eof, void *data)
 {
@@ -651,6 +637,36 @@
 		entry->proc_fops = f;
 }
 
+#ifdef CONFIG_LOCKMETER
+extern ssize_t get_lockmeter_info(char *, size_t, loff_t *);
+extern ssize_t put_lockmeter_info(const char *, size_t);
+extern int get_lockmeter_info_size(void);
+
+/*
+ * This function accesses lock metering information.
+ */
+static ssize_t read_lockmeter(struct file *file, char *buf,
+			      size_t count, loff_t *ppos)
+{
+	return get_lockmeter_info(buf, count, ppos);
+}
+
+/*
+ * Writing to /proc/lockmeter resets the counters
+ */
+static ssize_t write_lockmeter(struct file * file, const char * buf,
+			       size_t count, loff_t *ppos)
+{
+	return put_lockmeter_info(buf, count);
+}
+
+static struct file_operations proc_lockmeter_operations = {
+	NULL,           /* lseek */
+	read:		read_lockmeter,
+	write:		write_lockmeter,
+};
+#endif  /* CONFIG_LOCKMETER */
+
 void __init proc_misc_init(void)
 {
 	struct proc_dir_entry *entry;
@@ -671,9 +687,6 @@
 		{"devices",	devices_read_proc},
 		{"filesystems",	filesystems_read_proc},
 		{"cmdline",	cmdline_read_proc},
-#ifdef CONFIG_SGI_DS1286
-		{"rtc",		ds1286_read_proc},
-#endif
 		{"locks",	locks_read_proc},
 		{"execdomains",	execdomains_read_proc},
 		{NULL,}
@@ -718,6 +731,13 @@
 	if (entry)
 		entry->proc_fops = &proc_sysrq_trigger_operations;
 #endif
+#ifdef CONFIG_LOCKMETER
+	entry = create_proc_entry("lockmeter", S_IWUSR | S_IRUGO, NULL);
+	if (entry) {
+		entry->proc_fops = &proc_lockmeter_operations;
+		entry->size = get_lockmeter_info_size();
+	}
+#endif
 #ifdef CONFIG_PPC32
 	{
 		extern struct file_operations ppc_htab_operations;
--- diff/fs/quota.c	2004-05-19 22:12:24.000000000 +0100
+++ source/fs/quota.c	2004-07-01 21:32:48.000000000 +0100
@@ -141,7 +141,7 @@
 			sb->s_qcop->quota_sync(sb, type);
 	}
 	else {
-		while ((sb = get_super_to_sync(type))) {
+		while ((sb = get_super_to_sync(type)) != 0) {
 			if (sb->s_qcop->quota_sync)
 				sb->s_qcop->quota_sync(sb, type);
 			drop_super(sb);
@@ -150,7 +150,7 @@
 }
 
 /* Copy parameters and call proper function */
-static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, caddr_t addr)
+static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void __user *addr)
 {
 	int ret;
 
@@ -264,7 +264,7 @@
  * calls. Maybe we need to add the process quotas etc. in the future,
  * but we probably should use rlimits for that.
  */
-asmlinkage long sys_quotactl(unsigned int cmd, const char *special, qid_t id, caddr_t addr)
+asmlinkage long sys_quotactl(unsigned int cmd, const char __user *special, qid_t id, void __user *addr)
 {
 	uint cmds, type;
 	struct super_block *sb = NULL;
--- diff/fs/reiserfs/bitmap.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/reiserfs/bitmap.c	2004-07-01 21:32:48.000000000 +0100
@@ -30,6 +30,9 @@
 #define  _ALLOC_hashed_formatted_nodes 7
 #define  _ALLOC_old_way 8
 #define  _ALLOC_hundredth_slices 9
+#define  _ALLOC_dirid_groups 10
+#define  _ALLOC_oid_groups 11
+#define  _ALLOC_packing_groups 12
 
 #define  concentrating_formatted_nodes(s)	test_bit(_ALLOC_concentrating_formatted_nodes, &SB_ALLOC_OPTS(s))
 #define  displacing_large_files(s)		test_bit(_ALLOC_displacing_large_files, &SB_ALLOC_OPTS(s))
@@ -150,11 +153,6 @@
        __wait_on_buffer (bi->bh);
     }
 
-    /* If we know that first zero bit is only one or first zero bit is
-       closer to the end of bitmap than our start pointer */
-    if (bi->first_zero_hint > *beg || bi->free_count == 1)
-	*beg = bi->first_zero_hint;
-
     while (1) {
 	cont:
 	if (bi->free_count < min)
@@ -204,21 +202,12 @@
 		    while (--i >= *beg)
 			reiserfs_test_and_clear_le_bit (i, bi->bh->b_data);
 		    reiserfs_restore_prepared_buffer (s, bi->bh);
-		    *beg = max(org, (int)bi->first_zero_hint);
+		    *beg = org;
 		    /* ... and search again in current block from beginning */
 		    goto cont;	
 		}
 	    }
 	    bi->free_count -= (end - *beg);
-
-	    /* if search started from zero_hint bit, and zero hint have not
-                changed since, then we need to update first_zero_hint */
-	    if ( bi->first_zero_hint >= *beg)
-		/* no point in looking for free bit if there is not any */
-		bi->first_zero_hint = (bi->free_count > 0 ) ?
-			reiserfs_find_next_zero_le_bit
-			((unsigned long*)(bi->bh->b_data), s->s_blocksize << 3, end) : (s->s_blocksize << 3);
-
 	    journal_mark_dirty (th, s, bi->bh);
 
 	    /* free block count calculation */
@@ -231,7 +220,57 @@
 	    *beg = next;
 	}
     }
-  }
+}
+
+static int bmap_hash_id(struct super_block *s, u32 id) {
+    char * hash_in = NULL;
+    unsigned long hash;
+    unsigned bm;
+
+    if (id <= 2) {
+	bm = 1;
+    } else {
+        hash_in = (char *)(&id);
+        hash = keyed_hash(hash_in, 4);
+	bm = hash % SB_BMAP_NR(s);
+	if (!bm)
+	    bm = 1;
+    }
+    return bm;
+}
+
+/*
+ * hashes the id and then returns > 0 if the block group for the
+ * corresponding hash is full
+ */
+static inline int block_group_used(struct super_block *s, u32 id) {
+    int bm;
+    bm = bmap_hash_id(s, id);
+    if (SB_AP_BITMAP(s)[bm].free_count > ((s->s_blocksize << 3) * 60 / 100) ) {
+        return 0;
+    }
+    return 1;
+}
+
+/*
+ * the packing is returned in disk byte order
+ */
+u32 reiserfs_choose_packing(struct inode *dir) {
+    u32 packing;
+    if (TEST_OPTION(packing_groups, dir->i_sb)) {
+	u32 parent_dir = le32_to_cpu(INODE_PKEY(dir)->k_dir_id);
+	/*
+	 * some versions of reiserfsck expect packing locality 1 to be
+	 * special
+	 */
+	if (parent_dir == 1 || block_group_used(dir->i_sb,parent_dir))
+            packing = INODE_PKEY(dir)->k_objectid;
+        else
+            packing = INODE_PKEY(dir)->k_dir_id;
+    } else
+        packing = INODE_PKEY(dir)->k_objectid;
+    return packing;
+}
   
 /* Tries to find contiguous zero bit window (given size) in given region of
  * bitmap and place new blocks there. Returns number of allocated blocks. */
@@ -255,8 +294,18 @@
     get_bit_address (s, *start, &bm, &off);
     get_bit_address (s, finish, &end_bm, &end_off);
 
-    // With this option set first we try to find a bitmap that is at least 10%
-    // free, and if that fails, then we fall back to old whole bitmap scanning
+    /* When the bitmap is more than 10% free, anyone can allocate.
+     * When it's less than 10% free, only files that already use the
+     * bitmap are allowed. Once we pass 80% full, this restriction
+     * is lifted.
+     *
+     * We do this so that files that grow later still have space close to
+     * their original allocation. This improves locality, and presumably
+     * performance as a result.
+     *
+     * This is only an allocation policy and does not make up for getting a
+     * bad hint. Decent hinting must be implemented for this to work well.
+     */
     if ( TEST_OPTION(skip_busy, s) && SB_FREE_BLOCKS(s) > SB_BLOCK_COUNT(s)/20 ) {
 	for (;bm < end_bm; bm++, off = 0) {
 	    if ( ( off && (!unfm || (file_block != 0))) || SB_AP_BITMAP(s)[bm].free_count > (s->s_blocksize << 3) / 10 )
@@ -314,9 +363,6 @@
 			  "free_block (%s:%lu)[dev:blocknr]: bit already cleared",
 			  reiserfs_bdevname (s), block);
     }
-    if (offset < apbi[nr].first_zero_hint) {
-      apbi[nr].first_zero_hint = offset;
-    }
     apbi[nr].free_count ++;
     journal_mark_dirty (th, s, apbi[nr].bh);
 
@@ -396,6 +442,14 @@
 	__discard_prealloc(th, ei);
     }
 }
+
+void reiserfs_init_alloc_options (struct super_block *s)
+{
+    set_bit (_ALLOC_skip_busy, &SB_ALLOC_OPTS(s));
+    set_bit (_ALLOC_dirid_groups, &SB_ALLOC_OPTS(s));
+    set_bit (_ALLOC_packing_groups, &SB_ALLOC_OPTS(s));
+}
+
 /* block allocator related options are parsed here */
 int reiserfs_parse_alloc_options(struct super_block * s, char * options)
 {
@@ -439,6 +493,18 @@
 	    continue;
 	}
 
+        if (!strcmp(this_char, "dirid_groups")) {
+	    SET_OPTION(dirid_groups);
+	    continue;
+        }
+        if (!strcmp(this_char, "oid_groups")) {
+	    SET_OPTION(oid_groups);
+	    continue;
+        }
+        if (!strcmp(this_char, "packing_groups")) {
+	    SET_OPTION(packing_groups);
+	    continue;
+        }
 	if (!strcmp(this_char, "hashed_formatted_nodes")) {
 	    SET_OPTION(hashed_formatted_nodes);
 	    continue;
@@ -481,6 +547,7 @@
 	return 1;
       }
   
+    reiserfs_warning (s, "allocator options = [%08x]\n", SB_ALLOC_OPTS(s));
     return 0;
 }
   
@@ -503,17 +570,76 @@
     hint->search_start = hint->beg + keyed_hash(hash_in, 4) % (hint->end - hint->beg);
 }
 
-static inline void get_left_neighbor(reiserfs_blocknr_hint_t *hint)
+/*
+ * Relocation based on dirid, hashing them into a given bitmap block
+ * files. Formatted nodes are unaffected, a seperate policy covers them
+ */
+static void
+dirid_groups (reiserfs_blocknr_hint_t *hint)
+{
+    unsigned long hash;
+    __u32 dirid = 0;
+    int bm = 0;
+    struct super_block *sb = hint->th->t_super;
+    if (hint->inode)
+	dirid = le32_to_cpu(INODE_PKEY(hint->inode)->k_dir_id);
+    else if (hint->formatted_node)
+        dirid = hint->key.k_dir_id;
+
+    if (dirid) {
+	bm = bmap_hash_id(sb, dirid);
+	hash = bm * (sb->s_blocksize << 3);
+	/* give a portion of the block group to metadata */
+	if (hint->inode)
+	    hash += sb->s_blocksize/2;
+	hint->search_start = hash;
+    }
+}
+
+/*
+ * Relocation based on oid, hashing them into a given bitmap block
+ * files. Formatted nodes are unaffected, a seperate policy covers them
+ */
+static void
+oid_groups (reiserfs_blocknr_hint_t *hint)
+{
+    if (hint->inode) {
+	unsigned long hash;
+	__u32 oid;
+	__u32 dirid;
+	int bm;
+
+	dirid = le32_to_cpu(INODE_PKEY(hint->inode)->k_dir_id);
+
+	/* keep the root dir and it's first set of subdirs close to
+	 * the start of the disk
+	 */
+	if (dirid <= 2)
+	    hash = (hint->inode->i_sb->s_blocksize << 3);
+	else {
+	    oid = le32_to_cpu(INODE_PKEY(hint->inode)->k_objectid);
+	    bm = bmap_hash_id(hint->inode->i_sb, oid);
+	    hash = bm * (hint->inode->i_sb->s_blocksize << 3);
+	}
+	hint->search_start = hash;
+    }
+}
+
+/* returns 1 if it finds an indirect item and gets valid hint info
+ * from it, otherwise 0
+ */
+static int get_left_neighbor(reiserfs_blocknr_hint_t *hint)
 {
     struct path * path;
     struct buffer_head * bh;
     struct item_head * ih;
     int pos_in_item;
     __u32 * item;
+    int ret = 0;
 
     if (!hint->path)		/* reiserfs code can call this function w/o pointer to path
 				 * structure supplied; then we rely on supplied search_start */
-	return;
+	return 0;
 
     path = hint->path;
     bh = get_last_bh(path);
@@ -534,15 +660,15 @@
 	    int t=get_block_num(item,pos_in_item);
 	    if (t) {
 		hint->search_start = t;
+		ret = 1;
 		break;
 	    }
 	    pos_in_item --;
 	}
-    } else {
-      }
+    }
 
     /* does result value fit into specified region? */
-    return;
+    return ret;
 }
 
 /* should be, if formatted node, then try to put on first part of the device
@@ -639,10 +765,12 @@
     }
 }
   
-static inline void determine_search_start(reiserfs_blocknr_hint_t *hint,
+static void determine_search_start(reiserfs_blocknr_hint_t *hint,
 					  int amount_needed)
 {
     struct super_block *s = hint->th->t_super;
+    int unfm_hint;
+
     hint->beg = 0;
     hint->end = SB_BLOCK_COUNT(s) - 1;
 
@@ -673,19 +801,14 @@
 	return;
     }
 
-    /* attempt to copy a feature from old block allocator code */
-    if (TEST_OPTION(old_hashed_relocation, s) && !hint->formatted_node) {
-	old_hashed_relocation(hint);
-    }
-
     /* if none of our special cases is relevant, use the left neighbor in the
        tree order of the new node we are allocating for */
     if (hint->formatted_node && TEST_OPTION(hashed_formatted_nodes,s)) {
-	hash_formatted_node(hint);
+        hash_formatted_node(hint);
 	return;
-    } 
+    }
 
-    get_left_neighbor(hint);
+    unfm_hint = get_left_neighbor(hint);
 
     /* Mimic old block allocator behaviour, that is if VFS allowed for preallocation,
        new blocks are displaced based on directory ID. Also, if suggested search_start
@@ -710,10 +833,36 @@
 	return;
     }
 
-    if (TEST_OPTION(old_hashed_relocation, s))
+    /* old_hashed_relocation only works on unformatted */
+    if (!unfm_hint && !hint->formatted_node &&
+        TEST_OPTION(old_hashed_relocation, s))
+    {
 	old_hashed_relocation(hint);
-    if (TEST_OPTION(new_hashed_relocation, s))
+    }
+    /* new_hashed_relocation works with both formatted/unformatted nodes */
+    if ((!unfm_hint || hint->formatted_node) &&
+        TEST_OPTION(new_hashed_relocation, s))
+    {
 	new_hashed_relocation(hint);
+    }
+    /* dirid grouping works only on unformatted nodes */
+    if (!unfm_hint && !hint->formatted_node && TEST_OPTION(dirid_groups,s))
+    {
+        dirid_groups(hint);
+    }
+
+#ifdef DISPLACE_NEW_PACKING_LOCALITIES
+    if (hint->formatted_node && TEST_OPTION(dirid_groups,s))
+    {
+        dirid_groups(hint);
+    }
+#endif
+
+    /* oid grouping works only on unformatted nodes */
+    if (!unfm_hint && !hint->formatted_node && TEST_OPTION(oid_groups,s))
+    {
+        oid_groups(hint);
+    }
     return;
 }
 
@@ -738,13 +887,14 @@
 static inline int allocate_without_wrapping_disk (reiserfs_blocknr_hint_t * hint,
 					 b_blocknr_t * new_blocknrs,
 					 b_blocknr_t start, b_blocknr_t finish,
+					 int min,
 					 int amount_needed, int prealloc_size)
 {
     int rest = amount_needed;
     int nr_allocated;
   
     while (rest > 0 && start <= finish) {
-	nr_allocated = scan_bitmap (hint->th, &start, finish, 1,
+	nr_allocated = scan_bitmap (hint->th, &start, finish, min,
 				    rest + prealloc_size, !hint->formatted_node,
 				    hint->block);
 
@@ -777,8 +927,9 @@
     struct super_block *s = hint->th->t_super;
     b_blocknr_t start = hint->search_start;
     b_blocknr_t finish = SB_BLOCK_COUNT(s) - 1;
-    int second_pass = 0;
+    int passno = 0;
     int nr_allocated = 0;
+    int bigalloc = 0;
 
     determine_prealloc_size(hint);
     if (!hint->formatted_node) {
@@ -797,32 +948,61 @@
 	    if (quota_ret)
 		hint->preallocate=hint->prealloc_size=0;
 	}
+	/* for unformatted nodes, force large allocations */
+	bigalloc = amount_needed;
     }
 
-    while((nr_allocated
-	  += allocate_without_wrapping_disk(hint, new_blocknrs + nr_allocated, start, finish,
-					  amount_needed - nr_allocated, hint->prealloc_size))
-	  < amount_needed) {
-
-	/* not all blocks were successfully allocated yet*/
-	if (second_pass) {	/* it was a second pass; we must free all blocks */
+    do {
+	/* in bigalloc mode, nr_allocated should stay zero until
+	 * the entire allocation is filled
+	 */
+	if (unlikely(bigalloc && nr_allocated)) {
+	    reiserfs_warning(s, "bigalloc is %d, nr_allocated %d\n",
+	    bigalloc, nr_allocated);
+	    /* reset things to a sane value */
+	    bigalloc = amount_needed - nr_allocated;
+	}
+	/*
+	 * try pass 0 and pass 1 looking for a nice big
+	 * contiguous allocation.  Then reset and look
+	 * for anything you can find.
+	 */
+	if (passno == 2 && bigalloc) {
+	    passno = 0;
+	    bigalloc = 0;
+	}
+	switch (passno++) {
+        case 0: /* Search from hint->search_start to end of disk */
+	    start = hint->search_start;
+	    finish = SB_BLOCK_COUNT(s) - 1;
+	    break;
+        case 1: /* Search from hint->beg to hint->search_start */
+	    start = hint->beg;
+	    finish = hint->search_start;
+	    break;
+	case 2: /* Last chance: Search from 0 to hint->beg */
+	    start = 0;
+	    finish = hint->beg;
+	    break;
+	default: /* We've tried searching everywhere, not enough space */
+	    /* Free the blocks */
 	    if (!hint->formatted_node) {
 #ifdef REISERQUOTA_DEBUG
 		reiserfs_debug (s, "reiserquota: freeing (nospace) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated, hint->inode->i_uid);
 #endif
 		DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed + hint->prealloc_size - nr_allocated);     /* Free not allocated blocks */
 	    }
-	    while (nr_allocated --)
+  	    while (nr_allocated --)
 		reiserfs_free_block(hint->th, hint->inode, new_blocknrs[nr_allocated], !hint->formatted_node);
 
 	    return NO_DISK_SPACE;
-	} else {		/* refine search parameters for next pass */
-	    second_pass = 1;
-	    finish = start;
-	    start = 0;
-	    continue;
 	}
-    }
+    } while ((nr_allocated += allocate_without_wrapping_disk (hint,
+			    new_blocknrs + nr_allocated, start, finish,
+			    bigalloc ? bigalloc : 1,
+			    amount_needed - nr_allocated,
+			    hint->prealloc_size))
+			< amount_needed);
     if ( !hint->formatted_node &&
          amount_needed + hint->prealloc_size >
 	 nr_allocated + REISERFS_I(hint->inode)->i_prealloc_count) {
--- diff/fs/reiserfs/dir.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/reiserfs/dir.c	2004-07-01 21:32:48.000000000 +0100
@@ -64,6 +64,7 @@
 
     /*  reiserfs_warning (inode->i_sb, "reiserfs_readdir 1: f_pos = %Ld", filp->f_pos);*/
 
+    path_to_entry.reada = PATH_READA;
     while (1) {
     research:
 	/* search the directory item, containing entry with specified key */
--- diff/fs/reiserfs/file.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/reiserfs/file.c	2004-07-01 21:32:48.000000000 +0100
@@ -89,15 +89,16 @@
 			      ) {
   struct inode * p_s_inode = p_s_dentry->d_inode;
   int n_err;
-
-  reiserfs_write_lock(p_s_inode->i_sb);
+  int barrier_done;
 
   if (!S_ISREG(p_s_inode->i_mode))
       BUG ();
-
   n_err = sync_mapping_buffers(p_s_inode->i_mapping) ;
-  reiserfs_commit_for_inode(p_s_inode) ;
+  reiserfs_write_lock(p_s_inode->i_sb);
+  barrier_done = reiserfs_commit_for_inode(p_s_inode);
   reiserfs_write_unlock(p_s_inode->i_sb);
+  if (barrier_done != 1)
+      blkdev_issue_flush(p_s_inode->i_sb->s_bdev, NULL);
   return ( n_err < 0 ) ? -EIO : 0;
 }
 
@@ -131,7 +132,7 @@
     struct buffer_head *bh; // Buffer head that contains items that we are going to deal with
     __u32 * item; // pointer to item we are going to deal with
     INITIALIZE_PATH(path); // path to item, that we are going to deal with.
-    b_blocknr_t allocated_blocks[blocks_to_allocate]; // Pointer to a place where allocated blocknumbers would be stored. Right now statically allocated, later that will change.
+    b_blocknr_t *allocated_blocks; // Pointer to a place where allocated blocknumbers would be stored.
     reiserfs_blocknr_hint_t hint; // hint structure for block allocator.
     size_t res; // return value of various functions that we call.
     int curr_block; // current block used to keep track of unmapped blocks.
@@ -144,10 +145,20 @@
     int modifying_this_item = 0; // Flag for items traversal code to keep track
 				 // of the fact that we already prepared
 				 // current block for journal
-
+    int will_prealloc = 0;
 
     RFALSE(!blocks_to_allocate, "green-9004: tried to allocate zero blocks?");
 
+    /* only preallocate if this is a small write */
+    if (REISERFS_I(inode)->i_prealloc_count ||
+       (!(write_bytes & (inode->i_sb->s_blocksize -1)) &&
+        blocks_to_allocate <
+        REISERFS_SB(inode->i_sb)->s_alloc_options.preallocsize))
+        will_prealloc = REISERFS_SB(inode->i_sb)->s_alloc_options.preallocsize;
+
+    allocated_blocks = kmalloc((blocks_to_allocate + will_prealloc) *
+    					sizeof(b_blocknr_t), GFP_NOFS);
+
     /* First we compose a key to point at the writing position, we want to do
        that outside of any locking region. */
     make_cpu_key (&key, inode, pos+1, TYPE_ANY, 3/*key length*/);
@@ -174,13 +185,7 @@
     hint.key = key.on_disk_key; // on disk key of file.
     hint.block = inode->i_blocks>>(inode->i_sb->s_blocksize_bits-9); // Number of disk blocks this file occupies already.
     hint.formatted_node = 0; // We are allocating blocks for unformatted node.
-
-    /* only preallocate if this is a small write */
-    if (blocks_to_allocate <
-        REISERFS_SB(inode->i_sb)->s_alloc_options.preallocsize)
-        hint.preallocate = 1;
-    else
-        hint.preallocate = 0;
+    hint.preallocate = will_prealloc;
 
     /* Call block allocator to allocate blocks */
     res = reiserfs_allocate_blocknrs(&hint, allocated_blocks, blocks_to_allocate, blocks_to_allocate);
@@ -467,6 +472,12 @@
     // the inode.
     //
     pathrelse(&path);
+    /*
+     * cleanup prellocation from previous writes
+     * if this is a partial block write
+     */
+    if (write_bytes & (inode->i_sb->s_blocksize -1))
+        reiserfs_discard_prealloc(th, inode);
     reiserfs_write_unlock(inode->i_sb);
 
     // go through all the pages/buffers and map the buffers to newly allocated
@@ -504,6 +515,7 @@
 
     RFALSE( curr_block > blocks_to_allocate, "green-9007: Used too many blocks? weird");
 
+    kfree(allocated_blocks);
     return 0;
 
 // Need to deal with transaction here.
@@ -517,6 +529,7 @@
     reiserfs_update_sd(th, inode); // update any changes we made to blk count
     journal_end(th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3 + 1);
     reiserfs_write_unlock(inode->i_sb);
+    kfree(allocated_blocks);
 
     return res;
 }
@@ -585,9 +598,19 @@
     struct buffer_head *bh, *head;
     unsigned long i_size_index = inode->i_size >> PAGE_CACHE_SHIFT;
     int new;
+    int logit = reiserfs_file_data_log(inode);
+    struct super_block *s = inode->i_sb;
+    int bh_per_page = PAGE_CACHE_SIZE / s->s_blocksize;
+    struct reiserfs_transaction_handle th;
+    th.t_trans_id = 0;
 
     blocksize = 1 << inode->i_blkbits;
 
+    if (logit) {
+	reiserfs_write_lock(s);
+	journal_begin(&th, s, bh_per_page + 1);
+	reiserfs_update_inode_transaction(inode);
+    }
     for(bh = head = page_buffers(page), block_start = 0;
         bh != head || !block_start;
 	block_start=block_end, bh = bh->b_this_page)
@@ -601,7 +624,10 @@
 		    partial = 1;
 	} else {
 	    set_buffer_uptodate(bh);
-	    if (!buffer_dirty(bh)) {
+	    if (logit) {
+		reiserfs_prepare_for_journal(s, bh, 1);
+		journal_mark_dirty(&th, s, bh);
+	    } else if (!buffer_dirty(bh)) {
 		mark_buffer_dirty(bh);
 		/* do data=ordered on any page past the end
 		 * of file and any buffer marked BH_New.
@@ -613,7 +639,10 @@
 	    }
 	}
     }
-
+    if (logit) {
+	journal_end(&th, s, bh_per_page + 1);
+	reiserfs_write_unlock(s);
+    }
     /*
      * If this is a partial write which happened to make all buffers
      * uptodate then we can optimize away a bogus readpage() for
@@ -1254,6 +1283,7 @@
 	journal_end(&th, th.t_super, th.t_blocks_allocated);
         reiserfs_write_unlock(inode->i_sb);
     }
+
     if ((file->f_flags & O_SYNC) || IS_SYNC(inode))
 	res = generic_osync_inode(inode, file->f_mapping, OSYNC_METADATA|OSYNC_DATA);
 
--- diff/fs/reiserfs/inode.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/reiserfs/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -1660,7 +1660,7 @@
     sb = dir->i_sb;
 
     /* item head of new item */
-    ih.ih_key.k_dir_id = INODE_PKEY (dir)->k_objectid;
+    ih.ih_key.k_dir_id = reiserfs_choose_packing(dir);
     ih.ih_key.k_objectid = cpu_to_le32 (reiserfs_get_unused_objectid (th));
     if (!ih.ih_key.k_objectid) {
 	err = -ENOMEM;
@@ -1729,7 +1729,6 @@
 	err = -EEXIST;
 	goto out_bad_inode;
     }
-
     if (old_format_only (sb)) {
 	if (inode->i_uid & ~0xffff || inode->i_gid & ~0xffff) {
 	    pathrelse (&path_to_key);
@@ -2148,6 +2147,11 @@
     struct buffer_head *head, *bh;
     int partial = 0 ;
     int nr = 0;
+    int checked = PageChecked(page);
+    struct reiserfs_transaction_handle th;
+    struct super_block *s = inode->i_sb;
+    int bh_per_page = PAGE_CACHE_SIZE / s->s_blocksize;
+    th.t_trans_id = 0;
 
     /* The page dirty bit is cleared before writepage is called, which
      * means we have to tell create_empty_buffers to make dirty buffers
@@ -2155,7 +2159,7 @@
      * in the BH_Uptodate is just a sanity check.
      */
     if (!page_has_buffers(page)) {
-	create_empty_buffers(page, inode->i_sb->s_blocksize, 
+	create_empty_buffers(page, s->s_blocksize,
 	                    (1 << BH_Dirty) | (1 << BH_Uptodate));
     }
     head = page_buffers(page) ;
@@ -2179,10 +2183,10 @@
 	kunmap_atomic(kaddr, KM_USER0) ;
     }
     bh = head ;
-    block = page->index << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits) ;
+    block = page->index << (PAGE_CACHE_SHIFT - s->s_blocksize_bits) ;
     /* first map all the buffers, logging any direct items we find */
     do {
-	if (buffer_dirty(bh) && (!buffer_mapped(bh) ||
+	if ((checked || buffer_dirty(bh)) && (!buffer_mapped(bh) ||
 	   (buffer_mapped(bh) && bh->b_blocknr == 0))) {
 	    /* not mapped yet, or it points to a direct item, search
 	     * the btree for the mapping info, and log any direct
@@ -2196,6 +2200,18 @@
 	block++;
     } while(bh != head) ;
 
+    /*
+     * we start the transaction after map_block_for_writepage,
+     * because it can create holes in the file (an unbounded operation).
+     * starting it here, we can make a reliable estimate for how many
+     * blocks we're going to log
+     */
+    if (checked) {
+	ClearPageChecked(page);
+	reiserfs_write_lock(s);
+	journal_begin(&th, s, bh_per_page + 1);
+	reiserfs_update_inode_transaction(inode);
+    }
     /* now go through and lock any dirty buffers on the page */
     do {
 	get_bh(bh);
@@ -2204,6 +2220,11 @@
 	if (buffer_mapped(bh) && bh->b_blocknr == 0)
 	    continue;
 
+	if (checked) {
+	    reiserfs_prepare_for_journal(s, bh, 1);
+	    journal_mark_dirty(&th, s, bh);
+	    continue;
+	}
 	/* from this point on, we know the buffer is mapped to a
 	 * real block and not a direct item
 	 */
@@ -2222,6 +2243,10 @@
 	}
     } while((bh = bh->b_this_page) != head);
 
+    if (checked) {
+	journal_end(&th, s, bh_per_page + 1);
+	reiserfs_write_unlock(s);
+    }
     BUG_ON(PageWriteback(page));
     set_page_writeback(page);
     unlock_page(page);
@@ -2481,17 +2506,15 @@
     /* the page is locked, and the only places that log a data buffer
      * also lock the page.
      */
-#if 0
     if (reiserfs_file_data_log(inode)) {
-	/* very conservative, leave the buffer pinned if anyone might need it.
-	** this should be changed to drop the buffer if it is only in the
-	** current transaction
-	*/
+	/*
+	 * very conservative, leave the buffer pinned if
+	 * anyone might need it.
+	 */
         if (buffer_journaled(bh) || buffer_journal_dirty(bh)) {
 	    ret = 0 ;
 	}
     } else
-#endif
     if (buffer_dirty(bh) || buffer_locked(bh)) {
 	struct reiserfs_journal_list *jl;
 	struct reiserfs_jh *jh = bh->b_private;
@@ -2529,6 +2552,10 @@
     int ret = 1;
 
     BUG_ON(!PageLocked(page));
+
+    if (offset == 0)
+	ClearPageChecked(page);
+
     if (!page_has_buffers(page))
 	goto out;
 
@@ -2562,6 +2589,15 @@
     return ret;
 }
 
+static int reiserfs_set_page_dirty(struct page *page) {
+    struct inode *inode = page->mapping->host;
+    if (reiserfs_file_data_log(inode)) {
+	SetPageChecked(page);
+	return __set_page_dirty_nobuffers(page);
+    }
+    return __set_page_dirty_buffers(page);
+}
+
 /*
  * Returns 1 if the page's buffers were dropped.  The page is locked.
  *
@@ -2579,6 +2615,7 @@
     struct buffer_head *bh ;
     int ret = 1 ;
 
+    WARN_ON(PageChecked(page));
     spin_lock(&j->j_dirty_buffers_lock) ;
     head = page_buffers(page) ;
     bh = head ;
@@ -2658,7 +2695,7 @@
                     error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0;
         }
         if (!error)
-            inode_setattr(inode, attr) ;
+            error = inode_setattr(inode, attr) ;
     }
 
 
@@ -2684,5 +2721,6 @@
     .prepare_write = reiserfs_prepare_write,
     .commit_write = reiserfs_commit_write,
     .bmap = reiserfs_aop_bmap,
-    .direct_IO = reiserfs_direct_IO
+    .direct_IO = reiserfs_direct_IO,
+    .set_page_dirty = reiserfs_set_page_dirty,
 } ;
--- diff/fs/reiserfs/journal.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/reiserfs/journal.c	2004-07-01 21:32:48.000000000 +0100
@@ -127,6 +127,12 @@
   return 0 ;
 }
 
+static void disable_barrier(struct super_block *s)
+{
+    REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_BARRIER_FLUSH);
+    printk("reiserfs: disabling flush barriers on %s\n", reiserfs_bdevname(s));
+}
+
 static struct reiserfs_bitmap_node *
 allocate_bitmap_node(struct super_block *p_s_sb) {
   struct reiserfs_bitmap_node *bn ;
@@ -640,6 +646,26 @@
     submit_bh(WRITE, bh) ;
 }
 
+static int submit_barrier_buffer(struct buffer_head *bh) {
+    get_bh(bh) ;
+    bh->b_end_io = reiserfs_end_ordered_io;
+    clear_buffer_dirty(bh) ;
+    if (!buffer_uptodate(bh))
+        BUG();
+    return submit_bh(WRITE_BARRIER, bh) ;
+}
+
+static void check_barrier_completion(struct super_block *s,
+                                     struct buffer_head *bh) {
+    if (buffer_eopnotsupp(bh)) {
+	clear_buffer_eopnotsupp(bh);
+	disable_barrier(s);
+	set_buffer_uptodate(bh);
+	set_buffer_dirty(bh);
+	sync_dirty_buffer(bh);
+    }
+}
+
 #define CHUNK_SIZE 32
 struct buffer_chunk {
     struct buffer_head *bh[CHUNK_SIZE];
@@ -909,6 +935,7 @@
   int bn ;
   struct buffer_head *tbh = NULL ;
   unsigned long trans_id = jl->j_trans_id;
+  int barrier = 0;
 
   reiserfs_check_lock_depth(s, "flush_commit_list") ;
 
@@ -973,7 +1000,20 @@
   }
   atomic_dec(&SB_JOURNAL(s)->j_async_throttle);
 
-  /* wait on everything written so far before writing the commit */
+  /* wait on everything written so far before writing the commit
+   * if we are in barrier mode, send the commit down now
+   */
+  barrier = reiserfs_barrier_flush(s);
+  if (barrier) {
+      int ret;
+      lock_buffer(jl->j_commit_bh);
+      ret = submit_barrier_buffer(jl->j_commit_bh);
+      if (ret == -EOPNOTSUPP) {
+	  set_buffer_uptodate(jl->j_commit_bh);
+          disable_barrier(s);
+	  barrier = 0;
+      }
+  }
   for (i = 0 ;  i < (jl->j_len + 1) ; i++) {
     bn = SB_ONDISK_JOURNAL_1st_BLOCK(s) +
 	 (jl->j_start + i) % SB_ONDISK_JOURNAL_SIZE(s) ;
@@ -995,10 +1035,15 @@
   if (atomic_read(&(jl->j_commit_left)) != 1)
     BUG();
 
-  if (buffer_dirty(jl->j_commit_bh))
-    BUG();
-  mark_buffer_dirty(jl->j_commit_bh) ;
-  sync_dirty_buffer(jl->j_commit_bh) ;
+  if (!barrier) {
+      if (buffer_dirty(jl->j_commit_bh))
+	BUG();
+      mark_buffer_dirty(jl->j_commit_bh) ;
+      sync_dirty_buffer(jl->j_commit_bh) ;
+  } else
+      wait_on_buffer(jl->j_commit_bh);
+
+  check_barrier_completion(s, jl->j_commit_bh);
   if (!buffer_uptodate(jl->j_commit_bh)) {
     reiserfs_panic(s, "journal-615: buffer write failed\n") ;
   }
@@ -1024,7 +1069,6 @@
   up(&jl->j_commit_lock);
 put_jl:
   put_journal_list(s, jl);
-
   return 0 ;
 }
 
@@ -1099,8 +1143,23 @@
     jh->j_last_flush_trans_id = cpu_to_le32(trans_id) ;
     jh->j_first_unflushed_offset = cpu_to_le32(offset) ;
     jh->j_mount_id = cpu_to_le32(SB_JOURNAL(p_s_sb)->j_mount_id) ;
-    set_buffer_dirty(SB_JOURNAL(p_s_sb)->j_header_bh) ;
-    sync_dirty_buffer(SB_JOURNAL(p_s_sb)->j_header_bh) ;
+
+    if (reiserfs_barrier_flush(p_s_sb)) {
+	int ret;
+	lock_buffer(SB_JOURNAL(p_s_sb)->j_header_bh);
+	ret = submit_barrier_buffer(SB_JOURNAL(p_s_sb)->j_header_bh);
+	if (ret == -EOPNOTSUPP) {
+	    set_buffer_uptodate(SB_JOURNAL(p_s_sb)->j_header_bh);
+	    disable_barrier(p_s_sb);
+	    goto sync;
+	}
+	wait_on_buffer(SB_JOURNAL(p_s_sb)->j_header_bh);
+	check_barrier_completion(p_s_sb, SB_JOURNAL(p_s_sb)->j_header_bh);
+    } else {
+sync:
+	set_buffer_dirty(SB_JOURNAL(p_s_sb)->j_header_bh) ;
+	sync_dirty_buffer(SB_JOURNAL(p_s_sb)->j_header_bh) ;
+    }
     if (!buffer_uptodate(SB_JOURNAL(p_s_sb)->j_header_bh)) {
       reiserfs_warning (p_s_sb, "journal-837: IO error during journal replay");
       return -EIO ;
@@ -1544,14 +1603,18 @@
     unsigned long cur_len;
     int ret;
     int i;
+    int limit = 256;
     struct reiserfs_journal_list *tjl;
     struct reiserfs_journal_list *flush_jl;
     unsigned long trans_id;
 
     flush_jl = tjl = jl;
 
-    /* flush for 256 transactions or 256 blocks, whichever comes first */
-    for(i = 0 ; i < 256 && len < 256 ; i++) {
+    /* in data logging mode, try harder to flush a lot of blocks */
+    if (reiserfs_data_log(s))
+	limit = 1024;
+    /* flush for 256 transactions or limit blocks, whichever comes first */
+    for(i = 0 ; i < 256 && len < limit ; i++) {
 	if (atomic_read(&tjl->j_commit_left) ||
 	    tjl->j_trans_id < jl->j_trans_id) {
 	    break;
@@ -3181,11 +3244,16 @@
   REISERFS_I(inode)->i_trans_id = SB_JOURNAL(inode->i_sb)->j_trans_id ;
 }
 
-static void __commit_trans_jl(struct inode *inode, unsigned long id,
+/*
+ * returns -1 on error, 0 if no commits/barriers were done and 1
+ * if a transaction was actually committed and the barrier was done
+ */
+static int __commit_trans_jl(struct inode *inode, unsigned long id,
                                  struct reiserfs_journal_list *jl)
 {
     struct reiserfs_transaction_handle th ;
     struct super_block *sb = inode->i_sb ;
+    int ret = 0;
 
     /* is it from the current transaction, or from an unknown transaction? */
     if (id == SB_JOURNAL(sb)->j_trans_id) {
@@ -3207,6 +3275,7 @@
 	}
 
 	journal_end_sync(&th, sb, 1) ;
+	ret = 1;
 
     } else {
 	/* this gets tricky, we have to make sure the journal list in
@@ -3215,13 +3284,21 @@
 	 */
 flush_commit_only:
 	if (journal_list_still_alive(inode->i_sb, id)) {
+	    /*
+	     * we only set ret to 1 when we know for sure
+	     * the barrier hasn't been started yet on the commit
+	     * block.
+	     */
+	    if (atomic_read(&jl->j_commit_left) > 1)
+	        ret = 1;
 	    flush_commit_list(sb, jl, 1) ;
 	}
     }
     /* otherwise the list is gone, and long since committed */
+    return ret;
 }
 
-void reiserfs_commit_for_inode(struct inode *inode) {
+int reiserfs_commit_for_inode(struct inode *inode) {
     unsigned long id = REISERFS_I(inode)->i_trans_id;
     struct reiserfs_journal_list *jl = REISERFS_I(inode)->i_jl;
 
@@ -3234,7 +3311,7 @@
 	/* jl will be updated in __commit_trans_jl */
     }
 
-    __commit_trans_jl(inode, id, jl);
+   return __commit_trans_jl(inode, id, jl);
 }
 
 void reiserfs_restore_prepared_buffer(struct super_block *p_s_sb, 
@@ -3482,10 +3559,16 @@
     /* copy all the real blocks into log area.  dirty log blocks */
     if (test_bit(BH_JDirty, &cn->bh->b_state)) {
       struct buffer_head *tmp_bh ;
+      char *addr;
+      struct page *page;
       tmp_bh =  journal_getblk(p_s_sb, SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + 
 		       ((cur_write_start + jindex) % SB_ONDISK_JOURNAL_SIZE(p_s_sb))) ;
       set_buffer_uptodate(tmp_bh);
-      memcpy(tmp_bh->b_data, cn->bh->b_data, cn->bh->b_size) ;  
+      page = cn->bh->b_page;
+      addr = kmap(page);
+      memcpy(tmp_bh->b_data, addr + offset_in_page(cn->bh->b_data),
+             cn->bh->b_size);
+      kunmap(page);
       mark_buffer_dirty(tmp_bh);
       jindex++ ;
       set_bit(BH_JDirty_wait, &(cn->bh->b_state)) ; 
--- diff/fs/reiserfs/namei.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/reiserfs/namei.c	2004-07-01 21:32:48.000000000 +0100
@@ -1389,8 +1389,9 @@
  * stuff added
  */
 struct inode_operations reiserfs_symlink_inode_operations = {
-    .readlink       = page_readlink,
-    .follow_link    = page_follow_link,
+    .readlink       = generic_readlink,
+    .follow_link    = page_follow_link_light,
+    .put_link       = page_put_link,
     .setattr        = reiserfs_setattr,
     .setxattr       = reiserfs_setxattr,
     .getxattr       = reiserfs_getxattr,
--- diff/fs/reiserfs/stree.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/reiserfs/stree.c	2004-07-01 21:32:48.000000000 +0100
@@ -596,26 +596,29 @@
 
 
 
-#ifdef SEARCH_BY_KEY_READA
+#define SEARCH_BY_KEY_READA 16
 
 /* The function is NOT SCHEDULE-SAFE! */
-static void search_by_key_reada (struct super_block * s, int blocknr)
+static void search_by_key_reada (struct super_block * s,
+                                 struct buffer_head **bh,
+				 unsigned long *b, int num)
 {
-    struct buffer_head * bh;
+    int i,j;
   
-    if (blocknr == 0)
-	return;
-
-    bh = sb_getblk (s, blocknr);
-  
-    if (!buffer_uptodate (bh)) {
-	ll_rw_block (READA, 1, &bh);
+    for (i = 0 ; i < num ; i++) {
+	bh[i] = sb_getblk (s, b[i]);
+    }
+    for (j = 0 ; j < i ; j++) {
+	/*
+	 * note, this needs attention if we are getting rid of the BKL
+	 * you have to make sure the prepared bit isn't set on this buffer
+	 */
+	if (!buffer_uptodate(bh[j]))
+	    ll_rw_block(READA, 1, bh + j);
+    	brelse(bh[j]);
     }
-    bh->b_count --;
 }
 
-#endif
-
 /**************************************************************************
  * Algorithm   SearchByKey                                                *
  *             look for item in the Disk S+Tree by its key                *
@@ -657,6 +660,9 @@
     int				n_node_level, n_retval;
     int 			right_neighbor_of_leaf_node;
     int				fs_gen;
+    struct buffer_head *reada_bh[SEARCH_BY_KEY_READA];
+    unsigned long      reada_blocks[SEARCH_BY_KEY_READA];
+    int reada_count = 0;
 
 #ifdef CONFIG_REISERFS_CHECK
     int n_repeat_counter = 0;
@@ -691,19 +697,25 @@
 	p_s_last_element = PATH_OFFSET_PELEMENT(p_s_search_path, ++p_s_search_path->path_length);
 	fs_gen = get_generation (p_s_sb);
 
-#ifdef SEARCH_BY_KEY_READA
-	/* schedule read of right neighbor */
-	search_by_key_reada (p_s_sb, right_neighbor_of_leaf_node);
-#endif
-
 	/* Read the next tree node, and set the last element in the path to
            have a pointer to it. */
-	if ( ! (p_s_bh = p_s_last_element->pe_buffer =
-		sb_bread(p_s_sb, n_block_number)) ) {
+	if ((p_s_bh = p_s_last_element->pe_buffer =
+	     sb_getblk(p_s_sb, n_block_number)) ) {
+	    if (!buffer_uptodate(p_s_bh) && reada_count > 1) {
+		search_by_key_reada (p_s_sb, reada_bh,
+		                     reada_blocks, reada_count);
+	    }
+	    ll_rw_block(READ, 1, &p_s_bh);
+	    wait_on_buffer(p_s_bh);
+	    if (!buffer_uptodate(p_s_bh))
+	        goto io_error;
+	} else {
+io_error:
 	    p_s_search_path->path_length --;
 	    pathrelse(p_s_search_path);
 	    return IO_ERROR;
 	}
+	reada_count = 0;
 	if (expected_level == -1)
 		expected_level = SB_TREE_HEIGHT (p_s_sb);
 	expected_level --;
@@ -784,11 +796,36 @@
 	   position in the node. */
 	n_block_number = B_N_CHILD_NUM(p_s_bh, p_s_last_element->pe_position);
 
-#ifdef SEARCH_BY_KEY_READA
-	/* if we are going to read leaf node, then calculate its right neighbor if possible */
-	if (n_node_level == DISK_LEAF_NODE_LEVEL + 1 && p_s_last_element->pe_position < B_NR_ITEMS (p_s_bh))
-	    right_neighbor_of_leaf_node = B_N_CHILD_NUM(p_s_bh, p_s_last_element->pe_position + 1);
-#endif
+	/* if we are going to read leaf nodes, try for read ahead as well */
+	if ((p_s_search_path->reada & PATH_READA) &&
+	    n_node_level == DISK_LEAF_NODE_LEVEL + 1)
+	{
+	    int pos = p_s_last_element->pe_position;
+	    int limit = B_NR_ITEMS(p_s_bh);
+	    struct key *le_key;
+
+	    if (p_s_search_path->reada & PATH_READA_BACK)
+		limit = 0;
+	    while(reada_count < SEARCH_BY_KEY_READA) {
+		if (pos == limit)
+		    break;
+	        reada_blocks[reada_count++] = B_N_CHILD_NUM(p_s_bh, pos);
+		if (p_s_search_path->reada & PATH_READA_BACK)
+		    pos--;
+		else
+		    pos++;
+
+		/*
+		 * check to make sure we're in the same object
+		 */
+		le_key = B_N_PDELIM_KEY(p_s_bh, pos);
+		if (le32_to_cpu(le_key->k_objectid) !=
+		    p_s_key->on_disk_key.k_objectid)
+		{
+		    break;
+		}
+	    }
+        }
     }
 }
 
@@ -1458,6 +1495,41 @@
     reiserfs_delete_solid_item (th, inode, INODE_PKEY (inode));
 }
 
+static void
+unmap_buffers(struct page *page, loff_t pos) {
+    struct buffer_head *bh ;
+    struct buffer_head *head ;
+    struct buffer_head *next ;
+    unsigned long tail_index ;
+    unsigned long cur_index ;
+
+    if (page) {
+	if (page_has_buffers(page)) {
+	    tail_index = pos & (PAGE_CACHE_SIZE - 1) ;
+	    cur_index = 0 ;
+	    head = page_buffers(page) ;
+	    bh = head ;
+	    do {
+		next = bh->b_this_page ;
+
+		/* we want to unmap the buffers that contain the tail, and
+		** all the buffers after it (since the tail must be at the
+		** end of the file).  We don't want to unmap file data
+		** before the tail, since it might be dirty and waiting to
+		** reach disk
+		*/
+		cur_index += bh->b_size ;
+		if (cur_index > tail_index) {
+		    reiserfs_unmap_buffer(bh) ;
+		}
+		bh = next ;
+	    } while (bh != head) ;
+	    if ( PAGE_SIZE == bh->b_size ) {
+		clear_page_dirty(page);
+	    }
+	}
+    }
+}
 
 static int maybe_indirect_to_direct (struct reiserfs_transaction_handle *th, 
 			      struct inode * p_s_inode,
@@ -1550,7 +1622,7 @@
     char                c_mode;            /* Mode of the balance. */
     int retval2 = -1;
     int quota_cut_bytes;
-    
+    loff_t tail_pos = 0;
     
     init_tb_struct(th, &s_cut_balance, p_s_inode->i_sb, p_s_path, n_cut_size);
 
@@ -1590,6 +1662,7 @@
       	    set_cpu_key_k_type (p_s_item_key, TYPE_INDIRECT);
 	    p_s_item_key->key_length = 4;
 	    n_new_file_size -= (n_new_file_size & (p_s_sb->s_blocksize - 1));
+	    tail_pos = n_new_file_size;
 	    set_cpu_key_k_offset (p_s_item_key, n_new_file_size + 1);
 	    if ( search_for_position_by_key(p_s_sb, p_s_item_key, p_s_path) == POSITION_NOT_FOUND ){
 		print_block (PATH_PLAST_BUFFER (p_s_path), 3, PATH_LAST_POSITION (p_s_path) - 1, PATH_LAST_POSITION (p_s_path) + 1);
@@ -1687,9 +1760,10 @@
     if ( n_is_inode_locked ) {
 	/* we've done an indirect->direct conversion.  when the data block
 	** was freed, it was removed from the list of blocks that must
-	** be flushed before the transaction commits, so we don't need to
-	** deal with it here.
+	** be flushed before the transaction commits, make sure to
+	** unmap and invalidate it
 	*/
+	unmap_buffers(page, tail_pos);
 	REISERFS_I(p_s_inode)->i_flags &= ~i_pack_on_close_mask ;
     }
 #ifdef REISERQUOTA_DEBUG
@@ -1778,6 +1852,12 @@
            space, this file would have this file size */
 	n_file_size = offset + bytes - 1;
     }
+    /*
+     * are we doing a full truncate or delete, if so
+     * kick in the reada code
+     */
+    if (n_new_file_size == 0)
+        s_search_path.reada = PATH_READA | PATH_READA_BACK;
 
     if ( n_file_size == 0 || n_file_size < n_new_file_size ) {
 	goto update_and_out ;
--- diff/fs/reiserfs/super.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/reiserfs/super.c	2004-07-01 21:32:48.000000000 +0100
@@ -492,7 +492,6 @@
     REISERFS_I(inode)->i_acl_default = NULL;
 }
 
-
 struct super_operations reiserfs_sops = 
 {
   .alloc_inode = reiserfs_alloc_inode,
@@ -550,6 +549,13 @@
     {NULL, 0}
 };
 
+/* possible values for -o barrier= */
+static const arg_desc_t barrier_mode[] = {
+    {"none", 1<<REISERFS_BARRIER_NONE, 1<<REISERFS_BARRIER_FLUSH},
+    {"flush", 1<<REISERFS_BARRIER_FLUSH, 1<<REISERFS_BARRIER_NONE},
+    {NULL, 0}
+};
+
 /* possible values for "-o block-allocator=" and bits which are to be set in
    s_mount_opt of reiserfs specific part of in-core super block */
 static const arg_desc_t balloc[] = {
@@ -651,7 +657,7 @@
 	reiserfs_warning (s, "head of option \"%s\" is only correct", opt->option_name);
 	return -1;
     }
-	
+
     /* move to the argument, or to next option if argument is not required */
     p ++;
     
@@ -711,6 +717,7 @@
 	{"replayonly", 0, 0, 1<<REPLAYONLY, 0},
 	{"block-allocator", 'a', balloc, 0, 0},
 	{"data", 'd', logging_mode, 0, 0},
+	{"barrier", 'b', barrier_mode, 0, 0},
 	{"resize", 'r', 0, 0, 0},
 	{"jdev", 'j', 0, 0, 0},
 	{"nolargeio", 'w', 0, 0, 0},
@@ -810,6 +817,23 @@
     }
 }
 
+static void handle_barrier_mode(struct super_block *s, unsigned long bits) {
+    int flush = (1 << REISERFS_BARRIER_FLUSH);
+    int none = (1 << REISERFS_BARRIER_NONE);
+    int all_barrier = flush | none;
+
+    if (bits & all_barrier) {
+        REISERFS_SB(s)->s_mount_opt &= ~all_barrier;
+	if (bits & flush) {
+	    REISERFS_SB(s)->s_mount_opt |= flush;
+	    printk("reiserfs: enabling write barrier flush mode\n");
+	} else if (bits & none) {
+	    REISERFS_SB(s)->s_mount_opt |= none;
+	    printk("reiserfs: write barriers turned off\n");
+	}
+   }
+}
+
 static void handle_attrs( struct super_block *s )
 {
 	struct reiserfs_super_block * rs;
@@ -854,6 +878,8 @@
   safe_mask |= 1 << REISERFS_ATTRS;
   safe_mask |= 1 << REISERFS_XATTRS_USER;
   safe_mask |= 1 << REISERFS_POSIXACL;
+  safe_mask |= 1 << REISERFS_BARRIER_FLUSH;
+  safe_mask |= 1 << REISERFS_BARRIER_NONE;
 
   /* Update the bitmask, taking care to keep
    * the bits we're not allowed to change here */
@@ -900,6 +926,7 @@
     }
 
     handle_data_mode(s, mount_options);
+    handle_barrier_mode(s, mount_options);
     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) ;
@@ -1345,15 +1372,17 @@
     memset (sbi, 0, sizeof (struct reiserfs_sb_info));
     /* Set default values for options: non-aggressive tails */
     REISERFS_SB(s)->s_mount_opt = ( 1 << REISERFS_SMALLTAIL );
-    /* default block allocator option: skip_busy */
-    REISERFS_SB(s)->s_alloc_options.bits = ( 1 << 5);
-    /* If file grew past 4 blocks, start preallocation blocks for it. */
-    REISERFS_SB(s)->s_alloc_options.preallocmin = 4;
+    /* no preallocation minimum, be smart in
+       reiserfs_file_write instead */
+    REISERFS_SB(s)->s_alloc_options.preallocmin = 0;
     /* Preallocate by 16 blocks (17-1) at once */
     REISERFS_SB(s)->s_alloc_options.preallocsize = 17;
     /* Initialize the rwsem for xattr dir */
     init_rwsem(&REISERFS_SB(s)->xattr_dir_sem);
 
+    /* setup default block allocator options */
+    reiserfs_init_alloc_options(s);
+
     jdev_name = NULL;
     if (reiserfs_parse_options (s, (char *) data, &(sbi->s_mount_opt), &blocks, &jdev_name, &commit_max_age) == 0) {
 	goto error;
@@ -1411,6 +1440,9 @@
     } else {
         reiserfs_info (s, "using writeback data mode\n");
     }
+    if (reiserfs_barrier_flush(s)) {
+    	printk("reiserfs: using flush barriers\n");
+    }
 
     // set_device_ro(s->s_dev, 1) ;
     if( journal_init(s, jdev_name, old_format, commit_max_age) ) {
--- diff/fs/reiserfs/tail_conversion.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/reiserfs/tail_conversion.c	2004-07-01 21:32:48.000000000 +0100
@@ -162,42 +162,6 @@
     unlock_buffer(bh) ;
 }
 
-static void
-unmap_buffers(struct page *page, loff_t pos) {
-  struct buffer_head *bh ;
-  struct buffer_head *head ;
-  struct buffer_head *next ;
-  unsigned long tail_index ;
-  unsigned long cur_index ;
-
-  if (page) {
-    if (page_has_buffers(page)) {
-      tail_index = pos & (PAGE_CACHE_SIZE - 1) ;
-      cur_index = 0 ;
-      head = page_buffers(page) ;
-      bh = head ;
-      do {
-	next = bh->b_this_page ;
-
-        /* we want to unmap the buffers that contain the tail, and
-        ** all the buffers after it (since the tail must be at the
-        ** end of the file).  We don't want to unmap file data 
-        ** before the tail, since it might be dirty and waiting to 
-        ** reach disk
-        */
-        cur_index += bh->b_size ;
-        if (cur_index > tail_index) {
-          reiserfs_unmap_buffer(bh) ;
-        }
-	bh = next ;
-      } while (bh != head) ;
-      if ( PAGE_SIZE == bh->b_size ) {
-	clear_page_dirty(page);
-      }
-    }
-  } 
-}
-
 /* this first locks inode (neither reads nor sync are permitted),
    reads tail through page cache, insert direct item. When direct item
    inserted successfully inode is left locked. Return value is always
@@ -287,11 +251,6 @@
     }
     kunmap(page) ;
 
-    /* this will invalidate all the buffers in the page after
-    ** pos1
-    */
-    unmap_buffers(page, pos1) ;
-
     /* make sure to get the i_blocks changes from reiserfs_insert_item */
     reiserfs_update_sd(th, p_s_inode);
 
--- diff/fs/smbfs/inode.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/smbfs/inode.c	2004-07-01 21:32:48.000000000 +0100
@@ -521,6 +521,7 @@
 	server->super_block = sb;
 	server->mnt = NULL;
 	server->sock_file = NULL;
+	init_waitqueue_head(&server->conn_wq);
 	init_MUTEX(&server->sem);
 	INIT_LIST_HEAD(&server->entry);
 	INIT_LIST_HEAD(&server->xmitq);
--- diff/fs/smbfs/proc.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/smbfs/proc.c	2004-07-01 21:32:48.000000000 +0100
@@ -56,6 +56,7 @@
 static struct smb_ops smb_ops_win95;
 static struct smb_ops smb_ops_winNT;
 static struct smb_ops smb_ops_unix;
+static struct smb_ops smb_ops_null;
 
 static void
 smb_init_dirent(struct smb_sb_info *server, struct smb_fattr *fattr);
@@ -981,6 +982,9 @@
 	smbiod_wake_up();
 	if (server->opt.capabilities & SMB_CAP_UNIX)
 		smb_proc_query_cifsunix(server);
+
+	server->conn_complete++;
+	wake_up_interruptible_all(&server->conn_wq);
 	return error;
 
 out:
@@ -2370,7 +2374,7 @@
 		if (req->rq_rcls != 0) {
 			result = smb_errno(req);
 			PARANOIA("name=%s, result=%d, rcls=%d, err=%d\n",
-				 mask, result, server->rcls, server->err);
+				 mask, result, req->rq_rcls, req->rq_err);
 			break;
 		}
 
@@ -2526,7 +2530,7 @@
 	result = smb_add_request(req);
 	if (result < 0)
 		goto out_free;
-	if (server->rcls != 0) {
+	if (req->rq_rcls != 0) {
 		result = smb_errno(req);
 #ifdef SMBFS_PARANOIA
 		if (result != -ENOENT)
@@ -2639,7 +2643,7 @@
 	result = smb_add_request(req);
 	if (result < 0)
 		goto out;
-	if (server->rcls != 0) {
+	if (req->rq_rcls != 0) {
 		VERBOSE("for %s: result=%d, rcls=%d, err=%d\n",
 			&param[6], result, req->rq_rcls, req->rq_err);
 		result = smb_errno(req);
@@ -2794,10 +2798,45 @@
 }
 
 static int
+smb_proc_ops_wait(struct smb_sb_info *server)
+{
+	int result;
+
+	result = wait_event_interruptible_timeout(server->conn_wq,
+				server->conn_complete, 30*HZ);
+
+	if (!result || signal_pending(current))
+		return -EIO;
+
+	return 0;
+}
+
+static int
 smb_proc_getattr_null(struct smb_sb_info *server, struct dentry *dir,
-		      struct smb_fattr *attr)
+			  struct smb_fattr *fattr)
 {
-	return -EIO;
+	int result;
+
+	if (smb_proc_ops_wait(server) < 0)
+		return -EIO;
+
+	smb_init_dirent(server, fattr);
+	result = server->ops->getattr(server, dir, fattr);
+	smb_finish_dirent(server, fattr);
+
+	return result;
+}
+
+static int
+smb_proc_readdir_null(struct file *filp, void *dirent, filldir_t filldir,
+		      struct smb_cache_control *ctl)
+{
+	struct smb_sb_info *server = server_from_dentry(filp->f_dentry);
+
+	if (smb_proc_ops_wait(server) < 0)
+		return -EIO;
+
+	return server->ops->readdir(filp, dirent, filldir, ctl);
 }
 
 int
@@ -3218,7 +3257,7 @@
 	if (result < 0)
 		goto out_free;
 	DEBUG1("for %s: result=%d, rcls=%d, err=%d\n",
-		&param[6], result, server->rcls, server->err);
+		&param[6], result, req->rq_rcls, req->rq_err);
 
 	/* copy data up to the \0 or buffer length */
 	result = len;
@@ -3268,7 +3307,7 @@
 		goto out_free;
 
 	DEBUG1("for %s: result=%d, rcls=%d, err=%d\n",
-		&param[6], result, server->rcls, server->err);
+		&param[6], result, req->rq_rcls, req->rq_err);
 	result = 0;
 
 out_free:
@@ -3315,7 +3354,7 @@
 		goto out_free;
 
 	DEBUG1("for %s: result=%d, rcls=%d, err=%d\n",
-	       &param[6], result, server->rcls, server->err);
+	       &param[6], result, req->rq_rcls, req->rq_err);
 	result = 0;
 
 out_free:
@@ -3431,6 +3470,7 @@
 /* Place holder until real ops are in place */
 static struct smb_ops smb_ops_null =
 {
+	.readdir	= smb_proc_readdir_null,
 	.getattr	= smb_proc_getattr_null,
 };
 
--- diff/fs/smbfs/proto.h	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/smbfs/proto.h	2004-07-01 21:32:48.000000000 +0100
@@ -87,7 +87,5 @@
 extern int smb_request_send_server(struct smb_sb_info *server);
 extern int smb_request_recv(struct smb_sb_info *server);
 /* symlink.c */
-extern int smb_read_link(struct dentry *dentry, char *buffer, int len);
 extern int smb_symlink(struct inode *inode, struct dentry *dentry, const char *oldname);
-extern int smb_follow_link(struct dentry *dentry, struct nameidata *nd);
 extern struct inode_operations smb_link_inode_operations;
--- diff/fs/smbfs/symlink.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/smbfs/symlink.c	2004-07-01 21:32:48.000000000 +0100
@@ -16,6 +16,7 @@
 #include <linux/pagemap.h>
 #include <linux/smp_lock.h>
 #include <linux/net.h>
+#include <linux/namei.h>
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -26,19 +27,6 @@
 #include "smb_debug.h"
 #include "proto.h"
 
-int smb_read_link(struct dentry *dentry, char *buffer, int len)
-{
-	char link[256];		/* FIXME: pain ... */
-	int r;
-	DEBUG1("read link buffer len = %d\n", len);
-
-	r = smb_proc_read_link(server_from_dentry(dentry), dentry, link,
-			       sizeof(link) - 1);
-	if (r < 0)
-		return -ENOENT;
-	return vfs_readlink(dentry, buffer, len, link);
-}
-
 int smb_symlink(struct inode *inode, struct dentry *dentry, const char *oldname)
 {
 	DEBUG1("create symlink %s -> %s/%s\n", oldname, DENTRY_PATH(dentry));
@@ -46,24 +34,37 @@
 	return smb_proc_symlink(server_from_dentry(dentry), dentry, oldname);
 }
 
-int smb_follow_link(struct dentry *dentry, struct nameidata *nd)
+static int smb_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
-	char link[256];		/* FIXME: pain ... */
-	int len;
+	char *link = __getname();
 	DEBUG1("followlink of %s/%s\n", DENTRY_PATH(dentry));
 
-	len = smb_proc_read_link(server_from_dentry(dentry), dentry, link,
-				 sizeof(link) - 1);
-	if(len < 0)
-		return -ENOENT;
-
-	link[len] = 0;
-	return vfs_follow_link(nd, link);
+	if (!link) {
+		link = ERR_PTR(-ENOMEM);
+	} else {
+		int len = smb_proc_read_link(server_from_dentry(dentry),
+						dentry, link, PATH_MAX - 1);
+		if (len < 0) {
+			putname(link);
+			link = ERR_PTR(len);
+		} else {
+			link[len] = 0;
+		}
+	}
+	nd_set_link(nd, link);
+	return 0;
 }
 
+static void smb_put_link(struct dentry *dentry, struct nameidata *nd)
+{
+	char *s = nd_get_link(nd);
+	if (!IS_ERR(s))
+		putname(s);
+}
 
 struct inode_operations smb_link_inode_operations =
 {
-	.readlink	= smb_read_link,
+	.readlink	= generic_readlink,
 	.follow_link	= smb_follow_link,
+	.put_link	= smb_put_link,
 };
--- diff/fs/super.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/super.c	2004-07-01 21:32:48.000000000 +0100
@@ -68,6 +68,7 @@
 		INIT_LIST_HEAD(&s->s_files);
 		INIT_LIST_HEAD(&s->s_instances);
 		INIT_HLIST_HEAD(&s->s_anon);
+		INIT_LIST_HEAD(&s->s_inodes);
 		init_rwsem(&s->s_umount);
 		sema_init(&s->s_lock, 1);
 		down_write(&s->s_umount);
@@ -569,14 +570,19 @@
 int set_anon_super(struct super_block *s, void *data)
 {
 	int dev;
+	int error;
 
-	spin_lock(&unnamed_dev_lock);
-	if (idr_pre_get(&unnamed_dev_idr, GFP_ATOMIC) == 0) {
-		spin_unlock(&unnamed_dev_lock);
+ retry:
+	if (idr_pre_get(&unnamed_dev_idr, GFP_ATOMIC) == 0)
 		return -ENOMEM;
-	}
-	dev = idr_get_new(&unnamed_dev_idr, NULL);
+	spin_lock(&unnamed_dev_lock);
+	error = idr_get_new(&unnamed_dev_idr, NULL, &dev);
 	spin_unlock(&unnamed_dev_lock);
+	if (error == -EAGAIN)
+		/* We raced and lost with another CPU. */
+		goto retry;
+	else if (error)
+		return -EAGAIN;
 
 	if ((dev & MAX_ID_MASK) == (1 << MINORBITS)) {
 		spin_lock(&unnamed_dev_lock);
--- diff/fs/sysfs/bin.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/sysfs/bin.c	2004-07-01 21:32:49.000000000 +0100
@@ -17,8 +17,10 @@
 static int
 fill_read(struct dentry *dentry, char *buffer, loff_t off, size_t count)
 {
-	struct bin_attribute * attr = dentry->d_fsdata;
-	struct kobject * kobj = dentry->d_parent->d_fsdata;
+	struct sysfs_dirent * attr_sd = dentry->d_fsdata;
+	struct bin_attribute * attr = attr_sd->s_element;
+	struct sysfs_dirent * kobj_sd = dentry->d_parent->d_fsdata;
+	struct kobject * kobj = kobj_sd->s_element;
 
 	return attr->read(kobj, buffer, off, count);
 }
@@ -60,8 +62,10 @@
 static int
 flush_write(struct dentry *dentry, char *buffer, loff_t offset, size_t count)
 {
-	struct bin_attribute *attr = dentry->d_fsdata;
-	struct kobject *kobj = dentry->d_parent->d_fsdata;
+	struct sysfs_dirent * attr_sd = dentry->d_fsdata;
+	struct bin_attribute * attr = attr_sd->s_element;
+	struct sysfs_dirent * kobj_sd = dentry->d_parent->d_fsdata;
+	struct kobject * kobj = kobj_sd->s_element;
 
 	return attr->write(kobj, buffer, offset, count);
 }
@@ -95,7 +99,8 @@
 static int open(struct inode * inode, struct file * file)
 {
 	struct kobject *kobj = sysfs_get_kobject(file->f_dentry->d_parent);
-	struct bin_attribute * attr = file->f_dentry->d_fsdata;
+	struct sysfs_dirent * attr_sd = file->f_dentry->d_fsdata;
+	struct bin_attribute * attr = attr_sd->s_element;
 	int error = -EINVAL;
 
 	if (!kobj || !attr)
@@ -130,8 +135,10 @@
 
 static int release(struct inode * inode, struct file * file)
 {
-	struct kobject * kobj = file->f_dentry->d_parent->d_fsdata;
-	struct bin_attribute * attr = file->f_dentry->d_fsdata;
+	struct sysfs_dirent * sd = file->f_dentry->d_parent->d_fsdata;
+	struct kobject * kobj = sd->s_element;
+	struct sysfs_dirent * attr_sd = file->f_dentry->d_fsdata;
+	struct bin_attribute * attr = attr_sd->s_element;
 	u8 * buffer = file->private_data;
 
 	if (kobj) 
@@ -141,7 +148,7 @@
 	return 0;
 }
 
-static struct file_operations bin_fops = {
+struct file_operations bin_fops = {
 	.read		= read,
 	.write		= write,
 	.llseek		= generic_file_llseek,
@@ -158,31 +165,10 @@
 
 int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr)
 {
-	struct dentry * dentry;
-	struct dentry * parent;
-	int error = 0;
-
-	if (!kobj || !attr)
-		return -EINVAL;
-
-	parent = kobj->dentry;
-
-	down(&parent->d_inode->i_sem);
-	dentry = sysfs_get_dentry(parent,attr->attr.name);
-	if (!IS_ERR(dentry)) {
-		dentry->d_fsdata = (void *)attr;
-		error = sysfs_create(dentry,
-				     (attr->attr.mode & S_IALLUGO) | S_IFREG,
-				     NULL);
-		if (!error) {
-			dentry->d_inode->i_size = attr->size;
-			dentry->d_inode->i_fop = &bin_fops;
-		}
-		dput(dentry);
-	} else
-		error = PTR_ERR(dentry);
-	up(&parent->d_inode->i_sem);
-	return error;
+	if (kobj && kobj->dentry && attr)
+		return sysfs_add_file(kobj->dentry, &attr->attr,
+					SYSFS_KOBJ_BIN_ATTR);
+	return -EINVAL;
 }
 
 
--- diff/fs/sysfs/dir.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/sysfs/dir.c	2004-07-01 21:32:49.000000000 +0100
@@ -12,31 +12,181 @@
 
 DECLARE_RWSEM(sysfs_rename_sem);
 
+struct inode_operations sysfs_dir_inode_operations = {
+	.lookup		= sysfs_lookup,
+};
+
+struct file_operations sysfs_dir_operations = {
+	.open		= sysfs_dir_open,
+	.release	= sysfs_dir_close,
+	.llseek		= sysfs_dir_lseek,
+	.read		= generic_read_dir,
+	.readdir	= sysfs_readdir,
+};
+
+static void sysfs_d_iput(struct dentry * dentry, struct inode * inode)
+{
+	struct sysfs_dirent * sd = dentry->d_fsdata;
+
+	if (sd) {
+		BUG_ON(sd->s_dentry != dentry);
+		sd->s_dentry = NULL;
+		sysfs_put(sd);
+	}
+	iput(inode);
+}
+
+static struct dentry_operations sysfs_dentry_ops = {
+	.d_iput		= sysfs_d_iput,
+};
+
+const unsigned char * sysfs_get_name(struct sysfs_dirent *sd)
+{
+	struct attribute * attr;
+	struct bin_attribute * bin_attr;
+	struct sysfs_symlink  * sl;
+
+	if (!sd || !sd->s_element)
+		BUG();
+
+	switch (sd->s_type) {
+		case SYSFS_KOBJECT:
+		case SYSFS_KOBJ_ATTR_GROUP:
+			/* Always have a dentry so use that */
+			return sd->s_dentry->d_name.name;
+
+		case SYSFS_KOBJ_ATTR:
+			attr = sd->s_element;
+			return attr->name;
+
+		case SYSFS_KOBJ_BIN_ATTR:
+			bin_attr = sd->s_element;
+			return bin_attr->attr.name;
+
+		case SYSFS_KOBJ_LINK:
+			sl = sd->s_element;
+			return sl->link_name;
+	}
+	return NULL;
+}
+
+static int init_file(struct inode * inode)
+{
+	inode->i_size = PAGE_SIZE;
+	inode->i_fop = &sysfs_file_operations;
+	return 0;
+}
+
 static int init_dir(struct inode * inode)
 {
-	inode->i_op = &simple_dir_inode_operations;
-	inode->i_fop = &simple_dir_operations;
+	inode->i_op = &sysfs_dir_inode_operations;
+	inode->i_fop = &sysfs_dir_operations;
 
 	/* directory inodes start off with i_nlink == 2 (for "." entry) */
 	inode->i_nlink++;
 	return 0;
 }
 
+/* attaches attribute's sysfs_dirent to the dentry corresponding to the
+ * attribute file
+ */
+static int sysfs_attach_attr(struct sysfs_dirent * sd, struct dentry * dentry)
+{
+	struct attribute * attr = NULL;
+	struct bin_attribute * bin_attr = NULL;
+        int (* init) (struct inode *) = NULL;
+	int error = 0;
+
+        if (sd->s_type & SYSFS_KOBJ_BIN_ATTR) {
+                bin_attr = sd->s_element;
+                attr = &bin_attr->attr;
+        } else {
+                attr = sd->s_element;
+                init = init_file;
+        }
+
+	error = sysfs_create(dentry, (attr->mode & S_IALLUGO) | S_IFREG, init);
+	if (error)
+		return error;
+
+        if (bin_attr) {
+		dentry->d_inode->i_size = bin_attr->size;
+		dentry->d_inode->i_fop = &bin_fops;
+	}
+	dentry->d_op = &sysfs_dentry_ops;
+	dentry->d_fsdata = sysfs_get(sd);
+	sd->s_dentry = dentry;
+	d_rehash(dentry);
+
+	return 0;
+}
+
+static int sysfs_attach_link(struct sysfs_dirent * sd, struct dentry * dentry)
+{
+	int err = 0;
+
+	err = sysfs_create(dentry, S_IFLNK|S_IRWXUGO, init_symlink);
+	if (!err) {
+		dentry->d_op = &sysfs_dentry_ops;
+		dentry->d_fsdata = sysfs_get(sd);
+		sd->s_dentry = dentry;
+		d_rehash(dentry);
+	}
+	return err;
+}
+
+struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
+				struct nameidata *nd)
+{
+	struct sysfs_dirent * parent_sd = dentry->d_parent->d_fsdata;
+	struct sysfs_dirent * sd;
+	int err = 0;
+
+	list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
+		if (sd->s_type & SYSFS_NOT_PINNED) {
+			const unsigned char * name = sysfs_get_name(sd);
+
+			if (strcmp(name, dentry->d_name.name))
+				continue;
+
+			if (sd->s_type & SYSFS_KOBJ_LINK)
+				err = sysfs_attach_link(sd, dentry);
+			else
+				err = sysfs_attach_attr(sd, dentry);
+			break;
+		}
+	}
+
+	return ERR_PTR(err);
+}
 
 static int create_dir(struct kobject * k, struct dentry * p,
 		      const char * n, struct dentry ** d)
 {
 	int error;
+	umode_t mode = S_IFDIR| S_IRWXU | S_IRUGO | S_IXUGO;
 
 	down(&p->d_inode->i_sem);
 	*d = sysfs_get_dentry(p,n);
 	if (!IS_ERR(*d)) {
-		error = sysfs_create(*d,
-					 S_IFDIR| S_IRWXU | S_IRUGO | S_IXUGO,
-					 init_dir);
+		error = sysfs_create(*d, mode, init_dir);
 		if (!error) {
-			(*d)->d_fsdata = k;
-			p->d_inode->i_nlink++;
+			struct sysfs_dirent * sd, * parent_sd;
+			parent_sd = p->d_fsdata;
+			sd = sysfs_new_dirent(parent_sd, k,
+						(parent_sd->s_element == k) ?
+						SYSFS_KOBJ_ATTR_GROUP :
+						SYSFS_KOBJECT);
+			if (sd) {
+				(*d)->d_fsdata = sysfs_get(sd);
+				(*d)->d_op = &sysfs_dentry_ops;
+				p->d_inode->i_nlink++;
+				sd->s_element = k;
+				sd->s_dentry = *d;
+				sd->s_mode = mode;
+				d_rehash(*d);
+			} else
+				error = -ENOMEM;
 		}
 		dput(*d);
 	} else
@@ -45,7 +195,6 @@
 	return error;
 }
 
-
 int sysfs_create_subdir(struct kobject * k, const char * n, struct dentry ** d)
 {
 	return create_dir(k,k->dentry,n,d);
@@ -79,12 +228,16 @@
 	return error;
 }
 
-
 static void remove_dir(struct dentry * d)
 {
 	struct dentry * parent = dget(d->d_parent);
+	struct sysfs_dirent * sd;
+
 	down(&parent->d_inode->i_sem);
 	d_delete(d);
+	sd = d->d_fsdata;
+ 	list_del_init(&sd->s_sibling);
+ 	sysfs_put(d->d_fsdata);
 	if (d->d_inode)
 		simple_rmdir(parent->d_inode,d);
 
@@ -106,14 +259,14 @@
  *	@kobj:	object. 
  *
  *	The only thing special about this is that we remove any files in 
- *	the directory before we remove the directory, and we've inlined
- *	what used to be sysfs_rmdir() below, instead of calling separately.
+ *	the directory before we remove the directory
  */
 
 void sysfs_remove_dir(struct kobject * kobj)
 {
-	struct list_head * node;
 	struct dentry * dentry = dget(kobj->dentry);
+	struct sysfs_dirent * parent_sd = dentry->d_fsdata;
+	struct sysfs_dirent * sd, * tmp;
 
 	if (!dentry)
 		return;
@@ -121,38 +274,13 @@
 	pr_debug("sysfs %s: removing dir\n",dentry->d_name.name);
 	down(&dentry->d_inode->i_sem);
 
-	spin_lock(&dcache_lock);
-restart:
-	node = dentry->d_subdirs.next;
-	while (node != &dentry->d_subdirs) {
-		struct dentry * d = list_entry(node,struct dentry,d_child);
-
-		node = node->next;
-		pr_debug(" o %s (%d): ",d->d_name.name,atomic_read(&d->d_count));
-		if (!d_unhashed(d) && (d->d_inode)) {
-			d = dget_locked(d);
-			pr_debug("removing");
-
-			/**
-			 * Unlink and unhash.
-			 */
-			__d_drop(d);
-			spin_unlock(&dcache_lock);
-			/* release the target kobject in case of 
-			 * a symlink
-			 */
-			if (S_ISLNK(d->d_inode->i_mode))
-				kobject_put(d->d_fsdata);
-			
-			simple_unlink(dentry->d_inode,d);
-			dput(d);
-			pr_debug(" done\n");
-			spin_lock(&dcache_lock);
-			/* re-acquired dcache_lock, need to restart */
-			goto restart;
-		}
-	}
-	spin_unlock(&dcache_lock);
+	list_for_each_entry_safe(sd, tmp, &parent_sd->s_children, s_sibling) {
+		if (!sd->s_element)
+			continue;
+		list_del_init(&sd->s_sibling);
+		sysfs_drop_dentry(sd, dentry);
+		sysfs_put(sd);
+  	}
 	up(&dentry->d_inode->i_sem);
 
 	remove_dir(dentry);
@@ -182,8 +310,10 @@
 	if (!IS_ERR(new_dentry)) {
   		if (!new_dentry->d_inode) {
 			error = kobject_set_name(kobj,new_name);
-			if (!error)
+			if (!error) {
+				d_add(new_dentry, NULL);
 				d_move(kobj->dentry, new_dentry);
+			}
 		}
 		dput(new_dentry);
 	}
@@ -193,6 +323,137 @@
 	return error;
 }
 
+int sysfs_dir_open(struct inode *inode, struct file *file)
+{
+	struct dentry * dentry = file->f_dentry;
+	struct sysfs_dirent * parent_sd = dentry->d_fsdata;
+
+	down(&dentry->d_inode->i_sem);
+	file->private_data = sysfs_new_dirent(parent_sd, NULL, 0);
+	up(&dentry->d_inode->i_sem);
+
+	return file->private_data ? 0 : -ENOMEM;
+
+}
+
+int sysfs_dir_close(struct inode *inode, struct file *file)
+{
+	struct dentry * dentry = file->f_dentry;
+	struct sysfs_dirent * cursor = file->private_data;
+
+	down(&dentry->d_inode->i_sem);
+	list_del_init(&cursor->s_sibling);
+	up(&dentry->d_inode->i_sem);
+	sysfs_put(file->private_data);
+
+	return 0;
+}
+
+/* Relationship between s_mode and the DT_xxx types */
+static inline unsigned char dt_type(struct sysfs_dirent *sd)
+{
+	return (sd->s_mode >> 12) & 15;
+}
+
+int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)
+{
+	struct dentry *dentry = filp->f_dentry;
+	struct sysfs_dirent * parent_sd = dentry->d_fsdata;
+	struct sysfs_dirent *cursor = filp->private_data;
+	struct list_head *p, *q = &cursor->s_sibling;
+	ino_t ino;
+	int i = filp->f_pos;
+
+	switch (i) {
+		case 0:
+			ino = dentry->d_inode->i_ino;
+			if (filldir(dirent, ".", 1, i, ino, DT_DIR) < 0)
+				break;
+			filp->f_pos++;
+			i++;
+			/* fallthrough */
+		case 1:
+			ino = parent_ino(dentry);
+			if (filldir(dirent, "..", 2, i, ino, DT_DIR) < 0)
+				break;
+			filp->f_pos++;
+			i++;
+			/* fallthrough */
+		default:
+			if (filp->f_pos == 2) {
+				list_del(q);
+				list_add(q, &parent_sd->s_children);
+			}
+			for (p=q->next; p!= &parent_sd->s_children; p=p->next) {
+				struct sysfs_dirent *next;
+				const char * name;
+				int len;
+
+				next = list_entry(p, struct sysfs_dirent,
+						   s_sibling);
+				if (!next->s_element)
+					continue;
+
+				name = sysfs_get_name(next);
+				len = strlen(name);
+				if (next->s_dentry)
+					ino = next->s_dentry->d_inode->i_ino;
+				else
+					ino = iunique(sysfs_sb, 2);
+
+				if (filldir(dirent, name, len, filp->f_pos, ino,
+						 dt_type(next)) < 0)
+					return 0;
+
+				list_del(q);
+				list_add(q, p);
+				p = q;
+				filp->f_pos++;
+			}
+	}
+	return 0;
+}
+
+loff_t sysfs_dir_lseek(struct file * file, loff_t offset, int origin)
+{
+	struct dentry * dentry = file->f_dentry;
+
+	down(&dentry->d_inode->i_sem);
+	switch (origin) {
+		case 1:
+			offset += file->f_pos;
+		case 0:
+			if (offset >= 0)
+				break;
+		default:
+			up(&file->f_dentry->d_inode->i_sem);
+			return -EINVAL;
+	}
+	if (offset != file->f_pos) {
+		file->f_pos = offset;
+		if (file->f_pos >= 2) {
+			struct sysfs_dirent *sd = dentry->d_fsdata;
+			struct sysfs_dirent *cursor = file->private_data;
+			struct list_head *p;
+			loff_t n = file->f_pos - 2;
+
+			list_del(&cursor->s_sibling);
+			p = sd->s_children.next;
+			while (n && p != &sd->s_children) {
+				struct sysfs_dirent *next;
+				next = list_entry(p, struct sysfs_dirent,
+						   s_sibling);
+				if (next->s_element)
+					n--;
+				p = p->next;
+			}
+			list_add_tail(&cursor->s_sibling, p);
+		}
+	}
+	up(&dentry->d_inode->i_sem);
+	return offset;
+}
+
 EXPORT_SYMBOL(sysfs_create_dir);
 EXPORT_SYMBOL(sysfs_remove_dir);
 EXPORT_SYMBOL(sysfs_rename_dir);
--- diff/fs/sysfs/file.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/sysfs/file.c	2004-07-01 21:32:49.000000000 +0100
@@ -9,14 +9,6 @@
 
 #include "sysfs.h"
 
-static struct file_operations sysfs_file_operations;
-
-static int init_file(struct inode * inode)
-{
-	inode->i_size = PAGE_SIZE;
-	inode->i_fop = &sysfs_file_operations;
-	return 0;
-}
 
 #define to_subsys(k) container_of(k,struct subsystem,kset.kobj)
 #define to_sattr(a) container_of(a,struct subsys_attribute,attr)
@@ -77,8 +69,10 @@
  */
 static int fill_read_buffer(struct file * file, struct sysfs_buffer * buffer)
 {
-	struct attribute * attr = file->f_dentry->d_fsdata;
-	struct kobject * kobj = file->f_dentry->d_parent->d_fsdata;
+	struct sysfs_dirent * attr_sd = file->f_dentry->d_fsdata;
+	struct attribute * attr = attr_sd->s_element;
+	struct sysfs_dirent * kobj_sd = file->f_dentry->d_parent->d_fsdata;
+	struct kobject * kobj = kobj_sd->s_element;
 	struct sysfs_ops * ops = buffer->ops;
 	int ret = 0;
 	ssize_t count;
@@ -89,7 +83,7 @@
 		return -ENOMEM;
 
 	count = ops->show(kobj,attr,buffer->page);
-	BUG_ON(count > PAGE_SIZE);
+	BUG_ON(count > (ssize_t)PAGE_SIZE);
 	if (count >= 0)
 		buffer->count = count;
 	else
@@ -135,6 +129,9 @@
  *	is in the file's ->d_fsdata. The target object is in the directory's
  *	->d_fsdata.
  *
+ *	It is safe to use ->d_parent->d_fsdata as both dentry and the kobject
+ *	are pinned in ->open().
+ *
  *	We call fill_read_buffer() to allocate and fill the buffer from the
  *	object's show() method exactly once (if the read is happening from
  *	the beginning of the file). That should fill the entire buffer with
@@ -199,8 +196,10 @@
 static int 
 flush_write_buffer(struct file * file, struct sysfs_buffer * buffer, size_t count)
 {
-	struct attribute * attr = file->f_dentry->d_fsdata;
-	struct kobject * kobj = file->f_dentry->d_parent->d_fsdata;
+	struct sysfs_dirent * attr_sd = file->f_dentry->d_fsdata;
+	struct attribute * attr = attr_sd->s_element;
+	struct sysfs_dirent * kobj_sd = file->f_dentry->d_parent->d_fsdata;
+	struct kobject * kobj = kobj_sd->s_element;
 	struct sysfs_ops * ops = buffer->ops;
 
 	return ops->store(kobj,attr,buffer->page,count);
@@ -240,7 +239,8 @@
 static int check_perm(struct inode * inode, struct file * file)
 {
 	struct kobject *kobj = sysfs_get_kobject(file->f_dentry->d_parent);
-	struct attribute * attr = file->f_dentry->d_fsdata;
+	struct sysfs_dirent * attr_sd = file->f_dentry->d_fsdata;
+	struct attribute * attr = attr_sd->s_element;
 	struct sysfs_buffer * buffer;
 	struct sysfs_ops * ops = NULL;
 	int error = 0;
@@ -321,8 +321,10 @@
 
 static int sysfs_release(struct inode * inode, struct file * filp)
 {
-	struct kobject * kobj = filp->f_dentry->d_parent->d_fsdata;
-	struct attribute * attr = filp->f_dentry->d_fsdata;
+	struct sysfs_dirent * attr_sd = filp->f_dentry->d_fsdata;
+	struct attribute * attr = attr_sd->s_element;
+	struct sysfs_dirent * kobj_sd = filp->f_dentry->d_parent->d_fsdata;
+	struct kobject * kobj = kobj_sd->s_element;
 	struct sysfs_buffer * buffer = filp->private_data;
 
 	if (kobj) 
@@ -337,7 +339,7 @@
 	return 0;
 }
 
-static struct file_operations sysfs_file_operations = {
+struct file_operations sysfs_file_operations = {
 	.read		= sysfs_read_file,
 	.write		= sysfs_write_file,
 	.llseek		= generic_file_llseek,
@@ -346,23 +348,20 @@
 };
 
 
-int sysfs_add_file(struct dentry * dir, const struct attribute * attr)
+int sysfs_add_file(struct dentry * parent, const struct attribute * attr, int t)
 {
-	struct dentry * dentry;
-	int error;
+	struct sysfs_dirent * sd;
+	struct sysfs_dirent * parent_sd = parent->d_fsdata;
+	int error = 0;
+
+	down(&parent->d_inode->i_sem);
+	sd = sysfs_new_dirent(parent_sd, (void *) attr, t);
+	if (!sd)
+		error =  -ENOMEM;
+	else
+		sd->s_mode =  (attr->mode & S_IALLUGO) | S_IFREG ;
+	up(&parent->d_inode->i_sem);
 
-	down(&dir->d_inode->i_sem);
-	dentry = sysfs_get_dentry(dir,attr->name);
-	if (!IS_ERR(dentry)) {
-		error = sysfs_create(dentry,
-				     (attr->mode & S_IALLUGO) | S_IFREG,
-				     init_file);
-		if (!error)
-			dentry->d_fsdata = (void *)attr;
-		dput(dentry);
-	} else
-		error = PTR_ERR(dentry);
-	up(&dir->d_inode->i_sem);
 	return error;
 }
 
@@ -375,8 +374,8 @@
 
 int sysfs_create_file(struct kobject * kobj, const struct attribute * attr)
 {
-	if (kobj && attr)
-		return sysfs_add_file(kobj->dentry,attr);
+	if (kobj && kobj->dentry && attr)
+		return sysfs_add_file(kobj->dentry, attr, SYSFS_KOBJ_ATTR);
 	return -EINVAL;
 }
 
--- diff/fs/sysfs/group.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/sysfs/group.c	2004-07-01 21:32:49.000000000 +0100
@@ -10,7 +10,7 @@
 
 #include <linux/kobject.h>
 #include <linux/module.h>
-#include <linux/dcache.h>
+#include <linux/fs.h>
 #include <linux/err.h>
 #include "sysfs.h"
 
@@ -31,7 +31,7 @@
 	int error = 0;
 
 	for (attr = grp->attrs; *attr && !error; attr++) {
-		error = sysfs_add_file(dir,*attr);
+		error = sysfs_add_file(dir, *attr, SYSFS_KOBJ_ATTR);
 	}
 	if (error)
 		remove_files(dir,grp);
@@ -70,11 +70,15 @@
 	else
 		dir = dget(kobj->dentry);
 
-	remove_files(dir,grp);
-	if (grp->name)
-		sysfs_remove_subdir(dir);
-	/* release the ref. taken in this routine */
-	dput(dir);
+	if (!IS_ERR(dir)) {
+		if (dir && dir->d_inode) {
+			remove_files(dir,grp);
+			if (grp->name)
+				sysfs_remove_subdir(dir);
+			/* release the ref. taken in this routine */
+			dput(dir);
+		}
+	}
 }
 
 
--- diff/fs/sysfs/inode.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/sysfs/inode.c	2004-07-01 21:32:49.000000000 +0100
@@ -11,6 +11,8 @@
 #include <linux/pagemap.h>
 #include <linux/namei.h>
 #include <linux/backing-dev.h>
+#include "sysfs.h"
+
 extern struct super_block * sysfs_sb;
 
 static struct address_space_operations sysfs_aops = {
@@ -46,8 +48,13 @@
 	struct inode * inode = NULL;
 	if (dentry) {
 		if (!dentry->d_inode) {
-			if ((inode = sysfs_new_inode(mode)))
+			if ((inode = sysfs_new_inode(mode))) {
+				if (dentry->d_parent && dentry->d_parent->d_inode) {
+					struct inode *p_inode = dentry->d_parent->d_inode;
+					p_inode->i_mtime = p_inode->i_ctime = CURRENT_TIME;
+				}
 				goto Proceed;
+			}
 			else 
 				error = -ENOMEM;
 		} else
@@ -61,7 +68,8 @@
 		error = init(inode);
 	if (!error) {
 		d_instantiate(dentry, inode);
-		dget(dentry); /* Extra count - pin the dentry in core */
+		if (S_ISDIR(mode))
+			dget(dentry);  /* pin only directory dentry in core */
 	} else
 		iput(inode);
  Done:
@@ -83,31 +91,51 @@
 	return lookup_hash(&qstr,parent);
 }
 
+static struct sysfs_dirent * sysfs_find_dirent(struct sysfs_dirent * parent_sd,
+					  const char * name)
+{
+	struct sysfs_dirent *sd;
+
+	list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
+			if (sd->s_element) {
+				if (!strcmp(sysfs_get_name(sd), name))
+					return sd;
+			}
+	}
+	return NULL;
+}
+
+/* Unhashes the dentry corresponding to given sysfs_dirent
+ * Called with parent inode's i_sem held.
+ */
+void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
+{
+	struct dentry * dentry = sd->s_dentry;
+
+	if (dentry) {
+		spin_lock(&dcache_lock);
+		dget_locked(dentry);
+		if (!(d_unhashed(dentry) && dentry->d_inode)) {
+			__d_drop(dentry);
+			spin_unlock(&dcache_lock);
+			simple_unlink(parent->d_inode, dentry);
+		} else {
+			spin_unlock(&dcache_lock);
+			dput(dentry);
+		}
+	}
+}
+
 void sysfs_hash_and_remove(struct dentry * dir, const char * name)
 {
-	struct dentry * victim;
+	struct sysfs_dirent * sd;
 
 	down(&dir->d_inode->i_sem);
-	victim = sysfs_get_dentry(dir,name);
-	if (!IS_ERR(victim)) {
-		/* make sure dentry is really there */
-		if (victim->d_inode && 
-		    (victim->d_parent->d_inode == dir->d_inode)) {
-			pr_debug("sysfs: Removing %s (%d)\n", victim->d_name.name,
-				 atomic_read(&victim->d_count));
-
-			d_drop(victim);
-			/* release the target kobject in case of 
-			 * a symlink
-			 */
-			if (S_ISLNK(victim->d_inode->i_mode))
-				kobject_put(victim->d_fsdata);
-			simple_unlink(dir->d_inode,victim);
-		}
-		/*
-		 * Drop reference from sysfs_get_dentry() above.
-		 */
-		dput(victim);
+	sd = sysfs_find_dirent(dir->d_fsdata, name);
+	if (sd) {
+		list_del_init(&sd->s_sibling);
+		sysfs_drop_dentry(sd, dir);
+		sysfs_put(sd);
 	}
 	up(&dir->d_inode->i_sem);
 }
--- diff/fs/sysfs/mount.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/sysfs/mount.c	2004-07-01 21:32:49.000000000 +0100
@@ -22,6 +22,13 @@
 	.drop_inode	= generic_delete_inode,
 };
 
+struct sysfs_dirent sysfs_root = {
+	.s_sibling	= LIST_HEAD_INIT(sysfs_root.s_sibling),
+	.s_children	= LIST_HEAD_INIT(sysfs_root.s_children),
+	.s_element	= NULL,
+	.s_type		= SYSFS_ROOT,
+};
+
 static int sysfs_fill_super(struct super_block *sb, void *data, int silent)
 {
 	struct inode *inode;
@@ -35,8 +42,8 @@
 
 	inode = sysfs_new_inode(S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO);
 	if (inode) {
-		inode->i_op = &simple_dir_inode_operations;
-		inode->i_fop = &simple_dir_operations;
+		inode->i_op = &sysfs_dir_inode_operations;
+		inode->i_fop = &sysfs_dir_operations;
 		/* directory inodes start off with i_nlink == 2 (for "." entry) */
 		inode->i_nlink++;	
 	} else {
@@ -50,6 +57,7 @@
 		iput(inode);
 		return -ENOMEM;
 	}
+	root->d_fsdata = &sysfs_root;
 	sb->s_root = root;
 	return 0;
 }
--- diff/fs/sysfs/symlink.c	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/sysfs/symlink.c	2004-07-01 21:32:49.000000000 +0100
@@ -13,7 +13,7 @@
 	.follow_link = sysfs_follow_link,
 };
 
-static int init_symlink(struct inode * inode)
+int init_symlink(struct inode * inode)
 {
 	inode->i_op = &sysfs_symlink_inode_operations;
 	return 0;
@@ -53,6 +53,30 @@
 	}
 }
 
+static int sysfs_add_link(struct sysfs_dirent * parent_sd, char * name,
+			    struct kobject * target)
+{
+	struct sysfs_dirent * sd;
+	struct sysfs_symlink * sl;
+
+	sl = kmalloc(sizeof(*sl), GFP_KERNEL);
+	if (!sl)
+		return -ENOMEM;
+
+	sl->link_name = kmalloc(strlen(name) + 1, GFP_KERNEL);
+	strcpy(sl->link_name, name);
+	sl->target_kobj = kobject_get(target);
+
+	sd = sysfs_new_dirent(parent_sd, sl, SYSFS_KOBJ_LINK);
+	if (sd) {
+		sd->s_mode = S_IFLNK|S_IRWXUGO;
+		return 0;
+	}
+
+	kfree(sl);
+	return -ENOMEM;
+}
+
 /**
  *	sysfs_create_link - create symlink between two objects.
  *	@kobj:	object whose directory we're creating the link in.
@@ -62,21 +86,13 @@
 int sysfs_create_link(struct kobject * kobj, struct kobject * target, char * name)
 {
 	struct dentry * dentry = kobj->dentry;
-	struct dentry * d;
 	int error = 0;
 
+	if (!name)
+		return -EINVAL;
+
 	down(&dentry->d_inode->i_sem);
-	d = sysfs_get_dentry(dentry,name);
-	if (!IS_ERR(d)) {
-		error = sysfs_create(d, S_IFLNK|S_IRWXUGO, init_symlink);
-		if (!error)
-			/* 
-			 * associate the link dentry with the target kobject 
-			 */
-			d->d_fsdata = kobject_get(target);
-		dput(d);
-	} else 
-		error = PTR_ERR(d);
+	error = sysfs_add_link(dentry->d_fsdata, name, target);
 	up(&dentry->d_inode->i_sem);
 	return error;
 }
--- diff/fs/sysfs/sysfs.h	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/sysfs/sysfs.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,28 +1,96 @@
 
+#include <linux/fs.h>
 extern struct vfsmount * sysfs_mount;
+extern struct super_block * sysfs_sb;
 
 extern struct inode * sysfs_new_inode(mode_t mode);
 extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *));
 
 extern struct dentry * sysfs_get_dentry(struct dentry *, const char *);
+extern int sysfs_add_file(struct dentry *, const struct attribute *, int);
 
-extern int sysfs_add_file(struct dentry * dir, const struct attribute * attr);
 extern void sysfs_hash_and_remove(struct dentry * dir, const char * name);
 
 extern int sysfs_create_subdir(struct kobject *, const char *, struct dentry **);
 extern void sysfs_remove_subdir(struct dentry *);
+extern int sysfs_dir_open(struct inode *inode, struct file *file);
+extern int sysfs_dir_close(struct inode *inode, struct file *file);
+extern loff_t sysfs_dir_lseek(struct file *, loff_t, int);
+extern int sysfs_readdir(struct file *, void *, filldir_t);
+extern void sysfs_umount_begin(struct super_block *);
+extern const unsigned char * sysfs_get_name(struct sysfs_dirent *);
+extern struct dentry * sysfs_lookup(struct inode *, struct dentry *, struct nameidata *);
+extern void sysfs_drop_dentry(struct sysfs_dirent *, struct dentry *);
+extern int sysfs_symlink(struct inode *, struct dentry *, const char *);
+extern int init_symlink(struct inode *);
 
 extern int sysfs_readlink(struct dentry *, char __user *, int );
 extern int sysfs_follow_link(struct dentry *, struct nameidata *);
 extern struct rw_semaphore sysfs_rename_sem;
+extern struct file_operations sysfs_file_operations;
+extern struct file_operations bin_fops;
+extern struct inode_operations sysfs_dir_inode_operations;
+extern struct file_operations sysfs_dir_operations;
+
+struct sysfs_symlink {
+	char * link_name;
+	struct kobject * target_kobj;
+};
+
+static inline
+struct sysfs_dirent * sysfs_new_dirent(struct sysfs_dirent * p, void * e, int t)
+{
+	struct sysfs_dirent * sd;
+
+	sd = kmalloc(sizeof(*sd), GFP_KERNEL);
+	if (!sd)
+		return NULL;
+	memset(sd, 0, sizeof(*sd));
+	atomic_set(&sd->s_count, 1);
+	sd->s_element = e;
+	sd->s_type = t;
+	sd->s_dentry = NULL;
+	INIT_LIST_HEAD(&sd->s_children);
+	list_add(&sd->s_sibling, &p->s_children);
+
+	return sd;
+}
+
+static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd)
+{
+	if (sd) {
+		WARN_ON(!atomic_read(&sd->s_count));
+		atomic_inc(&sd->s_count);
+	}
+	return sd;
+}
+
+static inline void sysfs_put(struct sysfs_dirent * sd)
+{
+	if (atomic_dec_and_test(&sd->s_count)) {
+		if (sd->s_type & SYSFS_KOBJ_LINK) {
+			struct sysfs_symlink * sl = sd->s_element;
+			kfree(sl->link_name);
+			kobject_put(sl->target_kobj);
+			kfree(sl);
+		}
+		kfree(sd);
+	}
+}
 
 static inline struct kobject *sysfs_get_kobject(struct dentry *dentry)
 {
 	struct kobject * kobj = NULL;
 
 	spin_lock(&dcache_lock);
-	if (!d_unhashed(dentry))
-		kobj = kobject_get(dentry->d_fsdata);
+	if (!d_unhashed(dentry)) {
+		struct sysfs_dirent * sd = dentry->d_fsdata;
+		if (sd->s_type & SYSFS_KOBJ_LINK) {
+			struct sysfs_symlink * sl = sd->s_element;
+			kobj = kobject_get(sl->target_kobj);
+		} else
+			kobj = kobject_get(sd->s_element);
+	}
 	spin_unlock(&dcache_lock);
 
 	return kobj;
--- diff/fs/sysv/inode.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/sysv/inode.c	2004-07-01 21:32:49.000000000 +0100
@@ -142,8 +142,9 @@
 }
 
 static struct inode_operations sysv_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.getattr	= sysv_getattr,
 };
 
--- diff/fs/sysv/symlink.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/sysv/symlink.c	2004-07-01 21:32:49.000000000 +0100
@@ -6,20 +6,15 @@
  */
 
 #include "sysv.h"
-
-static int sysv_readlink(struct dentry *dentry, char *buffer, int buflen)
-{
-	char *s = (char *)SYSV_I(dentry->d_inode)->i_data;
-	return vfs_readlink(dentry, buffer, buflen, s);
-}
+#include <linux/namei.h>
 
 static int sysv_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
-	char *s = (char *)SYSV_I(dentry->d_inode)->i_data;
-	return vfs_follow_link(nd, s);
+	nd_set_link(nd, (char *)SYSV_I(dentry->d_inode)->i_data);
+	return 0;
 }
 
 struct inode_operations sysv_fast_symlink_inode_operations = {
-	.readlink	= sysv_readlink,
+	.readlink	= generic_readlink,
 	.follow_link	= sysv_follow_link,
 };
--- diff/fs/udf/crc.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/udf/crc.c	2004-07-01 21:32:49.000000000 +0100
@@ -84,7 +84,7 @@
  *	July 21, 1997 - Andrew E. Mileski
  *	Adapted from OSTA-UDF(tm) 1.50 standard.
  */
-extern uint16_t
+uint16_t
 udf_crc(uint8_t *data, uint32_t size, uint16_t crc)
 {
 	while (size--)
--- diff/fs/udf/misc.c	2004-05-19 22:12:32.000000000 +0100
+++ source/fs/udf/misc.c	2004-07-01 21:32:49.000000000 +0100
@@ -34,7 +34,7 @@
 #include "udf_i.h"
 #include "udf_sb.h"
 
-extern struct buffer_head *
+struct buffer_head *
 udf_tgetblk(struct super_block *sb, int block)
 {
 	if (UDF_QUERY_FLAG(sb, UDF_FLAG_VARCONV))
@@ -43,7 +43,7 @@
 		return sb_getblk(sb, block);
 }
 
-extern struct buffer_head *
+struct buffer_head *
 udf_tread(struct super_block *sb, int block)
 {
 	if (UDF_QUERY_FLAG(sb, UDF_FLAG_VARCONV))
@@ -52,7 +52,7 @@
 		return sb_bread(sb, block);
 }
 
-extern struct genericFormat *
+struct genericFormat *
 udf_add_extendedattr(struct inode * inode, uint32_t size, uint32_t type,
 	uint8_t loc)
 {
@@ -157,7 +157,7 @@
 	return NULL;
 }
 
-extern struct genericFormat *
+struct genericFormat *
 udf_get_extendedattr(struct inode *inode, uint32_t type, uint8_t subtype)
 {
 	struct genericFormat *gaf;
@@ -207,7 +207,7 @@
  *	July 1, 1997 - Andrew E. Mileski
  *	Written, tested, and released.
  */
-extern struct buffer_head *
+struct buffer_head *
 udf_read_tagged(struct super_block *sb, uint32_t block, uint32_t location, uint16_t *ident)
 {
 	tag *tag_p;
@@ -272,7 +272,7 @@
 	return NULL;
 }
 
-extern struct buffer_head *
+struct buffer_head *
 udf_read_ptagged(struct super_block *sb, lb_addr loc, uint32_t offset, uint16_t *ident)
 {
 	return udf_read_tagged(sb, udf_get_lb_pblock(sb, loc, offset),
--- diff/fs/ufs/symlink.c	2004-05-19 22:12:32.000000000 +0100
+++ source/fs/ufs/symlink.c	2004-07-01 21:32:49.000000000 +0100
@@ -26,21 +26,17 @@
  */
 
 #include <linux/fs.h>
+#include <linux/namei.h>
 #include <linux/ufs_fs.h>
 
-static int ufs_readlink(struct dentry *dentry, char *buffer, int buflen)
-{
-	struct ufs_inode_info *p = UFS_I(dentry->d_inode);
-	return vfs_readlink(dentry, buffer, buflen, (char*)p->i_u1.i_symlink);
-}
-
 static int ufs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	struct ufs_inode_info *p = UFS_I(dentry->d_inode);
-	return vfs_follow_link(nd, (char*)p->i_u1.i_symlink);
+	nd_set_link(nd, (char*)p->i_u1.i_symlink);
+	return 0;
 }
 
 struct inode_operations ufs_fast_symlink_inode_operations = {
-	.readlink	= ufs_readlink,
+	.readlink	= generic_readlink,
 	.follow_link	= ufs_follow_link,
 };
--- diff/fs/xfs/Makefile	2004-06-30 14:25:57.000000000 +0100
+++ source/fs/xfs/Makefile	2004-07-01 21:32:49.000000000 +0100
@@ -126,6 +126,7 @@
 
 # Objects in linux-2.6/
 xfs-y				+= $(addprefix linux-2.6/, \
+				   kmem.o \
 				   xfs_aops.o \
 				   xfs_buf.o \
 				   xfs_file.o \
--- diff/fs/xfs/linux-2.6/kmem.h	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/linux-2.6/kmem.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -32,32 +32,34 @@
 #ifndef __XFS_SUPPORT_KMEM_H__
 #define __XFS_SUPPORT_KMEM_H__
 
-#include <linux/mm.h>
-#include <linux/highmem.h>
 #include <linux/slab.h>
-#include <linux/vmalloc.h>
-
-/*
- * Cutoff point to use vmalloc instead of kmalloc.
- */
-#define MAX_SLAB_SIZE	0x20000
+#include <linux/sched.h>
+#include <linux/mm.h>
 
 /*
- * XFS uses slightly different names for these due to the
- * IRIX heritage.
+ * memory management routines
  */
-#define	kmem_zone	kmem_cache_s
-#define kmem_zone_t	kmem_cache_t
-
 #define KM_SLEEP	0x0001
 #define KM_NOSLEEP	0x0002
 #define KM_NOFS		0x0004
-#define KM_MAYFAIL	0x0005
+#define KM_MAYFAIL	0x0008
+
+#define	kmem_zone	kmem_cache_s
+#define kmem_zone_t	kmem_cache_t
 
 typedef unsigned long xfs_pflags_t;
 
+#define PFLAGS_TEST_NOIO()              (current->flags & PF_NOIO)
 #define PFLAGS_TEST_FSTRANS()           (current->flags & PF_FSTRANS)
 
+#define PFLAGS_SET_NOIO() do {		\
+	current->flags |= PF_NOIO;	\
+} while (0)
+
+#define PFLAGS_CLEAR_NOIO() do {	\
+	current->flags &= ~PF_NOIO;	\
+} while (0)
+
 /* these could be nested, so we save state */
 #define PFLAGS_SET_FSTRANS(STATEP) do {	\
 	*(STATEP) = current->flags;	\
@@ -79,12 +81,11 @@
 	*(NSTATEP) = *(OSTATEP);	\
 } while (0)
 
-static __inline unsigned int
-kmem_flags_convert(int flags)
+static __inline unsigned int kmem_flags_convert(int flags)
 {
 	int lflags;
 
-#if DEBUG
+#ifdef DEBUG
 	if (unlikely(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL))) {
 		printk(KERN_WARNING
 		    "XFS: memory allocation with wrong flags (%x)\n", flags);
@@ -100,54 +101,9 @@
 		/* avoid recusive callbacks to filesystem during transactions */
 		if (PFLAGS_TEST_FSTRANS() || (flags & KM_NOFS))
 			lflags &= ~__GFP_FS;
-
-		if (!(flags & KM_MAYFAIL))
-			lflags |= __GFP_NOFAIL;
-	}
-
-	return lflags;
-}
-
-static __inline void *
-kmem_alloc(size_t size, int flags)
-{
-	if (unlikely(MAX_SLAB_SIZE < size))
-		/* Avoid doing filesystem sensitive stuff to get this */
-		return __vmalloc(size, kmem_flags_convert(flags), PAGE_KERNEL);
-	return kmalloc(size, kmem_flags_convert(flags));
-}
-
-static __inline void *
-kmem_zalloc(size_t size, int flags)
-{
-	void *ptr = kmem_alloc(size, flags);
-	if (likely(ptr != NULL))
-		memset(ptr, 0, size);
-	return ptr;
-}
-
-static __inline void
-kmem_free(void *ptr, size_t size)
-{
-	if (unlikely((unsigned long)ptr < VMALLOC_START ||
-		     (unsigned long)ptr >= VMALLOC_END))
-		kfree(ptr);
-	else
-		vfree(ptr);
-}
-
-static __inline void *
-kmem_realloc(void *ptr, size_t newsize, size_t oldsize, int flags)
-{
-	void *new = kmem_alloc(newsize, flags);
-
-	if (likely(ptr != NULL)) {
-		if (likely(new != NULL))
-			memcpy(new, ptr, min(oldsize, newsize));
-		kmem_free(ptr, oldsize);
 	}
-
-	return new;
+        
+        return lflags;
 }
 
 static __inline kmem_zone_t *
@@ -156,27 +112,33 @@
 	return kmem_cache_create(zone_name, size, 0, 0, NULL, NULL);
 }
 
-static __inline void *
-kmem_zone_alloc(kmem_zone_t *zone, int flags)
+static __inline void
+kmem_zone_free(kmem_zone_t *zone, void *ptr)
 {
-	return kmem_cache_alloc(zone, kmem_flags_convert(flags));
+	kmem_cache_free(zone, ptr);
 }
 
-static __inline void *
-kmem_zone_zalloc(kmem_zone_t *zone, int flags)
+static __inline void
+kmem_zone_destroy(kmem_zone_t *zone)
 {
-	void *ptr = kmem_zone_alloc(zone, flags);
-	if (likely(ptr != NULL))
-		memset(ptr, 0, kmem_cache_size(zone));
-	return ptr;
+	if (zone && kmem_cache_destroy(zone))
+		BUG();
 }
 
-static __inline void
-kmem_zone_free(kmem_zone_t *zone, void *ptr)
+static __inline int
+kmem_zone_shrink(kmem_zone_t *zone)
 {
-	kmem_cache_free(zone, ptr);
+	return kmem_cache_shrink(zone);
 }
 
+extern void	    *kmem_zone_zalloc(kmem_zone_t *, int);
+extern void	    *kmem_zone_alloc(kmem_zone_t *, int);
+
+extern void	    *kmem_alloc(size_t, int);
+extern void	    *kmem_realloc(void *, size_t, size_t, int);
+extern void	    *kmem_zalloc(size_t, int);
+extern void         kmem_free(void *, size_t);
+
 typedef struct shrinker *kmem_shaker_t;
 typedef int (*kmem_shake_func_t)(int, unsigned int);
 
--- diff/fs/xfs/linux-2.6/xfs_aops.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/linux-2.6/xfs_aops.c	2004-07-01 21:32:49.000000000 +0100
@@ -172,28 +172,15 @@
 	struct inode		*inode,
 	loff_t			offset,
 	ssize_t			count,
-	xfs_iomap_t		*iomapp,
+	xfs_iomap_t		*mapp,
 	int			flags)
 {
 	vnode_t			*vp = LINVFS_GET_VP(inode);
-	int			error, niomaps = 1;
+	int			error, nmaps = 1;
 
-	if (((flags & (BMAPI_DIRECT|BMAPI_SYNC)) == BMAPI_DIRECT) &&
-	    (offset >= i_size_read(inode)))
-		count = max_t(ssize_t, count, XFS_WRITE_IO_LOG);
-retry:
-	VOP_BMAP(vp, offset, count, flags, iomapp, &niomaps, error);
-	if ((error == EAGAIN) || (error == EIO))
-		return -error;
-	if (unlikely((flags & (BMAPI_WRITE|BMAPI_DIRECT)) ==
-					(BMAPI_WRITE|BMAPI_DIRECT) && niomaps &&
-					(iomapp->iomap_flags & IOMAP_DELAY))) {
-		flags = BMAPI_ALLOCATE;
-		goto retry;
-	}
-	if (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)) {
+	VOP_BMAP(vp, offset, count, flags, mapp, &nmaps, error);
+	if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)))
 		VMODIFY(vp);
-	}
 	return -error;
 }
 
@@ -288,7 +275,7 @@
 		*fsbs = 0;
 		bh = head = page_buffers(page);
 		do {
-			if (!buffer_unwritten(bh))
+			if (!buffer_unwritten(bh) || !buffer_uptodate(bh))
 				break;
 			if (!xfs_offset_to_map(page, iomapp, p_offset))
 				break;
@@ -681,13 +668,12 @@
 	xfs_iomap_t		*iomapp,
 	struct writeback_control *wbc,
 	int			startio,
-	int			all_bh)
+	int			all_bh,
+	pgoff_t			tlast)
 {
-	pgoff_t			tlast;
 	struct page		*page;
 
-	tlast = (iomapp->iomap_offset + iomapp->iomap_bsize) >> PAGE_CACHE_SHIFT;
-	for (; tindex < tlast; tindex++) {
+	for (; tindex <= tlast; tindex++) {
 		page = xfs_probe_delalloc_page(inode, tindex);
 		if (!page)
 			break;
@@ -725,17 +711,20 @@
 {
 	struct buffer_head	*bh_arr[MAX_BUF_PER_PAGE], *bh, *head;
 	xfs_iomap_t		*iomp, iomap;
-	unsigned long		p_offset = 0;
-	pgoff_t			end_index;
 	loff_t			offset;
-	unsigned long long	end_offset;
+	unsigned long           p_offset = 0;
+	__uint64_t              end_offset;
+	pgoff_t                 end_index, last_index, tlast;
 	int			len, err, i, cnt = 0, uptodate = 1;
 	int			flags = startio ? 0 : BMAPI_TRYLOCK;
 	int			page_dirty = 1;
+	int                     delalloc = 0;
 
 
 	/* Are we off the end of the file ? */
-	end_index = i_size_read(inode) >> PAGE_CACHE_SHIFT;
+	offset = i_size_read(inode);
+	end_index = offset >> PAGE_CACHE_SHIFT;
+	last_index = (offset - 1) >> PAGE_CACHE_SHIFT;
 	if (page->index >= end_index) {
 		if ((page->index >= end_index + 1) ||
 		    !(i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) {
@@ -769,6 +758,8 @@
 		 * extent state conversion transaction on completion.
 		 */
 		if (buffer_unwritten(bh)) {
+			if (!startio)
+				continue;
 			if (!iomp) {
 				err = xfs_map_blocks(inode, offset, len, &iomap,
 						BMAPI_READ|BMAPI_IGNSTATE);
@@ -778,7 +769,7 @@
 				iomp = xfs_offset_to_map(page, &iomap,
 								p_offset);
 			}
-			if (iomp && startio) {
+			if (iomp) {
 				if (!bh->b_end_io) {
 					err = xfs_map_unwritten(inode, page,
 							head, bh, p_offset,
@@ -787,7 +778,10 @@
 					if (err) {
 						goto error;
 					}
+				} else {
+					set_bit(BH_Lock, &bh->b_state);
 				}
+				BUG_ON(!buffer_locked(bh));
 				bh_arr[cnt++] = bh;
 				page_dirty = 0;
 			}
@@ -797,6 +791,7 @@
 		 */
 		} else if (buffer_delay(bh)) {
 			if (!iomp) {
+				delalloc = 1;
 				err = xfs_map_blocks(inode, offset, len, &iomap,
 						BMAPI_ALLOCATE | flags);
 				if (err) {
@@ -871,8 +866,12 @@
 		xfs_submit_page(page, bh_arr, cnt);
 
 	if (iomp) {
+		tlast = (iomp->iomap_offset + iomp->iomap_bsize - 1) >>
+					PAGE_CACHE_SHIFT;
+		if (delalloc && (tlast > last_index))
+			tlast = last_index;
 		xfs_cluster_write(inode, page->index + 1, iomp, wbc,
-				startio, unmapped);
+					startio, unmapped, tlast);
 	}
 
 	return page_dirty;
--- diff/fs/xfs/linux-2.6/xfs_buf.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/linux-2.6/xfs_buf.c	2004-07-01 21:32:49.000000000 +0100
@@ -65,7 +65,8 @@
  */
 
 STATIC kmem_cache_t *pagebuf_cache;
-STATIC void pagebuf_daemon_wakeup(void);
+STATIC kmem_shaker_t pagebuf_shake;
+STATIC int pagebuf_daemon_wakeup(int, unsigned int);
 STATIC void pagebuf_delwri_queue(xfs_buf_t *, int);
 STATIC struct workqueue_struct *pagebuf_logio_workqueue;
 STATIC struct workqueue_struct *pagebuf_dataio_workqueue;
@@ -384,13 +385,13 @@
 			 * But until all the XFS lowlevel code is revamped to
 			 * handle buffer allocation failures we can't do much.
 			 */
-			if (!(++retries % 100)) {
-				printk(KERN_ERR "possibly deadlocking in %s\n",
-						__FUNCTION__);
-			}
+			if (!(++retries % 100))
+				printk(KERN_ERR
+					"possible deadlock in %s (mode:0x%x)\n",
+					__FUNCTION__, gfp_mask);
 
 			XFS_STATS_INC(pb_page_retries);
-			pagebuf_daemon_wakeup();
+			pagebuf_daemon_wakeup(0, gfp_mask);
 			set_current_state(TASK_UNINTERRUPTIBLE);
 			schedule_timeout(10);
 			goto retry;
@@ -1566,11 +1567,20 @@
 pagebuf_delwri_dequeue(
 	xfs_buf_t		*pb)
 {
-	PB_TRACE(pb, "delwri_uq", 0);
+	int			dequeued = 0;
+
 	spin_lock(&pbd_delwrite_lock);
-	list_del_init(&pb->pb_list);
+	if ((pb->pb_flags & PBF_DELWRI) && !list_empty(&pb->pb_list)) {
+		list_del_init(&pb->pb_list);
+		dequeued = 1;
+	}
 	pb->pb_flags &= ~PBF_DELWRI;
 	spin_unlock(&pbd_delwrite_lock);
+
+	if (dequeued)
+		pagebuf_rele(pb);
+
+	PB_TRACE(pb, "delwri_dq", (long)dequeued);
 }
 
 STATIC void
@@ -1586,12 +1596,16 @@
 STATIC int pagebuf_daemon_active;
 STATIC int force_flush;
 
-STATIC void
-pagebuf_daemon_wakeup(void)
+
+STATIC int
+pagebuf_daemon_wakeup(
+	int			priority,
+	unsigned int		mask)
 {
 	force_flush = 1;
 	barrier();
 	wake_up_process(pagebuf_daemon_task);
+	return 0;
 }
 
 STATIC int
@@ -1775,21 +1789,28 @@
 	pagebuf_cache = kmem_cache_create("xfs_buf_t", sizeof(xfs_buf_t), 0,
 			SLAB_HWCACHE_ALIGN, NULL, NULL);
 	if (pagebuf_cache == NULL) {
-		printk("pagebuf: couldn't init pagebuf cache\n");
+		printk("XFS: couldn't init xfs_buf_t cache\n");
 		pagebuf_terminate();
 		return -ENOMEM;
 	}
 
-	for (i = 0; i < NHASH; i++) {
-		spin_lock_init(&pbhash[i].pb_hash_lock);
-		INIT_LIST_HEAD(&pbhash[i].pb_hash);
-	}
-
 #ifdef PAGEBUF_TRACE
 	pagebuf_trace_buf = ktrace_alloc(PAGEBUF_TRACE_SIZE, KM_SLEEP);
 #endif
 
 	pagebuf_daemon_start();
+
+	pagebuf_shake = kmem_shake_register(pagebuf_daemon_wakeup);
+	if (pagebuf_shake == NULL) {
+		pagebuf_terminate();
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < NHASH; i++) {
+		spin_lock_init(&pbhash[i].pb_hash_lock);
+		INIT_LIST_HEAD(&pbhash[i].pb_hash);
+	}
+
 	return 0;
 }
 
@@ -1808,5 +1829,6 @@
 	ktrace_free(pagebuf_trace_buf);
 #endif
 
-	kmem_cache_destroy(pagebuf_cache);
+	kmem_zone_destroy(pagebuf_cache);
+	kmem_shake_deregister(pagebuf_shake);
 }
--- diff/fs/xfs/linux-2.6/xfs_buf.h	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/linux-2.6/xfs_buf.h	2004-07-01 21:32:49.000000000 +0100
@@ -347,27 +347,15 @@
 #define XFS_BUF_ISSTALE(x)	((x)->pb_flags & XFS_B_STALE)
 #define XFS_BUF_SUPER_STALE(x)	do {				\
 					XFS_BUF_STALE(x);	\
-					xfs_buf_undelay(x);	\
+					pagebuf_delwri_dequeue(x);	\
 					XFS_BUF_DONE(x);	\
 				} while (0)
 
 #define XFS_BUF_MANAGE		PBF_FS_MANAGED
 #define XFS_BUF_UNMANAGE(x)	((x)->pb_flags &= ~PBF_FS_MANAGED)
 
-static inline void xfs_buf_undelay(xfs_buf_t *pb)
-{
-	if (pb->pb_flags & PBF_DELWRI) {
-		if (pb->pb_list.next != &pb->pb_list) {
-			pagebuf_delwri_dequeue(pb);
-			pagebuf_rele(pb);
-		} else {
-			pb->pb_flags &= ~PBF_DELWRI;
-		}
-	}
-}
-
 #define XFS_BUF_DELAYWRITE(x)	 ((x)->pb_flags |= PBF_DELWRI)
-#define XFS_BUF_UNDELAYWRITE(x)	 xfs_buf_undelay(x)
+#define XFS_BUF_UNDELAYWRITE(x)	 pagebuf_delwri_dequeue(x)
 #define XFS_BUF_ISDELAYWRITE(x)	 ((x)->pb_flags & PBF_DELWRI)
 
 #define XFS_BUF_ERROR(x,no)	 pagebuf_ioerror(x,no)
@@ -500,7 +488,7 @@
 {
 	bp->pb_fspriv3 = mp;
 	bp->pb_strat = xfs_bdstrat_cb;
-	xfs_buf_undelay(bp);
+	pagebuf_delwri_dequeue(bp);
 	return pagebuf_iostart(bp, PBF_WRITE | PBF_ASYNC | _PBF_RUN_QUEUES);
 }
 
@@ -540,7 +528,7 @@
 	if (!iowait)
 		pb->pb_flags |= _PBF_RUN_QUEUES;
 
-	xfs_buf_undelay(pb);
+	pagebuf_delwri_dequeue(pb);
 	pagebuf_iostrategy(pb);
 	if (iowait) {
 		error = pagebuf_iowait(pb);
--- diff/fs/xfs/linux-2.6/xfs_file.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/linux-2.6/xfs_file.c	2004-07-01 21:32:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -53,6 +53,7 @@
 #include "xfs_rw.h"
 
 #include <linux/dcache.h>
+#include <linux/smp_lock.h>
 
 static struct vm_operations_struct linvfs_file_vm_ops;
 
@@ -440,9 +441,10 @@
 	int		error;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
 
-	ASSERT(vp);
+	unlock_kernel();
 	VOP_IOCTL(vp, inode, filp, 0, cmd, arg, error);
 	VMODIFY(vp);
+	lock_kernel();
 
 	/* NOTE:  some of the ioctl's return positive #'s as a
 	 *	  byte count indicating success, such as
@@ -463,9 +465,11 @@
 	int		error;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
 
+	unlock_kernel();
 	ASSERT(vp);
 	VOP_IOCTL(vp, inode, filp, IO_INVIS, cmd, arg, error);
 	VMODIFY(vp);
+	lock_kernel();
 
 	/* NOTE:  some of the ioctl's return positive #'s as a
 	 *	  byte count indicating success, such as
--- diff/fs/xfs/linux-2.6/xfs_fs_subr.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/linux-2.6/xfs_fs_subr.c	2004-07-01 21:32:49.000000000 +0100
@@ -36,7 +36,7 @@
  * Stub for no-op vnode operations that return error status.
  */
 int
-fs_noerr()
+fs_noerr(void)
 {
 	return 0;
 }
@@ -45,7 +45,7 @@
  * Operation unsupported under this file system.
  */
 int
-fs_nosys()
+fs_nosys(void)
 {
 	return ENOSYS;
 }
@@ -55,7 +55,7 @@
  */
 /* ARGSUSED */
 void
-fs_noval()
+fs_noval(void)
 {
 }
 
--- diff/fs/xfs/linux-2.6/xfs_iops.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/linux-2.6/xfs_iops.c	2004-07-01 21:32:49.000000000 +0100
@@ -67,6 +67,7 @@
 #include "xfs_utils.h"
 
 #include <linux/xattr.h>
+#include <linux/namei.h>
 
 
 /*
@@ -419,13 +420,16 @@
 	ASSERT(nd);
 
 	link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL);
-	if (!link)
-		return -ENOMEM;
+	if (!link) {
+		nd_set_link(nd, ERR_PTR(-ENOMEM));
+		return 0;
+	}
 
 	uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL);
 	if (!uio) {
 		kfree(link);
-		return -ENOMEM;
+		nd_set_link(nd, ERR_PTR(-ENOMEM));
+		return 0;
 	}
 
 	vp = LINVFS_GET_VP(dentry->d_inode);
@@ -441,18 +445,22 @@
 
 	VOP_READLINK(vp, uio, 0, NULL, error);
 	if (error) {
-		kfree(uio);
 		kfree(link);
-		return -error;
+		link = ERR_PTR(-error);
+	} else {
+		link[MAXNAMELEN - uio->uio_resid] = '\0';
 	}
-
-	link[MAXNAMELEN - uio->uio_resid] = '\0';
 	kfree(uio);
 
-	/* vfs_follow_link returns (-) errors */
-	error = vfs_follow_link(nd, link);
-	kfree(link);
-	return error;
+	nd_set_link(nd, link);
+	return 0;
+}
+
+static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd)
+{
+	char *s = nd_get_link(nd);
+	if (!IS_ERR(s))
+		kfree(s);
 }
 
 #ifdef CONFIG_XFS_POSIX_ACL
@@ -692,6 +700,7 @@
 struct inode_operations linvfs_symlink_inode_operations = {
 	.readlink		= linvfs_readlink,
 	.follow_link		= linvfs_follow_link,
+	.put_link		= linvfs_put_link,
 	.permission		= linvfs_permission,
 	.getattr		= linvfs_getattr,
 	.setattr		= linvfs_setattr,
--- diff/fs/xfs/linux-2.6/xfs_super.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/linux-2.6/xfs_super.c	2004-07-01 21:32:49.000000000 +0100
@@ -76,7 +76,8 @@
 STATIC struct quotactl_ops linvfs_qops;
 STATIC struct super_operations linvfs_sops;
 STATIC struct export_operations linvfs_export_ops;
-STATIC kmem_cache_t * linvfs_inode_cachep;
+STATIC kmem_zone_t *linvfs_inode_zone;
+STATIC kmem_shaker_t xfs_inode_shaker;
 
 STATIC struct xfs_mount_args *
 xfs_args_allocate(
@@ -289,7 +290,7 @@
 {
 	vnode_t			*vp;
 
-	vp = (vnode_t *)kmem_cache_alloc(linvfs_inode_cachep, 
+	vp = (vnode_t *)kmem_cache_alloc(linvfs_inode_zone, 
                 kmem_flags_convert(KM_SLEEP));
 	if (!vp)
 		return NULL;
@@ -300,7 +301,20 @@
 linvfs_destroy_inode(
 	struct inode		*inode)
 {
-	kmem_cache_free(linvfs_inode_cachep, LINVFS_GET_VP(inode));
+	kmem_cache_free(linvfs_inode_zone, LINVFS_GET_VP(inode));
+}
+
+int
+xfs_inode_shake(
+	int		priority,
+	unsigned int	gfp_mask)
+{
+	int		pages;
+
+	
+	pages = kmem_zone_shrink(linvfs_inode_zone);
+	pages += kmem_zone_shrink(xfs_inode_zone);
+	return pages;
 }
 
 STATIC void
@@ -319,12 +333,12 @@
 STATIC int
 init_inodecache( void )
 {
-	linvfs_inode_cachep = kmem_cache_create("linvfs_icache",
+	linvfs_inode_zone = kmem_cache_create("linvfs_icache",
 				sizeof(vnode_t), 0,
 				SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
 				init_once, NULL);
 
-	if (linvfs_inode_cachep == NULL)
+	if (linvfs_inode_zone == NULL)
 		return -ENOMEM;
 	return 0;
 }
@@ -332,7 +346,7 @@
 STATIC void
 destroy_inodecache( void )
 {
-	if (kmem_cache_destroy(linvfs_inode_cachep))
+	if (kmem_cache_destroy(linvfs_inode_zone))
 		printk(KERN_WARNING "%s: cache still in use!\n", __FUNCTION__);
 }
 
@@ -835,15 +849,24 @@
 	vn_init();
 	xfs_init();
 	uuid_init();
-	vfs_initdmapi();
 	vfs_initquota();
 
+	xfs_inode_shaker = kmem_shake_register(xfs_inode_shake);
+	if (!xfs_inode_shaker) {
+		error = -ENOMEM;
+		goto undo_shaker;
+	}
+
 	error = register_filesystem(&xfs_fs_type);
 	if (error)
 		goto undo_register;
+	XFS_DM_INIT(&xfs_fs_type);
 	return 0;
 
 undo_register:
+	kmem_shake_deregister(xfs_inode_shaker);
+
+undo_shaker:
 	pagebuf_terminate();
 
 undo_pagebuf:
@@ -857,8 +880,9 @@
 exit_xfs_fs( void )
 {
 	vfs_exitquota();
-	vfs_exitdmapi();
+	XFS_DM_EXIT(&xfs_fs_type);
 	unregister_filesystem(&xfs_fs_type);
+	kmem_shake_deregister(xfs_inode_shaker);
 	xfs_cleanup();
 	pagebuf_terminate();
 	destroy_inodecache();
--- diff/fs/xfs/linux-2.6/xfs_super.h	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/linux-2.6/xfs_super.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -92,6 +92,12 @@
 # define XFS_TRACE_STRING
 #endif
 
+#ifdef CONFIG_XFS_DMAPI
+# define XFS_DMAPI_STRING	"dmapi support, "
+#else
+# define XFS_DMAPI_STRING
+#endif
+
 #ifdef DEBUG
 # define XFS_DBG_STRING		"debug"
 #else
@@ -103,6 +109,7 @@
 				XFS_REALTIME_STRING \
 				XFS_BIGFS_STRING \
 				XFS_TRACE_STRING \
+				XFS_DMAPI_STRING \
 				XFS_DBG_STRING /* DBG must be last */
 
 #define LINVFS_GET_VFS(s) \
--- diff/fs/xfs/xfs.h	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/xfs.h	2004-07-01 21:32:49.000000000 +0100
@@ -35,5 +35,6 @@
 #include <linux-2.6/xfs_linux.h>
 
 #include <xfs_fs.h> 
+#include <xfs_macros.h>
 
 #endif	/* __XFS_H__ */
--- diff/fs/xfs/xfs_acl.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/xfs_acl.c	2004-07-01 21:32:49.000000000 +0100
@@ -231,8 +231,6 @@
 	int			flags = 0;
 
 	VN_HOLD(vp);
-	if ((error = _MAC_VACCESS(vp, NULL, VREAD)))
-		goto out;
 	if(size) {
 		if (!(_ACL_ALLOC(xfs_acl))) {
 			error = ENOMEM;
@@ -395,8 +393,6 @@
 		return ENOTDIR;
 	if (vp->v_vfsp->vfs_flag & VFS_RDONLY)
 		return EROFS;
-	if ((error = _MAC_VACCESS(vp, NULL, VWRITE)))
-		return error;
 	va.va_mask = XFS_AT_UID;
 	VOP_GETATTR(vp, &va, 0, NULL, error);
 	if (error)
--- diff/fs/xfs/xfs_acl.h	2004-05-19 22:12:32.000000000 +0100
+++ source/fs/xfs/xfs_acl.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2001-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -61,14 +61,17 @@
 #define SGI_ACL_DEFAULT_SIZE	(sizeof(SGI_ACL_DEFAULT)-1)
 
 
-#ifdef __KERNEL__
-
 #ifdef CONFIG_XFS_POSIX_ACL
 
 struct vattr;
 struct vnode;
 struct xfs_inode;
 
+extern struct kmem_zone *xfs_acl_zone;
+#define xfs_acl_zone_init(zone, name)	\
+		(zone) = kmem_zone_init(sizeof(xfs_acl_t), name)
+#define xfs_acl_zone_destroy(zone)	kmem_cache_destroy(zone)
+
 extern int xfs_acl_inherit(struct vnode *, struct vattr *, xfs_acl_t *);
 extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *);
 extern int xfs_acl_get(struct vnode *, xfs_acl_t *, xfs_acl_t *);
@@ -80,17 +83,10 @@
 extern int xfs_acl_vget(struct vnode *, void *, size_t, int);
 extern int xfs_acl_vremove(struct vnode *vp, int);
 
-extern struct kmem_zone *xfs_acl_zone;
-
 #define _ACL_TYPE_ACCESS	1
 #define _ACL_TYPE_DEFAULT	2
 #define _ACL_PERM_INVALID(perm)	((perm) & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE))
 
-#define _ACL_DECL(a)		xfs_acl_t *(a) = NULL
-#define _ACL_ALLOC(a)		((a) = kmem_zone_alloc(xfs_acl_zone, KM_SLEEP))
-#define _ACL_FREE(a)		((a)? kmem_zone_free(xfs_acl_zone, (a)) : 0)
-#define _ACL_ZONE_INIT(z,name)	((z) = kmem_zone_init(sizeof(xfs_acl_t), name))
-#define _ACL_ZONE_DESTROY(z)	(kmem_cache_destroy(z))
 #define _ACL_INHERIT(c,v,d)	(xfs_acl_inherit(c,v,d))
 #define _ACL_GET_ACCESS(pv,pa)	(xfs_acl_vtoacl(pv,pa,NULL) == 0)
 #define _ACL_GET_DEFAULT(pv,pd)	(xfs_acl_vtoacl(pv,NULL,pd) == 0)
@@ -98,17 +94,19 @@
 #define _ACL_DEFAULT_EXISTS	xfs_acl_vhasacl_default
 #define _ACL_XFS_IACCESS(i,m,c) (XFS_IFORK_Q(i) ? xfs_acl_iaccess(i,m,c) : -1)
 
+#define _ACL_ALLOC(a)		((a) = kmem_zone_alloc(xfs_acl_zone, KM_SLEEP))
+#define _ACL_FREE(a)		((a)? kmem_zone_free(xfs_acl_zone, (a)) : 0)
+
 #else
+#define xfs_acl_zone_init(zone,name)
+#define xfs_acl_zone_destroy(zone)
 #define xfs_acl_vset(v,p,sz,t)	(-EOPNOTSUPP)
 #define xfs_acl_vget(v,p,sz,t)	(-EOPNOTSUPP)
 #define xfs_acl_vremove(v,t)	(-EOPNOTSUPP)
 #define xfs_acl_vhasacl_access(v)	(0)
 #define xfs_acl_vhasacl_default(v)	(0)
-#define _ACL_DECL(a)		((void)0)
 #define _ACL_ALLOC(a)		(1)	/* successfully allocate nothing */
 #define _ACL_FREE(a)		((void)0)
-#define _ACL_ZONE_INIT(z,name)	((void)0)
-#define _ACL_ZONE_DESTROY(z)	((void)0)
 #define _ACL_INHERIT(c,v,d)	(0)
 #define _ACL_GET_ACCESS(pv,pa)	(0)
 #define _ACL_GET_DEFAULT(pv,pd)	(0)
@@ -117,6 +115,4 @@
 #define _ACL_XFS_IACCESS(i,m,c) (-1)
 #endif
 
-#endif	/* __KERNEL__ */
-
 #endif	/* __XFS_ACL_H__ */
--- diff/fs/xfs/xfs_arch.h	2004-05-19 22:12:32.000000000 +0100
+++ source/fs/xfs/xfs_arch.h	2004-07-01 21:32:49.000000000 +0100
@@ -157,11 +157,11 @@
 
 /* does not return a value */
 #define INT_MOD_EXPR(reference,arch,code) \
-    (void)(((arch) == ARCH_NOCONVERT) \
+    (((arch) == ARCH_NOCONVERT) \
 	? \
-	    ((reference) code) \
+	    (void)((reference) code) \
 	: \
-	    ( \
+	    (void)( \
 		(reference) = INT_GET((reference),arch) , \
 		((reference) code), \
 		INT_SET(reference, arch, reference) \
@@ -187,10 +187,10 @@
 
 /* does not return a value */
 #define INT_COPY(dst,src,arch) \
-    (void)( \
+    ( \
 	((sizeof(dst) == sizeof(src)) || ((arch) == ARCH_NOCONVERT)) \
 	    ? \
-		((dst) = (src)) \
+		(void)((dst) = (src)) \
 	    : \
 		INT_SET(dst, arch, INT_GET(src, arch)) \
     )
--- diff/fs/xfs/xfs_attr.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/xfs_attr.c	2004-07-01 21:32:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -2149,8 +2149,8 @@
 		/*
 		 * If the "remote" value is in the cache, remove it.
 		 */
-		/* bp = incore(mp->m_dev, dblkno, blkcnt, 1); */
-		bp = xfs_incore(mp->m_ddev_targp, dblkno, blkcnt, 1);
+		bp = xfs_incore(mp->m_ddev_targp, dblkno, blkcnt,
+				XFS_INCORE_TRYLOCK);
 		if (bp) {
 			XFS_BUF_STALE(bp);
 			XFS_BUF_UNDELAYWRITE(bp);
--- diff/fs/xfs/xfs_bit.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/xfs_bit.c	2004-07-01 21:32:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -154,14 +154,17 @@
 xfs_lowbit64(
 	__uint64_t	v)
 {
-	int n;
-	n = ffs((unsigned)v);
-	if (n <= 0) {
-		n = ffs(v >> 32);
-		if (n >= 0)
-			n+=32;
+	__uint32_t	w = (__uint32_t)v;
+	int		n = 0;
+
+	if (w) {	/* lower bits */
+		n = ffs(w);
+	} else {	/* upper bits */
+		w = (__uint32_t)(v >> 32);
+		if (w && (n = ffs(w)))
+			n += 32;
 	}
-	return (n <= 0) ? n : n-1;
+	return n - 1;
 }
 
 /*
@@ -171,10 +174,11 @@
 xfs_highbit64(
 	__uint64_t	v)
 {
-	__uint32_t h = v >> 32;
+	__uint32_t	h = (__uint32_t)(v >> 32);
+
 	if (h)
 		return xfs_highbit32(h) + 32;
-	return xfs_highbit32((__u32)v);
+	return xfs_highbit32((__uint32_t)v);
 }
 
 
--- diff/fs/xfs/xfs_dmapi.h	2004-05-19 22:12:32.000000000 +0100
+++ source/fs/xfs/xfs_dmapi.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -199,7 +199,14 @@
 
 extern struct bhv_vfsops xfs_dmops;
 
-extern int dmapi_init(void);
-extern void dmapi_uninit(void);
+#ifdef CONFIG_XFS_DMAPI
+void xfs_dm_init(struct file_system_type *);
+void xfs_dm_exit(struct file_system_type *);
+#define XFS_DM_INIT(fstype)	xfs_dm_init(fstype)
+#define XFS_DM_EXIT(fstype)	xfs_dm_exit(fstype)
+#else
+#define XFS_DM_INIT(fstype)
+#define XFS_DM_EXIT(fstype)
+#endif
 
 #endif  /* __XFS_DMAPI_H__ */
--- diff/fs/xfs/xfs_inode.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/xfs_inode.c	2004-07-01 21:32:49.000000000 +0100
@@ -1140,8 +1140,7 @@
 	 * Call the space management code to pick
 	 * the on-disk inode to be allocated.
 	 */
-	ASSERT(pip != NULL);
-	error = xfs_dialloc(tp, pip ? pip->i_ino : 0, mode, okalloc,
+	error = xfs_dialloc(tp, pip->i_ino, mode, okalloc,
 			    ialloc_context, call_again, &ino);
 	if (error != 0) {
 		return error;
@@ -3696,12 +3695,6 @@
 	mode_t		orgmode = mode;
 	struct inode	*inode = LINVFS_GET_IP(XFS_ITOV(ip));
 
-	/*
-	 * Verify that the MAC policy allows the requested access.
-	 */
-	if ((error = _MAC_XFS_IACCESS(ip, mode, cr)))
-		return XFS_ERROR(error);
-
 	if (mode & S_IWUSR) {
 		umode_t		imode = inode->i_mode;
 
--- diff/fs/xfs/xfs_inode.h	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/xfs_inode.h	2004-07-01 21:32:49.000000000 +0100
@@ -459,8 +459,8 @@
  * directory, group of new file is set to that of the parent, and
  * new subdirectory gets S_ISGID bit from parent.
  */
-#define XFS_INHERIT_GID(pip, vfsp)	((pip) != NULL && \
-	(((vfsp)->vfs_flag & VFS_GRPID) || ((pip)->i_d.di_mode & S_ISGID)))
+#define XFS_INHERIT_GID(pip, vfsp)	\
+	(((vfsp)->vfs_flag & VFS_GRPID) || ((pip)->i_d.di_mode & S_ISGID))
 
 /*
  * xfs_iget.c prototypes.
--- diff/fs/xfs/xfs_mount.h	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/xfs_mount.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -424,10 +424,6 @@
  */
 #define XFS_READIO_LOG_LARGE	16
 #define XFS_WRITEIO_LOG_LARGE	16
-/*
- * Default allocation size
- */
-#define XFS_WRITE_IO_LOG	16
 
 /*
  * Max and min values for UIO and mount-option defined I/O sizes;
--- diff/fs/xfs/xfs_rtalloc.c	2004-05-19 22:12:33.000000000 +0100
+++ source/fs/xfs/xfs_rtalloc.c	2004-07-01 21:32:49.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -100,7 +100,9 @@
 xfs_lowbit32(
 	__uint32_t	v)
 {
-	return ffs(v)-1;
+	if (v)
+		return ffs(v) - 1;
+	return -1;
 }
 
 /*
--- diff/fs/xfs/xfs_vfsops.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/xfs_vfsops.c	2004-07-01 21:32:49.000000000 +0100
@@ -118,7 +118,7 @@
 	xfs_ili_zone = kmem_zone_init(sizeof(xfs_inode_log_item_t), "xfs_ili");
 	xfs_chashlist_zone = kmem_zone_init(sizeof(xfs_chashlist_t),
 					    "xfs_chashlist");
-	_ACL_ZONE_INIT(xfs_acl_zone, "xfs_acl");
+	xfs_acl_zone_init(xfs_acl_zone, "xfs_acl");
 
 	/*
 	 * Allocate global trace buffers.
@@ -170,6 +170,7 @@
 	xfs_cleanup_procfs();
 	xfs_sysctl_unregister();
 	xfs_refcache_destroy();
+	xfs_acl_zone_destroy(xfs_acl_zone);
 
 #ifdef XFS_DIR2_TRACE
 	ktrace_free(xfs_dir2_trace_buf);
@@ -202,7 +203,6 @@
 	kmem_cache_destroy(xfs_ifork_zone);
 	kmem_cache_destroy(xfs_ili_zone);
 	kmem_cache_destroy(xfs_chashlist_zone);
-	_ACL_ZONE_DESTROY(xfs_acl_zone);
 }
 
 /*
--- diff/fs/xfs/xfs_vnodeops.c	2004-06-30 14:25:58.000000000 +0100
+++ source/fs/xfs/xfs_vnodeops.c	2004-07-01 21:32:49.000000000 +0100
@@ -411,11 +411,6 @@
 
 	xfs_ilock(ip, lock_flags);
 
-	if (_MAC_XFS_IACCESS(ip, MACWRITE, credp)) {
-		code = XFS_ERROR(EACCES);
-		goto error_return;
-	}
-
 	/* boolean: are we the file owner? */
 	file_owner = (current_fsuid(credp) == ip->i_d.di_uid);
 
@@ -2446,11 +2441,6 @@
 		xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
 	}
 
-	if ((error = _MAC_XFS_IACCESS(ip, MACWRITE, credp))) {
-		REMOVE_DEBUG_TRACE(__LINE__);
-		goto error_return;
-	}
-
 	/*
 	 * Entry must exist since we did a lookup in xfs_lock_dir_and_entry.
 	 */
@@ -2536,8 +2526,6 @@
  error1:
 	xfs_bmap_cancel(&free_list);
 	cancel_flags |= XFS_TRANS_ABORT;
-
- error_return:
 	xfs_trans_cancel(tp, cancel_flags);
 	goto std_return;
 
@@ -3105,10 +3093,6 @@
 	ITRACE(cdp);
 	xfs_trans_ijoin(tp, cdp, XFS_ILOCK_EXCL);
 
-	if ((error = _MAC_XFS_IACCESS(cdp, MACWRITE, credp))) {
-		goto error_return;
-	}
-
 	ASSERT(cdp->i_d.di_nlink >= 2);
 	if (cdp->i_d.di_nlink != 2) {
 		error = XFS_ERROR(ENOTEMPTY);
--- diff/include/acpi/acpi_drivers.h	2004-05-19 22:12:33.000000000 +0100
+++ source/include/acpi/acpi_drivers.h	2004-07-01 21:32:49.000000000 +0100
@@ -55,7 +55,7 @@
 
 /* ACPI PCI Interrupt Link (pci_link.c) */
 
-int acpi_pci_link_check (void);
+int acpi_irq_penalty_init (void);
 int acpi_pci_link_get_irq (acpi_handle handle, int index, int* edge_level, int* active_high_low);
 
 /* ACPI PCI Interrupt Routing (pci_irq.c) */
--- diff/include/asm-alpha/bitops.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-alpha/bitops.h	2004-07-01 21:32:49.000000000 +0100
@@ -418,9 +418,9 @@
  * Find next one bit in a bitmap reasonably efficiently.
  */
 static inline unsigned long
-find_next_bit(void * addr, unsigned long size, unsigned long offset)
+find_next_bit(const void * addr, unsigned long size, unsigned long offset)
 {
-	unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
+	const unsigned long * p = ((const unsigned long *) addr) + (offset >> 6);
 	unsigned long result = offset & ~63UL;
 	unsigned long tmp;
 
--- diff/include/asm-alpha/checksum.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-alpha/checksum.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,6 +1,7 @@
 #ifndef _ALPHA_CHECKSUM_H
 #define _ALPHA_CHECKSUM_H
 
+#include <linux/in6.h>
 
 /*
  *	This is a version of ip_compute_csum() optimized for IP headers,
--- diff/include/asm-alpha/fcntl.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-alpha/fcntl.h	2004-07-01 21:32:49.000000000 +0100
@@ -21,6 +21,7 @@
 #define O_NOFOLLOW	0200000 /* don't follow links */
 #define O_LARGEFILE	0400000 /* will be set by the kernel on every open */
 #define O_DIRECT	02000000 /* direct disk access - should check with OSF/1 */
+#define O_NOATIME	04000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-alpha/resource.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-alpha/resource.h	2004-07-01 21:32:49.000000000 +0100
@@ -15,9 +15,11 @@
 #define RLIMIT_AS	7		/* address space limit(?) */
 #define RLIMIT_NPROC	8		/* max number of processes */
 #define RLIMIT_MEMLOCK	9		/* max locked-in-memory address space */
-#define RLIMIT_LOCKS   10              /* maximum file locks held */
+#define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.  Fine, it's unsigned, but
@@ -40,7 +42,9 @@
     {LONG_MAX, LONG_MAX},			/* RLIMIT_AS */		\
     {LONG_MAX, LONG_MAX},			/* RLIMIT_NPROC */	\
     {LONG_MAX, LONG_MAX},			/* RLIMIT_MEMLOCK */	\
-    {LONG_MAX, LONG_MAX},                       /* RLIMIT_LOCKS */      \
+    {LONG_MAX, LONG_MAX},			/* RLIMIT_LOCKS */	\
+    {MAX_SIGPENDING, MAX_SIGPENDING},		/* RLIMIT_SIGPENDING */ \
+    {MQ_BYTES_MAX, MQ_BYTES_MAX},		/* RLIMIT_MSGQUEUE */	\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-alpha/smp.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-alpha/smp.h	2004-07-01 21:32:49.000000000 +0100
@@ -50,9 +50,7 @@
 extern int smp_num_cpus;
 #define cpu_possible_map	cpu_present_mask
 
-#define cpu_online(cpu)		cpu_isset(cpu, cpu_online_map)
-
-extern int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, int wait, unsigned long cpu);
+int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, int wait, cpumask_t cpu);
 
 #else /* CONFIG_SMP */
 
--- diff/include/asm-alpha/spinlock.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-alpha/spinlock.h	2004-07-01 21:32:49.000000000 +0100
@@ -6,6 +6,10 @@
 #include <linux/kernel.h>
 #include <asm/current.h>
 
+#ifdef CONFIG_LOCKMETER
+#undef DEBUG_SPINLOCK
+#undef DEBUG_RWLOCK
+#endif
 
 /*
  * Simple spin lock operations.  There are two variants, one clears IRQ's
@@ -96,9 +100,18 @@
 
 typedef struct {
 	volatile int write_lock:1, read_counter:31;
+#ifdef CONFIG_LOCKMETER
+	/* required for LOCKMETER since all bits in lock are used */
+	/* need this storage for CPU and lock INDEX ............. */
+	unsigned magic;
+#endif
 } /*__attribute__((aligned(32)))*/ rwlock_t;
 
+#ifdef CONFIG_LOCKMETER
+#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0, 0 }
+#else
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
+#endif
 
 #define rwlock_init(x)	do { *(x) = RW_LOCK_UNLOCKED; } while(0)
 #define rwlock_is_locked(x)	(*(volatile int *)(x) != 0)
@@ -170,4 +183,41 @@
 	: "m" (*lock) : "memory");
 }
 
+#ifdef CONFIG_LOCKMETER
+static inline int _raw_write_trylock(rwlock_t *lock)
+{
+	long temp,result;
+
+	__asm__ __volatile__(
+	"	ldl_l %1,%0\n"
+	"	mov $31,%2\n"
+	"	bne %1,1f\n"
+	"	or $31,1,%2\n"
+	"	stl_c %2,%0\n"
+	"1:	mb\n"
+	: "=m" (*(volatile int *)lock), "=&r" (temp), "=&r" (result)
+	: "m" (*(volatile int *)lock)
+	);
+
+	return (result);
+}
+
+static inline int _raw_read_trylock(rwlock_t *lock)
+{
+	unsigned long temp,result;
+
+	__asm__ __volatile__(
+	"	ldl_l %1,%0\n"
+	"	mov $31,%2\n"
+	"	blbs %1,1f\n"
+	"	subl %1,2,%2\n"
+	"	stl_c %2,%0\n"
+	"1:	mb\n"
+	: "=m" (*(volatile int *)lock), "=&r" (temp), "=&r" (result)
+	: "m" (*(volatile int *)lock)
+	);
+	return (result);
+}
+#endif /* CONFIG_LOCKMETER */
+
 #endif /* _ALPHA_SPINLOCK_H */
--- diff/include/asm-alpha/system.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-alpha/system.h	2004-07-01 21:32:49.000000000 +0100
@@ -43,7 +43,6 @@
  */
 #define PARAM			ZERO_PGE
 #define COMMAND_LINE		((char*)(PARAM + 0x0000))
-#define COMMAND_LINE_SIZE	256
 #define INITRD_START		(*(unsigned long *) (PARAM+0x100))
 #define INITRD_SIZE		(*(unsigned long *) (PARAM+0x108))
 
--- diff/include/asm-arm/arch-integrator/impd1.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-integrator/impd1.h	2004-07-01 21:32:49.000000000 +0100
@@ -14,6 +14,5 @@
 
 struct device;
 
-void impd1_set_vco(struct device *dev, int vconr, unsigned long period);
 void impd1_tweak_control(struct device *dev, u32 mask, u32 val);
 
--- diff/include/asm-arm/arch-integrator/platform.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-integrator/platform.h	2004-07-01 21:32:49.000000000 +0100
@@ -457,6 +457,10 @@
 #define mSEC_25                         (mSEC_1 * 25)
 #define SEC_1                           (mSEC_1 * 1000)
 
+#ifndef __ASSEMBLY__
+extern void integrator_time_init(unsigned long, unsigned int);
+#endif
+
 #define INTEGRATOR_CSR_BASE             0x10000000
 #define INTEGRATOR_CSR_SIZE             0x10000000
 
--- diff/include/asm-arm/arch-ixp4xx/platform.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-ixp4xx/platform.h	2004-07-01 21:32:49.000000000 +0100
@@ -58,6 +58,7 @@
  */
 extern void ixp4xx_map_io(void);
 extern void ixp4xx_init_irq(void);
+extern void ixp4xx_init_time(void);
 extern void ixp4xx_pci_preinit(void);
 struct pci_sys_data;
 extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
--- diff/include/asm-arm/arch-lh7a40x/memory.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-lh7a40x/memory.h	2004-07-01 21:32:49.000000000 +0100
@@ -6,14 +6,14 @@
  *  modify it under the terms of the GNU General Public License
  *  version 2 as published by the Free Software Foundation.
  *
+ *
+ *  Refer to <file:Documentation/arm/Sharp-LH/SDRAM> for more information.
+ *
  */
 
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-
-#define BANKS_PER_NODE 1	/* Define as either 1 or 2 */
-
 /*
  * Physical DRAM offset.
  */
@@ -30,57 +30,30 @@
 #define __bus_to_virt(x)	 __phys_to_virt(x)
 
 #ifdef CONFIG_DISCONTIGMEM
-/*
- * Because of the wide memory address space between physical RAM
- * banks, it's convenient to use Linux's NUMA support to represent our
- * memory map.  Assuming all memory nodes have equal access
- * characteristics, we then have a generic discontiguous memory setup.
- *
- * Of course, all this isn't mandatory for implementations with only
- * one used memory bank.  For those, simply undefine
- * CONFIG_DISCONTIGMEM.  However, keep in mind that a featurefull
- * system will need more than 4MiB of RAM.
- *
- * The contiguous memory blocks are small enough that it pays to
- * aggregate two banks into one node.  Setting BANKS_PER_NODE to 2
- * puts pairs of banks into a node.
- *
- * A typical layout would start like this:
- *
- *  node 0: 0xc0000000
- *          0xc1000000
- *  node 1: 0xc4000000
- *          0xc5000000
- *  node 2: 0xc8000000
- *          0xc9000000
- *
- * The proximity of the pairs of blocks makes it feasible to combine them.
- *
- */
 
 /*
  * Given a kernel address, find the home node of the underlying memory.
  */
 
-#if BANKS_PER_NODE==1
-#define KVADDR_TO_NID(addr) \
+# ifdef CONFIG_LH7A40X_ONE_BANK_PER_NODE
+#  define KVADDR_TO_NID(addr) \
   (  ((((unsigned long) (addr) - PAGE_OFFSET) >> 24) &  1)\
    | ((((unsigned long) (addr) - PAGE_OFFSET) >> 25) & ~1))
-#else  /* 2 banks per node */
-#define KVADDR_TO_NID(addr) \
-       ((unsigned long) (addr) - PAGE_OFFSET) >> 26)
-#endif
+# else  /* 2 banks per node */
+#  define KVADDR_TO_NID(addr) \
+      (((unsigned long) (addr) - PAGE_OFFSET) >> 26)
+# endif
 
 /*
  * Given a page frame number, convert it to a node id.
  */
 
-#if BANKS_PER_NODE==1
-#define PFN_TO_NID(pfn) \
+# ifdef CONFIG_LH7A40X_ONE_BANK_PER_NODE
+#  define PFN_TO_NID(pfn) \
   (((((pfn) - PHYS_PFN_OFFSET) >> (24 - PAGE_SHIFT)) &  1)\
  | ((((pfn) - PHYS_PFN_OFFSET) >> (25 - PAGE_SHIFT)) & ~1))
-#else  /* 2 banks per node */
-#define PFN_TO_NID(addr) \
+# else  /* 2 banks per node */
+#  define PFN_TO_NID(pfn) \
     (((pfn) - PHYS_PFN_OFFSET) >> (26 - PAGE_SHIFT))
 #endif
 
@@ -88,13 +61,13 @@
  * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory
  * and return the mem_map of that node.
  */
-#define ADDR_TO_MAPBASE(kaddr)	NODE_MEM_MAP(KVADDR_TO_NID(kaddr))
+# define ADDR_TO_MAPBASE(kaddr)	NODE_MEM_MAP(KVADDR_TO_NID(kaddr))
 
 /*
  * Given a page frame number, find the owning node of the memory
  * and return the mem_map of that node.
  */
-#define PFN_TO_MAPBASE(pfn)	NODE_MEM_MAP(PFN_TO_NID(pfn))
+# define PFN_TO_MAPBASE(pfn)	NODE_MEM_MAP(PFN_TO_NID(pfn))
 
 /*
  * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory
@@ -102,17 +75,17 @@
  * node's mem_map.
  */
 
-#if BANKS_PER_NODE==1
-#define LOCAL_MAP_NR(addr) \
+# ifdef CONFIG_LH7A40X_ONE_BANK_PER_NODE
+#  define LOCAL_MAP_NR(addr) \
        (((unsigned long)(addr) & 0x003fffff) >> PAGE_SHIFT)
-#else  /* 2 banks per node */
-#define LOCAL_MAP_NR(addr) \
+# else  /* 2 banks per node */
+#  define LOCAL_MAP_NR(addr) \
        (((unsigned long)(addr) & 0x01ffffff) >> PAGE_SHIFT)
-#endif
+# endif
 
 #else
 
-#define PFN_TO_NID(addr)	(0)
+# define PFN_TO_NID(addr)	(0)
 
 #endif
 
--- diff/include/asm-arm/arch-omap/memory.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-omap/memory.h	2004-07-01 21:32:49.000000000 +0100
@@ -57,12 +57,28 @@
 
 /*
  * OMAP-1510 bus address is translated into a Local Bus address if the
- * OMAP bus type is lbus. See dmadev_uses_omap_lbus().
+ * OMAP bus type is lbus. We do the address translation based on the
+ * device overriding the defaults used in the dma-mapping API.
  */
 #ifdef CONFIG_ARCH_OMAP1510
-#define bus_to_lbus(x)	((x) + (OMAP1510_LB_OFFSET - PHYS_OFFSET))
-#define lbus_to_bus(x)	((x) - (OMAP1510_LB_OFFSET - PHYS_OFFSET))
-#endif
+
+#define virt_to_lbus(x)		((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET)
+#define lbus_to_virt(x)		((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET)
+#define is_lbus_device(dev)	(cpu_is_omap1510() && dev->coherent_dma_mask == 0x0fffffff)
+
+#define __arch_page_to_dma(dev, page)	({is_lbus_device(dev) ? \
+					(dma_addr_t)virt_to_lbus(page_address(page)) : \
+					(dma_addr_t)__virt_to_bus(page_address(page));})
+
+#define __arch_dma_to_virt(dev, addr)	({is_lbus_device(dev) ? \
+					lbus_to_virt(addr) : \
+					__bus_to_virt(addr);})
+
+#define __arch_virt_to_dma(dev, addr)	({is_lbus_device(dev) ? \
+					virt_to_lbus(addr) : \
+					__virt_to_bus(addr);})
+
+#endif	/* CONFIG_ARCH_OMAP1510 */
 
 #define PHYS_TO_NID(addr) (0)
 #endif
--- diff/include/asm-arm/arch-pxa/hardware.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-pxa/hardware.h	2004-07-01 21:32:49.000000000 +0100
@@ -83,6 +83,11 @@
 extern void pxa_gpio_mode( int gpio_mode );
 
 /*
+ * Routine to enable or disable CKEN
+ */
+extern void pxa_set_cken(int clock, int enable);
+
+/*
  * return current memory and LCD clock frequency in units of 10kHz
  */
 extern unsigned int get_memclk_frequency_10khz(void);
--- diff/include/asm-arm/cacheflush.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/cacheflush.h	2004-07-01 21:32:49.000000000 +0100
@@ -294,9 +294,9 @@
 extern void flush_dcache_page(struct page *);
 
 #define flush_dcache_mmap_lock(mapping) \
-	spin_lock_irq(&(mapping)->tree_lock)
+	write_lock_irq(&(mapping)->tree_lock)
 #define flush_dcache_mmap_unlock(mapping) \
-	spin_unlock_irq(&(mapping)->tree_lock)
+	write_unlock_irq(&(mapping)->tree_lock)
 
 #define flush_icache_user_range(vma,page,addr,len) \
 	flush_dcache_page(page)
--- diff/include/asm-arm/checksum.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/checksum.h	2004-07-01 21:32:49.000000000 +0100
@@ -9,6 +9,8 @@
 #ifndef __ASM_ARM_CHECKSUM_H
 #define __ASM_ARM_CHECKSUM_H
 
+#include <linux/in6.h>
+
 /*
  * computes the checksum of a memory block at buff, length len,
  * and adds in "sum" (32-bit)
--- diff/include/asm-arm/cpu-multi32.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/cpu-multi32.h	2004-07-01 21:32:49.000000000 +0100
@@ -7,9 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#ifndef __ASSEMBLY__
-
-#include <asm/memory.h>
 #include <asm/page.h>
 
 struct mm_struct;
@@ -64,16 +61,4 @@
 #define cpu_do_idle()			processor._do_idle()
 #define cpu_dcache_clean_area(addr,sz)	processor.dcache_clean_area(addr,sz)
 #define cpu_set_pte(ptep, pte)		processor.set_pte(ptep, pte)
-
-#define cpu_switch_mm(pgd,mm)	processor.switch_mm(__virt_to_phys((unsigned long)(pgd)),mm)
-
-#define cpu_get_pgd()	\
-	({						\
-		unsigned long pg;			\
-		__asm__("mrc	p15, 0, %0, c2, c0, 0"	\
-			 : "=r" (pg) : : "cc");		\
-		pg &= ~0x3fff;				\
-		(pgd_t *)phys_to_virt(pg);		\
-	})
-
-#endif
+#define cpu_do_switch_mm(pgd,mm)	processor.switch_mm(pgd,mm)
--- diff/include/asm-arm/cpu-single.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/cpu-single.h	2004-07-01 21:32:49.000000000 +0100
@@ -27,12 +27,9 @@
 #define cpu_reset			__cpu_fn(CPU_NAME,_reset)
 #define cpu_do_idle			__cpu_fn(CPU_NAME,_do_idle)
 #define cpu_dcache_clean_area		__cpu_fn(CPU_NAME,_dcache_clean_area)
-#define cpu__switch_mm			__cpu_fn(CPU_NAME,_switch_mm)
+#define cpu_do_switch_mm		__cpu_fn(CPU_NAME,_switch_mm)
 #define cpu_set_pte			__cpu_fn(CPU_NAME,_set_pte)
 
-#ifndef __ASSEMBLY__
-
-#include <asm/memory.h>
 #include <asm/page.h>
 
 struct mm_struct;
@@ -42,20 +39,6 @@
 extern void cpu_proc_fin(void);
 extern int cpu_do_idle(void);
 extern void cpu_dcache_clean_area(void *, int);
-extern void cpu__switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
+extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
 extern void cpu_set_pte(pte_t *ptep, pte_t pte);
-
 extern volatile void cpu_reset(unsigned long addr);
-
-#define cpu_switch_mm(pgd,mm) cpu__switch_mm(__virt_to_phys((unsigned long)(pgd)),mm)
-
-#define cpu_get_pgd()	\
-	({						\
-		unsigned long pg;			\
-		__asm__("mrc	p15, 0, %0, c2, c0, 0"	\
-			 : "=r" (pg) : : "cc");		\
-		pg &= ~0x3fff;				\
-		(pgd_t *)phys_to_virt(pg);		\
-	})
-
-#endif
--- diff/include/asm-arm/dma-mapping.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/dma-mapping.h	2004-07-01 21:32:49.000000000 +0100
@@ -124,7 +124,7 @@
 	       enum dma_data_direction dir)
 {
 	consistent_sync(cpu_addr, size, dir);
-	return __virt_to_bus((unsigned long)cpu_addr);
+	return virt_to_dma(dev, (unsigned long)cpu_addr);
 }
 #else
 extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_direction);
@@ -231,7 +231,7 @@
 	for (i = 0; i < nents; i++, sg++) {
 		char *virt;
 
-		sg->dma_address = page_to_bus(sg->page) + sg->offset;
+		sg->dma_address = page_to_dma(dev, sg->page) + sg->offset;
 		virt = page_address(sg->page) + sg->offset;
 		consistent_sync(virt, sg->length, dir);
 	}
@@ -288,14 +288,14 @@
 dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size,
 			enum dma_data_direction dir)
 {
-	consistent_sync((void *)__bus_to_virt(handle), size, dir);
+	consistent_sync((void *)dma_to_virt(dev, handle), size, dir);
 }
 
 static inline void
 dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
 			   enum dma_data_direction dir)
 {
-	consistent_sync((void *)__bus_to_virt(handle), size, dir);
+	consistent_sync((void *)dma_to_virt(dev, handle), size, dir);
 }
 #else
 extern void dma_sync_single_for_cpu(struct device*, dma_addr_t, size_t, enum dma_data_direction);
--- diff/include/asm-arm/fcntl.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/fcntl.h	2004-07-01 21:32:49.000000000 +0100
@@ -20,6 +20,7 @@
 #define O_NOFOLLOW	0100000	/* don't follow links */
 #define O_DIRECT	0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE	0400000
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-arm/fpstate.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/fpstate.h	2004-07-01 21:32:49.000000000 +0100
@@ -13,6 +13,36 @@
 
 #define FP_SIZE 35
 
+#ifndef __ASSEMBLY__
+
+/*
+ * VFP storage area has:
+ *  - FPEXC, FPSCR, FPINST and FPINST2.
+ *  - 16 double precision data registers
+ *  - an implementation-dependant word of state for FLDMX/FSTMX
+ * 
+ *  FPEXC will always be non-zero once the VFP has been used in this process.
+ */
+
+struct vfp_hard_struct {
+	__u64 fpregs[16];
+	__u32 fpmx_state;
+	__u32 fpexc;
+	__u32 fpscr;
+	/*
+	 * VFP implementation specific state
+	 */
+	__u32 fpinst;
+	__u32 fpinst2;
+};
+
+union vfp_state {
+	struct vfp_hard_struct	hard;
+};
+
+extern void vfp_flush_thread(union vfp_state *);
+extern void vfp_release_thread(union vfp_state *);
+
 struct fp_hard_struct {
 	unsigned int save[FP_SIZE];		/* as yet undefined */
 };
@@ -27,3 +57,5 @@
 };
 
 #endif
+
+#endif
--- diff/include/asm-arm/mach/arch.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/mach/arch.h	2004-07-01 21:32:49.000000000 +0100
@@ -45,6 +45,7 @@
 					 struct meminfo *);
 	void			(*map_io)(void);/* IO mapping function	*/
 	void			(*init_irq)(void);
+	void			(*init_time)(void);
 	void			(*init_machine)(void);
 };
 
@@ -87,6 +88,9 @@
 #define INITIRQ(_func)				\
 	.init_irq	= _func,
 
+#define INITTIME(_func)				\
+	.init_time	= _func,
+
 #define INIT_MACHINE(_func)			\
 	.init_machine	= _func,
 
--- diff/include/asm-arm/memory.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/memory.h	2004-07-01 21:32:49.000000000 +0100
@@ -159,9 +159,18 @@
 #define page_to_phys(page)	(page_to_pfn(page) << PAGE_SHIFT)
 
 /*
+ * Optional device DMA address remapping. Do _not_ use directly!
  * We should really eliminate virt_to_bus() here - it's deprecated.
  */
-#define page_to_bus(page)	(virt_to_bus(page_address(page)))
+#ifndef __arch_page_to_dma
+#define page_to_dma(dev, page)		((dma_addr_t)__virt_to_bus(page_address(page)))
+#define dma_to_virt(dev, addr)		(__bus_to_virt(addr))
+#define virt_to_dma(dev, addr)		(__virt_to_bus(addr))
+#else
+#define page_to_dma(dev, page)		(__arch_page_to_dma(dev, page))
+#define dma_to_virt(dev, addr)		(__arch_dma_to_virt(dev, addr))
+#define virt_to_dma(dev, addr)		(__arch_virt_to_dma(dev, addr))
+#endif
 
 #endif
 
--- diff/include/asm-arm/proc-fns.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/proc-fns.h	2004-07-01 21:32:49.000000000 +0100
@@ -148,11 +148,27 @@
 # endif
 #endif
 
+#ifndef __ASSEMBLY__
+
 #ifndef MULTI_CPU
 #include "asm/cpu-single.h"
 #else
 #include "asm/cpu-multi32.h"
 #endif
 
+#include <asm/memory.h>
+
+#define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm)
+
+#define cpu_get_pgd()	\
+	({						\
+		unsigned long pg;			\
+		__asm__("mrc	p15, 0, %0, c2, c0, 0"	\
+			 : "=r" (pg) : : "cc");		\
+		pg &= ~0x3fff;				\
+		(pgd_t *)phys_to_virt(pg);		\
+	})
+
+#endif /* __ASSEMBLY__ */
 #endif /* __KERNEL__ */
 #endif /* __ASM_PROCFNS_H */
--- diff/include/asm-arm/resource.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/resource.h	2004-07-01 21:32:49.000000000 +0100
@@ -16,8 +16,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 #ifdef __KERNEL__
 
@@ -40,6 +42,8 @@
 	{ RLIM_INFINITY, RLIM_INFINITY },	\
 	{ RLIM_INFINITY, RLIM_INFINITY },	\
 	{ RLIM_INFINITY, RLIM_INFINITY },	\
+	{ MAX_SIGPENDING, MAX_SIGPENDING},	\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX},		\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-arm/thread_info.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/thread_info.h	2004-07-01 21:32:49.000000000 +0100
@@ -12,12 +12,13 @@
 
 #ifdef __KERNEL__
 
+#include <asm/fpstate.h>
+
 #ifndef __ASSEMBLY__
 
 struct task_struct;
 struct exec_domain;
 
-#include <asm/fpstate.h>
 #include <asm/ptrace.h>
 #include <asm/types.h>
 #include <asm/domain.h>
@@ -53,7 +54,8 @@
 	struct cpu_context_save	cpu_context;	/* cpu context */
 	__u8			used_cp[16];	/* thread used copro */
 	union fp_state		fpstate;
-	struct restart_block    restart_block;
+	union vfp_state		vfpstate;
+	struct restart_block	restart_block;
 };
 
 #define INIT_THREAD_INFO(tsk)						\
@@ -110,6 +112,7 @@
 #define TI_CPU_SAVE	28
 #define TI_USED_CP	76
 #define TI_FPSTATE	(TI_USED_CP+16)
+#define TI_VFPSTATE	(TI_FPSTATE+FP_SIZE*4)
 
 #endif
 
--- diff/include/asm-arm26/fcntl.h	2004-05-19 22:12:38.000000000 +0100
+++ source/include/asm-arm26/fcntl.h	2004-07-01 21:32:49.000000000 +0100
@@ -20,6 +20,7 @@
 #define O_NOFOLLOW	0100000	/* don't follow links */
 #define O_DIRECT	0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE	0400000
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-arm26/resource.h	2004-05-19 22:12:38.000000000 +0100
+++ source/include/asm-arm26/resource.h	2004-07-01 21:32:49.000000000 +0100
@@ -16,8 +16,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 #ifdef __KERNEL__
 
@@ -40,6 +42,8 @@
 	{ RLIM_INFINITY, RLIM_INFINITY },	\
 	{ RLIM_INFINITY, RLIM_INFINITY },	\
 	{ RLIM_INFINITY, RLIM_INFINITY },	\
+	{ MAX_SIGPENDING, MAX_SIGPENDING},	\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX},		\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-arm26/tlb.h	2004-05-19 22:12:38.000000000 +0100
+++ source/include/asm-arm26/tlb.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,6 +1,7 @@
 #ifndef __ASMARM_TLB_H
 #define __ASMARM_TLB_H
 
+#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 
 /*
--- diff/include/asm-cris/fcntl.h	2004-05-19 22:12:38.000000000 +0100
+++ source/include/asm-cris/fcntl.h	2004-07-01 21:32:49.000000000 +0100
@@ -22,6 +22,7 @@
 #define O_LARGEFILE	0100000
 #define O_DIRECTORY	0200000	/* must be a directory */
 #define O_NOFOLLOW	0400000 /* don't follow links */
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get f_flags */
--- diff/include/asm-cris/resource.h	2004-05-19 22:12:38.000000000 +0100
+++ source/include/asm-cris/resource.h	2004-07-01 21:32:49.000000000 +0100
@@ -15,9 +15,11 @@
 #define RLIMIT_NOFILE	7		/* max number of open files */
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
-#define RLIMIT_LOCKS   10              /* maximum file locks held */
+#define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -38,8 +40,10 @@
 	{             0,             0 },		\
 	{      INR_OPEN,     INR_OPEN  },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },               \
-        { RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-cris/setup.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-cris/setup.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,3 +1,6 @@
 #ifndef _CRIS_SETUP_H
 #define _CRIS_SETUP_H
+
+#define COMMAND_LINE_SIZE	256
+
 #endif
--- diff/include/asm-generic/bitops.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-generic/bitops.h	2004-07-01 21:32:49.000000000 +0100
@@ -42,7 +42,7 @@
 	return retval;
 }
 
-extern __inline__ int test_bit(int nr, long * addr)
+extern __inline__ int test_bit(int nr, const unsigned long * addr)
 {
 	int	mask;
 
--- diff/include/asm-generic/tlb.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-generic/tlb.h	2004-07-01 21:32:49.000000000 +0100
@@ -15,6 +15,7 @@
 
 #include <linux/config.h>
 #include <linux/swap.h>
+#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 
 /*
@@ -146,4 +147,6 @@
 		__pmd_free_tlb(tlb, pmdp);			\
 	} while (0)
 
+#define tlb_migrate_finish(mm) do { } while (0)
+
 #endif /* _ASM_GENERIC__TLB_H */
--- diff/include/asm-h8300/fcntl.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-h8300/fcntl.h	2004-07-01 21:32:49.000000000 +0100
@@ -20,6 +20,7 @@
 #define O_NOFOLLOW	0100000	/* don't follow links */
 #define O_DIRECT	0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE	0400000
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-h8300/io.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-h8300/io.h	2004-07-01 21:32:49.000000000 +0100
@@ -35,27 +35,38 @@
 
 static inline unsigned short _swapw(volatile unsigned short v)
 {
-	unsigned short r,t;
-	__asm__("mov.b %w2,%x1\n\t"
-		"mov.b %x2,%w1\n\t"
-		"mov.w %1,%0"
-		:"=r"(r),"=r"(t)
-		:"r"(v));
+#ifndef H8300_IO_NOSWAP
+	unsigned short r;
+	__asm__("xor.b %w0,%x0\n\t"
+		"xor.b %x0,%w0\n\t"
+		"xor.b %w0,%x0"
+		:"=r"(r)
+		:"0"(v));
 	return r;
-}
-
-static inline unsigned int _swapl(volatile unsigned long v)
-{
-	unsigned int r,t;
-	__asm__("mov.b %w2,%x1\n\t"
-		"mov.b %x2,%w1\n\t"
-		"mov.w %f1,%e0\n\t"
-		"mov.w %e2,%f1\n\t"
-		"mov.b %w1,%x0\n\t"
-		"mov.b %x1,%w0"
-		:"=r"(r),"=r"(t)
-		:"r"(v));
+#else
+	return v;
+#endif
+}
+
+static inline unsigned long _swapl(volatile unsigned long v)
+{
+#ifndef H8300_IO_NOSWAP
+	unsigned long r;
+	__asm__("xor.b %w0,%x0\n\t"
+		"xor.b %x0,%w0\n\t"
+		"xor.b %w0,%x0\n\t"
+		"xor.w %e0,%f0\n\t"
+		"xor.w %f0,%e0\n\t"
+		"xor.w %e0,%f0\n\t"
+		"xor.b %w0,%x0\n\t"
+		"xor.b %x0,%w0\n\t"
+		"xor.b %w0,%x0"
+		:"=r"(r)
+		:"0"(v));
 	return r;
+#else
+	return v;
+#endif
 }
 
 #define readb(addr) \
@@ -109,12 +120,28 @@
 
 static inline void io_outsl(unsigned int addr, const void *buf, int len)
 {
-	volatile unsigned int *ap = (volatile unsigned int *) addr;
+	volatile unsigned long *ap = (volatile unsigned long *) addr;
 	unsigned long *bp = (unsigned long *) buf;
 	while (len--)
 		*ap = _swapl(*bp++);
 }
 
+static inline void io_outsw_noswap(unsigned int addr, const void *buf, int len)
+{
+	volatile unsigned short *ap = (volatile unsigned short *) addr;
+	unsigned short *bp = (unsigned short *) buf;
+	while (len--)
+		*ap = *bp++;
+}
+
+static inline void io_outsl_noswap(unsigned int addr, const void *buf, int len)
+{
+	volatile unsigned long *ap = (volatile unsigned long *) addr;
+	unsigned long *bp = (unsigned long *) buf;
+	while (len--)
+		*ap = *bp++;
+}
+
 static inline void io_insb(unsigned int addr, void *buf, int len)
 {
 	volatile unsigned char  *ap_b;
@@ -142,12 +169,28 @@
 
 static inline void io_insl(unsigned int addr, void *buf, int len)
 {
-	volatile unsigned int *ap = (volatile unsigned int *) addr;
+	volatile unsigned long *ap = (volatile unsigned long *) addr;
 	unsigned long *bp = (unsigned long *) buf;
 	while (len--)
 		*bp++ = _swapl(*ap);
 }
 
+static inline void io_insw_noswap(unsigned int addr, void *buf, int len)
+{
+	volatile unsigned short *ap = (volatile unsigned short *) addr;
+	unsigned short *bp = (unsigned short *) buf;
+	while (len--)
+		*bp++ = *ap;
+}
+
+static inline void io_insl_noswap(unsigned int addr, void *buf, int len)
+{
+	volatile unsigned long *ap = (volatile unsigned long *) addr;
+	unsigned long *bp = (unsigned long *) buf;
+	while (len--)
+		*bp++ = *ap;
+}
+
 /*
  *	make the short names macros so specific devices
  *	can override them as required
@@ -160,7 +203,8 @@
 #define inb(addr)    ((h8300_buswidth(addr))?readw((addr) & ~1) & 0xff:readb(addr))
 #define inw(addr)    _swapw(readw(addr))
 #define inl(addr)    _swapl(readl(addr))
-#define outb(x,addr) ((void)((h8300_buswidth(addr) && ((addr) & 1))?writew(x,(addr) & ~1):writeb(x,addr)))
+#define outb(x,addr) ((void)((h8300_buswidth(addr) && \
+                      ((addr) & 1))?writew(x,(addr) & ~1):writeb(x,addr)))
 #define outw(x,addr) ((void) writew(_swapw(x),addr))
 #define outl(x,addr) ((void) writel(_swapl(x),addr))
 
@@ -227,7 +271,7 @@
 	return *(volatile unsigned short*)addr;
 }
 
-static __inline__ unsigned int ctrl_inl(unsigned long addr)
+static __inline__ unsigned long ctrl_inl(unsigned long addr)
 {
 	return *(volatile unsigned long*)addr;
 }
@@ -242,7 +286,7 @@
 	*(volatile unsigned short*)addr = b;
 }
 
-static __inline__ void ctrl_outl(unsigned int b, unsigned long addr)
+static __inline__ void ctrl_outl(unsigned long b, unsigned long addr)
 {
         *(volatile unsigned long*)addr = b;
 }
--- diff/include/asm-h8300/resource.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-h8300/resource.h	2004-07-01 21:32:49.000000000 +0100
@@ -16,8 +16,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -39,7 +41,9 @@
 	{      INR_OPEN,     INR_OPEN  },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
-        { RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-h8300/setup.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-h8300/setup.h	2004-07-01 21:32:49.000000000 +0100
@@ -1 +1,6 @@
-/* Nothing do */
+#ifndef __H8300_SETUP_H
+#define __H8300_SETUP_H
+
+#define COMMAND_LINE_SIZE	512
+
+#endif
--- diff/include/asm-i386/apic.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/apic.h	2004-07-01 21:32:49.000000000 +0100
@@ -41,6 +41,8 @@
 	do { } while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY );
 }
 
+int get_physical_broadcast(void);
+
 #ifdef CONFIG_X86_GOOD_APIC
 # define FORCE_READ_AROUND_WRITE 0
 # define apic_read_around(x)
--- diff/include/asm-i386/bitops.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/bitops.h	2004-07-01 21:32:49.000000000 +0100
@@ -34,7 +34,7 @@
  * Note that @nr may be almost arbitrarily large; this function is not
  * restricted to acting on a single-word quantity.
  */
-static __inline__ void set_bit(int nr, volatile unsigned long * addr)
+static inline void set_bit(int nr, volatile unsigned long * addr)
 {
 	__asm__ __volatile__( LOCK_PREFIX
 		"btsl %1,%0"
@@ -51,7 +51,7 @@
  * If it's called on the same region of memory simultaneously, the effect
  * may be that only one operation succeeds.
  */
-static __inline__ void __set_bit(int nr, volatile unsigned long * addr)
+static inline void __set_bit(int nr, volatile unsigned long * addr)
 {
 	__asm__(
 		"btsl %1,%0"
@@ -69,7 +69,7 @@
  * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
  * in order to ensure changes are visible on other processors.
  */
-static __inline__ void clear_bit(int nr, volatile unsigned long * addr)
+static inline void clear_bit(int nr, volatile unsigned long * addr)
 {
 	__asm__ __volatile__( LOCK_PREFIX
 		"btrl %1,%0"
@@ -77,7 +77,7 @@
 		:"Ir" (nr));
 }
 
-static __inline__ void __clear_bit(int nr, volatile unsigned long * addr)
+static inline void __clear_bit(int nr, volatile unsigned long * addr)
 {
 	__asm__ __volatile__(
 		"btrl %1,%0"
@@ -96,7 +96,7 @@
  * If it's called on the same region of memory simultaneously, the effect
  * may be that only one operation succeeds.
  */
-static __inline__ void __change_bit(int nr, volatile unsigned long * addr)
+static inline void __change_bit(int nr, volatile unsigned long * addr)
 {
 	__asm__ __volatile__(
 		"btcl %1,%0"
@@ -113,7 +113,7 @@
  * Note that @nr may be almost arbitrarily large; this function is not
  * restricted to acting on a single-word quantity.
  */
-static __inline__ void change_bit(int nr, volatile unsigned long * addr)
+static inline void change_bit(int nr, volatile unsigned long * addr)
 {
 	__asm__ __volatile__( LOCK_PREFIX
 		"btcl %1,%0"
@@ -129,7 +129,7 @@
  * This operation is atomic and cannot be reordered.  
  * It also implies a memory barrier.
  */
-static __inline__ int test_and_set_bit(int nr, volatile unsigned long * addr)
+static inline int test_and_set_bit(int nr, volatile unsigned long * addr)
 {
 	int oldbit;
 
@@ -149,7 +149,7 @@
  * If two examples of this operation race, one can appear to succeed
  * but actually fail.  You must protect multiple accesses with a lock.
  */
-static __inline__ int __test_and_set_bit(int nr, volatile unsigned long * addr)
+static inline int __test_and_set_bit(int nr, volatile unsigned long * addr)
 {
 	int oldbit;
 
@@ -168,7 +168,7 @@
  * This operation is atomic and cannot be reordered.  
  * It also implies a memory barrier.
  */
-static __inline__ int test_and_clear_bit(int nr, volatile unsigned long * addr)
+static inline int test_and_clear_bit(int nr, volatile unsigned long * addr)
 {
 	int oldbit;
 
@@ -188,7 +188,7 @@
  * If two examples of this operation race, one can appear to succeed
  * but actually fail.  You must protect multiple accesses with a lock.
  */
-static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long *addr)
+static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr)
 {
 	int oldbit;
 
@@ -200,7 +200,7 @@
 }
 
 /* WARNING: non atomic and it can be reordered! */
-static __inline__ int __test_and_change_bit(int nr, volatile unsigned long *addr)
+static inline int __test_and_change_bit(int nr, volatile unsigned long *addr)
 {
 	int oldbit;
 
@@ -219,7 +219,7 @@
  * This operation is atomic and cannot be reordered.  
  * It also implies a memory barrier.
  */
-static __inline__ int test_and_change_bit(int nr, volatile unsigned long* addr)
+static inline int test_and_change_bit(int nr, volatile unsigned long* addr)
 {
 	int oldbit;
 
@@ -244,7 +244,7 @@
 	return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
 }
 
-static __inline__ int variable_test_bit(int nr, const volatile unsigned long * addr)
+static inline int variable_test_bit(int nr, const volatile unsigned long * addr)
 {
 	int oldbit;
 
@@ -270,7 +270,7 @@
  * Returns the bit-number of the first zero bit, not the number of the byte
  * containing a bit.
  */
-static __inline__ int find_first_zero_bit(const unsigned long *addr, unsigned size)
+static inline int find_first_zero_bit(const unsigned long *addr, unsigned size)
 {
 	int d0, d1, d2;
 	int res;
@@ -295,6 +295,14 @@
 }
 
 /**
+ * find_next_zero_bit - find the first zero bit in a memory region
+ * @addr: The address to base the search on
+ * @offset: The bitnumber to start searching at
+ * @size: The maximum size to search
+ */
+int find_next_zero_bit(const unsigned long *addr, int size, int offset);
+
+/**
  * find_first_bit - find the first set bit in a memory region
  * @addr: The address to start the search at
  * @size: The maximum size to search
@@ -302,7 +310,7 @@
  * Returns the bit-number of the first set bit, not the number of the byte
  * containing a bit.
  */
-static __inline__ int find_first_bit(const unsigned long *addr, unsigned size)
+static inline int find_first_bit(const unsigned long *addr, unsigned size)
 {
 	int d0, d1;
 	int res;
@@ -323,70 +331,12 @@
 }
 
 /**
- * find_next_zero_bit - find the first zero bit in a memory region
- * @addr: The address to base the search on
- * @offset: The bitnumber to start searching at
- * @size: The maximum size to search
- */
-static __inline__ int find_next_zero_bit(const unsigned long *addr, int size, int offset)
-{
-	unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
-	int set = 0, bit = offset & 31, res;
-	
-	if (bit) {
-		/*
-		 * Look for zero in the first 32 bits.
-		 */
-		__asm__("bsfl %1,%0\n\t"
-			"jne 1f\n\t"
-			"movl $32, %0\n"
-			"1:"
-			: "=r" (set)
-			: "r" (~(*p >> bit)));
-		if (set < (32 - bit))
-			return set + offset;
-		set = 32 - bit;
-		p++;
-	}
-	/*
-	 * No zero yet, search remaining full bytes for a zero
-	 */
-	res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr));
-	return (offset + set + res);
-}
-
-/**
  * find_next_bit - find the first set bit in a memory region
  * @addr: The address to base the search on
  * @offset: The bitnumber to start searching at
  * @size: The maximum size to search
  */
-static __inline__ int find_next_bit(const unsigned long *addr, int size, int offset)
-{
-	const unsigned long *p = addr + (offset >> 5);
-	int set = 0, bit = offset & 31, res;
-
-	if (bit) {
-		/*
-		 * Look for nonzero in the first 32 bits:
-		 */
-		__asm__("bsfl %1,%0\n\t"
-			"jne 1f\n\t"
-			"movl $32, %0\n"
-			"1:"
-			: "=r" (set)
-			: "r" (*p >> bit));
-		if (set < (32 - bit))
-			return set + offset;
-		set = 32 - bit;
-		p++;
-	}
-	/*
-	 * No set bit yet, search remaining full words for a bit
-	 */
-	res = find_first_bit (p, size - 32 * (p - addr));
-	return (offset + set + res);
-}
+int find_next_bit(const unsigned long *addr, int size, int offset);
 
 /**
  * ffz - find first zero in word.
@@ -394,7 +344,7 @@
  *
  * Undefined if no zero exists, so code should check against ~0UL first.
  */
-static __inline__ unsigned long ffz(unsigned long word)
+static inline unsigned long ffz(unsigned long word)
 {
 	__asm__("bsfl %1,%0"
 		:"=r" (word)
@@ -408,7 +358,7 @@
  *
  * Undefined if no bit exists, so code should check against 0 first.
  */
-static __inline__ unsigned long __ffs(unsigned long word)
+static inline unsigned long __ffs(unsigned long word)
 {
 	__asm__("bsfl %1,%0"
 		:"=r" (word)
@@ -451,7 +401,7 @@
  * the libc and compiler builtin ffs routines, therefore
  * differs in spirit from the above ffz (man ffs).
  */
-static __inline__ int ffs(int x)
+static inline int ffs(int x)
 {
 	int r;
 
--- diff/include/asm-i386/bugs.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/bugs.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,11 +1,11 @@
 /*
  *  include/asm-i386/bugs.h
  *
- *  Copyright (C) 1994  Linus Torvalds
+ *  Copyright (C) 1994	Linus Torvalds
  *
  *  Cyrix stuff, June 1998 by:
  *	- Rafael R. Reilova (moved everything from head.S),
- *        <rreilova@ececs.uc.edu>
+ *	  <rreilova@ececs.uc.edu>
  *	- Channing Corn (tests & fixes),
  *	- Andrew D. Balsa (code cleanup).
  *
@@ -25,7 +25,20 @@
 #include <asm/processor.h>
 #include <asm/i387.h>
 #include <asm/msr.h>
-
+#ifdef CONFIG_KGDB
+/*
+ * Provied the command line "gdb" initial break
+ */
+int __init kgdb_initial_break(char * str)
+{
+	if (*str == '\0'){
+		breakpoint();
+		return 1;
+	}
+	return 0;
+}
+__setup("gdb",kgdb_initial_break);
+#endif
 static int __init no_halt(char *s)
 {
 	boot_cpu_data.hlt_works_ok = 0;
@@ -140,7 +153,7 @@
 	  : "ecx", "edi" );
 	/* If this fails, it means that any user program may lock the CPU hard. Too bad. */
 	if (res != 12345678) printk( "Buggy.\n" );
-		        else printk( "OK.\n" );
+			else printk( "OK.\n" );
 #endif
 }
 
--- diff/include/asm-i386/checksum.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/checksum.h	2004-07-01 21:32:49.000000000 +0100
@@ -172,8 +172,10 @@
  *	Copy and checksum to user
  */
 #define HAVE_CSUM_COPY_USER
-static __inline__ unsigned int csum_and_copy_to_user(const char *src, char *dst,
-				    int len, int sum, int *err_ptr)
+static __inline__ unsigned int csum_and_copy_to_user(const char *src, 
+						     char __user *dst,
+						     int len, int sum, 
+						     int *err_ptr)
 {
 	if (access_ok(VERIFY_WRITE, dst, len))
 		return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr);
--- diff/include/asm-i386/cpufeature.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/cpufeature.h	2004-07-01 21:32:49.000000000 +0100
@@ -47,6 +47,7 @@
 /* Don't duplicate feature flags which are redundant with Intel! */
 #define X86_FEATURE_SYSCALL	(1*32+11) /* SYSCALL/SYSRET */
 #define X86_FEATURE_MP		(1*32+19) /* MP Capable. */
+#define X86_FEATURE_NX		(1*32+20) /* Execute Disable */
 #define X86_FEATURE_MMXEXT	(1*32+22) /* AMD MMX extensions */
 #define X86_FEATURE_LM		(1*32+29) /* Long Mode (x86-64) */
 #define X86_FEATURE_3DNOWEXT	(1*32+30) /* AMD 3DNow! extensions */
@@ -100,6 +101,7 @@
 #define cpu_has_xmm		boot_cpu_has(X86_FEATURE_XMM)
 #define cpu_has_ht		boot_cpu_has(X86_FEATURE_HT)
 #define cpu_has_mp		boot_cpu_has(X86_FEATURE_MP)
+#define cpu_has_nx		boot_cpu_has(X86_FEATURE_NX)
 #define cpu_has_k6_mtrr		boot_cpu_has(X86_FEATURE_K6_MTRR)
 #define cpu_has_cyrix_arr	boot_cpu_has(X86_FEATURE_CYRIX_ARR)
 #define cpu_has_centaur_mcr	boot_cpu_has(X86_FEATURE_CENTAUR_MCR)
--- diff/include/asm-i386/delay.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/delay.h	2004-07-01 21:32:49.000000000 +0100
@@ -16,7 +16,7 @@
 extern void __delay(unsigned long loops);
 
 #define udelay(n) (__builtin_constant_p(n) ? \
-	((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
+	((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \
 	__udelay(n))
 	
 #define ndelay(n) (__builtin_constant_p(n) ? \
--- diff/include/asm-i386/desc.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/desc.h	2004-07-01 21:32:49.000000000 +0100
@@ -44,7 +44,8 @@
 
 static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr)
 {
-	_set_tssldt_desc(&cpu_gdt_table[cpu][entry], (int)addr, 235, 0x89);
+	_set_tssldt_desc(&cpu_gdt_table[cpu][entry], (int)addr,
+		offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89);
 }
 
 #define set_tss_desc(cpu,addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr)
--- diff/include/asm-i386/dma-mapping.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/dma-mapping.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,6 +1,9 @@
 #ifndef _ASM_I386_DMA_MAPPING_H
 #define _ASM_I386_DMA_MAPPING_H
 
+#include <linux/device.h>
+#include <linux/mm.h>
+
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/scatterlist.h>
--- diff/include/asm-i386/elf.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/elf.h	2004-07-01 21:32:49.000000000 +0100
@@ -117,7 +117,7 @@
 #define AT_SYSINFO_EHDR		33
 
 #ifdef __KERNEL__
-#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
+#define SET_PERSONALITY(ex, ibcs2) do { } while (0)
 
 extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
 extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
--- diff/include/asm-i386/fcntl.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/fcntl.h	2004-07-01 21:32:49.000000000 +0100
@@ -20,6 +20,7 @@
 #define O_LARGEFILE	0100000
 #define O_DIRECTORY	0200000	/* must be a directory */
 #define O_NOFOLLOW	0400000 /* don't follow links */
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-i386/genapic.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/genapic.h	2004-07-01 21:32:49.000000000 +0100
@@ -25,7 +25,6 @@
 	cpumask_t (*target_cpus)(void);
 	int int_delivery_mode;
 	int int_dest_mode; 
-	int apic_broadcast_id; 
 	int ESR_DISABLE;
 	int apic_destination_logical;
 	unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
@@ -63,7 +62,7 @@
 
 	unsigned (*get_apic_id)(unsigned long x);
 	unsigned long apic_id_mask;
-	unsigned int (*cpu_mask_to_apicid)(cpumask_const_t cpumask);
+	unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
 	
 	/* ipi */
 	void (*send_IPI_mask)(cpumask_t mask, int vector);
@@ -78,7 +77,6 @@
 	.probe = aprobe, \
 	.int_delivery_mode = INT_DELIVERY_MODE, \
 	.int_dest_mode = INT_DEST_MODE, \
-	.apic_broadcast_id = APIC_BROADCAST_ID, \
 	.no_balance_irq = NO_BALANCE_IRQ, \
 	.no_ioapic_check = NO_IOAPIC_CHECK, \
 	.ESR_DISABLE = esr_disable, \
--- diff/include/asm-i386/hpet.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/hpet.h	2004-07-01 21:32:49.000000000 +0100
@@ -57,9 +57,12 @@
 #define HPET_ID_LEGSUP	0x00008000
 #define HPET_ID_NUMBER	0x00001f00
 #define HPET_ID_REV	0x000000ff
+#define	HPET_ID_NUMBER_SHIFT	8
 
 #define HPET_CFG_ENABLE	0x001
 #define HPET_CFG_LEGACY	0x002
+#define	HPET_LEGACY_8254	2
+#define	HPET_LEGACY_RTC		8
 
 #define HPET_TN_ENABLE		0x004
 #define HPET_TN_PERIODIC	0x008
--- diff/include/asm-i386/ide.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/ide.h	2004-07-01 21:32:49.000000000 +0100
@@ -28,9 +28,6 @@
 static __inline__ int ide_default_irq(unsigned long base)
 {
 	switch (base) {
-#ifdef CONFIG_X86_PC9800
-		case 0x640: return 9;
-#endif
 		case 0x1f0: return 14;
 		case 0x170: return 15;
 		case 0x1e8: return 11;
@@ -45,48 +42,17 @@
 static __inline__ unsigned long ide_default_io_base(int index)
 {
 	switch (index) {
-#ifdef CONFIG_X86_PC9800
-		case 0:
-		case 1:	return 0x640;
-#else
 		case 0:	return 0x1f0;
 		case 1:	return 0x170;
 		case 2: return 0x1e8;
 		case 3: return 0x168;
 		case 4: return 0x1e0;
 		case 5: return 0x160;
-#endif
 		default:
 			return 0;
 	}
 }
 
-#ifdef CONFIG_X86_PC9800
-static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-	 unsigned long ctrl_port, int *irq)
-{
-	unsigned long reg = data_port;
-	int i;
-
-	unsigned long increment = data_port == 0x640 ? 2 : 1;
-
-	for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-		hw->io_ports[i] = reg;
-		reg += increment;
-	}
-	if (ctrl_port) {
-		hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-	} else if (data_port == 0x640) {
-		hw->io_ports[IDE_CONTROL_OFFSET] = 0x74c;
-	} else {
-		hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
-	}
-	if (irq != NULL)
-		*irq = 0;
-	hw->io_ports[IDE_IRQ_OFFSET] = 0;
-}
-#endif
-
 #define IDE_ARCH_OBSOLETE_INIT
 #define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
 
--- diff/include/asm-i386/io_apic.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/io_apic.h	2004-07-01 21:32:49.000000000 +0100
@@ -188,15 +188,6 @@
 	*(IO_APIC_BASE(apic)+4) = value;
 }
 
-/*
- * Synchronize the IO-APIC and the CPU by doing
- * a dummy read from the IO-APIC
- */
-static inline void io_apic_sync(unsigned int apic)
-{
-	(void) *(IO_APIC_BASE(apic)+4);
-}
-
 /* 1 if "noapic" boot option passed */
 extern int skip_ioapic_setup;
 
--- diff/include/asm-i386/mach-bigsmp/mach_apic.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/mach-bigsmp/mach_apic.h	2004-07-01 21:32:49.000000000 +0100
@@ -28,18 +28,17 @@
 	static unsigned long cpu = NR_CPUS;
 	do {
 		if (cpu >= NR_CPUS)
-			cpu = first_cpu_const(cpu_online_map);
+			cpu = first_cpu(cpu_online_map);
 		else
-			cpu = next_cpu_const(cpu, cpu_online_map);
+			cpu = next_cpu(cpu, cpu_online_map);
 	} while (cpu >= NR_CPUS);
-	return mk_cpumask_const(cpumask_of_cpu(cpu));
+	return cpumask_of_cpu(cpu);
 }
 #define TARGET_CPUS	(target_cpus())
 
 #define INT_DELIVERY_MODE dest_Fixed
 #define INT_DEST_MODE 1     /* logical delivery broadcast to all procs */
 
-#define APIC_BROADCAST_ID     (0xff)
 static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
 {
 	return 0;
@@ -150,12 +149,12 @@
 }
 
 /* As we are using single CPU as destination, pick only one CPU here */
-static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask)
+static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
 {
 	int cpu;
 	int apicid;	
 
-	cpu = first_cpu_const(cpumask);
+	cpu = first_cpu(cpumask);
 	apicid = cpu_to_logical_apicid(cpu);
 	return apicid;
 }
--- diff/include/asm-i386/mach-bigsmp/mach_mpspec.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-bigsmp/mach_mpspec.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,11 +1,6 @@
 #ifndef __ASM_MACH_MPSPEC_H
 #define __ASM_MACH_MPSPEC_H
 
-/*
- * a maximum of 16 APICs with the current APIC ID architecture.
- */
-#define MAX_APICS 16
-
 #define MAX_IRQ_SOURCES 256
 
 #define MAX_MP_BUSSES 32
--- diff/include/asm-i386/mach-default/irq_vectors.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-default/irq_vectors.h	2004-07-01 21:32:49.000000000 +0100
@@ -56,14 +56,15 @@
  * sources per level' errata.
  */
 #define LOCAL_TIMER_VECTOR	0xef
+#define LOCAL_PERFCTR_VECTOR	0xee
 
 /*
- * First APIC vector available to drivers: (vectors 0x30-0xee)
+ * First APIC vector available to drivers: (vectors 0x30-0xed)
  * we start at 0x31 to spread out vectors evenly between priority
  * levels. (0x80 is the syscall vector)
  */
 #define FIRST_DEVICE_VECTOR	0x31
-#define FIRST_SYSTEM_VECTOR	0xef
+#define FIRST_SYSTEM_VECTOR	0xee
 
 #define TIMER_IRQ 0
 
--- diff/include/asm-i386/mach-default/mach_apic.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-default/mach_apic.h	2004-07-01 21:32:49.000000000 +0100
@@ -2,15 +2,16 @@
 #define __ASM_MACH_APIC_H
 
 #include <mach_apicdef.h>
+#include <asm/smp.h>
 
 #define APIC_DFR_VALUE	(APIC_DFR_FLAT)
 
-static inline cpumask_const_t target_cpus(void)
+static inline cpumask_t target_cpus(void)
 { 
 #ifdef CONFIG_SMP
-	return mk_cpumask_const(cpu_online_map);
+	return cpu_online_map;
 #else
-	return mk_cpumask_const(cpumask_of_cpu(0));
+	return cpumask_of_cpu(0);
 #endif
 } 
 #define TARGET_CPUS (target_cpus())
@@ -23,12 +24,6 @@
 #define INT_DELIVERY_MODE dest_LowestPrio
 #define INT_DEST_MODE 1     /* logical delivery broadcast to all procs */
 
-/*
- * this isn't really broadcast, just a (potentially inaccurate) upper
- * bound for valid physical APIC id's
- */
-#define APIC_BROADCAST_ID      0x0F
-
 static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
 {
 	return physid_isset(apicid, bitmap);
@@ -85,7 +80,10 @@
 
 static inline int cpu_present_to_apicid(int mps_cpu)
 {
-	return  mps_cpu;
+	if (mps_cpu < get_physical_broadcast())
+		return  mps_cpu;
+	else
+		return BAD_APICID;
 }
 
 static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
@@ -118,9 +116,9 @@
 	return physid_isset(GET_APIC_ID(apic_read(APIC_ID)), phys_cpu_present_map);
 }
 
-static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask)
+static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
 {
-	return cpus_coerce_const(cpumask);
+	return cpus_addr(cpumask)[0];
 }
 
 static inline void enable_apic_mode(void)
--- diff/include/asm-i386/mach-default/mach_mpspec.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-default/mach_mpspec.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,11 +1,6 @@
 #ifndef __ASM_MACH_MPSPEC_H
 #define __ASM_MACH_MPSPEC_H
 
-/*
- * a maximum of 16 APICs with the current APIC ID architecture.
- */
-#define MAX_APICS 16
-
 #define MAX_IRQ_SOURCES 256
 
 #define MAX_MP_BUSSES 32
--- diff/include/asm-i386/mach-default/setup_arch_post.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-default/setup_arch_post.h	2004-07-01 21:32:49.000000000 +0100
@@ -6,7 +6,7 @@
  *	use of all of the static functions.
  **/
 
-static inline char * __init machine_specific_memory_setup(void)
+static char * __init machine_specific_memory_setup(void)
 {
 	char *who;
 
--- diff/include/asm-i386/mach-es7000/mach_apic.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/mach-es7000/mach_apic.h	2004-07-01 21:32:49.000000000 +0100
@@ -38,7 +38,6 @@
 #define WAKE_SECONDARY_VIA_INIT
 #endif
 
-#define APIC_BROADCAST_ID	(0xff)
 #define NO_IOAPIC_CHECK (1)
 
 static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
@@ -89,7 +88,7 @@
 	int apic = bios_cpu_apicid[smp_processor_id()];
 	printk("Enabling APIC mode:  %s.  Using %d I/O APICs, target cpus %lx\n",
 		(apic_version[apic] == 0x14) ? 
-		"Physical Cluster" : "Logical Cluster", nr_ioapics, cpus_coerce(TARGET_CPUS));
+		"Physical Cluster" : "Logical Cluster", nr_ioapics, cpus_addr(TARGET_CPUS)[0]);
 }
 
 static inline int multi_timer_check(int apic, int irq)
@@ -159,14 +158,14 @@
 	return (1);
 }
 
-static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask)
+static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
 {
 	int num_bits_set;
 	int cpus_found = 0;
 	int cpu;
 	int apicid;	
 
-	num_bits_set = cpus_weight_const(cpumask);
+	num_bits_set = cpus_weight(cpumask);
 	/* Return id to all */
 	if (num_bits_set == NR_CPUS)
 #if defined CONFIG_ES7000_CLUSTERED_APIC
@@ -178,10 +177,10 @@
 	 * The cpus in the mask must all be on the apic cluster.  If are not 
 	 * on the same apicid cluster return default value of TARGET_CPUS. 
 	 */
-	cpu = first_cpu_const(cpumask);
+	cpu = first_cpu(cpumask);
 	apicid = cpu_to_logical_apicid(cpu);
 	while (cpus_found < num_bits_set) {
-		if (cpu_isset_const(cpu, cpumask)) {
+		if (cpu_isset(cpu, cpumask)) {
 			int new_apicid = cpu_to_logical_apicid(cpu);
 			if (apicid_cluster(apicid) != 
 					apicid_cluster(new_apicid)){
--- diff/include/asm-i386/mach-es7000/mach_ipi.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/mach-es7000/mach_ipi.h	2004-07-01 21:32:49.000000000 +0100
@@ -10,9 +10,8 @@
 
 static inline void send_IPI_allbutself(int vector)
 {
-	cpumask_t mask = cpumask_of_cpu(smp_processor_id());
-	cpus_complement(mask);
-	cpus_and(mask, mask, cpu_online_map);
+	cpumask_t mask = cpu_online_map;
+	cpu_clear(smp_processor_id(), mask);
 	if (!cpus_empty(mask))
 		send_IPI_mask(mask, vector);
 }
--- diff/include/asm-i386/mach-es7000/mach_mpspec.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-es7000/mach_mpspec.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,11 +1,6 @@
 #ifndef __ASM_MACH_MPSPEC_H
 #define __ASM_MACH_MPSPEC_H
 
-/*
- * a maximum of 256 APICs with the current APIC ID architecture.
- */
-#define MAX_APICS 256
-
 #define MAX_IRQ_SOURCES 256
 
 #define MAX_MP_BUSSES 32
--- diff/include/asm-i386/mach-generic/mach_apic.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/mach-generic/mach_apic.h	2004-07-01 21:32:49.000000000 +0100
@@ -6,7 +6,6 @@
 #define esr_disable (genapic->ESR_DISABLE)
 #define NO_BALANCE_IRQ (genapic->no_balance_irq)
 #define NO_IOAPIC_CHECK	(genapic->no_ioapic_check)
-#define APIC_BROADCAST_ID (genapic->apic_broadcast_id)
 #define INT_DELIVERY_MODE (genapic->int_delivery_mode)
 #define INT_DEST_MODE (genapic->int_dest_mode)
 #undef APIC_DEST_LOGICAL
--- diff/include/asm-i386/mach-generic/mach_mpspec.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-generic/mach_mpspec.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,11 +1,6 @@
 #ifndef __ASM_MACH_MPSPEC_H
 #define __ASM_MACH_MPSPEC_H
 
-/*
- * a maximum of 256 APICs with the current APIC ID architecture.
- */
-#define MAX_APICS 256
-
 #define MAX_IRQ_SOURCES 256
 
 /* Summit or generic (i.e. installer) kernels need lots of bus entries. */
--- diff/include/asm-i386/mach-numaq/mach_apic.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-numaq/mach_apic.h	2004-07-01 21:32:49.000000000 +0100
@@ -8,8 +8,7 @@
 
 static inline cpumask_t target_cpus(void)
 {
-	cpumask_t tmp = CPU_MASK_ALL;
-	return tmp;
+	return CPU_MASK_ALL;
 }
 
 #define TARGET_CPUS (target_cpus())
@@ -22,7 +21,6 @@
 #define INT_DELIVERY_MODE dest_LowestPrio
 #define INT_DEST_MODE 0     /* physical delivery on LOCAL quad */
  
-#define APIC_BROADCAST_ID      0x0F
 #define check_apicid_used(bitmap, apicid) physid_isset(apicid, bitmap)
 #define check_apicid_present(bit) physid_isset(bit, phys_cpu_present_map)
 #define apicid_cluster(apicid) (apicid & 0xF0)
@@ -136,7 +134,7 @@
  * We use physical apicids here, not logical, so just return the default
  * physical broadcast to stop people from breaking us
  */
-static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask)
+static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
 {
 	return (int) 0xF;
 }
--- diff/include/asm-i386/mach-numaq/mach_mpspec.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-numaq/mach_mpspec.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,11 +1,6 @@
 #ifndef __ASM_MACH_MPSPEC_H
 #define __ASM_MACH_MPSPEC_H
 
-/*
- * a maximum of 256 APICs with the current APIC ID architecture.
- */
-#define MAX_APICS 256
-
 #define MAX_IRQ_SOURCES 512
 
 #define MAX_MP_BUSSES 32
--- diff/include/asm-i386/mach-summit/mach_apic.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-summit/mach_apic.h	2004-07-01 21:32:49.000000000 +0100
@@ -19,15 +19,13 @@
 
 static inline cpumask_t target_cpus(void)
 {
-	cpumask_t tmp = CPU_MASK_ALL;
-	return tmp;
+	return CPU_MASK_ALL;
 } 
 #define TARGET_CPUS	(target_cpus())
 
 #define INT_DELIVERY_MODE (dest_Fixed)
 #define INT_DEST_MODE 1     /* logical delivery broadcast to all procs */
 
-#define APIC_BROADCAST_ID     (0xFF)
 static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
 {
 	return 0;
@@ -140,14 +138,14 @@
 {
 }
 
-static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask)
+static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
 {
 	int num_bits_set;
 	int cpus_found = 0;
 	int cpu;
 	int apicid;	
 
-	num_bits_set = cpus_weight_const(cpumask);
+	num_bits_set = cpus_weight(cpumask);
 	/* Return id to all */
 	if (num_bits_set == NR_CPUS)
 		return (int) 0xFF;
@@ -155,10 +153,10 @@
 	 * The cpus in the mask must all be on the apic cluster.  If are not 
 	 * on the same apicid cluster return default value of TARGET_CPUS. 
 	 */
-	cpu = first_cpu_const(cpumask);
+	cpu = first_cpu(cpumask);
 	apicid = cpu_to_logical_apicid(cpu);
 	while (cpus_found < num_bits_set) {
-		if (cpu_isset_const(cpu, cpumask)) {
+		if (cpu_isset(cpu, cpumask)) {
 			int new_apicid = cpu_to_logical_apicid(cpu);
 			if (apicid_cluster(apicid) != 
 					apicid_cluster(new_apicid)){
--- diff/include/asm-i386/mach-summit/mach_mpspec.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-summit/mach_mpspec.h	2004-07-01 21:32:49.000000000 +0100
@@ -1,11 +1,6 @@
 #ifndef __ASM_MACH_MPSPEC_H
 #define __ASM_MACH_MPSPEC_H
 
-/*
- * a maximum of 256 APICs with the current APIC ID architecture.
- */
-#define MAX_APICS 256
-
 #define MAX_IRQ_SOURCES 256
 
 /* Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets. */
--- diff/include/asm-i386/mach-visws/irq_vectors.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-visws/irq_vectors.h	2004-07-01 21:32:49.000000000 +0100
@@ -35,14 +35,15 @@
  * sources per level' errata.
  */
 #define LOCAL_TIMER_VECTOR	0xef
+#define LOCAL_PERFCTR_VECTOR	0xee
 
 /*
- * First APIC vector available to drivers: (vectors 0x30-0xee)
+ * First APIC vector available to drivers: (vectors 0x30-0xed)
  * we start at 0x31 to spread out vectors evenly between priority
  * levels. (0x80 is the syscall vector)
  */
 #define FIRST_DEVICE_VECTOR	0x31
-#define FIRST_SYSTEM_VECTOR	0xef
+#define FIRST_SYSTEM_VECTOR	0xee
 
 #define TIMER_IRQ 0
 
--- diff/include/asm-i386/mach-visws/mach_apic.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-visws/mach_apic.h	2004-07-01 21:32:49.000000000 +0100
@@ -19,7 +19,6 @@
  #define TARGET_CPUS cpumask_of_cpu(0)
 #endif
 
-#define APIC_BROADCAST_ID      0x0F
 #define check_apicid_used(bitmap, apicid)	physid_isset(apicid, bitmap)
 #define check_apicid_present(bit)		physid_isset(bit, phys_cpu_present_map)
 
@@ -61,7 +60,10 @@
 
 static inline int cpu_present_to_apicid(int mps_cpu)
 {
-	return mps_cpu;
+	if (mps_cpu < get_physical_broadcast())
+		return mps_cpu;
+	else
+		return BAD_APICID;
 }
 
 static inline physid_mask_t apicid_to_cpu_present(int apicid)
@@ -84,9 +86,9 @@
 	return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
 }
 
-static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask)
+static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
 {
-	return cpus_coerce_const(cpumask);
+	return cpus_addr(cpumask)[0];
 }
 
 static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
--- diff/include/asm-i386/mach-visws/setup_arch_post.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-visws/setup_arch_post.h	2004-07-01 21:32:49.000000000 +0100
@@ -10,7 +10,7 @@
 
 long long mem_size __initdata = 0;
 
-static inline char * __init machine_specific_memory_setup(void)
+static char * __init machine_specific_memory_setup(void)
 {
 	long long gfx_mem_size = 8 * MB;
 
--- diff/include/asm-i386/mach-voyager/setup_arch_post.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-voyager/setup_arch_post.h	2004-07-01 21:32:49.000000000 +0100
@@ -3,7 +3,7 @@
  * This is included late in kernel/setup.c so that it can make use of all of
  * the static functions. */
 
-static inline char * __init machine_specific_memory_setup(void)
+static char * __init machine_specific_memory_setup(void)
 {
 	char *who;
 
--- diff/include/asm-i386/mpspec.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/mpspec.h	2004-07-01 21:32:49.000000000 +0100
@@ -33,7 +33,7 @@
 extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base);
 extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 gsi);
 extern void mp_config_acpi_legacy_irqs (void);
-extern void mp_parse_prt (void);
+extern void mp_register_gsi (u32 gsi, int edge_level, int active_high_low);
 #endif /*CONFIG_ACPI_BOOT*/
 
 #define PHYSID_ARRAY_SIZE	BITS_TO_LONGS(MAX_APICS)
@@ -53,7 +53,7 @@
 #define physids_and(dst, src1, src2)		bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
 #define physids_or(dst, src1, src2)		bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
 #define physids_clear(map)			bitmap_zero((map).mask, MAX_APICS)
-#define physids_complement(map)			bitmap_complement((map).mask, MAX_APICS)
+#define physids_complement(dst, src)		bitmap_complement((dst).mask,(src).mask, MAX_APICS)
 #define physids_empty(map)			bitmap_empty((map).mask, MAX_APICS)
 #define physids_equal(map1, map2)		bitmap_equal((map1).mask, (map2).mask, MAX_APICS)
 #define physids_weight(map)			bitmap_weight((map).mask, MAX_APICS)
--- diff/include/asm-i386/mpspec_def.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/mpspec_def.h	2004-07-01 21:32:49.000000000 +0100
@@ -14,6 +14,7 @@
 #define SMP_MAGIC_IDENT	(('_'<<24)|('P'<<16)|('M'<<8)|'_')
 
 #define MAX_MPC_ENTRY 1024
+#define MAX_APICS      256
 
 struct intel_mp_floating
 {
--- diff/include/asm-i386/msi.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/msi.h	2004-07-01 21:32:49.000000000 +0100
@@ -16,7 +16,7 @@
 #ifdef CONFIG_SMP
 #define MSI_TARGET_CPU		logical_smp_processor_id()
 #else
-#define MSI_TARGET_CPU		TARGET_CPUS
+#define MSI_TARGET_CPU	cpu_to_logical_apicid(first_cpu(cpu_online_map))
 #endif
 
 #endif /* ASM_MSI_H */
--- diff/include/asm-i386/msr.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/msr.h	2004-07-01 21:32:49.000000000 +0100
@@ -217,6 +217,15 @@
 #define MSR_K7_FID_VID_CTL		0xC0010041
 #define MSR_K7_FID_VID_STATUS		0xC0010042
 
+/* extended feature register */
+#define MSR_EFER 			0xc0000080
+
+/* EFER bits: */
+
+/* Execute Disable enable */
+#define _EFER_NX			11
+#define EFER_NX				(1<<_EFER_NX)
+
 /* Centaur-Hauls/IDT defined MSRs. */
 #define MSR_IDT_FCR1			0x107
 #define MSR_IDT_FCR2			0x108
--- diff/include/asm-i386/page.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/page.h	2004-07-01 21:32:49.000000000 +0100
@@ -40,15 +40,18 @@
  * These are used to make use of C type-checking..
  */
 #ifdef CONFIG_X86_PAE
+extern unsigned long long __supported_pte_mask;
 typedef struct { unsigned long pte_low, pte_high; } pte_t;
 typedef struct { unsigned long long pmd; } pmd_t;
 typedef struct { unsigned long long pgd; } pgd_t;
+typedef struct { unsigned long long pgprot; } pgprot_t;
 #define pte_val(x)	((x).pte_low | ((unsigned long long)(x).pte_high << 32))
 #define HPAGE_SHIFT	21
 #else
 typedef struct { unsigned long pte_low; } pte_t;
 typedef struct { unsigned long pmd; } pmd_t;
 typedef struct { unsigned long pgd; } pgd_t;
+typedef struct { unsigned long pgprot; } pgprot_t;
 #define boot_pte_t pte_t /* or would you rather have a typedef */
 #define pte_val(x)	((x).pte_low)
 #define HPAGE_SHIFT	22
@@ -61,7 +64,6 @@
 #define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT - PAGE_SHIFT)
 #endif
 
-typedef struct { unsigned long pgprot; } pgprot_t;
 
 #define pmd_val(x)	((x).pmd)
 #define pgd_val(x)	((x).pgd)
@@ -136,7 +138,7 @@
 
 #define virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 
-#define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
+#define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | \
 				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
 
 #endif /* __KERNEL__ */
--- diff/include/asm-i386/param.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/param.h	2004-07-01 21:32:49.000000000 +0100
@@ -18,5 +18,6 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
+#define COMMAND_LINE_SIZE 256
 
 #endif
--- diff/include/asm-i386/pgtable-3level.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/pgtable-3level.h	2004-07-01 21:32:49.000000000 +0100
@@ -101,18 +101,24 @@
 		(pte.pte_high << (32 - PAGE_SHIFT));
 }
 
+extern unsigned long long __supported_pte_mask;
+
 static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
 {
 	pte_t pte;
 
-	pte.pte_high = page_nr >> (32 - PAGE_SHIFT);
-	pte.pte_low = (page_nr << PAGE_SHIFT) | pgprot_val(pgprot);
+	pte.pte_high = (page_nr >> (32 - PAGE_SHIFT)) | \
+					(pgprot_val(pgprot) >> 32);
+	pte.pte_high &= (__supported_pte_mask >> 32);
+	pte.pte_low = ((page_nr << PAGE_SHIFT) | pgprot_val(pgprot)) & \
+							__supported_pte_mask;
 	return pte;
 }
 
 static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot)
 {
-	return __pmd(((unsigned long long)page_nr << PAGE_SHIFT) | pgprot_val(pgprot));
+	return __pmd((((unsigned long long)page_nr << PAGE_SHIFT) | \
+			pgprot_val(pgprot)) & __supported_pte_mask);
 }
 
 /*
--- diff/include/asm-i386/pgtable.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/pgtable.h	2004-07-01 21:32:49.000000000 +0100
@@ -83,8 +83,8 @@
  * area for the same reason. ;)
  */
 #define VMALLOC_OFFSET	(8*1024*1024)
-#define VMALLOC_START	(((unsigned long) high_memory + 2*VMALLOC_OFFSET-1) & \
-						~(VMALLOC_OFFSET-1))
+#define VMALLOC_START	(((unsigned long) high_memory + vmalloc_earlyreserve + \
+			2*VMALLOC_OFFSET-1) & ~(VMALLOC_OFFSET-1))
 #ifdef CONFIG_HIGHMEM
 # define VMALLOC_END	(PKMAP_BASE-2*PAGE_SIZE)
 #else
@@ -110,6 +110,7 @@
 #define _PAGE_BIT_UNUSED1	9	/* available for programmer */
 #define _PAGE_BIT_UNUSED2	10
 #define _PAGE_BIT_UNUSED3	11
+#define _PAGE_BIT_NX		63
 
 #define _PAGE_PRESENT	0x001
 #define _PAGE_RW	0x002
@@ -126,28 +127,51 @@
 
 #define _PAGE_FILE	0x040	/* set:pagecache unset:swap */
 #define _PAGE_PROTNONE	0x080	/* If not present */
+#ifdef CONFIG_X86_PAE
+#define _PAGE_NX	(1ULL<<_PAGE_BIT_NX)
+#else
+#define _PAGE_NX	0
+#endif
 
 #define _PAGE_TABLE	(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
 #define _KERNPG_TABLE	(_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
 #define _PAGE_CHG_MASK	(PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
 
-#define PAGE_NONE	__pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
-#define PAGE_SHARED	__pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
-#define PAGE_COPY	__pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
-#define PAGE_READONLY	__pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
+#define PAGE_NONE \
+	__pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
+#define PAGE_SHARED \
+	__pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
+
+#define PAGE_SHARED_EXEC \
+	__pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
+#define PAGE_COPY_NOEXEC \
+	__pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
+#define PAGE_COPY_EXEC \
+	__pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
+#define PAGE_COPY \
+	PAGE_COPY_NOEXEC
+#define PAGE_READONLY \
+	__pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
+#define PAGE_READONLY_EXEC \
+	__pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
 
 #define _PAGE_KERNEL \
+	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_NX)
+#define _PAGE_KERNEL_EXEC \
 	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
 
-extern unsigned long __PAGE_KERNEL;
-#define __PAGE_KERNEL_RO	(__PAGE_KERNEL & ~_PAGE_RW)
-#define __PAGE_KERNEL_NOCACHE	(__PAGE_KERNEL | _PAGE_PCD)
-#define __PAGE_KERNEL_LARGE	(__PAGE_KERNEL | _PAGE_PSE)
+extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
+#define __PAGE_KERNEL_RO		(__PAGE_KERNEL & ~_PAGE_RW)
+#define __PAGE_KERNEL_NOCACHE		(__PAGE_KERNEL | _PAGE_PCD)
+#define __PAGE_KERNEL_LARGE		(__PAGE_KERNEL | _PAGE_PSE)
+#define __PAGE_KERNEL_LARGE_EXEC	(__PAGE_KERNEL_EXEC | _PAGE_PSE)
 
 #define PAGE_KERNEL		__pgprot(__PAGE_KERNEL)
 #define PAGE_KERNEL_RO		__pgprot(__PAGE_KERNEL_RO)
+#define PAGE_KERNEL_EXEC	__pgprot(__PAGE_KERNEL_EXEC)
 #define PAGE_KERNEL_NOCACHE	__pgprot(__PAGE_KERNEL_NOCACHE)
 #define PAGE_KERNEL_LARGE	__pgprot(__PAGE_KERNEL_LARGE)
+#define PAGE_KERNEL_LARGE_EXEC	__pgprot(__PAGE_KERNEL_LARGE_EXEC)
 
 /*
  * The i386 can't do page protection for execute, and considers that
@@ -158,19 +182,19 @@
 #define __P001	PAGE_READONLY
 #define __P010	PAGE_COPY
 #define __P011	PAGE_COPY
-#define __P100	PAGE_READONLY
-#define __P101	PAGE_READONLY
-#define __P110	PAGE_COPY
-#define __P111	PAGE_COPY
+#define __P100	PAGE_READONLY_EXEC
+#define __P101	PAGE_READONLY_EXEC
+#define __P110	PAGE_COPY_EXEC
+#define __P111	PAGE_COPY_EXEC
 
 #define __S000	PAGE_NONE
 #define __S001	PAGE_READONLY
 #define __S010	PAGE_SHARED
 #define __S011	PAGE_SHARED
-#define __S100	PAGE_READONLY
-#define __S101	PAGE_READONLY
-#define __S110	PAGE_SHARED
-#define __S111	PAGE_SHARED
+#define __S100	PAGE_READONLY_EXEC
+#define __S101	PAGE_READONLY_EXEC
+#define __S110	PAGE_SHARED_EXEC
+#define __S111	PAGE_SHARED_EXEC
 
 /*
  * Define this if things work differently on an i386 and an i486:
@@ -220,8 +244,20 @@
 static inline pte_t pte_mkyoung(pte_t pte)	{ (pte).pte_low |= _PAGE_ACCESSED; return pte; }
 static inline pte_t pte_mkwrite(pte_t pte)	{ (pte).pte_low |= _PAGE_RW; return pte; }
 
-static inline  int ptep_test_and_clear_dirty(pte_t *ptep)	{ return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte_low); }
-static inline  int ptep_test_and_clear_young(pte_t *ptep)	{ return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte_low); }
+static inline int ptep_test_and_clear_dirty(pte_t *ptep)
+{
+	if (!pte_dirty(*ptep))
+		return 0;
+	return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte_low);
+}
+
+static inline int ptep_test_and_clear_young(pte_t *ptep)
+{
+	if (!pte_young(*ptep))
+		return 0;
+	return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte_low);
+}
+
 static inline void ptep_set_wrprotect(pte_t *ptep)		{ clear_bit(_PAGE_BIT_RW, &ptep->pte_low); }
 static inline void ptep_mkdirty(pte_t *ptep)			{ set_bit(_PAGE_BIT_DIRTY, &ptep->pte_low); }
 
@@ -244,6 +280,15 @@
 {
 	pte.pte_low &= _PAGE_CHG_MASK;
 	pte.pte_low |= pgprot_val(newprot);
+#ifdef CONFIG_X86_PAE
+	/*
+	 * Chop off the NX bit (if present), and add the NX portion of
+	 * the newprot (if present):
+	 */
+	pte.pte_high &= -1 ^ (1 << (_PAGE_BIT_NX - 32));
+	pte.pte_high |= (pgprot_val(newprot) >> 32) & \
+					(__supported_pte_mask >> 32);
+#endif
 	return pte;
 }
 
--- diff/include/asm-i386/processor.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/processor.h	2004-07-01 21:32:49.000000000 +0100
@@ -259,14 +259,8 @@
 
 /*
  * Bus types (default is ISA, but people can check others with these..)
- * pc98 indicates PC98 systems (CBUS)
  */
 extern int MCA_bus;
-#ifdef CONFIG_X86_PC9800
-#define pc98 1
-#else
-#define pc98 0
-#endif
 
 static inline void __monitor(const void *eax, unsigned long ecx,
 		unsigned long edx)
@@ -302,10 +296,12 @@
  */
 #define TASK_UNMAPPED_BASE	(PAGE_ALIGN(TASK_SIZE / 3))
 
+#define HAVE_ARCH_PICK_MMAP_LAYOUT
+
 /*
- * Size of io_bitmap, covering ports 0 to 0x3ff.
+ * Size of io_bitmap.
  */
-#define IO_BITMAP_BITS  1024
+#define IO_BITMAP_BITS  65536
 #define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
 #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
 #define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
@@ -397,7 +393,7 @@
 	/*
 	 * pads the TSS to be cacheline-aligned (size is 0x100)
 	 */
-	unsigned long __cacheline_filler[5];
+	unsigned long __cacheline_filler[37];
 	/*
 	 * .. and then another 0x100 bytes for emergency kernel stack
 	 */
@@ -428,6 +424,8 @@
 	unsigned int		saved_fs, saved_gs;
 /* IO permissions */
 	unsigned long	*io_bitmap_ptr;
+/* performance counters */
+	struct vperfctr *perfctr;
 };
 
 #define INIT_THREAD  {							\
--- diff/include/asm-i386/resource.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/resource.h	2004-07-01 21:32:49.000000000 +0100
@@ -16,8 +16,11 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
+
+#define RLIM_NLIMITS	13
 
-#define RLIM_NLIMITS	11
 
 /*
  * SuS says limits have to be unsigned.
@@ -39,7 +42,9 @@
 	{      INR_OPEN,     INR_OPEN  },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
-        { RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-i386/serial.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/serial.h	2004-07-01 21:32:49.000000000 +0100
@@ -47,19 +47,12 @@
 
 #define C_P(card,port) (((card)<<6|(port)<<3) + 1)
 
-#ifndef CONFIG_X86_PC9800
 #define STD_SERIAL_PORT_DEFNS			\
 	/* UART CLK   PORT IRQ     FLAGS        */			\
 	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\
 	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },	/* ttyS1 */	\
 	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\
 	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */
-#else
-#define STD_SERIAL_PORT_DEFNS			\
-	/* UART CLK   PORT IRQ     FLAGS        */			\
-	{ 0, BASE_BAUD, 0x30, 4, STD_COM_FLAGS },	/* ttyS0 */	\
-	{ 0, BASE_BAUD, 0x238, 5, STD_COM_FLAGS },	/* ttyS1 */
-#endif /* CONFIG_X86_PC9800 */
 
 
 #ifdef CONFIG_SERIAL_MANY_PORTS
--- diff/include/asm-i386/setup.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/setup.h	2004-07-01 21:32:49.000000000 +0100
@@ -56,8 +56,9 @@
 #define INITRD_START (*(unsigned long *) (PARAM+0x218))
 #define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c))
 #define EDID_INFO   (*(struct edid_info *) (PARAM+0x440))
-#define DISK80_SIGNATURE (*(unsigned int*) (PARAM+DISK80_SIG_BUFFER))
 #define EDD_NR     (*(unsigned char *) (PARAM+EDDNR))
+#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
+#define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))
 #define EDD_BUF     ((struct edd_info *) (PARAM+EDDBUF))
 
 #endif /* __ASSEMBLY__ */
--- diff/include/asm-i386/spinlock.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/spinlock.h	2004-07-01 21:32:49.000000000 +0100
@@ -42,7 +42,6 @@
 
 #define spin_is_locked(x)	(*(volatile signed char *)(&(x)->lock) <= 0)
 #define spin_unlock_wait(x)	do { barrier(); } while(spin_is_locked(x))
-#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock)
 
 #define spin_lock_string \
 	"\n1:\t" \
@@ -56,6 +55,23 @@
 	"jmp 1b\n" \
 	LOCK_SECTION_END
 
+#define spin_lock_string_flags \
+	"\n1:\t" \
+	"lock ; decb %0\n\t" \
+	"js 2f\n\t" \
+	LOCK_SECTION_START("") \
+	"2:\t" \
+	"testl $0x200, %1\n\t" \
+	"jz 3f\n\t" \
+	"sti\n\t" \
+	"3:\t" \
+	"rep;nop\n\t" \
+	"cmpb $0, %0\n\t" \
+	"jle 3b\n\t" \
+	"cli\n\t" \
+	"jmp 1b\n" \
+	LOCK_SECTION_END
+
 /*
  * This works. Despite all the confusion.
  * (except on PPro SMP or if we are using OOSTORE)
@@ -126,6 +142,20 @@
 		:"=m" (lock->lock) : : "memory");
 }
 
+static inline void _raw_spin_lock_flags (spinlock_t *lock, unsigned long flags)
+{
+#ifdef CONFIG_DEBUG_SPINLOCK
+	__label__ here;
+here:
+	if (unlikely(lock->magic != SPINLOCK_MAGIC)) {
+		printk("eip: %p\n", &&here);
+		BUG();
+	}
+#endif
+	__asm__ __volatile__(
+		spin_lock_string_flags
+		:"=m" (lock->lock) : "r" (flags) : "memory");
+}
 
 /*
  * Read-write spinlocks, allowing multiple readers
@@ -139,6 +169,11 @@
  */
 typedef struct {
 	volatile unsigned int lock;
+#ifdef CONFIG_LOCKMETER
+	/* required for LOCKMETER since all bits in lock are used */
+	/* and we need this storage for CPU and lock INDEX        */
+	unsigned lockmeter_magic;
+#endif
 #ifdef CONFIG_DEBUG_SPINLOCK
 	unsigned magic;
 #endif
@@ -146,11 +181,19 @@
 
 #define RWLOCK_MAGIC	0xdeaf1eed
 
+#ifdef CONFIG_LOCKMETER
+#ifdef CONFIG_DEBUG_SPINLOCK
+#define RWLOCK_MAGIC_INIT	, 0, RWLOCK_MAGIC
+#else
+#define RWLOCK_MAGIC_INIT	, 0
+#endif
+#else /* !CONFIG_LOCKMETER */
 #ifdef CONFIG_DEBUG_SPINLOCK
 #define RWLOCK_MAGIC_INIT	, RWLOCK_MAGIC
 #else
 #define RWLOCK_MAGIC_INIT	/* */
 #endif
+#endif /* !CONFIG_LOCKMETER */
 
 #define RW_LOCK_UNLOCKED (rwlock_t) { RW_LOCK_BIAS RWLOCK_MAGIC_INIT }
 
@@ -197,4 +240,60 @@
 	return 0;
 }
 
+#ifdef CONFIG_LOCKMETER
+static inline int _raw_read_trylock(rwlock_t *lock)
+{
+/* FIXME -- replace with assembler */
+	atomic_t *count = (atomic_t *)lock;
+	atomic_dec(count);
+	if (count->counter > 0)
+		return 1;
+	atomic_inc(count);
+	return 0;
+}
+#endif
+
+#if defined(CONFIG_LOCKMETER) && defined(CONFIG_HAVE_DEC_LOCK)
+extern void _metered_spin_lock  (spinlock_t *lock);
+extern void _metered_spin_unlock(spinlock_t *lock);
+
+/*
+ *  Matches what is in arch/i386/lib/dec_and_lock.c, except this one is
+ *  "static inline" so that the spin_lock(), if actually invoked, is charged
+ *  against the real caller, not against the catch-all atomic_dec_and_lock
+ */
+static inline int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
+{
+	int counter;
+	int newcount;
+
+repeat:
+	counter = atomic_read(atomic);
+	newcount = counter-1;
+
+	if (!newcount)
+		goto slow_path;
+
+	asm volatile("lock; cmpxchgl %1,%2"
+		:"=a" (newcount)
+		:"r" (newcount), "m" (atomic->counter), "0" (counter));
+
+	/* If the above failed, "eax" will have changed */
+	if (newcount != counter)
+		goto repeat;
+	return 0;
+
+slow_path:
+	preempt_disable();
+	_metered_spin_lock(lock);
+	if (atomic_dec_and_test(atomic))
+		return 1;
+	_metered_spin_unlock(lock);
+	preempt_enable();
+	return 0;
+}
+
+#define ATOMIC_DEC_AND_LOCK
+#endif
+
 #endif /* __ASM_SPINLOCK_H */
--- diff/include/asm-i386/string.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/string.h	2004-07-01 21:32:49.000000000 +0100
@@ -294,24 +294,7 @@
 })
 
 #define __HAVE_ARCH_MEMMOVE
-static inline void * memmove(void * dest,const void * src, size_t n)
-{
-int d0, d1, d2;
-if (dest<src) {
-	memcpy(dest,src,n);
-} else
-__asm__ __volatile__(
-	"std\n\t"
-	"rep\n\t"
-	"movsb\n\t"
-	"cld"
-	: "=&c" (d0), "=&S" (d1), "=&D" (d2)
-	:"0" (n),
-	 "1" (n-1+(const char *)src),
-	 "2" (n-1+(char *)dest)
-	:"memory");
-return dest;
-}
+void *memmove(void * dest,const void * src, size_t n);
 
 #define memcmp __builtin_memcmp
 
--- diff/include/asm-i386/suspend.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/suspend.h	2004-07-01 21:32:49.000000000 +0100
@@ -36,9 +36,6 @@
                        : /* no output */ \
                        :"r" ((thread)->debugreg[register]))
 
-extern void save_processor_state(void);
-extern void restore_processor_state(void);
-
 #ifdef CONFIG_ACPI_SLEEP
 extern unsigned long saved_eip;
 extern unsigned long saved_esp;
--- diff/include/asm-i386/system.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/system.h	2004-07-01 21:32:49.000000000 +0100
@@ -466,7 +466,6 @@
 void enable_hlt(void);
 
 extern unsigned long dmi_broken;
-extern int is_sony_vaio_laptop;
 extern int es7000_plat;
 
 #define BROKEN_ACPI_Sx		0x0001
--- diff/include/asm-i386/thread_info.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/thread_info.h	2004-07-01 21:32:49.000000000 +0100
@@ -157,7 +157,7 @@
 
 /* work to do on interrupt/exception return */
 #define _TIF_WORK_MASK \
-  (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT))
+  (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP))
 #define _TIF_ALLWORK_MASK	0x0000FFFF	/* work to do on any return to u-space */
 
 /*
--- diff/include/asm-i386/timex.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/timex.h	2004-07-01 21:32:49.000000000 +0100
@@ -9,15 +9,11 @@
 #include <linux/config.h>
 #include <asm/msr.h>
 
-#ifdef CONFIG_X86_PC9800
-   extern int CLOCK_TICK_RATE;
-#else
 #ifdef CONFIG_X86_ELAN
 #  define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */
 #else
 #  define CLOCK_TICK_RATE 1193182 /* Underlying HZ */
 #endif
-#endif
 
 #define CLOCK_TICK_FACTOR	20	/* Factor of both 1000000 and CLOCK_TICK_RATE */
 #define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \
--- diff/include/asm-i386/unistd.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-i386/unistd.h	2004-07-01 21:32:49.000000000 +0100
@@ -289,8 +289,14 @@
 #define __NR_mq_notify		(__NR_mq_open+4)
 #define __NR_mq_getsetattr	(__NR_mq_open+5)
 #define __NR_sys_kexec_load	283
+#define __NR_perfctr_info	284
+#define __NR_vperfctr_open	(__NR_perfctr_info+1)
+#define __NR_vperfctr_control	(__NR_perfctr_info+2)
+#define __NR_vperfctr_unlink	(__NR_perfctr_info+3)
+#define __NR_vperfctr_iresume	(__NR_perfctr_info+4)
+#define __NR_vperfctr_read	(__NR_perfctr_info+5)
 
-#define NR_syscalls 284
+#define NR_syscalls 290
 
 /* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
 
--- diff/include/asm-ia64/fcntl.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-ia64/fcntl.h	2004-07-01 21:32:49.000000000 +0100
@@ -28,6 +28,7 @@
 #define O_LARGEFILE	0100000
 #define O_DIRECTORY	0200000	/* must be a directory */
 #define O_NOFOLLOW	0400000 /* don't follow links */
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-ia64/gcc_intrin.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ia64/gcc_intrin.h	2004-07-01 21:32:49.000000000 +0100
@@ -489,10 +489,16 @@
 #define ia64_ptce(addr)	asm volatile ("ptc.e %0" :: "r"(addr))
 
 #define ia64_ptcga(addr, size)							\
-	asm volatile ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory")
+do {										\
+	asm volatile ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory");	\
+	ia64_dv_serialize_data();						\
+} while (0)
 
-#define ia64_ptcl(addr, size)						\
-	asm volatile ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory")
+#define ia64_ptcl(addr, size)							\
+do {										\
+	asm volatile ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory");	\
+	ia64_dv_serialize_data();						\
+} while (0)
 
 #define ia64_ptri(addr, size)						\
 	asm volatile ("ptr.i %0,%1" :: "r"(addr), "r"(size) : "memory")
@@ -581,7 +587,7 @@
 
 #define ia64_intrin_local_irq_restore(x)			\
 do {								\
-	asm volatile ("     cmp.ne p6,p7=%0,r0;;"		\
+	asm volatile (";;   cmp.ne p6,p7=%0,r0;;"		\
 		      "(p6) ssm psr.i;"				\
 		      "(p7) rsm psr.i;;"			\
 		      "(p6) srlz.d"				\
--- diff/include/asm-ia64/ia32.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-ia64/ia32.h	2004-07-01 21:32:49.000000000 +0100
@@ -6,7 +6,8 @@
 #include <asm/ptrace.h>
 #include <asm/signal.h>
 
-#define IA32_NR_syscalls		283 /* length of syscall table */
+#define IA32_NR_syscalls		283	/* length of syscall table */
+#define IA32_PAGE_SHIFT			12	/* 4KB pages */
 
 #ifndef __ASSEMBLY__
 
@@ -24,6 +25,13 @@
 /* Declare this unconditionally, so we don't get warnings for unreachable code.  */
 extern int ia32_setup_frame1 (int sig, struct k_sigaction *ka, siginfo_t *info,
 			      sigset_t *set, struct pt_regs *regs);
+#if PAGE_SHIFT > IA32_PAGE_SHIFT
+extern int ia32_copy_partial_page_list (struct task_struct *, unsigned long);
+extern void ia32_drop_partial_page_list (struct task_struct *);
+#else
+# define ia32_copy_partial_page_list(a1, a2)	0
+# define ia32_drop_partial_page_list(a1)	do { ; } while (0)
+#endif
 
 #endif /* !__ASSEMBLY__ */
 
--- diff/include/asm-ia64/iosapic.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-ia64/iosapic.h	2004-07-01 21:32:49.000000000 +0100
@@ -60,7 +60,6 @@
 				    unsigned int gsi_base);
 extern int gsi_to_vector (unsigned int gsi);
 extern int gsi_to_irq (unsigned int gsi);
-extern void __init iosapic_parse_prt (void);
 extern void iosapic_enable_intr (unsigned int vector);
 extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity,
 				  unsigned long trigger);
--- diff/include/asm-ia64/irq.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-ia64/irq.h	2004-07-01 21:32:49.000000000 +0100
@@ -30,6 +30,12 @@
 extern void enable_irq (unsigned int);
 extern void set_irq_affinity_info (unsigned int irq, int dest, int redir);
 
+#ifdef CONFIG_SMP
+extern void move_irq(int irq);
+#else
+#define move_irq(irq)
+#endif
+
 struct irqaction;
 struct pt_regs;
 int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
--- diff/include/asm-ia64/machvec.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-ia64/machvec.h	2004-07-01 21:32:49.000000000 +0100
@@ -19,6 +19,7 @@
 struct scatterlist;
 struct irq_desc;
 struct page;
+struct mm_struct;
 
 typedef void ia64_mv_setup_t (char **);
 typedef void ia64_mv_cpu_init_t (void);
@@ -26,6 +27,7 @@
 typedef void ia64_mv_send_ipi_t (int, int, int, int);
 typedef void ia64_mv_timer_interrupt_t (int, void *, struct pt_regs *);
 typedef void ia64_mv_global_tlb_purge_t (unsigned long, unsigned long, unsigned long);
+typedef void ia64_mv_tlb_migrate_finish_t (struct mm_struct *);
 typedef struct irq_desc *ia64_mv_irq_desc (unsigned int);
 typedef u8 ia64_mv_irq_to_vector (u8);
 typedef unsigned int ia64_mv_local_vector_to_irq (u8 vector);
@@ -72,6 +74,7 @@
 extern void machvec_noop (void);
 extern void machvec_setup (char **);
 extern void machvec_timer_interrupt (int, void *, struct pt_regs *);
+extern void machvec_tlb_migrate_finish (struct mm_struct *);
 extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int);
 extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int);
 
@@ -95,6 +98,7 @@
 #  define platform_send_ipi	ia64_mv.send_ipi
 #  define platform_timer_interrupt	ia64_mv.timer_interrupt
 #  define platform_global_tlb_purge	ia64_mv.global_tlb_purge
+#  define platform_tlb_migrate_finish	ia64_mv.tlb_migrate_finish
 #  define platform_dma_init		ia64_mv.dma_init
 #  define platform_dma_alloc_coherent	ia64_mv.dma_alloc_coherent
 #  define platform_dma_free_coherent	ia64_mv.dma_free_coherent
@@ -140,6 +144,7 @@
 	ia64_mv_send_ipi_t *send_ipi;
 	ia64_mv_timer_interrupt_t *timer_interrupt;
 	ia64_mv_global_tlb_purge_t *global_tlb_purge;
+	ia64_mv_tlb_migrate_finish_t *tlb_migrate_finish;
 	ia64_mv_dma_init *dma_init;
 	ia64_mv_dma_alloc_coherent *dma_alloc_coherent;
 	ia64_mv_dma_free_coherent *dma_free_coherent;
@@ -181,6 +186,7 @@
 	platform_send_ipi,			\
 	platform_timer_interrupt,		\
 	platform_global_tlb_purge,		\
+	platform_tlb_migrate_finish,		\
 	platform_dma_init,			\
 	platform_dma_alloc_coherent,		\
 	platform_dma_free_coherent,		\
@@ -260,6 +266,9 @@
 #ifndef platform_global_tlb_purge
 # define platform_global_tlb_purge	ia64_global_tlb_purge /* default to architected version */
 #endif
+#ifndef platform_tlb_migrate_finish
+# define platform_tlb_migrate_finish machvec_tlb_migrate_finish
+#endif
 #ifndef platform_dma_init
 # define platform_dma_init		swiotlb_init
 #endif
--- diff/include/asm-ia64/machvec_sn2.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-ia64/machvec_sn2.h	2004-07-01 21:32:49.000000000 +0100
@@ -39,6 +39,7 @@
 extern ia64_mv_send_ipi_t sn2_send_IPI;
 extern ia64_mv_timer_interrupt_t sn_timer_interrupt;
 extern ia64_mv_global_tlb_purge_t sn2_global_tlb_purge;
+extern ia64_mv_tlb_migrate_finish_t	sn_tlb_migrate_finish;
 extern ia64_mv_irq_desc sn_irq_desc;
 extern ia64_mv_irq_to_vector sn_irq_to_vector;
 extern ia64_mv_local_vector_to_irq sn_local_vector_to_irq;
@@ -83,6 +84,7 @@
 #define platform_send_ipi		sn2_send_IPI
 #define platform_timer_interrupt	sn_timer_interrupt
 #define platform_global_tlb_purge       sn2_global_tlb_purge
+#define platform_tlb_migrate_finish	sn_tlb_migrate_finish
 #define platform_pci_fixup		sn_pci_fixup
 #define platform_inb			__sn_inb
 #define platform_inw			__sn_inw
--- diff/include/asm-ia64/pgtable.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ia64/pgtable.h	2004-07-01 21:32:49.000000000 +0100
@@ -297,11 +297,7 @@
  * works bypasses the caches, but does allow for consecutive writes to
  * be combined into single (but larger) write transactions.
  */
-#ifdef CONFIG_MCKINLEY_A0_SPECIFIC
-# define pgprot_writecombine(prot)	prot
-#else
-# define pgprot_writecombine(prot)	__pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC)
-#endif
+#define pgprot_writecombine(prot)	__pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC)
 
 static inline unsigned long
 pgd_index (unsigned long address)
@@ -346,6 +342,8 @@
 ptep_test_and_clear_young (pte_t *ptep)
 {
 #ifdef CONFIG_SMP
+	if (!pte_young(*ptep))
+		return 0;
 	return test_and_clear_bit(_PAGE_A_BIT, ptep);
 #else
 	pte_t pte = *ptep;
@@ -360,6 +358,8 @@
 ptep_test_and_clear_dirty (pte_t *ptep)
 {
 #ifdef CONFIG_SMP
+	if (!pte_dirty(*ptep))
+		return 0;
 	return test_and_clear_bit(_PAGE_D_BIT, ptep);
 #else
 	pte_t pte = *ptep;
--- diff/include/asm-ia64/processor.h	2004-05-19 22:12:42.000000000 +0100
+++ source/include/asm-ia64/processor.h	2004-07-01 21:32:49.000000000 +0100
@@ -230,6 +230,7 @@
 
 #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
 
+struct partial_page_list;
 #endif
 
 struct thread_struct {
@@ -251,6 +252,7 @@
 	__u64 fdr;			/* IA32 fp except. data reg */
 	__u64 old_k1;			/* old value of ar.k1 */
 	__u64 old_iob;			/* old IOBase value */
+	struct partial_page_list *ppl;	/* partial page list for 4K page size issue */
         /* cached TLS descriptors. */
 	struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
 
@@ -260,7 +262,8 @@
 				.fir =		0,			\
 				.fdr =		0,			\
 				.old_k1 =	0,			\
-				.old_iob =	0,
+				.old_iob =	0,			\
+				.ppl =		0,
 #else
 # define INIT_THREAD_IA32
 #endif /* CONFIG_IA32_SUPPORT */
--- diff/include/asm-ia64/resource.h	2004-05-19 22:12:42.000000000 +0100
+++ source/include/asm-ia64/resource.h	2004-07-01 21:32:49.000000000 +0100
@@ -23,8 +23,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -47,6 +49,8 @@
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 # endif /* __KERNEL__ */
--- diff/include/asm-ia64/sn/module.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ia64/sn/module.h	2004-07-01 21:32:49.000000000 +0100
@@ -180,7 +180,7 @@
 };
 
 /* module.c */
-extern module_t	       *modules[MODULE_MAX];	/* Indexed by cmoduleid_t   */
+extern module_t	       *sn_modules[MODULE_MAX];	/* Indexed by cmoduleid_t   */
 extern int		nummodules;
 
 extern module_t	       *module_lookup(moduleid_t id);
--- diff/include/asm-ia64/sn/sn_sal.h	2004-05-19 22:12:42.000000000 +0100
+++ source/include/asm-ia64/sn/sn_sal.h	2004-07-01 21:32:49.000000000 +0100
@@ -33,6 +33,7 @@
 #define  SN_SAL_NO_FAULT_ZONE_VIRTUAL		   0x02000010
 #define  SN_SAL_NO_FAULT_ZONE_PHYSICAL		   0x02000011
 #define  SN_SAL_PRINT_ERROR			   0x02000012
+#define  SN_SAL_SET_ERROR_HANDLING_FEATURES	   0x0200001a	// reentrant
 #define  SN_SAL_CONSOLE_PUTC                       0x02000021
 #define  SN_SAL_CONSOLE_GETC                       0x02000022
 #define  SN_SAL_CONSOLE_PUTS                       0x02000023
@@ -92,6 +93,19 @@
 #define SALRET_INVALID_ARG	-2
 #define SALRET_ERROR		-3
 
+/*
+ * SN_SAL_SET_ERROR_HANDLING_FEATURES bit settings
+ */
+enum 
+{
+	/* if "rz always" is set, have the mca slaves call os_init_slave */
+	SN_SAL_EHF_MCA_SLV_TO_OS_INIT_SLV=0,
+	/* do not rz on tlb checks, even if "rz always" is set */
+	SN_SAL_EHF_NO_RZ_TLBC,
+	/* do not rz on PIO reads to I/O space, even if "rz always" is set */
+	SN_SAL_EHF_NO_RZ_IO_READ,
+};
+
 
 /**
  * sn_sal_rev_major - get the major SGI SAL revision number
@@ -670,4 +684,24 @@
 	return 0;
 }
 
+/*
+ * Tell the prom how the OS wants to handle specific error features.
+ * It takes an array of 7 u64.
+ */
+static inline u64
+ia64_sn_set_error_handling_features(const u64 *feature_bits)
+{
+	struct ia64_sal_retval rv = {0, 0, 0, 0};
+
+	SAL_CALL_REENTRANT(rv, SN_SAL_SET_ERROR_HANDLING_FEATURES,
+			feature_bits[0],
+			feature_bits[1],
+			feature_bits[2],
+			feature_bits[3],
+			feature_bits[4],
+			feature_bits[5],
+			feature_bits[6]);
+	return rv.status;
+}
+
 #endif /* _ASM_IA64_SN_SN_SAL_H */
--- diff/include/asm-ia64/spinlock.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ia64/spinlock.h	2004-07-01 21:32:49.000000000 +0100
@@ -116,8 +116,18 @@
 typedef struct {
 	volatile int read_counter	: 31;
 	volatile int write_lock		:  1;
+#ifdef CONFIG_LOCKMETER
+	/* required for LOCKMETER since all bits in lock are used */
+	/* and we need this storage for CPU and lock INDEX        */
+	unsigned lockmeter_magic;
+#endif
 } rwlock_t;
+
+#ifdef CONFIG_LOCKMETER
+#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0, 0 }
+#else
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
+#endif
 
 #define rwlock_init(x)		do { *(x) = RW_LOCK_UNLOCKED; } while(0)
 #define rwlock_is_locked(x)	(*(volatile int *) (x) != 0)
@@ -133,6 +143,48 @@
 	}										\
 } while (0)
 
+#ifdef CONFIG_LOCKMETER
+/*
+ * HACK: This works, but still have a timing window that affects performance:
+ * we see that no one owns the Write lock, then someone * else grabs for Write
+ * lock before we do a read_lock().
+ * This means that on rare occasions our read_lock() will stall and spin-wait
+ * until we acquire for Read, instead of simply returning a trylock failure.
+ */
+static inline int _raw_read_trylock(rwlock_t *rw)
+{
+	if (rw->write_lock) {
+		return 0;
+	} else {
+		_raw_read_lock(rw);
+		return 1;
+	}
+}
+
+static inline int _raw_write_trylock(rwlock_t *rw)
+{
+	if (!(rw->write_lock)) {
+	    /* isn't currently write-locked... that looks promising... */
+	    if (test_and_set_bit(31, rw) == 0) {
+		/* now it is write-locked by me... */
+		if (rw->read_counter) {
+		    /* really read-locked, so release write-lock and fail */
+		    clear_bit(31, rw);
+		} else {
+		    /* we've the the write-lock, no read-lockers... success! */
+		    barrier();
+		    return 1;
+		}
+
+	    }
+	}
+
+	/* falls through ... fails to write-lock */
+	barrier();
+	return 0;
+}
+#endif
+
 #define _raw_read_unlock(rw)					\
 do {								\
 	rwlock_t *__read_lock_ptr = (rw);			\
@@ -196,4 +248,25 @@
 	clear_bit(31, (x));								\
 })
 
+#ifdef CONFIG_LOCKMETER
+extern void _metered_spin_lock  (spinlock_t *lock);
+extern void _metered_spin_unlock(spinlock_t *lock);
+
+/*
+ *  Use a less efficient, and inline, atomic_dec_and_lock() if lockmetering
+ *  so we can see the callerPC of who is actually doing the spin_lock().
+ *  Otherwise, all we see is the generic rollup of all locks done by
+ *  atomic_dec_and_lock().
+ */
+static inline int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
+{
+	_metered_spin_lock(lock);
+	if (atomic_dec_and_test(atomic))
+		return 1;
+	_metered_spin_unlock(lock);
+	return 0;
+}
+#define ATOMIC_DEC_AND_LOCK
+#endif
+
 #endif /*  _ASM_IA64_SPINLOCK_H */
--- diff/include/asm-ia64/system.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ia64/system.h	2004-07-01 21:32:49.000000000 +0100
@@ -171,7 +171,7 @@
 # define local_irq_restore(x)	__local_irq_restore(x)
 #endif /* !CONFIG_IA64_DEBUG_IRQ */
 
-#define local_irq_enable()	({ ia64_ssm(IA64_PSR_I); ia64_srlz_d(); })
+#define local_irq_enable()	({ ia64_stop(); ia64_ssm(IA64_PSR_I); ia64_srlz_d(); })
 #define local_save_flags(flags)	({ ia64_stop(); (flags) = ia64_getreg(_IA64_REG_PSR); })
 
 #define irqs_disabled()				\
--- diff/include/asm-ia64/tlb.h	2004-05-19 22:12:42.000000000 +0100
+++ source/include/asm-ia64/tlb.h	2004-07-01 21:32:50.000000000 +0100
@@ -44,6 +44,7 @@
 #include <asm/pgalloc.h>
 #include <asm/processor.h>
 #include <asm/tlbflush.h>
+#include <asm/machvec.h>
 
 #ifdef CONFIG_SMP
 # define FREE_PTE_NR		2048
@@ -211,6 +212,8 @@
 	tlb->end_addr = address + PAGE_SIZE;
 }
 
+#define tlb_migrate_finish(mm)	platform_tlb_migrate_finish(mm)
+
 #define tlb_start_vma(tlb, vma)			do { } while (0)
 #define tlb_end_vma(tlb, vma)			do { } while (0)
 
--- diff/include/asm-ia64/unistd.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ia64/unistd.h	2004-07-01 21:32:50.000000000 +0100
@@ -266,6 +266,8 @@
 
 #define NR_syscalls			256 /* length of syscall table */
 
+#define __ARCH_WANT_SYS_RT_SIGACTION
+
 #ifdef CONFIG_IA32_SUPPORT
 # define __ARCH_WANT_SYS_FADVISE64
 # define __ARCH_WANT_SYS_GETPGRP
@@ -275,7 +277,6 @@
 # define __ARCH_WANT_SYS_OLDUMOUNT
 # define __ARCH_WANT_SYS_SIGPENDING
 # define __ARCH_WANT_SYS_SIGPROCMASK
-# define __ARCH_WANT_SYS_RT_SIGACTION
 #endif
 
 #if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
--- diff/include/asm-m68k/atomic.h	2004-05-19 22:12:44.000000000 +0100
+++ source/include/asm-m68k/atomic.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,6 +1,8 @@
 #ifndef __ARCH_M68K_ATOMIC__
 #define __ARCH_M68K_ATOMIC__
 
+#include <asm/system.h>	/* local_irq_XXX() */
+
 /*
  * Atomic operations that C can't guarantee us.  Useful for
  * resource counting etc..
@@ -16,38 +18,124 @@
 #define atomic_read(v)		((v)->counter)
 #define atomic_set(v, i)	(((v)->counter) = i)
 
-static __inline__ void atomic_add(int i, atomic_t *v)
+static inline void atomic_add(int i, atomic_t *v)
+{
+	__asm__ __volatile__("addl %1,%0" : "+m" (*v) : "id" (i));
+}
+
+static inline void atomic_sub(int i, atomic_t *v)
+{
+	__asm__ __volatile__("subl %1,%0" : "+m" (*v) : "id" (i));
+}
+
+static inline void atomic_inc(atomic_t *v)
+{
+	__asm__ __volatile__("addql #1,%0" : "+m" (*v));
+}
+
+static inline void atomic_dec(atomic_t *v)
+{
+	__asm__ __volatile__("subql #1,%0" : "+m" (*v));
+}
+
+static inline int atomic_dec_and_test(atomic_t *v)
+{
+	char c;
+	__asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "+m" (*v));
+	return c != 0;
+}
+
+static inline int atomic_inc_and_test(atomic_t *v)
+{
+	char c;
+	__asm__ __volatile__("addql #1,%1; seq %0" : "=d" (c), "+m" (*v));
+	return c != 0;
+}
+
+#ifdef CONFIG_RMW_INSNS
+static inline int atomic_add_return(int i, atomic_t *v)
 {
-	__asm__ __volatile__("addl %1,%0" : "=m" (*v) : "id" (i), "0" (*v));
+	int t, tmp;
+
+	__asm__ __volatile__(
+			"1:	movel %2,%1\n"
+			"	addl %3,%1\n"
+			"	casl %2,%1,%0\n"
+			"	jne 1b"
+			: "+m" (*v), "=&d" (t), "=&d" (tmp)
+			: "g" (i), "2" (atomic_read(v)));
+	return t;
 }
 
-static __inline__ void atomic_sub(int i, atomic_t *v)
+static inline int atomic_sub_return(int i, atomic_t *v)
 {
-	__asm__ __volatile__("subl %1,%0" : "=m" (*v) : "id" (i), "0" (*v));
+	int t, tmp;
+
+	__asm__ __volatile__(
+			"1:	movel %2,%1\n"
+			"	subl %3,%1\n"
+			"	casl %2,%1,%0\n"
+			"	jne 1b"
+			: "+m" (*v), "=&d" (t), "=&d" (tmp)
+			: "g" (i), "2" (atomic_read(v)));
+	return t;
+}
+#else /* !CONFIG_RMW_INSNS */
+static inline int atomic_add_return(int i, atomic_t * v)
+{
+	unsigned long flags;
+	int t;
+
+	local_irq_save(flags);
+	t = atomic_read(v);
+	t += i;
+	atomic_set(v, t);
+	local_irq_restore(flags);
+
+	return t;
 }
 
-static __inline__ void atomic_inc(volatile atomic_t *v)
+static inline int atomic_sub_return(int i, atomic_t * v)
 {
-	__asm__ __volatile__("addql #1,%0" : "=m" (*v): "0" (*v));
+	unsigned long flags;
+	int t;
+
+	local_irq_save(flags);
+	t = atomic_read(v);
+	t -= i;
+	atomic_set(v, t);
+	local_irq_restore(flags);
+
+	return t;
 }
+#endif /* !CONFIG_RMW_INSNS */
+
+#define atomic_dec_return(v)	atomic_sub_return(1, (v))
+#define atomic_inc_return(v)	atomic_add_return(1, (v))
 
-static __inline__ void atomic_dec(volatile atomic_t *v)
+static inline int atomic_sub_and_test(int i, atomic_t *v)
 {
-	__asm__ __volatile__("subql #1,%0" : "=m" (*v): "0" (*v));
+	char c;
+	__asm__ __volatile__("subl %2,%1; seq %0" : "=d" (c), "+m" (*v): "g" (i));
+	return c != 0;
 }
 
-static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
+static inline int atomic_add_negative(int i, atomic_t *v)
 {
 	char c;
-	__asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "=m" (*v): "1" (*v));
+	__asm__ __volatile__("addl %2,%1; smi %0" : "=d" (c), "+m" (*v): "g" (i));
 	return c != 0;
 }
 
-#define atomic_clear_mask(mask, v) \
-	__asm__ __volatile__("andl %1,%0" : "=m" (*v) : "id" (~(mask)),"0"(*v))
+static inline void atomic_clear_mask(unsigned long mask, unsigned long *v)
+{
+	__asm__ __volatile__("andl %1,%0" : "+m" (*v) : "id" (~(mask)));
+}
 
-#define atomic_set_mask(mask, v) \
-	__asm__ __volatile__("orl %1,%0" : "=m" (*v) : "id" (mask),"0"(*v))
+static inline void atomic_set_mask(unsigned long mask, unsigned long *v)
+{
+	__asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask));
+}
 
 /* Atomic operations are already serializing */
 #define smp_mb__before_atomic_dec()	barrier()
--- diff/include/asm-m68k/bitops.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-m68k/bitops.h	2004-07-01 21:32:50.000000000 +0100
@@ -23,25 +23,24 @@
 
 #define __test_and_set_bit(nr,vaddr) test_and_set_bit(nr,vaddr)
 
-static inline int __constant_test_and_set_bit(int nr,
-					      volatile unsigned long *vaddr)
+static inline int __constant_test_and_set_bit(int nr, unsigned long *vaddr)
 {
+	char *p = (char *)vaddr + (nr ^ 31) / 8;
 	char retval;
 
 	__asm__ __volatile__ ("bset %2,%1; sne %0"
-	     : "=d" (retval), "+m" (((volatile char *)vaddr)[(nr^31) >> 3])
-	     : "di" (nr & 7));
+			: "=d" (retval), "+m" (*p)
+			: "di" (nr & 7));
 
 	return retval;
 }
 
-static inline int __generic_test_and_set_bit(int nr,
-					     volatile unsigned long *vaddr)
+static inline int __generic_test_and_set_bit(int nr, unsigned long *vaddr)
 {
 	char retval;
 
-	__asm__ __volatile__ ("bfset %2@{%1:#1}; sne %0"
-	     : "=d" (retval) : "d" (nr^31), "a" (vaddr) : "memory");
+	__asm__ __volatile__ ("bfset %2{%1:#1}; sne %0"
+			: "=d" (retval) : "d" (nr^31), "o" (*vaddr) : "memory");
 
 	return retval;
 }
@@ -53,16 +52,17 @@
 
 #define __set_bit(nr,vaddr) set_bit(nr,vaddr)
 
-static inline void __constant_set_bit(int nr, volatile unsigned long *vaddr)
+static inline void __constant_set_bit(int nr, unsigned long *vaddr)
 {
+	char *p = (char *)vaddr + (nr ^ 31) / 8;
 	__asm__ __volatile__ ("bset %1,%0"
-	     : "+m" (((volatile char *)vaddr)[(nr^31) >> 3]) : "di" (nr & 7));
+			: "+m" (*p) : "di" (nr & 7));
 }
 
-static inline void __generic_set_bit(int nr, volatile unsigned long *vaddr)
+static inline void __generic_set_bit(int nr, unsigned long *vaddr)
 {
-	__asm__ __volatile__ ("bfset %1@{%0:#1}"
-	     : : "d" (nr^31), "a" (vaddr) : "memory");
+	__asm__ __volatile__ ("bfset %1{%0:#1}"
+			: : "d" (nr^31), "o" (*vaddr) : "memory");
 }
 
 #define test_and_clear_bit(nr,vaddr) \
@@ -72,25 +72,24 @@
 
 #define __test_and_clear_bit(nr,vaddr) test_and_clear_bit(nr,vaddr)
 
-static inline int __constant_test_and_clear_bit(int nr,
-						volatile unsigned long *vaddr)
+static inline int __constant_test_and_clear_bit(int nr, unsigned long *vaddr)
 {
+	char *p = (char *)vaddr + (nr ^ 31) / 8;
 	char retval;
 
 	__asm__ __volatile__ ("bclr %2,%1; sne %0"
-	     : "=d" (retval), "+m" (((volatile char *)vaddr)[(nr^31) >> 3])
-	     : "di" (nr & 7));
+			: "=d" (retval), "+m" (*p)
+			: "di" (nr & 7));
 
 	return retval;
 }
 
-static inline int __generic_test_and_clear_bit(int nr,
-					       volatile unsigned long *vaddr)
+static inline int __generic_test_and_clear_bit(int nr, unsigned long *vaddr)
 {
 	char retval;
 
-	__asm__ __volatile__ ("bfclr %2@{%1:#1}; sne %0"
-	     : "=d" (retval) : "d" (nr^31), "a" (vaddr) : "memory");
+	__asm__ __volatile__ ("bfclr %2{%1:#1}; sne %0"
+			: "=d" (retval) : "d" (nr^31), "o" (*vaddr) : "memory");
 
 	return retval;
 }
@@ -107,16 +106,17 @@
    __generic_clear_bit(nr, vaddr))
 #define __clear_bit(nr,vaddr) clear_bit(nr,vaddr)
 
-static inline void __constant_clear_bit(int nr, volatile unsigned long *vaddr)
+static inline void __constant_clear_bit(int nr, unsigned long *vaddr)
 {
+	char *p = (char *)vaddr + (nr ^ 31) / 8;
 	__asm__ __volatile__ ("bclr %1,%0"
-	     : "+m" (((volatile char *)vaddr)[(nr^31) >> 3]) : "di" (nr & 7));
+			: "+m" (*p) : "di" (nr & 7));
 }
 
-static inline void __generic_clear_bit(int nr, volatile unsigned long *vaddr)
+static inline void __generic_clear_bit(int nr, unsigned long *vaddr)
 {
-	__asm__ __volatile__ ("bfclr %1@{%0:#1}"
-	     : : "d" (nr^31), "a" (vaddr) : "memory");
+	__asm__ __volatile__ ("bfclr %1{%0:#1}"
+			: : "d" (nr^31), "o" (*vaddr) : "memory");
 }
 
 #define test_and_change_bit(nr,vaddr) \
@@ -127,25 +127,24 @@
 #define __test_and_change_bit(nr,vaddr) test_and_change_bit(nr,vaddr)
 #define __change_bit(nr,vaddr) change_bit(nr,vaddr)
 
-static inline int __constant_test_and_change_bit(int nr,
-						 volatile unsigned long *vaddr)
+static inline int __constant_test_and_change_bit(int nr, unsigned long *vaddr)
 {
+	char *p = (char *)vaddr + (nr ^ 31) / 8;
 	char retval;
 
 	__asm__ __volatile__ ("bchg %2,%1; sne %0"
-	     : "=d" (retval), "+m" (((volatile char *)vaddr)[(nr^31) >> 3])
-	     : "di" (nr & 7));
+			: "=d" (retval), "+m" (*p)
+			: "di" (nr & 7));
 
 	return retval;
 }
 
-static inline int __generic_test_and_change_bit(int nr,
-						volatile unsigned long *vaddr)
+static inline int __generic_test_and_change_bit(int nr, unsigned long *vaddr)
 {
 	char retval;
 
-	__asm__ __volatile__ ("bfchg %2@{%1:#1}; sne %0"
-	     : "=d" (retval) : "d" (nr^31), "a" (vaddr) : "memory");
+	__asm__ __volatile__ ("bfchg %2{%1:#1}; sne %0"
+			: "=d" (retval) : "d" (nr^31), "o" (*vaddr) : "memory");
 
 	return retval;
 }
@@ -155,21 +154,22 @@
    __constant_change_bit(nr, vaddr) : \
    __generic_change_bit(nr, vaddr))
 
-static inline void __constant_change_bit(int nr, volatile unsigned long *vaddr)
+static inline void __constant_change_bit(int nr, unsigned long *vaddr)
 {
+	char *p = (char *)vaddr + (nr ^ 31) / 8;
 	__asm__ __volatile__ ("bchg %1,%0"
-	     : "+m" (((volatile char *)vaddr)[(nr^31) >> 3]) : "di" (nr & 7));
+			: "+m" (*p) : "di" (nr & 7));
 }
 
-static inline void __generic_change_bit(int nr, volatile unsigned long *vaddr)
+static inline void __generic_change_bit(int nr, unsigned long *vaddr)
 {
-	__asm__ __volatile__ ("bfchg %1@{%0:#1}"
-	     : : "d" (nr^31), "a" (vaddr) : "memory");
+	__asm__ __volatile__ ("bfchg %1{%0:#1}"
+			: : "d" (nr^31), "o" (*vaddr) : "memory");
 }
 
-static inline int test_bit(int nr, const volatile unsigned long *vaddr)
+static inline int test_bit(int nr, const unsigned long *vaddr)
 {
-	return ((1UL << (nr & 31)) & (((const volatile unsigned long *) vaddr)[nr >> 5])) != 0;
+	return (vaddr[nr >> 5] & (1UL << (nr & 31))) != 0;
 }
 
 static inline int find_first_zero_bit(const unsigned long *vaddr,
@@ -364,76 +364,27 @@
 	return ((p - addr) << 4) + (res ^ 31);
 }
 
-static inline int minix_test_and_set_bit(int nr, volatile void *vaddr)
-{
-	char retval;
-
-	__asm__ __volatile__ ("bfset %2{%1:#1}; sne %0"
-	     : "=d" (retval) : "d" (nr^15), "m" (*(volatile char *)vaddr) : "memory");
-
-	return retval;
-}
-
-#define minix_set_bit(nr,addr)	((void)minix_test_and_set_bit(nr,addr))
-
-static inline int minix_test_and_clear_bit(int nr, volatile void *vaddr)
-{
-	char retval;
-
-	__asm__ __volatile__ ("bfclr %2{%1:#1}; sne %0"
-	     : "=d" (retval) : "d" (nr^15), "m" (*(volatile char *) vaddr) : "memory");
-
-	return retval;
-}
+#define minix_test_and_set_bit(nr, addr)	test_and_set_bit((nr) ^ 16, (unsigned long *)(addr))
+#define minix_set_bit(nr,addr)			set_bit((nr) ^ 16, (unsigned long *)(addr))
+#define minix_test_and_clear_bit(nr, addr)	test_and_clear_bit((nr) ^ 16, (unsigned long *)(addr))
 
-static inline int minix_test_bit(int nr, const volatile void *vaddr)
+static inline int minix_test_bit(int nr, const void *vaddr)
 {
-	return ((1U << (nr & 15)) & (((const volatile unsigned short *) vaddr)[nr >> 4])) != 0;
+	const unsigned short *p = vaddr;
+	return (p[nr >> 4] & (1U << (nr & 15))) != 0;
 }
 
 /* Bitmap functions for the ext2 filesystem. */
 
-static inline int ext2_set_bit(int nr, volatile void *vaddr)
-{
-	char retval;
-
-	__asm__ __volatile__ ("bfset %2{%1,#1}; sne %0"
-	     : "=d" (retval) : "d" (nr^7), "m" (*(volatile char *) vaddr) : "memory");
-
-	return retval;
-}
-
-static inline int ext2_clear_bit(int nr, volatile void *vaddr)
-{
-	char retval;
-
-	__asm__ __volatile__ ("bfclr %2{%1,#1}; sne %0"
-	     : "=d" (retval) : "d" (nr^7), "m" (*(volatile char *) vaddr) : "memory");
-
-	return retval;
-}
-
-#define ext2_set_bit_atomic(lock, nr, addr)		\
-	({						\
-		int ret;				\
-		spin_lock(lock);			\
-		ret = ext2_set_bit((nr), (addr));	\
-		spin_unlock(lock);			\
-		ret;					\
-	})
-
-#define ext2_clear_bit_atomic(lock, nr, addr)		\
-	({						\
-		int ret;				\
-		spin_lock(lock);			\
-		ret = ext2_clear_bit((nr), (addr));	\
-		spin_unlock(lock);			\
-		ret;					\
-	})
+#define ext2_set_bit(nr, addr)			test_and_set_bit((nr) ^ 24, (unsigned long *)(addr))
+#define ext2_set_bit_atomic(lock, 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_clear_bit_atomic(lock, nr, addr)	test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr))
 
-static inline int ext2_test_bit(int nr, const volatile void *vaddr)
+static inline int ext2_test_bit(int nr, const void *vaddr)
 {
-	return ((1U << (nr & 7)) & (((const volatile unsigned char *) vaddr)[nr >> 3])) != 0;
+	const unsigned char *p = vaddr;
+	return (p[nr >> 3] & (1U << (nr & 7))) != 0;
 }
 
 static inline int ext2_find_first_zero_bit(const void *vaddr, unsigned size)
--- diff/include/asm-m68k/fcntl.h	2004-05-19 22:12:44.000000000 +0100
+++ source/include/asm-m68k/fcntl.h	2004-07-01 21:32:50.000000000 +0100
@@ -20,6 +20,7 @@
 #define O_NOFOLLOW	0100000	/* don't follow links */
 #define O_DIRECT	0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE	0400000
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-m68k/io.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-m68k/io.h	2004-07-01 21:32:50.000000000 +0100
@@ -120,7 +120,7 @@
  * be compiled in so the case statement will be optimised away
  */
 
-static inline u8 *isa_itb(long addr)
+static inline u8 *isa_itb(unsigned long addr)
 {
   switch(ISA_TYPE)
     {
@@ -136,7 +136,7 @@
     default: return 0; /* avoid warnings, just in case */
     }
 }
-static inline u16 *isa_itw(long addr)
+static inline u16 *isa_itw(unsigned long addr)
 {
   switch(ISA_TYPE)
     {
@@ -152,7 +152,7 @@
     default: return 0; /* avoid warnings, just in case */
     }
 }
-static inline u8 *isa_mtb(long addr)
+static inline u8 *isa_mtb(unsigned long addr)
 {
   switch(ISA_TYPE)
     {
@@ -168,7 +168,7 @@
     default: return 0; /* avoid warnings, just in case */
     }
 }
-static inline u16 *isa_mtw(long addr)
+static inline u16 *isa_mtw(unsigned long addr)
 {
   switch(ISA_TYPE)
     {
@@ -191,10 +191,14 @@
 #define isa_outb(val,port) out_8(isa_itb(port),(val))
 #define isa_outw(val,port) (ISA_SEX ? out_be16(isa_itw(port),(val)) : out_le16(isa_itw(port),(val)))
 
-#define isa_readb(p)       in_8(isa_mtb(p))
-#define isa_readw(p)       (ISA_SEX ? in_be16(isa_mtw(p)) : in_le16(isa_mtw(p)))
-#define isa_writeb(val,p)  out_8(isa_mtb(p),(val))
-#define isa_writew(val,p)  (ISA_SEX ? out_be16(isa_mtw(p),(val)) : out_le16(isa_mtw(p),(val)))
+#define isa_readb(p)       in_8(isa_mtb((unsigned long)(p)))
+#define isa_readw(p)       \
+	(ISA_SEX ? in_be16(isa_mtw((unsigned long)(p)))	\
+		 : in_le16(isa_mtw((unsigned long)(p))))
+#define isa_writeb(val,p)  out_8(isa_mtb((unsigned long)(p)),(val))
+#define isa_writew(val,p)  \
+	(ISA_SEX ? out_be16(isa_mtw((unsigned long)(p)),(val))	\
+		 : out_le16(isa_mtw((unsigned long)(p)),(val)))
 
 static inline void isa_delay(void)
 {
@@ -215,17 +219,21 @@
 
 #define isa_inb_p(p)      ({u8 v=isa_inb(p);isa_delay();v;})
 #define isa_outb_p(v,p)   ({isa_outb((v),(p));isa_delay();})
+#define isa_inw_p(p)      ({u16 v=isa_inw(p);isa_delay();v;})
+#define isa_outw_p(v,p)   ({isa_outw((v),(p));isa_delay();})
+#define isa_inl_p(p)      ({u32 v=isa_inl(p);isa_delay();v;})
+#define isa_outl_p(v,p)   ({isa_outl((v),(p));isa_delay();})
 
-#define isa_insb(port, buf, nr) raw_insb(isa_itb(port), (buf), (nr))
-#define isa_outsb(port, buf, nr) raw_outsb(isa_itb(port), (buf), (nr))
+#define isa_insb(port, buf, nr) raw_insb(isa_itb(port), (u8 *)(buf), (nr))
+#define isa_outsb(port, buf, nr) raw_outsb(isa_itb(port), (u8 *)(buf), (nr))
 
 #define isa_insw(port, buf, nr)     \
-       (ISA_SEX ? raw_insw(isa_itw(port), (buf), (nr)) :    \
-                  raw_insw_swapw(isa_itw(port), (buf), (nr)))
+       (ISA_SEX ? raw_insw(isa_itw(port), (u16 *)(buf), (nr)) :    \
+                  raw_insw_swapw(isa_itw(port), (u16 *)(buf), (nr)))
 
 #define isa_outsw(port, buf, nr)    \
-       (ISA_SEX ? raw_outsw(isa_itw(port), (buf), (nr)) :  \
-                  raw_outsw_swapw(isa_itw(port), (buf), (nr)))
+       (ISA_SEX ? raw_outsw(isa_itw(port), (u16 *)(buf), (nr)) :  \
+                  raw_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr)))
 #endif  /* CONFIG_ISA */
 
 
@@ -235,9 +243,13 @@
 #define outb    isa_outb
 #define outb_p  isa_outb_p
 #define inw     isa_inw
+#define inw_p   isa_inw_p
 #define outw    isa_outw
+#define outw_p  isa_outw_p
 #define inl     isa_inw
+#define inl_p   isa_inw_p
 #define outl    isa_outw
+#define outl_p  isa_outw_p
 #define insb    isa_insb
 #define insw    isa_insw
 #define outsb   isa_outsb
@@ -281,10 +293,16 @@
 #define inb(port) ((port)<1024 ? isa_inb(port) : in_8(port))
 #define inb_p(port) ((port)<1024 ? isa_inb_p(port) : in_8(port))
 #define inw(port) ((port)<1024 ? isa_inw(port) : in_le16(port))
+#define inw_p(port) ((port)<1024 ? isa_inw_p(port) : in_le16(port))
+#define inl(port) ((port)<1024 ? isa_inl(port) : in_le32(port))
+#define inl_p(port) ((port)<1024 ? isa_inl_p(port) : in_le32(port))
 
 #define outb(val,port) ((port)<1024 ? isa_outb((val),(port)) : out_8((port),(val)))
 #define outb_p(val,port) ((port)<1024 ? isa_outb_p((val),(port)) : out_8((port),(val)))
 #define outw(val,port) ((port)<1024 ? isa_outw((val),(port)) : out_le16((port),(val)))
+#define outw_p(val,port) ((port)<1024 ? isa_outw_p((val),(port)) : out_le16((port),(val)))
+#define outl(val,port) ((port)<1024 ? isa_outl((val),(port)) : out_le32((port),(val)))
+#define outl_p(val,port) ((port)<1024 ? isa_outl_p((val),(port)) : out_le32((port),(val)))
 #endif
 #endif /* CONFIG_PCI */
 
--- diff/include/asm-m68k/page.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-m68k/page.h	2004-07-01 21:32:50.000000000 +0100
@@ -52,15 +52,13 @@
 
 static inline void clear_page(void *page)
 {
-	unsigned long data, tmp;
-	void *sp = page;
+	unsigned long tmp;
+	unsigned long *sp = page;
 
-	data = 0;
-
-	*((unsigned long *)(page))++ = 0;
-	*((unsigned long *)(page))++ = 0;
-	*((unsigned long *)(page))++ = 0;
-	*((unsigned long *)(page))++ = 0;
+	*sp++ = 0;
+	*sp++ = 0;
+	*sp++ = 0;
+	*sp++ = 0;
 
 	__asm__ __volatile__("1:\t"
 			     ".chip 68040\n\t"
@@ -69,8 +67,8 @@
 			     "subqw  #8,%2\n\t"
 			     "subqw  #8,%2\n\t"
 			     "dbra   %1,1b\n\t"
-			     : "=a" (page), "=d" (tmp)
-			     : "a" (sp), "0" (page),
+			     : "=a" (sp), "=d" (tmp)
+			     : "a" (page), "0" (sp),
 			       "1" ((PAGE_SIZE - 16) / 16 - 1));
 }
 
--- diff/include/asm-m68k/resource.h	2004-05-19 22:12:44.000000000 +0100
+++ source/include/asm-m68k/resource.h	2004-07-01 21:32:50.000000000 +0100
@@ -16,8 +16,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -39,7 +41,9 @@
 	{      INR_OPEN,     INR_OPEN  },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
-        { RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-m68k/setup.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-m68k/setup.h	2004-07-01 21:32:50.000000000 +0100
@@ -357,6 +357,7 @@
 
 #define NUM_MEMINFO	4
 #define CL_SIZE		256
+#define COMMAND_LINE_SIZE	CL_SIZE
 
 #ifndef __ASSEMBLY__
 extern int m68k_num_memory;		/* # of memory blocks found (and used) */
--- diff/include/asm-m68k/string.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-m68k/string.h	2004-07-01 21:32:50.000000000 +0100
@@ -290,9 +290,7 @@
 static inline void * __memset_page(void * s,int c,size_t count)
 {
   unsigned long data, tmp;
-  void *xs, *sp;
-
-  xs = sp = s;
+  void *xs = s;
 
   c = c & 255;
   data = c | (c << 8);
@@ -303,10 +301,11 @@
   if (((unsigned long) s) & 0x0f)
 	  __memset_g(s, c, count);
   else{
-	  *((unsigned long *)(s))++ = data;
-	  *((unsigned long *)(s))++ = data;
-	  *((unsigned long *)(s))++ = data;
-	  *((unsigned long *)(s))++ = data;
+	  unsigned long *sp = s;
+	  *sp++ = data;
+	  *sp++ = data;
+	  *sp++ = data;
+	  *sp++ = data;
 
 	  __asm__ __volatile__("1:\t"
 			       ".chip 68040\n\t"
@@ -315,8 +314,8 @@
 			       "subqw  #8,%2\n\t"
 			       "subqw  #8,%2\n\t"
 			       "dbra   %1,1b\n\t"
-			       : "=a" (s), "=d" (tmp)
-			       : "a" (sp), "0" (s), "1" ((count - 16) / 16 - 1)
+			       : "=a" (sp), "=d" (tmp)
+			       : "a" (s), "0" (sp), "1" ((count - 16) / 16 - 1)
 			       );
   }
 
--- diff/include/asm-m68k/ucontext.h	2004-05-19 22:12:44.000000000 +0100
+++ source/include/asm-m68k/ucontext.h	2004-07-01 21:32:50.000000000 +0100
@@ -6,10 +6,8 @@
 typedef greg_t gregset_t[NGREG];
 
 typedef struct fpregset {
-	int f_pcr;
-	int f_psr;
-	int f_fpiaddr;
-	int f_fpregs[8][3];
+	int f_fpcntl[3];
+	int f_fpregs[8*3];
 } fpregset_t;
 
 struct mcontext {
--- diff/include/asm-m68knommu/setup.h	2004-05-19 22:12:45.000000000 +0100
+++ source/include/asm-m68knommu/setup.h	2004-07-01 21:32:50.000000000 +0100
@@ -1 +1,5 @@
 #include <asm-m68k/setup.h>
+
+/* We have a bigger command line buffer. */
+#undef COMMAND_LINE_SIZE
+#define COMMAND_LINE_SIZE	512
--- diff/include/asm-mips/asmmacro.h	2004-05-19 22:12:45.000000000 +0100
+++ source/include/asm-mips/asmmacro.h	2004-07-01 21:32:50.000000000 +0100
@@ -9,6 +9,7 @@
 #define _ASM_ASMMACRO_H
  
 #include <linux/config.h>
+#include <asm/hazards.h>
  
 #ifdef CONFIG_MIPS32
 #include <asm/asmmacro-32.h>
@@ -21,6 +22,7 @@
 	mfc0	\reg, CP0_STATUS
 	ori	\reg, \reg, 1
 	mtc0	\reg, CP0_STATUS
+	irq_enable_hazard
 	.endm
 
 	.macro	local_irq_disable reg=t0
@@ -28,7 +30,7 @@
 	ori	\reg, \reg, 1
 	xori	\reg, \reg, 1
 	mtc0	\reg, CP0_STATUS
-	SSNOP; SSNOP; SSNOP
+	irq_disable_hazard
 	.endm
 
 #ifdef CONFIG_CPU_SB1
--- diff/include/asm-mips/atomic.h	2004-05-19 22:12:45.000000000 +0100
+++ source/include/asm-mips/atomic.h	2004-07-01 21:32:50.000000000 +0100
@@ -9,7 +9,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1996, 97, 99, 2000, 03 by Ralf Baechle
+ * Copyright (C) 1996, 97, 99, 2000, 03, 04 by Ralf Baechle
  */
 
 /*
@@ -127,6 +127,32 @@
 	return result;
 }
 
+/*
+ * atomic_sub_if_positive - add integer to atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically test @v and decrement if it is greater than 0.
+ * The function returns the old value of @v minus 1.
+ */
+static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
+{
+	unsigned long temp, result;
+
+	__asm__ __volatile__(
+	"1:	ll	%1, %2		# atomic_sub_if_positive\n"
+	"	subu	%0, %1, %3				\n"
+	"	bltz	%0, 1f					\n"
+	"	sc	%0, %2					\n"
+	"	beqz	%0, 1b					\n"
+	"	sync						\n"
+	"1:							\n"
+	: "=&r" (result), "=&r" (temp), "=m" (v->counter)
+	: "Ir" (i), "m" (v->counter)
+	: "memory");
+
+	return result;
+}
+
 #else
 
 /*
@@ -192,6 +218,28 @@
 	return temp;
 }
 
+/*
+ * atomic_sub_if_positive - add integer to atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically test @v and decrement if it is greater than 0.
+ * The function returns the old value of @v minus 1.
+ */
+static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
+{
+	unsigned long flags;
+	int temp;
+
+	spin_lock_irqsave(&atomic_lock, flags);
+	temp = v->counter;
+	temp -= i;
+	if (temp >= 0)
+		v->counter = temp;
+	spin_unlock_irqrestore(&atomic_lock, flags);
+
+	return temp;
+}
+
 #endif /* CONFIG_CPU_HAS_LLSC */
 
 #define atomic_dec_return(v) atomic_sub_return(1,(v))
@@ -229,6 +277,12 @@
 #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
 
 /*
+ * atomic_dec_if_positive - decrement by 1 if old value positive
+ * @v: pointer of type atomic_t
+ */
+#define atomic_dec_if_positive(v)	atomic_sub_if_positive(1, v)
+
+/*
  * atomic_inc - increment atomic variable
  * @v: pointer of type atomic_t
  *
@@ -284,7 +338,7 @@
  *
  * Atomically adds @i to @v.
  */
-static __inline__ void atomic64_add(int i, atomic64_t * v)
+static __inline__ void atomic64_add(long i, atomic64_t * v)
 {
 	unsigned long temp;
 
@@ -304,7 +358,7 @@
  *
  * Atomically subtracts @i from @v.
  */
-static __inline__ void atomic64_sub(int i, atomic64_t * v)
+static __inline__ void atomic64_sub(long i, atomic64_t * v)
 {
 	unsigned long temp;
 
@@ -320,7 +374,7 @@
 /*
  * Same as above, but return the result value
  */
-static __inline__ int atomic64_add_return(int i, atomic64_t * v)
+static __inline__ long atomic64_add_return(long i, atomic64_t * v)
 {
 	unsigned long temp, result;
 
@@ -338,7 +392,7 @@
 	return result;
 }
 
-static __inline__ int atomic64_sub_return(int i, atomic64_t * v)
+static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
 {
 	unsigned long temp, result;
 
@@ -356,6 +410,32 @@
 	return result;
 }
 
+/*
+ * atomic64_sub_if_positive - add integer to atomic variable
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically test @v and decrement if it is greater than 0.
+ * The function returns the old value of @v minus 1.
+ */
+static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
+{
+	unsigned long temp, result;
+
+	__asm__ __volatile__(
+	"1:	lld	%1, %2		# atomic64_sub_if_positive\n"
+	"	dsubu	%0, %1, %3				\n"
+	"	bltz	%0, 1f					\n"
+	"	scd	%0, %2					\n"
+	"	beqz	%0, 1b					\n"
+	"	sync						\n"
+	"1:							\n"
+	: "=&r" (result), "=&r" (temp), "=m" (v->counter)
+	: "Ir" (i), "m" (v->counter)
+	: "memory");
+
+	return result;
+}
+
 #else
 
 /*
@@ -368,7 +448,7 @@
  *
  * Atomically adds @i to @v.
  */
-static __inline__ void atomic64_add(int i, atomic64_t * v)
+static __inline__ void atomic64_add(long i, atomic64_t * v)
 {
 	unsigned long flags;
 
@@ -384,7 +464,7 @@
  *
  * Atomically subtracts @i from @v.
  */
-static __inline__ void atomic64_sub(int i, atomic64_t * v)
+static __inline__ void atomic64_sub(long i, atomic64_t * v)
 {
 	unsigned long flags;
 
@@ -393,10 +473,10 @@
 	spin_unlock_irqrestore(&atomic_lock, flags);
 }
 
-static __inline__ int atomic64_add_return(int i, atomic64_t * v)
+static __inline__ long atomic64_add_return(long i, atomic64_t * v)
 {
 	unsigned long flags;
-	int temp;
+	long temp;
 
 	spin_lock_irqsave(&atomic_lock, flags);
 	temp = v->counter;
@@ -407,10 +487,10 @@
 	return temp;
 }
 
-static __inline__ int atomic64_sub_return(int i, atomic64_t * v)
+static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
 {
 	unsigned long flags;
-	int temp;
+	long temp;
 
 	spin_lock_irqsave(&atomic_lock, flags);
 	temp = v->counter;
@@ -421,6 +501,28 @@
 	return temp;
 }
 
+/*
+ * atomic64_sub_if_positive - add integer to atomic variable
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically test @v and decrement if it is greater than 0.
+ * The function returns the old value of @v minus 1.
+ */
+static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
+{
+	unsigned long flags;
+	long temp;
+
+	spin_lock_irqsave(&atomic_lock, flags);
+	temp = v->counter;
+	temp -= i;
+	if (temp >= 0)
+		v->counter = temp;
+	spin_unlock_irqrestore(&atomic_lock, flags);
+
+	return temp;
+}
+
 #endif /* CONFIG_CPU_HAS_LLDSCD */
 
 #define atomic64_dec_return(v) atomic64_sub_return(1,(v))
@@ -458,6 +560,12 @@
 #define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0)
 
 /*
+ * atomic64_dec_if_positive - decrement by 1 if old value positive
+ * @v: pointer of type atomic64_t
+ */
+#define atomic64_dec_if_positive(v)	atomic64_sub_if_positive(1, v)
+
+/*
  * atomic64_inc - increment atomic variable
  * @v: pointer of type atomic64_t
  *
--- diff/include/asm-mips/bootinfo.h	2004-05-19 22:12:45.000000000 +0100
+++ source/include/asm-mips/bootinfo.h	2004-07-01 21:32:50.000000000 +0100
@@ -12,6 +12,7 @@
 #define _ASM_BOOTINFO_H
 
 #include <linux/types.h>
+#include <asm/setup.h>
 
 /*
  * The MACH_GROUP_ IDs are the equivalent to PCI vendor IDs; the remaining
@@ -209,7 +210,7 @@
 #define MACH_GROUP_TITAN       22	/* PMC-Sierra Titan		*/
 #define  MACH_TITAN_YOSEMITE	1	/* PMC-Sierra Yosemite		*/
 
-#define CL_SIZE			(256)
+#define CL_SIZE			COMMAND_LINE_SIZE
 
 const char *get_system_type(void);
 
--- diff/include/asm-mips/cache.h	2004-05-19 22:12:45.000000000 +0100
+++ source/include/asm-mips/cache.h	2004-07-01 21:32:50.000000000 +0100
@@ -18,4 +18,6 @@
 #define SMP_CACHE_SHIFT		L1_CACHE_SHIFT
 #define SMP_CACHE_BYTES		L1_CACHE_BYTES
 
+#define ARCH_KMALLOC_MINALIGN	8
+
 #endif /* _ASM_CACHE_H */
--- diff/include/asm-mips/checksum.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-mips/checksum.h	2004-07-01 21:32:50.000000000 +0100
@@ -41,7 +41,8 @@
  * Copy and checksum to user
  */
 #define HAVE_CSUM_COPY_USER
-static inline unsigned int csum_and_copy_to_user (const char *src, char *dst,
+static inline unsigned int csum_and_copy_to_user (const char *src, 
+						  char __user *dst,
 						  int len, int sum,
 						  int *err_ptr)
 {
--- diff/include/asm-mips/fcntl.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/fcntl.h	2004-07-01 21:32:50.000000000 +0100
@@ -26,6 +26,7 @@
 #define O_DIRECT	0x8000	/* direct disk access hint */
 #define O_DIRECTORY	0x10000	/* must be a directory */
 #define O_NOFOLLOW	0x20000	/* don't follow links */
+#define O_NOATIME	0x40000
 
 #define O_NDELAY	O_NONBLOCK
 
--- diff/include/asm-mips/hazards.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/hazards.h	2004-07-01 21:32:50.000000000 +0100
@@ -12,22 +12,27 @@
 
 #ifdef __ASSEMBLY__
 
+	.macro	_ssnop
+	sll	$0, $2, 1
+	.endm
+
 /*
  * RM9000 hazards.  When the JTLB is updated by tlbwi or tlbwr, a subsequent
  * use of the JTLB for instructions should not occur for 4 cpu cycles and use
  * for data translations should not occur for 3 cpu cycles.
  */
 #ifdef CONFIG_CPU_RM9000
+
 #define mtc0_tlbw_hazard						\
 	.set	push;							\
 	.set	mips32;							\
-	ssnop; ssnop; ssnop; ssnop;					\
+	_ssnop; _ssnop; _ssnop; _ssnop;					\
 	.set	pop
 
 #define tlbw_eret_hazard						\
 	.set	push;							\
 	.set	mips32;							\
-	ssnop; ssnop; ssnop; ssnop;					\
+	_ssnop; _ssnop; _ssnop; _ssnop;					\
 	.set	pop
 
 #else
@@ -43,6 +48,33 @@
 #define tlbw_eret_hazard
 #endif
 
+/*
+ * mtc0->mfc0 hazard
+ * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
+ * It is a MIPS32R2 processor so ehb will clear the hazard.
+ */
+
+#ifdef CONFIG_CPU_MIPSR2
+/*
+ * Use a macro for ehb unless explicit support for MIPSR2 is enabled
+ */
+	.macro	ehb
+	sll	$0, $0, 3
+	.endm
+
+#define irq_enable_hazard						\
+	ehb		# irq_enable_hazard
+
+#define irq_disable_hazard						\
+	ehb		# irq_disable_hazard
+
+#else
+
+#define irq_enable_hazard
+#define irq_disable_hazard
+
+#endif
+
 #else /* __ASSEMBLY__ */
 
 /*
@@ -55,13 +87,13 @@
 #define mtc0_tlbw_hazard()						\
 	__asm__ __volatile__(						\
 		".set\tmips32\n\t"					\
-		"ssnop; ssnop; ssnop; ssnop\n\t"			\
+		"_ssnop; _ssnop; _ssnop; _ssnop\n\t"			\
 		".set\tmips0")
 
 #define tlbw_use_hazard()						\
 	__asm__ __volatile__(						\
 		".set\tmips32\n\t"					\
-		"ssnop; ssnop; ssnop; ssnop\n\t"			\
+		"_ssnop; _ssnop; _ssnop; _ssnop\n\t"			\
 		".set\tmips0")
 #else
 
@@ -82,6 +114,83 @@
 
 #endif
 
+/*
+ * mtc0->mfc0 hazard
+ * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
+ * It is a MIPS32R2 processor so ehb will clear the hazard.
+ */
+
+#ifdef CONFIG_CPU_MIPSR2
+/*
+ * Use a macro for ehb unless explicit support for MIPSR2 is enabled
+ */
+__asm__(
+	"	.macro	ehb					\n\t"
+	"	sll	$0, $0, 3				\n\t"
+	"	.endm						\n\t"
+	"							\n\t"
+	"	.macro\tirq_enable_hazard			\n\t"
+	"	ehb						\n\t"
+	"	.endm						\n\t"
+	"							\n\t"
+	"	.macro\tirq_disable_hazard			\n\t"
+	"	ehb						\n\t"
+	"	.endm");
+
+#define irq_enable_hazard()						\
+	__asm__ __volatile__(						\
+	"ehb\t\t\t\t# irq_enable_hazard")
+
+#define irq_disable_hazard()						\
+	__asm__ __volatile__(						\
+	"ehb\t\t\t\t# irq_disable_hazard")
+
+#elif defined(CONFIG_CPU_R10000)
+
+/*
+ * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
+ */
+
+__asm__(
+	"	.macro\tirq_enable_hazard			\n\t"
+	"	.endm						\n\t"
+	"							\n\t"
+	"	.macro\tirq_disable_hazard			\n\t"
+	"	.endm");
+
+#define irq_enable_hazard()	do { } while (0)
+#define irq_disable_hazard()	do { } while (0)
+
+#else
+
+/*
+ * Default for classic MIPS processors.  Assume worst case hazards but don't
+ * care about the irq_enable_hazard - sooner or later the hardware will
+ * enable it and we don't care when exactly.
+ */
+
+__asm__(
+	"	.macro	_ssnop					\n\t"
+	"	sll	$0, $2, 1				\n\t"
+	"	.endm						\n\t"
+	"							\n\t"
+	"	#						\n\t"
+	"	# There is a hazard but we do not care		\n\t"
+	"	#						\n\t"
+	"	.macro\tirq_enable_hazard			\n\t"
+	"	.endm						\n\t"
+	"							\n\t"
+	"	.macro\tirq_disable_hazard			\n\t"
+	"	_ssnop; _ssnop; _ssnop				\n\t"
+	"	.endm");
+
+#define irq_enable_hazard()	do { } while (0)
+#define irq_disable_hazard()						\
+	__asm__ __volatile__(						\
+	"_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard")
+
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_HAZARDS_H */
--- diff/include/asm-mips/mipsregs.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/mipsregs.h	2004-07-01 21:32:50.000000000 +0100
@@ -632,7 +632,7 @@
 } while (0)
 
 /*
- * On The RM7000 these are use to access cop0 set 1 registers
+ * On RM7000/RM9000 these are uses to access cop0 set 1 registers
  */
 #define __read_32bit_c0_ctrl_register(source)				\
 ({ int __res;								\
--- diff/include/asm-mips/mmu_context.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/mmu_context.h	2004-07-01 21:32:50.000000000 +0100
@@ -45,12 +45,17 @@
 #define ASID_INC	0x40
 #define ASID_MASK	0xfc0
 
+#elif defined(CONFIG_CPU_R8000)
+
+#define ASID_INC	0x10
+#define ASID_MASK	0xff0
+
 #elif defined(CONFIG_CPU_RM9000)
 
 #define ASID_INC	0x1
 #define ASID_MASK	0xfff
 
-#else /* FIXME: not correct for R6000, R8000 */
+#else /* FIXME: not correct for R6000 */
 
 #define ASID_INC	0x1
 #define ASID_MASK	0xff
@@ -78,9 +83,8 @@
 	unsigned long asid = asid_cache(cpu);
 
 	if (! ((asid += ASID_INC) & ASID_MASK) ) {
-#ifdef CONFIG_VTAG_ICACHE
-		flush_icache_all();
-#endif
+		if (cpu_has_vtag_icache)
+			flush_icache_all();
 		local_flush_tlb_all();	/* start new asid cycle */
 		if (!asid)		/* fix version if needed */
 			asid = ASID_FIRST_VERSION;
--- diff/include/asm-mips/module.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/module.h	2004-07-01 21:32:50.000000000 +0100
@@ -2,11 +2,14 @@
 #define _ASM_MODULE_H
 
 #include <linux/config.h>
+#include <linux/list.h>
+#include <asm/uaccess.h>
 
 struct mod_arch_specific {
 	/* Data Bus Error exception tables */
-	const struct exception_table_entry *dbe_table_start;
-	const struct exception_table_entry *dbe_table_end;
+	struct list_head dbe_list;
+	const struct exception_table_entry *dbe_start;
+	const struct exception_table_entry *dbe_end;
 };
 
 typedef uint8_t Elf64_Byte;		/* Type for a 8-bit quantity.  */
@@ -38,4 +41,16 @@
 
 #endif
 
+#ifdef CONFIG_MODULES
+/* Given an address, look for it in the exception tables. */
+const struct exception_table_entry*search_module_dbetables(unsigned long addr);
+#else
+/* Given an address, look for it in the exception tables. */
+static inline const struct exception_table_entry *
+search_module_dbetables(unsigned long addr)
+{
+	return NULL;
+}
+#endif
+
 #endif /* _ASM_MODULE_H */
--- diff/include/asm-mips/page.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/page.h	2004-07-01 21:32:50.000000000 +0100
@@ -10,16 +10,20 @@
 #define _ASM_PAGE_H
 
 #include <linux/config.h>
-#include <spaces.h>
 
 #ifdef __KERNEL__
 
+#include <spaces.h>
+
 /*
  * PAGE_SHIFT determines the page size
  */
 #ifdef CONFIG_PAGE_SIZE_4KB
 #define PAGE_SHIFT	12
 #endif
+#ifdef CONFIG_PAGE_SIZE_8KB
+#define PAGE_SHIFT	13
+#endif
 #ifdef CONFIG_PAGE_SIZE_16KB
 #define PAGE_SHIFT	14
 #endif
--- diff/include/asm-mips/pci.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/pci.h	2004-07-01 21:32:50.000000000 +0100
@@ -87,6 +87,9 @@
 extern void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
 	dma64_addr_t dma_addr, size_t len, int direction);
 
+extern void pcibios_resource_to_bus(struct pci_dev *dev,
+	struct pci_bus_region *region, struct resource *res);
+
 #endif /* __KERNEL__ */
 
 /* implement the pci_ DMA API in terms of the generic device dma_ one */
--- diff/include/asm-mips/pgtable-32.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-mips/pgtable-32.h	2004-07-01 21:32:50.000000000 +0100
@@ -141,35 +141,8 @@
 #define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 #endif
 
-#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
-
-/*
- * Bits 0, 1, 2, 9 and 10 are taken, split up the 27 bits of offset
- * into this range:
- */
-#define pte_to_pgoff(_pte) \
-	((((_pte).pte >> 3) & 0x3f ) + (((_pte).pte >> 11) << 8 ))
-
-#define pgoff_to_pte(off) \
-	((pte_t) { (((off) & 0x3f) << 3) + (((off) >> 8) << 11) + _PAGE_FILE })
-
-#else
-
-/*
- * Bits 0, 1, 2, 7 and 8 are taken, split up the 27 bits of offset
- * into this range:
- */
-#define pte_to_pgoff(_pte) \
-	((((_pte).pte >> 3) & 0x1f ) + (((_pte).pte >> 9) << 6 ))
- 
-#define pgoff_to_pte(off) \
-	((pte_t) { (((off) & 0x1f) << 3) + (((off) >> 6) << 9) + _PAGE_FILE })
-
-#endif
-
 #define __pgd_offset(address)	pgd_index(address)
-#define __pmd_offset(address) \
-	(((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
+#define __pmd_offset(address)	(((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
 
 /* to find an entry in a kernel page-table-directory */
 #define pgd_offset_k(address) pgd_offset(&init_mm, address)
@@ -200,17 +173,46 @@
 #define pte_unmap(pte) ((void)(pte))
 #define pte_unmap_nested(pte) ((void)(pte))
 
-/* Swap entries must have VALID and GLOBAL bits cleared. */
 #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
 
-#define __swp_type(x)		(((x).val >> 1) & 0x7f)
-#define __swp_offset(x)		((x).val >> 10)
-#define __swp_entry(type,offset)	((swp_entry_t) { ((type) << 1) | ((offset) << 10) })
+/* Swap entries must have VALID bit cleared. */
+#define __swp_type(x)		(((x).val >> 10) & 0x1f)
+#define __swp_offset(x)		((x).val >> 15)
+#define __swp_entry(type,offset)	\
+	((swp_entry_t) { ((type) << 10) | ((offset) << 15) })
+
+/*
+ * Bits 0, 1, 2, 9 and 10 are taken, split up the 27 bits of offset
+ * into this range:
+ */
+#define PTE_FILE_MAX_BITS	27
+
+#define pte_to_pgoff(_pte) \
+	((((_pte).pte >> 3) & 0x3f ) + (((_pte).pte >> 11) << 8 ))
+
+#define pgoff_to_pte(off) \
+	((pte_t) { (((off) & 0x3f) << 3) + (((off) >> 8) << 11) + _PAGE_FILE })
+
 #else
 
-#define __swp_type(x)		(((x).val >> 1) & 0x1f)
-#define __swp_offset(x)		((x).val >> 8)
-#define __swp_entry(type,offset)	((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+/* Swap entries must have VALID and GLOBAL bits cleared. */
+#define __swp_type(x)		(((x).val >> 8) & 0x1f)
+#define __swp_offset(x)		((x).val >> 13)
+#define __swp_entry(type,offset)	\
+		((swp_entry_t) { ((type) << 8) | ((offset) << 13) })
+
+/*
+ * Bits 0, 1, 2, 7 and 8 are taken, split up the 27 bits of offset
+ * into this range:
+ */
+#define PTE_FILE_MAX_BITS	27
+
+#define pte_to_pgoff(_pte) \
+	((((_pte).pte >> 3) & 0x1f ) + (((_pte).pte >> 9) << 6 ))
+
+#define pgoff_to_pte(off) \
+	((pte_t) { (((off) & 0x1f) << 3) + (((off) >> 6) << 9) + _PAGE_FILE })
+
 #endif
 
 #define __pte_to_swp_entry(pte)	((swp_entry_t) { pte_val(pte) })
--- diff/include/asm-mips/pgtable-64.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-mips/pgtable-64.h	2004-07-01 21:32:50.000000000 +0100
@@ -53,7 +53,11 @@
  * We used to implement 41 bits by having an order 1 pmd level but that seemed
  * rather pointless.
  *
- * For 16kB page size we use a 2 level page tree which permit a total of
+ * For 8kB page size we use a 3 level page tree which permits a total of
+ * 8TB of address space.  Alternatively a 33-bit / 8GB organization using
+ * two levels would be easy to implement.
+ *
+ * For 16kB page size we use a 2 level page tree which permits a total of
  * 36 bits of virtual address space.  We could add a third leve. but it seems
  * like at the moment there's no need for this.
  *
@@ -65,6 +69,11 @@
 #define PMD_ORDER		1
 #define PTE_ORDER		0
 #endif
+#ifdef CONFIG_PAGE_SIZE_8KB
+#define PGD_ORDER		0
+#define PMD_ORDER		0
+#define PTE_ORDER		0
+#endif
 #ifdef CONFIG_PAGE_SIZE_16KB
 #define PGD_ORDER		0
 #define PMD_ORDER		0
@@ -148,16 +157,6 @@
 #define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 #endif
 
-/*
- * Bits 0, 1, 2, 7 and 8 are taken, split up the 27 bits of offset
- * into this range:
- */
-#define pte_to_pgoff(_pte) \
-	((((_pte).pte >> 3) & 0x1f ) + (((_pte).pte >> 9) << 6 ))
-
-#define pgoff_to_pte(off) \
-	((pte_t) { (((off) & 0x1f) << 3) + (((off) >> 6) << 9) + _PAGE_FILE })
-
 #define __pgd_offset(address)	pgd_index(address)
 #define page_pte(page) page_pte_prot(page, __pgprot(0))
 
@@ -215,6 +214,18 @@
 #define __swp_entry_to_pte(x)	((pte_t) { (x).val })
 
 /*
+ * Bits 0, 1, 2, 7 and 8 are taken, split up the 32 bits of offset
+ * into this range:
+ */
+#define PTE_FILE_MAX_BITS	32
+
+#define pte_to_pgoff(_pte) \
+	((((_pte).pte >> 3) & 0x1f ) + (((_pte).pte >> 9) << 6 ))
+
+#define pgoff_to_pte(off) \
+	((pte_t) { (((off) & 0x1f) << 3) + (((off) >> 6) << 9) + _PAGE_FILE })
+
+/*
  * Used for the b0rked handling of kernel pagetables on the 64-bit kernel.
  */
 extern pte_t kptbl[(PAGE_SIZE << PGD_ORDER)/sizeof(pte_t)];
--- diff/include/asm-mips/pgtable-bits.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/pgtable-bits.h	2004-07-01 21:32:50.000000000 +0100
@@ -60,7 +60,7 @@
 #define _PAGE_SILENT_WRITE          (1<<8)
 #define _CACHE_MASK                 (7<<9)
 
-#if defined(CONFIG_CPU_SB1)
+#ifdef CONFIG_CPU_SB1
 
 /* No penalty for being coherent on the SB1, so just
    use it for "noncoherent" spaces, too.  Shouldn't hurt. */
@@ -70,6 +70,20 @@
 #define _CACHE_CACHABLE_NONCOHERENT (5<<9)
 #define _CACHE_UNCACHED_ACCELERATED (7<<9)
 
+#elif defined(CONFIG_CPU_RM9000)
+
+#define _CACHE_WT			(0 << 9)
+#define _CACHE_WTWA			(1 << 9)
+#define _CACHE_UC_B			(2 << 9)
+#define _CACHE_WB			(3 << 9)
+#define _CACHE_CWBEA			(4 << 9)
+#define _CACHE_CWB			(5 << 9)
+#define _CACHE_UCNB			(6 << 9)
+#define _CACHE_FPC			(7 << 9)
+
+#define _CACHE_UNCACHED			_CACHE_UC_B
+#define _CACHE_CACHABLE_NONCOHERENT	_CACHE_UC_B
+
 #else
 
 #define _CACHE_CACHABLE_NO_WA       (0<<9)  /* R4600 only              */
@@ -93,6 +107,8 @@
 #define PAGE_CACHABLE_DEFAULT	_CACHE_UNCACHED
 #elif defined(CONFIG_DMA_NONCOHERENT)
 #define PAGE_CACHABLE_DEFAULT	_CACHE_CACHABLE_NONCOHERENT
+#elif defined(CONFIG_CPU_RM9000)
+#define PAGE_CACHABLE_DEFAULT	_CACHE_CWBEA
 #else
 #define PAGE_CACHABLE_DEFAULT	_CACHE_CACHABLE_COW
 #endif
--- diff/include/asm-mips/pgtable.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/pgtable.h	2004-07-01 21:32:50.000000000 +0100
@@ -125,8 +125,6 @@
 
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
 
-#define PTE_FILE_MAX_BITS	27
-
 /*
  * The following only work if pte_present() is true.
  * Undefined behaviour if not..
--- diff/include/asm-mips/pmon.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-mips/pmon.h	2004-07-01 21:32:50.000000000 +0100
@@ -17,6 +17,9 @@
 	int	(*printf) (const char*, ...);		/*	20 */
 	void	(*cacheflush) (void);			/*	24 */
 	char*	(*gets) (char*);			/*	28 */
+	int	(*cpustart) (int, void *, int, int);	/*	32 */
 };
 
+extern struct callvectors *debug_vectors;
+
 #endif /* _ASM_PMON_H */
--- diff/include/asm-mips/processor.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-mips/processor.h	2004-07-01 21:32:50.000000000 +0100
@@ -137,9 +137,9 @@
 #endif
 
 /*
- * Size of io_bitmap in longwords: 32 is ports 0-0x3ff.
+ * Size of io_bitmap in longwords.
  */
-#define IO_BITMAP_SIZE	32
+#define IO_BITMAP_SIZE	2048
 
 #define NUM_FPU_REGS	32
 
@@ -280,15 +280,6 @@
  */
 #define return_address() ({__asm__ __volatile__("":::"$31");__builtin_return_address(0);})
 
-/*
- * For now.  The 32-bit cycle counter is screwed up so solving this nicely takes a little
- * brainwork ...
- */
-static inline unsigned long long sched_clock(void)
-{
-	return 0ULL;
-}
-
 #ifdef CONFIG_CPU_HAS_PREFETCH
 
 #define ARCH_HAS_PREFETCH
--- diff/include/asm-mips/resource.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/resource.h	2004-07-01 21:32:50.000000000 +0100
@@ -23,8 +23,10 @@
 #define RLIMIT_NPROC 8			/* max number of processes */
 #define RLIMIT_MEMLOCK 9		/* max locked-in-memory address space */
 #define RLIMIT_LOCKS 10			/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS 11			/* Number of limit flavors.  */
+#define RLIM_NLIMITS 13			/* Number of limit flavors.  */
 
 #ifdef __KERNEL__
 
@@ -54,6 +56,8 @@
 	{ 0,             0             },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-mips/semaphore.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/semaphore.h	2004-07-01 21:32:50.000000000 +0100
@@ -4,61 +4,70 @@
  * for more details.
  *
  * Copyright (C) 1996  Linus Torvalds
- * Copyright (C) 1998, 99, 2000, 01  Ralf Baechle
+ * Copyright (C) 1998, 99, 2000, 01, 04  Ralf Baechle
  * Copyright (C) 1999, 2000, 01  Silicon Graphics, Inc.
  * Copyright (C) 2000, 01 MIPS Technologies, Inc.
+ *
+ * In all honesty, little of the old MIPS code left - the PPC64 variant was
+ * just looking nice and portable so I ripped it.  Credits to whoever wrote
+ * it.
  */
-#ifndef _ASM_SEMAPHORE_H
-#define _ASM_SEMAPHORE_H
+#ifndef __ASM_SEMAPHORE_H
+#define __ASM_SEMAPHORE_H
+
+/*
+ * Remove spinlock-based RW semaphores; RW semaphore definitions are
+ * now in rwsem.h and we use the generic lib/rwsem.c implementation.
+ * Rework semaphores to use atomic_dec_if_positive.
+ * -- Paul Mackerras (paulus@samba.org)
+ */
+
+#ifdef __KERNEL__
 
-#include <linux/compiler.h>
-#include <linux/config.h>
-#include <linux/spinlock.h>
+#include <asm/atomic.h>
+#include <asm/system.h>
 #include <linux/wait.h>
 #include <linux/rwsem.h>
-#include <asm/atomic.h>
 
 struct semaphore {
-#ifdef __MIPSEB__
-	atomic_t count;
-	atomic_t waking;
-#else
-	atomic_t waking;
+	/*
+	 * Note that any negative value of count is equivalent to 0,
+	 * but additionally indicates that some process(es) might be
+	 * sleeping on `wait'.
+	 */
 	atomic_t count;
-#endif
 	wait_queue_head_t wait;
-#if WAITQUEUE_DEBUG
+#ifdef WAITQUEUE_DEBUG
 	long __magic;
 #endif
-} __attribute__((aligned(8)));
+};
 
-#if WAITQUEUE_DEBUG
-# define __SEM_DEBUG_INIT(name) , .__magic = (long)&(name).__magic
+#ifdef WAITQUEUE_DEBUG
+# define __SEM_DEBUG_INIT(name) \
+		, (long)&(name).__magic
 #else
 # define __SEM_DEBUG_INIT(name)
 #endif
 
-#define __SEMAPHORE_INITIALIZER(name,_count) {				\
-	.count	= ATOMIC_INIT(_count),					\
-	.waking	= ATOMIC_INIT(0),					\
-	.wait	= __WAIT_QUEUE_HEAD_INITIALIZER((name).wait)		\
-	__SEM_DEBUG_INIT(name)						\
-}
+#define __SEMAPHORE_INITIALIZER(name, count) \
+	{ ATOMIC_INIT(count), \
+	  __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
+	  __SEM_DEBUG_INIT(name) }
 
-#define __MUTEX_INITIALIZER(name) __SEMAPHORE_INITIALIZER(name, 1)
+#define __MUTEX_INITIALIZER(name) \
+	__SEMAPHORE_INITIALIZER(name, 1)
 
-#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
-	struct semaphore name = __SEMAPHORE_INITIALIZER(name, count)
+#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
+	struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
 
-#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1)
-#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
+#define DECLARE_MUTEX(name)		__DECLARE_SEMAPHORE_GENERIC(name, 1)
+#define DECLARE_MUTEX_LOCKED(name)	__DECLARE_SEMAPHORE_GENERIC(name, 0)
 
 static inline void sema_init (struct semaphore *sem, int val)
 {
 	atomic_set(&sem->count, val);
-	atomic_set(&sem->waking, 0);
 	init_waitqueue_head(&sem->wait);
-#if WAITQUEUE_DEBUG
+#ifdef WAITQUEUE_DEBUG
 	sem->__magic = (long)&sem->__magic;
 #endif
 }
@@ -73,211 +82,57 @@
 	sema_init(sem, 0);
 }
 
-#ifndef CONFIG_CPU_HAS_LLDSCD
-/*
- * On machines without lld/scd we need a spinlock to make the manipulation of
- * sem->count and sem->waking atomic.
- */
-extern spinlock_t semaphore_lock;
-#endif
-
-extern void __down_failed(struct semaphore * sem);
-extern int  __down_failed_interruptible(struct semaphore * sem);
-extern void __up_wakeup(struct semaphore * sem);
+extern void __down(struct semaphore * sem);
+extern int  __down_interruptible(struct semaphore * sem);
+extern void __up(struct semaphore * sem);
 
 static inline void down(struct semaphore * sem)
 {
-	int count;
-
-#if WAITQUEUE_DEBUG
+#ifdef WAITQUEUE_DEBUG
 	CHECK_MAGIC(sem->__magic);
 #endif
 	might_sleep();
-	count = atomic_dec_return(&sem->count);
-	if (unlikely(count < 0))
-		__down_failed(sem);
+
+	/*
+	 * Try to get the semaphore, take the slow path if we fail.
+	 */
+	if (unlikely(atomic_dec_return(&sem->count) < 0))
+		__down(sem);
 }
 
-/*
- * Interruptible try to acquire a semaphore.  If we obtained
- * it, return zero.  If we were interrupted, returns -EINTR
- */
 static inline int down_interruptible(struct semaphore * sem)
 {
-	int count;
+	int ret = 0;
 
-#if WAITQUEUE_DEBUG
+#ifdef WAITQUEUE_DEBUG
 	CHECK_MAGIC(sem->__magic);
 #endif
 	might_sleep();
-	count = atomic_dec_return(&sem->count);
-	if (unlikely(count < 0))
-		return __down_failed_interruptible(sem);
-
-	return 0;
-}
-
-#ifdef CONFIG_CPU_HAS_LLDSCD
-
-/*
- * down_trylock returns 0 on success, 1 if we failed to get the lock.
- *
- * We must manipulate count and waking simultaneously and atomically.
- * Here, we do this by using lld/scd on the pair of 32-bit words.
- *
- * Pseudocode:
- *
- *   Decrement(sem->count)
- *   If(sem->count >=0) {
- *	Return(SUCCESS)			// resource is free
- *   } else {
- *	If(sem->waking <= 0) {		// if no wakeup pending
- *	   Increment(sem->count)	// undo decrement
- *	   Return(FAILURE)
- *      } else {
- *	   Decrement(sem->waking)	// otherwise "steal" wakeup
- *	   Return(SUCCESS)
- *	}
- *   }
- */
-static inline int down_trylock(struct semaphore * sem)
-{
-	long ret, tmp, tmp2, sub;
-
-#if WAITQUEUE_DEBUG
-	CHECK_MAGIC(sem->__magic);
-#endif
-
-	__asm__ __volatile__(
-	"	.set	mips3			# down_trylock		\n"
-	"0:	lld	%1, %4						\n"
-	"	dli	%3, 0x0000000100000000	# count -= 1		\n"
-	"	dsubu	%1, %3						\n"
-	"	li	%0, 0			# ret = 0		\n"
-	"	bgez	%1, 2f			# if count >= 0		\n"
-	"	sll	%2, %1, 0		# extract waking	\n"
-	"	blez	%2, 1f			# if waking < 0 -> 1f	\n"
-	"	daddiu	%1, %1, -1		# waking -= 1		\n"
-	"	b	2f						\n"
-	"1:	daddu	%1, %1, %3		# count += 1		\n"
-	"	li	%0, 1			# ret = 1		\n"
-	"2:	scd	%1, %4						\n"
-	"	beqz	%1, 0b						\n"
-	"	sync							\n"
-	"	.set	mips0						\n"
-	: "=&r"(ret), "=&r"(tmp), "=&r"(tmp2), "=&r"(sub)
-	: "m"(*sem)
-	: "memory");
 
+	if (unlikely(atomic_dec_return(&sem->count) < 0))
+		ret = __down_interruptible(sem);
 	return ret;
 }
 
-/*
- * Note! This is subtle. We jump to wake people up only if
- * the semaphore was negative (== somebody was waiting on it).
- */
-static inline void up(struct semaphore * sem)
-{
-	unsigned long tmp, tmp2;
-	int count;
-
-#if WAITQUEUE_DEBUG
-	CHECK_MAGIC(sem->__magic);
-#endif
-	/*
-	 * We must manipulate count and waking simultaneously and atomically.
-	 * Otherwise we have races between up and __down_failed_interruptible
-	 * waking up on a signal.
-	 */
-
-	__asm__ __volatile__(
-	"	.set	mips3					\n"
-	"	sync			# up			\n"
-	"1:	lld	%1, %3					\n"
-	"	dsra32	%0, %1, 0	# extract count to %0	\n"
-	"	daddiu	%0, 1		# count += 1		\n"
-	"	slti	%2, %0, 1	# %3 = (%0 <= 0)	\n"
-	"	daddu	%1, %2		# waking += %3		\n"
-	"	dsll32 %1, %1, 0	# zero-extend %1	\n"
-	"	dsrl32 %1, %1, 0				\n"
-	"	dsll32	%2, %0, 0	# Reassemble union	\n"
-	"	or	%1, %2		# from count and waking	\n"
-	"	scd	%1, %3					\n"
-	"	beqz	%1, 1b					\n"
-	"	.set	mips0					\n"
-	: "=&r"(count), "=&r"(tmp), "=&r"(tmp2), "+m"(*sem)
-	:
-	: "memory");
-
-	if (unlikely(count <= 0))
-		__up_wakeup(sem);
-}
-
-#else
-
-/*
- * Non-blockingly attempt to down() a semaphore.
- * Returns zero if we acquired it
- */
 static inline int down_trylock(struct semaphore * sem)
 {
-	unsigned long flags;
-	int count, waking;
-	int ret = 0;
-
-#if WAITQUEUE_DEBUG
+#ifdef WAITQUEUE_DEBUG
 	CHECK_MAGIC(sem->__magic);
 #endif
 
-	spin_lock_irqsave(&semaphore_lock, flags);
-	count = atomic_read(&sem->count) - 1;
-	atomic_set(&sem->count, count);
-	if (unlikely(count < 0)) {
-		waking = atomic_read(&sem->waking);
-		if (waking <= 0) {
-			atomic_set(&sem->count, count + 1);
-			ret = 1;
-		} else {
-			atomic_set(&sem->waking, waking - 1);
-			ret = 0;
-		}
-	}
-	spin_unlock_irqrestore(&semaphore_lock, flags);
-
-	return ret;
+	return atomic_dec_if_positive(&sem->count) < 0;
 }
 
-/*
- * Note! This is subtle. We jump to wake people up only if
- * the semaphore was negative (== somebody was waiting on it).
- */
 static inline void up(struct semaphore * sem)
 {
-	unsigned long flags;
-	int count, waking;
-
-#if WAITQUEUE_DEBUG
+#ifdef WAITQUEUE_DEBUG
 	CHECK_MAGIC(sem->__magic);
 #endif
-	/*
-	 * We must manipulate count and waking simultaneously and atomically.
-	 * Otherwise we have races between up and __down_failed_interruptible
-	 * waking up on a signal.
-	 */
-
-	spin_lock_irqsave(&semaphore_lock, flags);
-	count = atomic_read(&sem->count) + 1;
-	waking = atomic_read(&sem->waking);
-	if (count <= 0)
-		waking++;
-	atomic_set(&sem->count, count);
-	atomic_set(&sem->waking, waking);
-	spin_unlock_irqrestore(&semaphore_lock, flags);
 
-	if (unlikely(count <= 0))
-		__up_wakeup(sem);
+	if (unlikely(atomic_inc_return(&sem->count) <= 0))
+		__up(sem);
 }
 
-#endif /* CONFIG_CPU_HAS_LLDSCD */
+#endif /* __KERNEL__ */
 
-#endif /* _ASM_SEMAPHORE_H */
+#endif /* __ASM_SEMAPHORE_H */
--- diff/include/asm-mips/serial.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/serial.h	2004-07-01 21:32:50.000000000 +0100
@@ -315,24 +315,6 @@
 #define MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS
 #endif
 
-#ifdef CONFIG_TITAN_SERIAL
-/* 16552 20 MHz crystal */
-#define TITAN_SERIAL_BASE_BAUD	( 20000000 / 16 )
-#define	TITAN_SERIAL_IRQ	XXX
-#define	TITAN_SERIAL_BASE	0xffffffff
-
-#define	_TITAN_SERIAL_INIT(int, base)					\
-	{ baud_base: TITAN_SERIAL_BASE_BAUD, irq: int,			\
-	  flags: STD_COM_FLAGS,	iomem_base: (u8 *) base,		\
-	  iomem_reg_shift: 2, io_type: SERIAL_IO_MEM			\
-	}
-
-#define TITAN_SERIAL_PORT_DEFNS						\
-	_TITAN_SERIAL_INIT(TITAN_SERIAL_IRQ, TITAN_SERIAL_BASE)
-#else
-#define TITAN_SERIAL_PORT_DEFNS
-#endif
-
 #ifdef CONFIG_DDB5477
 #include <asm/ddb5xxx/ddb5477.h>
 #define DDB5477_SERIAL_PORT_DEFNS                                       \
@@ -371,7 +353,6 @@
 	MOMENCO_OCELOT_G_SERIAL_PORT_DEFNS		\
 	MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS		\
 	MOMENCO_OCELOT_SERIAL_PORT_DEFNS		\
-	TITAN_SERIAL_PORT_DEFNS				\
 	TXX927_SERIAL_PORT_DEFNS                        \
 	AU1000_SERIAL_PORT_DEFNS
 
--- diff/include/asm-mips/smp.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/smp.h	2004-07-01 21:32:50.000000000 +0100
@@ -51,8 +51,6 @@
 extern cpumask_t cpu_online_map;
 #define cpu_possible_map	phys_cpu_present_map
 
-#define cpu_online(cpu)		cpu_isset(cpu, cpu_online_map)
-
 extern cpumask_t cpu_callout_map;
 /* We don't mark CPUs online until __cpu_up(), so we need another measure */
 static inline int num_booting_cpus(void)
@@ -91,12 +89,6 @@
 extern void prom_prepare_cpus(unsigned int max_cpus);
 
 /*
- * Do whatever setup needs to be done for SMP at the board level.  Return
- * the number of cpus in the system, including this one
- */
-extern int prom_setup_smp(void);
-
-/*
  * Last chance for the board code to finish SMP initialization before
  * the CPU is "online".
  */
--- diff/include/asm-mips/spinlock.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-mips/spinlock.h	2004-07-01 21:32:50.000000000 +0100
@@ -92,9 +92,18 @@
 
 typedef struct {
 	volatile unsigned int lock;
+#ifdef CONFIG_LOCKMETER
+	/* required for LOCKMETER since all bits in lock are used */
+	/* and we need this storage for CPU and lock INDEX        */
+	unsigned lockmeter_magic;
+#endif
 } rwlock_t;
 
+#ifdef CONFIG_LOCKMETER
+#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
+#else
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
+#endif
 
 #define rwlock_init(x)  do { *(x) = RW_LOCK_UNLOCKED; } while(0)
 
--- diff/include/asm-mips/stackframe.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/stackframe.h	2004-07-01 21:32:50.000000000 +0100
@@ -302,6 +302,7 @@
 		or	t0, t1
 		xori	t0, 0x1f
 		mtc0	t0, CP0_STATUS
+		irq_disable_hazard
 		.endm
 
 /*
@@ -314,6 +315,7 @@
 		or	t0, t1
 		xori	t0, 0x1e
 		mtc0	t0, CP0_STATUS
+		irq_enable_hazard
 		.endm
 
 /*
@@ -326,6 +328,7 @@
 		or	t0, t1
 		xori	t0, 0x1e
 		mtc0	t0, CP0_STATUS
+		irq_disable_hazard
 		.endm
 
 #endif /* _ASM_STACKFRAME_H */
--- diff/include/asm-mips/system.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/system.h	2004-07-01 21:32:50.000000000 +0100
@@ -19,6 +19,7 @@
 
 #include <asm/addrspace.h>
 #include <asm/ptrace.h>
+#include <asm/hazards.h>
 
 __asm__ (
 	".macro\tlocal_irq_enable\n\t"
@@ -29,6 +30,7 @@
 	"ori\t$1,0x1f\n\t"
 	"xori\t$1,0x1e\n\t"
 	"mtc0\t$1,$12\n\t"
+	"irq_enable_hazard\n\t"
 	".set\tpop\n\t"
 	".endm");
 
@@ -57,9 +59,7 @@
 	"xori\t$1,1\n\t"
 	".set\tnoreorder\n\t"
 	"mtc0\t$1,$12\n\t"
-	"sll\t$0, $0, 1\t\t\t# nop\n\t"
-	"sll\t$0, $0, 1\t\t\t# nop\n\t"
-	"sll\t$0, $0, 1\t\t\t# nop\n\t"
+	"irq_disable_hazard\n\t"
 	".set\tpop\n\t"
 	".endm");
 
@@ -80,7 +80,7 @@
 	".set\tpop\n\t"
 	".endm");
 
-#define local_save_flags(x)							\
+#define local_save_flags(x)						\
 __asm__ __volatile__(							\
 	"local_save_flags %0"						\
 	: "=r" (x))
@@ -95,9 +95,7 @@
 	"xori\t$1, 1\n\t"
 	".set\tnoreorder\n\t"
 	"mtc0\t$1, $12\n\t"
-	"sll\t$0, $0, 1\t\t\t# nop\n\t"
-	"sll\t$0, $0, 1\t\t\t# nop\n\t"
-	"sll\t$0, $0, 1\t\t\t# nop\n\t"
+	"irq_disable_hazard\n\t"
 	".set\tpop\n\t"
 	".endm");
 
@@ -108,7 +106,8 @@
 	: /* no inputs */						\
 	: "memory")
 
-__asm__(".macro\tlocal_irq_restore flags\n\t"
+__asm__ (
+	".macro\tlocal_irq_restore flags\n\t"
 	".set\tnoreorder\n\t"
 	".set\tnoat\n\t"
 	"mfc0\t$1, $12\n\t"
@@ -117,14 +116,12 @@
 	"xori\t$1, 1\n\t"
 	"or\t\\flags, $1\n\t"
 	"mtc0\t\\flags, $12\n\t"
-	"sll\t$0, $0, 1\t\t\t# nop\n\t"
-	"sll\t$0, $0, 1\t\t\t# nop\n\t"
-	"sll\t$0, $0, 1\t\t\t# nop\n\t"
+	"irq_disable_hazard\n\t"
 	".set\tat\n\t"
 	".set\treorder\n\t"
 	".endm");
 
-#define local_irq_restore(flags)						\
+#define local_irq_restore(flags)					\
 do {									\
 	unsigned long __tmp1;						\
 									\
--- diff/include/asm-mips/thread_info.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-mips/thread_info.h	2004-07-01 21:32:50.000000000 +0100
@@ -68,6 +68,9 @@
 #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_MIPS64)
 #define THREAD_SIZE_ORDER (2)
 #endif
+#ifdef CONFIG_PAGE_SIZE_8KB
+#define THREAD_SIZE_ORDER (1)
+#endif
 #ifdef CONFIG_PAGE_SIZE_16KB
 #define THREAD_SIZE_ORDER (0)
 #endif
--- diff/include/asm-mips/titan_dep.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/titan_dep.h	2004-07-01 21:32:50.000000000 +0100
@@ -16,9 +16,6 @@
 #include <asm/addrspace.h>              /* for KSEG1ADDR() */
 #include <asm/byteorder.h>              /* for cpu_to_le32() */
 
-/* Turn on serial */
-#define	CONFIG_TITAN_SERIAL
-
 /* PCI */
 #define	TITAN_PCI_BASE			0xbb000000
 
@@ -50,8 +47,181 @@
  */
 #define RM9000x2_HTLINK_REG     0xbb000644
 #define RM9000x2_BASE_ADDR      0xbb000000
-#define RM9000x2_OCD_HTCFGA     0x06f8
-#define RM9000x2_OCD_HTCFGD     0x06fc
+
+#define OCD_BASE                0xfb000000UL
+#define OCD_SIZE                0x3000UL
+
+extern unsigned long ocd_base;
+
+/*
+ * OCD Registers
+ */
+#define RM9000x2_OCD_LKB5		0x0128		/* Ethernet */
+#define RM9000x2_OCD_LKM5		0x012c
+
+#define RM9000x2_OCD_LKB7		0x0138		/* HT Region 0 */
+#define RM9000x2_OCD_LKM7		0x013c
+#define RM9000x2_OCD_LKB8		0x0140		/* HT Region 1 */
+#define RM9000x2_OCD_LKM8		0x0144
+
+#define RM9000x2_OCD_LKB9		0x0148		/* Local Bus */
+#define RM9000x2_OCD_LKM9		0x014c
+#define RM9000x2_OCD_LKB10		0x0150
+#define RM9000x2_OCD_LKM10		0x0154
+#define RM9000x2_OCD_LKB11		0x0158
+#define RM9000x2_OCD_LKM11		0x015c
+#define RM9000x2_OCD_LKB12		0x0160
+#define RM9000x2_OCD_LKM12		0x0164
+
+#define RM9000x2_OCD_LKB13		0x0168		/* Scratch RAM */
+#define RM9000x2_OCD_LKM13		0x016c
+
+#define RM9000x2_OCD_LPD0		0x0200		/* Local Bus */
+#define RM9000x2_OCD_LPD1		0x0210
+#define RM9000x2_OCD_LPD2		0x0220
+#define RM9000x2_OCD_LPD3		0x0230
+
+#define RM9000x2_OCD_HTDVID		0x0600	/* HT Device Header */
+#define RM9000x2_OCD_HTSC		0x0604
+#define RM9000x2_OCD_HTCCR		0x0608
+#define RM9000x2_OCD_HTBHL		0x060c
+#define RM9000x2_OCD_HTBAR0		0x0610
+#define RM9000x2_OCD_HTBAR1		0x0614
+#define RM9000x2_OCD_HTBAR2		0x0618
+#define RM9000x2_OCD_HTBAR3		0x061c
+#define RM9000x2_OCD_HTBAR4		0x0620
+#define RM9000x2_OCD_HTBAR5		0x0624
+#define RM9000x2_OCD_HTCBCPT		0x0628
+#define RM9000x2_OCD_HTSDVID		0x062c
+#define RM9000x2_OCD_HTXRA		0x0630
+#define RM9000x2_OCD_HTCAP1		0x0634
+#define RM9000x2_OCD_HTIL		0x063c
+
+#define RM9000x2_OCD_HTLCC		0x0640	/* HT Capability Block */
+#define RM9000x2_OCD_HTLINK		0x0644
+#define RM9000x2_OCD_HTFQREV		0x0648
+
+#define RM9000x2_OCD_HTERCTL		0x0668	/* HT Controller */
+#define RM9000x2_OCD_HTRXDB		0x066c
+#define RM9000x2_OCD_HTIMPED		0x0670
+#define RM9000x2_OCD_HTSWIMP		0x0674
+#define RM9000x2_OCD_HTCAL		0x0678
+
+#define RM9000x2_OCD_HTBAA30		0x0680
+#define RM9000x2_OCD_HTBAA54		0x0684
+#define RM9000x2_OCD_HTMASK0		0x0688
+#define RM9000x2_OCD_HTMASK1		0x068c
+#define RM9000x2_OCD_HTMASK2		0x0690
+#define RM9000x2_OCD_HTMASK3		0x0694
+#define RM9000x2_OCD_HTMASK4		0x0698
+#define RM9000x2_OCD_HTMASK5		0x069c
+
+#define RM9000x2_OCD_HTIFCTL		0x06a0
+#define RM9000x2_OCD_HTPLL		0x06a4
+
+#define RM9000x2_OCD_HTSRI		0x06b0
+#define RM9000x2_OCD_HTRXNUM		0x06b4
+#define RM9000x2_OCD_HTTXNUM		0x06b8
+
+#define RM9000x2_OCD_HTTXCNT		0x06c8
+
+#define RM9000x2_OCD_HTERROR		0x06d8
+#define RM9000x2_OCD_HTRCRCE		0x06dc
+#define RM9000x2_OCD_HTEOI		0x06e0
+
+#define RM9000x2_OCD_CRCR		0x06f0
+
+#define RM9000x2_OCD_HTCFGA		0x06f8
+#define RM9000x2_OCD_HTCFGD		0x06fc
+
+#define RM9000x2_OCD_INTMSG		0x0a00
+
+#define RM9000x2_OCD_INTPIN0		0x0a40
+#define RM9000x2_OCD_INTPIN1		0x0a44
+#define RM9000x2_OCD_INTPIN2		0x0a48
+#define RM9000x2_OCD_INTPIN3		0x0a4c
+#define RM9000x2_OCD_INTPIN4		0x0a50
+#define RM9000x2_OCD_INTPIN5		0x0a54
+#define RM9000x2_OCD_INTPIN6		0x0a58
+#define RM9000x2_OCD_INTPIN7		0x0a5c
+#define RM9000x2_OCD_SEM		0x0a60
+#define RM9000x2_OCD_SEMSET		0x0a64
+#define RM9000x2_OCD_SEMCLR		0x0a68
+
+#define RM9000x2_OCD_TKT		0x0a70
+#define RM9000x2_OCD_TKTINC		0x0a74
+
+#define RM9000x2_OCD_NMICONFIG		0x0ac0		/* Interrupts */
+#define RM9000x2_OCD_INTP0PRI		0x1a80
+#define RM9000x2_OCD_INTP1PRI		0x1a80
+#define RM9000x2_OCD_INTP0STATUS0	0x1b00
+#define RM9000x2_OCD_INTP0MASK0		0x1b04
+#define RM9000x2_OCD_INTP0SET0		0x1b08
+#define RM9000x2_OCD_INTP0CLEAR0	0x1b0c
+#define RM9000x2_OCD_INTP0STATUS1	0x1b10
+#define RM9000x2_OCD_INTP0MASK1		0x1b14
+#define RM9000x2_OCD_INTP0SET1		0x1b18
+#define RM9000x2_OCD_INTP0CLEAR1	0x1b1c
+#define RM9000x2_OCD_INTP0STATUS2	0x1b20
+#define RM9000x2_OCD_INTP0MASK2		0x1b24
+#define RM9000x2_OCD_INTP0SET2		0x1b28
+#define RM9000x2_OCD_INTP0CLEAR2	0x1b2c
+#define RM9000x2_OCD_INTP0STATUS3	0x1b30
+#define RM9000x2_OCD_INTP0MASK3		0x1b34
+#define RM9000x2_OCD_INTP0SET3		0x1b38
+#define RM9000x2_OCD_INTP0CLEAR3	0x1b3c
+#define RM9000x2_OCD_INTP0STATUS4	0x1b40
+#define RM9000x2_OCD_INTP0MASK4		0x1b44
+#define RM9000x2_OCD_INTP0SET4		0x1b48
+#define RM9000x2_OCD_INTP0CLEAR4	0x1b4c
+#define RM9000x2_OCD_INTP0STATUS5	0x1b50
+#define RM9000x2_OCD_INTP0MASK5		0x1b54
+#define RM9000x2_OCD_INTP0SET5		0x1b58
+#define RM9000x2_OCD_INTP0CLEAR5	0x1b5c
+#define RM9000x2_OCD_INTP0STATUS6	0x1b60
+#define RM9000x2_OCD_INTP0MASK6		0x1b64
+#define RM9000x2_OCD_INTP0SET6		0x1b68
+#define RM9000x2_OCD_INTP0CLEAR6	0x1b6c
+#define RM9000x2_OCD_INTP0STATUS7	0x1b70
+#define RM9000x2_OCD_INTP0MASK7		0x1b74
+#define RM9000x2_OCD_INTP0SET7		0x1b78
+#define RM9000x2_OCD_INTP0CLEAR7	0x1b7c
+#define RM9000x2_OCD_INTP1STATUS0	0x2b00
+#define RM9000x2_OCD_INTP1MASK0		0x2b04
+#define RM9000x2_OCD_INTP1SET0		0x2b08
+#define RM9000x2_OCD_INTP1CLEAR0	0x2b0c
+#define RM9000x2_OCD_INTP1STATUS1	0x2b10
+#define RM9000x2_OCD_INTP1MASK1		0x2b14
+#define RM9000x2_OCD_INTP1SET1		0x2b18
+#define RM9000x2_OCD_INTP1CLEAR1	0x2b1c
+#define RM9000x2_OCD_INTP1STATUS2	0x2b20
+#define RM9000x2_OCD_INTP1MASK2		0x2b24
+#define RM9000x2_OCD_INTP1SET2		0x2b28
+#define RM9000x2_OCD_INTP1CLEAR2	0x2b2c
+#define RM9000x2_OCD_INTP1STATUS3	0x2b30
+#define RM9000x2_OCD_INTP1MASK3		0x2b34
+#define RM9000x2_OCD_INTP1SET3		0x2b38
+#define RM9000x2_OCD_INTP1CLEAR3	0x2b3c
+#define RM9000x2_OCD_INTP1STATUS4	0x2b40
+#define RM9000x2_OCD_INTP1MASK4		0x2b44
+#define RM9000x2_OCD_INTP1SET4		0x2b48
+#define RM9000x2_OCD_INTP1CLEAR4	0x2b4c
+#define RM9000x2_OCD_INTP1STATUS5	0x2b50
+#define RM9000x2_OCD_INTP1MASK5		0x2b54
+#define RM9000x2_OCD_INTP1SET5		0x2b58
+#define RM9000x2_OCD_INTP1CLEAR5	0x2b5c
+#define RM9000x2_OCD_INTP1STATUS6	0x2b60
+#define RM9000x2_OCD_INTP1MASK6		0x2b64
+#define RM9000x2_OCD_INTP1SET6		0x2b68
+#define RM9000x2_OCD_INTP1CLEAR6	0x2b6c
+#define RM9000x2_OCD_INTP1STATUS7	0x2b70
+#define RM9000x2_OCD_INTP1MASK7		0x2b74
+#define RM9000x2_OCD_INTP1SET7		0x2b78
+#define RM9000x2_OCD_INTP1CLEAR7	0x2b7c
+
+#define OCD_READ(reg)		(*(volatile unsigned int *)(ocd_base + (reg)))
+#define OCD_WRITE(reg, val)					\
+	do { *(volatile unsigned int *)(ocd_base + (reg)) = (val); } while (0)
 
 /*
  * Hypertransport specific macros
@@ -65,4 +235,3 @@
 #define RM9K_READ_16(ofs, val)  *(val) = *(volatile u16 *)(RM9000x2_BASE_ADDR+ofs)
 
 #endif 
-
--- diff/include/asm-mips/unistd.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-mips/unistd.h	2004-07-01 21:32:50.000000000 +0100
@@ -297,16 +297,17 @@
 #define __NR_mq_timedreceive		(__NR_Linux + 274)
 #define __NR_mq_notify			(__NR_Linux + 275)
 #define __NR_mq_getsetattr		(__NR_Linux + 276)
+#define __NR_vserver			(__NR_Linux + 277)
 
 /*
  * Offset of the last Linux o32 flavoured syscall
  */
-#define __NR_Linux_syscalls		276
+#define __NR_Linux_syscalls		277
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
 
 #define __NR_O32_Linux			4000
-#define __NR_O32_Linux_syscalls		276
+#define __NR_O32_Linux_syscalls		277
 
 #if _MIPS_SIM == _MIPS_SIM_ABI64
 
@@ -550,16 +551,17 @@
 #define __NR_mq_timedreceive		(__NR_Linux + 233)
 #define __NR_mq_notify			(__NR_Linux + 234)
 #define __NR_mq_getsetattr		(__NR_Linux + 235)
+#define __NR_vserver			(__NR_Linux + 236)
 
 /*
  * Offset of the last Linux flavoured syscall
  */
-#define __NR_Linux_syscalls		235
+#define __NR_Linux_syscalls		236
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
 
 #define __NR_64_Linux			5000
-#define __NR_64_Linux_syscalls		235
+#define __NR_64_Linux_syscalls		236
 
 #if _MIPS_SIM == _MIPS_SIM_NABI32
 
@@ -807,16 +809,17 @@
 #define __NR_mq_timedreceive		(__NR_Linux + 237)
 #define __NR_mq_notify			(__NR_Linux + 238)
 #define __NR_mq_getsetattr		(__NR_Linux + 239)
+#define __NR_vserver			(__NR_Linux + 240)
 
 /*
  * Offset of the last N32 flavoured syscall
  */
-#define __NR_Linux_syscalls		239
+#define __NR_Linux_syscalls		240
 
 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
 
 #define __NR_N32_Linux			6000
-#define __NR_N32_Linux_syscalls		239
+#define __NR_N32_Linux_syscalls		240
 
 #ifndef __ASSEMBLY__
 
--- diff/include/asm-mips/vr41xx/capcella.h	2004-05-19 22:12:48.000000000 +0100
+++ source/include/asm-mips/vr41xx/capcella.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,54 +1,28 @@
 /*
- * FILE NAME
- *	include/asm-mips/vr41xx/capcella.h
+ *  capcella.h, Include file for ZAO Networks Capcella.
  *
- * BRIEF MODULE DESCRIPTION
- *	Include file for ZAO Networks Capcella.
+ *  Copyright (C) 2002-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
- * Copyright 2002,2003 Yoichi Yuasa
- *                yuasa@hh.iij4u.or.jp
+ *  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 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
  */
 #ifndef __ZAO_CAPCELLA_H
 #define __ZAO_CAPCELLA_H
 
-#include <asm/addrspace.h>
 #include <asm/vr41xx/vr41xx.h>
 
 /*
- * Board specific address mapping
- */
-#define VR41XX_PCI_MEM1_BASE		0x10000000
-#define VR41XX_PCI_MEM1_SIZE		0x04000000
-#define VR41XX_PCI_MEM1_MASK		0x7c000000
-
-#define VR41XX_PCI_MEM2_BASE		0x14000000
-#define VR41XX_PCI_MEM2_SIZE		0x02000000
-#define VR41XX_PCI_MEM2_MASK		0x7e000000
-
-#define VR41XX_PCI_IO_BASE		0x16000000
-#define VR41XX_PCI_IO_SIZE		0x02000000
-#define VR41XX_PCI_IO_MASK		0x7e000000
-
-#define VR41XX_PCI_IO_START		0x01000000
-#define VR41XX_PCI_IO_END		0x01ffffff
-
-#define VR41XX_PCI_MEM_START		0x12000000
-#define VR41XX_PCI_MEM_END		0x15ffffff
-
-#define IO_PORT_BASE			KSEG1ADDR(VR41XX_PCI_IO_BASE)
-#define IO_PORT_RESOURCE_START		0
-#define IO_PORT_RESOURCE_END		VR41XX_PCI_IO_SIZE
-#define IO_MEM1_RESOURCE_START		VR41XX_PCI_MEM1_BASE
-#define IO_MEM1_RESOURCE_END		(VR41XX_PCI_MEM1_BASE + VR41XX_PCI_MEM1_SIZE)
-#define IO_MEM2_RESOURCE_START		VR41XX_PCI_MEM2_BASE
-#define IO_MEM2_RESOURCE_END		(VR41XX_PCI_MEM2_BASE + VR41XX_PCI_MEM2_SIZE)
-
-/*
  * General-Purpose I/O Pin Number
  */
 #define PC104PLUS_INTA_PIN		2
--- diff/include/asm-mips/vr41xx/mpc30x.h	2004-05-19 22:12:48.000000000 +0100
+++ source/include/asm-mips/vr41xx/mpc30x.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,54 +1,28 @@
 /*
- * FILE NAME
- *	include/asm-mips/vr41xx/mpc30x.h
+ *  mpc30x.h, Include file for Victor MP-C303/304.
  *
- * BRIEF MODULE DESCRIPTION
- *	Include file for Victor MP-C303/304.
+ *  Copyright (C) 2002-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
- * Copyright 2002,2003 Yoichi Yuasa
- *                yuasa@hh.iij4u.or.jp
+ *  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 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
  */
 #ifndef __VICTOR_MPC30X_H
 #define __VICTOR_MPC30X_H
 
-#include <asm/addrspace.h>
 #include <asm/vr41xx/vr41xx.h>
 
 /*
- * Board specific address mapping
- */
-#define VR41XX_PCI_MEM1_BASE		0x10000000
-#define VR41XX_PCI_MEM1_SIZE		0x04000000
-#define VR41XX_PCI_MEM1_MASK		0x7c000000
-
-#define VR41XX_PCI_MEM2_BASE		0x14000000
-#define VR41XX_PCI_MEM2_SIZE		0x02000000
-#define VR41XX_PCI_MEM2_MASK		0x7e000000
-
-#define VR41XX_PCI_IO_BASE		0x16000000
-#define VR41XX_PCI_IO_SIZE		0x02000000
-#define VR41XX_PCI_IO_MASK		0x7e000000
-
-#define VR41XX_PCI_IO_START		0x01000000
-#define VR41XX_PCI_IO_END		0x01ffffff
-
-#define VR41XX_PCI_MEM_START		0x12000000
-#define VR41XX_PCI_MEM_END		0x15ffffff
-
-#define IO_PORT_BASE			KSEG1ADDR(VR41XX_PCI_IO_BASE)
-#define IO_PORT_RESOURCE_START		0
-#define IO_PORT_RESOURCE_END		VR41XX_PCI_IO_SIZE
-#define IO_MEM1_RESOURCE_START		VR41XX_PCI_MEM1_BASE
-#define IO_MEM1_RESOURCE_END		(VR41XX_PCI_MEM1_BASE + VR41XX_PCI_MEM1_SIZE)
-#define IO_MEM2_RESOURCE_START		VR41XX_PCI_MEM2_BASE
-#define IO_MEM2_RESOURCE_END		(VR41XX_PCI_MEM2_BASE + VR41XX_PCI_MEM2_SIZE)
-
-/*
  * General-Purpose I/O Pin Number
  */
 #define VRC4173_PIN			1
--- diff/include/asm-mips/vr41xx/tb0226.h	2004-05-19 22:12:48.000000000 +0100
+++ source/include/asm-mips/vr41xx/tb0226.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,54 +1,28 @@
 /*
- * FILE NAME
- *	include/asm-mips/vr41xx/tb0226.h
+ *  tb0226.h, Include file for TANBAC TB0226.
  *
- * BRIEF MODULE DESCRIPTION
- *	Include file for TANBAC TB0226.
+ *  Copyright (C) 2002-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
- * Copyright 2002,2003 Yoichi Yuasa
- *                yuasa@hh.iij4u.or.jp
+ *  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 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
  */
 #ifndef __TANBAC_TB0226_H
 #define __TANBAC_TB0226_H
 
-#include <asm/addrspace.h>
 #include <asm/vr41xx/vr41xx.h>
 
 /*
- * Board specific address mapping
- */
-#define VR41XX_PCI_MEM1_BASE		0x10000000
-#define VR41XX_PCI_MEM1_SIZE		0x04000000
-#define VR41XX_PCI_MEM1_MASK		0x7c000000
-
-#define VR41XX_PCI_MEM2_BASE		0x14000000
-#define VR41XX_PCI_MEM2_SIZE		0x02000000
-#define VR41XX_PCI_MEM2_MASK		0x7e000000
-
-#define VR41XX_PCI_IO_BASE		0x16000000
-#define VR41XX_PCI_IO_SIZE		0x02000000
-#define VR41XX_PCI_IO_MASK		0x7e000000
-
-#define VR41XX_PCI_IO_START		0x01000000
-#define VR41XX_PCI_IO_END		0x01ffffff
-
-#define VR41XX_PCI_MEM_START		0x12000000
-#define VR41XX_PCI_MEM_END		0x15ffffff
-
-#define IO_PORT_BASE			KSEG1ADDR(VR41XX_PCI_IO_BASE)
-#define IO_PORT_RESOURCE_START		0
-#define IO_PORT_RESOURCE_END		VR41XX_PCI_IO_SIZE
-#define IO_MEM1_RESOURCE_START		VR41XX_PCI_MEM1_BASE
-#define IO_MEM1_RESOURCE_END		(VR41XX_PCI_MEM1_BASE + VR41XX_PCI_MEM1_SIZE)
-#define IO_MEM2_RESOURCE_START		VR41XX_PCI_MEM2_BASE
-#define IO_MEM2_RESOURCE_END		(VR41XX_PCI_MEM2_BASE + VR41XX_PCI_MEM2_SIZE)
-
-/*
  * General-Purpose I/O Pin Number
  */
 #define GD82559_1_PIN			2
--- diff/include/asm-mips/vr41xx/vr41xx.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-mips/vr41xx/vr41xx.h	2004-07-01 21:32:50.000000000 +0100
@@ -43,12 +43,6 @@
 #define PRID_VR4133		0x00000c84
 
 /*
- * Memory resource
- */
-#define IO_MEM_RESOURCE_START	0UL
-#define IO_MEM_RESOURCE_END	0x1fffffffUL
-
-/*
  * Bus Control Uint
  */
 extern unsigned long vr41xx_get_vtclock_frequency(void);
@@ -136,8 +130,71 @@
 extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign);
 extern int vr41xx_cascade_irq(unsigned int irq, int (*get_irq_number)(int irq));
 
-extern void vr41xx_enable_dsiuint(void);
-extern void vr41xx_disable_dsiuint(void);
+#define PIUINT_COMMAND		0x0040
+#define PIUINT_DATA		0x0020
+#define PIUINT_PAGE1		0x0010
+#define PIUINT_PAGE0		0x0008
+#define PIUINT_DATALOST		0x0004
+#define PIUINT_STATUSCHANGE	0x0001
+
+extern void vr41xx_enable_piuint(uint16_t mask);
+extern void vr41xx_disable_piuint(uint16_t mask);
+
+#define AIUINT_INPUT_DMAEND	0x0800
+#define AIUINT_INPUT_DMAHALT	0x0400
+#define AIUINT_INPUT_DATALOST	0x0200
+#define AIUINT_INPUT_DATA	0x0100
+#define AIUINT_OUTPUT_DMAEND	0x0008
+#define AIUINT_OUTPUT_DMAHALT	0x0004
+#define AIUINT_OUTPUT_NODATA	0x0002
+
+extern void vr41xx_enable_aiuint(uint16_t mask);
+extern void vr41xx_disable_aiuint(uint16_t mask);
+
+#define KIUINT_DATALOST		0x0004
+#define KIUINT_DATAREADY	0x0002
+#define KIUINT_SCAN		0x0001
+
+extern void vr41xx_enable_kiuint(uint16_t mask);
+extern void vr41xx_disable_kiuint(uint16_t mask);
+
+#define DSIUINT_CTS		0x0800
+#define DSIUINT_RXERR		0x0400
+#define DSIUINT_RX		0x0200
+#define DSIUINT_TX		0x0100
+#define DSIUINT_ALL		0x0f00
+
+extern void vr41xx_enable_dsiuint(uint16_t mask);
+extern void vr41xx_disable_dsiuint(uint16_t mask);
+
+#define FIRINT_UNIT		0x0010
+#define FIRINT_RX_DMAEND	0x0008
+#define FIRINT_RX_DMAHALT	0x0004
+#define FIRINT_TX_DMAEND	0x0002
+#define FIRINT_TX_DMAHALT	0x0001
+
+extern void vr41xx_enable_firint(uint16_t mask);
+extern void vr41xx_disable_firint(uint16_t mask);
+
+extern void vr41xx_enable_pciint(void);
+extern void vr41xx_disable_pciint(void);
+
+extern void vr41xx_enable_scuint(void);
+extern void vr41xx_disable_scuint(void);
+
+#define CSIINT_TX_DMAEND	0x0040
+#define CSIINT_TX_DMAHALT	0x0020
+#define CSIINT_TX_DATA		0x0010
+#define CSIINT_TX_FIFOEMPTY	0x0008
+#define CSIINT_RX_DMAEND	0x0004
+#define CSIINT_RX_DMAHALT	0x0002
+#define CSIINT_RX_FIFOEMPTY	0x0001
+
+extern void vr41xx_enable_csiint(uint16_t mask);
+extern void vr41xx_disable_csiint(uint16_t mask);
+
+extern void vr41xx_enable_bcuint(void);
+extern void vr41xx_disable_bcuint(void);
 
 /*
  * Power Management Unit
@@ -220,18 +277,71 @@
 /*
  * PCI Control Unit
  */
-struct vr41xx_pci_address_space {
-	u32 internal_base;
-	u32 address_mask;
-	u32 pci_base;
+#define PCI_MASTER_ADDRESS_MASK	0x7fffffffU
+
+struct pci_master_address_conversion {
+	uint32_t bus_base_address;
+	uint32_t address_mask;
+	uint32_t pci_base_address;
+};
+
+struct pci_target_address_conversion {
+	uint32_t address_mask;
+	uint32_t bus_base_address;
+};
+
+typedef enum {
+	CANNOT_LOCK_FROM_DEVICE,
+	CAN_LOCK_FROM_DEVICE,
+} pci_exclusive_access_t;
+
+struct pci_mailbox_address {
+	uint32_t base_address;
+};
+
+struct pci_target_address_window {
+	uint32_t base_address;
 };
 
-struct vr41xx_pci_address_map {
-	struct vr41xx_pci_address_space *mem1;
-	struct vr41xx_pci_address_space *mem2;
-	struct vr41xx_pci_address_space *io;
+typedef enum {
+	PCI_ARBITRATION_MODE_FAIR,
+	PCI_ARBITRATION_MODE_ALTERNATE_0,
+	PCI_ARBITRATION_MODE_ALTERNATE_B,
+} pci_arbiter_priority_control_t;
+
+typedef enum {
+	PCI_TAKE_AWAY_GNT_DISABLE,
+	PCI_TAKE_AWAY_GNT_ENABLE,
+} pci_take_away_gnt_mode_t;
+
+struct pci_controller_unit_setup {
+	struct pci_master_address_conversion *master_memory1;
+	struct pci_master_address_conversion *master_memory2;
+
+	struct pci_target_address_conversion *target_memory1;
+	struct pci_target_address_conversion *target_memory2;
+
+	struct pci_master_address_conversion *master_io;
+
+	pci_exclusive_access_t exclusive_access;
+
+	uint32_t pci_clock_max;
+	uint8_t wait_time_limit_from_irdy_to_trdy;	/* Only VR4122 is supported */
+
+	struct pci_mailbox_address *mailbox;
+	struct pci_target_address_window *target_window1;
+	struct pci_target_address_window *target_window2;
+
+	uint8_t master_latency_timer;
+	uint8_t retry_limit;
+
+	pci_arbiter_priority_control_t arbiter_priority_control;
+	pci_take_away_gnt_mode_t take_away_gnt_mode;
+
+	struct resource *mem_resource;
+	struct resource *io_resource;
 };
 
-extern void vr41xx_pciu_init(struct vr41xx_pci_address_map *map);
+extern void vr41xx_pciu_setup(struct pci_controller_unit_setup *setup);
 
 #endif /* __NEC_VR41XX_H */
--- diff/include/asm-mips/vr41xx/vrc4173.h	2004-05-19 22:12:48.000000000 +0100
+++ source/include/asm-mips/vr41xx/vrc4173.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,19 +1,24 @@
 /*
- * FILE NAME
- *	include/asm-mips/vr41xx/vrc4173.h
+ *  vrc4173.h, Include file for NEC VRC4173.
  *
- * BRIEF MODULE DESCRIPTION
- *	Include file for NEC VRC4173.
+ *  Copyright (C) 2000  Michael R. McDonald
+ *  Copyright (C) 2001-2003 Montavista Software Inc.
+ *    Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com>
+ *  Copyright (C) 2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
  *
- * Copyright (C) 2000 by Michael R. McDonald
+ *  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.
  *
- * Copyright 2001-2003 Montavista Software Inc.
- * Author: Yoichi Yuasa
- *         yyuasa@mvista.com or source@mvista.com
+ *  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
  */
 #ifndef __NEC_VRC4173_H 
 #define __NEC_VRC4173_H 
@@ -72,35 +77,38 @@
 /*
  * Clock Mask Unit
  */
-#define VRC4173_PIU_CLOCK		0x0001
-#define VRC4173_KIU_CLOCK		0x0002
-#define VRC4173_AIU_CLOCK		0x0004
-#define VRC4173_PS2CH1_CLOCK		0x0008
-#define VRC4173_PS2CH2_CLOCK		0x0010
-#define VRC4173_USBU_PCI_CLOCK		0x0020
-#define VRC4173_CARDU1_PCI_CLOCK	0x0040
-#define VRC4173_CARDU2_PCI_CLOCK	0x0080
-#define VRC4173_AC97U_PCI_CLOCK		0x0100
-#define VRC4173_USBU_48MHz_CLOCK	0x0400
-#define VRC4173_EXT_48MHz_CLOCK		0x0800
-#define VRC4173_48MHz_CLOCK		0x1000
+typedef enum vrc4173_clock {
+	VRC4173_PIU_CLOCK,
+	VRC4173_KIU_CLOCK,
+	VRC4173_AIU_CLOCK,
+	VRC4173_PS2_CH1_CLOCK,
+	VRC4173_PS2_CH2_CLOCK,
+	VRC4173_USBU_PCI_CLOCK,
+	VRC4173_CARDU1_PCI_CLOCK,
+	VRC4173_CARDU2_PCI_CLOCK,
+	VRC4173_AC97U_PCI_CLOCK,
+	VRC4173_USBU_48MHz_CLOCK,
+	VRC4173_EXT_48MHz_CLOCK,
+	VRC4173_48MHz_CLOCK,
+} vrc4173_clock_t;
 
-extern void vrc4173_clock_supply(u16 mask);
-extern void vrc4173_clock_mask(u16 mask);
+extern void vrc4173_supply_clock(vrc4173_clock_t clock);
+extern void vrc4173_mask_clock(vrc4173_clock_t clock);
 
 /*
  * General-Purpose I/O Unit
  */
-enum {
-	PS2CH1_SELECT,
-	PS2CH2_SELECT,
-	TOUCHPANEL_SELECT,
-	KIU8_SELECT,
-	KIU10_SELECT,
-	KIU12_SELECT,
-	GPIO_SELECT
-};
+typedef enum vrc4173_function {
+	PS2_CHANNEL1,
+	PS2_CHANNEL2,
+	TOUCHPANEL,
+	KEYBOARD_8SCANLINES,
+	KEYBOARD_10SCANLINES,
+	KEYBOARD_12SCANLINES,
+	GPIO_0_15PINS,
+	GPIO_16_20PINS,
+} vrc4173_function_t;
 
-extern void vrc4173_select_function(int func);
+extern void vrc4173_select_function(vrc4173_function_t function);
 
 #endif /* __NEC_VRC4173_H */
--- diff/include/asm-parisc/cacheflush.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-parisc/cacheflush.h	2004-07-01 21:32:50.000000000 +0100
@@ -79,9 +79,9 @@
 }
 
 #define flush_dcache_mmap_lock(mapping) \
-	spin_lock_irq(&(mapping)->tree_lock)
+	write_lock_irq(&(mapping)->tree_lock)
 #define flush_dcache_mmap_unlock(mapping) \
-	spin_unlock_irq(&(mapping)->tree_lock)
+	write_unlock_irq(&(mapping)->tree_lock)
 
 #define flush_icache_page(vma,page)	do { flush_kernel_dcache_page(page_address(page)); flush_kernel_icache_page(page_address(page)); } while (0)
 
--- diff/include/asm-parisc/checksum.h	2004-05-19 22:12:48.000000000 +0100
+++ source/include/asm-parisc/checksum.h	2004-07-01 21:32:50.000000000 +0100
@@ -191,8 +191,10 @@
  *	Copy and checksum to user
  */
 #define HAVE_CSUM_COPY_USER
-static __inline__ unsigned int csum_and_copy_to_user (const char *src, char *dst,
-				    int len, int sum, int *err_ptr)
+static __inline__ unsigned int csum_and_copy_to_user (const char *src, 
+						      char __user *dst,
+						      int len, int sum, 
+						      int *err_ptr)
 {
 	/* code stolen from include/asm-mips64 */
 	sum = csum_partial(src, len, sum);
--- diff/include/asm-parisc/fcntl.h	2004-05-19 22:12:48.000000000 +0100
+++ source/include/asm-parisc/fcntl.h	2004-07-01 21:32:50.000000000 +0100
@@ -19,6 +19,7 @@
 #define O_NOCTTY	00400000 /* not fcntl */
 #define O_DSYNC		01000000 /* HPUX only */
 #define O_RSYNC		02000000 /* HPUX only */
+#define O_NOATIME	04000000
 
 #define FASYNC		00020000 /* fcntl, for BSD compatibility */
 #define O_DIRECT	00040000 /* direct disk access hint - currently ignored */
--- diff/include/asm-parisc/pgtable.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-parisc/pgtable.h	2004-07-01 21:32:50.000000000 +0100
@@ -417,6 +417,8 @@
 static inline int ptep_test_and_clear_young(pte_t *ptep)
 {
 #ifdef CONFIG_SMP
+	if (!pte_young(*ptep))
+		return 0;
 	return test_and_clear_bit(xlate_pabit(_PAGE_ACCESSED_BIT), ptep);
 #else
 	pte_t pte = *ptep;
@@ -430,6 +432,8 @@
 static inline int ptep_test_and_clear_dirty(pte_t *ptep)
 {
 #ifdef CONFIG_SMP
+	if (!pte_dirty(*ptep))
+		return 0;
 	return test_and_clear_bit(xlate_pabit(_PAGE_DIRTY_BIT), ptep);
 #else
 	pte_t pte = *ptep;
--- diff/include/asm-parisc/resource.h	2004-05-19 22:12:49.000000000 +0100
+++ source/include/asm-parisc/resource.h	2004-07-01 21:32:50.000000000 +0100
@@ -16,8 +16,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -40,6 +42,8 @@
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-parisc/setup.h	2004-05-19 22:12:49.000000000 +0100
+++ source/include/asm-parisc/setup.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,10 +1,6 @@
-/*
- *	Just a place holder. We don't want to have to test x86 before
- *	we include stuff
- */
+#ifndef _PARISC_SETUP_H
+#define _PARISC_SETUP_H
 
-#ifndef _i386_SETUP_H
-#define _i386_SETUP_H
+#define COMMAND_LINE_SIZE	1024
 
-
-#endif /* _i386_SETUP_H */
+#endif /* _PARISC_SETUP_H */
--- diff/include/asm-ppc/commproc.h	2004-05-19 22:12:49.000000000 +0100
+++ source/include/asm-ppc/commproc.h	2004-07-01 21:32:50.000000000 +0100
@@ -66,7 +66,12 @@
  * and dual port ram.
  */
 extern	cpm8xx_t	*cpmp;		/* Pointer to comm processor */
-uint		m8xx_cpm_dpalloc(uint size);
+extern void *m8xx_cpm_dpalloc(int size);
+extern int m8xx_cpm_dpfree(void *addr);
+extern void *m8xx_cpm_dpalloc_fixed(void *addr, int size);
+extern void m8xx_cpm_dpdump(void);
+extern int m8xx_cpm_dpram_offset(void *addr);
+extern void *m8xx_cpm_dpram_addr(int offset);
 uint		m8xx_cpm_hostalloc(uint size);
 void		m8xx_cpm_setbrg(uint brg, uint rate);
 
--- diff/include/asm-ppc/elf.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/elf.h	2004-07-01 21:32:50.000000000 +0100
@@ -52,6 +52,7 @@
 #define ELF_NGREG	48	/* includes nip, msr, lr, etc. */
 #define ELF_NFPREG	33	/* includes fpscr */
 #define ELF_NVRREG	33	/* includes vscr */
+#define ELF_NEVRREG	34	/* includes acc (as 2) */
 
 /*
  * These are used to set parameters in the core dumps.
--- diff/include/asm-ppc/fcntl.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/fcntl.h	2004-07-01 21:32:50.000000000 +0100
@@ -20,6 +20,7 @@
 #define O_NOFOLLOW      0100000	/* don't follow links */
 #define O_LARGEFILE     0200000
 #define O_DIRECT	0400000	/* direct disk access hint */
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-ppc/io.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/io.h	2004-07-01 21:32:50.000000000 +0100
@@ -30,6 +30,8 @@
 #include <asm/mpc8xx.h>
 #elif defined(CONFIG_8260)
 #include <asm/mpc8260.h>
+#elif defined(CONFIG_85xx)
+#include <asm/mpc85xx.h>
 #elif defined(CONFIG_APUS)
 #define _IO_BASE	0
 #define _ISA_MEM_BASE	0
@@ -138,18 +140,27 @@
 		: : "r" (val), "r" (port + _IO_BASE));	\
 }
 
-__do_in_asm(inb, "lbzx")
 __do_out_asm(outb, "stbx")
 #ifdef CONFIG_APUS
+__do_in_asm(inb, "lbzx")
 __do_in_asm(inw, "lhz%U1%X1")
 __do_in_asm(inl, "lwz%U1%X1")
 __do_out_asm(outl,"stw%U0%X0")
 __do_out_asm(outw, "sth%U0%X0")
+#elif defined (CONFIG_8260_PCI9)
+/* in asm cannot be defined if PCI9 workaround is used */
+#define inb(port)		in_8((u8 *)((port)+_IO_BASE))
+#define inw(port)		in_le16((u16 *)((port)+_IO_BASE))
+#define inl(port)		in_le32((u32 *)((port)+_IO_BASE))
+__do_out_asm(outw, "sthbrx")
+__do_out_asm(outl, "stwbrx")
 #else
+__do_in_asm(inb, "lbzx")
 __do_in_asm(inw, "lhbrx")
 __do_in_asm(inl, "lwbrx")
 __do_out_asm(outw, "sthbrx")
 __do_out_asm(outl, "stwbrx")
+
 #endif
 
 #define inb_p(port)		inb((port))
@@ -389,4 +400,9 @@
 }
 
 #endif /* _PPC_IO_H */
+
+#ifdef CONFIG_8260_PCI9
+#include <asm/mpc8260_pci9.h>
+#endif
+
 #endif /* __KERNEL__ */
--- diff/include/asm-ppc/irq.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/irq.h	2004-07-01 21:32:50.000000000 +0100
@@ -177,17 +177,55 @@
  */
 #define NR_SIU_INTS	64
 
-/* There are many more than these, we will add them as we need them.
-*/
+#define	SIU_INT_ERROR		((uint)0x00)
+#define	SIU_INT_I2C		((uint)0x01)
+#define	SIU_INT_SPI		((uint)0x02)
+#define	SIU_INT_RISC		((uint)0x03)
 #define	SIU_INT_SMC1		((uint)0x04)
 #define	SIU_INT_SMC2		((uint)0x05)
+#define	SIU_INT_IDMA1		((uint)0x06)
+#define	SIU_INT_IDMA2		((uint)0x07)
+#define	SIU_INT_IDMA3		((uint)0x08)
+#define	SIU_INT_IDMA4		((uint)0x09)
+#define	SIU_INT_SDMA		((uint)0x0a)
+#define	SIU_INT_TIMER1		((uint)0x0c)
+#define	SIU_INT_TIMER2		((uint)0x0d)
+#define	SIU_INT_TIMER3		((uint)0x0e)
+#define	SIU_INT_TIMER4		((uint)0x0f)
+#define	SIU_INT_TMCNT		((uint)0x10)
+#define	SIU_INT_PIT		((uint)0x11)
+#define	SIU_INT_IRQ1		((uint)0x13)
+#define	SIU_INT_IRQ2		((uint)0x14)
+#define	SIU_INT_IRQ3		((uint)0x15)
+#define	SIU_INT_IRQ4		((uint)0x16)
+#define	SIU_INT_IRQ5		((uint)0x17)
+#define	SIU_INT_IRQ6		((uint)0x18)
+#define	SIU_INT_IRQ7		((uint)0x19)
 #define	SIU_INT_FCC1		((uint)0x20)
 #define	SIU_INT_FCC2		((uint)0x21)
 #define	SIU_INT_FCC3		((uint)0x22)
+#define	SIU_INT_MCC1		((uint)0x24)
+#define	SIU_INT_MCC2		((uint)0x25)
 #define	SIU_INT_SCC1		((uint)0x28)
 #define	SIU_INT_SCC2		((uint)0x29)
 #define	SIU_INT_SCC3		((uint)0x2a)
 #define	SIU_INT_SCC4		((uint)0x2b)
+#define	SIU_INT_PC15		((uint)0x30)
+#define	SIU_INT_PC14		((uint)0x31)
+#define	SIU_INT_PC13		((uint)0x32)
+#define	SIU_INT_PC12		((uint)0x33)
+#define	SIU_INT_PC11		((uint)0x34)
+#define	SIU_INT_PC10		((uint)0x35)
+#define	SIU_INT_PC9		((uint)0x36)
+#define	SIU_INT_PC8		((uint)0x37)
+#define	SIU_INT_PC7		((uint)0x38)
+#define	SIU_INT_PC6		((uint)0x39)
+#define	SIU_INT_PC5		((uint)0x3a)
+#define	SIU_INT_PC4		((uint)0x3b)
+#define	SIU_INT_PC3		((uint)0x3c)
+#define	SIU_INT_PC2		((uint)0x3d)
+#define	SIU_INT_PC1		((uint)0x3e)
+#define	SIU_INT_PC0		((uint)0x3f)
 
 #endif /* CONFIG_8260 */
 
--- diff/include/asm-ppc/machdep.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/machdep.h	2004-07-01 21:32:50.000000000 +0100
@@ -5,6 +5,8 @@
 #include <linux/config.h>
 #include <linux/init.h>
 
+#include <asm/setup.h>
+
 #ifdef CONFIG_APUS
 #include <asm-m68k/machdep.h>
 #endif
@@ -106,7 +108,6 @@
 };
 
 extern struct machdep_calls ppc_md;
-#define COMMAND_LINE_SIZE 512
 extern char cmd_line[COMMAND_LINE_SIZE];
 
 extern void setup_pci_ptrs(void);
--- diff/include/asm-ppc/mmu.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/mmu.h	2004-07-01 21:32:50.000000000 +0100
@@ -379,6 +379,74 @@
 #define PPC44x_TLB_SW		0x00000002      /* Super write */
 #define PPC44x_TLB_SR		0x00000001      /* Super read */
 
+/* Book-E defined page sizes */
+#define BOOKE_PAGESZ_1K		0
+#define BOOKE_PAGESZ_4K		1
+#define BOOKE_PAGESZ_16K	2
+#define BOOKE_PAGESZ_64K	3
+#define BOOKE_PAGESZ_256K	4
+#define BOOKE_PAGESZ_1M		5
+#define BOOKE_PAGESZ_4M		6
+#define BOOKE_PAGESZ_16M	7
+#define BOOKE_PAGESZ_64M	8
+#define BOOKE_PAGESZ_256M	9
+#define BOOKE_PAGESZ_1GB	10
+#define BOOKE_PAGESZ_4GB	11
+#define BOOKE_PAGESZ_16GB	12
+#define BOOKE_PAGESZ_64GB	13
+#define BOOKE_PAGESZ_256GB	14
+#define BOOKE_PAGESZ_1TB	15
+
+/*
+ * Freescale Book-E MMU support
+ */
+
+#define MAS0_TLBSEL	0x10000000
+#define MAS0_ESEL	0x000F0000
+#define MAS0_NV		0x00000001
+
+#define MAS1_VALID 	0x80000000
+#define MAS1_IPROT	0x40000000
+#define MAS1_TID 	0x03FF0000
+#define MAS1_TS		0x00001000
+#define MAS1_TSIZE(x)	(x << 8)
+
+#define MAS2_EPN	0xFFFFF000
+#define MAS2_SHAREN	0x00000200
+#define MAS2_X0		0x00000040
+#define MAS2_X1		0x00000020
+#define MAS2_W		0x00000010
+#define MAS2_I		0x00000008
+#define MAS2_M		0x00000004
+#define MAS2_G		0x00000002
+#define MAS2_E		0x00000001
+
+#define MAS3_RPN	0xFFFFF000
+#define MAS3_U0		0x00000200
+#define MAS3_U1		0x00000100
+#define MAS3_U2		0x00000080
+#define MAS3_U3		0x00000040
+#define MAS3_UX		0x00000020
+#define MAS3_SX		0x00000010
+#define MAS3_UW		0x00000008
+#define MAS3_SW		0x00000004
+#define MAS3_UR		0x00000002
+#define MAS3_SR		0x00000001
+
+#define MAS4_TLBSELD	0x10000000
+#define MAS4_TIDDSEL	0x00030000
+#define MAS4_DSHAREN	0x00001000
+#define MAS4_TSIZED(x)	(x << 8)
+#define MAS4_X0D	0x00000040
+#define MAS4_X1D	0x00000020
+#define MAS4_WD		0x00000010
+#define MAS4_ID		0x00000008
+#define MAS4_MD		0x00000004
+#define MAS4_GD		0x00000002
+#define MAS4_ED		0x00000001
+
+#define MAS6_SPID	0x00FF0000
+#define MAS6_SAS	0x00000001
 
 #endif /* _PPC_MMU_H_ */
 #endif /* __KERNEL__ */
--- diff/include/asm-ppc/mmu_context.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/mmu_context.h	2004-07-01 21:32:50.000000000 +0100
@@ -63,6 +63,11 @@
 #define LAST_CONTEXT    	255
 #define FIRST_CONTEXT    	1
 
+#elif CONFIG_E500
+#define NO_CONTEXT      	256
+#define LAST_CONTEXT    	255
+#define FIRST_CONTEXT    	1
+
 #else
 
 /* PPC 6xx, 7xx CPUs */
--- diff/include/asm-ppc/mpc8260.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/mpc8260.h	2004-07-01 21:32:50.000000000 +0100
@@ -36,6 +36,10 @@
 #include <platforms/tqm8260.h>
 #endif
 
+#ifdef CONFIG_PQ2ADS
+#include <platforms/pq2ads.h>
+#endif
+
 /* Make sure the memory translation stuff is there if PCI not used.
  */
 #ifndef _IO_BASE
--- diff/include/asm-ppc/ocp.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/ocp.h	2004-07-01 21:32:50.000000000 +0100
@@ -202,6 +202,10 @@
 #include <asm/ibm_ocp.h>
 #endif
 
+#ifdef CONFIG_FSL_OCP
+#include <asm/fsl_ocp.h>
+#endif
+
 #endif				/* CONFIG_PPC_OCP */
 #endif				/* __OCP_H__ */
 #endif				/* __KERNEL__ */
--- diff/include/asm-ppc/ocp_ids.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/ocp_ids.h	2004-07-01 21:32:50.000000000 +0100
@@ -45,6 +45,7 @@
 
 /* Memory devices 0x0090 - 0x009F */
 #define OCP_FUNC_MAL		0x0090
+#define OCP_FUNC_DMA		0x0091
 
 /* Display 0x00A0 - 0x00AF */
 
@@ -62,7 +63,7 @@
 
 /* Network 0x0200 - 0x02FF */
 #define OCP_FUNC_EMAC		0x0200
-#define OCP_FUNC_ENET		0x0201	/* TSEC & FEC */
+#define OCP_FUNC_GFAR		0x0201	/* TSEC & FEC */
 
 /* Bridge devices 0xE00 - 0xEFF */
 #define OCP_FUNC_OPB		0x0E00
--- diff/include/asm-ppc/pgtable.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/pgtable.h	2004-07-01 21:32:50.000000000 +0100
@@ -222,6 +222,43 @@
 /* ERPN in a PTE never gets cleared, ignore it */
 #define _PTE_NONE_MASK	0xffffffff00000000ULL
 
+#elif defined(CONFIG_E500)
+
+/*
+   MMU Assist Register 3:
+
+   32 33 34 35 36  ... 50 51 52 53 54 55 56 57 58 59 60 61 62 63
+   RPN......................  0  0 U0 U1 U2 U3 UX SX UW SW UR SR
+
+   - PRESENT *must* be in the bottom three bits because swap cache
+     entries use the top 29 bits.
+
+   - FILE *must* be in the bottom three bits because swap cache
+     entries use the top 29 bits.
+*/
+
+/* Definitions for e500 core */
+#define _PAGE_PRESENT	0x001	/* S: PTE contains a translation */
+#define _PAGE_USER	0x002	/* S: User page (maps to UR) */
+#define _PAGE_FILE	0x002	/* S: when !present: nonlinear file mapping */
+#define _PAGE_ACCESSED	0x004	/* S: Page referenced */
+#define _PAGE_HWWRITE	0x008	/* H: Dirty & RW, set in exception */
+#define _PAGE_RW	0x010	/* S: Write permission */
+#define _PAGE_HWEXEC	0x020	/* H: UX permission */
+
+#define _PAGE_ENDIAN	0x040	/* H: E bit */
+#define _PAGE_GUARDED	0x080	/* H: G bit */
+#define _PAGE_COHERENT	0x100	/* H: M bit */
+#define _PAGE_NO_CACHE	0x200	/* H: I bit */
+#define _PAGE_WRITETHRU	0x400	/* H: W bit */
+#define _PAGE_DIRTY	0x800	/* S: Page dirty */
+
+#define _PMD_PRESENT	0
+#define _PMD_PRESENT_MASK (PAGE_MASK)
+#define _PMD_BAD	(~PAGE_MASK)
+
+#define NUM_TLBCAMS	(16)
+
 #elif defined(CONFIG_8xx)
 /* Definitions for 8xx embedded chips. */
 #define _PAGE_PRESENT	0x0001	/* Page is valid */
--- diff/include/asm-ppc/pmac_feature.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/pmac_feature.h	2004-07-01 21:32:50.000000000 +0100
@@ -273,6 +273,12 @@
  */
 #define PMAC_FTR_ENABLE_MPIC		PMAC_FTR_DEF(19)
 
+/* PMAC_FTR_AACK_DELAY_ENABLE	(NULL, int enable, 0)
+ *
+ * Enable/disable the AACK delay on the northbridge for systems using DFS
+ */
+#define PMAC_FTR_AACK_DELAY_ENABLE     	PMAC_FTR_DEF(20)
+
 
 /* Don't use those directly, they are for the sake of pmac_setup.c */
 extern long pmac_do_feature_call(unsigned int selector, ...);
--- diff/include/asm-ppc/ppc_asm.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/ppc_asm.h	2004-07-01 21:32:50.000000000 +0100
@@ -59,6 +59,20 @@
 #define REST_16VR(n,b,base)	REST_8VR(n,b,base); REST_8VR(n+8,b,base)
 #define REST_32VR(n,b,base)	REST_16VR(n,b,base); REST_16VR(n+16,b,base)
 
+#define SAVE_EVR(n,s,base)	evmergehi s,s,n; stw s,THREAD_EVR0+4*(n)(base)
+#define SAVE_2EVR(n,s,base)	SAVE_EVR(n,s,base); SAVE_EVR(n+1,s,base)
+#define SAVE_4EVR(n,s,base)	SAVE_2EVR(n,s,base); SAVE_2EVR(n+2,s,base)
+#define SAVE_8EVR(n,s,base)	SAVE_4EVR(n,s,base); SAVE_4EVR(n+4,s,base)
+#define SAVE_16EVR(n,s,base)	SAVE_8EVR(n,s,base); SAVE_8EVR(n+8,s,base)
+#define SAVE_32EVR(n,s,base)	SAVE_16EVR(n,s,base); SAVE_16EVR(n+16,s,base)
+
+#define REST_EVR(n,s,base)	lwz s,THREAD_EVR0+4*(n)(base); evmergelo n,s,n
+#define REST_2EVR(n,s,base)	REST_EVR(n,s,base); REST_EVR(n+1,s,base)
+#define REST_4EVR(n,s,base)	REST_2EVR(n,s,base); REST_2EVR(n+2,s,base)
+#define REST_8EVR(n,s,base)	REST_4EVR(n,s,base); REST_4EVR(n+4,s,base)
+#define REST_16EVR(n,s,base)	REST_8EVR(n,s,base); REST_8EVR(n+8,s,base)
+#define REST_32EVR(n,s,base)	REST_16EVR(n,s,base); REST_16EVR(n+16,s,base)
+
 #ifdef CONFIG_PPC601_SYNC_FIX
 #define SYNC				\
 BEGIN_FTR_SECTION			\
@@ -107,7 +121,14 @@
 	bdnz	0b
 #endif
 
-#if !defined(CONFIG_44x)
+#ifdef CONFIG_BOOKE
+#define tophys(rd,rs)				\
+	addis	rd,rs,0
+
+#define tovirt(rd,rs)				\
+	addis	rd,rs,0
+
+#else  /* CONFIG_BOOKE */
 /*
  * On APUS (Amiga PowerPC cpu upgrade board), we don't know the
  * physical base address of RAM at compile time.
@@ -125,15 +146,7 @@
 	.align  1;				\
 	.long   0b;				\
 	.previous
-#else  /* CONFIG_44x */
-
-#define tophys(rd,rs)				\
-	mr	rd,rs
-
-#define tovirt(rd,rs)				\
-	mr	rd,rs
-
-#endif /* CONFIG_44x */
+#endif  /* CONFIG_BOOKE */
 
 /*
  * On 64-bit cpus, we use the rfid instruction instead of rfi, but
@@ -289,6 +302,39 @@
 #define	vr30	30
 #define	vr31	31
 
+#define	evr0	0
+#define	evr1	1
+#define	evr2	2
+#define	evr3	3
+#define	evr4	4
+#define	evr5	5
+#define	evr6	6
+#define	evr7	7
+#define	evr8	8
+#define	evr9	9
+#define	evr10	10
+#define	evr11	11
+#define	evr12	12
+#define	evr13	13
+#define	evr14	14
+#define	evr15	15
+#define	evr16	16
+#define	evr17	17
+#define	evr18	18
+#define	evr19	19
+#define	evr20	20
+#define	evr21	21
+#define	evr22	22
+#define	evr23	23
+#define	evr24	24
+#define	evr25	25
+#define	evr26	26
+#define	evr27	27
+#define	evr28	28
+#define	evr29	29
+#define	evr30	30
+#define	evr31	31
+
 /* some stab codes */
 #define N_FUN	36
 #define N_RSYM	64
--- diff/include/asm-ppc/ppcboot.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/ppcboot.h	2004-07-01 21:32:50.000000000 +0100
@@ -52,7 +52,7 @@
 	unsigned long	bi_flashoffset; /* reserved area for startup monitor */
 	unsigned long	bi_sramstart;	/* start of SRAM memory */
 	unsigned long	bi_sramsize;	/* size	 of SRAM memory */
-#if defined(CONFIG_8xx) || defined(CONFIG_8260)
+#if defined(CONFIG_8xx) || defined(CONFIG_CPM2) || defined(CONFIG_85xx)
 	unsigned long	bi_immr_base;	/* base of IMMR register */
 #endif
 	unsigned long	bi_bootflags;	/* boot / reboot flag (for LynxOS) */
@@ -61,7 +61,7 @@
 	unsigned short	bi_ethspeed;	/* Ethernet speed in Mbps */
 	unsigned long	bi_intfreq;	/* Internal Freq, in MHz */
 	unsigned long	bi_busfreq;	/* Bus Freq, in MHz */
-#if defined(CONFIG_8260)
+#if defined(CONFIG_CPM2)
 	unsigned long	bi_cpmfreq;	/* CPM_CLK Freq, in MHz */
 	unsigned long	bi_brgfreq;	/* BRG_CLK Freq, in MHz */
 	unsigned long	bi_sccfreq;	/* SCC_CLK Freq, in MHz */
@@ -79,7 +79,7 @@
 #if defined(CONFIG_HYMOD)
 	hymod_conf_t	bi_hymod_conf;	/* hymod configuration information */
 #endif
-#if defined(CONFIG_EVB64260)
+#if defined(CONFIG_EVB64260) || defined(CONFIG_85xx)
 	/* the board has three onboard ethernet ports */
 	unsigned char	bi_enet1addr[6];
 	unsigned char	bi_enet2addr[6];
--- diff/include/asm-ppc/processor.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/processor.h	2004-07-01 21:32:50.000000000 +0100
@@ -40,6 +40,14 @@
 	.globl n;\
 n:
 
+/*
+ * this is the minimum allowable io space due to the location
+ * of the io areas on prep (first one at 0x80000000) but
+ * as soon as I get around to remapping the io areas with the BATs
+ * to match the mac we can raise this. -- Cort
+ */
+#define TASK_SIZE	(CONFIG_TASK_SIZE)
+
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_PPC_MULTIPLATFORM
 extern int _machine;
@@ -79,14 +87,7 @@
 /* Lazy FPU handling on uni-processor */
 extern struct task_struct *last_task_used_math;
 extern struct task_struct *last_task_used_altivec;
-
-/*
- * this is the minimum allowable io space due to the location
- * of the io areas on prep (first one at 0x80000000) but
- * as soon as I get around to remapping the io areas with the BATs
- * to match the mac we can raise this. -- Cort
- */
-#define TASK_SIZE	(CONFIG_TASK_SIZE)
+extern struct task_struct *last_task_used_spe;
 
 /* This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
@@ -104,7 +105,7 @@
 	void		*pgdir;		/* root of page-table tree */
 	int		fpexc_mode;	/* floating-point exception mode */
 	signed long	last_syscall;
-#ifdef CONFIG_4xx
+#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE)
 	unsigned long	dbcr0;		/* debug control register values */
 	unsigned long	dbcr1;
 #endif
@@ -119,6 +120,13 @@
 	unsigned long	vrsave;
 	int		used_vr;	/* set if process has used altivec */
 #endif /* CONFIG_ALTIVEC */
+#ifdef CONFIG_SPE
+	unsigned long	evr[32];	/* upper 32-bits of SPE regs */
+	u64		acc;		/* Accumulator */
+	unsigned long	spefscr;	/* SPE & eFP status */
+	int		used_spe;	/* set if process has used spe */
+#endif /* CONFIG_SPE */
+	struct vperfctr *perfctr;	/* performance counters */
 };
 
 #define ARCH_MIN_TASKALIGN 16
@@ -190,6 +198,8 @@
 
 #define spin_lock_prefetch(x)	prefetchw(x)
 
+extern int emulate_altivec(struct pt_regs *regs);
+
 #endif /* !__ASSEMBLY__ */
 
 #endif /* __ASM_PPC_PROCESSOR_H */
--- diff/include/asm-ppc/ptrace.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/ptrace.h	2004-07-01 21:32:50.000000000 +0100
@@ -131,4 +131,9 @@
 #define PTRACE_GETVRREGS	18
 #define PTRACE_SETVRREGS	19
 
+/* Get/set all the upper 32-bits of the SPE registers, accumulator, and
+ * spefscr, in one go */
+#define PTRACE_GETEVRREGS	20
+#define PTRACE_SETEVRREGS	21
+
 #endif
--- diff/include/asm-ppc/reg.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/reg.h	2004-07-01 21:32:50.000000000 +0100
@@ -174,6 +174,7 @@
 
 #define SPRN_HID1	0x3F1		/* Hardware Implementation Register 1 */
 #define HID1_EMCP	(1<<31)		/* 7450 Machine Check Pin Enable */
+#define HID1_DFS	(1<<22)		/* 7447A Dynamic Frequency Scaling */
 #define HID1_PC0	(1<<16)		/* 7450 PLL_CFG[0] */
 #define HID1_PC1	(1<<15)		/* 7450 PLL_CFG[1] */
 #define HID1_PC2	(1<<14)		/* 7450 PLL_CFG[2] */
@@ -268,22 +269,14 @@
 #define SPRN_LDSTCR	0x3f8	/* Load/Store control register */
 #define SPRN_LDSTDB	0x3f4	/* */
 #define SPRN_LR		0x008	/* Link Register */
-#define SPRN_MMCR0	0x3B8	/* Monitor Mode Control Register 0 */
-#define SPRN_MMCR1	0x3BC	/* Monitor Mode Control Register 1 */
 #ifndef SPRN_PIR
 #define SPRN_PIR	0x3FF	/* Processor Identification Register */
 #endif
-#define SPRN_PMC1	0x3B9	/* Performance Counter Register 1 */
-#define SPRN_PMC2	0x3BA	/* Performance Counter Register 2 */
-#define SPRN_PMC3	0x3BD	/* Performance Counter Register 3 */
-#define SPRN_PMC4	0x3BE	/* Performance Counter Register 4 */
 #define SPRN_PTEHI	0x3D5	/* 981 7450 PTE HI word (S/W TLB load) */
 #define SPRN_PTELO	0x3D6	/* 982 7450 PTE LO word (S/W TLB load) */
 #define SPRN_PVR	0x11F	/* Processor Version Register */
 #define SPRN_RPA	0x3D6	/* Required Physical Address Register */
-#define SPRN_SDA	0x3BF	/* Sampled Data Address Register */
 #define SPRN_SDR1	0x019	/* MMU Hash Base Register */
-#define SPRN_SIA	0x3BB	/* Sampled Instruction Address Register */
 #define SPRN_SPRG0	0x110	/* Special Purpose Register General 0 */
 #define SPRN_SPRG1	0x111	/* Special Purpose Register General 1 */
 #define SPRN_SPRG2	0x112	/* Special Purpose Register General 2 */
@@ -294,6 +287,9 @@
 #define SPRN_SPRG7	0x117	/* Special Purpose Register General 7 */
 #define SPRN_SRR0	0x01A	/* Save/Restore Register 0 */
 #define SPRN_SRR1	0x01B	/* Save/Restore Register 1 */
+#ifndef SPRN_SVR
+#define SPRN_SVR	0x11E	/* System Version Register */
+#endif
 #define SPRN_THRM1	0x3FC		/* Thermal Management Register 1 */
 /* these bits were defined in inverted endian sense originally, ugh, confusing */
 #define THRM1_TIN	(1 << 31)
@@ -307,16 +303,79 @@
 #define SPRN_THRM3	0x3FE		/* Thermal Management Register 3 */
 #define THRM3_E		(1<<0)
 #define SPRN_TLBMISS	0x3D4		/* 980 7450 TLB Miss Register */
-#define SPRN_UMMCR0	0x3A8	/* User Monitor Mode Control Register 0 */
-#define SPRN_UMMCR1	0x3AC	/* User Monitor Mode Control Register 0 */
-#define SPRN_UPMC1	0x3A9	/* User Performance Counter Register 1 */
-#define SPRN_UPMC2	0x3AA	/* User Performance Counter Register 2 */
-#define SPRN_UPMC3	0x3AD	/* User Performance Counter Register 3 */
-#define SPRN_UPMC4	0x3AE	/* User Performance Counter Register 4 */
-#define SPRN_USIA	0x3AB	/* User Sampled Instruction Address Register */
 #define SPRN_VRSAVE	0x100	/* Vector Register Save Register */
 #define SPRN_XER	0x001	/* Fixed Point Exception Register */
 
+/* Performance-monitoring control and counter registers */
+#define SPRN_MMCR0	0x3B8	/* Monitor Mode Control Register 0 (604 and up) */
+#define SPRN_MMCR1	0x3BC	/* Monitor Mode Control Register 1 (604e and up) */
+#define SPRN_MMCR2	0x3B0	/* Monitor Mode Control Register 2 (7400 and up) */
+#define SPRN_PMC1	0x3B9	/* Performance Counter Register 1 (604 and up) */
+#define SPRN_PMC2	0x3BA	/* Performance Counter Register 2 (604 and up) */
+#define SPRN_PMC3	0x3BD	/* Performance Counter Register 3 (604e and up) */
+#define SPRN_PMC4	0x3BE	/* Performance Counter Register 4 (604e and up) */
+#define SPRN_PMC5	0x3B1	/* Performance Counter Register 5 (7450 and up) */
+#define SPRN_PMC6	0x3B2	/* Performance Counter Register 6 (7450 and up) */
+#define SPRN_SIA	0x3BB	/* Sampled Instruction Address Register (604 and up) */
+#define SPRN_SDA	0x3BF	/* Sampled Data Address Register (604/604e only) */
+#define SPRN_BAMR	0x3B7	/* Breakpoint Address Mask Register (7400 and up) */
+
+#define SPRN_UMMCR0	0x3A8	/* User Monitor Mode Control Register 0 (750 and up) */
+#define SPRN_UMMCR1	0x3AC	/* User Monitor Mode Control Register 0 (750 and up) */
+#define SPRN_UMMCR2	0x3A0	/* User Monitor Mode Control Register 0 (7400 and up) */
+#define SPRN_UPMC1	0x3A9	/* User Performance Counter Register 1 (750 and up) */
+#define SPRN_UPMC2	0x3AA	/* User Performance Counter Register 2 (750 and up) */
+#define SPRN_UPMC3	0x3AD	/* User Performance Counter Register 3 (750 and up) */
+#define SPRN_UPMC4	0x3AE	/* User Performance Counter Register 4 (750 and up) */
+#define SPRN_UPMC5	0x3A1	/* User Performance Counter Register 5 (7450 and up) */
+#define SPRN_UPMC6	0x3A2	/* User Performance Counter Register 5 (7450 and up) */
+#define SPRN_USIA	0x3AB	/* User Sampled Instruction Address Register (750 and up) */
+#define SPRN_UBAMR	0x3A7	/* User Breakpoint Address Mask Register (7400 and up) */
+
+/* MMCR0 layout (74xx terminology) */
+#define MMCR0_FC		0x80000000 /* Freeze counters unconditionally. */
+#define MMCR0_FCS		0x40000000 /* Freeze counters while MSR[PR]=0 (supervisor mode). */
+#define MMCR0_FCP		0x20000000 /* Freeze counters while MSR[PR]=1 (user mode). */
+#define MMCR0_FCM1		0x10000000 /* Freeze counters while MSR[PM]=1. */
+#define MMCR0_FCM0		0x08000000 /* Freeze counters while MSR[PM]=0. */
+#define MMCR0_PMXE		0x04000000 /* Enable performance monitor exceptions.
+					    * Cleared by hardware when a PM exception occurs.
+					    * 604: PMXE is not cleared by hardware.
+					    */
+#define MMCR0_FCECE		0x02000000 /* Freeze counters on enabled condition or event.
+					    * FCECE is treated as 0 if TRIGGER is 1.
+					    * 74xx: FC is set when the event occurs.
+					    * 604/750: ineffective when PMXE=0.
+					    */
+#define MMCR0_TBSEL		0x01800000 /* Time base lower (TBL) bit selector.
+					    * 00: bit 31, 01: bit 23, 10: bit 19, 11: bit 15.
+					    */
+#define MMCR0_TBEE		0x00400000 /* Enable event on TBL bit transition from 0 to 1. */
+#define MMCR0_THRESHOLD		0x003F0000 /* Threshold value for certain events. */
+#define MMCR0_PMC1CE		0x00008000 /* Enable event on PMC1 overflow. */
+#define MMCR0_PMCjCE		0x00004000 /* Enable event on PMC2-PMC6 overflow.
+					    * 604/750: Overrides FCECE (DISCOUNT).
+					    */
+#define MMCR0_TRIGGER		0x00002000 /* Disable PMC2-PMC6 until PMC1 overflow or other event.
+					    * 74xx: cleared by hardware when the event occurs.
+					    */
+#define MMCR0_PMC1SEL		0x00001FB0 /* PMC1 event selector, 7 bits. */
+#define MMCR0_PMC2SEL		0x0000003F /* PMC2 event selector, 6 bits. */
+
+/* MMCR1 layout (604e-7457) */
+#define MMCR1_PMC3SEL		0xF8000000 /* PMC3 event selector, 5 bits. */
+#define MMCR1_PMC4SEL		0x07B00000 /* PMC4 event selector, 5 bits. */
+#define MMCR1_PMC5SEL		0x003E0000 /* PMC5 event selector, 5 bits. (745x only) */
+#define MMCR1_PMC6SEL		0x0001F800 /* PMC6 event selector, 6 bits. (745x only) */
+#define MMCR1__RESERVED		0x000007FF /* should be zero */
+
+/* MMCR2 layout (7400-7457) */
+#define MMCR2_THRESHMULT	0x80000000 /* MMCR0[THRESHOLD] multiplier. */
+#define MMCR2_SMCNTEN		0x40000000 /* 7400/7410 only, should be zero. */
+#define MMCR2_SMINTEN		0x20000000 /* 7400/7410 only, should be zero. */
+#define MMCR2__RESERVED		0x1FFFFFFF /* should be zero */
+#define MMCR2_RESERVED		(MMCR2_SMCNTEN | MMCR2_SMINTEN | MMCR2__RESERVED)
+
 /* Bit definitions for MMCR0 and PMC1 / PMC2. */
 #define MMCR0_PMC1_CYCLES	(1 << 7)
 #define MMCR0_PMC1_ICACHEMISS	(5 << 7)
@@ -400,6 +459,7 @@
 #define SRR1	SPRN_SRR1	/* Save and Restore Register 1 */
 #define SRR2	SPRN_SRR2	/* Save and Restore Register 2 */
 #define SRR3	SPRN_SRR3	/* Save and Restore Register 3 */
+#define SVR	SPRN_SVR	/* System Version Register */
 #define ICTC	SPRN_ICTC	/* Instruction Cache Throttling Control Reg */
 #define THRM1	SPRN_THRM1	/* Thermal Management Register 1 */
 #define THRM2	SPRN_THRM2	/* Thermal Management Register 2 */
@@ -462,6 +522,8 @@
 #define PVR_7400	0x000C0000
 #define PVR_7410	0x800C0000
 #define PVR_7450	0x80000000
+#define PVR_8540	0x80200000
+#define PVR_8560	0x80200000
 /*
  * For the 8xx processors, all of them report the same PVR family for
  * the PowerPC core. The various versions of these processors must be
@@ -476,6 +538,12 @@
 #define PVR_8245	0x80811014
 #define PVR_8260	PVR_8240
 
+/* System Version Numbers */
+#define SVR_8540	0x80300000
+#define SVR_8541E	0x807A0000
+#define SVR_8555E	0x80790000
+#define SVR_8560	0x80700000
+
 /* Segment Registers */
 #define SR0	0
 #define SR1	1
--- diff/include/asm-ppc/reg_booke.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/reg_booke.h	2004-07-01 21:32:50.000000000 +0100
@@ -43,13 +43,23 @@
 	mtdcr(base ## _CFGADDR, base ## _ ## reg);	\
 	mtdcr(base ## _CFGDATA, data);		\
 } while (0)
+
+/* Performance Monitor Registers */
+#define mfpmr(rn)	({unsigned int rval; \
+			asm volatile("mfpmr %0," __stringify(rn) \
+				     : "=r" (rval)); rval;})
+#define mtpmr(rn, v)	asm volatile("mtpmr " __stringify(rn) ",%0" : : "r" (v))
 #endif /* __ASSEMBLY__ */
 
 
 /* Machine State Register (MSR) Fields */
+#define MSR_UCLE	(1<<26)	/* User-mode cache lock enable */
+#define MSR_SPE		(1<<25)	/* Enable SPE */
 #define MSR_DWE		(1<<10)	/* Debug Wait Enable */
+#define MSR_UBLE	(1<<10)	/* BTB lock enable (e500) */
 #define MSR_IS		MSR_IR	/* Instruction Space */
 #define MSR_DS		MSR_DR	/* Data Space */
+#define MSR_PMM		(1<<2)	/* Performance monitor mark bit */
 
 /* Default MSR for kernel mode. */
 #if defined (CONFIG_40x)
@@ -91,20 +101,28 @@
 #define SPRN_IVOR13	0x19D	/* Interrupt Vector Offset Register 13 */
 #define SPRN_IVOR14	0x19E	/* Interrupt Vector Offset Register 14 */
 #define SPRN_IVOR15	0x19F	/* Interrupt Vector Offset Register 15 */
+#define SPRN_SPEFSCR	0x200	/* SPE & Embedded FP Status & Control */
+#define SPRN_BBEAR	0x201	/* Branch Buffer Entry Address Register */
+#define SPRN_BBTAR	0x202	/* Branch Buffer Target Address Register */
+#define SPRN_IVOR32	0x210	/* Interrupt Vector Offset Register 32 */
+#define SPRN_IVOR33	0x211	/* Interrupt Vector Offset Register 33 */
+#define SPRN_IVOR34	0x212	/* Interrupt Vector Offset Register 34 */
+#define SPRN_IVOR35	0x213	/* Interrupt Vector Offset Register 35 */
 #define SPRN_MCSRR0	0x23A	/* Machine Check Save and Restore Register 0 */
 #define SPRN_MCSRR1	0x23B	/* Machine Check Save and Restore Register 1 */
 #define SPRN_MCSR	0x23C	/* Machine Check Status Register */
-#ifdef CONFIG_440A
-#define  MCSR_MCS	0x80000000 /* Machine Check Summary */
-#define  MCSR_IB	0x40000000 /* Instruction PLB Error */
-#define  MCSR_DRB	0x20000000 /* Data Read PLB Error */
-#define  MCSR_DWB	0x10000000 /* Data Write PLB Error */
-#define  MCSR_TLBP	0x08000000 /* TLB Parity Error */
-#define  MCSR_ICP	0x04000000 /* I-Cache Parity Error */
-#define  MCSR_DCSP	0x02000000 /* D-Cache Search Parity Error */
-#define  MCSR_DCFP	0x01000000 /* D-Cache Flush Parity Error */
-#define  MCSR_IMPE	0x00800000 /* Imprecise Machine Check Exception */
-#endif
+#define SPRN_MCAR	0x23D	/* Machine Check Address Register */
+#define SPRN_MAS0	0x270	/* MMU Assist Register 0 */
+#define SPRN_MAS1	0x271	/* MMU Assist Register 1 */
+#define SPRN_MAS2	0x272	/* MMU Assist Register 2 */
+#define SPRN_MAS3	0x273	/* MMU Assist Register 3 */
+#define SPRN_MAS4	0x274	/* MMU Assist Register 4 */
+#define SPRN_MAS5	0x275	/* MMU Assist Register 5 */
+#define SPRN_MAS6	0x276	/* MMU Assist Register 6 */
+#define SPRN_PID1	0x279	/* Process ID Register 1 */
+#define SPRN_PID2	0x27A	/* Process ID Register 2 */
+#define SPRN_TLB0CFG	0x2B0	/* TLB 0 Config Register */
+#define SPRN_TLB1CFG	0x2B1	/* TLB 1 Config Register */
 #define SPRN_ZPR	0x3B0	/* Zone Protection Register (40x) */
 #define SPRN_MMUCR	0x3B2	/* MMU Control Register */
 #define SPRN_CCR0	0x3B3	/* Core Configuration Register */
@@ -115,9 +133,12 @@
 #define SPRN_DCMP	0x3D1	/* Data TLB Compare Register */
 #define SPRN_ICDBDR	0x3D3	/* Instruction Cache Debug Data Register */
 #define SPRN_EVPR	0x3D6	/* Exception Vector Prefix Register */
+#define SPRN_L1CSR0	0x3F2	/* L1 Cache Control and Status Register 0 */
+#define SPRN_L1CSR1	0x3F3	/* L1 Cache Control and Status Register 1 */
 #define SPRN_PIT	0x3DB	/* Programmable Interval Timer */
 #define SPRN_DCCR	0x3FA	/* Data Cache Cacheability Register */
 #define SPRN_ICCR	0x3FB	/* Instruction Cache Cacheability Register */
+#define SPRN_SVR	0x3FF	/* System Version Register */
 
 /*
  * SPRs which have conflicting definitions on true Book E versus classic,
@@ -125,6 +146,7 @@
  */
 #ifdef CONFIG_BOOKE
 #define SPRN_PID	0x030	/* Process ID */
+#define SPRN_PID0	SPRN_PID/* Process ID Register 0 */
 #define SPRN_CSRR0	0x03A	/* Critical Save and Restore Register 0 */
 #define SPRN_CSRR1	0x03B	/* Critical Save and Restore Register 1 */
 #define SPRN_DEAR	0x03D	/* Data Error Address Register */
@@ -157,6 +179,34 @@
 #define SPRN_CSRR1	SPRN_SRR3 /* Critical Save and Restore Register 1 */
 #endif
 
+/* Bit definitions for the MCSR. */
+#ifdef CONFIG_440A
+#define MCSR_MCS	0x80000000 /* Machine Check Summary */
+#define MCSR_IB		0x40000000 /* Instruction PLB Error */
+#define MCSR_DRB	0x20000000 /* Data Read PLB Error */
+#define MCSR_DWB	0x10000000 /* Data Write PLB Error */
+#define MCSR_TLBP	0x08000000 /* TLB Parity Error */
+#define MCSR_ICP	0x04000000 /* I-Cache Parity Error */
+#define MCSR_DCSP	0x02000000 /* D-Cache Search Parity Error */
+#define MCSR_DCFP	0x01000000 /* D-Cache Flush Parity Error */
+#define MCSR_IMPE	0x00800000 /* Imprecise Machine Check Exception */
+#endif
+#ifdef CONFIG_E500
+#define MCSR_MCP 	0x80000000UL /* Machine Check Input Pin */
+#define MCSR_ICPERR 	0x40000000UL /* I-Cache Parity Error */
+#define MCSR_DCP_PERR 	0x20000000UL /* D-Cache Push Parity Error */
+#define MCSR_DCPERR 	0x10000000UL /* D-Cache Parity Error */
+#define MCSR_GL_CI 	0x00010000UL /* Guarded Load or Cache-Inhibited stwcx. */
+#define MCSR_BUS_IAERR 	0x00000080UL /* Instruction Address Error */
+#define MCSR_BUS_RAERR 	0x00000040UL /* Read Address Error */
+#define MCSR_BUS_WAERR 	0x00000020UL /* Write Address Error */
+#define MCSR_BUS_IBERR 	0x00000010UL /* Instruction Data Error */
+#define MCSR_BUS_RBERR 	0x00000008UL /* Read Data Bus Error */
+#define MCSR_BUS_WBERR 	0x00000004UL /* Write Data Bus Error */
+#define MCSR_BUS_IPERR 	0x00000002UL /* Instruction parity Error */
+#define MCSR_BUS_RPERR 	0x00000001UL /* Read parity Error */
+#endif
+
 /* Bit definitions for the DBSR. */
 /*
  * DBSR bits which have conflicting definitions on true Book E versus IBM 40x.
@@ -165,11 +215,27 @@
 #define DBSR_IC		0x08000000	/* Instruction Completion */
 #define DBSR_BT		0x04000000	/* Branch Taken */
 #define DBSR_TIE	0x01000000	/* Trap Instruction Event */
+#define DBSR_IAC1	0x00800000	/* Instr Address Compare 1 Event */
+#define DBSR_IAC2	0x00400000	/* Instr Address Compare 2 Event */
+#define DBSR_IAC3	0x00200000	/* Instr Address Compare 3 Event */
+#define DBSR_IAC4	0x00100000	/* Instr Address Compare 4 Event */
+#define DBSR_DAC1R	0x00080000	/* Data Addr Compare 1 Read Event */
+#define DBSR_DAC1W	0x00040000	/* Data Addr Compare 1 Write Event */
+#define DBSR_DAC2R	0x00020000	/* Data Addr Compare 2 Read Event */
+#define DBSR_DAC2W	0x00010000	/* Data Addr Compare 2 Write Event */
 #endif
 #ifdef CONFIG_40x
 #define DBSR_IC		0x80000000	/* Instruction Completion */
 #define DBSR_BT		0x40000000	/* Branch taken */
 #define DBSR_TIE	0x10000000	/* Trap Instruction debug Event */
+#define DBSR_IAC1	0x00800000	/* Instruction Address Compare 1 Event */
+#define DBSR_IAC2	0x00400000	/* Instruction Address Compare 2 Event */
+#define DBSR_IAC3	0x00200000	/* Instruction Address Compare 3 Event */
+#define DBSR_IAC4	0x00100000	/* Instruction Address Compare 4 Event */
+#define DBSR_DAC1R	0x00080000	/* Data Address Compare 1 Read Event */
+#define DBSR_DAC1W	0x00040000	/* Data Address Compare 1 Write Event */
+#define DBSR_DAC2R	0x00020000	/* Data Address Compare 2 Read Event */
+#define DBSR_DAC2W	0x00010000	/* Data Address Compare 2 Write Event */
 #endif
 
 /* Bit definitions related to the ESR. */
@@ -184,6 +250,9 @@
 #define ESR_DST		0x00800000	/* Storage Exception - Data miss */
 #define ESR_DIZ		0x00400000	/* Storage Exception - Zone fault */
 #define ESR_ST		0x00800000	/* Store Operation */
+#define ESR_DLK		0x00200000	/* Data Cache Locking */
+#define ESR_ILK		0x00100000	/* Instr. Cache Locking */
+#define ESR_BO		0x00020000	/* Byte Ordering */
 
 /* Bit definitions related to the DBCR0. */
 #define DBCR0_EDM	0x80000000	/* External Debug Mode */
@@ -258,10 +327,49 @@
 #define ICCR_NOCACHE	0		/* Noncacheable */
 #define ICCR_CACHE	1		/* Cacheable */
 
+/* Bit definitions for L1CSR0. */
+#define L1CSR0_DCFI	0x00000002	/* Data Cache Flash Invalidate */
+#define L1CSR0_DCE	0x00000001	/* Data Cache Enable */
+
+/* Bit definitions for L1CSR0. */
+#define L1CSR1_ICLFR	0x00000100	/* Instr Cache Lock Bits Flash Reset */
+#define L1CSR1_ICFI	0x00000002	/* Instr Cache Flash Invalidate */
+#define L1CSR1_ICE	0x00000001	/* Instr Cache Enable */
+
 /* Bit definitions for SGR. */
 #define SGR_NORMAL	0		/* Speculative fetching allowed. */
 #define SGR_GUARDED	1		/* Speculative fetching disallowed. */
 
+/* Bit definitions for SPEFSCR. */
+#define SPEFSCR_SOVH	0x80000000	/* Summary integer overflow high */
+#define SPEFSCR_OVH	0x40000000	/* Integer overflow high */
+#define SPEFSCR_FGH	0x20000000	/* Embedded FP guard bit high */
+#define SPEFSCR_FXH	0x10000000	/* Embedded FP sticky bit high */
+#define SPEFSCR_FINVH	0x08000000	/* Embedded FP invalid operation high */
+#define SPEFSCR_FDBZH	0x04000000	/* Embedded FP div by zero high */
+#define SPEFSCR_FUNFH	0x02000000	/* Embedded FP underflow high */
+#define SPEFSCR_FOVFH	0x01000000	/* Embedded FP overflow high */
+#define SPEFSCR_FINXS	0x00200000	/* Embedded FP inexact sticky */
+#define SPEFSCR_FINVS	0x00100000	/* Embedded FP invalid op. sticky */
+#define SPEFSCR_FDBZS	0x00080000	/* Embedded FP div by zero sticky */
+#define SPEFSCR_FUNFS	0x00040000	/* Embedded FP underflow sticky */
+#define SPEFSCR_FOVFS	0x00020000	/* Embedded FP overflow sticky */
+#define SPEFSCR_MODE	0x00010000	/* Embedded FP mode */
+#define SPEFSCR_SOV	0x00008000	/* Integer summary overflow */
+#define SPEFSCR_OV	0x00004000	/* Integer overflow */
+#define SPEFSCR_FG	0x00002000	/* Embedded FP guard bit */
+#define SPEFSCR_FX	0x00001000	/* Embedded FP sticky bit */
+#define SPEFSCR_FINV	0x00000800	/* Embedded FP invalid operation */
+#define SPEFSCR_FDBZ	0x00000400	/* Embedded FP div by zero */
+#define SPEFSCR_FUNF	0x00000200	/* Embedded FP underflow */
+#define SPEFSCR_FOVF	0x00000100	/* Embedded FP overflow */
+#define SPEFSCR_FINXE	0x00000040	/* Embedded FP inexact enable */
+#define SPEFSCR_FINVE	0x00000020	/* Embedded FP invalid op. enable */
+#define SPEFSCR_FDBZE	0x00000010	/* Embedded FP div by zero enable */
+#define SPEFSCR_FUNFE	0x00000008	/* Embedded FP underflow enable */
+#define SPEFSCR_FOVFE	0x00000004	/* Embedded FP overflow enable */
+#define SPEFSCR_FRMC 	0x00000003	/* Embedded FP rounding mode control */
+
 /* Short-hand for various SPRs. */
 #ifdef CONFIG_BOOKE
 #define CSRR0	SPRN_CSRR0	/* Critical Save and Restore Register 0 */
--- diff/include/asm-ppc/resource.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/resource.h	2004-07-01 21:32:50.000000000 +0100
@@ -12,8 +12,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit(?) */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 #ifdef __KERNEL__
 
@@ -37,6 +39,8 @@
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-ppc/serial.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/serial.h	2004-07-01 21:32:50.000000000 +0100
@@ -30,6 +30,8 @@
 #include <platforms/spruce.h>
 #elif defined(CONFIG_4xx)
 #include <asm/ibm4xx.h>
+#elif defined(CONFIG_85xx)
+#include <asm/mpc85xx.h>
 #else
 
 /*
--- diff/include/asm-ppc/setup.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/setup.h	2004-07-01 21:32:50.000000000 +0100
@@ -6,6 +6,9 @@
 #define m68k_memory memory
 
 #include <asm-m68k/setup.h>
+/* We have a bigger command line buffer. */
+#undef COMMAND_LINE_SIZE
+#define COMMAND_LINE_SIZE	512
 
 #endif /* _PPC_SETUP_H */
 #endif /* __KERNEL__ */
--- diff/include/asm-ppc/smp.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc/smp.h	2004-07-01 21:32:50.000000000 +0100
@@ -47,8 +47,6 @@
 
 #define smp_processor_id() (current_thread_info()->cpu)
 
-#define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
-
 extern int __cpu_up(unsigned int cpu);
 
 extern int smp_hw_index[];
--- diff/include/asm-ppc/system.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/system.h	2004-07-01 21:32:50.000000000 +0100
@@ -76,11 +76,12 @@
 extern void enable_kernel_fp(void);
 extern void giveup_altivec(struct task_struct *);
 extern void load_up_altivec(struct task_struct *);
+extern void giveup_spe(struct task_struct *);
+extern void load_up_spe(struct task_struct *);
 extern int fix_alignment(struct pt_regs *);
 extern void cvt_fd(float *from, double *to, unsigned long *fpscr);
 extern void cvt_df(double *from, float *to, unsigned long *fpscr);
 extern int call_rtas(const char *, int, int, unsigned long *, ...);
-extern int abs(int);
 extern void cacheable_memzero(void *p, unsigned int nb);
 extern int do_page_fault(struct pt_regs *, unsigned long, unsigned long);
 extern void bad_page_fault(struct pt_regs *, unsigned long, int);
--- diff/include/asm-ppc/tlbflush.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/tlbflush.h	2004-07-01 21:32:50.000000000 +0100
@@ -39,6 +39,28 @@
 				unsigned long end)
 	{ __tlbia(); }
 
+#elif defined(CONFIG_FSL_BOOKE)
+
+/* TODO: determine if flush_tlb_range & flush_tlb_kernel_range
+ * are best implemented as tlbia vs specific tlbie's */
+
+#define __tlbia()	_tlbia()
+
+static inline void flush_tlb_mm(struct mm_struct *mm)
+	{ __tlbia(); }
+static inline void flush_tlb_page(struct vm_area_struct *vma,
+				unsigned long vmaddr)
+	{ _tlbie(vmaddr); }
+static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
+					 unsigned long vmaddr)
+	{ _tlbie(vmaddr); }
+static inline void flush_tlb_range(struct vm_area_struct *vma,
+				unsigned long start, unsigned long end)
+	{ __tlbia(); }
+static inline void flush_tlb_kernel_range(unsigned long start,
+				unsigned long end)
+	{ __tlbia(); }
+
 #elif defined(CONFIG_8xx)
 #define __tlbia()	asm volatile ("tlbia; sync" : : : "memory")
 
--- diff/include/asm-ppc/uninorth.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc/uninorth.h	2004-07-01 21:32:50.000000000 +0100
@@ -142,6 +142,12 @@
  */
 #define UNI_N_HWINIT_STATE_CPU1_FLAG	0x10000000
 
+/* This register controls AACK delay, which is set when 2004 iBook/PowerBook
+ * is in low speed mode.
+ */
+#define UNI_N_AACK_DELAY		0x0100
+#define UNI_N_AACK_DELAY_ENABLE		0x00000001
+
 /* Uninorth 1.5 rev. has additional perf. monitor registers at 0xf00-0xf50 */
 
 
--- diff/include/asm-ppc/unistd.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc/unistd.h	2004-07-01 21:32:50.000000000 +0100
@@ -273,8 +273,14 @@
 #define __NR_mq_notify		266
 #define __NR_mq_getsetattr	267
 #define __NR_kexec_load		268
+#define __NR_perfctr_info	269
+#define __NR_vperfctr_open	(__NR_perfctr_info+1)
+#define __NR_vperfctr_control	(__NR_perfctr_info+2)
+#define __NR_vperfctr_unlink	(__NR_perfctr_info+3)
+#define __NR_vperfctr_iresume	(__NR_perfctr_info+4)
+#define __NR_vperfctr_read	(__NR_perfctr_info+5)
 
-#define __NR_syscalls		269
+#define __NR_syscalls		275
 
 #define __NR(n)	#n
 
--- diff/include/asm-ppc64/bitops.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/bitops.h	2004-07-01 21:32:50.000000000 +0100
@@ -288,15 +288,15 @@
 #define hweight16(x) generic_hweight16(x)
 #define hweight8(x) generic_hweight8(x)
 
-extern unsigned long find_next_zero_bit(unsigned long *addr, unsigned long size, unsigned long offset);
+extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, unsigned long offset);
 #define find_first_zero_bit(addr, size) \
 	find_next_zero_bit((addr), (size), 0)
 
-extern unsigned long find_next_bit(unsigned long *addr, unsigned long size, unsigned long offset);
+extern unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset);
 #define find_first_bit(addr, size) \
 	find_next_bit((addr), (size), 0)
 
-extern unsigned long find_next_zero_le_bit(unsigned long *addr, unsigned long size, unsigned long offset);
+extern unsigned long find_next_zero_le_bit(const unsigned long *addr, unsigned long size, unsigned long offset);
 #define find_first_zero_le_bit(addr, size) \
 	find_next_zero_le_bit((addr), (size), 0)
 
--- diff/include/asm-ppc64/cputable.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/cputable.h	2004-07-01 21:32:50.000000000 +0100
@@ -131,6 +131,7 @@
 #define CPU_FTR_SMT  			0x0000010000000000
 #define CPU_FTR_COHERENT_ICACHE  	0x0000020000000000
 #define CPU_FTR_LOCKLESS_TLBIE		0x0000040000000000
+#define CPU_FTR_MMCRA_SIHV		0x0000080000000000
 
 /* Platform firmware features */
 #define FW_FTR_                         0x0000000000000001
--- diff/include/asm-ppc64/eeh.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/eeh.h	2004-07-01 21:32:50.000000000 +0100
@@ -55,6 +55,7 @@
  * device (including config space i/o).  Call eeh_add_device_late
  * to finish the eeh setup for this device.
  */
+struct device_node;
 void eeh_add_device_early(struct device_node *);
 void eeh_add_device_late(struct pci_dev *);
 
--- diff/include/asm-ppc64/fcntl.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/fcntl.h	2004-07-01 21:32:50.000000000 +0100
@@ -27,6 +27,7 @@
 #define O_NOFOLLOW      0100000	/* don't follow links */
 #define O_LARGEFILE     0200000
 #define O_DIRECT	0400000	/* direct disk access hint */
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-ppc64/hardirq.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/hardirq.h	2004-07-01 21:32:50.000000000 +0100
@@ -82,9 +82,11 @@
 
 #ifdef CONFIG_PREEMPT
 # define in_atomic()	((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
+# define preemptible()	(preempt_count() == 0 && !irqs_disabled())
 # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
 #else
 # define in_atomic()	(preempt_count() != 0)
+# define preemptible()	0
 # define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
 #endif
 #define irq_exit()							\
--- diff/include/asm-ppc64/iSeries/HvTypes.h	2004-05-19 22:12:52.000000000 +0100
+++ source/include/asm-ppc64/iSeries/HvTypes.h	2004-07-01 21:32:50.000000000 +0100
@@ -65,6 +65,10 @@
 
 
 #define HVMAXARCHITECTEDLPS 32
+#define HVMAXARCHITECTEDVIRTUALLANS 16
+#define HVMAXARCHITECTEDVIRTUALDISKS 32
+#define HVMAXARCHITECTEDVIRTUALCDROMS 8
+#define HVMAXARCHITECTEDVIRTUALTAPES 8
 #define HVCHUNKSIZE 256 * 1024
 #define HVPAGESIZE 4 * 1024
 #define HVLPMINMEGSPRIMARY 256
--- diff/include/asm-ppc64/machdep.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/machdep.h	2004-07-01 21:32:50.000000000 +0100
@@ -11,8 +11,11 @@
 
 #include <linux/config.h>
 #include <linux/seq_file.h>
+#include <linux/init.h>
 #include <linux/dma-mapping.h>
 
+#include <asm/setup.h>
+
 struct pt_regs;
 struct pci_bus;	
 struct device_node;
@@ -112,9 +115,7 @@
 };
 
 extern struct machdep_calls ppc_md;
-#define COMMAND_LINE_SIZE 512
 extern char cmd_line[COMMAND_LINE_SIZE];
-extern char saved_command_line[COMMAND_LINE_SIZE];
 
 /* Functions to produce codes on the leds.
  * The SRC code should be unique for the message category and should
--- diff/include/asm-ppc64/paca.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/paca.h	2004-07-01 21:32:50.000000000 +0100
@@ -136,23 +136,21 @@
 	u8  rsvd6[0x500 - 0x8];
 
 /*=====================================================================================
- * CACHE_LINE_31 0x0F00 - 0x0F7F Exception stack
+ * CACHE_LINE_31-32 0x0F00 - 0x0FFF Exception register save areas
  *=====================================================================================
  */
-	u8 exception_stack[N_EXC_STACK*EXC_FRAME_SIZE];
+	u64 exgen[8];		/* used for most interrupts/exceptions */
+	u64 exmc[8];		/* used for machine checks */
+	u64 exslb[8];		/* used for SLB/segment table misses
+				 * on the linear mapping */
+	u64 exdsi[8];		/* used for linear mapping hash table misses */
 
 /*=====================================================================================
- * CACHE_LINE_32 0x0F80 - 0x0FFF Reserved
+ * Page 2 used as a stack when we detect a bad kernel stack pointer,
+ * and early in SMP boots before relocation is enabled.
  *=====================================================================================
  */
-	u8 rsvd7[0x80];                  /* Give the stack some rope ... */
-
-/*=====================================================================================
- * Page 2 Reserved for guard page.  Also used as a stack early in SMP boots before
- *        relocation is enabled.
- *=====================================================================================
- */
-	u8 guard[0x1000];               /* ... and then hang 'em         */ 
+	u8 guard[0x1000];
 };
 
 #endif /* _PPC64_PACA_H */
--- diff/include/asm-ppc64/pgalloc.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/pgalloc.h	2004-07-01 21:32:50.000000000 +0100
@@ -101,33 +101,7 @@
 
 DECLARE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
 
-static inline void __pte_free_tlb(struct mmu_gather *tlb, struct page *ptepage)
-{
-	/* This is safe as we are holding page_table_lock */
-        cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());
-	struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
-
-	if (atomic_read(&tlb->mm->mm_users) < 2 ||
-	    cpus_equal(tlb->mm->cpu_vm_mask, local_cpumask)) {
-		pte_free(ptepage);
-		return;
-	}
-
-	if (*batchp == NULL) {
-		*batchp = (struct pte_freelist_batch *)__get_free_page(GFP_ATOMIC);
-		if (*batchp == NULL) {
-			pte_free_now(ptepage);
-			return;
-		}
-		(*batchp)->index = 0;
-	}
-	(*batchp)->pages[(*batchp)->index++] = ptepage;
-	if ((*batchp)->index == PTE_FREELIST_SIZE) {
-		pte_free_submit(*batchp);
-		*batchp = NULL;
-	}
-}
-
+void __pte_free_tlb(struct mmu_gather *tlb, struct page *ptepage);
 #define __pmd_free_tlb(tlb, pmd)	__pte_free_tlb(tlb, virt_to_page(pmd))
 
 #define check_pgt_cache()	do { } while (0)
--- diff/include/asm-ppc64/ppc_asm.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/ppc_asm.h	2004-07-01 21:32:50.000000000 +0100
@@ -28,6 +28,9 @@
 #define REST_8GPRS(n, base)	REST_4GPRS(n, base); REST_4GPRS(n+4, base)
 #define REST_10GPRS(n, base)	REST_8GPRS(n, base); REST_2GPRS(n+8, base)
 
+#define SAVE_NVGPRS(base)	SAVE_8GPRS(14, base); SAVE_10GPRS(22, base)
+#define REST_NVGPRS(base)	REST_8GPRS(14, base); REST_10GPRS(22, base)
+
 #define SAVE_FPR(n, base)	stfd	n,THREAD_FPR0+8*(n)(base)
 #define SAVE_2FPRS(n, base)	SAVE_FPR(n, base); SAVE_FPR(n+1, base)
 #define SAVE_4FPRS(n, base)	SAVE_2FPRS(n, base); SAVE_2FPRS(n+2, base)
@@ -54,11 +57,6 @@
 #define REST_16VRS(n,b,base)	REST_8VRS(n,b,base); REST_8VRS(n+8,b,base)
 #define REST_32VRS(n,b,base)	REST_16VRS(n,b,base); REST_16VRS(n+16,b,base)
 
-#define CHECKANYINT(ra,rb)			\
-	mfspr	rb,SPRG3;		/* Get Paca address */\
-	ld	ra,PACALPPACA+LPPACAANYINT(rb); /* Get pending interrupt flags */\
-	cmpldi	0,ra,0;
-
 /* Macros to adjust thread priority for Iseries hardware multithreading */
 #define HMT_LOW		or 1,1,1
 #define HMT_MEDIUM	or 2,2,2
--- diff/include/asm-ppc64/processor.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/processor.h	2004-07-01 21:32:50.000000000 +0100
@@ -382,10 +382,10 @@
 #define	PV_ICESTAR	0x0036
 #define	PV_SSTAR	0x0037
 #define	PV_POWER4p	0x0038
-#define PV_GPUL		0x0039
+#define PV_970		0x0039
 #define	PV_POWER5	0x003A
 #define PV_POWER5p	0x003B
-#define PV_GPULp	0x003C
+#define PV_970FX	0x003C
 #define	PV_630        	0x0040
 #define	PV_630p	        0x0041
 
@@ -543,8 +543,7 @@
 	double		fpr[32];	/* Complete floating point set */
 	unsigned long	fpscr;		/* Floating point status (plus pad) */
 	unsigned long	fpexc_mode;	/* Floating-point exception mode */
-	unsigned long	saved_msr;	/* Save MSR across signal handlers */
-	unsigned long	saved_softe;	/* Ditto for Soft Enable/Disable */
+	unsigned long	pad[3];		/* was saved_msr, saved_softe */
 #ifdef CONFIG_ALTIVEC
 	/* Complete AltiVec register set */
 	vector128	vr[32] __attribute((aligned(16)));
--- diff/include/asm-ppc64/prom.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/prom.h	2004-07-01 21:32:50.000000000 +0100
@@ -25,7 +25,7 @@
 #define LONG_MSW(X) (((unsigned long)X) >> 32)
 
 typedef u32 phandle;
-typedef void *ihandle;
+typedef u32 ihandle;
 typedef u32 phandle32;
 typedef u32 ihandle32;
 
--- diff/include/asm-ppc64/ptrace.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/ptrace.h	2004-07-01 21:32:50.000000000 +0100
@@ -71,6 +71,18 @@
 #define instruction_pointer(regs) ((regs)->nip)
 #define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1)
 
+#define force_successful_syscall_return()   \
+		(current_thread_info()->syscall_noerror = 1)
+
+/*
+ * We use the least-significant bit of the trap field to indicate
+ * whether we have saved the full set of registers, or only a
+ * partial set.  A 1 there means the partial set.
+ */
+#define FULL_REGS(regs)		(((regs)->trap & 1) == 0)
+#define TRAP(regs)		((regs)->trap & ~0xF)
+#define CHECK_FULL_REGS(regs)	BUG_ON(regs->trap & 1)
+
 /*
  * Offsets used by 'ptrace' system call interface.
  */
--- diff/include/asm-ppc64/resource.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/resource.h	2004-07-01 21:32:50.000000000 +0100
@@ -21,8 +21,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit(?) */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 #ifdef __KERNEL__
 
@@ -46,6 +48,8 @@
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-ppc64/rtas.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/rtas.h	2004-07-01 21:32:50.000000000 +0100
@@ -37,7 +37,7 @@
  * Where n_in is the number of input parameters and
  *       n_out is the number of output parameters
  *
- * If the "string" is invalid on this system, RTAS_UNKOWN_SERVICE
+ * If the "string" is invalid on this system, RTAS_UNKNOWN_SERVICE
  * will be returned as a token.  rtas_call() does look for this
  * token and error out gracefully so rtas_call(rtas_token("str"), ...)
  * may be safely used for one-shot calls to RTAS.
@@ -168,7 +168,7 @@
 
 extern void enter_rtas(unsigned long);
 extern int rtas_token(const char *service);
-extern long rtas_call(int token, int, int, unsigned long *, ...);
+extern int rtas_call(int token, int, int, int *, ...);
 extern void call_rtas_display_status(char);
 extern void rtas_restart(char *cmd);
 extern void rtas_power_off(void);
--- diff/include/asm-ppc64/setup.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/setup.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,6 +1,6 @@
 #ifndef _PPC_SETUP_H
 #define _PPC_SETUP_H
 
-/* This is a place holder include */
+#define COMMAND_LINE_SIZE 512
 
 #endif /* _PPC_SETUP_H */
--- diff/include/asm-ppc64/smp.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/smp.h	2004-07-01 21:32:50.000000000 +0100
@@ -51,8 +51,6 @@
 extern cpumask_t cpu_available_map;
 
 #define cpu_present_at_boot(cpu) cpu_isset(cpu, cpu_present_at_boot)
-#define cpu_online(cpu)          cpu_isset(cpu, cpu_online_map) 
-#define cpu_possible(cpu)        cpu_isset(cpu, cpu_possible_map) 
 #define cpu_available(cpu)       cpu_isset(cpu, cpu_available_map) 
 
 /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
--- diff/include/asm-ppc64/system.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/system.h	2004-07-01 21:32:50.000000000 +0100
@@ -111,13 +111,22 @@
 extern int _get_PVR(void);
 extern void giveup_fpu(struct task_struct *);
 extern void disable_kernel_fp(void);
+extern void flush_fp_to_thread(struct task_struct *);
 extern void enable_kernel_fp(void);
 extern void giveup_altivec(struct task_struct *);
 extern void disable_kernel_altivec(void);
 extern void enable_kernel_altivec(void);
+extern int emulate_altivec(struct pt_regs *);
 extern void cvt_fd(float *from, double *to, unsigned long *fpscr);
 extern void cvt_df(double *from, float *to, unsigned long *fpscr);
-extern int abs(int);
+
+#ifdef CONFIG_ALTIVEC
+extern void flush_altivec_to_thread(struct task_struct *);
+#else
+static inline void flush_altivec_to_thread(struct task_struct *t)
+{
+}
+#endif
 
 extern struct task_struct *__switch_to(struct task_struct *,
 				       struct task_struct *);
@@ -277,5 +286,14 @@
 				    (unsigned long)_n_, sizeof(*(ptr))); \
   })
 
+/*
+ * We handle most unaligned accesses in hardware. On the other hand 
+ * unaligned DMA can be very expensive on some ppc64 IO chips (it does
+ * powers of 2 writes until it reaches sufficient alignment).
+ *
+ * Based on this we disable the IP header alignment in network drivers.
+ */
+#define NET_IP_ALIGN   0
+
 #endif /* __KERNEL__ */
 #endif
--- diff/include/asm-ppc64/systemcfg.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/systemcfg.h	2004-07-01 21:32:50.000000000 +0100
@@ -73,6 +73,8 @@
 #define PV_SSTAR        0x0037
 #define PV_POWER4p      0x0038
 #define PV_GPUL		0x0039
+#define PV_POWER5	0x003a
+#define PV_970FX	0x003c
 #define PV_630          0x0040
 #define PV_630p         0x0041
 
--- diff/include/asm-ppc64/thread_info.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/thread_info.h	2004-07-01 21:32:50.000000000 +0100
@@ -13,6 +13,7 @@
 #ifndef __ASSEMBLY__
 #include <linux/config.h>
 #include <asm/processor.h>
+#include <asm/page.h>
 #include <linux/stringify.h>
 
 /*
@@ -23,8 +24,10 @@
 	struct exec_domain *exec_domain;	/* execution domain */
 	unsigned long	flags;			/* low level flags */
 	int		cpu;			/* cpu we're on */
-	int		preempt_count;		/* not used at present */
+	int		preempt_count;
 	struct restart_block restart_block;
+	/* set by force_successful_syscall_return */
+	unsigned char	syscall_noerror;
 };
 
 /*
@@ -73,7 +76,7 @@
 static inline struct thread_info *current_thread_info(void)
 {
 	struct thread_info *ti;
-	__asm__("clrrdi %0,1,14" : "=r"(ti));
+	__asm__("clrrdi %0,1,%1" : "=r"(ti) : "i" (THREAD_SHIFT));
 	return ti;
 }
 
--- diff/include/asm-ppc64/udbg.h	2004-05-19 22:12:52.000000000 +0100
+++ source/include/asm-ppc64/udbg.h	2004-07-01 21:32:50.000000000 +0100
@@ -19,11 +19,8 @@
 int udbg_read(char *buf, int buflen);
 struct console;
 void udbg_console_write(struct console *con, const char *s, unsigned int n);
-void udbg_puthex(unsigned long val);
-void udbg_printSP(const char *s);
 void udbg_printf(const char *fmt, ...);
 void udbg_ppcdbg(unsigned long flags, const char *fmt, ...);
 unsigned long udbg_ifdebug(unsigned long flags);
 
-void udbg_init_uart(void *comport);
 #endif
--- diff/include/asm-ppc64/vio.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-ppc64/vio.h	2004-07-01 21:32:50.000000000 +0100
@@ -14,6 +14,7 @@
 #ifndef _ASM_VIO_H
 #define _ASM_VIO_H
 
+#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/device.h>
@@ -44,7 +45,10 @@
 int vio_register_driver(struct vio_driver *drv);
 void vio_unregister_driver(struct vio_driver *drv);
 
-struct vio_dev * __devinit vio_register_device(struct device_node *node_vdev);
+#ifdef CONFIG_PPC_PSERIES
+struct vio_dev * __devinit vio_register_device_node(
+		struct device_node *node_vdev);
+#endif
 void __devinit vio_unregister_device(struct vio_dev *dev);
 struct vio_dev *vio_find_node(struct device_node *vnode);
 
@@ -108,6 +112,8 @@
  */
 struct vio_dev {
 	struct iommu_table *iommu_table;     /* vio_map_* uses this */
+	char *name;
+	char *type;
 	uint32_t unit_address;	
 	unsigned int irq;
 
--- diff/include/asm-s390/byteorder.h	2004-05-19 22:12:52.000000000 +0100
+++ source/include/asm-s390/byteorder.h	2004-07-01 21:32:50.000000000 +0100
@@ -14,7 +14,7 @@
 #ifdef __GNUC__
 
 #ifdef __s390x__
-static __inline__ __u64 ___arch__swab64p(__u64 *x)
+static __inline__ __u64 ___arch__swab64p(const __u64 *x)
 {
 	__u64 result;
 
@@ -40,7 +40,7 @@
 }
 #endif /* __s390x__ */
 
-static __inline__ __u32 ___arch__swab32p(__u32 *x)
+static __inline__ __u32 ___arch__swab32p(const __u32 *x)
 {
 	__u32 result;
 	
@@ -77,7 +77,7 @@
 	*x = ___arch__swab32p(x);
 }
 
-static __inline__ __u16 ___arch__swab16p(__u16 *x)
+static __inline__ __u16 ___arch__swab16p(const __u16 *x)
 {
 	__u16 result;
 	
--- diff/include/asm-s390/fcntl.h	2004-05-19 22:12:52.000000000 +0100
+++ source/include/asm-s390/fcntl.h	2004-07-01 21:32:50.000000000 +0100
@@ -27,6 +27,7 @@
 #define O_LARGEFILE	0100000
 #define O_DIRECTORY	0200000	/* must be a directory */
 #define O_NOFOLLOW	0400000 /* don't follow links */
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-s390/pgtable.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-s390/pgtable.h	2004-07-01 21:32:50.000000000 +0100
@@ -654,9 +654,11 @@
 	__pte;                                                            \
 })
 
-#define arch_set_page_uptodate(__page)					  \
+#define SetPageUptodate(_page) \
 	do {								  \
-		asm volatile ("sske %0,%1" : : "d" (0),			  \
+		struct page *__page = (_page);				  \
+		if (!test_and_set_bit(PG_uptodate, &__page->flags))	  \
+			asm volatile ("sske %0,%1" : : "d" (0),		  \
 			      "a" (__pa((__page-mem_map) << PAGE_SHIFT)));\
 	} while (0)
 
--- diff/include/asm-s390/resource.h	2004-05-19 22:12:52.000000000 +0100
+++ source/include/asm-s390/resource.h	2004-07-01 21:32:50.000000000 +0100
@@ -24,8 +24,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
-  
-#define RLIM_NLIMITS	11
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
+
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -48,6 +50,8 @@
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-s390/smp.h	2004-05-19 22:12:52.000000000 +0100
+++ source/include/asm-s390/smp.h	2004-07-01 21:32:50.000000000 +0100
@@ -31,10 +31,6 @@
 
 extern int smp_call_function_on(void (*func) (void *info), void *info,
 				int nonatomic, int wait, int cpu);
-
-extern cpumask_t cpu_online_map;
-extern cpumask_t cpu_possible_map;
-
 #define NO_PROC_ID		0xFF		/* No processor magic marker */
 
 /*
@@ -51,8 +47,6 @@
 
 #define smp_processor_id() (S390_lowcore.cpu_data.cpu_nr)
 
-#define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
-
 extern __inline__ __u16 hard_smp_processor_id(void)
 {
         __u16 cpu_address;
--- diff/include/asm-sh/bugs.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/bugs.h	2004-07-01 21:32:50.000000000 +0100
@@ -26,7 +26,7 @@
 	case CPU_SH7604:
 		*p++ = '2';
 		break;
-	case CPU_SH7708 ... CPU_SH7729:
+	case CPU_SH7705 ... CPU_SH7300:
 		*p++ = '3';
 		break;
 	case CPU_SH7750 ... CPU_ST40GX1:
--- diff/include/asm-sh/cache.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/cache.h	2004-07-01 21:32:50.000000000 +0100
@@ -28,7 +28,8 @@
 	unsigned int sets;
 	unsigned int linesz;
 
-	unsigned int way_shift;
+	unsigned int way_incr;
+
 	unsigned int entry_shift;
 	unsigned int entry_mask;
 
--- diff/include/asm-sh/checksum.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/checksum.h	2004-07-01 21:32:50.000000000 +0100
@@ -201,8 +201,10 @@
  *	Copy and checksum to user
  */
 #define HAVE_CSUM_COPY_USER
-static __inline__ unsigned int csum_and_copy_to_user (const char *src, char *dst,
-				    int len, int sum, int *err_ptr)
+static __inline__ unsigned int csum_and_copy_to_user (const char *src, 
+						      char __user *dst,
+						      int len, int sum,
+						      int *err_ptr)
 {
 	if (access_ok(VERIFY_WRITE, dst, len))
 		return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr);
--- diff/include/asm-sh/cpu-sh3/dac.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/cpu-sh3/dac.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,5 +1,5 @@
-#ifndef __ASM_SH_DAC_H
-#define __ASM_SH_DAC_H
+#ifndef __ASM_CPU_SH3_DAC_H
+#define __ASM_CPU_SH3_DAC_H
 
 /*
  * Copyright (C) 2003  Andriy Skulysh
@@ -38,5 +38,4 @@
 	else ctrl_outb(value,DADR0);
 }
 
-#endif /* __ASM_SH_DAC_H */
-
+#endif /* __ASM_CPU_SH3_DAC_H */
--- diff/include/asm-sh/cpu-sh4/dma.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/cpu-sh4/dma.h	2004-07-01 21:32:50.000000000 +0100
@@ -3,5 +3,15 @@
 
 #define SH_DMAC_BASE	0xffa00000
 
+#define SAR	((unsigned long[]){SH_DMAC_BASE + 0x00, SH_DMAC_BASE + 0x10, \
+				   SH_DMAC_BASE + 0x20, SH_DMAC_BASE + 0x30})
+#define DAR	((unsigned long[]){SH_DMAC_BASE + 0x04, SH_DMAC_BASE + 0x14, \
+				   SH_DMAC_BASE + 0x24, SH_DMAC_BASE + 0x34})
+#define DMATCR	((unsigned long[]){SH_DMAC_BASE + 0x08, SH_DMAC_BASE + 0x18, \
+				   SH_DMAC_BASE + 0x28, SH_DMAC_BASE + 0x38})
+#define CHCR	((unsigned long[]){SH_DMAC_BASE + 0x0c, SH_DMAC_BASE + 0x1c, \
+				   SH_DMAC_BASE + 0x2c, SH_DMAC_BASE + 0x3c})
+#define DMAOR	(SH_DMAC_BASE + 0x40)
+
 #endif /* __ASM_CPU_SH4_DMA_H */
 
--- diff/include/asm-sh/dma-mapping.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/dma-mapping.h	2004-07-01 21:32:50.000000000 +0100
@@ -44,6 +44,8 @@
 	if (dev && dev->bus == &pci_bus_type)
 		return __pci_alloc_consistent(NULL, size, dma_handle);
 #endif
+	if (sh_mv.mv_consistent_alloc)
+		return sh_mv.mv_consistent_alloc(dev, size, dma_handle, flag);
 
 	return consistent_alloc(flag, size, dma_handle);
 }
@@ -61,6 +63,11 @@
 	}
 #endif
 
+	if (sh_mv.mv_consistent_free) {
+		sh_mv.mv_consistent_free(dev, size, vaddr, dma_handle);
+		return;
+	}
+
 	consistent_free(vaddr, size);
 }
 
@@ -152,6 +159,26 @@
 	}
 }
 
+static inline void dma_sync_single_for_cpu(struct device *dev,
+					   dma_addr_t dma_handle, size_t size,
+					   enum dma_data_direction dir)
+	__attribute__ ((alias("dma_sync_single")));
+
+static inline void dma_sync_single_for_device(struct device *dev,
+					   dma_addr_t dma_handle, size_t size,
+					   enum dma_data_direction dir)
+	__attribute__ ((alias("dma_sync_single")));
+
+static inline void dma_sync_sg_for_cpu(struct device *dev,
+				       struct scatterlist *sg, int nelems,
+				       enum dma_data_direction dir)
+	__attribute__ ((alias("dma_sync_sg")));
+
+static inline void dma_sync_sg_for_device(struct device *dev,
+				       struct scatterlist *sg, int nelems,
+				       enum dma_data_direction dir)
+	__attribute__ ((alias("dma_sync_sg")));
+
 static inline int dma_get_cache_alignment(void)
 {
 	/*
@@ -161,5 +188,10 @@
 	return L1_CACHE_BYTES;
 }
 
+static inline int dma_mapping_error(dma_addr_t dma_addr)
+{
+	return dma_addr == 0;
+}
+
 #endif /* __ASM_SH_DMA_MAPPING_H */
 
--- diff/include/asm-sh/dma.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/dma.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  * include/asm-sh/dma.h
  *
- * Copyright (C) 2003  Paul Mundt
+ * Copyright (C) 2003, 2004  Paul Mundt
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
@@ -13,6 +13,7 @@
 #include <linux/config.h>
 #include <linux/spinlock.h>
 #include <linux/wait.h>
+#include <linux/sysdev.h>
 #include <asm/cpu/dma.h>
 #include <asm/semaphore.h>
 
@@ -29,7 +30,7 @@
 #  define MAX_DMA_CHANNELS	(CONFIG_NR_ONCHIP_DMA_CHANNELS)
 #endif
 
-/* 
+/*
  * Read and write modes can mean drastically different things depending on the
  * channel configuration. Consult your DMAC documentation and module
  * implementation for further clues.
@@ -38,40 +39,69 @@
 #define DMA_MODE_WRITE		0x01
 #define DMA_MODE_MASK		0x01
 
+#define DMA_AUTOINIT		0x10
+
+/*
+ * DMAC (dma_info) flags
+ */
+enum {
+	DMAC_CHANNELS_CONFIGURED	= 0x00,
+	DMAC_CHANNELS_TEI_CAPABLE	= 0x01,
+};
+
+/*
+ * DMA channel capabilities / flags
+ */
+enum {
+	DMA_CONFIGURED			= 0x00,
+	DMA_TEI_CAPABLE			= 0x01,
+};
+
 extern spinlock_t dma_spin_lock;
 
-struct dma_info;
+struct dma_channel;
 
 struct dma_ops {
-	const char *name;
-
-	int (*request)(struct dma_info *info);
-	void (*free)(struct dma_info *info);
+	int (*request)(struct dma_channel *chan);
+	void (*free)(struct dma_channel *chan);
 
-	int (*get_residue)(struct dma_info *info);
-	int (*xfer)(struct dma_info *info);
-	void (*configure)(struct dma_info *info, unsigned long flags);
+	int (*get_residue)(struct dma_channel *chan);
+	int (*xfer)(struct dma_channel *chan);
+	void (*configure)(struct dma_channel *chan, unsigned long flags);
 };
 
-struct dma_info {
-	const char *dev_id;
+struct dma_channel {
+	char dev_id[16];
 
 	unsigned int chan;
 	unsigned int mode;
 	unsigned int count;
-	
+
 	unsigned long sar;
 	unsigned long dar;
 
-	unsigned int configured:1;
-	unsigned int tei_capable:1;
+	unsigned long flags;
 	atomic_t busy;
 
 	struct semaphore sem;
 	wait_queue_head_t wait_queue;
+
+	struct sys_device dev;
+};
+
+struct dma_info {
+	const char *name;
+	unsigned int nr_channels;
+	unsigned long flags;
+
 	struct dma_ops *ops;
+	struct dma_channel *channels;
+
+	struct list_head list;
 };
 
+#define to_dma_channel(channel) container_of(channel, struct dma_channel, dev)
+
 /* arch/sh/drivers/dma/dma-api.c */
 extern int dma_xfer(unsigned int chan, unsigned long from,
 		    unsigned long to, size_t size, unsigned int mode);
@@ -90,17 +120,22 @@
 extern void free_dma(unsigned int chan);
 extern int get_dma_residue(unsigned int chan);
 extern struct dma_info *get_dma_info(unsigned int chan);
+extern struct dma_channel *get_dma_channel(unsigned int chan);
 extern void dma_wait_for_completion(unsigned int chan);
 extern void dma_configure_channel(unsigned int chan, unsigned long flags);
 
-extern int register_dmac(struct dma_ops *ops);
+extern int register_dmac(struct dma_info *info);
+extern void unregister_dmac(struct dma_info *info);
 
-extern struct dma_info dma_info[];
+#ifdef CONFIG_SYSFS
+/* arch/sh/drivers/dma/dma-sysfs.c */
+extern int dma_create_sysfs_files(struct dma_channel *);
+#endif
 
 #ifdef CONFIG_PCI
 extern int isa_dma_bridge_buggy;
 #else
-#define isa_dma_bridge_buggy 	(0)
+#define isa_dma_bridge_buggy	(0)
 #endif
 
 #endif /* __ASM_SH_DMA_H */
--- diff/include/asm-sh/fcntl.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/fcntl.h	2004-07-01 21:32:50.000000000 +0100
@@ -20,6 +20,7 @@
 #define O_LARGEFILE	0100000
 #define O_DIRECTORY	0200000	/* must be a directory */
 #define O_NOFOLLOW	0400000 /* don't follow links */
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-sh/hp6xx/hp6xx.h	2004-05-19 22:12:54.000000000 +0100
+++ source/include/asm-sh/hp6xx/hp6xx.h	2004-07-01 21:32:50.000000000 +0100
@@ -5,9 +5,22 @@
  * Copyright (C) 2003  Andriy Skulysh
  */
 
+#define HP680_TS_IRQ IRQ3_IRQ
 
-#define DAC_LCD_BRIGHTNESS		0
-#define DAC_SPEAKER_VOLUME		1
+#define DAC_LCD_BRIGHTNESS	0
+#define DAC_SPEAKER_VOLUME	1
+
+#define PHDR_TS_PEN_DOWN	0x08
+
+#define SCPDR_TS_SCAN_ENABLE	0x20
+#define SCPDR_TS_SCAN_Y		0x02
+#define SCPDR_TS_SCAN_X		0x01
+
+#define SCPCR_TS_ENABLE		0x405
+#define SCPCR_TS_MASK		0xc0f
+
+#define ADC_CHANNEL_TS_Y	1
+#define ADC_CHANNEL_TS_X	2
 
 #define HD64461_GPADR_SPEAKER	0x01
 #define HD64461_GPADR_PCMCIA0	(0x02|0x08)
@@ -16,4 +29,3 @@
 
 
 #endif /* __ASM_SH_HP6XX_H */
-
--- diff/include/asm-sh/ide.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-sh/ide.h	2004-07-01 21:32:50.000000000 +0100
@@ -15,73 +15,12 @@
 #ifdef __KERNEL__
 
 #include <linux/config.h>
-#include <asm/machvec.h>
 
 #ifndef MAX_HWIFS
-/* Should never have less than 2, ide-pci.c(ide_match_hwif) requires it */
-#define MAX_HWIFS	2
+#define MAX_HWIFS	CONFIG_IDE_MAX_HWIFS
 #endif
 
-#define IDE_ARCH_OBSOLETE_DEFAULTS
-
-static inline int ide_default_irq_hp600(unsigned long base)
-{
-	switch (base) {
-		case 0x01f0: return 93;
-		case 0x0170: return 94;
-		default:
-			return 0;
-	}
-}
-
-static inline int ide_default_irq(unsigned long base)
-{
-	if (MACH_HP600) {
-		return ide_default_irq_hp600(base);
-	}
-	switch (base) {
-		case 0x01f0: return 14;
-		case 0x0170: return 15;
-		default:
-			return 0;
-	}
-}
-
-static inline unsigned long ide_default_io_base_hp600(int index)
-{
-	switch (index) {
-		case 0:	
-			return 0x01f0;
-		case 1:	
-			return 0x0170;
-		default:
-			return 0;
-	}
-}
-
-static inline unsigned long ide_default_io_base(int index)
-{
-	if (MACH_HP600) {
-		return ide_default_io_base_hp600(index);
-	}
-	switch (index) {
-		case 0:	
-			return 0x1f0;
-		case 1:	
-			return 0x170;
-		default:
-			return 0;
-	}
-}
-
-#define IDE_ARCH_OBSOLETE_INIT
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
-#ifdef CONFIG_PCI
-#define ide_init_default_irq(base)	(0)
-#else
-#define ide_init_default_irq(base)	ide_default_irq(base)
-#endif
+#define ide_default_io_ctl(base)	(0)
 
 #include <asm-generic/ide_iops.h>
 
--- diff/include/asm-sh/irq.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/irq.h	2004-07-01 21:32:50.000000000 +0100
@@ -15,9 +15,15 @@
 #include <asm/machvec.h>
 #include <asm/ptrace.h>		/* for pt_regs */
 
+#if defined(CONFIG_SH_HP600) || \
+    defined(CONFIG_SH_RTS7751R2D) || \
+    defined(CONFIG_SH_HS7751RVOIP)
+#include <asm/mach/ide.h>
+#endif
+
 #if defined(CONFIG_CPU_SH3)
-#define INTC_IPRA  	0xfffffee2UL
-#define INTC_IPRB  	0xfffffee4UL
+#define INTC_IPRA	0xfffffee2UL
+#define INTC_IPRB	0xfffffee4UL
 #elif defined(CONFIG_CPU_SH4)
 #define INTC_IPRA	0xffd00004UL
 #define INTC_IPRB	0xffd00008UL
@@ -25,6 +31,15 @@
 #define INTC_IPRD	0xffd00010UL
 #endif
 
+#ifdef CONFIG_IDE
+# ifndef IRQ_CFCARD
+#  define IRQ_CFCARD	14
+# endif
+# ifndef IRQ_PCMCIA
+#  define IRQ_PCMCIA	15
+# endif
+#endif
+
 #define TIMER_IRQ	16
 #define TIMER_IPR_ADDR	INTC_IPRA
 #define TIMER_IPR_POS	 3
@@ -48,6 +63,111 @@
 #define DMA_IPR_ADDR	INTC_IPRE
 #define DMA_IPR_POS	3
 #define DMA_PRIORITY	7
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+/* TMU2 */
+#define TIMER2_IRQ      18
+#define TIMER2_IPR_ADDR INTC_IPRA
+#define TIMER2_IPR_POS   1
+#define TIMER2_PRIORITY  2
+
+/* WDT */
+#define WDT_IRQ		27
+#define WDT_IPR_ADDR	INTC_IPRB
+#define WDT_IPR_POS	 3
+#define WDT_PRIORITY	 2
+
+/* SIM (SIM Card Module) */
+#define SIM_ERI_IRQ	23
+#define SIM_RXI_IRQ	24
+#define SIM_TXI_IRQ	25
+#define SIM_TEND_IRQ	26
+#define SIM_IPR_ADDR	INTC_IPRB
+#define SIM_IPR_POS	 1
+#define SIM_PRIORITY	 2
+
+/* VIO (Video I/O) */
+#define VIO_IRQ		52
+#define VIO_IPR_ADDR	INTC_IPRE
+#define VIO_IPR_POS	 2
+#define VIO_PRIORITY	 2
+
+/* MFI (Multi Functional Interface) */
+#define MFI_IRQ		56
+#define MFI_IPR_ADDR	INTC_IPRE
+#define MFI_IPR_POS	 1
+#define MFI_PRIORITY	 2
+
+/* VPU (Video Processing Unit) */
+#define VPU_IRQ		60
+#define VPU_IPR_ADDR	INTC_IPRE
+#define VPU_IPR_POS	 0
+#define VPU_PRIORITY	 2
+
+/* KEY (Key Scan Interface) */
+#define KEY_IRQ		79
+#define KEY_IPR_ADDR	INTC_IPRF
+#define KEY_IPR_POS	 3
+#define KEY_PRIORITY	 2
+
+/* CMT (Compare Match Timer) */
+#define CMT_IRQ		104
+#define CMT_IPR_ADDR	INTC_IPRF
+#define CMT_IPR_POS	 0
+#define CMT_PRIORITY	 2
+
+/* DMAC(1) */
+#define DMTE0_IRQ	48
+#define DMTE1_IRQ	49
+#define DMTE2_IRQ	50
+#define DMTE3_IRQ	51
+#define DMA1_IPR_ADDR	INTC_IPRE
+#define DMA1_IPR_POS	3
+#define DMA1_PRIORITY	7
+
+/* DMAC(2) */
+#define DMTE4_IRQ	76
+#define DMTE5_IRQ	77
+#define DMA2_IPR_ADDR	INTC_IPRF
+#define DMA2_IPR_POS	2
+#define DMA2_PRIORITY	7
+
+/* SIOF0 */
+#define SIOF0_IRQ	84
+#define SIOF0_IPR_ADDR	INTC_IPRH
+#define SIOF0_IPR_POS	3
+#define SIOF0_PRIORITY	3
+
+/* FLCTL (Flash Memory Controller) */
+#define FLSTE_IRQ	92
+#define FLTEND_IRQ	93
+#define FLTRQ0_IRQ	94
+#define FLTRQ1_IRQ	95
+#define FLCTL_IPR_ADDR	INTC_IPRH
+#define FLCTL_IPR_POS	1
+#define FLCTL_PRIORITY	3
+
+/* IIC (IIC Bus Interface) */
+#define IIC_ALI_IRQ	96
+#define IIC_TACKI_IRQ	97
+#define IIC_WAITI_IRQ	98
+#define IIC_DTEI_IRQ	99
+#define IIC_IPR_ADDR	INTC_IPRH
+#define IIC_IPR_POS	0
+#define IIC_PRIORITY	3
+
+/* SIO0 */
+#define SIO0_IRQ	88
+#define SIO0_IPR_ADDR	INTC_IPRI
+#define SIO0_IPR_POS	3
+#define SIO0_PRIORITY	3
+
+/* SIU (Sound Interface Unit) */
+#define SIU_IRQ		108
+#define SIU_IPR_ADDR	INTC_IPRJ
+#define SIU_IPR_POS	1
+#define SIU_PRIORITY	3
+
+#endif
 #elif defined(CONFIG_CPU_SH4)
 #define DMTE0_IRQ	34
 #define DMTE1_IRQ	35
@@ -74,7 +194,14 @@
 #define SCI_PRIORITY	3
 #endif
 
-#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+#define SCIF0_IRQ	80
+#define SCIF0_IPR_ADDR	INTC_IPRG
+#define SCIF0_IPR_POS	3
+#define SCIF0_PRIORITY	3
+#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \
+      defined(CONFIG_CPU_SUBTYPE_SH7707) || \
+      defined(CONFIG_CPU_SUBTYPE_SH7709)
 #define SCIF_ERI_IRQ	56
 #define SCIF_RXI_IRQ	57
 #define SCIF_BRI_IRQ	58
@@ -127,7 +254,8 @@
 #  define PINT_NR_IRQS   16
 # elif defined(CONFIG_CPU_SUBTYPE_SH7708)
 #  define ONCHIP_NR_IRQS 32
-# elif defined(CONFIG_CPU_SUBTYPE_SH7709)
+# elif defined(CONFIG_CPU_SUBTYPE_SH7709) || \
+       defined(CONFIG_CPU_SUBTYPE_SH7705)
 #  define ONCHIP_NR_IRQS 64	// Actually 61
 #  define PINT_NR_IRQS   16
 # elif defined(CONFIG_CPU_SUBTYPE_SH7750)
@@ -138,6 +266,8 @@
 #  define ONCHIP_NR_IRQS 110
 # elif defined(CONFIG_CPU_SUBTYPE_ST40STB1)
 #  define ONCHIP_NR_IRQS 144
+# elif defined(CONFIG_CPU_SUBTYPE_SH7300)
+#  define ONCHIP_NR_IRQS 109
 # endif
 #endif
 
@@ -207,7 +337,121 @@
 			 int pos,  int priority);
 extern void make_imask_irq(unsigned int irq);
 
-#if defined(CONFIG_CPU_SUBTYPE_SH7604)
+#if defined(CONFIG_CPU_SUBTYPE_SH7300)
+#undef INTC_IPRA
+#undef INTC_IPRB
+#define INTC_IPRA  	0xA414FEE2UL
+#define INTC_IPRB  	0xA414FEE4UL
+#define INTC_IPRC  	0xA4140016UL
+#define INTC_IPRD  	0xA4140018UL
+#define INTC_IPRE  	0xA414001AUL
+#define INTC_IPRF  	0xA4080000UL
+#define INTC_IPRG  	0xA4080002UL
+#define INTC_IPRH  	0xA4080004UL
+#define INTC_IPRI  	0xA4080006UL
+#define INTC_IPRJ  	0xA4080008UL
+
+#define INTC_IMR0	0xA4080040UL
+#define INTC_IMR1	0xA4080042UL
+#define INTC_IMR2	0xA4080044UL
+#define INTC_IMR3	0xA4080046UL
+#define INTC_IMR4	0xA4080048UL
+#define INTC_IMR5	0xA408004AUL
+#define INTC_IMR6	0xA408004CUL
+#define INTC_IMR7	0xA408004EUL
+#define INTC_IMR8	0xA4080050UL
+#define INTC_IMR9	0xA4080052UL
+#define INTC_IMR10	0xA4080054UL
+
+#define INTC_IMCR0	0xA4080060UL
+#define INTC_IMCR1	0xA4080062UL
+#define INTC_IMCR2	0xA4080064UL
+#define INTC_IMCR3	0xA4080066UL
+#define INTC_IMCR4	0xA4080068UL
+#define INTC_IMCR5	0xA408006AUL
+#define INTC_IMCR6	0xA408006CUL
+#define INTC_IMCR7	0xA408006EUL
+#define INTC_IMCR8	0xA4080070UL
+#define INTC_IMCR9	0xA4080072UL
+#define INTC_IMCR10	0xA4080074UL
+
+#define INTC_ICR0	0xA414FEE0UL
+#define INTC_ICR1	0xA4140010UL
+
+#define INTC_IRR0	0xA4140004UL
+
+#define PORT_PACR	0xA4050100UL
+#define PORT_PBCR	0xA4050102UL
+#define PORT_PCCR	0xA4050104UL
+#define PORT_PDCR	0xA4050106UL
+#define PORT_PECR	0xA4050108UL
+#define PORT_PFCR	0xA405010AUL
+#define PORT_PGCR	0xA405010CUL
+#define PORT_PHCR	0xA405010EUL
+#define PORT_PJCR	0xA4050110UL
+#define PORT_PKCR	0xA4050112UL
+#define PORT_PLCR	0xA4050114UL
+#define PORT_SCPCR	0xA4050116UL
+#define PORT_PMCR	0xA4050118UL
+#define PORT_PNCR	0xA405011AUL
+#define PORT_PQCR	0xA405011CUL
+
+#define PORT_PSELA	0xA4050140UL
+#define PORT_PSELB	0xA4050142UL
+#define PORT_PSELC	0xA4050144UL
+
+#define PORT_HIZCRA	0xA4050146UL
+#define PORT_HIZCRB	0xA4050148UL
+#define PORT_DRVCR	0xA4050150UL
+
+#define PORT_PADR  	0xA4050120UL
+#define PORT_PBDR  	0xA4050122UL
+#define PORT_PCDR  	0xA4050124UL
+#define PORT_PDDR  	0xA4050126UL
+#define PORT_PEDR  	0xA4050128UL
+#define PORT_PFDR  	0xA405012AUL
+#define PORT_PGDR  	0xA405012CUL
+#define PORT_PHDR  	0xA405012EUL
+#define PORT_PJDR  	0xA4050130UL
+#define PORT_PKDR  	0xA4050132UL
+#define PORT_PLDR  	0xA4050134UL
+#define PORT_SCPDR  	0xA4050136UL
+#define PORT_PMDR  	0xA4050138UL
+#define PORT_PNDR  	0xA405013AUL
+#define PORT_PQDR  	0xA405013CUL
+
+#define IRQ0_IRQ	32
+#define IRQ1_IRQ	33
+#define IRQ2_IRQ	34
+#define IRQ3_IRQ	35
+#define IRQ4_IRQ	36
+#define IRQ5_IRQ	37
+
+#define IRQ0_IPR_ADDR	INTC_IPRC
+#define IRQ1_IPR_ADDR	INTC_IPRC
+#define IRQ2_IPR_ADDR	INTC_IPRC
+#define IRQ3_IPR_ADDR	INTC_IPRC
+#define IRQ4_IPR_ADDR	INTC_IPRD
+#define IRQ5_IPR_ADDR	INTC_IPRD
+
+#define IRQ0_IPR_POS	0
+#define IRQ1_IPR_POS	1
+#define IRQ2_IPR_POS	2
+#define IRQ3_IPR_POS	3
+#define IRQ4_IPR_POS	0
+#define IRQ5_IPR_POS	1
+
+#define IRQ0_PRIORITY	1
+#define IRQ1_PRIORITY	1
+#define IRQ2_PRIORITY	1
+#define IRQ3_PRIORITY	1
+#define IRQ4_PRIORITY	1
+#define IRQ5_PRIORITY	1
+
+extern int ipr_irq_demux(int irq);
+#define __irq_demux(irq) ipr_irq_demux(irq)
+
+#elif defined(CONFIG_CPU_SUBTYPE_SH7604)
 #define INTC_IPRA	0xfffffee2UL
 #define INTC_IPRB	0xfffffe60UL
 
@@ -222,21 +466,27 @@
 #define INTC_VCRDMA1	0xffffffa8UL
 
 #define INTC_ICR	0xfffffee0UL
-#elif defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \
+      defined(CONFIG_CPU_SUBTYPE_SH7707) || \
+      defined(CONFIG_CPU_SUBTYPE_SH7709)
 #define INTC_IRR0	0xa4000004UL
 #define INTC_IRR1	0xa4000006UL
 #define INTC_IRR2	0xa4000008UL
 
-#define INTC_ICR0  	0xfffffee0UL
-#define INTC_ICR1  	0xa4000010UL
-#define INTC_ICR2  	0xa4000012UL
-#define INTC_INTER 	0xa4000014UL
-
-#define INTC_IPRC  	0xa4000016UL
-#define INTC_IPRD  	0xa4000018UL
-#define INTC_IPRE  	0xa400001aUL
+#define INTC_ICR0	0xfffffee0UL
+#define INTC_ICR1	0xa4000010UL
+#define INTC_ICR2	0xa4000012UL
+#define INTC_INTER	0xa4000014UL
+
+#define INTC_IPRC	0xa4000016UL
+#define INTC_IPRD	0xa4000018UL
+#define INTC_IPRE	0xa400001aUL
 #if defined(CONFIG_CPU_SUBTYPE_SH7707)
 #define INTC_IPRF	0xa400001cUL
+#elif defined(CONFIG_CPU_SUBTYPE_SH7705)
+#define INTC_IPRF	0xa4080000UL
+#define INTC_IPRG	0xa4080002UL
+#define INTC_IPRH	0xa4080004UL
 #endif
 
 #define PORT_PACR	0xa4000100UL
@@ -307,20 +557,20 @@
 #ifdef CONFIG_CPU_SUBTYPE_ST40STB1
 #define INTC2_FIRST_IRQ 64
 #define NR_INTC2_IRQS 25
- 
+
 #define INTC2_BASE0 0xfe080000
 #define INTC2_INTC2MODE  (INTC2_BASE0+0x80)
- 
+
 #define INTC2_INTPRI_OFFSET	0x00
 #define INTC2_INTREQ_OFFSET	0x20
 #define INTC2_INTMSK_OFFSET	0x40
 #define INTC2_INTMSKCLR_OFFSET	0x60
- 
+
 extern void make_intc2_irq(unsigned int irq,unsigned int addr,
                            unsigned int group,int pos,int priority);
- 
-#endif                                                                        
-       
+
+#endif
+
 static inline int generic_irq_demux(int irq)
 {
 	return irq;
--- diff/include/asm-sh/machvec.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/machvec.h	2004-07-01 21:32:50.000000000 +0100
@@ -17,6 +17,7 @@
 #include <asm/machtypes.h>
 #include <asm/machvec_init.h>
 
+struct device;
 struct timeval;
 
 struct sh_machine_vector
@@ -62,6 +63,9 @@
 	void (*mv_init_pci)(void);
 
 	void (*mv_heartbeat)(void);
+
+	void *(*mv_consistent_alloc)(struct device *, size_t, dma_addr_t *, int);
+	void (*mv_consistent_free)(struct device *, size_t, void *, dma_addr_t);
 };
 
 extern struct sh_machine_vector sh_mv;
--- diff/include/asm-sh/pgalloc.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/pgalloc.h	2004-07-01 21:32:50.000000000 +0100
@@ -84,71 +84,10 @@
 #define pmd_free(x)			do { } while (0)
 #define __pmd_free_tlb(tlb,x)		do { } while (0)
 #define pgd_populate(mm, pmd, pte)	BUG()
+#define check_pgt_cache()		do { } while (0)
 
-#if defined(CONFIG_CPU_SH4)
-#define PG_mapped	PG_arch_1
-
-/*
- * For SH-4, we have our own implementation for ptep_get_and_clear
- */
-static inline pte_t ptep_get_and_clear(pte_t *ptep)
-{
-	pte_t pte = *ptep;
-
-	pte_clear(ptep);
-	if (!pte_not_present(pte)) {
-		unsigned long pfn = pte_pfn(pte);
-		if (pfn_valid(pfn)) {
-			struct page *page = pfn_to_page(pfn);
-			struct address_space *mapping = page_mapping(page);
-			if (!mapping || !mapping_writably_mapped(mapping))
-				__clear_bit(PG_mapped, &page->flags);
-		}
-	}
-	return pte;
-}
-#else
-static inline pte_t ptep_get_and_clear(pte_t *ptep)
-{
-	pte_t pte = *ptep;
-	pte_clear(ptep);
-	return pte;
-}
+#ifdef CONFIG_CPU_SH4
+#define PG_mapped			PG_arch_1
 #endif
 
-/*
- * Following functions are same as generic ones.
- */
-static inline int ptep_test_and_clear_young(pte_t *ptep)
-{
-	pte_t pte = *ptep;
-	if (!pte_young(pte))
-		return 0;
-	set_pte(ptep, pte_mkold(pte));
-	return 1;
-}
-
-static inline int ptep_test_and_clear_dirty(pte_t *ptep)
-{
-	pte_t pte = *ptep;
-	if (!pte_dirty(pte))
-		return 0;
-	set_pte(ptep, pte_mkclean(pte));
-	return 1;
-}
-
-static inline void ptep_set_wrprotect(pte_t *ptep)
-{
-	pte_t old_pte = *ptep;
-	set_pte(ptep, pte_wrprotect(old_pte));
-}
-
-static inline void ptep_mkdirty(pte_t *ptep)
-{
-	pte_t old_pte = *ptep;
-	set_pte(ptep, pte_mkdirty(old_pte));
-}
-
-#define check_pgt_cache()	do { } while (0)
-
 #endif /* __ASM_SH_PGALLOC_H */
--- diff/include/asm-sh/pgtable.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-sh/pgtable.h	2004-07-01 21:32:50.000000000 +0100
@@ -3,7 +3,7 @@
 
 /*
  * Copyright (C) 1999 Niibe Yutaka
- * Copyright (C) 2002, 2003 Paul Mundt
+ * Copyright (C) 2002, 2003, 2004 Paul Mundt
  */
 
 #include <linux/config.h>
@@ -16,6 +16,7 @@
 #ifndef __ASSEMBLY__
 #include <asm/processor.h>
 #include <asm/addrspace.h>
+#include <asm/fixmap.h>
 #include <linux/threads.h>
 
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
@@ -51,7 +52,7 @@
  * Currently only 4-enty (16kB) is used (see arch/sh/mm/cache.c)
  */
 #define VMALLOC_START	(P3SEG+0x00100000)
-#define VMALLOC_END	P4SEG
+#define VMALLOC_END	(FIXADDR_START-2*PAGE_SIZE)
 
 #define	_PAGE_WT	0x001  /* WT-bit on SH-4, 0 on SH-3 */
 #define _PAGE_HW_SHARED	0x002  /* SH-bit  : page is shared among processes */
@@ -119,17 +120,20 @@
 #define PAGE_COPY	__pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_CACHABLE | _PAGE_ACCESSED | _PAGE_FLAGS_HARD)
 #define PAGE_READONLY	__pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_CACHABLE | _PAGE_ACCESSED | _PAGE_FLAGS_HARD)
 #define PAGE_KERNEL	__pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_CACHABLE | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD)
+#define PAGE_KERNEL_NOCACHE \
+			__pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD)
 #define PAGE_KERNEL_RO	__pgprot(_PAGE_PRESENT | _PAGE_CACHABLE | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD)
 #define PAGE_KERNEL_PCC(slot, type) \
 			__pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_FLAGS_HARD | (slot ? _PAGE_PCC_AREA5 : _PAGE_PCC_AREA6) | (type))
 #else /* no mmu */
-#define PAGE_NONE	__pgprot(0)
-#define PAGE_SHARED	__pgprot(0)
-#define PAGE_COPY	__pgprot(0)
-#define PAGE_READONLY	__pgprot(0)
-#define PAGE_KERNEL	__pgprot(0)
-#define PAGE_KERNEL_RO	__pgprot(0)
-#define PAGE_KERNEL_PCC	__pgprot(0)
+#define PAGE_NONE		__pgprot(0)
+#define PAGE_SHARED		__pgprot(0)
+#define PAGE_COPY		__pgprot(0)
+#define PAGE_READONLY		__pgprot(0)
+#define PAGE_KERNEL		__pgprot(0)
+#define PAGE_KERNEL_NOCACHE	__pgprot(0)
+#define PAGE_KERNEL_RO		__pgprot(0)
+#define PAGE_KERNEL_PCC		__pgprot(0)
 #endif
 
 /*
@@ -254,25 +258,17 @@
 #define __swp_type(x)		((x).val & 0xff)
 #define __swp_offset(x)		((x).val >> 10)
 #define __swp_entry(type, offset) ((swp_entry_t) { (type) | ((offset) << 10) })
-#define __pte_to_swp_entry(pte)	((swp_entry_t) { pte_val(pte) })
-#define __swp_entry_to_pte(x)	((pte_t) { (x).val })
+#define __pte_to_swp_entry(pte)	((swp_entry_t) { pte_val(pte) >> 1 })
+#define __swp_entry_to_pte(x)	((pte_t) { (x).val << 1 })
 
 /*
  * Encode and decode a nonlinear file mapping entry
  */
 #define PTE_FILE_MAX_BITS	29
-#define pte_to_pgoff(pte)	(pte_val(pte))
-#define pgoff_to_pte(off)	((pte_t) { (off) | _PAGE_FILE })
+#define pte_to_pgoff(pte)	(pte_val(pte) >> 1)
+#define pgoff_to_pte(off)	((pte_t) { ((off) << 1) | _PAGE_FILE })
 
-/*
- * Routines for update of PTE 
- *
- * We just can use generic implementation, as SuperH has no SMP feature.
- * (We needed atomic implementation for SMP)
- *
- */
-
-#define pte_same(A,B)	(pte_val(A) == pte_val(B))
+typedef pte_t *pte_addr_t;
 
 #endif /* !__ASSEMBLY__ */
 
@@ -289,12 +285,11 @@
 extern unsigned int kobjsize(const void *objp);
 #endif /* !CONFIG_MMU */
 
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
+#ifdef CONFIG_CPU_SH4
 #define __HAVE_ARCH_PTEP_GET_AND_CLEAR
-#define __HAVE_ARCH_PTEP_SET_WRPROTECT
-#define __HAVE_ARCH_PTEP_MKDIRTY
-#define __HAVE_ARCH_PTE_SAME
+extern inline pte_t ptep_get_and_clear(pte_t *ptep);
+#endif
+
 #include <asm-generic/pgtable.h>
 
 #endif /* __ASM_SH_PAGE_H */
--- diff/include/asm-sh/processor.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/processor.h	2004-07-01 21:32:50.000000000 +0100
@@ -37,8 +37,8 @@
 	CPU_SH7604,
 
 	/* SH-3 types */
-	CPU_SH7707,  CPU_SH7708, CPU_SH7708S, CPU_SH7708R, CPU_SH7709,
-	CPU_SH7709A, CPU_SH7729, CPU_SH7300,
+	CPU_SH7705, CPU_SH7707,  CPU_SH7708, CPU_SH7708S, CPU_SH7708R,
+	CPU_SH7709, CPU_SH7709A, CPU_SH7729, CPU_SH7300,
 
 	/* SH-4 types */
 	CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R,
@@ -271,6 +271,7 @@
 #define KSTK_EIP(tsk)  ((tsk)->thread.pc)
 #define KSTK_ESP(tsk)  ((tsk)->thread.sp)
 
-#define cpu_relax()	__asm__ __volatile__ ("sleep" : : : "memory")
+#define cpu_sleep()	__asm__ __volatile__ ("sleep" : : : "memory")
+#define cpu_relax()	do { } while (0)
 
 #endif /* __ASM_SH_PROCESSOR_H */
--- diff/include/asm-sh/resource.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/resource.h	2004-07-01 21:32:50.000000000 +0100
@@ -16,8 +16,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 #ifdef __KERNEL__
 
@@ -40,6 +42,8 @@
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-sh/serial.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/serial.h	2004-07-01 21:32:50.000000000 +0100
@@ -44,8 +44,5 @@
 
 #define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS
 
-/* XXX: This should be moved ino irq.h */
-#define irq_canonicalize(x) (x)
-
 #endif
 #endif /* _ASM_SERIAL_H */
--- diff/include/asm-sh/sigcontext.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/sigcontext.h	2004-07-01 21:32:50.000000000 +0100
@@ -1,6 +1,26 @@
 #ifndef __ASM_SH_SIGCONTEXT_H
 #define __ASM_SH_SIGCONTEXT_H
 
-#include <asm/cpu/sigcontext.h>
+struct sigcontext {
+	unsigned long	oldmask;
+
+	/* CPU registers */
+	unsigned long sc_regs[16];
+	unsigned long sc_pc;
+	unsigned long sc_pr;
+	unsigned long sc_sr;
+	unsigned long sc_gbr;
+	unsigned long sc_mach;
+	unsigned long sc_macl;
+
+#if defined(__SH4__) || defined(CONFIG_CPU_SH4)
+	/* FPU registers */
+	unsigned long sc_fpregs[16];
+	unsigned long sc_xfpregs[16];
+	unsigned int sc_fpscr;
+	unsigned int sc_fpul;
+	unsigned int sc_ownedfp;
+#endif
+};
 
 #endif /* __ASM_SH_SIGCONTEXT_H */
--- diff/include/asm-sh/ubc.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/ubc.h	2004-07-01 21:32:50.000000000 +0100
@@ -14,7 +14,8 @@
 #include <asm/cpu/ubc.h>
 
 /* User Break Controller */
-#if defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7300)
 #define UBC_TYPE_SH7729	(cpu_data->type == CPU_SH7729)
 #else
 #define UBC_TYPE_SH7729	0
--- diff/include/asm-sh/unistd.h	2004-06-30 14:25:59.000000000 +0100
+++ source/include/asm-sh/unistd.h	2004-07-01 21:32:50.000000000 +0100
@@ -281,8 +281,17 @@
 #define __NR_utimes		271
 #define __NR_fadvise64_64	272
 #define __NR_vserver		273
+#define __NR_mbind              274
+#define __NR_get_mempolicy      275
+#define __NR_set_mempolicy      276
+#define __NR_mq_open            277
+#define __NR_mq_unlink          (__NR_mq_open+1)
+#define __NR_mq_timedsend       (__NR_mq_open+2)
+#define __NR_mq_timedreceive    (__NR_mq_open+3)
+#define __NR_mq_notify          (__NR_mq_open+4)
+#define __NR_mq_getsetattr      (__NR_mq_open+5)
 
-#define NR_syscalls 274
+#define NR_syscalls 283
 
 /* user-visible error numbers are in the range -1 - -124: see <asm-sh/errno.h> */
 
@@ -429,6 +438,7 @@
 
 #include <linux/compiler.h>
 #include <linux/types.h>
+#include <linux/linkage.h>
 #include <asm/ptrace.h>
 
 /*
--- diff/include/asm-sparc/checksum.h	2004-05-19 22:12:55.000000000 +0100
+++ source/include/asm-sparc/checksum.h	2004-07-01 21:32:50.000000000 +0100
@@ -91,7 +91,7 @@
   }
   
 static inline unsigned int 
-csum_partial_copy_to_user(const char *src, char *dst, int len, 
+csum_partial_copy_to_user(const char *src, char __user *dst, int len, 
 			  unsigned int sum, int *err)
 {
 	if (!access_ok (VERIFY_WRITE, dst, len)) {
--- diff/include/asm-sparc/fcntl.h	2004-05-19 22:12:55.000000000 +0100
+++ source/include/asm-sparc/fcntl.h	2004-07-01 21:32:50.000000000 +0100
@@ -21,6 +21,7 @@
 #define O_NOFOLLOW	0x20000	/* don't follow links */
 #define O_LARGEFILE	0x40000
 #define O_DIRECT        0x100000 /* direct disk access hint */
+#define O_NOATIME	0x200000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-sparc/resource.h	2004-05-19 22:12:55.000000000 +0100
+++ source/include/asm-sparc/resource.h	2004-07-01 21:32:50.000000000 +0100
@@ -19,11 +19,13 @@
 #define RLIMIT_RSS	5		/* max resident set size */
 #define RLIMIT_NOFILE	6		/* max number of open files */
 #define RLIMIT_NPROC	7		/* max number of processes */
-#define RLIMIT_MEMLOCK  8               /* max locked-in-memory address space */
-#define RLIMIT_AS       9               /* address space limit */
+#define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
+#define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -44,7 +46,9 @@
     {INR_OPEN, INR_OPEN}, {0, 0},	\
     {RLIM_INFINITY, RLIM_INFINITY},	\
     {RLIM_INFINITY, RLIM_INFINITY},	\
-    {RLIM_INFINITY, RLIM_INFINITY}	\
+    {RLIM_INFINITY, RLIM_INFINITY},	\
+    {MAX_SIGPENDING, MAX_SIGPENDING},	\
+    {MQ_BYTES_MAX, MQ_BYTES_MAX},	\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-sparc/setup.h	2004-05-19 22:12:55.000000000 +0100
+++ source/include/asm-sparc/setup.h	2004-07-01 21:32:50.000000000 +0100
@@ -5,5 +5,6 @@
 #ifndef _SPARC_SETUP_H
 #define _SPARC_SETUP_H
 
+#define COMMAND_LINE_SIZE	256
 
 #endif /* _SPARC_SETUP_H */
--- diff/include/asm-sparc64/bitops.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-sparc64/bitops.h	2004-07-01 21:32:50.000000000 +0100
@@ -204,7 +204,8 @@
  * @offset: The bitnumber to start searching at
  * @size: The maximum size to search
  */
-extern unsigned long find_next_bit(unsigned long *, unsigned long, unsigned long);
+extern unsigned long find_next_bit(const unsigned long *, unsigned long,
+					unsigned long);
 
 /**
  * find_first_bit - find the first set bit in a memory region
--- diff/include/asm-sparc64/bug.h	2004-05-19 22:12:56.000000000 +0100
+++ source/include/asm-sparc64/bug.h	2004-07-01 21:32:50.000000000 +0100
@@ -3,6 +3,8 @@
 #ifndef _SPARC64_BUG_H
 #define _SPARC64_BUG_H
 
+#include <linux/compiler.h>
+
 #ifdef CONFIG_DEBUG_BUGVERBOSE
 extern void do_BUG(const char *file, int line);
 #define BUG() do {					\
--- diff/include/asm-sparc64/byteorder.h	2004-05-19 22:12:56.000000000 +0100
+++ source/include/asm-sparc64/byteorder.h	2004-07-01 21:32:51.000000000 +0100
@@ -7,7 +7,7 @@
 
 #ifdef __GNUC__
 
-static __inline__ __u16 ___arch__swab16p(__u16 *addr)
+static __inline__ __u16 ___arch__swab16p(const __u16 *addr)
 {
 	__u16 ret;
 
@@ -17,7 +17,7 @@
 	return ret;
 }
 
-static __inline__ __u32 ___arch__swab32p(__u32 *addr)
+static __inline__ __u32 ___arch__swab32p(const __u32 *addr)
 {
 	__u32 ret;
 
@@ -27,7 +27,7 @@
 	return ret;
 }
 
-static __inline__ __u64 ___arch__swab64p(__u64 *addr)
+static __inline__ __u64 ___arch__swab64p(const __u64 *addr)
 {
 	__u64 ret;
 
--- diff/include/asm-sparc64/checksum.h	2004-05-19 22:12:56.000000000 +0100
+++ source/include/asm-sparc64/checksum.h	2004-07-01 21:32:51.000000000 +0100
@@ -66,8 +66,9 @@
  */
 #define HAVE_CSUM_COPY_USER
 extern unsigned int csum_partial_copy_user_sparc64(const char *src, char *dst, int len, unsigned int sum);
+
 static __inline__ unsigned int 
-csum_and_copy_to_user(const char *src, char *dst, int len, 
+csum_and_copy_to_user(const char *src, char __user *dst, int len, 
 		      unsigned int sum, int *err)
 {
 	__asm__ __volatile__ ("stx	%0, [%%sp + 0x7ff + 128]"
--- diff/include/asm-sparc64/fcntl.h	2004-05-19 22:12:56.000000000 +0100
+++ source/include/asm-sparc64/fcntl.h	2004-07-01 21:32:51.000000000 +0100
@@ -21,6 +21,7 @@
 #define O_NOFOLLOW	0x20000	/* don't follow links */
 #define O_LARGEFILE	0x40000
 #define O_DIRECT        0x100000 /* direct disk access hint */
+#define O_NOATIME	0x200000
 
 
 #define F_DUPFD		0	/* dup */
--- diff/include/asm-sparc64/io.h	2004-05-19 22:12:56.000000000 +0100
+++ source/include/asm-sparc64/io.h	2004-07-01 21:32:51.000000000 +0100
@@ -19,8 +19,8 @@
 #define bus_to_virt bus_to_virt_not_defined_use_pci_map
 
 /* BIO layer definitions. */
-extern unsigned long phys_base, kern_base, kern_size;
-#define page_to_phys(page)	((((page) - mem_map) << PAGE_SHIFT)+phys_base)
+extern unsigned long kern_base, kern_size;
+#define page_to_phys(page)	(page_to_pfn(page) << PAGE_SHIFT)
 #define BIO_VMERGE_BOUNDARY	8192
 
 /* Different PCI controllers we support have their PCI MEM space
--- diff/include/asm-sparc64/page.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-sparc64/page.h	2004-07-01 21:32:51.000000000 +0100
@@ -14,9 +14,6 @@
 
 #ifndef __ASSEMBLY__
 
-/* Sparc64 is slow at multiplication, we prefer to use some extra space. */
-#define WANT_PAGE_VIRTUAL 1
-
 extern void _clear_page(void *page);
 #define clear_page(X)	_clear_page((void *)(X))
 struct page;
@@ -111,17 +108,19 @@
  */
 #define PAGE_OFFSET		_AC(0xFFFFF80000000000,UL)
 
+#ifndef __ASSEMBLY__
+
 #define __pa(x)			((unsigned long)(x) - PAGE_OFFSET)
 #define __va(x)			((void *)((unsigned long) (x) + PAGE_OFFSET))
 
 /* PFNs are real physical page numbers.  However, mem_map only begins to record
  * per-page information starting at pfn_base.  This is to handle systems where
- * the first physical page in the machine is at some huge physical address, such
- * as 4GB.   This is common on a partitioned E10000, for example.
+ * the first physical page in the machine is at some huge physical address,
+ * such as 4GB.   This is common on a partitioned E10000, for example.
  */
+extern struct page *pfn_to_page(unsigned long pfn);
+extern unsigned long page_to_pfn(struct page *);
 
-#define pfn_to_page(pfn)	(mem_map + ((pfn)-(pfn_base)))
-#define page_to_pfn(page)	((unsigned long)(((page) - mem_map) + pfn_base))
 #define virt_to_page(kaddr)	pfn_to_page(__pa(kaddr)>>PAGE_SHIFT)
 
 #define pfn_valid(pfn)		(((pfn)-(pfn_base)) < max_mapnr)
@@ -130,8 +129,6 @@
 #define virt_to_phys __pa
 #define phys_to_virt __va
 
-#ifndef __ASSEMBLY__
-
 /* The following structure is used to hold the physical
  * memory configuration of the machine.  This is filled in
  * probe_memory() and is later used by mem_init() to set up
--- diff/include/asm-sparc64/resource.h	2004-05-19 22:12:56.000000000 +0100
+++ source/include/asm-sparc64/resource.h	2004-07-01 21:32:51.000000000 +0100
@@ -19,11 +19,13 @@
 #define RLIMIT_RSS	5		/* max resident set size */
 #define RLIMIT_NOFILE	6		/* max number of open files */
 #define RLIMIT_NPROC	7		/* max number of processes */
-#define RLIMIT_MEMLOCK  8               /* max locked-in-memory address space */
-#define RLIMIT_AS       9               /* address space limit */
+#define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
+#define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -43,7 +45,9 @@
     {INR_OPEN, INR_OPEN}, {0, 0},	\
     {RLIM_INFINITY, RLIM_INFINITY},	\
     {RLIM_INFINITY, RLIM_INFINITY},	\
-    {RLIM_INFINITY, RLIM_INFINITY}	\
+    {RLIM_INFINITY, RLIM_INFINITY},	\
+    {MAX_SIGPENDING, MAX_SIGPENDING},	\
+    {MQ_BYTES_MAX, MQ_BYTES_MAX},	\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-sparc64/setup.h	2004-05-19 22:12:56.000000000 +0100
+++ source/include/asm-sparc64/setup.h	2004-07-01 21:32:51.000000000 +0100
@@ -5,5 +5,6 @@
 #ifndef _SPARC64_SETUP_H
 #define _SPARC64_SETUP_H
 
+#define COMMAND_LINE_SIZE	256
 
 #endif /* _SPARC64_SETUP_H */
--- diff/include/asm-sparc64/spinlock.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-sparc64/spinlock.h	2004-07-01 21:32:51.000000000 +0100
@@ -31,15 +31,23 @@
 
 #ifndef CONFIG_DEBUG_SPINLOCK
 
-typedef unsigned char spinlock_t;
-#define SPIN_LOCK_UNLOCKED	0
+typedef struct {
+	unsigned char lock;
+	unsigned int  index;
+} spinlock_t;
 
-#define spin_lock_init(lock)	(*((unsigned char *)(lock)) = 0)
-#define spin_is_locked(lock)	(*((volatile unsigned char *)(lock)) != 0)
+#ifdef CONFIG_LOCKMETER
+#define SPIN_LOCK_UNLOCKED	(spinlock_t) {0, 0}
+#else
+#define SPIN_LOCK_UNLOCKED	(spinlock_t) { 0 }
+#endif
 
-#define spin_unlock_wait(lock)	\
+#define spin_lock_init(__lock)	do { *(__lock) = SPIN_LOCK_UNLOCKED; } while(0)
+#define spin_is_locked(__lock)	(*((volatile unsigned char *)(&((__lock)->lock))) != 0)
+
+#define spin_unlock_wait(__lock)	\
 do {	membar("#LoadLoad");	\
-} while(*((volatile unsigned char *)lock))
+} while(*((volatile unsigned char *)(&(((spinlock_t *)__lock)->lock))))
 
 static __inline__ void _raw_spin_lock(spinlock_t *lock)
 {
@@ -113,17 +121,31 @@
 
 #ifndef CONFIG_DEBUG_SPINLOCK
 
-typedef unsigned int rwlock_t;
-#define RW_LOCK_UNLOCKED	0
-#define rwlock_init(lp) do { *(lp) = RW_LOCK_UNLOCKED; } while(0)
-#define rwlock_is_locked(x) (*(x) != RW_LOCK_UNLOCKED)
+#ifdef CONFIG_LOCKMETER
+typedef struct {
+	unsigned int lock;
+	unsigned int index;
+	unsigned int cpu;
+} rwlock_t;
+#define RW_LOCK_UNLOCKED       (rwlock_t) { 0, 0, 0xff }
+#else
+typedef struct {
+	unsigned int lock;
+} rwlock_t;
+#define RW_LOCK_UNLOCKED        (rwlock_t) { 0 }
+#endif
+
+#define rwlock_init(lp)		do { *(lp) = RW_LOCK_UNLOCKED; } while(0)
+#define rwlock_is_locked(x)	((x)->lock != 0)
 
+extern int __read_trylock(rwlock_t *);
 extern void __read_lock(rwlock_t *);
 extern void __read_unlock(rwlock_t *);
 extern void __write_lock(rwlock_t *);
 extern void __write_unlock(rwlock_t *);
 extern int __write_trylock(rwlock_t *);
 
+#define _raw_read_trylock(p)	__read_trylock(p)
 #define _raw_read_lock(p)	__read_lock(p)
 #define _raw_read_unlock(p)	__read_unlock(p)
 #define _raw_write_lock(p)	__write_lock(p)
--- diff/include/asm-v850/bitops.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-v850/bitops.h	2004-07-01 21:32:51.000000000 +0100
@@ -193,10 +193,86 @@
 	return result + ffz (tmp);
 }
 
+
+/* This is the same as generic_ffs, but we can't use that because it's
+   inline and the #include order mucks things up.  */
+static inline int generic_ffs_for_find_next_bit(int x)
+{
+	int r = 1;
+
+	if (!x)
+		return 0;
+	if (!(x & 0xffff)) {
+		x >>= 16;
+		r += 16;
+	}
+	if (!(x & 0xff)) {
+		x >>= 8;
+		r += 8;
+	}
+	if (!(x & 0xf)) {
+		x >>= 4;
+		r += 4;
+	}
+	if (!(x & 3)) {
+		x >>= 2;
+		r += 2;
+	}
+	if (!(x & 1)) {
+		x >>= 1;
+		r += 1;
+	}
+	return r;
+}
+
+/*
+ * Find next one bit in a bitmap reasonably efficiently.
+ */
+static __inline__ unsigned long find_next_bit(const unsigned long *addr,
+	unsigned long size, unsigned long offset)
+{
+	unsigned int *p = ((unsigned int *) addr) + (offset >> 5);
+	unsigned int result = offset & ~31UL;
+	unsigned int tmp;
+
+	if (offset >= size)
+		return size;
+	size -= result;
+	offset &= 31UL;
+	if (offset) {
+		tmp = *p++;
+		tmp &= ~0UL << offset;
+		if (size < 32)
+			goto found_first;
+		if (tmp)
+			goto found_middle;
+		size -= 32;
+		result += 32;
+	}
+	while (size >= 32) {
+		if ((tmp = *p++) != 0)
+			goto found_middle;
+		result += 32;
+		size -= 32;
+	}
+	if (!size)
+		return result;
+	tmp = *p;
+
+found_first:
+	tmp &= ~0UL >> (32 - size);
+	if (tmp == 0UL)        /* Are any bits set? */
+		return result + size; /* Nope. */
+found_middle:
+	return result + generic_ffs_for_find_next_bit(tmp);
+}
+
+
 #define ffs(x) generic_ffs (x)
 #define fls(x) generic_fls (x)
 #define __ffs(x) ffs(x)
 
+
 /*
  * This is just `generic_ffs' from <linux/bitops.h>, except that it assumes
  * that at least one bit is set, and returns the real index of the bit
--- diff/include/asm-v850/fcntl.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-v850/fcntl.h	2004-07-01 21:32:51.000000000 +0100
@@ -20,6 +20,7 @@
 #define O_NOFOLLOW     0100000	/* don't follow links */
 #define O_DIRECT       0200000	/* direct disk access hint - currently ignored */
 #define O_LARGEFILE    0400000
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-v850/irq.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-v850/irq.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,8 +1,8 @@
 /*
  * include/asm-v850/irq.h -- Machine interrupt handling
  *
- *  Copyright (C) 2001,02  NEC Corporation
- *  Copyright (C) 2001,02  Miles Bader <miles@gnu.org>
+ *  Copyright (C) 2001,02,04  NEC Electronics Corporation
+ *  Copyright (C) 2001,02,04  Miles Bader <miles@gnu.org>
  *
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file COPYING in the main directory of this
@@ -62,11 +62,8 @@
 /* Disable an irq without waiting. */
 extern void disable_irq_nosync (unsigned int irq);
 
+extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
 
 #endif /* !__ASSEMBLY__ */
 
-struct irqaction;
-struct pt_regs;
-int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
-
 #endif /* __V850_IRQ_H__ */
--- diff/include/asm-v850/resource.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-v850/resource.h	2004-07-01 21:32:51.000000000 +0100
@@ -16,8 +16,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -39,7 +41,9 @@
 	{      INR_OPEN,     INR_OPEN  },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
-        { RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-v850/unistd.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-v850/unistd.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,8 +1,8 @@
 /*
  * include/asm-v850/unistd.h -- System call numbers and invocation mechanism
  *
- *  Copyright (C) 2001,02,03  NEC Electronics Corporation
- *  Copyright (C) 2001,02,03  Miles Bader <miles@gnu.org>
+ *  Copyright (C) 2001,02,03,04  NEC Electronics Corporation
+ *  Copyright (C) 2001,02,03,04  Miles Bader <miles@gnu.org>
  *
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file COPYING in the main directory of this
@@ -389,7 +389,6 @@
 #ifdef __KERNEL__
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
-#define __ARCH_WANT_OLD_STAT
 #define __ARCH_WANT_STAT64
 #define __ARCH_WANT_SYS_ALARM
 #define __ARCH_WANT_SYS_GETHOSTNAME
@@ -404,7 +403,6 @@
 #define __ARCH_WANT_SYS_GETPGRP
 #define __ARCH_WANT_SYS_LLSEEK
 #define __ARCH_WANT_SYS_NICE
-#define __ARCH_WANT_SYS_OLD_GETRLIMIT
 #define __ARCH_WANT_SYS_OLDUMOUNT
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
--- diff/include/asm-x86_64/bootsetup.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-x86_64/bootsetup.h	2004-07-01 21:32:51.000000000 +0100
@@ -30,7 +30,6 @@
 #define EDD_NR     (*(unsigned char *) (PARAM+EDDNR))
 #define EDD_BUF     ((struct edd_info *) (PARAM+EDDBUF))
 #define COMMAND_LINE saved_command_line
-#define COMMAND_LINE_SIZE 256
 
 #define RAMDISK_IMAGE_START_MASK  	0x07FF
 #define RAMDISK_PROMPT_FLAG		0x8000
--- diff/include/asm-x86_64/fcntl.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-x86_64/fcntl.h	2004-07-01 21:32:51.000000000 +0100
@@ -20,6 +20,7 @@
 #define O_LARGEFILE	0100000
 #define O_DIRECTORY	0200000	/* must be a directory */
 #define O_NOFOLLOW	0400000 /* don't follow links */
+#define O_NOATIME	01000000
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get close_on_exec */
--- diff/include/asm-x86_64/hw_irq.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-x86_64/hw_irq.h	2004-07-01 21:32:51.000000000 +0100
@@ -65,19 +65,21 @@
  * sources per level' errata.
  */
 #define LOCAL_TIMER_VECTOR	0xef
+#define LOCAL_PERFCTR_VECTOR	0xee
 
 /*
- * First APIC vector available to drivers: (vectors 0x30-0xee)
+ * First APIC vector available to drivers: (vectors 0x30-0xed)
  * we start at 0x31 to spread out vectors evenly between priority
  * levels. (0x80 is the syscall vector)
  */
 #define FIRST_DEVICE_VECTOR	0x31
-#define FIRST_SYSTEM_VECTOR	0xef   /* duplicated in irq.h */
+#define FIRST_SYSTEM_VECTOR	0xee   /* duplicated in irq.h */
 
 
 #ifndef __ASSEMBLY__
 extern u8 irq_vector[NR_IRQ_VECTORS];
 #define IO_APIC_VECTOR(irq)	(irq_vector[irq])
+#define AUTO_ASSIGN		-1
 
 /*
  * Various low-level irq details needed by irq.c, process.c,
--- diff/include/asm-x86_64/ia32_unistd.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-x86_64/ia32_unistd.h	2004-07-01 21:32:51.000000000 +0100
@@ -289,7 +289,13 @@
 #define __NR_ia32_mq_notify		(__NR_ia32_mq_open+4)
 #define __NR_ia32_mq_getsetattr	(__NR_ia32_mq_open+5)
 #define __NR_ia32_kexec		283
+#define __NR_ia32_perfctr_info		284
+#define __NR_ia32_vperfctr_open		(__NR_ia32_perfctr_info+1)
+#define __NR_ia32_vperfctr_control	(__NR_ia32_perfctr_info+2)
+#define __NR_ia32_vperfctr_unlink	(__NR_ia32_perfctr_info+3)
+#define __NR_ia32_vperfctr_iresume	(__NR_ia32_perfctr_info+4)
+#define __NR_ia32_vperfctr_read		(__NR_ia32_perfctr_info+5)
 
-#define IA32_NR_syscalls 287	/* must be > than biggest syscall! */
+#define IA32_NR_syscalls 290	/* must be > than biggest syscall! */
 
 #endif /* _ASM_X86_64_IA32_UNISTD_H_ */
--- diff/include/asm-x86_64/irq.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-x86_64/irq.h	2004-07-01 21:32:51.000000000 +0100
@@ -29,7 +29,7 @@
  */
 #define NR_VECTORS 256
 
-#define FIRST_SYSTEM_VECTOR	0xef   /* duplicated in hw_irq.h */
+#define FIRST_SYSTEM_VECTOR	0xee   /* duplicated in hw_irq.h */
 
 #ifdef CONFIG_PCI_USE_VECTOR
 #define NR_IRQS FIRST_SYSTEM_VECTOR
--- diff/include/asm-x86_64/mpspec.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/asm-x86_64/mpspec.h	2004-07-01 21:32:51.000000000 +0100
@@ -189,7 +189,7 @@
 extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base);
 extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 gsi);
 extern void mp_config_acpi_legacy_irqs (void);
-extern void mp_parse_prt (void);
+extern void mp_register_gsi (u32 gsi, int edge_level, int active_high_low);
 #endif /*CONFIG_X86_IO_APIC*/
 #endif
 
@@ -212,7 +212,7 @@
 #define physids_and(dst, src1, src2)		bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
 #define physids_or(dst, src1, src2)		bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
 #define physids_clear(map)			bitmap_zero((map).mask, MAX_APICS)
-#define physids_complement(map)			bitmap_complement((map).mask, MAX_APICS)
+#define physids_complement(dst, src)		bitmap_complement((dst).mask, (src).mask, MAX_APICS)
 #define physids_empty(map)			bitmap_empty((map).mask, MAX_APICS)
 #define physids_equal(map1, map2)		bitmap_equal((map1).mask, (map2).mask, MAX_APICS)
 #define physids_weight(map)			bitmap_weight((map).mask, MAX_APICS)
--- diff/include/asm-x86_64/msi.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/asm-x86_64/msi.h	2004-07-01 21:32:51.000000000 +0100
@@ -11,11 +11,6 @@
 #define LAST_DEVICE_VECTOR		232
 #define MSI_DEST_MODE			MSI_LOGICAL_MODE
 #define MSI_TARGET_CPU_SHIFT		12
-
-#ifdef CONFIG_SMP
-#define MSI_TARGET_CPU		logical_smp_processor_id()
-#else
-#define MSI_TARGET_CPU		TARGET_CPUS
-#endif
+#define MSI_TARGET_CPU			TARGET_CPUS
 
 #endif /* ASM_MSI_H */
--- diff/include/asm-x86_64/pgtable.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-x86_64/pgtable.h	2004-07-01 21:32:51.000000000 +0100
@@ -172,7 +172,7 @@
 #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
 #define __PAGE_KERNEL \
 	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_NX)
-#define __PAGE_KERNEL_EXECUTABLE \
+#define __PAGE_KERNEL_EXEC \
 	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
 #define __PAGE_KERNEL_NOCACHE \
 	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_PCD | _PAGE_ACCESSED | _PAGE_NX)
@@ -188,7 +188,7 @@
 #define MAKE_GLOBAL(x) __pgprot((x) | _PAGE_GLOBAL)
 
 #define PAGE_KERNEL MAKE_GLOBAL(__PAGE_KERNEL)
-#define PAGE_KERNEL_EXECUTABLE MAKE_GLOBAL(__PAGE_KERNEL_EXECUTABLE)
+#define PAGE_KERNEL_EXEC MAKE_GLOBAL(__PAGE_KERNEL_EXEC)
 #define PAGE_KERNEL_RO MAKE_GLOBAL(__PAGE_KERNEL_RO)
 #define PAGE_KERNEL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
 #define PAGE_KERNEL_VSYSCALL MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL)
@@ -262,8 +262,21 @@
 extern inline pte_t pte_mkdirty(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; }
 extern inline pte_t pte_mkyoung(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; }
 extern inline pte_t pte_mkwrite(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; }
-static inline  int ptep_test_and_clear_dirty(pte_t *ptep)	{ return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); }
-static inline  int ptep_test_and_clear_young(pte_t *ptep)	{ return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); }
+
+static inline int ptep_test_and_clear_dirty(pte_t *ptep)
+{
+	if (!pte_dirty(*ptep))
+		return 0;
+	return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep);
+}
+
+static inline int ptep_test_and_clear_young(pte_t *ptep)
+{
+	if (!pte_young(*ptep))
+		return 0;
+	return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep);
+}
+
 static inline void ptep_set_wrprotect(pte_t *ptep)		{ clear_bit(_PAGE_BIT_RW, ptep); }
 static inline void ptep_mkdirty(pte_t *ptep)			{ set_bit(_PAGE_BIT_DIRTY, ptep); }
 
--- diff/include/asm-x86_64/processor.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-x86_64/processor.h	2004-07-01 21:32:51.000000000 +0100
@@ -178,9 +178,9 @@
 	(test_thread_flag(TIF_IA32) ? TASK_UNMAPPED_32 : TASK_UNMAPPED_64)  
 
 /*
- * Size of io_bitmap, covering ports 0 to 0x3ff.
+ * Size of io_bitmap.
  */
-#define IO_BITMAP_BITS  1024
+#define IO_BITMAP_BITS  65536
 #define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
 #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
 #define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
@@ -253,6 +253,8 @@
 	unsigned long	*io_bitmap_ptr;
 /* cached TLS descriptors. */
 	u64 tls_array[GDT_ENTRY_TLS_ENTRIES];
+/* performance counters */
+	struct vperfctr *perfctr;
 } __attribute__((aligned(16)));
 
 #define INIT_THREAD  {}
--- diff/include/asm-x86_64/resource.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/asm-x86_64/resource.h	2004-07-01 21:32:51.000000000 +0100
@@ -16,8 +16,10 @@
 #define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
 #define RLIMIT_AS	9		/* address space limit */
 #define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
 
-#define RLIM_NLIMITS	11
+#define RLIM_NLIMITS	13
 
 /*
  * SuS says limits have to be unsigned.
@@ -39,7 +41,9 @@
 	{      INR_OPEN,     INR_OPEN  },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
 	{ RLIM_INFINITY, RLIM_INFINITY },		\
-        { RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
 }
 
 #endif /* __KERNEL__ */
--- diff/include/asm-x86_64/setup.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/asm-x86_64/setup.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,10 +1,6 @@
-/*
- *	Just a place holder. We don't want to have to test x86 before
- *	we include stuff
- */
-
 #ifndef _x8664_SETUP_H
 #define _x8664_SETUP_H
 
+#define COMMAND_LINE_SIZE	256
 
 #endif
--- diff/include/asm-x86_64/smp.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-x86_64/smp.h	2004-07-01 21:32:51.000000000 +0100
@@ -60,7 +60,6 @@
 
 extern cpumask_t cpu_callout_map;
 #define cpu_possible_map cpu_callout_map
-#define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
 
 static inline int num_booting_cpus(void)
 {
@@ -105,7 +104,6 @@
 		return BAD_APICID;
 }
 
-#define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
 #endif /* !ASSEMBLY */
 
 #define NO_PROC_ID		0xFF		/* No processor magic marker */
@@ -115,9 +113,9 @@
 #define TARGET_CPUS 1
 
 #ifndef ASSEMBLY
-static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask)
+static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
 {
-	return cpus_coerce_const(cpumask);
+	return cpus_addr(cpumask)[0];
 }
 #endif
 
--- diff/include/asm-x86_64/suspend.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/asm-x86_64/suspend.h	2004-07-01 21:32:51.000000000 +0100
@@ -38,7 +38,6 @@
 extern unsigned long saved_context_r12, saved_context_r13, saved_context_r14, saved_context_r15;
 extern unsigned long saved_context_eflags;
 
-
 #define loaddebug(thread,register) \
                __asm__("movq %0,%%db" #register  \
                        : /* no output */ \
--- diff/include/asm-x86_64/topology.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/asm-x86_64/topology.h	2004-07-01 21:32:51.000000000 +0100
@@ -20,9 +20,11 @@
 #define node_to_first_cpu(node) 	(__ffs(node_to_cpumask[node]))
 #define node_to_cpumask(node)		(node_to_cpumask[node])
 
-static inline unsigned long pcibus_to_cpumask(int bus)
+static inline cpumask_t pcibus_to_cpumask(int bus)
 {
-	return mp_bus_to_cpumask[bus] & cpu_online_map; 
+	cpumask_t tmp;
+	cpus_and(tmp, mp_bus_to_cpumask[bus], cpu_online_map);
+	return tmp;
 }
 
 #define NODE_BALANCE_RATE 30	/* CHECKME */ 
--- diff/include/asm-x86_64/uaccess.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-x86_64/uaccess.h	2004-07-01 21:32:51.000000000 +0100
@@ -33,16 +33,6 @@
 
 #define segment_eq(a,b)	((a).seg == (b).seg)
 
-#ifdef __CHECKER__
-#define CHECK_UPTR(ptr) do {				\
-	__typeof__(*(ptr)) *__dummy_check_uptr =	\
-		(void __user *)&__dummy_check_uptr;	\
-} while(0)
-#else
-#define CHECK_UPTR(ptr)
-#endif
-
-
 #define __addr_ok(addr) (!((unsigned long)(addr) & (current_thread_info()->addr_limit.seg)))
 
 /*
@@ -50,7 +40,7 @@
  */
 #define __range_not_ok(addr,size) ({ \
 	unsigned long flag,sum; \
-	CHECK_UPTR(addr);	\
+	__chk_user_ptr(addr); \
 	asm("# range_ok\n\r" \
 		"addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0"  \
 		:"=&r" (flag), "=r" (sum) \
@@ -114,7 +104,7 @@
 #define get_user(x,ptr)							\
 ({	long __val_gu;							\
 	int __ret_gu; 							\
-	CHECK_UPTR(ptr);						\
+	__chk_user_ptr(ptr);						\
 	switch(sizeof (*(ptr))) {					\
 	case 1:  __get_user_x(1,__ret_gu,__val_gu,ptr); break;		\
 	case 2:  __get_user_x(2,__ret_gu,__val_gu,ptr); break;		\
@@ -150,7 +140,6 @@
 #define __put_user_nocheck(x,ptr,size)			\
 ({							\
 	int __pu_err;					\
-	CHECK_UPTR(ptr);				\
 	__put_user_size((x),(ptr),(size),__pu_err);	\
 	__pu_err;					\
 })
@@ -168,6 +157,7 @@
 #define __put_user_size(x,ptr,size,retval)				\
 do {									\
 	retval = 0;							\
+	__chk_user_ptr(ptr);						\
 	switch (size) {							\
 	  case 1: __put_user_asm(x,ptr,retval,"b","b","iq",-EFAULT); break;\
 	  case 2: __put_user_asm(x,ptr,retval,"w","w","ir",-EFAULT); break;\
@@ -206,7 +196,6 @@
 ({								\
 	int __gu_err;						\
 	long __gu_val;						\
-	CHECK_UPTR(ptr);					\
 	__get_user_size(__gu_val,(ptr),(size),__gu_err);	\
 	(x) = (__typeof__(*(ptr)))__gu_val;			\
 	__gu_err;						\
@@ -217,6 +206,7 @@
 #define __get_user_size(x,ptr,size,retval)				\
 do {									\
 	retval = 0;							\
+	__chk_user_ptr(ptr);						\
 	switch (size) {							\
 	  case 1: __get_user_asm(x,ptr,retval,"b","b","=q",-EFAULT); break;\
 	  case 2: __get_user_asm(x,ptr,retval,"w","w","=r",-EFAULT); break;\
@@ -257,28 +247,28 @@
 { 
        int ret = 0;
 	if (!__builtin_constant_p(size))
-		return copy_user_generic(dst,(void *)src,size);
+		return copy_user_generic(dst,(__force void *)src,size);
 	switch (size) { 
-	case 1:__get_user_asm(*(u8*)dst,(u8 *)src,ret,"b","b","=q",1); 
+	case 1:__get_user_asm(*(u8*)dst,(u8 __user *)src,ret,"b","b","=q",1); 
 		return ret;
-	case 2:__get_user_asm(*(u16*)dst,(u16*)src,ret,"w","w","=r",2);
+	case 2:__get_user_asm(*(u16*)dst,(u16 __user *)src,ret,"w","w","=r",2);
 		return ret;
-	case 4:__get_user_asm(*(u32*)dst,(u32*)src,ret,"l","k","=r",4);
+	case 4:__get_user_asm(*(u32*)dst,(u32 __user *)src,ret,"l","k","=r",4);
 		return ret;
-	case 8:__get_user_asm(*(u64*)dst,(u64*)src,ret,"q","","=r",8);
+	case 8:__get_user_asm(*(u64*)dst,(u64 __user *)src,ret,"q","","=r",8);
 		return ret; 
 	case 10:
-	       	__get_user_asm(*(u64*)dst,(u64*)src,ret,"q","","=r",16);
+	       	__get_user_asm(*(u64*)dst,(u64 __user *)src,ret,"q","","=r",16);
 		if (unlikely(ret)) return ret;
-		__get_user_asm(*(u16*)(8+(char*)dst),(u16*)(8+(char*)src),ret,"w","w","=r",2);
+		__get_user_asm(*(u16*)(8+(char*)dst),(u16 __user *)(8+(char __user *)src),ret,"w","w","=r",2);
 		return ret; 
 	case 16:
-		__get_user_asm(*(u64*)dst,(u64*)src,ret,"q","","=r",16);
+		__get_user_asm(*(u64*)dst,(u64 __user *)src,ret,"q","","=r",16);
 		if (unlikely(ret)) return ret;
-		__get_user_asm(*(u64*)(8+(char*)dst),(u64*)(8+(char*)src),ret,"q","","=r",8);
+		__get_user_asm(*(u64*)(8+(char*)dst),(u64 __user *)(8+(char __user *)src),ret,"q","","=r",8);
 		return ret; 
 	default:
-		return copy_user_generic(dst,(void *)src,size); 
+		return copy_user_generic(dst,(__force void *)src,size); 
 	}
 }	
 
@@ -286,30 +276,30 @@
 { 
        int ret = 0;
 	if (!__builtin_constant_p(size))
-		return copy_user_generic((void *)dst,src,size);
+		return copy_user_generic((__force void *)dst,src,size);
 	switch (size) { 
-	case 1:__put_user_asm(*(u8*)src,(u8 *)dst,ret,"b","b","iq",1); 
+	case 1:__put_user_asm(*(u8*)src,(u8 __user *)dst,ret,"b","b","iq",1); 
 		return ret;
-	case 2:__put_user_asm(*(u16*)src,(u16*)dst,ret,"w","w","ir",2);
+	case 2:__put_user_asm(*(u16*)src,(u16 __user *)dst,ret,"w","w","ir",2);
 		return ret;
-	case 4:__put_user_asm(*(u32*)src,(u32*)dst,ret,"l","k","ir",4);
+	case 4:__put_user_asm(*(u32*)src,(u32 __user *)dst,ret,"l","k","ir",4);
 		return ret;
-	case 8:__put_user_asm(*(u64*)src,(u64*)dst,ret,"q","","ir",8);
+	case 8:__put_user_asm(*(u64*)src,(u64 __user *)dst,ret,"q","","ir",8);
 		return ret; 
 	case 10:
-		__put_user_asm(*(u64*)src,(u64*)dst,ret,"q","","ir",10);
+		__put_user_asm(*(u64*)src,(u64 __user *)dst,ret,"q","","ir",10);
 		if (unlikely(ret)) return ret;
 		asm("":::"memory");
-		__put_user_asm(4[(u16*)src],4+(u16*)dst,ret,"w","w","ir",2);
+		__put_user_asm(4[(u16*)src],4+(u16 __user *)dst,ret,"w","w","ir",2);
 		return ret; 
 	case 16:
-		__put_user_asm(*(u64*)src,(u64*)dst,ret,"q","","ir",16);
+		__put_user_asm(*(u64*)src,(u64 __user *)dst,ret,"q","","ir",16);
 		if (unlikely(ret)) return ret;
 		asm("":::"memory");
-		__put_user_asm(1[(u64*)src],1+(u64*)dst,ret,"q","","ir",8);
+		__put_user_asm(1[(u64*)src],1+(u64 __user *)dst,ret,"q","","ir",8);
 		return ret; 
 	default:
-		return copy_user_generic((void *)dst,src,size); 
+		return copy_user_generic((__force void *)dst,src,size); 
 	}
 }	
 
@@ -318,39 +308,39 @@
 { 
        int ret = 0;
 	if (!__builtin_constant_p(size))
-		return copy_user_generic((void *)dst,(void *)src,size);
+		return copy_user_generic((__force void *)dst,(__force void *)src,size);
 	switch (size) { 
 	case 1: { 
 		u8 tmp;
-		__get_user_asm(tmp,(u8 *)src,ret,"b","b","=q",1); 
+		__get_user_asm(tmp,(u8 __user *)src,ret,"b","b","=q",1); 
 		if (likely(!ret))
-			__put_user_asm(tmp,(u8 *)dst,ret,"b","b","iq",1); 
+			__put_user_asm(tmp,(u8 __user *)dst,ret,"b","b","iq",1); 
 		return ret;
 	}
 	case 2: { 
 		u16 tmp;
-		__get_user_asm(tmp,(u16 *)src,ret,"w","w","=r",2); 
+		__get_user_asm(tmp,(u16 __user *)src,ret,"w","w","=r",2); 
 		if (likely(!ret))
-			__put_user_asm(tmp,(u16 *)dst,ret,"w","w","ir",2); 
+			__put_user_asm(tmp,(u16 __user *)dst,ret,"w","w","ir",2); 
 		return ret;
 	}
 
 	case 4: { 
 		u32 tmp;
-		__get_user_asm(tmp,(u32 *)src,ret,"l","k","=r",4); 
+		__get_user_asm(tmp,(u32 __user *)src,ret,"l","k","=r",4); 
 		if (likely(!ret))
-			__put_user_asm(tmp,(u32 *)dst,ret,"l","k","ir",4); 
+			__put_user_asm(tmp,(u32 __user *)dst,ret,"l","k","ir",4); 
 		return ret;
 	}
 	case 8: { 
 		u64 tmp;
-		__get_user_asm(tmp,(u64 *)src,ret,"q","","=r",8); 
+		__get_user_asm(tmp,(u64 __user *)src,ret,"q","","=r",8); 
 		if (likely(!ret))
-			__put_user_asm(tmp,(u64 *)dst,ret,"q","","ir",8); 
+			__put_user_asm(tmp,(u64 __user *)dst,ret,"q","","ir",8); 
 		return ret;
 	}
 	default:
-		return copy_user_generic((void *)dst,(void *)src,size); 
+		return copy_user_generic((__force void *)dst,(__force void *)src,size); 
 	}
 }	
 
--- diff/include/asm-x86_64/unistd.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/asm-x86_64/unistd.h	2004-07-01 21:32:51.000000000 +0100
@@ -554,8 +554,20 @@
 __SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr)
 #define __NR_kexec_load 	246
 __SYSCALL(__NR_kexec_load, sys_ni_syscall)
+#define __NR_perfctr_info	247
+__SYSCALL(__NR_perfctr_info, sys_perfctr_info)
+#define __NR_vperfctr_open	(__NR_perfctr_info+1)
+__SYSCALL(__NR_vperfctr_open, sys_vperfctr_open)
+#define __NR_vperfctr_control	(__NR_perfctr_info+2)
+__SYSCALL(__NR_vperfctr_control, sys_vperfctr_control)
+#define __NR_vperfctr_unlink	(__NR_perfctr_info+3)
+__SYSCALL(__NR_vperfctr_unlink, sys_vperfctr_unlink)
+#define __NR_vperfctr_iresume	(__NR_perfctr_info+4)
+__SYSCALL(__NR_vperfctr_iresume, sys_vperfctr_iresume)
+#define __NR_vperfctr_read	(__NR_perfctr_info+5)
+__SYSCALL(__NR_vperfctr_read, sys_vperfctr_read)
 
-#define __NR_syscall_max __NR_kexec_load
+#define __NR_syscall_max __NR_vperfctr_read
 #ifndef __NO_STUBS
 
 /* user-visible error numbers are in the range -1 - -4095 */
--- diff/include/linux/acct.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/acct.h	2004-07-01 21:32:51.000000000 +0100
@@ -16,14 +16,18 @@
 #define _LINUX_ACCT_H
 
 #include <linux/types.h>
+#include <asm/param.h>
 
 /* 
  *  comp_t is a 16-bit "floating" point number with a 3-bit base 8
- *  exponent and a 13-bit fraction. See linux/kernel/acct.c for the
- *  specific encoding system used.
+ *  exponent and a 13-bit fraction.
+ *  comp2_t is 24-bit with 5-bit base 2 exponent and 20 bit fraction
+ *  (leading 1 not stored).
+ *  See linux/kernel/acct.c for the specific encoding systems used.
  */
 
 typedef __u16	comp_t;
+typedef __u32	comp2_t;
 
 /*
  *   accounting file record
@@ -36,27 +40,59 @@
 
 struct acct
 {
-	char		ac_flag;		/* Accounting Flags */
-/*
- *	No binary format break with 2.0 - but when we hit 32bit uid we'll
- *	have to bite one
- */
-	__u16		ac_uid;			/* Accounting Real User ID */
-	__u16		ac_gid;			/* Accounting Real Group ID */
-	__u16		ac_tty;			/* Accounting Control Terminal */
-	__u32		ac_btime;		/* Accounting Process Creation Time */
-	comp_t		ac_utime;		/* Accounting User Time */
-	comp_t		ac_stime;		/* Accounting System Time */
-	comp_t		ac_etime;		/* Accounting Elapsed Time */
-	comp_t		ac_mem;			/* Accounting Average Memory Usage */
-	comp_t		ac_io;			/* Accounting Chars Transferred */
-	comp_t		ac_rw;			/* Accounting Blocks Read or Written */
-	comp_t		ac_minflt;		/* Accounting Minor Pagefaults */
-	comp_t		ac_majflt;		/* Accounting Major Pagefaults */
-	comp_t		ac_swaps;		/* Accounting Number of Swaps */
-	__u32		ac_exitcode;		/* Accounting Exitcode */
-	char		ac_comm[ACCT_COMM + 1];	/* Accounting Command Name */
-	char		ac_pad[10];		/* Accounting Padding Bytes */
+	char		ac_flag;		/* Flags */
+	char		ac_version;		/* Always set to ACCT_VERSION */
+	/* for binary compatibility back until 2.0 */
+	__u16		ac_uid16;		/* LSB of Real User ID */
+	__u16		ac_gid16;		/* LSB of Real Group ID */
+	__u16		ac_tty;			/* Control Terminal */
+	__u32		ac_btime;		/* Process Creation Time */
+	comp_t		ac_utime;		/* User Time */
+	comp_t		ac_stime;		/* System Time */
+	comp_t		ac_etime;		/* Elapsed Time */
+	comp_t		ac_mem;			/* Average Memory Usage */
+	comp_t		ac_io;			/* Chars Transferred */
+	comp_t		ac_rw;			/* Blocks Read or Written */
+	comp_t		ac_minflt;		/* Minor Pagefaults */
+	comp_t		ac_majflt;		/* Major Pagefaults */
+	comp_t		ac_swaps;		/* Number of Swaps */
+/* m68k had no padding here. */
+#if !defined(CONFIG_M68K) || !defined(__KERNEL__)
+	__u16		ac_ahz;			/* AHZ */
+#endif
+	__u32		ac_exitcode;		/* Exitcode */
+	char		ac_comm[ACCT_COMM + 1];	/* Command Name */
+	__u8		ac_etime_hi;		/* Elapsed Time MSB */
+	__u16		ac_etime_lo;		/* Elapsed Time LSB */
+	__u32		ac_uid;			/* Real User ID */
+	__u32		ac_gid;			/* Real Group ID */
+};
+
+struct acct_v3
+{
+	char		ac_flag;		/* Flags */
+	char		ac_version;		/* Always set to ACCT_VERSION */
+	__u16		ac_tty;			/* Control Terminal */
+	__u32		ac_exitcode;		/* Exitcode */
+	__u32		ac_uid;			/* Real User ID */
+	__u32		ac_gid;			/* Real Group ID */
+	__u32		ac_pid;			/* Process ID */
+	__u32		ac_ppid;		/* Parent Process ID */
+	__u32		ac_btime;		/* Process Creation Time */
+#ifdef __KERNEL__
+	__u32		ac_etime;		/* Elapsed Time */
+#else
+	float		ac_etime;		/* Elapsed Time */
+#endif
+	comp_t		ac_utime;		/* User Time */
+	comp_t		ac_stime;		/* System Time */
+	comp_t		ac_mem;			/* Average Memory Usage */
+	comp_t		ac_io;			/* Chars Transferred */
+	comp_t		ac_rw;			/* Blocks Read or Written */
+	comp_t		ac_minflt;		/* Minor Pagefaults */
+	comp_t		ac_majflt;		/* Major Pagefaults */
+	comp_t		ac_swaps;		/* Number of Swaps */
+	char		ac_comm[ACCT_COMM];	/* Command Name */
 };
 
 /*
@@ -68,8 +104,7 @@
 #define ACOMPAT		0x04	/* ... used compatibility mode (VAX only not used) */
 #define ACORE		0x08	/* ... dumped core */
 #define AXSIG		0x10	/* ... was killed by a signal */
-
-#define AHZ		100
+#define ABYTESEX	0x80	/* always set, allows to detect byteorder */
 
 #ifdef __KERNEL__
 
@@ -84,6 +119,66 @@
 #define acct_process(x)		do { } while (0)
 #endif
 
+/*
+ * ACCT_VERSION numbers as yet defined:
+ * 0: old format (until 2.6.7) with 16 bit uid/gid
+ * 1: extended variant (binary compatible on M68K)
+ * 2: extended variant (binary compatible on everything except M68K)
+ * 3: new binary incompatible format (64 bytes)
+ * 4: new binary incompatible format (128 bytes)
+ * 5: new binary incompatible format (128 bytes, second half)
+ *
+ */
+
+#ifdef CONFIG_BSD_PROCESS_ACCT_V3
+#define ACCT_VERSION	3
+#define AHZ		100
+typedef struct acct_v3 acct_t;
+#else
+#ifdef CONFIG_M68K
+#define ACCT_VERSION	1
+#else
+#define ACCT_VERSION	2
+#endif
+#define AHZ		(USER_HZ)
+typedef struct acct acct_t;
+#endif
+
+#else
+#define ACCT_VERSION	2
+#define AHZ		(HZ)
 #endif	/* __KERNEL */
 
+#ifdef __KERNEL__
+/*
+ * Yet another set of HZ to *HZ helper functions.
+ * See <linux/times.h> for the original.
+ */
+
+static inline u32 jiffies_to_AHZ(unsigned long x)
+{
+#if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0
+	return x / (HZ / USER_HZ);
+#else
+        u64 tmp = (u64)x * TICK_NSEC;
+        do_div(tmp, (NSEC_PER_SEC / AHZ));
+        return (long)tmp;
+#endif
+}
+
+static inline u64 jiffies_64_to_AHZ(u64 x)
+{
+#if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0
+#if HZ != AHZ
+	do_div(x, HZ / AHZ);
+#endif
+#else
+	x *= TICK_NSEC;
+	do_div(x, (NSEC_PER_SEC / AHZ));
+#endif
+       return x;
+}
+
+#endif  /* __KERNEL */
+
 #endif	/* _LINUX_ACCT_H */
--- diff/include/linux/acpi.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/acpi.h	2004-07-01 21:32:51.000000000 +0100
@@ -413,6 +413,8 @@
 
 #endif 	/*!CONFIG_ACPI_BOOT*/
 
+unsigned int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low);
+int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 
 #ifdef CONFIG_ACPI_PCI
 
@@ -437,8 +439,6 @@
 struct pci_dev;
 
 int acpi_pci_irq_enable (struct pci_dev *dev);
-int acpi_pci_irq_init (void);
-int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 
 struct acpi_pci_driver {
 	struct acpi_pci_driver *next;
--- diff/include/linux/affs_fs.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/affs_fs.h	2004-07-01 21:32:51.000000000 +0100
@@ -36,7 +36,8 @@
 extern u32	affs_count_free_blocks(struct super_block *s);
 extern void	affs_free_block(struct super_block *sb, u32 block);
 extern u32	affs_alloc_block(struct inode *inode, u32 goal);
-extern int	affs_init_bitmap(struct super_block *sb);
+extern int	affs_init_bitmap(struct super_block *sb, int *flags);
+extern void	affs_free_bitmap(struct super_block *sb);
 
 /* namei.c */
 
--- diff/include/linux/affs_fs_sb.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/affs_fs_sb.h	2004-07-01 21:32:51.000000000 +0100
@@ -47,7 +47,6 @@
 #define SF_OFS		0x0200		/* Old filesystem */
 #define SF_PREFIX	0x0400		/* Buffer for prefix is allocated */
 #define SF_VERBOSE	0x0800		/* Talk about fs when mounting */
-#define SF_READONLY	0x1000		/* Don't allow to remount rw */
 
 /* short cut to get to the affs specific sb data */
 static inline struct affs_sb_info *AFFS_SB(struct super_block *sb)
--- diff/include/linux/aio.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/aio.h	2004-07-01 21:32:51.000000000 +0100
@@ -23,8 +23,6 @@
 
 #define KIOCB_SYNC_KEY		(~0U)
 
-#define KIOCB_PRIVATE_SIZE	(24 * sizeof(long))
-
 /* ki_flags bits */
 #define KIF_LOCKED		0
 #define KIF_KICKED		1
@@ -55,6 +53,7 @@
 	struct kioctx		*ki_ctx;	/* may be NULL for sync ops */
 	int			(*ki_cancel)(struct kiocb *, struct io_event *);
 	long			(*ki_retry)(struct kiocb *);
+	void			(*ki_dtor)(struct kiocb *);
 
 	struct list_head	ki_list;	/* the aio core uses this
 						 * for cancellation */
@@ -65,8 +64,7 @@
 	} ki_obj;
 	__u64			ki_user_data;	/* user's data for completion */
 	loff_t			ki_pos;
-
-	char			private[KIOCB_PRIVATE_SIZE];
+	void			*private;
 };
 
 #define is_sync_kiocb(iocb)	((iocb)->ki_key == KIOCB_SYNC_KEY)
@@ -79,6 +77,7 @@
 		(x)->ki_filp = (filp);			\
 		(x)->ki_ctx = &tsk->active_mm->default_kioctx;	\
 		(x)->ki_cancel = NULL;			\
+		(x)->ki_dtor = NULL;			\
 		(x)->ki_obj.tsk = tsk;			\
 	} while (0)
 
--- diff/include/linux/atm.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/atm.h	2004-07-01 21:32:51.000000000 +0100
@@ -20,6 +20,7 @@
 #include <linux/socket.h>
 #include <linux/types.h>
 #endif
+#include <linux/compiler.h>
 #include <linux/atmapi.h>
 #include <linux/atmsap.h>
 #include <linux/atmioc.h>
--- diff/include/linux/binfmts.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/binfmts.h	2004-07-01 21:32:51.000000000 +0100
@@ -35,9 +35,19 @@
 	char * interp;		/* Name of the binary really executed. Most
 				   of the time same as filename, but could be
 				   different for binfmt_{misc,script} */
+	unsigned interp_flags;
+	unsigned interp_data;
 	unsigned long loader, exec;
 };
 
+#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0
+#define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT)
+
+/* fd of the binary should be passed to the interpreter */
+#define BINPRM_FLAGS_EXECFD_BIT 1
+#define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT)
+
+
 /*
  * This structure defines the functions that are used to load the binary formats that
  * linux accepts.
--- diff/include/linux/bio.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/bio.h	2004-07-01 21:32:51.000000000 +0100
@@ -25,6 +25,15 @@
 
 /* Platforms may set this to teach the BIO layer about IOMMU hardware. */
 #include <asm/io.h>
+
+#if defined(BIO_VMERGE_MAX_SIZE) && defined(BIO_VMERGE_BOUNDARY)
+#define BIOVEC_VIRT_START_SIZE(x) (bvec_to_phys(x) & (BIO_VMERGE_BOUNDARY - 1))
+#define BIOVEC_VIRT_OVERSIZE(x)	((x) > BIO_VMERGE_MAX_SIZE)
+#else
+#define BIOVEC_VIRT_START_SIZE(x)	0
+#define BIOVEC_VIRT_OVERSIZE(x)		0
+#endif
+
 #ifndef BIO_VMERGE_BOUNDARY
 #define BIO_VMERGE_BOUNDARY	0
 #endif
@@ -81,6 +90,15 @@
 	unsigned short		bi_hw_segments;
 
 	unsigned int		bi_size;	/* residual I/O count */
+
+	/*
+	 * To keep track of the max hw size, we account for the
+	 * sizes of the first and last virtually mergeable segments
+	 * in this bio
+	 */
+	unsigned int		bi_hw_front_size;
+	unsigned int		bi_hw_back_size;
+
 	unsigned int		bi_max_vecs;	/* max bvl_vecs we can hold */
 
 	struct bio_vec		*bi_io_vec;	/* the actual vec list */
@@ -102,6 +120,7 @@
 #define BIO_SEG_VALID	3	/* nr_hw_seg valid */
 #define BIO_CLONED	4	/* doesn't own data */
 #define BIO_BOUNCED	5	/* bio is a bounce bio */
+#define BIO_EOPNOTSUPP	6	/* not supported */
 #define bio_flagged(bio, flag)	((bio)->bi_flags & (1 << (flag)))
 
 /*
@@ -141,6 +160,8 @@
 #define bio_data(bio)		(page_address(bio_page((bio))) + bio_offset((bio)))
 #define bio_barrier(bio)	((bio)->bi_rw & (1 << BIO_RW_BARRIER))
 #define bio_sync(bio)		((bio)->bi_rw & (1 << BIO_RW_SYNC))
+#define bio_failfast(bio)	((bio)->bi_rw & (1 << BIO_RW_FAILFAST))
+#define bio_rw_ahead(bio)	((bio)->bi_rw & (1 << BIO_RW_AHEAD))
 
 /*
  * will die
--- diff/include/linux/bitmap.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/bitmap.h	2004-07-01 21:32:51.000000000 +0100
@@ -3,49 +3,249 @@
 
 #ifndef __ASSEMBLY__
 
-#include <linux/config.h>
-#include <linux/compiler.h>
 #include <linux/types.h>
-#include <linux/kernel.h>
 #include <linux/bitops.h>
 #include <linux/string.h>
 
-int bitmap_empty(const unsigned long *bitmap, int bits);
-int bitmap_full(const unsigned long *bitmap, int bits);
-int bitmap_equal(const unsigned long *bitmap1,
-			unsigned long *bitmap2, int bits);
-void bitmap_complement(unsigned long *bitmap, int bits);
+/*
+ * bitmaps provide bit arrays that consume one or more unsigned
+ * longs.  The bitmap interface and available operations are listed
+ * here, in bitmap.h
+ *
+ * Function implementations generic to all architectures are in
+ * lib/bitmap.c.  Functions implementations that are architecture
+ * specific are in various include/asm-<arch>/bitops.h headers
+ * and other arch/<arch> specific files.
+ *
+ * See lib/bitmap.c for more details.
+ */
+
+/*
+ * The available bitmap operations and their rough meaning in the
+ * case that the bitmap is a single unsigned long are thus:
+ *
+ * bitmap_zero(dst, nbits)			*dst = 0UL
+ * bitmap_fill(dst, nbits)			*dst = ~0UL
+ * bitmap_copy(dst, src, nbits)			*dst = *src
+ * bitmap_and(dst, src1, src2, nbits)		*dst = *src1 & *src2
+ * bitmap_or(dst, src1, src2, nbits)		*dst = *src1 | *src2
+ * bitmap_xor(dst, src1, src2, nbits)		*dst = *src1 ^ *src2
+ * bitmap_andnot(dst, src1, src2, nbits)	*dst = *src1 & ~(*src2)
+ * bitmap_complement(dst, src, nbits)		*dst = ~(*src)
+ * bitmap_equal(src1, src2, nbits)		Are *src1 and *src2 equal?
+ * bitmap_intersects(src1, src2, nbits) 	Do *src1 and *src2 overlap?
+ * bitmap_subset(src1, src2, nbits)		Is *src1 a subset of *src2?
+ * bitmap_empty(src, nbits)			Are all bits zero in *src?
+ * bitmap_full(src, nbits)			Are all bits set in *src?
+ * bitmap_weight(src, nbits)			Hamming Weight: number set bits
+ * bitmap_shift_right(dst, src, n, nbits)	*dst = *src >> n
+ * bitmap_shift_left(dst, src, n, nbits)	*dst = *src << n
+ * bitmap_scnprintf(buf, len, src, nbits)	Print bitmap src to buf
+ * bitmap_parse(ubuf, ulen, dst, nbits)		Parse bitmap dst from buf
+ */
+
+/*
+ * Also the following operations in asm/bitops.h apply to bitmaps.
+ *
+ * set_bit(bit, addr)			*addr |= bit
+ * clear_bit(bit, addr)			*addr &= ~bit
+ * change_bit(bit, addr)		*addr ^= bit
+ * test_bit(bit, addr)			Is bit set in *addr?
+ * test_and_set_bit(bit, addr)		Set bit and return old value
+ * test_and_clear_bit(bit, addr)	Clear bit and return old value
+ * test_and_change_bit(bit, addr)	Change bit and return old value
+ * find_first_zero_bit(addr, nbits)	Position first zero bit in *addr
+ * find_first_bit(addr, nbits)		Position first set bit in *addr
+ * find_next_zero_bit(addr, nbits, bit)	Position next zero bit in *addr >= bit
+ * find_next_bit(addr, nbits, bit)	Position next set bit in *addr >= bit
+ */
+
+/*
+ * The DECLARE_BITMAP(name,bits) macro, in linux/types.h, can be used
+ * to declare an array named 'name' of just enough unsigned longs to
+ * contain all bit positions from 0 to 'bits' - 1.
+ */
+
+/*
+ * lib/bitmap.c provides these functions:
+ */
+
+extern int __bitmap_empty(const unsigned long *bitmap, int bits);
+extern int __bitmap_full(const unsigned long *bitmap, int bits);
+extern int __bitmap_equal(const unsigned long *bitmap1,
+                	const unsigned long *bitmap2, int bits);
+extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
+			int bits);
+extern void __bitmap_shift_right(unsigned long *dst,
+                        const unsigned long *src, int shift, int bits);
+extern void __bitmap_shift_left(unsigned long *dst,
+                        const unsigned long *src, int shift, int bits);
+extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
+			const unsigned long *bitmap2, int bits);
+extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
+			const unsigned long *bitmap2, int bits);
+extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
+			const unsigned long *bitmap2, int bits);
+extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
+			const unsigned long *bitmap2, int bits);
+extern int __bitmap_intersects(const unsigned long *bitmap1,
+			const unsigned long *bitmap2, int bits);
+extern int __bitmap_subset(const unsigned long *bitmap1,
+			const unsigned long *bitmap2, int bits);
+extern int __bitmap_weight(const unsigned long *bitmap, int bits);
 
-static inline void bitmap_zero(unsigned long *bitmap, int bits)
+extern int bitmap_scnprintf(char *buf, unsigned int len,
+			const unsigned long *src, int nbits);
+extern int bitmap_parse(const char __user *ubuf, unsigned int ulen,
+			unsigned long *dst, int nbits);
+
+#define BITMAP_LAST_WORD_MASK(nbits)					\
+(									\
+	((nbits) % BITS_PER_LONG) ?					\
+		(1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL		\
+)
+
+static inline void bitmap_zero(unsigned long *dst, int nbits)
 {
-	memset(bitmap, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long));
+	if (nbits <= BITS_PER_LONG)
+		*dst = 0UL;
+	else {
+		int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
+		memset(dst, 0, len);
+	}
 }
 
-static inline void bitmap_fill(unsigned long *bitmap, int bits)
+static inline void bitmap_fill(unsigned long *dst, int nbits)
 {
-	memset(bitmap, 0xff, BITS_TO_LONGS(bits)*sizeof(unsigned long));
+	size_t nlongs = BITS_TO_LONGS(nbits);
+	if (nlongs > 1) {
+		int len = (nlongs - 1) * sizeof(unsigned long);
+		memset(dst, 0xff,  len);
+	}
+	dst[nlongs - 1] = BITMAP_LAST_WORD_MASK(nbits);
 }
 
-static inline void bitmap_copy(unsigned long *dst,
-			const unsigned long *src, int bits)
+static inline void bitmap_copy(unsigned long *dst, const unsigned long *src,
+			int nbits)
 {
-	int len = BITS_TO_LONGS(bits)*sizeof(unsigned long);
-	memcpy(dst, src, len);
+	if (nbits <= BITS_PER_LONG)
+		*dst = *src;
+	else {
+		int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
+		memcpy(dst, src, len);
+	}
 }
 
-void bitmap_shift_right(unsigned long *dst,
-			const unsigned long *src, int shift, int bits);
-void bitmap_shift_left(unsigned long *dst,
-			const unsigned long *src, int shift, int bits);
-void bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
-			const unsigned long *bitmap2, int bits);
-void bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
-			const unsigned long *bitmap2, int bits);
-int bitmap_weight(const unsigned long *bitmap, int bits);
-int bitmap_scnprintf(char *buf, unsigned int buflen,
-			const unsigned long *maskp, int bits);
-int bitmap_parse(const char __user *ubuf, unsigned int ubuflen,
-			unsigned long *maskp, int bits);
+static inline void bitmap_and(unsigned long *dst, const unsigned long *src1,
+			const unsigned long *src2, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		*dst = *src1 & *src2;
+	else
+		__bitmap_and(dst, src1, src2, nbits);
+}
+
+static inline void bitmap_or(unsigned long *dst, const unsigned long *src1,
+			const unsigned long *src2, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		*dst = *src1 | *src2;
+	else
+		__bitmap_or(dst, src1, src2, nbits);
+}
+
+static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1,
+			const unsigned long *src2, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		*dst = *src1 ^ *src2;
+	else
+		__bitmap_xor(dst, src1, src2, nbits);
+}
+
+static inline void bitmap_andnot(unsigned long *dst, const unsigned long *src1,
+			const unsigned long *src2, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		*dst = *src1 & ~(*src2);
+	else
+		__bitmap_andnot(dst, src1, src2, nbits);
+}
+
+static inline void bitmap_complement(unsigned long *dst, const unsigned long *src,
+			int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		*dst = ~(*src) & BITMAP_LAST_WORD_MASK(nbits);
+	else
+		__bitmap_complement(dst, src, nbits);
+}
+
+static inline int bitmap_equal(const unsigned long *src1,
+			const unsigned long *src2, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		return ! ((*src1 ^ *src2) & BITMAP_LAST_WORD_MASK(nbits));
+	else
+		return __bitmap_equal(src1, src2, nbits);
+}
+
+static inline int bitmap_intersects(const unsigned long *src1,
+			const unsigned long *src2, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		return ((*src1 & *src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0;
+	else
+		return __bitmap_intersects(src1, src2, nbits);
+}
+
+static inline int bitmap_subset(const unsigned long *src1,
+			const unsigned long *src2, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		return ! ((*src1 & ~(*src2)) & BITMAP_LAST_WORD_MASK(nbits));
+	else
+		return __bitmap_subset(src1, src2, nbits);
+}
+
+static inline int bitmap_empty(const unsigned long *src, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		return ! (*src & BITMAP_LAST_WORD_MASK(nbits));
+	else
+		return __bitmap_empty(src, nbits);
+}
+
+static inline int bitmap_full(const unsigned long *src, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		return ! (~(*src) & BITMAP_LAST_WORD_MASK(nbits));
+	else
+		return __bitmap_full(src, nbits);
+}
+
+static inline int bitmap_weight(const unsigned long *src, int nbits)
+{
+	return __bitmap_weight(src, nbits);
+}
+
+static inline void bitmap_shift_right(unsigned long *dst,
+			const unsigned long *src, int n, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		*dst = *src >> n;
+	else
+		__bitmap_shift_right(dst, src, n, nbits);
+}
+
+static inline void bitmap_shift_left(unsigned long *dst,
+			const unsigned long *src, int n, int nbits)
+{
+	if (nbits <= BITS_PER_LONG)
+		*dst = (*src << n) & BITMAP_LAST_WORD_MASK(nbits);
+	else
+		__bitmap_shift_left(dst, src, n, nbits);
+}
 
 #endif /* __ASSEMBLY__ */
 
--- diff/include/linux/blkdev.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/blkdev.h	2004-07-01 21:32:51.000000000 +0100
@@ -195,6 +195,8 @@
 	__REQ_PM_SUSPEND,	/* suspend request */
 	__REQ_PM_RESUME,	/* resume request */
 	__REQ_PM_SHUTDOWN,	/* shutdown request */
+	__REQ_BAR_PREFLUSH,	/* barrier pre-flush done */
+	__REQ_BAR_POSTFLUSH,	/* barrier post-flush */
 	__REQ_NR_BITS,		/* stops here */
 };
 
@@ -220,6 +222,8 @@
 #define REQ_PM_SUSPEND	(1 << __REQ_PM_SUSPEND)
 #define REQ_PM_RESUME	(1 << __REQ_PM_RESUME)
 #define REQ_PM_SHUTDOWN	(1 << __REQ_PM_SHUTDOWN)
+#define REQ_BAR_PREFLUSH	(1 << __REQ_BAR_PREFLUSH)
+#define REQ_BAR_POSTFLUSH	(1 << __REQ_BAR_POSTFLUSH)
 
 /*
  * State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME
@@ -248,6 +252,7 @@
 struct bio_vec;
 typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *);
 typedef void (activity_fn) (void *data, int rw);
+typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *);
 
 enum blk_queue_state {
 	Queue_down,
@@ -290,6 +295,7 @@
 	unplug_fn		*unplug_fn;
 	merge_bvec_fn		*merge_bvec_fn;
 	activity_fn		*activity_fn;
+	issue_flush_fn		*issue_flush_fn;
 
 	/*
 	 * Auto-unplugging state
@@ -373,6 +379,7 @@
 #define QUEUE_FLAG_DEAD		5	/* queue being torn down */
 #define QUEUE_FLAG_REENTER	6	/* Re-entrancy avoidance */
 #define QUEUE_FLAG_PLUGGED	7	/* queue is plugged */
+#define QUEUE_FLAG_ORDERED	8	/* supports ordered writes */
 
 #define blk_queue_plugged(q)	test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
 #define blk_queue_tagged(q)	test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
@@ -390,6 +397,10 @@
 #define blk_pm_request(rq)	\
 	((rq)->flags & (REQ_PM_SUSPEND | REQ_PM_RESUME))
 
+#define blk_barrier_rq(rq)	((rq)->flags & REQ_HARDBARRIER)
+#define blk_barrier_preflush(rq)	((rq)->flags & REQ_BAR_PREFLUSH)
+#define blk_barrier_postflush(rq)	((rq)->flags & REQ_BAR_POSTFLUSH)
+
 #define list_entry_rq(ptr)	list_entry((ptr), struct request, queuelist)
 
 #define rq_data_dir(rq)		((rq)->flags & 1)
@@ -560,6 +571,14 @@
 extern int process_that_request_first(struct request *, unsigned int);
 extern void end_request(struct request *req, int uptodate);
 
+/*
+ * end_that_request_first/chunk() takes an uptodate argument. we account
+ * any value <= as an io error. 0 means -EIO for compatability reasons,
+ * any other < 0 value is the direct error type. An uptodate value of
+ * 1 indicates successful io completion
+ */
+#define end_io_error(uptodate)	(unlikely((uptodate) <= 0))
+
 static inline void blkdev_dequeue_request(struct request *req)
 {
 	BUG_ON(list_empty(&req->queuelist));
@@ -588,10 +607,14 @@
 extern void blk_queue_merge_bvec(request_queue_t *, merge_bvec_fn *);
 extern void blk_queue_dma_alignment(request_queue_t *, int);
 extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
+extern void blk_queue_ordered(request_queue_t *, int);
+extern void blk_queue_issue_flush_fn(request_queue_t *, issue_flush_fn *);
+extern int blkdev_scsi_issue_flush_fn(request_queue_t *, struct gendisk *, sector_t *);
 
 extern int blk_rq_map_sg(request_queue_t *, struct request *, struct scatterlist *);
 extern void blk_dump_rq_flags(struct request *, char *);
 extern void generic_unplug_device(request_queue_t *);
+extern void __generic_unplug_device(request_queue_t *);
 extern long nr_blockdev_pages(void);
 
 int blk_get_queue(request_queue_t *);
@@ -615,6 +638,7 @@
 
 extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *);
 extern void blk_rq_prep_restart(struct request *);
+extern int blkdev_issue_flush(struct block_device *, sector_t *);
 
 #define MAX_PHYS_SEGMENTS 128
 #define MAX_HW_SEGMENTS 128
--- diff/include/linux/bootmem.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/bootmem.h	2004-07-01 21:32:51.000000000 +0100
@@ -67,4 +67,12 @@
 	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0)
 #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
 
+extern void *__init alloc_large_system_hash(const char *tablename,
+					    unsigned long bucketsize,
+					    unsigned long numentries,
+					    int scale,
+					    int consider_highmem,
+					    unsigned int *_hash_shift,
+					    unsigned int *_hash_mask);
+
 #endif /* _LINUX_BOOTMEM_H */
--- diff/include/linux/buffer_head.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/buffer_head.h	2004-07-01 21:32:51.000000000 +0100
@@ -26,6 +26,8 @@
 	BH_Delay,	/* Buffer is not yet allocated on disk */
 	BH_Boundary,	/* Block is followed by a discontiguity */
 	BH_Write_EIO,	/* I/O error on write */
+	BH_Ordered,	/* ordered write */
+	BH_Eopnotsupp,	/* operation not supported (barrier) */
 
 	BH_PrivateStart,/* not a state bit, but the first bit available
 			 * for private allocation by other entities
@@ -110,7 +112,9 @@
 BUFFER_FNS(Async_Write, async_write)
 BUFFER_FNS(Delay, delay)
 BUFFER_FNS(Boundary, boundary)
-BUFFER_FNS(Write_EIO,write_io_error)
+BUFFER_FNS(Write_EIO, write_io_error)
+BUFFER_FNS(Ordered, ordered)
+BUFFER_FNS(Eopnotsupp, eopnotsupp)
 
 #define bh_offset(bh)		((unsigned long)(bh)->b_data & ~PAGE_MASK)
 #define touch_buffer(bh)	mark_page_accessed(bh->b_page)
@@ -172,8 +176,8 @@
 void FASTCALL(unlock_buffer(struct buffer_head *bh));
 void FASTCALL(__lock_buffer(struct buffer_head *bh));
 void ll_rw_block(int, int, struct buffer_head * bh[]);
-void sync_dirty_buffer(struct buffer_head *bh);
-void submit_bh(int, struct buffer_head *);
+int sync_dirty_buffer(struct buffer_head *bh);
+int submit_bh(int, struct buffer_head *);
 void write_boundary_block(struct block_device *bdev,
 			sector_t bblock, unsigned blocksize);
 
--- diff/include/linux/byteorder/swab.h	2004-05-19 22:13:04.000000000 +0100
+++ source/include/linux/byteorder/swab.h	2004-07-01 21:32:51.000000000 +0100
@@ -134,7 +134,7 @@
 {
 	return __arch__swab16(x);
 }
-static __inline__ __u16 __swab16p(__u16 *x)
+static __inline__ __u16 __swab16p(const __u16 *x)
 {
 	return __arch__swab16p(x);
 }
@@ -147,7 +147,7 @@
 {
 	return __arch__swab32(x);
 }
-static __inline__ __u32 __swab32p(__u32 *x)
+static __inline__ __u32 __swab32p(const __u32 *x)
 {
 	return __arch__swab32p(x);
 }
@@ -167,7 +167,7 @@
 	return __arch__swab64(x);
 #  endif
 }
-static __inline__ __u64 __swab64p(__u64 *x)
+static __inline__ __u64 __swab64p(const __u64 *x)
 {
 	return __arch__swab64p(x);
 }
--- diff/include/linux/cciss_ioctl.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/cciss_ioctl.h	2004-07-01 21:32:51.000000000 +0100
@@ -206,7 +206,35 @@
 #define CCISS_REGNEWDISK  _IOW(CCISS_IOC_MAGIC, 13, int)
 
 #define CCISS_REGNEWD	   _IO(CCISS_IOC_MAGIC, 14)
+#define CCISS_RESCANDISK   _IO(CCISS_IOC_MAGIC, 16)
 #define CCISS_GETLUNINFO   _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct)
 #define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct)
 
+#ifdef __KERNEL__
+#ifdef CONFIG_COMPAT
+
+/* 32 bit compatible ioctl structs */
+typedef struct _IOCTL32_Command_struct {
+  LUNAddr_struct	   LUN_info;
+  RequestBlock_struct      Request;
+  ErrorInfo_struct  	   error_info;
+  WORD			   buf_size;  /* size in bytes of the buf */
+  __u32			   buf; /* 32 bit pointer to data buffer */
+} IOCTL32_Command_struct;
+
+typedef struct _BIG_IOCTL32_Command_struct {
+  LUNAddr_struct	   LUN_info;
+  RequestBlock_struct      Request;
+  ErrorInfo_struct  	   error_info;
+  DWORD			   malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */
+  DWORD			   buf_size;    /* size in bytes of the buf */
+  				        /* < malloc_size * MAXSGENTRIES */
+  __u32 		buf;	/* 32 bit pointer to data buffer */
+} BIG_IOCTL32_Command_struct;
+
+#define CCISS_PASSTHRU32   _IOWR(CCISS_IOC_MAGIC, 11, IOCTL32_Command_struct)
+#define CCISS_BIG_PASSTHRU32 _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL32_Command_struct)
+
+#endif /* CONFIG_COMPAT */
+#endif /* __KERNEL__ */
 #endif  
--- diff/include/linux/compat_ioctl.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/compat_ioctl.h	2004-07-01 21:32:51.000000000 +0100
@@ -728,3 +728,20 @@
 COMPATIBLE_IOCTL(SIOCGIWRETRY)
 COMPATIBLE_IOCTL(SIOCSIWPOWER)
 COMPATIBLE_IOCTL(SIOCGIWPOWER)
+/* hiddev */
+COMPATIBLE_IOCTL(HIDIOCGVERSION)
+COMPATIBLE_IOCTL(HIDIOCAPPLICATION)
+COMPATIBLE_IOCTL(HIDIOCGDEVINFO)
+COMPATIBLE_IOCTL(HIDIOCGSTRING)
+COMPATIBLE_IOCTL(HIDIOCINITREPORT)
+COMPATIBLE_IOCTL(HIDIOCGREPORT)
+COMPATIBLE_IOCTL(HIDIOCSREPORT)
+COMPATIBLE_IOCTL(HIDIOCGREPORTINFO)
+COMPATIBLE_IOCTL(HIDIOCGFIELDINFO)
+COMPATIBLE_IOCTL(HIDIOCGUSAGE)
+COMPATIBLE_IOCTL(HIDIOCSUSAGE)
+COMPATIBLE_IOCTL(HIDIOCGUCODE)
+COMPATIBLE_IOCTL(HIDIOCGFLAG)
+COMPATIBLE_IOCTL(HIDIOCSFLAG)
+COMPATIBLE_IOCTL(HIDIOCGCOLLECTIONINDEX)
+COMPATIBLE_IOCTL(HIDIOCGCOLLECTIONINFO)
--- diff/include/linux/compiler-gcc+.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/compiler-gcc+.h	2004-07-01 21:32:51.000000000 +0100
@@ -13,3 +13,4 @@
 #define __attribute_used__	__attribute__((__used__))
 #define __attribute_pure__	__attribute__((pure))
 #define __attribute_const__	__attribute__((__const__))
+#define __must_check 		__attribute__((warn_unused_result))
--- diff/include/linux/compiler-gcc.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/compiler-gcc.h	2004-07-01 21:32:51.000000000 +0100
@@ -13,5 +13,5 @@
    shouldn't recognize the original var, and make assumptions about it */
 #define RELOC_HIDE(ptr, off)					\
   ({ unsigned long __ptr;					\
-    __asm__ ("" : "=g"(__ptr) : "0"(ptr));		\
+	__asm__ ("" : "=r"(__ptr) : "0"(ptr));			\
     (typeof(ptr)) (__ptr + (off)); })
--- diff/include/linux/compiler-gcc3.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/compiler-gcc3.h	2004-07-01 21:32:51.000000000 +0100
@@ -25,3 +25,6 @@
 #if __GNUC_MINOR__ >= 1
 #define  noinline __attribute__((noinline))
 #endif
+#if __GNUC_MINOR__ >= 4
+#define __must_check __attribute__((warn_unused_result))
+#endif
--- diff/include/linux/compiler.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/compiler.h	2004-07-01 21:32:51.000000000 +0100
@@ -69,6 +69,10 @@
 # define __deprecated		/* unimplemented */
 #endif
 
+#ifndef __must_check
+#define __must_check
+#endif
+
 /*
  * Allow us to avoid 'defined but not used' warnings on functions and data,
  * as well as force them to be emitted to the assembly file.
--- diff/include/linux/config.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/config.h	2004-07-01 21:32:51.000000000 +0100
@@ -2,5 +2,8 @@
 #define _LINUX_CONFIG_H
 
 #include <linux/autoconf.h>
+#ifdef CONFIG_X86
+#include <asm/kgdb.h>
+#endif
 
 #endif
--- diff/include/linux/console.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/console.h	2004-07-01 21:32:51.000000000 +0100
@@ -104,6 +104,9 @@
 extern void release_console_sem(void);
 extern void console_conditional_schedule(void);
 extern void console_unblank(void);
+extern struct tty_driver *console_device(int *);
+extern void console_stop(struct console *);
+extern void console_start(struct console *);
 extern int is_console_locked(void);
 
 /* Some debug stub to catch some of the obvious races in the VT code */
--- diff/include/linux/cpu.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/cpu.h	2004-07-01 21:32:51.000000000 +0100
@@ -27,6 +27,7 @@
 
 struct cpu {
 	int node_id;		/* The node which contains the CPU */
+	int no_control;		/* Should the sysfs control file be created? */
 	struct sys_device sysdev;
 };
 
--- diff/include/linux/cpumask.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/cpumask.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,56 +1,371 @@
 #ifndef __LINUX_CPUMASK_H
 #define __LINUX_CPUMASK_H
 
+/*
+ * Cpumasks provide a bitmap suitable for representing the
+ * set of CPU's in a system, one bit position per CPU number.
+ *
+ * See detailed comments in the file linux/bitmap.h describing the
+ * data type on which these cpumasks are based.
+ *
+ * For details of cpumask_scnprintf() and cpumask_parse(),
+ * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c.
+ *
+ * The available cpumask operations are:
+ *
+ * void cpu_set(cpu, mask)		turn on bit 'cpu' in mask
+ * void cpu_clear(cpu, mask)		turn off bit 'cpu' in mask
+ * void cpus_setall(mask)		set all bits
+ * void cpus_clear(mask)		clear all bits
+ * int cpu_isset(cpu, mask)		true iff bit 'cpu' set in mask
+ * int cpu_test_and_set(cpu, mask)	test and set bit 'cpu' in mask
+ *
+ * void cpus_and(dst, src1, src2)	dst = src1 & src2  [intersection]
+ * void cpus_or(dst, src1, src2)	dst = src1 | src2  [union]
+ * void cpus_xor(dst, src1, src2)	dst = src1 ^ src2
+ * void cpus_andnot(dst, src1, src2)	dst = src1 & ~src2
+ * void cpus_complement(dst, src)	dst = ~src
+ *
+ * int cpus_equal(mask1, mask2)		Does mask1 == mask2?
+ * int cpus_intersects(mask1, mask2)	Do mask1 and mask2 intersect?
+ * int cpus_subset(mask1, mask2)	Is mask1 a subset of mask2?
+ * int cpus_empty(mask)			Is mask empty (no bits sets)?
+ * int cpus_full(mask)			Is mask full (all bits sets)?
+ * int cpus_weight(mask)		Hamming weigh - number of set bits
+ *
+ * void cpus_shift_right(dst, src, n)	Shift right
+ * void cpus_shift_left(dst, src, n)	Shift left
+ *
+ * int first_cpu(mask)			Number lowest set bit, or NR_CPUS
+ * int next_cpu(cpu, mask)		Next cpu past 'cpu', or NR_CPUS
+ *
+ * cpumask_t cpumask_of_cpu(cpu)	Return cpumask with bit 'cpu' set
+ * CPU_MASK_ALL				Initializer - all bits set
+ * CPU_MASK_NONE			Initializer - no bits set
+ * unsigned long *cpus_addr(mask)	Array of unsigned long's in mask
+ *
+ * int cpumask_scnprintf(buf, len, mask) Format cpumask for printing
+ * int cpumask_parse(ubuf, ulen, mask)	Parse ascii string as cpumask
+ *
+ * for_each_cpu_mask(cpu, mask)		for-loop cpu over mask
+ *
+ * int num_online_cpus()		Number of online CPUs
+ * int num_possible_cpus()		Number of all possible CPUs
+ * int num_present_cpus()		Number of present CPUs
+ *
+ * int cpu_online(cpu)			Is some cpu online?
+ * int cpu_possible(cpu)		Is some cpu possible?
+ * int cpu_present(cpu)			Is some cpu present (can schedule)?
+ *
+ * int any_online_cpu(mask)		First online cpu in mask
+ *
+ * for_each_cpu(cpu)			for-loop cpu over cpu_possible_map
+ * for_each_online_cpu(cpu)		for-loop cpu over cpu_online_map
+ * for_each_present_cpu(cpu)		for-loop cpu over cpu_present_map
+ *
+ * Subtlety:
+ * 1) The 'type-checked' form of cpu_isset() causes gcc (3.3.2, anyway)
+ *    to generate slightly worse code.  Note for example the additional
+ *    40 lines of assembly code compiling the "for each possible cpu"
+ *    loops buried in the disk_stat_read() macros calls when compiling
+ *    drivers/block/genhd.c (arch i386, CONFIG_SMP=y).  So use a simple
+ *    one-line #define for cpu_isset(), instead of wrapping an inline
+ *    inside a macro, the way we do the other calls.
+ */
+
 #include <linux/threads.h>
 #include <linux/bitmap.h>
-#include <asm/cpumask.h>
 #include <asm/bug.h>
 
-#ifdef CONFIG_SMP
+typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
+extern cpumask_t _unused_cpumask_arg_;
+
+#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
+static inline void __cpu_set(int cpu, volatile cpumask_t *dstp)
+{
+	set_bit(cpu, dstp->bits);
+}
+
+#define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst))
+static inline void __cpu_clear(int cpu, volatile cpumask_t *dstp)
+{
+	clear_bit(cpu, dstp->bits);
+}
+
+#define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS)
+static inline void __cpus_setall(cpumask_t *dstp, int nbits)
+{
+	bitmap_fill(dstp->bits, nbits);
+}
+
+#define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS)
+static inline void __cpus_clear(cpumask_t *dstp, int nbits)
+{
+	bitmap_zero(dstp->bits, nbits);
+}
+
+/* No static inline type checking - see Subtlety (1) above. */
+#define cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits)
+
+#define cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask))
+static inline int __cpu_test_and_set(int cpu, cpumask_t *addr)
+{
+	return test_and_set_bit(cpu, addr->bits);
+}
+
+#define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS)
+static inline void __cpus_and(cpumask_t *dstp, cpumask_t *src1p,
+					cpumask_t *src2p, int nbits)
+{
+	bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
+}
+
+#define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS)
+static inline void __cpus_or(cpumask_t *dstp, cpumask_t *src1p,
+					cpumask_t *src2p, int nbits)
+{
+	bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
+}
+
+#define cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS)
+static inline void __cpus_xor(cpumask_t *dstp, cpumask_t *src1p,
+					cpumask_t *src2p, int nbits)
+{
+	bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
+}
+
+#define cpus_andnot(dst, src1, src2) \
+				__cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS)
+static inline void __cpus_andnot(cpumask_t *dstp, cpumask_t *src1p,
+					cpumask_t *src2p, int nbits)
+{
+	bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
+}
+
+#define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS)
+static inline void __cpus_complement(cpumask_t *dstp,
+					cpumask_t *srcp, int nbits)
+{
+	bitmap_complement(dstp->bits, srcp->bits, nbits);
+}
+
+#define cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS)
+static inline int __cpus_equal(cpumask_t *src1p,
+					cpumask_t *src2p, int nbits)
+{
+	return bitmap_equal(src1p->bits, src2p->bits, nbits);
+}
+
+#define cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS)
+static inline int __cpus_intersects(cpumask_t *src1p,
+					cpumask_t *src2p, int nbits)
+{
+	return bitmap_intersects(src1p->bits, src2p->bits, nbits);
+}
+
+#define cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS)
+static inline int __cpus_subset(cpumask_t *src1p,
+					cpumask_t *src2p, int nbits)
+{
+	return bitmap_subset(src1p->bits, src2p->bits, nbits);
+}
+
+#define cpus_empty(src) __cpus_empty(&(src), NR_CPUS)
+static inline int __cpus_empty(const cpumask_t *srcp, int nbits)
+{
+	return bitmap_empty(srcp->bits, nbits);
+}
+
+#define cpus_full(cpumask) __cpus_full(&(cpumask), NR_CPUS)
+static inline int __cpus_full(const cpumask_t *srcp, int nbits)
+{
+	return bitmap_full(srcp->bits, nbits);
+}
+
+#define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS)
+static inline int __cpus_weight(const cpumask_t *srcp, int nbits)
+{
+	return bitmap_weight(srcp->bits, nbits);
+}
+
+#define cpus_shift_right(dst, src, n) \
+			__cpus_shift_right(&(dst), &(src), (n), NR_CPUS)
+static inline void __cpus_shift_right(cpumask_t *dstp,
+					const cpumask_t *srcp, int n, int nbits)
+{
+	bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
+}
+
+#define cpus_shift_left(dst, src, n) \
+			__cpus_shift_left(&(dst), &(src), (n), NR_CPUS)
+static inline void __cpus_shift_left(cpumask_t *dstp,
+					const cpumask_t *srcp, int n, int nbits)
+{
+	bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
+}
+
+#define first_cpu(src) __first_cpu(&(src), NR_CPUS)
+static inline int __first_cpu(const cpumask_t *srcp, int nbits)
+{
+	return find_first_bit(srcp->bits, nbits);
+}
+
+#define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS)
+static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits)
+{
+	return find_next_bit(srcp->bits, nbits, n+1);
+}
+
+#define cpumask_of_cpu(cpu)						\
+({									\
+	typeof(_unused_cpumask_arg_) m;					\
+	if (sizeof(m) == sizeof(unsigned long)) {			\
+		m.bits[0] = 1UL<<(cpu);					\
+	} else {							\
+		cpus_clear(m);						\
+		cpu_set((cpu), m);					\
+	}								\
+	m;								\
+})
+
+#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)
+
+#if NR_CPUS <= BITS_PER_LONG
+
+#define CPU_MASK_ALL							\
+((cpumask_t) { {							\
+	[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD			\
+} })
+
+#else
+
+#define CPU_MASK_ALL							\
+((cpumask_t) { {							\
+	[0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL,			\
+	[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD			\
+} })
+
+#endif
+
+#define CPU_MASK_NONE							\
+((cpumask_t) { {							\
+	[0 ... BITS_TO_LONGS(NR_CPUS)-1] =  0UL				\
+} })
+
+#define cpus_addr(src) ((src).bits)
+
+#define cpumask_scnprintf(buf, len, src) \
+			__cpumask_scnprintf((buf), (len), &(src), NR_CPUS)
+static inline int __cpumask_scnprintf(char *buf, int len,
+					cpumask_t *srcp, int nbits)
+{
+	return bitmap_scnprintf(buf, len, srcp->bits, nbits);
+}
+
+#define cpumask_parse(ubuf, ulen, src) \
+			__cpumask_parse((ubuf), (ulen), &(src), NR_CPUS)
+static inline int __cpumask_parse(const char __user *buf, int len,
+					cpumask_t *srcp, int nbits)
+{
+	return bitmap_parse(buf, len, srcp->bits, nbits);
+}
+
+#if NR_CPUS > 1
+#define for_each_cpu_mask(cpu, mask)		\
+	for ((cpu) = first_cpu(mask);		\
+		(cpu) < NR_CPUS;		\
+		(cpu) = next_cpu((cpu), (mask)))
+#else /* NR_CPUS == 1 */
+#define for_each_cpu_mask(cpu, mask) for ((cpu) = 0; (cpu) < 1; (cpu)++)
+#endif /* NR_CPUS */
+
+/*
+ * The following particular system cpumasks and operations manage
+ * possible, present and online cpus.  Each of them is a fixed size
+ * bitmap of size NR_CPUS.
+ *
+ *  #ifdef CONFIG_HOTPLUG_CPU
+ *     cpu_possible_map - all NR_CPUS bits set
+ *     cpu_present_map  - has bit 'cpu' set iff cpu is populated
+ *     cpu_online_map   - has bit 'cpu' set iff cpu available to scheduler
+ *  #else
+ *     cpu_possible_map - has bit 'cpu' set iff cpu is populated
+ *     cpu_present_map  - copy of cpu_possible_map
+ *     cpu_online_map   - has bit 'cpu' set iff cpu available to scheduler
+ *  #endif
+ *
+ *  In either case, NR_CPUS is fixed at compile time, as the static
+ *  size of these bitmaps.  The cpu_possible_map is fixed at boot
+ *  time, as the set of CPU id's that it is possible might ever
+ *  be plugged in at anytime during the life of that system boot.
+ *  The cpu_present_map is dynamic(*), representing which CPUs
+ *  are currently plugged in.  And cpu_online_map is the dynamic
+ *  subset of cpu_present_map, indicating those CPUs available
+ *  for scheduling.
+ *
+ *  If HOTPLUG is enabled, then cpu_possible_map is forced to have
+ *  all NR_CPUS bits set, otherwise it is just the set of CPUs that
+ *  ACPI reports present at boot.
+ *
+ *  If HOTPLUG is enabled, then cpu_present_map varies dynamically,
+ *  depending on what ACPI reports as currently plugged in, otherwise
+ *  cpu_present_map is just a copy of cpu_possible_map.
+ *
+ *  (*) Well, cpu_present_map is dynamic in the hotplug case.  If not
+ *      hotplug, it's a copy of cpu_possible_map, hence fixed at boot.
+ *
+ * Subtleties:
+ * 1) UP arch's (NR_CPUS == 1, CONFIG_SMP not defined) hardcode
+ *    assumption that their single CPU is online.  The UP
+ *    cpu_{online,possible,present}_maps are placebos.  Changing them
+ *    will have no useful affect on the following num_*_cpus()
+ *    and cpu_*() macros in the UP case.  This ugliness is a UP
+ *    optimization - don't waste any instructions or memory references
+ *    asking if you're online or how many CPUs there are if there is
+ *    only one CPU.
+ * 2) Most SMP arch's #define some of these maps to be some
+ *    other map specific to that arch.  Therefore, the following
+ *    must be #define macros, not inlines.  To see why, examine
+ *    the assembly code produced by the following.  Note that
+ *    set1() writes phys_x_map, but set2() writes x_map:
+ *        int x_map, phys_x_map;
+ *        #define set1(a) x_map = a
+ *        inline void set2(int a) { x_map = a; }
+ *        #define x_map phys_x_map
+ *        main(){ set1(3); set2(5); }
+ */
 
-extern cpumask_t cpu_online_map;
 extern cpumask_t cpu_possible_map;
+extern cpumask_t cpu_online_map;
 extern cpumask_t cpu_present_map;
 
-#define num_online_cpus()		cpus_weight(cpu_online_map)
-#define num_possible_cpus()		cpus_weight(cpu_possible_map)
-#define num_present_cpus()		cpus_weight(cpu_present_map)
-
-#define cpu_online(cpu)			cpu_isset(cpu, cpu_online_map)
-#define cpu_possible(cpu)		cpu_isset(cpu, cpu_possible_map)
-#define cpu_present(cpu)		cpu_isset(cpu, cpu_present_map)
-
-#define for_each_cpu_mask(cpu, mask)					\
-	for (cpu = first_cpu_const(mk_cpumask_const(mask));		\
-		cpu < NR_CPUS;						\
-		cpu = next_cpu_const(cpu, mk_cpumask_const(mask)))
-
-#define for_each_cpu(cpu) for_each_cpu_mask(cpu, cpu_possible_map)
-#define for_each_online_cpu(cpu) for_each_cpu_mask(cpu, cpu_online_map)
-#define for_each_present_cpu(cpu) for_each_cpu_mask(cpu, cpu_present_map)
+#if NR_CPUS > 1
+#define num_online_cpus()	cpus_weight(cpu_online_map)
+#define num_possible_cpus()	cpus_weight(cpu_possible_map)
+#define num_present_cpus()	cpus_weight(cpu_present_map)
+#define cpu_online(cpu)		cpu_isset((cpu), cpu_online_map)
+#define cpu_possible(cpu)	cpu_isset((cpu), cpu_possible_map)
+#define cpu_present(cpu)	cpu_isset((cpu), cpu_present_map)
 #else
-#define	cpu_online_map			cpumask_of_cpu(0)
-#define	cpu_possible_map		cpumask_of_cpu(0)
-#define	cpu_present_map			cpumask_of_cpu(0)
-
-#define num_online_cpus()		1
-#define num_possible_cpus()		1
-#define num_present_cpus()		1
-
-#define cpu_online(cpu)			({ BUG_ON((cpu) != 0); 1; })
-#define cpu_possible(cpu)		({ BUG_ON((cpu) != 0); 1; })
-#define cpu_present(cpu)		({ BUG_ON((cpu) != 0); 1; })
-
-#define for_each_cpu_mask(cpu, mask) for (cpu = 0; cpu < 1; cpu++)
-#define for_each_cpu(cpu) for (cpu = 0; cpu < 1; cpu++)
-#define for_each_online_cpu(cpu) for (cpu = 0; cpu < 1; cpu++)
-#define for_each_present_cpu(cpu) for (cpu = 0; cpu < 1; cpu++)
+#define num_online_cpus()	1
+#define num_possible_cpus()	1
+#define num_present_cpus()	1
+#define cpu_online(cpu)		((cpu) == 0)
+#define cpu_possible(cpu)	((cpu) == 0)
+#define cpu_present(cpu)	((cpu) == 0)
 #endif
 
-#define cpumask_scnprintf(buf, buflen, map)				\
-	bitmap_scnprintf(buf, buflen, cpus_addr(map), NR_CPUS)
-
-#define cpumask_parse(buf, buflen, map)					\
-	bitmap_parse(buf, buflen, cpus_addr(map), NR_CPUS)
+#define any_online_cpu(mask)			\
+({						\
+	int cpu;				\
+	for_each_cpu_mask(cpu, (mask))		\
+		if (cpu_online(cpu))		\
+			break;			\
+	cpu;					\
+})
+
+#define for_each_cpu(cpu)	  for_each_cpu_mask((cpu), cpu_possible_map)
+#define for_each_online_cpu(cpu)  for_each_cpu_mask((cpu), cpu_online_map)
+#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
 
 #endif /* __LINUX_CPUMASK_H */
--- diff/include/linux/dcache.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/dcache.h	2004-07-01 21:32:51.000000000 +0100
@@ -313,6 +313,8 @@
 extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *);
 extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
 
+extern int sysctl_vfs_cache_pressure;
+
 #endif /* __KERNEL__ */
 
 #endif	/* __LINUX_DCACHE_H */
--- diff/include/linux/device.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/device.h	2004-07-01 21:32:51.000000000 +0100
@@ -54,6 +54,10 @@
 	struct kset		drivers;
 	struct kset		devices;
 
+	struct bus_attribute	* bus_attrs;
+	struct device_attribute	* dev_attrs;
+	struct driver_attribute	* drv_attrs;
+
 	int		(*match)(struct device * dev, struct device_driver * drv);
 	struct device * (*add)	(struct device * parent, char * bus_id);
 	int		(*hotplug) (struct device *dev, char **envp, 
@@ -90,11 +94,7 @@
 };
 
 #define BUS_ATTR(_name,_mode,_show,_store)	\
-struct bus_attribute bus_attr_##_name = { 		\
-	.attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE },	\
-	.show	= _show,				\
-	.store	= _store,				\
-};
+struct bus_attribute bus_attr_##_name = __ATTR(_name,_mode,_show,_store)
 
 extern int bus_create_file(struct bus_type *, struct bus_attribute *);
 extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
@@ -120,6 +120,7 @@
 
 extern struct device_driver * get_driver(struct device_driver * drv);
 extern void put_driver(struct device_driver * drv);
+extern struct device_driver *driver_find(const char *name, struct bus_type *bus);
 
 
 /* driverfs interface for exporting driver attributes */
@@ -131,11 +132,7 @@
 };
 
 #define DRIVER_ATTR(_name,_mode,_show,_store)	\
-struct driver_attribute driver_attr_##_name = { 		\
-	.attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE },	\
-	.show	= _show,				\
-	.store	= _store,				\
-};
+struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store)
 
 extern int driver_create_file(struct device_driver *, struct driver_attribute *);
 extern void driver_remove_file(struct device_driver *, struct driver_attribute *);
@@ -151,6 +148,9 @@
 	struct list_head	children;
 	struct list_head	interfaces;
 
+	struct class_attribute		* class_attrs;
+	struct class_device_attribute	* class_dev_attrs;
+
 	int	(*hotplug)(struct class_device *dev, char **envp, 
 			   int num_envp, char *buffer, int buffer_size);
 
@@ -172,11 +172,7 @@
 };
 
 #define CLASS_ATTR(_name,_mode,_show,_store)			\
-struct class_attribute class_attr_##_name = { 			\
-	.attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE },	\
-	.show	= _show,					\
-	.store	= _store,					\
-};
+struct class_attribute class_attr_##_name = __ATTR(_name,_mode,_show,_store) 
 
 extern int class_create_file(struct class *, const struct class_attribute *);
 extern void class_remove_file(struct class *, const struct class_attribute *);
@@ -224,11 +220,8 @@
 };
 
 #define CLASS_DEVICE_ATTR(_name,_mode,_show,_store)		\
-struct class_device_attribute class_device_attr_##_name = { 	\
-	.attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE },	\
-	.show	= _show,					\
-	.store	= _store,					\
-};
+struct class_device_attribute class_device_attr_##_name = 	\
+	__ATTR(_name,_mode,_show,_store)
 
 extern int class_device_create_file(struct class_device *, 
 				    const struct class_device_attribute *);
@@ -342,11 +335,7 @@
 };
 
 #define DEVICE_ATTR(_name,_mode,_show,_store) \
-struct device_attribute dev_attr_##_name = { 		\
-	.attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE },	\
-	.show	= _show,				\
-	.store	= _store,				\
-};
+struct device_attribute dev_attr_##_name = __ATTR(_name,_mode,_show,_store)
 
 
 extern int device_create_file(struct device *device, struct device_attribute * entry);
@@ -390,6 +379,12 @@
 extern struct bus_type platform_bus_type;
 extern struct device platform_bus;
 
+extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int);
+extern int platform_get_irq(struct platform_device *, unsigned int);
+extern int platform_add_devices(struct platform_device **, int);
+
+extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int);
+
 /* drivers/base/power.c */
 extern void device_shutdown(void);
 
--- diff/include/linux/dma-mapping.h	2004-05-19 22:12:59.000000000 +0100
+++ source/include/linux/dma-mapping.h	2004-07-01 21:32:51.000000000 +0100
@@ -19,6 +19,29 @@
 #define dma_sync_single		dma_sync_single_for_cpu
 #define dma_sync_sg		dma_sync_sg_for_cpu
 
+#ifndef ARCH_HAS_DMA_GET_REQUIRED_MASK
+static inline u64 dma_get_required_mask(struct device *dev)
+{
+	extern unsigned long max_pfn; /* defined in bootmem.h but may
+					 not be included */
+	u32 low_totalram = ((max_pfn - 1) << PAGE_SHIFT);
+	u32 high_totalram = ((max_pfn - 1) >> (32 - PAGE_SHIFT));
+	u64 mask;
+
+	if (!high_totalram) {
+		/* convert to mask just covering totalram */
+		low_totalram = (1 << (fls(low_totalram) - 1));
+		low_totalram += low_totalram - 1;
+		mask = low_totalram;
+	} else {
+		high_totalram = (1 << (fls(high_totalram) - 1));
+		high_totalram += high_totalram - 1;
+		mask = (((u64)high_totalram) << 32) + 0xffffffff;
+	}
+	return mask & *dev->dma_mask;
+}
+#endif
+
 #endif
 
 
--- diff/include/linux/edd.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/edd.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,6 +1,6 @@
 /*
  * linux/include/linux/edd.h
- *  Copyright (C) 2002, 2003 Dell Inc.
+ *  Copyright (C) 2002, 2003, 2004 Dell Inc.
  *  by Matt Domsch <Matt_Domsch@dell.com>
  *
  * structures and definitions for the int 13h, ax={41,48}h
@@ -9,8 +9,8 @@
  * available at http://www.t13.org/docs2002/d1572r0.pdf.  It is
  * very similar to D1484 Revision 3 http://www.t13.org/docs2002/d1484r3.pdf
  *
- * In a nutshell, arch/{i386,x86_64}/boot/setup.S populates a scratch table
- * in the empty_zero_block that contains a list of BIOS-enumerated
+ * In a nutshell, arch/{i386,x86_64}/boot/setup.S populates a scratch
+ * table in the boot_params that contains a list of BIOS-enumerated
  * boot devices.
  * In arch/{i386,x86_64}/kernel/setup.c, this information is
  * transferred into the edd structure, and in drivers/firmware/edd.c, that
@@ -31,8 +31,8 @@
 #define _LINUX_EDD_H
 
 #define EDDNR 0x1e9		/* addr of number of edd_info structs at EDDBUF
-				   in empty_zero_block - treat this as 1 byte  */
-#define EDDBUF	0x600		/* addr of edd_info structs in empty_zero_block */
+				   in boot_params - treat this as 1 byte  */
+#define EDDBUF	0x600		/* addr of edd_info structs in boot_params */
 #define EDDMAXNR 6		/* number of edd_info structs starting at EDDBUF  */
 #define EDDEXTSIZE 8		/* change these if you muck with the structures */
 #define EDDPARMSIZE 74
@@ -42,9 +42,13 @@
 #define EDDMAGIC1 0x55AA
 #define EDDMAGIC2 0xAA55
 
-#define READ_SECTORS 0x02
-#define MBR_SIG_OFFSET 0x1B8
-#define DISK80_SIG_BUFFER 0x2cc
+
+#define READ_SECTORS 0x02         /* int13 AH=0x02 is READ_SECTORS command */
+#define EDD_MBR_SIG_OFFSET 0x1B8  /* offset of signature in the MBR */
+#define EDD_MBR_SIG_BUF    0x290  /* addr in boot params */
+#define EDD_MBR_SIG_MAX 16        /* max number of signatures to store */
+#define EDD_MBR_SIG_NR_BUF 0x1ea  /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF
+				     in boot_params - treat this as 1 byte  */
 #ifndef __ASSEMBLY__
 
 #define EDD_EXT_FIXED_DISK_ACCESS           (1 << 0)
@@ -172,9 +176,14 @@
 	struct edd_device_params params;
 } __attribute__ ((packed));
 
-extern struct edd_info edd[EDDMAXNR];
-extern unsigned char eddnr;
-extern unsigned int edd_disk80_sig;
+struct edd {
+	unsigned int mbr_signature[EDD_MBR_SIG_MAX];
+	struct edd_info edd_info[EDDMAXNR];
+	unsigned char mbr_signature_nr;
+	unsigned char edd_info_nr;
+};
+
+extern struct edd edd;
 
 #endif				/*!__ASSEMBLY__ */
 
--- diff/include/linux/efi.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/efi.h	2004-07-01 21:32:51.000000000 +0100
@@ -305,6 +305,10 @@
 extern int __init efi_set_rtc_mmss(unsigned long nowtime);
 extern struct efi_memory_map memmap;
 
+#ifdef CONFIG_EFI_PCDP
+extern void __init efi_setup_pcdp_console(char *);
+#endif
+
 /*
  * We play games with efi_enabled so that the compiler will, if possible, remove
  * EFI-related code altogether.
--- diff/include/linux/errqueue.h	2004-05-19 22:12:59.000000000 +0100
+++ source/include/linux/errqueue.h	2004-07-01 21:32:51.000000000 +0100
@@ -22,6 +22,10 @@
 #ifdef __KERNEL__
 
 #include <linux/config.h>
+#include <net/ip.h>
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+#include <linux/ipv6.h>
+#endif
 
 #define SKB_EXT_ERR(skb) ((struct sock_exterr_skb *) ((skb)->cb))
 
--- diff/include/linux/ext3_fs.h	2004-05-19 22:12:59.000000000 +0100
+++ source/include/linux/ext3_fs.h	2004-07-01 21:32:51.000000000 +0100
@@ -33,11 +33,10 @@
 #undef EXT3FS_DEBUG
 
 /*
- * Define EXT3_PREALLOCATE to preallocate data blocks for expanding files
+ * Define EXT3_RESERVATION to reserve data blocks for expanding files
  */
-#undef  EXT3_PREALLOCATE /* @@@ Fix this! */
-#define EXT3_DEFAULT_PREALLOC_BLOCKS	8
-
+#define EXT3_DEFAULT_RESERVE_BLOCKS     8
+#define EXT3_MAX_RESERVE_BLOCKS         1024
 /*
  * Always enable hashed directories
  */
@@ -195,6 +194,32 @@
  */
 #define EXT3_STATE_JDATA		0x00000001 /* journaled data exists */
 #define EXT3_STATE_NEW			0x00000002 /* inode is newly created */
+#define EXT3_STATE_RESIZE		0x00000004 /* fake inode for resizing */
+
+
+/* Used to pass group descriptor data when online resize is done */
+struct ext3_new_group_input {
+	__u32 group;            /* Group number for this data */
+	__u32 block_bitmap;     /* Absolute block number of block bitmap */
+	__u32 inode_bitmap;     /* Absolute block number of inode bitmap */
+	__u32 inode_table;      /* Absolute block number of inode table start */
+	__u32 blocks_count;     /* Total number of blocks in this group */
+	__u16 reserved_blocks;  /* Number of reserved blocks in this group */
+	__u16 unused;
+};
+
+/* The struct ext3_new_group_input in kernel space, with free_blocks_count */
+struct ext3_new_group_data {
+	__u32 group;
+	__u32 block_bitmap;
+	__u32 inode_bitmap;
+	__u32 inode_table;
+	__u32 blocks_count;
+	__u16 reserved_blocks;
+	__u16 unused;
+	__u32 free_blocks_count;
+};
+
 
 /*
  * ioctl commands
@@ -203,11 +228,15 @@
 #define	EXT3_IOC_SETFLAGS		_IOW('f', 2, long)
 #define	EXT3_IOC_GETVERSION		_IOR('f', 3, long)
 #define	EXT3_IOC_SETVERSION		_IOW('f', 4, long)
+#define EXT3_IOC_GROUP_EXTEND		_IOW('f', 7, unsigned long)
+#define EXT3_IOC_GROUP_ADD		_IOW('f', 8,struct ext3_new_group_input)
 #define	EXT3_IOC_GETVERSION_OLD		_IOR('v', 1, long)
 #define	EXT3_IOC_SETVERSION_OLD		_IOW('v', 2, long)
 #ifdef CONFIG_JBD_DEBUG
 #define EXT3_IOC_WAIT_FOR_READONLY	_IOR('f', 99, long)
 #endif
+#define EXT3_IOC_GETRSVSZ		_IOR('r', 1, long)
+#define EXT3_IOC_SETRSVSZ		_IOW('r', 2, long)
 
 /*
  * Structure of an inode on the disk
@@ -306,24 +335,26 @@
 /*
  * Mount flags
  */
-#define EXT3_MOUNT_CHECK		0x0001	/* Do mount-time checks */
-#define EXT3_MOUNT_OLDALLOC		0x0002  /* Don't use the new Orlov allocator */
-#define EXT3_MOUNT_GRPID		0x0004	/* Create files with directory's group */
-#define EXT3_MOUNT_DEBUG		0x0008	/* Some debugging messages */
-#define EXT3_MOUNT_ERRORS_CONT		0x0010	/* Continue on errors */
-#define EXT3_MOUNT_ERRORS_RO		0x0020	/* Remount fs ro on errors */
-#define EXT3_MOUNT_ERRORS_PANIC		0x0040	/* Panic on errors */
-#define EXT3_MOUNT_MINIX_DF		0x0080	/* Mimics the Minix statfs */
-#define EXT3_MOUNT_NOLOAD		0x0100	/* Don't use existing journal*/
-#define EXT3_MOUNT_ABORT		0x0200	/* Fatal error detected */
-#define EXT3_MOUNT_DATA_FLAGS		0x0C00	/* Mode for data writes: */
-  #define EXT3_MOUNT_JOURNAL_DATA	0x0400	/* Write data to journal */
-  #define EXT3_MOUNT_ORDERED_DATA	0x0800	/* Flush data before commit */
-  #define EXT3_MOUNT_WRITEBACK_DATA	0x0C00	/* No data ordering */
-#define EXT3_MOUNT_UPDATE_JOURNAL	0x1000	/* Update the journal format */
-#define EXT3_MOUNT_NO_UID32		0x2000  /* Disable 32-bit UIDs */
-#define EXT3_MOUNT_XATTR_USER		0x4000	/* Extended user attributes */
-#define EXT3_MOUNT_POSIX_ACL		0x8000	/* POSIX Access Control Lists */
+#define EXT3_MOUNT_CHECK		0x00001	/* Do mount-time checks */
+#define EXT3_MOUNT_OLDALLOC		0x00002  /* Don't use the new Orlov allocator */
+#define EXT3_MOUNT_GRPID		0x00004	/* Create files with directory's group */
+#define EXT3_MOUNT_DEBUG		0x00008	/* Some debugging messages */
+#define EXT3_MOUNT_ERRORS_CONT		0x00010	/* Continue on errors */
+#define EXT3_MOUNT_ERRORS_RO		0x00020	/* Remount fs ro on errors */
+#define EXT3_MOUNT_ERRORS_PANIC		0x00040	/* Panic on errors */
+#define EXT3_MOUNT_MINIX_DF		0x00080	/* Mimics the Minix statfs */
+#define EXT3_MOUNT_NOLOAD		0x00100	/* Don't use existing journal*/
+#define EXT3_MOUNT_ABORT		0x00200	/* Fatal error detected */
+#define EXT3_MOUNT_DATA_FLAGS		0x00C00	/* Mode for data writes: */
+#define EXT3_MOUNT_JOURNAL_DATA		0x00400	/* Write data to journal */
+#define EXT3_MOUNT_ORDERED_DATA		0x00800	/* Flush data before commit */
+#define EXT3_MOUNT_WRITEBACK_DATA	0x00C00	/* No data ordering */
+#define EXT3_MOUNT_UPDATE_JOURNAL	0x01000	/* Update the journal format */
+#define EXT3_MOUNT_NO_UID32		0x02000  /* Disable 32-bit UIDs */
+#define EXT3_MOUNT_XATTR_USER		0x04000	/* Extended user attributes */
+#define EXT3_MOUNT_POSIX_ACL		0x08000	/* POSIX Access Control Lists */
+#define EXT3_MOUNT_RESERVATION		0x10000	/* Preallocation */
+#define EXT3_MOUNT_BARRIER		0x20000 /* Use block barriers */
 
 /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
 #ifndef _LINUX_EXT2_FS_H
@@ -417,7 +448,7 @@
 	 */
 	__u8	s_prealloc_blocks;	/* Nr of blocks to try to preallocate*/
 	__u8	s_prealloc_dir_blocks;	/* Nr to preallocate for dirs */
-	__u16	s_padding1;
+	__u16	s_reserved_gdt_blocks;	/* Per group desc for online growth */
 	/*
 	 * Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set.
 	 */
@@ -680,8 +711,7 @@
 /* balloc.c */
 extern int ext3_bg_has_super(struct super_block *sb, int group);
 extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
-extern int ext3_new_block (handle_t *, struct inode *, unsigned long,
-					    __u32 *, __u32 *, int *);
+extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *);
 extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long,
 			      unsigned long);
 extern unsigned long ext3_count_free_blocks (struct super_block *);
@@ -689,6 +719,7 @@
 extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb,
 						    unsigned int block_group,
 						    struct buffer_head ** bh);
+extern int ext3_should_retry_alloc(struct super_block *sb, int *retries);
 
 /* dir.c */
 extern int ext3_check_dir_entry(const char *, struct inode *,
@@ -728,6 +759,7 @@
 extern void ext3_delete_inode (struct inode *);
 extern int  ext3_sync_inode (handle_t *, struct inode *);
 extern void ext3_discard_prealloc (struct inode *);
+extern void ext3_discard_reservation (struct inode *);
 extern void ext3_dirty_inode(struct inode *);
 extern int ext3_change_inode_journal_flag(struct inode *, int);
 extern void ext3_truncate (struct inode *);
@@ -744,6 +776,13 @@
 extern int ext3_htree_fill_tree(struct file *dir_file, __u32 start_hash,
 				__u32 start_minor_hash, __u32 *next_hash);
 
+/* resize.c */
+extern int ext3_group_add(struct super_block *sb,
+				struct ext3_new_group_data *input);
+extern int ext3_group_extend(struct super_block *sb,
+				struct ext3_super_block *es,
+				unsigned long n_blocks_count);
+
 /* super.c */
 extern void ext3_error (struct super_block *, const char *, const char *, ...)
 	__attribute__ ((format (printf, 3, 4)));
--- diff/include/linux/ext3_fs_i.h	2004-05-19 22:12:59.000000000 +0100
+++ source/include/linux/ext3_fs_i.h	2004-07-01 21:32:51.000000000 +0100
@@ -18,8 +18,16 @@
 
 #include <linux/rwsem.h>
 
+struct reserve_window {
+	struct list_head 	rsv_list;
+	__u32			rsv_start;
+	__u32			rsv_end;
+	atomic_t		rsv_goal_size;
+	__u32			rsv_alloc_hit;
+};
+
 /*
- * second extended file system inode data in memory
+ * third extended file system inode data in memory
  */
 struct ext3_inode_info {
 	__u32	i_data[15];
@@ -57,10 +65,9 @@
 	 * allocation when we detect linearly ascending requests.
 	 */
 	__u32	i_next_alloc_goal;
-#ifdef EXT3_PREALLOCATE
-	__u32	i_prealloc_block;
-	__u32	i_prealloc_count;
-#endif
+	/* block reservation window */
+	struct reserve_window i_rsv_window;
+
 	__u32	i_dir_start_lookup;
 #ifdef CONFIG_EXT3_FS_XATTR
 	/*
--- diff/include/linux/ext3_fs_sb.h	2004-05-19 22:12:59.000000000 +0100
+++ source/include/linux/ext3_fs_sb.h	2004-07-01 21:32:51.000000000 +0100
@@ -59,6 +59,10 @@
 	struct percpu_counter s_dirs_counter;
 	struct blockgroup_lock s_blockgroup_lock;
 
+	/* head of the per fs reservation window tree */
+	spinlock_t s_rsv_window_lock;
+	struct reserve_window s_rsv_window_head;
+
 	/* Journaling */
 	struct inode * s_journal_inode;
 	struct journal_s * s_journal;
--- diff/include/linux/fb.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/fb.h	2004-07-01 21:32:51.000000000 +0100
@@ -125,7 +125,8 @@
 	unsigned long mmio_start;	/* Start of Memory Mapped I/O   */
 					/* (physical address) */
 	__u32 mmio_len;			/* Length of Memory Mapped I/O  */
-	__u32 accel;			/* Type of acceleration available */
+	__u32 accel;			/* Indicate to driver which	*/
+					/*  specific chip/card we have	*/
 	__u16 reserved[3];		/* Reserved for future compatibility */
 };
 
@@ -154,7 +155,7 @@
 #define FB_ACTIVATE_ALL	       64	/* change all VCs on this fb	*/
 #define FB_ACTIVATE_FORCE     128	/* force apply even when no change*/
 
-#define FB_ACCELF_TEXT		1	/* text mode acceleration */
+#define FB_ACCELF_TEXT		1	/* (OBSOLETE) see fb_info.flags and vc_mode */
 
 #define FB_SYNC_HOR_HIGH_ACT	1	/* horizontal sync high active	*/
 #define FB_SYNC_VERT_HIGH_ACT	2	/* vertical sync high active	*/
@@ -200,7 +201,7 @@
 	__u32 height;			/* height of picture in mm    */
 	__u32 width;			/* width of picture in mm     */
 
-	__u32 accel_flags;		/* acceleration flags (hints)	*/
+	__u32 accel_flags;		/* (OBSOLETE) see fb_info.flags */
 
 	/* Timing: All values in pixclocks, except pixclock (of course) */
 	__u32 pixclock;			/* pixel clock in ps (pico seconds) */
@@ -375,7 +376,7 @@
 	__u16 set;		/* what to set */
 	__u16 enable;		/* cursor on/off */
 	__u16 rop;		/* bitop operation */
-	char *mask;		/* cursor mask bits */
+	const char *mask;	/* cursor mask bits */
 	struct fbcurpos hot;	/* cursor hot spot */
 	struct fb_image	image;	/* Cursor image */
 };
@@ -458,8 +459,8 @@
 	/* For framebuffers with strange non linear layouts or that do not
 	 * work with normal memory mapped access
 	 */
-	ssize_t (*fb_read)(struct file *file, char *buf, size_t count, loff_t *ppos);
-	ssize_t (*fb_write)(struct file *file, const char *buf, size_t count, loff_t *ppos);
+	ssize_t (*fb_read)(struct file *file, char __user *buf, size_t count, loff_t *ppos);
+	ssize_t (*fb_write)(struct file *file, const char __user *buf, size_t count, loff_t *ppos);
 
 	/* checks var and eventually tweaks it to something supported,
 	 * DO NOT MODIFY PAR */
@@ -502,15 +503,45 @@
 	int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);
 };
 
+/* FBINFO_* = fb_info.flags bit flags */
+#define FBINFO_MODULE		0x0001	/* Low-level driver is a module */
+#define FBINFO_HWACCEL_DISABLED	0x0002
+	/* When FBINFO_HWACCEL_DISABLED is set:
+	 *  Hardware acceleration is turned off.  Software implementations
+	 *  of required functions (copyarea(), fillrect(), and imageblit())
+	 *  takes over; acceleration engine should be in a quiescent state */
+
+/* hints */
+#define FBINFO_PARTIAL_PAN_OK	0x0040 /* otw use pan only for double-buffering */
+#define FBINFO_READS_FAST	0x0080 /* soft-copy faster than rendering */
+
+/* hardware supported ops */
+/*  semantics: when a bit is set, it indicates that the operation is
+ *   accelerated by hardware.
+ *  required functions will still work even if the bit is not set.
+ *  optional functions may not even exist if the flag bit is not set.
+ */
+#define FBINFO_HWACCEL_NONE		0x0000
+#define FBINFO_HWACCEL_COPYAREA		0x0100 /* required */
+#define FBINFO_HWACCEL_FILLRECT		0x0200 /* required */
+#define FBINFO_HWACCEL_IMAGEBLIT	0x0400 /* required */
+#define FBINFO_HWACCEL_ROTATE		0x0800 /* optional */
+#define FBINFO_HWACCEL_XPAN		0x1000 /* optional */
+#define FBINFO_HWACCEL_YPAN		0x2000 /* optional */
+#define FBINFO_HWACCEL_YWRAP		0x4000 /* optional */
+
+#define FBINFO_MISC_MODECHANGEUSER     0x10000 /* mode change request
+						  from userspace */
+
 struct fb_info {
 	int node;
 	int flags;
-#define FBINFO_FLAG_MODULE	1	/* Low-level driver is a module */
 	struct fb_var_screeninfo var;	/* Current var */
 	struct fb_fix_screeninfo fix;	/* Current fix */
 	struct fb_monspecs monspecs;	/* Current Monitor specs */
 	struct fb_cursor cursor;	/* Current cursor */	
 	struct work_struct queue;	/* Framebuffer event queue */
+	struct timer_list cursor_timer; /* Cursor timer */
 	struct fb_pixmap pixmap;	/* Image hardware mapper */
 	struct fb_pixmap sprite;	/* Cursor hardware mapper */
 	struct fb_cmap cmap;		/* Current cmap */
@@ -527,12 +558,24 @@
 };
 
 #ifdef MODULE
-#define FBINFO_FLAG_DEFAULT	FBINFO_FLAG_MODULE
+#define FBINFO_DEFAULT	FBINFO_MODULE
 #else
-#define FBINFO_FLAG_DEFAULT	0
+#define FBINFO_DEFAULT	0
 #endif
 
 // This will go away
+#define FBINFO_FLAG_MODULE	FBINFO_MODULE
+#define FBINFO_FLAG_DEFAULT	FBINFO_DEFAULT
+
+/* This will go away
+ * fbset currently hacks in FB_ACCELF_TEXT into var.accel_flags
+ * when it wants to turn the acceleration engine on.  This is
+ * really a separate operation, and should be modified via sysfs.
+ *  But for now, we leave it broken with the following define
+ */
+#define STUPID_ACCELF_TEXT_SHIT
+
+// This will go away
 #if defined(__sparc__)
 
 /* We map all of our framebuffers such that big-endian accesses
@@ -550,7 +593,7 @@
 #define fb_writeq sbus_writeq
 #define fb_memset sbus_memset_io
 
-#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__)
+#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__)
 
 #define fb_readb __raw_readb
 #define fb_readw __raw_readw
--- diff/include/linux/fd.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/fd.h	2004-07-01 21:32:51.000000000 +0100
@@ -2,6 +2,7 @@
 #define _LINUX_FD_H
 
 #include <linux/ioctl.h>
+#include <linux/compiler.h>
 
 /* New file layout: Now the ioctl definitions immediately follow the
  * definitions of the structures that they use */
--- diff/include/linux/filter.h	2004-05-19 22:12:59.000000000 +0100
+++ source/include/linux/filter.h	2004-07-01 21:32:51.000000000 +0100
@@ -5,6 +5,8 @@
 #ifndef __LINUX_FILTER_H__
 #define __LINUX_FILTER_H__
 
+#include <linux/compiler.h>
+
 /*
  * Current version of the filter code architecture.
  */
@@ -27,7 +29,7 @@
 struct sock_fprog	/* Required for SO_ATTACH_FILTER. */
 {
 	unsigned short		len;	/* Number of filter blocks */
-	struct sock_filter	*filter;
+	struct sock_filter __user *filter;
 };
 
 #ifdef __KERNEL__
--- diff/include/linux/fs.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/fs.h	2004-07-01 21:32:51.000000000 +0100
@@ -83,6 +83,7 @@
 #define SPECIAL 4	/* For non-blockdevice requests in request queue */
 #define READ_SYNC	(READ | (1 << BIO_RW_SYNC))
 #define WRITE_SYNC	(WRITE | (1 << BIO_RW_SYNC))
+#define WRITE_BARRIER	((1 << BIO_RW) | (1 << BIO_RW_BARRIER))
 
 #define SEL_IN		1
 #define SEL_OUT		2
@@ -140,6 +141,7 @@
 #define S_NOQUOTA	64	/* Inode is not counted to quota */
 #define S_DIRSYNC	128	/* Directory modifications are synchronous */
 #define S_NOCMTIME	256	/* Do not update file c/mtime */
+#define S_SWAPFILE	512	/* Do not truncate: swapon got its bmaps */
 
 /*
  * Note that nosuid etc flags are inode-specific: setting some file-system
@@ -174,6 +176,7 @@
 
 #define IS_DEADDIR(inode)	((inode)->i_flags & S_DEAD)
 #define IS_NOCMTIME(inode)	((inode)->i_flags & S_NOCMTIME)
+#define IS_SWAPFILE(inode)	((inode)->i_flags & S_SWAPFILE)
 
 /* the read-only stuff doesn't really belong here, but any other place is
    probably as bad and I don't want to create yet another include file. */
@@ -214,15 +217,17 @@
 #include <linux/list.h>
 #include <linux/radix-tree.h>
 #include <linux/audit.h>
+#include <linux/init.h>
 #include <asm/semaphore.h>
 #include <asm/byteorder.h>
 
 /* Used to be a macro which just called the function, now just a function */
 extern void update_atime (struct inode *);
 
-extern void inode_init(unsigned long);
-extern void mnt_init(unsigned long);
-extern void files_init(unsigned long);
+extern void __init inode_init(unsigned long);
+extern void __init inode_init_early(void);
+extern void __init mnt_init(unsigned long);
+extern void __init files_init(unsigned long);
 
 struct buffer_head;
 typedef int (get_block_t)(struct inode *inode, sector_t iblock,
@@ -326,7 +331,7 @@
 struct address_space {
 	struct inode		*host;		/* owner: inode, block_device */
 	struct radix_tree_root	page_tree;	/* radix tree of all pages */
-	spinlock_t		tree_lock;	/* and spinlock protecting it */
+	rwlock_t		tree_lock;	/* and rwlock protecting it */
 	unsigned long		nrpages;	/* number of total pages */
 	pgoff_t			writeback_index;/* writeback starts here */
 	struct address_space_operations *a_ops;	/* methods */
@@ -411,6 +416,7 @@
 struct inode {
 	struct hlist_node	i_hash;
 	struct list_head	i_list;
+	struct list_head	i_sb_list;
 	struct list_head	i_dentry;
 	unsigned long		i_ino;
 	atomic_t		i_count;
@@ -744,6 +750,7 @@
 	atomic_t		s_active;
 	void                    *s_security;
 
+	struct list_head	s_inodes;	/* all inodes */
 	struct list_head	s_dirty;	/* dirty inodes */
 	struct list_head	s_io;		/* parked for writeback */
 	struct hlist_head	s_anon;		/* anonymous dentries for (nfs) exporting */
@@ -900,6 +907,7 @@
 			struct inode *, struct dentry *);
 	int (*readlink) (struct dentry *, char __user *,int);
 	int (*follow_link) (struct dentry *, struct nameidata *);
+	void (*put_link) (struct dentry *, struct nameidata *);
 	void (*truncate) (struct inode *);
 	int (*permission) (struct inode *, int, struct nameidata *);
 	int (*setattr) (struct dentry *, struct iattr *);
@@ -977,7 +985,8 @@
 
 static inline void file_accessed(struct file *file)
 {
-	touch_atime(file->f_vfsmnt, file->f_dentry);
+	if (!(file->f_flags & O_NOATIME))
+		touch_atime(file->f_vfsmnt, file->f_dentry);
 }
 
 int sync_inode(struct inode *inode, struct writeback_control *wbc);
@@ -1199,7 +1208,8 @@
 extern char * getname(const char __user *);
 
 /* fs/dcache.c */
-extern void vfs_caches_init(unsigned long);
+extern void __init vfs_caches_init_early(void);
+extern void __init vfs_caches_init(unsigned long);
 
 #define __getname()	kmem_cache_alloc(names_cachep, SLAB_KERNEL)
 #define __putname(name) kmem_cache_free(names_cachep, (void *)(name))
@@ -1463,8 +1473,11 @@
 extern int vfs_follow_link(struct nameidata *, const char *);
 extern int page_readlink(struct dentry *, char __user *, int);
 extern int page_follow_link(struct dentry *, struct nameidata *);
+extern int page_follow_link_light(struct dentry *, struct nameidata *);
+extern void page_put_link(struct dentry *, struct nameidata *);
 extern int page_symlink(struct inode *inode, const char *symname, int len);
 extern struct inode_operations page_symlink_inode_operations;
+extern int generic_readlink(struct dentry *, char __user *, int);
 extern void generic_fillattr(struct inode *, struct kstat *);
 extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
 void inode_add_bytes(struct inode *inode, loff_t bytes);
@@ -1511,7 +1524,7 @@
 extern void simple_release_fs(struct vfsmount **mount, int *count);
 
 extern int inode_change_ok(struct inode *, struct iattr *);
-extern int inode_setattr(struct inode *, struct iattr *);
+extern int __must_check inode_setattr(struct inode *, struct iattr *);
 
 extern void inode_update_time(struct inode *inode, int ctime_too);
 
--- diff/include/linux/hiddev.h	2004-05-19 22:12:59.000000000 +0100
+++ source/include/linux/hiddev.h	2004-07-01 21:32:51.000000000 +0100
@@ -128,10 +128,11 @@
 
 /* hiddev_usage_ref_multi is used for sending multiple bytes to a control.
  * It really manifests itself as setting the value of consecutive usages */
+#define HID_MAX_MULTI_USAGES 1024
 struct hiddev_usage_ref_multi {
 	struct hiddev_usage_ref uref;
 	__u32 num_values;
-	__s32 values[HID_MAX_USAGES];
+	__s32 values[HID_MAX_MULTI_USAGES];
 };
 
 /* FIELD_INDEX_NONE is returned in read() data from the kernel when flags
@@ -212,6 +213,11 @@
  * In-kernel definitions.
  */
 
+struct hid_device;
+struct hid_usage;
+struct hid_field;
+struct hid_report;
+
 #ifdef CONFIG_USB_HIDDEV
 int hiddev_connect(struct hid_device *);
 void hiddev_disconnect(struct hid_device *);
--- diff/include/linux/hugetlb.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/hugetlb.h	2004-07-01 21:32:51.000000000 +0100
@@ -19,6 +19,7 @@
 void unmap_hugepage_range(struct vm_area_struct *, unsigned long, unsigned long);
 int hugetlb_prefault(struct address_space *, struct vm_area_struct *);
 int hugetlb_report_meminfo(char *);
+int hugetlb_report_node_meminfo(int, char *);
 int is_hugepage_mem_enough(size_t);
 unsigned long hugetlb_total_pages(void);
 struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address,
@@ -34,13 +35,6 @@
 extern const unsigned long hugetlb_zero, hugetlb_infinity;
 extern int sysctl_hugetlb_shm_group;
 
-static inline void
-mark_mm_hugetlb(struct mm_struct *mm, struct vm_area_struct *vma)
-{
-	if (is_vm_hugetlb_page(vma))
-		mm->used_hugetlb = 1;
-}
-
 #ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE
 #define is_hugepage_only_range(addr, len)	0
 #define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0)
@@ -72,7 +66,7 @@
 #define unmap_hugepage_range(vma, start, end)	BUG()
 #define is_hugepage_mem_enough(size)		0
 #define hugetlb_report_meminfo(buf)		0
-#define mark_mm_hugetlb(mm, vma)		do { } while (0)
+#define hugetlb_report_node_meminfo(n, buf)	0
 #define follow_huge_pmd(mm, addr, pmd, write)	0
 #define is_aligned_hugepage_range(addr, len)	0
 #define prepare_hugepage_range(addr, len)	(-EINVAL)
--- diff/include/linux/i2c-id.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/i2c-id.h	2004-07-01 21:32:51.000000000 +0100
@@ -101,6 +101,14 @@
 #define I2C_DRIVERID_UDA1342	53	/* UDA1342 audio codec		*/
 #define I2C_DRIVERID_ADV7170	54	/* video encoder		*/
 #define I2C_DRIVERID_RADEON	55	/* I2C bus on Radeon boards	*/
+#define I2C_DRIVERID_MAX1617	56	/* temp sensor			*/
+#define I2C_DRIVERID_SAA7191	57	/* video encoder		*/
+#define I2C_DRIVERID_INDYCAM	58	/* SGI IndyCam			*/
+#define I2C_DRIVERID_BT832	59	/* CMOS camera video processor	*/
+#define I2C_DRIVERID_TDA9887	60	/* TDA988x IF-PLL demodulator	*/
+#define I2C_DRIVERID_OVCAMCHIP	61	/* OmniVision CMOS image sens.	*/
+#define I2C_DRIVERID_TDA7313	62	/* TDA7313 audio processor	*/
+#define I2C_DRIVERID_MAX6900	63	/* MAX6900 real-time clock	*/
 
 
 #define I2C_DRIVERID_EXP0	0xF0	/* experimental use id's	*/
@@ -264,6 +272,10 @@
 #define I2C_HW_SMBUS_SCX200	0x0b
 #define I2C_HW_SMBUS_NFORCE2	0x0c
 #define I2C_HW_SMBUS_W9968CF	0x0d
+#define I2C_HW_SMBUS_OV511	0x0e	/* OV511(+) USB 1.1 webcam ICs	*/
+#define I2C_HW_SMBUS_OV518	0x0f	/* OV518(+) USB 1.1 webcam ICs	*/
+#define I2C_HW_SMBUS_OV519	0x10	/* OV519 USB 1.1 webcam IC	*/
+#define I2C_HW_SMBUS_OVFX2	0x11	/* Cypress/OmniVision FX2 webcam */
 
 /* --- ISA pseudo-adapter						*/
 #define I2C_HW_ISA 0x00
--- diff/include/linux/i2o-dev.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/i2o-dev.h	2004-07-01 21:32:51.000000000 +0100
@@ -46,24 +46,24 @@
 struct i2o_cmd_passthru
 {
 	unsigned int iop;	/* IOP unit number */
-	void *msg;		/* message */
+	void __user *msg;	/* message */
 };
 
 struct i2o_cmd_hrtlct
 {
 	unsigned int iop;	/* IOP unit number */
-	void *resbuf;		/* Buffer for result */
-	unsigned int *reslen;	/* Buffer length in bytes */
+	void __user *resbuf;	/* Buffer for result */
+	unsigned int __user *reslen;	/* Buffer length in bytes */
 };
 
 struct i2o_cmd_psetget
 {
 	unsigned int iop;	/* IOP unit number */
 	unsigned int tid;	/* Target device TID */
-	void *opbuf;		/* Operation List buffer */
+	void __user *opbuf;	/* Operation List buffer */
 	unsigned int oplen;	/* Operation List buffer length in bytes */
-	void *resbuf;		/* Result List buffer */
-	unsigned int *reslen;	/* Result List buffer length in bytes */
+	void __user *resbuf;	/* Result List buffer */
+	unsigned int __user *reslen;	/* Result List buffer length in bytes */
 };
 
 struct i2o_sw_xfer
@@ -72,10 +72,10 @@
 	unsigned char flags;	/* Flags field */
 	unsigned char sw_type;	/* Software type */
 	unsigned int sw_id;	/* Software ID */
-	void *buf;		/* Pointer to software buffer */
-	unsigned int *swlen;	/* Length of software data */
-	unsigned int *maxfrag;	/* Maximum fragment count */
-	unsigned int *curfrag;	/* Current fragment count */
+	void __user *buf;	/* Pointer to software buffer */
+	unsigned int __user *swlen;	/* Length of software data */
+	unsigned int __user *maxfrag;	/* Maximum fragment count */
+	unsigned int __user *curfrag;	/* Current fragment count */
 };
 
 struct i2o_html
@@ -83,9 +83,9 @@
 	unsigned int iop;	/* IOP unit number */
 	unsigned int tid;	/* Target device ID */
 	unsigned int page;	/* HTML page */
-	void *resbuf;		/* Buffer for reply HTML page */
-	unsigned int *reslen;	/* Length in bytes of reply buffer */
-	void *qbuf;		/* Pointer to HTTP query string */
+	void __user *resbuf;		/* Buffer for reply HTML page */
+	unsigned int __user *reslen;	/* Length in bytes of reply buffer */
+	void __user *qbuf;		/* Pointer to HTTP query string */
 	unsigned int qlen;	/* Length in bytes of query string buffer */
 };
 
--- diff/include/linux/i2o.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/i2o.h	2004-07-01 21:32:51.000000000 +0100
@@ -99,6 +99,7 @@
 	int		irq;
 	int		short_req:1;	/* Use small block sizes        */
 	int		dpt:1;		/* Don't quiesce                */
+	int		raptor:1;	/* split bar                    */
 	int		promise:1;	/* Promise controller		*/
 #ifdef CONFIG_MTRR
 	int		mtrr_reg0;
@@ -109,9 +110,9 @@
 	atomic_t users;
 	struct i2o_device *devices;		/* I2O device chain */
 	struct i2o_controller *next;		/* Controller chain */
-	unsigned long post_port;		/* Inbout port address */
-	unsigned long reply_port;		/* Outbound port address */
-	unsigned long irq_mask;			/* Interrupt register address */
+	void *post_port;			/* Inbout port address */
+	void *reply_port;			/* Outbound port address */
+	void *irq_mask;				/* Interrupt register address */
 
 	/* Dynamic LCT related data */
 	struct semaphore lct_sem;
@@ -128,8 +129,11 @@
 	dma_addr_t hrt_phys;
 	u32 hrt_len;
 
-	unsigned long mem_offset;		/* MFA offset */
-	unsigned long mem_phys;			/* MFA physical */
+	void *base_virt;			/* base virtual address */
+	unsigned long base_phys;		/* base physical address */
+
+	void *msg_virt;				/* messages virtual address */
+	unsigned long msg_phys;			/* messages physical address */
 
 	int battery:1;				/* Has a battery backup */
 	int io_alloc:1;				/* An I/O resource was allocated */
--- diff/include/linux/ide.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/ide.h	2004-07-01 21:32:51.000000000 +0100
@@ -255,7 +255,7 @@
 		ide_pdc4030,	ide_rz1000,	ide_trm290,
 		ide_cmd646,	ide_cy82c693,	ide_4drives,
 		ide_pmac,	ide_etrax100,	ide_acorn,
-		ide_pc9800,	ide_forced
+		ide_forced
 } hwif_chipset_t;
 
 /*
@@ -780,6 +780,7 @@
 	u8	sect;		/* "real" sectors per track */
 	u8	bios_head;	/* BIOS/fdisk/LILO number of heads */
 	u8	bios_sect;	/* BIOS/fdisk/LILO sectors per track */
+	u8	doing_barrier;	/* state, 1=currently doing flush */
 
 	unsigned int	bios_cyl;	/* BIOS/fdisk/LILO number of cyls */
 	unsigned int	cyl;		/* "real" number of cyls */
@@ -833,30 +834,14 @@
 #define ide_rq_offset(rq) \
 	(((rq)->hard_cur_sectors - (rq)->current_nr_sectors) << 9)
 
-/*
- * taskfiles really should use hard_cur_sectors as well!
- */
-#define task_rq_offset(rq) \
-	(((rq)->nr_sectors - (rq)->current_nr_sectors) * SECTOR_SIZE)
-
 static inline void *ide_map_buffer(struct request *rq, unsigned long *flags)
 {
-	/*
-	 * fs request
-	 */
-	if (rq->bio)
-		return bio_kmap_irq(rq->bio, flags) + ide_rq_offset(rq);
-
-	/*
-	 * task request
-	 */
-	return rq->buffer + task_rq_offset(rq);
+	return bio_kmap_irq(rq->bio, flags) + ide_rq_offset(rq);
 }
 
 static inline void ide_unmap_buffer(struct request *rq, char *buffer, unsigned long *flags)
 {
-	if (rq->bio)
-		bio_kunmap_irq(buffer, flags);
+	bio_kunmap_irq(buffer, flags);
 }
 #endif /* !CONFIG_IDE_TASKFILE_IO */
 
@@ -1309,6 +1294,11 @@
 extern void ide_init_drive_cmd (struct request *rq);
 
 /*
+ * this function returns error location sector offset in case of a write error
+ */
+extern u64 ide_get_error_location(ide_drive_t *, char *);
+
+/*
  * "action" parameter type for ide_do_drive_cmd() below.
  */
 typedef enum {
@@ -1415,42 +1405,32 @@
 extern void taskfile_input_data(ide_drive_t *, void *, u32);
 extern void taskfile_output_data(ide_drive_t *, void *, u32);
 
-#ifdef CONFIG_IDE_TASKFILE_IO
-
 #define IDE_PIO_IN	0
 #define IDE_PIO_OUT	1
 
-static inline void task_sectors(ide_drive_t *drive, struct request *rq,
-				unsigned nsect, int rw)
+static inline void __task_sectors(ide_drive_t *drive, char *buf,
+				  unsigned nsect, unsigned rw)
 {
-	unsigned long flags;
-	unsigned int bio_rq;
-	char *buf;
-
-	/*
-	 * bio_rq flag is needed because we can call
-	 * rq_unmap_buffer() with rq->cbio == NULL
-	 */
-	bio_rq = rq->cbio ? 1 : 0;
-
-	if (bio_rq)
-		buf = rq_map_buffer(rq, &flags);	/* fs request */
-	else
-		buf = rq->buffer + blk_rq_offset(rq);	/* task request */
-
 	/*
 	 * IRQ can happen instantly after reading/writing
 	 * last sector of the datablock.
 	 */
-	process_that_request_first(rq, nsect);
-
 	if (rw == IDE_PIO_OUT)
 		taskfile_output_data(drive, buf, nsect * SECTOR_WORDS);
 	else
 		taskfile_input_data(drive, buf, nsect * SECTOR_WORDS);
+}
 
-	if (bio_rq)
-		rq_unmap_buffer(buf, &flags);
+#ifdef CONFIG_IDE_TASKFILE_IO
+static inline void task_bio_sectors(ide_drive_t *drive, struct request *rq,
+				    unsigned nsect, unsigned rw)
+{
+	unsigned long flags;
+	char *buf = rq_map_buffer(rq, &flags);
+
+	process_that_request_first(rq, nsect);
+	__task_sectors(drive, buf, nsect, rw);
+	rq_unmap_buffer(buf, &flags);
 }
 #endif /* CONFIG_IDE_TASKFILE_IO */
 
@@ -1690,4 +1670,11 @@
 
 extern struct bus_type ide_bus_type;
 
+/* check if CACHE FLUSH (EXT) command is supported (bits defined in ATA-6) */
+#define ide_id_has_flush_cache(id)	((id)->cfs_enable_2 & 0x3000)
+
+/* some Maxtor disks have bit 13 defined incorrectly so check bit 10 too */
+#define ide_id_has_flush_cache_ext(id)	\
+	(((id)->cfs_enable_2 & 0x2400) == 0x2400)
+
 #endif /* _IDE_H */
--- diff/include/linux/idr.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/idr.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * include/linux/id.h
+ * include/linux/idr.h
  * 
  * 2002-10-18  written by Jim Houston jim.houston@ccur.com
  *	Copyright (C) 2002 by Concurrent Computer Corporation
@@ -11,14 +11,20 @@
 #include <linux/types.h>
 #include <asm/bitops.h>
 
-#define RESERVED_ID_BITS 8
-
 #if BITS_PER_LONG == 32
 # define IDR_BITS 5
 # define IDR_FULL 0xfffffffful
+/* We can only use two of the bits in the top level because there is
+   only one possible bit in the top level (5 bits * 7 levels = 35
+   bits, but you only use 31 bits in the id). */
+# define TOP_LEVEL_FULL (IDR_FULL >> 30)
 #elif BITS_PER_LONG == 64
 # define IDR_BITS 6
 # define IDR_FULL 0xfffffffffffffffful
+/* We can only use two of the bits in the top level because there is
+   only one possible bit in the top level (6 bits * 6 levels = 36
+   bits, but you only use 31 bits in the id). */
+# define TOP_LEVEL_FULL (IDR_FULL >> 62)
 #else
 # error "BITS_PER_LONG is not 32 or 64"
 #endif
@@ -26,11 +32,8 @@
 #define IDR_SIZE (1 << IDR_BITS)
 #define IDR_MASK ((1 << IDR_BITS)-1)
 
-/* Define the size of the id's */
-#define BITS_PER_INT (sizeof(int)*8)
-
-#define MAX_ID_SHIFT (BITS_PER_INT - RESERVED_ID_BITS)
-#define MAX_ID_BIT (1 << MAX_ID_SHIFT)
+#define MAX_ID_SHIFT (sizeof(int)*8 - 1)
+#define MAX_ID_BIT (1U << MAX_ID_SHIFT)
 #define MAX_ID_MASK (MAX_ID_BIT - 1)
 
 /* Leave the possibility of an incomplete final layer */
@@ -40,25 +43,23 @@
 #define IDR_FREE_MAX MAX_LEVEL + MAX_LEVEL
 
 struct idr_layer {
-	unsigned long		 bitmap;	/* A zero bit means "space here" */
+	unsigned long		 bitmap; /* A zero bit means "space here" */
 	struct idr_layer	*ary[1<<IDR_BITS];
-	int			 count;		/* When zero, we can release it */
+	int			 count;	 /* When zero, we can release it */
 };
 
 struct idr {
 	struct idr_layer *top;
 	struct idr_layer *id_free;
-	long		  count;
 	int		  layers;
 	int		  id_free_cnt;
 	spinlock_t	  lock;
 };
 
-#define IDR_INIT(name)	\
+#define IDR_INIT(name)						\
 {								\
 	.top		= NULL,					\
 	.id_free	= NULL,					\
-	.count		= 0,					\
 	.layers 	= 0,					\
 	.id_free_cnt	= 0,					\
 	.lock		= SPIN_LOCK_UNLOCKED,			\
@@ -71,9 +72,9 @@
 
 void *idr_find(struct idr *idp, int id);
 int idr_pre_get(struct idr *idp, unsigned gfp_mask);
-int idr_get_new(struct idr *idp, void *ptr);
+int idr_get_new(struct idr *idp, void *ptr, int *id);
+int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id);
 void idr_remove(struct idr *idp, int id);
 void idr_init(struct idr *idp);
 
 extern kmem_cache_t *idr_layer_cache;
-
--- diff/include/linux/if.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/if.h	2004-07-01 21:32:51.000000000 +0100
@@ -108,15 +108,15 @@
 	unsigned int size;	/* Size of the data allocated by the caller */
 	union {
 		/* {atm/eth/dsl}_settings anyone ? */
-		raw_hdlc_proto		*raw_hdlc;
-		cisco_proto		*cisco;
-		fr_proto		*fr;
-		fr_proto_pvc		*fr_pvc;
-		fr_proto_pvc_info	*fr_pvc_info;
+		raw_hdlc_proto		__user *raw_hdlc;
+		cisco_proto		__user *cisco;
+		fr_proto		__user *fr;
+		fr_proto_pvc		__user *fr_pvc;
+		fr_proto_pvc_info	__user *fr_pvc_info;
 
 		/* interface settings */
-		sync_serial_settings	*sync;
-		te1_settings		*te1;
+		sync_serial_settings	__user *sync;
+		te1_settings		__user *te1;
 	} ifs_ifsu;
 };
 
--- diff/include/linux/init.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/init.h	2004-07-01 21:32:51.000000000 +0100
@@ -66,6 +66,9 @@
 
 extern initcall_t __con_initcall_start, __con_initcall_end;
 extern initcall_t __security_initcall_start, __security_initcall_end;
+
+/* Defined in init/main.c */
+extern char saved_command_line[];
 #endif
   
 #ifndef MODULE
@@ -107,25 +110,39 @@
 struct obs_kernel_param {
 	const char *str;
 	int (*setup_func)(char *);
+	int early;
 };
 
-/* OBSOLETE: see moduleparam.h for the right way. */
-#define __setup_param(str, unique_id, fn)			\
+/*
+ * Only for really core code.  See moduleparam.h for the normal way.
+ *
+ * Force the alignment so the compiler doesn't space elements of the
+ * obs_kernel_param "array" too far apart in .init.setup.
+ */
+#define __setup_param(str, unique_id, fn, early)			\
 	static char __setup_str_##unique_id[] __initdata = str;	\
 	static struct obs_kernel_param __setup_##unique_id	\
-		 __attribute_used__				\
-		 __attribute__((__section__(".init.setup")))	\
-		= { __setup_str_##unique_id, fn }
+		__attribute_used__				\
+		__attribute__((__section__(".init.setup")))	\
+		__attribute__((aligned((sizeof(long)))))	\
+		= { __setup_str_##unique_id, fn, early }
 
 #define __setup_null_param(str, unique_id)			\
-	__setup_param(str, unique_id, NULL)
+	__setup_param(str, unique_id, NULL, 0)
 
 #define __setup(str, fn)					\
-	__setup_param(str, fn, fn)
+	__setup_param(str, fn, fn, 0)
 
 #define __obsolete_setup(str)					\
 	__setup_null_param(str, __LINE__)
 
+/* NOTE: fn is as per module_param, not __setup!  Emits warning if fn
+ * returns non-zero. */
+#define early_param(str, fn)					\
+	__setup_param(str, fn, fn, 1)
+
+/* Relies on saved_command_line being set */
+void __init parse_early_param(void);
 #endif /* __ASSEMBLY__ */
 
 /**
--- diff/include/linux/input.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/input.h	2004-07-01 21:32:51.000000000 +0100
@@ -527,6 +527,8 @@
 #define MSC_SERIAL		0x00
 #define MSC_PULSELED		0x01
 #define MSC_GESTURE		0x02
+#define MSC_RAW			0x03
+#define MSC_SCAN		0x04
 #define MSC_MAX			0x07
 
 /*
--- diff/include/linux/interrupt.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/interrupt.h	2004-07-01 21:32:51.000000000 +0100
@@ -7,6 +7,7 @@
 #include <linux/linkage.h>
 #include <linux/bitops.h>
 #include <linux/preempt.h>
+#include <linux/cpumask.h>
 #include <asm/atomic.h>
 #include <asm/hardirq.h>
 #include <asm/ptrace.h>
@@ -35,7 +36,7 @@
 struct irqaction {
 	irqreturn_t (*handler)(int, void *, struct pt_regs *);
 	unsigned long flags;
-	unsigned long mask;
+	cpumask_t mask;
 	const char *name;
 	void *dev_id;
 	struct irqaction *next;
--- diff/include/linux/ip.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/ip.h	2004-07-01 21:32:51.000000000 +0100
@@ -129,8 +129,6 @@
 	int			mc_index;	/* Multicast device index */
 	__u32			mc_addr;
 	struct ip_mc_socklist	*mc_list;	/* Group array */
-	struct page		*sndmsg_page;	/* Cached page for sendmsg */
-	u32			sndmsg_off;	/* Cached offset for sendmsg */
 	/*
 	 * Following members are used to retain the infomation to build
 	 * an ip header on each ip fragmentation while the socket is corked.
--- diff/include/linux/ipmi.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/ipmi.h	2004-07-01 21:32:51.000000000 +0100
@@ -373,6 +373,16 @@
 			     int                  priority);
 
 /*
+ * Do polling on the IPMI interface the user is attached to.  This
+ * causes the IPMI code to do an immediate check for information from
+ * the driver and handle anything that is immediately pending.  This
+ * will not block in anyway.  This is useful if you need to implement
+ * polling from the user like you need to send periodic watchdog pings
+ * from a crash dump, or something like that.
+ */
+void ipmi_poll_interface(ipmi_user_t user);
+
+/*
  * When commands come in to the SMS, the user can register to receive
  * them.  Only one user can be listening on a specific netfn/cmd pair
  * at a time, you will get an EBUSY error if the command is already
@@ -488,7 +498,7 @@
 /* Messages sent to the interface are this format. */
 struct ipmi_req
 {
-	unsigned char *addr; /* Address to send the message to. */
+	unsigned char __user *addr; /* Address to send the message to. */
 	unsigned int  addr_len;
 
 	long    msgid; /* The sequence number for the message.  This
@@ -539,7 +549,7 @@
 	int     recv_type; /* Is this a command, response or an
 			      asyncronous event. */
 
-	unsigned char *addr;    /* Address the message was from is put
+	unsigned char __user *addr;    /* Address the message was from is put
 				   here.  The caller must supply the
 				   memory. */
 	unsigned int  addr_len; /* The size of the address buffer.
--- diff/include/linux/ipmi_msgdefs.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/ipmi_msgdefs.h	2004-07-01 21:32:51.000000000 +0100
@@ -71,6 +71,7 @@
 
 #define IPMI_CC_NO_ERROR		0x00
 #define IPMI_NODE_BUSY_ERR		0xc0
+#define IPMI_INVALID_COMMAND_ERR	0xc1
 #define IPMI_ERR_MSG_TRUNCATED		0xc6
 #define IPMI_LOST_ARBITRATION_ERR	0x81
 #define IPMI_ERR_UNSPECIFIED		0xff
--- diff/include/linux/ipmi_smi.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/ipmi_smi.h	2004-07-01 21:32:51.000000000 +0100
@@ -100,6 +100,10 @@
 	   out and that none are pending, and any new requests are run
 	   to completion immediately. */
 	void (*set_run_to_completion)(void *send_info, int run_to_completion);
+
+	/* Called to poll for work to do.  This is so upper layers can
+	   poll for operations during things like crash dumps. */
+	void (*poll)(void *send_info);
 };
 
 /* Add a low-level interface to the IPMI driver. */
--- diff/include/linux/isdn_ppp.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/isdn_ppp.h	2004-07-01 21:32:51.000000000 +0100
@@ -233,8 +233,9 @@
   struct slcompress *slcomp;
 #endif
 #ifdef CONFIG_IPPP_FILTER
-  struct sock_fprog pass_filter;	/* filter for packets to pass */
-  struct sock_fprog active_filter;	/* filter for pkts to reset idle */
+  struct sock_filter *pass_filter;	/* filter for packets to pass */
+  struct sock_filter *active_filter;	/* filter for pkts to reset idle */
+  unsigned pass_len, active_len;
 #endif
   unsigned long debug;
   struct isdn_ppp_compressor *compressor,*decompressor;
--- diff/include/linux/iso_fs.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/iso_fs.h	2004-07-01 21:32:51.000000000 +0100
@@ -190,28 +190,28 @@
 {
 	return *(s8 *)p;
 }
-static inline int isonum_721(char *p)
+static inline unsigned int isonum_721(char *p)
 {
 	return le16_to_cpu(get_unaligned((u16 *)p));
 }
-static inline int isonum_722(char *p)
+static inline unsigned int isonum_722(char *p)
 {
 	return be16_to_cpu(get_unaligned((u16 *)p));
 }
-static inline int isonum_723(char *p)
+static inline unsigned int isonum_723(char *p)
 {
 	/* Ignore bigendian datum due to broken mastering programs */
 	return le16_to_cpu(get_unaligned((u16 *)p));
 }
-static inline int isonum_731(char *p)
+static inline unsigned int isonum_731(char *p)
 {
 	return le32_to_cpu(get_unaligned((u32 *)p));
 }
-static inline int isonum_732(char *p)
+static inline unsigned int isonum_732(char *p)
 {
 	return be32_to_cpu(get_unaligned((u32 *)p));
 }
-static inline int isonum_733(char *p)
+static inline unsigned int isonum_733(char *p)
 {
 	/* Ignore bigendian datum due to broken mastering programs */
 	return le32_to_cpu(get_unaligned((u32 *)p));
@@ -231,9 +231,69 @@
 extern struct buffer_head *isofs_bread(struct inode *, sector_t);
 extern int isofs_get_blocks(struct inode *, sector_t, struct buffer_head **, unsigned long);
 
+extern struct inode *isofs_iget(struct super_block *sb,
+                                unsigned long block,
+                                unsigned long offset);
+
+/* Because the inode number is no longer relevant to finding the
+ * underlying meta-data for an inode, we are free to choose a more
+ * convenient 32-bit number as the inode number.  The inode numbering
+ * scheme was recommended by Sergey Vlasov and Eric Lammerts. */
+static inline unsigned long isofs_get_ino(unsigned long block,
+					  unsigned long offset,
+					  unsigned long bufbits)
+{
+	return (block << (bufbits - 5)) | (offset >> 5);
+}
+
+/* Every directory can have many redundant directory entries scattered
+ * throughout the directory tree.  First there is the directory entry
+ * with the name of the directory stored in the parent directory.
+ * Then, there is the "." directory entry stored in the directory
+ * itself.  Finally, there are possibly many ".." directory entries
+ * stored in all the subdirectories.
+ *
+ * In order for the NFS get_parent() method to work and for the
+ * general consistency of the dcache, we need to make sure the
+ * "i_iget5_block" and "i_iget5_offset" all point to exactly one of
+ * the many redundant entries for each directory.  We normalize the
+ * block and offset by always making them point to the "."  directory.
+ *
+ * Notice that we do not use the entry for the directory with the name
+ * that is located in the parent directory.  Even though choosing this
+ * first directory is more natural, it is much easier to find the "."
+ * entry in the NFS get_parent() method because it is implicitly
+ * encoded in the "extent + ext_attr_length" fields of _all_ the
+ * redundant entries for the directory.  Thus, it can always be
+ * reached regardless of which directory entry you have in hand.
+ *
+ * This works because the "." entry is simply the first directory
+ * record when you start reading the file that holds all the directory
+ * records, and this file starts at "extent + ext_attr_length" blocks.
+ * Because the "." entry is always the first entry listed in the
+ * directories file, the normalized "offset" value is always 0.
+ *
+ * You should pass the directory entry in "de".  On return, "block"
+ * and "offset" will hold normalized values.  Only directories are
+ * affected making it safe to call even for non-directory file
+ * types. */
+static void inline
+isofs_normalize_block_and_offset(struct iso_directory_record* de,
+				 unsigned long *block,
+				 unsigned long *offset)
+{
+	/* Only directories are normalized. */
+	if (de->flags[0] & 2) {
+		*offset = 0;
+		*block = (unsigned long)isonum_733(de->extent)
+			+ (unsigned long)isonum_711(de->ext_attr_length);
+	}
+}
+
 extern struct inode_operations isofs_dir_inode_operations;
 extern struct file_operations isofs_dir_operations;
 extern struct address_space_operations isofs_symlink_aops;
+extern struct export_operations isofs_export_ops;
 
 /* The following macros are used to check for memory leaks. */
 #ifdef LEAK_CHECK
--- diff/include/linux/iso_fs_i.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/iso_fs_i.h	2004-07-01 21:32:51.000000000 +0100
@@ -13,10 +13,13 @@
  * iso fs inode data in memory
  */
 struct iso_inode_info {
+	unsigned long i_iget5_block;
+	unsigned long i_iget5_offset;
 	unsigned int i_first_extent;
 	unsigned char i_file_format;
 	unsigned char i_format_parm[3];
-	unsigned long i_next_section_ino;
+	unsigned long i_next_section_block;
+	unsigned long i_next_section_offset;
 	off_t i_section_size;
 	struct inode vfs_inode;
 };
--- diff/include/linux/ixjuser.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/ixjuser.h	2004-07-01 21:32:51.000000000 +0100
@@ -350,7 +350,7 @@
 typedef struct {
 	int elements_used;
 	IXJ_CADENCE_TERM termination;
-	IXJ_CADENCE_ELEMENT *ce;
+	IXJ_CADENCE_ELEMENT __user *ce;
 } IXJ_CADENCE;
 
 #define IXJCTL_TONE_CADENCE		_IOW ('q', 0xCA, IXJ_CADENCE *)
--- diff/include/linux/jbd.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/jbd.h	2004-07-01 21:32:51.000000000 +0100
@@ -840,6 +840,7 @@
 #define JFS_ACK_ERR	0x004	/* The errno in the sb has been acked */
 #define JFS_FLUSHED	0x008	/* The journal superblock has been flushed */
 #define JFS_LOADED	0x010	/* The journal superblock has been loaded */
+#define JFS_BARRIER	0x020	/* Use IDE barriers */
 
 /* 
  * Function declarations for the journaling transaction and buffer
@@ -1006,6 +1007,7 @@
 int log_start_commit(journal_t *journal, tid_t tid);
 int __log_start_commit(journal_t *journal, tid_t tid);
 int journal_start_commit(journal_t *journal, tid_t *tid);
+int journal_force_commit_nested(journal_t *journal);
 int log_wait_commit(journal_t *journal, tid_t tid);
 int log_do_checkpoint(journal_t *journal);
 
--- diff/include/linux/kernel.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/kernel.h	2004-07-01 21:32:51.000000000 +0100
@@ -54,6 +54,16 @@
 #define might_sleep_if(cond) do {} while (0)
 #endif
 
+#define abs(x) ({				\
+		int __x = (x);			\
+		(__x < 0) ? -__x : __x;		\
+	})
+
+#define labs(x) ({				\
+		long __x = (x);			\
+		(__x < 0) ? -__x : __x;		\
+	})
+
 extern struct notifier_block *panic_notifier_list;
 NORET_TYPE void panic(const char * fmt, ...)
 	__attribute__ ((NORET_AND format (printf, 1, 2)));
@@ -61,7 +71,6 @@
 	ATTRIB_NORET;
 NORET_TYPE void complete_and_exit(struct completion *, long)
 	ATTRIB_NORET;
-extern int abs(int);
 extern unsigned long simple_strtoul(const char *,char **,unsigned int);
 extern long simple_strtol(const char *,char **,unsigned int);
 extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
@@ -84,6 +93,7 @@
 extern char *get_options(const char *str, int nints, int *ints);
 extern unsigned long long memparse(char *ptr, char **retptr);
 
+extern int __kernel_text_address(unsigned long addr);
 extern int kernel_text_address(unsigned long addr);
 extern int session_of_pgrp(int pgrp);
 
@@ -92,6 +102,15 @@
 
 unsigned long int_sqrt(unsigned long);
 
+static inline int __attribute_pure__ long_log2(unsigned long x)
+{
+	int r = 0;
+	for (x >>= 1; x > 0; x >>= 1)
+		r++;
+	return r;
+}
+
+
 extern int printk_ratelimit(void);
 extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
 
--- diff/include/linux/libata.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/libata.h	2004-07-01 21:32:51.000000000 +0100
@@ -91,6 +91,7 @@
 	ATA_DFLAG_MASTER	= (1 << 2), /* is device 0? */
 	ATA_DFLAG_WCACHE	= (1 << 3), /* has write cache we can
 					     * (hopefully) flush? */
+	ATA_DFLAG_LOCK_SECTORS	= (1 << 4), /* don't adjust max_sectors */
 
 	ATA_DEV_UNKNOWN		= 0,	/* unknown device */
 	ATA_DEV_ATA		= 1,	/* ATA device */
@@ -133,24 +134,10 @@
 	BUS_IDENTIFY		= 8,
 	BUS_PACKET		= 9,
 
-	/* thread states */
-	THR_UNKNOWN		= 0,
-	THR_PORT_RESET		= (THR_UNKNOWN + 1),
-	THR_AWAIT_DEATH		= (THR_PORT_RESET + 1),
-	THR_PROBE_FAILED	= (THR_AWAIT_DEATH + 1),
-	THR_IDLE		= (THR_PROBE_FAILED + 1),
-	THR_PROBE_SUCCESS	= (THR_IDLE + 1),
-	THR_PROBE_START		= (THR_PROBE_SUCCESS + 1),
-
 	/* SATA port states */
 	PORT_UNKNOWN		= 0,
 	PORT_ENABLED		= 1,
 	PORT_DISABLED		= 2,
-
-	/* ata_qc_cb_t flags - note uses above ATA_QCFLAG_xxx namespace,
-	 * but not numberspace
-	 */
-	ATA_QCFLAG_TIMEOUT	= (1 << 0),
 };
 
 enum pio_task_states {
@@ -294,18 +281,12 @@
 	struct ata_host_stats	stats;
 	struct ata_host_set	*host_set;
 
-	struct semaphore	probe_sem;
-
-	unsigned int		thr_state;
-
 	struct work_struct	packet_task;
 
 	struct work_struct	pio_task;
 	unsigned int		pio_task_state;
 	unsigned long		pio_task_timeout;
 
-	struct work_struct	probe_task;
-
 	void			*private_data;
 };
 
@@ -330,7 +311,7 @@
 
 	void (*bmdma_setup) (struct ata_queued_cmd *qc);
 	void (*bmdma_start) (struct ata_queued_cmd *qc);
-	void (*fill_sg) (struct ata_queued_cmd *qc);
+	void (*qc_prep) (struct ata_queued_cmd *qc);
 	void (*eng_timeout) (struct ata_port *ap);
 
 	irqreturn_t (*irq_handler)(int, void *, struct pt_regs *);
@@ -390,7 +371,7 @@
 extern int ata_port_start (struct ata_port *ap);
 extern void ata_port_stop (struct ata_port *ap);
 extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
-extern void ata_fill_sg(struct ata_queued_cmd *qc);
+extern void ata_qc_prep(struct ata_queued_cmd *qc);
 extern void ata_dev_id_string(struct ata_device *dev, unsigned char *s,
 			      unsigned int ofs, unsigned int len);
 extern void ata_bmdma_setup_mmio (struct ata_queued_cmd *qc);
@@ -556,4 +537,44 @@
 	return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0;
 }
 
+static inline void ata_bmdma_stop(struct ata_port *ap)
+{
+	if (ap->flags & ATA_FLAG_MMIO) {
+		void *mmio = (void *) ap->ioaddr.bmdma_addr;
+
+		/* clear start/stop bit */
+		writeb(readb(mmio + ATA_DMA_CMD) & ~ATA_DMA_START,
+		      mmio + ATA_DMA_CMD);
+	} else {
+		/* clear start/stop bit */
+		outb(inb(ap->ioaddr.bmdma_addr + ATA_DMA_CMD) & ~ATA_DMA_START,
+		    ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
+	}
+
+	/* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
+	ata_altstatus(ap);	      /* dummy read */
+}
+
+static inline void ata_bmdma_ack_irq(struct ata_port *ap)
+{
+	if (ap->flags & ATA_FLAG_MMIO) {
+		void *mmio = ((void *) ap->ioaddr.bmdma_addr) + ATA_DMA_STATUS;
+		writeb(readb(mmio), mmio);
+	} else {
+		unsigned long addr = ap->ioaddr.bmdma_addr + ATA_DMA_STATUS;
+		outb(inb(addr), addr);
+	}
+}
+
+static inline u8 ata_bmdma_status(struct ata_port *ap)
+{
+	u8 host_stat;
+	if (ap->flags & ATA_FLAG_MMIO) {
+		void *mmio = (void *) ap->ioaddr.bmdma_addr;
+		host_stat = readb(mmio + ATA_DMA_STATUS);
+	} else
+		host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+	return host_stat;
+}
+
 #endif /* __LINUX_LIBATA_H__ */
--- diff/include/linux/list.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/list.h	2004-07-01 21:32:51.000000000 +0100
@@ -6,6 +6,7 @@
 #include <linux/stddef.h>
 #include <linux/prefetch.h>
 #include <asm/system.h>
+#include <asm/bug.h>
 
 /*
  * These are non-NULL pointers that will result in page faults
@@ -160,6 +161,8 @@
  */
 static inline void list_del(struct list_head *entry)
 {
+	BUG_ON(entry->prev->next != entry);
+	BUG_ON(entry->next->prev != entry);
 	__list_del(entry->prev, entry->next);
 	entry->next = LIST_POISON1;
 	entry->prev = LIST_POISON2;
--- diff/include/linux/mca.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/mca.h	2004-07-01 21:32:51.000000000 +0100
@@ -12,7 +12,9 @@
 #include <linux/device.h>
 
 /* get the platform specific defines */
+#ifdef CONFIG_MCA
 #include <asm/mca.h>
+#endif
 
 /* The detection of MCA bus is done in the real mode (using BIOS).
  * The information is exported to the protected code, where this
--- diff/include/linux/mempolicy.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/mempolicy.h	2004-07-01 21:32:51.000000000 +0100
@@ -153,6 +153,9 @@
 struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp,
 					    unsigned long idx);
 
+extern void numa_default_policy(void);
+extern void numa_policy_init(void);
+
 #else
 
 struct mempolicy {};
@@ -215,6 +218,14 @@
 #define vma_policy(vma) NULL
 #define vma_set_policy(vma, pol) do {} while(0)
 
+static inline void numa_policy_init(void)
+{
+}
+
+static inline void numa_default_policy(void)
+{
+}
+
 #endif /* CONFIG_NUMA */
 #endif /* __KERNEL__ */
 
--- diff/include/linux/miscdevice.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/miscdevice.h	2004-07-01 21:32:51.000000000 +0100
@@ -35,6 +35,7 @@
 #define SGI_USEMACLONE	     151
 
 #define TUN_MINOR	     200
+#define	HPET_MINOR	     228
 
 struct device;
 
--- diff/include/linux/mm.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/mm.h	2004-07-01 21:32:51.000000000 +0100
@@ -23,6 +23,7 @@
 
 extern unsigned long num_physpages;
 extern void * high_memory;
+extern unsigned long vmalloc_earlyreserve;
 extern int page_cluster;
 
 #include <asm/page.h>
--- diff/include/linux/mmzone.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/mmzone.h	2004-07-01 21:32:51.000000000 +0100
@@ -20,6 +20,18 @@
 #define MAX_ORDER CONFIG_FORCE_MAX_ZONEORDER
 #endif
 
+/*
+ * system hash table size limits
+ * - on large memory machines, we may want to allocate a bigger hash than that
+ *   permitted by MAX_ORDER, so we allocate with the bootmem allocator, and are
+ *   limited to this size
+ */
+#if MAX_ORDER > 14
+#define MAX_SYS_HASH_TABLE_ORDER MAX_ORDER
+#else
+#define MAX_SYS_HASH_TABLE_ORDER 14
+#endif
+
 struct free_area {
 	struct list_head	free_list;
 	unsigned long		*map;
@@ -69,7 +81,34 @@
 #define MAX_NR_ZONES		3	/* Sync this with ZONES_SHIFT */
 #define ZONES_SHIFT		2	/* ceil(log2(MAX_NR_ZONES)) */
 
+
+/*
+ * When a memory allocation must conform to specific limitations (such
+ * as being suitable for DMA) the caller will pass in hints to the
+ * allocator in the gfp_mask, in the zone modifier bits.  These bits
+ * are used to select a priority ordered list of memory zones which
+ * match the requested limits.  GFP_ZONEMASK defines which bits within
+ * the gfp_mask should be considered as zone modifiers.  Each valid
+ * combination of the zone modifier bits has a corresponding list
+ * of zones (in node_zonelists).  Thus for two zone modifiers there
+ * will be a maximum of 4 (2 ** 2) zonelists, for 3 modifiers there will
+ * be 8 (2 ** 3) zonelists.  GFP_ZONETYPES defines the number of possible
+ * combinations of zone modifiers in "zone modifier space".
+ */
 #define GFP_ZONEMASK	0x03
+/*
+ * As an optimisation any zone modifier bits which are only valid when
+ * no other zone modifier bits are set (loners) should be placed in
+ * the highest order bits of this field.  This allows us to reduce the
+ * extent of the zonelists thus saving space.  For example in the case
+ * of three zone modifier bits, we could require up to eight zonelists.
+ * If the left most zone modifier is a "loner" then the highest valid
+ * zonelist would be four allowing us to allocate only five zonelists.
+ * Use the first form when the left most bit is not a "loner", otherwise
+ * use the second.
+ */
+/* #define GFP_ZONETYPES	(GFP_ZONEMASK + 1) */		/* Non-loner */
+#define GFP_ZONETYPES	((GFP_ZONEMASK + 1) / 2 + 1)		/* Loner */
 
 /*
  * On machines where it is needed (eg PCs) we divide physical memory
@@ -106,8 +145,8 @@
 	spinlock_t		lru_lock;	
 	struct list_head	active_list;
 	struct list_head	inactive_list;
-	atomic_t		nr_scan_active;
-	atomic_t		nr_scan_inactive;
+	unsigned long		nr_scan_active;
+	unsigned long		nr_scan_inactive;
 	unsigned long		nr_active;
 	unsigned long		nr_inactive;
 	int			all_unreclaimable; /* All pages pinned */
@@ -225,7 +264,7 @@
 struct bootmem_data;
 typedef struct pglist_data {
 	struct zone node_zones[MAX_NR_ZONES];
-	struct zonelist node_zonelists[MAX_NR_ZONES];
+	struct zonelist node_zonelists[GFP_ZONETYPES];
 	int nr_zones;
 	struct page *node_mem_map;
 	struct bootmem_data *bdata;
--- diff/include/linux/module.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/module.h	2004-07-01 21:32:51.000000000 +0100
@@ -225,6 +225,22 @@
 	struct module_attribute attr[0];
 };
 
+/* Similar stuff for section attributes. */
+#define MODULE_SECT_NAME_LEN 32
+struct module_sect_attr
+{
+	struct attribute attr;
+	char name[MODULE_SECT_NAME_LEN];
+	unsigned long address;
+};
+
+struct module_sections
+{
+	struct kobject kobj;
+	struct module_sect_attr attrs[0];
+};
+
+
 struct module
 {
 	enum module_state state;
@@ -298,6 +314,9 @@
 	Elf_Sym *symtab;
 	unsigned long num_symtab;
 	char *strtab;
+
+	/* Section attributes */
+	struct module_sections *sect_attrs;
 #endif
 
 	/* Per-cpu data. */
@@ -316,8 +335,9 @@
 	return mod->state != MODULE_STATE_GOING;
 }
 
-/* Is this address in a module? */
+/* Is this address in a module? (second is with no locks, for oops) */
 struct module *module_text_address(unsigned long addr);
+struct module *__module_text_address(unsigned long addr);
 
 /* Returns module and fills in value, defined and namebuf, or NULL if
    symnum out of range. */
@@ -443,6 +463,12 @@
 	return NULL;
 }
 
+/* Is this address in a module? (don't take a lock, we're oopsing) */
+static inline struct module *__module_text_address(unsigned long addr)
+{
+	return NULL;
+}
+
 /* Get/put a kernel symbol (calls should be symmetric) */
 #define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
 #define symbol_put(x) do { } while(0)
--- diff/include/linux/mqueue.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/mqueue.h	2004-07-01 21:32:51.000000000 +0100
@@ -21,6 +21,8 @@
 #include <linux/types.h>
 
 #define MQ_PRIO_MAX 	32768
+/* per-uid limit of kernel memory used by mqueue, in bytes */
+#define MQ_BYTES_MAX	819200
 
 struct mq_attr {
 	long	mq_flags;	/* message queue flags			*/
--- diff/include/linux/mtd/mtd.h	2004-05-19 22:13:04.000000000 +0100
+++ source/include/linux/mtd/mtd.h	2004-07-01 21:32:51.000000000 +0100
@@ -22,7 +22,7 @@
 struct mtd_oob_buf {
 	u_int32_t start;
 	u_int32_t length;
-	unsigned char *ptr;
+	unsigned char __user *ptr;
 };
 
 #define MTD_CHAR_MAJOR 90
--- diff/include/linux/namei.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/namei.h	2004-07-01 21:32:51.000000000 +0100
@@ -10,12 +10,16 @@
 	int	create_mode;
 };
 
+enum { MAX_NESTED_LINKS = 5 };
+
 struct nameidata {
 	struct dentry	*dentry;
 	struct vfsmount *mnt;
 	struct qstr	last;
 	unsigned int	flags;
 	int		last_type;
+	unsigned	depth;
+	char *saved_names[MAX_NESTED_LINKS + 1];
 
 	/* Intent data */
 	union {
@@ -67,4 +71,14 @@
 extern struct dentry *lock_rename(struct dentry *, struct dentry *);
 extern void unlock_rename(struct dentry *, struct dentry *);
 
+static inline void nd_set_link(struct nameidata *nd, char *path)
+{
+	nd->saved_names[nd->depth] = path;
+}
+
+static inline char *nd_get_link(struct nameidata *nd)
+{
+	return nd->saved_names[nd->depth];
+}
+
 #endif /* _LINUX_NAMEI_H */
--- diff/include/linux/ncp_fs.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/ncp_fs.h	2004-07-01 21:32:51.000000000 +0100
@@ -24,7 +24,7 @@
 struct ncp_ioctl_request {
 	unsigned int function;
 	unsigned int size;
-	char *data;
+	char __user *data;
 };
 
 struct ncp_fs_info {
@@ -88,13 +88,13 @@
 #define NCP_AUTH_NDS	0x32
 	int		auth_type;
 	size_t		object_name_len;
-	void*		object_name;	/* an userspace data, in most cases user name */
+	void __user *	object_name;	/* an userspace data, in most cases user name */
 };
 
 struct ncp_privatedata_ioctl
 {
 	size_t		len;
-	void*		data;		/* ~1000 for NDS */
+	void __user *	data;		/* ~1000 for NDS */
 };
 
 /* NLS charsets by ioctl */
--- diff/include/linux/netdevice.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/netdevice.h	2004-07-01 21:32:51.000000000 +0100
@@ -366,6 +366,8 @@
 	struct Qdisc		*qdisc_ingress;
 	unsigned long		tx_queue_len;	/* Max frames per queue allowed */
 
+	/* ingress path synchronizer */
+	spinlock_t		ingress_lock;
 	/* hard_start_xmit synchronizer */
 	spinlock_t		xmit_lock;
 	/* cpu id of processor entered to hard_start_xmit or -1,
@@ -405,6 +407,7 @@
 #define NETIF_F_HW_VLAN_FILTER	512	/* Receive filtering on VLAN */
 #define NETIF_F_VLAN_CHALLENGED	1024	/* Device cannot handle VLAN packets */
 #define NETIF_F_TSO		2048	/* Can offload TCP/IP segmentation */
+#define NETIF_F_LLTX		4096	/* LockLess TX */
 
 	/* Called after device is detached from network. */
 	void			(*uninit)(struct net_device *dev);
--- diff/include/linux/netfilter.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/netfilter.h	2004-07-01 21:32:51.000000000 +0100
@@ -10,6 +10,7 @@
 #include <linux/wait.h>
 #include <linux/list.h>
 #endif
+#include <linux/compiler.h>
 
 /* Responses from hook functions. */
 #define NF_DROP 0
--- diff/include/linux/netfilter_arp/arp_tables.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/netfilter_arp/arp_tables.h	2004-07-01 21:32:51.000000000 +0100
@@ -16,7 +16,7 @@
 #include <linux/if_arp.h>
 #include <linux/skbuff.h>
 #endif
-
+#include <linux/compiler.h>
 #include <linux/netfilter_arp.h>
 
 #define ARPT_FUNCTION_MAXNAMELEN 30
--- diff/include/linux/netfilter_ipv4/ip_conntrack.h	2004-05-19 22:13:04.000000000 +0100
+++ source/include/linux/netfilter_ipv4/ip_conntrack.h	2004-07-01 21:32:51.000000000 +0100
@@ -103,7 +103,7 @@
 #include <linux/types.h>
 #include <linux/skbuff.h>
 
-#ifdef CONFIG_NF_DEBUG
+#ifdef CONFIG_NETFILTER_DEBUG
 #define IP_NF_ASSERT(x)							\
 do {									\
 	if (!(x))							\
--- diff/include/linux/netfilter_ipv4/ip_tables.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/netfilter_ipv4/ip_tables.h	2004-07-01 21:32:51.000000000 +0100
@@ -22,6 +22,7 @@
 #include <linux/ip.h>
 #include <linux/skbuff.h>
 #endif
+#include <linux/compiler.h>
 #include <linux/netfilter_ipv4.h>
 
 #define IPT_FUNCTION_MAXNAMELEN 30
@@ -336,8 +337,8 @@
 /*
  *	Main firewall chains definitions and global var's definitions.
  */
-static DECLARE_MUTEX(ipt_mutex);
 #ifdef __KERNEL__
+static DECLARE_MUTEX(ipt_mutex);
 
 #include <linux/init.h>
 extern void ipt_init(void) __init;
--- diff/include/linux/netfilter_ipv6/ip6_tables.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/netfilter_ipv6/ip6_tables.h	2004-07-01 21:32:51.000000000 +0100
@@ -22,6 +22,7 @@
 #include <linux/ipv6.h>
 #include <linux/skbuff.h>
 #endif
+#include <linux/compiler.h>
 #include <linux/netfilter_ipv6.h>
 
 #define IP6T_FUNCTION_MAXNAMELEN 30
@@ -106,7 +107,9 @@
 	u_int64_t pcnt, bcnt;			/* Packet and byte counters */
 };
 
+#ifdef __KERNEL__
 static DECLARE_MUTEX(ip6t_mutex);
+#endif
 
 /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */
 #define IP6T_F_PROTO		0x01	/* Set if rule cares about upper 
--- diff/include/linux/nfs4_mount.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/nfs4_mount.h	2004-07-01 21:32:51.000000000 +0100
@@ -20,7 +20,7 @@
 
 struct nfs_string {
 	unsigned int len;
-	const char* data;
+	const char __user * data;
 };
 
 struct nfs4_mount_data {
@@ -45,14 +45,14 @@
 	struct nfs_string hostname;		/* 1 */
 	/* Server IP address */
 	unsigned int host_addrlen;		/* 1 */
-	struct sockaddr* host_addr;		/* 1 */
+	struct sockaddr __user * host_addr;	/* 1 */
 
 	/* Transport protocol to use */
 	int proto;				/* 1 */
 
 	/* Pseudo-flavours to use for authentication. See RFC2623 */
 	int auth_flavourlen;			/* 1 */
-	int *auth_flavours;			/* 1 */
+	int __user *auth_flavours;		/* 1 */
 };
 
 /* bits in the flags field */
--- diff/include/linux/nfsd/nfsd.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/nfsd/nfsd.h	2004-07-01 21:32:51.000000000 +0100
@@ -126,9 +126,13 @@
 #ifdef CONFIG_NFSD_V4
 void nfs4_state_init(void);
 void nfs4_state_shutdown(void);
+time_t nfs4_lease_time(void);
+void nfs4_reset_lease(time_t leasetime);
 #else
 void static inline nfs4_state_init(void){}
 void static inline nfs4_state_shutdown(void){}
+time_t static inline nfs4_lease_time(void){return 0;}
+void static inline nfs4_reset_lease(time_t leasetime){}
 #endif
 
 /*
@@ -249,7 +253,7 @@
 #define	COMPOUND_SLACK_SPACE		140    /* OP_GETFH */
 #define COMPOUND_ERR_SLACK_SPACE	12     /* OP_SETATTR */
 
-#define NFSD_LEASE_TIME			60  /* seconds */
+#define NFSD_LEASE_TIME                 (nfs4_lease_time())
 #define NFSD_LAUNDROMAT_MINTIMEOUT      10   /* seconds */
 
 /*
--- diff/include/linux/nfsd/state.h	2004-05-19 22:13:05.000000000 +0100
+++ source/include/linux/nfsd/state.h	2004-07-01 21:32:51.000000000 +0100
@@ -38,6 +38,7 @@
 #define _NFSD4_STATE_H
 
 #include <linux/list.h>
+#include <linux/sunrpc/clnt.h>
 
 #define NFS4_OPAQUE_LIMIT 1024
 typedef struct {
@@ -65,6 +66,22 @@
 #define ZERO_STATEID(stateid)       (!memcmp((stateid), &zerostateid, sizeof(stateid_t)))
 #define ONE_STATEID(stateid)        (!memcmp((stateid), &onestateid, sizeof(stateid_t)))
 
+/* client delegation callback info */
+struct nfs4_callback {
+	/* SETCLIENTID info */
+	u32			cb_parsed;  /* addr parsed */
+	u32                     cb_addr;
+	unsigned short          cb_port;
+	u32                     cb_prog;
+	u32                     cb_ident;
+	struct xdr_netobj	cb_netid;
+	/* RPC client info */
+	u32			cb_set;     /* successful CB_NULL call */
+	struct rpc_program      cb_program;
+	struct rpc_stat         cb_stat;
+	struct rpc_clnt *       cb_client;
+};
+
 /*
  * struct nfs4_client - one per client.  Clientids live here.
  * 	o Each nfs4_client is hashed by clientid.
@@ -87,6 +104,20 @@
 	struct svc_cred		cl_cred; 	/* setclientid principal */
 	clientid_t		cl_clientid;	/* generated by server */
 	nfs4_verifier		cl_confirm;	/* generated by server */
+	struct nfs4_callback	cl_callback;    /* callback info */
+	time_t			cl_first_state; /* first state aquisition*/
+};
+
+/* struct nfs4_client_reset
+ * one per old client. Populates reset_str_hashtbl. Filled from conf_id_hashtbl
+ * upon lease reset, or from upcall to state_daemon (to read in state
+ * from non-volitile storage) upon reboot.
+ */
+struct nfs4_client_reclaim {
+	struct list_head	cr_strhash;	/* hash by cr_name */
+	struct xdr_netobj 	cr_name; 	/* id generated by client */
+	time_t			cr_first_state; /* first state aquisition */
+	u32			cr_expired;     /* boolean: lease expired? */
 };
 
 static inline void
@@ -216,5 +247,5 @@
 extern void nfs4_lock_state(void);
 extern void nfs4_unlock_state(void);
 extern int nfs4_in_grace(void);
-extern int nfs4_in_no_grace(void);
+extern int nfs4_check_open_reclaim(clientid_t *clid);
 #endif   /* NFSD4_STATE_H */
--- diff/include/linux/nfsd/xdr4.h	2004-05-19 22:13:05.000000000 +0100
+++ source/include/linux/nfsd/xdr4.h	2004-07-01 21:32:51.000000000 +0100
@@ -378,6 +378,7 @@
 	u32 *				tmpp;
 	struct tmpbuf {
 		struct tmpbuf *next;
+		void (*release)(const void *);
 		void *buf;
 	}				*to_free;
 
@@ -449,6 +450,7 @@
 extern int
 nfsd4_release_lockowner(struct svc_rqst *rqstp,
 		struct nfsd4_release_lockowner *rlockowner);
+extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *);
 #endif
 
 /*
--- diff/include/linux/oprofile.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/oprofile.h	2004-07-01 21:32:51.000000000 +0100
@@ -65,6 +65,9 @@
  */
 int oprofilefs_create_file(struct super_block * sb, struct dentry * root,
 	char const * name, struct file_operations * fops);
+
+int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root,
+	char const * name, struct file_operations * fops, int perm);
  
 /** Create a file for read/write access to an unsigned long. */
 int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root,
--- diff/include/linux/page-flags.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/page-flags.h	2004-07-01 21:32:51.000000000 +0100
@@ -194,16 +194,10 @@
 #define ClearPageReferenced(page)	clear_bit(PG_referenced, &(page)->flags)
 #define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags)
 
-#ifndef arch_set_page_uptodate
-#define arch_set_page_uptodate(page) do { } while (0)
-#endif
-
 #define PageUptodate(page)	test_bit(PG_uptodate, &(page)->flags)
-#define SetPageUptodate(page) \
-	do {								\
-		arch_set_page_uptodate(page);				\
-		set_bit(PG_uptodate, &(page)->flags);			\
-	} while (0)
+#ifndef SetPageUptodate
+#define SetPageUptodate(page)	set_bit(PG_uptodate, &(page)->flags)
+#endif
 #define ClearPageUptodate(page)	clear_bit(PG_uptodate, &(page)->flags)
 
 #define PageDirty(page)		test_bit(PG_dirty, &(page)->flags)
--- diff/include/linux/pagemap.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/pagemap.h	2004-07-01 21:32:51.000000000 +0100
@@ -8,6 +8,7 @@
 #include <linux/fs.h>
 #include <linux/list.h>
 #include <linux/highmem.h>
+#include <linux/compiler.h>
 #include <asm/uaccess.h>
 #include <linux/gfp.h>
 
@@ -136,7 +137,10 @@
 
 static inline unsigned long get_page_cache_size(void)
 {
-        return atomic_read(&nr_pagecache);
+	int ret = atomic_read(&nr_pagecache);
+	if (unlikely(ret < 0))
+		ret = 0;
+	return ret;
 }
 
 static inline pgoff_t linear_page_index(struct vm_area_struct *vma,
--- diff/include/linux/pci_ids.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/pci_ids.h	2004-07-01 21:32:51.000000000 +0100
@@ -967,12 +967,14 @@
 
 #define PCI_VENDOR_ID_3COM		0x10b7
 #define PCI_DEVICE_ID_3COM_3C985	0x0001
+#define PCI_DEVICE_ID_3COM_3C940	0x1700
 #define PCI_DEVICE_ID_3COM_3C339	0x3390
 #define PCI_DEVICE_ID_3COM_3C359	0x3590
 #define PCI_DEVICE_ID_3COM_3C590	0x5900
 #define PCI_DEVICE_ID_3COM_3C595TX	0x5950
 #define PCI_DEVICE_ID_3COM_3C595T4	0x5951
 #define PCI_DEVICE_ID_3COM_3C595MII	0x5952
+#define PCI_DEVICE_ID_3COM_3C940B	0x80eb
 #define PCI_DEVICE_ID_3COM_3C900TPO	0x9000
 #define PCI_DEVICE_ID_3COM_3C900COMBO	0x9001
 #define PCI_DEVICE_ID_3COM_3C905TX	0x9050
@@ -1215,6 +1217,7 @@
 #define PCI_DEVICE_ID_VIA_8233C_0	0x3109
 #define PCI_DEVICE_ID_VIA_8361		0x3112
 #define PCI_DEVICE_ID_VIA_XM266		0x3116
+#define PCI_DEVICE_ID_VIA_612X		0x3119
 #define PCI_DEVICE_ID_VIA_862X_0	0x3123
 #define PCI_DEVICE_ID_VIA_8753_0	0x3128
 #define PCI_DEVICE_ID_VIA_8233A		0x3147
@@ -1420,6 +1423,9 @@
 #define PCI_DEVICE_ID_RICOH_RL5C476	0x0476
 #define PCI_DEVICE_ID_RICOH_RL5C478	0x0478
 
+#define PCI_VENDOR_ID_DLINK		0x1186
+#define PCI_DEVICE_ID_DLINK_DGE510T	0x4c00
+
 #define PCI_VENDOR_ID_ARTOP		0x1191
 #define PCI_DEVICE_ID_ARTOP_ATP8400	0x0004
 #define PCI_DEVICE_ID_ARTOP_ATP850UF	0x0005
@@ -1735,6 +1741,9 @@
 #define PCI_VENDOR_ID_KAWASAKI		0x136b
 #define PCI_DEVICE_ID_MCHIP_KL5A72002	0xff01
 
+#define PCI_VENDOR_ID_CNET		0x1371
+#define PCI_DEVICE_ID_CNET_GIGACARD	0x434e
+
 #define PCI_VENDOR_ID_LMC		0x1376
 #define PCI_DEVICE_ID_LMC_HSSI		0x0003
 #define PCI_DEVICE_ID_LMC_DS3		0x0004
@@ -1769,8 +1778,16 @@
 #define PCI_DEVICE_ID_CCD_B00C		0xb00c
 #define PCI_DEVICE_ID_CCD_B100		0xb100
 
+#define PCI_VENDOR_ID_MICROGATE		0x13c0
+#define PCI_DEVICE_ID_MICROGATE_USC	0x0010
+#define PCI_DEVICE_ID_MICROGATE_SCC	0x0020
+#define PCI_DEVICE_ID_MICROGATE_SCA	0x0030
+#define PCI_DEVICE_ID_MICROGATE_USC2	0x0210
+
 #define PCI_VENDOR_ID_3WARE		0x13C1
 #define PCI_DEVICE_ID_3WARE_1000	0x1000
+#define PCI_DEVICE_ID_3WARE_7000	0x1001
+#define PCI_DEVICE_ID_3WARE_9000	0x1002
 
 #define PCI_VENDOR_ID_IOMEGA		0x13ca
 #define PCI_DEVICE_ID_IOMEGA_BUZ	0x4231
@@ -1911,6 +1928,10 @@
 #define PCI_DEVICE_ID_FARSITE_TE1       0x1610
 #define PCI_DEVICE_ID_FARSITE_TE1C      0x1612
 
+#define PCI_VENDOR_ID_LINKSYS		0x1737
+#define PCI_DEVICE_ID_LINKSYS_EG1032	0x1032
+#define PCI_DEVICE_ID_LINKSYS_EG1064	0x1064
+
 #define PCI_VENDOR_ID_ALTIMA		0x173b
 #define PCI_DEVICE_ID_ALTIMA_AC1000	0x03e8
 #define PCI_DEVICE_ID_ALTIMA_AC1001	0x03e9
@@ -2016,6 +2037,7 @@
 #define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221
 #define PCI_DEVICE_ID_INTEL_82092AA_1	0x1222
 #define PCI_DEVICE_ID_INTEL_7116	0x1223
+#define PCI_DEVICE_ID_INTEL_7501_0	0x254c
 #define PCI_DEVICE_ID_INTEL_7505_0	0x2550  
 #define PCI_DEVICE_ID_INTEL_7505_1	0x2552  
 #define PCI_DEVICE_ID_INTEL_7205_0	0x255d
@@ -2250,8 +2272,12 @@
 #define PCI_DEVICE_ID_HOLTEK_6565	0x6565
 
 #define PCI_VENDOR_ID_NETMOS		0x9710
+#define PCI_DEVICE_ID_NETMOS_9705	0x9705
 #define PCI_DEVICE_ID_NETMOS_9735	0x9735
+#define PCI_DEVICE_ID_NETMOS_9805	0x9805
+#define PCI_DEVICE_ID_NETMOS_9815	0x9815
 #define PCI_DEVICE_ID_NETMOS_9835	0x9835
+#define PCI_DEVICE_ID_NETMOS_9855	0x9855
 
 #define PCI_SUBVENDOR_ID_EXSYS		0xd84d
 #define PCI_SUBDEVICE_ID_EXSYS_4014	0x4014
@@ -2264,12 +2290,3 @@
 #define PCI_DEVICE_ID_ARK_STING		0xa091
 #define PCI_DEVICE_ID_ARK_STINGARK	0xa099
 #define PCI_DEVICE_ID_ARK_2000MT	0xa0a1
-
-#define PCI_VENDOR_ID_MICROGATE		0x13c0
-#define PCI_DEVICE_ID_MICROGATE_USC	0x0010
-#define PCI_DEVICE_ID_MICROGATE_SCC	0x0020
-#define PCI_DEVICE_ID_MICROGATE_SCA	0x0030
-#define PCI_DEVICE_ID_MICROGATE_USC2	0x0210
-
-#define PCI_VENDOR_ID_HINT		0x3388
-#define PCI_DEVICE_ID_HINT_VXPROII_IDE	0x8013
--- diff/include/linux/personality.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/personality.h	2004-07-01 21:32:51.000000000 +0100
@@ -30,6 +30,7 @@
  */
 enum {
 	MMAP_PAGE_ZERO =	0x0100000,
+	ADDR_COMPAT_LAYOUT =	0x0200000,
 	ADDR_LIMIT_32BIT =	0x0800000,
 	SHORT_INODE =		0x1000000,
 	WHOLE_SECONDS =		0x2000000,
--- diff/include/linux/pkt_cls.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/pkt_cls.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,14 +1,139 @@
 #ifndef __LINUX_PKT_CLS_H
 #define __LINUX_PKT_CLS_H
 
+/* I think i could have done better macros ; for now this is stolen from
+ * some arch/mips code - jhs
+*/
+#define _TC_MAKE32(x) ((x))
+
+#define _TC_MAKEMASK1(n) (_TC_MAKE32(1) << _TC_MAKE32(n))
+#define _TC_MAKEMASK(v,n) (_TC_MAKE32((_TC_MAKE32(1)<<(v))-1) << _TC_MAKE32(n))
+#define _TC_MAKEVALUE(v,n) (_TC_MAKE32(v) << _TC_MAKE32(n))
+#define _TC_GETVALUE(v,n,m) ((_TC_MAKE32(v) & _TC_MAKE32(m)) >> _TC_MAKE32(n))
+
+/* verdict bit breakdown 
+ *
+bit 0: when set -> this packet has been munged already
+
+bit 1: when set -> It is ok to munge this packet
+
+bit 2,3,4,5: Reclassify counter - sort of reverse TTL - if exceeded
+assume loop
+
+bit 6,7: Where this packet was last seen 
+0: Above the transmit example at the socket level
+1: on the Ingress
+2: on the Egress
+
+bit 8: when set --> Request not to classify on ingress. 
+
+bits 9,10,11: redirect counter -  redirect TTL. Loop avoidance
+
+ *
+ * */
+
+#define TC_MUNGED          _TC_MAKEMASK1(0)
+#define SET_TC_MUNGED(v)   ( TC_MUNGED | (v & ~TC_MUNGED))
+#define CLR_TC_MUNGED(v)   ( v & ~TC_MUNGED)
+
+#define TC_OK2MUNGE        _TC_MAKEMASK1(1)
+#define SET_TC_OK2MUNGE(v)   ( TC_OK2MUNGE | (v & ~TC_OK2MUNGE))
+#define CLR_TC_OK2MUNGE(v)   ( v & ~TC_OK2MUNGE)
+
+#define S_TC_VERD          _TC_MAKE32(2)
+#define M_TC_VERD          _TC_MAKEMASK(4,S_TC_VERD)
+#define G_TC_VERD(x)       _TC_GETVALUE(x,S_TC_VERD,M_TC_VERD)
+#define V_TC_VERD(x)       _TC_MAKEVALUE(x,S_TC_VERD)
+#define SET_TC_VERD(v,n)   ((V_TC_VERD(n)) | (v & ~M_TC_VERD))
+
+#define S_TC_FROM          _TC_MAKE32(6)
+#define M_TC_FROM          _TC_MAKEMASK(2,S_TC_FROM)
+#define G_TC_FROM(x)       _TC_GETVALUE(x,S_TC_FROM,M_TC_FROM)
+#define V_TC_FROM(x)       _TC_MAKEVALUE(x,S_TC_FROM)
+#define SET_TC_FROM(v,n)   ((V_TC_FROM(n)) | (v & ~M_TC_FROM))
+#define AT_STACK	0x0
+#define AT_INGRESS	0x1
+#define AT_EGRESS	0x2
+
+#define TC_NCLS          _TC_MAKEMASK1(8)
+#define SET_TC_NCLS(v)   ( TC_NCLS | (v & ~TC_NCLS))
+#define CLR_TC_NCLS(v)   ( v & ~TC_NCLS)
+
+#define S_TC_RTTL          _TC_MAKE32(9)
+#define M_TC_RTTL          _TC_MAKEMASK(3,S_TC_RTTL)
+#define G_TC_RTTL(x)       _TC_GETVALUE(x,S_TC_RTTL,M_TC_RTTL)
+#define V_TC_RTTL(x)       _TC_MAKEVALUE(x,S_TC_RTTL)
+#define SET_TC_RTTL(v,n)   ((V_TC_RTTL(n)) | (v & ~M_TC_RTTL))
+
+#define S_TC_AT          _TC_MAKE32(12)
+#define M_TC_AT          _TC_MAKEMASK(2,S_TC_AT)
+#define G_TC_AT(x)       _TC_GETVALUE(x,S_TC_AT,M_TC_AT)
+#define V_TC_AT(x)       _TC_MAKEVALUE(x,S_TC_AT)
+#define SET_TC_AT(v,n)   ((V_TC_AT(n)) | (v & ~M_TC_AT))
+
+/* Action attributes */
+enum
+{
+	TCA_ACT_UNSPEC,
+	TCA_ACT_KIND,
+	TCA_ACT_OPTIONS,
+	TCA_ACT_INDEX,
+	__TCA_ACT_MAX
+};
+
+#define TCA_ACT_MAX __TCA_ACT_MAX
+#define TCA_OLD_COMPAT (TCA_ACT_MAX+1)
+#define TCA_ACT_MAX_PRIO 32
+#define TCA_ACT_BIND	1
+#define TCA_ACT_NOBIND	0
+#define TCA_ACT_UNBIND	1
+#define TCA_ACT_NOUNBIND	0
+#define TCA_ACT_REPLACE		1
+#define TCA_ACT_NOREPLACE	0
+#define MAX_REC_LOOP 4
+#define MAX_RED_LOOP 4
+
+#define TC_ACT_UNSPEC	(-1)
+#define TC_ACT_OK		0
+#define TC_ACT_RECLASSIFY	1
+#define TC_ACT_SHOT		2
+#define TC_ACT_PIPE		3
+#define TC_ACT_STOLEN		4
+#define TC_ACT_QUEUED		5
+#define TC_ACT_REPEAT		6
+#define TC_ACT_JUMP		0x10000000
+
+/* Action type identifiers*/
+enum
+{
+	TCA_ID_UNSPEC=0,
+	TCA_ID_POLICE=1,
+	/* other actions go here */
+	__TCA_ID_MAX=255
+};
+
+#define TCA_ID_MAX __TCA_ID_MAX
+
 struct tc_police
 {
 	__u32			index;
+#ifdef CONFIG_NET_CLS_ACT
+	int 			refcnt;
+	int 			bindcnt;
+#endif
+/* Turned off because it requires new tc
+ * to work (for now maintain ABI)
+ *
+#ifdef CONFIG_NET_CLS_ACT
+	__u32			capab;
+#endif
+*/
 	int			action;
-#define TC_POLICE_UNSPEC	(-1)
-#define TC_POLICE_OK		0
-#define TC_POLICE_RECLASSIFY	1
-#define TC_POLICE_SHOT		2
+#define TC_POLICE_UNSPEC	TC_ACT_UNSPEC
+#define TC_POLICE_OK		TC_ACT_OK
+#define TC_POLICE_RECLASSIFY	TC_ACT_RECLASSIFY
+#define TC_POLICE_SHOT		TC_ACT_SHOT
+#define TC_POLICE_PIPE		TC_ACT_PIPE
 
 	__u32			limit;
 	__u32			burst;
@@ -17,6 +142,26 @@
 	struct tc_ratespec	peakrate;
 };
 
+struct tcf_t
+{
+	__u32   install;
+	__u32   lastuse;
+	__u32   expires;
+};
+
+struct tc_cnt
+{
+	int                   refcnt; 
+	int                   bindcnt;
+};
+
+#define tc_gen \
+	__u32                 index; \
+	__u32                 capab; \
+	int                   action; \
+	int                   refcnt; \
+	int                   bindcnt
+
 enum
 {
 	TCA_POLICE_UNSPEC,
@@ -25,8 +170,8 @@
 	TCA_POLICE_PEAKRATE,
 	TCA_POLICE_AVRATE,
 	TCA_POLICE_RESULT,
-#define TCA_POLICE_RESULT TCA_POLICE_RESULT
 	__TCA_POLICE_MAX
+#define TCA_POLICE_RESULT TCA_POLICE_RESULT
 };
 
 #define TCA_POLICE_MAX (__TCA_POLICE_MAX - 1)
@@ -50,6 +195,12 @@
 	TCA_U32_DIVISOR,
 	TCA_U32_SEL,
 	TCA_U32_POLICE,
+#ifdef CONFIG_NET_CLS_ACT
+	TCA_U32_ACT,   
+#endif
+#ifdef CONFIG_NET_CLS_IND
+	TCA_U32_INDEV,
+#endif
 	__TCA_U32_MAX
 };
 
@@ -61,6 +212,9 @@
 	__u32		val;
 	int		off;
 	int		offmask;
+#ifdef CONFIG_CLS_U32_PERF
+	unsigned long	kcnt;
+#endif
 };
 
 struct tc_u32_sel
@@ -68,6 +222,9 @@
 	unsigned char		flags;
 	unsigned char		offshift;
 	unsigned char		nkeys;
+#ifdef fix_u32_bug
+	unsigned char		fshift;  /* fold shift */
+#endif
 
 	__u16			offmask;
 	__u16			off;
@@ -75,7 +232,10 @@
 
 	short			hoff;
 	__u32			hmask;
-
+#ifdef CONFIG_CLS_U32_PERF
+	unsigned long		rcnt;
+	unsigned long		rhit;
+#endif
 	struct tc_u32_key	keys[0];
 };
 
@@ -102,7 +262,7 @@
 	__TCA_RSVP_MAX
 };
 
-#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1)
+#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 )
 
 struct tc_rsvp_gpi
 {
@@ -143,6 +303,12 @@
 	TCA_FW_UNSPEC,
 	TCA_FW_CLASSID,
 	TCA_FW_POLICE,
+#ifdef CONFIG_NET_CLS_IND
+	TCA_FW_INDEV,
+#endif
+#ifdef CONFIG_NET_CLS_ACT
+	TCA_FW_ACT,
+#endif
 	__TCA_FW_MAX
 };
 
@@ -162,6 +328,6 @@
 	__TCA_TCINDEX_MAX
 };
 
-#define TCA_TCINDEX_MAX        (__TCA_TCINDEX_MAX - 1)
+#define TCA_TCINDEX_MAX     (__TCA_TCINDEX_MAX - 1)
 
 #endif
--- diff/include/linux/pkt_sched.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/pkt_sched.h	2004-07-01 21:32:51.000000000 +0100
@@ -37,6 +37,13 @@
 	__u32	bps;			/* Current flow byte rate */
 	__u32	pps;			/* Current flow packet rate */
 	__u32	qlen;
+#ifdef CONFIG_NET_CLS_ACT
+/* eventually remove the define here; adding this(useful) 
+field at least fixes the 8 byte layout problems we 
+have with MIPS and PPC because we have a u64
+*/
+	__u32	reqs;			/* number of requeues happened */
+#endif
 	__u32	backlog;
 #ifdef __KERNEL__
 	spinlock_t *lock;
@@ -437,5 +444,6 @@
 {
 	__u32	latency;
 	__u32   limit;
-};	
+	__u32	loss;
+};
 #endif
--- diff/include/linux/pnp.h	2004-05-19 22:13:02.000000000 +0100
+++ source/include/linux/pnp.h	2004-07-01 21:32:51.000000000 +0100
@@ -292,6 +292,7 @@
 	unsigned int flags;
 	int  (*probe)  (struct pnp_dev *dev, const struct pnp_device_id *dev_id);
 	void (*remove) (struct pnp_dev *dev);
+	int  (*match)  (struct pnp_dev *dev);
 	struct device_driver driver;
 };
 
--- diff/include/linux/posix-timers.h	2004-05-19 22:13:02.000000000 +0100
+++ source/include/linux/posix-timers.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,8 +1,16 @@
 #ifndef _linux_POSIX_TIMERS_H
 #define _linux_POSIX_TIMERS_H
 
+#include <linux/spinlock.h>
+#include <linux/list.h>
+
+struct k_clock_abs {
+	struct list_head list;
+	spinlock_t lock;
+};
 struct k_clock {
 	int res;		/* in nano seconds */
+	struct k_clock_abs *abs_struct;
 	int (*clock_set) (struct timespec * tp);
 	int (*clock_get) (struct timespec * tp);
 	int (*nsleep) (int flags,
@@ -23,8 +31,14 @@
 #define posix_time_before(timer, now) \
                       time_before((timer)->expires, (now)->jiffies)
 
-#define posix_bump_timer(timr) do { \
-                        (timr)->it_timer.expires += (timr)->it_incr; \
-                        (timr)->it_overrun++;               \
-                       }while (0)
+#define posix_bump_timer(timr, now)					\
+         do {								\
+              long delta, orun;						\
+	      delta = now.jiffies - (timr)->it_timer.expires;		\
+              if (delta >= 0) {						\
+	           orun = 1 + (delta / (timr)->it_incr);		\
+	          (timr)->it_timer.expires += orun * (timr)->it_incr;	\
+                  (timr)->it_overrun += orun;				\
+              }								\
+            }while (0)
 #endif
--- diff/include/linux/ppp_defs.h	2004-05-19 22:13:02.000000000 +0100
+++ source/include/linux/ppp_defs.h	2004-07-01 21:32:51.000000000 +0100
@@ -42,6 +42,8 @@
 #ifndef _PPP_DEFS_H_
 #define _PPP_DEFS_H_
 
+#include <linux/crc16.h>
+
 /*
  * The basic PPP frame.
  */
@@ -95,7 +97,7 @@
 
 #define PPP_INITFCS	0xffff	/* Initial FCS value */
 #define PPP_GOODFCS	0xf0b8	/* Good final FCS value */
-#define PPP_FCS(fcs, c)	(((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
+#define PPP_FCS(fcs, c) crc16_byte(fcs, c)
 
 /*
  * Extended asyncmap - allows any character to be escaped.
--- diff/include/linux/prctl.h	2004-05-19 22:13:02.000000000 +0100
+++ source/include/linux/prctl.h	2004-07-01 21:32:51.000000000 +0100
@@ -29,6 +29,12 @@
 /* Get/set floating-point exception mode (if meaningful) */
 #define PR_GET_FPEXC	11
 #define PR_SET_FPEXC	12
+# define PR_FP_EXC_SW_ENABLE	0x80	/* Use FPEXC for FP exception enables */
+# define PR_FP_EXC_DIV		0x010000	/* floating point divide by zero */
+# define PR_FP_EXC_OVF		0x020000	/* floating point overflow */
+# define PR_FP_EXC_UND		0x040000	/* floating point underflow */
+# define PR_FP_EXC_RES		0x080000	/* floating point inexact result */
+# define PR_FP_EXC_INV		0x100000	/* floating point invalid operation */
 # define PR_FP_EXC_DISABLED	0	/* FP exceptions disabled */
 # define PR_FP_EXC_NONRECOV	1	/* async non-recoverable exc. mode */
 # define PR_FP_EXC_ASYNC	2	/* async recoverable exception mode */
--- diff/include/linux/rcupdate.h	2004-05-19 22:13:02.000000000 +0100
+++ source/include/linux/rcupdate.h	2004-07-01 21:32:51.000000000 +0100
@@ -36,41 +36,37 @@
 #ifdef __KERNEL__
 
 #include <linux/cache.h>
-#include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/threads.h>
 #include <linux/percpu.h>
 #include <linux/cpumask.h>
+#include <linux/seqlock.h>
 
 /**
  * struct rcu_head - callback structure for use with RCU
- * @list: list_head to queue the update requests
+ * @next: next update requests in a list
  * @func: actual update function to call after the grace period.
- * @arg: argument to be passed to the actual update function.
  */
 struct rcu_head {
-	struct list_head list;
-	void (*func)(void *obj);
-	void *arg;
+	struct rcu_head *next;
+	void (*func)(struct rcu_head *head);
 };
 
-#define RCU_HEAD_INIT(head) \
-		{ .list = LIST_HEAD_INIT(head.list), .func = NULL, .arg = NULL }
+#define RCU_HEAD_INIT(head) { .next = NULL, .func = NULL }
 #define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT(head)
 #define INIT_RCU_HEAD(ptr) do { \
-       INIT_LIST_HEAD(&(ptr)->list); (ptr)->func = NULL; (ptr)->arg = NULL; \
+       (ptr)->next = NULL; (ptr)->func = NULL; \
 } while (0)
 
 
 
-/* Control variables for rcupdate callback mechanism. */
+/* Global control variables for rcupdate callback mechanism. */
 struct rcu_ctrlblk {
-	spinlock_t	mutex;		/* Guard this struct                  */
-	long		curbatch;	/* Current batch number.	      */
-	long		maxbatch;	/* Max requested batch number.        */
-	cpumask_t	rcu_cpu_mask; 	/* CPUs that need to switch in order  */
-					/* for current batch to proceed.      */
-};
+	long	cur;		/* Current batch number.                      */
+	long	completed;	/* Number of the last completed batch         */
+	int	next_pending;	/* Is the next batch already waiting?         */
+	seqcount_t lock;	/* For atomic reads of cur and next_pending.  */
+} ____cacheline_maxaligned_in_smp;
 
 /* Is batch a before batch b ? */
 static inline int rcu_batch_before(long a, long b)
@@ -90,35 +86,51 @@
  * curlist - current batch for which quiescent cycle started if any
  */
 struct rcu_data {
+	/* 1) quiescent state handling : */
+        long		quiescbatch;     /* Batch # for grace period */
 	long		qsctr;		 /* User-mode/idle loop etc. */
         long            last_qsctr;	 /* value of qsctr at beginning */
                                          /* of rcu grace period */
+	int		qs_pending;	 /* core waits for quiesc state */
+
+	/* 2) batch handling */
         long  	       	batch;           /* Batch # for current RCU batch */
-        struct list_head  nxtlist;
-        struct list_head  curlist;
+        struct rcu_head *nxtlist;
+	struct rcu_head **nxttail;
+        struct rcu_head *curlist;
 };
 
 DECLARE_PER_CPU(struct rcu_data, rcu_data);
 extern struct rcu_ctrlblk rcu_ctrlblk;
 
+#define RCU_quiescbatch(cpu)	(per_cpu(rcu_data, (cpu)).quiescbatch)
 #define RCU_qsctr(cpu) 		(per_cpu(rcu_data, (cpu)).qsctr)
 #define RCU_last_qsctr(cpu) 	(per_cpu(rcu_data, (cpu)).last_qsctr)
+#define RCU_qs_pending(cpu)	(per_cpu(rcu_data, (cpu)).qs_pending)
 #define RCU_batch(cpu) 		(per_cpu(rcu_data, (cpu)).batch)
 #define RCU_nxtlist(cpu) 	(per_cpu(rcu_data, (cpu)).nxtlist)
 #define RCU_curlist(cpu) 	(per_cpu(rcu_data, (cpu)).curlist)
-
-#define RCU_QSCTR_INVALID	0
+#define RCU_nxttail(cpu) 	(per_cpu(rcu_data, (cpu)).nxttail)
 
 static inline int rcu_pending(int cpu) 
 {
-	if ((!list_empty(&RCU_curlist(cpu)) &&
-	     rcu_batch_before(RCU_batch(cpu), rcu_ctrlblk.curbatch)) ||
-	    (list_empty(&RCU_curlist(cpu)) &&
-			 !list_empty(&RCU_nxtlist(cpu))) ||
-	    cpu_isset(cpu, rcu_ctrlblk.rcu_cpu_mask))
+	/* This cpu has pending rcu entries and the grace period
+	 * for them has completed.
+	 */
+	if (RCU_curlist(cpu) &&
+		  !rcu_batch_before(rcu_ctrlblk.completed,RCU_batch(cpu)))
+		return 1;
+
+	/* This cpu has no pending entries, but there are new entries */
+	if (!RCU_curlist(cpu) && RCU_nxtlist(cpu))
+		return 1;
+
+	/* The rcu core waits for a quiescent state from the cpu */
+	if (RCU_quiescbatch(cpu) != rcu_ctrlblk.cur || RCU_qs_pending(cpu))
 		return 1;
-	else
-		return 0;
+
+	/* nothing to do */
+	return 0;
 }
 
 #define rcu_read_lock()		preempt_disable()
@@ -126,10 +138,11 @@
 
 extern void rcu_init(void);
 extern void rcu_check_callbacks(int cpu, int user);
+extern void rcu_restart_cpu(int cpu);
 
 /* Exported interfaces */
 extern void FASTCALL(call_rcu(struct rcu_head *head, 
-                          void (*func)(void *arg), void *arg));
+				void (*func)(struct rcu_head *head)));
 extern void synchronize_kernel(void);
 
 #endif /* __KERNEL__ */
--- diff/include/linux/reiserfs_fs.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/reiserfs_fs.h	2004-07-01 21:32:51.000000000 +0100
@@ -1238,8 +1238,12 @@
 gods only know how we are going to SMP the code that uses them.
 znodes are the way! */
 
+#define PATH_READA	0x1 /* do read ahead */
+#define PATH_READA_BACK 0x2 /* read backwards */
+
 struct  path {
   int                   path_length;                      	/* Length of the array above.   */
+  int			reada;
   struct  path_element  path_elements[EXTENDED_MAX_HEIGHT];	/* Array of the path elements.  */
   int			pos_in_item;
 };
@@ -1247,7 +1251,7 @@
 #define pos_in_item(path) ((path)->pos_in_item)
 
 #define INITIALIZE_PATH(var) \
-struct path var = {ILLEGAL_PATH_ELEMENT_OFFSET, }
+struct path var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,}
 
 /* Get path element by path and path position. */
 #define PATH_OFFSET_PELEMENT(p_s_path,n_offset)  ((p_s_path)->path_elements +(n_offset))
@@ -1748,6 +1752,14 @@
 int reiserfs_add_ordered_list(struct inode *inode, struct buffer_head *bh);
 int journal_mark_dirty(struct reiserfs_transaction_handle *, struct super_block *, struct buffer_head *bh) ;
 
+static inline int
+reiserfs_file_data_log(struct inode *inode) {
+    if (reiserfs_data_log(inode->i_sb) ||
+       (REISERFS_I(inode)->i_flags & i_data_log))
+        return 1 ;
+    return 0 ;
+}
+
 static inline int reiserfs_transaction_running(struct super_block *s) {
     struct reiserfs_transaction_handle *th = current->journal_info ;
     if (th && th->t_super == s)
@@ -1765,7 +1777,8 @@
 int reiserfs_commit_page(struct inode *inode, struct page *page,
 		unsigned from, unsigned to);
 int reiserfs_flush_old_commits(struct super_block *);
-void reiserfs_commit_for_inode(struct inode *) ;
+int reiserfs_commit_for_inode(struct inode *) ;
+int  reiserfs_inode_needs_commit(struct inode *) ;
 void reiserfs_update_inode_transaction(struct inode *) ;
 void reiserfs_wait_on_write_block(struct super_block *s) ;
 void reiserfs_block_writes(struct reiserfs_transaction_handle *th) ;
@@ -2149,6 +2162,15 @@
 typedef struct __reiserfs_blocknr_hint reiserfs_blocknr_hint_t;
 
 int reiserfs_parse_alloc_options (struct super_block *, char *);
+void reiserfs_init_alloc_options (struct super_block *s);
+
+/*
+ * given a directory, this will tell you what packing locality
+ * to use for a new object underneat it.  The locality is returned
+ * in disk byte order (le).
+ */
+u32 reiserfs_choose_packing(struct inode *dir);
+
 int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value);
 void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *, b_blocknr_t, int for_unformatted);
 int reiserfs_allocate_blocknrs(reiserfs_blocknr_hint_t *, b_blocknr_t * , int, int);
--- diff/include/linux/reiserfs_fs_i.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/reiserfs_fs_i.h	2004-07-01 21:32:51.000000000 +0100
@@ -25,6 +25,7 @@
     i_link_saved_truncate_mask =  0x0020,
     i_priv_object              =  0x0080,
     i_has_xattr_dir            =  0x0100,
+    i_data_log	               =  0x0200,
 } reiserfs_inode_flags;
 
 
--- diff/include/linux/reiserfs_fs_sb.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/reiserfs_fs_sb.h	2004-07-01 21:32:51.000000000 +0100
@@ -444,6 +444,8 @@
     REISERFS_XATTRS,
     REISERFS_XATTRS_USER,
     REISERFS_POSIXACL,
+    REISERFS_BARRIER_NONE,
+    REISERFS_BARRIER_FLUSH,
 
     REISERFS_TEST1,
     REISERFS_TEST2,
@@ -473,6 +475,8 @@
 #define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER))
 #define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL))
 #define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s))
+#define reiserfs_barrier_none(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_BARRIER_NONE))
+#define reiserfs_barrier_flush(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_BARRIER_FLUSH))
 
 void reiserfs_file_buffer (struct buffer_head * bh, int list);
 extern struct file_system_type reiserfs_fs_type;
--- diff/include/linux/route.h	2004-05-19 22:13:02.000000000 +0100
+++ source/include/linux/route.h	2004-07-01 21:32:51.000000000 +0100
@@ -24,7 +24,7 @@
 #define _LINUX_ROUTE_H
 
 #include <linux/if.h>
-
+#include <linux/compiler.h>
 
 /* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
 struct rtentry 
@@ -38,7 +38,7 @@
 	unsigned long	rt_pad3;
 	void		*rt_pad4;
 	short		rt_metric;	/* +1 for binary compatibility!	*/
-	char		*rt_dev;	/* forcing the device at add	*/
+	char __user	*rt_dev;	/* forcing the device at add	*/
 	unsigned long	rt_mtu;		/* per route MTU/Window 	*/
 #ifndef __KERNEL__
 #define rt_mss	rt_mtu			/* Compatibility :-(            */
--- diff/include/linux/rtnetlink.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/rtnetlink.h	2004-07-01 21:32:51.000000000 +0100
@@ -44,6 +44,10 @@
 #define	RTM_DELTFILTER	(RTM_BASE+29)
 #define	RTM_GETTFILTER	(RTM_BASE+30)
 
+#define RTM_NEWACTION   (RTM_BASE+32)
+#define RTM_DELACTION   (RTM_BASE+33)
+#define RTM_GETACTION   (RTM_BASE+34)
+
 #define RTM_NEWPREFIX	(RTM_BASE+36)
 #define RTM_GETPREFIX	(RTM_BASE+38)
 
@@ -639,6 +643,7 @@
 	TCA_STATS,
 	TCA_XSTATS,
 	TCA_RATE,
+	TCA_FCNT,
 	__TCA_MAX
 };
 
@@ -673,6 +678,18 @@
 
 #define RTMGRP_IPV6_PREFIX	0x20000
 
+/* TC action piece */
+struct tcamsg
+{
+	unsigned char	tca_family;
+	unsigned char	tca__pad1;
+	unsigned short	tca__pad2;
+};
+#define TA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
+#define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))
+#define TCA_ACT_TAB 1 /* attr type must be >=1 */	
+#define TCAA_MAX 1
+
 /* End of information exported to user level */
 
 #ifdef __KERNEL__
--- diff/include/linux/sched.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/sched.h	2004-07-01 21:32:51.000000000 +0100
@@ -168,8 +168,6 @@
 extern void cpu_init (void);
 extern void trap_init(void);
 extern void update_process_times(int user);
-extern void update_one_process(struct task_struct *p, unsigned long user,
-			       unsigned long system, int cpu);
 extern void scheduler_tick(int user_tick, int system);
 extern unsigned long cache_decay_ticks;
 
@@ -191,10 +189,26 @@
 
 #include <linux/aio.h>
 
+extern unsigned long
+arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
+		       unsigned long, unsigned long);
+extern unsigned long
+arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
+			  unsigned long len, unsigned long pgoff,
+			  unsigned long flags);
+extern void arch_unmap_area(struct vm_area_struct *area);
+extern void arch_unmap_area_topdown(struct vm_area_struct *area);
+
+
 struct mm_struct {
 	struct vm_area_struct * mmap;		/* list of VMAs */
 	struct rb_root mm_rb;
 	struct vm_area_struct * mmap_cache;	/* last find_vma result */
+	unsigned long (*get_unmapped_area) (struct file *filp,
+				unsigned long addr, unsigned long len,
+				unsigned long pgoff, unsigned long flags);
+	void (*unmap_area) (struct vm_area_struct *area);
+	unsigned long mmap_base;		/* base of mmap area */
 	unsigned long free_area_cache;		/* first hole */
 	pgd_t * pgd;
 	atomic_t mm_users;			/* How many users with user space? */
@@ -217,9 +231,6 @@
 	unsigned long saved_auxv[40]; /* for /proc/PID/auxv */
 
 	unsigned dumpable:1;
-#ifdef CONFIG_HUGETLB_PAGE
-	int used_hugetlb;
-#endif
 	cpumask_t cpu_vm_mask;
 
 	/* Architecture-specific MM context */
@@ -314,6 +325,9 @@
 	atomic_t __count;	/* reference count */
 	atomic_t processes;	/* How many processes does this user have? */
 	atomic_t files;		/* How many open files does this user have? */
+	atomic_t sigpending;	/* How many pending signals does this user have? */
+	/* protected by mq_lock	*/
+	unsigned long mq_bytes;	/* How many bytes can be allocated to mqueue? */
 
 	/* Hash table maintenance information */
 	struct list_head uidhash_list;
@@ -345,6 +359,8 @@
 	struct task_struct *it_process;	/* process to send signal to */
 	struct timer_list it_timer;
 	struct sigqueue *sigq;		/* signal queue entry. */
+	struct list_head abs_timer_entry; /* clock abs_timer_list */
+	struct timespec wall_to_prev;   /* wall_to_monotonic used when set */
 };
 
 
@@ -361,6 +377,12 @@
 	gid_t *blocks[0];
 };
 
+/*
+ * get_group_info() must be called with the owning task locked (via task_lock())
+ * when task != current.  The reason being that the vast majority of callers are
+ * looking at current->group_info, which can not be changed except by the
+ * current task.  Changing current->group_info requires the task lock, too.
+ */
 #define get_group_info(group_info) do { \
 	atomic_inc(&(group_info)->usage); \
 } while (0)
@@ -608,7 +630,6 @@
 	.per_cpu_gain		= 15,			\
 	.flags			= SD_BALANCE_NEWIDLE	\
 				| SD_BALANCE_EXEC	\
-				| SD_BALANCE_CLONE	\
 				| SD_WAKE_AFFINE	\
 				| SD_WAKE_IDLE		\
 				| SD_SHARE_CPUPOWER,	\
@@ -631,7 +652,6 @@
 	.per_cpu_gain		= 100,			\
 	.flags			= SD_BALANCE_NEWIDLE	\
 				| SD_BALANCE_EXEC	\
-				| SD_BALANCE_CLONE	\
 				| SD_WAKE_AFFINE	\
 				| SD_WAKE_BALANCE,	\
 	.last_balance		= jiffies,		\
@@ -653,7 +673,6 @@
 	.cache_nice_tries	= 1,			\
 	.per_cpu_gain		= 100,			\
 	.flags			= SD_BALANCE_EXEC	\
-				| SD_BALANCE_CLONE	\
 				| SD_WAKE_BALANCE,	\
 	.last_balance		= jiffies,		\
 	.balance_interval	= 1,			\
@@ -673,17 +692,18 @@
 
 extern unsigned long long sched_clock(void);
 
+/* sched_exec is called by processes performing an exec */
 #ifdef CONFIG_SMP
-extern void sched_balance_exec(void);
+extern void sched_exec(void);
 #else
-#define sched_balance_exec()   {}
+#define sched_exec()   {}
 #endif
 
 extern void sched_idle_next(void);
 extern void set_user_nice(task_t *p, long nice);
-extern int task_prio(task_t *p);
-extern int task_nice(task_t *p);
-extern int task_curr(task_t *p);
+extern int task_prio(const task_t *p);
+extern int task_nice(const task_t *p);
+extern int task_curr(const task_t *p);
 extern int idle_cpu(int cpu);
 
 void yield(void);
@@ -719,6 +739,11 @@
 
 /* per-UID process charging. */
 extern struct user_struct * alloc_uid(uid_t);
+static inline struct user_struct *get_uid(struct user_struct *u)
+{
+	atomic_inc(&u->__count);
+	return u;
+}
 extern void free_uid(struct user_struct *);
 extern void switch_uid(struct user_struct *);
 
@@ -730,18 +755,14 @@
 
 extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state));
 extern int FASTCALL(wake_up_process(struct task_struct * tsk));
-extern void FASTCALL(wake_up_forked_process(struct task_struct * tsk));
+extern void FASTCALL(wake_up_new_process(struct task_struct * tsk,
+						unsigned long clone_flags));
 #ifdef CONFIG_SMP
  extern void kick_process(struct task_struct *tsk);
- extern void FASTCALL(wake_up_forked_thread(struct task_struct * tsk));
 #else
  static inline void kick_process(struct task_struct *tsk) { }
- static inline void wake_up_forked_thread(struct task_struct * tsk)
- {
-	wake_up_forked_process(tsk);
- }
 #endif
-extern void FASTCALL(sched_fork(task_t * p));
+extern void FASTCALL(sched_fork(task_t * p, unsigned long clone_flags));
 extern void FASTCALL(sched_exit(task_t * p));
 
 extern int in_group_p(gid_t);
@@ -905,7 +926,7 @@
 #define while_each_thread(g, t) \
 	while ((t = next_thread(t)) != g)
 
-extern task_t * FASTCALL(next_thread(task_t *p));
+extern task_t * FASTCALL(next_thread(const task_t *p));
 
 #define thread_group_leader(p)	(p->pid == p->tgid)
 
@@ -922,7 +943,9 @@
 extern void unhash_process(struct task_struct *p);
 
 /*
- * Protects ->fs, ->files, ->mm, ->ptrace and synchronises with wait4().
+ * Protects ->fs, ->files, ->mm, ->ptrace, ->group_info and synchronises with
+ * wait4().
+ *
  * Nests both inside and outside of read_lock(&tasklist_lock).
  * It must not be nested with write_lock_irq(&tasklist_lock),
  * neither inside nor outside.
@@ -1044,7 +1067,7 @@
  */
 #ifdef CONFIG_SMP
 
-static inline unsigned int task_cpu(struct task_struct *p)
+static inline unsigned int task_cpu(const struct task_struct *p)
 {
 	return p->thread_info->cpu;
 }
@@ -1056,7 +1079,7 @@
 
 #else
 
-static inline unsigned int task_cpu(struct task_struct *p)
+static inline unsigned int task_cpu(const struct task_struct *p)
 {
 	return 0;
 }
@@ -1067,6 +1090,17 @@
 
 #endif /* CONFIG_SMP */
 
+#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
+extern void arch_pick_mmap_layout(struct mm_struct *mm);
+#else
+static inline void arch_pick_mmap_layout(struct mm_struct *mm)
+{
+	mm->mmap_base = TASK_UNMAPPED_BASE;
+	mm->get_unmapped_area = arch_get_unmapped_area;
+	mm->unmap_area = arch_unmap_area;
+}
+#endif
+
 #endif /* __KERNEL__ */
 
 #endif
--- diff/include/linux/security.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/security.h	2004-07-01 21:32:51.000000000 +0100
@@ -53,7 +53,7 @@
 extern int cap_syslog (int type);
 extern int cap_vm_enough_memory (long pages);
 
-static inline int cap_netlink_send (struct sk_buff *skb)
+static inline int cap_netlink_send (struct sock *sk, struct sk_buff *skb)
 {
 	NETLINK_CB (skb).eff_cap = current->cap_effective;
 	return 0;
@@ -639,9 +639,12 @@
  *	Save security information for a netlink message so that permission
  *	checking can be performed when the message is processed.  The security
  *	information can be saved using the eff_cap field of the
- *      netlink_skb_parms structure.
+ *      netlink_skb_parms structure.  Also may be used to provide fine
+ *	grained control over message transmission.
+ *	@sk associated sock of task sending the message.,
  *	@skb contains the sk_buff structure for the netlink message.
- *	Return 0 if the information was successfully saved.
+ *	Return 0 if the information was successfully saved and message
+ *	is allowed to be transmitted.
  * @netlink_recv:
  *	Check permission before processing the received netlink message in
  *	@skb.
@@ -1181,7 +1184,7 @@
 	int (*sem_semop) (struct sem_array * sma, 
 			  struct sembuf * sops, unsigned nsops, int alter);
 
-	int (*netlink_send) (struct sk_buff * skb);
+	int (*netlink_send) (struct sock * sk, struct sk_buff * skb);
 	int (*netlink_recv) (struct sk_buff * skb);
 
 	/* allow module stacking */
@@ -1873,9 +1876,9 @@
 	return security_ops->setprocattr(p, name, value, size);
 }
 
-static inline int security_netlink_send(struct sk_buff * skb)
+static inline int security_netlink_send(struct sock *sk, struct sk_buff * skb)
 {
-	return security_ops->netlink_send(skb);
+	return security_ops->netlink_send(sk, skb);
 }
 
 static inline int security_netlink_recv(struct sk_buff * skb)
@@ -2501,9 +2504,9 @@
  * (rather than hooking into the capability module) to reduce overhead
  * in the networking code.
  */
-static inline int security_netlink_send (struct sk_buff *skb)
+static inline int security_netlink_send (struct sock *sk, struct sk_buff *skb)
 {
-	return cap_netlink_send (skb);
+	return cap_netlink_send (sk, skb);
 }
 
 static inline int security_netlink_recv (struct sk_buff *skb)
--- diff/include/linux/serial_core.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/serial_core.h	2004-07-01 21:32:51.000000000 +0100
@@ -59,14 +59,6 @@
 /* NEC v850.  */
 #define PORT_V850E_UART	40
 
-/* NEC PC-9800 */
-#define PORT_8251_PC98	41
-#define PORT_19K_PC98	42
-#define PORT_FIFO_PC98	43
-#define PORT_VFAST_PC98	44
-#define PORT_PC9861	45
-#define PORT_PC9801_101	46
-
 /* DZ */
 #define PORT_DZ		47
 
@@ -88,6 +80,12 @@
 /* SGI IP22 aka Indy / Challenge S / Indigo 2 */
 #define PORT_IP22ZILOG	56
 
+/* Sharp LH7a40x -- an ARM9 SoC series */
+#define PORT_LH7A40X	57
+
+/* PPC CPM type number */
+#define PORT_CPM        58
+
 #ifdef __KERNEL__
 
 #include <linux/config.h>
@@ -171,7 +169,9 @@
 	unsigned char		x_char;			/* xon/xoff char */
 	unsigned char		regshift;		/* reg offset shift */
 	unsigned char		iotype;			/* io access style */
-
+#ifdef CONFIG_KGDB
+	int			kgdb;			/* in use by kgdb */
+#endif
 #define UPIO_PORT		(0)
 #define UPIO_HUB6		(1)
 #define UPIO_MEM		(2)
--- diff/include/linux/serio.h	2004-05-19 22:13:02.000000000 +0100
+++ source/include/linux/serio.h	2004-07-01 21:32:51.000000000 +0100
@@ -17,12 +17,15 @@
 #ifdef __KERNEL__
 
 #include <linux/list.h>
+#include <linux/spinlock.h>
+#include <linux/device.h>
 
 struct serio {
 	void *private;
-	void *driver;
-	char *name;
-	char *phys;
+	void *port_data;
+
+	char name[32];
+	char phys[32];
 
 	unsigned short idbus;
 	unsigned short idvendor;
@@ -32,31 +35,43 @@
 	unsigned long type;
 	unsigned long event;
 
+	spinlock_t lock;
+
 	int (*write)(struct serio *, unsigned char);
 	int (*open)(struct serio *);
 	void (*close)(struct serio *);
 
-	struct serio_dev *dev;
+	struct serio *parent, *child;
+
+	struct serio_driver *drv; /* Accessed from interrupt, writes must be protected by serio_lock */
+
+	struct device dev;
 
 	struct list_head node;
 };
+#define to_serio_port(d)	container_of(d, struct serio, dev)
 
-struct serio_dev {
+struct serio_driver {
 	void *private;
-	char *name;
+	char *description;
+
+	int manual_bind;
 
 	void (*write_wakeup)(struct serio *);
 	irqreturn_t (*interrupt)(struct serio *, unsigned char,
 			unsigned int, struct pt_regs *);
-	void (*connect)(struct serio *, struct serio_dev *dev);
+	void (*connect)(struct serio *, struct serio_driver *drv);
 	int  (*reconnect)(struct serio *);
 	void (*disconnect)(struct serio *);
 	void (*cleanup)(struct serio *);
 
+	struct device_driver driver;
+
 	struct list_head node;
 };
+#define to_serio_driver(d)	container_of(d, struct serio_driver, driver)
 
-int serio_open(struct serio *serio, struct serio_dev *dev);
+int serio_open(struct serio *serio, struct serio_driver *drv);
 void serio_close(struct serio *serio);
 void serio_rescan(struct serio *serio);
 void serio_reconnect(struct serio *serio);
@@ -64,12 +79,10 @@
 
 void serio_register_port(struct serio *serio);
 void serio_register_port_delayed(struct serio *serio);
-void __serio_register_port(struct serio *serio);
 void serio_unregister_port(struct serio *serio);
 void serio_unregister_port_delayed(struct serio *serio);
-void __serio_unregister_port(struct serio *serio);
-void serio_register_device(struct serio_dev *dev);
-void serio_unregister_device(struct serio_dev *dev);
+void serio_register_driver(struct serio_driver *drv);
+void serio_unregister_driver(struct serio_driver *drv);
 
 static __inline__ int serio_write(struct serio *serio, unsigned char data)
 {
@@ -79,16 +92,16 @@
 		return -1;
 }
 
-static __inline__ void serio_dev_write_wakeup(struct serio *serio)
+static __inline__ void serio_drv_write_wakeup(struct serio *serio)
 {
-	if (serio->dev && serio->dev->write_wakeup)
-		serio->dev->write_wakeup(serio);
+	if (serio->drv && serio->drv->write_wakeup)
+		serio->drv->write_wakeup(serio);
 }
 
 static __inline__ void serio_cleanup(struct serio *serio)
 {
-	if (serio->dev && serio->dev->cleanup)
-		serio->dev->cleanup(serio);
+	if (serio->drv && serio->drv->cleanup)
+		serio->drv->cleanup(serio);
 }
 
 #endif
@@ -105,7 +118,6 @@
 #define SERIO_8042	0x01000000UL
 #define SERIO_RS232	0x02000000UL
 #define SERIO_HIL_MLC	0x03000000UL
-#define SERIO_PC9800	0x04000000UL
 #define SERIO_PS_PSTHRU	0x05000000UL
 #define SERIO_8042_XL	0x06000000UL
 
--- diff/include/linux/signal.h	2004-05-19 22:13:02.000000000 +0100
+++ source/include/linux/signal.h	2004-07-01 21:32:51.000000000 +0100
@@ -7,6 +7,9 @@
 #include <asm/siginfo.h>
 
 #ifdef __KERNEL__
+
+#define MAX_SIGPENDING	1024
+
 /*
  * Real Time signals may be queued.
  */
@@ -16,6 +19,7 @@
 	spinlock_t *lock;
 	int flags;
 	siginfo_t info;
+	struct user_struct *user;
 };
 
 /* flags values. */
--- diff/include/linux/skbuff.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/skbuff.h	2004-07-01 21:32:51.000000000 +0100
@@ -27,6 +27,7 @@
 #include <linux/highmem.h>
 #include <linux/poll.h>
 #include <linux/net.h>
+#include <net/checksum.h>
 
 #define HAVE_ALLOC_SKB		/* For the drivers to know */
 #define HAVE_ALIGNABLE_SKB	/* Ditto 8)		   */
@@ -155,6 +156,7 @@
  *	@sk: Socket we are owned by
  *	@stamp: Time we arrived
  *	@dev: Device we arrived on/are leaving by
+ *	@input_dev: Device we arrived on
  *      @real_dev: The real device we are using
  *	@h: Transport layer header
  *	@nh: Network layer header
@@ -197,6 +199,7 @@
 	struct sock		*sk;
 	struct timeval		stamp;
 	struct net_device	*dev;
+	struct net_device	*input_dev;
 	struct net_device	*real_dev;
 
 	union {
@@ -262,9 +265,15 @@
 	} private;
 #endif
 #ifdef CONFIG_NET_SCHED
-       __u32			tc_index;               /* traffic control index */
+       __u32			tc_index;        /* traffic control index */
+#ifdef CONFIG_NET_CLS_ACT
+	__u32           tc_verd;               /* traffic control verdict */
+	__u32           tc_classid;            /* traffic control classid */
+ #endif
+
 #endif
 
+
 	/* These elements must be at the end, see alloc_skb() for details.  */
 	unsigned int		truesize;
 	atomic_t		users;
@@ -663,13 +672,15 @@
 	return len + skb_headlen(skb);
 }
 
-static inline void skb_fill_page_desc(struct sk_buff *skb, int i, struct page *page, int off, int size)
+static inline void skb_fill_page_desc(struct sk_buff *skb, int i,
+				      struct page *page, int off, int size)
 {
 	skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
-	frag->page = page;
-	frag->page_offset = off;
-	frag->size = size;
-	skb_shinfo(skb)->nr_frags = i+1;
+
+	frag->page		  = page;
+	frag->page_offset	  = off;
+	frag->size		  = size;
+	skb_shinfo(skb)->nr_frags = i + 1;
 }
 
 #define SKB_PAGE_ASSERT(skb) 	BUG_ON(skb_shinfo(skb)->nr_frags)
@@ -816,6 +827,30 @@
 	skb->tail += len;
 }
 
+/*
+ * CPUs often take a performance hit when accessing unaligned memory
+ * locations. The actual performance hit varies, it can be small if the
+ * hardware handles it or large if we have to take an exception and fix it
+ * in software.
+ *
+ * Since an ethernet header is 14 bytes network drivers often end up with
+ * the IP header at an unaligned offset. The IP header can be aligned by
+ * shifting the start of the packet by 2 bytes. Drivers should do this
+ * with:
+ *
+ * skb_reserve(NET_IP_ALIGN);
+ *
+ * The downside to this alignment of the IP header is that the DMA is now
+ * unaligned. On some architectures the cost of an unaligned DMA is high
+ * and this cost outweighs the gains made by aligning the IP header.
+ * 
+ * Since this trade off varies between architectures, we allow NET_IP_ALIGN
+ * to be overridden.
+ */
+#ifndef NET_IP_ALIGN
+#define NET_IP_ALIGN	2
+#endif
+
 extern int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc);
 
 static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
@@ -971,6 +1006,39 @@
 	return skb_pad(skb, len-size);
 }
 
+static inline int skb_add_data(struct sk_buff *skb,
+			       char __user *from, int copy)
+{
+	const int off = skb->len;
+
+	if (skb->ip_summed == CHECKSUM_NONE) {
+		int err = 0;
+		unsigned int csum = csum_and_copy_from_user(from,
+							    skb_put(skb, copy),
+							    copy, 0, &err);
+		if (!err) {
+			skb->csum = csum_block_add(skb->csum, csum, off);
+			return 0;
+		}
+	} else if (!copy_from_user(skb_put(skb, copy), from, copy))
+		return 0;
+
+	__skb_trim(skb, off);
+	return -EFAULT;
+}
+
+static inline int skb_can_coalesce(struct sk_buff *skb, int i,
+				   struct page *page, int off)
+{
+	if (i) {
+		struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i - 1];
+
+		return page == frag->page &&
+		       off == frag->page_offset + frag->size;
+	}
+	return 0;
+}
+
 /**
  *	skb_linearize - convert paged skb to linear one
  *	@skb: buffer to linarize
@@ -1034,6 +1102,8 @@
 					      int offset, u8 *to, int len,
 					      unsigned int csum);
 extern void	       skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
+extern void	       skb_split(struct sk_buff *skb,
+				 struct sk_buff *skb1, const u32 len);
 
 extern void skb_init(void);
 extern void skb_add_mtu(int mtu);
@@ -1049,6 +1119,14 @@
 	if (nfct)
 		atomic_inc(&nfct->master->use);
 }
+static inline void nf_reset(struct sk_buff *skb)
+{
+	nf_conntrack_put(skb->nfct);
+	skb->nfct = NULL;
+#ifdef CONFIG_NETFILTER_DEBUG
+	skb->nf_debug = 0;
+#endif
+}
 
 #ifdef CONFIG_BRIDGE_NETFILTER
 static inline void nf_bridge_put(struct nf_bridge_info *nf_bridge)
@@ -1061,9 +1139,10 @@
 	if (nf_bridge)
 		atomic_inc(&nf_bridge->use);
 }
-#endif
-
-#endif
+#endif /* CONFIG_BRIDGE_NETFILTER */
+#else /* CONFIG_NETFILTER */
+static inline void nf_reset(struct sk_buff *skb) {}
+#endif /* CONFIG_NETFILTER */
 
 #endif	/* __KERNEL__ */
 #endif	/* _LINUX_SKBUFF_H */
--- diff/include/linux/smb_fs_sb.h	2004-05-19 22:13:02.000000000 +0100
+++ source/include/linux/smb_fs_sb.h	2004-07-01 21:32:51.000000000 +0100
@@ -57,12 +57,10 @@
 	unsigned int generation;
 	pid_t conn_pid;
 	struct smb_conn_opt opt;
-
+	wait_queue_head_t conn_wq;
+	int conn_complete;
 	struct semaphore sem;
 
-        unsigned short     rcls; /* The error codes we received */
-        unsigned short     err;
-
 	unsigned char      header[SMB_HEADER_LEN + 20*2 + 2];
 	u32                header_len;
 	u32                smb_len;
--- diff/include/linux/spinlock.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/spinlock.h	2004-07-01 21:32:51.000000000 +0100
@@ -15,6 +15,12 @@
 
 #include <asm/processor.h>	/* for cpu relax */
 #include <asm/system.h>
+#ifdef CONFIG_KGDB
+#include <asm/current.h>
+#define SET_WHO(x, him) (x)->who = him;
+#else
+#define SET_WHO(x, him)
+#endif
 
 /*
  * Must define these before including other files, inline functions need them
@@ -57,6 +63,9 @@
 	const char *module;
 	char *owner;
 	int oline;
+#ifdef CONFIG_KGDB
+	struct task_struct *who;
+#endif
 } spinlock_t;
 #define SPIN_LOCK_UNLOCKED (spinlock_t) { SPINLOCK_MAGIC, 0, 10, __FILE__ , NULL, 0}
 
@@ -68,6 +77,7 @@
 		(x)->module = __FILE__; \
 		(x)->owner = NULL; \
 		(x)->oline = 0; \
+                SET_WHO(x, NULL) \
 	} while (0)
 
 #define CHECK_LOCK(x) \
@@ -90,6 +100,7 @@
 		(x)->lock = 1; \
 		(x)->owner = __FILE__; \
 		(x)->oline = __LINE__; \
+                SET_WHO(x, current)       \
 	} while (0)
 
 /* without debugging, spin_is_locked on UP always says
@@ -120,6 +131,7 @@
 		(x)->lock = 1; \
 		(x)->owner = __FILE__; \
 		(x)->oline = __LINE__; \
+                SET_WHO(x, current)       \
 		1; \
 	})
 
@@ -186,6 +198,17 @@
 
 #endif /* !SMP */
 
+#ifdef CONFIG_LOCKMETER
+extern void _metered_spin_lock   (spinlock_t *lock);
+extern void _metered_spin_unlock (spinlock_t *lock);
+extern int  _metered_spin_trylock(spinlock_t *lock);
+extern void _metered_read_lock    (rwlock_t *lock);
+extern void _metered_read_unlock  (rwlock_t *lock);
+extern void _metered_write_lock   (rwlock_t *lock);
+extern void _metered_write_unlock (rwlock_t *lock);
+extern int  _metered_write_trylock(rwlock_t *lock);
+#endif
+
 /*
  * Define the various spin_lock and rw_lock methods.  Note we define these
  * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various
@@ -391,6 +414,141 @@
 				_raw_spin_trylock(lock) ? 1 : \
 				({preempt_enable(); local_bh_enable(); 0;});})
 
+#ifdef CONFIG_LOCKMETER
+#undef spin_lock
+#undef spin_trylock
+#undef spin_unlock
+#undef spin_lock_irqsave
+#undef spin_lock_irq
+#undef spin_lock_bh
+#undef read_lock
+#undef read_unlock
+#undef write_lock
+#undef write_unlock
+#undef write_trylock
+#undef spin_unlock_bh
+#undef read_lock_irqsave
+#undef read_lock_irq
+#undef read_lock_bh
+#undef read_unlock_bh
+#undef write_lock_irqsave
+#undef write_lock_irq
+#undef write_lock_bh
+#undef write_unlock_bh
+
+#define spin_lock(lock) \
+do { \
+	preempt_disable(); \
+	_metered_spin_lock(lock); \
+} while(0)
+
+#define spin_trylock(lock)     ({preempt_disable(); _metered_spin_trylock(lock) ? \
+				1 : ({preempt_enable(); 0;});})
+#define spin_unlock(lock) \
+do { \
+	_metered_spin_unlock(lock); \
+	preempt_enable(); \
+} while (0)
+
+#define spin_lock_irqsave(lock, flags) \
+do { \
+	local_irq_save(flags); \
+	preempt_disable(); \
+	_metered_spin_lock(lock); \
+} while (0)
+
+#define spin_lock_irq(lock) \
+do { \
+	local_irq_disable(); \
+	preempt_disable(); \
+	_metered_spin_lock(lock); \
+} while (0)
+
+#define spin_lock_bh(lock) \
+do { \
+	local_bh_disable(); \
+	preempt_disable(); \
+	_metered_spin_lock(lock); \
+} while (0)
+
+#define spin_unlock_bh(lock) \
+do { \
+	_metered_spin_unlock(lock); \
+	preempt_enable(); \
+	local_bh_enable(); \
+} while (0)
+
+
+#define read_lock(lock)                ({preempt_disable(); _metered_read_lock(lock);})
+#define read_unlock(lock)      ({_metered_read_unlock(lock); preempt_enable();})
+#define write_lock(lock)       ({preempt_disable(); _metered_write_lock(lock);})
+#define write_unlock(lock)     ({_metered_write_unlock(lock); preempt_enable();})
+#define write_trylock(lock)    ({preempt_disable();_metered_write_trylock(lock) ? \
+				1 : ({preempt_enable(); 0;});})
+#define spin_unlock_no_resched(lock) \
+do { \
+	_metered_spin_unlock(lock); \
+	preempt_enable_no_resched(); \
+} while (0)
+
+#define read_lock_irqsave(lock, flags) \
+do { \
+	local_irq_save(flags); \
+	preempt_disable(); \
+	_metered_read_lock(lock); \
+} while (0)
+
+#define read_lock_irq(lock) \
+do { \
+	local_irq_disable(); \
+	preempt_disable(); \
+	_metered_read_lock(lock); \
+} while (0)
+
+#define read_lock_bh(lock) \
+do { \
+	local_bh_disable(); \
+	preempt_disable(); \
+	_metered_read_lock(lock); \
+} while (0)
+
+#define read_unlock_bh(lock) \
+do { \
+	_metered_read_unlock(lock); \
+	preempt_enable(); \
+	local_bh_enable(); \
+} while (0)
+
+#define write_lock_irqsave(lock, flags) \
+do { \
+	local_irq_save(flags); \
+	preempt_disable(); \
+	_metered_write_lock(lock); \
+} while (0)
+
+#define write_lock_irq(lock) \
+do { \
+	local_irq_disable(); \
+	preempt_disable(); \
+	_metered_write_lock(lock); \
+} while (0)
+
+#define write_lock_bh(lock) \
+do { \
+	local_bh_disable(); \
+	preempt_disable(); \
+	_metered_write_lock(lock); \
+} while (0)
+
+#define write_unlock_bh(lock) \
+do { \
+	_metered_write_unlock(lock); \
+	preempt_enable(); \
+	local_bh_enable(); \
+} while (0)
+
+#endif /* !CONFIG_LOCKMETER */
+
 /* "lock on reference count zero" */
 #ifndef ATOMIC_DEC_AND_LOCK
 #include <asm/atomic.h>
--- diff/include/linux/suspend.h	2004-05-19 22:13:03.000000000 +0100
+++ source/include/linux/suspend.h	2004-07-01 21:32:51.000000000 +0100
@@ -67,24 +67,27 @@
 extern void pm_restore_console(void);
 
 #else
-static inline void refrigerator(unsigned long flag)
-{
-
-}
-static inline int freeze_processes(void)
-{
-	return 0;
-}
-static inline void thaw_processes(void)
-{
-
-}
+static inline void refrigerator(unsigned long flag) {}
 #endif	/* CONFIG_PM */
 
+#ifdef CONFIG_SMP
+extern void disable_nonboot_cpus(void);
+extern void enable_nonboot_cpus(void);
+#else
+static inline void disable_nonboot_cpus(void) {}
+static inline void enable_nonboot_cpus(void) {}
+#endif
+
 asmlinkage void do_magic(int is_resume);
 asmlinkage void do_magic_resume_1(void);
 asmlinkage void do_magic_resume_2(void);
 asmlinkage void do_magic_suspend_1(void);
 asmlinkage void do_magic_suspend_2(void);
 
+void save_processor_state(void);
+void restore_processor_state(void);
+struct saved_context;
+void __save_processor_state(struct saved_context *ctxt);
+void __restore_processor_state(struct saved_context *ctxt);
+
 #endif /* _LINUX_SWSUSP_H */
--- diff/include/linux/swap.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/swap.h	2004-07-01 21:32:51.000000000 +0100
@@ -156,7 +156,7 @@
 /* linux/mm/page_alloc.c */
 extern unsigned long totalram_pages;
 extern unsigned long totalhigh_pages;
-extern int nr_swap_pages;	/* XXX: shouldn't this be ulong? --hch */
+extern long nr_swap_pages;
 extern unsigned int nr_free_pages(void);
 extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat);
 extern unsigned int nr_free_buffer_pages(void);
@@ -206,7 +206,7 @@
 					   unsigned long addr);
 
 /* linux/mm/swapfile.c */
-extern int total_swap_pages;
+extern long total_swap_pages;
 extern unsigned int nr_swapfiles;
 extern struct swap_info_struct swap_info[];
 extern void si_swapinfo(struct sysinfo *);
--- diff/include/linux/syscalls.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/syscalls.h	2004-07-01 21:32:51.000000000 +0100
@@ -382,7 +382,7 @@
 asmlinkage long sys_rmdir(const char __user *pathname);
 asmlinkage long sys_lookup_dcookie(u64 cookie64, char __user *buf, size_t len);
 asmlinkage long sys_quotactl(unsigned int cmd, const char __user *special,
-				qid_t id, caddr_t addr);
+				qid_t id, void __user *addr);
 asmlinkage long sys_getdents(unsigned int fd,
 				struct linux_dirent __user *dirent,
 				unsigned int count);
--- diff/include/linux/sysctl.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/sysctl.h	2004-07-01 21:32:51.000000000 +0100
@@ -164,6 +164,7 @@
 	VM_LAPTOP_MODE=23,	/* vm laptop mode */
 	VM_BLOCK_DUMP=24,	/* block dump mode */
 	VM_HUGETLB_GROUP=25,	/* permitted hugetlb group */
+	VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */
 };
 
 
--- diff/include/linux/sysfs.h	2004-06-30 14:26:00.000000000 +0100
+++ source/include/linux/sysfs.h	2004-07-01 21:32:51.000000000 +0100
@@ -9,6 +9,8 @@
 #ifndef _SYSFS_H_
 #define _SYSFS_H_
 
+#include <asm/atomic.h>
+
 struct kobject;
 struct module;
 
@@ -24,6 +26,27 @@
 };
 
 
+
+/**
+ * Use these macros to make defining attributes easier. See include/linux/device.h
+ * for examples..
+ */
+
+#define __ATTR(_name,_mode,_show,_store) { \
+	.attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE },	\
+	.show	= _show,					\
+	.store	= _store,					\
+}
+
+#define __ATTR_RO(_name) { \
+	.attr	= { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE },	\
+	.show	= _name##_show,	\
+}
+
+#define __ATTR_NULL { .attr = { .name = NULL } }
+
+#define attr_name(_attr) (_attr).attr.name
+
 struct bin_attribute {
 	struct attribute	attr;
 	size_t			size;
@@ -47,6 +70,24 @@
 extern int
 sysfs_rename_dir(struct kobject *, const char *new_name);
 
+struct sysfs_dirent {
+	atomic_t		s_count;
+	struct list_head	s_sibling;
+	struct list_head	s_children;
+	void 			* s_element;
+	int			s_type;
+	umode_t			s_mode;
+	struct dentry		* s_dentry;
+};
+
+#define SYSFS_ROOT		0x0001
+#define SYSFS_KOBJECT		0x0002
+#define SYSFS_KOBJ_ATTR 	0x0004
+#define SYSFS_KOBJ_BIN_ATTR	0x0008
+#define SYSFS_KOBJ_ATTR_GROUP	0x0010
+#define SYSFS_KOBJ_LINK 	0x0020
+#define SYSFS_NOT_PINNED	(SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK)
+
 extern int
 sysfs_create_file(struct kobject *, const struct attribute *);
 
--- diff/include/linux/tcp.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/linux/tcp.h	2004-07-01 21:32:51.000000000 +0100
@@ -262,8 +262,8 @@
 	__u32	frto_highmark;	/* snd_nxt when RTO occurred */
 
 	__u8	unused_pad;
-	__u8	queue_shrunk;	/* Write queue has been shrunk recently.*/
 	__u8	defer_accept;	/* User waits for some data after accept() */
+	/* one byte hole, try to pack */
 
 /* RTT measurement */
 	__u8	backoff;	/* backoff				*/
@@ -297,7 +297,6 @@
 	struct sk_buff_head	out_of_order_queue; /* Out of order segments go here */
 
 	struct tcp_func		*af_specific;	/* Operations which are AF_INET{4,6} specific	*/
-	struct sk_buff		*send_head;	/* Front of stuff to transmit			*/
 
  	__u32	rcv_wnd;	/* Current receiver window		*/
 	__u32	rcv_wup;	/* rcv_nxt on last window update sent	*/
@@ -371,8 +370,6 @@
 	struct open_request	*accept_queue;
 	struct open_request	*accept_queue_tail;
 
-	int			write_pending;	/* A write to socket waits to start. */
-
 	unsigned int		keepalive_time;	  /* time before keep alive takes place */
 	unsigned int		keepalive_intvl;  /* time interval between keep alive probes */
 	int			linger2;
--- diff/include/linux/videodev2.h	2004-05-19 22:13:03.000000000 +0100
+++ source/include/linux/videodev2.h	2004-07-01 21:32:51.000000000 +0100
@@ -207,6 +207,9 @@
 #define V4L2_PIX_FMT_YYUV    v4l2_fourcc('Y','Y','U','V') /* 16  YUV 4:2:2     */
 #define V4L2_PIX_FMT_HI240   v4l2_fourcc('H','I','2','4') /*  8  8-bit color   */
 
+/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
+#define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B','A','8','1') /*  8  BGBG.. GRGR.. */
+
 /* compressed formats */
 #define V4L2_PIX_FMT_MJPEG    v4l2_fourcc('M','J','P','G') /* Motion-JPEG   */
 #define V4L2_PIX_FMT_JPEG     v4l2_fourcc('J','P','E','G') /* JFIF JPEG     */
@@ -383,8 +386,8 @@
 		unsigned long   userptr;
 	} m;
 	__u32			length;
-
-	__u32			reserved[2];
+	__u32			input;
+	__u32			reserved;
 };
 
 /*  Flags for 'flags' field */
@@ -395,6 +398,7 @@
 #define V4L2_BUF_FLAG_PFRAME	0x0010	/* Image is a P-frame */
 #define V4L2_BUF_FLAG_BFRAME	0x0020	/* Image is a B-frame */
 #define V4L2_BUF_FLAG_TIMECODE	0x0100	/* timecode field is valid */
+#define V4L2_BUF_FLAG_INPUT     0x0200  /* input field is valid */
 
 /*
  *	O V E R L A Y   P R E V I E W
@@ -526,12 +530,13 @@
 				 V4L2_STD_PAL_I)
 #define V4L2_STD_NTSC           (V4L2_STD_NTSC_M	|\
 				 V4L2_STD_NTSC_M_JP)
+#define V4L2_STD_SECAM_DK      	(V4L2_STD_SECAM_D	|\
+				 V4L2_STD_SECAM_K	|\
+				 V4L2_STD_SECAM_K1)
 #define V4L2_STD_SECAM		(V4L2_STD_SECAM_B	|\
-				 V4L2_STD_SECAM_D	|\
 				 V4L2_STD_SECAM_G	|\
 				 V4L2_STD_SECAM_H	|\
-				 V4L2_STD_SECAM_K	|\
-				 V4L2_STD_SECAM_K1	|\
+				 V4L2_STD_SECAM_DK	|\
 				 V4L2_STD_SECAM_L)
 
 #define V4L2_STD_525_60		(V4L2_STD_PAL_M		|\
@@ -541,6 +546,8 @@
 				 V4L2_STD_PAL_N		|\
 				 V4L2_STD_PAL_Nc	|\
 				 V4L2_STD_SECAM)
+#define V4L2_STD_ATSC           (V4L2_STD_ATSC_8_VSB    |\
+		                 V4L2_STD_ATSC_16_VSB)
 
 #define V4L2_STD_UNKNOWN        0
 #define V4L2_STD_ALL            (V4L2_STD_525_60	|\
--- diff/include/linux/vmalloc.h	2004-05-19 22:13:03.000000000 +0100
+++ source/include/linux/vmalloc.h	2004-07-01 21:32:51.000000000 +0100
@@ -23,6 +23,7 @@
  *	Highlevel APIs for driver use
  */
 extern void *vmalloc(unsigned long size);
+extern void *vmalloc_exec(unsigned long size);
 extern void *vmalloc_32(unsigned long size);
 extern void *__vmalloc(unsigned long size, int gfp_mask, pgprot_t prot);
 extern void vfree(void *addr);
@@ -35,6 +36,8 @@
  *	Lowlevel-APIs (not for driver use!)
  */
 extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
+extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
+					unsigned long start, unsigned long end);
 extern struct vm_struct *remove_vm_area(void *addr);
 extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
 			struct page ***pages);
--- diff/include/linux/vt_kern.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/linux/vt_kern.h	2004-07-01 21:32:51.000000000 +0100
@@ -11,6 +11,7 @@
 #include <linux/kd.h>
 #include <linux/tty.h>
 #include <linux/console_struct.h>
+#include <linux/mm.h>
 
 /*
  * Presently, a lot of graphics programs do not restore the contents of
@@ -84,4 +85,12 @@
 void change_console(unsigned int);
 void reset_vc(unsigned int new_console);
 
+/*
+ * vc_screen.c shares this temporary buffer with the console write code so that
+ * we can easily avoid touching user space while holding the console spinlock.
+ */
+extern char con_buf[PAGE_SIZE];
+#define CON_BUF_SIZE	PAGE_SIZE
+extern struct semaphore con_buf_sem;
+
 #endif /* _VT_KERN_H */
--- diff/include/linux/wait.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/linux/wait.h	2004-07-01 21:32:51.000000000 +0100
@@ -120,18 +120,15 @@
 
 #define __wait_event(wq, condition) 					\
 do {									\
-	wait_queue_t __wait;						\
-	init_waitqueue_entry(&__wait, current);				\
+	DEFINE_WAIT(__wait);						\
 									\
-	add_wait_queue(&wq, &__wait);					\
 	for (;;) {							\
-		set_current_state(TASK_UNINTERRUPTIBLE);		\
+		prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE);	\
 		if (condition)						\
 			break;						\
 		schedule();						\
 	}								\
-	current->state = TASK_RUNNING;					\
-	remove_wait_queue(&wq, &__wait);				\
+	finish_wait(&wq, &__wait);					\
 } while (0)
 
 #define wait_event(wq, condition) 					\
@@ -143,12 +140,10 @@
 
 #define __wait_event_interruptible(wq, condition, ret)			\
 do {									\
-	wait_queue_t __wait;						\
-	init_waitqueue_entry(&__wait, current);				\
+	DEFINE_WAIT(__wait);						\
 									\
-	add_wait_queue(&wq, &__wait);					\
 	for (;;) {							\
-		set_current_state(TASK_INTERRUPTIBLE);			\
+		prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE);	\
 		if (condition)						\
 			break;						\
 		if (!signal_pending(current)) {				\
@@ -158,8 +153,7 @@
 		ret = -ERESTARTSYS;					\
 		break;							\
 	}								\
-	current->state = TASK_RUNNING;					\
-	remove_wait_queue(&wq, &__wait);				\
+	finish_wait(&wq, &__wait);					\
 } while (0)
 
 #define wait_event_interruptible(wq, condition)				\
@@ -172,12 +166,10 @@
 
 #define __wait_event_interruptible_timeout(wq, condition, ret)		\
 do {									\
-	wait_queue_t __wait;						\
-	init_waitqueue_entry(&__wait, current);				\
+	DEFINE_WAIT(__wait);						\
 									\
-	add_wait_queue(&wq, &__wait);					\
 	for (;;) {							\
-		set_current_state(TASK_INTERRUPTIBLE);			\
+		prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE);	\
 		if (condition)						\
 			break;						\
 		if (!signal_pending(current)) {				\
@@ -189,8 +181,7 @@
 		ret = -ERESTARTSYS;					\
 		break;							\
 	}								\
-	current->state = TASK_RUNNING;					\
-	remove_wait_queue(&wq, &__wait);				\
+	finish_wait(&wq, &__wait);					\
 } while (0)
 
 #define wait_event_interruptible_timeout(wq, condition, timeout)	\
@@ -200,7 +191,34 @@
 		__wait_event_interruptible_timeout(wq, condition, __ret); \
 	__ret;								\
 })
-	
+
+#define __wait_event_interruptible_exclusive(wq, condition, ret)	\
+do {									\
+	DEFINE_WAIT(__wait);						\
+									\
+	for (;;) {							\
+		prepare_to_wait_exclusive(&wq, &__wait,			\
+					TASK_INTERRUPTIBLE);		\
+		if (condition)						\
+			break;						\
+		if (!signal_pending(current)) {				\
+			schedule();					\
+			continue;					\
+		}							\
+		ret = -ERESTARTSYS;					\
+		break;							\
+	}								\
+	finish_wait(&wq, &__wait);					\
+} while (0)
+
+#define wait_event_interruptible_exclusive(wq, condition)		\
+({									\
+	int __ret = 0;							\
+	if (!(condition))						\
+		__wait_event_interruptible_exclusive(wq, condition, __ret);\
+	__ret;								\
+})
+
 /*
  * Must be called with the spinlock in the wait_queue_head_t held.
  */
--- diff/include/media/ir-common.h	2004-05-19 22:13:06.000000000 +0100
+++ source/include/media/ir-common.h	2004-07-01 21:32:51.000000000 +0100
@@ -27,7 +27,7 @@
 #define IR_TYPE_OTHER  99
 
 #define IR_KEYTAB_TYPE	u32
-#define IR_KEYTAB_SIZE	64  // enougth for rc5, probably need more some day ...
+#define IR_KEYTAB_SIZE	128  // enougth for rc5, probably need more some day ...
 
 #define IR_KEYCODE(tab,code)	(((unsigned)code < IR_KEYTAB_SIZE) \
 				 ? tab[code] : KEY_RESERVED)
--- diff/include/media/video-buf.h	2004-05-19 22:13:06.000000000 +0100
+++ source/include/media/video-buf.h	2004-07-01 21:32:51.000000000 +0100
@@ -18,6 +18,8 @@
 
 #include <linux/videodev.h>
 
+#define UNSET (-1U)
+
 /* --------------------------------------------------------------------- */
 
 /*
@@ -34,8 +36,6 @@
  */
 struct scatterlist* videobuf_pages_to_sg(struct page **pages, int nr_pages,
 					 int offset);
-int videobuf_lock(struct page **pages, int nr_pages);
-int videobuf_unlock(struct page **pages, int nr_pages);
 
 /* --------------------------------------------------------------------- */
 
@@ -59,6 +59,8 @@
  */
 
 struct videobuf_dmabuf {
+	u32                 magic;
+
 	/* for userland buffer */
 	int                 offset;
 	struct page         **pages;
@@ -76,6 +78,7 @@
 	int                 direction;
 };
 
+void videobuf_dma_init(struct videobuf_dmabuf *dma);
 int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
 			   unsigned long data, unsigned long size);
 int videobuf_dma_init_kernel(struct videobuf_dmabuf *dma, int direction,
@@ -134,12 +137,14 @@
 
 struct videobuf_buffer {
 	unsigned int            i;
+	u32                     magic;
 
 	/* info about the buffer */
 	unsigned int            width;
 	unsigned int            height;
 	unsigned int            bytesperline; /* use only if != 0 */
 	unsigned long           size;
+	unsigned int            input;
 	enum v4l2_field         field;
 	enum videobuf_state     state;
 	struct videobuf_dmabuf  dma;
@@ -174,9 +179,10 @@
 	struct pci_dev             *pci;
 
 	enum v4l2_buf_type         type;
+	unsigned int               inputs; /* for V4L2_BUF_FLAG_INPUT */
 	unsigned int               msize;
 	enum v4l2_field            field;
-	enum v4l2_field            last; /* for field=V4L2_FIELD_ALTERNATE */
+	enum v4l2_field            last;   /* for field=V4L2_FIELD_ALTERNATE */
 	struct videobuf_buffer     *bufs[VIDEO_MAX_FRAME];
 	struct videobuf_queue_ops  *ops;
 
--- diff/include/net/checksum.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/net/checksum.h	2004-07-01 21:32:51.000000000 +0100
@@ -16,83 +16,15 @@
  *		2 of the License, or (at your option) any later version.
  */
 
-/*
- *	Fixes:
- *
- *	Ralf Baechle			:	generic ipv6 checksum
- *	<ralf@waldorf-gmbh.de>
- */
-
 #ifndef _CHECKSUM_H
 #define _CHECKSUM_H
 
+#include <linux/errno.h>
 #include <asm/types.h>
 #include <asm/byteorder.h>
-#include <net/ip.h>
-#include <linux/in6.h>
 #include <asm/uaccess.h>
 #include <asm/checksum.h>
 
-#ifndef _HAVE_ARCH_IPV6_CSUM
-
-static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
-						     struct in6_addr *daddr,
-						     __u16 len,
-						     unsigned short proto,
-						     unsigned int csum) 
-{
-
-	int carry;
-	__u32 ulen;
-	__u32 uproto;
-
-	csum += saddr->s6_addr32[0];
-	carry = (csum < saddr->s6_addr32[0]);
-	csum += carry;
-
-	csum += saddr->s6_addr32[1];
-	carry = (csum < saddr->s6_addr32[1]);
-	csum += carry;
-
-	csum += saddr->s6_addr32[2];
-	carry = (csum < saddr->s6_addr32[2]);
-	csum += carry;
-
-	csum += saddr->s6_addr32[3];
-	carry = (csum < saddr->s6_addr32[3]);
-	csum += carry;
-
-	csum += daddr->s6_addr32[0];
-	carry = (csum < daddr->s6_addr32[0]);
-	csum += carry;
-
-	csum += daddr->s6_addr32[1];
-	carry = (csum < daddr->s6_addr32[1]);
-	csum += carry;
-
-	csum += daddr->s6_addr32[2];
-	carry = (csum < daddr->s6_addr32[2]);
-	csum += carry;
-
-	csum += daddr->s6_addr32[3];
-	carry = (csum < daddr->s6_addr32[3]);
-	csum += carry;
-
-	ulen = htonl((__u32) len);
-	csum += ulen;
-	carry = (csum < ulen);
-	csum += carry;
-
-	uproto = htonl(proto);
-	csum += uproto;
-	carry = (csum < uproto);
-	csum += carry;
-
-	return csum_fold(csum);
-}
-
-#endif
-
 #ifndef _HAVE_ARCH_COPY_AND_CSUM_FROM_USER
 static inline
 unsigned int csum_and_copy_from_user (const char __user *src, char *dst,
--- diff/include/net/dst.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/net/dst.h	2004-07-01 21:32:51.000000000 +0100
@@ -183,6 +183,12 @@
 	__dst_free(dst);
 }
 
+static inline void dst_rcu_free(struct rcu_head *head)
+{
+	struct dst_entry *dst = container_of(head, struct dst_entry, rcu_head);
+	dst_free(dst);
+}
+
 static inline void dst_confirm(struct dst_entry *dst)
 {
 	if (dst)
--- diff/include/net/esp.h	2004-05-19 22:13:06.000000000 +0100
+++ source/include/net/esp.h	2004-07-01 21:32:51.000000000 +0100
@@ -2,9 +2,14 @@
 #define _NET_ESP_H
 
 #include <net/xfrm.h>
+#include <asm/scatterlist.h>
+
+#define ESP_NUM_FAST_SG		4
 
 struct esp_data
 {
+	struct scatterlist		sgbuf[ESP_NUM_FAST_SG];
+
 	/* Confidentiality */
 	struct {
 		u8			*key;		/* Key */
--- diff/include/net/inet_common.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/net/inet_common.h	2004-07-01 21:32:51.000000000 +0100
@@ -20,27 +20,14 @@
 						   int addr_len, int flags);
 extern int			inet_accept(struct socket *sock, 
 					    struct socket *newsock, int flags);
-extern int			inet_recvmsg(struct kiocb *iocb,
-					     struct socket *sock, 
-					     struct msghdr *ubuf, 
-					     size_t size, int flags);
 extern int			inet_sendmsg(struct kiocb *iocb,
 					     struct socket *sock, 
 					     struct msghdr *msg, 
 					     size_t size);
 extern int			inet_shutdown(struct socket *sock, int how);
 extern unsigned int		inet_poll(struct file * file, struct socket *sock, struct poll_table_struct *wait);
-extern int			inet_setsockopt(struct socket *sock, int level,
-						int optname,
-						char __user *optval, 
-						int optlen);
-extern int			inet_getsockopt(struct socket *sock, int level,
-						int optname,
-						char __user *optval, 
-						int __user *optlen);
 extern int			inet_listen(struct socket *sock, int backlog);
 
-extern void			inet_sock_release(struct sock *sk);
 extern void			inet_sock_destruct(struct sock *sk);
 extern atomic_t			inet_sock_nr;
 
--- diff/include/net/ip.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/net/ip.h	2004-07-01 21:32:51.000000000 +0100
@@ -32,12 +32,9 @@
 #include <linux/in_route.h>
 #include <net/route.h>
 #include <net/arp.h>
-
-#ifndef _SNMP_H
 #include <net/snmp.h>
-#endif
 
-#include <net/sock.h>	/* struct sock */
+struct sock;
 
 struct inet_skb_parm
 {
--- diff/include/net/irda/crc.h	2004-05-19 22:13:06.000000000 +0100
+++ source/include/net/irda/crc.h	2004-07-01 21:32:51.000000000 +0100
@@ -15,19 +15,15 @@
 #define IRDA_CRC_H
 
 #include <linux/types.h>
+#include <linux/crc16.h>
 
 #define INIT_FCS  0xffff   /* Initial FCS value */
 #define GOOD_FCS  0xf0b8   /* Good final FCS value */
 
-extern __u16 const irda_crc16_table[];
-
 /* Recompute the FCS with one more character appended. */
-static inline __u16 irda_fcs(__u16 fcs, __u8 c)
-{
-	return (((fcs) >> 8) ^ irda_crc16_table[((fcs) ^ (c)) & 0xff]);
-}
+#define irda_fcs(fcs, c) crc16_byte(fcs, c)
 
 /* Recompute the FCS with len bytes appended. */
-__u16 irda_calc_crc16( __u16 fcs, __u8 const *buf, size_t len);
+#define irda_calc_crc16(fcs, buf, len) crc16(fcs, buf, len)
 
 #endif
--- diff/include/net/irda/irda_device.h	2004-05-19 22:13:06.000000000 +0100
+++ source/include/net/irda/irda_device.h	2004-07-01 21:32:51.000000000 +0100
@@ -39,11 +39,13 @@
 #ifndef IRDA_DEVICE_H
 #define IRDA_DEVICE_H
 
+#include <linux/config.h>
 #include <linux/tty.h>
 #include <linux/netdevice.h>
 #include <linux/spinlock.h>
 #include <linux/skbuff.h>		/* struct sk_buff */
 #include <linux/irda.h>
+#include <linux/types.h>
 
 #include <net/pkt_sched.h>
 #include <net/irda/irda.h>
@@ -236,7 +238,7 @@
 int irda_device_dongle_cleanup(dongle_t *dongle);
 
 #ifdef CONFIG_ISA
-void irda_setup_dma(int channel, char *buffer, int count, int mode);
+void irda_setup_dma(int channel, dma_addr_t buffer, int count, int mode);
 #endif
 
 void irda_task_delete(struct irda_task *task);
--- diff/include/net/pkt_cls.h	2004-05-19 22:13:06.000000000 +0100
+++ source/include/net/pkt_cls.h	2004-07-01 21:32:51.000000000 +0100
@@ -71,12 +71,38 @@
 {
 	int err = 0;
 	u32 protocol = skb->protocol;
+#ifdef CONFIG_NET_CLS_ACT
+	struct tcf_proto *otp = tp;
+reclassify:
+#endif
+	protocol = skb->protocol;
 
 	for ( ; tp; tp = tp->next) {
 		if ((tp->protocol == protocol ||
-		     tp->protocol == __constant_htons(ETH_P_ALL)) &&
-		    (err = tp->classify(skb, tp, res)) >= 0)
+			tp->protocol == __constant_htons(ETH_P_ALL)) &&
+			(err = tp->classify(skb, tp, res)) >= 0) {
+#ifdef CONFIG_NET_CLS_ACT
+			if ( TC_ACT_RECLASSIFY == err) {
+				__u32 verd = (__u32) G_TC_VERD(skb->tc_verd);
+				tp = otp;
+
+				if (MAX_REC_LOOP < verd++) {
+					printk("rule prio %d protocol %02x reclassify is buggy packet dropped\n",tp->prio&0xffff, ntohs(tp->protocol));
+					return TC_ACT_SHOT;
+				}
+				skb->tc_verd = SET_TC_VERD(skb->tc_verd,verd);
+				goto reclassify;
+			} else {
+				if (skb->tc_verd) 
+					skb->tc_verd = SET_TC_VERD(skb->tc_verd,0);
+				return err;
+			}
+#else
+
 			return err;
+#endif
+            }
+
 	}
 	return -1;
 }
@@ -90,6 +116,8 @@
 
 extern int register_tcf_proto_ops(struct tcf_proto_ops *ops);
 extern int unregister_tcf_proto_ops(struct tcf_proto_ops *ops);
+extern int ing_filter(struct sk_buff *skb);
+
 
 
 
--- diff/include/net/pkt_sched.h	2004-05-19 22:13:06.000000000 +0100
+++ source/include/net/pkt_sched.h	2004-07-01 21:32:51.000000000 +0100
@@ -11,12 +11,16 @@
 #include <linux/netdevice.h>
 #include <linux/types.h>
 #include <linux/pkt_sched.h>
+#include <linux/rcupdate.h>
 #include <net/pkt_cls.h>
+#include <linux/module.h>
+#include <linux/rtnetlink.h>
 
 #ifdef CONFIG_X86_TSC
 #include <asm/msr.h>
 #endif
 
+
 struct rtattr;
 struct Qdisc;
 
@@ -92,6 +96,7 @@
 	struct net_device	*dev;
 
 	struct tc_stats		stats;
+	struct rcu_head 	q_rcu;
 	int			(*reshape_fail)(struct sk_buff *skb, struct Qdisc *q);
 
 	/* This field is deprecated, but it is still used by CBQ
@@ -390,14 +395,15 @@
 {
 	struct tcf_police *next;
 	int		refcnt;
+#ifdef CONFIG_NET_CLS_ACT
+	int		bindcnt;
+#endif
 	u32		index;
-
 	int		action;
 	int		result;
 	u32		ewma_rate;
 	u32		burst;
 	u32		mtu;
-
 	u32		toks;
 	u32		ptoks;
 	psched_time_t	t_c;
@@ -408,16 +414,89 @@
 	struct tc_stats	stats;
 };
 
+#ifdef CONFIG_NET_CLS_ACT
+
+#define ACT_P_CREATED 1
+#define ACT_P_DELETED 1
+#define tca_gen(name) \
+struct tcf_##name *next; \
+	u32 index; \
+	int refcnt; \
+	int bindcnt; \
+	u32 capab; \
+	int action; \
+	struct tcf_t tm; \
+	struct tc_stats stats; \
+	spinlock_t lock
+
+
+struct tc_action
+{
+	void *priv;
+	struct tc_action_ops *ops;
+	__u32   type;   /* for backward compat(TCA_OLD_COMPAT) */
+	__u32   order; 
+	struct tc_action *next;
+};
+
+#define TCA_CAP_NONE 0
+struct tc_action_ops
+{
+	struct tc_action_ops *next;
+	char    kind[IFNAMSIZ];
+	__u32   type; /* TBD to match kind */
+	__u32 	capab;  /* capabilities includes 4 bit version */
+	struct module		*owner;
+	int     (*act)(struct sk_buff **, struct tc_action *);
+	int     (*get_stats)(struct sk_buff *, struct tc_action *);
+	int     (*dump)(struct sk_buff *, struct tc_action *,int , int);
+	int     (*cleanup)(struct tc_action *, int bind);
+	int     (*lookup)(struct tc_action *, u32 );
+	int     (*init)(struct rtattr *,struct rtattr *,struct tc_action *, int , int );
+	int     (*walk)(struct sk_buff *, struct netlink_callback *, int , struct tc_action *);
+};
+
+extern int tcf_register_action(struct tc_action_ops *a);
+extern int tcf_unregister_action(struct tc_action_ops *a);
+extern void tcf_action_destroy(struct tc_action *a, int bind);
+extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a);
+extern int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind);
+extern int tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind);
+extern int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int);
+extern int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int);
+extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int);
+extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *);
+extern int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,struct tc_action *,int , int );
+extern int tcf_act_police_dump(struct sk_buff *, struct tc_action *, int, int);
+extern int tcf_act_police(struct sk_buff **skb, struct tc_action *a);
+#endif
+
+extern int tcf_police(struct sk_buff *skb, struct tcf_police *p);
 extern int qdisc_copy_stats(struct sk_buff *skb, struct tc_stats *st);
 extern void tcf_police_destroy(struct tcf_police *p);
 extern struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est);
 extern int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p);
-extern int tcf_police(struct sk_buff *skb, struct tcf_police *p);
 
-static inline void tcf_police_release(struct tcf_police *p)
+static inline int tcf_police_release(struct tcf_police *p, int bind)
 {
+	int ret = 0;
+#ifdef CONFIG_NET_CLS_ACT
+	if (p) {
+		if (bind) {
+			 p->bindcnt--;
+		}
+		p->refcnt--;
+		if (p->refcnt <= 0 && !p->bindcnt) {
+			tcf_police_destroy(p);
+			ret = 1;
+		}
+	}
+#else
 	if (p && --p->refcnt == 0)
 		tcf_police_destroy(p);
+
+#endif
+	return ret;
 }
 
 extern struct Qdisc noop_qdisc;
--- diff/include/net/protocol.h	2004-05-19 22:13:06.000000000 +0100
+++ source/include/net/protocol.h	2004-07-01 21:32:51.000000000 +0100
@@ -34,8 +34,7 @@
 
 
 /* This is used to register protocols. */
-struct inet_protocol 
-{
+struct net_protocol {
 	int			(*handler)(struct sk_buff *skb);
 	void			(*err_handler)(struct sk_buff *skb, u32 info);
 	int			no_policy;
@@ -78,15 +77,15 @@
 #define INET_PROTOSW_REUSE 0x01	     /* Are ports automatically reusable? */
 #define INET_PROTOSW_PERMANENT 0x02  /* Permanent protocols are unremovable. */
 
-extern struct inet_protocol *inet_protocol_base;
-extern struct inet_protocol *inet_protos[MAX_INET_PROTOS];
+extern struct net_protocol *inet_protocol_base;
+extern struct net_protocol *inet_protos[MAX_INET_PROTOS];
 
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
 extern struct inet6_protocol *inet6_protos[MAX_INET_PROTOS];
 #endif
 
-extern int	inet_add_protocol(struct inet_protocol *prot, unsigned char num);
-extern int	inet_del_protocol(struct inet_protocol *prot, unsigned char num);
+extern int	inet_add_protocol(struct net_protocol *prot, unsigned char num);
+extern int	inet_del_protocol(struct net_protocol *prot, unsigned char num);
 extern void	inet_register_protosw(struct inet_protosw *p);
 extern void	inet_unregister_protosw(struct inet_protosw *p);
 
--- diff/include/net/route.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/net/route.h	2004-07-01 21:32:51.000000000 +0100
@@ -129,7 +129,7 @@
 
 extern unsigned		inet_addr_type(u32 addr);
 extern void		ip_rt_multicast_event(struct in_device *);
-extern int		ip_rt_ioctl(unsigned int cmd, void *arg);
+extern int		ip_rt_ioctl(unsigned int cmd, void __user *arg);
 extern void		ip_rt_get_source(u8 *src, struct rtable *rt);
 extern int		ip_rt_dump(struct sk_buff *skb,  struct netlink_callback *cb);
 
--- diff/include/net/sock.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/net/sock.h	2004-07-01 21:32:51.000000000 +0100
@@ -53,6 +53,7 @@
 
 #include <asm/atomic.h>
 #include <net/dst.h>
+#include <net/checksum.h>
 
 /*
  * This structure really needs to be cleaned up.
@@ -166,6 +167,11 @@
   *	@sk_socket - Identd and reporting IO signals
   *	@sk_user_data - RPC layer private data
   *	@sk_owner - module that owns this socket
+  *	@sk_sndmsg_page - cached page for sendmsg
+  *	@sk_sndmsg_off - cached offset for sendmsg
+  *	@sk_send_head - front of stuff to transmit
+  *	@sk_write_pending - a write to stream socket waits to start
+  *	@sk_queue_shrunk - write queue has been shrunk recently
   *	@sk_state_change - callback to indicate change in the state of the sock
   *	@sk_data_ready - callback to indicate there is data to be processed
   *	@sk_write_space - callback to indicate there is bf sending space available
@@ -246,7 +252,13 @@
 	struct socket		*sk_socket;
 	void			*sk_user_data;
 	struct module		*sk_owner;
+	struct page		*sk_sndmsg_page;
+	__u32			sk_sndmsg_off;
+	struct sk_buff		*sk_send_head;
+	int			sk_write_pending;
 	void			*sk_security;
+	__u8			sk_queue_shrunk;
+	/* three bytes hole, try to pack */
 	void			(*sk_state_change)(struct sock *sk);
 	void			(*sk_data_ready)(struct sock *sk, int bytes);
 	void			(*sk_write_space)(struct sock *sk);
@@ -413,6 +425,44 @@
 	return sk->sk_ack_backlog > sk->sk_max_ack_backlog;
 }
 
+/*
+ * Compute minimal free write space needed to queue new packets.
+ */
+static inline int sk_stream_min_wspace(struct sock *sk)
+{
+	return sk->sk_wmem_queued / 2;
+}
+
+static inline int sk_stream_wspace(struct sock *sk)
+{
+	return sk->sk_sndbuf - sk->sk_wmem_queued;
+}
+
+extern void sk_stream_write_space(struct sock *sk);
+
+static inline int sk_stream_memory_free(struct sock *sk)
+{
+	return sk->sk_wmem_queued < sk->sk_sndbuf;
+}
+
+extern void sk_stream_rfree(struct sk_buff *skb);
+
+static inline void sk_stream_set_owner_r(struct sk_buff *skb, struct sock *sk)
+{
+	skb->sk = sk;
+	skb->destructor = sk_stream_rfree;
+	atomic_add(skb->truesize, &sk->sk_rmem_alloc);
+	sk->sk_forward_alloc -= skb->truesize;
+}
+
+static inline void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb)
+{
+	sk->sk_queue_shrunk   = 1;
+	sk->sk_wmem_queued   -= skb->truesize;
+	sk->sk_forward_alloc += skb->truesize;
+	__kfree_skb(skb);
+}
+
 /* The per-socket spinlock must be held here. */
 #define sk_add_backlog(__sk, __skb)				\
 do {	if (!(__sk)->sk_backlog.tail) {				\
@@ -437,9 +487,15 @@
 	rc;							\
 })
 
+extern int sk_stream_wait_connect(struct sock *sk, long *timeo_p);
+extern int sk_stream_wait_memory(struct sock *sk, long *timeo_p);
+extern void sk_stream_wait_close(struct sock *sk, long timeo_p);
+extern int sk_stream_error(struct sock *sk, int flags, int err);
+extern void sk_stream_kill_queues(struct sock *sk);
+
 extern int sk_wait_data(struct sock *sk, long *timeo);
 
-/* IP protocol blocks we attach to sockets.
+/* Networking protocol blocks we attach to sockets.
  * socket layer -> transport layer interface
  * transport -> network interface is defined by struct inet_proto
  */
@@ -483,6 +539,22 @@
 	void			(*unhash)(struct sock *sk);
 	int			(*get_port)(struct sock *sk, unsigned short snum);
 
+	/* Memory pressure */
+	void			(*enter_memory_pressure)(void);
+	atomic_t		*memory_allocated;	/* Current allocated memory. */
+	atomic_t		*sockets_allocated;	/* Current number of sockets. */
+	/*
+	 * Pressure flag: try to collapse.
+	 * Technical note: it is used by multiple contexts non atomically.
+	 * All the sk_stream_mem_schedule() is of this nature: accounting
+	 * is strict, actions are advisory and have some latency.
+	 */
+	int			*memory_pressure;
+	int			*sysctl_mem;
+	int			*sysctl_wmem;
+	int			*sysctl_rmem;
+	int			max_header;
+
 	char			name[32];
 
 	struct {
@@ -545,17 +617,17 @@
 	struct scm_cookie	*scm;
 	struct msghdr		*msg, async_msg;
 	struct iovec		async_iov;
+	struct kiocb		*kiocb;
 };
 
 static inline struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb)
 {
-	BUG_ON(sizeof(struct sock_iocb) > KIOCB_PRIVATE_SIZE);
 	return (struct sock_iocb *)iocb->private;
 }
 
 static inline struct kiocb *siocb_to_kiocb(struct sock_iocb *si)
 {
-	return container_of((void *)si, struct kiocb, private);
+	return si->kiocb;
 }
 
 struct socket_alloc {
@@ -573,6 +645,37 @@
 	return &container_of(socket, struct socket_alloc, socket)->vfs_inode;
 }
 
+extern void __sk_stream_mem_reclaim(struct sock *sk);
+extern int sk_stream_mem_schedule(struct sock *sk, int size, int kind);
+
+#define SK_STREAM_MEM_QUANTUM ((int)PAGE_SIZE)
+
+static inline int sk_stream_pages(int amt)
+{
+	return (amt + SK_STREAM_MEM_QUANTUM - 1) / SK_STREAM_MEM_QUANTUM;
+}
+
+static inline void sk_stream_mem_reclaim(struct sock *sk)
+{
+	if (sk->sk_forward_alloc >= SK_STREAM_MEM_QUANTUM)
+		__sk_stream_mem_reclaim(sk);
+}
+
+static inline void sk_stream_writequeue_purge(struct sock *sk)
+{
+	struct sk_buff *skb;
+
+	while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL)
+		sk_stream_free_skb(sk, skb);
+	sk_stream_mem_reclaim(sk);
+}
+
+static inline int sk_stream_rmem_schedule(struct sock *sk, struct sk_buff *skb)
+{
+	return (int)skb->truesize <= sk->sk_forward_alloc ||
+		sk_stream_mem_schedule(sk, skb->truesize, 1);
+}
+
 /* Used by processes to "lock" a socket state, so that
  * interrupts and bottom half handlers won't change it
  * from under us. It essentially blocks any incoming
@@ -668,6 +771,19 @@
 						int flags);
 
 /*
+ * Functions to fill in entries in struct proto_ops when a protocol
+ * uses the inet style.
+ */
+extern int sock_common_getsockopt(struct socket *sock, int level, int optname,
+				  char __user *optval, int __user *optlen);
+extern int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock,
+			       struct msghdr *msg, size_t size, int flags);
+extern int sock_common_setsockopt(struct socket *sock, int level, int optname,
+				  char __user *optval, int optlen);
+
+extern void sk_common_release(struct sock *sk);
+
+/*
  *	Default socket callbacks and setup code
  */
  
@@ -902,6 +1018,34 @@
 	return dst;
 }
 
+static inline void sk_charge_skb(struct sock *sk, struct sk_buff *skb)
+{
+	sk->sk_wmem_queued   += skb->truesize;
+	sk->sk_forward_alloc -= skb->truesize;
+}
+
+static inline int skb_copy_to_page(struct sock *sk, char __user *from,
+				   struct sk_buff *skb, struct page *page,
+				   int off, int copy)
+{
+	if (skb->ip_summed == CHECKSUM_NONE) {
+		int err = 0;
+		unsigned int csum = csum_and_copy_from_user(from,
+						     page_address(page) + off,
+							    copy, 0, &err);
+		if (err)
+			return err;
+		skb->csum = csum_block_add(skb->csum, csum, skb->len);
+	} else if (copy_from_user(page_address(page) + off, from, copy))
+		return -EFAULT;
+
+	skb->len	     += copy;
+	skb->data_len	     += copy;
+	skb->truesize	     += copy;
+	sk->sk_wmem_queued   += copy;
+	sk->sk_forward_alloc -= copy;
+	return 0;
+}
 
 /*
  * 	Queue a received datagram if it will fit. Stream and sequenced
@@ -1018,6 +1162,60 @@
 #define SOCK_MIN_SNDBUF 2048
 #define SOCK_MIN_RCVBUF 256
 
+static inline void sk_stream_moderate_sndbuf(struct sock *sk)
+{
+	if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK)) {
+		sk->sk_sndbuf = min(sk->sk_sndbuf, sk->sk_wmem_queued / 2);
+		sk->sk_sndbuf = max(sk->sk_sndbuf, SOCK_MIN_SNDBUF);
+	}
+}
+
+static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
+						   int size, int mem, int gfp)
+{
+	struct sk_buff *skb = alloc_skb(size + sk->sk_prot->max_header, gfp);
+
+	if (skb) {
+		skb->truesize += mem;
+		if (sk->sk_forward_alloc >= (int)skb->truesize ||
+		    sk_stream_mem_schedule(sk, skb->truesize, 0)) {
+			skb_reserve(skb, sk->sk_prot->max_header);
+			return skb;
+		}
+		__kfree_skb(skb);
+	} else {
+		sk->sk_prot->enter_memory_pressure();
+		sk_stream_moderate_sndbuf(sk);
+	}
+	return NULL;
+}
+
+static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk,
+						  int size, int gfp)
+{
+	return sk_stream_alloc_pskb(sk, size, 0, gfp);
+}
+
+static inline struct page *sk_stream_alloc_page(struct sock *sk)
+{
+	struct page *page = NULL;
+
+	if (sk->sk_forward_alloc >= (int)PAGE_SIZE ||
+	    sk_stream_mem_schedule(sk, PAGE_SIZE, 0))
+		page = alloc_pages(sk->sk_allocation, 0);
+	else {
+		sk->sk_prot->enter_memory_pressure();
+		sk_stream_moderate_sndbuf(sk);
+	}
+	return page;
+}
+
+#define sk_stream_for_retrans_queue(skb, sk)				\
+		for (skb = (sk)->sk_write_queue.next;			\
+		     (skb != (sk)->sk_send_head) &&			\
+		     (skb != (struct sk_buff *)&(sk)->sk_write_queue);	\
+		     skb = skb->next)
+
 /*
  *	Default write policy as shown to user space via poll/select/SIGIO
  */
--- diff/include/net/tcp.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/net/tcp.h	2004-07-01 21:32:51.000000000 +0100
@@ -33,6 +33,7 @@
 #include <net/checksum.h>
 #include <net/sock.h>
 #include <net/snmp.h>
+#include <net/ip.h>
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
 #include <linux/ipv6.h>
 #endif
@@ -870,7 +871,6 @@
 					  long timeout);
 extern struct sock *		tcp_accept(struct sock *sk, int flags, int *err);
 extern unsigned int		tcp_poll(struct file * file, struct socket *sock, struct poll_table_struct *wait);
-extern void			tcp_write_space(struct sock *sk); 
 
 extern int			tcp_getsockopt(struct sock *sk, int level, 
 					       int optname,
@@ -1186,30 +1186,8 @@
 
 #define TCP_SKB_CB(__skb)	((struct tcp_skb_cb *)&((__skb)->cb[0]))
 
-#define for_retrans_queue(skb, sk, tp) \
-		for (skb = (sk)->sk_write_queue.next;			\
-		     (skb != (tp)->send_head) &&			\
-		     (skb != (struct sk_buff *)&(sk)->sk_write_queue);	\
-		     skb=skb->next)
-
-
 #include <net/tcp_ecn.h>
 
-
-/*
- *	Compute minimal free write space needed to queue new packets. 
- */
-static inline int tcp_min_write_space(struct sock *sk)
-{
-	return sk->sk_wmem_queued / 2;
-}
- 
-static inline int tcp_wspace(struct sock *sk)
-{
-	return sk->sk_sndbuf - sk->sk_wmem_queued;
-}
-
-
 /* This determines how many packets are "in the network" to the best
  * of our knowledge.  In many cases it is conservative, but where
  * detailed information is available from the receiver (via SACK
@@ -1415,7 +1393,7 @@
 		  tcp_minshall_check(tp))));
 }
 
-/* This checks if the data bearing packet SKB (usually tp->send_head)
+/* This checks if the data bearing packet SKB (usually sk->sk_send_head)
  * should be put on the wire right now.
  */
 static __inline__ int tcp_snd_test(struct tcp_opt *tp, struct sk_buff *skb,
@@ -1472,7 +1450,7 @@
 						 unsigned cur_mss,
 						 int nonagle)
 {
-	struct sk_buff *skb = tp->send_head;
+	struct sk_buff *skb = sk->sk_send_head;
 
 	if (skb) {
 		if (!tcp_skb_is_last(sk, skb))
@@ -1492,7 +1470,7 @@
 
 static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_opt *tp)
 {
-	struct sk_buff *skb = tp->send_head;
+	struct sk_buff *skb = sk->sk_send_head;
 
 	return (skb &&
 		tcp_snd_test(tp, skb, tcp_current_mss(sk, 1),
@@ -1889,102 +1867,7 @@
 	req->rmt_port = skb->h.th->source;
 }
 
-#define TCP_MEM_QUANTUM	((int)PAGE_SIZE)
-
-static inline void tcp_free_skb(struct sock *sk, struct sk_buff *skb)
-{
-	tcp_sk(sk)->queue_shrunk = 1;
-	sk->sk_wmem_queued -= skb->truesize;
-	sk->sk_forward_alloc += skb->truesize;
-	__kfree_skb(skb);
-}
-
-static inline void tcp_charge_skb(struct sock *sk, struct sk_buff *skb)
-{
-	sk->sk_wmem_queued += skb->truesize;
-	sk->sk_forward_alloc -= skb->truesize;
-}
-
-extern void __tcp_mem_reclaim(struct sock *sk);
-extern int tcp_mem_schedule(struct sock *sk, int size, int kind);
-
-static inline void tcp_mem_reclaim(struct sock *sk)
-{
-	if (sk->sk_forward_alloc >= TCP_MEM_QUANTUM)
-		__tcp_mem_reclaim(sk);
-}
-
-static inline void tcp_enter_memory_pressure(void)
-{
-	if (!tcp_memory_pressure) {
-		NET_INC_STATS(TCPMemoryPressures);
-		tcp_memory_pressure = 1;
-	}
-}
-
-static inline void tcp_moderate_sndbuf(struct sock *sk)
-{
-	if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK)) {
-		sk->sk_sndbuf = min(sk->sk_sndbuf, sk->sk_wmem_queued / 2);
-		sk->sk_sndbuf = max(sk->sk_sndbuf, SOCK_MIN_SNDBUF);
-	}
-}
-
-static inline struct sk_buff *tcp_alloc_pskb(struct sock *sk, int size, int mem, int gfp)
-{
-	struct sk_buff *skb = alloc_skb(size+MAX_TCP_HEADER, gfp);
-
-	if (skb) {
-		skb->truesize += mem;
-		if (sk->sk_forward_alloc >= (int)skb->truesize ||
-		    tcp_mem_schedule(sk, skb->truesize, 0)) {
-			skb_reserve(skb, MAX_TCP_HEADER);
-			return skb;
-		}
-		__kfree_skb(skb);
-	} else {
-		tcp_enter_memory_pressure();
-		tcp_moderate_sndbuf(sk);
-	}
-	return NULL;
-}
-
-static inline struct sk_buff *tcp_alloc_skb(struct sock *sk, int size, int gfp)
-{
-	return tcp_alloc_pskb(sk, size, 0, gfp);
-}
-
-static inline struct page * tcp_alloc_page(struct sock *sk)
-{
-	if (sk->sk_forward_alloc >= (int)PAGE_SIZE ||
-	    tcp_mem_schedule(sk, PAGE_SIZE, 0)) {
-		struct page *page = alloc_pages(sk->sk_allocation, 0);
-		if (page)
-			return page;
-	}
-	tcp_enter_memory_pressure();
-	tcp_moderate_sndbuf(sk);
-	return NULL;
-}
-
-static inline void tcp_writequeue_purge(struct sock *sk)
-{
-	struct sk_buff *skb;
-
-	while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL)
-		tcp_free_skb(sk, skb);
-	tcp_mem_reclaim(sk);
-}
-
-extern void tcp_rfree(struct sk_buff *skb);
-
-static inline void tcp_set_owner_r(struct sk_buff *skb, struct sock *sk)
-{
-	skb->sk = sk;
-	skb->destructor = tcp_rfree;
-	atomic_add(skb->truesize, &sk->sk_rmem_alloc);
-	sk->sk_forward_alloc -= skb->truesize;
-}
+extern void tcp_enter_memory_pressure(void);
 
 extern void tcp_listen_wlock(void);
 
@@ -2070,8 +1953,8 @@
 	 * unsent new data, and the advertised window should allow
 	 * sending it.
 	 */
-	return (sysctl_tcp_frto && tp->send_head &&
-		!after(TCP_SKB_CB(tp->send_head)->end_seq,
+	return (sysctl_tcp_frto && sk->sk_send_head &&
+		!after(TCP_SKB_CB(sk->sk_send_head)->end_seq,
 		       tp->snd_una + tp->snd_wnd));
 }
 
--- diff/include/net/xfrm.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/net/xfrm.h	2004-07-01 21:32:51.000000000 +0100
@@ -497,10 +497,6 @@
 	return 0;
 }
 
-/* placeholder until xfrm6_tunnel.c is written */
-static inline int xfrm6_tunnel_check_size(struct sk_buff *skb)
-{ return 0; }
-
 /* A struct encoding bundle of transformations to apply to some set of flow.
  *
  * dst->child points to the next element of bundle.
@@ -783,6 +779,12 @@
 	void (*err_handler)(struct sk_buff *skb, void *info);
 };
 
+struct xfrm6_tunnel {
+	int (*handler)(struct sk_buff **pskb, unsigned int *nhoffp);
+	void (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt,
+			    int type, int code, int offset, __u32 info);
+};
+
 extern void xfrm_init(void);
 extern void xfrm4_init(void);
 extern void xfrm4_fini(void);
@@ -793,6 +795,8 @@
 extern void xfrm4_state_fini(void);
 extern void xfrm6_state_init(void);
 extern void xfrm6_state_fini(void);
+extern void xfrm6_tunnel_init(void);
+extern void xfrm6_tunnel_fini(void);
 
 extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *);
 extern struct xfrm_state *xfrm_state_alloc(void);
@@ -812,12 +816,18 @@
 extern int xfrm_replay_check(struct xfrm_state *x, u32 seq);
 extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq);
 extern int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl);
-extern int xfrm_check_output(struct xfrm_state *x, struct sk_buff *skb, unsigned short family);
+extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb);
 extern int xfrm4_rcv(struct sk_buff *skb);
 extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler);
 extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler);
 extern int xfrm4_tunnel_check_size(struct sk_buff *skb);
 extern int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp);
+extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler);
+extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler);
+extern int xfrm6_tunnel_check_size(struct sk_buff *skb);
+extern u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr);
+extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr);
+extern u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr);
 
 #ifdef CONFIG_XFRM
 extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type);
--- diff/include/pcmcia/cs.h	2004-05-19 22:13:07.000000000 +0100
+++ source/include/pcmcia/cs.h	2004-07-01 21:32:51.000000000 +0100
@@ -318,6 +318,7 @@
 /* Special stuff for binding drivers to sockets */
 typedef struct bind_req_t {
     struct pcmcia_socket	*Socket;
+    struct pcmcia_device	*device;
     u_char	Function;
     dev_info_t	*dev_info;
 } bind_req_t;
@@ -452,6 +453,7 @@
 int pcmcia_set_event_mask(client_handle_t handle, eventmask_t *mask);
 int pcmcia_report_error(client_handle_t handle, error_info_t *err);
 struct pci_bus *pcmcia_lookup_bus(client_handle_t handle);
+struct device *pcmcia_lookup_device(client_handle_t handle);
 
 /* rsrc_mgr.c */
 int pcmcia_adjust_resource_info(client_handle_t handle, adjust_t *adj);
--- diff/include/pcmcia/ds.h	2004-05-19 22:13:07.000000000 +0100
+++ source/include/pcmcia/ds.h	2004-07-01 21:32:51.000000000 +0100
@@ -151,6 +151,21 @@
 	struct device_driver	drv;
 };
 
+struct pcmcia_device {
+	struct device dev;
+	struct pcmcia_bus_socket *socket;
+	struct list_head device_list;
+	int function;
+	int id_mask;
+	cistpl_vers_1_t vers_1;
+	cistpl_manfid_t manfid;
+};
+
+#define	to_pcmcia_device(n) container_of(n, struct pcmcia_device, dev)
+
+#define DEVICE_HAS_VERSION_INFO		0x0001
+#define DEVICE_HAS_MANF_INFO		0x0002
+
 /* driver registration */
 int pcmcia_register_driver(struct pcmcia_driver *driver);
 void pcmcia_unregister_driver(struct pcmcia_driver *driver);
--- diff/include/pcmcia/ss.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/pcmcia/ss.h	2004-07-01 21:32:51.000000000 +0100
@@ -105,6 +105,7 @@
     u_short	speed;
     u_long	sys_start, sys_stop;
     u_int	card_start;
+    struct resource *res;
 } pccard_mem_map;
 
 typedef struct cb_bridge_map {
@@ -154,8 +155,6 @@
 	u_short			index;
 	client_handle_t		handle;
 	struct pcmcia_socket 	*sock;
-	u_long			base;
-	u_long			size;
 	pccard_mem_map		ctl;
 } window_t;
 
--- diff/include/scsi/scsi_devinfo.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/scsi/scsi_devinfo.h	2004-07-01 21:32:51.000000000 +0100
@@ -24,4 +24,5 @@
 #define BLIST_REPORTLUN2	0x20000	/* try REPORT_LUNS even for SCSI-2 devs
  					   (if HBA supports more than 8 LUNs) */
 #define BLIST_NOREPORTLUN	0x40000	/* don't try REPORT_LUNS scan (SCSI-3 devs) */
+#define BLIST_NOT_LOCKABLE	0x80000	/* don't use PREVENT-ALLOW commands */
 #endif
--- diff/include/scsi/scsi_driver.h	2004-05-19 22:13:07.000000000 +0100
+++ source/include/scsi/scsi_driver.h	2004-07-01 21:32:51.000000000 +0100
@@ -13,6 +13,7 @@
 
 	int (*init_command)(struct scsi_cmnd *);
 	void (*rescan)(struct device *);
+	int (*issue_flush)(struct device *, sector_t *);
 };
 #define to_scsi_driver(drv) \
 	container_of((drv), struct scsi_driver, gendrv)
--- diff/include/scsi/scsi_eh.h	2004-05-19 22:13:07.000000000 +0100
+++ source/include/scsi/scsi_eh.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,6 +1,10 @@
 #ifndef _SCSI_SCSI_EH_H
 #define _SCSI_SCSI_EH_H
 
+struct scsi_cmnd;
+struct scsi_device;
+struct Scsi_Host;
+
 extern void scsi_add_timer(struct scsi_cmnd *, int,
 			   void (*)(struct scsi_cmnd *));
 extern int scsi_delete_timer(struct scsi_cmnd *);
--- diff/include/scsi/scsi_host.h	2004-05-19 22:13:07.000000000 +0100
+++ source/include/scsi/scsi_host.h	2004-07-01 21:32:51.000000000 +0100
@@ -30,6 +30,12 @@
 #define DISABLE_CLUSTERING 0
 #define ENABLE_CLUSTERING 1
 
+enum scsi_eh_timer_return {
+	EH_NOT_HANDLED,
+	EH_HANDLED,
+	EH_RESET_TIMER,
+};
+
 
 struct scsi_host_template {
 	struct module *module;
@@ -64,7 +70,7 @@
 	 *
 	 * Status: OPTIONAL
 	 */
-	int (* ioctl)(struct scsi_device *dev, int cmd, void *arg);
+	int (* ioctl)(struct scsi_device *dev, int cmd, void __user *arg);
 	
 	/*
 	 * The queuecommand function is used to queue up a scsi
@@ -126,6 +132,20 @@
 	int (* eh_host_reset_handler)(struct scsi_cmnd *);
 
 	/*
+	 * This is an optional routine to notify the host that the scsi
+	 * timer just fired.  The returns tell the timer routine what to
+	 * do about this:
+	 *
+	 * EH_HANDLED:		I fixed the error, please complete the command
+	 * EH_RESET_TIMER:	I need more time, reset the timer and
+	 *			begin counting again
+	 * EH_NOT_HANDLED	Begin normal error recovery
+	 *
+	 * Status: OPTIONAL
+	 */
+	enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *);
+
+	/*
 	 * Old EH handlers, no longer used. Make them warn the user of old
 	 * drivers by using a wrong type
 	 *
@@ -151,7 +171,7 @@
 	 * here then you will get a call to slave_configure(), then the
 	 * device will be used for however long it is kept around, then when
 	 * the device is removed from the system (or * possibly at reboot
-	 * time), you will then get a call to slave_detach().  This is
+	 * time), you will then get a call to slave_destroy().  This is
 	 * assuming you implement slave_configure and slave_destroy.
 	 * However, if you allocate memory and hang it off the device struct,
 	 * then you must implement the slave_destroy() routine at a minimum
@@ -185,7 +205,7 @@
 	 *     specific setup basis...
 	 * 6.  Return 0 on success, non-0 on error.  The device will be marked
 	 *     as offline on error so that no access will occur.  If you return
-	 *     non-0, your slave_detach routine will never get called for this
+	 *     non-0, your slave_destroy routine will never get called for this
 	 *     device, so don't leave any loose memory hanging around, clean
 	 *     up after yourself before returning non-0
 	 *
@@ -314,6 +334,11 @@
 	unsigned emulated:1;
 
 	/*
+	 * True if the low-level driver performs its own reset-settle delays.
+	 */
+	unsigned skip_settle_delay:1;
+
+	/*
 	 * Countdown for host blocking with no commands outstanding
 	 */
 	unsigned int max_host_blocked;
--- diff/include/scsi/scsi_ioctl.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/scsi/scsi_ioctl.h	2004-07-01 21:32:51.000000000 +0100
@@ -41,7 +41,6 @@
 } Scsi_FCTargAddress;
 
 extern int scsi_ioctl(struct scsi_device *, int, void __user *);
-extern int kernel_scsi_ioctl(struct scsi_device *, int , void *);
 extern int scsi_ioctl_send_command(struct scsi_device *,
 				   struct scsi_ioctl_command __user *);
 
--- diff/include/sound/ac97_codec.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/sound/ac97_codec.h	2004-07-01 21:32:51.000000000 +0100
@@ -441,6 +441,7 @@
 	unsigned short subsystem_vendor;
 	unsigned short subsystem_device;
 	spinlock_t reg_lock;
+	struct semaphore mutex;	/* mutex for AD18xx multi-codecs and paging (2.3) */
 	unsigned short num;	/* number of codec: 0 = primary, 1 = secondary */
 	unsigned short addr;	/* physical address of codec [0-3] */
 	unsigned int id;	/* identification of codec */
@@ -461,7 +462,6 @@
 			unsigned short id[3];		// codec IDs (lower 16-bit word)
 			unsigned short pcmreg[3];	// PCM registers
 			unsigned short codec_cfg[3];	// CODEC_CFG bits
-			struct semaphore mutex;
 		} ad18xx;
 		unsigned int dev_flags;		/* device specific */
 	} spec;
@@ -484,6 +484,10 @@
 {
 	return (ac97->ext_id & AC97_EI_AMAP) != 0;
 }
+static inline int ac97_can_spdif(ac97_t * ac97)
+{
+	return (ac97->ext_id & AC97_EI_SPDIF) != 0;
+}
 
 /* functions */
 int snd_ac97_bus(snd_card_t * card, ac97_bus_t * _bus, ac97_bus_t ** rbus); /* create new AC97 bus */
--- diff/include/sound/asound.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/sound/asound.h	2004-07-01 21:32:51.000000000 +0100
@@ -274,6 +274,7 @@
 #define SNDRV_PCM_INFO_JOINT_DUPLEX	0x00200000	/* playback and capture stream are somewhat correlated */
 #define SNDRV_PCM_INFO_SYNC_START	0x00400000	/* pcm support some kind of sync go */
 #define SNDRV_PCM_INFO_NONATOMIC_OPS	0x00800000	/* non-atomic prepare callback */
+#define SNDRV_PCM_INFO_MMAP_IOMEM	0x01000000	/* mmap on IO memory */
 
 enum sndrv_pcm_state {
 	SNDRV_PCM_STATE_OPEN = 0,	/* stream is open */
--- diff/include/sound/core.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/sound/core.h	2004-07-01 21:32:51.000000000 +0100
@@ -211,12 +211,14 @@
 				 void *private_data);
 #define snd_card_set_isa_pm_callback(card,suspend,resume,data) \
 	snd_card_set_dev_pm_callback(card, PM_ISA_DEV, suspend, resume, data)
+#ifdef CONFIG_PCI
 #ifndef SND_PCI_PM_CALLBACKS
 int snd_card_pci_suspend(struct pci_dev *dev, u32 state);
 int snd_card_pci_resume(struct pci_dev *dev);
 #define SND_PCI_PM_CALLBACKS \
 	.suspend = snd_card_pci_suspend,  .resume = snd_card_pci_resume
 #endif
+#endif
 #else
 #define snd_power_lock(card)		do { (void)(card); } while (0)
 #define snd_power_unlock(card)		do { (void)(card); } while (0)
@@ -226,8 +228,10 @@
 #define snd_card_set_pm_callback(card,suspend,resume,data) -EINVAL
 #define snd_card_set_dev_pm_callback(card,suspend,resume,data) -EINVAL
 #define snd_card_set_isa_pm_callback(card,suspend,resume,data) -EINVAL
+#ifdef CONFIG_PCI
 #define SND_PCI_PM_CALLBACKS
 #endif
+#endif
 
 /* device.c */
 
--- diff/include/sound/emu10k1.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/sound/emu10k1.h	2004-07-01 21:32:51.000000000 +0100
@@ -1069,6 +1069,15 @@
 /* proc interface */
 int snd_emu10k1_proc_init(emu10k1_t * emu);
 
+/* fx8010 irq handler */
+int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu,
+					    snd_fx8010_irq_handler_t *handler,
+					    unsigned char gpr_running,
+					    void *private_data,
+					    snd_emu10k1_fx8010_irq_t **r_irq);
+int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
+					      snd_emu10k1_fx8010_irq_t *irq);
+
 #endif /* __KERNEL__ */
 
 /*
--- diff/include/sound/pcm.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/sound/pcm.h	2004-07-01 21:32:51.000000000 +0100
@@ -351,7 +351,8 @@
 	unsigned char *dma_area;	/* DMA area */
 	dma_addr_t dma_addr;		/* physical bus address (not accessible from main CPU) */
 	size_t dma_bytes;		/* size of DMA area */
-	void *dma_private;		/* private DMA data for the memory allocator */
+
+	struct snd_dma_buffer *dma_buffer_p;	/* allocated buffer */
 
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 	/* -- OSS things -- */
@@ -851,7 +852,7 @@
 int snd_pcm_format_big_endian(snd_pcm_format_t format);
 int snd_pcm_format_width(snd_pcm_format_t format);			/* in bits */
 int snd_pcm_format_physical_width(snd_pcm_format_t format);		/* in bits */
-u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
+const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format);
 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames);
 snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
 ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
@@ -892,6 +893,22 @@
 
 int snd_pcm_limit_hw_rates(snd_pcm_runtime_t *runtime);
 
+static inline void snd_pcm_set_runtime_buffer(snd_pcm_substream_t *substream,
+					      struct snd_dma_buffer *bufp)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	if (bufp) {
+		runtime->dma_buffer_p = bufp;
+		runtime->dma_area = bufp->area;
+		runtime->dma_addr = bufp->addr;
+		runtime->dma_bytes = bufp->bytes;
+	} else {
+		runtime->dma_buffer_p = NULL;
+		runtime->dma_area = NULL;
+		runtime->dma_addr = 0;
+		runtime->dma_bytes = 0;
+	}
+}
 
 /*
  *  Timer interface
@@ -916,7 +933,7 @@
 int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size);
 int snd_pcm_lib_free_pages(snd_pcm_substream_t *substream);
 
-#define snd_pcm_substream_sgbuf(substream) ((substream)->runtime->dma_private)
+#define snd_pcm_substream_sgbuf(substream) ((substream)->runtime->dma_buffer_p->private_data)
 #define snd_pcm_sgbuf_pages(size) snd_sgbuf_aligned_pages(size)
 #define snd_pcm_sgbuf_get_addr(sgbuf,ofs) snd_sgbuf_get_addr(sgbuf,ofs)
 struct page *snd_pcm_sgbuf_ops_page(snd_pcm_substream_t *substream, unsigned long offset);
--- diff/include/sound/seq_kernel.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/sound/seq_kernel.h	2004-07-01 21:32:51.000000000 +0100
@@ -168,6 +168,9 @@
 int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf, int in_kernel, int size_aligned);
 int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t func, void *private_data);
 
+/* interface for OSS emulation */
+int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo);
+
 /* port callback routines */
 void snd_port_init_callback(snd_seq_port_callback_t *p);
 snd_seq_port_callback_t *snd_port_alloc_callback(void);
--- diff/include/sound/version.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/sound/version.h	2004-07-01 21:32:51.000000000 +0100
@@ -1,3 +1,3 @@
 /* include/version.h.  Generated by configure.  */
-#define CONFIG_SND_VERSION "1.0.4"
-#define CONFIG_SND_DATE " (Mon May 17 14:31:44 2004 UTC)"
+#define CONFIG_SND_VERSION "1.0.5"
+#define CONFIG_SND_DATE " (Sun May 30 10:49:40 2004 UTC)"
--- diff/include/sound/vx_core.h	2004-06-30 14:26:01.000000000 +0100
+++ source/include/sound/vx_core.h	2004-07-01 21:32:52.000000000 +0100
@@ -182,6 +182,7 @@
 	/* clock and audio sources */
 	unsigned int audio_source;	/* current audio input source */
 	unsigned int audio_source_target;
+	unsigned int clock_mode;	/* clock mode (VX_CLOCK_MODE_XXX) */
 	unsigned int clock_source;	/* current clock source (INTERNAL_QUARTZ or UER_SYNC) */
 	unsigned int freq;		/* current frequency */
 	unsigned int freq_detected;	/* detected frequency from digital in */
@@ -364,6 +365,13 @@
 	UER_SYNC
 };
 
+/* clock mode */
+enum {
+	VX_CLOCK_MODE_AUTO,	/* depending on the current audio source */
+	VX_CLOCK_MODE_INTERNAL,	/* fixed to internal quartz */
+	VX_CLOCK_MODE_EXTERNAL	/* fixed to UER sync */
+};
+
 /* SPDIF/UER type */
 enum {
 	VX_UER_MODE_CONSUMER,
--- diff/include/video/sisfb.h	2004-05-19 22:13:08.000000000 +0100
+++ source/include/video/sisfb.h	2004-07-01 21:32:52.000000000 +0100
@@ -38,7 +38,8 @@
 #define TV_AVIDEO               0x00000100
 #define TV_SVIDEO               0x00000200
 #define TV_SCART                0x00000400
-#define VB_CONEXANT		0x00000800
+#define VB_CONEXANT		0x00000800	/* 661 series only */
+#define VB_TRUMPION		VB_CONEXANT	/* 300 series only */
 #define TV_PALM                 0x00001000
 #define TV_PALN                 0x00002000
 #define TV_NTSCJ		0x00001000
@@ -86,204 +87,112 @@
 #define VB_DISPMODE_DUAL	VB_DUALVIEW_MODE
 #define VB_DISPLAY_MODE       	(SINGLE_MODE | MIRROR_MODE | DUALVIEW_MODE)
 
-/* *Never* change the order of the following enum */
-typedef enum _SIS_CHIP_TYPE {
-	SIS_VGALegacy = 0,	/* chip_id in sisfb_info */
-	SIS_300,
-	SIS_630,
-	SIS_540,
-	SIS_730,
-	SIS_315H,
-	SIS_315,
-	SIS_315PRO,
-	SIS_550,
-	SIS_650,
-	SIS_740,
-	SIS_330,
-	SIS_661,
-	SIS_741,
-	SIS_660,
-	SIS_760,
-	MAX_SIS_CHIP
-} SIS_CHIP_TYPE;
-
-/* Addtional IOCTLs for communication sisfb <> X driver                */
-/* If changing this, vgatypes.h must also be changed (for X driver)    */
-
-/* ioctl for identifying and giving some info (esp. memory heap start) */
-#define SISFB_GET_INFO	  	_IOR('n',0xF8,__u32)
-/* ioctrl to get current vertical retrace status */
-#define SISFB_GET_VBRSTATUS  	_IOR('n',0xF9,__u32)
-/* ioctl to enable/disable panning auto-maximize (like nomax parameter) */
-#define SISFB_GET_AUTOMAXIMIZE 	_IOR('n',0xFA,__u32)
-#define SISFB_SET_AUTOMAXIMIZE 	_IOW('n',0xFA,__u32)
-
-/* TW: Structure argument for SISFB_GET_INFO ioctl  */
+/* Structure argument for SISFB_GET_INFO ioctl  */
 typedef struct _SISFB_INFO sisfb_info, *psisfb_info;
 
 struct _SISFB_INFO {
-	unsigned long sisfb_id;         /* for identifying sisfb */
+	__u32   sisfb_id;         	/* for identifying sisfb */
 #ifndef SISFB_ID
 #define SISFB_ID	  0x53495346    /* Identify myself with 'SISF' */
 #endif
- 	int    chip_id;			/* PCI ID of detected chip */
-	int    memory;			/* video memory in KB which sisfb manages */
-	int    heapstart;               /* heap start (= sisfb "mem" argument) in KB */
-	unsigned char fbvidmode;	/* current sisfb mode */
+ 	__u32   chip_id;		/* PCI-ID of detected chip */
+	__u32   memory;			/* video memory in KB which sisfb manages */
+	__u32   heapstart;            	/* heap start (= sisfb "mem" argument) in KB */
+	__u8    fbvidmode;		/* current sisfb mode */
 
-	unsigned char sisfb_version;
-	unsigned char sisfb_revision;
-	unsigned char sisfb_patchlevel;
+	__u8    sisfb_version;
+	__u8    sisfb_revision;
+	__u8 	sisfb_patchlevel;
 
-	unsigned char sisfb_caps;	/* Sisfb capabilities */
+	__u8 	sisfb_caps;		/* sisfb capabilities */
 
-	int    sisfb_tqlen;		/* turbo queue length (in KB) */
+	__u32	sisfb_tqlen;		/* turbo queue length (in KB) */
 
-	unsigned int sisfb_pcibus;      /* The card's PCI ID */
-	unsigned int sisfb_pcislot;
-	unsigned int sisfb_pcifunc;
+	__u32 	sisfb_pcibus;      	/* The card's PCI ID */
+	__u32 	sisfb_pcislot;
+	__u32 	sisfb_pcifunc;
 
-	unsigned char sisfb_lcdpdc;	/* PanelDelayCompensation */
+	__u8 	sisfb_lcdpdc;		/* PanelDelayCompensation */
 
-	unsigned char sisfb_lcda;	/* Detected status of LCDA for low res/text modes */
+	__u8 	sisfb_lcda;		/* Detected status of LCDA for low res/text modes */
 
-	unsigned long sisfb_vbflags;
-	unsigned long sisfb_currentvbflags;
+	__u32 	sisfb_vbflags;
+	__u32 	sisfb_currentvbflags;
 
-	int sisfb_scalelcd;
-	unsigned long sisfb_specialtiming;
+	__u32 	sisfb_scalelcd;
+	__u32 	sisfb_specialtiming;
 
-	unsigned char sisfb_haveemi;
-	unsigned char sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
-	unsigned char sisfb_haveemilcd;
+	__u8 	sisfb_haveemi;
+	__u8 	sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
+	__u8 	sisfb_haveemilcd;
 
-	char reserved[213]; 		/* for future use */
-};
+	__u8 	sisfb_lcdpdca;		/* PanelDelayCompensation for LCD-via-CRT1 */
 
-/* For fb memory manager */
-struct sis_memreq {
-	unsigned long offset;
-	unsigned long size;
-};
+	__u16	sisfb_tvxpos, sisfb_tvypos;  /* Warning: Values + 32 ! */
 
-/* More or less deprecated stuff follows: */
-typedef enum _TVTYPE {
-	TVMODE_NTSC = 0,
-	TVMODE_PAL,
-	TVMODE_HIVISION,
-	TVMODE_TOTAL
-} SIS_TV_TYPE;
-
-typedef enum _TVPLUGTYPE {
-	TVPLUG_Legacy = 0,
-	TVPLUG_COMPOSITE,
-	TVPLUG_SVIDEO,
-	TVPLUG_SCART,
-	TVPLUG_TOTAL
-} SIS_TV_PLUG;
-
-struct mode_info {
-	int    bpp;
-	int    xres;
-	int    yres;
-	int    v_xres;		/* deprecated - use var instead */
-	int    v_yres;		/* deprecated - use var instead */
-	int    org_x;		/* deprecated - use var instead */
-	int    org_y;		/* deprecated - use var instead */
-	unsigned int  vrate;
+	__u8 	reserved[208]; 		/* for future use */
 };
 
-struct ap_data {
-	struct mode_info minfo;
-	unsigned long iobase;
-	unsigned int  mem_size;
-	unsigned long disp_state;  /* deprecated */
-	SIS_CHIP_TYPE chip;
-	unsigned char hasVB;
-	SIS_TV_TYPE TV_type;	   /* deprecated */
-	SIS_TV_PLUG TV_plug;	   /* deprecated */
-	unsigned long version;
-	unsigned long vbflags;	   /* replaces deprecated entries above */
-	unsigned long currentvbflags;
-	char reserved[248];
+/* Addtional IOCTLs for communication sisfb <> X driver                */
+/* If changing this, vgatypes.h must also be changed (for X driver)    */
+
+/* ioctl for identifying and giving some info (esp. memory heap start) */
+#define SISFB_GET_INFO_SIZE  	_IOR(0xF3,0x00,__u32)
+#define SISFB_GET_INFO	  	_IOR(0xF3,0x01,struct _SISFB_INFO)
+
+/* ioctrl to get current vertical retrace status */
+#define SISFB_GET_VBRSTATUS  	_IOR(0xF3,0x02,__u32)
+
+/* ioctl to enable/disable panning auto-maximize (like nomax parameter) */
+#define SISFB_GET_AUTOMAXIMIZE 	_IOR(0xF3,0x03,__u32)
+#define SISFB_SET_AUTOMAXIMIZE 	_IOW(0xF3,0x03,__u32)
+
+/* ioctls to relocate TV output (x=D[31:16], y=D[15:0], + 32)*/
+#define SISFB_GET_TVPOSOFFSET   _IOR(0xF3,0x04,__u32)
+#define SISFB_SET_TVPOSOFFSET   _IOW(0xF3,0x04,__u32)
+
+/* ioctl for locking sisfb (no register access during lock) */
+/* As of now, only used to avoid register access during
+ * the ioctls listed above.
+ */
+#define SISFB_SET_LOCK  	_IOW(0xF3,0x06,__u32)
+
+/* more to come soon */
+
+/* ioctls 0xF3 up to 0x3F reserved for sisfb */
+
+/****************************************************************/
+/* The following are deprecated and should not be used anymore: */
+/****************************************************************/
+/* ioctl for identifying and giving some info (esp. memory heap start) */
+#define SISFB_GET_INFO_OLD  	   _IOR('n',0xF8,__u32)
+/* ioctrl to get current vertical retrace status */
+#define SISFB_GET_VBRSTATUS_OLD	   _IOR('n',0xF9,__u32)
+/* ioctl to enable/disable panning auto-maximize (like nomax parameter) */
+#define SISFB_GET_AUTOMAXIMIZE_OLD _IOR('n',0xFA,__u32)
+#define SISFB_SET_AUTOMAXIMIZE_OLD _IOW('n',0xFA,__u32)
+/****************************************************************/
+/*               End of deprecated ioctl numbers                */
+/****************************************************************/
+
+/* For fb memory manager (FBIO_ALLOC, FBIO_FREE) */
+struct sis_memreq {
+	__u32 	offset;
+	__u32 	size;
 };
 
 /**********************************************/
 /*                  PRIVATE                   */
+/*         (for IN-KERNEL usage only)         */
 /**********************************************/
 
 #ifdef __KERNEL__
-#include <linux/spinlock.h>
-
-typedef enum _VGA_ENGINE {
-	UNKNOWN_VGA = 0,
-	SIS_300_VGA,
-	SIS_315_VGA,
-} VGA_ENGINE;
-
-struct video_info {
-	int           chip_id;
-	unsigned int  video_size;
-	unsigned long video_base;
-	char  *       video_vbase;
-	unsigned long mmio_base;
-	char  *       mmio_vbase;
-	unsigned long vga_base;
-	unsigned long mtrr;
-	unsigned long heapstart;
-
-	int    video_bpp;
-	int    video_cmap_len;
-	int    video_width;
-	int    video_height;
-	int    video_vwidth;			/* DEPRECATED - use var instead */
-	int    video_vheight;			/* DEPRECATED - use var instead */
-	int    org_x;				/* DEPRECATED - use var instead */
-	int    org_y;				/* DEPRECATED - use var instead */
-	int    video_linelength;
-	unsigned int refresh_rate;
-
-	unsigned long disp_state;		/* DEPRECATED */
-	unsigned char hasVB;			/* DEPRECATED */
-	unsigned char TV_type;			/* DEPRECATED */
-	unsigned char TV_plug;			/* DEPRECATED */
-
-	SIS_CHIP_TYPE chip;
-	unsigned char revision_id;
-
-        unsigned short DstColor;		/* For 2d acceleration */
-	unsigned long  SiS310_AccelDepth;
-	unsigned long  CommandReg;
-
-	spinlock_t     lockaccel;		/* Do not use outside of kernel! */
-
-        unsigned int   pcibus;
-	unsigned int   pcislot;
-	unsigned int   pcifunc;
-
-	int 	       accel;
-
-	unsigned short subsysvendor;
-	unsigned short subsysdevice;
-
-	unsigned long  vbflags;			/* Replacing deprecated stuff from above */
-	unsigned long  currentvbflags;
-
-	int    current_bpp;
-	int    current_width;
-	int    current_height;
-	int    current_htotal;
-	int    current_vtotal;
-	__u32  current_pixclock;
-	int    current_refresh_rate;
-
-	char reserved[200];
-};
-
-extern struct video_info ivideo;
+#define	UNKNOWN_VGA  0
+#define	SIS_300_VGA  1
+#define	SIS_315_VGA  2
 
 extern void sis_malloc(struct sis_memreq *req);
-extern void sis_free(unsigned long base);
-extern void sis_dispinfo(struct ap_data *rec);
+extern void sis_free(u32 base);
 #endif
+
 #endif
--- diff/init/Kconfig	2004-06-30 14:26:01.000000000 +0100
+++ source/init/Kconfig	2004-07-01 21:32:52.000000000 +0100
@@ -77,6 +77,7 @@
 
 config SYSVIPC
 	bool "System V IPC"
+	depends on MMU
 	---help---
 	  Inter Process Communication is a suite of library functions and
 	  system calls which let processes (running programs) synchronize and
@@ -121,6 +122,18 @@
 	  up to the user level program to do useful things with this
 	  information.  This is generally a good idea, so say Y.
 
+config BSD_PROCESS_ACCT_V3
+	bool "BSD Process Accounting version 3 file format"
+	depends on BSD_PROCESS_ACCT
+	default n
+	help
+	  If you say Y here, the process accounting information is written
+	  in a new file format that also logs the process IDs of each
+	  process and it's parent. Note that this file format is incompatible
+	  with previous v0/v1/v2 file formats, so you will need updated tools
+	  for processing it. A preliminary version of these tools is available
+	  at <http://http://www.de.kernel.org/pub/linux/utils/acct/>.
+
 config SYSCTL
 	bool "Sysctl support"
 	---help---
@@ -197,26 +210,20 @@
 	bool "Kernel .config support"
 	---help---
 	  This option enables the complete Linux kernel ".config" file
-	  contents, information on compiler used to build the kernel,
-	  kernel running when this kernel was built and kernel version
-	  from Makefile to be saved in the kernel. It provides documentation
+	  contents to be saved in the kernel. It provides documentation
 	  of which kernel options are used in a running kernel or in an
 	  on-disk kernel.  This information can be extracted from the kernel
 	  image file with the script scripts/extract-ikconfig and used as
 	  input to rebuild the current kernel or to build another kernel.
 	  It can also be extracted from a running kernel by reading
-	  /proc/config.gz and /proc/config_built_with, if enabled (below).
-	  /proc/config.gz will list the configuration that was used
-	  to build the kernel and /proc/config_built_with will list
-	  information on the compiler and host machine that was used to
-	  build the kernel.
+	  /proc/config.gz if enabled (below).
 
 config IKCONFIG_PROC
 	bool "Enable access to .config through /proc/config.gz"
 	depends on IKCONFIG && PROC_FS
 	---help---
-	  This option enables access to kernel configuration file and build
-	  information through /proc/config.gz.
+	  This option enables access to the kernel configuration file
+	  through /proc/config.gz.
 
 
 menuconfig EMBEDDED
@@ -246,6 +253,17 @@
 
 	   Say N.
 
+config KALLSYMS_EXTRA_PASS
+	bool "Do an extra kallsyms pass"
+	depends on KALLSYMS
+	help
+	   If kallsyms is not working correctly, the build will fail with
+	   inconsistent kallsyms data.  If that occurs, log a bug report and
+	   turn on KALLSYMS_EXTRA_PASS which should result in a stable build.
+	   Always say N here unless you find a bug in kallsyms, which must be
+	   reported.  KALLSYMS_EXTRA_PASS is only a temporary workaround while
+	   you wait for kallsyms to be fixed.
+
 config FUTEX
 	bool "Enable futex support" if EMBEDDED
 	default y
--- diff/init/main.c	2004-06-30 14:26:01.000000000 +0100
+++ source/init/main.c	2004-07-01 21:32:52.000000000 +0100
@@ -43,9 +43,11 @@
 #include <linux/efi.h>
 #include <linux/unistd.h>
 #include <linux/rmap.h>
+#include <linux/mempolicy.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
+#include <asm/setup.h>
 
 /*
  * This is one of the first .c files built. Error out early
@@ -110,6 +112,9 @@
 void (*late_time_init)(void);
 extern void softirq_init(void);
 
+/* Untouched command line (eg. for /proc) saved by arch-specific code. */
+char saved_command_line[COMMAND_LINE_SIZE];
+
 static char *execute_command;
 
 /* Setup configured maximum number of CPUs to activate */
@@ -156,8 +161,14 @@
 	do {
 		int n = strlen(p->str);
 		if (!strncmp(line, p->str, n)) {
-			if (!p->setup_func) {
-				printk(KERN_WARNING "Parameter %s is obsolete, ignored\n", p->str);
+			if (p->early) {
+				/* Already done in parse_early_param?  (Needs
+				 * exact match on param part) */
+				if (line[n] == '\0' || line[n] == '=')
+					return 1;
+			} else if (!p->setup_func) {
+				printk(KERN_WARNING "Parameter %s is obsolete,"
+				       " ignored\n", p->str);
 				return 1;
 			} else if (p->setup_func(line + n))
 				return 1;
@@ -268,6 +279,8 @@
 				panic_later = "Too many boot env vars at `%s'";
 				panic_param = param;
 			}
+			if (!strncmp(param, envp_init[i], val - param))
+				break;
 		}
 		envp_init[i] = param;
 	} else {
@@ -385,10 +398,43 @@
 static void noinline rest_init(void)
 {
 	kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND);
+	numa_default_policy();
 	unlock_kernel();
  	cpu_idle();
 } 
 
+/* Check for early params. */
+static int __init do_early_param(char *param, char *val)
+{
+	struct obs_kernel_param *p;
+	extern struct obs_kernel_param __setup_start, __setup_end;
+
+	for (p = &__setup_start; p < &__setup_end; p++) {
+		if (p->early && strcmp(param, p->str) == 0) {
+			if (p->setup_func(val) != 0)
+				printk(KERN_WARNING
+				       "Malformed early option '%s'\n", param);
+		}
+	}
+	/* We accept everything at this stage. */
+	return 0;
+}
+
+/* Arch code calls this early on, or if not, just before other parsing. */
+void __init parse_early_param(void)
+{
+	static __initdata int done = 0;
+	static __initdata char tmp_cmdline[COMMAND_LINE_SIZE];
+
+	if (done)
+		return;
+
+	/* All fall through to do_early_param. */
+	strlcpy(tmp_cmdline, saved_command_line, COMMAND_LINE_SIZE);
+	parse_args("early options", tmp_cmdline, NULL, 0, do_early_param);
+	done = 1;
+}
+
 /*
  *	Activate the first processor.
  */
@@ -396,7 +442,6 @@
 asmlinkage void __init start_kernel(void)
 {
 	char * command_line;
-	extern char saved_command_line[];
 	extern struct kernel_param __start___param[], __stop___param[];
 /*
  * Interrupts are still disabled. Do necessary setups, then
@@ -421,14 +466,23 @@
 	 */
 	sched_init();
 
+	/*
+	 * Make us the idle thread. Technically, schedule() should not be
+	 * called from this thread, however somewhere below it might be,
+	 * but because we are the idle thread, we just pick up running again
+	 * when this runqueue becomes "idle".
+	 */
+	init_idle(current, smp_processor_id());
+
 	build_all_zonelists();
 	page_alloc_init();
+	trap_init();
 	printk("Kernel command line: %s\n", saved_command_line);
+	parse_early_param();
 	parse_args("Booting kernel", command_line, __start___param,
 		   __stop___param - __start___param,
 		   &unknown_bootoption);
 	sort_main_extable();
-	trap_init();
 	rcu_init();
 	init_IRQ();
 	pidhash_init();
@@ -454,8 +508,10 @@
 		initrd_start = 0;
 	}
 #endif
+	vfs_caches_init_early();
 	mem_init();
 	kmem_cache_init();
+	numa_policy_init();
 	if (late_time_init)
 		late_time_init();
 	calibrate_delay();
@@ -482,13 +538,6 @@
 #endif
 	check_bugs();
 
-	/* 
-	 *	We count on the initial thread going ok 
-	 *	Like idlers init is an unlocked kernel thread, which will
-	 *	make syscalls (and thus be locked).
-	 */
-	init_idle(current, smp_processor_id());
-
 	/* Do the rest non-__init'ed, we're now alive */
 	rest_init();
 }
@@ -645,6 +694,7 @@
 	free_initmem();
 	unlock_kernel();
 	system_state = SYSTEM_RUNNING;
+	numa_default_policy();
 
 	if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
 		printk("Warning: unable to open an initial console.\n");
@@ -669,3 +719,16 @@
 
 	panic("No init found.  Try passing init= option to kernel.");
 }
+
+static int early_param_test(char *rest)
+{
+	printk("early_parm_test: %s\n", rest ?: "(null)");
+	return rest ? 0 : -EINVAL;
+}
+early_param("testsetup", early_param_test);
+static int early_setup_test(char *rest)
+{
+	printk("early_setup_test: %s\n", rest ?: "(null)");
+	return 0;
+}
+__setup("testsetup_long", early_setup_test);
--- diff/ipc/mqueue.c	2004-06-30 14:26:01.000000000 +0100
+++ source/ipc/mqueue.c	2004-07-01 21:32:52.000000000 +0100
@@ -43,10 +43,10 @@
 #define CTL_MSGSIZEMAX 	4
 
 /* default values */
-#define DFLT_QUEUESMAX	64	/* max number of message queues */
-#define DFLT_MSGMAX 	40	/* max number of messages in each queue */
+#define DFLT_QUEUESMAX	256	/* max number of message queues */
+#define DFLT_MSGMAX 	10	/* max number of messages in each queue */
 #define HARD_MSGMAX 	(131072/sizeof(void*))
-#define DFLT_MSGSIZEMAX 16384	/* max message size */
+#define DFLT_MSGSIZEMAX 8192	/* max message size */
 
 #define NOTIFY_COOKIE_LEN	32
 
@@ -67,6 +67,7 @@
 
 	struct sigevent notify;
 	pid_t notify_owner;
+ 	struct user_struct *user;	/* user who created, for accouting */
 	struct sock *notify_sock;
 	struct sk_buff *notify_cookie;
 
@@ -114,6 +115,9 @@
 
 		if (S_ISREG(mode)) {
 			struct mqueue_inode_info *info;
+			struct task_struct *p = current;
+			struct user_struct *u = p->user;
+			unsigned long mq_bytes, mq_msg_tblsz;
 
 			inode->i_fop = &mqueue_file_operations;
 			inode->i_size = FILENT_SIZE;
@@ -123,8 +127,10 @@
 			init_waitqueue_head(&info->wait_q);
 			INIT_LIST_HEAD(&info->e_wait_q[0].list);
 			INIT_LIST_HEAD(&info->e_wait_q[1].list);
+			info->messages = NULL;
 			info->notify_owner = 0;
 			info->qsize = 0;
+			info->user = NULL;	/* set when all is ok */
 			memset(&info->attr, 0, sizeof(info->attr));
 			info->attr.mq_maxmsg = DFLT_MSGMAX;
 			info->attr.mq_msgsize = DFLT_MSGSIZEMAX;
@@ -132,12 +138,29 @@
 				info->attr.mq_maxmsg = attr->mq_maxmsg;
 				info->attr.mq_msgsize = attr->mq_msgsize;
 			}
-			info->messages = kmalloc(info->attr.mq_maxmsg * sizeof(struct msg_msg *), GFP_KERNEL);
+			mq_msg_tblsz = info->attr.mq_maxmsg * sizeof(struct msg_msg *);
+			mq_bytes = (mq_msg_tblsz +
+				(info->attr.mq_maxmsg * info->attr.mq_msgsize));
+
+			spin_lock(&mq_lock);
+			if (u->mq_bytes + mq_bytes < u->mq_bytes ||
+		 	    u->mq_bytes + mq_bytes >
+			    p->rlim[RLIMIT_MSGQUEUE].rlim_cur) {
+				spin_unlock(&mq_lock);
+				goto out_inode;
+			}
+			u->mq_bytes += mq_bytes;
+			spin_unlock(&mq_lock);
+
+			info->messages = kmalloc(mq_msg_tblsz, GFP_KERNEL);
 			if (!info->messages) {
-				make_bad_inode(inode);
-				iput(inode);
-				inode = NULL;
+				spin_lock(&mq_lock);
+				u->mq_bytes -= mq_bytes;
+				spin_unlock(&mq_lock);
+				goto out_inode;
 			}
+			/* all is ok */
+			info->user = get_uid(u);
 		} else if (S_ISDIR(mode)) {
 			inode->i_nlink++;
 			/* Some things misbehave if size == 0 on a directory */
@@ -147,6 +170,10 @@
 		}
 	}
 	return inode;
+out_inode:
+	make_bad_inode(inode);
+	iput(inode);
+	return NULL;
 }
 
 static int mqueue_fill_super(struct super_block *sb, void *data, int silent)
@@ -205,6 +232,8 @@
 static void mqueue_delete_inode(struct inode *inode)
 {
 	struct mqueue_inode_info *info;
+	struct user_struct *user;
+	unsigned long mq_bytes;
 	int i;
 
 	if (S_ISDIR(inode->i_mode)) {
@@ -220,10 +249,15 @@
 
 	clear_inode(inode);
 
-	if (info->messages) {
+	mq_bytes = (info->attr.mq_maxmsg * sizeof(struct msg_msg *) +
+		   (info->attr.mq_maxmsg * info->attr.mq_msgsize));
+	user = info->user;
+	if (user) {
 		spin_lock(&mq_lock);
+		user->mq_bytes -= mq_bytes;
 		queues_count--;
 		spin_unlock(&mq_lock);
+		free_uid(user);
 	}
 }
 
@@ -534,6 +568,28 @@
 	info->notify_owner = 0;
 }
 
+static int mq_attr_ok(struct mq_attr *attr)
+{
+	if (attr->mq_maxmsg <= 0 || attr->mq_msgsize <= 0)
+		return 0;
+	if (capable(CAP_SYS_RESOURCE)) {
+		if (attr->mq_maxmsg > HARD_MSGMAX)
+			return 0;
+	} else {
+		if (attr->mq_maxmsg > msg_max ||
+				attr->mq_msgsize > msgsize_max)
+			return 0;
+	}
+	/* check for overflow */
+	if (attr->mq_msgsize > ULONG_MAX/attr->mq_maxmsg)
+		return 0;
+	if ((unsigned long)(attr->mq_maxmsg * attr->mq_msgsize) +
+	    (attr->mq_maxmsg * sizeof (struct msg_msg *)) <
+	    (unsigned long)(attr->mq_maxmsg * attr->mq_msgsize))
+		return 0;
+	return 1;
+}
+
 /*
  * Invoked when creating a new queue via sys_mq_open
  */
@@ -547,17 +603,8 @@
 	if (u_attr != NULL) {
 		if (copy_from_user(&attr, u_attr, sizeof(attr)))
 			return ERR_PTR(-EFAULT);
-
-		if (attr.mq_maxmsg <= 0 || attr.mq_msgsize <= 0)
+		if (!mq_attr_ok(&attr))
 			return ERR_PTR(-EINVAL);
-		if (capable(CAP_SYS_RESOURCE)) {
-			if (attr.mq_maxmsg > HARD_MSGMAX)
-				return ERR_PTR(-EINVAL);
-		} else {
-			if (attr.mq_maxmsg > msg_max ||
-					attr.mq_msgsize > msgsize_max)
-				return ERR_PTR(-EINVAL);
-		}
 		/* store for use during create */
 		dentry->d_fsdata = &attr;
 	}
--- diff/ipc/util.c	2004-06-30 14:26:02.000000000 +0100
+++ source/ipc/util.c	2004-07-01 21:32:52.000000000 +0100
@@ -333,25 +333,40 @@
  * Since RCU callback function is called in bh,
  * we need to defer the vfree to schedule_work
  */
-static void ipc_schedule_free(void* arg)
+static void ipc_schedule_free(struct rcu_head *head)
 {
-	struct ipc_rcu_vmalloc *free = arg;
+	struct ipc_rcu_vmalloc *free =
+		container_of(head, struct ipc_rcu_vmalloc, rcu);
 
 	INIT_WORK(&free->work, vfree, free);
 	schedule_work(&free->work);
 }
 
+/**
+ *	ipc_immediate_free	- free ipc + rcu space
+ *
+ *	Free from the RCU callback context
+ *
+ */
+static void ipc_immediate_free(struct rcu_head *head)
+{
+	struct ipc_rcu_kmalloc *free =
+		container_of(head, struct ipc_rcu_kmalloc, rcu);
+	kfree(free);
+}
+
+
+
 void ipc_rcu_free(void* ptr, int size)
 {
 	if (rcu_use_vmalloc(size)) {
 		struct ipc_rcu_vmalloc *free;
 		free = ptr - sizeof(*free);
-		call_rcu(&free->rcu, ipc_schedule_free, free);
+		call_rcu(&free->rcu, ipc_schedule_free);
 	} else {
 		struct ipc_rcu_kmalloc *free;
 		free = ptr - sizeof(*free);
-		/* kfree takes a "const void *" so gcc warns.  So we cast. */
-		call_rcu(&free->rcu, (void (*)(void *))kfree, free);
+		call_rcu(&free->rcu, ipc_immediate_free);
 	}
 
 }
--- diff/kernel/Makefile	2004-05-19 22:13:09.000000000 +0100
+++ source/kernel/Makefile	2004-07-01 21:32:52.000000000 +0100
@@ -12,6 +12,7 @@
 obj-$(CONFIG_FUTEX) += futex.o
 obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
 obj-$(CONFIG_SMP) += cpu.o
+obj-$(CONFIG_LOCKMETER) += lockmeter.o
 obj-$(CONFIG_UID16) += uid16.o
 obj-$(CONFIG_MODULES) += module.o
 obj-$(CONFIG_KALLSYMS) += kallsyms.o
@@ -33,23 +34,7 @@
 CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer
 endif
 
-# configs.o uses generated files - dependecies must be listed explicitly
-$(obj)/configs.o: $(obj)/ikconfig.h
-
-ifdef CONFIG_IKCONFIG_PROC
 $(obj)/configs.o: $(obj)/config_data.h
-endif
-
-# ikconfig.h contains all the selected config entries - generated
-# from top-level Makefile and .config. Info from ikconfig.h can
-# be extracted from the kernel binary.
-
-quiet_cmd_ikconfig = IKCFG   $@
-      cmd_ikconfig = $(CONFIG_SHELL) $< .config $(srctree)/Makefile > $@
-
-targets += ikconfig.h
-$(obj)/ikconfig.h: scripts/mkconfigs .config Makefile FORCE
-	$(call if_changed,ikconfig)
 
 # config_data.h contains the same information as ikconfig.h but gzipped.
 # Info from config_data can be extracted from /proc/config*
@@ -58,7 +43,7 @@
 	$(call if_changed,gzip)
 
 quiet_cmd_ikconfiggz = IKCFG   $@
-      cmd_ikconfiggz = cat $< | scripts/bin2c kernel_config_data > $@
+      cmd_ikconfiggz = (echo "const char kernel_config_data[] = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@
 targets += config_data.h
 $(obj)/config_data.h: $(obj)/config_data.gz FORCE
 	$(call if_changed,ikconfiggz)
--- diff/kernel/acct.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/acct.c	2004-07-01 21:32:52.000000000 +0100
@@ -302,6 +302,69 @@
 	return exp;
 }
 
+#if ACCT_VERSION==1 || ACCT_VERSION==2
+/*
+ * encode an u64 into a comp2_t (24 bits)
+ *
+ * Format: 5 bit base 2 exponent, 20 bits mantissa.
+ * The leading bit of the mantissa is not stored, but implied for
+ * non-zero exponents.
+ * Largest encodable value is 50 bits.
+ */
+
+#define MANTSIZE2       20                      /* 20 bit mantissa. */
+#define EXPSIZE2        5                       /* 5 bit base 2 exponent. */
+#define MAXFRACT2       ((1ul << MANTSIZE2) - 1) /* Maximum fractional value. */
+#define MAXEXP2         ((1 <<EXPSIZE2) - 1)    /* Maximum exponent. */
+
+static comp2_t encode_comp2_t(u64 value)
+{
+        int exp, rnd;
+
+        exp = (value > (MAXFRACT2>>1));
+        rnd = 0;
+        while (value > MAXFRACT2) {
+                rnd = value & 1;
+                value >>= 1;
+                exp++;
+        }
+
+        /*
+         * If we need to round up, do it (and handle overflow correctly).
+         */
+        if (rnd && (++value > MAXFRACT2)) {
+                value >>= 1;
+                exp++;
+        }
+
+        if (exp > MAXEXP2) {
+                /* Overflow. Return largest representable number instead. */
+                return (1ul << (MANTSIZE2+EXPSIZE2-1)) - 1;
+        } else {
+                return (value & (MAXFRACT2>>1)) | (exp << (MANTSIZE2-1));
+        }
+}
+#endif
+
+#if ACCT_VERSION==3
+/*
+ * encode an u64 into a 32 bit IEEE float
+ */
+static u32 encode_float(u64 value)
+{
+	unsigned exp = 190;
+	unsigned u;
+
+	if (value==0) return 0;
+	while ((s64)value > 0){
+		value <<= 1;
+		exp--;
+	}
+	u = (u32)(value >> 40) & 0x7fffffu;
+	return u | (exp << 23);
+}
+#endif
+
 /*
  *  Write an accounting entry for an exiting process
  *
@@ -316,7 +379,7 @@
  */
 static void do_acct_process(long exitcode, struct file *file)
 {
-	struct acct ac;
+	acct_t ac;
 	mm_segment_t fs;
 	unsigned long vsize;
 	unsigned long flim;
@@ -333,27 +396,53 @@
 	 * Fill the accounting struct with the needed info as recorded
 	 * by the different kernel functions.
 	 */
-	memset((caddr_t)&ac, 0, sizeof(struct acct));
+	memset((caddr_t)&ac, 0, sizeof(acct_t));
 
+	ac.ac_version = ACCT_VERSION;
 	strlcpy(ac.ac_comm, current->comm, sizeof(ac.ac_comm));
 
-	elapsed = jiffies_64_to_clock_t(get_jiffies_64() - current->start_time);
+	elapsed = jiffies_64_to_AHZ(get_jiffies_64() - current->start_time);
+#if ACCT_VERSION==3
+	ac.ac_etime = encode_float(elapsed);
+#else
 	ac.ac_etime = encode_comp_t(elapsed < (unsigned long) -1l ?
 	                       (unsigned long) elapsed : (unsigned long) -1l);
-	do_div(elapsed, USER_HZ);
+#endif
+#if ACCT_VERSION==1 || ACCT_VERSION==2
+	{
+		/* new enlarged etime field */
+		comp2_t etime = encode_comp2_t(elapsed);
+		ac.ac_etime_hi = etime >> 16;
+		ac.ac_etime_lo = (u16) etime;
+	}
+#endif
+	do_div(elapsed, AHZ);
 	ac.ac_btime = xtime.tv_sec - elapsed;
-	ac.ac_utime = encode_comp_t(jiffies_to_clock_t(current->utime));
-	ac.ac_stime = encode_comp_t(jiffies_to_clock_t(current->stime));
+	ac.ac_utime = encode_comp_t(jiffies_to_AHZ(current->utime));
+	ac.ac_stime = encode_comp_t(jiffies_to_AHZ(current->stime));
 	/* we really need to bite the bullet and change layout */
 	ac.ac_uid = current->uid;
 	ac.ac_gid = current->gid;
+#if ACCT_VERSION==2
+	ac.ac_ahz = AHZ;
+#endif
+#if ACCT_VERSION==1 || ACCT_VERSION==2
+	/* backward-compatible 16 bit fields */
+	ac.ac_uid16 = current->uid;
+	ac.ac_gid16 = current->gid;
+#endif
+#if ACCT_VERSION==3
+	ac.ac_pid = current->pid;
+	ac.ac_ppid = current->parent->pid;
+#endif
 
 	read_lock(&tasklist_lock);	/* pin current->signal */
 	ac.ac_tty = current->signal->tty ?
 		old_encode_dev(tty_devnum(current->signal->tty)) : 0;
 	read_unlock(&tasklist_lock);
 
-	ac.ac_flag = 0;
+	/* ABYTESEX is always set to allow byte order detection */
+	ac.ac_flag = ABYTESEX;
 	if (current->flags & PF_FORKNOEXEC)
 		ac.ac_flag |= AFORK;
 	if (current->flags & PF_SUPERPRIV)
@@ -395,7 +484,7 @@
 	flim = current->rlim[RLIMIT_FSIZE].rlim_cur;
 	current->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
 	file->f_op->write(file, (char *)&ac,
-			       sizeof(struct acct), &file->f_pos);
+			       sizeof(acct_t), &file->f_pos);
 	current->rlim[RLIMIT_FSIZE].rlim_cur = flim;
 	set_fs(fs);
 }
--- diff/kernel/auditsc.c	2004-05-19 22:13:09.000000000 +0100
+++ source/kernel/auditsc.c	2004-07-01 21:32:52.000000000 +0100
@@ -177,9 +177,10 @@
 	return 0;
 }
 
-static void audit_free_rule(void *arg)
+static void audit_free_rule(struct rcu_head *head)
 {
-	kfree(arg);
+	struct audit_entry *e = container_of(head, struct audit_entry, rcu);
+	kfree(e);
 }
 
 /* Note that audit_add_rule and audit_del_rule are called via
@@ -195,7 +196,7 @@
 	list_for_each_entry(e, list, list) {
 		if (!audit_compare_rule(rule, &e->rule)) {
 			list_del_rcu(&e->list);
-			call_rcu(&e->rcu, audit_free_rule, e);
+			call_rcu(&e->rcu, audit_free_rule);
 			return 0;
 		}
 	}
--- diff/kernel/configs.c	2004-05-19 22:13:09.000000000 +0100
+++ source/kernel/configs.c	2004-07-01 21:32:52.000000000 +0100
@@ -34,13 +34,26 @@
 /**************************************************/
 /* the actual current config file                 */
 
-/* This one is for extraction from the kernel binary file image. */
-#include "ikconfig.h"
+/*
+ * Define kernel_config_data and kernel_config_data_size, which contains the
+ * wrapped and compressed configuration file.  The file is first compressed
+ * with gzip and then bounded by two eight byte magic numbers to allow
+ * extraction from a binary kernel image:
+ *
+ *   IKCFG_ST
+ *   <image>
+ *   IKCFG_ED
+ */
+#define MAGIC_START	"IKCFG_ST"
+#define MAGIC_END	"IKCFG_ED"
+#include "config_data.h"
 
-#ifdef CONFIG_IKCONFIG_PROC
 
-/* This is the data that can be read from /proc/config.gz. */
-#include "config_data.h"
+#define MAGIC_SIZE (sizeof(MAGIC_START) - 1)
+#define kernel_config_data_size \
+	(sizeof(kernel_config_data) - 1 - MAGIC_SIZE * 2)
+
+#ifdef CONFIG_IKCONFIG_PROC
 
 /**************************************************/
 /* globals and useful constants                   */
@@ -58,7 +71,7 @@
 		return 0;
 
 	count = min(len, (size_t)(kernel_config_data_size - pos));
-	if(copy_to_user(buf, kernel_config_data + pos, count))
+	if (copy_to_user(buf, kernel_config_data + MAGIC_SIZE + pos, count))
 		return -EFAULT;
 
 	*offset += count;
--- diff/kernel/cpu.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/cpu.c	2004-07-01 21:32:52.000000000 +0100
@@ -20,14 +20,6 @@
 DECLARE_MUTEX(cpucontrol);
 
 static struct notifier_block *cpu_chain;
-/*
- * Represents all cpu's present in the system
- * In systems capable of hotplug, this map could dynamically grow
- * as new cpu's are detected in the system via any platform specific
- * method, such as ACPI for e.g.
- */
-cpumask_t	cpu_present_map;
-EXPORT_SYMBOL(cpu_present_map);
 
 /* Need to know about CPUs going up/down? */
 int register_cpu_notifier(struct notifier_block *nb)
--- diff/kernel/exit.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/exit.c	2004-07-01 21:32:52.000000000 +0100
@@ -834,10 +834,10 @@
 	do_exit((error_code&0xff)<<8);
 }
 
-task_t fastcall *next_thread(task_t *p)
+task_t fastcall *next_thread(const task_t *p)
 {
-	struct pid_link *link = p->pids + PIDTYPE_TGID;
-	struct list_head *tmp, *head = &link->pidptr->task_list;
+	const struct pid_link *link = p->pids + PIDTYPE_TGID;
+	const struct list_head *tmp, *head = &link->pidptr->task_list;
 
 #ifdef CONFIG_SMP
 	if (!p->sighand)
--- diff/kernel/extable.c	2004-05-19 22:13:09.000000000 +0100
+++ source/kernel/extable.c	2004-07-01 21:32:52.000000000 +0100
@@ -40,7 +40,7 @@
 	return e;
 }
 
-int kernel_text_address(unsigned long addr)
+static int core_kernel_text(unsigned long addr)
 {
 	if (addr >= (unsigned long)_stext &&
 	    addr <= (unsigned long)_etext)
@@ -49,6 +49,19 @@
 	if (addr >= (unsigned long)_sinittext &&
 	    addr <= (unsigned long)_einittext)
 		return 1;
+	return 0;
+}
 
+int __kernel_text_address(unsigned long addr)
+{
+	if (core_kernel_text(addr))
+		return 1;
+	return __module_text_address(addr) != NULL;
+}
+
+int kernel_text_address(unsigned long addr)
+{
+	if (core_kernel_text(addr))
+		return 1;
 	return module_text_address(addr) != NULL;
 }
--- diff/kernel/fork.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/fork.c	2004-07-01 21:32:52.000000000 +0100
@@ -279,7 +279,7 @@
 	mm->locked_vm = 0;
 	mm->mmap = NULL;
 	mm->mmap_cache = NULL;
-	mm->free_area_cache = TASK_UNMAPPED_BASE;
+	mm->free_area_cache = oldmm->mmap_base;
 	mm->map_count = 0;
 	mm->rss = 0;
 	cpus_clear(mm->cpu_vm_mask);
@@ -892,6 +892,16 @@
 	if ((clone_flags & CLONE_SIGHAND) && !(clone_flags & CLONE_VM))
 		return ERR_PTR(-EINVAL);
 
+	/*
+	 * The newly dup'ed task shares the same cpus_allowed mask as its
+	 * parent (ie. current), and it is not attached to the tasklist.
+	 * The end result is that this CPU might go down and the parent
+	 * be migrated away, leaving the task on a dead CPU. So take the
+	 * hotplug lock here and release it after the child has been attached
+	 * to the tasklist.
+	 */
+	lock_cpu_hotplug();
+
 	retval = security_task_create(clone_flags);
 	if (retval)
 		goto fork_out;
@@ -1020,7 +1030,7 @@
 	p->pdeath_signal = 0;
 
 	/* Perform scheduler related setup */
-	sched_fork(p);
+	sched_fork(p, clone_flags);
 
 	/*
 	 * Ok, make it visible to the rest of the system.
@@ -1098,6 +1108,7 @@
 	retval = 0;
 
 fork_out:
+	unlock_cpu_hotplug();
 	if (retval)
 		return ERR_PTR(retval);
 	return p;
@@ -1204,31 +1215,10 @@
 			set_tsk_thread_flag(p, TIF_SIGPENDING);
 		}
 
-		if (!(clone_flags & CLONE_STOPPED)) {
-			/*
-			 * Do the wakeup last. On SMP we treat fork() and
-			 * CLONE_VM separately, because fork() has already
-			 * created cache footprint on this CPU (due to
-			 * copying the pagetables), hence migration would
-			 * probably be costy. Threads on the other hand
-			 * have less traction to the current CPU, and if
-			 * there's an imbalance then the scheduler can
-			 * migrate this fresh thread now, before it
-			 * accumulates a larger cache footprint:
-			 */
-			if (clone_flags & CLONE_VM)
-				wake_up_forked_thread(p);
-			else
-				wake_up_forked_process(p);
-		} else {
-			int cpu = get_cpu();
-
+		if (!(clone_flags & CLONE_STOPPED))
+			wake_up_new_process(p, clone_flags);
+		else
 			p->state = TASK_STOPPED;
-			if (cpu_is_offline(task_cpu(p)))
-				set_task_cpu(p, cpu);
-
-			put_cpu();
-		}
 		++total_forks;
 
 		if (unlikely (trace)) {
@@ -1240,12 +1230,7 @@
 			wait_for_completion(&vfork);
 			if (unlikely (current->ptrace & PT_TRACE_VFORK_DONE))
 				ptrace_notify ((PTRACE_EVENT_VFORK_DONE << 8) | SIGTRAP);
-		} else
-			/*
-			 * Let the child process run first, to avoid most of the
-			 * COW overhead when the child exec()s afterwards.
-			 */
-			set_need_resched();
+		}
 	}
 	return pid;
 }
--- diff/kernel/kallsyms.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/kallsyms.c	2004-07-01 21:32:52.000000000 +0100
@@ -320,5 +320,4 @@
 }
 __initcall(kallsyms_init);
 
-EXPORT_SYMBOL(kallsyms_lookup);
 EXPORT_SYMBOL(__print_symbol);
--- diff/kernel/kmod.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/kmod.c	2004-07-01 21:32:52.000000000 +0100
@@ -154,7 +154,6 @@
 {
 	struct subprocess_info *sub_info = data;
 	int retval;
-	cpumask_t mask = CPU_MASK_ALL;
 
 	/* Unblock all signals. */
 	flush_signals(current);
@@ -165,7 +164,7 @@
 	spin_unlock_irq(&current->sighand->siglock);
 
 	/* We can run anywhere, unlike our parent keventd(). */
-	set_cpus_allowed(current, mask);
+	set_cpus_allowed(current, CPU_MASK_ALL);
 
 	retval = -EPERM;
 	if (current->fs->root)
--- diff/kernel/kthread.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/kthread.c	2004-07-01 21:32:52.000000000 +0100
@@ -65,7 +65,6 @@
 	void *data;
 	sigset_t blocked;
 	int ret = -EINTR;
-	cpumask_t mask = CPU_MASK_ALL;
 
 	kthread_exit_files();
 
@@ -79,7 +78,7 @@
 	flush_signals(current);
 
 	/* By default we can run anywhere, unlike keventd. */
-	set_cpus_allowed(current, mask);
+	set_cpus_allowed(current, CPU_MASK_ALL);
 
 	/* OK, tell user we're spawned, wait for stop or wakeup */
 	__set_current_state(TASK_INTERRUPTIBLE);
--- diff/kernel/module.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/module.c	2004-07-01 21:32:52.000000000 +0100
@@ -36,7 +36,6 @@
 #include <linux/stop_machine.h>
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
-#include <asm/pgalloc.h>
 #include <asm/cacheflush.h>
 
 #if 0
@@ -717,7 +716,7 @@
 }
 
 asmlinkage long
-sys_delete_module(const char *name_user, unsigned int flags)
+sys_delete_module(const char __user *name_user, unsigned int flags)
 {
 	return -ENOSYS;
 }
@@ -981,6 +980,104 @@
 	return ret;
 }
 
+
+/*
+ * /sys/module/foo/sections stuff
+ * J. Corbet <corbet@lwn.net>
+ */
+#ifdef CONFIG_KALLSYMS
+static void module_sect_attrs_release(struct kobject *kobj)
+{
+	kfree(container_of(kobj, struct module_sections, kobj));
+}
+
+static ssize_t module_sect_show(struct kobject *kobj, struct attribute *attr,
+		char *buf)
+{
+	struct module_sect_attr *sattr =
+		container_of(attr, struct module_sect_attr, attr);
+	return sprintf(buf, "0x%lx\n", sattr->address);
+}
+
+static struct sysfs_ops module_sect_ops = {
+	.show = module_sect_show,
+};
+
+static struct kobj_type module_sect_ktype = {
+	.sysfs_ops = &module_sect_ops,
+	.release =   module_sect_attrs_release,
+};
+
+static void add_sect_attrs(struct module *mod, unsigned int nsect,
+		char *secstrings, Elf_Shdr *sechdrs)
+{
+	unsigned int nloaded = 0, i;
+	struct module_sect_attr *sattr;
+	
+	if (!mod->mkobj)
+		return;
+	
+	/* Count loaded sections and allocate structures */
+	for (i = 0; i < nsect; i++)
+		if (sechdrs[i].sh_flags & SHF_ALLOC)
+			nloaded++;
+	mod->sect_attrs = kmalloc(sizeof(struct module_sections) +
+			nloaded*sizeof(mod->sect_attrs->attrs[0]), GFP_KERNEL);
+	if (! mod->sect_attrs)
+		return;
+
+	/* sections entry setup */
+	memset(mod->sect_attrs, 0, sizeof(struct module_sections));
+	if (kobject_set_name(&mod->sect_attrs->kobj, "sections"))
+		goto out;
+	mod->sect_attrs->kobj.parent = &mod->mkobj->kobj;
+	mod->sect_attrs->kobj.ktype = &module_sect_ktype;
+	if (kobject_register(&mod->sect_attrs->kobj))
+		goto out;
+
+	/* And the section attributes. */
+	sattr = &mod->sect_attrs->attrs[0];
+	for (i = 0; i < nsect; i++) {
+		if (! (sechdrs[i].sh_flags & SHF_ALLOC))
+			continue;
+		sattr->address = sechdrs[i].sh_addr;
+		strlcpy(sattr->name, secstrings + sechdrs[i].sh_name,
+				MODULE_SECT_NAME_LEN);
+		sattr->attr.name = sattr->name;
+		sattr->attr.owner = mod;
+		sattr->attr.mode = S_IRUGO;
+		(void) sysfs_create_file(&mod->sect_attrs->kobj, &sattr->attr);
+		sattr++;
+	}
+	return;
+  out:
+	kfree(mod->sect_attrs);
+	mod->sect_attrs = NULL;
+}
+
+static void remove_sect_attrs(struct module *mod)
+{
+	if (mod->sect_attrs) {
+		kobject_unregister(&mod->sect_attrs->kobj);
+		mod->sect_attrs = NULL;
+	}
+}
+
+
+#else
+static inline void add_sect_attrs(struct module *mod, unsigned int nsect,
+		char *sectstrings, Elf_Shdr *sechdrs)
+{
+}
+
+static inline void remove_sect_attrs(struct module *mod)
+{
+}
+#endif /* CONFIG_KALLSYMS */
+
+
+
+
 #define to_module_attr(n) container_of(n, struct module_attribute, attr);
 
 static ssize_t module_attr_show(struct kobject *kobj,
@@ -1099,6 +1196,7 @@
 	list_del(&mod->list);
 	spin_unlock_irq(&modlist_lock);
 
+	remove_sect_attrs(mod);
 	mod_kobject_remove(mod);
 
 	/* Arch-specific cleanup. */
@@ -1712,6 +1810,7 @@
 			      / sizeof(struct kernel_param));
 	if (err < 0)
 		goto arch_cleanup;
+	add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
 
 	/* Get rid of temporary copy */
 	vfree(hdr);
@@ -2029,7 +2128,7 @@
 }
 
 /* Is this a valid kernel address?  We don't grab the lock: we are oopsing. */
-struct module *module_text_address(unsigned long addr)
+struct module *__module_text_address(unsigned long addr)
 {
 	struct module *mod;
 
@@ -2040,6 +2139,18 @@
 	return NULL;
 }
 
+struct module *module_text_address(unsigned long addr)
+{
+	struct module *mod;
+	unsigned long flags;
+
+	spin_lock_irqsave(&modlist_lock, flags);
+	mod = __module_text_address(addr);
+	spin_unlock_irqrestore(&modlist_lock, flags);
+
+	return mod;
+}
+
 /* Don't grab lock, we're oopsing. */
 void print_modules(void)
 {
--- diff/kernel/pid.c	2004-05-19 22:13:09.000000000 +0100
+++ source/kernel/pid.c	2004-07-01 21:32:52.000000000 +0100
@@ -122,6 +122,8 @@
 	}
 	
 	if (!offset || !atomic_read(&map->nr_free)) {
+		if (!offset)
+			map--;
 next_map:
 		map = next_free_map(map, &max_steps);
 		if (!map)
@@ -268,6 +270,9 @@
  * machine.  From a minimum of 16 slots up to 4096 slots at one gigabyte or
  * more.
  */
+#ifdef CONFIG_KGDB
+int kgdb_pid_init_done; /* so we don't call prior to... */
+#endif
 void __init pidhash_init(void)
 {
 	int i, j, pidhash_size;
@@ -289,6 +294,9 @@
 		for (j = 0; j < pidhash_size; j++)
 			INIT_LIST_HEAD(&pid_hash[i][j]);
 	}
+#ifdef CONFIG_KGDB
+	kgdb_pid_init_done++;
+#endif
 }
 
 void __init pidmap_init(void)
--- diff/kernel/posix-timers.c	2004-05-19 22:13:09.000000000 +0100
+++ source/kernel/posix-timers.c	2004-07-01 21:32:52.000000000 +0100
@@ -7,6 +7,9 @@
  *
  *			     Copyright (C) 2002 2003 by MontaVista Software.
  *
+ * 2004-06-01  Fix CLOCK_REALTIME clock/timer TIMER_ABSTIME bug.
+ *			     Copyright (C) 2004 Boris Hu
+ *
  * 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
@@ -41,6 +44,7 @@
 #include <linux/idr.h>
 #include <linux/posix-timers.h>
 #include <linux/wait.h>
+#include <linux/workqueue.h>
 
 #ifndef div_long_long_rem
 #include <asm/div64.h>
@@ -169,6 +173,12 @@
  */
 
 static struct k_clock posix_clocks[MAX_CLOCKS];
+/*
+ * We only have one real clock that can be set so we need only one abs list,
+ * even if we should want to have several clocks with differing resolutions.
+ */
+static struct k_clock_abs abs_list = {.list = LIST_HEAD_INIT(abs_list.list),
+				      .lock = SPIN_LOCK_UNLOCKED};
 
 #define if_clock_do(clock_fun,alt_fun,parms) \
 		(!clock_fun) ? alt_fun parms : clock_fun parms
@@ -200,8 +210,11 @@
  */
 static __init int init_posix_timers(void)
 {
-	struct k_clock clock_realtime = {.res = CLOCK_REALTIME_RES };
+	struct k_clock clock_realtime = {.res = CLOCK_REALTIME_RES,
+					 .abs_struct = &abs_list
+	};
 	struct k_clock clock_monotonic = {.res = CLOCK_REALTIME_RES,
+		.abs_struct = NULL,
 		.clock_get = do_posix_clock_monotonic_gettime,
 		.clock_set = do_posix_clock_monotonic_settime
 	};
@@ -212,7 +225,6 @@
 	posix_timers_cache = kmem_cache_create("posix_timers_cache",
 					sizeof (struct k_itimer), 0, 0, 0, 0);
 	idr_init(&posix_timers_id);
-
 	return 0;
 }
 
@@ -239,19 +251,92 @@
 		   (NSEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC;
 }
 
+/*
+ * This function adjusts the timer as needed as a result of the clock
+ * being set.  It should only be called for absolute timers, and then
+ * under the abs_list lock.  It computes the time difference and sets
+ * the new jiffies value in the timer.  It also updates the timers
+ * reference wall_to_monotonic value.  It is complicated by the fact
+ * that tstojiffies() only handles positive times and it needs to work
+ * with both positive and negative times.  Also, for negative offsets,
+ * we need to defeat the res round up.
+ *
+ * Return is true if there is a new time, else false.
+ */
+static long add_clockset_delta(struct k_itimer *timr,
+			       struct timespec *new_wall_to)
+{
+	struct timespec delta;
+	int sign = 0;
+	u64 exp;
+
+	set_normalized_timespec(&delta,
+				new_wall_to->tv_sec -
+				timr->wall_to_prev.tv_sec,
+				new_wall_to->tv_nsec -
+				timr->wall_to_prev.tv_nsec);
+	if (likely(!(delta.tv_sec | delta.tv_nsec)))
+		return 0;
+	if (delta.tv_sec < 0) {
+		set_normalized_timespec(&delta,
+					-delta.tv_sec,
+					1 - delta.tv_nsec -
+					posix_clocks[timr->it_clock].res);
+		sign++;
+	}
+	tstojiffie(&delta, posix_clocks[timr->it_clock].res, &exp);
+	timr->wall_to_prev = *new_wall_to;
+	timr->it_timer.expires += (sign ? -exp : exp);
+	return 1;
+}
+
+static void remove_from_abslist(struct k_itimer *timr)
+{
+	if (!list_empty(&timr->abs_timer_entry)) {
+		spin_lock(&abs_list.lock);
+		list_del_init(&timr->abs_timer_entry);
+		spin_unlock(&abs_list.lock);
+	}
+}
+
 static void schedule_next_timer(struct k_itimer *timr)
 {
+	struct timespec new_wall_to;
 	struct now_struct now;
+	unsigned long seq;
 
-	/* Set up the timer for the next interval (if there is one) */
+	/*
+	 * Set up the timer for the next interval (if there is one).
+	 * Note: this code uses the abs_timer_lock to protect
+	 * wall_to_prev and must hold it until exp is set, not exactly
+	 * obvious...
+
+	 * This function is used for CLOCK_REALTIME* and
+	 * CLOCK_MONOTONIC* timers.  If we ever want to handle other
+	 * CLOCKs, the calling code (do_schedule_next_timer) would need
+	 * to pull the "clock" info from the timer and dispatch the
+	 * "other" CLOCKs "next timer" code (which, I suppose should
+	 * also be added to the k_clock structure).
+	 */
 	if (!timr->it_incr) 
 		return;
 
-	posix_get_now(&now);
 	do {
-		posix_bump_timer(timr);
-	}while (posix_time_before(&timr->it_timer, &now));
+		seq = read_seqbegin(&xtime_lock);
+		new_wall_to =	wall_to_monotonic;
+		posix_get_now(&now);
+	} while (read_seqretry(&xtime_lock, seq));
+
+	if (!list_empty(&timr->abs_timer_entry)) {
+		spin_lock(&abs_list.lock);
+		add_clockset_delta(timr, &new_wall_to);
 
+		posix_bump_timer(timr, now);
+
+		spin_unlock(&abs_list.lock);
+	} else {
+		posix_bump_timer(timr, now);
+	}
 	timr->it_overrun_last = timr->it_overrun;
 	timr->it_overrun = -1;
 	++timr->it_requeue_pending;
@@ -312,7 +397,15 @@
 
 	memset(&timr->sigq->info, 0, sizeof(siginfo_t));
 
-	/* Send signal to the process that owns this timer. */
+	/*
+	 * Send signal to the process that owns this timer.
+
+	 * This code assumes that all the possible abs_lists share the
+	 * same lock (there is only one list at this time). If this is
+	 * not the case, the CLOCK info would need to be used to find
+	 * the proper abs list lock.
+	 */
+
 	timr->sigq->info.si_signo = timr->it_sigev_signo;
 	timr->sigq->info.si_errno = 0;
 	timr->sigq->info.si_code = SI_TIMER;
@@ -320,6 +413,9 @@
 	timr->sigq->info.si_value = timr->it_sigev_value;
 	if (timr->it_incr)
 		timr->sigq->info.si_sys_private = ++timr->it_requeue_pending;
+	else {
+		remove_from_abslist(timr);
+	}
 
 	if (timr->it_sigev_notify & SIGEV_THREAD_ID) {
 		if (unlikely(timr->it_process->flags & PF_EXITING)) {
@@ -350,16 +446,51 @@
  * This function gets called when a POSIX.1b interval timer expires.  It
  * is used as a callback from the kernel internal timer.  The
  * run_timer_list code ALWAYS calls with interrutps on.
+
+ * This code is for CLOCK_REALTIME* and CLOCK_MONOTONIC* timers.
  */
 static void posix_timer_fn(unsigned long __data)
 {
 	struct k_itimer *timr = (struct k_itimer *) __data;
 	unsigned long flags;
+	unsigned long seq;
+	struct timespec delta, new_wall_to;
+	u64 exp = 0;
+	int do_notify = 1;
 
 	spin_lock_irqsave(&timr->it_lock, flags);
  	set_timer_inactive(timr);
-	timer_notify_task(timr);
-	unlock_timer(timr, flags);
+	if (!list_empty(&timr->abs_timer_entry)) {
+		spin_lock(&abs_list.lock);
+		do {
+			seq = read_seqbegin(&xtime_lock);
+			new_wall_to =	wall_to_monotonic;
+		} while (read_seqretry(&xtime_lock, seq));
+		set_normalized_timespec(&delta,
+					new_wall_to.tv_sec -
+					timr->wall_to_prev.tv_sec,
+					new_wall_to.tv_nsec -
+					timr->wall_to_prev.tv_nsec);
+		if (likely((delta.tv_sec | delta.tv_nsec ) == 0)) {
+			/* do nothing, timer is on time */
+		} else if (delta.tv_sec < 0) {
+			/* do nothing, timer is already late */
+		} else {
+			/* timer is early due to a clock set */
+			tstojiffie(&delta,
+				   posix_clocks[timr->it_clock].res,
+				   &exp);
+			timr->wall_to_prev = new_wall_to;
+			timr->it_timer.expires += exp;
+			add_timer(&timr->it_timer);
+			do_notify = 0;
+		}
+		spin_unlock(&abs_list.lock);
+
+	}
+	if (do_notify)
+		timer_notify_task(timr);
+	unlock_timer(timr, flags); /* hold thru abs lock to keep irq off */
 }
 
 
@@ -397,7 +528,7 @@
 	if (!tmr)
 		return tmr;
 	memset(tmr, 0, sizeof (struct k_itimer));
-	tmr->it_id = (timer_t)-1;
+	INIT_LIST_HEAD(&tmr->abs_timer_entry);
 	if (unlikely(!(tmr->sigq = sigqueue_alloc()))) {
 		kmem_cache_free(posix_timers_cache, tmr);
 		tmr = 0;
@@ -405,9 +536,11 @@
 	return tmr;
 }
 
-static void release_posix_timer(struct k_itimer *tmr)
+#define IT_ID_SET	1
+#define IT_ID_NOT_SET	0
+static void release_posix_timer(struct k_itimer *tmr, int it_id_set)
 {
-	if (tmr->it_id != -1) {
+	if (it_id_set) {
 		unsigned long flags;
 		spin_lock_irqsave(&idr_lock, flags);
 		idr_remove(&posix_timers_id, tmr->it_id);
@@ -429,10 +562,11 @@
 {
 	int error = 0;
 	struct k_itimer *new_timer = NULL;
-	timer_t new_timer_id;
+	int new_timer_id;
 	struct task_struct *process = 0;
 	unsigned long flags;
 	sigevent_t event;
+	int it_id_set = IT_ID_NOT_SET;
 
 	if ((unsigned) which_clock >= MAX_CLOCKS ||
 				!posix_clocks[which_clock].res)
@@ -443,19 +577,38 @@
 		return -EAGAIN;
 
 	spin_lock_init(&new_timer->it_lock);
-	do {
-		if (unlikely(!idr_pre_get(&posix_timers_id, GFP_KERNEL))) {
-			error = -EAGAIN;
-			new_timer->it_id = (timer_t)-1;
-			goto out;
-		}
-		spin_lock_irq(&idr_lock);
-		new_timer_id = (timer_t) idr_get_new(&posix_timers_id,
-							(void *) new_timer);
-		spin_unlock_irq(&idr_lock);
-	} while (unlikely(new_timer_id == -1));
+ retry:
+	if (unlikely(!idr_pre_get(&posix_timers_id, GFP_KERNEL))) {
+		error = -EAGAIN;
+		goto out;
+	}
+	spin_lock_irq(&idr_lock);
+	error = idr_get_new(&posix_timers_id,
+			    (void *) new_timer,
+			    &new_timer_id);
+	spin_unlock_irq(&idr_lock);
+	if (error == -EAGAIN)
+		goto retry;
+	else if (error) {
+		/*
+		 * Wierd looking, but we return EAGAIN if the IDR is
+		 * full (proper POSIX return value for this)
+		 */
+		error = -EAGAIN;
+		goto out;
+	}
+
+	it_id_set = IT_ID_SET;
+	new_timer->it_id = (timer_t) new_timer_id;
+	new_timer->it_clock = which_clock;
+	new_timer->it_incr = 0;
+	new_timer->it_overrun = -1;
+	init_timer(&new_timer->it_timer);
+	new_timer->it_timer.expires = 0;
+	new_timer->it_timer.data = (unsigned long) new_timer;
+	new_timer->it_timer.function = posix_timer_fn;
+	set_timer_inactive(new_timer);
 
-	new_timer->it_id = new_timer_id;
 	/*
 	 * return the timer_id now.  The next step is hard to
 	 * back out if there is an error.
@@ -470,6 +623,10 @@
 			error = -EFAULT;
 			goto out;
 		}
+		new_timer->it_sigev_notify = event.sigev_notify;
+		new_timer->it_sigev_signo = event.sigev_signo;
+		new_timer->it_sigev_value = event.sigev_value;
+
 		read_lock(&tasklist_lock);
 		if ((process = good_sigevent(&event))) {
 			/*
@@ -489,6 +646,7 @@
 			 */
 			spin_lock_irqsave(&process->sighand->siglock, flags);
 			if (!(process->flags & PF_EXITING)) {
+				new_timer->it_process = process;
 				list_add(&new_timer->list,
 					 &process->signal->posix_timers);
 				spin_unlock_irqrestore(&process->sighand->siglock, flags);
@@ -503,35 +661,27 @@
 			error = -EINVAL;
 			goto out;
 		}
-		new_timer->it_sigev_notify = event.sigev_notify;
-		new_timer->it_sigev_signo = event.sigev_signo;
-		new_timer->it_sigev_value = event.sigev_value;
 	} else {
 		new_timer->it_sigev_notify = SIGEV_SIGNAL;
 		new_timer->it_sigev_signo = SIGALRM;
 		new_timer->it_sigev_value.sival_int = new_timer->it_id;
 		process = current->group_leader;
 		spin_lock_irqsave(&process->sighand->siglock, flags);
+		new_timer->it_process = process;
 		list_add(&new_timer->list, &process->signal->posix_timers);
 		spin_unlock_irqrestore(&process->sighand->siglock, flags);
 	}
 
-	new_timer->it_clock = which_clock;
-	new_timer->it_incr = 0;
-	new_timer->it_overrun = -1;
-	init_timer(&new_timer->it_timer);
-	new_timer->it_timer.expires = 0;
-	new_timer->it_timer.data = (unsigned long) new_timer;
-	new_timer->it_timer.function = posix_timer_fn;
-	set_timer_inactive(new_timer);
-
-	/*
-	 * Once we set the process, it can be found so do it last...
+ 	/*
+	 * In the case of the timer belonging to another task, after
+	 * the task is unlocked, the timer is owned by the other task
+	 * and may cease to exist at any time.  Don't use or modify
+	 * new_timer after the unlock call.
 	 */
-	new_timer->it_process = process;
+
 out:
 	if (error)
-		release_posix_timer(new_timer);
+		release_posix_timer(new_timer, it_id_set);
 
 	return error;
 }
@@ -626,8 +776,7 @@
 	if (expires) {
 		if (timr->it_requeue_pending & REQUEUE_PENDING ||
 		    (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE) {
-			while (posix_time_before(&timr->it_timer, &now))
-				posix_bump_timer(timr);
+			posix_bump_timer(timr, now);
 			expires = timr->it_timer.expires;
 		}
 		else
@@ -703,11 +852,10 @@
  * time to it to get the proper time for the timer.
  */
 static int adjust_abs_time(struct k_clock *clock, struct timespec *tp, 
-			   int abs, u64 *exp)
+			   int abs, u64 *exp, struct timespec *wall_to)
 {
 	struct timespec now;
 	struct timespec oc = *tp;
-	struct timespec wall_to_mono;
 	u64 jiffies_64_f;
 	int rtn =0;
 
@@ -715,15 +863,15 @@
 		/*
 		 * The mask pick up the 4 basic clocks 
 		 */
-		if (!(clock - &posix_clocks[0]) & ~CLOCKS_MASK) {
+		if (!((clock - &posix_clocks[0]) & ~CLOCKS_MASK)) {
 			jiffies_64_f = do_posix_clock_monotonic_gettime_parts(
-				&now,  &wall_to_mono);
+				&now,  wall_to);
 			/*
 			 * If we are doing a MONOTONIC clock
 			 */
 			if((clock - &posix_clocks[0]) & CLOCKS_MONO){
-				now.tv_sec += wall_to_mono.tv_sec;
-				now.tv_nsec += wall_to_mono.tv_nsec;
+				now.tv_sec += wall_to->tv_sec;
+				now.tv_nsec += wall_to->tv_nsec;
 			}
 		} else {
 			/*
@@ -813,6 +961,8 @@
 #else
 	del_timer(&timr->it_timer);
 #endif
+	remove_from_abslist(timr);
+
 	timr->it_requeue_pending = (timr->it_requeue_pending + 2) & 
 		~REQUEUE_PENDING;
 	timr->it_overrun_last = 0;
@@ -827,24 +977,25 @@
 
 	if (adjust_abs_time(clock,
 			    &new_setting->it_value, flags & TIMER_ABSTIME, 
-			    &expire_64)) {
+			    &expire_64, &(timr->wall_to_prev))) {
 		return -EINVAL;
 	}
 	timr->it_timer.expires = (unsigned long)expire_64;	
 	tstojiffie(&new_setting->it_interval, clock->res, &expire_64);
 	timr->it_incr = (unsigned long)expire_64;
 
-
 	/*
-	 * For some reason the timer does not fire immediately if expires is
-	 * equal to jiffies, so the timer notify function is called directly.
-	 * We do not even queue SIGEV_NONE timers!
+	 * We do not even queue SIGEV_NONE timers!  But we do put them
+	 * in the abs list so we can do that right.
 	 */
-	if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE)) {
-		if (timr->it_timer.expires == jiffies)
-			timer_notify_task(timr);
-		else
-			add_timer(&timr->it_timer);
+	if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE))
+		add_timer(&timr->it_timer);
+
+	if (flags & TIMER_ABSTIME && clock->abs_struct) {
+		spin_lock(&clock->abs_struct->lock);
+		list_add_tail(&(timr->abs_timer_entry),
+			      &(clock->abs_struct->list));
+		spin_unlock(&clock->abs_struct->lock);
 	}
 	return 0;
 }
@@ -878,7 +1029,7 @@
 	if (!posix_clocks[timr->it_clock].timer_set)
 		error = do_timer_settime(timr, flags, &new_spec, rtn);
 	else
-		error = posix_clocks[timr->it_clock].timer_set(timr,
+	        error = posix_clocks[timr->it_clock].timer_set(timr,
 							       flags,
 							       &new_spec, rtn);
 	unlock_timer(timr, flag);
@@ -911,6 +1062,8 @@
 #else
 	del_timer(&timer->it_timer);
 #endif
+	remove_from_abslist(timer);
+
 	return 0;
 }
 
@@ -952,7 +1105,7 @@
 	timer->it_process = NULL;
 	}
 	unlock_timer(timer, flags);
-	release_posix_timer(timer);
+	release_posix_timer(timer, IT_ID_SET);
 	return 0;
 }
 /*
@@ -989,7 +1142,7 @@
 		timer->it_process = NULL;
 	}
 	unlock_timer(timer, flags);
-	release_posix_timer(timer);
+	release_posix_timer(timer, IT_ID_SET);
 }
 
 /*
@@ -1153,13 +1306,93 @@
  * On locking, clock_was_set() is called from update_wall_clock which
  * holds (or has held for it) a write_lock_irq( xtime_lock) and is
  * called from the timer bh code.  Thus we need the irq save locks.
+ *
+ * Also, on the call from update_wall_clock, that is done as part of a
+ * softirq thing.  We don't want to delay the system that much (possibly
+ * long list of timers to fix), so we defer that work to keventd.
  */
 
 static DECLARE_WAIT_QUEUE_HEAD(nanosleep_abs_wqueue);
+static DECLARE_WORK(clock_was_set_work, (void(*)(void*))clock_was_set, NULL);
+
+static DECLARE_MUTEX(clock_was_set_lock);
 
 void clock_was_set(void)
 {
+	struct k_itimer *timr;
+	struct timespec new_wall_to;
+	LIST_HEAD(cws_list);
+	unsigned long seq;
+
+
+	if (unlikely(in_interrupt())) {
+		schedule_work(&clock_was_set_work);
+		return;
+	}
 	wake_up_all(&nanosleep_abs_wqueue);
+
+	/*
+	 * Check if there exist TIMER_ABSTIME timers to correct.
+	 *
+	 * Notes on locking: This code is run in task context with irq
+	 * on.  We CAN be interrupted!  All other usage of the abs list
+	 * lock is under the timer lock which holds the irq lock as
+	 * well.  We REALLY don't want to scan the whole list with the
+	 * interrupt system off, AND we would like a sequence lock on
+	 * this code as well.  Since we assume that the clock will not
+	 * be set often, it seems ok to take and release the irq lock
+	 * for each timer.  In fact add_timer will do this, so this is
+	 * not an issue.  So we know when we are done, we will move the
+	 * whole list to a new location.  Then as we process each entry,
+	 * we will move it to the actual list again.  This way, when our
+	 * copy is empty, we are done.  We are not all that concerned
+	 * about preemption so we will use a semaphore lock to protect
+	 * aginst reentry.  This way we will not stall another
+	 * processor.  It is possible that this may delay some timers
+	 * that should have expired, given the new clock, but even this
+	 * will be minimal as we will always update to the current time,
+	 * even if it was set by a task that is waiting for entry to
+	 * this code.  Timers that expire too early will be caught by
+	 * the expire code and restarted.
+
+	 * Absolute timers that repeat are left in the abs list while
+	 * waiting for the task to pick up the signal.  This means we
+	 * may find timers that are not in the "add_timer" list, but are
+	 * in the abs list.  We do the same thing for these, save
+	 * putting them back in the "add_timer" list.  (Note, these are
+	 * left in the abs list mainly to indicate that they are
+	 * ABSOLUTE timers, a fact that is used by the re-arm code, and
+	 * for which we have no other flag.)
+
+	 */
+
+	down(&clock_was_set_lock);
+	spin_lock_irq(&abs_list.lock);
+	list_splice_init(&abs_list.list, &cws_list);
+	spin_unlock_irq(&abs_list.lock);
+	do {
+		do {
+			seq = read_seqbegin(&xtime_lock);
+			new_wall_to =	wall_to_monotonic;
+		} while (read_seqretry(&xtime_lock, seq));
+
+		spin_lock_irq(&abs_list.lock);
+		if (list_empty(&cws_list)) {
+			spin_unlock_irq(&abs_list.lock);
+			break;
+		}
+		timr = list_entry(cws_list.next, struct k_itimer,
+				   abs_timer_entry);
+
+		list_del_init(&timr->abs_timer_entry);
+		if (add_clockset_delta(timr, &new_wall_to) &&
+		    del_timer(&timr->it_timer))  /* timer run yet? */
+			add_timer(&timr->it_timer);
+		list_add(&timr->abs_timer_entry, &abs_list.list);
+		spin_unlock_irq(&abs_list.lock);
+	} while (1);
+
+	up(&clock_was_set_lock);
 }
 
 long clock_nanosleep_restart(struct restart_block *restart_block);
@@ -1202,7 +1435,7 @@
 long
 do_clock_nanosleep(clockid_t which_clock, int flags, struct timespec *tsave)
 {
-	struct timespec t;
+	struct timespec t, dum;
 	struct timer_list new_timer;
 	DECLARE_WAITQUEUE(abs_wqueue, current);
 	u64 rq_time = (u64)0;
@@ -1242,7 +1475,7 @@
 		t = *tsave;
 		if (abs || !rq_time) {
 			adjust_abs_time(&posix_clocks[which_clock], &t, abs,
-					&rq_time);
+					&rq_time, &dum);
 			rq_time += (t.tv_sec || t.tv_nsec);
 		}
 
--- diff/kernel/power/Makefile	2004-05-19 22:13:09.000000000 +0100
+++ source/kernel/power/Makefile	2004-07-01 21:32:52.000000000 +0100
@@ -1,4 +1,5 @@
 obj-y				:= main.o process.o console.o pm.o
+obj-$(CONFIG_SMP)		+= smp.o
 obj-$(CONFIG_SOFTWARE_SUSPEND)	+= swsusp.o
 obj-$(CONFIG_PM_DISK)		+= disk.o pmdisk.o
 
--- diff/kernel/power/pmdisk.c	2004-05-19 22:13:10.000000000 +0100
+++ source/kernel/power/pmdisk.c	2004-07-01 21:32:52.000000000 +0100
@@ -732,19 +732,6 @@
 
 /* More restore stuff */
 
-/* FIXME: Why not memcpy(to, from, 1<<pagedir_order*PAGE_SIZE)? */
-static void __init copy_pagedir(suspend_pagedir_t *to, suspend_pagedir_t *from)
-{
-	int i;
-	char *topointer=(char *)to, *frompointer=(char *)from;
-
-	for(i=0; i < 1 << pagedir_order; i++) {
-		copy_page(topointer, frompointer);
-		topointer += PAGE_SIZE;
-		frompointer += PAGE_SIZE;
-	}
-}
-
 #define does_collide(addr) does_collide_order(pm_pagedir_nosave, addr, 0)
 
 /*
@@ -792,9 +779,10 @@
 	 * We have to avoid recursion (not to overflow kernel stack),
 	 * and that's why code looks pretty cryptic 
 	 */
-	suspend_pagedir_t *new_pagedir, *old_pagedir = pm_pagedir_nosave;
+	suspend_pagedir_t *old_pagedir = pm_pagedir_nosave;
 	void **eaten_memory = NULL;
 	void **c = eaten_memory, *m, *f;
+	int err;
 
 	pr_debug("pmdisk: Relocating pagedir\n");
 
@@ -803,32 +791,31 @@
 		return 0;
 	}
 
+	err = -ENOMEM;
 	while ((m = (void *) __get_free_pages(GFP_ATOMIC, pagedir_order))) {
-		memset(m, 0, PAGE_SIZE);
-		if (!does_collide_order(old_pagedir, (unsigned long)m, pagedir_order))
+		if (!does_collide_order(old_pagedir, (unsigned long)m,
+					pagedir_order)) {
+			pm_pagedir_nosave =
+				memcpy(m, old_pagedir,
+				       PAGE_SIZE << pagedir_order);
+			err = 0;
 			break;
+		}
 		eaten_memory = m;
 		printk( "." ); 
 		*eaten_memory = c;
 		c = eaten_memory;
 	}
 
-	if (!m)
-		return -ENOMEM;
-
-	pm_pagedir_nosave = new_pagedir = m;
-	copy_pagedir(new_pagedir, old_pagedir);
-
 	c = eaten_memory;
 	while(c) {
 		printk(":");
-		f = *c;
+		f = c;
 		c = *c;
-		if (f)
-			free_pages((unsigned long)f, pagedir_order);
+		free_pages((unsigned long)f, pagedir_order);
 	}
 	printk("|\n");
-	return 0;
+	return err;
 }
 
 
--- diff/kernel/power/process.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/power/process.c	2004-07-01 21:32:52.000000000 +0100
@@ -109,7 +109,6 @@
 			wake_up_process(p);
 		} else
 			printk(KERN_INFO " Strange, %s not stopped\n", p->comm );
-		wake_up_process(p);
 	} while_each_thread(g, p);
 
 	read_unlock(&tasklist_lock);
--- diff/kernel/power/swsusp.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/power/swsusp.c	2004-07-01 21:32:52.000000000 +0100
@@ -503,6 +503,9 @@
 		if (!pbe)
 			continue;
 		pbe->orig_address = (long) page_address(page);
+		/* Copy page is dangerous: it likes to mess with
+		   preempt count on specific cpus. Wrong preempt count is then copied,
+		   oops. */
 		copy_page((void *)pbe->address, (void *)pbe->orig_address);
 		pbe++;
 	}
@@ -693,6 +696,7 @@
 	else
 #endif
 	{
+		device_suspend(3);
 		device_shutdown();
 		machine_power_off();
 	}
@@ -713,7 +717,7 @@
 	mb();
 	spin_lock_irq(&suspend_pagedir_lock);	/* Done to disable interrupts */ 
 
-	device_power_down(4);
+	device_power_down(3);
 	PRINTK( "Waiting for DMAs to settle down...\n");
 	mdelay(1000);	/* We do not want some readahead with DMA to corrupt our memory, right?
 			   Do it with disabled interrupts for best effect. That way, if some
@@ -782,7 +786,7 @@
 {
 	int is_problem;
 	read_swapfiles();
-	device_power_down(4);
+	device_power_down(3);
 	is_problem = suspend_prepare_image();
 	device_power_up();
 	spin_unlock_irq(&suspend_pagedir_lock);
@@ -799,7 +803,6 @@
 	barrier();
 	mb();
 	spin_lock_irq(&suspend_pagedir_lock);	/* Done to disable interrupts */ 
-	mdelay(1000);
 
 	free_pages((unsigned long) pagedir_nosave, pagedir_order);
 	spin_unlock_irq(&suspend_pagedir_lock);
@@ -836,9 +839,10 @@
                    need half of memory free. */
 
 		free_some_memory();
-		
-		/* Save state of all device drivers, and stop them. */		   
-		if ((res = device_suspend(4))==0)
+		disable_nonboot_cpus();
+		/* Save state of all device drivers, and stop them. */
+		printk("Suspending devices... ");
+		if ((res = device_suspend(3))==0) {
 			/* If stopping device drivers worked, we proceed basically into
 			 * suspend_save_image.
 			 *
@@ -849,7 +853,9 @@
 			 * using normal kernel mechanism.
 			 */
 			do_magic(0);
+		}
 		thaw_processes();
+		enable_nonboot_cpus();
 	} else
 		res = -EBUSY;
 	software_suspend_enabled = 1;
@@ -860,19 +866,6 @@
 
 /* More restore stuff */
 
-/* FIXME: Why not memcpy(to, from, 1<<pagedir_order*PAGE_SIZE)? */
-static void copy_pagedir(suspend_pagedir_t *to, suspend_pagedir_t *from)
-{
-	int i;
-	char *topointer=(char *)to, *frompointer=(char *)from;
-
-	for(i=0; i < 1 << pagedir_order; i++) {
-		copy_page(topointer, frompointer);
-		topointer += PAGE_SIZE;
-		frompointer += PAGE_SIZE;
-	}
-}
-
 #define does_collide(addr) does_collide_order(pagedir_nosave, addr, 0)
 
 /*
@@ -920,11 +913,12 @@
 	 * We have to avoid recursion (not to overflow kernel stack),
 	 * and that's why code looks pretty cryptic 
 	 */
-	suspend_pagedir_t *new_pagedir, *old_pagedir = pagedir_nosave;
+	suspend_pagedir_t *old_pagedir = pagedir_nosave;
 	void **eaten_memory = NULL;
 	void **c = eaten_memory, *m, *f;
+	int ret = 0;
 
-	printk("Relocating pagedir");
+	printk("Relocating pagedir ");
 
 	if(!does_collide_order(old_pagedir, (unsigned long)old_pagedir, pagedir_order)) {
 		printk("not necessary\n");
@@ -932,7 +926,6 @@
 	}
 
 	while ((m = (void *) __get_free_pages(GFP_ATOMIC, pagedir_order))) {
-		memset(m, 0, PAGE_SIZE);
 		if (!does_collide_order(old_pagedir, (unsigned long)m, pagedir_order))
 			break;
 		eaten_memory = m;
@@ -941,22 +934,23 @@
 		c = eaten_memory;
 	}
 
-	if (!m)
-		return -ENOMEM;
-
-	pagedir_nosave = new_pagedir = m;
-	copy_pagedir(new_pagedir, old_pagedir);
+	if (!m) {
+		printk("out of memory\n");
+		ret = -ENOMEM;
+	} else {
+		pagedir_nosave =
+			memcpy(m, old_pagedir, PAGE_SIZE << pagedir_order);
+	}
 
 	c = eaten_memory;
-	while(c) {
+	while (c) {
 		printk(":");
-		f = *c;
+		f = c;
 		c = *c;
-		if (f)
-			free_pages((unsigned long)f, pagedir_order);
+		free_pages((unsigned long)f, pagedir_order);
 	}
 	printk("|\n");
-	return 0;
+	return ret;
 }
 
 /*
@@ -1201,7 +1195,9 @@
 	printk( "resuming from %s\n", resume_file);
 	if (read_suspend_image(resume_file, 0))
 		goto read_failure;
-	device_suspend(4);
+	/* FIXME: Should we stop processes here, just to be safer? */
+	disable_nonboot_cpus();
+	device_suspend(3);
 	do_magic(1);
 	panic("This never returns");
 
--- diff/kernel/printk.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/printk.c	2004-07-01 21:32:52.000000000 +0100
@@ -684,6 +684,47 @@
 EXPORT_SYMBOL(console_unblank);
 
 /*
+ * Return the console tty driver structure and its associated index
+ */
+struct tty_driver *console_device(int *index)
+{
+	struct console *c;
+	struct tty_driver *driver = NULL;
+
+	acquire_console_sem();
+	for (c = console_drivers; c != NULL; c = c->next) {
+		if (!c->device)
+			continue;
+		driver = c->device(c, index);
+		if (driver)
+			break;
+	}
+	release_console_sem();
+	return driver;
+}
+
+/*
+ * Prevent further output on the passed console device so that (for example)
+ * serial drivers can disable console output before suspending a port, and can
+ * re-enable output afterwards.
+ */
+void console_stop(struct console *console)
+{
+	acquire_console_sem();
+	console->flags &= ~CON_ENABLED;
+	release_console_sem();
+}
+EXPORT_SYMBOL(console_stop);
+
+void console_start(struct console *console)
+{
+	acquire_console_sem();
+	console->flags |= CON_ENABLED;
+	release_console_sem();
+}
+EXPORT_SYMBOL(console_start);
+
+/*
  * The console driver calls this routine during kernel initialization
  * to register the console printing procedure with printk() and to
  * print any messages that were printed by the kernel before the
--- diff/kernel/rcupdate.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/rcupdate.c	2004-07-01 21:32:52.000000000 +0100
@@ -47,8 +47,17 @@
 
 /* Definition for rcupdate control block. */
 struct rcu_ctrlblk rcu_ctrlblk = 
-	{ .mutex = SPIN_LOCK_UNLOCKED, .curbatch = 1, 
-	  .maxbatch = 1, .rcu_cpu_mask = CPU_MASK_NONE };
+	{ .cur = -300, .completed = -300 , .lock = SEQCNT_ZERO };
+
+/* Bookkeeping of the progress of the grace period */
+struct {
+	spinlock_t	mutex; /* Guard this struct and writes to rcu_ctrlblk */
+	cpumask_t	rcu_cpu_mask; /* CPUs that need to switch in order    */
+	                              /* for current batch to proceed.        */
+} rcu_state ____cacheline_maxaligned_in_smp =
+	  {.mutex = SPIN_LOCK_UNLOCKED, .rcu_cpu_mask = CPU_MASK_NONE };
+
+
 DEFINE_PER_CPU(struct rcu_data, rcu_data) = { 0L };
 
 /* Fake initialization required by compiler */
@@ -59,23 +68,24 @@
  * call_rcu - Queue an RCU update request.
  * @head: structure to be used for queueing the RCU updates.
  * @func: actual update function to be invoked after the grace period
- * @arg: argument to be passed to the update function
  *
  * The update function will be invoked as soon as all CPUs have performed 
  * a context switch or been seen in the idle loop or in a user process. 
  * The read-side of critical section that use call_rcu() for updation must 
  * be protected by rcu_read_lock()/rcu_read_unlock().
  */
-void fastcall call_rcu(struct rcu_head *head, void (*func)(void *arg), void *arg)
+void fastcall call_rcu(struct rcu_head *head,
+				void (*func)(struct rcu_head *rcu))
 {
 	int cpu;
 	unsigned long flags;
 
 	head->func = func;
-	head->arg = arg;
+	head->next = NULL;
 	local_irq_save(flags);
 	cpu = smp_processor_id();
-	list_add_tail(&head->list, &RCU_nxtlist(cpu));
+	*RCU_nxttail(cpu) = head;
+	RCU_nxttail(cpu) = &head->next;
 	local_irq_restore(flags);
 }
 
@@ -83,39 +93,70 @@
  * Invoke the completed RCU callbacks. They are expected to be in
  * a per-cpu list.
  */
-static void rcu_do_batch(struct list_head *list)
+static void rcu_do_batch(struct rcu_head *list)
 {
-	struct list_head *entry;
-	struct rcu_head *head;
+	struct rcu_head *next;
 
-	while (!list_empty(list)) {
-		entry = list->next;
-		list_del(entry);
-		head = list_entry(entry, struct rcu_head, list);
-		head->func(head->arg);
+	while (list) {
+		next = list->next;
+		list->func(list);
+		list = next;
 	}
 }
 
 /*
+ * Grace period handling:
+ * The grace period handling consists out of two steps:
+ * - A new grace period is started.
+ *   This is done by rcu_start_batch. The start is not broadcasted to
+ *   all cpus, they must pick this up by comparing rcu_ctrlblk.cur with
+ *   RCU_quiescbatch(cpu). All cpus are recorded  in the
+ *   rcu_state.rcu_cpu_mask bitmap.
+ * - All cpus must go through a quiescent state.
+ *   Since the start of the grace period is not broadcasted, at least two
+ *   calls to rcu_check_quiescent_state are required:
+ *   The first call just notices that a new grace period is running. The
+ *   following calls check if there was a quiescent state since the beginning
+ *   of the grace period. If so, it updates rcu_state.rcu_cpu_mask. If
+ *   the bitmap is empty, then the grace period is completed.
+ *   rcu_check_quiescent_state calls rcu_start_batch(0) to start the next grace
+ *   period (if necessary).
+ */
+/*
  * Register a new batch of callbacks, and start it up if there is currently no
  * active batch and the batch to be registered has not already occurred.
- * Caller must hold the rcu_ctrlblk lock.
+ * Caller must hold rcu_state.mutex.
  */
-static void rcu_start_batch(long newbatch)
+static void rcu_start_batch(int next_pending)
 {
-	cpumask_t active;
+	if (next_pending)
+		rcu_ctrlblk.next_pending = 1;
 
-	if (rcu_batch_before(rcu_ctrlblk.maxbatch, newbatch)) {
-		rcu_ctrlblk.maxbatch = newbatch;
+	if (rcu_ctrlblk.next_pending &&
+			rcu_ctrlblk.completed == rcu_ctrlblk.cur) {
+		/* Can't change, since spin lock held. */
+		cpus_andnot(rcu_state.rcu_cpu_mask, cpu_online_map,
+							nohz_cpu_mask);
+		write_seqcount_begin(&rcu_ctrlblk.lock);
+		rcu_ctrlblk.next_pending = 0;
+		rcu_ctrlblk.cur++;
+		write_seqcount_end(&rcu_ctrlblk.lock);
 	}
-	if (rcu_batch_before(rcu_ctrlblk.maxbatch, rcu_ctrlblk.curbatch) ||
-	    !cpus_empty(rcu_ctrlblk.rcu_cpu_mask)) {
-		return;
+}
+
+/*
+ * cpu went through a quiescent state since the beginning of the grace period.
+ * Clear it from the cpu mask and complete the grace period if it was the last
+ * cpu. Start another grace period if someone has further entries pending
+ */
+static void cpu_quiet(int cpu)
+{
+	cpu_clear(cpu, rcu_state.rcu_cpu_mask);
+	if (cpus_empty(rcu_state.rcu_cpu_mask)) {
+		/* batch completed ! */
+		rcu_ctrlblk.completed = rcu_ctrlblk.cur;
+		rcu_start_batch(0);
 	}
-	/* Can't change, since spin lock held. */
-	active = nohz_cpu_mask;
-	cpus_complement(active);
-	cpus_and(rcu_ctrlblk.rcu_cpu_mask, cpu_online_map, active);
 }
 
 /*
@@ -127,7 +168,19 @@
 {
 	int cpu = smp_processor_id();
 
-	if (!cpu_isset(cpu, rcu_ctrlblk.rcu_cpu_mask))
+	if (RCU_quiescbatch(cpu) != rcu_ctrlblk.cur) {
+		/* new grace period: record qsctr value. */
+		RCU_qs_pending(cpu) = 1;
+		RCU_last_qsctr(cpu) = RCU_qsctr(cpu);
+		RCU_quiescbatch(cpu) = rcu_ctrlblk.cur;
+		return;
+	}
+
+	/* Grace period already completed for this cpu?
+	 * qs_pending is checked instead of the actual bitmap to avoid
+	 * cacheline trashing.
+	 */
+	if (!RCU_qs_pending(cpu))
 		return;
 
 	/* 
@@ -135,27 +188,19 @@
 	 * we may miss one quiescent state of that CPU. That is
 	 * tolerable. So no need to disable interrupts.
 	 */
-	if (RCU_last_qsctr(cpu) == RCU_QSCTR_INVALID) {
-		RCU_last_qsctr(cpu) = RCU_qsctr(cpu);
-		return;
-	}
 	if (RCU_qsctr(cpu) == RCU_last_qsctr(cpu))
 		return;
+	RCU_qs_pending(cpu) = 0;
 
-	spin_lock(&rcu_ctrlblk.mutex);
-	if (!cpu_isset(cpu, rcu_ctrlblk.rcu_cpu_mask))
-		goto out_unlock;
-
-	cpu_clear(cpu, rcu_ctrlblk.rcu_cpu_mask);
-	RCU_last_qsctr(cpu) = RCU_QSCTR_INVALID;
-	if (!cpus_empty(rcu_ctrlblk.rcu_cpu_mask))
-		goto out_unlock;
-
-	rcu_ctrlblk.curbatch++;
-	rcu_start_batch(rcu_ctrlblk.maxbatch);
+	spin_lock(&rcu_state.mutex);
+	/*
+	 * RCU_quiescbatch/batch.cur and the cpu bitmap can come out of sync
+	 * during cpu startup. Ignore the quiescent state.
+	 */
+	if (likely(RCU_quiescbatch(cpu) == rcu_ctrlblk.cur))
+		cpu_quiet(cpu);
 
-out_unlock:
-	spin_unlock(&rcu_ctrlblk.mutex);
+	spin_unlock(&rcu_state.mutex);
 }
 
 
@@ -185,25 +230,11 @@
 	 * we can block indefinitely waiting for it, so flush
 	 * it here
 	 */
-	spin_lock_irq(&rcu_ctrlblk.mutex);
-	if (cpus_empty(rcu_ctrlblk.rcu_cpu_mask))
-		goto unlock;
-
-	cpu_clear(cpu, rcu_ctrlblk.rcu_cpu_mask);
-	if (cpus_empty(rcu_ctrlblk.rcu_cpu_mask)) {
-		rcu_ctrlblk.curbatch++;
-		/* We may avoid calling start batch if
-		 * we are starting the batch only
-		 * because of the DEAD CPU (the current
-		 * CPU will start a new batch anyway for
-		 * the callbacks we will move to current CPU).
-		 * However, we will avoid this optimisation
-		 * for now.
-		 */
-		rcu_start_batch(rcu_ctrlblk.maxbatch);
-	}
+	spin_lock_bh(&rcu_state.mutex);
+	if (rcu_ctrlblk.cur != rcu_ctrlblk.completed)
+		cpu_quiet(cpu);
 unlock:
-	spin_unlock_irq(&rcu_ctrlblk.mutex);
+	spin_unlock_bh(&rcu_state.mutex);
 
 	rcu_move_batch(&RCU_curlist(cpu));
 	rcu_move_batch(&RCU_nxtlist(cpu));
@@ -213,39 +244,59 @@
 
 #endif
 
+void rcu_restart_cpu(int cpu)
+{
+	spin_lock_bh(&rcu_state.mutex);
+	RCU_quiescbatch(cpu) = rcu_ctrlblk.completed;
+	RCU_qs_pending(cpu) = 0;
+	spin_unlock_bh(&rcu_state.mutex);
+}
+
 /*
  * This does the RCU processing work from tasklet context. 
  */
 static void rcu_process_callbacks(unsigned long unused)
 {
 	int cpu = smp_processor_id();
-	LIST_HEAD(list);
+	struct rcu_head *rcu_list = NULL;
 
-	if (!list_empty(&RCU_curlist(cpu)) &&
-	    rcu_batch_after(rcu_ctrlblk.curbatch, RCU_batch(cpu))) {
-		__list_splice(&RCU_curlist(cpu), &list);
-		INIT_LIST_HEAD(&RCU_curlist(cpu));
+	if (RCU_curlist(cpu) &&
+	    !rcu_batch_before(rcu_ctrlblk.completed, RCU_batch(cpu))) {
+		rcu_list = RCU_curlist(cpu);
+		RCU_curlist(cpu) = NULL;
 	}
 
 	local_irq_disable();
-	if (!list_empty(&RCU_nxtlist(cpu)) && list_empty(&RCU_curlist(cpu))) {
-		__list_splice(&RCU_nxtlist(cpu), &RCU_curlist(cpu));
-		INIT_LIST_HEAD(&RCU_nxtlist(cpu));
+	if (RCU_nxtlist(cpu) && !RCU_curlist(cpu)) {
+		int next_pending, seq;
+
+		RCU_curlist(cpu) = RCU_nxtlist(cpu);
+		RCU_nxtlist(cpu) = NULL;
+		RCU_nxttail(cpu) = &RCU_nxtlist(cpu);
 		local_irq_enable();
 
 		/*
 		 * start the next batch of callbacks
 		 */
-		spin_lock(&rcu_ctrlblk.mutex);
-		RCU_batch(cpu) = rcu_ctrlblk.curbatch + 1;
-		rcu_start_batch(RCU_batch(cpu));
-		spin_unlock(&rcu_ctrlblk.mutex);
+		do {
+			seq = read_seqcount_begin(&rcu_ctrlblk.lock);
+			/* determine batch number */
+			RCU_batch(cpu) = rcu_ctrlblk.cur + 1;
+			next_pending = rcu_ctrlblk.next_pending;
+		} while (read_seqcount_retry(&rcu_ctrlblk.lock, seq));
+
+		if (!next_pending) {
+			/* and start it/schedule start if it's a new batch */
+			spin_lock(&rcu_state.mutex);
+			rcu_start_batch(1);
+			spin_unlock(&rcu_state.mutex);
+		}
 	} else {
 		local_irq_enable();
 	}
 	rcu_check_quiescent_state();
-	if (!list_empty(&list))
-		rcu_do_batch(&list);
+	if (rcu_list)
+		rcu_do_batch(rcu_list);
 }
 
 void rcu_check_callbacks(int cpu, int user)
@@ -261,8 +312,9 @@
 {
 	memset(&per_cpu(rcu_data, cpu), 0, sizeof(struct rcu_data));
 	tasklet_init(&RCU_tasklet(cpu), rcu_process_callbacks, 0UL);
-	INIT_LIST_HEAD(&RCU_nxtlist(cpu));
-	INIT_LIST_HEAD(&RCU_curlist(cpu));
+	RCU_nxttail(cpu) = &RCU_nxtlist(cpu);
+	RCU_quiescbatch(cpu) = rcu_ctrlblk.completed;
+	RCU_qs_pending(cpu) = 0;
 }
 
 static int __devinit rcu_cpu_notify(struct notifier_block *self, 
@@ -302,11 +354,18 @@
 	register_cpu_notifier(&rcu_nb);
 }
 
+struct rcu_synchronize {
+	struct rcu_head head;
+	struct completion completion;
+};
 
 /* Because of FASTCALL declaration of complete, we use this wrapper */
-static void wakeme_after_rcu(void *completion)
+static void wakeme_after_rcu(struct rcu_head  *head)
 {
-	complete(completion);
+	struct rcu_synchronize *rcu;
+
+	rcu = container_of(head, struct rcu_synchronize, head);
+	complete(&rcu->completion);
 }
 
 /**
@@ -315,14 +374,14 @@
  */
 void synchronize_kernel(void)
 {
-	struct rcu_head rcu;
-	DECLARE_COMPLETION(completion);
+	struct rcu_synchronize rcu;
 
+	init_completion(&rcu.completion);
 	/* Will wake me after RCU finished */
-	call_rcu(&rcu, wakeme_after_rcu, &completion);
+	call_rcu(&rcu.head, wakeme_after_rcu);
 
 	/* Wait for it */
-	wait_for_completion(&completion);
+	wait_for_completion(&rcu.completion);
 }
 
 
--- diff/kernel/sched.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/sched.c	2004-07-01 21:32:52.000000000 +0100
@@ -39,7 +39,9 @@
 #include <linux/rcupdate.h>
 #include <linux/cpu.h>
 #include <linux/percpu.h>
+#include <linux/perfctr.h>
 #include <linux/kthread.h>
+#include <asm/tlb.h>
 
 #include <asm/unistd.h>
 
@@ -546,7 +548,7 @@
  * task_curr - is this task currently executing on a CPU?
  * @p: the task in question.
  */
-inline int task_curr(task_t *p)
+inline int task_curr(const task_t *p)
 {
 	return cpu_curr(task_cpu(p)) == p;
 }
@@ -696,10 +698,9 @@
 		return cpu;
 
 	cpus_and(tmp, sd->span, cpu_online_map);
-	for_each_cpu_mask(i, tmp) {
-		if (!cpu_isset(i, p->cpus_allowed))
-			continue;
+	cpus_and(tmp, tmp, p->cpus_allowed);
 
+	for_each_cpu_mask(i, tmp) {
 		if (idle_cpu(i))
 			return i;
 	}
@@ -865,12 +866,50 @@
 	return try_to_wake_up(p, state, 0);
 }
 
+#ifdef CONFIG_SMP
+static int find_idlest_cpu(struct task_struct *p, int this_cpu,
+			   struct sched_domain *sd);
+#endif
+
 /*
  * Perform scheduler related setup for a newly forked process p.
- * p is forked by current.
+ * p is forked by current. It also does runqueue balancing.
+ * The cpu hotplug lock is held.
  */
-void fastcall sched_fork(task_t *p)
+void fastcall sched_fork(task_t *p, unsigned long clone_flags)
 {
+	int cpu;
+#ifdef CONFIG_SMP
+	struct sched_domain *tmp, *sd = NULL;
+	preempt_disable();
+	cpu = smp_processor_id();
+
+	if ((clone_flags & (CLONE_VM|CLONE_VFORK)) == CLONE_VM) {
+		/*
+		 * New thread that is not a vfork.
+		 * Find the largest domain that this CPU is part of that
+		 * is willing to balance on clone:
+		 */
+		for_each_domain(cpu, tmp)
+			if (tmp->flags & SD_BALANCE_CLONE)
+				sd = tmp;
+		if (sd)
+			cpu = find_idlest_cpu(p, cpu, sd);
+	}
+	preempt_enable();
+#else
+	cpu = smp_processor_id();
+#endif
+	/*
+	 * The task hasn't been attached yet, so cpus_allowed mask cannot
+	 * change. The cpus_allowed mask of the parent may have changed
+	 * after it is copied, and it may then move to a CPU that is not
+	 * allowed for the child.
+	 */
+	if (unlikely(!cpu_isset(cpu, p->cpus_allowed)))
+		cpu = any_online_cpu(p->cpus_allowed);
+	set_task_cpu(p, cpu);
+
 	/*
 	 * We mark the process as running here, but have not actually
 	 * inserted it onto the runqueue yet. This guarantees that
@@ -904,7 +943,7 @@
 	p->first_time_slice = 1;
 	current->time_slice >>= 1;
 	p->timestamp = sched_clock();
-	if (!current->time_slice) {
+	if (unlikely(!current->time_slice)) {
 		/*
 		 * This case is rare, it happens when the parent has only
 		 * a single jiffy left from its timeslice. Taking the
@@ -920,43 +959,81 @@
 }
 
 /*
- * wake_up_forked_process - wake up a freshly forked process.
+ * wake_up_new_process - wake up a newly created process for the first time.
  *
  * This function will do some initial scheduler statistics housekeeping
- * that must be done for every newly created process.
+ * that must be done for every newly created context, then puts the process
+ * on the runqueue and wakes it.
  */
-void fastcall wake_up_forked_process(task_t * p)
+void fastcall wake_up_new_process(task_t * p, unsigned long clone_flags)
 {
 	unsigned long flags;
-	runqueue_t *rq = task_rq_lock(current, &flags);
+	int this_cpu, cpu;
+	runqueue_t *rq;
+
+	rq = task_rq_lock(p, &flags);
+	cpu = task_cpu(p);
+	this_cpu = smp_processor_id();
 
 	BUG_ON(p->state != TASK_RUNNING);
 
 	/*
 	 * We decrease the sleep average of forking parents
 	 * and children as well, to keep max-interactive tasks
-	 * from forking tasks that are max-interactive.
+	 * from forking tasks that are max-interactive. The parent
+	 * (current) is done further down, under its lock.
 	 */
-	current->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(current) *
-		PARENT_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS);
-
 	p->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(p) *
 		CHILD_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS);
 
 	p->interactive_credit = 0;
 
 	p->prio = effective_prio(p);
-	set_task_cpu(p, smp_processor_id());
 
-	if (unlikely(!current->array))
+	if (likely(cpu == this_cpu)) {
+		if (!(clone_flags & CLONE_VM)) {
+			/*
+			 * The VM isn't cloned, so we're in a good position to
+			 * do child-runs-first in anticipation of an exec. This
+			 * usually avoids a lot of COW overhead.
+			 */
+			if (unlikely(!current->array))
+				__activate_task(p, rq);
+			else {
+				p->prio = current->prio;
+				list_add_tail(&p->run_list, &current->run_list);
+				p->array = current->array;
+				p->array->nr_active++;
+				rq->nr_running++;
+			}
+			set_need_resched();
+		} else {
+			/* Run child last */
+			__activate_task(p, rq);
+		}
+	} else {
+		runqueue_t *this_rq = cpu_rq(this_cpu);
+
+		/*
+		 * Not the local CPU - must adjust timestamp. This should
+		 * get optimised away in the !CONFIG_SMP case.
+		 */
+		p->timestamp = (p->timestamp - this_rq->timestamp_last_tick)
+					+ rq->timestamp_last_tick;
 		__activate_task(p, rq);
-	else {
-		p->prio = current->prio;
-		list_add_tail(&p->run_list, &current->run_list);
-		p->array = current->array;
-		p->array->nr_active++;
-		rq->nr_running++;
+		if (TASK_PREEMPTS_CURR(p, rq))
+			resched_task(rq->curr);
+
+		current->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(current) *
+			PARENT_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS);
+	}
+
+	if (unlikely(cpu != this_cpu)) {
+		task_rq_unlock(rq, &flags);
+		rq = task_rq_lock(current, &flags);
 	}
+	current->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(current) *
+		PARENT_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS);
 	task_rq_unlock(rq, &flags);
 }
 
@@ -974,18 +1051,16 @@
 	unsigned long flags;
 	runqueue_t *rq;
 
-	local_irq_save(flags);
-	if (p->first_time_slice) {
-		p->parent->time_slice += p->time_slice;
-		if (unlikely(p->parent->time_slice > MAX_TIMESLICE))
-			p->parent->time_slice = MAX_TIMESLICE;
-	}
-	local_irq_restore(flags);
 	/*
 	 * If the child was a (relative-) CPU hog then decrease
 	 * the sleep_avg of the parent as well.
 	 */
 	rq = task_rq_lock(p->parent, &flags);
+	if (p->first_time_slice) {
+		p->parent->time_slice += p->time_slice;
+		if (unlikely(p->parent->time_slice > MAX_TIMESLICE))
+			p->parent->time_slice = MAX_TIMESLICE;
+	}
 	if (p->sleep_avg < p->parent->sleep_avg)
 		p->parent->sleep_avg = p->parent->sleep_avg /
 		(EXIT_WEIGHT + 1) * EXIT_WEIGHT + p->sleep_avg /
@@ -1085,7 +1160,7 @@
 {
 	unsigned long i, sum = 0;
 
-	for_each_cpu(i)
+	for_each_online_cpu(i)
 		sum += cpu_rq(i)->nr_running;
 
 	return sum;
@@ -1121,40 +1196,6 @@
 	return sum;
 }
 
-/*
- * double_rq_lock - safely lock two runqueues
- *
- * Note this does not disable interrupts like task_rq_lock,
- * you need to do so manually before calling.
- */
-static void double_rq_lock(runqueue_t *rq1, runqueue_t *rq2)
-{
-	if (rq1 == rq2)
-		spin_lock(&rq1->lock);
-	else {
-		if (rq1 < rq2) {
-			spin_lock(&rq1->lock);
-			spin_lock(&rq2->lock);
-		} else {
-			spin_lock(&rq2->lock);
-			spin_lock(&rq1->lock);
-		}
-	}
-}
-
-/*
- * double_rq_unlock - safely unlock two runqueues
- *
- * Note this does not restore interrupts like task_rq_unlock,
- * you need to do so manually after calling.
- */
-static void double_rq_unlock(runqueue_t *rq1, runqueue_t *rq2)
-{
-	spin_unlock(&rq1->lock);
-	if (rq1 != rq2)
-		spin_unlock(&rq2->lock);
-}
-
 enum idle_type
 {
 	IDLE,
@@ -1211,89 +1252,6 @@
 }
 
 /*
- * wake_up_forked_thread - wake up a freshly forked thread.
- *
- * This function will do some initial scheduler statistics housekeeping
- * that must be done for every newly created context, and it also does
- * runqueue balancing.
- */
-void fastcall wake_up_forked_thread(task_t * p)
-{
-	unsigned long flags;
-	int this_cpu = get_cpu(), cpu;
-	struct sched_domain *tmp, *sd = NULL;
-	runqueue_t *this_rq = cpu_rq(this_cpu), *rq;
-
-	/*
-	 * Find the largest domain that this CPU is part of that
-	 * is willing to balance on clone:
-	 */
-	for_each_domain(this_cpu, tmp)
-		if (tmp->flags & SD_BALANCE_CLONE)
-			sd = tmp;
-	if (sd)
-		cpu = find_idlest_cpu(p, this_cpu, sd);
-	else
-		cpu = this_cpu;
-
-	local_irq_save(flags);
-lock_again:
-	rq = cpu_rq(cpu);
-	double_rq_lock(this_rq, rq);
-
-	BUG_ON(p->state != TASK_RUNNING);
-
-	/*
-	 * We did find_idlest_cpu() unlocked, so in theory
-	 * the mask could have changed - just dont migrate
-	 * in this case:
-	 */
-	if (unlikely(!cpu_isset(cpu, p->cpus_allowed))) {
-		cpu = this_cpu;
-		double_rq_unlock(this_rq, rq);
-		goto lock_again;
-	}
-	/*
-	 * We decrease the sleep average of forking parents
-	 * and children as well, to keep max-interactive tasks
-	 * from forking tasks that are max-interactive.
-	 */
-	current->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(current) *
-		PARENT_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS);
-
-	p->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(p) *
-		CHILD_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS);
-
-	p->interactive_credit = 0;
-
-	p->prio = effective_prio(p);
-	set_task_cpu(p, cpu);
-
-	if (cpu == this_cpu) {
-		if (unlikely(!current->array))
-			__activate_task(p, rq);
-		else {
-			p->prio = current->prio;
-			list_add_tail(&p->run_list, &current->run_list);
-			p->array = current->array;
-			p->array->nr_active++;
-			rq->nr_running++;
-		}
-	} else {
-		/* Not the local CPU - must adjust timestamp */
-		p->timestamp = (p->timestamp - this_rq->timestamp_last_tick)
-					+ rq->timestamp_last_tick;
-		__activate_task(p, rq);
-		if (TASK_PREEMPTS_CURR(p, rq))
-			resched_task(rq->curr);
-	}
-
-	double_rq_unlock(this_rq, rq);
-	local_irq_restore(flags);
-	put_cpu();
-}
-
-/*
  * If dest_cpu is allowed for this process, migrate the task to it.
  * This is accomplished by forcing the cpu_allowed mask to only
  * allow dest_cpu, which will force the cpu onto dest_cpu.  Then
@@ -1326,13 +1284,13 @@
 }
 
 /*
- * sched_balance_exec(): find the highest-level, exec-balance-capable
+ * sched_exec(): find the highest-level, exec-balance-capable
  * domain and try to migrate the task to the least loaded CPU.
  *
  * execve() is a valuable balancing opportunity, because at this point
  * the task has the smallest effective memory and cache footprint.
  */
-void sched_balance_exec(void)
+void sched_exec(void)
 {
 	struct sched_domain *tmp, *sd = NULL;
 	int new_cpu, this_cpu = get_cpu();
@@ -1358,6 +1316,40 @@
 }
 
 /*
+ * double_rq_lock - safely lock two runqueues
+ *
+ * Note this does not disable interrupts like task_rq_lock,
+ * you need to do so manually before calling.
+ */
+static void double_rq_lock(runqueue_t *rq1, runqueue_t *rq2)
+{
+	if (rq1 == rq2)
+		spin_lock(&rq1->lock);
+	else {
+		if (rq1 < rq2) {
+			spin_lock(&rq1->lock);
+			spin_lock(&rq2->lock);
+		} else {
+			spin_lock(&rq2->lock);
+			spin_lock(&rq1->lock);
+		}
+	}
+}
+
+/*
+ * double_rq_unlock - safely unlock two runqueues
+ *
+ * Note this does not restore interrupts like task_rq_unlock,
+ * you need to do so manually after calling.
+ */
+static void double_rq_unlock(runqueue_t *rq1, runqueue_t *rq2)
+{
+	spin_unlock(&rq1->lock);
+	if (rq1 != rq2)
+		spin_unlock(&rq2->lock);
+}
+
+/*
  * double_lock_balance - lock the busiest runqueue, this_rq is locked already.
  */
 static void double_lock_balance(runqueue_t *this_rq, runqueue_t *busiest)
@@ -2209,6 +2201,15 @@
 	prev = current;
 	rq = this_rq();
 
+	/*
+	 * The idle thread is not allowed to schedule!
+	 * Remove this check after it has been exercised a bit.
+	 */
+	if (unlikely(current == rq->idle) && current->state != TASK_RUNNING) {
+		printk(KERN_ERR "bad: scheduling from the idle thread!\n");
+		dump_stack();
+	}
+
 	release_kernel_lock(prev);
 	now = sched_clock();
 	if (likely(now - prev->timestamp < NS_MAX_SLEEP_AVG))
@@ -2272,7 +2273,7 @@
 		goto switch_tasks;
 	}
 
-	if (!rt_task(next) && next->activated > 0) {
+	if (likely(!rt_task(next)) && next->activated > 0) {
 		unsigned long long delta = now - next->timestamp;
 
 		if (next->activated == 1)
@@ -2313,7 +2314,7 @@
 
 	reacquire_kernel_lock(current);
 	preempt_enable_no_resched();
-	if (test_thread_flag(TIF_NEED_RESCHED))
+	if (unlikely(test_thread_flag(TIF_NEED_RESCHED)))
 		goto need_resched;
 }
 
@@ -2606,6 +2607,13 @@
 
 EXPORT_SYMBOL(set_user_nice);
 
+#ifdef CONFIG_KGDB
+struct task_struct *kgdb_get_idle(int this_cpu)
+{
+        return cpu_rq(this_cpu)->idle;
+}
+#endif
+
 #ifdef __ARCH_WANT_SYS_NICE
 
 /*
@@ -2658,7 +2666,7 @@
  * RT tasks are offset by -200. Normal tasks are centered
  * around 0, value goes from -16 to +15.
  */
-int task_prio(task_t *p)
+int task_prio(const task_t *p)
 {
 	return p->prio - MAX_RT_PRIO;
 }
@@ -2667,7 +2675,7 @@
  * task_nice - return the nice value of a given task.
  * @p: the task in question.
  */
-int task_nice(task_t *p)
+int task_nice(const task_t *p)
 {
 	return TASK_NICE(p);
 }
@@ -2941,6 +2949,21 @@
 	return retval;
 }
 
+/*
+ * Represents all cpu's present in the system
+ * In systems capable of hotplug, this map could dynamically grow
+ * as new cpu's are detected in the system via any platform specific
+ * method, such as ACPI for e.g.
+ */
+
+cpumask_t cpu_present_map;
+EXPORT_SYMBOL(cpu_present_map);
+
+#ifndef CONFIG_SMP
+cpumask_t cpu_online_map = CPU_MASK_ALL;
+cpumask_t cpu_possible_map = CPU_MASK_ALL;
+#endif
+
 /**
  * sys_sched_getaffinity - get the cpu affinity of a process
  * @pid: pid of the process
@@ -3253,21 +3276,20 @@
 
 void __devinit init_idle(task_t *idle, int cpu)
 {
-	runqueue_t *idle_rq = cpu_rq(cpu), *rq = cpu_rq(task_cpu(idle));
+	runqueue_t *rq = cpu_rq(cpu);
 	unsigned long flags;
 
-	local_irq_save(flags);
-	double_rq_lock(idle_rq, rq);
-
-	idle_rq->curr = idle_rq->idle = idle;
-	deactivate_task(idle, rq);
+	idle->sleep_avg = 0;
+	idle->interactive_credit = 0;
 	idle->array = NULL;
 	idle->prio = MAX_PRIO;
 	idle->state = TASK_RUNNING;
 	set_task_cpu(idle, cpu);
-	double_rq_unlock(idle_rq, rq);
+
+	spin_lock_irqsave(&rq->lock, flags);
+	rq->curr = rq->idle = idle;
 	set_tsk_need_resched(idle);
-	local_irq_restore(flags);
+	spin_unlock_irqrestore(&rq->lock, flags);
 
 	/* Set the preempt count _outside_ the spinlocks! */
 #ifdef CONFIG_PREEMPT
@@ -3319,8 +3341,10 @@
 	migration_req_t req;
 	runqueue_t *rq;
 
+	perfctr_set_cpus_allowed(p, new_mask);
+
 	rq = task_rq_lock(p, &flags);
-	if (any_online_cpu(new_mask) == NR_CPUS) {
+	if (!cpus_intersects(new_mask, cpu_online_map)) {
 		ret = -EINVAL;
 		goto out;
 	}
@@ -3335,6 +3359,7 @@
 		task_rq_unlock(rq, &flags);
 		wake_up_process(rq->migration_thread);
 		wait_for_completion(&req.done);
+		tlb_migrate_finish(p->mm);
 		return 0;
 	}
 out:
@@ -3495,8 +3520,7 @@
 		if (dest_cpu == NR_CPUS)
 			dest_cpu = any_online_cpu(tsk->cpus_allowed);
 		if (dest_cpu == NR_CPUS) {
-			cpus_clear(tsk->cpus_allowed);
-			cpus_complement(tsk->cpus_allowed);
+			cpus_setall(tsk->cpus_allowed);
 			dest_cpu = any_online_cpu(tsk->cpus_allowed);
 
 			/* Don't tell them about moving exiting tasks
@@ -3558,6 +3582,7 @@
 		p = kthread_create(migration_thread, hcpu, "migration/%d",cpu);
 		if (IS_ERR(p))
 			return NOTIFY_BAD;
+		p->flags |= PF_NOFREEZE;
 		kthread_bind(p, cpu);
 		/* Must be high prio: stop_machine expects to yield to it. */
 		rq = task_rq_lock(p, &flags);
@@ -3812,7 +3837,7 @@
 			int j;
 			char str[NR_CPUS];
 			struct sched_group *group = sd->groups;
-			cpumask_t groupmask, tmp;
+			cpumask_t groupmask;
 
 			cpumask_scnprintf(str, NR_CPUS, sd->span);
 			cpus_clear(groupmask);
@@ -3842,8 +3867,7 @@
 				if (!cpus_weight(group->cpumask))
 					printk(" ERROR empty group:");
 
-				cpus_and(tmp, groupmask, group->cpumask);
-				if (cpus_weight(tmp) > 0)
+				if (cpus_intersects(groupmask, group->cpumask))
 					printk(" ERROR repeated CPUs:");
 
 				cpus_or(groupmask, groupmask, group->cpumask);
@@ -3862,8 +3886,7 @@
 			sd = sd->parent;
 
 			if (sd) {
-				cpus_and(tmp, groupmask, sd->span);
-				if (!cpus_equal(tmp, groupmask))
+				if (!cpus_subset(groupmask, sd->span))
 					printk(KERN_DEBUG "ERROR parent span is not a superset of domain->span\n");
 			}
 
@@ -3902,16 +3925,15 @@
 	/* Set up an initial dummy domain for early boot */
 	static struct sched_domain sched_domain_init;
 	static struct sched_group sched_group_init;
-	cpumask_t cpu_mask_all = CPU_MASK_ALL;
 
 	memset(&sched_domain_init, 0, sizeof(struct sched_domain));
-	sched_domain_init.span = cpu_mask_all;
+	sched_domain_init.span = CPU_MASK_ALL;
 	sched_domain_init.groups = &sched_group_init;
 	sched_domain_init.last_balance = jiffies;
 	sched_domain_init.balance_interval = INT_MAX; /* Don't balance */
 
 	memset(&sched_group_init, 0, sizeof(struct sched_group));
-	sched_group_init.cpumask = cpu_mask_all;
+	sched_group_init.cpumask = CPU_MASK_ALL;
 	sched_group_init.next = &sched_group_init;
 	sched_group_init.cpu_power = SCHED_LOAD_SCALE;
 #endif
@@ -3945,15 +3967,6 @@
 			__set_bit(MAX_PRIO, array->bitmap);
 		}
 	}
-	/*
-	 * We have to do a little magic to get the first
-	 * thread right in SMP mode.
-	 */
-	rq = this_rq();
-	rq->curr = current;
-	rq->idle = current;
-	set_task_cpu(current, smp_processor_id());
-	wake_up_forked_process(current);
 
 	/*
 	 * The boot idle thread does lazy MMU switching as well:
--- diff/kernel/signal.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/signal.c	2004-07-01 21:32:52.000000000 +0100
@@ -32,9 +32,6 @@
 
 static kmem_cache_t *sigqueue_cachep;
 
-atomic_t nr_queued_signals;
-int max_queued_signals = 1024;
-
 /*
  * In POSIX a signal is sent either to a specific thread (Linux task)
  * or to the process as a whole (Linux thread group).  How the signal
@@ -265,17 +262,19 @@
 	return sig;
 }
 
-struct sigqueue *__sigqueue_alloc(void)
+static struct sigqueue *__sigqueue_alloc(void)
 {
 	struct sigqueue *q = 0;
 
-	if (atomic_read(&nr_queued_signals) < max_queued_signals)
+	if (atomic_read(&current->user->sigpending) <
+			current->rlim[RLIMIT_SIGPENDING].rlim_cur)
 		q = kmem_cache_alloc(sigqueue_cachep, GFP_ATOMIC);
 	if (q) {
-		atomic_inc(&nr_queued_signals);
 		INIT_LIST_HEAD(&q->list);
 		q->flags = 0;
 		q->lock = 0;
+		q->user = get_uid(current->user);
+		atomic_inc(&q->user->sigpending);
 	}
 	return(q);
 }
@@ -284,8 +283,9 @@
 {
 	if (q->flags & SIGQUEUE_PREALLOC)
 		return;
+	atomic_dec(&q->user->sigpending);
+	free_uid(q->user);
 	kmem_cache_free(sigqueue_cachep, q);
-	atomic_dec(&nr_queued_signals);
 }
 
 static void flush_sigqueue(struct sigpending *queue)
@@ -699,7 +699,8 @@
 	}
 }
 
-static int send_signal(int sig, struct siginfo *info, struct sigpending *signals)
+static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
+			struct sigpending *signals)
 {
 	struct sigqueue * q = NULL;
 	int ret = 0;
@@ -719,12 +720,14 @@
 	   make sure at least one signal gets delivered and don't
 	   pass on the info struct.  */
 
-	if (atomic_read(&nr_queued_signals) < max_queued_signals)
+	if (atomic_read(&t->user->sigpending) <
+			t->rlim[RLIMIT_SIGPENDING].rlim_cur)
 		q = kmem_cache_alloc(sigqueue_cachep, GFP_ATOMIC);
 
 	if (q) {
-		atomic_inc(&nr_queued_signals);
 		q->flags = 0;
+		q->user = get_uid(t->user);
+		atomic_inc(&q->user->sigpending);
 		list_add_tail(&q->list, &signals->list);
 		switch ((unsigned long) info) {
 		case 0:
@@ -798,7 +801,7 @@
 	if (LEGACY_QUEUE(&t->pending, sig))
 		goto out;
 
-	ret = send_signal(sig, info, &t->pending);
+	ret = send_signal(sig, info, t, &t->pending);
 	if (!ret && !sigismember(&t->blocked, sig))
 		signal_wake_up(t, sig == SIGKILL);
 out:
@@ -999,7 +1002,7 @@
 	 * We always use the shared queue for process-wide signals,
 	 * to avoid several races.
 	 */
-	ret = send_signal(sig, info, &p->signal->shared_pending);
+	ret = send_signal(sig, info, p, &p->signal->shared_pending);
 	if (unlikely(ret))
 		return ret;
 
@@ -1071,23 +1074,19 @@
 	struct task_struct *p;
 	struct list_head *l;
 	struct pid *pid;
-	int retval;
-	int found;
+	int retval, success;
 
 	if (pgrp <= 0)
 		return -EINVAL;
 
-	found = 0;
-	retval = 0;
+	success = 0;
+	retval = -ESRCH;
 	for_each_task_pid(pgrp, PIDTYPE_PGID, p, l, pid) {
-		int err;
-
-		found = 1;
-		err = group_send_sig_info(sig, info, p);
-		if (!retval)
-			retval = err;
+		int err = group_send_sig_info(sig, info, p);
+		success |= !err;
+		retval = err;
 	}
-	return found ? retval : -ESRCH;
+	return success ? 0 : retval;
 }
 
 int
@@ -1198,6 +1197,13 @@
 	unsigned long flags;
 
 	/*
+	 * Make sure legacy kernel users don't send in bad values
+	 * (normal paths check this in check_kill_permission).
+	 */
+	if (sig < 0 || sig > _NSIG)
+		return -EINVAL;
+
+	/*
 	 * We need the tasklist lock even for the specific
 	 * thread case (when we don't need to follow the group
 	 * lists) in order to avoid races with "p->sighand"
--- diff/kernel/sys.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/sys.c	2004-07-01 21:32:52.000000000 +0100
@@ -280,6 +280,12 @@
 cond_syscall(sys_pciconfig_read)
 cond_syscall(sys_pciconfig_write)
 cond_syscall(sys_pciconfig_iobase)
+cond_syscall(sys_perfctr_info)
+cond_syscall(sys_vperfctr_open)
+cond_syscall(sys_vperfctr_control)
+cond_syscall(sys_vperfctr_unlink)
+cond_syscall(sys_vperfctr_iresume)
+cond_syscall(sys_vperfctr_read)
 
 static int set_one_prio(struct task_struct *p, int niceval, int error)
 {
--- diff/kernel/sysctl.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/sysctl.c	2004-07-01 21:32:52.000000000 +0100
@@ -39,6 +39,8 @@
 #include <linux/initrd.h>
 #include <linux/times.h>
 #include <linux/limits.h>
+#include <linux/dcache.h>
+
 #include <asm/uaccess.h>
 
 #ifdef CONFIG_ROOT_NFS
@@ -53,8 +55,6 @@
 extern int sysctl_overcommit_memory;
 extern int sysctl_overcommit_ratio;
 extern int max_threads;
-extern atomic_t nr_queued_signals;
-extern int max_queued_signals;
 extern int sysrq_enabled;
 extern int core_uses_pid;
 extern char core_pattern[];
@@ -429,22 +429,6 @@
 		.proc_handler	= &proc_dointvec,
 	},
 #endif
-	{
-		.ctl_name	= KERN_RTSIGNR,
-		.procname	= "rtsig-nr",
-		.data		= &nr_queued_signals,
-		.maxlen		= sizeof(int),
-		.mode		= 0444,
-		.proc_handler	= &proc_dointvec,
-	},
-	{
-		.ctl_name	= KERN_RTSIGMAX,
-		.procname	= "rtsig-max",
-		.data		= &max_queued_signals,
-		.maxlen		= sizeof(int),
-		.mode		= 0644,
-		.proc_handler	= &proc_dointvec,
-	},
 #ifdef CONFIG_SYSVIPC
 	{
 		.ctl_name	= KERN_SHMMAX,
@@ -795,6 +779,16 @@
 		.strategy	= &sysctl_intvec,
 		.extra1		= &zero,
 	},
+	{
+		.ctl_name	= VM_VFS_CACHE_PRESSURE,
+		.procname	= "vfs_cache_pressure",
+		.data		= &sysctl_vfs_cache_pressure,
+		.maxlen		= sizeof(sysctl_vfs_cache_pressure),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &zero,
+	},
 	{ .ctl_name = 0 }
 };
 
--- diff/kernel/timer.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/timer.c	2004-07-01 21:32:52.000000000 +0100
@@ -31,6 +31,7 @@
 #include <linux/time.h>
 #include <linux/jiffies.h>
 #include <linux/cpu.h>
+#include <linux/perfctr.h>
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
@@ -829,12 +830,13 @@
 	}
 }
 
-void update_one_process(struct task_struct *p, unsigned long user,
+static void update_one_process(struct task_struct *p, unsigned long user,
 			unsigned long system, int cpu)
 {
 	do_process_times(p, user, system);
 	do_it_virt(p, user);
 	do_it_prof(p);
+	perfctr_sample_thread(&p->thread);
 }	
 
 /*
--- diff/kernel/uid16.c	2004-05-19 22:13:09.000000000 +0100
+++ source/kernel/uid16.c	2004-07-01 21:32:52.000000000 +0100
@@ -39,7 +39,7 @@
 
 asmlinkage long sys_setgid16(old_gid_t gid)
 {
-	return sys_setgid((gid_t)gid);
+	return sys_setgid(low2highgid(gid));
 }
 
 asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid)
@@ -49,7 +49,7 @@
 
 asmlinkage long sys_setuid16(old_uid_t uid)
 {
-	return sys_setuid((uid_t)uid);
+	return sys_setuid(low2highuid(uid));
 }
 
 asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid)
@@ -88,12 +88,12 @@
 
 asmlinkage long sys_setfsuid16(old_uid_t uid)
 {
-	return sys_setfsuid((uid_t)uid);
+	return sys_setfsuid(low2highuid(uid));
 }
 
 asmlinkage long sys_setfsgid16(old_gid_t gid)
 {
-	return sys_setfsgid((gid_t)gid);
+	return sys_setfsgid(low2highgid(gid));
 }
 
 static int groups16_to_user(old_gid_t __user *grouplist,
@@ -103,7 +103,7 @@
 	old_gid_t group;
 
 	for (i = 0; i < group_info->ngroups; i++) {
-		group = (old_gid_t)GROUP_AT(group_info, i);
+		group = high2lowgid(GROUP_AT(group_info, i));
 		if (put_user(group, grouplist+i))
 			return -EFAULT;
 	}
@@ -120,7 +120,7 @@
 	for (i = 0; i < group_info->ngroups; i++) {
 		if (get_user(group, grouplist+i))
 			return  -EFAULT;
-		GROUP_AT(group_info, i) = (gid_t)group;
+		GROUP_AT(group_info, i) = low2highgid(group);
 	}
 
 	return 0;
--- diff/kernel/user.c	2004-06-30 14:26:02.000000000 +0100
+++ source/kernel/user.c	2004-07-01 21:32:52.000000000 +0100
@@ -30,7 +30,9 @@
 struct user_struct root_user = {
 	.__count	= ATOMIC_INIT(1),
 	.processes	= ATOMIC_INIT(1),
-	.files		= ATOMIC_INIT(0)
+	.files		= ATOMIC_INIT(0),
+	.sigpending	= ATOMIC_INIT(0),
+	.mq_bytes	= 0
 };
 
 /*
@@ -108,6 +110,9 @@
 		atomic_set(&new->__count, 1);
 		atomic_set(&new->processes, 0);
 		atomic_set(&new->files, 0);
+		atomic_set(&new->sigpending, 0);
+
+		new->mq_bytes = 0;
 
 		/*
 		 * Before adding this, check whether we raced
--- diff/lib/Kconfig	2004-05-19 22:13:10.000000000 +0100
+++ source/lib/Kconfig	2004-07-01 21:32:52.000000000 +0100
@@ -4,8 +4,17 @@
 
 menu "Library routines"
 
+config CRC16
+	tristate "CRC16 functions"
+	help
+	  This option is provided for the case where no in-kernel-tree
+	  modules require CRC16 functions, but a module built outside the
+	  kernel tree does. Such modules that use library CRC16 functions
+	  require M here.
+
 config CRC32
 	tristate "CRC32 functions"
+	default y
 	help
 	  This option is provided for the case where no in-kernel-tree
 	  modules require CRC32 functions, but a module built outside the
--- diff/lib/Makefile	2004-05-19 22:13:10.000000000 +0100
+++ source/lib/Makefile	2004-07-01 21:32:52.000000000 +0100
@@ -18,6 +18,7 @@
   lib-y += dec_and_lock.o
 endif
 
+obj-$(CONFIG_CRC16)	+= crc16.o
 obj-$(CONFIG_CRC32)	+= crc32.o
 obj-$(CONFIG_LIBCRC32C)	+= libcrc32c.o
 
--- diff/lib/bitmap.c	2004-05-19 22:13:10.000000000 +0100
+++ source/lib/bitmap.c	2004-07-01 21:32:52.000000000 +0100
@@ -12,7 +12,33 @@
 #include <asm/bitops.h>
 #include <asm/uaccess.h>
 
-int bitmap_empty(const unsigned long *bitmap, int bits)
+/*
+ * bitmaps provide an array of bits, implemented using an an
+ * array of unsigned longs.  The number of valid bits in a
+ * given bitmap does _not_ need to be an exact multiple of
+ * BITS_PER_LONG.
+ *
+ * The possible unused bits in the last, partially used word
+ * of a bitmap are 'don't care'.  The implementation makes
+ * no particular effort to keep them zero.  It ensures that
+ * their value will not affect the results of any operation.
+ * The bitmap operations that return Boolean (bitmap_empty,
+ * for example) or scalar (bitmap_weight, for example) results
+ * carefully filter out these unused bits from impacting their
+ * results.
+ *
+ * These operations actually hold to a slightly stronger rule:
+ * if you don't input any bitmaps to these ops that have some
+ * unused bits set, then they won't output any set unused bits
+ * in output bitmaps.
+ *
+ * The byte ordering of bitmaps is more natural on little
+ * endian architectures.  See the big-endian headers
+ * include/asm-ppc64/bitops.h and include/asm-s390/bitops.h
+ * for the best explanations of this ordering.
+ */
+
+int __bitmap_empty(const unsigned long *bitmap, int bits)
 {
 	int k, lim = bits/BITS_PER_LONG;
 	for (k = 0; k < lim; ++k)
@@ -20,14 +46,14 @@
 			return 0;
 
 	if (bits % BITS_PER_LONG)
-		if (bitmap[k] & ((1UL << (bits % BITS_PER_LONG)) - 1))
+		if (bitmap[k] & BITMAP_LAST_WORD_MASK(bits))
 			return 0;
 
 	return 1;
 }
-EXPORT_SYMBOL(bitmap_empty);
+EXPORT_SYMBOL(__bitmap_empty);
 
-int bitmap_full(const unsigned long *bitmap, int bits)
+int __bitmap_full(const unsigned long *bitmap, int bits)
 {
 	int k, lim = bits/BITS_PER_LONG;
 	for (k = 0; k < lim; ++k)
@@ -35,15 +61,15 @@
 			return 0;
 
 	if (bits % BITS_PER_LONG)
-		if (~bitmap[k] & ((1UL << (bits % BITS_PER_LONG)) - 1))
+		if (~bitmap[k] & BITMAP_LAST_WORD_MASK(bits))
 			return 0;
 
 	return 1;
 }
-EXPORT_SYMBOL(bitmap_full);
+EXPORT_SYMBOL(__bitmap_full);
 
-int bitmap_equal(const unsigned long *bitmap1,
-		unsigned long *bitmap2, int bits)
+int __bitmap_equal(const unsigned long *bitmap1,
+		const unsigned long *bitmap2, int bits)
 {
 	int k, lim = bits/BITS_PER_LONG;
 	for (k = 0; k < lim; ++k)
@@ -51,26 +77,26 @@
 			return 0;
 
 	if (bits % BITS_PER_LONG)
-		if ((bitmap1[k] ^ bitmap2[k]) &
-				((1UL << (bits % BITS_PER_LONG)) - 1))
+		if ((bitmap1[k] ^ bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits))
 			return 0;
 
 	return 1;
 }
-EXPORT_SYMBOL(bitmap_equal);
+EXPORT_SYMBOL(__bitmap_equal);
 
-void bitmap_complement(unsigned long *bitmap, int bits)
+void __bitmap_complement(unsigned long *dst, const unsigned long *src, int bits)
 {
-	int k;
-	int nr = BITS_TO_LONGS(bits);
+	int k, lim = bits/BITS_PER_LONG;
+	for (k = 0; k < lim; ++k)
+		dst[k] = ~src[k];
 
-	for (k = 0; k < nr; ++k)
-		bitmap[k] = ~bitmap[k];
+	if (bits % BITS_PER_LONG)
+		dst[k] = ~src[k] & BITMAP_LAST_WORD_MASK(bits);
 }
-EXPORT_SYMBOL(bitmap_complement);
+EXPORT_SYMBOL(__bitmap_complement);
 
 /*
- * bitmap_shift_right - logical right shift of the bits in a bitmap
+ * __bitmap_shift_right - logical right shift of the bits in a bitmap
  *   @dst - destination bitmap
  *   @src - source bitmap
  *   @nbits - shift by this many bits
@@ -80,7 +106,7 @@
  * direction.  Zeros are fed into the vacated MS positions and the
  * LS bits shifted off the bottom are lost.
  */
-void bitmap_shift_right(unsigned long *dst,
+void __bitmap_shift_right(unsigned long *dst,
 			const unsigned long *src, int shift, int bits)
 {
 	int k, lim = BITS_TO_LONGS(bits), left = bits % BITS_PER_LONG;
@@ -110,10 +136,11 @@
 	if (off)
 		memset(&dst[lim - off], 0, off*sizeof(unsigned long));
 }
-EXPORT_SYMBOL(bitmap_shift_right);
+EXPORT_SYMBOL(__bitmap_shift_right);
+
 
 /*
- * bitmap_shift_left - logical left shift of the bits in a bitmap
+ * __bitmap_shift_left - logical left shift of the bits in a bitmap
  *   @dst - destination bitmap
  *   @src - source bitmap
  *   @nbits - shift by this many bits
@@ -123,7 +150,8 @@
  * direction.  Zeros are fed into the vacated LS bit positions
  * and those MS bits shifted off the top are lost.
  */
-void bitmap_shift_left(unsigned long *dst,
+
+void __bitmap_shift_left(unsigned long *dst,
 			const unsigned long *src, int shift, int bits)
 {
 	int k, lim = BITS_TO_LONGS(bits), left = bits % BITS_PER_LONG;
@@ -149,9 +177,9 @@
 	if (off)
 		memset(dst, 0, off*sizeof(unsigned long));
 }
-EXPORT_SYMBOL(bitmap_shift_left);
+EXPORT_SYMBOL(__bitmap_shift_left);
 
-void bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
+void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
 				const unsigned long *bitmap2, int bits)
 {
 	int k;
@@ -160,9 +188,9 @@
 	for (k = 0; k < nr; k++)
 		dst[k] = bitmap1[k] & bitmap2[k];
 }
-EXPORT_SYMBOL(bitmap_and);
+EXPORT_SYMBOL(__bitmap_and);
 
-void bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
+void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
 				const unsigned long *bitmap2, int bits)
 {
 	int k;
@@ -171,10 +199,62 @@
 	for (k = 0; k < nr; k++)
 		dst[k] = bitmap1[k] | bitmap2[k];
 }
-EXPORT_SYMBOL(bitmap_or);
+EXPORT_SYMBOL(__bitmap_or);
+
+void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
+				const unsigned long *bitmap2, int bits)
+{
+	int k;
+	int nr = BITS_TO_LONGS(bits);
+
+	for (k = 0; k < nr; k++)
+		dst[k] = bitmap1[k] ^ bitmap2[k];
+}
+EXPORT_SYMBOL(__bitmap_xor);
+
+void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
+				const unsigned long *bitmap2, int bits)
+{
+	int k;
+	int nr = BITS_TO_LONGS(bits);
+
+	for (k = 0; k < nr; k++)
+		dst[k] = bitmap1[k] & ~bitmap2[k];
+}
+EXPORT_SYMBOL(__bitmap_andnot);
+
+int __bitmap_intersects(const unsigned long *bitmap1,
+				const unsigned long *bitmap2, int bits)
+{
+	int k, lim = bits/BITS_PER_LONG;
+	for (k = 0; k < lim; ++k)
+		if (bitmap1[k] & bitmap2[k])
+			return 1;
+
+	if (bits % BITS_PER_LONG)
+		if ((bitmap1[k] & bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits))
+			return 1;
+	return 0;
+}
+EXPORT_SYMBOL(__bitmap_intersects);
+
+int __bitmap_subset(const unsigned long *bitmap1,
+				const unsigned long *bitmap2, int bits)
+{
+	int k, lim = bits/BITS_PER_LONG;
+	for (k = 0; k < lim; ++k)
+		if (bitmap1[k] & ~bitmap2[k])
+			return 0;
+
+	if (bits % BITS_PER_LONG)
+		if ((bitmap1[k] & ~bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits))
+			return 0;
+	return 1;
+}
+EXPORT_SYMBOL(__bitmap_subset);
 
 #if BITS_PER_LONG == 32
-int bitmap_weight(const unsigned long *bitmap, int bits)
+int __bitmap_weight(const unsigned long *bitmap, int bits)
 {
 	int k, w = 0, lim = bits/BITS_PER_LONG;
 
@@ -182,13 +262,12 @@
 		w += hweight32(bitmap[k]);
 
 	if (bits % BITS_PER_LONG)
-		w += hweight32(bitmap[k] &
-				((1UL << (bits % BITS_PER_LONG)) - 1));
+		w += hweight32(bitmap[k] & BITMAP_LAST_WORD_MASK(bits));
 
 	return w;
 }
 #else
-int bitmap_weight(const unsigned long *bitmap, int bits)
+int __bitmap_weight(const unsigned long *bitmap, int bits)
 {
 	int k, w = 0, lim = bits/BITS_PER_LONG;
 
@@ -196,13 +275,12 @@
 		w += hweight64(bitmap[k]);
 
 	if (bits % BITS_PER_LONG)
-		w += hweight64(bitmap[k] &
-				((1UL << (bits % BITS_PER_LONG)) - 1));
+		w += hweight64(bitmap[k] & BITMAP_LAST_WORD_MASK(bits));
 
 	return w;
 }
 #endif
-EXPORT_SYMBOL(bitmap_weight);
+EXPORT_SYMBOL(__bitmap_weight);
 
 /*
  * Bitmap printing & parsing functions: first version by Bill Irwin,
@@ -319,7 +397,7 @@
 		if (nchunks == 0 && chunk == 0)
 			continue;
 
-		bitmap_shift_left(maskp, maskp, CHUNKSZ, nmaskbits);
+		__bitmap_shift_left(maskp, maskp, CHUNKSZ, nmaskbits);
 		*maskp |= chunk;
 		nchunks++;
 		nbits += (nchunks == 1) ? nbits_to_hold_value(chunk) : CHUNKSZ;
--- diff/lib/idr.c	2004-05-19 22:13:10.000000000 +0100
+++ source/lib/idr.c	2004-07-01 21:32:52.000000000 +0100
@@ -27,15 +27,6 @@
  * so you don't need to be too concerned about locking and conflicts
  * with the slab allocator.
 
- * A word on reuse.  We reuse empty id slots as soon as we can, always
- * using the lowest one available.  But we also merge a counter in the
- * high bits of the id.  The counter is RESERVED_ID_BITS (8 at this time)
- * long.  This means that if you allocate and release the same id in a 
- * loop we will reuse an id after about 256 times around the loop.  The
- * word about is used here as we will NOT return a valid id of -1 so if
- * you loop on the largest possible id (and that is 24 bits, wow!) we
- * will kick the counter to avoid -1.  (Paranoid?  You bet!)
- *
  * What you need to do is, since we don't keep the counter as part of
  * id / ptr pair, to keep a copy of it in the pointed to structure
  * (or else where) so that when you ask for a ptr you can varify that
@@ -70,14 +61,21 @@
  *   sleep, so must not be called with any spinlocks held.  If the system is
  *   REALLY out of memory this function returns 0, other wise 1.
 
- * int idr_get_new(struct idr *idp, void *ptr);
+ * int idr_get_new(struct idr *idp, void *ptr, int *id);
  
  *   This is the allocate id function.  It should be called with any
  *   required locks.  In fact, in the SMP case, you MUST lock prior to
- *   calling this function to avoid possible out of memory problems.  If
- *   memory is required, it will return a -1, in which case you should
- *   unlock and go back to the idr_pre_get() call.  ptr is the pointer
- *   you want associated with the id.  In other words:
+ *   calling this function to avoid possible out of memory problems.
+ *   If memory is required, it will return -EAGAIN, you should unlock
+ *   and go back to the idr_pre_get() call.  If the idr is full, it
+ *   will return a -ENOSPC.  ptr is the pointer you want associated
+ *   with the id.  The value is returned in the "id" field.  idr_get_new()
+ *   returns a value in the range 0 ... 0x7fffffff
+
+ * int idr_get_new_above(struct idr *idp, void *ptr, int start_id, int *id);
+
+ *   Like idr_get_new(), but the returned id is guaranteed to be at or
+ *   above start_id.
 
  * void *idr_find(struct idr *idp, int id);
  
@@ -92,6 +90,10 @@
  *   removes the given id, freeing that slot and any memory that may
  *   now be unused.  See idr_find() for locking restrictions.
 
+ * int idr_full(struct idr *idp);
+
+ *   Returns true if the idr is full and false if not.
+
  */
 
 
@@ -115,7 +117,7 @@
 
 	spin_lock(&idp->lock);
 	if (!(p = idp->id_free))
-		BUG();
+		return NULL;
 	idp->id_free = p->ary[0];
 	idp->id_free_cnt--;
 	p->ary[0] = 0;
@@ -181,8 +183,8 @@
 			sh = IDR_BITS*l;
 			id = ((id >> sh) ^ n ^ m) << sh;
 		}
-		if (id >= MAX_ID_BIT)
-			return -1;
+		if ((id >= MAX_ID_BIT) || (id < 0))
+			return -3;
 		if (l == 0)
 			break;
 		/*
@@ -220,7 +222,7 @@
 	return(id);
 }
 
-int idr_get_new_above(struct idr *idp, void *ptr, int starting_id)
+static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id)
 {
 	struct idr_layer *p, *new;
 	int layers, v, id;
@@ -238,7 +240,7 @@
 	 * Add a new layer to the top of the tree if the requested
 	 * id is larger than the currently allocated space.
 	 */
-	while (id >= (1 << (layers*IDR_BITS))) {
+	while ((layers < MAX_LEVEL) && (id >= (1 << (layers*IDR_BITS)))) {
 		layers++;
 		if (!p->count)
 			continue;
@@ -266,23 +268,47 @@
 	v = sub_alloc(idp, ptr, &id);
 	if (v == -2)
 		goto build_up;
-	if ( likely(v >= 0 )) {
-		idp->count++;
-		v += (idp->count << MAX_ID_SHIFT);
-		if ( unlikely( v == -1 ))
-		     v += (1L << MAX_ID_SHIFT);
-	}
 	return(v);
 }
+
+int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id)
+{
+	int rv;
+	rv = idr_get_new_above_int(idp, ptr, starting_id);
+	/*
+	 * This is a cheap hack until the IDR code can be fixed to
+	 * return proper error values.
+	 */
+	if (rv < 0) {
+		if (rv == -1)
+			return -EAGAIN;
+		else /* Will be -3 */
+			return -ENOSPC;
+	}
+	*id = rv;
+	return 0;
+}
 EXPORT_SYMBOL(idr_get_new_above);
 
-int idr_get_new(struct idr *idp, void *ptr)
+int idr_get_new(struct idr *idp, void *ptr, int *id)
 {
-	return idr_get_new_above(idp, ptr, 0);
+	int rv;
+	rv = idr_get_new_above_int(idp, ptr, 0);
+	/*
+	 * This is a cheap hack until the IDR code can be fixed to
+	 * return proper error values.
+	 */
+	if (rv < 0) {
+		if (rv == -1)
+			return -EAGAIN;
+		else /* Will be -3 */
+			return -ENOSPC;
+	}
+	*id = rv;
+	return 0;
 }
 EXPORT_SYMBOL(idr_get_new);
 
-
 static void sub_remove(struct idr *idp, int shift, int id)
 {
 	struct idr_layer *p = idp->top;
@@ -311,10 +337,14 @@
 			idp->layers = 0;
 	}
 }
+
 void idr_remove(struct idr *idp, int id)
 {
 	struct idr_layer *p;
 
+	/* Mask off upper bits we don't use for the search. */
+	id &= MAX_ID_MASK;
+
 	sub_remove(idp, (idp->layers - 1) * IDR_BITS, id);
 	if ( idp->top && idp->top->count == 1 && 
 	     (idp->layers > 1) &&
@@ -350,6 +380,9 @@
 	if ( unlikely( (id & ~(~0 << MAX_ID_SHIFT)) >> (n + IDR_BITS)))
 	     return NULL;
 #endif
+	/* Mask off upper bits we don't use for the search. */
+	id &= MAX_ID_MASK;
+
 	while (n > 0 && p) {
 		n -= IDR_BITS;
 		p = p->ary[(id >> n) & IDR_MASK];
--- diff/lib/kobject.c	2004-06-30 14:26:02.000000000 +0100
+++ source/lib/kobject.c	2004-07-01 21:32:52.000000000 +0100
@@ -37,7 +37,7 @@
 	int i;
 	
 	if (t && t->default_attrs) {
-		for (i = 0; (attr = t->default_attrs[i]); i++) {
+		for (i = 0; (attr = t->default_attrs[i]) != NULL; i++) {
 			if ((error = sysfs_create_file(kobj,attr)))
 				break;
 		}
--- diff/lib/radix-tree.c	2004-06-30 14:26:02.000000000 +0100
+++ source/lib/radix-tree.c	2004-07-01 21:32:52.000000000 +0100
@@ -136,13 +136,12 @@
 
 static inline void tag_set(struct radix_tree_node *node, int tag, int offset)
 {
-	if (!test_bit(offset, &node->tags[tag][0]))
-		__set_bit(offset, &node->tags[tag][0]);
+	set_bit(offset, &node->tags[tag][0]);
 }
 
 static inline void tag_clear(struct radix_tree_node *node, int tag, int offset)
 {
-	__clear_bit(offset, &node->tags[tag][0]);
+	clear_bit(offset, &node->tags[tag][0]);
 }
 
 static inline int tag_get(struct radix_tree_node *node, int tag, int offset)
@@ -321,6 +320,11 @@
  *
  *	Returns the address of the tagged item.   Setting a tag on a not-present
  *	item is a bug.
+ *
+ *	radix_tree_tag_set() atomically sets the tag and does not actually
+ *	change the overall tree structure.  Consequently it is sufficient that
+ *	the caller use an rwlock in read-mode while running
+ *	radix_tree_tag_set().
  */
 void *radix_tree_tag_set(struct radix_tree_root *root,
 			unsigned long index, int tag)
@@ -362,6 +366,11 @@
  *
  *	Returns the address of the tagged item on success, else NULL.  ie:
  *	has the same return value and semantics as radix_tree_lookup().
+ *
+ *	radix_tree_tag_clear() atomically sets the tag and does not actually
+ *	change the overall tree structure.  Consequently it is sufficient that
+ *	the caller use an rwlock in read-mode while running
+ *	radix_tree_tag_clear().
  */
 void *radix_tree_tag_clear(struct radix_tree_root *root,
 			unsigned long index, int tag)
--- diff/lib/rbtree.c	2004-05-19 22:13:10.000000000 +0100
+++ source/lib/rbtree.c	2004-07-01 21:32:52.000000000 +0100
@@ -235,7 +235,7 @@
 		struct rb_node *old = node, *left;
 
 		node = node->rb_right;
-		while ((left = node->rb_left))
+		while ((left = node->rb_left) != NULL)
 			node = left;
 		child = node->rb_right;
 		parent = node->rb_parent;
--- diff/lib/rwsem-spinlock.c	2004-05-19 22:13:10.000000000 +0100
+++ source/lib/rwsem-spinlock.c	2004-07-01 21:32:52.000000000 +0100
@@ -1,5 +1,5 @@
-/* rwsem-spinlock.c: R/W semaphores: contention handling functions for generic spinlock
- *                                   implementation
+/* rwsem-spinlock.c: R/W semaphores: contention handling functions for
+ * generic spinlock implementation
  *
  * Copyright (c) 2001   David Howells (dhowells@redhat.com).
  * - Derived partially from idea by Andrea Arcangeli <andrea@suse.de>
@@ -10,9 +10,9 @@
 #include <linux/module.h>
 
 struct rwsem_waiter {
-	struct list_head	list;
-	struct task_struct	*task;
-	unsigned int		flags;
+	struct list_head list;
+	struct task_struct *task;
+	unsigned int flags;
 #define RWSEM_WAITING_FOR_READ	0x00000001
 #define RWSEM_WAITING_FOR_WRITE	0x00000002
 };
@@ -22,7 +22,8 @@
 {
 	if (sem->debug)
 		printk("[%d] %s({%d,%d})\n",
-		       current->pid,str,sem->activity,list_empty(&sem->wait_list)?0:1);
+		       current->pid, str, sem->activity,
+		       list_empty(&sem->wait_list) ? 0 : 1);
 }
 #endif
 
@@ -40,7 +41,7 @@
 }
 
 /*
- * handle the lock being released whilst there are processes blocked on it that can now run
+ * handle the lock release when processes blocked on it that can now run
  * - if we come here, then:
  *   - the 'active count' _reached_ zero
  *   - the 'waiting count' is non-zero
@@ -48,15 +49,16 @@
  * - woken process blocks are discarded from the list after having task zeroed
  * - writers are only woken if wakewrite is non-zero
  */
-static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int wakewrite)
+static inline struct rw_semaphore *
+__rwsem_do_wake(struct rw_semaphore *sem, int wakewrite)
 {
 	struct rwsem_waiter *waiter;
 	struct task_struct *tsk;
 	int woken;
 
-	rwsemtrace(sem,"Entering __rwsem_do_wake");
+	rwsemtrace(sem, "Entering __rwsem_do_wake");
 
-	waiter = list_entry(sem->wait_list.next,struct rwsem_waiter,list);
+	waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list);
 
 	if (!wakewrite) {
 		if (waiter->flags & RWSEM_WAITING_FOR_WRITE)
@@ -64,14 +66,16 @@
 		goto dont_wake_writers;
 	}
 
-	/* if we are allowed to wake writers try to grant a single write lock if there's a
-	 * writer at the front of the queue
-	 * - we leave the 'waiting count' incremented to signify potential contention
+	/* if we are allowed to wake writers try to grant a single write lock
+	 * if there's a writer at the front of the queue
+	 * - we leave the 'waiting count' incremented to signify potential
+	 *   contention
 	 */
 	if (waiter->flags & RWSEM_WAITING_FOR_WRITE) {
 		sem->activity = -1;
 		list_del(&waiter->list);
 		tsk = waiter->task;
+		/* Don't touch waiter after ->task has been NULLed */
 		mb();
 		waiter->task = NULL;
 		wake_up_process(tsk);
@@ -79,10 +83,10 @@
 		goto out;
 	}
 
-	/* grant an infinite number of read locks to the readers at the front of the queue */
+	/* grant an infinite number of read locks to the front of the queue */
  dont_wake_writers:
 	woken = 0;
-	while (waiter->flags&RWSEM_WAITING_FOR_READ) {
+	while (waiter->flags & RWSEM_WAITING_FOR_READ) {
 		struct list_head *next = waiter->list.next;
 
 		list_del(&waiter->list);
@@ -94,27 +98,28 @@
 		woken++;
 		if (list_empty(&sem->wait_list))
 			break;
-		waiter = list_entry(next,struct rwsem_waiter,list);
+		waiter = list_entry(next, struct rwsem_waiter, list);
 	}
 
 	sem->activity += woken;
 
  out:
-	rwsemtrace(sem,"Leaving __rwsem_do_wake");
+	rwsemtrace(sem, "Leaving __rwsem_do_wake");
 	return sem;
 }
 
 /*
  * wake a single writer
  */
-static inline struct rw_semaphore *__rwsem_wake_one_writer(struct rw_semaphore *sem)
+static inline struct rw_semaphore *
+__rwsem_wake_one_writer(struct rw_semaphore *sem)
 {
 	struct rwsem_waiter *waiter;
 	struct task_struct *tsk;
 
 	sem->activity = -1;
 
-	waiter = list_entry(sem->wait_list.next,struct rwsem_waiter,list);
+	waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list);
 	list_del(&waiter->list);
 
 	tsk = waiter->task;
@@ -128,16 +133,16 @@
 /*
  * get a read lock on the semaphore
  */
-void fastcall __down_read(struct rw_semaphore *sem)
+void fastcall __sched __down_read(struct rw_semaphore *sem)
 {
 	struct rwsem_waiter waiter;
 	struct task_struct *tsk;
 
-	rwsemtrace(sem,"Entering __down_read");
+	rwsemtrace(sem, "Entering __down_read");
 
 	spin_lock(&sem->wait_lock);
 
-	if (sem->activity>=0 && list_empty(&sem->wait_list)) {
+	if (sem->activity >= 0 && list_empty(&sem->wait_list)) {
 		/* granted */
 		sem->activity++;
 		spin_unlock(&sem->wait_lock);
@@ -145,14 +150,14 @@
 	}
 
 	tsk = current;
-	set_task_state(tsk,TASK_UNINTERRUPTIBLE);
+	set_task_state(tsk, TASK_UNINTERRUPTIBLE);
 
 	/* set up my own style of waitqueue */
 	waiter.task = tsk;
 	waiter.flags = RWSEM_WAITING_FOR_READ;
 	get_task_struct(tsk);
 
-	list_add_tail(&waiter.list,&sem->wait_list);
+	list_add_tail(&waiter.list, &sem->wait_list);
 
 	/* we don't need to touch the semaphore struct anymore */
 	spin_unlock(&sem->wait_lock);
@@ -168,7 +173,7 @@
 	tsk->state = TASK_RUNNING;
 
  out:
-	rwsemtrace(sem,"Leaving __down_read");
+	rwsemtrace(sem, "Leaving __down_read");
 }
 
 /*
@@ -177,11 +182,11 @@
 int fastcall __down_read_trylock(struct rw_semaphore *sem)
 {
 	int ret = 0;
-	rwsemtrace(sem,"Entering __down_read_trylock");
+	rwsemtrace(sem, "Entering __down_read_trylock");
 
 	spin_lock(&sem->wait_lock);
 
-	if (sem->activity>=0 && list_empty(&sem->wait_list)) {
+	if (sem->activity >= 0 && list_empty(&sem->wait_list)) {
 		/* granted */
 		sem->activity++;
 		ret = 1;
@@ -189,24 +194,24 @@
 
 	spin_unlock(&sem->wait_lock);
 
-	rwsemtrace(sem,"Leaving __down_read_trylock");
+	rwsemtrace(sem, "Leaving __down_read_trylock");
 	return ret;
 }
 
 /*
  * get a write lock on the semaphore
- * - note that we increment the waiting count anyway to indicate an exclusive lock
+ * - we increment the waiting count anyway to indicate an exclusive lock
  */
-void fastcall __down_write(struct rw_semaphore *sem)
+void fastcall __sched __down_write(struct rw_semaphore *sem)
 {
 	struct rwsem_waiter waiter;
 	struct task_struct *tsk;
 
-	rwsemtrace(sem,"Entering __down_write");
+	rwsemtrace(sem, "Entering __down_write");
 
 	spin_lock(&sem->wait_lock);
 
-	if (sem->activity==0 && list_empty(&sem->wait_list)) {
+	if (sem->activity == 0 && list_empty(&sem->wait_list)) {
 		/* granted */
 		sem->activity = -1;
 		spin_unlock(&sem->wait_lock);
@@ -214,14 +219,14 @@
 	}
 
 	tsk = current;
-	set_task_state(tsk,TASK_UNINTERRUPTIBLE);
+	set_task_state(tsk, TASK_UNINTERRUPTIBLE);
 
 	/* set up my own style of waitqueue */
 	waiter.task = tsk;
 	waiter.flags = RWSEM_WAITING_FOR_WRITE;
 	get_task_struct(tsk);
 
-	list_add_tail(&waiter.list,&sem->wait_list);
+	list_add_tail(&waiter.list, &sem->wait_list);
 
 	/* we don't need to touch the semaphore struct anymore */
 	spin_unlock(&sem->wait_lock);
@@ -237,7 +242,7 @@
 	tsk->state = TASK_RUNNING;
 
  out:
-	rwsemtrace(sem,"Leaving __down_write");
+	rwsemtrace(sem, "Leaving __down_write");
 }
 
 /*
@@ -246,11 +251,11 @@
 int fastcall __down_write_trylock(struct rw_semaphore *sem)
 {
 	int ret = 0;
-	rwsemtrace(sem,"Entering __down_write_trylock");
+	rwsemtrace(sem, "Entering __down_write_trylock");
 
 	spin_lock(&sem->wait_lock);
 
-	if (sem->activity==0 && list_empty(&sem->wait_list)) {
+	if (sem->activity == 0 && list_empty(&sem->wait_list)) {
 		/* granted */
 		sem->activity = -1;
 		ret = 1;
@@ -258,7 +263,7 @@
 
 	spin_unlock(&sem->wait_lock);
 
-	rwsemtrace(sem,"Leaving __down_write_trylock");
+	rwsemtrace(sem, "Leaving __down_write_trylock");
 	return ret;
 }
 
@@ -267,16 +272,16 @@
  */
 void fastcall __up_read(struct rw_semaphore *sem)
 {
-	rwsemtrace(sem,"Entering __up_read");
+	rwsemtrace(sem, "Entering __up_read");
 
 	spin_lock(&sem->wait_lock);
 
-	if (--sem->activity==0 && !list_empty(&sem->wait_list))
+	if (--sem->activity == 0 && !list_empty(&sem->wait_list))
 		sem = __rwsem_wake_one_writer(sem);
 
 	spin_unlock(&sem->wait_lock);
 
-	rwsemtrace(sem,"Leaving __up_read");
+	rwsemtrace(sem, "Leaving __up_read");
 }
 
 /*
@@ -284,7 +289,7 @@
  */
 void fastcall __up_write(struct rw_semaphore *sem)
 {
-	rwsemtrace(sem,"Entering __up_write");
+	rwsemtrace(sem, "Entering __up_write");
 
 	spin_lock(&sem->wait_lock);
 
@@ -294,7 +299,7 @@
 
 	spin_unlock(&sem->wait_lock);
 
-	rwsemtrace(sem,"Leaving __up_write");
+	rwsemtrace(sem, "Leaving __up_write");
 }
 
 /*
@@ -303,17 +308,17 @@
  */
 void fastcall __downgrade_write(struct rw_semaphore *sem)
 {
-	rwsemtrace(sem,"Entering __downgrade_write");
+	rwsemtrace(sem, "Entering __downgrade_write");
 
 	spin_lock(&sem->wait_lock);
 
 	sem->activity = 1;
 	if (!list_empty(&sem->wait_list))
-		sem = __rwsem_do_wake(sem,0);
+		sem = __rwsem_do_wake(sem, 0);
 
 	spin_unlock(&sem->wait_lock);
 
-	rwsemtrace(sem,"Leaving __downgrade_write");
+	rwsemtrace(sem, "Leaving __downgrade_write");
 }
 
 EXPORT_SYMBOL(init_rwsem);
--- diff/lib/rwsem.c	2004-06-30 14:26:02.000000000 +0100
+++ source/lib/rwsem.c	2004-07-01 21:32:52.000000000 +0100
@@ -9,9 +9,9 @@
 #include <linux/module.h>
 
 struct rwsem_waiter {
-	struct list_head	list;
-	struct task_struct	*task;
-	unsigned int		flags;
+	struct list_head list;
+	struct task_struct *task;
+	unsigned int flags;
 #define RWSEM_WAITING_FOR_READ	0x00000001
 #define RWSEM_WAITING_FOR_WRITE	0x00000002
 };
@@ -20,31 +20,32 @@
 #undef rwsemtrace
 void rwsemtrace(struct rw_semaphore *sem, const char *str)
 {
-	printk("sem=%p\n",sem);
-	printk("(sem)=%08lx\n",sem->count);
+	printk("sem=%p\n", sem);
+	printk("(sem)=%08lx\n", sem->count);
 	if (sem->debug)
-		printk("[%d] %s({%08lx})\n",current->pid,str,sem->count);
+		printk("[%d] %s({%08lx})\n", current->pid, str, sem->count);
 }
 #endif
 
 /*
- * handle the lock being released whilst there are processes blocked on it that can now run
+ * handle the lock release when processes blocked on it that can now run
  * - if we come here from up_xxxx(), then:
- *   - the 'active part' of the count (&0x0000ffff) had reached zero (but may have changed)
- *   - the 'waiting part' of the count (&0xffff0000) is negative (and will still be so)
+ *   - the 'active part' of count (&0x0000ffff) reached 0 (but may have changed)
+ *   - the 'waiting part' of count (&0xffff0000) is -ve (and will still be so)
  *   - there must be someone on the queue
  * - the spinlock must be held by the caller
  * - woken process blocks are discarded from the list after having task zeroed
  * - writers are only woken if downgrading is false
  */
-static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int downgrading)
+static inline struct rw_semaphore *
+__rwsem_do_wake(struct rw_semaphore *sem, int downgrading)
 {
 	struct rwsem_waiter *waiter;
 	struct task_struct *tsk;
 	struct list_head *next;
 	signed long oldcount, woken, loop;
 
-	rwsemtrace(sem,"Entering __rwsem_do_wake");
+	rwsemtrace(sem, "Entering __rwsem_do_wake");
 
 	if (downgrading)
 		goto dont_wake_writers;
@@ -53,19 +54,24 @@
 	 * if we can transition the active part of the count from 0 -> 1
 	 */
  try_again:
-	oldcount = rwsem_atomic_update(RWSEM_ACTIVE_BIAS,sem) - RWSEM_ACTIVE_BIAS;
+	oldcount = rwsem_atomic_update(RWSEM_ACTIVE_BIAS, sem)
+						- RWSEM_ACTIVE_BIAS;
 	if (oldcount & RWSEM_ACTIVE_MASK)
 		goto undo;
 
-	waiter = list_entry(sem->wait_list.next,struct rwsem_waiter,list);
+	waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list);
 
-	/* try to grant a single write lock if there's a writer at the front of the queue
-	 * - note we leave the 'active part' of the count incremented by 1 and the waiting part
-	 *   incremented by 0x00010000
+	/* try to grant a single write lock if there's a writer at the front
+	 * of the queue - note we leave the 'active part' of the count
+	 * incremented by 1 and the waiting part incremented by 0x00010000
 	 */
 	if (!(waiter->flags & RWSEM_WAITING_FOR_WRITE))
 		goto readers_only;
 
+	/* We must be careful not to touch 'waiter' after we set ->task = NULL.
+	 * It is an allocated on the waiter's stack and may become invalid at
+	 * any time after that point (due to a wakeup from another source).
+	 */
 	list_del(&waiter->list);
 	tsk = waiter->task;
 	mb();
@@ -76,7 +82,7 @@
 
 	/* don't want to wake any writers */
  dont_wake_writers:
-	waiter = list_entry(sem->wait_list.next,struct rwsem_waiter,list);
+	waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list);
 	if (waiter->flags & RWSEM_WAITING_FOR_WRITE)
 		goto out;
 
@@ -90,23 +96,25 @@
 	do {
 		woken++;
 
-		if (waiter->list.next==&sem->wait_list)
+		if (waiter->list.next == &sem->wait_list)
 			break;
 
-		waiter = list_entry(waiter->list.next,struct rwsem_waiter,list);
+		waiter = list_entry(waiter->list.next,
+					struct rwsem_waiter, list);
 
 	} while (waiter->flags & RWSEM_WAITING_FOR_READ);
 
 	loop = woken;
 	woken *= RWSEM_ACTIVE_BIAS - RWSEM_WAITING_BIAS;
 	if (!downgrading)
-		woken -= RWSEM_ACTIVE_BIAS; /* we'd already done one increment
-					     * earlier */
-	rwsem_atomic_add(woken,sem);
+		/* we'd already done one increment earlier */
+		woken -= RWSEM_ACTIVE_BIAS;
+
+	rwsem_atomic_add(woken, sem);
 
 	next = sem->wait_list.next;
-	for (; loop>0; loop--) {
-		waiter = list_entry(next,struct rwsem_waiter,list);
+	for (; loop > 0; loop--) {
+		waiter = list_entry(next, struct rwsem_waiter, list);
 		next = waiter->list.next;
 		tsk = waiter->task;
 		mb();
@@ -119,12 +127,12 @@
 	next->prev = &sem->wait_list;
 
  out:
-	rwsemtrace(sem,"Leaving __rwsem_do_wake");
+	rwsemtrace(sem, "Leaving __rwsem_do_wake");
 	return sem;
 
 	/* undo the change to count, but check for a transition 1->0 */
  undo:
-	if (rwsem_atomic_update(-RWSEM_ACTIVE_BIAS,sem)!=0)
+	if (rwsem_atomic_update(-RWSEM_ACTIVE_BIAS, sem) != 0)
 		goto out;
 	goto try_again;
 }
@@ -132,28 +140,26 @@
 /*
  * wait for a lock to be granted
  */
-static inline struct rw_semaphore *rwsem_down_failed_common(struct rw_semaphore *sem,
-								 struct rwsem_waiter *waiter,
-								 signed long adjustment)
+static inline struct rw_semaphore *
+rwsem_down_failed_common(struct rw_semaphore *sem,
+			struct rwsem_waiter *waiter, signed long adjustment)
 {
 	struct task_struct *tsk = current;
 	signed long count;
 
-	set_task_state(tsk,TASK_UNINTERRUPTIBLE);
+	set_task_state(tsk, TASK_UNINTERRUPTIBLE);
 
 	/* set up my own style of waitqueue */
 	spin_lock(&sem->wait_lock);
 	waiter->task = tsk;
 	get_task_struct(tsk);
 
-	list_add_tail(&waiter->list,&sem->wait_list);
+	list_add_tail(&waiter->list, &sem->wait_list);
 
-	/* note that we're now waiting on the lock, but no longer actively read-locking */
-	count = rwsem_atomic_update(adjustment,sem);
+	/* we're now waiting on the lock, but no longer actively read-locking */
+	count = rwsem_atomic_update(adjustment, sem);
 
-	/* if there are no longer active locks, wake the front queued process(es) up
-	 * - it might even be this process, since the waker takes a more active part
-	 */
+	/* if there are no active locks, wake the front queued process(es) up */
 	if (!(count & RWSEM_ACTIVE_MASK))
 		sem = __rwsem_do_wake(sem, 0);
 
@@ -175,42 +181,45 @@
 /*
  * wait for the read lock to be granted
  */
-struct rw_semaphore fastcall __sched *rwsem_down_read_failed(struct rw_semaphore *sem)
+struct rw_semaphore fastcall __sched *
+rwsem_down_read_failed(struct rw_semaphore *sem)
 {
 	struct rwsem_waiter waiter;
 
-	rwsemtrace(sem,"Entering rwsem_down_read_failed");
+	rwsemtrace(sem, "Entering rwsem_down_read_failed");
 
 	waiter.flags = RWSEM_WAITING_FOR_READ;
-	rwsem_down_failed_common(sem,&waiter,RWSEM_WAITING_BIAS-RWSEM_ACTIVE_BIAS);
+	rwsem_down_failed_common(sem, &waiter,
+				RWSEM_WAITING_BIAS - RWSEM_ACTIVE_BIAS);
 
-	rwsemtrace(sem,"Leaving rwsem_down_read_failed");
+	rwsemtrace(sem, "Leaving rwsem_down_read_failed");
 	return sem;
 }
 
 /*
  * wait for the write lock to be granted
  */
-struct rw_semaphore fastcall __sched *rwsem_down_write_failed(struct rw_semaphore *sem)
+struct rw_semaphore fastcall __sched *
+rwsem_down_write_failed(struct rw_semaphore *sem)
 {
 	struct rwsem_waiter waiter;
 
-	rwsemtrace(sem,"Entering rwsem_down_write_failed");
+	rwsemtrace(sem, "Entering rwsem_down_write_failed");
 
 	waiter.flags = RWSEM_WAITING_FOR_WRITE;
-	rwsem_down_failed_common(sem,&waiter,-RWSEM_ACTIVE_BIAS);
+	rwsem_down_failed_common(sem, &waiter, -RWSEM_ACTIVE_BIAS);
 
-	rwsemtrace(sem,"Leaving rwsem_down_write_failed");
+	rwsemtrace(sem, "Leaving rwsem_down_write_failed");
 	return sem;
 }
 
 /*
  * handle waking up a waiter on the semaphore
- * - up_read/up_write has decremented the active part of the count if we come here
+ * - up_read/up_write has decremented the active part of count if we come here
  */
 struct rw_semaphore fastcall *rwsem_wake(struct rw_semaphore *sem)
 {
-	rwsemtrace(sem,"Entering rwsem_wake");
+	rwsemtrace(sem, "Entering rwsem_wake");
 
 	spin_lock(&sem->wait_lock);
 
@@ -220,19 +229,19 @@
 
 	spin_unlock(&sem->wait_lock);
 
-	rwsemtrace(sem,"Leaving rwsem_wake");
+	rwsemtrace(sem, "Leaving rwsem_wake");
 
 	return sem;
 }
 
 /*
  * downgrade a write lock into a read lock
- * - caller incremented waiting part of count, and discovered it to be still negative
+ * - caller incremented waiting part of count and discovered it still negative
  * - just wake up any readers at the front of the queue
  */
 struct rw_semaphore fastcall *rwsem_downgrade_wake(struct rw_semaphore *sem)
 {
-	rwsemtrace(sem,"Entering rwsem_downgrade_wake");
+	rwsemtrace(sem, "Entering rwsem_downgrade_wake");
 
 	spin_lock(&sem->wait_lock);
 
@@ -242,7 +251,7 @@
 
 	spin_unlock(&sem->wait_lock);
 
-	rwsemtrace(sem,"Leaving rwsem_downgrade_wake");
+	rwsemtrace(sem, "Leaving rwsem_downgrade_wake");
 	return sem;
 }
 
--- diff/lib/string.c	2004-06-30 14:26:02.000000000 +0100
+++ source/lib/string.c	2004-07-01 21:32:52.000000000 +0100
@@ -162,7 +162,7 @@
 	if (count) {
 		while (*dest)
 			dest++;
-		while ((*dest++ = *src++)) {
+		while ((*dest++ = *src++) != 0) {
 			if (--count == 0) {
 				*dest = '\0';
 				break;
--- diff/lib/vsprintf.c	2004-05-19 22:13:10.000000000 +0100
+++ source/lib/vsprintf.c	2004-07-01 21:32:52.000000000 +0100
@@ -40,11 +40,14 @@
 		if (*cp == '0') {
 			base = 8;
 			cp++;
-			if ((*cp == 'x') && isxdigit(cp[1])) {
+			if ((toupper(*cp) == 'X') && isxdigit(cp[1])) {
 				cp++;
 				base = 16;
 			}
 		}
+	} else if (base == 16) {
+		if (cp[0] == '0' && toupper(cp[1]) == 'X')
+			cp += 2;
 	}
 	while (isxdigit(*cp) &&
 	       (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) {
@@ -88,11 +91,14 @@
 		if (*cp == '0') {
 			base = 8;
 			cp++;
-			if ((*cp == 'x') && isxdigit(cp[1])) {
+			if ((toupper(*cp) == 'X') && isxdigit(cp[1])) {
 				cp++;
 				base = 16;
 			}
 		}
+	} else if (base == 16) {
+		if (cp[0] == '0' && toupper(cp[1]) == 'X')
+			cp += 2;
 	}
 	while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
 	    ? toupper(*cp) : *cp)-'A'+10) < base) {
--- diff/lib/zlib_deflate/deflate.c	2004-05-19 22:13:10.000000000 +0100
+++ source/lib/zlib_deflate/deflate.c	2004-07-01 21:32:52.000000000 +0100
@@ -1262,7 +1262,7 @@
     return flush == Z_FINISH ? finish_done : block_done;
 }
 
-extern int zlib_deflate_workspacesize(void)
+int zlib_deflate_workspacesize(void)
 {
     return sizeof(deflate_workspace);
 }
--- diff/mm/bootmem.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/bootmem.c	2004-07-01 21:32:52.000000000 +0100
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/mmzone.h>
+#include <linux/module.h>
 #include <asm/dma.h>
 #include <asm/io.h>
 
@@ -27,6 +28,10 @@
 unsigned long min_low_pfn;
 unsigned long max_pfn;
 
+EXPORT_SYMBOL(max_pfn);		/* This is exported so
+				 * dma_get_required_mask(), which uses
+				 * it, can be an inline function */
+
 /* return the number of _pages_ that will be allocated for the boot bitmap */
 unsigned long __init bootmem_bootmap_pages (unsigned long pages)
 {
@@ -371,11 +376,6 @@
 	if (ptr)
 		return (ptr);
 
-	/*
-	 * Whoops, we cannot satisfy the allocation request.
-	 */
-	printk(KERN_ALERT "bootmem alloc of %lu bytes failed!\n", size);
-	panic("Out of memory");
-	return NULL;
+	return __alloc_bootmem(size, align, goal);
 }
 
--- diff/mm/filemap.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/filemap.c	2004-07-01 21:32:52.000000000 +0100
@@ -60,6 +60,7 @@
  *      ->swap_list_lock
  *        ->swap_device_lock	(exclusive_swap_page, others)
  *          ->mapping->tree_lock
+ *    ->page_map_lock()		(try_to_unmap_file)
  *
  *  ->i_sem
  *    ->i_mmap_lock		(truncate->unmap_mapping_range)
@@ -87,6 +88,13 @@
  *    ->private_lock		(try_to_unmap_one)
  *    ->tree_lock		(try_to_unmap_one)
  *    ->zone.lru_lock		(follow_page->mark_page_accessed)
+ *    ->page_map_lock()		(page_add_anon_rmap)
+ *      ->tree_lock		(page_remove_rmap->set_page_dirty)
+ *      ->private_lock		(page_remove_rmap->set_page_dirty)
+ *      ->inode_lock		(page_remove_rmap->set_page_dirty)
+ *    ->anon_vma.lock		(anon_vma_prepare)
+ *    ->inode_lock		(zap_pte_range->set_page_dirty)
+ *    ->private_lock		(zap_pte_range->__set_page_dirty_buffers)
  *
  *  ->task->proc_lock
  *    ->dcache_lock		(proc_pid_lookup)
@@ -114,9 +122,9 @@
 	if (unlikely(!PageLocked(page)))
 		PAGE_BUG(page);
 
-	spin_lock_irq(&mapping->tree_lock);
+	write_lock_irq(&mapping->tree_lock);
 	__remove_from_page_cache(page);
-	spin_unlock_irq(&mapping->tree_lock);
+	write_unlock_irq(&mapping->tree_lock);
 }
 
 static inline int sync_page(struct page *page)
@@ -192,7 +200,7 @@
 	index = start;
 	while ((nr_pages = pagevec_lookup_tag(&pvec, mapping, &index,
 			PAGECACHE_TAG_WRITEBACK,
-			min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1))) {
+			min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1)) != 0) {
 		unsigned i;
 
 		for (i = 0; i < nr_pages; i++) {
@@ -253,7 +261,7 @@
 	int error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM);
 
 	if (error == 0) {
-		spin_lock_irq(&mapping->tree_lock);
+		write_lock_irq(&mapping->tree_lock);
 		error = radix_tree_insert(&mapping->page_tree, offset, page);
 		if (!error) {
 			page_cache_get(page);
@@ -263,7 +271,7 @@
 			mapping->nrpages++;
 			pagecache_acct(1);
 		}
-		spin_unlock_irq(&mapping->tree_lock);
+		write_unlock_irq(&mapping->tree_lock);
 		radix_tree_preload_end();
 	}
 	return error;
@@ -436,11 +444,11 @@
 	 * We scan the hash list read-only. Addition to and removal from
 	 * the hash-list needs a held write-lock.
 	 */
-	spin_lock_irq(&mapping->tree_lock);
+	read_lock_irq(&mapping->tree_lock);
 	page = radix_tree_lookup(&mapping->page_tree, offset);
 	if (page)
 		page_cache_get(page);
-	spin_unlock_irq(&mapping->tree_lock);
+	read_unlock_irq(&mapping->tree_lock);
 	return page;
 }
 
@@ -453,11 +461,11 @@
 {
 	struct page *page;
 
-	spin_lock_irq(&mapping->tree_lock);
+	read_lock_irq(&mapping->tree_lock);
 	page = radix_tree_lookup(&mapping->page_tree, offset);
 	if (page && TestSetPageLocked(page))
 		page = NULL;
-	spin_unlock_irq(&mapping->tree_lock);
+	read_unlock_irq(&mapping->tree_lock);
 	return page;
 }
 
@@ -479,15 +487,15 @@
 {
 	struct page *page;
 
-	spin_lock_irq(&mapping->tree_lock);
+	read_lock_irq(&mapping->tree_lock);
 repeat:
 	page = radix_tree_lookup(&mapping->page_tree, offset);
 	if (page) {
 		page_cache_get(page);
 		if (TestSetPageLocked(page)) {
-			spin_unlock_irq(&mapping->tree_lock);
+			read_unlock_irq(&mapping->tree_lock);
 			lock_page(page);
-			spin_lock_irq(&mapping->tree_lock);
+			read_lock_irq(&mapping->tree_lock);
 
 			/* Has the page been truncated while we slept? */
 			if (page->mapping != mapping || page->index != offset) {
@@ -497,7 +505,7 @@
 			}
 		}
 	}
-	spin_unlock_irq(&mapping->tree_lock);
+	read_unlock_irq(&mapping->tree_lock);
 	return page;
 }
 
@@ -571,12 +579,12 @@
 	unsigned int i;
 	unsigned int ret;
 
-	spin_lock_irq(&mapping->tree_lock);
+	read_lock_irq(&mapping->tree_lock);
 	ret = radix_tree_gang_lookup(&mapping->page_tree,
 				(void **)pages, start, nr_pages);
 	for (i = 0; i < ret; i++)
 		page_cache_get(pages[i]);
-	spin_unlock_irq(&mapping->tree_lock);
+	read_unlock_irq(&mapping->tree_lock);
 	return ret;
 }
 
@@ -590,14 +598,14 @@
 	unsigned int i;
 	unsigned int ret;
 
-	spin_lock_irq(&mapping->tree_lock);
+	read_lock_irq(&mapping->tree_lock);
 	ret = radix_tree_gang_lookup_tag(&mapping->page_tree,
 				(void **)pages, *index, nr_pages, tag);
 	for (i = 0; i < ret; i++)
 		page_cache_get(pages[i]);
 	if (ret)
 		*index = pages[ret - 1]->index + 1;
-	spin_unlock_irq(&mapping->tree_lock);
+	read_unlock_irq(&mapping->tree_lock);
 	return ret;
 }
 
@@ -650,7 +658,8 @@
 			     read_actor_t actor)
 {
 	struct inode *inode = mapping->host;
-	unsigned long index, offset;
+	unsigned long index, end_index, offset;
+	loff_t isize;
 	struct page *cached_page;
 	int error;
 	struct file_ra_state ra = *_ra;
@@ -659,26 +668,18 @@
 	index = *ppos >> PAGE_CACHE_SHIFT;
 	offset = *ppos & ~PAGE_CACHE_MASK;
 
+	isize = i_size_read(inode);
+	end_index = isize >> PAGE_CACHE_SHIFT;
+	if (index > end_index)
+		goto out;
+
 	for (;;) {
 		struct page *page;
-		unsigned long end_index, nr, ret;
-		loff_t isize = i_size_read(inode);
-
-		end_index = isize >> PAGE_CACHE_SHIFT;
-			
-		if (index > end_index)
-			break;
-		nr = PAGE_CACHE_SIZE;
-		if (index == end_index) {
-			nr = isize & ~PAGE_CACHE_MASK;
-			if (nr <= offset)
-				break;
-		}
+		unsigned long nr, ret;
 
 		cond_resched();
 		page_cache_readahead(mapping, &ra, filp, index);
 
-		nr = nr - offset;
 find_page:
 		page = find_get_page(mapping, index);
 		if (unlikely(page == NULL)) {
@@ -688,6 +689,17 @@
 		if (!PageUptodate(page))
 			goto page_not_up_to_date;
 page_ok:
+		/* nr is the maximum number of bytes to copy from this page */
+		nr = PAGE_CACHE_SIZE;
+		if (index == end_index) {
+			nr = isize & ~PAGE_CACHE_MASK;
+			if (nr <= offset) {
+				page_cache_release(page);
+				goto out;
+			}
+		}
+		nr = nr - offset;
+
 		/* If users can be writing to this page using arbitrary
 		 * virtual addresses, take care about potential aliasing
 		 * before reading the page on the kernel side.
@@ -719,7 +731,7 @@
 		page_cache_release(page);
 		if (ret == nr && desc->count)
 			continue;
-		break;
+		goto out;
 
 page_not_up_to_date:
 		/* Get exclusive access to the page ... */
@@ -739,22 +751,41 @@
 		}
 
 readpage:
-		/* ... and start the actual read. The read will unlock the page. */
+		/* Start the actual read. The read will unlock the page. */
 		error = mapping->a_ops->readpage(filp, page);
 
-		if (!error) {
-			if (PageUptodate(page))
-				goto page_ok;
+		if (unlikely(error))
+			goto readpage_error;
+
+		if (!PageUptodate(page)) {
 			wait_on_page_locked(page);
-			if (PageUptodate(page))
-				goto page_ok;
-			error = -EIO;
+			if (!PageUptodate(page)) {
+				error = -EIO;
+				goto readpage_error;
+			}
+		}
+
+		/*
+		 * i_size must be checked after we have done ->readpage.
+		 *
+		 * Checking i_size after the readpage allows us to calculate
+		 * the correct value for "nr", which means the zero-filled
+		 * part of the page is not copied back to userspace (unless
+		 * another truncate extends the file - this is desired though).
+		 */
+		isize = i_size_read(inode);
+		end_index = isize >> PAGE_CACHE_SHIFT;
+		if (index > end_index) {
+			page_cache_release(page);
+			goto out;
 		}
+		goto page_ok;
 
+readpage_error:
 		/* UHHUH! A synchronous read error occurred. Report it */
 		desc->error = error;
 		page_cache_release(page);
-		break;
+		goto out;
 
 no_cached_page:
 		/*
@@ -765,7 +796,7 @@
 			cached_page = page_cache_alloc_cold(mapping);
 			if (!cached_page) {
 				desc->error = -ENOMEM;
-				break;
+				goto out;
 			}
 		}
 		error = add_to_page_cache_lru(cached_page, mapping,
@@ -774,13 +805,14 @@
 			if (error == -EEXIST)
 				goto find_page;
 			desc->error = error;
-			break;
+			goto out;
 		}
 		page = cached_page;
 		cached_page = NULL;
 		goto readpage;
 	}
 
+out:
 	*_ra = ra;
 
 	*ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset;
@@ -1891,7 +1923,7 @@
 		count -= written;
 	}
 
-	buf = iov->iov_base;
+	buf = iov->iov_base + written;	/* handle partial DIO write */
 	do {
 		unsigned long index;
 		unsigned long offset;
--- diff/mm/fremap.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/fremap.c	2004-07-01 21:32:52.000000000 +0100
@@ -161,6 +161,7 @@
 	unsigned long end = start + size;
 	struct vm_area_struct *vma;
 	int err = -EINVAL;
+	int has_write_lock = 0;
 
 	if (__prot)
 		return err;
@@ -181,7 +182,8 @@
 #endif
 
 	/* We need down_write() to change vma->vm_flags. */
-	down_write(&mm->mmap_sem);
+	down_read(&mm->mmap_sem);
+ retry:
 	vma = find_vma(mm, start);
 
 	/*
@@ -200,6 +202,12 @@
 		/* Must set VM_NONLINEAR before any pages are populated. */
 		if (pgoff != linear_page_index(vma, start) &&
 		    !(vma->vm_flags & VM_NONLINEAR)) {
+			if (!has_write_lock) {
+				up_read(&mm->mmap_sem);
+				down_write(&mm->mmap_sem);
+				has_write_lock = 1;
+				goto retry;
+			}
 			mapping = vma->vm_file->f_mapping;
 			spin_lock(&mapping->i_mmap_lock);
 			flush_dcache_mmap_lock(mapping);
@@ -212,8 +220,6 @@
 			spin_unlock(&mapping->i_mmap_lock);
 		}
 
-		/* ->populate can take a long time, so downgrade the lock. */
-		downgrade_write(&mm->mmap_sem);
 		err = vma->vm_ops->populate(vma, start, size,
 					    vma->vm_page_prot,
 					    pgoff, flags & MAP_NONBLOCK);
@@ -223,10 +229,11 @@
 		 * it after ->populate completes, and that would prevent
 		 * downgrading the lock.  (Locks can't be upgraded).
 		 */
+	}
+	if (likely(!has_write_lock))
 		up_read(&mm->mmap_sem);
-	} else {
+	else
 		up_write(&mm->mmap_sem);
-	}
 
 	return err;
 }
--- diff/mm/highmem.c	2004-05-19 22:13:11.000000000 +0100
+++ source/mm/highmem.c	2004-07-01 21:32:52.000000000 +0100
@@ -26,7 +26,6 @@
 #include <linux/init.h>
 #include <linux/hash.h>
 #include <linux/highmem.h>
-#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 
 static mempool_t *page_pool, *isa_page_pool;
--- diff/mm/hugetlb.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/hugetlb.c	2004-07-01 21:32:52.000000000 +0100
@@ -15,12 +15,16 @@
 static unsigned long nr_huge_pages, free_huge_pages;
 unsigned long max_huge_pages;
 static struct list_head hugepage_freelists[MAX_NUMNODES];
+static unsigned int nr_huge_pages_node[MAX_NUMNODES];
+static unsigned int free_huge_pages_node[MAX_NUMNODES];
 static spinlock_t hugetlb_lock = SPIN_LOCK_UNLOCKED;
 
 static void enqueue_huge_page(struct page *page)
 {
-	list_add(&page->lru,
-		 &hugepage_freelists[page_zone(page)->zone_pgdat->node_id]);
+	int nid = page_zone(page)->zone_pgdat->node_id;
+	list_add(&page->lru, &hugepage_freelists[nid]);
+	free_huge_pages++;
+	free_huge_pages_node[nid]++;
 }
 
 static struct page *dequeue_huge_page(void)
@@ -38,6 +42,8 @@
 		page = list_entry(hugepage_freelists[nid].next,
 				  struct page, lru);
 		list_del(&page->lru);
+		free_huge_pages--;
+		free_huge_pages_node[nid]--;
 	}
 	return page;
 }
@@ -49,6 +55,10 @@
 	page = alloc_pages_node(nid, GFP_HIGHUSER|__GFP_COMP,
 					HUGETLB_PAGE_ORDER);
 	nid = (nid + 1) % numnodes;
+	if (page) {
+		nr_huge_pages++;
+		nr_huge_pages_node[page_zone(page)->zone_pgdat->node_id]++;
+	}
 	return page;
 }
 
@@ -61,7 +71,6 @@
 
 	spin_lock(&hugetlb_lock);
 	enqueue_huge_page(page);
-	free_huge_pages++;
 	spin_unlock(&hugetlb_lock);
 }
 
@@ -76,7 +85,6 @@
 		spin_unlock(&hugetlb_lock);
 		return NULL;
 	}
-	free_huge_pages--;
 	spin_unlock(&hugetlb_lock);
 	set_page_count(page, 1);
 	page[1].mapping = (void *)free_huge_page;
@@ -119,6 +127,7 @@
 {
 	int i;
 	nr_huge_pages--;
+	nr_huge_pages_node[page_zone(page)->zone_pgdat->node_id]--;
 	for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++) {
 		page[i].flags &= ~(1 << PG_locked | 1 << PG_error | 1 << PG_referenced |
 				1 << PG_dirty | 1 << PG_active | 1 << PG_reserved |
@@ -130,27 +139,27 @@
 }
 
 #ifdef CONFIG_HIGHMEM
-static int try_to_free_low(unsigned long count)
+static void try_to_free_low(unsigned long count)
 {
-	int i;
+	int i, nid;
 	for (i = 0; i < MAX_NUMNODES; ++i) {
-		struct page *page;
-		list_for_each_entry(page, &hugepage_freelists[i], lru) {
+		struct page *page, *next;
+		list_for_each_entry_safe(page, next, &hugepage_freelists[i], lru) {
 			if (PageHighMem(page))
 				continue;
 			list_del(&page->lru);
 			update_and_free_page(page);
-			--free_huge_pages;
-			if (!--count)
-				return 0;
+			nid = page_zone(page)->zone_pgdat->node_id;
+			free_huge_pages--;
+			free_huge_pages_node[nid]--;
+			if (count >= nr_huge_pages)
+				return;
 		}
 	}
-	return count;
 }
 #else
-static inline int try_to_free_low(unsigned long count)
+static inline void try_to_free_low(unsigned long count)
 {
-	return count;
 }
 #endif
 
@@ -162,15 +171,14 @@
 			return nr_huge_pages;
 		spin_lock(&hugetlb_lock);
 		enqueue_huge_page(page);
-		free_huge_pages++;
-		nr_huge_pages++;
 		spin_unlock(&hugetlb_lock);
 	}
 	if (count >= nr_huge_pages)
 		return nr_huge_pages;
 
 	spin_lock(&hugetlb_lock);
-	for (count = try_to_free_low(count); count < nr_huge_pages; --free_huge_pages) {
+	try_to_free_low(count);
+	while (count < nr_huge_pages) {
 		struct page *page = dequeue_huge_page();
 		if (!page)
 			break;
@@ -202,6 +210,15 @@
 			HPAGE_SIZE/1024);
 }
 
+int hugetlb_report_node_meminfo(int nid, char *buf)
+{
+	return sprintf(buf,
+		"Node %d HugePages_Total: %5u\n"
+		"Node %d HugePages_Free:  %5u\n",
+		nid, nr_huge_pages_node[nid],
+		nid, free_huge_pages_node[nid]);
+}
+
 int is_hugepage_mem_enough(size_t size)
 {
 	return (size + ~HPAGE_MASK)/HPAGE_SIZE <= free_huge_pages;
--- diff/mm/memory.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/memory.c	2004-07-01 21:32:52.000000000 +0100
@@ -66,12 +66,21 @@
 #endif
 
 unsigned long num_physpages;
+/*
+ * A number of key systems in x86 including ioremap() rely on the assumption
+ * that high_memory defines the upper bound on direct map memory, then end
+ * of ZONE_NORMAL.  Under CONFIG_DISCONTIG this means that max_low_pfn and
+ * highstart_pfn must be the same; there must be no gap between ZONE_NORMAL
+ * and ZONE_HIGHMEM.
+ */
 void * high_memory;
 struct page *highmem_start_page;
+unsigned long vmalloc_earlyreserve;
 
 EXPORT_SYMBOL(num_physpages);
 EXPORT_SYMBOL(highmem_start_page);
 EXPORT_SYMBOL(high_memory);
+EXPORT_SYMBOL(vmalloc_earlyreserve);
 
 /*
  * We special-case the C-O-W ZERO_PAGE, because it's such
@@ -407,7 +416,7 @@
 				set_pte(ptep, pgoff_to_pte(page->index));
 			if (pte_dirty(pte))
 				set_page_dirty(page);
-			if (pte_young(pte) && page_mapping(page))
+			if (pte_young(pte) && !PageAnon(page))
 				mark_page_accessed(page);
 			tlb->freed++;
 			page_remove_rmap(page);
@@ -696,6 +705,7 @@
 		struct page **pages, struct vm_area_struct **vmas)
 {
 	int i;
+	int vm_io;
 	unsigned int flags;
 
 	/* 
@@ -718,19 +728,24 @@
 			pte_t *pte;
 			if (write) /* user gate pages are read-only */
 				return i ? : -EFAULT;
-			pgd = pgd_offset_k(pg);
+			pgd = pgd_offset(mm, pg);
 			if (!pgd)
 				return i ? : -EFAULT;
 			pmd = pmd_offset(pgd, pg);
 			if (!pmd)
 				return i ? : -EFAULT;
-			pte = pte_offset_kernel(pmd, pg);
-			if (!pte || !pte_present(*pte))
+			pte = pte_offset_map(pmd, pg);
+			if (!pte)
+				return i ? : -EFAULT;
+			if (!pte_present(*pte)) {
+				pte_unmap(pte);
 				return i ? : -EFAULT;
+			}
 			if (pages) {
 				pages[i] = pte_page(*pte);
 				get_page(pages[i]);
 			}
+			pte_unmap(pte);
 			if (vmas)
 				vmas[i] = gate_vma;
 			i++;
@@ -739,9 +754,11 @@
 			continue;
 		}
 
-		if (!vma || (pages && (vma->vm_flags & VM_IO))
-				|| !(flags & vma->vm_flags))
-			return i ? : -EFAULT;
+		if (!vma)
+			return i ? i : -EFAULT;
+		vm_io = vma->vm_flags & VM_IO;
+		if ((pages && vm_io) || !(flags & vma->vm_flags))
+			return i ? i : -EFAULT;
 
 		if (is_vm_hugetlb_page(vma)) {
 			i = follow_hugetlb_page(mm, vma, pages, vmas,
@@ -750,8 +767,15 @@
 		}
 		spin_lock(&mm->page_table_lock);
 		do {
-			struct page *map;
+			struct page *map = NULL;
 			int lookup_write = write;
+
+			/*
+			 * We don't follow pagetables for VM_IO regions - they
+			 * may have no pageframes.
+			 */
+			if (vm_io)
+				goto no_follow;
 			while (!(map = follow_page(mm, start, lookup_write))) {
 				/*
 				 * Shortcut for anonymous pages. We don't want
@@ -803,6 +827,7 @@
 				if (!PageReserved(pages[i]))
 					page_cache_get(pages[i]);
 			}
+no_follow:
 			if (vmas)
 				vmas[i] = vma;
 			i++;
@@ -1064,7 +1089,8 @@
 	/*
 	 * Ok, we need to copy. Oh, well..
 	 */
-	page_cache_get(old_page);
+	if (!PageReserved(old_page))
+		page_cache_get(old_page);
 	spin_unlock(&mm->page_table_lock);
 
 	if (unlikely(anon_vma_prepare(vma)))
@@ -1209,6 +1235,12 @@
 
 	if (inode->i_size < offset)
 		goto do_expand;
+	/*
+	 * truncation of in-use swapfiles is disallowed - it would cause
+	 * subsequent swapout to scribble on the now-freed blocks.
+	 */
+	if (IS_SWAPFILE(inode))
+		goto out_busy;
 	i_size_write(inode, offset);
 	unmap_mapping_range(mapping, offset + PAGE_SIZE - 1, 0, 1);
 	truncate_inode_pages(mapping, offset);
@@ -1219,7 +1251,7 @@
 	if (limit != RLIM_INFINITY && offset > limit)
 		goto out_sig;
 	if (offset > inode->i_sb->s_maxbytes)
-		goto out;
+		goto out_big;
 	i_size_write(inode, offset);
 
 out_truncate:
@@ -1228,8 +1260,10 @@
 	return 0;
 out_sig:
 	send_sig(SIGXFSZ, current, 0);
-out:
+out_big:
 	return -EFBIG;
+out_busy:
+	return -ETXTBSY;
 }
 
 EXPORT_SYMBOL(vmtruncate);
--- diff/mm/mempolicy.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/mempolicy.c	2004-07-01 21:32:52.000000000 +0100
@@ -26,7 +26,7 @@
  *                process policy.
  * default        Allocate on the local node first, or when on a VMA
  *                use the process policy. This is what Linux always did
- *				   in a NUMA aware kernel and still does by, ahem, default.
+ *		  in a NUMA aware kernel and still does by, ahem, default.
  *
  * The process policy is applied for most non interrupt memory allocations
  * in that process' context. Interrupts ignore the policies and always
@@ -93,14 +93,12 @@
 /* Check if all specified nodes are online */
 static int nodes_online(unsigned long *nodes)
 {
-	DECLARE_BITMAP(offline, MAX_NUMNODES);
+	DECLARE_BITMAP(online2, MAX_NUMNODES);
 
-	bitmap_copy(offline, node_online_map, MAX_NUMNODES);
-	if (bitmap_empty(offline, MAX_NUMNODES))
-		set_bit(0, offline);
-	bitmap_complement(offline, MAX_NUMNODES);
-	bitmap_and(offline, offline, nodes, MAX_NUMNODES);
-	if (!bitmap_empty(offline, MAX_NUMNODES))
+	bitmap_copy(online2, node_online_map, MAX_NUMNODES);
+	if (bitmap_empty(online2, MAX_NUMNODES))
+		set_bit(0, online2);
+	if (!bitmap_subset(nodes, online2, MAX_NUMNODES))
 		return -EINVAL;
 	return 0;
 }
@@ -135,6 +133,10 @@
 	unsigned long endmask;
 
 	--maxnode;
+	bitmap_zero(nodes, MAX_NUMNODES);
+	if (maxnode == 0 || !nmask)
+		return 0;
+
 	nlongs = BITS_TO_LONGS(maxnode);
 	if ((maxnode % BITS_PER_LONG) == 0)
 		endmask = ~0UL;
@@ -143,7 +145,7 @@
 
 	/* When the user specified more nodes than supported just check
 	   if the non supported part is all zero. */
-	if (nmask && nlongs > BITS_TO_LONGS(MAX_NUMNODES)) {
+	if (nlongs > BITS_TO_LONGS(MAX_NUMNODES)) {
 		for (k = BITS_TO_LONGS(MAX_NUMNODES); k < nlongs; k++) {
 			unsigned long t;
 			if (get_user(t,  nmask + k))
@@ -158,8 +160,7 @@
 		endmask = ~0UL;
 	}
 
-	bitmap_zero(nodes, MAX_NUMNODES);
-	if (nmask && copy_from_user(nodes, nmask, nlongs*sizeof(unsigned long)))
+	if (copy_from_user(nodes, nmask, nlongs*sizeof(unsigned long)))
 		return -EFAULT;
 	nodes[nlongs-1] &= endmask;
 	return mpol_check_policy(mode, nodes);
@@ -622,14 +623,14 @@
 
 /* Allocate a page in interleaved policy.
    Own path because it needs to do special accounting. */
-static struct page *alloc_page_interleave(unsigned gfp, unsigned nid)
+static struct page *alloc_page_interleave(unsigned gfp, unsigned order, unsigned nid)
 {
 	struct zonelist *zl;
 	struct page *page;
 
 	BUG_ON(!test_bit(nid, node_online_map));
 	zl = NODE_DATA(nid)->node_zonelists + (gfp & GFP_ZONEMASK);
-	page = __alloc_pages(gfp, 0, zl);
+	page = __alloc_pages(gfp, order, zl);
 	if (page && page_zone(page) == zl->zones[0]) {
 		zl->zones[0]->pageset[get_cpu()].interleave_hit++;
 		put_cpu();
@@ -677,7 +678,7 @@
 			/* fall back to process interleaving */
 			nid = interleave_nodes(pol);
 		}
-		return alloc_page_interleave(gfp, nid);
+		return alloc_page_interleave(gfp, 0, nid);
 	}
 	return __alloc_pages(gfp, 0, zonelist_policy(gfp, pol));
 }
@@ -686,7 +687,7 @@
  * 	alloc_pages_current - Allocate pages.
  *
  *	@gfp:
- *			%GFP_USER   user allocation,
+ *		%GFP_USER   user allocation,
  *      	%GFP_KERNEL kernel allocation,
  *      	%GFP_HIGHMEM highmem allocation,
  *      	%GFP_FS     don't call back into a file system.
@@ -703,8 +704,8 @@
 
 	if (!pol || in_interrupt())
 		pol = &default_policy;
-	if (pol->policy == MPOL_INTERLEAVE && order == 0)
-		return alloc_page_interleave(gfp, interleave_nodes(pol));
+	if (pol->policy == MPOL_INTERLEAVE)
+		return alloc_page_interleave(gfp, order, interleave_nodes(pol));
 	return __alloc_pages(gfp, order, zonelist_policy(gfp, pol));
 }
 EXPORT_SYMBOL(alloc_pages_current);
@@ -1002,7 +1003,8 @@
 	up(&p->sem);
 }
 
-static __init int numa_policy_init(void)
+/* assumes fs == KERNEL_DS */
+void __init numa_policy_init(void)
 {
 	policy_cache = kmem_cache_create("numa_policy",
 					 sizeof(struct mempolicy),
@@ -1011,6 +1013,17 @@
 	sn_cache = kmem_cache_create("shared_policy_node",
 				     sizeof(struct sp_node),
 				     0, SLAB_PANIC, NULL, NULL);
-	return 0;
+
+	/* Set interleaving policy for system init. This way not all
+	   the data structures allocated at system boot end up in node zero. */
+
+	if (sys_set_mempolicy(MPOL_INTERLEAVE, node_online_map, MAX_NUMNODES) < 0)
+		printk("numa_policy_init: interleaving failed\n");
+}
+
+/* Reset policy of current process to default.
+ * Assumes fs == KERNEL_DS */
+void numa_default_policy(void)
+{
+	sys_set_mempolicy(MPOL_DEFAULT, NULL, 0);
 }
-module_init(numa_policy_init);
--- diff/mm/mempool.c	2004-05-19 22:13:11.000000000 +0100
+++ source/mm/mempool.c	2004-07-01 21:32:52.000000000 +0100
@@ -89,11 +89,6 @@
 }
 EXPORT_SYMBOL(mempool_create);
 
-/*
- * mempool_resize is disabled for now, because it has no callers.  Feel free
- * to turn it back on if needed.
- */
-#if 0
 /**
  * mempool_resize - resize an existing memory pool
  * @pool:       pointer to the memory pool which was allocated via
@@ -163,7 +158,6 @@
 	return 0;
 }
 EXPORT_SYMBOL(mempool_resize);
-#endif
 
 /**
  * mempool_destroy - deallocate a memory pool
--- diff/mm/mincore.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/mincore.c	2004-07-01 21:32:52.000000000 +0100
@@ -14,7 +14,6 @@
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
-#include <asm/pgalloc.h>
 
 /*
  * Later we can get more picky about what "in core" means precisely.
--- diff/mm/mmap.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/mmap.c	2004-07-01 21:32:52.000000000 +0100
@@ -25,7 +25,6 @@
 #include <linux/rmap.h>
 
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/cacheflush.h>
 #include <asm/tlb.h>
 
@@ -318,7 +317,6 @@
 	if (mapping)
 		spin_unlock(&mapping->i_mmap_lock);
 
-	mark_mm_hugetlb(mm, vma);
 	mm->map_count++;
 	validate_mm(mm);
 }
@@ -363,6 +361,7 @@
 {
 	struct mm_struct *mm = vma->vm_mm;
 	struct vm_area_struct *next = vma->vm_next;
+	struct vm_area_struct *importer = NULL;
 	struct address_space *mapping = NULL;
 	struct prio_tree_root *root = NULL;
 	struct file *file = vma->vm_file;
@@ -386,6 +385,7 @@
 			 */
 			adjust_next = (end - next->vm_start) >> PAGE_SHIFT;
 			anon_vma = next->anon_vma;
+			importer = vma;
 		} else if (end < vma->vm_end) {
 			/*
 			 * vma shrinks, and !insert tells it's not
@@ -394,6 +394,7 @@
 			 */
 			adjust_next = - ((vma->vm_end - end) >> PAGE_SHIFT);
 			anon_vma = next->anon_vma;
+			importer = next;
 		}
 	}
 
@@ -419,8 +420,18 @@
 	 */
 	if (vma->anon_vma)
 		anon_vma = vma->anon_vma;
-	if (anon_vma)
+	if (anon_vma) {
 		spin_lock(&anon_vma->lock);
+		/*
+		 * Easily overlooked: when mprotect shifts the boundary,
+		 * make sure the expanding vma has anon_vma set if the
+		 * shrinking vma had, to cover any anon pages imported.
+		 */
+		if (importer && !importer->anon_vma) {
+			importer->anon_vma = anon_vma;
+			__anon_vma_link(importer);
+		}
+	}
 
 	if (root) {
 		flush_dcache_mmap_lock(mapping);
@@ -1002,7 +1013,7 @@
  * This function "knows" that -ENOMEM has the bits set.
  */
 #ifndef HAVE_ARCH_UNMAPPED_AREA
-static inline unsigned long
+unsigned long
 arch_get_unmapped_area(struct file *filp, unsigned long addr,
 		unsigned long len, unsigned long pgoff, unsigned long flags)
 {
@@ -1046,12 +1057,103 @@
 		addr = vma->vm_end;
 	}
 }
-#else
-extern unsigned long
-arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
-			unsigned long, unsigned long);
 #endif	
 
+void arch_unmap_area(struct vm_area_struct *area)
+{
+	/*
+	 * Is this a new hole at the lowest possible address?
+	 */
+	if (area->vm_start >= TASK_UNMAPPED_BASE &&
+			area->vm_start < area->vm_mm->free_area_cache)
+		area->vm_mm->free_area_cache = area->vm_start;
+}
+
+/*
+ * This mmap-allocator allocates new areas top-down from below the
+ * stack's low limit (the base):
+ */
+unsigned long
+arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
+			  unsigned long len, unsigned long pgoff,
+			  unsigned long flags)
+{
+	struct vm_area_struct *vma, *prev_vma;
+	struct mm_struct *mm = current->mm;
+	unsigned long base = mm->mmap_base;
+	int first_time = 1;
+
+	/* requested length too big for entire address space */
+	if (len > TASK_SIZE)
+		return -ENOMEM;
+
+	/* dont allow allocations above current base */
+	if (mm->free_area_cache > base)
+		mm->free_area_cache = base;
+
+	/* requesting a specific address */
+	if (addr) {
+		addr = PAGE_ALIGN(addr);
+		vma = find_vma(mm, addr);
+		if (TASK_SIZE - len >= addr &&
+				(!vma || addr + len <= vma->vm_start))
+			return addr;
+	}
+
+	/* make sure it can fit in the remaining address space */
+	if (mm->free_area_cache < len)
+		goto fail;
+
+	/* either no address requested or cant fit in requested address hole */
+try_again:
+	addr = (mm->free_area_cache - len) & PAGE_MASK;
+	do {
+		/*
+		 * Lookup failure means no vma is above this address,
+		 * i.e. return with success:
+		 */
+ 	 	if (!(vma = find_vma_prev(mm, addr, &prev_vma)))
+			return addr;
+
+		/*
+		 * new region fits between prev_vma->vm_end and
+		 * vma->vm_start, use it:
+		 */
+		if (addr+len <= vma->vm_start &&
+				(!prev_vma || (addr >= prev_vma->vm_end)))
+			/* remember the address as a hint for next time */
+			return (mm->free_area_cache = addr);
+		else
+			/* pull free_area_cache down to the first hole */
+			if (mm->free_area_cache == vma->vm_end)
+				mm->free_area_cache = vma->vm_start;
+
+		/* try just below the current vma->vm_start */
+		addr = vma->vm_start-len;
+	} while (len <= vma->vm_start);
+
+fail:
+	/*
+	 * if hint left us with no space for the requested
+	 * mapping then try again:
+	 */
+	if (first_time) {
+		mm->free_area_cache = base;
+		first_time = 0;
+		goto try_again;
+	}
+	return -ENOMEM;
+}
+
+void arch_unmap_area_topdown(struct vm_area_struct *area)
+{
+	/*
+	 * Is this a new hole at the highest possible address?
+	 */
+	if (area->vm_end > area->vm_mm->free_area_cache)
+		area->vm_mm->free_area_cache = area->vm_end;
+}
+
 unsigned long
 get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
 		unsigned long pgoff, unsigned long flags)
@@ -1086,7 +1188,7 @@
 		return file->f_op->get_unmapped_area(file, addr, len,
 						pgoff, flags);
 
-	return arch_get_unmapped_area(file, addr, len, pgoff, flags);
+	return current->mm->get_unmapped_area(file, addr, len, pgoff, flags);
 }
 
 EXPORT_SYMBOL(get_unmapped_area);
@@ -1376,13 +1478,7 @@
 	area->vm_mm->total_vm -= len >> PAGE_SHIFT;
 	if (area->vm_flags & VM_LOCKED)
 		area->vm_mm->locked_vm -= len >> PAGE_SHIFT;
-	/*
-	 * Is this a new hole at the lowest possible address?
-	 */
-	if (area->vm_start >= TASK_UNMAPPED_BASE &&
-				area->vm_start < area->vm_mm->free_area_cache)
-	      area->vm_mm->free_area_cache = area->vm_start;
-
+	area->vm_mm->unmap_area(area);
 	remove_vm_struct(area);
 }
 
--- diff/mm/mprotect.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/mprotect.c	2004-07-01 21:32:52.000000000 +0100
@@ -19,7 +19,6 @@
 #include <linux/mempolicy.h>
 
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
--- diff/mm/mremap.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/mremap.c	2004-07-01 21:32:52.000000000 +0100
@@ -18,7 +18,6 @@
 #include <linux/security.h>
 
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 
--- diff/mm/msync.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/msync.c	2004-07-01 21:32:52.000000000 +0100
@@ -14,7 +14,6 @@
 #include <linux/hugetlb.h>
 
 #include <asm/pgtable.h>
-#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 
 /*
--- diff/mm/nommu.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/nommu.c	2004-07-01 21:32:52.000000000 +0100
@@ -20,7 +20,6 @@
 #include <linux/blkdev.h>
 #include <linux/backing-dev.h>
 
-#include <asm/pgalloc.h>
 #include <asm/uaccess.h>
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
--- diff/mm/oom_kill.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/oom_kill.c	2004-07-01 21:32:52.000000000 +0100
@@ -230,12 +230,6 @@
 	static unsigned long first, last, count, lastkill;
 	unsigned long now, since;
 
-	/*
-	 * Enough swap space left?  Not OOM.
-	 */
-	if (nr_swap_pages > 0)
-		return;
-
 	spin_lock(&oom_lock);
 	now = jiffies;
 	since = now - last;
--- diff/mm/page-writeback.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/page-writeback.c	2004-07-01 21:32:52.000000000 +0100
@@ -582,7 +582,7 @@
 		struct address_space *mapping = page_mapping(page);
 
 		if (mapping) {
-			spin_lock_irq(&mapping->tree_lock);
+			read_lock_irq(&mapping->tree_lock);
 			mapping = page_mapping(page);
 			if (page_mapping(page)) { /* Race with truncate? */
 				BUG_ON(page_mapping(page) != mapping);
@@ -591,7 +591,7 @@
 				radix_tree_tag_set(&mapping->page_tree,
 					page_index(page), PAGECACHE_TAG_DIRTY);
 			}
-			spin_unlock_irq(&mapping->tree_lock);
+			read_unlock_irq(&mapping->tree_lock);
 			if (mapping->host) {
 				/* !PageAnon && !swapper_space */
 				__mark_inode_dirty(mapping->host,
@@ -666,17 +666,17 @@
 	unsigned long flags;
 
 	if (mapping) {
-		spin_lock_irqsave(&mapping->tree_lock, flags);
+		read_lock_irqsave(&mapping->tree_lock, flags);
 		if (TestClearPageDirty(page)) {
 			radix_tree_tag_clear(&mapping->page_tree,
 						page_index(page),
 						PAGECACHE_TAG_DIRTY);
-			spin_unlock_irqrestore(&mapping->tree_lock, flags);
+			read_unlock_irqrestore(&mapping->tree_lock, flags);
 			if (!mapping->backing_dev_info->memory_backed)
 				dec_page_state(nr_dirty);
 			return 1;
 		}
-		spin_unlock_irqrestore(&mapping->tree_lock, flags);
+		read_unlock_irqrestore(&mapping->tree_lock, flags);
 		return 0;
 	}
 	return TestClearPageDirty(page);
@@ -723,15 +723,15 @@
 	if (mapping) {
 		unsigned long flags;
 
-		spin_lock_irqsave(&mapping->tree_lock, flags);
+		read_lock_irqsave(&mapping->tree_lock, flags);
 		if (TestClearPageDirty(page)) {
 			radix_tree_tag_clear(&mapping->page_tree,
 						page_index(page),
 						PAGECACHE_TAG_DIRTY);
-			spin_unlock_irqrestore(&mapping->tree_lock, flags);
+			read_unlock_irqrestore(&mapping->tree_lock, flags);
 			return 1;
 		}
-		spin_unlock_irqrestore(&mapping->tree_lock, flags);
+		read_unlock_irqrestore(&mapping->tree_lock, flags);
 		return 0;
 	}
 	return TestClearPageDirty(page);
@@ -745,13 +745,13 @@
 	if (mapping) {
 		unsigned long flags;
 
-		spin_lock_irqsave(&mapping->tree_lock, flags);
+		read_lock_irqsave(&mapping->tree_lock, flags);
 		ret = TestClearPageWriteback(page);
 		if (ret)
 			radix_tree_tag_clear(&mapping->page_tree,
 						page_index(page),
 						PAGECACHE_TAG_WRITEBACK);
-		spin_unlock_irqrestore(&mapping->tree_lock, flags);
+		read_unlock_irqrestore(&mapping->tree_lock, flags);
 	} else {
 		ret = TestClearPageWriteback(page);
 	}
@@ -766,7 +766,7 @@
 	if (mapping) {
 		unsigned long flags;
 
-		spin_lock_irqsave(&mapping->tree_lock, flags);
+		read_lock_irqsave(&mapping->tree_lock, flags);
 		ret = TestSetPageWriteback(page);
 		if (!ret)
 			radix_tree_tag_set(&mapping->page_tree,
@@ -776,7 +776,7 @@
 			radix_tree_tag_clear(&mapping->page_tree,
 						page_index(page),
 						PAGECACHE_TAG_DIRTY);
-		spin_unlock_irqrestore(&mapping->tree_lock, flags);
+		read_unlock_irqrestore(&mapping->tree_lock, flags);
 	} else {
 		ret = TestSetPageWriteback(page);
 	}
@@ -794,9 +794,9 @@
 	unsigned long flags;
 	int ret;
 
-	spin_lock_irqsave(&mapping->tree_lock, flags);
+	read_lock_irqsave(&mapping->tree_lock, flags);
 	ret = radix_tree_tagged(&mapping->page_tree, tag);
-	spin_unlock_irqrestore(&mapping->tree_lock, flags);
+	read_unlock_irqrestore(&mapping->tree_lock, flags);
 	return ret;
 }
 EXPORT_SYMBOL(mapping_tagged);
--- diff/mm/page_alloc.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/page_alloc.c	2004-07-01 21:32:52.000000000 +0100
@@ -38,7 +38,7 @@
 struct pglist_data *pgdat_list;
 unsigned long totalram_pages;
 unsigned long totalhigh_pages;
-int nr_swap_pages;
+long nr_swap_pages;
 int numnodes = 1;
 int sysctl_lower_zone_protection = 0;
 
@@ -55,6 +55,9 @@
 static char *zone_names[MAX_NR_ZONES] = { "DMA", "Normal", "HighMem" };
 int min_free_kbytes = 1024;
 
+static unsigned long __initdata nr_kernel_pages;
+static unsigned long __initdata nr_all_pages;
+
 /*
  * Temporary debugging check for pages not lying within a given zone.
  */
@@ -176,20 +179,20 @@
  */
 
 static inline void __free_pages_bulk (struct page *page, struct page *base,
-		struct zone *zone, struct free_area *area, unsigned long mask,
-		unsigned int order)
+		struct zone *zone, struct free_area *area, unsigned int order)
 {
-	unsigned long page_idx, index;
+	unsigned long page_idx, index, mask;
 
 	if (order)
 		destroy_compound_page(page, order);
+	mask = (~0UL) << order;
 	page_idx = page - base;
 	if (page_idx & ~mask)
 		BUG();
 	index = page_idx >> (1 + order);
 
-	zone->free_pages -= mask;
-	while (mask + (1 << (MAX_ORDER-1))) {
+	zone->free_pages += 1 << order;
+	while (order < MAX_ORDER-1) {
 		struct page *buddy1, *buddy2;
 
 		BUG_ON(area >= zone->free_area + MAX_ORDER);
@@ -198,17 +201,15 @@
 			 * the buddy page is still allocated.
 			 */
 			break;
-		/*
-		 * Move the buddy up one level.
-		 * This code is taking advantage of the identity:
-		 * 	-mask = 1+~mask
-		 */
-		buddy1 = base + (page_idx ^ -mask);
+
+		/* Move the buddy up one level. */
+		buddy1 = base + (page_idx ^ (1 << order));
 		buddy2 = base + page_idx;
 		BUG_ON(bad_range(zone, buddy1));
 		BUG_ON(bad_range(zone, buddy2));
 		list_del(&buddy1->lru);
 		mask <<= 1;
+		order++;
 		area++;
 		index >>= 1;
 		page_idx &= mask;
@@ -252,12 +253,11 @@
 free_pages_bulk(struct zone *zone, int count,
 		struct list_head *list, unsigned int order)
 {
-	unsigned long mask, flags;
+	unsigned long flags;
 	struct free_area *area;
 	struct page *base, *page = NULL;
 	int ret = 0;
 
-	mask = (~0UL) << order;
 	base = zone->zone_mem_map;
 	area = zone->free_area + order;
 	spin_lock_irqsave(&zone->lock, flags);
@@ -267,7 +267,7 @@
 		page = list_entry(list->prev, struct page, lru);
 		/* have to delete it as __free_pages_bulk list manipulates */
 		list_del(&page->lru);
-		__free_pages_bulk(page, base, zone, area, mask, order);
+		__free_pages_bulk(page, base, zone, area, order);
 		ret++;
 	}
 	spin_unlock_irqrestore(&zone->lock, flags);
@@ -290,6 +290,20 @@
 #define MARK_USED(index, order, area) \
 	__change_bit((index) >> (1+(order)), (area)->map)
 
+/*
+ * The order of subdivision here is critical for the IO subsystem.
+ * Please do not alter this order without good reasons and regression
+ * testing. Specifically, as large blocks of memory are subdivided,
+ * the order in which smaller blocks are delivered depends on the order
+ * they're subdivided in this function. This is the primary factor
+ * influencing the order in which pages are delivered to the IO
+ * subsystem according to empirical testing, and this is also justified
+ * by considering the behavior of a buddy system containing a single
+ * large block of memory acted on by a series of small allocations.
+ * This behavior is a critical factor in sglist merging's success.
+ *
+ * -- wli
+ */
 static inline struct page *
 expand(struct zone *zone, struct page *page,
 	 unsigned long index, int low, int high, struct free_area *area)
@@ -297,14 +311,12 @@
 	unsigned long size = 1 << high;
 
 	while (high > low) {
-		BUG_ON(bad_range(zone, page));
 		area--;
 		high--;
 		size >>= 1;
-		list_add(&page->lru, &area->free_list);
-		MARK_USED(index, high, area);
-		index += size;
-		page += size;
+		BUG_ON(bad_range(zone, &page[size]));
+		list_add(&page[size].lru, &area->free_list);
+		MARK_USED(index + size, high, area);
 	}
 	return page;
 }
@@ -732,53 +744,12 @@
 
 EXPORT_SYMBOL(__alloc_pages);
 
-#ifdef CONFIG_NUMA
-/* Early boot: Everything is done by one cpu, but the data structures will be
- * used by all cpus - spread them on all nodes.
- */
-static __init unsigned long get_boot_pages(unsigned int gfp_mask, unsigned int order)
-{
-static int nodenr;
-	int i = nodenr;
-	struct page *page;
-
-	for (;;) {
-		if (i > nodenr + numnodes)
-			return 0;
-		if (node_present_pages(i%numnodes)) {
-			struct zone **z;
-			/* The node contains memory. Check that there is
-			 * memory in the intended zonelist.
-			 */
-			z = NODE_DATA(i%numnodes)->node_zonelists[gfp_mask & GFP_ZONEMASK].zones;
-			while (*z) {
-				if ( (*z)->free_pages > (1UL<<order))
-					goto found_node;
-				z++;
-			}
-		}
-		i++;
-	}
-found_node:
-	nodenr = i+1;
-	page = alloc_pages_node(i%numnodes, gfp_mask, order);
-	if (!page)
-		return 0;
-	return (unsigned long) page_address(page);
-}
-#endif
-
 /*
  * Common helper functions.
  */
 fastcall unsigned long __get_free_pages(unsigned int gfp_mask, unsigned int order)
 {
 	struct page * page;
-
-#ifdef CONFIG_NUMA
-	if (unlikely(system_state == SYSTEM_BOOTING))
-		return get_boot_pages(gfp_mask, order);
-#endif
 	page = alloc_pages(gfp_mask, order);
 	if (!page)
 		return 0;
@@ -1264,7 +1235,7 @@
 	DECLARE_BITMAP(used_mask, MAX_NUMNODES);
 
 	/* initialize zonelists */
-	for (i = 0; i < MAX_NR_ZONES; i++) {
+	for (i = 0; i < GFP_ZONETYPES; i++) {
 		zonelist = pgdat->node_zonelists + i;
 		memset(zonelist, 0, sizeof(*zonelist));
 		zonelist->zones[0] = NULL;
@@ -1286,7 +1257,7 @@
 			node_load[node] += load;
 		prev_node = node;
 		load--;
-		for (i = 0; i < MAX_NR_ZONES; i++) {
+		for (i = 0; i < GFP_ZONETYPES; i++) {
 			zonelist = pgdat->node_zonelists + i;
 			for (j = 0; zonelist->zones[j] != NULL; j++);
 
@@ -1309,7 +1280,7 @@
 	int i, j, k, node, local_node;
 
 	local_node = pgdat->node_id;
-	for (i = 0; i < MAX_NR_ZONES; i++) {
+	for (i = 0; i < GFP_ZONETYPES; i++) {
 		struct zonelist *zonelist;
 
 		zonelist = pgdat->node_zonelists + i;
@@ -1471,6 +1442,10 @@
 		if (zholes_size)
 			realsize -= zholes_size[j];
 
+		if (j == ZONE_DMA || j == ZONE_NORMAL)
+			nr_kernel_pages += realsize;
+		nr_all_pages += realsize;
+
 		zone->spanned_pages = size;
 		zone->present_pages = realsize;
 		zone->name = zone_names[j];
@@ -1516,8 +1491,8 @@
 				zone_names[j], realsize, batch);
 		INIT_LIST_HEAD(&zone->active_list);
 		INIT_LIST_HEAD(&zone->inactive_list);
-		atomic_set(&zone->nr_scan_active, 0);
-		atomic_set(&zone->nr_scan_inactive, 0);
+		zone->nr_scan_active = 0;
+		zone->nr_scan_inactive = 0;
 		zone->nr_active = 0;
 		zone->nr_inactive = 0;
 		if (!size)
@@ -1865,7 +1840,7 @@
 		 * For each of the different allocation types:
 		 * GFP_DMA -> GFP_KERNEL -> GFP_HIGHMEM
 		 */
-		for (i = 0; i < MAX_NR_ZONES; i++) {
+		for (i = 0; i < GFP_ZONETYPES; i++) {
 			/*
 			 * For each of the zones:
 			 * ZONE_HIGHMEM -> ZONE_NORMAL -> ZONE_DMA
@@ -2011,3 +1986,69 @@
 	setup_per_zone_protection();
 	return 0;
 }
+
+/*
+ * allocate a large system hash table from bootmem
+ * - it is assumed that the hash table must contain an exact power-of-2
+ *   quantity of entries
+ */
+void *__init alloc_large_system_hash(const char *tablename,
+				     unsigned long bucketsize,
+				     unsigned long numentries,
+				     int scale,
+				     int consider_highmem,
+				     unsigned int *_hash_shift,
+				     unsigned int *_hash_mask)
+{
+	unsigned long mem, max, log2qty, size;
+	void *table;
+
+	/* round applicable memory size up to nearest megabyte */
+	mem = consider_highmem ? nr_all_pages : nr_kernel_pages;
+	mem += (1UL << (20 - PAGE_SHIFT)) - 1;
+	mem >>= 20 - PAGE_SHIFT;
+	mem <<= 20 - PAGE_SHIFT;
+
+	/* limit to 1 bucket per 2^scale bytes of low memory (rounded up to
+	 * nearest power of 2 in size) */
+	if (scale > PAGE_SHIFT)
+		mem >>= (scale - PAGE_SHIFT);
+	else
+		mem <<= (PAGE_SHIFT - scale);
+
+	mem = 1UL << (long_log2(mem) + 1);
+
+	/* limit allocation size */
+	max = (1UL << (PAGE_SHIFT + MAX_SYS_HASH_TABLE_ORDER)) / bucketsize;
+	if (max > mem)
+		max = mem;
+
+	/* allow the kernel cmdline to have a say */
+	if (!numentries || numentries > max)
+		numentries = max;
+
+	log2qty = long_log2(numentries);
+
+	do {
+		size = bucketsize << log2qty;
+
+		table = (void *) alloc_bootmem(size);
+
+	} while (!table && size > PAGE_SIZE);
+
+	if (!table)
+		panic("Failed to allocate %s hash table\n", tablename);
+
+	printk("%s hash table entries: %d (order: %d, %lu bytes)\n",
+	       tablename,
+	       (1U << log2qty),
+	       long_log2(size) - PAGE_SHIFT,
+	       size);
+
+	if (_hash_shift)
+		*_hash_shift = log2qty;
+	if (_hash_mask)
+		*_hash_mask = (1 << log2qty) - 1;
+
+	return table;
+}
--- diff/mm/readahead.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/readahead.c	2004-07-01 21:32:52.000000000 +0100
@@ -234,7 +234,7 @@
 	/*
 	 * Preallocate as many pages as we will need.
 	 */
-	spin_lock_irq(&mapping->tree_lock);
+	read_lock_irq(&mapping->tree_lock);
 	for (page_idx = 0; page_idx < nr_to_read; page_idx++) {
 		unsigned long page_offset = offset + page_idx;
 		
@@ -245,16 +245,16 @@
 		if (page)
 			continue;
 
-		spin_unlock_irq(&mapping->tree_lock);
+		read_unlock_irq(&mapping->tree_lock);
 		page = page_cache_alloc_cold(mapping);
-		spin_lock_irq(&mapping->tree_lock);
+		read_lock_irq(&mapping->tree_lock);
 		if (!page)
 			break;
 		page->index = page_offset;
 		list_add(&page->lru, &page_pool);
 		ret++;
 	}
-	spin_unlock_irq(&mapping->tree_lock);
+	read_unlock_irq(&mapping->tree_lock);
 
 	/*
 	 * Now start the IO.  We ignore I/O errors - if the page is not
--- diff/mm/rmap.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/rmap.c	2004-07-01 21:32:52.000000000 +0100
@@ -18,14 +18,11 @@
  */
 
 /*
- * Locking:
- * - the page->mapcount field is protected by the PG_maplock bit,
- *   which nests within the mm->page_table_lock,
- *   which nests within the page lock.
- * - because swapout locking is opposite to the locking order
- *   in the page fault path, the swapout path uses trylocks
- *   on the mm->page_table_lock
+ * Locking: see "Lock ordering" summary in filemap.c.
+ * In swapout, page_map_lock is held on entry to page_referenced and
+ * try_to_unmap, so they trylock for i_mmap_lock and page_table_lock.
  */
+
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #include <linux/swap.h>
@@ -79,8 +76,12 @@
 		/* page_table_lock to protect against threads */
 		spin_lock(&mm->page_table_lock);
 		if (likely(!vma->anon_vma)) {
+			if (!allocated)
+				spin_lock(&anon_vma->lock);
 			vma->anon_vma = anon_vma;
 			list_add(&vma->anon_vma_node, &anon_vma->head);
+			if (!allocated)
+				spin_unlock(&anon_vma->lock);
 			allocated = NULL;
 		}
 		spin_unlock(&mm->page_table_lock);
@@ -226,7 +227,7 @@
 	if (page_to_pfn(page) != pte_pfn(*pte))
 		goto out_unmap;
 
-	if (ptep_test_and_clear_young(pte))
+	if (ptep_clear_flush_young(vma, address, pte))
 		referenced++;
 
 	(*mapcount)--;
@@ -465,7 +466,7 @@
 	 * skipped over this mm) then we should reactivate it.
 	 */
 	if ((vma->vm_flags & (VM_LOCKED|VM_RESERVED)) ||
-			ptep_test_and_clear_young(pte)) {
+			ptep_clear_flush_young(vma, address, pte)) {
 		ret = SWAP_FAIL;
 		goto out_unmap;
 	}
@@ -592,7 +593,7 @@
 		if (PageReserved(page))
 			continue;
 
-		if (ptep_test_and_clear_young(pte))
+		if (ptep_clear_flush_young(vma, address, pte))
 			continue;
 
 		/* Nuke the page table entry. */
--- diff/mm/shmem.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/shmem.c	2004-07-01 21:32:52.000000000 +0100
@@ -40,6 +40,7 @@
 #include <linux/security.h>
 #include <linux/swapops.h>
 #include <linux/mempolicy.h>
+#include <linux/namei.h>
 #include <asm/uaccess.h>
 #include <asm/div64.h>
 #include <asm/pgtable.h>
@@ -1676,51 +1677,45 @@
 	return 0;
 }
 
-static int shmem_readlink_inline(struct dentry *dentry, char __user *buffer, int buflen)
-{
-	return vfs_readlink(dentry, buffer, buflen, (const char *)SHMEM_I(dentry->d_inode));
-}
-
 static int shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd)
 {
-	return vfs_follow_link(nd, (const char *)SHMEM_I(dentry->d_inode));
+	nd_set_link(nd, (char *)SHMEM_I(dentry->d_inode));
+	return 0;
 }
 
-static int shmem_readlink(struct dentry *dentry, char __user *buffer, int buflen)
+static int shmem_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	struct page *page = NULL;
 	int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL);
-	if (res)
-		return res;
-	res = vfs_readlink(dentry, buffer, buflen, kmap(page));
-	kunmap(page);
-	mark_page_accessed(page);
-	page_cache_release(page);
-	return res;
+	nd_set_link(nd, res ? ERR_PTR(res) : kmap(page));
+	return 0;
 }
 
-static int shmem_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void shmem_put_link(struct dentry *dentry, struct nameidata *nd)
 {
-	struct page *page = NULL;
-	int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL);
-	if (res)
-		return res;
-	res = vfs_follow_link(nd, kmap(page));
-	kunmap(page);
-	mark_page_accessed(page);
-	page_cache_release(page);
-	return res;
+	if (!IS_ERR(nd_get_link(nd))) {
+		struct page *page;
+
+		page = find_get_page(dentry->d_inode->i_mapping, 0);
+		if (!page)
+			BUG();
+		kunmap(page);
+		mark_page_accessed(page);
+		page_cache_release(page);
+		page_cache_release(page);
+	}
 }
 
 static struct inode_operations shmem_symlink_inline_operations = {
-	.readlink	= shmem_readlink_inline,
+	.readlink	= generic_readlink,
 	.follow_link	= shmem_follow_link_inline,
 };
 
 static struct inode_operations shmem_symlink_inode_operations = {
 	.truncate	= shmem_truncate,
-	.readlink	= shmem_readlink,
+	.readlink	= generic_readlink,
 	.follow_link	= shmem_follow_link,
+	.put_link	= shmem_put_link,
 };
 
 static int shmem_parse_options(char *options, int *mode, uid_t *uid, gid_t *gid, unsigned long *blocks, unsigned long *inodes)
--- diff/mm/slab.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/slab.c	2004-07-01 21:32:52.000000000 +0100
@@ -129,6 +129,10 @@
 #define ARCH_KMALLOC_MINALIGN 0
 #endif
 
+#ifndef ARCH_KMALLOC_FLAGS
+#define ARCH_KMALLOC_FLAGS SLAB_HWCACHE_ALIGN
+#endif
+
 /* Legal flag mask for kmem_cache_create(). */
 #if DEBUG
 # define CREATE_MASK	(SLAB_DEBUG_INITIAL | SLAB_RED_ZONE | \
@@ -380,12 +384,12 @@
  * cachep->objsize - 2* BYTES_PER_WORD: redzone word [BYTES_PER_WORD long]
  * cachep->objsize - 1* BYTES_PER_WORD: last caller address [BYTES_PER_WORD long]
  */
-static inline int obj_dbghead(kmem_cache_t *cachep)
+static int obj_dbghead(kmem_cache_t *cachep)
 {
 	return cachep->dbghead;
 }
 
-static inline int obj_reallen(kmem_cache_t *cachep)
+static int obj_reallen(kmem_cache_t *cachep)
 {
 	return cachep->reallen;
 }
@@ -409,30 +413,15 @@
 	BUG_ON(!(cachep->flags & SLAB_STORE_USER));
 	return (void**)(objp+cachep->objsize-BYTES_PER_WORD);
 }
+
 #else
-static inline int obj_dbghead(kmem_cache_t *cachep)
-{
-	return 0;
-}
-static inline int obj_reallen(kmem_cache_t *cachep)
-{
-	return cachep->objsize;
-}
-static inline unsigned long *dbg_redzone1(kmem_cache_t *cachep, void *objp)
-{
-	BUG();
-	return 0;
-}
-static inline unsigned long *dbg_redzone2(kmem_cache_t *cachep, void *objp)
-{
-	BUG();
-	return 0;
-}
-static inline void **dbg_userword(kmem_cache_t *cachep, void *objp)
-{
-	BUG();
-	return 0;
-}
+
+#define obj_dbghead(x)			0
+#define obj_reallen(cachep)		(cachep->objsize)
+#define dbg_redzone1(cachep, objp)	({BUG(); (unsigned long *)NULL;})
+#define dbg_redzone2(cachep, objp)	({BUG(); (unsigned long *)NULL;})
+#define dbg_userword(cachep, objp)	({BUG(); (void **)NULL;})
+
 #endif
 
 /*
@@ -758,7 +747,7 @@
 		 * allow tighter packing of the smaller caches. */
 		sizes->cs_cachep = kmem_cache_create(names->name,
 			sizes->cs_size, ARCH_KMALLOC_MINALIGN,
-			SLAB_PANIC, NULL, NULL);
+			(ARCH_KMALLOC_FLAGS | SLAB_PANIC), NULL, NULL);
 
 		/* Inc off-slab bufctl limit until the ceiling is hit. */
 		if (!(OFF_SLAB(sizes->cs_cachep))) {
@@ -768,7 +757,8 @@
 
 		sizes->cs_dmacachep = kmem_cache_create(names->name_dma,
 			sizes->cs_size, ARCH_KMALLOC_MINALIGN,
-			(SLAB_CACHE_DMA | SLAB_PANIC), NULL, NULL);
+			(ARCH_KMALLOC_FLAGS | SLAB_CACHE_DMA | SLAB_PANIC),
+			NULL, NULL);
 
 		sizes++;
 		names++;
@@ -874,7 +864,7 @@
 /*
  * Interface to system's page release.
  */
-static inline void kmem_freepages(kmem_cache_t *cachep, void *addr)
+static void kmem_freepages(kmem_cache_t *cachep, void *addr)
 {
 	unsigned long i = (1<<cachep->gfporder);
 	struct page *page = virt_to_page(addr);
@@ -1116,8 +1106,9 @@
  * %SLAB_NO_REAP - Don't automatically reap this cache when we're under
  * memory pressure.
  *
- * %SLAB_HWCACHE_ALIGN - This flag has no effect and will be removed soon.
- *
+ * %SLAB_HWCACHE_ALIGN - Align the objects in this cache to a hardware
+ * cacheline.  This can be beneficial if you're counting cycles as closely
+ * as davem.
  */
 kmem_cache_t *
 kmem_cache_create (const char *name, size_t size, size_t align,
@@ -1407,27 +1398,29 @@
 }
 EXPORT_SYMBOL(kmem_cache_create);
 
-static inline void check_irq_off(void)
-{
 #if DEBUG
+static void check_irq_off(void)
+{
 	BUG_ON(!irqs_disabled());
-#endif
 }
 
-static inline void check_irq_on(void)
+static void check_irq_on(void)
 {
-#if DEBUG
 	BUG_ON(irqs_disabled());
-#endif
 }
 
-static inline void check_spinlock_acquired(kmem_cache_t *cachep)
+static void check_spinlock_acquired(kmem_cache_t *cachep)
 {
 #ifdef CONFIG_SMP
 	check_irq_off();
 	BUG_ON(spin_trylock(&cachep->spinlock));
 #endif
 }
+#else
+#define check_irq_off()	do { } while(0)
+#define check_irq_on()	do { } while(0)
+#define check_spinlock_acquired(x) do { } while(0)
+#endif
 
 /*
  * Waits for all CPUs to execute func().
@@ -1590,7 +1583,7 @@
 EXPORT_SYMBOL(kmem_cache_destroy);
 
 /* Get the memory for a slab management obj. */
-static inline struct slab* alloc_slabmgmt (kmem_cache_t *cachep,
+static struct slab* alloc_slabmgmt (kmem_cache_t *cachep,
 			void *objp, int colour_off, int local_flags)
 {
 	struct slab *slabp;
@@ -1773,15 +1766,16 @@
 	return 0;
 }
 
+#if DEBUG
+
 /*
  * Perform extra freeing checks:
  * - detect bad pointers.
  * - POISON/RED_ZONE checking
  * - destructor calls, for caches with POISON+dtor
  */
-static inline void kfree_debugcheck(const void *objp)
+static void kfree_debugcheck(const void *objp)
 {
-#if DEBUG
 	struct page *page;
 
 	if (!virt_addr_valid(objp)) {
@@ -1794,12 +1788,10 @@
 		printk(KERN_ERR "kfree_debugcheck: bad ptr %lxh.\n", (unsigned long)objp);
 		BUG();
 	}
-#endif 
 }
 
-static inline void *cache_free_debugcheck (kmem_cache_t * cachep, void * objp, void *caller)
+static void *cache_free_debugcheck (kmem_cache_t * cachep, void * objp, void *caller)
 {
-#if DEBUG
 	struct page *page;
 	unsigned int objnr;
 	struct slab *slabp;
@@ -1861,13 +1853,11 @@
 		poison_obj(cachep, objp, POISON_FREE);
 #endif
 	}
-#endif
 	return objp;
 }
 
-static inline void check_slabp(kmem_cache_t *cachep, struct slab *slabp)
+static void check_slabp(kmem_cache_t *cachep, struct slab *slabp)
 {
-#if DEBUG
 	int i;
 	int entries = 0;
 	
@@ -1891,8 +1881,12 @@
 		printk("\n");
 		BUG();
 	}
-#endif
 }
+#else
+#define kfree_debugcheck(x) do { } while(0)
+#define cache_free_debugcheck(x,objp,z) (objp)
+#define check_slabp(x,y) do { } while(0)
+#endif
 
 static void* cache_alloc_refill(kmem_cache_t* cachep, int flags)
 {
@@ -1999,11 +1993,11 @@
 #endif
 }
 
-static inline void *
+#if DEBUG
+static void *
 cache_alloc_debugcheck_after(kmem_cache_t *cachep,
 			unsigned long flags, void *objp, void *caller)
 {
-#if DEBUG
 	if (!objp)	
 		return objp;
  	if (cachep->flags & SLAB_POISON) {
@@ -2039,9 +2033,11 @@
 
 		cachep->ctor(objp, cachep, ctor_flags);
 	}	
-#endif
 	return objp;
 }
+#else
+#define cache_alloc_debugcheck_after(a,b,objp,d) (objp)
+#endif
 
 
 static inline void * __cache_alloc (kmem_cache_t *cachep, int flags)
@@ -2687,7 +2683,7 @@
  * If we cannot acquire the cache chain semaphore then just give up - we'll
  * try again next timer interrupt.
  */
-static inline void cache_reap (void)
+static void cache_reap (void)
 {
 	struct list_head *walk;
 
--- diff/mm/swap_state.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/swap_state.c	2004-07-01 21:32:52.000000000 +0100
@@ -35,7 +35,7 @@
 
 struct address_space swapper_space = {
 	.page_tree	= RADIX_TREE_INIT(GFP_ATOMIC),
-	.tree_lock	= SPIN_LOCK_UNLOCKED,
+	.tree_lock	= RW_LOCK_UNLOCKED,
 	.a_ops		= &swap_aops,
 	.i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear),
 	.backing_dev_info = &swap_backing_dev_info,
@@ -74,7 +74,7 @@
 	BUG_ON(PagePrivate(page));
 	error = radix_tree_preload(gfp_mask);
 	if (!error) {
-		spin_lock_irq(&swapper_space.tree_lock);
+		write_lock_irq(&swapper_space.tree_lock);
 		error = radix_tree_insert(&swapper_space.page_tree,
 						entry.val, page);
 		if (!error) {
@@ -85,7 +85,7 @@
 			total_swapcache_pages++;
 			pagecache_acct(1);
 		}
-		spin_unlock_irq(&swapper_space.tree_lock);
+		write_unlock_irq(&swapper_space.tree_lock);
 		radix_tree_preload_end();
 	}
 	return error;
@@ -212,9 +212,9 @@
   
 	entry.val = page->private;
 
-	spin_lock_irq(&swapper_space.tree_lock);
+	write_lock_irq(&swapper_space.tree_lock);
 	__delete_from_swap_cache(page);
-	spin_unlock_irq(&swapper_space.tree_lock);
+	write_unlock_irq(&swapper_space.tree_lock);
 
 	swap_free(entry);
 	page_cache_release(page);
@@ -313,13 +313,13 @@
 {
 	struct page *page;
 
-	spin_lock_irq(&swapper_space.tree_lock);
+	read_lock_irq(&swapper_space.tree_lock);
 	page = radix_tree_lookup(&swapper_space.page_tree, entry.val);
 	if (page) {
 		page_cache_get(page);
 		INC_CACHE_INFO(find_success);
 	}
-	spin_unlock_irq(&swapper_space.tree_lock);
+	read_unlock_irq(&swapper_space.tree_lock);
 	INC_CACHE_INFO(find_total);
 	return page;
 }
@@ -342,12 +342,12 @@
 		 * called after lookup_swap_cache() failed, re-calling
 		 * that would confuse statistics.
 		 */
-		spin_lock_irq(&swapper_space.tree_lock);
+		read_lock_irq(&swapper_space.tree_lock);
 		found_page = radix_tree_lookup(&swapper_space.page_tree,
 						entry.val);
 		if (found_page)
 			page_cache_get(found_page);
-		spin_unlock_irq(&swapper_space.tree_lock);
+		read_unlock_irq(&swapper_space.tree_lock);
 		if (found_page)
 			break;
 
--- diff/mm/swapfile.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/swapfile.c	2004-07-01 21:32:52.000000000 +0100
@@ -32,7 +32,7 @@
 
 spinlock_t swaplock = SPIN_LOCK_UNLOCKED;
 unsigned int nr_swapfiles;
-int total_swap_pages;
+long total_swap_pages;
 static int swap_overflow;
 
 EXPORT_SYMBOL(total_swap_pages);
@@ -290,10 +290,10 @@
 		/* Is the only swap cache user the cache itself? */
 		if (p->swap_map[swp_offset(entry)] == 1) {
 			/* Recheck the page count with the swapcache lock held.. */
-			spin_lock_irq(&swapper_space.tree_lock);
+			write_lock_irq(&swapper_space.tree_lock);
 			if (page_count(page) == 2)
 				retval = 1;
-			spin_unlock_irq(&swapper_space.tree_lock);
+			write_unlock_irq(&swapper_space.tree_lock);
 		}
 		swap_info_put(p);
 	}
@@ -361,13 +361,13 @@
 	retval = 0;
 	if (p->swap_map[swp_offset(entry)] == 1) {
 		/* Recheck the page count with the swapcache lock held.. */
-		spin_lock_irq(&swapper_space.tree_lock);
+		write_lock_irq(&swapper_space.tree_lock);
 		if ((page_count(page) == 2) && !PageWriteback(page)) {
 			__delete_from_swap_cache(page);
 			SetPageDirty(page);
 			retval = 1;
 		}
-		spin_unlock_irq(&swapper_space.tree_lock);
+		write_unlock_irq(&swapper_space.tree_lock);
 	}
 	swap_info_put(p);
 
@@ -391,12 +391,12 @@
 	p = swap_info_get(entry);
 	if (p) {
 		if (swap_entry_free(p, swp_offset(entry)) == 1) {
-			spin_lock_irq(&swapper_space.tree_lock);
+			read_lock_irq(&swapper_space.tree_lock);
 			page = radix_tree_lookup(&swapper_space.page_tree,
 				entry.val);
 			if (page && TestSetPageLocked(page))
 				page = NULL;
-			spin_unlock_irq(&swapper_space.tree_lock);
+			read_unlock_irq(&swapper_space.tree_lock);
 		}
 		swap_info_put(p);
 	}
@@ -467,6 +467,13 @@
 		if (unlikely(pte_same(*pte, swp_pte))) {
 			unuse_pte(vma, offset + address, pte, entry, page);
 			pte_unmap(pte);
+
+			/*
+			 * Move the page to the active list so it is not
+			 * immediately swapped out again after swapon.
+			 */
+			activate_page(page);
+
 			/* add 1 since address may be 0 */
 			return 1 + offset + address;
 		}
@@ -645,7 +652,7 @@
 	 * open() method called) - so swap entries may be invisible
 	 * to swapoff for a while, then reappear - but that is rare.
 	 */
-	while ((i = find_next_to_unuse(si, i))) {
+	while ((i = find_next_to_unuse(si, i)) != 0) {
 		if (signal_pending(current)) {
 			retval = -EINTR;
 			break;
@@ -1065,6 +1072,7 @@
 	unsigned short *swap_map;
 	struct file *swap_file, *victim;
 	struct address_space *mapping;
+	struct inode *inode;
 	char * pathname;
 	int i, type, prev;
 	int err;
@@ -1158,12 +1166,15 @@
 	swap_list_unlock();
 	up(&swapon_sem);
 	vfree(swap_map);
-	if (S_ISBLK(mapping->host->i_mode)) {
-		struct block_device *bdev = I_BDEV(mapping->host);
+	inode = mapping->host;
+	if (S_ISBLK(inode->i_mode)) {
+		struct block_device *bdev = I_BDEV(inode);
 		set_blocksize(bdev, p->old_block_size);
 		bd_release(bdev);
 	} else {
-		up(&mapping->host->i_sem);
+		down(&inode->i_sem);
+		inode->i_flags &= ~S_SWAPFILE;
+		up(&inode->i_sem);
 	}
 	filp_close(swap_file, NULL);
 	err = 0;
@@ -1381,6 +1392,10 @@
 		p->bdev = inode->i_sb->s_bdev;
 		down(&inode->i_sem);
 		did_down = 1;
+		if (IS_SWAPFILE(inode)) {
+			error = -EBUSY;
+			goto bad_swap;
+		}
 	} else {
 		goto bad_swap;
 	}
@@ -1553,8 +1568,11 @@
 	}
 	if (name)
 		putname(name);
-	if (error && did_down)
+	if (did_down) {
+		if (!error)
+			inode->i_flags |= S_SWAPFILE;
 		up(&inode->i_sem);
+	}
 	return error;
 }
 
--- diff/mm/truncate.c	2004-05-19 22:13:12.000000000 +0100
+++ source/mm/truncate.c	2004-07-01 21:32:52.000000000 +0100
@@ -74,13 +74,13 @@
 	if (PagePrivate(page) && !try_to_release_page(page, 0))
 		return 0;
 
-	spin_lock_irq(&mapping->tree_lock);
+	write_lock_irq(&mapping->tree_lock);
 	if (PageDirty(page)) {
-		spin_unlock_irq(&mapping->tree_lock);
+		write_unlock_irq(&mapping->tree_lock);
 		return 0;
 	}
 	__remove_from_page_cache(page);
-	spin_unlock_irq(&mapping->tree_lock);
+	write_unlock_irq(&mapping->tree_lock);
 	ClearPageUptodate(page);
 	page_cache_release(page);	/* pagecache ref */
 	return 1;
@@ -243,6 +243,10 @@
  * where the page is seen to be mapped into process pagetables.  In that case,
  * the page is marked clean but is left attached to its address_space.
  *
+ * The page is also marked not uptodate so that a subsequent pagefault will
+ * perform I/O to bringthe page's contents back into sync with its backing
+ * store.
+ *
  * FIXME: invalidate_inode_pages2() is probably trivially livelockable.
  */
 void invalidate_inode_pages2(struct address_space *mapping)
@@ -260,10 +264,12 @@
 			if (page->mapping == mapping) {	/* truncate race? */
 				wait_on_page_writeback(page);
 				next = page->index + 1;
-				if (page_mapped(page))
+				if (page_mapped(page)) {
 					clear_page_dirty(page);
-				else
+					ClearPageUptodate(page);
+				} else {
 					invalidate_complete_page(mapping, page);
+				}
 			}
 			unlock_page(page);
 		}
--- diff/mm/vmalloc.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/vmalloc.c	2004-07-01 21:32:52.000000000 +0100
@@ -17,7 +17,6 @@
 #include <linux/vmalloc.h>
 
 #include <asm/uaccess.h>
-#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 
 
@@ -200,7 +199,7 @@
 	}
 
 	write_lock(&vmlist_lock);
-	for (p = &vmlist; (tmp = *p) ;p = &tmp->next) {
+	for (p = &vmlist; (tmp = *p) != NULL ;p = &tmp->next) {
 		if ((unsigned long)tmp->addr < addr)
 			continue;
 		if ((size + addr) < addr)
@@ -261,7 +260,7 @@
 	struct vm_struct **p, *tmp;
 
 	write_lock(&vmlist_lock);
-	for (p = &vmlist ; (tmp = *p) ;p = &tmp->next) {
+	for (p = &vmlist ; (tmp = *p) != NULL ;p = &tmp->next) {
 		 if (tmp->addr == addr)
 			 goto found;
 	}
@@ -456,6 +455,28 @@
 EXPORT_SYMBOL(vmalloc);
 
 /**
+ *	vmalloc_exec  -  allocate virtually contiguous, executable memory
+ *
+ *	@size:		allocation size
+ *
+ *	Kernel-internal function to allocate enough pages to cover @size
+ *	the page level allocator and map them into contiguous and
+ *	executable kernel virtual space.
+ *
+ *	For tight cotrol over page level allocator and protection flags
+ *	use __vmalloc() instead.
+ */
+
+#ifndef PAGE_KERNEL_EXEC
+# define PAGE_KERNEL_EXEC PAGE_KERNEL
+#endif
+
+void *vmalloc_exec(unsigned long size)
+{
+	return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);
+}
+
+/**
  *	vmalloc_32  -  allocate virtually contiguous memory (32bit addressable)
  *
  *	@size:		allocation size
--- diff/mm/vmscan.c	2004-06-30 14:26:02.000000000 +0100
+++ source/mm/vmscan.c	2004-07-01 21:32:52.000000000 +0100
@@ -33,17 +33,57 @@
 #include <linux/cpu.h>
 #include <linux/notifier.h>
 
-#include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 #include <asm/div64.h>
 
 #include <linux/swapops.h>
 
+/* possible outcome of pageout() */
+typedef enum {
+	/* failed to write page out, page is locked */
+	PAGE_KEEP,
+	/* move page to the active list, page is locked */
+	PAGE_ACTIVATE,
+	/* page has been sent to the disk successfully, page is unlocked */
+	PAGE_SUCCESS,
+	/* page is clean and locked */
+	PAGE_CLEAN,
+} pageout_t;
+
+struct scan_control {
+	/* Ask refill_inactive_zone, or shrink_cache to scan this many pages */
+	unsigned long nr_to_scan;
+
+	/* Incremented by the number of inactive pages that were scanned */
+	unsigned long nr_scanned;
+
+	/* Incremented by the number of pages reclaimed */
+	unsigned long nr_reclaimed;
+
+	unsigned long nr_mapped;	/* From page_state */
+
+	/* How many pages shrink_cache() should reclaim */
+	int nr_to_reclaim;
+
+	/* Ask shrink_caches, or shrink_zone to scan at this priority */
+	unsigned int priority;
+
+	/* This context's GFP mask */
+	unsigned int gfp_mask;
+
+	int may_writepage;
+};
+
 /*
- * From 0 .. 100.  Higher means more swappy.
+ * The list of shrinker callbacks used by to apply pressure to
+ * ageable caches.
  */
-int vm_swappiness = 60;
-static long total_memory;
+struct shrinker {
+	shrinker_t		shrinker;
+	struct list_head	list;
+	int			seeks;	/* seeks to recreate an obj */
+	long			nr;	/* objs pending delete */
+};
 
 #define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru))
 
@@ -67,7 +107,7 @@
 		if ((_page)->lru.prev != _base) {			\
 			struct page *prev;				\
 									\
-			prev = lru_to_page(&(_page->lru));			\
+			prev = lru_to_page(&(_page->lru));		\
 			prefetchw(&prev->_field);			\
 		}							\
 	} while (0)
@@ -76,15 +116,10 @@
 #endif
 
 /*
- * The list of shrinker callbacks used by to apply pressure to
- * ageable caches.
+ * From 0 .. 100.  Higher means more swappy.
  */
-struct shrinker {
-	shrinker_t		shrinker;
-	struct list_head	list;
-	int			seeks;	/* seeks to recreate an obj */
-	long			nr;	/* objs pending delete */
-};
+int vm_swappiness = 60;
+static long total_memory;
 
 static LIST_HEAD(shrinker_list);
 static DECLARE_MUTEX(shrinker_sem);
@@ -107,7 +142,6 @@
 	}
 	return shrinker;
 }
-
 EXPORT_SYMBOL(set_shrinker);
 
 /*
@@ -120,7 +154,6 @@
 	up(&shrinker_sem);
 	kfree(shrinker);
 }
-
 EXPORT_SYMBOL(remove_shrinker);
  
 #define SHRINK_BATCH 128
@@ -240,18 +273,6 @@
 	unlock_page(page);
 }
 
-/* possible outcome of pageout() */
-typedef enum {
-	/* failed to write page out, page is locked */
-	PAGE_KEEP,
-	/* move page to the active list, page is locked */
-	PAGE_ACTIVATE,
-	/* page has been sent to the disk successfully, page is unlocked */
-	PAGE_SUCCESS,
-	/* page is clean and locked */
-	PAGE_CLEAN,
-} pageout_t;
-
 /*
  * pageout is called by shrink_list() for each dirty page. Calls ->writepage().
  */
@@ -311,27 +332,6 @@
 	return PAGE_CLEAN;
 }
 
-struct scan_control {
-	/* Ask refill_inactive_zone, or shrink_cache to scan this many pages */
-	unsigned long nr_to_scan;
-
-	/* Incremented by the number of inactive pages that were scanned */
-	unsigned long nr_scanned;
-
-	/* Incremented by the number of pages reclaimed */
-	unsigned long nr_reclaimed;
-
-	unsigned long nr_mapped;	/* From page_state */
-
-	/* Ask shrink_caches, or shrink_zone to scan at this priority */
-	unsigned int priority;
-
-	/* This context's GFP mask */
-	unsigned int gfp_mask;
-
-	int may_writepage;
-};
-
 /*
  * shrink_list adds the number of reclaimed pages to sc->nr_reclaimed
  */
@@ -474,7 +474,7 @@
 		if (!mapping)
 			goto keep_locked;	/* truncate got there first */
 
-		spin_lock_irq(&mapping->tree_lock);
+		write_lock_irq(&mapping->tree_lock);
 
 		/*
 		 * The non-racy check for busy page.  It is critical to check
@@ -482,7 +482,7 @@
 		 * not in use by anybody. 	(pagecache + us == 2)
 		 */
 		if (page_count(page) != 2 || PageDirty(page)) {
-			spin_unlock_irq(&mapping->tree_lock);
+			write_unlock_irq(&mapping->tree_lock);
 			goto keep_locked;
 		}
 
@@ -490,7 +490,7 @@
 		if (PageSwapCache(page)) {
 			swp_entry_t swap = { .val = page->private };
 			__delete_from_swap_cache(page);
-			spin_unlock_irq(&mapping->tree_lock);
+			write_unlock_irq(&mapping->tree_lock);
 			swap_free(swap);
 			__put_page(page);	/* The pagecache ref */
 			goto free_it;
@@ -498,7 +498,7 @@
 #endif /* CONFIG_SWAP */
 
 		__remove_from_page_cache(page);
-		spin_unlock_irq(&mapping->tree_lock);
+		write_unlock_irq(&mapping->tree_lock);
 		__put_page(page);
 
 free_it:
@@ -589,6 +589,7 @@
 		if (current_is_kswapd())
 			mod_page_state(kswapd_steal, nr_freed);
 		mod_page_state_zone(zone, pgsteal, nr_freed);
+		sc->nr_to_reclaim -= nr_freed;
 
 		spin_lock_irq(&zone->lru_lock);
 		/*
@@ -792,54 +793,50 @@
 }
 
 /*
- * Scan `nr_pages' from this zone.  Returns the number of reclaimed pages.
  * This is a basic per-zone page freer.  Used by both kswapd and direct reclaim.
  */
 static void
 shrink_zone(struct zone *zone, struct scan_control *sc)
 {
-	unsigned long scan_active, scan_inactive;
-	int count;
-
-	scan_inactive = (zone->nr_active + zone->nr_inactive) >> sc->priority;
+	unsigned long nr_active;
+	unsigned long nr_inactive;
 
 	/*
-	 * Try to keep the active list 2/3 of the size of the cache.  And
-	 * make sure that refill_inactive is given a decent number of pages.
-	 *
-	 * The "scan_active + 1" here is important.  With pagecache-intensive
-	 * workloads the inactive list is huge, and `ratio' evaluates to zero
-	 * all the time.  Which pins the active list memory.  So we add one to
-	 * `scan_active' just to make sure that the kernel will slowly sift
-	 * through the active list.
+	 * Add one to `nr_to_scan' just to make sure that the kernel will
+	 * slowly sift through the active list.
 	 */
-	if (zone->nr_active >= 4*(zone->nr_inactive*2 + 1)) {
-		/* Don't scan more than 4 times the inactive list scan size */
-		scan_active = 4*scan_inactive;
-	} else {
-		unsigned long long tmp;
-
-		/* Cast to long long so the multiply doesn't overflow */
-
-		tmp = (unsigned long long)scan_inactive * zone->nr_active;
-		do_div(tmp, zone->nr_inactive*2 + 1);
-		scan_active = (unsigned long)tmp;
-	}
-
-	atomic_add(scan_active + 1, &zone->nr_scan_active);
-	count = atomic_read(&zone->nr_scan_active);
-	if (count >= SWAP_CLUSTER_MAX) {
-		atomic_set(&zone->nr_scan_active, 0);
-		sc->nr_to_scan = count;
-		refill_inactive_zone(zone, sc);
-	}
-
-	atomic_add(scan_inactive, &zone->nr_scan_inactive);
-	count = atomic_read(&zone->nr_scan_inactive);
-	if (count >= SWAP_CLUSTER_MAX) {
-		atomic_set(&zone->nr_scan_inactive, 0);
-		sc->nr_to_scan = count;
-		shrink_cache(zone, sc);
+	zone->nr_scan_active += (zone->nr_active >> sc->priority) + 1;
+	nr_active = zone->nr_scan_active;
+	if (nr_active >= SWAP_CLUSTER_MAX)
+		zone->nr_scan_active = 0;
+	else
+		nr_active = 0;
+
+	zone->nr_scan_inactive += (zone->nr_inactive >> sc->priority) + 1;
+	nr_inactive = zone->nr_scan_inactive;
+	if (nr_inactive >= SWAP_CLUSTER_MAX)
+		zone->nr_scan_inactive = 0;
+	else
+		nr_inactive = 0;
+
+	sc->nr_to_reclaim = SWAP_CLUSTER_MAX;
+
+	while (nr_active || nr_inactive) {
+		if (nr_active) {
+			sc->nr_to_scan = min(nr_active,
+					(unsigned long)SWAP_CLUSTER_MAX);
+			nr_active -= sc->nr_to_scan;
+			refill_inactive_zone(zone, sc);
+		}
+
+		if (nr_inactive) {
+			sc->nr_to_scan = min(nr_inactive,
+					(unsigned long)SWAP_CLUSTER_MAX);
+			nr_inactive -= sc->nr_to_scan;
+			shrink_cache(zone, sc);
+			if (sc->nr_to_reclaim <= 0)
+				break;
+		}
 	}
 }
 
@@ -1100,7 +1097,7 @@
  * If there are applications that are active memory-allocators
  * (most normal use), this basically shouldn't matter.
  */
-int kswapd(void *p)
+static int kswapd(void *p)
 {
 	pg_data_t *pgdat = (pg_data_t*)p;
 	struct task_struct *tsk = current;
@@ -1139,6 +1136,7 @@
 
 		balance_pgdat(pgdat, 0);
 	}
+	return 0;
 }
 
 /*
--- diff/net/802/fc.c	2004-05-19 22:13:12.000000000 +0100
+++ source/net/802/fc.c	2004-07-01 21:32:52.000000000 +0100
@@ -47,7 +47,7 @@
 	 */
 	if (type == ETH_P_IP || type == ETH_P_ARP)
 	{
-		struct fcllc *fcllc=(struct fcllc *)(fch+1);
+		struct fcllc *fcllc;
 
 		hdr_len = sizeof(struct fch_hdr) + sizeof(struct fcllc);
 		fch = (struct fch_hdr *)skb_push(skb, hdr_len);
--- diff/net/802/tr.c	2004-05-19 22:13:12.000000000 +0100
+++ source/net/802/tr.c	2004-07-01 21:32:52.000000000 +0100
@@ -110,7 +110,7 @@
 	 */
 	if (type == ETH_P_IP || type == ETH_P_IPV6 || type == ETH_P_ARP)
 	{
-		struct trllc *trllc=(struct trllc *)(trh+1);
+		struct trllc *trllc;
 
 		hdr_len = sizeof(struct trh_hdr) + sizeof(struct trllc);
 		trh = (struct trh_hdr *)skb_push(skb, hdr_len);
--- diff/net/Kconfig	2004-05-19 22:13:12.000000000 +0100
+++ source/net/Kconfig	2004-07-01 21:32:52.000000000 +0100
@@ -650,18 +650,17 @@
 
 endmenu
 
+config KGDBOE
+	def_bool (X86 || IA64) && KGDB
+
 config NETPOLL
-	def_bool NETCONSOLE
+	def_bool NETCONSOLE || KGDBOE
 
 config NETPOLL_RX
-	bool "Netpoll support for trapping incoming packets"
-	default n
-	depends on NETPOLL
+	def_bool KGDBOE
 
 config NETPOLL_TRAP
-	bool "Netpoll traffic trapping"
-	default n
-	depends on NETPOLL
+	def_bool KGDBOE
 
 config NET_POLL_CONTROLLER
 	def_bool NETPOLL
--- diff/net/atm/br2684.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/atm/br2684.c	2004-07-01 21:32:52.000000000 +0100
@@ -558,7 +558,7 @@
 	atmvcc->push = br2684_push;
 	skb_queue_head_init(&copy);
 	skb_migrate(&atmvcc->sk->sk_receive_queue, &copy);
-	while ((skb = skb_dequeue(&copy))) {
+	while ((skb = skb_dequeue(&copy)) != NULL) {
 		BRPRIV(skb->dev)->stats.rx_bytes -= skb->len;
 		BRPRIV(skb->dev)->stats.rx_packets--;
 		br2684_push(atmvcc, skb);
--- diff/net/atm/clip.c	2004-05-19 22:13:12.000000000 +0100
+++ source/net/atm/clip.c	2004-07-01 21:32:52.000000000 +0100
@@ -503,7 +503,7 @@
 	skb_queue_head_init(&copy);
 	skb_migrate(&vcc->sk->sk_receive_queue, &copy);
 	/* re-process everything received between connection setup and MKIP */
-	while ((skb = skb_dequeue(&copy)))
+	while ((skb = skb_dequeue(&copy)) != NULL)
 		if (!clip_devs) {
 			atm_return(vcc,skb->truesize);
 			kfree_skb(skb);
--- diff/net/atm/common.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/atm/common.c	2004-07-01 21:32:52.000000000 +0100
@@ -187,7 +187,7 @@
 
 		vcc_remove_socket(sk);	/* no more receive */
 
-		while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue))) {
+		while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue)) != NULL) {
 			atm_return(vcc,skb->truesize);
 			kfree_skb(skb);
 		}
--- diff/net/atm/lec.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/atm/lec.c	2004-07-01 21:32:52.000000000 +0100
@@ -567,7 +567,7 @@
         if (skb_peek(&vcc->sk->sk_receive_queue))
 		printk("%s lec_atm_close: closing with messages pending\n",
                        dev->name);
-        while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue))) {
+        while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue)) != NULL) {
                 atm_return(vcc, skb->truesize);
 		dev_kfree_skb(skb);
         }
@@ -1940,7 +1940,7 @@
                                            priv->path_switching_delay)) {
 			                        struct sk_buff *skb;
 
- 				                while ((skb = skb_dequeue(&entry->tx_wait)))
+ 				                while ((skb = skb_dequeue(&entry->tx_wait)) != NULL)
 					                lec_send(entry->vcc, skb, entry->priv);
                                                 entry->last_used = jiffies;
                                                 entry->status = 
@@ -2337,7 +2337,7 @@
                             entry->status == ESI_FLUSH_PENDING) {
 			        struct sk_buff *skb;
 
- 				while ((skb = skb_dequeue(&entry->tx_wait)))
+ 				while ((skb = skb_dequeue(&entry->tx_wait)) != NULL)
 					lec_send(entry->vcc, skb, entry->priv);
                                 entry->status = ESI_FORWARD_DIRECT;
                                 DPRINTK("LEC_ARP: Flushed\n");
--- diff/net/atm/mpoa_proc.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/atm/mpoa_proc.c	2004-07-01 21:32:52.000000000 +0100
@@ -103,7 +103,7 @@
 			     size_t count, loff_t *pos){
         unsigned long page = 0;
 	unsigned char *temp;
-        int length = 0;
+        ssize_t length = 0;
 	int i = 0;
 	struct mpoa_client *mpc = mpcs;
 	in_cache_entry *in_entry;
--- diff/net/atm/svc.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/atm/svc.c	2004-07-01 21:32:52.000000000 +0100
@@ -66,7 +66,7 @@
 	}
 	/* beware - socket is still in use by atmsigd until the last
 	   as_indicate has been answered */
-	while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue))) {
+	while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue)) != NULL) {
 		DPRINTK("LISTEN REL\n");
 		sigd_enq2(NULL,as_reject,vcc,NULL,NULL,&vcc->qos,0);
 		dev_kfree_skb(skb);
--- diff/net/bridge/br.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/bridge/br.c	2004-07-01 21:32:52.000000000 +0100
@@ -33,8 +33,6 @@
 {
 	br_fdb_init();
 
-	br_sysfs_init();
-
 #ifdef CONFIG_BRIDGE_NETFILTER
 	if (br_netfilter_init())
 		return 1;
@@ -69,7 +67,6 @@
 #endif
 
 	br_handle_frame_hook = NULL;
-	br_sysfs_fini();
 	br_fdb_fini();
 }
 
--- diff/net/bridge/br_if.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/bridge/br_if.c	2004-07-01 21:32:52.000000000 +0100
@@ -41,7 +41,7 @@
 	int err;
 
 	strncpy(ifr.ifr_name, dev->name, IFNAMSIZ);
-	ifr.ifr_data = (void *) &ecmd;
+	ifr.ifr_data = (void __user *) &ecmd;
 
 	old_fs = get_fs();
 	set_fs(KERNEL_DS);
@@ -75,9 +75,8 @@
 	return 100;	/* assume old 10Mbps */
 }
 
-static void destroy_nbp(void *arg)
+static void destroy_nbp(struct net_bridge_port *p)
 {
-	struct net_bridge_port *p = arg;
 	struct net_device *dev = p->dev;
 
 	dev->br_port = NULL;
@@ -88,6 +87,13 @@
 	br_sysfs_freeif(p);
 }
 
+static void destroy_nbp_rcu(struct rcu_head *head)
+{
+	struct net_bridge_port *p =
+			container_of(head, struct net_bridge_port, rcu);
+	destroy_nbp(p);
+}
+
 /* called with RTNL */
 static void del_nbp(struct net_bridge_port *p)
 {
@@ -108,7 +114,7 @@
 	del_timer_sync(&p->forward_delay_timer);
 	del_timer_sync(&p->hold_timer);
 	
-	call_rcu(&p->rcu, destroy_nbp, p);
+	call_rcu(&p->rcu, destroy_nbp_rcu);
 }
 
 /* called with RTNL */
--- diff/net/bridge/br_ioctl.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/bridge/br_ioctl.c	2004-07-01 21:32:52.000000000 +0100
@@ -403,6 +403,6 @@
 
 	}
 
-	printk(KERN_DEBUG "Bridge does not support ioctl 0x%x\n", cmd);
+	pr_debug("Bridge does not support ioctl 0x%x\n", cmd);
 	return -EOPNOTSUPP;
 }
--- diff/net/bridge/br_private.h	2004-06-30 14:26:02.000000000 +0100
+++ source/net/bridge/br_private.h	2004-07-01 21:32:52.000000000 +0100
@@ -217,9 +217,6 @@
 extern void br_sysfs_freeif(struct net_bridge_port *p);
 
 /* br_sysfs_br.c */
-extern struct subsystem bridge_subsys;
-extern void br_sysfs_init(void);
-extern void br_sysfs_fini(void);
 extern int br_sysfs_addbr(struct net_device *dev);
 extern void br_sysfs_delbr(struct net_device *dev);
 
@@ -228,8 +225,6 @@
 #define br_sysfs_addif(p)	(0)
 #define br_sysfs_removeif(p)	do { } while(0)
 #define br_sysfs_freeif(p)	kfree(p)
-#define br_sysfs_init()		do { } while(0)
-#define br_sysfs_fini()		do { } while(0)
 #define br_sysfs_addbr(dev)	(0)
 #define br_sysfs_delbr(dev)	do { } while(0)
 #endif /* CONFIG_SYSFS */
--- diff/net/bridge/br_stp.c	2004-05-19 22:13:13.000000000 +0100
+++ source/net/bridge/br_stp.c	2004-07-01 21:32:52.000000000 +0100
@@ -161,20 +161,19 @@
 	if (!br_is_root_bridge(br)) {
 		struct net_bridge_port *root
 			= br_get_port(br, br->root_port);
-		bpdu.max_age = root->message_age_timer.expires - jiffies;
-
-		if (bpdu.max_age <= 0) bpdu.max_age = 1;
+	bpdu.message_age = br->max_age -
+		(root->message_age_timer.expires - jiffies) + 1;
 	}
 	bpdu.max_age = br->max_age;
 	bpdu.hello_time = br->hello_time;
 	bpdu.forward_delay = br->forward_delay;
 
-	br_send_config_bpdu(p, &bpdu);
-
-	p->topology_change_ack = 0;
-	p->config_pending = 0;
-	
-	mod_timer(&p->hold_timer, jiffies + BR_HOLD_TIME);
+	if (bpdu.message_age < br->max_age) {
+		br_send_config_bpdu(p, &bpdu);
+		p->topology_change_ack = 0;
+		p->config_pending = 0;
+		mod_timer(&p->hold_timer, jiffies + BR_HOLD_TIME);
+	}
 }
 
 /* called under bridge lock */
--- diff/net/bridge/br_sysfs_br.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/bridge/br_sysfs_br.c	2004-07-01 21:32:52.000000000 +0100
@@ -300,25 +300,6 @@
 	.read = brforward_read,
 };
 
-
-/*
- * This is a dummy kset so bridge objects don't cause
- * hotplug events 
- */
-struct subsystem bridge_subsys = { 
-	.kset = { .hotplug_ops = NULL },
-};
-
-void br_sysfs_init(void)
-{
-	subsystem_register(&bridge_subsys);
-}
-
-void br_sysfs_fini(void)
-{
-	subsystem_unregister(&bridge_subsys);
-}
-
 /*
  * Add entries in sysfs onto the existing network class device
  * for the bridge.
@@ -353,7 +334,7 @@
 	
 	kobject_set_name(&br->ifobj, SYSFS_BRIDGE_PORT_SUBDIR);
 	br->ifobj.ktype = NULL;
-	br->ifobj.kset = &bridge_subsys.kset;
+	br->ifobj.kset = NULL;
 	br->ifobj.parent = brobj;
 
 	err = kobject_register(&br->ifobj);
--- diff/net/bridge/br_sysfs_if.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/bridge/br_sysfs_if.c	2004-07-01 21:32:52.000000000 +0100
@@ -227,7 +227,7 @@
 	kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR);
 	p->kobj.ktype = &brport_ktype;
 	p->kobj.parent = &(p->dev->class_dev.kobj);
-	p->kobj.kset = &bridge_subsys.kset;
+	p->kobj.kset = NULL;
 
 	err = kobject_add(&p->kobj);
 	if(err)
--- diff/net/core/Makefile	2004-06-30 14:26:02.000000000 +0100
+++ source/net/core/Makefile	2004-07-01 21:32:52.000000000 +0100
@@ -2,7 +2,7 @@
 # Makefile for the Linux networking core.
 #
 
-obj-y := sock.o skbuff.o iovec.o datagram.o scm.o
+obj-y := sock.o skbuff.o iovec.o datagram.o stream.o scm.o
 
 obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
 
--- diff/net/core/dev.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/core/dev.c	2004-07-01 21:32:52.000000000 +0100
@@ -107,6 +107,7 @@
 #include <linux/module.h>
 #include <linux/kallsyms.h>
 #include <linux/netpoll.h>
+#include <linux/rcupdate.h>
 #ifdef CONFIG_NET_RADIO
 #include <linux/wireless.h>		/* Note : will define WIRELESS_EXT */
 #include <net/iw_handler.h>
@@ -1305,6 +1306,20 @@
 	return 0;
 }
 
+#define HARD_TX_LOCK_BH(dev, cpu) {			\
+	if ((dev->features & NETIF_F_LLTX) == 0) {	\
+		spin_lock_bh(&dev->xmit_lock);		\
+		dev->xmit_lock_owner = cpu;		\
+	}						\
+}
+
+#define HARD_TX_UNLOCK_BH(dev) {			\
+	if ((dev->features & NETIF_F_LLTX) == 0) {	\
+		dev->xmit_lock_owner = -1;		\
+		spin_unlock_bh(&dev->xmit_lock);	\
+	}						\
+}
+
 /**
  *	dev_queue_xmit - transmit a buffer
  *	@skb: buffer to transmit
@@ -1348,18 +1363,38 @@
 	      	if (skb_checksum_help(&skb, 0))
 	      		goto out_kfree_skb;
 
-	/* Grab device queue */
-	spin_lock_bh(&dev->queue_lock);
+	rcu_read_lock();
+	/* Updates of qdisc are serialized by queue_lock. 
+	 * The struct Qdisc which is pointed to by qdisc is now a 
+	 * rcu structure - it may be accessed without acquiring 
+	 * a lock (but the structure may be stale.) The freeing of the
+	 * qdisc will be deferred until it's known that there are no 
+	 * more references to it.
+	 * 
+	 * If the qdisc has an enqueue function, we still need to 
+	 * hold the queue_lock before calling it, since queue_lock
+	 * also serializes access to the device queue.
+	 */
+
 	q = dev->qdisc;
+	smp_read_barrier_depends();
+#ifdef CONFIG_NET_CLS_ACT
+	skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_EGRESS);
+#endif
 	if (q->enqueue) {
+		/* Grab device queue */
+		spin_lock_bh(&dev->queue_lock);
+
 		rc = q->enqueue(skb, q);
 
 		qdisc_run(dev);
 
 		spin_unlock_bh(&dev->queue_lock);
+		rcu_read_unlock();
 		rc = rc == NET_XMIT_BYPASS ? NET_XMIT_SUCCESS : rc;
 		goto out;
 	}
+	rcu_read_unlock();
 
 	/* The device has no queue. Common case for software devices:
 	   loopback, all the sorts of tunnels...
@@ -1374,18 +1409,12 @@
 	   Either shot noqueue qdisc, it is even simpler 8)
 	 */
 	if (dev->flags & IFF_UP) {
-		int cpu = smp_processor_id();
+		int cpu = get_cpu();
 
 		if (dev->xmit_lock_owner != cpu) {
-			/*
-			 * The spin_lock effectivly does a preempt lock, but 
-			 * we are about to drop that...
-			 */
-			preempt_disable();
-			spin_unlock(&dev->queue_lock);
-			spin_lock(&dev->xmit_lock);
-			dev->xmit_lock_owner = cpu;
-			preempt_enable();
+
+			HARD_TX_LOCK_BH(dev, cpu);
+			put_cpu();
 
 			if (!netif_queue_stopped(dev)) {
 				if (netdev_nit)
@@ -1393,18 +1422,17 @@
 
 				rc = 0;
 				if (!dev->hard_start_xmit(skb, dev)) {
-					dev->xmit_lock_owner = -1;
-					spin_unlock_bh(&dev->xmit_lock);
+					HARD_TX_UNLOCK_BH(dev);
 					goto out;
 				}
 			}
-			dev->xmit_lock_owner = -1;
-			spin_unlock_bh(&dev->xmit_lock);
+			HARD_TX_UNLOCK_BH(dev);
 			if (net_ratelimit())
 				printk(KERN_CRIT "Virtual device %s asks to "
 				       "queue packet!\n", dev->name);
 			goto out_enetdown;
 		} else {
+			put_cpu();
 			/* Recursion is detected! It is possible,
 			 * unfortunately */
 			if (net_ratelimit())
@@ -1412,7 +1440,6 @@
 				       "%s, fix it urgently!\n", dev->name);
 		}
 	}
-	spin_unlock_bh(&dev->queue_lock);
 out_enetdown:
 	rc = -ENETDOWN;
 out_kfree_skb:
@@ -1550,7 +1577,6 @@
 }
 #endif
 
-
 /**
  *	netif_rx	-	post buffer to the network code
  *	@skb: buffer to post
@@ -1731,6 +1757,48 @@
 	return 0;
 }
 
+
+#ifdef CONFIG_NET_CLS_ACT
+/* TODO: Maybe we should just force sch_ingress to be compiled in
+ * when CONFIG_NET_CLS_ACT is? otherwise some useless instructions
+ * a compare and 2 stores extra right now if we dont have it on
+ * but have CONFIG_NET_CLS_ACT
+ * NOTE: This doesnt stop any functionality; if you dont have 
+ * the ingress scheduler, you just cant add policies on ingress.
+ *
+ */
+int ing_filter(struct sk_buff *skb) 
+{
+	struct Qdisc *q;
+	struct net_device *dev = skb->dev;
+	int result = TC_ACT_OK;
+	
+	if (dev->qdisc_ingress) {
+		__u32 ttl = (__u32) G_TC_RTTL(skb->tc_verd);
+		if (MAX_RED_LOOP < ttl++) {
+			printk("Redir loop detected Dropping packet (%s->%s)\n",
+				skb->input_dev?skb->input_dev->name:"??",skb->dev->name);
+			return TC_ACT_SHOT;
+		}
+
+		skb->tc_verd = SET_TC_RTTL(skb->tc_verd,ttl);
+
+		skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_INGRESS);
+		if (NULL == skb->input_dev) {
+			skb->input_dev = skb->dev;
+			printk("ing_filter:  fixed  %s out %s\n",skb->input_dev->name,skb->dev->name);
+		}
+		spin_lock(&dev->ingress_lock);
+		if ((q = dev->qdisc_ingress) != NULL)
+			result = q->enqueue(skb, q);
+		spin_unlock(&dev->ingress_lock);
+
+	}
+
+	return result;
+}
+#endif
+
 int netif_receive_skb(struct sk_buff *skb)
 {
 	struct packet_type *ptype, *pt_prev;
@@ -1762,6 +1830,13 @@
 	skb->mac_len = skb->nh.raw - skb->mac.raw;
 
 	pt_prev = NULL;
+#ifdef CONFIG_NET_CLS_ACT
+	if (skb->tc_verd & TC_NCLS) {
+		skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
+		goto ncls;
+	}
+ #endif
+
 	rcu_read_lock();
 	list_for_each_entry_rcu(ptype, &ptype_all, list) {
 		if (!ptype->dev || ptype->dev == skb->dev) {
@@ -1771,6 +1846,26 @@
 		}
 	}
 
+#ifdef CONFIG_NET_CLS_ACT
+	if (pt_prev) {
+		atomic_inc(&skb->users);
+		ret = pt_prev->func(skb, skb->dev, pt_prev);
+		pt_prev = NULL; /* noone else should process this after*/
+	} else {
+		skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd);
+	}
+
+	ret = ing_filter(skb);
+
+	if (ret == TC_ACT_SHOT || (ret == TC_ACT_STOLEN)) {
+		kfree_skb(skb);
+		goto out;
+	}
+
+	skb->tc_verd = 0;
+ncls:
+#endif
+
 	handle_diverter(skb);
 
 	if (__handle_bridge(skb, &pt_prev, &ret))
@@ -1870,7 +1965,6 @@
 	unsigned long start_time = jiffies;
 	int budget = netdev_max_backlog;
 
-	
 	local_irq_disable();
 
 	while (!list_empty(&queue->poll_list)) {
@@ -1896,6 +1990,10 @@
 			dev_put(dev);
 			local_irq_disable();
 		}
+
+#ifdef CONFIG_KGDBOE
+		kgdb_process_breakpoint();
+#endif
 	}
 out:
 	local_irq_enable();
@@ -2824,6 +2922,10 @@
 	spin_lock_init(&dev->queue_lock);
 	spin_lock_init(&dev->xmit_lock);
 	dev->xmit_lock_owner = -1;
+#ifdef CONFIG_NET_CLS_ACT
+	spin_lock_init(&dev->ingress_lock);
+#endif
+
 #ifdef CONFIG_NET_FASTROUTE
 	dev->fastpath_lock = RW_LOCK_UNLOCKED;
 #endif
@@ -3177,6 +3279,8 @@
 	/* Finish processing unregister after unlock */
 	net_set_todo(dev);
 
+	synchronize_net();
+
 	dev_put(dev);
 	return 0;
 }
@@ -3358,4 +3462,9 @@
 EXPORT_SYMBOL(netdev_fastroute_obstacles);
 #endif
 
+#ifdef CONFIG_NET_CLS_ACT
+EXPORT_SYMBOL(ing_filter);
+#endif
+
+
 EXPORT_PER_CPU_SYMBOL(softnet_data);
--- diff/net/core/dst.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/core/dst.c	2004-07-01 21:32:52.000000000 +0100
@@ -210,6 +210,41 @@
 	return NULL;
 }
 
+/* Dirty hack. We did it in 2.2 (in __dst_free),
+ * we have _very_ good reasons not to repeat
+ * this mistake in 2.3, but we have no choice
+ * now. _It_ _is_ _explicit_ _deliberate_
+ * _race_ _condition_.
+ *
+ * Commented and originally written by Alexey.
+ */
+static void dst_ifdown(struct dst_entry *dst, int unregister)
+{
+	struct net_device *dev = dst->dev;
+
+	if (!unregister) {
+		dst->input = dst_discard_in;
+		dst->output = dst_discard_out;
+	}
+
+	do {
+		if (unregister) {
+			dst->dev = &loopback_dev;
+			dev_hold(&loopback_dev);
+			dev_put(dev);
+			if (dst->neighbour && dst->neighbour->dev == dev) {
+				dst->neighbour->dev = &loopback_dev;
+				dev_put(dev);
+				dev_hold(&loopback_dev);
+			}
+		}
+
+		if (dst->ops->ifdown)
+			dst->ops->ifdown(dst, unregister);
+	} while ((dst = dst->child) && dst->flags & DST_NOHASH &&
+		 dst->dev == dev);
+}
+
 static int dst_dev_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
 	struct net_device *dev = ptr;
@@ -220,31 +255,8 @@
 	case NETDEV_DOWN:
 		spin_lock_bh(&dst_lock);
 		for (dst = dst_garbage_list; dst; dst = dst->next) {
-			if (dst->dev == dev) {
-				/* Dirty hack. We did it in 2.2 (in __dst_free),
-				   we have _very_ good reasons not to repeat
-				   this mistake in 2.3, but we have no choice
-				   now. _It_ _is_ _explicit_ _deliberate_
-				   _race_ _condition_.
-				 */
-				if (event!=NETDEV_DOWN &&
-				    dst->output == dst_discard_out) {
-					dst->dev = &loopback_dev;
-					dev_hold(&loopback_dev);
-					dev_put(dev);
-					dst->output = dst_discard_out;
-					if (dst->neighbour && dst->neighbour->dev == dev) {
-						dst->neighbour->dev = &loopback_dev;
-						dev_put(dev);
-						dev_hold(&loopback_dev);
-					}
-				} else {
-					dst->input = dst_discard_in;
-					dst->output = dst_discard_out;
-				}
-				if (dst->ops->ifdown)
-					dst->ops->ifdown(dst, event != NETDEV_DOWN);
-			}
+			if (dst->dev == dev)
+				dst_ifdown(dst, event != NETDEV_DOWN);
 		}
 		spin_unlock_bh(&dst_lock);
 		break;
--- diff/net/core/net-sysfs.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/core/net-sysfs.c	2004-07-01 21:32:52.000000000 +0100
@@ -414,7 +414,7 @@
 	if ((ret = class_device_register(class_dev)))
 		goto out;
 
-	for (i = 0; (attr = net_class_attributes[i]); i++) {
+	for (i = 0; (attr = net_class_attributes[i]) != NULL; i++) {
 		if ((ret = class_device_create_file(class_dev, attr)))
 		    goto out_unreg;
 	}
--- diff/net/core/rtnetlink.c	2004-05-19 22:13:13.000000000 +0100
+++ source/net/core/rtnetlink.c	2004-07-01 21:32:52.000000000 +0100
@@ -93,7 +93,8 @@
 	NLMSG_LENGTH(sizeof(struct rtmsg)),
 	NLMSG_LENGTH(sizeof(struct tcmsg)),
 	NLMSG_LENGTH(sizeof(struct tcmsg)),
-	NLMSG_LENGTH(sizeof(struct tcmsg))
+	NLMSG_LENGTH(sizeof(struct tcmsg)),
+	NLMSG_LENGTH(sizeof(struct tcamsg))
 };
 
 static const int rta_max[(RTM_MAX+1-RTM_BASE)/4] =
@@ -105,7 +106,8 @@
 	RTA_MAX,
 	TCA_MAX,
 	TCA_MAX,
-	TCA_MAX
+	TCA_MAX,
+	TCAA_MAX
 };
 
 void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data)
--- diff/net/core/skbuff.c	2004-05-19 22:13:13.000000000 +0100
+++ source/net/core/skbuff.c	2004-07-01 21:32:52.000000000 +0100
@@ -49,6 +49,9 @@
 #include <linux/inet.h>
 #include <linux/slab.h>
 #include <linux/netdevice.h>
+#ifdef CONFIG_NET_CLS_ACT
+#include <net/pkt_sched.h>
+#endif
 #include <linux/string.h>
 #include <linux/skbuff.h>
 #include <linux/cache.h>
@@ -241,6 +244,15 @@
 	nf_bridge_put(skb->nf_bridge);
 #endif
 #endif
+/* XXX: IS this still necessary? - JHS */
+#ifdef CONFIG_NET_SCHED
+	skb->tc_index = 0;
+#ifdef CONFIG_NET_CLS_ACT
+	skb->tc_verd = 0;
+	skb->tc_classid = 0;
+#endif
+#endif
+
 	kfree_skbmem(skb);
 }
 
@@ -312,6 +324,14 @@
 #endif
 #ifdef CONFIG_NET_SCHED
 	C(tc_index);
+#ifdef CONFIG_NET_CLS_ACT
+	n->tc_verd = SET_TC_VERD(skb->tc_verd,0);
+	n->tc_verd = CLR_TC_OK2MUNGE(skb->tc_verd);
+	n->tc_verd = CLR_TC_MUNGED(skb->tc_verd);
+	C(input_dev);
+	C(tc_classid);
+#endif
+
 #endif
 	C(truesize);
 	atomic_set(&n->users, 1);
@@ -366,6 +386,9 @@
 #endif
 #endif
 #ifdef CONFIG_NET_SCHED
+#ifdef CONFIG_NET_CLS_ACT
+	new->tc_verd = old->tc_verd;
+#endif
 	new->tc_index	= old->tc_index;
 #endif
 	atomic_set(&new->users, 1);
@@ -1263,6 +1286,81 @@
 }
 #endif
 
+static void inline skb_split_inside_header(struct sk_buff *skb,
+					   struct sk_buff* skb1,
+					   const u32 len, const int pos)
+{
+	int i;
+
+	memcpy(skb_put(skb1, pos - len), skb->data + len, pos - len);
+
+	/* And move data appendix as is. */
+	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
+		skb_shinfo(skb1)->frags[i] = skb_shinfo(skb)->frags[i];
+
+	skb_shinfo(skb1)->nr_frags = skb_shinfo(skb)->nr_frags;
+	skb_shinfo(skb)->nr_frags  = 0;
+	skb1->data_len		   = skb->data_len;
+	skb1->len		   += skb1->data_len;
+	skb->data_len		   = 0;
+	skb->len		   = len;
+	skb->tail		   = skb->data + len;
+}
+
+static void inline skb_split_no_header(struct sk_buff *skb,
+				       struct sk_buff* skb1,
+				       const u32 len, int pos)
+{
+	int i, k = 0;
+	const int nfrags = skb_shinfo(skb)->nr_frags;
+
+	skb_shinfo(skb)->nr_frags = 0;
+	skb1->len		  = skb1->data_len = skb->len - len;
+	skb->len		  = len;
+	skb->data_len		  = len - pos;
+
+	for (i = 0; i < nfrags; i++) {
+		int size = skb_shinfo(skb)->frags[i].size;
+
+		if (pos + size > len) {
+			skb_shinfo(skb1)->frags[k] = skb_shinfo(skb)->frags[i];
+
+			if (pos < len) {
+				/* Split frag.
+				 * We have to variants in this case:
+				 * 1. Move all the frag to the second
+				 *    part, if it is possible. F.e.
+				 *    this approach is mandatory for TUX,
+				 *    where splitting is expensive.
+				 * 2. Split is accurately. We make this.
+				 */
+				get_page(skb_shinfo(skb)->frags[i].page);
+				skb_shinfo(skb1)->frags[0].page_offset += len - pos;
+				skb_shinfo(skb1)->frags[0].size -= len - pos;
+				skb_shinfo(skb)->frags[i].size	= len - pos;
+				skb_shinfo(skb)->nr_frags++;
+			}
+			k++;
+		} else
+			skb_shinfo(skb)->nr_frags++;
+		pos += size;
+	}
+	skb_shinfo(skb1)->nr_frags = k;
+}
+
+/**
+ * skb_split - Split fragmented skb to two parts at length len.
+ */
+void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len)
+{
+	int pos = skb_headlen(skb);
+
+	if (len < pos)	/* Split line is inside header. */
+		skb_split_inside_header(skb, skb1, len, pos);
+	else		/* Second chunk has no header, nothing to copy. */
+		skb_split_no_header(skb, skb1, len, pos);
+}
+
 void __init skb_init(void)
 {
 	skbuff_head_cache = kmem_cache_create("skbuff_head_cache",
@@ -1300,3 +1398,4 @@
 EXPORT_SYMBOL(skb_queue_tail);
 EXPORT_SYMBOL(skb_unlink);
 EXPORT_SYMBOL(skb_append);
+EXPORT_SYMBOL(skb_split);
--- diff/net/core/sock.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/core/sock.c	2004-07-01 21:32:52.000000000 +0100
@@ -118,6 +118,7 @@
 #include <net/protocol.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
+#include <net/xfrm.h>
 #include <linux/ipsec.h>
 
 #include <linux/filter.h>
@@ -522,7 +523,7 @@
 				v.tm.tv_usec = 0;
 			} else {
 				v.tm.tv_sec = sk->sk_rcvtimeo / HZ;
-				v.tm.tv_usec = ((sk->sk_rcvtimeo % HZ) * 1000) / HZ;
+				v.tm.tv_usec = ((sk->sk_rcvtimeo % HZ) * 1000000) / HZ;
 			}
 			break;
 
@@ -533,7 +534,7 @@
 				v.tm.tv_usec = 0;
 			} else {
 				v.tm.tv_sec = sk->sk_sndtimeo / HZ;
-				v.tm.tv_usec = ((sk->sk_sndtimeo % HZ) * 1000) / HZ;
+				v.tm.tv_usec = ((sk->sk_sndtimeo % HZ) * 1000000) / HZ;
 			}
 			break;
 
@@ -650,6 +651,14 @@
 		printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n",
 		       __FUNCTION__, atomic_read(&sk->sk_omem_alloc));
 
+	/*
+	 * If sendmsg cached page exists, toss it.
+	 */
+	if (sk->sk_sndmsg_page) {
+		__free_page(sk->sk_sndmsg_page);
+		sk->sk_sndmsg_page = NULL;
+	}
+
 	security_sk_free(sk);
 	kmem_cache_free(sk->sk_slab, sk);
 	module_put(owner);
@@ -1147,6 +1156,8 @@
 	skb_queue_head_init(&sk->sk_write_queue);
 	skb_queue_head_init(&sk->sk_error_queue);
 
+	sk->sk_send_head	=	NULL;
+
 	init_timer(&sk->sk_timer);
 	
 	sk->sk_allocation	=	GFP_KERNEL;
@@ -1173,9 +1184,13 @@
 	sk->sk_error_report	=	sock_def_error_report;
 	sk->sk_destruct		=	sock_def_destruct;
 
+	sk->sk_sndmsg_page	=	NULL;
+	sk->sk_sndmsg_off	=	0;
+
 	sk->sk_peercred.pid 	=	0;
 	sk->sk_peercred.uid	=	-1;
 	sk->sk_peercred.gid	=	-1;
+	sk->sk_write_pending	=	0;
 	sk->sk_rcvlowat		=	1;
 	sk->sk_rcvtimeo		=	MAX_SCHEDULE_TIMEOUT;
 	sk->sk_sndtimeo		=	MAX_SCHEDULE_TIMEOUT;
@@ -1245,6 +1260,93 @@
 }
 EXPORT_SYMBOL(sock_disable_timestamp);
 
+/*
+ *	Get a socket option on an socket.
+ *
+ *	FIX: POSIX 1003.1g is very ambiguous here. It states that
+ *	asynchronous errors should be reported by getsockopt. We assume
+ *	this means if you specify SO_ERROR (otherwise whats the point of it).
+ */
+int sock_common_getsockopt(struct socket *sock, int level, int optname,
+			   char __user *optval, int __user *optlen)
+{
+	struct sock *sk = sock->sk;
+
+	return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
+}
+
+EXPORT_SYMBOL(sock_common_getsockopt);
+
+int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock,
+			struct msghdr *msg, size_t size, int flags)
+{
+	struct sock *sk = sock->sk;
+	int addr_len = 0;
+	int err;
+
+	err = sk->sk_prot->recvmsg(iocb, sk, msg, size, flags & MSG_DONTWAIT,
+				   flags & ~MSG_DONTWAIT, &addr_len);
+	if (err >= 0)
+		msg->msg_namelen = addr_len;
+	return err;
+}
+
+EXPORT_SYMBOL(sock_common_recvmsg);
+
+/*
+ *	Set socket options on an inet socket.
+ */
+int sock_common_setsockopt(struct socket *sock, int level, int optname,
+			   char __user *optval, int optlen)
+{
+	struct sock *sk = sock->sk;
+
+	return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen);
+}
+
+EXPORT_SYMBOL(sock_common_setsockopt);
+
+void sk_common_release(struct sock *sk)
+{
+	if (sk->sk_prot->destroy)
+		sk->sk_prot->destroy(sk);
+
+	/*
+	 * Observation: when sock_common_release is called, processes have
+	 * no access to socket. But net still has.
+	 * Step one, detach it from networking:
+	 *
+	 * A. Remove from hash tables.
+	 */
+
+	sk->sk_prot->unhash(sk);
+
+	/*
+	 * In this point socket cannot receive new packets, but it is possible
+	 * that some packets are in flight because some CPU runs receiver and
+	 * did hash table lookup before we unhashed socket. They will achieve
+	 * receive queue and will be purged by socket destructor.
+	 *
+	 * Also we still have packets pending on receive queue and probably,
+	 * our own packets waiting in device queues. sock_destroy will drain
+	 * receive queue, but transmitted packets will delay socket destruction
+	 * until the last reference will be released.
+	 */
+
+	sock_orphan(sk);
+
+	xfrm_sk_free_policy(sk);
+
+#ifdef INET_REFCNT_DEBUG
+	if (atomic_read(&sk->sk_refcnt) != 1)
+		printk(KERN_DEBUG "Destruction of the socket %p delayed, c=%d\n",
+		       sk, atomic_read(&sk->sk_refcnt));
+#endif
+	sock_put(sk);
+}
+
+EXPORT_SYMBOL(sk_common_release);
+
 EXPORT_SYMBOL(__lock_sock);
 EXPORT_SYMBOL(__release_sock);
 EXPORT_SYMBOL(sk_alloc);
--- diff/net/decnet/dn_nsp_in.c	2004-05-19 22:13:13.000000000 +0100
+++ source/net/decnet/dn_nsp_in.c	2004-07-01 21:32:52.000000000 +0100
@@ -504,7 +504,7 @@
 	struct dn_scp *scp = DN_SK(sk);
 	unsigned short segnum;
 	unsigned char lsflags;
-	char fcval;
+	signed char fcval;
 	int wake_up = 0;
 	char *ptr = skb->data;
 	unsigned char fctype = scp->services_rem & NSP_FC_MASK;
--- diff/net/decnet/dn_route.c	2004-06-30 14:26:02.000000000 +0100
+++ source/net/decnet/dn_route.c	2004-07-01 21:32:52.000000000 +0100
@@ -146,14 +146,14 @@
 
 static inline void dnrt_free(struct dn_route *rt)
 {
-	call_rcu(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, &rt->u.dst);
+	call_rcu(&rt->u.dst.rcu_head, dst_rcu_free);
 }
 
 static inline void dnrt_drop(struct dn_route *rt)
 {
 	if (rt)
 		dst_release(&rt->u.dst);
-	call_rcu(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, &rt->u.dst);
+	call_rcu(&rt->u.dst.rcu_head, dst_rcu_free);
 }
 
 static void dn_dst_check_expire(unsigned long dummy)
--- diff/net/econet/af_econet.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/econet/af_econet.c	2004-07-01 21:32:53.000000000 +0100
@@ -201,6 +201,7 @@
 	return 0;
 }
 
+#if defined(CONFIG_ECONET_AUNUDP) || defined(CONFIG_ECONET_NATIVE)
 /*
  *	Queue a transmit result for the user to be told about.
  */
@@ -227,6 +228,7 @@
 	if (sock_queue_rcv_skb(sk, skb) < 0)
 		kfree_skb(skb);
 }
+#endif
 
 #ifdef CONFIG_ECONET_NATIVE
 /*
@@ -255,10 +257,9 @@
 	struct ec_addr addr;
 	int err;
 	unsigned char port, cb;
+#if defined(CONFIG_ECONET_AUNUDP) || defined(CONFIG_ECONET_NATIVE)
 	struct sk_buff *skb;
 	struct ec_cb *eb;
-#ifdef CONFIG_ECONET_NATIVE
-	unsigned short proto = 0;
 #endif
 #ifdef CONFIG_ECONET_AUNUDP
 	struct msghdr udpmsg;
@@ -316,6 +317,8 @@
 	{
 		/* Real hardware Econet.  We're not worthy etc. */
 #ifdef CONFIG_ECONET_NATIVE
+		unsigned short proto = 0;
+
 		dev_hold(dev);
 		
 		skb = sock_alloc_send_skb(sk, len+LL_RESERVED_SPACE(dev), 
@@ -718,6 +721,7 @@
 #include <linux/smp_lock.h>
 SOCKOPS_WRAP(econet, PF_ECONET);
 
+#if defined(CONFIG_ECONET_AUNUDP) || defined(CONFIG_ECONET_NATIVE)
 /*
  *	Find the listening socket, if any, for the given data.
  */
@@ -761,9 +765,9 @@
 
 	return sock_queue_rcv_skb(sk, skb);
 }
+#endif
 
 #ifdef CONFIG_ECONET_AUNUDP
-
 /*
  *	Send an AUN protocol response. 
  */
--- diff/net/ethernet/eth.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ethernet/eth.c	2004-07-01 21:32:53.000000000 +0100
@@ -164,6 +164,9 @@
 	skb->mac.raw=skb->data;
 	skb_pull(skb,ETH_HLEN);
 	eth= skb->mac.ethernet;
+#ifdef CONFIG_NET_CLS_ACT
+	skb->input_dev = dev;
+#endif
 	
 	if(*eth->h_dest&1)
 	{
--- diff/net/ipv4/af_inet.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/af_inet.c	2004-07-01 21:32:53.000000000 +0100
@@ -166,46 +166,6 @@
 #endif
 }
 
-void inet_sock_release(struct sock *sk)
-{
-	if (sk->sk_prot->destroy)
-		sk->sk_prot->destroy(sk);
-
-	/* Observation: when inet_sock_release is called, processes have
-	 * no access to socket. But net still has.
-	 * Step one, detach it from networking:
-	 *
-	 * A. Remove from hash tables.
-	 */
-
-	sk->sk_prot->unhash(sk);
-
-	/* In this point socket cannot receive new packets,
-	 * but it is possible that some packets are in flight
-	 * because some CPU runs receiver and did hash table lookup
-	 * before we unhashed socket. They will achieve receive queue
-	 * and will be purged by socket destructor.
-	 *
-	 * Also we still have packets pending on receive
-	 * queue and probably, our own packets waiting in device queues.
-	 * sock_destroy will drain receive queue, but transmitted
-	 * packets will delay socket destruction until the last reference
-	 * will be released.
-	 */
-
-	sock_orphan(sk);
-
-	xfrm_sk_free_policy(sk);
-
-#ifdef INET_REFCNT_DEBUG
-	if (atomic_read(&sk->sk_refcnt) != 1)
-		printk(KERN_DEBUG "Destruction inet %p delayed, c=%d\n",
-		       sk, atomic_read(&sk->sk_refcnt));
-#endif
-	sock_put(sk);
-}
-
-
 /*
  *	The routines beyond this point handle the behaviour of an AF_INET
  *	socket object. Mostly it punts to the subprotocols of IP to do
@@ -213,33 +173,6 @@
  */
 
 /*
- *	Set socket options on an inet socket.
- */
-int inet_setsockopt(struct socket *sock, int level, int optname,
-		    char __user *optval, int optlen)
-{
-	struct sock *sk = sock->sk;
-
-	return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen);
-}
-
-/*
- *	Get a socket option on an AF_INET socket.
- *
- *	FIX: POSIX 1003.1g is very ambiguous here. It states that
- *	asynchronous errors should be reported by getsockopt. We assume
- *	this means if you specify SO_ERROR (otherwise whats the point of it).
- */
-
-int inet_getsockopt(struct socket *sock, int level, int optname,
-		    char __user *optval, int __user *optlen)
-{
-	struct sock *sk = sock->sk;
-
-	return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
-}
-
-/*
  *	Automatically bind an unbound socket.
  */
 
@@ -422,7 +355,7 @@
 	if (sk->sk_prot->init) {
 		err = sk->sk_prot->init(sk);
 		if (err)
-			inet_sock_release(sk);
+			sk_common_release(sk);
 	}
 out:
 	return err;
@@ -729,22 +662,6 @@
 	return 0;
 }
 
-
-int inet_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
-		 size_t size, int flags)
-{
-	struct sock *sk = sock->sk;
-	int addr_len = 0;
-	int err;
-
-	err = sk->sk_prot->recvmsg(iocb, sk, msg, size, flags & MSG_DONTWAIT,
-				   flags & ~MSG_DONTWAIT, &addr_len);
-	if (err >= 0)
-		msg->msg_namelen = addr_len;
-	return err;
-}
-
-
 int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
 		 size_t size)
 {
@@ -848,7 +765,7 @@
 		case SIOCADDRT:
 		case SIOCDELRT:
 		case SIOCRTMSG:
-			err = ip_rt_ioctl(cmd, (void *)arg);
+			err = ip_rt_ioctl(cmd, (void __user *)arg);
 			break;
 		case SIOCDARP:
 		case SIOCGARP:
@@ -891,10 +808,10 @@
 	.ioctl =	inet_ioctl,
 	.listen =	inet_listen,
 	.shutdown =	inet_shutdown,
-	.setsockopt =	inet_setsockopt,
-	.getsockopt =	inet_getsockopt,
+	.setsockopt =	sock_common_setsockopt,
+	.getsockopt =	sock_common_getsockopt,
 	.sendmsg =	inet_sendmsg,
-	.recvmsg =	inet_recvmsg,
+	.recvmsg =	sock_common_recvmsg,
 	.mmap =		sock_no_mmap,
 	.sendpage =	tcp_sendpage
 };
@@ -906,16 +823,16 @@
 	.bind =		inet_bind,
 	.connect =	inet_dgram_connect,
 	.socketpair =	sock_no_socketpair,
-	.accept =	sock_no_accept,
+	.accept =	inet_accept,
 	.getname =	inet_getname,
 	.poll =		datagram_poll,
 	.ioctl =	inet_ioctl,
 	.listen =	sock_no_listen,
 	.shutdown =	inet_shutdown,
-	.setsockopt =	inet_setsockopt,
-	.getsockopt =	inet_getsockopt,
+	.setsockopt =	sock_common_setsockopt,
+	.getsockopt =	sock_common_getsockopt,
 	.sendmsg =	inet_sendmsg,
-	.recvmsg =	inet_recvmsg,
+	.recvmsg =	sock_common_recvmsg,
 	.mmap =		sock_no_mmap,
 	.sendpage =	inet_sendpage,
 };
@@ -1041,24 +958,24 @@
 }
 
 #ifdef CONFIG_IP_MULTICAST
-static struct inet_protocol igmp_protocol = {
+static struct net_protocol igmp_protocol = {
 	.handler =	igmp_rcv,
 };
 #endif
 
-static struct inet_protocol tcp_protocol = {
+static struct net_protocol tcp_protocol = {
 	.handler =	tcp_v4_rcv,
 	.err_handler =	tcp_v4_err,
 	.no_policy =	1,
 };
 
-static struct inet_protocol udp_protocol = {
+static struct net_protocol udp_protocol = {
 	.handler =	udp_rcv,
 	.err_handler =	udp_err,
 	.no_policy =	1,
 };
 
-static struct inet_protocol icmp_protocol = {
+static struct net_protocol icmp_protocol = {
 	.handler =	icmp_rcv,
 };
 
@@ -1242,17 +1159,13 @@
 EXPORT_SYMBOL(inet_dgram_ops);
 EXPORT_SYMBOL(inet_family_ops);
 EXPORT_SYMBOL(inet_getname);
-EXPORT_SYMBOL(inet_getsockopt);
 EXPORT_SYMBOL(inet_ioctl);
 EXPORT_SYMBOL(inet_listen);
-EXPORT_SYMBOL(inet_recvmsg);
 EXPORT_SYMBOL(inet_register_protosw);
 EXPORT_SYMBOL(inet_release);
 EXPORT_SYMBOL(inet_sendmsg);
-EXPORT_SYMBOL(inet_setsockopt);
 EXPORT_SYMBOL(inet_shutdown);
 EXPORT_SYMBOL(inet_sock_destruct);
-EXPORT_SYMBOL(inet_sock_release);
 EXPORT_SYMBOL(inet_stream_connect);
 EXPORT_SYMBOL(inet_stream_ops);
 EXPORT_SYMBOL(inet_unregister_protosw);
--- diff/net/ipv4/ah4.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/ah4.c	2004-07-01 21:32:53.000000000 +0100
@@ -74,12 +74,15 @@
 	}
 
 	spin_lock_bh(&x->lock);
-	err = xfrm_check_output(x, *pskb, AF_INET);
+	err = xfrm_state_check(x, *pskb);
 	if (err)
 		goto error;
 
 	iph = (*pskb)->nh.iph;
 	if (x->props.mode) {
+		err = xfrm4_tunnel_check_size(*pskb);
+		if (err)
+			goto error;
 		top_iph = (struct iphdr*)skb_push(*pskb, x->props.header_len);
 		top_iph->ihl = 5;
 		top_iph->version = 4;
@@ -340,7 +343,7 @@
 	.output		= ah_output
 };
 
-static struct inet_protocol ah4_protocol = {
+static struct net_protocol ah4_protocol = {
 	.handler	=	xfrm4_rcv,
 	.err_handler	=	ah4_err,
 	.no_policy	=	1,
--- diff/net/ipv4/esp4.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/esp4.c	2004-07-01 21:32:53.000000000 +0100
@@ -11,8 +11,6 @@
 #include <net/icmp.h>
 #include <net/udp.h>
 
-#define MAX_SG_ONSTACK 4
-
 /* decapsulation data for use when post-processing */
 struct esp_decap_data {
 	xfrm_address_t	saddr;
@@ -49,19 +47,24 @@
 	}
 
 	spin_lock_bh(&x->lock);
-	err = xfrm_check_output(x, *pskb, AF_INET);
+	err = xfrm_state_check(x, *pskb);
 	if (err)
 		goto error;
-	err = -ENOMEM;
 
-	/* Strip IP header in transport mode. Save it. */
-	if (!x->props.mode) {
+	if (x->props.mode) {
+		err = xfrm4_tunnel_check_size(*pskb);
+		if (err)
+			goto error;
+	} else {
+		/* Strip IP header in transport mode. Save it. */
 		iph = (*pskb)->nh.iph;
 		memcpy(&tmp_iph, iph, iph->ihl*4);
 		__skb_pull(*pskb, iph->ihl*4);
 	}
 	/* Now skb is pure payload to encrypt */
 
+	err = -ENOMEM;
+
 	/* Round to block size */
 	clen = (*pskb)->len;
 
@@ -91,8 +94,9 @@
 	if (x->props.mode) {
 		top_iph = (struct iphdr*)skb_push(*pskb, x->props.header_len);
 		esph = (struct ip_esp_hdr*)(top_iph+1);
-		if (encap && encap->encap_type) {
+		if (encap) {
 			switch (encap->encap_type) {
+			default:
 			case UDP_ENCAP_ESPINUDP:
 				uh = (struct udphdr*) esph;
 				esph = (struct ip_esp_hdr*)(uh+1);
@@ -103,15 +107,8 @@
 				udpdata32 = (u32*)(uh+1);
 				udpdata32[0] = udpdata32[1] = 0;
 				esph = (struct ip_esp_hdr*)(udpdata32+2);
-				alen += 2;
 				top_iph->protocol = IPPROTO_UDP;
 				break;
-			default:
-				printk(KERN_INFO
-				       "esp_output(): Unhandled encap: %u\n",
-				       encap->encap_type);
-				top_iph->protocol = IPPROTO_ESP;
-				break;
 			}
 		} else
 			top_iph->protocol = IPPROTO_ESP;
@@ -134,8 +131,9 @@
 		esph = (struct ip_esp_hdr*)skb_push(*pskb, x->props.header_len);
 		top_iph = (struct iphdr*)skb_push(*pskb, iph->ihl*4);
 		memcpy(top_iph, &tmp_iph, iph->ihl*4);
-		if (encap && encap->encap_type) {
+		if (encap) {
 			switch (encap->encap_type) {
+			default:
 			case UDP_ENCAP_ESPINUDP:
 				uh = (struct udphdr*) esph;
 				esph = (struct ip_esp_hdr*)(uh+1);
@@ -146,15 +144,8 @@
 				udpdata32 = (u32*)(uh+1);
 				udpdata32[0] = udpdata32[1] = 0;
 				esph = (struct ip_esp_hdr*)(udpdata32+2);
-				alen += 2;
 				top_iph->protocol = IPPROTO_UDP;
 				break;
-			default:
-				printk(KERN_INFO
-				       "esp_output(): Unhandled encap: %u\n",
-				       encap->encap_type);
-				top_iph->protocol = IPPROTO_ESP;
-				break;
 			}
 		} else
 			top_iph->protocol = IPPROTO_ESP;
@@ -180,17 +171,16 @@
 		crypto_cipher_set_iv(tfm, esp->conf.ivec, crypto_tfm_alg_ivsize(tfm));
 
 	do {
-		struct scatterlist sgbuf[nfrags>MAX_SG_ONSTACK ? 0 : nfrags];
-		struct scatterlist *sg = sgbuf;
+		struct scatterlist *sg = &esp->sgbuf[0];
 
-		if (unlikely(nfrags > MAX_SG_ONSTACK)) {
+		if (unlikely(nfrags > ESP_NUM_FAST_SG)) {
 			sg = kmalloc(sizeof(struct scatterlist)*nfrags, GFP_ATOMIC);
 			if (!sg)
 				goto error;
 		}
 		skb_to_sgvec(*pskb, sg, esph->enc_data+esp->conf.ivlen-(*pskb)->data, clen);
 		crypto_cipher_encrypt(tfm, sg, sg, clen);
-		if (unlikely(sg != sgbuf))
+		if (unlikely(sg != &esp->sgbuf[0]))
 			kfree(sg);
 	} while (0);
 
@@ -278,19 +268,18 @@
 
         {
 		u8 nexthdr[2];
-		struct scatterlist sgbuf[nfrags>MAX_SG_ONSTACK ? 0 : nfrags];
-		struct scatterlist *sg = sgbuf;
+		struct scatterlist *sg = &esp->sgbuf[0];
 		u8 workbuf[60];
 		int padlen;
 
-		if (unlikely(nfrags > MAX_SG_ONSTACK)) {
+		if (unlikely(nfrags > ESP_NUM_FAST_SG)) {
 			sg = kmalloc(sizeof(struct scatterlist)*nfrags, GFP_ATOMIC);
 			if (!sg)
 				goto out;
 		}
 		skb_to_sgvec(skb, sg, sizeof(struct ip_esp_hdr) + esp->conf.ivlen, elen);
 		crypto_cipher_decrypt(esp->conf.tfm, sg, sg, elen);
-		if (unlikely(sg != sgbuf))
+		if (unlikely(sg != &esp->sgbuf[0]))
 			kfree(sg);
 
 		if (skb_copy_bits(skb, skb->len-alen-2, nexthdr, 2))
@@ -312,28 +301,14 @@
 			switch (decap->decap_type) {
 			case UDP_ENCAP_ESPINUDP:
 			case UDP_ENCAP_ESPINUDP_NON_IKE:
-
-				if ((void*)uh == (void*)esph) {
-					printk(KERN_DEBUG
-					       "esp_input(): Got ESP; expecting ESPinUDP\n");
-					break;
-				}
-
 				encap_data->proto = AF_INET;
 				encap_data->saddr.a4 = iph->saddr;
 				encap_data->sport = uh->source;
 				encap_len = (void*)esph - (void*)uh;
-				if (encap_len != sizeof(*uh))
-				  printk(KERN_DEBUG
-					 "esp_input(): UDP -> ESP: too much room: %d\n",
-					 encap_len);
 				break;
 
 			default:
-				printk(KERN_INFO
-			       "esp_input(): processing unknown encap type: %u\n",
-				       decap->decap_type);
-				break;
+				goto out;
 			}
 		}
 
@@ -366,11 +341,8 @@
 		if (encap->encap_type != decap->decap_type)
 			return -EINVAL;
 
-		/* Next, if we don't have an encap type, then ignore it */
-		if (!encap->encap_type)
-			return 0;
-
 		switch (encap->encap_type) {
+		default:
 		case UDP_ENCAP_ESPINUDP:
 		case UDP_ENCAP_ESPINUDP_NON_IKE:
 			/*
@@ -407,11 +379,6 @@
 				skb->ip_summed = CHECKSUM_UNNECESSARY;
 
 			break;
-		default:
-			printk(KERN_INFO
-			       "esp4_post_input(): Unhandled encap type: %u\n",
-			       encap->encap_type);
-			break;
 		}
 	}
 	return 0;
@@ -548,20 +515,14 @@
 	if (x->encap) {
 		struct xfrm_encap_tmpl *encap = x->encap;
 
-		if (encap->encap_type) {
-			switch (encap->encap_type) {
-			case UDP_ENCAP_ESPINUDP:
-				x->props.header_len += sizeof(struct udphdr);
-				break;
-			case UDP_ENCAP_ESPINUDP_NON_IKE:
-				x->props.header_len += sizeof(struct udphdr) + 2 * sizeof(u32);
-				break;
-			default:
-				printk (KERN_INFO
-				"esp_init_state(): Unhandled encap type: %u\n",
-					encap->encap_type);
-				break;
-			}
+		switch (encap->encap_type) {
+		default:
+		case UDP_ENCAP_ESPINUDP:
+			x->props.header_len += sizeof(struct udphdr);
+			break;
+		case UDP_ENCAP_ESPINUDP_NON_IKE:
+			x->props.header_len += sizeof(struct udphdr) + 2 * sizeof(u32);
+			break;
 		}
 	}
 	x->data = esp;
@@ -594,7 +555,7 @@
 	.output		= esp_output
 };
 
-static struct inet_protocol esp4_protocol = {
+static struct net_protocol esp4_protocol = {
 	.handler	=	xfrm4_rcv,
 	.err_handler	=	esp4_err,
 	.no_policy	=	1,
--- diff/net/ipv4/fib_frontend.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/fib_frontend.c	2004-07-01 21:32:53.000000000 +0100
@@ -235,7 +235,7 @@
  *	Handle IP routing ioctl calls. These are used to manipulate the routing tables
  */
  
-int ip_rt_ioctl(unsigned int cmd, void *arg)
+int ip_rt_ioctl(unsigned int cmd, void __user *arg)
 {
 	int err;
 	struct kern_rta rta;
--- diff/net/ipv4/icmp.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/icmp.c	2004-07-01 21:32:53.000000000 +0100
@@ -592,7 +592,7 @@
 	struct iphdr *iph;
 	struct icmphdr *icmph;
 	int hash, protocol;
-	struct inet_protocol *ipprot;
+	struct net_protocol *ipprot;
 	struct sock *raw_sk;
 	u32 info = 0;
 
--- diff/net/ipv4/ip_gre.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/ip_gre.c	2004-07-01 21:32:53.000000000 +0100
@@ -643,13 +643,7 @@
 		skb->dev = tunnel->dev;
 		dst_release(skb->dst);
 		skb->dst = NULL;
-#ifdef CONFIG_NETFILTER
-		nf_conntrack_put(skb->nfct);
-		skb->nfct = NULL;
-#ifdef CONFIG_NETFILTER_DEBUG
-		skb->nf_debug = 0;
-#endif
-#endif
+		nf_reset(skb);
 		ipgre_ecn_decapsulate(iph, skb);
 		netif_rx(skb);
 		read_unlock(&ipgre_lock);
@@ -877,13 +871,7 @@
 		}
 	}
 
-#ifdef CONFIG_NETFILTER
-	nf_conntrack_put(skb->nfct);
-	skb->nfct = NULL;
-#ifdef CONFIG_NETFILTER_DEBUG
-	skb->nf_debug = 0;
-#endif
-#endif
+	nf_reset(skb);
 
 	IPTUNNEL_XMIT();
 	tunnel->recursion--;
@@ -1240,7 +1228,7 @@
 }
 
 
-static struct inet_protocol ipgre_protocol = {
+static struct net_protocol ipgre_protocol = {
 	.handler	=	ipgre_rcv,
 	.err_handler	=	ipgre_err,
 };
--- diff/net/ipv4/ip_input.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/ip_input.c	2004-07-01 21:32:53.000000000 +0100
@@ -202,17 +202,13 @@
 
 #ifdef CONFIG_NETFILTER_DEBUG
 	nf_debug_ip_local_deliver(skb);
-	skb->nf_debug = 0;
 #endif /*CONFIG_NETFILTER_DEBUG*/
 
 	__skb_pull(skb, ihl);
 
-#ifdef CONFIG_NETFILTER
 	/* Free reference early: we don't need it any more, and it may
            hold ip_conntrack module loaded indefinitely. */
-	nf_conntrack_put(skb->nfct);
-	skb->nfct = NULL;
-#endif /*CONFIG_NETFILTER*/
+	nf_reset(skb);
 
         /* Point into the IP datagram, just past the header. */
         skb->h.raw = skb->data;
@@ -223,7 +219,7 @@
 		int protocol = skb->nh.iph->protocol;
 		int hash;
 		struct sock *raw_sk;
-		struct inet_protocol *ipprot;
+		struct net_protocol *ipprot;
 
 	resubmit:
 		hash = protocol & (MAX_INET_PROTOS - 1);
--- diff/net/ipv4/ip_output.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/ip_output.c	2004-07-01 21:32:53.000000000 +0100
@@ -702,17 +702,6 @@
 	return 0;
 }
 
-static inline int
-skb_can_coalesce(struct sk_buff *skb, int i, struct page *page, int off)
-{
-	if (i) {
-		skb_frag_t *frag = &skb_shinfo(skb)->frags[i-1];
-		return page == frag->page &&
-			off == frag->page_offset+frag->size;
-	}
-	return 0;
-}
-
 static inline unsigned int
 csum_page(struct page *page, int offset, int copy)
 {
@@ -777,8 +766,8 @@
 		inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst);
 		inet->cork.rt = rt;
 		inet->cork.length = 0;
-		inet->sndmsg_page = NULL;
-		inet->sndmsg_off = 0;
+		sk->sk_sndmsg_page = NULL;
+		sk->sk_sndmsg_off = 0;
 		if ((exthdrlen = rt->u.dst.header_len) != 0) {
 			length += exthdrlen;
 			transhdrlen += exthdrlen;
@@ -926,8 +915,8 @@
 		} else {
 			int i = skb_shinfo(skb)->nr_frags;
 			skb_frag_t *frag = &skb_shinfo(skb)->frags[i-1];
-			struct page *page = inet->sndmsg_page;
-			int off = inet->sndmsg_off;
+			struct page *page = sk->sk_sndmsg_page;
+			int off = sk->sk_sndmsg_off;
 			unsigned int left;
 
 			if (page && (left = PAGE_SIZE - off) > 0) {
@@ -939,7 +928,7 @@
 						goto error;
 					}
 					get_page(page);
-	 				skb_fill_page_desc(skb, i, page, inet->sndmsg_off, 0);
+	 				skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
 					frag = &skb_shinfo(skb)->frags[i];
 				}
 			} else if (i < MAX_SKB_FRAGS) {
@@ -950,8 +939,8 @@
 					err = -ENOMEM;
 					goto error;
 				}
-				inet->sndmsg_page = page;
-				inet->sndmsg_off = 0;
+				sk->sk_sndmsg_page = page;
+				sk->sk_sndmsg_off = 0;
 
 				skb_fill_page_desc(skb, i, page, 0, 0);
 				frag = &skb_shinfo(skb)->frags[i];
@@ -965,7 +954,7 @@
 				err = -EFAULT;
 				goto error;
 			}
-			inet->sndmsg_off += copy;
+			sk->sk_sndmsg_off += copy;
 			frag->size += copy;
 			skb->len += copy;
 			skb->data_len += copy;
--- diff/net/ipv4/ip_sockglue.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/ip_sockglue.c	2004-07-01 21:32:53.000000000 +0100
@@ -759,6 +759,7 @@
 				err = ip_mc_join_group(sk, &mreq);
 				if (err)
 					break;
+				greqs.gsr_interface = mreq.imr_ifindex;
 				omode = MCAST_INCLUDE;
 				add = 1;
 			} else /* MCAST_LEAVE_SOURCE_GROUP */ {
--- diff/net/ipv4/ipcomp.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/ipcomp.c	2004-07-01 21:32:53.000000000 +0100
@@ -164,12 +164,16 @@
 	}
 
 	spin_lock_bh(&x->lock);
-	err = xfrm_check_output(x, *pskb, AF_INET);
+	err = xfrm_state_check(x, *pskb);
 	if (err)
 		goto error;
 
-	/* Don't bother compressing */
-	if (!x->props.mode) {
+	if (x->props.mode) {
+		err = xfrm4_tunnel_check_size(*pskb);
+		if (err)
+			goto error;
+	} else {
+		/* Don't bother compressing */
 		iph = (*pskb)->nh.iph;
 		hdr_len = iph->ihl * 4;
 	}
@@ -405,7 +409,7 @@
 	.output		= ipcomp_output
 };
 
-static struct inet_protocol ipcomp4_protocol = {
+static struct net_protocol ipcomp4_protocol = {
 	.handler	=	xfrm4_rcv,
 	.err_handler	=	ipcomp4_err,
 	.no_policy	=	1,
--- diff/net/ipv4/ipconfig.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/ipconfig.c	2004-07-01 21:32:53.000000000 +0100
@@ -272,7 +272,7 @@
 
 	mm_segment_t oldfs = get_fs();
 	set_fs(get_ds());
-	res = devinet_ioctl(cmd, arg);
+	res = devinet_ioctl(cmd, (struct ifreq __user *) arg);
 	set_fs(oldfs);
 	return res;
 }
@@ -283,7 +283,7 @@
 
 	mm_segment_t oldfs = get_fs();
 	set_fs(get_ds());
-	res = ip_rt_ioctl(cmd, arg);
+	res = ip_rt_ioctl(cmd, (void __user *) arg);
 	set_fs(oldfs);
 	return res;
 }
--- diff/net/ipv4/ipip.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/ipip.c	2004-07-01 21:32:53.000000000 +0100
@@ -497,13 +497,7 @@
 		skb->dev = tunnel->dev;
 		dst_release(skb->dst);
 		skb->dst = NULL;
-#ifdef CONFIG_NETFILTER
-		nf_conntrack_put(skb->nfct);
-		skb->nfct = NULL;
-#ifdef CONFIG_NETFILTER_DEBUG
-		skb->nf_debug = 0;
-#endif
-#endif
+		nf_reset(skb);
 		ipip_ecn_decapsulate(iph, skb);
 		netif_rx(skb);
 		read_unlock(&ipip_lock);
@@ -648,13 +642,7 @@
 	if ((iph->ttl = tiph->ttl) == 0)
 		iph->ttl	=	old_iph->ttl;
 
-#ifdef CONFIG_NETFILTER
-	nf_conntrack_put(skb->nfct);
-	skb->nfct = NULL;
-#ifdef CONFIG_NETFILTER_DEBUG
-	skb->nf_debug = 0;
-#endif
-#endif
+	nf_reset(skb);
 
 	IPTUNNEL_XMIT();
 	tunnel->recursion--;
--- diff/net/ipv4/ipmr.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/ipmr.c	2004-07-01 21:32:53.000000000 +0100
@@ -109,7 +109,7 @@
 static int ipmr_cache_report(struct sk_buff *pkt, vifi_t vifi, int assert);
 static int ipmr_fill_mroute(struct sk_buff *skb, struct mfc_cache *c, struct rtmsg *rtm);
 
-static struct inet_protocol pim_protocol;
+static struct net_protocol pim_protocol;
 
 static struct timer_list ipmr_expire_timer;
 
@@ -1105,10 +1105,7 @@
 	skb->h.ipiph = skb->nh.iph;
 	skb->nh.iph = iph;
 	memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
-#ifdef CONFIG_NETFILTER
-	nf_conntrack_put(skb->nfct);
-	skb->nfct = NULL;
-#endif
+	nf_reset(skb);
 }
 
 static inline int ipmr_forward_finish(struct sk_buff *skb)
@@ -1461,10 +1458,7 @@
 	skb->dst = NULL;
 	((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len;
 	((struct net_device_stats*)reg_dev->priv)->rx_packets++;
-#ifdef CONFIG_NETFILTER
-	nf_conntrack_put(skb->nfct);
-	skb->nfct = NULL;
-#endif
+	nf_reset(skb);
 	netif_rx(skb);
 	dev_put(reg_dev);
 	return 0;
@@ -1520,10 +1514,7 @@
 	((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len;
 	((struct net_device_stats*)reg_dev->priv)->rx_packets++;
 	skb->dst = NULL;
-#ifdef CONFIG_NETFILTER
-	nf_conntrack_put(skb->nfct);
-	skb->nfct = NULL;
-#endif
+	nf_reset(skb);
 	netif_rx(skb);
 	dev_put(reg_dev);
 	return 0;
@@ -1876,7 +1867,7 @@
 #endif	
 
 #ifdef CONFIG_IP_PIMSM_V2
-static struct inet_protocol pim_protocol = {
+static struct net_protocol pim_protocol = {
 	.handler	=	pim_rcv,
 };
 #endif
--- diff/net/ipv4/netfilter/Kconfig	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/Kconfig	2004-07-01 21:32:53.000000000 +0100
@@ -603,5 +603,29 @@
 	  <file:Documentation/modules.txt>.  If unsure, say `N'.
 	  help
 
+config IP_NF_MATCH_ADDRTYPE
+	tristate  'address type match support'
+	depends on IP_NF_IPTABLES
+	help
+	  This option allows you to match what routing thinks of an address,
+	  eg. UNICAST, LOCAL, BROADCAST, ...
+	
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt.  If unsure, say `N'.
+
+config IP_NF_MATCH_REALM
+	tristate  'realm match support'
+	depends on IP_NF_IPTABLES
+	select NET_CLS_ROUTE
+	help
+	  This option adds a `realm' match, which allows you to use the realm
+	  key from the routing subsytem inside iptables.
+	
+	  This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option 
+	  in tc world.
+	
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt.  If unsure, say `N'.
+
 endmenu
 
--- diff/net/ipv4/netfilter/Makefile	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/Makefile	2004-07-01 21:32:53.000000000 +0100
@@ -64,6 +64,8 @@
 obj-$(CONFIG_IP_NF_MATCH_STATE) += ipt_state.o
 obj-$(CONFIG_IP_NF_MATCH_CONNTRACK) += ipt_conntrack.o
 obj-$(CONFIG_IP_NF_MATCH_TCPMSS) += ipt_tcpmss.o
+obj-$(CONFIG_IP_NF_MATCH_REALM) += ipt_realm.o
+obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
 
 obj-$(CONFIG_IP_NF_MATCH_PHYSDEV) += ipt_physdev.o
 
--- diff/net/ipv4/netfilter/ip_conntrack_amanda.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ip_conntrack_amanda.c	2004-07-01 21:32:53.000000000 +0100
@@ -107,7 +107,7 @@
 		exp->mask.dst.u.tcp.port = 0xFFFF;
 
 		exp_amanda_info = &exp->help.exp_amanda_info;
-		exp_amanda_info->offset = data - amanda_buffer;
+		exp_amanda_info->offset = tmp - amanda_buffer;
 		exp_amanda_info->port   = port;
 		exp_amanda_info->len    = len;
 
--- diff/net/ipv4/netfilter/ip_conntrack_core.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/netfilter/ip_conntrack_core.c	2004-07-01 21:32:53.000000000 +0100
@@ -28,6 +28,7 @@
 #include <linux/proc_fs.h>
 #include <linux/vmalloc.h>
 #include <net/checksum.h>
+#include <net/ip.h>
 #include <linux/stddef.h>
 #include <linux/sysctl.h>
 #include <linux/slab.h>
@@ -173,13 +174,12 @@
 destroy_expect(struct ip_conntrack_expect *exp)
 {
 	DEBUGP("destroy_expect(%p) use=%d\n", exp, atomic_read(&exp->use));
-	IP_NF_ASSERT(atomic_read(&exp->use));
+	IP_NF_ASSERT(atomic_read(&exp->use) == 0);
 	IP_NF_ASSERT(!timer_pending(&exp->timeout));
 
 	kfree(exp);
 }
 
-
 inline void ip_conntrack_expect_put(struct ip_conntrack_expect *exp)
 {
 	IP_NF_ASSERT(exp);
@@ -715,7 +715,6 @@
 		DEBUGP("conntrack: expectation arrives ct=%p exp=%p\n",
 			conntrack, expected);
 		/* Welcome, Mr. Bond.  We've been expecting you... */
-		IP_NF_ASSERT(master_ct(conntrack));
 		__set_bit(IPS_EXPECTED_BIT, &conntrack->status);
 		conntrack->master = expected;
 		expected->sibling = conntrack;
@@ -948,9 +947,8 @@
 	atomic_set(&new->use, 1);
 
 	/* add to expected list for this connection */
-	list_add(&new->expected_list, &related_to->sibling_list);
+	list_add_tail(&new->expected_list, &related_to->sibling_list);
 	/* add to global list of expectations */
-
 	list_prepend(&ip_conntrack_expect_list, &new->list);
 	/* add and start timer if required */
 	if (related_to->helper->timeout) {
@@ -1004,7 +1002,6 @@
 
 	} else if (related_to->helper->max_expected && 
 		   related_to->expecting >= related_to->helper->max_expected) {
-		struct list_head *cur_item;
 		/* old == NULL */
 		if (!(related_to->helper->flags & 
 		      IP_CT_HELPER_F_REUSE_EXPECT)) {
@@ -1030,21 +1027,14 @@
 		       NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip));
  
 		/* choose the the oldest expectation to evict */
-		list_for_each(cur_item, &related_to->sibling_list) { 
-			struct ip_conntrack_expect *cur;
-
-			cur = list_entry(cur_item, 
-					 struct ip_conntrack_expect,
-					 expected_list);
-			if (cur->sibling == NULL) {
-				old = cur;
+		list_for_each_entry(old, &related_to->sibling_list, 
+		                                      expected_list)
+			if (old->sibling == NULL)
 				break;
-			}
-		}
 
-		/* (!old) cannot happen, since related_to->expecting is the
-		 * number of unconfirmed expects */
-		IP_NF_ASSERT(old);
+		/* We cannot fail since related_to->expecting is the number
+		 * of unconfirmed expectations */
+		IP_NF_ASSERT(old && old->sibling == NULL);
 
 		/* newnat14 does not reuse the real allocated memory
 		 * structures but rather unexpects the old and
--- diff/net/ipv4/netfilter/ip_conntrack_standalone.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ip_conntrack_standalone.c	2004-07-01 21:32:53.000000000 +0100
@@ -24,6 +24,7 @@
 #include <linux/sysctl.h>
 #endif
 #include <net/checksum.h>
+#include <net/ip.h>
 
 #define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_conntrack_lock)
 #define ASSERT_WRITE_LOCK(x) MUST_BE_WRITE_LOCKED(&ip_conntrack_lock)
@@ -502,7 +503,7 @@
 	if (ret < 0)
 		goto cleanup_nothing;
 
-	proc = proc_net_create("ip_conntrack",0,list_conntracks);
+	proc = proc_net_create("ip_conntrack", 0440, list_conntracks);
 	if (!proc) goto cleanup_init;
 	proc->owner = THIS_MODULE;
 
--- diff/net/ipv4/netfilter/ip_fw_compat_masq.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ip_fw_compat_masq.c	2004-07-01 21:32:53.000000000 +0100
@@ -24,6 +24,7 @@
 #include <linux/proc_fs.h>
 #include <linux/module.h>
 #include <net/route.h>
+#include <net/ip.h>
 
 #define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_conntrack_lock)
 #define ASSERT_WRITE_LOCK(x) MUST_BE_WRITE_LOCKED(&ip_conntrack_lock)
--- diff/net/ipv4/netfilter/ip_fw_compat_redir.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ip_fw_compat_redir.c	2004-07-01 21:32:53.000000000 +0100
@@ -22,6 +22,7 @@
 #include <linux/udp.h>
 #include <linux/tcp.h>
 #include <net/checksum.h>
+#include <net/ip.h>
 #include <linux/timer.h>
 #include <linux/netdevice.h>
 #include <linux/if.h>
--- diff/net/ipv4/netfilter/ip_nat_core.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ip_nat_core.c	2004-07-01 21:32:53.000000000 +0100
@@ -528,6 +528,7 @@
 	MUST_BE_WRITE_LOCKED(&ip_nat_lock);
 	IP_NF_ASSERT(hooknum == NF_IP_PRE_ROUTING
 		     || hooknum == NF_IP_POST_ROUTING
+		     || hooknum == NF_IP_LOCAL_IN
 		     || hooknum == NF_IP_LOCAL_OUT);
 	IP_NF_ASSERT(info->num_manips < IP_NAT_MAX_MANIPS);
 	IP_NF_ASSERT(!(info->initialized & (1 << HOOK2MANIP(hooknum))));
@@ -816,7 +817,7 @@
 
 		/* Have to grab read lock before sibling_list traversal */
 		READ_LOCK(&ip_conntrack_lock);
-		list_for_each(cur_item, &ct->sibling_list) { 
+		list_for_each_prev(cur_item, &ct->sibling_list) { 
 			exp = list_entry(cur_item, struct ip_conntrack_expect, 
 					 expected_list);
 					 
@@ -899,10 +900,10 @@
 
 	/* Must be RELATED */
 	IP_NF_ASSERT((*pskb)->nfct
-		     - (struct ip_conntrack *)(*pskb)->nfct->master
+		     - ((struct ip_conntrack *)(*pskb)->nfct->master)->infos
 		     == IP_CT_RELATED
 		     || (*pskb)->nfct
-		     - (struct ip_conntrack *)(*pskb)->nfct->master
+		     - ((struct ip_conntrack *)(*pskb)->nfct->master)->infos
 		     == IP_CT_RELATED+IP_CT_IS_REPLY);
 
 	/* Redirects on non-null nats must be dropped, else they'll
--- diff/net/ipv4/netfilter/ip_nat_standalone.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/netfilter/ip_nat_standalone.c	2004-07-01 21:32:53.000000000 +0100
@@ -27,6 +27,7 @@
 #include <linux/module.h>
 #include <linux/skbuff.h>
 #include <linux/proc_fs.h>
+#include <net/ip.h>
 #include <net/checksum.h>
 #include <linux/spinlock.h>
 
--- diff/net/ipv4/netfilter/ip_tables.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/netfilter/ip_tables.c	2004-07-01 21:32:53.000000000 +0100
@@ -1731,6 +1731,15 @@
 	return 0;
 }
 
+static inline int print_target(const struct ipt_target *t,
+                               off_t start_offset, char *buffer, int length,
+                               off_t *pos, unsigned int *count)
+{
+	if (t == &ipt_standard_target || t == &ipt_error_target)
+		return 0;
+	return print_name((char *)t, start_offset, buffer, length, pos, count);
+}
+
 static int ipt_get_tables(char *buffer, char **start, off_t offset, int length)
 {
 	off_t pos = 0;
@@ -1757,7 +1766,7 @@
 	if (down_interruptible(&ipt_mutex) != 0)
 		return 0;
 
-	LIST_FIND(&ipt_target, print_name, void *,
+	LIST_FIND(&ipt_target, print_target, struct ipt_target *,
 		  offset, buffer, length, &pos, &count);
 	
 	up(&ipt_mutex);
--- diff/net/ipv4/netfilter/ipt_CLASSIFY.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ipt_CLASSIFY.c	2004-07-01 21:32:53.000000000 +0100
@@ -54,15 +54,17 @@
 		return 0;
 	}
 	
-	if (hook_mask & ~(1 << NF_IP_POST_ROUTING)) {
-		printk(KERN_ERR "CLASSIFY: only valid in POST_ROUTING.\n");
+	if (hook_mask & ~((1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_FORWARD) |
+	                  (1 << NF_IP_POST_ROUTING))) {
+		printk(KERN_ERR "CLASSIFY: only valid in LOCAL_OUT, FORWARD "
+		                "and POST_ROUTING.\n");
 		return 0;
 	}
 
 	if (strcmp(tablename, "mangle") != 0) {
-		printk(KERN_WARNING "CLASSIFY: can only be called from "
-		                    "\"mangle\" table, not \"%s\".\n",
-		                    tablename);
+		printk(KERN_ERR "CLASSIFY: can only be called from "
+		                "\"mangle\" table, not \"%s\".\n",
+		                tablename);
 		return 0;
 	}
 
--- diff/net/ipv4/netfilter/ipt_MASQUERADE.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ipt_MASQUERADE.c	2004-07-01 21:32:53.000000000 +0100
@@ -16,6 +16,7 @@
 #include <linux/module.h>
 #include <linux/netfilter.h>
 #include <net/protocol.h>
+#include <net/ip.h>
 #include <net/checksum.h>
 #include <linux/netfilter_ipv4.h>
 #include <linux/netfilter_ipv4/ip_nat_rule.h>
--- diff/net/ipv4/netfilter/ipt_REJECT.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ipt_REJECT.c	2004-07-01 21:32:53.000000000 +0100
@@ -142,12 +142,8 @@
 	nskb->dst = &rt->u.dst;
 
 	/* This packet will not be the same as the other: clear nf fields */
-	nf_conntrack_put(nskb->nfct);
-	nskb->nfct = NULL;
+	nf_reset(nskb);
 	nskb->nfcache = 0;
-#ifdef CONFIG_NETFILTER_DEBUG
-	nskb->nf_debug = 0;
-#endif
 	nskb->nfmark = 0;
 #ifdef CONFIG_BRIDGE_NETFILTER
 	nf_bridge_put(nskb->nf_bridge);
--- diff/net/ipv4/netfilter/ipt_helper.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ipt_helper.c	2004-07-01 21:32:53.000000000 +0100
@@ -41,17 +41,17 @@
 	struct ip_conntrack_expect *exp;
 	struct ip_conntrack *ct;
 	enum ip_conntrack_info ctinfo;
-	int ret = 0;
+	int ret = info->invert;
 	
 	ct = ip_conntrack_get((struct sk_buff *)skb, &ctinfo);
 	if (!ct) {
 		DEBUGP("ipt_helper: Eek! invalid conntrack?\n");
-		return 0;
+		return ret;
 	}
 
 	if (!ct->master) {
 		DEBUGP("ipt_helper: conntrack %p has no master\n", ct);
-		return 0;
+		return ret;
 	}
 
 	exp = ct->master;
@@ -71,8 +71,11 @@
 	DEBUGP("master's name = %s , info->name = %s\n", 
 		exp->expectant->helper->name, info->name);
 
-	ret = !strncmp(exp->expectant->helper->name, info->name, 
-	               strlen(exp->expectant->helper->name)) ^ info->invert;
+	if (info->name[0] == '\0')
+		ret ^= 1;
+	else
+		ret ^= !strncmp(exp->expectant->helper->name, info->name, 
+		                strlen(exp->expectant->helper->name));
 out_unlock:
 	READ_UNLOCK(&ip_conntrack_lock);
 	return ret;
@@ -92,10 +95,6 @@
 	if (matchsize != IPT_ALIGN(sizeof(struct ipt_helper_info)))
 		return 0;
 
-	/* verify that we actually should match anything */
-	if ( strlen(info->name) == 0 )
-		return 0;
-	
 	return 1;
 }
 
@@ -108,7 +107,6 @@
 
 static int __init init(void)
 {
-	need_ip_conntrack();
 	return ipt_register_match(&helper_match);
 }
 
--- diff/net/ipv4/netfilter/ipt_owner.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/netfilter/ipt_owner.c	2004-07-01 21:32:53.000000000 +0100
@@ -184,7 +184,15 @@
 		       IPT_ALIGN(sizeof(struct ipt_owner_info)));
 		return 0;
 	}
-
+#ifdef CONFIG_SMP
+	/* files->file_lock can not be used in a BH */
+	if (((struct ipt_owner_info *)matchinfo)->match
+	    & (IPT_OWNER_PID|IPT_OWNER_SID|IPT_OWNER_COMM)) {
+		printk("ipt_owner: pid, sid and command matching is broken "
+		       "on SMP.\n");
+		return 0;
+	}
+#endif
 	return 1;
 }
 
--- diff/net/ipv4/netfilter/iptable_mangle.c	2004-05-19 22:13:15.000000000 +0100
+++ source/net/ipv4/netfilter/iptable_mangle.c	2004-07-01 21:32:53.000000000 +0100
@@ -173,7 +173,9 @@
 	if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE
 	    && ((*pskb)->nh.iph->saddr != saddr
 		|| (*pskb)->nh.iph->daddr != daddr
+#ifdef CONFIG_IP_ROUTE_FWMARK
 		|| (*pskb)->nfmark != nfmark
+#endif
 		|| (*pskb)->nh.iph->tos != tos))
 		return ip_route_me_harder(pskb) == 0 ? ret : NF_DROP;
 
--- diff/net/ipv4/netfilter/iptable_raw.c	2004-05-19 22:13:15.000000000 +0100
+++ source/net/ipv4/netfilter/iptable_raw.c	2004-07-01 21:32:53.000000000 +0100
@@ -32,43 +32,70 @@
 	struct ipt_replace repl;
 	struct ipt_standard entries[2];
 	struct ipt_error term;
-} initial_table __initdata
-= { { "raw", RAW_VALID_HOOKS, 3,
-      sizeof(struct ipt_standard) * 2 + sizeof(struct ipt_error),
-      { [NF_IP_PRE_ROUTING] 0,
-	[NF_IP_LOCAL_OUT] sizeof(struct ipt_standard) },
-      { [NF_IP_PRE_ROUTING] 0,
-	[NF_IP_LOCAL_OUT] sizeof(struct ipt_standard) },
-      0, NULL, { } },
-    {
-	    /* PRE_ROUTING */
-	    { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
-		0,
-		sizeof(struct ipt_entry),
-		sizeof(struct ipt_standard),
-		0, { 0, 0 }, { } },
-	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
-		-NF_ACCEPT - 1 } },
-	    /* LOCAL_OUT */
-	    { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
-		0,
-		sizeof(struct ipt_entry),
-		sizeof(struct ipt_standard),
-		0, { 0, 0 }, { } },
-	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
-		-NF_ACCEPT - 1 } }
-    },
-    /* ERROR */
-    { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
-	0,
-	sizeof(struct ipt_entry),
-	sizeof(struct ipt_error),
-	0, { 0, 0 }, { } },
-      { { { { IPT_ALIGN(sizeof(struct ipt_error_target)), IPT_ERROR_TARGET } },
-	  { } },
-	"ERROR"
-      }
-    }
+} initial_table __initdata = {
+	.repl = {
+		.name = "raw", 
+		.valid_hooks = RAW_VALID_HOOKS, 
+		.num_entries = 3,
+		.size = sizeof(struct ipt_standard) * 2 + sizeof(struct ipt_error),
+		.hook_entry = { 
+			[NF_IP_PRE_ROUTING] = 0,
+			[NF_IP_LOCAL_OUT] = sizeof(struct ipt_standard) },
+		.underflow = { 
+			[NF_IP_PRE_ROUTING] = 0,
+			[NF_IP_LOCAL_OUT]  = sizeof(struct ipt_standard) },
+	},
+	.entries = {
+	     /* PRE_ROUTING */
+	     { 
+		     .entry = { 
+			     .target_offset = sizeof(struct ipt_entry),
+			     .next_offset = sizeof(struct ipt_standard),
+		     },
+		     .target = { 
+			  .target = { 
+				  .u = {
+					  .target_size = IPT_ALIGN(sizeof(struct ipt_standard_target)),
+				  },
+			  },
+			  .verdict = -NF_ACCEPT - 1,
+		     },
+	     },
+
+	     /* LOCAL_OUT */
+	     {
+		     .entry = {
+			     .target_offset = sizeof(struct ipt_entry),
+			     .next_offset = sizeof(struct ipt_standard),
+		     },
+		     .target = {
+			     .target = {
+				     .u = {
+					     .target_size = IPT_ALIGN(sizeof(struct ipt_standard_target)),
+				     },
+			     },
+			     .verdict = -NF_ACCEPT - 1,
+		     },
+	     },
+	},
+	/* ERROR */
+	.term = {
+		.entry = {
+			.target_offset = sizeof(struct ipt_entry),
+			.next_offset = sizeof(struct ipt_error),
+		},
+		.target = {
+			.target = {
+				.u = {
+					.user = {
+						.target_size = IPT_ALIGN(sizeof(struct ipt_error_target)), 
+						.name = IPT_ERROR_TARGET,
+					},
+				},
+			},
+			.errorname = "ERROR",
+		},
+	}
 };
 
 static struct ipt_table packet_raw = { 
--- diff/net/ipv4/protocol.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/protocol.c	2004-07-01 21:32:53.000000000 +0100
@@ -48,14 +48,14 @@
 #include <net/ipip.h>
 #include <linux/igmp.h>
 
-struct inet_protocol *inet_protos[MAX_INET_PROTOS];
+struct net_protocol *inet_protos[MAX_INET_PROTOS];
 static spinlock_t inet_proto_lock = SPIN_LOCK_UNLOCKED;
 
 /*
  *	Add a protocol handler to the hash tables
  */
 
-int inet_add_protocol(struct inet_protocol *prot, unsigned char protocol)
+int inet_add_protocol(struct net_protocol *prot, unsigned char protocol)
 {
 	int hash, ret;
 
@@ -77,7 +77,7 @@
  *	Remove a protocol from the hash tables.
  */
  
-int inet_del_protocol(struct inet_protocol *prot, unsigned char protocol)
+int inet_del_protocol(struct net_protocol *prot, unsigned char protocol)
 {
 	int hash, ret;
 
--- diff/net/ipv4/raw.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/raw.c	2004-07-01 21:32:53.000000000 +0100
@@ -480,7 +480,7 @@
 	 */
 	ip_ra_control(sk, 0, NULL);
 
-	inet_sock_release(sk);
+	sk_common_release(sk);
 }
 
 /* This gets rid of all the nasties in af_inet. -DaveM */
--- diff/net/ipv4/route.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/route.c	2004-07-01 21:32:53.000000000 +0100
@@ -439,13 +439,13 @@
   
 static __inline__ void rt_free(struct rtable *rt)
 {
-	call_rcu(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, &rt->u.dst);
+	call_rcu(&rt->u.dst.rcu_head, dst_rcu_free);
 }
 
 static __inline__ void rt_drop(struct rtable *rt)
 {
 	ip_rt_put(rt);
-	call_rcu(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, &rt->u.dst);
+	call_rcu(&rt->u.dst.rcu_head, dst_rcu_free);
 }
 
 static __inline__ int rt_fast_clean(struct rtable *rth)
--- diff/net/ipv4/tcp.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/tcp.c	2004-07-01 21:32:53.000000000 +0100
@@ -276,97 +276,41 @@
 
 atomic_t tcp_orphan_count = ATOMIC_INIT(0);
 
-int sysctl_tcp_default_win_scale;
+int sysctl_tcp_default_win_scale = 7;
 
 int sysctl_tcp_mem[3];
 int sysctl_tcp_wmem[3] = { 4 * 1024, 16 * 1024, 128 * 1024 };
 int sysctl_tcp_rmem[3] = { 4 * 1024, 87380, 87380 * 2 };
 
+EXPORT_SYMBOL(sysctl_tcp_mem);
+EXPORT_SYMBOL(sysctl_tcp_rmem);
+EXPORT_SYMBOL(sysctl_tcp_wmem);
+
 atomic_t tcp_memory_allocated;	/* Current allocated memory. */
 atomic_t tcp_sockets_allocated;	/* Current number of TCP sockets. */
 
-/* Pressure flag: try to collapse.
+EXPORT_SYMBOL(tcp_memory_allocated);
+EXPORT_SYMBOL(tcp_sockets_allocated);
+
+/*
+ * Pressure flag: try to collapse.
  * Technical note: it is used by multiple contexts non atomically.
- * All the tcp_mem_schedule() is of this nature: accounting
- * is strict, actions are advisory and have some latency. */
+ * All the sk_stream_mem_schedule() is of this nature: accounting
+ * is strict, actions are advisory and have some latency.
+ */
 int tcp_memory_pressure;
 
-#define TCP_PAGES(amt) (((amt) + TCP_MEM_QUANTUM - 1) / TCP_MEM_QUANTUM)
-
-int tcp_mem_schedule(struct sock *sk, int size, int kind)
-{
-	int amt = TCP_PAGES(size);
-
-	sk->sk_forward_alloc += amt * TCP_MEM_QUANTUM;
-	atomic_add(amt, &tcp_memory_allocated);
-
-	/* Under limit. */
-	if (atomic_read(&tcp_memory_allocated) < sysctl_tcp_mem[0]) {
-		if (tcp_memory_pressure)
-			tcp_memory_pressure = 0;
-		return 1;
-	}
-
-	/* Over hard limit. */
-	if (atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]) {
-		tcp_enter_memory_pressure();
-		goto suppress_allocation;
-	}
-
-	/* Under pressure. */
-	if (atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[1])
-		tcp_enter_memory_pressure();
-
-	if (kind) {
-		if (atomic_read(&sk->sk_rmem_alloc) < sysctl_tcp_rmem[0])
-			return 1;
-	} else if (sk->sk_wmem_queued < sysctl_tcp_wmem[0])
-		return 1;
-
-	if (!tcp_memory_pressure ||
-	    sysctl_tcp_mem[2] > atomic_read(&tcp_sockets_allocated) *
-				TCP_PAGES(sk->sk_wmem_queued +
-					  atomic_read(&sk->sk_rmem_alloc) +
-					  sk->sk_forward_alloc))
-		return 1;
-
-suppress_allocation:
+EXPORT_SYMBOL(tcp_memory_pressure);
 
-	if (!kind) {
-		tcp_moderate_sndbuf(sk);
-
-		/* Fail only if socket is _under_ its sndbuf.
-		 * In this case we cannot block, so that we have to fail.
-		 */
-		if (sk->sk_wmem_queued + size >= sk->sk_sndbuf)
-			return 1;
-	}
-
-	/* Alas. Undo changes. */
-	sk->sk_forward_alloc -= amt * TCP_MEM_QUANTUM;
-	atomic_sub(amt, &tcp_memory_allocated);
-	return 0;
-}
-
-void __tcp_mem_reclaim(struct sock *sk)
+void tcp_enter_memory_pressure(void)
 {
-	if (sk->sk_forward_alloc >= TCP_MEM_QUANTUM) {
-		atomic_sub(sk->sk_forward_alloc / TCP_MEM_QUANTUM,
-			   &tcp_memory_allocated);
-		sk->sk_forward_alloc &= TCP_MEM_QUANTUM - 1;
-		if (tcp_memory_pressure &&
-		    atomic_read(&tcp_memory_allocated) < sysctl_tcp_mem[0])
-			tcp_memory_pressure = 0;
+	if (!tcp_memory_pressure) {
+		NET_INC_STATS(TCPMemoryPressures);
+		tcp_memory_pressure = 1;
 	}
 }
 
-void tcp_rfree(struct sk_buff *skb)
-{
-	struct sock *sk = skb->sk;
-
-	atomic_sub(skb->truesize, &sk->sk_rmem_alloc);
-	sk->sk_forward_alloc += skb->truesize;
-}
+EXPORT_SYMBOL(tcp_enter_memory_pressure);
 
 /*
  * LISTEN is a special case for poll..
@@ -447,7 +391,7 @@
 			mask |= POLLIN | POLLRDNORM;
 
 		if (!(sk->sk_shutdown & SEND_SHUTDOWN)) {
-			if (tcp_wspace(sk) >= tcp_min_write_space(sk)) {
+			if (sk_stream_wspace(sk) >= sk_stream_min_wspace(sk)) {
 				mask |= POLLOUT | POLLWRNORM;
 			} else {  /* send SIGIO later */
 				set_bit(SOCK_ASYNC_NOSPACE,
@@ -458,7 +402,7 @@
 				 * wspace test but before the flags are set,
 				 * IO signal will be lost.
 				 */
-				if (tcp_wspace(sk) >= tcp_min_write_space(sk))
+				if (sk_stream_wspace(sk) >= sk_stream_min_wspace(sk))
 					mask |= POLLOUT | POLLWRNORM;
 			}
 		}
@@ -469,24 +413,6 @@
 	return mask;
 }
 
-/*
- *	TCP socket write_space callback.
- */
-void tcp_write_space(struct sock *sk)
-{
-	struct socket *sock = sk->sk_socket;
-
-	if (tcp_wspace(sk) >= tcp_min_write_space(sk) && sock) {
-		clear_bit(SOCK_NOSPACE, &sock->flags);
-
-		if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
-			wake_up_interruptible(sk->sk_sleep);
-
-		if (sock->fasync_list && !(sk->sk_shutdown & SEND_SHUTDOWN))
-			sock_wake_async(sock, 2, POLL_OUT);
-	}
-}
-
 int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
 {
 	struct tcp_opt *tp = tcp_sk(sk);
@@ -654,128 +580,6 @@
 	BUG_TRAP(!sk->sk_ack_backlog);
 }
 
-/*
- *	Wait for a socket to get into the connected state
- *
- *	Note: Must be called with the socket locked.
- */
-static int wait_for_tcp_connect(struct sock *sk, int flags, long *timeo_p)
-{
-	struct tcp_opt *tp = tcp_sk(sk);
-	struct task_struct *tsk = current;
-	DEFINE_WAIT(wait);
-
-	while ((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) {
-		if (sk->sk_err)
-			return sock_error(sk);
-		if ((1 << sk->sk_state) & ~(TCPF_SYN_SENT | TCPF_SYN_RECV))
-			return -EPIPE;
-		if (!*timeo_p)
-			return -EAGAIN;
-		if (signal_pending(tsk))
-			return sock_intr_errno(*timeo_p);
-
-		prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE);
-		tp->write_pending++;
-
-		release_sock(sk);
-		*timeo_p = schedule_timeout(*timeo_p);
-		lock_sock(sk);
-
-		finish_wait(sk->sk_sleep, &wait);
-		tp->write_pending--;
-	}
-	return 0;
-}
-
-static inline int tcp_memory_free(struct sock *sk)
-{
-	return sk->sk_wmem_queued < sk->sk_sndbuf;
-}
-
-/*
- *	Wait for more memory for a socket
- */
-static int wait_for_tcp_memory(struct sock *sk, long *timeo)
-{
-	struct tcp_opt *tp = tcp_sk(sk);
-	int err = 0;
-	long vm_wait = 0;
-	long current_timeo = *timeo;
-	DEFINE_WAIT(wait);
-
-	if (tcp_memory_free(sk))
-		current_timeo = vm_wait = (net_random() % (HZ / 5)) + 2;
-
-	for (;;) {
-		set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
-
-		prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE);
-
-		if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN))
-			goto do_error;
-		if (!*timeo)
-			goto do_nonblock;
-		if (signal_pending(current))
-			goto do_interrupted;
-		clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
-		if (tcp_memory_free(sk) && !vm_wait)
-			break;
-
-		set_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
-		tp->write_pending++;
-		release_sock(sk);
-		if (!tcp_memory_free(sk) || vm_wait)
-			current_timeo = schedule_timeout(current_timeo);
-		lock_sock(sk);
-		tp->write_pending--;
-
-		if (vm_wait) {
-			vm_wait -= current_timeo;
-			current_timeo = *timeo;
-			if (current_timeo != MAX_SCHEDULE_TIMEOUT &&
-			    (current_timeo -= vm_wait) < 0)
-				current_timeo = 0;
-			vm_wait = 0;
-		}
-		*timeo = current_timeo;
-	}
-out:
-	finish_wait(sk->sk_sleep, &wait);
-	return err;
-
-do_error:
-	err = -EPIPE;
-	goto out;
-do_nonblock:
-	err = -EAGAIN;
-	goto out;
-do_interrupted:
-	err = sock_intr_errno(*timeo);
-	goto out;
-}
-
-static inline int can_coalesce(struct sk_buff *skb, int i, struct page *page,
-			       int off)
-{
-	if (i) {
-		skb_frag_t *frag = &skb_shinfo(skb)->frags[i - 1];
-		return page == frag->page &&
-		       off == frag->page_offset + frag->size;
-	}
-	return 0;
-}
-
-static inline void fill_page_desc(struct sk_buff *skb, int i,
-				  struct page *page, int off, int size)
-{
-	skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
-	frag->page = page;
-	frag->page_offset = off;
-	frag->size = size;
-	skb_shinfo(skb)->nr_frags = i + 1;
-}
-
 static inline void tcp_mark_push(struct tcp_opt *tp, struct sk_buff *skb)
 {
 	TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH;
@@ -796,9 +600,9 @@
 	TCP_SKB_CB(skb)->flags = TCPCB_FLAG_ACK;
 	TCP_SKB_CB(skb)->sacked = 0;
 	__skb_queue_tail(&sk->sk_write_queue, skb);
-	tcp_charge_skb(sk, skb);
-	if (!tp->send_head)
-		tp->send_head = skb;
+	sk_charge_skb(sk, skb);
+	if (!sk->sk_send_head)
+		sk->sk_send_head = skb;
 	else if (tp->nonagle&TCP_NAGLE_PUSH)
 		tp->nonagle &= ~TCP_NAGLE_PUSH; 
 }
@@ -816,7 +620,7 @@
 static inline void tcp_push(struct sock *sk, struct tcp_opt *tp, int flags,
 			    int mss_now, int nonagle)
 {
-	if (tp->send_head) {
+	if (sk->sk_send_head) {
 		struct sk_buff *skb = sk->sk_write_queue.prev;
 		if (!(flags & MSG_MORE) || forced_push(tp))
 			tcp_mark_push(tp, skb);
@@ -826,15 +630,6 @@
 	}
 }
 
-static int tcp_error(struct sock *sk, int flags, int err)
-{
-	if (err == -EPIPE)
-		err = sock_error(sk) ? : -EPIPE;
-	if (err == -EPIPE && !(flags & MSG_NOSIGNAL))
-		send_sig(SIGPIPE, current, 0);
-	return err;
-}
-
 static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset,
 			 size_t psize, int flags)
 {
@@ -846,7 +641,7 @@
 
 	/* Wait for a connection to finish. */
 	if ((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT))
-		if ((err = wait_for_tcp_connect(sk, 0, &timeo)) != 0)
+		if ((err = sk_stream_wait_connect(sk, &timeo)) != 0)
 			goto out_err;
 
 	clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
@@ -865,13 +660,13 @@
 		int offset = poffset % PAGE_SIZE;
 		int size = min_t(size_t, psize, PAGE_SIZE - offset);
 
-		if (!tp->send_head || (copy = mss_now - skb->len) <= 0) {
+		if (!sk->sk_send_head || (copy = mss_now - skb->len) <= 0) {
 new_segment:
-			if (!tcp_memory_free(sk))
+			if (!sk_stream_memory_free(sk))
 				goto wait_for_sndbuf;
 
-			skb = tcp_alloc_pskb(sk, 0, tp->mss_cache,
-					     sk->sk_allocation);
+			skb = sk_stream_alloc_pskb(sk, 0, tp->mss_cache,
+						   sk->sk_allocation);
 			if (!skb)
 				goto wait_for_memory;
 
@@ -883,11 +678,11 @@
 			copy = size;
 
 		i = skb_shinfo(skb)->nr_frags;
-		if (can_coalesce(skb, i, page, offset)) {
+		if (skb_can_coalesce(skb, i, page, offset)) {
 			skb_shinfo(skb)->frags[i - 1].size += copy;
 		} else if (i < MAX_SKB_FRAGS) {
 			get_page(page);
-			fill_page_desc(skb, i, page, offset, copy);
+			skb_fill_page_desc(skb, i, page, offset, copy);
 		} else {
 			tcp_mark_push(tp, skb);
 			goto new_segment;
@@ -913,7 +708,7 @@
 		if (forced_push(tp)) {
 			tcp_mark_push(tp, skb);
 			__tcp_push_pending_frames(sk, tp, mss_now, TCP_NAGLE_PUSH);
-		} else if (skb == tp->send_head)
+		} else if (skb == sk->sk_send_head)
 			tcp_push_one(sk, mss_now);
 		continue;
 
@@ -923,7 +718,7 @@
 		if (copied)
 			tcp_push(sk, tp, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH);
 
-		if ((err = wait_for_tcp_memory(sk, &timeo)) != 0)
+		if ((err = sk_stream_wait_memory(sk, &timeo)) != 0)
 			goto do_error;
 
 		mss_now = tcp_current_mss(sk, !(flags&MSG_OOB));
@@ -938,7 +733,7 @@
 	if (copied)
 		goto out;
 out_err:
-	return tcp_error(sk, flags, err);
+	return sk_stream_error(sk, flags, err);
 }
 
 ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset,
@@ -963,55 +758,8 @@
 	return res;
 }
 
-#define TCP_PAGE(sk)	(inet_sk(sk)->sndmsg_page)
-#define TCP_OFF(sk)	(inet_sk(sk)->sndmsg_off)
-
-static inline int tcp_copy_to_page(struct sock *sk, char __user *from,
-				   struct sk_buff *skb, struct page *page,
-				   int off, int copy)
-{
-	int err = 0;
-	unsigned int csum;
-
-	if (skb->ip_summed == CHECKSUM_NONE) {
-		csum = csum_and_copy_from_user(from, page_address(page) + off,
-				       copy, 0, &err);
-		if (err) return err;
-		skb->csum = csum_block_add(skb->csum, csum, skb->len);
-	} else {
-		if (copy_from_user(page_address(page) + off, from, copy))
-			return -EFAULT;
-	}
-
-	skb->len += copy;
-	skb->data_len += copy;
-	skb->truesize += copy;
-	sk->sk_wmem_queued += copy;
-	sk->sk_forward_alloc -= copy;
-	return 0;
-}
-
-static inline int skb_add_data(struct sk_buff *skb, char __user *from, int copy)
-{
-	int err = 0;
-	unsigned int csum;
-	int off = skb->len;
-
-	if (skb->ip_summed == CHECKSUM_NONE) {
-		csum = csum_and_copy_from_user(from, skb_put(skb, copy),
-				       copy, 0, &err);
-		if (!err) {
-			skb->csum = csum_block_add(skb->csum, csum, off);
-			return 0;
-		}
-	} else {
-		if (!copy_from_user(skb_put(skb, copy), from, copy))
-			return 0;
-	}
-
-	__skb_trim(skb, off);
-	return -EFAULT;
-}
+#define TCP_PAGE(sk)	(sk->sk_sndmsg_page)
+#define TCP_OFF(sk)	(sk->sk_sndmsg_off)
 
 static inline int select_size(struct sock *sk, struct tcp_opt *tp)
 {
@@ -1046,7 +794,7 @@
 
 	/* Wait for a connection to finish. */
 	if ((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT))
-		if ((err = wait_for_tcp_connect(sk, flags, &timeo)) != 0)
+		if ((err = sk_stream_wait_connect(sk, &timeo)) != 0)
 			goto out_err;
 
 	/* This should be in poll */
@@ -1074,18 +822,18 @@
 
 			skb = sk->sk_write_queue.prev;
 
-			if (!tp->send_head ||
+			if (!sk->sk_send_head ||
 			    (copy = mss_now - skb->len) <= 0) {
 
 new_segment:
 				/* Allocate new segment. If the interface is SG,
 				 * allocate skb fitting to single page.
 				 */
-				if (!tcp_memory_free(sk))
+				if (!sk_stream_memory_free(sk))
 					goto wait_for_sndbuf;
 
-				skb = tcp_alloc_pskb(sk, select_size(sk, tp),
-						     0, sk->sk_allocation);
+				skb = sk_stream_alloc_pskb(sk, select_size(sk, tp),
+							   0, sk->sk_allocation);
 				if (!skb)
 					goto wait_for_memory;
 
@@ -1118,7 +866,7 @@
 				struct page *page = TCP_PAGE(sk);
 				int off = TCP_OFF(sk);
 
-				if (can_coalesce(skb, i, page, off) &&
+				if (skb_can_coalesce(skb, i, page, off) &&
 				    off != PAGE_SIZE) {
 					/* We can extend the last page
 					 * fragment. */
@@ -1146,7 +894,7 @@
 
 				if (!page) {
 					/* Allocate new cache page. */
-					if (!(page = tcp_alloc_page(sk)))
+					if (!(page = sk_stream_alloc_page(sk)))
 						goto wait_for_memory;
 					off = 0;
 				}
@@ -1156,7 +904,7 @@
 
 				/* Time to copy data. We are close to
 				 * the end! */
-				err = tcp_copy_to_page(sk, from, skb, page,
+				err = skb_copy_to_page(sk, from, skb, page,
 						       off, copy);
 				if (err) {
 					/* If this page was new, give it to the
@@ -1174,7 +922,7 @@
 					skb_shinfo(skb)->frags[i - 1].size +=
 									copy;
 				} else {
-					fill_page_desc(skb, i, page, off, copy);
+					skb_fill_page_desc(skb, i, page, off, copy);
 					if (TCP_PAGE(sk)) {
 						get_page(page);
 					} else if (off + copy < PAGE_SIZE) {
@@ -1203,7 +951,7 @@
 			if (forced_push(tp)) {
 				tcp_mark_push(tp, skb);
 				__tcp_push_pending_frames(sk, tp, mss_now, TCP_NAGLE_PUSH);
-			} else if (skb == tp->send_head)
+			} else if (skb == sk->sk_send_head)
 				tcp_push_one(sk, mss_now);
 			continue;
 
@@ -1213,7 +961,7 @@
 			if (copied)
 				tcp_push(sk, tp, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH);
 
-			if ((err = wait_for_tcp_memory(sk, &timeo)) != 0)
+			if ((err = sk_stream_wait_memory(sk, &timeo)) != 0)
 				goto do_error;
 
 			mss_now = tcp_current_mss(sk, !(flags&MSG_OOB));
@@ -1229,17 +977,17 @@
 
 do_fault:
 	if (!skb->len) {
-		if (tp->send_head == skb)
-			tp->send_head = NULL;
+		if (sk->sk_send_head == skb)
+			sk->sk_send_head = NULL;
 		__skb_unlink(skb, skb->list);
-		tcp_free_skb(sk, skb);
+		sk_stream_free_skb(sk, skb);
 	}
 
 do_error:
 	if (copied)
 		goto out;
 out_err:
-	err = tcp_error(sk, flags, err);
+	err = sk_stream_error(sk, flags, err);
 	TCP_CHECK_TIMER(sk);
 	release_sock(sk);
 	return err;
@@ -1828,40 +1576,6 @@
 	}
 }
 
-
-/*
- *	Return 1 if we still have things to send in our buffers.
- */
-
-static inline int closing(struct sock *sk)
-{
-	return (1 << sk->sk_state) &
-	       (TCPF_FIN_WAIT1 | TCPF_CLOSING | TCPF_LAST_ACK);
-}
-
-static __inline__ void tcp_kill_sk_queues(struct sock *sk)
-{
-	/* First the read buffer. */
-	__skb_queue_purge(&sk->sk_receive_queue);
-
-	/* Next, the error queue. */
-	__skb_queue_purge(&sk->sk_error_queue);
-
-	/* Next, the write queue. */
-	BUG_TRAP(skb_queue_empty(&sk->sk_write_queue));
-
-	/* Account for returned memory. */
-	tcp_mem_reclaim(sk);
-
-	BUG_TRAP(!sk->sk_wmem_queued);
-	BUG_TRAP(!sk->sk_forward_alloc);
-
-	/* It is _impossible_ for the backlog to contain anything
-	 * when we get here.  All user references to this socket
-	 * have gone away, only the net layer knows can touch it.
-	 */
-}
-
 /*
  * At this point, there should be no process reference to this
  * socket, and thus no user references at all.  Therefore we
@@ -1889,7 +1603,7 @@
 
 	sk->sk_prot->destroy(sk);
 
-	tcp_kill_sk_queues(sk);
+	sk_stream_kill_queues(sk);
 
 	xfrm_sk_free_policy(sk);
 
@@ -1932,7 +1646,7 @@
 		__kfree_skb(skb);
 	}
 
-	tcp_mem_reclaim(sk);
+	sk_stream_mem_reclaim(sk);
 
 	/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
 	 * 3.10, we send a RST here because data was lost.  To
@@ -1981,22 +1695,7 @@
 		tcp_send_fin(sk);
 	}
 
-	if (timeout) {
-		struct task_struct *tsk = current;
-		DEFINE_WAIT(wait);
-
-		do {
-			prepare_to_wait(sk->sk_sleep, &wait,
-					TASK_INTERRUPTIBLE);
-			if (!closing(sk))
-				break;
-			release_sock(sk);
-			timeout = schedule_timeout(timeout);
-			lock_sock(sk);
-		} while (!signal_pending(tsk) && timeout);
-
-		finish_wait(sk->sk_sleep, &wait);
-	}
+	sk_stream_wait_close(sk, timeout);
 
 adjudge_to_death:
 	/* It is the last release_sock in its life. It will remove backlog. */
@@ -2046,7 +1745,7 @@
 		}
 	}
 	if (sk->sk_state != TCP_CLOSE) {
-		tcp_mem_reclaim(sk);
+		sk_stream_mem_reclaim(sk);
 		if (atomic_read(&tcp_orphan_count) > sysctl_tcp_max_orphans ||
 		    (sk->sk_wmem_queued > SOCK_MIN_SNDBUF &&
 		     atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2])) {
@@ -2105,7 +1804,7 @@
 
 	tcp_clear_xmit_timers(sk);
 	__skb_queue_purge(&sk->sk_receive_queue);
-	tcp_writequeue_purge(sk);
+	sk_stream_writequeue_purge(sk);
 	__skb_queue_purge(&tp->out_of_order_queue);
 
 	inet->dport = 0;
@@ -2127,7 +1826,7 @@
 	tcp_set_ca_state(tp, TCP_CA_Open);
 	tcp_clear_retrans(tp);
 	tcp_delack_init(tp);
-	tp->send_head = NULL;
+	sk->sk_send_head = NULL;
 	tp->saw_tstamp = 0;
 	tcp_sack_reset(tp);
 	__sk_dst_reset(sk);
@@ -2614,9 +2313,6 @@
 	tcpdiag_init();
 }
 
-EXPORT_SYMBOL(__tcp_mem_reclaim);
-EXPORT_SYMBOL(sysctl_tcp_rmem);
-EXPORT_SYMBOL(sysctl_tcp_wmem);
 EXPORT_SYMBOL(tcp_accept);
 EXPORT_SYMBOL(tcp_close);
 EXPORT_SYMBOL(tcp_close_state);
@@ -2632,7 +2328,5 @@
 EXPORT_SYMBOL(tcp_sendpage);
 EXPORT_SYMBOL(tcp_setsockopt);
 EXPORT_SYMBOL(tcp_shutdown);
-EXPORT_SYMBOL(tcp_sockets_allocated);
 EXPORT_SYMBOL(tcp_statistics);
 EXPORT_SYMBOL(tcp_timewait_cachep);
-EXPORT_SYMBOL(tcp_write_space);
--- diff/net/ipv4/tcp_input.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/tcp_input.c	2004-07-01 21:32:53.000000000 +0100
@@ -90,7 +90,7 @@
 int sysctl_tcp_westwood;
 int sysctl_tcp_vegas_cong_avoid;
 
-int sysctl_tcp_moderate_rcvbuf;
+int sysctl_tcp_moderate_rcvbuf = 1;
 
 /* Default values of the Vegas variables, in fixed-point representation
  * with V_PARAM_SHIFT bits to the right of the binary point.
@@ -99,7 +99,7 @@
 int sysctl_tcp_vegas_alpha = 1<<V_PARAM_SHIFT;
 int sysctl_tcp_vegas_beta  = 3<<V_PARAM_SHIFT;
 int sysctl_tcp_vegas_gamma = 1<<V_PARAM_SHIFT;
-int sysctl_tcp_bic;
+int sysctl_tcp_bic = 1;
 int sysctl_tcp_bic_fast_convergence = 1;
 int sysctl_tcp_bic_low_window = 14;
 
@@ -259,7 +259,7 @@
 	/* Check #1 */
 	if (tp->rcv_ssthresh < tp->window_clamp &&
 	    (int)tp->rcv_ssthresh < tcp_space(sk) &&
-	    !tcp_memory_pressure) {
+	    !tcp_prot.memory_pressure) {
 		int incr;
 
 		/* Check #2. Increase window, if skb with such overhead
@@ -349,7 +349,7 @@
 	if (ofo_win) {
 		if (sk->sk_rcvbuf < sysctl_tcp_rmem[2] &&
 		    !(sk->sk_userlocks & SOCK_RCVBUF_LOCK) &&
-		    !tcp_memory_pressure &&
+		    !tcp_prot.memory_pressure &&
 		    atomic_read(&tcp_memory_allocated) < sysctl_tcp_mem[0])
 			sk->sk_rcvbuf = min(atomic_read(&sk->sk_rmem_alloc),
 					    sysctl_tcp_rmem[2]);
@@ -535,7 +535,7 @@
 			 * restart window, so that we send ACKs quickly.
 			 */
 			tcp_incr_quickack(tp);
-			tcp_mem_reclaim(sk);
+			sk_stream_mem_reclaim(sk);
 		}
 	}
 	tp->ack.lrcvtime = now;
@@ -1009,7 +1009,7 @@
 		if (after(end_seq, tp->high_seq))
 			flag |= FLAG_DATA_LOST;
 
-		for_retrans_queue(skb, sk, tp) {
+		sk_stream_for_retrans_queue(skb, sk) {
 			u8 sacked = TCP_SKB_CB(skb)->sacked;
 			int in_sack;
 
@@ -1113,7 +1113,7 @@
 	if (lost_retrans && tp->ca_state == TCP_CA_Recovery) {
 		struct sk_buff *skb;
 
-		for_retrans_queue(skb, sk, tp) {
+		sk_stream_for_retrans_queue(skb, sk) {
 			if (after(TCP_SKB_CB(skb)->seq, lost_retrans))
 				break;
 			if (!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una))
@@ -1179,7 +1179,7 @@
 	tp->undo_marker = tp->snd_una;
 	tp->undo_retrans = 0;
 
-	for_retrans_queue(skb, sk, tp) {
+	sk_stream_for_retrans_queue(skb, sk) {
 		TCP_SKB_CB(skb)->sacked &= ~TCPCB_RETRANS;
 	}
 	tcp_sync_left_out(tp);
@@ -1202,7 +1202,7 @@
 	tp->lost_out = 0;
 	tp->fackets_out = 0;
 
-	for_retrans_queue(skb, sk, tp) {
+	sk_stream_for_retrans_queue(skb, sk) {
 		cnt++;
 		TCP_SKB_CB(skb)->sacked &= ~TCPCB_LOST;
 		if (!(TCP_SKB_CB(skb)->sacked&TCPCB_SACKED_ACKED)) {
@@ -1275,7 +1275,7 @@
 	if (!how)
 		tp->undo_marker = tp->snd_una;
 
-	for_retrans_queue(skb, sk, tp) {
+	sk_stream_for_retrans_queue(skb, sk) {
 		cnt++;
 		if (TCP_SKB_CB(skb)->sacked&TCPCB_RETRANS)
 			tp->undo_marker = 0;
@@ -1518,7 +1518,7 @@
 
 	BUG_TRAP(cnt <= tp->packets_out);
 
-	for_retrans_queue(skb, sk, tp) {
+	sk_stream_for_retrans_queue(skb, sk) {
 		if (--cnt < 0 || after(TCP_SKB_CB(skb)->end_seq, high_seq))
 			break;
 		if (!(TCP_SKB_CB(skb)->sacked&TCPCB_TAGBITS)) {
@@ -1550,7 +1550,7 @@
 	if (tcp_head_timedout(sk, tp)) {
 		struct sk_buff *skb;
 
-		for_retrans_queue(skb, sk, tp) {
+		sk_stream_for_retrans_queue(skb, sk) {
 			if (tcp_skb_timedout(tp, skb) &&
 			    !(TCP_SKB_CB(skb)->sacked&TCPCB_TAGBITS)) {
 				TCP_SKB_CB(skb)->sacked |= TCPCB_LOST;
@@ -1719,7 +1719,7 @@
 {
 	if (tcp_may_undo(tp)) {
 		struct sk_buff *skb;
-		for_retrans_queue(skb, sk, tp) {
+		sk_stream_for_retrans_queue(skb, sk) {
 			TCP_SKB_CB(skb)->sacked &= ~TCPCB_LOST;
 		}
 		DBGUNDO(sk, tp, "partial loss");
@@ -2328,7 +2328,7 @@
 	int acked = 0;
 	__s32 seq_rtt = -1;
 
-	while ((skb = skb_peek(&sk->sk_write_queue)) && skb != tp->send_head) {
+	while ((skb = skb_peek(&sk->sk_write_queue)) && skb != sk->sk_send_head) {
 		struct tcp_skb_cb *scb = TCP_SKB_CB(skb); 
 		__u8 sacked = scb->sacked;
 
@@ -2376,7 +2376,7 @@
 			tp->fackets_out--;
 		tp->packets_out--;
 		__skb_unlink(skb, skb->list);
-		tcp_free_skb(sk, skb);
+		sk_stream_free_skb(sk, skb);
 	}
 
 	if (acked&FLAG_ACKED) {
@@ -2416,7 +2416,7 @@
 
 	/* Was it a usable window open? */
 
-	if (!after(TCP_SKB_CB(tp->send_head)->end_seq,
+	if (!after(TCP_SKB_CB(sk->sk_send_head)->end_seq,
 		   tp->snd_una + tp->snd_wnd)) {
 		tp->backoff = 0;
 		tcp_clear_xmit_timer(sk, TCP_TIME_PROBE0);
@@ -2857,7 +2857,7 @@
 	 * being used to time the probes, and is probably far higher than
 	 * it needs to be for normal retransmission.
 	 */
-	if (tp->send_head)
+	if (sk->sk_send_head)
 		tcp_ack_probe(sk);
 	return 1;
 
@@ -3166,7 +3166,7 @@
 	__skb_queue_purge(&tp->out_of_order_queue);
 	if (tp->sack_ok)
 		tcp_sack_reset(tp);
-	tcp_mem_reclaim(sk);
+	sk_stream_mem_reclaim(sk);
 
 	if (!sock_flag(sk, SOCK_DEAD)) {
 		sk->sk_state_change(sk);
@@ -3398,12 +3398,6 @@
 	}
 }
 
-static inline int tcp_rmem_schedule(struct sock *sk, struct sk_buff *skb)
-{
-	return (int)skb->truesize <= sk->sk_forward_alloc ||
-		tcp_mem_schedule(sk, skb->truesize, 1);
-}
-
 static int tcp_prune_queue(struct sock *sk);
 
 static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
@@ -3457,11 +3451,12 @@
 queue_and_out:
 			if (eaten < 0 &&
 			    (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||
-			     !tcp_rmem_schedule(sk, skb))) {
-				if (tcp_prune_queue(sk) < 0 || !tcp_rmem_schedule(sk, skb))
+			     !sk_stream_rmem_schedule(sk, skb))) {
+				if (tcp_prune_queue(sk) < 0 ||
+				    !sk_stream_rmem_schedule(sk, skb))
 					goto drop;
 			}
-			tcp_set_owner_r(skb, sk);
+			sk_stream_set_owner_r(skb, sk);
 			__skb_queue_tail(&sk->sk_receive_queue, skb);
 		}
 		tp->rcv_nxt = TCP_SKB_CB(skb)->end_seq;
@@ -3530,8 +3525,9 @@
 	TCP_ECN_check_ce(tp, skb);
 
 	if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||
-	    !tcp_rmem_schedule(sk, skb)) {
-		if (tcp_prune_queue(sk) < 0 || !tcp_rmem_schedule(sk, skb))
+	    !sk_stream_rmem_schedule(sk, skb)) {
+		if (tcp_prune_queue(sk) < 0 ||
+		    !sk_stream_rmem_schedule(sk, skb))
 			goto drop;
 	}
 
@@ -3542,7 +3538,7 @@
 	SOCK_DEBUG(sk, "out of order segment: rcv_next %X seq %X - %X\n",
 		   tp->rcv_nxt, TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq);
 
-	tcp_set_owner_r(skb, sk);
+	sk_stream_set_owner_r(skb, sk);
 
 	if (!skb_peek(&tp->out_of_order_queue)) {
 		/* Initial out of order segment, build 1 SACK. */
@@ -3681,7 +3677,7 @@
 		memcpy(nskb->cb, skb->cb, sizeof(skb->cb));
 		TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(nskb)->end_seq = start;
 		__skb_insert(nskb, skb->prev, skb, skb->list);
-		tcp_set_owner_r(nskb, sk);
+		sk_stream_set_owner_r(nskb, sk);
 
 		/* Copy data, releasing collapsed skbs. */
 		while (copy > 0) {
@@ -3768,14 +3764,14 @@
 
 	if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf)
 		tcp_clamp_window(sk, tp);
-	else if (tcp_memory_pressure)
+	else if (tcp_prot.memory_pressure)
 		tp->rcv_ssthresh = min(tp->rcv_ssthresh, 4U * tp->advmss);
 
 	tcp_collapse_ofo_queue(sk);
 	tcp_collapse(sk, sk->sk_receive_queue.next,
 		     (struct sk_buff*)&sk->sk_receive_queue,
 		     tp->copied_seq, tp->rcv_nxt);
-	tcp_mem_reclaim(sk);
+	sk_stream_mem_reclaim(sk);
 
 	if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf)
 		return 0;
@@ -3796,7 +3792,7 @@
 		 */
 		if (tp->sack_ok)
 			tcp_sack_reset(tp);
-		tcp_mem_reclaim(sk);
+		sk_stream_mem_reclaim(sk);
 	}
 
 	if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf)
@@ -3837,7 +3833,7 @@
 
 
 /* When incoming ACK allowed to free some skb from write_queue,
- * we remember this event in flag tp->queue_shrunk and wake up socket
+ * we remember this event in flag sk->sk_queue_shrunk and wake up socket
  * on the exit from tcp input handler.
  *
  * PROBLEM: sndbuf expansion does not work well with largesend.
@@ -3848,7 +3844,7 @@
 
 	if (tp->packets_out < tp->snd_cwnd &&
 	    !(sk->sk_userlocks & SOCK_SNDBUF_LOCK) &&
-	    !tcp_memory_pressure &&
+	    !tcp_prot.memory_pressure &&
 	    atomic_read(&tcp_memory_allocated) < sysctl_tcp_mem[0]) {
  		int sndmem = max_t(u32, tp->mss_clamp, tp->mss_cache) +
 			MAX_TCP_HEADER + 16 + sizeof(struct sk_buff),
@@ -3865,10 +3861,8 @@
 
 static inline void tcp_check_space(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
-
-	if (tp->queue_shrunk) {
-		tp->queue_shrunk = 0;
+	if (sk->sk_queue_shrunk) {
+		sk->sk_queue_shrunk = 0;
 		if (sk->sk_socket &&
 		    test_bit(SOCK_NOSPACE, &sk->sk_socket->flags))
 			tcp_new_space(sk);
@@ -3887,8 +3881,7 @@
 
 static __inline__ void tcp_data_snd_check(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
-	struct sk_buff *skb = tp->send_head;
+	struct sk_buff *skb = sk->sk_send_head;
 
 	if (skb != NULL)
 		__tcp_data_snd_check(sk, skb);
@@ -4242,7 +4235,7 @@
 				/* Bulk data transfer: receiver */
 				__skb_pull(skb,tcp_header_len);
 				__skb_queue_tail(&sk->sk_receive_queue, skb);
-				tcp_set_owner_r(skb, sk);
+				sk_stream_set_owner_r(skb, sk);
 				tp->rcv_nxt = TCP_SKB_CB(skb)->end_seq;
 			}
 
@@ -4482,7 +4475,7 @@
 			sk_wake_async(sk, 0, POLL_OUT);
 		}
 
-		if (tp->write_pending || tp->defer_accept || tp->ack.pingpong) {
+		if (sk->sk_write_pending || tp->defer_accept || tp->ack.pingpong) {
 			/* Save one ACK. Data will be ready after
 			 * several ticks, if write_pending is set.
 			 *
--- diff/net/ipv4/tcp_ipv4.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/tcp_ipv4.c	2004-07-01 21:32:53.000000000 +0100
@@ -2081,7 +2081,7 @@
 
 	sk->sk_state = TCP_CLOSE;
 
-	sk->sk_write_space = tcp_write_space;
+	sk->sk_write_space = sk_stream_write_space;
 	sk->sk_use_write_queue = 1;
 
 	tp->af_specific = &ipv4_specific;
@@ -2094,14 +2094,14 @@
 	return 0;
 }
 
-static int tcp_v4_destroy_sock(struct sock *sk)
+int tcp_v4_destroy_sock(struct sock *sk)
 {
 	struct tcp_opt *tp = tcp_sk(sk);
 
 	tcp_clear_xmit_timers(sk);
 
 	/* Cleanup up the write buffer. */
-  	tcp_writequeue_purge(sk);
+  	sk_stream_writequeue_purge(sk);
 
 	/* Cleans up our, hopefully empty, out_of_order_queue. */
   	__skb_queue_purge(&tp->out_of_order_queue);
@@ -2113,15 +2113,13 @@
 	if (tp->bind_hash)
 		tcp_put_port(sk);
 
-	/* If sendmsg cached page exists, toss it. */
-	if (inet_sk(sk)->sndmsg_page)
-		__free_page(inet_sk(sk)->sndmsg_page);
-
 	atomic_dec(&tcp_sockets_allocated);
 
 	return 0;
 }
 
+EXPORT_SYMBOL(tcp_v4_destroy_sock);
+
 #ifdef CONFIG_PROC_FS
 /* Proc filesystem TCP sock list dumping. */
 
@@ -2586,23 +2584,31 @@
 #endif /* CONFIG_PROC_FS */
 
 struct proto tcp_prot = {
-	.name		=	"TCP",
-	.close		=	tcp_close,
-	.connect	=	tcp_v4_connect,
-	.disconnect	=	tcp_disconnect,
-	.accept		=	tcp_accept,
-	.ioctl		=	tcp_ioctl,
-	.init		=	tcp_v4_init_sock,
-	.destroy	=	tcp_v4_destroy_sock,
-	.shutdown	=	tcp_shutdown,
-	.setsockopt	=	tcp_setsockopt,
-	.getsockopt	=	tcp_getsockopt,
-	.sendmsg	=	tcp_sendmsg,
-	.recvmsg	=	tcp_recvmsg,
-	.backlog_rcv	=	tcp_v4_do_rcv,
-	.hash		=	tcp_v4_hash,
-	.unhash		=	tcp_unhash,
-	.get_port	=	tcp_v4_get_port,
+	.name			= "TCP",
+	.close			= tcp_close,
+	.connect		= tcp_v4_connect,
+	.disconnect		= tcp_disconnect,
+	.accept			= tcp_accept,
+	.ioctl			= tcp_ioctl,
+	.init			= tcp_v4_init_sock,
+	.destroy		= tcp_v4_destroy_sock,
+	.shutdown		= tcp_shutdown,
+	.setsockopt		= tcp_setsockopt,
+	.getsockopt		= tcp_getsockopt,
+	.sendmsg		= tcp_sendmsg,
+	.recvmsg		= tcp_recvmsg,
+	.backlog_rcv		= tcp_v4_do_rcv,
+	.hash			= tcp_v4_hash,
+	.unhash			= tcp_unhash,
+	.get_port		= tcp_v4_get_port,
+	.enter_memory_pressure	= tcp_enter_memory_pressure,
+	.sockets_allocated	= &tcp_sockets_allocated,
+	.memory_allocated	= &tcp_memory_allocated,
+	.memory_pressure	= &tcp_memory_pressure,
+	.sysctl_mem		= sysctl_tcp_mem,
+	.sysctl_wmem		= sysctl_tcp_wmem,
+	.sysctl_rmem		= sysctl_tcp_rmem,
+	.max_header		= MAX_TCP_HEADER,
 };
 
 
--- diff/net/ipv4/tcp_minisocks.c	2004-05-19 22:13:14.000000000 +0100
+++ source/net/ipv4/tcp_minisocks.c	2004-07-01 21:32:53.000000000 +0100
@@ -718,9 +718,10 @@
 		sock_reset_flag(newsk, SOCK_DONE);
 		newsk->sk_userlocks = sk->sk_userlocks & ~SOCK_BINDPORT_LOCK;
 		newsk->sk_backlog.head = newsk->sk_backlog.tail = NULL;
+		newsk->sk_send_head = NULL;
 		newsk->sk_callback_lock = RW_LOCK_UNLOCKED;
 		skb_queue_head_init(&newsk->sk_error_queue);
-		newsk->sk_write_space = tcp_write_space;
+		newsk->sk_write_space = sk_stream_write_space;
 
 		if ((filter = newsk->sk_filter) != NULL)
 			sk_filter_charge(newsk, filter);
@@ -775,7 +776,6 @@
 		tcp_set_ca_state(newtp, TCP_CA_Open);
 		tcp_init_xmit_timers(newsk);
 		skb_queue_head_init(&newtp->out_of_order_queue);
-		newtp->send_head = NULL;
 		newtp->rcv_wup = req->rcv_isn + 1;
 		newtp->write_seq = req->snt_isn + 1;
 		newtp->pushed_seq = newtp->write_seq;
--- diff/net/ipv4/tcp_output.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/tcp_output.c	2004-07-01 21:32:53.000000000 +0100
@@ -48,9 +48,9 @@
 static __inline__
 void update_send_head(struct sock *sk, struct tcp_opt *tp, struct sk_buff *skb)
 {
-	tp->send_head = skb->next;
-	if (tp->send_head == (struct sk_buff *)&sk->sk_write_queue)
-		tp->send_head = NULL;
+	sk->sk_send_head = skb->next;
+	if (sk->sk_send_head == (struct sk_buff *)&sk->sk_write_queue)
+		sk->sk_send_head = NULL;
 	tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
 	if (tp->packets_out++ == 0)
 		tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS, tp->rto);
@@ -326,11 +326,11 @@
 	/* Advance write_seq and place onto the write_queue. */
 	tp->write_seq = TCP_SKB_CB(skb)->end_seq;
 	__skb_queue_tail(&sk->sk_write_queue, skb);
-	tcp_charge_skb(sk, skb);
+	sk_charge_skb(sk, skb);
 
 	/* Queue it, remembering where we must start sending. */
-	if (tp->send_head == NULL)
-		tp->send_head = skb;
+	if (sk->sk_send_head == NULL)
+		sk->sk_send_head = skb;
 }
 
 /* Send _single_ skb sitting at the send head. This function requires
@@ -339,13 +339,13 @@
 void tcp_push_one(struct sock *sk, unsigned cur_mss)
 {
 	struct tcp_opt *tp = tcp_sk(sk);
-	struct sk_buff *skb = tp->send_head;
+	struct sk_buff *skb = sk->sk_send_head;
 
 	if (tcp_snd_test(tp, skb, cur_mss, TCP_NAGLE_PUSH)) {
 		/* Send it out now. */
 		TCP_SKB_CB(skb)->when = tcp_time_stamp;
 		if (!tcp_transmit_skb(sk, skb_clone(skb, sk->sk_allocation))) {
-			tp->send_head = NULL;
+			sk->sk_send_head = NULL;
 			tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
 			if (tp->packets_out++ == 0)
 				tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS, tp->rto);
@@ -354,70 +354,6 @@
 	}
 }
 
-/* Split fragmented skb to two parts at length len. */
-
-static void skb_split(struct sk_buff *skb, struct sk_buff *skb1, u32 len)
-{
-	int i;
-	int pos = skb_headlen(skb);
-
-	if (len < pos) {
-		/* Split line is inside header. */
-		memcpy(skb_put(skb1, pos-len), skb->data + len, pos-len);
-
-		/* And move data appendix as is. */
-		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
-			skb_shinfo(skb1)->frags[i] = skb_shinfo(skb)->frags[i];
-
-		skb_shinfo(skb1)->nr_frags = skb_shinfo(skb)->nr_frags;
-		skb_shinfo(skb)->nr_frags = 0;
-
-		skb1->data_len = skb->data_len;
-		skb1->len += skb1->data_len;
-		skb->data_len = 0;
-		skb->len = len;
-		skb->tail = skb->data+len;
-	} else {
-		int k = 0;
-		int nfrags = skb_shinfo(skb)->nr_frags;
-
-		/* Second chunk has no header, nothing to copy. */
-
-		skb_shinfo(skb)->nr_frags = 0;
-		skb1->len = skb1->data_len = skb->len - len;
-		skb->len = len;
-		skb->data_len = len - pos;
-
-		for (i=0; i<nfrags; i++) {
-			int size = skb_shinfo(skb)->frags[i].size;
-			if (pos + size > len) {
-				skb_shinfo(skb1)->frags[k] = skb_shinfo(skb)->frags[i];
-
-				if (pos < len) {
-					/* Split frag.
-					 * We have to variants in this case:
-					 * 1. Move all the frag to the second
-					 *    part, if it is possible. F.e.
-					 *    this approach is mandatory for TUX,
-					 *    where splitting is expensive.
-					 * 2. Split is accurately. We make this.
-					 */
-					get_page(skb_shinfo(skb)->frags[i].page);
-					skb_shinfo(skb1)->frags[0].page_offset += (len-pos);
-					skb_shinfo(skb1)->frags[0].size -= (len-pos);
-					skb_shinfo(skb)->frags[i].size = len-pos;
-					skb_shinfo(skb)->nr_frags++;
-				}
-				k++;
-			} else {
-				skb_shinfo(skb)->nr_frags++;
-			}
-			pos += size;
-		}
-		skb_shinfo(skb1)->nr_frags = k;
-	}
-}
-
 /* Function to create two new TCP segments.  Shrinks the given segment
  * to the specified size and appends a new segment with the rest of the
  * packet to the list.  This won't be called frequently, I hope. 
@@ -436,10 +372,10 @@
 		return -ENOMEM;
 
 	/* Get a new skb... force flag on. */
-	buff = tcp_alloc_skb(sk, nsize, GFP_ATOMIC);
+	buff = sk_stream_alloc_skb(sk, nsize, GFP_ATOMIC);
 	if (buff == NULL)
 		return -ENOMEM; /* We'll just try again later. */
-	tcp_charge_skb(sk, buff);
+	sk_charge_skb(sk, buff);
 
 	/* Correct the sequence numbers. */
 	TCP_SKB_CB(buff)->seq = TCP_SKB_CB(skb)->seq + len;
@@ -636,8 +572,10 @@
 		 */
 		mss_now = tcp_current_mss(sk, 1);
 
-		while((skb = tp->send_head) &&
-		      tcp_snd_test(tp, skb, mss_now, tcp_skb_is_last(sk, skb) ? nonagle : TCP_NAGLE_PUSH)) {
+		while ((skb = sk->sk_send_head) &&
+		       tcp_snd_test(tp, skb, mss_now,
+			       	    tcp_skb_is_last(sk, skb) ? nonagle :
+				    			       TCP_NAGLE_PUSH)) {
 			if (skb->len > mss_now) {
 				if (tcp_fragment(sk, skb, mss_now))
 					break;
@@ -657,7 +595,7 @@
 			return 0;
 		}
 
-		return !tp->packets_out && tp->send_head;
+		return !tp->packets_out && sk->sk_send_head;
 	}
 	return 0;
 }
@@ -734,7 +672,7 @@
 	if (free_space < full_space/2) {
 		tp->ack.quick = 0;
 
-		if (tcp_memory_pressure)
+		if (tcp_prot.memory_pressure)
 			tp->rcv_ssthresh = min(tp->rcv_ssthresh, 4U*tp->advmss);
 
 		if (free_space < mss)
@@ -827,7 +765,7 @@
 		 */
 		if (tp->fackets_out)
 			tp->fackets_out--;
-		tcp_free_skb(sk, next_skb);
+		sk_stream_free_skb(sk, next_skb);
 		tp->packets_out--;
 	}
 }
@@ -843,7 +781,7 @@
 	unsigned int mss = tcp_current_mss(sk, 0);
 	int lost = 0;
 
-	for_retrans_queue(skb, sk, tp) {
+	sk_stream_for_retrans_queue(skb, sk) {
 		if (skb->len > mss && 
 		    !(TCP_SKB_CB(skb)->sacked&TCPCB_SACKED_ACKED)) {
 			if (TCP_SKB_CB(skb)->sacked&TCPCB_SACKED_RETRANS) {
@@ -929,7 +867,7 @@
 	/* Collapse two adjacent packets if worthwhile and we can. */
 	if(!(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_SYN) &&
 	   (skb->len < (cur_mss >> 1)) &&
-	   (skb->next != tp->send_head) &&
+	   (skb->next != sk->sk_send_head) &&
 	   (skb->next != (struct sk_buff *)&sk->sk_write_queue) &&
 	   (skb_shinfo(skb)->nr_frags == 0 && skb_shinfo(skb->next)->nr_frags == 0) &&
 	   (sysctl_tcp_retrans_collapse != 0))
@@ -1004,7 +942,7 @@
 
 	/* First pass: retransmit lost packets. */
 	if (packet_cnt) {
-		for_retrans_queue(skb, sk, tp) {
+		sk_stream_for_retrans_queue(skb, sk) {
 			__u8 sacked = TCP_SKB_CB(skb)->sacked;
 
 			if (tcp_packets_in_flight(tp) >= tp->snd_cwnd)
@@ -1052,7 +990,7 @@
 
 	packet_cnt = 0;
 
-	for_retrans_queue(skb, sk, tp) {
+	sk_stream_for_retrans_queue(skb, sk) {
 		if(++packet_cnt > tp->fackets_out)
 			break;
 
@@ -1089,7 +1027,7 @@
 	 */
 	mss_now = tcp_current_mss(sk, 1); 
 
-	if(tp->send_head != NULL) {
+	if (sk->sk_send_head != NULL) {
 		TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_FIN;
 		TCP_SKB_CB(skb)->end_seq++;
 		tp->write_seq++;
@@ -1168,8 +1106,8 @@
 				return -ENOMEM;
 			__skb_unlink(skb, &sk->sk_write_queue);
 			__skb_queue_head(&sk->sk_write_queue, nskb);
-			tcp_free_skb(sk, skb);
-			tcp_charge_skb(sk, nskb);
+			sk_stream_free_skb(sk, skb);
+			sk_charge_skb(sk, nskb);
 			skb = nskb;
 		}
 
@@ -1329,7 +1267,7 @@
 	TCP_SKB_CB(buff)->when = tcp_time_stamp;
 	tp->retrans_stamp = TCP_SKB_CB(buff)->when;
 	__skb_queue_tail(&sk->sk_write_queue, buff);
-	tcp_charge_skb(sk, buff);
+	sk_charge_skb(sk, buff);
 	tp->packets_out++;
 	tcp_transmit_skb(sk, skb_clone(buff, GFP_KERNEL));
 	TCP_INC_STATS(TcpActiveOpens);
@@ -1468,7 +1406,7 @@
 		struct tcp_opt *tp = tcp_sk(sk);
 		struct sk_buff *skb;
 
-		if ((skb = tp->send_head) != NULL &&
+		if ((skb = sk->sk_send_head) != NULL &&
 		    before(TCP_SKB_CB(skb)->seq, tp->snd_una+tp->snd_wnd)) {
 			int err;
 			int mss = tcp_current_mss(sk, 0);
@@ -1522,7 +1460,7 @@
 
 	err = tcp_write_wakeup(sk);
 
-	if (tp->packets_out || !tp->send_head) {
+	if (tp->packets_out || !sk->sk_send_head) {
 		/* Cancel probe timer, if it is not required. */
 		tp->probes_out = 0;
 		tp->backoff = 0;
--- diff/net/ipv4/tcp_timer.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/tcp_timer.c	2004-07-01 21:32:53.000000000 +0100
@@ -217,7 +217,7 @@
 		goto out_unlock;
 	}
 
-	tcp_mem_reclaim(sk);
+	sk_stream_mem_reclaim(sk);
 
 	if (sk->sk_state == TCP_CLOSE || !(tp->ack.pending & TCP_ACK_TIMER))
 		goto out;
@@ -257,8 +257,8 @@
 	TCP_CHECK_TIMER(sk);
 
 out:
-	if (tcp_memory_pressure)
-		tcp_mem_reclaim(sk);
+	if (tcp_prot.memory_pressure)
+		sk_stream_mem_reclaim(sk);
 out_unlock:
 	bh_unlock_sock(sk);
 	sock_put(sk);
@@ -269,7 +269,7 @@
 	struct tcp_opt *tp = tcp_sk(sk);
 	int max_probes;
 
-	if (tp->packets_out || !tp->send_head) {
+	if (tp->packets_out || !sk->sk_send_head) {
 		tp->probes_out = 0;
 		return;
 	}
@@ -448,7 +448,7 @@
 	TCP_CHECK_TIMER(sk);
 
 out:
-	tcp_mem_reclaim(sk);
+	sk_stream_mem_reclaim(sk);
 out_unlock:
 	bh_unlock_sock(sk);
 	sock_put(sk);
@@ -606,7 +606,7 @@
 	elapsed = keepalive_time_when(tp);
 
 	/* It is alive without keepalive 8) */
-	if (tp->packets_out || tp->send_head)
+	if (tp->packets_out || sk->sk_send_head)
 		goto resched;
 
 	elapsed = tcp_time_stamp - tp->rcv_tstamp;
@@ -633,7 +633,7 @@
 	}
 
 	TCP_CHECK_TIMER(sk);
-	tcp_mem_reclaim(sk);
+	sk_stream_mem_reclaim(sk);
 
 resched:
 	tcp_reset_keepalive_timer (sk, elapsed);
--- diff/net/ipv4/udp.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/udp.c	2004-07-01 21:32:53.000000000 +0100
@@ -931,7 +931,7 @@
 
 static void udp_close(struct sock *sk, long timeout)
 {
-	inet_sock_release(sk);
+	sk_common_release(sk);
 }
 
 /* return:
@@ -964,6 +964,7 @@
 	len = skb->tail - udpdata;
 
 	switch (encap_type) {
+	default:
 	case UDP_ENCAP_ESPINUDP:
 		/* Check if this is a keepalive packet.  If so, eat it. */
 		if (len == 1 && udpdata[0] == 0xff) {
@@ -975,34 +976,6 @@
 			/* Must be an IKE packet.. pass it through */
 			return 1;
 
-	decaps:
-		/* At this point we are sure that this is an ESPinUDP packet,
-		 * so we need to remove 'len' bytes from the packet (the UDP
-		 * header and optional ESP marker bytes) and then modify the
-		 * protocol to ESP, and then call into the transform receiver.
-		 */
-
-		/* Now we can update and verify the packet length... */
-		iph = skb->nh.iph;
-		iphlen = iph->ihl << 2;
-		iph->tot_len = htons(ntohs(iph->tot_len) - len);
-		if (skb->len < iphlen + len) {
-			/* packet is too small!?! */
-			return 0;
-		}
-
-		/* pull the data buffer up to the ESP header and set the
-		 * transport header to point to ESP.  Keep UDP on the stack
-		 * for later.
-		 */
-		skb->h.raw = skb_pull(skb, len);
-
-		/* modify the protocol (it's ESP!) */
-		iph->protocol = IPPROTO_ESP;
-
-		/* and let the caller know to send this into the ESP processor... */
-		return -1;
-
 	case UDP_ENCAP_ESPINUDP_NON_IKE:
 		/* Check if this is a keepalive packet.  If so, eat it. */
 		if (len == 1 && udpdata[0] == 0xff) {
@@ -1012,17 +985,37 @@
 			
 			/* ESP Packet with Non-IKE marker */
 			len = sizeof(struct udphdr) + 2 * sizeof(u32);
-			goto decaps;
 		} else
 			/* Must be an IKE packet.. pass it through */
 			return 1;
+	}
 
-	default:
-		if (net_ratelimit())
-			printk(KERN_INFO "udp_encap_rcv(): Unhandled UDP encap type: %u\n",
-			       encap_type);
-		return 1;
+	/* At this point we are sure that this is an ESPinUDP packet,
+	 * so we need to remove 'len' bytes from the packet (the UDP
+	 * header and optional ESP marker bytes) and then modify the
+	 * protocol to ESP, and then call into the transform receiver.
+	 */
+
+	/* Now we can update and verify the packet length... */
+	iph = skb->nh.iph;
+	iphlen = iph->ihl << 2;
+	iph->tot_len = htons(ntohs(iph->tot_len) - len);
+	if (skb->len < iphlen + len) {
+		/* packet is too small!?! */
+		return 0;
 	}
+
+	/* pull the data buffer up to the ESP header and set the
+	 * transport header to point to ESP.  Keep UDP on the stack
+	 * for later.
+	 */
+	skb->h.raw = skb_pull(skb, len);
+
+	/* modify the protocol (it's ESP!) */
+	iph->protocol = IPPROTO_ESP;
+
+	/* and let the caller know to send this into the ESP processor... */
+	return -1;
 #endif
 }
 
@@ -1297,7 +1290,16 @@
 		break;
 		
 	case UDP_ENCAP:
-		up->encap_type = val;
+		switch (val) {
+		case 0:
+		case UDP_ENCAP_ESPINUDP:
+		case UDP_ENCAP_ESPINUDP_NON_IKE:
+			up->encap_type = val;
+			break;
+		default:
+			err = -ENOPROTOOPT;
+			break;
+		}
 		break;
 
 	default:
--- diff/net/ipv4/xfrm4_tunnel.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv4/xfrm4_tunnel.c	2004-07-01 21:32:53.000000000 +0100
@@ -167,7 +167,7 @@
 	.output		= ipip_output
 };
 
-static struct inet_protocol ipip_protocol = {
+static struct net_protocol ipip_protocol = {
 	.handler	=	ipip_rcv,
 	.err_handler	=	ipip_err,
 	.no_policy	=	1,
--- diff/net/ipv6/Makefile	2004-05-19 22:13:15.000000000 +0100
+++ source/net/ipv6/Makefile	2004-07-01 21:32:53.000000000 +0100
@@ -10,7 +10,8 @@
 		exthdrs.o sysctl_net_ipv6.o datagram.o proc.o \
 		ip6_flowlabel.o ipv6_syms.o
 
-ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o
+ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \
+	xfrm6_tunnel.o
 ipv6-objs += $(ipv6-y)
 
 obj-$(CONFIG_INET6_AH) += ah6.o
--- diff/net/ipv6/af_inet6.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/af_inet6.c	2004-07-01 21:32:53.000000000 +0100
@@ -250,7 +250,7 @@
 	if (sk->sk_prot->init) {
 		int err = sk->sk_prot->init(sk);
 		if (err != 0) {
-			inet_sock_release(sk);
+			sk_common_release(sk);
 			return err;
 		}
 	}
@@ -510,10 +510,10 @@
 	.ioctl =	inet6_ioctl,			/* must change  */
 	.listen =	inet_listen,			/* ok		*/
 	.shutdown =	inet_shutdown,			/* ok		*/
-	.setsockopt =	inet_setsockopt,		/* ok		*/
-	.getsockopt =	inet_getsockopt,		/* ok		*/
+	.setsockopt =	sock_common_setsockopt,		/* ok		*/
+	.getsockopt =	sock_common_getsockopt,		/* ok		*/
 	.sendmsg =	inet_sendmsg,			/* ok		*/
-	.recvmsg =	inet_recvmsg,			/* ok		*/
+	.recvmsg =	sock_common_recvmsg,		/* ok		*/
 	.mmap =		sock_no_mmap,
 	.sendpage =	tcp_sendpage
 };
@@ -531,10 +531,10 @@
 	.ioctl =	inet6_ioctl,			/* must change  */
 	.listen =	sock_no_listen,			/* ok		*/
 	.shutdown =	inet_shutdown,			/* ok		*/
-	.setsockopt =	inet_setsockopt,		/* ok		*/
-	.getsockopt =	inet_getsockopt,		/* ok		*/
+	.setsockopt =	sock_common_setsockopt,		/* ok		*/
+	.getsockopt =	sock_common_getsockopt,		/* ok		*/
 	.sendmsg =	inet_sendmsg,			/* ok		*/
-	.recvmsg =	inet_recvmsg,			/* ok		*/
+	.recvmsg =	sock_common_recvmsg,		/* ok		*/
 	.mmap =		sock_no_mmap,
 	.sendpage =	sock_no_sendpage,
 };
--- diff/net/ipv6/ah6.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/ah6.c	2004-07-01 21:32:53.000000000 +0100
@@ -163,11 +163,15 @@
 	}
 
 	spin_lock_bh(&x->lock);
-	err = xfrm_check_output(x, *pskb, AF_INET6);
+	err = xfrm_state_check(x, *pskb);
 	if (err)
 		goto error;
 
 	if (x->props.mode) {
+		err = xfrm6_tunnel_check_size(*pskb);
+		if (err)
+			goto error;
+
 		iph = (*pskb)->nh.ipv6h;
 		(*pskb)->nh.ipv6h = (struct ipv6hdr*)skb_push(*pskb, x->props.header_len);
 		(*pskb)->nh.ipv6h->version = 6;
--- diff/net/ipv6/esp6.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/esp6.c	2004-07-01 21:32:53.000000000 +0100
@@ -38,8 +38,6 @@
 #include <net/ipv6.h>
 #include <linux/icmpv6.h>
 
-#define MAX_SG_ONSTACK 4
-
 int esp6_output(struct sk_buff **pskb)
 {
 	int err;
@@ -65,14 +63,16 @@
 	}
 
 	spin_lock_bh(&x->lock);
-	err = xfrm_check_output(x, *pskb, AF_INET6);
+	err = xfrm_state_check(x, *pskb);
 	if (err)
 		goto error;
-	err = -ENOMEM;
 
-	/* Strip IP header in transport mode. Save it. */
-
-	if (!x->props.mode) {
+	if (x->props.mode) {
+		err = xfrm6_tunnel_check_size(*pskb);
+		if (err)
+			goto error;
+	} else {
+		/* Strip IP header in transport mode. Save it. */
 		hdr_len = ip6_find_1stfragopt(*pskb, &prevhdr);
 		nexthdr = *prevhdr;
 		*prevhdr = IPPROTO_ESP;
@@ -86,6 +86,7 @@
 	}
 
 	/* Now skb is pure payload to encrypt */
+	err = -ENOMEM;
 
 	/* Round to block size */
 	clen = (*pskb)->len;
@@ -148,17 +149,16 @@
 		crypto_cipher_set_iv(tfm, esp->conf.ivec, crypto_tfm_alg_ivsize(tfm));
 
 	do {
-		struct scatterlist sgbuf[nfrags>MAX_SG_ONSTACK ? 0 : nfrags];
-		struct scatterlist *sg = sgbuf;
+		struct scatterlist *sg = &esp->sgbuf[0];
 
-		if (unlikely(nfrags > MAX_SG_ONSTACK)) {
+		if (unlikely(nfrags > ESP_NUM_FAST_SG)) {
 			sg = kmalloc(sizeof(struct scatterlist)*nfrags, GFP_ATOMIC);
 			if (!sg)
 				goto error;
 		}
 		skb_to_sgvec(*pskb, sg, esph->enc_data+esp->conf.ivlen-(*pskb)->data, clen);
 		crypto_cipher_encrypt(tfm, sg, sg, clen);
-		if (unlikely(sg != sgbuf))
+		if (unlikely(sg != &esp->sgbuf[0]))
 			kfree(sg);
 	} while (0);
 
@@ -256,12 +256,11 @@
 
         {
 		u8 nexthdr[2];
-		struct scatterlist sgbuf[nfrags>MAX_SG_ONSTACK ? 0 : nfrags];
-		struct scatterlist *sg = sgbuf;
+		struct scatterlist *sg = &esp->sgbuf[0];
 		u8 padlen;
 		u8 *prevhdr;
 
-		if (unlikely(nfrags > MAX_SG_ONSTACK)) {
+		if (unlikely(nfrags > ESP_NUM_FAST_SG)) {
 			sg = kmalloc(sizeof(struct scatterlist)*nfrags, GFP_ATOMIC);
 			if (!sg) {
 				ret = -ENOMEM;
@@ -270,7 +269,7 @@
 		}
 		skb_to_sgvec(skb, sg, sizeof(struct ipv6_esp_hdr) + esp->conf.ivlen, elen);
 		crypto_cipher_decrypt(esp->conf.tfm, sg, sg, elen);
-		if (unlikely(sg != sgbuf))
+		if (unlikely(sg != &esp->sgbuf[0]))
 			kfree(sg);
 
 		if (skb_copy_bits(skb, skb->len-alen-2, nexthdr, 2))
--- diff/net/ipv6/icmp.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/icmp.c	2004-07-01 21:32:53.000000000 +0100
@@ -55,7 +55,7 @@
 #include <net/sock.h>
 
 #include <net/ipv6.h>
-#include <net/checksum.h>
+#include <net/ip6_checksum.h>
 #include <net/protocol.h>
 #include <net/raw.h>
 #include <net/rawv6.h>
--- diff/net/ipv6/ip6_output.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/ip6_output.c	2004-07-01 21:32:53.000000000 +0100
@@ -607,13 +607,11 @@
 				frag->nh.ipv6h->payload_len = htons(frag->len - sizeof(struct ipv6hdr));
 				ip6_copy_metadata(frag, skb);
 			}
-			err = output(pskb);
-			if (err || !frag) {
-				if (unlikely(skb != *pskb))
-					skb = *pskb;
-				break;
-			}
 			
+			err = output(&skb);
+			if (err || !frag)
+				break;
+
 			skb = frag;
 			frag = skb->next;
 			skb->next = NULL;
@@ -854,8 +852,8 @@
 		np->cork.hop_limit = hlimit;
 		inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst);
 		inet->cork.length = 0;
-		inet->sndmsg_page = NULL;
-		inet->sndmsg_off = 0;
+		sk->sk_sndmsg_page = NULL;
+		sk->sk_sndmsg_off = 0;
 		exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0);
 		length += exthdrlen;
 		transhdrlen += exthdrlen;
@@ -971,8 +969,8 @@
 		} else {
 			int i = skb_shinfo(skb)->nr_frags;
 			skb_frag_t *frag = &skb_shinfo(skb)->frags[i-1];
-			struct page *page = inet->sndmsg_page;
-			int off = inet->sndmsg_off;
+			struct page *page = sk->sk_sndmsg_page;
+			int off = sk->sk_sndmsg_off;
 			unsigned int left;
 
 			if (page && (left = PAGE_SIZE - off) > 0) {
@@ -984,7 +982,7 @@
 						goto error;
 					}
 					get_page(page);
-					skb_fill_page_desc(skb, i, page, inet->sndmsg_off, 0);
+					skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
 					frag = &skb_shinfo(skb)->frags[i];
 				}
 			} else if(i < MAX_SKB_FRAGS) {
@@ -995,8 +993,8 @@
 					err = -ENOMEM;
 					goto error;
 				}
-				inet->sndmsg_page = page;
-				inet->sndmsg_off = 0;
+				sk->sk_sndmsg_page = page;
+				sk->sk_sndmsg_off = 0;
 
 				skb_fill_page_desc(skb, i, page, 0, 0);
 				frag = &skb_shinfo(skb)->frags[i];
@@ -1010,7 +1008,7 @@
 				err = -EFAULT;
 				goto error;
 			}
-			inet->sndmsg_off += copy;
+			sk->sk_sndmsg_off += copy;
 			frag->size += copy;
 			skb->len += copy;
 			skb->data_len += copy;
--- diff/net/ipv6/ip6_tunnel.c	2004-05-19 22:13:15.000000000 +0100
+++ source/net/ipv6/ip6_tunnel.c	2004-07-01 21:32:53.000000000 +0100
@@ -123,7 +123,7 @@
  *   else %NULL
  **/
 
-struct ip6_tnl *
+static struct ip6_tnl *
 ip6ip6_tnl_lookup(struct in6_addr *remote, struct in6_addr *local)
 {
 	unsigned h0 = HASH(remote);
@@ -387,8 +387,9 @@
  *   to the specifications in RFC 2473.
  **/
 
-void ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
-		   int type, int code, int offset, __u32 info)
+static void 
+ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
+	   int type, int code, int offset, __u32 info)
 {
 	struct ipv6hdr *ipv6h = (struct ipv6hdr *) skb->data;
 	struct ip6_tnl *t;
@@ -496,7 +497,8 @@
  * Return: 0
  **/
 
-int ip6ip6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
+static int 
+ip6ip6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
 {
 	struct sk_buff *skb = *pskb;
 	struct ipv6hdr *ipv6h;
@@ -510,6 +512,11 @@
 	read_lock(&ip6ip6_lock);
 
 	if ((t = ip6ip6_tnl_lookup(&ipv6h->saddr, &ipv6h->daddr)) != NULL) {
+		if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
+			kfree_skb(skb);
+			return 0;
+		}
+
 		if (!(t->parms.flags & IP6_TNL_F_CAP_RCV)) {
 			t->stat.rx_dropped++;
 			read_unlock(&ip6ip6_lock);
@@ -533,8 +540,7 @@
 	read_unlock(&ip6ip6_lock);
 	icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, skb->dev);
 discard:
-	kfree_skb(skb);
-	return 0;
+	return 1;
 }
 
 static inline struct ipv6_txoptions *create_tel(__u8 encap_limit)
@@ -598,7 +604,8 @@
  *   0
  **/
 
-int ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
+static int 
+ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ip6_tnl *t = (struct ip6_tnl *) dev->priv;
 	struct net_device_stats *stats = &t->stat;
@@ -715,13 +722,7 @@
 	ipv6h->nexthdr = proto;
 	ipv6_addr_copy(&ipv6h->saddr, &fl.fl6_src);
 	ipv6_addr_copy(&ipv6h->daddr, &fl.fl6_dst);
-#ifdef CONFIG_NETFILTER
-	nf_conntrack_put(skb->nfct);
-	skb->nfct = NULL;
-#ifdef CONFIG_NETFILTER_DEBUG
-	skb->nf_debug = 0;
-#endif
-#endif
+	nf_reset(skb);
 	pkt_len = skb->len;
 	err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, 
 		      skb->dst->dev, dst_output);
@@ -1079,7 +1080,8 @@
  * Return: 0
  **/
 
-int ip6ip6_fb_tnl_dev_init(struct net_device *dev)
+static int 
+ip6ip6_fb_tnl_dev_init(struct net_device *dev)
 {
 	struct ip6_tnl *t = dev->priv;
 	ip6ip6_tnl_dev_init_gen(dev);
@@ -1088,10 +1090,9 @@
 	return 0;
 }
 
-static struct inet6_protocol ip6ip6_protocol = {
+static struct xfrm6_tunnel ip6ip6_handler = {
 	.handler = ip6ip6_rcv,
 	.err_handler = ip6ip6_err,
-	.flags = INET6_PROTO_FINAL
 };
 
 /**
@@ -1104,9 +1105,9 @@
 {
 	int  err;
 
-	if ((err = inet6_add_protocol(&ip6ip6_protocol, IPPROTO_IPV6)) < 0) {
-		printk(KERN_ERR "Failed to register IPv6 protocol\n");
-		return err;
+	if (xfrm6_tunnel_register(&ip6ip6_handler) < 0) {
+		printk(KERN_ERR "ip6ip6 init: can't register tunnel\n");
+		return -EAGAIN;
 	}
 	ip6ip6_fb_tnl_dev = alloc_netdev(sizeof(struct ip6_tnl), "ip6tnl0",
 					 ip6ip6_tnl_dev_setup);
@@ -1123,7 +1124,7 @@
 	}
 	return 0;
 fail:
-	inet6_del_protocol(&ip6ip6_protocol, IPPROTO_IPV6);
+	xfrm6_tunnel_deregister(&ip6ip6_handler);
 	return err;
 }
 
@@ -1133,8 +1134,10 @@
 
 static void __exit ip6_tunnel_cleanup(void)
 {
+	if (xfrm6_tunnel_deregister(&ip6ip6_handler) < 0)
+		printk(KERN_INFO "ip6ip6 close: can't deregister tunnel\n");
+
 	unregister_netdev(ip6ip6_fb_tnl_dev);
-	inet6_del_protocol(&ip6ip6_protocol, IPPROTO_IPV6);
 }
 
 module_init(ip6_tunnel_init);
--- diff/net/ipv6/ipcomp6.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/ipcomp6.c	2004-07-01 21:32:53.000000000 +0100
@@ -140,11 +140,15 @@
 
 	spin_lock_bh(&x->lock);
 
-	err = xfrm_check_output(x, *pskb, AF_INET6);
+	err = xfrm_state_check(x, *pskb);
 	if (err)
 		goto error;
 
 	if (x->props.mode) {
+		err = xfrm6_tunnel_check_size(*pskb);
+		if (err)
+			goto error;
+
 		hdr_len = sizeof(struct ipv6hdr);
 		nexthdr = IPPROTO_IPV6;
 		iph = (*pskb)->nh.ipv6h;
@@ -258,6 +262,66 @@
 	xfrm_state_put(x);
 }
 
+static struct xfrm_state *ipcomp6_tunnel_create(struct xfrm_state *x)
+{
+	struct xfrm_state *t = NULL;
+
+	t = xfrm_state_alloc();
+	if (!t)
+		goto out;
+
+	t->id.proto = IPPROTO_IPV6;
+	t->id.spi = xfrm6_tunnel_alloc_spi((xfrm_address_t *)&x->props.saddr);
+	memcpy(t->id.daddr.a6, x->id.daddr.a6, sizeof(struct in6_addr));
+	memcpy(&t->sel, &x->sel, sizeof(t->sel));
+	t->props.family = AF_INET6;
+	t->props.mode = 1;
+	memcpy(t->props.saddr.a6, x->props.saddr.a6, sizeof(struct in6_addr));
+
+	t->type = xfrm_get_type(IPPROTO_IPV6, t->props.family);
+	if (t->type == NULL)
+		goto error;
+
+	if (t->type->init_state(t, NULL))
+		goto error;
+
+	t->km.state = XFRM_STATE_VALID;
+	atomic_set(&t->tunnel_users, 1);
+
+out:
+	return t;
+
+error:
+	xfrm_state_put(t);
+	goto out;
+}
+
+static int ipcomp6_tunnel_attach(struct xfrm_state *x)
+{
+	int err = 0;
+	struct xfrm_state *t = NULL;
+	u32 spi;
+
+	spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&x->props.saddr);
+	if (spi)
+		t = xfrm_state_lookup((xfrm_address_t *)&x->id.daddr,
+					      spi, IPPROTO_IPV6, AF_INET6);
+	if (!t) {
+		t = ipcomp6_tunnel_create(x);
+		if (!t) {
+			err = -EINVAL;
+			goto out;
+		}
+		xfrm_state_insert(t);
+		xfrm_state_hold(t);
+	}
+	x->tunnel = t;
+	atomic_inc(&t->tunnel_users);
+
+out:
+	return err;
+}
+
 static void ipcomp6_free_data(struct ipcomp_data *ipcd)
 {
 	if (ipcd->tfm)
@@ -271,8 +335,11 @@
 	struct ipcomp_data *ipcd = x->data;
 	if (!ipcd)
 		return;
+	xfrm_state_delete_tunnel(x);
 	ipcomp6_free_data(ipcd);
 	kfree(ipcd);
+
+	xfrm6_tunnel_free_spi((xfrm_address_t *)&x->props.saddr);
 }
 
 static int ipcomp6_init_state(struct xfrm_state *x, void *args)
@@ -303,6 +370,12 @@
 	if (!ipcd->tfm)
 		goto error;
 
+	if (x->props.mode) {
+		err = ipcomp6_tunnel_attach(x);
+		if (err)
+			goto error;
+	}
+
 	calg_desc = xfrm_calg_get_byname(x->calg->alg_name);
 	BUG_ON(!calg_desc);
 	ipcd->threshold = calg_desc->uinfo.comp.threshold;
--- diff/net/ipv6/mcast.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/mcast.c	2004-07-01 21:32:53.000000000 +0100
@@ -60,7 +60,7 @@
 #include <net/addrconf.h>
 #include <net/ip6_route.h>
 
-#include <net/checksum.h>
+#include <net/ip6_checksum.h>
 
 /* Set to 3 to get tracing... */
 #define MCAST_DEBUG 2
@@ -365,7 +365,7 @@
 	err = -EADDRNOTAVAIL;
 
 	for (pmc=inet6->ipv6_mc_list; pmc; pmc=pmc->next) {
-		if (pmc->ifindex != pgsr->gsr_interface)
+		if (pgsr->gsr_interface && pmc->ifindex != pgsr->gsr_interface)
 			continue;
 		if (ipv6_addr_cmp(&pmc->addr, group) == 0)
 			break;
--- diff/net/ipv6/ndisc.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/ndisc.c	2004-07-01 21:32:53.000000000 +0100
@@ -77,7 +77,7 @@
 #include <net/icmp.h>
 
 #include <net/flow.h>
-#include <net/checksum.h>
+#include <net/ip6_checksum.h>
 #include <linux/proc_fs.h>
 
 #include <linux/netfilter.h>
--- diff/net/ipv6/netfilter/ip6_tables.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/netfilter/ip6_tables.c	2004-07-01 21:32:53.000000000 +0100
@@ -1845,6 +1845,15 @@
 	return 0;
 }
 
+static inline int print_target(const struct ip6t_target *t,
+                               off_t start_offset, char *buffer, int length,
+                               off_t *pos, unsigned int *count)
+{
+	if (t == &ip6t_standard_target || t == &ip6t_error_target)
+		return 0;
+	return print_name((char *)t, start_offset, buffer, length, pos, count);
+}
+
 static int ip6t_get_tables(char *buffer, char **start, off_t offset, int length)
 {
 	off_t pos = 0;
@@ -1871,7 +1880,7 @@
 	if (down_interruptible(&ip6t_mutex) != 0)
 		return 0;
 
-	LIST_FIND(&ip6t_target, print_name, char *,
+	LIST_FIND(&ip6t_target, print_target, struct ip6t_target *,
 		  offset, buffer, length, &pos, &count);
 
 	up(&ip6t_mutex);
--- diff/net/ipv6/netfilter/ip6t_owner.c	2004-05-19 22:13:15.000000000 +0100
+++ source/net/ipv6/netfilter/ip6t_owner.c	2004-07-01 21:32:53.000000000 +0100
@@ -143,7 +143,14 @@
 
 	if (matchsize != IP6T_ALIGN(sizeof(struct ip6t_owner_info)))
 		return 0;
-
+#ifdef CONFIG_SMP
+	/* files->file_lock can not be used in a BH */
+	if (((struct ip6t_owner_info *)matchinfo)->match
+	    & (IP6T_OWNER_PID|IP6T_OWNER_SID)) {
+		printk("ip6t_owner: pid and sid matching is broken on SMP.\n");
+		return 0;
+	}
+#endif
 	return 1;
 }
 
--- diff/net/ipv6/raw.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/raw.c	2004-07-01 21:32:53.000000000 +0100
@@ -35,6 +35,7 @@
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
 
+#include <net/ip.h>
 #include <net/sock.h>
 #include <net/snmp.h>
 
@@ -42,6 +43,7 @@
 #include <net/ndisc.h>
 #include <net/protocol.h>
 #include <net/ip6_route.h>
+#include <net/ip6_checksum.h>
 #include <net/addrconf.h>
 #include <net/transp_v6.h>
 #include <net/udp.h>
@@ -898,7 +900,7 @@
 	if (inet_sk(sk)->num == IPPROTO_RAW)
 		ip6_ra_control(sk, -1, NULL);
 
-	inet_sock_release(sk);
+	sk_common_release(sk);
 }
 
 static int rawv6_init_sk(struct sock *sk)
--- diff/net/ipv6/sit.c	2004-05-19 22:13:15.000000000 +0100
+++ source/net/ipv6/sit.c	2004-07-01 21:32:53.000000000 +0100
@@ -388,13 +388,7 @@
 		skb->dev = tunnel->dev;
 		dst_release(skb->dst);
 		skb->dst = NULL;
-#ifdef CONFIG_NETFILTER
-		nf_conntrack_put(skb->nfct);
-		skb->nfct = NULL;
-#ifdef CONFIG_NETFILTER_DEBUG
-		skb->nf_debug = 0;
-#endif
-#endif
+		nf_reset(skb);
 		ipip6_ecn_decapsulate(iph, skb);
 		netif_rx(skb);
 		read_unlock(&ipip6_lock);
@@ -580,13 +574,7 @@
 	if ((iph->ttl = tiph->ttl) == 0)
 		iph->ttl	=	iph6->hop_limit;
 
-#ifdef CONFIG_NETFILTER
-	nf_conntrack_put(skb->nfct);
-	skb->nfct = NULL;
-#ifdef CONFIG_NETFILTER_DEBUG
-	skb->nf_debug = 0;
-#endif
-#endif
+	nf_reset(skb);
 
 	IPTUNNEL_XMIT();
 	tunnel->recursion--;
@@ -800,7 +788,7 @@
 	return 0;
 }
 
-static struct inet_protocol sit_protocol = {
+static struct net_protocol sit_protocol = {
 	.handler	=	ipip6_rcv,
 	.err_handler	=	ipip6_err,
 };
--- diff/net/ipv6/tcp_ipv6.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/tcp_ipv6.c	2004-07-01 21:32:53.000000000 +0100
@@ -51,6 +51,7 @@
 #include <net/transp_v6.h>
 #include <net/addrconf.h>
 #include <net/ip6_route.h>
+#include <net/ip6_checksum.h>
 #include <net/inet_ecn.h>
 #include <net/protocol.h>
 #include <net/xfrm.h>
@@ -1878,7 +1879,7 @@
 
 	tp->af_specific = &ipv6_specific;
 
-	sk->sk_write_space = tcp_write_space;
+	sk->sk_write_space = sk_stream_write_space;
 	sk->sk_use_write_queue = 1;
 
 	sk->sk_sndbuf = sysctl_tcp_wmem[1];
@@ -1891,30 +1892,9 @@
 
 static int tcp_v6_destroy_sock(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
-	struct inet_opt *inet = inet_sk(sk);
-
-	tcp_clear_xmit_timers(sk);
-
-	/* Cleanup up the write buffer. */
-  	tcp_writequeue_purge(sk);
-
-	/* Cleans up our, hopefully empty, out_of_order_queue. */
-  	__skb_queue_purge(&tp->out_of_order_queue);
-
-	/* Clean prequeue, it must be empty really */
-	__skb_queue_purge(&tp->ucopy.prequeue);
-
-	/* Clean up a referenced TCP bind bucket. */
-	if (tcp_sk(sk)->bind_hash)
-		tcp_put_port(sk);
-
-	/* If sendmsg cached page exists, toss it. */
-	if (inet->sndmsg_page != NULL)
-		__free_page(inet->sndmsg_page);
-
-	atomic_dec(&tcp_sockets_allocated);
+	extern int tcp_v4_destroy_sock(struct sock *sk);
 
+	tcp_v4_destroy_sock(sk);
 	return inet6_destroy_sock(sk);
 }
 
@@ -2082,23 +2062,31 @@
 #endif
 
 struct proto tcpv6_prot = {
-	.name		=	"TCPv6",
-	.close		=	tcp_close,
-	.connect	=	tcp_v6_connect,
-	.disconnect	=	tcp_disconnect,
-	.accept		=	tcp_accept,
-	.ioctl		=	tcp_ioctl,
-	.init		=	tcp_v6_init_sock,
-	.destroy	=	tcp_v6_destroy_sock,
-	.shutdown	=	tcp_shutdown,
-	.setsockopt	=	tcp_setsockopt,
-	.getsockopt	=	tcp_getsockopt,
-	.sendmsg	=	tcp_sendmsg,
-	.recvmsg	=	tcp_recvmsg,
-	.backlog_rcv	=	tcp_v6_do_rcv,
-	.hash		=	tcp_v6_hash,
-	.unhash		=	tcp_unhash,
-	.get_port	=	tcp_v6_get_port,
+	.name			= "TCPv6",
+	.close			= tcp_close,
+	.connect		= tcp_v6_connect,
+	.disconnect		= tcp_disconnect,
+	.accept			= tcp_accept,
+	.ioctl			= tcp_ioctl,
+	.init			= tcp_v6_init_sock,
+	.destroy		= tcp_v6_destroy_sock,
+	.shutdown		= tcp_shutdown,
+	.setsockopt		= tcp_setsockopt,
+	.getsockopt		= tcp_getsockopt,
+	.sendmsg		= tcp_sendmsg,
+	.recvmsg		= tcp_recvmsg,
+	.backlog_rcv		= tcp_v6_do_rcv,
+	.hash			= tcp_v6_hash,
+	.unhash			= tcp_unhash,
+	.get_port		= tcp_v6_get_port,
+	.enter_memory_pressure	= tcp_enter_memory_pressure,
+	.sockets_allocated	= &tcp_sockets_allocated,
+	.memory_allocated	= &tcp_memory_allocated,
+	.memory_pressure	= &tcp_memory_pressure,
+	.sysctl_mem		= sysctl_tcp_mem,
+	.sysctl_wmem		= sysctl_tcp_wmem,
+	.sysctl_rmem		= sysctl_tcp_rmem,
+	.max_header		= MAX_TCP_HEADER,
 };
 
 static struct inet6_protocol tcpv6_protocol = {
--- diff/net/ipv6/udp.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/udp.c	2004-07-01 21:32:53.000000000 +0100
@@ -51,7 +51,7 @@
 #include <net/udp.h>
 #include <net/inet_common.h>
 
-#include <net/checksum.h>
+#include <net/ip6_checksum.h>
 #include <net/xfrm.h>
 
 #include <linux/proc_fs.h>
@@ -358,7 +358,7 @@
 
 static void udpv6_close(struct sock *sk, long timeout)
 {
-	inet_sock_release(sk);
+	sk_common_release(sk);
 }
 
 /*
@@ -507,7 +507,7 @@
 		return -1;
 	}
 
-	if (sk->sk_filter && skb->ip_summed != CHECKSUM_UNNECESSARY) {
+	if (skb->ip_summed != CHECKSUM_UNNECESSARY) {
 		if ((unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum))) {
 			UDP6_INC_STATS_BH(UdpInErrors);
 			kfree_skb(skb);
@@ -1044,7 +1044,14 @@
 		break;
 		
 	case UDP_ENCAP:
-		up->encap_type = val;
+		switch (val) {
+		case 0:
+			up->encap_type = val;
+			break;
+		default:
+			err = -ENOPROTOOPT;
+			break;
+		}
 		break;
 
 	default:
--- diff/net/ipv6/xfrm6_policy.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/ipv6/xfrm6_policy.c	2004-07-01 21:32:53.000000000 +0100
@@ -277,10 +277,12 @@
 {
 	xfrm6_policy_init();
 	xfrm6_state_init();
+	xfrm6_tunnel_init();
 }
 
 void __exit xfrm6_fini(void)
 {
+	xfrm6_tunnel_fini();
 	//xfrm6_input_fini();
 	xfrm6_policy_fini();
 	xfrm6_state_fini();
--- diff/net/irda/Kconfig	2004-05-19 22:13:15.000000000 +0100
+++ source/net/irda/Kconfig	2004-07-01 21:32:53.000000000 +0100
@@ -5,6 +5,7 @@
 menuconfig IRDA
 	depends on NET
 	tristate "IrDA (infrared) subsystem support"
+	select CRC16
 	---help---
 	  Say Y here if you want to build support for the IrDA (TM) protocols.
 	  The Infrared Data Associations (tm) specifies standards for wireless
--- diff/net/irda/Makefile	2004-05-19 22:13:15.000000000 +0100
+++ source/net/irda/Makefile	2004-07-01 21:32:53.000000000 +0100
@@ -9,7 +9,7 @@
 
 irda-y := iriap.o iriap_event.o irlmp.o irlmp_event.o irlmp_frame.o \
           irlap.o irlap_event.o irlap_frame.o timer.o qos.o irqueue.o \
-          irttp.o irda_device.o irias_object.o crc.o wrapper.o af_irda.o \
+          irttp.o irda_device.o irias_object.o wrapper.o af_irda.o \
 	  discovery.o parameters.o irmod.o
 irda-$(CONFIG_PROC_FS) += irproc.o
 irda-$(CONFIG_SYSCTL) += irsysctl.o
--- diff/net/irda/irda_device.c	2004-05-19 22:13:15.000000000 +0100
+++ source/net/irda/irda_device.c	2004-07-01 21:32:53.000000000 +0100
@@ -536,7 +536,7 @@
  *    Setup the DMA channel. Commonly used by ISA FIR drivers
  *
  */
-void irda_setup_dma(int channel, char *buffer, int count, int mode)
+void irda_setup_dma(int channel, dma_addr_t buffer, int count, int mode)
 {
 	unsigned long flags;
 
@@ -545,7 +545,7 @@
 	disable_dma(channel);
 	clear_dma_ff(channel);
 	set_dma_mode(channel, mode);
-	set_dma_addr(channel, isa_virt_to_bus(buffer));
+	set_dma_addr(channel, buffer);
 	set_dma_count(channel, count);
 	enable_dma(channel);
 
--- diff/net/key/af_key.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/key/af_key.c	2004-07-01 21:32:53.000000000 +0100
@@ -1075,6 +1075,15 @@
 		n_type = ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1];
 		natt->encap_type = n_type->sadb_x_nat_t_type_type;
 
+		switch (natt->encap_type) {
+		case UDP_ENCAP_ESPINUDP:
+		case UDP_ENCAP_ESPINUDP_NON_IKE:
+			break;
+		default:
+			err = -ENOPROTOOPT;
+			goto out;
+		}
+
 		if (ext_hdrs[SADB_X_EXT_NAT_T_SPORT-1]) {
 			struct sadb_x_nat_t_port* n_port =
 				ext_hdrs[SADB_X_EXT_NAT_T_SPORT-1];
--- diff/net/netlink/af_netlink.c	2004-06-30 14:26:03.000000000 +0100
+++ source/net/netlink/af_netlink.c	2004-07-01 21:32:53.000000000 +0100
@@ -728,14 +728,14 @@
 	   to corresponding kernel module.   --ANK (980802)
 	 */
 
-	err = security_netlink_send(skb);
-	if (err) {
+	err = -EFAULT;
+	if (memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len)) {
 		kfree_skb(skb);
 		goto out;
 	}
 
-	err = -EFAULT;
-	if (memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len)) {
+	err = security_netlink_send(sk, skb);
+	if (err) {
 		kfree_skb(skb);
 		goto out;
 	}
--- diff/net/sched/Kconfig	2004-05-19 22:13:16.000000000 +0100
+++ source/net/sched/Kconfig	2004-07-01 21:32:53.000000000 +0100
@@ -177,7 +177,7 @@
 
 config NET_SCH_INGRESS
 	tristate "Ingress Qdisc"
-	depends on NET_SCHED && NETFILTER
+	depends on NET_SCHED 
 	help
 	  If you say Y here, you will be able to police incoming bandwidth
 	  and drop packets when this bandwidth exceeds your desired rate.
@@ -242,6 +242,7 @@
 config NET_CLS_ROUTE4
 	tristate "Routing table based classifier"
 	depends on NET_CLS
+	select NET_CLS_ROUTE
 	help
 	  If you say Y here, you will be able to classify outgoing packets
 	  according to the route table entry they matched. If unsure, say Y.
@@ -251,8 +252,7 @@
 
 config NET_CLS_ROUTE
 	bool
-	depends on NET_CLS_ROUTE4
-	default y
+	default n
 
 config NET_CLS_FW
 	tristate "Firewall based classifier"
@@ -274,6 +274,24 @@
 	  To compile this code as a module, choose M here: the
 	  module will be called cls_u32.
 
+config CLS_U32_PERF
+	bool "     U32 classifier performance counters"
+	depends on NET_CLS_U32
+	help
+	  gathers stats that could be used to tune u32 classifier performance.
+	  Requires a new iproute2
+	  You MUST NOT turn this on if you dont have an update iproute2.
+
+config NET_CLS_IND
+	bool "classify input device (slows things u32/fw) "
+	depends on NET_CLS_U32 || NET_CLS_FW
+	help
+	  This option will be killed eventually when a 
+          metadata action appears because it slows things a little
+          Available only for u32 and fw classifiers.
+	  Requires a new iproute2
+	  You MUST NOT turn this on if you dont have an update iproute2.
+
 config NET_CLS_RSVP
 	tristate "Special RSVP classifier"
 	depends on NET_CLS && NET_QOS
@@ -303,9 +321,26 @@
 	  To compile this code as a module, choose M here: the
 	  module will be called cls_rsvp6.
 
+config NET_CLS_ACT
+	bool '  Packet ACTION ' 
+	depends on EXPERIMENTAL && NET_CLS && NET_QOS
+	---help---
+	This option requires you have a new iproute2. It enables
+	tc extensions which can be used with tc classifiers.
+	Only the u32 and fw classifiers are supported at the moment.
+	  You MUST NOT turn this on if you dont have an update iproute2.
+
+config NET_ACT_POLICE
+	tristate '      Policing Actions' 
+        depends on NET_CLS_ACT 
+        ---help---
+        If you are using a newer iproute2 select this one, otherwise use one
+	below to select a policer.
+	  You MUST NOT turn this on if you dont have an update iproute2.
+
 config NET_CLS_POLICE
 	bool "Traffic policing (needed for in/egress)"
-	depends on NET_CLS && NET_QOS
+	depends on NET_CLS && NET_QOS && NET_ACT_POLICE!=y && NET_ACT_POLICE!=m
 	help
 	  Say Y to support traffic policing (bandwidth limits).  Needed for
 	  ingress and egress rate limiting.
--- diff/net/sched/Makefile	2004-05-19 22:13:16.000000000 +0100
+++ source/net/sched/Makefile	2004-07-01 21:32:53.000000000 +0100
@@ -7,7 +7,9 @@
 obj-$(CONFIG_NET_SCHED)		+= sch_api.o sch_fifo.o
 obj-$(CONFIG_NET_ESTIMATOR)	+= estimator.o
 obj-$(CONFIG_NET_CLS)		+= cls_api.o
-obj-$(CONFIG_NET_CLS_POLICE)	+= police.o
+obj-$(CONFIG_NET_CLS_ACT)       += act_api.o
+obj-$(CONFIG_NET_ACT_POLICE)    += police.o
+obj-$(CONFIG_NET_CLS_POLICE)    += police.o
 obj-$(CONFIG_NET_SCH_CBQ)	+= sch_cbq.o
 obj-$(CONFIG_NET_SCH_HTB)	+= sch_htb.o
 obj-$(CONFIG_NET_SCH_CSZ)	+= sch_csz.o
--- diff/net/sched/cls_api.c	2004-05-19 22:13:16.000000000 +0100
+++ source/net/sched/cls_api.c	2004-07-01 21:32:53.000000000 +0100
@@ -11,6 +11,7 @@
  * Changes:
  *
  * Eduardo J. Blanco <ejbs@netlabs.com.uy> :990222: kmod support
+ *
  */
 
 #include <asm/uaccess.h>
@@ -36,6 +37,12 @@
 #include <net/sock.h>
 #include <net/pkt_sched.h>
 
+#if 0 /* control */
+#define DPRINTK(format,args...) printk(KERN_DEBUG format,##args)
+#else
+#define DPRINTK(format,args...)
+#endif
+
 /* The list of all installed classifier types */
 
 static struct tcf_proto_ops *tcf_proto_base;
@@ -132,7 +139,7 @@
 	struct tcf_proto_ops *tp_ops;
 	struct Qdisc_class_ops *cops;
 	unsigned long cl = 0;
-	unsigned long fh;
+	unsigned long fh, fh_s;
 	int err;
 
 	if (prio == 0) {
@@ -238,7 +245,7 @@
 	} else if (tca[TCA_KIND-1] && rtattr_strcmp(tca[TCA_KIND-1], tp->ops->kind))
 		goto errout;
 
-	fh = tp->ops->get(tp, t->tcm_handle);
+	fh_s = fh = tp->ops->get(tp, t->tcm_handle);
 
 	if (fh == 0) {
 		if (n->nlmsg_type == RTM_DELTFILTER && t->tcm_handle == 0) {
@@ -247,6 +254,7 @@
 			*back = tp->next;
 			spin_unlock_bh(&dev->queue_lock);
 			write_unlock(&qdisc_tree_lock);
+			tfilter_notify(skb, n, tp, fh_s, RTM_DELTFILTER);
 			tcf_destroy(tp);
 			err = 0;
 			goto errout;
@@ -264,6 +272,8 @@
 			break;
 		case RTM_DELTFILTER:
 			err = tp->ops->delete(tp, fh);
+			if (err == 0)
+				tfilter_notify(skb, n, tp, fh_s, RTM_DELTFILTER);
 			goto errout;
 		case RTM_GETTFILTER:
 			err = tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER);
@@ -298,11 +308,14 @@
 	tcm->tcm_family = AF_UNSPEC;
 	tcm->tcm_ifindex = tp->q->dev->ifindex;
 	tcm->tcm_parent = tp->classid;
-	tcm->tcm_handle = 0;
 	tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);
 	RTA_PUT(skb, TCA_KIND, IFNAMSIZ, tp->ops->kind);
-	if (tp->ops->dump && tp->ops->dump(tp, fh, skb, tcm) < 0)
-		goto rtattr_failure;
+	tcm->tcm_handle = fh;
+	if (RTM_DELTFILTER != event) {
+		tcm->tcm_handle = 0;
+		if (tp->ops->dump && tp->ops->dump(tp, fh, skb, tcm) < 0)
+			goto rtattr_failure;
+	}
 	nlh->nlmsg_len = skb->tail - b;
 	return skb->len;
 
--- diff/net/sched/cls_fw.c	2004-05-19 22:13:16.000000000 +0100
+++ source/net/sched/cls_fw.c	2004-07-01 21:32:53.000000000 +0100
@@ -11,6 +11,11 @@
  * Changes:
  * Karlis Peisenieks <karlis@mt.lv> : 990415 : fw_walk off by one
  * Karlis Peisenieks <karlis@mt.lv> : 990415 : fw_delete killed all the filter (and kernel).
+ * Alex <alex@pilotsoft.com> : 2004xxyy: Added Action extension
+ *
+ * JHS: We should remove the CONFIG_NET_CLS_IND from here
+ * eventually when the meta match extension is made available
+ *
  */
 
 #include <linux/config.h>
@@ -50,9 +55,16 @@
 	struct fw_filter	*next;
 	u32			id;
 	struct tcf_result	res;
+#ifdef CONFIG_NET_CLS_ACT
+       struct tc_action        *action;
+#ifdef CONFIG_NET_CLS_IND
+       char			indev[IFNAMSIZ];
+#endif
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 	struct tcf_police	*police;
 #endif
+#endif
 };
 
 static __inline__ int fw_hash(u32 handle)
@@ -77,10 +89,29 @@
 	for (f=head->ht[fw_hash(id)]; f; f=f->next) {
 		if (f->id == id) {
 			*res = f->res;
+#ifdef CONFIG_NET_CLS_ACT
+#ifdef CONFIG_NET_CLS_IND
+			if (0 != f->indev[0]) {
+				if  (NULL == skb->input_dev) {
+					continue;
+				} else {
+					if (0 != strcmp(f->indev, skb->input_dev->name)) {
+						continue;
+					}
+				}
+			}
+#endif
+                               if (f->action) {
+                                       int pol_res = tcf_action_exec(skb, f->action);
+                                       if (pol_res >= 0)
+                                               return pol_res;
+                               } else
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 			if (f->police)
 				return tcf_police(skb, f->police);
 #endif
+#endif
 			return 0;
 		}
 	}
@@ -136,9 +167,16 @@
 
 			if ((cl = __cls_set_class(&f->res.class, 0)) != 0)
 				tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
+#ifdef CONFIG_NET_CLS_ACT
+       if (f->action) {
+               tcf_action_destroy(f->action,TCA_ACT_UNBIND);
+       }
+#else
 #ifdef CONFIG_NET_CLS_POLICE
-			tcf_police_release(f->police);
+			tcf_police_release(f->police,TCA_ACT_UNBIND);
+#endif
 #endif
+
 			kfree(f);
 		}
 	}
@@ -164,8 +202,14 @@
 
 			if ((cl = cls_set_class(tp, &f->res.class, 0)) != 0)
 				tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
+#ifdef CONFIG_NET_CLS_ACT
+       if (f->action) {
+               tcf_action_destroy(f->action,TCA_ACT_UNBIND);
+       }
+#else
 #ifdef CONFIG_NET_CLS_POLICE
-			tcf_police_release(f->police);
+			tcf_police_release(f->police,TCA_ACT_UNBIND);
+#endif
 #endif
 			kfree(f);
 			return 0;
@@ -185,6 +229,11 @@
 	struct rtattr *opt = tca[TCA_OPTIONS-1];
 	struct rtattr *tb[TCA_FW_MAX];
 	int err;
+#ifdef CONFIG_NET_CLS_ACT
+       struct tc_action *act = NULL;
+       int ret;
+#endif
+
 
 	if (!opt)
 		return handle ? -EINVAL : 0;
@@ -206,6 +255,58 @@
 			if (cl)
 				tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
 		}
+#ifdef CONFIG_NET_CLS_ACT
+		if (tb[TCA_FW_POLICE-1]) {
+			act = kmalloc(sizeof(*act),GFP_KERNEL);
+			if (NULL == act)
+				return -ENOMEM;
+
+			memset(act,0,sizeof(*act));
+			ret = tcf_action_init_1(tb[TCA_FW_POLICE-1], tca[TCA_RATE-1] ,act,"police",TCA_ACT_NOREPLACE,TCA_ACT_BIND);
+			if (0 > ret){
+				tcf_action_destroy(act,TCA_ACT_UNBIND);
+				return ret;
+			}
+			act->type = TCA_OLD_COMPAT;
+
+			sch_tree_lock(tp->q);
+			act = xchg(&f->action, act);
+			sch_tree_unlock(tp->q);
+
+			tcf_action_destroy(act,TCA_ACT_UNBIND);
+
+		}
+
+		if(tb[TCA_FW_ACT-1]) {
+			act = kmalloc(sizeof(*act),GFP_KERNEL);
+			if (NULL == act)
+				return -ENOMEM;
+			memset(act,0,sizeof(*act));
+			ret = tcf_action_init(tb[TCA_FW_ACT-1], tca[TCA_RATE-1],act,NULL, TCA_ACT_NOREPLACE,TCA_ACT_BIND);
+			if (0 > ret) {
+				tcf_action_destroy(act,TCA_ACT_UNBIND);
+				return ret;
+			}
+
+			sch_tree_lock(tp->q);
+			act = xchg(&f->action, act);
+			sch_tree_unlock(tp->q);
+
+			tcf_action_destroy(act,TCA_ACT_UNBIND);
+		}
+#ifdef CONFIG_NET_CLS_IND
+		if(tb[TCA_FW_INDEV-1]) {
+			struct rtattr *idev = tb[TCA_FW_INDEV-1];
+			if (RTA_PAYLOAD(idev) >= IFNAMSIZ) {
+				printk("cls_fw: bad indev name %s\n",(char*)RTA_DATA(idev));
+				err = -EINVAL;
+				goto errout;
+			}
+			memset(f->indev,0,IFNAMSIZ);
+			sprintf(f->indev, "%s", (char*)RTA_DATA(idev));
+		}
+#endif
+#else /* only POLICE defined */
 #ifdef CONFIG_NET_CLS_POLICE
 		if (tb[TCA_FW_POLICE-1]) {
 			struct tcf_police *police = tcf_police_locate(tb[TCA_FW_POLICE-1], tca[TCA_RATE-1]);
@@ -214,9 +315,10 @@
 			police = xchg(&f->police, police);
 			tcf_tree_unlock(tp);
 
-			tcf_police_release(police);
+			tcf_police_release(police,TCA_ACT_UNBIND);
 		}
 #endif
+#endif
 		return 0;
 	}
 
@@ -249,10 +351,37 @@
 		cls_set_class(tp, &f->res.class, tp->q->ops->cl_ops->bind_tcf(tp->q, base, f->res.classid));
 	}
 
+#ifdef CONFIG_NET_CLS_ACT
+	if(tb[TCA_FW_ACT-1]) {
+		act = kmalloc(sizeof(*act),GFP_KERNEL);
+		if (NULL == act)
+			return -ENOMEM;
+		memset(act,0,sizeof(*act));
+		ret = tcf_action_init(tb[TCA_FW_ACT-1], tca[TCA_RATE-1],act,NULL,TCA_ACT_NOREPLACE,TCA_ACT_BIND);
+		if (0 > ret) {
+			tcf_action_destroy(act,TCA_ACT_UNBIND);
+			return ret;
+		}
+		f->action= act;
+	}
+#ifdef CONFIG_NET_CLS_IND
+		if(tb[TCA_FW_INDEV-1]) {
+			struct rtattr *idev = tb[TCA_FW_INDEV-1];
+			if (RTA_PAYLOAD(idev) >= IFNAMSIZ) {
+				printk("cls_fw: bad indev name %s\n",(char*)RTA_DATA(idev));
+				err = -EINVAL;
+				goto errout;
+			}
+			memset(f->indev,0,IFNAMSIZ);
+			sprintf(f->indev, "%s", (char*)RTA_DATA(idev));
+		}
+#endif
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 	if (tb[TCA_FW_POLICE-1])
 		f->police = tcf_police_locate(tb[TCA_FW_POLICE-1], tca[TCA_RATE-1]);
 #endif
+#endif
 
 	f->next = head->ht[fw_hash(handle)];
 	tcf_tree_lock(tp);
@@ -309,9 +438,13 @@
 	t->tcm_handle = f->id;
 
        if (!f->res.classid
+#ifdef CONFIG_NET_CLS_ACT
+           && !f->action
+#else
 #ifdef CONFIG_NET_CLS_POLICE
            && !f->police
 #endif
+#endif
            )
 		return skb->len;
 
@@ -320,6 +453,36 @@
 
 	if (f->res.classid)
 		RTA_PUT(skb, TCA_FW_CLASSID, 4, &f->res.classid);
+#ifdef CONFIG_NET_CLS_ACT
+               /* again for backward compatible mode - we want
+               *  to work with both old and new modes of entering
+               *  tc data even if iproute2  was newer - jhs
+               */
+	if (f->action) {
+		struct rtattr * p_rta = (struct rtattr*)skb->tail;
+
+		if (f->action->type != TCA_OLD_COMPAT) {
+			RTA_PUT(skb, TCA_FW_ACT, 0, NULL);
+			if (tcf_action_dump(skb,f->action,0,0) < 0) {
+				goto rtattr_failure;
+			}
+		} else {
+			RTA_PUT(skb, TCA_FW_POLICE, 0, NULL);
+			if (tcf_action_dump_old(skb,f->action,0,0) < 0) {
+				goto rtattr_failure;
+			}
+		}
+
+		p_rta->rta_len = skb->tail - (u8*)p_rta;
+	}
+#ifdef CONFIG_NET_CLS_IND
+	if(strlen(f->indev)) {
+		struct rtattr * p_rta = (struct rtattr*)skb->tail;
+		RTA_PUT(skb, TCA_FW_INDEV, IFNAMSIZ, f->indev);
+		p_rta->rta_len = skb->tail - (u8*)p_rta;
+	}
+#endif
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 	if (f->police) {
 		struct rtattr * p_rta = (struct rtattr*)skb->tail;
@@ -332,14 +495,22 @@
 		p_rta->rta_len = skb->tail - (u8*)p_rta;
 	}
 #endif
+#endif
 
 	rta->rta_len = skb->tail - b;
+#ifdef CONFIG_NET_CLS_ACT
+       if (f->action && f->action->type == TCA_OLD_COMPAT) {
+               if (tcf_action_copy_stats(skb,f->action))
+                       goto rtattr_failure;
+       }
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 	if (f->police) {
 		if (qdisc_copy_stats(skb, &f->police->stats))
 			goto rtattr_failure;
 	}
 #endif
+#endif
 	return skb->len;
 
 rtattr_failure:
--- diff/net/sched/cls_route.c	2004-05-19 22:13:16.000000000 +0100
+++ source/net/sched/cls_route.c	2004-07-01 21:32:53.000000000 +0100
@@ -297,7 +297,7 @@
 					if ((cl = __cls_set_class(&f->res.class, 0)) != 0)
 						tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
 #ifdef CONFIG_NET_CLS_POLICE
-					tcf_police_release(f->police);
+					tcf_police_release(f->police,TCA_ACT_UNBIND);
 #endif
 					kfree(f);
 				}
@@ -336,7 +336,7 @@
 				tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
 
 #ifdef CONFIG_NET_CLS_POLICE
-			tcf_police_release(f->police);
+			tcf_police_release(f->police,TCA_ACT_UNBIND);
 #endif
 			kfree(f);
 
@@ -398,7 +398,7 @@
 			police = xchg(&f->police, police);
 			tcf_tree_unlock(tp);
 
-			tcf_police_release(police);
+			tcf_police_release(police,TCA_ACT_UNBIND);
 		}
 #endif
 		return 0;
--- diff/net/sched/cls_rsvp.h	2004-05-19 22:13:16.000000000 +0100
+++ source/net/sched/cls_rsvp.h	2004-07-01 21:32:53.000000000 +0100
@@ -278,7 +278,7 @@
 					if ((cl = __cls_set_class(&f->res.class, 0)) != 0)
 						tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
 #ifdef CONFIG_NET_CLS_POLICE
-					tcf_police_release(f->police);
+					tcf_police_release(f->police,TCA_ACT_UNBIND);
 #endif
 					kfree(f);
 				}
@@ -310,7 +310,7 @@
 				tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
 
 #ifdef CONFIG_NET_CLS_POLICE
-			tcf_police_release(f->police);
+			tcf_police_release(f->police,TCA_ACT_UNBIND);
 #endif
 
 			kfree(f);
@@ -452,7 +452,7 @@
 			police = xchg(&f->police, police);
 			tcf_tree_unlock(tp);
 
-			tcf_police_release(police);
+			tcf_police_release(police,TCA_ACT_UNBIND);
 		}
 #endif
 		return 0;
--- diff/net/sched/cls_tcindex.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/cls_tcindex.c	2004-07-01 21:32:53.000000000 +0100
@@ -190,7 +190,7 @@
 	if (cl)
 		tp->q->ops->cl_ops->unbind_tcf(tp->q,cl);
 #ifdef CONFIG_NET_CLS_POLICE
-	tcf_police_release(r->police);
+	tcf_police_release(r->police, TCA_ACT_UNBIND);
 #endif
 	if (f)
 		kfree(f);
@@ -333,7 +333,7 @@
 		tcf_tree_lock(tp);
 		police = xchg(&r->police,police);
 		tcf_tree_unlock(tp);
-		tcf_police_release(police);
+		tcf_police_release(police,TCA_ACT_UNBIND);
 	}
 #endif
 	if (r != &new_filter_result)
--- diff/net/sched/cls_u32.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/cls_u32.c	2004-07-01 21:32:53.000000000 +0100
@@ -23,6 +23,10 @@
  *	It is especially useful for link sharing combined with QoS;
  *	pure RSVP doesn't need such a general approach and can use
  *	much simpler (and faster) schemes, sort of cls_rsvp.c.
+ *
+ *	JHS: We should remove the CONFIG_NET_CLS_IND from here
+ *	eventually when the meta match extension is made available
+ *
  */
 
 #include <asm/uaccess.h>
@@ -58,9 +62,16 @@
 	struct tc_u_knode	*next;
 	u32			handle;
 	struct tc_u_hnode	*ht_up;
+#ifdef CONFIG_NET_CLS_ACT
+	struct tc_action	*action;
+#ifdef CONFIG_NET_CLS_IND
+	char                     indev[IFNAMSIZ];
+#endif
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 	struct tcf_police	*police;
 #endif
+#endif
 	struct tcf_result	res;
 	struct tc_u_hnode	*ht_down;
 	struct tc_u32_sel	sel;
@@ -90,10 +101,14 @@
 
 static __inline__ unsigned u32_hash_fold(u32 key, struct tc_u32_sel *sel)
 {
-	unsigned h = key & sel->hmask;
+#ifdef fix_u32_bug
+	unsigned h = (key & sel->hmask)>>sel->fshift;
+#else
+	unsigned h = (key & sel->hmask);
 
 	h ^= h>>16;
 	h ^= h>>8;
+#endif
 	return h;
 }
 
@@ -119,16 +134,54 @@
 	if (n) {
 		struct tc_u32_key *key = n->sel.keys;
 
+#ifdef CONFIG_CLS_U32_PERF
+		n->sel.rcnt +=1;
+#endif
 		for (i = n->sel.nkeys; i>0; i--, key++) {
+
 			if ((*(u32*)(ptr+key->off+(off2&key->offmask))^key->val)&key->mask) {
 				n = n->next;
 				goto next_knode;
 			}
+#ifdef CONFIG_CLS_U32_PERF
+			key->kcnt +=1;
+#endif
 		}
 		if (n->ht_down == NULL) {
 check_terminal:
 			if (n->sel.flags&TC_U32_TERMINAL) {
+
 				*res = n->res;
+#ifdef CONFIG_NET_CLS_ACT
+#ifdef CONFIG_NET_CLS_IND
+				/* yes, i know it sucks but the feature is 
+				** optional dammit! - JHS */
+				if (0 != n->indev[0]) {
+					if  (NULL == skb->input_dev) {
+						n = n->next;
+						goto next_knode;
+					} else {
+						if (0 != strcmp(n->indev, skb->input_dev->name)) {
+							n = n->next;
+							goto next_knode;
+						}
+					}
+				}
+#endif
+#ifdef CONFIG_CLS_U32_PERF
+		n->sel.rhit +=1;
+#endif
+				if (n->action) {
+					int pol_res = tcf_action_exec(skb, n->action);
+					if (skb->tc_classid > 0) {
+						res->classid = skb->tc_classid;
+						skb->tc_classid = 0;
+					}
+
+					if (pol_res >= 0)
+						return pol_res;
+				} else
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 				if (n->police) {
 					int pol_res = tcf_police(skb, n->police);
@@ -136,6 +189,7 @@
 						return pol_res;
 				} else
 #endif
+#endif
 					return 0;
 			}
 			n = n->next;
@@ -298,8 +352,14 @@
 
 	if ((cl = __cls_set_class(&n->res.class, 0)) != 0)
 		tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
+#ifdef CONFIG_NET_CLS_ACT
+	if (n->action) {
+		tcf_action_destroy(n->action, TCA_ACT_UNBIND);
+	}
+#else
 #ifdef CONFIG_NET_CLS_POLICE
-	tcf_police_release(n->police);
+	tcf_police_release(n->police, TCA_ACT_UNBIND);
+#endif
 #endif
 	if (n->ht_down)
 		n->ht_down->refcnt--;
@@ -438,6 +498,10 @@
 			 struct tc_u_knode *n, struct rtattr **tb,
 			 struct rtattr *est)
 {
+#ifdef CONFIG_NET_CLS_ACT
+	struct tc_action *act = NULL;
+	int ret;
+#endif
 	if (tb[TCA_U32_LINK-1]) {
 		u32 handle = *(u32*)RTA_DATA(tb[TCA_U32_LINK-1]);
 		struct tc_u_hnode *ht_down = NULL;
@@ -470,17 +534,73 @@
 		if (cl)
 			q->ops->cl_ops->unbind_tcf(q, cl);
 	}
+#ifdef CONFIG_NET_CLS_ACT
+	/*backward compatibility */
+	if (tb[TCA_U32_POLICE-1])
+	{
+		act = kmalloc(sizeof(*act),GFP_KERNEL);
+		if (NULL == act)
+			return -ENOMEM;
+
+		memset(act,0,sizeof(*act));
+		ret = tcf_action_init_1(tb[TCA_U32_POLICE-1], est,act,"police", TCA_ACT_NOREPLACE, TCA_ACT_BIND);
+		if (0 > ret){
+			tcf_action_destroy(act, TCA_ACT_UNBIND);
+			return ret;
+		}
+		act->type = TCA_OLD_COMPAT;
+
+		sch_tree_lock(q);
+		act = xchg(&n->action, act);
+		sch_tree_unlock(q);
+
+		tcf_action_destroy(act, TCA_ACT_UNBIND);
+
+	}
+
+	if(tb[TCA_U32_ACT-1]) {
+		act = kmalloc(sizeof(*act),GFP_KERNEL);
+		if (NULL == act)
+			return -ENOMEM;
+		memset(act,0,sizeof(*act));
+		ret = tcf_action_init(tb[TCA_U32_ACT-1], est,act,NULL,TCA_ACT_NOREPLACE, TCA_ACT_BIND);
+		if (0 > ret) {
+			tcf_action_destroy(act, TCA_ACT_UNBIND);
+			return ret;
+		}
+
+		sch_tree_lock(q);
+		act = xchg(&n->action, act);
+		sch_tree_unlock(q);
+
+		tcf_action_destroy(act, TCA_ACT_UNBIND);
+	}
+
+#ifdef CONFIG_NET_CLS_IND
+	n->indev[0] = 0;
+	if(tb[TCA_U32_INDEV-1]) {
+		struct rtattr *input_dev = tb[TCA_U32_INDEV-1];
+		if (RTA_PAYLOAD(input_dev) >= IFNAMSIZ) {
+			printk("cls_u32: bad indev name %s\n",(char*)RTA_DATA(input_dev));
+			/* should we clear state first? */
+			return  -EINVAL;
+		}
+		sprintf(n->indev, "%s", (char*)RTA_DATA(input_dev));
+	}
+#endif
+
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 	if (tb[TCA_U32_POLICE-1]) {
 		struct tcf_police *police = tcf_police_locate(tb[TCA_U32_POLICE-1], est);
-
 		sch_tree_lock(q);
 		police = xchg(&n->police, police);
 		sch_tree_unlock(q);
-
-		tcf_police_release(police);
+		tcf_police_release(police, TCA_ACT_UNBIND);
 	}
 #endif
+#endif
+
 	return 0;
 }
 
@@ -566,6 +686,14 @@
 		return -EINVAL;
 
 	s = RTA_DATA(tb[TCA_U32_SEL-1]);
+
+#ifdef CONFIG_CLS_U32_PERF
+	if (RTA_PAYLOAD(tb[TCA_U32_SEL-1]) < 
+		(s->nkeys*sizeof(struct tc_u32_key)) + sizeof(struct tc_u32_sel)) {
+			printk("Please upgrade your iproute2 tools or compile proper options in!\n");
+			return -EINVAL;
+}
+#endif
 	n = kmalloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL);
 	if (n == NULL)
 		return -ENOBUFS;
@@ -656,27 +784,69 @@
 			RTA_PUT(skb, TCA_U32_CLASSID, 4, &n->res.classid);
 		if (n->ht_down)
 			RTA_PUT(skb, TCA_U32_LINK, 4, &n->ht_down->handle);
+#ifdef CONFIG_CLS_U32_PERF2
+		n->sel.rcnt = n->sel.rhit = 0;
+#endif
+#ifdef CONFIG_NET_CLS_ACT
+		/* again for backward compatible mode - we want
+		*  to work with both old and new modes of entering
+		*  tc data even if iproute2  was newer - jhs 
+		*/
+		if (n->action) {
+			struct rtattr * p_rta = (struct rtattr*)skb->tail;
+
+			if (n->action->type != TCA_OLD_COMPAT) {
+				RTA_PUT(skb, TCA_U32_ACT, 0, NULL);
+				if (tcf_action_dump(skb,n->action, 0, 0) < 0) {
+					goto rtattr_failure;
+				}
+			} else {
+				RTA_PUT(skb, TCA_U32_POLICE, 0, NULL);
+				if (tcf_action_dump_old(skb,n->action,0,0) < 0) {
+					goto rtattr_failure;
+				}
+			}
+
+			p_rta->rta_len = skb->tail - (u8*)p_rta;
+		}
+#ifdef CONFIG_NET_CLS_IND
+		if(strlen(n->indev)) {
+			struct rtattr * p_rta = (struct rtattr*)skb->tail;
+			RTA_PUT(skb, TCA_U32_INDEV, IFNAMSIZ, n->indev);
+			p_rta->rta_len = skb->tail - (u8*)p_rta;
+		}
+#endif
+
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 		if (n->police) {
 			struct rtattr * p_rta = (struct rtattr*)skb->tail;
-
 			RTA_PUT(skb, TCA_U32_POLICE, 0, NULL);
-
+	 
 			if (tcf_police_dump(skb, n->police) < 0)
 				goto rtattr_failure;
 
 			p_rta->rta_len = skb->tail - (u8*)p_rta;
+
 		}
 #endif
+#endif
 	}
 
 	rta->rta_len = skb->tail - b;
+#ifdef CONFIG_NET_CLS_ACT
+	if (TC_U32_KEY(n->handle) && n->action && n->action->type == TCA_OLD_COMPAT) {
+		if (tcf_action_copy_stats(skb,n->action))
+			goto rtattr_failure;
+	}
+#else
 #ifdef CONFIG_NET_CLS_POLICE
 	if (TC_U32_KEY(n->handle) && n->police) {
-		if (qdisc_copy_stats(skb, &n->police->stats))
+		if (qdisc_copy_stats(skb,&n->police->stats))
 			goto rtattr_failure;
 	}
 #endif
+#endif
 	return skb->len;
 
 rtattr_failure:
--- diff/net/sched/police.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/police.c	2004-07-01 21:32:53.000000000 +0100
@@ -7,6 +7,7 @@
  *		2 of the License, or (at your option) any later version.
  *
  * Authors:	Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * 		J Hadi Salim (action changes)
  */
 
 #include <asm/uaccess.h>
@@ -26,6 +27,7 @@
 #include <linux/interrupt.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
+#include <linux/module.h>
 #include <linux/rtnetlink.h>
 #include <linux/init.h>
 #include <net/sock.h>
@@ -33,9 +35,13 @@
 
 #define L2T(p,L)   ((p)->R_tab->data[(L)>>(p)->R_tab->rate.cell_log])
 #define L2T_P(p,L) ((p)->P_tab->data[(L)>>(p)->P_tab->rate.cell_log])
+#define PRIV(a) ((struct tcf_police *) (a)->priv)
 
+/* use generic hash table */
+#define MY_TAB_SIZE     16
+#define MY_TAB_MASK     15
 static u32 idx_gen;
-static struct tcf_police *tcf_police_ht[16];
+static struct tcf_police *tcf_police_ht[MY_TAB_SIZE];
 /* Policer hash table lock */
 static rwlock_t police_lock = RW_LOCK_UNLOCKED;
 
@@ -59,6 +65,68 @@
 	return p;
 }
 
+#ifdef CONFIG_NET_CLS_ACT
+static __inline__ int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb, int type, struct tc_action *a)
+{
+	struct tcf_police *p;
+	int err =0, index =  -1,i= 0, s_i = 0, n_i = 0;
+	struct rtattr *r ;
+
+	read_lock(&police_lock);
+
+	s_i = cb->args[0];
+
+	for (i = 0; i < MY_TAB_SIZE; i++) {
+		p = tcf_police_ht[tcf_police_hash(i)];
+
+		for (; p; p = p->next) {
+			index++;
+			if (index < s_i)
+				continue;
+			a->priv = p;
+			a->order = index;
+			r = (struct rtattr*) skb->tail;
+			RTA_PUT(skb, a->order, 0, NULL);
+			if (type == RTM_DELACTION)
+				err = tcf_action_dump_1(skb, a, 0, 1);
+			else
+				err = tcf_action_dump_1(skb, a, 0, 0);
+			if (0 > err) {
+				index--;
+				skb_trim(skb, (u8*)r - skb->data);
+				goto done;
+			}
+			r->rta_len = skb->tail - (u8*)r;
+			n_i++;
+		}
+	}
+done:
+	read_unlock(&police_lock);
+	if (n_i)
+		cb->args[0] += n_i;
+	return n_i;
+
+rtattr_failure:
+	skb_trim(skb, (u8*)r - skb->data);
+	goto done;
+}
+
+static inline int
+tcf_hash_search(struct tc_action *a, u32 index)
+{
+	struct tcf_police *p = tcf_police_lookup(index);
+
+	if (p != NULL) {
+		a->priv = p;
+		return 1;
+	} else {
+		return 0;
+	}
+}
+
+
+#endif
+
 static __inline__ u32 tcf_police_new_index(void)
 {
 	do {
@@ -94,6 +162,269 @@
 	BUG_TRAP(0);
 }
 
+#ifdef CONFIG_NET_CLS_ACT
+int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,struct tc_action *a, int ovr, int bind)
+{
+	unsigned h;
+	int ret = 0;
+	struct rtattr *tb[TCA_POLICE_MAX];
+	struct tc_police *parm;
+	struct tcf_police *p;
+
+	if (NULL == a) {
+		if (net_ratelimit())
+			printk("BUG: tcf_police_locate called with NULL params\n");
+		return -1;  
+	}
+
+	if (rtattr_parse(tb, TCA_POLICE_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < 0)
+		return -1;
+
+	if (tb[TCA_POLICE_TBF-1] == NULL)
+		return -1;
+
+	parm = RTA_DATA(tb[TCA_POLICE_TBF-1]);
+
+	if (parm->index && (p = tcf_police_lookup(parm->index)) != NULL) {
+		a->priv = (void *)p;
+		spin_lock(&p->lock);
+		if (bind) {
+			p->bindcnt += 1;
+			p->refcnt += 1;
+		}
+		if (ovr) {
+			goto override;
+		}
+		spin_unlock(&p->lock);
+		return ret; 
+	}
+
+	p = kmalloc(sizeof(*p), GFP_KERNEL);
+	if (p == NULL)
+		return -1;
+
+	memset(p, 0, sizeof(*p));
+	ret = 1;
+	p->refcnt = 1;
+	spin_lock_init(&p->lock);
+	p->stats.lock = &p->lock;
+	if (bind)
+		p->bindcnt = 1;
+override:
+	if (parm->rate.rate) {
+		if ((p->R_tab = qdisc_get_rtab(&parm->rate, tb[TCA_POLICE_RATE-1])) == NULL) {
+			goto failure;
+		}
+		if (parm->peakrate.rate &&
+		    (p->P_tab = qdisc_get_rtab(&parm->peakrate, tb[TCA_POLICE_PEAKRATE-1])) == NULL) {
+			goto failure;
+		}
+	}
+	if (tb[TCA_POLICE_RESULT-1])
+		p->result = *(int*)RTA_DATA(tb[TCA_POLICE_RESULT-1]);
+#ifdef CONFIG_NET_ESTIMATOR
+	if (tb[TCA_POLICE_AVRATE-1])
+		p->ewma_rate = *(u32*)RTA_DATA(tb[TCA_POLICE_AVRATE-1]);
+#endif
+	p->toks = p->burst = parm->burst;
+	p->mtu = parm->mtu;
+	if (p->mtu == 0) {
+		p->mtu = ~0;
+		if (p->R_tab)
+			p->mtu = 255<<p->R_tab->rate.cell_log;
+	}
+	if (p->P_tab)
+		p->ptoks = L2T_P(p, p->mtu);
+	p->action = parm->action;
+
+	if (ovr) {
+		spin_unlock(&p->lock);
+		return ret;
+	}
+	PSCHED_GET_TIME(p->t_c);
+	p->index = parm->index ? : tcf_police_new_index();
+#ifdef CONFIG_NET_ESTIMATOR
+	if (est)
+		qdisc_new_estimator(&p->stats, est);
+#endif
+	h = tcf_police_hash(p->index);
+	write_lock_bh(&police_lock);
+	p->next = tcf_police_ht[h];
+	tcf_police_ht[h] = p;
+	write_unlock_bh(&police_lock);
+
+	a->priv = (void *)p;
+	return ret;  
+
+failure:
+	if (p->R_tab)
+		qdisc_put_rtab(p->R_tab);
+	if (ovr)
+		spin_unlock(&p->lock);
+	kfree(p);
+	return -1;
+}
+
+int tcf_act_police_cleanup(struct tc_action *a, int bind)
+{
+	struct tcf_police *p;
+	p = PRIV(a);
+	if (NULL != p) 
+		return tcf_police_release(p, bind);
+
+	return 0;
+}
+
+int tcf_act_police_stats(struct sk_buff *skb, struct tc_action *a)
+{
+	struct tcf_police *p;
+	p = PRIV(a);
+	if (NULL != p) 
+		return qdisc_copy_stats(skb, &p->stats);
+
+	return 1;
+}
+
+int tcf_act_police(struct sk_buff **pskb, struct tc_action *a)
+{
+	psched_time_t now;
+	struct sk_buff *skb = *pskb;
+	struct tcf_police *p;
+	long toks;
+	long ptoks = 0;
+
+	p = PRIV(a);
+
+	if (NULL == p) {
+		printk("BUG: tcf_police called with NULL params\n");
+		return -1;  
+	}
+
+	spin_lock(&p->lock);
+
+	p->stats.bytes += skb->len;
+	p->stats.packets++;
+
+#ifdef CONFIG_NET_ESTIMATOR
+	if (p->ewma_rate && p->stats.bps >= p->ewma_rate) {
+		p->stats.overlimits++;
+		spin_unlock(&p->lock);
+		return p->action;
+	}
+#endif
+
+	if (skb->len <= p->mtu) {
+		if (p->R_tab == NULL) {
+			spin_unlock(&p->lock);
+			return p->result;
+		}
+
+		PSCHED_GET_TIME(now);
+
+		toks = PSCHED_TDIFF_SAFE(now, p->t_c, p->burst, (void)0);
+
+		if (p->P_tab) {
+			ptoks = toks + p->ptoks;
+			if (ptoks > (long)L2T_P(p, p->mtu))
+				ptoks = (long)L2T_P(p, p->mtu);
+			ptoks -= L2T_P(p, skb->len);
+		}
+		toks += p->toks;
+		if (toks > (long)p->burst)
+			toks = p->burst;
+		toks -= L2T(p, skb->len);
+
+		if ((toks|ptoks) >= 0) {
+			p->t_c = now;
+			p->toks = toks;
+			p->ptoks = ptoks;
+			spin_unlock(&p->lock);
+			return p->result;
+		}
+	}
+
+	p->stats.overlimits++;
+	spin_unlock(&p->lock);
+	return p->action;
+}
+
+int tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
+{
+	unsigned char	 *b = skb->tail;
+	struct tc_police opt;
+	struct tcf_police *p;
+
+	p = PRIV(a);
+	if (NULL == p) {
+		printk("BUG: tcf_police_dump called with NULL params\n");
+		goto rtattr_failure;
+	}
+
+	opt.index = p->index;
+	opt.action = p->action;
+	opt.mtu = p->mtu;
+	opt.burst = p->burst;
+	opt.refcnt = p->refcnt - ref;
+	opt.bindcnt = p->bindcnt - bind;
+	if (p->R_tab)
+		opt.rate = p->R_tab->rate;
+	else
+		memset(&opt.rate, 0, sizeof(opt.rate));
+	if (p->P_tab)
+		opt.peakrate = p->P_tab->rate;
+	else
+		memset(&opt.peakrate, 0, sizeof(opt.peakrate));
+	RTA_PUT(skb, TCA_POLICE_TBF, sizeof(opt), &opt);
+	if (p->result)
+		RTA_PUT(skb, TCA_POLICE_RESULT, sizeof(int), &p->result);
+#ifdef CONFIG_NET_ESTIMATOR
+	if (p->ewma_rate)
+		RTA_PUT(skb, TCA_POLICE_AVRATE, 4, &p->ewma_rate);
+#endif
+	return skb->len;
+
+rtattr_failure:
+	skb_trim(skb, b - skb->data);
+	return -1;
+}
+
+MODULE_AUTHOR("Alexey Kuznetsov");
+MODULE_DESCRIPTION("Policing actions");
+MODULE_LICENSE("GPL");
+
+
+static struct tc_action_ops act_police_ops = {
+	.next		=	NULL,
+	.kind		=	"police",
+	.type		=	TCA_ID_POLICE, 
+	.capab		=	TCA_CAP_NONE, 
+	.owner		=	THIS_MODULE,
+	.act		=	tcf_act_police,
+	.get_stats	=	tcf_act_police_stats,
+	.dump		=	tcf_act_police_dump,
+	.cleanup	=	tcf_act_police_cleanup,
+	.lookup		=	tcf_hash_search,
+	.init		=	tcf_act_police_locate,
+	.walk		=	tcf_generic_walker
+};
+
+static int __init
+police_init_module(void)
+{
+	return tcf_register_action(&act_police_ops);
+}
+
+static void __exit
+police_cleanup_module(void)
+{
+	tcf_unregister_action(&act_police_ops);
+}
+
+module_init(police_init_module);
+module_exit(police_cleanup_module);
+
+#endif
+
 struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est)
 {
 	unsigned h;
@@ -192,7 +523,7 @@
 
 		PSCHED_GET_TIME(now);
 
-		toks = PSCHED_TDIFF_SAFE(now, p->t_c, p->burst, 0);
+		toks = PSCHED_TDIFF_SAFE(now, p->t_c, p->burst, (void)0);
 
 		if (p->P_tab) {
 			ptoks = toks + p->ptoks;
--- diff/net/sched/sch_api.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/sch_api.c	2004-07-01 21:32:53.000000000 +0100
@@ -450,6 +450,9 @@
 	if (!try_module_get(ops->owner))
 		goto err_out;
 
+	/* enqueue is accessed locklessly - make sure it's visible
+	 * before we set a netdevice's qdisc pointer to sch */
+	smp_wmb();
 	if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) {
 		write_lock(&qdisc_tree_lock);
 		sch->next = dev->qdisc_list;
--- diff/net/sched/sch_cbq.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/sch_cbq.c	2004-07-01 21:32:53.000000000 +0100
@@ -1054,7 +1054,7 @@
 
 	if (sch->q.qlen) {
 		sch->stats.overlimits++;
-		if (q->wd_expires && !netif_queue_stopped(sch->dev)) {
+		if (q->wd_expires) {
 			long delay = PSCHED_US2JIFFIE(q->wd_expires);
 			if (delay <= 0)
 				delay = 1;
--- diff/net/sched/sch_delay.c	2004-06-30 14:26:04.000000000 +0100
+++ source/net/sched/sch_delay.c	2004-07-01 21:32:53.000000000 +0100
@@ -40,6 +40,7 @@
 struct dly_sched_data {
 	u32	latency;
 	u32	limit;
+	u32	loss;
 	struct timer_list timer;
 	struct Qdisc *qdisc;
 };
@@ -58,6 +59,12 @@
 	struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb;
 	int ret;
 
+	/* Random packet drop 0 => none, ~0 => all */
+	if (q->loss >= net_random()) {
+		sch->stats.drops++;
+		return 0;	/* lie about loss so TCP doesn't know */
+	}
+
 	PSCHED_GET_TIME(cb->queuetime);
 
 	/* Queue to underlying scheduler */
@@ -69,7 +76,7 @@
 		sch->stats.bytes += skb->len;
 		sch->stats.packets++;
 	}
-	return 0;
+	return ret;
 }
 
 /* Requeue packets but don't change time stamp */
@@ -104,12 +111,14 @@
 static struct sk_buff *dly_dequeue(struct Qdisc *sch)
 {
 	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
-	struct sk_buff *skb = q->qdisc->dequeue(q->qdisc);
+	struct sk_buff *skb;
 
+ retry:
+	skb = q->qdisc->dequeue(q->qdisc);
 	if (skb) {
 		struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb;
 		psched_time_t now;
-		long diff;
+		long diff, delay;
 
 		PSCHED_GET_TIME(now);
 		diff = q->latency - PSCHED_TDIFF(now, cb->queuetime);
@@ -120,17 +129,17 @@
 			return skb;
 		}
 
-		if (!netif_queue_stopped(sch->dev)) {
-			long delay = PSCHED_US2JIFFIE(diff);
-			if (delay <= 0)
-				delay = 1;
-			mod_timer(&q->timer, jiffies+delay);
-		}
-
 		if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) {
 			sch->q.qlen--;
 			sch->stats.drops++;
+			goto retry;
 		}
+
+		delay = PSCHED_US2JIFFIE(diff);
+		if (delay <= 0)
+		  delay = 1;
+		mod_timer(&q->timer, jiffies+delay);
+
 		sch->flags |= TCQ_F_THROTTLED;
 	}
 	return NULL;
@@ -195,6 +204,7 @@
 	} else {
 		q->latency = qopt->latency;
 		q->limit = qopt->limit;
+		q->loss = qopt->loss;
 	}
 	return err;
 }
@@ -231,6 +241,7 @@
 
 	qopt.latency = q->latency;
 	qopt.limit = q->limit;
+	qopt.loss = q->loss;
 
 	RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt);
 
--- diff/net/sched/sch_generic.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/sch_generic.c	2004-07-01 21:32:53.000000000 +0100
@@ -30,6 +30,7 @@
 #include <linux/skbuff.h>
 #include <linux/rtnetlink.h>
 #include <linux/init.h>
+#include <linux/rcupdate.h>
 #include <net/sock.h>
 #include <net/pkt_sched.h>
 
@@ -387,6 +388,9 @@
 	sch->dev = dev;
 	sch->stats.lock = &dev->queue_lock;
 	atomic_set(&sch->refcnt, 1);
+	/* enqueue is accessed locklessly - make sure it's visible
+	 * before we set a netdevice's qdisc pointer to sch */
+	smp_wmb();
 	if (!ops->init || ops->init(sch, NULL) == 0)
 		return sch;
 
@@ -404,18 +408,36 @@
 		ops->reset(qdisc);
 }
 
+/* this is the rcu callback function to clean up a qdisc when there 
+ * are no further references to it */
+
+static void __qdisc_destroy(struct rcu_head *head)
+{
+	struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu);
+	struct Qdisc_ops  *ops = qdisc->ops;
+
+#ifdef CONFIG_NET_ESTIMATOR
+	qdisc_kill_estimator(&qdisc->stats);
+#endif
+	if (ops->reset)
+		ops->reset(qdisc);
+	if (ops->destroy)
+		ops->destroy(qdisc);
+	module_put(ops->owner);
+
+	if (!(qdisc->flags&TCQ_F_BUILTIN))
+		kfree(qdisc);
+}
+
 /* Under dev->queue_lock and BH! */
 
 void qdisc_destroy(struct Qdisc *qdisc)
 {
-	struct Qdisc_ops *ops = qdisc->ops;
-	struct net_device *dev;
+	struct net_device *dev = qdisc->dev;
 
 	if (!atomic_dec_and_test(&qdisc->refcnt))
 		return;
 
-	dev = qdisc->dev;
-
 	if (dev) {
 		struct Qdisc *q, **qp;
 		for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) {
@@ -425,16 +447,9 @@
 			}
 		}
 	}
-#ifdef CONFIG_NET_ESTIMATOR
-	qdisc_kill_estimator(&qdisc->stats);
-#endif
-	if (ops->reset)
-		ops->reset(qdisc);
-	if (ops->destroy)
-		ops->destroy(qdisc);
-	module_put(ops->owner);
-	if (!(qdisc->flags&TCQ_F_BUILTIN))
-		kfree(qdisc);
+
+	call_rcu(&qdisc->q_rcu, __qdisc_destroy);
+
 }
 
 
--- diff/net/sched/sch_gred.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/sch_gred.c	2004-07-01 21:32:53.000000000 +0100
@@ -155,7 +155,7 @@
 	if (!PSCHED_IS_PASTPERFECT(q->qidlestart)) {
 		long us_idle;
 		PSCHED_GET_TIME(now);
-		us_idle = PSCHED_TDIFF_SAFE(now, q->qidlestart, q->Scell_max, 0);
+		us_idle = PSCHED_TDIFF_SAFE(now, q->qidlestart, q->Scell_max, (void)0);
 		PSCHED_SET_PASTPERFECT(q->qidlestart);
 
 		q->qave >>= q->Stab[(us_idle>>q->Scell_log)&0xFF];
@@ -551,7 +551,7 @@
 				long idle;
 				psched_time_t now;
 				PSCHED_GET_TIME(now);
-				idle = PSCHED_TDIFF_SAFE(now, q->qidlestart, q->Scell_max, 0);
+				idle = PSCHED_TDIFF_SAFE(now, q->qidlestart, q->Scell_max, (void)0);
 				qave  = q->qave >> q->Stab[(idle>>q->Scell_log)&0xFF];
 				dst->qave = qave >> q->Wlog;
 
--- diff/net/sched/sch_hfsc.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/sch_hfsc.c	2004-07-01 21:32:53.000000000 +0100
@@ -1721,8 +1721,7 @@
 		cl = actlist_get_minvt(&q->root, cur_time);
 		if (cl == NULL) {
 			sch->stats.overlimits++;
-			if (!netif_queue_stopped(sch->dev))
-				hfsc_schedule_watchdog(sch, cur_time);
+			hfsc_schedule_watchdog(sch, cur_time);
 			return NULL;
 		}
 	}
--- diff/net/sched/sch_htb.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/sch_htb.c	2004-07-01 21:32:53.000000000 +0100
@@ -367,7 +367,7 @@
 		struct list_head *l;
 		list_for_each (l,q->hash+i) {
 			struct htb_class *cl = list_entry(l,struct htb_class,hlist);
-			long diff = PSCHED_TDIFF_SAFE(q->now, cl->t_c, (u32)cl->mbuffer, 0);
+			long diff = PSCHED_TDIFF_SAFE(q->now, cl->t_c, (u32)cl->mbuffer, (void)0);
 			printk(KERN_DEBUG "htb*c%x m=%d t=%ld c=%ld pq=%lu df=%ld ql=%d "
 					"pa=%x f:",
 				cl->classid,cl->cmode,cl->tokens,cl->ctokens,
@@ -807,7 +807,7 @@
 
 	while (cl) {
 		HTB_CHCL(cl);
-		diff = PSCHED_TDIFF_SAFE(q->now, cl->t_c, (u32)cl->mbuffer, 0);
+		diff = PSCHED_TDIFF_SAFE(q->now, cl->t_c, (u32)cl->mbuffer, (void)0);
 #ifdef HTB_DEBUG
 		if (diff > cl->mbuffer || diff < 0 || PSCHED_TLESS(q->now, cl->t_c)) {
 			if (net_ratelimit())
@@ -878,7 +878,7 @@
 			return cl->pq_key - q->jiffies;
 		}
 		htb_safe_rb_erase(p,q->wait_pq+level);
-		diff = PSCHED_TDIFF_SAFE(q->now, cl->t_c, (u32)cl->mbuffer, 0);
+		diff = PSCHED_TDIFF_SAFE(q->now, cl->t_c, (u32)cl->mbuffer, (void)0);
 #ifdef HTB_DEBUG
 		if (diff > cl->mbuffer || diff < 0 || PSCHED_TLESS(q->now, cl->t_c)) {
 			if (net_ratelimit())
@@ -1008,7 +1008,6 @@
 static void htb_delay_by(struct Qdisc *sch,long delay)
 {
 	struct htb_sched *q = (struct htb_sched *)sch->data;
-	if (netif_queue_stopped(sch->dev)) return;
 	if (delay <= 0) delay = 1;
 	if (unlikely(delay > 5*HZ)) {
 		if (net_ratelimit())
--- diff/net/sched/sch_ingress.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/sch_ingress.c	2004-07-01 21:32:53.000000000 +0100
@@ -45,7 +45,11 @@
 
 /* Thanks to Doron Oz for this hack
 */
+#ifndef CONFIG_NET_CLS_ACT
+#ifdef CONFIG_NETFILTER
 static int nf_registered; 
+#endif
+#endif
 
 struct ingress_qdisc_data {
 	struct Qdisc		*q;
@@ -146,27 +150,52 @@
 	 * Unlike normal "enqueue" functions, ingress_enqueue returns a
 	 * firewall FW_* code.
 	 */
-#ifdef CONFIG_NET_CLS_POLICE
+#ifdef CONFIG_NET_CLS_ACT
+	sch->stats.packets++;
+	sch->stats.bytes += skb->len;
 	switch (result) {
-		case TC_POLICE_SHOT:
-			result = NF_DROP;
+		case TC_ACT_SHOT:
+			result = TC_ACT_SHOT;
 			sch->stats.drops++;
 			break;
+		case TC_ACT_STOLEN:
+		case TC_ACT_QUEUED:
+			result = TC_ACT_STOLEN;
+			break;
+		case TC_ACT_RECLASSIFY: 
+		case TC_ACT_OK:
+		case TC_ACT_UNSPEC:
+		default:
+			skb->tc_index = TC_H_MIN(res.classid);
+			result = TC_ACT_OK;
+			break;
+	};
+/* backward compat */
+#else
+#ifdef	CONFIG_NET_CLS_POLICE  
+	switch (result) {
+		case TC_POLICE_SHOT:
+		result = NF_DROP;
+		sch->stats.drops++;
+		break;
 		case TC_POLICE_RECLASSIFY: /* DSCP remarking here ? */
 		case TC_POLICE_OK:
 		case TC_POLICE_UNSPEC:
 		default:
-			sch->stats.packets++;
-			sch->stats.bytes += skb->len;
-			result = NF_ACCEPT;
-			break;
+		sch->stats.packets++;
+		sch->stats.bytes += skb->len;
+		result = NF_ACCEPT;
+		break;
 	};
+
 #else
+	D2PRINTK("Overriding result to ACCEPT\n");
+	result = NF_ACCEPT;
 	sch->stats.packets++;
 	sch->stats.bytes += skb->len;
 #endif
+#endif
 
-	skb->tc_index = TC_H_MIN(res.classid);
 	return result;
 }
 
@@ -199,6 +228,8 @@
 	return 0;
 }
 
+#ifndef CONFIG_NET_CLS_ACT
+#ifdef CONFIG_NETFILTER
 static unsigned int
 ing_hook(unsigned int hook, struct sk_buff **pskb,
                              const struct net_device *indev,
@@ -240,10 +271,29 @@
 	.priority       = NF_IP_PRI_FILTER + 1,
 };
 
+#endif
+#endif
+
 int ingress_init(struct Qdisc *sch,struct rtattr *opt)
 {
 	struct ingress_qdisc_data *p = PRIV(sch);
 
+/* Make sure either netfilter or preferably CLS_ACT is
+* compiled in */
+#ifndef CONFIG_NET_CLS_ACT
+#ifndef CONFIG_NETFILTER
+	printk("You MUST compile classifier actions into the kernel\n");
+	goto error;
+#else
+	printk("Ingress scheduler: Classifier actions prefered over netfilter\n");
+#endif
+#endif
+                                                                                
+	if (NULL == p)
+		goto error;
+
+#ifndef CONFIG_NET_CLS_ACT
+#ifdef CONFIG_NETFILTER
 	if (!nf_registered) {
 		if (nf_register_hook(&ing_ops) < 0) {
 			printk("ingress qdisc registration error \n");
@@ -251,6 +301,8 @@
 		}
 		nf_registered++;
 	}
+#endif
+#endif
 
 	DPRINTK("ingress_init(sch %p,[qdisc %p],opt %p)\n",sch,p,opt);
 	memset(p, 0, sizeof(*p));
@@ -364,8 +416,12 @@
 static void __exit ingress_module_exit(void) 
 {
 	unregister_qdisc(&ingress_qdisc_ops);
+#ifndef CONFIG_NET_CLS_ACT
+#ifdef CONFIG_NETFILTER
 	if (nf_registered)
 		nf_unregister_hook(&ing_ops);
+#endif
+#endif
 }
 module_init(ingress_module_init)
 module_exit(ingress_module_exit)
--- diff/net/sched/sch_prio.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/sch_prio.c	2004-07-01 21:32:53.000000000 +0100
@@ -47,60 +47,105 @@
 };
 
 
-static __inline__ unsigned prio_classify(struct sk_buff *skb, struct Qdisc *sch)
+struct Qdisc *prio_classify(struct sk_buff *skb, struct Qdisc *sch,int *r)
 {
 	struct prio_sched_data *q = (struct prio_sched_data *)sch->data;
 	struct tcf_result res;
 	u32 band;
+	int result = 0;
 
 	band = skb->priority;
+
 	if (TC_H_MAJ(skb->priority) != sch->handle) {
+#ifdef CONFIG_NET_CLS_ACT
+		*r = result = tc_classify(skb, q->filter_list, &res);
+
+		switch (result) {
+			case TC_ACT_SHOT:
+			case TC_ACT_STOLEN:
+			case TC_ACT_QUEUED:
+				kfree_skb(skb);
+				return NULL;
+			case TC_ACT_RECLASSIFY:
+			case TC_ACT_OK:
+			case TC_ACT_UNSPEC:
+			default:
+			break;
+		};
+
+		if (!q->filter_list ) {
+#else
 		if (!q->filter_list || tc_classify(skb, q->filter_list, &res)) {
+#endif
 			if (TC_H_MAJ(band))
 				band = 0;
-			return q->prio2band[band&TC_PRIO_MAX];
+			return q->queues[q->prio2band[band&TC_PRIO_MAX]];
 		}
 		band = res.classid;
 	}
 	band = TC_H_MIN(band) - 1;
-	return band < q->bands ? band : q->prio2band[0];
+	if (band > q->bands)
+		return q->queues[q->prio2band[0]];
+
+	return q->queues[band];
 }
 
 static int
 prio_enqueue(struct sk_buff *skb, struct Qdisc* sch)
 {
-	struct prio_sched_data *q = (struct prio_sched_data *)sch->data;
 	struct Qdisc *qdisc;
 	int ret;
 
-	qdisc = q->queues[prio_classify(skb, sch)];
+	/* moving these up here changes things from before
+	 * packets counted now include everything that was ever
+	 * seen
+        */
+	sch->stats.bytes += skb->len;
+	sch->stats.packets++;
+	qdisc = prio_classify(skb, sch, &ret);
+	if (NULL == qdisc)
+		goto dropped;
 
 	if ((ret = qdisc->enqueue(skb, qdisc)) == 0) {
-		sch->stats.bytes += skb->len;
-		sch->stats.packets++;
 		sch->q.qlen++;
-		return 0;
+		return NET_XMIT_SUCCESS;
 	}
-	sch->stats.drops++;
-	return ret;
+
+dropped:
+#ifdef CONFIG_NET_CLS_ACT
+	if (TC_ACT_SHOT == ret || NET_XMIT_DROP == ret) {
+#endif
+		sch->stats.drops++;
+		return NET_XMIT_DROP;
+#ifdef CONFIG_NET_CLS_ACT
+	} else {
+		sch->stats.overlimits++; /* abuse, but noone uses it */
+		return NET_XMIT_BYPASS; /* we dont want to confuse TCP */
+	}
+#endif
 }
 
 
 static int
 prio_requeue(struct sk_buff *skb, struct Qdisc* sch)
 {
-	struct prio_sched_data *q = (struct prio_sched_data *)sch->data;
 	struct Qdisc *qdisc;
-	int ret;
+	int ret = NET_XMIT_DROP;
 
-	qdisc = q->queues[prio_classify(skb, sch)];
+#ifdef CONFIG_NET_CLS_ACT
+	sch->stats.reqs++;
+#endif
+	qdisc = prio_classify(skb, sch, &ret);
+	if (qdisc == NULL)
+		goto dropped;
 
 	if ((ret = qdisc->ops->requeue(skb, qdisc)) == 0) {
 		sch->q.qlen++;
 		return 0;
 	}
+dropped:
 	sch->stats.drops++;
-	return ret;
+	return NET_XMIT_DROP;
 }
 
 
--- diff/net/sched/sch_red.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sched/sch_red.c	2004-07-01 21:32:53.000000000 +0100
@@ -189,7 +189,7 @@
 		int  shift;
 
 		PSCHED_GET_TIME(now);
-		us_idle = PSCHED_TDIFF_SAFE(now, q->qidlestart, q->Scell_max, 0);
+		us_idle = PSCHED_TDIFF_SAFE(now, q->qidlestart, q->Scell_max, (void)0);
 		PSCHED_SET_PASTPERFECT(q->qidlestart);
 
 /*
--- diff/net/sched/sch_tbf.c	2004-06-30 14:26:04.000000000 +0100
+++ source/net/sched/sch_tbf.c	2004-07-01 21:32:53.000000000 +0100
@@ -201,13 +201,13 @@
 
 	if (skb) {
 		psched_time_t now;
-		long toks;
+		long toks, delay;
 		long ptoks = 0;
 		unsigned int len = skb->len;
 
 		PSCHED_GET_TIME(now);
 
-		toks = PSCHED_TDIFF_SAFE(now, q->t_c, q->buffer, 0);
+		toks = PSCHED_TDIFF_SAFE(now, q->t_c, q->buffer, (void)0);
 
 		if (q->P_tab) {
 			ptoks = toks + q->ptokens;
@@ -229,14 +229,12 @@
 			return skb;
 		}
 
-		if (!netif_queue_stopped(sch->dev)) {
-			long delay = PSCHED_US2JIFFIE(max_t(long, -toks, -ptoks));
+		delay = PSCHED_US2JIFFIE(max_t(long, -toks, -ptoks));
 
-			if (delay == 0)
-				delay = 1;
+		if (delay == 0)
+			delay = 1;
 
-			mod_timer(&q->wd_timer, jiffies+delay);
-		}
+		mod_timer(&q->wd_timer, jiffies+delay);
 
 		/* Maybe we have a shorter packet in the queue,
 		   which can be sent now. It sounds cool,
--- diff/net/sctp/ipv6.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sctp/ipv6.c	2004-07-01 21:32:53.000000000 +0100
@@ -641,7 +641,7 @@
 #endif
 
 	if (newsk->sk_prot->init(newsk)) {
-		inet_sock_release(newsk);
+		sk_common_release(newsk);
 		newsk = NULL;
 	}
 
@@ -882,10 +882,10 @@
 	.ioctl      = inet6_ioctl,
 	.listen     = sctp_inet_listen,
 	.shutdown   = inet_shutdown,
-	.setsockopt = inet_setsockopt,
-	.getsockopt = inet_getsockopt,
+	.setsockopt = sock_common_setsockopt,
+	.getsockopt = sock_common_getsockopt,
 	.sendmsg    = inet_sendmsg,
-	.recvmsg    = inet_recvmsg,
+	.recvmsg    = sock_common_recvmsg,
 	.mmap       = sock_no_mmap,
 };
 
--- diff/net/sctp/protocol.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sctp/protocol.c	2004-07-01 21:32:53.000000000 +0100
@@ -603,7 +603,7 @@
 #endif
 
 	if (newsk->sk_prot->init(newsk)) {
-		inet_sock_release(newsk);
+		sk_common_release(newsk);
 		newsk = NULL;
 	}
 
@@ -846,10 +846,10 @@
 	.ioctl       = inet_ioctl,
 	.listen      = sctp_inet_listen,
 	.shutdown    = inet_shutdown,     /* Looks harmless.  */
-	.setsockopt  = inet_setsockopt,   /* IP_SOL IP_OPTION is a problem. */
-	.getsockopt  = inet_getsockopt,
+	.setsockopt  = sock_common_setsockopt,   /* IP_SOL IP_OPTION is a problem. */
+	.getsockopt  = sock_common_getsockopt,
 	.sendmsg     = inet_sendmsg,
-	.recvmsg     = inet_recvmsg,
+	.recvmsg     = sock_common_recvmsg,
 	.mmap        = sock_no_mmap,
 	.sendpage    = sock_no_sendpage,
 };
@@ -875,7 +875,7 @@
 };
 
 /* Register with IP layer.  */
-static struct inet_protocol sctp_protocol = {
+static struct net_protocol sctp_protocol = {
 	.handler     = sctp_rcv,
 	.err_handler = sctp_v4_err,
 	.no_policy   = 1,
--- diff/net/sctp/sm_make_chunk.c	2004-05-19 22:13:17.000000000 +0100
+++ source/net/sctp/sm_make_chunk.c	2004-07-01 21:32:53.000000000 +0100
@@ -1834,23 +1834,28 @@
 	/* Allocate storage for the negotiated streams if it is not a temporary 	 * association.
 	 */
 	if (!asoc->temp) {
-		sctp_assoc_t assoc_id;
+		int assoc_id;
+		int error;
 
 		asoc->ssnmap = sctp_ssnmap_new(asoc->c.sinit_max_instreams,
 					       asoc->c.sinit_num_ostreams, gfp);
 		if (!asoc->ssnmap)
 			goto clean_up;
 
-		do {
-			if (unlikely(!idr_pre_get(&sctp_assocs_id, gfp)))
-				goto clean_up;
-			spin_lock_bh(&sctp_assocs_id_lock);
-			assoc_id = (sctp_assoc_t)idr_get_new(&sctp_assocs_id,
-							     (void *)asoc);
-			spin_unlock_bh(&sctp_assocs_id_lock);
-		} while (unlikely((int)assoc_id == -1));
+	retry:
+		if (unlikely(!idr_pre_get(&sctp_assocs_id, gfp)))
+			goto clean_up;
+		spin_lock_bh(&sctp_assocs_id_lock);
+		error = idr_get_new(&sctp_assocs_id,
+				    (void *)asoc,
+				    &assoc_id);
+		spin_unlock_bh(&sctp_assocs_id_lock);
+		if (error == -EAGAIN)
+			goto retry;
+		else if (error)
+			goto clean_up;
 
-		asoc->assoc_id = assoc_id;
+		asoc->assoc_id = (sctp_assoc_t) assoc_id;
 	}
 
 	/* ADDIP Section 4.1 ASCONF Chunk Procedures
--- diff/net/sctp/socket.c	2004-06-30 14:26:04.000000000 +0100
+++ source/net/sctp/socket.c	2004-07-01 21:32:53.000000000 +0100
@@ -945,11 +945,11 @@
 	sctp_local_bh_disable();
 	sctp_bh_lock_sock(sk);
 
-	/* Hold the sock, since inet_sock_release() will put sock_put()
+	/* Hold the sock, since sk_common_release() will put sock_put()
 	 * and we have just a little more cleanup.
 	 */
 	sock_hold(sk);
-	inet_sock_release(sk);
+	sk_common_release(sk);
 
 	sctp_bh_unlock_sock(sk);
 	sctp_local_bh_enable();
@@ -990,7 +990,7 @@
  * Note:  This function could use a rewrite especially when explicit
  * connect support comes in.
  */
-/* BUG:  We do not implement the equivalent of wait_for_tcp_memory(). */
+/* BUG:  We do not implement the equivalent of sk_stream_wait_memory(). */
 
 SCTP_STATIC int sctp_msghdr_parse(const struct msghdr *, sctp_cmsgs_t *);
 
--- diff/net/socket.c	2004-06-30 14:26:04.000000000 +0100
+++ source/net/socket.c	2004-07-01 21:32:53.000000000 +0100
@@ -548,9 +548,11 @@
 int sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
 {
 	struct kiocb iocb;
+	struct sock_iocb siocb;
 	int ret;
 
 	init_sync_kiocb(&iocb, NULL);
+	iocb.private = &siocb;
 	ret = __sock_sendmsg(&iocb, sock, msg, size);
 	if (-EIOCBQUEUED == ret)
 		ret = wait_on_sync_kiocb(&iocb);
@@ -581,15 +583,22 @@
 		 size_t size, int flags)
 {
 	struct kiocb iocb;
+	struct sock_iocb siocb;
 	int ret;
 
         init_sync_kiocb(&iocb, NULL);
+	iocb.private = &siocb;
 	ret = __sock_recvmsg(&iocb, sock, msg, size, flags);
 	if (-EIOCBQUEUED == ret)
 		ret = wait_on_sync_kiocb(&iocb);
 	return ret;
 }
 
+static void sock_aio_dtor(struct kiocb *iocb)
+{
+	kfree(iocb->private);
+}
+
 /*
  *	Read data from a socket. ubuf is a user mode pointer. We make sure the user
  *	area ubuf...ubuf+size-1 is writable before asking the protocol.
@@ -598,7 +607,7 @@
 static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf,
 			 size_t size, loff_t pos)
 {
-	struct sock_iocb *x = kiocb_to_siocb(iocb);
+	struct sock_iocb *x, siocb;
 	struct socket *sock;
 	int flags;
 
@@ -607,6 +616,16 @@
 	if (size==0)		/* Match SYS5 behaviour */
 		return 0;
 
+	if (is_sync_kiocb(iocb))
+		x = &siocb;
+	else {
+		x = kmalloc(sizeof(struct sock_iocb), GFP_KERNEL);
+		if (!x)
+			return -ENOMEM;
+		iocb->ki_dtor = sock_aio_dtor;
+	}
+	iocb->private = x;
+	x->kiocb = iocb;
 	sock = SOCKET_I(iocb->ki_filp->f_dentry->d_inode); 
 
 	x->async_msg.msg_name = NULL;
@@ -631,7 +650,7 @@
 static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf,
 			  size_t size, loff_t pos)
 {
-	struct sock_iocb *x = kiocb_to_siocb(iocb);
+	struct sock_iocb *x, siocb;
 	struct socket *sock;
 	
 	if (pos != 0)
@@ -639,6 +658,16 @@
 	if(size==0)		/* Match SYS5 behaviour */
 		return 0;
 
+	if (is_sync_kiocb(iocb))
+		x = &siocb;
+	else {
+		x = kmalloc(sizeof(struct sock_iocb), GFP_KERNEL);
+		if (!x)
+			return -ENOMEM;
+		iocb->ki_dtor = sock_aio_dtor;
+	}
+	iocb->private = x;
+	x->kiocb = iocb;
 	sock = SOCKET_I(iocb->ki_filp->f_dentry->d_inode); 
 
 	x->async_msg.msg_name = NULL;
--- diff/net/sunrpc/rpc_pipe.c	2004-06-30 14:26:04.000000000 +0100
+++ source/net/sunrpc/rpc_pipe.c	2004-07-01 21:32:54.000000000 +0100
@@ -433,6 +433,7 @@
 	nd->dentry = dget(rpc_mount->mnt_root);
 	nd->last_type = LAST_ROOT;
 	nd->flags = LOOKUP_PARENT;
+	nd->depth = 0;
 
 	if (path_walk(path, nd)) {
 		printk(KERN_WARNING "%s: %s failed to find path %s\n",
--- diff/net/sunrpc/svcsock.c	2004-06-30 14:26:04.000000000 +0100
+++ source/net/sunrpc/svcsock.c	2004-07-01 21:32:54.000000000 +0100
@@ -125,7 +125,7 @@
 	int wspace;
 
 	if (svsk->sk_sock->type == SOCK_STREAM)
-		wspace = tcp_wspace(svsk->sk_sk);
+		wspace = sk_stream_wspace(svsk->sk_sk);
 	else
 		wspace = sock_wspace(svsk->sk_sk);
 
@@ -414,7 +414,6 @@
 	}
 	/* send tail */
 	if (xdr->tail[0].iov_len) {
-		/* The tail *will* be in respages[0]; */
 		result = sock->ops->sendpage(sock, rqstp->rq_respages[rqstp->rq_restailpage], 
 					     ((unsigned long)xdr->tail[0].iov_base)& (PAGE_SIZE-1),
 					     xdr->tail[0].iov_len, 0);
--- diff/net/sunrpc/xprt.c	2004-06-30 14:26:04.000000000 +0100
+++ source/net/sunrpc/xprt.c	2004-07-01 21:32:54.000000000 +0100
@@ -1086,8 +1086,8 @@
 
 	/* Wait until we have enough socket memory */
 	if (xprt->stream) {
-		/* from net/ipv4/tcp.c:tcp_write_space */
-		if (tcp_wspace(sk) < tcp_min_write_space(sk))
+		/* from net/core/stream.c:sk_stream_write_space */
+		if (sk_stream_wspace(sk) < sk_stream_min_wspace(sk))
 			goto out;
 	} else {
 		/* from net/core/sock.c:sock_def_write_space */
--- diff/net/xfrm/Makefile	2004-05-19 22:13:18.000000000 +0100
+++ source/net/xfrm/Makefile	2004-07-01 21:32:54.000000000 +0100
@@ -2,7 +2,7 @@
 # Makefile for the XFRM subsystem.
 #
 
-obj-$(CONFIG_XFRM) := xfrm_policy.o xfrm_state.o xfrm_input.o xfrm_algo.o xfrm_output.o \
+obj-$(CONFIG_XFRM) := xfrm_policy.o xfrm_state.o xfrm_input.o xfrm_algo.o \
 	xfrm_export.o
 obj-$(CONFIG_XFRM_USER) += xfrm_user.o
 
--- diff/net/xfrm/xfrm_export.c	2004-05-19 22:13:18.000000000 +0100
+++ source/net/xfrm/xfrm_export.c	2004-07-01 21:32:54.000000000 +0100
@@ -18,6 +18,7 @@
 EXPORT_SYMBOL(xfrm_state_update);
 EXPORT_SYMBOL(xfrm_state_check_expire);
 EXPORT_SYMBOL(xfrm_state_check_space);
+EXPORT_SYMBOL(xfrm_state_check);
 EXPORT_SYMBOL(xfrm_state_lookup);
 EXPORT_SYMBOL(xfrm_state_register_afinfo);
 EXPORT_SYMBOL(xfrm_state_unregister_afinfo);
@@ -27,7 +28,6 @@
 EXPORT_SYMBOL(xfrm_replay_check);
 EXPORT_SYMBOL(xfrm_replay_advance);
 EXPORT_SYMBOL(xfrm_check_selectors);
-EXPORT_SYMBOL(xfrm_check_output);
 EXPORT_SYMBOL(__secpath_destroy);
 EXPORT_SYMBOL(secpath_dup);
 EXPORT_SYMBOL(xfrm_get_acqseq);
--- diff/net/xfrm/xfrm_state.c	2004-06-30 14:26:04.000000000 +0100
+++ source/net/xfrm/xfrm_state.c	2004-07-01 21:32:54.000000000 +0100
@@ -531,6 +531,16 @@
 	return 0;
 }
 
+int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb)
+{
+	int err = xfrm_state_check_expire(x);
+	if (err < 0)
+		goto err;
+	err = xfrm_state_check_space(x, skb);
+err:
+	return err;
+}
+
 struct xfrm_state *
 xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto,
 		  unsigned short family)
--- diff/net/xfrm/xfrm_user.c	2004-05-19 22:13:18.000000000 +0100
+++ source/net/xfrm/xfrm_user.c	2004-07-01 21:32:54.000000000 +0100
@@ -78,6 +78,15 @@
 	if ((rt->rta_len - sizeof(*rt)) < sizeof(*encap))
 		return -EINVAL;
 
+	encap = RTA_DATA(rt);
+	switch (encap->encap_type) {
+	case UDP_ENCAP_ESPINUDP:
+	case UDP_ENCAP_ESPINUDP_NON_IKE:
+		break;
+	default:
+		return -ENOPROTOOPT;
+	}
+
 	return 0;
 }
 
--- diff/scripts/Makefile	2004-05-19 22:13:18.000000000 +0100
+++ source/scripts/Makefile	2004-07-01 21:32:54.000000000 +0100
@@ -13,7 +13,7 @@
 subdir-$(CONFIG_MODVERSIONS)	+= genksyms
 
 # Let clean descend into subdirs
-subdir-	+= basic lxdialog kconfig
+subdir-	+= basic lxdialog kconfig package
 
 # dependencies on generated files need to be listed explicitly
 
--- diff/scripts/checkstack.pl	2004-06-30 14:26:04.000000000 +0100
+++ source/scripts/checkstack.pl	2004-07-01 21:32:54.000000000 +0100
@@ -10,9 +10,10 @@
 #	IA64 port via Andreas Dilger
 #	Arm port by Holger Schurig
 #	Random bits by Matt Mackall <mpm@selenic.com>
+#	M68k port by Geert Uytterhoeven and Andreas Schwab
 #
 #	Usage:
-#	objdump -d vmlinux | stackcheck_ppc.pl [arch]
+#	objdump -d vmlinux | stackcheck.pl [arch]
 #
 #	TODO :	Port to all architectures (one regex per arch)
 
@@ -23,6 +24,7 @@
 # $1 (first bracket) matches the size of the stack growth
 #
 # use anything else and feel the pain ;)
+my (@stack, $re, $x, $xs);
 {
 	my $arch = shift;
 	if ($arch eq "") {
@@ -31,25 +33,29 @@
 
 	$x	= "[0-9a-f]";	# hex character
 	$xs	= "[0-9a-f ]";	# hex character or space
-	if ($arch =~ /^arm$/) {
+	if ($arch eq 'arm') {
 		#c0008ffc:	e24dd064	sub	sp, sp, #100	; 0x64
 		$re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o;
 	} elsif ($arch =~ /^i[3456]86$/) {
 		#c0105234:       81 ec ac 05 00 00       sub    $0x5ac,%esp
 		$re = qr/^.*[as][du][db]    \$(0x$x{1,8}),\%esp$/o;
-	} elsif ($arch =~ /^ia64$/) {
+	} elsif ($arch eq 'ia64') {
 		#e0000000044011fc:       01 0f fc 8c     adds r12=-384,r12
 		$re = qr/.*adds.*r12=-(([0-9]{2}|[3-9])[0-9]{2}),r12/o;
-	} elsif ($arch =~ /^mips64$/) {
+	} elsif ($arch eq 'm68k') {
+		#    2b6c:       4e56 fb70       linkw %fp,#-1168
+		#  1df770:       defc ffe4       addaw #-28,%sp
+		$re = qr/.*(?:linkw %fp,|addaw )#-([0-9]{1,4})(?:,%sp)?$/o;
+	} elsif ($arch eq 'mips64') {
 		#8800402c:       67bdfff0        daddiu  sp,sp,-16
 		$re = qr/.*daddiu.*sp,sp,-(([0-9]{2}|[3-9])[0-9]{2})/o;
-	} elsif ($arch =~ /^mips$/) {
+	} elsif ($arch eq 'mips') {
 		#88003254:       27bdffe0        addiu   sp,sp,-32
 		$re = qr/.*addiu.*sp,sp,-(([0-9]{2}|[3-9])[0-9]{2})/o;
-	} elsif ($arch =~ /^ppc$/) {
+	} elsif ($arch eq 'ppc') {
 		#c00029f4:       94 21 ff 30     stwu    r1,-208(r1)
 		$re = qr/.*stwu.*r1,-($x{1,8})\(r1\)/o;
-	} elsif ($arch =~ /^ppc64$/) {
+	} elsif ($arch eq 'ppc64') {
 		#XXX
 		$re = qr/.*stdu.*r1,-($x{1,8})\(r1\)/o;
 	} elsif ($arch =~ /^s390x?$/) {
@@ -62,6 +68,7 @@
 }
 
 sub bysize($) {
+	my ($asize, $bsize);
 	($asize = $a) =~ s/.*	+(.*)$/$1/;
 	($bsize = $b) =~ s/.*	+(.*)$/$1/;
 	$bsize <=> $asize
@@ -70,8 +77,9 @@
 #
 # main()
 #
-$funcre = qr/^$x* \<(.*)\>:$/;
-while ($line = <STDIN>) {
+my $funcre = qr/^$x* <(.*)>:$/;
+my $func;
+while (my $line = <STDIN>) {
 	if ($line =~ m/$funcre/) {
 		$func = $1;
 	}
@@ -85,7 +93,7 @@
 			$size += 0x80000000;
 		}
 
-		$line =~ m/^($xs*).*/;
+		next if $line !~ m/^($xs*)/;
 		my $addr = $1;
 		$addr =~ s/ /0/g;
 		$addr = "0x$addr";
@@ -97,12 +105,8 @@
 			$padlen -= 8;
 		}
 		next if ($size < 100);
-		$stack[@stack] = "$intro$size\n";
+		push @stack, "$intro$size\n";
 	}
 }
 
-@sortedstack = sort bysize @stack;
-
-foreach $i (@sortedstack) {
-	print("$i");
-}
+print sort bysize @stack;
--- diff/scripts/extract-ikconfig	2004-05-19 22:13:18.000000000 +0100
+++ source/scripts/extract-ikconfig	2004-07-01 21:32:54.000000000 +0100
@@ -1,9 +1,31 @@
-#! /bin/bash 
+#!/bin/sh
 # extracts .config info from a [b]zImage file
 # uses: binoffset (new), dd, zcat, strings, grep
 # $arg1 is [b]zImage filename
 
-TMPFILE=""
+binoffset="./scripts/binoffset"
+
+IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54"
+IKCFG_ED="0x49 0x4b 0x43 0x46 0x47 0x5f 0x45 0x44"
+function dump_config {
+    typeset file="$1"
+
+    start=`$binoffset $file $IKCFG_ST 2>/dev/null`
+    [ "$?" != "0" ] && start="-1"
+    if [ "$start" -eq "-1" ]; then
+	return
+    fi
+    end=`$binoffset $file $IKCFG_ED 2>/dev/null`
+
+    let start="$start + 8"
+    let size="$end - $start"
+
+    head --bytes="$end" "$file" | tail --bytes="$size" | zcat
+
+    clean_up
+    exit 0
+}
+
 
 usage()
 {
@@ -12,8 +34,7 @@
 
 clean_up()
 {
-	if [ -z $ISCOMP ]
-	then
+	if [ "$TMPFILE" != "" ]; then
 		rm -f $TMPFILE
 	fi
 }
@@ -21,46 +42,36 @@
 if [ $# -lt 1 ]
 then
 	usage
-	exit
+	exit 1
 fi
 
-image=$1
+TMPFILE="/tmp/ikconfig-$$"
+image="$1"
 
-# There are two gzip headers, as well as arches which don't compress their
-# kernel.
-GZHDR="0x1f 0x8b 0x08 0x00"
-if [ `binoffset $image $GZHDR >/dev/null 2>&1 ; echo $?` -ne 0 ]
-then
-	GZHDR="0x1f 0x8b 0x08 0x08"
-	if [ `binoffset $image $GZHDR >/dev/null 2>&1 ; echo $?` -ne 0 ]
-	then
-		ISCOMP=0
-	fi
-fi
+# vmlinux: Attempt to dump the configuration from the file directly
+dump_config "$image"
 
-PID=$$
+GZHDR1="0x1f 0x8b 0x08 0x00"
+GZHDR2="0x1f 0x8b 0x08 0x08"
 
-# Extract and uncompress the kernel image if necessary
-if [ -z $ISCOMP ]
-then
-	TMPFILE="/tmp/`basename $image`.vmlin.$PID"
-	dd if=$image bs=1 skip=`binoffset $image $GZHDR` 2> /dev/null | zcat > $TMPFILE
-else
-	TMPFILE=$image
+# vmlinux.gz: Check for a compressed images
+off=`$binoffset "$image" $GZHDR1 2>/dev/null`
+[ "$?" != "0" ] && off="-1"
+if [ "$off" -eq "-1" ]; then
+	off=`$binoffset "$image" $GZHDR2 2>/dev/null`
+	[ "$?" != "0" ] && off="-1"
 fi
-
-# Look for strings.
-strings $TMPFILE | grep "CONFIG_BEGIN=n" > /dev/null
-if [ $? -eq 0 ]
-then
-	strings $TMPFILE | awk "/CONFIG_BEGIN=n/,/CONFIG_END=n/" > $image.oldconfig.$PID
-else
-	echo "ERROR: Unable to extract kernel configuration information."
-	echo "       This kernel image may not have the config info."
-	clean_up
-	exit 1
+if [ "$off" -eq "0" ]; then
+	zcat <"$image" >"$TMPFILE"
+	dump_config "$TMPFILE"
+elif [ "$off" -ne "-1" ]; then
+	(dd ibs="$off" skip=1 count=0 && dd bs=512k) <"$image" 2>/dev/null | \
+		zcat >"$TMPFILE"
+	dump_config "$TMPFILE"
 fi
 
-echo "Kernel configuration written to $image.oldconfig.$PID"
+echo "ERROR: Unable to extract kernel configuration information."
+echo "       This kernel image may not have the config info."
+
 clean_up
-exit 0
+exit 1
--- diff/scripts/kallsyms.c	2004-06-30 14:26:04.000000000 +0100
+++ source/scripts/kallsyms.c	2004-07-01 21:32:54.000000000 +0100
@@ -72,7 +72,15 @@
 			return 0;
 	}
 
-	if (strstr(s->sym, "_compiled."))
+	/* Exclude symbols which vary between passes.  Passes 1 and 2 must have
+	 * identical symbol lists.  The kallsyms_* symbols below are only added
+	 * after pass 1, they would be included in pass 2 when --all-symbols is
+	 * specified so exclude them to get a stable symbol list.
+	 */
+	if (strstr(s->sym, "_compiled.") ||
+	    strcmp(s->sym, "kallsyms_addresses") == 0 ||
+	    strcmp(s->sym, "kallsyms_num_syms") == 0 ||
+	    strcmp(s->sym, "kallsyms_names") == 0)
 		return 0;
 
 	return 1;
--- diff/scripts/mkconfigs	2004-05-19 22:13:18.000000000 +0100
+++ source/scripts/mkconfigs	2004-07-01 21:32:54.000000000 +0100
@@ -34,10 +34,10 @@
 config=$1
 makefile=$2
 
-echo "#ifndef _IKCONFIG_H"
-echo "#define _IKCONFIG_H"
-echo \
-"/*
+cat << EOF
+#ifndef _IKCONFIG_H
+#define _IKCONFIG_H
+/*
  * 
  * 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
@@ -58,10 +58,10 @@
  * 
  * This file is generated automatically by scripts/mkconfigs. Do not edit.
  *
- */"
-
-echo "static char const ikconfig_config[] __attribute__((unused)) = "
-echo "\"CONFIG_BEGIN=n\\n\\"
-echo "`cat $config | sed 's/\"/\\\\\"/g' | grep "^#\? \?CONFIG_" | awk '{ print $0 "\\\\n\\\\" }' `"
-echo "CONFIG_END=n\\n\";"
-echo "#endif /* _IKCONFIG_H */"
+ */
+static char const ikconfig_config[] __attribute__((unused)) =
+"CONFIG_BEGIN=n\\n\\
+$(sed < $config -n 's/"/\\"/g;/^#\? \?CONFIG_/s/.*/&\\n\\/p')
+CONFIG_END=n\\n";
+#endif /* _IKCONFIG_H */
+EOF
--- diff/security/dummy.c	2004-06-30 14:26:04.000000000 +0100
+++ source/security/dummy.c	2004-07-01 21:32:54.000000000 +0100
@@ -720,7 +720,7 @@
 	return 0;
 }
 
-static int dummy_netlink_send (struct sk_buff *skb)
+static int dummy_netlink_send (struct sock *sk, struct sk_buff *skb)
 {
 	if (current->euid == 0)
 		cap_raise (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN);
--- diff/security/selinux/Makefile	2004-05-19 22:13:19.000000000 +0100
+++ source/security/selinux/Makefile	2004-07-01 21:32:54.000000000 +0100
@@ -4,7 +4,7 @@
 
 obj-$(CONFIG_SECURITY_SELINUX) := selinux.o ss/
 
-selinux-y := avc.o hooks.o selinuxfs.o netlink.o
+selinux-y := avc.o hooks.o selinuxfs.o netlink.o nlmsgtab.o
 
 selinux-$(CONFIG_SECURITY_NETWORK) += netif.o
 
--- diff/security/selinux/hooks.c	2004-06-30 14:26:04.000000000 +0100
+++ source/security/selinux/hooks.c	2004-07-01 21:32:54.000000000 +0100
@@ -71,6 +71,9 @@
 #define XATTR_SELINUX_SUFFIX "selinux"
 #define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX
 
+extern int policydb_loaded_version;
+extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm);
+
 #ifdef CONFIG_SECURITY_SELINUX_DEVELOP
 int selinux_enforcing = 0;
 
@@ -627,7 +630,7 @@
 	return SECCLASS_FILE;
 }
 
-static inline u16 socket_type_to_security_class(int family, int type)
+static inline u16 socket_type_to_security_class(int family, int type, int protocol)
 {
 	switch (family) {
 	case PF_UNIX:
@@ -648,7 +651,28 @@
 			return SECCLASS_RAWIP_SOCKET;
 		}
 	case PF_NETLINK:
-		return SECCLASS_NETLINK_SOCKET;
+		switch (protocol) {
+		case NETLINK_ROUTE:
+			return SECCLASS_NETLINK_ROUTE_SOCKET;
+		case NETLINK_FIREWALL:
+			return SECCLASS_NETLINK_FIREWALL_SOCKET;
+		case NETLINK_TCPDIAG:
+			return SECCLASS_NETLINK_TCPDIAG_SOCKET;
+		case NETLINK_NFLOG:
+			return SECCLASS_NETLINK_NFLOG_SOCKET;
+		case NETLINK_XFRM:
+			return SECCLASS_NETLINK_XFRM_SOCKET;
+		case NETLINK_SELINUX:
+			return SECCLASS_NETLINK_SELINUX_SOCKET;
+		case NETLINK_AUDIT:
+			return SECCLASS_NETLINK_AUDIT_SOCKET;
+		case NETLINK_IP6_FW:
+			return SECCLASS_NETLINK_IP6FW_SOCKET;
+		case NETLINK_DNRTMSG:
+			return SECCLASS_NETLINK_DNRT_SOCKET;
+		default:
+			return SECCLASS_NETLINK_SOCKET;
+		}
 	case PF_PACKET:
 		return SECCLASS_PACKET_SOCKET;
 	case PF_KEY:
@@ -853,7 +877,8 @@
 		struct socket *sock = SOCKET_I(inode);
 		if (sock->sk) {
 			isec->sclass = socket_type_to_security_class(sock->sk->sk_family,
-			                                             sock->sk->sk_type);
+			                                             sock->sk->sk_type,
+			                                             sock->sk->sk_protocol);
 		} else {
 			isec->sclass = SECCLASS_SOCKET;
 		}
@@ -1364,11 +1389,11 @@
 {
 	int error;
 
-	error = task_has_perm(current, target, PROCESS__SETCAP);
+	error = secondary_ops->capset_check(target, effective, inheritable, permitted);
 	if (error)
 		return error;
 
-	return secondary_ops->capset_check(target, effective, inheritable, permitted);
+	return task_has_perm(current, target, PROCESS__SETCAP);
 }
 
 static void selinux_capset_set(struct task_struct *target, kernel_cap_t *effective,
@@ -1402,6 +1427,10 @@
 	u32 tsid;
 	int rc;
 
+	rc = secondary_ops->sysctl(table, op);
+	if (rc)
+		return rc;
+
 	tsec = current->security;
 
 	rc = selinux_proc_get_sid(table->de, (op == 001) ?
@@ -1567,22 +1596,6 @@
 	return -ENOMEM;
 }
 
-static int selinux_netlink_send(struct sk_buff *skb)
-{
-	if (capable(CAP_NET_ADMIN))
-		cap_raise (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN);
-	else
-		NETLINK_CB(skb).eff_cap = 0;
-	return 0;
-}
-
-static int selinux_netlink_recv(struct sk_buff *skb)
-{
-	if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN))
-		return -EPERM;
-	return 0;
-}
-
 /* binprm security operations */
 
 static int selinux_bprm_alloc_security(struct linux_binprm *bprm)
@@ -1681,7 +1694,7 @@
 
 static int selinux_bprm_check_security (struct linux_binprm *bprm)
 {
-	return 0;
+	return secondary_ops->bprm_check_security(bprm);
 }
 
 
@@ -1699,12 +1712,7 @@
 					 PROCESS__NOATSECURE, NULL, NULL);
 	}
 
-	/* Note that we must include the legacy uid/gid test below
-	   to retain it, as the new userland will simply use the
-	   value passed by AT_SECURE to decide whether to enable
-	   secure mode. */
-	return ( atsecure || current->euid != current->uid ||
-		current->egid != current->gid);
+	return (atsecure || secondary_ops->bprm_secureexec(bprm));
 }
 
 static void selinux_bprm_free_security(struct linux_binprm *bprm)
@@ -2049,6 +2057,12 @@
                          unsigned long flags,
                          void * data)
 {
+	int rc;
+
+	rc = secondary_ops->sb_mount(dev_name, nd, type, flags, data);
+	if (rc)
+		return rc;
+
 	if (flags & MS_REMOUNT)
 		return superblock_has_perm(current, nd->mnt->mnt_sb,
 		                           FILESYSTEM__REMOUNT, NULL);
@@ -2059,6 +2073,12 @@
 
 static int selinux_umount(struct vfsmount *mnt, int flags)
 {
+	int rc;
+
+	rc = secondary_ops->sb_umount(mnt, flags);
+	if (rc)
+		return rc;
+
 	return superblock_has_perm(current,mnt->mnt_sb,
 	                           FILESYSTEM__UNMOUNT,NULL);
 }
@@ -2102,6 +2122,11 @@
 
 static int selinux_inode_unlink(struct inode *dir, struct dentry *dentry)
 {
+	int rc;
+
+	rc = secondary_ops->inode_unlink(dir, dentry);
+	if (rc)
+		return rc;
 	return may_link(dir, dentry, MAY_UNLINK);
 }
 
@@ -2132,6 +2157,12 @@
 
 static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
 {
+	int rc;
+
+	rc = secondary_ops->inode_mknod(dir, dentry, mode, dev);
+	if (rc)
+		return rc;
+
 	return may_create(dir, dentry, inode_mode_to_security_class(mode));
 }
 
@@ -2170,6 +2201,12 @@
 static int selinux_inode_permission(struct inode *inode, int mask,
 				    struct nameidata *nd)
 {
+	int rc;
+
+	rc = secondary_ops->inode_permission(inode, mask, nd);
+	if (rc)
+		return rc;
+
 	if (!mask) {
 		/* No permission to check.  Existence test. */
 		return 0;
@@ -2181,6 +2218,12 @@
 
 static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
 {
+	int rc;
+
+	rc = secondary_ops->inode_setattr(dentry, iattr);
+	if (rc)
+		return rc;
+
 	if (iattr->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID |
 			       ATTR_ATIME_SET | ATTR_MTIME_SET))
 		return dentry_has_perm(current, NULL, dentry, FILE__SETATTR);
@@ -2447,6 +2490,11 @@
 static int selinux_file_mmap(struct file *file, unsigned long prot, unsigned long flags)
 {
 	u32 av;
+	int rc;
+
+	rc = secondary_ops->file_mmap(file, prot, flags);
+	if (rc)
+		return rc;
 
 	if (file) {
 		/* read access is always possible with a mapping */
@@ -2467,6 +2515,12 @@
 static int selinux_file_mprotect(struct vm_area_struct *vma,
 				 unsigned long prot)
 {
+	int rc;
+
+	rc = secondary_ops->file_mprotect(vma, prot);
+	if (rc)
+		return rc;
+
 	return selinux_file_mmap(vma->vm_file, prot, vma->vm_flags);
 }
 
@@ -2564,6 +2618,12 @@
 
 static int selinux_task_create(unsigned long clone_flags)
 {
+	int rc;
+
+	rc = secondary_ops->task_create(clone_flags);
+	if (rc)
+		return rc;
+
 	return task_has_perm(current, current, PROCESS__FORK);
 }
 
@@ -2639,12 +2699,23 @@
 
 static int selinux_task_setnice(struct task_struct *p, int nice)
 {
+	int rc;
+
+	rc = secondary_ops->task_setnice(p, nice);
+	if (rc)
+		return rc;
+
 	return task_has_perm(current,p, PROCESS__SETSCHED);
 }
 
 static int selinux_task_setrlimit(unsigned int resource, struct rlimit *new_rlim)
 {
 	struct rlimit *old_rlim = current->rlim + resource;
+	int rc;
+
+	rc = secondary_ops->task_setrlimit(resource, new_rlim);
+	if (rc)
+		return rc;
 
 	/* Control the ability to change the hard limit (whether
 	   lowering or raising it), so that the hard limit can
@@ -2679,6 +2750,11 @@
 static int selinux_task_kill(struct task_struct *p, struct siginfo *info, int sig)
 {
 	u32 perm;
+	int rc;
+
+	rc = secondary_ops->task_kill(p, info, sig);
+	if (rc)
+		return rc;
 
 	if (info && ((unsigned long)info == 1 ||
 	             (unsigned long)info == 2 || SI_FROMKERNEL(info)))
@@ -2918,8 +2994,8 @@
 
 	tsec = current->security;
 	err = avc_has_perm(tsec->sid, tsec->sid,
-			   socket_type_to_security_class(family, type),
-			   SOCKET__CREATE, NULL, NULL);
+			   socket_type_to_security_class(family, type,
+			   protocol), SOCKET__CREATE, NULL, NULL);
 
 out:
 	return err;
@@ -2938,7 +3014,7 @@
 	isec = SOCK_INODE(sock)->i_security;
 
 	tsec = current->security;
-	isec->sclass = socket_type_to_security_class(family, type);
+	isec->sclass = socket_type_to_security_class(family, type, protocol);
 	isec->sid = kern ? SECINITSID_KERNEL : tsec->sid;
 
 	return;
@@ -3120,6 +3196,10 @@
 	struct avc_audit_data ad;
 	int err;
 
+	err = secondary_ops->unix_stream_connect(sock, other, newsk);
+	if (err)
+		return err;
+
 	isec = SOCK_INODE(sock)->i_security;
 	other_isec = SOCK_INODE(other)->i_security;
 
@@ -3174,12 +3254,12 @@
 	char *addrp;
 	int len, err = 0;
 	u32 netif_perm, node_perm, node_sid, recv_perm = 0;
+	u32 sock_sid = 0;
+	u16 sock_class = 0;
 	struct socket *sock;
-	struct inode *inode;
 	struct net_device *dev;
 	struct sel_netif *netif;
 	struct netif_security_struct *nsec;
-	struct inode_security_struct *isec;
 	struct avc_audit_data ad;
 
 	family = sk->sk_family;
@@ -3190,15 +3270,21 @@
 	if (family == PF_INET6 && skb->protocol == ntohs(ETH_P_IP))
 		family = PF_INET;
 
-	sock = sk->sk_socket;
-	
-	/* TCP control messages don't always have a socket. */
-	if (!sock)
-		goto out;
-
-	inode = SOCK_INODE(sock);
-	if (!inode)
-		goto out;
+ 	read_lock_bh(&sk->sk_callback_lock);
+ 	sock = sk->sk_socket;
+ 	if (sock) {
+ 		struct inode *inode;
+ 		inode = SOCK_INODE(sock);
+ 		if (inode) {
+ 			struct inode_security_struct *isec;
+ 			isec = inode->i_security;
+ 			sock_sid = isec->sid;
+ 			sock_class = isec->sclass;
+ 		}
+ 	}
+ 	read_unlock_bh(&sk->sk_callback_lock);
+ 	if (!sock_sid)
+  		goto out;
 
 	dev = skb->dev;
 	if (!dev)
@@ -3211,9 +3297,8 @@
 	}
 	
 	nsec = &netif->nsec;
-	isec = inode->i_security;
 
-	switch (isec->sclass) {
+	switch (sock_class) {
 	case SECCLASS_UDP_SOCKET:
 		netif_perm = NETIF__UDP_RECV;
 		node_perm = NODE__UDP_RECV;
@@ -3242,7 +3327,7 @@
 		goto out;
 	}
 
-	err = avc_has_perm(isec->sid, nsec->if_sid, SECCLASS_NETIF,
+	err = avc_has_perm(sock_sid, nsec->if_sid, SECCLASS_NETIF,
 	                   netif_perm, &nsec->avcr, &ad);
 	sel_netif_put(netif);
 	if (err)
@@ -3253,7 +3338,7 @@
 	if (err)
 		goto out;
 	
-	err = avc_has_perm(isec->sid, node_sid, SECCLASS_NODE, node_perm, NULL, &ad);
+	err = avc_has_perm(sock_sid, node_sid, SECCLASS_NODE, node_perm, NULL, &ad);
 	if (err)
 		goto out;
 
@@ -3267,7 +3352,7 @@
 		if (err)
 			goto out;
 
-		err = avc_has_perm(isec->sid, port_sid, isec->sclass,
+		err = avc_has_perm(sock_sid, port_sid, sock_class,
 		                   recv_perm, NULL, &ad);
 	}
 out:	
@@ -3322,6 +3407,33 @@
 	sk_free_security(sk);
 }
 
+static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb)
+{
+	int err = 0;
+	u32 perm;
+	struct nlmsghdr *nlh;
+	struct socket *sock = sk->sk_socket;
+	struct inode_security_struct *isec = SOCK_INODE(sock)->i_security;
+	
+	if (skb->len < NLMSG_SPACE(0)) {
+		err = -EINVAL;
+		goto out;
+	}
+	nlh = (struct nlmsghdr *)skb->data;
+	
+	err = selinux_nlmsg_lookup(isec->sclass, nlh->nlmsg_type, &perm);
+	if (err) {
+		/* Ignore */
+		if (err == -ENOENT)
+			err = 0;
+		goto out;
+	}
+
+	err = socket_has_perm(current, sock, perm);
+out:
+	return err;
+}
+
 #ifdef CONFIG_NETFILTER
 
 static unsigned int selinux_ip_postroute_last(unsigned int hooknum,
@@ -3457,8 +3569,37 @@
 
 #endif	/* CONFIG_NETFILTER */
 
+#else
+
+static inline int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb)
+{
+	return 0;
+}
+
 #endif	/* CONFIG_SECURITY_NETWORK */
 
+static int selinux_netlink_send(struct sock *sk, struct sk_buff *skb)
+{
+	int err = 0;
+
+	if (capable(CAP_NET_ADMIN))
+		cap_raise (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN);
+	else
+		NETLINK_CB(skb).eff_cap = 0;
+
+	if (policydb_loaded_version >= POLICYDB_VERSION_NLCLASS)
+		err = selinux_nlmsg_perm(sk, skb);
+
+	return err;
+}
+
+static int selinux_netlink_recv(struct sk_buff *skb)
+{
+	if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN))
+		return -EPERM;
+	return 0;
+}
+
 static int ipc_alloc_security(struct task_struct *task,
 			      struct kern_ipc_perm *perm,
 			      u16 sclass)
@@ -3784,6 +3925,11 @@
 			     char __user *shmaddr, int shmflg)
 {
 	u32 perms;
+	int rc;
+
+	rc = secondary_ops->shm_shmat(shp, shmaddr, shmflg);
+	if (rc)
+		return rc;
 
 	if (shmflg & SHM_RDONLY)
 		perms = SHM__READ;
--- diff/security/selinux/include/av_inherit.h	2004-05-19 22:13:19.000000000 +0100
+++ source/security/selinux/include/av_inherit.h	2004-07-01 21:32:54.000000000 +0100
@@ -29,6 +29,15 @@
    { SECCLASS_SEM, common_ipc_perm_to_string, 0x00000200UL },
    { SECCLASS_MSGQ, common_ipc_perm_to_string, 0x00000200UL },
    { SECCLASS_SHM, common_ipc_perm_to_string, 0x00000200UL },
+   { SECCLASS_NETLINK_ROUTE_SOCKET, common_socket_perm_to_string, 0x00400000UL },
+   { SECCLASS_NETLINK_FIREWALL_SOCKET, common_socket_perm_to_string, 0x00400000UL },
+   { SECCLASS_NETLINK_TCPDIAG_SOCKET, common_socket_perm_to_string, 0x00400000UL },
+   { SECCLASS_NETLINK_NFLOG_SOCKET, common_socket_perm_to_string, 0x00400000UL },
+   { SECCLASS_NETLINK_XFRM_SOCKET, common_socket_perm_to_string, 0x00400000UL },
+   { SECCLASS_NETLINK_SELINUX_SOCKET, common_socket_perm_to_string, 0x00400000UL },
+   { SECCLASS_NETLINK_AUDIT_SOCKET, common_socket_perm_to_string, 0x00400000UL },
+   { SECCLASS_NETLINK_IP6FW_SOCKET, common_socket_perm_to_string, 0x00400000UL },
+   { SECCLASS_NETLINK_DNRT_SOCKET, common_socket_perm_to_string, 0x00400000UL },
 };
 
 
--- diff/security/selinux/include/av_perm_to_string.h	2004-05-19 22:13:19.000000000 +0100
+++ source/security/selinux/include/av_perm_to_string.h	2004-07-01 21:32:54.000000000 +0100
@@ -30,6 +30,9 @@
    { SECCLASS_TCP_SOCKET, TCP_SOCKET__CONNECTTO, "connectto" },
    { SECCLASS_TCP_SOCKET, TCP_SOCKET__NEWCONN, "newconn" },
    { SECCLASS_TCP_SOCKET, TCP_SOCKET__ACCEPTFROM, "acceptfrom" },
+   { SECCLASS_TCP_SOCKET, TCP_SOCKET__NODE_BIND, "node_bind" },
+   { SECCLASS_UDP_SOCKET, UDP_SOCKET__NODE_BIND, "node_bind" },
+   { SECCLASS_RAWIP_SOCKET, RAWIP_SOCKET__NODE_BIND, "node_bind" },
    { SECCLASS_NODE, NODE__TCP_RECV, "tcp_recv" },
    { SECCLASS_NODE, NODE__TCP_SEND, "tcp_send" },
    { SECCLASS_NODE, NODE__UDP_RECV, "udp_recv" },
@@ -46,9 +49,6 @@
    { SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__CONNECTTO, "connectto" },
    { SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__NEWCONN, "newconn" },
    { SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__ACCEPTFROM, "acceptfrom" },
-   { SECCLASS_TCP_SOCKET, TCP_SOCKET__NODE_BIND, "node_bind" },
-   { SECCLASS_UDP_SOCKET, UDP_SOCKET__NODE_BIND, "node_bind" },
-   { SECCLASS_RAWIP_SOCKET, RAWIP_SOCKET__NODE_BIND, "node_bind" },
    { SECCLASS_PROCESS, PROCESS__FORK, "fork" },
    { SECCLASS_PROCESS, PROCESS__TRANSITION, "transition" },
    { SECCLASS_PROCESS, PROCESS__SIGCHLD, "sigchld" },
@@ -121,6 +121,104 @@
    { SECCLASS_PASSWD, PASSWD__PASSWD, "passwd" },
    { SECCLASS_PASSWD, PASSWD__CHFN, "chfn" },
    { SECCLASS_PASSWD, PASSWD__CHSH, "chsh" },
+   { SECCLASS_PASSWD, PASSWD__ROOTOK, "rootok" },
+   { SECCLASS_DRAWABLE, DRAWABLE__CREATE, "create" },
+   { SECCLASS_DRAWABLE, DRAWABLE__DESTROY, "destroy" },
+   { SECCLASS_DRAWABLE, DRAWABLE__DRAW, "draw" },
+   { SECCLASS_DRAWABLE, DRAWABLE__COPY, "copy" },
+   { SECCLASS_DRAWABLE, DRAWABLE__GETATTR, "getattr" },
+   { SECCLASS_GC, GC__CREATE, "create" },
+   { SECCLASS_GC, GC__FREE, "free" },
+   { SECCLASS_GC, GC__GETATTR, "getattr" },
+   { SECCLASS_GC, GC__SETATTR, "setattr" },
+   { SECCLASS_WINDOW, WINDOW__ADDCHILD, "addchild" },
+   { SECCLASS_WINDOW, WINDOW__CREATE, "create" },
+   { SECCLASS_WINDOW, WINDOW__DESTROY, "destroy" },
+   { SECCLASS_WINDOW, WINDOW__MAP, "map" },
+   { SECCLASS_WINDOW, WINDOW__UNMAP, "unmap" },
+   { SECCLASS_WINDOW, WINDOW__CHSTACK, "chstack" },
+   { SECCLASS_WINDOW, WINDOW__CHPROPLIST, "chproplist" },
+   { SECCLASS_WINDOW, WINDOW__CHPROP, "chprop" },
+   { SECCLASS_WINDOW, WINDOW__LISTPROP, "listprop" },
+   { SECCLASS_WINDOW, WINDOW__GETATTR, "getattr" },
+   { SECCLASS_WINDOW, WINDOW__SETATTR, "setattr" },
+   { SECCLASS_WINDOW, WINDOW__SETFOCUS, "setfocus" },
+   { SECCLASS_WINDOW, WINDOW__MOVE, "move" },
+   { SECCLASS_WINDOW, WINDOW__CHSELECTION, "chselection" },
+   { SECCLASS_WINDOW, WINDOW__CHPARENT, "chparent" },
+   { SECCLASS_WINDOW, WINDOW__CTRLLIFE, "ctrllife" },
+   { SECCLASS_WINDOW, WINDOW__ENUMERATE, "enumerate" },
+   { SECCLASS_WINDOW, WINDOW__TRANSPARENT, "transparent" },
+   { SECCLASS_WINDOW, WINDOW__MOUSEMOTION, "mousemotion" },
+   { SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT, "clientcomevent" },
+   { SECCLASS_WINDOW, WINDOW__INPUTEVENT, "inputevent" },
+   { SECCLASS_WINDOW, WINDOW__DRAWEVENT, "drawevent" },
+   { SECCLASS_WINDOW, WINDOW__WINDOWCHANGEEVENT, "windowchangeevent" },
+   { SECCLASS_WINDOW, WINDOW__WINDOWCHANGEREQUEST, "windowchangerequest" },
+   { SECCLASS_WINDOW, WINDOW__SERVERCHANGEEVENT, "serverchangeevent" },
+   { SECCLASS_WINDOW, WINDOW__EXTENSIONEVENT, "extensionevent" },
+   { SECCLASS_FONT, FONT__LOAD, "load" },
+   { SECCLASS_FONT, FONT__FREE, "free" },
+   { SECCLASS_FONT, FONT__GETATTR, "getattr" },
+   { SECCLASS_FONT, FONT__USE, "use" },
+   { SECCLASS_COLORMAP, COLORMAP__CREATE, "create" },
+   { SECCLASS_COLORMAP, COLORMAP__FREE, "free" },
+   { SECCLASS_COLORMAP, COLORMAP__INSTALL, "install" },
+   { SECCLASS_COLORMAP, COLORMAP__UNINSTALL, "uninstall" },
+   { SECCLASS_COLORMAP, COLORMAP__LIST, "list" },
+   { SECCLASS_COLORMAP, COLORMAP__READ, "read" },
+   { SECCLASS_COLORMAP, COLORMAP__STORE, "store" },
+   { SECCLASS_COLORMAP, COLORMAP__GETATTR, "getattr" },
+   { SECCLASS_COLORMAP, COLORMAP__SETATTR, "setattr" },
+   { SECCLASS_PROPERTY, PROPERTY__CREATE, "create" },
+   { SECCLASS_PROPERTY, PROPERTY__FREE, "free" },
+   { SECCLASS_PROPERTY, PROPERTY__READ, "read" },
+   { SECCLASS_PROPERTY, PROPERTY__WRITE, "write" },
+   { SECCLASS_CURSOR, CURSOR__CREATE, "create" },
+   { SECCLASS_CURSOR, CURSOR__CREATEGLYPH, "createglyph" },
+   { SECCLASS_CURSOR, CURSOR__FREE, "free" },
+   { SECCLASS_CURSOR, CURSOR__ASSIGN, "assign" },
+   { SECCLASS_CURSOR, CURSOR__SETATTR, "setattr" },
+   { SECCLASS_XCLIENT, XCLIENT__KILL, "kill" },
+   { SECCLASS_XINPUT, XINPUT__LOOKUP, "lookup" },
+   { SECCLASS_XINPUT, XINPUT__GETATTR, "getattr" },
+   { SECCLASS_XINPUT, XINPUT__SETATTR, "setattr" },
+   { SECCLASS_XINPUT, XINPUT__SETFOCUS, "setfocus" },
+   { SECCLASS_XINPUT, XINPUT__WARPPOINTER, "warppointer" },
+   { SECCLASS_XINPUT, XINPUT__ACTIVEGRAB, "activegrab" },
+   { SECCLASS_XINPUT, XINPUT__PASSIVEGRAB, "passivegrab" },
+   { SECCLASS_XINPUT, XINPUT__UNGRAB, "ungrab" },
+   { SECCLASS_XINPUT, XINPUT__BELL, "bell" },
+   { SECCLASS_XINPUT, XINPUT__MOUSEMOTION, "mousemotion" },
+   { SECCLASS_XINPUT, XINPUT__RELABELINPUT, "relabelinput" },
+   { SECCLASS_XSERVER, XSERVER__SCREENSAVER, "screensaver" },
+   { SECCLASS_XSERVER, XSERVER__GETHOSTLIST, "gethostlist" },
+   { SECCLASS_XSERVER, XSERVER__SETHOSTLIST, "sethostlist" },
+   { SECCLASS_XSERVER, XSERVER__GETFONTPATH, "getfontpath" },
+   { SECCLASS_XSERVER, XSERVER__SETFONTPATH, "setfontpath" },
+   { SECCLASS_XSERVER, XSERVER__GETATTR, "getattr" },
+   { SECCLASS_XSERVER, XSERVER__GRAB, "grab" },
+   { SECCLASS_XSERVER, XSERVER__UNGRAB, "ungrab" },
+   { SECCLASS_XEXTENSION, XEXTENSION__QUERY, "query" },
+   { SECCLASS_XEXTENSION, XEXTENSION__USE, "use" },
+   { SECCLASS_PAX, PAX__PAGEEXEC, "pageexec" },
+   { SECCLASS_PAX, PAX__EMUTRAMP, "emutramp" },
+   { SECCLASS_PAX, PAX__MPROTECT, "mprotect" },
+   { SECCLASS_PAX, PAX__RANDMMAP, "randmmap" },
+   { SECCLASS_PAX, PAX__RANDEXEC, "randexec" },
+   { SECCLASS_PAX, PAX__SEGMEXEC, "segmexec" },
+   { SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_READ, "nlmsg_read" },
+   { SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_WRITE, "nlmsg_write" },
+   { SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_READ, "nlmsg_read" },
+   { SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_WRITE, "nlmsg_write" },
+   { SECCLASS_NETLINK_TCPDIAG_SOCKET, NETLINK_TCPDIAG_SOCKET__NLMSG_READ, "nlmsg_read" },
+   { SECCLASS_NETLINK_TCPDIAG_SOCKET, NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE, "nlmsg_write" },
+   { SECCLASS_NETLINK_XFRM_SOCKET, NETLINK_XFRM_SOCKET__NLMSG_READ, "nlmsg_read" },
+   { SECCLASS_NETLINK_XFRM_SOCKET, NETLINK_XFRM_SOCKET__NLMSG_WRITE, "nlmsg_write" },
+   { SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_READ, "nlmsg_read" },
+   { SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_WRITE, "nlmsg_write" },
+   { SECCLASS_NETLINK_IP6FW_SOCKET, NETLINK_IP6FW_SOCKET__NLMSG_READ, "nlmsg_read" },
+   { SECCLASS_NETLINK_IP6FW_SOCKET, NETLINK_IP6FW_SOCKET__NLMSG_WRITE, "nlmsg_write" },
 };
 
 
--- diff/security/selinux/include/av_permissions.h	2004-05-19 22:13:19.000000000 +0100
+++ source/security/selinux/include/av_permissions.h	2004-07-01 21:32:54.000000000 +0100
@@ -63,23 +63,23 @@
 #define FILESYSTEM__QUOTAMOD                      0x00000100UL
 #define FILESYSTEM__QUOTAGET                      0x00000200UL
 
-#define DIR__EXECUTE                              0x00002000UL
-#define DIR__UNLINK                               0x00000400UL
+#define DIR__IOCTL                                0x00000001UL
+#define DIR__READ                                 0x00000002UL
+#define DIR__WRITE                                0x00000004UL
+#define DIR__CREATE                               0x00000008UL
+#define DIR__GETATTR                              0x00000010UL
 #define DIR__SETATTR                              0x00000020UL
-#define DIR__QUOTAON                              0x00008000UL
+#define DIR__LOCK                                 0x00000040UL
 #define DIR__RELABELFROM                          0x00000080UL
-#define DIR__LINK                                 0x00000800UL
-#define DIR__WRITE                                0x00000004UL
-#define DIR__IOCTL                                0x00000001UL
 #define DIR__RELABELTO                            0x00000100UL
-#define DIR__READ                                 0x00000002UL
-#define DIR__RENAME                               0x00001000UL
 #define DIR__APPEND                               0x00000200UL
-#define DIR__LOCK                                 0x00000040UL
+#define DIR__UNLINK                               0x00000400UL
+#define DIR__LINK                                 0x00000800UL
+#define DIR__RENAME                               0x00001000UL
+#define DIR__EXECUTE                              0x00002000UL
 #define DIR__SWAPON                               0x00004000UL
-#define DIR__GETATTR                              0x00000010UL
+#define DIR__QUOTAON                              0x00008000UL
 #define DIR__MOUNTON                              0x00010000UL
-#define DIR__CREATE                               0x00000008UL
 
 #define DIR__ADD_NAME                             0x00020000UL
 #define DIR__REMOVE_NAME                          0x00040000UL
@@ -87,216 +87,218 @@
 #define DIR__SEARCH                               0x00100000UL
 #define DIR__RMDIR                                0x00200000UL
 
-#define FILE__EXECUTE                             0x00002000UL
-#define FILE__UNLINK                              0x00000400UL
+#define FILE__IOCTL                               0x00000001UL
+#define FILE__READ                                0x00000002UL
+#define FILE__WRITE                               0x00000004UL
+#define FILE__CREATE                              0x00000008UL
+#define FILE__GETATTR                             0x00000010UL
 #define FILE__SETATTR                             0x00000020UL
-#define FILE__QUOTAON                             0x00008000UL
+#define FILE__LOCK                                0x00000040UL
 #define FILE__RELABELFROM                         0x00000080UL
-#define FILE__LINK                                0x00000800UL
-#define FILE__WRITE                               0x00000004UL
-#define FILE__IOCTL                               0x00000001UL
 #define FILE__RELABELTO                           0x00000100UL
-#define FILE__READ                                0x00000002UL
-#define FILE__RENAME                              0x00001000UL
 #define FILE__APPEND                              0x00000200UL
-#define FILE__LOCK                                0x00000040UL
+#define FILE__UNLINK                              0x00000400UL
+#define FILE__LINK                                0x00000800UL
+#define FILE__RENAME                              0x00001000UL
+#define FILE__EXECUTE                             0x00002000UL
 #define FILE__SWAPON                              0x00004000UL
-#define FILE__GETATTR                             0x00000010UL
+#define FILE__QUOTAON                             0x00008000UL
 #define FILE__MOUNTON                             0x00010000UL
-#define FILE__CREATE                              0x00000008UL
 
 #define FILE__EXECUTE_NO_TRANS                    0x00020000UL
 #define FILE__ENTRYPOINT                          0x00040000UL
 
-#define LNK_FILE__EXECUTE                         0x00002000UL
-#define LNK_FILE__UNLINK                          0x00000400UL
+#define LNK_FILE__IOCTL                           0x00000001UL
+#define LNK_FILE__READ                            0x00000002UL
+#define LNK_FILE__WRITE                           0x00000004UL
+#define LNK_FILE__CREATE                          0x00000008UL
+#define LNK_FILE__GETATTR                         0x00000010UL
 #define LNK_FILE__SETATTR                         0x00000020UL
-#define LNK_FILE__QUOTAON                         0x00008000UL
+#define LNK_FILE__LOCK                            0x00000040UL
 #define LNK_FILE__RELABELFROM                     0x00000080UL
-#define LNK_FILE__LINK                            0x00000800UL
-#define LNK_FILE__WRITE                           0x00000004UL
-#define LNK_FILE__IOCTL                           0x00000001UL
 #define LNK_FILE__RELABELTO                       0x00000100UL
-#define LNK_FILE__READ                            0x00000002UL
-#define LNK_FILE__RENAME                          0x00001000UL
 #define LNK_FILE__APPEND                          0x00000200UL
-#define LNK_FILE__LOCK                            0x00000040UL
+#define LNK_FILE__UNLINK                          0x00000400UL
+#define LNK_FILE__LINK                            0x00000800UL
+#define LNK_FILE__RENAME                          0x00001000UL
+#define LNK_FILE__EXECUTE                         0x00002000UL
 #define LNK_FILE__SWAPON                          0x00004000UL
-#define LNK_FILE__GETATTR                         0x00000010UL
+#define LNK_FILE__QUOTAON                         0x00008000UL
 #define LNK_FILE__MOUNTON                         0x00010000UL
-#define LNK_FILE__CREATE                          0x00000008UL
 
-#define CHR_FILE__EXECUTE                         0x00002000UL
-#define CHR_FILE__UNLINK                          0x00000400UL
+#define CHR_FILE__IOCTL                           0x00000001UL
+#define CHR_FILE__READ                            0x00000002UL
+#define CHR_FILE__WRITE                           0x00000004UL
+#define CHR_FILE__CREATE                          0x00000008UL
+#define CHR_FILE__GETATTR                         0x00000010UL
 #define CHR_FILE__SETATTR                         0x00000020UL
-#define CHR_FILE__QUOTAON                         0x00008000UL
+#define CHR_FILE__LOCK                            0x00000040UL
 #define CHR_FILE__RELABELFROM                     0x00000080UL
-#define CHR_FILE__LINK                            0x00000800UL
-#define CHR_FILE__WRITE                           0x00000004UL
-#define CHR_FILE__IOCTL                           0x00000001UL
 #define CHR_FILE__RELABELTO                       0x00000100UL
-#define CHR_FILE__READ                            0x00000002UL
-#define CHR_FILE__RENAME                          0x00001000UL
 #define CHR_FILE__APPEND                          0x00000200UL
-#define CHR_FILE__LOCK                            0x00000040UL
+#define CHR_FILE__UNLINK                          0x00000400UL
+#define CHR_FILE__LINK                            0x00000800UL
+#define CHR_FILE__RENAME                          0x00001000UL
+#define CHR_FILE__EXECUTE                         0x00002000UL
 #define CHR_FILE__SWAPON                          0x00004000UL
-#define CHR_FILE__GETATTR                         0x00000010UL
+#define CHR_FILE__QUOTAON                         0x00008000UL
 #define CHR_FILE__MOUNTON                         0x00010000UL
-#define CHR_FILE__CREATE                          0x00000008UL
 
-#define BLK_FILE__EXECUTE                         0x00002000UL
-#define BLK_FILE__UNLINK                          0x00000400UL
+#define BLK_FILE__IOCTL                           0x00000001UL
+#define BLK_FILE__READ                            0x00000002UL
+#define BLK_FILE__WRITE                           0x00000004UL
+#define BLK_FILE__CREATE                          0x00000008UL
+#define BLK_FILE__GETATTR                         0x00000010UL
 #define BLK_FILE__SETATTR                         0x00000020UL
-#define BLK_FILE__QUOTAON                         0x00008000UL
+#define BLK_FILE__LOCK                            0x00000040UL
 #define BLK_FILE__RELABELFROM                     0x00000080UL
-#define BLK_FILE__LINK                            0x00000800UL
-#define BLK_FILE__WRITE                           0x00000004UL
-#define BLK_FILE__IOCTL                           0x00000001UL
 #define BLK_FILE__RELABELTO                       0x00000100UL
-#define BLK_FILE__READ                            0x00000002UL
-#define BLK_FILE__RENAME                          0x00001000UL
 #define BLK_FILE__APPEND                          0x00000200UL
-#define BLK_FILE__LOCK                            0x00000040UL
+#define BLK_FILE__UNLINK                          0x00000400UL
+#define BLK_FILE__LINK                            0x00000800UL
+#define BLK_FILE__RENAME                          0x00001000UL
+#define BLK_FILE__EXECUTE                         0x00002000UL
 #define BLK_FILE__SWAPON                          0x00004000UL
-#define BLK_FILE__GETATTR                         0x00000010UL
+#define BLK_FILE__QUOTAON                         0x00008000UL
 #define BLK_FILE__MOUNTON                         0x00010000UL
-#define BLK_FILE__CREATE                          0x00000008UL
 
-#define SOCK_FILE__EXECUTE                        0x00002000UL
-#define SOCK_FILE__UNLINK                         0x00000400UL
+#define SOCK_FILE__IOCTL                          0x00000001UL
+#define SOCK_FILE__READ                           0x00000002UL
+#define SOCK_FILE__WRITE                          0x00000004UL
+#define SOCK_FILE__CREATE                         0x00000008UL
+#define SOCK_FILE__GETATTR                        0x00000010UL
 #define SOCK_FILE__SETATTR                        0x00000020UL
-#define SOCK_FILE__QUOTAON                        0x00008000UL
+#define SOCK_FILE__LOCK                           0x00000040UL
 #define SOCK_FILE__RELABELFROM                    0x00000080UL
-#define SOCK_FILE__LINK                           0x00000800UL
-#define SOCK_FILE__WRITE                          0x00000004UL
-#define SOCK_FILE__IOCTL                          0x00000001UL
 #define SOCK_FILE__RELABELTO                      0x00000100UL
-#define SOCK_FILE__READ                           0x00000002UL
-#define SOCK_FILE__RENAME                         0x00001000UL
 #define SOCK_FILE__APPEND                         0x00000200UL
-#define SOCK_FILE__LOCK                           0x00000040UL
+#define SOCK_FILE__UNLINK                         0x00000400UL
+#define SOCK_FILE__LINK                           0x00000800UL
+#define SOCK_FILE__RENAME                         0x00001000UL
+#define SOCK_FILE__EXECUTE                        0x00002000UL
 #define SOCK_FILE__SWAPON                         0x00004000UL
-#define SOCK_FILE__GETATTR                        0x00000010UL
+#define SOCK_FILE__QUOTAON                        0x00008000UL
 #define SOCK_FILE__MOUNTON                        0x00010000UL
-#define SOCK_FILE__CREATE                         0x00000008UL
 
-#define FIFO_FILE__EXECUTE                        0x00002000UL
-#define FIFO_FILE__UNLINK                         0x00000400UL
+#define FIFO_FILE__IOCTL                          0x00000001UL
+#define FIFO_FILE__READ                           0x00000002UL
+#define FIFO_FILE__WRITE                          0x00000004UL
+#define FIFO_FILE__CREATE                         0x00000008UL
+#define FIFO_FILE__GETATTR                        0x00000010UL
 #define FIFO_FILE__SETATTR                        0x00000020UL
-#define FIFO_FILE__QUOTAON                        0x00008000UL
+#define FIFO_FILE__LOCK                           0x00000040UL
 #define FIFO_FILE__RELABELFROM                    0x00000080UL
-#define FIFO_FILE__LINK                           0x00000800UL
-#define FIFO_FILE__WRITE                          0x00000004UL
-#define FIFO_FILE__IOCTL                          0x00000001UL
 #define FIFO_FILE__RELABELTO                      0x00000100UL
-#define FIFO_FILE__READ                           0x00000002UL
-#define FIFO_FILE__RENAME                         0x00001000UL
 #define FIFO_FILE__APPEND                         0x00000200UL
-#define FIFO_FILE__LOCK                           0x00000040UL
+#define FIFO_FILE__UNLINK                         0x00000400UL
+#define FIFO_FILE__LINK                           0x00000800UL
+#define FIFO_FILE__RENAME                         0x00001000UL
+#define FIFO_FILE__EXECUTE                        0x00002000UL
 #define FIFO_FILE__SWAPON                         0x00004000UL
-#define FIFO_FILE__GETATTR                        0x00000010UL
+#define FIFO_FILE__QUOTAON                        0x00008000UL
 #define FIFO_FILE__MOUNTON                        0x00010000UL
-#define FIFO_FILE__CREATE                         0x00000008UL
 
 #define FD__USE                                   0x00000001UL
 
-#define SOCKET__RELABELTO                         0x00000100UL
-#define SOCKET__RECV_MSG                          0x00080000UL
+#define SOCKET__IOCTL                             0x00000001UL
+#define SOCKET__READ                              0x00000002UL
+#define SOCKET__WRITE                             0x00000004UL
+#define SOCKET__CREATE                            0x00000008UL
+#define SOCKET__GETATTR                           0x00000010UL
+#define SOCKET__SETATTR                           0x00000020UL
+#define SOCKET__LOCK                              0x00000040UL
 #define SOCKET__RELABELFROM                       0x00000080UL
-#define SOCKET__SETOPT                            0x00008000UL
+#define SOCKET__RELABELTO                         0x00000100UL
 #define SOCKET__APPEND                            0x00000200UL
-#define SOCKET__SETATTR                           0x00000020UL
-#define SOCKET__SENDTO                            0x00040000UL
-#define SOCKET__GETOPT                            0x00004000UL
-#define SOCKET__READ                              0x00000002UL
-#define SOCKET__SHUTDOWN                          0x00010000UL
-#define SOCKET__LISTEN                            0x00001000UL
 #define SOCKET__BIND                              0x00000400UL
-#define SOCKET__WRITE                             0x00000004UL
-#define SOCKET__ACCEPT                            0x00002000UL
 #define SOCKET__CONNECT                           0x00000800UL
-#define SOCKET__LOCK                              0x00000040UL
-#define SOCKET__IOCTL                             0x00000001UL
-#define SOCKET__CREATE                            0x00000008UL
-#define SOCKET__NAME_BIND                         0x00200000UL
-#define SOCKET__SEND_MSG                          0x00100000UL
+#define SOCKET__LISTEN                            0x00001000UL
+#define SOCKET__ACCEPT                            0x00002000UL
+#define SOCKET__GETOPT                            0x00004000UL
+#define SOCKET__SETOPT                            0x00008000UL
+#define SOCKET__SHUTDOWN                          0x00010000UL
 #define SOCKET__RECVFROM                          0x00020000UL
-#define SOCKET__GETATTR                           0x00000010UL
+#define SOCKET__SENDTO                            0x00040000UL
+#define SOCKET__RECV_MSG                          0x00080000UL
+#define SOCKET__SEND_MSG                          0x00100000UL
+#define SOCKET__NAME_BIND                         0x00200000UL
 
-#define TCP_SOCKET__RELABELTO                     0x00000100UL
-#define TCP_SOCKET__RECV_MSG                      0x00080000UL
+#define TCP_SOCKET__IOCTL                         0x00000001UL
+#define TCP_SOCKET__READ                          0x00000002UL
+#define TCP_SOCKET__WRITE                         0x00000004UL
+#define TCP_SOCKET__CREATE                        0x00000008UL
+#define TCP_SOCKET__GETATTR                       0x00000010UL
+#define TCP_SOCKET__SETATTR                       0x00000020UL
+#define TCP_SOCKET__LOCK                          0x00000040UL
 #define TCP_SOCKET__RELABELFROM                   0x00000080UL
-#define TCP_SOCKET__SETOPT                        0x00008000UL
+#define TCP_SOCKET__RELABELTO                     0x00000100UL
 #define TCP_SOCKET__APPEND                        0x00000200UL
-#define TCP_SOCKET__SETATTR                       0x00000020UL
-#define TCP_SOCKET__SENDTO                        0x00040000UL
-#define TCP_SOCKET__GETOPT                        0x00004000UL
-#define TCP_SOCKET__READ                          0x00000002UL
-#define TCP_SOCKET__SHUTDOWN                      0x00010000UL
-#define TCP_SOCKET__LISTEN                        0x00001000UL
 #define TCP_SOCKET__BIND                          0x00000400UL
-#define TCP_SOCKET__WRITE                         0x00000004UL
-#define TCP_SOCKET__ACCEPT                        0x00002000UL
 #define TCP_SOCKET__CONNECT                       0x00000800UL
-#define TCP_SOCKET__LOCK                          0x00000040UL
-#define TCP_SOCKET__IOCTL                         0x00000001UL
-#define TCP_SOCKET__CREATE                        0x00000008UL
-#define TCP_SOCKET__NAME_BIND                     0x00200000UL
-#define TCP_SOCKET__SEND_MSG                      0x00100000UL
+#define TCP_SOCKET__LISTEN                        0x00001000UL
+#define TCP_SOCKET__ACCEPT                        0x00002000UL
+#define TCP_SOCKET__GETOPT                        0x00004000UL
+#define TCP_SOCKET__SETOPT                        0x00008000UL
+#define TCP_SOCKET__SHUTDOWN                      0x00010000UL
 #define TCP_SOCKET__RECVFROM                      0x00020000UL
-#define TCP_SOCKET__GETATTR                       0x00000010UL
+#define TCP_SOCKET__SENDTO                        0x00040000UL
+#define TCP_SOCKET__RECV_MSG                      0x00080000UL
+#define TCP_SOCKET__SEND_MSG                      0x00100000UL
+#define TCP_SOCKET__NAME_BIND                     0x00200000UL
 
 #define TCP_SOCKET__CONNECTTO                     0x00400000UL
 #define TCP_SOCKET__NEWCONN                       0x00800000UL
 #define TCP_SOCKET__ACCEPTFROM                    0x01000000UL
 #define TCP_SOCKET__NODE_BIND                     0x02000000UL
 
-#define UDP_SOCKET__RELABELTO                     0x00000100UL
-#define UDP_SOCKET__RECV_MSG                      0x00080000UL
+#define UDP_SOCKET__IOCTL                         0x00000001UL
+#define UDP_SOCKET__READ                          0x00000002UL
+#define UDP_SOCKET__WRITE                         0x00000004UL
+#define UDP_SOCKET__CREATE                        0x00000008UL
+#define UDP_SOCKET__GETATTR                       0x00000010UL
+#define UDP_SOCKET__SETATTR                       0x00000020UL
+#define UDP_SOCKET__LOCK                          0x00000040UL
 #define UDP_SOCKET__RELABELFROM                   0x00000080UL
-#define UDP_SOCKET__SETOPT                        0x00008000UL
+#define UDP_SOCKET__RELABELTO                     0x00000100UL
 #define UDP_SOCKET__APPEND                        0x00000200UL
-#define UDP_SOCKET__SETATTR                       0x00000020UL
-#define UDP_SOCKET__SENDTO                        0x00040000UL
-#define UDP_SOCKET__GETOPT                        0x00004000UL
-#define UDP_SOCKET__READ                          0x00000002UL
-#define UDP_SOCKET__SHUTDOWN                      0x00010000UL
-#define UDP_SOCKET__LISTEN                        0x00001000UL
 #define UDP_SOCKET__BIND                          0x00000400UL
-#define UDP_SOCKET__WRITE                         0x00000004UL
-#define UDP_SOCKET__ACCEPT                        0x00002000UL
 #define UDP_SOCKET__CONNECT                       0x00000800UL
-#define UDP_SOCKET__LOCK                          0x00000040UL
-#define UDP_SOCKET__IOCTL                         0x00000001UL
-#define UDP_SOCKET__CREATE                        0x00000008UL
-#define UDP_SOCKET__NAME_BIND                     0x00200000UL
-#define UDP_SOCKET__SEND_MSG                      0x00100000UL
+#define UDP_SOCKET__LISTEN                        0x00001000UL
+#define UDP_SOCKET__ACCEPT                        0x00002000UL
+#define UDP_SOCKET__GETOPT                        0x00004000UL
+#define UDP_SOCKET__SETOPT                        0x00008000UL
+#define UDP_SOCKET__SHUTDOWN                      0x00010000UL
 #define UDP_SOCKET__RECVFROM                      0x00020000UL
-#define UDP_SOCKET__GETATTR                       0x00000010UL
+#define UDP_SOCKET__SENDTO                        0x00040000UL
+#define UDP_SOCKET__RECV_MSG                      0x00080000UL
+#define UDP_SOCKET__SEND_MSG                      0x00100000UL
+#define UDP_SOCKET__NAME_BIND                     0x00200000UL
+
 #define UDP_SOCKET__NODE_BIND                     0x00400000UL
 
-#define RAWIP_SOCKET__RELABELTO                   0x00000100UL
-#define RAWIP_SOCKET__RECV_MSG                    0x00080000UL
+#define RAWIP_SOCKET__IOCTL                       0x00000001UL
+#define RAWIP_SOCKET__READ                        0x00000002UL
+#define RAWIP_SOCKET__WRITE                       0x00000004UL
+#define RAWIP_SOCKET__CREATE                      0x00000008UL
+#define RAWIP_SOCKET__GETATTR                     0x00000010UL
+#define RAWIP_SOCKET__SETATTR                     0x00000020UL
+#define RAWIP_SOCKET__LOCK                        0x00000040UL
 #define RAWIP_SOCKET__RELABELFROM                 0x00000080UL
-#define RAWIP_SOCKET__SETOPT                      0x00008000UL
+#define RAWIP_SOCKET__RELABELTO                   0x00000100UL
 #define RAWIP_SOCKET__APPEND                      0x00000200UL
-#define RAWIP_SOCKET__SETATTR                     0x00000020UL
-#define RAWIP_SOCKET__SENDTO                      0x00040000UL
-#define RAWIP_SOCKET__GETOPT                      0x00004000UL
-#define RAWIP_SOCKET__READ                        0x00000002UL
-#define RAWIP_SOCKET__SHUTDOWN                    0x00010000UL
-#define RAWIP_SOCKET__LISTEN                      0x00001000UL
 #define RAWIP_SOCKET__BIND                        0x00000400UL
-#define RAWIP_SOCKET__WRITE                       0x00000004UL
-#define RAWIP_SOCKET__ACCEPT                      0x00002000UL
 #define RAWIP_SOCKET__CONNECT                     0x00000800UL
-#define RAWIP_SOCKET__LOCK                        0x00000040UL
-#define RAWIP_SOCKET__IOCTL                       0x00000001UL
-#define RAWIP_SOCKET__CREATE                      0x00000008UL
-#define RAWIP_SOCKET__NAME_BIND                   0x00200000UL
-#define RAWIP_SOCKET__SEND_MSG                    0x00100000UL
+#define RAWIP_SOCKET__LISTEN                      0x00001000UL
+#define RAWIP_SOCKET__ACCEPT                      0x00002000UL
+#define RAWIP_SOCKET__GETOPT                      0x00004000UL
+#define RAWIP_SOCKET__SETOPT                      0x00008000UL
+#define RAWIP_SOCKET__SHUTDOWN                    0x00010000UL
 #define RAWIP_SOCKET__RECVFROM                    0x00020000UL
-#define RAWIP_SOCKET__GETATTR                     0x00000010UL
+#define RAWIP_SOCKET__SENDTO                      0x00040000UL
+#define RAWIP_SOCKET__RECV_MSG                    0x00080000UL
+#define RAWIP_SOCKET__SEND_MSG                    0x00100000UL
+#define RAWIP_SOCKET__NAME_BIND                   0x00200000UL
+
 #define RAWIP_SOCKET__NODE_BIND                   0x00400000UL
 
 #define NODE__TCP_RECV                            0x00000001UL
@@ -314,124 +316,124 @@
 #define NETIF__RAWIP_RECV                         0x00000010UL
 #define NETIF__RAWIP_SEND                         0x00000020UL
 
-#define NETLINK_SOCKET__RELABELTO                 0x00000100UL
-#define NETLINK_SOCKET__RECV_MSG                  0x00080000UL
+#define NETLINK_SOCKET__IOCTL                     0x00000001UL
+#define NETLINK_SOCKET__READ                      0x00000002UL
+#define NETLINK_SOCKET__WRITE                     0x00000004UL
+#define NETLINK_SOCKET__CREATE                    0x00000008UL
+#define NETLINK_SOCKET__GETATTR                   0x00000010UL
+#define NETLINK_SOCKET__SETATTR                   0x00000020UL
+#define NETLINK_SOCKET__LOCK                      0x00000040UL
 #define NETLINK_SOCKET__RELABELFROM               0x00000080UL
-#define NETLINK_SOCKET__SETOPT                    0x00008000UL
+#define NETLINK_SOCKET__RELABELTO                 0x00000100UL
 #define NETLINK_SOCKET__APPEND                    0x00000200UL
-#define NETLINK_SOCKET__SETATTR                   0x00000020UL
-#define NETLINK_SOCKET__SENDTO                    0x00040000UL
-#define NETLINK_SOCKET__GETOPT                    0x00004000UL
-#define NETLINK_SOCKET__READ                      0x00000002UL
-#define NETLINK_SOCKET__SHUTDOWN                  0x00010000UL
-#define NETLINK_SOCKET__LISTEN                    0x00001000UL
 #define NETLINK_SOCKET__BIND                      0x00000400UL
-#define NETLINK_SOCKET__WRITE                     0x00000004UL
-#define NETLINK_SOCKET__ACCEPT                    0x00002000UL
 #define NETLINK_SOCKET__CONNECT                   0x00000800UL
-#define NETLINK_SOCKET__LOCK                      0x00000040UL
-#define NETLINK_SOCKET__IOCTL                     0x00000001UL
-#define NETLINK_SOCKET__CREATE                    0x00000008UL
-#define NETLINK_SOCKET__NAME_BIND                 0x00200000UL
-#define NETLINK_SOCKET__SEND_MSG                  0x00100000UL
+#define NETLINK_SOCKET__LISTEN                    0x00001000UL
+#define NETLINK_SOCKET__ACCEPT                    0x00002000UL
+#define NETLINK_SOCKET__GETOPT                    0x00004000UL
+#define NETLINK_SOCKET__SETOPT                    0x00008000UL
+#define NETLINK_SOCKET__SHUTDOWN                  0x00010000UL
 #define NETLINK_SOCKET__RECVFROM                  0x00020000UL
-#define NETLINK_SOCKET__GETATTR                   0x00000010UL
+#define NETLINK_SOCKET__SENDTO                    0x00040000UL
+#define NETLINK_SOCKET__RECV_MSG                  0x00080000UL
+#define NETLINK_SOCKET__SEND_MSG                  0x00100000UL
+#define NETLINK_SOCKET__NAME_BIND                 0x00200000UL
 
-#define PACKET_SOCKET__RELABELTO                  0x00000100UL
-#define PACKET_SOCKET__RECV_MSG                   0x00080000UL
+#define PACKET_SOCKET__IOCTL                      0x00000001UL
+#define PACKET_SOCKET__READ                       0x00000002UL
+#define PACKET_SOCKET__WRITE                      0x00000004UL
+#define PACKET_SOCKET__CREATE                     0x00000008UL
+#define PACKET_SOCKET__GETATTR                    0x00000010UL
+#define PACKET_SOCKET__SETATTR                    0x00000020UL
+#define PACKET_SOCKET__LOCK                       0x00000040UL
 #define PACKET_SOCKET__RELABELFROM                0x00000080UL
-#define PACKET_SOCKET__SETOPT                     0x00008000UL
+#define PACKET_SOCKET__RELABELTO                  0x00000100UL
 #define PACKET_SOCKET__APPEND                     0x00000200UL
-#define PACKET_SOCKET__SETATTR                    0x00000020UL
-#define PACKET_SOCKET__SENDTO                     0x00040000UL
-#define PACKET_SOCKET__GETOPT                     0x00004000UL
-#define PACKET_SOCKET__READ                       0x00000002UL
-#define PACKET_SOCKET__SHUTDOWN                   0x00010000UL
-#define PACKET_SOCKET__LISTEN                     0x00001000UL
 #define PACKET_SOCKET__BIND                       0x00000400UL
-#define PACKET_SOCKET__WRITE                      0x00000004UL
-#define PACKET_SOCKET__ACCEPT                     0x00002000UL
 #define PACKET_SOCKET__CONNECT                    0x00000800UL
-#define PACKET_SOCKET__LOCK                       0x00000040UL
-#define PACKET_SOCKET__IOCTL                      0x00000001UL
-#define PACKET_SOCKET__CREATE                     0x00000008UL
-#define PACKET_SOCKET__NAME_BIND                  0x00200000UL
-#define PACKET_SOCKET__SEND_MSG                   0x00100000UL
+#define PACKET_SOCKET__LISTEN                     0x00001000UL
+#define PACKET_SOCKET__ACCEPT                     0x00002000UL
+#define PACKET_SOCKET__GETOPT                     0x00004000UL
+#define PACKET_SOCKET__SETOPT                     0x00008000UL
+#define PACKET_SOCKET__SHUTDOWN                   0x00010000UL
 #define PACKET_SOCKET__RECVFROM                   0x00020000UL
-#define PACKET_SOCKET__GETATTR                    0x00000010UL
+#define PACKET_SOCKET__SENDTO                     0x00040000UL
+#define PACKET_SOCKET__RECV_MSG                   0x00080000UL
+#define PACKET_SOCKET__SEND_MSG                   0x00100000UL
+#define PACKET_SOCKET__NAME_BIND                  0x00200000UL
 
-#define KEY_SOCKET__RELABELTO                     0x00000100UL
-#define KEY_SOCKET__RECV_MSG                      0x00080000UL
+#define KEY_SOCKET__IOCTL                         0x00000001UL
+#define KEY_SOCKET__READ                          0x00000002UL
+#define KEY_SOCKET__WRITE                         0x00000004UL
+#define KEY_SOCKET__CREATE                        0x00000008UL
+#define KEY_SOCKET__GETATTR                       0x00000010UL
+#define KEY_SOCKET__SETATTR                       0x00000020UL
+#define KEY_SOCKET__LOCK                          0x00000040UL
 #define KEY_SOCKET__RELABELFROM                   0x00000080UL
-#define KEY_SOCKET__SETOPT                        0x00008000UL
+#define KEY_SOCKET__RELABELTO                     0x00000100UL
 #define KEY_SOCKET__APPEND                        0x00000200UL
-#define KEY_SOCKET__SETATTR                       0x00000020UL
-#define KEY_SOCKET__SENDTO                        0x00040000UL
-#define KEY_SOCKET__GETOPT                        0x00004000UL
-#define KEY_SOCKET__READ                          0x00000002UL
-#define KEY_SOCKET__SHUTDOWN                      0x00010000UL
-#define KEY_SOCKET__LISTEN                        0x00001000UL
 #define KEY_SOCKET__BIND                          0x00000400UL
-#define KEY_SOCKET__WRITE                         0x00000004UL
-#define KEY_SOCKET__ACCEPT                        0x00002000UL
 #define KEY_SOCKET__CONNECT                       0x00000800UL
-#define KEY_SOCKET__LOCK                          0x00000040UL
-#define KEY_SOCKET__IOCTL                         0x00000001UL
-#define KEY_SOCKET__CREATE                        0x00000008UL
-#define KEY_SOCKET__NAME_BIND                     0x00200000UL
-#define KEY_SOCKET__SEND_MSG                      0x00100000UL
+#define KEY_SOCKET__LISTEN                        0x00001000UL
+#define KEY_SOCKET__ACCEPT                        0x00002000UL
+#define KEY_SOCKET__GETOPT                        0x00004000UL
+#define KEY_SOCKET__SETOPT                        0x00008000UL
+#define KEY_SOCKET__SHUTDOWN                      0x00010000UL
 #define KEY_SOCKET__RECVFROM                      0x00020000UL
-#define KEY_SOCKET__GETATTR                       0x00000010UL
+#define KEY_SOCKET__SENDTO                        0x00040000UL
+#define KEY_SOCKET__RECV_MSG                      0x00080000UL
+#define KEY_SOCKET__SEND_MSG                      0x00100000UL
+#define KEY_SOCKET__NAME_BIND                     0x00200000UL
 
-#define UNIX_STREAM_SOCKET__RELABELTO             0x00000100UL
-#define UNIX_STREAM_SOCKET__RECV_MSG              0x00080000UL
+#define UNIX_STREAM_SOCKET__IOCTL                 0x00000001UL
+#define UNIX_STREAM_SOCKET__READ                  0x00000002UL
+#define UNIX_STREAM_SOCKET__WRITE                 0x00000004UL
+#define UNIX_STREAM_SOCKET__CREATE                0x00000008UL
+#define UNIX_STREAM_SOCKET__GETATTR               0x00000010UL
+#define UNIX_STREAM_SOCKET__SETATTR               0x00000020UL
+#define UNIX_STREAM_SOCKET__LOCK                  0x00000040UL
 #define UNIX_STREAM_SOCKET__RELABELFROM           0x00000080UL
-#define UNIX_STREAM_SOCKET__SETOPT                0x00008000UL
+#define UNIX_STREAM_SOCKET__RELABELTO             0x00000100UL
 #define UNIX_STREAM_SOCKET__APPEND                0x00000200UL
-#define UNIX_STREAM_SOCKET__SETATTR               0x00000020UL
-#define UNIX_STREAM_SOCKET__SENDTO                0x00040000UL
-#define UNIX_STREAM_SOCKET__GETOPT                0x00004000UL
-#define UNIX_STREAM_SOCKET__READ                  0x00000002UL
-#define UNIX_STREAM_SOCKET__SHUTDOWN              0x00010000UL
-#define UNIX_STREAM_SOCKET__LISTEN                0x00001000UL
 #define UNIX_STREAM_SOCKET__BIND                  0x00000400UL
-#define UNIX_STREAM_SOCKET__WRITE                 0x00000004UL
-#define UNIX_STREAM_SOCKET__ACCEPT                0x00002000UL
 #define UNIX_STREAM_SOCKET__CONNECT               0x00000800UL
-#define UNIX_STREAM_SOCKET__LOCK                  0x00000040UL
-#define UNIX_STREAM_SOCKET__IOCTL                 0x00000001UL
-#define UNIX_STREAM_SOCKET__CREATE                0x00000008UL
-#define UNIX_STREAM_SOCKET__NAME_BIND             0x00200000UL
-#define UNIX_STREAM_SOCKET__SEND_MSG              0x00100000UL
+#define UNIX_STREAM_SOCKET__LISTEN                0x00001000UL
+#define UNIX_STREAM_SOCKET__ACCEPT                0x00002000UL
+#define UNIX_STREAM_SOCKET__GETOPT                0x00004000UL
+#define UNIX_STREAM_SOCKET__SETOPT                0x00008000UL
+#define UNIX_STREAM_SOCKET__SHUTDOWN              0x00010000UL
 #define UNIX_STREAM_SOCKET__RECVFROM              0x00020000UL
-#define UNIX_STREAM_SOCKET__GETATTR               0x00000010UL
+#define UNIX_STREAM_SOCKET__SENDTO                0x00040000UL
+#define UNIX_STREAM_SOCKET__RECV_MSG              0x00080000UL
+#define UNIX_STREAM_SOCKET__SEND_MSG              0x00100000UL
+#define UNIX_STREAM_SOCKET__NAME_BIND             0x00200000UL
 
 #define UNIX_STREAM_SOCKET__CONNECTTO             0x00400000UL
 #define UNIX_STREAM_SOCKET__NEWCONN               0x00800000UL
 #define UNIX_STREAM_SOCKET__ACCEPTFROM            0x01000000UL
 
-#define UNIX_DGRAM_SOCKET__RELABELTO              0x00000100UL
-#define UNIX_DGRAM_SOCKET__RECV_MSG               0x00080000UL
+#define UNIX_DGRAM_SOCKET__IOCTL                  0x00000001UL
+#define UNIX_DGRAM_SOCKET__READ                   0x00000002UL
+#define UNIX_DGRAM_SOCKET__WRITE                  0x00000004UL
+#define UNIX_DGRAM_SOCKET__CREATE                 0x00000008UL
+#define UNIX_DGRAM_SOCKET__GETATTR                0x00000010UL
+#define UNIX_DGRAM_SOCKET__SETATTR                0x00000020UL
+#define UNIX_DGRAM_SOCKET__LOCK                   0x00000040UL
 #define UNIX_DGRAM_SOCKET__RELABELFROM            0x00000080UL
-#define UNIX_DGRAM_SOCKET__SETOPT                 0x00008000UL
+#define UNIX_DGRAM_SOCKET__RELABELTO              0x00000100UL
 #define UNIX_DGRAM_SOCKET__APPEND                 0x00000200UL
-#define UNIX_DGRAM_SOCKET__SETATTR                0x00000020UL
-#define UNIX_DGRAM_SOCKET__SENDTO                 0x00040000UL
-#define UNIX_DGRAM_SOCKET__GETOPT                 0x00004000UL
-#define UNIX_DGRAM_SOCKET__READ                   0x00000002UL
-#define UNIX_DGRAM_SOCKET__SHUTDOWN               0x00010000UL
-#define UNIX_DGRAM_SOCKET__LISTEN                 0x00001000UL
 #define UNIX_DGRAM_SOCKET__BIND                   0x00000400UL
-#define UNIX_DGRAM_SOCKET__WRITE                  0x00000004UL
-#define UNIX_DGRAM_SOCKET__ACCEPT                 0x00002000UL
 #define UNIX_DGRAM_SOCKET__CONNECT                0x00000800UL
-#define UNIX_DGRAM_SOCKET__LOCK                   0x00000040UL
-#define UNIX_DGRAM_SOCKET__IOCTL                  0x00000001UL
-#define UNIX_DGRAM_SOCKET__CREATE                 0x00000008UL
-#define UNIX_DGRAM_SOCKET__NAME_BIND              0x00200000UL
-#define UNIX_DGRAM_SOCKET__SEND_MSG               0x00100000UL
+#define UNIX_DGRAM_SOCKET__LISTEN                 0x00001000UL
+#define UNIX_DGRAM_SOCKET__ACCEPT                 0x00002000UL
+#define UNIX_DGRAM_SOCKET__GETOPT                 0x00004000UL
+#define UNIX_DGRAM_SOCKET__SETOPT                 0x00008000UL
+#define UNIX_DGRAM_SOCKET__SHUTDOWN               0x00010000UL
 #define UNIX_DGRAM_SOCKET__RECVFROM               0x00020000UL
-#define UNIX_DGRAM_SOCKET__GETATTR                0x00000010UL
+#define UNIX_DGRAM_SOCKET__SENDTO                 0x00040000UL
+#define UNIX_DGRAM_SOCKET__RECV_MSG               0x00080000UL
+#define UNIX_DGRAM_SOCKET__SEND_MSG               0x00100000UL
+#define UNIX_DGRAM_SOCKET__NAME_BIND              0x00200000UL
 
 #define PROCESS__FORK                             0x00000001UL
 #define PROCESS__TRANSITION                       0x00000002UL
@@ -457,50 +459,50 @@
 #define PROCESS__SETRLIMIT                        0x00200000UL
 #define PROCESS__RLIMITINH                        0x00400000UL
 
+#define IPC__CREATE                               0x00000001UL
+#define IPC__DESTROY                              0x00000002UL
+#define IPC__GETATTR                              0x00000004UL
 #define IPC__SETATTR                              0x00000008UL
 #define IPC__READ                                 0x00000010UL
+#define IPC__WRITE                                0x00000020UL
 #define IPC__ASSOCIATE                            0x00000040UL
-#define IPC__DESTROY                              0x00000002UL
-#define IPC__UNIX_WRITE                           0x00000100UL
-#define IPC__CREATE                               0x00000001UL
 #define IPC__UNIX_READ                            0x00000080UL
-#define IPC__GETATTR                              0x00000004UL
-#define IPC__WRITE                                0x00000020UL
+#define IPC__UNIX_WRITE                           0x00000100UL
 
+#define SEM__CREATE                               0x00000001UL
+#define SEM__DESTROY                              0x00000002UL
+#define SEM__GETATTR                              0x00000004UL
 #define SEM__SETATTR                              0x00000008UL
 #define SEM__READ                                 0x00000010UL
+#define SEM__WRITE                                0x00000020UL
 #define SEM__ASSOCIATE                            0x00000040UL
-#define SEM__DESTROY                              0x00000002UL
-#define SEM__UNIX_WRITE                           0x00000100UL
-#define SEM__CREATE                               0x00000001UL
 #define SEM__UNIX_READ                            0x00000080UL
-#define SEM__GETATTR                              0x00000004UL
-#define SEM__WRITE                                0x00000020UL
+#define SEM__UNIX_WRITE                           0x00000100UL
 
+#define MSGQ__CREATE                              0x00000001UL
+#define MSGQ__DESTROY                             0x00000002UL
+#define MSGQ__GETATTR                             0x00000004UL
 #define MSGQ__SETATTR                             0x00000008UL
 #define MSGQ__READ                                0x00000010UL
+#define MSGQ__WRITE                               0x00000020UL
 #define MSGQ__ASSOCIATE                           0x00000040UL
-#define MSGQ__DESTROY                             0x00000002UL
-#define MSGQ__UNIX_WRITE                          0x00000100UL
-#define MSGQ__CREATE                              0x00000001UL
 #define MSGQ__UNIX_READ                           0x00000080UL
-#define MSGQ__GETATTR                             0x00000004UL
-#define MSGQ__WRITE                               0x00000020UL
+#define MSGQ__UNIX_WRITE                          0x00000100UL
 
 #define MSGQ__ENQUEUE                             0x00000200UL
 
 #define MSG__SEND                                 0x00000001UL
 #define MSG__RECEIVE                              0x00000002UL
 
+#define SHM__CREATE                               0x00000001UL
+#define SHM__DESTROY                              0x00000002UL
+#define SHM__GETATTR                              0x00000004UL
 #define SHM__SETATTR                              0x00000008UL
 #define SHM__READ                                 0x00000010UL
+#define SHM__WRITE                                0x00000020UL
 #define SHM__ASSOCIATE                            0x00000040UL
-#define SHM__DESTROY                              0x00000002UL
-#define SHM__UNIX_WRITE                           0x00000100UL
-#define SHM__CREATE                               0x00000001UL
 #define SHM__UNIX_READ                            0x00000080UL
-#define SHM__GETATTR                              0x00000004UL
-#define SHM__WRITE                                0x00000020UL
+#define SHM__UNIX_WRITE                           0x00000100UL
 
 #define SHM__LOCK                                 0x00000200UL
 
@@ -552,6 +554,327 @@
 #define PASSWD__PASSWD                            0x00000001UL
 #define PASSWD__CHFN                              0x00000002UL
 #define PASSWD__CHSH                              0x00000004UL
+#define PASSWD__ROOTOK                            0x00000008UL
 
+#define DRAWABLE__CREATE                          0x00000001UL
+#define DRAWABLE__DESTROY                         0x00000002UL
+#define DRAWABLE__DRAW                            0x00000004UL
+#define DRAWABLE__COPY                            0x00000008UL
+#define DRAWABLE__GETATTR                         0x00000010UL
+
+#define GC__CREATE                                0x00000001UL
+#define GC__FREE                                  0x00000002UL
+#define GC__GETATTR                               0x00000004UL
+#define GC__SETATTR                               0x00000008UL
+
+#define WINDOW__ADDCHILD                          0x00000001UL
+#define WINDOW__CREATE                            0x00000002UL
+#define WINDOW__DESTROY                           0x00000004UL
+#define WINDOW__MAP                               0x00000008UL
+#define WINDOW__UNMAP                             0x00000010UL
+#define WINDOW__CHSTACK                           0x00000020UL
+#define WINDOW__CHPROPLIST                        0x00000040UL
+#define WINDOW__CHPROP                            0x00000080UL
+#define WINDOW__LISTPROP                          0x00000100UL
+#define WINDOW__GETATTR                           0x00000200UL
+#define WINDOW__SETATTR                           0x00000400UL
+#define WINDOW__SETFOCUS                          0x00000800UL
+#define WINDOW__MOVE                              0x00001000UL
+#define WINDOW__CHSELECTION                       0x00002000UL
+#define WINDOW__CHPARENT                          0x00004000UL
+#define WINDOW__CTRLLIFE                          0x00008000UL
+#define WINDOW__ENUMERATE                         0x00010000UL
+#define WINDOW__TRANSPARENT                       0x00020000UL
+#define WINDOW__MOUSEMOTION                       0x00040000UL
+#define WINDOW__CLIENTCOMEVENT                    0x00080000UL
+#define WINDOW__INPUTEVENT                        0x00100000UL
+#define WINDOW__DRAWEVENT                         0x00200000UL
+#define WINDOW__WINDOWCHANGEEVENT                 0x00400000UL
+#define WINDOW__WINDOWCHANGEREQUEST               0x00800000UL
+#define WINDOW__SERVERCHANGEEVENT                 0x01000000UL
+#define WINDOW__EXTENSIONEVENT                    0x02000000UL
+
+#define FONT__LOAD                                0x00000001UL
+#define FONT__FREE                                0x00000002UL
+#define FONT__GETATTR                             0x00000004UL
+#define FONT__USE                                 0x00000008UL
+
+#define COLORMAP__CREATE                          0x00000001UL
+#define COLORMAP__FREE                            0x00000002UL
+#define COLORMAP__INSTALL                         0x00000004UL
+#define COLORMAP__UNINSTALL                       0x00000008UL
+#define COLORMAP__LIST                            0x00000010UL
+#define COLORMAP__READ                            0x00000020UL
+#define COLORMAP__STORE                           0x00000040UL
+#define COLORMAP__GETATTR                         0x00000080UL
+#define COLORMAP__SETATTR                         0x00000100UL
+
+#define PROPERTY__CREATE                          0x00000001UL
+#define PROPERTY__FREE                            0x00000002UL
+#define PROPERTY__READ                            0x00000004UL
+#define PROPERTY__WRITE                           0x00000008UL
+
+#define CURSOR__CREATE                            0x00000001UL
+#define CURSOR__CREATEGLYPH                       0x00000002UL
+#define CURSOR__FREE                              0x00000004UL
+#define CURSOR__ASSIGN                            0x00000008UL
+#define CURSOR__SETATTR                           0x00000010UL
+
+#define XCLIENT__KILL                             0x00000001UL
+
+#define XINPUT__LOOKUP                            0x00000001UL
+#define XINPUT__GETATTR                           0x00000002UL
+#define XINPUT__SETATTR                           0x00000004UL
+#define XINPUT__SETFOCUS                          0x00000008UL
+#define XINPUT__WARPPOINTER                       0x00000010UL
+#define XINPUT__ACTIVEGRAB                        0x00000020UL
+#define XINPUT__PASSIVEGRAB                       0x00000040UL
+#define XINPUT__UNGRAB                            0x00000080UL
+#define XINPUT__BELL                              0x00000100UL
+#define XINPUT__MOUSEMOTION                       0x00000200UL
+#define XINPUT__RELABELINPUT                      0x00000400UL
+
+#define XSERVER__SCREENSAVER                      0x00000001UL
+#define XSERVER__GETHOSTLIST                      0x00000002UL
+#define XSERVER__SETHOSTLIST                      0x00000004UL
+#define XSERVER__GETFONTPATH                      0x00000008UL
+#define XSERVER__SETFONTPATH                      0x00000010UL
+#define XSERVER__GETATTR                          0x00000020UL
+#define XSERVER__GRAB                             0x00000040UL
+#define XSERVER__UNGRAB                           0x00000080UL
+
+#define XEXTENSION__QUERY                         0x00000001UL
+#define XEXTENSION__USE                           0x00000002UL
+
+#define PAX__PAGEEXEC                             0x00000001UL
+#define PAX__EMUTRAMP                             0x00000002UL
+#define PAX__MPROTECT                             0x00000004UL
+#define PAX__RANDMMAP                             0x00000008UL
+#define PAX__RANDEXEC                             0x00000010UL
+#define PAX__SEGMEXEC                             0x00000020UL
+
+#define NETLINK_ROUTE_SOCKET__IOCTL               0x00000001UL
+#define NETLINK_ROUTE_SOCKET__READ                0x00000002UL
+#define NETLINK_ROUTE_SOCKET__WRITE               0x00000004UL
+#define NETLINK_ROUTE_SOCKET__CREATE              0x00000008UL
+#define NETLINK_ROUTE_SOCKET__GETATTR             0x00000010UL
+#define NETLINK_ROUTE_SOCKET__SETATTR             0x00000020UL
+#define NETLINK_ROUTE_SOCKET__LOCK                0x00000040UL
+#define NETLINK_ROUTE_SOCKET__RELABELFROM         0x00000080UL
+#define NETLINK_ROUTE_SOCKET__RELABELTO           0x00000100UL
+#define NETLINK_ROUTE_SOCKET__APPEND              0x00000200UL
+#define NETLINK_ROUTE_SOCKET__BIND                0x00000400UL
+#define NETLINK_ROUTE_SOCKET__CONNECT             0x00000800UL
+#define NETLINK_ROUTE_SOCKET__LISTEN              0x00001000UL
+#define NETLINK_ROUTE_SOCKET__ACCEPT              0x00002000UL
+#define NETLINK_ROUTE_SOCKET__GETOPT              0x00004000UL
+#define NETLINK_ROUTE_SOCKET__SETOPT              0x00008000UL
+#define NETLINK_ROUTE_SOCKET__SHUTDOWN            0x00010000UL
+#define NETLINK_ROUTE_SOCKET__RECVFROM            0x00020000UL
+#define NETLINK_ROUTE_SOCKET__SENDTO              0x00040000UL
+#define NETLINK_ROUTE_SOCKET__RECV_MSG            0x00080000UL
+#define NETLINK_ROUTE_SOCKET__SEND_MSG            0x00100000UL
+#define NETLINK_ROUTE_SOCKET__NAME_BIND           0x00200000UL
+
+#define NETLINK_ROUTE_SOCKET__NLMSG_READ          0x00400000UL
+#define NETLINK_ROUTE_SOCKET__NLMSG_WRITE         0x00800000UL
+
+#define NETLINK_FIREWALL_SOCKET__IOCTL            0x00000001UL
+#define NETLINK_FIREWALL_SOCKET__READ             0x00000002UL
+#define NETLINK_FIREWALL_SOCKET__WRITE            0x00000004UL
+#define NETLINK_FIREWALL_SOCKET__CREATE           0x00000008UL
+#define NETLINK_FIREWALL_SOCKET__GETATTR          0x00000010UL
+#define NETLINK_FIREWALL_SOCKET__SETATTR          0x00000020UL
+#define NETLINK_FIREWALL_SOCKET__LOCK             0x00000040UL
+#define NETLINK_FIREWALL_SOCKET__RELABELFROM      0x00000080UL
+#define NETLINK_FIREWALL_SOCKET__RELABELTO        0x00000100UL
+#define NETLINK_FIREWALL_SOCKET__APPEND           0x00000200UL
+#define NETLINK_FIREWALL_SOCKET__BIND             0x00000400UL
+#define NETLINK_FIREWALL_SOCKET__CONNECT          0x00000800UL
+#define NETLINK_FIREWALL_SOCKET__LISTEN           0x00001000UL
+#define NETLINK_FIREWALL_SOCKET__ACCEPT           0x00002000UL
+#define NETLINK_FIREWALL_SOCKET__GETOPT           0x00004000UL
+#define NETLINK_FIREWALL_SOCKET__SETOPT           0x00008000UL
+#define NETLINK_FIREWALL_SOCKET__SHUTDOWN         0x00010000UL
+#define NETLINK_FIREWALL_SOCKET__RECVFROM         0x00020000UL
+#define NETLINK_FIREWALL_SOCKET__SENDTO           0x00040000UL
+#define NETLINK_FIREWALL_SOCKET__RECV_MSG         0x00080000UL
+#define NETLINK_FIREWALL_SOCKET__SEND_MSG         0x00100000UL
+#define NETLINK_FIREWALL_SOCKET__NAME_BIND        0x00200000UL
+
+#define NETLINK_FIREWALL_SOCKET__NLMSG_READ       0x00400000UL
+#define NETLINK_FIREWALL_SOCKET__NLMSG_WRITE      0x00800000UL
+
+#define NETLINK_TCPDIAG_SOCKET__IOCTL             0x00000001UL
+#define NETLINK_TCPDIAG_SOCKET__READ              0x00000002UL
+#define NETLINK_TCPDIAG_SOCKET__WRITE             0x00000004UL
+#define NETLINK_TCPDIAG_SOCKET__CREATE            0x00000008UL
+#define NETLINK_TCPDIAG_SOCKET__GETATTR           0x00000010UL
+#define NETLINK_TCPDIAG_SOCKET__SETATTR           0x00000020UL
+#define NETLINK_TCPDIAG_SOCKET__LOCK              0x00000040UL
+#define NETLINK_TCPDIAG_SOCKET__RELABELFROM       0x00000080UL
+#define NETLINK_TCPDIAG_SOCKET__RELABELTO         0x00000100UL
+#define NETLINK_TCPDIAG_SOCKET__APPEND            0x00000200UL
+#define NETLINK_TCPDIAG_SOCKET__BIND              0x00000400UL
+#define NETLINK_TCPDIAG_SOCKET__CONNECT           0x00000800UL
+#define NETLINK_TCPDIAG_SOCKET__LISTEN            0x00001000UL
+#define NETLINK_TCPDIAG_SOCKET__ACCEPT            0x00002000UL
+#define NETLINK_TCPDIAG_SOCKET__GETOPT            0x00004000UL
+#define NETLINK_TCPDIAG_SOCKET__SETOPT            0x00008000UL
+#define NETLINK_TCPDIAG_SOCKET__SHUTDOWN          0x00010000UL
+#define NETLINK_TCPDIAG_SOCKET__RECVFROM          0x00020000UL
+#define NETLINK_TCPDIAG_SOCKET__SENDTO            0x00040000UL
+#define NETLINK_TCPDIAG_SOCKET__RECV_MSG          0x00080000UL
+#define NETLINK_TCPDIAG_SOCKET__SEND_MSG          0x00100000UL
+#define NETLINK_TCPDIAG_SOCKET__NAME_BIND         0x00200000UL
+
+#define NETLINK_TCPDIAG_SOCKET__NLMSG_READ        0x00400000UL
+#define NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE       0x00800000UL
+
+#define NETLINK_NFLOG_SOCKET__IOCTL               0x00000001UL
+#define NETLINK_NFLOG_SOCKET__READ                0x00000002UL
+#define NETLINK_NFLOG_SOCKET__WRITE               0x00000004UL
+#define NETLINK_NFLOG_SOCKET__CREATE              0x00000008UL
+#define NETLINK_NFLOG_SOCKET__GETATTR             0x00000010UL
+#define NETLINK_NFLOG_SOCKET__SETATTR             0x00000020UL
+#define NETLINK_NFLOG_SOCKET__LOCK                0x00000040UL
+#define NETLINK_NFLOG_SOCKET__RELABELFROM         0x00000080UL
+#define NETLINK_NFLOG_SOCKET__RELABELTO           0x00000100UL
+#define NETLINK_NFLOG_SOCKET__APPEND              0x00000200UL
+#define NETLINK_NFLOG_SOCKET__BIND                0x00000400UL
+#define NETLINK_NFLOG_SOCKET__CONNECT             0x00000800UL
+#define NETLINK_NFLOG_SOCKET__LISTEN              0x00001000UL
+#define NETLINK_NFLOG_SOCKET__ACCEPT              0x00002000UL
+#define NETLINK_NFLOG_SOCKET__GETOPT              0x00004000UL
+#define NETLINK_NFLOG_SOCKET__SETOPT              0x00008000UL
+#define NETLINK_NFLOG_SOCKET__SHUTDOWN            0x00010000UL
+#define NETLINK_NFLOG_SOCKET__RECVFROM            0x00020000UL
+#define NETLINK_NFLOG_SOCKET__SENDTO              0x00040000UL
+#define NETLINK_NFLOG_SOCKET__RECV_MSG            0x00080000UL
+#define NETLINK_NFLOG_SOCKET__SEND_MSG            0x00100000UL
+#define NETLINK_NFLOG_SOCKET__NAME_BIND           0x00200000UL
+
+#define NETLINK_XFRM_SOCKET__IOCTL                0x00000001UL
+#define NETLINK_XFRM_SOCKET__READ                 0x00000002UL
+#define NETLINK_XFRM_SOCKET__WRITE                0x00000004UL
+#define NETLINK_XFRM_SOCKET__CREATE               0x00000008UL
+#define NETLINK_XFRM_SOCKET__GETATTR              0x00000010UL
+#define NETLINK_XFRM_SOCKET__SETATTR              0x00000020UL
+#define NETLINK_XFRM_SOCKET__LOCK                 0x00000040UL
+#define NETLINK_XFRM_SOCKET__RELABELFROM          0x00000080UL
+#define NETLINK_XFRM_SOCKET__RELABELTO            0x00000100UL
+#define NETLINK_XFRM_SOCKET__APPEND               0x00000200UL
+#define NETLINK_XFRM_SOCKET__BIND                 0x00000400UL
+#define NETLINK_XFRM_SOCKET__CONNECT              0x00000800UL
+#define NETLINK_XFRM_SOCKET__LISTEN               0x00001000UL
+#define NETLINK_XFRM_SOCKET__ACCEPT               0x00002000UL
+#define NETLINK_XFRM_SOCKET__GETOPT               0x00004000UL
+#define NETLINK_XFRM_SOCKET__SETOPT               0x00008000UL
+#define NETLINK_XFRM_SOCKET__SHUTDOWN             0x00010000UL
+#define NETLINK_XFRM_SOCKET__RECVFROM             0x00020000UL
+#define NETLINK_XFRM_SOCKET__SENDTO               0x00040000UL
+#define NETLINK_XFRM_SOCKET__RECV_MSG             0x00080000UL
+#define NETLINK_XFRM_SOCKET__SEND_MSG             0x00100000UL
+#define NETLINK_XFRM_SOCKET__NAME_BIND            0x00200000UL
+
+#define NETLINK_XFRM_SOCKET__NLMSG_READ           0x00400000UL
+#define NETLINK_XFRM_SOCKET__NLMSG_WRITE          0x00800000UL
+
+#define NETLINK_SELINUX_SOCKET__IOCTL             0x00000001UL
+#define NETLINK_SELINUX_SOCKET__READ              0x00000002UL
+#define NETLINK_SELINUX_SOCKET__WRITE             0x00000004UL
+#define NETLINK_SELINUX_SOCKET__CREATE            0x00000008UL
+#define NETLINK_SELINUX_SOCKET__GETATTR           0x00000010UL
+#define NETLINK_SELINUX_SOCKET__SETATTR           0x00000020UL
+#define NETLINK_SELINUX_SOCKET__LOCK              0x00000040UL
+#define NETLINK_SELINUX_SOCKET__RELABELFROM       0x00000080UL
+#define NETLINK_SELINUX_SOCKET__RELABELTO         0x00000100UL
+#define NETLINK_SELINUX_SOCKET__APPEND            0x00000200UL
+#define NETLINK_SELINUX_SOCKET__BIND              0x00000400UL
+#define NETLINK_SELINUX_SOCKET__CONNECT           0x00000800UL
+#define NETLINK_SELINUX_SOCKET__LISTEN            0x00001000UL
+#define NETLINK_SELINUX_SOCKET__ACCEPT            0x00002000UL
+#define NETLINK_SELINUX_SOCKET__GETOPT            0x00004000UL
+#define NETLINK_SELINUX_SOCKET__SETOPT            0x00008000UL
+#define NETLINK_SELINUX_SOCKET__SHUTDOWN          0x00010000UL
+#define NETLINK_SELINUX_SOCKET__RECVFROM          0x00020000UL
+#define NETLINK_SELINUX_SOCKET__SENDTO            0x00040000UL
+#define NETLINK_SELINUX_SOCKET__RECV_MSG          0x00080000UL
+#define NETLINK_SELINUX_SOCKET__SEND_MSG          0x00100000UL
+#define NETLINK_SELINUX_SOCKET__NAME_BIND         0x00200000UL
+
+#define NETLINK_AUDIT_SOCKET__IOCTL               0x00000001UL
+#define NETLINK_AUDIT_SOCKET__READ                0x00000002UL
+#define NETLINK_AUDIT_SOCKET__WRITE               0x00000004UL
+#define NETLINK_AUDIT_SOCKET__CREATE              0x00000008UL
+#define NETLINK_AUDIT_SOCKET__GETATTR             0x00000010UL
+#define NETLINK_AUDIT_SOCKET__SETATTR             0x00000020UL
+#define NETLINK_AUDIT_SOCKET__LOCK                0x00000040UL
+#define NETLINK_AUDIT_SOCKET__RELABELFROM         0x00000080UL
+#define NETLINK_AUDIT_SOCKET__RELABELTO           0x00000100UL
+#define NETLINK_AUDIT_SOCKET__APPEND              0x00000200UL
+#define NETLINK_AUDIT_SOCKET__BIND                0x00000400UL
+#define NETLINK_AUDIT_SOCKET__CONNECT             0x00000800UL
+#define NETLINK_AUDIT_SOCKET__LISTEN              0x00001000UL
+#define NETLINK_AUDIT_SOCKET__ACCEPT              0x00002000UL
+#define NETLINK_AUDIT_SOCKET__GETOPT              0x00004000UL
+#define NETLINK_AUDIT_SOCKET__SETOPT              0x00008000UL
+#define NETLINK_AUDIT_SOCKET__SHUTDOWN            0x00010000UL
+#define NETLINK_AUDIT_SOCKET__RECVFROM            0x00020000UL
+#define NETLINK_AUDIT_SOCKET__SENDTO              0x00040000UL
+#define NETLINK_AUDIT_SOCKET__RECV_MSG            0x00080000UL
+#define NETLINK_AUDIT_SOCKET__SEND_MSG            0x00100000UL
+#define NETLINK_AUDIT_SOCKET__NAME_BIND           0x00200000UL
+
+#define NETLINK_AUDIT_SOCKET__NLMSG_READ          0x00400000UL
+#define NETLINK_AUDIT_SOCKET__NLMSG_WRITE         0x00800000UL
+
+#define NETLINK_IP6FW_SOCKET__IOCTL               0x00000001UL
+#define NETLINK_IP6FW_SOCKET__READ                0x00000002UL
+#define NETLINK_IP6FW_SOCKET__WRITE               0x00000004UL
+#define NETLINK_IP6FW_SOCKET__CREATE              0x00000008UL
+#define NETLINK_IP6FW_SOCKET__GETATTR             0x00000010UL
+#define NETLINK_IP6FW_SOCKET__SETATTR             0x00000020UL
+#define NETLINK_IP6FW_SOCKET__LOCK                0x00000040UL
+#define NETLINK_IP6FW_SOCKET__RELABELFROM         0x00000080UL
+#define NETLINK_IP6FW_SOCKET__RELABELTO           0x00000100UL
+#define NETLINK_IP6FW_SOCKET__APPEND              0x00000200UL
+#define NETLINK_IP6FW_SOCKET__BIND                0x00000400UL
+#define NETLINK_IP6FW_SOCKET__CONNECT             0x00000800UL
+#define NETLINK_IP6FW_SOCKET__LISTEN              0x00001000UL
+#define NETLINK_IP6FW_SOCKET__ACCEPT              0x00002000UL
+#define NETLINK_IP6FW_SOCKET__GETOPT              0x00004000UL
+#define NETLINK_IP6FW_SOCKET__SETOPT              0x00008000UL
+#define NETLINK_IP6FW_SOCKET__SHUTDOWN            0x00010000UL
+#define NETLINK_IP6FW_SOCKET__RECVFROM            0x00020000UL
+#define NETLINK_IP6FW_SOCKET__SENDTO              0x00040000UL
+#define NETLINK_IP6FW_SOCKET__RECV_MSG            0x00080000UL
+#define NETLINK_IP6FW_SOCKET__SEND_MSG            0x00100000UL
+#define NETLINK_IP6FW_SOCKET__NAME_BIND           0x00200000UL
+
+#define NETLINK_IP6FW_SOCKET__NLMSG_READ          0x00400000UL
+#define NETLINK_IP6FW_SOCKET__NLMSG_WRITE         0x00800000UL
+
+#define NETLINK_DNRT_SOCKET__IOCTL                0x00000001UL
+#define NETLINK_DNRT_SOCKET__READ                 0x00000002UL
+#define NETLINK_DNRT_SOCKET__WRITE                0x00000004UL
+#define NETLINK_DNRT_SOCKET__CREATE               0x00000008UL
+#define NETLINK_DNRT_SOCKET__GETATTR              0x00000010UL
+#define NETLINK_DNRT_SOCKET__SETATTR              0x00000020UL
+#define NETLINK_DNRT_SOCKET__LOCK                 0x00000040UL
+#define NETLINK_DNRT_SOCKET__RELABELFROM          0x00000080UL
+#define NETLINK_DNRT_SOCKET__RELABELTO            0x00000100UL
+#define NETLINK_DNRT_SOCKET__APPEND               0x00000200UL
+#define NETLINK_DNRT_SOCKET__BIND                 0x00000400UL
+#define NETLINK_DNRT_SOCKET__CONNECT              0x00000800UL
+#define NETLINK_DNRT_SOCKET__LISTEN               0x00001000UL
+#define NETLINK_DNRT_SOCKET__ACCEPT               0x00002000UL
+#define NETLINK_DNRT_SOCKET__GETOPT               0x00004000UL
+#define NETLINK_DNRT_SOCKET__SETOPT               0x00008000UL
+#define NETLINK_DNRT_SOCKET__SHUTDOWN             0x00010000UL
+#define NETLINK_DNRT_SOCKET__RECVFROM             0x00020000UL
+#define NETLINK_DNRT_SOCKET__SENDTO               0x00040000UL
+#define NETLINK_DNRT_SOCKET__RECV_MSG             0x00080000UL
+#define NETLINK_DNRT_SOCKET__SEND_MSG             0x00100000UL
 
 /* FLASK */
--- diff/security/selinux/include/class_to_string.h	2004-05-19 22:13:19.000000000 +0100
+++ source/security/selinux/include/class_to_string.h	2004-07-01 21:32:54.000000000 +0100
@@ -35,5 +35,26 @@
     "shm",
     "ipc",
     "passwd",
+    "drawable",
+    "window",
+    "gc",
+    "font",
+    "colormap",
+    "property",
+    "cursor",
+    "xclient",
+    "xinput",
+    "xserver",
+    "xextension",
+    "pax",
+    "netlink_route_socket",
+    "netlink_firewall_socket",
+    "netlink_tcpdiag_socket",
+    "netlink_nflog_socket",
+    "netlink_xfrm_socket",
+    "netlink_selinux_socket",
+    "netlink_audit_socket",
+    "netlink_ip6fw_socket",
+    "netlink_dnrt_socket",
 };
 
--- diff/security/selinux/include/flask.h	2004-06-30 14:26:04.000000000 +0100
+++ source/security/selinux/include/flask.h	2004-07-01 21:32:54.000000000 +0100
@@ -35,6 +35,27 @@
 #define SECCLASS_SHM                                     28
 #define SECCLASS_IPC                                     29
 #define SECCLASS_PASSWD                                  30
+#define SECCLASS_DRAWABLE                                31
+#define SECCLASS_WINDOW                                  32
+#define SECCLASS_GC                                      33
+#define SECCLASS_FONT                                    34
+#define SECCLASS_COLORMAP                                35
+#define SECCLASS_PROPERTY                                36
+#define SECCLASS_CURSOR                                  37
+#define SECCLASS_XCLIENT                                 38
+#define SECCLASS_XINPUT                                  39
+#define SECCLASS_XSERVER                                 40
+#define SECCLASS_XEXTENSION                              41
+#define SECCLASS_PAX                                     42
+#define SECCLASS_NETLINK_ROUTE_SOCKET                    43
+#define SECCLASS_NETLINK_FIREWALL_SOCKET                 44
+#define SECCLASS_NETLINK_TCPDIAG_SOCKET                  45
+#define SECCLASS_NETLINK_NFLOG_SOCKET                    46
+#define SECCLASS_NETLINK_XFRM_SOCKET                     47
+#define SECCLASS_NETLINK_SELINUX_SOCKET                  48
+#define SECCLASS_NETLINK_AUDIT_SOCKET                    49
+#define SECCLASS_NETLINK_IP6FW_SOCKET                    50
+#define SECCLASS_NETLINK_DNRT_SOCKET                     51
 
 /*
  * Security identifier indices for initial entities
--- diff/security/selinux/include/security.h	2004-05-19 22:13:19.000000000 +0100
+++ source/security/selinux/include/security.h	2004-07-01 21:32:54.000000000 +0100
@@ -17,13 +17,14 @@
 #define SELINUX_MAGIC 0xf97cff8c
 
 /* Identify specific policy version changes */
-#define POLICYDB_VERSION_BASE  15
-#define POLICYDB_VERSION_BOOL  16
-#define POLICYDB_VERSION_IPV6  17
+#define POLICYDB_VERSION_BASE		15
+#define POLICYDB_VERSION_BOOL		16
+#define POLICYDB_VERSION_IPV6		17
+#define POLICYDB_VERSION_NLCLASS	18
 
 /* Range of policy versions we understand*/
 #define POLICYDB_VERSION_MIN   POLICYDB_VERSION_BASE
-#define POLICYDB_VERSION_MAX   POLICYDB_VERSION_IPV6
+#define POLICYDB_VERSION_MAX   POLICYDB_VERSION_NLCLASS
 
 #ifdef CONFIG_SECURITY_SELINUX_BOOTPARAM
 extern int selinux_enabled;
--- diff/security/selinux/netif.c	2004-05-19 22:13:19.000000000 +0100
+++ source/security/selinux/netif.c	2004-07-01 21:32:54.000000000 +0100
@@ -134,9 +134,9 @@
 	return netif;
 }
 
-static void sel_netif_free(void *p)
+static void sel_netif_free(struct rcu_head *p)
 {
-	struct sel_netif *netif = p;
+	struct sel_netif *netif = container_of(p, struct sel_netif, rcu_head);
 	
 	DEBUGP("%s: %s\n", __FUNCTION__, netif->nsec.dev->name);
 	kfree(netif);
@@ -151,7 +151,7 @@
 	sel_netif_total--;
 	spin_unlock_bh(&sel_netif_lock);
 
-	call_rcu(&netif->rcu_head, sel_netif_free, netif);
+	call_rcu(&netif->rcu_head, sel_netif_free);
 }
 
 void sel_netif_put(struct sel_netif *netif)
--- diff/security/selinux/ss/policydb.c	2004-05-19 22:13:19.000000000 +0100
+++ source/security/selinux/ss/policydb.c	2004-07-01 21:32:54.000000000 +0100
@@ -38,6 +38,8 @@
 };
 #endif
 
+int policydb_loaded_version;
+
 static unsigned int symtab_sizes[SYM_NUM] = {
 	2,
 	32,
@@ -71,6 +73,11 @@
 		.sym_num        = SYM_NUM,
 		.ocon_num       = OCON_NUM,
 	},
+	{
+		.version        = POLICYDB_VERSION_NLCLASS,
+		.sym_num        = SYM_NUM,
+		.ocon_num       = OCON_NUM,
+	},
 };
 
 static struct policydb_compat_info *policydb_lookup_compat(int version)
@@ -1125,7 +1132,7 @@
 	struct role_trans *tr, *ltr;
 	struct ocontext *l, *c, *newc;
 	struct genfs *genfs_p, *genfs, *newgenfs;
-	int i, j, rc, r_policyvers;
+	int i, j, rc, r_policyvers = 0;
 	u32 *buf, len, len2, config, nprim, nel, nel2;
 	char *policydb_str;
 	struct policydb_compat_info *info;
@@ -1546,6 +1553,7 @@
 	if (rc)
 		goto bad;
 out:
+	policydb_loaded_version = r_policyvers;
 	return rc;
 bad_newc:
 	ocontext_destroy(newc,OCON_FSUSE);
--- diff/security/selinux/ss/services.c	2004-06-30 14:26:04.000000000 +0100
+++ source/security/selinux/ss/services.c	2004-07-01 21:32:54.000000000 +0100
@@ -40,6 +40,7 @@
 #include "mls.h"
 
 extern void selnl_notify_policyload(u32 seqno);
+extern int policydb_loaded_version;
 
 static rwlock_t policy_rwlock = RW_LOCK_UNLOCKED;
 #define POLICY_RDLOCK read_lock(&policy_rwlock)
@@ -203,6 +204,17 @@
 	struct avtab_datum *avdatum;
 	struct class_datum *tclass_datum;
 
+	/*
+	 * Remap extended Netlink classes for old policy versions.
+	 * Do this here rather than socket_type_to_security_class()
+	 * in case a newer policy version is loaded, allowing sockets
+	 * to remain in the correct class.
+	 */
+	if (policydb_loaded_version < POLICYDB_VERSION_NLCLASS)
+		if (tclass >= SECCLASS_NETLINK_ROUTE_SOCKET &&
+		    tclass <= SECCLASS_NETLINK_DNRT_SOCKET)
+			tclass = SECCLASS_NETLINK_SOCKET;
+
 	if (!tclass || tclass > policydb.p_classes.nprim) {
 		printk(KERN_ERR "security_compute_av:  unrecognized class %d\n",
 		       tclass);
--- diff/sound/core/memalloc.c	2004-06-30 14:26:04.000000000 +0100
+++ source/sound/core/memalloc.c	2004-07-01 21:32:54.000000000 +0100
@@ -45,10 +45,14 @@
 #ifndef SNDRV_CARDS
 #define SNDRV_CARDS	8
 #endif
+
+/* FIXME: so far only some PCI devices have the preallocation table */
+#ifdef CONFIG_PCI
 static int enable[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
 static int boot_devs;
 module_param_array(enable, bool, boot_devs, 0444);
 MODULE_PARM_DESC(enable, "Enable cards to allocate buffers.");
+#endif
 
 /*
  */
--- diff/sound/core/oss/pcm_oss.c	2004-06-30 14:26:04.000000000 +0100
+++ source/sound/core/oss/pcm_oss.c	2004-07-01 21:32:54.000000000 +0100
@@ -1177,10 +1177,11 @@
 	snd_pcm_substream_t *substream;
 	int err;
 	int direct;
-	snd_pcm_hw_params_t params;
+	snd_pcm_hw_params_t *params;
 	unsigned int formats = 0;
 	snd_mask_t format_mask;
 	int fmt;
+
 	if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
 		return err;
 	if (atomic_read(&substream->runtime->mmap_count)) {
@@ -1194,10 +1195,14 @@
 		       AFMT_S16_LE | AFMT_S16_BE |
 		       AFMT_S8 | AFMT_U16_LE |
 		       AFMT_U16_BE;
-	_snd_pcm_hw_params_any(&params);
-	err = snd_pcm_hw_refine(substream, &params);
+	params = kmalloc(sizeof(*params), GFP_KERNEL);
+	if (!params)
+		return -ENOMEM;
+	_snd_pcm_hw_params_any(params);
+	err = snd_pcm_hw_refine(substream, params);
+	format_mask = *hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 
+	kfree(params);
 	snd_assert(err >= 0, return err);
-	format_mask = *hw_param_mask(&params, SNDRV_PCM_HW_PARAM_FORMAT); 
 	for (fmt = 0; fmt < 32; ++fmt) {
 		if (snd_mask_test(&format_mask, fmt)) {
 			int f = snd_pcm_oss_format_to(fmt);
@@ -2280,7 +2285,7 @@
 				   snd_info_buffer_t * buffer)
 {
 	snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data;
-	char line[512], str[32], task_name[32], *ptr;
+	char line[256], str[32], task_name[32], *ptr;
 	int idx1;
 	snd_pcm_oss_setup_t *setup, *setup1, template;
 
--- diff/sound/core/oss/pcm_plugin.c	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/core/oss/pcm_plugin.c	2004-07-01 21:32:54.000000000 +0100
@@ -846,41 +846,31 @@
 			 size_t samples, int format)
 {
 	/* FIXME: sub byte resolution and odd dst_offset */
-	char *dst;
+	unsigned char *dst;
 	unsigned int dst_step;
 	int width;
-	u_int64_t silence;
+	const unsigned char *silence;
 	if (!dst_area->addr)
 		return 0;
 	dst = dst_area->addr + (dst_area->first + dst_area->step * dst_offset) / 8;
 	width = snd_pcm_format_physical_width(format);
+	if (width <= 0)
+		return -EINVAL;
+	if (dst_area->step == (unsigned int) width && width >= 8)
+		return snd_pcm_format_set_silence(format, dst, samples);
 	silence = snd_pcm_format_silence_64(format);
-	if (dst_area->step == (unsigned int) width) {
-		size_t dwords = samples * width / 64;
-		u_int64_t *dst64 = (u_int64_t *)dst;
-
-		samples -= dwords * 64 / width;
-		while (dwords-- > 0)
-			*dst64++ = silence;
-		if (samples == 0)
-			return 0;
-		dst = (char *)dst64;
-	}
+	if (! silence)
+		return -EINVAL;
 	dst_step = dst_area->step / 8;
-	switch (width) {
-	case 4: {
-		u_int8_t s0 = silence & 0xf0;
-		u_int8_t s1 = silence & 0x0f;
+	if (width == 4) {
+		/* Ima ADPCM */
 		int dstbit = dst_area->first % 8;
 		int dstbit_step = dst_area->step % 8;
 		while (samples-- > 0) {
-			if (dstbit) {
+			if (dstbit)
 				*dst &= 0xf0;
-				*dst |= s1;
-			} else {
+			else
 				*dst &= 0x0f;
-				*dst |= s0;
-			}
 			dst += dst_step;
 			dstbit += dstbit_step;
 			if (dstbit == 8) {
@@ -888,41 +878,12 @@
 				dstbit = 0;
 			}
 		}
-		break;
-	}
-	case 8: {
-		u_int8_t sil = silence;
-		while (samples-- > 0) {
-			*dst = sil;
-			dst += dst_step;
-		}
-		break;
-	}
-	case 16: {
-		u_int16_t sil = silence;
-		while (samples-- > 0) {
-			*(u_int16_t*)dst = sil;
-			dst += dst_step;
-		}
-		break;
-	}
-	case 32: {
-		u_int32_t sil = silence;
-		while (samples-- > 0) {
-			*(u_int32_t*)dst = sil;
-			dst += dst_step;
-		}
-		break;
-	}
-	case 64: {
+	} else {
+		width /= 8;
 		while (samples-- > 0) {
-			*(u_int64_t*)dst = silence;
+			memcpy(dst, silence, width);
 			dst += dst_step;
 		}
-		break;
-	}
-	default:
-		snd_BUG();
 	}
 	return 0;
 }
@@ -942,18 +903,18 @@
 	if (!dst_area->addr)
 		return 0;
 	width = snd_pcm_format_physical_width(format);
+	if (width <= 0)
+		return -EINVAL;
 	if (src_area->step == (unsigned int) width &&
-	    dst_area->step == (unsigned int) width) {
+	    dst_area->step == (unsigned int) width && width >= 8) {
 		size_t bytes = samples * width / 8;
-		samples -= bytes * 8 / width;
 		memcpy(dst, src, bytes);
-		if (samples == 0)
-			return 0;
+		return 0;
 	}
 	src_step = src_area->step / 8;
 	dst_step = dst_area->step / 8;
-	switch (width) {
-	case 4: {
+	if (width == 4) {
+		/* Ima ADPCM */
 		int srcbit = src_area->first % 8;
 		int srcbit_step = src_area->step % 8;
 		int dstbit = dst_area->first % 8;
@@ -963,12 +924,11 @@
 			if (srcbit)
 				srcval = *src & 0x0f;
 			else
-				srcval = *src & 0xf0;
+				srcval = (*src & 0xf0) >> 4;
 			if (dstbit)
-				*dst &= 0xf0;
+				*dst = (*dst & 0xf0) | srcval;
 			else
-				*dst &= 0x0f;
-			*dst |= srcval;
+				*dst = (*dst & 0x0f) | (srcval << 4);
 			src += src_step;
 			srcbit += srcbit_step;
 			if (srcbit == 8) {
@@ -982,42 +942,13 @@
 				dstbit = 0;
 			}
 		}
-		break;
-	}
-	case 8: {
-		while (samples-- > 0) {
-			*dst = *src;
-			src += src_step;
-			dst += dst_step;
-		}
-		break;
-	}
-	case 16: {
+	} else {
+		width /= 8;
 		while (samples-- > 0) {
-			*(u_int16_t*)dst = *(u_int16_t*)src;
+			memcpy(dst, src, width);
 			src += src_step;
 			dst += dst_step;
 		}
-		break;
-	}
-	case 32: {
-		while (samples-- > 0) {
-			*(u_int32_t*)dst = *(u_int32_t*)src;
-			src += src_step;
-			dst += dst_step;
-		}
-		break;
-	}
-	case 64: {
-		while (samples-- > 0) {
-			*(u_int64_t*)dst = *(u_int64_t*)src;
-			src += src_step;
-			dst += dst_step;
-		}
-		break;
-	}
-	default:
-		snd_BUG();
 	}
 	return 0;
 }
--- diff/sound/core/pcm_memory.c	2004-06-30 14:26:06.000000000 +0100
+++ source/sound/core/pcm_memory.c	2004-07-01 21:32:54.000000000 +0100
@@ -314,31 +314,35 @@
 int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size)
 {
 	snd_pcm_runtime_t *runtime;
-	struct snd_dma_buffer dmab;
+	struct snd_dma_buffer *dmab = NULL;
 
 	snd_assert(substream->dma_device.type != SNDRV_DMA_TYPE_UNKNOWN, return -EINVAL);
 	snd_assert(substream != NULL, return -EINVAL);
 	runtime = substream->runtime;
-	snd_assert(runtime != NULL, return -EINVAL);	
+	snd_assert(runtime != NULL, return -EINVAL);
 
-	if (runtime->dma_area != NULL) {
+	if (runtime->dma_buffer_p) {
 		/* perphaps, we might free the large DMA memory region
 		   to save some space here, but the actual solution
 		   costs us less time */
-		if (runtime->dma_bytes >= size)
+		if (runtime->dma_buffer_p->bytes >= size) {
+			runtime->dma_bytes = size;
 			return 0;	/* ok, do not change */
+		}
 		snd_pcm_lib_free_pages(substream);
 	}
 	if (substream->dma_buffer.area != NULL && substream->dma_buffer.bytes >= size) {
-		dmab = substream->dma_buffer; /* use the pre-allocated buffer */
+		dmab = &substream->dma_buffer; /* use the pre-allocated buffer */
 	} else {
-		memset(&dmab, 0, sizeof(dmab)); /* allocate a new buffer */
-		if (snd_dma_alloc_pages(&substream->dma_device, size, &dmab) < 0)
+		dmab = snd_kcalloc(sizeof(*dmab), GFP_KERNEL);
+		if (! dmab)
+			return -ENOMEM;
+		if (snd_dma_alloc_pages(&substream->dma_device, size, dmab) < 0) {
+			kfree(dmab);
 			return -ENOMEM;
+		}
 	}
-	runtime->dma_area = dmab.area;
-	runtime->dma_addr = dmab.addr;
-	runtime->dma_private = dmab.private_data;
+	snd_pcm_set_runtime_buffer(substream, dmab);
 	runtime->dma_bytes = size;
 	return 1;			/* area was changed */
 }
@@ -360,34 +364,11 @@
 	snd_assert(runtime != NULL, return -EINVAL);
 	if (runtime->dma_area == NULL)
 		return 0;
-	if (runtime->dma_area != substream->dma_buffer.area) {
+	if (runtime->dma_buffer_p != &substream->dma_buffer) {
 		/* it's a newly allocated buffer.  release it now. */
-		struct snd_dma_buffer dmab;
-		memset(&dmab, 0, sizeof(dmab));
-		dmab.area = runtime->dma_area;
-		dmab.addr = runtime->dma_addr;
-		dmab.bytes = runtime->dma_bytes;
-		dmab.private_data = runtime->dma_private;
-		snd_dma_free_pages(&substream->dma_device, &dmab);
+		snd_dma_free_pages(&substream->dma_device, runtime->dma_buffer_p);
+		kfree(runtime->dma_buffer_p);
 	}
-	runtime->dma_area = NULL;
-	runtime->dma_addr = 0UL;
-	runtime->dma_bytes = 0;
-	runtime->dma_private = NULL;
+	snd_pcm_set_runtime_buffer(substream, NULL);
 	return 0;
 }
-
-#ifndef MODULE
-
-/* format is: snd-pcm=preallocate_dma,maximum_substreams */
-
-static int __init alsa_pcm_setup(char *str)
-{
-	(void)(get_option(&str,&preallocate_dma) == 2 &&
-	       get_option(&str,&maximum_substreams) == 2);
-	return 1;
-}
-
-__setup("snd-pcm=", alsa_pcm_setup);
-
-#endif /* ifndef MODULE */
--- diff/sound/core/pcm_misc.c	2004-06-30 14:26:07.000000000 +0100
+++ source/sound/core/pcm_misc.c	2004-07-01 21:32:54.000000000 +0100
@@ -23,12 +23,169 @@
 #include <linux/time.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
-#define bswap_16 swab16
-#define bswap_32 swab32
-#define bswap_64 swab64
 #define SND_PCM_FORMAT_UNKNOWN (-1)
-#define snd_enum_to_int(v) (v)
-#define snd_int_to_enum(v) (v)
+
+struct pcm_format_data {
+	char width;	/* bit width */
+	char phys;	/* physical bit width */
+	char le;	/* 0 = big-endian, 1 = little-endian, -1 = others */
+	char signd;	/* 0 = unsigned, 1 = signed, -1 = others */
+	unsigned char silence[8];	/* silence data to fill */
+};
+
+static struct pcm_format_data pcm_formats[SNDRV_PCM_FORMAT_LAST+1] = {
+	[SNDRV_PCM_FORMAT_S8] = {
+		.width = 8, .phys = 8, .le = -1, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_U8] = {
+		.width = 8, .phys = 8, .le = -1, .signd = 0,
+		.silence = { 0x80 },
+	},
+	[SNDRV_PCM_FORMAT_S16_LE] = {
+		.width = 16, .phys = 16, .le = 1, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_S16_BE] = {
+		.width = 16, .phys = 16, .le = 0, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_U16_LE] = {
+		.width = 16, .phys = 16, .le = 1, .signd = 0,
+		.silence = { 0x00, 0x80 },
+	},
+	[SNDRV_PCM_FORMAT_U16_BE] = {
+		.width = 16, .phys = 16, .le = 0, .signd = 0,
+		.silence = { 0x80, 0x00 },
+	},
+	[SNDRV_PCM_FORMAT_S24_LE] = {
+		.width = 24, .phys = 32, .le = 1, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_S24_BE] = {
+		.width = 24, .phys = 32, .le = 0, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_U24_LE] = {
+		.width = 24, .phys = 32, .le = 1, .signd = 0,
+		.silence = { 0x00, 0x00, 0x80 },
+	},
+	[SNDRV_PCM_FORMAT_U24_BE] = {
+		.width = 24, .phys = 32, .le = 0, .signd = 0,
+		.silence = { 0x80, 0x00, 0x00 },
+	},
+	[SNDRV_PCM_FORMAT_S32_LE] = {
+		.width = 32, .phys = 32, .le = 1, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_S32_BE] = {
+		.width = 32, .phys = 32, .le = 0, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_U32_LE] = {
+		.width = 32, .phys = 32, .le = 1, .signd = 0,
+		.silence = { 0x00, 0x00, 0x00, 0x80 },
+	},
+	[SNDRV_PCM_FORMAT_U32_BE] = {
+		.width = 32, .phys = 32, .le = 0, .signd = 0,
+		.silence = { 0x80, 0x00, 0x00, 0x00 },
+	},
+	[SNDRV_PCM_FORMAT_FLOAT_LE] = {
+		.width = 32, .phys = 32, .le = 1, .signd = -1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_FLOAT_BE] = {
+		.width = 32, .phys = 32, .le = 0, .signd = -1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_FLOAT64_LE] = {
+		.width = 64, .phys = 64, .le = 1, .signd = -1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_FLOAT64_BE] = {
+		.width = 64, .phys = 64, .le = 0, .signd = -1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE] = {
+		.width = 32, .phys = 32, .le = 1, .signd = -1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE] = {
+		.width = 32, .phys = 32, .le = 0, .signd = -1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_MU_LAW] = {
+		.width = 8, .phys = 8, .le = -1, .signd = -1,
+		.silence = { 0x7f },
+	},
+	[SNDRV_PCM_FORMAT_A_LAW] = {
+		.width = 8, .phys = 8, .le = -1, .signd = -1,
+		.silence = { 0x55 },
+	},
+	[SNDRV_PCM_FORMAT_IMA_ADPCM] = {
+		.width = 4, .phys = 4, .le = -1, .signd = -1,
+		.silence = {},
+	},
+	/* FIXME: the following three formats are not defined properly yet */
+	[SNDRV_PCM_FORMAT_MPEG] = {
+		.le = -1, .signd = -1,
+	},
+	[SNDRV_PCM_FORMAT_GSM] = {
+		.le = -1, .signd = -1,
+	},
+	[SNDRV_PCM_FORMAT_SPECIAL] = {
+		.le = -1, .signd = -1,
+	},
+	[SNDRV_PCM_FORMAT_S24_3LE] = {
+		.width = 24, .phys = 24, .le = 1, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_S24_3BE] = {
+		.width = 24, .phys = 24, .le = 0, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_U24_3LE] = {
+		.width = 24, .phys = 24, .le = 1, .signd = 0,
+		.silence = { 0x00, 0x00, 0x80 },
+	},
+	[SNDRV_PCM_FORMAT_U24_3BE] = {
+		.width = 24, .phys = 24, .le = 0, .signd = 0,
+		.silence = { 0x80, 0x00, 0x00 },
+	},
+	[SNDRV_PCM_FORMAT_S20_3LE] = {
+		.width = 20, .phys = 24, .le = 1, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_S20_3BE] = {
+		.width = 20, .phys = 24, .le = 0, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_U20_3LE] = {
+		.width = 20, .phys = 24, .le = 1, .signd = 0,
+		.silence = { 0x00, 0x00, 0x08 },
+	},
+	[SNDRV_PCM_FORMAT_U20_3BE] = {
+		.width = 20, .phys = 24, .le = 0, .signd = 0,
+		.silence = { 0x08, 0x00, 0x00 },
+	},
+	[SNDRV_PCM_FORMAT_S18_3LE] = {
+		.width = 18, .phys = 24, .le = 1, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_S18_3BE] = {
+		.width = 18, .phys = 24, .le = 0, .signd = 1,
+		.silence = {},
+	},
+	[SNDRV_PCM_FORMAT_U18_3LE] = {
+		.width = 18, .phys = 24, .le = 1, .signd = 0,
+		.silence = { 0x00, 0x00, 0x02 },
+	},
+	[SNDRV_PCM_FORMAT_U18_3BE] = {
+		.width = 18, .phys = 24, .le = 0, .signd = 0,
+		.silence = { 0x02, 0x00, 0x00 },
+	},
+};
+
 
 /**
  * snd_pcm_format_signed - Check the PCM format is signed linear
@@ -39,38 +196,12 @@
  */
 int snd_pcm_format_signed(snd_pcm_format_t format)
 {
-	switch (snd_enum_to_int(format)) {
-	case SNDRV_PCM_FORMAT_S8:
-	case SNDRV_PCM_FORMAT_S16_LE:
-	case SNDRV_PCM_FORMAT_S16_BE:
-	case SNDRV_PCM_FORMAT_S24_LE:
-	case SNDRV_PCM_FORMAT_S24_BE:
-	case SNDRV_PCM_FORMAT_S32_LE:
-	case SNDRV_PCM_FORMAT_S32_BE:
-	case SNDRV_PCM_FORMAT_S24_3LE:
-	case SNDRV_PCM_FORMAT_S24_3BE:
-	case SNDRV_PCM_FORMAT_S20_3LE:
-	case SNDRV_PCM_FORMAT_S20_3BE:
-	case SNDRV_PCM_FORMAT_S18_3LE:
-	case SNDRV_PCM_FORMAT_S18_3BE:
-		return 1;
-	case SNDRV_PCM_FORMAT_U8:
-	case SNDRV_PCM_FORMAT_U16_LE:
-	case SNDRV_PCM_FORMAT_U16_BE:
-	case SNDRV_PCM_FORMAT_U24_LE:
-	case SNDRV_PCM_FORMAT_U24_BE:
-	case SNDRV_PCM_FORMAT_U32_LE:
-	case SNDRV_PCM_FORMAT_U32_BE:
-	case SNDRV_PCM_FORMAT_U24_3LE:
-	case SNDRV_PCM_FORMAT_U24_3BE:
-	case SNDRV_PCM_FORMAT_U20_3LE:
-	case SNDRV_PCM_FORMAT_U20_3BE:
-	case SNDRV_PCM_FORMAT_U18_3LE:
-	case SNDRV_PCM_FORMAT_U18_3BE:
-		return 0;
-	default:
+	int val;
+	if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
 		return -EINVAL;
-	}
+	if ((val = pcm_formats[format].signd) < 0)
+		return -EINVAL;
+	return val;
 }
 
 /**
@@ -110,42 +241,12 @@
  */
 int snd_pcm_format_little_endian(snd_pcm_format_t format)
 {
-	switch (snd_enum_to_int(format)) {
-	case SNDRV_PCM_FORMAT_S16_LE:
-	case SNDRV_PCM_FORMAT_U16_LE:
-	case SNDRV_PCM_FORMAT_S24_LE:
-	case SNDRV_PCM_FORMAT_U24_LE:
-	case SNDRV_PCM_FORMAT_S32_LE:
-	case SNDRV_PCM_FORMAT_U32_LE:
-	case SNDRV_PCM_FORMAT_FLOAT_LE:
-	case SNDRV_PCM_FORMAT_FLOAT64_LE:
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE:
-	case SNDRV_PCM_FORMAT_S24_3LE:
-	case SNDRV_PCM_FORMAT_S20_3LE:
-	case SNDRV_PCM_FORMAT_S18_3LE:
-	case SNDRV_PCM_FORMAT_U24_3LE:
-	case SNDRV_PCM_FORMAT_U20_3LE:
-	case SNDRV_PCM_FORMAT_U18_3LE:
-		return 1;
-	case SNDRV_PCM_FORMAT_S16_BE:
-	case SNDRV_PCM_FORMAT_U16_BE:
-	case SNDRV_PCM_FORMAT_S24_BE:
-	case SNDRV_PCM_FORMAT_U24_BE:
-	case SNDRV_PCM_FORMAT_S32_BE:
-	case SNDRV_PCM_FORMAT_U32_BE:
-	case SNDRV_PCM_FORMAT_FLOAT_BE:
-	case SNDRV_PCM_FORMAT_FLOAT64_BE:
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE:
-	case SNDRV_PCM_FORMAT_S24_3BE:
-	case SNDRV_PCM_FORMAT_S20_3BE:
-	case SNDRV_PCM_FORMAT_S18_3BE:
-	case SNDRV_PCM_FORMAT_U24_3BE:
-	case SNDRV_PCM_FORMAT_U20_3BE:
-	case SNDRV_PCM_FORMAT_U18_3BE:
-		return 0;
-	default:
+	int val;
+	if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
 		return -EINVAL;
-	}
+	if ((val = pcm_formats[format].le) < 0)
+		return -EINVAL;
+	return val;
 }
 
 /**
@@ -190,55 +291,12 @@
  */
 int snd_pcm_format_width(snd_pcm_format_t format)
 {
-	switch (snd_enum_to_int(format)) {
-	case SNDRV_PCM_FORMAT_S8:
-	case SNDRV_PCM_FORMAT_U8:
-		return 8;
-	case SNDRV_PCM_FORMAT_S16_LE:
-	case SNDRV_PCM_FORMAT_S16_BE:
-	case SNDRV_PCM_FORMAT_U16_LE:
-	case SNDRV_PCM_FORMAT_U16_BE:
-		return 16;
-	case SNDRV_PCM_FORMAT_S18_3LE:
-	case SNDRV_PCM_FORMAT_S18_3BE:
-	case SNDRV_PCM_FORMAT_U18_3LE:
-	case SNDRV_PCM_FORMAT_U18_3BE:
-		return 18;
-	case SNDRV_PCM_FORMAT_S20_3LE:
-	case SNDRV_PCM_FORMAT_S20_3BE:
-	case SNDRV_PCM_FORMAT_U20_3LE:
-	case SNDRV_PCM_FORMAT_U20_3BE:
-		return 20;
-	case SNDRV_PCM_FORMAT_S24_LE:
-	case SNDRV_PCM_FORMAT_S24_BE:
-	case SNDRV_PCM_FORMAT_U24_LE:
-	case SNDRV_PCM_FORMAT_U24_BE:
-	case SNDRV_PCM_FORMAT_S24_3LE:
-	case SNDRV_PCM_FORMAT_S24_3BE:
-	case SNDRV_PCM_FORMAT_U24_3LE:
-	case SNDRV_PCM_FORMAT_U24_3BE:
-		return 24;
-	case SNDRV_PCM_FORMAT_S32_LE:
-	case SNDRV_PCM_FORMAT_S32_BE:
-	case SNDRV_PCM_FORMAT_U32_LE:
-	case SNDRV_PCM_FORMAT_U32_BE:
-	case SNDRV_PCM_FORMAT_FLOAT_LE:
-	case SNDRV_PCM_FORMAT_FLOAT_BE:
-		return 32;
-	case SNDRV_PCM_FORMAT_FLOAT64_LE:
-	case SNDRV_PCM_FORMAT_FLOAT64_BE:
-		return 64;
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE:
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE:
-		return 32;
-	case SNDRV_PCM_FORMAT_MU_LAW:
-	case SNDRV_PCM_FORMAT_A_LAW:
-		return 8;
-	case SNDRV_PCM_FORMAT_IMA_ADPCM:
-		return 4;
-	default:
+	int val;
+	if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
 		return -EINVAL;
-	}
+	if ((val = pcm_formats[format].width) == 0)
+		return -EINVAL;
+	return val;
 }
 
 /**
@@ -250,52 +308,12 @@
  */
 int snd_pcm_format_physical_width(snd_pcm_format_t format)
 {
-	switch (snd_enum_to_int(format)) {
-	case SNDRV_PCM_FORMAT_S8:
-	case SNDRV_PCM_FORMAT_U8:
-		return 8;
-	case SNDRV_PCM_FORMAT_S16_LE:
-	case SNDRV_PCM_FORMAT_S16_BE:
-	case SNDRV_PCM_FORMAT_U16_LE:
-	case SNDRV_PCM_FORMAT_U16_BE:
-		return 16;
-	case SNDRV_PCM_FORMAT_S18_3LE:
-	case SNDRV_PCM_FORMAT_S18_3BE:
-	case SNDRV_PCM_FORMAT_U18_3LE:
-	case SNDRV_PCM_FORMAT_U18_3BE:
-	case SNDRV_PCM_FORMAT_S20_3LE:
-	case SNDRV_PCM_FORMAT_S20_3BE:
-	case SNDRV_PCM_FORMAT_U20_3LE:
-	case SNDRV_PCM_FORMAT_U20_3BE:
-	case SNDRV_PCM_FORMAT_S24_3LE:
-	case SNDRV_PCM_FORMAT_S24_3BE:
-	case SNDRV_PCM_FORMAT_U24_3LE:
-	case SNDRV_PCM_FORMAT_U24_3BE:
-		return 24;
-	case SNDRV_PCM_FORMAT_S24_LE:
-	case SNDRV_PCM_FORMAT_S24_BE:
-	case SNDRV_PCM_FORMAT_U24_LE:
-	case SNDRV_PCM_FORMAT_U24_BE:
-	case SNDRV_PCM_FORMAT_S32_LE:
-	case SNDRV_PCM_FORMAT_S32_BE:
-	case SNDRV_PCM_FORMAT_U32_LE:
-	case SNDRV_PCM_FORMAT_U32_BE:
-	case SNDRV_PCM_FORMAT_FLOAT_LE:
-	case SNDRV_PCM_FORMAT_FLOAT_BE:
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE:
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE:
-		return 32;
-	case SNDRV_PCM_FORMAT_FLOAT64_LE:
-	case SNDRV_PCM_FORMAT_FLOAT64_BE:
-		return 64;
-	case SNDRV_PCM_FORMAT_MU_LAW:
-	case SNDRV_PCM_FORMAT_A_LAW:
-		return 8;
-	case SNDRV_PCM_FORMAT_IMA_ADPCM:
-		return 4;
-	default:
+	int val;
+	if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
 		return -EINVAL;
-	}
+	if ((val = pcm_formats[format].phys) == 0)
+		return -EINVAL;
+	return val;
 }
 
 /**
@@ -307,216 +325,25 @@
  */
 ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples)
 {
-	switch (snd_enum_to_int(format)) {
-	case SNDRV_PCM_FORMAT_S8:
-	case SNDRV_PCM_FORMAT_U8:
-		return samples;
-	case SNDRV_PCM_FORMAT_S16_LE:
-	case SNDRV_PCM_FORMAT_S16_BE:
-	case SNDRV_PCM_FORMAT_U16_LE:
-	case SNDRV_PCM_FORMAT_U16_BE:
-		return samples * 2;
-	case SNDRV_PCM_FORMAT_S18_3LE:
-	case SNDRV_PCM_FORMAT_S18_3BE:
-	case SNDRV_PCM_FORMAT_U18_3LE:
-	case SNDRV_PCM_FORMAT_U18_3BE:
-	case SNDRV_PCM_FORMAT_S20_3LE:
-	case SNDRV_PCM_FORMAT_S20_3BE:
-	case SNDRV_PCM_FORMAT_U20_3LE:
-	case SNDRV_PCM_FORMAT_U20_3BE:
-	case SNDRV_PCM_FORMAT_S24_3LE:
-	case SNDRV_PCM_FORMAT_S24_3BE:
-	case SNDRV_PCM_FORMAT_U24_3LE:
-	case SNDRV_PCM_FORMAT_U24_3BE:
-		return samples * 3;
-	case SNDRV_PCM_FORMAT_S24_LE:
-	case SNDRV_PCM_FORMAT_S24_BE:
-	case SNDRV_PCM_FORMAT_U24_LE:
-	case SNDRV_PCM_FORMAT_U24_BE:
-	case SNDRV_PCM_FORMAT_S32_LE:
-	case SNDRV_PCM_FORMAT_S32_BE:
-	case SNDRV_PCM_FORMAT_U32_LE:
-	case SNDRV_PCM_FORMAT_U32_BE:
-	case SNDRV_PCM_FORMAT_FLOAT_LE:
-	case SNDRV_PCM_FORMAT_FLOAT_BE:
-		return samples * 4;
-	case SNDRV_PCM_FORMAT_FLOAT64_LE:
-	case SNDRV_PCM_FORMAT_FLOAT64_BE:
-		return samples * 8;
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE:
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE:
-		return samples * 4;
-	case SNDRV_PCM_FORMAT_MU_LAW:
-	case SNDRV_PCM_FORMAT_A_LAW:
-		return samples;
-	case SNDRV_PCM_FORMAT_IMA_ADPCM:
-		if (samples & 1)
-			return -EINVAL;
-		return samples / 2;
-	default:
+	int phys_width = snd_pcm_format_physical_width(format);
+	if (phys_width < 0)
 		return -EINVAL;
-	}
+	return samples * phys_width / 8;
 }
 
 /**
- * snd_pcm_format_silence_64 - return the silent data in 64bit integer
+ * snd_pcm_format_silence_64 - return the silent data in 8 bytes array
  * @format: the format to check
  *
- * Returns the silent data in 64bit integer for the given format.
+ * Returns the format pattern to fill or NULL if error.
  */
-u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format)
+const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format)
 {
-	switch (snd_enum_to_int(format)) {
-	case SNDRV_PCM_FORMAT_S8:
-	case SNDRV_PCM_FORMAT_S16_LE:
-	case SNDRV_PCM_FORMAT_S16_BE:
-	case SNDRV_PCM_FORMAT_S24_LE:
-	case SNDRV_PCM_FORMAT_S24_BE:
-	case SNDRV_PCM_FORMAT_S32_LE:
-	case SNDRV_PCM_FORMAT_S32_BE:
-	case SNDRV_PCM_FORMAT_S24_3LE:
-	case SNDRV_PCM_FORMAT_S24_3BE:
-	case SNDRV_PCM_FORMAT_S20_3LE:
-	case SNDRV_PCM_FORMAT_S20_3BE:
-	case SNDRV_PCM_FORMAT_S18_3LE:
-	case SNDRV_PCM_FORMAT_S18_3BE:
-		return 0;
-	case SNDRV_PCM_FORMAT_U8:
-		return 0x8080808080808080ULL;
-#ifdef SNDRV_LITTLE_ENDIAN
-	case SNDRV_PCM_FORMAT_U16_LE:
-		return 0x8000800080008000ULL;
-	case SNDRV_PCM_FORMAT_U24_LE:
-		return 0x0080000000800000ULL;
-	case SNDRV_PCM_FORMAT_U32_LE:
-		return 0x8000000080000000ULL;
-	case SNDRV_PCM_FORMAT_U16_BE:
-		return 0x0080008000800080ULL;
-	case SNDRV_PCM_FORMAT_U24_BE:
-		return 0x0000800000008000ULL;
-	case SNDRV_PCM_FORMAT_U32_BE:
-		return 0x0000008000000080ULL;
-	case SNDRV_PCM_FORMAT_U24_3LE:
-		return 0x0000800000800000ULL;
-	case SNDRV_PCM_FORMAT_U24_3BE:
-		return 0x0080000080000080ULL;
-	case SNDRV_PCM_FORMAT_U20_3LE:
-		return 0x0000080000080000ULL;
-	case SNDRV_PCM_FORMAT_U20_3BE:
-		return 0x0008000008000008ULL;
-	case SNDRV_PCM_FORMAT_U18_3LE:
-		return 0x0000020000020000ULL;
-	case SNDRV_PCM_FORMAT_U18_3BE:
-		return 0x0002000002000002ULL;
-#else
-	case SNDRV_PCM_FORMAT_U16_LE:
-		return 0x0080008000800080ULL;
-	case SNDRV_PCM_FORMAT_U24_LE:
-		return 0x0000800000008000ULL;
-	case SNDRV_PCM_FORMAT_U32_LE:
-		return 0x0000008000000080ULL;
-	case SNDRV_PCM_FORMAT_U16_BE:
-		return 0x8000800080008000ULL;
-	case SNDRV_PCM_FORMAT_U24_BE:
-		return 0x0080000000800000ULL;
-	case SNDRV_PCM_FORMAT_U32_BE:
-		return 0x8000000080000000ULL;
-	case SNDRV_PCM_FORMAT_U24_3LE:
-		return 0x0080000080000080ULL;
-	case SNDRV_PCM_FORMAT_U24_3BE:
-		return 0x0000800000800000ULL;
-	case SNDRV_PCM_FORMAT_U20_3LE:
-		return 0x0008000008000008ULL;
-	case SNDRV_PCM_FORMAT_U20_3BE:
-		return 0x0000080000080000ULL;
-	case SNDRV_PCM_FORMAT_U18_3LE:
-		return 0x0002000002000002ULL;
-	case SNDRV_PCM_FORMAT_U18_3BE:
-		return 0x0000020000020000ULL;
-#endif
-	case SNDRV_PCM_FORMAT_FLOAT_LE:
-	{
-		union {
-			float f;
-			u_int32_t i;
-		} u;
-		u.f = 0.0;
-#ifdef SNDRV_LITTLE_ENDIAN
-		return u.i;
-#else
-		return bswap_32(u.i);
-#endif
-	}
-	case SNDRV_PCM_FORMAT_FLOAT64_LE:
-	{
-		union {
-			double f;
-			u_int64_t i;
-		} u;
-		u.f = 0.0;
-#ifdef SNDRV_LITTLE_ENDIAN
-		return u.i;
-#else
-		return bswap_64(u.i);
-#endif
-	}
-	case SNDRV_PCM_FORMAT_FLOAT_BE:		
-	{
-		union {
-			float f;
-			u_int32_t i;
-		} u;
-		u.f = 0.0;
-#ifdef SNDRV_LITTLE_ENDIAN
-		return bswap_32(u.i);
-#else
-		return u.i;
-#endif
-	}
-	case SNDRV_PCM_FORMAT_FLOAT64_BE:
-	{
-		union {
-			double f;
-			u_int64_t i;
-		} u;
-		u.f = 0.0;
-#ifdef SNDRV_LITTLE_ENDIAN
-		return bswap_64(u.i);
-#else
-		return u.i;
-#endif
-	}
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE:
-	case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE:
-		return 0;	
-	case SNDRV_PCM_FORMAT_MU_LAW:
-		return 0x7f7f7f7f7f7f7f7fULL;
-	case SNDRV_PCM_FORMAT_A_LAW:
-		return 0x5555555555555555ULL;
-	case SNDRV_PCM_FORMAT_IMA_ADPCM:	/* special case */
-	case SNDRV_PCM_FORMAT_MPEG:
-	case SNDRV_PCM_FORMAT_GSM:
-	case SNDRV_PCM_FORMAT_SPECIAL:
-		return 0;
-	default:
-		return -EINVAL;
-	}
-	return 0;
-}
-
-u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format)
-{
-	return (u_int32_t)snd_pcm_format_silence_64(format);
-}
-
-u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format)
-{
-	return (u_int16_t)snd_pcm_format_silence_64(format);
-}
-
-u_int8_t snd_pcm_format_silence(snd_pcm_format_t format)
-{
-	return (u_int8_t)snd_pcm_format_silence_64(format);
+	if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
+		return NULL;
+	if (! pcm_formats[format].phys)
+		return NULL;
+	return pcm_formats[format].silence;
 }
 
 /**
@@ -531,99 +358,73 @@
  */
 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples)
 {
+	int width;
+	unsigned char *dst, *pat;
+
+	if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
+		return -EINVAL;
 	if (samples == 0)
 		return 0;
-	switch (snd_pcm_format_width(format)) {
-	case 4: {
-		u_int8_t silence = snd_pcm_format_silence_64(format);
-		unsigned int samples1;
-		if (samples % 2 != 0)
-			return -EINVAL;
-		samples1 = samples / 2;
-		memset(data, silence, samples1);
-		break;
+	width = pcm_formats[format].phys; /* physical width */
+	pat = pcm_formats[format].silence;
+	if (! width)
+		return -EINVAL;
+	/* signed or 1 byte data */
+	if (pcm_formats[format].signd == 1 || width <= 8) {
+		unsigned int bytes = samples * width / 8;
+		memset(data, *pat, bytes);
+		return 0;
 	}
-	case 8: {
-		u_int8_t silence = snd_pcm_format_silence_64(format);
-		memset(data, silence, samples);
-		break;
+	/* non-zero samples, fill using a loop */
+	width /= 8;
+	dst = data;
+#if 0
+	while (samples--) {
+		memcpy(dst, pat, width);
+		dst += width;
 	}
-	case 16: {
-		u_int16_t silence = snd_pcm_format_silence_64(format);
-		if (! silence)
-			memset(data, 0, samples * 2);
-		else {
-			u_int16_t *data16 = data;
-			while (samples-- > 0)
-				*data16++ = silence;
+#else
+	/* a bit optimization for constant width */
+	switch (width) {
+	case 2:
+		while (samples--) {
+			memcpy(dst, pat, 2);
+			dst += 2;
 		}
 		break;
-	}
-	case 24: {
-		u_int32_t silence = snd_pcm_format_silence_64(format);
-		if (! silence)
-			memset(data, 0, samples * 3);
-		else {
-			while (samples-- > 0) {
-				u_int8_t *data8 = data;
-#ifdef SNDRV_LITTLE_ENDIAN
-				*data8++ = silence >> 0;
-				*data8++ = silence >> 8;
-				*data8++ = silence >> 16;
-#else
-				*data8++ = silence >> 16;
-				*data8++ = silence >> 8;
-				*data8++ = silence >> 0;
-#endif
-			}
+	case 3:
+		while (samples--) {
+			memcpy(dst, pat, 3);
+			dst += 3;
 		}
 		break;
-	}
-	case 32: {
-		u_int32_t silence = snd_pcm_format_silence_64(format);
-		if (! silence)
-			memset(data, 0, samples * 4);
-		else {
-			u_int32_t *data32 = data;
-			while (samples-- > 0)
-				*data32++ = silence;
+	case 4:
+		while (samples--) {
+			memcpy(dst, pat, 4);
+			dst += 4;
 		}
 		break;
-	}
-	case 64: {
-		u_int64_t silence = snd_pcm_format_silence_64(format);
-		if (! silence)
-			memset(data, 0, samples * 8);
-		else {
-			u_int64_t *data64 = data;
-			while (samples-- > 0)
-				*data64++ = silence;
+	case 8:
+		while (samples--) {
+			memcpy(dst, pat, 8);
+			dst += 8;
 		}
 		break;
 	}
-	default:
-		return -EINVAL;
-	}
+#endif
 	return 0;
 }
 
-static int linear_formats[4*2*2] = {
-	SNDRV_PCM_FORMAT_S8,
-	SNDRV_PCM_FORMAT_S8,
-	SNDRV_PCM_FORMAT_U8,
-	SNDRV_PCM_FORMAT_U8,
-	SNDRV_PCM_FORMAT_S16_LE,
-	SNDRV_PCM_FORMAT_S16_BE,
-	SNDRV_PCM_FORMAT_U16_LE,
-	SNDRV_PCM_FORMAT_U16_BE,
-	SNDRV_PCM_FORMAT_S24_LE,
-	SNDRV_PCM_FORMAT_S24_BE,
-	SNDRV_PCM_FORMAT_U24_LE,
-	SNDRV_PCM_FORMAT_U24_BE,
-	SNDRV_PCM_FORMAT_S32_LE,
-	SNDRV_PCM_FORMAT_S32_BE,
-	SNDRV_PCM_FORMAT_U32_LE,
-	SNDRV_PCM_FORMAT_U32_BE
+/* [width][unsigned][bigendian] */
+static int linear_formats[4][2][2] = {
+	{{ SNDRV_PCM_FORMAT_S8, SNDRV_PCM_FORMAT_S8},
+	 { SNDRV_PCM_FORMAT_U8, SNDRV_PCM_FORMAT_U8}},
+	{{SNDRV_PCM_FORMAT_S16_LE, SNDRV_PCM_FORMAT_S16_BE},
+	 {SNDRV_PCM_FORMAT_U16_LE, SNDRV_PCM_FORMAT_U16_BE}},
+	{{SNDRV_PCM_FORMAT_S24_LE, SNDRV_PCM_FORMAT_S24_BE},
+	 {SNDRV_PCM_FORMAT_U24_LE, SNDRV_PCM_FORMAT_U24_BE}},
+	{{SNDRV_PCM_FORMAT_S32_LE, SNDRV_PCM_FORMAT_S32_BE},
+	 {SNDRV_PCM_FORMAT_U32_LE, SNDRV_PCM_FORMAT_U32_BE}}
 };
 
 /**
@@ -636,23 +437,12 @@
  */
 snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian)
 {
-	switch (width) {
-	case 8:
-		width = 0;
-		break;
-	case 16:
-		width = 1;
-		break;
-	case 24:
-		width = 2;
-		break;
-	case 32:
-		width = 3;
-		break;
-	default:
+	if (width & 7)
 		return SND_PCM_FORMAT_UNKNOWN;
-	}
-	return snd_int_to_enum(((int(*)[2][2])linear_formats)[width][!!unsignd][!!big_endian]);
+	width = (width / 8) - 1;
+	if (width < 0 || width >= 4)
+		return SND_PCM_FORMAT_UNKNOWN;
+	return linear_formats[width][!!unsignd][!!big_endian];
 }
 
 /**
--- diff/sound/core/pcm_native.c	2004-06-30 14:26:07.000000000 +0100
+++ source/sound/core/pcm_native.c	2004-07-01 21:32:54.000000000 +0100
@@ -304,13 +304,25 @@
 
 static int snd_pcm_hw_refine_user(snd_pcm_substream_t * substream, snd_pcm_hw_params_t __user * _params)
 {
-	snd_pcm_hw_params_t params;
+	snd_pcm_hw_params_t *params;
 	int err;
-	if (copy_from_user(&params, _params, sizeof(params)))
-		return -EFAULT;
-	err = snd_pcm_hw_refine(substream, &params);
-	if (copy_to_user(_params, &params, sizeof(params)))
-		return -EFAULT;
+
+	params = kmalloc(sizeof(*params), GFP_KERNEL);
+	if (!params) {
+		err = -ENOMEM;
+		goto out;
+	}
+	if (copy_from_user(params, _params, sizeof(*params))) {
+		err = -EFAULT;
+		goto out;
+	}
+	err = snd_pcm_hw_refine(substream, params);
+	if (copy_to_user(_params, params, sizeof(*params))) {
+		if (!err)
+			err = -EFAULT;
+	}
+out:
+	kfree(params);
 	return err;
 }
 
@@ -408,13 +420,25 @@
 
 static int snd_pcm_hw_params_user(snd_pcm_substream_t * substream, snd_pcm_hw_params_t __user * _params)
 {
-	snd_pcm_hw_params_t params;
+	snd_pcm_hw_params_t *params;
 	int err;
-	if (copy_from_user(&params, _params, sizeof(params)))
-		return -EFAULT;
-	err = snd_pcm_hw_params(substream, &params);
-	if (copy_to_user(_params, &params, sizeof(params)))
-		return -EFAULT;
+
+	params = kmalloc(sizeof(*params), GFP_KERNEL);
+	if (!params) {
+		err = -ENOMEM;
+		goto out;
+	}
+	if (copy_from_user(params, _params, sizeof(*params))) {
+		err = -EFAULT;
+		goto out;
+	}
+	err = snd_pcm_hw_params(substream, params);
+	if (copy_to_user(_params, params, sizeof(*params))) {
+		if (!err)
+			err = -EFAULT;
+	}
+out:
+	kfree(params);
 	return err;
 }
 
@@ -3009,6 +3033,12 @@
 	.nopage =	snd_pcm_mmap_data_nopage,
 };
 
+static struct vm_operations_struct snd_pcm_vm_ops_data_mmio =
+{
+	.open =		snd_pcm_mmap_data_open,
+	.close =	snd_pcm_mmap_data_close,
+};
+
 int snd_pcm_mmap_data(snd_pcm_substream_t *substream, struct file *file,
 		      struct vm_area_struct *area)
 {
@@ -3044,6 +3074,14 @@
 	area->vm_ops = &snd_pcm_vm_ops_data;
 	area->vm_private_data = substream;
 	area->vm_flags |= VM_RESERVED;
+	if (runtime->hw.info & SNDRV_PCM_INFO_MMAP_IOMEM) {
+		area->vm_ops = &snd_pcm_vm_ops_data_mmio;
+		area->vm_flags |= VM_IO;
+		if (io_remap_page_range(area, area->vm_start,
+					runtime->dma_addr + offset,
+					size, area->vm_page_prot))
+			return -EAGAIN;
+	}
 	atomic_inc(&runtime->mmap_count);
 	return 0;
 }
@@ -3133,31 +3171,68 @@
 
 static int snd_pcm_hw_refine_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old __user * _oparams)
 {
-	snd_pcm_hw_params_t params;
-	struct sndrv_pcm_hw_params_old oparams;
+	snd_pcm_hw_params_t *params;
+	struct sndrv_pcm_hw_params_old *oparams = NULL;
 	int err;
-	if (copy_from_user(&oparams, _oparams, sizeof(oparams)))
-		return -EFAULT;
-	snd_pcm_hw_convert_from_old_params(&params, &oparams);
-	err = snd_pcm_hw_refine(substream, &params);
-	snd_pcm_hw_convert_to_old_params(&oparams, &params);
-	if (copy_to_user(_oparams, &oparams, sizeof(oparams)))
-		return -EFAULT;
+
+	params = kmalloc(sizeof(*params), GFP_KERNEL);
+	if (!params) {
+		err = -ENOMEM;
+		goto out;
+	}
+	oparams = kmalloc(sizeof(*oparams), GFP_KERNEL);
+	if (!oparams) {
+		err = -ENOMEM;
+		goto out;
+	}
+
+	if (copy_from_user(oparams, _oparams, sizeof(*oparams))) {
+		err = -EFAULT;
+		goto out;
+	}
+	snd_pcm_hw_convert_from_old_params(params, oparams);
+	err = snd_pcm_hw_refine(substream, params);
+	snd_pcm_hw_convert_to_old_params(oparams, params);
+	if (copy_to_user(_oparams, oparams, sizeof(*oparams))) {
+		if (!err)
+			err = -EFAULT;
+	}
+out:
+	kfree(params);
+	kfree(oparams);
 	return err;
 }
 
 static int snd_pcm_hw_params_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old __user * _oparams)
 {
-	snd_pcm_hw_params_t params;
-	struct sndrv_pcm_hw_params_old oparams;
+	snd_pcm_hw_params_t *params;
+	struct sndrv_pcm_hw_params_old *oparams = NULL;
 	int err;
-	if (copy_from_user(&oparams, _oparams, sizeof(oparams)))
-		return -EFAULT;
-	snd_pcm_hw_convert_from_old_params(&params, &oparams);
-	err = snd_pcm_hw_params(substream, &params);
-	snd_pcm_hw_convert_to_old_params(&oparams, &params);
-	if (copy_to_user(_oparams, &oparams, sizeof(oparams)))
-		return -EFAULT;
+
+	params = kmalloc(sizeof(*params), GFP_KERNEL);
+	if (!params) {
+		err = -ENOMEM;
+		goto out;
+	}
+	oparams = kmalloc(sizeof(*oparams), GFP_KERNEL);
+	if (!oparams) {
+		err = -ENOMEM;
+		goto out;
+	}
+	if (copy_from_user(oparams, _oparams, sizeof(*oparams))) {
+		err = -EFAULT;
+		goto out;
+	}
+	snd_pcm_hw_convert_from_old_params(params, oparams);
+	err = snd_pcm_hw_params(substream, params);
+	snd_pcm_hw_convert_to_old_params(oparams, params);
+	if (copy_to_user(_oparams, oparams, sizeof(*oparams))) {
+		if (!err)
+			err = -EFAULT;
+	}
+out:
+	kfree(params);
+	kfree(oparams);
 	return err;
 }
 
--- diff/sound/core/seq/Makefile	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/core/seq/Makefile	2004-07-01 21:32:54.000000000 +0100
@@ -19,9 +19,6 @@
 snd-seq-dummy-objs := seq_dummy.o
 snd-seq-virmidi-objs := seq_virmidi.o
 
-RAWMIDI_OBJS = snd-seq-midi.o snd-seq-midi-event.o
-OPL3_OBJS = snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
-
 #
 # this function returns:
 #   "m" - CONFIG_SND_SEQUENCER is m
@@ -38,54 +35,8 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_VIRMIDI) += snd-seq-virmidi.o snd-seq-midi-event.o
-obj-$(call sequencer,$(CONFIG_SND_SERIAL_U16550)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_MTPAV)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_MPU401)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ALS100)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_AZT2320)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_AZT3328)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_DT019X)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ES18XX)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_OPL3SA2)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_AD1816A)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_CS4231)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_CS4232)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_CS4236)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_PC98_CS4232)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ES1688)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_GUSCLASSIC)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_GUSMAX)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_GUSEXTREME)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_INTERWAVE)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_INTERWAVE_STB)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_OPTI92X_AD1848)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_OPTI92X_CS4231)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_OPTI93X)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_SB8)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_SB16)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_SBAWE)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) snd-seq-virmidi.o
-obj-$(call sequencer,$(CONFIG_SND_ES968)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_WAVEFRONT)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_SSCAPE)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ALS4000)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_CMIPCI)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_CS4281)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ENS1370)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ENS1371)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ES1938)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ES1968)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_FM801)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ICE1712)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ICE1724)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_INTEL8X0)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_SONICVIBES)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_VIA82XX)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_ALI5451)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_CS46XX)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_EMU10K1)) += $(RAWMIDI_OBJS) snd-seq-midi-emul.o snd-seq-virmidi.o
-obj-$(call sequencer,$(CONFIG_SND_TRIDENT)) += $(RAWMIDI_OBJS) snd-seq-midi-emul.o snd-seq-instr.o
-obj-$(call sequencer,$(CONFIG_SND_YMFPCI)) += $(RAWMIDI_OBJS) $(OPL3_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_USB_AUDIO)) += $(RAWMIDI_OBJS)
-obj-$(call sequencer,$(CONFIG_SND_HDSP)) += $(RAWMIDI_OBJS)
-
-obj-m := $(sort $(obj-m))
+obj-$(call sequencer,$(CONFIG_SND_RAWMIDI)) += snd-seq-midi.o snd-seq-midi-event.o
+obj-$(call sequencer,$(CONFIG_SND_OPL3_LIB)) += snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
+obj-$(call sequencer,$(CONFIG_SND_SBAWE)) += snd-seq-midi-emul.o snd-seq-virmidi.o
+obj-$(call sequencer,$(CONFIG_SND_EMU10K1)) += snd-seq-midi-emul.o snd-seq-virmidi.o
+obj-$(call sequencer,$(CONFIG_SND_TRIDENT)) += snd-seq-midi-emul.o snd-seq-instr.o
--- diff/sound/core/seq/instr/Makefile	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/core/seq/instr/Makefile	2004-07-01 21:32:54.000000000 +0100
@@ -17,36 +17,7 @@
 sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if $(CONFIG_SND_SEQUENCER),$(1)))
 
 # Toplevel Module Dependency
-obj-$(call sequencer,$(CONFIG_SND_ALS100)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_AZT2320)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_AZT3328)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_DT019X)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_ES18XX)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_OPL3SA2)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_AD1816A)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_CS4232)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_CS4236)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_PC98_CS4232)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_ES1688)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_GUSCLASSIC)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o
-obj-$(call sequencer,$(CONFIG_SND_GUSMAX)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o
-obj-$(call sequencer,$(CONFIG_SND_GUSEXTREME)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_INTERWAVE)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o
-obj-$(call sequencer,$(CONFIG_SND_INTERWAVE_STB)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o
-obj-$(call sequencer,$(CONFIG_SND_OPTI92X_AD1848)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_OPTI92X_CS4231)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_OPTI93X)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_SB8)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_SB16)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_SBAWE)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_WAVEFRONT)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_ALS4000)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_CMIPCI)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_CS4281)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_ES1938)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_FM801)) += snd-ainstr-fm.o
-obj-$(call sequencer,$(CONFIG_SND_SONICVIBES)) += snd-ainstr-fm.o
+obj-$(call sequencer,$(CONFIG_SND_OPL3_LIB)) += snd-ainstr-fm.o
+obj-$(call sequencer,$(CONFIG_SND_OPL4_LIB)) += snd-ainstr-fm.o
+obj-$(call sequencer,$(CONFIG_SND_GUS_SYNTH)) += snd-ainstr-gf1.o snd-ainstr-simple.o snd-ainstr-iw.o
 obj-$(call sequencer,$(CONFIG_SND_TRIDENT)) += snd-ainstr-simple.o
-obj-$(call sequencer,$(CONFIG_SND_YMFPCI)) += snd-ainstr-fm.o
-
-obj-m := $(sort $(obj-m))
--- diff/sound/core/seq/oss/seq_oss_ioctl.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/core/seq/oss/seq_oss_ioctl.c	2004-07-01 21:32:54.000000000 +0100
@@ -28,16 +28,54 @@
 #include "seq_oss_midi.h"
 #include "seq_oss_event.h"
 
+static int snd_seq_oss_synth_info_user(seq_oss_devinfo_t *dp, void __user *arg)
+{
+	struct synth_info info;
+
+	if (copy_from_user(&info, arg, sizeof(info)))
+		return -EFAULT;
+	if (snd_seq_oss_synth_make_info(dp, info.device, &info) < 0)
+		return -EINVAL;
+	if (copy_to_user(arg, &info, sizeof(info)))
+		return -EFAULT;
+	return 0;
+}
+
+static int snd_seq_oss_midi_info_user(seq_oss_devinfo_t *dp, void __user *arg)
+{
+	struct midi_info info;
+
+	if (copy_from_user(&info, arg, sizeof(info)))
+		return -EFAULT;
+	if (snd_seq_oss_midi_make_info(dp, info.device, &info) < 0)
+		return -EINVAL;
+	if (copy_to_user(arg, &info, sizeof(info)))
+		return -EFAULT;
+	return 0;
+}
+
+static int snd_seq_oss_oob_user(seq_oss_devinfo_t *dp, void __user *arg)
+{
+	unsigned char ev[8];
+	snd_seq_event_t tmpev;
+
+	if (copy_from_user(ev, arg, 8))
+		return -EFAULT;
+	memset(&tmpev, 0, sizeof(tmpev));
+	snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client);
+	tmpev.time.tick = 0;
+	if (! snd_seq_oss_process_event(dp, (evrec_t*)ev, &tmpev)) {
+		snd_seq_oss_dispatch(dp, &tmpev, 0, 0);
+	}
+	return 0;
+}
+
 int
 snd_seq_oss_ioctl(seq_oss_devinfo_t *dp, unsigned int cmd, unsigned long carg)
 {
 	int dev, val;
-	struct synth_info inf;
-	struct midi_info minf;
-	unsigned char ev[8];
 	void __user *arg = (void __user *)carg;
 	int __user *p = arg;
-	snd_seq_event_t tmpev;
 
 	switch (cmd) {
 	case SNDCTL_TMR_TIMEBASE:
@@ -124,35 +162,15 @@
 	case SNDCTL_SYNTH_INFO:
 	case SNDCTL_SYNTH_ID:
 		debug_printk(("synth info\n"));
-		if (copy_from_user(&inf, arg, sizeof(inf)))
-			return -EFAULT;
-		if (snd_seq_oss_synth_make_info(dp, inf.device, &inf) < 0)
-			return -EINVAL;
-		if (copy_to_user(arg, &inf, sizeof(inf)))
-			return -EFAULT;
-		return 0;
+		return snd_seq_oss_synth_info_user(dp, arg);
 
 	case SNDCTL_SEQ_OUTOFBAND:
-		debug_printk(("out of bound\n"));
-		if (copy_from_user(ev, arg, 8))
-			return -EFAULT;
-		memset(&tmpev, 0, sizeof(tmpev));
-		snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client);
-		tmpev.time.tick = 0;
-		if (! snd_seq_oss_process_event(dp, (evrec_t*)ev, &tmpev)) {
-			snd_seq_oss_dispatch(dp, &tmpev, 0, 0);
-		}
-		return 0;
+		debug_printk(("out of band\n"));
+		return snd_seq_oss_oob_user(dp, arg);
 
 	case SNDCTL_MIDI_INFO:
 		debug_printk(("midi info\n"));
-		if (copy_from_user(&minf, arg, sizeof(minf)))
-			return -EFAULT;
-		if (snd_seq_oss_midi_make_info(dp, minf.device, &minf) < 0)
-			return -EINVAL;
-		if (copy_to_user(arg, &minf, sizeof(minf)))
-			return -EFAULT;
-		return 0;
+		return snd_seq_oss_midi_info_user(dp, arg);
 
 	case SNDCTL_SEQ_THRESHOLD:
 		debug_printk(("threshold\n"));
--- diff/sound/core/seq/oss/seq_oss_timer.c	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/core/seq/oss/seq_oss_timer.c	2004-07-01 21:32:54.000000000 +0100
@@ -168,7 +168,7 @@
 	tmprec.queue = dp->queue;
 	tmprec.ppq = timer->ppq;
 	tmprec.tempo = timer->tempo;
-	snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO, &tmprec);
+	snd_seq_set_queue_tempo(dp->cseq, &tmprec);
 
 	send_timer_event(dp, SNDRV_SEQ_EVENT_START, 0);
 	timer->running = 1;
--- diff/sound/core/seq/seq.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/core/seq/seq.c	2004-07-01 21:32:54.000000000 +0100
@@ -133,6 +133,7 @@
 EXPORT_SYMBOL(snd_seq_kernel_client_dispatch);
 EXPORT_SYMBOL(snd_seq_kernel_client_ctl);
 EXPORT_SYMBOL(snd_seq_kernel_client_write_poll);
+EXPORT_SYMBOL(snd_seq_set_queue_tempo);
   /* seq_memory.c */
 EXPORT_SYMBOL(snd_seq_expand_var_event);
 EXPORT_SYMBOL(snd_seq_dump_var_event);
--- diff/sound/core/seq/seq_clientmgr.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/core/seq/seq_clientmgr.c	2004-07-01 21:32:54.000000000 +0100
@@ -1694,6 +1694,13 @@
 
 
 /* SET_QUEUE_TEMPO ioctl() */
+int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo)
+{
+	if (!snd_seq_queue_check_access(tempo->queue, client))
+		return -EPERM;
+	return snd_seq_queue_timer_set_tempo(tempo->queue, client, tempo);
+}
+
 static int snd_seq_ioctl_set_queue_tempo(client_t * client, void __user *arg)
 {
 	int result;
@@ -1702,15 +1709,8 @@
 	if (copy_from_user(&tempo, arg, sizeof(tempo)))
 		return -EFAULT;
 
-	if (snd_seq_queue_check_access(tempo.queue, client->number)) {
-		result = snd_seq_queue_timer_set_tempo(tempo.queue, client->number, &tempo);
-		if (result < 0)
-			return result;
-	} else {
-		return -EPERM;
-	}	
-
-	return 0;
+	result = snd_seq_set_queue_tempo(client->number, &tempo);
+	return result < 0 ? result : 0;
 }
 
 
--- diff/sound/drivers/dummy.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/drivers/dummy.c	2004-07-01 21:32:54.000000000 +0100
@@ -180,20 +180,6 @@
 static snd_card_t *snd_dummy_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 
-static int snd_card_dummy_playback_ioctl(snd_pcm_substream_t * substream,
-				         unsigned int cmd,
-				         void *arg)
-{
-	return snd_pcm_lib_ioctl(substream, cmd, arg);
-}
-
-static int snd_card_dummy_capture_ioctl(snd_pcm_substream_t * substream,
-					unsigned int cmd,
-					void *arg)
-{
-	return snd_pcm_lib_ioctl(substream, cmd, arg);
-}
-
 static void snd_card_dummy_pcm_timer_start(snd_pcm_substream_t * substream)
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
@@ -342,6 +328,17 @@
 	snd_magic_kfree(dpcm);
 }
 
+static int snd_card_dummy_hw_params(snd_pcm_substream_t * substream,
+				    snd_pcm_hw_params_t * hw_params)
+{
+	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
+}
+
+static int snd_card_dummy_hw_free(snd_pcm_substream_t * substream)
+{
+	return snd_pcm_lib_free_pages(substream);
+}
+
 static int snd_card_dummy_playback_open(snd_pcm_substream_t * substream)
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
@@ -351,10 +348,6 @@
 	dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL);
 	if (dpcm == NULL)
 		return -ENOMEM;
-	if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, &runtime->dma_bytes)) == NULL) {
-		snd_magic_kfree(dpcm);
-		return -ENOMEM;
-	}
 	init_timer(&dpcm->timer);
 	dpcm->timer.data = (unsigned long) dpcm;
 	dpcm->timer.function = snd_card_dummy_pcm_timer_function;
@@ -386,11 +379,6 @@
 	dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL);
 	if (dpcm == NULL)
 		return -ENOMEM;
-	if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, &runtime->dma_bytes)) == NULL) {
-		snd_magic_kfree(dpcm);
-		return -ENOMEM;
-	}
-	memset(runtime->dma_area, 0, runtime->dma_bytes);
 	init_timer(&dpcm->timer);
 	dpcm->timer.data = (unsigned long) dpcm;
 	dpcm->timer.function = snd_card_dummy_pcm_timer_function;
@@ -415,24 +403,20 @@
 
 static int snd_card_dummy_playback_close(snd_pcm_substream_t * substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-
-	snd_free_pages(runtime->dma_area, runtime->dma_bytes);
 	return 0;
 }
 
 static int snd_card_dummy_capture_close(snd_pcm_substream_t * substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-
-	snd_free_pages(runtime->dma_area, runtime->dma_bytes);
 	return 0;
 }
 
 static snd_pcm_ops_t snd_card_dummy_playback_ops = {
 	.open =			snd_card_dummy_playback_open,
 	.close =		snd_card_dummy_playback_close,
-	.ioctl =		snd_card_dummy_playback_ioctl,
+	.ioctl =		snd_pcm_lib_ioctl,
+	.hw_params =		snd_card_dummy_hw_params,
+	.hw_free =		snd_card_dummy_hw_free,
 	.prepare =		snd_card_dummy_playback_prepare,
 	.trigger =		snd_card_dummy_playback_trigger,
 	.pointer =		snd_card_dummy_playback_pointer,
@@ -441,7 +425,9 @@
 static snd_pcm_ops_t snd_card_dummy_capture_ops = {
 	.open =			snd_card_dummy_capture_open,
 	.close =		snd_card_dummy_capture_close,
-	.ioctl =		snd_card_dummy_capture_ioctl,
+	.ioctl =		snd_pcm_lib_ioctl,
+	.hw_params =		snd_card_dummy_hw_params,
+	.hw_free =		snd_card_dummy_hw_free,
 	.prepare =		snd_card_dummy_capture_prepare,
 	.trigger =		snd_card_dummy_capture_trigger,
 	.pointer =		snd_card_dummy_capture_pointer,
@@ -459,6 +445,9 @@
 	pcm->private_data = dummy;
 	pcm->info_flags = 0;
 	strcpy(pcm->name, "Dummy PCM");
+	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
+					      snd_dma_continuous_data(GFP_KERNEL),
+					      0, 64*1024);
 	return 0;
 }
 
--- diff/sound/drivers/mpu401/mpu401.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/drivers/mpu401/mpu401.c	2004-07-01 21:32:54.000000000 +0100
@@ -52,9 +52,6 @@
 #endif
 static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* MPU-401 port number */
 static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* MPU-401 IRQ */
-#ifdef CONFIG_X86_PC9800
-static int pc98ii[SNDRV_CARDS];				/* PC98-II dauther board */
-#endif
 static int boot_devs;
 
 module_param_array(index, int, boot_devs, 0444);
@@ -77,11 +74,6 @@
 module_param_array(irq, int, boot_devs, 0444);
 MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device.");
 MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
-#ifdef CONFIG_X86_PC9800
-module_param_array(pc98ii, bool, boot_devs, 0444);
-MODULE_PARM_DESC(pc98ii, "Roland MPU-PC98II support.");
-MODULE_PARM_SYNTAX(pc98ii, SNDRV_BOOLEAN_FALSE_DESC);
-#endif
 
 #ifndef CONFIG_ACPI_BUS
 struct acpi_device;
@@ -188,9 +180,6 @@
 	}
 #endif
 	if (snd_mpu401_uart_new(card, 0,
-#ifdef CONFIG_X86_PC9800
-				pc98ii[dev] ? MPU401_HW_PC98II :
-#endif
 				MPU401_HW_MPU401,
 				port[dev], 0,
 				irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) {
--- diff/sound/drivers/opl3/opl3_lib.c	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/drivers/opl3/opl3_lib.c	2004-07-01 21:32:54.000000000 +0100
@@ -416,26 +416,6 @@
 	case OPL3_HW_OPL3_FM801:
 		opl3->command = &snd_opl3_command;
 		break;
-	case OPL3_HW_OPL3_PC98:
-		opl3->command = &snd_opl3_command;
-
-		/* Initialize? */
-		opl3->command(opl3, OPL3_RIGHT | 0x05, 0x05);
-		opl3->command(opl3, OPL3_RIGHT | 0x08, 0x04);
-		opl3->command(opl3, OPL3_RIGHT | 0x08, 0x00);
-		opl3->command(opl3, OPL3_LEFT | 0xf7, 0x00);
-		opl3->command(opl3, OPL3_LEFT | 0x04, 0x60);
-		opl3->command(opl3, OPL3_LEFT | 0x04, 0x80);
-		inb(opl3->l_port);
-		
-		opl3->command(opl3, OPL3_LEFT | 0x02, 0xff);
-		opl3->command(opl3, OPL3_LEFT | 0x04, 0x21);
-		inb(opl3->l_port);
-		
-		opl3->command(opl3, OPL3_LEFT | 0x04, 0x60);
-		opl3->command(opl3, OPL3_LEFT | 0x04, 0x80);
-
-		break;
 	case OPL3_HW_OPL3_CS4281:
 		opl3->command = &snd_opl3_cs4281_command;
 		break;
--- diff/sound/drivers/opl4/Makefile	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/drivers/opl4/Makefile	2004-07-01 21:32:54.000000000 +0100
@@ -15,4 +15,4 @@
 sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if $(CONFIG_SND_SEQUENCER),$(1)))
 
 obj-$(CONFIG_SND_OPL4_LIB) += snd-opl4-lib.o
-obj-$(call sequencer,$(CONFIG_SND_OPL4_LIB)) += snd-opl4-synth.o
\ No newline at end of file
+obj-$(call sequencer,$(CONFIG_SND_OPL4_LIB)) += snd-opl4-synth.o
--- diff/sound/drivers/vx/vx_core.c	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/drivers/vx/vx_core.c	2004-07-01 21:32:54.000000000 +0100
@@ -572,6 +572,7 @@
 	if (cold_reset) {
 		chip->audio_source_target = chip->audio_source;
 		chip->clock_source = INTERNAL_QUARTZ;
+		chip->clock_mode = VX_CLOCK_MODE_AUTO;
 		chip->freq = 48000;
 		chip->uer_detected = VX_UER_MODE_NOT_PRESENT;
 		chip->uer_bits = SNDRV_PCM_DEFAULT_CON_SPDIF;
@@ -606,6 +607,7 @@
 	vx_core_t *chip = snd_magic_cast(vx_core_t, entry->private_data, return);
 	static char *audio_src_vxp[] = { "Line", "Mic", "Digital" };
 	static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" };
+	static char *clock_mode[] = { "Auto", "Internal", "External" };
 	static char *clock_src[] = { "Internal", "External" };
 	static char *uer_type[] = { "Consumer", "Professional", "Not Present" };
 	
@@ -629,6 +631,7 @@
 	snd_iprintf(buffer, "Input Source: %s\n", vx_is_pcmcia(chip) ?
 		    audio_src_vxp[chip->audio_source] :
 		    audio_src_vx2[chip->audio_source]);
+	snd_iprintf(buffer, "Clock Mode: %s\n", clock_mode[chip->clock_mode]);
 	snd_iprintf(buffer, "Clock Source: %s\n", clock_src[chip->clock_source]);
 	snd_iprintf(buffer, "Frequency: %d\n", chip->freq);
 	snd_iprintf(buffer, "Detected Frequency: %d\n", chip->freq_detected);
--- diff/sound/drivers/vx/vx_mixer.c	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/drivers/vx/vx_mixer.c	2004-07-01 21:32:54.000000000 +0100
@@ -524,6 +524,54 @@
 };
 
 /*
+ * clock mode selection
+ */
+static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+{
+	static char *texts[3] = {
+		"Auto", "Internal", "External"
+	};
+
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
+	uinfo->count = 1;
+	uinfo->value.enumerated.items = 3;
+	if (uinfo->value.enumerated.item > 2)
+		uinfo->value.enumerated.item = 2;
+	strcpy(uinfo->value.enumerated.name,
+	       texts[uinfo->value.enumerated.item]);
+	return 0;
+}
+
+static int vx_clock_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+{
+	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	ucontrol->value.enumerated.item[0] = chip->clock_mode;
+	return 0;
+}
+
+static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+{
+	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	down(&chip->mixer_mutex);
+	if (chip->clock_mode != ucontrol->value.enumerated.item[0]) {
+		chip->clock_mode = ucontrol->value.enumerated.item[0];
+		vx_set_clock(chip, chip->freq);
+		up(&chip->mixer_mutex);
+		return 1;
+	}
+	up(&chip->mixer_mutex);
+	return 0;
+}
+
+static snd_kcontrol_new_t vx_control_clock_mode = {
+	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =		"Clock Mode",
+	.info =		vx_clock_mode_info,
+	.get =		vx_clock_mode_get,
+	.put =		vx_clock_mode_put,
+};
+
+/*
  * Audio Gain
  */
 static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
@@ -913,6 +961,9 @@
 	/* Audio source */
 	if ((err = snd_ctl_add(card, snd_ctl_new1(&vx_control_audio_src, chip))) < 0)
 		return err;
+	/* clock mode */
+	if ((err = snd_ctl_add(card, snd_ctl_new1(&vx_control_clock_mode, chip))) < 0)
+		return err;
 	/* IEC958 controls */
 	if ((err = snd_ctl_add(card, snd_ctl_new1(&vx_control_iec958_mask, chip))) < 0)
 		return err;
--- diff/sound/drivers/vx/vx_pcm.c	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/drivers/vx/vx_pcm.c	2004-07-01 21:32:54.000000000 +0100
@@ -48,6 +48,7 @@
 #include <sound/driver.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
+#include <linux/delay.h>
 #include <sound/core.h>
 #include <sound/asoundef.h>
 #include <sound/pcm.h>
@@ -381,7 +382,7 @@
  */
 static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state)
 {
-	int err, i, cur_state, delay;
+	int err, i, cur_state;
 
 	/* Check the pipe is not already in the requested state */
 	if (vx_get_pipe_state(chip, pipe, &cur_state) < 0)
@@ -394,17 +395,14 @@
 	 * enough sound buffer for this pipe)
 	 */
 	if (state) {
-		int delay = CAN_START_DELAY;
 		for (i = 0 ; i < MAX_WAIT_FOR_DSP; i++) {
-			snd_vx_delay(chip, delay);
 			err = vx_pipe_can_start(chip, pipe);
 			if (err > 0)
 				break;
 			/* Wait for a few, before asking again
 			 * to avoid flooding the DSP with our requests
 			 */
-			if ((i % 4 ) == 0)
-				delay <<= 1;
+			mdelay(1);
 		}
 	}
     
@@ -418,15 +416,12 @@
 	 * reaching the expected state before returning
 	 * Check one pipe only (since they are synchronous)
 	 */
-	delay = WAIT_STATE_DELAY;
 	for (i = 0; i < MAX_WAIT_FOR_DSP; i++) {
-		snd_vx_delay(chip, delay);
 		err = vx_get_pipe_state(chip, pipe, &cur_state);
 		if (err < 0 || cur_state == state)
 			break;
 		err = -EIO;
-		if ((i % 4 ) == 0)
-			delay <<= 1;
+		mdelay(1);
 	}
 	return err < 0 ? -EIO : 0;
 }
--- diff/sound/drivers/vx/vx_uer.c	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/drivers/vx/vx_uer.c	2004-07-01 21:32:54.000000000 +0100
@@ -263,17 +263,17 @@
 	/* change the audio source if possible */
 	vx_sync_audio_source(chip);
 
-	switch (chip->audio_source) {
-	case VX_AUDIO_SRC_DIGITAL:
+	if (chip->clock_mode == VX_CLOCK_MODE_EXTERNAL ||
+	    (chip->clock_mode == VX_CLOCK_MODE_AUTO &&
+	     chip->audio_source == VX_AUDIO_SRC_DIGITAL)) {
 		if (chip->clock_source != UER_SYNC) {
 			vx_change_clock_source(chip, UER_SYNC);
 			mdelay(6);
 			src_changed = 1;
 		}
-		if (chip->freq == freq)
-			return 0;
-		break;
-	default:
+	} else if (chip->clock_mode == VX_CLOCK_MODE_INTERNAL ||
+		   (chip->clock_mode == VX_CLOCK_MODE_AUTO &&
+		    chip->audio_source != VX_AUDIO_SRC_DIGITAL)) {
 		if (chip->clock_source != INTERNAL_QUARTZ) {
 			vx_change_clock_source(chip, INTERNAL_QUARTZ);
 			src_changed = 1;
@@ -283,8 +283,9 @@
 		vx_set_internal_clock(chip, freq);
 		if (src_changed)
 			vx_modify_board_inputs(chip);
-		break;
 	}
+	if (chip->freq == freq)
+		return 0;
 	chip->freq = freq;
 	vx_modify_board_clock(chip, 1);
 	return 0;
--- diff/sound/isa/Kconfig	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/isa/Kconfig	2004-07-01 21:32:54.000000000 +0100
@@ -51,16 +51,6 @@
 	  Say 'Y' or 'M' to include support for CS4235,CS4236,CS4237B,CS4238B,CS4239
 	  chips from Cirrus Logic - Crystal Semiconductors.
 
-config SND_PC98_CS4232
-	tristate "NEC PC9800 CS4232 driver"
-	depends on SND && X86_PC9800
-	select SND_OPL3_LIB
-	select SND_MPU401_UART
-	select SND_PCM
-	help
-	  Say 'Y' or 'M' to include support for NEC PC-9801/PC-9821 on-board
-	  soundchip based on CS4232.
-
 config SND_ES968
 	tristate "Generic ESS ES968 driver"
 	depends on SND && ISAPNP
@@ -87,11 +77,15 @@
 	help
 	  Say 'Y' or 'M' to include support for ESS AudioDrive ES18xx chips.
 
+config SND_GUS_SYNTH
+	tristate
+
 config SND_GUSCLASSIC
 	tristate "Gravis UltraSound Classic"
 	depends on SND
 	select SND_RAWMIDI
 	select SND_PCM
+	select SND_GUS_SYNTH
 	help
 	  Say 'Y' or 'M' to include support for Gravis UltraSound Classic soundcard.
 
@@ -101,6 +95,7 @@
 	select SND_HWDEP
 	select SND_MPU401_UART
 	select SND_PCM
+	select SND_GUS_SYNTH
 	help
 	  Say 'Y' or 'M' to include support for Gravis UltraSound Extreme soundcard.
 
@@ -109,6 +104,7 @@
 	depends on SND
 	select SND_RAWMIDI
 	select SND_PCM
+	select SND_GUS_SYNTH
 	help
 	  Say 'Y' or 'M' to include support for Gravis UltraSound MAX soundcard.
 
@@ -117,6 +113,7 @@
 	depends on SND
 	select SND_RAWMIDI
 	select SND_PCM
+	select SND_GUS_SYNTH
 	help
 	  Say 'Y' or 'M' to include support for AMD InterWave based soundcards
 	  (Gravis UltraSound Plug & Play, STB SoundRage32, MED3210, Dynasonic Pro,
@@ -127,6 +124,7 @@
 	depends on SND
 	select SND_RAWMIDI
 	select SND_PCM
+	select SND_GUS_SYNTH
 	help
 	  Say 'Y' or 'M' to include support for AMD InterWave based soundcards
 	  with TEA6330T bass and treble regulator (UltraSound 32-Pro).
--- diff/sound/isa/cs423x/Makefile	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/isa/cs423x/Makefile	2004-07-01 21:32:54.000000000 +0100
@@ -8,7 +8,6 @@
 snd-cs4231-objs := cs4231.o
 snd-cs4232-objs := cs4232.o
 snd-cs4236-objs := cs4236.o
-snd-pc98-cs4232-objs := pc98.o
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_AZT2320) += snd-cs4231-lib.o
@@ -22,6 +21,5 @@
 obj-$(CONFIG_SND_OPTI92X_CS4231) += snd-cs4231-lib.o
 obj-$(CONFIG_SND_WAVEFRONT) += snd-cs4231-lib.o
 obj-$(CONFIG_SND_SSCAPE) += snd-cs4231-lib.o
-obj-$(CONFIG_SND_PC98_CS4232) += snd-pc98-cs4232.o snd-cs4231-lib.o
 
 obj-m := $(sort $(obj-m))
--- diff/sound/isa/gus/Makefile	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/isa/gus/Makefile	2004-07-01 21:32:54.000000000 +0100
@@ -27,14 +27,10 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_GUSCLASSIC) += snd-gusclassic.o snd-gus-lib.o
-obj-$(call sequencer,$(CONFIG_SND_GUSCLASSIC)) += snd-gus-synth.o
 obj-$(CONFIG_SND_GUSMAX) += snd-gusmax.o snd-gus-lib.o
-obj-$(call sequencer,$(CONFIG_SND_GUSMAX)) += snd-gus-synth.o
 obj-$(CONFIG_SND_GUSEXTREME) += snd-gusextreme.o snd-gus-lib.o
-obj-$(call sequencer,$(CONFIG_SND_GUSEXTREME)) += snd-gus-synth.o
 obj-$(CONFIG_SND_INTERWAVE) += snd-interwave.o snd-gus-lib.o
-obj-$(call sequencer,$(CONFIG_SND_INTERWAVE)) += snd-gus-synth.o
 obj-$(CONFIG_SND_INTERWAVE_STB) += snd-interwave-stb.o snd-gus-lib.o
-obj-$(call sequencer,$(CONFIG_SND_INTERWAVE_STB)) += snd-gus-synth.o
+obj-$(call sequencer,$(CONFIG_SND_GUS_SYNTH)) += snd-gus-synth.o
 
 obj-m := $(sort $(obj-m))
--- diff/sound/isa/opti9xx/opti92x-ad1848.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/isa/opti9xx/opti92x-ad1848.c	2004-07-01 21:32:54.000000000 +0100
@@ -474,7 +474,6 @@
 	unsigned char dma_bits;
 	unsigned char mpu_port_bits = 0;
 	unsigned char mpu_irq_bits;
-	unsigned long flags;
 
 	switch (chip->hardware) {
 #ifndef OPTi93X
@@ -601,13 +600,11 @@
 	dma_bits |= 0x04;
 #endif	/* CS4231 || OPTi93X */
 
-	spin_lock_irqsave(&chip->lock, flags);
 #ifndef OPTi93X
 	 outb(irq_bits << 3 | dma_bits, chip->wss_base);
 #else /* OPTi93X */
 	snd_opti9xx_write(chip, OPTi9XX_MC_REG(3), (irq_bits << 3 | dma_bits));
 #endif /* OPTi93X */
-	spin_unlock_irqrestore(&chip->lock, flags);
 
 __skip_resources:
 	if (chip->hardware > OPTi9XX_HW_82C928) {
@@ -767,15 +764,10 @@
 
 static void snd_opti93x_mute(opti93x_t *chip, int mute)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&chip->lock, flags);
-
 	mute = mute ? 1 : 0;
-	if (chip->mute == mute) {
-		spin_unlock_irqrestore(&chip->lock, flags);
+	if (chip->mute == mute)
 		return;
-	}
+
 	chip->mute = mute;
 
 	snd_opti93x_mute_reg(chip, OPTi93X_CD_LEFT_INPUT, mute);
@@ -800,8 +792,6 @@
 	snd_opti93x_mute_reg(chip, OPTi93X_MIC_RIGHT_INPUT, mute);
 	snd_opti93x_mute_reg(chip, OPTi93X_OUT_LEFT, mute);
 	snd_opti93x_mute_reg(chip, OPTi93X_OUT_RIGHT, mute);
-
-	spin_unlock_irqrestore(&chip->lock, flags);
 }
 
 
@@ -873,10 +863,8 @@
 
 static void snd_opti93x_playback_format(opti93x_t *chip, unsigned char fmt)
 {
-	unsigned long flags;
 	unsigned char mask;
 
-	spin_lock_irqsave(&chip->lock, flags);
 	snd_opti93x_mute(chip, 1);
 
 	snd_opti93x_mce_up(chip);
@@ -885,14 +873,10 @@
 	snd_opti93x_mce_down(chip);
 
 	snd_opti93x_mute(chip, 0);
-	spin_unlock_irqrestore(&chip->lock, flags);
 }
 
 static void snd_opti93x_capture_format(opti93x_t *chip, unsigned char fmt)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&chip->lock, flags);
 	snd_opti93x_mute(chip, 1);
 
 	snd_opti93x_mce_up(chip);
@@ -904,7 +888,6 @@
 	snd_opti93x_mce_down(chip);
 
 	snd_opti93x_mute(chip, 0);
-	spin_unlock_irqrestore(&chip->lock, flags);
 }
 
 
--- diff/sound/isa/wavefront/wavefront_synth.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/isa/wavefront/wavefront_synth.c	2004-07-01 21:32:54.000000000 +0100
@@ -1961,6 +1961,12 @@
 			break;
 		}
 
+		if (section_length < 0 || section_length > WF_SECTION_MAX) {
+			snd_printk ("invalid firmware section length %d\n",
+				    section_length);
+			goto failure;
+		}
+
 		if (sys_read (fd, section, section_length) != section_length) {
 			snd_printk ("firmware section "
 				"read error.\n");
--- diff/sound/oss/Kconfig	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/oss/Kconfig	2004-07-01 21:32:54.000000000 +0100
@@ -186,7 +186,10 @@
 
 config SOUND_HAL2
 	tristate "SGI HAL2 sound (EXPERIMENTAL)"
-	depends on SGI_IP22 && SOUND && EXPERIMENTAL
+	depends on SOUND_PRIME!=n && SOUND && SGI_IP22 && EXPERIMENTAL
+	help
+	  Say Y or M if you have an SGI Indy system and want to be able to
+	  use it's on-board A2 audio system.
 
 config SOUND_VRC5477
 	tristate "NEC Vrc5477 AC97 sound"
--- diff/sound/oss/cmpci.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/oss/cmpci.c	2004-07-01 21:32:54.000000000 +0100
@@ -3280,7 +3280,7 @@
 MODULE_DESCRIPTION("CM8x38 Audio Driver");
 MODULE_LICENSE("GPL");
 
-static void __devinit cm_remove(struct pci_dev *dev)
+static void __devexit cm_remove(struct pci_dev *dev)
 {
 	struct cm_state *s = pci_get_drvdata(dev);
 
@@ -3337,7 +3337,7 @@
        .name	 = "cmpci",
        .id_table = id_table,
        .probe	 = cm_probe,
-       .remove	 = cm_remove
+       .remove	 = __devexit_p(cm_remove)
 };
 
 static int __init init_cmpci(void)
--- diff/sound/oss/dmasound/dmasound_atari.c	2004-05-19 22:13:24.000000000 +0100
+++ source/sound/oss/dmasound/dmasound_atari.c	2004-07-01 21:32:54.000000000 +0100
@@ -22,7 +22,6 @@
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
 
-#include <asm/pgalloc.h>
 #include <asm/uaccess.h>
 #include <asm/atariints.h>
 #include <asm/atari_stram.h>
--- diff/sound/oss/hal2.c	2004-05-19 22:13:23.000000000 +0100
+++ source/sound/oss/hal2.c	2004-07-01 21:32:54.000000000 +0100
@@ -1,6 +1,6 @@
 /*
- *  Driver for HAL2 sound processors
- *  Copyright (c) 2001, 2002 Ladislav Michl <ladis@psi.cz>
+ *  Driver for A2 audio system used in SGI machines
+ *  Copyright (c) 2001, 2002, 2003 Ladislav Michl <ladis@linux-mips.org>
  *  
  *  Based on Ulf Carlsson's code.
  *
@@ -21,22 +21,21 @@
  *  /dev/dsp    standard dsp device, (mostly) OSS compatible
  *  /dev/mixer	standard mixer device, (mostly) OSS compatible
  *
- *  BUGS:
- *  + Driver currently supports indigo mode only.
- *  + Recording doesn't work. I guess that it is caused by PBUS channel
- *    misconfiguration, but until I get relevant info I'm unable to fix it.
  */
-
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/poll.h>
+#include <linux/interrupt.h>
+#include <linux/dma-mapping.h>
 #include <linux/sound.h>
 #include <linux/soundcard.h>
+
 #include <asm/io.h>
-#include <asm/uaccess.h>
-#include <asm/sgi/sgint23.h>
+#include <asm/sgi/hpc3.h>
+#include <asm/sgi/ip22.h>
 
 #include "hal2.h"
 
@@ -52,61 +51,131 @@
 #define DEBUG_MIX(args...)
 #endif
 
+/*
+ * Before touching these look how it works. It is a bit unusual I know,
+ * but it helps to keep things simple. This driver is considered complete
+ * and I won't add any new features although hardware has many cool
+ * capabilities.
+ * (Historical note: HAL2 driver was first written by Ulf Carlsson - ALSA
+ * 0.3 running with 2.2.x kernel. Then ALSA changed completely and it
+ * seemed easier to me to write OSS driver from scratch - this one. Now
+ * when ALSA is official part of 2.6 kernel it's time to write ALSA driver
+ * using (hopefully) final version of ALSA interface)
+ */
+#define H2_BLOCK_SIZE	1024
+#define H2_ADC_BUFSIZE	8192
+#define H2_DAC_BUFSIZE	16834
+
+struct hal2_pbus {
+	struct hpc3_pbus_dmacregs *pbus;
+	int pbusnr;
+	unsigned int ctrl;		/* Current state of pbus->pbdma_ctrl */
+};
+
+struct hal2_desc {
+	struct hpc_dma_desc desc;
+	u32 cnt;			/* don't touch, it is also padding */
+};
+
+struct hal2_codec {
+	unsigned char *buffer;
+	struct hal2_desc *desc;
+	int desc_count;
+	int tail, head;			/* tail index, head index */
+	struct hal2_pbus pbus;
+	unsigned int format;		/* Audio data format */
+	int voices;			/* mono/stereo */
+	unsigned int sample_rate;
+	unsigned int master;		/* Master frequency */
+	unsigned short mod;		/* MOD value */
+	unsigned short inc;		/* INC value */
+
+	wait_queue_head_t dma_wait;
+	spinlock_t lock;
+	struct semaphore sem;
+
+	int usecount;			/* recording and playback are
+					 * independent */
+};
+
+#define H2_MIX_OUTPUT_ATT	0
+#define H2_MIX_INPUT_GAIN	1
+#define H2_MIXERS		2
+struct hal2_mixer {
+	int modcnt;
+	unsigned int master;
+	unsigned int volume[H2_MIXERS];
+};
+
+struct hal2_card {
+	int dev_dsp;			/* audio device */
+	int dev_mixer;			/* mixer device */
+	int dev_midi;			/* midi device */
+
+	struct hal2_ctl_regs *ctl_regs;	/* HAL2 ctl registers */
+	struct hal2_aes_regs *aes_regs;	/* HAL2 aes registers */
+	struct hal2_vol_regs *vol_regs;	/* HAL2 vol registers */
+	struct hal2_syn_regs *syn_regs;	/* HAL2 syn registers */
+
+	struct hal2_codec dac;
+	struct hal2_codec adc;
+	struct hal2_mixer mixer;
+};
+
 #define H2_INDIRECT_WAIT(regs)	while (regs->isr & H2_ISR_TSTATUS);
 
 #define H2_READ_ADDR(addr)	(addr | (1<<7))
 #define H2_WRITE_ADDR(addr)	(addr)
 
-static char *hal2str = "HAL2 audio";
-static int ibuffers = 32;
-static int obuffers = 32;
+static char *hal2str = "HAL2";
 
-/* I doubt anyone has a machine with two HAL2 cards. It's possible to
+/*
+ * I doubt anyone has a machine with two HAL2 cards. It's possible to
  * have two HPC's, so it is probably possible to have two HAL2 cards.
  * Try to deal with it, but note that it is not tested.
  */
 #define MAXCARDS	2
-static hal2_card_t* hal2_card[MAXCARDS];
+static struct hal2_card* hal2_card[MAXCARDS];
 
 static const struct {
 	unsigned char idx:4, avail:1;
 } mixtable[SOUND_MIXER_NRDEVICES] = {
-	[SOUND_MIXER_PCM] = { H2_MIX_OUTPUT_ATT, 1 },	/* voice */
-	[SOUND_MIXER_MIC] = { H2_MIX_INPUT_GAIN, 1 },	/* mic */
+	[SOUND_MIXER_PCM]	= { H2_MIX_OUTPUT_ATT, 1 },	/* voice */
+	[SOUND_MIXER_MIC]	= { H2_MIX_INPUT_GAIN, 1 },	/* mic */
 };
 
 #define H2_SUPPORTED_FORMATS	(AFMT_S16_LE | AFMT_S16_BE)
 
-static inline void hal2_isr_write(hal2_card_t *hal2, u32 val)
+static inline void hal2_isr_write(struct hal2_card *hal2, u16 val)
 {
 	hal2->ctl_regs->isr = val;
 }
 
-static inline u32 hal2_isr_look(hal2_card_t *hal2)
+static inline u16 hal2_isr_look(struct hal2_card *hal2)
 {
 	return hal2->ctl_regs->isr;
 }
 
-static inline u32 hal2_rev_look(hal2_card_t *hal2)
+static inline u16 hal2_rev_look(struct hal2_card *hal2)
 {
 	return hal2->ctl_regs->rev;
 }
 
-#if 0
-static u16 hal2_i_look16(hal2_card_t *hal2, u32 addr)
+#ifdef HAL2_DUMP_REGS
+static u16 hal2_i_look16(struct hal2_card *hal2, u16 addr)
 {
-	hal2_ctl_regs_t *regs = hal2->ctl_regs;
+	struct hal2_ctl_regs *regs = hal2->ctl_regs;
 
 	regs->iar = H2_READ_ADDR(addr);
 	H2_INDIRECT_WAIT(regs);
-	return (regs->idr0 & 0xffff);
+	return regs->idr0;
 }
 #endif
 
-static u32 hal2_i_look32(hal2_card_t *hal2, u32 addr)
+static u32 hal2_i_look32(struct hal2_card *hal2, u16 addr)
 {
 	u32 ret;
-	hal2_ctl_regs_t *regs = hal2->ctl_regs;
+	struct hal2_ctl_regs *regs = hal2->ctl_regs;
 
 	regs->iar = H2_READ_ADDR(addr);
 	H2_INDIRECT_WAIT(regs);
@@ -117,9 +186,9 @@
 	return ret;
 }
 
-static void hal2_i_write16(hal2_card_t *hal2, u32 addr, u16 val)
+static void hal2_i_write16(struct hal2_card *hal2, u16 addr, u16 val)
 {
-	hal2_ctl_regs_t *regs = hal2->ctl_regs;
+	struct hal2_ctl_regs *regs = hal2->ctl_regs;
 
 	regs->idr0 = val;
 	regs->idr1 = 0;
@@ -129,9 +198,9 @@
 	H2_INDIRECT_WAIT(regs);
 }
 
-static void hal2_i_write32(hal2_card_t *hal2, u32 addr, u32 val)
+static void hal2_i_write32(struct hal2_card *hal2, u16 addr, u32 val)
 {
-	hal2_ctl_regs_t *regs = hal2->ctl_regs;
+	struct hal2_ctl_regs *regs = hal2->ctl_regs;
 
 	regs->idr0 = val & 0xffff;
 	regs->idr1 = val >> 16;
@@ -141,13 +210,13 @@
 	H2_INDIRECT_WAIT(regs);
 }
 
-static void hal2_i_setbit16(hal2_card_t *hal2, u32 addr, u16 bit)
+static void hal2_i_setbit16(struct hal2_card *hal2, u16 addr, u16 bit)
 {
-	hal2_ctl_regs_t *regs = hal2->ctl_regs;
+	struct hal2_ctl_regs *regs = hal2->ctl_regs;
 
 	regs->iar = H2_READ_ADDR(addr);
 	H2_INDIRECT_WAIT(regs);
-	regs->idr0 = regs->idr0 | bit;
+	regs->idr0 = (regs->idr0 & 0xffff) | bit;
 	regs->idr1 = 0;
 	regs->idr2 = 0;
 	regs->idr3 = 0;
@@ -155,14 +224,14 @@
 	H2_INDIRECT_WAIT(regs);
 }
 
-static void hal2_i_setbit32(hal2_card_t *hal2, u32 addr, u32 bit)
+static void hal2_i_setbit32(struct hal2_card *hal2, u16 addr, u32 bit)
 {
 	u32 tmp;
-	hal2_ctl_regs_t *regs = hal2->ctl_regs;
+	struct hal2_ctl_regs *regs = hal2->ctl_regs;
 
 	regs->iar = H2_READ_ADDR(addr);
 	H2_INDIRECT_WAIT(regs);
-	tmp = regs->idr0 | (regs->idr1 << 16) | bit;
+	tmp = (regs->idr0 & 0xffff) | (regs->idr1 << 16) | bit;
 	regs->idr0 = tmp & 0xffff;
 	regs->idr1 = tmp >> 16;
 	regs->idr2 = 0;
@@ -171,13 +240,13 @@
 	H2_INDIRECT_WAIT(regs);
 }
 
-static void hal2_i_clearbit16(hal2_card_t *hal2, u32 addr, u16 bit)
+static void hal2_i_clearbit16(struct hal2_card *hal2, u16 addr, u16 bit)
 {
-	hal2_ctl_regs_t *regs = hal2->ctl_regs;
+	struct hal2_ctl_regs *regs = hal2->ctl_regs;
 
 	regs->iar = H2_READ_ADDR(addr);
 	H2_INDIRECT_WAIT(regs);
-	regs->idr0 = regs->idr0 & ~bit;
+	regs->idr0 = (regs->idr0 & 0xffff) & ~bit;
 	regs->idr1 = 0;
 	regs->idr2 = 0;
 	regs->idr3 = 0;
@@ -186,14 +255,14 @@
 }
 
 #if 0
-static void hal2_i_clearbit32(hal2_card_t *hal2, u32 addr, u32 bit)
+static void hal2_i_clearbit32(struct hal2_card *hal2, u16 addr, u32 bit)
 {
 	u32 tmp;
 	hal2_ctl_regs_t *regs = hal2->ctl_regs;
 
 	regs->iar = H2_READ_ADDR(addr);
 	H2_INDIRECT_WAIT(regs);
-	tmp = (regs->idr0 | (regs->idr1 << 16)) & ~bit;
+	tmp = ((regs->idr0 & 0xffff) | (regs->idr1 << 16)) & ~bit;
 	regs->idr0 = tmp & 0xffff;
 	regs->idr1 = tmp >> 16;
 	regs->idr2 = 0;
@@ -203,33 +272,33 @@
 }
 #endif
 
-#ifdef HAL2_DEBUG
-static void hal2_dump_regs(hal2_card_t *hal2)
+#ifdef HAL2_DUMP_REGS
+static void hal2_dump_regs(struct hal2_card *hal2)
 {
-	printk("isr: %08hx ", hal2_isr_look(hal2));
-	printk("rev: %08hx\n", hal2_rev_look(hal2));
-	printk("relay: %04hx\n", hal2_i_look16(hal2, H2I_RELAY_C));
-	printk("port en: %04hx ", hal2_i_look16(hal2, H2I_DMA_PORT_EN));
-	printk("dma end: %04hx ", hal2_i_look16(hal2, H2I_DMA_END));
-	printk("dma drv: %04hx\n", hal2_i_look16(hal2, H2I_DMA_DRV));
-	printk("syn ctl: %04hx ", hal2_i_look16(hal2, H2I_SYNTH_C));
-	printk("aesrx ctl: %04hx ", hal2_i_look16(hal2, H2I_AESRX_C));
-	printk("aestx ctl: %04hx ", hal2_i_look16(hal2, H2I_AESTX_C));
-	printk("dac ctl1: %04hx ", hal2_i_look16(hal2, H2I_ADC_C1));
-	printk("dac ctl2: %08lx ", hal2_i_look32(hal2, H2I_ADC_C2));
-	printk("adc ctl1: %04hx ", hal2_i_look16(hal2, H2I_DAC_C1));
-	printk("adc ctl2: %08lx ", hal2_i_look32(hal2, H2I_DAC_C2));
-	printk("syn map: %04hx\n", hal2_i_look16(hal2, H2I_SYNTH_MAP_C));
-	printk("bres1 ctl1: %04hx ", hal2_i_look16(hal2, H2I_BRES1_C1));
-	printk("bres1 ctl2: %04lx ", hal2_i_look32(hal2, H2I_BRES1_C2));
-	printk("bres2 ctl1: %04hx ", hal2_i_look16(hal2, H2I_BRES2_C1));
-	printk("bres2 ctl2: %04lx ", hal2_i_look32(hal2, H2I_BRES2_C2));
-	printk("bres3 ctl1: %04hx ", hal2_i_look16(hal2, H2I_BRES3_C1));
-	printk("bres3 ctl2: %04lx\n", hal2_i_look32(hal2, H2I_BRES3_C2));
+	DEBUG("isr: %08hx ", hal2_isr_look(hal2));
+	DEBUG("rev: %08hx\n", hal2_rev_look(hal2));
+	DEBUG("relay: %04hx\n", hal2_i_look16(hal2, H2I_RELAY_C));
+	DEBUG("port en: %04hx ", hal2_i_look16(hal2, H2I_DMA_PORT_EN));
+	DEBUG("dma end: %04hx ", hal2_i_look16(hal2, H2I_DMA_END));
+	DEBUG("dma drv: %04hx\n", hal2_i_look16(hal2, H2I_DMA_DRV));
+	DEBUG("syn ctl: %04hx ", hal2_i_look16(hal2, H2I_SYNTH_C));
+	DEBUG("aesrx ctl: %04hx ", hal2_i_look16(hal2, H2I_AESRX_C));
+	DEBUG("aestx ctl: %04hx ", hal2_i_look16(hal2, H2I_AESTX_C));
+	DEBUG("dac ctl1: %04hx ", hal2_i_look16(hal2, H2I_ADC_C1));
+	DEBUG("dac ctl2: %08x ", hal2_i_look32(hal2, H2I_ADC_C2));
+	DEBUG("adc ctl1: %04hx ", hal2_i_look16(hal2, H2I_DAC_C1));
+	DEBUG("adc ctl2: %08x ", hal2_i_look32(hal2, H2I_DAC_C2));
+	DEBUG("syn map: %04hx\n", hal2_i_look16(hal2, H2I_SYNTH_MAP_C));
+	DEBUG("bres1 ctl1: %04hx ", hal2_i_look16(hal2, H2I_BRES1_C1));
+	DEBUG("bres1 ctl2: %04x ", hal2_i_look32(hal2, H2I_BRES1_C2));
+	DEBUG("bres2 ctl1: %04hx ", hal2_i_look16(hal2, H2I_BRES2_C1));
+	DEBUG("bres2 ctl2: %04x ", hal2_i_look32(hal2, H2I_BRES2_C2));
+	DEBUG("bres3 ctl1: %04hx ", hal2_i_look16(hal2, H2I_BRES3_C1));
+	DEBUG("bres3 ctl2: %04x\n", hal2_i_look32(hal2, H2I_BRES3_C2));
 }
 #endif
 
-static hal2_card_t* hal2_dsp_find_card(int minor)
+static struct hal2_card* hal2_dsp_find_card(int minor)
 {
 	int i;
 
@@ -239,7 +308,7 @@
 	return NULL;
 }
 
-static hal2_card_t* hal2_mixer_find_card(int minor)
+static struct hal2_card* hal2_mixer_find_card(int minor)
 {
 	int i;
 
@@ -249,48 +318,51 @@
 	return NULL;
 }
 
+static void hal2_inc_head(struct hal2_codec *codec)
+{
+	codec->head++;
+	if (codec->head == codec->desc_count)
+		codec->head = 0;
+}
 
-static void hal2_dac_interrupt(hal2_codec_t *dac)
+static void hal2_inc_tail(struct hal2_codec *codec)
+{
+	codec->tail++;
+	if (codec->tail == codec->desc_count)
+		codec->tail = 0;
+}
+
+static void hal2_dac_interrupt(struct hal2_codec *dac)
 {
 	int running;
 
 	spin_lock(&dac->lock);
-	
 	/* if tail buffer contains zero samples DMA stream was already
 	 * stopped */
-	running = dac->tail->info.cnt;
-	dac->tail->info.cnt = 0;
-	dac->tail->info.desc.cntinfo = HPCDMA_XIE | HPCDMA_EOX;
-	dma_cache_wback_inv((unsigned long) dac->tail,
-			    sizeof(struct hpc_dma_desc));
+	running = dac->desc[dac->tail].cnt;
+	dac->desc[dac->tail].cnt = 0;
+	dac->desc[dac->tail].desc.cntinfo = HPCDMA_XIE | HPCDMA_EOX;
 	/* we just proccessed empty buffer, don't update tail pointer */
 	if (running)
-		dac->tail = dac->tail->info.next;
-
+		hal2_inc_tail(dac);
 	spin_unlock(&dac->lock);
 
 	wake_up(&dac->dma_wait);
 }
 
-static void hal2_adc_interrupt(hal2_codec_t *adc)
+static void hal2_adc_interrupt(struct hal2_codec *adc)
 {
 	int running;
-	
-	spin_lock(&adc->lock);
 
+	spin_lock(&adc->lock);
 	/* if head buffer contains nonzero samples DMA stream was already
 	 * stopped */
-	running = !adc->head->info.cnt;
-	adc->head->info.cnt = H2_BUFFER_SIZE;
-	adc->head->info.desc.cntinfo = HPCDMA_XIE | HPCDMA_EOX;
-	dma_cache_wback_inv((unsigned long) adc->head,
-			    sizeof(struct hpc_dma_desc));
+	running = !adc->desc[adc->head].cnt;
+	adc->desc[adc->head].cnt = H2_BLOCK_SIZE;
+	adc->desc[adc->head].desc.cntinfo = HPCDMA_XIE | HPCDMA_EOR;
 	/* we just proccessed empty buffer, don't update head pointer */
-	if (running) {
-		dma_cache_inv((unsigned long) adc->head->data, H2_BUFFER_SIZE);
-		adc->head = adc->head->info.next;
-	}
-
+	if (running)
+		hal2_inc_head(adc);
 	spin_unlock(&adc->lock);
 
 	wake_up(&adc->dma_wait);
@@ -298,60 +370,48 @@
 
 static irqreturn_t hal2_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	hal2_card_t *hal2 = (hal2_card_t*)dev_id;
+	struct hal2_card *hal2 = (struct hal2_card*)dev_id;
+	irqreturn_t ret = IRQ_NONE;
 
 	/* decide what caused this interrupt */
-	if (hal2->dac.pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_INT)
+	if (hal2->dac.pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_INT) {
 		hal2_dac_interrupt(&hal2->dac);
-	if (hal2->adc.pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_INT)
+		ret = IRQ_HANDLED;
+	}
+	if (hal2->adc.pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_INT) {
 		hal2_adc_interrupt(&hal2->adc);
-	return IRQ_HANDLED;
+		ret = IRQ_HANDLED;
+	}
+	return ret;
 }
 
-static int hal2_compute_rate(hal2_codec_t *codec, unsigned int rate)
+static int hal2_compute_rate(struct hal2_codec *codec, unsigned int rate)
 {
-	unsigned short inc;
+	unsigned short mod;
 	
-	/* We default to 44.1 kHz and if it isn't possible to fall back to
-	 * 48.0 kHz with the needed adjustments of real_rate.
-	 */
-
 	DEBUG("rate: %d\n", rate);
 	
-	/* Refer to CS4216 data sheet */
-	if (rate < 4000)
-		rate = 4000;
-	if (rate > 50000)
-		rate = 50000;
-
-	/* Note: This is NOT the way they set up the bresenham clock generators
-	 * in the specification. I've tried to implement that method but it
-	 * doesn't work. It's probably another silly bug in the spec.
-	 *
-	 * I accidently discovered this method while I was testing and it seems
-	 * to work very well with all frequencies, and thee shall follow rule #1
-	 * of programming :-)
-	 */
-	
-	if (44100 % rate == 0) {
-		inc = 44100 / rate;
-		if (inc < 1) inc = 1;
+	if (rate < 4000) rate = 4000;
+	else if (rate > 48000) rate = 48000;
+
+	if (44100 % rate < 48000 % rate) {
+		mod = 4 * 44100 / rate;
 		codec->master = 44100;
 	} else {
-		inc = 48000 / rate;
-		if (inc < 1) inc = 1;
-		rate = 48000 / inc;
+		mod = 4 * 48000 / rate;
 		codec->master = 48000;
 	}
-	codec->inc = inc;
-	codec->mod = 1;
-	
+
+	codec->inc = 4;
+	codec->mod = mod;
+	rate = 4 * codec->master / mod;
+
 	DEBUG("real_rate: %d\n", rate);
 
 	return rate;
 }
 
-static void hal2_set_dac_rate(hal2_card_t *hal2)
+static void hal2_set_dac_rate(struct hal2_card *hal2)
 {
 	unsigned int master = hal2->dac.master;
 	int inc = hal2->dac.inc;
@@ -360,10 +420,10 @@
 	DEBUG("master: %d inc: %d mod: %d\n", master, inc, mod);
 	
 	hal2_i_write16(hal2, H2I_BRES1_C1, (master == 44100) ? 1 : 0);
-	hal2_i_write32(hal2, H2I_BRES1_C2, ((0xffff & (mod - inc - 1)) << 16) | 1);
+	hal2_i_write32(hal2, H2I_BRES1_C2, ((0xffff & (inc - mod - 1)) << 16) | inc);
 }
 
-static void hal2_set_adc_rate(hal2_card_t *hal2)
+static void hal2_set_adc_rate(struct hal2_card *hal2)
 {
 	unsigned int master = hal2->adc.master;
 	int inc = hal2->adc.inc;
@@ -372,13 +432,13 @@
 	DEBUG("master: %d inc: %d mod: %d\n", master, inc, mod);
 	
 	hal2_i_write16(hal2, H2I_BRES2_C1, (master == 44100) ? 1 : 0);
-	hal2_i_write32(hal2, H2I_BRES2_C2, ((0xffff & (mod - inc - 1)) << 16) | 1);
+	hal2_i_write32(hal2, H2I_BRES2_C2, ((0xffff & (inc - mod - 1)) << 16) | inc);
 }
 
-static void hal2_setup_dac(hal2_card_t *hal2)
+static void hal2_setup_dac(struct hal2_card *hal2)
 {
 	unsigned int fifobeg, fifoend, highwater, sample_size;
-	hal2_pbus_t *pbus = &hal2->dac.pbus;
+	struct hal2_pbus *pbus = &hal2->dac.pbus;
 
 	DEBUG("hal2_setup_dac\n");
 	
@@ -388,230 +448,215 @@
 	 * endian. The information is written later, on the start call.
 	 */
 	sample_size = 2 * hal2->dac.voices;
-
 	/* Fifo should be set to hold exactly four samples. Highwater mark
 	 * should be set to two samples. */
 	highwater = (sample_size * 2) >> 1;	/* halfwords */
 	fifobeg = 0;				/* playback is first */
 	fifoend = (sample_size * 4) >> 3;	/* doublewords */
 	pbus->ctrl = HPC3_PDMACTRL_RT | HPC3_PDMACTRL_LD |
-		     (highwater << 8) | (fifobeg << 16) | (fifoend << 24);
+		     (highwater << 8) | (fifobeg << 16) | (fifoend << 24) |
+		     (hal2->dac.format & AFMT_S16_LE ? HPC3_PDMACTRL_SEL : 0);
 	/* We disable everything before we do anything at all */
 	pbus->pbus->pbdma_ctrl = HPC3_PDMACTRL_LD;
 	hal2_i_clearbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECTX);
-	hal2_i_clearbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));
 	/* Setup the HAL2 for playback */
 	hal2_set_dac_rate(hal2);
+	/* Set endianess */
+	if (hal2->dac.format & AFMT_S16_LE)
+		hal2_i_setbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECTX);
+	else
+		hal2_i_clearbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECTX);
+	/* Set DMA bus */
+	hal2_i_setbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));
 	/* We are using 1st Bresenham clock generator for playback */
 	hal2_i_write16(hal2, H2I_DAC_C1, (pbus->pbusnr << H2I_C1_DMA_SHIFT)
 			| (1 << H2I_C1_CLKID_SHIFT)
 			| (hal2->dac.voices << H2I_C1_DATAT_SHIFT));
 }
 
-static void hal2_setup_adc(hal2_card_t *hal2)
+static void hal2_setup_adc(struct hal2_card *hal2)
 {
 	unsigned int fifobeg, fifoend, highwater, sample_size;
-	hal2_pbus_t *pbus = &hal2->adc.pbus;
+	struct hal2_pbus *pbus = &hal2->adc.pbus;
 
 	DEBUG("hal2_setup_adc\n");
-	
-	sample_size = 2 * hal2->adc.voices;
 
+	sample_size = 2 * hal2->adc.voices;
 	highwater = (sample_size * 2) >> 1;		/* halfwords */
 	fifobeg = (4 * 4) >> 3;				/* record is second */
 	fifoend = (4 * 4 + sample_size * 4) >> 3;	/* doublewords */
 	pbus->ctrl = HPC3_PDMACTRL_RT | HPC3_PDMACTRL_RCV | HPC3_PDMACTRL_LD | 
-		     (highwater << 8) | (fifobeg << 16) | (fifoend << 24);
+		     (highwater << 8) | (fifobeg << 16) | (fifoend << 24) |
+		     (hal2->adc.format & AFMT_S16_LE ? HPC3_PDMACTRL_SEL : 0);
 	pbus->pbus->pbdma_ctrl = HPC3_PDMACTRL_LD;
 	hal2_i_clearbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECR);
-	hal2_i_clearbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));
 	/* Setup the HAL2 for record */
 	hal2_set_adc_rate(hal2);
+	/* Set endianess */
+	if (hal2->adc.format & AFMT_S16_LE)
+		hal2_i_setbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECR);
+	else
+		hal2_i_clearbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECR);
+	/* Set DMA bus */
+	hal2_i_setbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));
 	/* We are using 2nd Bresenham clock generator for record */
 	hal2_i_write16(hal2, H2I_ADC_C1, (pbus->pbusnr << H2I_C1_DMA_SHIFT)
 			| (2 << H2I_C1_CLKID_SHIFT)
 			| (hal2->adc.voices << H2I_C1_DATAT_SHIFT));
 }
 
-static void hal2_start_dac(hal2_card_t *hal2)
+static dma_addr_t hal2_desc_addr(struct hal2_codec *codec, int i)
 {
-	hal2_pbus_t *pbus = &hal2->dac.pbus;
+	if (--i < 0)
+		i = codec->desc_count - 1;
+	return codec->desc[i].desc.pnext;
+}
 
-	DEBUG("hal2_start_dac\n");
-	
-	pbus->pbus->pbdma_dptr = PHYSADDR(hal2->dac.tail);
-	pbus->pbus->pbdma_ctrl = pbus->ctrl | HPC3_PDMACTRL_ACT;
+static void hal2_start_dac(struct hal2_card *hal2)
+{
+	struct hal2_codec *dac = &hal2->dac;
+	struct hal2_pbus *pbus = &dac->pbus;
 
-	/* set endianess */
-	if (hal2->dac.format & AFMT_S16_LE)
-		hal2_i_setbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECTX);
-	else
-		hal2_i_clearbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECTX);
-	/* set DMA bus */
-	hal2_i_setbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));
+	pbus->pbus->pbdma_dptr = hal2_desc_addr(dac, dac->tail);
+	pbus->pbus->pbdma_ctrl = pbus->ctrl | HPC3_PDMACTRL_ACT;
 	/* enable DAC */
 	hal2_i_setbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECTX);
 }
 
-static void hal2_start_adc(hal2_card_t *hal2)
+static void hal2_start_adc(struct hal2_card *hal2)
 {
-	hal2_pbus_t *pbus = &hal2->adc.pbus;
+	struct hal2_codec *adc = &hal2->adc;
+	struct hal2_pbus *pbus = &adc->pbus;
 
-	DEBUG("hal2_start_adc\n");
-	
-	pbus->pbus->pbdma_dptr = PHYSADDR(hal2->adc.head);
+	pbus->pbus->pbdma_dptr = hal2_desc_addr(adc, adc->head);
 	pbus->pbus->pbdma_ctrl = pbus->ctrl | HPC3_PDMACTRL_ACT;
-	
-	/* set endianess */
-	if (hal2->adc.format & AFMT_S16_LE)
-		hal2_i_setbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECR);
-	else
-		hal2_i_clearbit16(hal2, H2I_DMA_END, H2I_DMA_END_CODECR);
-	/* set DMA bus */
-	hal2_i_setbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));
 	/* enable ADC */
 	hal2_i_setbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECR);
 }
 
-static inline void hal2_stop_dac(hal2_card_t *hal2)
+static inline void hal2_stop_dac(struct hal2_card *hal2)
 {
-	DEBUG("hal2_stop_dac\n");
-	
 	hal2->dac.pbus.pbus->pbdma_ctrl = HPC3_PDMACTRL_LD;
 	/* The HAL2 itself may remain enabled safely */
 }
 
-static inline void hal2_stop_adc(hal2_card_t *hal2)
+static inline void hal2_stop_adc(struct hal2_card *hal2)
 {
-	DEBUG("hal2_stop_adc\n");
-	
 	hal2->adc.pbus.pbus->pbdma_ctrl = HPC3_PDMACTRL_LD;
 }
 
-#define hal2_alloc_dac_dmabuf(hal2)	hal2_alloc_dmabuf(hal2, 1)
-#define hal2_alloc_adc_dmabuf(hal2)	hal2_alloc_dmabuf(hal2, 0)
-static int hal2_alloc_dmabuf(hal2_card_t *hal2, int is_dac)
-{
-	int buffers, cntinfo;
-	hal2_buf_t *buf, *prev;
-	hal2_codec_t *codec;
-
-	if (is_dac) {
-		codec = &hal2->dac;
-		buffers = obuffers;
-		cntinfo = HPCDMA_XIE | HPCDMA_EOX;
-	} else {
-		codec = &hal2->adc;
-		buffers = ibuffers;
-		cntinfo = HPCDMA_XIE | H2_BUFFER_SIZE;
-	}
-	
-	DEBUG("allocating %d DMA buffers.\n", buffers);
-	
-	buf = (hal2_buf_t*) get_zeroed_page(GFP_KERNEL);
-	if (!buf)
+static int hal2_alloc_dmabuf(struct hal2_codec *codec, int size,
+			     int count, int cntinfo, int dir)
+{
+	struct hal2_desc *desc, *dma_addr;
+	int i;
+
+	DEBUG("allocating %dk DMA buffer.\n", size / 1024);
+
+	codec->buffer = (unsigned char *)__get_free_pages(GFP_KERNEL | GFP_DMA,
+							  get_order(size));
+	if (!codec->buffer)
 		return -ENOMEM;
-	codec->head = buf;
-	codec->tail = buf;
-	
-	while (--buffers) {
-		buf->info.desc.pbuf = PHYSADDR(&buf->data);
-		buf->info.desc.cntinfo = cntinfo;
-		buf->info.cnt = 0;
-		prev = buf;
-		buf = (hal2_buf_t*) get_zeroed_page(GFP_KERNEL);
-		if (!buf) {
-			printk("HAL2: Not enough memory for DMA buffer.\n");
-			buf = codec->head;
-			while (buf) {
-				prev = buf;
-				free_page((unsigned long) buf);
-				buf = prev->info.next;
-			}
-			return -ENOMEM;
-		}
-		prev->info.next = buf;
-		prev->info.desc.pnext = PHYSADDR(buf);
-		/* The PBUS can prolly not read this stuff when it's in
-		 * the cache so we have to flush it back to main memory
-		 */
-		dma_cache_wback_inv((unsigned long) prev, PAGE_SIZE);
-	}
-	buf->info.desc.pbuf = PHYSADDR(&buf->data);
-	buf->info.desc.cntinfo = cntinfo;
-	buf->info.cnt = 0;
-	buf->info.next = codec->head;
-	buf->info.desc.pnext = PHYSADDR(codec->head);
-	dma_cache_wback_inv((unsigned long) buf, PAGE_SIZE);
-	
+	desc = dma_alloc_coherent(NULL, count * sizeof(struct hal2_desc),
+				  (dma_addr_t *)&dma_addr, GFP_KERNEL);
+	if (!desc) {
+		free_pages((unsigned long)codec->buffer, get_order(size));
+		return -ENOMEM;
+	}
+	codec->desc = desc;
+	for (i = 0; i < count; i++) {
+		desc->desc.pbuf = dma_map_single(NULL,
+			(void *)(codec->buffer + i * H2_BLOCK_SIZE),
+			H2_BLOCK_SIZE, dir);
+		desc->desc.cntinfo = cntinfo;
+		desc->desc.pnext = (i == count - 1) ?
+				   (u32)dma_addr : (u32)(dma_addr + i + 1);
+		desc->cnt = 0;
+		desc++;
+	}
+	codec->desc_count = count;
+	codec->head = codec->tail = 0;
 	return 0;
 }
 
-#define hal2_free_dac_dmabuf(hal2)	hal2_free_dmabuf(hal2, 1)
-#define hal2_free_adc_dmabuf(hal2)	hal2_free_dmabuf(hal2, 0)
-static void hal2_free_dmabuf(hal2_card_t *hal2, int is_dac)
+static int hal2_alloc_dac_dmabuf(struct hal2_codec *codec)
 {
-	hal2_buf_t *buf, *next;
-	hal2_codec_t *codec = (is_dac) ? &hal2->dac : &hal2->adc;
+	return hal2_alloc_dmabuf(codec, H2_DAC_BUFSIZE,
+				 H2_DAC_BUFSIZE / H2_BLOCK_SIZE,
+				 HPCDMA_XIE | HPCDMA_EOX,
+				 DMA_TO_DEVICE);
+}
 
-	if (!codec->head)
-		return;
-	
-	buf = codec->head->info.next;
-	codec->head->info.next = NULL;
-	while (buf) {
-		next = buf->info.next;
-		free_page((unsigned long) buf);
-		buf = next;
-	}
-	codec->head = codec->tail = NULL;
+static int hal2_alloc_adc_dmabuf(struct hal2_codec *codec)
+{
+	return hal2_alloc_dmabuf(codec, H2_ADC_BUFSIZE,
+				 H2_ADC_BUFSIZE / H2_BLOCK_SIZE,
+				 HPCDMA_XIE | H2_BLOCK_SIZE,
+				 DMA_TO_DEVICE);
+}
+
+static void hal2_free_dmabuf(struct hal2_codec *codec, int size, int dir)
+{
+	dma_addr_t dma_addr;
+	int i;
+
+	dma_addr = codec->desc[codec->desc_count - 1].desc.pnext;
+	for (i = 0; i < codec->desc_count; i++)
+		dma_unmap_single(NULL, codec->desc[i].desc.pbuf,
+				 H2_BLOCK_SIZE, dir);
+	dma_free_coherent(NULL, codec->desc_count * sizeof(struct hal2_desc),
+			  (void *)codec->desc, dma_addr);
+	free_pages((unsigned long)codec->buffer, get_order(size));
+}
+
+static void hal2_free_dac_dmabuf(struct hal2_codec *codec)
+{
+	return hal2_free_dmabuf(codec, H2_DAC_BUFSIZE, DMA_TO_DEVICE);
+}
+
+static void hal2_free_adc_dmabuf(struct hal2_codec *codec)
+{
+	return hal2_free_dmabuf(codec, H2_ADC_BUFSIZE, DMA_FROM_DEVICE);
 }
 
 /* 
  * Add 'count' bytes to 'buffer' from DMA ring buffers. Return number of
  * bytes added or -EFAULT if copy_from_user failed.
  */
-static int hal2_get_buffer(hal2_card_t *hal2, char *buffer, int count)
+static int hal2_get_buffer(struct hal2_card *hal2, char *buffer, int count)
 {
 	unsigned long flags;
 	int size, ret = 0;
-	hal2_codec_t *adc = &hal2->adc;
-	
-	spin_lock_irqsave(&adc->lock, flags);
-	
+	unsigned char *buf;
+	struct hal2_desc *tail;
+	struct hal2_codec *adc = &hal2->adc;
+
 	DEBUG("getting %d bytes ", count);
 
+	spin_lock_irqsave(&adc->lock, flags);
+	tail = &adc->desc[adc->tail];
 	/* enable DMA stream if there are no data */
-	if (!(adc->pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_ISACT) &&
-	    adc->tail->info.cnt == 0)
+	if (!tail->cnt && !(adc->pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_ISACT))
 		hal2_start_adc(hal2);
-
-	DEBUG("... ");
-
-	while (adc->tail->info.cnt > 0 && count > 0) {
-		size = min(adc->tail->info.cnt, count);
+	while (tail->cnt > 0 && count > 0) {
+		size = min((int)tail->cnt, count);
+		buf = &adc->buffer[(adc->tail + 1) * H2_BLOCK_SIZE - tail->cnt];
 		spin_unlock_irqrestore(&adc->lock, flags);
-
-		if (copy_to_user(buffer, &adc->tail->data[H2_BUFFER_SIZE-size],
-				 size)) {
+		dma_sync_single(NULL, tail->desc.pbuf, size, DMA_FROM_DEVICE);
+		if (copy_to_user(buffer, buf, size)) {
 			ret = -EFAULT;
 			goto out;
 		}
-
 		spin_lock_irqsave(&adc->lock, flags);
-		
-		adc->tail->info.cnt -= size;
+		tail->cnt -= size;
 		/* buffer is empty, update tail pointer */
-		if (adc->tail->info.cnt == 0) {
-			adc->tail->info.desc.cntinfo = HPCDMA_XIE |
-						       H2_BUFFER_SIZE;
-			dma_cache_wback_inv((unsigned long) adc->tail,
-					    sizeof(struct hpc_dma_desc));
-			adc->tail = adc->tail->info.next;
+		if (tail->cnt == 0) {
+			tail->desc.cntinfo = HPCDMA_XIE | H2_BLOCK_SIZE;
+			hal2_inc_tail(adc);
+			tail = &adc->desc[adc->tail];
 			/* enable DMA stream again if needed */
 			if (!(adc->pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_ISACT))
 				hal2_start_adc(hal2);
-
 		}
 		buffer += size;
 		ret += size;
@@ -620,9 +665,9 @@
 		DEBUG("(%d) ", size);
 	}
 	spin_unlock_irqrestore(&adc->lock, flags);
-out:	
+out:
 	DEBUG("\n");
-	
+
 	return ret;
 } 
 
@@ -630,86 +675,81 @@
  * Add 'count' bytes from 'buffer' to DMA ring buffers. Return number of
  * bytes added or -EFAULT if copy_from_user failed.
  */
-static int hal2_add_buffer(hal2_card_t *hal2, char *buffer, int count)
+static int hal2_add_buffer(struct hal2_card *hal2, char *buffer, int count)
 {
 	unsigned long flags;
+	unsigned char *buf;
 	int size, ret = 0;
-	hal2_codec_t *dac = &hal2->dac;
-	
-	spin_lock_irqsave(&dac->lock, flags);
-	
+	struct hal2_desc *head;
+	struct hal2_codec *dac = &hal2->dac;
+
 	DEBUG("adding %d bytes ", count);
 
-	while (dac->head->info.cnt == 0 && count > 0) {
-		size = min((int)H2_BUFFER_SIZE, count);
+	spin_lock_irqsave(&dac->lock, flags);
+	head = &dac->desc[dac->head];
+	while (head->cnt == 0 && count > 0) {
+		size = min((int)H2_BLOCK_SIZE, count);
+		buf = &dac->buffer[dac->head * H2_BLOCK_SIZE];
 		spin_unlock_irqrestore(&dac->lock, flags);
-		
-		if (copy_from_user(dac->head->data, buffer, size)) {
+		if (copy_from_user(buf, buffer, size)) {
 			ret = -EFAULT;
 			goto out;
 		}
+		dma_sync_single(NULL, head->desc.pbuf, size, DMA_TO_DEVICE);
 		spin_lock_irqsave(&dac->lock, flags);
-
-		dac->head->info.desc.cntinfo = size | HPCDMA_XIE;
-		dac->head->info.cnt = size;
-		dma_cache_wback_inv((unsigned long) dac->head, 
-				    size + PAGE_SIZE - H2_BUFFER_SIZE);
+		head->desc.cntinfo = size | HPCDMA_XIE;
+		head->cnt = size;
 		buffer += size;
 		ret += size;
 		count -= size;
-		dac->head = dac->head->info.next;
+		hal2_inc_head(dac);
+		head = &dac->desc[dac->head];
 
 		DEBUG("(%d) ", size);
 	}
 	if (!(dac->pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_ISACT) && ret > 0)
 		hal2_start_dac(hal2);
-	
 	spin_unlock_irqrestore(&dac->lock, flags);
-out:	
+out:
 	DEBUG("\n");
-	
+
 	return ret;
 }
 
 #define hal2_reset_dac_pointer(hal2)	hal2_reset_pointer(hal2, 1)
 #define hal2_reset_adc_pointer(hal2)	hal2_reset_pointer(hal2, 0)
-static void hal2_reset_pointer(hal2_card_t *hal2, int is_dac)
+static void hal2_reset_pointer(struct hal2_card *hal2, int is_dac)
 {
-	hal2_codec_t *codec = (is_dac) ? &hal2->dac : &hal2->adc;
-	
+	int i;
+	struct hal2_codec *codec = (is_dac) ? &hal2->dac : &hal2->adc;
+
 	DEBUG("hal2_reset_pointer\n");
 
-	codec->tail = codec->head;
-	do {
-		codec->tail->info.desc.cntinfo = HPCDMA_XIE | (is_dac) ? 
-						 HPCDMA_EOX : H2_BUFFER_SIZE;
-		codec->tail->info.cnt = 0;
-		dma_cache_wback_inv((unsigned long) codec->tail, 
-				    sizeof(struct hpc_dma_desc));
-		codec->tail = codec->tail->info.next;
-	} while (codec->tail != codec->head);
+	for (i = 0; i < codec->desc_count; i++) {
+		codec->desc[i].cnt = 0;
+		codec->desc[i].desc.cntinfo = HPCDMA_XIE | (is_dac) ?
+					      HPCDMA_EOX : H2_BLOCK_SIZE;
+	}
+	codec->head = codec->tail = 0;
 }
 
-static int hal2_sync_dac(hal2_card_t *hal2)
+static int hal2_sync_dac(struct hal2_card *hal2)
 {
 	DECLARE_WAITQUEUE(wait, current);
-	hal2_codec_t *dac = &hal2->dac;
+	struct hal2_codec *dac = &hal2->dac;
 	int ret = 0;
-	signed long timeout = 1000 * H2_BUFFER_SIZE * 2 * dac->voices *
+	unsigned long flags;
+	signed long timeout = 1000 * H2_BLOCK_SIZE * 2 * dac->voices *
 			      HZ / dac->sample_rate / 900;
 
-	down(&dac->sem);
-	
 	while (dac->pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_ISACT) {
 		add_wait_queue(&dac->dma_wait, &wait);
 		set_current_state(TASK_INTERRUPTIBLE);
-		if (!schedule_timeout(timeout))
-			/* We may get bogus timeout when system is 
-			 * heavily loaded */
-			if (dac->tail->info.cnt) {
-				printk("HAL2: timeout...\n");
-				ret = -ETIME;
-			}
+		schedule_timeout(timeout);
+		spin_lock_irqsave(&dac->lock, flags);
+		if (dac->desc[dac->tail].cnt)
+			ret = -ETIME;
+		spin_unlock_irqrestore(&dac->lock, flags);
 		if (signal_pending(current))
 			ret = -ERESTARTSYS;
 		if (ret) {
@@ -719,17 +759,15 @@
 		remove_wait_queue(&dac->dma_wait, &wait);
 	}
 
-	up(&dac->sem);
-	
 	return ret;
 }
 
-static int hal2_write_mixer(hal2_card_t *hal2, int index, int vol)
+static int hal2_write_mixer(struct hal2_card *hal2, int index, int vol)
 {
-	unsigned int l, r;
+	unsigned int l, r, tmp;
 
 	DEBUG_MIX("mixer %d write\n", index);
-	
+
 	if (index >= SOUND_MIXER_NRDEVICES || !mixtable[index].avail)
 		return -EINVAL;
 
@@ -739,23 +777,22 @@
 	l = vol & 0xff;
 	if (l > 100)
 		l = 100;
-	
+
 	hal2->mixer.volume[mixtable[index].idx] = l | (r << 8);
 
 	switch (mixtable[index].idx) {
-	case H2_MIX_OUTPUT_ATT: {
+	case H2_MIX_OUTPUT_ATT:
 
 		DEBUG_MIX("output attenuator %d,%d\n", l, r);
 
 		if (r | l) {
-			unsigned int tmp = hal2_i_look32(hal2, H2I_DAC_C2); 
-		
+			tmp = hal2_i_look32(hal2, H2I_DAC_C2);
 			tmp &= ~(H2I_C2_L_ATT_M | H2I_C2_R_ATT_M | H2I_C2_MUTE);
 
 			/* Attenuator has five bits */
-			l = (31 * (100 - l) / 99);
-			r = (31 * (100 - r) / 99);
-			
+			l = 31 * (100 - l) / 99;
+			r = 31 * (100 - r) / 99;
+
 			DEBUG_MIX("left: %d, right %d\n", l, r);
 
 			tmp |= (l << H2I_C2_L_ATT_SHIFT) & H2I_C2_L_ATT_M;
@@ -763,30 +800,80 @@
 			hal2_i_write32(hal2, H2I_DAC_C2, tmp);
 		} else 
 			hal2_i_setbit32(hal2, H2I_DAC_C2, H2I_C2_MUTE);
+		break;
+	case H2_MIX_INPUT_GAIN:
+
+		DEBUG_MIX("input gain %d,%d\n", l, r);
+
+		tmp = hal2_i_look32(hal2, H2I_ADC_C2);
+		tmp &= ~(H2I_C2_L_GAIN_M | H2I_C2_R_GAIN_M);
+
+		/* Gain control has four bits */
+		l = 16 * l / 100;
+		r = 16 * r / 100;
+
+		DEBUG_MIX("left: %d, right %d\n", l, r);
+
+		tmp |= (l << H2I_C2_L_GAIN_SHIFT) & H2I_C2_L_GAIN_M;
+		tmp |= (r << H2I_C2_R_GAIN_SHIFT) & H2I_C2_R_GAIN_M;
+		hal2_i_write32(hal2, H2I_ADC_C2, tmp);
+
+		break;
 	}
-	case H2_MIX_INPUT_GAIN: {
-		/* TODO */
-	}
-	}
+
 	return 0;
 }
 
-static void hal2_init_mixer(hal2_card_t *hal2)
+static void hal2_init_mixer(struct hal2_card *hal2)
 {
 	int i;
 
 	for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
-		hal2_write_mixer(hal2, i, 100 | (100 << 8));
-		
+		if (mixtable[i].avail)
+			hal2->mixer.volume[mixtable[i].idx] = 100 | (100 << 8);
+
+	/* disable attenuator */
+	hal2_i_write32(hal2, H2I_DAC_C2, 0);
+	/* set max input gain */
+	hal2_i_write32(hal2, H2I_ADC_C2, H2I_C2_MUTE |
+			(H2I_C2_L_GAIN_M << H2I_C2_L_GAIN_SHIFT) |
+			(H2I_C2_R_GAIN_M << H2I_C2_R_GAIN_SHIFT));
+	/* set max volume */
+	hal2->mixer.master = 0xff;
+	hal2->vol_regs->left = 0xff;
+	hal2->vol_regs->right = 0xff;
 }
 
-static int hal2_mixer_ioctl(hal2_card_t *hal2, unsigned int cmd, 
+/*
+ * XXX: later i'll implement mixer for main volume which will be disabled
+ * by default. enabling it users will be allowed to have master volume level
+ * control on panel in their favourite X desktop
+ */
+static void hal2_volume_control(int direction)
+{
+	unsigned int master = hal2_card[0]->mixer.master;
+	struct hal2_vol_regs *vol = hal2_card[0]->vol_regs;
+
+	/* volume up */
+	if (direction > 0 && master < 0xff)
+		master++;
+	/* volume down */
+	else if (direction < 0 && master > 0)
+		master--;
+	/* TODO: mute/unmute */
+	vol->left = master;
+	vol->right = master;
+	hal2_card[0]->mixer.master = master;
+}
+
+static int hal2_mixer_ioctl(struct hal2_card *hal2, unsigned int cmd,
 			    unsigned long arg)
 {
 	int val;
 
         if (cmd == SOUND_MIXER_INFO) {
 		mixer_info info;
+
 		memset(&info, 0, sizeof(info));
 		strlcpy(info.id, hal2str, sizeof(info.id));
 		strlcpy(info.name, hal2str, sizeof(info.name));
@@ -797,6 +884,7 @@
 	}
 	if (cmd == SOUND_OLD_MIXER_INFO) {
 		_old_mixer_info info;
+
 		memset(&info, 0, sizeof(info));
 		strlcpy(info.id, hal2str, sizeof(info.id));
 		strlcpy(info.name, hal2str, sizeof(info.name));
@@ -820,7 +908,7 @@
                 case SOUND_MIXER_DEVMASK:
                 case SOUND_MIXER_STEREODEVS: {
 			int i;
-			
+
 			for (val = i = 0; i < SOUND_MIXER_NRDEVICES; i++)
 				if (mixtable[i].avail)
 					val |= 1 << i;
@@ -836,7 +924,7 @@
 		/* Read a specific mixer */
 		default: {
 			int i = _IOC_NR(cmd);
-			
+
 			if (i >= SOUND_MIXER_NRDEVICES || !mixtable[i].avail)
 				return -EINVAL;
 			val = hal2->mixer.volume[mixtable[i].idx];
@@ -845,10 +933,10 @@
 		}
 		return put_user(val, (int *)arg);
 	}
-	
+
         if (_IOC_DIR(cmd) != (_IOC_WRITE|_IOC_READ))
 		return -EINVAL;
-	
+
 	hal2->mixer.modcnt++;
 
 	if (get_user(val, (int *)arg))
@@ -867,7 +955,7 @@
 
 static int hal2_open_mixdev(struct inode *inode, struct file *file)
 {
-	hal2_card_t *hal2 = hal2_mixer_find_card(iminor(inode));
+	struct hal2_card *hal2 = hal2_mixer_find_card(iminor(inode));
 
 	if (hal2) {
 		file->private_data = hal2;
@@ -884,31 +972,30 @@
 static int hal2_ioctl_mixdev(struct inode *inode, struct file *file,
 			     unsigned int cmd, unsigned long arg)
 {
-	return hal2_mixer_ioctl((hal2_card_t *)file->private_data, cmd, arg);
+	return hal2_mixer_ioctl((struct hal2_card *)file->private_data, cmd, arg);
 }
 
-
 static int hal2_ioctl(struct inode *inode, struct file *file, 
 		      unsigned int cmd, unsigned long arg)
 {
 	int val;
-	hal2_card_t *hal2 = (hal2_card_t *) file->private_data;
+	struct hal2_card *hal2 = (struct hal2_card *) file->private_data;
 
 	switch (cmd) {
 	case OSS_GETVERSION:
 		return put_user(SOUND_VERSION, (int *)arg);
-		
+
 	case SNDCTL_DSP_SYNC:
 		if (file->f_mode & FMODE_WRITE)
 			return hal2_sync_dac(hal2);
 		return 0;
-		
+
 	case SNDCTL_DSP_SETDUPLEX:
 		return 0;
 
 	case SNDCTL_DSP_GETCAPS:
 		return put_user(DSP_CAP_DUPLEX | DSP_CAP_MULTI, (int *)arg);
-		
+
 	case SNDCTL_DSP_RESET:
 		if (file->f_mode & FMODE_READ) {
 			hal2_stop_adc(hal2);
@@ -936,7 +1023,7 @@
 			hal2_set_dac_rate(hal2);
 		}
 		return put_user(val, (int *)arg);
-		
+
 	case SNDCTL_DSP_STEREO:
 		if (get_user(val, (int *)arg))
 			return -EFAULT;
@@ -973,10 +1060,10 @@
 		if (file->f_mode & FMODE_WRITE)
 			val = hal2->dac.voices;
 		return put_user(val, (int *)arg);
-		
+
 	case SNDCTL_DSP_GETFMTS: /* Returns a mask */
                 return put_user(H2_SUPPORTED_FORMATS, (int *)arg);
-		
+
 	case SNDCTL_DSP_SETFMT: /* Selects ONE fmt*/
 		if (get_user(val, (int *)arg))
 			return -EFAULT;
@@ -1001,68 +1088,61 @@
 				val = hal2->dac.format;
 		}
 		return put_user(val, (int *)arg);
-		
+
 	case SNDCTL_DSP_POST:
 		return 0;
 
 	case SNDCTL_DSP_GETOSPACE: {
-		unsigned long flags;
 		audio_buf_info info;
-		hal2_buf_t *buf;
-		hal2_codec_t *dac = &hal2->dac;
-		
+		int i;
+		unsigned long flags;
+		struct hal2_codec *dac = &hal2->dac;
+
 		if (!(file->f_mode & FMODE_WRITE))
 			return -EINVAL;
-		
-		spin_lock_irqsave(&dac->lock, flags);
 		info.fragments = 0;
-		buf = dac->head;
-		while (buf->info.cnt == 0 && buf != dac->tail) {
-			info.fragments++;
-			buf = buf->info.next;
-		}
+		spin_lock_irqsave(&dac->lock, flags);
+		for (i = 0; i < dac->desc_count; i++)
+			if (dac->desc[i].cnt == 0)
+				info.fragments++;
 		spin_unlock_irqrestore(&dac->lock, flags);
-		
-		info.fragstotal = obuffers;
-		info.fragsize = H2_BUFFER_SIZE;
+		info.fragstotal = dac->desc_count;
+		info.fragsize = H2_BLOCK_SIZE;
                 info.bytes = info.fragsize * info.fragments;
 
 		return copy_to_user((void *)arg, &info, sizeof(info)) ? -EFAULT : 0;
 	}
-			   
+
 	case SNDCTL_DSP_GETISPACE: {
-		unsigned long flags;
 		audio_buf_info info;
-		hal2_buf_t *buf;
-		hal2_codec_t *adc = &hal2->adc;
-			
+		int i;
+		unsigned long flags;
+		struct hal2_codec *adc = &hal2->adc;
+
 		if (!(file->f_mode & FMODE_READ))
 			return -EINVAL;
-		
-		spin_lock_irqsave(&adc->lock, flags);
 		info.fragments = 0;
 		info.bytes = 0;
-		buf = adc->tail;
-		while (buf->info.cnt > 0 && buf != adc->head) {
-			info.fragments++;
-			info.bytes += buf->info.cnt;
-			buf = buf->info.next;
-		}
+		spin_lock_irqsave(&adc->lock, flags);
+		for (i = 0; i < adc->desc_count; i++)
+			if (adc->desc[i].cnt > 0) {
+				info.fragments++;
+				info.bytes += adc->desc[i].cnt;
+			}
 		spin_unlock_irqrestore(&adc->lock, flags);
+		info.fragstotal = adc->desc_count;
+		info.fragsize = H2_BLOCK_SIZE;
 
-		info.fragstotal = ibuffers;
-		info.fragsize = H2_BUFFER_SIZE;
-		
 		return copy_to_user((void *)arg, &info, sizeof(info)) ? -EFAULT : 0;
 	}
 
 	case SNDCTL_DSP_NONBLOCK:
 		file->f_flags |= O_NONBLOCK;
 		return 0;
-		
+
 	case SNDCTL_DSP_GETBLKSIZE:
-		return put_user(H2_BUFFER_SIZE, (int *)arg);
-	
+		return put_user(H2_BLOCK_SIZE, (int *)arg);
+
 	case SNDCTL_DSP_SETFRAGMENT:
 		return 0;
 
@@ -1083,10 +1163,9 @@
 		return put_user(val, (int *)arg);
 
 	case SOUND_PCM_READ_BITS:
-		val = 16;
-		return put_user(val, (int *)arg);
+		return put_user(16, (int *)arg);
 	}
-	
+
 	return hal2_mixer_ioctl(hal2, cmd, arg);
 }
 
@@ -1094,27 +1173,27 @@
 			 size_t count, loff_t *ppos)
 {
 	ssize_t err;
-	hal2_card_t *hal2 = (hal2_card_t *) file->private_data;
-	hal2_codec_t *adc = &hal2->adc;
+	struct hal2_card *hal2 = (struct hal2_card *) file->private_data;
+	struct hal2_codec *adc = &hal2->adc;
 
-	if (count == 0)
+	if (!count)
 		return 0;
 	if (ppos != &file->f_pos)
 		return -ESPIPE;
-	
-	down(&adc->sem);
-	
+	if (down_interruptible(&adc->sem))
+		return -EINTR;
 	if (file->f_flags & O_NONBLOCK) {
 		err = hal2_get_buffer(hal2, buffer, count);
 		err = err == 0 ? -EAGAIN : err;
 	} else {
 		do {
 			/* ~10% longer */
-			signed long timeout = 1000 * H2_BUFFER_SIZE *
+			signed long timeout = 1000 * H2_BLOCK_SIZE *
 				2 * adc->voices * HZ / adc->sample_rate / 900;
+			unsigned long flags;
 			DECLARE_WAITQUEUE(wait, current);
 			ssize_t cnt = 0;
-			
+
 			err = hal2_get_buffer(hal2, buffer, count);
 			if (err > 0) {
 				count -= err;
@@ -1125,28 +1204,23 @@
 			if (count > 0 && err >= 0) {
 				add_wait_queue(&adc->dma_wait, &wait);
 				set_current_state(TASK_INTERRUPTIBLE);
-				/* Well, it is possible, that interrupt already
-				 * arrived. Hmm, shit happens, we have one more
-				 * buffer filled ;) */
-				if (!schedule_timeout(timeout))
-					/* We may get bogus timeout when system
-					 * is heavily loaded */
-					if (!adc->tail->info.cnt) {
-						printk("HAL2: timeout...\n");
-						hal2_stop_adc(hal2);
-						hal2_reset_adc_pointer(hal2);
-						err = -EAGAIN;
-					}
+				schedule_timeout(timeout);
+				spin_lock_irqsave(&adc->lock, flags);
+				if (!adc->desc[adc->tail].cnt)
+					err = -EAGAIN;
+				spin_unlock_irqrestore(&adc->lock, flags);
 				if (signal_pending(current))
 					err = -ERESTARTSYS;
 				remove_wait_queue(&adc->dma_wait, &wait);
+				if (err < 0) {
+					hal2_stop_adc(hal2);
+					hal2_reset_adc_pointer(hal2);
+				}
 			}
 		} while (count > 0 && err >= 0);
-	
 	}
-	
 	up(&adc->sem);
-	
+
 	return err;
 }
 
@@ -1155,27 +1229,27 @@
 {
 	ssize_t err;
 	char *buf = (char*) buffer;
-	hal2_card_t *hal2 = (hal2_card_t *) file->private_data;
-	hal2_codec_t *dac = &hal2->dac;
+	struct hal2_card *hal2 = (struct hal2_card *) file->private_data;
+	struct hal2_codec *dac = &hal2->dac;
 
-	if (count == 0)
+	if (!count)
 		return 0;
 	if (ppos != &file->f_pos)
 		return -ESPIPE;
-
-	down(&dac->sem);
-
+	if (down_interruptible(&dac->sem))
+		return -EINTR;
 	if (file->f_flags & O_NONBLOCK) {
 		err = hal2_add_buffer(hal2, buf, count);
 		err = err == 0 ? -EAGAIN : err;
 	} else {
 		do {
 			/* ~10% longer */
-			signed long timeout = 1000 * H2_BUFFER_SIZE *
+			signed long timeout = 1000 * H2_BLOCK_SIZE *
 				2 * dac->voices * HZ / dac->sample_rate / 900;
+			unsigned long flags;
 			DECLARE_WAITQUEUE(wait, current);
 			ssize_t cnt = 0;
-			
+
 			err = hal2_add_buffer(hal2, buf, count);
 			if (err > 0) {
 				count -= err;
@@ -1186,25 +1260,21 @@
 			if (count > 0 && err >= 0) {
 				add_wait_queue(&dac->dma_wait, &wait);
 				set_current_state(TASK_INTERRUPTIBLE);
-				/* Well, it is possible, that interrupt already
-				 * arrived. Hmm, shit happens, we have one more
-				 * buffer free ;) */
-				if (!schedule_timeout(timeout))
-					/* We may get bogus timeout when system
-					 * is heavily loaded */
-					if (dac->head->info.cnt) {
-						printk("HAL2: timeout...\n");
-						hal2_stop_dac(hal2);
-						hal2_reset_dac_pointer(hal2);
-						err = -EAGAIN;
-					}
+				schedule_timeout(timeout);
+				spin_lock_irqsave(&dac->lock, flags);
+				if (dac->desc[dac->head].cnt)
+					err = -EAGAIN;
+				spin_unlock_irqrestore(&dac->lock, flags);
 				if (signal_pending(current))
 					err = -ERESTARTSYS;
 				remove_wait_queue(&dac->dma_wait, &wait);
+				if (err < 0) {
+					hal2_stop_dac(hal2);
+					hal2_reset_dac_pointer(hal2);
+				}
 			}
 		} while (count > 0 && err >= 0);
 	}
-	
 	up(&dac->sem);
 
 	return err;
@@ -1214,99 +1284,96 @@
 {
 	unsigned long flags;
 	unsigned int mask = 0;
-	hal2_card_t *hal2 = (hal2_card_t *) file->private_data;
+	struct hal2_card *hal2 = (struct hal2_card *) file->private_data;
 
 	if (file->f_mode & FMODE_READ) {
-		hal2_codec_t *adc = &hal2->adc;
-		
-		poll_wait(file, &hal2->adc.dma_wait, wait);
+		struct hal2_codec *adc = &hal2->adc;
+
+		poll_wait(file, &adc->dma_wait, wait);
 		spin_lock_irqsave(&adc->lock, flags);
-		if (adc->tail->info.cnt > 0)
+		if (adc->desc[adc->tail].cnt > 0)
 			mask |= POLLIN;
 		spin_unlock_irqrestore(&adc->lock, flags);
 	}
-	
+
 	if (file->f_mode & FMODE_WRITE) {
-		hal2_codec_t *dac = &hal2->dac;
-		
+		struct hal2_codec *dac = &hal2->dac;
+
 		poll_wait(file, &dac->dma_wait, wait);
 		spin_lock_irqsave(&dac->lock, flags);
-		if (dac->head->info.cnt == 0)
+		if (dac->desc[dac->head].cnt == 0)
 			mask |= POLLOUT;
 		spin_unlock_irqrestore(&dac->lock, flags);
 	}
-	
+
 	return mask;
 }
 
 static int hal2_open(struct inode *inode, struct file *file)
 {
 	int err;
-	hal2_card_t *hal2 = hal2_dsp_find_card(iminor(inode));
-
-	DEBUG("opening audio device.\n");
+	struct hal2_card *hal2 = hal2_dsp_find_card(iminor(inode));
 
-	if (!hal2) {
-		printk("HAL2: Whee?! Open door and go away!\n");
+	if (!hal2)
 		return -ENODEV;
-	}
 	file->private_data = hal2;
-
 	if (file->f_mode & FMODE_READ) {
-		if (hal2->adc.usecount)
+		struct hal2_codec *adc = &hal2->adc;
+
+		if (adc->usecount)
 			return -EBUSY;
-		
 		/* OSS spec wanted us to use 8 bit, 8 kHz mono by default,
 		 * but HAL2 can't do 8bit audio */
-		hal2->adc.format = AFMT_S16_BE;
-		hal2->adc.voices = 1;
-		hal2->adc.sample_rate = hal2_compute_rate(&hal2->adc, 8000);
+		adc->format = AFMT_S16_BE;
+		adc->voices = 1;
+		adc->sample_rate = hal2_compute_rate(adc, 8000);
 		hal2_set_adc_rate(hal2);
-
-		/* alloc DMA buffers */
-		err = hal2_alloc_adc_dmabuf(hal2);
+		err = hal2_alloc_adc_dmabuf(adc);
 		if (err)
 			return err;
 		hal2_setup_adc(hal2);
-
-		hal2->adc.usecount++;
+		adc->usecount++;
 	}
-
 	if (file->f_mode & FMODE_WRITE) {
-		if (hal2->dac.usecount)
-			return -EBUSY;
+		struct hal2_codec *dac = &hal2->dac;
 
-		hal2->dac.format = AFMT_S16_BE;
-		hal2->dac.voices = 1;
-		hal2->dac.sample_rate = hal2_compute_rate(&hal2->dac, 8000);
+		if (dac->usecount)
+			return -EBUSY;
+		dac->format = AFMT_S16_BE;
+		dac->voices = 1;
+		dac->sample_rate = hal2_compute_rate(dac, 8000);
 		hal2_set_dac_rate(hal2);
-
-		/* alloc DMA buffers */
-		err = hal2_alloc_dac_dmabuf(hal2);
+		err = hal2_alloc_dac_dmabuf(dac);
 		if (err)
 			return err;
 		hal2_setup_dac(hal2);
-		
-		hal2->dac.usecount++;
+		dac->usecount++;
 	}
-	
+
 	return 0;
 }
 
 static int hal2_release(struct inode *inode, struct file *file)
 {
-	hal2_card_t *hal2 = (hal2_card_t *) file->private_data;
+	struct hal2_card *hal2 = (struct hal2_card *) file->private_data;
 
 	if (file->f_mode & FMODE_READ) {
+		struct hal2_codec *adc = &hal2->adc;
+
+		down(&adc->sem);
 		hal2_stop_adc(hal2);
-		hal2_free_adc_dmabuf(hal2);
-		hal2->adc.usecount--;
+		hal2_free_adc_dmabuf(adc);
+		adc->usecount--;
+		up(&adc->sem);
 	}
-
 	if (file->f_mode & FMODE_WRITE) {
+		struct hal2_codec *dac = &hal2->dac;
+
+		down(&dac->sem);
 		hal2_sync_dac(hal2);
-		hal2_free_dac_dmabuf(hal2);
-		hal2->dac.usecount--;
+		hal2_free_dac_dmabuf(dac);
+		dac->usecount--;
+		up(&dac->sem);
 	}
 
 	return 0;
@@ -1331,159 +1398,155 @@
 	.release	= hal2_release_mixdev,
 };
 
-static int hal2_request_irq(hal2_card_t *hal2, int irq)
-{
-	unsigned long flags;
-	int ret = 0;
-
-	save_and_cli(flags);
-	if (request_irq(irq, hal2_interrupt, SA_SHIRQ, hal2str, hal2)) {
-		printk(KERN_ERR "HAL2: Can't get irq %d\n", irq);
-		ret = -EAGAIN;
-	}
-	restore_flags(flags);
-	return ret;
-}
-
-static int hal2_alloc_resources(hal2_card_t *hal2, struct hpc3_regs *hpc3)
-{
-	hal2_pbus_t *pbus;
-
-	pbus = &hal2->dac.pbus;
-	pbus->pbusnr = 0;
-	pbus->pbus = &hpc3->pbdma[pbus->pbusnr];
-	/* The spec says that we should write 0x08248844 but that's WRONG. HAL2
-	 * does 8 bit DMA, not 16 bit even if it generates 16 bit audio. */
-	hpc3->pbus_dmacfgs[pbus->pbusnr][0] = 0x08208844;	/* Magic :-) */
-
-	pbus = &hal2->adc.pbus;
-	pbus->pbusnr = 1;
-	pbus->pbus = &hpc3->pbdma[pbus->pbusnr];
-	hpc3->pbus_dmacfgs[pbus->pbusnr][0] = 0x08208844;	/* Magic :-) */
-
-	return hal2_request_irq(hal2, SGI_HPCDMA_IRQ);
-}
-
-static void hal2_init_codec(hal2_codec_t *codec)
+static void hal2_init_codec(struct hal2_codec *codec, struct hpc3_regs *hpc3,
+			    int index)
 {
+	codec->pbus.pbusnr = index;
+	codec->pbus.pbus = &hpc3->pbdma[index];
 	init_waitqueue_head(&codec->dma_wait);
 	init_MUTEX(&codec->sem);
 	spin_lock_init(&codec->lock);
 }
 
-static void hal2_free_resources(hal2_card_t *hal2)
-{
-	free_irq(SGI_HPCDMA_IRQ, hal2);
-}
-
-static int hal2_detect(hal2_card_t *hal2)
+static int hal2_detect(struct hal2_card *hal2)
 {
 	unsigned short board, major, minor;
 	unsigned short rev;
 
 	/* reset HAL2 */
 	hal2_isr_write(hal2, 0);
-
 	/* release reset */
 	hal2_isr_write(hal2, H2_ISR_GLOBAL_RESET_N | H2_ISR_CODEC_RESET_N);
 
 	hal2_i_write16(hal2, H2I_RELAY_C, H2I_RELAY_C_STATE); 
-
-	if ((rev = hal2_rev_look(hal2)) & H2_REV_AUDIO_PRESENT) {
-		DEBUG("HAL2: no device detected, rev: 0x%04hx\n", rev);
+	if ((rev = hal2_rev_look(hal2)) & H2_REV_AUDIO_PRESENT)
 		return -ENODEV;
-	}
 
 	board = (rev & H2_REV_BOARD_M) >> 12;
 	major = (rev & H2_REV_MAJOR_CHIP_M) >> 4;
 	minor = (rev & H2_REV_MINOR_CHIP_M);
 
-	printk("SGI HAL2 Processor revision %i.%i.%i detected\n",
+	printk(KERN_INFO "SGI HAL2 revision %i.%i.%i\n",
 	       board, major, minor);
 
-	if (board != 4 || major != 1 || minor != 0) 
-		printk( "Other revision than 4.1.0 detected. "
-			"Your card is probably unsupported\n");
-
 	return 0;
 }
 
-static int hal2_init_card(hal2_card_t **phal2, struct hpc3_regs *hpc3,
-			  unsigned long hpc3_base)
+static int hal2_init_card(struct hal2_card **phal2, struct hpc3_regs *hpc3)
 {
 	int ret = 0;
-	hal2_card_t *hal2;
-	
-	hal2 = (hal2_card_t *) kmalloc(sizeof(hal2_card_t), GFP_KERNEL);
+	struct hal2_card *hal2;
+
+	hal2 = (struct hal2_card *) kmalloc(sizeof(struct hal2_card), GFP_KERNEL);
 	if (!hal2)
 		return -ENOMEM;
-	memset(hal2, 0, sizeof(hal2_card_t));
+	memset(hal2, 0, sizeof(struct hal2_card));
 
-	hal2->ctl_regs = (hal2_ctl_regs_t *) KSEG1ADDR(hpc3_base + H2_CTL_PIO);
-	hal2->aes_regs = (hal2_aes_regs_t *) KSEG1ADDR(hpc3_base + H2_AES_PIO);
-	hal2->vol_regs = (hal2_vol_regs_t *) KSEG1ADDR(hpc3_base + H2_VOL_PIO);
-	hal2->syn_regs = (hal2_syn_regs_t *) KSEG1ADDR(hpc3_base + H2_SYN_PIO);
+	hal2->ctl_regs = (struct hal2_ctl_regs *)hpc3->pbus_extregs[0];
+	hal2->aes_regs = (struct hal2_aes_regs *)hpc3->pbus_extregs[1];
+	hal2->vol_regs = (struct hal2_vol_regs *)hpc3->pbus_extregs[2];
+	hal2->syn_regs = (struct hal2_syn_regs *)hpc3->pbus_extregs[3];
 
 	if (hal2_detect(hal2) < 0) {
-		printk("HAL2 audio processor not found\n");
 		ret = -ENODEV;
-		goto fail1;
+		goto free_card;
 	}
 
-	hal2_init_codec(&hal2->dac);
-	hal2_init_codec(&hal2->adc);
+	hal2_init_codec(&hal2->dac, hpc3, 0);
+	hal2_init_codec(&hal2->adc, hpc3, 1);
 
-	ret = hal2_alloc_resources(hal2, hpc3);
-	if (ret)
-		goto fail1;
-	
-	hal2_init_mixer(hal2);
+	/*
+	 * All DMA channel interfaces in HAL2 are designed to operate with
+	 * PBUS programmed for 2 cycles in D3, 2 cycles in D4 and 2 cycles
+	 * in D5. HAL2 is a 16-bit device which can accept both big and little
+	 * endian format. It assumes that even address bytes are on high
+	 * portion of PBUS (15:8) and assumes that HPC3 is programmed to
+	 * accept a live (unsynchronized) version of P_DREQ_N from HAL2.
+	 */
+#define HAL2_PBUS_DMACFG ((0 << HPC3_DMACFG_D3R_SHIFT) | \
+			  (2 << HPC3_DMACFG_D4R_SHIFT) | \
+			  (2 << HPC3_DMACFG_D5R_SHIFT) | \
+			  (0 << HPC3_DMACFG_D3W_SHIFT) | \
+			  (2 << HPC3_DMACFG_D4W_SHIFT) | \
+			  (2 << HPC3_DMACFG_D5W_SHIFT) | \
+				HPC3_DMACFG_DS16 | \
+				HPC3_DMACFG_EVENHI | \
+				HPC3_DMACFG_RTIME | \
+			  (8 << HPC3_DMACFG_BURST_SHIFT) | \
+				HPC3_DMACFG_DRQLIVE)
+	/*
+	 * Ignore what's mentioned in the specification and write value which
+	 * works in The Real World (TM)
+	 */
+	hpc3->pbus_dmacfg[hal2->dac.pbus.pbusnr][0] = 0x8208844;
+	hpc3->pbus_dmacfg[hal2->adc.pbus.pbusnr][0] = 0x8208844;
+
+	if (request_irq(SGI_HPCDMA_IRQ, hal2_interrupt, SA_SHIRQ,
+			hal2str, hal2)) {
+		printk(KERN_ERR "HAL2: Can't get irq %d\n", SGI_HPCDMA_IRQ);
+		ret = -EAGAIN;
+		goto free_card;
+	}
 
 	hal2->dev_dsp = register_sound_dsp(&hal2_audio_fops, -1);
 	if (hal2->dev_dsp < 0) {
 		ret = hal2->dev_dsp;
-		goto fail2;
+		goto free_irq;
 	}
 
 	hal2->dev_mixer = register_sound_mixer(&hal2_mixer_fops, -1);
 	if (hal2->dev_mixer < 0) {
 		ret = hal2->dev_mixer;
-		goto fail3;
+		goto unregister_dsp;
 	}
-	
+
+	hal2_init_mixer(hal2);
+
 	*phal2 = hal2;
 	return 0;
-fail3:
+unregister_dsp:
 	unregister_sound_dsp(hal2->dev_dsp);
-fail2:
-	hal2_free_resources(hal2);
-fail1:
+free_irq:
+	free_irq(SGI_HPCDMA_IRQ, hal2);
+free_card:
 	kfree(hal2);
-	
+
 	return ret;
 }
 
+extern void (*indy_volume_button)(int);
+
 /* 
- * We are assuming only one HAL2 card. If you ever meet machine with more than
- * one, tell immediately about it to someone. Preferably to me. --ladis
+ * Assuming only one HAL2 card. Mail me if you ever meet machine with
+ * more than one.
  */
 static int __init init_hal2(void)
 {
-	int i;
+	int i, error;
 
 	for (i = 0; i < MAXCARDS; i++)
 		hal2_card[i] = NULL;
 
-	return hal2_init_card(&hal2_card[0], hpc3c0, HPC3_CHIP0_PBASE);
+	error = hal2_init_card(&hal2_card[0], hpc3c0);
+
+	/* let Indy's volume buttons work */
+	if (!error && !ip22_is_fullhouse())
+		indy_volume_button = hal2_volume_control;
+
+	return error;
+
 }
 
 static void __exit exit_hal2(void)
 {
 	int i;
+
+	/* unregister volume butons callback function */
+	indy_volume_button = NULL;
 	
 	for (i = 0; i < MAXCARDS; i++)
 		if (hal2_card[i]) {
-			hal2_free_resources(hal2_card[i]);
+			free_irq(SGI_HPCDMA_IRQ, hal2_card[i]);
 			unregister_sound_dsp(hal2_card[i]->dev_dsp);
 			unregister_sound_mixer(hal2_card[i]->dev_mixer);
 			kfree(hal2_card[i]);
--- diff/sound/oss/hal2.h	2004-05-19 22:13:23.000000000 +0100
+++ source/sound/oss/hal2.h	2004-07-01 21:32:54.000000000 +0100
@@ -4,7 +4,7 @@
 /*
  *  Driver for HAL2 sound processors
  *  Copyright (c) 1999 Ulf Carlsson <ulfc@bun.falkenberg.se>
- *  Copyright (c) 2001 Ladislav Michl <ladis@psi.cz>
+ *  Copyright (c) 2001, 2002, 2003 Ladislav Michl <ladis@linux-mips.org>
  *
  *  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 
@@ -22,16 +22,10 @@
  */
 
 #include <asm/addrspace.h>
-#include <asm/sgi/sgihpc.h>
+#include <asm/sgi/hpc3.h>
 #include <linux/spinlock.h>
 #include <linux/types.h>
 
-#define H2_HAL2_BASE		0x58000
-#define H2_CTL_PIO		(H2_HAL2_BASE + 0 * 0x400)
-#define H2_AES_PIO		(H2_HAL2_BASE + 1 * 0x400)
-#define H2_VOL_PIO		(H2_HAL2_BASE + 2 * 0x400)
-#define H2_SYN_PIO		(H2_HAL2_BASE + 3 * 0x400)
-
 /* Indirect status register */
 
 #define H2_ISR_TSTATUS		0x01	/* RO: transaction status 1=busy */
@@ -207,122 +201,48 @@
 #define H2I_UTIME_2_LD		0xffff		/* seconds, LSB's */
 #define H2I_UTIME_3_LD		0xffff		/* seconds, MSB's */
 
-typedef volatile u32 hal2_reg_t;
-
-typedef struct stru_hal2_ctl_regs hal2_ctl_regs_t;
-struct stru_hal2_ctl_regs {
-	hal2_reg_t _unused0[4];
-	hal2_reg_t isr;			/* 0x10 Status Register */
-	hal2_reg_t _unused1[3];
-	hal2_reg_t rev;			/* 0x20 Revision Register */
-	hal2_reg_t _unused2[3];
-	hal2_reg_t iar;			/* 0x30 Indirect Address Register */
-	hal2_reg_t _unused3[3];
-	hal2_reg_t idr0;		/* 0x40 Indirect Data Register 0 */
-	hal2_reg_t _unused4[3];
-	hal2_reg_t idr1;		/* 0x50 Indirect Data Register 1 */
-	hal2_reg_t _unused5[3];
-	hal2_reg_t idr2;		/* 0x60 Indirect Data Register 2 */
-	hal2_reg_t _unused6[3];
-	hal2_reg_t idr3;		/* 0x70 Indirect Data Register 3 */
-};
-
-typedef struct stru_hal2_aes_regs hal2_aes_regs_t;
-struct stru_hal2_aes_regs {
-	hal2_reg_t rx_stat[2];		/* Status registers */
-	hal2_reg_t rx_cr[2];		/* Control registers */
-	hal2_reg_t rx_ud[4];		/* User data window */
-	hal2_reg_t rx_st[24];		/* Channel status data */
+struct hal2_ctl_regs {
+	u32 _unused0[4];
+	volatile u32 isr;		/* 0x10 Status Register */
+	u32 _unused1[3];
+	volatile u32 rev;		/* 0x20 Revision Register */
+	u32 _unused2[3];
+	volatile u32 iar;		/* 0x30 Indirect Address Register */
+	u32 _unused3[3];
+	volatile u32 idr0;		/* 0x40 Indirect Data Register 0 */
+	u32 _unused4[3];
+	volatile u32 idr1;		/* 0x50 Indirect Data Register 1 */
+	u32 _unused5[3];
+	volatile u32 idr2;		/* 0x60 Indirect Data Register 2 */
+	u32 _unused6[3];
+	volatile u32 idr3;		/* 0x70 Indirect Data Register 3 */
+};
+
+struct hal2_aes_regs {
+	volatile u32 rx_stat[2];	/* Status registers */
+	volatile u32 rx_cr[2];		/* Control registers */
+	volatile u32 rx_ud[4];		/* User data window */
+	volatile u32 rx_st[24];		/* Channel status data */
 	
-	hal2_reg_t tx_stat[1];		/* Status register */
-	hal2_reg_t tx_cr[3];		/* Control registers */
-	hal2_reg_t tx_ud[4];		/* User data window */
-	hal2_reg_t tx_st[24];		/* Channel status data */
-};
-
-typedef struct stru_hal2_vol_regs hal2_vol_regs_t;
-struct stru_hal2_vol_regs {
-	hal2_reg_t right;		/* 0x00 Right volume */
-	hal2_reg_t left;		/* 0x04 Left volume */
-};
-
-typedef struct stru_hal2_syn_regs hal2_syn_regs_t;
-struct stru_hal2_syn_regs {
-	hal2_reg_t _unused0[2];
-	hal2_reg_t page;		/* DOC Page register */
-	hal2_reg_t regsel;		/* DOC Register selection */
-	hal2_reg_t dlow;		/* DOC Data low */
-	hal2_reg_t dhigh;		/* DOC Data high */
-	hal2_reg_t irq;			/* IRQ Status */
-	hal2_reg_t dram;		/* DRAM Access */
-};
-
-/* HAL2 specific structures */
-
-typedef struct stru_hal2_pbus hal2_pbus_t;
-struct stru_hal2_pbus {
-	struct hpc3_pbus_dmacregs *pbus;
-	int pbusnr;
-	unsigned int ctrl;		/* Current state of pbus->pbdma_ctrl */
+	volatile u32 tx_stat[1];	/* Status register */
+	volatile u32 tx_cr[3];		/* Control registers */
+	volatile u32 tx_ud[4];		/* User data window */
+	volatile u32 tx_st[24];		/* Channel status data */
 };
 
-typedef struct stru_hal2_binfo hal2_binfo_t;
-typedef struct stru_hal2_buffer hal2_buf_t;
-struct stru_hal2_binfo {
-	volatile struct hpc_dma_desc desc;
-	hal2_buf_t *next;		/* pointer to next buffer */
-	int cnt;			/* bytes in buffer */
-};
-#define H2_BUFFER_SIZE	(PAGE_SIZE - \
-		((sizeof(hal2_binfo_t) - 1) / 8 + 1) * 8)
-struct stru_hal2_buffer {
-	hal2_binfo_t info;
-	char data[H2_BUFFER_SIZE] __attribute__((aligned(8)));
+struct hal2_vol_regs {
+	volatile u32 right;		/* Right volume */
+	volatile u32 left;		/* Left volume */
 };
 
-typedef struct stru_hal2_codec hal2_codec_t;
-struct stru_hal2_codec {
-	hal2_buf_t *head;
-	hal2_buf_t *tail; 
-	hal2_pbus_t pbus;
-	unsigned int format;		/* Audio data format */
-	int voices;			/* mono/stereo */
-	unsigned int sample_rate;
-	unsigned int master;		/* Master frequency */
-	unsigned short mod;		/* MOD value */
-	unsigned short inc;		/* INC value */
-
-	wait_queue_head_t dma_wait;
-	spinlock_t lock;
-	struct semaphore sem;
-
-	int usecount;			/* recording and playback are 
-					 * independent */
-};
-
-#define H2_MIX_OUTPUT_ATT	0
-#define H2_MIX_INPUT_GAIN	1
-#define H2_MIXERS		2
-typedef struct stru_hal2_mixer hal2_mixer_t;
-struct stru_hal2_mixer {
-	int modcnt;
-	unsigned int volume[H2_MIXERS];
-};
-
-typedef struct stru_hal2_card hal2_card_t;
-struct stru_hal2_card {
-	int dev_dsp;			/* audio device */
-	int dev_mixer;			/* mixer device */
-	int dev_midi;			/* midi device */
-	
-	hal2_ctl_regs_t *ctl_regs;	/* HAL2 ctl registers */
-	hal2_aes_regs_t *aes_regs;	/* HAL2 vol registers */
-	hal2_vol_regs_t *vol_regs;	/* HAL2 aes registers */
-	hal2_syn_regs_t *syn_regs;	/* HAL2 syn registers */
-
-	hal2_codec_t dac;
-	hal2_codec_t adc;
-	hal2_mixer_t mixer;
+struct hal2_syn_regs {
+	u32 _unused0[2];
+	volatile u32 page;		/* DOC Page register */
+	volatile u32 regsel;		/* DOC Register selection */
+	volatile u32 dlow;		/* DOC Data low */
+	volatile u32 dhigh;		/* DOC Data high */
+	volatile u32 irq;		/* IRQ Status */
+	volatile u32 dram;		/* DRAM Access */
 };
 
-#endif				/* __HAL2_H */
+#endif	/* __HAL2_H */
--- diff/sound/oss/sb_card.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/oss/sb_card.c	2004-07-01 21:32:54.000000000 +0100
@@ -309,7 +309,13 @@
 
 	/* If either PnP or Legacy registered a card then return
 	 * success */
-	return (pres > 0 || lres > 0) ? 0 : -ENODEV;
+	if (pres <= 0 && lres <= 0) {
+#ifdef CONFIG_PNP
+		pnp_unregister_card_driver(&sb_pnp_driver);
+#endif
+		return -ENODEV;
+	}
+	return 0;
 }
 
 static void __exit sb_exit(void)
--- diff/sound/parisc/harmony.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/parisc/harmony.c	2004-07-01 21:32:54.000000000 +0100
@@ -556,7 +556,7 @@
 	harmony->sample_rate = snd_card_harmony_rate_bits(runtime->rate);
 
 	/* data format */
-	harmony->data_format = snd_harmony_set_data_format(haromny, runtime->format);
+	harmony->data_format = snd_harmony_set_data_format(harmony, runtime->format);
 
 	/* number of channels */
 	if (runtime->channels == 2)
@@ -587,7 +587,7 @@
 	harmony->sample_rate = snd_card_harmony_rate_bits(runtime->rate);
 	
 	/* data format */
-	harmony->data_format = snd_harmony_set_data_format(haromny, runtime->format);
+	harmony->data_format = snd_harmony_set_data_format(harmony, runtime->format);
 	
 	/* number of channels */
 	if (runtime->channels == 1)
@@ -751,6 +751,8 @@
 	int err;
 	
 	err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
+	if (err > 0 && substream->dma_device.type == SNDRV_DMA_TYPE_CONTINUOUS)
+		substream->runtime->dma_addr = __pa(substream->runtime->dma_area);
 	DPRINTK(KERN_INFO PFX "HW Params returned %d, dma_addr %lx\n", err,
 			(unsigned long)substream->runtime->dma_addr);
 	return err;
@@ -784,7 +786,7 @@
 	.pointer =		snd_card_harmony_capture_pointer,
 };
 
-static int snd_card_harmony_pcm_init(snd_card_harmony_t *harmony, int device)
+static int snd_card_harmony_pcm_init(snd_card_harmony_t *harmony)
 {
 	snd_pcm_t *pcm;
 	int err;
@@ -797,7 +799,7 @@
 	
 	snd_harmony_disable_interrupts(harmony);
 	
-   	if ((err = snd_pcm_new(harmony->card, "Harmony", device, 1, 1, &pcm)) < 0)
+   	if ((err = snd_pcm_new(harmony->card, "Harmony", 0, 1, 1, &pcm)) < 0)
 		return err;
 	
 	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_card_harmony_playback_ops);
@@ -813,26 +815,46 @@
 	harmony->dma_dev.dev = &harmony->pa_dev->dev;
 	err = snd_dma_alloc_pages(&harmony->dma_dev, HARMONY_BUF_SIZE*GRAVEYARD_BUFS,
 				  &harmony->graveyard_dma);
-	if (err < 0)
+	if (err == -ENOMEM) {
+		/* use continuous buffers */
+		harmony->dma_dev.type = SNDRV_DMA_TYPE_CONTINUOUS;
+		harmony->dma_dev.dev = snd_dma_continuous_data(GFP_KERNEL);
+		err = snd_dma_alloc_pages(&harmony->dma_dev, HARMONY_BUF_SIZE*GRAVEYARD_BUFS,
+					  &harmony->graveyard_dma);
+	}
+	if (err < 0) {
+		printk(KERN_ERR PFX "can't allocate graveyard buffer\n");
 		return err;
+	}
 	harmony->graveyard_count = 0;
 	
 	/* initialize silence buffers */
 	err = snd_dma_alloc_pages(&harmony->dma_dev, HARMONY_BUF_SIZE*SILENCE_BUFS,
 				  &harmony->silence_dma);
-	if (err < 0)
+	if (err < 0) {
+		printk(KERN_ERR PFX "can't allocate silence buffer\n");
 		return err;
+	}
 	harmony->silence_count = 0;
 
+	if (harmony->dma_dev.type == SNDRV_DMA_TYPE_CONTINUOUS) {
+		harmony->graveyard_dma.addr = __pa(harmony->graveyard_dma.area);
+		harmony->silence_dma.addr = __pa(harmony->silence_dma.area);
+	}
+
 	harmony->ply_stopped = harmony->cap_stopped = 1;
 	
 	harmony->playback_substream = NULL;
 	harmony->capture_substream = NULL;
 	harmony->graveyard_count = 0;
-	
-	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-					      &harmony->pa_dev->dev,
-					      MAX_BUFFER_SIZE, MAX_BUFFER_SIZE);
+
+	err = snd_pcm_lib_preallocate_pages_for_all(pcm, harmony->dma_dev.type,
+						    harmony->dma_dev.dev,
+						    MAX_BUFFER_SIZE, MAX_BUFFER_SIZE);
+	if (err < 0) {
+		printk(KERN_ERR PFX "buffer allocation error %d\n", err);
+		// return err;
+	}
 
 	return 0;
 }
@@ -1037,7 +1059,7 @@
 		snd_card_free(card);
 		return err;
 	}
-	if ((err = snd_card_harmony_pcm_init(chip, dev)) < 0) {
+	if ((err = snd_card_harmony_pcm_init(chip)) < 0) {
 		printk(KERN_ERR PFX "PCM Init failed\n");
 		snd_card_free(card);
 		return err;
--- diff/sound/pci/ac97/ac97_codec.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/pci/ac97/ac97_codec.c	2004-07-01 21:32:54.000000000 +0100
@@ -108,12 +108,13 @@
 { 0x41445375, 0xffffffff, "AD1985",		patch_ad1985,	NULL },
 { 0x414c4300, 0xffffff00, "ALC100/100P", 	NULL,		NULL },
 { 0x414c4710, 0xfffffff0, "ALC200/200P",	NULL,		NULL },
+{ 0x414c4721, 0xffffffff, "ALC650D",		NULL,	NULL }, /* already patched */
+{ 0x414c4722, 0xffffffff, "ALC650E",		NULL,	NULL }, /* already patched */
+{ 0x414c4723, 0xffffffff, "ALC650F",		NULL,	NULL }, /* already patched */
 { 0x414c4720, 0xfffffff0, "ALC650",		patch_alc650,	NULL },
-{ 0x414c4721, 0xfffffff0, "ALC650D",		patch_alc650,	NULL },
-{ 0x414c4722, 0xfffffff0, "ALC650E",		patch_alc650,	NULL },
-{ 0x414c4723, 0xfffffff0, "ALC650F",		patch_alc650,	NULL },
 { 0x414c4760, 0xfffffff0, "ALC655",		patch_alc655,	NULL },
 { 0x414c4780, 0xfffffff0, "ALC658",		patch_alc655,	NULL },
+{ 0x414c4790, 0xfffffff0, "ALC850",		patch_alc850,	NULL },
 { 0x414c4730, 0xffffffff, "ALC101",		NULL,		NULL },
 { 0x414c4740, 0xfffffff0, "ALC202",		NULL,		NULL },
 { 0x414c4750, 0xfffffff0, "ALC250",		NULL,		NULL },
@@ -274,7 +275,7 @@
 {
 	if (!snd_ac97_valid_reg(ac97, reg))
 		return;
-	if ((ac97->id & 0xffffff00) == 0x414c4300) {
+	if ((ac97->id & 0xffffff00) == AC97_ID_ALC100) {
 		/* Fix H/W bug of ALC100/100P */
 		if (reg == AC97_MASTER || reg == AC97_HEADPHONE)
 			ac97->bus->write(ac97, AC97_RESET, 0);	/* reset audio codec */
@@ -398,7 +399,7 @@
 	int change;
 	unsigned short old, new, cfg;
 
-	down(&ac97->spec.ad18xx.mutex);
+	down(&ac97->mutex);
 	spin_lock(&ac97->reg_lock);
 	old = ac97->spec.ad18xx.pcmreg[codec];
 	new = (old & ~mask) | value;
@@ -418,7 +419,7 @@
 				 cfg | 0x7000);
 	} else
 		spin_unlock(&ac97->reg_lock);
-	up(&ac97->spec.ad18xx.mutex);
+	up(&ac97->mutex);
 	return change;
 }
 
@@ -545,7 +546,7 @@
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
 	int mask = (kcontrol->private_value >> 16) & 0xff;
-	int invert = (kcontrol->private_value >> 24) & 0xff;
+	int invert = (kcontrol->private_value >> 24) & 0x01;
 	
 	ucontrol->value.integer.value[0] = (snd_ac97_read_cache(ac97, reg) >> shift) & mask;
 	if (invert)
@@ -559,7 +560,7 @@
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
 	int mask = (kcontrol->private_value >> 16) & 0xff;
-	int invert = (kcontrol->private_value >> 24) & 0xff;
+	int invert = (kcontrol->private_value >> 24) & 0x01;
 	unsigned short val;
 	
 	val = (ucontrol->value.integer.value[0] & mask);
@@ -625,6 +626,40 @@
 				    (val1 << shift_left) | (val2 << shift_right));
 }
 
+int snd_ac97_getput_page(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol,
+			 int (*func)(snd_kcontrol_t *, snd_ctl_elem_value_t *))
+{
+	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	int reg = kcontrol->private_value & 0xff;
+	int err;
+
+	if ((ac97->ext_id & AC97_EI_REV_MASK) >= AC97_EI_REV_23 &&
+	    (reg >= 0x60 && reg < 0x70)) {
+		unsigned short page_save;
+		unsigned short page = (kcontrol->private_value >> 25) & 0x0f;
+		down(&ac97->mutex); /* lock paging */
+		page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK;
+		snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page);
+		err = func(kcontrol, ucontrol);
+		snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save);
+		up(&ac97->mutex); /* unlock paging */
+	} else
+		err = func(kcontrol, ucontrol);
+	return err;
+}
+
+/* for rev2.3 paging */
+int snd_ac97_page_get_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+{
+	return snd_ac97_getput_page(kcontrol, ucontrol, snd_ac97_get_single);
+}
+
+/* for rev2.3 paging */
+int snd_ac97_page_put_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+{
+	return snd_ac97_getput_page(kcontrol, ucontrol, snd_ac97_put_single);
+}
+
 static const snd_kcontrol_new_t snd_ac97_controls_master_mono[2] = {
 AC97_SINGLE("Master Mono Playback Switch", AC97_MASTER_MONO, 15, 1, 1),
 AC97_SINGLE("Master Mono Playback Volume", AC97_MASTER_MONO, 0, 31, 1)
@@ -1120,6 +1155,7 @@
 	snd_ac97_write_cache(ac97, reg, 0x8000);
 }
 
+/* check the volume resolution of center/lfe */
 static void snd_ac97_change_volume_params2(ac97_t * ac97, int reg, int shift, unsigned char *max)
 {
 	unsigned short val, val1;
@@ -1135,6 +1171,7 @@
 	snd_ac97_write_cache(ac97, reg, 0x8080);
 }
 
+/* check whether the volume resolution is 4 or 5 bits */
 static void snd_ac97_change_volume_params3(ac97_t * ac97, int reg, unsigned char *max)
 {
 	unsigned short val, val1;
@@ -1150,6 +1187,18 @@
 	snd_ac97_write_cache(ac97, reg, 0x8000);
 }
 
+/* check whether the volume is mono or stereo */
+static int snd_ac97_is_stereo_vol(ac97_t *ac97, int reg)
+{
+	unsigned short val, val1, val2;
+	val = snd_ac97_read(ac97, reg);
+	val1 = val | 0x8000 | (0x01 << 8);
+	snd_ac97_write(ac97, reg, val1);
+	val2 = snd_ac97_read(ac97, reg);
+	snd_ac97_write(ac97, reg, val); /* restore */
+	return val1 == val2;
+}
+
 static inline int printable(unsigned int x)
 {
 	x &= 0xff;
@@ -1239,6 +1288,8 @@
 }
 
 
+static unsigned int snd_ac97_determine_spdif_rates(ac97_t *ac97);
+
 static int snd_ac97_mixer_build(ac97_t * ac97)
 {
 	snd_card_t *card = ac97->bus->card;
@@ -1293,11 +1344,8 @@
 	}
 
 	/* build headphone controls */
-	if (snd_ac97_try_volume_mix(ac97, AC97_HEADPHONE) || ac97->id == AC97_ID_STAC9708) {
-		const char *name = ac97->id == AC97_ID_STAC9708 ? 
-			"Sigmatel Surround Playback" :
-			"Headphone Playback";
-		if ((err = snd_ac97_cmix_new(card, name, AC97_HEADPHONE, 1, ac97)) < 0)
+	if (snd_ac97_try_volume_mix(ac97, AC97_HEADPHONE)) {
+		if ((err = snd_ac97_cmix_new(card, "Headphone Playback", AC97_HEADPHONE, 1, ac97)) < 0)
 			return err;
 	}
 	
@@ -1332,7 +1380,8 @@
 		for (idx = 0; idx < 2; idx++)
 			if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_pc_beep[idx], ac97))) < 0)
 				return err;
-		snd_ac97_write_cache(ac97, AC97_PC_BEEP, 0x801e);
+		snd_ac97_write_cache(ac97, AC97_PC_BEEP,
+				     snd_ac97_read(ac97, AC97_PC_BEEP) | 0x801e);
 	}
 	
 	/* build Phone controls */
@@ -1349,15 +1398,26 @@
 	
 	/* build MIC controls */
 	snd_ac97_change_volume_params3(ac97, AC97_MIC, &max);
-	for (idx = 0; idx < 3; idx++) {
-		if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_mic[idx], ac97))) < 0)
+	if (snd_ac97_is_stereo_vol(ac97, AC97_MIC)) {
+		/* build stereo mic */
+		if ((err = snd_ac97_cmute_new(card, "Mic Playback Switch", AC97_MIC, ac97)) < 0)
 			return err;
-		if (idx == 1) {		// volume
-			kctl->private_value &= ~(0xff << 16);
-			kctl->private_value |= (int)max << 16;
+		if ((err = snd_ac97_cvol_new(card, "Mic Playback Volume", AC97_MIC, max, ac97)) < 0)
+			return err;
+		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_mic[2], ac97))) < 0)
+			return err;
+	} else {
+		/* build mono mic */
+		for (idx = 0; idx < 3; idx++) {
+			if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_mic[idx], ac97))) < 0)
+				return err;
+			if (idx == 1) {		// volume
+				kctl->private_value &= ~(0xff << 16);
+				kctl->private_value |= (int)max << 16;
+			}
 		}
+		snd_ac97_write_cache(ac97, AC97_MIC, 0x8000 | max);
 	}
-	snd_ac97_write_cache(ac97, AC97_MIC, 0x8000 | max);
 
 	/* build Line controls */
 	if ((err = snd_ac97_cmix_new(card, "Line Playback", AC97_LINE, 0, ac97)) < 0)
@@ -1410,9 +1470,7 @@
 		if ((err = snd_ac97_cmute_new(card, "PCM Playback Switch", AC97_PCM, ac97)) < 0)
 			return err;
 		/* FIXME: C-Media chips have no PCM volume!! */
-		if (/*ac97->id == 0x434d4941 ||*/
-		    ac97->id == 0x434d4942 ||
-		    ac97->id == 0x434d4961)
+		if (ac97->id == AC97_ID_CM9739)
 			snd_ac97_write_cache(ac97, AC97_PCM, 0x9f1f);
 		else {
 			if ((err = snd_ac97_cvol_new(card, "PCM Playback Volume", AC97_PCM, 31, ac97)) < 0)
@@ -1520,6 +1578,7 @@
 			/* set default PCM S/PDIF params */
 			/* consumer,PCM audio,no copyright,no preemphasis,PCM coder,original,48000Hz */
 			snd_ac97_write_cache(ac97, AC97_SPDIF, 0x2a20);
+			ac97->rates[AC97_RATES_SPDIF] = snd_ac97_determine_spdif_rates(ac97);
 		}
 		ac97->spdif_status = SNDRV_PCM_DEFAULT_CON_SPDIF;
 	}
@@ -1675,7 +1734,7 @@
 		if (snd_ac97_read(ac97, AC97_REC_GAIN) == 0x8a05)
 			return 0;
 		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(HZ/100);
+		schedule_timeout(1);
 	} while (time_after_eq(end_time, jiffies));
 	return -ENODEV;
 }
@@ -1774,6 +1833,7 @@
 	ac97->bus = bus;
 	bus->codec[ac97->num] = ac97;
 	spin_lock_init(&ac97->reg_lock);
+	init_MUTEX(&ac97->mutex);
 
 	if (ac97->pci) {
 		pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_VENDOR_ID, &ac97->subsystem_vendor);
@@ -1789,8 +1849,14 @@
 		bus->wait(ac97);
 	else {
 		udelay(50);
-		if (ac97_reset_wait(ac97, HZ/2, 0) < 0 &&
-		    ac97_reset_wait(ac97, HZ/2, 1) < 0) {
+		if (ac97->scaps & AC97_SCAP_SKIP_AUDIO)
+			err = ac97_reset_wait(ac97, HZ/2, 1);
+		else {
+			err = ac97_reset_wait(ac97, HZ/2, 0);
+			if (err < 0)
+				err = ac97_reset_wait(ac97, 0, 1);
+		}
+		if (err < 0) {
 			snd_printk(KERN_WARNING "AC'97 %d does not respond - RESET\n", ac97->num);
 			/* proceed anyway - it's often non-critical */
 		}
@@ -1803,20 +1869,6 @@
 		snd_ac97_free(ac97);
 		return -EIO;
 	}
-	/* AC97 audio codec chip revision detection. */
-	/* Currently only Realtek ALC650 detection implemented. */
-	switch(ac97->id & 0xfffffff0) {
-	case 0x414c4720:        /* ALC650 */
-		reg = snd_ac97_read(ac97, AC97_ALC650_REVISION);
-		if (((reg & 0x3f) >= 0) && ((reg & 0x3f) < 3))
-			ac97->id = 0x414c4720;          /* Old version */
-		else if (((reg & 0x3f) >= 3) && ((reg & 0x3f) < 0x10))
-			ac97->id = 0x414c4721;          /* D version */
-		else if ((reg&0x30) == 0x10)
-			ac97->id = 0x414c4722;          /* E version */
-		else if ((reg&0x30) == 0x20)
-			ac97->id = 0x414c4723;          /* F version */
-        }
 	
 	/* test for AC'97 */
 	if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO) && !(ac97->scaps & AC97_SCAP_AUDIO)) {
@@ -1865,9 +1917,9 @@
 			if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f)
 				goto __ready_ok;
 			set_current_state(TASK_UNINTERRUPTIBLE);
-			schedule_timeout(HZ/10);
+			schedule_timeout(1);
 		} while (time_after_eq(end_time, jiffies));
-		snd_printk(KERN_ERR "AC'97 %d analog subsections not ready\n", ac97->num);
+		snd_printk(KERN_WARNING "AC'97 %d analog subsections not ready\n", ac97->num);
 	}
 
 	/* FIXME: add powerdown control */
@@ -1898,9 +1950,9 @@
 			if ((snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS) & tmp) == tmp)
 				goto __ready_ok;
 			set_current_state(TASK_UNINTERRUPTIBLE);
-			schedule_timeout(HZ/10);
+			schedule_timeout(1);
 		} while (time_after_eq(end_time, jiffies));
-		snd_printk(KERN_ERR "MC'97 %d converters and GPIO not ready (0x%x)\n", ac97->num, snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS));
+		snd_printk(KERN_WARNING "MC'97 %d converters and GPIO not ready (0x%x)\n", ac97->num, snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS));
 	}
 	
       __ready_ok:
@@ -1919,12 +1971,7 @@
 	}
 	if (ac97->ext_id & AC97_EI_SPDIF) {
 		/* codec specific code (patch) should override these values */
-		if (ac97->flags & AC97_CS_SPDIF)
-			ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_44100;
-		else if (ac97->id == AC97_ID_CM9739)
-			ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000;
-		else
-			ac97->rates[AC97_RATES_SPDIF] = snd_ac97_determine_spdif_rates(ac97);
+		ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_32000;
 	}
 	if (ac97->ext_id & AC97_EI_VRM) {	/* MIC VRA support */
 		snd_ac97_determine_rates(ac97, AC97_PCM_MIC_ADC_RATE, 0, &ac97->rates[AC97_RATES_MIC_ADC]);
@@ -1942,8 +1989,8 @@
 	/* additional initializations */
 	if (bus->init)
 		bus->init(ac97);
-	snd_ac97_get_name(ac97, ac97->id, name, 0);
-	snd_ac97_get_name(NULL, ac97->id, name, 0);  // ac97->id might be changed in the special setup code
+	snd_ac97_get_name(ac97, ac97->id, name, !ac97_is_audio(ac97));
+	snd_ac97_get_name(NULL, ac97->id, name, !ac97_is_audio(ac97));  // ac97->id might be changed in the special setup code
 	if (ac97_is_audio(ac97)) {
 		if (card->mixername[0] == '\0') {
 			strcpy(card->mixername, name);
@@ -2066,18 +2113,28 @@
 	snd_ac97_write(ac97, AC97_GENERAL_PURPOSE, 0);
 
 	snd_ac97_write(ac97, AC97_POWERDOWN, ac97->regs[AC97_POWERDOWN]);
-	ac97->bus->write(ac97, AC97_MASTER, 0x8101);
-	for (i = 0; i < 10; i++) {
-		if (snd_ac97_read(ac97, AC97_MASTER) == 0x8101)
-			break;
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(1);
-	}
-	/* FIXME: extra delay */
-	ac97->bus->write(ac97, AC97_MASTER, 0x8000);
-	if (snd_ac97_read(ac97, AC97_MASTER) != 0x8000) {
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(HZ/4);
+	if (ac97_is_audio(ac97)) {
+		ac97->bus->write(ac97, AC97_MASTER, 0x8101);
+		for (i = HZ/10; i >= 0; i--) {
+			if (snd_ac97_read(ac97, AC97_MASTER) == 0x8101)
+				break;
+			set_current_state(TASK_UNINTERRUPTIBLE);
+			schedule_timeout(1);
+		}
+		/* FIXME: extra delay */
+		ac97->bus->write(ac97, AC97_MASTER, 0x8000);
+		if (snd_ac97_read(ac97, AC97_MASTER) != 0x8000) {
+			set_current_state(TASK_UNINTERRUPTIBLE);
+			schedule_timeout(HZ/4);
+		}
+	} else {
+		for (i = HZ/10; i >= 0; i--) {
+			unsigned short val = snd_ac97_read(ac97, AC97_EXTENDED_MID);
+			if (val != 0xffff && (val & 1) != 0)
+				break;
+			set_current_state(TASK_UNINTERRUPTIBLE);
+			schedule_timeout(1);
+		}
 	}
 __reset_ready:
 
@@ -2151,42 +2208,57 @@
 
 /*
  */
-int snd_ac97_remove_ctl(ac97_t *ac97, const char *name)
+static void set_ctl_name(char *dst, const char *src, const char *suffix)
+{
+	if (suffix)
+		sprintf(dst, "%s %s", src, suffix);
+	else
+		strcpy(dst, src);
+}	
+
+int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix)
 {
 	snd_ctl_elem_id_t id;
 	memset(&id, 0, sizeof(id));
-	strcpy(id.name, name);
+	set_ctl_name(id.name, name, suffix);
 	id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	return snd_ctl_remove_id(ac97->bus->card, &id);
 }
 
-static snd_kcontrol_t *ctl_find(ac97_t *ac97, const char *name)
+static snd_kcontrol_t *ctl_find(ac97_t *ac97, const char *name, const char *suffix)
 {
 	snd_ctl_elem_id_t sid;
 	memset(&sid, 0, sizeof(sid));
-	strcpy(sid.name, name);
+	set_ctl_name(sid.name, name, suffix);
 	sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	return snd_ctl_find_id(ac97->bus->card, &sid);
 }
 
-int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst)
+int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix)
 {
-	snd_kcontrol_t *kctl = ctl_find(ac97, src);
+	snd_kcontrol_t *kctl = ctl_find(ac97, src, suffix);
 	if (kctl) {
-		strcpy(kctl->id.name, dst);
+		set_ctl_name(kctl->id.name, dst, suffix);
 		return 0;
 	}
 	return -ENOENT;
 }
 
-int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2)
+/* rename both Volume and Switch controls - don't check the return value */
+void snd_ac97_rename_vol_ctl(ac97_t *ac97, const char *src, const char *dst)
+{
+	snd_ac97_rename_ctl(ac97, src, dst, "Switch");
+	snd_ac97_rename_ctl(ac97, src, dst, "Volume");
+}
+
+int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix)
 {
 	snd_kcontrol_t *kctl1, *kctl2;
-	kctl1 = ctl_find(ac97, s1);
-	kctl2 = ctl_find(ac97, s2);
+	kctl1 = ctl_find(ac97, s1, suffix);
+	kctl2 = ctl_find(ac97, s2, suffix);
 	if (kctl1 && kctl2) {
-		strcpy(kctl1->id.name, s2);
-		strcpy(kctl2->id.name, s1);
+		set_ctl_name(kctl1->id.name, s2, suffix);
+		set_ctl_name(kctl2->id.name, s1, suffix);
 		return 0;
 	}
 	return -ENOENT;
@@ -2194,26 +2266,22 @@
 
 static int swap_headphone(ac97_t *ac97, int remove_master)
 {
-	/* FIXME: error checks.. */
 	if (remove_master) {
-		if (ctl_find(ac97, "Headphone Playback Switch") == NULL)
+		if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL)
 			return 0;
-		snd_ac97_remove_ctl(ac97, "Master Playback Switch");
-		snd_ac97_remove_ctl(ac97, "Master Playback Volume");
-	} else {
-		snd_ac97_rename_ctl(ac97, "Master Playback Switch", "Line-Out Playback Switch");
-		snd_ac97_rename_ctl(ac97, "Master Playback Volume", "Line-Out Playback Volume");
-	}
-	snd_ac97_rename_ctl(ac97, "Headphone Playback Switch", "Master Playback Switch");
-	snd_ac97_rename_ctl(ac97, "Headphone Playback Volume", "Master Playback Volume");
+		snd_ac97_remove_ctl(ac97, "Master Playback", "Switch");
+		snd_ac97_remove_ctl(ac97, "Master Playback", "Volume");
+	} else
+		snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Line-Out Playback");
+	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback");
 	return 0;
 }
 
 static int swap_surround(ac97_t *ac97)
 {
 	/* FIXME: error checks.. */
-	snd_ac97_swap_ctl(ac97, "Master Playback Switch", "Surround Playback Switch");
-	snd_ac97_swap_ctl(ac97, "Master Playback Volume", "Surround Playback Volume");
+	snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Switch");
+	snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Volume");
 	return 0;
 }
 
--- diff/sound/pci/ac97/ac97_id.h	2004-05-19 22:13:24.000000000 +0100
+++ source/sound/pci/ac97/ac97_id.h	2004-07-01 21:32:54.000000000 +0100
@@ -45,7 +45,14 @@
 #define AC97_ID_CS4201		0x43525948
 #define AC97_ID_CS4205		0x43525958
 #define AC97_ID_CS_MASK		0xfffffff8	/* bit 0-2: rev */
+#define AC97_ID_ALC100		0x414c4300
 #define AC97_ID_ALC650		0x414c4720
+#define AC97_ID_ALC650D		0x414c4721
+#define AC97_ID_ALC650E		0x414c4722
+#define AC97_ID_ALC650F		0x414c4723
+#define AC97_ID_ALC655		0x414c4760
+#define AC97_ID_ALC658		0x414c4780
+#define AC97_ID_ALC850		0x414c4790
 #define AC97_ID_YMF753		0x594d4803
 #define AC97_ID_VT1616		0x49434551
 #define AC97_ID_CM9738		0x434d4941
--- diff/sound/pci/ac97/ac97_local.h	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/pci/ac97/ac97_local.h	2004-07-01 21:32:54.000000000 +0100
@@ -23,10 +23,15 @@
  */
 
 #define AC97_SINGLE_VALUE(reg,shift,mask,invert) ((reg) | ((shift) << 8) | ((mask) << 16) | ((invert) << 24))
+#define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,invert,page) ((reg) | ((shift) << 8) | ((mask) << 16) | ((invert) << 24) | ((page) << 25))
 #define AC97_SINGLE(xname, reg, shift, mask, invert) \
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_single, \
   .get = snd_ac97_get_single, .put = snd_ac97_put_single, \
   .private_value =  AC97_SINGLE_VALUE(reg, shift, mask, invert) }
+#define AC97_PAGE_SINGLE(xname, reg, shift, mask, invert, page)		\
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_single, \
+  .get = snd_ac97_page_get_single, .put = snd_ac97_page_put_single, \
+  .private_value =  AC97_PAGE_SINGLE_VALUE(reg, shift, mask, invert, page) }
 
 /* ac97_codec.c */
 extern const char *snd_ac97_stereo_enhancements[];
@@ -37,10 +42,13 @@
 int snd_ac97_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
 int snd_ac97_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
 int snd_ac97_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+int snd_ac97_page_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+int snd_ac97_page_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
 int snd_ac97_try_bit(ac97_t * ac97, int reg, int bit);
-int snd_ac97_remove_ctl(ac97_t *ac97, const char *name);
-int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst);
-int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2);
+int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix);
+int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix);
+int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix);
+void snd_ac97_rename_vol_ctl(ac97_t *ac97, const char *src, const char *dst);
 
 /* ac97_proc.c */
 void snd_ac97_bus_proc_init(ac97_bus_t * ac97);
--- diff/sound/pci/ac97/ac97_patch.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/pci/ac97/ac97_patch.c	2004-07-01 21:32:54.000000000 +0100
@@ -51,6 +51,21 @@
 	return 0;
 }
 
+/* set to the page, update bits and restore the page */
+static int ac97_update_bits_page(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value, unsigned short page)
+{
+	unsigned short page_save;
+	int ret;
+
+	down(&ac97->mutex);
+	page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK;
+	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page);
+	ret = snd_ac97_update_bits(ac97, reg, mask, value);
+	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save);
+	up(&ac97->mutex); /* unlock paging */
+	return ret;
+}
+
 /* The following snd_ac97_ymf753_... items added by David Shust (dshust@shustring.com) */
 
 /* It is possible to indicate to the Yamaha YMF753 the type of speakers being used. */
@@ -204,7 +219,7 @@
 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
 		return err;
 	strcpy(kctl->id.name, "3D Control - Wide");
-	kctl->private_value = AC97_3D_CONTROL | (9 << 8) | (7 << 16);
+	kctl->private_value = AC97_SINGLE_VALUE(AC97_3D_CONTROL, 9, 7, 0);
 	snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000);
 	if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&snd_ac97_ymf753_controls_speaker, ac97))) < 0)
 		return err;
@@ -315,7 +330,7 @@
 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
 		return err;
 	strcpy(kctl->id.name, "3D Control Sigmatel - Depth");
-	kctl->private_value = AC97_3D_CONTROL | (3 << 16);
+	kctl->private_value = AC97_SINGLE_VALUE(AC97_3D_CONTROL, 2, 3, 0);
 	snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000);
 	return 0;
 }
@@ -328,11 +343,11 @@
 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
 		return err;
 	strcpy(kctl->id.name, "3D Control Sigmatel - Depth");
-	kctl->private_value = AC97_3D_CONTROL | (3 << 16);
+	kctl->private_value = AC97_SINGLE_VALUE(AC97_3D_CONTROL, 0, 3, 0);
 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
 		return err;
 	strcpy(kctl->id.name, "3D Control Sigmatel - Rear Depth");
-	kctl->private_value = AC97_3D_CONTROL | (2 << 8) | (3 << 16);
+	kctl->private_value = AC97_SINGLE_VALUE(AC97_3D_CONTROL, 2, 3, 0);
 	snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000);
 	return 0;
 }
@@ -373,17 +388,23 @@
 	.build_specific	= patch_sigmatel_stac97xx_specific
 };
 
-static struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = {
-	.build_3d	= patch_sigmatel_stac9708_3d,
-	.build_specific	= patch_sigmatel_stac97xx_specific
-};
-
 int patch_sigmatel_stac9700(ac97_t * ac97)
 {
 	ac97->build_ops = &patch_sigmatel_stac9700_ops;
 	return 0;
 }
 
+static int patch_sigmatel_stac9708_specific(ac97_t *ac97)
+{
+	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Sigmatel Surround Playback");
+	return patch_sigmatel_stac97xx_specific(ac97);
+}
+
+static struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = {
+	.build_3d	= patch_sigmatel_stac9708_3d,
+	.build_specific	= patch_sigmatel_stac9708_specific
+};
+
 int patch_sigmatel_stac9708(ac97_t * ac97)
 {
 	unsigned int codec72, codec6c;
@@ -467,11 +488,11 @@
 	int shift = kcontrol->private_value;
 	unsigned short val;
 
-	val = ac97->regs[AC97_SIGMATEL_OUTSEL];
-	if (!((val >> shift) & 4))
+	val = ac97->regs[AC97_SIGMATEL_OUTSEL] >> shift;
+	if (!(val & 4))
 		ucontrol->value.enumerated.item[0] = 0;
 	else
-		ucontrol->value.enumerated.item[0] = 1 + ((val >> shift) & 3);
+		ucontrol->value.enumerated.item[0] = 1 + (val & 3);
 	return 0;
 }
 
@@ -480,6 +501,7 @@
 	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
 	int shift = kcontrol->private_value;
 	unsigned short val;
+	int ret;
 
 	if (ucontrol->value.enumerated.item[0] > 4)
 		return -EINVAL;
@@ -487,8 +509,10 @@
 		val = 0;
 	else
 		val = 4 | (ucontrol->value.enumerated.item[0] - 1);
-	return snd_ac97_update_bits(ac97, AC97_SIGMATEL_OUTSEL,
-				    7 << shift, val << shift);
+	ret = snd_ac97_update_bits(ac97, AC97_SIGMATEL_OUTSEL,
+				   7 << shift, val << shift);
+	up(&ac97->mutex);
+	return ret;
 }
 
 static int snd_ac97_stac9758_input_jack_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
@@ -521,8 +545,8 @@
 	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
 	int shift = kcontrol->private_value;
 
-	return snd_ac97_update_bits(ac97, AC97_SIGMATEL_INSEL, 7 << shift,
-				    ucontrol->value.enumerated.item[0] << shift);
+	return ac97_update_bits_page(ac97, AC97_SIGMATEL_INSEL, 7 << shift,
+				     ucontrol->value.enumerated.item[0] << shift, 0);
 }
 
 static int snd_ac97_stac9758_phonesel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
@@ -550,8 +574,8 @@
 {
 	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
 
-	return snd_ac97_update_bits(ac97, AC97_SIGMATEL_IOMISC, 3,
-				    ucontrol->value.enumerated.item[0]);
+	return ac97_update_bits_page(ac97, AC97_SIGMATEL_IOMISC, 3,
+				     ucontrol->value.enumerated.item[0], 0);
 }
 
 #define STAC9758_OUTPUT_JACK(xname, shift) \
@@ -596,6 +620,14 @@
 				   ARRAY_SIZE(snd_ac97_sigmatel_stac9758_controls));
 	if (err < 0)
 		return err;
+	/* DAC-A direct */
+	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Front Playback");
+	/* DAC-A to Mix = PCM */
+	/* DAC-B direct = Surround */
+	/* DAC-B to Mix */
+	snd_ac97_rename_vol_ctl(ac97, "Video Playback", "Surround Mix Playback");
+	/* DAC-C direct = Center/LFE */
+
 	return 0;
 }
 
@@ -613,16 +645,16 @@
 		AC97_SIGMATEL_VARIOUS
 	};
 	static unsigned short def_regs[4] = {
-		/* OUTSEL */ 0xd794,
+		/* OUTSEL */ 0xd794, /* CL:CL, SR:SR, LO:MX, LI:DS, MI:DS */
 		/* IOMISC */ 0x2001,
-		/* INSEL */ 0x0201,
+		/* INSEL */ 0x0201, /* LI:LI, MI:M1 */
 		/* VARIOUS */ 0x0040
 	};
 	static unsigned short m675_regs[4] = {
-		/* OUTSEL */ 0x9040,
-		/* IOMISC */ 0x2102,
-		/* INSEL */ 0x0203,
-		/* VARIOUS */ 0x0041
+		/* OUTSEL */ 0xfc70, /* CL:MX, SR:MX, LO:DS, LI:MX, MI:DS */
+		/* IOMISC */ 0x2102, /* HP amp on */
+		/* INSEL */ 0x0203, /* LI:LI, MI:FR */
+		/* VARIOUS */ 0x0041 /* stereo mic */
 	};
 	unsigned short *pregs = def_regs;
 	int i;
@@ -635,6 +667,8 @@
 
 	// patch for SigmaTel
 	ac97->build_ops = &patch_sigmatel_stac9758_ops;
+	/* FIXME: assume only page 0 for writing cache */
+	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, AC97_PAGE_VENDOR);
 	for (i = 0; i < 4; i++)
 		snd_ac97_write_cache(ac97, regs[i], pregs[i]);
 
@@ -654,8 +688,10 @@
 {
 	int err;
 
+	/* con mask, pro mask, default */
 	if ((err = patch_build_controls(ac97, &snd_ac97_controls_spdif[0], 3)) < 0)
 		return err;
+	/* switch, spsa */
 	if ((err = patch_build_controls(ac97, &snd_ac97_cirrus_controls_spdif[0], 1)) < 0)
 		return err;
 	switch (ac97->id & AC97_ID_CS_MASK) {
@@ -714,8 +750,10 @@
 {
 	int err;
 
+	/* con mask, pro mask, default */
 	if ((err = patch_build_controls(ac97, &snd_ac97_controls_spdif[0], 3)) < 0)
 		return err;
+	/* switch */
 	if ((err = patch_build_controls(ac97, &snd_ac97_conexant_controls_spdif[0], 1)) < 0)
 		return err;
 	/* set default PCM S/PDIF params */
@@ -734,6 +772,7 @@
 	ac97->build_ops = &patch_conexant_ops;
 	ac97->flags |= AC97_CX_SPDIF;
         ac97->ext_id |= AC97_EI_SPDIF;	/* force the detection of spdif */
+	ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
 	return 0;
 }
 
@@ -821,8 +860,6 @@
 	unsigned short val;
 	int idx, num;
 
-	init_MUTEX(&ac97->spec.ad18xx.mutex);
-
 	val = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG);
 	snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, val);
 	codecs[0] = patch_ad1881_unchained(ac97, 0, (1<<12));
@@ -1114,10 +1151,8 @@
 static int patch_ad1888_specific(ac97_t *ac97)
 {
 	/* rename 0x04 as "Master" and 0x02 as "Master Surround" */
-	snd_ac97_rename_ctl(ac97, "Master Playback Switch", "Master Surround Playback Switch");
-	snd_ac97_rename_ctl(ac97, "Master Playback Volume", "Master Surround Playback Volume");
-	snd_ac97_rename_ctl(ac97, "Headphone Playback Switch", "Master Playback Switch");
-	snd_ac97_rename_ctl(ac97, "Headphone Playback Volume", "Master Playback Volume");
+	snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Master Surround Playback");
+	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback");
 	return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls));
 }
 
@@ -1213,7 +1248,7 @@
 }
 
 /*
- * realtek ALC65x codecs
+ * realtek ALC65x/850 codecs
  */
 static int snd_ac97_alc650_mic_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
@@ -1303,6 +1338,17 @@
 
 	ac97->build_ops = &patch_alc650_ops;
 
+	/* determine the revision */
+	val = snd_ac97_read(ac97, AC97_ALC650_REVISION) & 0x3f;
+	if (val < 3)
+		ac97->id = 0x414c4720;          /* Old version */
+	else if (val < 0x10)
+		ac97->id = 0x414c4721;          /* D version */
+	else if (val < 0x20)
+		ac97->id = 0x414c4722;          /* E version */
+	else if (val < 0x30)
+		ac97->id = 0x414c4723;          /* F version */
+
 	/* revision E or F */
 	/* FIXME: what about revision D ? */
 	ac97->spec.dev_flags = (ac97->id == 0x414c4722 ||
@@ -1351,20 +1397,19 @@
 static int snd_ac97_alc655_mic_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
         ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
-        int change;
 
 	/* misc control; vrefout disable */
 	snd_ac97_update_bits(ac97, AC97_ALC650_CLOCK, 1 << 12,
 			     ucontrol->value.integer.value[0] ? (1 << 12) : 0);
-	change = snd_ac97_update_bits(ac97, AC97_ALC650_MULTICH, 1 << 10,
-				      ucontrol->value.integer.value[0] ? (1 << 10) : 0);
-	return change;
+	return ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 1 << 10,
+				     ucontrol->value.integer.value[0] ? (1 << 10) : 0,
+				     0);
 }
 
 
 static const snd_kcontrol_new_t snd_ac97_controls_alc655[] = {
-	AC97_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0),
-	AC97_SINGLE("Line-In As Surround", AC97_ALC650_MULTICH, 9, 1, 0),
+	AC97_PAGE_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0, 0),
+	AC97_PAGE_SINGLE("Line-In As Surround", AC97_ALC650_MULTICH, 9, 1, 0, 0),
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Mic As Center/LFE",
@@ -1391,7 +1436,6 @@
 	       texts_658[uinfo->value.enumerated.item] :
 	       texts_655[uinfo->value.enumerated.item]);
 	return 0;
-
 }
 
 static int alc655_iec958_route_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
@@ -1410,13 +1454,15 @@
 static int alc655_iec958_route_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
 {
 	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
-	return snd_ac97_update_bits(ac97, AC97_ALC650_MULTICH, 3 << 12,
-				    (unsigned short)ucontrol->value.enumerated.item[0]);
+
+	return ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 3 << 12,
+				     (unsigned short)ucontrol->value.enumerated.item[0],
+				     0);
 }
 
 static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc655[] = {
-        AC97_SINGLE("IEC958 Capture Switch", AC97_ALC650_MULTICH, 11, 1, 0),
-        AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 14, 1, 0),
+        AC97_PAGE_SINGLE("IEC958 Capture Switch", AC97_ALC650_MULTICH, 11, 1, 0, 0),
+        AC97_PAGE_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 14, 1, 0, 0),
 	{
 		.iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name   = "IEC958 Playback Route",
@@ -1451,6 +1497,9 @@
 
 	ac97->build_ops = &patch_alc655_ops;
 
+	/* assume only page 0 for writing cache */
+	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, AC97_PAGE_VENDOR);
+
 	/* adjust default values */
 	val = snd_ac97_read(ac97, 0x7a); /* misc control */
 	val |= (1 << 1); /* spdif input pin */
@@ -1469,6 +1518,120 @@
 	return 0;
 }
 
+
+#define AC97_ALC850_JACK_SELECT	0x76
+#define AC97_ALC850_MISC1	0x7a
+
+static int ac97_alc850_surround_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
+{
+        ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+        ucontrol->value.integer.value[0] = ((ac97->regs[AC97_ALC850_JACK_SELECT] >> 12) & 7) == 2;
+        return 0;
+}
+
+static int ac97_alc850_surround_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
+{
+        ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+
+	/* SURR 1kOhm (bit4), Amp (bit5) */
+	snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<4)|(1<<5),
+			     ucontrol->value.integer.value[0] ? (1<<5) : (1<<4));
+	/* LINE-IN = 0, SURROUND = 2 */
+	return snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 12,
+				    ucontrol->value.integer.value[0] ? (2<<12) : (0<<12));
+}
+
+static int ac97_alc850_mic_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
+{
+        ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+        ucontrol->value.integer.value[0] = ((ac97->regs[AC97_ALC850_JACK_SELECT] >> 4) & 7) == 2;
+        return 0;
+}
+
+static int ac97_alc850_mic_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
+{
+        ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+
+	/* Vref disable (bit12), 1kOhm (bit13) */
+	snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13),
+			     ucontrol->value.integer.value[0] ? (1<<12) : (1<<13));
+	/* MIC-IN = 1, CENTER-LFE = 2 */
+	return snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4,
+				    ucontrol->value.integer.value[0] ? (2<<4) : (1<<4));
+}
+
+static const snd_kcontrol_new_t snd_ac97_controls_alc850[] = {
+	AC97_PAGE_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0, 0),
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = "Line-In As Surround",
+		.info = snd_ac97_info_single,
+		.get = ac97_alc850_surround_get,
+		.put = ac97_alc850_surround_put,
+		.private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
+	},
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = "Mic As Center/LFE",
+		.info = snd_ac97_info_single,
+		.get = ac97_alc850_mic_get,
+		.put = ac97_alc850_mic_put,
+		.private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
+	},
+
+};
+
+static int patch_alc850_specific(ac97_t *ac97)
+{
+	int err;
+
+	if ((err = patch_build_controls(ac97, snd_ac97_controls_alc850, ARRAY_SIZE(snd_ac97_controls_alc850))) < 0)
+		return err;
+	if (ac97->ext_id & AC97_EI_SPDIF) {
+		if ((err = patch_build_controls(ac97, snd_ac97_spdif_controls_alc655, ARRAY_SIZE(snd_ac97_spdif_controls_alc655))) < 0)
+			return err;
+	}
+	return 0;
+}
+
+static struct snd_ac97_build_ops patch_alc850_ops = {
+	.build_specific	= patch_alc850_specific
+};
+
+int patch_alc850(ac97_t *ac97)
+{
+	ac97->build_ops = &patch_alc850_ops;
+
+	ac97->spec.dev_flags = 0; /* for IEC958 playback route - ALC655 compatible */
+
+	/* assume only page 0 for writing cache */
+	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, AC97_PAGE_VENDOR);
+
+	/* adjust default values */
+	/* set default: spdif-in enabled,
+	   spdif-in monitor off, spdif-in PCM off
+	   center on mic off, surround on line-in off
+	   duplicate front off
+	*/
+	snd_ac97_write_cache(ac97, AC97_ALC650_MULTICH, 1<<15);
+	/* SURR_OUT: on, Surr 1kOhm: on, Surr Amp: off, Front 1kOhm: off
+	 * Front Amp: on, Vref: enable, Center 1kOhm: on, Mix: on
+	 */
+	snd_ac97_write_cache(ac97, 0x7a, (1<<1)|(1<<4)|(0<<5)|(1<<6)|
+			     (1<<7)|(0<<12)|(1<<13)|(0<<14));
+	/* detection UIO2,3: all path floating, UIO3: MIC, Vref2: disable,
+	 * UIO1: FRONT, Vref3: disable, UIO3: LINE, Front-Mic: mute
+	 */
+	snd_ac97_write_cache(ac97, 0x76, (0<<0)|(0<<2)|(1<<4)|(1<<7)|(2<<8)|
+			     (1<<11)|(0<<12)|(1<<15));
+
+	/* full DAC volume */
+	snd_ac97_write_cache(ac97, AC97_ALC650_SURR_DAC_VOL, 0x0808);
+	snd_ac97_write_cache(ac97, AC97_ALC650_LFE_DAC_VOL, 0x0808);
+	return 0;
+}
+
+
 /*
  * C-Media CM97xx codecs
  */
@@ -1599,8 +1762,10 @@
 		/* enable spdif in */
 		snd_ac97_write_cache(ac97, AC97_CM9739_SPDIF_CTRL,
 				     snd_ac97_read(ac97, AC97_CM9739_SPDIF_CTRL) | 0x01);
+		ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
 	} else {
 		ac97->ext_id &= ~AC97_EI_SPDIF; /* disable extended-id */
+		ac97->rates[AC97_RATES_SPDIF] = 0;
 	}
 
 	/* set-up multi channel */
--- diff/sound/pci/ac97/ac97_patch.h	2004-05-19 22:13:24.000000000 +0100
+++ source/sound/pci/ac97/ac97_patch.h	2004-07-01 21:32:54.000000000 +0100
@@ -49,6 +49,7 @@
 int patch_ad1985(ac97_t * ac97);
 int patch_alc650(ac97_t * ac97);
 int patch_alc655(ac97_t * ac97);
+int patch_alc850(ac97_t * ac97);
 int patch_cm9738(ac97_t * ac97);
 int patch_cm9739(ac97_t * ac97);
 int patch_vt1616(ac97_t * ac97);
--- diff/sound/pci/ac97/ac97_proc.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/pci/ac97/ac97_proc.c	2004-07-01 21:32:54.000000000 +0100
@@ -292,9 +292,9 @@
 {
 	ac97_t *ac97 = snd_magic_cast(ac97_t, entry->private_data, return);
 	
+	down(&ac97->mutex);
 	if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) {	// Analog Devices AD1881/85/86
 		int idx;
-		down(&ac97->spec.ad18xx.mutex);
 		for (idx = 0; idx < 3; idx++)
 			if (ac97->spec.ad18xx.id[idx]) {
 				/* select single codec */
@@ -305,7 +305,6 @@
 			}
 		/* select all codecs */
 		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
-		up(&ac97->spec.ad18xx.mutex);
 		
 		snd_iprintf(buffer, "\nAD18XX configuration\n");
 		snd_iprintf(buffer, "Unchained        : 0x%04x,0x%04x,0x%04x\n",
@@ -319,6 +318,7 @@
 	} else {
 		snd_ac97_proc_read_main(ac97, buffer, 0);
 	}
+	up(&ac97->mutex);
 }
 
 #ifdef CONFIG_SND_DEBUG
@@ -328,6 +328,7 @@
 	ac97_t *ac97 = snd_magic_cast(ac97_t, entry->private_data, return);
 	char line[64];
 	unsigned int reg, val;
+	down(&ac97->mutex);
 	while (!snd_info_get_line(buffer, line, sizeof(line))) {
 		if (sscanf(line, "%x %x", &reg, &val) != 2)
 			continue;
@@ -335,6 +336,7 @@
 		if (reg < 0x80 && (reg & 1) == 0 && val <= 0xffff)
 			snd_ac97_write_cache(ac97, reg, val);
 	}
+	up(&ac97->mutex);
 }
 #endif
 
@@ -353,10 +355,10 @@
 {
 	ac97_t *ac97 = snd_magic_cast(ac97_t, entry->private_data, return);
 
+	down(&ac97->mutex);
 	if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) {	// Analog Devices AD1881/85/86
 
 		int idx;
-		down(&ac97->spec.ad18xx.mutex);
 		for (idx = 0; idx < 3; idx++)
 			if (ac97->spec.ad18xx.id[idx]) {
 				/* select single codec */
@@ -366,10 +368,10 @@
 			}
 		/* select all codecs */
 		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
-		up(&ac97->spec.ad18xx.mutex);
 	} else {
 		snd_ac97_proc_regs_read_main(ac97, buffer, 0);
 	}	
+	up(&ac97->mutex);
 }
 
 void snd_ac97_proc_init(ac97_t * ac97)
--- diff/sound/pci/atiixp.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/pci/atiixp.c	2004-07-01 21:32:54.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- *   ALSA driver for ATI IXP 150/200/250 AC97 controllers
+ *   ALSA driver for ATI IXP 150/200/250/300 AC97 controllers
  *
  *	Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
  *
@@ -996,6 +996,7 @@
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_MMAP_VALID),
 	.formats =		SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
 	.rates =		SNDRV_PCM_RATE_48000,
@@ -1387,17 +1388,9 @@
 		ac97.num = i;
 		ac97.scaps = AC97_SCAP_SKIP_MODEM;
 		if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) {
-			if (chip->codec_not_ready_bits)
-				/* codec(s) was detected but not available.
-				 * return the error
-				 */
-				return err;
-			else {
-				/* codec(s) was NOT detected, so just ignore here */
-				chip->ac97[i] = NULL; /* to be sure */
-				snd_printd("atiixp: codec %d not found\n", i);
-				continue;
-			}
+			chip->ac97[i] = NULL; /* to be sure */
+			snd_printdd("atiixp: codec %d not available for audio\n", i);
+			continue;
 		}
 		codec_count++;
 	}
--- diff/sound/pci/au88x0/au88x0_a3d.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/pci/au88x0/au88x0_a3d.c	2004-07-01 21:32:54.000000000 +0100
@@ -864,7 +864,7 @@
 		if ((kcontrol =
 		     snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
 			return -ENOMEM;
-		kcontrol->private_value = (int)&(vortex->a3d[i]);
+		kcontrol->private_value = (long)&(vortex->a3d[i]);
 		kcontrol->id.numid = CTRLID_HRTF;
 		kcontrol->info = snd_vortex_a3d_hrtf_info;
 		kcontrol->put = snd_vortex_a3d_hrtf_put;
@@ -876,7 +876,7 @@
 		if ((kcontrol =
 		     snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
 			return -ENOMEM;
-		kcontrol->private_value = (int)&(vortex->a3d[i]);
+		kcontrol->private_value = (long)&(vortex->a3d[i]);
 		kcontrol->id.numid = CTRLID_ITD;
 		kcontrol->info = snd_vortex_a3d_itd_info;
 		kcontrol->put = snd_vortex_a3d_itd_put;
@@ -888,7 +888,7 @@
 		if ((kcontrol =
 		     snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
 			return -ENOMEM;
-		kcontrol->private_value = (int)&(vortex->a3d[i]);
+		kcontrol->private_value = (long)&(vortex->a3d[i]);
 		kcontrol->id.numid = CTRLID_GAINS;
 		kcontrol->info = snd_vortex_a3d_ild_info;
 		kcontrol->put = snd_vortex_a3d_ild_put;
@@ -900,7 +900,7 @@
 		if ((kcontrol =
 		     snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
 			return -ENOMEM;
-		kcontrol->private_value = (int)&(vortex->a3d[i]);
+		kcontrol->private_value = (long)&(vortex->a3d[i]);
 		kcontrol->id.numid = CTRLID_FILTER;
 		kcontrol->info = snd_vortex_a3d_filter_info;
 		kcontrol->put = snd_vortex_a3d_filter_put;
--- diff/sound/pci/cmipci.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/pci/cmipci.c	2004-07-01 21:32:54.000000000 +0100
@@ -1072,30 +1072,36 @@
  */
 
 /* save mixer setting and mute for AC3 playback */
-static void save_mixer_state(cmipci_t *cm)
+static int save_mixer_state(cmipci_t *cm)
 {
 	if (! cm->mixer_insensitive) {
+		snd_ctl_elem_value_t *val;
 		unsigned int i;
+
+		val = kmalloc(sizeof(*val), GFP_ATOMIC);
+		if (!val)
+			return -ENOMEM;
 		for (i = 0; i < CM_SAVED_MIXERS; i++) {
 			snd_kcontrol_t *ctl = cm->mixer_res_ctl[i];
 			if (ctl) {
-				snd_ctl_elem_value_t val;
 				int event;
-				memset(&val, 0, sizeof(val));
-				ctl->get(ctl, &val);
-				cm->mixer_res_status[i] = val.value.integer.value[0];
-				val.value.integer.value[0] = cm_saved_mixer[i].toggle_on;
+				memset(val, 0, sizeof(*val));
+				ctl->get(ctl, val);
+				cm->mixer_res_status[i] = val->value.integer.value[0];
+				val->value.integer.value[0] = cm_saved_mixer[i].toggle_on;
 				event = SNDRV_CTL_EVENT_MASK_INFO;
-				if (cm->mixer_res_status[i] != val.value.integer.value[0]) {
-					ctl->put(ctl, &val); /* toggle */
+				if (cm->mixer_res_status[i] != val->value.integer.value[0]) {
+					ctl->put(ctl, val); /* toggle */
 					event |= SNDRV_CTL_EVENT_MASK_VALUE;
 				}
 				ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE;
 				snd_ctl_notify(cm->card, event, &ctl->id);
 			}
 		}
+		kfree(val);
 		cm->mixer_insensitive = 1;
 	}
+	return 0;
 }
 
 
@@ -1103,27 +1109,32 @@
 static void restore_mixer_state(cmipci_t *cm)
 {
 	if (cm->mixer_insensitive) {
+		snd_ctl_elem_value_t *val;
 		unsigned int i;
+
+		val = kmalloc(sizeof(*val), GFP_KERNEL);
+		if (!val)
+			return;
 		cm->mixer_insensitive = 0; /* at first clear this;
 					      otherwise the changes will be ignored */
 		for (i = 0; i < CM_SAVED_MIXERS; i++) {
 			snd_kcontrol_t *ctl = cm->mixer_res_ctl[i];
 			if (ctl) {
-				snd_ctl_elem_value_t val;
 				int event;
 
-				memset(&val, 0, sizeof(val));
+				memset(val, 0, sizeof(*val));
 				ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
-				ctl->get(ctl, &val);
+				ctl->get(ctl, val);
 				event = SNDRV_CTL_EVENT_MASK_INFO;
-				if (val.value.integer.value[0] != cm->mixer_res_status[i]) {
-					val.value.integer.value[0] = cm->mixer_res_status[i];
-					ctl->put(ctl, &val);
+				if (val->value.integer.value[0] != cm->mixer_res_status[i]) {
+					val->value.integer.value[0] = cm->mixer_res_status[i];
+					ctl->put(ctl, val);
 					event |= SNDRV_CTL_EVENT_MASK_VALUE;
 				}
 				snd_ctl_notify(cm->card, event, &ctl->id);
 			}
 		}
+		kfree(val);
 	}
 }
 
@@ -1175,15 +1186,16 @@
 	}
 }
 
-static void setup_spdif_playback(cmipci_t *cm, snd_pcm_substream_t *subs, int up, int do_ac3)
+static int setup_spdif_playback(cmipci_t *cm, snd_pcm_substream_t *subs, int up, int do_ac3)
 {
-	int rate;
+	int rate, err;
 	unsigned long flags;
 
 	rate = subs->runtime->rate;
 
 	if (up && do_ac3)
-		save_mixer_state(cm);
+		if ((err = save_mixer_state(cm)) < 0)
+			return err;
 
 	spin_lock_irqsave(&cm->reg_lock, flags);
 	cm->spdif_playback_avail = up;
@@ -1208,6 +1220,7 @@
 		setup_ac3(cm, subs, 0, 0);
 	}
 	spin_unlock_irqrestore(&cm->reg_lock, flags);
+	return 0;
 }
 
 
@@ -1220,13 +1233,15 @@
 {
 	cmipci_t *cm = snd_pcm_substream_chip(substream);
 	int rate = substream->runtime->rate;
-	int do_spdif, do_ac3 = 0;
+	int err, do_spdif, do_ac3 = 0;
+
 	do_spdif = ((rate == 44100 || rate == 48000) &&
 		    substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE &&
 		    substream->runtime->channels == 2);
 	if (do_spdif && cm->can_ac3_hw) 
 		do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO;
-	setup_spdif_playback(cm, substream, do_spdif, do_ac3);
+	if ((err = setup_spdif_playback(cm, substream, do_spdif, do_ac3)) < 0)
+		return err;
 	return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream);
 }
 
@@ -1234,12 +1249,14 @@
 static int snd_cmipci_playback_spdif_prepare(snd_pcm_substream_t *substream)
 {
 	cmipci_t *cm = snd_pcm_substream_chip(substream);
-	int do_ac3;
+	int err, do_ac3;
+
 	if (cm->can_ac3_hw) 
 		do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO;
 	else
 		do_ac3 = 1; /* doesn't matter */
-	setup_spdif_playback(cm, substream, 1, do_ac3);
+	if ((err = setup_spdif_playback(cm, substream, 1, do_ac3)) < 0)
+		return err;
 	return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream);
 }
 
--- diff/sound/pci/cs46xx/dsp_spos.c	2004-05-19 22:13:24.000000000 +0100
+++ source/sound/pci/cs46xx/dsp_spos.c	2004-07-01 21:32:54.000000000 +0100
@@ -1057,7 +1057,7 @@
 	
 	int fifo_addr,fifo_span,valid_slots;
 
-	spos_control_block_t sposcb = {
+	static spos_control_block_t sposcb = {
 		/* 0 */ HFG_TREE_SCB,HFG_STACK,
 		/* 1 */ SPOSCB_ADDR,BG_TREE_SCB_ADDR,
 		/* 2 */ DSP_SPOS_DC,0,
@@ -1110,18 +1110,18 @@
   
 	{
 		/* create the null SCB */
-		generic_scb_t null_scb = {
+		static generic_scb_t null_scb = {
 			{ 0, 0, 0, 0 },
 			{ 0, 0, 0, 0, 0 },
 			NULL_SCB_ADDR, NULL_SCB_ADDR,
-			null_algorithm->address, 0,
-			0,0,0,
+			0, 0, 0, 0, 0,
 			{
 				0,0,
 				0,0,
 			}
 		};
 
+		null_scb.entry_point = null_algorithm->address;
 		ins->the_null_scb = cs46xx_dsp_create_scb(chip, "nullSCB", (u32 *)&null_scb, NULL_SCB_ADDR);
 		ins->the_null_scb->task_entry = null_algorithm;
 		ins->the_null_scb->sub_list_ptr = ins->the_null_scb;
@@ -1132,7 +1132,7 @@
 
 	{
 		/* setup foreground task tree */
-		task_tree_control_block_t fg_task_tree_hdr =  {
+		static task_tree_control_block_t fg_task_tree_hdr =  {
 			{ FG_TASK_HEADER_ADDR | (DSP_SPOS_DC << 0x10),
 			  DSP_SPOS_DC_DC,
 			  DSP_SPOS_DC_DC,
@@ -1145,7 +1145,7 @@
     
 			{
 				BG_TREE_SCB_ADDR,TIMINGMASTER_SCB_ADDR, 
-				fg_task_tree_header_code->address,
+				0,
 				FG_TASK_HEADER_ADDR + TCBData,                  
 			},
 
@@ -1158,7 +1158,7 @@
 			},
 
 			{
-				DSP_SPOS_DC,task_tree_thread->address,
+				DSP_SPOS_DC,0,
 				DSP_SPOS_DC,DSP_SPOS_DC,
 				DSP_SPOS_DC,DSP_SPOS_DC,
 				DSP_SPOS_DC,DSP_SPOS_DC,
@@ -1200,13 +1200,15 @@
 			}
 		};
 
+		fg_task_tree_hdr.links.entry_point = fg_task_tree_header_code->address;
+		fg_task_tree_hdr.context_blk.stack0 = task_tree_thread->address;
 		cs46xx_dsp_create_task_tree(chip,"FGtaskTreeHdr",(u32 *)&fg_task_tree_hdr,FG_TASK_HEADER_ADDR,0x35);
 	}
 
 
 	{
 		/* setup foreground task tree */
-		task_tree_control_block_t bg_task_tree_hdr =  {
+		static task_tree_control_block_t bg_task_tree_hdr =  {
 			{ DSP_SPOS_DC_DC,
 			  DSP_SPOS_DC_DC,
 			  DSP_SPOS_DC_DC,
@@ -1219,7 +1221,7 @@
     
 			{
 				NULL_SCB_ADDR,NULL_SCB_ADDR,  /* Set up the background to do nothing */
-				task_tree_header_code->address,
+				0,
 				BG_TREE_SCB_ADDR + TCBData,
 			},
 
@@ -1232,7 +1234,7 @@
 			},
 
 			{
-				DSP_SPOS_DC,task_tree_thread->address,
+				DSP_SPOS_DC,0,
 				DSP_SPOS_DC,DSP_SPOS_DC,
 				DSP_SPOS_DC,DSP_SPOS_DC,
 				DSP_SPOS_DC,DSP_SPOS_DC,
@@ -1273,6 +1275,9 @@
 				0,0
 			}
 		};
+
+		bg_task_tree_hdr.links.entry_point = task_tree_header_code->address;
+		bg_task_tree_hdr.context_blk.stack0 = task_tree_thread->address;
 		cs46xx_dsp_create_task_tree(chip,"BGtaskTreeHdr",(u32 *)&bg_task_tree_hdr,BG_TREE_SCB_ADDR,0x35);
 	}
 
@@ -1312,7 +1317,7 @@
 	if (!write_back_scb) goto _fail_end;
 
 	{
-		mix2_ostream_spb_t mix2_ostream_spb = {
+		static mix2_ostream_spb_t mix2_ostream_spb = {
 			0x00020000,
 			0x0000ffff
 		};
--- diff/sound/pci/cs46xx/dsp_spos_scb_lib.c	2004-05-19 22:13:24.000000000 +0100
+++ source/sound/pci/cs46xx/dsp_spos_scb_lib.c	2004-07-01 21:32:54.000000000 +0100
@@ -246,6 +246,12 @@
 		if ((entry = snd_info_create_card_entry(ins->snd_card, scb->scb_name, 
 							ins->proc_dsp_dir)) != NULL) {
 			scb_info = kmalloc(sizeof(proc_scb_info_t), GFP_KERNEL);
+			if (!scb_info) {
+				snd_info_free_entry(entry);
+				entry = NULL;
+				goto out;
+			}
+
 			scb_info->chip = chip;
 			scb_info->scb_desc = scb;
       
@@ -262,7 +268,7 @@
 				entry = NULL;
 			}
 		}
-
+out:
 		scb->proc_info = entry;
 	}
 }
--- diff/sound/pci/emu10k1/emu10k1.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/pci/emu10k1/emu10k1.c	2004-07-01 21:32:54.000000000 +0100
@@ -134,10 +134,6 @@
 		snd_card_free(card);
 		return err;
 	}		
-	if ((err = snd_emu10k1_fx8010_pcm(emu, 3, NULL)) < 0) {
-		snd_card_free(card);
-		return err;
-	}		
 	if ((err = snd_emu10k1_mixer(emu)) < 0) {
 		snd_card_free(card);
 		return err;
--- diff/sound/pci/emu10k1/emufx.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/pci/emu10k1/emufx.c	2004-07-01 21:32:54.000000000 +0100
@@ -405,7 +405,7 @@
 	}
 }
 
-static int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu,
+int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu,
 						   snd_fx8010_irq_handler_t *handler,
 						   unsigned char gpr_running,
 						   void *private_data,
@@ -438,7 +438,7 @@
 	return 0;
 }
 
-static int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
+int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
 						     snd_emu10k1_fx8010_irq_t *irq)
 {
 	snd_emu10k1_fx8010_irq_t *tmp;
@@ -463,312 +463,6 @@
 	return 0;
 }
 
-/*
- *   PCM streams
- */
-
-#define INITIAL_TRAM_SHIFT     14
-#define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1)
-
-static void snd_emu10k1_fx8010_playback_irq(emu10k1_t *emu, void *private_data)
-{
-	snd_pcm_substream_t *substream = snd_magic_cast(snd_pcm_substream_t, private_data, return);
-	snd_pcm_period_elapsed(substream);
-}
-
-static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left,
-						   unsigned short *dst_right,
-						   unsigned short *src,
-						   unsigned int count,
-						   unsigned int tram_shift)
-{
-	// printk("tram_poke1: dst_left = 0x%p, dst_right = 0x%p, src = 0x%p, count = 0x%x\n", dst_left, dst_right, src, count);
-	if ((tram_shift & 1) == 0) {
-		while (count--) {
-			*dst_left-- = *src++;
-			*dst_right-- = *src++;
-		}
-	} else {
-		while (count--) {
-			*dst_right-- = *src++;
-			*dst_left-- = *src++;
-		}
-	}
-}
-
-static void snd_emu10k1_fx8010_playback_tram_poke(emu10k1_t *emu,
-						  unsigned int *tram_pos,
-						  unsigned int *tram_shift,
-						  unsigned int tram_size,
-						  unsigned short *src,
-						  unsigned int frames)
-{
-	unsigned int count;
-
-	while (frames > *tram_pos) {
-		count = *tram_pos + 1;
-		snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + *tram_pos,
-						       (unsigned short *)emu->fx8010.etram_pages.area + *tram_pos + tram_size / 2,
-						       src, count, *tram_shift);
-		src += count * 2;
-		frames -= count;
-		*tram_pos = (tram_size / 2) - 1;
-		(*tram_shift)++;
-	}
-	snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + *tram_pos,
-					       (unsigned short *)emu->fx8010.etram_pages.area + *tram_pos + tram_size / 2,
-					       src, frames, *tram_shift++);
-	*tram_pos -= frames;
-}
-
-static int snd_emu10k1_fx8010_playback_transfer(snd_pcm_substream_t *substream)
-{
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
-	snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr;
-	snd_pcm_sframes_t diff = appl_ptr - pcm->appl_ptr;
-	snd_pcm_uframes_t buffer_size = pcm->buffer_size / 2;
-
-	if (diff) {
-		if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2))
-			diff += runtime->boundary;
-		pcm->sw_ready += diff;
-		pcm->appl_ptr = appl_ptr;
-	}
-	while (pcm->hw_ready < buffer_size &&
-	       pcm->sw_ready > 0) {
-	       	size_t hw_to_end = buffer_size - pcm->hw_data;
-	       	size_t sw_to_end = (runtime->buffer_size << 2) - pcm->sw_data;
-	       	size_t tframes = buffer_size - pcm->hw_ready;
-	       	if (pcm->sw_ready < tframes)
-	       		tframes = pcm->sw_ready;
-	       	if (hw_to_end < tframes)
-	       		tframes = hw_to_end;
-	       	if (sw_to_end < tframes)
-	       		tframes = sw_to_end;
-	       	snd_emu10k1_fx8010_playback_tram_poke(emu, &pcm->tram_pos, &pcm->tram_shift,
-	       					      pcm->buffer_size,
-	       					      (unsigned short *)(runtime->dma_area + (pcm->sw_data << 2)),
-	       					      tframes);
-		pcm->hw_data += tframes;
-		if (pcm->hw_data == buffer_size)
-			pcm->hw_data = 0;
-		pcm->sw_data += tframes;
-		if (pcm->sw_data == runtime->buffer_size)
-			pcm->sw_data = 0;
-		pcm->hw_ready += tframes;
-		pcm->sw_ready -= tframes;
-	}
-	return 0;
-}
-
-static int snd_emu10k1_fx8010_playback_hw_params(snd_pcm_substream_t * substream,
-						 snd_pcm_hw_params_t * hw_params)
-{
-	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
-}
-
-static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream)
-{
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
-	unsigned int i;
-
-	for (i = 0; i < pcm->channels; i++)
-		snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0);
-	snd_pcm_lib_free_pages(substream);
-	return 0;
-}
-
-static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream)
-{
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
-	unsigned int i;
-	
-	// printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2);
-	pcm->sw_data = pcm->sw_io = pcm->sw_ready = 0;
-	pcm->hw_data = pcm->hw_io = pcm->hw_ready = 0;
-	pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size);
-	pcm->tram_shift = 0;
-	pcm->appl_ptr = 0;
-	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_running, 0, 0);	/* reset */
-	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0);	/* reset */
-	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size);
-	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_ptr, 0, 0);		/* reset ptr number */
-	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size);
-	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size);
-	for (i = 0; i < pcm->channels; i++)
-		snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pcm->channels));
-	return 0;
-}
-
-static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream, int cmd)
-{
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
-	unsigned long flags;
-	int result = 0;
-
-	spin_lock_irqsave(&emu->reg_lock, flags);
-	switch (cmd) {
-	case SNDRV_PCM_TRIGGER_START:
-		/* follow thru */
-	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
-#ifdef EMU10K1_SET_AC3_IEC958
-	{
-		int i;
-		for (i = 0; i < 3; i++) {
-			unsigned int bits;
-			bits = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
-			       SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS |
-			       0x00001200 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT | SPCS_NOTAUDIODATA;
-			snd_emu10k1_ptr_write(emu, SPCS0 + i, 0, bits);
-		}
-	}
-#endif
-		result = snd_emu10k1_fx8010_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq);
-		if (result < 0)
-			goto __err;
-		snd_emu10k1_fx8010_playback_transfer(substream);	/* roll the ball */
-		snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1);
-		break;
-	case SNDRV_PCM_TRIGGER_STOP:
-	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
-		snd_emu10k1_fx8010_unregister_irq_handler(emu, pcm->irq); pcm->irq = NULL;
-		snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0);
-		pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size);
-		pcm->tram_shift = 0;
-		break;
-	default:
-		result = -EINVAL;
-		break;
-	}
-      __err:
-	spin_unlock_irqrestore(&emu->reg_lock, flags);
-	return result;
-}
-
-static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t * substream)
-{
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
-	size_t ptr;
-	snd_pcm_sframes_t frames;
-
-	if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0))
-		return 0;
-	ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0);
-	frames = ptr - pcm->hw_io;
-	if (frames < 0)
-		frames += runtime->buffer_size;
-	pcm->hw_io = ptr;
-	pcm->hw_ready -= frames;
-	pcm->sw_io += frames;
-	if (pcm->sw_io >= runtime->buffer_size)
-		pcm->sw_io -= runtime->buffer_size;
-	snd_emu10k1_fx8010_playback_transfer(substream);
-	return pcm->sw_io;
-}
-
-static snd_pcm_hardware_t snd_emu10k1_fx8010_playback =
-{
-	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
-				 /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE),
-	.formats =		SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
-	.rates =		SNDRV_PCM_RATE_48000,
-	.rate_min =		48000,
-	.rate_max =		48000,
-	.channels_min =		1,
-	.channels_max =		1,
-	.buffer_bytes_max =	(128*1024),
-	.period_bytes_min =	1024,
-	.period_bytes_max =	(128*1024),
-	.periods_min =		1,
-	.periods_max =		1024,
-	.fifo_size =		0,
-};
-
-static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream)
-{
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
-
-	runtime->hw = snd_emu10k1_fx8010_playback;
-	runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels;
-	runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2;
-	spin_lock(&emu->reg_lock);
-	if (pcm->valid == 0) {
-		spin_unlock(&emu->reg_lock);
-		return -ENODEV;
-	}
-	pcm->opened = 1;
-	spin_unlock(&emu->reg_lock);
-	return 0;
-}
-
-static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream)
-{
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
-
-	spin_lock(&emu->reg_lock);
-	pcm->opened = 0;
-	spin_unlock(&emu->reg_lock);
-	return 0;
-}
-
-static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = {
-	.open =			snd_emu10k1_fx8010_playback_open,
-	.close =		snd_emu10k1_fx8010_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
-	.hw_params =		snd_emu10k1_fx8010_playback_hw_params,
-	.hw_free =		snd_emu10k1_fx8010_playback_hw_free,
-	.prepare =		snd_emu10k1_fx8010_playback_prepare,
-	.trigger =		snd_emu10k1_fx8010_playback_trigger,
-	.pointer =		snd_emu10k1_fx8010_playback_pointer,
-	.ack =			snd_emu10k1_fx8010_playback_transfer,
-};
-
-static void snd_emu10k1_fx8010_pcm_free(snd_pcm_t *pcm)
-{
-	emu10k1_t *emu = snd_magic_cast(emu10k1_t, pcm->private_data, return);
-	emu->pcm_fx8010 = NULL;
-	snd_pcm_lib_preallocate_free_for_all(pcm);
-}
-
-int snd_emu10k1_fx8010_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
-{
-	snd_pcm_t *pcm;
-	int err;
-
-	if (rpcm)
-		*rpcm = NULL;
-
-	if ((err = snd_pcm_new(emu->card, "emu10k1", device, 8, 0, &pcm)) < 0)
-		return err;
-
-	pcm->private_data = emu;
-	pcm->private_free = snd_emu10k1_fx8010_pcm_free;
-
-	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops);
-
-	pcm->info_flags = 0;
-	strcpy(pcm->name, "EMU10K1 FX8010");
-	emu->pcm_fx8010 = pcm;
-	
-	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 0);
-
-	if (rpcm)
-		*rpcm = pcm;
-
-	return 0;
-}
-
 /*************************************************************************
  * EMU10K1 effect manager
  *************************************************************************/
--- diff/sound/pci/emu10k1/emupcm.c	2004-05-19 22:13:25.000000000 +0100
+++ source/sound/pci/emu10k1/emupcm.c	2004-07-01 21:32:54.000000000 +0100
@@ -1125,6 +1125,276 @@
 	.pointer =		snd_emu10k1_capture_pointer,
 };
 
+
+/* EFX playback */
+
+#define INITIAL_TRAM_SHIFT     14
+#define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1)
+
+static void snd_emu10k1_fx8010_playback_irq(emu10k1_t *emu, void *private_data)
+{
+	snd_pcm_substream_t *substream = snd_magic_cast(snd_pcm_substream_t, private_data, return);
+	snd_pcm_period_elapsed(substream);
+}
+
+static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left,
+						   unsigned short *dst_right,
+						   unsigned short *src,
+						   unsigned int count,
+						   unsigned int tram_shift)
+{
+	// printk("tram_poke1: dst_left = 0x%p, dst_right = 0x%p, src = 0x%p, count = 0x%x\n", dst_left, dst_right, src, count);
+	if ((tram_shift & 1) == 0) {
+		while (count--) {
+			*dst_left-- = *src++;
+			*dst_right-- = *src++;
+		}
+	} else {
+		while (count--) {
+			*dst_right-- = *src++;
+			*dst_left-- = *src++;
+		}
+	}
+}
+
+static void snd_emu10k1_fx8010_playback_tram_poke(emu10k1_t *emu,
+						  unsigned int *tram_pos,
+						  unsigned int *tram_shift,
+						  unsigned int tram_size,
+						  unsigned short *src,
+						  unsigned int frames)
+{
+	unsigned int count;
+
+	while (frames > *tram_pos) {
+		count = *tram_pos + 1;
+		snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + *tram_pos,
+						       (unsigned short *)emu->fx8010.etram_pages.area + *tram_pos + tram_size / 2,
+						       src, count, *tram_shift);
+		src += count * 2;
+		frames -= count;
+		*tram_pos = (tram_size / 2) - 1;
+		(*tram_shift)++;
+	}
+	snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + *tram_pos,
+					       (unsigned short *)emu->fx8010.etram_pages.area + *tram_pos + tram_size / 2,
+					       src, frames, *tram_shift++);
+	*tram_pos -= frames;
+}
+
+static int snd_emu10k1_fx8010_playback_transfer(snd_pcm_substream_t *substream)
+{
+	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr;
+	snd_pcm_sframes_t diff = appl_ptr - pcm->appl_ptr;
+	snd_pcm_uframes_t buffer_size = pcm->buffer_size / 2;
+
+	if (diff) {
+		if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2))
+			diff += runtime->boundary;
+		pcm->sw_ready += diff;
+		pcm->appl_ptr = appl_ptr;
+	}
+	while (pcm->hw_ready < buffer_size &&
+	       pcm->sw_ready > 0) {
+	       	size_t hw_to_end = buffer_size - pcm->hw_data;
+	       	size_t sw_to_end = (runtime->buffer_size << 2) - pcm->sw_data;
+	       	size_t tframes = buffer_size - pcm->hw_ready;
+	       	if (pcm->sw_ready < tframes)
+	       		tframes = pcm->sw_ready;
+	       	if (hw_to_end < tframes)
+	       		tframes = hw_to_end;
+	       	if (sw_to_end < tframes)
+	       		tframes = sw_to_end;
+	       	snd_emu10k1_fx8010_playback_tram_poke(emu, &pcm->tram_pos, &pcm->tram_shift,
+	       					      pcm->buffer_size,
+	       					      (unsigned short *)(runtime->dma_area + (pcm->sw_data << 2)),
+	       					      tframes);
+		pcm->hw_data += tframes;
+		if (pcm->hw_data == buffer_size)
+			pcm->hw_data = 0;
+		pcm->sw_data += tframes;
+		if (pcm->sw_data == runtime->buffer_size)
+			pcm->sw_data = 0;
+		pcm->hw_ready += tframes;
+		pcm->sw_ready -= tframes;
+	}
+	return 0;
+}
+
+static int snd_emu10k1_fx8010_playback_hw_params(snd_pcm_substream_t * substream,
+						 snd_pcm_hw_params_t * hw_params)
+{
+	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
+}
+
+static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream)
+{
+	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	unsigned int i;
+
+	for (i = 0; i < pcm->channels; i++)
+		snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0);
+	snd_pcm_lib_free_pages(substream);
+	return 0;
+}
+
+static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream)
+{
+	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	unsigned int i;
+	
+	// printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2);
+	pcm->sw_data = pcm->sw_io = pcm->sw_ready = 0;
+	pcm->hw_data = pcm->hw_io = pcm->hw_ready = 0;
+	pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size);
+	pcm->tram_shift = 0;
+	pcm->appl_ptr = 0;
+	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_running, 0, 0);	/* reset */
+	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0);	/* reset */
+	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size);
+	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_ptr, 0, 0);		/* reset ptr number */
+	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size);
+	snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size);
+	for (i = 0; i < pcm->channels; i++)
+		snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pcm->channels));
+	return 0;
+}
+
+static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream, int cmd)
+{
+	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	unsigned long flags;
+	int result = 0;
+
+	spin_lock_irqsave(&emu->reg_lock, flags);
+	switch (cmd) {
+	case SNDRV_PCM_TRIGGER_START:
+		/* follow thru */
+	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+#ifdef EMU10K1_SET_AC3_IEC958
+	{
+		int i;
+		for (i = 0; i < 3; i++) {
+			unsigned int bits;
+			bits = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+			       SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS |
+			       0x00001200 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT | SPCS_NOTAUDIODATA;
+			snd_emu10k1_ptr_write(emu, SPCS0 + i, 0, bits);
+		}
+	}
+#endif
+		result = snd_emu10k1_fx8010_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq);
+		if (result < 0)
+			goto __err;
+		snd_emu10k1_fx8010_playback_transfer(substream);	/* roll the ball */
+		snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1);
+		break;
+	case SNDRV_PCM_TRIGGER_STOP:
+	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+		snd_emu10k1_fx8010_unregister_irq_handler(emu, pcm->irq); pcm->irq = NULL;
+		snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0);
+		pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size);
+		pcm->tram_shift = 0;
+		break;
+	default:
+		result = -EINVAL;
+		break;
+	}
+      __err:
+	spin_unlock_irqrestore(&emu->reg_lock, flags);
+	return result;
+}
+
+static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t * substream)
+{
+	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	size_t ptr;
+	snd_pcm_sframes_t frames;
+
+	if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0))
+		return 0;
+	ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0);
+	frames = ptr - pcm->hw_io;
+	if (frames < 0)
+		frames += runtime->buffer_size;
+	pcm->hw_io = ptr;
+	pcm->hw_ready -= frames;
+	pcm->sw_io += frames;
+	if (pcm->sw_io >= runtime->buffer_size)
+		pcm->sw_io -= runtime->buffer_size;
+	snd_emu10k1_fx8010_playback_transfer(substream);
+	return pcm->sw_io;
+}
+
+static snd_pcm_hardware_t snd_emu10k1_fx8010_playback =
+{
+	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
+				 /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE),
+	.formats =		SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
+	.rates =		SNDRV_PCM_RATE_48000,
+	.rate_min =		48000,
+	.rate_max =		48000,
+	.channels_min =		1,
+	.channels_max =		1,
+	.buffer_bytes_max =	(128*1024),
+	.period_bytes_min =	1024,
+	.period_bytes_max =	(128*1024),
+	.periods_min =		1,
+	.periods_max =		1024,
+	.fifo_size =		0,
+};
+
+static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream)
+{
+	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+
+	runtime->hw = snd_emu10k1_fx8010_playback;
+	runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels;
+	runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2;
+	spin_lock(&emu->reg_lock);
+	if (pcm->valid == 0) {
+		spin_unlock(&emu->reg_lock);
+		return -ENODEV;
+	}
+	pcm->opened = 1;
+	spin_unlock(&emu->reg_lock);
+	return 0;
+}
+
+static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream)
+{
+	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+
+	spin_lock(&emu->reg_lock);
+	pcm->opened = 0;
+	spin_unlock(&emu->reg_lock);
+	return 0;
+}
+
+static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = {
+	.open =			snd_emu10k1_fx8010_playback_open,
+	.close =		snd_emu10k1_fx8010_playback_close,
+	.ioctl =		snd_pcm_lib_ioctl,
+	.hw_params =		snd_emu10k1_fx8010_playback_hw_params,
+	.hw_free =		snd_emu10k1_fx8010_playback_hw_free,
+	.prepare =		snd_emu10k1_fx8010_playback_prepare,
+	.trigger =		snd_emu10k1_fx8010_playback_trigger,
+	.pointer =		snd_emu10k1_fx8010_playback_pointer,
+	.ack =			snd_emu10k1_fx8010_playback_transfer,
+};
+
 static void snd_emu10k1_pcm_efx_free(snd_pcm_t *pcm)
 {
 	emu10k1_t *emu = snd_magic_cast(emu10k1_t, pcm->private_data, return);
@@ -1140,12 +1410,13 @@
 	if (rpcm)
 		*rpcm = NULL;
 
-	if ((err = snd_pcm_new(emu->card, "emu10k1 efx", device, 0, 1, &pcm)) < 0)
+	if ((err = snd_pcm_new(emu->card, "emu10k1 efx", device, 8, 1, &pcm)) < 0)
 		return err;
 
 	pcm->private_data = emu;
 	pcm->private_free = snd_emu10k1_pcm_efx_free;
 
+	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops);
 	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_efx_ops);
 
 	pcm->info_flags = 0;
--- diff/sound/pci/emu10k1/memory.c	2004-05-19 22:13:25.000000000 +0100
+++ source/sound/pci/emu10k1/memory.c	2004-07-01 21:32:54.000000000 +0100
@@ -291,7 +291,7 @@
 snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream)
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
-	struct snd_sg_buf *sgbuf = runtime->dma_private;
+	struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
 	snd_util_memhdr_t *hdr;
 	emu10k1_memblk_t *blk;
 	int page, err, idx;
--- diff/sound/pci/es1968.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/es1968.c	2004-07-01 21:32:54.000000000 +0100
@@ -522,9 +522,7 @@
 
 /* DMA Hack! */
 struct snd_esm_memory {
-	char *buf;
-	unsigned long addr;
-	int size;
+	struct snd_dma_buffer buf;
 	int empty;	/* status */
 	struct list_head list;
 };
@@ -1078,10 +1076,10 @@
 	for (channel = 0; channel <= high_apu; channel++) {
 		apu = es->apu[channel];
 
-		snd_es1968_program_wavecache(chip, es, channel, es->memory->addr, 0);
+		snd_es1968_program_wavecache(chip, es, channel, es->memory->buf.addr, 0);
 
 		/* Offset to PCMBAR */
-		pa = es->memory->addr;
+		pa = es->memory->buf.addr;
 		pa -= chip->dma.addr;
 		pa >>= 1;	/* words */
 
@@ -1230,20 +1228,20 @@
 	/* input mixer (left/mono) */
 	/* parallel in crap, see maestro reg 0xC [8-11] */
 	init_capture_apu(chip, es, 2,
-			 es->mixbuf->addr, ESM_MIXBUF_SIZE/4, /* in words */
+			 es->mixbuf->buf.addr, ESM_MIXBUF_SIZE/4, /* in words */
 			 ESM_APU_INPUTMIXER, 0x14);
 	/* SRC (left/mono); get input from inputing apu */
-	init_capture_apu(chip, es, 0, es->memory->addr, size,
+	init_capture_apu(chip, es, 0, es->memory->buf.addr, size,
 			 ESM_APU_SRCONVERTOR, es->apu[2]);
 	if (es->fmt & ESS_FMT_STEREO) {
 		/* input mixer (right) */
 		init_capture_apu(chip, es, 3,
-				 es->mixbuf->addr + ESM_MIXBUF_SIZE/2,
+				 es->mixbuf->buf.addr + ESM_MIXBUF_SIZE/2,
 				 ESM_MIXBUF_SIZE/4, /* in words */
 				 ESM_APU_INPUTMIXER, 0x15);
 		/* SRC (right) */
 		init_capture_apu(chip, es, 1,
-				 es->memory->addr + size*2, size,
+				 es->memory->buf.addr + size*2, size,
 				 ESM_APU_SRCONVERTOR, es->apu[3]);
 	}
 
@@ -1408,8 +1406,8 @@
 	down(&chip->memory_mutex);
 	list_for_each(p, &chip->buf_list) {
 		esm_memory_t *buf = list_entry(p, esm_memory_t, list);
-		if (buf->empty && buf->size > max_size)
-			max_size = buf->size;
+		if (buf->empty && buf->buf.bytes > max_size)
+			max_size = buf->buf.bytes;
 	}
 	up(&chip->memory_mutex);
 	if (max_size >= 128*1024)
@@ -1427,24 +1425,25 @@
 	down(&chip->memory_mutex);
 	list_for_each(p, &chip->buf_list) {
 		buf = list_entry(p, esm_memory_t, list);
-		if (buf->empty && buf->size >= size)
+		if (buf->empty && buf->buf.bytes >= size)
 			goto __found;
 	}
 	up(&chip->memory_mutex);
 	return NULL;
 
 __found:
-	if (buf->size > size) {
+	if (buf->buf.bytes > size) {
 		esm_memory_t *chunk = kmalloc(sizeof(*chunk), GFP_KERNEL);
 		if (chunk == NULL) {
 			up(&chip->memory_mutex);
 			return NULL;
 		}
-		chunk->size = buf->size - size;
-		chunk->buf = buf->buf + size;
-		chunk->addr = buf->addr + size;
+		chunk->buf = buf->buf;
+		chunk->buf.bytes -= size;
+		chunk->buf.area += size;
+		chunk->buf.addr += size;
 		chunk->empty = 1;
-		buf->size = size;
+		buf->buf.bytes = size;
 		list_add(&chunk->list, &buf->list);
 	}
 	buf->empty = 0;
@@ -1462,7 +1461,7 @@
 	if (buf->list.prev != &chip->buf_list) {
 		chunk = list_entry(buf->list.prev, esm_memory_t, list);
 		if (chunk->empty) {
-			chunk->size += buf->size;
+			chunk->buf.bytes += buf->buf.bytes;
 			list_del(&buf->list);
 			kfree(buf);
 			buf = chunk;
@@ -1471,7 +1470,7 @@
 	if (buf->list.next != &chip->buf_list) {
 		chunk = list_entry(buf->list.next, esm_memory_t, list);
 		if (chunk->empty) {
-			buf->size += chunk->size;
+			buf->buf.bytes += chunk->buf.bytes;
 			list_del(&chunk->list);
 			kfree(chunk);
 		}
@@ -1525,9 +1524,10 @@
 		return -ENOMEM;
 	}
 	memset(chip->dma.area, 0, ESM_MEM_ALIGN);
-	chunk->buf = chip->dma.area + ESM_MEM_ALIGN;
-	chunk->addr = chip->dma.addr + ESM_MEM_ALIGN;
-	chunk->size = chip->dma.bytes - ESM_MEM_ALIGN;
+	chunk->buf = chip->dma;
+	chunk->buf.area += ESM_MEM_ALIGN;
+	chunk->buf.addr += ESM_MEM_ALIGN;
+	chunk->buf.bytes -= ESM_MEM_ALIGN;
 	chunk->empty = 1;
 	list_add(&chunk->list, &chip->buf_list);
 
@@ -1545,7 +1545,7 @@
 	int size = params_buffer_bytes(hw_params);
 
 	if (chan->memory) {
-		if (chan->memory->size >= size) {
+		if (chan->memory->buf.bytes >= size) {
 			runtime->dma_bytes = size;
 			return 0;
 		}
@@ -1556,9 +1556,7 @@
 		// snd_printd("cannot allocate dma buffer: size = %d\n", size);
 		return -ENOMEM;
 	}
-	runtime->dma_bytes = size;
-	runtime->dma_area = chan->memory->buf;
-	runtime->dma_addr = chan->memory->addr;
+	snd_pcm_set_runtime_buffer(substream, &chan->memory->buf);
 	return 1; /* area was changed */
 }
 
@@ -1637,6 +1635,8 @@
 	es->substream = substream;
 	es->mode = ESM_MODE_PLAY;
 
+	substream->dma_device = chip->dma_dev; /* for mmap */
+
 	runtime->private_data = es;
 	runtime->hw = snd_es1968_playback;
 	runtime->hw.buffer_bytes_max = runtime->hw.period_bytes_max =
@@ -1695,7 +1695,9 @@
 		snd_magic_kfree(es);
                 return -ENOMEM;
         }
-	memset(es->mixbuf->buf, 0, ESM_MIXBUF_SIZE);
+	memset(es->mixbuf->buf.area, 0, ESM_MIXBUF_SIZE);
+
+	substream->dma_device = chip->dma_dev; /* for mmap */
 
 	runtime->private_data = es;
 	runtime->hw = snd_es1968_capture;
@@ -1800,11 +1802,11 @@
 		return;
 	}
 
-	memset(memory->buf, 0, CLOCK_MEASURE_BUFSIZE);
+	memset(memory->buf.area, 0, CLOCK_MEASURE_BUFSIZE);
 
-	wave_set_register(chip, apu << 3, (memory->addr - 0x10) & 0xfff8);
+	wave_set_register(chip, apu << 3, (memory->buf.addr - 0x10) & 0xfff8);
 
-	pa = (unsigned int)((memory->addr - chip->dma.addr) >> 1);
+	pa = (unsigned int)((memory->buf.addr - chip->dma.addr) >> 1);
 	pa |= 0x00400000;	/* System RAM (Bit 22) */
 
 	/* initialize apu */
@@ -2470,6 +2472,8 @@
 		outw(0, chip->io_port + ESM_PORT_HOST_IRQ); /* disable IRQ */
 	}
 
+	if (chip->irq >= 0)
+		free_irq(chip->irq, (void *)chip);
 #ifdef SUPPORT_JOYSTICK
 	if (chip->res_joystick) {
 		gameport_unregister_port(&chip->gameport);
@@ -2484,8 +2488,6 @@
 		release_resource(chip->res_io_port);
 		kfree_nocheck(chip->res_io_port);
 	}
-	if (chip->irq >= 0)
-		free_irq(chip->irq, (void *)chip);
 	snd_magic_kfree(chip);
 	return 0;
 }
--- diff/sound/pci/ice1712/Makefile	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/ice1712/Makefile	2004-07-01 21:32:54.000000000 +0100
@@ -5,7 +5,7 @@
 
 snd-ice17xx-ak4xxx-objs := ak4xxx.o
 snd-ice1712-objs := ice1712.o delta.o hoontech.o ews.o
-snd-ice1724-objs := ice1724.o amp.o revo.o aureon.o
+snd-ice1724-objs := ice1724.o amp.o revo.o aureon.o vt1720_mobo.o
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_ICE1712) += snd-ice1712.o snd-ice17xx-ak4xxx.o
--- diff/sound/pci/ice1712/ice1724.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/ice1712/ice1724.c	2004-07-01 21:32:54.000000000 +0100
@@ -44,6 +44,7 @@
 #include "amp.h"
 #include "revo.h"
 #include "aureon.h"
+#include "vt1720_mobo.h"
 
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
@@ -54,6 +55,7 @@
 	       REVO_DEVICE_DESC
 	       AMP_AUDIO2000_DEVICE_DESC
 	       AUREON_DEVICE_DESC
+	       VT1720_MOBO_DEVICE_DESC
 		"{VIA,VT1720},"
 		"{VIA,VT1724},"
 		"{ICEnsemble,Generic ICE1724},"
@@ -419,7 +421,7 @@
 	ice->cur_rate = rate;
 
 	/* check MT02 */
-	if (ice->eeprom.data[ICE_EEP2_ACLINK] & 0x80) {
+	if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) {
 		val = old = inb(ICEMT1724(ice, I2S_FORMAT));
 		if (rate > 96000)
 			val |= VT1724_MT_I2S_MCLK_128X; /* 128x MCLK */
@@ -446,15 +448,6 @@
 		if (ice->akm[i].ops.set_rate_val)
 			ice->akm[i].ops.set_rate_val(&ice->akm[i], rate);
 	}
-
-	/* set up AC97 registers if needed */
-	if (! (ice->eeprom.data[ICE_EEP2_ACLINK] & 0x80) && ice->ac97) {
-		snd_ac97_set_rate(ice->ac97, AC97_PCM_FRONT_DAC_RATE, rate);
-		snd_ac97_set_rate(ice->ac97, AC97_PCM_SURR_DAC_RATE, rate);
-		snd_ac97_set_rate(ice->ac97, AC97_PCM_LFE_DAC_RATE, rate);
-		snd_ac97_set_rate(ice->ac97, AC97_SPDIF, rate);
-		snd_ac97_set_rate(ice->ac97, AC97_PCM_LR_ADC_RATE, rate);
-	}
 }
 
 static int snd_vt1724_pcm_hw_params(snd_pcm_substream_t * substream,
@@ -698,7 +691,7 @@
 static int set_rate_constraints(ice1712_t *ice, snd_pcm_substream_t *substream)
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
-	if (ice->eeprom.data[ICE_EEP2_ACLINK] & 0x80) {
+	if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) {
 		/* I2S */
 		if (ice->eeprom.data[ICE_EEP2_I2S] & 0x08)
 			return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_192);
@@ -714,15 +707,9 @@
 			ratec = AC97_RATES_FRONT_DAC;
 		else
 			ratec = AC97_RATES_ADC;
-		runtime->hw.rates = ice->ac97->rates[ratec];
 		runtime->hw.rate_max = 48000;
-		if (runtime->hw.rates == SNDRV_PCM_RATE_48000) {
-			runtime->hw.rate_min = 48000;
-			return 0;
-		} else {
-			runtime->hw.rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_48000;
-			return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_48);
-		}
+		runtime->hw.rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_48000;
+		return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_48);
 	}
 	return 0;
 }
@@ -864,8 +851,45 @@
 	.pause = VT1724_RDMA1_PAUSE,
 };
 
+/* update spdif control bits; call with reg_lock */
+static void update_spdif_bits(ice1712_t *ice, unsigned int val)
+{
+	unsigned char cbit, disabled;
+
+	cbit = inb(ICEREG1724(ice, SPDIF_CFG));
+	disabled = cbit & ~VT1724_CFG_SPDIF_OUT_EN;
+	if (cbit != disabled)
+		outb(disabled, ICEREG1724(ice, SPDIF_CFG));
+	outw(val, ICEMT1724(ice, SPDIF_CTRL));
+	if (cbit != disabled)
+		outb(cbit, ICEREG1724(ice, SPDIF_CFG));
+	outw(val, ICEMT1724(ice, SPDIF_CTRL));
+}
+
+/* update SPDIF control bits according to the given rate */
+static void update_spdif_rate(ice1712_t *ice, unsigned int rate)
+{
+	unsigned int val, nval;
+	unsigned long flags;
+
+	spin_lock_irqsave(&ice->reg_lock, flags);
+	nval = val = inw(ICEMT1724(ice, SPDIF_CTRL));
+	nval &= ~(7 << 12);
+	switch (rate) {
+	case 44100: break;
+	case 48000: nval |= 2 << 12; break;
+	case 32000: nval |= 3 << 12; break;
+	}
+	if (val != nval)
+		update_spdif_bits(ice, nval);
+	spin_unlock_irqrestore(&ice->reg_lock, flags);
+}
+
 static int snd_vt1724_playback_spdif_prepare(snd_pcm_substream_t * substream)
 {
+	ice1712_t *ice = snd_pcm_substream_chip(substream);
+	if (! ice->force_pdma4)
+		update_spdif_rate(ice, substream->runtime->rate);
 	return snd_vt1724_pcm_prepare(substream, &vt1724_playback_spdif_reg);
 }
 
@@ -1274,7 +1298,7 @@
 		}
 	} else {
 		/* consumer */
-		val |= diga->status[0] & 0x04; /* copyright */
+		val |= diga->status[1] & 0x04; /* copyright */
 		if ((diga->status[0] & IEC958_AES0_CON_EMPHASIS)== IEC958_AES0_CON_EMPHASIS_5015)
 			val |= 1U << 3;
 		val |= (unsigned int)(diga->status[1] & 0x3f) << 4; /* category */
@@ -1331,16 +1355,8 @@
 	val = encode_spdif_bits(&ucontrol->value.iec958);
 	spin_lock_irqsave(&ice->reg_lock, flags);
 	old = inw(ICEMT1724(ice, SPDIF_CTRL));
-	if (val != old) {
-		unsigned char cbit, disabled;
-		cbit = inb(ICEREG1724(ice, SPDIF_CFG));
-		disabled = cbit & ~VT1724_CFG_SPDIF_OUT_EN;
-		if (cbit != disabled)
-			outb(disabled, ICEREG1724(ice, SPDIF_CFG));
-		outw(val, ICEMT1724(ice, SPDIF_CTRL));
-		if (cbit != disabled)
-			outb(cbit, ICEREG1724(ice, SPDIF_CFG));
-	}
+	if (val != old)
+		update_spdif_bits(ice, val);
 	spin_unlock_irqrestore(&ice->reg_lock, flags);
 	return (val != old);
 }
@@ -1815,6 +1831,7 @@
 	snd_vt1724_revo_cards,
 	snd_vt1724_amp_cards, 
 	snd_vt1724_aureon_cards,
+	snd_vt1720_mobo_cards,
 	0,
 };
 
@@ -1930,9 +1947,6 @@
 
 	outb(0, ICEREG1724(ice, POWERDOWN));
 
-	/* read back to check the availability of SPDIF out */
-	ice->eeprom.data[ICE_EEP2_SPDIF] = inb(ICEREG1724(ice, SPDIF_CFG));
-
 	return 0;
 }
 
--- diff/sound/pci/intel8x0.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/intel8x0.c	2004-07-01 21:32:54.000000000 +0100
@@ -149,6 +149,9 @@
 #ifndef PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO
 #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO	0x006a
 #endif
+#ifndef PCI_DEVICE_ID_NVIDIA_CK8_AUDIO
+#define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO	0x008a
+#endif
 #ifndef PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO
 #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO	0x00da
 #endif
@@ -463,6 +466,7 @@
 	{ 0x1039, 0x7012, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_SIS },	/* SI7012 */
 	{ 0x10de, 0x01b1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE },	/* NFORCE */
 	{ 0x10de, 0x006a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE },	/* NFORCE2 */
+	{ 0x10de, 0x008a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE },	/* CK8 */
 	{ 0x10de, 0x00da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE },	/* NFORCE3 */
 	{ 0x10de, 0x00ea, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE },	/* CK8S */
 	{ 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL },	/* AMD8111 */
@@ -1058,17 +1062,23 @@
 {
 	intel8x0_t *chip = snd_pcm_substream_chip(substream);
 	ichdev_t *ichdev = get_ichdev(substream);
-	unsigned long flags;
 	size_t ptr1, ptr;
+	int civ, timeout = 10;
+	unsigned int position;
 
-	ptr1 = igetword(chip, ichdev->reg_offset + ichdev->roff_picb) << ichdev->pos_shift;
-	if (ptr1 != 0)
-		ptr = ichdev->fragsize1 - ptr1;
-	else
-		ptr = 0;
-	spin_lock_irqsave(&chip->reg_lock, flags);
-	ptr += ichdev->position;
-	spin_unlock_irqrestore(&chip->reg_lock, flags);
+	do {
+		civ = igetbyte(chip, ichdev->reg_offset + ICH_REG_OFF_CIV);
+		ptr1 = igetword(chip, ichdev->reg_offset + ichdev->roff_picb);
+		position = ichdev->position;
+		if (ptr1 == 0)
+			udelay(1);
+		if (civ == igetbyte(chip, ichdev->reg_offset + ICH_REG_OFF_CIV) &&
+		    ptr1 == igetword(chip, ichdev->reg_offset + ichdev->roff_picb))
+			break;
+	} while (timeout--);
+	ptr1 <<= ichdev->pos_shift;
+	ptr = ichdev->fragsize1 - ptr1;
+	ptr += position;
 	if (ptr >= ichdev->size)
 		return 0;
 	return bytes_to_frames(substream->runtime, ptr);
@@ -2614,6 +2624,7 @@
 	{ PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO, "NVidia nForce2" },
 	{ PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO, "NVidia nForce3" },
 	{ PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO, "NVidia CK8S" },
+	{ PCI_DEVICE_ID_NVIDIA_CK8_AUDIO, "NVidia CK8" },
 	{ 0x746d, "AMD AMD8111" },
 	{ 0x7445, "AMD AMD768" },
 	{ 0x5455, "ALi M5455" },
--- diff/sound/pci/korg1212/korg1212.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/korg1212/korg1212.c	2004-07-01 21:32:54.000000000 +0100
@@ -1414,13 +1414,14 @@
 		K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_open [%s]\n", stateName[korg1212->cardState]);
 #endif
 
+	substream->dma_device = korg1212->dma_dev; /* set for mmap */
+
         snd_pcm_set_sync(substream);    // ???
 
 	snd_korg1212_OpenCard(korg1212);
 
         runtime->hw = snd_korg1212_playback_info;
-	runtime->dma_area = (char *) korg1212->playDataBufsPtr;
-	runtime->dma_bytes = K1212_BUF_SIZE;
+	snd_pcm_set_runtime_buffer(substream, &korg1212->dma_play);
 
         spin_lock_irqsave(&korg1212->lock, flags);
 
@@ -1445,13 +1446,14 @@
 		K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_open [%s]\n", stateName[korg1212->cardState]);
 #endif
 
+	substream->dma_device = korg1212->dma_dev; /* set for mmap */
+
         snd_pcm_set_sync(substream);    // ???
 
 	snd_korg1212_OpenCard(korg1212);
 
         runtime->hw = snd_korg1212_capture_info;
-	runtime->dma_area = (char *) korg1212->recordDataBufsPtr;
-	runtime->dma_bytes = K1212_BUF_SIZE;
+	snd_pcm_set_runtime_buffer(substream, &korg1212->dma_rec);
 
         spin_lock_irqsave(&korg1212->lock, flags);
 
--- diff/sound/pci/mixart/mixart.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/mixart/mixart.c	2004-07-01 21:32:54.000000000 +0100
@@ -247,21 +247,27 @@
 	/* pipe is not yet defined */
 	if( pipe->status == PIPE_UNDEFINED ) {
 		int err, i;
-		mixart_streaming_group_t streaming_group_resp;
-		mixart_streaming_group_req_t streaming_group_req;
+		struct {
+			mixart_streaming_group_req_t sgroup_req;
+			mixart_streaming_group_t sgroup_resp;
+		} *buf;
 
 		snd_printdd("add_ref_pipe audio chip(%d) pcm(%d)\n", chip->chip_idx, pcm_number);
 
+		buf = kmalloc(sizeof(*buf), GFP_KERNEL);
+		if (!buf)
+			return NULL;
+
 		request.uid = (mixart_uid_t){0,0};      /* should be StreamManagerUID, but zero is OK if there is only one ! */
-		request.data = &streaming_group_req;
-		request.size = sizeof(streaming_group_req);
+		request.data = &buf->sgroup_req;
+		request.size = sizeof(buf->sgroup_req);
 
-		memset(&streaming_group_req, 0, sizeof(streaming_group_req));
+		memset(&buf->sgroup_req, 0, sizeof(buf->sgroup_req));
 
-		streaming_group_req.stream_count = stream_count;
-		streaming_group_req.channel_count = 2;
-		streaming_group_req.latency = 256;
-		streaming_group_req.connector = pipe->uid_left_connector;  /* the left connector */
+		buf->sgroup_req.stream_count = stream_count;
+		buf->sgroup_req.channel_count = 2;
+		buf->sgroup_req.latency = 256;
+		buf->sgroup_req.connector = pipe->uid_left_connector;  /* the left connector */
 
 		for (i=0; i<stream_count; i++) {
 			int j;
@@ -269,15 +275,15 @@
 			struct mixart_bufferinfo *bufferinfo;
 			
 			/* we don't yet know the format, so config 16 bit pcm audio for instance */
-			streaming_group_req.stream_info[i].size_max_byte_frame = 1024;
-			streaming_group_req.stream_info[i].size_max_sample_frame = 256;
-			streaming_group_req.stream_info[i].nb_bytes_max_per_sample = MIXART_FLOAT_P__4_0_TO_HEX; /* is 4.0f */
+			buf->sgroup_req.stream_info[i].size_max_byte_frame = 1024;
+			buf->sgroup_req.stream_info[i].size_max_sample_frame = 256;
+			buf->sgroup_req.stream_info[i].nb_bytes_max_per_sample = MIXART_FLOAT_P__4_0_TO_HEX; /* is 4.0f */
 
 			/* find the right bufferinfo_array */
 			j = (chip->chip_idx * MIXART_MAX_STREAM_PER_CARD) + (pcm_number * (MIXART_PLAYBACK_STREAMS + MIXART_CAPTURE_STREAMS)) + i;
 			if(capture) j += MIXART_PLAYBACK_STREAMS; /* in the array capture is behind playback */
 
-			streaming_group_req.flow_entry[i] = j;
+			buf->sgroup_req.flow_entry[i] = j;
 
 			flowinfo = (struct mixart_flowinfo *)chip->mgr->flowinfo.area;
 			flowinfo[j].bufferinfo_array_phy_address = (u32)chip->mgr->bufferinfo.addr + (j * sizeof(mixart_bufferinfo_t));
@@ -294,17 +300,19 @@
 			}
 		}
 
-		err = snd_mixart_send_msg(chip->mgr, &request, sizeof(streaming_group_resp), &streaming_group_resp);
-		if((err < 0) || (streaming_group_resp.status != 0)) {
-			snd_printk(KERN_ERR "error MSG_STREAM_ADD_**PUT_GROUP err=%x stat=%x !\n", err, streaming_group_resp.status);
+		err = snd_mixart_send_msg(chip->mgr, &request, sizeof(buf->sgroup_resp), &buf->sgroup_resp);
+		if((err < 0) || (buf->sgroup_resp.status != 0)) {
+			snd_printk(KERN_ERR "error MSG_STREAM_ADD_**PUT_GROUP err=%x stat=%x !\n", err, buf->sgroup_resp.status);
+			kfree(buf);
 			return NULL;
 		}
 
-		pipe->group_uid = streaming_group_resp.group;     /* id of the pipe, as returned by embedded */
-		pipe->stream_count = streaming_group_resp.stream_count;
-		/* pipe->stream_uid[i] = streaming_group_resp.stream[i].stream_uid; */
+		pipe->group_uid = buf->sgroup_resp.group;     /* id of the pipe, as returned by embedded */
+		pipe->stream_count = buf->sgroup_resp.stream_count;
+		/* pipe->stream_uid[i] = buf->sgroup_resp.stream[i].stream_uid; */
 
 		pipe->status = PIPE_STOPPED;
+		kfree(buf);
 	}
 
 	if(monitoring)	pipe->monitoring = 1;
--- diff/sound/pci/nm256/nm256.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/nm256/nm256.c	2004-07-01 21:32:54.000000000 +0100
@@ -660,9 +660,9 @@
 	return bytes_to_frames(substream->runtime, curp);
 }
 
+/* Remapped I/O space can be accessible as pointer on i386 */
+/* This might be changed in the future */
 #ifndef __i386__
-/* FIXME: I/O space is not accessible via pointers on all architectures */
-
 /*
  * silence / copy for playback
  */
@@ -757,10 +757,8 @@
  */
 static snd_pcm_hardware_t snd_nm256_playback =
 {
-	.info =
-#ifdef __i386__
-				SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID|
-#endif
+	.info =			SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID|
+				SNDRV_PCM_INFO_MMAP_IOMEM|
 				SNDRV_PCM_INFO_INTERLEAVED |
 				/*SNDRV_PCM_INFO_PAUSE |*/
 				SNDRV_PCM_INFO_RESUME,
@@ -779,10 +777,8 @@
 
 static snd_pcm_hardware_t snd_nm256_capture =
 {
-	.info =
-#ifdef __i386__
-				SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID|
-#endif
+	.info =			SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID|
+				SNDRV_PCM_INFO_MMAP_IOMEM|
 				SNDRV_PCM_INFO_INTERLEAVED |
 				/*SNDRV_PCM_INFO_PAUSE |*/
 				SNDRV_PCM_INFO_RESUME,
@@ -1509,6 +1505,10 @@
 		/* this workaround will cause lock-up after suspend/resume on Sony PCG-F305 */
 		chip->latitude_workaround = 0;
 	}
+	if (subsystem_vendor == 0x1028 && subsystem_device == 0x0080) {
+		/* this workaround will cause lock-up after suspend/resume on a Dell laptop */
+		chip->latitude_workaround = 0;
+	}
 
 	snd_nm256_init_chip(chip);
 
--- diff/sound/pci/rme32.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/rme32.c	2004-07-01 21:32:55.000000000 +0100
@@ -213,10 +213,6 @@
 	size_t playback_periodsize;	/* in bytes, zero if not used */
 	size_t capture_periodsize;	/* in bytes, zero if not used */
 
-	snd_pcm_uframes_t playback_last_appl_ptr;
-	size_t playback_ptr;
-	size_t capture_ptr;
-
 	snd_card_t *card;
 	snd_pcm_t *spdif_pcm;
 	snd_pcm_t *adat_pcm;
@@ -329,6 +325,7 @@
 static snd_pcm_hardware_t snd_rme32_playback_spdif_info = {
 	.info =		(SNDRV_PCM_INFO_MMAP |
 			 SNDRV_PCM_INFO_MMAP_VALID |
+			 SNDRV_PCM_INFO_MMAP_IOMEM |
 			 SNDRV_PCM_INFO_INTERLEAVED | 
 			 SNDRV_PCM_INFO_PAUSE),
 	.formats =	(SNDRV_PCM_FMTBIT_S16_LE | 
@@ -354,6 +351,7 @@
 static snd_pcm_hardware_t snd_rme32_capture_spdif_info = {
 	.info =		(SNDRV_PCM_INFO_MMAP |
 			 SNDRV_PCM_INFO_MMAP_VALID |
+			 SNDRV_PCM_INFO_MMAP_IOMEM |
 			 SNDRV_PCM_INFO_INTERLEAVED | 
 			 SNDRV_PCM_INFO_PAUSE),
 	.formats =	(SNDRV_PCM_FMTBIT_S16_LE | 
@@ -380,6 +378,7 @@
 {
 	.info =		     (SNDRV_PCM_INFO_MMAP |
 			      SNDRV_PCM_INFO_MMAP_VALID |
+			      SNDRV_PCM_INFO_MMAP_IOMEM |
 			      SNDRV_PCM_INFO_INTERLEAVED |
 			      SNDRV_PCM_INFO_PAUSE),
 	.formats=            SNDRV_PCM_FMTBIT_S16_LE,
@@ -404,6 +403,7 @@
 {
 	.info =		     (SNDRV_PCM_INFO_MMAP |
 			      SNDRV_PCM_INFO_MMAP_VALID |
+			      SNDRV_PCM_INFO_MMAP_IOMEM |
 			      SNDRV_PCM_INFO_INTERLEAVED |
 			      SNDRV_PCM_INFO_PAUSE),
 	.formats =           SNDRV_PCM_FMTBIT_S16_LE,
@@ -678,10 +678,12 @@
 {
 	int err, rate, dummy;
 	rme32_t *rme32 = _snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+
+	runtime->dma_area = (void *)(rme32->iobase + RME32_IO_DATA_BUFFER);
+	runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER;
+	runtime->dma_bytes = RME32_BUFFER_SIZE;
 
-	if ((err = snd_pcm_lib_malloc_pages(substream,
-				      params_buffer_bytes(params))) < 0)
-		return err;
 	spin_lock_irq(&rme32->lock);
 	if ((rme32->rcreg & RME32_RCR_KMODE) &&
 	    (rate = snd_rme32_capture_getrate(rme32, &dummy)) > 0) {
@@ -719,12 +721,6 @@
 	return 0;
 }
 
-static int snd_rme32_playback_hw_free(snd_pcm_substream_t * substream)
-{
-	snd_pcm_lib_free_pages(substream);
-	return 0;
-}
-
 static int
 snd_rme32_capture_hw_params(snd_pcm_substream_t * substream,
 			    snd_pcm_hw_params_t * params)
@@ -734,9 +730,10 @@
 	rme32_t *rme32 = _snd_pcm_substream_chip(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
 
-	if ((err = snd_pcm_lib_malloc_pages(substream,
-				      params_buffer_bytes(params))) < 0)
-		return err;
+	runtime->dma_area = (void *)(rme32->iobase + RME32_IO_DATA_BUFFER);
+	runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER;
+	runtime->dma_bytes = RME32_BUFFER_SIZE;
+
 	spin_lock_irqsave(&rme32->lock, flags);
 	/* enable AutoSync for record-preparing */
 	rme32->wcreg |= RME32_WCR_AUTOSYNC;
@@ -780,18 +777,10 @@
 	return 0;
 }
 
-static int snd_rme32_capture_hw_free(snd_pcm_substream_t * substream)
-{
-	snd_pcm_lib_free_pages(substream);
-	return 0;
-}
-
 static void snd_rme32_playback_start(rme32_t * rme32, int from_pause)
 {
 	if (!from_pause) {
 		writel(0, rme32->iobase + RME32_IO_RESET_POS);
-		rme32->playback_last_appl_ptr = 0;
-		rme32->playback_ptr = 0;
 	}
 
 	rme32->wcreg |= RME32_WCR_START;
@@ -882,8 +871,6 @@
 	rme32->wcreg &= ~RME32_WCR_ADAT;
 	writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER);
 	rme32->playback_substream = substream;
-	rme32->playback_last_appl_ptr = 0;
-	rme32->playback_ptr = 0;
 	spin_unlock_irqrestore(&rme32->lock, flags);
 
 	runtime->hw = snd_rme32_playback_spdif_info;
@@ -927,7 +914,6 @@
                 return -EBUSY;
         }
 	rme32->capture_substream = substream;
-	rme32->capture_ptr = 0;
 	spin_unlock_irqrestore(&rme32->lock, flags);
 
 	runtime->hw = snd_rme32_capture_spdif_info;
@@ -972,8 +958,6 @@
 	rme32->wcreg |= RME32_WCR_ADAT;
 	writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER);
 	rme32->playback_substream = substream;
-	rme32->playback_last_appl_ptr = 0;
-	rme32->playback_ptr = 0;
 	spin_unlock_irqrestore(&rme32->lock, flags);
 	
 	runtime->hw = snd_rme32_playback_adat_info;
@@ -1017,7 +1001,6 @@
 		return -EBUSY;
         }
 	rme32->capture_substream = substream;
-	rme32->capture_ptr = 0;
 	spin_unlock_irqrestore(&rme32->lock, flags);
 
 	snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
@@ -1178,36 +1161,6 @@
 snd_rme32_playback_pointer(snd_pcm_substream_t * substream)
 {
 	rme32_t *rme32 = _snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_pcm_sframes_t diff;
-	size_t bytes;
-
-
-	if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) {
-		diff = runtime->control->appl_ptr -
-		       rme32->playback_last_appl_ptr;
-		rme32->playback_last_appl_ptr = runtime->control->appl_ptr;
-		if (diff != 0 && diff < -(snd_pcm_sframes_t) (runtime->boundary >> 1)) {
-			diff += runtime->boundary;
-		}
-		bytes = diff << rme32->playback_frlog;
-		if (bytes > RME32_BUFFER_SIZE - rme32->playback_ptr) {
-			memcpy_toio((void *)(rme32->iobase + RME32_IO_DATA_BUFFER + rme32->playback_ptr),
-				    runtime->dma_area + rme32->playback_ptr,
-				    RME32_BUFFER_SIZE - rme32->playback_ptr);
-			bytes -= RME32_BUFFER_SIZE - rme32->playback_ptr;
-			if (bytes > RME32_BUFFER_SIZE) {
-				bytes = RME32_BUFFER_SIZE;
-			}
-			memcpy_toio((void *)(rme32->iobase + RME32_IO_DATA_BUFFER),
-				    runtime->dma_area, bytes);
-			rme32->playback_ptr = bytes;
-		} else if (bytes != 0) {
-			memcpy_toio((void *)(rme32->iobase + RME32_IO_DATA_BUFFER + rme32->playback_ptr),
-				    runtime->dma_area + rme32->playback_ptr, bytes);
-			rme32->playback_ptr += bytes;
-		}
-	}
 	return snd_rme32_playback_ptr(rme32);
 }
 
@@ -1215,31 +1168,7 @@
 snd_rme32_capture_pointer(snd_pcm_substream_t * substream)
 {
 	rme32_t *rme32 = _snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_pcm_uframes_t frameptr;
-	size_t ptr;
-
-	frameptr = snd_rme32_capture_ptr(rme32);
-	if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) {
-		ptr = frameptr << rme32->capture_frlog;
-		if (ptr > rme32->capture_ptr) {
-			memcpy_fromio(runtime->dma_area + rme32->capture_ptr,
-				      (void *)(rme32->iobase + RME32_IO_DATA_BUFFER +
-					       rme32->capture_ptr),
-				      ptr - rme32->capture_ptr);
-			rme32->capture_ptr += ptr - rme32->capture_ptr;
-		} else if (ptr < rme32->capture_ptr) {
-			memcpy_fromio(runtime->dma_area + rme32->capture_ptr,
-				      (void *)(rme32->iobase + RME32_IO_DATA_BUFFER +
-					       rme32->capture_ptr),
-				      RME32_BUFFER_SIZE - rme32->capture_ptr);
-			memcpy_fromio(runtime->dma_area,
-				      (void *)(rme32->iobase + RME32_IO_DATA_BUFFER),
-				      ptr);
-			rme32->capture_ptr = ptr;
-		}
-	}
-	return frameptr;
+	return snd_rme32_capture_ptr(rme32);
 }
 
 static snd_pcm_ops_t snd_rme32_playback_spdif_ops = {
@@ -1247,7 +1176,6 @@
 	.close =	snd_rme32_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_playback_hw_params,
-	.hw_free =	snd_rme32_playback_hw_free,
 	.prepare =	snd_rme32_playback_prepare,
 	.trigger =	snd_rme32_playback_trigger,
 	.pointer =	snd_rme32_playback_pointer,
@@ -1260,7 +1188,6 @@
 	.close =	snd_rme32_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_capture_hw_params,
-	.hw_free =	snd_rme32_capture_hw_free,
 	.prepare =	snd_rme32_capture_prepare,
 	.trigger =	snd_rme32_capture_trigger,
 	.pointer =	snd_rme32_capture_pointer,
@@ -1272,7 +1199,6 @@
 	.close =	snd_rme32_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_playback_hw_params,
-	.hw_free =	snd_rme32_playback_hw_free,
 	.prepare =	snd_rme32_playback_prepare,
 	.trigger =	snd_rme32_playback_trigger,
 	.pointer =	snd_rme32_playback_pointer,
@@ -1285,7 +1211,6 @@
 	.close =	snd_rme32_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_capture_hw_params,
-	.hw_free =	snd_rme32_capture_hw_free,
 	.prepare =	snd_rme32_capture_prepare,
 	.trigger =	snd_rme32_capture_trigger,
 	.pointer =	snd_rme32_capture_pointer,
@@ -1319,7 +1244,6 @@
 {
 	rme32_t *rme32 = (rme32_t *) pcm->private_data;
 	rme32->spdif_pcm = NULL;
-	snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
 static void
@@ -1327,7 +1251,6 @@
 {
 	rme32_t *rme32 = (rme32_t *) pcm->private_data;
 	rme32->adat_pcm = NULL;
-	snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
 static int __devinit snd_rme32_create(rme32_t * rme32)
@@ -1376,13 +1299,7 @@
 	snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE,
 			&snd_rme32_capture_spdif_ops);
 
-	rme32->spdif_pcm->info_flags = 0;
-
-	snd_pcm_lib_preallocate_pages_for_all(rme32->spdif_pcm,
-					      SNDRV_DMA_TYPE_CONTINUOUS,
-					      snd_dma_continuous_data(GFP_KERNEL),
-					      RME32_BUFFER_SIZE,
-					      RME32_BUFFER_SIZE);
+	rme32->spdif_pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX;
 
 	/* set up ALSA pcm device for ADAT */
 	if ((pci->device == PCI_DEVICE_ID_DIGI32) ||
@@ -1404,13 +1321,7 @@
 		snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, 
 				&snd_rme32_capture_adat_ops);
 		
-		rme32->adat_pcm->info_flags = 0;
-
-		snd_pcm_lib_preallocate_pages_for_all(rme32->adat_pcm, 
-						      SNDRV_DMA_TYPE_CONTINUOUS,
-						      snd_dma_continuous_data(GFP_KERNEL),
-						      RME32_BUFFER_SIZE, 
-						      RME32_BUFFER_SIZE);
+		rme32->adat_pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX;
 	}
 
 
--- diff/sound/pci/rme96.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/rme96.c	2004-07-01 21:32:55.000000000 +0100
@@ -250,10 +250,6 @@
         size_t playback_periodsize; /* in bytes, zero if not used */
 	size_t capture_periodsize; /* in bytes, zero if not used */
 
-        snd_pcm_uframes_t playback_last_appl_ptr;
-	size_t playback_ptr;
-	size_t capture_ptr;
-
 	snd_card_t         *card;
 	snd_pcm_t          *spdif_pcm;
 	snd_pcm_t          *adat_pcm; 
@@ -394,6 +390,7 @@
 {
 	.info =		     (SNDRV_PCM_INFO_MMAP |
 			      SNDRV_PCM_INFO_MMAP_VALID |
+			      SNDRV_PCM_INFO_MMAP_IOMEM |
 			      SNDRV_PCM_INFO_INTERLEAVED |
 			      SNDRV_PCM_INFO_PAUSE),
 	.formats =	     (SNDRV_PCM_FMTBIT_S16_LE |
@@ -423,6 +420,7 @@
 {
 	.info =		     (SNDRV_PCM_INFO_MMAP |
 			      SNDRV_PCM_INFO_MMAP_VALID |
+			      SNDRV_PCM_INFO_MMAP_IOMEM |
 			      SNDRV_PCM_INFO_INTERLEAVED |
 			      SNDRV_PCM_INFO_PAUSE),
 	.formats =	     (SNDRV_PCM_FMTBIT_S16_LE |
@@ -452,6 +450,7 @@
 {
 	.info =		     (SNDRV_PCM_INFO_MMAP |
 			      SNDRV_PCM_INFO_MMAP_VALID |
+			      SNDRV_PCM_INFO_MMAP_IOMEM |
 			      SNDRV_PCM_INFO_INTERLEAVED |
 			      SNDRV_PCM_INFO_PAUSE),
 	.formats =	     (SNDRV_PCM_FMTBIT_S16_LE |
@@ -477,6 +476,7 @@
 {
 	.info =		     (SNDRV_PCM_INFO_MMAP |
 			      SNDRV_PCM_INFO_MMAP_VALID |
+			      SNDRV_PCM_INFO_MMAP_IOMEM |
 			      SNDRV_PCM_INFO_INTERLEAVED |
 			      SNDRV_PCM_INFO_PAUSE),
 	.formats =	     (SNDRV_PCM_FMTBIT_S16_LE |
@@ -993,10 +993,13 @@
 {
 	unsigned long flags;        
 	rme96_t *rme96 = _snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
 	int err, rate, dummy;
 
-	if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params))) < 0)
-		return err;
+	runtime->dma_area = (void *)(rme96->iobase + RME96_IO_PLAY_BUFFER);
+	runtime->dma_addr = rme96->port + RME96_IO_PLAY_BUFFER;
+	runtime->dma_bytes = RME96_BUFFER_SIZE;
+
 	spin_lock_irqsave(&rme96->lock, flags);
 	if (!(rme96->wcreg & RME96_WCR_MASTER) &&
             snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG &&
@@ -1038,13 +1041,6 @@
 }
 
 static int
-snd_rme96_playback_hw_free(snd_pcm_substream_t *substream)
-{
-	snd_pcm_lib_free_pages(substream);
-	return 0;
-}
-
-static int
 snd_rme96_capture_hw_params(snd_pcm_substream_t *substream,
 			    snd_pcm_hw_params_t *params)
 {
@@ -1053,8 +1049,10 @@
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	int err, isadat, rate;
 	
-	if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params))) < 0)
-		return err;
+	runtime->dma_area = (void *)(rme96->iobase + RME96_IO_REC_BUFFER);
+	runtime->dma_addr = rme96->port + RME96_IO_REC_BUFFER;
+	runtime->dma_bytes = RME96_BUFFER_SIZE;
+
 	spin_lock_irqsave(&rme96->lock, flags);
 	if ((err = snd_rme96_capture_setformat(rme96, params_format(params))) < 0) {
 		spin_unlock_irqrestore(&rme96->lock, flags);
@@ -1096,21 +1094,12 @@
 	return 0;
 }
 
-static int
-snd_rme96_capture_hw_free(snd_pcm_substream_t *substream)
-{
-	snd_pcm_lib_free_pages(substream);
-	return 0;
-}
-
 static void
 snd_rme96_playback_start(rme96_t *rme96,
 			 int from_pause)
 {
 	if (!from_pause) {
 		writel(0, rme96->iobase + RME96_IO_RESET_PLAY_POS);
-		rme96->playback_last_appl_ptr = 0;
-		rme96->playback_ptr = 0;
 	}
 
 	rme96->wcreg |= RME96_WCR_START;
@@ -1123,7 +1112,6 @@
 {
 	if (!from_pause) {
 		writel(0, rme96->iobase + RME96_IO_RESET_REC_POS);
-		rme96->capture_ptr = 0;
 	}
 
 	rme96->wcreg |= RME96_WCR_START_2;
@@ -1212,8 +1200,6 @@
 	rme96->wcreg &= ~RME96_WCR_ADAT;
 	writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER);
 	rme96->playback_substream = substream;
-	rme96->playback_last_appl_ptr = 0;
-	rme96->playback_ptr = 0;
 	spin_unlock_irqrestore(&rme96->lock, flags);
 
 	runtime->hw = snd_rme96_playback_spdif_info;
@@ -1264,7 +1250,6 @@
                 return -EBUSY;
         }
 	rme96->capture_substream = substream;
-	rme96->capture_ptr = 0;
 	spin_unlock_irqrestore(&rme96->lock, flags);
 	
 	snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE);
@@ -1291,8 +1276,6 @@
 	rme96->wcreg |= RME96_WCR_ADAT;
 	writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER);
 	rme96->playback_substream = substream;
-	rme96->playback_last_appl_ptr = 0;
-	rme96->playback_ptr = 0;
 	spin_unlock_irqrestore(&rme96->lock, flags);
 	
 	runtime->hw = snd_rme96_playback_adat_info;
@@ -1341,7 +1324,6 @@
                 return -EBUSY;
         }
 	rme96->capture_substream = substream;
-	rme96->capture_ptr = 0;
 	spin_unlock_irqrestore(&rme96->lock, flags);
 
 	snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE);
@@ -1509,42 +1491,6 @@
 snd_rme96_playback_pointer(snd_pcm_substream_t *substream)
 {
 	rme96_t *rme96 = _snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_pcm_sframes_t diff;
-	size_t bytes;
-	
-	if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) {
-		diff = runtime->control->appl_ptr -
-		    rme96->playback_last_appl_ptr;
- 	        rme96->playback_last_appl_ptr = runtime->control->appl_ptr;
-	        if (diff != 0 &&
-		    diff < -(snd_pcm_sframes_t)(runtime->boundary >> 1))
-		{
-		        diff += runtime->boundary;
-		}
-		bytes = diff << rme96->playback_frlog;
-		
-		if (bytes > RME96_BUFFER_SIZE - rme96->playback_ptr) {
-			memcpy_toio((void *)(rme96->iobase + RME96_IO_PLAY_BUFFER +
-					     rme96->playback_ptr),
-				    runtime->dma_area + rme96->playback_ptr,
-				    RME96_BUFFER_SIZE - rme96->playback_ptr);
-		        bytes -= RME96_BUFFER_SIZE - rme96->playback_ptr;
-			if (bytes > RME96_BUFFER_SIZE) {
-			        bytes = RME96_BUFFER_SIZE;
-			}
-			memcpy_toio((void *)(rme96->iobase + RME96_IO_PLAY_BUFFER),
-				    runtime->dma_area,
-				    bytes);
-			rme96->playback_ptr = bytes;
-		} else if (bytes != 0) {
-			memcpy_toio((void *)(rme96->iobase + RME96_IO_PLAY_BUFFER +
-					     rme96->playback_ptr),
-				    runtime->dma_area + rme96->playback_ptr,
-				    bytes);
-			rme96->playback_ptr += bytes;
-		}
-	}
 	return snd_rme96_playback_ptr(rme96);
 }
 
@@ -1552,31 +1498,7 @@
 snd_rme96_capture_pointer(snd_pcm_substream_t *substream)
 {
 	rme96_t *rme96 = _snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_pcm_uframes_t frameptr;
-	size_t ptr;
-
-	frameptr = snd_rme96_capture_ptr(rme96);
-	if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) {
-		ptr = frameptr << rme96->capture_frlog;
-		if (ptr > rme96->capture_ptr) {
-			memcpy_fromio(runtime->dma_area + rme96->capture_ptr,
-				      (void *)(rme96->iobase + RME96_IO_REC_BUFFER +
-					       rme96->capture_ptr),
-				      ptr - rme96->capture_ptr);
-			rme96->capture_ptr += ptr - rme96->capture_ptr;
-		} else if (ptr < rme96->capture_ptr) {
-			memcpy_fromio(runtime->dma_area + rme96->capture_ptr,
-				      (void *)(rme96->iobase + RME96_IO_REC_BUFFER +
-					       rme96->capture_ptr),
-				      RME96_BUFFER_SIZE - rme96->capture_ptr);
-			memcpy_fromio(runtime->dma_area,
-				      (void *)(rme96->iobase + RME96_IO_REC_BUFFER),
-				      ptr);
-			rme96->capture_ptr = ptr;
-		}
-	}
-	return frameptr;
+	return snd_rme96_capture_ptr(rme96);
 }
 
 static snd_pcm_ops_t snd_rme96_playback_spdif_ops = {
@@ -1584,7 +1506,6 @@
 	.close =	snd_rme96_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme96_playback_hw_params,
-	.hw_free =	snd_rme96_playback_hw_free,
 	.prepare =	snd_rme96_playback_prepare,
 	.trigger =	snd_rme96_playback_trigger,
 	.pointer =	snd_rme96_playback_pointer,
@@ -1597,7 +1518,6 @@
 	.close =	snd_rme96_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme96_capture_hw_params,
-	.hw_free =	snd_rme96_capture_hw_free,
 	.prepare =	snd_rme96_capture_prepare,
 	.trigger =	snd_rme96_capture_trigger,
 	.pointer =	snd_rme96_capture_pointer,
@@ -1609,7 +1529,6 @@
 	.close =	snd_rme96_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme96_playback_hw_params,
-	.hw_free =	snd_rme96_playback_hw_free,
 	.prepare =	snd_rme96_playback_prepare,
 	.trigger =	snd_rme96_playback_trigger,
 	.pointer =	snd_rme96_playback_pointer,
@@ -1622,7 +1541,6 @@
 	.close =	snd_rme96_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme96_capture_hw_params,
-	.hw_free =	snd_rme96_capture_hw_free,
 	.prepare =	snd_rme96_capture_prepare,
 	.trigger =	snd_rme96_capture_trigger,
 	.pointer =	snd_rme96_capture_pointer,
@@ -1661,7 +1579,6 @@
 {
 	rme96_t *rme96 = (rme96_t *) pcm->private_data;
 	rme96->spdif_pcm = NULL;
-	snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
 static void
@@ -1669,7 +1586,6 @@
 {
 	rme96_t *rme96 = (rme96_t *) pcm->private_data;
 	rme96->adat_pcm = NULL;
-	snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
 static int __devinit
@@ -1719,12 +1635,6 @@
 
 	rme96->spdif_pcm->info_flags = 0;
 
-	snd_pcm_lib_preallocate_pages_for_all(rme96->spdif_pcm,
-					      SNDRV_DMA_TYPE_CONTINUOUS,
-					      snd_dma_continuous_data(GFP_KERNEL),
-					      RME96_BUFFER_SIZE,
-					      RME96_BUFFER_SIZE);
-
 	/* set up ALSA pcm device for ADAT */
 	if (pci->device == PCI_DEVICE_ID_DIGI96) {
 		/* ADAT is not available on the base model */
@@ -1742,12 +1652,6 @@
 		snd_pcm_set_ops(rme96->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_rme96_capture_adat_ops);
 		
 		rme96->adat_pcm->info_flags = 0;
-
-		snd_pcm_lib_preallocate_pages_for_all(rme96->adat_pcm,
-						      SNDRV_DMA_TYPE_CONTINUOUS,
-						      snd_dma_continuous_data(GFP_KERNEL),
-						      RME96_BUFFER_SIZE,
-						      RME96_BUFFER_SIZE);
 	}
 
 	rme96->playback_periodsize = 0;
--- diff/sound/pci/trident/trident_memory.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/trident/trident_memory.c	2004-07-01 21:32:55.000000000 +0100
@@ -189,7 +189,7 @@
 	snd_util_memblk_t *blk;
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	int idx, page;
-	struct snd_sg_buf *sgbuf = runtime->dma_private;
+	struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
 
 	snd_assert(runtime->dma_bytes > 0 && runtime->dma_bytes <= SNDRV_TRIDENT_MAX_PAGES * SNDRV_TRIDENT_PAGE_SIZE, return NULL);
 	hdr = trident->tlb.memhdr;
--- diff/sound/pci/via82xx.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/pci/via82xx.c	2004-07-01 21:32:55.000000000 +0100
@@ -725,7 +725,11 @@
 	unsigned int size, res;
 
 	size = viadev->idx_table[idx].size;
-	res = viadev->idx_table[idx].offset + size - count;
+	/* FIXME: is this always true? */
+	if (count)
+		res = viadev->idx_table[idx].offset + size - count;
+	else
+		res = viadev->idx_table[idx].offset;
 
 	/* check the validity of the calculated position */
 	if (size < count || (res < viadev->lastpos && (res >= viadev->bufsize2 || viadev->lastpos < viadev->bufsize2))) {
@@ -1035,6 +1039,7 @@
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
 				 SNDRV_PCM_INFO_MMAP_VALID |
+				 SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_PAUSE),
 	.formats =		SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
 	.rates =		SNDRV_PCM_RATE_48000,
@@ -1060,19 +1065,6 @@
 	int err;
 	unsigned long flags;
 	struct via_rate_lock *ratep;
-	struct ratetbl {
-		int rate;
-		unsigned int bit;
-	} ratebits[] = {
-		{8000, SNDRV_PCM_RATE_8000},
-		{11025, SNDRV_PCM_RATE_11025},
-		{16000, SNDRV_PCM_RATE_16000},
-		{22050, SNDRV_PCM_RATE_22050},
-		{32000, SNDRV_PCM_RATE_32000},
-		{44100, SNDRV_PCM_RATE_44100},
-		{48000, SNDRV_PCM_RATE_48000},
-	};
-	int i;
 
 	runtime->hw = snd_via82xx_hw;
 	
@@ -1080,10 +1072,10 @@
 	ratep = &chip->rates[viadev->direction];
 	spin_lock_irqsave(&ratep->lock, flags);
 	ratep->used++;
-	if (chip->spdif_on) {
-		runtime->hw.rates = SNDRV_PCM_RATE_32000|SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000;
-		runtime->hw.rate_min = 32000;
-		runtime->hw.rate_max = 48000;
+	if (chip->spdif_on && viadev->reg_offset == 0x30) {
+		/* DXS#3 and spdif is on */
+		runtime->hw.rates = chip->ac97->rates[AC97_RATES_SPDIF];
+		snd_pcm_limit_hw_rates(runtime);
 	} else if (chip->dxs_fixed && viadev->reg_offset < 0x40) {
 		/* fixed DXS playback rate */
 		runtime->hw.rates = SNDRV_PCM_RATE_48000;
@@ -1091,27 +1083,10 @@
 	} else if (! ratep->rate) {
 		int idx = viadev->direction ? AC97_RATES_ADC : AC97_RATES_FRONT_DAC;
 		runtime->hw.rates = chip->ac97->rates[idx];
-		for (i = 0; i < (int)ARRAY_SIZE(ratebits); i++) {
-			if (runtime->hw.rates & ratebits[i].bit) {
-				runtime->hw.rate_min = ratebits[i].rate;
-				break;
-			}
-		}
-		for (i = ARRAY_SIZE(ratebits) - 1; i >= 0; i--) {
-			if (runtime->hw.rates & ratebits[i].bit) {
-				runtime->hw.rate_max = ratebits[i].rate;
-				break;
-			}
-		}
+		snd_pcm_limit_hw_rates(runtime);
 	} else {
 		/* a fixed rate */
 		runtime->hw.rates = SNDRV_PCM_RATE_KNOT;
-		for (i = 0; i < (int)ARRAY_SIZE(ratebits); i++) {
-			if (ratep->rate == ratebits[i].rate) {
-				runtime->hw.rates = ratebits[i].bit;
-				break;
-			}
-		}
 		runtime->hw.rate_max = runtime->hw.rate_min = ratep->rate;
 	}
 	spin_unlock_irqrestore(&ratep->lock, flags);
@@ -1363,6 +1338,10 @@
 							 snd_dma_pci_data(chip->pci), 64*1024, 128*1024)) < 0)
 		return err;
 
+	/* SPDIF supported? */
+	if (! ac97_can_spdif(chip->ac97))
+		return 0;
+
 	/* PCM #1:  DXS3 playback (for spdif) */
 	err = snd_pcm_new(chip->card, chip->card->shortname, 1, 1, 0, &pcm);
 	if (err < 0)
@@ -1660,9 +1639,11 @@
 		if (err < 0)
 			return err;
 	}
-	err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs3_spdif_control, chip));
-	if (err < 0)
-		return err;
+	if (ac97_can_spdif(chip->ac97)) {
+		err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs3_spdif_control, chip));
+		if (err < 0)
+			return err;
+	}
 	if (chip->chip_type != TYPE_VIA8233A) {
 		err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs_volume_control, chip));
 		if (err < 0)
@@ -1672,6 +1653,7 @@
 	/* select spdif data slot 10/11 */
 	pci_read_config_byte(chip->pci, VIA8233_SPDIF_CTRL, &val);
 	val = (val & ~VIA8233_SPDIF_SLOT_MASK) | VIA8233_SPDIF_SLOT_1011;
+	val &= ~VIA8233_SPDIF_DX3; /* SPDIF off as default */
 	pci_write_config_byte(chip->pci, VIA8233_SPDIF_CTRL, val);
 
 	return 0;
@@ -2114,6 +2096,7 @@
 		{ .vendor = 0x1043, .device = 0x8095, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8X (FIXME: possibly VIA_DXS_ENABLE?)*/
 		{ .vendor = 0x1043, .device = 0x80a1, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8-X */
 		{ .vendor = 0x1043, .device = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ 
+		{ .vendor = 0x1071, .device = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */
 		{ .vendor = 0x10cf, .device = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */
 		{ .vendor = 0x1106, .device = 0x4161, .action = VIA_DXS_NO_VRA }, /* ASRock K7VT2 */
 		{ .vendor = 0x1106, .device = 0xaa01, .action = VIA_DXS_NO_VRA }, /* EPIA MII */
--- diff/sound/ppc/pmac.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/ppc/pmac.c	2004-07-01 21:32:55.000000000 +0100
@@ -931,6 +931,13 @@
 		chip->freq_table = tumbler_freqs;
 		chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */
 	}
+	if (device_is_compatible(sound, "AOAKeylargo")) {
+		/* Seems to support the stock AWACS frequencies, but has
+		   a snapper mixer */
+		chip->model = PMAC_SNAPPER;
+		// chip->can_byte_swap = 0; /* FIXME: check this */
+		chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */
+	}
 	prop = (unsigned int *)get_property(sound, "device-id", 0);
 	if (prop)
 		chip->device_id = *prop;
--- diff/sound/usb/usbaudio.c	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/usb/usbaudio.c	2004-07-01 21:32:55.000000000 +0100
@@ -1183,9 +1183,9 @@
 		if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR,
 					   USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_IN,
 					   SAMPLING_FREQ_CONTROL << 8, ep, data, 3, HZ)) < 0) {
-			snd_printk(KERN_ERR "%d:%d:%d: cannot get freq at ep 0x%x\n",
+			snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq at ep 0x%x\n",
 				   dev->devnum, iface, fmt->altsetting, ep);
-			return err;
+			return 0; /* some devices don't support reading */
 		}
 		crate = data[0] | (data[1] << 8) | (data[2] << 16);
 		if (crate != rate) {
@@ -2182,6 +2182,24 @@
 
 
 /*
+ * check if the device uses big-endian samples
+ */
+static int is_big_endian_format(struct usb_device *dev, struct audioformat *fp)
+{
+	/* M-Audio */
+	if (dev->descriptor.idVendor == 0x0763) {
+		/* Quattro: captured data only */
+		if (dev->descriptor.idProduct == 0x2001 &&
+		    fp->endpoint & USB_DIR_IN)
+			return 1;
+		/* Audiophile USB */
+		if (dev->descriptor.idProduct == 0x2003)
+			return 1;
+	}
+	return 0;
+}
+
+/*
  * parse the audio format type I descriptor
  * and returns the corresponding pcm format
  *
@@ -2217,17 +2235,13 @@
 			pcm_format = SNDRV_PCM_FORMAT_S8;
 			break;
 		case 2:
-			/* M-Audio audiophile USB workaround */
-			if (dev->descriptor.idVendor == 0x0763 &&
-			    dev->descriptor.idProduct == 0x2003)
+			if (is_big_endian_format(dev, fp))
 				pcm_format = SNDRV_PCM_FORMAT_S16_BE; /* grrr, big endian!! */
 			else
 				pcm_format = SNDRV_PCM_FORMAT_S16_LE;
 			break;
 		case 3:
-			/* M-Audio audiophile USB workaround */
-			if (dev->descriptor.idVendor == 0x0763 &&
-			    dev->descriptor.idProduct == 0x2003)
+			if (is_big_endian_format(dev, fp))
 				pcm_format = SNDRV_PCM_FORMAT_S24_3BE; /* grrr, big endian!! */
 			else
 				pcm_format = SNDRV_PCM_FORMAT_S24_3LE;
--- diff/sound/usb/usbaudio.h	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/usb/usbaudio.h	2004-07-01 21:32:55.000000000 +0100
@@ -205,6 +205,8 @@
 int snd_usb_create_mixer(snd_usb_audio_t *chip, int ctrlif);
 
 int snd_usb_create_midi_interface(snd_usb_audio_t *chip, struct usb_interface *iface, const snd_usb_audio_quirk_t *quirk);
+void snd_usbmidi_input_stop(struct list_head* p);
+void snd_usbmidi_input_start(struct list_head* p);
 void snd_usbmidi_disconnect(struct list_head *p, struct usb_driver *driver);
 
 /*
--- diff/sound/usb/usbmidi.c	2004-05-19 22:13:25.000000000 +0100
+++ source/sound/usb/usbmidi.c	2004-07-01 21:32:55.000000000 +0100
@@ -1145,6 +1145,44 @@
 }
 
 /*
+ * Temporarily stop input. 
+ */
+void snd_usbmidi_input_stop(struct list_head* p)
+{
+	snd_usb_midi_t* umidi;
+	int i;
+
+	umidi = list_entry(p, snd_usb_midi_t, list);
+	for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
+		snd_usb_midi_endpoint_t* ep = &umidi->endpoints[i];
+		if (ep->in)
+			usb_unlink_urb(ep->in->urb);
+	}
+}
+
+static void snd_usbmidi_input_start_ep(snd_usb_midi_in_endpoint_t* ep)
+{
+	if (ep) {
+		struct urb* urb = ep->urb; 
+		urb->dev = ep->umidi->chip->dev;
+		snd_usbmidi_submit_urb(urb, GFP_KERNEL);
+	}
+}
+
+/*
+ * Resume input after a call to snd_usbmidi_input_stop().
+ */
+void snd_usbmidi_input_start(struct list_head* p)
+{
+	snd_usb_midi_t* umidi;
+	int i;
+
+	umidi = list_entry(p, snd_usb_midi_t, list);
+	for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i)
+		snd_usbmidi_input_start_ep(umidi->endpoints[i].in);
+}
+
+/*
  * Creates and registers everything needed for a MIDI streaming interface.
  */
 int snd_usb_create_midi_interface(snd_usb_audio_t* chip,
@@ -1219,8 +1257,6 @@
 	list_add(&umidi->list, &umidi->chip->midi_list);
 
 	for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i)
-		if (umidi->endpoints[i].in)
-			snd_usbmidi_submit_urb(umidi->endpoints[i].in->urb,
-					       GFP_KERNEL);
+		snd_usbmidi_input_start_ep(umidi->endpoints[i].in);
 	return 0;
 }
--- diff/sound/usb/usbquirks.h	2004-06-30 14:26:09.000000000 +0100
+++ source/sound/usb/usbquirks.h	2004-07-01 21:32:55.000000000 +0100
@@ -830,11 +830,42 @@
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "M-Audio",
 		.product_name = "Quattro",
-		.ifnum = 9,
-		.type = QUIRK_MIDI_MIDIMAN,
-		.data = & (const snd_usb_midi_endpoint_info_t) {
-			.out_cables = 0x0001,
-			.in_cables  = 0x0001
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = & (const snd_usb_audio_quirk_t[]) {
+			/*
+			 * Interfaces 0-2 are "Windows-compatible", 16-bit only,
+			 * and share endpoints with the other interfaces.
+			 * Ignore them.  The other interfaces can do 24 bits,
+			 * but captured samples are big-endian (see usbaudio.c).
+			 */
+			{
+				.ifnum = 4,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 5,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 7,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 8,
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = 9,
+				.type = QUIRK_MIDI_MIDIMAN,
+				.data = & (const snd_usb_midi_endpoint_info_t) {
+					.out_cables = 0x0001,
+					.in_cables  = 0x0001
+				}
+			},
+			{
+				.ifnum = -1
+			}
 		}
 	}
 },
--- diff/Documentation/arm/Sharp-LH/SDRAM	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/arm/Sharp-LH/SDRAM	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,51 @@
+README on the SDRAM Controller for the LH7a40X
+==============================================
+
+The standard configuration for the SDRAM controller generates a sparse
+memory array.  The precise layout is determined by the SDRAM chips.  A
+default kernel configuration assembles the discontiguous memory
+regions into separate memory nodes via the NUMA (Non-Uniform Memory
+Architecture) facilities.  In this default configuration, the kernel
+is forgiving about the precise layout.  As long as it is given an
+accurate picture of available memory by the bootloader the kernel will
+execute correctly.
+
+The SDRC supports a mode where some of the chip select lines are
+swapped in order to make SDRAM look like a synchronous ROM.  Setting
+this bit means that the RAM will present as a contiguous array.  Some
+programmers prefer this to the discontiguous layout.  Be aware that
+may be a penalty for this feature where some some configurations of
+memory are significantly reduced; i.e. 64MiB of RAM appears as only 32
+MiB.
+
+There are a couple of configuration options to override the default
+behavior.  When the SROMLL bit is set and memory appears as a
+contiguous array, there is no reason to support NUMA.
+CONFIG_LH7A40X_CONTIGMEM disables NUMA support.  When physical memory
+is discontiguous, the memory tables are organized such that there are
+two banks per nodes with a small gap between them.  This layout wastes
+some kernel memory for page tables representing non-existent memory.
+CONFIG_LH7A40X_ONE_BANK_PER_NODE optimizes the node tables such that
+there are no gaps.  These options control the low level organization
+of the memory management tables in ways that may prevent the kernel
+from booting or may cause the kernel to allocated excessively large
+page tables.  Be warned.  Only change these options if you know what
+you are doing.  The default behavior is a reasonable compromise that
+will suit all users.
+
+--
+
+A typical 32MiB system with the default configuration options will
+find physical memory managed as follows.
+
+   node 0: 0xc0000000 4MiB
+           0xc1000000 4MiB
+   node 1: 0xc4000000 4MiB
+           0xc5000000 4MiB
+   node 2: 0xc8000000 4MiB
+           0xc9000000 4MiB
+   node 3: 0xcc000000 4MiB
+           0xcd000000 4MiB
+
+Setting CONFIG_LH7A40X_ONE_BANK_PER_NODE will put each bank into a
+separate node.
--- diff/Documentation/arm/VFP/release-notes.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/arm/VFP/release-notes.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,55 @@
+Release notes for Linux Kernel VFP support code
+-----------------------------------------------
+
+Date: 	20 May 2004
+Author:	Russell King
+
+This is the first release of the Linux Kernel VFP support code.  It
+provides support for the exceptions bounced from VFP hardware found
+on ARM926EJ-S.
+
+This release has been validated against the SoftFloat-2b library by
+John R. Hauser using the TestFloat-2a test suite.  Details of this
+library and test suite can be found at:
+
+   http://www.cs.berkeley.edu/~jhauser/arithmetic/SoftFloat.html
+
+The operations which have been tested with this package are:
+
+ - fdiv
+ - fsub
+ - fadd
+ - fmul
+ - fcmp
+ - fcmpe
+ - fcvtd
+ - fcvts
+ - fsito
+ - ftosi
+ - fsqrt
+
+All the above pass softfloat tests with the following exceptions:
+
+- fadd/fsub shows some differences in the handling of +0 / -0 results
+  when input operands differ in signs.
+- the handling of underflow exceptions is slightly different.  If a
+  result underflows before rounding, but becomes a normalised number
+  after rounding, we do not signal an underflow exception.
+
+Other operations which have been tested by basic assembly-only tests
+are:
+
+ - fcpy
+ - fabs
+ - fneg
+ - ftoui
+ - ftosiz
+ - ftouiz
+
+The combination operations have not been tested:
+
+ - fmac
+ - fnmac
+ - fmsc
+ - fnmsc
+ - fnmul
--- diff/Documentation/block/as-iosched.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/block/as-iosched.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,165 @@
+Anticipatory IO scheduler
+-------------------------
+Nick Piggin <piggin@cyberone.com.au>    13 Sep 2003
+
+Attention! Database servers, especially those using "TCQ" disks should
+investigate performance with the 'deadline' IO scheduler. Any system with high
+disk performance requirements should do so, in fact.
+
+If you see unusual performance characteristics of your disk systems, or you
+see big performance regressions versus the deadline scheduler, please email
+me. Database users don't bother unless you're willing to test a lot of patches
+from me ;) its a known issue.
+
+Also, users with hardware RAID controllers, doing striping, may find
+highly variable performance results with using the as-iosched. The
+as-iosched anticipatory implementation is based on the notion that a disk
+device has only one physical seeking head.  A striped RAID controller
+actually has a head for each physical device in the logical RAID device.
+
+However, setting the antic_expire (see tunable parameters below) produces
+very similar behavior to the deadline IO scheduler.
+
+
+Selecting IO schedulers
+-----------------------
+To choose IO schedulers at boot time, use the argument 'elevator=deadline'.
+'noop' and 'as' (the default) are also available. IO schedulers are assigned
+globally at boot time only presently.
+
+
+Anticipatory IO scheduler Policies
+----------------------------------
+The as-iosched implementation implements several layers of policies
+to determine when an IO request is dispatched to the disk controller.
+Here are the policies outlined, in order of application.
+
+1. one-way Elevator algorithm.
+
+The elevator algorithm is similar to that used in deadline scheduler, with
+the addition that it allows limited backward movement of the elevator
+(i.e. seeks backwards).  A seek backwards can occur when choosing between
+two IO requests where one is behind the elevator's current position, and
+the other is in front of the elevator's position. If the seek distance to
+the request in back of the elevator is less than half the seek distance to
+the request in front of the elevator, then the request in back can be chosen.
+Backward seeks are also limited to a maximum of MAXBACK (1024*1024) sectors.
+This favors forward movement of the elevator, while allowing opportunistic
+"short" backward seeks.
+
+2. FIFO expiration times for reads and for writes.
+
+This is again very similar to the deadline IO scheduler.  The expiration
+times for requests on these lists is tunable using the parameters read_expire
+and write_expire discussed below.  When a read or a write expires in this way,
+the IO scheduler will interrupt its current elevator sweep or read anticipation
+to service the expired request.
+
+3. Read and write request batching
+
+A batch is a collection of read requests or a collection of write
+requests.  The as scheduler alternates dispatching read and write batches
+to the driver.  In the case a read batch, the scheduler submits read
+requests to the driver as long as there are read requests to submit, and
+the read batch time limit has not been exceeded (read_batch_expire).
+The read batch time limit begins counting down only when there are
+competing write requests pending.
+
+In the case of a write batch, the scheduler submits write requests to
+the driver as long as there are write requests available, and the
+write batch time limit has not been exceeded (write_batch_expire).
+However, the length of write batches will be gradually shortened
+when read batches frequently exceed their time limit.
+
+When changing between batch types, the scheduler waits for all requests
+from the previous batch to complete before scheduling requests for the
+next batch.
+
+The read and write fifo expiration times described in policy 2 above
+are checked only when in scheduling IO of a batch for the corresponding
+(read/write) type.  So for example, the read FIFO timeout values are
+tested only during read batches.  Likewise, the write FIFO timeout
+values are tested only during write batches.  For this reason,
+it is generally not recommended for the read batch time
+to be longer than the write expiration time, nor for the write batch
+time to exceed the read expiration time (see tunable parameters below).
+
+When the IO scheduler changes from a read to a write batch,
+it begins the elevator from the request that is on the head of the
+write expiration FIFO.  Likewise, when changing from a write batch to
+a read batch, scheduler begins the elevator from the first entry
+on the read expiration FIFO.
+
+4. Read anticipation.
+
+Read anticipation occurs only when scheduling a read batch.
+This implementation of read anticipation allows only one read request
+to be dispatched to the disk controller at a time.  In
+contrast, many write requests may be dispatched to the disk controller
+at a time during a write batch.  It is this characteristic that can make
+the anticipatory scheduler perform anomalously with controllers supporting
+TCQ, or with hardware striped RAID devices. Setting the antic_expire
+queue paramter (see below) to zero disables this behavior, and the anticipatory
+scheduler behaves essentially like the deadline scheduler.
+
+When read anticipation is enabled (antic_expire is not zero), reads
+are dispatched to the disk controller one at a time.
+At the end of each read request, the IO scheduler examines its next
+candidate read request from its sorted read list.  If that next request
+is from the same process as the request that just completed,
+or if the next request in the queue is "very close" to the
+just completed request, it is dispatched immediately.  Otherwise,
+statistics (average think time, average seek distance) on the process
+that submitted the just completed request are examined.  If it seems
+likely that that process will submit another request soon, and that
+request is likely to be near the just completed request, then the IO
+scheduler will stop dispatching more read requests for up time (antic_expire)
+milliseconds, hoping that process will submit a new request near the one
+that just completed.  If such a request is made, then it is dispatched
+immediately.  If the antic_expire wait time expires, then the IO scheduler
+will dispatch the next read request from the sorted read queue.
+
+To decide whether an anticipatory wait is worthwhile, the scheduler
+maintains statistics for each process that can be used to compute
+mean "think time" (the time between read requests), and mean seek
+distance for that process.  One observation is that these statistics
+are associated with each process, but those statistics are not associated
+with a specific IO device.  So for example, if a process is doing IO
+on several file systems on separate devices, the statistics will be
+a combination of IO behavior from all those devices.
+
+
+Tuning the anticipatory IO scheduler
+------------------------------------
+When using 'as', the anticipatory IO scheduler there are 5 parameters under
+/sys/block/*/iosched/. All are units of milliseconds.
+
+The parameters are:
+* read_expire
+    Controls how long until a read request becomes "expired". It also controls the
+    interval between which expired requests are served, so set to 50, a request
+    might take anywhere < 100ms to be serviced _if_ it is the next on the
+    expired list. Obviously request expiration strategies won't make the disk
+    go faster. The result basically equates to the timeslice a single reader
+    gets in the presence of other IO. 100*((seek time / read_expire) + 1) is
+    very roughly the % streaming read efficiency your disk should get with
+    multiple readers.
+
+* read_batch_expire
+    Controls how much time a batch of reads is given before pending writes are
+    served. A higher value is more efficient. This might be set below read_expire
+    if writes are to be given higher priority than reads, but reads are to be
+    as efficient as possible when there are no writes. Generally though, it
+    should be some multiple of read_expire.
+
+* write_expire, and
+* write_batch_expire are equivalent to the above, for writes.
+
+* antic_expire
+    Controls the maximum amount of time we can anticipate a good read (one
+    with a short seek distance from the most recently completed request) before
+    giving up. Many other factors may cause anticipation to be stopped early,
+    or some processes will not be "anticipated" at all. Should be a bit higher
+    for big seek time devices though not a linear correspondence - most
+    processes have only a few ms thinktime.
+
--- diff/Documentation/block/deadline-iosched.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/block/deadline-iosched.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,78 @@
+Deadline IO scheduler tunables
+==============================
+
+This little file attempts to document how the deadline io scheduler works.
+In particular, it will clarify the meaning of the exposed tunables that may be
+of interest to power users.
+
+Each io queue has a set of io scheduler tunables associated with it. These
+tunables control how the io scheduler works. You can find these entries
+in:
+
+/sys/block/<device>/iosched
+
+assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted,
+you can do so by typing:
+
+# mount none /sys -t sysfs
+
+
+********************************************************************************
+
+
+read_expire	(in ms)
+-----------
+
+The goal of the deadline io scheduler is to attempt to guarentee a start
+service time for a request. As we focus mainly on read latencies, this is
+tunable. When a read request first enters the io scheduler, it is assigned
+a deadline that is the current time + the read_expire value in units of
+miliseconds.
+
+
+write_expire	(in ms)
+-----------
+
+Similar to read_expire mentioned above, but for writes.
+
+
+fifo_batch
+----------
+
+When a read request expires its deadline, we must move some requests from
+the sorted io scheduler list to the block device dispatch queue. fifo_batch
+controls how many requests we move, based on the cost of each request. A
+request is either qualified as a seek or a stream. The io scheduler knows
+the last request that was serviced by the drive (or will be serviced right
+before this one). See seek_cost and stream_unit.
+
+
+write_starved	(number of dispatches)
+-------------
+
+When we have to move requests from the io scheduler queue to the block
+device dispatch queue, we always give a preference to reads. However, we
+don't want to starve writes indefinitely either. So writes_starved controls
+how many times we give preference to reads over writes. When that has been
+done writes_starved number of times, we dispatch some writes based on the
+same criteria as reads.
+
+
+front_merges	(bool)
+------------
+
+Sometimes it happens that a request enters the io scheduler that is contigious
+with a request that is already on the queue. Either it fits in the back of that
+request, or it fits at the front. That is called either a back merge candidate
+or a front merge candidate. Due to the way files are typically laid out,
+back merges are much more common than front merges. For some work loads, you
+may even know that it is a waste of time to spend any time attempting to
+front merge requests. Setting front_merges to 0 disables this functionality.
+Front merges may still occur due to the cached last_merge hint, but since
+that comes at basically 0 cost we leave that on. We simply disable the
+rbtree front sector lookup when the io scheduler merge function is called.
+
+
+Nov 11 2002, Jens Axboe <axboe@suse.de>
+
+
--- diff/Documentation/device-mapper/dm-io.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/device-mapper/dm-io.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,75 @@
+dm-io
+=====
+
+Dm-io provides synchronous and asynchronous I/O services. There are three
+types of I/O services available, and each type has a sync and an async
+version.
+
+The user must set up an io_region structure to describe the desired location
+of the I/O. Each io_region indicates a block-device along with the starting
+sector and size of the region.
+
+   struct io_region {
+      struct block_device *bdev;
+      sector_t sector;
+      sector_t count;
+   };
+
+Dm-io can read from one io_region or write to one or more io_regions. Writes
+to multiple regions are specified by an array of io_region structures.
+
+The first I/O service type takes a list of memory pages as the data buffer for
+the I/O, along with an offset into the first page.
+
+   struct page_list {
+      struct page_list *next;
+      struct page *page;
+   };
+
+   int dm_io_sync(unsigned int num_regions, struct io_region *where, int rw,
+                  struct page_list *pl, unsigned int offset,
+                  unsigned long *error_bits);
+   int dm_io_async(unsigned int num_regions, struct io_region *where, int rw,
+                   struct page_list *pl, unsigned int offset,
+                   io_notify_fn fn, void *context);
+
+The second I/O service type takes an array of bio vectors as the data buffer
+for the I/O. This service can be handy if the caller has a pre-assembled bio,
+but wants to direct different portions of the bio to different devices.
+
+   int dm_io_sync_bvec(unsigned int num_regions, struct io_region *where,
+                       int rw, struct bio_vec *bvec,
+                       unsigned long *error_bits);
+   int dm_io_async_bvec(unsigned int num_regions, struct io_region *where,
+                        int rw, struct bio_vec *bvec,
+                        io_notify_fn fn, void *context);
+
+The third I/O service type takes a pointer to a vmalloc'd memory buffer as the
+data buffer for the I/O. This service can be handy if the caller needs to do
+I/O to a large region but doesn't want to allocate a large number of individual
+memory pages.
+
+   int dm_io_sync_vm(unsigned int num_regions, struct io_region *where, int rw,
+                     void *data, unsigned long *error_bits);
+   int dm_io_async_vm(unsigned int num_regions, struct io_region *where, int rw,
+                      void *data, io_notify_fn fn, void *context);
+
+Callers of the asynchronous I/O services must include the name of a completion
+callback routine and a pointer to some context data for the I/O.
+
+   typedef void (*io_notify_fn)(unsigned long error, void *context);
+
+The "error" parameter in this callback, as well as the "*error" parameter in
+all of the synchronous versions, is a bitset (instead of a simple error value).
+In the case of an write-I/O to multiple regions, this bitset allows dm-io to
+indicate success or failure on each individual region.
+
+Before using any of the dm-io services, the user should call dm_io_get()
+and specify the number of pages they expect to perform I/O on concurrently.
+Dm-io will attempt to resize its mempool to make sure enough pages are
+always available in order to avoid unnecessary waiting while performing I/O.
+
+When the user is finished using the dm-io services, they should call
+dm_io_put() and specify the same number of pages that were given on the
+dm_io_get() call.
+
--- diff/Documentation/device-mapper/kcopyd.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/device-mapper/kcopyd.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,47 @@
+kcopyd
+======
+
+Kcopyd provides the ability to copy a range of sectors from one block-device
+to one or more other block-devices, with an asynchronous completion
+notification. It is used by dm-snapshot and dm-mirror.
+
+Users of kcopyd must first create a client and indicate how many memory pages
+to set aside for their copy jobs. This is done with a call to
+kcopyd_client_create().
+
+   int kcopyd_client_create(unsigned int num_pages,
+                            struct kcopyd_client **result);
+
+To start a copy job, the user must set up io_region structures to describe
+the source and destinations of the copy. Each io_region indicates a
+block-device along with the starting sector and size of the region. The source
+of the copy is given as one io_region structure, and the destinations of the
+copy are given as an array of io_region structures.
+
+   struct io_region {
+      struct block_device *bdev;
+      sector_t sector;
+      sector_t count;
+   };
+
+To start the copy, the user calls kcopyd_copy(), passing in the client
+pointer, pointers to the source and destination io_regions, the name of a
+completion callback routine, and a pointer to some context data for the copy.
+
+   int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from,
+                   unsigned int num_dests, struct io_region *dests,
+                   unsigned int flags, kcopyd_notify_fn fn, void *context);
+
+   typedef void (*kcopyd_notify_fn)(int read_err, unsigned int write_err,
+				    void *context);
+
+When the copy completes, kcopyd will call the user's completion routine,
+passing back the user's context pointer. It will also indicate if a read or
+write error occurred during the copy.
+
+When a user is done with all their copy jobs, they should call
+kcopyd_client_destroy() to delete the kcopyd client, which will release the
+associated memory pages.
+
+   void kcopyd_client_destroy(struct kcopyd_client *kc);
+
--- diff/Documentation/device-mapper/linear.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/device-mapper/linear.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,61 @@
+dm-linear
+=========
+
+Device-Mapper's "linear" target maps a linear range of the Device-Mapper
+device onto a linear range of another device.  This is the basic building
+block of logical volume managers.
+
+Parameters: <dev path> <offset>
+    <dev path>: Full pathname to the underlying block-device, or a
+                "major:minor" device-number.
+    <offset>: Starting sector within the device.
+
+
+Example scripts
+===============
+[[
+#!/bin/sh
+# Create an identity mapping for a device
+echo "0 `blockdev --getsize $1` linear $1 0" | dmsetup create identity
+]]
+
+
+[[
+#!/bin/sh
+# Join 2 devices together
+size1=`blockdev --getsize $1`
+size2=`blockdev --getsize $2`
+echo "0 $size1 linear $1 0
+$size1 $size2 linear $2 0" | dmsetup create joined
+]]
+
+
+[[
+#!/usr/bin/perl -w
+# Split a device into 4M chunks and then join them together in reverse order.
+
+my $name = "reverse";
+my $extent_size = 4 * 1024 * 2;
+my $dev = $ARGV[0];
+my $table = "";
+my $count = 0;
+
+if (!defined($dev)) {
+        die("Please specify a device.\n");
+}
+
+my $dev_size = `blockdev --getsize $dev`;
+my $extents = int($dev_size / $extent_size) -
+              (($dev_size % $extent_size) ? 1 : 0);
+
+while ($extents > 0) {
+        my $this_start = $count * $extent_size;
+        $extents--;
+        $count++;
+        my $this_offset = $extents * $extent_size;
+
+        $table .= "$this_start $extent_size linear $dev $this_offset\n";
+}
+
+`echo \"$table\" | dmsetup create $name`;
+]]
--- diff/Documentation/device-mapper/striped.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/device-mapper/striped.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,58 @@
+dm-stripe
+=========
+
+Device-Mapper's "striped" target is used to create a striped (i.e. RAID-0)
+device across one or more underlying devices. Data is written in "chunks",
+with consecutive chunks rotating among the underlying devices. This can
+potentially provide improved I/O throughput by utilizing several physical
+devices in parallel.
+
+Parameters: <num devs> <chunk size> [<dev path> <offset>]+
+    <num devs>: Number of underlying devices.
+    <chunk size>: Size of each chunk of data. Must be a power-of-2 and at
+                  least as large as the system's PAGE_SIZE.
+    <dev path>: Full pathname to the underlying block-device, or a
+                "major:minor" device-number.
+    <offset>: Starting sector within the device.
+
+One or more underlying devices can be specified. The striped device size must
+be a multiple of the chunk size and a multiple of the number of underlying
+devices.
+
+
+Example scripts
+===============
+
+[[
+#!/usr/bin/perl -w
+# Create a striped device across any number of underlying devices. The device
+# will be called "stripe_dev" and have a chunk-size of 128k.
+
+my $chunk_size = 128 * 2;
+my $dev_name = "stripe_dev";
+my $num_devs = @ARGV;
+my @devs = @ARGV;
+my ($min_dev_size, $stripe_dev_size, $i);
+
+if (!$num_devs) {
+        die("Specify at least one device\n");
+}
+
+$min_dev_size = `blockdev --getsize $devs[0]`;
+for ($i = 1; $i < $num_devs; $i++) {
+        my $this_size = `blockdev --getsize $devs[$i]`;
+        $min_dev_size = ($min_dev_size < $this_size) ?
+                        $min_dev_size : $this_size;
+}
+
+$stripe_dev_size = $min_dev_size * $num_devs;
+$stripe_dev_size -= $stripe_dev_size % ($chunk_size * $num_devs);
+
+$table = "0 $stripe_dev_size striped $num_devs $chunk_size";
+for ($i = 0; $i < $num_devs; $i++) {
+        $table .= " $devs[$i] 0";
+}
+
+`echo $table | dmsetup create $dev_name`;
+]]
+
--- diff/Documentation/device-mapper/zero.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/device-mapper/zero.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,37 @@
+dm-zero
+=======
+
+Device-Mapper's "zero" target provides a block-device that always returns
+zero'd data on reads and silently drops writes. This is similar behavior to
+/dev/zero, but as a block-device instead of a character-device.
+
+Dm-zero has no target-specific parameters.
+
+One very interesting use of dm-zero is for creating "sparse" devices in
+conjunction with dm-snapshot. A sparse device reports a device-size larger
+than the amount of actual storage space available for that device. A user can
+write data anywhere within the sparse device and read it back like a normal
+device. Reads to previously unwritten areas will return a zero'd buffer. When
+enough data has been written to fill up the actual storage space, the sparse
+device is deactivated. This can be very useful for testing device and
+filesystem limitations.
+
+To create a sparse device, start by creating a dm-zero device that's the
+desired size of the sparse device. For this example, we'll assume a 10TB
+sparse device.
+
+TEN_TERABYTES=`expr 10 \* 1024 \* 1024 \* 1024 \* 2`   # 10 TB in sectors
+echo "0 $TEN_TERABYTES zero" | dmsetup create zero1
+
+Then create a snapshot of the zero device, using any available block-device as
+the COW device. The size of the COW device will determine the amount of real
+space available to the sparse device. For this example, we'll assume /dev/sdb1
+is an available 10GB partition.
+
+echo "0 $TEN_TERABYTES snapshot /dev/mapper/zero1 /dev/sdb1 p 128" | \
+   dmsetup create sparse1
+
+This will create a 10TB sparse device called /dev/mapper/sparse1 that has
+10GB of actual storage space available. If more than 10GB of data is written
+to this device, it will start returning I/O errors.
+
--- diff/Documentation/fb/sisfb.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/fb/sisfb.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,158 @@
+
+What is sisfb?
+==============
+
+sisfb is a framebuffer device driver for SiS (Silicon Integrated Systems)
+graphics chips. Supported are:
+
+- SiS 300 series: SiS 300/305, 540, 630(S), 730(S)
+- SiS 315 series: SiS 315/H/PRO, 55x, (M)65x, 740, (M)661(F/M)X, (M)741(GX)
+- SiS 330 series: SiS 330 ("Xabre"), (M)760
+
+
+Why do I need a framebuffer driver?
+===================================
+
+sisfb is eg. useful if you want a high-resolution text console. Besides that,
+sisfb is required to run DirectFB (which comes with an additional, dedicated
+driver for the 315 series).
+
+On the 300 series, sisfb on kernels older than 2.6.3 furthermore plays an
+important role in connection with DRM/DRI: Sisfb manages the memory heap
+used by DRM/DRI for 3D texture and other data. This memory management is
+required for using DRI/DRM.
+
+Kernels >= around 2.6.3 do not need sisfb any longer for DRI/DRM memory
+management. The SiS DRM driver has been updated and features a memory manager
+of its own (which will be used if sisfb is not compiled). So unless you want
+a graphical console, you don't need sisfb on kernels >=2.6.3.
+
+Sidenote: Since this seems to be a commonly made mistake: sisfb and vesafb
+cannot be active at the same time! Do only select one of them in your kernel
+configuration.
+
+
+How are parameters passed to sisfb?
+===================================
+
+Well, it depends: If compiled statically into the kernel, use lilo's append
+statement to add the parameters to the kernel command line. Please see lilo's
+(or GRUB's) documentation for more information. If sisfb is a kernel module,
+parameters are given with the modprobe (or insmod) command.
+
+Example for sisfb as part of the static kernel: Add the following line to your
+lilo.conf:
+
+     append="video=sisfb:mode:1024x768x16,mem:12288,rate:75"
+
+Example for sisfb as a module: Start sisfb by typing
+
+     modprobe sisfb mode=1024x768x16 rate=75 mem=12288
+
+A common mistake is that folks use a wrong parameter format when using the
+driver compiled into the kernel. Please note: If compiled into the kernel,
+the parameter format is video=sisfb:mode:none or video=sisfb:mode:1024x768x16
+(or whatever mode you want to use, alternatively using any other format
+described above or the vesa keyword instead of mode). If compiled as a module,
+the parameter format reads mode=none or mode=1024x768x16 (or whatever mode you
+want to use). Using a "=" for a ":" (and vice versa) is a huge difference!
+Additionally: If you give more than one argument to the in-kernel sisfb, the
+arguments are separated with ",". For example:
+
+   video=sisfb:mode:1024x768x16,rate:75,mem:12288
+
+
+How do I use it?
+================
+
+Preface statement: This file only covers very little of the driver's
+capabilities and features. Please refer to the author's and maintainer's
+website at http://www.winischhofer.net/linuxsisvga.shtml for more
+information. Additionally, "modinfo sisfb" gives an overview over all
+supported options including some explanation.
+
+The desired display mode can be specified using the keyword "mode" with
+a parameter in one of the follwing formats:
+  - XxYxDepth or
+  - XxY-Depth or
+  - XxY-Depth@Rate or
+  - XxY
+  - or simply use the VESA mode number in hexadecimal or decimal.
+
+For example: 1024x768x16, 1024x768-16@75, 1280x1024-16. If no depth is
+specified, it defaults to 8. If no rate is given, it defaults to 60Hz. Depth 32
+means 24bit color depth (but 32 bit framebuffer depth, which is not relevant
+to the user).
+
+Additionally, sisfb understands the keyword "vesa" followed by a VESA mode
+number in decimal or hexadecimal. For example: vesa=791 or vesa=0x117. Please
+use either "mode" or "vesa" but not both.
+
+Linux 2.4 only: If no mode is given, sisfb defaults to "no mode" (mode=none) if
+compiled as a module; if sisfb is statically compiled into the kernel, it
+defaults to 800x600x8 unless CRT2 type is LCD, in which case the LCD's native
+resolution is used. If you want to switch to a different mode, use the fbset
+shell command.
+
+Linux 2.6 only: If no mode is given, sisfb defaults to 800x600x8 unless CRT2
+type is LCD, in which case it defaults to the LCD's native resolution. If
+you want to switch to another mode, use the stty shell command.
+
+You should compile in both vgacon (to boot if you remove you SiS card from
+your system) and sisfb (for graphics mode). Under Linux 2.6, also "Framebuffer
+console support" (fbcon) is needed for a graphical console.
+
+You should *not* compile-in vesafb. And please do not use the "vga=" keyword
+in lilo's or grub's configuration file; mode selection is done using the
+"mode" or "vesa" keywords as a parameter. See above and below.
+
+
+X11
+===
+
+If using XFree86 or X.org, it is recommended that you don't use the "fbdev"
+driver but the dedicated "sis" X driver. The "sis" X driver and sisfb are
+developed by the same person (Thomas Winischhofer) and cooperate well with
+each other.
+
+
+SVGALib
+=======
+
+SVGALib, if directly accessing the hardware, never restores the screen
+correctly, especially on laptops or if the output devices are LCD or TV.
+Therefore, use the chipset "FBDEV" in SVGALib configuration. This will make
+SVGALib use the framebuffer device for mode switches and restoration.
+
+
+Configuration
+=============
+
+(Some) accepted options:
+
+off      - Disable sisfb. This option is only understood if sisfb is
+           in-kernel, not a module.
+mem:X    - size of memory for the console, rest will be used for DRI/DRM. X
+           is in kilobytes. On 300 series, the default is 4096, 8192 or
+	   16384 (each in kilobyte) depending on how much video ram the card
+           has. On 315/330 series, the default is the maximum available ram
+	   (since DRI/DRM is not supported for these chipsets).
+noaccel  - do not use 2D acceleration engine. (Default: use acceleration)
+noypan   - disable y-panning and scroll by redrawing the entire screen.
+           This is much slower than y-panning. (Default: use y-panning)
+vesa:X   - selects startup videomode. X is number from 0 to 0x1FF and
+           represents the VESA mode number (can be given in decimal or
+	   hexadecimal form, the latter prefixed with "0x").
+mode:X   - selects startup videomode. Please see above for the format of
+           "X".
+
+Boolean options such as "noaccel" or "noypan" are to be given without a
+parameter if sisfb is in-kernel (for example "video=sisfb:noypan). If
+sisfb is a module, these are to be set to 1 (for example "modprobe sisfb
+noypan=1").
+
+--
+Thomas Winischhofer <thomas@winischhofer.net>
+May 27, 2004
+
+
--- diff/Documentation/hpet.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/hpet.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,298 @@
+		High Precision Event Timer Driver for Linux
+
+The High Precision Event Timer (HPET) hardware is the future replacement for the 8254 and Real
+Time Clock (RTC) periodic timer functionality.  Each HPET can have up two 32 timers.  It is possible
+to configure the first two timers as legacy replacements for 8254 and RTC periodic.  A specification
+done by INTEL and Microsoft can be found at http://www.intel.com/labs/platcomp/hpet/hpetspec.htm.
+
+The driver supports detection of HPET driver allocation and initialization of the HPET before the
+driver module_init routine is called.  This enables platform code which uses timer 0 or 1 as the
+main timer to intercept HPET initialization.  An example of this initialization can be found in
+arch/i386/kernel/time_hpet.c.
+
+The driver provides two APIs which are very similar to the API found in the rtc.c driver.
+There is a user space API and a kernel space API.  An example user space program is provided
+below.
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <memory.h>
+#include <malloc.h>
+#include <time.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <linux/hpet.h>
+
+
+extern void hpet_open_close(int, const char **);
+extern void hpet_info(int, const char **);
+extern void hpet_poll(int, const char **);
+extern void hpet_fasync(int, const char **);
+extern void hpet_read(int, const char **);
+
+#include <sys/poll.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+struct hpet_command {
+	char		*command;
+	void		(*func)(int argc, const char ** argv);
+} hpet_command[] = {
+	{
+		"open-close",
+		hpet_open_close
+	},
+	{
+		"info",
+		hpet_info
+	},
+	{
+		"poll",
+		hpet_poll
+	},
+	{
+		"fasync",
+		hpet_fasync
+	},
+};
+
+int
+main(int argc, const char ** argv)
+{
+	int	i;
+
+	argc--;
+	argv++;
+
+	if (!argc) {
+		fprintf(stderr, "-hpet: requires command\n");
+		return -1;
+	}
+
+
+	for (i = 0; i < (sizeof (hpet_command) / sizeof (hpet_command[0])); i++)
+		if (!strcmp(argv[0], hpet_command[i].command)) {
+			argc--;
+			argv++;
+			fprintf(stderr, "-hpet: executing %s\n",
+				hpet_command[i].command);
+			hpet_command[i].func(argc, argv);
+			return 0;
+		}
+
+	fprintf(stderr, "do_hpet: command %s not implemented\n", argv[0]);
+
+	return -1;
+}
+
+void
+hpet_open_close(int argc, const char **argv)
+{
+	int	fd;
+
+	if (argc != 1) {
+		fprintf(stderr, "hpet_open_close: device-name\n");
+		return;
+	}
+
+	fd = open(argv[0], O_RDONLY);
+	if (fd < 0)
+		fprintf(stderr, "hpet_open_close: open failed\n");
+	else
+		close(fd);
+
+	return;
+}
+
+void
+hpet_info(int argc, const char **argv)
+{
+}
+
+void
+hpet_poll(int argc, const char **argv)
+{
+	unsigned long		freq;
+	int			iterations, i, fd;
+	struct pollfd		pfd;
+	struct hpet_info	info;
+	struct timeval		stv, etv;
+	struct timezone		tz;
+	long			usec;
+
+	if (argc != 3) {
+		fprintf(stderr, "hpet_poll: device-name freq iterations\n");
+		return;
+	}
+
+	freq = atoi(argv[1]);
+	iterations = atoi(argv[2]);
+
+	fd = open(argv[0], O_RDONLY);
+
+	if (fd < 0) {
+		fprintf(stderr, "hpet_poll: open of %s failed\n", argv[0]);
+		return;
+	}
+
+	if (ioctl(fd, HPET_IRQFREQ, freq) < 0) {
+		fprintf(stderr, "hpet_poll: HPET_IRQFREQ failed\n");
+		goto out;
+	}
+
+	if (ioctl(fd, HPET_INFO, &info) < 0) {
+		fprintf(stderr, "hpet_poll: failed to get info\n");
+		goto out;
+	}
+
+	fprintf(stderr, "hpet_poll: info.hi_flags 0x%lx\n", info.hi_flags);
+
+	if (info.hi_flags && (ioctl(fd, HPET_EPI, 0) < 0)) {
+		fprintf(stderr, "hpet_poll: HPET_EPI failed\n");
+		goto out;
+	}
+
+	if (ioctl(fd, HPET_IE_ON, 0) < 0) {
+		fprintf(stderr, "hpet_poll, HPET_IE_ON failed\n");
+		goto out;
+	}
+
+	pfd.fd = fd;
+	pfd.events = POLLIN;
+
+	for (i = 0; i < iterations; i++) {
+		pfd.revents = 0;
+		gettimeofday(&stv, &tz);
+		if (poll(&pfd, 1, -1) < 0)
+			fprintf(stderr, "hpet_poll: poll failed\n");
+		else {
+			long 	data;
+
+			gettimeofday(&etv, &tz);
+			usec = stv.tv_sec * 1000000 + stv.tv_usec;
+			usec = (etv.tv_sec * 1000000 + etv.tv_usec) - usec;
+
+			fprintf(stderr,
+				"hpet_poll: expired time = 0x%lx\n", usec);
+
+			fprintf(stderr, "hpet_poll: revents = 0x%x\n",
+				pfd.revents);
+
+			if (read(fd, &data, sizeof(data)) != sizeof(data)) {
+				fprintf(stderr, "hpet_poll: read failed\n");
+			}
+			else
+				fprintf(stderr, "hpet_poll: data 0x%lx\n",
+					data);
+		}
+	}
+
+out:
+	close(fd);
+	return;
+}
+
+static int hpet_sigio_count;
+
+static void
+hpet_sigio(int val)
+{
+	fprintf(stderr, "hpet_sigio: called\n");
+	hpet_sigio_count++;
+}
+
+void
+hpet_fasync(int argc, const char **argv)
+{
+	unsigned long		freq;
+	int			iterations, i, fd, value;
+	sig_t			oldsig;
+	struct hpet_info	info;
+
+	hpet_sigio_count = 0;
+	fd = -1;
+
+	if ((oldsig = signal(SIGIO, hpet_sigio)) == SIG_ERR) {
+		fprintf(stderr, "hpet_fasync: failed to set signal handler\n");
+		return;
+	}
+
+	if (argc != 3) {
+		fprintf(stderr, "hpet_fasync: device-name freq iterations\n");
+		goto out;
+	}
+
+	fd = open(argv[0], O_RDONLY);
+
+	if (fd < 0) {
+		fprintf(stderr, "hpet_fasync: failed to open %s\n", argv[0]);
+		return;
+	}
+
+
+	if ((fcntl(fd, F_SETOWN, getpid()) == 1) ||
+		((value = fcntl(fd, F_GETFL)) == 1) ||
+		(fcntl(fd, F_SETFL, value | O_ASYNC) == 1)) {
+		fprintf(stderr, "hpet_fasync: fcntl failed\n");
+		goto out;
+	}
+
+	freq = atoi(argv[1]);
+	iterations = atoi(argv[2]);
+
+	if (ioctl(fd, HPET_IRQFREQ, freq) < 0) {
+		fprintf(stderr, "hpet_fasync: HPET_IRQFREQ failed\n");
+		goto out;
+	}
+
+	if (ioctl(fd, HPET_INFO, &info) < 0) {
+		fprintf(stderr, "hpet_fasync: failed to get info\n");
+		goto out;
+	}
+
+	fprintf(stderr, "hpet_fasync: info.hi_flags 0x%lx\n", info.hi_flags);
+
+	if (info.hi_flags && (ioctl(fd, HPET_EPI, 0) < 0)) {
+		fprintf(stderr, "hpet_fasync: HPET_EPI failed\n");
+		goto out;
+	}
+
+	if (ioctl(fd, HPET_IE_ON, 0) < 0) {
+		fprintf(stderr, "hpet_fasync, HPET_IE_ON failed\n");
+		goto out;
+	}
+
+	for (i = 0; i < iterations; i++) {
+		(void) pause();
+		fprintf(stderr, "hpet_fasync: count = %d\n", hpet_sigio_count);
+	}
+
+out:
+	signal(SIGIO, oldsig);
+
+	if (fd >= 0)
+		close(fd);
+
+	return;
+}
+
+The kernel API has three interfaces exported from the driver:
+
+	hpet_register(struct hpet_task *tp, int periodic)
+	hpet_unregister(struct hpet_task *tp)
+	hpet_control(struct hpet_task *tp, unsigned int cmd, unsigned long arg)
+
+The kernel module using this interface fills in the ht_func and ht_data members of the
+hpet_task structure before calling hpet_register.  hpet_control simply vectors to the hpet_ioctl
+routine and has the same commands and respective arguments as the user API.  hpet_unregister
+is used to terminate usage of the HPET timer reserved by hpet_register.
+
+
--- diff/Documentation/i386/kgdb/andthen	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/i386/kgdb/andthen	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,100 @@
+
+define	set_andthen
+	set var $thp=0
+	set var $thp=(struct kgdb_and_then_struct *)&kgdb_data[0]
+	set var $at_size = (sizeof kgdb_data)/(sizeof *$thp)
+	set var $at_oc=kgdb_and_then_count
+	set var $at_cc=$at_oc
+end
+
+define andthen_next
+	set var $at_cc=$arg0
+end
+
+define andthen
+	andthen_set_edge
+	if ($at_cc >= $at_oc)
+		printf "Outside window.  Window size is %d\n",($at_oc-$at_low)
+	else
+		printf "%d: ",$at_cc
+		output *($thp+($at_cc++ % $at_size ))
+		printf "\n"
+	end
+end
+define andthen_set_edge
+	set var $at_oc=kgdb_and_then_count
+	set var $at_low = $at_oc - $at_size
+	if ($at_low < 0 )
+		set var $at_low = 0
+	end
+	if (( $at_cc > $at_oc) || ($at_cc < $at_low))
+		printf "Count outside of window, setting count to "
+		if ($at_cc >= $at_oc)
+			set var $at_cc = $at_oc
+		else
+			set var $at_cc = $at_low
+		end
+		printf "%d\n",$at_cc
+	end
+end
+
+define beforethat
+	andthen_set_edge
+	if ($at_cc <= $at_low)
+		printf "Outside window.  Window size is %d\n",($at_oc-$at_low)
+	else
+		printf "%d: ",$at_cc-1
+		output *($thp+(--$at_cc % $at_size ))
+		printf "\n"
+	end
+end
+
+document andthen_next
+	andthen_next <count>
+	.	sets the number of the event to display next. If this event
+	.	is not in the event pool, either andthen or beforethat will
+	.	correct it to the nearest event pool edge.  The event pool
+	.	ends at the last event recorded and begins <number of events>
+	.	prior to that.  If beforethat is used next, it will display
+	.	event <count> -1.
+.
+	andthen commands are: set_andthen, andthen_next, andthen and beforethat
+end
+
+
+document andthen
+	andthen
+.	displays the next event in the list.  <set_andthen> sets up to display
+.	the oldest saved event first.
+.	<count> (optional) count of the event to display.
+.	note the number of events saved is specified at configure time.
+.	if events are saved between calls to andthen the index will change
+.	but the displayed event will be the next one (unless the event buffer
+.	is overrun).
+.
+.	andthen commands are: set_andthen, andthen_next, andthen and beforethat
+end
+
+document set_andthen
+	set_andthen
+.	sets up to use the <andthen> and <beforethat> commands.
+.		if you have defined your own struct, use the above and
+.		then enter the following:
+.		p $thp=(struct kgdb_and_then_structX *)&kgdb_data[0]
+.		where <kgdb_and_then_structX> is the name of your structure.
+.
+.	andthen commands are: set_andthen, andthen_next, andthen and beforethat
+end
+
+document beforethat
+	beforethat
+.	displays the next prior event in the list. <set_andthen> sets up to
+.	display the last occuring event first.
+.
+.	note the number of events saved is specified at configure time.
+.	if events are saved between calls to beforethat the index will change
+.	but the displayed event will be the next one (unless the event buffer
+.	is overrun).
+.
+.	andthen commands are: set_andthen, andthen_next, andthen and beforethat
+end
--- diff/Documentation/i386/kgdb/debug-nmi.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/i386/kgdb/debug-nmi.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,37 @@
+Subject: Debugging with NMI
+Date: Mon, 12 Jul 1999 11:28:31 -0500
+From: David Grothe <dave@gcom.com>
+Organization: Gcom, Inc
+To: David Grothe <dave@gcom.com>
+
+Kernel hackers:
+
+Maybe this is old hat, but it is new to me --
+
+On an ISA bus machine, if you short out the A1 and B1 pins of an ISA
+slot you will generate an NMI to the CPU.  This interrupts even a
+machine that is hung in a loop with interrupts disabled.  Used in
+conjunction with kgdb <
+ftp://ftp.gcom.com/pub/linux/src/kgdb-2.3.35/kgdb-2.3.35.tgz > you can
+gain debugger control of a machine that is hung in the kernel!  Even
+without kgdb the kernel will print a stack trace so you can find out
+where it was hung.
+
+The A1/B1 pins are directly opposite one another and the farthest pins
+towards the bracket end of the ISA bus socket.  You can stick a paper
+clip or multi-meter probe between them to short them out.
+
+I had a spare ISA bus to PC104 bus adapter around.  The PC104 end of the
+board consists of two rows of wire wrap pins.  So I wired a push button
+between the A1/B1 pins and now have an ISA board that I can stick into
+any ISA bus slot for debugger entry.
+
+Microsoft has a circuit diagram of a PCI card at
+http://www.microsoft.com/hwdev/DEBUGGING/DMPSW.HTM.  If you want to
+build one you will have to mail them and ask for the PAL equations.
+Nobody makes one comercially.
+
+[THIS TIP COMES WITH NO WARRANTY WHATSOEVER.  It works for me, but if
+your machine catches fire, it is your problem, not mine.]
+
+-- Dave (the kgdb guy)
--- diff/Documentation/i386/kgdb/gdb-globals.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/i386/kgdb/gdb-globals.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,71 @@
+Sender: akale@veritas.com
+Date: Fri, 23 Jun 2000 19:26:35 +0530
+From: "Amit S. Kale" <akale@veritas.com>
+Organization: Veritas Software (India)
+To: Dave Grothe <dave@gcom.com>, linux-kernel@vger.rutgers.edu
+CC: David Milburn <dmilburn@wirespeed.com>,
+        "Edouard G. Parmelan" <Edouard.Parmelan@quadratec.fr>,
+        ezannoni@cygnus.com, Keith Owens <kaos@ocs.com.au>
+Subject: Re: Module debugging using kgdb
+
+Dave Grothe wrote:
+>
+> Amit:
+>
+> There is a 2.4.0 version of kgdb on our ftp site:
+> ftp://ftp.gcom.com/pub/linux/src/kgdb.  I mirrored your version of gdb
+> and loadmodule.sh there.
+>
+> Have a look at the README file and see if I go it right.  If not, send
+> me some corrections and I will update it.
+>
+> Does your version of gdb solve the global variable problem?
+
+Yes.
+Thanks to Elena Zanoni, gdb (developement version) can now calculate
+correctly addresses  of dynamically loaded object files. I have not been
+following gdb developement for sometime and am not sure when symbol
+address calculation fix is going to appear in a gdb stable version.
+
+Elena, any idea when the fix will make it to a prebuilt gdb from a
+redhat release?
+
+For the time being I have built a gdb developement version. It can be
+used for module debugging with loadmodule.sh script.
+
+The problem with calculating of module addresses with previous versions
+of gdb was as follows:
+gdb did not use base address of a section while calculating address of
+a symbol in the section in an object file loaded via 'add-symbol-file'.
+It used address of .text segment instead. Due to this addresses of
+symbols in .data, .bss etc. (e.g. global variables) were calculated incorrectly.
+
+Above mentioned fix allow gdb to use base address of a segment while
+calculating address of a symbol in it. It adds a parameter '-s' to
+'add-symbol-file' command for specifying base address of a segment.
+
+loadmodule.sh script works as follows.
+
+1. Copy a module file to target machine.
+2. Load the module on the target machine using insmod with -m parameter.
+insmod produces a module load map which contains base addresses of all
+sections in the module and addresses of symbols in the module file.
+3. Find all sections and their base addresses in the module from
+the module map.
+4. Generate a script that loads the module file. The script uses
+'add-symbol-file' and specifies address of text segment followed by
+addresses of all segments in the module.
+
+Here is an example gdb script produced by loadmodule.sh script.
+
+add-symbol-file foo 0xd082c060 -s .text.lock 0xd08cbfb5
+-s .fixup 0xd08cfbdf -s .rodata 0xd08cfde0 -s __ex_table 0xd08e3b38
+-s .data 0xd08e3d00 -s .bss 0xd08ec8c0 -s __ksymtab 0xd08ee838
+
+With this command gdb can calculate addresses of symbols in ANY segment
+in a module file.
+
+Regards.
+--
+Amit Kale
+Veritas Software ( http://www.veritas.com )
--- diff/Documentation/i386/kgdb/gdbinit	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/i386/kgdb/gdbinit	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,14 @@
+shell echo -e "\003" >/dev/ttyS0
+set remotebaud 38400
+target remote /dev/ttyS0
+define si
+stepi
+printf "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n", $eax, $ebx, $ecx, $edx
+printf "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n", $esi, $edi, $ebp, $esp
+x/i $eip
+end
+define ni
+nexti
+printf "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n", $eax, $ebx, $ecx, $edx
+printf "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n", $esi, $edi, $ebp, $esp
+x/i $eip
--- diff/Documentation/i386/kgdb/gdbinit-modules	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/i386/kgdb/gdbinit-modules	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,146 @@
+#
+# Usefull GDB user-command to debug Linux Kernel Modules with gdbstub.
+#
+# This don't work for Linux-2.0 or older.
+#
+# Author Edouard G. Parmelan <Edouard.Parmelan@quadratec.fr>
+#
+#
+# Fri Apr 30 20:33:29 CEST 1999
+#   First public release.
+#
+#   Major cleanup after experiment Linux-2.0 kernel without success.
+#   Symbols of a module are not in the correct order, I can't explain
+#   why :(
+#
+# Fri Mar 19 15:41:40 CET 1999
+#   Initial version.
+#
+# Thu Jan  6 16:29:03 CST 2000
+#   A little fixing by Dave Grothe <dave@gcom.com>
+#
+# Mon Jun 19 09:33:13 CDT 2000
+#   Alignment changes from Edouard Parmelan
+#
+# The basic idea is to find where insmod load the module and inform
+# GDB to load the symbol table of the module with the GDB command
+# ``add-symbol-file <object> <address>''.
+#
+# The Linux kernel holds the list of all loaded modules in module_list,
+# this list end with &kernel_module (exactly with module->next == NULL,
+# but the last module is not a real module).
+#
+# Insmod allocates the struct module before the object file.  Since
+# Linux-2.1, this structure contain his size.  The real address of
+# the object file is then (char*)module + module->size_of_struct.
+#
+# You can use three user functions ``mod-list'', ``mod-print-symbols''
+# and ``add-module-symbols''.
+#
+# mod-list list all loaded modules with the format:
+#    <module-address> <module-name>
+#
+# As soon as you have found the address of your module, you can
+# print its exported symbols (mod-print-symbols) or inform GDB to add
+# symbols from your module file (mod-add-symbols).
+#
+# The argument that you give to mod-print-symbols or mod-add-symbols
+# is the <module-address> from the mod-list command.
+#
+# When using the mod-add-symbols command you must also give the full
+# pathname of the modules object code file.
+#
+# The command mod-add-lis is an example of how to make this easier.
+# You can edit this macro to contain the path name of your own
+# favorite module and then use it as a shorthand to load it.  You
+# still need the module-address, however.
+#
+# The internal function ``mod-validate'' set the GDB variable $mod
+# as a ``struct module*'' if the kernel known the module otherwise
+# $mod is set to NULL.  This ensure to not add symbols for a wrong
+# address.
+#
+# Have a nice hacking day !
+#
+#
+define mod-list
+    set $mod = (struct module*)module_list
+    # the last module is the kernel, ignore it
+    while $mod != &kernel_module
+    	printf "%p\t%s\n", (long)$mod, ($mod)->name
+	set $mod = $mod->next
+    end
+end
+document mod-list
+List all modules in the form: <module-address> <module-name>
+Use the <module-address> as the argument for the other
+mod-commands: mod-print-symbols, mod-add-symbols.
+end
+
+define mod-validate
+    set $mod = (struct module*)module_list
+    while ($mod != $arg0) && ($mod != &kernel_module)
+    	set $mod = $mod->next
+    end
+    if $mod == &kernel_module
+	set $mod = 0
+    	printf "%p is not a module\n", $arg0
+    end
+end
+document mod-validate
+mod-validate <module-address>
+Internal user-command used to validate the module parameter.
+If <module> is a real loaded module, set $mod to it otherwise set $mod to 0.
+end
+
+
+define mod-print-symbols
+    mod-validate $arg0
+    if $mod != 0
+	set $i = 0
+	while $i < $mod->nsyms
+	    set $sym = $mod->syms[$i]
+	    printf "%p\t%s\n", $sym->value, $sym->name
+	    set $i = $i + 1
+	end
+    end
+end
+document mod-print-symbols
+mod-print-symbols <module-address>
+Print all exported symbols of the module.  see mod-list
+end
+
+
+define mod-add-symbols-align
+    mod-validate $arg0
+    if $mod != 0
+	set $mod_base = ($mod->size_of_struct + (long)$mod)
+	if ($arg2 != 0) && (($mod_base & ($arg2 - 1)) != 0)
+	    set $mod_base = ($mod_base | ($arg2 - 1)) + 1
+	end
+	add-symbol-file $arg1 $mod_base
+    end
+end
+document mod-add-symbols-align
+mod-add-symbols-align <module-address> <object file path name> <align>
+Load the symbols table of the module from the object file where
+first section aligment is <align>.
+To retreive alignment, use `objdump -h <object file path name>'.
+end
+
+define mod-add-symbols
+    mod-add-symbols-align $arg0 $arg1 sizeof(long)
+end
+document mod-add-symbols
+mod-add-symbols <module-address> <object file path name>
+Load the symbols table of the module from the object file.
+Default alignment is 4.  See mod-add-symbols-align.
+end
+
+define mod-add-lis
+    mod-add-symbols-align $arg0 /usr/src/LiS/streams.o 16
+end
+document mod-add-lis
+mod-add-lis <module-address>
+Does mod-add-symbols <module-address> /usr/src/LiS/streams.o
+end
--- diff/Documentation/i386/kgdb/gdbinit.hw	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/i386/kgdb/gdbinit.hw	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,117 @@
+
+#Using ia-32 hardware breakpoints.
+#
+#4 hardware breakpoints are available in ia-32 processors. These breakpoints
+#do not need code modification. They are set using debug registers.
+#
+#Each hardware breakpoint can be of one of the
+#three types: execution, write, access.
+#1. An Execution breakpoint is triggered when code at the breakpoint address is
+#executed.
+#2. A write breakpoint ( aka watchpoints ) is triggered when memory location
+#at the breakpoint address is written.
+#3. An access breakpoint is triggered when memory location at the breakpoint
+#address is either read or written.
+#
+#As hardware breakpoints are available in limited number, use software
+#breakpoints ( br command in gdb ) instead of execution hardware breakpoints.
+#
+#Length of an access or a write breakpoint defines length of the datatype to
+#be watched. Length is 1 for char, 2 short , 3 int.
+#
+#For placing execution, write and access breakpoints, use commands
+#hwebrk, hwwbrk, hwabrk
+#To remove a breakpoint use hwrmbrk command.
+#
+#These commands take following types of arguments. For arguments associated
+#with each command, use help command.
+#1. breakpointno: 0 to 3
+#2. length: 1 to 3
+#3. address: Memory location in hex ( without 0x ) e.g c015e9bc
+#
+#Use the command exinfo to find which hardware breakpoint occured.
+
+#hwebrk breakpointno address
+define hwebrk
+	maintenance packet Y$arg0,0,0,$arg1
+end
+document hwebrk
+	hwebrk <breakpointno> <address>
+	Places a hardware execution breakpoint
+	<breakpointno> = 0 - 3
+	<address> = Hex digits without leading "0x".
+end
+
+#hwwbrk breakpointno length address
+define hwwbrk
+	maintenance packet Y$arg0,1,$arg1,$arg2
+end
+document hwwbrk
+	hwwbrk <breakpointno> <length> <address>
+	Places a hardware write breakpoint
+	<breakpointno> = 0 - 3
+	<length> = 1 (1 byte), 2 (2 byte), 3 (4 byte)
+	<address> = Hex digits without leading "0x".
+end
+
+#hwabrk breakpointno length address
+define hwabrk
+	maintenance packet Y$arg0,1,$arg1,$arg2
+end
+document hwabrk
+	hwabrk <breakpointno> <length> <address>
+	Places a hardware access breakpoint
+	<breakpointno> = 0 - 3
+	<length> = 1 (1 byte), 2 (2 byte), 3 (4 byte)
+	<address> = Hex digits without leading "0x".
+end
+
+#hwrmbrk breakpointno
+define hwrmbrk
+	maintenance packet y$arg0
+end
+document hwrmbrk
+	hwrmbrk <breakpointno>
+	<breakpointno> = 0 - 3
+	Removes a hardware breakpoint
+end
+
+define reboot
+        maintenance packet r
+end
+#exinfo
+define exinfo
+	maintenance packet qE
+end
+document exinfo
+	exinfo
+	Gives information about a breakpoint.
+end
+define get_th
+	p $th=(struct thread_info *)((int)$esp & ~8191)
+end
+document get_th
+	get_tu
+	Gets and prints the current thread_info pointer, Defines th to be it.
+end
+define get_cu
+	p $cu=((struct thread_info *)((int)$esp & ~8191))->task
+end
+document get_cu
+	get_cu
+	Gets and print the "current" value.  Defines $cu to be it.
+end
+define int_off
+	set var $flags=$eflags
+	set $eflags=$eflags&~0x200
+	end
+define int_on
+	set var $eflags|=$flags&0x200
+	end
+document int_off
+	saves the current interrupt state and clears the processor interrupt
+	flag.  Use int_on to restore the saved flag.
+end
+document int_on
+	Restores the interrupt flag saved by int_off.
+end
--- diff/Documentation/i386/kgdb/kgdb.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/i386/kgdb/kgdb.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,775 @@
+Last edit: <20030806.1637.12>
+This file has information specific to the i386 kgdb option.  Other
+platforms with the kgdb option may behave in a similar fashion.
+
+New features:
+============
+20030806.1557.37
+This version was made against the 2.6.0-test2 kernel. We have made the
+following changes:
+
+- The getthread() code in the stub calls find_task_by_pid().  It fails
+  if we are early in the bring up such that the pid arrays have yet to
+  be allocated.  We have added a line to kernel/pid.c to make
+  "kgdb_pid_init_done" true once the arrays are allocated.  This way the
+  getthread() code knows not to call.  This is only used by the thread
+  debugging stuff and threads will not yet exist at this point in the
+  boot.
+
+- For some reason, gdb was not asking for a new thread list when the
+  "info thread" command was given.  We changed to the newer version of
+  the thread info command and gdb now seems to ask when needed.  Result,
+  we now get all threads in the thread list.
+
+- We now respond to the ThreadExtraInfo request from gdb with the thread
+  name from task_struct .comm.  This then appears in the thread list.
+  Thoughts on additional options for this are welcome.  Things such as
+  "has BKL" and "Preempted" come to mind.  I think we could have a flag
+  word that could enable different bits of info here.
+
+- We now honor, sort of, the C and S commands.  These are continue and
+  single set after delivering a signal.  We ignore the signal and do the
+  requested action.  This only happens when we told gdb that a signal
+  was the reason for entry, which is only done on memory faults.  The
+  result is that you can now continue into the Oops.
+
+- We changed the -g to -gdwarf-2.  This seems to be the same as -ggdb,
+  but it is more exact on what language to use.
+
+- We added two dwarf2 include files and a bit of code at the end of
+  entry.S.  This does not yet work, so it is disabled.  Still we want to
+  keep track of the code and "maybe" someone out there can fix it.
+
+- Randy Dunlap sent some fix ups for this file which are now merged.
+
+- Hugh Dickins sent a fix to a bit of code in traps.c that prevents a
+  compiler warning if CONFIG_KGDB is off (now who would do that :).
+
+- Andrew Morton sent a fix for the serial driver which is now merged.
+
+- Andrew also sent a change to the stub around the cpu managment code
+  which is also merged.
+
+- Andrew also sent a patch to make "f" as well as "g" work as SysRq
+  commands to enter kgdb, merged.
+
+- If CONFIG_KGDB and CONFIG_DEBUG_SPINLOCKS are both set we added a
+  "who" field to the spinlock data struct.  This is filled with
+  "current" when ever the spinlock suceeds.  Useful if you want to know
+  who has the lock.
+
+_ And last, but not least, we fixed the "get_cu" macro to properly get
+  the current value of "current".
+
+New features:
+============
+20030505.1827.27
+We are starting to align with the sourceforge version, at least in
+commands.  To this end, the boot command string to start kgdb at
+boot time has been changed from "kgdb" to "gdb".
+
+Andrew Morton sent a couple of patches which are now included as follows:
+1.) We now return a flag to the interrupt handler.
+2.) We no longer use smp_num_cpus (a conflict with the lock meter).
+3.) And from William Lee Irwin III <wli@holomorphy.com> code to make
+    sure high-mem is set up before we attempt to register our interrupt
+    handler.
+We now include asm/kgdb.h from config.h so you will most likely never
+have to include it.  It also 'NULLS' the kgdb macros you might have in
+your code when CONFIG_KGDB is not defined.  This allows you to just
+turn off CONFIG_KGDB to turn off all the kgdb_ts() calls and such.
+This include is conditioned on the machine being an x86 so as to not
+mess with other archs.
+
+20020801.1129.03
+This is currently the version for the 2.4.18 (and beyond?) kernel.
+
+We have several new "features" beginning with this version:
+
+1.) Kgdb now syncs the "other" CPUs with a cross-CPU NMI.  No more
+    waiting and it will pull that guy out of an IRQ off spin lock :)
+
+2.) We doctored up the code that tells where a task is waiting and
+    included it so that the "info thread" command will show a bit more
+    than "schedule()".  Try it...
+
+3.) Added the ability to call a function from gdb.  All the standard gdb
+    issues apply, i.e. if you hit a breakpoint in the function, you are
+    not allowed to call another (gdb limitation, not kgdb).  To help
+    this capability we added a memory allocation function.  Gdb does not
+    return this memory (it is used for strings that you pass to that function
+    you are calling from gdb) so we fixed up a way to allow you to
+    manually return the memory (see below).
+
+4.) Kgdb time stamps (kgdb_ts()) are enhanced to expand what was the
+    interrupt flag to now also include the preemption count and the
+    "in_interrupt" info.  The flag is now called "with_pif" to indicate
+    the order, preempt_count, in_interrupt, flag.  The preempt_count is
+    shifted left by 4 bits so you can read the count in hex by dropping
+    the low order digit.  In_interrupt is in bit 1, and the flag is in
+    bit 0.
+
+5.) The command: "p kgdb_info" is now expanded and prints something
+    like:
+(gdb) p kgdb_info
+$2 = {used_malloc = 0, called_from = 0xc0107506, entry_tsc = 67468627259,
+  errcode = 0, vector = 3, print_debug_info = 0, hold_on_sstep = 1,
+  cpus_waiting = {{task = 0xc027a000, pid = 32768, hold = 0,
+      regs = 0xc027bf84}, {task = 0x0, pid = 0, hold = 0, regs = 0x0}}}
+
+    Things to note here: a.) used_malloc is the amount of memory that
+    has been malloc'ed to do calls from gdb.  You can reclaim this
+    memory like this: "p kgdb_info.used_malloc=0" Cool, huh?  b.)
+    cpus_waiting is now "sized" by the number of CPUs you enter at
+    configure time in the kgdb configure section.  This is NOT used
+    anywhere else in the system, but it is "nice" here.  c.)  The task's
+    "pid" is now in the structure.  This is the pid you will need to use
+    to decode to the thread id to get gdb to look at that thread.
+    Remember that the "info thread" command prints a list of threads
+    wherein it numbers each thread with its reference number followed
+    by the thread's pid.  Note that the per-CPU idle threads actually
+    have pids of 0 (yes, there is more than one pid 0 in an SMP system).
+    To avoid confusion, kgdb numbers these threads with numbers beyond
+    the MAX_PID.  That is why you see 32768 and above.
+
+6.) A subtle change, we now provide the complete register set for tasks
+    that are active on the other CPUs.  This allows better trace back on
+    those tasks.
+
+    And, let's mention what we could not fix.  Back-trace from all but the
+    thread that we trapped will, most likely, have a bogus entry in it.
+    The problem is that gdb does not recognize the entry code for
+    functions that use "current" near (at all?) the entry.  The compiler
+    is putting the "current" decode as the first two instructions of the
+    function where gdb expects to find %ebp changing code.  Back trace
+    also has trouble with interrupt frames.  I am talking with Daniel
+    Jacobowitz about some way to fix this, but don't hold your breath.
+
+20011220.0050.35
+Major enhancement with this version is the ability to hold one or more
+CPUs in an SMP system while allowing the others to continue.  Also, by
+default only the current CPU is enabled on single-step commands (please
+note that gdb issues single-step commands at times other than when you
+use the si command).
+
+Another change is to collect some useful information in
+a global structure called "kgdb_info".  You should be able to just:
+
+p kgdb_info
+
+although I have seen cases where the first time this is done gdb just
+prints the first member but prints the whole structure if you then enter
+CR (carriage return or enter).  This also works:
+
+p *&kgdb_info
+
+Here is a sample:
+(gdb) p kgdb_info
+$4 = {called_from = 0xc010732c, entry_tsc = 32804123790856, errcode = 0,
+  vector = 3, print_debug_info = 0}
+
+"Called_from" is the return address from the current entry into kgdb.
+Sometimes it is useful to know why you are in kgdb, for example, was
+it an NMI or a real breakpoint?  The simple way to interrogate this
+return address is:
+
+l *0xc010732c
+
+which will print the surrounding few lines of source code.
+
+"Entry_tsc" is the CPU TSC on entry to kgdb (useful to compare to the
+kgdb_ts entries).
+
+"errcode" and "vector" are other entry parameters which may be helpful on
+some traps.
+
+"print_debug_info" is the internal debugging kgdb print enable flag.  Yes,
+you can modify it.
+
+In SMP systems kgdb_info also includes the "cpus_waiting" structure and
+"hold_on_step":
+
+(gdb) p kgdb_info
+$7 = {called_from = 0xc0112739, entry_tsc = 1034936624074, errcode = 0,
+  vector = 2, print_debug_info = 0, hold_on_sstep = 1, cpus_waiting = {{
+      task = 0x0, hold = 0, regs = 0x0}, {task = 0xc71b8000, hold = 0,
+      regs = 0xc71b9f70}, {task = 0x0, hold = 0, regs = 0x0}, {task = 0x0,
+      hold = 0, regs = 0x0}, {task = 0x0, hold = 0, regs = 0x0}, {task = 0x0,
+      hold = 0, regs = 0x0}, {task = 0x0, hold = 0, regs = 0x0}, {task = 0x0,
+      hold = 0, regs = 0x0}}}
+
+"Cpus_waiting" has an entry for each CPU other than the current one that
+has been stopped.  Each entry contains the task_struct address for that
+CPU, the address of the regs for that task and a hold flag.  All these
+have the proper typing so that, for example:
+
+p *kgdb_info.cpus_waiting[1].regs
+
+will print the registers for CPU 1.
+
+"Hold_on_sstep" is a new feature with this version and comes up set or
+true.  What this means is that whenever kgdb is asked to single-step all
+other CPUs are held (i.e. not allowed to execute).  The flag applies to
+all but the current CPU and, again, can be changed:
+
+p kgdb_info.hold_on_sstep=0
+
+restores the old behavior of letting all CPUs run during single-stepping.
+
+Likewise, each CPU has a "hold" flag, which if set, locks that CPU out
+of execution.  Note that this has some risk in cases where the CPUs need
+to communicate with each other.  If kgdb finds no CPU available on exit,
+it will push a message thru gdb and stay in kgdb.  Note that it is legal
+to hold the current CPU as long as at least one CPU can execute.
+
+20010621.1117.09
+This version implements an event queue.  Events are signaled by calling
+a function in the kgdb stub and may be examined from gdb.  See EVENTS
+below for details.  This version also tightens up the interrupt and SMP
+handling to not allow interrupts on the way to kgdb from a breakpoint
+trap.  It is fine to allow these interrupts for user code, but not
+system debugging.
+
+Version
+=======
+
+This version of the kgdb package was developed and tested on
+kernel version 2.4.16.  It will not install on any earlier kernels.
+It is possible that it will continue to work on later versions
+of 2.4 and then versions of 2.5 (I hope).
+
+
+Debugging Setup
+===============
+
+Designate one machine as the "development" machine.  This is the
+machine on which you run your compiles and which has your source
+code for the kernel.  Designate a second machine as the "target"
+machine.  This is the machine that will run your experimental
+kernel.
+
+The two machines will be connected together via a serial line out
+one or the other of the COM ports of the PC.  You will need the
+appropriate modem eliminator (null modem) cable(s) for this.
+
+Decide on which tty port you want the machines to communicate, then
+connect them up back-to-back using the null modem cable.  COM1 is
+/dev/ttyS0 and COM2 is /dev/ttyS1. You should test this connection
+with the two machines prior to trying to debug a kernel.  Once you
+have it working, on the TARGET machine, enter:
+
+setserial /dev/ttyS0 (or what ever tty you are using)
+
+and record the port address and the IRQ number.
+
+On the DEVELOPMENT machine you need to apply the patch for the kgdb
+hooks.  You have probably already done that if you are reading this
+file.
+
+On your DEVELOPMENT machine, go to your kernel source directory and do
+"make Xconfig" where X is one of "x", "menu", or "".  If you are
+configuring in the standard serial driver, it must not be a module.
+Either yes or no is ok, but making the serial driver a module means it
+will initialize after kgdb has set up the UART interrupt code and may
+cause a failure of the control-C option discussed below.  The configure
+question for the serial driver is under the "Character devices" heading
+and is:
+
+"Standard/generic (8250/16550 and compatible UARTs) serial support"
+
+Go down to the kernel debugging menu item and open it up.  Enable the
+kernel kgdb stub code by selecting that item.  You can also choose to
+turn on the "-ggdb -O1" compile options.  The -ggdb causes the compiler
+to put more debug info (like local symbols) in the object file.  On the
+i386 -g and -ggdb are the same so this option just reduces to "O1".  The
+-O1 reduces the optimization level.  This may be helpful in some cases,
+be aware, however, that this may also mask the problem you are looking
+for.
+
+The baud rate.  Default is 115200.  What ever you choose be sure that
+the host machine is set to the same speed.  I recommend the default.
+
+The port.  This is the I/O address of the serial UART that you should
+have gotten using setserial as described above.  The standard COM1 port
+(3f8) using IRQ 4 is default.  COM2 is 2f8 which by convention uses IRQ
+3.
+
+The port IRQ (see above).
+
+Stack overflow test.  This option makes a minor change in the trap,
+system call and interrupt code to detect stack overflow and transfer
+control to kgdb if it happens.  (Some platforms have this in the
+baseline code, but the i386 does not.)
+
+You can also configure the system to recognize the boot option
+"console=kgdb" which if given will cause all console output during
+booting to be put thru gdb as well as other consoles.  This option
+requires that gdb and kgdb be connected prior to sending console output
+so, if they are not, a breakpoint is executed to force the connection.
+This will happen before any kernel output (it is going thru gdb, right),
+and will stall the boot until the connection is made.
+
+You can also configure in a patch to SysRq to enable the kGdb SysRq.
+This request generates a breakpoint.  Since the serial port IRQ line is
+set up after any serial drivers, it is possible that this command will
+work when the control-C will not.
+
+Save and exit the Xconfig program.  Then do "make clean" , "make dep"
+and "make bzImage" (or whatever target you want to make).  This gets the
+kernel compiled with the "-g" option set -- necessary for debugging.
+
+You have just built the kernel on your DEVELOPMENT machine that you
+intend to run on your TARGET machine.
+
+To install this new kernel, use the following installation procedure.
+Remember, you are on the DEVELOPMENT machine patching the kernel source
+for the kernel that you intend to run on the TARGET machine.
+
+Copy this kernel to your target machine using your usual procedures.  I
+usually arrange to copy development:
+/usr/src/linux/arch/i386/boot/bzImage to /vmlinuz on the TARGET machine
+via a LAN based NFS access.  That is, I run the cp command on the target
+and copy from the development machine via the LAN.  Run Lilo (see "man
+lilo" for details on how to set this up) on the new kernel on the target
+machine so that it will boot!  Then boot the kernel on the target
+machine.
+
+On the DEVELOPMENT machine, create a file called .gdbinit in the
+directory /usr/src/linux.  An example .gdbinit file looks like this:
+
+shell echo -e "\003" >/dev/ttyS0
+set remotebaud 38400 (or what ever speed you have chosen)
+target remote /dev/ttyS0
+
+
+Change the "echo" and "target" definition so that it specifies the tty
+port that you intend to use.  Change the "remotebaud" definition to
+match the data rate that you are going to use for the com line.
+
+You are now ready to try it out.
+
+Boot your target machine with "kgdb" in the boot command i.e. something
+like:
+
+lilo> test kgdb
+
+or if you also want console output thru gdb:
+
+lilo> test kgdb console=kgdb
+
+You should see the lilo message saying it has loaded the kernel and then
+all output stops.  The kgdb stub is trying to connect with gdb.  Start
+gdb something like this:
+
+
+On your DEVELOPMENT machine, cd /usr/src/linux and enter "gdb vmlinux".
+When gdb gets the symbols loaded it will read your .gdbinit file and, if
+everything is working correctly, you should see gdb print out a few
+lines indicating that a breakpoint has been taken.  It will actually
+show a line of code in the target kernel inside the kgdb activation
+code.
+
+The gdb interaction should look something like this:
+
+    linux-dev:/usr/src/linux# gdb vmlinux
+    GDB is free software and you are welcome to distribute copies of it
+     under certain conditions; type "show copying" to see the conditions.
+    There is absolutely no warranty for GDB; type "show warranty" for details.
+    GDB 4.15.1 (i486-slackware-linux),
+    Copyright 1995 Free Software Foundation, Inc...
+    breakpoint () at i386-stub.c:750
+    750     }
+    (gdb)
+
+You can now use whatever gdb commands you like to set breakpoints.
+Enter "continue" to start your target machine executing again.  At this
+point the target system will run at full speed until it encounters
+your breakpoint or gets a segment violation in the kernel, or whatever.
+
+If you have the kgdb console enabled when you continue, gdb will print
+out all the console messages.
+
+The above example caused a breakpoint relatively early in the boot
+process.  For the i386 kgdb it is possible to code a break instruction
+as the first C-language point in init/main.c, i.e. as the first instruction
+in start_kernel().  This could be done as follows:
+
+#include <asm/kgdb.h>
+	 breakpoint();
+
+This breakpoint() is really a function that sets up the breakpoint and
+single-step hardware trap cells and then executes a breakpoint.  Any
+early hard coded breakpoint will need to use this function.  Once the
+trap cells are set up they need not be set again, but doing it again
+does not hurt anything, so you don't need to be concerned about which
+breakpoint is hit first.  Once the trap cells are set up (and the kernel
+sets them up in due course even if breakpoint() is never called) the
+macro:
+
+BREAKPOINT;
+
+will generate an inline breakpoint.  This may be more useful as it stops
+the processor at the instruction instead of in a function a step removed
+from the location of interest.  In either case <asm/kgdb.h> must be
+included to define both breakpoint() and BREAKPOINT.
+
+Triggering kgdbstub at other times
+==================================
+
+Often you don't need to enter the debugger until much later in the boot
+or even after the machine has been running for some time.  Once the
+kernel is booted and interrupts are on, you can force the system to
+enter the debugger by sending a control-C to the debug port. This is
+what the first line of the recommended .gdbinit file does.  This allows
+you to start gdb any time after the system is up as well as when the
+system is already at a breakpoint.  (In the case where the system is
+already at a breakpoint the control-C is not needed, however, it will
+be ignored by the target so no harm is done.  Also note the the echo
+command assumes that the port speed is already set.  This will be true
+once gdb has connected, but it is best to set the port speed before you
+run gdb.)
+
+Another simple way to do this is to put the following file in you ~/bin
+directory:
+
+#!/bin/bash
+echo  -e "\003"  > /dev/ttyS0
+
+Here, the ttyS0 should be replaced with what ever port you are using.
+The "\003" is control-C.  Once you are connected with gdb, you can enter
+control-C at the command prompt.
+
+An alternative way to get control to the debugger is to enable the kGdb
+SysRq command.  Then you would enter Alt-SysRq-g (all three keys at the
+same time, but push them down in the order given).  To refresh your
+memory of the available SysRq commands try Alt-SysRq-=.  Actually any
+undefined command could replace the "=", but I like to KNOW that what I
+am pushing will never be defined.
+
+Debugging hints
+===============
+
+You can break into the target machine at any time from the development
+machine by typing ^C (see above paragraph).  If the target machine has
+interrupts enabled this will stop it in the kernel and enter the
+debugger.
+
+There is unfortunately no way of breaking into the kernel if it is
+in a loop with interrupts disabled, so if this happens to you then
+you need to place exploratory breakpoints or printk's into the kernel
+to find out where it is looping.  The exploratory breakpoints can be
+entered either thru gdb or hard coded into the source.  This is very
+handy if you do something like:
+
+if (<it hurts>) BREAKPOINT;
+
+
+There is a copy of an e-mail in the Documentation/i386/kgdb/ directory
+(debug-nmi.txt) which describes how to create an NMI on an ISA bus
+machine using a paper clip.  I have a sophisticated version of this made
+by wiring a push button switch into a PC104/ISA bus adapter card.  The
+adapter card nicely furnishes wire wrap pins for all the ISA bus
+signals.
+
+When you are done debugging the kernel on the target machine it is a
+good idea to leave it in a running state.  This makes reboots faster,
+bypassing the fsck.  So do a gdb "continue" as the last gdb command if
+this is possible.  To terminate gdb itself on the development machine
+and leave the target machine running, first clear all breakpoints and
+continue, then type ^Z to suspend gdb and then kill it with "kill %1" or
+something similar.
+
+If gdbstub Does Not Work
+========================
+
+If it doesn't work, you will have to troubleshoot it.  Do the easy
+things first like double checking your cabling and data rates.  You
+might try some non-kernel based programs to see if the back-to-back
+connection works properly.  Just something simple like cat /etc/hosts
+>/dev/ttyS0 on one machine and cat /dev/ttyS0 on the other will tell you
+if you can send data from one machine to the other.  Make sure it works
+in both directions.  There is no point in tearing out your hair in the
+kernel if the line doesn't work.
+
+All of the real action takes place in the file
+/usr/src/linux/arch/i386/kernel/kgdb_stub.c.  That is the code on the target
+machine that interacts with gdb on the development machine.  In gdb you can
+turn on a debug switch with the following command:
+
+	set remotedebug
+
+This will print out the protocol messages that gdb is exchanging with
+the target machine.
+
+Another place to look is /usr/src/arch/i386/lib/kgdb_serial.c. This is
+the code that talks to the serial port on the target side.  There might
+be a problem there.  In particular there is a section of this code that
+tests the UART which will tell you what UART you have if you define
+"PRNT" (just remove "_off" from the #define PRNT_off).  To view this
+report you will need to boot the system without any beakpoints.  This
+allows the kernel to run to the point where it calls kgdb to set up
+interrupts.  At this time kgdb will test the UART and print out the type
+it finds.  (You need to wait so that the printks are actually being
+printed.  Early in the boot they are cached, waiting for the console to
+be enabled.  Also, if kgdb is entered thru a breakpoint it is possible
+to cause a dead lock by calling printk when the console is locked.  The
+stub thus avoids doing printks from breakpoints, especially in the
+serial code.)  At this time, if the UART fails to do the expected thing,
+kgdb will print out (using printk) information on what failed.  (These
+messages will be buried in all the other boot up messages.  Look for
+lines that start with "gdb_hook_interrupt:".  You may want to use dmesg
+once the system is up to view the log.  If this fails or if you still
+don't connect, review your answers for the port address.  Use:
+
+setserial /dev/ttyS0
+
+to get the current port and IRQ information.  This command will also
+tell you what the system found for the UART type. The stub recognizes
+the following UART types:
+
+16450, 16550, and 16550A
+
+If you are really desperate you can use printk debugging in the
+kgdbstub code in the target kernel until you get it working.  In particular,
+there is a global variable in /usr/src/linux/arch/i386/kernel/kgdb_stub.c
+named "remote_debug".  Compile your kernel with this set to 1, rather
+than 0 and the debug stub will print out lots of stuff as it does
+what it does.  Likewise there are debug printks in the kgdb_serial.c
+code that can be turned on with simple changes in the macro defines.
+
+
+Debugging Loadable Modules
+==========================
+
+This technique comes courtesy of Edouard Parmelan
+<Edouard.Parmelan@quadratec.fr>
+
+When you run gdb, enter the command
+
+source gdbinit-modules
+
+This will read in a file of gdb macros that was installed in your
+kernel source directory when kgdb was installed.  This file implements
+the following commands:
+
+mod-list
+    Lists the loaded modules in the form <module-address> <module-name>
+
+mod-print-symbols <module-address>
+    Prints all the symbols in the indicated module.
+
+mod-add-symbols <module-address> <object-file-path-name>
+    Loads the symbols from the object file and associates them
+    with the indicated module.
+
+After you have loaded the module that you want to debug, use the command
+mod-list to find the <module-address> of your module.  Then use that
+address in the mod-add-symbols command to load your module's symbols.
+From that point onward you can debug your module as if it were a part
+of the kernel.
+
+The file gdbinit-modules also contains a command named mod-add-lis as
+an example of how to construct a command of your own to load your
+favorite module.  The idea is to "can" the pathname of the module
+in the command so you don't have to type so much.
+
+Threads
+=======
+
+Each process in a target machine is seen as a gdb thread. gdb thread
+related commands (info threads, thread n) can be used.
+
+ia-32 hardware breakpoints
+==========================
+
+kgdb stub contains support for hardware breakpoints using debugging features
+of ia-32(x86) processors. These breakpoints do not need code modification.
+They use debugging registers. 4 hardware breakpoints are available in ia-32
+processors.
+
+Each hardware breakpoint can be of one of the following three types.
+
+1. Execution breakpoint - An Execution breakpoint is triggered when code
+	at the breakpoint address is executed.
+
+	As limited number of hardware breakpoints are available, it is
+	advisable to use software breakpoints ( break command ) instead
+	of execution hardware breakpoints, unless modification of code
+	is to be avoided.
+
+2. Write breakpoint - A write breakpoint is triggered when memory
+	location at the breakpoint address is written.
+
+	A write or can be placed for data of variable length. Length of
+	a write breakpoint indicates length of the datatype to be
+	watched. Length is 1 for 1 byte data , 2 for 2 byte data, 3 for
+	4 byte data.
+
+3. Access breakpoint - An access breakpoint is triggered when memory
+	location at the breakpoint address is either read or written.
+
+	Access breakpoints also have lengths similar to write breakpoints.
+
+IO breakpoints in ia-32 are not supported.
+
+Since gdb stub at present does not use the protocol used by gdb for hardware
+breakpoints, hardware breakpoints are accessed through gdb macros. gdb macros
+for hardware breakpoints are described below.
+
+hwebrk	- Places an execution breakpoint
+	hwebrk breakpointno address
+hwwbrk	- Places a write breakpoint
+	hwwbrk breakpointno length address
+hwabrk	- Places an access breakpoint
+	hwabrk breakpointno length address
+hwrmbrk	- Removes a breakpoint
+	hwrmbrk breakpointno
+exinfo	- Tells whether a software or hardware breakpoint has occurred.
+	Prints number of the hardware breakpoint if a hardware breakpoint has
+	occurred.
+
+Arguments required by these commands are as follows
+breakpointno	- 0 to 3
+length		- 1 to 3
+address		- Memory location in hex digits ( without 0x ) e.g c015e9bc
+
+SMP support
+==========
+
+When a breakpoint occurs or user issues a break ( Ctrl + C ) to gdb
+client, all the processors are forced to enter the debugger. Current
+thread corresponds to the thread running on the processor where
+breakpoint occurred.  Threads running on other processor(s) appear
+similar to other non-running threads in the 'info threads' output.
+Within the kgdb stub there is a structure "waiting_cpus" in which kgdb
+records the values of "current" and "regs" for each CPU other than the
+one that hit the breakpoint.  "current" is a pointer to the task
+structure for the task that CPU is running, while "regs" points to the
+saved registers for the task.  This structure can be examined with the
+gdb "p" command.
+
+ia-32 hardware debugging registers on all processors are set to same
+values.  Hence any hardware breakpoints may occur on any processor.
+
+gdb troubleshooting
+===================
+
+1. gdb hangs
+Kill it. restart gdb. Connect to target machine.
+
+2. gdb cannot connect to target machine (after killing a gdb and
+restarting another) If the target machine was not inside debugger when
+you killed gdb, gdb cannot connect because the target machine won't
+respond.  In this case echo "Ctrl+C"(ASCII 3) to the serial line.
+e.g. echo -e "\003" > /dev/ttyS1
+This forces that target machine into the debugger, after which you
+can connect.
+
+3. gdb cannot connect even after echoing Ctrl+C into serial line
+Try changing serial line settings min to 1 and time to 0
+e.g. stty min 1 time 0 < /dev/ttyS1
+Try echoing again
+
+Check serial line speed and set it to correct value if required
+e.g. stty ispeed 115200 ospeed 115200 < /dev/ttyS1
+
+EVENTS
+======
+
+Ever want to know the order of things happening?  Which CPU did what and
+when?  How did the spinlock get the way it is?  Then events are for
+you.  Events are defined by calls to an event collection interface and
+saved for later examination.  In this case, kgdb events are saved by a
+very fast bit of code in kgdb which is fully SMP and interrupt protected
+and they are examined by using gdb to display them.  Kgdb keeps only
+the last N events, where N must be a power of two and is defined at
+configure time.
+
+
+Events are signaled to kgdb by calling:
+
+kgdb_ts(data0,data1)
+
+For each call kgdb records each call in an array along with other info.
+Here is the array definition:
+
+struct kgdb_and_then_struct {
+#ifdef CONFIG_SMP
+	int	on_cpu;
+#endif
+	long long at_time;
+	int  	from_ln;
+	char	* in_src;
+	void	*from;
+        int     with_if;
+	int	data0;
+	int	data1;
+};
+
+For SMP machines the CPU is recorded, for all machines the TSC is
+recorded (gets a time stamp) as well as the line number and source file
+the call was made from.  The address of the (from), the "if" (interrupt
+flag) and the two data items are also recorded.  The macro kgdb_ts casts
+the types to int, so you can put any 32-bit values here.  There is a
+configure option to select the number of events you want to keep.  A
+nice number might be 128, but you can keep up to 1024 if you want.  The
+number must be a power of two.  An "andthen" macro library is provided
+for gdb to help you look at these events.  It is also possible to define
+a different structure for the event storage and cast the data to this
+structure.  For example the following structure is defined in kgdb:
+
+struct kgdb_and_then_struct2 {
+#ifdef CONFIG_SMP
+	int	on_cpu;
+#endif
+	long long at_time;
+	int  	from_ln;
+	char	* in_src;
+	void	*from;
+        int     with_if;
+	struct task_struct *t1;
+	struct task_struct *t2;
+};
+
+If you use this for display, the data elements will be displayed as
+pointers to task_struct entries.  You may want to define your own
+structure to use in casting.  You should only change the last two items
+and you must keep the structure size the same.  Kgdb will handle these
+as 32-bit ints, but within that constraint you can define a structure to
+cast to any 32-bit quantity.  This need only be available to gdb and is
+only used for casting in the display code.
+
+Final Items
+===========
+
+I picked up this code from Amit S. Kale and enhanced it.
+
+If you make some really cool modification to this stuff, or if you
+fix a bug, please let me know.
+
+George Anzinger
+<george@mvista.com>
+
+Amit S. Kale
+<akale@veritas.com>
+
+(First kgdb by David Grothe <dave@gcom.com>)
+
+(modified by Tigran Aivazian <tigran@sco.com>)
+    Putting gdbstub into the kernel config menu.
+
+(modified by Scott Foehner <sfoehner@engr.sgi.com>)
+    Hooks for entering gdbstub at boot time.
+
+(modified by Amit S. Kale <akale@veritas.com>)
+    Threads, ia-32 hw debugging, mp support, console support,
+    nmi watchdog handling.
+
+(modified by George Anzinger <george@mvista.com>)
+    Extended threads to include the idle threads.
+    Enhancements to allow breakpoint() at first C code.
+    Use of module_init() and __setup() to automate the configure.
+    Enhanced the cpu "collection" code to work in early bring-up.
+    Added ability to call functions from gdb
+    Print info thread stuff without going back to schedule()
+    Now collect the "other" cpus with an IPI/ NMI.
--- diff/Documentation/i386/kgdb/kgdbeth.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/i386/kgdb/kgdbeth.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,92 @@
+KGDB over ethernet
+==================
+
+Authors
+-------
+
+Robert Walsh <rjwalsh@durables.org>  (2.6 port)
+wangdi <wangdi@clusterfs.com>        (2.6 port)
+Matt Mackall <mpm@selenic.com>       (netpoll api)
+San Mehat                            (original 2.4 code)
+
+
+Introduction
+------------
+
+KGDB supports debugging over ethernet (kgdboe) via polling of a given
+network interface. Most cards should be supported automatically.
+Debugging facilities are available as soon as the network driver and
+kgdboe have initialized. Unfortunately, this is too late in the boot
+process for debugging some issues, but works quite well for many
+others. This should not interfere with normal network usage and
+doesn't require a dedicated NIC.
+
+Terminology
+-----------
+
+This document uses the following terms:
+
+  TARGET: the machine being debugged.
+  HOST:   the machine running gdb.
+
+
+Usage
+-----
+
+You need to use the following command-line option on the TARGET kernel:
+
+  kgdboe=[tgt-port]@<tgt-ip>/[dev],[host-port]@<host-ip>/[host-macaddr]
+
+    where
+        tgt-port      source for UDP packets (defaults to 6443)
+        tgt-ip        source IP to use (interface address)
+        dev           network interface (eth0)
+        host-port     HOST UDP port (6442) (not really used)
+        host-ip       IP address for HOST machine
+        host-macaddr  ethernet MAC address for HOST (ff:ff:ff:ff:ff:ff)
+
+  examples:
+
+    kgdboe=7000@192.168.0.1/eth1,7001@192.168.0.2/00:05:3C:04:47:5D
+        this machine is 192.168.0.1 on eth1
+        remote machine is 192.168.0.2 with MAC address 00:05:3C:04:47:5D
+        listen for gdb packets on port 7000
+        send unsolicited gdb packets to port 7001
+
+    kgdboe=@192.168.0.1/,@192.168.0.2/
+        this machine is 192.168.0.1 on default interface eth0
+        remote machine is 192.168.0.2, use default broadcast MAC address
+        listen for gdb packets on default port 6443
+        send unsolicited gdb packets to port 6442
+
+Only packets originating from the configured HOST IP address will be
+accepted by the debugger.
+
+On the HOST side, run gdb as normal and use a remote UDP host as the
+target:
+
+   % gdb ./vmlinux
+   GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
+   Copyright 2003 Free Software Foundation, Inc.
+   GDB is free software, covered by the GNU General Public License, and you are
+   welcome to change it and/or distribute copies of it under certain conditions.
+   Type "show copying" to see the conditions.
+   There is absolutely no warranty for GDB.  Type "show warranty" for details.
+   This GDB was configured as "i386-redhat-linux-gnu"...
+   (gdb) target remote udp:HOSTNAME:6443
+
+You can now continue as if you were debugging over a serial line.
+
+Limitations
+-----------
+
+The current release of this code is exclusive of using kgdb on a
+serial interface, so you must boot without the kgdboe option to use
+serial debugging. Trying to debug the network driver while using it
+will prove interesting.
+
+Bug reports
+-----------
+
+Send bug reports to Robert Walsh <rjwalsh@durables.org> and Matt
+Mackall <mpm@selenic.com>.
--- diff/Documentation/i386/kgdb/loadmodule.sh	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/i386/kgdb/loadmodule.sh	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,78 @@
+#/bin/sh
+# This script loads a module on a target machine and generates a gdb script.
+# source generated gdb script to load the module file at appropriate addresses
+# in gdb.
+#
+# Usage:
+# Loading the module on target machine and generating gdb script)
+#	[foo]$ loadmodule.sh <modulename>
+#
+# Loading the module file into gdb
+#	(gdb) source <gdbscriptpath>
+#
+# Modify following variables according to your setup.
+#	TESTMACHINE - Name of the target machine
+#	GDBSCRIPTS - The directory where a gdb script will be generated
+#
+# Author: Amit S. Kale (akale@veritas.com).
+#
+# If you run into problems, please check files pointed to by following
+# variables.
+#	ERRFILE - /tmp/<modulename>.errs contains stderr output of insmod
+#	MAPFILE - /tmp/<modulename>.map contains stdout output of insmod
+#	GDBSCRIPT - $GDBSCRIPTS/load<modulename> gdb script.
+
+TESTMACHINE=foo
+GDBSCRIPTS=/home/bar
+
+if [ $# -lt 1 ] ; then {
+	echo Usage: $0 modulefile
+	exit
+} ; fi
+
+MODULEFILE=$1
+MODULEFILEBASENAME=`basename $1`
+
+if [ $MODULEFILE = $MODULEFILEBASENAME ] ; then {
+	MODULEFILE=`pwd`/$MODULEFILE
+} fi
+
+ERRFILE=/tmp/$MODULEFILEBASENAME.errs
+MAPFILE=/tmp/$MODULEFILEBASENAME.map
+GDBSCRIPT=$GDBSCRIPTS/load$MODULEFILEBASENAME
+
+function findaddr() {
+	local ADDR=0x$(echo "$SEGMENTS" | \
+		grep "$1" | sed 's/^[^ ]*[ ]*[^ ]*[ ]*//' | \
+		sed 's/[ ]*[^ ]*$//')
+	echo $ADDR
+}
+
+function checkerrs() {
+	if [ "`cat $ERRFILE`" != "" ] ; then {
+		cat $ERRFILE
+		exit
+	} fi
+}
+
+#load the module
+echo Copying $MODULEFILE to $TESTMACHINE
+rcp $MODULEFILE root@${TESTMACHINE}:
+
+echo Loading module $MODULEFILE
+rsh -l root $TESTMACHINE  /sbin/insmod -m ./`basename $MODULEFILE` \
+	> $MAPFILE 2> $ERRFILE
+checkerrs
+
+SEGMENTS=`head -n 11 $MAPFILE | tail -n 10`
+TEXTADDR=$(findaddr "\\.text[^.]")
+LOADSTRING="add-symbol-file $MODULEFILE $TEXTADDR"
+SEGADDRS=`echo "$SEGMENTS" | awk '//{
+	if ($1 != ".text" && $1 != ".this" &&
+	    $1 != ".kstrtab" && $1 != ".kmodtab") {
+		print " -s " $1 " 0x" $3 " "
+	}
+}'`
+LOADSTRING="$LOADSTRING $SEGADDRS"
+echo Generating script $GDBSCRIPT
+echo $LOADSTRING > $GDBSCRIPT
--- diff/Documentation/ia64/kgdb.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/ia64/kgdb.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,9 @@
+IA64 kgdb requires a patch to gdb/remote.c. The proposed patch will eventually be in gdb but
+until then, within gdb do "show remote" and look for "Support for remote protocol `p' (fetch-register) packet is auto-detected, currently unknown."  Should this line not appear, then you must
+obtain the patch, apply it and build gdb.
+
+CONFIG_KGDB_EARLY enables one with serial kgdb support to debug the kernel starting at the
+end of the routine setup_arch.  A boot option of "kgdb=1" will result in a kernel breakpoint
+and requires gdb to continue from the breakpoint.
+
+For further information consult the i386 kgdb documentation.
--- diff/Documentation/must-fix.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/must-fix.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,249 @@
+
+Must-fix bugs
+=============
+
+drivers/char/
+~~~~~~~~~~~~~
+
+o TTY locking is broken.
+
+  o see FIXME in do_tty_hangup().  This causes ppp BUGs in local_bh_enable()
+
+  o Other problems: aviro, dipankar, Alan have details.
+
+  o somebody will have to document the tty driver and ldisc API
+
+drivers/tty
+~~~~~~~~~~~
+
+o viro: tty_driver refcounting, tty/misc/upper levels of sound still not
+  completely fixed.
+
+drivers/block/
+~~~~~~~~~~~~~~
+
+o loop.c: Concurrent write access on block devices might cause a deadlock
+  of the complete system. See:
+  http://marc.theaimsgroup.com/?l=linux-kernel&m=106275365925769&w==
+  http://bugzilla.kernel.org/show_bug.cgi?id=1198
+  Thread of possible fix:
+  http://www.kerneli.org/pipermail/cryptoapi-devel/2003-October/000676.html
+
+  (Fruhwirth Clemens)
+
+o ideraid hasn't been ported to 2.5 at all yet.
+
+  We need to understand whether the proposed BIO split code will suffice
+  for this.
+
+drivers/input/
+~~~~~~~~~~~~~~
+
+o rmk: unconverted keyboard/mouse drivers (there's a deadline of 2.6.0
+  currently on these remaining in my/Linus' tree.)
+
+o viro: large absence of locking.
+
+o viro: parport is nearly as bad as that and there the code is more hairy.
+  IMO parport is more of "figure out what API changes are needed for its
+  users, get them done ASAP, then fix generic layer at leisure"
+
+
+drivers/misc/
+~~~~~~~~~~~~~
+
+o rmk: UCB1[23]00 drivers, currently sitting in drivers/misc in the ARM
+  tree.  (touchscreen, audio, gpio, type device.)
+
+  These need to be moved out of drivers/misc/ and into real places
+
+o viro: actually, misc.c has a good chance to die.  With cdev-cidr that's
+  trivial.
+
+drivers/net/
+~~~~~~~~~~~~
+
+drivers/net/irda/
+~~~~~~~~~~~~~~~~~
+
+  (Jean Tourrilhes)
+
+o irport need to be converted to sir-kthread
+
+o dongle drivers need to be converted to sir-dev (in progress)
+
+o new drivers (irtty-sir/smsc-ircc2/donauboe) need more testing (in progress)
+
+
+drivers/pci/
+~~~~~~~~~~~~
+
+o alan: Some cardbus crashes the system
+
+  (bugzilla, please?)
+
+drivers/pcmcia/
+~~~~~~~~~~~~~~~
+
+o alan: This is a locking disaster.
+
+  (rmk, brodo: in progress)
+
+drivers/pld/
+~~~~~~~~~~~~
+
+o rmk: EPXA (ARM platform) PLD hotswap drivers (drivers/pld)
+
+  (rmk: will work out what to do here.  maybe drivers/arm/)
+
+drivers/video/
+~~~~~~~~~~~~~~
+
+o Lots of drivers don't compile, others do but don't work.
+
+drivers/scsi/
+~~~~~~~~~~~~~
+
+o Convert am53c974, dpt_i2o, initio and pci2220i to DMA-mapping
+
+o Make inia100, cpqfc, pci2000 and dc390t compile
+
+o Convert
+
+   wd33c99 based: a2091 a3000 gpv11 mvme174 sgiwd93
+
+   53c7xx based: amiga7xxx bvme6000 mvme16x initio am53c974 pci2000
+   pci2220i dc390t
+
+  To new error handling
+
+  It also might be possible to shift the 53c7xx based drivers over to
+  53c700 which does the new EH stuff, but I don't have the hardware to check
+  such a shift.
+
+  For the non-compiling stuff, I've probably missed a few that just aren't
+  compilable on my platforms, so any updates would be welcome.  Also, are
+  some of our non-compiling or unconverted drivers obsolete?
+
+fs/
+~~~
+
+o viro: fs/char_dev.c needs removal of aeb stuff and merge of cdev-cidr.
+  In progress.
+
+o viro: there is some generic stuff for namei/namespace/super, but that's a
+  slow-merge and can go in 2.6 just fine
+
+
+kernel/sched.c
+~~~~~~~~~~~~~~
+
+o Starvation, general interactivity need close monitoring.
+
+
+kernel/
+~~~~~~~
+
+o Alan: 32bit uid support is *still* broken for process accounting.
+
+  Create a 32bit uid, turn accounting on.  Shock horror it doesn't work
+  because the field is 16bit.  We need an acct structure flag day for 2.6
+  IMHO
+
+  (alan has patch)
+
+o viro: core sysctl code is racy.  And its interaction wiuth sysfs
+
+
+lib/kobject.c
+~~~~~~~~~~~~~
+
+o kobject refcounting (comments from Al Viro):
+
+  _anything_ can grab a temporary reference to kobject.  IOW, if kobject is
+  embedded into something that could be freed - it _MUST_ have a destructor
+  and that destructor _MUST_ be the destructor for containing object.
+
+  Any violation of the above (and we already have a bunch of those) is a
+  user-triggerable memory corruption.
+
+  We can tolerate it for a while in 2.5 (e.g.  during work on susbsystem we
+  can decide to switch to that way of handling objects and have subsystem
+  vulnerable for a while), but all such windows must be closed before 2.6
+  and during 2.6 we can't open them at all.
+
+o All block drivers which control multiple gendisks with a single
+  request_queue are broken, due to one-to-one assumptions in the request
+  queue sysfs hookup.
+
+mm/
+~~~
+
+o GFP_DMA32 (or something like that).  Lots of ideas.  jejb, zaitcev,
+  willy, arjan, wli.
+
+  Specifically, 64-bit systems need to be able to enforce 32-bit addressing
+  limits for device metadata like network cards' ring buffers and SCSI
+  command descriptors.
+
+o access_process_vm() doesn't flush right.  We probably need new flushing
+  primitives to do this (davem?)
+
+
+modules
+~~~~~~~
+
+  (Rusty)
+
+net/
+~~~~
+
+  (davem)
+
+o UDP apps can in theory deadlock, because the ip_append_data path can end
+  up sleeping while the socket lock is held.
+
+  It is OK to sleep with the socket held held, normally.  But in this case
+  the sleep happens while waiting for socket memory/space to become
+  available, if another context needs to take the socket lock to free up the
+  space we could hang.
+
+  I sent a rough patch on how to fix this to Alexey, and he is analyzing
+  the situation.  I expect a final fix from him next week or so.
+
+o Semantics for IPSEC during operations such as TCP connect suck currently.
+
+  When we first try to connect to a destination, we may need to ask the
+  IPSEC key management daemon to resolve the IPSEC routes for us.  For the
+  purposes of what the kernel needs to do, you can think of it like ARP.  We
+  can't send the packet out properly until we resolve the path.
+
+  What happens now for IPSEC is basically this:
+
+  O_NONBLOCK: returns -EAGAIN over and over until route is resolved
+
+  !O_NONBLOCK: Sleeps until route is resolved
+
+  These semantics are total crap.  The solution, which Alexey is working
+  on, is to allow incomplete routes to exist.  These "incomplete" routes
+  merely put the packet onto a "resolution queue", and once the key manager
+  does it's thing we finish the output of the packet.  This is precisely how
+  ARP works.
+
+  I don't know when Alexey will be done with this.
+
+net/*/netfilter/
+~~~~~~~~~~~~~~~~
+
+  (Rusty)
+
+sound/
+~~~~~~
+
+global
+~~~~~~
+
+o A couple of hundred real looking bugzilla bugs
+
+o viro: cdev rework. Mostly done.
+
--- diff/Documentation/should-fix.txt	1970-01-01 01:00:00.000000000 +0100
+++ source/Documentation/should-fix.txt	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,422 @@
+Not-ready features and speedups
+===============================
+
+Legend:
+
+PRI1:	We're totally lame if this doesn't get in
+PRI2:	Would be nice
+PRI3:	Not very important
+
+drivers/block/
+~~~~~~~~~~~~~~
+
+drivers/char/rtc/
+~~~~~~~~~~~~~~~~~
+
+o rmk, trini: add support for alarms to the existing generic rtc driver.
+
+  PRI2
+
+console drivers
+~~~~~~~~~~~~~~~
+  (Pavel Machek <pavel@ucw.cz>)
+
+o There are few must-fix bugs in cursor handling.
+
+o Play with gpm selection for a while and your cursor gets corrupted with
+  random dots. Ouch.
+
+device mapper
+~~~~~~~~~~~~~
+
+o ioctl interface cleanup patch is ready (redo the structure layouts)
+
+  PRI1
+
+o A port of the 2.4 snapshot and mirror targets is in progress
+
+  PRI1
+
+o the fs interface to dm needs to be redone.  gregkh was going to work on
+  this.  viro is interested in seeing work thus-far.
+
+  PRI2
+
+drivers/net/wireless/
+~~~~~~~~~~~~~~~~~~~~~
+
+  (Jean Tourrilhes <jt@bougret.hpl.hp.com>)
+
+o get HostAP driver in the kernel.  No consolidation of the 802.11
+  management across driver can happen until this one is in (which is probably
+  2.7.X material).  I think Jouni is mostly ready but didn't find time for
+  it.
+
+  PRI2
+
+o get more wireless drivers into the kernel.  The most "integrable" drivers
+  at this point seem the NWN driver, Pavel's Spectrum driver.
+
+  PRI1
+
+drivers/usb/gadget/
+~~~~~~~~~~~~~~~~~~~
+
+o rmk: SA11xx USB client/gadget code (David B has been doing some work on
+  this, and keeps trying to prod me, but unfortunately I haven't had the time
+  to look at his work, sorry David.)
+
+  PRI3
+
+fs/
+~~~
+
+o ext3 and ext2 block allocators have serious failure modes - interleaved
+  allocations. (Reservation patch in -mm).
+
+  PRI3
+
+o Integrate Chris Mason's 2.4 reiserfs ordered data and data journaling
+  patches.  They make reiserfs a lot safer.
+
+  Ordered: PRI2
+  data journalled: PRI3
+
+o viro: convert more filesystems to use lib/parser.c for options.
+
+  PRI2
+
+o aio: fs IO isn't async at present.  suparna has restart patches, they're
+  in -mm.  Need to get Ben to review/comment.
+
+  PRI1.
+
+o drepper: various filesystems use ->pid wrongly
+
+  PRI1
+
+kernel/
+~~~~~~~
+
+o rusty: Zippel's Reference count simplification.  Tricky code, but cuts
+  about 120 lines from module.c.  Patch exists, needs stressing.
+
+  PRI3
+
+o rusty: Fix module-failed-init races by starting module "disabled".  Patch
+  exists, requires some subsystems (ie.  add_partition) to explicitly say
+  "make module live now".  Without patch we are no worse off than 2.4 etc.
+
+  PRI1
+
+o kexec.  Seems to work, was in -mm.
+
+  PRI3
+
+o rmk: lib/inflate.c must not use static variables (causes these to be
+  referenced via GOTOFF relocations in PIC decompressor.  We have a PIC
+  decompressor to avoid having to hard code a per platform zImage link
+  address into the makefiles.)
+
+  PRI2
+
+
+mm/
+~~~
+
+
+net/
+~~~~
+
+  (davem)
+
+o Real serious use of IPSEC is hampered by lack of MPLS support.  MPLS is a
+  switching technology that works by switching based upon fixed length labels
+  prepended to packets.  Many people use this and IPSEC to implement VPNs
+  over public networks, it is also used for things like traffic engineering.
+
+  A good reference site is:
+
+	http://www.mplsrc.com/
+
+  Anyways, an existing (crappy) implementation exists.  I've almost
+  completed a rewrite, I should have something in the tree next week.
+
+  PRI1
+
+o Sometimes we generate IP fragments when it truly isn't necessary.
+
+  The way IP fragmentation is specified, each fragment must be modulo 8
+  bytes in length.  So suppose the device has an MTU that is not 0 modulo 8,
+  ethernet even classifies in this way.  1500 == (8 * 187) + 4
+
+  Our IP fragmenting engine can fragment on packets that are sized within
+  the last modulo 8 bytes of the MTU.  This happens in obscure cases, but it
+  does happen.
+
+  I've proposed a fix to Alexey, whereby very late in the output path we
+  check the packet, if we fragmented but the data length would fit into the
+  MTU we unfragment the packet.
+
+  This is low priority, because technically it creates suboptimal behavior
+  rather than mis-operation.
+
+  PRI1
+
+net/*/netfilter/
+~~~~~~~~~~~~~~~~
+
+o Lots of misc. cleanups, which are happening slowly.
+
+  PRI2
+
+power management
+~~~~~~~~~~~~~~~~
+
+o Pat and Pavel disagree over swsusp. Need to sort that out.
+
+  PRI2
+
+o Frame buffer, AGP, DRI restore.
+
+  PRI2
+
+o XFree86 hooks
+
+  PRI2
+
+o IDE suspend/resume without races (Ben is looking at this a little)
+
+  PRI2
+
+o Pat: There are already CPU device structures; MTRRs should be a
+  dynamically registered interface of CPUs, which implies there needs
+  to be some other glue to know that there are MTRRs that need to be
+  saved/restored.
+
+  PRI1
+
+global
+~~~~~~
+
+o viro: 64-bit dev_t (not a mustfix for 2.6.0). 32-bit dev_t is done, 64-bit
+  means extra work on nfsd/raid/etc.
+
+o We need a kernel side API for reporting error events to userspace (could
+  be async to 2.6 itself)
+
+  (Prototype core based on netlink exists)
+
+  PRI2
+
+o Kai: Introduce a sane, easy and standard way to build external modules
+  - make clean and make modules_install are both broken
+
+  PRI2
+
+drivers
+~~~~~~~
+
+o Alan: Cardbus/PCMCIA requires all Russell's stuff is merged to do
+  multiheader right and so on
+
+  PRI1
+
+drivers/acpi/
+~~~~~~~~~~~~~
+
+o alan: VIA APIC stuff is one bit of this, there are also some other
+  reports that were caused by ACPI not setting level v edge trigger some
+  times
+
+  PRI1
+
+o mochel: it seems the acpi irq routing code could use a serious rewrite.
+
+  grover: The problem is the ACPI irq routing code is trying to piggyback
+  on the existing MPS-specific data structures, and it's generally a hack.
+  So yes mochel is right, but it is also purging MPS-ities from common code
+  as well.  I've done some preliminary work in this area and it doesn't seem
+  to break anything (yet) but a rewrite in this area imho should not be
+  rushed out the door.  And, I think the above bugs can be fixed w/o the
+  rewrite.
+
+  PRI2
+
+o mochel: ACPI suspend doesn't work.  Important, not cricital.  Pat is
+  working it.
+
+  PRI2
+
+drivers/block/
+~~~~~~~~~~~~~~
+
+
+drivers/char/
+~~~~~~~~~~~~~
+
+
+drivers/ide/
+~~~~~~~~~~~~
+
+  (Alan)
+
+o IDE races, PIO problems, simplex, hotplug, taskfile.
+
+  PRI2
+
+
+drivers/isdn/
+~~~~~~~~~~~~~
+
+  (Kai, rmk)
+
+o locking fixes, cleanups, adaption to recent APIs etc
+
+  PRI2
+
+o fixup tty-based ISDN drivers which provide TIOCM* ioctls (see my recent
+  3-set patch for serial stuff)
+
+  Alternatively, we could re-introduce the fallback to driver ioctl parsing
+  for these if not enough drivers get updated.
+
+  PRI3
+
+drivers/net/
+~~~~~~~~~~~~
+
+o davej: Either Wireless network drivers or PCMCIA broke somewhen.  A
+  configuration that worked fine under 2.4 doesn't receive any packets.  Need
+  to look into this more to make sure I don't have any misconfiguration that
+  just 'happened to work' under 2.4
+
+  PRI1
+
+drivers/scsi/
+~~~~~~~~~~~~~
+
+o jejb: qlogic -
+
+  o Merge the feral driver.  It covers all qlogic chips: 1020 all the way
+    up to 23xxx. http://linux-scsi.bkbits.net/scsi-isp-2.5
+
+  o qla2xxx: only for FC chips.  Has significant build issues.  hch
+    promises to send me a "must fix" list for this.
+    http://linux-scsi.bkbits.net/scsi-qla2xxx-2.5
+
+  PRI2
+
+o hch, Mike Anderson, Badari Pulavarty: scsi locking issues
+
+  o there are lots of members of struct Scsi_Host/scsi_device/scsi_cmnd
+    with very unclear locking, many of them probably want to become
+    atomic_t's or bitmaps (for the 1bit bitfields).
+
+  o there's lots of volatile abuse in the scsi code that needs to be
+    thought about.
+
+  o there's some global variables incremented without any locks
+
+  PRI2
+
+sound/
+~~~~~~
+
+  (rmk)
+
+o ALSA-fication of drivers, forward port 2.4 bugfixes
+  (Killing off OSS is 2.7 material)
+
+PRI2
+
+arch/i386/
+~~~~~~~~~~
+
+o davej: PAT support (for mtrr exhaustion w/ AGP)
+
+  PRI2
+
+o ECC driver questions are not yet sorted (DaveJ is working on this) (Dan
+  Hollis)
+
+  alan: ECC - I have some test bits from Dan's stuff - they need no kernel
+  core changes for most platforms.  That means we can treat it as a random
+  driver merge.
+
+  PRI3
+
+
+arch/x86_64/
+~~~~~~~~~~~~
+
+  (Andi)
+
+o need to coredump 64bit vsyscall code with dwarf2
+
+  PRI2
+
+o move 64bit signal trampolines into vsyscall code and add dwarf2 for it.
+  (in progress)
+
+  PRI1
+
+o describe kernel assembly with dwarf2 annotations for kgdb
+
+  PRI3
+
+arch/alpha/
+~~~~~~~~~~~
+
+o rth: Ptrace writes are broken.  This means we can't (reliably) set
+  breakpoints or modify variables from gdb.
+
+  PRI1
+
+arch/arm/
+~~~~~~~~~
+
+o rmk: missing raw keyboard translation tables for all ARM machines.
+  Haven't even looked into this at all.  This could be messy since there
+  isn't an ARM architecture standard.  I'm presently hoping that it won't be
+  an issue.  If it does, I guess we'll see drivers/char/keyboard.c explode.
+
+  PRI2
+
+arch/others/
+~~~~~~~~~~~~
+
+o SH needs resyncing, as do some other ports. SH64 needs merging.
+  No impact on mainstream platforms hopefully.
+
+  PRI2
+
+arch/s390/
+~~~~~~~~~
+
+
+drivers/s390/
+~~~~~~~~~~~~~
+
+o The 3270 console driver needs to be replaced with a working one
+  (prototype is there, needs to be finished).
+
+  PRI2
+
+o Minor interface changes are pending in cio/ when the z990 machines are
+  out.
+
+  PRI2
+
+o a block device driver for ramdisks shared among virtual machines
+
+  PRI3
+
+o driver for crypto hardware
+
+  PRI3
+
+o 'claw' network device driver
+
+  PRI3
+
--- diff/arch/arm/common/time-acorn.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/common/time-acorn.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,67 @@
+/*
+ *  linux/arch/arm/common/time-acorn.c
+ *
+ *  Copyright (c) 1996-2000 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Changelog:
+ *   24-Sep-1996	RMK	Created
+ *   10-Oct-1996	RMK	Brought up to date with arch-sa110eval
+ *   04-Dec-1997	RMK	Updated for new arch/arm/time.c
+ *   13=Jun-2004	DS	Moved to arch/arm/common b/c shared w/CLPS7500
+ */
+#include <linux/timex.h>
+#include <linux/init.h>
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/hardware/ioc.h>
+
+#include <asm/mach/time.h>
+
+static unsigned long ioctime_gettimeoffset(void)
+{
+	unsigned int count1, count2, status;
+	long offset;
+
+	ioc_writeb (0, IOC_T0LATCH);
+	barrier ();
+	count1 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
+	barrier ();
+	status = ioc_readb(IOC_IRQREQA);
+	barrier ();
+	ioc_writeb (0, IOC_T0LATCH);
+	barrier ();
+	count2 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
+
+	offset = count2;
+	if (count2 < count1) {
+		/*
+		 * We have not had an interrupt between reading count1
+		 * and count2.
+		 */
+		if (status & (1 << 5))
+			offset -= LATCH;
+	} else if (count2 > count1) {
+		/*
+		 * We have just had another interrupt between reading
+		 * count1 and count2.
+		 */
+		offset -= LATCH;
+	}
+
+	offset = (LATCH - offset) * (tick_nsec / 1000);
+	return (offset + LATCH/2) / LATCH;
+}
+
+void __init ioctime_init(void)
+{
+	ioc_writeb(LATCH & 255, IOC_T0LTCHL);
+	ioc_writeb(LATCH >> 8, IOC_T0LTCHH);
+	ioc_writeb(0, IOC_T0GO);
+
+	gettimeoffset = ioctime_gettimeoffset;
+}
--- diff/arch/arm/mach-footbridge/time.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-footbridge/time.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,296 @@
+/*
+ *  linux/include/asm-arm/arch-ebsa285/time.h
+ *
+ *  Copyright (C) 1998 Russell King.
+ *  Copyright (C) 1998 Phil Blundell
+ *
+ * CATS has a real-time clock, though the evaluation board doesn't.
+ *
+ * Changelog:
+ *  21-Mar-1998	RMK	Created
+ *  27-Aug-1998	PJB	CATS support
+ *  28-Dec-1998	APH	Made leds optional
+ *  20-Jan-1999	RMK	Started merge of EBSA285, CATS and NetWinder
+ *  16-Mar-1999	RMK	More support for EBSA285-like machines with RTCs in
+ */
+
+#define RTC_PORT(x)		(rtc_base+(x))
+#define RTC_ALWAYS_BCD		0
+
+#include <linux/timex.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
+#include <linux/mc146818rtc.h>
+#include <linux/bcd.h>
+
+#include <asm/hardware/dec21285.h>
+
+#include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/leds.h>
+#include <asm/mach-types.h>
+#include <asm/io.h>
+#include <asm/hardware/clps7111.h>
+
+#include <asm/mach/time.h>
+
+static int rtc_base;
+
+#define mSEC_10_from_14 ((14318180 + 100) / 200)
+
+static unsigned long isa_gettimeoffset(void)
+{
+	int count;
+
+	static int count_p = (mSEC_10_from_14/6);    /* for the first call after boot */
+	static unsigned long jiffies_p = 0;
+
+	/*
+	 * cache volatile jiffies temporarily; we have IRQs turned off. 
+	 */
+	unsigned long jiffies_t;
+
+	/* timer count may underflow right here */
+	outb_p(0x00, 0x43);	/* latch the count ASAP */
+
+	count = inb_p(0x40);	/* read the latched count */
+
+	/*
+	 * We do this guaranteed double memory access instead of a _p 
+	 * postfix in the previous port access. Wheee, hackady hack
+	 */
+ 	jiffies_t = jiffies;
+
+	count |= inb_p(0x40) << 8;
+
+	/* Detect timer underflows.  If we haven't had a timer tick since 
+	   the last time we were called, and time is apparently going
+	   backwards, the counter must have wrapped during this routine. */
+	if ((jiffies_t == jiffies_p) && (count > count_p))
+		count -= (mSEC_10_from_14/6);
+	else
+		jiffies_p = jiffies_t;
+
+	count_p = count;
+
+	count = (((mSEC_10_from_14/6)-1) - count) * (tick_nsec / 1000);
+	count = (count + (mSEC_10_from_14/6)/2) / (mSEC_10_from_14/6);
+
+	return count;
+}
+
+static irqreturn_t
+isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static unsigned long __init get_isa_cmos_time(void)
+{
+	unsigned int year, mon, day, hour, min, sec;
+	int i;
+
+	// check to see if the RTC makes sense.....
+	if ((CMOS_READ(RTC_VALID) & RTC_VRT) == 0)
+		return mktime(1970, 1, 1, 0, 0, 0);
+
+	/* The Linux interpretation of the CMOS clock register contents:
+	 * When the Update-In-Progress (UIP) flag goes from 1 to 0, the
+	 * RTC registers show the second which has precisely just started.
+	 * Let's hope other operating systems interpret the RTC the same way.
+	 */
+	/* read RTC exactly on falling edge of update flag */
+	for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */
+		if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)
+			break;
+
+	for (i = 0 ; i < 1000000 ; i++) /* must try at least 2.228 ms */
+		if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP))
+			break;
+
+	do { /* Isn't this overkill ? UIP above should guarantee consistency */
+		sec  = CMOS_READ(RTC_SECONDS);
+		min  = CMOS_READ(RTC_MINUTES);
+		hour = CMOS_READ(RTC_HOURS);
+		day  = CMOS_READ(RTC_DAY_OF_MONTH);
+		mon  = CMOS_READ(RTC_MONTH);
+		year = CMOS_READ(RTC_YEAR);
+	} while (sec != CMOS_READ(RTC_SECONDS));
+
+	if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
+		BCD_TO_BIN(sec);
+		BCD_TO_BIN(min);
+		BCD_TO_BIN(hour);
+		BCD_TO_BIN(day);
+		BCD_TO_BIN(mon);
+		BCD_TO_BIN(year);
+	}
+	if ((year += 1900) < 1970)
+		year += 100;
+	return mktime(year, mon, day, hour, min, sec);
+}
+
+static int
+set_isa_cmos_time(void)
+{
+	int retval = 0;
+	int real_seconds, real_minutes, cmos_minutes;
+	unsigned char save_control, save_freq_select;
+	unsigned long nowtime = xtime.tv_sec;
+
+	save_control = CMOS_READ(RTC_CONTROL); /* tell the clock it's being set */
+	CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
+
+	save_freq_select = CMOS_READ(RTC_FREQ_SELECT); /* stop and reset prescaler */
+	CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
+
+	cmos_minutes = CMOS_READ(RTC_MINUTES);
+	if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
+		BCD_TO_BIN(cmos_minutes);
+
+	/*
+	 * since we're only adjusting minutes and seconds,
+	 * don't interfere with hour overflow. This avoids
+	 * messing with unknown time zones but requires your
+	 * RTC not to be off by more than 15 minutes
+	 */
+	real_seconds = nowtime % 60;
+	real_minutes = nowtime / 60;
+	if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1)
+		real_minutes += 30;		/* correct for half hour time zone */
+	real_minutes %= 60;
+
+	if (abs(real_minutes - cmos_minutes) < 30) {
+		if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
+			BIN_TO_BCD(real_seconds);
+			BIN_TO_BCD(real_minutes);
+		}
+		CMOS_WRITE(real_seconds,RTC_SECONDS);
+		CMOS_WRITE(real_minutes,RTC_MINUTES);
+	} else
+		retval = -1;
+
+	/* The following flags have to be released exactly in this order,
+	 * otherwise the DS12887 (popular MC146818A clone with integrated
+	 * battery and quartz) will not reset the oscillator and will not
+	 * update precisely 500 ms later. You won't find this mentioned in
+	 * the Dallas Semiconductor data sheets, but who believes data
+	 * sheets anyway ...                           -- Markus Kuhn
+	 */
+	CMOS_WRITE(save_control, RTC_CONTROL);
+	CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
+
+	return retval;
+}
+
+
+static unsigned long timer1_latch;
+
+static unsigned long timer1_gettimeoffset (void)
+{
+	unsigned long value = timer1_latch - *CSR_TIMER1_VALUE;
+
+	return ((tick_nsec / 1000) * value) / timer1_latch;
+}
+
+static irqreturn_t
+timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	*CSR_TIMER1_CLR = 0;
+
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction footbridge_timer_irq = {
+	.flags	= SA_INTERRUPT
+};
+
+/*
+ * Set up timer interrupt.
+ */
+void __init footbridge_init_time(void)
+{
+	if (machine_is_co285() ||
+	    machine_is_personal_server())
+		/*
+		 * Add-in 21285s shouldn't access the RTC
+		 */
+		rtc_base = 0;
+	else
+		rtc_base = 0x70;
+
+	if (rtc_base) {
+		int reg_d, reg_b;
+
+		/*
+		 * Probe for the RTC.
+		 */
+		reg_d = CMOS_READ(RTC_REG_D);
+
+		/*
+		 * make sure the divider is set
+		 */
+		CMOS_WRITE(RTC_REF_CLCK_32KHZ, RTC_REG_A);
+
+		/*
+		 * Set control reg B
+		 *   (24 hour mode, update enabled)
+		 */
+		reg_b = CMOS_READ(RTC_REG_B) & 0x7f;
+		reg_b |= 2;
+		CMOS_WRITE(reg_b, RTC_REG_B);
+
+		if ((CMOS_READ(RTC_REG_A) & 0x7f) == RTC_REF_CLCK_32KHZ &&
+		    CMOS_READ(RTC_REG_B) == reg_b) {
+			struct timespec tv;
+
+			/*
+			 * We have a RTC.  Check the battery
+			 */
+			if ((reg_d & 0x80) == 0)
+				printk(KERN_WARNING "RTC: *** warning: CMOS battery bad\n");
+
+			tv.tv_nsec = 0;
+			tv.tv_sec = get_isa_cmos_time();
+			do_settimeofday(&tv);
+			set_rtc = set_isa_cmos_time;
+		} else
+			rtc_base = 0;
+	}
+
+	if (machine_is_ebsa285() ||
+	    machine_is_co285() ||
+	    machine_is_personal_server()) {
+		gettimeoffset = timer1_gettimeoffset;
+
+		timer1_latch = (mem_fclk_21285 + 8 * HZ) / (16 * HZ);
+
+		*CSR_TIMER1_CLR  = 0;
+		*CSR_TIMER1_LOAD = timer1_latch;
+		*CSR_TIMER1_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_AUTORELOAD | TIMER_CNTL_DIV16;
+
+		footbridge_timer_irq.name = "Timer1 Timer Tick";
+		footbridge_timer_irq.handler = timer1_interrupt;
+		
+		setup_irq(IRQ_TIMER1, &footbridge_timer_irq);
+
+	} else {
+		/* enable PIT timer */
+		/* set for periodic (4) and LSB/MSB write (0x30) */
+		outb(0x34, 0x43);
+		outb((mSEC_10_from_14/6) & 0xFF, 0x40);
+		outb((mSEC_10_from_14/6) >> 8, 0x40);
+
+		gettimeoffset = isa_gettimeoffset;
+
+		footbridge_timer_irq.name = "ISA Timer Tick";
+		footbridge_timer_irq.handler = isa_timer_interrupt;
+		
+		setup_irq(IRQ_ISA_TIMER, &footbridge_timer_irq);
+	}
+}
--- diff/arch/arm/mach-integrator/clock.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-integrator/clock.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,138 @@
+/*
+ *  linux/arch/arm/mach-integrator/clock.c
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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/module.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/errno.h>
+#include <linux/err.h>
+
+#include <asm/semaphore.h>
+#include <asm/hardware/clock.h>
+#include <asm/hardware/icst525.h>
+
+#include "clock.h"
+
+static LIST_HEAD(clocks);
+static DECLARE_MUTEX(clocks_sem);
+
+struct clk *clk_get(struct device *dev, const char *id)
+{
+	struct clk *p, *clk = ERR_PTR(-ENOENT);
+
+	down(&clocks_sem);
+	list_for_each_entry(p, &clocks, node) {
+		if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
+			clk = p;
+			break;
+		}
+	}
+	up(&clocks_sem);
+
+	return clk;
+}
+EXPORT_SYMBOL(clk_get);
+
+void clk_put(struct clk *clk)
+{
+	module_put(clk->owner);
+}
+EXPORT_SYMBOL(clk_put);
+
+int clk_enable(struct clk *clk)
+{
+	return 0;
+}
+EXPORT_SYMBOL(clk_enable);
+
+void clk_disable(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_disable);
+
+int clk_use(struct clk *clk)
+{
+	return 0;
+}
+EXPORT_SYMBOL(clk_use);
+
+void clk_unuse(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_unuse);
+
+unsigned long clk_get_rate(struct clk *clk)
+{
+	return clk->rate;
+}
+EXPORT_SYMBOL(clk_get_rate);
+
+long clk_round_rate(struct clk *clk, unsigned long rate)
+{
+	return rate;
+}
+EXPORT_SYMBOL(clk_round_rate);
+
+int clk_set_rate(struct clk *clk, unsigned long rate)
+{
+	int ret = -EIO;
+	if (clk->setvco) {
+		struct icst525_vco vco;
+
+		vco = icst525_khz_to_vco(clk->params, rate);
+		clk->rate = icst525_khz(clk->params, vco);
+
+		printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n",
+			clk->name, vco.s, vco.r, vco.v);
+
+		clk->setvco(clk, vco);
+		ret = 0;
+	}
+	return 0;
+}
+EXPORT_SYMBOL(clk_set_rate);
+
+/*
+ * These are fixed clocks.
+ */
+static struct clk kmi_clk = {
+	.name	= "KMIREFCLK",
+	.rate	= 24000000,
+};
+
+static struct clk uart_clk = {
+	.name	= "UARTCLK",
+	.rate	= 14745600,
+};
+
+int clk_register(struct clk *clk)
+{
+	down(&clocks_sem);
+	list_add(&clk->node, &clocks);
+	up(&clocks_sem);
+	return 0;
+}
+EXPORT_SYMBOL(clk_register);
+
+void clk_unregister(struct clk *clk)
+{
+	down(&clocks_sem);
+	list_del(&clk->node);
+	up(&clocks_sem);
+}
+EXPORT_SYMBOL(clk_unregister);
+
+static int __init clk_init(void)
+{
+	clk_register(&kmi_clk);
+	clk_register(&uart_clk);
+	return 0;
+}
+arch_initcall(clk_init);
--- diff/arch/arm/mach-integrator/clock.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-integrator/clock.h	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,25 @@
+/*
+ *  linux/arch/arm/mach-integrator/clock.h
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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.
+ */
+struct module;
+struct icst525_params;
+
+struct clk {
+	struct list_head	node;
+	unsigned long		rate;
+	struct module		*owner;
+	const char		*name;
+	const struct icst525_params *params;
+	void			*data;
+	void			(*setvco)(struct clk *, struct icst525_vco vco);
+};
+
+int clk_register(struct clk *clk);
+void clk_unregister(struct clk *clk);
--- diff/arch/arm/mach-lh7a40x/time.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-lh7a40x/time.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,67 @@
+/* 
+ *  arch/arm/mach-lh7a40x/time.c
+ *
+ *  Copyright (C) 2004 Logic Product Development
+ *
+ *  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/module.h>
+#include <linux/kernel.h>
+#include <linux/interrupt.h>
+#include <linux/time.h>
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/leds.h>
+
+#include <asm/mach/time.h>
+
+#if HZ < 100
+# define TIMER_CONTROL	TIMER_CONTROL1
+# define TIMER_LOAD	TIMER_LOAD1
+# define TIMER_CONSTANT	(508469/HZ)
+# define TIMER_MODE	(TIMER_C_ENABLE | TIMER_C_PERIODIC | TIMER_C_508KHZ)
+# define TIMER_EOI	TIMER_EOI1
+# define TIMER_IRQ	IRQ_T1UI
+#else
+# define TIMER_CONTROL	TIMER_CONTROL3
+# define TIMER_LOAD	TIMER_LOAD3
+# define TIMER_CONSTANT	(3686400/HZ)
+# define TIMER_MODE	(TIMER_C_ENABLE | TIMER_C_PERIODIC)
+# define TIMER_EOI	TIMER_EOI3
+# define TIMER_IRQ	IRQ_T3UI
+#endif
+
+static irqreturn_t
+lh7a40x_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	TIMER_EOI = 0;
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction lh7a40x_timer_irq = {
+	.name		= "LHA740x Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= lh7a40x_timer_interrupt
+};
+
+void __init lh7a40x_init_time(void)
+{
+				/* Stop/disable all timers */
+	TIMER_CONTROL1 = 0;
+	TIMER_CONTROL2 = 0;
+	TIMER_CONTROL3 = 0;
+
+	setup_irq (TIMER_IRQ, &lh7a40x_timer_irq);
+
+	TIMER_LOAD = TIMER_CONSTANT;
+	TIMER_CONTROL = TIMER_MODE;
+}
+
--- diff/arch/arm/mach-omap/time.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-omap/time.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,217 @@
+/*
+ * arch/arm/mach-omap/time.c
+ *
+ * OMAP Timer Tick 
+ *
+ * Copyright (C) 2000 RidgeRun, Inc.
+ * Author: Greg Lonnon <glonnon@ridgerun.com>
+ *
+ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * You should have received a copy of the  GNU General Public License along
+ * with this program; if not, write  to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
+
+#include <asm/system.h>
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/leds.h>
+#include <asm/irq.h>
+#include <asm/mach/irq.h>
+#include <asm/mach/time.h>
+#include <asm/arch/clocks.h>
+
+#ifndef __instrument
+#define __instrument
+#define __noinstrument __attribute__ ((no_instrument_function))
+#endif
+
+typedef struct {
+	u32 cntl;     /* CNTL_TIMER, R/W */
+	u32 load_tim; /* LOAD_TIM,   W */
+	u32 read_tim; /* READ_TIM,   R */
+} mputimer_regs_t;
+
+#define mputimer_base(n) \
+    ((volatile mputimer_regs_t*)IO_ADDRESS(OMAP_MPUTIMER_BASE + \
+				 (n)*OMAP_MPUTIMER_OFFSET))
+
+static inline unsigned long timer32k_read(int reg) {
+	unsigned long val;
+	val = omap_readw(reg + OMAP_32kHz_TIMER_BASE);
+	return val;
+}
+static inline void timer32k_write(int reg,int val) {
+	omap_writew(val, reg + OMAP_32kHz_TIMER_BASE);
+}
+
+/*
+ * How long is the timer interval? 100 HZ, right...
+ * IRQ rate = (TVR + 1) / 32768 seconds
+ * TVR = 32768 * IRQ_RATE -1
+ * IRQ_RATE =  1/100
+ * TVR = 326
+ */
+#define TIMER32k_PERIOD 326
+//#define TIMER32k_PERIOD 0x7ff
+
+static inline void start_timer32k(void) {
+	timer32k_write(TIMER32k_CR,
+		       TIMER32k_TSS | TIMER32k_TRB |
+		       TIMER32k_INT | TIMER32k_ARL);
+}
+
+#ifdef CONFIG_MACH_OMAP_PERSEUS2
+/*
+ * After programming PTV with 0 and setting the MPUTIM_CLOCK_ENABLE
+ * (external clock enable)  bit, the timer count rate is 6.5 MHz (13
+ * MHZ input/2). !! The divider by 2 is undocumented !!
+ */
+#define MPUTICKS_PER_SEC (13000000/2)
+#else
+/*
+ * After programming PTV with 0, the timer count rate is 6 MHz.
+ * WARNING! this must be an even number, or machinecycles_to_usecs
+ * below will break.
+ */
+#define MPUTICKS_PER_SEC  (12000000/2)
+#endif
+
+static int mputimer_started[3] = {0,0,0};
+
+static inline void __noinstrument start_mputimer(int n,
+						 unsigned long load_val)
+{
+	volatile mputimer_regs_t* timer = mputimer_base(n);
+
+	mputimer_started[n] = 0;
+	timer->cntl = MPUTIM_CLOCK_ENABLE;
+	udelay(1);
+
+	timer->load_tim = load_val;
+        udelay(1);
+	timer->cntl = (MPUTIM_CLOCK_ENABLE | MPUTIM_AR | MPUTIM_ST);
+	mputimer_started[n] = 1;
+}
+
+static inline unsigned long __noinstrument
+read_mputimer(int n)
+{
+	volatile mputimer_regs_t* timer = mputimer_base(n);
+	return (mputimer_started[n] ? timer->read_tim : 0);
+}
+
+void __noinstrument start_mputimer1(unsigned long load_val)
+{
+	start_mputimer(0, load_val);
+}
+void __noinstrument start_mputimer2(unsigned long load_val)
+{
+	start_mputimer(1, load_val);
+}
+void __noinstrument start_mputimer3(unsigned long load_val)
+{
+	start_mputimer(2, load_val);
+}
+
+unsigned long __noinstrument read_mputimer1(void)
+{
+	return read_mputimer(0);
+}
+unsigned long __noinstrument read_mputimer2(void)
+{
+	return read_mputimer(1);
+}
+unsigned long __noinstrument read_mputimer3(void)
+{
+	return read_mputimer(2);
+}
+
+unsigned long __noinstrument do_getmachinecycles(void)
+{
+	return 0 - read_mputimer(0);
+}
+
+unsigned long __noinstrument machinecycles_to_usecs(unsigned long mputicks)
+{
+	/* Round up to nearest usec */
+	return ((mputicks * 1000) / (MPUTICKS_PER_SEC / 2 / 1000) + 1) >> 1;
+}
+
+/*
+ * This marks the time of the last system timer interrupt
+ * that was *processed by the ISR* (timer 2).
+ */
+static unsigned long systimer_mark;
+
+static unsigned long omap_gettimeoffset(void)
+{
+	/* Return elapsed usecs since last system timer ISR */
+	return machinecycles_to_usecs(do_getmachinecycles() - systimer_mark);
+}
+
+static irqreturn_t
+omap_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	unsigned long now, ilatency;
+
+	/*
+	 * Mark the time at which the timer interrupt ocurred using
+	 * timer1. We need to remove interrupt latency, which we can
+	 * retrieve from the current system timer2 counter. Both the
+	 * offset timer1 and the system timer2 are counting at 6MHz,
+	 * so we're ok.
+	 */
+	now = 0 - read_mputimer1();
+	ilatency = MPUTICKS_PER_SEC / 100 - read_mputimer2();
+	systimer_mark = now - ilatency;
+
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction omap_timer_irq = {
+	.name		= "OMAP Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= omap_timer_interrupt
+};
+
+void __init omap_init_time(void)
+{
+	/* Since we don't call request_irq, we must init the structure */
+	gettimeoffset = omap_gettimeoffset;
+
+#ifdef OMAP1510_USE_32KHZ_TIMER
+	timer32k_write(TIMER32k_CR, 0x0);
+	timer32k_write(TIMER32k_TVR,TIMER32k_PERIOD);
+	setup_irq(INT_OS_32kHz_TIMER, &omap_timer_irq);
+	start_timer32k();
+#else
+	setup_irq(INT_TIMER2, &omap_timer_irq);
+	start_mputimer2(MPUTICKS_PER_SEC / 100 - 1);
+#endif
+}
+
--- diff/arch/arm/mach-pxa/time.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-pxa/time.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,124 @@
+/*
+ * arch/arm/mach-pxa/time.c
+ *
+ * Author:	Nicolas Pitre
+ * Created:	Jun 15, 2001
+ * Copyright:	MontaVista Software Inc.
+ *
+ * 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/init.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/time.h>
+#include <linux/signal.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+
+#include <asm/system.h>
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/leds.h>
+#include <asm/irq.h>
+#include <asm/mach/irq.h>
+#include <asm/mach/time.h>
+
+
+static inline unsigned long pxa_get_rtc_time(void)
+{
+	return RCNR;
+}
+
+static int pxa_set_rtc(void)
+{
+	unsigned long current_time = xtime.tv_sec;
+
+	if (RTSR & RTSR_ALE) {
+		/* make sure not to forward the clock over an alarm */
+		unsigned long alarm = RTAR;
+		if (current_time >= alarm && alarm >= RCNR)
+			return -ERESTARTSYS;
+	}
+	RCNR = current_time;
+	return 0;
+}
+
+/* IRQs are disabled before entering here from do_gettimeofday() */
+static unsigned long pxa_gettimeoffset (void)
+{
+	long ticks_to_match, elapsed, usec;
+
+	/* Get ticks before next timer match */
+	ticks_to_match = OSMR0 - OSCR;
+
+	/* We need elapsed ticks since last match */
+	elapsed = LATCH - ticks_to_match;
+
+	/* don't get fooled by the workaround in pxa_timer_interrupt() */
+	if (elapsed <= 0)
+		return 0;
+
+	/* Now convert them to usec */
+	usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH;
+
+	return usec;
+}
+
+static irqreturn_t
+pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	int next_match;
+
+	/* Loop until we get ahead of the free running timer.
+	 * This ensures an exact clock tick count and time accuracy.
+	 * IRQs are disabled inside the loop to ensure coherence between
+	 * lost_ticks (updated in do_timer()) and the match reg value, so we
+	 * can use do_gettimeofday() from interrupt handlers.
+	 *
+	 * HACK ALERT: it seems that the PXA timer regs aren't updated right
+	 * away in all cases when a write occurs.  We therefore compare with
+	 * 8 instead of 0 in the while() condition below to avoid missing a
+	 * match if OSCR has already reached the next OSMR value.
+	 * Experience has shown that up to 6 ticks are needed to work around
+	 * this problem, but let's use 8 to be conservative.  Note that this
+	 * affect things only when the timer IRQ has been delayed by nearly
+	 * exactly one tick period which should be a pretty rare event.
+	 */
+	do {
+		timer_tick(regs);
+		OSSR = OSSR_M0;  /* Clear match on timer 0 */
+		next_match = (OSMR0 += LATCH);
+	} while( (signed long)(next_match - OSCR) <= 8 );
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction pxa_timer_irq = {
+	.name		= "PXA Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= pxa_timer_interrupt
+};
+
+void __init pxa_init_time(void)
+{
+	struct timespec tv;
+
+	gettimeoffset = pxa_gettimeoffset;
+	set_rtc = pxa_set_rtc;
+
+	tv.tv_nsec = 0;
+	tv.tv_sec = pxa_get_rtc_time();
+	do_settimeofday(&tv);
+
+	OSMR0 = 0;		/* set initial match at 0 */
+	OSSR = 0xf;		/* clear status on all timers */
+	setup_irq(IRQ_OST0, &pxa_timer_irq);
+	OIER |= OIER_E0;	/* enable match on timer 0 to cause interrupts */
+	OSCR = 0;		/* initialize free-running timer, force first match */
+}
+
--- diff/arch/arm/mach-s3c2410/time.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-s3c2410/time.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,176 @@
+/* linux/include/asm-arm/arch-s3c2410/time.h
+ *
+ *  Copyright (C) 2003 Simtec Electronics <linux@simtec.co.uk>
+ *    Ben Dooks, <ben@simtec.co.uk>
+ *
+ * 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/config.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <asm/system.h>
+#include <asm/leds.h>
+#include <asm/mach-types.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/arch/map.h>
+#include <asm/arch/regs-timer.h>
+#include <asm/mach/time.h>
+
+static unsigned long timer_startval;
+static unsigned long timer_ticks_usec;
+
+#ifdef CONFIG_S3C2410_RTC
+extern void s3c2410_rtc_check();
+#endif
+
+/* with an 12MHz clock, we get 12 ticks per-usec
+ */
+
+
+/***
+ * Returns microsecond  since last clock interrupt.  Note that interrupts
+ * will have been disabled by do_gettimeoffset()
+ * IRQs are disabled before entering here from do_gettimeofday()
+ */
+static unsigned long s3c2410_gettimeoffset (void)
+{
+	unsigned long tdone;
+	unsigned long usec;
+
+	/* work out how many ticks have gone since last timer interrupt */
+
+	tdone = timer_startval - __raw_readl(S3C2410_TCNTO(4));
+
+	/* currently, tcnt is in 12MHz units, but this may change
+	 * for non-bast machines...
+	 */
+
+	usec = tdone / timer_ticks_usec;
+
+	return usec;
+}
+
+
+/*
+ * IRQ handler for the timer
+ */
+static irqreturn_t
+s3c2410_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	timer_tick(regs);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction s3c2410_timer_irq = {
+	.name		= "S32410 Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= s3c2410_timer_interrupt
+};
+
+/*
+ * Set up timer interrupt, and return the current time in seconds.
+ *
+ * Currently we only use timer4, as it is the only timer which has no
+ * other function that can be exploited externally
+ */
+void __init s3c2410_init_time (void)
+{
+	unsigned long tcon;
+	unsigned long tcnt;
+	unsigned long tcfg1;
+	unsigned long tcfg0;
+
+	gettimeoffset = s3c2410_gettimeoffset;
+
+	tcnt = 0xffff;  /* default value for tcnt */
+
+	/* read the current timer configuration bits */
+
+	tcon = __raw_readl(S3C2410_TCON);
+	tcfg1 = __raw_readl(S3C2410_TCFG1);
+	tcfg0 = __raw_readl(S3C2410_TCFG0);
+
+	/* configure the system for whichever machine is in use */
+
+	if (machine_is_bast() || machine_is_vr1000()) {
+		timer_ticks_usec = 12;	      /* timer is at 12MHz */
+		tcnt = (timer_ticks_usec * (1000*1000)) / HZ;
+	}
+
+	/* for the h1940, we use the pclk from the core to generate
+	 * the timer values. since 67.5MHz is not a value we can directly
+	 * generate the timer value from, we need to pre-scale and
+	 * divied before using it.
+	 *
+	 * overall divsior to get 200Hz is 337500
+	 *   we can fit tcnt if we pre-scale by 6, producing a tick rate
+	 *   of 11.25MHz, and a tcnt of 56250.
+	 */
+
+	if (machine_is_h1940() || machine_is_smdk2410() ) {
+		timer_ticks_usec = s3c2410_pclk / (1000*1000);
+		timer_ticks_usec /= 6;
+
+		tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK;
+		tcfg1 |= S3C2410_TCFG1_MUX4_DIV2;
+
+		tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK;
+		tcfg0 |= ((6 - 1) / 2) << S3C2410_TCFG_PRESCALER1_SHIFT;
+
+		tcnt = (s3c2410_pclk / 6) / HZ;
+	}
+
+
+	printk("setup_timer tcon=%08lx, tcnt %04lx, tcfg %08lx,%08lx\n",
+	       tcon, tcnt, tcfg0, tcfg1);
+
+	/* check to see if timer is within 16bit range... */
+	if (tcnt > 0xffff) {
+		panic("setup_timer: HZ is too small, cannot configure timer!");
+		return;
+	}
+
+	__raw_writel(tcfg1, S3C2410_TCFG1);
+	__raw_writel(tcfg0, S3C2410_TCFG0);
+
+	timer_startval = tcnt;
+	__raw_writel(tcnt, S3C2410_TCNTB(4));
+
+	/* ensure timer is stopped... */
+
+	tcon &= ~(7<<20);
+	tcon |= S3C2410_TCON_T4RELOAD;
+	tcon |= S3C2410_TCON_T4MANUALUPD;
+
+	__raw_writel(tcon, S3C2410_TCON);
+	__raw_writel(tcnt, S3C2410_TCNTB(4));
+	__raw_writel(tcnt, S3C2410_TCMPB(4));
+
+	setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
+
+	/* start the timer running */
+	tcon |= S3C2410_TCON_T4START;
+	tcon &= ~S3C2410_TCON_T4MANUALUPD;
+	__raw_writel(tcon, S3C2410_TCON);
+}
+
+
+
--- diff/arch/arm/mach-sa1100/time.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-sa1100/time.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,119 @@
+/*
+ * linux/arch/arm/mach-sa1100/time.c
+ *
+ * Copyright (C) 1998 Deborah Wallach.
+ * Twiddles  (C) 1999 	Hugo Fiennes <hugo@empeg.com>
+ * 
+ * 2000/03/29 (C) Nicolas Pitre <nico@cam.org>
+ *	Rewritten: big cleanup, much simpler, better HZ accuracy.
+ *
+ */
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/timex.h>
+#include <linux/signal.h>
+
+#include <asm/mach/time.h>
+#include <asm/hardware.h>
+
+#define RTC_DEF_DIVIDER		(32768 - 1)
+#define RTC_DEF_TRIM            0
+
+static unsigned long __init sa1100_get_rtc_time(void)
+{
+	/*
+	 * According to the manual we should be able to let RTTR be zero
+	 * and then a default diviser for a 32.768KHz clock is used.
+	 * Apparently this doesn't work, at least for my SA1110 rev 5.
+	 * If the clock divider is uninitialized then reset it to the
+	 * default value to get the 1Hz clock.
+	 */
+	if (RTTR == 0) {
+		RTTR = RTC_DEF_DIVIDER + (RTC_DEF_TRIM << 16);
+		printk(KERN_WARNING "Warning: uninitialized Real Time Clock\n");
+		/* The current RTC value probably doesn't make sense either */
+		RCNR = 0;
+		return 0;
+	}
+	return RCNR;
+}
+
+static int sa1100_set_rtc(void)
+{
+	unsigned long current_time = xtime.tv_sec;
+
+	if (RTSR & RTSR_ALE) {
+		/* make sure not to forward the clock over an alarm */
+		unsigned long alarm = RTAR;
+		if (current_time >= alarm && alarm >= RCNR)
+			return -ERESTARTSYS;
+	}
+	RCNR = current_time;
+	return 0;
+}
+
+/* IRQs are disabled before entering here from do_gettimeofday() */
+static unsigned long sa1100_gettimeoffset (void)
+{
+	unsigned long ticks_to_match, elapsed, usec;
+
+	/* Get ticks before next timer match */
+	ticks_to_match = OSMR0 - OSCR;
+
+	/* We need elapsed ticks since last match */
+	elapsed = LATCH - ticks_to_match;
+
+	/* Now convert them to usec */
+	usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH;
+
+	return usec;
+}
+
+/*
+ * We will be entered with IRQs enabled.
+ *
+ * Loop until we get ahead of the free running timer.
+ * This ensures an exact clock tick count and time accuracy.
+ * IRQs are disabled inside the loop to ensure coherence between
+ * lost_ticks (updated in do_timer()) and the match reg value, so we
+ * can use do_gettimeofday() from interrupt handlers.
+ */
+static irqreturn_t
+sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	unsigned int next_match;
+
+	do {
+		timer_tick(regs);
+		OSSR = OSSR_M0;  /* Clear match on timer 0 */
+		next_match = (OSMR0 += LATCH);
+	} while ((signed long)(next_match - OSCR) <= 0);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction sa1100_timer_irq = {
+	.name		= "SA11xx Timer Tick",
+	.flags		= SA_INTERRUPT,
+	.handler	= sa1100_timer_interrupt
+};
+
+void __init sa1100_init_time(void)
+{
+	struct timespec tv;
+
+	gettimeoffset = sa1100_gettimeoffset;
+	set_rtc = sa1100_set_rtc;
+
+	tv.tv_nsec = 0;
+	tv.tv_sec = sa1100_get_rtc_time();
+	do_settimeofday(&tv);
+
+	OSMR0 = 0;		/* set initial match at 0 */
+	OSSR = 0xf;		/* clear status on all timers */
+	setup_irq(IRQ_OST0, &sa1100_timer_irq);
+	OIER |= OIER_E0;	/* enable match on timer 0 to cause interrupts */
+	OSCR = 0;		/* initialize free-running timer, force first match */
+}
+
--- diff/arch/arm/mach-versatile/clock.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-versatile/clock.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,146 @@
+/*
+ *  linux/arch/arm/mach-versatile/clock.c
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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/module.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/errno.h>
+#include <linux/err.h>
+
+#include <asm/semaphore.h>
+#include <asm/hardware/clock.h>
+#include <asm/hardware/icst525.h>
+
+#include "clock.h"
+
+static LIST_HEAD(clocks);
+static DECLARE_MUTEX(clocks_sem);
+
+struct clk *clk_get(struct device *dev, const char *id)
+{
+	struct clk *p, *clk = ERR_PTR(-ENOENT);
+
+	down(&clocks_sem);
+	list_for_each_entry(p, &clocks, node) {
+		if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
+			clk = p;
+			break;
+		}
+	}
+	up(&clocks_sem);
+
+	return clk;
+}
+EXPORT_SYMBOL(clk_get);
+
+void clk_put(struct clk *clk)
+{
+	module_put(clk->owner);
+}
+EXPORT_SYMBOL(clk_put);
+
+int clk_enable(struct clk *clk)
+{
+	return 0;
+}
+EXPORT_SYMBOL(clk_enable);
+
+void clk_disable(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_disable);
+
+int clk_use(struct clk *clk)
+{
+	return 0;
+}
+EXPORT_SYMBOL(clk_use);
+
+void clk_unuse(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_unuse);
+
+unsigned long clk_get_rate(struct clk *clk)
+{
+	return clk->rate;
+}
+EXPORT_SYMBOL(clk_get_rate);
+
+long clk_round_rate(struct clk *clk, unsigned long rate)
+{
+	return rate;
+}
+EXPORT_SYMBOL(clk_round_rate);
+
+int clk_set_rate(struct clk *clk, unsigned long rate)
+{
+	int ret = -EIO;
+#if 0 // Not yet
+	if (clk->setvco) {
+		struct icst525_vco vco;
+
+		vco = icst525_khz_to_vco(clk->params, rate);
+		clk->rate = icst525_khz(clk->params, vco);
+
+		printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n",
+			clk->name, vco.s, vco.r, vco.v);
+
+		clk->setvco(clk, vco);
+		ret = 0;
+	}
+#endif
+	return 0;
+}
+EXPORT_SYMBOL(clk_set_rate);
+
+/*
+ * These are fixed clocks.
+ */
+static struct clk kmi_clk = {
+	.name	= "KMIREFCLK",
+	.rate	= 24000000,
+};
+
+static struct clk uart_clk = {
+	.name	= "UARTCLK",
+	.rate	= 24000000,
+};
+
+static struct clk mmci_clk = {
+	.name	= "MCLK",
+	.rate	= 33000000,
+};
+
+int clk_register(struct clk *clk)
+{
+	down(&clocks_sem);
+	list_add(&clk->node, &clocks);
+	up(&clocks_sem);
+	return 0;
+}
+EXPORT_SYMBOL(clk_register);
+
+void clk_unregister(struct clk *clk)
+{
+	down(&clocks_sem);
+	list_del(&clk->node);
+	up(&clocks_sem);
+}
+EXPORT_SYMBOL(clk_unregister);
+
+static int __init clk_init(void)
+{
+	clk_register(&kmi_clk);
+	clk_register(&uart_clk);
+	clk_register(&mmci_clk);
+	return 0;
+}
+arch_initcall(clk_init);
--- diff/arch/arm/mach-versatile/clock.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/mach-versatile/clock.h	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,25 @@
+/*
+ *  linux/arch/arm/mach-versatile/clock.h
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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.
+ */
+struct module;
+struct icst525_params;
+
+struct clk {
+	struct list_head	node;
+	unsigned long		rate;
+	struct module		*owner;
+	const char		*name;
+	const struct icst525_params *params;
+	void			*data;
+	void			(*setvco)(struct clk *, struct icst525_vco vco);
+};
+
+int clk_register(struct clk *clk);
+void clk_unregister(struct clk *clk);
--- diff/arch/arm/vfp/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/vfp/Makefile	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,12 @@
+#
+# linux/arch/arm/vfp/Makefile
+#
+# Copyright (C) 2001 ARM Limited
+#
+
+# EXTRA_CFLAGS := -DDEBUG
+# EXTRA_AFLAGS := -DDEBUG
+
+obj-y			+= vfp.o
+
+vfp-$(CONFIG_VFP)	+= entry.o vfpmodule.o vfphw.o vfpsingle.o vfpdouble.o
--- diff/arch/arm/vfp/entry.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/vfp/entry.S	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,45 @@
+/*
+ *  linux/arch/arm/vfp/entry.S
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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.
+ *
+ * Basic entry code, called from the kernel's undefined instruction trap.
+ *  r0  = faulted instruction
+ *  r5  = faulted PC+4
+ *  r9  = successful return
+ *  r10 = thread_info structure
+ *  lr  = failure return
+ */
+#include <linux/linkage.h>
+#include <linux/init.h>
+#include <asm/thread_info.h>
+#include <asm/vfpmacros.h>
+
+	.globl	do_vfp
+do_vfp:
+ 	ldr	r4, .LCvfp
+	add	r10, r10, #TI_VFPSTATE	@ r10 = workspace
+	ldr	pc, [r4]		@ call VFP entry point
+
+.LCvfp:
+	.word	vfp_vector
+
+@ This code is called if the VFP does not exist. It needs to flag the
+@ failure to the VFP initialisation code.
+
+	__INIT
+	.globl	vfp_testing_entry
+vfp_testing_entry:
+	ldr	r0, VFP_arch_address
+	str	r5, [r0]		@ known non-zero value
+	mov	pc, r9			@ we have handled the fault
+
+VFP_arch_address:
+	.word	VFP_arch
+
+	__FINIT
--- diff/arch/arm/vfp/vfp.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/vfp/vfp.h	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,333 @@
+/*
+ *  linux/arch/arm/vfp/vfp.h
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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.
+ */
+
+static inline u32 vfp_shiftright32jamming(u32 val, unsigned int shift)
+{
+	if (shift) {
+		if (shift < 32)
+			val = val >> shift | ((val << (32 - shift)) != 0);
+		else
+			val = val != 0;
+	}
+	return val;
+}
+
+static inline u64 vfp_shiftright64jamming(u64 val, unsigned int shift)
+{
+	if (shift) {
+		if (shift < 64)
+			val = val >> shift | ((val << (64 - shift)) != 0);
+		else
+			val = val != 0;
+	}
+	return val;
+}
+
+static inline u32 vfp_hi64to32jamming(u64 val)
+{
+	u32 v;
+
+	asm(
+	"cmp	%Q1, #1		@ vfp_hi64to32jamming\n\t"
+	"movcc	%0, %R1\n\t"
+	"orrcs	%0, %R1, #1"
+	: "=r" (v) : "r" (val) : "cc");
+
+	return v;
+}
+
+static inline void add128(u64 *resh, u64 *resl, u64 nh, u64 nl, u64 mh, u64 ml)
+{
+	asm(	"adds	%Q0, %Q2, %Q4\n\t"
+		"adcs	%R0, %R2, %R4\n\t"
+		"adcs	%Q1, %Q3, %Q5\n\t"
+		"adc	%R1, %R3, %R5"
+	    : "=r" (nl), "=r" (nh)
+	    : "0" (nl), "1" (nh), "r" (ml), "r" (mh)
+	    : "cc");
+	*resh = nh;
+	*resl = nl;
+}
+
+static inline void sub128(u64 *resh, u64 *resl, u64 nh, u64 nl, u64 mh, u64 ml)
+{
+	asm(	"subs	%Q0, %Q2, %Q4\n\t"
+		"sbcs	%R0, %R2, %R4\n\t"
+		"sbcs	%Q1, %Q3, %Q5\n\t"
+		"sbc	%R1, %R3, %R5\n\t"
+	    : "=r" (nl), "=r" (nh)
+	    : "0" (nl), "1" (nh), "r" (ml), "r" (mh)
+	    : "cc");
+	*resh = nh;
+	*resl = nl;
+}
+
+static inline void mul64to128(u64 *resh, u64 *resl, u64 n, u64 m)
+{
+	u32 nh, nl, mh, ml;
+	u64 rh, rma, rmb, rl;
+
+	nl = n;
+	ml = m;
+	rl = (u64)nl * ml;
+
+	nh = n >> 32;
+	rma = (u64)nh * ml;
+
+	mh = m >> 32;
+	rmb = (u64)nl * mh;
+	rma += rmb;
+
+	rh = (u64)nh * mh;
+	rh += ((u64)(rma < rmb) << 32) + (rma >> 32);
+
+	rma <<= 32;
+	rl += rma;
+	rh += (rl < rma);
+
+	*resl = rl;
+	*resh = rh;
+}
+
+static inline void shift64left(u64 *resh, u64 *resl, u64 n)
+{
+	*resh = n >> 63;
+	*resl = n << 1;
+}
+
+static inline u64 vfp_hi64multiply64(u64 n, u64 m)
+{
+	u64 rh, rl;
+	mul64to128(&rh, &rl, n, m);
+	return rh | (rl != 0);
+}
+
+static inline u64 vfp_estimate_div128to64(u64 nh, u64 nl, u64 m)
+{
+	u64 mh, ml, remh, reml, termh, terml, z;
+
+	if (nh >= m)
+		return ~0ULL;
+	mh = m >> 32;
+	z = (mh << 32 <= nh) ? 0xffffffff00000000ULL : (nh / mh) << 32;
+	mul64to128(&termh, &terml, m, z);
+	sub128(&remh, &reml, nh, nl, termh, terml);
+	ml = m << 32;
+	while ((s64)remh < 0) {
+		z -= 0x100000000ULL;
+		add128(&remh, &reml, remh, reml, mh, ml);
+	}
+	remh = (remh << 32) | (reml >> 32);
+	z |= (mh << 32 <= remh) ? 0xffffffff : remh / mh;
+	return z;
+}
+
+/*
+ * Operations on unpacked elements
+ */
+#define vfp_sign_negate(sign)	(sign ^ 0x8000)
+
+/*
+ * Single-precision
+ */
+struct vfp_single {
+	s16	exponent;
+	u16	sign;
+	u32	significand;
+};
+
+extern s32 vfp_get_float(unsigned int reg);
+extern void vfp_put_float(unsigned int reg, s32 val);
+
+/*
+ * VFP_SINGLE_MANTISSA_BITS - number of bits in the mantissa
+ * VFP_SINGLE_EXPONENT_BITS - number of bits in the exponent
+ * VFP_SINGLE_LOW_BITS - number of low bits in the unpacked significand
+ *  which are not propagated to the float upon packing.
+ */
+#define VFP_SINGLE_MANTISSA_BITS	(23)
+#define VFP_SINGLE_EXPONENT_BITS	(8)
+#define VFP_SINGLE_LOW_BITS		(32 - VFP_SINGLE_MANTISSA_BITS - 2)
+#define VFP_SINGLE_LOW_BITS_MASK	((1 << VFP_SINGLE_LOW_BITS) - 1)
+
+/*
+ * The bit in an unpacked float which indicates that it is a quiet NaN
+ */
+#define VFP_SINGLE_SIGNIFICAND_QNAN	(1 << (VFP_SINGLE_MANTISSA_BITS - 1 + VFP_SINGLE_LOW_BITS))
+
+/*
+ * Operations on packed single-precision numbers
+ */
+#define vfp_single_packed_sign(v)	((v) & 0x80000000)
+#define vfp_single_packed_negate(v)	((v) ^ 0x80000000)
+#define vfp_single_packed_abs(v)	((v) & ~0x80000000)
+#define vfp_single_packed_exponent(v)	(((v) >> VFP_SINGLE_MANTISSA_BITS) & ((1 << VFP_SINGLE_EXPONENT_BITS) - 1))
+#define vfp_single_packed_mantissa(v)	((v) & ((1 << VFP_SINGLE_MANTISSA_BITS) - 1))
+
+/*
+ * Unpack a single-precision float.  Note that this returns the magnitude
+ * of the single-precision float mantissa with the 1. if necessary,
+ * aligned to bit 30.
+ */
+static inline void vfp_single_unpack(struct vfp_single *s, s32 val)
+{
+	u32 significand;
+
+	s->sign = vfp_single_packed_sign(val) >> 16,
+	s->exponent = vfp_single_packed_exponent(val);
+
+	significand = (u32) val;
+	significand = (significand << (32 - VFP_SINGLE_MANTISSA_BITS)) >> 2;
+	if (s->exponent && s->exponent != 255)
+		significand |= 0x40000000;
+	s->significand = significand;
+}
+
+/*
+ * Re-pack a single-precision float.  This assumes that the float is
+ * already normalised such that the MSB is bit 30, _not_ bit 31.
+ */
+static inline s32 vfp_single_pack(struct vfp_single *s)
+{
+	u32 val;
+	val = (s->sign << 16) +
+	      (s->exponent << VFP_SINGLE_MANTISSA_BITS) +
+	      (s->significand >> VFP_SINGLE_LOW_BITS);
+	return (s32)val;
+}
+
+#define VFP_NUMBER		(1<<0)
+#define VFP_ZERO		(1<<1)
+#define VFP_DENORMAL		(1<<2)
+#define VFP_INFINITY		(1<<3)
+#define VFP_NAN			(1<<4)
+#define VFP_NAN_SIGNAL		(1<<5)
+
+#define VFP_QNAN		(VFP_NAN)
+#define VFP_SNAN		(VFP_NAN|VFP_NAN_SIGNAL)
+
+static inline int vfp_single_type(struct vfp_single *s)
+{
+	int type = VFP_NUMBER;
+	if (s->exponent == 255) {
+		if (s->significand == 0)
+			type = VFP_INFINITY;
+		else if (s->significand & VFP_SINGLE_SIGNIFICAND_QNAN)
+			type = VFP_QNAN;
+		else
+			type = VFP_SNAN;
+	} else if (s->exponent == 0) {
+		if (s->significand == 0)
+			type |= VFP_ZERO;
+		else
+			type |= VFP_DENORMAL;
+	}
+	return type;
+}
+
+#ifndef DEBUG
+#define vfp_single_normaliseround(sd,vsd,fpscr,except,func) __vfp_single_normaliseround(sd,vsd,fpscr,except)
+u32 __vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions);
+#else
+u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions, const char *func);
+#endif
+
+/*
+ * Double-precision
+ */
+struct vfp_double {
+	s16	exponent;
+	u16	sign;
+	u64	significand;
+};
+
+extern u64 vfp_get_double(unsigned int reg);
+extern void vfp_put_double(unsigned int reg, u64 val);
+
+#define VFP_DOUBLE_MANTISSA_BITS	(52)
+#define VFP_DOUBLE_EXPONENT_BITS	(11)
+#define VFP_DOUBLE_LOW_BITS		(64 - VFP_DOUBLE_MANTISSA_BITS - 2)
+#define VFP_DOUBLE_LOW_BITS_MASK	((1 << VFP_DOUBLE_LOW_BITS) - 1)
+
+/*
+ * The bit in an unpacked double which indicates that it is a quiet NaN
+ */
+#define VFP_DOUBLE_SIGNIFICAND_QNAN	(1ULL << (VFP_DOUBLE_MANTISSA_BITS - 1 + VFP_DOUBLE_LOW_BITS))
+
+/*
+ * Operations on packed single-precision numbers
+ */
+#define vfp_double_packed_sign(v)	((v) & (1ULL << 63))
+#define vfp_double_packed_negate(v)	((v) ^ (1ULL << 63))
+#define vfp_double_packed_abs(v)	((v) & ~(1ULL << 63))
+#define vfp_double_packed_exponent(v)	(((v) >> VFP_DOUBLE_MANTISSA_BITS) & ((1 << VFP_DOUBLE_EXPONENT_BITS) - 1))
+#define vfp_double_packed_mantissa(v)	((v) & ((1ULL << VFP_DOUBLE_MANTISSA_BITS) - 1))
+
+/*
+ * Unpack a double-precision float.  Note that this returns the magnitude
+ * of the double-precision float mantissa with the 1. if necessary,
+ * aligned to bit 62.
+ */
+static inline void vfp_double_unpack(struct vfp_double *s, s64 val)
+{
+	u64 significand;
+
+	s->sign = vfp_double_packed_sign(val) >> 48;
+	s->exponent = vfp_double_packed_exponent(val);
+
+	significand = (u64) val;
+	significand = (significand << (64 - VFP_DOUBLE_MANTISSA_BITS)) >> 2;
+	if (s->exponent && s->exponent != 2047)
+		significand |= (1ULL << 62);
+	s->significand = significand;
+}
+
+/*
+ * Re-pack a double-precision float.  This assumes that the float is
+ * already normalised such that the MSB is bit 30, _not_ bit 31.
+ */
+static inline s64 vfp_double_pack(struct vfp_double *s)
+{
+	u64 val;
+	val = ((u64)s->sign << 48) +
+	      ((u64)s->exponent << VFP_DOUBLE_MANTISSA_BITS) +
+	      (s->significand >> VFP_DOUBLE_LOW_BITS);
+	return (s64)val;
+}
+
+static inline int vfp_double_type(struct vfp_double *s)
+{
+	int type = VFP_NUMBER;
+	if (s->exponent == 2047) {
+		if (s->significand == 0)
+			type = VFP_INFINITY;
+		else if (s->significand & VFP_DOUBLE_SIGNIFICAND_QNAN)
+			type = VFP_QNAN;
+		else
+			type = VFP_SNAN;
+	} else if (s->exponent == 0) {
+		if (s->significand == 0)
+			type |= VFP_ZERO;
+		else
+			type |= VFP_DENORMAL;
+	}
+	return type;
+}
+
+u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exceptions, const char *func);
+
+/*
+ * System registers
+ */
+extern u32 vfp_get_sys(unsigned int reg);
+extern void vfp_put_sys(unsigned int reg, u32 val);
+
+u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand);
--- diff/arch/arm/vfp/vfpdouble.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/vfp/vfpdouble.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,1186 @@
+/*
+ *  linux/arch/arm/vfp/vfpdouble.c
+ *
+ * This code is derived in part from John R. Housers softfloat library, which
+ * carries the following notice:
+ *
+ * ===========================================================================
+ * This C source file is part of the SoftFloat IEC/IEEE Floating-point
+ * Arithmetic Package, Release 2.
+ *
+ * Written by John R. Hauser.  This work was made possible in part by the
+ * International Computer Science Institute, located at Suite 600, 1947 Center
+ * Street, Berkeley, California 94704.  Funding was partially provided by the
+ * National Science Foundation under grant MIP-9311980.  The original version
+ * of this code was written as part of a project to build a fixed-point vector
+ * processor in collaboration with the University of California at Berkeley,
+ * overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
+ * is available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+ * arithmetic/softfloat.html'.
+ *
+ * THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
+ * has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
+ * TIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO
+ * PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
+ * AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
+ *
+ * Derivative works are acceptable, even for commercial purposes, so long as
+ * (1) they include prominent notice that the work is derivative, and (2) they
+ * include prominent notice akin to these three paragraphs for those parts of
+ * this code that are retained.
+ * ===========================================================================
+ */
+#include <linux/kernel.h>
+#include <asm/bitops.h>
+#include <asm/ptrace.h>
+#include <asm/vfp.h>
+
+#include "vfpinstr.h"
+#include "vfp.h"
+
+static struct vfp_double vfp_double_default_qnan = {
+	.exponent	= 2047,
+	.sign		= 0,
+	.significand	= VFP_DOUBLE_SIGNIFICAND_QNAN,
+};
+
+static void vfp_double_dump(const char *str, struct vfp_double *d)
+{
+	pr_debug("VFP: %s: sign=%d exponent=%d significand=%016llx\n",
+		 str, d->sign != 0, d->exponent, d->significand);
+}
+
+static void vfp_double_normalise_denormal(struct vfp_double *vd)
+{
+	int bits = 31 - fls(vd->significand >> 32);
+	if (bits == 31)
+		bits = 62 - fls(vd->significand);
+
+	vfp_double_dump("normalise_denormal: in", vd);
+
+	if (bits) {
+		vd->exponent -= bits - 1;
+		vd->significand <<= bits;
+	}
+
+	vfp_double_dump("normalise_denormal: out", vd);
+}
+
+u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exceptions, const char *func)
+{
+	u64 significand, incr;
+	int exponent, shift, underflow;
+	u32 rmode;
+
+	vfp_double_dump("pack: in", vd);
+
+	/*
+	 * Infinities and NaNs are a special case.
+	 */
+	if (vd->exponent == 2047 && (vd->significand == 0 || exceptions))
+		goto pack;
+
+	/*
+	 * Special-case zero.
+	 */
+	if (vd->significand == 0) {
+		vd->exponent = 0;
+		goto pack;
+	}
+
+	exponent = vd->exponent;
+	significand = vd->significand;
+
+	shift = 32 - fls(significand >> 32);
+	if (shift == 32)
+		shift = 64 - fls(significand);
+	if (shift) {
+		exponent -= shift;
+		significand <<= shift;
+	}
+
+#ifdef DEBUG
+	vd->exponent = exponent;
+	vd->significand = significand;
+	vfp_double_dump("pack: normalised", vd);
+#endif
+
+	/*
+	 * Tiny number?
+	 */
+	underflow = exponent < 0;
+	if (underflow) {
+		significand = vfp_shiftright64jamming(significand, -exponent);
+		exponent = 0;
+#ifdef DEBUG
+		vd->exponent = exponent;
+		vd->significand = significand;
+		vfp_double_dump("pack: tiny number", vd);
+#endif
+		if (!(significand & ((1ULL << (VFP_DOUBLE_LOW_BITS + 1)) - 1)))
+			underflow = 0;
+	}
+
+	/*
+	 * Select rounding increment.
+	 */
+	incr = 0;
+	rmode = fpscr & FPSCR_RMODE_MASK;
+
+	if (rmode == FPSCR_ROUND_NEAREST) {
+		incr = 1ULL << VFP_DOUBLE_LOW_BITS;
+		if ((significand & (1ULL << (VFP_DOUBLE_LOW_BITS + 1))) == 0)
+			incr -= 1;
+	} else if (rmode == FPSCR_ROUND_TOZERO) {
+		incr = 0;
+	} else if ((rmode == FPSCR_ROUND_PLUSINF) ^ (vd->sign != 0))
+		incr = (1ULL << (VFP_DOUBLE_LOW_BITS + 1)) - 1;
+
+	pr_debug("VFP: rounding increment = 0x%08llx\n", incr);
+
+	/*
+	 * Is our rounding going to overflow?
+	 */
+	if ((significand + incr) < significand) {
+		exponent += 1;
+		significand = (significand >> 1) | (significand & 1);
+		incr >>= 1;
+#ifdef DEBUG
+		vd->exponent = exponent;
+		vd->significand = significand;
+		vfp_double_dump("pack: overflow", vd);
+#endif
+	}
+
+	/*
+	 * If any of the low bits (which will be shifted out of the
+	 * number) are non-zero, the result is inexact.
+	 */
+	if (significand & ((1 << (VFP_DOUBLE_LOW_BITS + 1)) - 1))
+		exceptions |= FPSCR_IXC;
+
+	/*
+	 * Do our rounding.
+	 */
+	significand += incr;
+
+	/*
+	 * Infinity?
+	 */
+	if (exponent >= 2046) {
+		exceptions |= FPSCR_OFC | FPSCR_IXC;
+		if (incr == 0) {
+			vd->exponent = 2045;
+			vd->significand = 0x7fffffffffffffffULL;
+		} else {
+			vd->exponent = 2047;		/* infinity */
+			vd->significand = 0;
+		}
+	} else {
+		if (significand >> (VFP_DOUBLE_LOW_BITS + 1) == 0)
+			exponent = 0;
+		if (exponent || significand > 0x8000000000000000ULL)
+			underflow = 0;
+		if (underflow)
+			exceptions |= FPSCR_UFC;
+		vd->exponent = exponent;
+		vd->significand = significand >> 1;
+	}
+
+ pack:
+	vfp_double_dump("pack: final", vd);
+	{
+		s64 d = vfp_double_pack(vd);
+		pr_debug("VFP: %s: d(d%d)=%016llx exceptions=%08x\n", func,
+			 dd, d, exceptions);
+		vfp_put_double(dd, d);
+	}
+	return exceptions;
+}
+
+/*
+ * Propagate the NaN, setting exceptions if it is signalling.
+ * 'n' is always a NaN.  'm' may be a number, NaN or infinity.
+ */
+static u32
+vfp_propagate_nan(struct vfp_double *vdd, struct vfp_double *vdn,
+		  struct vfp_double *vdm, u32 fpscr)
+{
+	struct vfp_double *nan;
+	int tn, tm = 0;
+
+	tn = vfp_double_type(vdn);
+
+	if (vdm)
+		tm = vfp_double_type(vdm);
+
+	if (fpscr & FPSCR_DEFAULT_NAN)
+		/*
+		 * Default NaN mode - always returns a quiet NaN
+		 */
+		nan = &vfp_double_default_qnan;
+	else {
+		/*
+		 * Contemporary mode - select the first signalling
+		 * NAN, or if neither are signalling, the first
+		 * quiet NAN.
+		 */
+		if (tn == VFP_SNAN || (tm != VFP_SNAN && tn == VFP_QNAN))
+			nan = vdn;
+		else
+			nan = vdm;
+		/*
+		 * Make the NaN quiet.
+		 */
+		nan->significand |= VFP_DOUBLE_SIGNIFICAND_QNAN;
+	}
+
+	*vdd = *nan;
+
+	/*
+	 * If one was a signalling NAN, raise invalid operation.
+	 */
+	return tn == VFP_SNAN || tm == VFP_SNAN ? FPSCR_IOC : 0x100;
+}
+
+/*
+ * Extended operations
+ */
+static u32 vfp_double_fabs(int dd, int unused, int dm, u32 fpscr)
+{
+	vfp_put_double(dd, vfp_double_packed_abs(vfp_get_double(dm)));
+	return 0;
+}
+
+static u32 vfp_double_fcpy(int dd, int unused, int dm, u32 fpscr)
+{
+	vfp_put_double(dd, vfp_get_double(dm));
+	return 0;
+}
+
+static u32 vfp_double_fneg(int dd, int unused, int dm, u32 fpscr)
+{
+	vfp_put_double(dd, vfp_double_packed_negate(vfp_get_double(dm)));
+	return 0;
+}
+
+static u32 vfp_double_fsqrt(int dd, int unused, int dm, u32 fpscr)
+{
+	struct vfp_double vdm, vdd;
+	int ret, tm;
+
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+	tm = vfp_double_type(&vdm);
+	if (tm & (VFP_NAN|VFP_INFINITY)) {
+		struct vfp_double *vdp = &vdd;
+
+		if (tm & VFP_NAN)
+			ret = vfp_propagate_nan(vdp, &vdm, NULL, fpscr);
+		else if (vdm.sign == 0) {
+ sqrt_copy:
+			vdp = &vdm;
+			ret = 0;
+		} else {
+ sqrt_invalid:
+			vdp = &vfp_double_default_qnan;
+			ret = FPSCR_IOC;
+		}
+		vfp_put_double(dd, vfp_double_pack(vdp));
+		return ret;
+	}
+
+	/*
+	 * sqrt(+/- 0) == +/- 0
+	 */
+	if (tm & VFP_ZERO)
+		goto sqrt_copy;
+
+	/*
+	 * Normalise a denormalised number
+	 */
+	if (tm & VFP_DENORMAL)
+		vfp_double_normalise_denormal(&vdm);
+
+	/*
+	 * sqrt(<0) = invalid
+	 */
+	if (vdm.sign)
+		goto sqrt_invalid;
+
+	vfp_double_dump("sqrt", &vdm);
+
+	/*
+	 * Estimate the square root.
+	 */
+	vdd.sign = 0;
+	vdd.exponent = ((vdm.exponent - 1023) >> 1) + 1023;
+	vdd.significand = (u64)vfp_estimate_sqrt_significand(vdm.exponent, vdm.significand >> 32) << 31;
+
+	vfp_double_dump("sqrt estimate1", &vdd);
+
+	vdm.significand >>= 1 + (vdm.exponent & 1);
+	vdd.significand += 2 + vfp_estimate_div128to64(vdm.significand, 0, vdd.significand);
+
+	vfp_double_dump("sqrt estimate2", &vdd);
+
+	/*
+	 * And now adjust.
+	 */
+	if ((vdd.significand & VFP_DOUBLE_LOW_BITS_MASK) <= 5) {
+		if (vdd.significand < 2) {
+			vdd.significand = ~0ULL;
+		} else {
+			u64 termh, terml, remh, reml;
+			vdm.significand <<= 2;
+			mul64to128(&termh, &terml, vdd.significand, vdd.significand);
+			sub128(&remh, &reml, vdm.significand, 0, termh, terml);
+			while ((s64)remh < 0) {
+				vdd.significand -= 1;
+				shift64left(&termh, &terml, vdd.significand);
+				terml |= 1;
+				add128(&remh, &reml, remh, reml, termh, terml);
+			}
+			vdd.significand |= (remh | reml) != 0;
+		}
+	}
+	vdd.significand = vfp_shiftright64jamming(vdd.significand, 1);
+
+	return vfp_double_normaliseround(dd, &vdd, fpscr, 0, "fsqrt");
+}
+
+/*
+ * Equal	:= ZC
+ * Less than	:= N
+ * Greater than	:= C
+ * Unordered	:= CV
+ */
+static u32 vfp_compare(int dd, int signal_on_qnan, int dm, u32 fpscr)
+{
+	s64 d, m;
+	u32 ret = 0;
+
+	m = vfp_get_double(dm);
+	if (vfp_double_packed_exponent(m) == 2047 && vfp_double_packed_mantissa(m)) {
+		ret |= FPSCR_C | FPSCR_V;
+		if (signal_on_qnan || !(vfp_double_packed_mantissa(m) & (1ULL << (VFP_DOUBLE_MANTISSA_BITS - 1))))
+			/*
+			 * Signalling NaN, or signalling on quiet NaN
+			 */
+			ret |= FPSCR_IOC;
+	}
+
+	d = vfp_get_double(dd);
+	if (vfp_double_packed_exponent(d) == 2047 && vfp_double_packed_mantissa(d)) {
+		ret |= FPSCR_C | FPSCR_V;
+		if (signal_on_qnan || !(vfp_double_packed_mantissa(d) & (1ULL << (VFP_DOUBLE_MANTISSA_BITS - 1))))
+			/*
+			 * Signalling NaN, or signalling on quiet NaN
+			 */
+			ret |= FPSCR_IOC;
+	}
+
+	if (ret == 0) {
+		if (d == m || vfp_double_packed_abs(d | m) == 0) {
+			/*
+			 * equal
+			 */
+			ret |= FPSCR_Z | FPSCR_C;
+		} else if (vfp_double_packed_sign(d ^ m)) {
+			/*
+			 * different signs
+			 */
+			if (vfp_double_packed_sign(d))
+				/*
+				 * d is negative, so d < m
+				 */
+				ret |= FPSCR_N;
+			else
+				/*
+				 * d is positive, so d > m
+				 */
+				ret |= FPSCR_C;
+		} else if ((vfp_double_packed_sign(d) != 0) ^ (d < m)) {
+			/*
+			 * d < m
+			 */
+			ret |= FPSCR_N;
+		} else if ((vfp_double_packed_sign(d) != 0) ^ (d > m)) {
+			/*
+			 * d > m
+			 */
+			ret |= FPSCR_C;
+		}
+	}
+
+	return ret;
+}
+
+static u32 vfp_double_fcmp(int dd, int unused, int dm, u32 fpscr)
+{
+	return vfp_compare(dd, 0, dm, fpscr);
+}
+
+static u32 vfp_double_fcmpe(int dd, int unused, int dm, u32 fpscr)
+{
+	return vfp_compare(dd, 1, dm, fpscr);
+}
+
+static u32 vfp_double_fcmpz(int dd, int unused, int dm, u32 fpscr)
+{
+	return vfp_compare(dd, 0, -1, fpscr);
+}
+
+static u32 vfp_double_fcmpez(int dd, int unused, int dm, u32 fpscr)
+{
+	return vfp_compare(dd, 1, -1, fpscr);
+}
+
+static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr)
+{
+	struct vfp_double vdm;
+	struct vfp_single vsd;
+	int tm;
+	u32 exceptions = 0;
+
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+
+	tm = vfp_double_type(&vdm);
+
+	/*
+	 * If we have a signalling NaN, signal invalid operation.
+	 */
+	if (tm == VFP_SNAN)
+		exceptions = FPSCR_IOC;
+
+	if (tm & VFP_DENORMAL)
+		vfp_double_normalise_denormal(&vdm);
+
+	vsd.sign = vdm.sign;
+	vsd.significand = vfp_hi64to32jamming(vdm.significand);
+
+	/*
+	 * If we have an infinity or a NaN, the exponent must be 255
+	 */
+	if (tm & (VFP_INFINITY|VFP_NAN)) {
+		vsd.exponent = 255;
+		if (tm & VFP_NAN)
+			vsd.significand |= VFP_SINGLE_SIGNIFICAND_QNAN;
+		goto pack_nan;
+	} else if (tm & VFP_ZERO)
+		vsd.exponent = 0;
+	else
+		vsd.exponent = vdm.exponent - (1023 - 127);
+
+	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fcvts");
+
+ pack_nan:
+	vfp_put_float(sd, vfp_single_pack(&vsd));
+	return exceptions;
+}
+
+static u32 vfp_double_fuito(int dd, int unused, int dm, u32 fpscr)
+{
+	struct vfp_double vdm;
+	u32 m = vfp_get_float(dm);
+
+	vdm.sign = 0;
+	vdm.exponent = 1023 + 63 - 1;
+	vdm.significand = (u64)m;
+
+	return vfp_double_normaliseround(dd, &vdm, fpscr, 0, "fuito");
+}
+
+static u32 vfp_double_fsito(int dd, int unused, int dm, u32 fpscr)
+{
+	struct vfp_double vdm;
+	u32 m = vfp_get_float(dm);
+
+	vdm.sign = (m & 0x80000000) >> 16;
+	vdm.exponent = 1023 + 63 - 1;
+	vdm.significand = vdm.sign ? -m : m;
+
+	return vfp_double_normaliseround(dd, &vdm, fpscr, 0, "fsito");
+}
+
+static u32 vfp_double_ftoui(int sd, int unused, int dm, u32 fpscr)
+{
+	struct vfp_double vdm;
+	u32 d, exceptions = 0;
+	int rmode = fpscr & FPSCR_RMODE_MASK;
+	int tm;
+
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+
+	/*
+	 * Do we have a denormalised number?
+	 */
+	tm = vfp_double_type(&vdm);
+	if (tm & VFP_DENORMAL)
+		exceptions |= FPSCR_IDC;
+
+	if (tm & VFP_NAN)
+		vdm.sign = 0;
+
+	if (vdm.exponent >= 1023 + 32) {
+		d = vdm.sign ? 0 : 0xffffffff;
+		exceptions = FPSCR_IOC;
+	} else if (vdm.exponent >= 1023 - 1) {
+		int shift = 1023 + 63 - vdm.exponent;
+		u64 rem, incr = 0;
+
+		/*
+		 * 2^0 <= m < 2^32-2^8
+		 */
+		d = (vdm.significand << 1) >> shift;
+		rem = vdm.significand << (65 - shift);
+
+		if (rmode == FPSCR_ROUND_NEAREST) {
+			incr = 0x8000000000000000ULL;
+			if ((d & 1) == 0)
+				incr -= 1;
+		} else if (rmode == FPSCR_ROUND_TOZERO) {
+			incr = 0;
+		} else if ((rmode == FPSCR_ROUND_PLUSINF) ^ (vdm.sign != 0)) {
+			incr = ~0ULL;
+		}
+
+		if ((rem + incr) < rem) {
+			if (d < 0xffffffff)
+				d += 1;
+			else
+				exceptions |= FPSCR_IOC;
+		}
+
+		if (d && vdm.sign) {
+			d = 0;
+			exceptions |= FPSCR_IOC;
+		} else if (rem)
+			exceptions |= FPSCR_IXC;
+	} else {
+		d = 0;
+		if (vdm.exponent | vdm.significand) {
+			exceptions |= FPSCR_IXC;
+			if (rmode == FPSCR_ROUND_PLUSINF && vdm.sign == 0)
+				d = 1;
+			else if (rmode == FPSCR_ROUND_MINUSINF && vdm.sign) {
+				d = 0;
+				exceptions |= FPSCR_IOC;
+			}
+		}
+	}
+
+	pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
+
+	vfp_put_float(sd, d);
+
+	return exceptions;
+}
+
+static u32 vfp_double_ftouiz(int sd, int unused, int dm, u32 fpscr)
+{
+	return vfp_double_ftoui(sd, unused, dm, FPSCR_ROUND_TOZERO);
+}
+
+static u32 vfp_double_ftosi(int sd, int unused, int dm, u32 fpscr)
+{
+	struct vfp_double vdm;
+	u32 d, exceptions = 0;
+	int rmode = fpscr & FPSCR_RMODE_MASK;
+
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+	vfp_double_dump("VDM", &vdm);
+
+	/*
+	 * Do we have denormalised number?
+	 */
+	if (vfp_double_type(&vdm) & VFP_DENORMAL)
+		exceptions |= FPSCR_IDC;
+
+	if (vdm.exponent >= 1023 + 32) {
+		d = 0x7fffffff;
+		if (vdm.sign)
+			d = ~d;
+		exceptions |= FPSCR_IOC;
+	} else if (vdm.exponent >= 1023 - 1) {
+		int shift = 1023 + 63 - vdm.exponent;	/* 58 */
+		u64 rem, incr = 0;
+
+		d = (vdm.significand << 1) >> shift;
+		rem = vdm.significand << (65 - shift);
+
+		if (rmode == FPSCR_ROUND_NEAREST) {
+			incr = 0x8000000000000000ULL;
+			if ((d & 1) == 0)
+				incr -= 1;
+		} else if (rmode == FPSCR_ROUND_TOZERO) {
+			incr = 0;
+		} else if ((rmode == FPSCR_ROUND_PLUSINF) ^ (vdm.sign != 0)) {
+			incr = ~0ULL;
+		}
+
+		if ((rem + incr) < rem && d < 0xffffffff)
+			d += 1;
+		if (d > 0x7fffffff + (vdm.sign != 0)) {
+			d = 0x7fffffff + (vdm.sign != 0);
+			exceptions |= FPSCR_IOC;
+		} else if (rem)
+			exceptions |= FPSCR_IXC;
+
+		if (vdm.sign)
+			d = -d;
+	} else {
+		d = 0;
+		if (vdm.exponent | vdm.significand) {
+			exceptions |= FPSCR_IXC;
+			if (rmode == FPSCR_ROUND_PLUSINF && vdm.sign == 0)
+				d = 1;
+			else if (rmode == FPSCR_ROUND_MINUSINF && vdm.sign)
+				d = -1;
+		}
+	}
+
+	pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
+
+	vfp_put_float(sd, (s32)d);
+
+	return exceptions;
+}
+
+static u32 vfp_double_ftosiz(int dd, int unused, int dm, u32 fpscr)
+{
+	return vfp_double_ftosi(dd, unused, dm, FPSCR_ROUND_TOZERO);
+}
+
+
+static u32 (* const fop_extfns[32])(int dd, int unused, int dm, u32 fpscr) = {
+	[FEXT_TO_IDX(FEXT_FCPY)]	= vfp_double_fcpy,
+	[FEXT_TO_IDX(FEXT_FABS)]	= vfp_double_fabs,
+	[FEXT_TO_IDX(FEXT_FNEG)]	= vfp_double_fneg,
+	[FEXT_TO_IDX(FEXT_FSQRT)]	= vfp_double_fsqrt,
+	[FEXT_TO_IDX(FEXT_FCMP)]	= vfp_double_fcmp,
+	[FEXT_TO_IDX(FEXT_FCMPE)]	= vfp_double_fcmpe,
+	[FEXT_TO_IDX(FEXT_FCMPZ)]	= vfp_double_fcmpz,
+	[FEXT_TO_IDX(FEXT_FCMPEZ)]	= vfp_double_fcmpez,
+	[FEXT_TO_IDX(FEXT_FCVT)]	= vfp_double_fcvts,
+	[FEXT_TO_IDX(FEXT_FUITO)]	= vfp_double_fuito,
+	[FEXT_TO_IDX(FEXT_FSITO)]	= vfp_double_fsito,
+	[FEXT_TO_IDX(FEXT_FTOUI)]	= vfp_double_ftoui,
+	[FEXT_TO_IDX(FEXT_FTOUIZ)]	= vfp_double_ftouiz,
+	[FEXT_TO_IDX(FEXT_FTOSI)]	= vfp_double_ftosi,
+	[FEXT_TO_IDX(FEXT_FTOSIZ)]	= vfp_double_ftosiz,
+};
+
+
+
+
+static u32
+vfp_double_fadd_nonnumber(struct vfp_double *vdd, struct vfp_double *vdn,
+			  struct vfp_double *vdm, u32 fpscr)
+{
+	struct vfp_double *vdp;
+	u32 exceptions = 0;
+	int tn, tm;
+
+	tn = vfp_double_type(vdn);
+	tm = vfp_double_type(vdm);
+
+	if (tn & tm & VFP_INFINITY) {
+		/*
+		 * Two infinities.  Are they different signs?
+		 */
+		if (vdn->sign ^ vdm->sign) {
+			/*
+			 * different signs -> invalid
+			 */
+			exceptions = FPSCR_IOC;
+			vdp = &vfp_double_default_qnan;
+		} else {
+			/*
+			 * same signs -> valid
+			 */
+			vdp = vdn;
+		}
+	} else if (tn & VFP_INFINITY && tm & VFP_NUMBER) {
+		/*
+		 * One infinity and one number -> infinity
+		 */
+		vdp = vdn;
+	} else {
+		/*
+		 * 'n' is a NaN of some type
+		 */
+		return vfp_propagate_nan(vdd, vdn, vdm, fpscr);
+	}
+	*vdd = *vdp;
+	return exceptions;
+}
+
+static u32
+vfp_double_add(struct vfp_double *vdd, struct vfp_double *vdn,
+	       struct vfp_double *vdm, u32 fpscr)
+{
+	u32 exp_diff;
+	u64 m_sig;
+
+	if (vdn->significand & (1ULL << 63) ||
+	    vdm->significand & (1ULL << 63)) {
+		pr_info("VFP: bad FP values in %s\n", __func__);
+		vfp_double_dump("VDN", vdn);
+		vfp_double_dump("VDM", vdm);
+	}
+
+	/*
+	 * Ensure that 'n' is the largest magnitude number.  Note that
+	 * if 'n' and 'm' have equal exponents, we do not swap them.
+	 * This ensures that NaN propagation works correctly.
+	 */
+	if (vdn->exponent < vdm->exponent) {
+		struct vfp_double *t = vdn;
+		vdn = vdm;
+		vdm = t;
+	}
+
+	/*
+	 * Is 'n' an infinity or a NaN?  Note that 'm' may be a number,
+	 * infinity or a NaN here.
+	 */
+	if (vdn->exponent == 2047)
+		return vfp_double_fadd_nonnumber(vdd, vdn, vdm, fpscr);
+
+	/*
+	 * We have two proper numbers, where 'vdn' is the larger magnitude.
+	 *
+	 * Copy 'n' to 'd' before doing the arithmetic.
+	 */
+	*vdd = *vdn;
+
+	/*
+	 * Align 'm' with the result.
+	 */
+	exp_diff = vdn->exponent - vdm->exponent;
+	m_sig = vfp_shiftright64jamming(vdm->significand, exp_diff);
+
+	/*
+	 * If the signs are different, we are really subtracting.
+	 */
+	if (vdn->sign ^ vdm->sign) {
+		m_sig = vdn->significand - m_sig;
+		if ((s64)m_sig < 0) {
+			vdd->sign = vfp_sign_negate(vdd->sign);
+			m_sig = -m_sig;
+		}
+	} else {
+		m_sig += vdn->significand;
+	}
+	vdd->significand = m_sig;
+
+	return 0;
+}
+
+static u32
+vfp_double_multiply(struct vfp_double *vdd, struct vfp_double *vdn,
+		    struct vfp_double *vdm, u32 fpscr)
+{
+	vfp_double_dump("VDN", vdn);
+	vfp_double_dump("VDM", vdm);
+
+	/*
+	 * Ensure that 'n' is the largest magnitude number.  Note that
+	 * if 'n' and 'm' have equal exponents, we do not swap them.
+	 * This ensures that NaN propagation works correctly.
+	 */
+	if (vdn->exponent < vdm->exponent) {
+		struct vfp_double *t = vdn;
+		vdn = vdm;
+		vdm = t;
+		pr_debug("VFP: swapping M <-> N\n");
+	}
+
+	vdd->sign = vdn->sign ^ vdm->sign;
+
+	/*
+	 * If 'n' is an infinity or NaN, handle it.  'm' may be anything.
+	 */
+	if (vdn->exponent == 2047) {
+		if (vdn->significand || (vdm->exponent == 2047 && vdm->significand))
+			return vfp_propagate_nan(vdd, vdn, vdm, fpscr);
+		if ((vdm->exponent | vdm->significand) == 0) {
+			*vdd = vfp_double_default_qnan;
+			return FPSCR_IOC;
+		}
+		vdd->exponent = vdn->exponent;
+		vdd->significand = 0;
+		return 0;
+	}
+
+	/*
+	 * If 'm' is zero, the result is always zero.  In this case,
+	 * 'n' may be zero or a number, but it doesn't matter which.
+	 */
+	if ((vdm->exponent | vdm->significand) == 0) {
+		vdd->exponent = 0;
+		vdd->significand = 0;
+		return 0;
+	}
+
+	/*
+	 * We add 2 to the destination exponent for the same reason
+	 * as the addition case - though this time we have +1 from
+	 * each input operand.
+	 */
+	vdd->exponent = vdn->exponent + vdm->exponent - 1023 + 2;
+	vdd->significand = vfp_hi64multiply64(vdn->significand, vdm->significand);
+
+	vfp_double_dump("VDD", vdd);
+	return 0;
+}
+
+#define NEG_MULTIPLY	(1 << 0)
+#define NEG_SUBTRACT	(1 << 1)
+
+static u32
+vfp_double_multiply_accumulate(int dd, int dn, int dm, u32 fpscr, u32 negate, char *func)
+{
+	struct vfp_double vdd, vdp, vdn, vdm;
+	u32 exceptions;
+
+	vfp_double_unpack(&vdn, vfp_get_double(dn));
+	if (vdn.exponent == 0 && vdn.significand)
+		vfp_double_normalise_denormal(&vdn);
+
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+	if (vdm.exponent == 0 && vdm.significand)
+		vfp_double_normalise_denormal(&vdm);
+
+	exceptions = vfp_double_multiply(&vdp, &vdn, &vdm, fpscr);
+	if (negate & NEG_MULTIPLY)
+		vdp.sign = vfp_sign_negate(vdp.sign);
+
+	vfp_double_unpack(&vdn, vfp_get_double(dd));
+	if (negate & NEG_SUBTRACT)
+		vdn.sign = vfp_sign_negate(vdn.sign);
+
+	exceptions |= vfp_double_add(&vdd, &vdn, &vdp, fpscr);
+
+	return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, func);
+}
+
+/*
+ * Standard operations
+ */
+
+/*
+ * sd = sd + (sn * sm)
+ */
+static u32 vfp_double_fmac(int dd, int dn, int dm, u32 fpscr)
+{
+	return vfp_double_multiply_accumulate(dd, dn, dm, fpscr, 0, "fmac");
+}
+
+/*
+ * sd = sd - (sn * sm)
+ */
+static u32 vfp_double_fnmac(int dd, int dn, int dm, u32 fpscr)
+{
+	return vfp_double_multiply_accumulate(dd, dn, dm, fpscr, NEG_MULTIPLY, "fnmac");
+}
+
+/*
+ * sd = -sd + (sn * sm)
+ */
+static u32 vfp_double_fmsc(int dd, int dn, int dm, u32 fpscr)
+{
+	return vfp_double_multiply_accumulate(dd, dn, dm, fpscr, NEG_SUBTRACT, "fmsc");
+}
+
+/*
+ * sd = -sd - (sn * sm)
+ */
+static u32 vfp_double_fnmsc(int dd, int dn, int dm, u32 fpscr)
+{
+	return vfp_double_multiply_accumulate(dd, dn, dm, fpscr, NEG_SUBTRACT | NEG_MULTIPLY, "fnmsc");
+}
+
+/*
+ * sd = sn * sm
+ */
+static u32 vfp_double_fmul(int dd, int dn, int dm, u32 fpscr)
+{
+	struct vfp_double vdd, vdn, vdm;
+	u32 exceptions;
+
+	vfp_double_unpack(&vdn, vfp_get_double(dn));
+	if (vdn.exponent == 0 && vdn.significand)
+		vfp_double_normalise_denormal(&vdn);
+
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+	if (vdm.exponent == 0 && vdm.significand)
+		vfp_double_normalise_denormal(&vdm);
+
+	exceptions = vfp_double_multiply(&vdd, &vdn, &vdm, fpscr);
+	return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fmul");
+}
+
+/*
+ * sd = -(sn * sm)
+ */
+static u32 vfp_double_fnmul(int dd, int dn, int dm, u32 fpscr)
+{
+	struct vfp_double vdd, vdn, vdm;
+	u32 exceptions;
+
+	vfp_double_unpack(&vdn, vfp_get_double(dn));
+	if (vdn.exponent == 0 && vdn.significand)
+		vfp_double_normalise_denormal(&vdn);
+
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+	if (vdm.exponent == 0 && vdm.significand)
+		vfp_double_normalise_denormal(&vdm);
+
+	exceptions = vfp_double_multiply(&vdd, &vdn, &vdm, fpscr);
+	vdd.sign = vfp_sign_negate(vdd.sign);
+
+	return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fnmul");
+}
+
+/*
+ * sd = sn + sm
+ */
+static u32 vfp_double_fadd(int dd, int dn, int dm, u32 fpscr)
+{
+	struct vfp_double vdd, vdn, vdm;
+	u32 exceptions;
+
+	vfp_double_unpack(&vdn, vfp_get_double(dn));
+	if (vdn.exponent == 0 && vdn.significand)
+		vfp_double_normalise_denormal(&vdn);
+
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+	if (vdm.exponent == 0 && vdm.significand)
+		vfp_double_normalise_denormal(&vdm);
+
+	exceptions = vfp_double_add(&vdd, &vdn, &vdm, fpscr);
+
+	return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fadd");
+}
+
+/*
+ * sd = sn - sm
+ */
+static u32 vfp_double_fsub(int dd, int dn, int dm, u32 fpscr)
+{
+	struct vfp_double vdd, vdn, vdm;
+	u32 exceptions;
+
+	vfp_double_unpack(&vdn, vfp_get_double(dn));
+	if (vdn.exponent == 0 && vdn.significand)
+		vfp_double_normalise_denormal(&vdn);
+
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+	if (vdm.exponent == 0 && vdm.significand)
+		vfp_double_normalise_denormal(&vdm);
+
+	/*
+	 * Subtraction is like addition, but with a negated operand.
+	 */
+	vdm.sign = vfp_sign_negate(vdm.sign);
+
+	exceptions = vfp_double_add(&vdd, &vdn, &vdm, fpscr);
+
+	return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fsub");
+}
+
+/*
+ * sd = sn / sm
+ */
+static u32 vfp_double_fdiv(int dd, int dn, int dm, u32 fpscr)
+{
+	struct vfp_double vdd, vdn, vdm;
+	u32 exceptions = 0;
+	int tm, tn;
+
+	vfp_double_unpack(&vdn, vfp_get_double(dn));
+	vfp_double_unpack(&vdm, vfp_get_double(dm));
+
+	vdd.sign = vdn.sign ^ vdm.sign;
+
+	tn = vfp_double_type(&vdn);
+	tm = vfp_double_type(&vdm);
+
+	/*
+	 * Is n a NAN?
+	 */
+	if (tn & VFP_NAN)
+		goto vdn_nan;
+
+	/*
+	 * Is m a NAN?
+	 */
+	if (tm & VFP_NAN)
+		goto vdm_nan;
+
+	/*
+	 * If n and m are infinity, the result is invalid
+	 * If n and m are zero, the result is invalid
+	 */
+	if (tm & tn & (VFP_INFINITY|VFP_ZERO))
+		goto invalid;
+
+	/*
+	 * If n is infinity, the result is infinity
+	 */
+	if (tn & VFP_INFINITY)
+		goto infinity;
+
+	/*
+	 * If m is zero, raise div0 exceptions
+	 */
+	if (tm & VFP_ZERO)
+		goto divzero;
+
+	/*
+	 * If m is infinity, or n is zero, the result is zero
+	 */
+	if (tm & VFP_INFINITY || tn & VFP_ZERO)
+		goto zero;
+
+	if (tn & VFP_DENORMAL)
+		vfp_double_normalise_denormal(&vdn);
+	if (tm & VFP_DENORMAL)
+		vfp_double_normalise_denormal(&vdm);
+
+	/*
+	 * Ok, we have two numbers, we can perform division.
+	 */
+	vdd.exponent = vdn.exponent - vdm.exponent + 1023 - 1;
+	vdm.significand <<= 1;
+	if (vdm.significand <= (2 * vdn.significand)) {
+		vdn.significand >>= 1;
+		vdd.exponent++;
+	}
+	vdd.significand = vfp_estimate_div128to64(vdn.significand, 0, vdm.significand);
+	if ((vdd.significand & 0x1ff) <= 2) {
+		u64 termh, terml, remh, reml;
+		mul64to128(&termh, &terml, vdm.significand, vdd.significand);
+		sub128(&remh, &reml, vdn.significand, 0, termh, terml);
+		while ((s64)remh < 0) {
+			vdd.significand -= 1;
+			add128(&remh, &reml, remh, reml, 0, vdm.significand);
+		}
+		vdd.significand |= (reml != 0);
+	}
+	return vfp_double_normaliseround(dd, &vdd, fpscr, 0, "fdiv");
+
+ vdn_nan:
+	exceptions = vfp_propagate_nan(&vdd, &vdn, &vdm, fpscr);
+ pack:
+	vfp_put_double(dd, vfp_double_pack(&vdd));
+	return exceptions;
+
+ vdm_nan:
+	exceptions = vfp_propagate_nan(&vdd, &vdm, &vdn, fpscr);
+	goto pack;
+
+ zero:
+	vdd.exponent = 0;
+	vdd.significand = 0;
+	goto pack;
+
+ divzero:
+	exceptions = FPSCR_DZC;
+ infinity:
+	vdd.exponent = 2047;
+	vdd.significand = 0;
+	goto pack;
+
+ invalid:
+	vfp_put_double(dd, vfp_double_pack(&vfp_double_default_qnan));
+	return FPSCR_IOC;
+}
+
+static u32 (* const fop_fns[16])(int dd, int dn, int dm, u32 fpscr) = {
+	[FOP_TO_IDX(FOP_FMAC)]	= vfp_double_fmac,
+	[FOP_TO_IDX(FOP_FNMAC)]	= vfp_double_fnmac,
+	[FOP_TO_IDX(FOP_FMSC)]	= vfp_double_fmsc,
+	[FOP_TO_IDX(FOP_FNMSC)]	= vfp_double_fnmsc,
+	[FOP_TO_IDX(FOP_FMUL)]	= vfp_double_fmul,
+	[FOP_TO_IDX(FOP_FNMUL)]	= vfp_double_fnmul,
+	[FOP_TO_IDX(FOP_FADD)]	= vfp_double_fadd,
+	[FOP_TO_IDX(FOP_FSUB)]	= vfp_double_fsub,
+	[FOP_TO_IDX(FOP_FDIV)]	= vfp_double_fdiv,
+};
+
+#define FREG_BANK(x)	((x) & 0x0c)
+#define FREG_IDX(x)	((x) & 3)
+
+u32 vfp_double_cpdo(u32 inst, u32 fpscr)
+{
+	u32 op = inst & FOP_MASK;
+	u32 exceptions = 0;
+	unsigned int dd = vfp_get_sd(inst);
+	unsigned int dn = vfp_get_sn(inst);
+	unsigned int dm = vfp_get_sm(inst);
+	unsigned int vecitr, veclen, vecstride;
+	u32 (*fop)(int, int, s32, u32);
+
+	veclen = fpscr & FPSCR_LENGTH_MASK;
+	vecstride = (1 + ((fpscr & FPSCR_STRIDE_MASK) == FPSCR_STRIDE_MASK)) * 2;
+
+	/*
+	 * If destination bank is zero, vector length is always '1'.
+	 * ARM DDI0100F C5.1.3, C5.3.2.
+	 */
+	if (FREG_BANK(dd) == 0)
+		veclen = 0;
+
+	pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride,
+		 (veclen >> FPSCR_LENGTH_BIT) + 1);
+
+	fop = (op == FOP_EXT) ? fop_extfns[dn] : fop_fns[FOP_TO_IDX(op)];
+	if (!fop)
+		goto invalid;
+
+	for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) {
+		u32 except;
+
+		if (op == FOP_EXT)
+			pr_debug("VFP: itr%d (d%u.%u) = op[%u] (d%u.%u)\n",
+				 vecitr >> FPSCR_LENGTH_BIT,
+				 dd >> 1, dd & 1, dn,
+				 dm >> 1, dm & 1);
+		else
+			pr_debug("VFP: itr%d (d%u.%u) = (d%u.%u) op[%u] (d%u.%u)\n",
+				 vecitr >> FPSCR_LENGTH_BIT,
+				 dd >> 1, dd & 1,
+				 dn >> 1, dn & 1,
+				 FOP_TO_IDX(op),
+				 dm >> 1, dm & 1);
+
+		except = fop(dd, dn, dm, fpscr);
+		pr_debug("VFP: itr%d: exceptions=%08x\n",
+			 vecitr >> FPSCR_LENGTH_BIT, except);
+
+		exceptions |= except;
+
+		/*
+		 * This ensures that comparisons only operate on scalars;
+		 * comparisons always return with one FPSCR status bit set.
+		 */
+		if (except & (FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V))
+			break;
+
+		/*
+		 * CHECK: It appears to be undefined whether we stop when
+		 * we encounter an exception.  We continue.
+		 */
+
+		dd = FREG_BANK(dd) + ((FREG_IDX(dd) + vecstride) & 6);
+		dn = FREG_BANK(dn) + ((FREG_IDX(dn) + vecstride) & 6);
+		if (FREG_BANK(dm) != 0)
+			dm = FREG_BANK(dm) + ((FREG_IDX(dm) + vecstride) & 6);
+	}
+	return exceptions;
+
+ invalid:
+	return ~0;
+}
--- diff/arch/arm/vfp/vfphw.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/vfp/vfphw.S	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,210 @@
+/*
+ *  linux/arch/arm/vfp/vfphw.S
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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.
+ *
+ * This code is called from the kernel's undefined instruction trap.
+ * r9 holds the return address for successful handling.
+ * lr holds the return address for unrecognised instructions.
+ * r10 points at the start of the private FP workspace in the thread structure
+ * sp points to a struct pt_regs (as defined in include/asm/proc/ptrace.h)
+ */
+#include <asm/thread_info.h>
+#include <asm/vfpmacros.h>
+#include "../kernel/entry-header.S"
+
+	.macro	DBGSTR, str
+#ifdef DEBUG
+	stmfd	sp!, {r0-r3, ip, lr}
+	add	r0, pc, #4
+	bl	printk
+	b	1f
+	.asciz  "<7>VFP: \str\n"
+	.balign 4
+1:	ldmfd	sp!, {r0-r3, ip, lr}
+#endif
+	.endm
+
+	.macro  DBGSTR1, str, arg
+#ifdef DEBUG
+	stmfd	sp!, {r0-r3, ip, lr}
+	mov	r1, \arg
+	add	r0, pc, #4
+	bl	printk
+	b	1f
+	.asciz  "<7>VFP: \str\n"
+	.balign 4
+1:	ldmfd	sp!, {r0-r3, ip, lr}
+#endif
+	.endm
+
+	.macro  DBGSTR3, str, arg1, arg2, arg3
+#ifdef DEBUG
+	stmfd	sp!, {r0-r3, ip, lr}
+	mov	r3, \arg3
+	mov	r2, \arg2
+	mov	r1, \arg1
+	add	r0, pc, #4
+	bl	printk
+	b	1f
+	.asciz  "<7>VFP: \str\n"
+	.balign 4
+1:	ldmfd	sp!, {r0-r3, ip, lr}
+#endif
+	.endm
+
+
+@ VFP hardware support entry point.
+@
+@  r0  = faulted instruction
+@  r5  = faulted PC+4
+@  r9  = successful return
+@  r10 = vfp_state union
+@  lr  = failure return
+
+	.globl	vfp_support_entry
+vfp_support_entry:
+	DBGSTR3	"instr %08x pc %08x state %p", r0, r5, r10
+
+	VFPFMRX	r1, FPEXC		@ Is the VFP enabled?
+	DBGSTR1	"fpexc %08x", r1
+	tst	r1, #FPEXC_ENABLE
+	bne	look_for_VFP_exceptions	@ VFP is already enabled
+
+	DBGSTR1 "enable %x", r10
+	ldr	r3, last_VFP_context_address
+	orr	r1, r1, #FPEXC_ENABLE	@ user FPEXC has the enable bit set
+	ldr	r4, [r3]		@ last_VFP_context pointer
+	bic	r2, r1, #FPEXC_EXCEPTION @ make sure exceptions are disabled
+	cmp	r4, r10
+	beq	check_for_exception	@ we are returning to the same
+					@ process, so the registers are
+					@ still there.  In this case, we do
+					@ not want to drop a pending exception.
+
+	VFPFMXR	FPEXC, r2		@ enable VFP, disable any pending
+					@ exceptions, so we can get at the
+					@ rest of it
+
+	@ Save out the current registers to the old thread state
+
+	DBGSTR1	"save old state %p", r4
+	cmp	r4, #0
+	beq	no_old_VFP_process
+	VFPFMRX	r2, FPSCR		@ current status
+	VFPFMRX	r6, FPINST		@ FPINST (always there, rev0 onwards)
+	tst	r1, #FPEXC_FPV2		@ is there an FPINST2 to read?
+	VFPFMRX	r8, FPINST2, NE		@ FPINST2 if needed - avoids reading
+					@ nonexistant reg on rev0
+	VFPFSTMIA r4 			@ save the working registers
+	add	r4, r4, #8*16+4
+	stmia	r4, {r1, r2, r6, r8}	@ save FPEXC, FPSCR, FPINST, FPINST2
+					@ and point r4 at the word at the
+					@ start of the register dump
+
+no_old_VFP_process:
+	DBGSTR1	"load state %p", r10
+	str	r10, [r3]		@ update the last_VFP_context pointer
+					@ Load the saved state back into the VFP
+	add	r4, r10, #8*16+4
+	ldmia	r4, {r1, r2, r6, r8}	@ load FPEXC, FPSCR, FPINST, FPINST2
+	VFPFLDMIA r10	 		@ reload the working registers while
+					@ FPEXC is in a safe state
+	tst	r1, #FPEXC_FPV2		@ is there an FPINST2 to write?
+	VFPFMXR	FPINST2, r8, NE		@ FPINST2 if needed - avoids writing
+					@ nonexistant reg on rev0
+	VFPFMXR	FPINST, r6
+	VFPFMXR	FPSCR, r2		@ restore status
+
+check_for_exception:
+	tst	r1, #FPEXC_EXCEPTION
+	bne	process_exception	@ might as well handle the pending
+					@ exception before retrying branch
+					@ out before setting an FPEXC that
+					@ stops us reading stuff
+	VFPFMXR	FPEXC, r1		@ restore FPEXC last
+	sub	r5, r5, #4
+	str	r5, [sp, #S_PC]		@ retry the instruction
+	mov	pc, r9			@ we think we have handled things
+
+
+look_for_VFP_exceptions:
+	tst	r1, #FPEXC_EXCEPTION
+	bne	process_exception
+	VFPFMRX	r2, FPSCR
+	tst	r2, #FPSCR_IXE		@ IXE doesn't set FPEXC_EXCEPTION !
+	bne	process_exception
+
+	@ Fall into hand on to next handler - appropriate coproc instr
+	@ not recognised by VFP
+
+	DBGSTR	"not VFP"
+	mov	pc, lr
+
+process_exception:
+	DBGSTR	"bounce"
+	sub	r5, r5, #4
+	str	r5, [sp, #S_PC]		@ retry the instruction on exit from
+					@ the imprecise exception handling in
+					@ the support code
+	mov	r2, sp			@ nothing stacked - regdump is at TOS
+	mov	lr, r9			@ setup for a return to the user code.
+
+	@ Now call the C code to package up the bounce to the support code
+	@   r0 holds the trigger instruction
+	@   r1 holds the FPEXC value
+	@   r2 pointer to register dump
+	b	VFP9_bounce		@ we have handled this - the support
+					@ code will raise an exception if
+					@ required. If not, the user code will
+					@ retry the faulted instruction
+
+last_VFP_context_address:
+	.word	last_VFP_context
+
+	.globl	vfp_get_float
+vfp_get_float:
+	add	pc, pc, r0, lsl #3
+	mov	r0, r0
+	.irp	dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
+	mrc	p10, 0, r0, c\dr, c0, 0	@ fmrs	r0, s0
+	mov	pc, lr
+	mrc	p10, 0, r0, c\dr, c0, 4	@ fmrs	r0, s1
+	mov	pc, lr
+	.endr
+
+	.globl	vfp_put_float
+vfp_put_float:
+	add	pc, pc, r0, lsl #3
+	mov	r0, r0
+	.irp	dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
+	mcr	p10, 0, r1, c\dr, c0, 0	@ fmsr	r0, s0
+	mov	pc, lr
+	mcr	p10, 0, r1, c\dr, c0, 4	@ fmsr	r0, s1
+	mov	pc, lr
+	.endr
+
+	.globl	vfp_get_double
+vfp_get_double:
+	mov	r0, r0, lsr #1
+	add	pc, pc, r0, lsl #3
+	mov	r0, r0
+	.irp	dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
+	mrrc	p10, 1, r0, r1, c\dr	@ fmrrd	r0, r1, d\dr
+	mov	pc, lr
+	.endr
+
+	.globl	vfp_put_double
+vfp_put_double:
+	mov	r0, r0, lsr #1
+	add	pc, pc, r0, lsl #3
+	mov	r0, r0
+	.irp	dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
+	mcrr	p10, 1, r1, r2, c\dr	@ fmrrd	r1, r2, d\dr
+	mov	pc, lr
+	.endr
--- diff/arch/arm/vfp/vfpinstr.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/vfp/vfpinstr.h	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,88 @@
+/*
+ *  linux/arch/arm/vfp/vfpinstr.h
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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.
+ *
+ * VFP instruction masks.
+ */
+#define INST_CPRTDO(inst)	(((inst) & 0x0f000000) == 0x0e000000)
+#define INST_CPRT(inst)		((inst) & (1 << 4))
+#define INST_CPRT_L(inst)	((inst) & (1 << 20))
+#define INST_CPRT_Rd(inst)	(((inst) & (15 << 12)) >> 12)
+#define INST_CPRT_OP(inst)	(((inst) >> 21) & 7)
+#define INST_CPNUM(inst)	((inst) & 0xf00)
+#define CPNUM(cp)		((cp) << 8)
+
+#define FOP_MASK	(0x00b00040)
+#define FOP_FMAC	(0x00000000)
+#define FOP_FNMAC	(0x00000040)
+#define FOP_FMSC	(0x00100000)
+#define FOP_FNMSC	(0x00100040)
+#define FOP_FMUL	(0x00200000)
+#define FOP_FNMUL	(0x00200040)
+#define FOP_FADD	(0x00300000)
+#define FOP_FSUB	(0x00300040)
+#define FOP_FDIV	(0x00800000)
+#define FOP_EXT		(0x00b00040)
+
+#define FOP_TO_IDX(inst)	((inst & 0x00b00000) >> 20 | (inst & (1 << 6)) >> 4)
+
+#define FEXT_MASK	(0x000f0080)
+#define FEXT_FCPY	(0x00000000)
+#define FEXT_FABS	(0x00000080)
+#define FEXT_FNEG	(0x00010000)
+#define FEXT_FSQRT	(0x00010080)
+#define FEXT_FCMP	(0x00040000)
+#define FEXT_FCMPE	(0x00040080)
+#define FEXT_FCMPZ	(0x00050000)
+#define FEXT_FCMPEZ	(0x00050080)
+#define FEXT_FCVT	(0x00070080)
+#define FEXT_FUITO	(0x00080000)
+#define FEXT_FSITO	(0x00080080)
+#define FEXT_FTOUI	(0x000c0000)
+#define FEXT_FTOUIZ	(0x000c0080)
+#define FEXT_FTOSI	(0x000d0000)
+#define FEXT_FTOSIZ	(0x000d0080)
+
+#define FEXT_TO_IDX(inst)	((inst & 0x000f0000) >> 15 | (inst & (1 << 7)) >> 7)
+
+#define vfp_get_sd(inst)	((inst & 0x0000f000) >> 11 | (inst & (1 << 22)) >> 22)
+#define vfp_get_dd(inst)	((inst & 0x0000f000) >> 12)
+#define vfp_get_sm(inst)	((inst & 0x0000000f) << 1 | (inst & (1 << 5)) >> 5)
+#define vfp_get_dm(inst)	((inst & 0x0000000f))
+#define vfp_get_sn(inst)	((inst & 0x000f0000) >> 15 | (inst & (1 << 7)) >> 7)
+#define vfp_get_dn(inst)	((inst & 0x000f0000) >> 16)
+
+#define vfp_single(inst)	(((inst) & 0x0000f00) == 0xa00)
+
+#define FPSCR_N	(1 << 31)
+#define FPSCR_Z	(1 << 30)
+#define FPSCR_C (1 << 29)
+#define FPSCR_V	(1 << 28)
+
+/*
+ * Since we aren't building with -mfpu=vfp, we need to code
+ * these instructions using their MRC/MCR equivalents.
+ */
+#define vfpreg(_vfp_) #_vfp_
+
+#define fmrx(_vfp_) ({			\
+	u32 __v;			\
+	asm("mrc%? p10, 7, %0, " vfpreg(_vfp_) ", cr0, 0 @ fmrx	%0, " #_vfp_	\
+	    : "=r" (__v));		\
+	__v;				\
+ })
+
+#define fmxr(_vfp_,_var_)		\
+	asm("mcr%? p10, 7, %0, " vfpreg(_vfp_) ", cr0, 0 @ fmxr	" #_vfp_ ", %0"	\
+	   : : "r" (_var_))
+
+u32 vfp_single_cpdo(u32 inst, u32 fpscr);
+u32 vfp_single_cprt(u32 inst, u32 fpscr, struct pt_regs *regs);
+
+u32 vfp_double_cpdo(u32 inst, u32 fpscr);
--- diff/arch/arm/vfp/vfpmodule.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/vfp/vfpmodule.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,288 @@
+/*
+ *  linux/arch/arm/vfp/vfpmodule.c
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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/module.h>
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <asm/vfp.h>
+
+#include "vfpinstr.h"
+#include "vfp.h"
+
+/*
+ * Our undef handlers (in entry.S)
+ */
+void vfp_testing_entry(void);
+void vfp_support_entry(void);
+
+void (*vfp_vector)(void) = vfp_testing_entry;
+union vfp_state *last_VFP_context;
+
+/*
+ * Dual-use variable.
+ * Used in startup: set to non-zero if VFP checks fail
+ * After startup, holds VFP architecture
+ */
+unsigned int VFP_arch;
+
+/*
+ * Per-thread VFP initialisation.
+ */
+void vfp_flush_thread(union vfp_state *vfp)
+{
+	memset(vfp, 0, sizeof(union vfp_state));
+
+	vfp->hard.fpexc = FPEXC_ENABLE;
+	vfp->hard.fpscr = FPSCR_ROUND_NEAREST;
+
+	/*
+	 * Disable VFP to ensure we initialise it first.
+	 */
+	fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE);
+
+	/*
+	 * Ensure we don't try to overwrite our newly initialised
+	 * state information on the first fault.
+	 */
+	if (last_VFP_context == vfp)
+		last_VFP_context = NULL;
+}
+
+/*
+ * Per-thread VFP cleanup.
+ */
+void vfp_release_thread(union vfp_state *vfp)
+{
+	if (last_VFP_context == vfp)
+		last_VFP_context = NULL;
+}
+
+/*
+ * Raise a SIGFPE for the current process.
+ * sicode describes the signal being raised.
+ */
+void vfp_raise_sigfpe(unsigned int sicode, struct pt_regs *regs)
+{
+	siginfo_t info;
+
+	memset(&info, 0, sizeof(info));
+
+	info.si_signo = SIGFPE;
+	info.si_code = sicode;
+	info.si_addr = (void *)(instruction_pointer(regs) - 4);
+
+	/*
+	 * This is the same as NWFPE, because it's not clear what
+	 * this is used for
+	 */
+	current->thread.error_code = 0;
+	current->thread.trap_no = 6;
+
+	force_sig_info(SIGFPE, &info, current);
+}
+
+static void vfp_panic(char *reason)
+{
+	int i;
+
+	printk(KERN_ERR "VFP: Error: %s\n", reason);
+	printk(KERN_ERR "VFP: EXC 0x%08x SCR 0x%08x INST 0x%08x\n",
+		fmrx(FPEXC), fmrx(FPSCR), fmrx(FPINST));
+	for (i = 0; i < 32; i += 2)
+		printk(KERN_ERR "VFP: s%2u: 0x%08x s%2u: 0x%08x\n",
+		       i, vfp_get_float(i), i+1, vfp_get_float(i+1));
+}
+
+/*
+ * Process bitmask of exception conditions.
+ */
+static void vfp_raise_exceptions(u32 exceptions, u32 inst, u32 fpscr, struct pt_regs *regs)
+{
+	int si_code = 0;
+
+	pr_debug("VFP: raising exceptions %08x\n", exceptions);
+
+	if (exceptions == (u32)-1) {
+		vfp_panic("unhandled bounce");
+		vfp_raise_sigfpe(0, regs);
+		return;
+	}
+
+	/*
+	 * If any of the status flags are set, update the FPSCR.
+	 * Comparison instructions always return at least one of
+	 * these flags set.
+	 */
+	if (exceptions & (FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V))
+		fpscr &= ~(FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V);
+
+	fpscr |= exceptions;
+
+	fmxr(FPSCR, fpscr);
+
+#define RAISE(stat,en,sig)				\
+	if (exceptions & stat && fpscr & en)		\
+		si_code = sig;
+
+	/*
+	 * These are arranged in priority order, least to highest.
+	 */
+	RAISE(FPSCR_IXC, FPSCR_IXE, FPE_FLTRES);
+	RAISE(FPSCR_UFC, FPSCR_UFE, FPE_FLTUND);
+	RAISE(FPSCR_OFC, FPSCR_OFE, FPE_FLTOVF);
+	RAISE(FPSCR_IOC, FPSCR_IOE, FPE_FLTINV);
+
+	if (si_code)
+		vfp_raise_sigfpe(si_code, regs);
+}
+
+/*
+ * Emulate a VFP instruction.
+ */
+static u32 vfp_emulate_instruction(u32 inst, u32 fpscr, struct pt_regs *regs)
+{
+	u32 exceptions = (u32)-1;
+
+	pr_debug("VFP: emulate: INST=0x%08x SCR=0x%08x\n", inst, fpscr);
+
+	if (INST_CPRTDO(inst)) {
+		if (!INST_CPRT(inst)) {
+			/*
+			 * CPDO
+			 */
+			if (vfp_single(inst)) {
+				exceptions = vfp_single_cpdo(inst, fpscr);
+			} else {
+				exceptions = vfp_double_cpdo(inst, fpscr);
+			}
+		} else {
+			/*
+			 * A CPRT instruction can not appear in FPINST2, nor
+			 * can it cause an exception.  Therefore, we do not
+			 * have to emulate it.
+			 */
+		}
+	} else {
+		/*
+		 * A CPDT instruction can not appear in FPINST2, nor can
+		 * it cause an exception.  Therefore, we do not have to
+		 * emulate it.
+		 */
+	}
+	return exceptions;
+}
+
+/*
+ * Package up a bounce condition.
+ */
+void VFP9_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
+{
+	u32 fpscr, orig_fpscr, exceptions, inst;
+
+	pr_debug("VFP: bounce: trigger %08x fpexc %08x\n", trigger, fpexc);
+
+	/*
+	 * Enable access to the VFP so we can handle the bounce.
+	 */
+	fmxr(FPEXC, fpexc & ~(FPEXC_EXCEPTION|FPEXC_INV|FPEXC_UFC|FPEXC_IOC));
+
+	orig_fpscr = fpscr = fmrx(FPSCR);
+
+	/*
+	 * If we are running with inexact exceptions enabled, we need to
+	 * emulate the trigger instruction.  Note that as we're emulating
+	 * the trigger instruction, we need to increment PC.
+	 */
+	if (fpscr & FPSCR_IXE) {
+		regs->ARM_pc += 4;
+		goto emulate;
+	}
+
+	barrier();
+
+	/*
+	 * Modify fpscr to indicate the number of iterations remaining
+	 */
+	if (fpexc & FPEXC_EXCEPTION) {
+		u32 len;
+
+		len = fpexc + (1 << FPEXC_LENGTH_BIT);
+
+		fpscr &= ~FPSCR_LENGTH_MASK;
+		fpscr |= (len & FPEXC_LENGTH_MASK) << (FPSCR_LENGTH_BIT - FPEXC_LENGTH_BIT);
+	}
+
+	/*
+	 * Handle the first FP instruction.  We used to take note of the
+	 * FPEXC bounce reason, but this appears to be unreliable.
+	 * Emulate the bounced instruction instead.
+	 */
+	inst = fmrx(FPINST);
+	exceptions = vfp_emulate_instruction(inst, fpscr, regs);
+	if (exceptions)
+		vfp_raise_exceptions(exceptions, inst, orig_fpscr, regs);
+
+	/*
+	 * If there isn't a second FP instruction, exit now.
+	 */
+	if (!(fpexc & FPEXC_FPV2))
+		return;
+
+	/*
+	 * The barrier() here prevents fpinst2 being read
+	 * before the condition above.
+	 */
+	barrier();
+	trigger = fmrx(FPINST2);
+	fpscr = fmrx(FPSCR);
+
+ emulate:
+	exceptions = vfp_emulate_instruction(trigger, fpscr, regs);
+	if (exceptions)
+		vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs);
+}
+ 
+/*
+ * VFP support code initialisation.
+ */
+static int __init vfp_init(void)
+{
+	unsigned int vfpsid;
+
+	/*
+	 * First check that there is a VFP that we can use.
+	 * The handler is already setup to just log calls, so
+	 * we just need to read the VFPSID register.
+	 */
+	vfpsid = fmrx(FPSID);
+
+	printk(KERN_INFO "VFP support v0.3: ");
+	if (VFP_arch) {
+		printk("not present\n");
+	} else if (vfpsid & FPSID_NODOUBLE) {
+		printk("no double precision support\n");
+	} else {
+		VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT;  /* Extract the architecture version */
+		printk("implementor %02x architecture %d part %02x variant %x rev %x\n",
+			(vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,
+			(vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT,
+			(vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT,
+			(vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT,
+			(vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT);
+		vfp_vector = vfp_support_entry;
+	}
+	return 0;
+}
+
+late_initcall(vfp_init);
--- diff/arch/arm/vfp/vfpsingle.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/arm/vfp/vfpsingle.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,1224 @@
+/*
+ *  linux/arch/arm/vfp/vfpsingle.c
+ *
+ * This code is derived in part from John R. Housers softfloat library, which
+ * carries the following notice:
+ *
+ * ===========================================================================
+ * This C source file is part of the SoftFloat IEC/IEEE Floating-point
+ * Arithmetic Package, Release 2.
+ *
+ * Written by John R. Hauser.  This work was made possible in part by the
+ * International Computer Science Institute, located at Suite 600, 1947 Center
+ * Street, Berkeley, California 94704.  Funding was partially provided by the
+ * National Science Foundation under grant MIP-9311980.  The original version
+ * of this code was written as part of a project to build a fixed-point vector
+ * processor in collaboration with the University of California at Berkeley,
+ * overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
+ * is available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+ * arithmetic/softfloat.html'.
+ *
+ * THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
+ * has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
+ * TIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO
+ * PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
+ * AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
+ *
+ * Derivative works are acceptable, even for commercial purposes, so long as
+ * (1) they include prominent notice that the work is derivative, and (2) they
+ * include prominent notice akin to these three paragraphs for those parts of
+ * this code that are retained.
+ * ===========================================================================
+ */
+#include <linux/kernel.h>
+#include <asm/bitops.h>
+#include <asm/ptrace.h>
+#include <asm/vfp.h>
+
+#include "vfpinstr.h"
+#include "vfp.h"
+
+static struct vfp_single vfp_single_default_qnan = {
+	.exponent	= 255,
+	.sign		= 0,
+	.significand	= VFP_SINGLE_SIGNIFICAND_QNAN,
+};
+
+static void vfp_single_dump(const char *str, struct vfp_single *s)
+{
+	pr_debug("VFP: %s: sign=%d exponent=%d significand=%08x\n",
+		 str, s->sign != 0, s->exponent, s->significand);
+}
+
+static void vfp_single_normalise_denormal(struct vfp_single *vs)
+{
+	int bits = 31 - fls(vs->significand);
+
+	vfp_single_dump("normalise_denormal: in", vs);
+
+	if (bits) {
+		vs->exponent -= bits - 1;
+		vs->significand <<= bits;
+	}
+
+	vfp_single_dump("normalise_denormal: out", vs);
+}
+
+#ifndef DEBUG
+#define vfp_single_normaliseround(sd,vsd,fpscr,except,func) __vfp_single_normaliseround(sd,vsd,fpscr,except)
+u32 __vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions)
+#else
+u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions, const char *func)
+#endif
+{
+	u32 significand, incr, rmode;
+	int exponent, shift, underflow;
+
+	vfp_single_dump("pack: in", vs);
+
+	/*
+	 * Infinities and NaNs are a special case.
+	 */
+	if (vs->exponent == 255 && (vs->significand == 0 || exceptions))
+		goto pack;
+
+	/*
+	 * Special-case zero.
+	 */
+	if (vs->significand == 0) {
+		vs->exponent = 0;
+		goto pack;
+	}
+
+	exponent = vs->exponent;
+	significand = vs->significand;
+
+	/*
+	 * Normalise first.  Note that we shift the significand up to
+	 * bit 31, so we have VFP_SINGLE_LOW_BITS + 1 below the least
+	 * significant bit.
+	 */
+	shift = 32 - fls(significand);
+	if (shift < 32 && shift) {
+		exponent -= shift;
+		significand <<= shift;
+	}
+
+#ifdef DEBUG
+	vs->exponent = exponent;
+	vs->significand = significand;
+	vfp_single_dump("pack: normalised", vs);
+#endif
+
+	/*
+	 * Tiny number?
+	 */
+	underflow = exponent < 0;
+	if (underflow) {
+		significand = vfp_shiftright32jamming(significand, -exponent);
+		exponent = 0;
+#ifdef DEBUG
+		vs->exponent = exponent;
+		vs->significand = significand;
+		vfp_single_dump("pack: tiny number", vs);
+#endif
+		if (!(significand & ((1 << (VFP_SINGLE_LOW_BITS + 1)) - 1)))
+			underflow = 0;
+	}
+
+	/*
+	 * Select rounding increment.
+	 */
+	incr = 0;
+	rmode = fpscr & FPSCR_RMODE_MASK;
+
+	if (rmode == FPSCR_ROUND_NEAREST) {
+		incr = 1 << VFP_SINGLE_LOW_BITS;
+		if ((significand & (1 << (VFP_SINGLE_LOW_BITS + 1))) == 0)
+			incr -= 1;
+	} else if (rmode == FPSCR_ROUND_TOZERO) {
+		incr = 0;
+	} else if ((rmode == FPSCR_ROUND_PLUSINF) ^ (vs->sign != 0))
+		incr = (1 << (VFP_SINGLE_LOW_BITS + 1)) - 1;
+
+	pr_debug("VFP: rounding increment = 0x%08x\n", incr);
+
+	/*
+	 * Is our rounding going to overflow?
+	 */
+	if ((significand + incr) < significand) {
+		exponent += 1;
+		significand = (significand >> 1) | (significand & 1);
+		incr >>= 1;
+#ifdef DEBUG
+		vs->exponent = exponent;
+		vs->significand = significand;
+		vfp_single_dump("pack: overflow", vs);
+#endif
+	}
+
+	/*
+	 * If any of the low bits (which will be shifted out of the
+	 * number) are non-zero, the result is inexact.
+	 */
+	if (significand & ((1 << (VFP_SINGLE_LOW_BITS + 1)) - 1))
+		exceptions |= FPSCR_IXC;
+
+	/*
+	 * Do our rounding.
+	 */
+	significand += incr;
+
+	/*
+	 * Infinity?
+	 */
+	if (exponent >= 254) {
+		exceptions |= FPSCR_OFC | FPSCR_IXC;
+		if (incr == 0) {
+			vs->exponent = 253;
+			vs->significand = 0x7fffffff;
+		} else {
+			vs->exponent = 255;		/* infinity */
+			vs->significand = 0;
+		}
+	} else {
+		if (significand >> (VFP_SINGLE_LOW_BITS + 1) == 0)
+			exponent = 0;
+		if (exponent || significand > 0x80000000)
+			underflow = 0;
+		if (underflow)
+			exceptions |= FPSCR_UFC;
+		vs->exponent = exponent;
+		vs->significand = significand >> 1;
+	}
+
+ pack:
+	vfp_single_dump("pack: final", vs);
+	{
+		s32 d = vfp_single_pack(vs);
+		pr_debug("VFP: %s: d(s%d)=%08x exceptions=%08x\n", func,
+			 sd, d, exceptions);
+		vfp_put_float(sd, d);
+	}
+
+	return exceptions;
+}
+
+/*
+ * Propagate the NaN, setting exceptions if it is signalling.
+ * 'n' is always a NaN.  'm' may be a number, NaN or infinity.
+ */
+static u32
+vfp_propagate_nan(struct vfp_single *vsd, struct vfp_single *vsn,
+		  struct vfp_single *vsm, u32 fpscr)
+{
+	struct vfp_single *nan;
+	int tn, tm = 0;
+
+	tn = vfp_single_type(vsn);
+
+	if (vsm)
+		tm = vfp_single_type(vsm);
+
+	if (fpscr & FPSCR_DEFAULT_NAN)
+		/*
+		 * Default NaN mode - always returns a quiet NaN
+		 */
+		nan = &vfp_single_default_qnan;
+	else {
+		/*
+		 * Contemporary mode - select the first signalling
+		 * NAN, or if neither are signalling, the first
+		 * quiet NAN.
+		 */
+		if (tn == VFP_SNAN || (tm != VFP_SNAN && tn == VFP_QNAN))
+			nan = vsn;
+		else
+			nan = vsm;
+		/*
+		 * Make the NaN quiet.
+		 */
+		nan->significand |= VFP_SINGLE_SIGNIFICAND_QNAN;
+	}
+
+	*vsd = *nan;
+
+	/*
+	 * If one was a signalling NAN, raise invalid operation.
+	 */
+	return tn == VFP_SNAN || tm == VFP_SNAN ? FPSCR_IOC : 0x100;
+}
+
+
+/*
+ * Extended operations
+ */
+static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr)
+{
+	vfp_put_float(sd, vfp_single_packed_abs(m));
+	return 0;
+}
+
+static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr)
+{
+	vfp_put_float(sd, m);
+	return 0;
+}
+
+static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr)
+{
+	vfp_put_float(sd, vfp_single_packed_negate(m));
+	return 0;
+}
+
+static const u16 sqrt_oddadjust[] = {
+	0x0004, 0x0022, 0x005d, 0x00b1, 0x011d, 0x019f, 0x0236, 0x02e0,
+	0x039c, 0x0468, 0x0545, 0x0631, 0x072b, 0x0832, 0x0946, 0x0a67
+};
+
+static const u16 sqrt_evenadjust[] = {
+	0x0a2d, 0x08af, 0x075a, 0x0629, 0x051a, 0x0429, 0x0356, 0x029e,
+	0x0200, 0x0179, 0x0109, 0x00af, 0x0068, 0x0034, 0x0012, 0x0002
+};
+
+u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand)
+{
+	int index;
+	u32 z, a;
+
+	if ((significand & 0xc0000000) != 0x40000000) {
+		printk(KERN_WARNING "VFP: estimate_sqrt: invalid significand\n");
+	}
+
+	a = significand << 1;
+	index = (a >> 27) & 15;
+	if (exponent & 1) {
+		z = 0x4000 + (a >> 17) - sqrt_oddadjust[index];
+		z = ((a / z) << 14) + (z << 15);
+		a >>= 1;
+	} else {
+		z = 0x8000 + (a >> 17) - sqrt_evenadjust[index];
+		z = a / z + z;
+		z = (z >= 0x20000) ? 0xffff8000 : (z << 15);
+		if (z <= a)
+			return (s32)a >> 1;
+	}
+	return (u32)(((u64)a << 31) / z) + (z >> 1);
+}
+
+static u32 vfp_single_fsqrt(int sd, int unused, s32 m, u32 fpscr)
+{
+	struct vfp_single vsm, vsd;
+	int ret, tm;
+
+	vfp_single_unpack(&vsm, m);
+	tm = vfp_single_type(&vsm);
+	if (tm & (VFP_NAN|VFP_INFINITY)) {
+		struct vfp_single *vsp = &vsd;
+
+		if (tm & VFP_NAN)
+			ret = vfp_propagate_nan(vsp, &vsm, NULL, fpscr);
+		else if (vsm.sign == 0) {
+ sqrt_copy:
+			vsp = &vsm;
+			ret = 0;
+		} else {
+ sqrt_invalid:
+			vsp = &vfp_single_default_qnan;
+			ret = FPSCR_IOC;
+		}
+		vfp_put_float(sd, vfp_single_pack(vsp));
+		return ret;
+	}
+
+	/*
+	 * sqrt(+/- 0) == +/- 0
+	 */
+	if (tm & VFP_ZERO)
+		goto sqrt_copy;
+
+	/*
+	 * Normalise a denormalised number
+	 */
+	if (tm & VFP_DENORMAL)
+		vfp_single_normalise_denormal(&vsm);
+
+	/*
+	 * sqrt(<0) = invalid
+	 */
+	if (vsm.sign)
+		goto sqrt_invalid;
+
+	vfp_single_dump("sqrt", &vsm);
+
+	/*
+	 * Estimate the square root.
+	 */
+	vsd.sign = 0;
+	vsd.exponent = ((vsm.exponent - 127) >> 1) + 127;
+	vsd.significand = vfp_estimate_sqrt_significand(vsm.exponent, vsm.significand) + 2;
+
+	vfp_single_dump("sqrt estimate", &vsd);
+
+	/*
+	 * And now adjust.
+	 */
+	if ((vsd.significand & VFP_SINGLE_LOW_BITS_MASK) <= 5) {
+		if (vsd.significand < 2) {
+			vsd.significand = 0xffffffff;
+		} else {
+			u64 term;
+			s64 rem;
+			vsm.significand <<= !(vsm.exponent & 1);
+			term = (u64)vsd.significand * vsd.significand;
+			rem = ((u64)vsm.significand << 32) - term;
+
+			pr_debug("VFP: term=%016llx rem=%016llx\n", term, rem);
+
+			while (rem < 0) {
+				vsd.significand -= 1;
+				rem += ((u64)vsd.significand << 1) | 1;
+			}
+			vsd.significand |= rem != 0;
+		}
+	}
+	vsd.significand = vfp_shiftright32jamming(vsd.significand, 1);
+
+	return vfp_single_normaliseround(sd, &vsd, fpscr, 0, "fsqrt");
+}
+
+/*
+ * Equal	:= ZC
+ * Less than	:= N
+ * Greater than	:= C
+ * Unordered	:= CV
+ */
+static u32 vfp_compare(int sd, int signal_on_qnan, s32 m, u32 fpscr)
+{
+	s32 d;
+	u32 ret = 0;
+
+	d = vfp_get_float(sd);
+	if (vfp_single_packed_exponent(m) == 255 && vfp_single_packed_mantissa(m)) {
+		ret |= FPSCR_C | FPSCR_V;
+		if (signal_on_qnan || !(vfp_single_packed_mantissa(m) & (1 << (VFP_SINGLE_MANTISSA_BITS - 1))))
+			/*
+			 * Signalling NaN, or signalling on quiet NaN
+			 */
+			ret |= FPSCR_IOC;
+	}
+
+	if (vfp_single_packed_exponent(d) == 255 && vfp_single_packed_mantissa(d)) {
+		ret |= FPSCR_C | FPSCR_V;
+		if (signal_on_qnan || !(vfp_single_packed_mantissa(d) & (1 << (VFP_SINGLE_MANTISSA_BITS - 1))))
+			/*
+			 * Signalling NaN, or signalling on quiet NaN
+			 */
+			ret |= FPSCR_IOC;
+	}
+
+	if (ret == 0) {
+		if (d == m || vfp_single_packed_abs(d | m) == 0) {
+			/*
+			 * equal
+			 */
+			ret |= FPSCR_Z | FPSCR_C;
+		} else if (vfp_single_packed_sign(d ^ m)) {
+			/*
+			 * different signs
+			 */
+			if (vfp_single_packed_sign(d))
+				/*
+				 * d is negative, so d < m
+				 */
+				ret |= FPSCR_N;
+			else
+				/*
+				 * d is positive, so d > m
+				 */
+				ret |= FPSCR_C;
+		} else if ((vfp_single_packed_sign(d) != 0) ^ (d < m)) {
+			/*
+			 * d < m
+			 */
+			ret |= FPSCR_N;
+		} else if ((vfp_single_packed_sign(d) != 0) ^ (d > m)) {
+			/*
+			 * d > m
+			 */
+			ret |= FPSCR_C;
+		}
+	}
+	return ret;
+}
+
+static u32 vfp_single_fcmp(int sd, int unused, s32 m, u32 fpscr)
+{
+	return vfp_compare(sd, 0, m, fpscr);
+}
+
+static u32 vfp_single_fcmpe(int sd, int unused, s32 m, u32 fpscr)
+{
+	return vfp_compare(sd, 1, m, fpscr);
+}
+
+static u32 vfp_single_fcmpz(int sd, int unused, s32 m, u32 fpscr)
+{
+	return vfp_compare(sd, 0, 0, fpscr);
+}
+
+static u32 vfp_single_fcmpez(int sd, int unused, s32 m, u32 fpscr)
+{
+	return vfp_compare(sd, 1, 0, fpscr);
+}
+
+static u32 vfp_single_fcvtd(int dd, int unused, s32 m, u32 fpscr)
+{
+	struct vfp_single vsm;
+	struct vfp_double vdd;
+	int tm;
+	u32 exceptions = 0;
+
+	vfp_single_unpack(&vsm, m);
+
+	tm = vfp_single_type(&vsm);
+
+	/*
+	 * If we have a signalling NaN, signal invalid operation.
+	 */
+	if (tm == VFP_SNAN)
+		exceptions = FPSCR_IOC;
+
+	if (tm & VFP_DENORMAL)
+		vfp_single_normalise_denormal(&vsm);
+
+	vdd.sign = vsm.sign;
+	vdd.significand = (u64)vsm.significand << 32;
+
+	/*
+	 * If we have an infinity or NaN, the exponent must be 2047.
+	 */
+	if (tm & (VFP_INFINITY|VFP_NAN)) {
+		vdd.exponent = 2047;
+		if (tm & VFP_NAN)
+			vdd.significand |= VFP_DOUBLE_SIGNIFICAND_QNAN;
+		goto pack_nan;
+	} else if (tm & VFP_ZERO)
+		vdd.exponent = 0;
+	else
+		vdd.exponent = vsm.exponent + (1023 - 127);
+
+	/*
+	 * Technically, if bit 0 of dd is set, this is an invalid
+	 * instruction.  However, we ignore this for efficiency.
+	 */
+	return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fcvtd");
+
+ pack_nan:
+	vfp_put_double(dd, vfp_double_pack(&vdd));
+	return exceptions;
+}
+
+static u32 vfp_single_fuito(int sd, int unused, s32 m, u32 fpscr)
+{
+	struct vfp_single vs;
+
+	vs.sign = 0;
+	vs.exponent = 127 + 31 - 1;
+	vs.significand = (u32)m;
+
+	return vfp_single_normaliseround(sd, &vs, fpscr, 0, "fuito");
+}
+
+static u32 vfp_single_fsito(int sd, int unused, s32 m, u32 fpscr)
+{
+	struct vfp_single vs;
+
+	vs.sign = (m & 0x80000000) >> 16;
+	vs.exponent = 127 + 31 - 1;
+	vs.significand = vs.sign ? -m : m;
+
+	return vfp_single_normaliseround(sd, &vs, fpscr, 0, "fsito");
+}
+
+static u32 vfp_single_ftoui(int sd, int unused, s32 m, u32 fpscr)
+{
+	struct vfp_single vsm;
+	u32 d, exceptions = 0;
+	int rmode = fpscr & FPSCR_RMODE_MASK;
+	int tm;
+
+	vfp_single_unpack(&vsm, m);
+	vfp_single_dump("VSM", &vsm);
+
+	/*
+	 * Do we have a denormalised number?
+	 */
+	tm = vfp_single_type(&vsm);
+	if (tm & VFP_DENORMAL)
+		exceptions |= FPSCR_IDC;
+
+	if (tm & VFP_NAN)
+		vsm.sign = 0;
+
+	if (vsm.exponent >= 127 + 32) {
+		d = vsm.sign ? 0 : 0xffffffff;
+		exceptions = FPSCR_IOC;
+	} else if (vsm.exponent >= 127 - 1) {
+		int shift = 127 + 31 - vsm.exponent;
+		u32 rem, incr = 0;
+
+		/*
+		 * 2^0 <= m < 2^32-2^8
+		 */
+		d = (vsm.significand << 1) >> shift;
+		rem = vsm.significand << (33 - shift);
+
+		if (rmode == FPSCR_ROUND_NEAREST) {
+			incr = 0x80000000;
+			if ((d & 1) == 0)
+				incr -= 1;
+		} else if (rmode == FPSCR_ROUND_TOZERO) {
+			incr = 0;
+		} else if ((rmode == FPSCR_ROUND_PLUSINF) ^ (vsm.sign != 0)) {
+			incr = ~0;
+		}
+
+		if ((rem + incr) < rem) {
+			if (d < 0xffffffff)
+				d += 1;
+			else
+				exceptions |= FPSCR_IOC;
+		}
+
+		if (d && vsm.sign) {
+			d = 0;
+			exceptions |= FPSCR_IOC;
+		} else if (rem)
+			exceptions |= FPSCR_IXC;
+	} else {
+		d = 0;
+		if (vsm.exponent | vsm.significand) {
+			exceptions |= FPSCR_IXC;
+			if (rmode == FPSCR_ROUND_PLUSINF && vsm.sign == 0)
+				d = 1;
+			else if (rmode == FPSCR_ROUND_MINUSINF && vsm.sign) {
+				d = 0;
+				exceptions |= FPSCR_IOC;
+			}
+		}
+	}
+
+	pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
+
+	vfp_put_float(sd, d);
+
+	return exceptions;
+}
+
+static u32 vfp_single_ftouiz(int sd, int unused, s32 m, u32 fpscr)
+{
+	return vfp_single_ftoui(sd, unused, m, FPSCR_ROUND_TOZERO);
+}
+
+static u32 vfp_single_ftosi(int sd, int unused, s32 m, u32 fpscr)
+{
+	struct vfp_single vsm;
+	u32 d, exceptions = 0;
+	int rmode = fpscr & FPSCR_RMODE_MASK;
+
+	vfp_single_unpack(&vsm, m);
+	vfp_single_dump("VSM", &vsm);
+
+	/*
+	 * Do we have a denormalised number?
+	 */
+	if (vfp_single_type(&vsm) & VFP_DENORMAL)
+		exceptions |= FPSCR_IDC;
+
+	if (vsm.exponent >= 127 + 32) {
+		/*
+		 * m >= 2^31-2^7: invalid
+		 */
+		d = 0x7fffffff;
+		if (vsm.sign)
+			d = ~d;
+		exceptions |= FPSCR_IOC;
+	} else if (vsm.exponent >= 127 - 1) {
+		int shift = 127 + 31 - vsm.exponent;
+		u32 rem, incr = 0;
+
+		/* 2^0 <= m <= 2^31-2^7 */
+		d = (vsm.significand << 1) >> shift;
+		rem = vsm.significand << (33 - shift);
+
+		if (rmode == FPSCR_ROUND_NEAREST) {
+			incr = 0x80000000;
+			if ((d & 1) == 0)
+				incr -= 1;
+		} else if (rmode == FPSCR_ROUND_TOZERO) {
+			incr = 0;
+		} else if ((rmode == FPSCR_ROUND_PLUSINF) ^ (vsm.sign != 0)) {
+			incr = ~0;
+		}
+
+		if ((rem + incr) < rem && d < 0xffffffff)
+			d += 1;
+		if (d > 0x7fffffff + (vsm.sign != 0)) {
+			d = 0x7fffffff + (vsm.sign != 0);
+			exceptions |= FPSCR_IOC;
+		} else if (rem)
+			exceptions |= FPSCR_IXC;
+
+		if (vsm.sign)
+			d = -d;
+	} else {
+		d = 0;
+		if (vsm.exponent | vsm.significand) {
+			exceptions |= FPSCR_IXC;
+			if (rmode == FPSCR_ROUND_PLUSINF && vsm.sign == 0)
+				d = 1;
+			else if (rmode == FPSCR_ROUND_MINUSINF && vsm.sign)
+				d = -1;
+		}
+	}
+
+	pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
+
+	vfp_put_float(sd, (s32)d);
+
+	return exceptions;
+}
+
+static u32 vfp_single_ftosiz(int sd, int unused, s32 m, u32 fpscr)
+{
+	return vfp_single_ftosi(sd, unused, m, FPSCR_ROUND_TOZERO);
+}
+
+static u32 (* const fop_extfns[32])(int sd, int unused, s32 m, u32 fpscr) = {
+	[FEXT_TO_IDX(FEXT_FCPY)]	= vfp_single_fcpy,
+	[FEXT_TO_IDX(FEXT_FABS)]	= vfp_single_fabs,
+	[FEXT_TO_IDX(FEXT_FNEG)]	= vfp_single_fneg,
+	[FEXT_TO_IDX(FEXT_FSQRT)]	= vfp_single_fsqrt,
+	[FEXT_TO_IDX(FEXT_FCMP)]	= vfp_single_fcmp,
+	[FEXT_TO_IDX(FEXT_FCMPE)]	= vfp_single_fcmpe,
+	[FEXT_TO_IDX(FEXT_FCMPZ)]	= vfp_single_fcmpz,
+	[FEXT_TO_IDX(FEXT_FCMPEZ)]	= vfp_single_fcmpez,
+	[FEXT_TO_IDX(FEXT_FCVT)]	= vfp_single_fcvtd,
+	[FEXT_TO_IDX(FEXT_FUITO)]	= vfp_single_fuito,
+	[FEXT_TO_IDX(FEXT_FSITO)]	= vfp_single_fsito,
+	[FEXT_TO_IDX(FEXT_FTOUI)]	= vfp_single_ftoui,
+	[FEXT_TO_IDX(FEXT_FTOUIZ)]	= vfp_single_ftouiz,
+	[FEXT_TO_IDX(FEXT_FTOSI)]	= vfp_single_ftosi,
+	[FEXT_TO_IDX(FEXT_FTOSIZ)]	= vfp_single_ftosiz,
+};
+
+
+
+
+
+static u32
+vfp_single_fadd_nonnumber(struct vfp_single *vsd, struct vfp_single *vsn,
+			  struct vfp_single *vsm, u32 fpscr)
+{
+	struct vfp_single *vsp;
+	u32 exceptions = 0;
+	int tn, tm;
+
+	tn = vfp_single_type(vsn);
+	tm = vfp_single_type(vsm);
+
+	if (tn & tm & VFP_INFINITY) {
+		/*
+		 * Two infinities.  Are they different signs?
+		 */
+		if (vsn->sign ^ vsm->sign) {
+			/*
+			 * different signs -> invalid
+			 */
+			exceptions = FPSCR_IOC;
+			vsp = &vfp_single_default_qnan;
+		} else {
+			/*
+			 * same signs -> valid
+			 */
+			vsp = vsn;
+		}
+	} else if (tn & VFP_INFINITY && tm & VFP_NUMBER) {
+		/*
+		 * One infinity and one number -> infinity
+		 */
+		vsp = vsn;
+	} else {
+		/*
+		 * 'n' is a NaN of some type
+		 */
+		return vfp_propagate_nan(vsd, vsn, vsm, fpscr);
+	}
+	*vsd = *vsp;
+	return exceptions;
+}
+
+static u32
+vfp_single_add(struct vfp_single *vsd, struct vfp_single *vsn,
+	       struct vfp_single *vsm, u32 fpscr)
+{
+	u32 exp_diff, m_sig;
+
+	if (vsn->significand & 0x80000000 ||
+	    vsm->significand & 0x80000000) {
+		pr_info("VFP: bad FP values in %s\n", __func__);
+		vfp_single_dump("VSN", vsn);
+		vfp_single_dump("VSM", vsm);
+	}
+
+	/*
+	 * Ensure that 'n' is the largest magnitude number.  Note that
+	 * if 'n' and 'm' have equal exponents, we do not swap them.
+	 * This ensures that NaN propagation works correctly.
+	 */
+	if (vsn->exponent < vsm->exponent) {
+		struct vfp_single *t = vsn;
+		vsn = vsm;
+		vsm = t;
+	}
+
+	/*
+	 * Is 'n' an infinity or a NaN?  Note that 'm' may be a number,
+	 * infinity or a NaN here.
+	 */
+	if (vsn->exponent == 255)
+		return vfp_single_fadd_nonnumber(vsd, vsn, vsm, fpscr);
+
+	/*
+	 * We have two proper numbers, where 'vsn' is the larger magnitude.
+	 *
+	 * Copy 'n' to 'd' before doing the arithmetic.
+	 */
+	*vsd = *vsn;
+
+	/*
+	 * Align both numbers.
+	 */
+	exp_diff = vsn->exponent - vsm->exponent;
+	m_sig = vfp_shiftright32jamming(vsm->significand, exp_diff);
+
+	/*
+	 * If the signs are different, we are really subtracting.
+	 */
+	if (vsn->sign ^ vsm->sign) {
+		m_sig = vsn->significand - m_sig;
+		if ((s32)m_sig < 0) {
+			vsd->sign = vfp_sign_negate(vsd->sign);
+			m_sig = -m_sig;
+		} else if (m_sig == 0) {
+			vsd->sign = (fpscr & FPSCR_RMODE_MASK) ==
+				      FPSCR_ROUND_MINUSINF ? 0x8000 : 0;
+		}
+	} else {
+		m_sig = vsn->significand + m_sig;
+	}
+	vsd->significand = m_sig;
+
+	return 0;
+}
+
+static u32
+vfp_single_multiply(struct vfp_single *vsd, struct vfp_single *vsn, struct vfp_single *vsm, u32 fpscr)
+{
+	vfp_single_dump("VSN", vsn);
+	vfp_single_dump("VSM", vsm);
+
+	/*
+	 * Ensure that 'n' is the largest magnitude number.  Note that
+	 * if 'n' and 'm' have equal exponents, we do not swap them.
+	 * This ensures that NaN propagation works correctly.
+	 */
+	if (vsn->exponent < vsm->exponent) {
+		struct vfp_single *t = vsn;
+		vsn = vsm;
+		vsm = t;
+		pr_debug("VFP: swapping M <-> N\n");
+	}
+
+	vsd->sign = vsn->sign ^ vsm->sign;
+
+	/*
+	 * If 'n' is an infinity or NaN, handle it.  'm' may be anything.
+	 */
+	if (vsn->exponent == 255) {
+		if (vsn->significand || (vsm->exponent == 255 && vsm->significand))
+			return vfp_propagate_nan(vsd, vsn, vsm, fpscr);
+		if ((vsm->exponent | vsm->significand) == 0) {
+			*vsd = vfp_single_default_qnan;
+			return FPSCR_IOC;
+		}
+		vsd->exponent = vsn->exponent;
+		vsd->significand = 0;
+		return 0;
+	}
+
+	/*
+	 * If 'm' is zero, the result is always zero.  In this case,
+	 * 'n' may be zero or a number, but it doesn't matter which.
+	 */
+	if ((vsm->exponent | vsm->significand) == 0) {
+		vsd->exponent = 0;
+		vsd->significand = 0;
+		return 0;
+	}
+
+	/*
+	 * We add 2 to the destination exponent for the same reason as
+	 * the addition case - though this time we have +1 from each
+	 * input operand.
+	 */
+	vsd->exponent = vsn->exponent + vsm->exponent - 127 + 2;
+	vsd->significand = vfp_hi64to32jamming((u64)vsn->significand * vsm->significand);
+
+	vfp_single_dump("VSD", vsd);
+	return 0;
+}
+
+#define NEG_MULTIPLY	(1 << 0)
+#define NEG_SUBTRACT	(1 << 1)
+
+static u32
+vfp_single_multiply_accumulate(int sd, int sn, s32 m, u32 fpscr, u32 negate, char *func)
+{
+	struct vfp_single vsd, vsp, vsn, vsm;
+	u32 exceptions;
+	s32 v;
+
+	v = vfp_get_float(sn);
+	pr_debug("VFP: s%u = %08x\n", sn, v);
+	vfp_single_unpack(&vsn, v);
+	if (vsn.exponent == 0 && vsn.significand)
+		vfp_single_normalise_denormal(&vsn);
+
+	vfp_single_unpack(&vsm, m);
+	if (vsm.exponent == 0 && vsm.significand)
+		vfp_single_normalise_denormal(&vsm);
+
+	exceptions = vfp_single_multiply(&vsp, &vsn, &vsm, fpscr);
+	if (negate & NEG_MULTIPLY)
+		vsp.sign = vfp_sign_negate(vsp.sign);
+
+	v = vfp_get_float(sd);
+	pr_debug("VFP: s%u = %08x\n", sd, v);
+	vfp_single_unpack(&vsn, v);
+	if (negate & NEG_SUBTRACT)
+		vsn.sign = vfp_sign_negate(vsn.sign);
+
+	exceptions |= vfp_single_add(&vsd, &vsn, &vsp, fpscr);
+
+	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, func);
+}
+
+/*
+ * Standard operations
+ */
+
+/*
+ * sd = sd + (sn * sm)
+ */
+static u32 vfp_single_fmac(int sd, int sn, s32 m, u32 fpscr)
+{
+	return vfp_single_multiply_accumulate(sd, sn, m, fpscr, 0, "fmac");
+}
+
+/*
+ * sd = sd - (sn * sm)
+ */
+static u32 vfp_single_fnmac(int sd, int sn, s32 m, u32 fpscr)
+{
+	return vfp_single_multiply_accumulate(sd, sn, m, fpscr, NEG_MULTIPLY, "fnmac");
+}
+
+/*
+ * sd = -sd + (sn * sm)
+ */
+static u32 vfp_single_fmsc(int sd, int sn, s32 m, u32 fpscr)
+{
+	return vfp_single_multiply_accumulate(sd, sn, m, fpscr, NEG_SUBTRACT, "fmsc");
+}
+
+/*
+ * sd = -sd - (sn * sm)
+ */
+static u32 vfp_single_fnmsc(int sd, int sn, s32 m, u32 fpscr)
+{
+	return vfp_single_multiply_accumulate(sd, sn, m, fpscr, NEG_SUBTRACT | NEG_MULTIPLY, "fnmsc");
+}
+
+/*
+ * sd = sn * sm
+ */
+static u32 vfp_single_fmul(int sd, int sn, s32 m, u32 fpscr)
+{
+	struct vfp_single vsd, vsn, vsm;
+	u32 exceptions;
+	s32 n = vfp_get_float(sn);
+
+	pr_debug("VFP: s%u = %08x\n", sn, n);
+
+	vfp_single_unpack(&vsn, n);
+	if (vsn.exponent == 0 && vsn.significand)
+		vfp_single_normalise_denormal(&vsn);
+
+	vfp_single_unpack(&vsm, m);
+	if (vsm.exponent == 0 && vsm.significand)
+		vfp_single_normalise_denormal(&vsm);
+
+	exceptions = vfp_single_multiply(&vsd, &vsn, &vsm, fpscr);
+	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fmul");
+}
+
+/*
+ * sd = -(sn * sm)
+ */
+static u32 vfp_single_fnmul(int sd, int sn, s32 m, u32 fpscr)
+{
+	struct vfp_single vsd, vsn, vsm;
+	u32 exceptions;
+	s32 n = vfp_get_float(sn);
+
+	pr_debug("VFP: s%u = %08x\n", sn, n);
+
+	vfp_single_unpack(&vsn, n);
+	if (vsn.exponent == 0 && vsn.significand)
+		vfp_single_normalise_denormal(&vsn);
+
+	vfp_single_unpack(&vsm, m);
+	if (vsm.exponent == 0 && vsm.significand)
+		vfp_single_normalise_denormal(&vsm);
+
+	exceptions = vfp_single_multiply(&vsd, &vsn, &vsm, fpscr);
+	vsd.sign = vfp_sign_negate(vsd.sign);
+	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fnmul");
+}
+
+/*
+ * sd = sn + sm
+ */
+static u32 vfp_single_fadd(int sd, int sn, s32 m, u32 fpscr)
+{
+	struct vfp_single vsd, vsn, vsm;
+	u32 exceptions;
+	s32 n = vfp_get_float(sn);
+
+	pr_debug("VFP: s%u = %08x\n", sn, n);
+
+	/*
+	 * Unpack and normalise denormals.
+	 */
+	vfp_single_unpack(&vsn, n);
+	if (vsn.exponent == 0 && vsn.significand)
+		vfp_single_normalise_denormal(&vsn);
+
+	vfp_single_unpack(&vsm, m);
+	if (vsm.exponent == 0 && vsm.significand)
+		vfp_single_normalise_denormal(&vsm);
+
+	exceptions = vfp_single_add(&vsd, &vsn, &vsm, fpscr);
+
+	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fadd");
+}
+
+/*
+ * sd = sn - sm
+ */
+static u32 vfp_single_fsub(int sd, int sn, s32 m, u32 fpscr)
+{
+	/*
+	 * Subtraction is addition with one sign inverted.
+	 */
+	return vfp_single_fadd(sd, sn, vfp_single_packed_negate(m), fpscr);
+}
+
+/*
+ * sd = sn / sm
+ */
+static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr)
+{
+	struct vfp_single vsd, vsn, vsm;
+	u32 exceptions = 0;
+	s32 n = vfp_get_float(sn);
+	int tm, tn;
+
+	pr_debug("VFP: s%u = %08x\n", sn, n);
+
+	vfp_single_unpack(&vsn, n);
+	vfp_single_unpack(&vsm, m);
+
+	vsd.sign = vsn.sign ^ vsm.sign;
+
+	tn = vfp_single_type(&vsn);
+	tm = vfp_single_type(&vsm);
+
+	/*
+	 * Is n a NAN?
+	 */
+	if (tn & VFP_NAN)
+		goto vsn_nan;
+
+	/*
+	 * Is m a NAN?
+	 */
+	if (tm & VFP_NAN)
+		goto vsm_nan;
+
+	/*
+	 * If n and m are infinity, the result is invalid
+	 * If n and m are zero, the result is invalid
+	 */
+	if (tm & tn & (VFP_INFINITY|VFP_ZERO))
+		goto invalid;
+
+	/*
+	 * If n is infinity, the result is infinity
+	 */
+	if (tn & VFP_INFINITY)
+		goto infinity;
+
+	/*
+	 * If m is zero, raise div0 exception
+	 */
+	if (tm & VFP_ZERO)
+		goto divzero;
+
+	/*
+	 * If m is infinity, or n is zero, the result is zero
+	 */
+	if (tm & VFP_INFINITY || tn & VFP_ZERO)
+		goto zero;
+
+	if (tn & VFP_DENORMAL)
+		vfp_single_normalise_denormal(&vsn);
+	if (tm & VFP_DENORMAL)
+		vfp_single_normalise_denormal(&vsm);
+
+	/*
+	 * Ok, we have two numbers, we can perform division.
+	 */
+	vsd.exponent = vsn.exponent - vsm.exponent + 127 - 1;
+	vsm.significand <<= 1;
+	if (vsm.significand <= (2 * vsn.significand)) {
+		vsn.significand >>= 1;
+		vsd.exponent++;
+	}
+	vsd.significand = ((u64)vsn.significand << 32) / vsm.significand;
+	if ((vsd.significand & 0x3f) == 0)
+		vsd.significand |= ((u64)vsm.significand * vsd.significand != (u64)vsn.significand << 32);
+
+	return vfp_single_normaliseround(sd, &vsd, fpscr, 0, "fdiv");
+
+ vsn_nan:
+	exceptions = vfp_propagate_nan(&vsd, &vsn, &vsm, fpscr);
+ pack:
+	vfp_put_float(sd, vfp_single_pack(&vsd));
+	return exceptions;
+
+ vsm_nan:
+	exceptions = vfp_propagate_nan(&vsd, &vsm, &vsn, fpscr);
+	goto pack;
+
+ zero:
+	vsd.exponent = 0;
+	vsd.significand = 0;
+	goto pack;
+
+ divzero:
+	exceptions = FPSCR_DZC;
+ infinity:
+	vsd.exponent = 255;
+	vsd.significand = 0;
+	goto pack;
+
+ invalid:
+	vfp_put_float(sd, vfp_single_pack(&vfp_single_default_qnan));
+	return FPSCR_IOC;
+}
+
+static u32 (* const fop_fns[16])(int sd, int sn, s32 m, u32 fpscr) = {
+	[FOP_TO_IDX(FOP_FMAC)]	= vfp_single_fmac,
+	[FOP_TO_IDX(FOP_FNMAC)]	= vfp_single_fnmac,
+	[FOP_TO_IDX(FOP_FMSC)]	= vfp_single_fmsc,
+	[FOP_TO_IDX(FOP_FNMSC)]	= vfp_single_fnmsc,
+	[FOP_TO_IDX(FOP_FMUL)]	= vfp_single_fmul,
+	[FOP_TO_IDX(FOP_FNMUL)]	= vfp_single_fnmul,
+	[FOP_TO_IDX(FOP_FADD)]	= vfp_single_fadd,
+	[FOP_TO_IDX(FOP_FSUB)]	= vfp_single_fsub,
+	[FOP_TO_IDX(FOP_FDIV)]	= vfp_single_fdiv,
+};
+
+#define FREG_BANK(x)	((x) & 0x18)
+#define FREG_IDX(x)	((x) & 7)
+
+u32 vfp_single_cpdo(u32 inst, u32 fpscr)
+{
+	u32 op = inst & FOP_MASK;
+	u32 exceptions = 0;
+	unsigned int sd = vfp_get_sd(inst);
+	unsigned int sn = vfp_get_sn(inst);
+	unsigned int sm = vfp_get_sm(inst);
+	unsigned int vecitr, veclen, vecstride;
+	u32 (*fop)(int, int, s32, u32);
+
+	veclen = fpscr & FPSCR_LENGTH_MASK;
+	vecstride = 1 + ((fpscr & FPSCR_STRIDE_MASK) == FPSCR_STRIDE_MASK);
+
+	/*
+	 * If destination bank is zero, vector length is always '1'.
+	 * ARM DDI0100F C5.1.3, C5.3.2.
+	 */
+	if (FREG_BANK(sd) == 0)
+		veclen = 0;
+
+	pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride,
+		 (veclen >> FPSCR_LENGTH_BIT) + 1);
+
+	fop = (op == FOP_EXT) ? fop_extfns[sn] : fop_fns[FOP_TO_IDX(op)];
+	if (!fop)
+		goto invalid;
+
+	for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) {
+		s32 m = vfp_get_float(sm);
+		u32 except;
+
+		if (op == FOP_EXT)
+			pr_debug("VFP: itr%d (s%u) = op[%u] (s%u=%08x)\n",
+				 vecitr >> FPSCR_LENGTH_BIT, sd, sn, sm, m);
+		else
+			pr_debug("VFP: itr%d (s%u) = (s%u) op[%u] (s%u=%08x)\n",
+				 vecitr >> FPSCR_LENGTH_BIT, sd, sn,
+				 FOP_TO_IDX(op), sm, m);
+
+		except = fop(sd, sn, m, fpscr);
+		pr_debug("VFP: itr%d: exceptions=%08x\n",
+			 vecitr >> FPSCR_LENGTH_BIT, except);
+
+		exceptions |= except;
+
+		/*
+		 * This ensures that comparisons only operate on scalars;
+		 * comparisons always return with one FPSCR status bit set.
+		 */
+		if (except & (FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V))
+			break;
+
+		/*
+		 * CHECK: It appears to be undefined whether we stop when
+		 * we encounter an exception.  We continue.
+		 */
+
+		sd = FREG_BANK(sd) + ((FREG_IDX(sd) + vecstride) & 7);
+		sn = FREG_BANK(sn) + ((FREG_IDX(sn) + vecstride) & 7);
+		if (FREG_BANK(sm) != 0)
+			sm = FREG_BANK(sm) + ((FREG_IDX(sm) + vecstride) & 7);
+	}
+	return exceptions;
+
+ invalid:
+	return (u32)-1;
+}
--- diff/arch/i386/kernel/kgdb_stub.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/i386/kernel/kgdb_stub.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,2454 @@
+/*
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * General Public License for more details.
+ *
+ */
+
+/*
+ * Copyright (c) 2000 VERITAS Software Corporation.
+ *
+ */
+/****************************************************************************
+ *  Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
+ *
+ *  Module name: remcom.c $
+ *  Revision: 1.34 $
+ *  Date: 91/03/09 12:29:49 $
+ *  Contributor:     Lake Stevens Instrument Division$
+ *
+ *  Description:     low level support for gdb debugger. $
+ *
+ *  Considerations:  only works on target hardware $
+ *
+ *  Written by:	     Glenn Engel $
+ *  Updated by:	     David Grothe <dave@gcom.com>
+ *  Updated by:	     Robert Walsh <rjwalsh@durables.org>
+ *  Updated by:	     wangdi <wangdi@clusterfs.com>
+ *  ModuleState:     Experimental $
+ *
+ *  NOTES:	     See Below $
+ *
+ *  Modified for 386 by Jim Kingdon, Cygnus Support.
+ *  Compatibility with 2.1.xx kernel by David Grothe <dave@gcom.com>
+ *
+ *  Changes to allow auto initilization.  All that is needed is that it
+ *  be linked with the kernel and a break point (int 3) be executed.
+ *  The header file <asm/kgdb.h> defines BREAKPOINT to allow one to do
+ *  this. It should also be possible, once the interrupt system is up, to
+ *  call putDebugChar("+").  Once this is done, the remote debugger should
+ *  get our attention by sending a ^C in a packet. George Anzinger
+ *  <george@mvista.com>
+ *  Integrated into 2.2.5 kernel by Tigran Aivazian <tigran@sco.com>
+ *  Added thread support, support for multiple processors,
+ *	support for ia-32(x86) hardware debugging.
+ *	Amit S. Kale ( akale@veritas.com )
+ *
+ *  Modified to support debugging over ethernet by Robert Walsh
+ *  <rjwalsh@durables.org> and wangdi <wangdi@clusterfs.com>, based on
+ *  code by San Mehat.
+ *
+ *
+ *  To enable debugger support, two things need to happen.  One, a
+ *  call to set_debug_traps() is necessary in order to allow any breakpoints
+ *  or error conditions to be properly intercepted and reported to gdb.
+ *  Two, a breakpoint needs to be generated to begin communication.  This
+ *  is most easily accomplished by a call to breakpoint().  Breakpoint()
+ *  simulates a breakpoint by executing an int 3.
+ *
+ *************
+ *
+ *    The following gdb commands are supported:
+ *
+ * command	    function				   Return value
+ *
+ *    g		    return the value of the CPU registers  hex data or ENN
+ *    G		    set the value of the CPU registers	   OK or ENN
+ *
+ *    mAA..AA,LLLL  Read LLLL bytes at address AA..AA	   hex data or ENN
+ *    MAA..AA,LLLL: Write LLLL bytes at address AA.AA	   OK or ENN
+ *
+ *    c		    Resume at current address		   SNN	 ( signal NN)
+ *    cAA..AA	    Continue at address AA..AA		   SNN
+ *
+ *    s		    Step one instruction		   SNN
+ *    sAA..AA	    Step one instruction from AA..AA	   SNN
+ *
+ *    k		    kill
+ *
+ *    ?		    What was the last sigval ?		   SNN	 (signal NN)
+ *
+ * All commands and responses are sent with a packet which includes a
+ * checksum.  A packet consists of
+ *
+ * $<packet info>#<checksum>.
+ *
+ * where
+ * <packet info> :: <characters representing the command or response>
+ * <checksum>	 :: < two hex digits computed as modulo 256 sum of <packetinfo>>
+ *
+ * When a packet is received, it is first acknowledged with either '+' or '-'.
+ * '+' indicates a successful transfer.	 '-' indicates a failed transfer.
+ *
+ * Example:
+ *
+ * Host:		  Reply:
+ * $m0,10#2a		   +$00010203040506070809101112131415#42
+ *
+ ****************************************************************************/
+#define KGDB_VERSION "<20030915.1651.33>"
+#include <linux/config.h>
+#include <linux/types.h>
+#include <asm/string.h>		/* for strcpy */
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <asm/vm86.h>
+#include <asm/system.h>
+#include <asm/ptrace.h>		/* for linux pt_regs struct */
+#include <asm/kgdb_local.h>
+#include <linux/list.h>
+#include <asm/atomic.h>
+#include <asm/processor.h>
+#include <linux/irq.h>
+#include <asm/desc.h>
+#include <linux/inet.h>
+#include <linux/netpoll.h>
+
+/************************************************************************
+ *
+ * external low-level support routines
+ */
+typedef void (*Function) (void);	/* pointer to a function */
+
+/* Thread reference */
+typedef unsigned char threadref[8];
+
+extern int tty_putDebugChar(int);     /* write a single character      */
+extern int tty_getDebugChar(void);    /* read and return a single char */
+extern void tty_flushDebugChar(void); /* flush pending characters      */
+extern int eth_putDebugChar(int);     /* write a single character      */
+extern int eth_getDebugChar(void);    /* read and return a single char */
+extern void eth_flushDebugChar(void); /* flush pending characters      */
+
+/************************************************************************/
+/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
+/* at least NUMREGBYTES*2 are needed for register packets */
+/* Longer buffer is needed to list all threads */
+#define BUFMAX 400
+
+char *kgdb_version = KGDB_VERSION;
+
+/*  debug >  0 prints ill-formed commands in valid packets & checksum errors */
+int debug_regs = 0;		/* set to non-zero to print registers */
+
+/* filled in by an external module */
+char *gdb_module_offsets;
+
+static const char hexchars[] = "0123456789abcdef";
+
+/* Number of bytes of registers.  */
+#define NUMREGBYTES 64
+/*
+ * Note that this register image is in a different order than
+ * the register image that Linux produces at interrupt time.
+ *
+ * Linux's register image is defined by struct pt_regs in ptrace.h.
+ * Just why GDB uses a different order is a historical mystery.
+ */
+enum regnames { _EAX,		/* 0 */
+	_ECX,			/* 1 */
+	_EDX,			/* 2 */
+	_EBX,			/* 3 */
+	_ESP,			/* 4 */
+	_EBP,			/* 5 */
+	_ESI,			/* 6 */
+	_EDI,			/* 7 */
+	_PC /* 8 also known as eip */ ,
+	_PS /* 9 also known as eflags */ ,
+	_CS,			/* 10 */
+	_SS,			/* 11 */
+	_DS,			/* 12 */
+	_ES,			/* 13 */
+	_FS,			/* 14 */
+	_GS			/* 15 */
+};
+
+/***************************  ASSEMBLY CODE MACROS *************************/
+/*
+ * Put the error code here just in case the user cares.
+ * Likewise, the vector number here (since GDB only gets the signal
+ * number through the usual means, and that's not very specific).
+ * The called_from is the return address so he can tell how we entered kgdb.
+ * This will allow him to seperate out the various possible entries.
+ */
+#define REMOTE_DEBUG 0		/* set != to turn on printing (also available in info) */
+
+#define PID_MAX PID_MAX_DEFAULT
+
+#ifdef CONFIG_SMP
+void smp_send_nmi_allbutself(void);
+#define IF_SMP(x) x
+#undef MAX_NO_CPUS
+#ifndef CONFIG_NO_KGDB_CPUS
+#define CONFIG_NO_KGDB_CPUS 2
+#endif
+#if CONFIG_NO_KGDB_CPUS > NR_CPUS
+#define MAX_NO_CPUS NR_CPUS
+#else
+#define MAX_NO_CPUS CONFIG_NO_KGDB_CPUS
+#endif
+#define hold_init hold_on_sstep: 1,
+#define MAX_CPU_MASK (unsigned long)((1LL << MAX_NO_CPUS) - 1LL)
+#define NUM_CPUS num_online_cpus()
+#else
+#define IF_SMP(x)
+#define hold_init
+#undef MAX_NO_CPUS
+#define MAX_NO_CPUS 1
+#define NUM_CPUS 1
+#endif
+#define NOCPU (struct task_struct *)0xbad1fbad
+/* *INDENT-OFF*	 */
+struct kgdb_info {
+	int used_malloc;
+	void *called_from;
+	long long entry_tsc;
+	int errcode;
+	int vector;
+	int print_debug_info;
+#ifdef CONFIG_SMP
+	int hold_on_sstep;
+	struct {
+		volatile struct task_struct *task;
+		int pid;
+		int hold;
+		struct pt_regs *regs;
+	} cpus_waiting[MAX_NO_CPUS];
+#endif
+} kgdb_info = {hold_init print_debug_info:REMOTE_DEBUG, vector:-1};
+
+/* *INDENT-ON*	*/
+
+#define used_m kgdb_info.used_malloc
+/*
+ * This is little area we set aside to contain the stack we
+ * need to build to allow gdb to call functions.  We use one
+ * per cpu to avoid locking issues.  We will do all this work
+ * with interrupts off so that should take care of the protection
+ * issues.
+ */
+#define LOOKASIDE_SIZE 200	/* should be more than enough */
+#define MALLOC_MAX   200	/* Max malloc size */
+struct {
+	unsigned int esp;
+	int array[LOOKASIDE_SIZE];
+} fn_call_lookaside[MAX_NO_CPUS];
+
+static int trap_cpu;
+static unsigned int OLD_esp;
+
+#define END_OF_LOOKASIDE  &fn_call_lookaside[trap_cpu].array[LOOKASIDE_SIZE]
+#define IF_BIT 0x200
+#define TF_BIT 0x100
+
+#define MALLOC_ROUND 8-1
+
+static char malloc_array[MALLOC_MAX];
+IF_SMP(static void to_gdb(const char *mess));
+void *
+malloc(int size)
+{
+
+	if (size <= (MALLOC_MAX - used_m)) {
+		int old_used = used_m;
+		used_m += ((size + MALLOC_ROUND) & (~MALLOC_ROUND));
+		return &malloc_array[old_used];
+	} else {
+		return NULL;
+	}
+}
+
+/*
+ * I/O dispatch functions...
+ * Based upon kgdboe, either call the ethernet
+ * handler or the serial one..
+ */
+void
+putDebugChar(int c)
+{
+	if (!kgdboe) {
+		tty_putDebugChar(c);
+	} else {
+		eth_putDebugChar(c);
+	}
+}
+
+int
+getDebugChar(void)
+{
+	if (!kgdboe) {
+		return tty_getDebugChar();
+	} else {
+		return eth_getDebugChar();
+	}
+}
+
+void
+flushDebugChar(void)
+{
+	if (!kgdboe) {
+		tty_flushDebugChar();
+	} else {
+		eth_flushDebugChar();
+	}
+}
+
+/*
+ * Gdb calls functions by pushing agruments, including a return address
+ * on the stack and the adjusting EIP to point to the function.	 The
+ * whole assumption in GDB is that we are on a different stack than the
+ * one the "user" i.e. code that hit the break point, is on.  This, of
+ * course is not true in the kernel.  Thus various dodges are needed to
+ * do the call without directly messing with EIP (which we can not change
+ * as it is just a location and not a register.	 To adjust it would then
+ * require that we move every thing below EIP up or down as needed.  This
+ * will not work as we may well have stack relative pointer on the stack
+ * (such as the pointer to regs, for example).
+
+ * So here is what we do:
+ * We detect gdb attempting to store into the stack area and instead, store
+ * into the fn_call_lookaside.array at the same relative location as if it
+ * were the area ESP pointed at.  We also trap ESP modifications
+ * and uses these to adjust fn_call_lookaside.esp.  On entry
+ * fn_call_lookaside.esp will be set to point at the last entry in
+ * fn_call_lookaside.array.  This allows us to check if it has changed, and
+ * if so, on exit, we add the registers we will use to do the move and a
+ * trap/ interrupt return exit sequence.  We then adjust the eflags in the
+ * regs array (remember we now have a copy in the fn_call_lookaside.array) to
+ * kill the interrupt bit, AND we change EIP to point at our set up stub.
+ * As part of the register set up we preset the registers to point at the
+ * begining and end of the fn_call_lookaside.array, so all the stub needs to
+ * do is move words from the array to the stack until ESP= the desired value
+ * then do the rti.  This will then transfer to the desired function with
+ * all the correct registers.  Nifty huh?
+ */
+extern asmlinkage void fn_call_stub(void);
+extern asmlinkage void fn_rtn_stub(void);
+/*					   *INDENT-OFF*	 */
+__asm__("fn_rtn_stub:\n\t"
+	"movl %eax,%esp\n\t"
+	"fn_call_stub:\n\t"
+	"1:\n\t"
+	"addl $-4,%ebx\n\t"
+	"movl (%ebx), %eax\n\t"
+	"pushl %eax\n\t"
+	"cmpl %esp,%ecx\n\t"
+	"jne  1b\n\t"
+	"popl %eax\n\t"
+	"popl %ebx\n\t"
+	"popl %ecx\n\t"
+	"iret \n\t");
+/*					     *INDENT-ON*  */
+#define gdb_i386vector	kgdb_info.vector
+#define gdb_i386errcode kgdb_info.errcode
+#define waiting_cpus	kgdb_info.cpus_waiting
+#define remote_debug	kgdb_info.print_debug_info
+#define hold_cpu(cpu)	kgdb_info.cpus_waiting[cpu].hold
+/* gdb locks */
+
+#ifdef CONFIG_SMP
+static int in_kgdb_called;
+static spinlock_t waitlocks[MAX_NO_CPUS] =
+    {[0 ... MAX_NO_CPUS - 1] = SPIN_LOCK_UNLOCKED };
+/*
+ * The following array has the thread pointer of each of the "other"
+ * cpus.  We make it global so it can be seen by gdb.
+ */
+volatile int in_kgdb_entry_log[MAX_NO_CPUS];
+volatile struct pt_regs *in_kgdb_here_log[MAX_NO_CPUS];
+/*
+static spinlock_t continuelocks[MAX_NO_CPUS];
+*/
+spinlock_t kgdb_spinlock = SPIN_LOCK_UNLOCKED;
+/* waiters on our spinlock plus us */
+static atomic_t spinlock_waiters = ATOMIC_INIT(1);
+static int spinlock_count = 0;
+static int spinlock_cpu = 0;
+/*
+ * Note we use nested spin locks to account for the case where a break
+ * point is encountered when calling a function by user direction from
+ * kgdb. Also there is the memory exception recursion to account for.
+ * Well, yes, but this lets other cpus thru too.  Lets add a
+ * cpu id to the lock.
+ */
+#define KGDB_SPIN_LOCK(x) if( spinlock_count == 0 || \
+			      spinlock_cpu != smp_processor_id()){\
+				      atomic_inc(&spinlock_waiters); \
+				      while (! spin_trylock(x)) {\
+					    in_kgdb(&regs);\
+				      }\
+				      atomic_dec(&spinlock_waiters); \
+				      spinlock_count = 1; \
+				      spinlock_cpu = smp_processor_id(); \
+			  }else{  \
+				      spinlock_count++; \
+			  }
+#define KGDB_SPIN_UNLOCK(x) if( --spinlock_count == 0) spin_unlock(x)
+#else
+unsigned kgdb_spinlock = 0;
+#define KGDB_SPIN_LOCK(x) --*x
+#define KGDB_SPIN_UNLOCK(x) ++*x
+#endif
+
+int
+hex(char ch)
+{
+	if ((ch >= 'a') && (ch <= 'f'))
+		return (ch - 'a' + 10);
+	if ((ch >= '0') && (ch <= '9'))
+		return (ch - '0');
+	if ((ch >= 'A') && (ch <= 'F'))
+		return (ch - 'A' + 10);
+	return (-1);
+}
+
+/* scan for the sequence $<data>#<checksum>	*/
+void
+getpacket(char *buffer)
+{
+	unsigned char checksum;
+	unsigned char xmitcsum;
+	int i;
+	int count;
+	char ch;
+
+	do {
+		/* wait around for the start character, ignore all other characters */
+		while ((ch = (getDebugChar() & 0x7f)) != '$') ;
+		checksum = 0;
+		xmitcsum = -1;
+
+		count = 0;
+
+		/* now, read until a # or end of buffer is found */
+		while (count < BUFMAX) {
+			ch = getDebugChar() & 0x7f;
+			if (ch == '#')
+				break;
+			checksum = checksum + ch;
+			buffer[count] = ch;
+			count = count + 1;
+		}
+		buffer[count] = 0;
+
+		if (ch == '#') {
+			xmitcsum = hex(getDebugChar() & 0x7f) << 4;
+			xmitcsum += hex(getDebugChar() & 0x7f);
+			if ((remote_debug) && (checksum != xmitcsum)) {
+				printk
+				    ("bad checksum.	My count = 0x%x, sent=0x%x. buf=%s\n",
+				     checksum, xmitcsum, buffer);
+			}
+
+			if (checksum != xmitcsum)
+				putDebugChar('-');	/* failed checksum */
+			else {
+				putDebugChar('+');	/* successful transfer */
+				/* if a sequence char is present, reply the sequence ID */
+				if (buffer[2] == ':') {
+					putDebugChar(buffer[0]);
+					putDebugChar(buffer[1]);
+					/* remove sequence chars from buffer */
+					count = strlen(buffer);
+					for (i = 3; i <= count; i++)
+						buffer[i - 3] = buffer[i];
+				}
+			}
+		}
+	} while (checksum != xmitcsum);
+
+	if (remote_debug)
+		printk("R:%s\n", buffer);
+	flushDebugChar();
+}
+
+/* send the packet in buffer.  */
+
+void
+putpacket(char *buffer)
+{
+	unsigned char checksum;
+	int count;
+	char ch;
+
+	/*  $<packet info>#<checksum>. */
+
+	if (!kgdboe) {
+		do {
+			if (remote_debug)
+				printk("T:%s\n", buffer);
+			putDebugChar('$');
+			checksum = 0;
+			count = 0;
+
+			while ((ch = buffer[count])) {
+				putDebugChar(ch);
+				checksum += ch;
+				count += 1;
+			}
+
+			putDebugChar('#');
+			putDebugChar(hexchars[checksum >> 4]);
+			putDebugChar(hexchars[checksum % 16]);
+			flushDebugChar();
+
+		} while ((getDebugChar() & 0x7f) != '+');
+	} else {
+		/*
+		 * For udp, we can not transfer too much bytes once.
+		 * We only transfer MAX_SEND_COUNT size bytes each time
+		 */
+
+#define MAX_SEND_COUNT 30
+
+		int send_count = 0, i = 0;
+		char send_buf[MAX_SEND_COUNT];
+
+		do {
+			if (remote_debug)
+				printk("T:%s\n", buffer);
+			putDebugChar('$');
+			checksum = 0;
+			count = 0;
+			send_count = 0;
+			while ((ch = buffer[count])) {
+				if (send_count >= MAX_SEND_COUNT) {
+					for(i = 0; i < MAX_SEND_COUNT; i++) {
+						putDebugChar(send_buf[i]);
+					}
+					flushDebugChar();
+					send_count = 0;
+				} else {
+					send_buf[send_count] = ch;
+					checksum += ch;
+					count ++;
+					send_count++;
+				}
+			}
+			for(i = 0; i < send_count; i++)
+				putDebugChar(send_buf[i]);
+			putDebugChar('#');
+			putDebugChar(hexchars[checksum >> 4]);
+			putDebugChar(hexchars[checksum % 16]);
+			flushDebugChar();
+		} while ((getDebugChar() & 0x7f) != '+');
+	}
+}
+
+static char remcomInBuffer[BUFMAX];
+static char remcomOutBuffer[BUFMAX];
+static short error;
+
+void
+debug_error(char *format, char *parm)
+{
+	if (remote_debug)
+		printk(format, parm);
+}
+
+static void
+print_regs(struct pt_regs *regs)
+{
+	printk("EAX=%08lx ", regs->eax);
+	printk("EBX=%08lx ", regs->ebx);
+	printk("ECX=%08lx ", regs->ecx);
+	printk("EDX=%08lx ", regs->edx);
+	printk("\n");
+	printk("ESI=%08lx ", regs->esi);
+	printk("EDI=%08lx ", regs->edi);
+	printk("EBP=%08lx ", regs->ebp);
+	printk("ESP=%08lx ", (long) &regs->esp);
+	printk("\n");
+	printk(" DS=%08x ", regs->xds);
+	printk(" ES=%08x ", regs->xes);
+	printk(" SS=%08x ", __KERNEL_DS);
+	printk(" FL=%08lx ", regs->eflags);
+	printk("\n");
+	printk(" CS=%08x ", regs->xcs);
+	printk(" IP=%08lx ", regs->eip);
+#if 0
+	printk(" FS=%08x ", regs->fs);
+	printk(" GS=%08x ", regs->gs);
+#endif
+	printk("\n");
+
+}				/* print_regs */
+
+#define NEW_esp fn_call_lookaside[trap_cpu].esp
+
+static void
+regs_to_gdb_regs(int *gdb_regs, struct pt_regs *regs)
+{
+	gdb_regs[_EAX] = regs->eax;
+	gdb_regs[_EBX] = regs->ebx;
+	gdb_regs[_ECX] = regs->ecx;
+	gdb_regs[_EDX] = regs->edx;
+	gdb_regs[_ESI] = regs->esi;
+	gdb_regs[_EDI] = regs->edi;
+	gdb_regs[_EBP] = regs->ebp;
+	gdb_regs[_DS] = regs->xds;
+	gdb_regs[_ES] = regs->xes;
+	gdb_regs[_PS] = regs->eflags;
+	gdb_regs[_CS] = regs->xcs;
+	gdb_regs[_PC] = regs->eip;
+	/* Note, as we are a debugging the kernel, we will always
+	 * trap in kernel code, this means no priviledge change,
+	 * and so the pt_regs structure is not completely valid.  In a non
+	 * privilege change trap, only EFLAGS, CS and EIP are put on the stack,
+	 * SS and ESP are not stacked, this means that the last 2 elements of
+	 * pt_regs is not valid (they would normally refer to the user stack)
+	 * also, using regs+1 is no good because you end up will a value that is
+	 * 2 longs (8) too high.  This used to cause stepping over functions
+	 * to fail, so my fix is to use the address of regs->esp, which
+	 * should point at the end of the stack frame.	Note I have ignored
+	 * completely exceptions that cause an error code to be stacked, such
+	 * as double fault.  Stuart Hughes, Zentropix.
+	 * original code: gdb_regs[_ESP] =  (int) (regs + 1) ;
+
+	 * this is now done on entry and moved to OLD_esp (as well as NEW_esp).
+	 */
+	gdb_regs[_ESP] = NEW_esp;
+	gdb_regs[_SS] = __KERNEL_DS;
+	gdb_regs[_FS] = 0xFFFF;
+	gdb_regs[_GS] = 0xFFFF;
+}				/* regs_to_gdb_regs */
+
+static void
+gdb_regs_to_regs(int *gdb_regs, struct pt_regs *regs)
+{
+	regs->eax = gdb_regs[_EAX];
+	regs->ebx = gdb_regs[_EBX];
+	regs->ecx = gdb_regs[_ECX];
+	regs->edx = gdb_regs[_EDX];
+	regs->esi = gdb_regs[_ESI];
+	regs->edi = gdb_regs[_EDI];
+	regs->ebp = gdb_regs[_EBP];
+	regs->xds = gdb_regs[_DS];
+	regs->xes = gdb_regs[_ES];
+	regs->eflags = gdb_regs[_PS];
+	regs->xcs = gdb_regs[_CS];
+	regs->eip = gdb_regs[_PC];
+	NEW_esp = gdb_regs[_ESP];	/* keep the value */
+#if 0				/* can't change these */
+	regs->esp = gdb_regs[_ESP];
+	regs->xss = gdb_regs[_SS];
+	regs->fs = gdb_regs[_FS];
+	regs->gs = gdb_regs[_GS];
+#endif
+
+}				/* gdb_regs_to_regs */
+
+int thread_list = 0;
+
+void
+get_gdb_regs(struct task_struct *p, struct pt_regs *regs, int *gdb_regs)
+{
+	unsigned long stack_page;
+	int count = 0;
+	IF_SMP(int i);
+	if (!p || p == current) {
+		regs_to_gdb_regs(gdb_regs, regs);
+		return;
+	}
+#ifdef CONFIG_SMP
+	for (i = 0; i < MAX_NO_CPUS; i++) {
+		if (p == kgdb_info.cpus_waiting[i].task) {
+			regs_to_gdb_regs(gdb_regs,
+					 kgdb_info.cpus_waiting[i].regs);
+			gdb_regs[_ESP] =
+			    (int) &kgdb_info.cpus_waiting[i].regs->esp;
+
+			return;
+		}
+	}
+#endif
+	memset(gdb_regs, 0, NUMREGBYTES);
+	gdb_regs[_ESP] = p->thread.esp;
+	gdb_regs[_PC] = p->thread.eip;
+	gdb_regs[_EBP] = *(int *) gdb_regs[_ESP];
+	gdb_regs[_EDI] = *(int *) (gdb_regs[_ESP] + 4);
+	gdb_regs[_ESI] = *(int *) (gdb_regs[_ESP] + 8);
+
+/*
+ * This code is to give a more informative notion of where a process
+ * is waiting.	It is used only when the user asks for a thread info
+ * list.  If he then switches to the thread, s/he will find the task
+ * is in schedule, but a back trace should show the same info we come
+ * up with.  This code was shamelessly purloined from process.c.  It was
+ * then enhanced to provide more registers than simply the program
+ * counter.
+ */
+
+	if (!thread_list) {
+		return;
+	}
+
+	if (p->state == TASK_RUNNING)
+		return;
+	stack_page = (unsigned long) p->thread_info;
+	if (gdb_regs[_ESP] < stack_page || gdb_regs[_ESP] >
+	    THREAD_SIZE - sizeof(long) + stack_page)
+		return;
+	/* include/asm-i386/system.h:switch_to() pushes ebp last. */
+	do {
+		if (gdb_regs[_EBP] < stack_page ||
+		    gdb_regs[_EBP] > THREAD_SIZE - 2*sizeof(long) + stack_page)
+			return;
+		gdb_regs[_PC] = *(unsigned long *) (gdb_regs[_EBP] + 4);
+		gdb_regs[_ESP] = gdb_regs[_EBP] + 8;
+		gdb_regs[_EBP] = *(unsigned long *) gdb_regs[_EBP];
+		if (!in_sched_functions(gdb_regs[_PC]))
+			return;
+	} while (count++ < 16);
+	return;
+}
+
+/* Indicate to caller of mem2hex or hex2mem that there has been an
+   error.  */
+static volatile int mem_err = 0;
+static volatile int mem_err_expected = 0;
+static volatile int mem_err_cnt = 0;
+static int garbage_loc = -1;
+
+int
+get_char(char *addr)
+{
+	return *addr;
+}
+
+void
+set_char(char *addr, int val, int may_fault)
+{
+	/*
+	 * This code traps references to the area mapped to the kernel
+	 * stack as given by the regs and, instead, stores to the
+	 * fn_call_lookaside[cpu].array
+	 */
+	if (may_fault &&
+	    (unsigned int) addr < OLD_esp &&
+	    ((unsigned int) addr > (OLD_esp - (unsigned int) LOOKASIDE_SIZE))) {
+		addr = (char *) END_OF_LOOKASIDE - ((char *) OLD_esp - addr);
+	}
+	*addr = val;
+}
+
+/* convert the memory pointed to by mem into hex, placing result in buf */
+/* return a pointer to the last char put in buf (null) */
+/* If MAY_FAULT is non-zero, then we should set mem_err in response to
+   a fault; if zero treat a fault like any other fault in the stub.  */
+char *
+mem2hex(char *mem, char *buf, int count, int may_fault)
+{
+	int i;
+	unsigned char ch;
+
+	if (may_fault) {
+		mem_err_expected = 1;
+		mem_err = 0;
+	}
+	for (i = 0; i < count; i++) {
+		/* printk("%lx = ", mem) ; */
+
+		ch = get_char(mem++);
+
+		/* printk("%02x\n", ch & 0xFF) ; */
+		if (may_fault && mem_err) {
+			if (remote_debug)
+				printk("Mem fault fetching from addr %lx\n",
+				       (long) (mem - 1));
+			*buf = 0;	/* truncate buffer */
+			return (buf);
+		}
+		*buf++ = hexchars[ch >> 4];
+		*buf++ = hexchars[ch % 16];
+	}
+	*buf = 0;
+	if (may_fault)
+		mem_err_expected = 0;
+	return (buf);
+}
+
+/* convert the hex array pointed to by buf into binary to be placed in mem */
+/* return a pointer to the character AFTER the last byte written */
+/* NOTE: We use the may fault flag to also indicate if the write is to
+ * the registers (0) or "other" memory (!=0)
+ */
+char *
+hex2mem(char *buf, char *mem, int count, int may_fault)
+{
+	int i;
+	unsigned char ch;
+
+	if (may_fault) {
+		mem_err_expected = 1;
+		mem_err = 0;
+	}
+	for (i = 0; i < count; i++) {
+		ch = hex(*buf++) << 4;
+		ch = ch + hex(*buf++);
+		set_char(mem++, ch, may_fault);
+
+		if (may_fault && mem_err) {
+			if (remote_debug)
+				printk("Mem fault storing to addr %lx\n",
+				       (long) (mem - 1));
+			return (mem);
+		}
+	}
+	if (may_fault)
+		mem_err_expected = 0;
+	return (mem);
+}
+
+/**********************************************/
+/* WHILE WE FIND NICE HEX CHARS, BUILD AN INT */
+/* RETURN NUMBER OF CHARS PROCESSED	      */
+/**********************************************/
+int
+hexToInt(char **ptr, int *intValue)
+{
+	int numChars = 0;
+	int hexValue;
+
+	*intValue = 0;
+
+	while (**ptr) {
+		hexValue = hex(**ptr);
+		if (hexValue >= 0) {
+			*intValue = (*intValue << 4) | hexValue;
+			numChars++;
+		} else
+			break;
+
+		(*ptr)++;
+	}
+
+	return (numChars);
+}
+
+#define stubhex(h) hex(h)
+#ifdef old_thread_list
+
+static int
+stub_unpack_int(char *buff, int fieldlength)
+{
+	int nibble;
+	int retval = 0;
+
+	while (fieldlength) {
+		nibble = stubhex(*buff++);
+		retval |= nibble;
+		fieldlength--;
+		if (fieldlength)
+			retval = retval << 4;
+	}
+	return retval;
+}
+#endif
+static char *
+pack_hex_byte(char *pkt, int byte)
+{
+	*pkt++ = hexchars[(byte >> 4) & 0xf];
+	*pkt++ = hexchars[(byte & 0xf)];
+	return pkt;
+}
+
+#define BUF_THREAD_ID_SIZE 16
+
+static char *
+pack_threadid(char *pkt, threadref * id)
+{
+	char *limit;
+	unsigned char *altid;
+
+	altid = (unsigned char *) id;
+	limit = pkt + BUF_THREAD_ID_SIZE;
+	while (pkt < limit)
+		pkt = pack_hex_byte(pkt, *altid++);
+	return pkt;
+}
+
+#ifdef old_thread_list
+static char *
+unpack_byte(char *buf, int *value)
+{
+	*value = stub_unpack_int(buf, 2);
+	return buf + 2;
+}
+
+static char *
+unpack_threadid(char *inbuf, threadref * id)
+{
+	char *altref;
+	char *limit = inbuf + BUF_THREAD_ID_SIZE;
+	int x, y;
+
+	altref = (char *) id;
+
+	while (inbuf < limit) {
+		x = stubhex(*inbuf++);
+		y = stubhex(*inbuf++);
+		*altref++ = (x << 4) | y;
+	}
+	return inbuf;
+}
+#endif
+void
+int_to_threadref(threadref * id, int value)
+{
+	unsigned char *scan;
+
+	scan = (unsigned char *) id;
+	{
+		int i = 4;
+		while (i--)
+			*scan++ = 0;
+	}
+	*scan++ = (value >> 24) & 0xff;
+	*scan++ = (value >> 16) & 0xff;
+	*scan++ = (value >> 8) & 0xff;
+	*scan++ = (value & 0xff);
+}
+int
+int_to_hex_v(unsigned char * id, int value)
+{
+	unsigned char *start = id;
+	int shift;
+	int ch;
+
+	for (shift = 28; shift >= 0; shift -= 4) {
+		if ((ch = (value >> shift) & 0xf) || (id != start)) {
+			*id = hexchars[ch];
+			id++;
+		}
+	}
+	if (id == start)
+		*id++ = '0';
+	return id - start;
+}
+#ifdef old_thread_list
+
+static int
+threadref_to_int(threadref * ref)
+{
+	int i, value = 0;
+	unsigned char *scan;
+
+	scan = (char *) ref;
+	scan += 4;
+	i = 4;
+	while (i-- > 0)
+		value = (value << 8) | ((*scan++) & 0xff);
+	return value;
+}
+#endif
+static int
+cmp_str(char *s1, char *s2, int count)
+{
+	while (count--) {
+		if (*s1++ != *s2++)
+			return 0;
+	}
+	return 1;
+}
+
+#if 1				/* this is a hold over from 2.4 where O(1) was "sometimes" */
+extern struct task_struct *kgdb_get_idle(int cpu);
+#define idle_task(cpu) kgdb_get_idle(cpu)
+#else
+#define idle_task(cpu) init_tasks[cpu]
+#endif
+
+extern int kgdb_pid_init_done;
+
+struct task_struct *
+getthread(int pid)
+{
+	struct task_struct *thread;
+	if (pid >= PID_MAX && pid <= (PID_MAX + MAX_NO_CPUS)) {
+
+		return idle_task(pid - PID_MAX);
+	} else {
+		/*
+		 * find_task_by_pid is relatively safe all the time
+		 * Other pid functions require lock downs which imply
+		 * that we may be interrupting them (as we get here
+		 * in the middle of most any lock down).
+		 * Still we don't want to call until the table exists!
+		 */
+		if (kgdb_pid_init_done){
+			thread = find_task_by_pid(pid);
+			if (thread) {
+				return thread;
+			}
+		}
+	}
+	return NULL;
+}
+/* *INDENT-OFF*	 */
+struct hw_breakpoint {
+	unsigned enabled;
+	unsigned type;
+	unsigned len;
+	unsigned addr;
+} breakinfo[4] = { {enabled:0},
+		   {enabled:0},
+		   {enabled:0},
+		   {enabled:0}};
+/* *INDENT-ON*	*/
+unsigned hw_breakpoint_status;
+void
+correct_hw_break(void)
+{
+	int breakno;
+	int correctit;
+	int breakbit;
+	unsigned dr7;
+
+	asm volatile ("movl %%db7, %0\n":"=r" (dr7)
+		      :);
+	/* *INDENT-OFF*	 */
+	do {
+		unsigned addr0, addr1, addr2, addr3;
+		asm volatile ("movl %%db0, %0\n"
+			      "movl %%db1, %1\n"
+			      "movl %%db2, %2\n"
+			      "movl %%db3, %3\n"
+			      :"=r" (addr0), "=r"(addr1),
+			      "=r"(addr2), "=r"(addr3)
+			      :);
+	} while (0);
+	/* *INDENT-ON*	*/
+	correctit = 0;
+	for (breakno = 0; breakno < 3; breakno++) {
+		breakbit = 2 << (breakno << 1);
+		if (!(dr7 & breakbit) && breakinfo[breakno].enabled) {
+			correctit = 1;
+			dr7 |= breakbit;
+			dr7 &= ~(0xf0000 << (breakno << 2));
+			dr7 |= (((breakinfo[breakno].len << 2) |
+				 breakinfo[breakno].type) << 16) <<
+			    (breakno << 2);
+			switch (breakno) {
+			case 0:
+				asm volatile ("movl %0, %%dr0\n"::"r"
+					      (breakinfo[breakno].addr));
+				break;
+
+			case 1:
+				asm volatile ("movl %0, %%dr1\n"::"r"
+					      (breakinfo[breakno].addr));
+				break;
+
+			case 2:
+				asm volatile ("movl %0, %%dr2\n"::"r"
+					      (breakinfo[breakno].addr));
+				break;
+
+			case 3:
+				asm volatile ("movl %0, %%dr3\n"::"r"
+					      (breakinfo[breakno].addr));
+				break;
+			}
+		} else if ((dr7 & breakbit) && !breakinfo[breakno].enabled) {
+			correctit = 1;
+			dr7 &= ~breakbit;
+			dr7 &= ~(0xf0000 << (breakno << 2));
+		}
+	}
+	if (correctit) {
+		asm volatile ("movl %0, %%db7\n"::"r" (dr7));
+	}
+}
+
+int
+remove_hw_break(unsigned breakno)
+{
+	if (!breakinfo[breakno].enabled) {
+		return -1;
+	}
+	breakinfo[breakno].enabled = 0;
+	return 0;
+}
+
+int
+set_hw_break(unsigned breakno, unsigned type, unsigned len, unsigned addr)
+{
+	if (breakinfo[breakno].enabled) {
+		return -1;
+	}
+	breakinfo[breakno].enabled = 1;
+	breakinfo[breakno].type = type;
+	breakinfo[breakno].len = len;
+	breakinfo[breakno].addr = addr;
+	return 0;
+}
+
+#ifdef CONFIG_SMP
+static int in_kgdb_console = 0;
+
+int
+in_kgdb(struct pt_regs *regs)
+{
+	unsigned flags;
+	int cpu = smp_processor_id();
+	in_kgdb_called = 1;
+	if (!spin_is_locked(&kgdb_spinlock)) {
+		if (in_kgdb_here_log[cpu] ||	/* we are holding this cpu */
+		    in_kgdb_console) {	/* or we are doing slow i/o */
+			return 1;
+		}
+		return 0;
+	}
+
+	/* As I see it the only reason not to let all cpus spin on
+	 * the same spin_lock is to allow selected ones to proceed.
+	 * This would be a good thing, so we leave it this way.
+	 * Maybe someday....  Done !
+
+	 * in_kgdb() is called from an NMI so we don't pretend
+	 * to have any resources, like printk() for example.
+	 */
+
+	kgdb_local_irq_save(flags);	/* only local here, to avoid hanging */
+	/*
+	 * log arival of this cpu
+	 * The NMI keeps on ticking.  Protect against recurring more
+	 * than once, and ignor the cpu that has the kgdb lock
+	 */
+	in_kgdb_entry_log[cpu]++;
+	in_kgdb_here_log[cpu] = regs;
+	if (cpu == spinlock_cpu || waiting_cpus[cpu].task)
+		goto exit_in_kgdb;
+
+	/*
+	 * For protection of the initilization of the spin locks by kgdb
+	 * it locks the kgdb spinlock before it gets the wait locks set
+	 * up.	We wait here for the wait lock to be taken.  If the
+	 * kgdb lock goes away first??	Well, it could be a slow exit
+	 * sequence where the wait lock is removed prior to the kgdb lock
+	 * so if kgdb gets unlocked, we just exit.
+	 */
+
+	while (spin_is_locked(&kgdb_spinlock) &&
+	       !spin_is_locked(waitlocks + cpu)) ;
+	if (!spin_is_locked(&kgdb_spinlock))
+		goto exit_in_kgdb;
+
+	waiting_cpus[cpu].task = current;
+	waiting_cpus[cpu].pid = (current->pid) ? : (PID_MAX + cpu);
+	waiting_cpus[cpu].regs = regs;
+
+	spin_unlock_wait(waitlocks + cpu);
+
+	/*
+	 * log departure of this cpu
+	 */
+	waiting_cpus[cpu].task = 0;
+	waiting_cpus[cpu].pid = 0;
+	waiting_cpus[cpu].regs = 0;
+	correct_hw_break();
+      exit_in_kgdb:
+	in_kgdb_here_log[cpu] = 0;
+	kgdb_local_irq_restore(flags);
+	return 1;
+	/*
+	   spin_unlock(continuelocks + smp_processor_id());
+	 */
+}
+
+void
+smp__in_kgdb(struct pt_regs regs)
+{
+	ack_APIC_irq();
+	in_kgdb(&regs);
+}
+#else
+int
+in_kgdb(struct pt_regs *regs)
+{
+	return (kgdb_spinlock);
+}
+#endif
+
+void
+printexceptioninfo(int exceptionNo, int errorcode, char *buffer)
+{
+	unsigned dr6;
+	int i;
+	switch (exceptionNo) {
+	case 1:		/* debug exception */
+		break;
+	case 3:		/* breakpoint */
+		sprintf(buffer, "Software breakpoint");
+		return;
+	default:
+		sprintf(buffer, "Details not available");
+		return;
+	}
+	asm volatile ("movl %%db6, %0\n":"=r" (dr6)
+		      :);
+	if (dr6 & 0x4000) {
+		sprintf(buffer, "Single step");
+		return;
+	}
+	for (i = 0; i < 4; ++i) {
+		if (dr6 & (1 << i)) {
+			sprintf(buffer, "Hardware breakpoint %d", i);
+			return;
+		}
+	}
+	sprintf(buffer, "Unknown trap");
+	return;
+}
+
+/*
+ * This function does all command procesing for interfacing to gdb.
+ *
+ * NOTE:  The INT nn instruction leaves the state of the interrupt
+ *	  enable flag UNCHANGED.  That means that when this routine
+ *	  is entered via a breakpoint (INT 3) instruction from code
+ *	  that has interrupts enabled, then interrupts will STILL BE
+ *	  enabled when this routine is entered.	 The first thing that
+ *	  we do here is disable interrupts so as to prevent recursive
+ *	  entries and bothersome serial interrupts while we are
+ *	  trying to run the serial port in polled mode.
+ *
+ * For kernel version 2.1.xx the kgdb_cli() actually gets a spin lock so
+ * it is always necessary to do a restore_flags before returning
+ * so as to let go of that lock.
+ */
+int
+kgdb_handle_exception(int exceptionVector,
+		      int signo, int err_code, struct pt_regs *linux_regs)
+{
+	struct task_struct *usethread = NULL;
+	struct task_struct *thread_list_start = 0, *thread = NULL;
+	int addr, length;
+	int breakno, breaktype;
+	char *ptr;
+	int newPC;
+	threadref thref;
+	int threadid;
+	int thread_min = PID_MAX + MAX_NO_CPUS;
+#ifdef old_thread_list
+	int maxthreads;
+#endif
+	int nothreads;
+	unsigned long flags;
+	int gdb_regs[NUMREGBYTES / 4];
+	int dr6;
+	IF_SMP(int entry_state = 0);	/* 0, ok, 1, no nmi, 2 sync failed */
+#define NO_NMI 1
+#define NO_SYNC 2
+#define	regs	(*linux_regs)
+#define NUMREGS NUMREGBYTES/4
+	/*
+	 * If the entry is not from the kernel then return to the Linux
+	 * trap handler and let it process the interrupt normally.
+	 */
+	if ((linux_regs->eflags & VM_MASK) || (3 & linux_regs->xcs)) {
+		printk("ignoring non-kernel exception\n");
+		print_regs(&regs);
+		return (0);
+	}
+	/*
+	 * If we're using eth mode, set the 'mode' in the netdevice.
+	 */
+
+	if (kgdboe)
+		netpoll_set_trap(1);
+
+	kgdb_local_irq_save(flags);
+
+	/* Get kgdb spinlock */
+
+	KGDB_SPIN_LOCK(&kgdb_spinlock);
+	rdtscll(kgdb_info.entry_tsc);
+	/*
+	 * We depend on this spinlock and the NMI watch dog to control the
+	 * other cpus.	They will arrive at "in_kgdb()" as a result of the
+	 * NMI and will wait there for the following spin locks to be
+	 * released.
+	 */
+#ifdef CONFIG_SMP
+
+#if 0
+	if (cpu_callout_map & ~MAX_CPU_MASK) {
+		printk("kgdb : too many cpus, possibly not mapped"
+		       " in contiguous space, change MAX_NO_CPUS"
+		       " in kgdb_stub and make new kernel.\n"
+		       " cpu_callout_map is %lx\n", cpu_callout_map);
+		goto exit_just_unlock;
+	}
+#endif
+	if (spinlock_count == 1) {
+		int time = 0, end_time, dum = 0;
+		int i;
+		int cpu_logged_in[MAX_NO_CPUS] = {[0 ... MAX_NO_CPUS - 1] = (0)
+		};
+		if (remote_debug) {
+			printk("kgdb : cpu %d entry, syncing others\n",
+			       smp_processor_id());
+		}
+		for (i = 0; i < MAX_NO_CPUS; i++) {
+			/*
+			 * Use trylock as we may already hold the lock if
+			 * we are holding the cpu.  Net result is all
+			 * locked.
+			 */
+			spin_trylock(&waitlocks[i]);
+		}
+		for (i = 0; i < MAX_NO_CPUS; i++)
+			cpu_logged_in[i] = 0;
+		/*
+		 * Wait for their arrival.  We know the watch dog is active if
+		 * in_kgdb() has ever been called, as it is always called on a
+		 * watchdog tick.
+		 */
+		rdtsc(dum, time);
+		end_time = time + 2;	/* Note: we use the High order bits! */
+		i = 1;
+		if (num_online_cpus() > 1) {
+			int me_in_kgdb = in_kgdb_entry_log[smp_processor_id()];
+			smp_send_nmi_allbutself();
+
+			while (i < num_online_cpus() && time != end_time) {
+				int j;
+				for (j = 0; j < MAX_NO_CPUS; j++) {
+					if (waiting_cpus[j].task &&
+					    waiting_cpus[j].task != NOCPU &&
+					    !cpu_logged_in[j]) {
+						i++;
+						cpu_logged_in[j] = 1;
+						if (remote_debug) {
+							printk
+							    ("kgdb : cpu %d arrived at kgdb\n",
+							     j);
+						}
+						break;
+					} else if (!waiting_cpus[j].task &&
+						   !cpu_online(j)) {
+						waiting_cpus[j].task = NOCPU;
+						cpu_logged_in[j] = 1;
+						waiting_cpus[j].hold = 1;
+						break;
+					}
+					if (!waiting_cpus[j].task &&
+					    in_kgdb_here_log[j]) {
+
+						int wait = 100000;
+						while (wait--) ;
+						if (!waiting_cpus[j].task &&
+						    in_kgdb_here_log[j]) {
+							printk
+							    ("kgdb : cpu %d stall"
+							     " in in_kgdb\n",
+							     j);
+							i++;
+							cpu_logged_in[j] = 1;
+							waiting_cpus[j].task =
+							    (struct task_struct
+							     *) 1;
+						}
+					}
+				}
+
+				if (in_kgdb_entry_log[smp_processor_id()] >
+				    (me_in_kgdb + 10)) {
+					break;
+				}
+
+				rdtsc(dum, time);
+			}
+			if (i < num_online_cpus()) {
+				printk
+				    ("kgdb : time out, proceeding without sync\n");
+#if 0
+				printk("kgdb : Waiting_cpus: 0 = %d, 1 = %d\n",
+				       waiting_cpus[0].task != 0,
+				       waiting_cpus[1].task != 0);
+				printk("kgdb : Cpu_logged in: 0 = %d, 1 = %d\n",
+				       cpu_logged_in[0], cpu_logged_in[1]);
+				printk
+				    ("kgdb : in_kgdb_here_log in: 0 = %d, 1 = %d\n",
+				     in_kgdb_here_log[0] != 0,
+				     in_kgdb_here_log[1] != 0);
+#endif
+				entry_state = NO_SYNC;
+			} else {
+#if 0
+				int ent =
+				    in_kgdb_entry_log[smp_processor_id()] -
+				    me_in_kgdb;
+				printk("kgdb : sync after %d entries\n", ent);
+#endif
+			}
+		} else {
+			if (remote_debug) {
+				printk
+				    ("kgdb : %d cpus, but watchdog not active\n"
+				     "proceeding without locking down other cpus\n",
+				     num_online_cpus());
+				entry_state = NO_NMI;
+			}
+		}
+	}
+#endif
+
+	if (remote_debug) {
+		unsigned long *lp = (unsigned long *) &linux_regs;
+
+		printk("handle_exception(exceptionVector=%d, "
+		       "signo=%d, err_code=%d, linux_regs=%p)\n",
+		       exceptionVector, signo, err_code, linux_regs);
+		if (debug_regs) {
+			print_regs(&regs);
+			printk("Stk: %8lx %8lx %8lx %8lx"
+			       "  %8lx %8lx %8lx %8lx\n",
+			       lp[0], lp[1], lp[2], lp[3],
+			       lp[4], lp[5], lp[6], lp[7]);
+			printk("     %8lx %8lx %8lx %8lx"
+			       "  %8lx %8lx %8lx %8lx\n",
+			       lp[8], lp[9], lp[10], lp[11],
+			       lp[12], lp[13], lp[14], lp[15]);
+			printk("     %8lx %8lx %8lx %8lx  "
+			       "%8lx %8lx %8lx %8lx\n",
+			       lp[16], lp[17], lp[18], lp[19],
+			       lp[20], lp[21], lp[22], lp[23]);
+			printk("     %8lx %8lx %8lx %8lx  "
+			       "%8lx %8lx %8lx %8lx\n",
+			       lp[24], lp[25], lp[26], lp[27],
+			       lp[28], lp[29], lp[30], lp[31]);
+		}
+	}
+
+	/* Disable hardware debugging while we are in kgdb */
+	/* Get the debug register status register */
+/*				       *INDENT-OFF*  */
+      __asm__("movl %0,%%db7"
+	      :	/* no output */
+	      :"r"(0));
+
+	asm volatile ("movl %%db6, %0\n"
+		      :"=r" (hw_breakpoint_status)
+		      :);
+
+/*				       *INDENT-ON*  */
+	switch (exceptionVector) {
+	case 0:		/* divide error */
+	case 1:		/* debug exception */
+	case 2:		/* NMI */
+	case 3:		/* breakpoint */
+	case 4:		/* overflow */
+	case 5:		/* bounds check */
+	case 6:		/* invalid opcode */
+	case 7:		/* device not available */
+	case 8:		/* double fault (errcode) */
+	case 10:		/* invalid TSS (errcode) */
+	case 12:		/* stack fault (errcode) */
+	case 16:		/* floating point error */
+	case 17:		/* alignment check (errcode) */
+	default:		/* any undocumented */
+		break;
+	case 11:		/* segment not present (errcode) */
+	case 13:		/* general protection (errcode) */
+	case 14:		/* page fault (special errcode) */
+	case 19:		/* cache flush denied */
+		if (mem_err_expected) {
+			/*
+			 * This fault occured because of the
+			 * get_char or set_char routines.  These
+			 * two routines use either eax of edx to
+			 * indirectly reference the location in
+			 * memory that they are working with.
+			 * For a page fault, when we return the
+			 * instruction will be retried, so we
+			 * have to make sure that these
+			 * registers point to valid memory.
+			 */
+			mem_err = 1;	/* set mem error flag */
+			mem_err_expected = 0;
+			mem_err_cnt++;	/* helps in debugging */
+			/* make valid address */
+			regs.eax = (long) &garbage_loc;
+			/* make valid address */
+			regs.edx = (long) &garbage_loc;
+			if (remote_debug)
+				printk("Return after memory error: "
+				       "mem_err_cnt=%d\n", mem_err_cnt);
+			if (debug_regs)
+				print_regs(&regs);
+			goto exit_kgdb;
+		}
+		break;
+	}
+	if (remote_debug)
+		printk("kgdb : entered kgdb on cpu %d\n", smp_processor_id());
+
+	gdb_i386vector = exceptionVector;
+	gdb_i386errcode = err_code;
+	kgdb_info.called_from = __builtin_return_address(0);
+#ifdef CONFIG_SMP
+	/*
+	 * OK, we can now communicate, lets tell gdb about the sync.
+	 * but only if we had a problem.
+	 */
+	switch (entry_state) {
+	case NO_NMI:
+		to_gdb("NMI not active, other cpus not stopped\n");
+		break;
+	case NO_SYNC:
+		to_gdb("Some cpus not stopped, see 'kgdb_info' for details\n");
+	default:;
+	}
+
+#endif
+/*
+ * Set up the gdb function call area.
+ */
+	trap_cpu = smp_processor_id();
+	OLD_esp = NEW_esp = (int) (&linux_regs->esp);
+
+      IF_SMP(once_again:)
+	    /* reply to host that an exception has occurred */
+	    remcomOutBuffer[0] = 'S';
+	remcomOutBuffer[1] = hexchars[signo >> 4];
+	remcomOutBuffer[2] = hexchars[signo % 16];
+	remcomOutBuffer[3] = 0;
+
+	putpacket(remcomOutBuffer);
+
+	while (1 == 1) {
+		error = 0;
+		remcomOutBuffer[0] = 0;
+		getpacket(remcomInBuffer);
+		switch (remcomInBuffer[0]) {
+		case '?':
+			remcomOutBuffer[0] = 'S';
+			remcomOutBuffer[1] = hexchars[signo >> 4];
+			remcomOutBuffer[2] = hexchars[signo % 16];
+			remcomOutBuffer[3] = 0;
+			break;
+		case 'd':
+			remote_debug = !(remote_debug);	/* toggle debug flag */
+			printk("Remote debug %s\n",
+			       remote_debug ? "on" : "off");
+			break;
+		case 'g':	/* return the value of the CPU registers */
+			get_gdb_regs(usethread, &regs, gdb_regs);
+			mem2hex((char *) gdb_regs,
+				remcomOutBuffer, NUMREGBYTES, 0);
+			break;
+		case 'G':	/* set the value of the CPU registers - return OK */
+			hex2mem(&remcomInBuffer[1],
+				(char *) gdb_regs, NUMREGBYTES, 0);
+			if (!usethread || usethread == current) {
+				gdb_regs_to_regs(gdb_regs, &regs);
+				strcpy(remcomOutBuffer, "OK");
+			} else {
+				strcpy(remcomOutBuffer, "E00");
+			}
+			break;
+
+		case 'P':{	/* set the value of a single CPU register -
+				   return OK */
+				/*
+				 * For some reason, gdb wants to talk about psudo
+				 * registers (greater than 15).	 These may have
+				 * meaning for ptrace, but for us it is safe to
+				 * ignor them.	We do this by dumping them into
+				 * _GS which we also ignor, but do have memory for.
+				 */
+				int regno;
+
+				ptr = &remcomInBuffer[1];
+				regs_to_gdb_regs(gdb_regs, &regs);
+				if ((!usethread || usethread == current) &&
+				    hexToInt(&ptr, &regno) &&
+				    *ptr++ == '=' && (regno >= 0)) {
+					regno =
+					    (regno >= NUMREGS ? _GS : regno);
+					hex2mem(ptr, (char *) &gdb_regs[regno],
+						4, 0);
+					gdb_regs_to_regs(gdb_regs, &regs);
+					strcpy(remcomOutBuffer, "OK");
+					break;
+				}
+				strcpy(remcomOutBuffer, "E01");
+				break;
+			}
+
+			/* mAA..AA,LLLL	 Read LLLL bytes at address AA..AA */
+		case 'm':
+			/* TRY TO READ %x,%x.  IF SUCCEED, SET PTR = 0 */
+			ptr = &remcomInBuffer[1];
+			if (hexToInt(&ptr, &addr) &&
+			    (*(ptr++) == ',') && (hexToInt(&ptr, &length))) {
+				ptr = 0;
+				/*
+				 * hex doubles the byte count
+				 */
+				if (length > (BUFMAX / 2))
+					length = BUFMAX / 2;
+				mem2hex((char *) addr,
+					remcomOutBuffer, length, 1);
+				if (mem_err) {
+					strcpy(remcomOutBuffer, "E03");
+					debug_error("memory fault\n", NULL);
+				}
+			}
+
+			if (ptr) {
+				strcpy(remcomOutBuffer, "E01");
+				debug_error
+				    ("malformed read memory command: %s\n",
+				     remcomInBuffer);
+			}
+			break;
+
+			/* MAA..AA,LLLL:
+			   Write LLLL bytes at address AA.AA return OK */
+		case 'M':
+			/* TRY TO READ '%x,%x:'.  IF SUCCEED, SET PTR = 0 */
+			ptr = &remcomInBuffer[1];
+			if (hexToInt(&ptr, &addr) &&
+			    (*(ptr++) == ',') &&
+			    (hexToInt(&ptr, &length)) && (*(ptr++) == ':')) {
+				hex2mem(ptr, (char *) addr, length, 1);
+
+				if (mem_err) {
+					strcpy(remcomOutBuffer, "E03");
+					debug_error("memory fault\n", NULL);
+				} else {
+					strcpy(remcomOutBuffer, "OK");
+				}
+
+				ptr = 0;
+			}
+			if (ptr) {
+				strcpy(remcomOutBuffer, "E02");
+				debug_error
+				    ("malformed write memory command: %s\n",
+				     remcomInBuffer);
+			}
+			break;
+		case 'S':
+			remcomInBuffer[0] = 's';
+		case 'C':
+			/* Csig;AA..AA where ;AA..AA is optional
+			 * continue with signal
+			 * Since signals are meaning less to us, delete that
+			 * part and then fall into the 'c' code.
+			 */
+			ptr = &remcomInBuffer[1];
+			length = 2;
+			while (*ptr && *ptr != ';') {
+				length++;
+				ptr++;
+			}
+			if (*ptr) {
+				do {
+					ptr++;
+					*(ptr - length++) = *ptr;
+				} while (*ptr);
+			} else {
+				remcomInBuffer[1] = 0;
+			}
+
+			/* cAA..AA  Continue at address AA..AA(optional) */
+			/* sAA..AA  Step one instruction from AA..AA(optional) */
+			/* D	    detach, reply OK and then continue */
+		case 'c':
+		case 's':
+		case 'D':
+
+			/* try to read optional parameter,
+			   pc unchanged if no parm */
+			ptr = &remcomInBuffer[1];
+			if (hexToInt(&ptr, &addr)) {
+				if (remote_debug)
+					printk("Changing EIP to 0x%x\n", addr);
+
+				regs.eip = addr;
+			}
+
+			newPC = regs.eip;
+
+			/* clear the trace bit */
+			regs.eflags &= 0xfffffeff;
+
+			/* set the trace bit if we're stepping */
+			if (remcomInBuffer[0] == 's')
+				regs.eflags |= 0x100;
+
+			/* detach is a friendly version of continue. Note that
+			   debugging is still enabled (e.g hit control C)
+			 */
+			if (remcomInBuffer[0] == 'D') {
+				strcpy(remcomOutBuffer, "OK");
+				putpacket(remcomOutBuffer);
+			}
+
+			if (remote_debug) {
+				printk("Resuming execution\n");
+				print_regs(&regs);
+			}
+			asm volatile ("movl %%db6, %0\n":"=r" (dr6)
+				      :);
+			if (!(dr6 & 0x4000)) {
+				for (breakno = 0; breakno < 4; ++breakno) {
+					if (dr6 & (1 << breakno) &&
+					    (breakinfo[breakno].type == 0)) {
+						/* Set restore flag */
+						regs.eflags |= 0x10000;
+						break;
+					}
+				}
+			}
+
+			if (kgdboe)
+				netpoll_set_trap(0);
+
+			correct_hw_break();
+			asm volatile ("movl %0, %%db6\n"::"r" (0));
+			goto exit_kgdb;
+
+			/* kill the program */
+		case 'k':	/* do nothing */
+			break;
+
+			/* query */
+		case 'q':
+			nothreads = 0;
+			switch (remcomInBuffer[1]) {
+			case 'f':
+				threadid = 1;
+				thread_list = 2;
+				thread_list_start = (usethread ? : current);
+			case 's':
+				if (!cmp_str(&remcomInBuffer[2],
+					     "ThreadInfo", 10))
+					break;
+
+				remcomOutBuffer[nothreads++] = 'm';
+				for (; threadid < PID_MAX + MAX_NO_CPUS;
+				     threadid++) {
+					thread = getthread(threadid);
+					if (thread) {
+						nothreads += int_to_hex_v(
+							&remcomOutBuffer[
+								nothreads],
+							threadid);
+						if (thread_min > threadid)
+							thread_min = threadid;
+						remcomOutBuffer[
+							nothreads] = ',';
+						nothreads++;
+						if (nothreads > BUFMAX - 10)
+							break;
+					}
+				}
+				if (remcomOutBuffer[nothreads - 1] == 'm') {
+					remcomOutBuffer[nothreads - 1] = 'l';
+				} else {
+					nothreads--;
+				}
+				remcomOutBuffer[nothreads] = 0;
+				break;
+
+#ifdef old_thread_list /* Old thread info request */
+			case 'L':
+				/* List threads */
+				thread_list = 2;
+				thread_list_start = (usethread ? : current);
+				unpack_byte(remcomInBuffer + 3, &maxthreads);
+				unpack_threadid(remcomInBuffer + 5, &thref);
+				do {
+					int buf_thread_limit =
+					    (BUFMAX - 22) / BUF_THREAD_ID_SIZE;
+					if (maxthreads > buf_thread_limit) {
+						maxthreads = buf_thread_limit;
+					}
+				} while (0);
+				remcomOutBuffer[0] = 'q';
+				remcomOutBuffer[1] = 'M';
+				remcomOutBuffer[4] = '0';
+				pack_threadid(remcomOutBuffer + 5, &thref);
+
+				threadid = threadref_to_int(&thref);
+				for (nothreads = 0;
+				     nothreads < maxthreads &&
+				     threadid < PID_MAX + MAX_NO_CPUS;
+				     threadid++) {
+					thread = getthread(threadid);
+					if (thread) {
+						int_to_threadref(&thref,
+								 threadid);
+						pack_threadid(remcomOutBuffer +
+							      21 +
+							      nothreads * 16,
+							      &thref);
+						nothreads++;
+						if (thread_min > threadid)
+							thread_min = threadid;
+					}
+				}
+
+				if (threadid == PID_MAX + MAX_NO_CPUS) {
+					remcomOutBuffer[4] = '1';
+				}
+				pack_hex_byte(remcomOutBuffer + 2, nothreads);
+				remcomOutBuffer[21 + nothreads * 16] = '\0';
+				break;
+#endif
+			case 'C':
+				/* Current thread id */
+				remcomOutBuffer[0] = 'Q';
+				remcomOutBuffer[1] = 'C';
+				threadid = current->pid;
+				if (!threadid) {
+					/*
+					 * idle thread
+					 */
+					for (threadid = PID_MAX;
+					     threadid < PID_MAX + MAX_NO_CPUS;
+					     threadid++) {
+						if (current ==
+						    idle_task(threadid -
+							      PID_MAX))
+							break;
+					}
+				}
+				int_to_threadref(&thref, threadid);
+				pack_threadid(remcomOutBuffer + 2, &thref);
+				remcomOutBuffer[18] = '\0';
+				break;
+
+			case 'E':
+				/* Print exception info */
+				printexceptioninfo(exceptionVector,
+						   err_code, remcomOutBuffer);
+				break;
+			case 'T':{
+				char * nptr;
+				/* Thread extra info */
+				if (!cmp_str(&remcomInBuffer[2],
+					    "hreadExtraInfo,", 15)) {
+					break;
+				}
+				ptr = &remcomInBuffer[17];
+				hexToInt(&ptr, &threadid);
+				thread = getthread(threadid);
+				nptr = &thread->comm[0];
+				length = 0;
+				ptr = &remcomOutBuffer[0];
+				do {
+					length++;
+					ptr = pack_hex_byte(ptr, *nptr++);
+				 } while (*nptr && length < 16);
+				/*
+				 * would like that 16 to be the size of
+				 * task_struct.comm but don't know the
+				 * syntax..
+				 */
+				*ptr = 0;
+			}
+			}
+			break;
+
+			/* task related */
+		case 'H':
+			switch (remcomInBuffer[1]) {
+			case 'g':
+				ptr = &remcomInBuffer[2];
+				hexToInt(&ptr, &threadid);
+				thread = getthread(threadid);
+				if (!thread) {
+					remcomOutBuffer[0] = 'E';
+					remcomOutBuffer[1] = '\0';
+					break;
+				}
+				/*
+				 * Just in case I forget what this is all about,
+				 * the "thread info" command to gdb causes it
+				 * to ask for a thread list.  It then switches
+				 * to each thread and asks for the registers.
+				 * For this (and only this) usage, we want to
+				 * fudge the registers of tasks not on the run
+				 * list (i.e. waiting) to show the routine that
+				 * called schedule. Also, gdb, is a minimalist
+				 * in that if the current thread is the last
+				 * it will not re-read the info when done.
+				 * This means that in this case we must show
+				 * the real registers. So here is how we do it:
+				 * Each entry we keep track of the min
+				 * thread in the list (the last that gdb will)
+				 * get info for.  We also keep track of the
+				 * starting thread.
+				 * "thread_list" is cleared when switching back
+				 * to the min thread if it is was current, or
+				 * if it was not current, thread_list is set
+				 * to 1.  When the switch to current comes,
+				 * if thread_list is 1, clear it, else do
+				 * nothing.
+				 */
+				usethread = thread;
+				if ((thread_list == 1) &&
+				    (thread == thread_list_start)) {
+					thread_list = 0;
+				}
+				if (thread_list && (threadid == thread_min)) {
+					if (thread == thread_list_start) {
+						thread_list = 0;
+					} else {
+						thread_list = 1;
+					}
+				}
+				/* follow through */
+			case 'c':
+				remcomOutBuffer[0] = 'O';
+				remcomOutBuffer[1] = 'K';
+				remcomOutBuffer[2] = '\0';
+				break;
+			}
+			break;
+
+			/* Query thread status */
+		case 'T':
+			ptr = &remcomInBuffer[1];
+			hexToInt(&ptr, &threadid);
+			thread = getthread(threadid);
+			if (thread) {
+				remcomOutBuffer[0] = 'O';
+				remcomOutBuffer[1] = 'K';
+				remcomOutBuffer[2] = '\0';
+				if (thread_min > threadid)
+					thread_min = threadid;
+			} else {
+				remcomOutBuffer[0] = 'E';
+				remcomOutBuffer[1] = '\0';
+			}
+			break;
+
+		case 'Y': /* set up a hardware breakpoint */
+			ptr = &remcomInBuffer[1];
+			hexToInt(&ptr, &breakno);
+			ptr++;
+			hexToInt(&ptr, &breaktype);
+			ptr++;
+			hexToInt(&ptr, &length);
+			ptr++;
+			hexToInt(&ptr, &addr);
+			if (set_hw_break(breakno & 0x3,
+					 breaktype & 0x3,
+					 length & 0x3, addr) == 0) {
+				strcpy(remcomOutBuffer, "OK");
+			} else {
+				strcpy(remcomOutBuffer, "ERROR");
+			}
+			break;
+
+			/* Remove hardware breakpoint */
+		case 'y':
+			ptr = &remcomInBuffer[1];
+			hexToInt(&ptr, &breakno);
+			if (remove_hw_break(breakno & 0x3) == 0) {
+				strcpy(remcomOutBuffer, "OK");
+			} else {
+				strcpy(remcomOutBuffer, "ERROR");
+			}
+			break;
+
+		case 'r':	/* reboot */
+			strcpy(remcomOutBuffer, "OK");
+			putpacket(remcomOutBuffer);
+			/*to_gdb("Rebooting\n"); */
+			/* triplefault	 no return from here */
+			{
+				static long no_idt[2];
+				__asm__ __volatile__("lidt %0"::"m"(no_idt[0]));
+				BREAKPOINT;
+			}
+
+		}		/* switch */
+
+		/* reply to the request */
+		putpacket(remcomOutBuffer);
+	}			/* while(1==1) */
+	/*
+	 *  reached by goto only.
+	 */
+      exit_kgdb:
+	/*
+	 * Here is where we set up to trap a gdb function call.	 NEW_esp
+	 * will be changed if we are trying to do this.	 We handle both
+	 * adding and subtracting, thus allowing gdb to put grung on
+	 * the stack which it removes later.
+	 */
+	if (NEW_esp != OLD_esp) {
+		int *ptr = END_OF_LOOKASIDE;
+		if (NEW_esp < OLD_esp)
+			ptr -= (OLD_esp - NEW_esp) / sizeof (int);
+		*--ptr = linux_regs->eflags;
+		*--ptr = linux_regs->xcs;
+		*--ptr = linux_regs->eip;
+		*--ptr = linux_regs->ecx;
+		*--ptr = linux_regs->ebx;
+		*--ptr = linux_regs->eax;
+		linux_regs->ecx = NEW_esp - (sizeof (int) * 6);
+		linux_regs->ebx = (unsigned int) END_OF_LOOKASIDE;
+		if (NEW_esp < OLD_esp) {
+			linux_regs->eip = (unsigned int) fn_call_stub;
+		} else {
+			linux_regs->eip = (unsigned int) fn_rtn_stub;
+			linux_regs->eax = NEW_esp;
+		}
+		linux_regs->eflags &= ~(IF_BIT | TF_BIT);
+	}
+#ifdef CONFIG_SMP
+	/*
+	 * Release gdb wait locks
+	 * Sanity check time.  Must have at least one cpu to run.  Also single
+	 * step must not be done if the current cpu is on hold.
+	 */
+	if (spinlock_count == 1) {
+		int ss_hold = (regs.eflags & 0x100) && kgdb_info.hold_on_sstep;
+		int cpu_avail = 0;
+		int i;
+
+		for (i = 0; i < MAX_NO_CPUS; i++) {
+			if (!cpu_online(i))
+				break;
+			if (!hold_cpu(i)) {
+				cpu_avail = 1;
+			}
+		}
+		/*
+		 * Early in the bring up there will be NO cpus on line...
+		 */
+		if (!cpu_avail && !cpus_empty(cpu_online_map)) {
+			to_gdb("No cpus unblocked, see 'kgdb_info.hold_cpu'\n");
+			goto once_again;
+		}
+		if (hold_cpu(smp_processor_id()) && (regs.eflags & 0x100)) {
+			to_gdb
+			    ("Current cpu must be unblocked to single step\n");
+			goto once_again;
+		}
+		if (!(ss_hold)) {
+			int i;
+			for (i = 0; i < MAX_NO_CPUS; i++) {
+				if (!hold_cpu(i)) {
+					spin_unlock(&waitlocks[i]);
+				}
+			}
+		} else {
+			spin_unlock(&waitlocks[smp_processor_id()]);
+		}
+		/* Release kgdb spinlock */
+		KGDB_SPIN_UNLOCK(&kgdb_spinlock);
+		/*
+		 * If this cpu is on hold, this is where we
+		 * do it.  Note, the NMI will pull us out of here,
+		 * but will return as the above lock is not held.
+		 * We will stay here till another cpu releases the lock for us.
+		 */
+		spin_unlock_wait(waitlocks + smp_processor_id());
+		kgdb_local_irq_restore(flags);
+		return (0);
+	}
+#if 0
+exit_just_unlock:
+#endif
+#endif
+	/* Release kgdb spinlock */
+	KGDB_SPIN_UNLOCK(&kgdb_spinlock);
+	kgdb_local_irq_restore(flags);
+	return (0);
+}
+
+/* this function is used to set up exception handlers for tracing and
+ * breakpoints.
+ * This function is not needed as the above line does all that is needed.
+ * We leave it for backward compatitability...
+ */
+void
+set_debug_traps(void)
+{
+	/*
+	 * linux_debug_hook is defined in traps.c.  We store a pointer
+	 * to our own exception handler into it.
+
+	 * But really folks, every hear of labeled common, an old Fortran
+	 * concept.  Lots of folks can reference it and it is define if
+	 * anyone does.	 Only one can initialize it at link time.  We do
+	 * this with the hook.	See the statement above.  No need for any
+	 * executable code and it is ready as soon as the kernel is
+	 * loaded.  Very desirable in kernel debugging.
+
+	 linux_debug_hook = handle_exception ;
+	 */
+
+	/* In case GDB is started before us, ack any packets (presumably
+	   "$?#xx") sitting there.
+	   putDebugChar ('+');
+
+	   initialized = 1;
+	 */
+}
+
+/* This function will generate a breakpoint exception.	It is used at the
+   beginning of a program to sync up with a debugger and can be used
+   otherwise as a quick means to stop program execution and "break" into
+   the debugger. */
+/* But really, just use the BREAKPOINT macro.  We will handle the int stuff
+ */
+
+#ifdef later
+/*
+ * possibly we should not go thru the traps.c code at all?  Someday.
+ */
+void
+do_kgdb_int3(struct pt_regs *regs, long error_code)
+{
+	kgdb_handle_exception(3, 5, error_code, regs);
+	return;
+}
+#endif
+#undef regs
+#ifdef CONFIG_TRAP_BAD_SYSCALL_EXITS
+asmlinkage void
+bad_sys_call_exit(int stuff)
+{
+	struct pt_regs *regs = (struct pt_regs *) &stuff;
+	printk("Sys call %d return with %x preempt_count\n",
+	       (int) regs->orig_eax, preempt_count());
+}
+#endif
+#ifdef CONFIG_STACK_OVERFLOW_TEST
+#include <asm/kgdb.h>
+asmlinkage void
+stack_overflow(void)
+{
+#ifdef BREAKPOINT
+	BREAKPOINT;
+#else
+	printk("Kernel stack overflow, looping forever\n");
+#endif
+	while (1) {
+	}
+}
+#endif
+
+#if defined(CONFIG_SMP) || defined(CONFIG_KGDB_CONSOLE)
+char gdbconbuf[BUFMAX];
+
+static void
+kgdb_gdb_message(const char *s, unsigned count)
+{
+	int i;
+	int wcount;
+	char *bufptr;
+	/*
+	 * This takes care of NMI while spining out chars to gdb
+	 */
+	IF_SMP(in_kgdb_console = 1);
+	gdbconbuf[0] = 'O';
+	bufptr = gdbconbuf + 1;
+	while (count > 0) {
+		if ((count << 1) > (BUFMAX - 2)) {
+			wcount = (BUFMAX - 2) >> 1;
+		} else {
+			wcount = count;
+		}
+		count -= wcount;
+		for (i = 0; i < wcount; i++) {
+			bufptr = pack_hex_byte(bufptr, s[i]);
+		}
+		*bufptr = '\0';
+		s += wcount;
+
+		putpacket(gdbconbuf);
+
+	}
+	IF_SMP(in_kgdb_console = 0);
+}
+#endif
+#ifdef CONFIG_SMP
+static void
+to_gdb(const char *s)
+{
+	int count = 0;
+	while (s[count] && (count++ < BUFMAX)) ;
+	kgdb_gdb_message(s, count);
+}
+#endif
+#ifdef CONFIG_KGDB_CONSOLE
+#include <linux/console.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <asm/uaccess.h>
+#include <asm/semaphore.h>
+
+void
+kgdb_console_write(struct console *co, const char *s, unsigned count)
+{
+
+	if (gdb_i386vector == -1) {
+		/*
+		 * We have not yet talked to gdb.  What to do...
+		 * lets break, on continue we can do the write.
+		 * But first tell him whats up. Uh, well no can do,
+		 * as this IS the console.  Oh well...
+		 * We do need to wait or the messages will be lost.
+		 * Other option would be to tell the above code to
+		 * ignore this breakpoint and do an auto return,
+		 * but that might confuse gdb.	Also this happens
+		 * early enough in boot up that we don't have the traps
+		 * set up yet, so...
+		 */
+		breakpoint();
+	}
+	kgdb_gdb_message(s, count);
+}
+
+/*
+ * ------------------------------------------------------------
+ * Serial KGDB driver
+ * ------------------------------------------------------------
+ */
+
+static struct console kgdbcons = {
+	name:"kgdb",
+	write:kgdb_console_write,
+#ifdef CONFIG_KGDB_USER_CONSOLE
+	device:kgdb_console_device,
+#endif
+	flags:CON_PRINTBUFFER | CON_ENABLED,
+	index:-1,
+};
+
+/*
+ * The trick here is that this file gets linked before printk.o
+ * That means we get to peer at the console info in the command
+ * line before it does.	 If we are up, we register, otherwise,
+ * do nothing.	By returning 0, we allow printk to look also.
+ */
+static int kgdb_console_enabled;
+
+int __init
+kgdb_console_init(char *str)
+{
+	if ((strncmp(str, "kgdb", 4) == 0) || (strncmp(str, "gdb", 3) == 0)) {
+		register_console(&kgdbcons);
+		kgdb_console_enabled = 1;
+	}
+	return 0;		/* let others look at the string */
+}
+
+__setup("console=", kgdb_console_init);
+
+#ifdef CONFIG_KGDB_USER_CONSOLE
+static kdev_t kgdb_console_device(struct console *c);
+/* This stuff sort of works, but it knocks out telnet devices
+ * we are leaving it here in case we (or you) find time to figure it out
+ * better..
+ */
+
+/*
+ * We need a real char device as well for when the console is opened for user
+ * space activities.
+ */
+
+static int
+kgdb_consdev_open(struct inode *inode, struct file *file)
+{
+	return 0;
+}
+
+static ssize_t
+kgdb_consdev_write(struct file *file, const char *buf,
+		   size_t count, loff_t * ppos)
+{
+	int size, ret = 0;
+	static char kbuf[128];
+	static DECLARE_MUTEX(sem);
+
+	/* We are not reentrant... */
+	if (down_interruptible(&sem))
+		return -ERESTARTSYS;
+
+	while (count > 0) {
+		/* need to copy the data from user space */
+		size = count;
+		if (size > sizeof (kbuf))
+			size = sizeof (kbuf);
+		if (copy_from_user(kbuf, buf, size)) {
+			ret = -EFAULT;
+			break;;
+		}
+		kgdb_console_write(&kgdbcons, kbuf, size);
+		count -= size;
+		ret += size;
+		buf += size;
+	}
+
+	up(&sem);
+
+	return ret;
+}
+
+struct file_operations kgdb_consdev_fops = {
+	open:kgdb_consdev_open,
+	write:kgdb_consdev_write
+};
+static kdev_t
+kgdb_console_device(struct console *c)
+{
+	return MKDEV(TTYAUX_MAJOR, 1);
+}
+
+/*
+ * This routine gets called from the serial stub in the i386/lib
+ * This is so it is done late in bring up (just before the console open).
+ */
+void
+kgdb_console_finit(void)
+{
+	if (kgdb_console_enabled) {
+		char *cptr = cdevname(MKDEV(TTYAUX_MAJOR, 1));
+		char *cp = cptr;
+		while (*cptr && *cptr != '(')
+			cptr++;
+		*cptr = 0;
+		unregister_chrdev(TTYAUX_MAJOR, cp);
+		register_chrdev(TTYAUX_MAJOR, "kgdb", &kgdb_consdev_fops);
+	}
+}
+#endif
+#endif
+#ifdef CONFIG_KGDB_TS
+#include <asm/msr.h>		/* time stamp code */
+#include <asm/hardirq.h>	/* in_interrupt */
+#ifdef CONFIG_KGDB_TS_64
+#define DATA_POINTS 64
+#endif
+#ifdef CONFIG_KGDB_TS_128
+#define DATA_POINTS 128
+#endif
+#ifdef CONFIG_KGDB_TS_256
+#define DATA_POINTS 256
+#endif
+#ifdef CONFIG_KGDB_TS_512
+#define DATA_POINTS 512
+#endif
+#ifdef CONFIG_KGDB_TS_1024
+#define DATA_POINTS 1024
+#endif
+#ifndef DATA_POINTS
+#define DATA_POINTS 128		/* must be a power of two */
+#endif
+#define INDEX_MASK (DATA_POINTS - 1)
+#if (INDEX_MASK & DATA_POINTS)
+#error "CONFIG_KGDB_TS_COUNT must be a power of 2"
+#endif
+struct kgdb_and_then_struct {
+#ifdef CONFIG_SMP
+	int on_cpu;
+#endif
+	struct task_struct *task;
+	long long at_time;
+	int from_ln;
+	char *in_src;
+	void *from;
+	int *with_shpf;
+	int data0;
+	int data1;
+};
+struct kgdb_and_then_struct2 {
+#ifdef CONFIG_SMP
+	int on_cpu;
+#endif
+	struct task_struct *task;
+	long long at_time;
+	int from_ln;
+	char *in_src;
+	void *from;
+	int *with_shpf;
+	struct task_struct *t1;
+	struct task_struct *t2;
+};
+struct kgdb_and_then_struct kgdb_data[DATA_POINTS];
+
+struct kgdb_and_then_struct *kgdb_and_then = &kgdb_data[0];
+int kgdb_and_then_count;
+
+void
+kgdb_tstamp(int line, char *source, int data0, int data1)
+{
+	static spinlock_t ts_spin = SPIN_LOCK_UNLOCKED;
+	int flags;
+	kgdb_local_irq_save(flags);
+	spin_lock(&ts_spin);
+	rdtscll(kgdb_and_then->at_time);
+#ifdef CONFIG_SMP
+	kgdb_and_then->on_cpu = smp_processor_id();
+#endif
+	kgdb_and_then->task = current;
+	kgdb_and_then->from_ln = line;
+	kgdb_and_then->in_src = source;
+	kgdb_and_then->from = __builtin_return_address(0);
+	kgdb_and_then->with_shpf = (int *) (((flags & IF_BIT) >> 9) |
+					    (preempt_count() << 8));
+	kgdb_and_then->data0 = data0;
+	kgdb_and_then->data1 = data1;
+	kgdb_and_then = &kgdb_data[++kgdb_and_then_count & INDEX_MASK];
+	spin_unlock(&ts_spin);
+	kgdb_local_irq_restore(flags);
+#ifdef CONFIG_PREEMPT
+
+#endif
+	return;
+}
+#endif
+typedef int gdb_debug_hook(int exceptionVector,
+			   int signo, int err_code, struct pt_regs *linux_regs);
+gdb_debug_hook *linux_debug_hook = &kgdb_handle_exception;	/* histerical reasons... */
+
+static int kgdb_need_breakpoint[NR_CPUS];
+
+void kgdb_schedule_breakpoint(void)
+{
+	kgdb_need_breakpoint[smp_processor_id()] = 1;
+}
+
+void kgdb_process_breakpoint(void)
+{
+	/*
+	 * Handle a breakpoint queued from inside network driver code
+         * to avoid reentrancy issues
+	 */
+	if (kgdb_need_breakpoint[smp_processor_id()]) {
+		kgdb_need_breakpoint[smp_processor_id()] = 0;
+		BREAKPOINT;
+	}
+}
+
--- diff/arch/i386/lib/bitops.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/i386/lib/bitops.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,70 @@
+#include <linux/bitops.h>
+#include <linux/module.h>
+
+/**
+ * find_next_bit - find the first set bit in a memory region
+ * @addr: The address to base the search on
+ * @offset: The bitnumber to start searching at
+ * @size: The maximum size to search
+ */
+int find_next_bit(const unsigned long *addr, int size, int offset)
+{
+	const unsigned long *p = addr + (offset >> 5);
+	int set = 0, bit = offset & 31, res;
+
+	if (bit) {
+		/*
+		 * Look for nonzero in the first 32 bits:
+		 */
+		__asm__("bsfl %1,%0\n\t"
+			"jne 1f\n\t"
+			"movl $32, %0\n"
+			"1:"
+			: "=r" (set)
+			: "r" (*p >> bit));
+		if (set < (32 - bit))
+			return set + offset;
+		set = 32 - bit;
+		p++;
+	}
+	/*
+	 * No set bit yet, search remaining full words for a bit
+	 */
+	res = find_first_bit (p, size - 32 * (p - addr));
+	return (offset + set + res);
+}
+EXPORT_SYMBOL(find_next_bit);
+
+/**
+ * find_next_zero_bit - find the first zero bit in a memory region
+ * @addr: The address to base the search on
+ * @offset: The bitnumber to start searching at
+ * @size: The maximum size to search
+ */
+int find_next_zero_bit(const unsigned long *addr, int size, int offset)
+{
+	unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
+	int set = 0, bit = offset & 31, res;
+
+	if (bit) {
+		/*
+		 * Look for zero in the first 32 bits.
+		 */
+		__asm__("bsfl %1,%0\n\t"
+			"jne 1f\n\t"
+			"movl $32, %0\n"
+			"1:"
+			: "=r" (set)
+			: "r" (~(*p >> bit)));
+		if (set < (32 - bit))
+			return set + offset;
+		set = 32 - bit;
+		p++;
+	}
+	/*
+	 * No zero yet, search remaining full bytes for a zero
+	 */
+	res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr));
+	return (offset + set + res);
+}
+EXPORT_SYMBOL(find_next_zero_bit);
--- diff/arch/i386/lib/kgdb_serial.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/i386/lib/kgdb_serial.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,499 @@
+/*
+ * Serial interface GDB stub
+ *
+ * Written (hacked together) by David Grothe (dave@gcom.com)
+ * Modified to allow invokation early in boot see also
+ * kgdb.h for instructions by George Anzinger(george@mvista.com)
+ * Modified to handle debugging over ethernet by Robert Walsh
+ * <rjwalsh@durables.org> and wangdi <wangdi@clusterfs.com>, based on
+ * code by San Mehat.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/timer.h>
+#include <linux/interrupt.h>
+#include <linux/tty.h>
+#include <linux/tty_flip.h>
+#include <linux/serial.h>
+#include <linux/serial_reg.h>
+#include <linux/config.h>
+#include <linux/major.h>
+#include <linux/string.h>
+#include <linux/fcntl.h>
+#include <linux/ptrace.h>
+#include <linux/ioport.h>
+#include <linux/mm.h>
+#include <linux/init.h>
+#include <linux/highmem.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/segment.h>
+#include <asm/bitops.h>
+#include <asm/system.h>
+#include <asm/kgdb_local.h>
+#ifdef CONFIG_KGDB_USER_CONSOLE
+extern void kgdb_console_finit(void);
+#endif
+#define PRNT_off
+#define TEST_EXISTANCE
+#ifdef PRNT
+#define dbprintk(s) printk s
+#else
+#define dbprintk(s)
+#endif
+#define TEST_INTERRUPT_off
+#ifdef TEST_INTERRUPT
+#define intprintk(s) printk s
+#else
+#define intprintk(s)
+#endif
+
+#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
+
+#define	GDB_BUF_SIZE	512	/* power of 2, please */
+
+static char gdb_buf[GDB_BUF_SIZE];
+static int gdb_buf_in_inx;
+static atomic_t gdb_buf_in_cnt;
+static int gdb_buf_out_inx;
+
+struct async_struct *gdb_async_info;
+static int gdb_async_irq;
+
+#define outb_px(a,b) outb_p(b,a)
+
+static void program_uart(struct async_struct *info);
+static void write_char(struct async_struct *info, int chr);
+/*
+ * Get a byte from the hardware data buffer and return it
+ */
+static int
+read_data_bfr(struct async_struct *info)
+{
+	char it = inb_p(info->port + UART_LSR);
+
+	if (it & UART_LSR_DR)
+		return (inb_p(info->port + UART_RX));
+	/*
+	 * If we have a framing error assume somebody messed with
+	 * our uart.  Reprogram it and send '-' both ways...
+	 */
+	if (it & 0xc) {
+		program_uart(info);
+		write_char(info, '-');
+		return ('-');
+	}
+	return (-1);
+
+}				/* read_data_bfr */
+
+/*
+ * Get a char if available, return -1 if nothing available.
+ * Empty the receive buffer first, then look at the interface hardware.
+
+ * Locking here is a bit of a problem.	We MUST not lock out communication
+ * if we are trying to talk to gdb about a kgdb entry.	ON the other hand
+ * we can loose chars in the console pass thru if we don't lock.  It is also
+ * possible that we could hold the lock or be waiting for it when kgdb
+ * NEEDS to talk.  Since kgdb locks down the world, it does not need locks.
+ * We do, of course have possible issues with interrupting a uart operation,
+ * but we will just depend on the uart status to help keep that straight.
+
+ */
+static spinlock_t uart_interrupt_lock = SPIN_LOCK_UNLOCKED;
+#ifdef CONFIG_SMP
+extern spinlock_t kgdb_spinlock;
+#endif
+
+static int
+read_char(struct async_struct *info)
+{
+	int chr;
+	unsigned long flags;
+	local_irq_save(flags);
+#ifdef CONFIG_SMP
+	if (!spin_is_locked(&kgdb_spinlock)) {
+		spin_lock(&uart_interrupt_lock);
+	}
+#endif
+	if (atomic_read(&gdb_buf_in_cnt) != 0) {	/* intr routine has q'd chars */
+		chr = gdb_buf[gdb_buf_out_inx++];
+		gdb_buf_out_inx &= (GDB_BUF_SIZE - 1);
+		atomic_dec(&gdb_buf_in_cnt);
+	} else {
+		chr = read_data_bfr(info);
+	}
+#ifdef CONFIG_SMP
+	if (!spin_is_locked(&kgdb_spinlock)) {
+		spin_unlock(&uart_interrupt_lock);
+	}
+#endif
+	local_irq_restore(flags);
+	return (chr);
+}
+
+/*
+ * Wait until the interface can accept a char, then write it.
+ */
+static void
+write_char(struct async_struct *info, int chr)
+{
+	while (!(inb_p(info->port + UART_LSR) & UART_LSR_THRE)) ;
+
+	outb_p(chr, info->port + UART_TX);
+
+}				/* write_char */
+
+/*
+ * Mostly we don't need a spinlock, but since the console goes
+ * thru here with interrutps on, well, we need to catch those
+ * chars.
+ */
+/*
+ * This is the receiver interrupt routine for the GDB stub.
+ * It will receive a limited number of characters of input
+ * from the gdb  host machine and save them up in a buffer.
+ *
+ * When the gdb stub routine tty_getDebugChar() is called it
+ * draws characters out of the buffer until it is empty and
+ * then reads directly from the serial port.
+ *
+ * We do not attempt to write chars from the interrupt routine
+ * since the stubs do all of that via tty_putDebugChar() which
+ * writes one byte after waiting for the interface to become
+ * ready.
+ *
+ * The debug stubs like to run with interrupts disabled since,
+ * after all, they run as a consequence of a breakpoint in
+ * the kernel.
+ *
+ * Perhaps someone who knows more about the tty driver than I
+ * care to learn can make this work for any low level serial
+ * driver.
+ */
+static irqreturn_t
+gdb_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	struct async_struct *info;
+	unsigned long flags;
+
+	info = gdb_async_info;
+	if (!info || !info->tty || irq != gdb_async_irq)
+		return IRQ_NONE;
+
+	local_irq_save(flags);
+	spin_lock(&uart_interrupt_lock);
+	do {
+		int chr = read_data_bfr(info);
+		intprintk(("Debug char on int: %x hex\n", chr));
+		if (chr < 0)
+			continue;
+
+		if (chr == 3) {	/* Ctrl-C means remote interrupt */
+			BREAKPOINT;
+			continue;
+		}
+
+		if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) {
+			/* buffer overflow tosses early char */
+			read_char(info);
+		}
+		gdb_buf[gdb_buf_in_inx++] = chr;
+		gdb_buf_in_inx &= (GDB_BUF_SIZE - 1);
+	} while (inb_p(info->port + UART_IIR) & UART_IIR_RDI);
+	spin_unlock(&uart_interrupt_lock);
+	local_irq_restore(flags);
+	return IRQ_HANDLED;
+}				/* gdb_interrupt */
+
+/*
+ * Just a NULL routine for testing.
+ */
+void
+gdb_null(void)
+{
+}				/* gdb_null */
+
+/* These structure are filled in with values defined in asm/kgdb_local.h
+ */
+static struct serial_state state = SB_STATE;
+static struct async_struct local_info = SB_INFO;
+static int ok_to_enable_ints = 0;
+static void kgdb_enable_ints_now(void);
+
+extern char *kgdb_version;
+/*
+ * Hook an IRQ for KGDB.
+ *
+ * This routine is called from tty_putDebugChar, below.
+ */
+static int ints_disabled = 1;
+int
+gdb_hook_interrupt(struct async_struct *info, int verb)
+{
+	struct serial_state *state = info->state;
+	unsigned long flags;
+	int port;
+#ifdef TEST_EXISTANCE
+	int scratch, scratch2;
+#endif
+
+	/* The above fails if memory managment is not set up yet.
+	 * Rather than fail the set up, just keep track of the fact
+	 * and pick up the interrupt thing later.
+	 */
+	gdb_async_info = info;
+	port = gdb_async_info->port;
+	gdb_async_irq = state->irq;
+	if (verb) {
+		printk("kgdb %s : port =%x, IRQ=%d, divisor =%d\n",
+		       kgdb_version,
+		       port,
+		       gdb_async_irq, gdb_async_info->state->custom_divisor);
+	}
+	local_irq_save(flags);
+#ifdef TEST_EXISTANCE
+	/* Existance test */
+	/* Should not need all this, but just in case.... */
+
+	scratch = inb_p(port + UART_IER);
+	outb_px(port + UART_IER, 0);
+	outb_px(0xff, 0x080);
+	scratch2 = inb_p(port + UART_IER);
+	outb_px(port + UART_IER, scratch);
+	if (scratch2) {
+		printk
+		    ("gdb_hook_interrupt: Could not clear IER, not a UART!\n");
+		local_irq_restore(flags);
+		return 1;	/* We failed; there's nothing here */
+	}
+	scratch2 = inb_p(port + UART_LCR);
+	outb_px(port + UART_LCR, 0xBF);	/* set up for StarTech test */
+	outb_px(port + UART_EFR, 0);	/* EFR is the same as FCR */
+	outb_px(port + UART_LCR, 0);
+	outb_px(port + UART_FCR, UART_FCR_ENABLE_FIFO);
+	scratch = inb_p(port + UART_IIR) >> 6;
+	if (scratch == 1) {
+		printk("gdb_hook_interrupt: Undefined UART type!"
+		       "  Not a UART! \n");
+		local_irq_restore(flags);
+		return 1;
+	} else {
+		dbprintk(("gdb_hook_interrupt: UART type "
+			  "is %d where 0=16450, 2=16550 3=16550A\n", scratch));
+	}
+	scratch = inb_p(port + UART_MCR);
+	outb_px(port + UART_MCR, UART_MCR_LOOP | scratch);
+	outb_px(port + UART_MCR, UART_MCR_LOOP | 0x0A);
+	scratch2 = inb_p(port + UART_MSR) & 0xF0;
+	outb_px(port + UART_MCR, scratch);
+	if (scratch2 != 0x90) {
+		printk("gdb_hook_interrupt: "
+		       "Loop back test failed! Not a UART!\n");
+		local_irq_restore(flags);
+		return scratch2 + 1000;	/* force 0 to fail */
+	}
+#endif				/* test existance */
+	program_uart(info);
+	local_irq_restore(flags);
+
+	return (0);
+
+}				/* gdb_hook_interrupt */
+
+static void
+program_uart(struct async_struct *info)
+{
+	int port = info->port;
+
+	(void) inb_p(port + UART_RX);
+	outb_px(port + UART_IER, 0);
+
+	(void) inb_p(port + UART_RX);	/* serial driver comments say */
+	(void) inb_p(port + UART_IIR);	/* this clears the interrupt regs */
+	(void) inb_p(port + UART_MSR);
+	outb_px(port + UART_LCR, UART_LCR_WLEN8 | UART_LCR_DLAB);
+	outb_px(port + UART_DLL, info->state->custom_divisor & 0xff);	/* LS */
+	outb_px(port + UART_DLM, info->state->custom_divisor >> 8);	/* MS  */
+	outb_px(port + UART_MCR, info->MCR);
+
+	outb_px(port + UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1 | UART_FCR_CLEAR_XMIT | UART_FCR_CLEAR_RCVR);	/* set fcr */
+	outb_px(port + UART_LCR, UART_LCR_WLEN8);	/* reset DLAB */
+	outb_px(port + UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1);	/* set fcr */
+	if (!ints_disabled) {
+		intprintk(("KGDB: Sending %d to port %x offset %d\n",
+			   gdb_async_info->IER,
+			   (int) gdb_async_info->port, UART_IER));
+		outb_px(gdb_async_info->port + UART_IER, gdb_async_info->IER);
+	}
+	return;
+}
+
+/*
+ * tty_getDebugChar
+ *
+ * This is a GDB stub routine.	It waits for a character from the
+ * serial interface and then returns it.  If there is no serial
+ * interface connection then it returns a bogus value which will
+ * almost certainly cause the system to hang.  In the
+ */
+int kgdb_in_isr = 0;
+int kgdb_in_lsr = 0;
+extern spinlock_t kgdb_spinlock;
+
+/* Caller takes needed protections */
+
+int
+tty_getDebugChar(void)
+{
+	volatile int chr, dum, time, end_time;
+
+	dbprintk(("tty_getDebugChar(port %x): ", gdb_async_info->port));
+
+	if (gdb_async_info == NULL) {
+		gdb_hook_interrupt(&local_info, 0);
+	}
+	/*
+	 * This trick says if we wait a very long time and get
+	 * no char, return the -1 and let the upper level deal
+	 * with it.
+	 */
+	rdtsc(dum, time);
+	end_time = time + 2;
+	while (((chr = read_char(gdb_async_info)) == -1) &&
+	       (end_time - time) > 0) {
+		rdtsc(dum, time);
+	};
+	/*
+	 * This covers our butts if some other code messes with
+	 * our uart, hay, it happens :o)
+	 */
+	if (chr == -1)
+		program_uart(gdb_async_info);
+
+	dbprintk(("%c\n", chr > ' ' && chr < 0x7F ? chr : ' '));
+	return (chr);
+
+}				/* tty_getDebugChar */
+
+static int count = 3;
+static spinlock_t one_at_atime = SPIN_LOCK_UNLOCKED;
+
+static int __init
+kgdb_enable_ints(void)
+{
+	if (kgdboe) {
+		return 0;
+	}
+	if (gdb_async_info == NULL) {
+		gdb_hook_interrupt(&local_info, 1);
+	}
+	ok_to_enable_ints = 1;
+	kgdb_enable_ints_now();
+#ifdef CONFIG_KGDB_USER_CONSOLE
+	kgdb_console_finit();
+#endif
+	return 0;
+}
+
+#ifdef CONFIG_SERIAL_8250
+void shutdown_for_kgdb(struct async_struct *gdb_async_info);
+#endif
+
+#ifdef CONFIG_DISCONTIGMEM
+static inline int kgdb_mem_init_done(void)
+{
+	return highmem_start_page != NULL;
+}
+#else
+static inline int kgdb_mem_init_done(void)
+{
+	return max_mapnr != 0;
+}
+#endif
+
+static void
+kgdb_enable_ints_now(void)
+{
+	if (!spin_trylock(&one_at_atime))
+		return;
+	if (!ints_disabled)
+		goto exit;
+	if (kgdb_mem_init_done() &&
+			ints_disabled) {	/* don't try till mem init */
+#ifdef CONFIG_SERIAL_8250
+		/*
+		 * The ifdef here allows the system to be configured
+		 * without the serial driver.
+		 * Don't make it a module, however, it will steal the port
+		 */
+		shutdown_for_kgdb(gdb_async_info);
+#endif
+		ints_disabled = request_irq(gdb_async_info->state->irq,
+					    gdb_interrupt,
+					    IRQ_T(gdb_async_info),
+					    "KGDB-stub", NULL);
+		intprintk(("KGDB: request_irq returned %d\n", ints_disabled));
+	}
+	if (!ints_disabled) {
+		intprintk(("KGDB: Sending %d to port %x offset %d\n",
+			   gdb_async_info->IER,
+			   (int) gdb_async_info->port, UART_IER));
+		outb_px(gdb_async_info->port + UART_IER, gdb_async_info->IER);
+	}
+      exit:
+	spin_unlock(&one_at_atime);
+}
+
+/*
+ * tty_putDebugChar
+ *
+ * This is a GDB stub routine.	It waits until the interface is ready
+ * to transmit a char and then sends it.  If there is no serial
+ * interface connection then it simply returns to its caller, having
+ * pretended to send the char.	Caller takes needed protections.
+ */
+void
+tty_putDebugChar(int chr)
+{
+	dbprintk(("tty_putDebugChar(port %x): chr=%02x '%c', ints_on=%d\n",
+		  gdb_async_info->port,
+		  chr,
+		  chr > ' ' && chr < 0x7F ? chr : ' ', ints_disabled ? 0 : 1));
+
+	if (gdb_async_info == NULL) {
+		gdb_hook_interrupt(&local_info, 0);
+	}
+
+	write_char(gdb_async_info, chr);	/* this routine will wait */
+	count = (chr == '#') ? 0 : count + 1;
+	if ((count == 2)) {	/* try to enable after */
+		if (ints_disabled & ok_to_enable_ints)
+			kgdb_enable_ints_now();	/* try to enable after */
+
+		/* We do this a lot because, well we really want to get these
+		 * interrupts.	The serial driver will clear these bits when it
+		 * initializes the chip.  Every thing else it does is ok,
+		 * but this.
+		 */
+		if (!ints_disabled) {
+			outb_px(gdb_async_info->port + UART_IER,
+				gdb_async_info->IER);
+		}
+	}
+
+}				/* tty_putDebugChar */
+
+/*
+ * This does nothing for the serial port, since it doesn't buffer.
+ */
+
+void tty_flushDebugChar(void)
+{
+}
+
+module_init(kgdb_enable_ints);
--- diff/arch/i386/mm/mmap.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/i386/mm/mmap.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,69 @@
+/*
+ *  linux/arch/i386/mm/mmap.c
+ *
+ *  flexible mmap layout support
+ *
+ * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
+ * All Rights Reserved.
+ *
+ * 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
+ *
+ *
+ * Started by Ingo Molnar <mingo@elte.hu>
+ */
+
+#include <linux/personality.h>
+#include <linux/mm.h>
+
+/*
+ * Top of mmap area (just below the process stack).
+ *
+ * Leave an at least ~128 MB hole.
+ */
+#define MIN_GAP (128*1024*1024)
+#define MAX_GAP (TASK_SIZE/6*5)
+
+static inline unsigned long mmap_base(struct mm_struct *mm)
+{
+	unsigned long gap = current->rlim[RLIMIT_STACK].rlim_cur;
+
+	if (gap < MIN_GAP)
+		gap = MIN_GAP;
+	else if (gap > MAX_GAP)
+		gap = MAX_GAP;
+
+	return TASK_SIZE - (gap & PAGE_MASK);
+}
+
+/*
+ * This function, called very early during the creation of a new
+ * process VM image, sets up which VM layout function to use:
+ */
+void arch_pick_mmap_layout(struct mm_struct *mm)
+{
+	/*
+	 * Fall back to the standard layout if the personality
+	 * bit is set:
+	 */
+	if (current->personality & ADDR_COMPAT_LAYOUT) {
+		mm->mmap_base = TASK_UNMAPPED_BASE;
+		mm->get_unmapped_area = arch_get_unmapped_area;
+		mm->unmap_area = arch_unmap_area;
+	} else {
+		mm->mmap_base = mmap_base(mm);
+		mm->get_unmapped_area = arch_get_unmapped_area_topdown;
+		mm->unmap_area = arch_unmap_area_topdown;
+	}
+}
--- diff/arch/ia64/kernel/kgdb_stub.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ia64/kernel/kgdb_stub.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,3010 @@
+/*
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * General Public License for more details.
+ *
+ */
+
+/*
+ * Copyright (c) 2000 VERITAS Software Corporation.
+ *
+ */
+/****************************************************************************
+ *  Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
+ *
+ *  Module name: remcom.c $
+ *  Revision: 1.34 $
+ *  Date: 91/03/09 12:29:49 $
+ *  Contributor:     Lake Stevens Instrument Division$
+ *
+ *  Description:     low level support for gdb debugger. $
+ *
+ *  Considerations:  only works on target hardware $
+ *
+ *  Written by:	     Glenn Engel $
+ *  Updated by:	     David Grothe <dave@gcom.com>
+ *  Updated by:	     Robert Walsh <rjwalsh@durables.org>
+ *  Updated by:	     wangdi <wangdi@clusterfs.com>
+ *  ModuleState:     Experimental $
+ *
+ *  NOTES:	     See Below $
+ *
+ *  Modified for 386 by Jim Kingdon, Cygnus Support.
+ *  Compatibility with 2.1.xx kernel by David Grothe <dave@gcom.com>
+ *
+ *  Changes to allow auto initilization.  All that is needed is that it
+ *  be linked with the kernel and a break point (int 3) be executed.
+ *  The header file <asm/kgdb.h> defines BREAKPOINT to allow one to do
+ *  this. It should also be possible, once the interrupt system is up, to
+ *  call putDebugChar("+").  Once this is done, the remote debugger should
+ *  get our attention by sending a ^C in a packet. George Anzinger
+ *  <george@mvista.com>
+ *  Integrated into 2.2.5 kernel by Tigran Aivazian <tigran@sco.com>
+ *  Added thread support, support for multiple processors,
+ *	support for ia-32(x86) hardware debugging.
+ *	Amit S. Kale ( akale@veritas.com )
+ *
+ *  Modified to support debugging over ethernet by Robert Walsh
+ *  <rjwalsh@durables.org> and wangdi <wangdi@clusterfs.com>, based on
+ *  code by San Mehat.
+ *
+ *
+ *  To enable debugger support, two things need to happen.  One, a
+ *  call to set_debug_traps() is necessary in order to allow any breakpoints
+ *  or error conditions to be properly intercepted and reported to gdb.
+ *  Two, a breakpoint needs to be generated to begin communication.  This
+ *  is most easily accomplished by a call to breakpoint().  Breakpoint()
+ *  simulates a breakpoint by executing an int 3.
+ *
+ *************
+ *
+ *    The following gdb commands are supported:
+ *
+ * command	    function				   Return value
+ *
+ *    g		    return the value of the CPU registers  hex data or ENN
+ *    G		    set the value of the CPU registers	   OK or ENN
+ *
+ *    mAA..AA,LLLL  Read LLLL bytes at address AA..AA	   hex data or ENN
+ *    MAA..AA,LLLL: Write LLLL bytes at address AA.AA	   OK or ENN
+ *
+ *    c		    Resume at current address		   SNN	 ( signal NN)
+ *    cAA..AA	    Continue at address AA..AA		   SNN
+ *
+ *    s		    Step one instruction		   SNN
+ *    sAA..AA	    Step one instruction from AA..AA	   SNN
+ *
+ *    k		    kill
+ *
+ *    ?		    What was the last sigval ?		   SNN	 (signal NN)
+ *
+ * All commands and responses are sent with a packet which includes a
+ * checksum.  A packet consists of
+ *
+ * $<packet info>#<checksum>.
+ *
+ * where
+ * <packet info> :: <characters representing the command or response>
+ * <checksum>	 :: < two hex digits computed as modulo 256 sum of <packetinfo>>
+ *
+ * When a packet is received, it is first acknowledged with either '+' or '-'.
+ * '+' indicates a successful transfer.	 '-' indicates a failed transfer.
+ *
+ * Example:
+ *
+ * Host:		  Reply:
+ * $m0,10#2a		   +$00010203040506070809101112131415#42
+ *
+ ****************************************************************************/
+#define KGDB_VERSION "<20030915.1651.33>"
+#include <linux/config.h>
+#include <linux/types.h>
+#include <asm/string.h>		/* for strcpy */
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <asm/system.h>
+#include <asm/ptrace.h>		/* for linux pt_regs struct */
+#include <asm/kgdb_local.h>
+#include <linux/list.h>
+#include <asm/atomic.h>
+#include <asm/processor.h>
+#include <asm/unwind.h>
+#include <asm/delay.h>
+#include <asm/sections.h>
+#include <linux/irq.h>
+#include <linux/reboot.h>
+#include <linux/inet.h>
+#include <linux/netpoll.h>
+
+/*
+ * IA64 ToDo:
+ *	1) more testing needs to be done when modifying registers.
+ *	2) probably could use cleanup in register get/put from unw_info but gdb work
+ *	   is on going (WIP) to reduce g-packet on wire for serial
+ *	3) until gdb work is complete and accepted by gdb folks, the serial interface
+ *	   isn't complete.  the current g-packet is over 10,000 bytes which is too
+ *	   large for a serial line. without a g-packet a delay is used with large putpacket
+	   requests.  however, this won't solve a gdb sent packet which is a g-packet.
+ *	4) NMI for hung machine.  Well we don't have real NMI!
+ */
+
+/************************************************************************
+ *
+ * external low-level support routines
+ */
+typedef void (*Function) (void);	/* pointer to a function */
+
+/* Thread reference */
+typedef unsigned char threadref[8];
+
+extern int tty_putDebugChar(int);     /* write a single character      */
+extern int tty_getDebugChar(void);    /* read and return a single char */
+extern void tty_flushDebugChar(void); /* flush pending characters      */
+extern int eth_putDebugChar(int);     /* write a single character      */
+extern int eth_getDebugChar(void);    /* read and return a single char */
+extern void eth_flushDebugChar(void); /* flush pending characters      */
+
+/************************************************************************/
+/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
+/* at least NUMREGBYTES*2 are needed for register packets */
+/* Longer buffer is needed to list all threads */
+/* purloined from gdb ia64 config support */
+#define NUM_REGS 590
+#define REGISTER_BYTES (NUM_REGS*8+128*8)
+#define REGISTER_BYTE(N) (((N) * 8) \
+  + ((N) <= IA64_FR0_REGNUM ? 0 : 8 * (((N) > IA64_FR127_REGNUM) ? 128 : (N) - IA64_FR0_REGNUM)))
+#define	REGISTER_SIZE(N) (((N) >= IA64_FR0_REGNUM && (N) <= IA64_FR127_REGNUM) ? 16 : 8)
+#define IA64_GR0_REGNUM         0
+#define IA64_FR0_REGNUM         128
+#define IA64_FR127_REGNUM       (IA64_FR0_REGNUM+127)
+#define IA64_PR0_REGNUM         256
+#define IA64_BR0_REGNUM         320
+#define IA64_VFP_REGNUM         328
+#define IA64_PR_REGNUM          330
+#define IA64_IP_REGNUM          331
+#define IA64_PSR_REGNUM         332
+#define IA64_CFM_REGNUM         333
+#define IA64_AR0_REGNUM         334
+#define IA64_NAT0_REGNUM        462
+#define IA64_NAT31_REGNUM       (IA64_NAT0_REGNUM+31)
+#define IA64_NAT32_REGNUM       (IA64_NAT0_REGNUM+32)
+#define IA64_RSC_REGNUM		(IA64_AR0_REGNUM+16)
+#define IA64_BSP_REGNUM		(IA64_AR0_REGNUM+17)
+#define IA64_BSPSTORE_REGNUM	(IA64_AR0_REGNUM+18)
+#define IA64_RNAT_REGNUM	(IA64_AR0_REGNUM+19)
+#define IA64_FCR_REGNUM		(IA64_AR0_REGNUM+21)
+#define IA64_EFLAG_REGNUM	(IA64_AR0_REGNUM+24)
+#define IA64_CSD_REGNUM		(IA64_AR0_REGNUM+25)
+#define IA64_SSD_REGNUM		(IA64_AR0_REGNUM+26)
+#define IA64_CFLG_REGNUM	(IA64_AR0_REGNUM+27)
+#define IA64_FSR_REGNUM		(IA64_AR0_REGNUM+28)
+#define IA64_FIR_REGNUM		(IA64_AR0_REGNUM+29)
+#define IA64_FDR_REGNUM		(IA64_AR0_REGNUM+30)
+#define IA64_CCV_REGNUM		(IA64_AR0_REGNUM+32)
+#define IA64_UNAT_REGNUM	(IA64_AR0_REGNUM+36)
+#define IA64_FPSR_REGNUM	(IA64_AR0_REGNUM+40)
+#define IA64_ITC_REGNUM		(IA64_AR0_REGNUM+44)
+#define IA64_PFS_REGNUM		(IA64_AR0_REGNUM+64)
+#define IA64_LC_REGNUM		(IA64_AR0_REGNUM+65)
+#define IA64_EC_REGNUM		(IA64_AR0_REGNUM+66)
+
+#define	REGISTER_INDEX(N)	(REGISTER_BYTE(N) / sizeof (unsigned long))
+#define BUFMAX (REGISTER_BYTES*2+10)
+static char remcomInBuffer[BUFMAX];
+static char remcomOutBuffer[BUFMAX];
+static short error;
+
+
+char *kgdb_version = KGDB_VERSION;
+
+/*  debug >  0 prints ill-formed commands in valid packets & checksum errors */
+int debug_regs = 0;		/* set to non-zero to print registers */
+
+/* filled in by an external module */
+char *gdb_module_offsets;
+
+static const char hexchars[] = "0123456789abcdef";
+
+/* Number of bytes of registers.  */
+#define NUMREGBYTES 	REGISTER_BYTES
+#define	BREAKNUM	0x00003333300LL
+#define	KGDBBREAKNUM	0x6665UL
+
+static void inline
+kgdb_pc(struct pt_regs *regs, unsigned long pc)
+{
+	regs->cr_iip = pc & ~0xf;
+	ia64_psr(regs)->ri = pc & 0x3;
+	return;
+}
+
+void
+breakpoint(void)
+{
+	asm volatile ("break.m 0x6665");
+}
+
+/***************************  ASSEMBLY CODE MACROS *************************/
+/*
+ * Put the error code here just in case the user cares.
+ * Likewise, the vector number here (since GDB only gets the signal
+ * number through the usual means, and that's not very specific).
+ * The called_from is the return address so he can tell how we entered kgdb.
+ * This will allow him to seperate out the various possible entries.
+ */
+#define REMOTE_DEBUG 0		/* set != to turn on printing (also available in info) */
+
+#define PID_MAX PID_MAX_DEFAULT
+
+#ifdef CONFIG_SMP
+void smp_send_nmi_allbutself(void);
+#define IF_SMP(x) x
+#undef MAX_NO_CPUS
+#ifndef CONFIG_NO_KGDB_CPUS
+#define CONFIG_NO_KGDB_CPUS 2
+#endif
+#if CONFIG_NO_KGDB_CPUS > NR_CPUS
+#define MAX_NO_CPUS NR_CPUS
+#else
+#define MAX_NO_CPUS CONFIG_NO_KGDB_CPUS
+#endif
+#define hold_init hold_on_sstep: 1,
+#define MAX_CPU_MASK (unsigned long)((1LL << MAX_NO_CPUS) - 1LL)
+#define NUM_CPUS num_online_cpus()
+#else
+#define IF_SMP(x)
+#define hold_init
+#undef MAX_NO_CPUS
+#define MAX_NO_CPUS 1
+#define NUM_CPUS 1
+#endif
+#define NOCPU (struct task_struct *)0xbad1fbad
+struct kgdb_state {
+	int		exceptionVector;
+	int		signo;
+	unsigned long	err_code;
+	struct pt_regs *regs;
+	struct unw_frame_info
+			*unw;
+	int		ret;
+};
+/* *INDENT-OFF*	 */
+struct kgdb_info {
+	int used_malloc;
+	void *called_from;
+	long long entry_itc;
+	int errcode;
+	unsigned long vector;
+	int print_debug_info;
+	unsigned long ia64_regs[REGISTER_BYTES / sizeof(long)];
+#ifdef CONFIG_SMP
+	int hold_on_sstep;
+	struct {
+		volatile struct task_struct *task;
+		int pid;
+		int hold;
+		struct pt_regs *regs;
+		unsigned long ia64_regs[REGISTER_BYTES / sizeof(long)];
+	} cpus_waiting[MAX_NO_CPUS];
+#endif
+} kgdb_info = {hold_init print_debug_info:REMOTE_DEBUG, vector:-1UL};
+
+/* *INDENT-ON*	*/
+
+#define used_m kgdb_info.used_malloc
+/*
+ * This is little area we set aside to contain the stack we
+ * need to build to allow gdb to call functions.  We use one
+ * per cpu to avoid locking issues.  We will do all this work
+ * with interrupts off so that should take care of the protection
+ * issues.
+ */
+#define	MAX_HW_BREAKPOINT	(20)
+long hw_break_total_dbr, hw_break_total_ibr;
+#define	HW_BREAKPOINT	(hw_break_total_dbr + hw_break_total_ibr)
+#define	WATCH_INSTRUCTION	0x0
+#define WATCH_WRITE		0x1
+#define	WATCH_READ		0x2
+#define	WATCH_ACCESS		0x3
+
+#define	HWCAP_DBR	((1 << WATCH_WRITE) | (1 << WATCH_READ))
+#define	HWCAP_IBR	(1 << WATCH_INSTRUCTION)
+struct hw_breakpoint {
+	unsigned enabled;
+	unsigned long capable;
+	unsigned long type;
+	unsigned long mask;
+	unsigned long addr;
+} *breakinfo;
+
+#define LOOKASIDE_SIZE (200 + (sizeof(struct hw_breakpoint) * MAX_HW_BREAKPOINT))
+#define MALLOC_MAX   LOOKASIDE_SIZE	/* Max malloc size */
+struct {
+	unsigned int esp;
+	int array[LOOKASIDE_SIZE];
+} fn_call_lookaside[MAX_NO_CPUS];
+
+#define IF_BIT 0x200
+#define TF_BIT 0x100
+
+#define MALLOC_ROUND 8-1
+
+static char malloc_array[MALLOC_MAX];
+IF_SMP(static void to_gdb(const char *mess));
+void *
+malloc(int size)
+{
+
+	if (size <= (MALLOC_MAX - used_m)) {
+		int old_used = used_m;
+		used_m += ((size + MALLOC_ROUND) & (~MALLOC_ROUND));
+		return &malloc_array[old_used];
+	} else {
+		return NULL;
+	}
+}
+
+/*
+ * I/O dispatch functions...
+ * Based upon kgdboe, either call the ethernet
+ * handler or the serial one..
+ */
+void
+putDebugChar(int c)
+{
+	if (!kgdboe) {
+		tty_putDebugChar(c);
+	} else {
+		eth_putDebugChar(c);
+	}
+}
+
+int
+getDebugChar(void)
+{
+	if (!kgdboe) {
+		char ch;
+		while (1) {
+			ch = tty_getDebugChar() & 0x7f;
+			if (ch != 0x7f)
+				return ch;
+		}
+	} else {
+		return eth_getDebugChar();
+	}
+}
+
+void
+flushDebugChar(void)
+{
+	if (!kgdboe) {
+		tty_flushDebugChar();
+	} else {
+		eth_flushDebugChar();
+	}
+}
+
+/*
+ * Gdb calls functions by pushing agruments, including a return address
+ * on the stack and the adjusting EIP to point to the function.	 The
+ * whole assumption in GDB is that we are on a different stack than the
+ * one the "user" i.e. code that hit the break point, is on.  This, of
+ * course is not true in the kernel.  Thus various dodges are needed to
+ * do the call without directly messing with EIP (which we can not change
+ * as it is just a location and not a register.	 To adjust it would then
+ * require that we move every thing below EIP up or down as needed.  This
+ * will not work as we may well have stack relative pointer on the stack
+ * (such as the pointer to regs, for example).
+
+ * So here is what we do:
+ * We detect gdb attempting to store into the stack area and instead, store
+ * into the fn_call_lookaside.array at the same relative location as if it
+ * were the area ESP pointed at.  We also trap ESP modifications
+ * and uses these to adjust fn_call_lookaside.esp.  On entry
+ * fn_call_lookaside.esp will be set to point at the last entry in
+ * fn_call_lookaside.array.  This allows us to check if it has changed, and
+ * if so, on exit, we add the registers we will use to do the move and a
+ * trap/ interrupt return exit sequence.  We then adjust the eflags in the
+ * regs array (remember we now have a copy in the fn_call_lookaside.array) to
+ * kill the interrupt bit, AND we change EIP to point at our set up stub.
+ * As part of the register set up we preset the registers to point at the
+ * begining and end of the fn_call_lookaside.array, so all the stub needs to
+ * do is move words from the array to the stack until ESP= the desired value
+ * then do the rti.  This will then transfer to the desired function with
+ * all the correct registers.  Nifty huh?
+ */
+extern asmlinkage void fn_call_stub(void);
+extern asmlinkage void fn_rtn_stub(void);
+/*					   *INDENT-OFF*	 */
+/*__asm__("fn_rtn_stub:\n\t"
+	"movl %eax,%esp\n\t"
+	"fn_call_stub:\n\t"
+	"1:\n\t"
+	"addl $-4,%ebx\n\t"
+	"movl (%ebx), %eax\n\t"
+	"pushl %eax\n\t"
+	"cmpl %esp,%ecx\n\t"
+	"jne  1b\n\t"
+	"popl %eax\n\t"
+	"popl %ebx\n\t"
+	"popl %ecx\n\t"
+	"iret \n\t");
+*/
+/*					     *INDENT-ON*  */
+#define gdb_ia64vector	kgdb_info.vector
+#define gdb_ia64errcode kgdb_info.errcode
+#define waiting_cpus	kgdb_info.cpus_waiting
+#define remote_debug	kgdb_info.print_debug_info
+#define hold_cpu(cpu)	kgdb_info.cpus_waiting[cpu].hold
+/* gdb locks */
+
+#ifdef CONFIG_SMP
+static int in_kgdb_called;
+static spinlock_t waitlocks[MAX_NO_CPUS] =
+    {[0 ... MAX_NO_CPUS - 1] = SPIN_LOCK_UNLOCKED };
+/*
+ * The following array has the thread pointer of each of the "other"
+ * cpus.  We make it global so it can be seen by gdb.
+ */
+volatile int in_kgdb_entry_log[MAX_NO_CPUS];
+volatile struct pt_regs *in_kgdb_here_log[MAX_NO_CPUS];
+/*
+static spinlock_t continuelocks[MAX_NO_CPUS];
+*/
+spinlock_t kgdb_spinlock = SPIN_LOCK_UNLOCKED;
+/* waiters on our spinlock plus us */
+static atomic_t spinlock_waiters = ATOMIC_INIT(1);
+static int spinlock_count = 0;
+static int spinlock_cpu = 0;
+/*
+ * Note we use nested spin locks to account for the case where a break
+ * point is encountered when calling a function by user direction from
+ * kgdb. Also there is the memory exception recursion to account for.
+ * Well, yes, but this lets other cpus thru too.  Lets add a
+ * cpu id to the lock.
+ */
+#define KGDB_SPIN_LOCK(x) if( spinlock_count == 0 || \
+			      spinlock_cpu != smp_processor_id()){\
+				      atomic_inc(&spinlock_waiters); \
+				      while (! spin_trylock(x)) {\
+					    in_kgdb(linux_regs, unw_info);\
+				      }\
+				      atomic_dec(&spinlock_waiters); \
+				      spinlock_count = 1; \
+				      spinlock_cpu = smp_processor_id(); \
+			  }else{  \
+				      spinlock_count++; \
+			  }
+#define KGDB_SPIN_UNLOCK(x) if( --spinlock_count == 0) spin_unlock(x)
+#else
+unsigned kgdb_spinlock = 0;
+#define KGDB_SPIN_LOCK(x) --*x
+#define KGDB_SPIN_UNLOCK(x) ++*x
+#endif
+
+int
+hex(char ch)
+{
+	if ((ch >= 'a') && (ch <= 'f'))
+		return (ch - 'a' + 10);
+	if ((ch >= '0') && (ch <= '9'))
+		return (ch - '0');
+	if ((ch >= 'A') && (ch <= 'F'))
+		return (ch - 'A' + 10);
+	return (-1);
+}
+
+/* scan for the sequence $<data>#<checksum>	*/
+void
+getpacket(char *buffer)
+{
+	unsigned char checksum;
+	unsigned char xmitcsum;
+	int i;
+	int count;
+	char ch;
+
+	do {
+		/* wait around for the start character, ignore all other characters */
+		while ((ch = (getDebugChar() & 0x7f)) != '$') ;
+		checksum = 0;
+		xmitcsum = -1;
+
+		count = 0;
+
+		/* now, read until a # or end of buffer is found */
+		while (count < BUFMAX) {
+			ch = getDebugChar() & 0x7f;
+			if (ch == '#')
+				break;
+			checksum = checksum + ch;
+			buffer[count] = ch;
+			count = count + 1;
+		}
+		buffer[count] = 0;
+
+		if (ch == '#') {
+			xmitcsum = hex(getDebugChar() & 0x7f) << 4;
+			xmitcsum += hex(getDebugChar() & 0x7f);
+			if ((remote_debug) && (checksum != xmitcsum)) {
+				printk
+				    ("bad checksum.	My count = 0x%x, sent=0x%x. buf=%s\n",
+				     checksum, xmitcsum, buffer);
+			}
+
+			if (checksum != xmitcsum) {
+				putDebugChar('-');	/* failed checksum */
+			}
+			else {
+				putDebugChar('+');	/* successful transfer */
+				/* if a sequence char is present, reply the sequence ID */
+				if (buffer[2] == ':') {
+					putDebugChar(buffer[0]);
+					putDebugChar(buffer[1]);
+					/* remove sequence chars from buffer */
+					count = strlen(buffer);
+					for (i = 3; i <= count; i++)
+						buffer[i - 3] = buffer[i];
+				}
+			}
+		}
+	} while (checksum != xmitcsum);
+
+	if (remote_debug)
+		printk("R:%s\n", buffer);
+	flushDebugChar();
+}
+
+/* send the packet in buffer.  */
+
+void
+putpacket(char *buffer)
+{
+	unsigned char checksum;
+	int count;
+	char ch;
+
+	/*  $<packet info>#<checksum>. */
+
+	if (!kgdboe) {
+		do {
+			if (remote_debug)
+				printk("T:%s\n", buffer);
+			putDebugChar('$');
+			checksum = 0;
+			count = 0;
+
+			while ((ch = buffer[count])) {
+				putDebugChar(ch);
+				checksum += ch;
+				count += 1;
+			}
+
+			putDebugChar('#');
+			putDebugChar(hexchars[checksum >> 4]);
+			putDebugChar(hexchars[checksum % 16]);
+			flushDebugChar();
+
+		} while ((getDebugChar() & 0x7f) != '+');
+	} else {
+		/*
+		 * For udp, we can not transfer too much bytes once.
+		 * We only transfer MAX_SEND_COUNT size bytes each time
+		 */
+
+#define MAX_SEND_COUNT 30
+
+		int send_count = 0, i = 0;
+		char send_buf[MAX_SEND_COUNT];
+
+		do {
+			if (remote_debug)
+				printk("T:%s\n", buffer);
+			putDebugChar('$');
+			checksum = 0;
+			count = 0;
+			send_count = 0;
+			while ((ch = buffer[count])) {
+				if (send_count >= MAX_SEND_COUNT) {
+					for(i = 0; i < MAX_SEND_COUNT; i++) {
+						putDebugChar(send_buf[i]);
+					}
+					flushDebugChar();
+					send_count = 0;
+				} else {
+					send_buf[send_count] = ch;
+					checksum += ch;
+					count ++;
+					send_count++;
+				}
+			}
+			for(i = 0; i < send_count; i++)
+				putDebugChar(send_buf[i]);
+			putDebugChar('#');
+			putDebugChar(hexchars[checksum >> 4]);
+			putDebugChar(hexchars[checksum % 16]);
+			flushDebugChar();
+		} while ((getDebugChar() & 0x7f) != '+');
+	}
+}
+
+
+void
+debug_error(char *format, char *parm)
+{
+	if (remote_debug)
+		printk(format, parm);
+}
+
+static void
+print_regs(struct pt_regs *regs)
+{
+	printk("B0=0x%lx\n", regs->b0);
+	printk("IPSR=0x%lx\n", regs->cr_ipsr);
+	printk("IIP=0x%lx\n", regs->cr_iip);
+	printk("\n");
+
+}				/* print_regs */
+
+
+
+static void
+unw_ar_regs(struct unw_frame_info *unw, unsigned long *regs, int put)
+{
+	if (put)
+		unw_access_ar(unw, UNW_AR_BSP, &regs[REGISTER_INDEX(IA64_BSP_REGNUM)], put);
+	else
+		unw_get_bsp(unw, &regs[REGISTER_INDEX(IA64_BSP_REGNUM)]);
+	unw_access_ar(unw, UNW_AR_BSPSTORE, &regs[REGISTER_INDEX(IA64_BSPSTORE_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_PFS, &regs[REGISTER_INDEX(IA64_PFS_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_RNAT, &regs[REGISTER_INDEX(IA64_RNAT_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_UNAT, &regs[REGISTER_INDEX(IA64_UNAT_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_LC, &regs[REGISTER_INDEX(IA64_LC_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_EC, &regs[REGISTER_INDEX(IA64_EC_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_FPSR, &regs[REGISTER_INDEX(IA64_FPSR_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_RSC, &regs[REGISTER_INDEX(IA64_RSC_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_CCV, &regs[REGISTER_INDEX(IA64_CCV_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_CSD, &regs[REGISTER_INDEX(IA64_CSD_REGNUM)], put);
+	unw_access_ar(unw, UNW_AR_SSD, &regs[REGISTER_INDEX(IA64_SSD_REGNUM)], put);
+	return;
+}
+
+static void
+unw_get_regs(struct unw_frame_info *unw, unsigned long *regs, struct pt_regs *ptregs)
+{
+	int i, j;
+	char nat;
+	unsigned long *preg;
+	struct ia64_fpreg *fr, freg;
+
+	memset(regs, 0, sizeof (kgdb_info.ia64_regs));
+
+	for (i = 1; i < 32; i++) {
+		if (ptregs && ((i >= 8 && i <= 11) || (i >= 12 && i <= 15)))
+			continue;
+		unw_access_gr(unw, i, &regs[REGISTER_INDEX(IA64_GR0_REGNUM + i)], &nat, 0);
+		regs[REGISTER_INDEX(IA64_NAT0_REGNUM + i)] = nat;
+	}
+
+	if (ptregs) {
+		for (preg = &ptregs->r8, i = 8; i < 12; i++, preg++)
+			regs[REGISTER_INDEX(IA64_GR0_REGNUM + i)] = *preg;
+		regs[REGISTER_INDEX(IA64_GR0_REGNUM + 12)] = ptregs->r12;
+		regs[REGISTER_INDEX(IA64_GR0_REGNUM + 13)] = ptregs->r13;
+		regs[REGISTER_INDEX(IA64_GR0_REGNUM + 14)] = ptregs->r14;
+		regs[REGISTER_INDEX(IA64_GR0_REGNUM + 15)] = ptregs->r15;
+	}
+
+	for (i = 1; i < 8; i++) {
+		if (ptregs && (i == 6 || i == 7))
+			continue;
+		unw_access_br(unw, i, &regs[REGISTER_INDEX(IA64_BR0_REGNUM + i)], 0);
+	}
+
+	if (ptregs) {
+		regs[REGISTER_INDEX(IA64_BR0_REGNUM)] = ptregs->b0;
+		regs[REGISTER_INDEX(IA64_BR0_REGNUM + 6)] = ptregs->b6;
+		regs[REGISTER_INDEX(IA64_BR0_REGNUM + 7)] = ptregs->b7;
+	} else {
+		unw_access_br(unw, i, &regs[REGISTER_INDEX(IA64_BR0_REGNUM + 6)], 0);
+		unw_access_br(unw, i, &regs[REGISTER_INDEX(IA64_BR0_REGNUM + 7)], 0);
+		unw_access_br(unw, 0, &regs[REGISTER_INDEX(IA64_BR0_REGNUM)], 0);
+	}
+
+	if (ptregs)
+		fr = &ptregs->f6;
+	else
+		fr = &freg;
+
+	for (i = 6; i < 12; i++) {
+		if (!ptregs)
+			unw_access_fr(unw, i, fr, 0);
+		regs[REGISTER_INDEX(IA64_FR0_REGNUM + 6 + i)] = fr->u.bits[0];
+		regs[REGISTER_INDEX(IA64_FR0_REGNUM + 6 + i + 1)] = fr->u.bits[1];
+		if (ptregs)
+			fr++;
+	}
+
+	unw_ar_regs(unw, regs, 0);
+
+	unw_access_pr(unw, &regs[REGISTER_INDEX(IA64_PR_REGNUM)], 0);
+	for (j = 1, i = 0; i < 64; i++, j <<= 1, i++)
+		regs[REGISTER_INDEX(IA64_PR0_REGNUM + i)] =
+			(regs[REGISTER_INDEX(IA64_PR_REGNUM)] & j) ? 1 : 0;
+
+
+	if (!ptregs) {
+		unw_get_ip(unw, &regs[REGISTER_INDEX(IA64_IP_REGNUM)]);
+		unw_get_cfm(unw, &regs[REGISTER_INDEX(IA64_CFM_REGNUM)]);
+	} else {
+		regs[REGISTER_INDEX(IA64_IP_REGNUM)] = ptregs->cr_iip;
+		regs[REGISTER_INDEX(IA64_PSR_REGNUM)] = ptregs->cr_ipsr;
+		regs[REGISTER_INDEX(IA64_CFM_REGNUM)] = ptregs->cr_ifs;
+	}
+
+	return;
+}
+
+static void
+kgdb_get_block_task(struct task_struct *p, unsigned long *ia64regs)
+{
+	struct unw_frame_info info;
+	unsigned long ip;
+	int count = 0;
+
+	unw_init_from_blocked_task(&info, p);
+	ip = 0UL;
+	do {
+		if (unw_unwind(&info) < 0)
+			return;
+		unw_get_ip(&info, &ip);
+		if (!in_sched_functions(ip))
+			break;
+	} while (count++ < 16);
+
+	if (!ip)
+		return;
+
+	unw_get_regs(&info, ia64regs, (struct pt_regs *) 0);
+
+	return;
+}
+
+static void
+regs_to_gdb_regs(struct kgdb_state *state)
+{
+	unw_get_regs(state->unw, kgdb_info.ia64_regs, state->regs);
+	return;
+}				/* regs_to_gdb_regs */
+
+static void
+gdb_regs_to_regs(struct kgdb_state *state)
+{
+	int i;
+	char nat;
+	unsigned long *regs, *preg;
+	struct ia64_fpreg *fr;
+	struct unw_frame_info *unw;
+
+	unw = state->unw;
+	regs = kgdb_info.ia64_regs;
+
+	for (i = 1; i < 32; i++) {
+		if ((i >= 8 && i <= 11) || (i >= 12 && i <= 15))
+			continue;
+		nat = (char) regs[REGISTER_INDEX(IA64_NAT0_REGNUM + i)];
+		unw_access_gr(unw, i, &regs[REGISTER_INDEX(IA64_GR0_REGNUM + i)], &nat, 1);
+	}
+
+	for (preg = &state->regs->r8, i = 8; i < 12; i++, preg++)
+		regs[REGISTER_INDEX(IA64_GR0_REGNUM + i)] = *preg;
+	state->regs->r12 = regs[REGISTER_INDEX(IA64_GR0_REGNUM + 12)];
+	state->regs->r12 = regs[REGISTER_INDEX(IA64_GR0_REGNUM + 13)];
+	state->regs->r12 = regs[REGISTER_INDEX(IA64_GR0_REGNUM + 14)];
+	state->regs->r12 = regs[REGISTER_INDEX(IA64_GR0_REGNUM + 15)];
+
+	for (i = 1; i < 8; i++) {
+		if ((i == 6 || i == 7))
+			continue;
+		unw_access_br(unw, i, &regs[REGISTER_INDEX(IA64_BR0_REGNUM + i)], 1);
+	}
+	state->regs->b0 = regs[REGISTER_INDEX(IA64_BR0_REGNUM)];
+	state->regs->b6 = regs[REGISTER_INDEX(IA64_BR0_REGNUM + 6)];
+	state->regs->b7 = regs[REGISTER_INDEX(IA64_BR0_REGNUM + 7)];
+
+	for (fr = &state->regs->f6, i = 6; i < 12; i++, fr++) {
+		fr->u.bits[0] = regs[REGISTER_INDEX(IA64_FR0_REGNUM + 6 + i)];
+		fr->u.bits[1] = regs[REGISTER_INDEX(IA64_FR0_REGNUM + 6 + i + 1)];
+	}
+
+	unw_ar_regs(unw, regs, 1);
+
+	unw_access_pr(unw, &regs[IA64_PR_REGNUM], 1);
+
+	state->regs->cr_iip = regs[REGISTER_INDEX(IA64_IP_REGNUM)];
+	state->regs->cr_ipsr = regs[REGISTER_INDEX(IA64_PSR_REGNUM)];
+	state->regs->cr_ifs = regs[REGISTER_INDEX(IA64_CFM_REGNUM)];
+
+	return;
+
+}				/* gdb_regs_to_regs */
+
+int thread_list = 0;
+
+void
+get_gdb_regs(struct task_struct *p, struct kgdb_state *state)
+{
+	IF_SMP(int i);
+	if (!p || p == current) {
+		regs_to_gdb_regs(state);
+		return;
+	}
+#ifdef CONFIG_SMP
+	for (i = 0; i < MAX_NO_CPUS; i++) {
+		if (p == kgdb_info.cpus_waiting[i].task &&
+			!user_mode(kgdb_info.cpus_waiting[i].regs)){
+			memcpy(kgdb_info.ia64_regs, kgdb_info.cpus_waiting[i].ia64_regs,
+				sizeof(kgdb_info.ia64_regs));
+			return;
+		}
+	}
+#endif
+/*
+ * This code is to give a more informative notion of where a process
+ * is waiting.	It is used only when the user asks for a thread info
+ * list.  If he then switches to the thread, s/he will find the task
+ * is in schedule, but a back trace should show the same info we come
+ * up with. Some of this code was purloined from get_wchan;
+ */
+
+	if (!thread_list)
+		return;
+	else if (p->state == TASK_RUNNING)
+		return;
+
+	kgdb_get_block_task(p, kgdb_info.ia64_regs);
+
+	return;
+
+}
+
+/* Indicate to caller of mem2hex or hex2mem that there has been an
+   error.  */
+static volatile int mem_err = 0;
+static volatile int mem_err_expected = 0;
+static volatile int mem_err_cnt = 0;
+
+int
+get_char(char *addr, unsigned char *data)
+{
+	mm_segment_t fs;
+	int ret;
+
+	if ((unsigned long) addr < DEFAULT_TASK_SIZE)
+		return -EFAULT;
+
+	wmb();
+	fs = get_fs();
+	set_fs(KERNEL_DS);
+
+	if (get_user(*data, addr) != 0)
+		ret = -EFAULT;
+	else
+		ret = 0;
+
+	set_fs(fs);
+	return ret;
+}
+
+int
+set_char(char *addr, int val)
+{
+	mm_segment_t fs;
+	int ret;
+
+	if ((unsigned long) addr < DEFAULT_TASK_SIZE)
+		return -EFAULT;
+
+	wmb();
+	fs = get_fs();
+	set_fs(KERNEL_DS);
+
+	if (put_user(val, addr) != 0)
+		ret = -EFAULT;
+	else
+		ret = 0;
+
+	set_fs(fs);
+	return ret;
+}
+
+/* convert the memory pointed to by mem into hex, placing result in buf */
+/* return a pointer to the last char put in buf (null) */
+/* If MAY_FAULT is non-zero, then we should set mem_err in response to
+   a fault; if zero treat a fault like any other fault in the stub.  */
+char *
+mem2hex(char *mem, char *buf, int count, int may_fault)
+{
+	int i;
+	unsigned char ch;
+
+	if (may_fault) {
+		mem_err_expected = 1;
+		mem_err = 0;
+	}
+
+	for (i = 0; i < count; i++) {
+		/* printk("%lx = ", mem) ; */
+
+		if (get_char(mem++, &ch)) {
+			if (remote_debug)
+				printk("Mem fault fetching from addr %lx\n", (long) (mem - 1));
+			*buf = 0;	/* truncate buffer */
+			return buf;
+		}
+		*buf++ = hexchars[ch >> 4];
+		*buf++ = hexchars[ch % 16];
+	}
+	*buf = 0;
+	if (may_fault)
+		mem_err_expected = 0;
+	return (buf);
+}
+
+/* convert the hex array pointed to by buf into binary to be placed in mem */
+/* return a pointer to the character AFTER the last byte written */
+/* NOTE: We use the may fault flag to also indicate if the write is to
+ * the registers (0) or "other" memory (!=0)
+ */
+char *
+hex2mem(char *buf, char *mem, int count, int may_fault)
+{
+	int i;
+	unsigned char ch;
+
+	if (may_fault) {
+		mem_err_expected = 1;
+		mem_err = 0;
+	}
+	for (i = 0; i < count; i++) {
+		ch = hex(*buf++) << 4;
+		ch = ch + hex(*buf++);
+		if (set_char(mem++, ch)) {
+			if (remote_debug)
+				printk("Mem fault storing to addr %lx\n",
+				       (long) (mem - 1));
+			return (mem);
+		}
+	}
+	if (may_fault)
+		mem_err_expected = 0;
+	return (mem);
+}
+
+/**********************************************/
+/* WHILE WE FIND NICE HEX CHARS, BUILD AN INT */
+/* RETURN NUMBER OF CHARS PROCESSED	      */
+/**********************************************/
+int
+hexToLong(char **ptr, unsigned long *intValue)
+{
+	int numChars = 0;
+	int hexValue;
+
+	*intValue = 0UL;
+
+	while (**ptr) {
+		hexValue = hex(**ptr);
+		if (hexValue >= 0) {
+			*intValue = (*intValue << 4) | hexValue;
+			numChars++;
+		} else
+			break;
+
+		(*ptr)++;
+	}
+
+	return (numChars);
+}
+
+int
+hexToInt(char **ptr, int *intValue)
+{
+	int numChars = 0;
+	int hexValue;
+
+	*intValue = 0;
+
+	while (**ptr) {
+		hexValue = hex(**ptr);
+		if (hexValue >= 0) {
+			*intValue = (*intValue << 4) | hexValue;
+			numChars++;
+		} else
+			break;
+
+		(*ptr)++;
+	}
+
+	return (numChars);
+}
+
+#define stubhex(h) hex(h)
+#ifdef old_thread_list
+
+static int
+stub_unpack_int(char *buff, int fieldlength)
+{
+	int nibble;
+	int retval = 0;
+
+	while (fieldlength) {
+		nibble = stubhex(*buff++);
+		retval |= nibble;
+		fieldlength--;
+		if (fieldlength)
+			retval = retval << 4;
+	}
+	return retval;
+}
+#endif
+static char *
+pack_hex_byte(char *pkt, int byte)
+{
+	*pkt++ = hexchars[(byte >> 4) & 0xf];
+	*pkt++ = hexchars[(byte & 0xf)];
+	return pkt;
+}
+
+#define BUF_THREAD_ID_SIZE 16
+
+static char *
+pack_threadid(char *pkt, threadref * id)
+{
+	char *limit;
+	unsigned char *altid;
+
+	altid = (unsigned char *) id;
+	limit = pkt + BUF_THREAD_ID_SIZE;
+	while (pkt < limit)
+		pkt = pack_hex_byte(pkt, *altid++);
+	return pkt;
+}
+
+#ifdef old_thread_list
+static char *
+unpack_byte(char *buf, int *value)
+{
+	*value = stub_unpack_int(buf, 2);
+	return buf + 2;
+}
+
+static char *
+unpack_threadid(char *inbuf, threadref * id)
+{
+	char *altref;
+	char *limit = inbuf + BUF_THREAD_ID_SIZE;
+	int x, y;
+
+	altref = (char *) id;
+
+	while (inbuf < limit) {
+		x = stubhex(*inbuf++);
+		y = stubhex(*inbuf++);
+		*altref++ = (x << 4) | y;
+	}
+	return inbuf;
+}
+#endif
+void
+int_to_threadref(threadref * id, int value)
+{
+	unsigned char *scan;
+
+	scan = (unsigned char *) id;
+	{
+		int i = 4;
+		while (i--)
+			*scan++ = 0;
+	}
+	*scan++ = (value >> 24) & 0xff;
+	*scan++ = (value >> 16) & 0xff;
+	*scan++ = (value >> 8) & 0xff;
+	*scan++ = (value & 0xff);
+}
+int
+int_to_hex_v(unsigned char * id, int value)
+{
+	unsigned char *start = id;
+	int shift;
+	int ch;
+
+	for (shift = 28; shift >= 0; shift -= 4) {
+		if ((ch = (value >> shift) & 0xf) || (id != start)) {
+			*id = hexchars[ch];
+			id++;
+		}
+	}
+	if (id == start)
+		*id++ = '0';
+	return id - start;
+}
+#ifdef old_thread_list
+
+static int
+threadref_to_int(threadref * ref)
+{
+	int i, value = 0;
+	unsigned char *scan;
+
+	scan = (char *) ref;
+	scan += 4;
+	i = 4;
+	while (i-- > 0)
+		value = (value << 8) | ((*scan++) & 0xff);
+	return value;
+}
+#endif
+static int
+cmp_str(char *s1, char *s2, int count)
+{
+	while (count--) {
+		if (*s1++ != *s2++)
+			return 0;
+	}
+	return 1;
+}
+
+#if 1				/* this is a hold over from 2.4 where O(1) was "sometimes" */
+extern struct task_struct *kgdb_get_idle(int cpu);
+#define idle_task(cpu) kgdb_get_idle(cpu)
+#else
+#define idle_task(cpu) init_tasks[cpu]
+#endif
+
+extern int kgdb_pid_init_done;
+
+#ifdef	CONFIG_KGDB_EARLY
+struct task_struct kgdb_task = {.comm = "kgdb-dummy"};
+#endif
+
+struct task_struct *
+getthread(int pid)
+{
+	struct task_struct *thread;
+	if (pid >= PID_MAX && pid <= (PID_MAX + MAX_NO_CPUS)) {
+
+		return idle_task(pid - PID_MAX);
+	} else {
+		/*
+		 * find_task_by_pid is relatively safe all the time
+		 * Other pid functions require lock downs which imply
+		 * that we may be interrupting them (as we get here
+		 * in the middle of most any lock down).
+		 * Still we don't want to call until the table exists!
+		 */
+		if (kgdb_pid_init_done){
+			thread = find_task_by_pid(pid);
+			if (thread) {
+				return thread;
+			}
+		}
+	}
+#ifdef	CONFIG_KGDB_EARLY
+	if (!kgdb_pid_init_done)
+		return &kgdb_task;
+#endif
+	return NULL;
+}
+/* *INDENT-OFF*	 */
+
+enum instruction_type {A, I, M, F, B, L, X, u};
+
+static enum instruction_type bundle_encoding[32][3] = {
+  { M, I, I },				/* 00 */
+  { M, I, I },				/* 01 */
+  { M, I, I },				/* 02 */
+  { M, I, I },				/* 03 */
+  { M, L, X },				/* 04 */
+  { M, L, X },				/* 05 */
+  { u, u, u },  			/* 06 */
+  { u, u, u },  			/* 07 */
+  { M, M, I },				/* 08 */
+  { M, M, I },				/* 09 */
+  { M, M, I },				/* 0A */
+  { M, M, I },				/* 0B */
+  { M, F, I },				/* 0C */
+  { M, F, I },				/* 0D */
+  { M, M, F },				/* 0E */
+  { M, M, F },				/* 0F */
+  { M, I, B },				/* 10 */
+  { M, I, B },				/* 11 */
+  { M, B, B },				/* 12 */
+  { M, B, B },				/* 13 */
+  { u, u, u },  			/* 14 */
+  { u, u, u },  			/* 15 */
+  { B, B, B },				/* 16 */
+  { B, B, B },				/* 17 */
+  { M, M, B },				/* 18 */
+  { M, M, B },				/* 19 */
+  { u, u, u },  			/* 1A */
+  { u, u, u },  			/* 1B */
+  { M, F, B },				/* 1C */
+  { M, F, B },				/* 1D */
+  { u, u, u },  			/* 1E */
+  { u, u, u },  			/* 1F */
+};
+
+#define	MAX_BREAK_POINTS	(20)
+
+struct z0_break_point {
+	unsigned long addr;
+	unsigned long bundle[2];
+	unsigned int enabled;
+} z0_break_point[MAX_BREAK_POINTS];
+
+int kgdb_arch_set_breakpoint(unsigned long addr)
+{
+	unsigned long slot = addr & 0xf, bundle_addr;
+	unsigned long template;
+	struct bundle {
+		struct {
+			unsigned long long template : 5;
+			unsigned long long slot0 : 41;
+			unsigned long long slot1_p0 : 64-46;
+		} quad0;
+		struct {
+			unsigned long long slot1_p1 : 41 - (64-46);
+			unsigned long long slot2 : 41;
+		} quad1;
+	} bundle;
+	int i;
+	struct z0_break_point *z0 = NULL;
+	unsigned long valid;
+
+	asm volatile("probe.w %0 = %1, 0" : "=r" (valid) : "r" (addr) : "memory");
+	if (!valid)
+		return 0;
+	asm volatile("probe.w %0 = %1, 0" : "=r" (valid) : "r" (addr+8) : "memory");
+	if (!valid)
+		return 0;
+
+
+	for (i = 0; i < MAX_BREAK_POINTS; i++)
+		if (!z0_break_point[i].enabled) {
+			z0 = &z0_break_point[i];
+			break;
+		}
+
+	if (!z0)
+		return 0;
+
+	if (slot > 2)
+		slot = 0;
+
+	bundle_addr = addr & ~0xFULL;
+	memcpy(&bundle, (unsigned long *)bundle_addr, sizeof(bundle));
+	memcpy(z0->bundle, &bundle, sizeof(bundle));
+
+	template = bundle.quad0.template;
+	if (slot == 1 && bundle_encoding[template][1] == L)
+		slot = 2;
+	switch (slot) {
+	case 0:
+		bundle.quad0.slot0 = BREAKNUM;
+		break;
+	case 1:
+		bundle.quad0.slot1_p0 = BREAKNUM;
+		bundle.quad1.slot1_p1 = (BREAKNUM >> (64-46));
+		break;
+	case 2:
+		bundle.quad1.slot2 = BREAKNUM;
+		break;
+	}
+
+	memcpy((char *) bundle_addr, (char *) &bundle, sizeof(bundle));
+	flush_icache_range(bundle_addr, bundle_addr + sizeof(bundle));
+	z0->addr = addr;
+	z0->enabled = 1;
+
+	return 1;
+}
+
+int kgdb_arch_remove_breakpoint(unsigned long addr)
+{
+	struct z0_break_point *z0 = NULL;
+	int i;
+
+	for (i = 0; i < MAX_BREAK_POINTS; i++)
+		if (z0_break_point[i].enabled && z0_break_point[i].addr == addr) {
+			z0 = &z0_break_point[i];
+			break;
+		}
+
+	if (!z0)
+		return 0;
+
+	addr = addr & ~0xFULL;
+	(void) memcpy((char *) addr, (char *) z0->bundle, sizeof (z0->bundle));
+	flush_icache_range(addr, addr + sizeof(z0->bundle));
+	z0->enabled = 0;
+	return 1;
+}
+
+
+unsigned long hw_breakpoint_status;
+
+int hw_breakpoint_init;
+
+void
+do_init_hw_break(void)
+{
+	s64 status;
+	int i;
+
+	hw_breakpoint_init = 1;
+
+#ifdef	CONFIG_IA64_HP_SIM
+	hw_break_total_ibr = 8;
+	hw_break_total_dbr = 8;
+	status = 0;
+#else
+	status = ia64_pal_debug_info(&hw_break_total_ibr, &hw_break_total_dbr);
+#endif
+
+	if (status) {
+		printk(KERN_INFO "do_init_hw_break: pal call failed %d\n", (int) status);
+		return;
+	}
+
+	if (HW_BREAKPOINT > MAX_HW_BREAKPOINT) {
+		printk(KERN_INFO "do_init_hw_break: %d exceeds max %d\n", (int) HW_BREAKPOINT,
+			(int) MAX_HW_BREAKPOINT);
+
+		while ((HW_BREAKPOINT > MAX_HW_BREAKPOINT) && hw_break_total_ibr != 1)
+			hw_break_total_ibr--;
+		while (HW_BREAKPOINT > MAX_HW_BREAKPOINT)
+			hw_break_total_dbr--;
+	}
+
+	breakinfo = malloc(HW_BREAKPOINT * sizeof(struct hw_breakpoint));
+
+	if (!breakinfo) {
+		printk(KERN_INFO "Failed to allocate hardware break array\n");
+		return;
+	}
+
+	memset(breakinfo, 0, HW_BREAKPOINT * sizeof(struct hw_breakpoint));
+
+	for (i = 0; i < hw_break_total_dbr; i++)
+		breakinfo[i].capable = HWCAP_DBR;
+
+	for (; i < HW_BREAKPOINT; i++)
+		breakinfo[i].capable = HWCAP_IBR;
+
+	return;
+}
+
+void
+correct_hw_break(void)
+{
+	int breakno;
+
+	if (!breakinfo)
+		return;
+
+	for (breakno = 0; breakno < HW_BREAKPOINT; breakno++) {
+		if (breakinfo[breakno].enabled) {
+			if (breakinfo[breakno].capable & HWCAP_IBR) {
+				int ibreakno = breakno - hw_break_total_dbr;
+				ia64_set_ibr(ibreakno << 1, breakinfo[breakno].addr);
+				ia64_set_ibr((ibreakno << 1) + 1,
+					(~breakinfo[breakno].mask & ((1UL << 56UL) - 1)) |
+					(1UL << 56UL) | (1UL << 63UL));
+			}
+			else {
+				ia64_set_dbr(breakno << 1, breakinfo[breakno].addr);
+				ia64_set_dbr((breakno << 1) + 1,
+					(~breakinfo[breakno].mask & ((1UL << 56UL) - 1)) |
+					(1UL << 56UL) | (breakinfo[breakno].type << 62UL));
+			}
+		}
+		else  {
+			if (breakinfo[breakno].capable & HWCAP_IBR)
+				ia64_set_ibr(((breakno - hw_break_total_dbr) << 1) + 1, 0);
+			else
+				ia64_set_dbr((breakno << 1) + 1, 0);
+		}
+	}
+
+	return;
+}
+
+int
+hardware_breakpoint(unsigned long addr, int length, int type, int action)
+{
+	int breakno, found, watch;
+	unsigned long mask;
+	extern unsigned long _start[];
+
+	if (!hw_breakpoint_init)
+		do_init_hw_break();
+
+	if (!breakinfo)
+		return 0;
+	else if (addr == (unsigned long) _start)
+		return 1;
+
+	if (type == WATCH_ACCESS)
+		mask = HWCAP_DBR;
+	else
+		mask = 1UL << type;
+
+	for (watch = 0, found = 0, breakno = 0; breakno < HW_BREAKPOINT; breakno++) {
+		if (action) {
+			if (breakinfo[breakno].enabled || !(breakinfo[breakno].capable & mask))
+				continue;
+			breakinfo[breakno].enabled = 1;
+			breakinfo[breakno].type = type;
+			breakinfo[breakno].mask = length - 1;
+			breakinfo[breakno].addr = addr;
+			watch = breakno;
+		} else if (breakinfo[breakno].enabled &&
+			((length < 0 && breakinfo[breakno].addr == addr) ||
+			((breakinfo[breakno].capable & mask) &&
+			(breakinfo[breakno].mask == (length - 1)) &&
+			(breakinfo[breakno].addr == addr)))) {
+			breakinfo[breakno].enabled = 0;
+			breakinfo[breakno].type = 0UL;
+		}
+		else
+			continue;
+		found++;
+		if (type != WATCH_ACCESS)
+			break;
+		else if (found == 2)
+			break;
+		else
+			mask = HWCAP_IBR;
+	}
+
+	if (type == WATCH_ACCESS && found == 1) {
+		breakinfo[watch].enabled = 0;
+		found = 0;
+	}
+
+	return found;
+}
+
+#ifdef	oldbreak_protocol
+int
+remove_hw_break(unsigned breakno)
+{
+	if (!breakinfo[breakno].enabled)
+		return -1;
+
+	breakinfo[breakno].enabled = 0;
+
+	return 0;
+}
+
+int
+set_hw_break(unsigned breakno, unsigned type, unsigned len, unsigned addr)
+{
+	if (breakinfo[breakno].enabled)
+		return -1;
+
+	breakinfo[breakno].enabled = 1;
+	breakinfo[breakno].type = type;
+	breakinfo[breakno].mask = len - 1;
+	breakinfo[breakno].addr = addr;
+	return 0;
+}
+#endif
+
+static void inline
+normalize(struct unw_frame_info *running, struct pt_regs *regs)
+{
+	unsigned long sp;
+
+	/*
+	 * unwind to last frame before exception which will be an error
+	 * and then fetch the bsp at exception time.
+	 */
+
+	do {
+		unw_get_sp(running, &sp);
+		if ((sp + 0x10) >= (unsigned long) regs)
+			break;
+	} while (unw_unwind(running) >= 0);
+
+	return;
+}
+
+#ifdef CONFIG_SMP
+static int in_kgdb_console = 0;
+
+
+static void
+snap_regs(struct unw_frame_info *unw_info, void *data)
+{
+	struct pt_regs *regs;
+	int cpu;
+
+	regs = data;
+	normalize(unw_info, regs);
+	cpu = smp_processor_id();
+	unw_get_regs(unw_info, kgdb_info.cpus_waiting[cpu].ia64_regs, regs);
+
+	return;
+}
+
+int
+in_kgdb(struct pt_regs *regs, struct unw_frame_info *unw_info)
+{
+	unsigned flags;
+	int cpu = smp_processor_id();
+	in_kgdb_called = 1;
+
+	preempt_disable();
+
+	if (!spin_is_locked(&kgdb_spinlock)) {
+		if (in_kgdb_here_log[cpu] ||	/* we are holding this cpu */
+		    in_kgdb_console) {	/* or we are doing slow i/o */
+			preempt_enable_no_resched();
+			return 1;
+		}
+		preempt_enable_no_resched();
+		return 0;
+	}
+
+	/* As I see it the only reason not to let all cpus spin on
+	 * the same spin_lock is to allow selected ones to proceed.
+	 * This would be a good thing, so we leave it this way.
+	 * Maybe someday....  Done !
+
+	 * in_kgdb() is called from an NMI so we don't pretend
+	 * to have any resources, like printk() for example.
+	 */
+
+	kgdb_local_irq_save(flags);	/* only local here, to avoid hanging */
+	/*
+	 * log arival of this cpu
+	 * The NMI keeps on ticking.  Protect against recurring more
+	 * than once, and ignor the cpu that has the kgdb lock
+	 */
+	in_kgdb_entry_log[cpu]++;
+	in_kgdb_here_log[cpu] = regs;
+	if (cpu == spinlock_cpu || waiting_cpus[cpu].task)
+		goto exit_in_kgdb;
+
+	/*
+	 * For protection of the initilization of the spin locks by kgdb
+	 * it locks the kgdb spinlock before it gets the wait locks set
+	 * up.	We wait here for the wait lock to be taken.  If the
+	 * kgdb lock goes away first??	Well, it could be a slow exit
+	 * sequence where the wait lock is removed prior to the kgdb lock
+	 * so if kgdb gets unlocked, we just exit.
+	 */
+
+	while (spin_is_locked(&kgdb_spinlock) &&
+	       !spin_is_locked(waitlocks + cpu)) ;
+	if (!spin_is_locked(&kgdb_spinlock))
+		goto exit_in_kgdb;
+
+	if (unw_info)
+		unw_get_regs(unw_info, kgdb_info.cpus_waiting[cpu].ia64_regs, regs);
+	else if (!user_mode(regs)) {
+		if (current->state == TASK_RUNNING)
+			unw_init_running(snap_regs, regs);
+		else
+			kgdb_get_block_task(current, kgdb_info.cpus_waiting[cpu].ia64_regs);
+	}
+	waiting_cpus[cpu].task = current;
+	waiting_cpus[cpu].pid = (current->pid) ? : (PID_MAX + cpu);
+	waiting_cpus[cpu].regs = regs;
+
+	spin_unlock_wait(waitlocks + cpu);
+
+
+	/*
+	 * log departure of this cpu
+	 */
+	waiting_cpus[cpu].task = 0;
+	waiting_cpus[cpu].pid = 0;
+	waiting_cpus[cpu].regs = 0;
+	correct_hw_break();
+      exit_in_kgdb:
+	in_kgdb_here_log[cpu] = 0;
+	kgdb_local_irq_restore(flags);
+	preempt_enable_no_resched();
+	return 1;
+	/*
+	   spin_unlock(continuelocks + smp_processor_id());
+	 */
+}
+
+void
+smp__in_kgdb(struct pt_regs regs)
+{
+	in_kgdb(&regs, NULL);
+}
+#else
+int
+in_kgdb(struct pt_regs *regs, struct unw_frame_info *unw)
+{
+	return (kgdb_spinlock);
+}
+#endif
+
+void
+printexceptioninfo(int exceptionNo, int errorcode, char *buffer)
+{
+	switch (exceptionNo) {
+	case 1:		/* debug exception */
+		break;
+	case 3:		/* breakpoint */
+		sprintf(buffer, "Software breakpoint");
+		return;
+	default:
+		sprintf(buffer, "Details not available");
+		return;
+	}
+	sprintf(buffer, "Unknown trap");
+	return;
+}
+
+/*
+ * This function does all command procesing for interfacing to gdb.
+ *
+ * NOTE:  The INT nn instruction leaves the state of the interrupt
+ *	  enable flag UNCHANGED.  That means that when this routine
+ *	  is entered via a breakpoint (INT 3) instruction from code
+ *	  that has interrupts enabled, then interrupts will STILL BE
+ *	  enabled when this routine is entered.	 The first thing that
+ *	  we do here is disable interrupts so as to prevent recursive
+ *	  entries and bothersome serial interrupts while we are
+ *	  trying to run the serial port in polled mode.
+ *
+ * For kernel version 2.1.xx the kgdb_cli() actually gets a spin lock so
+ * it is always necessary to do a restore_flags before returning
+ * so as to let go of that lock.
+ */
+
+static void do_kgdb_handle_exception(struct unw_frame_info *, void *data);
+
+int
+kgdb_handle_exception(int exceptionVector, int signo, unsigned long err_code, struct pt_regs *linux_regs)
+{
+	struct kgdb_state info;
+
+	/*
+	 * If the entry is not from the kernel then return to the Linux
+	 * trap handler and let it process the interrupt normally.
+	 */
+	if (user_mode(linux_regs)) {
+		printk("ignoring non-kernel exception\n");
+		print_regs(linux_regs);
+		return (0);
+	}
+
+	preempt_disable();
+
+	kgdb_info.called_from = __builtin_return_address(0);
+
+	info.exceptionVector = exceptionVector;
+	info.signo = signo;
+	info.err_code = err_code;
+	info.regs = linux_regs;
+	info.unw = (void *) 0;
+	unw_init_running(do_kgdb_handle_exception, &info);
+
+	preempt_enable_no_resched();
+
+	return info.ret;
+}
+
+static int kgdb_dbregs_enabled;
+
+static void
+do_kgdb_handle_exception(struct unw_frame_info *unw_info, void *data)
+{
+	int exceptionVector, signo, have_regs = 0;
+	unsigned long err_code;
+	struct pt_regs *linux_regs;
+	struct kgdb_state *info;
+	struct task_struct *usethread = NULL;
+	struct task_struct *thread_list_start = 0, *thread = NULL;
+	int length;
+	unsigned long addr;
+	char *ptr;
+	int newPC;
+	threadref thref;
+	int threadid;
+	int thread_min = PID_MAX + MAX_NO_CPUS;
+#ifdef old_thread_list
+	int maxthreads;
+#endif
+	int nothreads;
+	unsigned long flags;
+#define	gdb_regs	kgdb_info.ia64_regs
+	IF_SMP(int entry_state = 0);	/* 0, ok, 1, no nmi, 2 sync failed */
+#define NO_NMI 1
+#define NO_SYNC 2
+#define	ptregs	(*linux_regs)
+#define NUMREGS NUM_REGS
+
+	info = data;
+	info->unw = unw_info;
+	exceptionVector = info->exceptionVector;
+	signo = info->signo;
+	err_code = info->err_code;
+	linux_regs = info->regs;
+
+	normalize(unw_info, linux_regs);
+
+	/*
+	 * If we're using eth mode, set the 'mode' in the netdevice.
+	 */
+	if (kgdboe)
+		netpoll_set_trap(1);
+
+	kgdb_local_irq_save(flags);
+
+	/* Get kgdb spinlock */
+
+	KGDB_SPIN_LOCK(&kgdb_spinlock);
+	kgdb_info.entry_itc = ia64_get_itc();
+	/*
+	 * We depend on this spinlock and the NMI watch dog to control the
+	 * other cpus.	They will arrive at "in_kgdb()" as a result of the
+	 * NMI and will wait there for the following spin locks to be
+	 * released.
+	 */
+#ifdef CONFIG_SMP
+
+#if 0
+	if (cpu_callout_map & ~MAX_CPU_MASK) {
+		printk("kgdb : too many cpus, possibly not mapped"
+		       " in contiguous space, change MAX_NO_CPUS"
+		       " in kgdb_stub and make new kernel.\n"
+		       " cpu_callout_map is %lx\n", cpu_callout_map);
+		goto exit_just_unlock;
+	}
+#endif
+	if (spinlock_count == 1) {
+		long time = 0, end_time;
+		int i;
+		int cpu_logged_in[MAX_NO_CPUS] = {[0 ... MAX_NO_CPUS - 1] = (0)
+		};
+		if (remote_debug) {
+			printk("kgdb : cpu %d entry, syncing others\n",
+			       smp_processor_id());
+		}
+		for (i = 0; i < MAX_NO_CPUS; i++) {
+			/*
+			 * Use trylock as we may already hold the lock if
+			 * we are holding the cpu.  Net result is all
+			 * locked.
+			 */
+			spin_trylock(&waitlocks[i]);
+		}
+		for (i = 0; i < MAX_NO_CPUS; i++)
+			cpu_logged_in[i] = 0;
+		/*
+		 * Wait for their arrival.  We know the watch dog is active if
+		 * in_kgdb() has ever been called, as it is always called on a
+		 * watchdog tick.
+		 */
+		time = ia64_get_itc();
+		end_time = time + 2;	/* Note: we use the High order bits! */
+		i = 1;
+		if (num_online_cpus() > 1) {
+			int me_in_kgdb = in_kgdb_entry_log[smp_processor_id()];
+			smp_send_nmi_allbutself();
+
+			while (i < num_online_cpus() && time != end_time) {
+				int j;
+				for (j = 0; j < MAX_NO_CPUS; j++) {
+					if (waiting_cpus[j].task &&
+					    waiting_cpus[j].task != NOCPU &&
+					    !cpu_logged_in[j]) {
+						i++;
+						cpu_logged_in[j] = 1;
+						if (remote_debug) {
+							printk
+							    ("kgdb : cpu %d arrived at kgdb\n",
+							     j);
+						}
+						break;
+					} else if (!waiting_cpus[j].task &&
+						   !cpu_online(j)) {
+						waiting_cpus[j].task = NOCPU;
+						cpu_logged_in[j] = 1;
+						waiting_cpus[j].hold = 1;
+						break;
+					}
+					if (!waiting_cpus[j].task && in_kgdb_here_log[j]) {
+						int wait = 100000;
+						while (wait-- && !waiting_cpus[j].task );
+						if (!waiting_cpus[j].task  &&
+							in_kgdb_here_log[j]) {
+							printk
+							    ("kgdb : cpu %d stall"
+							     " in in_kgdb\n",
+							     j);
+							i++;
+							cpu_logged_in[j] = 1;
+							waiting_cpus[j].task =
+								(struct task_struct *) 1;
+						}
+					}
+				}
+
+				if (in_kgdb_entry_log[smp_processor_id()] >
+				    (me_in_kgdb + 10)) {
+					break;
+				}
+
+				time = ia64_get_itc();
+			}
+			if (i < num_online_cpus()) {
+				printk
+				    ("kgdb : time out, proceeding without sync\n");
+#if 0
+				printk("kgdb : Waiting_cpus: 0 = %d, 1 = %d\n",
+				       waiting_cpus[0].task != 0,
+				       waiting_cpus[1].task != 0);
+				printk("kgdb : Cpu_logged in: 0 = %d, 1 = %d\n",
+				       cpu_logged_in[0], cpu_logged_in[1]);
+				printk
+				    ("kgdb : in_kgdb_here_log in: 0 = %d, 1 = %d\n",
+				     in_kgdb_here_log[0] != 0,
+				     in_kgdb_here_log[1] != 0);
+#endif
+				entry_state = NO_SYNC;
+			} else {
+#if 0
+				int ent =
+				    in_kgdb_entry_log[smp_processor_id()] -
+				    me_in_kgdb;
+				printk("kgdb : sync after %d entries\n", ent);
+#endif
+			}
+		} else {
+			if (remote_debug) {
+				printk
+				    ("kgdb : %ld cpus, but watchdog not active\n"
+				     "proceeding without locking down other cpus\n",
+				     num_online_cpus());
+				entry_state = NO_NMI;
+			}
+		}
+	}
+#endif
+
+	if (remote_debug) {
+		unsigned long *lp = (unsigned long *) &linux_regs;
+
+		printk("handle_exception(exceptionVector=%d, "
+		       "signo=%d, err_code=%ld, linux_regs=%p)\n",
+		       exceptionVector, signo, err_code, linux_regs);
+		if (debug_regs) {
+			print_regs(&ptregs);
+			printk("Stk: %8lx %8lx %8lx %8lx"
+			       "  %8lx %8lx %8lx %8lx\n",
+			       lp[0], lp[1], lp[2], lp[3],
+			       lp[4], lp[5], lp[6], lp[7]);
+			printk("     %8lx %8lx %8lx %8lx"
+			       "  %8lx %8lx %8lx %8lx\n",
+			       lp[8], lp[9], lp[10], lp[11],
+			       lp[12], lp[13], lp[14], lp[15]);
+			printk("     %8lx %8lx %8lx %8lx  "
+			       "%8lx %8lx %8lx %8lx\n",
+			       lp[16], lp[17], lp[18], lp[19],
+			       lp[20], lp[21], lp[22], lp[23]);
+			printk("     %8lx %8lx %8lx %8lx  "
+			       "%8lx %8lx %8lx %8lx\n",
+			       lp[24], lp[25], lp[26], lp[27],
+			       lp[28], lp[29], lp[30], lp[31]);
+		}
+	}
+
+	/* Disable hardware debugging while we are in kgdb */
+	/* Get the debug register status register */
+	hw_breakpoint_status = ia64_getreg(_IA64_REG_PSR);
+	if (hw_breakpoint_status & IA64_PSR_DB)
+		ia64_setreg(_IA64_REG_PSR_L, hw_breakpoint_status ^ IA64_PSR_DB);
+
+
+	switch (exceptionVector) {
+	case -1:	/* general death */
+	case 11:	/* break  fix signo */
+		switch (err_code) { 	/* break_num */
+		case BREAKNUM:
+			signo = SIGTRAP;
+			break;
+		case KGDBBREAKNUM:
+			signo = SIGTRAP;
+			if (ia64_psr(linux_regs)->ri < 2)
+				kgdb_pc(linux_regs, linux_regs->cr_iip +
+					ia64_psr(linux_regs)->ri + 1);
+			else
+				kgdb_pc(linux_regs, linux_regs->cr_iip + 16);
+			break;
+		}
+		break;
+	case 29:	/*  hardware breakpoint ibr/dbr fault */
+	case 36:	/* single step trap */
+		signo = SIGTRAP;
+		break;
+	case 6:		/* ikey_miss */
+	case 7:		/* dkey_miss */
+	case 24:	/* general exception */
+	case 31:	/*  unsupported data reference */
+		signo = SIGSEGV;
+		break;
+	case 13:	/* reserved  */
+	case 14:	/*  " ""     */
+	case 15:	/*  " ""     */
+	case 16:	/*  " ""     */
+	case 17:	/*  " ""     */
+	case 18:	/*  " ""     */
+	case 19:	/*  " ""     */
+	case 28:	/*  " ""     */
+	case 25:	/* disable fp */
+	case 32:	/* floating point */
+	case 33:	/* floating point trap */
+	case 34:	/* lower privilege fault */
+	case 35:	/* taken branch trap */
+	case 37:	/* reserved */
+	case 38:	/* reserved */
+	case 39:	/* reserved */
+	case 40:	/* reserved */
+	case 41:	/* reserved */
+	case 42:	/* reserved */
+	case 43:	/* reserved */
+	case 44:	/* reserved */
+	case 45:	/* ia32_exception */
+	case 47:	/* ia32 interrupt  */
+	default:	/* reserved and undefined */
+		signo = SIGILL;
+		break;
+	case 5:		/* kernel page fault */
+		if (mem_err_expected) {
+			/*
+			 * This fault occured because of the
+			 * get_char or set_char routines.  These
+			 * two routines use either eax of edx to
+			 * indirectly reference the location in
+			 * memory that they are working with.
+			 * For a page fault, when we return the
+			 * instruction will be retried, so we
+			 * have to make sure that these
+			 * registers point to valid memory.
+			 */
+			mem_err = 1;	/* set mem error flag */
+			mem_err_expected = 0;
+			mem_err_cnt++;	/* helps in debugging */
+			if (ia64_psr(linux_regs)->ri < 2)
+				kgdb_pc(linux_regs, linux_regs->cr_iip +
+					ia64_psr(linux_regs)->ri + 1);
+			else
+				kgdb_pc(linux_regs, linux_regs->cr_iip + 16);
+			if (remote_debug)
+				printk("Return after memory error: "
+				       "mem_err_cnt=%d\n", mem_err_cnt);
+			if (debug_regs)
+				print_regs(&ptregs);
+			goto exit_kgdb;
+		}
+		break;
+	}
+	if (remote_debug)
+		printk("kgdb : entered kgdb on cpu %d\n", smp_processor_id());
+
+	gdb_ia64vector = exceptionVector;
+	gdb_ia64errcode = err_code;
+#ifdef CONFIG_SMP
+	/*
+	 * OK, we can now communicate, lets tell gdb about the sync.
+	 * but only if we had a problem.
+	 */
+	switch (entry_state) {
+	case NO_NMI:
+		to_gdb("NMI not active, other cpus not stopped\n");
+		break;
+	case NO_SYNC:
+		to_gdb("Some cpus not stopped, see 'kgdb_info' for details\n");
+	default:;
+	}
+
+#endif
+/*
+ * Set up the gdb function call area.
+ */
+
+      IF_SMP(once_again:)
+	    /* reply to host that an exception has occurred */
+	remcomOutBuffer[0] = 'S';
+	remcomOutBuffer[1] = hexchars[signo >> 4];
+	remcomOutBuffer[2] = hexchars[signo % 16];
+	remcomOutBuffer[3] = 0;
+
+	putpacket(remcomOutBuffer);
+
+	while (1 == 1) {
+		error = 0;
+		remcomOutBuffer[0] = 0;
+		getpacket(remcomInBuffer);
+		switch (remcomInBuffer[0]) {
+		case '?':
+			remcomOutBuffer[0] = 'S';
+			remcomOutBuffer[1] = hexchars[signo >> 4];
+			remcomOutBuffer[2] = hexchars[signo % 16];
+			remcomOutBuffer[3] = 0;
+			break;
+		case 'd':
+			remote_debug = !(remote_debug);	/* toggle debug flag */
+			printk("Remote debug %s\n",
+			       remote_debug ? "on" : "off");
+			break;
+		case 'p':	/* fetch register */
+		{
+			int regnum;
+
+			if (!have_regs) {
+				get_gdb_regs(usethread, info);
+				have_regs = 1;
+			}
+
+			hex2mem(&remcomInBuffer[1], (char *) &regnum, sizeof(regnum), 0);
+			if (regnum >= NUMREGS) {
+				remcomOutBuffer[0] = 'E';
+				remcomOutBuffer[1] = 0;
+				break;
+			}
+			mem2hex((char *) &gdb_regs[REGISTER_INDEX(regnum)], remcomOutBuffer,
+				REGISTER_SIZE(regnum), 0);
+			remcomOutBuffer[REGISTER_SIZE(regnum) * 2] = 0;
+			break;
+		}
+		case 'g':	/* return the value of the CPU registers */
+			get_gdb_regs(usethread, info);
+			mem2hex((char *) gdb_regs, remcomOutBuffer, NUMREGBYTES, 0);
+			break;
+		case 'G':	/* set the value of the CPU registers - return OK */
+			hex2mem(&remcomInBuffer[1], (char *) gdb_regs, NUMREGBYTES, 0);
+			if (!usethread || usethread == current) {
+				gdb_regs_to_regs(info);
+				strcpy(remcomOutBuffer, "OK");
+			} else {
+				strcpy(remcomOutBuffer, "E00");
+			}
+			break;
+
+		case 'P':{	/* set the value of a single CPU register -
+				   return OK */
+				/*
+				 * For some reason, gdb wants to talk about psudo
+				 * registers (greater than 15).	 These may have
+				 * meaning for ptrace, but for us it is safe to
+				 * ignor them.	We do this by dumping them into
+				 * _GS which we also ignor, but do have memory for.
+				 */
+				int regno;
+
+				ptr = &remcomInBuffer[1];
+				regs_to_gdb_regs(info);
+				if ((!usethread || usethread == current) &&
+				    hexToInt(&ptr, &regno) &&
+				    *ptr++ == '=' && (regno >= 0)) {
+					regno =
+					    (regno >= NUMREGS ? 0 : regno);
+					hex2mem(ptr, (char *) &gdb_regs[REGISTER_INDEX(regno)],
+						4, 0);
+					gdb_regs_to_regs(info);
+					strcpy(remcomOutBuffer, "OK");
+					break;
+				}
+				strcpy(remcomOutBuffer, "E01");
+				break;
+			}
+
+			/* mAA..AA,LLLL	 Read LLLL bytes at address AA..AA */
+		case 'm':
+			/* TRY TO READ %x,%x.  IF SUCCEED, SET PTR = 0 */
+			ptr = &remcomInBuffer[1];
+			if (hexToLong(&ptr, &addr) &&
+			    (*(ptr++) == ',') && (hexToInt(&ptr, &length))) {
+				ptr = 0;
+				/*
+				 * hex doubles the byte count
+				 */
+				if (length > (BUFMAX / 2))
+					length = BUFMAX / 2;
+				mem2hex((char *) addr,
+					remcomOutBuffer, length, 1);
+				if (mem_err) {
+					strcpy(remcomOutBuffer, "E03");
+					debug_error("memory fault\n", NULL);
+				}
+			}
+
+			if (ptr) {
+				strcpy(remcomOutBuffer, "E01");
+				debug_error
+				    ("malformed read memory command: %s\n",
+				     remcomInBuffer);
+			}
+			break;
+
+			/* MAA..AA,LLLL:
+			   Write LLLL bytes at address AA.AA return OK */
+		case 'M':
+			/* TRY TO READ '%x,%x:'.  IF SUCCEED, SET PTR = 0 */
+			ptr = &remcomInBuffer[1];
+			if (hexToLong(&ptr, &addr) &&
+			    (*(ptr++) == ',') &&
+			    (hexToInt(&ptr, &length)) && (*(ptr++) == ':')) {
+				extern unsigned long _start[];
+
+				if (addr == (unsigned long) _start)
+					strcpy(remcomOutBuffer, "OK");
+
+				else {
+					hex2mem(ptr, (char *) addr, length, 1);
+
+					if (mem_err) {
+						strcpy(remcomOutBuffer, "E03");
+						debug_error("memory fault\n", NULL);
+					} else {
+						if (kernel_text_address(addr))
+							flush_icache_range(addr, addr + length);
+						strcpy(remcomOutBuffer, "OK");
+					}
+				}
+
+				ptr = 0;
+			}
+			if (ptr) {
+				strcpy(remcomOutBuffer, "E02");
+				debug_error
+				    ("malformed write memory command: %s\n",
+				     remcomInBuffer);
+			}
+			break;
+		case 'S':
+			remcomInBuffer[0] = 's';
+		case 'C':
+			/* Csig;AA..AA where ;AA..AA is optional
+			 * continue with signal
+			 * Since signals are meaning less to us, delete that
+			 * part and then fall into the 'c' code.
+			 */
+			ptr = &remcomInBuffer[1];
+			length = 2;
+			while (*ptr && *ptr != ';') {
+				length++;
+				ptr++;
+			}
+			if (*ptr) {
+				do {
+					ptr++;
+					*(ptr - length++) = *ptr;
+				} while (*ptr);
+			} else {
+				remcomInBuffer[1] = 0;
+			}
+
+			/* cAA..AA  Continue at address AA..AA(optional) */
+			/* sAA..AA  Step one instruction from AA..AA(optional) */
+			/* D	    detach, reply OK and then continue */
+		case 'c':
+		case 's':
+		case 'D':
+
+			/* try to read optional parameter,
+			   pc unchanged if no parm */
+			ptr = &remcomInBuffer[1];
+			if (hexToLong(&ptr, &addr)) {
+				if (remote_debug)
+					printk("Changing EIP to 0x%lx\n", addr);
+
+				ptregs.cr_iip = addr;
+			}
+
+			newPC = ptregs.cr_iip;
+
+			/* clear the trace bit */
+			ptregs.cr_ipsr &= ~IA64_PSR_SS;
+
+			/* set the trace bit if we're stepping */
+			if (remcomInBuffer[0] == 's')
+				ptregs.cr_ipsr |= IA64_PSR_SS;
+
+			/* detach is a friendly version of continue. Note that
+			   debugging is still enabled (e.g hit control C)
+			 */
+			if (remcomInBuffer[0] == 'D') {
+				strcpy(remcomOutBuffer, "OK");
+				putpacket(remcomOutBuffer);
+			}
+
+			if (remote_debug) {
+				printk("Resuming execution\n");
+				print_regs(&ptregs);
+			}
+
+			if (kgdboe)
+				netpoll_set_trap(0);
+
+			correct_hw_break();
+			ptregs.cr_ipsr |= IA64_PSR_DB;
+			goto exit_kgdb;
+
+			/* kill the program */
+		case 'k':	/* do nothing */
+			break;
+
+			/* query */
+		case 'q':
+			nothreads = 0;
+			switch (remcomInBuffer[1]) {
+			case 'f':
+				threadid = 1;
+				thread_list = 2;
+				thread_list_start = (usethread ? : current);
+			case 's':
+				if (!cmp_str(&remcomInBuffer[2],
+					     "ThreadInfo", 10))
+					break;
+
+				remcomOutBuffer[nothreads++] = 'm';
+				for (; threadid < PID_MAX + MAX_NO_CPUS;
+				     threadid++) {
+					thread = getthread(threadid);
+					if (thread) {
+						nothreads += int_to_hex_v(
+							&remcomOutBuffer[
+								nothreads],
+							threadid);
+						if (thread_min > threadid)
+							thread_min = threadid;
+						remcomOutBuffer[
+							nothreads] = ',';
+						nothreads++;
+						if (nothreads > BUFMAX - 10)
+							break;
+					}
+				}
+				if (remcomOutBuffer[nothreads - 1] == 'm') {
+					remcomOutBuffer[nothreads - 1] = 'l';
+				} else {
+					nothreads--;
+				}
+				remcomOutBuffer[nothreads] = 0;
+				break;
+
+#ifdef old_thread_list /* Old thread info request */
+			case 'L':
+				/* List threads */
+				thread_list = 2;
+				thread_list_start = (usethread ? : current);
+				unpack_byte(remcomInBuffer + 3, &maxthreads);
+				unpack_threadid(remcomInBuffer + 5, &thref);
+				do {
+					int buf_thread_limit =
+					    (BUFMAX - 22) / BUF_THREAD_ID_SIZE;
+					if (maxthreads > buf_thread_limit) {
+						maxthreads = buf_thread_limit;
+					}
+				} while (0);
+				remcomOutBuffer[0] = 'q';
+				remcomOutBuffer[1] = 'M';
+				remcomOutBuffer[4] = '0';
+				pack_threadid(remcomOutBuffer + 5, &thref);
+
+				threadid = threadref_to_int(&thref);
+				for (nothreads = 0;
+				     nothreads < maxthreads &&
+				     threadid < PID_MAX + MAX_NO_CPUS;
+				     threadid++) {
+					thread = getthread(threadid);
+					if (thread) {
+						int_to_threadref(&thref,
+								 threadid);
+						pack_threadid(remcomOutBuffer +
+							      21 +
+							      nothreads * 16,
+							      &thref);
+						nothreads++;
+						if (thread_min > threadid)
+							thread_min = threadid;
+					}
+				}
+
+				if (threadid == PID_MAX + MAX_NO_CPUS) {
+					remcomOutBuffer[4] = '1';
+				}
+				pack_hex_byte(remcomOutBuffer + 2, nothreads);
+				remcomOutBuffer[21 + nothreads * 16] = '\0';
+				break;
+#endif
+			case 'C':
+				/* Current thread id */
+				remcomOutBuffer[0] = 'Q';
+				remcomOutBuffer[1] = 'C';
+				threadid = current->pid;
+				if (!threadid) {
+					/*
+					 * idle thread
+					 */
+					for (threadid = PID_MAX;
+					     threadid < PID_MAX + MAX_NO_CPUS;
+					     threadid++) {
+						if (current ==
+						    idle_task(threadid -
+							      PID_MAX))
+							break;
+					}
+				}
+				int_to_threadref(&thref, threadid);
+				pack_threadid(remcomOutBuffer + 2, &thref);
+				remcomOutBuffer[18] = '\0';
+				break;
+
+			case 'E':
+				/* Print exception info */
+				printexceptioninfo(exceptionVector,
+						   err_code, remcomOutBuffer);
+				break;
+			case 'T':{
+				char * nptr;
+				/* Thread extra info */
+				if (!cmp_str(&remcomInBuffer[2],
+					    "hreadExtraInfo,", 15)) {
+					break;
+				}
+				ptr = &remcomInBuffer[17];
+				hexToInt(&ptr, &threadid);
+				thread = getthread(threadid);
+				nptr = &thread->comm[0];
+				length = 0;
+				ptr = &remcomOutBuffer[0];
+				do {
+					length++;
+					ptr = pack_hex_byte(ptr, *nptr++);
+				 } while (*nptr && length < 16);
+				/*
+				 * would like that 16 to be the size of
+				 * task_struct.comm but don't know the
+				 * syntax..
+				 */
+				*ptr = 0;
+			}
+			}
+			break;
+
+			/* task related */
+		case 'H':
+			switch (remcomInBuffer[1]) {
+			case 'g':
+				ptr = &remcomInBuffer[2];
+				hexToInt(&ptr, &threadid);
+				thread = getthread(threadid);
+				if (!thread) {
+					remcomOutBuffer[0] = 'E';
+					remcomOutBuffer[1] = '\0';
+					break;
+				}
+				/*
+				 * Just in case I forget what this is all about,
+				 * the "thread info" command to gdb causes it
+				 * to ask for a thread list.  It then switches
+				 * to each thread and asks for the registers.
+				 * For this (and only this) usage, we want to
+				 * fudge the registers of tasks not on the run
+				 * list (i.e. waiting) to show the routine that
+				 * called schedule. Also, gdb, is a minimalist
+				 * in that if the current thread is the last
+				 * it will not re-read the info when done.
+				 * This means that in this case we must show
+				 * the real registers. So here is how we do it:
+				 * Each entry we keep track of the min
+				 * thread in the list (the last that gdb will)
+				 * get info for.  We also keep track of the
+				 * starting thread.
+				 * "thread_list" is cleared when switching back
+				 * to the min thread if it is was current, or
+				 * if it was not current, thread_list is set
+				 * to 1.  When the switch to current comes,
+				 * if thread_list is 1, clear it, else do
+				 * nothing.
+				 */
+				usethread = thread;
+				have_regs = 0;
+				if ((thread_list == 1) &&
+				    (thread == thread_list_start)) {
+					thread_list = 0;
+				}
+				if (thread_list && (threadid == thread_min)) {
+					if (thread == thread_list_start) {
+						thread_list = 0;
+					} else {
+						thread_list = 1;
+					}
+				}
+				/* follow through */
+			case 'c':
+				remcomOutBuffer[0] = 'O';
+				remcomOutBuffer[1] = 'K';
+				remcomOutBuffer[2] = '\0';
+				break;
+			}
+			break;
+
+			/* Query thread status */
+		case 'T':
+			ptr = &remcomInBuffer[1];
+			hexToInt(&ptr, &threadid);
+			thread = getthread(threadid);
+			if (thread) {
+				remcomOutBuffer[0] = 'O';
+				remcomOutBuffer[1] = 'K';
+				remcomOutBuffer[2] = '\0';
+				if (thread_min > threadid)
+					thread_min = threadid;
+			} else {
+				remcomOutBuffer[0] = 'E';
+				remcomOutBuffer[1] = '\0';
+			}
+			break;
+
+#ifdef	oldbreak_protocol
+		case 'Y': /* set up a hardware breakpoint */
+			ptr = &remcomInBuffer[1];
+			hexToInt(&ptr, &breakno);
+			ptr++;
+			hexToInt(&ptr, &breaktype);
+			ptr++;
+			hexToInt(&ptr, &length);
+			ptr++;
+			hexToLong(&ptr, &addr);
+			if (set_hw_break(breakno & 0x3,
+					 breaktype & 0x3,
+					 length & 0x3, addr) == 0) {
+				strcpy(remcomOutBuffer, "OK");
+			} else {
+				strcpy(remcomOutBuffer, "ERROR");
+			}
+			break;
+
+			/* Remove hardware breakpoint */
+		case 'y':
+			ptr = &remcomInBuffer[1];
+			hexToInt(&ptr, &breakno);
+			if (remove_hw_break(breakno & 0x3) == 0) {
+				strcpy(remcomOutBuffer, "OK");
+			} else {
+				strcpy(remcomOutBuffer, "ERROR");
+			}
+			break;
+#endif
+		/*
+		 * Set/Remove watchpoint
+		 *
+		 */
+		case 'Z':
+		case 'z':
+			if (!kgdb_dbregs_enabled)
+				break;
+
+			switch (remcomInBuffer[1]) {
+			case '0':	/* insert hwd break */
+			case '1':	/* hardware breakpoint */
+			case '2':	/* write watchpoint */
+			case '3':	/* read watchpoint */
+			case '4':	/* access watchpoint */
+			{
+				int ret;
+				if (remcomInBuffer[2] != ',') {
+					strcpy(remcomOutBuffer, "ERROR");
+					break;
+				}
+				ptr = &remcomInBuffer[3];
+				if (hexToLong(&ptr, &addr)) {
+					ptr++;
+					if (!hexToInt(&ptr, &length)) {
+						strcpy(remcomOutBuffer, "ERROR");
+						break;
+					}
+				}
+				else {
+					strcpy(remcomOutBuffer, "ERROR");
+					break;
+				}
+
+				if (remcomInBuffer[1] == '0') {
+					if (remcomInBuffer[0] == 'z')
+						ret = kgdb_arch_remove_breakpoint(addr);
+					else
+						ret = kgdb_arch_set_breakpoint(addr);
+				}
+				else ret = hardware_breakpoint(addr, length,
+					remcomInBuffer[1] - '1',
+					remcomInBuffer[0] == 'Z');
+				if (ret)
+					strcpy(remcomOutBuffer, "OK");
+				else
+					strcpy(remcomOutBuffer, "ERROR");
+				break;
+			}
+			default:
+				strcpy(remcomOutBuffer, "ERROR");
+				break;
+			}
+			break;
+		case 'R':	/* reboot */
+			strcpy(remcomOutBuffer, "OK");
+			putpacket(remcomOutBuffer);
+			/*to_gdb("Rebooting\n"); */
+			machine_restart(NULL);
+
+		}		/* switch */
+
+		/* reply to the request */
+		putpacket(remcomOutBuffer);
+	}			/* while(1==1) */
+	/*
+	 *  reached by goto only.
+	 */
+      exit_kgdb:
+#ifdef CONFIG_SMP
+	/*
+	 * Release gdb wait locks
+	 * Sanity check time.  Must have at least one cpu to run.  Also single
+	 * step must not be done if the current cpu is on hold.
+	 */
+	if (spinlock_count == 1) {
+		int ss_hold = (ptregs.cr_ipsr & IA64_PSR_SS) && kgdb_info.hold_on_sstep;
+		int cpu_avail = 0;
+		int i;
+
+		for (i = 0; i < MAX_NO_CPUS; i++) {
+			if (!cpu_online(i))
+				break;
+			if (!hold_cpu(i)) {
+				cpu_avail = 1;
+			}
+		}
+		/*
+		 * Early in the bring up there will be NO cpus on line...
+		 */
+		if (!cpu_avail && !cpus_empty(cpu_online_map)) {
+			to_gdb("No cpus unblocked, see 'kgdb_info.hold_cpu'\n");
+			goto once_again;
+		}
+		if (hold_cpu(smp_processor_id()) && (ptregs.cr_ipsr & IA64_PSR_SS)) {
+			to_gdb
+			    ("Current cpu must be unblocked to single step\n");
+			goto once_again;
+		}
+
+		if (!ss_hold) {
+			int i;
+			for (i = 0; i < MAX_NO_CPUS; i++) {
+				if (!hold_cpu(i)) {
+					spin_unlock(&waitlocks[i]);
+				}
+			}
+		} else {
+			spin_unlock(&waitlocks[smp_processor_id()]);
+		}
+		/* Release kgdb spinlock */
+		KGDB_SPIN_UNLOCK(&kgdb_spinlock);
+		/*
+		 * If this cpu is on hold, this is where we
+		 * do it.  Note, the NMI will pull us out of here,
+		 * but will return as the above lock is not held.
+		 * We will stay here till another cpu releases the lock for us.
+		 */
+		spin_unlock_wait(waitlocks + smp_processor_id());
+		kgdb_local_irq_restore(flags);
+		info->ret = 0;
+		return;
+	}
+#if 0
+exit_just_unlock:
+#endif
+#endif
+	/* Release kgdb spinlock */
+	KGDB_SPIN_UNLOCK(&kgdb_spinlock);
+	kgdb_local_irq_restore(flags);
+	info->ret = 0;
+	return;
+}
+
+/* this function is used to set up exception handlers for tracing and
+ * breakpoints.
+ * This function is not needed as the above line does all that is needed.
+ * We leave it for backward compatitability...
+ */
+void
+set_debug_traps(void)
+{
+	/*
+	 * linux_debug_hook is defined in traps.c.  We store a pointer
+	 * to our own exception handler into it.
+
+	 * But really folks, every hear of labeled common, an old Fortran
+	 * concept.  Lots of folks can reference it and it is define if
+	 * anyone does.	 Only one can initialize it at link time.  We do
+	 * this with the hook.	See the statement above.  No need for any
+	 * executable code and it is ready as soon as the kernel is
+	 * loaded.  Very desirable in kernel debugging.
+
+	 linux_debug_hook = handle_exception ;
+	 */
+
+	/* In case GDB is started before us, ack any packets (presumably
+	   "$?#xx") sitting there.
+	   putDebugChar ('+');
+
+	   initialized = 1;
+	 */
+}
+
+/* This function will generate a breakpoint exception.	It is used at the
+   beginning of a program to sync up with a debugger and can be used
+   otherwise as a quick means to stop program execution and "break" into
+   the debugger. */
+/* But really, just use the BREAKPOINT macro.  We will handle the int stuff
+ */
+
+#ifdef later
+/*
+ * possibly we should not go thru the traps.c code at all?  Someday.
+ */
+void
+do_kgdb_int3(struct pt_regs *regs, long error_code)
+{
+	kgdb_handle_exception(3, 5, error_code, regs);
+	return;
+}
+#endif
+#undef regs
+#ifdef CONFIG_TRAP_BAD_SYSCALL_EXITS
+asmlinkage void
+bad_sys_call_exit(int stuff)
+{
+	struct pt_regs *regs = (struct pt_regs *) &stuff;
+	printk("Sys call %d return with %x preempt_count\n",
+	       (int) regs->orig_eax, preempt_count());
+}
+#endif
+#ifdef CONFIG_STACK_OVERFLOW_TEST
+#include <asm/kgdb.h>
+asmlinkage void
+stack_overflow(void)
+{
+#ifdef BREAKPOINT
+	BREAKPOINT;
+#else
+	printk("Kernel stack overflow, looping forever\n");
+#endif
+	while (1) {
+	}
+}
+#endif
+
+#if defined(CONFIG_SMP) || defined(CONFIG_KGDB_CONSOLE)
+char gdbconbuf[BUFMAX];
+
+static void
+kgdb_gdb_message(const char *s, unsigned count)
+{
+	int i;
+	int wcount;
+	char *bufptr;
+	/*
+	 * This takes care of NMI while spining out chars to gdb
+	 */
+	IF_SMP(in_kgdb_console = 1);
+	gdbconbuf[0] = 'O';
+	bufptr = gdbconbuf + 1;
+	while (count > 0) {
+		if ((count << 1) > (BUFMAX - 2)) {
+			wcount = (BUFMAX - 2) >> 1;
+		} else {
+			wcount = count;
+		}
+		count -= wcount;
+		for (i = 0; i < wcount; i++) {
+			bufptr = pack_hex_byte(bufptr, s[i]);
+		}
+		*bufptr = '\0';
+		s += wcount;
+
+		putpacket(gdbconbuf);
+
+	}
+	IF_SMP(in_kgdb_console = 0);
+}
+#endif
+#ifdef CONFIG_SMP
+static void
+to_gdb(const char *s)
+{
+	int count = 0;
+	while (s[count] && (count++ < BUFMAX)) ;
+	kgdb_gdb_message(s, count);
+}
+#endif
+#ifdef CONFIG_KGDB_CONSOLE
+#include <linux/console.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <asm/uaccess.h>
+#include <asm/semaphore.h>
+
+void
+kgdb_console_write(struct console *co, const char *s, unsigned count)
+{
+
+	if (gdb_ia64vector == -1) {
+		/*
+		 * We have not yet talked to gdb.  What to do...
+		 * lets break, on continue we can do the write.
+		 * But first tell him whats up. Uh, well no can do,
+		 * as this IS the console.  Oh well...
+		 * We do need to wait or the messages will be lost.
+		 * Other option would be to tell the above code to
+		 * ignore this breakpoint and do an auto return,
+		 * but that might confuse gdb.	Also this happens
+		 * early enough in boot up that we don't have the traps
+		 * set up yet, so...
+		 */
+		breakpoint();
+	}
+	kgdb_gdb_message(s, count);
+}
+
+/*
+ * ------------------------------------------------------------
+ * Serial KGDB driver
+ * ------------------------------------------------------------
+ */
+
+static struct console kgdbcons = {
+	name:"kgdb",
+	write:kgdb_console_write,
+#ifdef CONFIG_KGDB_USER_CONSOLE
+	device:kgdb_console_device,
+#endif
+	flags:CON_PRINTBUFFER | CON_ENABLED,
+	index:-1,
+};
+
+/*
+ * The trick here is that this file gets linked before printk.o
+ * That means we get to peer at the console info in the command
+ * line before it does.	 If we are up, we register, otherwise,
+ * do nothing.	By returning 0, we allow printk to look also.
+ */
+static int kgdb_console_enabled;
+
+int __init
+kgdb_console_init(char *str)
+{
+	if ((strncmp(str, "kgdb", 4) == 0) || (strncmp(str, "gdb", 3) == 0)) {
+		register_console(&kgdbcons);
+		kgdb_console_enabled = 1;
+	}
+	return 0;		/* let others look at the string */
+}
+
+__setup("console=", kgdb_console_init);
+
+int __init
+kgdb_enable_dbregs(char *str)
+{
+	kgdb_dbregs_enabled = 1;
+	return 1;
+}
+
+__setup("kgdb_debug_regs=", kgdb_enable_dbregs);
+
+#ifdef CONFIG_KGDB_USER_CONSOLE
+static kdev_t kgdb_console_device(struct console *c);
+/* This stuff sort of works, but it knocks out telnet devices
+ * we are leaving it here in case we (or you) find time to figure it out
+ * better..
+ */
+
+/*
+ * We need a real char device as well for when the console is opened for user
+ * space activities.
+ */
+
+static int
+kgdb_consdev_open(struct inode *inode, struct file *file)
+{
+	return 0;
+}
+
+static ssize_t
+kgdb_consdev_write(struct file *file, const char *buf,
+		   size_t count, loff_t * ppos)
+{
+	int size, ret = 0;
+	static char kbuf[128];
+	static DECLARE_MUTEX(sem);
+
+	/* We are not reentrant... */
+	if (down_interruptible(&sem))
+		return -ERESTARTSYS;
+
+	while (count > 0) {
+		/* need to copy the data from user space */
+		size = count;
+		if (size > sizeof (kbuf))
+			size = sizeof (kbuf);
+		if (copy_from_user(kbuf, buf, size)) {
+			ret = -EFAULT;
+			break;;
+		}
+		kgdb_console_write(&kgdbcons, kbuf, size);
+		count -= size;
+		ret += size;
+		buf += size;
+	}
+
+	up(&sem);
+
+	return ret;
+}
+
+struct file_operations kgdb_consdev_fops = {
+	open:kgdb_consdev_open,
+	write:kgdb_consdev_write
+};
+static kdev_t
+kgdb_console_device(struct console *c)
+{
+	return MKDEV(TTYAUX_MAJOR, 1);
+}
+
+/*
+ * This routine gets called from the serial stub in the i386/lib
+ * This is so it is done late in bring up (just before the console open).
+ */
+void
+kgdb_console_finit(void)
+{
+	if (kgdb_console_enabled) {
+		char *cptr = cdevname(MKDEV(TTYAUX_MAJOR, 1));
+		char *cp = cptr;
+		while (*cptr && *cptr != '(')
+			cptr++;
+		*cptr = 0;
+		unregister_chrdev(TTYAUX_MAJOR, cp);
+		register_chrdev(TTYAUX_MAJOR, "kgdb", &kgdb_consdev_fops);
+	}
+}
+#endif
+#endif
+#ifdef CONFIG_KGDB_TS
+#include <asm/msr.h>		/* time stamp code */
+#include <asm/hardirq.h>	/* in_interrupt */
+#ifdef CONFIG_KGDB_TS_64
+#define DATA_POINTS 64
+#endif
+#ifdef CONFIG_KGDB_TS_128
+#define DATA_POINTS 128
+#endif
+#ifdef CONFIG_KGDB_TS_256
+#define DATA_POINTS 256
+#endif
+#ifdef CONFIG_KGDB_TS_512
+#define DATA_POINTS 512
+#endif
+#ifdef CONFIG_KGDB_TS_1024
+#define DATA_POINTS 1024
+#endif
+#ifndef DATA_POINTS
+#define DATA_POINTS 128		/* must be a power of two */
+#endif
+#define INDEX_MASK (DATA_POINTS - 1)
+#if (INDEX_MASK & DATA_POINTS)
+#error "CONFIG_KGDB_TS_COUNT must be a power of 2"
+#endif
+struct kgdb_and_then_struct {
+#ifdef CONFIG_SMP
+	int on_cpu;
+#endif
+	struct task_struct *task;
+	long long at_time;
+	int from_ln;
+	char *in_src;
+	void *from;
+	int *with_shpf;
+	int data0;
+	int data1;
+};
+struct kgdb_and_then_struct2 {
+#ifdef CONFIG_SMP
+	int on_cpu;
+#endif
+	struct task_struct *task;
+	long long at_time;
+	int from_ln;
+	char *in_src;
+	void *from;
+	int *with_shpf;
+	struct task_struct *t1;
+	struct task_struct *t2;
+};
+struct kgdb_and_then_struct kgdb_data[DATA_POINTS];
+
+struct kgdb_and_then_struct *kgdb_and_then = &kgdb_data[0];
+int kgdb_and_then_count;
+
+void
+kgdb_tstamp(int line, char *source, int data0, int data1)
+{
+	static spinlock_t ts_spin = SPIN_LOCK_UNLOCKED;
+	int flags;
+	kgdb_local_irq_save(flags);
+	spin_lock(&ts_spin);
+	kgdb_and_then->at_time = ia64_get_itc();
+#ifdef CONFIG_SMP
+	kgdb_and_then->on_cpu = smp_processor_id();
+#endif
+	kgdb_and_then->task = current;
+	kgdb_and_then->from_ln = line;
+	kgdb_and_then->in_src = source;
+	kgdb_and_then->from = __builtin_return_address(0);
+	kgdb_and_then->with_shpf = (int *) (((flags & IF_BIT) >> 9) |
+					    (preempt_count() << 8));
+	kgdb_and_then->data0 = data0;
+	kgdb_and_then->data1 = data1;
+	kgdb_and_then = &kgdb_data[++kgdb_and_then_count & INDEX_MASK];
+	spin_unlock(&ts_spin);
+	kgdb_local_irq_restore(flags);
+#ifdef CONFIG_PREEMPT
+
+#endif
+	return;
+}
+#endif
+typedef int gdb_debug_hook(int exceptionVector,
+			   int signo, int err_code, struct pt_regs *linux_regs);
+gdb_debug_hook *linux_debug_hook = &kgdb_handle_exception;	/* histerical reasons... */
+
+static int kgdb_need_breakpoint[NR_CPUS];
+
+void kgdb_schedule_breakpoint(void)
+{
+	kgdb_need_breakpoint[smp_processor_id()] = 1;
+}
+
+void kgdb_process_breakpoint(void)
+{
+	/*
+	 * Handle a breakpoint queued from inside network driver code
+         * to avoid reentrancy issues
+	 */
+	if (kgdb_need_breakpoint[smp_processor_id()]) {
+		kgdb_need_breakpoint[smp_processor_id()] = 0;
+		BREAKPOINT;
+	}
+}
+
--- diff/arch/ia64/lib/kgdb_serial.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ia64/lib/kgdb_serial.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,606 @@
+/*
+ * Serial interface GDB stub
+ *
+ * Written (hacked together) by David Grothe (dave@gcom.com)
+ * Modified to allow invokation early in boot see also
+ * kgdb.h for instructions by George Anzinger(george@mvista.com)
+ * Modified to handle debugging over ethernet by Robert Walsh
+ * <rjwalsh@durables.org> and wangdi <wangdi@clusterfs.com>, based on
+ * code by San Mehat.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/timer.h>
+#include <linux/interrupt.h>
+#include <linux/tty.h>
+#include <linux/tty_flip.h>
+#include <linux/serial.h>
+#include <linux/serial_reg.h>
+#include <linux/serial_core.h>
+#include <linux/config.h>
+#include <linux/major.h>
+#include <linux/string.h>
+#include <linux/fcntl.h>
+#include <linux/ptrace.h>
+#include <linux/ioport.h>
+#include <linux/mm.h>
+#include <linux/init.h>
+#include <linux/highmem.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/segment.h>
+#include <asm/bitops.h>
+#include <asm/system.h>
+#include <asm/kgdb_local.h>
+#include <asm/delay.h>
+#ifdef CONFIG_KGDB_USER_CONSOLE
+extern void kgdb_console_finit(void);
+#endif
+#define PRNT_off
+#define TEST_EXISTANCE
+#ifdef PRNT
+#define dbprintk(s) printk s
+#else
+#define dbprintk(s)
+#endif
+#define TEST_INTERRUPT_off
+#ifdef TEST_INTERRUPT
+#define intprintk(s) printk s
+#else
+#define intprintk(s)
+#endif
+
+#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
+
+#define	GDB_BUF_SIZE	512	/* power of 2, please */
+
+static char gdb_buf[GDB_BUF_SIZE];
+static int gdb_buf_in_inx;
+static atomic_t gdb_buf_in_cnt;
+static int gdb_buf_out_inx;
+
+struct async_struct *gdb_async_info;
+static int gdb_async_irq;
+
+#define outb_px(a,b,c) 		kgdb_serial_out(a, b, c)
+#define	outb_py(a, b, c)	kgdb_serial_out(b, c, a)
+#define	inb_py(ASYNC, OFF)	kgdb_serial_in(ASYNC, OFF)
+
+static void inline
+kgdb_serial_out(struct async_struct *serial, unsigned long offset, char ch)
+{
+	offset <<= serial->iomem_reg_shift;
+
+	switch(serial->io_type) {
+	case SERIAL_IO_MEM:
+		writeb(ch, serial->iomem_base + offset);
+		break;
+	default:
+		outb(serial->port + offset, ch);
+		break;
+	}
+	return;
+}
+
+static inline unsigned int
+kgdb_serial_in(struct async_struct *serial, unsigned long offset)
+{
+	unsigned int ch;
+
+	offset <<= serial->iomem_reg_shift;
+
+	switch(serial->io_type) {
+	case SERIAL_IO_MEM:
+		ch = readb(serial->iomem_base + offset);
+		break;
+	default:
+		ch = inb(serial->port + offset);
+		break;
+	}
+
+	return ch;
+}
+
+static void program_uart(struct async_struct *info);
+static void write_char(struct async_struct *info, int chr);
+/*
+ * Get a byte from the hardware data buffer and return it
+ */
+static int
+read_data_bfr(struct async_struct *info)
+{
+	char it = inb_py(info, UART_LSR);
+
+	if (it & UART_LSR_DR)
+		return (inb_py(info, UART_RX));
+	/*
+	 * If we have a framing error assume somebody messed with
+	 * our uart.  Reprogram it and send '-' both ways...
+	 */
+	if (it & 0xc) {
+		program_uart(info);
+		write_char(info, '-');
+		return ('-');
+	}
+	return (-1);
+
+}				/* read_data_bfr */
+
+/*
+ * Get a char if available, return -1 if nothing available.
+ * Empty the receive buffer first, then look at the interface hardware.
+
+ * Locking here is a bit of a problem.	We MUST not lock out communication
+ * if we are trying to talk to gdb about a kgdb entry.	ON the other hand
+ * we can loose chars in the console pass thru if we don't lock.  It is also
+ * possible that we could hold the lock or be waiting for it when kgdb
+ * NEEDS to talk.  Since kgdb locks down the world, it does not need locks.
+ * We do, of course have possible issues with interrupting a uart operation,
+ * but we will just depend on the uart status to help keep that straight.
+
+ */
+static spinlock_t uart_interrupt_lock = SPIN_LOCK_UNLOCKED;
+#ifdef CONFIG_SMP
+extern spinlock_t kgdb_spinlock;
+#endif
+
+static int
+read_char(struct async_struct *info)
+{
+	int chr;
+	unsigned long flags;
+	local_irq_save(flags);
+#ifdef CONFIG_SMP
+	if (!spin_is_locked(&kgdb_spinlock)) {
+		spin_lock(&uart_interrupt_lock);
+	}
+#endif
+	if (atomic_read(&gdb_buf_in_cnt) != 0) {	/* intr routine has q'd chars */
+		chr = gdb_buf[gdb_buf_out_inx++];
+		gdb_buf_out_inx &= (GDB_BUF_SIZE - 1);
+		atomic_dec(&gdb_buf_in_cnt);
+	} else {
+		chr = read_data_bfr(info);
+	}
+#ifdef CONFIG_SMP
+	if (!spin_is_locked(&kgdb_spinlock)) {
+		spin_unlock(&uart_interrupt_lock);
+	}
+#endif
+	local_irq_restore(flags);
+	return (chr);
+}
+
+/*
+ * Wait until the interface can accept a char, then write it.
+ */
+static void
+write_char(struct async_struct *info, int chr)
+{
+	while (!(inb_py(info, UART_LSR) & UART_LSR_THRE)) ;
+
+	outb_py(chr, info, UART_TX);
+
+}				/* write_char */
+
+/*
+ * Mostly we don't need a spinlock, but since the console goes
+ * thru here with interrutps on, well, we need to catch those
+ * chars.
+ */
+/*
+ * This is the receiver interrupt routine for the GDB stub.
+ * It will receive a limited number of characters of input
+ * from the gdb  host machine and save them up in a buffer.
+ *
+ * When the gdb stub routine tty_getDebugChar() is called it
+ * draws characters out of the buffer until it is empty and
+ * then reads directly from the serial port.
+ *
+ * We do not attempt to write chars from the interrupt routine
+ * since the stubs do all of that via tty_putDebugChar() which
+ * writes one byte after waiting for the interface to become
+ * ready.
+ *
+ * The debug stubs like to run with interrupts disabled since,
+ * after all, they run as a consequence of a breakpoint in
+ * the kernel.
+ *
+ * Perhaps someone who knows more about the tty driver than I
+ * care to learn can make this work for any low level serial
+ * driver.
+ */
+static irqreturn_t
+gdb_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	struct async_struct *info;
+	unsigned long flags;
+
+	info = gdb_async_info;
+	if (!info || !info->tty || irq != gdb_async_irq)
+		return IRQ_NONE;
+
+	local_irq_save(flags);
+	spin_lock(&uart_interrupt_lock);
+	do {
+		int chr = read_data_bfr(info);
+		intprintk(("Debug char on int: %x hex\n", chr));
+		if (chr < 0)
+			continue;
+
+		if (chr == 3) {	/* Ctrl-C means remote interrupt */
+			BREAKPOINT;
+			continue;
+		}
+
+		if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) {
+			/* buffer overflow tosses early char */
+			read_char(info);
+		}
+		gdb_buf[gdb_buf_in_inx++] = chr;
+		gdb_buf_in_inx &= (GDB_BUF_SIZE - 1);
+	} while (inb_py(info,  UART_IIR) & UART_IIR_RDI);
+	spin_unlock(&uart_interrupt_lock);
+	local_irq_restore(flags);
+	return IRQ_HANDLED;
+}				/* gdb_interrupt */
+
+/*
+ * Just a NULL routine for testing.
+ */
+void
+gdb_null(void)
+{
+}				/* gdb_null */
+
+/* These structure are filled in with values defined in asm/kgdb_local.h
+ */
+static struct serial_state state = SB_STATE;
+static struct async_struct local_info = SB_INFO;
+static int ok_to_enable_ints = 0;
+static void kgdb_enable_ints_now(void);
+
+extern char *kgdb_version;
+/*
+ * Hook an IRQ for KGDB.
+ *
+ * This routine is called from tty_putDebugChar, below.
+ */
+static int ints_disabled = 1;
+int
+gdb_hook_interrupt(struct async_struct *info, int verb)
+{
+	struct serial_state *state = info->state;
+	unsigned long flags;
+	int port;
+#ifdef TEST_EXISTANCE
+	int scratch, scratch2;
+#endif
+
+	/* The above fails if memory managment is not set up yet.
+	 * Rather than fail the set up, just keep track of the fact
+	 * and pick up the interrupt thing later.
+	 */
+	gdb_async_info = info;
+	port = gdb_async_info->port;
+	gdb_async_irq = state->irq;
+	if (verb) {
+		printk("kgdb %s : port =%x, IRQ=%d, divisor =%d\n",
+		       kgdb_version,
+		       port,
+		       gdb_async_irq, gdb_async_info->state->custom_divisor);
+	}
+	local_irq_save(flags);
+#ifdef TEST_EXISTANCE
+	/* Existance test */
+	/* Should not need all this, but just in case.... */
+
+	scratch = inb_py(info, UART_IER);
+	outb_px(info, UART_IER, 0);
+	scratch2 = inb_py(info, UART_IER);
+	outb_px(info, UART_IER, scratch);
+	if (scratch2) {
+		printk
+		    ("gdb_hook_interrupt: Could not clear IER, not a UART!\n");
+		local_irq_restore(flags);
+		return 1;	/* We failed; there's nothing here */
+	}
+	scratch2 = inb_py(info, UART_LCR);
+	outb_px(info, UART_LCR, 0xBF);	/* set up for StarTech test */
+	outb_px(info, UART_EFR, 0);	/* EFR is the same as FCR */
+	outb_px(info, UART_LCR, 0);
+	outb_px(info, UART_FCR, UART_FCR_ENABLE_FIFO);
+	scratch = inb_py(info, UART_IIR) >> 6;
+	if (scratch == 1) {
+		printk("gdb_hook_interrupt: Undefined UART type!"
+		       "  Not a UART! \n");
+		local_irq_restore(flags);
+		return 1;
+	} else {
+		dbprintk(("gdb_hook_interrupt: UART type "
+			  "is %d where 0=16450, 2=16550 3=16550A\n", scratch));
+	}
+	scratch = inb_py(info, UART_MCR);
+	outb_px(info, UART_MCR, UART_MCR_LOOP | scratch);
+	outb_px(info, UART_MCR, UART_MCR_LOOP | 0x0A);
+	scratch2 = inb_py(info, UART_MSR) & 0xF0;
+	outb_px(info, UART_MCR, scratch);
+#ifndef	CONFIG_SERIAL_8250_HCDP		/* HCDP seems to skip this test */
+	if (scratch2 != 0x90) {
+		printk("gdb_hook_interrupt: "
+		       "Loop back test failed! Not a UART!\n");
+		local_irq_restore(flags);
+		return scratch2 + 1000;	/* force 0 to fail */
+	}
+#endif
+#endif				/* test existance */
+	program_uart(info);
+	local_irq_restore(flags);
+
+	return (0);
+
+}				/* gdb_hook_interrupt */
+
+static void
+program_uart(struct async_struct *info)
+{
+	(void) inb_py(info, UART_RX);
+	outb_px(info, UART_IER, 0);
+
+	(void) inb_py(info, UART_RX);	/* serial driver comments say */
+	(void) inb_py(info, UART_IIR);	/* this clears the interrupt regs */
+	(void) inb_py(info, UART_MSR);
+	outb_px(info, UART_LCR, UART_LCR_WLEN8 | UART_LCR_DLAB);
+	outb_px(info, UART_DLL, info->state->custom_divisor & 0xff);	/* LS */
+	outb_px(info, UART_DLM, info->state->custom_divisor >> 8);	/* MS  */
+	outb_px(info, UART_MCR, info->MCR);
+	printk("UART_LCR = 0x%x\n", inb_py(info, UART_LCR));
+
+	outb_px(info, UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1 | UART_FCR_CLEAR_XMIT | UART_FCR_CLEAR_RCVR);	/* set fcr */
+	outb_px(info, UART_LCR, UART_LCR_WLEN8);	/* reset DLAB */
+	outb_px(info, UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1);	/* set fcr */
+	if (!ints_disabled) {
+		intprintk(("KGDB: Sending %d to port %x offset %d\n",
+			   gdb_async_info->IER,
+			   (int) gdb_async_info->port, UART_IER));
+		outb_px(gdb_async_info, UART_IER, gdb_async_info->IER);
+	}
+	return;
+}
+
+/*
+ * tty_getDebugChar
+ *
+ * This is a GDB stub routine.	It waits for a character from the
+ * serial interface and then returns it.  If there is no serial
+ * interface connection then it returns a bogus value which will
+ * almost certainly cause the system to hang.  In the
+ */
+int kgdb_in_isr = 0;
+int kgdb_in_lsr = 0;
+extern spinlock_t kgdb_spinlock;
+
+/* Caller takes needed protections */
+
+int
+tty_getDebugChar(void)
+{
+	volatile int chr;
+	volatile long time, end_time;
+
+	dbprintk(("tty_getDebugChar(port %x): ", gdb_async_info->port));
+
+	if (gdb_async_info == NULL) {
+		gdb_hook_interrupt(&local_info, 0);
+	}
+	/*
+	 * This trick says if we wait a very long time and get
+	 * no char, return the -1 and let the upper level deal
+	 * with it.
+	 */
+	time = ia64_get_itc();
+	end_time = time + local_cpu_data->itm_delta * (HZ / 10);
+	if (!local_cpu_data->itm_delta)
+		end_time = time + 500;
+	while (((chr = read_char(gdb_async_info)) == -1) &&
+	       (end_time - time) > 0) {
+		time = ia64_get_itc();
+	};
+	/*
+	 * This covers our butts if some other code messes with
+	 * our uart, hay, it happens :o)
+	 */
+	if (chr == -1)
+		udelay(10000);
+//		program_uart(gdb_async_info);
+
+	dbprintk(("%c\n", chr > ' ' && chr < 0x7F ? chr : ' '));
+	return (chr);
+
+}				/* tty_getDebugChar */
+
+static int count = 3;
+static spinlock_t one_at_atime = SPIN_LOCK_UNLOCKED;
+
+static int __init
+kgdb_enable_ints(void)
+{
+	if (kgdboe) {
+		return 0;
+	}
+	if (gdb_async_info == NULL) {
+		gdb_hook_interrupt(&local_info, 1);
+	}
+	ok_to_enable_ints = 1;
+	kgdb_enable_ints_now();
+#ifdef CONFIG_KGDB_USER_CONSOLE
+	kgdb_console_finit();
+#endif
+	return 0;
+}
+
+static int mem_init_done = 1;
+
+#ifdef CONFIG_SERIAL_8250
+void shutdown_for_kgdb(struct async_struct *gdb_async_info);
+#endif
+
+
+static inline int kgdb_mem_init_done(void)
+{
+	return mem_init_done;
+}
+
+#ifdef	CONFIG_KGDB_EARLY
+static struct irqaction kgdb_action;
+#endif
+
+static void
+kgdb_enable_ints_now(void)
+{
+	if (!spin_trylock(&one_at_atime))
+		return;
+	if (!ints_disabled)
+		goto exit;
+	if (kgdb_mem_init_done() &&
+			ints_disabled) {	/* don't try till mem init */
+#ifdef CONFIG_SERIAL_8250
+		/*
+		 * The ifdef here allows the system to be configured
+		 * without the serial driver.
+		 * Don't make it a module, however, it will steal the port
+		 */
+		shutdown_for_kgdb(gdb_async_info);
+#endif
+#ifndef	CONFIG_KGDB_EARLY
+		ints_disabled = request_irq(gdb_async_info->state->irq,
+					    gdb_interrupt,
+					    IRQ_T(gdb_async_info),
+					    "KGDB-stub", NULL);
+#else
+{
+		irq_desc_t *desc;
+		kgdb_action.handler = gdb_interrupt;
+		kgdb_action.flags = IRQ_T(gdb_async_info);
+		kgdb_action.mask = CPU_MASK_NONE;
+		kgdb_action.name = "KGDB-stub";
+		kgdb_action.next = NULL;
+		kgdb_action.dev_id = NULL;
+		desc = irq_descp(gdb_async_info->state->irq);
+		if (desc->handler != &no_irq_type) {
+			desc->action = &kgdb_action;
+			ints_disabled = 0;
+			desc->depth = 0;
+			desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT |
+				IRQ_WAITING | IRQ_INPROGRESS);
+			desc->handler->startup(gdb_async_info->state->irq);
+		}
+		if (ints_disabled)
+			printk("kgdb_enable_ints_now: setup_irq failed\n");
+		else
+			printk("kgdb early access enabled\n");
+}
+#endif
+		intprintk(("KGDB: request_irq returned %d\n", ints_disabled));
+	}
+	if (!ints_disabled) {
+		intprintk(("KGDB: Sending %d to port %x offset %d\n",
+			   gdb_async_info->IER,
+			   (int) gdb_async_info->port, UART_IER));
+		outb_px(gdb_async_info, UART_IER, gdb_async_info->IER);
+	}
+      exit:
+	spin_unlock(&one_at_atime);
+}
+
+/*
+ * tty_putDebugChar
+ *
+ * This is a GDB stub routine.	It waits until the interface is ready
+ * to transmit a char and then sends it.  If there is no serial
+ * interface connection then it simply returns to its caller, having
+ * pretended to send the char.	Caller takes needed protections.
+ */
+void
+tty_putDebugChar(int chr)
+{
+	dbprintk(("tty_putDebugChar(port %x): chr=%02x '%c', ints_on=%d\n",
+		  gdb_async_info->port,
+		  chr,
+		  chr > ' ' && chr < 0x7F ? chr : ' ', ints_disabled ? 0 : 1));
+
+	if (gdb_async_info == NULL) {
+		gdb_hook_interrupt(&local_info, 0);
+	}
+
+	write_char(gdb_async_info, chr);	/* this routine will wait */
+	count = (chr == '#') ? 0 : count + 1;
+	if ((count == 2)) {	/* try to enable after */
+		if (ints_disabled & ok_to_enable_ints)
+			kgdb_enable_ints_now();	/* try to enable after */
+
+		/* We do this a lot because, well we really want to get these
+		 * interrupts.	The serial driver will clear these bits when it
+		 * initializes the chip.  Every thing else it does is ok,
+		 * but this.
+		 */
+		if (!ints_disabled) {
+			outb_px(gdb_async_info, UART_IER,
+				gdb_async_info->IER);
+		}
+	}
+
+}				/* tty_putDebugChar */
+
+/*
+ * This does nothing for the serial port, since it doesn't buffer.
+ */
+
+void tty_flushDebugChar(void)
+{
+}
+
+void __init
+kgdb_serial_init(void)
+{
+	extern char saved_command_line[];
+	char *cp, *str;
+	int kgdbbreak = 0;
+
+	for (cp = saved_command_line; *cp; cp++) {
+		if (memcmp(cp, "kgdb=1", 6) == 0) {
+			kgdbbreak = 1;
+		}
+		else if (memcmp(cp,"kgdbio=", 7) == 0) {
+			int baud;
+
+			cp += 7;
+			baud = simple_strtoul(cp, &str, 10);
+			state.custom_divisor = SB_BASE/baud;
+			if (*str == ',') {
+				str++;
+				state.irq = simple_strtoul(str, &str, 10);
+				if (*str == ',') {
+					str++;
+					local_info.iomem_base = state.iomem_base = (char *)
+						simple_strtoul(str, &str, 0);
+					local_info.io_type = state.io_type = SERIAL_IO_MEM;
+				}
+			}
+			printk("kgdb_serial_init: irq = %d iomem_base = 0x%lx baud = %d\n",
+				state.irq, state.iomem_base, baud);
+		}
+	}
+
+	kgdb_enable_ints();
+	if (!ints_disabled && kgdbbreak)
+		BREAKPOINT;
+}
+
+#ifndef	CONFIG_IA64_HP_SIM
+late_initcall(kgdb_enable_ints);
+#endif
--- diff/arch/mips/configs/ocelot_g_defconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/configs/ocelot_g_defconfig	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,587 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_MIPS=y
+CONFIG_MIPS64=y
+CONFIG_64BIT=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_EMBEDDED=y
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# Machine selection
+#
+# CONFIG_MACH_JAZZ is not set
+# CONFIG_MACH_VR41XX is not set
+# CONFIG_MIPS_COBALT is not set
+# CONFIG_MACH_DECSTATION is not set
+# CONFIG_MIPS_EV64120 is not set
+# CONFIG_MIPS_EV96100 is not set
+# CONFIG_MIPS_IVR is not set
+# CONFIG_LASAT is not set
+# CONFIG_MIPS_ITE8172 is not set
+# CONFIG_MIPS_ATLAS is not set
+# CONFIG_MIPS_MALTA is not set
+# CONFIG_MIPS_SEAD is not set
+# CONFIG_MOMENCO_OCELOT is not set
+CONFIG_MOMENCO_OCELOT_G=y
+# CONFIG_MOMENCO_OCELOT_C is not set
+# CONFIG_MOMENCO_JAGUAR_ATX is not set
+# CONFIG_PMC_YOSEMITE is not set
+# CONFIG_DDB5074 is not set
+# CONFIG_DDB5476 is not set
+# CONFIG_DDB5477 is not set
+# CONFIG_NEC_OSPREY is not set
+# CONFIG_SGI_IP22 is not set
+# CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP32 is not set
+# CONFIG_SIBYTE_SB1xxx_SOC is not set
+# CONFIG_SNI_RM200_PCI is not set
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_DMA_NONCOHERENT=y
+# CONFIG_CPU_LITTLE_ENDIAN is not set
+CONFIG_IRQ_CPU=y
+CONFIG_IRQ_CPU_RM7K=y
+CONFIG_SWAP_IO_SPACE=y
+# CONFIG_SYSCLK_75 is not set
+# CONFIG_SYSCLK_83 is not set
+CONFIG_SYSCLK_100=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+# CONFIG_FB is not set
+
+#
+# CPU selection
+#
+# CONFIG_CPU_MIPS32 is not set
+# CONFIG_CPU_MIPS64 is not set
+# CONFIG_CPU_R3000 is not set
+# CONFIG_CPU_TX39XX is not set
+# CONFIG_CPU_VR41XX is not set
+# CONFIG_CPU_R4300 is not set
+# CONFIG_CPU_R4X00 is not set
+# CONFIG_CPU_TX49XX is not set
+# CONFIG_CPU_R5000 is not set
+# CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R6000 is not set
+# CONFIG_CPU_NEVADA is not set
+# CONFIG_CPU_R8000 is not set
+# CONFIG_CPU_R10000 is not set
+CONFIG_CPU_RM7000=y
+# CONFIG_CPU_RM9000 is not set
+# CONFIG_CPU_SB1 is not set
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
+CONFIG_BOARD_SCACHE=y
+CONFIG_RM7000_CPU_SCACHE=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_LLSC=y
+CONFIG_CPU_HAS_LLDSCD=y
+CONFIG_CPU_HAS_SYNC=y
+# CONFIG_PREEMPT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+
+#
+# Bus options (PCI, PCMCIA, EISA, ISA, TC)
+#
+CONFIG_HW_HAS_PCI=y
+CONFIG_PCI=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+CONFIG_MMU=y
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_MIPS32_COMPAT=y
+CONFIG_COMPAT=y
+CONFIG_MIPS32_O32=y
+CONFIG_MIPS32_N32=y
+CONFIG_BINFMT_ELF32=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_CARMEL is not set
+# CONFIG_BLK_DEV_RAM is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_PACKET is not set
+CONFIG_NETLINK_DEV=y
+CONFIG_UNIX=y
+CONFIG_NET_KEY=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_GALILEO_64240_ETH=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_QIC02_TAPE is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_FAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+# CONFIG_DEVFS_FS is not set
+CONFIG_DEVPTS_FS_XATTR=y
+CONFIG_DEVPTS_FS_SECURITY=y
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+# CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_EXPORTFS=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_CROSSCOMPILE=y
+CONFIG_CMDLINE=""
+# CONFIG_DEBUG_KERNEL is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
--- diff/arch/mips/kernel/module.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/kernel/module.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,53 @@
+#include <linux/module.h>
+#include <linux/spinlock.h>
+
+static LIST_HEAD(dbe_list);
+static spinlock_t dbe_lock = SPIN_LOCK_UNLOCKED;
+
+/* Given an address, look for it in the module exception tables. */
+const struct exception_table_entry *search_module_dbetables(unsigned long addr)
+{
+	unsigned long flags;
+	const struct exception_table_entry *e = NULL;
+	struct mod_arch_specific *dbe;
+
+	spin_lock_irqsave(&dbe_lock, flags);
+	list_for_each_entry(dbe, &dbe_list, dbe_list) {
+		e = search_extable(dbe->dbe_start, dbe->dbe_end - 1, addr);
+		if (e)
+			break;
+	}
+	spin_unlock_irqrestore(&dbe_lock, flags);
+
+	/* Now, if we found one, we are running inside it now, hence
+           we cannot unload the module, hence no refcnt needed. */
+	return e;
+}
+
+/* Put in dbe list if neccessary. */
+int module_finalize(const Elf_Ehdr *hdr,
+		    const Elf_Shdr *sechdrs,
+		    struct module *me)
+{
+	const Elf_Shdr *s;
+	char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
+
+	INIT_LIST_HEAD(&me->arch.dbe_list);
+	for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
+		if (strcmp("__dbe_table", secstrings + s->sh_name) != 0)
+			continue;
+		me->arch.dbe_start = (void *)s->sh_addr;
+		me->arch.dbe_end = (void *)s->sh_addr + s->sh_size;
+		spin_lock_irq(&dbe_lock);
+		list_add(&me->arch.dbe_list, &dbe_list);
+		spin_unlock_irq(&dbe_lock);
+	}
+	return 0;
+}
+
+void module_arch_cleanup(struct module *mod)
+{
+	spin_lock_irq(&dbe_lock);
+	list_del(&mod->arch.dbe_list);
+	spin_unlock_irq(&dbe_lock);
+}
--- diff/arch/mips/mm/tlb-r8k.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/mm/tlb-r8k.c	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,253 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 1997, 1998, 1999, 2000 Ralf Baechle ralf@gnu.org
+ * Carsten Langgaard, carstenl@mips.com
+ * Copyright (C) 2002 MIPS Technologies, Inc.  All rights reserved.
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+
+#include <asm/cpu.h>
+#include <asm/bootinfo.h>
+#include <asm/mmu_context.h>
+#include <asm/pgtable.h>
+#include <asm/system.h>
+
+extern void except_vec0_generic(void);
+extern void except_vec1_r8k(void);
+
+#define TFP_TLB_SIZE		384
+#define TFP_TLB_SET_SHIFT	7
+
+/* CP0 hazard avoidance. */
+#define BARRIER __asm__ __volatile__(".set noreorder\n\t" \
+				     "nop; nop; nop; nop; nop; nop;\n\t" \
+				     ".set reorder\n\t")
+
+void local_flush_tlb_all(void)
+{
+	unsigned long flags;
+	unsigned long old_ctx;
+	int entry;
+
+	local_irq_save(flags);
+	/* Save old context and create impossible VPN2 value */
+	old_ctx = read_c0_entryhi();
+	write_c0_entrylo(0);
+
+	for (entry = 0; entry < TFP_TLB_SIZE; entry++) {
+		write_c0_tlbset(entry >> TFP_TLB_SET_SHIFT);
+		write_c0_vaddr(entry << PAGE_SHIFT);
+		write_c0_entryhi(CKSEG0 + (entry << (PAGE_SHIFT + 1)));
+		mtc0_tlbw_hazard();
+		tlb_write();
+	}
+	tlbw_use_hazard();
+	write_c0_entryhi(old_ctx);
+	local_irq_restore(flags);
+}
+
+void local_flush_tlb_mm(struct mm_struct *mm)
+{
+	int cpu = smp_processor_id();
+
+	if (cpu_context(cpu, mm) != 0)
+		drop_mmu_context(mm,cpu);
+}
+
+void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
+	unsigned long end)
+{
+	struct mm_struct *mm = vma->vm_mm;
+	int cpu = smp_processor_id();
+	unsigned long flags;
+	int oldpid, newpid, size;
+
+	if (!cpu_context(cpu, mm))
+		return;
+
+	size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
+	size = (size + 1) >> 1;
+
+	local_irq_save(flags);
+
+	if (size > TFP_TLB_SIZE / 2) {
+		drop_mmu_context(mm, cpu);
+		goto out_restore;
+	}
+
+	oldpid = read_c0_entryhi();
+	newpid = cpu_asid(cpu, mm);
+
+	write_c0_entrylo(0);
+
+	start &= PAGE_MASK;
+	end += (PAGE_SIZE - 1);
+	end &= PAGE_MASK;
+	while (start < end) {
+		signed long idx;
+
+		write_c0_vaddr(start);
+		write_c0_entryhi(start);
+		start += PAGE_SIZE;
+		tlb_probe();
+		idx = read_c0_tlbset();
+		if (idx < 0)
+			continue;
+
+		write_c0_entryhi(CKSEG0 + (idx << (PAGE_SHIFT + 1)));
+		tlb_write();
+	}
+	write_c0_entryhi(oldpid);
+
+out_restore:
+	local_irq_restore(flags);
+}
+
+/* Usable for KV1 addresses only! */
+void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
+{
+	unsigned long flags;
+	int size;
+
+	size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
+	size = (size + 1) >> 1;
+
+	if (size > TFP_TLB_SIZE / 2) {
+		local_flush_tlb_all();
+		return;
+	}
+
+	local_irq_save(flags);
+
+	write_c0_entrylo(0);
+
+	start &= PAGE_MASK;
+	end += (PAGE_SIZE - 1);
+	end &= PAGE_MASK;
+	while (start < end) {
+		signed long idx;
+
+		write_c0_vaddr(start);
+		write_c0_entryhi(start);
+		start += PAGE_SIZE;
+		tlb_probe();
+		idx = read_c0_tlbset();
+		if (idx < 0)
+			continue;
+
+		write_c0_entryhi(CKSEG0 + (idx << (PAGE_SHIFT + 1)));
+		tlb_write();
+	}
+
+	local_irq_restore(flags);
+}
+
+void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
+{
+	int cpu = smp_processor_id();
+	unsigned long flags;
+	int oldpid, newpid;
+	signed long idx;
+
+	if (!cpu_context(cpu, vma->vm_mm))
+		return;
+
+	newpid = cpu_asid(cpu, vma->vm_mm);
+	page &= PAGE_MASK;
+	local_irq_save(flags);
+	oldpid = read_c0_entryhi();
+	write_c0_vaddr(page);
+	write_c0_entryhi(newpid);
+	tlb_probe();
+	idx = read_c0_tlbset();
+	if (idx < 0)
+		goto finish;
+
+	write_c0_entrylo(0);
+	write_c0_entryhi(CKSEG0 + (idx << (PAGE_SHIFT + 1)));
+	tlb_write();
+
+finish:
+	write_c0_entryhi(oldpid);
+	local_irq_restore(flags);
+}
+
+/*
+ * We will need multiple versions of update_mmu_cache(), one that just
+ * updates the TLB with the new pte(s), and another which also checks
+ * for the R4k "end of page" hardware bug and does the needy.
+ */
+void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
+{
+	unsigned long flags;
+	pgd_t *pgdp;
+	pmd_t *pmdp;
+	pte_t *ptep;
+	int pid;
+
+	/*
+	 * Handle debugger faulting in for debugee.
+	 */
+	if (current->active_mm != vma->vm_mm)
+		return;
+
+	pid = read_c0_entryhi() & ASID_MASK;
+
+	local_irq_save(flags);
+	address &= PAGE_MASK;
+	write_c0_vaddr(address);
+	write_c0_entryhi(pid);
+	pgdp = pgd_offset(vma->vm_mm, address);
+	pmdp = pmd_offset(pgdp, address);
+	ptep = pte_offset_map(pmdp, address);
+	tlb_probe();
+
+	write_c0_entrylo(pte_val(*ptep++) >> 6);
+	tlb_write();
+
+	write_c0_entryhi(pid);
+	local_irq_restore(flags);
+}
+
+static void __init probe_tlb(unsigned long config)
+{
+	struct cpuinfo_mips *c = &current_cpu_data;
+
+	c->tlbsize = 3 * 128;		/* 3 sets each 128 entries */
+}
+
+void __init tlb_init(void)
+{
+	unsigned int config = read_c0_config();
+	unsigned long status;
+
+	probe_tlb(config);
+
+	status = read_c0_status();
+	status &= ~(ST0_UPS | ST0_KPS);
+#ifdef CONFIG_PAGE_SIZE_4KB
+	status |= (TFP_PAGESIZE_4K << 32) | (TFP_PAGESIZE_4K << 36);
+#elif defined(CONFIG_PAGE_SIZE_8KB)
+	status |= (TFP_PAGESIZE_8K << 32) | (TFP_PAGESIZE_8K << 36);
+#elif defined(CONFIG_PAGE_SIZE_16KB)
+	status |= (TFP_PAGESIZE_16K << 32) | (TFP_PAGESIZE_16K << 36);
+#elif defined(CONFIG_PAGE_SIZE_64KB)
+	status |= (TFP_PAGESIZE_64K << 32) | (TFP_PAGESIZE_64K << 36);
+#endif
+	write_c0_status(status);
+
+	write_c0_wired(0);
+
+	local_flush_tlb_all();
+
+	memcpy((void *)(CKSEG0 + 0x00), &except_vec0_generic, 0x80);
+	memcpy((void *)(CKSEG0 + 0x80), except_vec1_r8k, 0x80);
+	flush_icache_range(CKSEG0 + 0x80, CKSEG0 + 0x100);
+}
--- diff/arch/mips/mm/tlb64-glue-r4k.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/mm/tlb64-glue-r4k.S	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,41 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1999 Ralf Baechle
+ * Copyright (C) 1999 Silicon Graphics, Inc.
+ */
+#include <linux/init.h>
+#include <asm/mipsregs.h>
+#include <asm/regdef.h>
+#include <asm/stackframe.h>
+
+	.macro	__BUILD_cli
+	CLI
+	.endm
+
+	.macro	__BUILD_sti
+	STI
+	.endm
+
+	.macro	__BUILD_kmode
+	KMODE
+	.endm
+
+	.macro	tlb_handler name interruptible writebit
+	NESTED(__\name, PT_SIZE, sp)
+	SAVE_ALL
+	dmfc0	a2, CP0_BADVADDR
+	__BUILD_\interruptible
+	li	a1, \writebit
+	sd	a2, PT_BVADDR(sp)
+	move	a0, sp
+	jal	do_page_fault
+	j	ret_from_exception
+	END(__\name)
+	.endm
+
+	tlb_handler	xtlb_mod kmode 1
+	tlb_handler	xtlb_tlbl kmode 0
+	tlb_handler	xtlb_tlbs kmode 1
--- diff/arch/mips/mm/tlb64-glue-sb1.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/mm/tlb64-glue-sb1.S	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,66 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1999 Ralf Baechle
+ * Copyright (C) 1999 Silicon Graphics, Inc.
+ */
+#include <linux/init.h>
+#include <asm/mipsregs.h>
+#include <asm/page.h>
+#include <asm/regdef.h>
+#include <asm/stackframe.h>
+#include <asm/war.h>
+
+	.macro	__BUILD_cli
+	CLI
+	.endm
+
+	.macro	__BUILD_sti
+	STI
+	.endm
+
+	.macro	__BUILD_kmode
+	KMODE
+	.endm
+
+	.macro	tlb_handler name interruptible writebit
+	NESTED(__\name, PT_SIZE, sp)
+	SAVE_ALL
+	dmfc0	a2, CP0_BADVADDR
+	__BUILD_\interruptible
+	li	a1, \writebit
+	sd	a2, PT_BVADDR(sp)
+	move	a0, sp
+	jal	do_page_fault
+	j	ret_from_exception
+	END(__\name)
+	.endm
+
+	.macro	tlb_handler_m3 name interruptible writebit
+	NESTED(__\name, PT_SIZE, sp)
+	dmfc0	k0, CP0_BADVADDR
+	dmfc0	k1, CP0_ENTRYHI
+	xor	k0, k1
+	dsrl	k0, k0, PAGE_SHIFT + 1
+	bnez	k0, 1f
+	SAVE_ALL
+	dmfc0	a2, CP0_BADVADDR
+	__BUILD_\interruptible
+	li	a1, \writebit
+	sd	a2, PT_BVADDR(sp)
+	move	a0, sp
+	jal	do_page_fault
+1:
+	j	ret_from_exception
+	END(__\name)
+	.endm
+
+	tlb_handler	xtlb_mod kmode 1
+#if BCM1250_M3_WAR
+	tlb_handler_m3	xtlb_tlbl kmode 0
+#else
+	tlb_handler	xtlb_tlbl kmode 0
+#endif
+	tlb_handler	xtlb_tlbs kmode 1
--- diff/arch/mips/mm/tlbex32-r3k.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/mm/tlbex32-r3k.S	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,224 @@
+/*
+ * TLB exception handling code for R2000/R3000.
+ *
+ * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
+ *
+ * Multi-CPU abstraction reworking:
+ * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ *
+ * Further modifications to make this work:
+ * Copyright (c) 1998 Harald Koerfgen
+ * Copyright (c) 1998, 1999 Gleb Raiko & Vladimir Roganov
+ * Copyright (c) 2001 Ralf Baechle
+ * Copyright (c) 2001 MIPS Technologies, Inc.
+ */
+#include <linux/init.h>
+#include <asm/asm.h>
+#include <asm/cachectl.h>
+#include <asm/fpregdef.h>
+#include <asm/mipsregs.h>
+#include <asm/page.h>
+#include <asm/pgtable-bits.h>
+#include <asm/regdef.h>
+#include <asm/stackframe.h>
+
+#define TLB_OPTIMIZE /* If you are paranoid, disable this. */
+
+	.text
+	.set	mips1
+	.set	noreorder
+
+	__INIT
+
+	/* TLB refill, R[23]00 version */
+	LEAF(except_vec0_r2300)
+	.set	noat
+	.set	mips1
+	mfc0	k0, CP0_BADVADDR
+	lw	k1, pgd_current			# get pgd pointer
+	srl	k0, k0, 22
+	sll	k0, k0, 2
+	addu	k1, k1, k0
+	mfc0	k0, CP0_CONTEXT
+	lw	k1, (k1)
+	and	k0, k0, 0xffc
+	addu	k1, k1, k0
+	lw	k0, (k1)
+	nop
+	mtc0	k0, CP0_ENTRYLO0
+	mfc0	k1, CP0_EPC
+	tlbwr
+	jr	k1
+	rfe
+	END(except_vec0_r2300)
+
+	__FINIT
+
+	/* ABUSE of CPP macros 101. */
+
+	/* After this macro runs, the pte faulted on is
+	 * in register PTE, a ptr into the table in which
+	 * the pte belongs is in PTR.
+	 */
+#define LOAD_PTE(pte, ptr) \
+	mfc0	pte, CP0_BADVADDR; \
+	lw	ptr, pgd_current; \
+	srl	pte, pte, 22; \
+	sll	pte, pte, 2; \
+	addu	ptr, ptr, pte; \
+	mfc0	pte, CP0_CONTEXT; \
+	lw	ptr, (ptr); \
+	andi	pte, pte, 0xffc; \
+	addu	ptr, ptr, pte; \
+	lw	pte, (ptr); \
+	nop;
+
+	/* This places the even/odd pte pair in the page
+	 * table at PTR into ENTRYLO0 and ENTRYLO1 using
+	 * TMP as a scratch register.
+	 */
+#define PTE_RELOAD(ptr) \
+	lw	ptr, (ptr)	; \
+	nop			; \
+	mtc0	ptr, CP0_ENTRYLO0; \
+	nop;
+
+#define DO_FAULT(write) \
+	.set	noat; \
+	.set	macro; \
+	SAVE_ALL; \
+	mfc0	a2, CP0_BADVADDR; \
+	KMODE; \
+	.set	at; \
+	move	a0, sp; \
+	jal	do_page_fault; \
+	 li	a1, write; \
+	j	ret_from_exception; \
+	 nop; \
+	.set	noat; \
+	.set	nomacro;
+
+	/* Check is PTE is present, if not then jump to LABEL.
+	 * PTR points to the page table where this PTE is located,
+	 * when the macro is done executing PTE will be restored
+	 * with it's original value.
+	 */
+#define PTE_PRESENT(pte, ptr, label) \
+	andi	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
+	xori	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
+	bnez	pte, label; \
+	.set	push;       \
+	.set	reorder;    \
+	 lw	pte, (ptr); \
+	.set	pop;
+
+	/* Make PTE valid, store result in PTR. */
+#define PTE_MAKEVALID(pte, ptr) \
+	ori	pte, pte, (_PAGE_VALID | _PAGE_ACCESSED); \
+	sw	pte, (ptr);
+
+	/* Check if PTE can be written to, if not branch to LABEL.
+	 * Regardless restore PTE with value from PTR when done.
+	 */
+#define PTE_WRITABLE(pte, ptr, label) \
+	andi	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
+	xori	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
+	bnez	pte, label; \
+	.set    push;       \
+	.set    reorder;    \
+	lw      pte, (ptr); \
+	.set    pop;
+
+
+	/* Make PTE writable, update software status bits as well,
+	 * then store at PTR.
+	 */
+#define PTE_MAKEWRITE(pte, ptr) \
+	ori	pte, pte, (_PAGE_ACCESSED | _PAGE_MODIFIED | \
+			   _PAGE_VALID | _PAGE_DIRTY); \
+	sw	pte, (ptr);
+
+/*
+ * The index register may have the probe fail bit set,
+ * because we would trap on access kseg2, i.e. without refill.
+ */
+#define TLB_WRITE(reg) \
+	mfc0	reg, CP0_INDEX; \
+	nop; \
+	bltz    reg, 1f; \
+	 nop; \
+	tlbwi; \
+	j	2f; \
+	 nop; \
+1:	tlbwr; \
+2:
+
+#define RET(reg) \
+	mfc0	reg, CP0_EPC; \
+	nop; \
+	jr	reg; \
+	 rfe
+
+	.set	noreorder
+
+	.align	5
+NESTED(handle_tlbl, PT_SIZE, sp)
+	.set	noat
+
+#ifdef TLB_OPTIMIZE
+	/* Test present bit in entry. */
+	LOAD_PTE(k0, k1)
+        tlbp
+        PTE_PRESENT(k0, k1, nopage_tlbl)
+        PTE_MAKEVALID(k0, k1)
+        PTE_RELOAD(k1)
+	TLB_WRITE(k0)
+	RET(k0)
+nopage_tlbl:
+#endif
+
+	DO_FAULT(0)
+END(handle_tlbl)
+
+NESTED(handle_tlbs, PT_SIZE, sp)
+	.set	noat
+
+#ifdef TLB_OPTIMIZE
+	LOAD_PTE(k0, k1)
+	tlbp                            # find faulting entry
+	PTE_WRITABLE(k0, k1, nopage_tlbs)
+	PTE_MAKEWRITE(k0, k1)
+	PTE_RELOAD(k1)
+	TLB_WRITE(k0)
+	RET(k0)
+nopage_tlbs:
+#endif
+
+	DO_FAULT(1)
+END(handle_tlbs)
+
+	.align	5
+NESTED(handle_mod, PT_SIZE, sp)
+	.set	noat
+#ifdef TLB_OPTIMIZE
+	LOAD_PTE(k0, k1)
+	tlbp					# find faulting entry
+	andi	k0, k0, _PAGE_WRITE
+	beqz	k0, nowrite_mod
+	.set	push
+	.set    reorder
+	lw	k0, (k1)
+	.set    pop
+
+	/* Present and writable bits set, set accessed and dirty bits. */
+	PTE_MAKEWRITE(k0, k1)
+
+	/* Now reload the entry into the tlb. */
+	PTE_RELOAD(k1)
+	tlbwi
+	RET(k0)
+#endif
+
+nowrite_mod:
+	DO_FAULT(1)
+END(handle_mod)
--- diff/arch/mips/mm/tlbex32-r4k.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/mm/tlbex32-r4k.S	2004-07-01 21:32:55.000000000 +0100
@@ -0,0 +1,524 @@
+/*
+ * TLB exception handling code for r4k.
+ *
+ * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
+ *
+ * Multi-cpu abstraction and reworking:
+ * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ *
+ * Carsten Langgaard, carstenl@mips.com
+ * Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
+ */
+#include <linux/init.h>
+#include <linux/config.h>
+
+#include <asm/asm.h>
+#include <asm/offset.h>
+#include <asm/cachectl.h>
+#include <asm/fpregdef.h>
+#include <asm/mipsregs.h>
+#include <asm/page.h>
+#include <asm/pgtable-bits.h>
+#include <asm/regdef.h>
+#include <asm/stackframe.h>
+#include <asm/war.h>
+
+#define TLB_OPTIMIZE /* If you are paranoid, disable this. */
+
+#ifdef CONFIG_64BIT_PHYS_ADDR
+#define PTE_L		ld
+#define PTE_S		sd
+#define PTE_SRL		dsrl
+#define P_MTC0		dmtc0
+#define PTE_SIZE	8
+#define PTEP_INDX_MSK	0xff0
+#define PTE_INDX_MSK	0xff8
+#define PTE_INDX_SHIFT	9
+#else
+#define PTE_L		lw
+#define PTE_S		sw
+#define PTE_SRL		srl
+#define P_MTC0		mtc0
+#define PTE_SIZE	4
+#define PTEP_INDX_MSK	0xff8
+#define PTE_INDX_MSK	0xffc
+#define PTE_INDX_SHIFT	10
+#endif
+
+/*
+ * ABUSE of CPP macros 101.
+ *
+ * After this macro runs, the pte faulted on is
+ * in register PTE, a ptr into the table in which
+ * the pte belongs is in PTR.
+ */
+
+#ifdef CONFIG_SMP
+#define GET_PGD(scratch, ptr)        \
+	mfc0    ptr, CP0_CONTEXT;    \
+	la      scratch, pgd_current;\
+	srl     ptr, 23;             \
+	sll     ptr, 2;              \
+	addu    ptr, scratch, ptr;   \
+	lw      ptr, (ptr);
+#else
+#define GET_PGD(scratch, ptr)    \
+	lw	ptr, pgd_current;
+#endif
+
+#define LOAD_PTE(pte, ptr) \
+	GET_PGD(pte, ptr)          \
+	mfc0	pte, CP0_BADVADDR; \
+	srl	pte, pte, _PGDIR_SHIFT; \
+	sll	pte, pte, 2; \
+	addu	ptr, ptr, pte; \
+	mfc0	pte, CP0_BADVADDR; \
+	lw	ptr, (ptr); \
+	srl	pte, pte, PTE_INDX_SHIFT; \
+	and	pte, pte, PTE_INDX_MSK; \
+	addu	ptr, ptr, pte; \
+	PTE_L	pte, (ptr);
+
+	/* This places the even/odd pte pair in the page
+	 * table at PTR into ENTRYLO0 and ENTRYLO1 using
+	 * TMP as a scratch register.
+	 */
+#define PTE_RELOAD(ptr, tmp) \
+	ori	ptr, ptr, PTE_SIZE; \
+	xori	ptr, ptr, PTE_SIZE; \
+	PTE_L	tmp, PTE_SIZE(ptr); \
+	PTE_L	ptr, 0(ptr); \
+	PTE_SRL	tmp, tmp, 6; \
+	P_MTC0	tmp, CP0_ENTRYLO1; \
+	PTE_SRL	ptr, ptr, 6; \
+	P_MTC0	ptr, CP0_ENTRYLO0;
+
+#define DO_FAULT(write) \
+	.set	noat; \
+	SAVE_ALL; \
+	mfc0	a2, CP0_BADVADDR; \
+	KMODE; \
+	.set	at; \
+	move	a0, sp; \
+	jal	do_page_fault; \
+	 li	a1, write; \
+	j	ret_from_exception; \
+	 nop; \
+	.set	noat;
+
+	/* Check is PTE is present, if not then jump to LABEL.
+	 * PTR points to the page table where this PTE is located,
+	 * when the macro is done executing PTE will be restored
+	 * with it's original value.
+	 */
+#define PTE_PRESENT(pte, ptr, label) \
+	andi	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
+	xori	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
+	bnez	pte, label; \
+	 PTE_L	pte, (ptr);
+
+	/* Make PTE valid, store result in PTR. */
+#define PTE_MAKEVALID(pte, ptr) \
+	ori	pte, pte, (_PAGE_VALID | _PAGE_ACCESSED); \
+	PTE_S	pte, (ptr);
+
+	/* Check if PTE can be written to, if not branch to LABEL.
+	 * Regardless restore PTE with value from PTR when done.
+	 */
+#define PTE_WRITABLE(pte, ptr, label) \
+	andi	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
+	xori	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
+	bnez	pte, label; \
+	 PTE_L	pte, (ptr);
+
+	/* Make PTE writable, update software status bits as well,
+	 * then store at PTR.
+	 */
+#define PTE_MAKEWRITE(pte, ptr) \
+	ori	pte, pte, (_PAGE_ACCESSED | _PAGE_MODIFIED | \
+			   _PAGE_VALID | _PAGE_DIRTY); \
+	PTE_S	pte, (ptr);
+
+	__INIT
+
+#ifdef CONFIG_64BIT_PHYS_ADDR
+#define GET_PTE_OFF(reg)
+#elif CONFIG_CPU_VR41XX
+#define GET_PTE_OFF(reg)	srl	reg, reg, 3
+#else
+#define GET_PTE_OFF(reg)	srl	reg, reg, 1
+#endif
+
+/*
+ * These handlers much be written in a relocatable manner
+ * because based upon the cpu type an arbitrary one of the
+ * following pieces of code will be copied to the KSEG0
+ * vector location.
+ */
+	/* TLB refill, EXL == 0, R4xx0, non-R4600 version */
+	.set	noreorder
+	.set	noat
+	LEAF(except_vec0_r4000)
+	.set	mips3
+	GET_PGD(k0, k1)				# get pgd pointer
+	mfc0	k0, CP0_BADVADDR		# Get faulting address
+	srl	k0, k0, _PGDIR_SHIFT		# get pgd only bits
+
+	sll	k0, k0, 2
+	addu	k1, k1, k0			# add in pgd offset
+	mfc0	k0, CP0_CONTEXT			# get context reg
+	lw	k1, (k1)
+	GET_PTE_OFF(k0)				# get pte offset
+	and	k0, k0, PTEP_INDX_MSK
+	addu	k1, k1, k0			# add in offset
+	PTE_L	k0, 0(k1)			# get even pte
+	PTE_L	k1, PTE_SIZE(k1)		# get odd pte
+	PTE_SRL	k0, k0, 6			# convert to entrylo0
+	P_MTC0	k0, CP0_ENTRYLO0		# load it
+	PTE_SRL	k1, k1, 6			# convert to entrylo1
+	P_MTC0	k1, CP0_ENTRYLO1		# load it
+	mtc0_tlbw_hazard
+	tlbwr					# write random tlb entry
+	tlbw_eret_hazard
+	eret					# return from trap
+	END(except_vec0_r4000)
+
+	/* TLB refill, EXL == 0, R4600 version */
+	LEAF(except_vec0_r4600)
+	.set	mips3
+	GET_PGD(k0, k1)				# get pgd pointer
+	mfc0	k0, CP0_BADVADDR
+	srl	k0, k0, _PGDIR_SHIFT
+	sll	k0, k0, 2			# log2(sizeof(pgd_t)
+	addu	k1, k1, k0
+	mfc0	k0, CP0_CONTEXT
+	lw	k1, (k1)
+	GET_PTE_OFF(k0)				# get pte offset
+	and	k0, k0, PTEP_INDX_MSK
+	addu	k1, k1, k0
+	PTE_L	k0, 0(k1)
+	PTE_L	k1, PTE_SIZE(k1)
+	PTE_SRL	k0, k0, 6
+	P_MTC0	k0, CP0_ENTRYLO0
+	PTE_SRL	k1, k1, 6
+	P_MTC0	k1, CP0_ENTRYLO1
+	nop
+	tlbwr
+	nop
+	eret
+	END(except_vec0_r4600)
+
+	/* TLB refill, EXL == 0, R52x0 "Nevada" version */
+        /*
+         * This version has a bug workaround for the Nevada.  It seems
+         * as if under certain circumstances the move from cp0_context
+         * might produce a bogus result when the mfc0 instruction and
+         * it's consumer are in a different cacheline or a load instruction,
+         * probably any memory reference, is between them.  This is
+         * potencially slower than the R4000 version, so we use this
+         * special version.
+         */
+	.set	noreorder
+	.set	noat
+	LEAF(except_vec0_nevada)
+	.set	mips3
+	mfc0	k0, CP0_BADVADDR		# Get faulting address
+	srl	k0, k0, _PGDIR_SHIFT		# get pgd only bits
+	lw	k1, pgd_current			# get pgd pointer
+	sll	k0, k0, 2			# log2(sizeof(pgd_t)
+	addu	k1, k1, k0			# add in pgd offset
+	lw	k1, (k1)
+	mfc0	k0, CP0_CONTEXT			# get context reg
+	GET_PTE_OFF(k0)				# get pte offset
+	and	k0, k0, PTEP_INDX_MSK
+	addu	k1, k1, k0			# add in offset
+	PTE_L	k0, 0(k1)			# get even pte
+	PTE_L	k1, PTE_SIZE(k1)		# get odd pte
+	PTE_SRL	k0, k0, 6			# convert to entrylo0
+	P_MTC0	k0, CP0_ENTRYLO0		# load it
+	PTE_SRL	k1, k1, 6			# convert to entrylo1
+	P_MTC0	k1, CP0_ENTRYLO1		# load it
+	nop					# QED specified nops
+	nop
+	tlbwr					# write random tlb entry
+	nop					# traditional nop
+	eret					# return from trap
+	END(except_vec0_nevada)
+
+	/* TLB refill, EXL == 0, SB1 with M3 errata handling version */
+	LEAF(except_vec0_sb1)
+#if BCM1250_M3_WAR
+	mfc0	k0, CP0_BADVADDR
+	mfc0	k1, CP0_ENTRYHI
+	xor	k0, k1
+	srl	k0, k0, PAGE_SHIFT+1
+	bnez	k0, 1f
+#endif
+	GET_PGD(k0, k1)				# get pgd pointer
+	mfc0	k0, CP0_BADVADDR		# Get faulting address
+	srl	k0, k0, _PGDIR_SHIFT		# get pgd only bits
+	sll	k0, k0, 2
+	addu	k1, k1, k0			# add in pgd offset
+	mfc0	k0, CP0_CONTEXT			# get context reg
+	lw	k1, (k1)
+	GET_PTE_OFF(k0)				# get pte offset
+	and	k0, k0, PTEP_INDX_MSK
+	addu	k1, k1, k0			# add in offset
+	PTE_L	k0, 0(k1)			# get even pte
+	PTE_L	k1, PTE_SIZE(k1)		# get odd pte
+	PTE_SRL	k0, k0, 6			# convert to entrylo0
+	P_MTC0	k0, CP0_ENTRYLO0		# load it
+	PTE_SRL	k1, k1, 6			# convert to entrylo1
+	P_MTC0	k1, CP0_ENTRYLO1		# load it
+	tlbwr					# write random tlb entry
+1:	eret					# return from trap
+	END(except_vec0_sb1)
+
+	/* TLB refill, EXL == 0, R4[40]00/R5000 badvaddr hwbug version */
+	LEAF(except_vec0_r45k_bvahwbug)
+	.set	mips3
+	GET_PGD(k0, k1)				# get pgd pointer
+	mfc0	k0, CP0_BADVADDR
+	srl	k0, k0, _PGDIR_SHIFT
+	sll	k0, k0, 2			# log2(sizeof(pgd_t)
+	addu	k1, k1, k0
+	mfc0	k0, CP0_CONTEXT
+	lw	k1, (k1)
+#ifndef CONFIG_64BIT_PHYS_ADDR
+	srl	k0, k0, 1
+#endif
+	and	k0, k0, PTEP_INDX_MSK
+	addu	k1, k1, k0
+	PTE_L	k0, 0(k1)
+	PTE_L	k1, PTE_SIZE(k1)
+	nop				/* XXX */
+	tlbp
+	PTE_SRL	k0, k0, 6
+	P_MTC0	k0, CP0_ENTRYLO0
+	PTE_SRL	k1, k1, 6
+	mfc0	k0, CP0_INDEX
+	P_MTC0	k1, CP0_ENTRYLO1
+	bltzl	k0, 1f
+	tlbwr
+1:
+	nop
+	eret
+	END(except_vec0_r45k_bvahwbug)
+
+#ifdef CONFIG_SMP
+	/* TLB refill, EXL == 0, R4000 MP badvaddr hwbug version */
+	LEAF(except_vec0_r4k_mphwbug)
+	.set	mips3
+	GET_PGD(k0, k1)				# get pgd pointer
+	mfc0	k0, CP0_BADVADDR
+	srl	k0, k0, _PGDIR_SHIFT
+	sll	k0, k0, 2			# log2(sizeof(pgd_t)
+	addu	k1, k1, k0
+	mfc0	k0, CP0_CONTEXT
+	lw	k1, (k1)
+#ifndef CONFIG_64BIT_PHYS_ADDR
+	srl	k0, k0, 1
+#endif
+	and	k0, k0, PTEP_INDX_MSK
+	addu	k1, k1, k0
+	PTE_L	k0, 0(k1)
+	PTE_L	k1, PTE_SIZE(k1)
+	nop				/* XXX */
+	tlbp
+	PTE_SRL	k0, k0, 6
+	P_MTC0	k0, CP0_ENTRYLO0
+	PTE_SRL	k1, k1, 6
+	mfc0	k0, CP0_INDEX
+	P_MTC0	k1, CP0_ENTRYLO1
+	bltzl	k0, 1f
+	tlbwr
+1:
+	nop
+	eret
+	END(except_vec0_r4k_mphwbug)
+#endif
+
+	/* TLB refill, EXL == 0, R4000 UP 250MHZ entrylo[01] hwbug version */
+	LEAF(except_vec0_r4k_250MHZhwbug)
+	.set	mips3
+	GET_PGD(k0, k1)				# get pgd pointer
+	mfc0	k0, CP0_BADVADDR
+	srl	k0, k0, _PGDIR_SHIFT
+	sll	k0, k0, 2			# log2(sizeof(pgd_t)
+	addu	k1, k1, k0
+	mfc0	k0, CP0_CONTEXT
+	lw	k1, (k1)
+#ifndef CONFIG_64BIT_PHYS_ADDR
+	srl	k0, k0, 1
+#endif
+	and	k0, k0, PTEP_INDX_MSK
+	addu	k1, k1, k0
+	PTE_L	k0, 0(k1)
+	PTE_L	k1, PTE_SIZE(k1)
+	PTE_SRL	k0, k0, 6
+	P_MTC0	zero, CP0_ENTRYLO0
+	P_MTC0	k0, CP0_ENTRYLO0
+	PTE_SRL	k1, k1, 6
+	P_MTC0	zero, CP0_ENTRYLO1
+	P_MTC0	k1, CP0_ENTRYLO1
+	b	1f
+	tlbwr
+1:
+	nop
+	eret
+	END(except_vec0_r4k_250MHZhwbug)
+
+#ifdef CONFIG_SMP
+	/* TLB refill, EXL == 0, R4000 MP 250MHZ entrylo[01]+badvaddr bug version */
+	LEAF(except_vec0_r4k_MP250MHZhwbug)
+	.set	mips3
+	GET_PGD(k0, k1)				# get pgd pointer
+	mfc0	k0, CP0_BADVADDR
+	srl	k0, k0, _PGDIR_SHIFT
+	sll	k0, k0, 2			# log2(sizeof(pgd_t)
+	addu	k1, k1, k0
+	mfc0	k0, CP0_CONTEXT
+	lw	k1, (k1)
+#ifndef CONFIG_64BIT_PHYS_ADDR
+	srl	k0, k0, 1
+#endif
+	and	k0, k0, PTEP_INDX_MSK
+	addu	k1, k1, k0
+	PTE_L	k0, 0(k1)
+	PTE_L	k1, PTE_SIZE(k1)
+	nop				/* XXX */
+	tlbp
+	PTE_SRL	k0, k0, 6
+	P_MTC0  zero, CP0_ENTRYLO0
+	P_MTC0  k0, CP0_ENTRYLO0
+	mfc0    k0, CP0_INDEX
+	PTE_SRL	k1, k1, 6
+	P_MTC0	zero, CP0_ENTRYLO1
+	P_MTC0	k1, CP0_ENTRYLO1
+	bltzl	k0, 1f
+	tlbwr
+1:
+	nop
+	eret
+	END(except_vec0_r4k_MP250MHZhwbug)
+#endif
+
+	__FINIT
+
+	.set	noreorder
+
+/*
+ * From the IDT errata for the QED RM5230 (Nevada), processor revision 1.0:
+ * 2. A timing hazard exists for the TLBP instruction.
+ *
+ *      stalling_instruction
+ *      TLBP
+ *
+ * The JTLB is being read for the TLBP throughout the stall generated by the
+ * previous instruction. This is not really correct as the stalling instruction
+ * can modify the address used to access the JTLB.  The failure symptom is that
+ * the TLBP instruction will use an address created for the stalling instruction
+ * and not the address held in C0_ENHI and thus report the wrong results.
+ *
+ * The software work-around is to not allow the instruction preceding the TLBP
+ * to stall - make it an NOP or some other instruction guaranteed not to stall.
+ *
+ * Errata 2 will not be fixed.  This errata is also on the R5000.
+ *
+ * As if we MIPS hackers wouldn't know how to nop pipelines happy ...
+ */
+#define R5K_HAZARD nop
+
+	/*
+	 * Note for many R4k variants tlb probes cannot be executed out
+	 * of the instruction cache else you get bogus results.
+	 */
+	.align	5
+	NESTED(handle_tlbl, PT_SIZE, sp)
+	.set	noat
+#if BCM1250_M3_WAR
+	mfc0	k0, CP0_BADVADDR
+	mfc0	k1, CP0_ENTRYHI
+	xor	k0, k1
+	srl	k0, k0, PAGE_SHIFT+1
+	beqz	k0, 1f
+	 nop
+	.set	mips3
+	eret
+	.set	mips0
+1:
+#endif
+invalid_tlbl:
+#ifdef TLB_OPTIMIZE
+	.set	mips3
+	/* Test present bit in entry. */
+	LOAD_PTE(k0, k1)
+	R5K_HAZARD
+	tlbp
+	PTE_PRESENT(k0, k1, nopage_tlbl)
+	PTE_MAKEVALID(k0, k1)
+	PTE_RELOAD(k1, k0)
+	mtc0_tlbw_hazard
+	tlbwi
+	tlbw_eret_hazard
+	.set	mips3
+	eret
+	.set	mips0
+#endif
+
+nopage_tlbl:
+	DO_FAULT(0)
+	END(handle_tlbl)
+
+	.align	5
+	NESTED(handle_tlbs, PT_SIZE, sp)
+	.set	noat
+#ifdef TLB_OPTIMIZE
+	.set	mips3
+        li      k0,0
+	LOAD_PTE(k0, k1)
+	R5K_HAZARD
+	tlbp				# find faulting entry
+	PTE_WRITABLE(k0, k1, nopage_tlbs)
+	PTE_MAKEWRITE(k0, k1)
+	PTE_RELOAD(k1, k0)
+	mtc0_tlbw_hazard
+	tlbwi
+	tlbw_eret_hazard
+	.set	mips3
+	eret
+	.set	mips0
+#endif
+
+nopage_tlbs:
+	DO_FAULT(1)
+	END(handle_tlbs)
+
+	.align	5
+	NESTED(handle_mod, PT_SIZE, sp)
+	.set	noat
+#ifdef TLB_OPTIMIZE
+	.set	mips3
+	LOAD_PTE(k0, k1)
+	R5K_HAZARD
+	tlbp					# find faulting entry
+	andi	k0, k0, _PAGE_WRITE
+	beqz	k0, nowrite_mod
+	 PTE_L	k0, (k1)
+
+	/* Present and writable bits set, set accessed and dirty bits. */
+	PTE_MAKEWRITE(k0, k1)
+
+	/* Now reload the entry into the tlb. */
+	PTE_RELOAD(k1, k0)
+	mtc0_tlbw_hazard
+	tlbwi
+	tlbw_eret_hazard
+	.set	mips3
+	eret
+	.set	mips0
+#endif
+
+nowrite_mod:
+	DO_FAULT(1)
+	END(handle_mod)
--- diff/arch/mips/mm/tlbex64-r4k.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/mm/tlbex64-r4k.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,203 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2000 Silicon Graphics, Inc.
+ * Written by Ulf Carlsson (ulfc@engr.sgi.com)
+ * Copyright (C) 2002  Maciej W. Rozycki
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/threads.h>
+
+#include <asm/asm.h>
+#include <asm/hazards.h>
+#include <asm/regdef.h>
+#include <asm/mipsregs.h>
+#include <asm/stackframe.h>
+#include <asm/war.h>
+
+#define _VMALLOC_START	0xc000000000000000
+
+	/*
+	 * After this macro runs we have a pointer to the pte of the address
+	 * that caused the fault in PTR.
+	 */
+	.macro	LOAD_PTE2, ptr, tmp, kaddr
+#ifdef CONFIG_SMP
+	dmfc0	\ptr, CP0_CONTEXT
+	dmfc0	\tmp, CP0_BADVADDR
+	dsra	\ptr, 23			# get pgd_current[cpu]
+#else
+	dmfc0	\tmp, CP0_BADVADDR
+	dla	\ptr, pgd_current
+#endif
+	bltz	\tmp, \kaddr
+	 ld	\ptr, (\ptr)
+	dsrl	\tmp, (_PGDIR_SHIFT-3)		# get pgd offset in bytes
+	andi	\tmp, ((_PTRS_PER_PGD - 1)<<3)
+	daddu	\ptr, \tmp			# add in pgd offset
+	dmfc0	\tmp, CP0_BADVADDR
+	ld	\ptr, (\ptr)			# get pmd pointer
+	dsrl	\tmp, (_PMD_SHIFT-3)		# get pmd offset in bytes
+	andi	\tmp, ((_PTRS_PER_PMD - 1)<<3)
+	daddu	\ptr, \tmp			# add in pmd offset
+	dmfc0	\tmp, CP0_XCONTEXT
+	ld	\ptr, (\ptr)			# get pte pointer
+	andi	\tmp, 0xff0			# get pte offset
+	daddu	\ptr, \tmp
+	.endm
+
+
+	/*
+	 * Ditto for the kernel table.
+	 */
+	.macro	LOAD_KPTE2, ptr, tmp, not_vmalloc
+	/*
+	 * First, determine that the address is in/above vmalloc range.
+	 */
+	dmfc0	\tmp, CP0_BADVADDR
+	dli	\ptr, _VMALLOC_START
+
+	/*
+	 * Now find offset into kptbl.
+	 */
+	dsubu	\tmp, \tmp, \ptr
+	dla	\ptr, kptbl
+	dsrl	\tmp, (_PAGE_SHIFT+1)		# get vpn2
+	dsll	\tmp, 4				# byte offset of pte
+	daddu	\ptr, \ptr, \tmp
+
+	/*
+	 * Determine that fault address is within vmalloc range.
+	 */
+	dla	\tmp, ekptbl
+	slt	\tmp, \ptr, \tmp
+	beqz	\tmp, \not_vmalloc		# not vmalloc
+	 nop
+	.endm
+
+
+	/*
+	 * This places the even/odd pte pair in the page table at the pte
+	 * entry pointed to by PTE into ENTRYLO0 and ENTRYLO1.
+	 */
+	.macro	PTE_RELOAD, pte0, pte1
+	dsrl	\pte0, 6			# convert to entrylo0
+	dmtc0	\pte0, CP0_ENTRYLO0		# load it
+	dsrl	\pte1, 6			# convert to entrylo1
+	dmtc0	\pte1, CP0_ENTRYLO1		# load it
+	.endm
+
+
+	.text
+	.set	noreorder
+	.set	mips3
+
+	__INIT
+
+	/*
+	 * TLB refill handlers for the R4000 and SB1.
+	 * Attention:  We may only use 32 instructions / 128 bytes.
+	 */
+	.align  5
+LEAF(except_vec1_r4k)
+	.set    noat
+	dla     k0, handle_vec1_r4k
+	jr      k0
+	 nop
+END(except_vec1_r4k)
+
+LEAF(except_vec1_sb1)
+#if BCM1250_M3_WAR
+	dmfc0	k0, CP0_BADVADDR
+	dmfc0	k1, CP0_ENTRYHI
+	xor	k0, k1
+	dsrl	k0, k0, _PAGE_SHIFT+1
+	bnez	k0, 1f
+#endif
+	.set    noat
+	dla     k0, handle_vec1_r4k
+	jr      k0
+	 nop
+
+1:	eret
+	nop
+END(except_vec1_sb1)
+
+	__FINIT
+
+	.align  5
+LEAF(handle_vec1_r4k)
+	.set    noat
+	LOAD_PTE2 k1 k0 9f
+	ld	k0, 0(k1)			# get even pte
+	ld	k1, 8(k1)			# get odd pte
+	PTE_RELOAD k0 k1
+	mtc0_tlbw_hazard
+	tlbwr
+	tlbw_eret_hazard
+	eret
+
+9:						# handle the vmalloc range
+	LOAD_KPTE2 k1 k0 invalid_vmalloc_address
+	ld	k0, 0(k1)			# get even pte
+	ld	k1, 8(k1)			# get odd pte
+	PTE_RELOAD k0 k1
+	mtc0_tlbw_hazard
+	 tlbwr
+	tlbw_eret_hazard
+	eret
+END(handle_vec1_r4k)
+
+
+	__INIT
+
+	/*
+	 * TLB refill handler for the R10000.
+	 * Attention:  We may only use 32 instructions / 128 bytes.
+	 */
+	.align	5
+LEAF(except_vec1_r10k)
+	.set    noat
+	dla     k0, handle_vec1_r10k
+	jr      k0
+	 nop
+END(except_vec1_r10k)
+
+	__FINIT
+
+	.align	5
+LEAF(handle_vec1_r10k)
+	.set	noat
+	LOAD_PTE2 k1 k0 9f
+	ld	k0, 0(k1)			# get even pte
+	ld	k1, 8(k1)			# get odd pte
+	PTE_RELOAD k0 k1
+	nop
+	tlbwr
+	eret
+
+9:						# handle the vmalloc range
+	LOAD_KPTE2 k1 k0 invalid_vmalloc_address
+	ld	k0, 0(k1)			# get even pte
+	ld	k1, 8(k1)			# get odd pte
+	PTE_RELOAD k0 k1
+	nop
+	tlbwr
+	eret
+END(handle_vec1_r10k)
+
+
+	.align	5
+LEAF(invalid_vmalloc_address)
+	.set	noat
+	SAVE_ALL
+	CLI
+	dmfc0	t0, CP0_BADVADDR
+	sd	t0, PT_BVADDR(sp)
+	move	a0, sp
+	jal	show_regs
+	PANIC("Invalid kernel address")
+END(invalid_vmalloc_address)
--- diff/arch/mips/pci/fixup-jaguar.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pci/fixup-jaguar.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,42 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Marvell MV64340 interrupt fixup code.
+ *
+ * Marvell wants an NDA for their docs so this was written without
+ * documentation.  You've been warned.
+ *
+ * Copyright (C) 2004 Ralf Baechle
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+
+#include <asm/mipsregs.h>
+#include <asm/pci_channel.h>
+
+/*
+ * WARNING: Example of how _NOT_ to do it.
+ */
+int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+	int bus = dev->bus->number;
+
+	if (bus == 0 && slot == 1)
+		return 3;	/* PCI-X A */
+	if (bus == 0 && slot == 2)
+		return 4;	/* PCI-X B */
+	if (bus == 1 && slot == 1)
+		return 5;	/* PCI A */
+	if (bus == 1 && slot == 2)
+		return 6;	/* PCI B */
+
+return 0;
+	panic("Whooops in pcibios_map_irq");
+}
+
+struct pci_fixup pcibios_fixups[] = {
+	{0}
+};
--- diff/arch/mips/pci/fixup-mpc30x.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pci/fixup-mpc30x.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,48 @@
+/*
+ *  fixup-mpc30x.c, The Victor MP-C303/304 specific PCI fixups.
+ *
+ *  Copyright (C) 2002,2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *
+ *  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/init.h>
+#include <linux/pci.h>
+
+#include <asm/vr41xx/mpc30x.h>
+#include <asm/vr41xx/vrc4173.h>
+
+static const int internal_func_irqs[] __initdata = {
+	VRC4173_CASCADE_IRQ,
+	VRC4173_AC97_IRQ,
+	VRC4173_USB_IRQ,
+};
+
+static char irq_tab_mpc30x[] __initdata = {
+ [12] = VRC4173_PCMCIA1_IRQ,
+ [13] = VRC4173_PCMCIA2_IRQ,
+ [29] = MQ200_IRQ,
+};
+
+int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+	if (slot == 30)
+		return internal_func_irqs[PCI_FUNC(dev->devfn)];
+
+	return irq_tab_mpc30x[slot];
+}
+
+struct pci_fixup pcibios_fixups[] __initdata = {
+	{	.pass = 0,	},
+};
--- diff/arch/mips/pci/fixup-ocelot-c.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pci/fixup-ocelot-c.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2002 Momentum Computer Inc.
+ * Author: Matthew Dharm <mdharm@momenco.com>
+ *
+ * Based on work for the Linux port to the Ocelot board, which is
+ * Copyright 2001 MontaVista Software Inc.
+ * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
+ *
+ * arch/mips/momentum/ocelot_g/pci.c
+ *     Board-specific PCI routines for mv64340 controller.
+ *
+ * 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.
+ */
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+	int bus = dev->bus->number;
+
+	if (bus == 0 && slot == 1)
+		return 2;       /* PCI-X A */
+	if (bus == 1 && slot == 1)
+		return 12;      /* PCI-X B */
+	if (bus == 1 && slot == 2)
+		return 4;       /* PCI B */
+
+return 0;
+	panic("Whooops in pcibios_map_irq");
+}
+
+struct pci_fixup pcibios_fixups[] = {
+	{0}
+};
--- diff/arch/mips/pci/fixup-ocelot-g.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pci/fixup-ocelot-g.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,35 @@
+/*
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ * Copyright (C) 2004 Ralf Baechle (ralf@linux-mips.org)
+ */
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+	int bus = dev->bus->number;
+
+	if (bus == 0 && slot == 1)	/* Intel 82543 Gigabit MAC */
+		return 2;		/* irq_nr is 2 for INT0 */
+
+	if (bus == 0 && slot == 2)	/* Intel 82543 Gigabit MAC */
+		return 3;		/* irq_nr is 3 for INT1 */
+
+	if (bus == 1 && slot == 3)	/* Intel 21555 bridge */
+		return 5;		/* irq_nr is 8 for INT6 */
+
+	if (bus == 1 && slot == 4)	/* PMC Slot */
+		return 9;		/* irq_nr is 9 for INT7 */
+
+	return -1;
+}
+
+struct pci_fixup pcibios_fixups[] = {
+	{0}
+};
--- diff/arch/mips/pci/fixup-tb0219.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pci/fixup-tb0219.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,64 @@
+/*
+ *  fixup-tb0219.c, The TANBAC TB0219 specific PCI fixups.
+ *
+ *  Copyright (C) 2003  Megasolution Inc. <matsu@megasolution.jp>
+ *  Copyright (C) 2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *
+ *  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/init.h>
+#include <linux/pci.h>
+
+#include <asm/vr41xx/tb0219.h>
+
+int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+	int irq = -1;
+
+	switch (slot) {
+	case 12:
+		vr41xx_set_irq_trigger(TB0219_PCI_SLOT1_PIN,
+				       TRIGGER_LEVEL,
+				       SIGNAL_THROUGH);
+		vr41xx_set_irq_level(TB0219_PCI_SLOT1_PIN,
+				     LEVEL_LOW);
+		irq = TB0219_PCI_SLOT1_IRQ;
+		break;
+	case 13:
+		vr41xx_set_irq_trigger(TB0219_PCI_SLOT2_PIN,
+				       TRIGGER_LEVEL,
+				       SIGNAL_THROUGH);
+		vr41xx_set_irq_level(TB0219_PCI_SLOT2_PIN,
+				     LEVEL_LOW);
+		irq = TB0219_PCI_SLOT2_IRQ;
+		break;
+	case 14:
+		vr41xx_set_irq_trigger(TB0219_PCI_SLOT3_PIN,
+				       TRIGGER_LEVEL,
+				       SIGNAL_THROUGH);
+		vr41xx_set_irq_level(TB0219_PCI_SLOT3_PIN,
+				     LEVEL_LOW);
+		irq = TB0219_PCI_SLOT3_IRQ;
+		break;
+	default:
+		break;
+	}
+
+	return irq;
+}
+
+struct pci_fixup pcibios_fixups[] __initdata = {
+	{	.pass = 0,	},
+};
--- diff/arch/mips/pci/ops-gt64240.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pci/ops-gt64240.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,149 @@
+/*
+ * Copyright 2002 Momentum Computer
+ * Author: Matthew Dharm <mdharm@momenco.com>
+ * Copyright (C) 2004 Ralf Baechle <ralf@linux-mips.org>
+ *
+ *  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  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <asm/io.h>
+#include <asm/gt64240.h>
+
+
+#define MASTER_ABORT_BIT 0x100
+
+/*
+ * galileo_pcibios_(read/write)_config_(dword/word/byte) -
+ *
+ * reads/write a dword/word/byte register from the configuration space
+ * of a device.
+ *
+ * Note that bus 0 and bus 1 are local, and we assume all other busses are
+ * bridged from bus 1.  This is a safe assumption, since any other
+ * configuration will require major modifications to the CP7000G
+ *
+ * Inputs :
+ * bus - bus number
+ * dev - device number
+ * offset - register offset in the configuration space
+ * val - value to be written / read
+ *
+ * Outputs :
+ * PCIBIOS_SUCCESSFUL when operation was succesfull
+ * PCIBIOS_DEVICE_NOT_FOUND when the bus or dev is errorneous
+ * PCIBIOS_BAD_REGISTER_NUMBER when accessing non aligned
+ */
+
+
+static int gt_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
+	int size, u32 *val, u32 address_reg, u32 data_reg)
+{
+	uint32_t address;
+	int dev, busno;
+
+	busno = bus->number;
+	dev = PCI_SLOT(devfn);
+
+	/* verify the range */
+	if (dev == 31)
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	address = (busno << 16) | (devfn << 8) | (offset & 0xfc) | 0x80000000;
+
+	/* start the configuration cycle */
+	GT_WRITE(address_reg, address);
+
+	switch (size) {
+	case 1:
+		GT_READ_8(data_reg + (offset & 0x3), val);
+		break;
+	case 2:
+		GT_READ_16(data_reg + (offset & 0x3), val);
+		break;
+	case 4:
+		*val = GT_READ(data_reg);
+		break;
+	}
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static int gt_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
+	int size, u32 val, u32 address_reg, u32 data_reg)
+{
+	unsigned int address;
+	int dev, busno;
+
+	busno = bus->number;
+	dev = PCI_SLOT(devfn);
+
+	/* verify the range */
+	if (dev == 31)
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	address = (busno << 16) | (devfn << 8) | (offset & 0xfc) | 0x80000000;
+
+	/* start the configuration cycle */
+	GT_WRITE(address_reg, address);
+
+	switch (size) {
+	case 1:
+		GT_WRITE_8(data_reg + (offset & 0x3), val);
+		break;
+	case 2:
+		GT_WRITE_16(data_reg + (offset & 0x3), val);
+		break;
+	case 4:
+		GT_WRITE(data_reg, val);
+		break;
+	}
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+#define BUILD_PCI_OPS(host)						\
+									\
+static int gt_bus ## host ## _read_config(struct pci_bus *bus,		\
+	unsigned int devfn, int reg, int size, u32 * val)		\
+{									\
+	return gt_read_config(bus, devfn, reg, size, val,		\
+		PCI_ ## host ## CONFIGURATION_ADDRESS,			\
+		PCI_ ## host ## CONFIGURATION_DATA_VIRTUAL_REGISTER);	\
+}									\
+									\
+static int gt_bus ## host ## _write_config(struct pci_bus *bus,		\
+	unsigned int devfn, int reg, int size, u32 val)			\
+{									\
+	return gt_write_config(bus, devfn, reg, size, val,		\
+		PCI_ ## host ## CONFIGURATION_ADDRESS,			\
+		PCI_ ## host ## CONFIGURATION_DATA_VIRTUAL_REGISTER);	\
+}									\
+									\
+struct pci_ops gt_bus ## host ## _pci_ops = {				\
+	.read	= gt_bus ## host ## _read_config,			\
+	.write	= gt_bus ## host ## _write_config			\
+};
+
+BUILD_PCI_OPS(0)
+BUILD_PCI_OPS(1)
--- diff/arch/mips/pci/ops-titan-ht.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pci/ops-titan-ht.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2003 PMC-Sierra
+ * Author: Manish Lachwani (lachwani@pmc-sierra.com)
+ *
+ *  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  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/delay.h>
+#include <asm/io.h>
+
+#include <asm/titan_dep.h>
+
+static int titan_ht_config_read_dword(struct pci_bus *bus, unsigned int devfn,
+	int offset, u32 * val)
+{
+	volatile uint32_t address;
+	int busno;
+
+	busno = bus->number;
+
+	address = (busno << 16) | (devfn << 8) | (offset & 0xfc) | 0x80000000;
+	if (busno != 0)
+		address |= 1;
+
+	/*
+	 * RM9000 HT Errata: Issue back to back HT config
+	 * transcations. Issue a BIU sync before and
+	 * after the HT cycle
+	 */
+
+	*(volatile int32_t *) 0xfb0000f0 |= 0x2;
+
+	udelay(30);
+
+	*(volatile int32_t *) 0xfb0006f8 = address;
+	*(val) = *(volatile int32_t *) 0xfb0006fc;
+
+	udelay(30);
+
+	* (volatile int32_t *) 0xfb0000f0 |= 0x2;
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static int titan_ht_config_read(struct pci_bus *bus, unsigned int devfn,
+	int offset, int size, u32 * val)
+{
+	uint32_t dword;
+
+	titan_ht_config_read_dword(bus, devfn, offset, &dword);
+
+	dword >>= ((offset & 3) << 3);
+	dword &= (0xffffffffU >> ((4 - size) << 8));
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static inline int titan_ht_config_write_dword(struct pci_bus *bus,
+	unsigned int devfn, int offset, u32 val)
+{
+	volatile uint32_t address;
+	int busno;
+
+	busno = bus->number;
+
+	address = (busno << 16) | (devfn << 8) | (offset & 0xfc) | 0x80000000;
+	if (busno != 0)
+		address |= 1;
+
+	*(volatile int32_t *) 0xfb0000f0 |= 0x2;
+
+	udelay(30);
+
+	*(volatile int32_t *) 0xfb0006f8 = address;
+	*(volatile int32_t *) 0xfb0006fc = val;
+
+	udelay(30);
+
+	*(volatile int32_t *) 0xfb0000f0 |= 0x2;
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static int titan_ht_config_write(struct pci_bus *bus, unsigned int devfn,
+	int offset, int size, u32 val)
+{
+	uint32_t val1, val2, mask;
+
+	titan_ht_config_read_dword(bus, devfn, offset, &val2);
+
+	val1 = val << ((offset & 3) << 3);
+	mask = ~(0xffffffffU >> ((4 - size) << 8));
+	val2 &= ~(mask << ((offset & 3) << 8));
+
+	titan_ht_config_write_dword(bus, devfn, offset, val1 | val2);
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+struct pci_ops titan_ht_pci_ops = {
+	.read	= titan_ht_config_read,
+	.write	= titan_ht_config_write,
+};
--- diff/arch/mips/pci/ops-vr41xx.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pci/ops-vr41xx.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,126 @@
+/*
+ *  ops-vr41xx.c, PCI configuration routines for the PCIU of NEC VR4100 series.
+ *
+ *  Copyright (C) 2001-2003 MontaVista Software Inc.
+ *    Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
+ *  Copyright (C) 2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *
+ *  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
+ */
+/*
+ * Changes:
+ *  MontaVista Software Inc. <yyuasa@mvista.com> or <source@mvista.com>
+ *  - New creation, NEC VR4122 and VR4131 are supported.
+ */
+#include <linux/pci.h>
+#include <linux/types.h>
+
+#include <asm/io.h>
+
+#define PCICONFDREG	KSEG1ADDR(0x0f000c14)
+#define PCICONFAREG	KSEG1ADDR(0x0f000c18)
+
+static inline int set_pci_configuration_address(unsigned char number,
+                                                unsigned int devfn, int where)
+{
+	if (number == 0) {
+		/*
+		 * Type 0 configuration
+		 */
+		if (PCI_SLOT(devfn) < 11 || where > 0xff)
+			return -EINVAL;
+
+		writel((1U << PCI_SLOT(devfn)) | (PCI_FUNC(devfn) << 8) |
+		       (where & 0xfc), PCICONFAREG);
+	} else {
+		/*
+		 * Type 1 configuration
+		 */
+		if (where > 0xff)
+			return -EINVAL;
+
+		writel(((uint32_t)number << 16) | ((devfn & 0xff) << 8) |
+		       (where & 0xfc) | 1U, PCICONFAREG);
+	}
+
+	return 0;
+}
+
+static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where,
+                           int size, uint32_t *val)
+{
+	uint32_t data;
+
+	*val = 0xffffffffU;
+	if (set_pci_configuration_address(bus->number, devfn, where) < 0)
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	data = readl(PCICONFDREG);
+
+	switch (size) {
+	case 1:
+		*val = (data >> ((where & 3) << 3)) & 0xffU;
+		break;
+	case 2:
+		*val = (data >> ((where & 2) << 3)) & 0xffffU;
+		break;
+	case 4:
+		*val = data;
+		break;
+	default:
+		return PCIBIOS_FUNC_NOT_SUPPORTED;
+	}
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static int pci_config_write(struct pci_bus *bus, unsigned int devfn, int where,
+                            int size, uint32_t val)
+{
+	uint32_t data;
+	int shift;
+
+	if (set_pci_configuration_address(bus->number, devfn, where) < 0)
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	data = readl(PCICONFDREG);
+
+	switch (size) {
+	case 1:
+		shift = (where & 3) << 3;
+		data &= ~(0xffU << shift);
+		data |= ((val & 0xffU) << shift);
+		break;
+	case 2:
+		shift = (where & 2) << 3;
+		data &= ~(0xffffU << shift);
+		data |= ((val & 0xffffU) << shift);
+		break;
+	case 4:
+		data = val;
+		break;
+	default:
+		return PCIBIOS_FUNC_NOT_SUPPORTED;
+	}
+
+	writel(data, PCICONFDREG);
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+struct pci_ops vr41xx_pci_ops = {
+	.read	= pci_config_read,
+	.write	= pci_config_write,
+};
--- diff/arch/mips/pci/pci-yosemite.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pci/pci-yosemite.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,37 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2004 by Ralf Baechle
+ *
+ */
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <asm/gt64240.h>
+#include <asm/pci_channel.h>
+
+extern struct pci_ops titan_pci_ops;
+
+static struct resource py_mem_resource = {
+	"Titan PCI MEM", 0xe0000000UL, 0xe3ffffffUL, IORESOURCE_MEM
+};
+
+static struct resource py_io_resource = {
+	"Titan IO MEM", 0x00000000UL, 0x00ffffffUL, IORESOURCE_IO,
+};
+
+static struct pci_controller py_controller = {
+	.pci_ops	= &titan_pci_ops,
+	.mem_resource	= &py_mem_resource,
+	.mem_offset	= 0x10000000UL,
+	.io_resource	= &py_io_resource,
+	.io_offset	= 0x00000000UL
+};
+
+static int __init pmc_yosemite_setup(void)
+{
+	register_pci_controller(&py_controller);
+}
--- diff/arch/mips/pmc-sierra/yosemite/dbg_io.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/dbg_io.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2003 PMC-Sierra
+ * Author: Manish Lachwani (lachwani@pmc-sierra.com)
+ *
+ *  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  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Support for KGDB for the Yosemite board. We make use of single serial
+ * port to be used for KGDB as well as console. The second serial port
+ * seems to be having a problem. Single IRQ is allocated for both the
+ * ports. Hence, the interrupt routing code needs to figure out whether
+ * the interrupt came from channel A or B.
+ */
+
+#include <linux/config.h>
+
+#if defined(CONFIG_KGDB)
+#include <asm/serial.h>
+
+/*
+ * Baud rate, Parity, Data and Stop bit settings for the
+ * serial port on the Yosemite. Note that the Early printk
+ * patch has been added. So, we should be all set to go
+ */
+#define	YOSEMITE_BAUD_2400	2400
+#define	YOSEMITE_BAUD_4800	4800
+#define	YOSEMITE_BAUD_9600	9600
+#define	YOSEMITE_BAUD_19200	19200
+#define	YOSEMITE_BAUD_38400	38400
+#define	YOSEMITE_BAUD_57600	57600
+#define	YOSEMITE_BAUD_115200	115200
+
+#define	YOSEMITE_PARITY_NONE	0
+#define	YOSEMITE_PARITY_ODD	0x08
+#define	YOSEMITE_PARITY_EVEN	0x18
+#define	YOSEMITE_PARITY_MARK	0x28
+#define	YOSEMITE_PARITY_SPACE	0x38
+
+#define	YOSEMITE_DATA_5BIT	0x0
+#define	YOSEMITE_DATA_6BIT	0x1
+#define	YOSEMITE_DATA_7BIT	0x2
+#define	YOSEMITE_DATA_8BIT	0x3
+
+#define	YOSEMITE_STOP_1BIT	0x0
+#define	YOSEMITE_STOP_2BIT	0x4
+
+/* This is crucial */
+#define	SERIAL_REG_OFS		0x1
+
+#define	SERIAL_RCV_BUFFER	0x0
+#define	SERIAL_TRANS_HOLD	0x0
+#define	SERIAL_SEND_BUFFER	0x0
+#define	SERIAL_INTR_ENABLE	(1 * SERIAL_REG_OFS)
+#define	SERIAL_INTR_ID		(2 * SERIAL_REG_OFS)
+#define	SERIAL_DATA_FORMAT	(3 * SERIAL_REG_OFS)
+#define	SERIAL_LINE_CONTROL	(3 * SERIAL_REG_OFS)
+#define	SERIAL_MODEM_CONTROL	(4 * SERIAL_REG_OFS)
+#define	SERIAL_RS232_OUTPUT	(4 * SERIAL_REG_OFS)
+#define	SERIAL_LINE_STATUS	(5 * SERIAL_REG_OFS)
+#define	SERIAL_MODEM_STATUS	(6 * SERIAL_REG_OFS)
+#define	SERIAL_RS232_INPUT	(6 * SERIAL_REG_OFS)
+#define	SERIAL_SCRATCH_PAD	(7 * SERIAL_REG_OFS)
+
+#define	SERIAL_DIVISOR_LSB	(0 * SERIAL_REG_OFS)
+#define	SERIAL_DIVISOR_MSB	(1 * SERIAL_REG_OFS)
+
+/*
+ * Functions to READ and WRITE to serial port 0
+ */
+#define	SERIAL_READ(ofs)		(*((volatile unsigned char*)	\
+					(TITAN_SERIAL_BASE + ofs)))
+
+#define	SERIAL_WRITE(ofs, val)		((*((volatile unsigned char*)	\
+					(TITAN_SERIAL_BASE + ofs))) = val)
+
+/*
+ * Functions to READ and WRITE to serial port 1
+ */
+#define	SERIAL_READ_1(ofs)		(*((volatile unsigned char*)	\
+					(TITAN_SERIAL_BASE_1 + ofs)
+
+#define	SERIAL_WRITE_1(ofs, val)	((*((volatile unsigned char*)	\
+					(TITAN_SERIAL_BASE_1 + ofs))) = val)
+
+/*
+ * Second serial port initialization
+ */
+void init_second_port(void)
+{
+	/* Disable Interrupts */
+	SERIAL_WRITE_1(SERIAL_LINE_CONTROL, 0x0);
+	SERIAL_WRITE_1(SERIAL_INTR_ENABLE, 0x0);
+
+	{
+		unsigned int divisor;
+
+		SERIAL_WRITE_1(SERIAL_LINE_CONTROL, 0x80);
+		divisor = TITAN_SERIAL_BASE_BAUD / YOSEMITE_BAUD_115200;
+		SERIAL_WRITE_1(SERIAL_DIVISOR_LSB, divisor & 0xff);
+
+		SERIAL_WRITE_1(SERIAL_DIVISOR_MSB,
+			       (divisor & 0xff00) >> 8);
+		SERIAL_WRITE_1(SERIAL_LINE_CONTROL, 0x0);
+	}
+
+	SERIAL_WRITE_1(SERIAL_DATA_FORMAT, YOSEMITE_DATA_8BIT |
+		       YOSEMITE_PARITY_NONE | YOSEMITE_STOP_1BIT);
+
+	/* Enable Interrupts */
+	SERIAL_WRITE_1(SERIAL_INTR_ENABLE, 0xf);
+}
+
+/* Initialize the serial port for KGDB debugging */
+void debugInit(unsigned int baud, unsigned char data, unsigned char parity,
+	       unsigned char stop)
+{
+	/* Disable Interrupts */
+	SERIAL_WRITE(SERIAL_LINE_CONTROL, 0x0);
+	SERIAL_WRITE(SERIAL_INTR_ENABLE, 0x0);
+
+	{
+		unsigned int divisor;
+
+		SERIAL_WRITE(SERIAL_LINE_CONTROL, 0x80);
+
+		divisor = TITAN_SERIAL_BASE_BAUD / baud;
+		SERIAL_WRITE(SERIAL_DIVISOR_LSB, divisor & 0xff);
+
+		SERIAL_WRITE(SERIAL_DIVISOR_MSB, (divisor & 0xff00) >> 8);
+		SERIAL_WRITE(SERIAL_LINE_CONTROL, 0x0);
+	}
+
+	SERIAL_WRITE(SERIAL_DATA_FORMAT, data | parity | stop);
+}
+
+static int remoteDebugInitialized = 0;
+
+unsigned char getDebugChar(void)
+{
+	if (!remoteDebugInitialized) {
+		remoteDebugInitialized = 1;
+		debugInit(YOSEMITE_BAUD_115200,
+			  YOSEMITE_DATA_8BIT,
+			  YOSEMITE_PARITY_NONE, YOSEMITE_STOP_1BIT);
+	}
+
+	while ((SERIAL_READ(SERIAL_LINE_STATUS) & 0x1) == 0);
+	return SERIAL_READ(SERIAL_RCV_BUFFER);
+}
+
+int putDebugChar(unsigned char byte)
+{
+	if (!remoteDebugInitialized) {
+		remoteDebugInitialized = 1;
+		debugInit(YOSEMITE_BAUD_115200,
+			  YOSEMITE_DATA_8BIT,
+			  YOSEMITE_PARITY_NONE, YOSEMITE_STOP_1BIT);
+	}
+
+	while ((SERIAL_READ(SERIAL_LINE_STATUS) & 0x20) == 0);
+	SERIAL_WRITE(SERIAL_SEND_BUFFER, byte);
+
+	return 1;
+}
+#endif
--- diff/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,188 @@
+/*
+ *  Copyright (C) 2003 PMC-Sierra Inc.
+ *  Author: Manish Lachwani (lachwani@pmc-sierra.com)
+ *
+ *  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  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Detailed Description:
+ *
+ * This block implements the I2C interface to the slave devices like the
+ * Atmel 24C32 EEPROM and the MAX 1619 Sensors device. The I2C Master interface
+ * can be controlled by the SCMB block. And the SCMB block kicks in only when
+ * using the Ethernet Mode of operation and __not__ the SysAD mode
+ *
+ * The SCMB controls the two modes: MDIO and the I2C. The MDIO mode is used to
+ * communicate with the Quad-PHY from Marvel. The I2C is used to communicate
+ * with the I2C slave devices.  It seems that the driver does not explicitly
+ * deal with the control of SDA and SCL serial lines. So, the driver will set
+ * the slave address, drive the command and then the data.  The SCMB will then
+ * control the two serial lines as required.
+ *
+ * It seems the documents are very unclear abt this. Hence, I took some time
+ * out to write the desciption to have an idea of how the I2C can actually
+ * work. Currently, this Linux driver wont be integrated into the generic Linux
+ * I2C framework. And finally, the I2C interface is also known as the 2BI
+ * interface. 2BI means 2-bit interface referring to SDA and SCL serial lines
+ * respectively.
+ *
+ * - Manish Lachwani (12/09/2003)
+ */
+
+#include "i2c-yosemite.h"
+
+/*
+ * Poll the I2C interface for the BUSY bit.
+ */
+static int titan_i2c_poll(void)
+{
+	int i = 0;
+	unsigned long val = 0;
+
+	for (i = 0; i < TITAN_I2C_MAX_POLL; i++) {
+		val = TITAN_I2C_READ(TITAN_I2C_COMMAND);
+
+		if (!(val & 0x8000))
+			return 0;
+	}
+
+	return TITAN_I2C_ERR_TIMEOUT;
+}
+
+/*
+ * Execute the I2C command
+ */
+int titan_i2c_xfer(unsigned int slave_addr, titan_i2c_command * cmd,
+		   int size, unsigned int *addr)
+{
+	int loop = 0, bytes, i;
+	unsigned int *write_data, data, *read_data;
+	unsigned long reg_val, val;
+
+	write_data = cmd->data;
+	read_data = addr;
+
+	TITAN_I2C_WRITE(TITAN_I2C_SLAVE_ADDRESS, slave_addr);
+
+	if (cmd->type == TITAN_I2C_CMD_WRITE)
+		loop = cmd->write_size;
+	else
+		loop = size;
+
+	while (loop > 0) {
+		if ((cmd->type == TITAN_I2C_CMD_WRITE) ||
+		    (cmd->type == TITAN_I2C_CMD_READ_WRITE)) {
+
+			reg_val = TITAN_I2C_DATA;
+			for (i = 0; i < TITAN_I2C_MAX_WORDS_PER_RW;
+			     ++i, write_data += 2, reg_val += 4) {
+				if (bytes < cmd->write_size) {
+					data = write_data[0];
+					++data;
+				}
+
+				if (bytes < cmd->write_size) {
+					data = write_data[1];
+					++data;
+				}
+
+				TITAN_I2C_WRITE(reg_val, data);
+			}
+		}
+
+		TITAN_I2C_WRITE(TITAN_I2C_COMMAND,
+				(unsigned int) (cmd->type << 13));
+		if (titan_i2c_poll() != TITAN_I2C_ERR_OK)
+			return TITAN_I2C_ERR_TIMEOUT;
+
+		if ((cmd->type == TITAN_I2C_CMD_READ) ||
+		    (cmd->type == TITAN_I2C_CMD_READ_WRITE)) {
+
+			reg_val = TITAN_I2C_DATA;
+			for (i = 0; i < TITAN_I2C_MAX_WORDS_PER_RW;
+			     ++i, read_data += 2, reg_val += 4) {
+				data = TITAN_I2C_READ(reg_val);
+
+				if (bytes < size) {
+					read_data[0] = data & 0xff;
+					++bytes;
+				}
+
+				if (bytes < size) {
+					read_data[1] =
+					    ((data >> 8) & 0xff);
+					++bytes;
+				}
+			}
+		}
+
+		loop -= (TITAN_I2C_MAX_WORDS_PER_RW * 2);
+	}
+
+	/*
+	 * Read the Interrupt status and then return the appropriate error code
+	 */
+
+	val = TITAN_I2C_READ(TITAN_I2C_INTERRUPTS);
+	if (val & 0x0020)
+		return TITAN_I2C_ERR_ARB_LOST;
+
+	if (val & 0x0040)
+		return TITAN_I2C_ERR_NO_RESP;
+
+	if (val & 0x0080)
+		return TITAN_I2C_ERR_DATA_COLLISION;
+
+	return TITAN_I2C_ERR_OK;
+}
+
+/*
+ * Init the I2C subsystem of the PMC-Sierra Yosemite board
+ */
+int titan_i2c_init(titan_i2c_config * config)
+{
+	unsigned int val;
+
+	/*
+	 * Reset the SCMB and program into the I2C mode
+	 */
+	TITAN_I2C_WRITE(TITAN_I2C_SCMB_CONTROL, 0xA000);
+	TITAN_I2C_WRITE(TITAN_I2C_SCMB_CONTROL, 0x2000);
+
+	/*
+	 * Configure the filtera and clka values
+	 */
+	val = TITAN_I2C_READ(TITAN_I2C_SCMB_CLOCK_A);
+	val |= ((val & ~(0xF000)) | ((config->filtera << 12) & 0xF000));
+	val |= ((val & ~(0x03FF)) | (config->clka & 0x03FF));
+	TITAN_I2C_WRITE(TITAN_I2C_SCMB_CLOCK_A, val);
+
+	/*
+	 * Configure the filterb and clkb values
+	 */
+	val = TITAN_I2C_READ(TITAN_I2C_SCMB_CLOCK_B);
+	val |= ((val & ~(0xF000)) | ((config->filterb << 12) & 0xF000));
+	val |= ((val & ~(0x03FF)) | (config->clkb & 0x03FF));
+	TITAN_I2C_WRITE(TITAN_I2C_SCMB_CLOCK_B, val);
+
+	return TITAN_I2C_ERR_OK;
+}
--- diff/arch/mips/pmc-sierra/yosemite/py-console.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/pmc-sierra/yosemite/py-console.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,130 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001, 2002, 2004 Ralf Baechle
+ */
+#include <linux/init.h>
+#include <linux/console.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/termios.h>
+#include <linux/sched.h>
+#include <linux/tty.h>
+
+#include <linux/serial.h>
+#include <linux/serial_core.h>
+#include <asm/serial.h>
+#include <asm/io.h>
+
+/* SUPERIO uart register map */
+struct yo_uartregs {
+	union {
+		volatile u8	rbr;	/* read only, DLAB == 0 */
+		volatile u8	thr;	/* write only, DLAB == 0 */
+		volatile u8	dll;	/* DLAB == 1 */
+	} u1;
+	union {
+		volatile u8	ier;	/* DLAB == 0 */
+		volatile u8	dlm;	/* DLAB == 1 */
+	} u2;
+	union {
+		volatile u8	iir;	/* read only */
+		volatile u8	fcr;	/* write only */
+	} u3;
+	volatile u8	iu_lcr;
+	volatile u8	iu_mcr;
+	volatile u8	iu_lsr;
+	volatile u8	iu_msr;
+	volatile u8	iu_scr;
+} yo_uregs_t;
+
+#define iu_rbr u1.rbr
+#define iu_thr u1.thr
+#define iu_dll u1.dll
+#define iu_ier u2.ier
+#define iu_dlm u2.dlm
+#define iu_iir u3.iir
+#define iu_fcr u3.fcr
+
+extern unsigned long uart_base;
+
+#define IO_BASE_64	0x9000000000000000ULL
+
+static unsigned char readb_outer_space(unsigned long phys)
+{
+	unsigned long long vaddr = IO_BASE_64 | phys;
+	unsigned char res;
+	unsigned int sr;
+
+	sr = read_c0_status();
+	write_c0_status((sr | ST0_KX) & ~ ST0_IE);
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+
+	__asm__ __volatile__ (
+	"	.set	mips3		\n"
+	"	ld	%0, (%0)	\n"
+	"	lbu	%0, (%0)	\n"
+	"	.set	mips0		\n"
+	: "=r" (res)
+	: "0" (&vaddr));
+
+	write_c0_status(sr);
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+
+	return res;
+}
+
+static void writeb_outer_space(unsigned long phys, unsigned char c)
+{
+	unsigned long long vaddr = IO_BASE_64 | phys;
+	unsigned long tmp;
+	unsigned int sr;
+
+	sr = read_c0_status();
+	write_c0_status((sr | ST0_KX) & ~ ST0_IE);
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+
+	__asm__ __volatile__ (
+	"	.set	mips3		\n"
+	"	ld	%0, (%1)	\n"
+	"	sb	%2, (%0)	\n"
+	"	.set	mips0		\n"
+	: "=r" (tmp)
+	: "r" (&vaddr), "r" (c));
+
+	write_c0_status(sr);
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+	__asm__("sll	$0, $0, 2\n");
+}
+
+static inline struct yo_uartregs *console_uart(void)
+{
+	return (struct yo_uartregs *) (uart_base + 8);
+}
+
+void prom_putchar(char c)
+{
+	unsigned long lsr = 0xfd000008UL + offsetof(struct yo_uartregs, iu_lsr);
+	unsigned long thr = 0xfd000008UL + offsetof(struct yo_uartregs, iu_thr);
+
+	while ((readb_outer_space(lsr) & 0x20) == 0);
+	writeb_outer_space(thr, c);
+}
+
+char __init prom_getchar(void)
+{
+	return 0;
+}
--- diff/arch/mips/vr41xx/tanbac-tb0229/tb0219.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/mips/vr41xx/tanbac-tb0229/tb0219.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,44 @@
+/*
+ *  tb0219.c, Setup for the TANBAC TB0219
+ *
+ *  Copyright (C) 2003  Megasolution Inc. <matsu@megasolution.jp>
+ *  Copyright (C) 2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *
+ *  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/init.h>
+
+#include <asm/io.h>
+#include <asm/reboot.h>
+
+#define TB0219_RESET_REGS	KSEG1ADDR(0x0a00000e)
+
+#define tb0219_hard_reset()	writew(0, TB0219_RESET_REGS)
+
+static void tanbac_tb0219_restart(char *command)
+{
+	local_irq_disable();
+	tb0219_hard_reset();
+	while (1);
+}
+
+static int __init tanbac_tb0219_setup(void)
+{
+	_machine_restart = tanbac_tb0219_restart;
+
+	return 0;
+}
+
+early_initcall(tanbac_tb0219_setup);
--- diff/arch/ppc/configs/ads8272_defconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/configs/ads8272_defconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,583 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_MMU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_EMBEDDED=y
+# CONFIG_KALLSYMS is not set
+CONFIG_FUTEX=y
+# CONFIG_EPOLL is not set
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# Processor
+#
+CONFIG_6xx=y
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8xx is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_EMBEDDEDBOOT=y
+CONFIG_PPC_STD_MMU=y
+
+#
+# Platform options
+#
+# CONFIG_PPC_MULTIPLATFORM is not set
+# CONFIG_APUS is not set
+# CONFIG_WILLOW is not set
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
+# CONFIG_GEMINI is not set
+# CONFIG_EST8260 is not set
+# CONFIG_SBC82xx is not set
+# CONFIG_SBS8260 is not set
+# CONFIG_RPX6 is not set
+# CONFIG_TQM8260 is not set
+CONFIG_ADS8272=y
+CONFIG_PQ2ADS=y
+CONFIG_8260=y
+CONFIG_8272=y
+CONFIG_CPM2=y
+# CONFIG_PC_KEYBOARD is not set
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_KERNEL_ELF=y
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Bus options
+#
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCI_LEGACY_PROC is not set
+# CONFIG_PCI_NAMES is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_CARMEL is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_LBD is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_OAKNET is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_QIC02_TAPE is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_FAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_NEC98_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+# CONFIG_SCC_ENET is not set
+CONFIG_FEC_ENET=y
+# CONFIG_USE_MDIO is not set
+
+#
+# CPM2 Options
+#
+CONFIG_SCC_CONSOLE=y
+CONFIG_FCC1_ENET=y
+# CONFIG_FCC2_ENET is not set
+# CONFIG_FCC3_ENET is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KGDB_CONSOLE is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
--- diff/arch/ppc/kernel/head_e500.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/kernel/head_e500.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,1329 @@
+/*
+ * arch/ppc/kernel/head_e500.S
+ *
+ * Kernel execution entry point code.
+ *
+ *    Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org>
+ *      Initial PowerPC version.
+ *    Copyright (c) 1996 Cort Dougan <cort@cs.nmt.edu>
+ *      Rewritten for PReP
+ *    Copyright (c) 1996 Paul Mackerras <paulus@cs.anu.edu.au>
+ *      Low-level exception handers, MMU support, and rewrite.
+ *    Copyright (c) 1997 Dan Malek <dmalek@jlc.net>
+ *      PowerPC 8xx modifications.
+ *    Copyright (c) 1998-1999 TiVo, Inc.
+ *      PowerPC 403GCX modifications.
+ *    Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
+ *      PowerPC 403GCX/405GP modifications.
+ *    Copyright 2000 MontaVista Software Inc.
+ *	PPC405 modifications
+ *      PowerPC 403GCX/405GP modifications.
+ * 	Author: MontaVista Software, Inc.
+ *         	frank_rowand@mvista.com or source@mvista.com
+ * 	   	debbie_chu@mvista.com
+ *    Copyright 2002-2004 MontaVista Software, Inc.
+ *      PowerPC 44x support, Matt Porter <mporter@kernel.crashing.org>
+ *    Copyright 2004 Freescale Semiconductor, Inc
+ *      PowerPC e500 modifications, Kumar Gala <kumar.gala@freescale.com>
+ *
+ * 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.
+ */
+
+#include <linux/config.h>
+#include <asm/processor.h>
+#include <asm/page.h>
+#include <asm/mmu.h>
+#include <asm/pgtable.h>
+#include <asm/cputable.h>
+#include <asm/thread_info.h>
+#include <asm/ppc_asm.h>
+#include <asm/offsets.h>
+
+/*
+ * Macros
+ */
+
+#define SET_IVOR(vector_number, vector_label)		\
+		li	r26,vector_label@l; 		\
+		mtspr	SPRN_IVOR##vector_number,r26;	\
+		sync
+
+/* As with the other PowerPC ports, it is expected that when code
+ * execution begins here, the following registers contain valid, yet
+ * optional, information:
+ *
+ *   r3 - Board info structure pointer (DRAM, frequency, MAC address, etc.)
+ *   r4 - Starting address of the init RAM disk
+ *   r5 - Ending address of the init RAM disk
+ *   r6 - Start of kernel command line string (e.g. "mem=128")
+ *   r7 - End of kernel command line string
+ *
+ */
+	.text
+_GLOBAL(_stext)
+_GLOBAL(_start)
+	/*
+	 * Reserve a word at a fixed location to store the address
+	 * of abatron_pteptrs
+	 */
+	nop
+/*
+ * Save parameters we are passed
+ */
+	mr	r31,r3
+	mr	r30,r4
+	mr	r29,r5
+	mr	r28,r6
+	mr	r27,r7
+	li	r24,0		/* CPU number */
+
+/* We try to not make any assumptions about how the boot loader
+ * setup or used the TLBs.  We invalidate all mappings from the
+ * boot loader and load a single entry in TLB1[0] to map the
+ * first 16M of kernel memory.  Any boot info passed from the
+ * bootloader needs to live in this first 16M.
+ *
+ * Requirement on bootloader:
+ *  - The page we're executing in needs to reside in TLB1 and
+ *    have IPROT=1.  If not an invalidate broadcast could
+ *    evict the entry we're currently executing in.
+ *
+ *  r3 = Index of TLB1 were executing in
+ *  r4 = Current MSR[IS]
+ *  r5 = Index of TLB1 temp mapping
+ *
+ * Later in mapin_ram we will correctly map lowmem, and resize TLB1[0]
+ * if needed
+ */
+
+/* 1. Find the index of the entry we're executing in */
+	bl	invstr				/* Find our address */
+invstr:	mflr	r6				/* Make it accessible */
+	mfmsr	r7
+	rlwinm	r4,r7,27,31,31			/* extract MSR[IS] */
+	mfspr	r7, SPRN_PID0
+	slwi	r7,r7,16
+	or	r7,r7,r4
+	mtspr	SPRN_MAS6,r7
+	tlbsx	0,r6				/* search MSR[IS], SPID=PID0 */
+	mfspr	r7,SPRN_MAS1
+	andis.	r7,r7,MAS1_VALID@h
+	bne	match_TLB
+	mfspr	r7,SPRN_PID1
+	slwi	r7,r7,16
+	or	r7,r7,r4
+	mtspr	SPRN_MAS6,r7
+	tlbsx	0,r6				/* search MSR[IS], SPID=PID1 */
+	mfspr	r7,SPRN_MAS1
+	andis.	r7,r7,MAS1_VALID@h
+	bne	match_TLB
+	mfspr	r7, SPRN_PID2
+	slwi	r7,r7,16
+	or	r7,r7,r4
+	mtspr	SPRN_MAS6,r7
+	tlbsx	0,r6				/* Fall through, we had to match */
+match_TLB:
+	mfspr	r7,SPRN_MAS0
+	rlwinm	r3,r7,16,28,31			/* Extract MAS0(Entry) */
+
+	mfspr	r7,SPRN_MAS1			/* Insure IPROT set */
+	oris	r7,r7,MAS1_IPROT@h
+	mtspr	SPRN_MAS1,r7
+	tlbwe
+
+/* 2. Invalidate all entries except the entry we're executing in */
+	mfspr	r9,SPRN_TLB1CFG
+	andi.	r9,r9,0xfff
+	li	r6,0				/* Set Entry counter to 0 */
+1:	lis	r7,0x1000			/* Set MAS0(TLBSEL) = 1 */
+	rlwimi	r7,r6,16,12,15			/* Setup MAS0 = TLBSEL | ESEL(r6) */
+	mtspr	SPRN_MAS0,r7
+	tlbre
+	mfspr	r7,SPRN_MAS1
+	rlwinm	r7,r7,0,2,31			/* Clear MAS1 Valid and IPROT */
+	cmpw	r3,r6
+	beq	skpinv				/* Dont update the current execution TLB */
+	mtspr	SPRN_MAS1,r7
+	tlbwe
+	isync
+skpinv:	addi	r6,r6,1				/* Increment */
+	cmpw	r6,r9				/* Are we done? */
+	bne	1b				/* If not, repeat */
+
+	/* Invalidate TLB0 */
+	li      r6,0x04
+	tlbivax 0,r6
+#ifdef CONFIG_SMP
+	tlbsync
+#endif
+	/* Invalidate TLB1 */
+	li      r6,0x0c
+	tlbivax 0,r6
+#ifdef CONFIG_SMP
+	tlbsync
+#endif
+	msync
+
+/* 3. Setup a temp mapping and jump to it */
+	andi.	r5, r3, 0x1	/* Find an entry not used and is non-zero */
+	addi	r5, r5, 0x1
+	lis	r7,0x1000	/* Set MAS0(TLBSEL) = 1 */
+	rlwimi	r7,r3,16,12,15	/* Setup MAS0 = TLBSEL | ESEL(r3) */
+	mtspr	SPRN_MAS0,r7
+	tlbre
+
+	/* Just modify the entry ID and EPN for the temp mapping */
+	lis	r7,0x1000	/* Set MAS0(TLBSEL) = 1 */
+	rlwimi	r7,r5,16,12,15	/* Setup MAS0 = TLBSEL | ESEL(r5) */
+	mtspr	SPRN_MAS0,r7
+	xori	r6,r4,1		/* Setup TMP mapping in the other Address space */
+	slwi	r6,r6,12
+	oris	r6,r6,(MAS1_VALID|MAS1_IPROT)@h
+	ori	r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l
+	mtspr	SPRN_MAS1,r6
+	mfspr	r6,SPRN_MAS2
+	li	r7,0		/* temp EPN = 0 */
+	rlwimi	r7,r6,0,20,31
+	mtspr	SPRN_MAS2,r7
+	tlbwe
+
+	xori	r6,r4,1
+	slwi	r6,r6,5		/* setup new context with other address space */
+	bl	1f		/* Find our address */
+1:	mflr	r9
+	rlwimi	r7,r9,0,20,31
+	addi	r7,r7,24
+	mtspr	SRR0,r7
+	mtspr	SRR1,r6
+	rfi
+
+/* 4. Clear out PIDs & Search info */
+	li	r6,0
+	mtspr	SPRN_PID0,r6
+	mtspr	SPRN_PID1,r6
+	mtspr	SPRN_PID2,r6
+	mtspr	SPRN_MAS6,r6
+
+/* 5. Invalidate mapping we started in */
+	lis	r7,0x1000	/* Set MAS0(TLBSEL) = 1 */
+	rlwimi	r7,r3,16,12,15	/* Setup MAS0 = TLBSEL | ESEL(r3) */
+	mtspr	SPRN_MAS0,r7
+	tlbre
+	li	r6,0
+	mtspr	SPRN_MAS1,r6
+	tlbwe
+	/* Invalidate TLB1 */
+	li      r9,0x0c
+	tlbivax 0,r9
+#ifdef CONFIG_SMP
+	tlbsync
+#endif
+	msync
+
+/* 6. Setup KERNELBASE mapping in TLB1[0] */
+	lis	r6,0x1000		/* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
+	mtspr	SPRN_MAS0,r6
+	lis	r6,(MAS1_VALID|MAS1_IPROT)@h
+	ori	r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_16M))@l
+	mtspr	SPRN_MAS1,r6
+	li	r7,0
+	lis	r6,KERNELBASE@h
+	ori	r6,r6,KERNELBASE@l
+	rlwimi	r6,r7,0,20,31
+	mtspr	SPRN_MAS2,r6
+	li	r7,(MAS3_SX|MAS3_SW|MAS3_SR)
+	mtspr	SPRN_MAS3,r7
+	tlbwe
+
+/* 7. Jump to KERNELBASE mapping */
+	li	r7,0
+	bl	1f			/* Find our address */
+1:	mflr	r9
+	rlwimi	r6,r9,0,20,31
+	addi	r6,r6,24
+	mtspr	SRR0,r6
+	mtspr	SRR1,r7
+	rfi				/* start execution out of TLB1[0] entry */
+
+/* 8. Clear out the temp mapping */
+	lis	r7,0x1000	/* Set MAS0(TLBSEL) = 1 */
+	rlwimi	r7,r5,16,12,15	/* Setup MAS0 = TLBSEL | ESEL(r5) */
+	mtspr	SPRN_MAS0,r7
+	tlbre
+	mtspr	SPRN_MAS1,r8
+	tlbwe
+	/* Invalidate TLB1 */
+	li      r9,0x0c
+	tlbivax 0,r9
+#ifdef CONFIG_SMP
+	tlbsync
+#endif
+	msync
+
+	/* Establish the interrupt vector offsets */
+	SET_IVOR(0,  CriticalInput);
+	SET_IVOR(1,  MachineCheck);
+	SET_IVOR(2,  DataStorage);
+	SET_IVOR(3,  InstructionStorage);
+	SET_IVOR(4,  ExternalInput);
+	SET_IVOR(5,  Alignment);
+	SET_IVOR(6,  Program);
+	SET_IVOR(7,  FloatingPointUnavailable);
+	SET_IVOR(8,  SystemCall);
+	SET_IVOR(9,  AuxillaryProcessorUnavailable);
+	SET_IVOR(10, Decrementer);
+	SET_IVOR(11, FixedIntervalTimer);
+	SET_IVOR(12, WatchdogTimer);
+	SET_IVOR(13, DataTLBError);
+	SET_IVOR(14, InstructionTLBError);
+	SET_IVOR(15, Debug);
+	SET_IVOR(32, SPEUnavailable);
+	SET_IVOR(33, SPEFloatingPointData);
+	SET_IVOR(34, SPEFloatingPointRound);
+	SET_IVOR(35, PerformanceMonitor);
+
+	/* Establish the interrupt vector base */
+	lis	r4,interrupt_base@h	/* IVPR only uses the high 16-bits */
+	mtspr	SPRN_IVPR,r4
+
+	/* Setup the defaults for TLB entries */
+	li	r2,MAS4_TSIZED(BOOKE_PAGESZ_4K)
+   	mtspr	SPRN_MAS4, r2
+
+#if 0
+	/* Enable DOZE */
+	mfspr	r2,SPRN_HID0
+	oris	r2,r2,HID0_DOZE@h
+	mtspr	SPRN_HID0, r2
+#endif
+
+	/*
+	 * This is where the main kernel code starts.
+	 */
+
+	/* ptr to current */
+	lis	r2,init_task@h
+	ori	r2,r2,init_task@l
+
+	/* ptr to current thread */
+	addi	r4,r2,THREAD	/* init task's THREAD */
+	mtspr	SPRG3,r4
+
+	/* stack */
+	lis	r1,init_thread_union@h
+	ori	r1,r1,init_thread_union@l
+	li	r0,0
+	stwu	r0,THREAD_SIZE-STACK_FRAME_OVERHEAD(r1)
+
+	bl	early_init
+
+	mfspr	r3,SPRN_TLB1CFG
+	andi.	r3,r3,0xfff
+	lis	r4,num_tlbcam_entries@ha
+	stw	r3,num_tlbcam_entries@l(r4)
+/*
+ * Decide what sort of machine this is and initialize the MMU.
+ */
+	mr	r3,r31
+	mr	r4,r30
+	mr	r5,r29
+	mr	r6,r28
+	mr	r7,r27
+	bl	machine_init
+	bl	MMU_init
+
+	/* Setup PTE pointers for the Abatron bdiGDB */
+	lis	r6, swapper_pg_dir@h
+	ori	r6, r6, swapper_pg_dir@l
+	lis	r5, abatron_pteptrs@h
+	ori	r5, r5, abatron_pteptrs@l
+	lis	r4, KERNELBASE@h
+	ori	r4, r4, KERNELBASE@l
+	stw	r5, 0(r4)	/* Save abatron_pteptrs at a fixed location */
+	stw	r6, 0(r5)
+
+	/* Let's move on */
+	lis	r4,start_kernel@h
+	ori	r4,r4,start_kernel@l
+	lis	r3,MSR_KERNEL@h
+	ori	r3,r3,MSR_KERNEL@l
+	mtspr	SRR0,r4
+	mtspr	SRR1,r3
+	rfi			/* change context and jump to start_kernel */
+
+/*
+ * Interrupt vector entry code
+ *
+ * The Book E MMUs are always on so we don't need to handle
+ * interrupts in real mode as with previous PPC processors. In
+ * this case we handle interrupts in the kernel virtual address
+ * space.
+ *
+ * Interrupt vectors are dynamically placed relative to the
+ * interrupt prefix as determined by the address of interrupt_base.
+ * The interrupt vectors offsets are programmed using the labels
+ * for each interrupt vector entry.
+ *
+ * Interrupt vectors must be aligned on a 16 byte boundary.
+ * We align on a 32 byte cache line boundary for good measure.
+ */
+
+#define NORMAL_EXCEPTION_PROLOG						     \
+	mtspr	SPRN_SPRG0,r10;		/* save two registers to work with */\
+	mtspr	SPRN_SPRG1,r11;						     \
+	mtspr	SPRN_SPRG4W,r1;						     \
+	mfcr	r10;			/* save CR in r10 for now	   */\
+	mfspr	r11,SPRN_SRR1;		/* check whether user or kernel    */\
+	andi.	r11,r11,MSR_PR;						     \
+	beq	1f;							     \
+	mfspr	r1,SPRG3;		/* if from user, start at top of   */\
+	lwz	r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack   */\
+	addi	r1,r1,THREAD_SIZE;					     \
+1:	subi	r1,r1,INT_FRAME_SIZE;	/* Allocate an exception frame     */\
+	tophys(r11,r1);							     \
+	stw	r10,_CCR(r11);          /* save various registers	   */\
+	stw	r12,GPR12(r11);						     \
+	stw	r9,GPR9(r11);						     \
+	mfspr	r10,SPRG0;						     \
+	stw	r10,GPR10(r11);						     \
+	mfspr	r12,SPRG1;						     \
+	stw	r12,GPR11(r11);						     \
+	mflr	r10;							     \
+	stw	r10,_LINK(r11);						     \
+	mfspr	r10,SPRG4R;						     \
+	mfspr	r12,SRR0;						     \
+	stw	r10,GPR1(r11);						     \
+	mfspr	r9,SRR1;						     \
+	stw	r10,0(r11);						     \
+	rlwinm	r9,r9,0,14,12;		/* clear MSR_WE (necessary?)	   */\
+	stw	r0,GPR0(r11);						     \
+	SAVE_4GPRS(3, r11);						     \
+	SAVE_2GPRS(7, r11)
+
+/*
+ * Exception prolog for critical exceptions.  This is a little different
+ * from the normal exception prolog above since a critical exception
+ * can potentially occur at any point during normal exception processing.
+ * Thus we cannot use the same SPRG registers as the normal prolog above.
+ * Instead we use a couple of words of memory at low physical addresses.
+ * This is OK since we don't support SMP on these processors. For Book E
+ * processors, we also have a reserved register (SPRG2) that is only used
+ * in critical exceptions so we can free up a GPR to use as the base for
+ * indirect access to the critical exception save area.  This is necessary
+ * since the MMU is always on and the save area is offset from KERNELBASE.
+ */
+#define CRITICAL_EXCEPTION_PROLOG					     \
+	mtspr	SPRG2,r8;		/* SPRG2 only used in criticals */   \
+	lis	r8,crit_save@ha;					     \
+	stw	r10,crit_r10@l(r8);					     \
+	stw	r11,crit_r11@l(r8);					     \
+	mfspr	r10,SPRG0;						     \
+	stw	r10,crit_sprg0@l(r8);					     \
+	mfspr	r10,SPRG1;						     \
+	stw	r10,crit_sprg1@l(r8);					     \
+	mfspr	r10,SPRG4R;						     \
+	stw	r10,crit_sprg4@l(r8);					     \
+	mfspr	r10,SPRG5R;						     \
+	stw	r10,crit_sprg5@l(r8);					     \
+	mfspr	r10,SPRG7R;						     \
+	stw	r10,crit_sprg7@l(r8);					     \
+	mfspr	r10,SPRN_PID;						     \
+	stw	r10,crit_pid@l(r8);					     \
+	mfspr	r10,SRR0;						     \
+	stw	r10,crit_srr0@l(r8);					     \
+	mfspr	r10,SRR1;						     \
+	stw	r10,crit_srr1@l(r8);					     \
+	mfspr	r8,SPRG2;		/* SPRG2 only used in criticals */   \
+	mfcr	r10;			/* save CR in r10 for now	   */\
+	mfspr	r11,SPRN_CSRR1;		/* check whether user or kernel    */\
+	andi.	r11,r11,MSR_PR;						     \
+	lis	r11,critical_stack_top@h;				     \
+	ori	r11,r11,critical_stack_top@l;				     \
+	beq	1f;							     \
+	/* COMING FROM USER MODE */					     \
+	mfspr	r11,SPRG3;		/* if from user, start at top of   */\
+	lwz	r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
+	addi	r11,r11,THREAD_SIZE;					     \
+1:	subi	r11,r11,INT_FRAME_SIZE;	/* Allocate an exception frame     */\
+	stw	r10,_CCR(r11);          /* save various registers	   */\
+	stw	r12,GPR12(r11);						     \
+	stw	r9,GPR9(r11);						     \
+	mflr	r10;							     \
+	stw	r10,_LINK(r11);						     \
+	mfspr	r12,SPRN_DEAR;		/* save DEAR and ESR in the frame  */\
+	stw	r12,_DEAR(r11);		/* since they may have had stuff   */\
+	mfspr	r9,SPRN_ESR;		/* in them at the point where the  */\
+	stw	r9,_ESR(r11);		/* exception was taken		   */\
+	mfspr	r12,CSRR0;						     \
+	stw	r1,GPR1(r11);						     \
+	mfspr	r9,CSRR1;						     \
+	stw	r1,0(r11);						     \
+	tovirt(r1,r11);							     \
+	rlwinm	r9,r9,0,14,12;		/* clear MSR_WE (necessary?)	   */\
+	stw	r0,GPR0(r11);						     \
+	SAVE_4GPRS(3, r11);						     \
+	SAVE_2GPRS(7, r11)
+
+/*
+ * Exception prolog for machine check exceptions.  This is similar to
+ * the critical exception prolog, except that machine check exceptions
+ * have their own save area.  For Book E processors, we also have a
+ * reserved register (SPRG6) that is only used in machine check exceptions
+ * so we can free up a GPR to use as the base for indirect access to the
+ * machine check exception save area.  This is necessary since the MMU
+ * is always on and the save area is offset from KERNELBASE.
+ */
+#define MCHECK_EXCEPTION_PROLOG					     \
+	mtspr	SPRG6W,r8;		/* SPRG6 used in machine checks */   \
+	lis	r8,mcheck_save@ha;					     \
+	stw	r10,mcheck_r10@l(r8);					     \
+	stw	r11,mcheck_r11@l(r8);					     \
+	mfspr	r10,SPRG0;						     \
+	stw	r10,mcheck_sprg0@l(r8);					     \
+	mfspr	r10,SPRG1;						     \
+	stw	r10,mcheck_sprg1@l(r8);					     \
+	mfspr	r10,SPRG4R;						     \
+	stw	r10,mcheck_sprg4@l(r8);					     \
+	mfspr	r10,SPRG5R;						     \
+	stw	r10,mcheck_sprg5@l(r8);					     \
+	mfspr	r10,SPRG7R;						     \
+	stw	r10,mcheck_sprg7@l(r8);					     \
+	mfspr	r10,SPRN_PID;						     \
+	stw	r10,mcheck_pid@l(r8);					     \
+	mfspr	r10,SRR0;						     \
+	stw	r10,mcheck_srr0@l(r8);					     \
+	mfspr	r10,SRR1;						     \
+	stw	r10,mcheck_srr1@l(r8);					     \
+	mfspr	r10,CSRR0;						     \
+	stw	r10,mcheck_csrr0@l(r8);					     \
+	mfspr	r10,CSRR1;						     \
+	stw	r10,mcheck_csrr1@l(r8);					     \
+	mfspr	r8,SPRG6R;		/* SPRG6 used in machine checks */   \
+	mfcr	r10;			/* save CR in r10 for now	   */\
+	mfspr	r11,SPRN_MCSRR1;	/* check whether user or kernel    */\
+	andi.	r11,r11,MSR_PR;						     \
+	lis	r11,mcheck_stack_top@h;					     \
+	ori	r11,r11,mcheck_stack_top@l;				     \
+	beq	1f;							     \
+	/* COMING FROM USER MODE */					     \
+	mfspr	r11,SPRG3;		/* if from user, start at top of   */\
+	lwz	r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
+	addi	r11,r11,THREAD_SIZE;					     \
+1:	subi	r11,r11,INT_FRAME_SIZE;	/* Allocate an exception frame     */\
+	stw	r10,_CCR(r11);          /* save various registers	   */\
+	stw	r12,GPR12(r11);						     \
+	stw	r9,GPR9(r11);						     \
+	mflr	r10;							     \
+	stw	r10,_LINK(r11);						     \
+	mfspr	r12,SPRN_DEAR;		/* save DEAR and ESR in the frame  */\
+	stw	r12,_DEAR(r11);		/* since they may have had stuff   */\
+	mfspr	r9,SPRN_ESR;		/* in them at the point where the  */\
+	stw	r9,_ESR(r11);		/* exception was taken		   */\
+	mfspr	r12,MCSRR0;						     \
+	stw	r1,GPR1(r11);						     \
+	mfspr	r9,MCSRR1;						     \
+	stw	r1,0(r11);						     \
+	tovirt(r1,r11);							     \
+	rlwinm	r9,r9,0,14,12;		/* clear MSR_WE (necessary?)	   */\
+	stw	r0,GPR0(r11);						     \
+	SAVE_4GPRS(3, r11);						     \
+	SAVE_2GPRS(7, r11)
+
+/*
+ * Exception vectors.
+ */
+#define	START_EXCEPTION(label)						     \
+        .align 5;              						     \
+label:
+
+#define FINISH_EXCEPTION(func)					\
+	bl	transfer_to_handler_full;			\
+	.long	func;						\
+	.long	ret_from_except_full
+
+#define EXCEPTION(n, label, hdlr, xfer)				\
+	START_EXCEPTION(label);					\
+	NORMAL_EXCEPTION_PROLOG;				\
+	addi	r3,r1,STACK_FRAME_OVERHEAD;			\
+	xfer(n, hdlr)
+
+#define CRITICAL_EXCEPTION(n, label, hdlr)			\
+	START_EXCEPTION(label);					\
+	CRITICAL_EXCEPTION_PROLOG;				\
+	addi	r3,r1,STACK_FRAME_OVERHEAD;			\
+	EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
+			  NOCOPY, transfer_to_handler_full, \
+			  ret_from_except_full)
+
+#define MCHECK_EXCEPTION(n, label, hdlr)			\
+	START_EXCEPTION(label);					\
+	MCHECK_EXCEPTION_PROLOG;				\
+	mfspr	r5,SPRN_ESR;					\
+	stw	r5,_ESR(r11);					\
+	addi	r3,r1,STACK_FRAME_OVERHEAD;			\
+	EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
+			  NOCOPY, mcheck_transfer_to_handler,   \
+			  ret_from_mcheck_exc)
+
+#define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret)	\
+	li	r10,trap;					\
+	stw	r10,TRAP(r11);					\
+	lis	r10,msr@h;					\
+	ori	r10,r10,msr@l;					\
+	copyee(r10, r9);					\
+	bl	tfer;		 				\
+	.long	hdlr;						\
+	.long	ret
+
+#define COPY_EE(d, s)		rlwimi d,s,0,16,16
+#define NOCOPY(d, s)
+
+#define EXC_XFER_STD(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
+			  ret_from_except_full)
+
+#define EXC_XFER_LITE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  ret_from_except)
+
+#define EXC_XFER_EE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \
+			  ret_from_except_full)
+
+#define EXC_XFER_EE_LITE(n, hdlr)	\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \
+			  ret_from_except)
+
+interrupt_base:
+	/* Critical Input Interrupt */
+	CRITICAL_EXCEPTION(0x0100, CriticalInput, UnknownException)
+
+	/* Machine Check Interrupt */
+	MCHECK_EXCEPTION(0x0200, MachineCheck, MachineCheckException)
+
+	/* Data Storage Interrupt */
+	START_EXCEPTION(DataStorage)
+	mtspr	SPRG0, r10		/* Save some working registers */
+	mtspr	SPRG1, r11
+	mtspr	SPRG4W, r12
+	mtspr	SPRG5W, r13
+	mfcr	r11
+	mtspr	SPRG7W, r11
+
+	/*
+	 * Check if it was a store fault, if not then bail
+	 * because a user tried to access a kernel or
+	 * read-protected page.  Otherwise, get the
+	 * offending address and handle it.
+	 */
+	mfspr	r10, SPRN_ESR
+	andis.	r10, r10, ESR_ST@h
+	beq	2f
+
+	mfspr	r10, SPRN_DEAR		/* Get faulting address */
+
+	/* If we are faulting a kernel address, we have to use the
+	 * kernel page tables.
+	 */
+	lis	r11, TASK_SIZE@h
+	ori	r11, r11, TASK_SIZE@l
+	cmplw	0, r10, r11
+	bge	2f
+
+	/* Get the PGD for the current thread */
+3:
+	mfspr	r11,SPRG3
+	lwz	r11,PGDIR(r11)
+4:
+	rlwimi	r11, r10, 12, 20, 29	/* Create L1 (pgdir/pmd) address */
+	lwz	r11, 0(r11)		/* Get L1 entry */
+	rlwinm.	r12, r11, 0, 0, 19	/* Extract L2 (pte) base address */
+	beq	2f			/* Bail if no table */
+
+	rlwimi	r12, r10, 22, 20, 29	/* Compute PTE address */
+	lwz	r11, 0(r12)		/* Get Linux PTE */
+
+	/* Are _PAGE_USER & _PAGE_RW set & _PAGE_HWWRITE not? */
+	andi.	r13, r11, _PAGE_RW|_PAGE_USER|_PAGE_HWWRITE
+	cmpwi	0, r13, _PAGE_RW|_PAGE_USER
+	bne	2f			/* Bail if not */
+
+	/* Update 'changed'. */
+	ori	r11, r11, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
+	stw	r11, 0(r12)		/* Update Linux page table */
+
+	/* MAS2 not updated as the entry does exist in the tlb, this
+	   fault taken to detect state transition (eg: COW -> DIRTY)
+	 */
+	lis	r12, MAS3_RPN@h
+	ori	r12, r12, _PAGE_HWEXEC | MAS3_RPN@l
+	and	r11, r11, r12
+	rlwimi	r11, r11, 31, 27, 27	/* SX <- _PAGE_HWEXEC */
+	ori     r11, r11, (MAS3_UW|MAS3_SW|MAS3_UR|MAS3_SR)@l /* set static perms */
+
+	/* update search PID in MAS6, AS = 0 */
+	mfspr	r12, SPRN_PID0
+	slwi	r12, r12, 16
+	mtspr	SPRN_MAS6, r12
+
+	/* find the TLB index that caused the fault.  It has to be here. */
+	tlbsx	0, r10
+
+	mtspr	SPRN_MAS3,r11
+	tlbwe
+
+	/* Done...restore registers and get out of here.  */
+	mfspr	r11, SPRG7R
+	mtcr	r11
+	mfspr	r13, SPRG5R
+	mfspr	r12, SPRG4R
+	mfspr	r11, SPRG1
+	mfspr	r10, SPRG0
+	rfi			/* Force context change */
+
+2:
+	/*
+	 * The bailout.  Restore registers to pre-exception conditions
+	 * and call the heavyweights to help us out.
+	 */
+	mfspr	r11, SPRG7R
+	mtcr	r11
+	mfspr	r13, SPRG5R
+	mfspr	r12, SPRG4R
+	mfspr	r11, SPRG1
+	mfspr	r10, SPRG0
+	b	data_access
+
+	/* Instruction Storage Interrupt */
+	START_EXCEPTION(InstructionStorage)
+	NORMAL_EXCEPTION_PROLOG
+	mfspr	r5,SPRN_ESR		/* Grab the ESR and save it */
+	stw	r5,_ESR(r11)
+	mr      r4,r12                  /* Pass SRR0 as arg2 */
+	li      r5,0                    /* Pass zero as arg3 */
+	EXC_XFER_EE_LITE(0x0400, handle_page_fault)
+
+	/* External Input Interrupt */
+	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+
+	/* Alignment Interrupt */
+	START_EXCEPTION(Alignment)
+	NORMAL_EXCEPTION_PROLOG
+	mfspr   r4,SPRN_DEAR            /* Grab the DEAR and save it */
+	stw     r4,_DEAR(r11)
+	addi    r3,r1,STACK_FRAME_OVERHEAD
+	EXC_XFER_EE(0x0600, AlignmentException)
+
+	/* Program Interrupt */
+	START_EXCEPTION(Program)
+	NORMAL_EXCEPTION_PROLOG
+	mfspr	r4,SPRN_ESR		/* Grab the ESR and save it */
+	stw	r4,_ESR(r11)
+	addi	r3,r1,STACK_FRAME_OVERHEAD
+	EXC_XFER_STD(0x0700, ProgramCheckException)
+
+	/* Floating Point Unavailable Interrupt */
+	EXCEPTION(0x0800, FloatingPointUnavailable, UnknownException, EXC_XFER_EE)
+
+	/* System Call Interrupt */
+	START_EXCEPTION(SystemCall)
+	NORMAL_EXCEPTION_PROLOG
+	EXC_XFER_EE_LITE(0x0c00, DoSyscall)
+
+	/* Auxillary Processor Unavailable Interrupt */
+	EXCEPTION(0x2900, AuxillaryProcessorUnavailable, UnknownException, EXC_XFER_EE)
+
+	/* Decrementer Interrupt */
+	START_EXCEPTION(Decrementer)
+	NORMAL_EXCEPTION_PROLOG
+	lis     r0,TSR_DIS@h            /* Setup the DEC interrupt mask */
+	mtspr   SPRN_TSR,r0		/* Clear the DEC interrupt */
+	addi    r3,r1,STACK_FRAME_OVERHEAD
+	EXC_XFER_LITE(0x0900, timer_interrupt)
+
+	/* Fixed Internal Timer Interrupt */
+	/* TODO: Add FIT support */
+	EXCEPTION(0x3100, FixedIntervalTimer, UnknownException, EXC_XFER_EE)
+
+	/* Watchdog Timer Interrupt */
+	/* TODO: Add watchdog support */
+	CRITICAL_EXCEPTION(0x3200, WatchdogTimer, UnknownException)
+
+	/* Data TLB Error Interrupt */
+	START_EXCEPTION(DataTLBError)
+	mtspr	SPRG0, r10		/* Save some working registers */
+	mtspr	SPRG1, r11
+	mtspr	SPRG4W, r12
+	mtspr	SPRG5W, r13
+	mfcr	r11
+	mtspr	SPRG7W, r11
+	mfspr	r10, SPRN_DEAR		/* Get faulting address */
+
+	/* If we are faulting a kernel address, we have to use the
+	 * kernel page tables.
+	 */
+	lis	r11, TASK_SIZE@h
+	ori	r11, r11, TASK_SIZE@l
+	cmplw	5, r10, r11
+	blt	5, 3f
+	lis	r11, swapper_pg_dir@h
+	ori	r11, r11, swapper_pg_dir@l
+
+	mfspr	r12,SPRN_MAS1		/* Set TID to 0 */
+	li	r13,MAS1_TID@l
+	andc	r12,r12,r13
+	mtspr	SPRN_MAS1,r12
+
+	b	4f
+
+	/* Get the PGD for the current thread */
+3:
+	mfspr	r11,SPRG3
+	lwz	r11,PGDIR(r11)
+
+4:
+	rlwimi	r11, r10, 12, 20, 29	/* Create L1 (pgdir/pmd) address */
+	lwz	r11, 0(r11)		/* Get L1 entry */
+	rlwinm.	r12, r11, 0, 0, 19	/* Extract L2 (pte) base address */
+	beq	2f			/* Bail if no table */
+
+	rlwimi	r12, r10, 22, 20, 29	/* Compute PTE address */
+	lwz	r11, 0(r12)		/* Get Linux PTE */
+	andi.	r13, r11, _PAGE_PRESENT
+	beq	2f
+
+	ori	r11, r11, _PAGE_ACCESSED
+	stw	r11, 0(r12)
+
+	 /* Jump to common tlb load */
+	b	finish_tlb_load
+2:
+	/* The bailout.  Restore registers to pre-exception conditions
+	 * and call the heavyweights to help us out.
+	 */
+	mfspr	r11, SPRG7R
+	mtcr	r11
+	mfspr	r13, SPRG5R
+	mfspr	r12, SPRG4R
+	mfspr	r11, SPRG1
+	mfspr	r10, SPRG0
+	b	data_access
+
+	/* Instruction TLB Error Interrupt */
+	/*
+	 * Nearly the same as above, except we get our
+	 * information from different registers and bailout
+	 * to a different point.
+	 */
+	START_EXCEPTION(InstructionTLBError)
+	mtspr	SPRG0, r10		/* Save some working registers */
+	mtspr	SPRG1, r11
+	mtspr	SPRG4W, r12
+	mtspr	SPRG5W, r13
+	mfcr	r11
+	mtspr	SPRG7W, r11
+	mfspr	r10, SRR0		/* Get faulting address */
+
+	/* If we are faulting a kernel address, we have to use the
+	 * kernel page tables.
+	 */
+	lis	r11, TASK_SIZE@h
+	ori	r11, r11, TASK_SIZE@l
+	cmplw	5, r10, r11
+	blt	5, 3f
+	lis	r11, swapper_pg_dir@h
+	ori	r11, r11, swapper_pg_dir@l
+
+	mfspr	r12,SPRN_MAS1		/* Set TID to 0 */
+	li	r13,MAS1_TID@l
+	andc	r12,r12,r13
+	mtspr	SPRN_MAS1,r12
+
+	b	4f
+
+	/* Get the PGD for the current thread */
+3:
+	mfspr	r11,SPRG3
+	lwz	r11,PGDIR(r11)
+
+4:
+	rlwimi	r11, r10, 12, 20, 29	/* Create L1 (pgdir/pmd) address */
+	lwz	r11, 0(r11)		/* Get L1 entry */
+	rlwinm.	r12, r11, 0, 0, 19	/* Extract L2 (pte) base address */
+	beq	2f			/* Bail if no table */
+
+	rlwimi	r12, r10, 22, 20, 29	/* Compute PTE address */
+	lwz	r11, 0(r12)		/* Get Linux PTE */
+	andi.	r13, r11, _PAGE_PRESENT
+	beq	2f
+
+	ori	r11, r11, _PAGE_ACCESSED
+	stw	r11, 0(r12)
+
+	/* Jump to common TLB load point */
+	b	finish_tlb_load
+
+2:
+	/* The bailout.  Restore registers to pre-exception conditions
+	 * and call the heavyweights to help us out.
+	 */
+	mfspr	r11, SPRG7R
+	mtcr	r11
+	mfspr	r13, SPRG5R
+	mfspr	r12, SPRG4R
+	mfspr	r11, SPRG1
+	mfspr	r10, SPRG0
+	b	InstructionStorage
+
+#ifdef CONFIG_SPE
+	/* SPE Unavailable */
+	START_EXCEPTION(SPEUnavailable)
+	NORMAL_EXCEPTION_PROLOG
+	bne	load_up_spe
+	addi    r3,r1,STACK_FRAME_OVERHEAD
+	EXC_XFER_EE_LITE(0x2010, KernelSPE)
+#else
+	EXCEPTION(0x2020, SPEUnavailable, UnknownException, EXC_XFER_EE)
+#endif /* CONFIG_SPE */
+
+	/* SPE Floating Point Data */
+#ifdef CONFIG_SPE
+	EXCEPTION(0x2030, SPEFloatingPointData, SPEFloatingPointException, EXC_XFER_EE);
+#else
+	EXCEPTION(0x2040, SPEFloatingPointData, UnknownException, EXC_XFER_EE)
+#endif /* CONFIG_SPE */
+
+	/* SPE Floating Point Round */
+	EXCEPTION(0x2050, SPEFloatingPointRound, UnknownException, EXC_XFER_EE)
+
+	/* Performance Monitor */
+	EXCEPTION(0x2060, PerformanceMonitor, UnknownException, EXC_XFER_EE)
+
+/* Check for a single step debug exception while in an exception
+ * handler before state has been saved.  This is to catch the case
+ * where an instruction that we are trying to single step causes
+ * an exception (eg ITLB/DTLB miss) and thus the first instruction of
+ * the exception handler generates a single step debug exception.
+ *
+ * If we get a debug trap on the first instruction of an exception handler,
+ * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is
+ * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR).
+ * The exception handler was handling a non-critical interrupt, so it will
+ * save (and later restore) the MSR via SPRN_SRR1, which will still have
+ * the MSR_DE bit set.
+ */
+	/* Debug Interrupt */
+	START_EXCEPTION(Debug)
+	CRITICAL_EXCEPTION_PROLOG
+
+	/*
+	 * If this is a single step or branch-taken exception in an
+	 * exception entry sequence, it was probably meant to apply to
+	 * the code where the exception occurred (since exception entry
+	 * doesn't turn off DE automatically).  We simulate the effect
+	 * of turning off DE on entry to an exception handler by turning
+	 * off DE in the CSRR1 value and clearing the debug status.
+	 */
+	mfspr	r10,SPRN_DBSR		/* check single-step/branch taken */
+	andis.	r10,r10,(DBSR_IC|DBSR_BT)@h
+	beq+	1f
+	andi.	r0,r9,MSR_PR		/* check supervisor */
+	beq	2f			/* branch if we need to fix it up... */
+
+	/* continue normal handling for a critical exception... */
+1:	mfspr	r4,SPRN_DBSR
+	addi	r3,r1,STACK_FRAME_OVERHEAD
+	EXC_XFER_TEMPLATE(DebugException, 0x2002, \
+		(MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
+		NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
+
+	/* here it looks like we got an inappropriate debug exception. */
+2:	rlwinm	r9,r9,0,~MSR_DE		/* clear DE in the CSRR1 value */
+	mtspr	SPRN_DBSR,r10		/* clear the IC/BT debug intr status */
+	/* restore state and get out */
+	lwz	r10,_CCR(r11)
+	lwz	r0,GPR0(r11)
+	lwz	r1,GPR1(r11)
+	mtcrf	0x80,r10
+	mtspr	CSRR0,r12
+	mtspr	CSRR1,r9
+	lwz	r9,GPR9(r11)
+
+	mtspr	SPRG2,r8;		/* SPRG2 only used in criticals */
+	lis	r8,crit_save@ha;
+	lwz	r10,crit_r10@l(r8)
+	lwz	r11,crit_r11@l(r8)
+	mfspr	r8,SPRG2
+
+	rfci
+	b	.
+
+/*
+ * Local functions
+ */
+	/*
+	 * Data TLB exceptions will bail out to this point
+	 * if they can't resolve the lightweight TLB fault.
+	 */
+data_access:
+	NORMAL_EXCEPTION_PROLOG
+	mfspr	r5,SPRN_ESR		/* Grab the ESR, save it, pass arg3 */
+	stw	r5,_ESR(r11)
+	mfspr	r4,SPRN_DEAR		/* Grab the DEAR, save it, pass arg2 */
+	andis.	r10,r5,(ESR_ILK|ESR_DLK)@h
+	bne	1f
+	EXC_XFER_EE_LITE(0x0300, handle_page_fault)
+1:
+	addi	r3,r1,STACK_FRAME_OVERHEAD
+	EXC_XFER_EE_LITE(0x0300, CacheLockingException)
+
+/*
+
+ * Both the instruction and data TLB miss get to this
+ * point to load the TLB.
+ * 	r10 - EA of fault
+ * 	r11 - TLB (info from Linux PTE)
+ * 	r12, r13 - available to use
+ * 	CR5 - results of addr < TASK_SIZE
+ *	MAS0, MAS1 - loaded with proper value when we get here
+ *	MAS2, MAS3 - will need additional info from Linux PTE
+ *	Upon exit, we reload everything and RFI.
+ */
+finish_tlb_load:
+	/*
+	 * We set execute, because we don't have the granularity to
+	 * properly set this at the page level (Linux problem).
+	 * Many of these bits are software only.  Bits we don't set
+	 * here we (properly should) assume have the appropriate value.
+	 */
+
+	mfspr	r12, SPRN_MAS2
+	rlwimi	r12, r11, 26, 27, 31	/* extract WIMGE from pte */
+	mtspr	SPRN_MAS2, r12
+
+	bge	5, 1f
+
+	/* addr > TASK_SIZE */
+	li	r10, (MAS3_UX | MAS3_UW | MAS3_UR)
+	andi.	r13, r11, (_PAGE_USER | _PAGE_HWWRITE | _PAGE_HWEXEC)
+	andi.	r12, r11, _PAGE_USER	/* Test for _PAGE_USER */
+	iseleq	r12, 0, r10
+	and	r10, r12, r13
+	srwi	r12, r10, 1
+	or	r12, r12, r10	/* Copy user perms into supervisor */
+	b	2f
+
+	/* addr <= TASK_SIZE */
+1:	rlwinm	r12, r11, 31, 29, 29	/* Extract _PAGE_HWWRITE into SW */
+	ori	r12, r12, (MAS3_SX | MAS3_SR)
+
+2:	rlwimi	r11, r12, 0, 20, 31	/* Extract RPN from PTE and merge with perms */
+	mtspr	SPRN_MAS3, r11
+	tlbwe
+
+	/* Done...restore registers and get out of here.  */
+	mfspr	r11, SPRG7R
+	mtcr	r11
+	mfspr	r13, SPRG5R
+	mfspr	r12, SPRG4R
+	mfspr	r11, SPRG1
+	mfspr	r10, SPRG0
+	rfi					/* Force context change */
+
+#ifdef CONFIG_SPE
+/* Note that the SPE support is closely modeled after the AltiVec
+ * support.  Changes to one are likely to be applicable to the
+ * other!  */
+load_up_spe:
+/*
+ * Disable SPE for the task which had SPE previously,
+ * and save its SPE registers in its thread_struct.
+ * Enables SPE for use in the kernel on return.
+ * On SMP we know the SPE units are free, since we give it up every
+ * switch.  -- Kumar
+ */
+	mfmsr	r5
+	oris	r5,r5,MSR_SPE@h
+	mtmsr	r5			/* enable use of SPE now */
+	isync
+/*
+ * For SMP, we don't do lazy SPE switching because it just gets too
+ * horrendously complex, especially when a task switches from one CPU
+ * to another.  Instead we call giveup_spe in switch_to.
+ */
+#ifndef CONFIG_SMP
+	lis	r3,last_task_used_spe@ha
+	lwz	r4,last_task_used_spe@l(r3)
+	cmpi	0,r4,0
+	beq	1f
+	addi	r4,r4,THREAD	/* want THREAD of last_task_used_spe */
+	SAVE_32EVR(0,r10,r4)
+   	evxor	evr10, evr10, evr10	/* clear out evr10 */
+	evmwumiaa evr10, evr10, evr10	/* evr10 <- ACC = 0 * 0 + ACC */
+	li	r5,THREAD_ACC
+   	evstddx	evr10, r4, r5		/* save off accumulator */
+	lwz	r5,PT_REGS(r4)
+	lwz	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
+	lis	r10,MSR_SPE@h
+	andc	r4,r4,r10	/* disable SPE for previous task */
+	stw	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
+1:
+#endif /* CONFIG_SMP */
+	/* enable use of SPE after return */
+	oris	r9,r9,MSR_SPE@h
+	mfspr	r5,SPRG3		/* current task's THREAD (phys) */
+	li	r4,1
+	li	r10,THREAD_ACC
+	stw	r4,THREAD_USED_SPE(r5)
+	evlddx	evr4,r10,r5
+	evmra	evr4,evr4
+	REST_32EVR(0,r10,r5)
+#ifndef CONFIG_SMP
+	subi	r4,r5,THREAD
+	stw	r4,last_task_used_spe@l(r3)
+#endif /* CONFIG_SMP */
+	/* restore registers and return */
+2:	REST_4GPRS(3, r11)
+	lwz	r10,_CCR(r11)
+	REST_GPR(1, r11)
+	mtcr	r10
+	lwz	r10,_LINK(r11)
+	mtlr	r10
+	REST_GPR(10, r11)
+	mtspr	SRR1,r9
+	mtspr	SRR0,r12
+	REST_GPR(9, r11)
+	REST_GPR(12, r11)
+	lwz	r11,GPR11(r11)
+	SYNC
+	rfi
+
+
+
+/*
+ * SPE unavailable trap from kernel - print a message, but let
+ * the task use SPE in the kernel until it returns to user mode.
+ */
+KernelSPE:
+	lwz	r3,_MSR(r1)
+	oris	r3,r3,MSR_SPE@h
+	stw	r3,_MSR(r1)	/* enable use of SPE after return */
+	lis	r3,87f@h
+	ori	r3,r3,87f@l
+	mr	r4,r2		/* current */
+	lwz	r5,_NIP(r1)
+	bl	printk
+	b	ret_from_except
+87:	.string	"SPE used in kernel  (task=%p, pc=%x)  \n"
+	.align	4,0
+
+#endif /* CONFIG_SPE */
+
+/*
+ * Global functions
+ */
+
+/*
+ * extern void loadcam_entry(unsigned int index)
+ *
+ * Load TLBCAM[index] entry in to the L2 CAM MMU
+ */
+_GLOBAL(loadcam_entry)
+	lis	r4,TLBCAM@ha
+	addi	r4,r4,TLBCAM@l
+	mulli	r5,r3,20
+	add	r3,r5,r4
+	lwz	r4,0(r3)
+	mtspr	SPRN_MAS0,r4
+	lwz	r4,4(r3)
+	mtspr	SPRN_MAS1,r4
+	lwz	r4,8(r3)
+	mtspr	SPRN_MAS2,r4
+	lwz	r4,12(r3)
+	mtspr	SPRN_MAS3,r4
+	tlbwe
+	isync
+	blr
+
+/*
+ * extern void giveup_altivec(struct task_struct *prev)
+ *
+ * The e500 core does not have an AltiVec unit.
+ */
+_GLOBAL(giveup_altivec)
+	blr
+
+#ifdef CONFIG_SPE
+/*
+ * extern void giveup_spe(struct task_struct *prev)
+ *
+ */
+_GLOBAL(giveup_spe)
+	mfmsr	r5
+	oris	r5,r5,MSR_SPE@h
+	SYNC
+	mtmsr	r5			/* enable use of SPE now */
+	isync
+	cmpi	0,r3,0
+	beqlr-				/* if no previous owner, done */
+	addi	r3,r3,THREAD		/* want THREAD of task */
+	lwz	r5,PT_REGS(r3)
+	cmpi	0,r5,0
+	SAVE_32EVR(0, r4, r3)
+   	evxor	evr6, evr6, evr6	/* clear out evr6 */
+	evmwumiaa evr6, evr6, evr6	/* evr6 <- ACC = 0 * 0 + ACC */
+	li	r4,THREAD_ACC
+   	evstddx	evr6, r4, r3		/* save off accumulator */
+	beq	1f
+	lwz	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
+	lis	r3,MSR_SPE@h
+	andc	r4,r4,r3		/* disable SPE for previous task */
+	stw	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
+1:
+#ifndef CONFIG_SMP
+	li	r5,0
+	lis	r4,last_task_used_spe@ha
+	stw	r5,last_task_used_spe@l(r4)
+#endif /* CONFIG_SMP */
+	blr
+#endif /* CONFIG_SPE */
+
+/*
+ * extern void giveup_fpu(struct task_struct *prev)
+ *
+ * The e500 core does not have an FPU.
+ */
+_GLOBAL(giveup_fpu)
+	blr
+
+/*
+ * extern void abort(void)
+ *
+ * At present, this routine just applies a system reset.
+ */
+_GLOBAL(abort)
+	li	r13,0
+        mtspr   SPRN_DBCR0,r13		/* disable all debug events */
+	mfmsr	r13
+	ori	r13,r13,MSR_DE@l	/* Enable Debug Events */
+	mtmsr	r13
+        mfspr   r13,SPRN_DBCR0
+        lis	r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h
+        mtspr   SPRN_DBCR0,r13
+
+_GLOBAL(set_context)
+
+#ifdef CONFIG_BDI_SWITCH
+	/* Context switch the PTE pointer for the Abatron BDI2000.
+	 * The PGDIR is the second parameter.
+	 */
+	lis	r5, abatron_pteptrs@h
+	ori	r5, r5, abatron_pteptrs@l
+	stw	r4, 0x4(r5)
+#endif
+	mtspr	SPRN_PID,r3
+	isync			/* Force context change */
+	blr
+
+/*
+ * We put a few things here that have to be page-aligned. This stuff
+ * goes at the beginning of the data segment, which is page-aligned.
+ */
+	.data
+_GLOBAL(sdata)
+_GLOBAL(empty_zero_page)
+	.space	4096
+_GLOBAL(swapper_pg_dir)
+	.space	4096
+
+	.section .bss
+/* Stack for handling critical exceptions from kernel mode */
+critical_stack_bottom:
+	.space 4096
+critical_stack_top:
+	.previous
+
+/* Stack for handling machine check exceptions from kernel mode */
+mcheck_stack_bottom:
+	.space 4096
+mcheck_stack_top:
+	.previous
+
+/*
+ * This area is used for temporarily saving registers during the
+ * critical and machine check exception prologs. It must always
+ * follow the page aligned allocations, so it starts on a page
+ * boundary, ensuring that all crit_save areas are in a single
+ * page.
+ */
+
+/* crit_save */
+_GLOBAL(crit_save)
+	.space  4
+_GLOBAL(crit_r10)
+	.space	4
+_GLOBAL(crit_r11)
+	.space	4
+_GLOBAL(crit_sprg0)
+	.space	4
+_GLOBAL(crit_sprg1)
+	.space	4
+_GLOBAL(crit_sprg4)
+	.space	4
+_GLOBAL(crit_sprg5)
+	.space	4
+_GLOBAL(crit_sprg7)
+	.space	4
+_GLOBAL(crit_pid)
+	.space	4
+_GLOBAL(crit_srr0)
+	.space	4
+_GLOBAL(crit_srr1)
+	.space	4
+
+/* mcheck_save */
+_GLOBAL(mcheck_save)
+	.space  4
+_GLOBAL(mcheck_r10)
+	.space	4
+_GLOBAL(mcheck_r11)
+	.space	4
+_GLOBAL(mcheck_sprg0)
+	.space	4
+_GLOBAL(mcheck_sprg1)
+	.space	4
+_GLOBAL(mcheck_sprg4)
+	.space	4
+_GLOBAL(mcheck_sprg5)
+	.space	4
+_GLOBAL(mcheck_sprg7)
+	.space	4
+_GLOBAL(mcheck_pid)
+	.space	4
+_GLOBAL(mcheck_srr0)
+	.space	4
+_GLOBAL(mcheck_srr1)
+	.space	4
+_GLOBAL(mcheck_csrr0)
+	.space	4
+_GLOBAL(mcheck_csrr1)
+	.space	4
+
+/*
+ * This space gets a copy of optional info passed to us by the bootstrap
+ * which is used to pass parameters into the kernel like root=/dev/sda1, etc.
+ */
+_GLOBAL(cmd_line)
+	.space	512
+
+/*
+ * Room for two PTE pointers, usually the kernel and current user pointers
+ * to their respective root page table.
+ */
+abatron_pteptrs:
+	.space	8
+
+
--- diff/arch/ppc/lib/rheap.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/lib/rheap.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,692 @@
+/*
+ * arch/ppc/syslib/rheap.c
+ *
+ * A Remote Heap.  Remote means that we don't touch the memory that the
+ * heap points to. Normal heap implementations use the memory they manage
+ * to place their list. We cannot do that because the memory we manage may
+ * have special properties, for example it is uncachable or of different
+ * endianess.
+ *
+ * Author: Pantelis Antoniou <panto@intracom.gr>
+ *
+ * 2004 (c) INTRACOM S.A. Greece. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+
+#include <asm/rheap.h>
+
+/*
+ * Fixup a list_head, needed when copying lists.  If the pointers fall
+ * between s and e, apply the delta.  This assumes that
+ * sizeof(struct list_head *) == sizeof(unsigned long *).
+ */
+static inline void fixup(unsigned long s, unsigned long e, int d,
+			 struct list_head *l)
+{
+	unsigned long *pp;
+
+	pp = (unsigned long *)&l->next;
+	if (*pp >= s && *pp < e)
+		*pp += d;
+
+	pp = (unsigned long *)&l->prev;
+	if (*pp >= s && *pp < e)
+		*pp += d;
+}
+
+/* Grow the allocated blocks */
+static int grow(rh_info_t * info, int max_blocks)
+{
+	rh_block_t *block, *blk;
+	int i, new_blocks;
+	int delta;
+	unsigned long blks, blke;
+
+	if (max_blocks <= info->max_blocks)
+		return -EINVAL;
+
+	new_blocks = max_blocks - info->max_blocks;
+
+	block = kmalloc(sizeof(rh_block_t) * max_blocks, GFP_KERNEL);
+	if (block == NULL)
+		return -ENOMEM;
+
+	if (info->max_blocks > 0) {
+
+		/* copy old block area */
+		memcpy(block, info->block,
+		       sizeof(rh_block_t) * info->max_blocks);
+
+		delta = (char *)block - (char *)info->block;
+
+		/* and fixup list pointers */
+		blks = (unsigned long)info->block;
+		blke = (unsigned long)(info->block + info->max_blocks);
+
+		for (i = 0, blk = block; i < info->max_blocks; i++, blk++)
+			fixup(blks, blke, delta, &blk->list);
+
+		fixup(blks, blke, delta, &info->empty_list);
+		fixup(blks, blke, delta, &info->free_list);
+		fixup(blks, blke, delta, &info->taken_list);
+
+		/* free the old allocated memory */
+		if ((info->flags & RHIF_STATIC_BLOCK) == 0)
+			kfree(info->block);
+	}
+
+	info->block = block;
+	info->empty_slots += new_blocks;
+	info->max_blocks = max_blocks;
+	info->flags &= ~RHIF_STATIC_BLOCK;
+
+	/* add all new blocks to the free list */
+	for (i = 0, blk = block + info->max_blocks; i < new_blocks; i++, blk++)
+		list_add(&blk->list, &info->empty_list);
+
+	return 0;
+}
+
+/*
+ * Assure at least the required amount of empty slots.  If this function
+ * causes a grow in the block area then all pointers kept to the block
+ * area are invalid!
+ */
+static int assure_empty(rh_info_t * info, int slots)
+{
+	int max_blocks;
+
+	/* This function is not meant to be used to grow uncontrollably */
+	if (slots >= 4)
+		return -EINVAL;
+
+	/* Enough space */
+	if (info->empty_slots >= slots)
+		return 0;
+
+	/* Next 16 sized block */
+	max_blocks = ((info->max_blocks + slots) + 15) & ~15;
+
+	return grow(info, max_blocks);
+}
+
+static rh_block_t *get_slot(rh_info_t * info)
+{
+	rh_block_t *blk;
+
+	/* If no more free slots, and failure to extend. */
+	/* XXX: You should have called assure_empty before */
+	if (info->empty_slots == 0) {
+		printk(KERN_ERR "rh: out of slots; crash is imminent.\n");
+		return NULL;
+	}
+
+	/* Get empty slot to use */
+	blk = list_entry(info->empty_list.next, rh_block_t, list);
+	list_del_init(&blk->list);
+	info->empty_slots--;
+
+	/* Initialize */
+	blk->start = NULL;
+	blk->size = 0;
+	blk->owner = NULL;
+
+	return blk;
+}
+
+static inline void release_slot(rh_info_t * info, rh_block_t * blk)
+{
+	list_add(&blk->list, &info->empty_list);
+	info->empty_slots++;
+}
+
+static void attach_free_block(rh_info_t * info, rh_block_t * blkn)
+{
+	rh_block_t *blk;
+	rh_block_t *before;
+	rh_block_t *after;
+	rh_block_t *next;
+	int size;
+	unsigned long s, e, bs, be;
+	struct list_head *l;
+
+	/* We assume that they are aligned properly */
+	size = blkn->size;
+	s = (unsigned long)blkn->start;
+	e = s + size;
+
+	/* Find the blocks immediately before and after the given one
+	 * (if any) */
+	before = NULL;
+	after = NULL;
+	next = NULL;
+
+	list_for_each(l, &info->free_list) {
+		blk = list_entry(l, rh_block_t, list);
+
+		bs = (unsigned long)blk->start;
+		be = bs + blk->size;
+
+		if (next == NULL && s >= bs)
+			next = blk;
+
+		if (be == s)
+			before = blk;
+
+		if (e == bs)
+			after = blk;
+
+		/* If both are not null, break now */
+		if (before != NULL && after != NULL)
+			break;
+	}
+
+	/* Now check if they are really adjacent */
+	if (before != NULL && s != (unsigned long)before->start + before->size)
+		before = NULL;
+
+	if (after != NULL && e != (unsigned long)after->start)
+		after = NULL;
+
+	/* No coalescing; list insert and return */
+	if (before == NULL && after == NULL) {
+
+		if (next != NULL)
+			list_add(&blkn->list, &next->list);
+		else
+			list_add(&blkn->list, &info->free_list);
+
+		return;
+	}
+
+	/* We don't need it anymore */
+	release_slot(info, blkn);
+
+	/* Grow the before block */
+	if (before != NULL && after == NULL) {
+		before->size += size;
+		return;
+	}
+
+	/* Grow the after block backwards */
+	if (before == NULL && after != NULL) {
+		(int8_t *) after->start -= size;
+		after->size += size;
+		return;
+	}
+
+	/* Grow the before block, and release the after block */
+	before->size += size + after->size;
+	list_del(&after->list);
+	release_slot(info, after);
+}
+
+static void attach_taken_block(rh_info_t * info, rh_block_t * blkn)
+{
+	rh_block_t *blk;
+	struct list_head *l;
+
+	/* Find the block immediately before the given one (if any) */
+	list_for_each(l, &info->taken_list) {
+		blk = list_entry(l, rh_block_t, list);
+		if (blk->start > blkn->start) {
+			list_add_tail(&blkn->list, &blk->list);
+			return;
+		}
+	}
+
+	list_add_tail(&blkn->list, &info->taken_list);
+}
+
+/*
+ * Create a remote heap dynamically.  Note that no memory for the blocks
+ * are allocated.  It will upon the first allocation
+ */
+rh_info_t *rh_create(unsigned int alignment)
+{
+	rh_info_t *info;
+
+	/* Alignment must be a power of two */
+	if ((alignment & (alignment - 1)) != 0)
+		return NULL;
+
+	info = kmalloc(sizeof(*info), GFP_KERNEL);
+	if (info == NULL)
+		return NULL;
+
+	info->alignment = alignment;
+
+	/* Initially everything as empty */
+	info->block = NULL;
+	info->max_blocks = 0;
+	info->empty_slots = 0;
+	info->flags = 0;
+
+	INIT_LIST_HEAD(&info->empty_list);
+	INIT_LIST_HEAD(&info->free_list);
+	INIT_LIST_HEAD(&info->taken_list);
+
+	return info;
+}
+
+/*
+ * Destroy a dynamically created remote heap.  Deallocate only if the areas
+ * are not static
+ */
+void rh_destroy(rh_info_t * info)
+{
+	if ((info->flags & RHIF_STATIC_BLOCK) == 0 && info->block != NULL)
+		kfree(info->block);
+
+	if ((info->flags & RHIF_STATIC_INFO) == 0)
+		kfree(info);
+}
+
+/*
+ * Initialize in place a remote heap info block.  This is needed to support
+ * operation very early in the startup of the kernel, when it is not yet safe
+ * to call kmalloc.
+ */
+void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks,
+	     rh_block_t * block)
+{
+	int i;
+	rh_block_t *blk;
+
+	/* Alignment must be a power of two */
+	if ((alignment & (alignment - 1)) != 0)
+		return;
+
+	info->alignment = alignment;
+
+	/* Initially everything as empty */
+	info->block = block;
+	info->max_blocks = max_blocks;
+	info->empty_slots = max_blocks;
+	info->flags = RHIF_STATIC_INFO | RHIF_STATIC_BLOCK;
+
+	INIT_LIST_HEAD(&info->empty_list);
+	INIT_LIST_HEAD(&info->free_list);
+	INIT_LIST_HEAD(&info->taken_list);
+
+	/* Add all new blocks to the free list */
+	for (i = 0, blk = block; i < max_blocks; i++, blk++)
+		list_add(&blk->list, &info->empty_list);
+}
+
+/* Attach a free memory region, coalesces regions if adjuscent */
+int rh_attach_region(rh_info_t * info, void *start, int size)
+{
+	rh_block_t *blk;
+	unsigned long s, e, m;
+	int r;
+
+	/* The region must be aligned */
+	s = (unsigned long)start;
+	e = s + size;
+	m = info->alignment - 1;
+
+	/* Round start up */
+	s = (s + m) & ~m;
+
+	/* Round end down */
+	e = e & ~m;
+
+	/* Take final values */
+	start = (void *)s;
+	size = (int)(e - s);
+
+	/* Grow the blocks, if needed */
+	r = assure_empty(info, 1);
+	if (r < 0)
+		return r;
+
+	blk = get_slot(info);
+	blk->start = start;
+	blk->size = size;
+	blk->owner = NULL;
+
+	attach_free_block(info, blk);
+
+	return 0;
+}
+
+/* Detatch given address range, splits free block if needed. */
+void *rh_detach_region(rh_info_t * info, void *start, int size)
+{
+	struct list_head *l;
+	rh_block_t *blk, *newblk;
+	unsigned long s, e, m, bs, be;
+
+	/* Validate size */
+	if (size <= 0)
+		return NULL;
+
+	/* The region must be aligned */
+	s = (unsigned long)start;
+	e = s + size;
+	m = info->alignment - 1;
+
+	/* Round start up */
+	s = (s + m) & ~m;
+
+	/* Round end down */
+	e = e & ~m;
+
+	if (assure_empty(info, 1) < 0)
+		return NULL;
+
+	blk = NULL;
+	list_for_each(l, &info->free_list) {
+		blk = list_entry(l, rh_block_t, list);
+		/* The range must lie entirely inside one free block */
+		bs = (unsigned long)blk->start;
+		be = (unsigned long)blk->start + blk->size;
+		if (s >= bs && e <= be)
+			break;
+		blk = NULL;
+	}
+
+	if (blk == NULL)
+		return NULL;
+
+	/* Perfect fit */
+	if (bs == s && be == e) {
+		/* Delete from free list, release slot */
+		list_del(&blk->list);
+		release_slot(info, blk);
+		return (void *)s;
+	}
+
+	/* blk still in free list, with updated start and/or size */
+	if (bs == s || be == e) {
+		if (bs == s)
+			(int8_t *) blk->start += size;
+		blk->size -= size;
+
+	} else {
+		/* The front free fragment */
+		blk->size = s - bs;
+
+		/* the back free fragment */
+		newblk = get_slot(info);
+		newblk->start = (void *)e;
+		newblk->size = be - e;
+
+		list_add(&newblk->list, &blk->list);
+	}
+
+	return (void *)s;
+}
+
+void *rh_alloc(rh_info_t * info, int size, const char *owner)
+{
+	struct list_head *l;
+	rh_block_t *blk;
+	rh_block_t *newblk;
+	void *start;
+
+	/* Validate size */
+	if (size <= 0)
+		return NULL;
+
+	/* Align to configured alignment */
+	size = (size + (info->alignment - 1)) & ~(info->alignment - 1);
+
+	if (assure_empty(info, 1) < 0)
+		return NULL;
+
+	blk = NULL;
+	list_for_each(l, &info->free_list) {
+		blk = list_entry(l, rh_block_t, list);
+		if (size <= blk->size)
+			break;
+		blk = NULL;
+	}
+
+	if (blk == NULL)
+		return NULL;
+
+	/* Just fits */
+	if (blk->size == size) {
+		/* Move from free list to taken list */
+		list_del(&blk->list);
+		blk->owner = owner;
+		start = blk->start;
+
+		attach_taken_block(info, blk);
+
+		return start;
+	}
+
+	newblk = get_slot(info);
+	newblk->start = blk->start;
+	newblk->size = size;
+	newblk->owner = owner;
+
+	/* blk still in free list, with updated start, size */
+	(int8_t *) blk->start += size;
+	blk->size -= size;
+
+	start = newblk->start;
+
+	attach_taken_block(info, newblk);
+
+	return start;
+}
+
+/* allocate at precisely the given address */
+void *rh_alloc_fixed(rh_info_t * info, void *start, int size, const char *owner)
+{
+	struct list_head *l;
+	rh_block_t *blk, *newblk1, *newblk2;
+	unsigned long s, e, m, bs, be;
+
+	/* Validate size */
+	if (size <= 0)
+		return NULL;
+
+	/* The region must be aligned */
+	s = (unsigned long)start;
+	e = s + size;
+	m = info->alignment - 1;
+
+	/* Round start up */
+	s = (s + m) & ~m;
+
+	/* Round end down */
+	e = e & ~m;
+
+	if (assure_empty(info, 2) < 0)
+		return NULL;
+
+	blk = NULL;
+	list_for_each(l, &info->free_list) {
+		blk = list_entry(l, rh_block_t, list);
+		/* The range must lie entirely inside one free block */
+		bs = (unsigned long)blk->start;
+		be = (unsigned long)blk->start + blk->size;
+		if (s >= bs && e <= be)
+			break;
+	}
+
+	if (blk == NULL)
+		return NULL;
+
+	/* Perfect fit */
+	if (bs == s && be == e) {
+		/* Move from free list to taken list */
+		list_del(&blk->list);
+		blk->owner = owner;
+
+		start = blk->start;
+		attach_taken_block(info, blk);
+
+		return start;
+
+	}
+
+	/* blk still in free list, with updated start and/or size */
+	if (bs == s || be == e) {
+		if (bs == s)
+			(int8_t *) blk->start += size;
+		blk->size -= size;
+
+	} else {
+		/* The front free fragment */
+		blk->size = s - bs;
+
+		/* The back free fragment */
+		newblk2 = get_slot(info);
+		newblk2->start = (void *)e;
+		newblk2->size = be - e;
+
+		list_add(&newblk2->list, &blk->list);
+	}
+
+	newblk1 = get_slot(info);
+	newblk1->start = (void *)s;
+	newblk1->size = e - s;
+	newblk1->owner = owner;
+
+	start = newblk1->start;
+	attach_taken_block(info, newblk1);
+
+	return start;
+}
+
+int rh_free(rh_info_t * info, void *start)
+{
+	rh_block_t *blk, *blk2;
+	struct list_head *l;
+	int size;
+
+	/* Linear search for block */
+	blk = NULL;
+	list_for_each(l, &info->taken_list) {
+		blk2 = list_entry(l, rh_block_t, list);
+		if (start < blk2->start)
+			break;
+		blk = blk2;
+	}
+
+	if (blk == NULL || start > (blk->start + blk->size))
+		return -EINVAL;
+
+	/* Remove from taken list */
+	list_del(&blk->list);
+
+	/* Get size of freed block */
+	size = blk->size;
+	attach_free_block(info, blk);
+
+	return size;
+}
+
+int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats)
+{
+	rh_block_t *blk;
+	struct list_head *l;
+	struct list_head *h;
+	int nr;
+
+	switch (what) {
+
+	case RHGS_FREE:
+		h = &info->free_list;
+		break;
+
+	case RHGS_TAKEN:
+		h = &info->taken_list;
+		break;
+
+	default:
+		return -EINVAL;
+	}
+
+	/* Linear search for block */
+	nr = 0;
+	list_for_each(l, h) {
+		blk = list_entry(l, rh_block_t, list);
+		if (stats != NULL && nr < max_stats) {
+			stats->start = blk->start;
+			stats->size = blk->size;
+			stats->owner = blk->owner;
+			stats++;
+		}
+		nr++;
+	}
+
+	return nr;
+}
+
+int rh_set_owner(rh_info_t * info, void *start, const char *owner)
+{
+	rh_block_t *blk, *blk2;
+	struct list_head *l;
+	int size;
+
+	/* Linear search for block */
+	blk = NULL;
+	list_for_each(l, &info->taken_list) {
+		blk2 = list_entry(l, rh_block_t, list);
+		if (start < blk2->start)
+			break;
+		blk = blk2;
+	}
+
+	if (blk == NULL || start > (blk->start + blk->size))
+		return -EINVAL;
+
+	blk->owner = owner;
+
+	return size;
+}
+
+void rh_dump(rh_info_t * info)
+{
+	static rh_stats_t st[32];	/* XXX maximum 32 blocks */
+	int maxnr;
+	int i, nr;
+
+	maxnr = sizeof(st) / sizeof(st[0]);
+
+	printk(KERN_INFO
+	       "info @0x%p (%d slots empty / %d max)\n",
+	       info, info->empty_slots, info->max_blocks);
+
+	printk(KERN_INFO "  Free:\n");
+	nr = rh_get_stats(info, RHGS_FREE, maxnr, st);
+	if (nr > maxnr)
+		nr = maxnr;
+	for (i = 0; i < nr; i++)
+		printk(KERN_INFO
+		       "    0x%p-0x%p (%u)\n",
+		       st[i].start, (int8_t *) st[i].start + st[i].size,
+		       st[i].size);
+	printk(KERN_INFO "\n");
+
+	printk(KERN_INFO "  Taken:\n");
+	nr = rh_get_stats(info, RHGS_TAKEN, maxnr, st);
+	if (nr > maxnr)
+		nr = maxnr;
+	for (i = 0; i < nr; i++)
+		printk(KERN_INFO
+		       "    0x%p-0x%p (%u) %s\n",
+		       st[i].start, (int8_t *) st[i].start + st[i].size,
+		       st[i].size, st[i].owner != NULL ? st[i].owner : "");
+	printk(KERN_INFO "\n");
+}
+
+void rh_dump_blk(rh_info_t * info, rh_block_t * blk)
+{
+	printk(KERN_INFO
+	       "blk @0x%p: 0x%p-0x%p (%u)\n",
+	       blk, blk->start, (int8_t *) blk->start + blk->size, blk->size);
+}
--- diff/arch/ppc/mm/fsl_booke_mmu.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/mm/fsl_booke_mmu.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,236 @@
+/*
+ * Modifications by Kumar Gala (kumar.gala@freescale.com) to support
+ * E500 Book E processors.
+ *
+ * Copyright 2004 Freescale Semiconductor, Inc
+ *
+ * This file contains the routines for initializing the MMU
+ * on the 4xx series of chips.
+ *  -- paulus
+ *
+ *  Derived from arch/ppc/mm/init.c:
+ *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
+ *
+ *  Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
+ *  and Cort Dougan (PReP) (cort@cs.nmt.edu)
+ *    Copyright (C) 1996 Paul Mackerras
+ *  Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
+ *
+ *  Derived from "arch/i386/mm/init.c"
+ *    Copyright (C) 1991, 1992, 1993, 1994  Linus Torvalds
+ *
+ *  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.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/ptrace.h>
+#include <linux/mman.h>
+#include <linux/mm.h>
+#include <linux/swap.h>
+#include <linux/stddef.h>
+#include <linux/vmalloc.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/bootmem.h>
+#include <linux/highmem.h>
+
+#include <asm/pgalloc.h>
+#include <asm/prom.h>
+#include <asm/io.h>
+#include <asm/mmu_context.h>
+#include <asm/pgtable.h>
+#include <asm/mmu.h>
+#include <asm/uaccess.h>
+#include <asm/smp.h>
+#include <asm/bootx.h>
+#include <asm/machdep.h>
+#include <asm/setup.h>
+
+extern void loadcam_entry(unsigned int index);
+unsigned int tlbcam_index;
+unsigned int num_tlbcam_entries;
+static unsigned long __cam0, __cam1, __cam2;
+extern unsigned long total_lowmem;
+extern unsigned long __max_low_memory;
+#define MAX_LOW_MEM	CONFIG_LOWMEM_SIZE
+
+struct tlbcam {
+   	u32	MAS0;
+	u32	MAS1;
+	u32	MAS2;
+	u32	MAS3;
+	u32	MAS7;
+} TLBCAM[NUM_TLBCAMS];
+
+struct tlbcamrange {
+   	unsigned long start;
+	unsigned long limit;
+	phys_addr_t phys;
+} tlbcam_addrs[NUM_TLBCAMS];
+
+extern unsigned int tlbcam_index;
+
+/*
+ * Return PA for this VA if it is mapped by a CAM, or 0
+ */
+unsigned long v_mapped_by_tlbcam(unsigned long va)
+{
+	int b;
+	for (b = 0; b < tlbcam_index; ++b)
+		if (va >= tlbcam_addrs[b].start && va < tlbcam_addrs[b].limit)
+			return tlbcam_addrs[b].phys + (va - tlbcam_addrs[b].start);
+	return 0;
+}
+
+/*
+ * Return VA for a given PA or 0 if not mapped
+ */
+unsigned long p_mapped_by_tlbcam(unsigned long pa)
+{
+	int b;
+	for (b = 0; b < tlbcam_index; ++b)
+		if (pa >= tlbcam_addrs[b].phys
+	    	    && pa < (tlbcam_addrs[b].limit-tlbcam_addrs[b].start)
+		              +tlbcam_addrs[b].phys)
+			return tlbcam_addrs[b].start+(pa-tlbcam_addrs[b].phys);
+	return 0;
+}
+
+/*
+ * Set up one of the I/D BAT (block address translation) register pairs.
+ * The parameters are not checked; in particular size must be a power
+ * of 4 between 4k and 256M.
+ */
+void settlbcam(int index, unsigned long virt, phys_addr_t phys,
+		unsigned int size, int flags, unsigned int pid)
+{
+	unsigned int tsize, lz;
+
+	asm ("cntlzw %0,%1" : "=r" (lz) : "r" (size));
+	tsize = (21 - lz) / 2;
+
+#ifdef CONFIG_SMP
+	if ((flags & _PAGE_NO_CACHE) == 0)
+		flags |= _PAGE_COHERENT;
+#endif
+
+	TLBCAM[index].MAS0 = MAS0_TLBSEL | (index << 16);
+	TLBCAM[index].MAS1 = MAS1_VALID | MAS1_IPROT | MAS1_TSIZE(tsize) | ((pid << 16) & MAS1_TID);
+	TLBCAM[index].MAS2 = virt & PAGE_MASK;
+
+	TLBCAM[index].MAS2 |= (flags & _PAGE_WRITETHRU) ? MAS2_W : 0;
+	TLBCAM[index].MAS2 |= (flags & _PAGE_NO_CACHE) ? MAS2_I : 0;
+	TLBCAM[index].MAS2 |= (flags & _PAGE_COHERENT) ? MAS2_M : 0;
+	TLBCAM[index].MAS2 |= (flags & _PAGE_GUARDED) ? MAS2_G : 0;
+	TLBCAM[index].MAS2 |= (flags & _PAGE_ENDIAN) ? MAS2_E : 0;
+
+	TLBCAM[index].MAS3 = (phys & PAGE_MASK) | MAS3_SX | MAS3_SR;
+	TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_SW : 0);
+
+#ifndef CONFIG_KGDB /* want user access for breakpoints */
+	if (flags & _PAGE_USER) {
+	   TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
+	   TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
+	}
+#else
+	TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
+	TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
+#endif
+
+	tlbcam_addrs[index].start = virt;
+	tlbcam_addrs[index].limit = virt + size - 1;
+	tlbcam_addrs[index].phys = phys;
+
+	loadcam_entry(index);
+}
+
+void invalidate_tlbcam_entry(int index)
+{
+	TLBCAM[index].MAS0 = MAS0_TLBSEL | (index << 16);
+	TLBCAM[index].MAS1 = ~MAS1_VALID;
+
+	loadcam_entry(index);
+}
+
+void __init cam_mapin_ram(unsigned long cam0, unsigned long cam1,
+		unsigned long cam2)
+{
+	settlbcam(0, KERNELBASE, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0);
+	tlbcam_index++;
+	if (cam1) {
+		tlbcam_index++;
+		settlbcam(1, KERNELBASE+cam0, PPC_MEMSTART+cam0, cam1, _PAGE_KERNEL, 0);
+	}
+	if (cam2) {
+		tlbcam_index++;
+		settlbcam(2, KERNELBASE+cam0+cam1, PPC_MEMSTART+cam0+cam1, cam2, _PAGE_KERNEL, 0);
+	}
+}
+
+/*
+ * MMU_init_hw does the chip-specific initialization of the MMU hardware.
+ */
+void __init MMU_init_hw(void)
+{
+	flush_instruction_cache();
+}
+
+unsigned long __init mmu_mapin_ram(void)
+{
+	cam_mapin_ram(__cam0, __cam1, __cam2);
+
+	return __cam0 + __cam1 + __cam2;
+}
+
+
+void __init
+adjust_total_lowmem(void)
+{
+	unsigned long max_low_mem = MAX_LOW_MEM;
+	unsigned long cam_max = 0x10000000;
+	unsigned long ram;
+
+	/* adjust CAM size to max_low_mem */
+	if (max_low_mem < cam_max)
+		cam_max = max_low_mem;
+
+	/* adjust lowmem size to max_low_mem */
+	if (max_low_mem < total_lowmem)
+		ram = max_low_mem;
+	else
+		ram = total_lowmem;
+
+	/* Calculate CAM values */
+	__cam0 = 1UL << 2 * (__ilog2(ram) / 2);
+	if (__cam0 > cam_max)
+		__cam0 = cam_max;
+	ram -= __cam0;
+	if (ram) {
+		__cam1 = 1UL << 2 * (__ilog2(ram) / 2);
+		if (__cam1 > cam_max)
+			__cam1 = cam_max;
+		ram -= __cam1;
+	}
+	if (ram) {
+		__cam2 = 1UL << 2 * (__ilog2(ram) / 2);
+		if (__cam2 > cam_max)
+			__cam2 = cam_max;
+		ram -= __cam2;
+	}
+
+	printk(KERN_INFO "Memory CAM mapping: CAM0=%ldMb, CAM1=%ldMb,"
+			" CAM2=%ldMb residual: %ldMb\n",
+			__cam0 >> 20, __cam1 >> 20, __cam2 >> 20,
+			(total_lowmem - __cam0 - __cam1 - __cam2) >> 20);
+	__max_low_memory = max_low_mem = __cam0 + __cam1 + __cam2;
+}
--- diff/arch/ppc/oprofile/Kconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/oprofile/Kconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,23 @@
+
+menu "Profiling support"
+	depends on EXPERIMENTAL
+
+config PROFILING
+	bool "Profiling support (EXPERIMENTAL)"
+	help
+	  Say Y here to enable the extended profiling support mechanisms used
+	  by profilers such as OProfile.
+
+
+config OPROFILE
+	tristate "OProfile system profiling (EXPERIMENTAL)"
+	depends on PROFILING
+	help
+	  OProfile is a profiling system capable of profiling the
+	  whole system, include the kernel, kernel modules, libraries,
+	  and applications.
+
+	  If unsure, say N.
+
+endmenu
+
--- diff/arch/ppc/oprofile/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/oprofile/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,9 @@
+obj-$(CONFIG_OPROFILE) += oprofile.o
+
+DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \
+		oprof.o cpu_buffer.o buffer_sync.o \
+		event_buffer.o oprofile_files.o \
+		oprofilefs.o oprofile_stats.o \
+		timer_int.o )
+
+oprofile-y := $(DRIVER_OBJS) init.o
--- diff/arch/ppc/oprofile/init.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/oprofile/init.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,23 @@
+/**
+ * @file init.c
+ *
+ * @remark Copyright 2002 OProfile authors
+ * @remark Read the file COPYING
+ *
+ * @author John Levon <levon@movementarian.org>
+ */
+
+#include <linux/kernel.h>
+#include <linux/oprofile.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+
+int __init oprofile_arch_init(struct oprofile_operations ** ops)
+{
+	return -ENODEV;
+}
+
+
+void oprofile_arch_exit(void)
+{
+}
--- diff/arch/ppc/platforms/85xx/Kconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/Kconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,55 @@
+config 85xx
+	bool
+	depends on E500
+	default y
+
+config PPC_INDIRECT_PCI_BE
+	bool
+	depends on 85xx
+	default y
+
+menu "Freescale 85xx options"
+	depends on E500
+
+choice
+	prompt "Machine Type"
+	depends on 85xx
+	default MPC8540_ADS
+
+config MPC8540_ADS
+	bool "MPC8540ADS"
+	help
+	  This option enables support for the MPC 8540 ADS evaluation board.
+
+config SBC8560
+	bool "WindRiver PowerQUICC III SBC8560"
+	help
+	  This option enables support for the WindRiver PowerQUICC III 
+	  SBC8560 board.
+
+endchoice
+
+# It's often necessary to know the specific 85xx processor type.
+# Fortunately, it is implied (so far) from the board type, so we
+# don't need to ask more redundant questions.
+config MPC8540
+	bool
+	depends on MPC8540_ADS
+	default y
+
+config MPC8560
+	bool
+	depends on SBC8560
+	default y
+
+config FSL_OCP
+	bool
+	depends on 85xx
+	default y
+
+config PPC_GEN550
+	bool
+	depends on MPC8540 || SBC8560
+	default y
+
+endmenu
--- diff/arch/ppc/platforms/85xx/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,9 @@
+#
+# Makefile for the PowerPC 85xx linux kernel.
+#
+
+obj-$(CONFIG_MPC8540_ADS)	+= mpc85xx_ads_common.o mpc8540_ads.o
+obj-$(CONFIG_SBC8560)		+= sbc85xx.o sbc8560.o
+
+obj-$(CONFIG_MPC8540)		+= mpc8540.o
+obj-$(CONFIG_MPC8560)		+= mpc8560.o
--- diff/arch/ppc/platforms/85xx/mpc8540.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/mpc8540.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,97 @@
+/*
+ * arch/ppc/platforms/85xx/mpc8540.c
+ *
+ * MPC8540 I/O descriptions
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <asm/mpc85xx.h>
+#include <asm/ocp.h>
+
+/* These should be defined in platform code */
+extern struct ocp_gfar_data mpc85xx_tsec1_def;
+extern struct ocp_gfar_data mpc85xx_tsec2_def;
+extern struct ocp_gfar_data mpc85xx_fec_def;
+extern struct ocp_mpc_i2c_data mpc85xx_i2c1_def;
+
+/* We use offsets for paddr since we do not know at compile time
+ * what CCSRBAR is, platform code should fix this up in
+ * setup_arch
+ *
+ * Only the first IRQ is given even if a device has
+ * multiple lines associated with ita
+ */
+struct ocp_def core_ocp[] = {
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_IIC,
+          .index        = 0,
+          .paddr        = MPC85xx_IIC1_OFFSET,
+          .irq          = MPC85xx_IRQ_IIC1,
+          .pm           = OCP_CPM_NA,
+          .additions    = &mpc85xx_i2c1_def,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_16550,
+          .index        = 0,
+          .paddr        = MPC85xx_UART0_OFFSET,
+          .irq          = MPC85xx_IRQ_DUART,
+          .pm           = OCP_CPM_NA,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_16550,
+          .index        = 1,
+          .paddr        = MPC85xx_UART1_OFFSET,
+          .irq          = MPC85xx_IRQ_DUART,
+          .pm           = OCP_CPM_NA,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_GFAR,
+          .index        = 0,
+          .paddr        = MPC85xx_ENET1_OFFSET,
+          .irq          = MPC85xx_IRQ_TSEC1_TX,
+          .pm           = OCP_CPM_NA,
+          .additions    = &mpc85xx_tsec1_def,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_GFAR,
+          .index        = 1,
+          .paddr        = MPC85xx_ENET2_OFFSET,
+          .irq          = MPC85xx_IRQ_TSEC2_TX,
+          .pm           = OCP_CPM_NA,
+          .additions    = &mpc85xx_tsec2_def,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_GFAR,
+          .index        = 2,
+          .paddr        = MPC85xx_ENET3_OFFSET,
+          .irq          = MPC85xx_IRQ_FEC,
+          .pm           = OCP_CPM_NA,
+          .additions    = &mpc85xx_fec_def,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_DMA,
+          .index        = 0,
+          .paddr        = MPC85xx_DMA_OFFSET,
+          .irq          = MPC85xx_IRQ_DMA0,
+          .pm           = OCP_CPM_NA,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_PERFMON,
+          .index        = 0,
+          .paddr        = MPC85xx_PERFMON_OFFSET,
+          .irq          = MPC85xx_IRQ_PERFMON,
+          .pm           = OCP_CPM_NA,
+        },
+        { .vendor       = OCP_VENDOR_INVALID
+        }
+};
--- diff/arch/ppc/platforms/85xx/mpc8540_ads.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/mpc8540_ads.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,238 @@
+/*
+ * arch/ppc/platforms/85xx/mpc8540_ads.c
+ *
+ * MPC8540ADS board specific routines
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/seq_file.h>
+#include <linux/root_dev.h>
+#include <linux/serial.h>
+#include <linux/tty.h>	/* for linux/serial_core.h */
+#include <linux/serial_core.h>
+#include <linux/module.h>
+
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/atomic.h>
+#include <asm/time.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/prom.h>
+#include <asm/open_pic.h>
+#include <asm/bootinfo.h>
+#include <asm/pci-bridge.h>
+#include <asm/mpc85xx.h>
+#include <asm/irq.h>
+#include <asm/immap_85xx.h>
+#include <asm/kgdb.h>
+#include <asm/ocp.h>
+#include <mm/mmu_decl.h>
+
+#include <syslib/ppc85xx_common.h>
+#include <syslib/ppc85xx_setup.h>
+
+struct ocp_gfar_data mpc85xx_tsec1_def = {
+	.interruptTransmit = MPC85xx_IRQ_TSEC1_TX,
+	.interruptError = MPC85xx_IRQ_TSEC1_ERROR,
+	.interruptReceive = MPC85xx_IRQ_TSEC1_RX,
+	.interruptPHY = MPC85xx_IRQ_EXT5,
+	.flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR
+			| GFAR_HAS_RMON
+			| GFAR_HAS_PHY_INTR | GFAR_HAS_COALESCE),
+	.phyid = 0,
+	.phyregidx = 0,
+};
+
+struct ocp_gfar_data mpc85xx_tsec2_def = {
+	.interruptTransmit = MPC85xx_IRQ_TSEC2_TX,
+	.interruptError = MPC85xx_IRQ_TSEC2_ERROR,
+	.interruptReceive = MPC85xx_IRQ_TSEC2_RX,
+	.interruptPHY = MPC85xx_IRQ_EXT5,
+	.flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR
+			| GFAR_HAS_RMON
+			| GFAR_HAS_PHY_INTR | GFAR_HAS_COALESCE),
+	.phyid = 1,
+	.phyregidx = 0,
+};
+
+struct ocp_gfar_data mpc85xx_fec_def = {
+	.interruptTransmit = MPC85xx_IRQ_FEC,
+	.interruptError = MPC85xx_IRQ_FEC,
+	.interruptReceive = MPC85xx_IRQ_FEC,
+	.interruptPHY = MPC85xx_IRQ_EXT5,
+	.flags = 0,
+	.phyid = 3,
+	.phyregidx = 0,
+};
+
+struct ocp_fs_i2c_data mpc85xx_i2c1_def = {
+	.flags = FS_I2C_SEPARATE_DFSRR,
+};
+
+/* ************************************************************************
+ *
+ * Setup the architecture
+ *
+ */
+static void __init
+mpc8540ads_setup_arch(void)
+{
+	struct ocp_def *def;
+	struct ocp_gfar_data *einfo;
+	bd_t *binfo = (bd_t *) __res;
+	unsigned int freq;
+
+	/* get the core frequency */
+	freq = binfo->bi_intfreq;
+
+	if (ppc_md.progress)
+		ppc_md.progress("mpc8540ads_setup_arch()", 0);
+
+	/* Set loops_per_jiffy to a half-way reasonable value,
+	   for use until calibrate_delay gets called. */
+	loops_per_jiffy = freq / HZ;
+
+#ifdef CONFIG_PCI
+	/* setup PCI host bridges */
+	mpc85xx_setup_hose();
+#endif
+
+#ifdef CONFIG_DUMMY_CONSOLE
+	conswitchp = &dummy_con;
+#endif
+
+#ifdef CONFIG_SERIAL_8250
+	mpc85xx_early_serial_map();
+#endif
+
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
+	/* Invalidate the entry we stole earlier the serial ports
+	 * should be properly mapped */
+	invalidate_tlbcam_entry(NUM_TLBCAMS - 1);
+#endif
+
+	def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 0);
+	if (def) {
+		einfo = (struct ocp_gfar_data *) def->additions;
+		memcpy(einfo->mac_addr, binfo->bi_enetaddr, 6);
+	}
+
+	def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 1);
+	if (def) {
+		einfo = (struct ocp_gfar_data *) def->additions;
+		memcpy(einfo->mac_addr, binfo->bi_enet1addr, 6);
+	}
+
+	def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 2);
+	if (def) {
+		einfo = (struct ocp_gfar_data *) def->additions;
+		memcpy(einfo->mac_addr, binfo->bi_enet2addr, 6);
+	}
+
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (initrd_start)
+		ROOT_DEV = Root_RAM0;
+	else
+#endif
+#ifdef  CONFIG_ROOT_NFS
+		ROOT_DEV = Root_NFS;
+#else
+		ROOT_DEV = Root_HDA1;
+#endif
+
+	ocp_for_each_device(mpc85xx_update_paddr_ocp, &(binfo->bi_immr_base));
+}
+
+/* ************************************************************************ */
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	/* parse_bootinfo must always be called first */
+	parse_bootinfo(find_bootinfo());
+
+	/*
+	 * If we were passed in a board information, copy it into the
+	 * residual data area.
+	 */
+	if (r3) {
+		memcpy((void *) __res, (void *) (r3 + KERNELBASE),
+		       sizeof (bd_t));
+	}
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
+	{
+		bd_t *binfo = (bd_t *) __res;
+
+		/* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */
+		settlbcam(NUM_TLBCAMS - 1, binfo->bi_immr_base,
+			  binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0);
+	}
+#endif
+
+#if defined(CONFIG_BLK_DEV_INITRD)
+	/*
+	 * If the init RAM disk has been configured in, and there's a valid
+	 * starting address for it, set it up.
+	 */
+	if (r4) {
+		initrd_start = r4 + KERNELBASE;
+		initrd_end = r5 + KERNELBASE;
+	}
+#endif				/* CONFIG_BLK_DEV_INITRD */
+
+	/* Copy the kernel command line arguments to a safe place. */
+
+	if (r6) {
+		*(char *) (r7 + KERNELBASE) = 0;
+		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
+	}
+
+	/* setup the PowerPC module struct */
+	ppc_md.setup_arch = mpc8540ads_setup_arch;
+	ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo;
+
+	ppc_md.init_IRQ = mpc85xx_ads_init_IRQ;
+	ppc_md.get_irq = openpic_get_irq;
+
+	ppc_md.restart = mpc85xx_restart;
+	ppc_md.power_off = mpc85xx_power_off;
+	ppc_md.halt = mpc85xx_halt;
+
+	ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory;
+
+	ppc_md.time_init = NULL;
+	ppc_md.set_rtc_time = NULL;
+	ppc_md.get_rtc_time = NULL;
+	ppc_md.calibrate_decr = mpc85xx_calibrate_decr;
+
+#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
+	ppc_md.progress = gen550_progress;
+#endif	/* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
+
+	if (ppc_md.progress)
+		ppc_md.progress("mpc8540ads_init(): exit", 0);
+
+	return;
+}
--- diff/arch/ppc/platforms/85xx/mpc8540_ads.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/mpc8540_ads.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,30 @@
+/*
+ * arch/ppc/platforms/85xx/mpc8540_ads.h
+ *
+ * MPC8540ADS board definitions
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+
+#ifndef __MACH_MPC8540ADS_H__
+#define __MACH_MPC8540ADS_H__
+
+#include <linux/config.h>
+#include <linux/serial.h>
+#include <linux/initrd.h>
+#include <syslib/ppc85xx_setup.h>
+#include <platforms/85xx/mpc85xx_ads_common.h>
+
+#define SERIAL_PORT_DFNS	\
+	STD_UART_OP(0)		\
+	STD_UART_OP(1)
+
+#endif /* __MACH_MPC8540ADS_H__ */
--- diff/arch/ppc/platforms/85xx/mpc8560.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/mpc8560.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,74 @@
+/*
+ * arch/ppc/platforms/85xx/mpc8560.c
+ * 
+ * MPC8560 I/O descriptions
+ * 
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ * 
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <asm/mpc85xx.h>
+#include <asm/ocp.h>
+
+/* These should be defined in platform code */
+extern struct ocp_gfar_data mpc85xx_tsec1_def;
+extern struct ocp_gfar_data mpc85xx_tsec2_def;
+extern struct ocp_mpc_i2c_data mpc85xx_i2c1_def;
+
+/* We use offsets for paddr since we do not know at compile time
+ * what CCSRBAR is, platform code should fix this up in
+ * setup_arch
+ *
+ * Only the first IRQ is given even if a device has
+ * multiple lines associated with ita
+ */
+struct ocp_def core_ocp[] = {
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_IIC,
+          .index        = 0,
+          .paddr        = MPC85xx_IIC1_OFFSET,
+          .irq          = MPC85xx_IRQ_IIC1,
+          .pm           = OCP_CPM_NA,
+          .additions    = &mpc85xx_i2c1_def,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_GFAR,
+          .index        = 0,
+          .paddr        = MPC85xx_ENET1_OFFSET,
+          .irq          = MPC85xx_IRQ_TSEC1_TX,
+          .pm           = OCP_CPM_NA,
+          .additions    = &mpc85xx_tsec1_def,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_GFAR,
+          .index        = 1,
+          .paddr        = MPC85xx_ENET2_OFFSET,
+          .irq          = MPC85xx_IRQ_TSEC2_TX,
+          .pm           = OCP_CPM_NA,
+          .additions    = &mpc85xx_tsec2_def,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_DMA,
+          .index        = 0,
+          .paddr        = MPC85xx_DMA_OFFSET,
+          .irq          = MPC85xx_IRQ_DMA0,
+          .pm           = OCP_CPM_NA,
+        },
+        { .vendor       = OCP_VENDOR_FREESCALE,
+          .function     = OCP_FUNC_PERFMON,
+          .index        = 0,
+          .paddr        = MPC85xx_PERFMON_OFFSET,
+          .irq          = MPC85xx_IRQ_PERFMON,
+          .pm           = OCP_CPM_NA,
+        },
+        { .vendor       = OCP_VENDOR_INVALID
+        }
+};
--- diff/arch/ppc/platforms/85xx/mpc85xx_ads_common.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/mpc85xx_ads_common.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,237 @@
+/*
+ * arch/ppc/platforms/85xx/mpc85xx_ads_common.c
+ *
+ * MPC85xx ADS board common routines
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/seq_file.h>
+#include <linux/serial.h>
+#include <linux/module.h>
+
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/atomic.h>
+#include <asm/time.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/prom.h>
+#include <asm/open_pic.h>
+#include <asm/bootinfo.h>
+#include <asm/pci-bridge.h>
+#include <asm/mpc85xx.h>
+#include <asm/irq.h>
+#include <asm/immap_85xx.h>
+#include <asm/ocp.h>
+
+#include <mm/mmu_decl.h>
+
+#include <platforms/85xx/mpc85xx_ads_common.h>
+
+#ifndef CONFIG_PCI
+unsigned long isa_io_base = 0;
+unsigned long isa_mem_base = 0;
+#endif
+
+extern unsigned long total_memory;	/* in mm/init */
+
+unsigned char __res[sizeof (bd_t)];
+
+/* Internal interrupts are all Level Sensitive, and Positive Polarity */
+
+static u_char mpc85xx_ads_openpic_initsenses[] __initdata = {
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  0: L2 Cache */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  1: ECM */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  2: DDR DRAM */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  3: LBIU */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  4: DMA 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  5: DMA 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  6: DMA 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  7: DMA 3 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  8: PCI/PCI-X */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  9: RIO Inbound Port Write Error */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 10: RIO Doorbell Inbound */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 11: RIO Outbound Message */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 12: RIO Inbound Message */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 13: TSEC 0 Transmit */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 14: TSEC 0 Receive */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 15: Unused */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 16: Unused */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 17: Unused */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 18: TSEC 0 Receive/Transmit Error */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 19: TSEC 1 Transmit */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 20: TSEC 1 Receive */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 21: Unused */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 22: Unused */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 23: Unused */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 24: TSEC 1 Receive/Transmit Error */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 25: Fast Ethernet */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 26: DUART */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 27: I2C */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 28: Performance Monitor */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 29: Unused */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 30: CPM */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal 31: Unused */
+	0x0,						/* External  0: */
+#if defined(CONFIG_PCI)
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 1: PCI slot 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 2: PCI slot 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 3: PCI slot 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 4: PCI slot 3 */
+#else
+	0x0,				/* External  1: */
+	0x0,				/* External  2: */
+	0x0,				/* External  3: */
+	0x0,				/* External  4: */
+#endif
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 5: PHY */
+	0x0,				/* External  6: */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 7: PHY */
+	0x0,				/* External  8: */
+	0x0,				/* External  9: */
+	0x0,				/* External 10: */
+	0x0,				/* External 11: */
+};
+
+/* ************************************************************************ */
+int
+mpc85xx_ads_show_cpuinfo(struct seq_file *m)
+{
+	uint pvid, svid, phid1;
+	uint memsize = total_memory;
+	bd_t *binfo = (bd_t *) __res;
+	unsigned int freq;
+
+	/* get the core frequency */
+	freq = binfo->bi_intfreq;
+
+	pvid = mfspr(PVR);
+	svid = mfspr(SVR);
+
+	seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
+
+	switch (svid & 0xffff0000) {
+	case SVR_8540:
+		seq_printf(m, "Machine\t\t: mpc8540ads\n");
+		break;
+	case SVR_8560:
+		seq_printf(m, "Machine\t\t: mpc8560ads\n");
+		break;
+	default:
+		seq_printf(m, "Machine\t\t: unknown\n");
+		break;
+	}
+	seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000,
+		   freq % 1000000);
+	seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
+	seq_printf(m, "SVR\t\t: 0x%x\n", svid);
+
+	/* Display cpu Pll setting */
+	phid1 = mfspr(HID1);
+	seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
+
+	/* Display the amount of memory */
+	seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
+
+	return 0;
+}
+
+void __init
+mpc85xx_ads_init_IRQ(void)
+{
+	bd_t *binfo = (bd_t *) __res;
+	/* Determine the Physical Address of the OpenPIC regs */
+	phys_addr_t OpenPIC_PAddr =
+	    binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET;
+	OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE);
+	OpenPIC_InitSenses = mpc85xx_ads_openpic_initsenses;
+	OpenPIC_NumInitSenses = sizeof (mpc85xx_ads_openpic_initsenses);
+
+	/* Skip reserved space and internal sources */
+	openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200);
+	/* Map PIC IRQs 0-11 */
+	openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000);
+
+	/* we let openpic interrupts starting from an offset, to
+	 * leave space for cascading interrupts underneath.
+	 */
+	openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET);
+
+	return;
+}
+
+#ifdef CONFIG_PCI
+/*
+ * interrupt routing
+ */
+
+int
+mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+	static char pci_irq_table[][4] =
+	    /*
+	     * This is little evil, but works around the fact
+	     * that revA boards have IDSEL starting at 18
+	     * and others boards (older) start at 12
+	     *
+	     *      PCI IDSEL/INTPIN->INTLINE
+	     *       A      B      C      D
+	     */
+	{
+		{PIRQA, PIRQB, PIRQC, PIRQD},	/* IDSEL 2 */
+		{PIRQD, PIRQA, PIRQB, PIRQC},
+		{PIRQC, PIRQD, PIRQA, PIRQB},
+		{PIRQB, PIRQC, PIRQD, PIRQA},	/* IDSEL 5 */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{PIRQA, PIRQB, PIRQC, PIRQD},	/* IDSEL 12 */
+		{PIRQD, PIRQA, PIRQB, PIRQC},
+		{PIRQC, PIRQD, PIRQA, PIRQB},
+		{PIRQB, PIRQC, PIRQD, PIRQA},	/* IDSEL 15 */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{PIRQA, PIRQB, PIRQC, PIRQD},	/* IDSEL 18 */
+		{PIRQD, PIRQA, PIRQB, PIRQC},
+		{PIRQC, PIRQD, PIRQA, PIRQB},
+		{PIRQB, PIRQC, PIRQD, PIRQA},	/* IDSEL 21 */
+	};
+
+	const long min_idsel = 2, max_idsel = 21, irqs_per_slot = 4;
+	return PCI_IRQ_TABLE_LOOKUP;
+}
+
+int
+mpc85xx_exclude_device(u_char bus, u_char devfn)
+{
+	if (bus == 0 && PCI_SLOT(devfn) == 0)
+		return PCIBIOS_DEVICE_NOT_FOUND;
+	else
+		return PCIBIOS_SUCCESSFUL;
+}
+
+#endif /* CONFIG_PCI */
--- diff/arch/ppc/platforms/85xx/mpc85xx_ads_common.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/mpc85xx_ads_common.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,50 @@
+/*
+ * arch/ppc/platforms/85xx/mpc85xx_ads_common.h
+ *
+ * MPC85XX ADS common board definitions
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+
+#ifndef __MACH_MPC85XX_ADS_H__
+#define __MACH_MPC85XX_ADS_H__
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/seq_file.h>
+#include <asm/ppcboot.h>
+
+#define BOARD_CCSRBAR		((uint)0xe0000000)
+#define BCSR_ADDR		((uint)0xf8000000)
+#define BCSR_SIZE		((uint)(32 * 1024))
+
+extern int mpc85xx_ads_show_cpuinfo(struct seq_file *m);
+extern void mpc85xx_ads_init_IRQ(void) __init;
+extern void mpc85xx_ads_map_io(void) __init;
+
+/* PCI interrupt controller */
+#define PIRQA		MPC85xx_IRQ_EXT1
+#define PIRQB		MPC85xx_IRQ_EXT2
+#define PIRQC		MPC85xx_IRQ_EXT3
+#define PIRQD		MPC85xx_IRQ_EXT4
+
+#define MPC85XX_PCI1_LOWER_IO	0x00000000
+#define MPC85XX_PCI1_UPPER_IO	0x00ffffff
+
+#define MPC85XX_PCI1_LOWER_MEM	0x80000000
+#define MPC85XX_PCI1_UPPER_MEM	0x9fffffff
+
+#define MPC85XX_PCI1_IO_BASE	0xe2000000
+#define MPC85XX_PCI1_MEM_OFFSET	0x00000000
+
+#define MPC85XX_PCI1_IO_SIZE	0x01000000
+
+#endif				/* __MACH_MPC85XX_ADS_H__ */
--- diff/arch/ppc/platforms/85xx/sbc8560.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/sbc8560.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,249 @@
+/*
+ * arch/ppc/platforms/85xx/sbc8560.c
+ * 
+ * Wind River SBC8560 board specific routines
+ * 
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ * 
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/seq_file.h>
+#include <linux/root_dev.h>
+#include <linux/serial.h>
+#include <linux/tty.h>	/* for linux/serial_core.h */
+#include <linux/serial_core.h>
+#include <linux/module.h>
+
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/atomic.h>
+#include <asm/time.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/prom.h>
+#include <asm/open_pic.h>
+#include <asm/bootinfo.h>
+#include <asm/pci-bridge.h>
+#include <asm/mpc85xx.h>
+#include <asm/irq.h>
+#include <asm/immap_85xx.h>
+#include <asm/kgdb.h>
+#include <asm/ocp.h>
+#include <mm/mmu_decl.h>
+
+#include <syslib/ppc85xx_common.h>
+#include <syslib/ppc85xx_setup.h>
+
+struct ocp_gfar_data mpc85xx_tsec1_def = {
+	.interruptTransmit = MPC85xx_IRQ_TSEC1_TX,
+	.interruptError = MPC85xx_IRQ_TSEC1_ERROR,
+	.interruptReceive = MPC85xx_IRQ_TSEC1_RX,
+	.interruptPHY = MPC85xx_IRQ_EXT6,
+	.flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR | GFAR_HAS_PHY_INTR),
+	.phyid = 25,
+	.phyregidx = 0,
+};
+
+struct ocp_gfar_data mpc85xx_tsec2_def = {
+	.interruptTransmit = MPC85xx_IRQ_TSEC2_TX,
+	.interruptError = MPC85xx_IRQ_TSEC2_ERROR,
+	.interruptReceive = MPC85xx_IRQ_TSEC2_RX,
+	.interruptPHY = MPC85xx_IRQ_EXT7,
+	.flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR | GFAR_HAS_PHY_INTR),
+	.phyid = 26,
+	.phyregidx = 0,
+};
+
+struct ocp_fs_i2c_data mpc85xx_i2c1_def = {
+	.flags = FS_I2C_SEPARATE_DFSRR,
+};
+
+
+#ifdef CONFIG_SERIAL_8250
+static void __init
+sbc8560_early_serial_map(void)
+{
+        struct uart_port uart_req;
+ 
+        /* Setup serial port access */
+        memset(&uart_req, 0, sizeof (uart_req));
+	uart_req.irq = MPC85xx_IRQ_EXT9;
+	uart_req.flags = STD_COM_FLAGS;
+	uart_req.uartclk = BASE_BAUD * 16;
+        uart_req.iotype = SERIAL_IO_MEM;
+        uart_req.mapbase = UARTA_ADDR;
+        uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART0_SIZE);
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+        gen550_init(0, &uart_req);
+#endif
+ 
+        if (early_serial_setup(&uart_req) != 0)
+                printk("Early serial init of port 0 failed\n");
+ 
+        /* Assume early_serial_setup() doesn't modify uart_req */
+	uart_req.line = 1;
+        uart_req.mapbase = UARTB_ADDR;
+        uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART1_SIZE);
+	uart_req.irq = MPC85xx_IRQ_EXT10;
+ 
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+        gen550_init(1, &uart_req);
+#endif
+ 
+        if (early_serial_setup(&uart_req) != 0)
+                printk("Early serial init of port 1 failed\n");
+}
+#endif
+
+/* ************************************************************************
+ *
+ * Setup the architecture
+ *
+ */
+static void __init
+sbc8560_setup_arch(void)
+{
+	struct ocp_def *def;
+	struct ocp_gfar_data *einfo;
+	bd_t *binfo = (bd_t *) __res;
+	unsigned int freq;
+
+	/* get the core frequency */
+	freq = binfo->bi_intfreq;
+
+	if (ppc_md.progress)
+		ppc_md.progress("sbc8560_setup_arch()", 0);
+
+	/* Set loops_per_jiffy to a half-way reasonable value,
+	   for use until calibrate_delay gets called. */
+	loops_per_jiffy = freq / HZ;
+
+#ifdef CONFIG_PCI
+	/* setup PCI host bridges */
+	mpc85xx_setup_hose();
+#endif
+#ifdef CONFIG_DUMMY_CONSOLE
+	conswitchp = &dummy_con;
+#endif
+#ifdef CONFIG_SERIAL_8250
+	sbc8560_early_serial_map();
+#endif
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
+	/* Invalidate the entry we stole earlier the serial ports
+	 * should be properly mapped */ 
+	invalidate_tlbcam_entry(NUM_TLBCAMS - 1);
+#endif
+
+	/* Set up MAC addresses for the Ethernet devices */
+	def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 0);
+	if (def) {
+		einfo = (struct ocp_gfar_data *) def->additions;
+		memcpy(einfo->mac_addr, binfo->bi_enetaddr, 6);
+	}
+
+	def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 1);
+	if (def) {
+		einfo = (struct ocp_gfar_data *) def->additions;
+		memcpy(einfo->mac_addr, binfo->bi_enet1addr, 6);
+	}
+
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (initrd_start)
+		ROOT_DEV = Root_RAM0;
+	else
+#endif
+#ifdef  CONFIG_ROOT_NFS
+		ROOT_DEV = Root_NFS;
+#else
+		ROOT_DEV = Root_HDA1;
+#endif
+
+	ocp_for_each_device(mpc85xx_update_paddr_ocp, &(binfo->bi_immr_base));
+}
+
+/* ************************************************************************ */
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	/* parse_bootinfo must always be called first */
+	parse_bootinfo(find_bootinfo());
+
+	/*
+	 * If we were passed in a board information, copy it into the
+	 * residual data area.
+	 */
+	if (r3) {
+		memcpy((void *) __res, (void *) (r3 + KERNELBASE),
+		       sizeof (bd_t));
+	}
+
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
+	/* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */
+	settlbcam(NUM_TLBCAMS - 1, UARTA_ADDR,
+		  UARTA_ADDR, 0x1000, _PAGE_IO, 0);
+#endif
+
+#if defined(CONFIG_BLK_DEV_INITRD)
+	/*
+	 * If the init RAM disk has been configured in, and there's a valid
+	 * starting address for it, set it up.
+	 */
+	if (r4) {
+		initrd_start = r4 + KERNELBASE;
+		initrd_end = r5 + KERNELBASE;
+	}
+#endif				/* CONFIG_BLK_DEV_INITRD */
+
+	/* Copy the kernel command line arguments to a safe place. */
+
+	if (r6) {
+		*(char *) (r7 + KERNELBASE) = 0;
+		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
+	}
+
+	/* setup the PowerPC module struct */
+	ppc_md.setup_arch = sbc8560_setup_arch;
+	ppc_md.show_cpuinfo = sbc8560_show_cpuinfo;
+
+	ppc_md.init_IRQ = sbc8560_init_IRQ;
+	ppc_md.get_irq = openpic_get_irq;
+
+	ppc_md.restart = mpc85xx_restart;
+	ppc_md.power_off = mpc85xx_power_off;
+	ppc_md.halt = mpc85xx_halt;
+
+	ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory;
+
+	ppc_md.time_init = NULL;
+	ppc_md.set_rtc_time = NULL;
+	ppc_md.get_rtc_time = NULL;
+	ppc_md.calibrate_decr = mpc85xx_calibrate_decr;
+
+#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
+	ppc_md.progress = gen550_progress;
+#endif	/* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
+
+	if (ppc_md.progress)
+		ppc_md.progress("sbc8560_init(): exit", 0);
+}
--- diff/arch/ppc/platforms/85xx/sbc8560.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/sbc8560.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,48 @@
+/*
+ * arch/ppc/platforms/85xx/sbc8560.h
+ *
+ * Wind River SBC8560 board definitions
+ *
+ * Copyright 2003 Motorola Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+ 
+#ifndef __MACH_SBC8560_H__
+#define __MACH_SBC8560_H__
+ 
+#include <linux/config.h>
+#include <linux/serial.h>
+#include <platforms/85xx/sbc85xx.h>
+ 
+#ifdef CONFIG_SERIAL_MANY_PORTS
+#define RS_TABLE_SIZE  64
+#else
+#define RS_TABLE_SIZE  2
+#endif
+ 
+/* Rate for the 1.8432 Mhz clock for the onboard serial chip */
+#define BASE_BAUD ( 1843200 / 16 )
+ 
+#ifdef CONFIG_SERIAL_DETECT_IRQ
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
+#else
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
+#endif
+ 
+#define STD_SERIAL_PORT_DFNS \
+        { 0, BASE_BAUD, UARTA_ADDR, MPC85xx_IRQ_EXT9, STD_COM_FLAGS, /* ttyS0 */ \
+                iomem_base: (u8 *)UARTA_ADDR,                       \
+                io_type: SERIAL_IO_MEM },                                 \
+        { 0, BASE_BAUD, UARTB_ADDR, MPC85xx_IRQ_EXT10, STD_COM_FLAGS, /* ttyS1 */ \
+                iomem_base: (u8 *)UARTB_ADDR,                       \
+                io_type: SERIAL_IO_MEM },
+ 
+#define SERIAL_PORT_DFNS \
+        STD_SERIAL_PORT_DFNS
+ 
+#endif /* __MACH_SBC8560_H__ */
--- diff/arch/ppc/platforms/85xx/sbc85xx.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/sbc85xx.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,215 @@
+/*
+ * arch/ppc/platform/85xx/sbc85xx.c
+ * 
+ * WindRiver PowerQUICC III SBC85xx board common routines
+ *
+ * Copyright 2002, 2003 Motorola Inc.
+ * Copyright 2004 Red Hat, Inc.
+ * 
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/seq_file.h>
+#include <linux/serial.h>
+#include <linux/module.h>
+
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/atomic.h>
+#include <asm/time.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/prom.h>
+#include <asm/open_pic.h>
+#include <asm/bootinfo.h>
+#include <asm/pci-bridge.h>
+#include <asm/mpc85xx.h>
+#include <asm/irq.h>
+#include <asm/immap_85xx.h>
+#include <asm/ocp.h>
+
+#include <mm/mmu_decl.h>
+
+#include <platforms/85xx/sbc85xx.h>
+
+unsigned char __res[sizeof (bd_t)];
+
+#ifndef CONFIG_PCI
+unsigned long isa_io_base = 0;
+unsigned long isa_mem_base = 0;
+unsigned long pci_dram_offset = 0;
+#endif
+
+extern unsigned long total_memory;	/* in mm/init */
+
+/* Internal interrupts are all Level Sensitive, and Positive Polarity */
+
+static u_char sbc8560_openpic_initsenses[] __initdata = {
+	(IRQ_POLARITY_POSITIVE),	/* Internal  0: L2 Cache */
+	(IRQ_POLARITY_POSITIVE),	/* Internal  1: ECM */
+	(IRQ_POLARITY_POSITIVE),	/* Internal  2: DDR DRAM */
+	(IRQ_POLARITY_POSITIVE),	/* Internal  3: LBIU */
+	(IRQ_POLARITY_POSITIVE),	/* Internal  4: DMA 0 */
+	(IRQ_POLARITY_POSITIVE),	/* Internal  5: DMA 1 */
+	(IRQ_POLARITY_POSITIVE),	/* Internal  6: DMA 2 */
+	(IRQ_POLARITY_POSITIVE),	/* Internal  7: DMA 3 */
+	(IRQ_POLARITY_POSITIVE),	/* Internal  8: PCI/PCI-X */
+	(IRQ_POLARITY_POSITIVE),	/* Internal  9: RIO Inbound Port Write Error */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 10: RIO Doorbell Inbound */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 11: RIO Outbound Message */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 12: RIO Inbound Message */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 13: TSEC 0 Transmit */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 14: TSEC 0 Receive */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 15: Unused */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 16: Unused */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 17: Unused */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 18: TSEC 0 Receive/Transmit Error */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 19: TSEC 1 Transmit */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 20: TSEC 1 Receive */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 21: Unused */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 22: Unused */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 23: Unused */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 24: TSEC 1 Receive/Transmit Error */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 25: Fast Ethernet */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 26: DUART */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 27: I2C */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 28: Performance Monitor */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 29: Unused */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 30: CPM */
+	(IRQ_POLARITY_POSITIVE),	/* Internal 31: Unused */
+	0x0,				/* External  0: */
+	0x0,				/* External  1: */
+#if defined(CONFIG_PCI)
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 2: PCI slot 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 3: PCI slot 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 4: PCI slot 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 5: PCI slot 3 */
+#else
+	0x0,				/* External  2: */
+	0x0,				/* External  3: */
+	0x0,				/* External  4: */
+	0x0,				/* External  5: */
+#endif
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 6: PHY */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* External 7: PHY */
+	0x0,				/* External  8: */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* External 9: PHY */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* External 10: PHY */
+	0x0,				/* External 11: */
+};
+
+/* ************************************************************************ */
+int
+sbc8560_show_cpuinfo(struct seq_file *m)
+{
+	uint pvid, svid, phid1;
+	uint memsize = total_memory;
+	bd_t *binfo = (bd_t *) __res;
+	unsigned int freq;
+
+	/* get the core frequency */
+	freq = binfo->bi_intfreq;
+
+	pvid = mfspr(PVR);
+	svid = mfspr(SVR);
+
+	seq_printf(m, "Vendor\t\t: Wind River\n");
+
+	switch (svid & 0xffff0000) {
+	case SVR_8540:
+		seq_printf(m, "Machine\t\t: hhmmm, this board isn't made yet!\n");
+		break;
+	case SVR_8560:
+		seq_printf(m, "Machine\t\t: SBC8560\n");
+		break;
+	default:
+		seq_printf(m, "Machine\t\t: unknown\n");
+		break;
+	}
+	seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000,
+		   freq % 1000000);
+	seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
+	seq_printf(m, "SVR\t\t: 0x%x\n", svid);
+
+	/* Display cpu Pll setting */
+	phid1 = mfspr(HID1);
+	seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
+
+	/* Display the amount of memory */
+	seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
+
+	return 0;
+}
+
+void __init
+sbc8560_init_IRQ(void)
+{
+	bd_t *binfo = (bd_t *) __res;
+	/* Determine the Physical Address of the OpenPIC regs */
+	phys_addr_t OpenPIC_PAddr =
+	    binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET;
+	OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE);
+	OpenPIC_InitSenses = sbc8560_openpic_initsenses;
+	OpenPIC_NumInitSenses = sizeof (sbc8560_openpic_initsenses);
+
+	/* Skip reserved space and internal sources */
+	openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200);
+	/* Map PIC IRQs 0-11 */
+	openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000);
+
+	/* we let openpic interrupts starting from an offset, to 
+	 * leave space for cascading interrupts underneath.
+	 */
+	openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET);
+
+	return;
+}
+
+/*
+ * interrupt routing
+ */
+
+#ifdef CONFIG_PCI
+int mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel,
+		    unsigned char pin)
+{
+	static char pci_irq_table[][4] =
+	    /*
+	     *      PCI IDSEL/INTPIN->INTLINE
+	     *        A      B      C      D
+	     */
+	{
+		{PIRQA, PIRQB, PIRQC, PIRQD},
+		{PIRQD, PIRQA, PIRQB, PIRQC},
+		{PIRQC, PIRQD, PIRQA, PIRQB},
+		{PIRQB, PIRQC, PIRQD, PIRQA},
+	};
+
+	const long min_idsel = 12, max_idsel = 15, irqs_per_slot = 4;
+	return PCI_IRQ_TABLE_LOOKUP;
+}
+
+int mpc85xx_exclude_device(u_char bus, u_char devfn)
+{
+	if (bus == 0 && PCI_SLOT(devfn) == 0)
+		return PCIBIOS_DEVICE_NOT_FOUND;
+	else
+		return PCIBIOS_SUCCESSFUL;
+}
+#endif /* CONFIG_PCI */
--- diff/arch/ppc/platforms/85xx/sbc85xx.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/85xx/sbc85xx.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,55 @@
+/*
+ * arch/ppc/platforms/85xx/sbc85xx.h
+ *
+ * WindRiver PowerQUICC III SBC85xx common board definitions
+ *
+ * Copyright 2003 Motorola Inc.
+ * Copyright 2004 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+
+#ifndef __PLATFORMS_85XX_SBC85XX_H__
+#define __PLATFORMS_85XX_SBC85XX_H__
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/seq_file.h>
+#include <asm/ppcboot.h>
+
+#define BOARD_CCSRBAR		((uint)0xff700000)
+#define CCSRBAR_SIZE		((uint)1024*1024)
+
+#define BCSR_ADDR		((uint)0xfc000000)
+#define BCSR_SIZE		((uint)(16 * 1024 * 1024))
+
+#define UARTA_ADDR		(BCSR_ADDR + 0x00700000)
+#define UARTB_ADDR		(BCSR_ADDR + 0x00800000)
+#define RTC_DEVICE_ADDR		(BCSR_ADDR + 0x00900000)
+#define EEPROM_ADDR		(BCSR_ADDR + 0x00b00000)
+
+extern int  sbc8560_show_cpuinfo(struct seq_file *m);
+extern void sbc8560_init_IRQ(void) __init; 
+
+/* PCI interrupt controller */
+#define PIRQA		MPC85xx_IRQ_EXT1
+#define PIRQB		MPC85xx_IRQ_EXT2
+#define PIRQC		MPC85xx_IRQ_EXT3
+#define PIRQD		MPC85xx_IRQ_EXT4
+
+#define MPC85XX_PCI1_LOWER_IO	0x00000000
+#define MPC85XX_PCI1_UPPER_IO	0x00ffffff
+
+#define MPC85XX_PCI1_LOWER_MEM	0x80000000
+#define MPC85XX_PCI1_UPPER_MEM	0x9fffffff
+
+#define MPC85XX_PCI1_IO_BASE	0xe2000000
+#define MPC85XX_PCI1_MEM_OFFSET	0x00000000
+
+#define MPC85XX_PCI1_IO_SIZE	0x01000000
+
+#endif /* __PLATFORMS_85XX_SBC85XX_H__ */
--- diff/arch/ppc/platforms/pq2ads.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/pq2ads.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,90 @@
+/*
+ * A collection of structures, addresses, and values associated with
+ * the Motorola MPC8260ADS/MPC8266ADS-PCI boards.
+ * Copied from the RPX-Classic and SBS8260 stuff.
+ *
+ * Copyright (c) 2001 Dan Malek (dan@mvista.com)
+ */
+#ifdef __KERNEL__
+#ifndef __MACH_ADS8260_DEFS
+#define __MACH_ADS8260_DEFS
+
+#include <linux/config.h>
+
+#include <asm/ppcboot.h>
+
+/* Memory map is configured by the PROM startup.
+ * We just map a few things we need.  The CSR is actually 4 byte-wide
+ * registers that can be accessed as 8-, 16-, or 32-bit values.
+ */
+#define CPM_MAP_ADDR		((uint)0xf0000000)
+#define BCSR_ADDR		((uint)0xf4500000)
+#define BCSR_SIZE		((uint)(32 * 1024))
+
+#define BOOTROM_RESTART_ADDR	((uint)0xff000104)
+
+/* The ADS8260 has 16, 32-bit wide control/status registers, accessed
+ * only on word boundaries.
+ * Not all are used (yet), or are interesting to us (yet).
+ */
+
+/* Things of interest in the CSR.
+*/
+#define BCSR0_LED0		((uint)0x02000000)	/* 0 == on */
+#define BCSR0_LED1		((uint)0x01000000)	/* 0 == on */
+#define BCSR1_FETHIEN		((uint)0x08000000)	/* 0 == enable */
+#define BCSR1_FETH_RST		((uint)0x04000000)	/* 0 == reset */
+#define BCSR1_RS232_EN1		((uint)0x02000000)	/* 0 == enable */
+#define BCSR1_RS232_EN2		((uint)0x01000000)	/* 0 == enable */
+
+#define PHY_INTERRUPT	SIU_INT_IRQ7
+
+#ifdef CONFIG_PCI
+/* PCI interrupt controller */
+#define PCI_INT_STAT_REG	0xF8200000
+#define PCI_INT_MASK_REG	0xF8200004
+#define PIRQA			(NR_SIU_INTS + 0)
+#define PIRQB			(NR_SIU_INTS + 1)
+#define PIRQC			(NR_SIU_INTS + 2)
+#define PIRQD			(NR_SIU_INTS + 3)
+
+/*
+ * PCI memory map definitions for MPC8266ADS-PCI.
+ *
+ * processor view
+ *	local address		PCI address		target
+ *	0x80000000-0x9FFFFFFF	0x80000000-0x9FFFFFFF	PCI mem with prefetch
+ *	0xA0000000-0xBFFFFFFF	0xA0000000-0xBFFFFFFF	PCI mem w/o prefetch
+ *	0xF4000000-0xF7FFFFFF	0x00000000-0x03FFFFFF	PCI IO
+ *
+ * PCI master view
+ *	local address		PCI address		target
+ *	0x00000000-0x1FFFFFFF	0x00000000-0x1FFFFFFF	MPC8266 local memory
+ */
+
+/* window for a PCI master to access MPC8266 memory */
+#define PCI_SLV_MEM_LOCAL	0x00000000	/* Local base */
+#define PCI_SLV_MEM_BUS		0x00000000	/* PCI base */
+
+/* window for the processor to access PCI memory with prefetching */
+#define PCI_MSTR_MEM_LOCAL	0x80000000	/* Local base */
+#define PCI_MSTR_MEM_BUS	0x80000000	/* PCI base   */
+#define PCI_MSTR_MEM_SIZE	0x20000000	/* 512MB */
+
+/* window for the processor to access PCI memory without prefetching */
+#define PCI_MSTR_MEMIO_LOCAL	0xA0000000	/* Local base */
+#define PCI_MSTR_MEMIO_BUS	0xA0000000	/* PCI base   */
+#define PCI_MSTR_MEMIO_SIZE	0x20000000	/* 512MB */
+
+/* window for the processor to access PCI I/O */
+#define PCI_MSTR_IO_LOCAL	0xF4000000	/* Local base */
+#define PCI_MSTR_IO_BUS         0x00000000	/* PCI base   */
+#define PCI_MSTR_IO_SIZE        0x04000000	/* 64MB */
+
+#define _IO_BASE		PCI_MSTR_IO_LOCAL
+#define _ISA_MEM_BASE		PCI_MSTR_MEMIO_LOCAL
+#define PCI_DRAM_OFFSET		PCI_SLV_MEM_BUS
+#endif /* CONFIG_PCI */
+
+#endif /* __MACH_ADS8260_DEFS */
+#endif /* __KERNEL__ */
--- diff/arch/ppc/platforms/pq2ads_setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/platforms/pq2ads_setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,66 @@
+/*
+ * arch/ppc/platforms/pq2ads_setup.c
+ *
+ * PQ2ADS platform support
+ *
+ * Author: Kumar Gala <kumar.gala@freescale.com>
+ * Derived from: est8260_setup.c by Allen Curtis
+ *
+ * Copyright 2004 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/seq_file.h>
+
+#include <asm/mpc8260.h>
+#include <asm/machdep.h>
+
+static void (*callback_setup_arch)(void);
+
+extern unsigned char __res[sizeof(bd_t)];
+
+extern void m8260_init(unsigned long r3, unsigned long r4,
+	unsigned long r5, unsigned long r6, unsigned long r7);
+
+static int
+pq2ads_show_cpuinfo(struct seq_file *m)
+{
+	bd_t	*binfo = (bd_t *)__res;
+
+	seq_printf(m, "vendor\t\t: Motorola\n"
+		      "machine\t\t: PQ2 ADS PowerPC\n"
+		      "\n"
+		      "mem size\t\t: 0x%08lx\n"
+		      "console baud\t\t: %ld\n"
+		      "\n",
+		      binfo->bi_memsize,
+		      binfo->bi_baudrate);
+	return 0;
+}
+
+static void __init
+pq2ads_setup_arch(void)
+{
+	printk("PQ2 ADS Port\n");
+	callback_setup_arch();
+        *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2;
+}
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	/* Generic 8260 platform initialization */
+	m8260_init(r3, r4, r5, r6, r7);
+
+	/* Anything special for this platform */
+	ppc_md.show_cpuinfo	= pq2ads_show_cpuinfo;
+
+	callback_setup_arch	= ppc_md.setup_arch;
+	ppc_md.setup_arch	= pq2ads_setup_arch;
+}
--- diff/arch/ppc/syslib/cpm2_common.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/cpm2_common.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,205 @@
+/*
+ * General Purpose functions for the global management of the
+ * 8260 Communication Processor Module.
+ * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
+ * Copyright (c) 2000 MontaVista Software, Inc (source@mvista.com)
+ *	2.3.99 Updates
+ *
+ * In addition to the individual control of the communication
+ * channels, there are a few functions that globally affect the
+ * communication processor.
+ *
+ * Buffer descriptors must be allocated from the dual ported memory
+ * space.  The allocator for that is here.  When the communication
+ * process is reset, we reclaim the memory available.  There is
+ * currently no deallocator for this memory.
+ */
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/param.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/interrupt.h>
+#include <linux/bootmem.h>
+#include <linux/module.h>
+#include <asm/irq.h>
+#include <asm/mpc8260.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/immap_cpm2.h>
+#include <asm/cpm2.h>
+#include <asm/rheap.h>
+
+static void cpm2_dpinit(void);
+cpm_cpm2_t	*cpmp;		/* Pointer to comm processor space */
+
+/* We allocate this here because it is used almost exclusively for
+ * the communication processor devices.
+ */
+cpm2_map_t *cpm2_immr;
+
+void
+cpm2_reset(void)
+{
+	cpm2_immr = (cpm2_map_t *)CPM_MAP_ADDR;
+
+	/* Reclaim the DP memory for our use.
+	 */
+	cpm2_dpinit();
+
+	/* Tell everyone where the comm processor resides.
+	 */
+	cpmp = &cpm2_immr->im_cpm;
+}
+
+/* Set a baud rate generator.  This needs lots of work.  There are
+ * eight BRGs, which can be connected to the CPM channels or output
+ * as clocks.  The BRGs are in two different block of internal
+ * memory mapped space.
+ * The baud rate clock is the system clock divided by something.
+ * It was set up long ago during the initial boot phase and is
+ * is given to us.
+ * Baud rate clocks are zero-based in the driver code (as that maps
+ * to port numbers).  Documentation uses 1-based numbering.
+ */
+#define BRG_INT_CLK	(((bd_t *)__res)->bi_brgfreq)
+#define BRG_UART_CLK	(BRG_INT_CLK/16)
+
+/* This function is used by UARTS, or anything else that uses a 16x
+ * oversampled clock.
+ */
+void
+cpm2_setbrg(uint brg, uint rate)
+{
+	volatile uint	*bp;
+
+	/* This is good enough to get SMCs running.....
+	*/
+	if (brg < 4) {
+		bp = (uint *)&cpm2_immr->im_brgc1;
+	}
+	else {
+		bp = (uint *)&cpm2_immr->im_brgc5;
+		brg -= 4;
+	}
+	bp += brg;
+	*bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN;
+}
+
+/* This function is used to set high speed synchronous baud rate
+ * clocks.
+ */
+void
+cpm2_fastbrg(uint brg, uint rate, int div16)
+{
+	volatile uint	*bp;
+
+	if (brg < 4) {
+		bp = (uint *)&cpm2_immr->im_brgc1;
+	}
+	else {
+		bp = (uint *)&cpm2_immr->im_brgc5;
+		brg -= 4;
+	}
+	bp += brg;
+	*bp = ((BRG_INT_CLK / rate) << 1) | CPM_BRG_EN;
+	if (div16)
+		*bp |= CPM_BRG_DIV16;
+}
+
+/*
+ * dpalloc / dpfree bits.
+ */
+static spinlock_t cpm_dpmem_lock;
+/* 16 blocks should be enough to satisfy all requests
+ * until the memory subsystem goes up... */
+static rh_block_t cpm_boot_dpmem_rh_block[16];
+static rh_info_t cpm_dpmem_info;
+
+static void cpm2_dpinit(void)
+{
+	void *dprambase = &((cpm2_map_t *)CPM_MAP_ADDR)->im_dprambase;
+
+	spin_lock_init(&cpm_dpmem_lock);
+
+	/* initialize the info header */
+	rh_init(&cpm_dpmem_info, 1,
+			sizeof(cpm_boot_dpmem_rh_block) /
+			sizeof(cpm_boot_dpmem_rh_block[0]),
+			cpm_boot_dpmem_rh_block);
+
+	/* Attach the usable dpmem area */
+	/* XXX: This is actually crap. CPM_DATAONLY_BASE and
+	 * CPM_DATAONLY_SIZE is only a subset of the available dpram. It
+	 * varies with the processor and the microcode patches activated.
+	 * But the following should be at least safe.
+	 */
+	rh_attach_region(&cpm_dpmem_info, dprambase + CPM_DATAONLY_BASE,
+			CPM_DATAONLY_SIZE);
+}
+
+/* This function used to return an index into the DPRAM area.
+ * Now it returns the actuall physical address of that area.
+ * use cpm2_dpram_offset() to get the index
+ */
+void *cpm2_dpalloc(uint size, uint align)
+{
+	void *start;
+	unsigned long flags;
+
+	spin_lock_irqsave(&cpm_dpmem_lock, flags);
+	cpm_dpmem_info.alignment = align;
+	start = rh_alloc(&cpm_dpmem_info, size, "commproc");
+	spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
+
+	return start;
+}
+EXPORT_SYMBOL(cpm2_dpalloc);
+
+int cpm2_dpfree(void *addr)
+{
+	int ret;
+	unsigned long flags;
+
+	spin_lock_irqsave(&cpm_dpmem_lock, flags);
+	ret = rh_free(&cpm_dpmem_info, addr);
+	spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
+
+	return ret;
+}
+EXPORT_SYMBOL(cpm2_dpfree);
+
+/* not sure if this is ever needed */
+void *cpm2_dpalloc_fixed(void *addr, uint size, uint align)
+{
+	void *start;
+	unsigned long flags;
+
+	spin_lock_irqsave(&cpm_dpmem_lock, flags);
+	cpm_dpmem_info.alignment = align;
+	start = rh_alloc_fixed(&cpm_dpmem_info, addr, size, "commproc");
+	spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
+
+	return start;
+}
+EXPORT_SYMBOL(cpm2_dpalloc_fixed);
+
+void cpm2_dpdump(void)
+{
+	rh_dump(&cpm_dpmem_info);
+}
+EXPORT_SYMBOL(cpm2_dpdump);
+
+uint cpm2_dpram_offset(void *addr)
+{
+	return (uint)((u_char *)addr -
+			((uint)((cpm2_map_t *)CPM_MAP_ADDR)->im_dprambase));
+}
+EXPORT_SYMBOL(cpm2_dpram_offset);
+
+void *cpm2_dpram_addr(int offset)
+{
+	return (void *)&((cpm2_map_t *)CPM_MAP_ADDR)->im_dprambase[offset];
+}
+EXPORT_SYMBOL(cpm2_dpram_addr);
--- diff/arch/ppc/syslib/cpm2_pic.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/cpm2_pic.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,131 @@
+#include <linux/stddef.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <asm/irq.h>
+#include <asm/immap_cpm2.h>
+#include <asm/mpc8260.h>
+#include "cpm2_pic.h"
+
+/* The CPM2 internal interrupt controller.  It is usually
+ * the only interrupt controller.
+ * There are two 32-bit registers (high/low) for up to 64
+ * possible interrupts.
+ *
+ * Now, the fun starts.....Interrupt Numbers DO NOT MAP
+ * in a simple arithmetic fashion to mask or pending registers.
+ * That is, interrupt 4 does not map to bit position 4.
+ * We create two tables, indexed by vector number, to indicate
+ * which register to use and which bit in the register to use.
+ */
+static	u_char	irq_to_siureg[] = {
+	1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1,
+	0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0,
+	1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1,
+	0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static	u_char	irq_to_siubit[] = {
+	31, 16, 17, 18, 19, 20, 21, 22,
+	23, 24, 25, 26, 27, 28, 29, 30,
+	29, 30, 16, 17, 18, 19, 20, 21,
+	22, 23, 24, 25, 26, 27, 28, 31,
+	 0,  1,  2,  3,  4,  5,  6,  7,
+	 8,  9, 10, 11, 12, 13, 14, 15,
+	15, 14, 13, 12, 11, 10,  9,  8,
+	 7,  6,  5,  4,  3,  2,  1,  0
+};
+
+static void cpm2_mask_irq(unsigned int irq_nr)
+{
+	int	bit, word;
+	volatile uint	*simr;
+
+	bit = irq_to_siubit[irq_nr];
+	word = irq_to_siureg[irq_nr];
+
+	simr = &(cpm2_immr->im_intctl.ic_simrh);
+	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
+	simr[word] = ppc_cached_irq_mask[word];
+}
+
+static void cpm2_unmask_irq(unsigned int irq_nr)
+{
+	int	bit, word;
+	volatile uint	*simr;
+
+	bit = irq_to_siubit[irq_nr];
+	word = irq_to_siureg[irq_nr];
+
+	simr = &(cpm2_immr->im_intctl.ic_simrh);
+	ppc_cached_irq_mask[word] |= (1 << (31 - bit));
+	simr[word] = ppc_cached_irq_mask[word];
+}
+
+static void cpm2_mask_and_ack(unsigned int irq_nr)
+{
+	int	bit, word;
+	volatile uint	*simr, *sipnr;
+
+	bit = irq_to_siubit[irq_nr];
+	word = irq_to_siureg[irq_nr];
+
+	simr = &(cpm2_immr->im_intctl.ic_simrh);
+	sipnr = &(cpm2_immr->im_intctl.ic_sipnrh);
+	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
+	simr[word] = ppc_cached_irq_mask[word];
+	sipnr[word] = 1 << (31 - bit);
+}
+
+static void cpm2_end_irq(unsigned int irq_nr)
+{
+	int	bit, word;
+	volatile uint	*simr;
+
+	if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))
+			&& irq_desc[irq_nr].action) {
+
+		bit = irq_to_siubit[irq_nr];
+		word = irq_to_siureg[irq_nr];
+
+		simr = &(cpm2_immr->im_intctl.ic_simrh);
+		ppc_cached_irq_mask[word] |= (1 << (31 - bit));
+		simr[word] = ppc_cached_irq_mask[word];
+	}
+}
+
+struct hw_interrupt_type cpm2_pic = {
+	" CPM2 SIU  ",
+	NULL,
+	NULL,
+	cpm2_unmask_irq,
+	cpm2_mask_irq,
+	cpm2_mask_and_ack,
+	cpm2_end_irq,
+	0
+};
+
+
+int
+cpm2_get_irq(struct pt_regs *regs)
+{
+	int irq;
+        unsigned long bits;
+
+        /* For CPM2, read the SIVEC register and shift the bits down
+         * to get the irq number.         */
+        bits = cpm2_immr->im_intctl.ic_sivec;
+        irq = bits >> 26;
+
+	if (irq == 0)
+		return(-1);
+#if 0
+        irq += ppc8260_pic.irq_offset;
+#endif
+	return irq;
+}
+
--- diff/arch/ppc/syslib/cpm2_pic.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/cpm2_pic.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,13 @@
+#ifndef _PPC_KERNEL_CPM2_H
+#define _PPC_KERNEL_CPM2_H
+
+#include <linux/irq.h>
+
+extern struct hw_interrupt_type cpm2_pic;
+
+void cpm2_pic_init(void);
+void cpm2_do_IRQ(struct pt_regs *regs,
+                 int            cpu);
+int cpm2_get_irq(struct pt_regs *regs);
+
+#endif /* _PPC_KERNEL_CPM2_H */
--- diff/arch/ppc/syslib/m8260_pci.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/m8260_pci.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,194 @@
+/*
+ * (C) Copyright 2003
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * (C) Copyright 2004 Red Hat, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/delay.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/uaccess.h>
+#include <asm/machdep.h>
+#include <asm/pci-bridge.h>
+#include <asm/immap_cpm2.h>
+#include <asm/mpc8260.h>
+
+#include "m8260_pci.h"
+
+
+/* PCI bus configuration registers.
+ */
+
+static void __init m8260_setup_pci(struct pci_controller *hose)
+{
+	volatile cpm2_map_t *immap = cpm2_immr;
+	unsigned long pocmr;
+	u16 tempShort;
+
+#ifndef CONFIG_ATC 	/* already done in U-Boot */
+	/* 
+	 * Setting required to enable IRQ1-IRQ7 (SIUMCR [DPPC]), 
+	 * and local bus for PCI (SIUMCR [LBPC]).
+	 */
+	immap->im_siu_conf.siu_82xx.sc_siumcr = 0x00640000;
+#endif
+
+	/* Make PCI lowest priority */
+	/* Each 4 bits is a device bus request  and the MS 4bits 
+	   is highest priority */
+	/* Bus               4bit value 
+	   ---               ----------
+	   CPM high          0b0000
+	   CPM middle        0b0001
+	   CPM low           0b0010
+	   PCI reguest       0b0011
+	   Reserved          0b0100
+	   Reserved          0b0101
+	   Internal Core     0b0110
+	   External Master 1 0b0111
+	   External Master 2 0b1000
+	   External Master 3 0b1001
+	   The rest are reserved */
+	immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x61207893;
+
+	/* Park bus on core while modifying PCI Bus accesses */
+	immap->im_siu_conf.siu_82xx.sc_ppc_acr = 0x6;
+
+	/* 
+	 * Set up master window that allows the CPU to access PCI space. This 
+	 * window is set up using the first SIU PCIBR registers.
+	 */
+	immap->im_memctl.memc_pcimsk0 = MPC826x_PCI_MASK;
+	immap->im_memctl.memc_pcibr0 =	MPC826x_PCI_BASE | PCIBR_ENABLE;
+
+	/* Disable machine check on no response or target abort */
+	immap->im_pci.pci_emr = cpu_to_le32(0x1fe7);
+	/* Release PCI RST (by default the PCI RST signal is held low)  */
+	immap->im_pci.pci_gcr = cpu_to_le32(PCIGCR_PCI_BUS_EN);
+
+	/* give it some time */
+	mdelay(1);
+
+	/* 
+	 * Set up master window that allows the CPU to access PCI Memory (prefetch) 
+	 * space. This window is set up using the first set of Outbound ATU registers.
+	 */
+	immap->im_pci.pci_potar0 = cpu_to_le32(MPC826x_PCI_LOWER_MEM >> 12);
+	immap->im_pci.pci_pobar0 = cpu_to_le32((MPC826x_PCI_LOWER_MEM - MPC826x_PCI_MEM_OFFSET) >> 12);
+	pocmr = ((MPC826x_PCI_UPPER_MEM - MPC826x_PCI_LOWER_MEM) >> 12) ^ 0xfffff;
+	immap->im_pci.pci_pocmr0 = cpu_to_le32(pocmr | POCMR_ENABLE | POCMR_PREFETCH_EN);
+
+	/* 
+	 * Set up master window that allows the CPU to access PCI Memory (non-prefetch) 
+	 * space. This window is set up using the second set of Outbound ATU registers.
+	 */
+	immap->im_pci.pci_potar1 = cpu_to_le32(MPC826x_PCI_LOWER_MMIO >> 12);
+	immap->im_pci.pci_pobar1 = cpu_to_le32((MPC826x_PCI_LOWER_MMIO - MPC826x_PCI_MMIO_OFFSET) >> 12);
+	pocmr = ((MPC826x_PCI_UPPER_MMIO - MPC826x_PCI_LOWER_MMIO) >> 12) ^ 0xfffff;
+	immap->im_pci.pci_pocmr1 = cpu_to_le32(pocmr | POCMR_ENABLE);
+
+	/* 
+	 * Set up master window that allows the CPU to access PCI IO space. This window
+	 * is set up using the third set of Outbound ATU registers.
+	 */
+	immap->im_pci.pci_potar2 = cpu_to_le32(MPC826x_PCI_IO_BASE >> 12);
+	immap->im_pci.pci_pobar2 = cpu_to_le32(MPC826x_PCI_LOWER_IO >> 12);
+	pocmr = ((MPC826x_PCI_UPPER_IO - MPC826x_PCI_LOWER_IO) >> 12) ^ 0xfffff;
+	immap->im_pci.pci_pocmr2 = cpu_to_le32(pocmr | POCMR_ENABLE | POCMR_PCI_IO);
+
+	/* 
+	 * Set up slave window that allows PCI masters to access MPC826x local memory. 
+	 * This window is set up using the first set of Inbound ATU registers
+	 */
+
+	immap->im_pci.pci_pitar0 = cpu_to_le32(MPC826x_PCI_SLAVE_MEM_LOCAL >> 12);
+	immap->im_pci.pci_pibar0 = cpu_to_le32(MPC826x_PCI_SLAVE_MEM_BUS >> 12);
+	pocmr = ((MPC826x_PCI_SLAVE_MEM_SIZE-1) >> 12) ^ 0xfffff;
+	immap->im_pci.pci_picmr0 = cpu_to_le32(pocmr | PICMR_ENABLE | PICMR_PREFETCH_EN);
+
+	/* See above for description - puts PCI request as highest priority */
+	immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x03124567;
+
+	/* Park the bus on the PCI */
+	immap->im_siu_conf.siu_82xx.sc_ppc_acr = PPC_ACR_BUS_PARK_PCI;
+
+	/* Host mode - specify the bridge as a host-PCI bridge */
+	early_write_config_word(hose, 0, 0, PCI_CLASS_DEVICE, PCI_CLASS_BRIDGE_HOST);
+
+	/* Enable the host bridge to be a master on the PCI bus, and to act as a PCI memory target */
+	early_read_config_word(hose, 0, 0, PCI_COMMAND, &tempShort);
+	early_write_config_word(hose, 0, 0, PCI_COMMAND,
+				tempShort | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
+}
+
+void __init m8260_find_bridges(void)
+{
+	extern int pci_assign_all_busses;
+	struct pci_controller * hose;
+
+	pci_assign_all_busses = 1;
+
+	hose = pcibios_alloc_controller();
+
+	if (!hose)
+		return;
+
+	ppc_md.pci_swizzle = common_swizzle;
+
+	hose->first_busno = 0;
+	hose->bus_offset = 0;
+	hose->last_busno = 0xff;
+
+	setup_m8260_indirect_pci(hose, 
+				 (unsigned long)&cpm2_immr->im_pci.pci_cfg_addr,
+				 (unsigned long)&cpm2_immr->im_pci.pci_cfg_data);
+
+	m8260_setup_pci(hose);
+        hose->pci_mem_offset = MPC826x_PCI_MEM_OFFSET;
+
+        isa_io_base =
+                (unsigned long) ioremap(MPC826x_PCI_IO_BASE,
+                                        MPC826x_PCI_IO_SIZE);
+        hose->io_base_virt = (void *) isa_io_base;
+ 
+        /* setup resources */
+        pci_init_resource(&hose->mem_resources[0],
+			  MPC826x_PCI_LOWER_MEM,
+			  MPC826x_PCI_UPPER_MEM,
+			  IORESOURCE_MEM|IORESOURCE_PREFETCH, "PCI prefetchable memory");
+
+        pci_init_resource(&hose->mem_resources[1],
+			  MPC826x_PCI_LOWER_MMIO,
+			  MPC826x_PCI_UPPER_MMIO,
+			  IORESOURCE_MEM, "PCI memory");
+
+        pci_init_resource(&hose->io_resource,
+			  MPC826x_PCI_LOWER_IO,
+			  MPC826x_PCI_UPPER_IO,
+			  IORESOURCE_IO, "PCI I/O");
+}
--- diff/arch/ppc/syslib/m8260_pci.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/m8260_pci.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,75 @@
+
+#ifndef _PPC_KERNEL_M8260_PCI_H
+#define _PPC_KERNEL_M8260_PCI_H
+
+#include <asm/m8260_pci.h>
+
+/*
+ *   Local->PCI map (from CPU)                             controlled by
+ *   MPC826x master window
+ *
+ *   0x80000000 - 0xBFFFFFFF    Total CPU2PCI space        PCIBR0
+ *                       
+ *   0x80000000 - 0x9FFFFFFF    PCI Mem with prefetch      (Outbound ATU #1)
+ *   0xA0000000 - 0xAFFFFFFF    PCI Mem w/o  prefetch      (Outbound ATU #2)
+ *   0xB0000000 - 0xB0FFFFFF    32-bit PCI IO              (Outbound ATU #3)
+ *                      
+ *   PCI->Local map (from PCI)
+ *   MPC826x slave window                                  controlled by
+ *
+ *   0x00000000 - 0x07FFFFFF    MPC826x local memory       (Inbound ATU #1)
+ */
+
+/* 
+ * Slave window that allows PCI masters to access MPC826x local memory. 
+ * This window is set up using the first set of Inbound ATU registers
+ */
+
+#ifndef MPC826x_PCI_SLAVE_MEM_LOCAL
+#define MPC826x_PCI_SLAVE_MEM_LOCAL	(((struct bd_info *)__res)->bi_memstart)
+#define MPC826x_PCI_SLAVE_MEM_BUS	(((struct bd_info *)__res)->bi_memstart)
+#define MPC826x_PCI_SLAVE_MEM_SIZE	(((struct bd_info *)__res)->bi_memsize)
+#endif
+
+/* 
+ * This is the window that allows the CPU to access PCI address space.
+ * It will be setup with the SIU PCIBR0 register. All three PCI master
+ * windows, which allow the CPU to access PCI prefetch, non prefetch,
+ * and IO space (see below), must all fit within this window. 
+ */
+#ifndef MPC826x_PCI_BASE
+#define MPC826x_PCI_BASE	0x80000000
+#define MPC826x_PCI_MASK	0xc0000000
+#endif
+
+#ifndef MPC826x_PCI_LOWER_MEM
+#define MPC826x_PCI_LOWER_MEM  0x80000000
+#define MPC826x_PCI_UPPER_MEM  0x9fffffff
+#define MPC826x_PCI_MEM_OFFSET 0x00000000
+#endif
+
+#ifndef MPC826x_PCI_LOWER_MMIO
+#define MPC826x_PCI_LOWER_MMIO  0xa0000000
+#define MPC826x_PCI_UPPER_MMIO  0xafffffff
+#define MPC826x_PCI_MMIO_OFFSET 0x00000000
+#endif
+
+#ifndef MPC826x_PCI_LOWER_IO
+#define MPC826x_PCI_LOWER_IO   0x00000000
+#define MPC826x_PCI_UPPER_IO   0x00ffffff
+#define MPC826x_PCI_IO_BASE    0xb0000000
+#define MPC826x_PCI_IO_SIZE    0x01000000
+#endif
+
+#ifndef _IO_BASE
+#define _IO_BASE isa_io_base
+#endif
+
+#ifdef CONFIG_8260_PCI9
+extern void setup_m8260_indirect_pci(struct pci_controller* hose,
+				     u32 cfg_addr, u32 cfg_data);
+#else
+#define setup_m8260_indirect_pci setup_indirect_pci
+#endif
+
+#endif /* _PPC_KERNEL_M8260_PCI_H */
--- diff/arch/ppc/syslib/m8260_pci_erratum9.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/m8260_pci_erratum9.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,474 @@
+/*
+ * arch/ppc/platforms/mpc8260_pci9.c
+ *
+ * Workaround for device erratum PCI 9.
+ * See Motorola's "XPC826xA Family Device Errata Reference."
+ * The erratum applies to all 8260 family Hip4 processors.  It is scheduled 
+ * to be fixed in HiP4 Rev C.  Erratum PCI 9 states that a simultaneous PCI 
+ * inbound write transaction and PCI outbound read transaction can result in a 
+ * bus deadlock.  The suggested workaround is to use the IDMA controller to 
+ * perform all reads from PCI configuration, memory, and I/O space.
+ *
+ * Author:  andy_lowe@mvista.com
+ *
+ * 2003 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#include <linux/kernel.h>
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/types.h>
+#include <linux/string.h>
+
+#include <asm/io.h>
+#include <asm/pci-bridge.h>
+#include <asm/machdep.h>
+#include <asm/byteorder.h>
+#include <asm/mpc8260.h>
+#include <asm/immap_cpm2.h>
+#include <asm/cpm2.h>
+
+#include "m8260_pci.h"
+
+#ifdef CONFIG_8260_PCI9
+/*#include <asm/mpc8260_pci9.h>*/ /* included in asm/io.h */
+
+#define IDMA_XFER_BUF_SIZE 64	/* size of the IDMA transfer buffer */
+
+/* define a structure for the IDMA dpram usage */
+typedef struct idma_dpram_s {
+	idma_t pram;				/* IDMA parameter RAM */
+	u_char xfer_buf[IDMA_XFER_BUF_SIZE];	/* IDMA transfer buffer */
+	idma_bd_t bd;				/* buffer descriptor */
+} idma_dpram_t;
+
+/* define offsets relative to start of IDMA dpram */
+#define IDMA_XFER_BUF_OFFSET (sizeof(idma_t))
+#define IDMA_BD_OFFSET (sizeof(idma_t) + IDMA_XFER_BUF_SIZE)
+
+/* define globals */
+static volatile idma_dpram_t *idma_dpram;
+
+/* Exactly one of CONFIG_8260_PCI9_IDMAn must be defined, 
+ * where n is 1, 2, 3, or 4.  This selects the IDMA channel used for 
+ * the PCI9 workaround.
+ */
+#ifdef CONFIG_8260_PCI9_IDMA1
+#define IDMA_CHAN 0
+#define PROFF_IDMA PROFF_IDMA1_BASE
+#define IDMA_PAGE CPM_CR_IDMA1_PAGE
+#define IDMA_SBLOCK CPM_CR_IDMA1_SBLOCK
+#endif
+#ifdef CONFIG_8260_PCI9_IDMA2
+#define IDMA_CHAN 1
+#define PROFF_IDMA PROFF_IDMA2_BASE
+#define IDMA_PAGE CPM_CR_IDMA2_PAGE
+#define IDMA_SBLOCK CPM_CR_IDMA2_SBLOCK
+#endif
+#ifdef CONFIG_8260_PCI9_IDMA3
+#define IDMA_CHAN 2
+#define PROFF_IDMA PROFF_IDMA3_BASE
+#define IDMA_PAGE CPM_CR_IDMA3_PAGE
+#define IDMA_SBLOCK CPM_CR_IDMA3_SBLOCK
+#endif
+#ifdef CONFIG_8260_PCI9_IDMA4
+#define IDMA_CHAN 3
+#define PROFF_IDMA PROFF_IDMA4_BASE
+#define IDMA_PAGE CPM_CR_IDMA4_PAGE
+#define IDMA_SBLOCK CPM_CR_IDMA4_SBLOCK
+#endif
+
+void idma_pci9_init(void)
+{
+	uint dpram_offset;
+	volatile idma_t *pram;
+	volatile im_idma_t *idma_reg;
+	volatile cpm2_map_t *immap = cpm2_immr;
+
+	/* allocate IDMA dpram */
+	dpram_offset = cpm2_dpalloc(sizeof(idma_dpram_t), 64);
+	idma_dpram = 
+		(volatile idma_dpram_t *)&immap->im_dprambase[dpram_offset];
+
+	/* initialize the IDMA parameter RAM */
+	memset((void *)idma_dpram, 0, sizeof(idma_dpram_t));
+	pram = &idma_dpram->pram;
+	pram->ibase = dpram_offset + IDMA_BD_OFFSET;
+	pram->dpr_buf = dpram_offset + IDMA_XFER_BUF_OFFSET;
+	pram->ss_max = 32;
+	pram->dts = 32;
+
+	/* initialize the IDMA_BASE pointer to the IDMA parameter RAM */
+	*((ushort *) &immap->im_dprambase[PROFF_IDMA]) = dpram_offset;
+
+	/* initialize the IDMA registers */
+	idma_reg = (volatile im_idma_t *) &immap->im_sdma.sdma_idsr1;
+	idma_reg[IDMA_CHAN].idmr = 0;		/* mask all IDMA interrupts */
+	idma_reg[IDMA_CHAN].idsr = 0xff;	/* clear all event flags */
+
+	printk("<4>Using IDMA%d for MPC8260 device erratum PCI 9 workaround\n",
+		IDMA_CHAN + 1);
+
+	return;
+}
+
+/* Use the IDMA controller to transfer data from I/O memory to local RAM.
+ * The src address must be a physical address suitable for use by the DMA 
+ * controller with no translation.  The dst address must be a kernel virtual 
+ * address.  The dst address is translated to a physical address via 
+ * virt_to_phys().
+ * The sinc argument specifies whether or not the source address is incremented
+ * by the DMA controller.  The source address is incremented if and only if sinc
+ * is non-zero.  The destination address is always incremented since the 
+ * destination is always host RAM.
+ */
+static void 
+idma_pci9_read(u8 *dst, u8 *src, int bytes, int unit_size, int sinc)
+{
+	unsigned long flags;
+	volatile idma_t *pram = &idma_dpram->pram;
+	volatile idma_bd_t *bd = &idma_dpram->bd;
+	volatile cpm2_map_t *immap = cpm2_immr;
+
+	local_irq_save(flags);
+
+	/* initialize IDMA parameter RAM for this transfer */
+	if (sinc)
+		pram->dcm = IDMA_DCM_DMA_WRAP_64 | IDMA_DCM_SINC
+			  | IDMA_DCM_DINC | IDMA_DCM_SD_MEM2MEM;
+	else
+		pram->dcm = IDMA_DCM_DMA_WRAP_64 | IDMA_DCM_DINC 
+			  | IDMA_DCM_SD_MEM2MEM;
+	pram->ibdptr = pram->ibase;
+	pram->sts = unit_size;
+	pram->istate = 0;
+
+	/* initialize the buffer descriptor */
+	bd->dst = virt_to_phys(dst);
+	bd->src = (uint) src;
+	bd->len = bytes;
+	bd->flags = IDMA_BD_V | IDMA_BD_W | IDMA_BD_I | IDMA_BD_L | IDMA_BD_DGBL
+		  | IDMA_BD_DBO_BE | IDMA_BD_SBO_BE | IDMA_BD_SDTB;
+
+	/* issue the START_IDMA command to the CP */
+	while (immap->im_cpm.cp_cpcr & CPM_CR_FLG);
+	immap->im_cpm.cp_cpcr = mk_cr_cmd(IDMA_PAGE, IDMA_SBLOCK, 0,
+					 CPM_CR_START_IDMA) | CPM_CR_FLG;
+	while (immap->im_cpm.cp_cpcr & CPM_CR_FLG);
+
+	/* wait for transfer to complete */
+	while(bd->flags & IDMA_BD_V);
+
+	local_irq_restore(flags);
+
+	return;
+}
+
+/* Use the IDMA controller to transfer data from I/O memory to local RAM.
+ * The dst address must be a physical address suitable for use by the DMA 
+ * controller with no translation.  The src address must be a kernel virtual 
+ * address.  The src address is translated to a physical address via 
+ * virt_to_phys().
+ * The dinc argument specifies whether or not the dest address is incremented
+ * by the DMA controller.  The source address is incremented if and only if sinc
+ * is non-zero.  The source address is always incremented since the 
+ * source is always host RAM.
+ */
+static void 
+idma_pci9_write(u8 *dst, u8 *src, int bytes, int unit_size, int dinc)
+{
+	unsigned long flags;
+	volatile idma_t *pram = &idma_dpram->pram;
+	volatile idma_bd_t *bd = &idma_dpram->bd;
+	volatile cpm2_map_t *immap = cpm2_immr;
+
+	local_irq_save(flags);
+
+	/* initialize IDMA parameter RAM for this transfer */
+	if (dinc)
+		pram->dcm = IDMA_DCM_DMA_WRAP_64 | IDMA_DCM_SINC
+			  | IDMA_DCM_DINC | IDMA_DCM_SD_MEM2MEM;
+	else
+		pram->dcm = IDMA_DCM_DMA_WRAP_64 | IDMA_DCM_SINC 
+			  | IDMA_DCM_SD_MEM2MEM;
+	pram->ibdptr = pram->ibase;
+	pram->sts = unit_size;
+	pram->istate = 0;
+
+	/* initialize the buffer descriptor */
+	bd->dst = (uint) dst;
+	bd->src = virt_to_phys(src);
+	bd->len = bytes;
+	bd->flags = IDMA_BD_V | IDMA_BD_W | IDMA_BD_I | IDMA_BD_L | IDMA_BD_DGBL
+		  | IDMA_BD_DBO_BE | IDMA_BD_SBO_BE | IDMA_BD_SDTB;
+
+	/* issue the START_IDMA command to the CP */
+	while (immap->im_cpm.cp_cpcr & CPM_CR_FLG);
+	immap->im_cpm.cp_cpcr = mk_cr_cmd(IDMA_PAGE, IDMA_SBLOCK, 0,
+					 CPM_CR_START_IDMA) | CPM_CR_FLG;
+	while (immap->im_cpm.cp_cpcr & CPM_CR_FLG);
+
+	/* wait for transfer to complete */
+	while(bd->flags & IDMA_BD_V);
+
+	local_irq_restore(flags);
+
+	return;
+}
+
+/* Same as idma_pci9_read, but 16-bit little-endian byte swapping is performed
+ * if the unit_size is 2, and 32-bit little-endian byte swapping is performed if
+ * the unit_size is 4.
+ */
+static void 
+idma_pci9_read_le(u8 *dst, u8 *src, int bytes, int unit_size, int sinc)
+{
+	int i;
+	u8 *p;
+
+	idma_pci9_read(dst, src, bytes, unit_size, sinc);
+	switch(unit_size) {
+		case 2:
+			for (i = 0, p = dst; i < bytes; i += 2, p += 2)
+				swab16s((u16 *) p);
+			break;
+		case 4:
+			for (i = 0, p = dst; i < bytes; i += 4, p += 4)
+				swab32s((u32 *) p);
+			break;
+		default:
+			break;
+	}
+}
+EXPORT_SYMBOL(idma_pci9_init);
+EXPORT_SYMBOL(idma_pci9_read);
+EXPORT_SYMBOL(idma_pci9_read_le);
+
+static inline int is_pci_mem(unsigned long addr)
+{
+	if (addr >= MPC826x_PCI_LOWER_MMIO &&
+	    addr <= MPC826x_PCI_UPPER_MMIO)
+		return 1;
+	if (addr >= MPC826x_PCI_LOWER_MEM &&
+	    addr <= MPC826x_PCI_UPPER_MEM)
+		return 1;
+	return 0;
+}
+
+#define is_pci_mem(pa) ( (pa > 0x80000000) && (pa < 0xc0000000))
+int readb(volatile unsigned char *addr)
+{
+	u8 val;
+	unsigned long pa = iopa((unsigned long) addr);
+
+	if (!is_pci_mem(pa))
+		return in_8(addr);
+
+	idma_pci9_read((u8 *)&val, (u8 *)pa, sizeof(val), sizeof(val), 0);
+	return val;
+}
+
+int readw(volatile unsigned short *addr)
+{
+	u16 val;
+	unsigned long pa = iopa((unsigned long) addr);
+
+	if (!is_pci_mem(pa))
+		return in_le16(addr);
+
+	idma_pci9_read((u8 *)&val, (u8 *)pa, sizeof(val), sizeof(val), 0);
+	return swab16(val);
+}
+
+unsigned readl(volatile unsigned *addr)
+{
+	u32 val;
+	unsigned long pa = iopa((unsigned long) addr);
+
+	if (!is_pci_mem(pa))
+		return in_le32(addr);
+
+	idma_pci9_read((u8 *)&val, (u8 *)pa, sizeof(val), sizeof(val), 0);
+	return swab32(val);
+}
+
+int inb(unsigned port)
+{
+	u8 val;
+	u8 *addr = (u8 *)(port + _IO_BASE);
+
+	idma_pci9_read((u8 *)&val, (u8 *)addr, sizeof(val), sizeof(val), 0);
+	return val;
+}
+
+int inw(unsigned port)
+{
+	u16 val;
+	u8 *addr = (u8 *)(port + _IO_BASE);
+
+	idma_pci9_read((u8 *)&val, (u8 *)addr, sizeof(val), sizeof(val), 0);
+	return swab16(val);
+}
+
+unsigned inl(unsigned port)
+{
+	u32 val;
+	u8 *addr = (u8 *)(port + _IO_BASE);
+
+	idma_pci9_read((u8 *)&val, (u8 *)addr, sizeof(val), sizeof(val), 0);
+	return swab32(val);
+}
+
+void insb(unsigned port, void *buf, int ns)
+{
+	u8 *addr = (u8 *)(port + _IO_BASE);
+
+	idma_pci9_read((u8 *)buf, (u8 *)addr, ns*sizeof(u8), sizeof(u8), 0);
+}
+
+void insw(unsigned port, void *buf, int ns)
+{
+	u8 *addr = (u8 *)(port + _IO_BASE);
+
+	idma_pci9_read((u8 *)buf, (u8 *)addr, ns*sizeof(u16), sizeof(u16), 0);
+}
+
+void insl(unsigned port, void *buf, int nl)
+{
+	u8 *addr = (u8 *)(port + _IO_BASE);
+
+	idma_pci9_read((u8 *)buf, (u8 *)addr, nl*sizeof(u32), sizeof(u32), 0);
+}
+
+void insw_ns(unsigned port, void *buf, int ns)
+{
+	u8 *addr = (u8 *)(port + _IO_BASE);
+
+	idma_pci9_read((u8 *)buf, (u8 *)addr, ns*sizeof(u16), sizeof(u16), 0);
+}
+
+void insl_ns(unsigned port, void *buf, int nl)
+{
+	u8 *addr = (u8 *)(port + _IO_BASE);
+
+	idma_pci9_read((u8 *)buf, (u8 *)addr, nl*sizeof(u32), sizeof(u32), 0);
+}
+
+void *memcpy_fromio(void *dest, unsigned long src, size_t count)
+{
+	unsigned long pa = iopa((unsigned long) src);
+
+	if (is_pci_mem(pa))
+		idma_pci9_read((u8 *)dest, (u8 *)pa, count, 32, 1);
+	else
+		memcpy(dest, (void *)src, count);
+	return dest;
+}
+
+EXPORT_SYMBOL(readb);
+EXPORT_SYMBOL(readw);
+EXPORT_SYMBOL(readl);
+EXPORT_SYMBOL(inb);
+EXPORT_SYMBOL(inw);
+EXPORT_SYMBOL(inl);
+EXPORT_SYMBOL(insb);
+EXPORT_SYMBOL(insw);
+EXPORT_SYMBOL(insl);
+EXPORT_SYMBOL(insw_ns);
+EXPORT_SYMBOL(insl_ns);
+EXPORT_SYMBOL(memcpy_fromio);
+
+#endif	/* ifdef CONFIG_8260_PCI9 */
+
+/* Indirect PCI routines adapted from arch/ppc/kernel/indirect_pci.c.
+ * Copyright (C) 1998 Gabriel Paubert.
+ */
+#ifndef CONFIG_8260_PCI9
+#define cfg_read(val, addr, type, op)	*val = op((type)(addr))
+#else
+#define cfg_read(val, addr, type, op) \
+	idma_pci9_read_le((u8*)(val),(u8*)(addr),sizeof(*(val)),sizeof(*(val)),0)
+#endif
+
+#define cfg_write(val, addr, type, op)	op((type *)(addr), (val))
+
+static int indirect_write_config(struct pci_bus *pbus, unsigned int devfn, int where,
+			 int size, u32 value)
+{
+	struct pci_controller *hose = pbus->sysdata;
+	u8 cfg_type = 0;
+	if (ppc_md.pci_exclude_device)
+		if (ppc_md.pci_exclude_device(pbus->number, devfn))
+			return PCIBIOS_DEVICE_NOT_FOUND;
+
+	if (hose->set_cfg_type)
+		if (pbus->number != hose->first_busno)
+			cfg_type = 1;
+
+	out_be32(hose->cfg_addr,
+		 (((where & 0xfc) | cfg_type) << 24) | (devfn << 16)
+		 | ((pbus->number - hose->bus_offset) << 8) | 0x80);
+
+	switch (size)
+	{
+		case 1:
+			cfg_write(value, hose->cfg_data + (where & 3), u8, out_8);
+			break;
+		case 2:
+			cfg_write(value, hose->cfg_data + (where & 2), u16, out_le16);
+			break;
+		case 4:
+			cfg_write(value, hose->cfg_data + (where & 0), u32, out_le32);
+			break;
+	}		
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static int indirect_read_config(struct pci_bus *pbus, unsigned int devfn, int where,
+			 int size, u32 *value)
+{
+	struct pci_controller *hose = pbus->sysdata;
+	u8 cfg_type = 0;
+	if (ppc_md.pci_exclude_device)
+		if (ppc_md.pci_exclude_device(pbus->number, devfn))
+			return PCIBIOS_DEVICE_NOT_FOUND;
+
+	if (hose->set_cfg_type)
+		if (pbus->number != hose->first_busno)
+			cfg_type = 1;
+
+	out_be32(hose->cfg_addr,
+		 (((where & 0xfc) | cfg_type) << 24) | (devfn << 16)
+		 | ((pbus->number - hose->bus_offset) << 8) | 0x80);
+
+	switch (size)
+	{
+		case 1:
+			cfg_read(value, hose->cfg_data + (where & 3), u8 *, in_8);
+			break;
+		case 2:
+			cfg_read(value, hose->cfg_data + (where & 2), u16 *, in_le16);
+			break;
+		case 4:
+			cfg_read(value, hose->cfg_data + (where & 0), u32 *, in_le32);
+			break;
+	}		
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static struct pci_ops indirect_pci_ops =
+{
+	.read = indirect_read_config,
+	.write = indirect_write_config,
+};
+
+void
+setup_m8260_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
+{
+	hose->ops = &indirect_pci_ops;
+	hose->cfg_addr = (unsigned int *) ioremap(cfg_addr, 4);
+	hose->cfg_data = (unsigned char *) ioremap(cfg_data, 4);
+}
--- diff/arch/ppc/syslib/ppc85xx_common.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/ppc85xx_common.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,46 @@
+/*
+ * arch/ppc/syslib/ppc85xx_common.c
+ *
+ * MPC85xx support routines
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/init.h>
+
+#include <asm/mpc85xx.h>
+#include <asm/mmu.h>
+#include <asm/ocp.h>
+
+/* ************************************************************************ */
+/* Return the value of CCSRBAR for the current board */
+
+phys_addr_t
+get_ccsrbar(void)
+{
+        return BOARD_CCSRBAR;
+}
+
+/* ************************************************************************ */
+/* Update the 85xx OCP tables paddr field */
+void
+mpc85xx_update_paddr_ocp(struct ocp_device *dev, void *arg)
+{
+	phys_addr_t ccsrbar;
+	if (arg) {
+		ccsrbar = *(phys_addr_t *)arg;
+		dev->def->paddr += ccsrbar;
+	}
+}
+
+EXPORT_SYMBOL(get_ccsrbar);
--- diff/arch/ppc/syslib/ppc85xx_common.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/ppc85xx_common.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,29 @@
+/*
+ * arch/ppc/syslib/ppc85xx_common.h
+ *
+ * MPC85xx support routines
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#ifndef __PPC_SYSLIB_PPC85XX_COMMON_H
+#define __PPC_SYSLIB_PPC85XX_COMMON_H
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <asm/ocp.h>
+
+/* Provide access to ccsrbar for any modules, etc */
+phys_addr_t get_ccsrbar(void);
+
+/* Update the 85xx OCP tables paddr field */
+void mpc85xx_update_paddr_ocp(struct ocp_device *dev, void *ccsrbar);
+
+#endif /* __PPC_SYSLIB_PPC85XX_COMMON_H */
--- diff/arch/ppc/syslib/ppc85xx_setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/ppc85xx_setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,343 @@
+/*
+ * arch/ppc/syslib/ppc85xx_setup.c
+ *
+ * MPC85XX common board code
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/serial.h>
+#include <linux/tty.h>	/* for linux/serial_core.h */
+#include <linux/serial_core.h>
+
+#include <asm/prom.h>
+#include <asm/time.h>
+#include <asm/mpc85xx.h>
+#include <asm/immap_85xx.h>
+#include <asm/mmu.h>
+#include <asm/ocp.h>
+#include <asm/kgdb.h>
+
+#include <syslib/ppc85xx_setup.h>
+
+/* Return the amount of memory */
+unsigned long __init
+mpc85xx_find_end_of_memory(void)
+{
+        bd_t *binfo;
+
+        binfo = (bd_t *) __res;
+
+        return binfo->bi_memsize;
+}
+
+/* The decrementer counts at the system (internal) clock freq divided by 8 */
+void __init
+mpc85xx_calibrate_decr(void)
+{
+        bd_t *binfo = (bd_t *) __res;
+        unsigned int freq, divisor;
+
+        /* get the core frequency */
+        freq = binfo->bi_busfreq;
+
+        /* The timebase is updated every 8 bus clocks, HID0[SEL_TBCLK] = 0 */
+        divisor = 8;
+        tb_ticks_per_jiffy = freq / divisor / HZ;
+        tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000);
+
+	/* Set the time base to zero */
+	mtspr(SPRN_TBWL, 0);
+	mtspr(SPRN_TBWU, 0);
+
+	/* Clear any pending timer interrupts */
+	mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
+
+	/* Enable decrementer interrupt */
+	mtspr(SPRN_TCR, TCR_DIE);
+}
+
+#ifdef CONFIG_SERIAL_8250
+void __init
+mpc85xx_early_serial_map(void)
+{
+	struct uart_port serial_req;
+	bd_t *binfo = (bd_t *) __res;
+	phys_addr_t duart_paddr = binfo->bi_immr_base + MPC85xx_UART0_OFFSET;
+
+	/* Setup serial port access */
+	memset(&serial_req, 0, sizeof (serial_req));
+	serial_req.uartclk = binfo->bi_busfreq;
+	serial_req.line = 0;
+	serial_req.irq = MPC85xx_IRQ_DUART;
+	serial_req.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
+	serial_req.iotype = SERIAL_IO_MEM;
+	serial_req.membase = ioremap(duart_paddr, MPC85xx_UART0_SIZE);
+	serial_req.mapbase = duart_paddr;
+	serial_req.regshift = 0;
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+	gen550_init(0, &serial_req);
+#endif
+
+	if (early_serial_setup(&serial_req) != 0)
+		printk("Early serial init of port 0 failed\n");
+
+	/* Assume early_serial_setup() doesn't modify serial_req */
+	duart_paddr = binfo->bi_immr_base + MPC85xx_UART1_OFFSET;
+	serial_req.line = 1;
+	serial_req.mapbase = duart_paddr;
+	serial_req.membase = ioremap(duart_paddr, MPC85xx_UART1_SIZE);
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+	gen550_init(1, &serial_req);
+#endif
+
+	if (early_serial_setup(&serial_req) != 0)
+		printk("Early serial init of port 1 failed\n");
+}
+#endif
+
+void
+mpc85xx_restart(char *cmd)
+{
+	local_irq_disable();
+	abort();
+}
+
+void
+mpc85xx_power_off(void)
+{
+	local_irq_disable();
+	for(;;);
+}
+
+void
+mpc85xx_halt(void)
+{
+	local_irq_disable();
+	for(;;);
+}
+
+#ifdef CONFIG_PCI
+static void __init
+mpc85xx_setup_pci1(struct pci_controller *hose)
+{
+	volatile struct ccsr_pci *pci;
+	volatile struct ccsr_guts *guts;
+	unsigned short temps;
+	bd_t *binfo = (bd_t *) __res;
+
+	pci = ioremap(binfo->bi_immr_base + MPC85xx_PCI1_OFFSET,
+		    MPC85xx_PCI1_SIZE);
+
+	guts = ioremap(binfo->bi_immr_base + MPC85xx_GUTS_OFFSET,
+		    MPC85xx_GUTS_SIZE);
+
+	early_read_config_word(hose, 0, 0, PCI_COMMAND, &temps);
+	temps |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+	early_write_config_word(hose, 0, 0, PCI_COMMAND, temps);
+
+#define PORDEVSR_PCI	(0x00800000)	/* PCI Mode */
+	if (guts->pordevsr & PORDEVSR_PCI) {
+ 		early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80);
+ 	} else {
+		/* PCI-X init */
+		temps = PCI_X_CMD_MAX_SPLIT | PCI_X_CMD_MAX_READ
+			| PCI_X_CMD_ERO | PCI_X_CMD_DPERR_E;
+		early_write_config_word(hose, 0, 0, PCIX_COMMAND, temps);
+	}
+
+	/* Disable all windows (except powar0 since its ignored) */
+	pci->powar1 = 0;
+	pci->powar2 = 0;
+	pci->powar3 = 0;
+	pci->powar4 = 0;
+	pci->piwar1 = 0;
+	pci->piwar2 = 0;
+	pci->piwar3 = 0;
+
+	/* Setup 512M Phys:PCI 1:1 outbound mem window @ 0x80000000 */
+	pci->potar1 = (MPC85XX_PCI1_LOWER_MEM >> 12) & 0x000fffff;
+	pci->potear1 = 0x00000000;
+	pci->powbar1 = (MPC85XX_PCI1_LOWER_MEM >> 12) & 0x000fffff;
+	pci->powar1 = 0x8004401c;	/* Enable, Mem R/W, 512M */
+
+	/* Setup 16M outboud IO windows @ 0xe2000000 */
+	pci->potar2 = 0x00000000;
+	pci->potear2 = 0x00000000;
+	pci->powbar2 = (MPC85XX_PCI1_IO_BASE >> 12) & 0x000fffff;
+	pci->powar2 = 0x80088017;	/* Enable, IO R/W, 16M */
+
+	/* Setup 2G inbound Memory Window @ 0 */
+	pci->pitar1 = 0x00000000;
+	pci->piwbar1 = 0x00000000;
+	pci->piwar1 = 0xa0f5501e;	/* Enable, Prefetch, Local
+					   Mem, Snoop R/W, 2G */
+}
+
+
+extern int mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin);
+extern int mpc85xx_exclude_device(u_char bus, u_char devfn);
+
+#if CONFIG_85xx_PCI2
+static void __init
+mpc85xx_setup_pci2(struct pci_controller *hose)
+{
+	volatile struct ccsr_pci *pci;
+	unsigned short temps;
+	bd_t *binfo = (bd_t *) __res;
+
+	pci = ioremap(binfo->bi_immr_base + MPC85xx_PCI2_OFFSET,
+		    MPC85xx_PCI2_SIZE);
+
+	early_read_config_word(hose, 0, 0, PCI_COMMAND, &temps);
+	temps |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+	early_write_config_word(hose, 0, 0, PCI_COMMAND, temps);
+	early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80);
+
+	/* Disable all windows (except powar0 since its ignored) */
+	pci->powar1 = 0;
+	pci->powar2 = 0;
+	pci->powar3 = 0;
+	pci->powar4 = 0;
+	pci->piwar1 = 0;
+	pci->piwar2 = 0;
+	pci->piwar3 = 0;
+
+	/* Setup 512M Phys:PCI 1:1 outbound mem window @ 0xa0000000 */
+	pci->potar1 = (MPC85XX_PCI2_LOWER_MEM >> 12) & 0x000fffff;
+	pci->potear1 = 0x00000000;
+	pci->powbar1 = (MPC85XX_PCI2_LOWER_MEM >> 12) & 0x000fffff;
+	pci->powar1 = 0x8004401c;	/* Enable, Mem R/W, 512M */
+
+	/* Setup 16M outboud IO windows @ 0xe3000000 */
+	pci->potar2 = 0x00000000;
+	pci->potear2 = 0x00000000;
+	pci->powbar2 = (MPC85XX_PCI2_IO_BASE >> 12) & 0x000fffff;
+	pci->powar2 = 0x80088017;	/* Enable, IO R/W, 16M */
+
+	/* Setup 2G inbound Memory Window @ 0 */
+	pci->pitar1 = 0x00000000;
+	pci->piwbar1 = 0x00000000;
+	pci->piwar1 = 0xa0f5501e;	/* Enable, Prefetch, Local
+					   Mem, Snoop R/W, 2G */
+}
+#endif /* CONFIG_85xx_PCI2 */
+
+void __init
+mpc85xx_setup_hose(void)
+{
+	struct pci_controller *hose_a;
+#ifdef CONFIG_85xx_PCI2
+	struct pci_controller *hose_b;
+#endif
+	bd_t *binfo = (bd_t *) __res;
+
+	hose_a = pcibios_alloc_controller();
+
+	if (!hose_a)
+		return;
+
+	ppc_md.pci_swizzle = common_swizzle;
+	ppc_md.pci_map_irq = mpc85xx_map_irq;
+
+	hose_a->first_busno = 0;
+	hose_a->bus_offset = 0;
+	hose_a->last_busno = 0xff;
+
+	setup_indirect_pci(hose_a, binfo->bi_immr_base + PCI1_CFG_ADDR_OFFSET,
+			   binfo->bi_immr_base + PCI1_CFG_DATA_OFFSET);
+	hose_a->set_cfg_type = 1;
+
+	mpc85xx_setup_pci1(hose_a);
+
+	hose_a->pci_mem_offset = MPC85XX_PCI1_MEM_OFFSET;
+	hose_a->mem_space.start = MPC85XX_PCI1_LOWER_MEM;
+	hose_a->mem_space.end = MPC85XX_PCI1_UPPER_MEM;
+
+	hose_a->io_space.start = MPC85XX_PCI1_LOWER_IO;
+	hose_a->io_space.end = MPC85XX_PCI1_UPPER_IO;
+	hose_a->io_base_phys = MPC85XX_PCI1_IO_BASE;
+#if CONFIG_85xx_PCI2
+	isa_io_base =
+		(unsigned long) ioremap(MPC85XX_PCI1_IO_BASE,
+					MPC85XX_PCI1_IO_SIZE +
+					MPC85XX_PCI2_IO_SIZE);
+#else
+	isa_io_base =
+		(unsigned long) ioremap(MPC85XX_PCI1_IO_BASE,
+					MPC85XX_PCI1_IO_SIZE);
+#endif
+	hose_a->io_base_virt = (void *) isa_io_base;
+
+	/* setup resources */
+	pci_init_resource(&hose_a->mem_resources[0],
+			MPC85XX_PCI1_LOWER_MEM,
+			MPC85XX_PCI1_UPPER_MEM,
+			IORESOURCE_MEM, "PCI1 host bridge");
+
+	pci_init_resource(&hose_a->io_resource,
+			MPC85XX_PCI1_LOWER_IO,
+			MPC85XX_PCI1_UPPER_IO,
+			IORESOURCE_IO, "PCI1 host bridge");
+
+	ppc_md.pci_exclude_device = mpc85xx_exclude_device;
+
+	hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno);
+
+#if CONFIG_85xx_PCI2
+	hose_b = pcibios_alloc_controller();
+
+	if (!hose_b)
+		return;
+
+	hose_b->bus_offset = hose_a->last_busno + 1;
+	hose_b->first_busno = hose_a->last_busno + 1;
+	hose_b->last_busno = 0xff;
+
+	setup_indirect_pci(hose_b, binfo->bi_immr_base + PCI2_CFG_ADDR_OFFSET,
+			   binfo->bi_immr_base + PCI2_CFG_DATA_OFFSET);
+	hose_b->set_cfg_type = 1;
+
+	mpc85xx_setup_pci2(hose_b);
+
+	hose_b->pci_mem_offset = MPC85XX_PCI2_MEM_OFFSET;
+	hose_b->mem_space.start = MPC85XX_PCI2_LOWER_MEM;
+	hose_b->mem_space.end = MPC85XX_PCI2_UPPER_MEM;
+
+	hose_b->io_space.start = MPC85XX_PCI2_LOWER_IO;
+	hose_b->io_space.end = MPC85XX_PCI2_UPPER_IO;
+	hose_b->io_base_phys = MPC85XX_PCI2_IO_BASE;
+	hose_b->io_base_virt = (void *) isa_io_base + MPC85XX_PCI1_IO_SIZE;
+
+	/* setup resources */
+	pci_init_resource(&hose_b->mem_resources[0],
+			MPC85XX_PCI2_LOWER_MEM,
+			MPC85XX_PCI2_UPPER_MEM,
+			IORESOURCE_MEM, "PCI2 host bridge");
+
+	pci_init_resource(&hose_b->io_resource,
+			MPC85XX_PCI2_LOWER_IO,
+			MPC85XX_PCI2_UPPER_IO,
+			IORESOURCE_IO, "PCI2 host bridge");
+
+	hose_b->last_busno = pciauto_bus_scan(hose_b, hose_b->first_busno);
+#endif
+	return;
+}
+#endif /* CONFIG_PCI */
+
+
--- diff/arch/ppc/syslib/ppc85xx_setup.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc/syslib/ppc85xx_setup.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,69 @@
+/*
+ * arch/ppc/syslib/ppc85xx_setup.h
+ *
+ * MPC85XX common board definitions
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+
+#ifndef __PPC_SYSLIB_PPC85XX_SETUP_H
+#define __PPC_SYSLIB_PPC85XX_SETUP_H
+
+#include <linux/config.h>
+#include <linux/serial.h>
+#include <linux/init.h>
+#include <asm/ppcboot.h>
+
+extern unsigned long mpc85xx_find_end_of_memory(void) __init;
+extern void mpc85xx_calibrate_decr(void) __init;
+extern void mpc85xx_early_serial_map(void) __init;
+extern void mpc85xx_restart(char *cmd);
+extern void mpc85xx_power_off(void);
+extern void mpc85xx_halt(void);
+extern void mpc85xx_setup_hose(void) __init;
+
+/* PCI config */
+#define PCI1_CFG_ADDR_OFFSET	(0x8000)
+#define PCI1_CFG_DATA_OFFSET	(0x8004)
+
+#define PCI2_CFG_ADDR_OFFSET	(0x9000)
+#define PCI2_CFG_DATA_OFFSET	(0x9004)
+
+/* Additional register for PCI-X configuration */
+#define PCIX_NEXT_CAP	0x60
+#define PCIX_CAP_ID	0x61
+#define PCIX_COMMAND	0x62
+#define PCIX_STATUS	0x64
+
+/* Serial Config */
+#define MPC85XX_0_SERIAL                (CCSRBAR + 0x4500)
+#define MPC85XX_1_SERIAL                (CCSRBAR + 0x4600)
+
+#ifdef CONFIG_SERIAL_MANY_PORTS
+#define RS_TABLE_SIZE  64
+#else
+#define RS_TABLE_SIZE  2
+#endif
+
+#ifndef BASE_BAUD
+#define BASE_BAUD 115200
+#endif
+
+#define STD_UART_OP(num)					\
+	{ 0, BASE_BAUD, num, MPC85xx_IRQ_DUART,			\
+		(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),	\
+		iomem_base: (u8 *)MPC85XX_##num##_SERIAL,	\
+		io_type: SERIAL_IO_MEM},
+
+/* Offset of CPM register space */
+#define CPM_MAP_ADDR	(CCSRBAR + MPC85xx_CPM_OFFSET)
+
+#endif /* __PPC_SYSLIB_PPC85XX_SETUP_H */
--- diff/arch/ppc64/kernel/vecemu.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc64/kernel/vecemu.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,346 @@
+/*
+ * Routines to emulate some Altivec/VMX instructions, specifically
+ * those that can trap when given denormalized operands in Java mode.
+ */
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <asm/ptrace.h>
+#include <asm/processor.h>
+#include <asm/uaccess.h>
+
+/* Functions in vector.S */
+extern void vaddfp(vector128 *dst, vector128 *a, vector128 *b);
+extern void vsubfp(vector128 *dst, vector128 *a, vector128 *b);
+extern void vmaddfp(vector128 *dst, vector128 *a, vector128 *b, vector128 *c);
+extern void vnmsubfp(vector128 *dst, vector128 *a, vector128 *b, vector128 *c);
+extern void vrefp(vector128 *dst, vector128 *src);
+extern void vrsqrtefp(vector128 *dst, vector128 *src);
+extern void vexptep(vector128 *dst, vector128 *src);
+
+static unsigned int exp2s[8] = {
+	0x800000,
+	0x8b95c2,
+	0x9837f0,
+	0xa5fed7,
+	0xb504f3,
+	0xc5672a,
+	0xd744fd,
+	0xeac0c7
+};
+
+/*
+ * Computes an estimate of 2^x.  The `s' argument is the 32-bit
+ * single-precision floating-point representation of x.
+ */
+static unsigned int eexp2(unsigned int s)
+{
+	int exp, pwr;
+	unsigned int mant, frac;
+
+	/* extract exponent field from input */
+	exp = ((s >> 23) & 0xff) - 127;
+	if (exp > 7) {
+		/* check for NaN input */
+		if (exp == 128 && (s & 0x7fffff) != 0)
+			return s | 0x400000;	/* return QNaN */
+		/* 2^-big = 0, 2^+big = +Inf */
+		return (s & 0x80000000)? 0: 0x7f800000;	/* 0 or +Inf */
+	}
+	if (exp < -23)
+		return 0x3f800000;	/* 1.0 */
+
+	/* convert to fixed point integer in 9.23 representation */
+	pwr = (s & 0x7fffff) | 0x800000;
+	if (exp > 0)
+		pwr <<= exp;
+	else
+		pwr >>= -exp;
+	if (s & 0x80000000)
+		pwr = -pwr;
+
+	/* extract integer part, which becomes exponent part of result */
+	exp = (pwr >> 23) + 126;
+	if (exp >= 254)
+		return 0x7f800000;
+	if (exp < -23)
+		return 0;
+
+	/* table lookup on top 3 bits of fraction to get mantissa */
+	mant = exp2s[(pwr >> 20) & 7];
+
+	/* linear interpolation using remaining 20 bits of fraction */
+	asm("mulhwu %0,%1,%2" : "=r" (frac)
+	    : "r" (pwr << 12), "r" (0x172b83ff));
+	asm("mulhwu %0,%1,%2" : "=r" (frac) : "r" (frac), "r" (mant));
+	mant += frac;
+
+	if (exp >= 0)
+		return mant + (exp << 23);
+
+	/* denormalized result */
+	exp = -exp;
+	mant += 1 << (exp - 1);
+	return mant >> exp;
+}
+
+/*
+ * Computes an estimate of log_2(x).  The `s' argument is the 32-bit
+ * single-precision floating-point representation of x.
+ */
+static unsigned int elog2(unsigned int s)
+{
+	int exp, mant, lz, frac;
+
+	exp = s & 0x7f800000;
+	mant = s & 0x7fffff;
+	if (exp == 0x7f800000) {	/* Inf or NaN */
+		if (mant != 0)
+			s |= 0x400000;	/* turn NaN into QNaN */
+		return s;
+	}
+	if ((exp | mant) == 0)		/* +0 or -0 */
+		return 0xff800000;	/* return -Inf */
+
+	if (exp == 0) {
+		/* denormalized */
+		asm("cntlzw %0,%1" : "=r" (lz) : "r" (mant));
+		mant <<= lz - 8;
+		exp = (-118 - lz) << 23;
+	} else {
+		mant |= 0x800000;
+		exp -= 127 << 23;
+	}
+
+	if (mant >= 0xb504f3) {				/* 2^0.5 * 2^23 */
+		exp |= 0x400000;			/* 0.5 * 2^23 */
+		asm("mulhwu %0,%1,%2" : "=r" (mant)
+		    : "r" (mant), "r" (0xb504f334));	/* 2^-0.5 * 2^32 */
+	}
+	if (mant >= 0x9837f0) {				/* 2^0.25 * 2^23 */
+		exp |= 0x200000;			/* 0.25 * 2^23 */
+		asm("mulhwu %0,%1,%2" : "=r" (mant)
+		    : "r" (mant), "r" (0xd744fccb));	/* 2^-0.25 * 2^32 */
+	}
+	if (mant >= 0x8b95c2) {				/* 2^0.125 * 2^23 */
+		exp |= 0x100000;			/* 0.125 * 2^23 */
+		asm("mulhwu %0,%1,%2" : "=r" (mant)
+		    : "r" (mant), "r" (0xeac0c6e8));	/* 2^-0.125 * 2^32 */
+	}
+	if (mant > 0x800000) {				/* 1.0 * 2^23 */
+		/* calculate (mant - 1) * 1.381097463 */
+		/* 1.381097463 == 0.125 / (2^0.125 - 1) */
+		asm("mulhwu %0,%1,%2" : "=r" (frac)
+		    : "r" ((mant - 0x800000) << 1), "r" (0xb0c7cd3a));
+		exp += frac;
+	}
+	s = exp & 0x80000000;
+	if (exp != 0) {
+		if (s)
+			exp = -exp;
+		asm("cntlzw %0,%1" : "=r" (lz) : "r" (exp));
+		lz = 8 - lz;
+		if (lz > 0)
+			exp >>= lz;
+		else if (lz < 0)
+			exp <<= -lz;
+		s += ((lz + 126) << 23) + exp;
+	}
+	return s;
+}
+
+#define VSCR_SAT	1
+
+static int ctsxs(unsigned int x, int scale, unsigned int *vscrp)
+{
+	int exp, mant;
+
+	exp = (x >> 23) & 0xff;
+	mant = x & 0x7fffff;
+	if (exp == 255 && mant != 0)
+		return 0;		/* NaN -> 0 */
+	exp = exp - 127 + scale;
+	if (exp < 0)
+		return 0;		/* round towards zero */
+	if (exp >= 31) {
+		/* saturate, unless the result would be -2^31 */
+		if (x + (scale << 23) != 0xcf000000)
+			*vscrp |= VSCR_SAT;
+		return (x & 0x80000000)? 0x80000000: 0x7fffffff;
+	}
+	mant |= 0x800000;
+	mant = (mant << 7) >> (30 - exp);
+	return (x & 0x80000000)? -mant: mant;
+}
+
+static unsigned int ctuxs(unsigned int x, int scale, unsigned int *vscrp)
+{
+	int exp;
+	unsigned int mant;
+
+	exp = (x >> 23) & 0xff;
+	mant = x & 0x7fffff;
+	if (exp == 255 && mant != 0)
+		return 0;		/* NaN -> 0 */
+	exp = exp - 127 + scale;
+	if (exp < 0)
+		return 0;		/* round towards zero */
+	if (x & 0x80000000) {
+		/* negative => saturate to 0 */
+		*vscrp |= VSCR_SAT;
+		return 0;
+	}
+	if (exp >= 32) {
+		/* saturate */
+		*vscrp |= VSCR_SAT;
+		return 0xffffffff;
+	}
+	mant |= 0x800000;
+	mant = (mant << 8) >> (31 - exp);
+	return mant;
+}
+
+/* Round to floating integer, towards 0 */
+static unsigned int rfiz(unsigned int x)
+{
+	int exp;
+
+	exp = ((x >> 23) & 0xff) - 127;
+	if (exp == 128 && (x & 0x7fffff) != 0)
+		return x | 0x400000;	/* NaN -> make it a QNaN */
+	if (exp >= 23)
+		return x;		/* it's an integer already (or Inf) */
+	if (exp < 0)
+		return x & 0x80000000;	/* |x| < 1.0 rounds to 0 */
+	return x & ~(0x7fffff >> exp);
+}
+
+/* Round to floating integer, towards +/- Inf */
+static unsigned int rfii(unsigned int x)
+{
+	int exp, mask;
+
+	exp = ((x >> 23) & 0xff) - 127;
+	if (exp == 128 && (x & 0x7fffff) != 0)
+		return x | 0x400000;	/* NaN -> make it a QNaN */
+	if (exp >= 23)
+		return x;		/* it's an integer already (or Inf) */
+	if ((x & 0x7fffffff) == 0)
+		return x;		/* +/-0 -> +/-0 */
+	if (exp < 0)
+		/* 0 < |x| < 1.0 rounds to +/- 1.0 */
+		return (x & 0x80000000) | 0x3f800000;
+	mask = 0x7fffff >> exp;
+	/* mantissa overflows into exponent - that's OK,
+	   it can't overflow into the sign bit */
+	return (x + mask) & ~mask;
+}
+
+/* Round to floating integer, to nearest */
+static unsigned int rfin(unsigned int x)
+{
+	int exp, half;
+
+	exp = ((x >> 23) & 0xff) - 127;
+	if (exp == 128 && (x & 0x7fffff) != 0)
+		return x | 0x400000;	/* NaN -> make it a QNaN */
+	if (exp >= 23)
+		return x;		/* it's an integer already (or Inf) */
+	if (exp < -1)
+		return x & 0x80000000;	/* |x| < 0.5 -> +/-0 */
+	if (exp == -1)
+		/* 0.5 <= |x| < 1.0 rounds to +/- 1.0 */
+		return (x & 0x80000000) | 0x3f800000;
+	half = 0x400000 >> exp;
+	/* add 0.5 to the magnitude and chop off the fraction bits */
+	return (x + half) & ~(0x7fffff >> exp);
+}
+
+int
+emulate_altivec(struct pt_regs *regs)
+{
+	unsigned int instr, i;
+	unsigned int va, vb, vc, vd;
+	vector128 *vrs;
+
+	if (get_user(instr, (unsigned int *) regs->nip))
+		return -EFAULT;
+	if ((instr >> 26) != 4)
+		return -EINVAL;		/* not an altivec instruction */
+	vd = (instr >> 21) & 0x1f;
+	va = (instr >> 16) & 0x1f;
+	vb = (instr >> 11) & 0x1f;
+	vc = (instr >> 6) & 0x1f;
+
+	vrs = current->thread.vr;
+	switch (instr & 0x3f) {
+	case 10:
+		switch (vc) {
+		case 0:	/* vaddfp */
+			vaddfp(&vrs[vd], &vrs[va], &vrs[vb]);
+			break;
+		case 1:	/* vsubfp */
+			vsubfp(&vrs[vd], &vrs[va], &vrs[vb]);
+			break;
+		case 4:	/* vrefp */
+			vrefp(&vrs[vd], &vrs[vb]);
+			break;
+		case 5:	/* vrsqrtefp */
+			vrsqrtefp(&vrs[vd], &vrs[vb]);
+			break;
+		case 6:	/* vexptefp */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = eexp2(vrs[vb].u[i]);
+			break;
+		case 7:	/* vlogefp */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = elog2(vrs[vb].u[i]);
+			break;
+		case 8:		/* vrfin */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = rfin(vrs[vb].u[i]);
+			break;
+		case 9:		/* vrfiz */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = rfiz(vrs[vb].u[i]);
+			break;
+		case 10:	/* vrfip */
+			for (i = 0; i < 4; ++i) {
+				u32 x = vrs[vb].u[i];
+				x = (x & 0x80000000)? rfiz(x): rfii(x);
+				vrs[vd].u[i] = x;
+			}
+			break;
+		case 11:	/* vrfim */
+			for (i = 0; i < 4; ++i) {
+				u32 x = vrs[vb].u[i];
+				x = (x & 0x80000000)? rfii(x): rfiz(x);
+				vrs[vd].u[i] = x;
+			}
+			break;
+		case 14:	/* vctuxs */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = ctuxs(vrs[vb].u[i], va,
+						&current->thread.vscr.u[3]);
+			break;
+		case 15:	/* vctsxs */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = ctsxs(vrs[vb].u[i], va,
+						&current->thread.vscr.u[3]);
+			break;
+		default:
+			return -EINVAL;
+		}
+		break;
+	case 46:	/* vmaddfp */
+		vmaddfp(&vrs[vd], &vrs[va], &vrs[vb], &vrs[vc]);
+		break;
+	case 47:	/* vnmsubfp */
+		vnmsubfp(&vrs[vd], &vrs[va], &vrs[vb], &vrs[vc]);
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return 0;
+}
--- diff/arch/ppc64/kernel/vector.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/ppc64/kernel/vector.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,172 @@
+#include <asm/ppc_asm.h>
+#include <asm/processor.h>
+
+/*
+ * The routines below are in assembler so we can closely control the
+ * usage of floating-point registers.  These routines must be called
+ * with preempt disabled.
+ */
+	.section ".toc","aw"
+fpzero:
+	.tc	FD_0_0[TC],0
+fpone:
+	.tc	FD_3ff00000_0[TC],0x3ff0000000000000	/* 1.0 */
+fphalf:
+	.tc	FD_3fe00000_0[TC],0x3fe0000000000000	/* 0.5 */
+
+	.text
+/*
+ * Internal routine to enable floating point and set FPSCR to 0.
+ * Don't call it from C; it doesn't use the normal calling convention.
+ */
+fpenable:
+	mfmsr	r10
+	ori	r11,r10,MSR_FP
+	mtmsr	r11
+	isync
+	stfd	fr31,-8(r1)
+	stfd	fr0,-16(r1)
+	stfd	fr1,-24(r1)
+	mffs	fr31
+	lfd	fr1,fpzero@toc(r2)
+	mtfsf	0xff,fr1
+	blr
+
+fpdisable:
+	mtlr	r12
+	mtfsf	0xff,fr31
+	lfd	fr1,-24(r1)
+	lfd	fr0,-16(r1)
+	lfd	fr31,-8(r1)
+	mtmsr	r10
+	isync
+	blr
+
+/*
+ * Vector add, floating point.
+ */
+_GLOBAL(vaddfp)
+	mflr	r12
+	bl	fpenable
+	li	r0,4
+	mtctr	r0
+	li	r6,0
+1:	lfsx	fr0,r4,r6
+	lfsx	fr1,r5,r6
+	fadds	fr0,fr0,fr1
+	stfsx	fr0,r3,r6
+	addi	r6,r6,4
+	bdnz	1b
+	b	fpdisable
+
+/*
+ * Vector subtract, floating point.
+ */
+_GLOBAL(vsubfp)
+	mflr	r12
+	bl	fpenable
+	li	r0,4
+	mtctr	r0
+	li	r6,0
+1:	lfsx	fr0,r4,r6
+	lfsx	fr1,r5,r6
+	fsubs	fr0,fr0,fr1
+	stfsx	fr0,r3,r6
+	addi	r6,r6,4
+	bdnz	1b
+	b	fpdisable
+
+/*
+ * Vector multiply and add, floating point.
+ */
+_GLOBAL(vmaddfp)
+	mflr	r12
+	bl	fpenable
+	stfd	fr2,-32(r1)
+	li	r0,4
+	mtctr	r0
+	li	r7,0
+1:	lfsx	fr0,r4,r7
+	lfsx	fr1,r5,r7
+	lfsx	fr2,r6,r7
+	fmadds	fr0,fr0,fr1,fr2
+	stfsx	fr0,r3,r7
+	addi	r7,r7,4
+	bdnz	1b
+	lfd	fr2,-32(r1)
+	b	fpdisable
+
+/*
+ * Vector negative multiply and subtract, floating point.
+ */
+_GLOBAL(vnmsubfp)
+	mflr	r12
+	bl	fpenable
+	stfd	fr2,-32(r1)
+	li	r0,4
+	mtctr	r0
+	li	r7,0
+1:	lfsx	fr0,r4,r7
+	lfsx	fr1,r5,r7
+	lfsx	fr2,r6,r7
+	fnmsubs	fr0,fr0,fr1,fr2
+	stfsx	fr0,r3,r7
+	addi	r7,r7,4
+	bdnz	1b
+	lfd	fr2,-32(r1)
+	b	fpdisable
+
+/*
+ * Vector reciprocal estimate.  We just compute 1.0/x.
+ * r3 -> destination, r4 -> source.
+ */
+_GLOBAL(vrefp)
+	mflr	r12
+	bl	fpenable
+	li	r0,4
+	lfd	fr1,fpone@toc(r2)
+	mtctr	r0
+	li	r6,0
+1:	lfsx	fr0,r4,r6
+	fdivs	fr0,fr1,fr0
+	stfsx	fr0,r3,r6
+	addi	r6,r6,4
+	bdnz	1b
+	b	fpdisable
+
+/*
+ * Vector reciprocal square-root estimate, floating point.
+ * We use the frsqrte instruction for the initial estimate followed
+ * by 2 iterations of Newton-Raphson to get sufficient accuracy.
+ * r3 -> destination, r4 -> source.
+ */
+_GLOBAL(vrsqrtefp)
+	mflr	r12
+	bl	fpenable
+	stfd	fr2,-32(r1)
+	stfd	fr3,-40(r1)
+	stfd	fr4,-48(r1)
+	stfd	fr5,-56(r1)
+	li	r0,4
+	lfd	fr4,fpone@toc(r2)
+	lfd	fr5,fphalf@toc(r2)
+	mtctr	r0
+	li	r6,0
+1:	lfsx	fr0,r4,r6
+	frsqrte	fr1,fr0		/* r = frsqrte(s) */
+	fmuls	fr3,fr1,fr0	/* r * s */
+	fmuls	fr2,fr1,fr5	/* r * 0.5 */
+	fnmsubs	fr3,fr1,fr3,fr4	/* 1 - s * r * r */
+	fmadds	fr1,fr2,fr3,fr1	/* r = r + 0.5 * r * (1 - s * r * r) */
+	fmuls	fr3,fr1,fr0	/* r * s */
+	fmuls	fr2,fr1,fr5	/* r * 0.5 */
+	fnmsubs	fr3,fr1,fr3,fr4	/* 1 - s * r * r */
+	fmadds	fr1,fr2,fr3,fr1	/* r = r + 0.5 * r * (1 - s * r * r) */
+	stfsx	fr1,r3,r6
+	addi	r6,r6,4
+	bdnz	1b
+	lfd	fr5,-56(r1)
+	lfd	fr4,-48(r1)
+	lfd	fr3,-40(r1)
+	lfd	fr2,-32(r1)
+	b	fpdisable
--- diff/arch/sh/boards/renesas/hs7751rvoip/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/hs7751rvoip/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,12 @@
+#
+# Makefile for the HS7751RVoIP specific parts of the kernel
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+obj-y	 := mach.o setup.o io.o irq.o led.o
+
+obj-$(CONFIG_PCI) += pci.o
+
--- diff/arch/sh/boards/renesas/hs7751rvoip/io.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/hs7751rvoip/io.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,310 @@
+/*
+ * linux/arch/sh/kernel/io_hs7751rvoip.c
+ *
+ * Copyright (C) 2001  Ian da Silva, Jeremy Siegel
+ * Based largely on io_se.c.
+ *
+ * I/O routine for Renesas Technology sales HS7751RVoIP
+ *
+ * Initial version only to support LAN access; some
+ * placeholder code from io_hs7751rvoip.c left in with the
+ * expectation of later SuperIO and PCMCIA access.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <asm/io.h>
+#include <asm/hs7751rvoip/hs7751rvoip.h>
+#include <asm/addrspace.h>
+
+#include <linux/module.h>
+#include <linux/pci.h>
+#include "../../../drivers/pci/pci-sh7751.h"
+
+extern void *area5_io8_base;	/* Area 5 8bit I/O Base address */
+extern void *area6_io8_base;	/* Area 6 8bit I/O Base address */
+extern void *area5_io16_base;	/* Area 5 16bit I/O Base address */
+extern void *area6_io16_base;	/* Area 6 16bit I/O Base address */
+
+/*
+ * The 7751R HS7751RVoIP uses the built-in PCI controller (PCIC)
+ * of the 7751R processor, and has a SuperIO accessible via the PCI.
+ * The board also includes a PCMCIA controller on its memory bus,
+ * like the other Solution Engine boards.
+ */
+
+#define PCIIOBR		(volatile long *)PCI_REG(SH7751_PCIIOBR)
+#define PCIMBR          (volatile long *)PCI_REG(SH7751_PCIMBR)
+#define PCI_IO_AREA	SH7751_PCI_IO_BASE
+#define PCI_MEM_AREA	SH7751_PCI_CONFIG_BASE
+
+#define PCI_IOMAP(adr)	(PCI_IO_AREA + (adr & ~SH7751_PCIIOBR_MASK))
+
+#if defined(CONFIG_HS7751RVOIP_CODEC)
+#define CODEC_IO_BASE	0x1000
+#endif
+
+#define maybebadio(name,port) \
+  printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \
+	 #name, (port), (__u32) __builtin_return_address(0))
+
+static inline void delay(void)
+{
+	ctrl_inw(0xa0000000);
+}
+
+static inline unsigned long port2adr(unsigned int port)
+{
+	if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
+		if (port == 0x3f6)
+			return ((unsigned long)area5_io16_base + 0x0c);
+		else
+			return ((unsigned long)area5_io16_base + 0x800 + ((port-0x1f0) << 1));
+	else
+		maybebadio(port2adr, (unsigned long)port);
+	return port;
+}
+
+/* The 7751R HS7751RVoIP seems to have everything hooked */
+/* up pretty normally (nothing on high-bytes only...) so this */
+/* shouldn't be needed */
+static inline int shifted_port(unsigned long port)
+{
+	/* For IDE registers, value is not shifted */
+	if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
+		return 0;
+	else
+		return 1;
+}
+
+#if defined(CONFIG_HS7751RVOIP_CODEC)
+static inline int
+codec_port(unsigned long port)
+{
+	if (CODEC_IO_BASE <= port && port < (CODEC_IO_BASE+0x20))
+		return 1;
+	else
+		return 0;
+}
+#endif
+
+/* In case someone configures the kernel w/o PCI support: in that */
+/* scenario, don't ever bother to check for PCI-window addresses */
+
+/* NOTE: WINDOW CHECK MAY BE A BIT OFF, HIGH PCIBIOS_MIN_IO WRAPS? */
+#if defined(CONFIG_PCI)
+#define CHECK_SH7751_PCIIO(port) \
+  ((port >= PCIBIOS_MIN_IO) && (port < (PCIBIOS_MIN_IO + SH7751_PCI_IO_SIZE)))
+#else
+#define CHECK_SH7751_PCIIO(port) (0)
+#endif
+
+/*
+ * General outline: remap really low stuff [eventually] to SuperIO,
+ * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
+ * is mapped through the PCI IO window.  Stuff with high bits (PXSEG)
+ * should be way beyond the window, and is used  w/o translation for
+ * compatibility.
+ */
+unsigned char hs7751rvoip_inb(unsigned long port)
+{
+	if (PXSEG(port))
+		return *(volatile unsigned char *)port;
+#if defined(CONFIG_HS7751RVOIP_CODEC)
+	else if (codec_port(port))
+		return *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE));
+#endif
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		return *(volatile unsigned char *)PCI_IOMAP(port);
+	else
+		return (*(volatile unsigned short *)port2adr(port) & 0xff);
+}
+
+unsigned char hs7751rvoip_inb_p(unsigned long port)
+{
+	unsigned char v;
+
+        if (PXSEG(port))
+                v = *(volatile unsigned char *)port;
+#if defined(CONFIG_HS7751RVOIP_CODEC)
+	else if (codec_port(port))
+		v = *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE));
+#endif
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+                v = *(volatile unsigned char *)PCI_IOMAP(port);
+	else
+		v = (*(volatile unsigned short *)port2adr(port) & 0xff);
+	delay();
+	return v;
+}
+
+unsigned short hs7751rvoip_inw(unsigned long port)
+{
+        if (PXSEG(port))
+                return *(volatile unsigned short *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+                return *(volatile unsigned short *)PCI_IOMAP(port);
+	else
+		maybebadio(inw, port);
+	return 0;
+}
+
+unsigned int hs7751rvoip_inl(unsigned long port)
+{
+        if (PXSEG(port))
+                return *(volatile unsigned long *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+                return *(volatile unsigned long *)PCI_IOMAP(port);
+	else
+		maybebadio(inl, port);
+	return 0;
+}
+
+void hs7751rvoip_outb(unsigned char value, unsigned long port)
+{
+
+        if (PXSEG(port))
+                *(volatile unsigned char *)port = value;
+#if defined(CONFIG_HS7751RVOIP_CIDEC)
+	else if (codec_port(port))
+		*(volatile unsigned cjar *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value;
+#endif
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+        	*(unsigned char *)PCI_IOMAP(port) = value;
+	else
+		*(volatile unsigned short *)port2adr(port) = value;
+}
+
+void hs7751rvoip_outb_p(unsigned char value, unsigned long port)
+{
+        if (PXSEG(port))
+                *(volatile unsigned char *)port = value;
+#if defined(CONFIG_HS7751RVOIP_CIDEC)
+	else if (codec_port(port))
+		*(volatile unsigned cjar *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value;
+#endif
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+        	*(unsigned char *)PCI_IOMAP(port) = value;
+	else
+		*(volatile unsigned short *)port2adr(port) = value;
+	delay();
+}
+
+void hs7751rvoip_outw(unsigned short value, unsigned long port)
+{
+        if (PXSEG(port))
+                *(volatile unsigned short *)port = value;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+        	*(unsigned short *)PCI_IOMAP(port) = value;
+	else
+		maybebadio(outw, port);
+}
+
+void hs7751rvoip_outl(unsigned int value, unsigned long port)
+{
+        if (PXSEG(port))
+                *(volatile unsigned long *)port = value;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+        	*((unsigned long *)PCI_IOMAP(port)) = value;
+	else
+		maybebadio(outl, port);
+}
+
+void hs7751rvoip_insb(unsigned long port, void *addr, unsigned long count)
+{
+	if (PXSEG(port))
+		while (count--) *((unsigned char *) addr)++ = *(volatile unsigned char *)port;
+#if defined(CONFIG_HS7751RVOIP_CODEC)
+	else if (codec_port(port))
+		while (count--) *((unsigned char *) addr)++ = *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE));
+#endif
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) {
+		volatile __u8 *bp = (__u8 *)PCI_IOMAP(port);
+
+		while (count--) *((volatile unsigned char *) addr)++ = *bp;
+	} else {
+		volatile __u16 *p = (volatile unsigned short *)port2adr(port);
+
+		while (count--) *((unsigned char *) addr)++ = *p & 0xff;
+	}
+}
+
+void hs7751rvoip_insw(unsigned long port, void *addr, unsigned long count)
+{
+	volatile __u16 *p;
+
+	if (PXSEG(port))
+		p = (volatile unsigned short *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		p = (volatile unsigned short *)PCI_IOMAP(port);
+	else
+		p = (volatile unsigned short *)port2adr(port);
+	while (count--) *((__u16 *) addr)++ = *p;
+}
+
+void hs7751rvoip_insl(unsigned long port, void *addr, unsigned long count)
+{
+	if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) {
+		volatile __u32 *p = (__u32 *)PCI_IOMAP(port);
+
+		while (count--) *((__u32 *) addr)++ = *p;
+	} else
+		maybebadio(insl, port);
+}
+
+void hs7751rvoip_outsb(unsigned long port, const void *addr, unsigned long count)
+{
+	if (PXSEG(port))
+		while (count--) *(volatile unsigned char *)port = *((unsigned char *) addr)++;
+#if defined(CONFIG_HS7751RVOIP_CODEC)
+	else if (codec_port(port))
+		while (count--) *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = *((unsigned char *) addr)++;
+#endif
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) {
+		volatile __u8 *bp = (__u8 *)PCI_IOMAP(port);
+
+		while (count--) *bp = *((volatile unsigned char *) addr)++;
+	} else {
+		volatile __u16 *p = (volatile unsigned short *)port2adr(port);
+
+		while (count--) *p = *((unsigned char *) addr)++;
+	}
+}
+
+void hs7751rvoip_outsw(unsigned long port, const void *addr, unsigned long count)
+{
+	volatile __u16 *p;
+
+	if (PXSEG(port))
+		p = (volatile unsigned short *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		p = (volatile unsigned short *)PCI_IOMAP(port);
+	else
+		p = (volatile unsigned short *)port2adr(port);
+	while (count--) *p = *((__u16 *) addr)++;
+}
+
+void hs7751rvoip_outsl(unsigned long port, const void *addr, unsigned long count)
+{
+	if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) {
+		volatile __u32 *p = (__u32 *)PCI_IOMAP(port);
+
+		while (count--) *p = *((__u32 *) addr)++;
+	} else
+		maybebadio(outsl, port);
+}
+
+void *hs7751rvoip_ioremap(unsigned long offset, unsigned long size)
+{
+	if (offset >= 0xfd000000)
+		return (void *)offset;
+	else
+		return (void *)P2SEGADDR(offset);
+}
+EXPORT_SYMBOL(hs7751rvoip_ioremap);
+
+unsigned long hs7751rvoip_isa_port2addr(unsigned long offset)
+{
+	return port2adr(offset);
+}
--- diff/arch/sh/boards/renesas/hs7751rvoip/irq.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/hs7751rvoip/irq.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,122 @@
+/*
+ * linux/arch/sh/boards/renesas/hs7751rvoip/irq.c
+ *
+ * Copyright (C) 2000  Kazumoto Kojima
+ *
+ * Renesas Technology Sales HS7751RVoIP Support.
+ *
+ * Modified for HS7751RVoIP by
+ * Atom Create Engineering Co., Ltd. 2002.
+ * Lineo uSolutions, Inc. 2003.
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/hs7751rvoip/hs7751rvoip.h>
+
+static int mask_pos[] = {8, 9, 10, 11, 12, 13, 0, 1, 2, 3, 4, 5, 6, 7};
+
+static void enable_hs7751rvoip_irq(unsigned int irq);
+static void disable_hs7751rvoip_irq(unsigned int irq);
+
+/* shutdown is same as "disable" */
+#define shutdown_hs7751rvoip_irq disable_hs7751rvoip_irq
+
+static void ack_hs7751rvoip_irq(unsigned int irq);
+static void end_hs7751rvoip_irq(unsigned int irq);
+
+static unsigned int startup_hs7751rvoip_irq(unsigned int irq)
+{
+	enable_hs7751rvoip_irq(irq);
+	return 0; /* never anything pending */
+}
+
+static void disable_hs7751rvoip_irq(unsigned int irq)
+{
+	unsigned long flags;
+	unsigned short val;
+	unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]);
+
+	/* Set the priority in IPR to 0 */
+	local_irq_save(flags);
+	val = ctrl_inw(IRLCNTR3);
+	val &= mask;
+	ctrl_outw(val, IRLCNTR3);
+	local_irq_restore(flags);
+}
+
+static void enable_hs7751rvoip_irq(unsigned int irq)
+{
+	unsigned long flags;
+	unsigned short val;
+	unsigned short value = (0x0001 << mask_pos[irq]);
+
+	/* Set priority in IPR back to original value */
+	local_irq_save(flags);
+	val = ctrl_inw(IRLCNTR3);
+	val |= value;
+	ctrl_outw(val, IRLCNTR3);
+	local_irq_restore(flags);
+}
+
+static void ack_hs7751rvoip_irq(unsigned int irq)
+{
+	disable_hs7751rvoip_irq(irq);
+}
+
+static void end_hs7751rvoip_irq(unsigned int irq)
+{
+	if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+		enable_hs7751rvoip_irq(irq);
+}
+
+static struct hw_interrupt_type hs7751rvoip_irq_type = {
+	"HS7751RVoIP IRQ",
+	startup_hs7751rvoip_irq,
+	shutdown_hs7751rvoip_irq,
+	enable_hs7751rvoip_irq,
+	disable_hs7751rvoip_irq,
+	ack_hs7751rvoip_irq,
+	end_hs7751rvoip_irq,
+};
+
+static void make_hs7751rvoip_irq(unsigned int irq)
+{
+	disable_irq_nosync(irq);
+	irq_desc[irq].handler = &hs7751rvoip_irq_type;
+	disable_hs7751rvoip_irq(irq);
+}
+
+/*
+ * Initialize IRQ setting
+ */
+void __init init_hs7751rvoip_IRQ(void)
+{
+	int i;
+
+	/* IRL0=ON HOOK1
+	 * IRL1=OFF HOOK1
+	 * IRL2=ON HOOK2
+	 * IRL3=OFF HOOK2
+	 * IRL4=Ringing Detection
+	 * IRL5=CODEC
+	 * IRL6=Ethernet
+	 * IRL7=Ethernet Hub
+	 * IRL8=USB Communication
+	 * IRL9=USB Connection
+	 * IRL10=USB DMA
+	 * IRL11=CF Card
+	 * IRL12=PCMCIA
+	 * IRL13=PCI Slot
+	 */
+	ctrl_outw(0x9876, IRLCNTR1);
+	ctrl_outw(0xdcba, IRLCNTR2);
+	ctrl_outw(0x0050, IRLCNTR4);
+	ctrl_outw(0x4321, IRLCNTR5);
+
+	for (i=0; i<14; i++)
+		make_hs7751rvoip_irq(i);
+}
--- diff/arch/sh/boards/renesas/hs7751rvoip/led.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/hs7751rvoip/led.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,27 @@
+/*
+ * linux/arch/sh/kernel/setup_hs7751rvoip.c
+ *
+ * Copyright (C) 2000  Kazumoto Kojima
+ *
+ * Renesas Technology Sales HS7751RVoIP Support.
+ *
+ * Modified for HS7751RVoIP by
+ * Atom Create Engineering Co., Ltd. 2002.
+ * Lineo uSolutions, Inc. 2003.
+ */
+
+#include <linux/config.h>
+#include <asm/io.h>
+#include <asm/hs7751rvoip/hs7751rvoip.h>
+
+extern unsigned int debug_counter;
+
+void debug_led_disp(void)
+{
+	unsigned short value;
+
+	value = (unsigned char)debug_counter++;
+	ctrl_outb((0xf0|value), PA_OUTPORTR);
+	if (value == 0x0f)
+		debug_counter = 0;
+}
--- diff/arch/sh/boards/renesas/hs7751rvoip/mach.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/hs7751rvoip/mach.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,55 @@
+/*
+ * linux/arch/sh/kernel/mach_hs7751rvoip.c
+ *
+ * Minor tweak of mach_se.c file to reference hs7751rvoip-specific items.
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * Machine vector for the Renesas Technology sales HS7751RVoIP
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+
+#include <asm/machvec.h>
+#include <asm/rtc.h>
+#include <asm/irq.h>
+#include <asm/hs7751rvoip/io.h>
+
+extern void init_hs7751rvoip_IRQ(void);
+extern void *hs7751rvoip_ioremap(unsigned long, unsigned long);
+
+/*
+ * The Machine Vector
+ */
+
+struct sh_machine_vector mv_hs7751rvoip __initmv = {
+	.mv_nr_irqs		= 72,
+
+	.mv_inb			= hs7751rvoip_inb,
+	.mv_inw			= hs7751rvoip_inw,
+	.mv_inl			= hs7751rvoip_inl,
+	.mv_outb		= hs7751rvoip_outb,
+	.mv_outw		= hs7751rvoip_outw,
+	.mv_outl		= hs7751rvoip_outl,
+
+	.mv_inb_p		= hs7751rvoip_inb_p,
+	.mv_inw_p		= hs7751rvoip_inw,
+	.mv_inl_p		= hs7751rvoip_inl,
+	.mv_outb_p		= hs7751rvoip_outb_p,
+	.mv_outw_p		= hs7751rvoip_outw,
+	.mv_outl_p		= hs7751rvoip_outl,
+
+	.mv_insb		= hs7751rvoip_insb,
+	.mv_insw		= hs7751rvoip_insw,
+	.mv_insl		= hs7751rvoip_insl,
+	.mv_outsb		= hs7751rvoip_outsb,
+	.mv_outsw		= hs7751rvoip_outsw,
+	.mv_outsl		= hs7751rvoip_outsl,
+
+	.mv_ioremap		= hs7751rvoip_ioremap,
+	.mv_isa_port2addr	= hs7751rvoip_isa_port2addr,
+	.mv_init_irq		= init_hs7751rvoip_IRQ,
+};
+ALIAS_MV(hs7751rvoip)
--- diff/arch/sh/boards/renesas/hs7751rvoip/pci.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/hs7751rvoip/pci.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,150 @@
+/*
+ * linux/arch/sh/kernel/pci-hs7751rvoip.c
+ *
+ * Author:  Ian DaSilva (idasilva@mvista.com)
+ *
+ * Highly leveraged from pci-bigsur.c, written by Dustin McIntire.
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * PCI initialization for the Renesas SH7751R HS7751RVoIP board
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/pci.h>
+#include <linux/module.h>
+
+#include <asm/io.h>
+#include "../../../drivers/pci/pci-sh7751.h"
+#include <asm/hs7751rvoip/hs7751rvoip.h>
+
+#define PCIMCR_MRSET_OFF	0xBFFFFFFF
+#define PCIMCR_RFSH_OFF		0xFFFFFFFB
+
+/*
+ * Only long word accesses of the PCIC's internal local registers and the
+ * configuration registers from the CPU is supported.
+ */
+#define PCIC_WRITE(x,v) writel((v), PCI_REG(x))
+#define PCIC_READ(x) readl(PCI_REG(x))
+
+/*
+ * Description:  This function sets up and initializes the pcic, sets
+ * up the BARS, maps the DRAM into the address space etc, etc.
+ */
+int __init pcibios_init_platform(void)
+{
+	unsigned long bcr1, wcr1, wcr2, wcr3, mcr;
+	unsigned short bcr2, bcr3;
+
+	/*
+	 * Initialize the slave bus controller on the pcic.  The values used
+	 * here should not be hardcoded, but they should be taken from the bsc
+	 * on the processor, to make this function as generic as possible.
+	 * (i.e. Another sbc may usr different SDRAM timing settings -- in order
+	 * for the pcic to work, its settings need to be exactly the same.)
+	 */
+	bcr1 = (*(volatile unsigned long *)(SH7751_BCR1));
+	bcr2 = (*(volatile unsigned short *)(SH7751_BCR2));
+	bcr3 = (*(volatile unsigned short *)(SH7751_BCR3));
+	wcr1 = (*(volatile unsigned long *)(SH7751_WCR1));
+	wcr2 = (*(volatile unsigned long *)(SH7751_WCR2));
+	wcr3 = (*(volatile unsigned long *)(SH7751_WCR3));
+	mcr = (*(volatile unsigned long *)(SH7751_MCR));
+
+	bcr1 = bcr1 | 0x00080000;  /* Enable Bit 19, BREQEN */
+	(*(volatile unsigned long *)(SH7751_BCR1)) = bcr1;
+
+	bcr1 = bcr1 | 0x40080000;  /* Enable Bit 19 BREQEN, set PCIC to slave */
+	PCIC_WRITE(SH7751_PCIBCR1, bcr1);	/* PCIC BCR1 */
+	PCIC_WRITE(SH7751_PCIBCR2, bcr2);	/* PCIC BCR2 */
+	PCIC_WRITE(SH7751_PCIBCR3, bcr3);	/* PCIC BCR3 */
+	PCIC_WRITE(SH7751_PCIWCR1, wcr1);	/* PCIC WCR1 */
+	PCIC_WRITE(SH7751_PCIWCR2, wcr2);	/* PCIC WCR2 */
+	PCIC_WRITE(SH7751_PCIWCR3, wcr3);	/* PCIC WCR3 */
+	mcr = (mcr & PCIMCR_MRSET_OFF) & PCIMCR_RFSH_OFF;
+	PCIC_WRITE(SH7751_PCIMCR, mcr);		/* PCIC MCR */
+
+	/* Enable all interrupts, so we know what to fix */
+	PCIC_WRITE(SH7751_PCIINTM, 0x0000c3ff);
+	PCIC_WRITE(SH7751_PCIAINTM, 0x0000380f);
+
+	/* Set up standard PCI config registers */
+	PCIC_WRITE(SH7751_PCICONF1, 0xFB900047); /* Bus Master, Mem & I/O access */
+	PCIC_WRITE(SH7751_PCICONF2, 0x00000000); /* PCI Class code & Revision ID */
+	PCIC_WRITE(SH7751_PCICONF4, 0xab000001); /* PCI I/O address (local regs) */
+	PCIC_WRITE(SH7751_PCICONF5, 0x0c000000); /* PCI MEM address (local RAM)  */
+	PCIC_WRITE(SH7751_PCICONF6, 0xd0000000); /* PCI MEM address (unused) */
+	PCIC_WRITE(SH7751_PCICONF11, 0x35051054); /* PCI Subsystem ID & Vendor ID */
+	PCIC_WRITE(SH7751_PCILSR0, 0x03f00000);	/* MEM (full 64M exposed) */
+	PCIC_WRITE(SH7751_PCILSR1, 0x00000000); /* MEM (unused) */
+	PCIC_WRITE(SH7751_PCILAR0, 0x0c000000); /* MEM (direct map from PCI) */
+	PCIC_WRITE(SH7751_PCILAR1, 0x00000000); /* MEM (unused) */
+
+	/* Now turn it on... */
+	PCIC_WRITE(SH7751_PCICR, 0xa5000001);
+
+	/*
+	 * Set PCIMBR and PCIIOBR here, assuming a single window
+	 * (16M MEM, 256K IO) is enough.  If a larger space is
+	 * needed, the readx/writex and inx/outx functions will
+	 * have to do more (e.g. setting registers for each call).
+	 */
+
+	/*
+	 * Set the MBR so PCI address is one-to-one with window,
+	 * meaning all calls go straight through... use ifdef to
+	 * catch erroneous assumption.
+	 */
+	BUG_ON(PCIBIOS_MIN_MEM != SH7751_PCI_MEMORY_BASE);
+
+	PCIC_WRITE(SH7751_PCIMBR, PCIBIOS_MIN_MEM);
+
+	/* Set IOBR for window containing area specified in pci.h */
+	PCIC_WRITE(SH7751_PCIIOBR, (PCIBIOS_MIN_IO & SH7751_PCIIOBR_MASK));
+
+	/* All done, may as well say so... */
+	printk("SH7751R PCI: Finished initialization of the PCI controller\n");
+
+	return 1;
+}
+
+int __init pcibios_map_platform_irq(u8 slot, u8 pin)
+{
+        switch (slot) {
+	case 0: return IRQ_PCISLOT;	/* PCI Extend slot */
+	case 1: return IRQ_PCMCIA;	/* PCI Cardbus Bridge */
+	case 2: return IRQ_PCIETH;	/* Realtek Ethernet controller */
+	case 3: return IRQ_PCIHUB;	/* Realtek Ethernet Hub controller */
+	default:
+		printk("PCI: Bad IRQ mapping request for slot %d\n", slot);
+		return -1;
+	}
+}
+
+static struct resource sh7751_io_resource = {
+	.name	= "SH7751_IO",
+	.start	= 0x4000,
+	.end	= 0x4000 + SH7751_PCI_IO_SIZE - 1,
+	.flags	= IORESOURCE_IO
+};
+
+static struct resource sh7751_mem_resource = {
+	.name	= "SH7751_mem",
+	.start	= SH7751_PCI_MEMORY_BASE,
+	.end	= SH7751_PCI_MEMORY_BASE + SH7751_PCI_MEM_SIZE - 1,
+	.flags	= IORESOURCE_MEM
+};
+
+extern struct pci_ops sh7751_pci_ops;
+
+struct pci_channel board_pci_channels[] = {
+	{ &sh7751_pci_ops, &sh7751_io_resource, &sh7751_mem_resource, 0, 0xff },
+	{ NULL, NULL, NULL, 0, 0 },
+};
+EXPORT_SYMBOL(board_pci_channels);
--- diff/arch/sh/boards/renesas/hs7751rvoip/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/hs7751rvoip/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,89 @@
+/*
+ * linux/arch/sh/kernel/setup_hs7751rvoip.c
+ *
+ * Copyright (C) 2000  Kazumoto Kojima
+ *
+ * Renesas Technology Sales HS7751RVoIP Support.
+ *
+ * Modified for HS7751RVoIP by
+ * Atom Create Engineering Co., Ltd. 2002.
+ * Lineo uSolutions, Inc. 2003.
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+
+#include <linux/hdreg.h>
+#include <linux/ide.h>
+#include <asm/io.h>
+#include <asm/hs7751rvoip/hs7751rvoip.h>
+
+#include <linux/mm.h>
+#include <linux/vmalloc.h>
+
+/* defined in mm/ioremap.c */
+extern void * p3_ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags);
+
+unsigned int debug_counter;
+
+const char *get_system_type(void)
+{
+	return "HS7751RVoIP";
+}
+
+/*
+ * Initialize the board
+ */
+void __init platform_setup(void)
+{
+	printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n");
+	ctrl_outb(0xf0, PA_OUTPORTR);
+	debug_counter = 0;
+}
+
+void *area5_io8_base;
+void *area6_io8_base;
+void *area5_io16_base;
+void *area6_io16_base;
+
+int __init cf_init(void)
+{
+	pgprot_t prot;
+	unsigned long paddrbase, psize;
+
+	/* open I/O area window */
+	paddrbase = virt_to_phys((void *)(PA_AREA5_IO+0x00000800));
+	psize = PAGE_SIZE;
+	prot = PAGE_KERNEL_PCC(1, _PAGE_PCC_COM16);
+	area5_io16_base = p3_ioremap(paddrbase, psize, prot.pgprot);
+	if (!area5_io16_base) {
+		printk("allocate_cf_area : can't open CF I/O window!\n");
+		return -ENOMEM;
+	}
+
+	/* XXX : do we need attribute and common-memory area also? */
+
+	paddrbase = virt_to_phys((void *)PA_AREA6_IO);
+	psize = PAGE_SIZE;
+#if defined(CONFIG_HS7751RVOIP_CODEC)
+	prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_COM8);
+#else
+	prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_IO8);
+#endif
+	area6_io8_base = p3_ioremap(paddrbase, psize, prot.pgprot);
+	if (!area6_io8_base) {
+		printk("allocate_cf_area : can't open CODEC I/O 8bit window!\n");
+		return -ENOMEM;
+	}
+	prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_IO16);
+	area6_io16_base = p3_ioremap(paddrbase, psize, prot.pgprot);
+	if (!area6_io16_base) {
+		printk("allocate_cf_area : can't open CODEC I/O 16bit window!\n");
+		return -ENOMEM;
+	}
+
+	return 0;
+}
+
+__initcall (cf_init);
--- diff/arch/sh/boards/renesas/rts7751r2d/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/rts7751r2d/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,10 @@
+#
+# Makefile for the RTS7751R2D specific parts of the kernel
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+obj-y	 := mach.o setup.o io.o irq.o led.o
+
--- diff/arch/sh/boards/renesas/rts7751r2d/io.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/rts7751r2d/io.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,319 @@
+/*
+ * linux/arch/sh/kernel/io_rts7751r2d.c
+ *
+ * Copyright (C) 2001  Ian da Silva, Jeremy Siegel
+ * Based largely on io_se.c.
+ *
+ * I/O routine for Renesas Technology sales RTS7751R2D.
+ *
+ * Initial version only to support LAN access; some
+ * placeholder code from io_rts7751r2d.c left in with the
+ * expectation of later SuperIO and PCMCIA access.
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <asm/io.h>
+#include <asm/rts7751r2d/rts7751r2d.h>
+#include <asm/addrspace.h>
+
+#include <linux/module.h>
+#include <linux/pci.h>
+#include "../../../drivers/pci/pci-sh7751.h"
+
+/*
+ * The 7751R RTS7751R2D uses the built-in PCI controller (PCIC)
+ * of the 7751R processor, and has a SuperIO accessible via the PCI.
+ * The board also includes a PCMCIA controller on its memory bus,
+ * like the other Solution Engine boards.
+ */
+
+#define PCIIOBR		(volatile long *)PCI_REG(SH7751_PCIIOBR)
+#define PCIMBR          (volatile long *)PCI_REG(SH7751_PCIMBR)
+#define PCI_IO_AREA	SH7751_PCI_IO_BASE
+#define PCI_MEM_AREA	SH7751_PCI_CONFIG_BASE
+
+#define PCI_IOMAP(adr)	(PCI_IO_AREA + (adr & ~SH7751_PCIIOBR_MASK))
+
+#define maybebadio(name,port) \
+  printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \
+	 #name, (port), (__u32) __builtin_return_address(0))
+
+static inline void delay(void)
+{
+	ctrl_inw(0xa0000000);
+}
+
+static inline unsigned long port2adr(unsigned int port)
+{
+	if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
+		if (port == 0x3f6)
+			return (PA_AREA5_IO + 0x80c);
+		else
+			return (PA_AREA5_IO + 0x1000 + ((port-0x1f0) << 1));
+	else
+		maybebadio(port2adr, (unsigned long)port);
+
+	return port;
+}
+
+static inline unsigned long port88796l(unsigned int port, int flag)
+{
+	unsigned long addr;
+
+	if (flag)
+		addr = PA_AX88796L + ((port - AX88796L_IO_BASE) << 1);
+	else
+		addr = PA_AX88796L + ((port - AX88796L_IO_BASE) << 1) + 0x1000;
+
+	return addr;
+}
+
+/* The 7751R RTS7751R2D seems to have everything hooked */
+/* up pretty normally (nothing on high-bytes only...) so this */
+/* shouldn't be needed */
+static inline int shifted_port(unsigned long port)
+{
+	/* For IDE registers, value is not shifted */
+	if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
+		return 0;
+	else
+		return 1;
+}
+
+/* In case someone configures the kernel w/o PCI support: in that */
+/* scenario, don't ever bother to check for PCI-window addresses */
+
+/* NOTE: WINDOW CHECK MAY BE A BIT OFF, HIGH PCIBIOS_MIN_IO WRAPS? */
+#if defined(CONFIG_PCI)
+#define CHECK_SH7751_PCIIO(port) \
+  ((port >= PCIBIOS_MIN_IO) && (port < (PCIBIOS_MIN_IO + SH7751_PCI_IO_SIZE)))
+#else
+#define CHECK_SH7751_PCIIO(port) (0)
+#endif
+
+#if defined(CONFIG_NE2000) || defined(CONFIG_NE2000_MODULE)
+#define CHECK_AX88796L_PORT(port) \
+  ((port >= AX88796L_IO_BASE) && (port < (AX88796L_IO_BASE+0x20)))
+#else
+#define CHECK_AX88796L_PORT(port) (0)
+#endif
+
+/*
+ * General outline: remap really low stuff [eventually] to SuperIO,
+ * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
+ * is mapped through the PCI IO window.  Stuff with high bits (PXSEG)
+ * should be way beyond the window, and is used  w/o translation for
+ * compatibility.
+ */
+unsigned char rts7751r2d_inb(unsigned long port)
+{
+	if (CHECK_AX88796L_PORT(port))
+		return (*(volatile unsigned short *)port88796l(port, 0)) & 0xff;
+	else if (PXSEG(port))
+		return *(volatile unsigned char *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		return *(volatile unsigned char *)PCI_IOMAP(port);
+	else
+		return (*(volatile unsigned short *)port2adr(port) & 0xff);
+}
+
+unsigned char rts7751r2d_inb_p(unsigned long port)
+{
+	unsigned char v;
+
+	if (CHECK_AX88796L_PORT(port))
+		v = (*(volatile unsigned short *)port88796l(port, 0)) & 0xff;
+        else if (PXSEG(port))
+		v = *(volatile unsigned char *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		v = *(volatile unsigned char *)PCI_IOMAP(port);
+	else
+		v = (*(volatile unsigned short *)port2adr(port) & 0xff);
+	delay();
+
+	return v;
+}
+
+unsigned short rts7751r2d_inw(unsigned long port)
+{
+	if (CHECK_AX88796L_PORT(port))
+		maybebadio(inw, port);
+        else if (PXSEG(port))
+		return *(volatile unsigned short *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		return *(volatile unsigned short *)PCI_IOMAP(port);
+	else
+		maybebadio(inw, port);
+
+	return 0;
+}
+
+unsigned int rts7751r2d_inl(unsigned long port)
+{
+	if (CHECK_AX88796L_PORT(port))
+		maybebadio(inl, port);
+        else if (PXSEG(port))
+		return *(volatile unsigned long *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		return *(volatile unsigned long *)PCI_IOMAP(port);
+	else
+		maybebadio(inl, port);
+
+	return 0;
+}
+
+void rts7751r2d_outb(unsigned char value, unsigned long port)
+{
+	if (CHECK_AX88796L_PORT(port))
+		*((volatile unsigned short *)port88796l(port, 0)) = value;
+        else if (PXSEG(port))
+		*(volatile unsigned char *)port = value;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		*(volatile unsigned char *)PCI_IOMAP(port) = value;
+	else
+		*(volatile unsigned short *)port2adr(port) = value;
+}
+
+void rts7751r2d_outb_p(unsigned char value, unsigned long port)
+{
+	if (CHECK_AX88796L_PORT(port))
+		*((volatile unsigned short *)port88796l(port, 0)) = value;
+        else if (PXSEG(port))
+		*(volatile unsigned char *)port = value;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		*(volatile unsigned char *)PCI_IOMAP(port) = value;
+	else
+		*(volatile unsigned short *)port2adr(port) = value;
+	delay();
+}
+
+void rts7751r2d_outw(unsigned short value, unsigned long port)
+{
+	if (CHECK_AX88796L_PORT(port))
+		maybebadio(outw, port);
+        else if (PXSEG(port))
+		*(volatile unsigned short *)port = value;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		*(volatile unsigned short *)PCI_IOMAP(port) = value;
+	else
+		maybebadio(outw, port);
+}
+
+void rts7751r2d_outl(unsigned int value, unsigned long port)
+{
+	if (CHECK_AX88796L_PORT(port))
+		maybebadio(outl, port);
+        else if (PXSEG(port))
+		*(volatile unsigned long *)port = value;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		*(volatile unsigned long *)PCI_IOMAP(port) = value;
+	else
+		maybebadio(outl, port);
+}
+
+void rts7751r2d_insb(unsigned long port, void *addr, unsigned long count)
+{
+	volatile __u8 *bp;
+	volatile __u16 *p;
+
+	if (CHECK_AX88796L_PORT(port)) {
+		p = (volatile unsigned short *)port88796l(port, 0);
+		while (count--) *((unsigned char *) addr)++ = *p & 0xff;
+	} else if (PXSEG(port))
+		while (count--) *((unsigned char *) addr)++ = *(volatile unsigned char *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) {
+		bp = (__u8 *)PCI_IOMAP(port);
+		while (count--) *((volatile unsigned char *) addr)++ = *bp;
+	} else {
+		p = (volatile unsigned short *)port2adr(port);
+		while (count--) *((unsigned char *) addr)++ = *p & 0xff;
+	}
+}
+
+void rts7751r2d_insw(unsigned long port, void *addr, unsigned long count)
+{
+	volatile __u16 *p;
+
+	if (CHECK_AX88796L_PORT(port))
+		p = (volatile unsigned short *)port88796l(port, 1);
+	else if (PXSEG(port))
+		p = (volatile unsigned short *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		p = (volatile unsigned short *)PCI_IOMAP(port);
+	else
+		p = (volatile unsigned short *)port2adr(port);
+	while (count--) *((__u16 *) addr)++ = *p;
+}
+
+void rts7751r2d_insl(unsigned long port, void *addr, unsigned long count)
+{
+	if (CHECK_AX88796L_PORT(port))
+		maybebadio(insl, port);
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) {
+		volatile __u32 *p = (__u32 *)PCI_IOMAP(port);
+
+		while (count--) *((__u32 *) addr)++ = *p;
+	} else
+		maybebadio(insl, port);
+}
+
+void rts7751r2d_outsb(unsigned long port, const void *addr, unsigned long count)
+{
+	volatile __u8 *bp;
+	volatile __u16 *p;
+
+	if (CHECK_AX88796L_PORT(port)) {
+		p = (volatile unsigned short *)port88796l(port, 0);
+		while (count--) *p = *((unsigned char *) addr)++;
+	} else if (PXSEG(port))
+		while (count--) *(volatile unsigned char *)port = *((unsigned char *) addr)++;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) {
+		bp = (__u8 *)PCI_IOMAP(port);
+		while (count--) *bp = *((volatile unsigned char *) addr)++;
+	} else {
+		p = (volatile unsigned short *)port2adr(port);
+		while (count--) *p = *((unsigned char *) addr)++;
+	}
+}
+
+void rts7751r2d_outsw(unsigned long port, const void *addr, unsigned long count)
+{
+	volatile __u16 *p;
+
+	if (CHECK_AX88796L_PORT(port))
+		p = (volatile unsigned short *)port88796l(port, 1);
+	else if (PXSEG(port))
+		p = (volatile unsigned short *)port;
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
+		p = (volatile unsigned short *)PCI_IOMAP(port);
+	else
+		p = (volatile unsigned short *)port2adr(port);
+	while (count--) *p = *((__u16 *) addr)++;
+}
+
+void rts7751r2d_outsl(unsigned long port, const void *addr, unsigned long count)
+{
+	if (CHECK_AX88796L_PORT(port))
+		maybebadio(outsl, port);
+	else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) {
+		volatile __u32 *p = (__u32 *)PCI_IOMAP(port);
+
+		while (count--) *p = *((__u32 *) addr)++;
+	} else
+		maybebadio(outsl, port);
+}
+
+void *rts7751r2d_ioremap(unsigned long offset, unsigned long size)
+{
+	if (offset >= 0xfd000000)
+		return (void *)offset;
+	else
+		return (void *)P2SEGADDR(offset);
+}
+EXPORT_SYMBOL(rts7751r2d_ioremap);
+
+unsigned long rts7751r2d_isa_port2addr(unsigned long offset)
+{
+	return port2adr(offset);
+}
--- diff/arch/sh/boards/renesas/rts7751r2d/irq.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/rts7751r2d/irq.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,135 @@
+/*
+ * linux/arch/sh/boards/renesas/rts7751r2d/irq.c
+ *
+ * Copyright (C) 2000  Kazumoto Kojima
+ *
+ * Renesas Technology Sales RTS7751R2D Support.
+ *
+ * Modified for RTS7751R2D by
+ * Atom Create Engineering Co., Ltd. 2002.
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/rts7751r2d/rts7751r2d.h>
+
+#if defined(CONFIG_RTS7751R2D_REV11)
+static int mask_pos[] = {11, 9, 8, 12, 10, 6, 5, 4, 7, 14, 13, 0, 0, 0, 0};
+#else
+static int mask_pos[] = {6, 11, 9, 8, 12, 10, 5, 4, 7, 14, 13, 0, 0, 0, 0};
+#endif
+
+extern int voyagergx_irq_demux(int irq);
+extern void setup_voyagergx_irq(void);
+
+static void enable_rts7751r2d_irq(unsigned int irq);
+static void disable_rts7751r2d_irq(unsigned int irq);
+
+/* shutdown is same as "disable" */
+#define shutdown_rts7751r2d_irq disable_rts7751r2d_irq
+
+static void ack_rts7751r2d_irq(unsigned int irq);
+static void end_rts7751r2d_irq(unsigned int irq);
+
+static unsigned int startup_rts7751r2d_irq(unsigned int irq)
+{
+	enable_rts7751r2d_irq(irq);
+	return 0; /* never anything pending */
+}
+
+static void disable_rts7751r2d_irq(unsigned int irq)
+{
+	unsigned long flags;
+	unsigned short val;
+	unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]);
+
+	/* Set the priority in IPR to 0 */
+	local_irq_save(flags);
+	val = ctrl_inw(IRLCNTR1);
+	val &= mask;
+	ctrl_outw(val, IRLCNTR1);
+	local_irq_restore(flags);
+}
+
+static void enable_rts7751r2d_irq(unsigned int irq)
+{
+	unsigned long flags;
+	unsigned short val;
+	unsigned short value = (0x0001 << mask_pos[irq]);
+
+	/* Set priority in IPR back to original value */
+	local_irq_save(flags);
+	val = ctrl_inw(IRLCNTR1);
+	val |= value;
+	ctrl_outw(val, IRLCNTR1);
+	local_irq_restore(flags);
+}
+
+int rts7751r2d_irq_demux(int irq)
+{
+	int demux_irq;
+
+	demux_irq = voyagergx_irq_demux(irq);
+	return demux_irq;
+}
+
+static void ack_rts7751r2d_irq(unsigned int irq)
+{
+	disable_rts7751r2d_irq(irq);
+}
+
+static void end_rts7751r2d_irq(unsigned int irq)
+{
+	if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+		enable_rts7751r2d_irq(irq);
+}
+
+static struct hw_interrupt_type rts7751r2d_irq_type = {
+	"RTS7751R2D IRQ",
+	startup_rts7751r2d_irq,
+	shutdown_rts7751r2d_irq,
+	enable_rts7751r2d_irq,
+	disable_rts7751r2d_irq,
+	ack_rts7751r2d_irq,
+	end_rts7751r2d_irq,
+};
+
+static void make_rts7751r2d_irq(unsigned int irq)
+{
+	disable_irq_nosync(irq);
+	irq_desc[irq].handler = &rts7751r2d_irq_type;
+	disable_rts7751r2d_irq(irq);
+}
+
+/*
+ * Initialize IRQ setting
+ */
+void __init init_rts7751r2d_IRQ(void)
+{
+	int i;
+
+	/* IRL0=KEY Input
+	 * IRL1=Ethernet
+	 * IRL2=CF Card
+	 * IRL3=CF Card Insert
+	 * IRL4=PCMCIA
+	 * IRL5=VOYAGER
+	 * IRL6=RTC Alarm
+	 * IRL7=RTC Timer
+	 * IRL8=SD Card
+	 * IRL9=PCI Slot #1
+	 * IRL10=PCI Slot #2
+	 * IRL11=Extention #0
+	 * IRL12=Extention #1
+	 * IRL13=Extention #2
+	 * IRL14=Extention #3
+	 */
+
+	for (i=0; i<15; i++)
+		make_rts7751r2d_irq(i);
+
+	setup_voyagergx_irq();
+}
--- diff/arch/sh/boards/renesas/rts7751r2d/led.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/rts7751r2d/led.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,67 @@
+/*
+ * linux/arch/sh/kernel/led_rts7751r2d.c
+ *
+ * Copyright (C) Atom Create Engineering Co., Ltd.
+ *
+ * May be copied or modified under the terms of GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * This file contains Renesas Technology Sales RTS7751R2D specific LED code.
+ */
+
+#include <linux/config.h>
+#include <asm/io.h>
+#include <asm/rts7751r2d/rts7751r2d.h>
+
+extern unsigned int debug_counter;
+
+#ifdef CONFIG_HEARTBEAT
+
+#include <linux/sched.h>
+
+/* Cycle the LED's in the clasic Knightriger/Sun pattern */
+void heartbeat_rts7751r2d(void)
+{
+	static unsigned int cnt = 0, period = 0;
+	volatile unsigned short *p = (volatile unsigned short *)PA_OUTPORT;
+	static unsigned bit = 0, up = 1;
+
+	cnt += 1;
+	if (cnt < period)
+		return;
+
+	cnt = 0;
+
+	/* Go through the points (roughly!):
+	 * f(0)=10, f(1)=16, f(2)=20, f(5)=35, f(int)->110
+	 */
+	period = 110 - ((300 << FSHIFT)/((avenrun[0]/5) + (3<<FSHIFT)));
+
+	*p = 1 << bit;
+	if (up)
+		if (bit == 7) {
+			bit--;
+			up = 0;
+		} else
+			bit++;
+	else if (bit == 0)
+		up = 1;
+	else
+		bit--;
+}
+#endif /* CONFIG_HEARTBEAT */
+
+void rts7751r2d_led(unsigned short value)
+{
+	ctrl_outw(value, PA_OUTPORT);
+}
+
+void debug_led_disp(void)
+{
+	unsigned short value;
+
+	value = (unsigned short)debug_counter++;
+	rts7751r2d_led(value);
+	if (value == 0xff)
+		debug_counter = 0;
+}
--- diff/arch/sh/boards/renesas/rts7751r2d/mach.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/rts7751r2d/mach.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,68 @@
+/*
+ * linux/arch/sh/kernel/mach_rts7751r2d.c
+ *
+ * Minor tweak of mach_se.c file to reference rts7751r2d-specific items.
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * Machine vector for the Renesas Technology sales RTS7751R2D
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/types.h>
+
+#include <asm/machvec.h>
+#include <asm/rtc.h>
+#include <asm/irq.h>
+#include <asm/rts7751r2d/io.h>
+
+extern void heartbeat_rts7751r2d(void);
+extern void init_rts7751r2d_IRQ(void);
+extern void *rts7751r2d_ioremap(unsigned long, unsigned long);
+extern int rts7751r2d_irq_demux(int irq);
+
+extern void *voyagergx_consistent_alloc(struct device *, size_t, dma_addr_t *, int);
+extern void voyagergx_consistent_free(struct device *, size_t, void *, dma_addr_t);
+
+/*
+ * The Machine Vector
+ */
+
+struct sh_machine_vector mv_rts7751r2d __initmv = {
+	.mv_nr_irqs		= 72,
+
+	.mv_inb			= rts7751r2d_inb,
+	.mv_inw			= rts7751r2d_inw,
+	.mv_inl			= rts7751r2d_inl,
+	.mv_outb		= rts7751r2d_outb,
+	.mv_outw		= rts7751r2d_outw,
+	.mv_outl		= rts7751r2d_outl,
+
+	.mv_inb_p		= rts7751r2d_inb_p,
+	.mv_inw_p		= rts7751r2d_inw,
+	.mv_inl_p		= rts7751r2d_inl,
+	.mv_outb_p		= rts7751r2d_outb_p,
+	.mv_outw_p		= rts7751r2d_outw,
+	.mv_outl_p		= rts7751r2d_outl,
+
+	.mv_insb		= rts7751r2d_insb,
+	.mv_insw		= rts7751r2d_insw,
+	.mv_insl		= rts7751r2d_insl,
+	.mv_outsb		= rts7751r2d_outsb,
+	.mv_outsw		= rts7751r2d_outsw,
+	.mv_outsl		= rts7751r2d_outsl,
+
+	.mv_ioremap		= rts7751r2d_ioremap,
+	.mv_isa_port2addr	= rts7751r2d_isa_port2addr,
+	.mv_init_irq		= init_rts7751r2d_IRQ,
+#ifdef CONFIG_HEARTBEAT
+	.mv_heartbeat		= heartbeat_rts7751r2d,
+#endif
+	.mv_irq_demux		= rts7751r2d_irq_demux,
+
+	.mv_consistent_alloc	= voyagergx_consistent_alloc,
+	.mv_consistent_free	= voyagergx_consistent_free,
+};
+ALIAS_MV(rts7751r2d)
--- diff/arch/sh/boards/renesas/rts7751r2d/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/rts7751r2d/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,31 @@
+/*
+ * linux/arch/sh/kernel/setup_rts7751r2d.c
+ *
+ * Copyright (C) 2000  Kazumoto Kojima
+ *
+ * Renesas Technology Sales RTS7751R2D Support.
+ *
+ * Modified for RTS7751R2D by
+ * Atom Create Engineering Co., Ltd. 2002.
+ */
+
+#include <linux/init.h>
+#include <asm/io.h>
+#include <asm/rts7751r2d/rts7751r2d.h>
+
+unsigned int debug_counter;
+
+const char *get_system_type(void)
+{
+	return "RTS7751R2D";
+}
+
+/*
+ * Initialize the board
+ */
+void __init platform_setup(void)
+{
+	printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n");
+	ctrl_outw(0x0000, PA_OUTPORT);
+	debug_counter = 0;
+}
--- diff/arch/sh/boards/renesas/systemh/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/systemh/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,13 @@
+#
+# Makefile for the SystemH specific parts of the kernel
+#
+
+obj-y	 := setup.o irq.o io.o
+
+# XXX: This wants to be consolidated in arch/sh/drivers/pci, and more
+# importantly, with the generic sh7751_pcic_init() code. For now, we'll
+# just abuse the hell out of kbuild, because we can..
+
+obj-$(CONFIG_PCI) += pci.o
+pci-y := ../../se/7751/pci.o
+
--- diff/arch/sh/boards/renesas/systemh/io.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/systemh/io.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,283 @@
+/*
+ * linux/arch/sh/boards/systemh/io.c
+ *
+ * Copyright (C) 2001  Ian da Silva, Jeremy Siegel
+ * Based largely on io_se.c.
+ *
+ * I/O routine for Hitachi 7751 Systemh.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <asm/systemh/7751systemh.h>
+#include <asm/addrspace.h>
+#include <asm/io.h>
+
+#include <linux/pci.h>
+#include "../../drivers/pci/pci-sh7751.h"
+
+/*
+ * The 7751 SystemH Engine uses the built-in PCI controller (PCIC)
+ * of the 7751 processor, and has a SuperIO accessible on its memory
+ * bus.
+ */
+
+#define PCIIOBR		(volatile long *)PCI_REG(SH7751_PCIIOBR)
+#define PCIMBR          (volatile long *)PCI_REG(SH7751_PCIMBR)
+#define PCI_IO_AREA	SH7751_PCI_IO_BASE
+#define PCI_MEM_AREA	SH7751_PCI_CONFIG_BASE
+
+#define PCI_IOMAP(adr)	(PCI_IO_AREA + (adr & ~SH7751_PCIIOBR_MASK))
+#define ETHER_IOMAP(adr) (0xB3000000 + (adr)) /*map to 16bits access area
+                                                of smc lan chip*/
+
+#define maybebadio(name,port) \
+  printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \
+	 #name, (port), (__u32) __builtin_return_address(0))
+
+static inline void delay(void)
+{
+	ctrl_inw(0xa0000000);
+}
+
+static inline volatile __u16 *
+port2adr(unsigned int port)
+{
+	if (port >= 0x2000)
+		return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000));
+#if 0
+	else
+		return (volatile __u16 *) (PA_SUPERIO + (port << 1));
+#endif
+	maybebadio(name,(unsigned long)port);
+	return (volatile __u16*)port;
+}
+
+/* In case someone configures the kernel w/o PCI support: in that */
+/* scenario, don't ever bother to check for PCI-window addresses */
+
+/* NOTE: WINDOW CHECK MAY BE A BIT OFF, HIGH PCIBIOS_MIN_IO WRAPS? */
+#if defined(CONFIG_PCI)
+#define CHECK_SH7751_PCIIO(port) \
+  ((port >= PCIBIOS_MIN_IO) && (port < (PCIBIOS_MIN_IO + SH7751_PCI_IO_SIZE)))
+#else
+#define CHECK_SH7751_PCIIO(port) (0)
+#endif
+
+/*
+ * General outline: remap really low stuff [eventually] to SuperIO,
+ * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
+ * is mapped through the PCI IO window.  Stuff with high bits (PXSEG)
+ * should be way beyond the window, and is used  w/o translation for
+ * compatibility.
+ */
+unsigned char sh7751systemh_inb(unsigned long port)
+{
+	if (PXSEG(port))
+		return *(volatile unsigned char *)port;
+	else if (CHECK_SH7751_PCIIO(port))
+		return *(volatile unsigned char *)PCI_IOMAP(port);
+	else if (port <= 0x3F1)
+		return *(volatile unsigned char *)ETHER_IOMAP(port);
+	else
+		return (*port2adr(port))&0xff;
+}
+
+unsigned char sh7751systemh_inb_p(unsigned long port)
+{
+	unsigned char v;
+
+        if (PXSEG(port))
+                v = *(volatile unsigned char *)port;
+	else if (CHECK_SH7751_PCIIO(port))
+                v = *(volatile unsigned char *)PCI_IOMAP(port);
+	else if (port <= 0x3F1)
+		v = *(volatile unsigned char *)ETHER_IOMAP(port);
+	else
+		v = (*port2adr(port))&0xff;
+	delay();
+	return v;
+}
+
+unsigned short sh7751systemh_inw(unsigned long port)
+{
+        if (PXSEG(port))
+                return *(volatile unsigned short *)port;
+	else if (CHECK_SH7751_PCIIO(port))
+                return *(volatile unsigned short *)PCI_IOMAP(port);
+	else if (port >= 0x2000)
+		return *port2adr(port);
+	else if (port <= 0x3F1)
+		return *(volatile unsigned int *)ETHER_IOMAP(port);
+	else
+		maybebadio(inw, port);
+	return 0;
+}
+
+unsigned int sh7751systemh_inl(unsigned long port)
+{
+        if (PXSEG(port))
+                return *(volatile unsigned long *)port;
+	else if (CHECK_SH7751_PCIIO(port))
+                return *(volatile unsigned int *)PCI_IOMAP(port);
+	else if (port >= 0x2000)
+		return *port2adr(port);
+	else if (port <= 0x3F1)
+		return *(volatile unsigned int *)ETHER_IOMAP(port);
+	else
+		maybebadio(inl, port);
+	return 0;
+}
+
+void sh7751systemh_outb(unsigned char value, unsigned long port)
+{
+
+        if (PXSEG(port))
+                *(volatile unsigned char *)port = value;
+	else if (CHECK_SH7751_PCIIO(port))
+        	*((unsigned char*)PCI_IOMAP(port)) = value;
+	else if (port <= 0x3F1)
+		*(volatile unsigned char *)ETHER_IOMAP(port) = value;
+	else
+		*(port2adr(port)) = value;
+}
+
+void sh7751systemh_outb_p(unsigned char value, unsigned long port)
+{
+        if (PXSEG(port))
+                *(volatile unsigned char *)port = value;
+	else if (CHECK_SH7751_PCIIO(port))
+        	*((unsigned char*)PCI_IOMAP(port)) = value;
+	else if (port <= 0x3F1)
+		*(volatile unsigned char *)ETHER_IOMAP(port) = value;
+	else
+		*(port2adr(port)) = value;
+	delay();
+}
+
+void sh7751systemh_outw(unsigned short value, unsigned long port)
+{
+        if (PXSEG(port))
+                *(volatile unsigned short *)port = value;
+	else if (CHECK_SH7751_PCIIO(port))
+        	*((unsigned short *)PCI_IOMAP(port)) = value;
+	else if (port >= 0x2000)
+		*port2adr(port) = value;
+	else if (port <= 0x3F1)
+		*(volatile unsigned short *)ETHER_IOMAP(port) = value;
+	else
+		maybebadio(outw, port);
+}
+
+void sh7751systemh_outl(unsigned int value, unsigned long port)
+{
+        if (PXSEG(port))
+                *(volatile unsigned long *)port = value;
+	else if (CHECK_SH7751_PCIIO(port))
+        	*((unsigned long*)PCI_IOMAP(port)) = value;
+	else
+		maybebadio(outl, port);
+}
+
+void sh7751systemh_insb(unsigned long port, void *addr, unsigned long count)
+{
+	unsigned char *p = addr;
+	while (count--) *p++ = sh7751systemh_inb(port);
+}
+
+void sh7751systemh_insw(unsigned long port, void *addr, unsigned long count)
+{
+	unsigned short *p = addr;
+	while (count--) *p++ = sh7751systemh_inw(port);
+}
+
+void sh7751systemh_insl(unsigned long port, void *addr, unsigned long count)
+{
+	maybebadio(insl, port);
+}
+
+void sh7751systemh_outsb(unsigned long port, const void *addr, unsigned long count)
+{
+	unsigned char *p = (unsigned char*)addr;
+	while (count--) sh7751systemh_outb(*p++, port);
+}
+
+void sh7751systemh_outsw(unsigned long port, const void *addr, unsigned long count)
+{
+	unsigned short *p = (unsigned short*)addr;
+	while (count--) sh7751systemh_outw(*p++, port);
+}
+
+void sh7751systemh_outsl(unsigned long port, const void *addr, unsigned long count)
+{
+	maybebadio(outsw, port);
+}
+
+/* For read/write calls, just copy generic (pass-thru); PCIMBR is  */
+/* already set up.  For a larger memory space, these would need to */
+/* reset PCIMBR as needed on a per-call basis...                   */
+
+unsigned char sh7751systemh_readb(unsigned long addr)
+{
+	return *(volatile unsigned char*)addr;
+}
+
+unsigned short sh7751systemh_readw(unsigned long addr)
+{
+	return *(volatile unsigned short*)addr;
+}
+
+unsigned int sh7751systemh_readl(unsigned long addr)
+{
+	return *(volatile unsigned long*)addr;
+}
+
+void sh7751systemh_writeb(unsigned char b, unsigned long addr)
+{
+	*(volatile unsigned char*)addr = b;
+}
+
+void sh7751systemh_writew(unsigned short b, unsigned long addr)
+{
+	*(volatile unsigned short*)addr = b;
+}
+
+void sh7751systemh_writel(unsigned int b, unsigned long addr)
+{
+        *(volatile unsigned long*)addr = b;
+}
+
+
+
+/* Map ISA bus address to the real address. Only for PCMCIA.  */
+
+/* ISA page descriptor.  */
+static __u32 sh_isa_memmap[256];
+
+#if 0
+static int
+sh_isa_mmap(__u32 start, __u32 length, __u32 offset)
+{
+	int idx;
+
+	if (start >= 0x100000 || (start & 0xfff) || (length != 0x1000))
+		return -1;
+
+	idx = start >> 12;
+	sh_isa_memmap[idx] = 0xb8000000 + (offset &~ 0xfff);
+	printk("sh_isa_mmap: start %x len %x offset %x (idx %x paddr %x)\n",
+	       start, length, offset, idx, sh_isa_memmap[idx]);
+	return 0;
+}
+#endif
+
+unsigned long
+sh7751systemh_isa_port2addr(unsigned long offset)
+{
+	int idx;
+
+	idx = (offset >> 12) & 0xff;
+	offset &= 0xfff;
+	return sh_isa_memmap[idx] + offset;
+}
--- diff/arch/sh/boards/renesas/systemh/irq.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/systemh/irq.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,111 @@
+/*
+ * linux/arch/sh/boards/systemh/irq.c
+ *
+ * Copyright (C) 2000  Kazumoto Kojima
+ *
+ * Hitachi SystemH Support.
+ *
+ * Modified for 7751 SystemH by
+ * Jonathan Short.
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+
+#include <linux/hdreg.h>
+#include <linux/ide.h>
+#include <asm/io.h>
+#include <asm/mach/7751systemh.h>
+#include <asm/smc37c93x.h>
+
+/* address of external interrupt mask register
+ * address must be set prior to use these (maybe in init_XXX_irq())
+ * XXX : is it better to use .config than specifying it in code? */
+static unsigned long *systemh_irq_mask_register = (unsigned long *)0xB3F10004;
+static unsigned long *systemh_irq_request_register = (unsigned long *)0xB3F10000;
+
+/* forward declaration */
+static unsigned int startup_systemh_irq(unsigned int irq);
+static void shutdown_systemh_irq(unsigned int irq);
+static void enable_systemh_irq(unsigned int irq);
+static void disable_systemh_irq(unsigned int irq);
+static void mask_and_ack_systemh(unsigned int);
+static void end_systemh_irq(unsigned int irq);
+
+/* hw_interrupt_type */
+static struct hw_interrupt_type systemh_irq_type = {
+	" SystemH Register",
+	startup_systemh_irq,
+	shutdown_systemh_irq,
+	enable_systemh_irq,
+	disable_systemh_irq,
+	mask_and_ack_systemh,
+	end_systemh_irq
+};
+
+static unsigned int startup_systemh_irq(unsigned int irq)
+{
+	enable_systemh_irq(irq);
+	return 0; /* never anything pending */
+}
+
+static void shutdown_systemh_irq(unsigned int irq)
+{
+	disable_systemh_irq(irq);
+}
+
+static void disable_systemh_irq(unsigned int irq)
+{
+	if (systemh_irq_mask_register) {
+		unsigned long flags;
+		unsigned long val, mask = 0x01 << 1;
+
+		/* Clear the "irq"th bit in the mask and set it in the request */
+		local_irq_save(flags);
+
+		val = ctrl_inl((unsigned long)systemh_irq_mask_register);
+		val &= ~mask;
+		ctrl_outl(val, (unsigned long)systemh_irq_mask_register);
+
+		val = ctrl_inl((unsigned long)systemh_irq_request_register);
+		val |= mask;
+		ctrl_outl(val, (unsigned long)systemh_irq_request_register);
+
+		local_irq_restore(flags);
+	}
+}
+
+static void enable_systemh_irq(unsigned int irq)
+{
+	if (systemh_irq_mask_register) {
+		unsigned long flags;
+		unsigned long val, mask = 0x01 << 1;
+
+		/* Set "irq"th bit in the mask register */
+		local_irq_save(flags);
+		val = ctrl_inl((unsigned long)systemh_irq_mask_register);
+		val |= mask;
+		ctrl_outl(val, (unsigned long)systemh_irq_mask_register);
+		local_irq_restore(flags);
+	}
+}
+
+static void mask_and_ack_systemh(unsigned int irq)
+{
+	disable_systemh_irq(irq);
+}
+
+static void end_systemh_irq(unsigned int irq)
+{
+	if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+		enable_systemh_irq(irq);
+}
+
+void make_systemh_irq(unsigned int irq)
+{
+	disable_irq_nosync(irq);
+	irq_desc[irq].handler = &systemh_irq_type;
+	disable_systemh_irq(irq);
+}
+
--- diff/arch/sh/boards/renesas/systemh/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/renesas/systemh/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,80 @@
+/*
+ * linux/arch/sh/boards/systemh/setup.c
+ *
+ * Copyright (C) 2000  Kazumoto Kojima
+ * Copyright (C) 2003  Paul Mundt
+ *
+ * Hitachi SystemH Support.
+ *
+ * Modified for 7751 SystemH by Jonathan Short.
+ *
+ * Rewritten for 2.6 by Paul Mundt.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/init.h>
+#include <asm/mach/7751systemh.h>
+#include <asm/mach/io.h>
+#include <asm/machvec.h>
+
+extern void make_systemh_irq(unsigned int irq);
+
+const char *get_system_type(void)
+{
+	return "7751 SystemH";
+}
+
+/*
+ * Initialize IRQ setting
+ */
+void __init init_7751systemh_IRQ(void)
+{
+/*  	make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); LAN */
+/*  	make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-4); */
+	make_systemh_irq(0xb);	/* Ethernet interrupt */
+}
+
+struct sh_machine_vector mv_7751systemh __initmv = {
+	.mv_nr_irqs		= 72,
+
+	.mv_inb			= sh7751systemh_inb,
+	.mv_inw			= sh7751systemh_inw,
+	.mv_inl			= sh7751systemh_inl,
+	.mv_outb		= sh7751systemh_outb,
+	.mv_outw		= sh7751systemh_outw,
+	.mv_outl		= sh7751systemh_outl,
+
+	.mv_inb_p		= sh7751systemh_inb_p,
+	.mv_inw_p		= sh7751systemh_inw,
+	.mv_inl_p		= sh7751systemh_inl,
+	.mv_outb_p		= sh7751systemh_outb_p,
+	.mv_outw_p		= sh7751systemh_outw,
+	.mv_outl_p		= sh7751systemh_outl,
+
+	.mv_insb		= sh7751systemh_insb,
+	.mv_insw		= sh7751systemh_insw,
+	.mv_insl		= sh7751systemh_insl,
+	.mv_outsb		= sh7751systemh_outsb,
+	.mv_outsw		= sh7751systemh_outsw,
+	.mv_outsl		= sh7751systemh_outsl,
+
+	.mv_readb		= sh7751systemh_readb,
+	.mv_readw		= sh7751systemh_readw,
+	.mv_readl		= sh7751systemh_readl,
+	.mv_writeb		= sh7751systemh_writeb,
+	.mv_writew		= sh7751systemh_writew,
+	.mv_writel		= sh7751systemh_writel,
+
+	.mv_isa_port2addr	= sh7751systemh_isa_port2addr,
+
+	.mv_init_irq		= init_7751systemh_IRQ,
+};
+ALIAS_MV(7751systemh)
+
+int __init platform_setup(void)
+{
+	return 0;
+}
+
--- diff/arch/sh/boards/se/7300/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/se/7300/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,7 @@
+#
+# Makefile for the 7300 SolutionEngine specific parts of the kernel
+#
+
+obj-y	 := setup.o io.o irq.o
+
+obj-$(CONFIG_HEARTBEAT) += led.o
--- diff/arch/sh/boards/se/7300/io.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/se/7300/io.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,261 @@
+/*
+ * linux/arch/sh/boards/se/7300/io.c
+ *
+ * Copyright (C) 2003 YOSHII Takashi <yoshii-takashi@hitachi-ul.co.jp>
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <asm/se7300/se7300.h>
+#include <asm/io.h>
+
+#define badio(fn, a) panic("bad i/o operation %s for %08lx.", #fn, a)
+
+struct iop {
+	unsigned long start, end;
+	unsigned long base;
+	struct iop *(*check) (struct iop * p, unsigned long port);
+	unsigned char (*inb) (struct iop * p, unsigned long port);
+	unsigned short (*inw) (struct iop * p, unsigned long port);
+	void (*outb) (struct iop * p, unsigned char value, unsigned long port);
+	void (*outw) (struct iop * p, unsigned short value, unsigned long port);
+};
+
+struct iop *
+simple_check(struct iop *p, unsigned long port)
+{
+	if ((p->start <= port) && (port <= p->end))
+		return p;
+	else
+		badio(check, port);
+}
+
+struct iop *
+ide_check(struct iop *p, unsigned long port)
+{
+	if (((0x1f0 <= port) && (port <= 0x1f7)) || (port == 0x3f7))
+		return p;
+	return NULL;
+}
+
+unsigned char
+simple_inb(struct iop *p, unsigned long port)
+{
+	return *(unsigned char *) (p->base + port);
+}
+
+unsigned short
+simple_inw(struct iop *p, unsigned long port)
+{
+	return *(unsigned short *) (p->base + port);
+}
+
+void
+simple_outb(struct iop *p, unsigned char value, unsigned long port)
+{
+	*(unsigned char *) (p->base + port) = value;
+}
+
+void
+simple_outw(struct iop *p, unsigned short value, unsigned long port)
+{
+	*(unsigned short *) (p->base + port) = value;
+}
+
+unsigned char
+pcc_inb(struct iop *p, unsigned long port)
+{
+	unsigned long addr = p->base + port + 0x40000;
+	unsigned long v;
+
+	if (port & 1)
+		addr += 0x00400000;
+	v = *(volatile unsigned char *) addr;
+	return v;
+}
+
+void
+pcc_outb(struct iop *p, unsigned char value, unsigned long port)
+{
+	unsigned long addr = p->base + port + 0x40000;
+
+	if (port & 1)
+		addr += 0x00400000;
+	*(volatile unsigned char *) addr = value;
+}
+
+unsigned char
+bad_inb(struct iop *p, unsigned long port)
+{
+	badio(inb, port);
+}
+
+void
+bad_outb(struct iop *p, unsigned char value, unsigned long port)
+{
+	badio(inw, port);
+}
+
+/* MSTLANEX01 LAN at 0xb400:0000 */
+static struct iop laniop = {
+	.start = 0x300,
+	.end = 0x30f,
+	.base = 0xb4000000,
+	.check = simple_check,
+	.inb = simple_inb,
+	.inw = simple_inw,
+	.outb = simple_outb,
+	.outw = simple_outw,
+};
+
+/* NE2000 pc card NIC */
+static struct iop neiop = {
+	.start = 0x280,
+	.end = 0x29f,
+	.base = 0xb0600000 + 0x80,	/* soft 0x280 -> hard 0x300 */
+	.check = simple_check,
+	.inb = pcc_inb,
+	.inw = simple_inw,
+	.outb = pcc_outb,
+	.outw = simple_outw,
+};
+
+/* CF in CF slot */
+static struct iop cfiop = {
+	.base = 0xb0600000,
+	.check = ide_check,
+	.inb = pcc_inb,
+	.inw = simple_inw,
+	.outb = pcc_outb,
+	.outw = simple_outw,
+};
+
+static __inline__ struct iop *
+port2iop(unsigned long port)
+{
+	if (0) ;
+#if defined(CONFIG_SMC91111)
+	else if (laniop.check(&laniop, port))
+		return &laniop;
+#endif
+#if defined(CONFIG_NE2000)
+	else if (neiop.check(&neiop, port))
+		return &neiop;
+#endif
+#if defined(CONFIG_IDE)
+	else if (cfiop.check(&cfiop, port))
+		return &cfiop;
+#endif
+	else
+		return &neiop;	/* fallback */
+}
+
+static inline void
+delay(void)
+{
+	ctrl_inw(0xac000000);
+	ctrl_inw(0xac000000);
+}
+
+unsigned char
+sh7300se_inb(unsigned long port)
+{
+	struct iop *p = port2iop(port);
+	return (p->inb) (p, port);
+}
+
+unsigned char
+sh7300se_inb_p(unsigned long port)
+{
+	unsigned char v = sh7300se_inb(port);
+	delay();
+	return v;
+}
+
+unsigned short
+sh7300se_inw(unsigned long port)
+{
+	struct iop *p = port2iop(port);
+	return (p->inw) (p, port);
+}
+
+unsigned int
+sh7300se_inl(unsigned long port)
+{
+	badio(inl, port);
+}
+
+void
+sh7300se_outb(unsigned char value, unsigned long port)
+{
+	struct iop *p = port2iop(port);
+	(p->outb) (p, value, port);
+}
+
+void
+sh7300se_outb_p(unsigned char value, unsigned long port)
+{
+	sh7300se_outb(value, port);
+	delay();
+}
+
+void
+sh7300se_outw(unsigned short value, unsigned long port)
+{
+	struct iop *p = port2iop(port);
+	(p->outw) (p, value, port);
+}
+
+void
+sh7300se_outl(unsigned int value, unsigned long port)
+{
+	badio(outl, port);
+}
+
+void
+sh7300se_insb(unsigned long port, void *addr, unsigned long count)
+{
+	unsigned char *a = addr;
+	struct iop *p = port2iop(port);
+	while (count--)
+		*a++ = (p->inb) (p, port);
+}
+
+void
+sh7300se_insw(unsigned long port, void *addr, unsigned long count)
+{
+	unsigned short *a = addr;
+	struct iop *p = port2iop(port);
+	while (count--)
+		*a++ = (p->inw) (p, port);
+}
+
+void
+sh7300se_insl(unsigned long port, void *addr, unsigned long count)
+{
+	badio(insl, port);
+}
+
+void
+sh7300se_outsb(unsigned long port, const void *addr, unsigned long count)
+{
+	unsigned char *a = (unsigned char *) addr;
+	struct iop *p = port2iop(port);
+	while (count--)
+		(p->outb) (p, *a++, port);
+}
+
+void
+sh7300se_outsw(unsigned long port, const void *addr, unsigned long count)
+{
+	unsigned short *a = (unsigned short *) addr;
+	struct iop *p = port2iop(port);
+	while (count--)
+		(p->outw) (p, *a++, port);
+}
+
+void
+sh7300se_outsl(unsigned long port, const void *addr, unsigned long count)
+{
+	badio(outsw, port);
+}
--- diff/arch/sh/boards/se/7300/irq.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/se/7300/irq.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,37 @@
+/*
+ * linux/arch/sh/boards/se/7300/irq.c
+ *
+ * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
+ *
+ * SH-Mobile SolutionEngine 7300 Support.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <asm/irq.h>
+#include <asm/io.h>
+#include <asm/mach/se7300.h>
+
+/*
+ * Initialize IRQ setting
+ */
+void __init
+init_7300se_IRQ(void)
+{
+	ctrl_outw(0x0028, PA_EPLD_MODESET);	/* mode set IRQ0,1 active low. */
+	ctrl_outw(0xa000, INTC_ICR1);	        /* IRQ mode; IRQ0,1 enable.    */
+	ctrl_outw(0x0000, PORT_PFCR);	        /* use F for IRQ[3:0] and SIU. */
+
+	/* PC_IRQ[0-3] -> IRQ0 (32) */
+	make_ipr_irq(IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f - IRQ0_IRQ);
+	/* A_IRQ[0-3] -> IRQ1 (33) */
+	make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f - IRQ1_IRQ);
+	make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY);
+	make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY);
+	make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY);
+	make_ipr_irq(VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY);
+
+	ctrl_outw(0x2000, PA_MRSHPC + 0x0c);	/* mrshpc irq enable */
+}
--- diff/arch/sh/boards/se/7300/led.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/se/7300/led.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,69 @@
+/*
+ * linux/arch/sh/boards/se/7300/led.c
+ *
+ * Derived from linux/arch/sh/boards/se/770x/led.c
+ *
+ * Copyright (C) 2000 Stuart Menefy <stuart.menefy@st.com>
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * This file contains Solution Engine specific LED code.
+ */
+
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <asm/mach/se7300.h>
+
+static void
+mach_led(int position, int value)
+{
+	volatile unsigned short *p = (volatile unsigned short *) PA_LED;
+
+	if (value) {
+		*p |= (1 << 8);
+	} else {
+		*p &= ~(1 << 8);
+	}
+}
+
+
+/* Cycle the LED's in the clasic Knightrider/Sun pattern */
+void
+heartbeat_7300se(void)
+{
+	static unsigned int cnt = 0, period = 0;
+	volatile unsigned short *p = (volatile unsigned short *) PA_LED;
+	static unsigned bit = 0, up = 1;
+
+	cnt += 1;
+	if (cnt < period) {
+		return;
+	}
+
+	cnt = 0;
+
+	/* Go through the points (roughly!):
+	 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
+	 */
+	period = 110 - ((300 << FSHIFT) / ((avenrun[0] / 5) + (3 << FSHIFT)));
+
+	if (up) {
+		if (bit == 7) {
+			bit--;
+			up = 0;
+		} else {
+			bit++;
+		}
+	} else {
+		if (bit == 0) {
+			bit++;
+			up = 1;
+		} else {
+			bit--;
+		}
+	}
+	*p = 1 << (bit + 8);
+
+}
+
--- diff/arch/sh/boards/se/7300/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/boards/se/7300/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,66 @@
+/*
+ * linux/arch/sh/boards/se/7300/setup.c
+ *
+ * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
+ *
+ * SH-Mobile SolutionEngine 7300 Support.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <asm/machvec.h>
+#include <asm/machvec_init.h>
+#include <asm/mach/io.h>
+
+void heartbeat_7300se(void);
+void init_7300se_IRQ(void);
+
+const char *
+get_system_type(void)
+{
+	return "SolutionEngine 7300";
+}
+
+/*
+ * The Machine Vector
+ */
+
+struct sh_machine_vector mv_7300se __initmv = {
+	.mv_nr_irqs = 109,
+	.mv_inb = sh7300se_inb,
+	.mv_inw = sh7300se_inw,
+	.mv_inl = sh7300se_inl,
+	.mv_outb = sh7300se_outb,
+	.mv_outw = sh7300se_outw,
+	.mv_outl = sh7300se_outl,
+
+	.mv_inb_p = sh7300se_inb_p,
+	.mv_inw_p = sh7300se_inw,
+	.mv_inl_p = sh7300se_inl,
+	.mv_outb_p = sh7300se_outb_p,
+	.mv_outw_p = sh7300se_outw,
+	.mv_outl_p = sh7300se_outl,
+
+	.mv_insb = sh7300se_insb,
+	.mv_insw = sh7300se_insw,
+	.mv_insl = sh7300se_insl,
+	.mv_outsb = sh7300se_outsb,
+	.mv_outsw = sh7300se_outsw,
+	.mv_outsl = sh7300se_outsl,
+
+	.mv_init_irq = init_7300se_IRQ,
+#ifdef CONFIG_HEARTBEAT
+	.mv_heartbeat = heartbeat_7300se,
+#endif
+};
+
+ALIAS_MV(7300se)
+/*
+ * Initialize the board
+ */
+void __init
+platform_setup(void)
+{
+
+}
--- diff/arch/sh/cchips/voyagergx/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/cchips/voyagergx/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,8 @@
+#
+# Makefile for VoyagerGX
+#
+
+obj-y	:= irq.o setup.o
+
+obj-$(CONFIG_USB_OHCI_HCD)	+= consistent.o
+
--- diff/arch/sh/cchips/voyagergx/consistent.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/cchips/voyagergx/consistent.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,126 @@
+/*
+ * arch/sh/cchips/voyagergx/consistent.c
+ *
+ * Copyright (C) 2004  Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/mm.h>
+#include <linux/dma-mapping.h>
+#include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <asm/io.h>
+#include <asm/bus-sh.h>
+
+struct voya_alloc_entry {
+	struct list_head list;
+	unsigned long ofs;
+	unsigned long len;
+};
+
+static spinlock_t voya_list_lock = SPIN_LOCK_UNLOCKED;
+static LIST_HEAD(voya_alloc_list);
+
+#define OHCI_SRAM_START	0xb0000000
+#define OHCI_HCCA_SIZE	0x100
+#define OHCI_SRAM_SIZE	0x10000
+
+void *voyagergx_consistent_alloc(struct device *dev, size_t size,
+				 dma_addr_t *handle, int flag)
+{
+	struct list_head *list = &voya_alloc_list;
+	struct voya_alloc_entry *entry;
+	struct sh_dev *shdev = to_sh_dev(dev);
+	unsigned long start, end;
+	unsigned long flags;
+
+	/*
+	 * The SM501 contains an integrated 8051 with its own SRAM.
+	 * Devices within the cchip can all hook into the 8051 SRAM.
+	 * We presently use this for the OHCI.
+	 *
+	 * Everything else goes through consistent_alloc().
+	 */
+	if (!dev || dev->bus != &sh_bus_types[SH_BUS_VIRT] ||
+		   (dev->bus == &sh_bus_types[SH_BUS_VIRT] &&
+		    shdev->dev_id != SH_DEV_ID_USB_OHCI))
+		return consistent_alloc(flag, size, handle);
+
+	start = OHCI_SRAM_START + OHCI_HCCA_SIZE;
+
+	entry = kmalloc(sizeof(struct voya_alloc_entry), GFP_ATOMIC);
+	if (!entry)
+		return NULL;
+
+	entry->len = (size + 15) & ~15;
+
+	/*
+	 * The basis for this allocator is dwmw2's malloc.. the
+	 * Matrox allocator :-)
+	 */
+	spin_lock_irqsave(&voya_list_lock, flags);
+	list_for_each(list, &voya_alloc_list) {
+		struct voya_alloc_entry *p;
+
+		p = list_entry(list, struct voya_alloc_entry, list);
+
+		if (p->ofs - start >= size)
+			goto out;
+
+		start = p->ofs + p->len;
+	}
+
+	end  = start + (OHCI_SRAM_SIZE  - OHCI_HCCA_SIZE);
+	list = &voya_alloc_list;
+
+	if (end - start >= size) {
+out:
+		entry->ofs = start;
+		list_add_tail(&entry->list, list);
+		spin_unlock_irqrestore(&voya_list_lock, flags);
+
+		*handle = start;
+		return (void *)start;
+	}
+
+	kfree(entry);
+	spin_unlock_irqrestore(&voya_list_lock, flags);
+
+	return NULL;
+}
+
+void voyagergx_consistent_free(struct device *dev, size_t size,
+			       void *vaddr, dma_addr_t handle)
+{
+	struct voya_alloc_entry *entry;
+	struct sh_dev *shdev = to_sh_dev(dev);
+	unsigned long flags;
+
+	if (!dev || dev->bus != &sh_bus_types[SH_BUS_VIRT] ||
+		   (dev->bus == &sh_bus_types[SH_BUS_VIRT] &&
+		    shdev->dev_id != SH_DEV_ID_USB_OHCI)) {
+		consistent_free(vaddr, size);
+		return;
+	}
+
+	spin_lock_irqsave(&voya_list_lock, flags);
+	list_for_each_entry(entry, &voya_alloc_list, list) {
+		if (entry->ofs != handle)
+			continue;
+
+		list_del(&entry->list);
+		kfree(entry);
+
+		break;
+	}
+	spin_unlock_irqrestore(&voya_list_lock, flags);
+}
+
+EXPORT_SYMBOL(voyagergx_consistent_alloc);
+EXPORT_SYMBOL(voyagergx_consistent_free);
+
--- diff/arch/sh/cchips/voyagergx/irq.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/cchips/voyagergx/irq.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,194 @@
+/* -------------------------------------------------------------------- */
+/* setup_voyagergx.c:                                                     */
+/* -------------------------------------------------------------------- */
+/*  This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+    Copyright 2003 (c) Lineo uSolutions,Inc.
+*/
+/* -------------------------------------------------------------------- */
+
+#undef DEBUG
+
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/param.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/rts7751r2d/rts7751r2d.h>
+#include <asm/rts7751r2d/voyagergx_reg.h>
+
+static void disable_voyagergx_irq(unsigned int irq)
+{
+	unsigned long flags, val;
+	unsigned long  mask = 1 << (irq - VOYAGER_IRQ_BASE);
+
+    	pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask);
+	local_irq_save(flags);
+        val = inl(VOYAGER_INT_MASK);
+        val &= ~mask;
+        outl(val, VOYAGER_INT_MASK);
+	local_irq_restore(flags);
+}
+
+
+static void enable_voyagergx_irq(unsigned int irq)
+{
+        unsigned long flags, val;
+        unsigned long  mask = 1 << (irq - VOYAGER_IRQ_BASE);
+
+        pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask);
+        local_irq_save(flags);
+        val = inl(VOYAGER_INT_MASK);
+        val |= mask;
+        outl(val, VOYAGER_INT_MASK);
+        local_irq_restore(flags);
+}
+
+
+static void mask_and_ack_voyagergx(unsigned int irq)
+{
+	disable_voyagergx_irq(irq);
+}
+
+static void end_voyagergx_irq(unsigned int irq)
+{
+	if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+		enable_voyagergx_irq(irq);
+}
+
+static unsigned int startup_voyagergx_irq(unsigned int irq)
+{
+	enable_voyagergx_irq(irq);
+	return 0;
+}
+
+static void shutdown_voyagergx_irq(unsigned int irq)
+{
+	disable_voyagergx_irq(irq);
+}
+
+static struct hw_interrupt_type voyagergx_irq_type = {
+	"VOYAGERGX-IRQ",
+	startup_voyagergx_irq,
+	shutdown_voyagergx_irq,
+	enable_voyagergx_irq,
+	disable_voyagergx_irq,
+	mask_and_ack_voyagergx,
+	end_voyagergx_irq,
+};
+
+static irqreturn_t voyagergx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	printk(KERN_INFO
+	       "VoyagerGX: spurious interrupt, status: 0x%x\n",
+	       		inl(INT_STATUS));
+	return IRQ_HANDLED;
+}
+
+
+/*====================================================*/
+
+static struct {
+	int (*func)(int, void *);
+	void *dev;
+} voyagergx_demux[VOYAGER_IRQ_NUM];
+
+void voyagergx_register_irq_demux(int irq,
+		int (*demux)(int irq, void *dev), void *dev)
+{
+    	voyagergx_demux[irq - VOYAGER_IRQ_BASE].func = demux;
+    	voyagergx_demux[irq - VOYAGER_IRQ_BASE].dev = dev;
+}
+
+void voyagergx_unregister_irq_demux(int irq)
+{
+    	voyagergx_demux[irq - VOYAGER_IRQ_BASE].func = 0;
+}
+
+int voyagergx_irq_demux(int irq)
+{
+
+	if (irq == IRQ_VOYAGER ) {
+		unsigned long i = 0, bit __attribute__ ((unused));
+		unsigned long val  = inl(INT_STATUS);
+#if 1
+		if ( val & ( 1 << 1 )){
+			i = 1;
+		} else if ( val & ( 1 << 2 )){
+			i = 2;
+		} else if ( val & ( 1 << 6 )){
+			i = 6;
+		} else if( val & ( 1 << 10 )){
+			i = 10;
+		} else if( val & ( 1 << 11 )){
+			i = 11;
+		} else if( val & ( 1 << 12 )){
+			i = 12;
+		} else if( val & ( 1 << 17 )){
+			i = 17;
+		} else {
+			printk("Unexpected IRQ irq = %d status = 0x%08lx\n", irq, val);
+		}
+		pr_debug("voyagergx_irq_demux %d \n", i);
+#else
+		for (bit = 1, i = 0 ; i < VOYAGER_IRQ_NUM ; bit <<= 1, i++)
+			if (val & bit)
+				break;
+#endif
+    	    	if (i < VOYAGER_IRQ_NUM) {
+			irq = VOYAGER_IRQ_BASE + i;
+    	    		if (voyagergx_demux[i].func != 0)
+				irq = voyagergx_demux[i].func(irq, voyagergx_demux[i].dev);
+		}
+	}
+	return irq;
+}
+
+static struct irqaction irq0  = { voyagergx_interrupt, SA_INTERRUPT, 0, "VOYAGERGX", NULL, NULL};
+
+void __init setup_voyagergx_irq(void)
+{
+	int i, flag;
+
+	printk(KERN_INFO "VoyagerGX configured at 0x%x on irq %d(mapped into %d to %d)\n",
+	       VOYAGER_BASE,
+	       IRQ_VOYAGER,
+	       VOYAGER_IRQ_BASE,
+	       VOYAGER_IRQ_BASE + VOYAGER_IRQ_NUM - 1);
+
+	for (i=0; i<VOYAGER_IRQ_NUM; i++) {
+		flag = 0;
+		switch (VOYAGER_IRQ_BASE + i) {
+		case VOYAGER_USBH_IRQ:
+		case VOYAGER_8051_IRQ:
+		case VOYAGER_UART0_IRQ:
+		case VOYAGER_UART1_IRQ:
+		case VOYAGER_AC97_IRQ:
+			flag = 1;
+		}
+		if (flag == 1)
+			irq_desc[VOYAGER_IRQ_BASE + i].handler = &voyagergx_irq_type;
+	}
+
+	setup_irq(IRQ_VOYAGER, &irq0);
+}
+
--- diff/arch/sh/cchips/voyagergx/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/cchips/voyagergx/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,37 @@
+/*
+ * arch/sh/cchips/voyagergx/setup.c
+ *
+ * Setup routines for VoyagerGX cchip.
+ *
+ * Copyright (C) 2003 Lineo uSolutions, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+#include <linux/init.h>
+#include <linux/module.h>
+#include <asm/io.h>
+#include <asm/rts7751r2d/voyagergx_reg.h>
+
+static int __init setup_voyagergx(void)
+{
+	unsigned long val;
+
+	val = inl(DRAM_CTRL);
+	val |= (DRAM_CTRL_CPU_COLUMN_SIZE_256	|
+		DRAM_CTRL_CPU_ACTIVE_PRECHARGE	|
+		DRAM_CTRL_CPU_RESET		|
+		DRAM_CTRL_REFRESH_COMMAND	|
+		DRAM_CTRL_BLOCK_WRITE_TIME	|
+		DRAM_CTRL_BLOCK_WRITE_PRECHARGE	|
+		DRAM_CTRL_ACTIVE_PRECHARGE	|
+		DRAM_CTRL_RESET			|
+		DRAM_CTRL_REMAIN_ACTIVE);
+	outl(val, DRAM_CTRL);
+
+	return 0;
+}
+
+module_init(setup_voyagergx);
--- diff/arch/sh/configs/rts7751r2d_defconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/configs/rts7751r2d_defconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,809 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_SUPERH=y
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_IKCONFIG is not set
+CONFIG_EMBEDDED=y
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODULE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_KMOD is not set
+
+#
+# System type
+#
+# CONFIG_SH_SOLUTION_ENGINE is not set
+# CONFIG_SH_7751_SOLUTION_ENGINE is not set
+# CONFIG_SH_7751_SYSTEMH is not set
+# CONFIG_SH_STB1_HARP is not set
+# CONFIG_SH_STB1_OVERDRIVE is not set
+# CONFIG_SH_HP620 is not set
+# CONFIG_SH_HP680 is not set
+# CONFIG_SH_HP690 is not set
+# CONFIG_SH_CQREEK is not set
+# CONFIG_SH_DMIDA is not set
+# CONFIG_SH_EC3104 is not set
+# CONFIG_SH_SATURN is not set
+# CONFIG_SH_DREAMCAST is not set
+# CONFIG_SH_CAT68701 is not set
+# CONFIG_SH_BIGSUR is not set
+# CONFIG_SH_SH2000 is not set
+# CONFIG_SH_ADX is not set
+# CONFIG_SH_MPC1211 is not set
+# CONFIG_SH_SECUREEDGE5410 is not set
+CONFIG_SH_RTS7751R2D=y
+# CONFIG_SH_UNKNOWN is not set
+# CONFIG_CPU_SH2 is not set
+# CONFIG_CPU_SH3 is not set
+CONFIG_CPU_SH4=y
+# CONFIG_CPU_SUBTYPE_SH7604 is not set
+# CONFIG_CPU_SUBTYPE_SH7300 is not set
+# CONFIG_CPU_SUBTYPE_SH7707 is not set
+# CONFIG_CPU_SUBTYPE_SH7708 is not set
+# CONFIG_CPU_SUBTYPE_SH7709 is not set
+# CONFIG_CPU_SUBTYPE_SH7750 is not set
+CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7760 is not set
+# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
+CONFIG_MMU=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="mem=64M console=ttySC0,115200 root=/dev/hda1"
+CONFIG_MEMORY_START=0x0c000000
+CONFIG_MEMORY_SIZE=0x04000000
+CONFIG_MEMORY_SET=y
+# CONFIG_MEMORY_OVERRIDE is not set
+CONFIG_SH_RTC=y
+CONFIG_ZERO_PAGE_OFFSET=0x00010000
+CONFIG_BOOT_LINK_OFFSET=0x00800000
+CONFIG_CPU_LITTLE_ENDIAN=y
+# CONFIG_PREEMPT is not set
+# CONFIG_UBC_WAKEUP is not set
+# CONFIG_SH_WRITETHROUGH is not set
+# CONFIG_SH_OCRAM is not set
+# CONFIG_SH_STORE_QUEUES is not set
+# CONFIG_SMP is not set
+CONFIG_VOYAGERGX=y
+CONFIG_RTS7751R2D_REV11=y
+CONFIG_SH_PCLK_FREQ=60000000
+# CONFIG_CPU_FREQ is not set
+CONFIG_SH_DMA=y
+CONFIG_NR_ONCHIP_DMA_CHANNELS=8
+# CONFIG_NR_DMA_CHANNELS_BOOL is not set
+# CONFIG_DMA_PAGE_OPS is not set
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+CONFIG_ISA=y
+CONFIG_PCI=y
+CONFIG_SH_PCIDMA_NONCOHERENT=y
+CONFIG_PCI_AUTO=y
+CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
+CONFIG_PCI_DMA=y
+# CONFIG_PCI_LEGACY_PROC is not set
+CONFIG_PCI_NAMES=y
+CONFIG_HOTPLUG=y
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=m
+CONFIG_YENTA=m
+CONFIG_CARDBUS=y
+# CONFIG_I82092 is not set
+# CONFIG_I82365 is not set
+# CONFIG_TCIC is not set
+CONFIG_PCMCIA_PROBE=y
+
+#
+# PCI Hotplug Support
+#
+CONFIG_HOTPLUG_PCI=y
+# CONFIG_HOTPLUG_PCI_FAKE is not set
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_FLAT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Generic Driver Options
+#
+# CONFIG_FW_LOADER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_LBD is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
+CONFIG_BLK_DEV_IDECS=m
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_TASKFILE_IO is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_IDEPCI is not set
+# CONFIG_IDE_CHIPSETS is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_DMA_NONPCI is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_IPV6 is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_STNIC is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_ISA=y
+# CONFIG_E2100 is not set
+# CONFIG_EWRK3 is not set
+# CONFIG_EEXPRESS is not set
+# CONFIG_EEXPRESS_PRO is not set
+# CONFIG_HPLAN_PLUS is not set
+# CONFIG_HPLAN is not set
+# CONFIG_LP486E is not set
+# CONFIG_ETH16I is not set
+CONFIG_NE2000=m
+# CONFIG_ZNET is not set
+# CONFIG_SEEQ8005 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_AC3200 is not set
+# CONFIG_APRICOT is not set
+# CONFIG_B44 is not set
+# CONFIG_CS89x0 is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+CONFIG_8139TOO=y
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+# CONFIG_8139TOO_8129 is not set
+# CONFIG_8139_OLD_RX_RESET is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_ARLAN is not set
+# CONFIG_WAVELAN is not set
+# CONFIG_PCMCIA_WAVELAN is not set
+# CONFIG_PCMCIA_NETWAVE is not set
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+# CONFIG_PCMCIA_RAYCS is not set
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+# CONFIG_AIRO is not set
+CONFIG_HERMES=m
+# CONFIG_PLX_HERMES is not set
+# CONFIG_TMD_HERMES is not set
+# CONFIG_PCI_HERMES is not set
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+# CONFIG_AIRO_CS is not set
+# CONFIG_PCMCIA_ATMEL is not set
+# CONFIG_PCMCIA_WL3501 is not set
+CONFIG_NET_WIRELESS=y
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# PCMCIA network device support
+#
+# CONFIG_NET_PCMCIA is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BT is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+# CONFIG_INPUT is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
+
+#
+# Input Device Drivers
+#
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL is not set
+CONFIG_SH_SCI=y
+CONFIG_SERIAL_CONSOLE=y
+CONFIG_RTC_9701JE=y
+
+#
+# Unix 98 PTY support
+#
+# CONFIG_UNIX98_PTYS is not set
+CONFIG_HEARTBEAT=y
+# CONFIG_PSMOUSE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_RTC is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_SH_SCI is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# I2C Algorithms
+#
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+CONFIG_MINIX_FS=y
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+# CONFIG_NFS_FS is not set
+# CONFIG_NFSD is not set
+# CONFIG_EXPORTFS is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+CONFIG_NLS_CODEPAGE_932=y
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_OSSEMUL is not set
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ISA devices
+#
+# CONFIG_SND_AD1848 is not set
+# CONFIG_SND_CS4231 is not set
+# CONFIG_SND_CS4232 is not set
+# CONFIG_SND_CS4236 is not set
+# CONFIG_SND_ES1688 is not set
+# CONFIG_SND_ES18XX is not set
+# CONFIG_SND_GUSCLASSIC is not set
+# CONFIG_SND_GUSEXTREME is not set
+# CONFIG_SND_GUSMAX is not set
+# CONFIG_SND_INTERWAVE is not set
+# CONFIG_SND_INTERWAVE_STB is not set
+# CONFIG_SND_OPTI92X_AD1848 is not set
+# CONFIG_SND_OPTI92X_CS4231 is not set
+# CONFIG_SND_OPTI93X is not set
+# CONFIG_SND_SB8 is not set
+# CONFIG_SND_SB16 is not set
+# CONFIG_SND_SBAWE is not set
+# CONFIG_SND_WAVEFRONT is not set
+# CONFIG_SND_CMI8330 is not set
+# CONFIG_SND_OPL3SA2 is not set
+# CONFIG_SND_SGALAXY is not set
+# CONFIG_SND_SSCAPE is not set
+
+#
+# PCI devices
+#
+# CONFIG_SND_ALI5451 is not set
+# CONFIG_SND_AZT3328 is not set
+# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_CS4281 is not set
+# CONFIG_SND_EMU10K1 is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_RME32 is not set
+# CONFIG_SND_RME96 is not set
+# CONFIG_SND_RME9652 is not set
+# CONFIG_SND_HDSP is not set
+# CONFIG_SND_TRIDENT is not set
+CONFIG_SND_YMFPCI=m
+# CONFIG_SND_ALS4000 is not set
+# CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_ENS1370 is not set
+# CONFIG_SND_ENS1371 is not set
+# CONFIG_SND_ES1938 is not set
+# CONFIG_SND_ES1968 is not set
+# CONFIG_SND_MAESTRO3 is not set
+# CONFIG_SND_FM801 is not set
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_ICE1724 is not set
+# CONFIG_SND_INTEL8X0 is not set
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_VIA82XX is not set
+# CONFIG_SND_VX222 is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_VXP440 is not set
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+# CONFIG_SOUND_BT878 is not set
+CONFIG_SOUND_CMPCI=m
+# CONFIG_SOUND_CMPCI_FM is not set
+# CONFIG_SOUND_CMPCI_MIDI is not set
+# CONFIG_SOUND_CMPCI_JOYSTICK is not set
+# CONFIG_SOUND_CMPCI_CM8738 is not set
+# CONFIG_SOUND_EMU10K1 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_CS4281 is not set
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
+# CONFIG_SOUND_MAESTRO3 is not set
+# CONFIG_SOUND_ICH is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+# CONFIG_SOUND_VIA82CXXX is not set
+# CONFIG_SOUND_OSS is not set
+# CONFIG_SOUND_ALI5455 is not set
+# CONFIG_SOUND_FORTE is not set
+# CONFIG_SOUND_RME96XX is not set
+# CONFIG_SOUND_AD1980 is not set
+CONFIG_SOUND_VOYAGERGX=m
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+# CONFIG_USB_GADGET is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_SH_STANDARD_BIOS is not set
+# CONFIG_KGDB is not set
+# CONFIG_FRAME_POINTER is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_CRC32=y
--- diff/arch/sh/configs/se7300_defconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/configs/se7300_defconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,461 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_SUPERH=y
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_EMBEDDED=y
+# CONFIG_KALLSYMS is not set
+# CONFIG_FUTEX is not set
+# CONFIG_EPOLL is not set
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# System type
+#
+# CONFIG_SH_SOLUTION_ENGINE is not set
+# CONFIG_SH_7751_SOLUTION_ENGINE is not set
+CONFIG_SH_7300_SOLUTION_ENGINE=y
+# CONFIG_SH_7751_SYSTEMH is not set
+# CONFIG_SH_STB1_HARP is not set
+# CONFIG_SH_STB1_OVERDRIVE is not set
+# CONFIG_SH_HP620 is not set
+# CONFIG_SH_HP680 is not set
+# CONFIG_SH_HP690 is not set
+# CONFIG_SH_CQREEK is not set
+# CONFIG_SH_DMIDA is not set
+# CONFIG_SH_EC3104 is not set
+# CONFIG_SH_SATURN is not set
+# CONFIG_SH_DREAMCAST is not set
+# CONFIG_SH_CAT68701 is not set
+# CONFIG_SH_BIGSUR is not set
+# CONFIG_SH_SH2000 is not set
+# CONFIG_SH_ADX is not set
+# CONFIG_SH_MPC1211 is not set
+# CONFIG_SH_SECUREEDGE5410 is not set
+# CONFIG_SH_HS7751RVOIP is not set
+# CONFIG_SH_RTS7751R2D is not set
+# CONFIG_SH_UNKNOWN is not set
+# CONFIG_CPU_SH2 is not set
+CONFIG_CPU_SH3=y
+# CONFIG_CPU_SH4 is not set
+# CONFIG_CPU_SUBTYPE_SH7604 is not set
+CONFIG_CPU_SUBTYPE_SH7300=y
+# CONFIG_CPU_SUBTYPE_SH7707 is not set
+# CONFIG_CPU_SUBTYPE_SH7708 is not set
+# CONFIG_CPU_SUBTYPE_SH7709 is not set
+# CONFIG_CPU_SUBTYPE_SH7750 is not set
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
+# CONFIG_CPU_SUBTYPE_SH7760 is not set
+# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
+# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
+CONFIG_MMU=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttySC0,38400 root=/dev/ram0"
+CONFIG_MEMORY_START=0x0c000000
+CONFIG_MEMORY_SIZE=0x04000000
+# CONFIG_MEMORY_OVERRIDE is not set
+CONFIG_SH_DSP=y
+# CONFIG_SH_ADC is not set
+CONFIG_ZERO_PAGE_OFFSET=0x00001000
+CONFIG_BOOT_LINK_OFFSET=0x00210000
+CONFIG_CPU_LITTLE_ENDIAN=y
+# CONFIG_PREEMPT is not set
+# CONFIG_UBC_WAKEUP is not set
+# CONFIG_SH_WRITETHROUGH is not set
+# CONFIG_SH_OCRAM is not set
+# CONFIG_SMP is not set
+# CONFIG_SH_PCLK_CALC is not set
+CONFIG_SH_PCLK_FREQ=33333333
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# DMA support
+#
+# CONFIG_SH_DMA is not set
+
+#
+# Companion Chips
+#
+# CONFIG_HD6446X_SERIES is not set
+CONFIG_HEARTBEAT=y
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+# CONFIG_PCI is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_FLAT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# SH initrd options
+#
+CONFIG_EMBEDDED_RAMDISK=y
+CONFIG_EMBEDDED_RAMDISK_IMAGE="ramdisk.gz"
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_LOOP is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_LBD is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+
+#
+# Networking support
+#
+# CONFIG_NET is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_UNIX98_PTYS is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=y
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=y
+# CONFIG_IPMI_SI is not set
+CONFIG_IPMI_WATCHDOG=y
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=y
+# CONFIG_SH_WDT is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_FAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+CONFIG_DEVFS_MOUNT=y
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLBFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_INFO is not set
+CONFIG_SH_STANDARD_BIOS=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_KGDB=y
+
+#
+# KGDB configuration options
+#
+# CONFIG_MORE_COMPILE_OPTIONS is not set
+# CONFIG_KGDB_NMI is not set
+# CONFIG_KGDB_THREAD is not set
+# CONFIG_SH_KGDB_CONSOLE is not set
+# CONFIG_KGDB_SYSRQ is not set
+# CONFIG_KGDB_KERNEL_ASSERTS is not set
+
+#
+# Serial port setup
+#
+CONFIG_KGDB_DEFPORT=1
+CONFIG_KGDB_DEFBAUD=115200
+CONFIG_KGDB_DEFPARITY_N=y
+# CONFIG_KGDB_DEFPARITY_E is not set
+# CONFIG_KGDB_DEFPARITY_O is not set
+CONFIG_KGDB_DEFBITS_8=y
+# CONFIG_KGDB_DEFBITS_7 is not set
+# CONFIG_FRAME_POINTER is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
--- diff/arch/sh/drivers/dma/dma-sysfs.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/drivers/dma/dma-sysfs.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,133 @@
+/*
+ * arch/sh/drivers/dma/dma-sysfs.c
+ *
+ * sysfs interface for SH DMA API
+ *
+ * Copyright (C) 2004  Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/sysdev.h>
+#include <linux/module.h>
+#include <asm/dma.h>
+
+static struct sysdev_class dma_sysclass = {
+	set_kset_name("dma"),
+};
+
+EXPORT_SYMBOL(dma_sysclass);
+
+static ssize_t dma_show_devices(struct sys_device *dev, char *buf)
+{
+	ssize_t len = 0;
+	int i;
+
+	for (i = 0; i < MAX_DMA_CHANNELS; i++) {
+		struct dma_info *info = get_dma_info(i);
+		struct dma_channel *channel = &info->channels[i];
+
+		len += sprintf(buf + len, "%2d: %14s    %s\n",
+			       channel->chan, info->name,
+			       channel->dev_id);
+	}
+
+	return len;
+}
+
+static SYSDEV_ATTR(devices, S_IRUGO, dma_show_devices, NULL);
+
+static int __init dma_sysclass_init(void)
+{
+	int ret;
+
+	ret = sysdev_class_register(&dma_sysclass);
+	if (ret == 0)
+		sysfs_create_file(&dma_sysclass.kset.kobj, &attr_devices.attr);
+
+	return ret;
+}
+
+postcore_initcall(dma_sysclass_init);
+
+static ssize_t dma_show_dev_id(struct sys_device *dev, char *buf)
+{
+	struct dma_channel *channel = to_dma_channel(dev);
+	return sprintf(buf, "%s\n", channel->dev_id);
+}
+
+static ssize_t dma_store_dev_id(struct sys_device *dev,
+				const char *buf, size_t count)
+{
+	struct dma_channel *channel = to_dma_channel(dev);
+	strcpy(channel->dev_id, buf);
+	return count;
+}
+
+static SYSDEV_ATTR(dev_id, S_IRUGO | S_IWUSR, dma_show_dev_id, dma_store_dev_id);
+
+static ssize_t dma_store_config(struct sys_device *dev,
+				const char *buf, size_t count)
+{
+	struct dma_channel *channel = to_dma_channel(dev);
+	unsigned long config;
+
+	config = simple_strtoul(buf, NULL, 0);
+	dma_configure_channel(channel->chan, config);
+
+	return count;
+}
+
+static SYSDEV_ATTR(config, S_IWUSR, NULL, dma_store_config);
+
+static ssize_t dma_show_mode(struct sys_device *dev, char *buf)
+{
+	struct dma_channel *channel = to_dma_channel(dev);
+	return sprintf(buf, "0x%08x\n", channel->mode);
+}
+
+static ssize_t dma_store_mode(struct sys_device *dev,
+			      const char *buf, size_t count)
+{
+	struct dma_channel *channel = to_dma_channel(dev);
+	channel->mode = simple_strtoul(buf, NULL, 0);
+	return count;
+}
+
+static SYSDEV_ATTR(mode, S_IRUGO | S_IWUSR, dma_show_mode, dma_store_mode);
+
+#define dma_ro_attr(field, fmt)						\
+static ssize_t dma_show_##field(struct sys_device *dev, char *buf)	\
+{									\
+	struct dma_channel *channel = to_dma_channel(dev);		\
+	return sprintf(buf, fmt, channel->field);			\
+}									\
+static SYSDEV_ATTR(field, S_IRUGO, dma_show_##field, NULL);
+
+dma_ro_attr(count, "0x%08x\n");
+dma_ro_attr(flags, "0x%08lx\n");
+
+int __init dma_create_sysfs_files(struct dma_channel *chan)
+{
+	struct sys_device *dev = &chan->dev;
+	int ret;
+
+	dev->id  = chan->chan;
+	dev->cls = &dma_sysclass;
+
+	ret = sysdev_register(dev);
+	if (ret)
+		return ret;
+
+	sysdev_create_file(dev, &attr_dev_id);
+	sysdev_create_file(dev, &attr_count);
+	sysdev_create_file(dev, &attr_mode);
+	sysdev_create_file(dev, &attr_flags);
+	sysdev_create_file(dev, &attr_config);
+
+	return 0;
+}
+
--- diff/arch/sh/drivers/pci/fixups-rts7751r2d.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/drivers/pci/fixups-rts7751r2d.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,32 @@
+/*
+ * arch/sh/drivers/pci/fixups-rts7751r2d.c
+ *
+ * RTS7751R2D PCI fixups
+ *
+ * Copyright (C) 2003  Lineo uSolutions, Inc.
+ * Copyright (C) 2004  Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include "pci-sh7751.h"
+#include <asm/io.h>
+
+#define PCIMCR_MRSET_OFF	0xBFFFFFFF
+#define PCIMCR_RFSH_OFF		0xFFFFFFFB
+
+int pci_fixup_pcic(void)
+{
+	unsigned long mcr;
+
+	outl(0xfb900047, SH7751_PCICONF1);
+	outl(0xab000001, SH7751_PCICONF4);
+
+	mcr = inl(SH7751_MCR);
+	mcr = (mcr & PCIMCR_MRSET_OFF) & PCIMCR_RFSH_OFF;
+	outl(mcr, SH7751_PCIMCR);
+
+	return 0;
+}
+
--- diff/arch/sh/drivers/pci/ops-rts7751r2d.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/drivers/pci/ops-rts7751r2d.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,74 @@
+/*
+ * linux/arch/sh/kernel/pci-rts7751r2d.c
+ *
+ * Author:  Ian DaSilva (idasilva@mvista.com)
+ *
+ * Highly leveraged from pci-bigsur.c, written by Dustin McIntire.
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * PCI initialization for the Renesas SH7751R RTS7751R2D board
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/pci.h>
+#include <linux/module.h>
+
+#include <asm/io.h>
+#include "pci-sh7751.h"
+#include <asm/rts7751r2d/rts7751r2d.h>
+
+int __init pcibios_map_platform_irq(u8 slot, u8 pin)
+{
+        switch (slot) {
+	case 0: return IRQ_PCISLOT1;	/* PCI Extend slot #1 */
+	case 1: return IRQ_PCISLOT2;	/* PCI Extend slot #2 */
+	case 2: return IRQ_PCMCIA;	/* PCI Cardbus Bridge */
+	case 3: return IRQ_PCIETH;	/* Realtek Ethernet controller */
+	default:
+		printk("PCI: Bad IRQ mapping request for slot %d\n", slot);
+		return -1;
+	}
+}
+
+static struct resource sh7751_io_resource = {
+	.name	= "SH7751_IO",
+	.start	= 0x4000,
+	.end	= 0x4000 + SH7751_PCI_IO_SIZE - 1,
+	.flags	= IORESOURCE_IO
+};
+
+static struct resource sh7751_mem_resource = {
+	.name	= "SH7751_mem",
+	.start	= SH7751_PCI_MEMORY_BASE,
+	.end	= SH7751_PCI_MEMORY_BASE + SH7751_PCI_MEM_SIZE - 1,
+	.flags	= IORESOURCE_MEM
+};
+
+extern struct pci_ops sh7751_pci_ops;
+
+struct pci_channel board_pci_channels[] = {
+	{ &sh7751_pci_ops, &sh7751_io_resource, &sh7751_mem_resource, 0, 0xff },
+	{ NULL, NULL, NULL, 0, 0 },
+};
+EXPORT_SYMBOL(board_pci_channels);
+
+static struct sh7751_pci_address_map sh7751_pci_map = {
+	.window0	= {
+		.base	= SH7751_CS3_BASE_ADDR,
+		.size	= 0x03f00000,
+	},
+
+	.flags	= SH7751_PCIC_NO_RESET,
+};
+
+int __init pcibios_init_platform(void)
+{
+	return sh7751_pcic_init(&sh7751_pci_map);
+}
+
--- diff/arch/sh/kernel/cpu/adc.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/kernel/cpu/adc.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,36 @@
+/*
+ * linux/arch/sh/kernel/adc.c -- SH3 on-chip ADC support
+ *
+ *  Copyright (C) 2004  Andriy Skulysh <askulysh@image.kiev.ua>
+ */
+
+#include <linux/module.h>
+#include <asm/adc.h>
+#include <asm/io.h>
+
+
+int adc_single(unsigned int channel)
+{
+	int off;
+	unsigned char csr;
+
+	if (channel >= 8) return -1;
+
+	off = (channel & 0x03) << 2;
+
+	csr = ctrl_inb(ADCSR);
+	csr = channel | ADCSR_ADST | ADCSR_CKS;
+	ctrl_outb(csr, ADCSR);
+
+	do {
+		csr = ctrl_inb(ADCSR);
+	} while ((csr & ADCSR_ADF) == 0);
+
+	csr &= ~(ADCSR_ADF | ADCSR_ADST);
+	ctrl_outb(csr, ADCSR);
+
+	return (((ctrl_inb(ADDRAH + off) << 8) |
+		ctrl_inb(ADDRAL + off)) >> 6);
+}
+
+EXPORT_SYMBOL(adc_single);
--- diff/arch/sh/kernel/cpu/bus.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/kernel/cpu/bus.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,195 @@
+/*
+ * arch/sh/kernel/cpu/bus.c
+ *
+ * Virtual bus for SuperH.
+ *
+ * Copyright (C) 2004 Paul Mundt
+ *
+ * Shamelessly cloned from arch/arm/mach-omap/bus.c, which was written
+ * by:
+ *
+ *  	Copyright (C) 2003 - 2004 Nokia Corporation
+ *  	Written by Tony Lindgren <tony@atomide.com>
+ *  	Portions of code based on sa1111.c.
+ *
+ * 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.
+ */
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <asm/bus-sh.h>
+
+static int sh_bus_match(struct device *dev, struct device_driver *drv)
+{
+	struct sh_driver *shdrv = to_sh_driver(drv);
+	struct sh_dev *shdev = to_sh_dev(dev);
+
+	return shdev->dev_id == shdrv->dev_id;
+}
+
+static int sh_bus_suspend(struct device *dev, u32 state)
+{
+	struct sh_dev *shdev = to_sh_dev(dev);
+	struct sh_driver *shdrv = to_sh_driver(dev->driver);
+
+	if (shdrv && shdrv->suspend)
+		return shdrv->suspend(shdev, state);
+
+	return 0;
+}
+
+static int sh_bus_resume(struct device *dev)
+{
+	struct sh_dev *shdev = to_sh_dev(dev);
+	struct sh_driver *shdrv = to_sh_driver(dev->driver);
+
+	if (shdrv && shdrv->resume)
+		return shdrv->resume(shdev);
+
+	return 0;
+}
+
+static struct device sh_bus_devices[SH_NR_BUSES] = {
+	{
+		.bus_id		= SH_BUS_NAME_VIRT,
+	},
+};
+
+struct bus_type sh_bus_types[SH_NR_BUSES] = {
+	{
+		.name		= SH_BUS_NAME_VIRT,
+		.match		= sh_bus_match,
+		.suspend	= sh_bus_suspend,
+		.resume		= sh_bus_resume,
+	},
+};
+
+static int sh_device_probe(struct device *dev)
+{
+	struct sh_dev *shdev = to_sh_dev(dev);
+	struct sh_driver *shdrv = to_sh_driver(dev->driver);
+
+	if (shdrv && shdrv->probe)
+		return shdrv->probe(shdev);
+
+	return -ENODEV;
+}
+
+static int sh_device_remove(struct device *dev)
+{
+	struct sh_dev *shdev = to_sh_dev(dev);
+	struct sh_driver *shdrv = to_sh_driver(dev->driver);
+
+	if (shdrv && shdrv->remove)
+		return shdrv->remove(shdev);
+
+	return 0;
+}
+
+int sh_device_register(struct sh_dev *dev)
+{
+	if (!dev)
+		return -EINVAL;
+
+	if (dev->bus_id < 0 || dev->bus_id >= SH_NR_BUSES) {
+		printk(KERN_ERR "%s: bus_id invalid: %s bus: %d\n",
+		       __FUNCTION__, dev->name, dev->bus_id);
+		return -EINVAL;
+	}
+
+	dev->dev.parent = &sh_bus_devices[dev->bus_id];
+	dev->dev.bus    = &sh_bus_types[dev->bus_id];
+
+	/* This is needed for USB OHCI to work */
+	if (dev->dma_mask)
+		dev->dev.dma_mask = dev->dma_mask;
+
+	snprintf(dev->dev.bus_id, BUS_ID_SIZE, "%s%u",
+		 dev->name, dev->dev_id);
+
+	printk(KERN_INFO "Registering SH device '%s'. Parent at %s\n",
+	       dev->dev.bus_id, dev->dev.parent->bus_id);
+
+	return device_register(&dev->dev);
+}
+
+void sh_device_unregister(struct sh_dev *dev)
+{
+	device_unregister(&dev->dev);
+}
+
+int sh_driver_register(struct sh_driver *drv)
+{
+	if (!drv)
+		return -EINVAL;
+
+	if (drv->bus_id < 0 || drv->bus_id >= SH_NR_BUSES) {
+		printk(KERN_ERR "%s: bus_id invalid: bus: %d device %d\n",
+		       __FUNCTION__, drv->bus_id, drv->dev_id);
+		return -EINVAL;
+	}
+
+	drv->drv.probe  = sh_device_probe;
+	drv->drv.remove = sh_device_remove;
+	drv->drv.bus    = &sh_bus_types[drv->bus_id];
+
+	return driver_register(&drv->drv);
+}
+
+void sh_driver_unregister(struct sh_driver *drv)
+{
+	driver_unregister(&drv->drv);
+}
+
+static int __init sh_bus_init(void)
+{
+	int i, ret = 0;
+
+	for (i = 0; i < SH_NR_BUSES; i++) {
+		ret = device_register(&sh_bus_devices[i]);
+		if (ret != 0) {
+			printk(KERN_ERR "Unable to register bus device %s\n",
+			       sh_bus_devices[i].bus_id);
+			continue;
+		}
+
+		ret = bus_register(&sh_bus_types[i]);
+		if (ret != 0) {
+			printk(KERN_ERR "Unable to register bus %s\n",
+			       sh_bus_types[i].name);
+			device_unregister(&sh_bus_devices[i]);
+		}
+	}
+
+	printk(KERN_INFO "SH Virtual Bus initialized\n");
+
+	return ret;
+}
+
+static void __exit sh_bus_exit(void)
+{
+	int i;
+
+	for (i = 0; i < SH_NR_BUSES; i++) {
+		bus_unregister(&sh_bus_types[i]);
+		device_unregister(&sh_bus_devices[i]);
+	}
+}
+
+module_init(sh_bus_init);
+module_exit(sh_bus_exit);
+
+MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>");
+MODULE_DESCRIPTION("SH Virtual Bus");
+MODULE_LICENSE("GPL");
+
+EXPORT_SYMBOL(sh_bus_types);
+EXPORT_SYMBOL(sh_device_register);
+EXPORT_SYMBOL(sh_device_unregister);
+EXPORT_SYMBOL(sh_driver_register);
+EXPORT_SYMBOL(sh_driver_unregister);
+
--- diff/arch/sh/kernel/early_printk.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/kernel/early_printk.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,135 @@
+/*
+ * arch/sh/kernel/early_printk.c
+ *
+ *  Copyright (C) 1999, 2000  Niibe Yutaka
+ *  Copyright (C) 2002  M. R. Brown
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/console.h>
+#include <linux/tty.h>
+#include <linux/init.h>
+#include <asm/io.h>
+
+#ifdef CONFIG_SH_STANDARD_BIOS
+#include <asm/sh_bios.h>
+
+/*
+ *	Print a string through the BIOS
+ */
+static void sh_console_write(struct console *co, const char *s,
+				 unsigned count)
+{
+	sh_bios_console_write(s, count);
+}
+
+/*
+ *	Setup initial baud/bits/parity. We do two things here:
+ *	- construct a cflag setting for the first rs_open()
+ *	- initialize the serial port
+ *	Return non-zero if we didn't find a serial port.
+ */
+static int __init sh_console_setup(struct console *co, char *options)
+{
+	int	cflag = CREAD | HUPCL | CLOCAL;
+
+	/*
+	 *	Now construct a cflag setting.
+	 *	TODO: this is a totally bogus cflag, as we have
+	 *	no idea what serial settings the BIOS is using, or
+	 *	even if its using the serial port at all.
+	 */
+	cflag |= B115200 | CS8 | /*no parity*/0;
+
+	co->cflag = cflag;
+
+	return 0;
+}
+
+static struct console early_console = {
+	.name		= "bios",
+	.write		= sh_console_write,
+	.setup		= sh_console_setup,
+	.flags		= CON_PRINTBUFFER,
+	.index		= -1,
+};
+#endif
+
+#ifdef CONFIG_EARLY_SCIF_CONSOLE
+#define SCIF_REG	0xffe80000
+
+static void scif_sercon_putc(int c)
+{
+	while (!(ctrl_inw(SCIF_REG + 0x10) & 0x20)) ;
+
+	ctrl_outb(c, SCIF_REG + 12);
+	ctrl_outw((ctrl_inw(SCIF_REG + 0x10) & 0x9f), SCIF_REG + 0x10);
+
+	if (c == '\n')
+		scif_sercon_putc('\r');
+}
+
+static void scif_sercon_flush(void)
+{
+	ctrl_outw((ctrl_inw(SCIF_REG + 0x10) & 0xbf), SCIF_REG + 0x10);
+
+	while (!(ctrl_inw(SCIF_REG + 0x10) & 0x40)) ;
+
+	ctrl_outw((ctrl_inw(SCIF_REG + 0x10) & 0xbf), SCIF_REG + 0x10);
+}
+
+static void scif_sercon_write(struct console *con, const char *s, unsigned count)
+{
+	while (count-- > 0)
+		scif_sercon_putc(*s++);
+
+	scif_sercon_flush();
+}
+
+static int __init scif_sercon_setup(struct console *con, char *options)
+{
+	con->cflag = CREAD | HUPCL | CLOCAL | B115200 | CS8;
+
+	return 0;
+}
+
+static struct console early_console = {
+	.name		= "sercon",
+	.write		= scif_sercon_write,
+	.setup		= scif_sercon_setup,
+	.flags		= CON_PRINTBUFFER,
+	.index		= -1,
+};
+
+void scif_sercon_init(int baud)
+{
+	ctrl_outw(0, SCIF_REG + 8);
+	ctrl_outw(0, SCIF_REG);
+
+	/* Set baud rate */
+	ctrl_outb((50000000 / (32 * baud)) - 1, SCIF_REG + 4);
+
+	ctrl_outw(12, SCIF_REG + 24);
+	ctrl_outw(8, SCIF_REG + 24);
+	ctrl_outw(0, SCIF_REG + 32);
+	ctrl_outw(0x60, SCIF_REG + 16);
+	ctrl_outw(0, SCIF_REG + 36);
+	ctrl_outw(0x30, SCIF_REG + 8);
+}
+#endif
+
+void __init enable_early_printk(void)
+{
+#ifdef CONFIG_EARLY_SCIF_CONSOLE
+	scif_sercon_init(115200);
+#endif
+	register_console(&early_console);
+}
+
+void disable_early_printk(void)
+{
+	unregister_console(&early_console);
+}
+
--- diff/arch/sh/ramdisk/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/ramdisk/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,19 @@
+#
+# Makefile for a ramdisk image
+#
+
+obj-y += ramdisk.o
+
+
+O_FORMAT = $(shell $(OBJDUMP) -i | head -n 2 | grep elf32)
+img := $(subst ",,$(CONFIG_EMBEDDED_RAMDISK_IMAGE))
+# add $(src) when $(img) is relative
+img := $(subst $(src)//,/,$(src)/$(img))
+
+quiet_cmd_ramdisk = LD      $@
+define cmd_ramdisk
+	$(LD) -T $(src)/ld.script -b binary --oformat $(O_FORMAT) -o $@ $(img)
+endef
+
+$(obj)/ramdisk.o: $(img) $(src)/ld.script
+	$(call cmd,ramdisk)
--- diff/arch/sh/ramdisk/ld.script	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh/ramdisk/ld.script	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,9 @@
+OUTPUT_ARCH(sh)
+SECTIONS
+{
+  .initrd :
+  {
+       *(.data)
+  }
+}
+
--- diff/arch/sh64/Kconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/Kconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,320 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+
+mainmenu "Linux/SH64 Kernel Configuration"
+
+config SUPERH
+	bool
+	default y
+
+config SUPERH64
+	bool
+	default y
+
+config MMU
+	bool
+	default y
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config LOG_BUF_SHIFT
+	int
+	default 14
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config GENERIC_ISA_DMA
+	bool
+
+source init/Kconfig
+
+menu "System type"
+
+choice
+	prompt "SuperH system type"
+	default SH_SIMULATOR
+
+config SH_GENERIC
+	bool "Generic"
+
+config SH_SIMULATOR
+	bool "Simulator"
+
+config SH_CAYMAN
+	bool "Cayman"
+
+config SH_ROMRAM
+	bool "ROM/RAM"
+
+config SH_HARP
+	bool "ST50-Harp"
+
+endchoice
+
+choice
+	prompt "Processor family"
+	default CPU_SH5
+
+config CPU_SH5
+	bool "SH-5"
+
+endchoice
+
+choice
+	prompt "Processor type"
+
+config CPU_SUBTYPE_SH5_101
+	bool "SH5-101"
+	depends on CPU_SH5
+
+config CPU_SUBTYPE_SH5_103
+	bool "SH5-103"
+	depends on CPU_SH5
+
+endchoice
+
+choice
+	prompt "Endianness"
+	default LITTLE_ENDIAN
+
+config LITTLE_ENDIAN
+	bool "Little-Endian"
+
+config BIG_ENDIAN
+	bool "Big-Endian"
+
+endchoice
+
+config SH64_FPU_DENORM_FLUSH
+	bool "Flush floating point denorms to zero"
+
+choice
+	prompt "Page table levels"
+	default SH64_PGTABLE_2_LEVEL
+
+config SH64_PGTABLE_2_LEVEL
+	bool "2"
+
+config SH64_PGTABLE_3_LEVEL
+	bool "3"
+
+endchoice
+
+choice
+	prompt "HugeTLB page size"
+	depends on HUGETLB_PAGE && MMU
+	default HUGETLB_PAGE_SIZE_64K
+
+config HUGETLB_PAGE_SIZE_64K
+	bool "64K"
+
+config HUGETLB_PAGE_SIZE_1MB
+	bool "1MB"
+
+config HUGETLB_PAGE_SIZE_512MB
+	bool "512MB"
+
+endchoice
+
+config SH64_USER_MISALIGNED_FIXUP
+	bool "Fixup misaligned loads/stores occurring in user mode"
+
+comment "Memory options"
+
+config CACHED_MEMORY_OFFSET
+	hex "Cached Area Offset"
+	depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
+	default "20000000"
+
+config MEMORY_START
+	hex "Physical memory start address"
+	depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
+	default "80000000"
+
+config MEMORY_SIZE_IN_MB
+	int "Memory size (in MB)" if SH_HARP || SH_CAYMAN || SH_SIMULATOR
+	default "64" if SH_HARP || SH_CAYMAN
+	default "8" if SH_SIMULATOR
+
+comment "Cache options"
+
+config DCACHE_DISABLED
+	bool "DCache Disabling"
+	depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
+
+choice
+	prompt "DCache mode"
+	depends on !DCACHE_DISABLED && !SH_SIMULATOR
+	default DCACHE_WRITE_BACK
+
+config DCACHE_WRITE_BACK
+	bool "Write-back"
+
+config DCACHE_WRITE_THROUGH
+	bool "Write-through"
+
+endchoice
+
+config ICACHE_DISABLED
+	bool "ICache Disabling"
+	depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
+
+config PCIDEVICE_MEMORY_START
+	hex
+	depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
+	default "C0000000"
+
+config DEVICE_MEMORY_START
+	hex
+	depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
+	default "E0000000"
+
+config FLASH_MEMORY_START
+	hex "Flash memory/on-chip devices start address"
+	depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
+	default "00000000"
+
+config PCI_BLOCK_START
+	hex "PCI block start address"
+	depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
+	default "40000000"
+
+comment "CPU Subtype specific options"
+
+config SH64_ID2815_WORKAROUND
+	bool "Include workaround for SH5-101 cut2 silicon defect ID2815"
+
+comment "Misc options"
+config HEARTBEAT
+	bool "Heartbeat LED"
+
+config HDSP253_LED
+	bool "Support for HDSP-253 LED"
+	depends on SH_CAYMAN
+
+config SH_DMA
+	tristate "DMA controller (DMAC) support"
+
+config PREEMPT
+	bool "Preemptible Kernel (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+
+endmenu
+
+menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
+
+config ISA
+	bool
+
+config SBUS
+	bool
+
+config PCI
+	bool "PCI support"
+	help
+	  Find out whether you have a PCI motherboard. PCI is the name of a
+	  bus system, i.e. the way the CPU talks to the other stuff inside
+	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
+	  VESA. If you have PCI, say Y, otherwise N.
+
+	  The PCI-HOWTO, available from
+	  <http://www.tldp.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config SH_PCIDMA_NONCOHERENT
+	bool "Cache and PCI noncoherent"
+	depends on PCI
+	default y
+	help
+	  Enable this option if your platform does not have a CPU cache which
+	  remains coherent with PCI DMA. It is safest to say 'Y', although you
+	  will see better performance if you can say 'N', because the PCI DMA
+	  code will not have to flush the CPU's caches. If you have a PCI host
+	  bridge integrated with your SH CPU, refer carefully to the chip specs
+	  to see if you can say 'N' here. Otherwise, leave it as 'Y'.
+
+source "drivers/pci/Kconfig"
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/pci/hotplug/Kconfig"
+
+endmenu
+
+menu "Executable file formats"
+
+source "fs/Kconfig.binfmt"
+
+endmenu
+
+source "drivers/Kconfig"
+
+source "fs/Kconfig"
+
+source "arch/sh64/oprofile/Kconfig"
+
+menu "Kernel hacking"
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	help
+	  If you say Y here, you will have some control over the system even
+	  if the system crashes for example during kernel debugging (e.g., you
+	  will be able to flush the buffer cache to disk, reboot the system
+	  immediately or dump some status information). This is accomplished
+	  by pressing various keys while holding SysRq (Alt+PrintScreen). It
+	  also works on a serial console (on PC hardware at least), if you
+	  send a BREAK and then within 5 seconds a command keypress. The
+	  keys are documented in Documentation/sysrq.txt. Don't say Y unless
+	  you really know what this hack does.
+
+config EARLY_PRINTK
+	bool "Early SCIF console support"
+
+config DEBUG_KERNEL_WITH_GDB_STUB
+	bool "GDB Stub kernel debug"
+
+config SH64_PROC_TLB
+	bool "Debug: report TLB fill/purge activity through /proc/tlb"
+	depends on PROC_FS
+
+config SH64_PROC_ASIDS
+	bool "Debug: report ASIDs through /proc/asids"
+	depends on PROC_FS
+
+config SH64_SR_WATCH
+	bool "Debug: set SR.WATCH to enable hardware watchpoints and trace"
+
+config SH_ALPHANUMERIC
+	bool "Enable debug outputs to on-board alphanumeric display"
+
+config SH_NO_BSS_INIT
+	bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
+
+config FRAME_POINTER
+	bool "Compile the kernel with frame pointers"
+	default y if KGDB
+	help
+	  If you say Y here the resulting kernel image will be slightly larger
+	  and slower, but it will give very useful debugging information.
+	  If you don't debug the kernel, you can say N, but we may not be able
+	  to solve problems without frame pointers.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
--- diff/arch/sh64/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,112 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 2000, 2001  Paolo Alberelli
+# Copyright (C) 2003, 2004  Paul Mundt
+#
+# This file is included by the global makefile so that you can add your own
+# architecture-specific flags and dependencies. Remember to do have actions
+# for "archclean" and "archdep" for cleaning up and making dependencies for
+# this architecture
+#
+# Note that top level Makefile automagically builds dependencies for SUBDIRS
+# but does not automagically clean SUBDIRS. Therefore "archclean" should clean
+# up all, "archdep" does nothing on added SUBDIRS.
+#
+ifndef include_config
+-include .config
+endif
+
+cpu-y				:= -mb
+cpu-$(CONFIG_LITTLE_ENDIAN)	:= -ml
+
+cpu-$(CONFIG_CPU_SH5)		+= -m5-32media-nofpu
+
+ifdef CONFIG_LITTLE_ENDIAN
+LDFLAGS_vmlinux		+= --defsym 'jiffies=jiffies_64'
+LDFLAGS			+= -EL  -mshlelf32_linux
+else
+LDFLAGS_vmlinux		+= --defsym 'jiffies=jiffies_64+4'
+LDFLAGS			+= -EB  -mshelf32_linux
+endif
+
+# No requirements for endianess support from AFLAGS, 'as' always run through gcc
+AFLAGS		+= -m5 -isa=sh64 -traditional
+CFLAGS		+= $(cpu-y)
+
+LDFLAGS_vmlinux	+= --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \
+		   -e phys_stext
+
+OBJCOPYFLAGS	:= -O binary -R .note -R .comment -R .stab -R .stabstr -S
+
+ifdef LOADADDR
+LINKFLAGS     += -Ttext $(word 1,$(LOADADDR))
+endif
+
+machine-$(CONFIG_SH_CAYMAN)	:= cayman
+machine-$(CONFIG_SH_SIMULATOR)	:= sim
+machine-$(CONFIG_SH_HARP)	:= harp
+machine-$(CONFIG_SH_ROMRAM)	:= romram
+
+head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
+
+core-y += $(addprefix arch/$(ARCH)/, kernel/ mm/ mach-$(machine-y)/)
+
+LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+libs-y	+= arch/$(ARCH)/lib/ $(LIBGCC)
+
+drivers-$(CONFIG_OPROFILE)	+= arch/sh64/oprofile/
+
+boot := arch/$(ARCH)/boot
+
+zImage: vmlinux
+	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+
+compressed: zImage
+
+archclean:
+	$(Q)$(MAKE) $(clean)=$(boot)
+
+prepare: include/asm-$(ARCH)/asm-offsets.h arch/$(ARCH)/lib/syscalltab.h
+
+include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
+				   include/asm include/linux/version.h
+	$(call filechk,gen-asm-offsets)
+
+define filechk_gen-syscalltab
+       (set -e; \
+	echo "/*"; \
+	echo " * DO NOT MODIFY."; \
+	echo " *"; \
+	echo " * This file was generated by arch/$(ARCH)/Makefile"; \
+	echo " * Any changes will be reverted at build time."; \
+	echo " */"; \
+	echo ""; \
+	echo "#ifndef __SYSCALLTAB_H"; \
+	echo "#define __SYSCALLTAB_H"; \
+	echo ""; \
+	echo "#include <linux/kernel.h>"; \
+	echo ""; \
+	echo "struct syscall_info {"; \
+	echo "	const char *name;"; \
+	echo "} syscall_info_table[] = {"; \
+	sed -e '/^.*\.long /!d;s//\t{ "/;s/\(\([^/]*\)\/\)\{1\}.*/\2/; \
+		s/[ \t]*$$//g;s/$$/" },/;s/\("\)sys_/\1/g'; \
+	echo "};"; \
+	echo ""; \
+	echo "#define NUM_SYSCALL_INFO_ENTRIES	ARRAY_SIZE(syscall_info_table)"; \
+	echo ""; \
+	echo "#endif /* __SYSCALLTAB_H */" )
+endef
+
+arch/$(ARCH)/lib/syscalltab.h: arch/sh64/kernel/syscalls.S
+	$(call filechk,gen-syscalltab)
+
+CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h arch/$(ARCH)/lib/syscalltab.h
+
+define archhelp
+	@echo '  zImage 	           - Compressed kernel image (arch/sh64/boot/zImage)'
+endef
+
--- diff/arch/sh64/boot/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/boot/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,20 @@
+#
+# arch/sh64/boot/Makefile
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 2002 Stuart Menefy
+#
+
+targets := zImage
+subdir- := compressed
+
+$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
+	$(call if_changed,objcopy)
+	@echo 'Kernel: $@ is ready'
+
+$(obj)/compressed/vmlinux: FORCE
+	$(Q)$(MAKE) $(build)=$(obj)/compressed $@
+
--- diff/arch/sh64/boot/compressed/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/boot/compressed/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,46 @@
+#
+# linux/arch/sh64/boot/compressed/Makefile
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 2002 Stuart Menefy
+# Copyright (C) 2004 Paul Mundt
+#
+# create a compressed vmlinux image from the original vmlinux
+#
+
+targets		:= vmlinux vmlinux.bin vmlinux.bin.gz \
+		   head.o misc.o cache.o piggy.o vmlinux.lds.o
+
+EXTRA_AFLAGS	:= -traditional
+
+OBJECTS		:= $(obj)/head.o $(obj)/misc.o $(obj)/cache.o
+
+#
+# ZIMAGE_OFFSET is the load offset of the compression loader
+# (4M for the kernel plus 64K for this loader)
+#
+ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[$(CONFIG_MEMORY_START)+0x400000+0x10000])
+
+LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \
+		    -T $(obj)/../../kernel/vmlinux.lds.s \
+		    --no-warn-mismatch
+
+$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
+	$(call if_changed,ld)
+	@:
+
+$(obj)/vmlinux.bin: vmlinux FORCE
+	$(call if_changed,objcopy)
+
+$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
+	$(call if_changed,gzip)
+
+LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
+OBJCOPYFLAGS += -R .empty_zero_page
+
+$(obj)/piggy.o: $(obj)/vmlinux.lds.s $(obj)/vmlinux.bin.gz FORCE
+	$(call if_changed,ld)
+
--- diff/arch/sh64/boot/compressed/cache.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/boot/compressed/cache.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,39 @@
+/*
+ * arch/shmedia/boot/compressed/cache.c -- simple cache management functions
+ *
+ * Code extracted from sh-ipl+g, sh-stub.c, which has the copyright:
+ *
+ *   This is originally based on an m68k software stub written by Glenn
+ *   Engel at HP, but has changed quite a bit.
+ *
+ *   Modifications for the SH by Ben Lee and Steve Chamberlain
+ *
+****************************************************************************
+
+		THIS SOFTWARE IS NOT COPYRIGHTED
+
+   HP offers the following for use in the public domain.  HP makes no
+   warranty with regard to the software or it's performance and the
+   user accepts the software "AS IS" with all faults.
+
+   HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
+   TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+****************************************************************************/
+
+#define CACHE_ENABLE      0
+#define CACHE_DISABLE     1
+
+int cache_control(unsigned int command)
+{
+	volatile unsigned int *p = (volatile unsigned int *) 0x80000000;
+	int i;
+
+	for (i = 0; i < (32 * 1024); i += 32) {
+		(void *) *p;
+		p += (32 / sizeof (int));
+	}
+
+	return 0;
+}
--- diff/arch/sh64/boot/compressed/head.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/boot/compressed/head.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,164 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/shmedia/boot/compressed/head.S
+ *
+ * Copied from
+ *   arch/shmedia/kernel/head.S
+ * which carried the copyright:
+ *   Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * Modification for compressed loader:
+ *   Copyright (C) 2002 Stuart Menefy (stuart.menefy@st.com)
+ */
+
+#include <linux/linkage.h>
+#include <asm/registers.h>
+#include <asm/cache.h>
+#include <asm/mmu_context.h>
+
+/*
+ * Fixed TLB entries to identity map the beginning of RAM
+ */
+#define MMUIR_TEXT_H	0x0000000000000003 | CONFIG_MEMORY_START
+			/* Enabled, Shared, ASID 0, Eff. Add. 0xA0000000 */
+#define MMUIR_TEXT_L	0x000000000000009a | CONFIG_MEMORY_START
+			/* 512 Mb, Cacheable (Write-back), execute, Not User, Ph. Add. */
+
+#define MMUDR_CACHED_H	0x0000000000000003 | CONFIG_MEMORY_START
+			/* Enabled, Shared, ASID 0, Eff. Add. 0xA0000000 */
+#define MMUDR_CACHED_L	0x000000000000015a | CONFIG_MEMORY_START
+			/* 512 Mb, Cacheable (Write-back), read/write, Not User, Ph. Add. */
+
+#define	ICCR0_INIT_VAL	ICCR0_ON | ICCR0_ICI		/* ICE + ICI */
+#define	ICCR1_INIT_VAL	ICCR1_NOLOCK			/* No locking */
+
+#if 1
+#define	OCCR0_INIT_VAL	OCCR0_ON | OCCR0_OCI | OCCR0_WB	/* OCE + OCI + WB */
+#else
+#define	OCCR0_INIT_VAL	OCCR0_OFF
+#endif
+#define	OCCR1_INIT_VAL	OCCR1_NOLOCK			/* No locking */
+
+	.text
+
+	.global	startup
+startup:
+	/*
+	 * Prevent speculative fetch on device memory due to
+	 * uninitialized target registers.
+	 * This must be executed before the first branch.
+	 */
+	ptabs/u	ZERO, tr0
+	ptabs/u	ZERO, tr1
+	ptabs/u	ZERO, tr2
+	ptabs/u	ZERO, tr3
+	ptabs/u	ZERO, tr4
+	ptabs/u	ZERO, tr5
+	ptabs/u	ZERO, tr6
+	ptabs/u	ZERO, tr7
+	synci
+
+	/*
+	 * Set initial TLB entries for cached and uncached regions.
+	 * Note: PTA/BLINK is PIC code, PTABS/BLINK isn't !
+	 */
+	/* Clear ITLBs */
+	pta	1f, tr1
+	movi	ITLB_FIXED, r21
+	movi	ITLB_LAST_VAR_UNRESTRICTED+TLB_STEP, r22
+1:	putcfg	r21, 0, ZERO		/* Clear MMUIR[n].PTEH.V */
+	addi	r21, TLB_STEP, r21
+        bne	r21, r22, tr1
+
+	/* Clear DTLBs */
+	pta	1f, tr1
+	movi	DTLB_FIXED, r21
+	movi	DTLB_LAST_VAR_UNRESTRICTED+TLB_STEP, r22
+1:	putcfg	r21, 0, ZERO		/* Clear MMUDR[n].PTEH.V */
+	addi	r21, TLB_STEP, r21
+        bne	r21, r22, tr1
+
+	/* Map one big (512Mb) page for ITLB */
+	movi	ITLB_FIXED, r21
+	movi	MMUIR_TEXT_L, r22	/* PTEL first */
+	putcfg	r21, 1, r22		/* Set MMUIR[0].PTEL */
+	movi	MMUIR_TEXT_H, r22	/* PTEH last */
+	putcfg	r21, 0, r22		/* Set MMUIR[0].PTEH */
+
+	/* Map one big CACHED (512Mb) page for DTLB */
+	movi	DTLB_FIXED, r21
+	movi	MMUDR_CACHED_L, r22	/* PTEL first */
+	putcfg	r21, 1, r22		/* Set MMUDR[0].PTEL */
+	movi	MMUDR_CACHED_H, r22	/* PTEH last */
+	putcfg	r21, 0, r22		/* Set MMUDR[0].PTEH */
+
+	/* ICache */
+	movi	ICCR_BASE, r21
+	movi	ICCR0_INIT_VAL, r22
+	movi	ICCR1_INIT_VAL, r23
+	putcfg	r21, ICCR_REG0, r22
+	putcfg	r21, ICCR_REG1, r23
+	synci
+
+	/* OCache */
+	movi	OCCR_BASE, r21
+	movi	OCCR0_INIT_VAL, r22
+	movi	OCCR1_INIT_VAL, r23
+	putcfg	r21, OCCR_REG0, r22
+	putcfg	r21, OCCR_REG1, r23
+	synco
+
+	/*
+	 * Enable the MMU.
+	 * From here-on code can be non-PIC.
+	 */
+	movi	SR_HARMLESS | SR_ENABLE_MMU, r22
+	putcon	r22, SSR
+	movi	1f, r22
+	putcon	r22, SPC
+	synco
+	rte				/* And now go into the hyperspace ... */
+1:					/* ... that's the next instruction ! */
+
+	/* Set initial stack pointer */
+	movi	datalabel stack_start, r0
+	ld.l	r0, 0, r15
+
+	/*
+	 * Clear bss
+	 */
+	pt	1f, tr1
+	movi	datalabel __bss_start, r22
+	movi	datalabel _end, r23
+1:	st.l	r22, 0, ZERO
+	addi	r22, 4, r22
+	bne	r22, r23, tr1
+
+	/*
+	 * Decompress the kernel.
+	 */
+	pt	decompress_kernel, tr0
+	blink	tr0, r18
+
+	/*
+	 * Disable the MMU.
+	 */
+	movi	SR_HARMLESS, r22
+	putcon	r22, SSR
+	movi	1f, r22
+	putcon	r22, SPC
+	synco
+	rte				/* And now go into the hyperspace ... */
+1:					/* ... that's the next instruction ! */
+
+	/* Jump into the decompressed kernel */
+	movi	datalabel (CONFIG_MEMORY_START + 0x2000)+1, r19
+	ptabs	r19, tr0
+	blink	tr0, r18
+
+	/* Shouldn't return here, but just in case, loop forever */
+	pt	1f, tr0
+1:	blink	tr0, ZERO
--- diff/arch/sh64/boot/compressed/install.sh	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/boot/compressed/install.sh	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# arch/sh/boot/install.sh
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 1995 by Linus Torvalds
+#
+# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
+# Adapted from code in arch/i386/boot/install.sh by Russell King
+# Adapted from code in arch/arm/boot/install.sh by Stuart Menefy
+#
+# "make install" script for sh architecture
+#
+# Arguments:
+#   $1 - kernel version
+#   $2 - kernel image file
+#   $3 - kernel map file
+#   $4 - default install path (blank if root directory)
+#
+
+# User may have a custom install script
+
+if [ -x /sbin/installkernel ]; then
+  exec /sbin/installkernel "$@"
+fi
+
+if [ "$2" = "zImage" ]; then
+# Compressed install
+  echo "Installing compressed kernel"
+  if [ -f $4/vmlinuz-$1 ]; then
+    mv $4/vmlinuz-$1 $4/vmlinuz.old
+  fi
+
+  if [ -f $4/System.map-$1 ]; then
+    mv $4/System.map-$1 $4/System.old
+  fi
+
+  cat $2 > $4/vmlinuz-$1
+  cp $3 $4/System.map-$1
+else
+# Normal install
+  echo "Installing normal kernel"
+  if [ -f $4/vmlinux-$1 ]; then
+    mv $4/vmlinux-$1 $4/vmlinux.old
+  fi
+
+  if [ -f $4/System.map ]; then
+    mv $4/System.map $4/System.old
+  fi
+
+  cat $2 > $4/vmlinux-$1
+  cp $3 $4/System.map
+fi
--- diff/arch/sh64/boot/compressed/misc.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/boot/compressed/misc.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,251 @@
+/*
+ * arch/shmedia/boot/compressed/misc.c
+ *
+ * This is a collection of several routines from gzip-1.0.3
+ * adapted for Linux.
+ *
+ * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
+ *
+ * Adapted for SHmedia from sh by Stuart Menefy, May 2002
+ */
+
+#include <linux/config.h>
+#include <asm/uaccess.h>
+
+/* cache.c */
+#define CACHE_ENABLE      0
+#define CACHE_DISABLE     1
+int cache_control(unsigned int command);
+
+/*
+ * gzip declarations
+ */
+
+#define OF(args)  args
+#define STATIC static
+
+#undef memset
+#undef memcpy
+#define memzero(s, n)     memset ((s), 0, (n))
+
+typedef unsigned char uch;
+typedef unsigned short ush;
+typedef unsigned long ulg;
+
+#define WSIZE 0x8000		/* Window size must be at least 32k, */
+				/* and a power of two */
+
+static uch *inbuf;		/* input buffer */
+static uch window[WSIZE];	/* Sliding window buffer */
+
+static unsigned insize = 0;	/* valid bytes in inbuf */
+static unsigned inptr = 0;	/* index of next byte to be processed in inbuf */
+static unsigned outcnt = 0;	/* bytes in output buffer */
+
+/* gzip flag byte */
+#define ASCII_FLAG   0x01	/* bit 0 set: file probably ASCII text */
+#define CONTINUATION 0x02	/* bit 1 set: continuation of multi-part gzip file */
+#define EXTRA_FIELD  0x04	/* bit 2 set: extra field present */
+#define ORIG_NAME    0x08	/* bit 3 set: original file name present */
+#define COMMENT      0x10	/* bit 4 set: file comment present */
+#define ENCRYPTED    0x20	/* bit 5 set: file is encrypted */
+#define RESERVED     0xC0	/* bit 6,7:   reserved */
+
+#define get_byte()  (inptr < insize ? inbuf[inptr++] : fill_inbuf())
+
+/* Diagnostic functions */
+#ifdef DEBUG
+#  define Assert(cond,msg) {if(!(cond)) error(msg);}
+#  define Trace(x) fprintf x
+#  define Tracev(x) {if (verbose) fprintf x ;}
+#  define Tracevv(x) {if (verbose>1) fprintf x ;}
+#  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
+#  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
+#else
+#  define Assert(cond,msg)
+#  define Trace(x)
+#  define Tracev(x)
+#  define Tracevv(x)
+#  define Tracec(c,x)
+#  define Tracecv(c,x)
+#endif
+
+static int fill_inbuf(void);
+static void flush_window(void);
+static void error(char *m);
+static void gzip_mark(void **);
+static void gzip_release(void **);
+
+extern char input_data[];
+extern int input_len;
+
+static long bytes_out = 0;
+static uch *output_data;
+static unsigned long output_ptr = 0;
+
+static void *malloc(int size);
+static void free(void *where);
+static void error(char *m);
+static void gzip_mark(void **);
+static void gzip_release(void **);
+
+static void puts(const char *);
+
+extern int _text;		/* Defined in vmlinux.lds.S */
+extern int _end;
+static unsigned long free_mem_ptr;
+static unsigned long free_mem_end_ptr;
+
+#define HEAP_SIZE             0x10000
+
+#include "../../../../lib/inflate.c"
+
+static void *malloc(int size)
+{
+	void *p;
+
+	if (size < 0)
+		error("Malloc error\n");
+	if (free_mem_ptr == 0)
+		error("Memory error\n");
+
+	free_mem_ptr = (free_mem_ptr + 3) & ~3;	/* Align */
+
+	p = (void *) free_mem_ptr;
+	free_mem_ptr += size;
+
+	if (free_mem_ptr >= free_mem_end_ptr)
+		error("\nOut of memory\n");
+
+	return p;
+}
+
+static void free(void *where)
+{				/* Don't care */
+}
+
+static void gzip_mark(void **ptr)
+{
+	*ptr = (void *) free_mem_ptr;
+}
+
+static void gzip_release(void **ptr)
+{
+	free_mem_ptr = (long) *ptr;
+}
+
+void puts(const char *s)
+{
+}
+
+void *memset(void *s, int c, size_t n)
+{
+	int i;
+	char *ss = (char *) s;
+
+	for (i = 0; i < n; i++)
+		ss[i] = c;
+	return s;
+}
+
+void *memcpy(void *__dest, __const void *__src, size_t __n)
+{
+	int i;
+	char *d = (char *) __dest, *s = (char *) __src;
+
+	for (i = 0; i < __n; i++)
+		d[i] = s[i];
+	return __dest;
+}
+
+/* ===========================================================================
+ * Fill the input buffer. This is called only when the buffer is empty
+ * and at least one byte is really needed.
+ */
+static int fill_inbuf(void)
+{
+	if (insize != 0) {
+		error("ran out of input data\n");
+	}
+
+	inbuf = input_data;
+	insize = input_len;
+	inptr = 1;
+	return inbuf[0];
+}
+
+/* ===========================================================================
+ * Write the output window window[0..outcnt-1] and update crc and bytes_out.
+ * (Used for the decompressed data only.)
+ */
+static void flush_window(void)
+{
+	ulg c = crc;		/* temporary variable */
+	unsigned n;
+	uch *in, *out, ch;
+
+	in = window;
+	out = &output_data[output_ptr];
+	for (n = 0; n < outcnt; n++) {
+		ch = *out++ = *in++;
+		c = crc_32_tab[((int) c ^ ch) & 0xff] ^ (c >> 8);
+	}
+	crc = c;
+	bytes_out += (ulg) outcnt;
+	output_ptr += (ulg) outcnt;
+	outcnt = 0;
+	puts(".");
+}
+
+static void error(char *x)
+{
+	puts("\n\n");
+	puts(x);
+	puts("\n\n -- System halted");
+
+	while (1) ;		/* Halt */
+}
+
+#define STACK_SIZE (4096)
+long __attribute__ ((aligned(8))) user_stack[STACK_SIZE];
+long *stack_start = &user_stack[STACK_SIZE];
+
+void decompress_kernel(void)
+{
+	output_data = (uch *) (CONFIG_MEMORY_START + 0x2000);
+	free_mem_ptr = (unsigned long) &_end;
+	free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
+
+	makecrc();
+	puts("Uncompressing Linux... ");
+	cache_control(CACHE_ENABLE);
+	gunzip();
+	puts("\n");
+
+#if 0
+	/* When booting from ROM may want to do something like this if the
+	 * boot loader doesn't.
+	 */
+
+	/* Set up the parameters and command line */
+	{
+		volatile unsigned int *parambase =
+		    (int *) (CONFIG_MEMORY_START + 0x1000);
+
+		parambase[0] = 0x1;	/* MOUNT_ROOT_RDONLY */
+		parambase[1] = 0x0;	/* RAMDISK_FLAGS */
+		parambase[2] = 0x0200;	/* ORIG_ROOT_DEV */
+		parambase[3] = 0x0;	/* LOADER_TYPE */
+		parambase[4] = 0x0;	/* INITRD_START */
+		parambase[5] = 0x0;	/* INITRD_SIZE */
+		parambase[6] = 0;
+
+		strcpy((char *) ((int) parambase + 0x100),
+		       "console=ttySC0,38400");
+	}
+#endif
+
+	puts("Ok, booting the kernel.\n");
+
+	cache_control(CACHE_DISABLE);
+}
--- diff/arch/sh64/boot/compressed/vmlinux.lds.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/boot/compressed/vmlinux.lds.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,65 @@
+/*
+ * ld script to make compressed SuperH/shmedia Linux kernel+decompression
+ *		bootstrap
+ * Modified by Stuart Menefy from arch/sh/vmlinux.lds.S written by Niibe Yutaka
+ */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_LITTLE_ENDIAN
+/* OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux") */
+#define NOP 0x6ff0fff0
+#else
+/* OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64") */
+#define NOP 0xf0fff06f
+#endif
+
+OUTPUT_FORMAT("elf32-sh64-linux")
+OUTPUT_ARCH(sh)
+ENTRY(_start)
+
+#define ALIGNED_GAP(section, align) (((ADDR(section)+SIZEOF(section)+(align)-1) & ~((align)-1))-ADDR(section))
+#define FOLLOWING(section, align) AT (LOADADDR(section) + ALIGNED_GAP(section,align))
+
+SECTIONS
+{
+  _text = .;			/* Text and read-only data */
+
+  .text : {
+	*(.text)
+	*(.text64)
+	*(.text..SHmedia32)
+	*(.fixup)
+	*(.gnu.warning)
+	} = NOP
+  . = ALIGN(4);
+  .rodata : { *(.rodata) }
+
+  /* There is no 'real' reason for eight byte alignment, four would work
+   * as well, but gdb downloads much (*4) faster with this.
+   */
+  . = ALIGN(8);
+  .image : { *(.image) }
+  . = ALIGN(4);
+  _etext = .;			/* End of text section */
+
+  .data :			/* Data */
+	FOLLOWING(.image, 4)
+	{
+	_data = .;
+	*(.data)
+	}
+  _data_image = LOADADDR(.data);/* Address of data section in ROM */
+
+  _edata = .;			/* End of data section */
+
+  .stack : { stack = .;  _stack = .; }
+
+  . = ALIGN(4);
+  __bss_start = .;		/* BSS */
+  .bss : {
+	*(.bss)
+	}
+  . = ALIGN(4);
+  _end = . ;
+}
--- diff/arch/sh64/configs/cayman_defconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/configs/cayman_defconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,660 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_SUPERH=y
+CONFIG_SUPERH64=y
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_LOG_BUF_SHIFT=14
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+# CONFIG_SYSVIPC is not set
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# System type
+#
+# CONFIG_SH_GENERIC is not set
+# CONFIG_SH_SIMULATOR is not set
+CONFIG_SH_CAYMAN=y
+# CONFIG_SH_ROMRAM is not set
+# CONFIG_SH_HARP is not set
+
+#
+# Processor type and features
+#
+CONFIG_CPU_SH5=y
+CONFIG_CPU_SUBTYPE_SH5_101=y
+# CONFIG_CPU_SUBTYPE_SH5_103 is not set
+CONFIG_LITTLE_ENDIAN=y
+# CONFIG_BIG_ENDIAN is not set
+# CONFIG_SH64_FPU_DENORM_FLUSH is not set
+CONFIG_SH64_PGTABLE_2_LEVEL=y
+# CONFIG_SH64_PGTABLE_3_LEVEL is not set
+CONFIG_HUGETLB_PAGE_SIZE_64K=y
+# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_512MB is not set
+CONFIG_SH64_USER_MISALIGNED_FIXUP=y
+
+#
+# Memory options
+#
+CONFIG_CACHED_MEMORY_OFFSET=0x20000000
+CONFIG_MEMORY_START=0x80000000
+CONFIG_MEMORY_SIZE_IN_MB=128
+
+#
+# Cache options
+#
+# CONFIG_DCACHE_DISABLED is not set
+CONFIG_DCACHE_WRITE_BACK=y
+# CONFIG_DCACHE_WRITE_THROUGH is not set
+# CONFIG_ICACHE_DISABLED is not set
+CONFIG_PCIDEVICE_MEMORY_START=C0000000
+CONFIG_DEVICE_MEMORY_START=E0000000
+CONFIG_FLASH_MEMORY_START=0x00000000
+CONFIG_PCI_BLOCK_START=0x40000000
+
+#
+# CPU Subtype specific options
+#
+CONFIG_SH64_ID2815_WORKAROUND=y
+
+#
+# Misc options
+#
+CONFIG_HEARTBEAT=y
+CONFIG_HDSP253_LED=y
+CONFIG_SH_DMA=y
+CONFIG_PREEMPT=y
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+CONFIG_PCI=y
+CONFIG_SH_PCIDMA_NONCOHERENT=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_FLAT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_CARMEL is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_LBD is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_STNIC is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_QIC02_TAPE is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_SH_WDT is not set
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_E1355 is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON_OLD is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+CONFIG_FB_KYRO=y
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+# CONFIG_LOGO_SUPERH_MONO is not set
+# CONFIG_LOGO_SUPERH_VGA16 is not set
+CONFIG_LOGO_SUPERH_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+CONFIG_MINIX_FS=y
+CONFIG_ROMFS_FS=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_FAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_EARLY_PRINTK is not set
+# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set
+# CONFIG_SH64_PROC_TLB is not set
+# CONFIG_SH64_PROC_ASIDS is not set
+CONFIG_SH64_SR_WATCH=y
+# CONFIG_SH_ALPHANUMERIC is not set
+# CONFIG_SH_NO_BSS_INIT is not set
+CONFIG_FRAME_POINTER=y
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
--- diff/arch/sh64/defconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/defconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,660 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_SUPERH=y
+CONFIG_SUPERH64=y
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_LOG_BUF_SHIFT=14
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+# CONFIG_SYSVIPC is not set
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# System type
+#
+# CONFIG_SH_GENERIC is not set
+# CONFIG_SH_SIMULATOR is not set
+CONFIG_SH_CAYMAN=y
+# CONFIG_SH_ROMRAM is not set
+# CONFIG_SH_HARP is not set
+
+#
+# Processor type and features
+#
+CONFIG_CPU_SH5=y
+CONFIG_CPU_SUBTYPE_SH5_101=y
+# CONFIG_CPU_SUBTYPE_SH5_103 is not set
+CONFIG_LITTLE_ENDIAN=y
+# CONFIG_BIG_ENDIAN is not set
+# CONFIG_SH64_FPU_DENORM_FLUSH is not set
+CONFIG_SH64_PGTABLE_2_LEVEL=y
+# CONFIG_SH64_PGTABLE_3_LEVEL is not set
+CONFIG_HUGETLB_PAGE_SIZE_64K=y
+# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_512MB is not set
+CONFIG_SH64_USER_MISALIGNED_FIXUP=y
+
+#
+# Memory options
+#
+CONFIG_CACHED_MEMORY_OFFSET=0x20000000
+CONFIG_MEMORY_START=0x80000000
+CONFIG_MEMORY_SIZE_IN_MB=128
+
+#
+# Cache options
+#
+# CONFIG_DCACHE_DISABLED is not set
+CONFIG_DCACHE_WRITE_BACK=y
+# CONFIG_DCACHE_WRITE_THROUGH is not set
+# CONFIG_ICACHE_DISABLED is not set
+CONFIG_PCIDEVICE_MEMORY_START=C0000000
+CONFIG_DEVICE_MEMORY_START=E0000000
+CONFIG_FLASH_MEMORY_START=0x00000000
+CONFIG_PCI_BLOCK_START=0x40000000
+
+#
+# CPU Subtype specific options
+#
+CONFIG_SH64_ID2815_WORKAROUND=y
+
+#
+# Misc options
+#
+CONFIG_HEARTBEAT=y
+CONFIG_HDSP253_LED=y
+CONFIG_SH_DMA=y
+CONFIG_PREEMPT=y
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+CONFIG_PCI=y
+CONFIG_SH_PCIDMA_NONCOHERENT=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_FLAT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_CARMEL is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_LBD is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_STNIC is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_QIC02_TAPE is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_SH_WDT is not set
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_E1355 is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON_OLD is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+CONFIG_FB_KYRO=y
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+# CONFIG_LOGO_SUPERH_MONO is not set
+# CONFIG_LOGO_SUPERH_VGA16 is not set
+CONFIG_LOGO_SUPERH_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+CONFIG_MINIX_FS=y
+CONFIG_ROMFS_FS=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_FAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_EARLY_PRINTK is not set
+# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set
+# CONFIG_SH64_PROC_TLB is not set
+# CONFIG_SH64_PROC_ASIDS is not set
+CONFIG_SH64_SR_WATCH=y
+# CONFIG_SH_ALPHANUMERIC is not set
+# CONFIG_SH_NO_BSS_INIT is not set
+CONFIG_FRAME_POINTER=y
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
--- diff/arch/sh64/kernel/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,38 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 2000, 2001  Paolo Alberelli
+# Copyright (C) 2003  Paul Mundt
+#
+# Makefile for the Linux sh64 kernel.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+extra-y	:= head.o init_task.o vmlinux.lds.s
+
+obj-y	:= process.o signal.o entry.o traps.o irq.o irq_intc.o \
+	   ptrace.o setup.o time.o sys_sh64.o semaphore.o sh_ksyms.o \
+	   switchto.o syscalls.o
+
+obj-$(CONFIG_HEARTBEAT)		+= led.o
+obj-$(CONFIG_SH_ALPHANUMERIC)	+= alphanum.o
+obj-$(CONFIG_SH_DMA)		+= dma.o
+obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
+obj-$(CONFIG_KALLSYMS)		+= unwind.o
+obj-$(CONFIG_PCI)		+= pci-dma.o pcibios.o
+
+ifeq ($(CONFIG_PCI),y)
+obj-$(CONFIG_CPU_SH5)		+= pci_sh5.o
+endif
+
+ifndef CONFIG_NOFPU_SUPPORT
+obj-y				+= fpu.o
+endif
+
+USE_STANDARD_AS_RULE := true
+
--- diff/arch/sh64/kernel/alphanum.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/alphanum.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,45 @@
+/*
+ * arch/sh64/kernel/alpanum.c
+ *
+ * Copyright (C) 2002 Stuart Menefy <stuart.menefy@st.com>
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * Machine-independent functions for handling 8-digit alphanumeric display
+ * (e.g. Agilent HDSP-253x)
+ */
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/sched.h>
+
+void mach_alphanum(int pos, unsigned char val);
+void mach_led(int pos, int val);
+
+void print_seg(char *file, int line)
+{
+	int i;
+	unsigned int nibble;
+
+	for (i = 0; i < 5; i++) {
+		mach_alphanum(i, file[i]);
+	}
+
+	for (i = 0; i < 3; i++) {
+		nibble = ((line >> (i * 4)) & 0xf);
+		mach_alphanum(7 - i, nibble + ((nibble > 9) ? 55 : 48));
+	}
+}
+
+void print_seg_num(unsigned num)
+{
+	int i;
+	unsigned int nibble;
+
+	for (i = 0; i < 8; i++) {
+		nibble = ((num >> (i * 4)) & 0xf);
+
+		mach_alphanum(7 - i, nibble + ((nibble > 9) ? 55 : 48));
+	}
+}
+
--- diff/arch/sh64/kernel/asm-offsets.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/asm-offsets.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,33 @@
+/*
+ * This program is used to generate definitions needed by
+ * assembly language modules.
+ *
+ * We use the technique used in the OSF Mach kernel code:
+ * generate asm statements containing #defines,
+ * compile this file to assembler, and then extract the
+ * #defines from the assembly-language output.
+ */
+
+#include <linux/stddef.h>
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <asm/thread_info.h>
+
+#define DEFINE(sym, val) \
+        asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+
+#define BLANK() asm volatile("\n->" : : )
+
+int main(void)
+{
+	/* offsets into the thread_info struct */
+	DEFINE(TI_TASK,		offsetof(struct thread_info, task));
+	DEFINE(TI_EXEC_DOMAIN,	offsetof(struct thread_info, exec_domain));
+	DEFINE(TI_FLAGS,	offsetof(struct thread_info, flags));
+	DEFINE(TI_PRE_COUNT,	offsetof(struct thread_info, preempt_count));
+	DEFINE(TI_CPU,		offsetof(struct thread_info, cpu));
+	DEFINE(TI_ADDR_LIMIT,	offsetof(struct thread_info, addr_limit));
+	DEFINE(TI_RESTART_BLOCK,offsetof(struct thread_info, restart_block));
+
+	return 0;
+}
--- diff/arch/sh64/kernel/dma.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/dma.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,297 @@
+/*
+ * arch/sh64/kernel/dma.c
+ *
+ * DMA routines for the SH-5 DMAC.
+ *
+ * Copyright (C) 2003  Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/interrupt.h>
+#include <linux/types.h>
+#include <linux/irq.h>
+#include <linux/spinlock.h>
+#include <linux/mm.h>
+#include <asm/hardware.h>
+#include <asm/dma.h>
+#include <asm/signal.h>
+#include <asm/errno.h>
+#include <asm/io.h>
+
+typedef struct {
+	unsigned long dev_addr;
+	unsigned long mem_addr;
+
+	unsigned int mode;
+	unsigned int count;
+} dma_info_t;
+
+static dma_info_t dma_info[MAX_DMA_CHANNELS];
+extern spinlock_t dma_spin_lock;
+
+/* arch/sh64/kernel/irq_intc.c */
+extern void make_intc_irq(unsigned int irq);
+
+/* DMAC Interrupts */
+#define DMA_IRQ_DMTE0	18
+#define DMA_IRQ_DERR	22
+
+#define DMAC_COMMON_BASE	(dmac_base + 0x08)
+#define DMAC_SAR_BASE		(dmac_base + 0x10)
+#define DMAC_DAR_BASE		(dmac_base + 0x18)
+#define DMAC_COUNT_BASE		(dmac_base + 0x20)
+#define DMAC_CTRL_BASE		(dmac_base + 0x28)
+#define DMAC_STATUS_BASE	(dmac_base + 0x30)
+
+#define DMAC_SAR(n)	(DMAC_SAR_BASE    + ((n) * 0x28))
+#define DMAC_DAR(n)	(DMAC_DAR_BASE    + ((n) * 0x28))
+#define DMAC_COUNT(n)	(DMAC_COUNT_BASE  + ((n) * 0x28))
+#define DMAC_CTRL(n)	(DMAC_CTRL_BASE   + ((n) * 0x28))
+#define DMAC_STATUS(n)	(DMAC_STATUS_BASE + ((n) * 0x28))
+
+/* DMAC.COMMON Bit Definitions */
+#define DMAC_COMMON_PR	0x00000001	/* Priority */
+					/* Bits 1-2 Reserved */
+#define DMAC_COMMON_ME	0x00000008	/* Master Enable */
+#define DMAC_COMMON_NMI	0x00000010	/* NMI Flag */
+					/* Bits 5-6 Reserved */
+#define DMAC_COMMON_ER	0x00000780	/* Error Response */
+#define DMAC_COMMON_AAE	0x00007800	/* Address Alignment Error */
+					/* Bits 15-63 Reserved */
+
+/* DMAC.SAR Bit Definitions */
+#define DMAC_SAR_ADDR	0xffffffff	/* Source Address */
+
+/* DMAC.DAR Bit Definitions */
+#define DMAC_DAR_ADDR	0xffffffff	/* Destination Address */
+
+/* DMAC.COUNT Bit Definitions */
+#define DMAC_COUNT_CNT	0xffffffff	/* Transfer Count */
+
+/* DMAC.CTRL Bit Definitions */
+#define DMAC_CTRL_TS	0x00000007	/* Transfer Size */
+#define DMAC_CTRL_SI	0x00000018	/* Source Increment */
+#define DMAC_CTRL_DI	0x00000060	/* Destination Increment */
+#define DMAC_CTRL_RS	0x00000780	/* Resource Select */
+#define DMAC_CTRL_IE	0x00000800	/* Interrupt Enable */
+#define DMAC_CTRL_TE	0x00001000	/* Transfer Enable */
+					/* Bits 15-63 Reserved */
+
+/* DMAC.STATUS Bit Definitions */
+#define DMAC_STATUS_TE	0x00000001	/* Transfer End */
+#define DMAC_STATUS_AAE	0x00000002	/* Address Alignment Error */
+					/* Bits 2-63 Reserved */
+
+static unsigned long dmac_base;
+
+void set_dma_count(unsigned int chan, unsigned int count);
+void set_dma_addr(unsigned int chan, unsigned int addr);
+
+static irqreturn_t dma_mte(int irq, void *dev_id, struct pt_regs *regs)
+{
+	unsigned int chan = irq - DMA_IRQ_DMTE0;
+	dma_info_t *info = dma_info + chan;
+	u64 status;
+
+	if (info->mode & DMA_MODE_WRITE) {
+		sh64_out64(info->mem_addr & DMAC_SAR_ADDR, DMAC_SAR(chan));
+	} else {
+		sh64_out64(info->mem_addr & DMAC_DAR_ADDR, DMAC_DAR(chan));
+	}
+
+	set_dma_count(chan, info->count);
+
+	/* Clear the TE bit */
+	status = sh64_in64(DMAC_STATUS(chan));
+	status &= ~DMAC_STATUS_TE;
+	sh64_out64(status, DMAC_STATUS(chan));
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction irq_dmte = {
+	.handler	= dma_mte,
+	.flags		= SA_INTERRUPT,
+	.name		= "DMA MTE",
+};
+
+static irqreturn_t dma_err(int irq, void *dev_id, struct pt_regs *regs)
+{
+	u64 tmp;
+	u8 chan;
+
+	printk(KERN_NOTICE "DMAC: Got a DMA Error!\n");
+
+	tmp = sh64_in64(DMAC_COMMON_BASE);
+
+	/* Check for the type of error */
+	if ((chan = tmp & DMAC_COMMON_AAE)) {
+		/* It's an address alignment error.. */
+		printk(KERN_NOTICE "DMAC: Alignment error on channel %d, ", chan);
+
+		printk(KERN_NOTICE "SAR: 0x%08llx, DAR: 0x%08llx, COUNT: %lld\n",
+		       (sh64_in64(DMAC_SAR(chan)) & DMAC_SAR_ADDR),
+		       (sh64_in64(DMAC_DAR(chan)) & DMAC_DAR_ADDR),
+		       (sh64_in64(DMAC_COUNT(chan)) & DMAC_COUNT_CNT));
+
+	} else if ((chan = tmp & DMAC_COMMON_ER)) {
+		/* Something else went wrong.. */
+		printk(KERN_NOTICE "DMAC: Error on channel %d\n", chan);
+	}
+
+	/* Reset the ME bit to clear the interrupt */
+	tmp |= DMAC_COMMON_ME;
+	sh64_out64(tmp, DMAC_COMMON_BASE);
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction irq_derr = {
+	.handler	= dma_err,
+	.flags		= SA_INTERRUPT,
+	.name		= "DMA Error",
+};
+
+static inline unsigned long calc_xmit_shift(unsigned int chan)
+{
+	return sh64_in64(DMAC_CTRL(chan)) & 0x03;
+}
+
+void setup_dma(unsigned int chan, dma_info_t *info)
+{
+	unsigned int irq = DMA_IRQ_DMTE0 + chan;
+	dma_info_t *dma = dma_info + chan;
+
+	make_intc_irq(irq);
+	setup_irq(irq, &irq_dmte);
+	dma = info;
+}
+
+void enable_dma(unsigned int chan)
+{
+	u64 ctrl;
+
+	ctrl = sh64_in64(DMAC_CTRL(chan));
+	ctrl |= DMAC_CTRL_TE;
+	sh64_out64(ctrl, DMAC_CTRL(chan));
+}
+
+void disable_dma(unsigned int chan)
+{
+	u64 ctrl;
+
+	ctrl = sh64_in64(DMAC_CTRL(chan));
+	ctrl &= ~DMAC_CTRL_TE;
+	sh64_out64(ctrl, DMAC_CTRL(chan));
+}
+
+void set_dma_mode(unsigned int chan, char mode)
+{
+	dma_info_t *info = dma_info + chan;
+
+	info->mode = mode;
+
+	set_dma_addr(chan, info->mem_addr);
+	set_dma_count(chan, info->count);
+}
+
+void set_dma_addr(unsigned int chan, unsigned int addr)
+{
+	dma_info_t *info = dma_info + chan;
+	unsigned long sar, dar;
+
+	info->mem_addr = addr;
+	sar = (info->mode & DMA_MODE_WRITE) ? info->mem_addr : info->dev_addr;
+	dar = (info->mode & DMA_MODE_WRITE) ? info->dev_addr : info->mem_addr;
+
+	sh64_out64(sar & DMAC_SAR_ADDR, DMAC_SAR(chan));
+	sh64_out64(dar & DMAC_SAR_ADDR, DMAC_DAR(chan));
+}
+
+void set_dma_count(unsigned int chan, unsigned int count)
+{
+	dma_info_t *info = dma_info + chan;
+	u64 tmp;
+
+	info->count = count;
+
+	tmp = (info->count >> calc_xmit_shift(chan)) & DMAC_COUNT_CNT;
+
+	sh64_out64(tmp, DMAC_COUNT(chan));
+}
+
+unsigned long claim_dma_lock(void)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&dma_spin_lock, flags);
+
+	return flags;
+}
+
+void release_dma_lock(unsigned long flags)
+{
+	spin_unlock_irqrestore(&dma_spin_lock, flags);
+}
+
+int get_dma_residue(unsigned int chan)
+{
+	return sh64_in64(DMAC_COUNT(chan) << calc_xmit_shift(chan));
+}
+
+int __init init_dma(void)
+{
+	struct vcr_info vcr;
+	u64 tmp;
+
+	/* Remap the DMAC */
+	dmac_base = onchip_remap(PHYS_DMAC_BLOCK, 1024, "DMAC");
+	if (!dmac_base) {
+		printk(KERN_ERR "Unable to remap DMAC\n");
+		return -ENOMEM;
+	}
+
+	/* Report DMAC.VCR Info */
+	vcr = sh64_get_vcr_info(dmac_base);
+	printk("DMAC: Module ID: 0x%04x, Module version: 0x%04x\n",
+	       vcr.mod_id, vcr.mod_vers);
+
+	/* Set the ME bit */
+	tmp = sh64_in64(DMAC_COMMON_BASE);
+	tmp |= DMAC_COMMON_ME;
+	sh64_out64(tmp, DMAC_COMMON_BASE);
+
+	/* Enable the DMAC Error Interrupt */
+	make_intc_irq(DMA_IRQ_DERR);
+	setup_irq(DMA_IRQ_DERR, &irq_derr);
+
+	return 0;
+}
+
+static void __exit exit_dma(void)
+{
+	onchip_unmap(dmac_base);
+	free_irq(DMA_IRQ_DERR, 0);
+}
+
+module_init(init_dma);
+module_exit(exit_dma);
+
+MODULE_AUTHOR("Paul Mundt");
+MODULE_DESCRIPTION("DMA API for SH-5 DMAC");
+MODULE_LICENSE("GPL");
+
+EXPORT_SYMBOL(setup_dma);
+EXPORT_SYMBOL(claim_dma_lock);
+EXPORT_SYMBOL(release_dma_lock);
+EXPORT_SYMBOL(enable_dma);
+EXPORT_SYMBOL(disable_dma);
+EXPORT_SYMBOL(set_dma_mode);
+EXPORT_SYMBOL(set_dma_addr);
+EXPORT_SYMBOL(set_dma_count);
+EXPORT_SYMBOL(get_dma_residue);
+
--- diff/arch/sh64/kernel/early_printk.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/early_printk.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,107 @@
+/*
+ * arch/sh64/kernel/early_printk.c
+ *
+ * SH-5 Early SCIF console (cloned and hacked from sh implementation)
+ *
+ * Copyright (C) 2003, 2004  Paul Mundt <lethal@linux-sh.org>
+ * Copyright (C) 2002  M. R. Brown <mrbrown@0xd6.org>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/console.h>
+#include <linux/tty.h>
+#include <linux/init.h>
+#include <asm/io.h>
+#include <asm/hardware.h>
+
+extern void cpu_relax(void);
+
+#define SCIF_BASE_ADDR	0x01030000
+#define SCIF_ADDR_SH5	PHYS_PERIPHERAL_BLOCK+SCIF_BASE_ADDR
+
+/*
+ * Fixed virtual address where SCIF is mapped (should already be done
+ * in arch/sh64/kernel/head.S!).
+ */
+#define SCIF_REG	0xfa030000
+
+enum {
+	SCIF_SCSMR2	= SCIF_REG + 0x00,
+	SCIF_SCBRR2	= SCIF_REG + 0x04,
+	SCIF_SCSCR2	= SCIF_REG + 0x08,
+	SCIF_SCFTDR2	= SCIF_REG + 0x0c,
+	SCIF_SCFSR2	= SCIF_REG + 0x10,
+	SCIF_SCFRDR2	= SCIF_REG + 0x14,
+	SCIF_SCFCR2	= SCIF_REG + 0x18,
+	SCIF_SCFDR2	= SCIF_REG + 0x1c,
+	SCIF_SCSPTR2	= SCIF_REG + 0x20,
+	SCIF_SCLSR2	= SCIF_REG + 0x24,
+};
+
+static void sh_console_putc(int c)
+{
+	while (!(ctrl_inw(SCIF_SCFSR2) & 0x20))
+		cpu_relax();
+
+	ctrl_outb(c, SCIF_SCFTDR2);
+	ctrl_outw((ctrl_inw(SCIF_SCFSR2) & 0x9f), SCIF_SCFSR2);
+
+	if (c == '\n')
+		sh_console_putc('\r');
+}
+
+static void sh_console_flush(void)
+{
+	ctrl_outw((ctrl_inw(SCIF_SCFSR2) & 0xbf), SCIF_SCFSR2);
+
+	while (!(ctrl_inw(SCIF_SCFSR2) & 0x40))
+		cpu_relax();
+
+	ctrl_outw((ctrl_inw(SCIF_SCFSR2) & 0xbf), SCIF_SCFSR2);
+}
+
+static void sh_console_write(struct console *con, const char *s, unsigned count)
+{
+	while (count-- > 0)
+		sh_console_putc(*s++);
+
+	sh_console_flush();
+}
+
+static int __init sh_console_setup(struct console *con, char *options)
+{
+	con->cflag = CREAD | HUPCL | CLOCAL | B19200 | CS8;
+
+	return 0;
+}
+
+static struct console sh_console = {
+	.name		= "scifcon",
+	.write		= sh_console_write,
+	.setup		= sh_console_setup,
+	.flags		= CON_PRINTBUFFER,
+	.index		= -1,
+};
+
+void __init enable_early_printk(void)
+{
+	ctrl_outb(0x2a, SCIF_SCBRR2);	/* 19200bps */
+
+	ctrl_outw(0x04, SCIF_SCFCR2);	/* Reset TFRST */
+	ctrl_outw(0x10, SCIF_SCFCR2);	/* TTRG0=1 */
+
+	ctrl_outw(0, SCIF_SCSPTR2);
+	ctrl_outw(0x60, SCIF_SCFSR2);
+	ctrl_outw(0, SCIF_SCLSR2);
+	ctrl_outw(0x30, SCIF_SCSCR2);
+
+	register_console(&sh_console);
+}
+
+void disable_early_printk(void)
+{
+	unregister_console(&sh_console);
+}
+
--- diff/arch/sh64/kernel/entry.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/entry.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,2101 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/entry.S
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2004  Paul Mundt
+ * Copyright (C) 2003, 2004 Richard Curnow
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/sys.h>
+
+#include <asm/processor.h>
+#include <asm/registers.h>
+#include <asm/unistd.h>
+#include <asm/thread_info.h>
+#include <asm/asm-offsets.h>
+
+/*
+ * SR fields.
+ */
+#define SR_ASID_MASK	0x00ff0000
+#define SR_FD_MASK	0x00008000
+#define SR_SS		0x08000000
+#define SR_BL		0x10000000
+#define SR_MD		0x40000000
+
+/*
+ * Event code.
+ */
+#define	EVENT_INTERRUPT		0
+#define	EVENT_FAULT_TLB		1
+#define	EVENT_FAULT_NOT_TLB	2
+#define	EVENT_DEBUG		3
+
+/* EXPEVT values */
+#define	RESET_CAUSE		0x20
+#define DEBUGSS_CAUSE		0x980
+
+/*
+ * Frame layout. Quad index.
+ */
+#define	FRAME_T(x)	FRAME_TBASE+(x*8)
+#define	FRAME_R(x)	FRAME_RBASE+(x*8)
+#define	FRAME_S(x)	FRAME_SBASE+(x*8)
+#define FSPC		0
+#define FSSR		1
+#define FSYSCALL_ID	2
+
+/* Arrange the save frame to be a multiple of 32 bytes long */
+#define FRAME_SBASE	0
+#define FRAME_RBASE	(FRAME_SBASE+(3*8))	/* SYSCALL_ID - SSR - SPC */
+#define FRAME_TBASE	(FRAME_RBASE+(63*8))	/* r0 - r62 */
+#define FRAME_PBASE	(FRAME_TBASE+(8*8))	/* tr0 -tr7 */
+#define	FRAME_SIZE	(FRAME_PBASE+(2*8))	/* pad0-pad1 */
+
+#define FP_FRAME_SIZE	FP_FRAME_BASE+(33*8)	/* dr0 - dr31 + fpscr */
+#define FP_FRAME_BASE	0
+
+#define	SAVED_R2	0*8
+#define	SAVED_R3	1*8
+#define	SAVED_R4	2*8
+#define	SAVED_R5	3*8
+#define	SAVED_R18	4*8
+#define	SAVED_R6	5*8
+#define	SAVED_TR0	6*8
+
+/* These are the registers saved in the TLB path that aren't saved in the first
+   level of the normal one. */
+#define	TLB_SAVED_R25	7*8
+#define	TLB_SAVED_TR1	8*8
+#define	TLB_SAVED_TR2	9*8
+#define	TLB_SAVED_TR3	10*8
+#define	TLB_SAVED_TR4	11*8
+/* Save R0/R1 : PT-migrating compiler currently dishounours -ffixed-r0 and -ffixed-r1 causing
+   breakage otherwise. */
+#define	TLB_SAVED_R0	12*8
+#define	TLB_SAVED_R1	13*8
+
+#define CLI()				\
+	getcon	SR, r6;			\
+	ori	r6, 0xf0, r6;		\
+	putcon	r6, SR;
+
+#define STI()				\
+	getcon	SR, r6;			\
+	andi	r6, ~0xf0, r6;		\
+	putcon	r6, SR;
+
+#ifdef CONFIG_PREEMPT
+#  define preempt_stop()	CLI()
+#else
+#  define preempt_stop()
+#  define resume_kernel		restore_all
+#endif
+
+	.section	.data, "aw"
+
+#define FAST_TLBMISS_STACK_CACHELINES 4
+#define FAST_TLBMISS_STACK_QUADWORDS (4*FAST_TLBMISS_STACK_CACHELINES)
+
+/* Register back-up area for all exceptions */
+	.balign	32
+	/* Allow for 16 quadwords to be pushed by fast tlbmiss handling
+	 * register saves etc. */
+	.fill FAST_TLBMISS_STACK_QUADWORDS, 8, 0x0
+/* This is 32 byte aligned by construction */
+/* Register back-up area for all exceptions */
+reg_save_area:
+	.quad	0
+	.quad	0
+	.quad	0
+	.quad	0
+
+	.quad	0
+	.quad	0
+	.quad	0
+	.quad	0
+
+	.quad	0
+	.quad	0
+	.quad	0
+	.quad	0
+
+	.quad	0
+	.quad   0
+
+/* Save area for RESVEC exceptions. We cannot use reg_save_area because of
+ * reentrancy. Note this area may be accessed via physical address.
+ * Align so this fits a whole single cache line, for ease of purging.
+ */
+	.balign 32,0,32
+resvec_save_area:
+	.quad	0
+	.quad	0
+	.quad	0
+	.quad	0
+	.quad	0
+	.balign 32,0,32
+
+/* Jump table of 3rd level handlers  */
+trap_jtable:
+	.long	do_exception_error		/* 0x000 */
+	.long	do_exception_error		/* 0x020 */
+	.long	tlb_miss_load				/* 0x040 */
+	.long	tlb_miss_store				/* 0x060 */
+	! ARTIFICIAL pseudo-EXPEVT setting
+	.long	do_debug_interrupt		/* 0x080 */
+	.long	tlb_miss_load				/* 0x0A0 */
+	.long	tlb_miss_store				/* 0x0C0 */
+	.long	do_address_error_load	/* 0x0E0 */
+	.long	do_address_error_store	/* 0x100 */
+#ifndef CONFIG_NOFPU_SUPPORT
+	.long	do_fpu_error		/* 0x120 */
+#else
+	.long	do_exception_error		/* 0x120 */
+#endif
+	.long	do_exception_error		/* 0x140 */
+	.long	system_call				/* 0x160 */
+	.long	do_reserved_inst		/* 0x180 */
+	.long	do_illegal_slot_inst	/* 0x1A0 */
+	.long	do_NMI			/* 0x1C0 */
+	.long	do_exception_error		/* 0x1E0 */
+	.rept 15
+		.long do_IRQ		/* 0x200 - 0x3C0 */
+	.endr
+	.long	do_exception_error		/* 0x3E0 */
+	.rept 32
+		.long do_IRQ		/* 0x400 - 0x7E0 */
+	.endr
+	.long	fpu_error_or_IRQA			/* 0x800 */
+	.long	fpu_error_or_IRQB			/* 0x820 */
+	.long	do_IRQ			/* 0x840 */
+	.long	do_IRQ			/* 0x860 */
+	.rept 6
+		.long do_exception_error	/* 0x880 - 0x920 */
+	.endr
+	.long	do_software_break_point	/* 0x940 */
+	.long	do_exception_error		/* 0x960 */
+	.long	do_single_step		/* 0x980 */
+
+	.rept 3
+		.long do_exception_error	/* 0x9A0 - 0x9E0 */
+	.endr
+	.long	do_IRQ			/* 0xA00 */
+	.long	do_IRQ			/* 0xA20 */
+	.long	itlb_miss_or_IRQ			/* 0xA40 */
+	.long	do_IRQ			/* 0xA60 */
+	.long	do_IRQ			/* 0xA80 */
+	.long	itlb_miss_or_IRQ			/* 0xAA0 */
+	.long	do_exception_error		/* 0xAC0 */
+	.long	do_address_error_exec	/* 0xAE0 */
+	.rept 8
+		.long do_exception_error	/* 0xB00 - 0xBE0 */
+	.endr
+	.rept 18
+		.long do_IRQ		/* 0xC00 - 0xE20 */
+	.endr
+
+	.section	.text64, "ax"
+
+/*
+ * --- Exception/Interrupt/Event Handling Section
+ */
+
+/*
+ * VBR and RESVEC blocks.
+ *
+ * First level handler for VBR-based exceptions.
+ *
+ * To avoid waste of space, align to the maximum text block size.
+ * This is assumed to be at most 128 bytes or 32 instructions.
+ * DO NOT EXCEED 32 instructions on the first level handlers !
+ *
+ * Also note that RESVEC is contained within the VBR block
+ * where the room left (1KB - TEXT_SIZE) allows placing
+ * the RESVEC block (at most 512B + TEXT_SIZE).
+ *
+ * So first (and only) level handler for RESVEC-based exceptions.
+ *
+ * Where the fault/interrupt is handled (not_a_tlb_miss, tlb_miss
+ * and interrupt) we are a lot tight with register space until
+ * saving onto the stack frame, which is done in handle_exception().
+ *
+ */
+
+#define	TEXT_SIZE 	128
+#define	BLOCK_SIZE 	1664 		/* Dynamic check, 13*128 */
+
+	.balign TEXT_SIZE
+LVBR_block:
+	.space	256, 0			/* Power-on class handler, */
+					/* not required here       */
+not_a_tlb_miss:
+	/* Save original stack pointer into KCR1 */
+	putcon	SP, KCR1
+
+	/* Save other original registers into reg_save_area */
+        movi  reg_save_area, SP
+	st.q	SP, SAVED_R2, r2
+	st.q	SP, SAVED_R3, r3
+	st.q	SP, SAVED_R4, r4
+	st.q	SP, SAVED_R5, r5
+	st.q	SP, SAVED_R6, r6
+	st.q	SP, SAVED_R18, r18
+	gettr	tr0, r3
+	st.q	SP, SAVED_TR0, r3
+
+	/* Set args for Non-debug, Not a TLB miss class handler */
+	getcon	EXPEVT, r2
+	movi	ret_from_exception, r3
+	ori	r3, 1, r3
+	movi	EVENT_FAULT_NOT_TLB, r4
+	or	SP, ZERO, r5
+	getcon	KCR1, SP
+	pta	handle_exception, tr0
+	blink	tr0, ZERO
+
+	.balign 256
+	! VBR+0x200
+	nop
+	.balign 256
+	! VBR+0x300
+	nop
+	.balign 256
+	/*
+	 * Instead of the natural .balign 1024 place RESVEC here
+	 * respecting the final 1KB alignment.
+	 */
+	.balign TEXT_SIZE
+	/*
+	 * Instead of '.space 1024-TEXT_SIZE' place the RESVEC
+	 * block making sure the final alignment is correct.
+	 */
+tlb_miss:
+	putcon	SP, KCR1
+	movi	reg_save_area, SP
+	/* SP is guaranteed 32-byte aligned. */
+	st.q	SP, TLB_SAVED_R0 , r0
+	st.q	SP, TLB_SAVED_R1 , r1
+	st.q	SP, SAVED_R2 , r2
+	st.q	SP, SAVED_R3 , r3
+	st.q	SP, SAVED_R4 , r4
+	st.q	SP, SAVED_R5 , r5
+	st.q	SP, SAVED_R6 , r6
+	st.q	SP, SAVED_R18, r18
+
+	/* Save R25 for safety; as/ld may want to use it to achieve the call to
+	 * the code in mm/tlbmiss.c */
+	st.q	SP, TLB_SAVED_R25, r25
+	gettr	tr0, r2
+	gettr	tr1, r3
+	gettr	tr2, r4
+	gettr	tr3, r5
+	gettr	tr4, r18
+	st.q	SP, SAVED_TR0 , r2
+	st.q	SP, TLB_SAVED_TR1 , r3
+	st.q	SP, TLB_SAVED_TR2 , r4
+	st.q	SP, TLB_SAVED_TR3 , r5
+	st.q	SP, TLB_SAVED_TR4 , r18
+
+	pt	do_fast_page_fault, tr0
+	getcon	SSR, r2
+	getcon	EXPEVT, r3
+	getcon	TEA, r4
+	shlri	r2, 30, r2
+	andi	r2, 1, r2	/* r2 = SSR.MD */
+	blink 	tr0, LINK
+
+	pt	fixup_to_invoke_general_handler, tr1
+
+	/* If the fast path handler fixed the fault, just drop through quickly
+	   to the restore code right away to return to the excepting context.
+	   */
+	beqi/u	r2, 0, tr1
+
+fast_tlb_miss_restore:
+	ld.q	SP, SAVED_TR0, r2
+	ld.q	SP, TLB_SAVED_TR1, r3
+	ld.q	SP, TLB_SAVED_TR2, r4
+
+	ld.q	SP, TLB_SAVED_TR3, r5
+	ld.q	SP, TLB_SAVED_TR4, r18
+
+	ptabs	r2, tr0
+	ptabs	r3, tr1
+	ptabs	r4, tr2
+	ptabs	r5, tr3
+	ptabs	r18, tr4
+
+	ld.q	SP, TLB_SAVED_R0, r0
+	ld.q	SP, TLB_SAVED_R1, r1
+	ld.q	SP, SAVED_R2, r2
+	ld.q	SP, SAVED_R3, r3
+	ld.q	SP, SAVED_R4, r4
+	ld.q	SP, SAVED_R5, r5
+	ld.q	SP, SAVED_R6, r6
+	ld.q	SP, SAVED_R18, r18
+	ld.q	SP, TLB_SAVED_R25, r25
+
+	getcon	KCR1, SP
+	rte
+	nop /* for safety, in case the code is run on sh5-101 cut1.x */
+
+fixup_to_invoke_general_handler:
+
+	/* OK, new method.  Restore stuff that's not expected to get saved into
+	   the 'first-level' reg save area, then just fall through to setting
+	   up the registers and calling the second-level handler. */
+
+	/* 2nd level expects r2,3,4,5,6,18,tr0 to be saved.  So we must restore
+	   r25,tr1-4 and save r6 to get into the right state.  */
+
+	ld.q	SP, TLB_SAVED_TR1, r3
+	ld.q	SP, TLB_SAVED_TR2, r4
+	ld.q	SP, TLB_SAVED_TR3, r5
+	ld.q	SP, TLB_SAVED_TR4, r18
+	ld.q	SP, TLB_SAVED_R25, r25
+
+	ld.q	SP, TLB_SAVED_R0, r0
+	ld.q	SP, TLB_SAVED_R1, r1
+
+	ptabs/u	r3, tr1
+	ptabs/u	r4, tr2
+	ptabs/u	r5, tr3
+	ptabs/u	r18, tr4
+
+	/* Set args for Non-debug, TLB miss class handler */
+	getcon	EXPEVT, r2
+	movi	ret_from_exception, r3
+	ori	r3, 1, r3
+	movi	EVENT_FAULT_TLB, r4
+	or	SP, ZERO, r5
+	getcon	KCR1, SP
+	pta	handle_exception, tr0
+	blink	tr0, ZERO
+
+/* NB TAKE GREAT CARE HERE TO ENSURE THAT THE INTERRUPT CODE
+   DOES END UP AT VBR+0x600 */
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
+	.balign 256
+	/* VBR + 0x600 */
+
+interrupt:
+	/* Save original stack pointer into KCR1 */
+	putcon	SP, KCR1
+
+	/* Save other original registers into reg_save_area */
+        movi  reg_save_area, SP
+	st.q	SP, SAVED_R2, r2
+	st.q	SP, SAVED_R3, r3
+	st.q	SP, SAVED_R4, r4
+	st.q	SP, SAVED_R5, r5
+	st.q	SP, SAVED_R6, r6
+	st.q	SP, SAVED_R18, r18
+	gettr	tr0, r3
+	st.q	SP, SAVED_TR0, r3
+
+	/* Set args for interrupt class handler */
+	getcon	INTEVT, r2
+	movi	ret_from_irq, r3
+	ori	r3, 1, r3
+	movi	EVENT_INTERRUPT, r4
+	or	SP, ZERO, r5
+	getcon	KCR1, SP
+	pta	handle_exception, tr0
+	blink	tr0, ZERO
+	.balign	TEXT_SIZE		/* let's waste the bare minimum */
+
+LVBR_block_end:				/* Marker. Used for total checking */
+
+	.balign 256
+LRESVEC_block:
+	/* Panic handler. Called with MMU off. Possible causes/actions:
+	 * - Reset:		Jump to program start.
+	 * - Single Step:	Turn off Single Step & return.
+	 * - Others:		Call panic handler, passing PC as arg.
+	 *			(this may need to be extended...)
+	 */
+reset_or_panic:
+	putcon	SP, DCR
+	/* First save r0-1 and tr0, as we need to use these */
+	movi	resvec_save_area-CONFIG_CACHED_MEMORY_OFFSET, SP
+	st.q	SP, 0, r0
+	st.q	SP, 8, r1
+	gettr	tr0, r0
+	st.q	SP, 32, r0
+
+	/* Check cause */
+	getcon	EXPEVT, r0
+	movi	RESET_CAUSE, r1
+	sub	r1, r0, r1		/* r1=0 if reset */
+	movi	_stext-CONFIG_CACHED_MEMORY_OFFSET, r0
+	ori	r0, 1, r0
+	ptabs	r0, tr0
+	beqi	r1, 0, tr0		/* Jump to start address if reset */
+
+	getcon	EXPEVT, r0
+	movi	DEBUGSS_CAUSE, r1
+	sub	r1, r0, r1		/* r1=0 if single step */
+	pta	single_step_panic, tr0
+	beqi	r1, 0, tr0		/* jump if single step */
+
+	/* Now jump to where we save the registers. */
+	movi	panic_stash_regs-CONFIG_CACHED_MEMORY_OFFSET, r1
+	ptabs	r1, tr0
+	blink	tr0, r63
+
+single_step_panic:
+	/* We are in a handler with Single Step set. We need to resume the
+	 * handler, by turning on MMU & turning off Single Step. */
+	getcon	SSR, r0
+	movi	SR_MMU, r1
+	or	r0, r1, r0
+	movi	~SR_SS, r1
+	and	r0, r1, r0
+	putcon	r0, SSR
+	/* Restore EXPEVT, as the rte won't do this */
+	getcon	PEXPEVT, r0
+	putcon	r0, EXPEVT
+	/* Restore regs */
+	ld.q	SP, 32, r0
+	ptabs	r0, tr0
+	ld.q	SP, 0, r0
+	ld.q	SP, 8, r1
+	getcon	DCR, SP
+	synco
+	rte
+
+
+	.balign	256
+debug_exception:
+	/*
+	 * Single step/software_break_point first level handler.
+	 * Called with MMU off, so the first thing we do is enable it
+	 * by doing an rte with appropriate SSR.
+	 */
+	putcon	SP, DCR
+	/* Save SSR & SPC, together with R0 & R1, as we need to use 2 regs. */
+	movi	resvec_save_area-CONFIG_CACHED_MEMORY_OFFSET, SP
+
+	/* With the MMU off, we are bypassing the cache, so purge any
+         * data that will be made stale by the following stores.
+         */
+	ocbp	SP, 0
+	synco
+
+	st.q	SP, 0, r0
+	st.q	SP, 8, r1
+	getcon	SPC, r0
+	st.q	SP, 16, r0
+	getcon	SSR, r0
+	st.q	SP, 24, r0
+
+	/* Enable MMU, block exceptions, set priv mode, disable single step */
+	movi	SR_MMU | SR_BL | SR_MD, r1
+	or	r0, r1, r0
+	movi	~SR_SS, r1
+	and	r0, r1, r0
+	putcon	r0, SSR
+	/* Force control to debug_exception_2 when rte is executed */
+	movi	debug_exeception_2, r0
+	ori	r0, 1, r0      /* force SHmedia, just in case */
+	putcon	r0, SPC
+	getcon	DCR, SP
+	synco
+	rte
+debug_exeception_2:
+	/* Restore saved regs */
+	putcon	SP, KCR1
+	movi	resvec_save_area, SP
+	ld.q	SP, 24, r0
+	putcon	r0, SSR
+	ld.q	SP, 16, r0
+	putcon	r0, SPC
+	ld.q	SP, 0, r0
+	ld.q	SP, 8, r1
+
+	/* Save other original registers into reg_save_area */
+        movi  reg_save_area, SP
+	st.q	SP, SAVED_R2, r2
+	st.q	SP, SAVED_R3, r3
+	st.q	SP, SAVED_R4, r4
+	st.q	SP, SAVED_R5, r5
+	st.q	SP, SAVED_R6, r6
+	st.q	SP, SAVED_R18, r18
+	gettr	tr0, r3
+	st.q	SP, SAVED_TR0, r3
+
+	/* Set args for debug class handler */
+	getcon	EXPEVT, r2
+	movi	ret_from_exception, r3
+	ori	r3, 1, r3
+	movi	EVENT_DEBUG, r4
+	or	SP, ZERO, r5
+	getcon	KCR1, SP
+	pta	handle_exception, tr0
+	blink	tr0, ZERO
+
+	.balign	256
+debug_interrupt:
+	/* !!! WE COME HERE IN REAL MODE !!! */
+	/* Hook-up debug interrupt to allow various debugging options to be
+	 * hooked into its handler. */
+	/* Save original stack pointer into KCR1 */
+	synco
+	putcon	SP, KCR1
+	movi	resvec_save_area-CONFIG_CACHED_MEMORY_OFFSET, SP
+	ocbp	SP, 0
+	ocbp	SP, 32
+	synco
+
+	/* Save other original registers into reg_save_area thru real addresses */
+	st.q	SP, SAVED_R2, r2
+	st.q	SP, SAVED_R3, r3
+	st.q	SP, SAVED_R4, r4
+	st.q	SP, SAVED_R5, r5
+	st.q	SP, SAVED_R6, r6
+	st.q	SP, SAVED_R18, r18
+	gettr	tr0, r3
+	st.q	SP, SAVED_TR0, r3
+
+	/* move (spc,ssr)->(pspc,pssr).  The rte will shift
+	   them back again, so that they look like the originals
+	   as far as the real handler code is concerned. */
+	getcon	spc, r6
+	putcon	r6, pspc
+	getcon	ssr, r6
+	putcon	r6, pssr
+
+	! construct useful SR for handle_exception
+	movi	3, r6
+	shlli	r6, 30, r6
+	getcon	sr, r18
+	or	r18, r6, r6
+	putcon	r6, ssr
+
+	! SSR is now the current SR with the MD and MMU bits set
+	! i.e. the rte will switch back to priv mode and put
+	! the mmu back on
+
+	! construct spc
+	movi	handle_exception, r18
+	ori	r18, 1, r18		! for safety (do we need this?)
+	putcon	r18, spc
+
+	/* Set args for Non-debug, Not a TLB miss class handler */
+
+	! EXPEVT==0x80 is unused, so 'steal' this value to put the
+	! debug interrupt handler in the vectoring table
+	movi	0x80, r2
+	movi	ret_from_exception, r3
+	ori	r3, 1, r3
+	movi	EVENT_FAULT_NOT_TLB, r4
+
+	or	SP, ZERO, r5
+	movi	CONFIG_CACHED_MEMORY_OFFSET, r6
+	add	r6, r5, r5
+	getcon	KCR1, SP
+
+	synco	! for safety
+	rte	! -> handle_exception, switch back to priv mode again
+
+LRESVEC_block_end:			/* Marker. Unused. */
+
+	.balign	TEXT_SIZE
+
+/*
+ * Second level handler for VBR-based exceptions. Pre-handler.
+ * In common to all stack-frame sensitive handlers.
+ *
+ * Inputs:
+ * (KCR0) Current [current task union]
+ * (KCR1) Original SP
+ * (r2)   INTEVT/EXPEVT
+ * (r3)   appropriate return address
+ * (r4)   Event (0 = interrupt, 1 = TLB miss fault, 2 = Not TLB miss fault, 3=debug)
+ * (r5)   Pointer to reg_save_area
+ * (SP)   Original SP
+ *
+ * Available registers:
+ * (r6)
+ * (r18)
+ * (tr0)
+ *
+ */
+handle_exception:
+	/* Common 2nd level handler. */
+
+	/* First thing we need an appropriate stack pointer */
+	getcon	SSR, r6
+	shlri	r6, 30, r6
+	andi	r6, 1, r6
+	pta	stack_ok, tr0
+	bne	r6, ZERO, tr0		/* Original stack pointer is fine */
+
+	/* Set stack pointer for user fault */
+	getcon	KCR0, SP
+	movi	THREAD_SIZE, r6		/* Point to the end */
+	add	SP, r6, SP
+
+stack_ok:
+
+/* DEBUG : check for underflow/overflow of the kernel stack */
+	pta	no_underflow, tr0
+	getcon  KCR0, r6
+	movi	1024, r18
+	add	r6, r18, r6
+	bge	SP, r6, tr0 	! ? below 1k from bottom of stack : danger zone
+
+/* Just panic to cause a crash. */
+bad_sp:
+	ld.b	r63, 0, r6
+	nop
+
+no_underflow:
+	pta	bad_sp, tr0
+	getcon	kcr0, r6
+	movi	THREAD_SIZE, r18
+	add	r18, r6, r6
+	bgt	SP, r6, tr0	! sp above the stack
+
+	/* Make some room for the BASIC frame. */
+	movi	-(FRAME_SIZE), r6
+	add	SP, r6, SP
+
+/* Could do this with no stalling if we had another spare register, but the
+   code below will be OK. */
+	ld.q	r5, SAVED_R2, r6
+	ld.q	r5, SAVED_R3, r18
+	st.q	SP, FRAME_R(2), r6
+	ld.q	r5, SAVED_R4, r6
+	st.q	SP, FRAME_R(3), r18
+	ld.q	r5, SAVED_R5, r18
+	st.q	SP, FRAME_R(4), r6
+	ld.q	r5, SAVED_R6, r6
+	st.q	SP, FRAME_R(5), r18
+	ld.q	r5, SAVED_R18, r18
+	st.q	SP, FRAME_R(6), r6
+	ld.q	r5, SAVED_TR0, r6
+	st.q	SP, FRAME_R(18), r18
+	st.q	SP, FRAME_T(0), r6
+
+	/* Keep old SP around */
+	getcon	KCR1, r6
+
+	/* Save the rest of the general purpose registers */
+	st.q	SP, FRAME_R(0), r0
+	st.q	SP, FRAME_R(1), r1
+	st.q	SP, FRAME_R(7), r7
+	st.q	SP, FRAME_R(8), r8
+	st.q	SP, FRAME_R(9), r9
+	st.q	SP, FRAME_R(10), r10
+	st.q	SP, FRAME_R(11), r11
+	st.q	SP, FRAME_R(12), r12
+	st.q	SP, FRAME_R(13), r13
+	st.q	SP, FRAME_R(14), r14
+
+	/* SP is somewhere else */
+	st.q	SP, FRAME_R(15), r6
+
+	st.q	SP, FRAME_R(16), r16
+	st.q	SP, FRAME_R(17), r17
+	/* r18 is saved earlier. */
+	st.q	SP, FRAME_R(19), r19
+	st.q	SP, FRAME_R(20), r20
+	st.q	SP, FRAME_R(21), r21
+	st.q	SP, FRAME_R(22), r22
+	st.q	SP, FRAME_R(23), r23
+	st.q	SP, FRAME_R(24), r24
+	st.q	SP, FRAME_R(25), r25
+	st.q	SP, FRAME_R(26), r26
+	st.q	SP, FRAME_R(27), r27
+	st.q	SP, FRAME_R(28), r28
+	st.q	SP, FRAME_R(29), r29
+	st.q	SP, FRAME_R(30), r30
+	st.q	SP, FRAME_R(31), r31
+	st.q	SP, FRAME_R(32), r32
+	st.q	SP, FRAME_R(33), r33
+	st.q	SP, FRAME_R(34), r34
+	st.q	SP, FRAME_R(35), r35
+	st.q	SP, FRAME_R(36), r36
+	st.q	SP, FRAME_R(37), r37
+	st.q	SP, FRAME_R(38), r38
+	st.q	SP, FRAME_R(39), r39
+	st.q	SP, FRAME_R(40), r40
+	st.q	SP, FRAME_R(41), r41
+	st.q	SP, FRAME_R(42), r42
+	st.q	SP, FRAME_R(43), r43
+	st.q	SP, FRAME_R(44), r44
+	st.q	SP, FRAME_R(45), r45
+	st.q	SP, FRAME_R(46), r46
+	st.q	SP, FRAME_R(47), r47
+	st.q	SP, FRAME_R(48), r48
+	st.q	SP, FRAME_R(49), r49
+	st.q	SP, FRAME_R(50), r50
+	st.q	SP, FRAME_R(51), r51
+	st.q	SP, FRAME_R(52), r52
+	st.q	SP, FRAME_R(53), r53
+	st.q	SP, FRAME_R(54), r54
+	st.q	SP, FRAME_R(55), r55
+	st.q	SP, FRAME_R(56), r56
+	st.q	SP, FRAME_R(57), r57
+	st.q	SP, FRAME_R(58), r58
+	st.q	SP, FRAME_R(59), r59
+	st.q	SP, FRAME_R(60), r60
+	st.q	SP, FRAME_R(61), r61
+	st.q	SP, FRAME_R(62), r62
+
+	/*
+	 * Save the S* registers.
+	 */
+	getcon	SSR, r61
+	st.q	SP, FRAME_S(FSSR), r61
+	getcon	SPC, r62
+	st.q	SP, FRAME_S(FSPC), r62
+	movi	-1, r62			/* Reset syscall_nr */
+	st.q	SP, FRAME_S(FSYSCALL_ID), r62
+
+	/* Save the rest of the target registers */
+	gettr	tr1, r6
+	st.q	SP, FRAME_T(1), r6
+	gettr	tr2, r6
+	st.q	SP, FRAME_T(2), r6
+	gettr	tr3, r6
+	st.q	SP, FRAME_T(3), r6
+	gettr	tr4, r6
+	st.q	SP, FRAME_T(4), r6
+	gettr	tr5, r6
+	st.q	SP, FRAME_T(5), r6
+	gettr	tr6, r6
+	st.q	SP, FRAME_T(6), r6
+	gettr	tr7, r6
+	st.q	SP, FRAME_T(7), r6
+
+	! setup FP so that unwinder can wind back through nested kernel mode
+	! exceptions
+	add	SP, ZERO, r14
+
+#define POOR_MANS_STRACE 0
+
+#if POOR_MANS_STRACE
+	/* We've pushed all the registers now, so only r2-r4 hold anything
+	 * useful. Move them into callee save registers */
+	or	r2, ZERO, r28
+	or	r3, ZERO, r29
+	or	r4, ZERO, r30
+
+	/* Preserve r2 as the event code */
+	movi	evt_debug, r3
+	ori	r3, 1, r3
+	ptabs	r3, tr0
+
+	or	SP, ZERO, r6
+	getcon	TRA, r5
+	blink	tr0, LINK
+
+	or	r28, ZERO, r2
+	or	r29, ZERO, r3
+	or	r30, ZERO, r4
+#endif
+
+
+	/* For syscall and debug race condition, get TRA now */
+	getcon	TRA, r5
+
+	/* We are in a safe position to turn SR.BL off, but set IMASK=0xf
+	 * Also set FD, to catch FPU usage in the kernel.
+	 *
+	 * benedict.gaster@superh.com 29/07/2002
+	 *
+	 * On all SH5-101 revisions it is unsafe to raise the IMASK and at the
+	 * same time change BL from 1->0, as any pending interrupt of a level
+	 * higher than he previous value of IMASK will leak through and be
+	 * taken unexpectedly.
+	 *
+	 * To avoid this we raise the IMASK and then issue another PUTCON to
+	 * enable interrupts.
+         */
+	getcon	SR, r6
+	movi	SR_IMASK | SR_FD, r7
+	or	r6, r7, r6
+	putcon	r6, SR
+	movi	SR_UNBLOCK_EXC, r7
+	and	r6, r7, r6
+	putcon	r6, SR
+
+
+	/* Now call the appropriate 3rd level handler */
+	or	r3, ZERO, LINK
+	movi	trap_jtable, r3
+	shlri	r2, 3, r2
+	ldx.l	r2, r3, r3
+	shlri	r2, 2, r2
+	ptabs	r3, tr0
+	or	SP, ZERO, r3
+	blink	tr0, ZERO
+
+/*
+ * Second level handler for VBR-based exceptions. Post-handlers.
+ *
+ * Post-handlers for interrupts (ret_from_irq), exceptions
+ * (ret_from_exception) and common reentrance doors (restore_all
+ * to get back to the original context, ret_from_syscall loop to
+ * check kernel exiting).
+ *
+ * ret_with_reschedule and work_notifysig are an inner lables of
+ * the ret_from_syscall loop.
+ *
+ * In common to all stack-frame sensitive handlers.
+ *
+ * Inputs:
+ * (SP)   struct pt_regs *, original register's frame pointer (basic)
+ *
+ */
+	.global ret_from_irq
+ret_from_irq:
+#if POOR_MANS_STRACE
+	pta	evt_debug_ret_from_irq, tr0
+	ori	SP, 0, r2
+	blink	tr0, LINK
+#endif
+	ld.q	SP, FRAME_S(FSSR), r6
+	shlri	r6, 30, r6
+	andi	r6, 1, r6
+	pta	resume_kernel, tr0
+	bne	r6, ZERO, tr0		/* no further checks */
+	STI()
+	pta	ret_with_reschedule, tr0
+	blink	tr0, ZERO		/* Do not check softirqs */
+
+	.global ret_from_exception
+ret_from_exception:
+	preempt_stop()
+
+#if POOR_MANS_STRACE
+	pta	evt_debug_ret_from_exc, tr0
+	ori	SP, 0, r2
+	blink	tr0, LINK
+#endif
+
+	ld.q	SP, FRAME_S(FSSR), r6
+	shlri	r6, 30, r6
+	andi	r6, 1, r6
+	pta	resume_kernel, tr0
+	bne	r6, ZERO, tr0		/* no further checks */
+
+	/* Check softirqs */
+
+#ifdef CONFIG_PREEMPT
+	pta   ret_from_syscall, tr0
+	blink   tr0, ZERO
+
+resume_kernel:
+	pta	restore_all, tr0
+
+	getcon	KCR0, r6
+	ld.l	r6, TI_PRE_COUNT, r7
+	beq/u	r7, ZERO, tr0
+
+need_resched:
+	ld.l	r6, TI_FLAGS, r7
+	movi	(1 << TIF_NEED_RESCHED), r8
+	and	r8, r7, r8
+	bne	r8, ZERO, tr0
+
+	getcon	SR, r7
+	andi	r7, 0xf0, r7
+	bne	r7, ZERO, tr0
+
+	movi	((PREEMPT_ACTIVE >> 16) & 65535), r8
+	shori	(PREEMPT_ACTIVE & 65535), r8
+	st.l	r6, TI_PRE_COUNT, r8
+
+	STI()
+	movi	schedule, r7
+	ori	r7, 1, r7
+	ptabs	r7, tr1
+	blink	tr1, LINK
+
+	st.l	r6, TI_PRE_COUNT, ZERO
+	CLI()
+
+	pta	need_resched, tr1
+	blink	tr1, ZERO
+#endif
+
+	.global ret_from_syscall
+ret_from_syscall:
+
+ret_with_reschedule:
+	getcon	KCR0, r6		! r6 contains current_thread_info
+	ld.l	r6, TI_FLAGS, r7	! r7 contains current_thread_info->flags
+
+	! FIXME:!!!
+	! no handling of TIF_SYSCALL_TRACE yet!!
+
+	movi	(1 << TIF_NEED_RESCHED), r8
+	and	r8, r7, r8
+	pta	work_resched, tr0
+	bne	r8, ZERO, tr0
+
+	pta	restore_all, tr1
+
+	movi	(1 << TIF_SIGPENDING), r8
+	and	r8, r7, r8
+	pta	work_notifysig, tr0
+	bne	r8, ZERO, tr0
+
+	blink	tr1, ZERO
+
+work_resched:
+	pta	ret_from_syscall, tr0
+	gettr	tr0, LINK
+	movi	schedule, r6
+	ptabs	r6, tr0
+	blink	tr0, ZERO		/* Call schedule(), return on top */
+
+work_notifysig:
+	gettr	tr1, LINK
+
+	movi	do_signal, r6
+	ptabs	r6, tr0
+	or	SP, ZERO, r2
+	or	ZERO, ZERO, r3
+	blink	tr0, LINK	    /* Call do_signal(regs, 0), return here */
+
+restore_all:
+	/* Do prefetches */
+
+	ld.q	SP, FRAME_T(0), r6
+	ld.q	SP, FRAME_T(1), r7
+	ld.q	SP, FRAME_T(2), r8
+	ld.q	SP, FRAME_T(3), r9
+	ptabs	r6, tr0
+	ptabs	r7, tr1
+	ptabs	r8, tr2
+	ptabs	r9, tr3
+	ld.q	SP, FRAME_T(4), r6
+	ld.q	SP, FRAME_T(5), r7
+	ld.q	SP, FRAME_T(6), r8
+	ld.q	SP, FRAME_T(7), r9
+	ptabs	r6, tr4
+	ptabs	r7, tr5
+	ptabs	r8, tr6
+	ptabs	r9, tr7
+
+	ld.q	SP, FRAME_R(0), r0
+	ld.q	SP, FRAME_R(1), r1
+	ld.q	SP, FRAME_R(2), r2
+	ld.q	SP, FRAME_R(3), r3
+	ld.q	SP, FRAME_R(4), r4
+	ld.q	SP, FRAME_R(5), r5
+	ld.q	SP, FRAME_R(6), r6
+	ld.q	SP, FRAME_R(7), r7
+	ld.q	SP, FRAME_R(8), r8
+	ld.q	SP, FRAME_R(9), r9
+	ld.q	SP, FRAME_R(10), r10
+	ld.q	SP, FRAME_R(11), r11
+	ld.q	SP, FRAME_R(12), r12
+	ld.q	SP, FRAME_R(13), r13
+	ld.q	SP, FRAME_R(14), r14
+
+	ld.q	SP, FRAME_R(16), r16
+	ld.q	SP, FRAME_R(17), r17
+	ld.q	SP, FRAME_R(18), r18
+	ld.q	SP, FRAME_R(19), r19
+	ld.q	SP, FRAME_R(20), r20
+	ld.q	SP, FRAME_R(21), r21
+	ld.q	SP, FRAME_R(22), r22
+	ld.q	SP, FRAME_R(23), r23
+	ld.q	SP, FRAME_R(24), r24
+	ld.q	SP, FRAME_R(25), r25
+	ld.q	SP, FRAME_R(26), r26
+	ld.q	SP, FRAME_R(27), r27
+	ld.q	SP, FRAME_R(28), r28
+	ld.q	SP, FRAME_R(29), r29
+	ld.q	SP, FRAME_R(30), r30
+	ld.q	SP, FRAME_R(31), r31
+	ld.q	SP, FRAME_R(32), r32
+	ld.q	SP, FRAME_R(33), r33
+	ld.q	SP, FRAME_R(34), r34
+	ld.q	SP, FRAME_R(35), r35
+	ld.q	SP, FRAME_R(36), r36
+	ld.q	SP, FRAME_R(37), r37
+	ld.q	SP, FRAME_R(38), r38
+	ld.q	SP, FRAME_R(39), r39
+	ld.q	SP, FRAME_R(40), r40
+	ld.q	SP, FRAME_R(41), r41
+	ld.q	SP, FRAME_R(42), r42
+	ld.q	SP, FRAME_R(43), r43
+	ld.q	SP, FRAME_R(44), r44
+	ld.q	SP, FRAME_R(45), r45
+	ld.q	SP, FRAME_R(46), r46
+	ld.q	SP, FRAME_R(47), r47
+	ld.q	SP, FRAME_R(48), r48
+	ld.q	SP, FRAME_R(49), r49
+	ld.q	SP, FRAME_R(50), r50
+	ld.q	SP, FRAME_R(51), r51
+	ld.q	SP, FRAME_R(52), r52
+	ld.q	SP, FRAME_R(53), r53
+	ld.q	SP, FRAME_R(54), r54
+	ld.q	SP, FRAME_R(55), r55
+	ld.q	SP, FRAME_R(56), r56
+	ld.q	SP, FRAME_R(57), r57
+	ld.q	SP, FRAME_R(58), r58
+
+	getcon	SR, r59
+	movi	SR_BLOCK_EXC, r60
+	or	r59, r60, r59
+	putcon	r59, SR			/* SR.BL = 1, keep nesting out */
+	ld.q	SP, FRAME_S(FSSR), r61
+	ld.q	SP, FRAME_S(FSPC), r62
+	movi	SR_ASID_MASK, r60
+	and	r59, r60, r59
+	andc	r61, r60, r61		/* Clear out older ASID */
+	or	r59, r61, r61		/* Retain current ASID */
+	putcon	r61, SSR
+	putcon	r62, SPC
+
+	/* Ignore FSYSCALL_ID */
+
+	ld.q	SP, FRAME_R(59), r59
+	ld.q	SP, FRAME_R(60), r60
+	ld.q	SP, FRAME_R(61), r61
+	ld.q	SP, FRAME_R(62), r62
+
+	/* Last touch */
+	ld.q	SP, FRAME_R(15), SP
+	rte
+	nop
+
+/*
+ * Third level handlers for VBR-based exceptions. Adapting args to
+ * and/or deflecting to fourth level handlers.
+ *
+ * Fourth level handlers interface.
+ * Most are C-coded handlers directly pointed by the trap_jtable.
+ * (Third = Fourth level)
+ * Inputs:
+ * (r2)   fault/interrupt code, entry number (e.g. NMI = 14,
+ *	  IRL0-3 (0000) = 16, RTLBMISS = 2, SYSCALL = 11, etc ...)
+ * (r3)   struct pt_regs *, original register's frame pointer
+ * (r4)   Event (0 = interrupt, 1 = TLB miss fault, 2 = Not TLB miss fault)
+ * (r5)   TRA control register (for syscall/debug benefit only)
+ * (LINK) return address
+ * (SP)   = r3
+ *
+ * Kernel TLB fault handlers will get a slightly different interface.
+ * (r2)   struct pt_regs *, original register's frame pointer
+ * (r3)   writeaccess, whether it's a store fault as opposed to load fault
+ * (r4)   execaccess, whether it's a ITLB fault as opposed to DTLB fault
+ * (r5)   Effective Address of fault
+ * (LINK) return address
+ * (SP)   = r2
+ *
+ * fpu_error_or_IRQ? is a helper to deflect to the right cause.
+ *
+ */
+tlb_miss_load:
+	or	SP, ZERO, r2
+	or	ZERO, ZERO, r3		/* Read */
+	or	ZERO, ZERO, r4		/* Data */
+	getcon	TEA, r5
+	pta	call_do_page_fault, tr0
+	beq	ZERO, ZERO, tr0
+
+tlb_miss_store:
+	or	SP, ZERO, r2
+	movi	1, r3			/* Write */
+	or	ZERO, ZERO, r4		/* Data */
+	getcon	TEA, r5
+	pta	call_do_page_fault, tr0
+	beq	ZERO, ZERO, tr0
+
+itlb_miss_or_IRQ:
+	pta	its_IRQ, tr0
+	beqi/u	r4, EVENT_INTERRUPT, tr0
+	or	SP, ZERO, r2
+	or	ZERO, ZERO, r3		/* Read */
+	movi	1, r4			/* Text */
+	getcon	TEA, r5
+	/* Fall through */
+
+call_do_page_fault:
+	movi	do_page_fault, r6
+        ptabs	r6, tr0
+        blink	tr0, ZERO
+
+fpu_error_or_IRQA:
+	pta	its_IRQ, tr0
+	beqi/l	r4, EVENT_INTERRUPT, tr0
+#ifndef CONFIG_NOFPU_SUPPORT
+	movi	do_fpu_state_restore, r6
+#else
+	movi	do_exception_error, r6
+#endif
+	ptabs	r6, tr0
+	blink	tr0, ZERO
+
+fpu_error_or_IRQB:
+	pta	its_IRQ, tr0
+	beqi/l	r4, EVENT_INTERRUPT, tr0
+#ifndef CONFIG_NOFPU_SUPPORT
+	movi	do_fpu_state_restore, r6
+#else
+	movi	do_exception_error, r6
+#endif
+	ptabs	r6, tr0
+	blink	tr0, ZERO
+
+its_IRQ:
+	movi	do_IRQ, r6
+	ptabs	r6, tr0
+	blink	tr0, ZERO
+
+/*
+ * system_call/unknown_trap third level handler:
+ *
+ * Inputs:
+ * (r2)   fault/interrupt code, entry number (TRAP = 11)
+ * (r3)   struct pt_regs *, original register's frame pointer
+ * (r4)   Not used. Event (0=interrupt, 1=TLB miss fault, 2=Not TLB miss fault)
+ * (r5)   TRA Control Reg (0x00xyzzzz: x=1 SYSCALL, y = #args, z=nr)
+ * (SP)   = r3
+ * (LINK) return address: ret_from_exception
+ * (*r3)  Syscall parms: SC#, arg0, arg1, ..., arg5 in order (Saved r2/r7)
+ *
+ * Outputs:
+ * (*r3)  Syscall reply (Saved r2)
+ * (LINK) In case of syscall only it can be scrapped.
+ *        Common second level post handler will be ret_from_syscall.
+ *        Common (non-trace) exit point to that is syscall_ret (saving
+ *        result to r2). Common bad exit point is syscall_bad (returning
+ *        ENOSYS then saved to r2).
+ *
+ */
+
+unknown_trap:
+	/* Unknown Trap or User Trace */
+	movi	do_unknown_trapa, r6
+	ptabs	r6, tr0
+        ld.q    r3, FRAME_R(9), r2	/* r2 = #arg << 16 | syscall # */
+        andi    r2, 0x1ff, r2		/* r2 = syscall # */
+	blink	tr0, LINK
+
+	pta	syscall_ret, tr0
+	blink	tr0, ZERO
+
+        /* New syscall implementation*/
+system_call:
+	pta	unknown_trap, tr0
+        or      r5, ZERO, r4            /* TRA (=r5) -> r4 */
+        shlri   r4, 20, r4
+	bnei	r4, 1, tr0		/* unknown_trap if not 0x1yzzzz */
+
+        /* It's a system call */
+	st.q    r3, FRAME_S(FSYSCALL_ID), r5 	/* ID (0x1yzzzz) -> stack */
+	andi    r5, 0x1ff, r5			/* syscall # -> r5	  */
+
+	STI()
+
+	pta	syscall_allowed, tr0
+	movi	NR_syscalls - 1, r4	/* Last valid */
+	bgeu/l	r4, r5, tr0
+
+syscall_bad:
+	/* Return ENOSYS ! */
+	movi	-(ENOSYS), r2		/* Fall-through */
+
+	.global syscall_ret
+syscall_ret:
+	st.q	SP, FRAME_R(9), r2	/* Expecting SP back to BASIC frame */
+
+#if POOR_MANS_STRACE
+	/* nothing useful in registers at this point */
+
+	movi	evt_debug2, r5
+	ori	r5, 1, r5
+	ptabs	r5, tr0
+	ld.q	SP, FRAME_R(9), r2
+	or	SP, ZERO, r3
+	blink	tr0, LINK
+#endif
+
+	ld.q	SP, FRAME_S(FSPC), r2
+	addi	r2, 4, r2		/* Move PC, being pre-execution event */
+	st.q	SP, FRAME_S(FSPC), r2
+	pta	ret_from_syscall, tr0
+	blink	tr0, ZERO
+
+
+/*  A different return path for ret_from_fork, because we now need
+ *  to call schedule_tail with the later kernels. Because prev is
+ *  loaded into r2 by switch_to() means we can just call it straight  away
+ */
+
+.global	ret_from_fork
+ret_from_fork:
+
+	movi	schedule_tail,r5
+	ori	r5, 1, r5
+	ptabs	r5, tr0
+	blink	tr0, LINK
+
+#if POOR_MANS_STRACE
+	/* nothing useful in registers at this point */
+
+	movi	evt_debug2, r5
+	ori	r5, 1, r5
+	ptabs	r5, tr0
+	ld.q	SP, FRAME_R(9), r2
+	or	SP, ZERO, r3
+	blink	tr0, LINK
+#endif
+
+	ld.q	SP, FRAME_S(FSPC), r2
+	addi	r2, 4, r2		/* Move PC, being pre-execution event */
+	st.q	SP, FRAME_S(FSPC), r2
+	pta	ret_from_syscall, tr0
+	blink	tr0, ZERO
+
+
+
+syscall_allowed:
+	/* Use LINK to deflect the exit point, default is syscall_ret */
+	pta	syscall_ret, tr0
+	gettr	tr0, LINK
+	pta	syscall_notrace, tr0
+
+	getcon	KCR0, r2
+	ld.l	r2, TI_FLAGS, r4
+	movi	(1 << TIF_SYSCALL_TRACE), r6
+	and	r6, r4, r6
+	beq/l	r6, ZERO, tr0
+
+	/* Trace it by calling syscall_trace before and after */
+	movi	syscall_trace, r4
+	ptabs	r4, tr0
+	blink	tr0, LINK
+	/* Reload syscall number as r5 is trashed by syscall_trace */
+	ld.q	SP, FRAME_S(FSYSCALL_ID), r5
+	andi	r5, 0x1ff, r5
+
+	pta	syscall_ret_trace, tr0
+	gettr	tr0, LINK
+
+syscall_notrace:
+	/* Now point to the appropriate 4th level syscall handler */
+	movi	sys_call_table, r4
+	shlli	r5, 2, r5
+	ldx.l	r4, r5, r5
+	ptabs	r5, tr0
+
+	/* Prepare original args */
+	ld.q	SP, FRAME_R(2), r2
+	ld.q	SP, FRAME_R(3), r3
+	ld.q	SP, FRAME_R(4), r4
+	ld.q	SP, FRAME_R(5), r5
+	ld.q	SP, FRAME_R(6), r6
+	ld.q	SP, FRAME_R(7), r7
+
+	/* And now the trick for those syscalls requiring regs * ! */
+	or	SP, ZERO, r8
+
+	/* Call it */
+	blink	tr0, ZERO	/* LINK is already properly set */
+
+syscall_ret_trace:
+	/* We get back here only if under trace */
+	st.q	SP, FRAME_R(9), r2	/* Save return value */
+
+	movi	syscall_trace, LINK
+	ptabs	LINK, tr0
+	blink	tr0, LINK
+
+	/* This needs to be done after any syscall tracing */
+	ld.q	SP, FRAME_S(FSPC), r2
+	addi	r2, 4, r2	/* Move PC, being pre-execution event */
+	st.q	SP, FRAME_S(FSPC), r2
+
+	pta	ret_from_syscall, tr0
+	blink	tr0, ZERO		/* Resume normal return sequence */
+
+/*
+ * --- Switch to running under a particular ASID and return the previous ASID value
+ * --- The caller is assumed to have done a cli before calling this.
+ *
+ * Input r2 : new ASID
+ * Output r2 : old ASID
+ */
+
+	.global switch_and_save_asid
+switch_and_save_asid:
+	getcon	sr, r0
+	movi	255, r4
+	shlli 	r4, 16, r4	/* r4 = mask to select ASID */
+	and	r0, r4, r3	/* r3 = shifted old ASID */
+	andi	r2, 255, r2	/* mask down new ASID */
+	shlli	r2, 16, r2	/* align new ASID against SR.ASID */
+	andc	r0, r4, r0	/* efface old ASID from SR */
+	or	r0, r2, r0	/* insert the new ASID */
+	putcon	r0, ssr
+	movi	1f, r0
+	putcon	r0, spc
+	rte
+	nop
+1:
+	ptabs	LINK, tr0
+	shlri	r3, 16, r2	/* r2 = old ASID */
+	blink tr0, r63
+
+	.global	route_to_panic_handler
+route_to_panic_handler:
+	/* Switch to real mode, goto panic_handler, don't return.  Useful for
+	   last-chance debugging, e.g. if no output wants to go to the console.
+	   */
+
+	movi	panic_handler - CONFIG_CACHED_MEMORY_OFFSET, r1
+	ptabs	r1, tr0
+	pta	1f, tr1
+	gettr	tr1, r0
+	putcon	r0, spc
+	getcon	sr, r0
+	movi	1, r1
+	shlli	r1, 31, r1
+	andc	r0, r1, r0
+	putcon	r0, ssr
+	rte
+	nop
+1:	/* Now in real mode */
+	blink tr0, r63
+	nop
+
+	.global peek_real_address_q
+peek_real_address_q:
+	/* Two args:
+	   r2 : real mode address to peek
+	   r2(out) : result quadword
+
+	   This is provided as a cheapskate way of manipulating device
+	   registers for debugging (to avoid the need to onchip_remap the debug
+	   module, and to avoid the need to onchip_remap the watchpoint
+	   controller in a way that identity maps sufficient bits to avoid the
+	   SH5-101 cut2 silicon defect).
+
+	   This code is not performance critical
+	*/
+
+	add.l	r2, r63, r2	/* sign extend address */
+	getcon	sr, r0		/* r0 = saved original SR */
+	movi	1, r1
+	shlli	r1, 28, r1
+	or	r0, r1, r1	/* r0 with block bit set */
+	putcon	r1, sr		/* now in critical section */
+	movi	1, r36
+	shlli	r36, 31, r36
+	andc	r1, r36, r1	/* turn sr.mmu off in real mode section */
+
+	putcon	r1, ssr
+	movi	.peek0 - CONFIG_CACHED_MEMORY_OFFSET, r36 /* real mode target address */
+	movi	1f, r37		/* virtual mode return addr */
+	putcon	r36, spc
+
+	synco
+	rte
+	nop
+
+.peek0:	/* come here in real mode, don't touch caches!!
+           still in critical section (sr.bl==1) */
+	putcon	r0, ssr
+	putcon	r37, spc
+	/* Here's the actual peek.  If the address is bad, all bets are now off
+	 * what will happen (handlers invoked in real-mode = bad news) */
+	ld.q	r2, 0, r2
+	synco
+	rte	/* Back to virtual mode */
+	nop
+
+1:
+	ptabs	LINK, tr0
+	blink	tr0, r63
+
+	.global poke_real_address_q
+poke_real_address_q:
+	/* Two args:
+	   r2 : real mode address to poke
+	   r3 : quadword value to write.
+
+	   This is provided as a cheapskate way of manipulating device
+	   registers for debugging (to avoid the need to onchip_remap the debug
+	   module, and to avoid the need to onchip_remap the watchpoint
+	   controller in a way that identity maps sufficient bits to avoid the
+	   SH5-101 cut2 silicon defect).
+
+	   This code is not performance critical
+	*/
+
+	add.l	r2, r63, r2	/* sign extend address */
+	getcon	sr, r0		/* r0 = saved original SR */
+	movi	1, r1
+	shlli	r1, 28, r1
+	or	r0, r1, r1	/* r0 with block bit set */
+	putcon	r1, sr		/* now in critical section */
+	movi	1, r36
+	shlli	r36, 31, r36
+	andc	r1, r36, r1	/* turn sr.mmu off in real mode section */
+
+	putcon	r1, ssr
+	movi	.poke0-CONFIG_CACHED_MEMORY_OFFSET, r36 /* real mode target address */
+	movi	1f, r37		/* virtual mode return addr */
+	putcon	r36, spc
+
+	synco
+	rte
+	nop
+
+.poke0:	/* come here in real mode, don't touch caches!!
+           still in critical section (sr.bl==1) */
+	putcon	r0, ssr
+	putcon	r37, spc
+	/* Here's the actual poke.  If the address is bad, all bets are now off
+	 * what will happen (handlers invoked in real-mode = bad news) */
+	st.q	r2, 0, r3
+	synco
+	rte	/* Back to virtual mode */
+	nop
+
+1:
+	ptabs	LINK, tr0
+	blink	tr0, r63
+
+/*
+ * --- User Access Handling Section
+ */
+
+/*
+ * User Access support. It all moved to non inlined Assembler
+ * functions in here.
+ *
+ * __kernel_size_t __copy_user(void *__to, const void *__from,
+ *			       __kernel_size_t __n)
+ *
+ * Inputs:
+ * (r2)  target address
+ * (r3)  source address
+ * (r4)  size in bytes
+ *
+ * Ouputs:
+ * (*r2) target data
+ * (r2)  non-copied bytes
+ *
+ * If a fault occurs on the user pointer, bail out early and return the
+ * number of bytes not copied in r2.
+ * Strategy : for large blocks, call a real memcpy function which can
+ * move >1 byte at a time using unaligned ld/st instructions, and can
+ * manipulate the cache using prefetch + alloco to improve the speed
+ * further.  If a fault occurs in that function, just revert to the
+ * byte-by-byte approach used for small blocks; this is rare so the
+ * performance hit for that case does not matter.
+ *
+ * For small blocks it's not worth the overhead of setting up and calling
+ * the memcpy routine; do the copy a byte at a time.
+ *
+ */
+	.global	__copy_user
+__copy_user:
+	pta	__copy_user_byte_by_byte, tr1
+	movi	16, r0 ! this value is a best guess, should tune it by benchmarking
+	bge/u	r0, r4, tr1
+	pta copy_user_memcpy, tr0
+	addi	SP, -32, SP
+	/* Save arguments in case we have to fix-up unhandled page fault */
+	st.q	SP, 0, r2
+	st.q	SP, 8, r3
+	st.q	SP, 16, r4
+	st.q	SP, 24, r35 ! r35 is callee-save
+	/* Save LINK in a register to reduce RTS time later (otherwise
+	   ld SP,*,LINK;ptabs LINK;trn;blink trn,r63 becomes a critical path) */
+	ori	LINK, 0, r35
+	blink	tr0, LINK
+
+	/* Copy completed normally if we get back here */
+	ptabs	r35, tr0
+	ld.q	SP, 24, r35
+	/* don't restore r2-r4, pointless */
+	/* set result=r2 to zero as the copy must have succeeded. */
+	or	r63, r63, r2
+	addi	SP, 32, SP
+	blink	tr0, r63 ! RTS
+
+	.global __copy_user_fixup
+__copy_user_fixup:
+	/* Restore stack frame */
+	ori	r35, 0, LINK
+	ld.q	SP, 24, r35
+	ld.q	SP, 16, r4
+	ld.q	SP,  8, r3
+	ld.q	SP,  0, r2
+	addi	SP, 32, SP
+	/* Fall through to original code, in the 'same' state we entered with */
+
+/* The slow byte-by-byte method is used if the fast copy traps due to a bad
+   user address.  In that rare case, the speed drop can be tolerated. */
+__copy_user_byte_by_byte:
+	pta	___copy_user_exit, tr1
+	pta	___copy_user1, tr0
+	beq/u	r4, r63, tr1	/* early exit for zero length copy */
+	sub	r2, r3, r0
+	addi	r0, -1, r0
+
+___copy_user1:
+	ld.b	r3, 0, r5		/* Fault address 1 */
+
+	/* Could rewrite this to use just 1 add, but the second comes 'free'
+	   due to load latency */
+	addi	r3, 1, r3
+	addi	r4, -1, r4		/* No real fixup required */
+___copy_user2:
+	stx.b	r3, r0, r5		/* Fault address 2 */
+	bne     r4, ZERO, tr0
+
+___copy_user_exit:
+	or	r4, ZERO, r2
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+/*
+ * __kernel_size_t __clear_user(void *addr, __kernel_size_t size)
+ *
+ * Inputs:
+ * (r2)  target address
+ * (r3)  size in bytes
+ *
+ * Ouputs:
+ * (*r2) zero-ed target data
+ * (r2)  non-zero-ed bytes
+ */
+	.global	__clear_user
+__clear_user:
+	pta	___clear_user_exit, tr1
+	pta	___clear_user1, tr0
+	beq/u	r3, r63, tr1
+
+___clear_user1:
+	st.b	r2, 0, ZERO		/* Fault address */
+	addi	r2, 1, r2
+	addi	r3, -1, r3		/* No real fixup required */
+	bne     r3, ZERO, tr0
+
+___clear_user_exit:
+	or	r3, ZERO, r2
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+
+/*
+ * int __strncpy_from_user(unsigned long __dest, unsigned long __src,
+ *			   int __count)
+ *
+ * Inputs:
+ * (r2)  target address
+ * (r3)  source address
+ * (r4)  maximum size in bytes
+ *
+ * Ouputs:
+ * (*r2) copied data
+ * (r2)  -EFAULT (in case of faulting)
+ *       copied data (otherwise)
+ */
+	.global	__strncpy_from_user
+__strncpy_from_user:
+	pta	___strncpy_from_user1, tr0
+	pta	___strncpy_from_user_done, tr1
+	or	r4, ZERO, r5		/* r5 = original count */
+	beq/u	r4, r63, tr1		/* early exit if r4==0 */
+	movi	-(EFAULT), r6		/* r6 = reply, no real fixup */
+	or	ZERO, ZERO, r7		/* r7 = data, clear top byte of data */
+
+___strncpy_from_user1:
+	ld.b	r3, 0, r7		/* Fault address: only in reading */
+	st.b	r2, 0, r7
+	addi	r2, 1, r2
+	addi	r3, 1, r3
+	beq/u	ZERO, r7, tr1
+	addi	r4, -1, r4		/* return real number of copied bytes */
+	bne/l	ZERO, r4, tr0
+
+___strncpy_from_user_done:
+	sub	r5, r4, r6		/* If done, return copied */
+
+___strncpy_from_user_exit:
+	or	r6, ZERO, r2
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+/*
+ * extern long __strnlen_user(const char *__s, long __n)
+ *
+ * Inputs:
+ * (r2)  source address
+ * (r3)  source size in bytes
+ *
+ * Ouputs:
+ * (r2)  -EFAULT (in case of faulting)
+ *       string length (otherwise)
+ */
+	.global	__strnlen_user
+__strnlen_user:
+	pta	___strnlen_user_set_reply, tr0
+	pta	___strnlen_user1, tr1
+	or	ZERO, ZERO, r5		/* r5 = counter */
+	movi	-(EFAULT), r6		/* r6 = reply, no real fixup */
+	or	ZERO, ZERO, r7		/* r7 = data, clear top byte of data */
+	beq	r3, ZERO, tr0
+
+___strnlen_user1:
+	ldx.b	r2, r5, r7		/* Fault address: only in reading */
+	addi	r3, -1, r3		/* No real fixup */
+	addi	r5, 1, r5
+	beq	r3, ZERO, tr0
+	bne	r7, ZERO, tr1
+! The line below used to be active.  This meant led to a junk byte lying between each pair
+! of entries in the argv & envp structures in memory.  Whilst the program saw the right data
+! via the argv and envp arguments to main, it meant the 'flat' representation visible through
+! /proc/$pid/cmdline was corrupt, causing trouble with ps, for example.
+!	addi	r5, 1, r5		/* Include '\0' */
+
+___strnlen_user_set_reply:
+	or	r5, ZERO, r6		/* If done, return counter */
+
+___strnlen_user_exit:
+	or	r6, ZERO, r2
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+/*
+ * extern long __get_user_asm_?(void *val, long addr)
+ *
+ * Inputs:
+ * (r2)  dest address
+ * (r3)  source address (in User Space)
+ *
+ * Ouputs:
+ * (r2)  -EFAULT (faulting)
+ *       0 	 (not faulting)
+ */
+	.global	__get_user_asm_b
+__get_user_asm_b:
+	or	r2, ZERO, r4
+	movi	-(EFAULT), r2		/* r2 = reply, no real fixup */
+
+___get_user_asm_b1:
+	ld.b	r3, 0, r5		/* r5 = data */
+	st.b	r4, 0, r5
+	or	ZERO, ZERO, r2
+
+___get_user_asm_b_exit:
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+
+	.global	__get_user_asm_w
+__get_user_asm_w:
+	or	r2, ZERO, r4
+	movi	-(EFAULT), r2		/* r2 = reply, no real fixup */
+
+___get_user_asm_w1:
+	ld.w	r3, 0, r5		/* r5 = data */
+	st.w	r4, 0, r5
+	or	ZERO, ZERO, r2
+
+___get_user_asm_w_exit:
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+
+	.global	__get_user_asm_l
+__get_user_asm_l:
+	or	r2, ZERO, r4
+	movi	-(EFAULT), r2		/* r2 = reply, no real fixup */
+
+___get_user_asm_l1:
+	ld.l	r3, 0, r5		/* r5 = data */
+	st.l	r4, 0, r5
+	or	ZERO, ZERO, r2
+
+___get_user_asm_l_exit:
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+
+	.global	__get_user_asm_q
+__get_user_asm_q:
+	or	r2, ZERO, r4
+	movi	-(EFAULT), r2		/* r2 = reply, no real fixup */
+
+___get_user_asm_q1:
+	ld.q	r3, 0, r5		/* r5 = data */
+	st.q	r4, 0, r5
+	or	ZERO, ZERO, r2
+
+___get_user_asm_q_exit:
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+/*
+ * extern long __put_user_asm_?(void *pval, long addr)
+ *
+ * Inputs:
+ * (r2)  kernel pointer to value
+ * (r3)  dest address (in User Space)
+ *
+ * Ouputs:
+ * (r2)  -EFAULT (faulting)
+ *       0 	 (not faulting)
+ */
+	.global	__put_user_asm_b
+__put_user_asm_b:
+	ld.b	r2, 0, r4		/* r4 = data */
+	movi	-(EFAULT), r2		/* r2 = reply, no real fixup */
+
+___put_user_asm_b1:
+	st.b	r3, 0, r4
+	or	ZERO, ZERO, r2
+
+___put_user_asm_b_exit:
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+
+	.global	__put_user_asm_w
+__put_user_asm_w:
+	ld.w	r2, 0, r4		/* r4 = data */
+	movi	-(EFAULT), r2		/* r2 = reply, no real fixup */
+
+___put_user_asm_w1:
+	st.w	r3, 0, r4
+	or	ZERO, ZERO, r2
+
+___put_user_asm_w_exit:
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+
+	.global	__put_user_asm_l
+__put_user_asm_l:
+	ld.l	r2, 0, r4		/* r4 = data */
+	movi	-(EFAULT), r2		/* r2 = reply, no real fixup */
+
+___put_user_asm_l1:
+	st.l	r3, 0, r4
+	or	ZERO, ZERO, r2
+
+___put_user_asm_l_exit:
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+
+	.global	__put_user_asm_q
+__put_user_asm_q:
+	ld.q	r2, 0, r4		/* r4 = data */
+	movi	-(EFAULT), r2		/* r2 = reply, no real fixup */
+
+___put_user_asm_q1:
+	st.q	r3, 0, r4
+	or	ZERO, ZERO, r2
+
+___put_user_asm_q_exit:
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
+panic_stash_regs:
+	/* The idea is : when we get an unhandled panic, we dump the registers
+	   to a known memory location, the just sit in a tight loop.
+	   This allows the human to look at the memory region through the GDB
+	   session (assuming the debug module's SHwy initiator isn't locked up
+	   or anything), to hopefully analyze the cause of the panic. */
+
+	/* On entry, former r15 (SP) is in DCR
+	   former r0  is at resvec_saved_area + 0
+	   former r1  is at resvec_saved_area + 8
+	   former tr0 is at resvec_saved_area + 32
+	   DCR is the only register whose value is lost altogether.
+	*/
+
+	movi	0xffffffff80000000, r0 ! phy of dump area
+	ld.q	SP, 0x000, r1	! former r0
+	st.q	r0,  0x000, r1
+	ld.q	SP, 0x008, r1	! former r1
+	st.q	r0,  0x008, r1
+	st.q	r0,  0x010, r2
+	st.q	r0,  0x018, r3
+	st.q	r0,  0x020, r4
+	st.q	r0,  0x028, r5
+	st.q	r0,  0x030, r6
+	st.q	r0,  0x038, r7
+	st.q	r0,  0x040, r8
+	st.q	r0,  0x048, r9
+	st.q	r0,  0x050, r10
+	st.q	r0,  0x058, r11
+	st.q	r0,  0x060, r12
+	st.q	r0,  0x068, r13
+	st.q	r0,  0x070, r14
+	getcon	dcr, r14
+	st.q	r0,  0x078, r14
+	st.q	r0,  0x080, r16
+	st.q	r0,  0x088, r17
+	st.q	r0,  0x090, r18
+	st.q	r0,  0x098, r19
+	st.q	r0,  0x0a0, r20
+	st.q	r0,  0x0a8, r21
+	st.q	r0,  0x0b0, r22
+	st.q	r0,  0x0b8, r23
+	st.q	r0,  0x0c0, r24
+	st.q	r0,  0x0c8, r25
+	st.q	r0,  0x0d0, r26
+	st.q	r0,  0x0d8, r27
+	st.q	r0,  0x0e0, r28
+	st.q	r0,  0x0e8, r29
+	st.q	r0,  0x0f0, r30
+	st.q	r0,  0x0f8, r31
+	st.q	r0,  0x100, r32
+	st.q	r0,  0x108, r33
+	st.q	r0,  0x110, r34
+	st.q	r0,  0x118, r35
+	st.q	r0,  0x120, r36
+	st.q	r0,  0x128, r37
+	st.q	r0,  0x130, r38
+	st.q	r0,  0x138, r39
+	st.q	r0,  0x140, r40
+	st.q	r0,  0x148, r41
+	st.q	r0,  0x150, r42
+	st.q	r0,  0x158, r43
+	st.q	r0,  0x160, r44
+	st.q	r0,  0x168, r45
+	st.q	r0,  0x170, r46
+	st.q	r0,  0x178, r47
+	st.q	r0,  0x180, r48
+	st.q	r0,  0x188, r49
+	st.q	r0,  0x190, r50
+	st.q	r0,  0x198, r51
+	st.q	r0,  0x1a0, r52
+	st.q	r0,  0x1a8, r53
+	st.q	r0,  0x1b0, r54
+	st.q	r0,  0x1b8, r55
+	st.q	r0,  0x1c0, r56
+	st.q	r0,  0x1c8, r57
+	st.q	r0,  0x1d0, r58
+	st.q	r0,  0x1d8, r59
+	st.q	r0,  0x1e0, r60
+	st.q	r0,  0x1e8, r61
+	st.q	r0,  0x1f0, r62
+	st.q	r0,  0x1f8, r63	! bogus, but for consistency's sake...
+
+	ld.q	SP, 0x020, r1  ! former tr0
+	st.q	r0,  0x200, r1
+	gettr	tr1, r1
+	st.q	r0,  0x208, r1
+	gettr	tr2, r1
+	st.q	r0,  0x210, r1
+	gettr	tr3, r1
+	st.q	r0,  0x218, r1
+	gettr	tr4, r1
+	st.q	r0,  0x220, r1
+	gettr	tr5, r1
+	st.q	r0,  0x228, r1
+	gettr	tr6, r1
+	st.q	r0,  0x230, r1
+	gettr	tr7, r1
+	st.q	r0,  0x238, r1
+
+	getcon	sr,  r1
+	getcon	ssr,  r2
+	getcon	pssr,  r3
+	getcon	spc,  r4
+	getcon	pspc,  r5
+	getcon	intevt,  r6
+	getcon	expevt,  r7
+	getcon	pexpevt,  r8
+	getcon	tra,  r9
+	getcon	tea,  r10
+	getcon	kcr0, r11
+	getcon	kcr1, r12
+	getcon	vbr,  r13
+	getcon	resvec,  r14
+
+	st.q	r0,  0x240, r1
+	st.q	r0,  0x248, r2
+	st.q	r0,  0x250, r3
+	st.q	r0,  0x258, r4
+	st.q	r0,  0x260, r5
+	st.q	r0,  0x268, r6
+	st.q	r0,  0x270, r7
+	st.q	r0,  0x278, r8
+	st.q	r0,  0x280, r9
+	st.q	r0,  0x288, r10
+	st.q	r0,  0x290, r11
+	st.q	r0,  0x298, r12
+	st.q	r0,  0x2a0, r13
+	st.q	r0,  0x2a8, r14
+
+	getcon	SPC,r2
+	getcon	SSR,r3
+	getcon	EXPEVT,r4
+	/* Prepare to jump to C - physical address */
+	movi	panic_handler-CONFIG_CACHED_MEMORY_OFFSET, r1
+	ori	r1, 1, r1
+	ptabs   r1, tr0
+	getcon	DCR, SP
+	blink	tr0, ZERO
+	nop
+	nop
+	nop
+	nop
+
+
+
+
+/*
+ * --- Signal Handling Section
+ */
+
+/*
+ * extern long long _sa_default_rt_restorer
+ * extern long long _sa_default_restorer
+ *
+ *		 or, better,
+ *
+ * extern void _sa_default_rt_restorer(void)
+ * extern void _sa_default_restorer(void)
+ *
+ * Code prototypes to do a sys_rt_sigreturn() or sys_sysreturn()
+ * from user space. Copied into user space by signal management.
+ * Both must be quad aligned and 2 quad long (4 instructions).
+ *
+ */
+	.balign 8
+	.global sa_default_rt_restorer
+sa_default_rt_restorer:
+	movi	0x10, r9
+	shori	__NR_rt_sigreturn, r9
+	trapa	r9
+	nop
+
+	.balign 8
+	.global sa_default_restorer
+sa_default_restorer:
+	movi	0x10, r9
+	shori	__NR_sigreturn, r9
+	trapa	r9
+	nop
+
+/*
+ * --- __ex_table Section
+ */
+
+/*
+ * User Access Exception Table.
+ */
+	.section	__ex_table,  "a"
+
+	.global asm_uaccess_start	/* Just a marker */
+asm_uaccess_start:
+
+	.long	___copy_user1, ___copy_user_exit
+	.long	___copy_user2, ___copy_user_exit
+	.long	___clear_user1, ___clear_user_exit
+	.long	___strncpy_from_user1, ___strncpy_from_user_exit
+	.long	___strnlen_user1, ___strnlen_user_exit
+	.long	___get_user_asm_b1, ___get_user_asm_b_exit
+	.long	___get_user_asm_w1, ___get_user_asm_w_exit
+	.long	___get_user_asm_l1, ___get_user_asm_l_exit
+	.long	___get_user_asm_q1, ___get_user_asm_q_exit
+	.long	___put_user_asm_b1, ___put_user_asm_b_exit
+	.long	___put_user_asm_w1, ___put_user_asm_w_exit
+	.long	___put_user_asm_l1, ___put_user_asm_l_exit
+	.long	___put_user_asm_q1, ___put_user_asm_q_exit
+
+	.global asm_uaccess_end		/* Just a marker */
+asm_uaccess_end:
+
+
+
+
+/*
+ * --- .text.init Section
+ */
+
+	.section	.text.init, "ax"
+
+/*
+ * void trap_init (void)
+ *
+ */
+	.global	trap_init
+trap_init:
+	addi	SP, -24, SP			/* Room to save r28/r29/r30 */
+	st.q	SP, 0, r28
+	st.q	SP, 8, r29
+	st.q	SP, 16, r30
+
+	/* Set VBR and RESVEC */
+	movi	LVBR_block, r19
+	andi	r19, -4, r19			/* reset MMUOFF + reserved */
+	/* For RESVEC exceptions we force the MMU off, which means we need the
+	   physical address. */
+	movi	LRESVEC_block-CONFIG_CACHED_MEMORY_OFFSET, r20
+	andi	r20, -4, r20			/* reset reserved */
+	ori	r20, 1, r20			/* set MMUOFF */
+	putcon	r19, VBR
+	putcon	r20, RESVEC
+
+	/* Sanity check */
+	movi	LVBR_block_end, r21
+	andi	r21, -4, r21
+	movi	BLOCK_SIZE, r29			/* r29 = expected size */
+	or	r19, ZERO, r30
+	add	r19, r29, r19
+
+	/*
+	 * Ugly, but better loop forever now than crash afterwards.
+	 * We should print a message, but if we touch LVBR or
+	 * LRESVEC blocks we should not be surprised if we get stuck
+	 * in trap_init().
+	 */
+	pta	trap_init_loop, tr1
+	gettr	tr1, r28			/* r28 = trap_init_loop */
+	sub	r21, r30, r30			/* r30 = actual size */
+
+	/*
+	 * VBR/RESVEC handlers overlap by being bigger than
+	 * allowed. Very bad. Just loop forever.
+	 * (r28) panic/loop address
+	 * (r29) expected size
+	 * (r30) actual size
+	 */
+trap_init_loop:
+	bne	r19, r21, tr1
+
+	/* Now that exception vectors are set up reset SR.BL */
+	getcon 	SR, r22
+	movi	SR_UNBLOCK_EXC, r23
+	and	r22, r23, r22
+	putcon	r22, SR
+
+	addi	SP, 24, SP
+	ptabs	LINK, tr0
+	blink	tr0, ZERO
+
--- diff/arch/sh64/kernel/fpu.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/fpu.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,170 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/fpu.c
+ *
+ * Copyright (C) 2001  Manuela Cirronis, Paolo Alberelli
+ * Copyright (C) 2002  STMicroelectronics Limited
+ *   Author : Stuart Menefy
+ *
+ * Started from SH4 version:
+ *   Copyright (C) 1999, 2000  Kaz Kojima & Niibe Yutaka
+ *
+ */
+
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <asm/processor.h>
+#include <asm/user.h>
+#include <asm/io.h>
+
+/*
+ * Initially load the FPU with signalling NANS.  This bit pattern
+ * has the property that no matter whether considered as single or as
+ * double precision, it still represents a signalling NAN.
+ */
+#define sNAN64		0xFFFFFFFFFFFFFFFFULL
+#define sNAN32		0xFFFFFFFFUL
+
+static union sh_fpu_union init_fpuregs = {
+	.hard = {
+	  .fp_regs = { [0 ... 63] = sNAN32 },
+	  .fpscr = FPSCR_INIT
+	}
+};
+
+inline void fpsave(struct sh_fpu_hard_struct *fpregs)
+{
+	asm volatile("fst.p     %0, (0*8), fp0\n\t"
+		     "fst.p     %0, (1*8), fp2\n\t"
+		     "fst.p     %0, (2*8), fp4\n\t"
+		     "fst.p     %0, (3*8), fp6\n\t"
+		     "fst.p     %0, (4*8), fp8\n\t"
+		     "fst.p     %0, (5*8), fp10\n\t"
+		     "fst.p     %0, (6*8), fp12\n\t"
+		     "fst.p     %0, (7*8), fp14\n\t"
+		     "fst.p     %0, (8*8), fp16\n\t"
+		     "fst.p     %0, (9*8), fp18\n\t"
+		     "fst.p     %0, (10*8), fp20\n\t"
+		     "fst.p     %0, (11*8), fp22\n\t"
+		     "fst.p     %0, (12*8), fp24\n\t"
+		     "fst.p     %0, (13*8), fp26\n\t"
+		     "fst.p     %0, (14*8), fp28\n\t"
+		     "fst.p     %0, (15*8), fp30\n\t"
+		     "fst.p     %0, (16*8), fp32\n\t"
+		     "fst.p     %0, (17*8), fp34\n\t"
+		     "fst.p     %0, (18*8), fp36\n\t"
+		     "fst.p     %0, (19*8), fp38\n\t"
+		     "fst.p     %0, (20*8), fp40\n\t"
+		     "fst.p     %0, (21*8), fp42\n\t"
+		     "fst.p     %0, (22*8), fp44\n\t"
+		     "fst.p     %0, (23*8), fp46\n\t"
+		     "fst.p     %0, (24*8), fp48\n\t"
+		     "fst.p     %0, (25*8), fp50\n\t"
+		     "fst.p     %0, (26*8), fp52\n\t"
+		     "fst.p     %0, (27*8), fp54\n\t"
+		     "fst.p     %0, (28*8), fp56\n\t"
+		     "fst.p     %0, (29*8), fp58\n\t"
+		     "fst.p     %0, (30*8), fp60\n\t"
+		     "fst.p     %0, (31*8), fp62\n\t"
+
+		     "fgetscr   fr63\n\t"
+		     "fst.s     %0, (32*8), fr63\n\t"
+		: /* no output */
+		: "r" (fpregs)
+		: "memory");
+}
+
+
+static inline void
+fpload(struct sh_fpu_hard_struct *fpregs)
+{
+	asm volatile("fld.p     %0, (0*8), fp0\n\t"
+		     "fld.p     %0, (1*8), fp2\n\t"
+		     "fld.p     %0, (2*8), fp4\n\t"
+		     "fld.p     %0, (3*8), fp6\n\t"
+		     "fld.p     %0, (4*8), fp8\n\t"
+		     "fld.p     %0, (5*8), fp10\n\t"
+		     "fld.p     %0, (6*8), fp12\n\t"
+		     "fld.p     %0, (7*8), fp14\n\t"
+		     "fld.p     %0, (8*8), fp16\n\t"
+		     "fld.p     %0, (9*8), fp18\n\t"
+		     "fld.p     %0, (10*8), fp20\n\t"
+		     "fld.p     %0, (11*8), fp22\n\t"
+		     "fld.p     %0, (12*8), fp24\n\t"
+		     "fld.p     %0, (13*8), fp26\n\t"
+		     "fld.p     %0, (14*8), fp28\n\t"
+		     "fld.p     %0, (15*8), fp30\n\t"
+		     "fld.p     %0, (16*8), fp32\n\t"
+		     "fld.p     %0, (17*8), fp34\n\t"
+		     "fld.p     %0, (18*8), fp36\n\t"
+		     "fld.p     %0, (19*8), fp38\n\t"
+		     "fld.p     %0, (20*8), fp40\n\t"
+		     "fld.p     %0, (21*8), fp42\n\t"
+		     "fld.p     %0, (22*8), fp44\n\t"
+		     "fld.p     %0, (23*8), fp46\n\t"
+		     "fld.p     %0, (24*8), fp48\n\t"
+		     "fld.p     %0, (25*8), fp50\n\t"
+		     "fld.p     %0, (26*8), fp52\n\t"
+		     "fld.p     %0, (27*8), fp54\n\t"
+		     "fld.p     %0, (28*8), fp56\n\t"
+		     "fld.p     %0, (29*8), fp58\n\t"
+		     "fld.p     %0, (30*8), fp60\n\t"
+
+		     "fld.s     %0, (32*8), fr63\n\t"
+		     "fputscr   fr63\n\t"
+
+		     "fld.p     %0, (31*8), fp62\n\t"
+		: /* no output */
+		: "r" (fpregs) );
+}
+
+void fpinit(struct sh_fpu_hard_struct *fpregs)
+{
+	*fpregs = init_fpuregs.hard;
+}
+
+asmlinkage void
+do_fpu_error(unsigned long ex, struct pt_regs *regs)
+{
+	struct task_struct *tsk = current;
+
+	regs->pc += 4;
+
+	tsk->thread.trap_no = 11;
+	tsk->thread.error_code = 0;
+	force_sig(SIGFPE, tsk);
+}
+
+
+asmlinkage void
+do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
+{
+	void die(const char *str, struct pt_regs *regs, long err);
+
+	if (! user_mode(regs))
+		die("FPU used in kernel", regs, ex);
+
+	regs->sr &= ~SR_FD;
+
+	if (last_task_used_math == current)
+		return;
+
+	grab_fpu();
+	if (last_task_used_math != NULL) {
+		/* Other processes fpu state, save away */
+		fpsave(&last_task_used_math->thread.fpu.hard);
+        }
+        last_task_used_math = current;
+        if (current->used_math) {
+                fpload(&current->thread.fpu.hard);
+        } else {
+		/* First time FPU user.  */
+		fpload(&init_fpuregs.hard);
+                current->used_math = 1;
+        }
+	release_fpu();
+}
+
--- diff/arch/sh64/kernel/head.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/head.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,373 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/head.S
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ *
+ *
+ * benedict.gaster@superh.com:	 2nd May 2002
+ *    Moved definition of empty_zero_page to its own section allowing
+ *    it to be placed at an absolute address known at load time.
+ *
+ * lethal@linux-sh.org:          9th May 2003
+ *    Kill off GLOBAL_NAME() usage.
+ *
+ * lethal@linux-sh.org:          8th May 2004
+ *    Add early SCIF console DTLB mapping.
+ */
+
+#include <linux/config.h>
+
+#include <asm/page.h>
+#include <asm/mmu_context.h>
+#include <asm/cache.h>
+#include <asm/tlb.h>
+#include <asm/processor.h>
+#include <asm/registers.h>
+#include <asm/thread_info.h>
+
+/*
+ * MMU defines: TLB boundaries.
+ */
+
+#define MMUIR_FIRST	ITLB_FIXED
+#define MMUIR_END	ITLB_LAST_VAR_UNRESTRICTED+TLB_STEP
+#define MMUIR_STEP	TLB_STEP
+
+#define MMUDR_FIRST	DTLB_FIXED
+#define MMUDR_END	DTLB_LAST_VAR_UNRESTRICTED+TLB_STEP
+#define MMUDR_STEP	TLB_STEP
+
+/* Safety check : CONFIG_CACHED_MEMORY_OFFSET has to be a multiple of 512Mb */
+#if (CONFIG_CACHED_MEMORY_OFFSET & ((1UL<<29)-1))
+#error "CONFIG_CACHED_MEMORY_OFFSET must be a multiple of 512Mb"
+#endif
+
+/*
+ * MMU defines: Fixed TLBs.
+ */
+/* Deal safely with the case where the base of RAM is not 512Mb aligned */
+
+#define ALIGN_512M_MASK (0xffffffffe0000000)
+#define ALIGNED_EFFECTIVE ((CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START) & ALIGN_512M_MASK)
+#define ALIGNED_PHYSICAL (CONFIG_MEMORY_START & ALIGN_512M_MASK)
+
+#define MMUIR_TEXT_H	(0x0000000000000003 | ALIGNED_EFFECTIVE)
+			/* Enabled, Shared, ASID 0, Eff. Add. 0xA0000000 */
+
+#define MMUIR_TEXT_L	(0x000000000000009a | ALIGNED_PHYSICAL)
+			/* 512 Mb, Cacheable, Write-back, execute, Not User, Ph. Add. */
+
+#define MMUDR_CACHED_H	0x0000000000000003 | ALIGNED_EFFECTIVE
+			/* Enabled, Shared, ASID 0, Eff. Add. 0xA0000000 */
+#define MMUDR_CACHED_L	0x000000000000015a | ALIGNED_PHYSICAL
+			/* 512 Mb, Cacheable, Write-back, read/write, Not User, Ph. Add. */
+
+#ifdef CONFIG_ICACHE_DISABLED
+#define	ICCR0_INIT_VAL	ICCR0_OFF			/* ICACHE off */
+#else
+#define	ICCR0_INIT_VAL	ICCR0_ON | ICCR0_ICI		/* ICE + ICI */
+#endif
+#define	ICCR1_INIT_VAL	ICCR1_NOLOCK			/* No locking */
+
+#if defined (CONFIG_DCACHE_DISABLED)
+#define	OCCR0_INIT_VAL	OCCR0_OFF			   /* D-cache: off  */
+#elif defined (CONFIG_DCACHE_WRITE_THROUGH)
+#define	OCCR0_INIT_VAL	OCCR0_ON | OCCR0_OCI | OCCR0_WT	   /* D-cache: on,   */
+							   /* WT, invalidate */
+#elif defined (CONFIG_DCACHE_WRITE_BACK)
+#define	OCCR0_INIT_VAL	OCCR0_ON | OCCR0_OCI | OCCR0_WB	   /* D-cache: on,   */
+							   /* WB, invalidate */
+#else
+#error preprocessor flag CONFIG_DCACHE_... not recognized!
+#endif
+
+#define	OCCR1_INIT_VAL	OCCR1_NOLOCK			   /* No locking     */
+
+	.section	.empty_zero_page, "aw"
+	.global empty_zero_page
+
+empty_zero_page:
+	.long	1		/* MOUNT_ROOT_RDONLY */
+	.long	0		/* RAMDISK_FLAGS */
+	.long	0x0200		/* ORIG_ROOT_DEV */
+	.long	1		/* LOADER_TYPE */
+	.long	0x00360000	/* INITRD_START */
+	.long	0x000a0000	/* INITRD_SIZE */
+	.long	0
+
+	.text
+	.balign 4096,0,4096
+
+	.section	.data, "aw"
+	.balign	PAGE_SIZE
+
+	.section	.data, "aw"
+	.balign	PAGE_SIZE
+
+	.global swapper_pg_dir
+swapper_pg_dir:
+	.space PAGE_SIZE, 0
+
+	.global empty_bad_page
+empty_bad_page:
+	.space PAGE_SIZE, 0
+
+	.global empty_bad_pte_table
+empty_bad_pte_table:
+	.space PAGE_SIZE, 0
+
+	.global	fpu_in_use
+fpu_in_use:	.quad	0
+
+
+	.section	.text, "ax"
+	.balign L1_CACHE_BYTES
+/*
+ * Condition at the entry of __stext:
+ * . Reset state:
+ *   . SR.FD    = 1		(FPU disabled)
+ *   . SR.BL    = 1		(Exceptions disabled)
+ *   . SR.MD    = 1		(Privileged Mode)
+ *   . SR.MMU   = 0		(MMU Disabled)
+ *   . SR.CD    = 0		(CTC User Visible)
+ *   . SR.IMASK = Undefined	(Interrupt Mask)
+ *
+ * Operations supposed to be performed by __stext:
+ * . prevent speculative fetch onto device memory while MMU is off
+ * . reflect as much as possible SH5 ABI (r15, r26, r27, r18)
+ * . first, save CPU state and set it to something harmless
+ * . any CPU detection and/or endianness settings (?)
+ * . initialize EMI/LMI (but not TMU/RTC/INTC/SCIF): TBD
+ * . set initial TLB entries for cached and uncached regions
+ *   (no fine granularity paging)
+ * . set initial cache state
+ * . enable MMU and caches
+ * . set CPU to a consistent state
+ *   . registers (including stack pointer and current/KCR0)
+ *   . NOT expecting to set Exception handling nor VBR/RESVEC/DCR
+ *     at this stage. This is all to later Linux initialization steps.
+ *   . initialize FPU
+ * . clear BSS
+ * . jump into start_kernel()
+ * . be prepared to hopeless start_kernel() returns.
+ *
+ */
+	.global _stext
+_stext:
+	/*
+	 * Prevent speculative fetch on device memory due to
+	 * uninitialized target registers.
+	 */
+	ptabs/u	ZERO, tr0
+	ptabs/u	ZERO, tr1
+	ptabs/u	ZERO, tr2
+	ptabs/u	ZERO, tr3
+	ptabs/u	ZERO, tr4
+	ptabs/u	ZERO, tr5
+	ptabs/u	ZERO, tr6
+	ptabs/u	ZERO, tr7
+	synci
+
+	/*
+	 * Read/Set CPU state. After this block:
+	 * r29 = Initial SR
+	 */
+	getcon	SR, r29
+	movi	SR_HARMLESS, r20
+	putcon	r20, SR
+
+	/*
+	 * Initialize EMI/LMI. To Be Done.
+	 */
+
+	/*
+	 * CPU detection and/or endianness settings (?). To Be Done.
+	 * Pure PIC code here, please ! Just save state into r30.
+         * After this block:
+	 * r30 = CPU type/Platform Endianness
+	 */
+
+	/*
+	 * Set initial TLB entries for cached and uncached regions.
+	 * Note: PTA/BLINK is PIC code, PTABS/BLINK isn't !
+	 */
+	/* Clear ITLBs */
+	pta	clear_ITLB, tr1
+	movi	MMUIR_FIRST, r21
+	movi	MMUIR_END, r22
+clear_ITLB:
+	putcfg	r21, 0, ZERO		/* Clear MMUIR[n].PTEH.V */
+	addi	r21, MMUIR_STEP, r21
+        bne	r21, r22, tr1
+
+	/* Clear DTLBs */
+	pta	clear_DTLB, tr1
+	movi	MMUDR_FIRST, r21
+	movi	MMUDR_END, r22
+clear_DTLB:
+	putcfg	r21, 0, ZERO		/* Clear MMUDR[n].PTEH.V */
+	addi	r21, MMUDR_STEP, r21
+        bne	r21, r22, tr1
+
+	/* Map one big (512Mb) page for ITLB */
+	movi	MMUIR_FIRST, r21
+	movi	MMUIR_TEXT_L, r22	/* PTEL first */
+	add.l	r22, r63, r22		/* Sign extend */
+	putcfg	r21, 1, r22		/* Set MMUIR[0].PTEL */
+	movi	MMUIR_TEXT_H, r22	/* PTEH last */
+	add.l	r22, r63, r22		/* Sign extend */
+	putcfg	r21, 0, r22		/* Set MMUIR[0].PTEH */
+
+	/* Map one big CACHED (512Mb) page for DTLB */
+	movi	MMUDR_FIRST, r21
+	movi	MMUDR_CACHED_L, r22	/* PTEL first */
+	add.l	r22, r63, r22		/* Sign extend */
+	putcfg	r21, 1, r22		/* Set MMUDR[0].PTEL */
+	movi	MMUDR_CACHED_H, r22	/* PTEH last */
+	add.l	r22, r63, r22		/* Sign extend */
+	putcfg	r21, 0, r22		/* Set MMUDR[0].PTEH */
+
+#ifdef CONFIG_EARLY_PRINTK
+	/*
+	 * Setup a DTLB translation for SCIF phys.
+	 */
+	addi    r21, MMUDR_STEP, r21
+	movi    0x0a03, r22	/* SCIF phys */
+	shori   0x0148, r22
+	putcfg  r21, 1, r22	/* PTEL first */
+	movi    0xfa03, r22	/* 0xfa030000, fixed SCIF virt */
+	shori   0x0003, r22
+	putcfg  r21, 0, r22	/* PTEH last */
+#endif
+
+	/*
+	 * Set cache behaviours.
+	 */
+	/* ICache */
+	movi	ICCR_BASE, r21
+	movi	ICCR0_INIT_VAL, r22
+	movi	ICCR1_INIT_VAL, r23
+	putcfg	r21, ICCR_REG0, r22
+	putcfg	r21, ICCR_REG1, r23
+
+	/* OCache */
+	movi	OCCR_BASE, r21
+	movi	OCCR0_INIT_VAL, r22
+	movi	OCCR1_INIT_VAL, r23
+	putcfg	r21, OCCR_REG0, r22
+	putcfg	r21, OCCR_REG1, r23
+
+
+	/*
+	 * Enable Caches and MMU. Do the first non-PIC jump.
+         * Now head.S global variables, constants and externs
+	 * can be used.
+	 */
+	getcon	SR, r21
+	movi	SR_ENABLE_MMU, r22
+	or	r21, r22, r21
+	putcon	r21, SSR
+	movi	hyperspace, r22
+	ori	r22, 1, r22	    /* Make it SHmedia, not required but..*/
+	putcon	r22, SPC
+	synco
+	rte			    /* And now go into the hyperspace ... */
+hyperspace:			    /* ... that's the next instruction !  */
+
+	/*
+	 * Set CPU to a consistent state.
+	 * r31 = FPU support flag
+	 * tr0/tr7 in use. Others give a chance to loop somewhere safe
+	 */
+	movi	start_kernel, r32
+	ori	r32, 1, r32
+
+	ptabs	r32, tr0		    /* r32 = _start_kernel address        */
+	pta/u	hopeless, tr1
+	pta/u	hopeless, tr2
+	pta/u	hopeless, tr3
+	pta/u	hopeless, tr4
+	pta/u	hopeless, tr5
+	pta/u	hopeless, tr6
+	pta/u	hopeless, tr7
+	gettr	tr1, r28			/* r28 = hopeless address */
+
+	/* Set initial stack pointer */
+	movi	init_thread_union, SP
+	putcon	SP, KCR0		/* Set current to init_task */
+	movi	THREAD_SIZE, r22	/* Point to the end */
+	add	SP, r22, SP
+
+	/*
+	 * Initialize FPU.
+	 * Keep FPU flag in r31. After this block:
+	 * r31 = FPU flag
+	 */
+	movi fpu_in_use, r31	/* Temporary */
+
+#ifndef CONFIG_NOFPU_SUPPORT
+	getcon	SR, r21
+	movi	SR_ENABLE_FPU, r22
+	and	r21, r22, r22
+	putcon	r22, SR			/* Try to enable */
+	getcon	SR, r22
+	xor	r21, r22, r21
+	shlri	r21, 15, r21		/* Supposedly 0/1 */
+	st.q	r31, 0 , r21		/* Set fpu_in_use */
+#else
+	movi	0, r21
+	st.q	r31, 0 , r21		/* Set fpu_in_use */
+#endif
+	or	r21, ZERO, r31		/* Set FPU flag at last */
+
+#ifndef CONFIG_SH_NO_BSS_INIT
+/* Don't clear BSS if running on slow platforms such as an RTL simulation,
+   remote memory via SHdebug link, etc.  For these the memory can be guaranteed
+   to be all zero on boot anyway. */
+	/*
+	 * Clear bss
+	 */
+	pta	clear_quad, tr1
+	movi	__bss_start, r22
+	movi	_end, r23
+clear_quad:
+	st.q	r22, 0, ZERO
+	addi	r22, 8, r22
+	bne	r22, r23, tr1		/* Both quad aligned, see vmlinux.lds.S */
+#endif
+	pta/u	hopeless, tr1
+
+	/* Say bye to head.S but be prepared to wrongly get back ... */
+	blink	tr0, LINK
+
+	/* If we ever get back here through LINK/tr1-tr7 */
+	pta/u	hopeless, tr7
+
+hopeless:
+	/*
+	 * Something's badly wrong here. Loop endlessly,
+         * there's nothing more we can do about it.
+	 *
+	 * Note on hopeless: it can be jumped into invariably
+	 * before or after jumping into hyperspace. The only
+	 * requirement is to be PIC called (PTA) before and
+	 * any way (PTA/PTABS) after. According to Virtual
+	 * to Physical mapping a simulator/emulator can easily
+	 * tell where we came here from just looking at hopeless
+	 * (PC) address.
+	 *
+	 * For debugging purposes:
+	 * (r28) hopeless/loop address
+	 * (r29) Original SR
+	 * (r30) CPU type/Platform endianness
+	 * (r31) FPU Support
+	 * (r32) _start_kernel address
+	 */
+	blink	tr7, ZERO
+
+
--- diff/arch/sh64/kernel/init_task.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/init_task.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,45 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/init_task.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+#include <linux/rwsem.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/init_task.h>
+
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+
+static struct fs_struct init_fs = INIT_FS;
+static struct files_struct init_files = INIT_FILES;
+static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
+static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
+struct mm_struct init_mm = INIT_MM(init_mm);
+
+struct pt_regs fake_swapper_regs;
+
+/*
+ * Initial thread structure.
+ *
+ * We need to make sure that this is THREAD_SIZE-byte aligned due
+ * to the way process stacks are handled. This is done by having a
+ * special "init_task" linker map entry..
+ */
+union thread_union init_thread_union
+	__attribute__((__section__(".data.init_task"))) =
+		{ INIT_THREAD_INFO(init_task) };
+
+/*
+ * Initial task structure.
+ *
+ * All other task structs will be allocated on slabs in fork.c
+ */
+struct task_struct init_task = INIT_TASK(init_task);
+
--- diff/arch/sh64/kernel/irq.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/irq.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,720 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/irq.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+
+/*
+ * IRQs are in fact implemented a bit like signal handlers for the kernel.
+ * Naturally it's not a 1:1 relation, but there are similarities.
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/kernel_stat.h>
+#include <linux/signal.h>
+#include <linux/rwsem.h>
+#include <linux/sched.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/timex.h>
+#include <linux/slab.h>
+#include <linux/random.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <linux/seq_file.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/bitops.h>
+#include <asm/smp.h>
+#include <asm/pgalloc.h>
+#include <asm/delay.h>
+#include <asm/irq.h>
+#include <linux/irq.h>
+
+/*
+ * Controller mappings for all interrupt sources:
+ */
+irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = {
+	[0 ... NR_IRQS-1] = {
+		.handler = &no_irq_type,
+		.lock = SPIN_LOCK_UNLOCKED
+	}
+};
+
+
+/*
+ * Special irq handlers.
+ */
+
+irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs)
+{
+	return IRQ_NONE;
+}
+
+/*
+ * Generic no controller code
+ */
+
+static void enable_none(unsigned int irq) { }
+static unsigned int startup_none(unsigned int irq) { return 0; }
+static void disable_none(unsigned int irq) { }
+static void ack_none(unsigned int irq)
+{
+/*
+ * 'what should we do if we get a hw irq event on an illegal vector'.
+ * each architecture has to answer this themselves, it doesnt deserve
+ * a generic callback i think.
+ */
+	printk("unexpected IRQ trap at irq %02x\n", irq);
+}
+
+/* startup is the same as "enable", shutdown is same as "disable" */
+#define shutdown_none	disable_none
+#define end_none	enable_none
+
+struct hw_interrupt_type no_irq_type = {
+	"none",
+	startup_none,
+	shutdown_none,
+	enable_none,
+	disable_none,
+	ack_none,
+	end_none
+};
+
+#if defined(CONFIG_PROC_FS)
+int show_interrupts(struct seq_file *p, void *v)
+{
+	int i = *(loff_t *) v, j;
+	struct irqaction * action;
+	unsigned long flags;
+
+	if (i == 0) {
+		seq_puts(p, "           ");
+		for (j=0; j<NR_CPUS; j++)
+			if (cpu_online(j))
+				seq_printf(p, "CPU%d       ",j);
+		seq_putc(p, '\n');
+	}
+
+	if (i < NR_IRQS) {
+		spin_lock_irqsave(&irq_desc[i].lock, flags);
+		action = irq_desc[i].action;
+		if (!action)
+			goto unlock;
+		seq_printf(p, "%3d: ",i);
+		seq_printf(p, "%10u ", kstat_irqs(i));
+		seq_printf(p, " %14s", irq_desc[i].handler->typename);
+		seq_printf(p, "  %s", action->name);
+
+		for (action=action->next; action; action = action->next)
+			seq_printf(p, ", %s", action->name);
+		seq_putc(p, '\n');
+unlock:
+		spin_unlock_irqrestore(&irq_desc[i].lock, flags);
+	}
+	return 0;
+}
+#endif
+
+/*
+ * do_NMI handles all Non-Maskable Interrupts.
+ */
+asmlinkage void do_NMI(unsigned long vector_num, struct pt_regs * regs)
+{
+	if (regs->sr & 0x40000000)
+		printk("unexpected NMI trap in system mode\n");
+	else
+		printk("unexpected NMI trap in user mode\n");
+
+	/* No statistics */
+}
+
+/*
+ * This should really return information about whether
+ * we should do bottom half handling etc. Right now we
+ * end up _always_ checking the bottom half, which is a
+ * waste of time and is not what some drivers would
+ * prefer.
+ */
+int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
+{
+	int status;
+
+	status = 1;	/* Force the "do bottom halves" bit */
+
+        if (!(action->flags & SA_INTERRUPT))
+                local_irq_enable();
+
+	do {
+		status |= action->flags;
+		action->handler(irq, action->dev_id, regs);
+		action = action->next;
+	} while (action);
+	if (status & SA_SAMPLE_RANDOM)
+		add_interrupt_randomness(irq);
+
+	local_irq_disable();
+
+	return status;
+}
+
+/*
+ * Generic enable/disable code: this just calls
+ * down into the PIC-specific version for the actual
+ * hardware disable after having gotten the irq
+ * controller lock.
+ */
+
+/**
+ *	disable_irq_nosync - disable an irq without waiting
+ *	@irq: Interrupt to disable
+ *
+ *	Disable the selected interrupt line. Disables of an interrupt
+ *	stack. Unlike disable_irq(), this function does not ensure existing
+ *	instances of the IRQ handler have completed before returning.
+ *
+ *	This function may be called from IRQ context.
+ */
+void disable_irq_nosync(unsigned int irq)
+{
+	irq_desc_t *desc = irq_desc + irq;
+	unsigned long flags;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	if (!desc->depth++) {
+		desc->status |= IRQ_DISABLED;
+		desc->handler->disable(irq);
+	}
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+/**
+ *	disable_irq - disable an irq and wait for completion
+ *	@irq: Interrupt to disable
+ *
+ *	Disable the selected interrupt line. Disables of an interrupt
+ *	stack. That is for two disables you need two enables. This
+ *	function waits for any pending IRQ handlers for this interrupt
+ *	to complete before returning. If you use this function while
+ *	holding a resource the IRQ handler may need you will deadlock.
+ *
+ *	This function may be called - with care - from IRQ context.
+ */
+void disable_irq(unsigned int irq)
+{
+	disable_irq_nosync(irq);
+	synchronize_irq(irq);
+}
+
+/**
+ *	enable_irq - enable interrupt handling on an irq
+ *	@irq: Interrupt to enable
+ *
+ *	Re-enables the processing of interrupts on this IRQ line
+ *	providing no disable_irq calls are now in effect.
+ *
+ *	This function may be called from IRQ context.
+ */
+void enable_irq(unsigned int irq)
+{
+	irq_desc_t *desc = irq_desc + irq;
+	unsigned long flags;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	switch (desc->depth) {
+	case 1: {
+		unsigned int status = desc->status & ~IRQ_DISABLED;
+		desc->status = status;
+		if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
+			desc->status = status | IRQ_REPLAY;
+			hw_resend_irq(desc->handler,irq);
+		}
+		desc->handler->enable(irq);
+		/* fall-through */
+	}
+	default:
+		desc->depth--;
+		break;
+	case 0:
+		printk("enable_irq() unbalanced from %p\n",
+		       __builtin_return_address(0));
+	}
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+/*
+ * do_IRQ handles all normal device IRQ's.
+ */
+asmlinkage int do_IRQ(unsigned long vector_num, struct pt_regs * regs)
+{
+	/*
+	 * We ack quickly, we don't want the irq controller
+	 * thinking we're snobs just because some other CPU has
+	 * disabled global interrupts (we have already done the
+	 * INT_ACK cycles, it's too late to try to pretend to the
+	 * controller that we aren't taking the interrupt).
+	 *
+	 * 0 return value means that this irq is already being
+	 * handled by some other CPU. (or is disabled)
+	 */
+	int irq;
+	int cpu = smp_processor_id();
+	irq_desc_t *desc = NULL;
+	struct irqaction * action;
+	unsigned int status;
+
+	irq_enter();
+
+#ifdef CONFIG_PREEMPT
+	/*
+	 * At this point we're now about to actually call handlers,
+	 * and interrupts might get reenabled during them... bump
+	 * preempt_count to prevent any preemption while the handler
+	 * called here is pending...
+	 */
+	preempt_disable();
+#endif
+
+	irq = irq_demux(vector_num);
+
+	/*
+	 * Should never happen, if it does check
+	 * vectorN_to_IRQ[] against trap_jtable[].
+	 */
+	if (irq == -1) {
+		printk("unexpected IRQ trap at vector %03lx\n", vector_num);
+		goto out;
+	}
+
+	desc = irq_desc + irq;
+
+	kstat_cpu(cpu).irqs[irq]++;
+	spin_lock(&desc->lock);
+	desc->handler->ack(irq);
+	/*
+	   REPLAY is when Linux resends an IRQ that was dropped earlier
+	   WAITING is used by probe to mark irqs that are being tested
+	   */
+	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING | IRQ_INPROGRESS);
+	status |= IRQ_PENDING; /* we _want_ to handle it */
+
+	/*
+	 * If the IRQ is disabled for whatever reason, we cannot
+	 * use the action we have.
+	 */
+	action = NULL;
+	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
+		action = desc->action;
+		status &= ~IRQ_PENDING; /* we commit to handling */
+		status |= IRQ_INPROGRESS; /* we are handling it */
+	}
+	desc->status = status;
+
+	/*
+	 * If there is no IRQ handler or it was disabled, exit early.
+	   Since we set PENDING, if another processor is handling
+	   a different instance of this same irq, the other processor
+	   will take care of it.
+	 */
+	if (!action)
+		goto out;
+
+	/*
+	 * Edge triggered interrupts need to remember
+	 * pending events.
+	 * This applies to any hw interrupts that allow a second
+	 * instance of the same irq to arrive while we are in do_IRQ
+	 * or in the handler. But the code here only handles the _second_
+	 * instance of the irq, not the third or fourth. So it is mostly
+	 * useful for irq hardware that does not mask cleanly in an
+	 * SMP environment.
+	 */
+	for (;;) {
+		spin_unlock(&desc->lock);
+		handle_IRQ_event(irq, regs, action);
+		spin_lock(&desc->lock);
+
+		if (!(desc->status & IRQ_PENDING))
+			break;
+		desc->status &= ~IRQ_PENDING;
+	}
+	desc->status &= ~IRQ_INPROGRESS;
+out:
+	/*
+	 * The ->end() handler has to deal with interrupts which got
+	 * disabled while the handler was running.
+	 */
+	if (desc) {
+		desc->handler->end(irq);
+		spin_unlock(&desc->lock);
+	}
+
+	irq_exit();
+
+#ifdef CONFIG_PREEMPT
+	/*
+	 * We're done with the handlers, interrupts should be
+	 * currently disabled; decrement preempt_count now so
+	 * as we return preemption may be allowed...
+	 */
+	preempt_enable_no_resched();
+#endif
+
+	return 1;
+}
+
+/**
+ *	request_irq - allocate an interrupt line
+ *	@irq: Interrupt line to allocate
+ *	@handler: Function to be called when the IRQ occurs
+ *	@irqflags: Interrupt type flags
+ *	@devname: An ascii name for the claiming device
+ *	@dev_id: A cookie passed back to the handler function
+ *
+ *	This call allocates interrupt resources and enables the
+ *	interrupt line and IRQ handling. From the point this
+ *	call is made your handler function may be invoked. Since
+ *	your handler function must clear any interrupt the board
+ *	raises, you must take care both to initialise your hardware
+ *	and to set up the interrupt handler in the right order.
+ *
+ *	Dev_id must be globally unique. Normally the address of the
+ *	device data structure is used as the cookie. Since the handler
+ *	receives this value it makes sense to use it.
+ *
+ *	If your interrupt is shared you must pass a non NULL dev_id
+ *	as this is required when freeing the interrupt.
+ *
+ *	Flags:
+ *
+ *	SA_SHIRQ		Interrupt is shared
+ *
+ *	SA_INTERRUPT		Disable local interrupts while processing
+ *
+ *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
+ *
+ */
+int request_irq(unsigned int irq,
+		irqreturn_t (*handler)(int, void *, struct pt_regs *),
+		unsigned long irqflags,
+		const char * devname,
+		void *dev_id)
+{
+	int retval;
+	struct irqaction * action;
+
+#if 1
+	/*
+	 * Sanity-check: shared interrupts should REALLY pass in
+	 * a real dev-ID, otherwise we'll have trouble later trying
+	 * to figure out which interrupt is which (messes up the
+	 * interrupt freeing logic etc).
+	 */
+	if (irqflags & SA_SHIRQ) {
+		if (!dev_id)
+			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
+	}
+#endif
+
+	if (irq >= NR_IRQS)
+		return -EINVAL;
+	if (!handler)
+		return -EINVAL;
+
+	action = (struct irqaction *)
+			kmalloc(sizeof(struct irqaction), GFP_KERNEL);
+	if (!action)
+		return -ENOMEM;
+
+	action->handler = handler;
+	action->flags = irqflags;
+	action->mask = 0;
+	action->name = devname;
+	action->next = NULL;
+	action->dev_id = dev_id;
+
+	retval = setup_irq(irq, action);
+	if (retval)
+		kfree(action);
+	return retval;
+}
+
+/**
+ *	free_irq - free an interrupt
+ *	@irq: Interrupt line to free
+ *	@dev_id: Device identity to free
+ *
+ *	Remove an interrupt handler. The handler is removed and if the
+ *	interrupt line is no longer in use by any driver it is disabled.
+ *	On a shared IRQ the caller must ensure the interrupt is disabled
+ *	on the card it drives before calling this function. The function
+ *	does not return until any executing interrupts for this IRQ
+ *	have completed.
+ *
+ *	This function may be called from interrupt context.
+ *
+ *	Bugs: Attempting to free an irq in a handler for the same irq hangs
+ *	      the machine.
+ */
+void free_irq(unsigned int irq, void *dev_id)
+{
+	irq_desc_t *desc;
+	struct irqaction **p;
+	unsigned long flags;
+
+	if (irq >= NR_IRQS)
+		return;
+
+	desc = irq_desc + irq;
+	spin_lock_irqsave(&desc->lock,flags);
+	p = &desc->action;
+	for (;;) {
+		struct irqaction * action = *p;
+		if (action) {
+			struct irqaction **pp = p;
+			p = &action->next;
+			if (action->dev_id != dev_id)
+				continue;
+
+			/* Found it - now remove it from the list of entries */
+			*pp = action->next;
+			if (!desc->action) {
+				desc->status |= IRQ_DISABLED;
+				desc->handler->shutdown(irq);
+			}
+			spin_unlock_irqrestore(&desc->lock,flags);
+			kfree(action);
+			return;
+		}
+		printk("Trying to free free IRQ%d\n",irq);
+		spin_unlock_irqrestore(&desc->lock,flags);
+		return;
+	}
+}
+
+/*
+ * IRQ autodetection code..
+ *
+ * This depends on the fact that any interrupt that
+ * comes in on to an unassigned handler will get stuck
+ * with "IRQ_WAITING" cleared and the interrupt
+ * disabled.
+ */
+
+/**
+ *	probe_irq_on	- begin an interrupt autodetect
+ *
+ *	Commence probing for an interrupt. The interrupts are scanned
+ *	and a mask of potential interrupt lines is returned.
+ *
+ */
+unsigned long probe_irq_on(void)
+{
+	unsigned int i;
+	irq_desc_t *desc;
+	unsigned long val;
+	unsigned long delay;
+
+	/*
+	 * something may have generated an irq long ago and we want to
+	 * flush such a longstanding irq before considering it as spurious.
+	 */
+	for (i = NR_IRQS-1; i >= 0; i--) {
+		desc = irq_desc + i;
+
+		spin_lock_irq(&desc->lock);
+		if (!irq_desc[i].action) {
+			irq_desc[i].handler->startup(i);
+		}
+		spin_unlock_irq(&desc->lock);
+	}
+
+	/* Wait for longstanding interrupts to trigger. */
+	for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
+		/* about 20ms delay */ synchronize_irq();
+
+	/*
+	 * enable any unassigned irqs
+	 * (we must startup again here because if a longstanding irq
+	 * happened in the previous stage, it may have masked itself)
+	 */
+	for (i = NR_IRQS-1; i >= 0; i--) {
+		desc = irq_desc + 1;
+
+		spin_lock_irq(&desc->lock);
+		if (!desc->action) {
+			desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
+			if (desc->handler->startup(i))
+				desc->status |= IRQ_PENDING;
+		}
+		spin_unlock_irq(&desc->lock);
+	}
+
+	/*
+	 * Wait for spurious interrupts to trigger
+	 */
+	for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
+		/* about 100ms delay */ synchronize_irq();
+
+	/*
+	 * Now filter out any obviously spurious interrupts
+	 */
+	val = 0;
+	for (i = 0; i < NR_IRQS; i++) {
+		irq_desc_t *desc = irq_desc + i;
+		unsigned int status;
+
+		spin_lock_irq(&desc->lock);
+		status = desc->status;
+
+		if (status & IRQ_AUTODETECT) {
+			/* It triggered already - consider it spurious. */
+			if (!(status & IRQ_WAITING)) {
+				desc->status = status & ~IRQ_AUTODETECT;
+				desc->handler->shutdown(i);
+			} else
+				if (i < 32)
+					val |= 1 << i;
+		}
+		spin_unlock_irq(&desc->lock);
+	}
+
+	return val;
+}
+
+/*
+ * Return the one interrupt that triggered (this can
+ * handle any interrupt source).
+ */
+
+/**
+ *	probe_irq_off   - end an interrupt autodetect
+ *	@val: mask of potential interrupts (unused)
+ *
+ *	Scans the unused interrupt lines and returns the line which
+ *	appears to have triggered the interrupt. If no interrupt was
+ *	found then zero is returned. If more than one interrupt is
+ *	found then minus the first candidate is returned to indicate
+ *	their is doubt.
+ *
+ *	The interrupt probe logic state is returned to its previous
+ *	value.
+ *
+ *	BUGS: When used in a module (which arguably shouldnt happen)
+ *	nothing prevents two IRQ probe callers from overlapping. The
+ *	results of this are non-optimal.
+ */
+int probe_irq_off(unsigned long val)
+{
+	int i, irq_found, nr_irqs;
+
+	nr_irqs = 0;
+	irq_found = 0;
+	for (i=0; i<NR_IRQS; i++) {
+		irq_desc_t *desc = irq_desc + i;
+		unsigned int status;
+
+		spin_lock_irq(&desc->lock);
+		status = desc->status;
+		if (!(status & IRQ_AUTODETECT))
+			continue;
+
+		if (status & IRQ_AUTODETECT) {
+			if (!(status & IRQ_WAITING)) {
+				if (!nr_irqs)
+					irq_found = i;
+				nr_irqs++;
+			}
+
+			desc->status = status & ~IRQ_AUTODETECT;
+			desc->handler->shutdown(i);
+		}
+		spin_unlock_irq(&desc->lock);
+	}
+
+	if (nr_irqs > 1)
+		irq_found = -irq_found;
+	return irq_found;
+}
+
+int setup_irq(unsigned int irq, struct irqaction * new)
+{
+	int shared = 0;
+	unsigned long flags;
+	struct irqaction *old, **p;
+	irq_desc_t *desc = irq_desc + irq;
+
+	/*
+	 * Some drivers like serial.c use request_irq() heavily,
+	 * so we have to be careful not to interfere with a
+	 * running system.
+	 */
+	if (new->flags & SA_SAMPLE_RANDOM) {
+		/*
+		 * This function might sleep, we want to call it first,
+		 * outside of the atomic block.
+		 * Yes, this might clear the entropy pool if the wrong
+		 * driver is attempted to be loaded, without actually
+		 * installing a new handler, but is this really a problem,
+		 * only the sysadmin is able to do this.
+		 */
+		rand_initialize_irq(irq);
+	}
+
+	/*
+	 * The following block of code has to be executed atomically
+	 */
+	spin_lock_irqsave(&desc->lock,flags);
+	p = &desc->action;
+	if ((old = *p) != NULL) {
+		/* Can't share interrupts unless both agree to */
+		if (!(old->flags & new->flags & SA_SHIRQ)) {
+			spin_unlock_irqrestore(&desc->lock,flags);
+			return -EBUSY;
+		}
+
+		/* add new interrupt at end of irq queue */
+		do {
+			p = &old->next;
+			old = *p;
+		} while (old);
+		shared = 1;
+	}
+
+	*p = new;
+
+	if (!shared) {
+		desc->depth = 0;
+		desc->status &= ~IRQ_DISABLED;
+		desc->handler->startup(irq);
+	}
+	spin_unlock_irqrestore(&desc->lock,flags);
+
+	/*
+	 * No PROC FS support for interrupts.
+	 * For improvements in this area please check
+	 * the i386 branch.
+	 */
+	return 0;
+}
+
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_SYSCTL)
+
+void init_irq_proc(void)
+{
+	/*
+	 * No PROC FS support for interrupts.
+	 * For improvements in this area please check
+	 * the i386 branch.
+	 */
+}
+#endif
--- diff/arch/sh64/kernel/irq_intc.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/irq_intc.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,272 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/irq_intc.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ * Interrupt Controller support for SH5 INTC.
+ * Per-interrupt selective. IRLM=0 (Fixed priority) is not
+ * supported being useless without a cascaded interrupt
+ * controller.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/kernel.h>
+#include <linux/stddef.h>
+
+#include <asm/hardware.h>
+#include <asm/platform.h>
+#include <asm/bitops.h>		/* this includes also <asm/registers.h */
+				/* which is required to remap register */
+				/* names used into __asm__ blocks...   */
+#include <asm/page.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+
+/*
+ * Maybe the generic Peripheral block could move to a more
+ * generic include file. INTC Block will be defined here
+ * and only here to make INTC self-contained in a single
+ * file.
+ */
+#define	INTC_BLOCK_OFFSET	0x01000000
+
+/* Base */
+#define INTC_BASE		PHYS_PERIPHERAL_BLOCK + \
+				INTC_BLOCK_OFFSET
+
+/* Address */
+#define INTC_ICR_SET		(intc_virt + 0x0)
+#define INTC_ICR_CLEAR		(intc_virt + 0x8)
+#define INTC_INTPRI_0		(intc_virt + 0x10)
+#define INTC_INTSRC_0		(intc_virt + 0x50)
+#define INTC_INTSRC_1		(intc_virt + 0x58)
+#define INTC_INTREQ_0		(intc_virt + 0x60)
+#define INTC_INTREQ_1		(intc_virt + 0x68)
+#define INTC_INTENB_0		(intc_virt + 0x70)
+#define INTC_INTENB_1		(intc_virt + 0x78)
+#define INTC_INTDSB_0		(intc_virt + 0x80)
+#define INTC_INTDSB_1		(intc_virt + 0x88)
+
+#define INTC_ICR_IRLM		0x1
+#define	INTC_INTPRI_PREGS	8		/* 8 Priority Registers */
+#define	INTC_INTPRI_PPREG	8		/* 8 Priorities per Register */
+
+
+/*
+ * Mapper between the vector ordinal and the IRQ number
+ * passed to kernel/device drivers.
+ */
+int intc_evt_to_irq[(0xE20/0x20)+1] = {
+	-1, -1, -1, -1, -1, -1, -1, -1,	/* 0x000 - 0x0E0 */
+	-1, -1, -1, -1, -1, -1, -1, -1,	/* 0x100 - 0x1E0 */
+	 0,  0,  0,  0,  0,  1,  0,  0,	/* 0x200 - 0x2E0 */
+	 2,  0,  0,  3,  0,  0,  0, -1,	/* 0x300 - 0x3E0 */
+	32, 33, 34, 35, 36, 37, 38, -1,	/* 0x400 - 0x4E0 */
+	-1, -1, -1, 63, -1, -1, -1, -1,	/* 0x500 - 0x5E0 */
+	-1, -1, 18, 19, 20, 21, 22, -1,	/* 0x600 - 0x6E0 */
+	39, 40, 41, 42, -1, -1, -1, -1,	/* 0x700 - 0x7E0 */
+	 4,  5,  6,  7, -1, -1, -1, -1,	/* 0x800 - 0x8E0 */
+	-1, -1, -1, -1, -1, -1, -1, -1,	/* 0x900 - 0x9E0 */
+	12, 13, 14, 15, 16, 17, -1, -1,	/* 0xA00 - 0xAE0 */
+	-1, -1, -1, -1, -1, -1, -1, -1,	/* 0xB00 - 0xBE0 */
+	-1, -1, -1, -1, -1, -1, -1, -1,	/* 0xC00 - 0xCE0 */
+	-1, -1, -1, -1, -1, -1, -1, -1,	/* 0xD00 - 0xDE0 */
+	-1, -1				/* 0xE00 - 0xE20 */
+};
+
+/*
+ * Opposite mapper.
+ */
+static int IRQ_to_vectorN[NR_INTC_IRQS] = {
+	0x12, 0x15, 0x18, 0x1B, 0x40, 0x41, 0x42, 0x43, /*  0- 7 */
+	  -1,   -1,   -1,   -1, 0x50, 0x51, 0x52, 0x53,	/*  8-15 */
+	0x54, 0x55, 0x32, 0x33, 0x34, 0x35, 0x36,   -1, /* 16-23 */
+	  -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1, /* 24-31 */
+	0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x38,	/* 32-39 */
+        0x39, 0x3A, 0x3B,   -1,   -1,   -1,   -1,   -1, /* 40-47 */
+	  -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1, /* 48-55 */
+	  -1,   -1,   -1,   -1,   -1,   -1,   -1, 0x2B, /* 56-63 */
+
+};
+
+static unsigned long intc_virt;
+
+static unsigned int startup_intc_irq(unsigned int irq);
+static void shutdown_intc_irq(unsigned int irq);
+static void enable_intc_irq(unsigned int irq);
+static void disable_intc_irq(unsigned int irq);
+static void mask_and_ack_intc(unsigned int);
+static void end_intc_irq(unsigned int irq);
+
+static struct hw_interrupt_type intc_irq_type = {
+	"INTC",
+	startup_intc_irq,
+	shutdown_intc_irq,
+	enable_intc_irq,
+	disable_intc_irq,
+	mask_and_ack_intc,
+	end_intc_irq
+};
+
+static int irlm;		/* IRL mode */
+
+static unsigned int startup_intc_irq(unsigned int irq)
+{
+	enable_intc_irq(irq);
+	return 0; /* never anything pending */
+}
+
+static void shutdown_intc_irq(unsigned int irq)
+{
+	disable_intc_irq(irq);
+}
+
+static void enable_intc_irq(unsigned int irq)
+{
+	unsigned long reg;
+	unsigned long bitmask;
+
+	if ((irq <= IRQ_IRL3) && (irlm == NO_PRIORITY))
+		printk("Trying to use straight IRL0-3 with an encoding platform.\n");
+
+	if (irq < 32) {
+		reg = INTC_INTENB_0;
+		bitmask = 1 << irq;
+	} else {
+		reg = INTC_INTENB_1;
+		bitmask = 1 << (irq - 32);
+	}
+
+	ctrl_outl(bitmask, reg);
+}
+
+static void disable_intc_irq(unsigned int irq)
+{
+	unsigned long reg;
+	unsigned long bitmask;
+
+	if (irq < 32) {
+		reg = INTC_INTDSB_0;
+		bitmask = 1 << irq;
+	} else {
+		reg = INTC_INTDSB_1;
+		bitmask = 1 << (irq - 32);
+	}
+
+	ctrl_outl(bitmask, reg);
+}
+
+static void mask_and_ack_intc(unsigned int irq)
+{
+	disable_intc_irq(irq);
+}
+
+static void end_intc_irq(unsigned int irq)
+{
+	enable_intc_irq(irq);
+}
+
+/* For future use, if we ever support IRLM=0) */
+void make_intc_irq(unsigned int irq)
+{
+	disable_irq_nosync(irq);
+	irq_desc[irq].handler = &intc_irq_type;
+	disable_intc_irq(irq);
+}
+
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_SYSCTL)
+int intc_irq_describe(char* p, int irq)
+{
+	if (irq < NR_INTC_IRQS)
+		return sprintf(p, "(0x%3x)", IRQ_to_vectorN[irq]*0x20);
+	else
+		return 0;
+}
+#endif
+
+void __init init_IRQ(void)
+{
+        unsigned long long __dummy0, __dummy1=~0x00000000100000f0;
+	unsigned long reg;
+	unsigned long data;
+	int i;
+
+	intc_virt = onchip_remap(INTC_BASE, 1024, "INTC");
+	if (!intc_virt) {
+		panic("Unable to remap INTC\n");
+	}
+
+
+	/* Set default: per-line enable/disable, priority driven ack/eoi */
+	for (i = 0; i < NR_INTC_IRQS; i++) {
+		if (platform_int_priority[i] != NO_PRIORITY) {
+			irq_desc[i].handler = &intc_irq_type;
+		}
+	}
+
+
+	/* Disable all interrupts and set all priorities to 0 to avoid trouble */
+	ctrl_outl(-1, INTC_INTDSB_0);
+	ctrl_outl(-1, INTC_INTDSB_1);
+
+	for (reg = INTC_INTPRI_0, i = 0; i < INTC_INTPRI_PREGS; i++, reg += 8)
+		ctrl_outl( NO_PRIORITY, reg);
+
+
+	/* Set IRLM */
+	/* If all the priorities are set to 'no priority', then
+	 * assume we are using encoded mode.
+	 */
+	irlm = platform_int_priority[IRQ_IRL0] + platform_int_priority[IRQ_IRL1] + \
+		platform_int_priority[IRQ_IRL2] + platform_int_priority[IRQ_IRL3];
+
+	if (irlm == NO_PRIORITY) {
+		/* IRLM = 0 */
+		reg = INTC_ICR_CLEAR;
+		i = IRQ_INTA;
+		printk("Trying to use encoded IRL0-3. IRLs unsupported.\n");
+	} else {
+		/* IRLM = 1 */
+		reg = INTC_ICR_SET;
+		i = IRQ_IRL0;
+	}
+	ctrl_outl(INTC_ICR_IRLM, reg);
+
+	/* Set interrupt priorities according to platform description */
+	for (data = 0, reg = INTC_INTPRI_0; i < NR_INTC_IRQS; i++) {
+		data |= platform_int_priority[i] << ((i % INTC_INTPRI_PPREG) * 4);
+		if ((i % INTC_INTPRI_PPREG) == (INTC_INTPRI_PPREG - 1)) {
+			/* Upon the 7th, set Priority Register */
+			ctrl_outl(data, reg);
+			data = 0;
+			reg += 8;
+		}
+	}
+
+#ifdef CONFIG_SH_CAYMAN
+	{
+		extern void init_cayman_irq(void);
+
+		init_cayman_irq();
+	}
+#endif
+
+	/*
+	 * And now let interrupts come in.
+	 * sti() is not enough, we need to
+	 * lower priority, too.
+	 */
+        __asm__ __volatile__("getcon    " __SR ", %0\n\t"
+                             "and       %0, %1, %0\n\t"
+                             "putcon    %0, " __SR "\n\t"
+                             : "=&r" (__dummy0)
+                             : "r" (__dummy1));
+}
--- diff/arch/sh64/kernel/led.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/led.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,41 @@
+/*
+ * arch/sh64/kernel/led.c
+ *
+ * Copyright (C) 2002 Stuart Menefy <stuart.menefy@st.com>
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * Flash the LEDs
+ */
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/sched.h>
+
+void mach_led(int pos, int val);
+
+/* acts like an actual heart beat -- ie thump-thump-pause... */
+void heartbeat(void)
+{
+	static unsigned int cnt = 0, period = 0, dist = 0;
+
+	if (cnt == 0 || cnt == dist) {
+		mach_led(-1, 1);
+	} else if (cnt == 7 || cnt == dist + 7) {
+		mach_led(-1, 0);
+	}
+
+	if (++cnt > period) {
+		cnt = 0;
+
+		/*
+		 * The hyperbolic function below modifies the heartbeat period
+		 * length in dependency of the current (5min) load. It goes
+		 * through the points f(0)=126, f(1)=86, f(5)=51, f(inf)->30.
+		 */
+		period = ((672 << FSHIFT) / (5 * avenrun[0] +
+					    (7 << FSHIFT))) + 30;
+		dist = period / 4;
+	}
+}
+
--- diff/arch/sh64/kernel/pci-dma.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/pci-dma.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2001 David J. Mckay (david.mckay@st.com)
+ * Copyright (C) 2003 Paul Mundt (lethal@linux-sh.org)
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * Dynamic DMA mapping support.
+ */
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <linux/string.h>
+#include <linux/pci.h>
+#include <asm/io.h>
+
+void *consistent_alloc(struct pci_dev *hwdev, size_t size,
+			   dma_addr_t *dma_handle)
+{
+	void *ret;
+	int gfp = GFP_ATOMIC;
+        void *vp;
+
+	if (hwdev == NULL || hwdev->dma_mask != 0xffffffff)
+		gfp |= GFP_DMA;
+
+	ret = (void *)__get_free_pages(gfp, get_order(size));
+
+	/* now call our friend ioremap_nocache to give us an uncached area */
+        vp = ioremap_nocache(virt_to_phys(ret), size);
+
+	if (vp != NULL) {
+		memset(vp, 0, size);
+		*dma_handle = virt_to_bus(ret);
+		dma_cache_wback_inv((unsigned long)ret, size);
+	}
+
+	return vp;
+}
+
+void consistent_free(struct pci_dev *hwdev, size_t size,
+			 void *vaddr, dma_addr_t dma_handle)
+{
+	void *alloc;
+
+	alloc = bus_to_virt((unsigned long)dma_handle);
+	free_pages((unsigned long)alloc, get_order(size));
+
+	iounmap(vaddr);
+}
+
--- diff/arch/sh64/kernel/pci_sh5.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/pci_sh5.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,546 @@
+/*
+ * Copyright (C) 2001 David J. Mckay (david.mckay@st.com)
+ * Copyright (C) 2003, 2004 Paul Mundt
+ * Copyright (C) 2004 Richard Curnow
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * Support functions for the SH5 PCI hardware.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/rwsem.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/pci.h>
+#include <linux/delay.h>
+#include <linux/types.h>
+#include <asm/pci.h>
+#include <linux/irq.h>
+
+#include <asm/io.h>
+#include <asm/hardware.h>
+#include "pci_sh5.h"
+
+static unsigned long pcicr_virt;
+unsigned long pciio_virt;
+
+static void __init pci_fixup_ide_bases(struct pci_dev *d)
+{
+	int i;
+
+	/*
+	 * PCI IDE controllers use non-standard I/O port decoding, respect it.
+	 */
+	if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE)
+		return;
+	printk("PCI: IDE base address fixup for %s\n", d->slot_name);
+	for(i=0; i<4; i++) {
+		struct resource *r = &d->resource[i];
+		if ((r->start & ~0x80) == 0x374) {
+			r->start |= 2;
+			r->end = r->start;
+		}
+	}
+}
+
+/* Add future fixups here... */
+struct pci_fixup pcibios_fixups[] = {
+	{ PCI_FIXUP_HEADER,	PCI_ANY_ID,	PCI_ANY_ID,	pci_fixup_ide_bases },
+	{ 0 }
+};
+
+char * __init pcibios_setup(char *str)
+{
+	return str;
+}
+
+/* Rounds a number UP to the nearest power of two. Used for
+ * sizing the PCI window.
+ */
+static u32 __init r2p2(u32 num)
+{
+	int i = 31;
+	u32 tmp = num;
+
+	if (num == 0)
+		return 0;
+
+	do {
+		if (tmp & (1 << 31))
+			break;
+		i--;
+		tmp <<= 1;
+	} while (i >= 0);
+
+	tmp = 1 << i;
+	/* If the original number isn't a power of 2, round it up */
+	if (tmp != num)
+		tmp <<= 1;
+
+	return tmp;
+}
+
+extern unsigned long long memory_start, memory_end;
+
+int __init sh5pci_init(unsigned memStart, unsigned memSize)
+{
+	u32 lsr0;
+	u32 uval;
+
+	pcicr_virt = onchip_remap(SH5PCI_ICR_BASE, 1024, "PCICR");
+	if (!pcicr_virt) {
+		panic("Unable to remap PCICR\n");
+	}
+
+	pciio_virt = onchip_remap(SH5PCI_IO_BASE, 0x10000, "PCIIO");
+	if (!pciio_virt) {
+		panic("Unable to remap PCIIO\n");
+	}
+
+	pr_debug("Register base addres is 0x%08lx\n", pcicr_virt);
+
+	/* Clear snoop registers */
+        SH5PCI_WRITE(CSCR0, 0);
+        SH5PCI_WRITE(CSCR1, 0);
+
+	pr_debug("Wrote to reg\n");
+
+        /* Switch off interrupts */
+        SH5PCI_WRITE(INTM,  0);
+        SH5PCI_WRITE(AINTM, 0);
+        SH5PCI_WRITE(PINTM, 0);
+
+        /* Set bus active, take it out of reset */
+        uval = SH5PCI_READ(CR);
+
+	/* Set command Register */
+        SH5PCI_WRITE(CR, uval | CR_LOCK_MASK | CR_CFINT| CR_FTO | CR_PFE | CR_PFCS | CR_BMAM);
+
+	uval=SH5PCI_READ(CR);
+        pr_debug("CR is actually 0x%08x\n",uval);
+
+        /* Allow it to be a master */
+	/* NB - WE DISABLE I/O ACCESS to stop overlap */
+        /* set WAIT bit to enable stepping, an attempt to improve stability */
+	SH5PCI_WRITE_SHORT(CSR_CMD,
+			    PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_WAIT);
+
+        /*
+        ** Set translation mapping memory in order to convert the address
+        ** used for the main bus, to the PCI internal address.
+        */
+        SH5PCI_WRITE(MBR,0x40000000);
+
+        /* Always set the max size 512M */
+        SH5PCI_WRITE(MBMR, PCISH5_MEM_SIZCONV(512*1024*1024));
+
+        /*
+        ** I/O addresses are mapped at internal PCI specific address
+        ** as is described into the configuration bridge table.
+        ** These are changed to 0, to allow cards that have legacy
+        ** io such as vga to function correctly. We set the SH5 IOBAR to
+        ** 256K, which is a bit big as we can only have 64K of address space
+        */
+
+        SH5PCI_WRITE(IOBR,0x0);
+
+	pr_debug("PCI:Writing 0x%08x to IOBR\n",0);
+
+        /* Set up a 256K window. Totally pointless waste  of address space */
+        SH5PCI_WRITE(IOBMR,0);
+	pr_debug("PCI:Writing 0x%08x to IOBMR\n",0);
+
+	/* The SH5 has a HUGE 256K I/O region, which breaks the PCI spec. Ideally,
+         * we would want to map the I/O region somewhere, but it is so big this is not
+         * that easy!
+         */
+	SH5PCI_WRITE(CSR_IBAR0,~0);
+	/* Set memory size value */
+        memSize = memory_end - memory_start;
+
+        /* Now we set up the mbars so the PCI bus can see the memory of the machine */
+        if (memSize < (1024 * 1024)) {
+                printk(KERN_ERR "PCISH5: Ridiculous memory size of 0x%x?\n", memSize);
+                return -EINVAL;
+        }
+
+        /* Set LSR 0 */
+        lsr0 = (memSize > (512 * 1024 * 1024)) ? 0x1ff00001 : ((r2p2(memSize) - 0x100000) | 0x1);
+        SH5PCI_WRITE(LSR0, lsr0);
+
+	pr_debug("PCI:Writing 0x%08x to LSR0\n",lsr0);
+
+        /* Set MBAR 0 */
+        SH5PCI_WRITE(CSR_MBAR0, memory_start);
+        SH5PCI_WRITE(LAR0, memory_start);
+
+        SH5PCI_WRITE(CSR_MBAR1,0);
+        SH5PCI_WRITE(LAR1,0);
+        SH5PCI_WRITE(LSR1,0);
+
+	pr_debug("PCI:Writing 0x%08llx to CSR_MBAR0\n",memory_start);
+	pr_debug("PCI:Writing 0x%08llx to LAR0\n",memory_start);
+
+        /* Enable the PCI interrupts on the device */
+        SH5PCI_WRITE(INTM,  ~0);
+        SH5PCI_WRITE(AINTM, ~0);
+        SH5PCI_WRITE(PINTM, ~0);
+
+	pr_debug("Switching on all error interrupts\n");
+
+        return(0);
+}
+
+static int sh5pci_read(struct pci_bus *bus, unsigned int devfn, int where,
+			int size, u32 *val)
+{
+	SH5PCI_WRITE(PAR, CONFIG_CMD(bus, devfn, where));
+
+	switch (size) {
+		case 1:
+			*val = (u8)SH5PCI_READ_BYTE(PDR + (where & 3));
+			break;
+		case 2:
+			*val = (u16)SH5PCI_READ_SHORT(PDR + (where & 2));
+			break;
+		case 4:
+			*val = SH5PCI_READ(PDR);
+			break;
+	}
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static int sh5pci_write(struct pci_bus *bus, unsigned int devfn, int where,
+			 int size, u32 val)
+{
+	SH5PCI_WRITE(PAR, CONFIG_CMD(bus, devfn, where));
+
+	switch (size) {
+		case 1:
+			SH5PCI_WRITE_BYTE(PDR + (where & 3), (u8)val);
+			break;
+		case 2:
+			SH5PCI_WRITE_SHORT(PDR + (where & 2), (u16)val);
+			break;
+		case 4:
+			SH5PCI_WRITE(PDR, val);
+			break;
+	}
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static struct pci_ops pci_config_ops = {
+	.read =		sh5pci_read,
+	.write =	sh5pci_write,
+};
+
+/* Everything hangs off this */
+static struct pci_bus *pci_root_bus;
+
+
+static u8 __init no_swizzle(struct pci_dev *dev, u8 * pin)
+{
+	pr_debug("swizzle for dev %d on bus %d slot %d pin is %d\n",
+	         dev->devfn,dev->bus->number, PCI_SLOT(dev->devfn),*pin);
+	return PCI_SLOT(dev->devfn);
+}
+
+static inline u8 bridge_swizzle(u8 pin, u8 slot)
+{
+	return (((pin-1) + slot) % 4) + 1;
+}
+
+u8 __init common_swizzle(struct pci_dev *dev, u8 *pinp)
+{
+	if (dev->bus->number != 0) {
+		u8 pin = *pinp;
+		do {
+			pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
+			/* Move up the chain of bridges. */
+			dev = dev->bus->self;
+		} while (dev->bus->self);
+		*pinp = pin;
+
+		/* The slot is the slot of the last bridge. */
+	}
+
+	return PCI_SLOT(dev->devfn);
+}
+
+/* This needs to be shunted out of here into the board specific bit */
+
+static int __init map_cayman_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+	int result = -1;
+
+	/* The complication here is that the PCI IRQ lines from the Cayman's 2
+	   5V slots get into the CPU via a different path from the IRQ lines
+	   from the 3 3.3V slots.  Thus, we have to detect whether the card's
+	   interrupts go via the 5V or 3.3V path, i.e. the 'bridge swizzling'
+	   at the point where we cross from 5V to 3.3V is not the normal case.
+
+	   The added complication is that we don't know that the 5V slots are
+	   always bus 2, because a card containing a PCI-PCI bridge may be
+	   plugged into a 3.3V slot, and this changes the bus numbering.
+
+	   Also, the Cayman has an intermediate PCI bus that goes a custom
+	   expansion board header (and to the secondary bridge).  This bus has
+	   never been used in practice.
+
+	   The 1ary onboard PCI-PCI bridge is device 3 on bus 0
+	   The 2ary onboard PCI-PCI bridge is device 0 on the 2ary bus of the 1ary bridge.
+	   */
+
+	struct slot_pin {
+		int slot;
+		int pin;
+	} path[4];
+	int i=0;
+
+	while (dev->bus->number > 0) {
+
+		slot = path[i].slot = PCI_SLOT(dev->devfn);
+		pin = path[i].pin = bridge_swizzle(pin, slot);
+		dev = dev->bus->self;
+		i++;
+		if (i > 3) panic("PCI path to root bus too long!\n");
+	}
+
+	slot = PCI_SLOT(dev->devfn);
+	/* This is the slot on bus 0 through which the device is eventually
+	   reachable. */
+
+	/* Now work back up. */
+	if ((slot < 3) || (i == 0)) {
+		/* Bus 0 (incl. PCI-PCI bridge itself) : perform the final
+		   swizzle now. */
+		result = IRQ_INTA + bridge_swizzle(pin, slot) - 1;
+	} else {
+		i--;
+		slot = path[i].slot;
+		pin  = path[i].pin;
+		if (slot > 0) {
+			panic("PCI expansion bus device found - not handled!\n");
+		} else {
+			if (i > 0) {
+				/* 5V slots */
+				i--;
+				slot = path[i].slot;
+				pin  = path[i].pin;
+				/* 'pin' was swizzled earlier wrt slot, don't do it again. */
+				result = IRQ_P2INTA + (pin - 1);
+			} else {
+				/* IRQ for 2ary PCI-PCI bridge : unused */
+				result = -1;
+			}
+		}
+	}
+
+	return result;
+}
+
+irqreturn_t pcish5_err_irq(int irq, void *dev_id, struct pt_regs *regs)
+{
+	unsigned pci_int, pci_air, pci_cir, pci_aint;
+
+	pci_int = SH5PCI_READ(INT);
+	pci_cir = SH5PCI_READ(CIR);
+	pci_air = SH5PCI_READ(AIR);
+
+	if (pci_int) {
+		printk("PCI INTERRUPT (at %08llx)!\n", regs->pc);
+		printk("PCI INT -> 0x%x\n", pci_int & 0xffff);
+		printk("PCI AIR -> 0x%x\n", pci_air);
+		printk("PCI CIR -> 0x%x\n", pci_cir);
+		SH5PCI_WRITE(INT, ~0);
+	}
+
+	pci_aint = SH5PCI_READ(AINT);
+	if (pci_aint) {
+		printk("PCI ARB INTERRUPT!\n");
+		printk("PCI AINT -> 0x%x\n", pci_aint);
+		printk("PCI AIR -> 0x%x\n", pci_air);
+		printk("PCI CIR -> 0x%x\n", pci_cir);
+		SH5PCI_WRITE(AINT, ~0);
+	}
+
+	return IRQ_HANDLED;
+}
+
+irqreturn_t pcish5_serr_irq(int irq, void *dev_id, struct pt_regs *regs)
+{
+	printk("SERR IRQ\n");
+
+	return IRQ_NONE;
+}
+
+#define ROUND_UP(x, a)		(((x) + (a) - 1) & ~((a) - 1))
+
+static void __init
+pcibios_size_bridge(struct pci_bus *bus, struct resource *ior,
+		    struct resource *memr)
+{
+	struct resource io_res, mem_res;
+	struct pci_dev *dev;
+	struct pci_dev *bridge = bus->self;
+	struct list_head *ln;
+
+	if (!bridge)
+		return;	/* host bridge, nothing to do */
+
+	/* set reasonable default locations for pcibios_align_resource */
+	io_res.start = PCIBIOS_MIN_IO;
+	mem_res.start = PCIBIOS_MIN_MEM;
+
+	io_res.end = io_res.start;
+	mem_res.end = mem_res.start;
+
+	/* Collect information about how our direct children are layed out. */
+	for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) {
+		int i;
+		dev = pci_dev_b(ln);
+
+		/* Skip bridges for now */
+		if (dev->class >> 8 == PCI_CLASS_BRIDGE_PCI)
+			continue;
+
+		for (i = 0; i < PCI_NUM_RESOURCES; i++) {
+			struct resource res;
+			unsigned long size;
+
+			memcpy(&res, &dev->resource[i], sizeof(res));
+			size = res.end - res.start + 1;
+
+			if (res.flags & IORESOURCE_IO) {
+				res.start = io_res.end;
+				pcibios_align_resource(dev, &res, size, 0);
+				io_res.end = res.start + size;
+			} else if (res.flags & IORESOURCE_MEM) {
+				res.start = mem_res.end;
+				pcibios_align_resource(dev, &res, size, 0);
+				mem_res.end = res.start + size;
+			}
+		}
+	}
+
+	/* And for all of the subordinate busses. */
+	for (ln=bus->children.next; ln != &bus->children; ln=ln->next)
+		pcibios_size_bridge(pci_bus_b(ln), &io_res, &mem_res);
+
+	/* turn the ending locations into sizes (subtract start) */
+	io_res.end -= io_res.start;
+	mem_res.end -= mem_res.start;
+
+	/* Align the sizes up by bridge rules */
+	io_res.end = ROUND_UP(io_res.end, 4*1024) - 1;
+	mem_res.end = ROUND_UP(mem_res.end, 1*1024*1024) - 1;
+
+	/* Adjust the bridge's allocation requirements */
+	bridge->resource[0].end = bridge->resource[0].start + io_res.end;
+	bridge->resource[1].end = bridge->resource[1].start + mem_res.end;
+
+	bridge->resource[PCI_BRIDGE_RESOURCES].end =
+	    bridge->resource[PCI_BRIDGE_RESOURCES].start + io_res.end;
+	bridge->resource[PCI_BRIDGE_RESOURCES+1].end =
+	    bridge->resource[PCI_BRIDGE_RESOURCES+1].start + mem_res.end;
+
+	/* adjust parent's resource requirements */
+	if (ior) {
+		ior->end = ROUND_UP(ior->end, 4*1024);
+		ior->end += io_res.end;
+	}
+
+	if (memr) {
+		memr->end = ROUND_UP(memr->end, 1*1024*1024);
+		memr->end += mem_res.end;
+	}
+}
+
+#undef ROUND_UP
+
+static void __init pcibios_size_bridges(void)
+{
+	struct resource io_res, mem_res;
+
+	memset(&io_res, 0, sizeof(io_res));
+	memset(&mem_res, 0, sizeof(mem_res));
+
+	pcibios_size_bridge(pci_root_bus, &io_res, &mem_res);
+}
+
+static int __init pcibios_init(void)
+{
+        if (request_irq(IRQ_ERR, pcish5_err_irq,
+                        SA_INTERRUPT, "PCI Error",NULL) < 0) {
+                printk(KERN_ERR "PCISH5: Cannot hook PCI_PERR interrupt\n");
+                return -EINVAL;
+        }
+
+        if (request_irq(IRQ_SERR, pcish5_serr_irq,
+                        SA_INTERRUPT, "PCI SERR interrupt", NULL) < 0) {
+                printk(KERN_ERR "PCISH5: Cannot hook PCI_SERR interrupt\n");
+                return -EINVAL;
+        }
+
+	/* The pci subsytem needs to know where memory is and how much
+	 * of it there is. I've simply made these globals. A better mechanism
+	 * is probably needed.
+	 */
+	sh5pci_init(__pa(memory_start),
+		     __pa(memory_end) - __pa(memory_start));
+
+	pci_root_bus = pci_scan_bus(0, &pci_config_ops, NULL);
+	pcibios_size_bridges();
+	pci_assign_unassigned_resources();
+	pci_fixup_irqs(no_swizzle, map_cayman_irq);
+
+	return 0;
+}
+
+subsys_initcall(pcibios_init);
+
+void __init pcibios_fixup_bus(struct pci_bus *bus)
+{
+	struct pci_dev *dev = bus->self;
+	int i;
+
+#if 1
+	if(dev) {
+		for(i=0; i<3; i++) {
+			bus->resource[i] =
+				&dev->resource[PCI_BRIDGE_RESOURCES+i];
+			bus->resource[i]->name = bus->name;
+		}
+		bus->resource[0]->flags |= IORESOURCE_IO;
+		bus->resource[1]->flags |= IORESOURCE_MEM;
+
+		/* For now, propogate host limits to the bus;
+		 * we'll adjust them later. */
+
+#if 1
+		bus->resource[0]->end = 64*1024 - 1 ;
+		bus->resource[1]->end = PCIBIOS_MIN_MEM+(256*1024*1024)-1;
+		bus->resource[0]->start = PCIBIOS_MIN_IO;
+		bus->resource[1]->start = PCIBIOS_MIN_MEM;
+#else
+		bus->resource[0]->end = 0
+		bus->resource[1]->end = 0
+		bus->resource[0]->start =0
+		  bus->resource[1]->start = 0;
+#endif
+		/* Turn off downstream PF memory address range by default */
+		bus->resource[2]->start = 1024*1024;
+		bus->resource[2]->end = bus->resource[2]->start - 1;
+	}
+#endif
+
+}
+
--- diff/arch/sh64/kernel/pci_sh5.h	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/pci_sh5.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2001 David J. Mckay (david.mckay@st.com)
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * Defintions for the SH5 PCI hardware.
+ */
+
+/* Product ID */
+#define PCISH5_PID		0x350d
+
+/* vendor ID */
+#define PCISH5_VID		0x1054
+
+/* Configuration types */
+#define ST_TYPE0                0x00    /* Configuration cycle type 0 */
+#define ST_TYPE1                0x01    /* Configuration cycle type 1 */
+
+/* VCR data */
+#define PCISH5_VCR_STATUS      0x00
+#define PCISH5_VCR_VERSION     0x08
+
+/*
+** ICR register offsets and bits
+*/
+#define PCISH5_ICR_CR          0x100   /* PCI control register values */
+#define CR_PBAM                 (1<<12)
+#define CR_PFCS                 (1<<11)
+#define CR_FTO                  (1<<10)
+#define CR_PFE                  (1<<9)
+#define CR_TBS                  (1<<8)
+#define CR_SPUE                 (1<<7)
+#define CR_BMAM                 (1<<6)
+#define CR_HOST                 (1<<5)
+#define CR_CLKEN                (1<<4)
+#define CR_SOCS                 (1<<3)
+#define CR_IOCS                 (1<<2)
+#define CR_RSTCTL               (1<<1)
+#define CR_CFINT                (1<<0)
+#define CR_LOCK_MASK            0xa5000000
+
+#define PCISH5_ICR_INT         0x114   /* Interrupt registert values     */
+#define INT_MADIM               (1<<2)
+
+#define PCISH5_ICR_LSR0        0X104   /* Local space register values    */
+#define PCISH5_ICR_LSR1        0X108   /* Local space register values    */
+#define PCISH5_ICR_LAR0        0x10c   /* Local address register values  */
+#define PCISH5_ICR_LAR1        0x110   /* Local address register values  */
+#define PCISH5_ICR_INTM        0x118   /* Interrupt mask register values                         */
+#define PCISH5_ICR_AIR         0x11c   /* Interrupt error address information register values    */
+#define PCISH5_ICR_CIR         0x120   /* Interrupt error command information register values    */
+#define PCISH5_ICR_AINT        0x130   /* Interrupt error arbiter interrupt register values      */
+#define PCISH5_ICR_AINTM       0x134   /* Interrupt error arbiter interrupt mask register values */
+#define PCISH5_ICR_BMIR        0x138   /* Interrupt error info register of bus master values     */
+#define PCISH5_ICR_PAR         0x1c0   /* Pio address register values                            */
+#define PCISH5_ICR_MBR         0x1c4   /* Memory space bank register values                      */
+#define PCISH5_ICR_IOBR        0x1c8   /* I/O space bank register values                         */
+#define PCISH5_ICR_PINT        0x1cc   /* power management interrupt register values             */
+#define PCISH5_ICR_PINTM       0x1d0   /* power management interrupt mask register values        */
+#define PCISH5_ICR_MBMR        0x1d8   /* memory space bank mask register values                 */
+#define PCISH5_ICR_IOBMR       0x1dc   /* I/O space bank mask register values                    */
+#define PCISH5_ICR_CSCR0       0x210   /* PCI cache snoop control register 0                     */
+#define PCISH5_ICR_CSCR1       0x214   /* PCI cache snoop control register 1                     */
+#define PCISH5_ICR_PDR         0x220   /* Pio data register values                               */
+
+/* These are configs space registers */
+#define PCISH5_ICR_CSR_VID     0x000	/* Vendor id                           */
+#define PCISH5_ICR_CSR_DID     0x002   /* Device id                           */
+#define PCISH5_ICR_CSR_CMD     0x004   /* Command register                    */
+#define PCISH5_ICR_CSR_STATUS  0x006   /* Stautus                             */
+#define PCISH5_ICR_CSR_IBAR0   0x010   /* I/O base address register           */
+#define PCISH5_ICR_CSR_MBAR0   0x014   /* First  Memory base address register */
+#define PCISH5_ICR_CSR_MBAR1   0x018   /* Second Memory base address register */
+
+
+
+/* Base address of registers */
+#define SH5PCI_ICR_BASE (PHYS_PCI_BLOCK + 0x00040000)
+#define SH5PCI_IO_BASE  (PHYS_PCI_BLOCK + 0x00800000)
+/* #define SH5PCI_VCR_BASE (P2SEG_PCICB_BLOCK + P2SEG)    */
+
+/* Register selection macro */
+#define PCISH5_ICR_REG(x)                ( pcicr_virt + (PCISH5_ICR_##x))
+/* #define PCISH5_VCR_REG(x)                ( SH5PCI_VCR_BASE (PCISH5_VCR_##x)) */
+
+/* Write I/O functions */
+#define SH5PCI_WRITE(reg,val)        ctrl_outl((u32)(val),PCISH5_ICR_REG(reg))
+#define SH5PCI_WRITE_SHORT(reg,val)  ctrl_outw((u16)(val),PCISH5_ICR_REG(reg))
+#define SH5PCI_WRITE_BYTE(reg,val)   ctrl_outb((u8)(val),PCISH5_ICR_REG(reg))
+
+/* Read I/O functions */
+#define SH5PCI_READ(reg)             ctrl_inl(PCISH5_ICR_REG(reg))
+#define SH5PCI_READ_SHORT(reg)       ctrl_inw(PCISH5_ICR_REG(reg))
+#define SH5PCI_READ_BYTE(reg)        ctrl_inb(PCISH5_ICR_REG(reg))
+
+/* Set PCI config bits */
+#define SET_CONFIG_BITS(bus,devfn,where)  ((((bus) << 16) | ((devfn) << 8) | ((where) & ~3)) | 0x80000000)
+
+/* Set PCI command register */
+#define CONFIG_CMD(bus, devfn, where)            SET_CONFIG_BITS(bus->number,devfn,where)
+
+/* Size converters */
+#define PCISH5_MEM_SIZCONV(x)		  (((x / 0x40000) - 1) << 18)
+#define PCISH5_IO_SIZCONV(x)		  (((x / 0x40000) - 1) << 18)
+
+
--- diff/arch/sh64/kernel/pcibios.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/pcibios.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,168 @@
+/*
+ * $Id: pcibios.c,v 1.1 2001/08/24 12:38:19 dwmw2 Exp $
+ *
+ * arch/sh/kernel/pcibios.c
+ *
+ * Copyright (C) 2002 STMicroelectronics Limited
+ *   Author : David J. McKay
+ *
+ * Copyright (C) 2004 Richard Curnow, SuperH UK Limited
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ * This is GPL'd.
+ *
+ * Provided here are generic versions of:
+ *	pcibios_update_resource()
+ *	pcibios_align_resource()
+ *	pcibios_enable_device()
+ *	pcibios_set_master()
+ *	pcibios_update_irq()
+ *
+ * These functions are collected here to reduce duplication of common
+ * code amongst the many platform-specific PCI support code files.
+ *
+ * Platform-specific files are expected to provide:
+ *	pcibios_fixup_bus()
+ *	pcibios_init()
+ *	pcibios_setup()
+ *	pcibios_fixup_pbus_ranges()
+ */
+
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+
+void
+pcibios_update_resource(struct pci_dev *dev, struct resource *root,
+			struct resource *res, int resource)
+{
+	u32 new, check;
+	int reg;
+
+	new = res->start | (res->flags & PCI_REGION_FLAG_MASK);
+	if (resource < 6) {
+		reg = PCI_BASE_ADDRESS_0 + 4*resource;
+	} else if (resource == PCI_ROM_RESOURCE) {
+		res->flags |= PCI_ROM_ADDRESS_ENABLE;
+		new |= PCI_ROM_ADDRESS_ENABLE;
+		reg = dev->rom_base_reg;
+	} else {
+		/* Somebody might have asked allocation of a non-standard resource */
+		return;
+	}
+
+	pci_write_config_dword(dev, reg, new);
+	pci_read_config_dword(dev, reg, &check);
+	if ((new ^ check) & ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) {
+		printk(KERN_ERR "PCI: Error while updating region "
+		       "%s/%d (%08x != %08x)\n", dev->slot_name, resource,
+		       new, check);
+	}
+}
+
+/*
+ * We need to avoid collisions with `mirrored' VGA ports
+ * and other strange ISA hardware, so we always want the
+ * addresses to be allocated in the 0x000-0x0ff region
+ * modulo 0x400.
+ */
+void pcibios_align_resource(void *data, struct resource *res,
+			    unsigned long size, unsigned long align)
+{
+	if (res->flags & IORESOURCE_IO) {
+		unsigned long start = res->start;
+
+		if (start & 0x300) {
+			start = (start + 0x3ff) & ~0x3ff;
+			res->start = start;
+		}
+	}
+}
+
+static void pcibios_enable_bridge(struct pci_dev *dev)
+{
+	struct pci_bus *bus = dev->subordinate;
+	u16 cmd, old_cmd;
+
+	pci_read_config_word(dev, PCI_COMMAND, &cmd);
+	old_cmd = cmd;
+
+	if (bus->resource[0]->flags & IORESOURCE_IO) {
+		cmd |= PCI_COMMAND_IO;
+	}
+	if ((bus->resource[1]->flags & IORESOURCE_MEM) ||
+	    (bus->resource[2]->flags & IORESOURCE_PREFETCH)) {
+		cmd |= PCI_COMMAND_MEMORY;
+	}
+
+	if (cmd != old_cmd) {
+		pci_write_config_word(dev, PCI_COMMAND, cmd);
+	}
+
+	printk("PCI bridge %s, command register -> %04x\n",
+		pci_name(dev), cmd);
+
+}
+
+
+
+int pcibios_enable_device(struct pci_dev *dev, int mask)
+{
+	u16 cmd, old_cmd;
+	int idx;
+	struct resource *r;
+
+	if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
+		pcibios_enable_bridge(dev);
+	}
+
+	pci_read_config_word(dev, PCI_COMMAND, &cmd);
+	old_cmd = cmd;
+	for(idx=0; idx<6; idx++) {
+		if (!(mask & (1 << idx)))
+			continue;
+		r = &dev->resource[idx];
+		if (!r->start && r->end) {
+			printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name);
+			return -EINVAL;
+		}
+		if (r->flags & IORESOURCE_IO)
+			cmd |= PCI_COMMAND_IO;
+		if (r->flags & IORESOURCE_MEM)
+			cmd |= PCI_COMMAND_MEMORY;
+	}
+	if (dev->resource[PCI_ROM_RESOURCE].start)
+		cmd |= PCI_COMMAND_MEMORY;
+	if (cmd != old_cmd) {
+		printk(KERN_INFO "PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
+		pci_write_config_word(dev, PCI_COMMAND, cmd);
+	}
+	return 0;
+}
+
+/*
+ *  If we set up a device for bus mastering, we need to check and set
+ *  the latency timer as it may not be properly set.
+ */
+unsigned int pcibios_max_latency = 255;
+
+void pcibios_set_master(struct pci_dev *dev)
+{
+	u8 lat;
+	pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
+	if (lat < 16)
+		lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency;
+	else if (lat > pcibios_max_latency)
+		lat = pcibios_max_latency;
+	else
+		return;
+	printk(KERN_INFO "PCI: Setting latency timer of device %s to %d\n", pci_name(dev), lat);
+	pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
+}
+
+void __init pcibios_update_irq(struct pci_dev *dev, int irq)
+{
+	pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
+}
--- diff/arch/sh64/kernel/process.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/process.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,963 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/process.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ * Copyright (C) 2003, 2004 Richard Curnow
+ *
+ * Started from SH3/4 version:
+ *   Copyright (C) 1999, 2000  Niibe Yutaka & Kaz Kojima
+ *
+ *   In turn started from i386 version:
+ *     Copyright (C) 1995  Linus Torvalds
+ *
+ */
+
+/*
+ * This file handles the architecture-dependent parts of process handling..
+ */
+
+/* Temporary flags/tests. All to be removed/undefined. BEGIN */
+#define IDLE_TRACE
+#define VM_SHOW_TABLES
+#define VM_TEST_FAULT
+#define VM_TEST_RTLBMISS
+#define VM_TEST_WTLBMISS
+
+#undef VM_SHOW_TABLES
+#undef IDLE_TRACE
+/* Temporary flags/tests. All to be removed/undefined. END */
+
+#define __KERNEL_SYSCALLS__
+#include <stdarg.h>
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/rwsem.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/ptrace.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/user.h>
+#include <linux/a.out.h>
+#include <linux/interrupt.h>
+#include <linux/unistd.h>
+#include <linux/delay.h>
+#include <linux/reboot.h>
+#include <linux/init.h>
+
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/processor.h>		/* includes also <asm/registers.h> */
+#include <asm/mmu_context.h>
+#include <asm/elf.h>
+#include <asm/page.h>
+
+#include <linux/irq.h>
+
+struct task_struct *last_task_used_math = NULL;
+
+#ifdef IDLE_TRACE
+#ifdef VM_SHOW_TABLES
+/* For testing */
+static void print_PTE(long base)
+{
+	int i, skip=0;
+	long long x, y, *p = (long long *) base;
+
+	for (i=0; i< 512; i++, p++){
+		if (*p == 0) {
+			if (!skip) {
+				skip++;
+				printk("(0s) ");
+			}
+		} else {
+			skip=0;
+			x = (*p) >> 32;
+			y = (*p) & 0xffffffff;
+			printk("%08Lx%08Lx ", x, y);
+			if (!((i+1)&0x3)) printk("\n");
+		}
+	}
+}
+
+/* For testing */
+static void print_DIR(long base)
+{
+	int i, skip=0;
+	long *p = (long *) base;
+
+	for (i=0; i< 512; i++, p++){
+		if (*p == 0) {
+			if (!skip) {
+				skip++;
+				printk("(0s) ");
+			}
+		} else {
+			skip=0;
+			printk("%08lx ", *p);
+			if (!((i+1)&0x7)) printk("\n");
+		}
+	}
+}
+
+/* For testing */
+static void print_vmalloc_first_tables(void)
+{
+
+#define PRESENT	0x800	/* Bit 11 */
+
+	/*
+	 * Do it really dirty by looking at raw addresses,
+         * raw offsets, no types. If we used pgtable/pgalloc
+	 * macros/definitions we could hide potential bugs.
+	 *
+	 * Note that pointers are 32-bit for CDC.
+	 */
+	long pgdt, pmdt, ptet;
+
+	pgdt = (long) &swapper_pg_dir;
+	printk("-->PGD (0x%08lx):\n", pgdt);
+	print_DIR(pgdt);
+	printk("\n");
+
+	/* VMALLOC pool is mapped at 0xc0000000, second (pointer) entry in PGD */
+	pgdt += 4;
+	pmdt = (long) (* (long *) pgdt);
+	if (!(pmdt & PRESENT)) {
+		printk("No PMD\n");
+		return;
+	} else pmdt &= 0xfffff000;
+
+	printk("-->PMD (0x%08lx):\n", pmdt);
+	print_DIR(pmdt);
+	printk("\n");
+
+	/* Get the pmdt displacement for 0xc0000000 */
+	pmdt += 2048;
+
+	/* just look at first two address ranges ... */
+        /* ... 0xc0000000 ... */
+	ptet = (long) (* (long *) pmdt);
+	if (!(ptet & PRESENT)) {
+		printk("No PTE0\n");
+		return;
+	} else ptet &= 0xfffff000;
+
+	printk("-->PTE0 (0x%08lx):\n", ptet);
+	print_PTE(ptet);
+	printk("\n");
+
+        /* ... 0xc0001000 ... */
+	ptet += 4;
+	if (!(ptet & PRESENT)) {
+		printk("No PTE1\n");
+		return;
+	} else ptet &= 0xfffff000;
+	printk("-->PTE1 (0x%08lx):\n", ptet);
+	print_PTE(ptet);
+	printk("\n");
+}
+#else
+#define print_vmalloc_first_tables()
+#endif	/* VM_SHOW_TABLES */
+
+static void test_VM(void)
+{
+	void *a, *b, *c;
+
+#ifdef VM_SHOW_TABLES
+	printk("Initial PGD/PMD/PTE\n");
+#endif
+        print_vmalloc_first_tables();
+
+	printk("Allocating 2 bytes\n");
+	a = vmalloc(2);
+        print_vmalloc_first_tables();
+
+	printk("Allocating 4100 bytes\n");
+	b = vmalloc(4100);
+        print_vmalloc_first_tables();
+
+	printk("Allocating 20234 bytes\n");
+	c = vmalloc(20234);
+        print_vmalloc_first_tables();
+
+#ifdef VM_TEST_FAULT
+	/* Here you may want to fault ! */
+
+#ifdef VM_TEST_RTLBMISS
+	printk("Ready to fault upon read.\n");
+	if (* (char *) a) {
+		printk("RTLBMISSed on area a !\n");
+	}
+	printk("RTLBMISSed on area a !\n");
+#endif
+
+#ifdef VM_TEST_WTLBMISS
+	printk("Ready to fault upon write.\n");
+	*((char *) b) = 'L';
+	printk("WTLBMISSed on area b !\n");
+#endif
+
+#endif	/* VM_TEST_FAULT */
+
+	printk("Deallocating the 4100 byte chunk\n");
+	vfree(b);
+        print_vmalloc_first_tables();
+
+	printk("Deallocating the 2 byte chunk\n");
+	vfree(a);
+        print_vmalloc_first_tables();
+
+	printk("Deallocating the last chunk\n");
+	vfree(c);
+        print_vmalloc_first_tables();
+}
+
+extern unsigned long volatile jiffies;
+int once = 0;
+unsigned long old_jiffies;
+int pid = -1, pgid = -1;
+
+void idle_trace(void)
+{
+
+	_syscall0(int, getpid)
+	_syscall1(int, getpgid, int, pid)
+
+	if (!once) {
+        	/* VM allocation/deallocation simple test */
+		test_VM();
+		pid = getpid();
+
+        	printk("Got all through to Idle !!\n");
+        	printk("I'm now going to loop forever ...\n");
+        	printk("Any ! below is a timer tick.\n");
+		printk("Any . below is a getpgid system call from pid = %d.\n", pid);
+
+
+        	old_jiffies = jiffies;
+		once++;
+	}
+
+	if (old_jiffies != jiffies) {
+		old_jiffies = jiffies - old_jiffies;
+		switch (old_jiffies) {
+		case 1:
+			printk("!");
+			break;
+		case 2:
+			printk("!!");
+			break;
+		case 3:
+			printk("!!!");
+			break;
+		case 4:
+			printk("!!!!");
+			break;
+		default:
+			printk("(%d!)", (int) old_jiffies);
+		}
+		old_jiffies = jiffies;
+	}
+	pgid = getpgid(pid);
+	printk(".");
+}
+#else
+#define idle_trace()	do { } while (0)
+#endif	/* IDLE_TRACE */
+
+static int hlt_counter = 1;
+
+#define HARD_IDLE_TIMEOUT (HZ / 3)
+
+void disable_hlt(void)
+{
+	hlt_counter++;
+}
+
+void enable_hlt(void)
+{
+	hlt_counter--;
+}
+
+static int __init nohlt_setup(char *__unused)
+{
+	hlt_counter = 1;
+	return 1;
+}
+
+static int __init hlt_setup(char *__unused)
+{
+	hlt_counter = 0;
+	return 1;
+}
+
+__setup("nohlt", nohlt_setup);
+__setup("hlt", hlt_setup);
+
+static inline void hlt(void)
+{
+	if (hlt_counter)
+		return;
+
+	__asm__ __volatile__ ("sleep" : : : "memory");
+}
+
+/*
+ * The idle loop on a uniprocessor SH..
+ */
+void default_idle(void)
+{
+	/* endless idle loop with no priority at all */
+	while (1) {
+		if (hlt_counter) {
+			while (1)
+				if (need_resched())
+					break;
+		} else {
+			local_irq_disable();
+			while (!need_resched()) {
+				local_irq_enable();
+				idle_trace();
+				hlt();
+				local_irq_disable();
+			}
+			local_irq_enable();
+		}
+		schedule();
+	}
+}
+
+void cpu_idle(void *unused)
+{
+	default_idle();
+}
+
+void machine_restart(char * __unused)
+{
+	extern void phys_stext(void);
+
+	phys_stext();
+}
+
+void machine_halt(void)
+{
+	for (;;);
+}
+
+void machine_power_off(void)
+{
+	extern void enter_deep_standby(void);
+
+	enter_deep_standby();
+}
+
+void show_regs(struct pt_regs * regs)
+{
+	unsigned long long ah, al, bh, bl, ch, cl;
+
+	printk("\n");
+
+	ah = (regs->pc) >> 32;
+	al = (regs->pc) & 0xffffffff;
+	bh = (regs->regs[18]) >> 32;
+	bl = (regs->regs[18]) & 0xffffffff;
+	ch = (regs->regs[15]) >> 32;
+	cl = (regs->regs[15]) & 0xffffffff;
+	printk("PC  : %08Lx%08Lx LINK: %08Lx%08Lx SP  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->sr) >> 32;
+	al = (regs->sr) & 0xffffffff;
+        asm volatile ("getcon   " __TEA ", %0" : "=r" (bh));
+        asm volatile ("getcon   " __TEA ", %0" : "=r" (bl));
+	bh = (bh) >> 32;
+	bl = (bl) & 0xffffffff;
+        asm volatile ("getcon   " __KCR0 ", %0" : "=r" (ch));
+        asm volatile ("getcon   " __KCR0 ", %0" : "=r" (cl));
+	ch = (ch) >> 32;
+	cl = (cl) & 0xffffffff;
+	printk("SR  : %08Lx%08Lx TEA : %08Lx%08Lx KCR0: %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[0]) >> 32;
+	al = (regs->regs[0]) & 0xffffffff;
+	bh = (regs->regs[1]) >> 32;
+	bl = (regs->regs[1]) & 0xffffffff;
+	ch = (regs->regs[2]) >> 32;
+	cl = (regs->regs[2]) & 0xffffffff;
+	printk("R0  : %08Lx%08Lx R1  : %08Lx%08Lx R2  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[3]) >> 32;
+	al = (regs->regs[3]) & 0xffffffff;
+	bh = (regs->regs[4]) >> 32;
+	bl = (regs->regs[4]) & 0xffffffff;
+	ch = (regs->regs[5]) >> 32;
+	cl = (regs->regs[5]) & 0xffffffff;
+	printk("R3  : %08Lx%08Lx R4  : %08Lx%08Lx R5  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[6]) >> 32;
+	al = (regs->regs[6]) & 0xffffffff;
+	bh = (regs->regs[7]) >> 32;
+	bl = (regs->regs[7]) & 0xffffffff;
+	ch = (regs->regs[8]) >> 32;
+	cl = (regs->regs[8]) & 0xffffffff;
+	printk("R6  : %08Lx%08Lx R7  : %08Lx%08Lx R8  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[9]) >> 32;
+	al = (regs->regs[9]) & 0xffffffff;
+	bh = (regs->regs[10]) >> 32;
+	bl = (regs->regs[10]) & 0xffffffff;
+	ch = (regs->regs[11]) >> 32;
+	cl = (regs->regs[11]) & 0xffffffff;
+	printk("R9  : %08Lx%08Lx R10 : %08Lx%08Lx R11 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[12]) >> 32;
+	al = (regs->regs[12]) & 0xffffffff;
+	bh = (regs->regs[13]) >> 32;
+	bl = (regs->regs[13]) & 0xffffffff;
+	ch = (regs->regs[14]) >> 32;
+	cl = (regs->regs[14]) & 0xffffffff;
+	printk("R12 : %08Lx%08Lx R13 : %08Lx%08Lx R14 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[16]) >> 32;
+	al = (regs->regs[16]) & 0xffffffff;
+	bh = (regs->regs[17]) >> 32;
+	bl = (regs->regs[17]) & 0xffffffff;
+	ch = (regs->regs[19]) >> 32;
+	cl = (regs->regs[19]) & 0xffffffff;
+	printk("R16 : %08Lx%08Lx R17 : %08Lx%08Lx R19 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[20]) >> 32;
+	al = (regs->regs[20]) & 0xffffffff;
+	bh = (regs->regs[21]) >> 32;
+	bl = (regs->regs[21]) & 0xffffffff;
+	ch = (regs->regs[22]) >> 32;
+	cl = (regs->regs[22]) & 0xffffffff;
+	printk("R20 : %08Lx%08Lx R21 : %08Lx%08Lx R22 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[23]) >> 32;
+	al = (regs->regs[23]) & 0xffffffff;
+	bh = (regs->regs[24]) >> 32;
+	bl = (regs->regs[24]) & 0xffffffff;
+	ch = (regs->regs[25]) >> 32;
+	cl = (regs->regs[25]) & 0xffffffff;
+	printk("R23 : %08Lx%08Lx R24 : %08Lx%08Lx R25 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[26]) >> 32;
+	al = (regs->regs[26]) & 0xffffffff;
+	bh = (regs->regs[27]) >> 32;
+	bl = (regs->regs[27]) & 0xffffffff;
+	ch = (regs->regs[28]) >> 32;
+	cl = (regs->regs[28]) & 0xffffffff;
+	printk("R26 : %08Lx%08Lx R27 : %08Lx%08Lx R28 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[29]) >> 32;
+	al = (regs->regs[29]) & 0xffffffff;
+	bh = (regs->regs[30]) >> 32;
+	bl = (regs->regs[30]) & 0xffffffff;
+	ch = (regs->regs[31]) >> 32;
+	cl = (regs->regs[31]) & 0xffffffff;
+	printk("R29 : %08Lx%08Lx R30 : %08Lx%08Lx R31 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[32]) >> 32;
+	al = (regs->regs[32]) & 0xffffffff;
+	bh = (regs->regs[33]) >> 32;
+	bl = (regs->regs[33]) & 0xffffffff;
+	ch = (regs->regs[34]) >> 32;
+	cl = (regs->regs[34]) & 0xffffffff;
+	printk("R32 : %08Lx%08Lx R33 : %08Lx%08Lx R34 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[35]) >> 32;
+	al = (regs->regs[35]) & 0xffffffff;
+	bh = (regs->regs[36]) >> 32;
+	bl = (regs->regs[36]) & 0xffffffff;
+	ch = (regs->regs[37]) >> 32;
+	cl = (regs->regs[37]) & 0xffffffff;
+	printk("R35 : %08Lx%08Lx R36 : %08Lx%08Lx R37 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[38]) >> 32;
+	al = (regs->regs[38]) & 0xffffffff;
+	bh = (regs->regs[39]) >> 32;
+	bl = (regs->regs[39]) & 0xffffffff;
+	ch = (regs->regs[40]) >> 32;
+	cl = (regs->regs[40]) & 0xffffffff;
+	printk("R38 : %08Lx%08Lx R39 : %08Lx%08Lx R40 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[41]) >> 32;
+	al = (regs->regs[41]) & 0xffffffff;
+	bh = (regs->regs[42]) >> 32;
+	bl = (regs->regs[42]) & 0xffffffff;
+	ch = (regs->regs[43]) >> 32;
+	cl = (regs->regs[43]) & 0xffffffff;
+	printk("R41 : %08Lx%08Lx R42 : %08Lx%08Lx R43 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[44]) >> 32;
+	al = (regs->regs[44]) & 0xffffffff;
+	bh = (regs->regs[45]) >> 32;
+	bl = (regs->regs[45]) & 0xffffffff;
+	ch = (regs->regs[46]) >> 32;
+	cl = (regs->regs[46]) & 0xffffffff;
+	printk("R44 : %08Lx%08Lx R45 : %08Lx%08Lx R46 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[47]) >> 32;
+	al = (regs->regs[47]) & 0xffffffff;
+	bh = (regs->regs[48]) >> 32;
+	bl = (regs->regs[48]) & 0xffffffff;
+	ch = (regs->regs[49]) >> 32;
+	cl = (regs->regs[49]) & 0xffffffff;
+	printk("R47 : %08Lx%08Lx R48 : %08Lx%08Lx R49 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[50]) >> 32;
+	al = (regs->regs[50]) & 0xffffffff;
+	bh = (regs->regs[51]) >> 32;
+	bl = (regs->regs[51]) & 0xffffffff;
+	ch = (regs->regs[52]) >> 32;
+	cl = (regs->regs[52]) & 0xffffffff;
+	printk("R50 : %08Lx%08Lx R51 : %08Lx%08Lx R52 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[53]) >> 32;
+	al = (regs->regs[53]) & 0xffffffff;
+	bh = (regs->regs[54]) >> 32;
+	bl = (regs->regs[54]) & 0xffffffff;
+	ch = (regs->regs[55]) >> 32;
+	cl = (regs->regs[55]) & 0xffffffff;
+	printk("R53 : %08Lx%08Lx R54 : %08Lx%08Lx R55 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[56]) >> 32;
+	al = (regs->regs[56]) & 0xffffffff;
+	bh = (regs->regs[57]) >> 32;
+	bl = (regs->regs[57]) & 0xffffffff;
+	ch = (regs->regs[58]) >> 32;
+	cl = (regs->regs[58]) & 0xffffffff;
+	printk("R56 : %08Lx%08Lx R57 : %08Lx%08Lx R58 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[59]) >> 32;
+	al = (regs->regs[59]) & 0xffffffff;
+	bh = (regs->regs[60]) >> 32;
+	bl = (regs->regs[60]) & 0xffffffff;
+	ch = (regs->regs[61]) >> 32;
+	cl = (regs->regs[61]) & 0xffffffff;
+	printk("R59 : %08Lx%08Lx R60 : %08Lx%08Lx R61 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[62]) >> 32;
+	al = (regs->regs[62]) & 0xffffffff;
+	bh = (regs->tregs[0]) >> 32;
+	bl = (regs->tregs[0]) & 0xffffffff;
+	ch = (regs->tregs[1]) >> 32;
+	cl = (regs->tregs[1]) & 0xffffffff;
+	printk("R62 : %08Lx%08Lx T0  : %08Lx%08Lx T1  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->tregs[2]) >> 32;
+	al = (regs->tregs[2]) & 0xffffffff;
+	bh = (regs->tregs[3]) >> 32;
+	bl = (regs->tregs[3]) & 0xffffffff;
+	ch = (regs->tregs[4]) >> 32;
+	cl = (regs->tregs[4]) & 0xffffffff;
+	printk("T2  : %08Lx%08Lx T3  : %08Lx%08Lx T4  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->tregs[5]) >> 32;
+	al = (regs->tregs[5]) & 0xffffffff;
+	bh = (regs->tregs[6]) >> 32;
+	bl = (regs->tregs[6]) & 0xffffffff;
+	ch = (regs->tregs[7]) >> 32;
+	cl = (regs->tregs[7]) & 0xffffffff;
+	printk("T5  : %08Lx%08Lx T6  : %08Lx%08Lx T7  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	/*
+	 * If we're in kernel mode, dump the stack too..
+	 */
+	if (!user_mode(regs)) {
+		void show_stack(struct task_struct *tsk, unsigned long *sp);
+		unsigned long sp = regs->regs[15] & 0xffffffff;
+		struct task_struct *tsk = get_current();
+
+		tsk->thread.kregs = regs;
+
+		show_stack(tsk, (unsigned long *)sp);
+	}
+}
+
+struct task_struct * alloc_task_struct(void)
+{
+	/* Get task descriptor pages */
+	return (struct task_struct *)
+		__get_free_pages(GFP_KERNEL, get_order(THREAD_SIZE));
+}
+
+void free_task_struct(struct task_struct *p)
+{
+	free_pages((unsigned long) p, get_order(THREAD_SIZE));
+}
+
+/*
+ * Create a kernel thread
+ */
+
+/*
+ * This is the mechanism for creating a new kernel thread.
+ *
+ * NOTE! Only a kernel-only process(ie the swapper or direct descendants
+ * who haven't done an "execve()") should use this: it will work within
+ * a system call from a "real" process, but the process memory space will
+ * not be free'd until both the parent and the child have exited.
+ */
+int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
+{
+	/* A bit less processor dependent than older sh ... */
+
+	unsigned int reply;
+
+static __inline__ _syscall2(int,clone,unsigned long,flags,unsigned long,newsp)
+static __inline__ _syscall1(int,exit,int,ret)
+
+	reply = clone(flags | CLONE_VM, 0);
+	if (!reply) {
+		/* Child */
+		reply = exit(fn(arg));
+	}
+
+	return reply;
+}
+
+/*
+ * Free current thread data structures etc..
+ */
+void exit_thread(void)
+{
+	/* See arch/sparc/kernel/process.c for the precedent for doing this -- RPC.
+
+	   The SH-5 FPU save/restore approach relies on last_task_used_math
+	   pointing to a live task_struct.  When another task tries to use the
+	   FPU for the 1st time, the FPUDIS trap handling (see
+	   arch/sh64/kernel/fpu.c) will save the existing FPU state to the
+	   FP regs field within last_task_used_math before re-loading the new
+	   task's FPU state (or initialising it if the FPU has been used
+	   before).  So if last_task_used_math is stale, and its page has already been
+	   re-allocated for another use, the consequences are rather grim. Unless we
+	   null it here, there is no other path through which it would get safely
+	   nulled. */
+
+#ifndef CONFIG_NOFPU_SUPPORT
+	if (last_task_used_math == current) {
+		last_task_used_math = NULL;
+	}
+#endif
+}
+
+void flush_thread(void)
+{
+
+	/* Called by fs/exec.c (flush_old_exec) to remove traces of a
+	 * previously running executable. */
+#ifndef CONFIG_NOFPU_SUPPORT
+	if (last_task_used_math == current) {
+		last_task_used_math = NULL;
+	}
+	/* Force FPU state to be reinitialised after exec */
+	current->used_math = 0;
+#endif
+
+	/* if we are a kernel thread, about to change to user thread,
+         * update kreg
+         */
+	if(current->thread.kregs==&fake_swapper_regs) {
+          current->thread.kregs =
+             ((struct pt_regs *)(THREAD_SIZE + (unsigned long) current) - 1);
+	  current->thread.uregs = current->thread.kregs;
+	}
+}
+
+void release_thread(struct task_struct *dead_task)
+{
+	/* do nothing */
+}
+
+/* Fill in the fpu structure for a core dump.. */
+int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
+{
+#ifndef CONFIG_NOFPU_SUPPORT
+	int fpvalid;
+	struct task_struct *tsk = current;
+
+	fpvalid = tsk->used_math;
+	if (fpvalid) {
+		if (current == last_task_used_math) {
+			grab_fpu();
+			fpsave(&tsk->thread.fpu.hard);
+			release_fpu();
+			last_task_used_math = 0;
+			regs->sr |= SR_FD;
+		}
+
+		memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu));
+	}
+
+	return fpvalid;
+#else
+	return 0; /* Task didn't use the fpu at all. */
+#endif
+}
+
+asmlinkage void ret_from_fork(void);
+
+int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
+		unsigned long unused,
+		struct task_struct *p, struct pt_regs *regs)
+{
+	struct pt_regs *childregs;
+	unsigned long long se;			/* Sign extension */
+
+#ifndef CONFIG_NOFPU_SUPPORT
+	if(last_task_used_math == current) {
+		grab_fpu();
+		fpsave(&current->thread.fpu.hard);
+		release_fpu();
+		last_task_used_math = NULL;
+		regs->sr |= SR_FD;
+	}
+#endif
+	/* Copy from sh version */
+	childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long) p->thread_info )) - 1;
+
+	*childregs = *regs;
+
+	if (user_mode(regs)) {
+		childregs->regs[15] = usp;
+		p->thread.uregs = childregs;
+	} else {
+		childregs->regs[15] = (unsigned long)p->thread_info + THREAD_SIZE;
+	}
+
+	childregs->regs[9] = 0; /* Set return value for child */
+	childregs->sr |= SR_FD; /* Invalidate FPU flag */
+
+	/* From sh */
+	p->set_child_tid = p->clear_child_tid = NULL;
+
+	p->thread.sp = (unsigned long) childregs;
+	p->thread.pc = (unsigned long) ret_from_fork;
+
+	/*
+	 * Sign extend the edited stack.
+         * Note that thread.pc and thread.pc will stay
+	 * 32-bit wide and context switch must take care
+	 * of NEFF sign extension.
+	 */
+
+	se = childregs->regs[15];
+	se = (se & NEFF_SIGN) ? (se | NEFF_MASK) : se;
+	childregs->regs[15] = se;
+
+	return 0;
+}
+
+/*
+ * fill in the user structure for a core dump..
+ */
+void dump_thread(struct pt_regs * regs, struct user * dump)
+{
+	dump->magic = CMAGIC;
+	dump->start_code = current->mm->start_code;
+	dump->start_data  = current->mm->start_data;
+	dump->start_stack = regs->regs[15] & ~(PAGE_SIZE - 1);
+	dump->u_tsize = (current->mm->end_code - dump->start_code) >> PAGE_SHIFT;
+	dump->u_dsize = (current->mm->brk + (PAGE_SIZE-1) - dump->start_data) >> PAGE_SHIFT;
+	dump->u_ssize = (current->mm->start_stack - dump->start_stack +
+			 PAGE_SIZE - 1) >> PAGE_SHIFT;
+	/* Debug registers will come here. */
+
+	dump->regs = *regs;
+
+	dump->u_fpvalid = dump_fpu(regs, &dump->fpu);
+}
+
+asmlinkage int sys_fork(unsigned long r2, unsigned long r3,
+			unsigned long r4, unsigned long r5,
+			unsigned long r6, unsigned long r7,
+			struct pt_regs *pregs)
+{
+	return do_fork(SIGCHLD, pregs->regs[15], pregs, 0, 0, 0);
+}
+
+asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
+			 unsigned long r4, unsigned long r5,
+			 unsigned long r6, unsigned long r7,
+			 struct pt_regs *pregs)
+{
+	if (!newsp)
+		newsp = pregs->regs[15];
+	return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, pregs, 0, 0, 0);
+}
+
+/*
+ * This is trivial, and on the face of it looks like it
+ * could equally well be done in user mode.
+ *
+ * Not so, for quite unobvious reasons - register pressure.
+ * In user mode vfork() cannot have a stack frame, and if
+ * done by calling the "clone()" system call directly, you
+ * do not have enough call-clobbered registers to hold all
+ * the information you need.
+ */
+asmlinkage int sys_vfork(unsigned long r2, unsigned long r3,
+			 unsigned long r4, unsigned long r5,
+			 unsigned long r6, unsigned long r7,
+			 struct pt_regs *pregs)
+{
+	return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, pregs->regs[15], pregs, 0, 0, 0);
+}
+
+/*
+ * sys_execve() executes a new program.
+ */
+asmlinkage int sys_execve(char *ufilename, char **uargv,
+			  char **uenvp, unsigned long r5,
+			  unsigned long r6, unsigned long r7,
+			  struct pt_regs *pregs)
+{
+	int error;
+	char *filename;
+
+	lock_kernel();
+	filename = getname((char __user *)ufilename);
+	error = PTR_ERR(filename);
+	if (IS_ERR(filename))
+		goto out;
+
+	error = do_execve(filename,
+			  (char __user * __user *)uargv,
+			  (char __user * __user *)uenvp,
+			  pregs);
+	if (error == 0)
+		current->ptrace &= ~PT_DTRACE;
+	putname(filename);
+out:
+	unlock_kernel();
+	return error;
+}
+
+/*
+ * These bracket the sleeping functions..
+ */
+extern void interruptible_sleep_on(wait_queue_head_t *q);
+
+#define mid_sched	((unsigned long) interruptible_sleep_on)
+
+static int in_sh64_switch_to(unsigned long pc)
+{
+	extern char __sh64_switch_to_end;
+	/* For a sleeping task, the PC is somewhere in the middle of the function,
+	   so we don't have to worry about masking the LSB off */
+	return (pc >= (unsigned long) sh64_switch_to) &&
+	       (pc < (unsigned long) &__sh64_switch_to_end);
+}
+
+unsigned long get_wchan(struct task_struct *p)
+{
+	unsigned long schedule_fp;
+	unsigned long sh64_switch_to_fp;
+	unsigned long schedule_caller_pc;
+	unsigned long pc;
+
+	if (!p || p == current || p->state == TASK_RUNNING)
+		return 0;
+
+	/*
+	 * The same comment as on the Alpha applies here, too ...
+	 */
+	pc = thread_saved_pc(p);
+
+#if CONFIG_FRAME_POINTER
+	if (in_sh64_switch_to(pc)) {
+		sh64_switch_to_fp = (long) p->thread.sp;
+		/* r14 is saved at offset 4 in the sh64_switch_to frame */
+		schedule_fp = *(unsigned long *) (long)(sh64_switch_to_fp + 4);
+
+		/* and the caller of 'schedule' is (currently!) saved at offset 24
+		   in the frame of schedule (from disasm) */
+		schedule_caller_pc = *(unsigned long *) (long)(schedule_fp + 24);
+		return schedule_caller_pc;
+	}
+#endif
+	return pc;
+}
+
+/* Provide a /proc/asids file that lists out the
+   ASIDs currently associated with the processes.  (If the DM.PC register is
+   examined through the debug link, this shows ASID + PC.  To make use of this,
+   the PID->ASID relationship needs to be known.  This is primarily for
+   debugging.)
+   */
+
+#if defined(CONFIG_SH64_PROC_ASIDS)
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+
+static int
+asids_proc_info(char *buf, char **start, off_t fpos, int length, int *eof, void *data)
+{
+	int len=0;
+	struct task_struct *p;
+	read_lock(&tasklist_lock);
+	for_each_task(p) {
+		int pid = p->pid;
+		struct mm_struct *mm;
+		if (!pid) continue;
+		mm = p->mm;
+		if (mm) {
+			unsigned long asid, context;
+			context = mm->context;
+			asid = (context & 0xff);
+			len += sprintf(buf+len, "%5d : %02x\n", pid, asid);
+		} else {
+			len += sprintf(buf+len, "%5d : (none)\n", pid);
+		}
+	}
+	read_unlock(&tasklist_lock);
+	*eof = 1;
+	return len;
+}
+
+static int __init register_proc_asids(void)
+{
+  create_proc_read_entry("asids", 0, NULL, asids_proc_info, NULL);
+  return 0;
+}
+
+__initcall(register_proc_asids);
+#endif
+
--- diff/arch/sh64/kernel/ptrace.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/ptrace.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,362 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/ptrace.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ * Started from SH3/4 version:
+ *   SuperH version:   Copyright (C) 1999, 2000  Kaz Kojima & Niibe Yutaka
+ *
+ *   Original x86 implementation:
+ *	By Ross Biro 1/23/92
+ *	edited by Linus Torvalds
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/rwsem.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/ptrace.h>
+#include <linux/user.h>
+
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+#include <asm/system.h>
+#include <asm/processor.h>
+#include <asm/mmu_context.h>
+
+/* This mask defines the bits of the SR which the user is not allowed to
+   change, which are everything except S, Q, M, PR, SZ, FR. */
+#define SR_MASK      (0xffff8cfd)
+
+/*
+ * does not yet catch signals sent when the child dies.
+ * in exit.c or in signal.c.
+ */
+
+/*
+ * This routine will get a word from the user area in the process kernel stack.
+ */
+static inline int get_stack_long(struct task_struct *task, int offset)
+{
+	unsigned char *stack;
+
+	stack = (unsigned char *)(task->thread.uregs);
+	stack += offset;
+	return (*((int *)stack));
+}
+
+static inline unsigned long
+get_fpu_long(struct task_struct *task, unsigned long addr)
+{
+	unsigned long tmp;
+	struct pt_regs *regs;
+	regs = (struct pt_regs*)((unsigned char *)task + THREAD_SIZE) - 1;
+
+	if (!task->used_math) {
+		if (addr == offsetof(struct user_fpu_struct, fpscr)) {
+			tmp = FPSCR_INIT;
+		} else {
+			tmp = 0xffffffffUL; /* matches initial value in fpu.c */
+		}
+		return tmp;
+	}
+
+	if (last_task_used_math == task) {
+		grab_fpu();
+		fpsave(&task->thread.fpu.hard);
+		release_fpu();
+		last_task_used_math = 0;
+		regs->sr |= SR_FD;
+	}
+
+	tmp = ((long *)&task->thread.fpu)[addr / sizeof(unsigned long)];
+	return tmp;
+}
+
+/*
+ * This routine will put a word into the user area in the process kernel stack.
+ */
+static inline int put_stack_long(struct task_struct *task, int offset,
+				 unsigned long data)
+{
+	unsigned char *stack;
+
+	stack = (unsigned char *)(task->thread.uregs);
+	stack += offset;
+	*(unsigned long *) stack = data;
+	return 0;
+}
+
+static inline int
+put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data)
+{
+	struct pt_regs *regs;
+
+	regs = (struct pt_regs*)((unsigned char *)task + THREAD_SIZE) - 1;
+
+	if (!task->used_math) {
+		fpinit(&task->thread.fpu.hard);
+		task->used_math = 1;
+	} else if (last_task_used_math == task) {
+		grab_fpu();
+		fpsave(&task->thread.fpu.hard);
+		release_fpu();
+		last_task_used_math = 0;
+		regs->sr |= SR_FD;
+	}
+
+	((long *)&task->thread.fpu)[addr / sizeof(unsigned long)] = data;
+	return 0;
+}
+
+asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
+{
+	struct task_struct *child;
+	int ret;
+
+	lock_kernel();
+	ret = -EPERM;
+	if (request == PTRACE_TRACEME) {
+		/* are we already being traced? */
+		if (current->ptrace & PT_PTRACED)
+			goto out;
+		/* set the ptrace bit in the process flags. */
+		current->ptrace |= PT_PTRACED;
+		ret = 0;
+		goto out;
+	}
+	ret = -ESRCH;
+	read_lock(&tasklist_lock);
+	child = find_task_by_pid(pid);
+	if (child)
+		get_task_struct(child);
+	read_unlock(&tasklist_lock);
+	if (!child)
+		goto out;
+
+	ret = -EPERM;
+	if (pid == 1)		/* you may not mess with init */
+		goto out_tsk;
+
+	if (request == PTRACE_ATTACH) {
+		ret = ptrace_attach(child);
+			goto out_tsk;
+		}
+
+	ret = ptrace_check_attach(child, request == PTRACE_KILL);
+	if (ret < 0)
+		goto out_tsk;
+
+	switch (request) {
+	/* when I and D space are separate, these will need to be fixed. */
+	case PTRACE_PEEKTEXT: /* read word at location addr. */
+	case PTRACE_PEEKDATA: {
+		unsigned long tmp;
+		int copied;
+
+		copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
+		ret = -EIO;
+		if (copied != sizeof(tmp))
+			break;
+		ret = put_user(tmp,(unsigned long *) data);
+		break;
+	}
+
+	/* read the word at location addr in the USER area. */
+	case PTRACE_PEEKUSR: {
+		unsigned long tmp;
+
+		ret = -EIO;
+		if ((addr & 3) || addr < 0)
+			break;
+
+		if (addr < sizeof(struct pt_regs))
+			tmp = get_stack_long(child, addr);
+		else if ((addr >= offsetof(struct user, fpu)) &&
+			 (addr <  offsetof(struct user, u_fpvalid))) {
+			tmp = get_fpu_long(child, addr - offsetof(struct user, fpu));
+		} else if (addr == offsetof(struct user, u_fpvalid)) {
+			tmp = child->used_math;
+		} else {
+			break;
+		}
+		ret = put_user(tmp, (unsigned long *)data);
+		break;
+	}
+
+	/* when I and D space are separate, this will have to be fixed. */
+	case PTRACE_POKETEXT: /* write the word at location addr. */
+	case PTRACE_POKEDATA:
+		ret = 0;
+		if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
+			break;
+		ret = -EIO;
+		break;
+
+	case PTRACE_POKEUSR:
+                /* write the word at location addr in the USER area. We must
+                   disallow any changes to certain SR bits or u_fpvalid, since
+                   this could crash the kernel or result in a security
+                   loophole. */
+		ret = -EIO;
+		if ((addr & 3) || addr < 0)
+			break;
+
+		if (addr < sizeof(struct pt_regs)) {
+			/* Ignore change of top 32 bits of SR */
+			if (addr == offsetof (struct pt_regs, sr)+4)
+			{
+				ret = 0;
+				break;
+			}
+			/* If lower 32 bits of SR, ignore non-user bits */
+			if (addr == offsetof (struct pt_regs, sr))
+			{
+				long cursr = get_stack_long(child, addr);
+				data &= ~(SR_MASK);
+				data |= (cursr & SR_MASK);
+			}
+			ret = put_stack_long(child, addr, data);
+		}
+		else if ((addr >= offsetof(struct user, fpu)) &&
+			 (addr <  offsetof(struct user, u_fpvalid))) {
+			ret = put_fpu_long(child, addr - offsetof(struct user, fpu), data);
+		}
+		break;
+
+	case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
+	case PTRACE_CONT: { /* restart after signal. */
+		ret = -EIO;
+		if ((unsigned long) data > _NSIG)
+			break;
+		if (request == PTRACE_SYSCALL)
+			set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+		else
+			clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+		child->exit_code = data;
+		wake_up_process(child);
+		ret = 0;
+		break;
+	}
+
+/*
+ * make the child exit.  Best I can do is send it a sigkill.
+ * perhaps it should be put in the status that it wants to
+ * exit.
+ */
+	case PTRACE_KILL: {
+		ret = 0;
+		if (child->state == TASK_ZOMBIE)	/* already dead */
+			break;
+		child->exit_code = SIGKILL;
+		wake_up_process(child);
+		break;
+	}
+
+	case PTRACE_SINGLESTEP: {  /* set the trap flag. */
+		struct pt_regs *regs;
+
+		ret = -EIO;
+		if ((unsigned long) data > _NSIG)
+			break;
+		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+		if ((child->ptrace & PT_DTRACE) == 0) {
+			/* Spurious delayed TF traps may occur */
+			child->ptrace |= PT_DTRACE;
+		}
+
+		regs = child->thread.uregs;
+
+		regs->sr |= SR_SSTEP;	/* auto-resetting upon exception */
+
+		child->exit_code = data;
+		/* give it a chance to run. */
+		wake_up_process(child);
+		ret = 0;
+		break;
+	}
+
+	case PTRACE_DETACH: /* detach a process that was attached. */
+		ret = ptrace_detach(child, data);
+		break;
+
+	default:
+		ret = ptrace_request(child, request, addr, data);
+		break;
+	}
+out_tsk:
+	put_task_struct(child);
+out:
+	unlock_kernel();
+	return ret;
+}
+
+asmlinkage void syscall_trace(void)
+{
+	struct task_struct *tsk = current;
+
+	if (!test_thread_flag(TIF_SYSCALL_TRACE))
+		return;
+	if (!(tsk->ptrace & PT_PTRACED))
+		return;
+
+	tsk->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
+				    ? 0x80 : 0);
+	tsk->state = TASK_STOPPED;
+	notify_parent(tsk, SIGCHLD);
+	schedule();
+	/*
+	 * this isn't the same as continuing with a signal, but it will do
+	 * for normal use.  strace only continues with a signal if the
+	 * stopping signal is not SIGTRAP.  -brl
+	 */
+	if (tsk->exit_code) {
+		send_sig(tsk->exit_code, tsk, 1);
+		tsk->exit_code = 0;
+	}
+}
+
+/* Called with interrupts disabled */
+asmlinkage void do_single_step(unsigned long long vec, struct pt_regs *regs)
+{
+	/* This is called after a single step exception (DEBUGSS).
+	   There is no need to change the PC, as it is a post-execution
+	   exception, as entry.S does not do anything to the PC for DEBUGSS.
+	   We need to clear the Single Step setting in SR to avoid
+	   continually stepping. */
+	local_irq_enable();
+	regs->sr &= ~SR_SSTEP;
+	force_sig(SIGTRAP, current);
+}
+
+/* Called with interrupts disabled */
+asmlinkage void do_software_break_point(unsigned long long vec,
+					struct pt_regs *regs)
+{
+	/* We need to forward step the PC, to counteract the backstep done
+	   in signal.c. */
+	local_irq_enable();
+	force_sig(SIGTRAP, current);
+	regs->pc += 4;
+}
+
+/*
+ * Called by kernel/ptrace.c when detaching..
+ *
+ * Make sure single step bits etc are not set.
+ */
+void ptrace_disable(struct task_struct *child)
+{
+        /* nothing to do.. */
+}
--- diff/arch/sh64/kernel/semaphore.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/semaphore.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,140 @@
+/*
+ * Just taken from alpha implementation.
+ * This can't work well, perhaps.
+ */
+/*
+ *  Generic semaphore code. Buyer beware. Do your own
+ * specific changes in <asm/semaphore-helper.h>
+ */
+
+#include <linux/errno.h>
+#include <linux/rwsem.h>
+#include <linux/sched.h>
+#include <linux/wait.h>
+#include <linux/init.h>
+#include <asm/semaphore.h>
+#include <asm/semaphore-helper.h>
+
+spinlock_t semaphore_wake_lock;
+
+/*
+ * Semaphores are implemented using a two-way counter:
+ * The "count" variable is decremented for each process
+ * that tries to sleep, while the "waking" variable is
+ * incremented when the "up()" code goes to wake up waiting
+ * processes.
+ *
+ * Notably, the inline "up()" and "down()" functions can
+ * efficiently test if they need to do any extra work (up
+ * needs to do something only if count was negative before
+ * the increment operation.
+ *
+ * waking_non_zero() (from asm/semaphore.h) must execute
+ * atomically.
+ *
+ * When __up() is called, the count was negative before
+ * incrementing it, and we need to wake up somebody.
+ *
+ * This routine adds one to the count of processes that need to
+ * wake up and exit.  ALL waiting processes actually wake up but
+ * only the one that gets to the "waking" field first will gate
+ * through and acquire the semaphore.  The others will go back
+ * to sleep.
+ *
+ * Note that these functions are only called when there is
+ * contention on the lock, and as such all this is the
+ * "non-critical" part of the whole semaphore business. The
+ * critical part is the inline stuff in <asm/semaphore.h>
+ * where we want to avoid any extra jumps and calls.
+ */
+void __up(struct semaphore *sem)
+{
+	wake_one_more(sem);
+	wake_up(&sem->wait);
+}
+
+/*
+ * Perform the "down" function.  Return zero for semaphore acquired,
+ * return negative for signalled out of the function.
+ *
+ * If called from __down, the return is ignored and the wait loop is
+ * not interruptible.  This means that a task waiting on a semaphore
+ * using "down()" cannot be killed until someone does an "up()" on
+ * the semaphore.
+ *
+ * If called from __down_interruptible, the return value gets checked
+ * upon return.  If the return value is negative then the task continues
+ * with the negative value in the return register (it can be tested by
+ * the caller).
+ *
+ * Either form may be used in conjunction with "up()".
+ *
+ */
+
+#define DOWN_VAR				\
+	struct task_struct *tsk = current;	\
+	wait_queue_t wait;			\
+	init_waitqueue_entry(&wait, tsk);
+
+#define DOWN_HEAD(task_state)						\
+									\
+									\
+	tsk->state = (task_state);					\
+	add_wait_queue(&sem->wait, &wait);				\
+									\
+	/*								\
+	 * Ok, we're set up.  sem->count is known to be less than zero	\
+	 * so we must wait.						\
+	 *								\
+	 * We can let go the lock for purposes of waiting.		\
+	 * We re-acquire it after awaking so as to protect		\
+	 * all semaphore operations.					\
+	 *								\
+	 * If "up()" is called before we call waking_non_zero() then	\
+	 * we will catch it right away.  If it is called later then	\
+	 * we will have to go through a wakeup cycle to catch it.	\
+	 *								\
+	 * Multiple waiters contend for the semaphore lock to see	\
+	 * who gets to gate through and who has to wait some more.	\
+	 */								\
+	for (;;) {
+
+#define DOWN_TAIL(task_state)			\
+		tsk->state = (task_state);	\
+	}					\
+	tsk->state = TASK_RUNNING;		\
+	remove_wait_queue(&sem->wait, &wait);
+
+void __sched __down(struct semaphore * sem)
+{
+	DOWN_VAR
+	DOWN_HEAD(TASK_UNINTERRUPTIBLE)
+	if (waking_non_zero(sem))
+		break;
+	schedule();
+	DOWN_TAIL(TASK_UNINTERRUPTIBLE)
+}
+
+int __sched __down_interruptible(struct semaphore * sem)
+{
+	int ret = 0;
+	DOWN_VAR
+	DOWN_HEAD(TASK_INTERRUPTIBLE)
+
+	ret = waking_non_zero_interruptible(sem, tsk);
+	if (ret)
+	{
+		if (ret == 1)
+			/* ret != 0 only if we get interrupted -arca */
+			ret = 0;
+		break;
+	}
+	schedule();
+	DOWN_TAIL(TASK_INTERRUPTIBLE)
+	return ret;
+}
+
+int __down_trylock(struct semaphore * sem)
+{
+	return waking_non_zero_trylock(sem);
+}
--- diff/arch/sh64/kernel/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,400 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/setup.c
+ *
+ * sh64 Arch Support
+ *
+ * This file handles the architecture-dependent parts of initialization
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ *
+ * benedict.gaster@superh.com:   2nd May 2002
+ *    Modified to use the empty_zero_page to pass command line arguments.
+ *
+ * benedict.gaster@superh.com:	 3rd May 2002
+ *    Added support for ramdisk, removing statically linked romfs at the same time.
+ *
+ * lethal@linux-sh.org:          15th May 2003
+ *    Added generic procfs cpuinfo reporting. Make boards just export their name.
+ *
+ * lethal@linux-sh.org:          25th May 2003
+ *    Added generic get_cpu_subtype() for subtype reporting from cpu_data->type.
+ *
+ */
+#include <linux/errno.h>
+#include <linux/rwsem.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/stddef.h>
+#include <linux/unistd.h>
+#include <linux/ptrace.h>
+#include <linux/slab.h>
+#include <linux/user.h>
+#include <linux/a.out.h>
+#include <linux/tty.h>
+#include <linux/ioport.h>
+#include <linux/delay.h>
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/seq_file.h>
+#include <linux/blkdev.h>
+#include <linux/bootmem.h>
+#include <linux/console.h>
+#include <linux/root_dev.h>
+#include <linux/cpu.h>
+#include <linux/initrd.h>
+#include <asm/processor.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/platform.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/sections.h>
+#include <asm/smp.h>
+
+#ifdef CONFIG_VT
+#include <linux/console.h>
+#endif
+
+struct screen_info screen_info;
+
+/* On a PC this would be initialised as a result of the BIOS detecting the
+ * mouse. */
+unsigned char aux_device_present = 0xaa;
+
+#ifdef CONFIG_BLK_DEV_RAM
+extern int rd_doload;		/* 1 = load ramdisk, 0 = don't load */
+extern int rd_prompt;		/* 1 = prompt for ramdisk, 0 = don't prompt */
+extern int rd_image_start;	/* starting block # of image */
+#endif
+
+extern int root_mountflags;
+extern char *get_system_type(void);
+extern void platform_setup(void);
+extern void platform_monitor(void);
+extern void platform_reserve(void);
+extern int sh64_cache_init(void);
+extern int sh64_tlb_init(void);
+
+#define RAMDISK_IMAGE_START_MASK  	0x07FF
+#define RAMDISK_PROMPT_FLAG		0x8000
+#define RAMDISK_LOAD_FLAG		0x4000
+
+#define PARAM ((unsigned char *)empty_zero_page)
+#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
+#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
+#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
+#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
+#define INITRD_START (*(unsigned long *) (PARAM+0x010))
+#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
+
+#define COMMAND_LINE ((char *) (PARAM+256))
+#define COMMAND_LINE_SIZE 256
+
+static char command_line[COMMAND_LINE_SIZE] = { 0, };
+       char saved_command_line[COMMAND_LINE_SIZE];
+unsigned long long memory_start = CONFIG_MEMORY_START;
+unsigned long long memory_end = CONFIG_MEMORY_START + (CONFIG_MEMORY_SIZE_IN_MB * 1024 * 1024);
+
+struct sh_cpuinfo boot_cpu_data;
+
+static inline void parse_mem_cmdline (char ** cmdline_p)
+{
+        char c = ' ', *to = command_line, *from = COMMAND_LINE;
+	int len = 0;
+
+	/* Save unparsed command line copy for /proc/cmdline */
+	memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
+	saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
+
+	for (;;) {
+	  /*
+	   * "mem=XXX[kKmM]" defines a size of memory.
+	   */
+	        if (c == ' ' && !memcmp(from, "mem=", 4)) {
+		      if (to != command_line)
+			to--;
+		      {
+			unsigned long mem_size;
+
+			mem_size = memparse(from+4, &from);
+			memory_end = memory_start + mem_size;
+		      }
+		}
+		c = *(from++);
+		if (!c)
+		  break;
+		if (COMMAND_LINE_SIZE <= ++len)
+		  break;
+		*(to++) = c;
+	}
+	*to = '\0';
+
+	*cmdline_p = command_line;
+}
+
+static void __init sh64_cpu_type_detect(void)
+{
+	extern unsigned long long peek_real_address_q(unsigned long long addr);
+	unsigned long long cir;
+	/* Do peeks in real mode to avoid having to set up a mapping for the
+	   WPC registers.  On SH5-101 cut2, such a mapping would be exposed to
+	   an address translation erratum which would make it hard to set up
+	   correctly. */
+	cir = peek_real_address_q(0x0d000008);
+
+	if ((cir & 0xffff) == 0x5103) {
+		boot_cpu_data.type = CPU_SH5_103;
+	} else if (((cir >> 32) & 0xffff) == 0x51e2) {
+		/* CPU.VCR aliased at CIR address on SH5-101 */
+		boot_cpu_data.type = CPU_SH5_101;
+	} else {
+		boot_cpu_data.type = CPU_SH_NONE;
+	}
+}
+
+void __init setup_arch(char **cmdline_p)
+{
+	unsigned long bootmap_size, i;
+	unsigned long first_pfn, start_pfn, last_pfn, pages;
+
+#ifdef CONFIG_EARLY_PRINTK
+	extern void enable_early_printk(void);
+
+	/*
+	 * Setup Early SCIF console
+	 */
+	enable_early_printk();
+#endif
+
+	/*
+	 * Setup TLB mappings
+	 */
+	sh64_tlb_init();
+
+	/*
+	 * Caches are already initialized by the time we get here, so we just
+	 * fill in cpu_data info for the caches.
+	 */
+	sh64_cache_init();
+
+	platform_setup();
+	platform_monitor();
+
+	sh64_cpu_type_detect();
+
+	ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
+
+#ifdef CONFIG_BLK_DEV_RAM
+	rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
+	rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);
+	rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);
+#endif
+
+	if (!MOUNT_ROOT_RDONLY)
+		root_mountflags &= ~MS_RDONLY;
+	init_mm.start_code = (unsigned long) _text;
+	init_mm.end_code = (unsigned long) _etext;
+	init_mm.end_data = (unsigned long) _edata;
+	init_mm.brk = (unsigned long) _end;
+
+	code_resource.start = __pa(_text);
+	code_resource.end = __pa(_etext)-1;
+	data_resource.start = __pa(_etext);
+	data_resource.end = __pa(_edata)-1;
+
+	parse_mem_cmdline(cmdline_p);
+
+	/*
+	 * Find the lowest and highest page frame numbers we have available
+	 */
+	first_pfn = PFN_DOWN(memory_start);
+	last_pfn = PFN_DOWN(memory_end);
+	pages = last_pfn - first_pfn;
+
+ 	/*
+	 * Partially used pages are not usable - thus
+	 * we are rounding upwards:
+ 	 */
+	start_pfn = PFN_UP(__pa(_end));
+
+	/*
+	 * Find a proper area for the bootmem bitmap. After this
+	 * bootstrap step all allocations (until the page allocator
+	 * is intact) must be done via bootmem_alloc().
+	 */
+	bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
+					 first_pfn,
+					 last_pfn);
+        /*
+         * Round it up.
+         */
+        bootmap_size = PFN_PHYS(PFN_UP(bootmap_size));
+
+	/*
+	 * Register fully available RAM pages with the bootmem allocator.
+	 */
+	free_bootmem_node(NODE_DATA(0), PFN_PHYS(first_pfn), PFN_PHYS(pages));
+
+	/*
+	 * Reserve all kernel sections + bootmem bitmap + a guard page.
+	 */
+	reserve_bootmem_node(NODE_DATA(0), PFN_PHYS(first_pfn),
+		        (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE) - PFN_PHYS(first_pfn));
+
+	/*
+	 * Reserve platform dependent sections
+	 */
+	platform_reserve();
+
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (LOADER_TYPE && INITRD_START) {
+		if (INITRD_START + INITRD_SIZE <= (PFN_PHYS(last_pfn))) {
+		        reserve_bootmem_node(NODE_DATA(0), INITRD_START + __MEMORY_START, INITRD_SIZE);
+
+			initrd_start =
+			  (long) INITRD_START ? INITRD_START + PAGE_OFFSET +  __MEMORY_START : 0;
+
+			initrd_end = initrd_start + INITRD_SIZE;
+		} else {
+			printk("initrd extends beyond end of memory "
+			    "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
+				    (long) INITRD_START + INITRD_SIZE,
+				    PFN_PHYS(last_pfn));
+			initrd_start = 0;
+		}
+	}
+#endif
+
+	/*
+	 * Claim all RAM, ROM, and I/O resources.
+	 */
+
+	/* Kernel RAM */
+	request_resource(&iomem_resource, &code_resource);
+	request_resource(&iomem_resource, &data_resource);
+
+	/* Other KRAM space */
+	for (i = 0; i < STANDARD_KRAM_RESOURCES - 2; i++)
+		request_resource(&iomem_resource,
+				 &platform_parms.kram_res_p[i]);
+
+	/* XRAM space */
+	for (i = 0; i < STANDARD_XRAM_RESOURCES; i++)
+		request_resource(&iomem_resource,
+				 &platform_parms.xram_res_p[i]);
+
+	/* ROM space */
+	for (i = 0; i < STANDARD_ROM_RESOURCES; i++)
+		request_resource(&iomem_resource,
+				 &platform_parms.rom_res_p[i]);
+
+	/* I/O space */
+	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
+		request_resource(&ioport_resource,
+				 &platform_parms.io_res_p[i]);
+
+
+#ifdef CONFIG_VT
+#if defined(CONFIG_VGA_CONSOLE)
+	conswitchp = &vga_con;
+#elif defined(CONFIG_DUMMY_CONSOLE)
+	conswitchp = &dummy_con;
+#endif
+#endif
+
+	printk("Hardware FPU: %s\n", fpu_in_use ? "enabled" : "disabled");
+
+	paging_init();
+}
+
+void __xchg_called_with_bad_pointer(void)
+{
+	printk(KERN_EMERG "xchg() called with bad pointer !\n");
+}
+
+static struct cpu cpu[1];
+
+static int __init topology_init(void)
+{
+	return register_cpu(cpu, 0, NULL);
+}
+
+subsys_initcall(topology_init);
+
+/*
+ *	Get CPU information
+ */
+static const char *cpu_name[] = {
+	[CPU_SH5_101]	= "SH5-101",
+	[CPU_SH5_103]	= "SH5-103",
+	[CPU_SH_NONE]	= "Unknown",
+};
+
+const char *get_cpu_subtype(void)
+{
+	return cpu_name[boot_cpu_data.type];
+}
+
+#ifdef CONFIG_PROC_FS
+static int show_cpuinfo(struct seq_file *m,void *v)
+{
+	unsigned int cpu = smp_processor_id();
+
+	if (!cpu)
+		seq_printf(m, "machine\t\t: %s\n", get_system_type());
+
+	seq_printf(m, "processor\t: %d\n", cpu);
+	seq_printf(m, "cpu family\t: SH-5\n");
+	seq_printf(m, "cpu type\t: %s\n", get_cpu_subtype());
+
+	seq_printf(m, "icache size\t: %dK-bytes\n",
+		   (boot_cpu_data.icache.ways *
+		    boot_cpu_data.icache.sets *
+		    boot_cpu_data.icache.linesz) >> 10);
+	seq_printf(m, "dcache size\t: %dK-bytes\n",
+		   (boot_cpu_data.dcache.ways *
+		    boot_cpu_data.dcache.sets *
+		    boot_cpu_data.dcache.linesz) >> 10);
+	seq_printf(m, "itlb entries\t: %d\n", boot_cpu_data.itlb.entries);
+	seq_printf(m, "dtlb entries\t: %d\n", boot_cpu_data.dtlb.entries);
+
+#define PRINT_CLOCK(name, value) \
+	seq_printf(m, name " clock\t: %d.%02dMHz\n", \
+		     ((value) / 1000000), ((value) % 1000000)/10000)
+
+	PRINT_CLOCK("cpu", boot_cpu_data.cpu_clock);
+	PRINT_CLOCK("bus", boot_cpu_data.bus_clock);
+	PRINT_CLOCK("module", boot_cpu_data.module_clock);
+
+        seq_printf(m, "bogomips\t: %lu.%02lu\n\n",
+		     (loops_per_jiffy*HZ+2500)/500000,
+		     ((loops_per_jiffy*HZ+2500)/5000) % 100);
+
+	return 0;
+}
+
+static void *c_start(struct seq_file *m, loff_t *pos)
+{
+	return (void*)(*pos == 0);
+}
+static void *c_next(struct seq_file *m, void *v, loff_t *pos)
+{
+	return NULL;
+}
+static void c_stop(struct seq_file *m, void *v)
+{
+}
+struct seq_operations cpuinfo_op = {
+	.start	= c_start,
+	.next	= c_next,
+	.stop	= c_stop,
+	.show	= show_cpuinfo,
+};
+#endif /* CONFIG_PROC_FS */
--- diff/arch/sh64/kernel/sh_ksyms.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/sh_ksyms.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,84 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/sh_ksyms.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/rwsem.h>
+#include <linux/module.h>
+#include <linux/smp.h>
+#include <linux/user.h>
+#include <linux/elfcore.h>
+#include <linux/sched.h>
+#include <linux/in6.h>
+#include <linux/interrupt.h>
+#include <linux/smp_lock.h>
+
+#include <asm/semaphore.h>
+#include <asm/processor.h>
+#include <asm/uaccess.h>
+#include <asm/checksum.h>
+#include <asm/io.h>
+#include <asm/hardirq.h>
+#include <asm/delay.h>
+#include <asm/irq.h>
+
+extern void dump_thread(struct pt_regs *, struct user *);
+extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
+
+#if 0
+/* Not yet - there's no declaration of drive_info anywhere. */
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
+extern struct drive_info_struct drive_info;
+EXPORT_SYMBOL(drive_info);
+#endif
+#endif
+
+/* platform dependent support */
+EXPORT_SYMBOL(dump_thread);
+EXPORT_SYMBOL(dump_fpu);
+EXPORT_SYMBOL(iounmap);
+EXPORT_SYMBOL(enable_irq);
+EXPORT_SYMBOL(disable_irq);
+EXPORT_SYMBOL(kernel_thread);
+
+/* Networking helper routines. */
+EXPORT_SYMBOL(csum_partial_copy);
+
+EXPORT_SYMBOL(strtok);
+EXPORT_SYMBOL(strpbrk);
+EXPORT_SYMBOL(strstr);
+
+#ifdef CONFIG_VT
+EXPORT_SYMBOL(screen_info);
+#endif
+
+EXPORT_SYMBOL_NOVERS(__down);
+EXPORT_SYMBOL_NOVERS(__down_trylock);
+EXPORT_SYMBOL_NOVERS(__up);
+EXPORT_SYMBOL_NOVERS(__put_user_asm_l);
+EXPORT_SYMBOL_NOVERS(__get_user_asm_l);
+EXPORT_SYMBOL_NOVERS(memcmp);
+EXPORT_SYMBOL_NOVERS(memcpy);
+EXPORT_SYMBOL_NOVERS(memset);
+EXPORT_SYMBOL_NOVERS(memscan);
+EXPORT_SYMBOL_NOVERS(strchr);
+EXPORT_SYMBOL_NOVERS(strlen);
+
+EXPORT_SYMBOL(flush_dcache_page);
+
+/* Ugh.  These come in from libgcc.a at link time. */
+
+extern void __sdivsi3(void);
+extern void __muldi3(void);
+extern void __udivsi3(void);
+EXPORT_SYMBOL_NOVERS(__sdivsi3);
+EXPORT_SYMBOL_NOVERS(__muldi3);
+EXPORT_SYMBOL_NOVERS(__udivsi3);
+
--- diff/arch/sh64/kernel/signal.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/signal.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,737 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/signal.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ * Copyright (C) 2004  Richard Curnow
+ *
+ * Started from sh version.
+ *
+ */
+#include <linux/rwsem.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/kernel.h>
+#include <linux/signal.h>
+#include <linux/errno.h>
+#include <linux/wait.h>
+#include <linux/personality.h>
+#include <linux/suspend.h>
+#include <linux/ptrace.h>
+#include <linux/unistd.h>
+#include <linux/stddef.h>
+#include <linux/personality.h>
+#include <asm/ucontext.h>
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+
+
+#define REG_RET 9
+#define REG_ARG1 2
+#define REG_ARG2 3
+#define REG_ARG3 4
+#define REG_SP 15
+#define REG_PR 18
+#define REF_REG_RET regs->regs[REG_RET]
+#define REF_REG_SP regs->regs[REG_SP]
+#define DEREF_REG_PR regs->regs[REG_PR]
+
+#define DEBUG_SIG 0
+
+#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
+
+asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
+
+/*
+ * Atomically swap in the new signal mask, and wait for a signal.
+ */
+
+asmlinkage int
+sys_sigsuspend(old_sigset_t mask,
+	       unsigned long r3, unsigned long r4, unsigned long r5,
+	       unsigned long r6, unsigned long r7,
+	       struct pt_regs * regs)
+{
+	sigset_t saveset;
+
+	mask &= _BLOCKABLE;
+	spin_lock_irq(&current->sighand->siglock);
+	saveset = current->blocked;
+	siginitset(&current->blocked, mask);
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	REF_REG_RET = -EINTR;
+	while (1) {
+		current->state = TASK_INTERRUPTIBLE;
+		schedule();
+		regs->pc += 4;    /* because sys_sigreturn decrements the pc */
+		if (do_signal(regs, &saveset)) {
+			/* pc now points at signal handler. Need to decrement
+			   it because entry.S will increment it. */
+			regs->pc -= 4;
+			return -EINTR;
+		}
+	}
+}
+
+asmlinkage int
+sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize,
+	          unsigned long r4, unsigned long r5, unsigned long r6,
+	          unsigned long r7,
+	          struct pt_regs * regs)
+{
+	sigset_t saveset, newset;
+
+	/* XXX: Don't preclude handling different sized sigset_t's.  */
+	if (sigsetsize != sizeof(sigset_t))
+		return -EINVAL;
+
+	if (copy_from_user(&newset, unewset, sizeof(newset)))
+		return -EFAULT;
+	sigdelsetmask(&newset, ~_BLOCKABLE);
+	spin_lock_irq(&current->sighand->siglock);
+	saveset = current->blocked;
+	current->blocked = newset;
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	REF_REG_RET = -EINTR;
+	while (1) {
+		current->state = TASK_INTERRUPTIBLE;
+		schedule();
+		regs->pc += 4;    /* because sys_sigreturn decrements the pc */
+		if (do_signal(regs, &saveset)) {
+			/* pc now points at signal handler. Need to decrement
+			   it because entry.S will increment it. */
+			regs->pc -= 4;
+			return -EINTR;
+		}
+	}
+}
+
+asmlinkage int
+sys_sigaction(int sig, const struct old_sigaction __user *act,
+	      struct old_sigaction __user *oact)
+{
+	struct k_sigaction new_ka, old_ka;
+	int ret;
+
+	if (act) {
+		old_sigset_t mask;
+		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
+		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
+		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
+			return -EFAULT;
+		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
+		__get_user(mask, &act->sa_mask);
+		siginitset(&new_ka.sa.sa_mask, mask);
+	}
+
+	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
+
+	if (!ret && oact) {
+		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
+		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
+		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
+			return -EFAULT;
+		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
+		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
+	}
+
+	return ret;
+}
+
+asmlinkage int
+sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
+	        unsigned long r4, unsigned long r5, unsigned long r6,
+	        unsigned long r7,
+	        struct pt_regs * regs)
+{
+	return do_sigaltstack(uss, uoss, REF_REG_SP);
+}
+
+
+/*
+ * Do a signal return; undo the signal stack.
+ */
+
+struct sigframe
+{
+	struct sigcontext sc;
+	unsigned long extramask[_NSIG_WORDS-1];
+	long long retcode[2];
+};
+
+struct rt_sigframe
+{
+	struct siginfo __user *pinfo;
+	void *puc;
+	struct siginfo info;
+	struct ucontext uc;
+	long long retcode[2];
+};
+
+#ifndef CONFIG_NOFPU_SUPPORT
+static inline int
+restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
+{
+	int err = 0;
+	int fpvalid;
+
+	err |= __get_user (fpvalid, &sc->sc_fpvalid);
+	current->used_math = fpvalid;
+	if (! fpvalid)
+		return err;
+
+	if (current == last_task_used_math) {
+		last_task_used_math = NULL;
+		regs->sr |= SR_FD;
+	}
+
+	err |= __copy_from_user(&current->thread.fpu.hard, &sc->sc_fpregs[0],
+				(sizeof(long long) * 32) + (sizeof(int) * 1));
+
+	return err;
+}
+
+static inline int
+setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
+{
+	int err = 0;
+	int fpvalid;
+
+	fpvalid = current->used_math;
+	err |= __put_user(fpvalid, &sc->sc_fpvalid);
+	if (! fpvalid)
+		return err;
+
+	if (current == last_task_used_math) {
+		grab_fpu();
+		fpsave(&current->thread.fpu.hard);
+		release_fpu();
+		last_task_used_math = NULL;
+		regs->sr |= SR_FD;
+	}
+
+	err |= __copy_to_user(&sc->sc_fpregs[0], &current->thread.fpu.hard,
+			      (sizeof(long long) * 32) + (sizeof(int) * 1));
+	current->used_math = 0;
+
+	return err;
+}
+#else
+static inline int
+restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
+{}
+static inline int
+setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
+{}
+#endif
+
+static int
+restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, long long *r2_p)
+{
+	unsigned int err = 0;
+        unsigned long long current_sr, new_sr;
+#define SR_MASK 0xffff8cfd
+
+#define COPY(x)		err |= __get_user(regs->x, &sc->sc_##x)
+
+	COPY(regs[0]);	COPY(regs[1]);	COPY(regs[2]);	COPY(regs[3]);
+	COPY(regs[4]);	COPY(regs[5]);	COPY(regs[6]);	COPY(regs[7]);
+	COPY(regs[8]);	COPY(regs[9]);  COPY(regs[10]);	COPY(regs[11]);
+	COPY(regs[12]);	COPY(regs[13]);	COPY(regs[14]);	COPY(regs[15]);
+	COPY(regs[16]);	COPY(regs[17]);	COPY(regs[18]);	COPY(regs[19]);
+	COPY(regs[20]);	COPY(regs[21]);	COPY(regs[22]);	COPY(regs[23]);
+	COPY(regs[24]);	COPY(regs[25]);	COPY(regs[26]);	COPY(regs[27]);
+	COPY(regs[28]);	COPY(regs[29]);	COPY(regs[30]);	COPY(regs[31]);
+	COPY(regs[32]);	COPY(regs[33]);	COPY(regs[34]);	COPY(regs[35]);
+	COPY(regs[36]);	COPY(regs[37]);	COPY(regs[38]);	COPY(regs[39]);
+	COPY(regs[40]);	COPY(regs[41]);	COPY(regs[42]);	COPY(regs[43]);
+	COPY(regs[44]);	COPY(regs[45]);	COPY(regs[46]);	COPY(regs[47]);
+	COPY(regs[48]);	COPY(regs[49]);	COPY(regs[50]);	COPY(regs[51]);
+	COPY(regs[52]);	COPY(regs[53]);	COPY(regs[54]);	COPY(regs[55]);
+	COPY(regs[56]);	COPY(regs[57]);	COPY(regs[58]);	COPY(regs[59]);
+	COPY(regs[60]);	COPY(regs[61]);	COPY(regs[62]);
+	COPY(tregs[0]);	COPY(tregs[1]);	COPY(tregs[2]);	COPY(tregs[3]);
+	COPY(tregs[4]);	COPY(tregs[5]);	COPY(tregs[6]);	COPY(tregs[7]);
+
+        /* Prevent the signal handler manipulating SR in a way that can
+           crash the kernel. i.e. only allow S, Q, M, PR, SZ, FR to be
+           modified */
+        current_sr = regs->sr;
+        err |= __get_user(new_sr, &sc->sc_sr);
+        regs->sr &= SR_MASK;
+        regs->sr |= (new_sr & ~SR_MASK);
+
+	COPY(pc);
+
+#undef COPY
+
+	/* Must do this last in case it sets regs->sr.fd (i.e. after rest of sr
+	 * has been restored above.) */
+	err |= restore_sigcontext_fpu(regs, sc);
+
+	regs->syscall_nr = -1;		/* disable syscall checks */
+	err |= __get_user(*r2_p, &sc->sc_regs[REG_RET]);
+	return err;
+}
+
+asmlinkage int sys_sigreturn(unsigned long r2, unsigned long r3,
+				   unsigned long r4, unsigned long r5,
+				   unsigned long r6, unsigned long r7,
+				   struct pt_regs * regs)
+{
+	struct sigframe __user *frame = (struct sigframe __user *) (long) REF_REG_SP;
+	sigset_t set;
+	long long ret;
+
+	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+		goto badframe;
+
+	if (__get_user(set.sig[0], &frame->sc.oldmask)
+	    || (_NSIG_WORDS > 1
+		&& __copy_from_user(&set.sig[1], &frame->extramask,
+				    sizeof(frame->extramask))))
+		goto badframe;
+
+	sigdelsetmask(&set, ~_BLOCKABLE);
+
+	spin_lock_irq(&current->sighand->siglock);
+	current->blocked = set;
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	if (restore_sigcontext(regs, &frame->sc, &ret))
+		goto badframe;
+	regs->pc -= 4;
+
+	return (int) ret;
+
+badframe:
+	force_sig(SIGSEGV, current);
+	return 0;
+}
+
+asmlinkage int sys_rt_sigreturn(unsigned long r2, unsigned long r3,
+				unsigned long r4, unsigned long r5,
+				unsigned long r6, unsigned long r7,
+				struct pt_regs * regs)
+{
+	struct rt_sigframe __user *frame = (struct rt_sigframe __user *) (long) REF_REG_SP;
+	sigset_t set;
+	stack_t __user st;
+	long long ret;
+
+	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+		goto badframe;
+
+	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
+		goto badframe;
+
+	sigdelsetmask(&set, ~_BLOCKABLE);
+	spin_lock_irq(&current->sighand->siglock);
+	current->blocked = set;
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ret))
+		goto badframe;
+	regs->pc -= 4;
+
+	if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
+		goto badframe;
+	/* It is more difficult to avoid calling this function than to
+	   call it and ignore errors.  */
+	do_sigaltstack(&st, NULL, REF_REG_SP);
+
+	return (int) ret;
+
+badframe:
+	force_sig(SIGSEGV, current);
+	return 0;
+}
+
+/*
+ * Set up a signal frame.
+ */
+
+static int
+setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
+		 unsigned long mask)
+{
+	int err = 0;
+
+	/* Do this first, otherwise is this sets sr->fd, that value isn't preserved. */
+	err |= setup_sigcontext_fpu(regs, sc);
+
+#define COPY(x)		err |= __put_user(regs->x, &sc->sc_##x)
+
+	COPY(regs[0]);	COPY(regs[1]);	COPY(regs[2]);	COPY(regs[3]);
+	COPY(regs[4]);	COPY(regs[5]);	COPY(regs[6]);	COPY(regs[7]);
+	COPY(regs[8]);	COPY(regs[9]);	COPY(regs[10]);	COPY(regs[11]);
+	COPY(regs[12]);	COPY(regs[13]);	COPY(regs[14]);	COPY(regs[15]);
+	COPY(regs[16]);	COPY(regs[17]);	COPY(regs[18]);	COPY(regs[19]);
+	COPY(regs[20]);	COPY(regs[21]);	COPY(regs[22]);	COPY(regs[23]);
+	COPY(regs[24]);	COPY(regs[25]);	COPY(regs[26]);	COPY(regs[27]);
+	COPY(regs[28]);	COPY(regs[29]);	COPY(regs[30]);	COPY(regs[31]);
+	COPY(regs[32]);	COPY(regs[33]);	COPY(regs[34]);	COPY(regs[35]);
+	COPY(regs[36]);	COPY(regs[37]);	COPY(regs[38]);	COPY(regs[39]);
+	COPY(regs[40]);	COPY(regs[41]);	COPY(regs[42]);	COPY(regs[43]);
+	COPY(regs[44]);	COPY(regs[45]);	COPY(regs[46]);	COPY(regs[47]);
+	COPY(regs[48]);	COPY(regs[49]);	COPY(regs[50]);	COPY(regs[51]);
+	COPY(regs[52]);	COPY(regs[53]);	COPY(regs[54]);	COPY(regs[55]);
+	COPY(regs[56]);	COPY(regs[57]);	COPY(regs[58]);	COPY(regs[59]);
+	COPY(regs[60]);	COPY(regs[61]);	COPY(regs[62]);
+	COPY(tregs[0]);	COPY(tregs[1]);	COPY(tregs[2]);	COPY(tregs[3]);
+	COPY(tregs[4]);	COPY(tregs[5]);	COPY(tregs[6]);	COPY(tregs[7]);
+	COPY(sr);	COPY(pc);
+
+#undef COPY
+
+	err |= __put_user(mask, &sc->oldmask);
+
+	return err;
+}
+
+/*
+ * Determine which stack to use..
+ */
+static inline void __user *
+get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
+{
+	if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp))
+		sp = current->sas_ss_sp + current->sas_ss_size;
+
+	return (void __user *)((sp - frame_size) & -8ul);
+}
+
+void sa_default_restorer(void);		/* See comments below */
+void sa_default_rt_restorer(void);	/* See comments below */
+
+static void setup_frame(int sig, struct k_sigaction *ka,
+			sigset_t *set, struct pt_regs *regs)
+{
+	struct sigframe __user *frame;
+	int err = 0;
+	int signal;
+
+	frame = get_sigframe(ka, regs->regs[REG_SP], sizeof(*frame));
+
+	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
+		goto give_sigsegv;
+
+	signal = current_thread_info()->exec_domain
+		&& current_thread_info()->exec_domain->signal_invmap
+		&& sig < 32
+		? current_thread_info()->exec_domain->signal_invmap[sig]
+		: sig;
+
+	err |= setup_sigcontext(&frame->sc, regs, set->sig[0]);
+
+	/* Give up earlier as i386, in case */
+	if (err)
+		goto give_sigsegv;
+
+	if (_NSIG_WORDS > 1) {
+		err |= __copy_to_user(frame->extramask, &set->sig[1],
+				      sizeof(frame->extramask)); }
+
+	/* Give up earlier as i386, in case */
+	if (err)
+		goto give_sigsegv;
+
+	/* Set up to return from userspace.  If provided, use a stub
+	   already in userspace.  */
+	if (ka->sa.sa_flags & SA_RESTORER) {
+		DEREF_REG_PR = (unsigned long) ka->sa.sa_restorer | 0x1;
+
+		/*
+		 * On SH5 all edited pointers are subject to NEFF
+		 */
+		DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
+        		 	(DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
+	} else {
+		/*
+		 * Different approach on SH5.
+	         * . Endianness independent asm code gets placed in entry.S .
+		 *   This is limited to four ASM instructions corresponding
+		 *   to two long longs in size.
+		 * . err checking is done on the else branch only
+		 * . flush_icache_range() is called upon __put_user() only
+		 * . all edited pointers are subject to NEFF
+		 * . being code, linker turns ShMedia bit on, always
+		 *   dereference index -1.
+		 */
+		DEREF_REG_PR = (unsigned long) frame->retcode | 0x01;
+		DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
+        		 	(DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
+
+		if (__copy_to_user(frame->retcode,
+			(unsigned long long)sa_default_restorer & (~1), 16) != 0)
+			goto give_sigsegv;
+
+		/* Cohere the trampoline with the I-cache. */
+		flush_cache_sigtramp(DEREF_REG_PR-1, DEREF_REG_PR-1+16);
+	}
+
+	/*
+	 * Set up registers for signal handler.
+	 * All edited pointers are subject to NEFF.
+	 */
+	regs->regs[REG_SP] = (unsigned long) frame;
+	regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ?
+        		 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP];
+	regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
+
+        /* FIXME:
+           The glibc profiling support for SH-5 needs to be passed a sigcontext
+           so it can retrieve the PC.  At some point during 2003 the glibc
+           support was changed to receive the sigcontext through the 2nd
+           argument, but there are still versions of libc.so in use that use
+           the 3rd argument.  Until libc.so is stabilised, pass the sigcontext
+           through both 2nd and 3rd arguments.
+        */
+
+	regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->sc;
+	regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->sc;
+
+	regs->pc = (unsigned long) ka->sa.sa_handler;
+	regs->pc = (regs->pc & NEFF_SIGN) ? (regs->pc | NEFF_MASK) : regs->pc;
+
+	set_fs(USER_DS);
+
+#if DEBUG_SIG
+	/* Broken %016Lx */
+	printk("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
+		signal,
+		current->comm, current->pid, frame,
+		regs->pc >> 32, regs->pc & 0xffffffff,
+		DEREF_REG_PR >> 32, DEREF_REG_PR & 0xffffffff);
+#endif
+
+	return;
+
+give_sigsegv:
+	if (sig == SIGSEGV)
+		ka->sa.sa_handler = SIG_DFL;
+	force_sig(SIGSEGV, current);
+}
+
+static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+			   sigset_t *set, struct pt_regs *regs)
+{
+	struct rt_sigframe __user *frame;
+	int err = 0;
+	int signal;
+
+	frame = get_sigframe(ka, regs->regs[REG_SP], sizeof(*frame));
+
+	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
+		goto give_sigsegv;
+
+	signal = current_thread_info()->exec_domain
+		&& current_thread_info()->exec_domain->signal_invmap
+		&& sig < 32
+		? current_thread_info()->exec_domain->signal_invmap[sig]
+		: sig;
+
+	err |= __put_user(&frame->info, &frame->pinfo);
+	err |= __put_user(&frame->uc, &frame->puc);
+	err |= copy_siginfo_to_user(&frame->info, info);
+
+	/* Give up earlier as i386, in case */
+	if (err)
+		goto give_sigsegv;
+
+	/* Create the ucontext.  */
+	err |= __put_user(0, &frame->uc.uc_flags);
+	err |= __put_user(0, &frame->uc.uc_link);
+	err |= __put_user((void *)current->sas_ss_sp,
+			  &frame->uc.uc_stack.ss_sp);
+	err |= __put_user(sas_ss_flags(regs->regs[REG_SP]),
+			  &frame->uc.uc_stack.ss_flags);
+	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
+	err |= setup_sigcontext(&frame->uc.uc_mcontext,
+			        regs, set->sig[0]);
+	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
+
+	/* Give up earlier as i386, in case */
+	if (err)
+		goto give_sigsegv;
+
+	/* Set up to return from userspace.  If provided, use a stub
+	   already in userspace.  */
+	if (ka->sa.sa_flags & SA_RESTORER) {
+		DEREF_REG_PR = (unsigned long) ka->sa.sa_restorer | 0x1;
+
+		/*
+		 * On SH5 all edited pointers are subject to NEFF
+		 */
+		DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
+        		 	(DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
+	} else {
+		/*
+		 * Different approach on SH5.
+	         * . Endianness independent asm code gets placed in entry.S .
+		 *   This is limited to four ASM instructions corresponding
+		 *   to two long longs in size.
+		 * . err checking is done on the else branch only
+		 * . flush_icache_range() is called upon __put_user() only
+		 * . all edited pointers are subject to NEFF
+		 * . being code, linker turns ShMedia bit on, always
+		 *   dereference index -1.
+		 */
+
+		DEREF_REG_PR = (unsigned long) frame->retcode | 0x01;
+		DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
+        		 	(DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
+
+		if (__copy_to_user(frame->retcode,
+			(unsigned long long)sa_default_rt_restorer & (~1), 16) != 0)
+			goto give_sigsegv;
+
+		flush_icache_range(DEREF_REG_PR-1, DEREF_REG_PR-1+15);
+	}
+
+	/*
+	 * Set up registers for signal handler.
+	 * All edited pointers are subject to NEFF.
+	 */
+	regs->regs[REG_SP] = (unsigned long) frame;
+	regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ?
+        		 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP];
+	regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
+	regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->info;
+	regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext;
+	regs->pc = (unsigned long) ka->sa.sa_handler;
+	regs->pc = (regs->pc & NEFF_SIGN) ? (regs->pc | NEFF_MASK) : regs->pc;
+
+	set_fs(USER_DS);
+
+#if DEBUG_SIG
+	/* Broken %016Lx */
+	printk("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
+		signal,
+		current->comm, current->pid, frame,
+		regs->pc >> 32, regs->pc & 0xffffffff,
+		DEREF_REG_PR >> 32, DEREF_REG_PR & 0xffffffff);
+#endif
+
+	return;
+
+give_sigsegv:
+	if (sig == SIGSEGV)
+		ka->sa.sa_handler = SIG_DFL;
+	force_sig(SIGSEGV, current);
+}
+
+/*
+ * OK, we're invoking a handler
+ */
+
+static void
+handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
+	      struct pt_regs * regs)
+{
+	struct k_sigaction *ka = &current->sighand->action[sig-1];
+
+	/* Are we from a system call? */
+	if (regs->syscall_nr >= 0) {
+		/* If so, check system call restarting.. */
+		switch (regs->regs[REG_RET]) {
+			case -ERESTARTNOHAND:
+				regs->regs[REG_RET] = -EINTR;
+				break;
+
+			case -ERESTARTSYS:
+				if (!(ka->sa.sa_flags & SA_RESTART)) {
+					regs->regs[REG_RET] = -EINTR;
+					break;
+				}
+			/* fallthrough */
+			case -ERESTARTNOINTR:
+				/* Decode syscall # */
+				regs->regs[REG_RET] = regs->syscall_nr;
+				regs->pc -= 4;
+		}
+	}
+
+	/* Set up the stack frame */
+	if (ka->sa.sa_flags & SA_SIGINFO)
+		setup_rt_frame(sig, ka, info, oldset, regs);
+	else
+		setup_frame(sig, ka, oldset, regs);
+
+	if (ka->sa.sa_flags & SA_ONESHOT)
+		ka->sa.sa_handler = SIG_DFL;
+
+	if (!(ka->sa.sa_flags & SA_NODEFER)) {
+		spin_lock_irq(&current->sighand->siglock);
+		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+		sigaddset(&current->blocked,sig);
+		recalc_sigpending();
+		spin_unlock_irq(&current->sighand->siglock);
+	}
+}
+
+/*
+ * Note that 'init' is a special process: it doesn't get signals it doesn't
+ * want to handle. Thus you cannot kill init even with a SIGKILL even by
+ * mistake.
+ *
+ * Note that we go through the signals twice: once to check the signals that
+ * the kernel can handle, and then we build all the user-level signal handling
+ * stack-frames in one go after that.
+ */
+int do_signal(struct pt_regs *regs, sigset_t *oldset)
+{
+	siginfo_t info;
+	int signr;
+
+	/*
+	 * We want the common case to go fast, which
+	 * is why we may in certain cases get here from
+	 * kernel mode. Just return without doing anything
+	 * if so.
+	 */
+	if (!user_mode(regs))
+		return 1;
+
+	if (current->flags & PF_FREEZE) {
+		refrigerator(0);
+		goto no_signal;
+		}
+
+	if (!oldset)
+		oldset = &current->blocked;
+
+	signr = get_signal_to_deliver(&info, regs, 0);
+
+	if (signr > 0) {
+		/* Whee!  Actually deliver the signal.  */
+		handle_signal(signr, &info, oldset, regs);
+		return 1;
+	}
+
+no_signal:
+	/* Did we come from a system call? */
+	if (regs->syscall_nr >= 0) {
+		/* Restart the system call - no handlers present */
+		if (regs->regs[REG_RET] == -ERESTARTNOHAND ||
+		    regs->regs[REG_RET] == -ERESTARTSYS ||
+		    regs->regs[REG_RET] == -ERESTARTNOINTR) {
+			/* Decode Syscall # */
+			regs->regs[REG_RET] = regs->syscall_nr;
+			regs->pc -= 4;
+		}
+	}
+	return 0;
+}
--- diff/arch/sh64/kernel/switchto.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/switchto.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,199 @@
+/*
+ * arch/sh64/kernel/switchto.S
+ *
+ * sh64 context switch
+ *
+ * Copyright (C) 2004  Richard Curnow
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+*/
+
+	.section .text..SHmedia32,"ax"
+	.little
+
+	.balign 32
+
+	.type sh64_switch_to,@function
+	.global sh64_switch_to
+	.global __sh64_switch_to_end
+sh64_switch_to:
+
+/* Incoming args
+   r2 - prev
+   r3 - &prev->thread
+   r4 - next
+   r5 - &next->thread
+
+   Outgoing results
+   r2 - last (=prev)
+
+   Want to create a full (struct pt_regs) on the stack to allow backtracing
+   functions to work.  However, we only need to populate the callee-save
+   register slots in this structure; since we're a function our ancestors must
+   have themselves preserved all caller saved state in the stack.  This saves
+   some wasted effort since we won't need to look at the values.
+
+   In particular, all caller-save registers are immediately available for
+   scratch use.
+
+*/
+
+#define FRAME_SIZE (76*8 + 8)
+
+	movi	FRAME_SIZE, r0
+	sub.l	r15, r0, r15
+	! Do normal-style register save to support backtrace
+
+	st.l	r15,   0, r18	! save link reg
+	st.l	r15,   4, r14	! save fp
+	add.l	r15, r63, r14	! setup frame pointer
+
+	! hopefully this looks normal to the backtrace now.
+
+	addi.l	r15,   8, r1    ! base of pt_regs
+	addi.l	r1,   24, r0    ! base of pt_regs.regs
+	addi.l	r0, (63*8), r8	! base of pt_regs.trregs
+
+	/* Note : to be fixed?
+	   struct pt_regs is really designed for holding the state on entry
+	   to an exception, i.e. pc,sr,regs etc.  However, for the context
+	   switch state, some of this is not required.  But the unwinder takes
+	   struct pt_regs * as an arg so we have to build this structure
+	   to allow unwinding switched tasks in show_state() */
+
+	st.q	r0, ( 9*8), r9
+	st.q	r0, (10*8), r10
+	st.q	r0, (11*8), r11
+	st.q	r0, (12*8), r12
+	st.q	r0, (13*8), r13
+	st.q	r0, (14*8), r14 ! for unwind, want to look as though we took a trap at
+	! the point where the process is left in suspended animation, i.e. current
+	! fp here, not the saved one.
+	st.q	r0, (16*8), r16
+
+	st.q	r0, (24*8), r24
+	st.q	r0, (25*8), r25
+	st.q	r0, (26*8), r26
+	st.q	r0, (27*8), r27
+	st.q	r0, (28*8), r28
+	st.q	r0, (29*8), r29
+	st.q	r0, (30*8), r30
+	st.q	r0, (31*8), r31
+	st.q	r0, (32*8), r32
+	st.q	r0, (33*8), r33
+	st.q	r0, (34*8), r34
+	st.q	r0, (35*8), r35
+
+	st.q	r0, (44*8), r44
+	st.q	r0, (45*8), r45
+	st.q	r0, (46*8), r46
+	st.q	r0, (47*8), r47
+	st.q	r0, (48*8), r48
+	st.q	r0, (49*8), r49
+	st.q	r0, (50*8), r50
+	st.q	r0, (51*8), r51
+	st.q	r0, (52*8), r52
+	st.q	r0, (53*8), r53
+	st.q	r0, (54*8), r54
+	st.q	r0, (55*8), r55
+	st.q	r0, (56*8), r56
+	st.q	r0, (57*8), r57
+	st.q	r0, (58*8), r58
+	st.q	r0, (59*8), r59
+
+	! do this early as pta->gettr has no pipeline forwarding (=> 5 cycle latency)
+	! Use a local label to avoid creating a symbol that will confuse the !
+	! backtrace
+	pta	.Lsave_pc, tr0
+
+	gettr	tr5, r45
+	gettr	tr6, r46
+	gettr	tr7, r47
+	st.q	r8, (5*8), r45
+	st.q	r8, (6*8), r46
+	st.q	r8, (7*8), r47
+
+	! Now switch context
+	gettr	tr0, r9
+	st.l	r3, 0, r15	! prev->thread.sp
+	st.l	r3, 8, r1	! prev->thread.kregs
+	st.l	r3, 4, r9	! prev->thread.pc
+	st.q	r1, 0, r9	! save prev->thread.pc into pt_regs->pc
+
+	! Load PC for next task (init value or save_pc later)
+	ld.l	r5, 4, r18	! next->thread.pc
+	! Switch stacks
+	ld.l	r5, 0, r15	! next->thread.sp
+	ptabs	r18, tr0
+
+	! Update current
+	ld.l	r4, 4, r9	! next->thread_info (2nd element of next task_struct)
+	putcon	r9, kcr0	! current = next->thread_info
+
+	! go to save_pc for a reschedule, or the initial thread.pc for a new process
+	blink	tr0, r63
+
+	! Restore (when we come back to a previously saved task)
+.Lsave_pc:
+	addi.l	r15, 32, r0	! r0 = next's regs
+	addi.l	r0, (63*8), r8	! r8 = next's tr_regs
+
+	ld.q	r8, (5*8), r45
+	ld.q	r8, (6*8), r46
+	ld.q	r8, (7*8), r47
+	ptabs	r45, tr5
+	ptabs	r46, tr6
+	ptabs	r47, tr7
+
+	ld.q	r0, ( 9*8), r9
+	ld.q	r0, (10*8), r10
+	ld.q	r0, (11*8), r11
+	ld.q	r0, (12*8), r12
+	ld.q	r0, (13*8), r13
+	ld.q	r0, (14*8), r14
+	ld.q	r0, (16*8), r16
+
+	ld.q	r0, (24*8), r24
+	ld.q	r0, (25*8), r25
+	ld.q	r0, (26*8), r26
+	ld.q	r0, (27*8), r27
+	ld.q	r0, (28*8), r28
+	ld.q	r0, (29*8), r29
+	ld.q	r0, (30*8), r30
+	ld.q	r0, (31*8), r31
+	ld.q	r0, (32*8), r32
+	ld.q	r0, (33*8), r33
+	ld.q	r0, (34*8), r34
+	ld.q	r0, (35*8), r35
+
+	ld.q	r0, (44*8), r44
+	ld.q	r0, (45*8), r45
+	ld.q	r0, (46*8), r46
+	ld.q	r0, (47*8), r47
+	ld.q	r0, (48*8), r48
+	ld.q	r0, (49*8), r49
+	ld.q	r0, (50*8), r50
+	ld.q	r0, (51*8), r51
+	ld.q	r0, (52*8), r52
+	ld.q	r0, (53*8), r53
+	ld.q	r0, (54*8), r54
+	ld.q	r0, (55*8), r55
+	ld.q	r0, (56*8), r56
+	ld.q	r0, (57*8), r57
+	ld.q	r0, (58*8), r58
+	ld.q	r0, (59*8), r59
+
+	! epilogue
+	ld.l	r15, 0, r18
+	ld.l	r15, 4, r14
+	ori	r4, 0, r2	! last = prev
+	ptabs	r18, tr0
+	movi	FRAME_SIZE, r0
+	add	r15, r0, r15
+	blink	tr0, r63
+__sh64_switch_to_end:
+.LFE1:
+	.size	sh64_switch_to,.LFE1-sh64_switch_to
+
--- diff/arch/sh64/kernel/sys_sh64.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/sys_sh64.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,286 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/sys_sh64.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * This file contains various random system calls that
+ * have a non-standard calling sequence on the Linux/SH5
+ * platform.
+ *
+ * Mostly taken from i386 version.
+ *
+ */
+
+#include <linux/errno.h>
+#include <linux/rwsem.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/sem.h>
+#include <linux/msg.h>
+#include <linux/shm.h>
+#include <linux/stat.h>
+#include <linux/mman.h>
+#include <linux/file.h>
+#include <linux/utsname.h>
+#include <linux/syscalls.h>
+#include <asm/uaccess.h>
+#include <asm/ipc.h>
+#include <asm/ptrace.h>
+
+#define REG_3	3
+
+/*
+ * sys_pipe() is the normal C calling standard for creating
+ * a pipe. It's not the way Unix traditionally does this, though.
+ */
+#ifdef NEW_PIPE_IMPLEMENTATION
+asmlinkage int sys_pipe(unsigned long * fildes,
+			unsigned long   dummy_r3,
+			unsigned long   dummy_r4,
+			unsigned long   dummy_r5,
+			unsigned long   dummy_r6,
+			unsigned long   dummy_r7,
+			struct pt_regs * regs)	   /* r8 = pt_regs  forced by entry.S */
+{
+	int fd[2];
+	int ret;
+
+	ret = do_pipe(fd);
+	if (ret == 0)
+		/*
+		 ***********************************************************************
+		 *   To avoid the copy_to_user we prefer to break the ABIs convention, *
+		 *   packing the valid pair of file IDs into a single register (r3);   *
+		 *   while r2 is the return code as defined by the sh5-ABIs.	       *
+		 *   BE CAREFUL: pipe stub, into glibc, must be aware of this solution *
+		 ***********************************************************************
+
+#ifdef __LITTLE_ENDIAN__
+		regs->regs[REG_3] = (((unsigned long long) fd[1]) << 32) | ((unsigned long long) fd[0]);
+#else
+		regs->regs[REG_3] = (((unsigned long long) fd[0]) << 32) | ((unsigned long long) fd[1]);
+#endif
+
+		*/
+	       /* although not very clever this is endianess independent */
+		regs->regs[REG_3] = (unsigned long long) *((unsigned long long *) fd);
+
+	return ret;
+}
+
+#else
+asmlinkage int sys_pipe(unsigned long * fildes)
+{
+        int fd[2];
+        int error;
+
+        error = do_pipe(fd);
+        if (!error) {
+                if (copy_to_user(fildes, fd, 2*sizeof(int)))
+                        error = -EFAULT;
+        }
+        return error;
+}
+
+#endif
+
+/*
+ * To avoid cache alias, we map the shard page with same color.
+ */
+#define COLOUR_ALIGN(addr)	(((addr)+SHMLBA-1)&~(SHMLBA-1))
+
+unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
+	unsigned long len, unsigned long pgoff, unsigned long flags)
+{
+	struct vm_area_struct *vma;
+
+	if (flags & MAP_FIXED) {
+		/* We do not accept a shared mapping if it would violate
+		 * cache aliasing constraints.
+		 */
+		if ((flags & MAP_SHARED) && (addr & (SHMLBA - 1)))
+			return -EINVAL;
+		return addr;
+	}
+
+	if (len > TASK_SIZE)
+		return -ENOMEM;
+	if (!addr)
+		addr = TASK_UNMAPPED_BASE;
+
+	if (flags & MAP_PRIVATE)
+		addr = PAGE_ALIGN(addr);
+	else
+		addr = COLOUR_ALIGN(addr);
+
+	for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {
+		/* At this point:  (!vma || addr < vma->vm_end). */
+		if (TASK_SIZE - len < addr)
+			return -ENOMEM;
+		if (!vma || addr + len <= vma->vm_start)
+			return addr;
+		addr = vma->vm_end;
+		if (!(flags & MAP_PRIVATE))
+			addr = COLOUR_ALIGN(addr);
+	}
+}
+
+/* common code for old and new mmaps */
+static inline long do_mmap2(
+	unsigned long addr, unsigned long len,
+	unsigned long prot, unsigned long flags,
+	unsigned long fd, unsigned long pgoff)
+{
+	int error = -EBADF;
+	struct file * file = NULL;
+
+	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+	if (!(flags & MAP_ANONYMOUS)) {
+		file = fget(fd);
+		if (!file)
+			goto out;
+	}
+
+	down_write(&current->mm->mmap_sem);
+	error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+	up_write(&current->mm->mmap_sem);
+
+	if (file)
+		fput(file);
+out:
+	return error;
+}
+
+asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
+	unsigned long prot, unsigned long flags,
+	unsigned long fd, unsigned long pgoff)
+{
+	return do_mmap2(addr, len, prot, flags, fd, pgoff);
+}
+
+asmlinkage int old_mmap(unsigned long addr, unsigned long len,
+	unsigned long prot, unsigned long flags,
+	int fd, unsigned long off)
+{
+	if (off & ~PAGE_MASK)
+		return -EINVAL;
+	return do_mmap2(addr, len, prot, flags, fd, off>>PAGE_SHIFT);
+}
+
+/*
+ * sys_ipc() is the de-multiplexer for the SysV IPC calls..
+ *
+ * This is really horribly ugly.
+ */
+asmlinkage int sys_ipc(uint call, int first, int second,
+		       int third, void __user *ptr, long fifth)
+{
+	int version, ret;
+
+	version = call >> 16; /* hack for backward compatibility */
+	call &= 0xffff;
+
+	if (call <= SEMCTL)
+		switch (call) {
+		case SEMOP:
+			return sys_semtimedop(first, (struct sembuf __user *)ptr,
+					      second, NULL);
+		case SEMTIMEDOP:
+			return sys_semtimedop(first, (struct sembuf __user *)ptr,
+					      second,
+					      (const struct timespec __user *)fifth);
+		case SEMGET:
+			return sys_semget (first, second, third);
+		case SEMCTL: {
+			union semun fourth;
+			if (!ptr)
+				return -EINVAL;
+			if (get_user(fourth.__pad, (void * __user *) ptr))
+				return -EFAULT;
+			return sys_semctl (first, second, third, fourth);
+			}
+		default:
+			return -EINVAL;
+		}
+
+	if (call <= MSGCTL)
+		switch (call) {
+		case MSGSND:
+			return sys_msgsnd (first, (struct msgbuf __user *) ptr,
+					  second, third);
+		case MSGRCV:
+			switch (version) {
+			case 0: {
+				struct ipc_kludge tmp;
+				if (!ptr)
+					return -EINVAL;
+
+				if (copy_from_user(&tmp,
+						   (struct ipc_kludge __user *) ptr,
+						   sizeof (tmp)))
+					return -EFAULT;
+				return sys_msgrcv (first, tmp.msgp, second,
+						   tmp.msgtyp, third);
+				}
+			default:
+				return sys_msgrcv (first,
+						   (struct msgbuf __user *) ptr,
+						   second, fifth, third);
+			}
+		case MSGGET:
+			return sys_msgget ((key_t) first, second);
+		case MSGCTL:
+			return sys_msgctl (first, second,
+					   (struct msqid_ds __user *) ptr);
+		default:
+			return -EINVAL;
+		}
+	if (call <= SHMCTL)
+		switch (call) {
+		case SHMAT:
+			switch (version) {
+			default: {
+				ulong raddr;
+				ret = do_shmat (first, (char __user *) ptr,
+						 second, &raddr);
+				if (ret)
+					return ret;
+				return put_user (raddr, (ulong __user *) third);
+			}
+			case 1:	/* iBCS2 emulator entry point */
+				if (!segment_eq(get_fs(), get_ds()))
+					return -EINVAL;
+				return do_shmat (first, (char __user *) ptr,
+						  second, (ulong *) third);
+			}
+		case SHMDT:
+			return sys_shmdt ((char __user *)ptr);
+		case SHMGET:
+			return sys_shmget (first, second, third);
+		case SHMCTL:
+			return sys_shmctl (first, second,
+					   (struct shmid_ds __user *) ptr);
+		default:
+			return -EINVAL;
+		}
+
+	return -EINVAL;
+}
+
+asmlinkage int sys_uname(struct old_utsname * name)
+{
+	int err;
+	if (!name)
+		return -EFAULT;
+	down_read(&uts_sem);
+	err=copy_to_user(name, &system_utsname, sizeof (*name));
+	up_read(&uts_sem);
+	return err?-EFAULT:0;
+}
+
--- diff/arch/sh64/kernel/syscalls.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/syscalls.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,340 @@
+/*
+ * arch/sh64/kernel/syscalls.S
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2004  Paul Mundt
+ * Copyright (C) 2003, 2004 Richard Curnow
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/sys.h>
+
+	.section .text..SHmedia32,"ax"
+	.balign 32
+
+/*
+ * System calls jump table
+ */
+	.globl  sys_call_table
+sys_call_table:
+	.long sys_ni_syscall		/* 0  -  old "setup()" system call  */
+	.long sys_exit
+	.long sys_fork
+	.long sys_read
+	.long sys_write
+	.long sys_open			/* 5 */
+	.long sys_close
+	.long sys_waitpid
+	.long sys_creat
+	.long sys_link
+	.long sys_unlink		/* 10 */
+	.long sys_execve
+	.long sys_chdir
+	.long sys_time
+	.long sys_mknod
+	.long sys_chmod			/* 15 */
+	.long sys_lchown16
+	.long sys_ni_syscall	/* old break syscall holder */
+	.long sys_stat
+	.long sys_lseek
+	.long sys_getpid		/* 20 */
+	.long sys_mount
+	.long sys_oldumount
+	.long sys_setuid16
+	.long sys_getuid16
+	.long sys_stime			/* 25 */
+	.long sys_ptrace
+	.long sys_alarm
+	.long sys_fstat
+	.long sys_pause
+	.long sys_utime			/* 30 */
+	.long sys_ni_syscall	/* old stty syscall holder */
+	.long sys_ni_syscall	/* old gtty syscall holder */
+	.long sys_access
+	.long sys_nice
+	.long sys_ni_syscall		/* 35 */ /* old ftime syscall holder */
+	.long sys_sync
+	.long sys_kill
+	.long sys_rename
+	.long sys_mkdir
+	.long sys_rmdir			/* 40 */
+	.long sys_dup
+	.long sys_pipe
+	.long sys_times
+	.long sys_ni_syscall	/* old prof syscall holder */
+	.long sys_brk			/* 45 */
+	.long sys_setgid16
+	.long sys_getgid16
+	.long sys_signal
+	.long sys_geteuid16
+	.long sys_getegid16		/* 50 */
+	.long sys_acct
+	.long sys_umount		/* recycled never used phys( */
+	.long sys_ni_syscall	/* old lock syscall holder */
+	.long sys_ioctl
+	.long sys_fcntl			/* 55 */
+	.long sys_ni_syscall	/* old mpx syscall holder */
+	.long sys_setpgid
+	.long sys_ni_syscall	/* old ulimit syscall holder */
+	.long sys_ni_syscall	/* sys_olduname */
+	.long sys_umask			/* 60 */
+	.long sys_chroot
+	.long sys_ustat
+	.long sys_dup2
+	.long sys_getppid
+	.long sys_getpgrp		/* 65 */
+	.long sys_setsid
+	.long sys_sigaction
+	.long sys_sgetmask
+	.long sys_ssetmask
+	.long sys_setreuid16		/* 70 */
+	.long sys_setregid16
+	.long sys_sigsuspend
+	.long sys_sigpending
+	.long sys_sethostname
+	.long sys_setrlimit		/* 75 */
+	.long sys_old_getrlimit
+	.long sys_getrusage
+	.long sys_gettimeofday
+	.long sys_settimeofday
+	.long sys_getgroups16		/* 80 */
+	.long sys_setgroups16
+	.long sys_ni_syscall	/* sys_oldselect */
+	.long sys_symlink
+	.long sys_lstat
+	.long sys_readlink		/* 85 */
+	.long sys_uselib
+	.long sys_swapon
+	.long sys_reboot
+	.long old_readdir
+	.long old_mmap			/* 90 */
+	.long sys_munmap
+	.long sys_truncate
+	.long sys_ftruncate
+	.long sys_fchmod
+	.long sys_fchown16		/* 95 */
+	.long sys_getpriority
+	.long sys_setpriority
+	.long sys_ni_syscall	/* old profil syscall holder */
+	.long sys_statfs
+	.long sys_fstatfs		/* 100 */
+	.long sys_ni_syscall	/* ioperm */
+	.long sys_socketcall	/* Obsolete implementation of socket syscall */
+	.long sys_syslog
+	.long sys_setitimer
+	.long sys_getitimer		/* 105 */
+	.long sys_newstat
+	.long sys_newlstat
+	.long sys_newfstat
+	.long sys_uname
+	.long sys_ni_syscall		/* 110 */ /* iopl */
+	.long sys_vhangup
+	.long sys_ni_syscall	/* idle */
+	.long sys_ni_syscall	/* vm86old */
+	.long sys_wait4
+	.long sys_swapoff		/* 115 */
+	.long sys_sysinfo
+	.long sys_ipc		/* Obsolete ipc syscall implementation */
+	.long sys_fsync
+	.long sys_sigreturn
+	.long sys_clone			/* 120 */
+	.long sys_setdomainname
+	.long sys_newuname
+	.long sys_ni_syscall	/* sys_modify_ldt */
+	.long sys_adjtimex
+	.long sys_mprotect		/* 125 */
+	.long sys_sigprocmask
+	.long sys_ni_syscall		/* old "create_module" */
+	.long sys_init_module
+	.long sys_delete_module
+	.long sys_ni_syscall		/* 130: old "get_kernel_syms" */
+	.long sys_quotactl
+	.long sys_getpgid
+	.long sys_fchdir
+	.long sys_bdflush
+	.long sys_sysfs			/* 135 */
+	.long sys_personality
+	.long sys_ni_syscall	/* for afs_syscall */
+	.long sys_setfsuid16
+	.long sys_setfsgid16
+	.long sys_llseek		/* 140 */
+	.long sys_getdents
+	.long sys_select
+	.long sys_flock
+	.long sys_msync
+	.long sys_readv			/* 145 */
+	.long sys_writev
+	.long sys_getsid
+	.long sys_fdatasync
+	.long sys_sysctl
+	.long sys_mlock			/* 150 */
+	.long sys_munlock
+	.long sys_mlockall
+	.long sys_munlockall
+	.long sys_sched_setparam
+	.long sys_sched_getparam	/* 155 */
+	.long sys_sched_setscheduler
+	.long sys_sched_getscheduler
+	.long sys_sched_yield
+	.long sys_sched_get_priority_max
+	.long sys_sched_get_priority_min  /* 160 */
+	.long sys_sched_rr_get_interval
+	.long sys_nanosleep
+	.long sys_mremap
+	.long sys_setresuid16
+	.long sys_getresuid16		/* 165 */
+	.long sys_ni_syscall	/* vm86 */
+	.long sys_ni_syscall	/* old "query_module" */
+	.long sys_poll
+	.long sys_nfsservctl
+	.long sys_setresgid16		/* 170 */
+	.long sys_getresgid16
+	.long sys_prctl
+	.long sys_rt_sigreturn
+	.long sys_rt_sigaction
+	.long sys_rt_sigprocmask	/* 175 */
+	.long sys_rt_sigpending
+	.long sys_rt_sigtimedwait
+	.long sys_rt_sigqueueinfo
+	.long sys_rt_sigsuspend
+	.long sys_pread64		/* 180 */
+	.long sys_pwrite64
+	.long sys_chown16
+	.long sys_getcwd
+	.long sys_capget
+	.long sys_capset		/* 185 */
+	.long sys_sigaltstack
+	.long sys_sendfile
+	.long sys_ni_syscall	/* streams1 */
+	.long sys_ni_syscall	/* streams2 */
+	.long sys_vfork			/* 190 */
+	.long sys_getrlimit
+	.long sys_mmap2
+	.long sys_truncate64
+	.long sys_ftruncate64
+	.long sys_stat64		/* 195 */
+	.long sys_lstat64
+	.long sys_fstat64
+	.long sys_lchown
+	.long sys_getuid
+	.long sys_getgid		/* 200 */
+	.long sys_geteuid
+	.long sys_getegid
+	.long sys_setreuid
+	.long sys_setregid
+	.long sys_getgroups		/* 205 */
+	.long sys_setgroups
+	.long sys_fchown
+	.long sys_setresuid
+	.long sys_getresuid
+	.long sys_setresgid		/* 210 */
+	.long sys_getresgid
+	.long sys_chown
+	.long sys_setuid
+	.long sys_setgid
+	.long sys_setfsuid		/* 215 */
+	.long sys_setfsgid
+	.long sys_pivot_root
+	.long sys_mincore
+	.long sys_madvise
+	/* Broken-out socket family (maintain backwards compatibility in syscall
+	   numbering with 2.4) */
+	.long sys_socket		/* 220 */
+	.long sys_bind
+	.long sys_connect
+	.long sys_listen
+	.long sys_accept
+	.long sys_getsockname		/* 225 */
+	.long sys_getpeername
+	.long sys_socketpair
+	.long sys_send
+	.long sys_sendto
+	.long sys_recv			/* 230*/
+	.long sys_recvfrom
+	.long sys_shutdown
+	.long sys_setsockopt
+	.long sys_getsockopt
+	.long sys_sendmsg		/* 235 */
+	.long sys_recvmsg
+	/* Broken-out IPC family (maintain backwards compatibility in syscall
+	   numbering with 2.4) */
+	.long sys_semop
+	.long sys_semget
+	.long sys_semctl
+	.long sys_msgsnd		/* 240 */
+	.long sys_msgrcv
+	.long sys_msgget
+	.long sys_msgctl
+	.long sys_ni_syscall /* sys_shmatcall */
+	.long sys_shmdt			/* 245 */
+	.long sys_shmget
+	.long sys_shmctl
+	/* Rest of syscalls listed in 2.4 i386 unistd.h */
+	.long sys_getdents64
+	.long sys_fcntl64
+	.long sys_ni_syscall		/* 250 reserved for TUX */
+	.long sys_ni_syscall		/* Reserved for Security */
+	.long sys_gettid
+	.long sys_readahead
+	.long sys_setxattr
+	.long sys_lsetxattr		/* 255 */
+	.long sys_fsetxattr
+	.long sys_getxattr
+	.long sys_lgetxattr
+	.long sys_fgetxattr
+	.long sys_listxattr		/* 260 */
+	.long sys_llistxattr
+	.long sys_flistxattr
+	.long sys_removexattr
+	.long sys_lremovexattr
+	.long sys_fremovexattr  	/* 265 */
+	.long sys_tkill
+	.long sys_sendfile64
+	.long sys_futex
+	.long sys_sched_setaffinity
+	.long sys_sched_getaffinity	/* 270 */
+	.long sys_ni_syscall
+	.long sys_ni_syscall
+	.long sys_io_setup
+	.long sys_io_destroy
+	.long sys_io_getevents		/* 275 */
+	.long sys_io_submit
+	.long sys_io_cancel
+	.long sys_fadvise64
+	.long sys_ni_syscall
+	.long sys_exit_group		/* 280 */
+	/* Rest of new 2.6 syscalls */
+	.long sys_lookup_dcookie
+	.long sys_epoll_create
+	.long sys_epoll_ctl
+	.long sys_epoll_wait
+ 	.long sys_remap_file_pages	/* 285 */
+ 	.long sys_set_tid_address
+ 	.long sys_timer_create
+ 	.long sys_timer_settime
+ 	.long sys_timer_gettime
+ 	.long sys_timer_getoverrun	/* 290 */
+ 	.long sys_timer_delete
+ 	.long sys_clock_settime
+ 	.long sys_clock_gettime
+ 	.long sys_clock_getres
+ 	.long sys_clock_nanosleep	/* 295 */
+	.long sys_statfs64
+	.long sys_fstatfs64
+	.long sys_tgkill
+	.long sys_utimes
+ 	.long sys_fadvise64_64		/* 300 */
+	.long sys_ni_syscall	/* Reserved for vserver */
+	.long sys_ni_syscall	/* Reserved for mbind */
+	.long sys_ni_syscall	/* get_mempolicy */
+	.long sys_ni_syscall	/* set_mempolicy */
+	.long sys_mq_open		/* 305 */
+	.long sys_mq_unlink
+	.long sys_mq_timedsend
+	.long sys_mq_timedreceive
+	.long sys_mq_notify
+	.long sys_mq_getsetattr		/* 310 */
+
--- diff/arch/sh64/kernel/time.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/time.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,637 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/time.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ * Copyright (C) 2003  Richard Curnow
+ *
+ *    Original TMU/RTC code taken from sh version.
+ *    Copyright (C) 1999  Tetsuya Okada & Niibe Yutaka
+ *      Some code taken from i386 version.
+ *      Copyright (C) 1991, 1992, 1995  Linus Torvalds
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/rwsem.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/param.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/interrupt.h>
+#include <linux/time.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/profile.h>
+#include <linux/smp.h>
+
+#include <asm/registers.h>	 /* required by inline __asm__ stmt. */
+
+#include <asm/processor.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/delay.h>
+
+#include <linux/timex.h>
+#include <linux/irq.h>
+#include <asm/hardware.h>
+
+#define TMU_TOCR_INIT	0x00
+#define TMU0_TCR_INIT	0x0020
+#define TMU_TSTR_INIT	1
+
+/* RCR1 Bits */
+#define RCR1_CF		0x80	/* Carry Flag             */
+#define RCR1_CIE	0x10	/* Carry Interrupt Enable */
+#define RCR1_AIE	0x08	/* Alarm Interrupt Enable */
+#define RCR1_AF		0x01	/* Alarm Flag             */
+
+/* RCR2 Bits */
+#define RCR2_PEF	0x80	/* PEriodic interrupt Flag */
+#define RCR2_PESMASK	0x70	/* Periodic interrupt Set  */
+#define RCR2_RTCEN	0x08	/* ENable RTC              */
+#define RCR2_ADJ	0x04	/* ADJustment (30-second)  */
+#define RCR2_RESET	0x02	/* Reset bit               */
+#define RCR2_START	0x01	/* Start bit               */
+
+/* Clock, Power and Reset Controller */
+#define	CPRC_BLOCK_OFF	0x01010000
+#define CPRC_BASE	PHYS_PERIPHERAL_BLOCK + CPRC_BLOCK_OFF
+
+#define FRQCR		(cprc_base+0x0)
+#define WTCSR		(cprc_base+0x0018)
+#define STBCR		(cprc_base+0x0030)
+
+/* Time Management Unit */
+#define	TMU_BLOCK_OFF	0x01020000
+#define TMU_BASE	PHYS_PERIPHERAL_BLOCK + TMU_BLOCK_OFF
+#define TMU0_BASE	tmu_base + 0x8 + (0xc * 0x0)
+#define TMU1_BASE	tmu_base + 0x8 + (0xc * 0x1)
+#define TMU2_BASE	tmu_base + 0x8 + (0xc * 0x2)
+
+#define TMU_TOCR	tmu_base+0x0	/* Byte access */
+#define TMU_TSTR	tmu_base+0x4	/* Byte access */
+
+#define TMU0_TCOR	TMU0_BASE+0x0	/* Long access */
+#define TMU0_TCNT	TMU0_BASE+0x4	/* Long access */
+#define TMU0_TCR	TMU0_BASE+0x8	/* Word access */
+
+/* Real Time Clock */
+#define	RTC_BLOCK_OFF	0x01040000
+#define RTC_BASE	PHYS_PERIPHERAL_BLOCK + RTC_BLOCK_OFF
+
+#define R64CNT  	rtc_base+0x00
+#define RSECCNT 	rtc_base+0x04
+#define RMINCNT 	rtc_base+0x08
+#define RHRCNT  	rtc_base+0x0c
+#define RWKCNT  	rtc_base+0x10
+#define RDAYCNT 	rtc_base+0x14
+#define RMONCNT 	rtc_base+0x18
+#define RYRCNT  	rtc_base+0x1c	/* 16bit */
+#define RSECAR  	rtc_base+0x20
+#define RMINAR  	rtc_base+0x24
+#define RHRAR   	rtc_base+0x28
+#define RWKAR   	rtc_base+0x2c
+#define RDAYAR  	rtc_base+0x30
+#define RMONAR  	rtc_base+0x34
+#define RCR1    	rtc_base+0x38
+#define RCR2    	rtc_base+0x3c
+
+#ifndef BCD_TO_BIN
+#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
+#endif
+
+#ifndef BIN_TO_BCD
+#define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
+#endif
+
+#define TICK_SIZE (tick_nsec / 1000)
+
+extern unsigned long wall_jiffies;
+
+u64 jiffies_64 = INITIAL_JIFFIES;
+
+static unsigned long tmu_base, rtc_base;
+unsigned long cprc_base;
+
+/* Variables to allow interpolation of time of day to resolution better than a
+ * jiffy. */
+
+/* This is effectively protected by xtime_lock */
+static unsigned long ctc_last_interrupt;
+static unsigned long long usecs_per_jiffy = 1000000/HZ; /* Approximation */
+
+#define CTC_JIFFY_SCALE_SHIFT 40
+
+/* 2**CTC_JIFFY_SCALE_SHIFT / ctc_ticks_per_jiffy */
+static unsigned long long scaled_recip_ctc_ticks_per_jiffy;
+
+/* Estimate number of microseconds that have elapsed since the last timer tick,
+   by scaling the delta that has occured in the CTC register.
+
+   WARNING WARNING WARNING : This algorithm relies on the CTC decrementing at
+   the CPU clock rate.  If the CPU sleeps, the CTC stops counting.  Bear this
+   in mind if enabling SLEEP_WORKS in process.c.  In that case, this algorithm
+   probably needs to use TMU.TCNT0 instead.  This will work even if the CPU is
+   sleeping, though will be coarser.
+
+   FIXME : What if usecs_per_tick is moving around too much, e.g. if an adjtime
+   is running or if the freq or tick arguments of adjtimex are modified after
+   we have calibrated the scaling factor?  This will result in either a jump at
+   the end of a tick period, or a wrap backwards at the start of the next one,
+   if the application is reading the time of day often enough.  I think we
+   ought to do better than this.  For this reason, usecs_per_jiffy is left
+   separated out in the calculation below.  This allows some future hook into
+   the adjtime-related stuff in kernel/timer.c to remove this hazard.
+
+*/
+
+static unsigned long usecs_since_tick(void)
+{
+	unsigned long long current_ctc;
+	long ctc_ticks_since_interrupt;
+	unsigned long long ull_ctc_ticks_since_interrupt;
+	unsigned long result;
+
+	unsigned long long mul1_out;
+	unsigned long long mul1_out_high;
+	unsigned long long mul2_out_low, mul2_out_high;
+
+	/* Read CTC register */
+	asm ("getcon cr62, %0" : "=r" (current_ctc));
+	/* Note, the CTC counts down on each CPU clock, not up.
+	   Note(2), use long type to get correct wraparound arithmetic when
+	   the counter crosses zero. */
+	ctc_ticks_since_interrupt = (long) ctc_last_interrupt - (long) current_ctc;
+	ull_ctc_ticks_since_interrupt = (unsigned long long) ctc_ticks_since_interrupt;
+
+	/* Inline assembly to do 32x32x32->64 multiplier */
+	asm volatile ("mulu.l %1, %2, %0" :
+	     "=r" (mul1_out) :
+	     "r" (ull_ctc_ticks_since_interrupt), "r" (usecs_per_jiffy));
+
+	mul1_out_high = mul1_out >> 32;
+
+	asm volatile ("mulu.l %1, %2, %0" :
+	     "=r" (mul2_out_low) :
+	     "r" (mul1_out), "r" (scaled_recip_ctc_ticks_per_jiffy));
+
+#if 1
+	asm volatile ("mulu.l %1, %2, %0" :
+	     "=r" (mul2_out_high) :
+	     "r" (mul1_out_high), "r" (scaled_recip_ctc_ticks_per_jiffy));
+#endif
+
+	result = (unsigned long) (((mul2_out_high << 32) + mul2_out_low) >> CTC_JIFFY_SCALE_SHIFT);
+
+	return result;
+}
+
+void do_gettimeofday(struct timeval *tv)
+{
+	unsigned long flags;
+	unsigned long seq;
+	unsigned long usec, sec;
+
+	do {
+		seq = read_seqbegin_irqsave(&xtime_lock, flags);
+		usec = usecs_since_tick();
+		{
+			unsigned long lost = jiffies - wall_jiffies;
+
+			if (lost)
+				usec += lost * (1000000 / HZ);
+		}
+
+		sec = xtime.tv_sec;
+		usec += xtime.tv_nsec / 1000;
+	} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
+
+	while (usec >= 1000000) {
+		usec -= 1000000;
+		sec++;
+	}
+
+	tv->tv_sec = sec;
+	tv->tv_usec = usec;
+}
+
+int do_settimeofday(struct timespec *tv)
+{
+	time_t wtm_sec, sec = tv->tv_sec;
+	long wtm_nsec, nsec = tv->tv_nsec;
+
+	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
+		return -EINVAL;
+
+	write_seqlock_irq(&xtime_lock);
+	/*
+	 * This is revolting. We need to set "xtime" correctly. However, the
+	 * value in this location is the value at the most recent update of
+	 * wall time.  Discover what correction gettimeofday() would have
+	 * made, and then undo it!
+	 */
+	nsec -= 1000 * (usecs_since_tick() +
+				(jiffies - wall_jiffies) * (1000000 / HZ));
+
+	wtm_sec  = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
+	wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
+
+	set_normalized_timespec(&xtime, sec, nsec);
+	set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
+
+	time_adjust = 0;		/* stop active adjtime() */
+	time_status |= STA_UNSYNC;
+	time_maxerror = NTP_PHASE_LIMIT;
+	time_esterror = NTP_PHASE_LIMIT;
+	write_sequnlock_irq(&xtime_lock);
+	clock_was_set();
+
+	return 0;
+}
+
+static int set_rtc_time(unsigned long nowtime)
+{
+	int retval = 0;
+	int real_seconds, real_minutes, cmos_minutes;
+
+	ctrl_outb(RCR2_RESET, RCR2);  /* Reset pre-scaler & stop RTC */
+
+	cmos_minutes = ctrl_inb(RMINCNT);
+	BCD_TO_BIN(cmos_minutes);
+
+	/*
+	 * since we're only adjusting minutes and seconds,
+	 * don't interfere with hour overflow. This avoids
+	 * messing with unknown time zones but requires your
+	 * RTC not to be off by more than 15 minutes
+	 */
+	real_seconds = nowtime % 60;
+	real_minutes = nowtime / 60;
+	if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1)
+		real_minutes += 30;	/* correct for half hour time zone */
+	real_minutes %= 60;
+
+	if (abs(real_minutes - cmos_minutes) < 30) {
+		BIN_TO_BCD(real_seconds);
+		BIN_TO_BCD(real_minutes);
+		ctrl_outb(real_seconds, RSECCNT);
+		ctrl_outb(real_minutes, RMINCNT);
+	} else {
+		printk(KERN_WARNING
+		       "set_rtc_time: can't update from %d to %d\n",
+		       cmos_minutes, real_minutes);
+		retval = -1;
+	}
+
+	ctrl_outb(RCR2_RTCEN|RCR2_START, RCR2);  /* Start RTC */
+
+	return retval;
+}
+
+/* last time the RTC clock got updated */
+static long last_rtc_update = 0;
+
+static inline void sh64_do_profile(struct pt_regs *regs)
+{
+	extern int _stext;
+	unsigned long pc;
+
+	profile_hook(regs);
+
+	if (user_mode(regs))
+		return;
+
+	/* Don't profile cpu_idle..  */
+	if (!prof_buffer || !current->pid)
+		return;
+
+	pc = instruction_pointer(regs);
+	pc -= (unsigned long) &_stext;
+	pc >>= prof_shift;
+
+	/*
+	 * Don't ignore out-of-bounds PC values silently, put them into the
+	 * last histogram slot, so if present, they will show up as a sharp
+	 * peak.
+	 */
+	if (pc > prof_len - 1)
+		pc = prof_len - 1;
+
+	/* We could just be sloppy and not lock against a re-entry on this
+	   increment, but the profiling code won't always be linked in anyway. */
+	atomic_inc((atomic_t *)&prof_buffer[pc]);
+}
+
+/*
+ * timer_interrupt() needs to keep up the real-time clock,
+ * as well as call the "do_timer()" routine every clocktick
+ */
+static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	unsigned long long current_ctc;
+	asm ("getcon cr62, %0" : "=r" (current_ctc));
+	ctc_last_interrupt = (unsigned long) current_ctc;
+
+	do_timer(regs);
+
+	sh64_do_profile(regs);
+
+#ifdef CONFIG_HEARTBEAT
+	{
+		extern void heartbeat(void);
+
+		heartbeat();
+	}
+#endif
+
+	/*
+	 * If we have an externally synchronized Linux clock, then update
+	 * RTC clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
+	 * called as close as possible to 500 ms before the new second starts.
+	 */
+	if ((time_status & STA_UNSYNC) == 0 &&
+	    xtime.tv_sec > last_rtc_update + 660 &&
+	    (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
+	    (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {
+		if (set_rtc_time(xtime.tv_sec) == 0)
+			last_rtc_update = xtime.tv_sec;
+		else
+			last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
+	}
+}
+
+/*
+ * This is the same as the above, except we _also_ save the current
+ * Time Stamp Counter value at the time of the timer interrupt, so that
+ * we later on can estimate the time of day more exactly.
+ */
+static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	unsigned long timer_status;
+
+	/* Clear UNF bit */
+	timer_status = ctrl_inw(TMU0_TCR);
+	timer_status &= ~0x100;
+	ctrl_outw(timer_status, TMU0_TCR);
+
+	/*
+	 * Here we are in the timer irq handler. We just have irqs locally
+	 * disabled but we don't know if the timer_bh is running on the other
+	 * CPU. We need to avoid to SMP race with it. NOTE: we don' t need
+	 * the irq version of write_lock because as just said we have irq
+	 * locally disabled. -arca
+	 */
+	write_lock(&xtime_lock);
+	do_timer_interrupt(irq, NULL, regs);
+	write_unlock(&xtime_lock);
+
+	return IRQ_HANDLED;
+}
+
+static unsigned long get_rtc_time(void)
+{
+	unsigned int sec, min, hr, wk, day, mon, yr, yr100;
+
+ again:
+	do {
+		ctrl_outb(0, RCR1);  /* Clear CF-bit */
+		sec = ctrl_inb(RSECCNT);
+		min = ctrl_inb(RMINCNT);
+		hr  = ctrl_inb(RHRCNT);
+		wk  = ctrl_inb(RWKCNT);
+		day = ctrl_inb(RDAYCNT);
+		mon = ctrl_inb(RMONCNT);
+		yr  = ctrl_inw(RYRCNT);
+		yr100 = (yr >> 8);
+		yr &= 0xff;
+	} while ((ctrl_inb(RCR1) & RCR1_CF) != 0);
+
+	BCD_TO_BIN(yr100);
+	BCD_TO_BIN(yr);
+	BCD_TO_BIN(mon);
+	BCD_TO_BIN(day);
+	BCD_TO_BIN(hr);
+	BCD_TO_BIN(min);
+	BCD_TO_BIN(sec);
+
+	if (yr > 99 || mon < 1 || mon > 12 || day > 31 || day < 1 ||
+	    hr > 23 || min > 59 || sec > 59) {
+		printk(KERN_ERR
+		       "SH RTC: invalid value, resetting to 1 Jan 2000\n");
+		ctrl_outb(RCR2_RESET, RCR2);  /* Reset & Stop */
+		ctrl_outb(0, RSECCNT);
+		ctrl_outb(0, RMINCNT);
+		ctrl_outb(0, RHRCNT);
+		ctrl_outb(6, RWKCNT);
+		ctrl_outb(1, RDAYCNT);
+		ctrl_outb(1, RMONCNT);
+		ctrl_outw(0x2000, RYRCNT);
+		ctrl_outb(RCR2_RTCEN|RCR2_START, RCR2);  /* Start */
+		goto again;
+	}
+
+	return mktime(yr100 * 100 + yr, mon, day, hr, min, sec);
+}
+
+static __init unsigned int get_cpu_hz(void)
+{
+	unsigned int count;
+	unsigned long __dummy;
+	unsigned long ctc_val_init, ctc_val;
+
+	/*
+	** Regardless the toolchain, force the compiler to use the
+	** arbitrary register r3 as a clock tick counter.
+	** NOTE: r3 must be in accordance with rtc_interrupt()
+	*/
+	register unsigned long long  __rtc_irq_flag __asm__ ("r3");
+
+	sti();
+	do {} while (ctrl_inb(R64CNT) != 0);
+	ctrl_outb(RCR1_CIE, RCR1); /* Enable carry interrupt */
+
+	/*
+	 * r3 is arbitrary. CDC does not support "=z".
+	 */
+	ctc_val_init = 0xffffffff;
+	ctc_val = ctc_val_init;
+
+	asm volatile("gettr	tr0, %1\n\t"
+		     "putcon	%0, " __CTC "\n\t"
+		     "and	%2, r63, %2\n\t"
+		     "pta	$+4, tr0\n\t"
+		     "beq/l	%2, r63, tr0\n\t"
+		     "ptabs	%1, tr0\n\t"
+		     "getcon	" __CTC ", %0\n\t"
+		: "=r"(ctc_val), "=r" (__dummy), "=r" (__rtc_irq_flag)
+		: "0" (0));
+	cli();
+	/*
+	 * SH-3:
+	 * CPU clock = 4 stages * loop
+	 * tst    rm,rm      if id ex
+	 * bt/s   1b            if id ex
+	 * add    #1,rd            if id ex
+         *                            (if) pipe line stole
+	 * tst    rm,rm                  if id ex
+         * ....
+	 *
+	 *
+	 * SH-4:
+	 * CPU clock = 6 stages * loop
+	 * I don't know why.
+         * ....
+	 *
+	 * SH-5:
+	 * Use CTC register to count.  This approach returns the right value
+	 * even if the I-cache is disabled (e.g. whilst debugging.)
+	 *
+	 */
+
+	count = ctc_val_init - ctc_val; /* CTC counts down */
+
+#if defined (CONFIG_SH_SIMULATOR)
+	/*
+	 * Let's pretend we are a 5MHz SH-5 to avoid a too
+	 * little timer interval. Also to keep delay
+	 * calibration within a reasonable time.
+	 */
+	return 5000000;
+#else
+	/*
+	 * This really is count by the number of clock cycles
+         * by the ratio between a complete R64CNT
+         * wrap-around (128) and CUI interrupt being raised (64).
+	 */
+	return count*2;
+#endif
+}
+
+static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	ctrl_outb(0, RCR1);	/* Disable Carry Interrupts */
+	regs->regs[3] = 1;	/* Using r3 */
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL};
+static struct irqaction irq1  = { rtc_interrupt, SA_INTERRUPT, 0, "rtc", NULL, NULL};
+
+void __init time_init(void)
+{
+	unsigned int cpu_clock, master_clock, bus_clock, module_clock;
+	unsigned long interval;
+	unsigned long frqcr, ifc, pfc;
+	static int ifc_table[] = { 2, 4, 6, 8, 10, 12, 16, 24 };
+#define bfc_table ifc_table	/* Same */
+#define pfc_table ifc_table	/* Same */
+
+	tmu_base = onchip_remap(TMU_BASE, 1024, "TMU");
+	if (!tmu_base) {
+		panic("Unable to remap TMU\n");
+	}
+
+	rtc_base = onchip_remap(RTC_BASE, 1024, "RTC");
+	if (!rtc_base) {
+		panic("Unable to remap RTC\n");
+	}
+
+	cprc_base = onchip_remap(CPRC_BASE, 1024, "CPRC");
+	if (!cprc_base) {
+		panic("Unable to remap CPRC\n");
+	}
+
+	xtime.tv_sec = get_rtc_time();
+	xtime.tv_nsec = 0;
+
+	setup_irq(TIMER_IRQ, &irq0);
+	setup_irq(RTC_IRQ, &irq1);
+
+	/* Check how fast it is.. */
+	cpu_clock = get_cpu_hz();
+
+	/* Note careful order of operations to maintain reasonable precision and avoid overflow. */
+	scaled_recip_ctc_ticks_per_jiffy = ((1ULL << CTC_JIFFY_SCALE_SHIFT) / (unsigned long long)(cpu_clock / HZ));
+
+	disable_irq(RTC_IRQ);
+
+	printk("CPU clock: %d.%02dMHz\n",
+	       (cpu_clock / 1000000), (cpu_clock % 1000000)/10000);
+	{
+		unsigned short bfc;
+		frqcr = ctrl_inl(FRQCR);
+		ifc  = ifc_table[(frqcr>> 6) & 0x0007];
+		bfc  = bfc_table[(frqcr>> 3) & 0x0007];
+		pfc  = pfc_table[(frqcr>> 12) & 0x0007];
+		master_clock = cpu_clock * ifc;
+		bus_clock = master_clock/bfc;
+	}
+
+	printk("Bus clock: %d.%02dMHz\n",
+	       (bus_clock/1000000), (bus_clock % 1000000)/10000);
+	module_clock = master_clock/pfc;
+	printk("Module clock: %d.%02dMHz\n",
+	       (module_clock/1000000), (module_clock % 1000000)/10000);
+	interval = (module_clock/(HZ*4));
+
+	printk("Interval = %ld\n", interval);
+
+	current_cpu_data.cpu_clock    = cpu_clock;
+	current_cpu_data.master_clock = master_clock;
+	current_cpu_data.bus_clock    = bus_clock;
+	current_cpu_data.module_clock = module_clock;
+
+	/* Start TMU0 */
+	ctrl_outb(TMU_TOCR_INIT, TMU_TOCR);
+	ctrl_outw(TMU0_TCR_INIT, TMU0_TCR);
+	ctrl_outl(interval, TMU0_TCOR);
+	ctrl_outl(interval, TMU0_TCNT);
+	ctrl_outb(TMU_TSTR_INIT, TMU_TSTR);
+}
+
+void enter_deep_standby(void)
+{
+	/* Disable watchdog timer */
+	ctrl_outl(0xa5000000, WTCSR);
+	/* Configure deep standby on sleep */
+	ctrl_outl(0x03, STBCR);
+
+#ifdef CONFIG_SH_ALPHANUMERIC
+	{
+		extern void mach_alphanum(int position, unsigned char value);
+		extern void mach_alphanum_brightness(int setting);
+		char halted[] = "Halted. ";
+		int i;
+		mach_alphanum_brightness(6); /* dimmest setting above off */
+		for (i=0; i<8; i++) {
+			mach_alphanum(i, halted[i]);
+		}
+		asm __volatile__ ("synco");
+	}
+#endif
+
+	asm __volatile__ ("sleep");
+	asm __volatile__ ("synci");
+	asm __volatile__ ("nop");
+	asm __volatile__ ("nop");
+	asm __volatile__ ("nop");
+	asm __volatile__ ("nop");
+	panic("Unexpected wakeup!\n");
+}
+
+/*
+ * Scheduler clock - returns current time in nanosec units.
+ */
+unsigned long long sched_clock(void)
+{
+	return (unsigned long long)jiffies * (1000000000 / HZ);
+}
+
--- diff/arch/sh64/kernel/traps.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/traps.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,958 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/traps.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ * Copyright (C) 2003, 2004  Richard Curnow
+ *
+ */
+
+/*
+ * 'Traps.c' handles hardware traps and faults after we have saved some
+ * state in 'entry.S'.
+ */
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/ptrace.h>
+#include <linux/timer.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/spinlock.h>
+#include <linux/kallsyms.h>
+#include <linux/interrupt.h>
+#include <linux/sysctl.h>
+
+#include <asm/system.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+#include <asm/atomic.h>
+#include <asm/processor.h>
+#include <asm/pgtable.h>
+
+#undef DEBUG_EXCEPTION
+#ifdef DEBUG_EXCEPTION
+/* implemented in ../lib/dbg.c */
+extern void show_excp_regs(char *fname, int trapnr, int signr,
+			   struct pt_regs *regs);
+#else
+#define show_excp_regs(a, b, c, d)
+#endif
+
+static void do_unhandled_exception(int trapnr, int signr, char *str, char *fn_name,
+		unsigned long error_code, struct pt_regs *regs, struct task_struct *tsk);
+
+#define DO_ERROR(trapnr, signr, str, name, tsk) \
+asmlinkage void do_##name(unsigned long error_code, struct pt_regs *regs) \
+{ \
+	do_unhandled_exception(trapnr, signr, str, __stringify(name), error_code, regs, current); \
+}
+
+spinlock_t die_lock;
+
+void die(const char * str, struct pt_regs * regs, long err)
+{
+	console_verbose();
+	spin_lock_irq(&die_lock);
+	printk("%s: %lx\n", str, (err & 0xffffff));
+	show_regs(regs);
+	spin_unlock_irq(&die_lock);
+	do_exit(SIGSEGV);
+}
+
+static inline void die_if_kernel(const char * str, struct pt_regs * regs, long err)
+{
+	if (!user_mode(regs))
+		die(str, regs, err);
+}
+
+static void die_if_no_fixup(const char * str, struct pt_regs * regs, long err)
+{
+	if (!user_mode(regs)) {
+		const struct exception_table_entry *fixup;
+		fixup = search_exception_tables(regs->pc);
+		if (fixup) {
+			regs->pc = fixup->fixup;
+			return;
+		}
+		die(str, regs, err);
+	}
+}
+
+DO_ERROR(13, SIGILL,  "illegal slot instruction", illegal_slot_inst, current)
+DO_ERROR(87, SIGSEGV, "address error (exec)", address_error_exec, current)
+
+
+/* Implement misaligned load/store handling for kernel (and optionally for user
+   mode too).  Limitation : only SHmedia mode code is handled - there is no
+   handling at all for misaligned accesses occurring in SHcompact code yet. */
+
+static int misaligned_fixup(struct pt_regs *regs);
+
+asmlinkage void do_address_error_load(unsigned long error_code, struct pt_regs *regs)
+{
+	if (misaligned_fixup(regs) < 0) {
+		do_unhandled_exception(7, SIGSEGV, "address error(load)",
+				"do_address_error_load",
+				error_code, regs, current);
+	}
+	return;
+}
+
+asmlinkage void do_address_error_store(unsigned long error_code, struct pt_regs *regs)
+{
+	if (misaligned_fixup(regs) < 0) {
+		do_unhandled_exception(8, SIGSEGV, "address error(store)",
+				"do_address_error_store",
+				error_code, regs, current);
+	}
+	return;
+}
+
+#if defined(CONFIG_SH64_ID2815_WORKAROUND)
+
+#define OPCODE_INVALID      0
+#define OPCODE_USER_VALID   1
+#define OPCODE_PRIV_VALID   2
+
+/* getcon/putcon - requires checking which control register is referenced. */
+#define OPCODE_CTRL_REG     3
+
+/* Table of valid opcodes for SHmedia mode.
+   Form a 10-bit value by concatenating the major/minor opcodes i.e.
+   opcode[31:26,20:16].  The 6 MSBs of this value index into the following
+   array.  The 4 LSBs select the bit-pair in the entry (bits 1:0 correspond to
+   LSBs==4'b0000 etc). */
+static unsigned long shmedia_opcode_table[64] = {
+	0x55554044,0x54445055,0x15141514,0x14541414,0x00000000,0x10001000,0x01110055,0x04050015,
+	0x00000444,0xc0000000,0x44545515,0x40405555,0x55550015,0x10005555,0x55555505,0x04050000,
+	0x00000555,0x00000404,0x00040445,0x15151414,0x00000000,0x00000000,0x00000000,0x00000000,
+	0x00000055,0x40404444,0x00000404,0xc0009495,0x00000000,0x00000000,0x00000000,0x00000000,
+	0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,
+	0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,
+	0x80005050,0x04005055,0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,0x55555555,
+	0x81055554,0x00000404,0x55555555,0x55555555,0x00000000,0x00000000,0x00000000,0x00000000
+};
+
+void do_reserved_inst(unsigned long error_code, struct pt_regs *regs)
+{
+	/* Workaround SH5-101 cut2 silicon defect #2815 :
+	   in some situations, inter-mode branches from SHcompact -> SHmedia
+	   which should take ITLBMISS or EXECPROT exceptions at the target
+	   falsely take RESINST at the target instead. */
+
+	unsigned long opcode = 0x6ff4fff0; /* guaranteed reserved opcode */
+	unsigned long pc, aligned_pc;
+	int get_user_error;
+	int trapnr = 12;
+	int signr = SIGILL;
+	char *exception_name = "reserved_instruction";
+
+	pc = regs->pc;
+	if ((pc & 3) == 1) {
+		/* SHmedia : check for defect.  This requires executable vmas
+		   to be readable too. */
+		aligned_pc = pc & ~3;
+		if (!access_ok(VERIFY_READ, aligned_pc, sizeof(unsigned long))) {
+			get_user_error = -EFAULT;
+		} else {
+			get_user_error = __get_user(opcode, (unsigned long *)aligned_pc);
+		}
+		if (get_user_error >= 0) {
+			unsigned long index, shift;
+			unsigned long major, minor, combined;
+			unsigned long reserved_field;
+			reserved_field = opcode & 0xf; /* These bits are currently reserved as zero in all valid opcodes */
+			major = (opcode >> 26) & 0x3f;
+			minor = (opcode >> 16) & 0xf;
+			combined = (major << 4) | minor;
+			index = major;
+			shift = minor << 1;
+			if (reserved_field == 0) {
+				int opcode_state = (shmedia_opcode_table[index] >> shift) & 0x3;
+				switch (opcode_state) {
+					case OPCODE_INVALID:
+						/* Trap. */
+						break;
+					case OPCODE_USER_VALID:
+						/* Restart the instruction : the branch to the instruction will now be from an RTE
+						   not from SHcompact so the silicon defect won't be triggered. */
+						return;
+					case OPCODE_PRIV_VALID:
+						if (!user_mode(regs)) {
+							/* Should only ever get here if a module has
+							   SHcompact code inside it.  If so, the same fix up is needed. */
+							return; /* same reason */
+						}
+						/* Otherwise, user mode trying to execute a privileged instruction -
+						   fall through to trap. */
+						break;
+					case OPCODE_CTRL_REG:
+						/* If in privileged mode, return as above. */
+						if (!user_mode(regs)) return;
+						/* In user mode ... */
+						if (combined == 0x9f) { /* GETCON */
+							unsigned long regno = (opcode >> 20) & 0x3f;
+							if (regno >= 62) {
+								return;
+							}
+							/* Otherwise, reserved or privileged control register, => trap */
+						} else if (combined == 0x1bf) { /* PUTCON */
+							unsigned long regno = (opcode >> 4) & 0x3f;
+							if (regno >= 62) {
+								return;
+							}
+							/* Otherwise, reserved or privileged control register, => trap */
+						} else {
+							/* Trap */
+						}
+						break;
+					default:
+						/* Fall through to trap. */
+						break;
+				}
+			}
+			/* fall through to normal resinst processing */
+		} else {
+			/* Error trying to read opcode.  This typically means a
+			   real fault, not a RESINST any more.  So change the
+			   codes. */
+			trapnr = 87;
+			exception_name = "address error (exec)";
+			signr = SIGSEGV;
+		}
+	}
+
+	do_unhandled_exception(trapnr, signr, exception_name, "do_reserved_inst", error_code, regs, current);
+}
+
+#else /* CONFIG_SH64_ID2815_WORKAROUND */
+
+/* If the workaround isn't needed, this is just a straightforward reserved
+   instruction */
+DO_ERROR(12, SIGILL,  "reserved instruction", reserved_inst, current)
+
+#endif /* CONFIG_SH64_ID2815_WORKAROUND */
+
+
+#include <asm/system.h>
+
+/* Called with interrupts disabled */
+asmlinkage void do_exception_error(unsigned long ex, struct pt_regs *regs)
+{
+	PLS();
+	show_excp_regs(__FUNCTION__, -1, -1, regs);
+	die_if_kernel("exception", regs, ex);
+}
+
+int do_unknown_trapa(unsigned long scId, struct pt_regs *regs)
+{
+	/* Syscall debug */
+        printk("System call ID error: [0x1#args:8 #syscall:16  0x%lx]\n", scId);
+
+	die_if_kernel("unknown trapa", regs, scId);
+
+	return -ENOSYS;
+}
+
+void show_stack(struct task_struct *tsk, unsigned long *sp)
+{
+#ifdef CONFIG_KALLSYMS
+	extern void sh64_unwind(struct pt_regs *regs);
+	struct pt_regs *regs;
+
+	regs = tsk ? tsk->thread.kregs : NULL;
+
+	sh64_unwind(regs);
+#else
+	printk(KERN_ERR "Can't backtrace on sh64 without CONFIG_KALLSYMS\n");
+#endif
+}
+
+void show_task(unsigned long *sp)
+{
+	show_stack(NULL, sp);
+}
+
+void dump_stack(void)
+{
+	show_task(NULL);
+}
+
+static void do_unhandled_exception(int trapnr, int signr, char *str, char *fn_name,
+		unsigned long error_code, struct pt_regs *regs, struct task_struct *tsk)
+{
+	show_excp_regs(fn_name, trapnr, signr, regs);
+	tsk->thread.error_code = error_code;
+	tsk->thread.trap_no = trapnr;
+
+	if (user_mode(regs))
+		force_sig(signr, tsk);
+
+	die_if_no_fixup(str, regs, error_code);
+}
+
+static int read_opcode(unsigned long long pc, unsigned long *result_opcode, int from_user_mode)
+{
+	int get_user_error;
+	unsigned long aligned_pc;
+	unsigned long opcode;
+
+	if ((pc & 3) == 1) {
+		/* SHmedia */
+		aligned_pc = pc & ~3;
+		if (from_user_mode) {
+			if (!access_ok(VERIFY_READ, aligned_pc, sizeof(unsigned long))) {
+				get_user_error = -EFAULT;
+			} else {
+				get_user_error = __get_user(opcode, (unsigned long *)aligned_pc);
+				*result_opcode = opcode;
+			}
+			return get_user_error;
+		} else {
+			/* If the fault was in the kernel, we can either read
+			 * this directly, or if not, we fault.
+			*/
+			*result_opcode = *(unsigned long *) aligned_pc;
+			return 0;
+		}
+	} else if ((pc & 1) == 0) {
+		/* SHcompact */
+		/* TODO : provide handling for this.  We don't really support
+		   user-mode SHcompact yet, and for a kernel fault, this would
+		   have to come from a module built for SHcompact.  */
+		return -EFAULT;
+	} else {
+		/* misaligned */
+		return -EFAULT;
+	}
+}
+
+static int address_is_sign_extended(__u64 a)
+{
+	__u64 b;
+#if (NEFF == 32)
+	b = (__u64)(__s64)(__s32)(a & 0xffffffffUL);
+	return (b == a) ? 1 : 0;
+#else
+#error "Sign extend check only works for NEFF==32"
+#endif
+}
+
+static int generate_and_check_address(struct pt_regs *regs,
+				      __u32 opcode,
+				      int displacement_not_indexed,
+				      int width_shift,
+				      __u64 *address)
+{
+	/* return -1 for fault, 0 for OK */
+
+	__u64 base_address, addr;
+	int basereg;
+
+	basereg = (opcode >> 20) & 0x3f;
+	base_address = regs->regs[basereg];
+	if (displacement_not_indexed) {
+		__s64 displacement;
+		displacement = (opcode >> 10) & 0x3ff;
+		displacement = ((displacement << 54) >> 54); /* sign extend */
+		addr = (__u64)((__s64)base_address + (displacement << width_shift));
+	} else {
+		__u64 offset;
+		int offsetreg;
+		offsetreg = (opcode >> 10) & 0x3f;
+		offset = regs->regs[offsetreg];
+		addr = base_address + offset;
+	}
+
+	/* Check sign extended */
+	if (!address_is_sign_extended(addr)) {
+		return -1;
+	}
+
+#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
+	/* Check accessible.  For misaligned access in the kernel, assume the
+	   address is always accessible (and if not, just fault when the
+	   load/store gets done.) */
+	if (user_mode(regs)) {
+		if (addr >= TASK_SIZE) {
+			return -1;
+		}
+		/* Do access_ok check later - it depends on whether it's a load or a store. */
+	}
+#endif
+
+	*address = addr;
+	return 0;
+}
+
+/* Default value as for sh */
+#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
+static int user_mode_unaligned_fixup_count = 10;
+static int user_mode_unaligned_fixup_enable = 1;
+#endif
+
+static int kernel_mode_unaligned_fixup_count = 32;
+
+static void misaligned_kernel_word_load(__u64 address, int do_sign_extend, __u64 *result)
+{
+	unsigned short x;
+	unsigned char *p, *q;
+	p = (unsigned char *) (int) address;
+	q = (unsigned char *) &x;
+	q[0] = p[0];
+	q[1] = p[1];
+
+	if (do_sign_extend) {
+		*result = (__u64)(__s64) *(short *) &x;
+	} else {
+		*result = (__u64) x;
+	}
+}
+
+static void misaligned_kernel_word_store(__u64 address, __u64 value)
+{
+	unsigned short x;
+	unsigned char *p, *q;
+	p = (unsigned char *) (int) address;
+	q = (unsigned char *) &x;
+
+	x = (__u16) value;
+	p[0] = q[0];
+	p[1] = q[1];
+}
+
+static int misaligned_load(struct pt_regs *regs,
+			   __u32 opcode,
+			   int displacement_not_indexed,
+			   int width_shift,
+			   int do_sign_extend)
+{
+	/* Return -1 for a fault, 0 for OK */
+	int error;
+	int destreg;
+	__u64 address;
+
+	error = generate_and_check_address(regs, opcode,
+			displacement_not_indexed, width_shift, &address);
+	if (error < 0) {
+		return error;
+	}
+
+	destreg = (opcode >> 4) & 0x3f;
+#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
+	if (user_mode(regs)) {
+		__u64 buffer;
+
+		if (!access_ok(VERIFY_READ, (unsigned long) address, 1UL<<width_shift)) {
+			return -1;
+		}
+
+		if (__copy_user(&buffer, (const void *)(int)address, (1 << width_shift)) > 0) {
+			return -1; /* fault */
+		}
+		switch (width_shift) {
+		case 1:
+			if (do_sign_extend) {
+				regs->regs[destreg] = (__u64)(__s64) *(__s16 *) &buffer;
+			} else {
+				regs->regs[destreg] = (__u64) *(__u16 *) &buffer;
+			}
+			break;
+		case 2:
+			regs->regs[destreg] = (__u64)(__s64) *(__s32 *) &buffer;
+			break;
+		case 3:
+			regs->regs[destreg] = buffer;
+			break;
+		default:
+			printk("Unexpected width_shift %d in misaligned_load, PC=%08lx\n",
+				width_shift, (unsigned long) regs->pc);
+			break;
+		}
+	} else
+#endif
+	{
+		/* kernel mode - we can take short cuts since if we fault, it's a genuine bug */
+		__u64 lo, hi;
+
+		switch (width_shift) {
+		case 1:
+			misaligned_kernel_word_load(address, do_sign_extend, &regs->regs[destreg]);
+			break;
+		case 2:
+			asm ("ldlo.l %1, 0, %0" : "=r" (lo) : "r" (address));
+			asm ("ldhi.l %1, 3, %0" : "=r" (hi) : "r" (address));
+			regs->regs[destreg] = lo | hi;
+			break;
+		case 3:
+			asm ("ldlo.q %1, 0, %0" : "=r" (lo) : "r" (address));
+			asm ("ldhi.q %1, 7, %0" : "=r" (hi) : "r" (address));
+			regs->regs[destreg] = lo | hi;
+			break;
+
+		default:
+			printk("Unexpected width_shift %d in misaligned_load, PC=%08lx\n",
+				width_shift, (unsigned long) regs->pc);
+			break;
+		}
+	}
+
+	return 0;
+
+}
+
+static int misaligned_store(struct pt_regs *regs,
+			    __u32 opcode,
+			    int displacement_not_indexed,
+			    int width_shift)
+{
+	/* Return -1 for a fault, 0 for OK */
+	int error;
+	int srcreg;
+	__u64 address;
+
+	error = generate_and_check_address(regs, opcode,
+			displacement_not_indexed, width_shift, &address);
+	if (error < 0) {
+		return error;
+	}
+
+	srcreg = (opcode >> 4) & 0x3f;
+#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
+	if (user_mode(regs)) {
+		__u64 buffer;
+
+		if (!access_ok(VERIFY_WRITE, (unsigned long) address, 1UL<<width_shift)) {
+			return -1;
+		}
+
+		switch (width_shift) {
+		case 1:
+			*(__u16 *) &buffer = (__u16) regs->regs[srcreg];
+			break;
+		case 2:
+			*(__u32 *) &buffer = (__u32) regs->regs[srcreg];
+			break;
+		case 3:
+			buffer = regs->regs[srcreg];
+			break;
+		default:
+			printk("Unexpected width_shift %d in misaligned_store, PC=%08lx\n",
+				width_shift, (unsigned long) regs->pc);
+			break;
+		}
+
+		if (__copy_user((void *)(int)address, &buffer, (1 << width_shift)) > 0) {
+			return -1; /* fault */
+		}
+	} else
+#endif
+	{
+		/* kernel mode - we can take short cuts since if we fault, it's a genuine bug */
+		__u64 val = regs->regs[srcreg];
+
+		switch (width_shift) {
+		case 1:
+			misaligned_kernel_word_store(address, val);
+			break;
+		case 2:
+			asm ("stlo.l %1, 0, %0" : : "r" (val), "r" (address));
+			asm ("sthi.l %1, 3, %0" : : "r" (val), "r" (address));
+			break;
+		case 3:
+			asm ("stlo.q %1, 0, %0" : : "r" (val), "r" (address));
+			asm ("sthi.q %1, 7, %0" : : "r" (val), "r" (address));
+			break;
+
+		default:
+			printk("Unexpected width_shift %d in misaligned_store, PC=%08lx\n",
+				width_shift, (unsigned long) regs->pc);
+			break;
+		}
+	}
+
+	return 0;
+
+}
+
+#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
+/* Never need to fix up misaligned FPU accesses within the kernel since that's a real
+   error. */
+static int misaligned_fpu_load(struct pt_regs *regs,
+			   __u32 opcode,
+			   int displacement_not_indexed,
+			   int width_shift,
+			   int do_paired_load)
+{
+	/* Return -1 for a fault, 0 for OK */
+	int error;
+	int destreg;
+	__u64 address;
+
+	error = generate_and_check_address(regs, opcode,
+			displacement_not_indexed, width_shift, &address);
+	if (error < 0) {
+		return error;
+	}
+
+	destreg = (opcode >> 4) & 0x3f;
+	if (user_mode(regs)) {
+		__u64 buffer;
+		__u32 buflo, bufhi;
+
+		if (!access_ok(VERIFY_READ, (unsigned long) address, 1UL<<width_shift)) {
+			return -1;
+		}
+
+		if (__copy_user(&buffer, (const void *)(int)address, (1 << width_shift)) > 0) {
+			return -1; /* fault */
+		}
+		/* 'current' may be the current owner of the FPU state, so
+		   context switch the registers into memory so they can be
+		   indexed by register number. */
+		if (last_task_used_math == current) {
+			grab_fpu();
+			fpsave(&current->thread.fpu.hard);
+			release_fpu();
+			last_task_used_math = NULL;
+			regs->sr |= SR_FD;
+		}
+
+		buflo = *(__u32*) &buffer;
+		bufhi = *(1 + (__u32*) &buffer);
+
+		switch (width_shift) {
+		case 2:
+			current->thread.fpu.hard.fp_regs[destreg] = buflo;
+			break;
+		case 3:
+			if (do_paired_load) {
+				current->thread.fpu.hard.fp_regs[destreg] = buflo;
+				current->thread.fpu.hard.fp_regs[destreg+1] = bufhi;
+			} else {
+#if defined(CONFIG_LITTLE_ENDIAN)
+				current->thread.fpu.hard.fp_regs[destreg] = bufhi;
+				current->thread.fpu.hard.fp_regs[destreg+1] = buflo;
+#else
+				current->thread.fpu.hard.fp_regs[destreg] = buflo;
+				current->thread.fpu.hard.fp_regs[destreg+1] = bufhi;
+#endif
+			}
+			break;
+		default:
+			printk("Unexpected width_shift %d in misaligned_fpu_load, PC=%08lx\n",
+				width_shift, (unsigned long) regs->pc);
+			break;
+		}
+		return 0;
+	} else {
+		die ("Misaligned FPU load inside kernel", regs, 0);
+		return -1;
+	}
+
+
+}
+
+static int misaligned_fpu_store(struct pt_regs *regs,
+			   __u32 opcode,
+			   int displacement_not_indexed,
+			   int width_shift,
+			   int do_paired_load)
+{
+	/* Return -1 for a fault, 0 for OK */
+	int error;
+	int srcreg;
+	__u64 address;
+
+	error = generate_and_check_address(regs, opcode,
+			displacement_not_indexed, width_shift, &address);
+	if (error < 0) {
+		return error;
+	}
+
+	srcreg = (opcode >> 4) & 0x3f;
+	if (user_mode(regs)) {
+		__u64 buffer;
+		/* Initialise these to NaNs. */
+		__u32 buflo=0xffffffffUL, bufhi=0xffffffffUL;
+
+		if (!access_ok(VERIFY_WRITE, (unsigned long) address, 1UL<<width_shift)) {
+			return -1;
+		}
+
+		/* 'current' may be the current owner of the FPU state, so
+		   context switch the registers into memory so they can be
+		   indexed by register number. */
+		if (last_task_used_math == current) {
+			grab_fpu();
+			fpsave(&current->thread.fpu.hard);
+			release_fpu();
+			last_task_used_math = NULL;
+			regs->sr |= SR_FD;
+		}
+
+		switch (width_shift) {
+		case 2:
+			buflo = current->thread.fpu.hard.fp_regs[srcreg];
+			break;
+		case 3:
+			if (do_paired_load) {
+				buflo = current->thread.fpu.hard.fp_regs[srcreg];
+				bufhi = current->thread.fpu.hard.fp_regs[srcreg+1];
+			} else {
+#if defined(CONFIG_LITTLE_ENDIAN)
+				bufhi = current->thread.fpu.hard.fp_regs[srcreg];
+				buflo = current->thread.fpu.hard.fp_regs[srcreg+1];
+#else
+				buflo = current->thread.fpu.hard.fp_regs[srcreg];
+				bufhi = current->thread.fpu.hard.fp_regs[srcreg+1];
+#endif
+			}
+			break;
+		default:
+			printk("Unexpected width_shift %d in misaligned_fpu_store, PC=%08lx\n",
+				width_shift, (unsigned long) regs->pc);
+			break;
+		}
+
+		*(__u32*) &buffer = buflo;
+		*(1 + (__u32*) &buffer) = bufhi;
+		if (__copy_user((void *)(int)address, &buffer, (1 << width_shift)) > 0) {
+			return -1; /* fault */
+		}
+		return 0;
+	} else {
+		die ("Misaligned FPU load inside kernel", regs, 0);
+		return -1;
+	}
+}
+#endif
+
+static int misaligned_fixup(struct pt_regs *regs)
+{
+	unsigned long opcode;
+	int error;
+	int major, minor;
+
+#if !defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
+	/* Never fixup user mode misaligned accesses without this option enabled. */
+	return -1;
+#else
+	if (!user_mode_unaligned_fixup_enable) return -1;
+#endif
+
+	error = read_opcode(regs->pc, &opcode, user_mode(regs));
+	if (error < 0) {
+		return error;
+	}
+	major = (opcode >> 26) & 0x3f;
+	minor = (opcode >> 16) & 0xf;
+
+#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
+	if (user_mode(regs) && (user_mode_unaligned_fixup_count > 0)) {
+		--user_mode_unaligned_fixup_count;
+		/* Only do 'count' worth of these reports, to remove a potential DoS against syslog */
+		printk("Fixing up unaligned userspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n",
+		       current->comm, current->pid, (__u32)regs->pc, opcode);
+	} else
+#endif
+	if (!user_mode(regs) && (kernel_mode_unaligned_fixup_count > 0)) {
+		--kernel_mode_unaligned_fixup_count;
+		if (in_interrupt()) {
+			printk("Fixing up unaligned kernelspace access in interrupt pc=0x%08x ins=0x%08lx\n",
+			       (__u32)regs->pc, opcode);
+		} else {
+			printk("Fixing up unaligned kernelspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n",
+			       current->comm, current->pid, (__u32)regs->pc, opcode);
+		}
+	}
+
+
+	switch (major) {
+		case (0x84>>2): /* LD.W */
+			error = misaligned_load(regs, opcode, 1, 1, 1);
+			break;
+		case (0xb0>>2): /* LD.UW */
+			error = misaligned_load(regs, opcode, 1, 1, 0);
+			break;
+		case (0x88>>2): /* LD.L */
+			error = misaligned_load(regs, opcode, 1, 2, 1);
+			break;
+		case (0x8c>>2): /* LD.Q */
+			error = misaligned_load(regs, opcode, 1, 3, 0);
+			break;
+
+		case (0xa4>>2): /* ST.W */
+			error = misaligned_store(regs, opcode, 1, 1);
+			break;
+		case (0xa8>>2): /* ST.L */
+			error = misaligned_store(regs, opcode, 1, 2);
+			break;
+		case (0xac>>2): /* ST.Q */
+			error = misaligned_store(regs, opcode, 1, 3);
+			break;
+
+		case (0x40>>2): /* indexed loads */
+			switch (minor) {
+				case 0x1: /* LDX.W */
+					error = misaligned_load(regs, opcode, 0, 1, 1);
+					break;
+				case 0x5: /* LDX.UW */
+					error = misaligned_load(regs, opcode, 0, 1, 0);
+					break;
+				case 0x2: /* LDX.L */
+					error = misaligned_load(regs, opcode, 0, 2, 1);
+					break;
+				case 0x3: /* LDX.Q */
+					error = misaligned_load(regs, opcode, 0, 3, 0);
+					break;
+				default:
+					error = -1;
+					break;
+			}
+			break;
+
+		case (0x60>>2): /* indexed stores */
+			switch (minor) {
+				case 0x1: /* STX.W */
+					error = misaligned_store(regs, opcode, 0, 1);
+					break;
+				case 0x2: /* STX.L */
+					error = misaligned_store(regs, opcode, 0, 2);
+					break;
+				case 0x3: /* STX.Q */
+					error = misaligned_store(regs, opcode, 0, 3);
+					break;
+				default:
+					error = -1;
+					break;
+			}
+			break;
+
+#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
+		case (0x94>>2): /* FLD.S */
+			error = misaligned_fpu_load(regs, opcode, 1, 2, 0);
+			break;
+		case (0x98>>2): /* FLD.P */
+			error = misaligned_fpu_load(regs, opcode, 1, 3, 1);
+			break;
+		case (0x9c>>2): /* FLD.D */
+			error = misaligned_fpu_load(regs, opcode, 1, 3, 0);
+			break;
+		case (0x1c>>2): /* floating indexed loads */
+			switch (minor) {
+			case 0x8: /* FLDX.S */
+				error = misaligned_fpu_load(regs, opcode, 0, 2, 0);
+				break;
+			case 0xd: /* FLDX.P */
+				error = misaligned_fpu_load(regs, opcode, 0, 3, 1);
+				break;
+			case 0x9: /* FLDX.D */
+				error = misaligned_fpu_load(regs, opcode, 0, 3, 0);
+				break;
+			default:
+				error = -1;
+				break;
+			}
+			break;
+		case (0xb4>>2): /* FLD.S */
+			error = misaligned_fpu_store(regs, opcode, 1, 2, 0);
+			break;
+		case (0xb8>>2): /* FLD.P */
+			error = misaligned_fpu_store(regs, opcode, 1, 3, 1);
+			break;
+		case (0xbc>>2): /* FLD.D */
+			error = misaligned_fpu_store(regs, opcode, 1, 3, 0);
+			break;
+		case (0x3c>>2): /* floating indexed stores */
+			switch (minor) {
+			case 0x8: /* FSTX.S */
+				error = misaligned_fpu_store(regs, opcode, 0, 2, 0);
+				break;
+			case 0xd: /* FSTX.P */
+				error = misaligned_fpu_store(regs, opcode, 0, 3, 1);
+				break;
+			case 0x9: /* FSTX.D */
+				error = misaligned_fpu_store(regs, opcode, 0, 3, 0);
+				break;
+			default:
+				error = -1;
+				break;
+			}
+			break;
+#endif
+
+		default:
+			/* Fault */
+			error = -1;
+			break;
+	}
+
+	if (error < 0) {
+		return error;
+	} else {
+		regs->pc += 4; /* Skip the instruction that's just been emulated */
+		return 0;
+	}
+
+}
+
+static ctl_table unaligned_table[] = {
+	{1, "kernel_reports", &kernel_mode_unaligned_fixup_count,
+		sizeof(int), 0644, NULL, &proc_dointvec},
+#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
+	{2, "user_reports", &user_mode_unaligned_fixup_count,
+		sizeof(int), 0644, NULL, &proc_dointvec},
+	{3, "user_enable", &user_mode_unaligned_fixup_enable,
+		sizeof(int), 0644, NULL, &proc_dointvec},
+#endif
+	{0}
+};
+
+static ctl_table unaligned_root[] = {
+	{1, "unaligned_fixup", NULL, 0, 0555, unaligned_table},
+	{0}
+};
+
+static ctl_table sh64_root[] = {
+	{1, "sh64", NULL, 0, 0555, unaligned_root},
+	{0}
+};
+static struct ctl_table_header *sysctl_header;
+static int __init init_sysctl(void)
+{
+	sysctl_header = register_sysctl_table(sh64_root, 0);
+	return 0;
+}
+
+__initcall(init_sysctl);
+
+
+asmlinkage void do_debug_interrupt(unsigned long code, struct pt_regs *regs)
+{
+	u64 peek_real_address_q(u64 addr);
+	u64 poke_real_address_q(u64 addr, u64 val);
+	unsigned long long DM_EXP_CAUSE_PHY = 0x0c100010;
+	unsigned long long exp_cause;
+	/* It's not worth ioremapping the debug module registers for the amount
+	   of access we make to them - just go direct to their physical
+	   addresses. */
+	exp_cause = peek_real_address_q(DM_EXP_CAUSE_PHY);
+	if (exp_cause & ~4) {
+		printk("DM.EXP_CAUSE had unexpected bits set (=%08lx)\n",
+			(unsigned long)(exp_cause & 0xffffffff));
+	}
+	show_state();
+	/* Clear all DEBUGINT causes */
+	poke_real_address_q(DM_EXP_CAUSE_PHY, 0x0);
+}
+
--- diff/arch/sh64/kernel/unwind.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/unwind.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,326 @@
+/*
+ * arch/sh64/kernel/unwind.c
+ *
+ * Copyright (C) 2004  Paul Mundt
+ * Copyright (C) 2004  Richard Curnow
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/kallsyms.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <asm/page.h>
+#include <asm/ptrace.h>
+#include <asm/processor.h>
+#include <asm/io.h>
+
+static u8 regcache[63];
+
+/*
+ * Finding the previous stack frame isn't horribly straightforward as it is
+ * on some other platforms. In the sh64 case, we don't have "linked" stack
+ * frames, so we need to do a bit of work to determine the previous frame,
+ * and in turn, the previous r14/r18 pair.
+ *
+ * There are generally a few cases which determine where we can find out
+ * the r14/r18 values. In the general case, this can be determined by poking
+ * around the prologue of the symbol PC is in (note that we absolutely must
+ * have frame pointer support as well as the kernel symbol table mapped,
+ * otherwise we can't even get this far).
+ *
+ * In other cases, such as the interrupt/exception path, we can poke around
+ * the sp/fp.
+ *
+ * Notably, this entire approach is somewhat error prone, and in the event
+ * that the previous frame cannot be determined, that's all we can do.
+ * Either way, this still leaves us with a more correct backtrace then what
+ * we would be able to come up with by walking the stack (which is garbage
+ * for anything beyond the first frame).
+ *						-- PFM.
+ */
+static int lookup_prev_stack_frame(unsigned long fp, unsigned long pc,
+		      unsigned long *pprev_fp, unsigned long *pprev_pc,
+		      struct pt_regs *regs)
+{
+	const char *sym;
+	char *modname, namebuf[128];
+	unsigned long offset, size;
+	unsigned long prologue = 0;
+	unsigned long fp_displacement = 0;
+	unsigned long fp_prev = 0;
+	unsigned long offset_r14 = 0, offset_r18 = 0;
+	int i, found_prologue_end = 0;
+
+	sym = kallsyms_lookup(pc, &size, &offset, &modname, namebuf);
+	if (!sym)
+		return -EINVAL;
+
+	prologue = pc - offset;
+	if (!prologue)
+		return -EINVAL;
+
+	/* Validate fp, to avoid risk of dereferencing a bad pointer later.
+	   Assume 128Mb since that's the amount of RAM on a Cayman.  Modify
+	   when there is an SH-5 board with more. */
+	if ((fp < (unsigned long) phys_to_virt(__MEMORY_START)) ||
+	    (fp >= (unsigned long)(phys_to_virt(__MEMORY_START)) + 128*1024*1024) ||
+	    ((fp & 7) != 0)) {
+		return -EINVAL;
+	}
+
+	/*
+	 * Depth to walk, depth is completely arbitrary.
+	 */
+	for (i = 0; i < 100; i++, prologue += sizeof(unsigned long)) {
+		unsigned long op;
+		u8 major, minor;
+		u8 src, dest, disp;
+
+		op = *(unsigned long *)prologue;
+
+		major = (op >> 26) & 0x3f;
+		src   = (op >> 20) & 0x3f;
+		minor = (op >> 16) & 0xf;
+		disp  = (op >> 10) & 0x3f;
+		dest  = (op >>  4) & 0x3f;
+
+		/*
+		 * Stack frame creation happens in a number of ways.. in the
+		 * general case when the stack frame is less than 511 bytes,
+		 * it's generally created by an addi or addi.l:
+		 *
+		 *	addi/addi.l r15, -FRAME_SIZE, r15
+		 *
+		 * in the event that the frame size is bigger than this, it's
+		 * typically created using a movi/sub pair as follows:
+		 *
+		 *	movi	FRAME_SIZE, rX
+		 *	sub	r15, rX, r15
+		 */
+
+		switch (major) {
+		case (0x00 >> 2):
+			switch (minor) {
+			case 0x8: /* add.l */
+			case 0x9: /* add */
+				/* Look for r15, r63, r14 */
+				if (src == 15 && disp == 63 && dest == 14)
+					found_prologue_end = 1;
+
+				break;
+			case 0xa: /* sub.l */
+			case 0xb: /* sub */
+				if (src != 15 || dest != 15)
+					continue;
+
+				fp_displacement -= regcache[disp];
+				fp_prev = fp - fp_displacement;
+				break;
+			}
+			break;
+		case (0xa8 >> 2): /* st.l */
+			if (src != 15)
+				continue;
+
+			switch (dest) {
+			case 14:
+				if (offset_r14 || fp_displacement == 0)
+					continue;
+
+				offset_r14 = (u64)(((((s64)op >> 10) & 0x3ff) << 54) >> 54);
+				offset_r14 *= sizeof(unsigned long);
+				offset_r14 += fp_displacement;
+				break;
+			case 18:
+				if (offset_r18 || fp_displacement == 0)
+					continue;
+
+				offset_r18 = (u64)(((((s64)op >> 10) & 0x3ff) << 54) >> 54);
+				offset_r18 *= sizeof(unsigned long);
+				offset_r18 += fp_displacement;
+				break;
+			}
+
+			break;
+		case (0xcc >> 2): /* movi */
+			if (dest >= 63) {
+				printk(KERN_NOTICE "%s: Invalid dest reg %d "
+				       "specified in movi handler. Failed "
+				       "opcode was 0x%lx: ", __FUNCTION__,
+				       dest, op);
+
+				continue;
+			}
+
+			/* Sign extend */
+			regcache[dest] =
+				((((s64)(u64)op >> 10) & 0xffff) << 54) >> 54;
+			break;
+		case (0xd0 >> 2): /* addi */
+		case (0xd4 >> 2): /* addi.l */
+			/* Look for r15, -FRAME_SIZE, r15 */
+			if (src != 15 || dest != 15)
+				continue;
+
+			/* Sign extended frame size.. */
+			fp_displacement +=
+				(u64)(((((s64)op >> 10) & 0x3ff) << 54) >> 54);
+			fp_prev = fp - fp_displacement;
+			break;
+		}
+
+		if (found_prologue_end && offset_r14 && (offset_r18 || *pprev_pc) && fp_prev)
+			break;
+	}
+
+	if (offset_r14 == 0 || fp_prev == 0) {
+		if (!offset_r14)
+			pr_debug("Unable to find r14 offset\n");
+		if (!fp_prev)
+			pr_debug("Unable to find previous fp\n");
+
+		return -EINVAL;
+	}
+
+	/* For innermost leaf function, there might not be a offset_r18 */
+	if (!*pprev_pc && (offset_r18 == 0))
+		return -EINVAL;
+
+	*pprev_fp = *(unsigned long *)(fp_prev + offset_r14);
+
+	if (offset_r18)
+		*pprev_pc = *(unsigned long *)(fp_prev + offset_r18);
+
+	*pprev_pc &= ~1;
+
+	return 0;
+}
+
+/* Don't put this on the stack since we'll want to call sh64_unwind
+ * when we're close to underflowing the stack anyway. */
+static struct pt_regs here_regs;
+
+extern const char syscall_ret;
+extern const char ret_from_syscall;
+extern const char ret_from_exception;
+extern const char ret_from_irq;
+
+static void sh64_unwind_inner(struct pt_regs *regs);
+
+static void unwind_nested (unsigned long pc, unsigned long fp)
+{
+	if ((fp >= __MEMORY_START) &&
+	    ((fp & 7) == 0)) {
+		sh64_unwind_inner((struct pt_regs *) fp);
+	}
+}
+
+static void sh64_unwind_inner(struct pt_regs *regs)
+{
+	unsigned long pc, fp;
+	int ofs = 0;
+	int first_pass;
+
+	pc = regs->pc & ~1;
+	fp = regs->regs[14];
+
+	first_pass = 1;
+	for (;;) {
+		int cond;
+		unsigned long next_fp, next_pc;
+
+		if (pc == ((unsigned long) &syscall_ret & ~1)) {
+			printk("SYSCALL\n");
+			unwind_nested(pc,fp);
+			return;
+		}
+
+		if (pc == ((unsigned long) &ret_from_syscall & ~1)) {
+			printk("SYSCALL (PREEMPTED)\n");
+			unwind_nested(pc,fp);
+			return;
+		}
+
+		/* In this case, the PC is discovered by lookup_prev_stack_frame but
+		   it has 4 taken off it to look like the 'caller' */
+		if (pc == ((unsigned long) &ret_from_exception & ~1)) {
+			printk("EXCEPTION\n");
+			unwind_nested(pc,fp);
+			return;
+		}
+
+		if (pc == ((unsigned long) &ret_from_irq & ~1)) {
+			printk("IRQ\n");
+			unwind_nested(pc,fp);
+			return;
+		}
+
+		cond = ((pc >= __MEMORY_START) && (fp >= __MEMORY_START) &&
+			((pc & 3) == 0) && ((fp & 7) == 0));
+
+		pc -= ofs;
+
+		printk("[<%08lx>] ", pc);
+		print_symbol("%s\n", pc);
+
+		if (first_pass) {
+			/* If the innermost frame is a leaf function, it's
+			 * possible that r18 is never saved out to the stack.
+			 */
+			next_pc = regs->regs[18];
+		} else {
+			next_pc = 0;
+		}
+
+		if (lookup_prev_stack_frame(fp, pc, &next_fp, &next_pc, regs) == 0) {
+			ofs = sizeof(unsigned long);
+			pc = next_pc & ~1;
+			fp = next_fp;
+		} else {
+			printk("Unable to lookup previous stack frame\n");
+			break;
+		}
+		first_pass = 0;
+	}
+
+	printk("\n");
+
+}
+
+void sh64_unwind(struct pt_regs *regs)
+{
+	if (!regs) {
+		/*
+		 * Fetch current regs if we have no other saved state to back
+		 * trace from.
+		 */
+		regs = &here_regs;
+
+		__asm__ __volatile__ ("ori r14, 0, %0" : "=r" (regs->regs[14]));
+		__asm__ __volatile__ ("ori r15, 0, %0" : "=r" (regs->regs[15]));
+		__asm__ __volatile__ ("ori r18, 0, %0" : "=r" (regs->regs[18]));
+
+		__asm__ __volatile__ ("gettr tr0, %0" : "=r" (regs->tregs[0]));
+		__asm__ __volatile__ ("gettr tr1, %0" : "=r" (regs->tregs[1]));
+		__asm__ __volatile__ ("gettr tr2, %0" : "=r" (regs->tregs[2]));
+		__asm__ __volatile__ ("gettr tr3, %0" : "=r" (regs->tregs[3]));
+		__asm__ __volatile__ ("gettr tr4, %0" : "=r" (regs->tregs[4]));
+		__asm__ __volatile__ ("gettr tr5, %0" : "=r" (regs->tregs[5]));
+		__asm__ __volatile__ ("gettr tr6, %0" : "=r" (regs->tregs[6]));
+		__asm__ __volatile__ ("gettr tr7, %0" : "=r" (regs->tregs[7]));
+
+		__asm__ __volatile__ (
+			"pta 0f, tr0\n\t"
+			"blink tr0, %0\n\t"
+			"0: nop"
+			: "=r" (regs->pc)
+		);
+	}
+
+	printk("\nCall Trace:\n");
+	sh64_unwind_inner(regs);
+}
+
--- diff/arch/sh64/kernel/vmlinux.lds.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/kernel/vmlinux.lds.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,183 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh5/vmlinux.lds.S
+ *
+ * ld script to make ST50 Linux kernel
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * benedict.gaster@superh.com:	 2nd May 2002
+ *    Add definition of empty_zero_page to be the first page of kernel image.
+ *
+ * benedict.gaster@superh.com:	 3rd May 2002
+ *    Added support for ramdisk, removing statically linked romfs at the same time.
+ *
+ * lethal@linux-sh.org:          9th May 2003
+ *    Kill off GLOBAL_NAME() usage and other CDC-isms.
+ *
+ * lethal@linux-sh.org:         19th May 2003
+ *    Remove support for ancient toolchains.
+ */
+
+#include <linux/config.h>
+#include <asm/page.h>
+#include <asm/cache.h>
+#include <asm/processor.h>
+#include <asm/thread_info.h>
+
+#define LOAD_OFFSET	CONFIG_CACHED_MEMORY_OFFSET
+#include <asm-generic/vmlinux.lds.h>
+
+#ifdef NOTDEF
+#ifdef CONFIG_LITTLE_ENDIAN
+OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux")
+#else
+OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64")
+#endif
+#endif
+
+OUTPUT_ARCH(sh:sh5)
+
+#define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
+
+ENTRY(__start)
+SECTIONS
+{
+  . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE;
+  _text = .;			/* Text and read-only data */
+  text = .;			/* Text and read-only data */
+
+  .empty_zero_page : C_PHYS(.empty_zero_page) {
+	*(.empty_zero_page)
+	} = 0
+
+  .text : C_PHYS(.text) {
+	*(.text)
+	*(.text64)
+        *(.text..SHmedia32)
+	SCHED_TEXT
+	*(.fixup)
+	*(.gnu.warning)
+#ifdef CONFIG_LITTLE_ENDIAN
+	} = 0x6ff0fff0
+#else
+	} = 0xf0fff06f
+#endif
+
+  /* We likely want __ex_table to be Cache Line aligned */
+  . = ALIGN(L1_CACHE_BYTES);		/* Exception table */
+  __start___ex_table = .;
+  __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
+  __stop___ex_table = .;
+
+  RODATA
+
+  _etext = .;			/* End of text section */
+
+  .data : C_PHYS(.data) {			/* Data */
+	*(.data)
+	CONSTRUCTORS
+	}
+
+  . = ALIGN(PAGE_SIZE);
+  .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) }
+
+  . = ALIGN(L1_CACHE_BYTES);
+  __per_cpu_start = .;
+  .data.percpu : C_PHYS(.data.percpu) { *(.data.percpu) }
+  __per_cpu_end = . ;
+  .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
+
+  _edata = .;			/* End of data section */
+
+  . = ALIGN(THREAD_SIZE);	/* init_task: structure size aligned */
+  .data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) }
+
+  . = ALIGN(PAGE_SIZE);		/* Init code and data */
+  __init_begin = .;
+  _sinittext = .;
+  .init.text : C_PHYS(.init.text) { *(.init.text) }
+  _einittext = .;
+  .init.data : C_PHYS(.init.data) { *(.init.data) }
+  . = ALIGN(L1_CACHE_BYTES);	/* Better if Cache Line aligned */
+  __setup_start = .;
+  .init.setup : C_PHYS(.init.setup) { *(.init.setup) }
+  __setup_end = .;
+  __start___param = .;
+  __param : C_PHYS(__param) { *(__param) }
+  __stop___param = .;
+  __initcall_start = .;
+  .initcall.init : C_PHYS(.initcall.init) {
+  	*(.initcall1.init)
+  	*(.initcall2.init)
+  	*(.initcall3.init)
+  	*(.initcall4.init)
+  	*(.initcall5.init)
+  	*(.initcall6.init)
+  	*(.initcall7.init)
+  }
+  __initcall_end = .;
+  __con_initcall_start = .;
+  .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
+  __con_initcall_end = .;
+  SECURITY_INIT
+  __initramfs_start = .;
+  .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
+  __initramfs_end = .;
+  . = ALIGN(PAGE_SIZE);
+  __init_end = .;
+
+  /* Align to the biggest single data representation, head and tail */
+  . = ALIGN(8);
+  __bss_start = .;		/* BSS */
+  .bss : C_PHYS(.bss) {
+	*(.bss)
+	}
+  . = ALIGN(8);
+  _end = . ;
+
+  /* Sections to be discarded */
+  /DISCARD/ : {
+	*(.exit.text)
+	*(.exit.data)
+	*(.exitcall.exit)
+	}
+
+  /* Stabs debugging sections.  */
+  .stab 0 : C_PHYS(.stab) { *(.stab) }
+  .stabstr 0 : C_PHYS(.stabstr) { *(.stabstr) }
+  .stab.excl 0 : C_PHYS(.stab.excl) { *(.stab.excl) }
+  .stab.exclstr 0 : C_PHYS(.stab.exclstr) { *(.stab.exclstr) }
+  .stab.index 0 : C_PHYS(.stab.index) { *(.stab.index) }
+  .stab.indexstr 0 : C_PHYS(.stab.indexstr) { *(.stab.indexstr) }
+  .comment 0 : C_PHYS(.comment) { *(.comment) }
+  /* DWARF debug sections.
+     Symbols in the DWARF debugging section are relative to the beginning
+     of the section so we begin .debug at 0.  */
+  /* DWARF 1 */
+  .debug          0 : C_PHYS(.debug) { *(.debug) }
+  .line           0 : C_PHYS(.line) { *(.line) }
+  /* GNU DWARF 1 extensions */
+  .debug_srcinfo  0 : C_PHYS(.debug_srcinfo) { *(.debug_srcinfo) }
+  .debug_sfnames  0 : C_PHYS(.debug_sfnames) { *(.debug_sfnames) }
+  /* DWARF 1.1 and DWARF 2 */
+  .debug_aranges  0 : C_PHYS(.debug_aranges) { *(.debug_aranges) }
+  .debug_pubnames 0 : C_PHYS(.debug_pubnames) { *(.debug_pubnames) }
+  /* DWARF 2 */
+  .debug_info     0 : C_PHYS(.debug_info) { *(.debug_info) }
+  .debug_abbrev   0 : C_PHYS(.debug_abbrev) { *(.debug_abbrev) }
+  .debug_line     0 : C_PHYS(.debug_line) { *(.debug_line) }
+  .debug_frame    0 : C_PHYS(.debug_frame) { *(.debug_frame) }
+  .debug_str      0 : C_PHYS(.debug_str) { *(.debug_str) }
+  .debug_loc      0 : C_PHYS(.debug_loc) { *(.debug_loc) }
+  .debug_macinfo  0 : C_PHYS(.debug_macinfo) { *(.debug_macinfo) }
+  /* SGI/MIPS DWARF 2 extensions */
+  .debug_weaknames 0 : C_PHYS(.debug_weaknames) { *(.debug_weaknames) }
+  .debug_funcnames 0 : C_PHYS(.debug_funcnames) { *(.debug_funcnames) }
+  .debug_typenames 0 : C_PHYS(.debug_typenames) { *(.debug_typenames) }
+  .debug_varnames  0 : C_PHYS(.debug_varnames) { *(.debug_varnames) }
+  /* These must appear regardless of  .  */
+}
--- diff/arch/sh64/lib/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,19 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 2000, 2001  Paolo Alberelli
+# Coprygith (C) 2003  Paul Mundt
+#
+# Makefile for the SH-5 specific library files..
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+# Panic should really be compiled as PIC
+lib-y  := udelay.o c-checksum.o dbg.o io.o panic.o memcpy.o copy_user_memcpy.o \
+		page_copy.o page_clear.o
+
--- diff/arch/sh64/lib/c-checksum.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/c-checksum.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,231 @@
+/*
+ * arch/sh/lib/csum_parial.c
+ *
+ * This file contains network checksum routines that are better done
+ * in an architecture-specific manner due to speed..
+ */
+
+#undef DEBUG
+
+#include <linux/config.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <asm/byteorder.h>
+#include <asm/uaccess.h>
+
+static inline unsigned short from64to16(unsigned long long x)
+{
+	/* add up 32-bit words for 33 bits */
+	x = (x & 0xffffffff) + (x >> 32);
+	/* add up 16-bit and 17-bit words for 17+c bits */
+	x = (x & 0xffff) + (x >> 16);
+	/* add up 16-bit and 2-bit for 16+c bit */
+	x = (x & 0xffff) + (x >> 16);
+	/* add up carry.. */
+	x = (x & 0xffff) + (x >> 16);
+	return x;
+}
+
+static inline unsigned short foldto16(unsigned long x)
+{
+	/* add up 16-bit for 17 bits */
+	x = (x & 0xffff) + (x >> 16);
+	/* add up carry.. */
+	x = (x & 0xffff) + (x >> 16);
+	return x;
+}
+
+static inline unsigned short myfoldto16(unsigned long long x)
+{
+	/* Fold down to 32-bits so we don't loose in the typedef-less
+	   network stack.  */
+	/* 64 to 33 */
+	x = (x & 0xffffffff) + (x >> 32);
+	/* 33 to 32 */
+	x = (x & 0xffffffff) + (x >> 32);
+
+	/* add up 16-bit for 17 bits */
+	x = (x & 0xffff) + (x >> 16);
+	/* add up carry.. */
+	x = (x & 0xffff) + (x >> 16);
+	return x;
+}
+
+#define odd(x) ((x)&1)
+#define U16(x) ntohs(x)
+
+static unsigned long do_csum(const unsigned char *buff, int len)
+{
+	int odd, count;
+	unsigned long result = 0;
+
+	pr_debug("do_csum buff %p, len %d (0x%x)\n", buff, len, len);
+#ifdef DEBUG
+	for (i = 0; i < len; i++) {
+		if ((i % 26) == 0)
+			printk("\n");
+		printk("%02X ", buff[i]);
+	}
+#endif
+
+	if (len <= 0)
+		goto out;
+
+	odd = 1 & (unsigned long) buff;
+	if (odd) {
+		result = *buff << 8;
+		len--;
+		buff++;
+	}
+	count = len >> 1;	/* nr of 16-bit words.. */
+	if (count) {
+		if (2 & (unsigned long) buff) {
+			result += *(unsigned short *) buff;
+			count--;
+			len -= 2;
+			buff += 2;
+		}
+		count >>= 1;	/* nr of 32-bit words.. */
+		if (count) {
+			unsigned long carry = 0;
+			do {
+				unsigned long w = *(unsigned long *) buff;
+				buff += 4;
+				count--;
+				result += carry;
+				result += w;
+				carry = (w > result);
+			} while (count);
+			result += carry;
+			result = (result & 0xffff) + (result >> 16);
+		}
+		if (len & 2) {
+			result += *(unsigned short *) buff;
+			buff += 2;
+		}
+	}
+	if (len & 1)
+		result += *buff;
+	result = foldto16(result);
+	if (odd)
+		result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
+
+	pr_debug("\nCHECKSUM is 0x%x\n", result);
+
+      out:
+	return result;
+}
+
+/* computes the checksum of a memory block at buff, length len,
+   and adds in "sum" (32-bit)  */
+unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum)
+{
+	unsigned long long result = do_csum(buff, len);
+
+	/* add in old sum, and carry.. */
+	result += sum;
+	/* 32+c bits -> 32 bits */
+	result = (result & 0xffffffff) + (result >> 32);
+
+	pr_debug("csum_partial, buff %p len %d sum 0x%x result=0x%016Lx\n",
+		buff, len, sum, result);
+
+	return result;
+}
+
+/* Copy while checksumming, otherwise like csum_partial.  */
+unsigned int
+csum_partial_copy(const char *src, char *dst, int len, unsigned int sum)
+{
+	sum = csum_partial(src, len, sum);
+	memcpy(dst, src, len);
+
+	return sum;
+}
+
+/* Copy from userspace and compute checksum.  If we catch an exception
+   then zero the rest of the buffer.  */
+unsigned int
+csum_partial_copy_from_user(const char *src, char *dst, int len,
+			    unsigned int sum, int *err_ptr)
+{
+	int missing;
+
+	pr_debug
+	    ("csum_partial_copy_from_user src %p, dest %p, len %d, sum %08x, err_ptr %p\n",
+	     src, dst, len, sum, err_ptr);
+	missing = copy_from_user(dst, src, len);
+	pr_debug("  access_ok %d\n", __access_ok((unsigned long) src, len));
+	pr_debug("  missing %d\n", missing);
+	if (missing) {
+		memset(dst + len - missing, 0, missing);
+		*err_ptr = -EFAULT;
+	}
+
+	return csum_partial(dst, len, sum);
+}
+
+/* Copy to userspace and compute checksum.  */
+unsigned int
+csum_partial_copy_to_user(const char *src, char *dst, int len,
+			  unsigned int sum, int *err_ptr)
+{
+	sum = csum_partial(src, len, sum);
+
+	if (copy_to_user(dst, src, len))
+		*err_ptr = -EFAULT;
+
+	return sum;
+}
+
+/*
+ *	This is a version of ip_compute_csum() optimized for IP headers,
+ *	which always checksum on 4 octet boundaries.
+ */
+unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl)
+{
+	pr_debug("ip_fast_csum %p,%d\n", iph, ihl);
+
+	return ~do_csum(iph, ihl * 4);
+}
+
+unsigned int csum_tcpudp_nofold(unsigned long saddr,
+				unsigned long daddr,
+				unsigned short len,
+				unsigned short proto, unsigned int sum)
+{
+	unsigned long long result;
+
+	pr_debug("ntohs(0x%x)=0x%x\n", 0xdead, ntohs(0xdead));
+	pr_debug("htons(0x%x)=0x%x\n", 0xdead, htons(0xdead));
+
+	result = ((unsigned long long) saddr +
+		  (unsigned long long) daddr +
+		  (unsigned long long) sum +
+		  ((unsigned long long) ntohs(len) << 16) +
+		  ((unsigned long long) proto << 8));
+
+	/* Fold down to 32-bits so we don't loose in the typedef-less
+	   network stack.  */
+	/* 64 to 33 */
+	result = (result & 0xffffffff) + (result >> 32);
+	/* 33 to 32 */
+	result = (result & 0xffffffff) + (result >> 32);
+
+	pr_debug("%s saddr %x daddr %x len %x proto %x sum %x result %08Lx\n",
+		__FUNCTION__, saddr, daddr, len, proto, sum, result);
+
+	return result;
+}
+
+// Post SIM:
+unsigned int
+csum_partial_copy_nocheck(const char *src, char *dst, int len, unsigned int sum)
+{
+	//  unsigned dummy;
+	pr_debug("csum_partial_copy_nocheck src %p dst %p len %d\n", src, dst,
+		len);
+
+	return csum_partial_copy(src, dst, len, sum);
+}
--- diff/arch/sh64/lib/copy_user_memcpy.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/copy_user_memcpy.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,213 @@
+!
+! Fast SH memcpy
+!
+! by Toshiyasu Morita (tm@netcom.com)
+! hacked by J"orn Rernnecke (joern.rennecke@superh.com) ("o for o-umlaut)
+! SH5 code Copyright 2002 SuperH Ltd.
+!
+! Entry: ARG0: destination pointer
+!        ARG1: source pointer
+!        ARG2: byte count
+!
+! Exit:  RESULT: destination pointer
+!        any other registers in the range r0-r7: trashed
+!
+! Notes: Usually one wants to do small reads and write a longword, but
+!        unfortunately it is difficult in some cases to concatanate bytes
+!        into a longword on the SH, so this does a longword read and small
+!        writes.
+!
+! This implementation makes two assumptions about how it is called:
+!
+! 1.: If the byte count is nonzero, the address of the last byte to be
+!     copied is unsigned greater than the address of the first byte to
+!     be copied.  This could be easily swapped for a signed comparison,
+!     but the algorithm used needs some comparison.
+!
+! 2.: When there are two or three bytes in the last word of an 11-or-more
+!     bytes memory chunk to b copied, the rest of the word can be read
+!     without side effects.
+!     This could be easily changed by increasing the minumum size of
+!     a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2,
+!     however, this would cost a few extra cyles on average.
+!     For SHmedia, the assumption is that any quadword can be read in its
+!     enirety if at least one byte is included in the copy.
+
+/* Imported into Linux kernel by Richard Curnow.  This is used to implement the
+   __copy_user function in the general case, so it has to be a distinct
+   function from intra-kernel memcpy to allow for exception fix-ups in the
+   event that the user pointer is bad somewhere in the copy (e.g. due to
+   running off the end of the vma).
+
+   Note, this algorithm will be slightly wasteful in the case where the source
+   and destination pointers are equally aligned, because the stlo/sthi pairs
+   could then be merged back into single stores.  If there are a lot of cache
+   misses, this is probably offset by the stall lengths on the preloads.
+
+*/
+
+	.section .text..SHmedia32,"ax"
+	.little
+	.balign 32
+	.global copy_user_memcpy
+	.global copy_user_memcpy_end
+copy_user_memcpy:
+
+#define LDUAQ(P,O,D0,D1) ldlo.q P,O,D0; ldhi.q P,O+7,D1
+#define STUAQ(P,O,D0,D1) stlo.q P,O,D0; sthi.q P,O+7,D1
+#define LDUAL(P,O,D0,D1) ldlo.l P,O,D0; ldhi.l P,O+3,D1
+#define STUAL(P,O,D0,D1) stlo.l P,O,D0; sthi.l P,O+3,D1
+
+	ld.b r3,0,r63
+	pta/l Large,tr0
+	movi 25,r0
+	bgeu/u r4,r0,tr0
+	nsb r4,r0
+	shlli r0,5,r0
+	movi (L1-L0+63*32 + 1) & 0xffff,r1
+	sub r1, r0, r0
+L0:	ptrel r0,tr0
+	add r2,r4,r5
+	ptabs r18,tr1
+	add r3,r4,r6
+	blink tr0,r63
+
+/* Rearranged to make cut2 safe */
+	.balign 8
+L4_7:	/* 4..7 byte memcpy cntd. */
+	stlo.l r2, 0, r0
+	or r6, r7, r6
+	sthi.l r5, -1, r6
+	stlo.l r5, -4, r6
+	blink tr1,r63
+
+	.balign 8
+L1:	/* 0 byte memcpy */
+	nop
+	blink tr1,r63
+	nop
+	nop
+	nop
+	nop
+
+L2_3:	/* 2 or 3 byte memcpy cntd. */
+	st.b r5,-1,r6
+	blink tr1,r63
+
+	/* 1 byte memcpy */
+	ld.b r3,0,r0
+	st.b r2,0,r0
+	blink tr1,r63
+
+L8_15:	/* 8..15 byte memcpy cntd. */
+	stlo.q r2, 0, r0
+	or r6, r7, r6
+	sthi.q r5, -1, r6
+	stlo.q r5, -8, r6
+	blink tr1,r63
+
+	/* 2 or 3 byte memcpy */
+	ld.b r3,0,r0
+	ld.b r2,0,r63
+	ld.b r3,1,r1
+	st.b r2,0,r0
+	pta/l L2_3,tr0
+	ld.b r6,-1,r6
+	st.b r2,1,r1
+	blink tr0, r63
+
+	/* 4 .. 7 byte memcpy */
+	LDUAL (r3, 0, r0, r1)
+	pta L4_7, tr0
+	ldlo.l r6, -4, r7
+	or r0, r1, r0
+	sthi.l r2, 3, r0
+	ldhi.l r6, -1, r6
+	blink tr0, r63
+
+	/* 8 .. 15 byte memcpy */
+	LDUAQ (r3, 0, r0, r1)
+	pta L8_15, tr0
+	ldlo.q r6, -8, r7
+	or r0, r1, r0
+	sthi.q r2, 7, r0
+	ldhi.q r6, -1, r6
+	blink tr0, r63
+
+	/* 16 .. 24 byte memcpy */
+	LDUAQ (r3, 0, r0, r1)
+	LDUAQ (r3, 8, r8, r9)
+	or r0, r1, r0
+	sthi.q r2, 7, r0
+	or r8, r9, r8
+	sthi.q r2, 15, r8
+	ldlo.q r6, -8, r7
+	ldhi.q r6, -1, r6
+	stlo.q r2, 8, r8
+	stlo.q r2, 0, r0
+	or r6, r7, r6
+	sthi.q r5, -1, r6
+	stlo.q r5, -8, r6
+	blink tr1,r63
+
+Large:
+	ld.b r2, 0, r63
+	pta/l  Loop_ua, tr1
+	ori r3, -8, r7
+	sub r2, r7, r22
+	sub r3, r2, r6
+	add r2, r4, r5
+	ldlo.q r3, 0, r0
+	addi r5, -16, r5
+	movi 64+8, r27 ! could subtract r7 from that.
+	stlo.q r2, 0, r0
+	sthi.q r2, 7, r0
+	ldx.q r22, r6, r0
+	bgtu/l r27, r4, tr1
+
+	addi r5, -48, r27
+	pta/l Loop_line, tr0
+	addi r6, 64, r36
+	addi r6, -24, r19
+	addi r6, -16, r20
+	addi r6, -8, r21
+
+Loop_line:
+	ldx.q r22, r36, r63
+	synco
+	alloco r22, 32
+	synco
+	addi r22, 32, r22
+	ldx.q r22, r19, r23
+	sthi.q r22, -25, r0
+	ldx.q r22, r20, r24
+	ldx.q r22, r21, r25
+	stlo.q r22, -32, r0
+	ldx.q r22, r6,  r0
+	sthi.q r22, -17, r23
+	sthi.q r22,  -9, r24
+	sthi.q r22,  -1, r25
+	stlo.q r22, -24, r23
+	stlo.q r22, -16, r24
+	stlo.q r22,  -8, r25
+	bgeu r27, r22, tr0
+
+Loop_ua:
+	addi r22, 8, r22
+	sthi.q r22, -1, r0
+	stlo.q r22, -8, r0
+	ldx.q r22, r6, r0
+	bgtu/l r5, r22, tr1
+
+	add r3, r4, r7
+	ldlo.q r7, -8, r1
+	sthi.q r22, 7, r0
+	ldhi.q r7, -1, r7
+	ptabs r18,tr1
+	stlo.q r22, 0, r0
+	or r1, r7, r1
+	sthi.q r5, 15, r1
+	stlo.q r5, 8, r1
+	blink tr1, r63
+copy_user_memcpy_end:
+	nop
--- diff/arch/sh64/lib/dbg.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/dbg.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,394 @@
+/*--------------------------------------------------------------------------
+--
+-- Identity : Linux50 Debug Funcions
+--
+-- File     : arch/sh64/lib/dbg.C
+--
+-- Copyright 2000, 2001 STMicroelectronics Limited.
+-- Copyright 2004 Richard Curnow (evt_debug etc)
+--
+--------------------------------------------------------------------------*/
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <asm/mmu_context.h>
+
+typedef u64 regType_t;
+
+static regType_t getConfigReg(u64 id)
+{
+	register u64 reg __asm__("r2");
+	asm volatile ("getcfg   %1, 0, %0":"=r" (reg):"r"(id));
+	return (reg);
+}
+
+/* ======================================================================= */
+
+static char *szTab[] = { "4k", "64k", "1M", "512M" };
+static char *protTab[] = { "----",
+	"---R",
+	"--X-",
+	"--XR",
+	"-W--",
+	"-W-R",
+	"-WX-",
+	"-WXR",
+	"U---",
+	"U--R",
+	"U-X-",
+	"U-XR",
+	"UW--",
+	"UW-R",
+	"UWX-",
+	"UWXR"
+};
+#define  ITLB_BASE	0x00000000
+#define  DTLB_BASE	0x00800000
+#define  MAX_TLBs		64
+/* PTE High */
+#define  GET_VALID(pte)        ((pte) & 0x1)
+#define  GET_SHARED(pte)       ((pte) & 0x2)
+#define  GET_ASID(pte)         ((pte >> 2) & 0x0ff)
+#define  GET_EPN(pte)          ((pte) & 0xfffff000)
+
+/* PTE Low */
+#define  GET_CBEHAVIOR(pte)    ((pte) & 0x3)
+#define  GET_PAGE_SIZE(pte)    szTab[((pte >> 3) & 0x3)]
+#define  GET_PROTECTION(pte)   protTab[((pte >> 6) & 0xf)]
+#define  GET_PPN(pte)          ((pte) & 0xfffff000)
+
+#define PAGE_1K_MASK           0x00000000
+#define PAGE_4K_MASK           0x00000010
+#define PAGE_64K_MASK          0x00000080
+#define MMU_PAGESIZE_MASK      (PAGE_64K_MASK | PAGE_4K_MASK)
+#define PAGE_1MB_MASK          MMU_PAGESIZE_MASK
+#define PAGE_1K                (1024)
+#define PAGE_4K                (1024 * 4)
+#define PAGE_64K               (1024 * 64)
+#define PAGE_1MB               (1024 * 1024)
+
+#define HOW_TO_READ_TLB_CONTENT  \
+       "[ ID]  PPN         EPN        ASID  Share  CB  P.Size   PROT.\n"
+
+void print_single_tlb(unsigned long tlb, int single_print)
+{
+	regType_t pteH;
+	regType_t pteL;
+	unsigned int valid, shared, asid, epn, cb, ppn;
+	char *pSize;
+	char *pProt;
+
+	/*
+	   ** in case of single print <single_print> is true, this implies:
+	   **   1) print the TLB in any case also if NOT VALID
+	   **   2) print out the header
+	 */
+
+	pteH = getConfigReg(tlb);
+	valid = GET_VALID(pteH);
+	if (single_print)
+		printk(HOW_TO_READ_TLB_CONTENT);
+	else if (!valid)
+		return;
+
+	pteL = getConfigReg(tlb + 1);
+
+	shared = GET_SHARED(pteH);
+	asid = GET_ASID(pteH);
+	epn = GET_EPN(pteH);
+	cb = GET_CBEHAVIOR(pteL);
+	pSize = GET_PAGE_SIZE(pteL);
+	pProt = GET_PROTECTION(pteL);
+	ppn = GET_PPN(pteL);
+	printk("[%c%2ld]  0x%08x  0x%08x  %03d   %02x    %02x   %4s    %s\n",
+	       ((valid) ? ' ' : 'u'), ((tlb & 0x0ffff) / TLB_STEP),
+	       ppn, epn, asid, shared, cb, pSize, pProt);
+}
+
+void print_dtlb(void)
+{
+	int count;
+	unsigned long tlb;
+
+	printk(" ================= SH-5 D-TLBs Status ===================\n");
+	printk(HOW_TO_READ_TLB_CONTENT);
+	tlb = DTLB_BASE;
+	for (count = 0; count < MAX_TLBs; count++, tlb += TLB_STEP)
+		print_single_tlb(tlb, 0);
+	printk
+	    (" =============================================================\n");
+}
+
+void print_itlb(void)
+{
+	int count;
+	unsigned long tlb;
+
+	printk(" ================= SH-5 I-TLBs Status ===================\n");
+	printk(HOW_TO_READ_TLB_CONTENT);
+	tlb = ITLB_BASE;
+	for (count = 0; count < MAX_TLBs; count++, tlb += TLB_STEP)
+		print_single_tlb(tlb, 0);
+	printk
+	    (" =============================================================\n");
+}
+
+/* ======================================================================= */
+
+#include "syscalltab.h"
+
+struct ring_node {
+	int evt;
+	int ret_addr;
+	int event;
+	int tra;
+	int pid;
+	unsigned long sp;
+	unsigned long pc;
+};
+
+static struct ring_node event_ring[16];
+static int event_ptr = 0;
+
+void evt_debug(int evt, int ret_addr, int event, int tra, struct pt_regs *regs)
+{
+	int syscallno = tra & 0xff;
+	unsigned long sp;
+	unsigned long stack_bottom;
+	int pid;
+	struct ring_node *rr;
+
+	pid = current->pid;
+	stack_bottom = (unsigned long) current->thread_info;
+	asm volatile("ori r15, 0, %0" : "=r" (sp));
+	rr = event_ring + event_ptr;
+	rr->evt = evt;
+	rr->ret_addr = ret_addr;
+	rr->event = event;
+	rr->tra = tra;
+	rr->pid = pid;
+	rr->sp = sp;
+	rr->pc = regs->pc;
+
+	if (sp < stack_bottom + 3092) {
+		printk("evt_debug : stack underflow report\n");
+		int i, j;
+		for (j=0, i = event_ptr; j<16; j++) {
+			rr = event_ring + i;
+			printk("evt=%08x event=%08x tra=%08x pid=%5d sp=%08lx pc=%08lx\n",
+				rr->evt, rr->event, rr->tra, rr->pid, rr->sp, rr->pc);
+			i--;
+			i &= 15;
+		}
+		panic("STACK UNDERFLOW\n");
+	}
+
+	event_ptr = (event_ptr + 1) & 15;
+
+	if ((event == 2) && (evt == 0x160)) {
+		if (syscallno < NUM_SYSCALL_INFO_ENTRIES)
+			printk("Task %d: %s()\n",
+			       current->pid,
+			       syscall_info_table[syscallno].name);
+	}
+}
+
+void evt_debug2(unsigned int ret)
+{
+	printk("Task %d: syscall returns %08x\n", current->pid, ret);
+}
+
+void evt_debug_ret_from_irq(struct pt_regs *regs)
+{
+	int pid;
+	struct ring_node *rr;
+
+	pid = current->pid;
+	rr = event_ring + event_ptr;
+	rr->evt = 0xffff;
+	rr->ret_addr = 0;
+	rr->event = 0;
+	rr->tra = 0;
+	rr->pid = pid;
+	rr->pc = regs->pc;
+	event_ptr = (event_ptr + 1) & 15;
+}
+
+void evt_debug_ret_from_exc(struct pt_regs *regs)
+{
+	int pid;
+	struct ring_node *rr;
+
+	pid = current->pid;
+	rr = event_ring + event_ptr;
+	rr->evt = 0xfffe;
+	rr->ret_addr = 0;
+	rr->event = 0;
+	rr->tra = 0;
+	rr->pid = pid;
+	rr->pc = regs->pc;
+	event_ptr = (event_ptr + 1) & 15;
+}
+
+/* ======================================================================= */
+
+void show_excp_regs(char *from, int trapnr, int signr, struct pt_regs *regs)
+{
+
+	unsigned long long ah, al, bh, bl, ch, cl;
+
+	printk("\n");
+	printk("EXCEPTION - %s: task %d; Linux trap # %d; signal = %d\n",
+	       ((from) ? from : "???"), current->pid, trapnr, signr);
+
+	asm volatile ("getcon   " __EXPEVT ", %0":"=r"(ah));
+	asm volatile ("getcon   " __EXPEVT ", %0":"=r"(al));
+	ah = (ah) >> 32;
+	al = (al) & 0xffffffff;
+	asm volatile ("getcon   " __KCR1 ", %0":"=r"(bh));
+	asm volatile ("getcon   " __KCR1 ", %0":"=r"(bl));
+	bh = (bh) >> 32;
+	bl = (bl) & 0xffffffff;
+	asm volatile ("getcon   " __INTEVT ", %0":"=r"(ch));
+	asm volatile ("getcon   " __INTEVT ", %0":"=r"(cl));
+	ch = (ch) >> 32;
+	cl = (cl) & 0xffffffff;
+	printk("EXPE: %08Lx%08Lx KCR1: %08Lx%08Lx INTE: %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	asm volatile ("getcon   " __PEXPEVT ", %0":"=r"(ah));
+	asm volatile ("getcon   " __PEXPEVT ", %0":"=r"(al));
+	ah = (ah) >> 32;
+	al = (al) & 0xffffffff;
+	asm volatile ("getcon   " __PSPC ", %0":"=r"(bh));
+	asm volatile ("getcon   " __PSPC ", %0":"=r"(bl));
+	bh = (bh) >> 32;
+	bl = (bl) & 0xffffffff;
+	asm volatile ("getcon   " __PSSR ", %0":"=r"(ch));
+	asm volatile ("getcon   " __PSSR ", %0":"=r"(cl));
+	ch = (ch) >> 32;
+	cl = (cl) & 0xffffffff;
+	printk("PEXP: %08Lx%08Lx PSPC: %08Lx%08Lx PSSR: %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->pc) >> 32;
+	al = (regs->pc) & 0xffffffff;
+	bh = (regs->regs[18]) >> 32;
+	bl = (regs->regs[18]) & 0xffffffff;
+	ch = (regs->regs[15]) >> 32;
+	cl = (regs->regs[15]) & 0xffffffff;
+	printk("PC  : %08Lx%08Lx LINK: %08Lx%08Lx SP  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->sr) >> 32;
+	al = (regs->sr) & 0xffffffff;
+	asm volatile ("getcon   " __TEA ", %0":"=r"(bh));
+	asm volatile ("getcon   " __TEA ", %0":"=r"(bl));
+	bh = (bh) >> 32;
+	bl = (bl) & 0xffffffff;
+	asm volatile ("getcon   " __KCR0 ", %0":"=r"(ch));
+	asm volatile ("getcon   " __KCR0 ", %0":"=r"(cl));
+	ch = (ch) >> 32;
+	cl = (cl) & 0xffffffff;
+	printk("SR  : %08Lx%08Lx TEA : %08Lx%08Lx KCR0: %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[0]) >> 32;
+	al = (regs->regs[0]) & 0xffffffff;
+	bh = (regs->regs[1]) >> 32;
+	bl = (regs->regs[1]) & 0xffffffff;
+	ch = (regs->regs[2]) >> 32;
+	cl = (regs->regs[2]) & 0xffffffff;
+	printk("R0  : %08Lx%08Lx R1  : %08Lx%08Lx R2  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[3]) >> 32;
+	al = (regs->regs[3]) & 0xffffffff;
+	bh = (regs->regs[4]) >> 32;
+	bl = (regs->regs[4]) & 0xffffffff;
+	ch = (regs->regs[5]) >> 32;
+	cl = (regs->regs[5]) & 0xffffffff;
+	printk("R3  : %08Lx%08Lx R4  : %08Lx%08Lx R5  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[6]) >> 32;
+	al = (regs->regs[6]) & 0xffffffff;
+	bh = (regs->regs[7]) >> 32;
+	bl = (regs->regs[7]) & 0xffffffff;
+	ch = (regs->regs[8]) >> 32;
+	cl = (regs->regs[8]) & 0xffffffff;
+	printk("R6  : %08Lx%08Lx R7  : %08Lx%08Lx R8  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+
+	ah = (regs->regs[9]) >> 32;
+	al = (regs->regs[9]) & 0xffffffff;
+	bh = (regs->regs[10]) >> 32;
+	bl = (regs->regs[10]) & 0xffffffff;
+	ch = (regs->regs[11]) >> 32;
+	cl = (regs->regs[11]) & 0xffffffff;
+	printk("R9  : %08Lx%08Lx R10 : %08Lx%08Lx R11 : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+	printk("....\n");
+
+	ah = (regs->tregs[0]) >> 32;
+	al = (regs->tregs[0]) & 0xffffffff;
+	bh = (regs->tregs[1]) >> 32;
+	bl = (regs->tregs[1]) & 0xffffffff;
+	ch = (regs->tregs[2]) >> 32;
+	cl = (regs->tregs[2]) & 0xffffffff;
+	printk("T0  : %08Lx%08Lx T1  : %08Lx%08Lx T2  : %08Lx%08Lx\n",
+	       ah, al, bh, bl, ch, cl);
+	printk("....\n");
+
+	print_dtlb();
+	print_itlb();
+}
+
+/* ======================================================================= */
+
+/*
+** Depending on <base> scan the MMU, Data or Instrction side
+** looking for a valid mapping matching Eaddr & asid.
+** Return -1 if not found or the TLB id entry otherwise.
+** Note: it works only for 4k pages!
+*/
+static unsigned long
+lookup_mmu_side(unsigned long base, unsigned long Eaddr, unsigned long asid)
+{
+	regType_t pteH;
+	unsigned long epn;
+	int count;
+
+	epn = Eaddr & 0xfffff000;
+
+	for (count = 0; count < MAX_TLBs; count++, base += TLB_STEP) {
+		pteH = getConfigReg(base);
+		if (GET_VALID(pteH))
+			if ((unsigned long) GET_EPN(pteH) == epn)
+				if ((unsigned long) GET_ASID(pteH) == asid)
+					break;
+	}
+	return ((unsigned long) ((count < MAX_TLBs) ? base : -1));
+}
+
+unsigned long lookup_dtlb(unsigned long Eaddr)
+{
+	unsigned long asid = get_asid();
+	return (lookup_mmu_side((u64) DTLB_BASE, Eaddr, asid));
+}
+
+unsigned long lookup_itlb(unsigned long Eaddr)
+{
+	unsigned long asid = get_asid();
+	return (lookup_mmu_side((u64) ITLB_BASE, Eaddr, asid));
+}
+
+void print_page(struct page *page)
+{
+	printk("  page[%p] -> index 0x%lx,  count 0x%x,  flags 0x%lx\n",
+	       page, page->index, page_count(page), page->flags);
+	printk("       address_space = %p, pages =%ld\n", page->mapping,
+	       page->mapping->nrpages);
+
+}
--- diff/arch/sh64/lib/io.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/io.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,207 @@
+/*
+ * Copyright (C) 2000 David J. Mckay (david.mckay@st.com)
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * This file contains the I/O routines for use on the overdrive board
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/delay.h>
+#include <asm/system.h>
+#include <asm/processor.h>
+#include <asm/io.h>
+#ifdef CONFIG_SH_CAYMAN
+#include <asm/cayman.h>
+#endif
+
+/*
+ * readX/writeX() are used to access memory mapped devices. On some
+ * architectures the memory mapped IO stuff needs to be accessed
+ * differently. On the SuperH architecture, we just read/write the
+ * memory location directly.
+ */
+
+#define dprintk(x...)
+
+static int io_addr(int x) {
+	if (x < 0x400) {
+#ifdef CONFIG_SH_CAYMAN
+		return (x << 2) | smsc_superio_virt;
+#else
+		panic ("Illegal access to I/O port 0x%04x\n", x);
+		return 0;
+#endif
+	} else {
+#ifdef CONFIG_PCI
+		return (x + pciio_virt);
+#else
+		panic ("Illegal access to I/O port 0x%04x\n", x);
+		return 0;
+#endif
+	}
+}
+
+unsigned long inb(unsigned long port)
+{
+	unsigned long r;
+
+	r = ctrl_inb(io_addr(port));
+	dprintk("inb(0x%x)=0x%x (0x%x)\n", port, r, io_addr(port));
+	return r;
+}
+
+unsigned long inw(unsigned long port)
+{
+	unsigned long r;
+
+	r = ctrl_inw(io_addr(port));
+	dprintk("inw(0x%x)=0x%x (0x%x)\n", port, r, io_addr(port));
+	return r;
+}
+
+unsigned long inl(unsigned long port)
+{
+	unsigned long r;
+
+	r = ctrl_inl(io_addr(port));
+	dprintk("inl(0x%x)=0x%x (0x%x)\n", port, r, io_addr(port));
+	return r;
+}
+
+void outb(unsigned long value, unsigned long port)
+{
+	dprintk("outb(0x%x,0x%x) (0x%x)\n", value, port, io_addr(port));
+	ctrl_outb(value, io_addr(port));
+}
+
+void outw(unsigned long value, unsigned long port)
+{
+	dprintk("outw(0x%x,0x%x) (0x%x)\n", value, port, io_addr(port));
+	ctrl_outw(value, io_addr(port));
+}
+
+void outl(unsigned long value, unsigned long port)
+{
+	dprintk("outw(0x%x,0x%x) (0x%x)\n", value, port, io_addr(port));
+	ctrl_outl(value, io_addr(port));
+}
+
+/* This is horrible at the moment - needs more work to do something sensible */
+#define IO_DELAY()
+
+#define OUT_DELAY(x,type) \
+void out##x##_p(unsigned type value,unsigned long port){out##x(value,port);IO_DELAY();}
+
+#define IN_DELAY(x,type) \
+unsigned type in##x##_p(unsigned long port) {unsigned type tmp=in##x(port);IO_DELAY();return tmp;}
+
+#if 1
+OUT_DELAY(b, long) OUT_DELAY(w, long) OUT_DELAY(l, long)
+ IN_DELAY(b, long) IN_DELAY(w, long) IN_DELAY(l, long)
+#endif
+/*  Now for the string version of these functions */
+void outsb(unsigned long port, const void *addr, unsigned long count)
+{
+	int i;
+	unsigned char *p = (unsigned char *) addr;
+
+	for (i = 0; i < count; i++, p++) {
+		outb(*p, port);
+	}
+}
+
+void insb(unsigned long port, void *addr, unsigned long count)
+{
+	int i;
+	unsigned char *p = (unsigned char *) addr;
+
+	for (i = 0; i < count; i++, p++) {
+		*p = inb(port);
+	}
+}
+
+/* For the 16 and 32 bit string functions, we have to worry about alignment.
+ * The SH does not do unaligned accesses, so we have to read as bytes and
+ * then write as a word or dword.
+ * This can be optimised a lot more, especially in the case where the data
+ * is aligned
+ */
+
+void outsw(unsigned long port, const void *addr, unsigned long count)
+{
+	int i;
+	unsigned short tmp;
+	unsigned char *p = (unsigned char *) addr;
+
+	for (i = 0; i < count; i++, p += 2) {
+		tmp = (*p) | ((*(p + 1)) << 8);
+		outw(tmp, port);
+	}
+}
+
+void insw(unsigned long port, void *addr, unsigned long count)
+{
+	int i;
+	unsigned short tmp;
+	unsigned char *p = (unsigned char *) addr;
+
+	for (i = 0; i < count; i++, p += 2) {
+		tmp = inw(port);
+		p[0] = tmp & 0xff;
+		p[1] = (tmp >> 8) & 0xff;
+	}
+}
+
+void outsl(unsigned long port, const void *addr, unsigned long count)
+{
+	int i;
+	unsigned tmp;
+	unsigned char *p = (unsigned char *) addr;
+
+	for (i = 0; i < count; i++, p += 4) {
+		tmp = (*p) | ((*(p + 1)) << 8) | ((*(p + 2)) << 16) |
+		    ((*(p + 3)) << 24);
+		outl(tmp, port);
+	}
+}
+
+void insl(unsigned long port, void *addr, unsigned long count)
+{
+	int i;
+	unsigned tmp;
+	unsigned char *p = (unsigned char *) addr;
+
+	for (i = 0; i < count; i++, p += 4) {
+		tmp = inl(port);
+		p[0] = tmp & 0xff;
+		p[1] = (tmp >> 8) & 0xff;
+		p[2] = (tmp >> 16) & 0xff;
+		p[3] = (tmp >> 24) & 0xff;
+
+	}
+}
+
+void memcpy_toio(unsigned long to, const void *from, long count)
+{
+	unsigned char *p = (unsigned char *) from;
+
+	while (count) {
+		count--;
+		writeb(*p++, to++);
+	}
+}
+
+void memcpy_fromio(void *to, unsigned long from, long count)
+{
+	int i;
+	unsigned char *p = (unsigned char *) to;
+
+	for (i = 0; i < count; i++) {
+		p[i] = readb(from);
+		from++;
+	}
+}
--- diff/arch/sh64/lib/memcpy.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/memcpy.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2002 Mark Debbage (Mark.Debbage@superh.com)
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <asm/string.h>
+
+// This is a simplistic optimization of memcpy to increase the
+// granularity of access beyond one byte using aligned
+// loads and stores. This is not an optimal implementation
+// for SH-5 (especially with regard to prefetching and the cache),
+// and a better version should be provided later ...
+
+void *memcpy(void *dest, const void *src, size_t count)
+{
+	char *d = (char *) dest, *s = (char *) src;
+
+	if (count >= 32) {
+		int i = 8 - (((unsigned long) d) & 0x7);
+
+		if (i != 8)
+			while (i-- && count--) {
+				*d++ = *s++;
+			}
+
+		if (((((unsigned long) d) & 0x7) == 0) &&
+		    ((((unsigned long) s) & 0x7) == 0)) {
+			while (count >= 32) {
+				unsigned long long t1, t2, t3, t4;
+				t1 = *(unsigned long long *) (s);
+				t2 = *(unsigned long long *) (s + 8);
+				t3 = *(unsigned long long *) (s + 16);
+				t4 = *(unsigned long long *) (s + 24);
+				*(unsigned long long *) (d) = t1;
+				*(unsigned long long *) (d + 8) = t2;
+				*(unsigned long long *) (d + 16) = t3;
+				*(unsigned long long *) (d + 24) = t4;
+				d += 32;
+				s += 32;
+				count -= 32;
+			}
+			while (count >= 8) {
+				*(unsigned long long *) d =
+				    *(unsigned long long *) s;
+				d += 8;
+				s += 8;
+				count -= 8;
+			}
+		}
+
+		if (((((unsigned long) d) & 0x3) == 0) &&
+		    ((((unsigned long) s) & 0x3) == 0)) {
+			while (count >= 4) {
+				*(unsigned long *) d = *(unsigned long *) s;
+				d += 4;
+				s += 4;
+				count -= 4;
+			}
+		}
+
+		if (((((unsigned long) d) & 0x1) == 0) &&
+		    ((((unsigned long) s) & 0x1) == 0)) {
+			while (count >= 2) {
+				*(unsigned short *) d = *(unsigned short *) s;
+				d += 2;
+				s += 2;
+				count -= 2;
+			}
+		}
+	}
+
+	while (count--) {
+		*d++ = *s++;
+	}
+
+	return d;
+}
--- diff/arch/sh64/lib/old-checksum.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/old-checksum.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,17 @@
+/*
+ * FIXME: old compatibility stuff, will be removed soon.
+ */
+
+#include <net/checksum.h>
+
+unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum)
+{
+	int src_err=0, dst_err=0;
+
+	sum = csum_partial_copy_generic ( src, dst, len, sum, &src_err, &dst_err);
+
+	if (src_err || dst_err)
+		printk("old csum_partial_copy_fromuser(), tell mingo to convert me.\n");
+
+	return sum;
+}
--- diff/arch/sh64/lib/page_clear.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/page_clear.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,51 @@
+/*
+   Copyright 2003 Richard Curnow, SuperH (UK) Ltd.
+
+   This file is subject to the terms and conditions of the GNU General Public
+   License.  See the file "COPYING" in the main directory of this archive
+   for more details.
+
+   Tight version of memset for the case of just clearing a page.  It turns out
+   that having the alloco's spaced out slightly due to the increment/branch
+   pair causes them to contend less for access to the cache.  Similarly,
+   keeping the stores apart from the allocos causes less contention.  => Do two
+   separate loops.  Do multiple stores per loop to amortise the
+   increment/branch cost a little.
+
+   Parameters:
+   r2 : source effective address (start of page)
+
+   Always clears 4096 bytes.
+
+*/
+
+	.section .text..SHmedia32,"ax"
+	.little
+
+	.balign 8
+	.global sh64_page_clear
+sh64_page_clear:
+	pta/l 1f, tr1
+	pta/l 2f, tr2
+	ptabs/l r18, tr0
+
+	movi 4096, r7
+	add  r2, r7, r7
+	add  r2, r63, r6
+1:
+	alloco r6, 0
+	addi	r6, 32, r6
+	bgt/l	r7, r6, tr1
+
+	add  r2, r63, r6
+2:
+	st.q  r6,   0, r63
+	st.q  r6,   8, r63
+	st.q  r6,  16, r63
+	st.q  r6,  24, r63
+	addi r6, 32, r6
+	bgt/l r7, r6, tr2
+
+	blink tr0, r63
+
+
--- diff/arch/sh64/lib/page_copy.S	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/page_copy.S	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,82 @@
+/*
+   Copyright 2003 Richard Curnow, SuperH (UK) Ltd.
+
+   This file is subject to the terms and conditions of the GNU General Public
+   License.  See the file "COPYING" in the main directory of this archive
+   for more details.
+
+   Tight version of mempy for the case of just copying a page.
+   Prefetch strategy empirically optimised against RTL simulations
+   of SH5-101 cut2 eval chip with Cayman board DDR memory.
+
+   Parameters:
+   r2 : source effective address (start of page)
+   r3 : destination effective address (start of page)
+
+   Always copies 4096 bytes.
+
+   Points to review.
+   * Currently the prefetch is 4 lines ahead and the alloco is 2 lines ahead.
+     It seems like the prefetch needs to be at at least 4 lines ahead to get
+     the data into the cache in time, and the allocos contend with outstanding
+     prefetches for the same cache set, so it's better to have the numbers
+     different.
+   */
+
+	.section .text..SHmedia32,"ax"
+	.little
+
+	.balign 8
+	.global sh64_page_copy
+sh64_page_copy:
+
+	/* Copy 4096 bytes worth of data from r2 to r3.
+	   Do prefetches 4 lines ahead.
+	   Do alloco 2 lines ahead */
+
+	pta 1f, tr1
+	pta 2f, tr2
+	pta 3f, tr3
+	ptabs r18, tr0
+
+	ld.q r2, 0x00, r63
+	ld.q r2, 0x20, r63
+	ld.q r2, 0x40, r63
+	ld.q r2, 0x60, r63
+	alloco r3, 0x00
+	alloco r3, 0x20
+
+	movi 3968, r6
+	add  r3, r6, r6
+	addi r6, 64, r7
+	addi r7, 64, r8
+	sub r2, r3, r60
+	addi r60, 8, r61
+	addi r61, 8, r62
+	addi r62, 8, r23
+	addi r60, 0x80, r22
+
+/* Minimal code size.  The extra branches inside the loop don't cost much
+   because they overlap with the time spent waiting for prefetches to
+   complete. */
+1:
+	bge/u r3, r6, tr2  ! skip prefetch for last 4 lines
+	ldx.q r3, r22, r63 ! prefetch 4 lines hence
+2:
+	bge/u r3, r7, tr3  ! skip alloco for last 2 lines
+	alloco r3, 0x40    ! alloc destination line 2 lines ahead
+3:
+	ldx.q r3, r60, r36
+	ldx.q r3, r61, r37
+	ldx.q r3, r62, r38
+	ldx.q r3, r23, r39
+	st.q  r3,   0, r36
+	st.q  r3,   8, r37
+	st.q  r3,  16, r38
+	st.q  r3,  24, r39
+	addi r3, 32, r3
+	bgt/l r8, r3, tr1
+
+	blink tr0, r63	   ! return
+
+
--- diff/arch/sh64/lib/panic.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/panic.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2003  Richard Curnow, SuperH UK Limited
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/kernel.h>
+#include <asm/io.h>
+#include <asm/registers.h>
+
+/* THIS IS A PHYSICAL ADDRESS */
+#define HDSP2534_ADDR (0x04002100)
+
+#ifdef CONFIG_SH_CAYMAN
+
+static void poor_mans_delay(void)
+{
+	int i;
+	for (i = 0; i < 2500000; i++) {
+	}		/* poor man's delay */
+}
+
+static void show_value(unsigned long x)
+{
+	int i;
+	unsigned nibble;
+	for (i = 0; i < 8; i++) {
+		nibble = ((x >> (i * 4)) & 0xf);
+
+		ctrl_outb(nibble + ((nibble > 9) ? 55 : 48),
+			  HDSP2534_ADDR + 0xe0 + ((7 - i) << 2));
+	}
+}
+
+#endif
+
+void
+panic_handler(unsigned long panicPC, unsigned long panicSSR,
+	      unsigned long panicEXPEVT)
+{
+#ifdef CONFIG_SH_CAYMAN
+	while (1) {
+		/* This piece of code displays the PC on the LED display */
+		show_value(panicPC);
+		poor_mans_delay();
+		show_value(panicSSR);
+		poor_mans_delay();
+		show_value(panicEXPEVT);
+		poor_mans_delay();
+	}
+#endif
+
+	/* Never return from the panic handler */
+	for (;;) ;
+
+}
--- diff/arch/sh64/lib/udelay.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/lib/udelay.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,60 @@
+/*
+ * arch/sh64/lib/udelay.c
+ *
+ * Delay routines, using a pre-computed "loops_per_jiffy" value.
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <asm/param.h>
+
+extern unsigned long loops_per_jiffy;
+
+/*
+ * Use only for very small delays (< 1 msec).
+ *
+ * The active part of our cycle counter is only 32-bits wide, and
+ * we're treating the difference between two marks as signed.  On
+ * a 1GHz box, that's about 2 seconds.
+ */
+
+void __delay(int loops)
+{
+	long long dummy;
+	__asm__ __volatile__("gettr	tr0, %1\n\t"
+			     "pta	$+4, tr0\n\t"
+			     "addi	%0, -1, %0\n\t"
+			     "bne	%0, r63, tr0\n\t"
+			     "ptabs	%1, tr0\n\t":"=r"(loops),
+			     "=r"(dummy)
+			     :"0"(loops));
+}
+
+void __udelay(unsigned long long usecs, unsigned long lpj)
+{
+	usecs *= (((unsigned long long) HZ << 32) / 1000000) * lpj;
+	__delay((long long) usecs >> 32);
+}
+
+void __ndelay(unsigned long long nsecs, unsigned long lpj)
+{
+	nsecs *= (((unsigned long long) HZ << 32) / 1000000000) * lpj;
+	__delay((long long) nsecs >> 32);
+}
+
+void udelay(unsigned long usecs)
+{
+	__udelay(usecs, loops_per_jiffy);
+}
+
+void ndelay(unsigned long nsecs)
+{
+	__ndelay(nsecs, loops_per_jiffy);
+}
+
--- diff/arch/sh64/mach-cayman/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-cayman/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,11 @@
+#
+# Makefile for the Hitachi Cayman specific parts of the kernel
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+obj-y := setup.o irq.o
+obj-$(CONFIG_HEARTBEAT)	+= led.o
+
--- diff/arch/sh64/mach-cayman/irq.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-cayman/irq.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,196 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/kernel/irq_cayman.c
+ *
+ * SH-5 Cayman Interrupt Support
+ *
+ * This file handles the board specific parts of the Cayman interrupt system
+ *
+ * Copyright (C) 2002 Stuart Menefy
+ */
+
+#include <linux/config.h>
+#include <asm/irq.h>
+#include <asm/page.h>
+#include <asm/io.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <linux/signal.h>
+#include <asm/cayman.h>
+
+unsigned long epld_virt;
+
+#define EPLD_BASE        0x04002000
+#define EPLD_STATUS_BASE (epld_virt + 0x10)
+#define EPLD_MASK_BASE   (epld_virt + 0x20)
+
+/* Note the SMSC SuperIO chip and SMSC LAN chip interrupts are all muxed onto
+   the same SH-5 interrupt */
+
+static irqreturn_t cayman_interrupt_smsc(int irq, void *dev_id, struct pt_regs *regs)
+{
+        printk(KERN_INFO "CAYMAN: spurious SMSC interrupt\n");
+	return IRQ_NONE;
+}
+
+static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id, struct pt_regs *regs)
+{
+        printk(KERN_INFO "CAYMAN: spurious PCI interrupt, IRQ %d\n", irq);
+	return IRQ_NONE;
+}
+
+static struct irqaction cayman_action_smsc = {
+	.name		= "Cayman SMSC Mux",
+	.handler	= cayman_interrupt_smsc,
+	.flags		= SA_INTERRUPT,
+};
+
+static struct irqaction cayman_action_pci2 = {
+	.name		= "Cayman PCI2 Mux",
+	.handler	= cayman_interrupt_pci2,
+	.flags		= SA_INTERRUPT,
+};
+
+static void enable_cayman_irq(unsigned int irq)
+{
+	unsigned long flags;
+	unsigned long mask;
+	unsigned int reg;
+	unsigned char bit;
+
+	irq -= START_EXT_IRQS;
+	reg = EPLD_MASK_BASE + ((irq / 8) << 2);
+	bit = 1<<(irq % 8);
+	save_and_cli(flags);
+	mask = ctrl_inl(reg);
+	mask |= bit;
+	ctrl_outl(mask, reg);
+	restore_flags(flags);
+}
+
+void disable_cayman_irq(unsigned int irq)
+{
+	unsigned long flags;
+	unsigned long mask;
+	unsigned int reg;
+	unsigned char bit;
+
+	irq -= START_EXT_IRQS;
+	reg = EPLD_MASK_BASE + ((irq / 8) << 2);
+	bit = 1<<(irq % 8);
+	save_and_cli(flags);
+	mask = ctrl_inl(reg);
+	mask &= ~bit;
+	ctrl_outl(mask, reg);
+	restore_flags(flags);
+}
+
+static void ack_cayman_irq(unsigned int irq)
+{
+	disable_cayman_irq(irq);
+}
+
+static void end_cayman_irq(unsigned int irq)
+{
+	if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+		enable_cayman_irq(irq);
+}
+
+static unsigned int startup_cayman_irq(unsigned int irq)
+{
+	enable_cayman_irq(irq);
+	return 0; /* never anything pending */
+}
+
+static void shutdown_cayman_irq(unsigned int irq)
+{
+	disable_cayman_irq(irq);
+}
+
+struct hw_interrupt_type cayman_irq_type = {
+	.typename	= "Cayman-IRQ",
+	.startup	= startup_cayman_irq,
+	.shutdown	= shutdown_cayman_irq,
+	.enable		= enable_cayman_irq,
+	.disable	= disable_cayman_irq,
+	.ack		= ack_cayman_irq,
+	.end		= end_cayman_irq,
+};
+
+int cayman_irq_demux(int evt)
+{
+	int irq = intc_evt_to_irq[evt];
+
+	if (irq == SMSC_IRQ) {
+		unsigned long status;
+		int i;
+
+		status = ctrl_inl(EPLD_STATUS_BASE) &
+			 ctrl_inl(EPLD_MASK_BASE) & 0xff;
+		if (status == 0) {
+			irq = -1;
+		} else {
+			for (i=0; i<8; i++) {
+				if (status & (1<<i))
+					break;
+			}
+			irq = START_EXT_IRQS + i;
+		}
+	}
+
+	if (irq == PCI2_IRQ) {
+		unsigned long status;
+		int i;
+
+		status = ctrl_inl(EPLD_STATUS_BASE + 3 * sizeof(u32)) &
+			 ctrl_inl(EPLD_MASK_BASE + 3 * sizeof(u32)) & 0xff;
+		if (status == 0) {
+			irq = -1;
+		} else {
+			for (i=0; i<8; i++) {
+				if (status & (1<<i))
+					break;
+			}
+			irq = START_EXT_IRQS + (3 * 8) + i;
+		}
+	}
+
+	return irq;
+}
+
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_SYSCTL)
+int cayman_irq_describe(char* p, int irq)
+{
+	if (irq < NR_INTC_IRQS) {
+		return intc_irq_describe(p, irq);
+	} else if (irq < NR_INTC_IRQS + 8) {
+		return sprintf(p, "(SMSC %d)", irq - NR_INTC_IRQS);
+	} else if ((irq >= NR_INTC_IRQS + 24) && (irq < NR_INTC_IRQS + 32)) {
+		return sprintf(p, "(PCI2 %d)", irq - (NR_INTC_IRQS + 24));
+	}
+
+	return 0;
+}
+#endif
+
+void init_cayman_irq(void)
+{
+	int i;
+
+	epld_virt = onchip_remap(EPLD_BASE, 1024, "EPLD");
+	if (!epld_virt) {
+		printk(KERN_ERR "Cayman IRQ: Unable to remap EPLD\n");
+		return;
+	}
+
+	for (i=0; i<NR_EXT_IRQS; i++) {
+		irq_desc[START_EXT_IRQS + i].handler = &cayman_irq_type;
+	}
+
+	/* Setup the SMSC interrupt */
+	setup_irq(SMSC_IRQ, &cayman_action_smsc);
+	setup_irq(PCI2_IRQ, &cayman_action_pci2);
+}
--- diff/arch/sh64/mach-cayman/led.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-cayman/led.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,51 @@
+/*
+ * arch/sh64/kernel/led_cayman.c
+ *
+ * Copyright (C) 2002 Stuart Menefy <stuart.menefy@st.com>
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * Flash the LEDs
+ */
+#include <asm/io.h>
+
+/*
+** It is supposed these functions to be used for a low level
+** debugging (via Cayman LEDs), hence to be available as soon
+** as possible.
+** Unfortunately Cayman LEDs relies on Cayman EPLD to be mapped
+** (this happen when IRQ are initialized... quite late).
+** These triky dependencies should be removed. Temporary, it
+** may be enough to NOP until EPLD is mapped.
+*/
+
+extern unsigned long epld_virt;
+
+#define LED_ADDR      (epld_virt + 0x008)
+#define HDSP2534_ADDR (epld_virt + 0x100)
+
+void mach_led(int position, int value)
+{
+	if (!epld_virt)
+		return;
+
+	if (value)
+		ctrl_outl(0, LED_ADDR);
+	else
+		ctrl_outl(1, LED_ADDR);
+
+}
+
+void mach_alphanum(int position, unsigned char value)
+{
+	if (!epld_virt)
+		return;
+
+	ctrl_outb(value, HDSP2534_ADDR + 0xe0 + (position << 2));
+}
+
+void mach_alphanum_brightness(int setting)
+{
+	ctrl_outb(setting & 7, HDSP2534_ADDR + 0xc0);
+}
--- diff/arch/sh64/mach-cayman/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-cayman/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,209 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mach-cayman/setup.c
+ *
+ * SH5 Cayman support
+ *
+ * This file handles the architecture-dependent parts of initialization
+ *
+ * Copyright David J. Mckay.
+ * Needs major work!
+ *
+ * benedict.gaster@superh.com:	 3rd May 2002
+ *    Added support for ramdisk, removing statically linked romfs at the same time.
+ *
+ * lethal@linux-sh.org:          15th May 2003
+ *    Use the generic procfs cpuinfo interface, just return a valid board name.
+ */
+
+#include <linux/stddef.h>
+#include <linux/init.h>
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/bootmem.h>
+#include <linux/delay.h>
+#include <linux/kernel.h>
+#include <linux/seq_file.h>
+#include <asm/processor.h>
+#include <asm/platform.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/page.h>
+
+#define RES_COUNT(res) ((sizeof((res))/sizeof(struct resource)))
+
+/*
+ * Platform Dependent Interrupt Priorities.
+ */
+
+/* Using defaults defined in irq.h */
+#define	RES NO_PRIORITY		/* Disabled */
+#define IR0 IRL0_PRIORITY	/* IRLs */
+#define IR1 IRL1_PRIORITY
+#define IR2 IRL2_PRIORITY
+#define IR3 IRL3_PRIORITY
+#define PCA INTA_PRIORITY	/* PCI Ints */
+#define PCB INTB_PRIORITY
+#define PCC INTC_PRIORITY
+#define PCD INTD_PRIORITY
+#define SER TOP_PRIORITY
+#define ERR TOP_PRIORITY
+#define PW0 TOP_PRIORITY
+#define PW1 TOP_PRIORITY
+#define PW2 TOP_PRIORITY
+#define PW3 TOP_PRIORITY
+#define DM0 NO_PRIORITY		/* DMA Ints */
+#define DM1 NO_PRIORITY
+#define DM2 NO_PRIORITY
+#define DM3 NO_PRIORITY
+#define DAE NO_PRIORITY
+#define TU0 TIMER_PRIORITY	/* TMU Ints */
+#define TU1 NO_PRIORITY
+#define TU2 NO_PRIORITY
+#define TI2 NO_PRIORITY
+#define ATI NO_PRIORITY		/* RTC Ints */
+#define PRI NO_PRIORITY
+#define CUI RTC_PRIORITY
+#define ERI SCIF_PRIORITY	/* SCIF Ints */
+#define RXI SCIF_PRIORITY
+#define BRI SCIF_PRIORITY
+#define TXI SCIF_PRIORITY
+#define ITI TOP_PRIORITY	/* WDT Ints */
+
+/* Setup for the SMSC FDC37C935 */
+#define SMSC_SUPERIO_BASE	0x04000000
+#define SMSC_CONFIG_PORT_ADDR	0x3f0
+#define SMSC_INDEX_PORT_ADDR	SMSC_CONFIG_PORT_ADDR
+#define SMSC_DATA_PORT_ADDR	0x3f1
+
+#define SMSC_ENTER_CONFIG_KEY	0x55
+#define SMSC_EXIT_CONFIG_KEY	0xaa
+
+#define SMCS_LOGICAL_DEV_INDEX	0x07
+#define SMSC_DEVICE_ID_INDEX	0x20
+#define SMSC_DEVICE_REV_INDEX	0x21
+#define SMSC_ACTIVATE_INDEX	0x30
+#define SMSC_PRIMARY_INT_INDEX	0x70
+#define SMSC_SECONDARY_INT_INDEX 0x72
+
+#define SMSC_KEYBOARD_DEVICE 7
+
+#define SMSC_SUPERIO_READ_INDEXED(index) ({ \
+	outb((index), SMSC_INDEX_PORT_ADDR); \
+	inb(SMSC_DATA_PORT_ADDR); })
+#define SMSC_SUPERIO_WRITE_INDEXED(val, index) ({ \
+	outb((index), SMSC_INDEX_PORT_ADDR); \
+	outb((val),   SMSC_DATA_PORT_ADDR); })
+
+unsigned long smsc_superio_virt;
+
+/*
+ * Platform dependent structures: maps and parms block.
+ */
+struct resource io_resources[] = {
+	/* To be updated with external devices */
+};
+
+struct resource kram_resources[] = {
+	{ "Kernel code", 0, 0 },	/* These must be last in the array */
+	{ "Kernel data", 0, 0 }		/* These must be last in the array */
+};
+
+struct resource xram_resources[] = {
+	/* To be updated with external devices */
+};
+
+struct resource rom_resources[] = {
+	/* To be updated with external devices */
+};
+
+struct sh64_platform platform_parms = {
+	.readonly_rootfs =	1,
+	.initial_root_dev =	0x0100,
+	.loader_type =		1,
+	.io_res_p =		io_resources,
+	.io_res_count =		RES_COUNT(io_resources),
+	.kram_res_p =		kram_resources,
+	.kram_res_count =	RES_COUNT(kram_resources),
+	.xram_res_p =		xram_resources,
+	.xram_res_count =	RES_COUNT(xram_resources),
+	.rom_res_p =		rom_resources,
+	.rom_res_count =	RES_COUNT(rom_resources),
+};
+
+int platform_int_priority[NR_INTC_IRQS] = {
+	IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD,	/* IRQ  0- 7 */
+	RES, RES, RES, RES, SER, ERR, PW3, PW2,	/* IRQ  8-15 */
+	PW1, PW0, DM0, DM1, DM2, DM3, DAE, RES,	/* IRQ 16-23 */
+	RES, RES, RES, RES, RES, RES, RES, RES,	/* IRQ 24-31 */
+	TU0, TU1, TU2, TI2, ATI, PRI, CUI, ERI,	/* IRQ 32-39 */
+	RXI, BRI, TXI, RES, RES, RES, RES, RES,	/* IRQ 40-47 */
+	RES, RES, RES, RES, RES, RES, RES, RES,	/* IRQ 48-55 */
+	RES, RES, RES, RES, RES, RES, RES, ITI,	/* IRQ 56-63 */
+};
+
+static int __init smsc_superio_setup(void)
+{
+	unsigned char devid, devrev;
+
+	smsc_superio_virt = onchip_remap(SMSC_SUPERIO_BASE, 1024, "SMSC SuperIO");
+	if (!smsc_superio_virt) {
+		panic("Unable to remap SMSC SuperIO\n");
+	}
+
+	/* Initially the chip is in run state */
+	/* Put it into configuration state */
+	outb(SMSC_ENTER_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);
+	outb(SMSC_ENTER_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);
+
+	/* Read device ID info */
+	devid = SMSC_SUPERIO_READ_INDEXED(SMSC_DEVICE_ID_INDEX);
+	devrev = SMSC_SUPERIO_READ_INDEXED(SMSC_DEVICE_REV_INDEX);
+	printk("SMSC SuperIO devid %02x rev %02x\n", devid, devrev);
+
+	/* Select the keyboard device */
+	SMSC_SUPERIO_WRITE_INDEXED(SMSC_KEYBOARD_DEVICE, SMCS_LOGICAL_DEV_INDEX);
+
+	/* enable it */
+	SMSC_SUPERIO_WRITE_INDEXED(1, SMSC_ACTIVATE_INDEX);
+
+	/* Select the interrupts */
+	/* On a PC keyboard is IRQ1, mouse is IRQ12 */
+	SMSC_SUPERIO_WRITE_INDEXED(1, SMSC_PRIMARY_INT_INDEX);
+	SMSC_SUPERIO_WRITE_INDEXED(12, SMSC_SECONDARY_INT_INDEX);
+
+	/* Exit the configuraton state */
+	outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);
+
+	return 0;
+}
+
+/* This is grotty, but, because kernel is always referenced on the link line
+ * before any devices, this is safe.
+ */
+__initcall(smsc_superio_setup);
+
+void __init platform_setup(void)
+{
+	/* Cayman platform leaves the decision to head.S, for now */
+	platform_parms.fpu_flags = fpu_in_use;
+}
+
+void __init platform_monitor(void)
+{
+	/* Nothing yet .. */
+}
+
+void __init platform_reserve(void)
+{
+	/* Nothing yet .. */
+}
+
+const char *get_system_type(void)
+{
+	return "Hitachi Cayman";
+}
+
--- diff/arch/sh64/mach-harp/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-harp/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,14 @@
+#
+# Makefile for the ST50 Harp specific parts of the kernel
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+O_TARGET := harp.o
+
+obj-y := setup.o
+
+include $(TOPDIR)/Rules.make
+
--- diff/arch/sh64/mach-harp/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-harp/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,139 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mach-harp/setup.c
+ *
+ * SH-5 Simulator Platform Support
+ *
+ * This file handles the architecture-dependent parts of initialization
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * benedict.gaster@superh.com:	 3rd May 2002
+ *    Added support for ramdisk, removing statically linked romfs at the same time. *
+ *
+ * lethal@linux-sh.org:          15th May 2003
+ *    Use the generic procfs cpuinfo interface, just return a valid board name.
+ */
+
+#include <linux/stddef.h>
+#include <linux/init.h>
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/bootmem.h>
+#include <linux/delay.h>
+#include <linux/kernel.h>
+#include <asm/processor.h>
+#include <asm/platform.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/page.h>
+
+#define RES_COUNT(res) ((sizeof((res))/sizeof(struct resource)))
+
+/*
+ * Platform Dependent Interrupt Priorities.
+ */
+
+/* Using defaults defined in irq.h */
+#define	RES NO_PRIORITY		/* Disabled */
+#define IR0 IRL0_PRIORITY	/* IRLs */
+#define IR1 IRL1_PRIORITY
+#define IR2 IRL2_PRIORITY
+#define IR3 IRL3_PRIORITY
+#define PCA INTA_PRIORITY	/* PCI Ints */
+#define PCB INTB_PRIORITY
+#define PCC INTC_PRIORITY
+#define PCD INTD_PRIORITY
+#define SER TOP_PRIORITY
+#define ERR TOP_PRIORITY
+#define PW0 TOP_PRIORITY
+#define PW1 TOP_PRIORITY
+#define PW2 TOP_PRIORITY
+#define PW3 TOP_PRIORITY
+#define DM0 NO_PRIORITY		/* DMA Ints */
+#define DM1 NO_PRIORITY
+#define DM2 NO_PRIORITY
+#define DM3 NO_PRIORITY
+#define DAE NO_PRIORITY
+#define TU0 TIMER_PRIORITY	/* TMU Ints */
+#define TU1 NO_PRIORITY
+#define TU2 NO_PRIORITY
+#define TI2 NO_PRIORITY
+#define ATI NO_PRIORITY		/* RTC Ints */
+#define PRI NO_PRIORITY
+#define CUI RTC_PRIORITY
+#define ERI SCIF_PRIORITY	/* SCIF Ints */
+#define RXI SCIF_PRIORITY
+#define BRI SCIF_PRIORITY
+#define TXI SCIF_PRIORITY
+#define ITI TOP_PRIORITY	/* WDT Ints */
+
+/*
+ * Platform dependent structures: maps and parms block.
+ */
+struct resource io_resources[] = {
+	/* To be updated with external devices */
+};
+
+struct resource kram_resources[] = {
+	{ "Kernel code", 0, 0 },	/* These must be last in the array */
+	{ "Kernel data", 0, 0 }		/* These must be last in the array */
+};
+
+struct resource xram_resources[] = {
+	/* To be updated with external devices */
+};
+
+struct resource rom_resources[] = {
+	/* To be updated with external devices */
+};
+
+struct sh64_platform platform_parms = {
+	.readonly_rootfs =	1,
+	.initial_root_dev =	0x0100,
+	.loader_type =		1,
+	.io_res_p =		io_resources,
+	.io_res_count =		RES_COUNT(io_resources),
+	.kram_res_p =		kram_resources,
+	.kram_res_count =	RES_COUNT(kram_resources),
+	.xram_res_p =		xram_resources,
+	.xram_res_count =	RES_COUNT(xram_resources),
+	.rom_res_p =		rom_resources,
+	.rom_res_count =	RES_COUNT(rom_resources),
+};
+
+int platform_int_priority[NR_INTC_IRQS] = {
+	IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD,	/* IRQ  0- 7 */
+	RES, RES, RES, RES, SER, ERR, PW3, PW2,	/* IRQ  8-15 */
+	PW1, PW0, DM0, DM1, DM2, DM3, DAE, RES,	/* IRQ 16-23 */
+	RES, RES, RES, RES, RES, RES, RES, RES,	/* IRQ 24-31 */
+	TU0, TU1, TU2, TI2, ATI, PRI, CUI, ERI,	/* IRQ 32-39 */
+	RXI, BRI, TXI, RES, RES, RES, RES, RES,	/* IRQ 40-47 */
+	RES, RES, RES, RES, RES, RES, RES, RES,	/* IRQ 48-55 */
+	RES, RES, RES, RES, RES, RES, RES, ITI,	/* IRQ 56-63 */
+};
+
+void __init platform_setup(void)
+{
+	/* Harp platform leaves the decision to head.S, for now */
+	platform_parms.fpu_flags = fpu_in_use;
+}
+
+void __init platform_monitor(void)
+{
+	/* Nothing yet .. */
+}
+
+void __init platform_reserve(void)
+{
+	/* Nothing yet .. */
+}
+
+const char *get_system_type(void)
+{
+	return "ST50 Harp";
+}
+
--- diff/arch/sh64/mach-romram/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-romram/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,14 @@
+#
+# Makefile for the SH-5 ROM/RAM specific parts of the kernel
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+O_TARGET := romram.o
+
+obj-y := setup.o
+
+include $(TOPDIR)/Rules.make
+
--- diff/arch/sh64/mach-romram/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-romram/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,142 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mach-romram/setup.c
+ *
+ * SH-5 ROM/RAM Platform Support
+ *
+ * This file handles the architecture-dependent parts of initialization
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * benedict.gaster@superh.com:	 3rd May 2002
+ *    Added support for ramdisk, removing statically linked romfs at the same time. *
+ *
+ * lethal@linux-sh.org:          15th May 2003
+ *    Use the generic procfs cpuinfo interface, just return a valid board name.
+ *
+ * Sean.McGoogan@superh.com	17th Feb 2004
+ * 	copied from arch/sh64/mach-harp/setup.c
+ */
+
+#include <linux/stddef.h>
+#include <linux/init.h>
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/bootmem.h>
+#include <linux/delay.h>
+#include <linux/kernel.h>
+#include <asm/processor.h>
+#include <asm/platform.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/page.h>
+
+#define RES_COUNT(res) ((sizeof((res))/sizeof(struct resource)))
+
+/*
+ * Platform Dependent Interrupt Priorities.
+ */
+
+/* Using defaults defined in irq.h */
+#define	RES NO_PRIORITY		/* Disabled */
+#define IR0 IRL0_PRIORITY	/* IRLs */
+#define IR1 IRL1_PRIORITY
+#define IR2 IRL2_PRIORITY
+#define IR3 IRL3_PRIORITY
+#define PCA INTA_PRIORITY	/* PCI Ints */
+#define PCB INTB_PRIORITY
+#define PCC INTC_PRIORITY
+#define PCD INTD_PRIORITY
+#define SER TOP_PRIORITY
+#define ERR TOP_PRIORITY
+#define PW0 TOP_PRIORITY
+#define PW1 TOP_PRIORITY
+#define PW2 TOP_PRIORITY
+#define PW3 TOP_PRIORITY
+#define DM0 NO_PRIORITY		/* DMA Ints */
+#define DM1 NO_PRIORITY
+#define DM2 NO_PRIORITY
+#define DM3 NO_PRIORITY
+#define DAE NO_PRIORITY
+#define TU0 TIMER_PRIORITY	/* TMU Ints */
+#define TU1 NO_PRIORITY
+#define TU2 NO_PRIORITY
+#define TI2 NO_PRIORITY
+#define ATI NO_PRIORITY		/* RTC Ints */
+#define PRI NO_PRIORITY
+#define CUI RTC_PRIORITY
+#define ERI SCIF_PRIORITY	/* SCIF Ints */
+#define RXI SCIF_PRIORITY
+#define BRI SCIF_PRIORITY
+#define TXI SCIF_PRIORITY
+#define ITI TOP_PRIORITY	/* WDT Ints */
+
+/*
+ * Platform dependent structures: maps and parms block.
+ */
+struct resource io_resources[] = {
+	/* To be updated with external devices */
+};
+
+struct resource kram_resources[] = {
+	{ "Kernel code", 0, 0 },	/* These must be last in the array */
+	{ "Kernel data", 0, 0 }		/* These must be last in the array */
+};
+
+struct resource xram_resources[] = {
+	/* To be updated with external devices */
+};
+
+struct resource rom_resources[] = {
+	/* To be updated with external devices */
+};
+
+struct sh64_platform platform_parms = {
+	.readonly_rootfs =	1,
+	.initial_root_dev =	0x0100,
+	.loader_type =		1,
+	.io_res_p =		io_resources,
+	.io_res_count =		RES_COUNT(io_resources),
+	.kram_res_p =		kram_resources,
+	.kram_res_count =	RES_COUNT(kram_resources),
+	.xram_res_p =		xram_resources,
+	.xram_res_count =	RES_COUNT(xram_resources),
+	.rom_res_p =		rom_resources,
+	.rom_res_count =	RES_COUNT(rom_resources),
+};
+
+int platform_int_priority[NR_INTC_IRQS] = {
+	IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD,	/* IRQ  0- 7 */
+	RES, RES, RES, RES, SER, ERR, PW3, PW2,	/* IRQ  8-15 */
+	PW1, PW0, DM0, DM1, DM2, DM3, DAE, RES,	/* IRQ 16-23 */
+	RES, RES, RES, RES, RES, RES, RES, RES,	/* IRQ 24-31 */
+	TU0, TU1, TU2, TI2, ATI, PRI, CUI, ERI,	/* IRQ 32-39 */
+	RXI, BRI, TXI, RES, RES, RES, RES, RES,	/* IRQ 40-47 */
+	RES, RES, RES, RES, RES, RES, RES, RES,	/* IRQ 48-55 */
+	RES, RES, RES, RES, RES, RES, RES, ITI,	/* IRQ 56-63 */
+};
+
+void __init platform_setup(void)
+{
+	/* ROM/RAM platform leaves the decision to head.S, for now */
+	platform_parms.fpu_flags = fpu_in_use;
+}
+
+void __init platform_monitor(void)
+{
+	/* Nothing yet .. */
+}
+
+void __init platform_reserve(void)
+{
+	/* Nothing yet .. */
+}
+
+const char *get_system_type(void)
+{
+	return "ROM/RAM";
+}
+
--- diff/arch/sh64/mach-sim/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-sim/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,14 @@
+#
+# Makefile for the SH-5 Simulator specific parts of the kernel
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+O_TARGET := sim.o
+
+obj-y := setup.o
+
+include $(TOPDIR)/Rules.make
+
--- diff/arch/sh64/mach-sim/setup.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mach-sim/setup.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,164 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mach-sim/setup.c
+ *
+ * ST50 Simulator Platform Support
+ *
+ * This file handles the architecture-dependent parts of initialization
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * lethal@linux-sh.org:          15th May 2003
+ *    Use the generic procfs cpuinfo interface, just return a valid board name.
+ */
+
+#include <linux/stddef.h>
+#include <linux/init.h>
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/bootmem.h>
+#include <linux/delay.h>
+#include <linux/kernel.h>
+#include <asm/addrspace.h>
+#include <asm/processor.h>
+#include <asm/platform.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/page.h>
+
+#ifdef CONFIG_BLK_DEV_INITRD
+#include "../rootfs/rootfs.h"
+#endif
+
+static	__init void platform_monitor(void);
+static	__init void platform_setup(void);
+static	__init void platform_reserve(void);
+
+
+#define	PHYS_MEMORY	CONFIG_MEMORY_SIZE_IN_MB*1024*1024
+
+#if (PHYS_MEMORY < P1SEG_FOOTPRINT_RAM)
+#error "Invalid kernel configuration. Physical memory below footprint requirements."
+#endif
+
+#define RAM_DISK_START	CONFIG_MEMORY_START+P1SEG_INITRD_BLOCK	/* Top of 4MB */
+#ifdef PLATFORM_ROMFS_SIZE
+#define	RAM_DISK_SIZE	(PAGE_ALIGN(PLATFORM_ROMFS_SIZE))     /* Variable Top */
+#if ((RAM_DISK_START + RAM_DISK_SIZE) > (CONFIG_MEMORY_START + PHYS_MEMORY))
+#error "Invalid kernel configuration. ROM RootFS exceeding physical memory."
+#endif
+#else
+#define RAM_DISK_SIZE	P1SEG_INITRD_BLOCK_SIZE			/* Top of 4MB */
+#endif
+
+#define RES_COUNT(res) ((sizeof((res))/sizeof(struct resource)))
+
+/*
+ * Platform Dependent Interrupt Priorities.
+ */
+
+/* Using defaults defined in irq.h */
+#define	RES NO_PRIORITY		/* Disabled */
+#define IR0 IRL0_PRIORITY	/* IRLs */
+#define IR1 IRL1_PRIORITY
+#define IR2 IRL2_PRIORITY
+#define IR3 IRL3_PRIORITY
+#define PCA INTA_PRIORITY	/* PCI Ints */
+#define PCB INTB_PRIORITY
+#define PCC INTC_PRIORITY
+#define PCD INTD_PRIORITY
+#define SER TOP_PRIORITY
+#define ERR TOP_PRIORITY
+#define PW0 TOP_PRIORITY
+#define PW1 TOP_PRIORITY
+#define PW2 TOP_PRIORITY
+#define PW3 TOP_PRIORITY
+#define DM0 NO_PRIORITY		/* DMA Ints */
+#define DM1 NO_PRIORITY
+#define DM2 NO_PRIORITY
+#define DM3 NO_PRIORITY
+#define DAE NO_PRIORITY
+#define TU0 TIMER_PRIORITY	/* TMU Ints */
+#define TU1 NO_PRIORITY
+#define TU2 NO_PRIORITY
+#define TI2 NO_PRIORITY
+#define ATI NO_PRIORITY		/* RTC Ints */
+#define PRI NO_PRIORITY
+#define CUI RTC_PRIORITY
+#define ERI SCIF_PRIORITY	/* SCIF Ints */
+#define RXI SCIF_PRIORITY
+#define BRI SCIF_PRIORITY
+#define TXI SCIF_PRIORITY
+#define ITI TOP_PRIORITY	/* WDT Ints */
+
+/*
+ * Platform dependent structures: maps and parms block.
+ */
+struct resource io_resources[] = {
+	/* Nothing yet .. */
+};
+
+struct resource kram_resources[] = {
+	{ "Kernel code", 0, 0 },	/* These must be last in the array */
+	{ "Kernel data", 0, 0 }		/* These must be last in the array */
+};
+
+struct resource xram_resources[] = {
+	/* Nothing yet .. */
+};
+
+struct resource rom_resources[] = {
+	/* Nothing yet .. */
+};
+
+struct sh64_platform platform_parms = {
+	.readonly_rootfs =	1,
+	.initial_root_dev =	0x0100,
+	.loader_type =		1,
+	.initrd_start =		RAM_DISK_START,
+	.initrd_size =		RAM_DISK_SIZE,
+	.io_res_p =		io_resources,
+	.io_res_count =		RES_COUNT(io_resources),
+	.kram_res_p =		kram_resources,
+	.kram_res_count =	RES_COUNT(kram_resources),
+	.xram_res_p =		xram_resources,
+	.xram_res_count =	RES_COUNT(xram_resources),
+	.rom_res_p =		rom_resources,
+	.rom_res_count =	RES_COUNT(rom_resources),
+};
+
+int platform_int_priority[NR_IRQS] = {
+	IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD,	/* IRQ  0- 7 */
+	RES, RES, RES, RES, SER, ERR, PW3, PW2,	/* IRQ  8-15 */
+	PW1, PW0, DM0, DM1, DM2, DM3, DAE, RES,	/* IRQ 16-23 */
+	RES, RES, RES, RES, RES, RES, RES, RES,	/* IRQ 24-31 */
+	TU0, TU1, TU2, TI2, ATI, PRI, CUI, ERI,	/* IRQ 32-39 */
+	RXI, BRI, TXI, RES, RES, RES, RES, RES,	/* IRQ 40-47 */
+	RES, RES, RES, RES, RES, RES, RES, RES,	/* IRQ 48-55 */
+	RES, RES, RES, RES, RES, RES, RES, ITI,	/* IRQ 56-63 */
+};
+
+void __init platform_setup(void)
+{
+	/* Simulator platform leaves the decision to head.S */
+	platform_parms.fpu_flags = fpu_in_use;
+}
+
+void __init platform_monitor(void)
+{
+	/* Nothing yet .. */
+}
+
+void __init platform_reserve(void)
+{
+	/* Nothing yet .. */
+}
+
+const char *get_system_type(void)
+{
+	return "SH-5 Simulator";
+}
+
--- diff/arch/sh64/mm/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mm/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,44 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 2000, 2001  Paolo Alberelli
+# Copyright (C) 2003, 2004  Paul Mundt
+#
+# Makefile for the sh64-specific parts of the Linux memory manager.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+obj-y := init.o fault.o ioremap.o extable.o cache.o tlbmiss.o tlb.o
+
+obj-$(CONFIG_HUGETLB_PAGE)	+= hugetlbpage.o
+
+# Special flags for tlbmiss.o.  This puts restrictions on the number of
+# caller-save registers that the compiler can target when building this file.
+# This is required because the code is called from a context in entry.S where
+# very few registers have been saved in the exception handler (for speed
+# reasons).
+# The caller save registers that have been saved and which can be used are
+# r2,r3,r4,r5 : argument passing
+# r15, r18 : SP and LINK
+# tr0-4 : allow all caller-save TR's.  The compiler seems to be able to make
+#         use of them, so it's probably beneficial to performance to save them
+#         and have them available for it.
+#
+# The resources not listed below are callee save, i.e. the compiler is free to
+# use any of them and will spill them to the stack itself.
+
+CFLAGS_tlbmiss.o += -ffixed-r7 \
+	-ffixed-r8 -ffixed-r9 -ffixed-r10 -ffixed-r11 -ffixed-r12 \
+	-ffixed-r13 -ffixed-r14 -ffixed-r16 -ffixed-r17 -ffixed-r19 \
+	-ffixed-r20 -ffixed-r21 -ffixed-r22 -ffixed-r23 \
+	-ffixed-r24 -ffixed-r25 -ffixed-r26 -ffixed-r27 \
+	-ffixed-r36 -ffixed-r37 -ffixed-r38 -ffixed-r39 -ffixed-r40 \
+	-ffixed-r41 -ffixed-r42 -ffixed-r43  \
+	-ffixed-r60 -ffixed-r61 -ffixed-r62 \
+	-fomit-frame-pointer
+
--- diff/arch/sh64/mm/cache.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mm/cache.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,1055 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mm/cache.c
+ *
+ * Original version Copyright (C) 2000, 2001  Paolo Alberelli
+ * Second version Copyright (C) benedict.gaster@superh.com 2002
+ * Third version Copyright Richard.Curnow@superh.com 2003
+ * Hacks to third version Copyright (C) 2003 Paul Mundt
+ */
+
+/****************************************************************************/
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/mman.h>
+#include <linux/mm.h>
+#include <linux/threads.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/processor.h>
+#include <asm/cache.h>
+#include <asm/tlb.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/mmu_context.h>
+#include <asm/pgalloc.h> /* for flush_itlb_range */
+
+#include <linux/proc_fs.h>
+
+/* This function is in entry.S */
+extern unsigned long switch_and_save_asid(unsigned long new_asid);
+
+/* Wired TLB entry for the D-cache */
+static unsigned long long dtlb_cache_slot;
+
+/**
+ * sh64_cache_init()
+ *
+ * This is pretty much just a straightforward clone of the SH
+ * detect_cpu_and_cache_system().
+ *
+ * This function is responsible for setting up all of the cache
+ * info dynamically as well as taking care of CPU probing and
+ * setting up the relevant subtype data.
+ *
+ * FIXME: For the time being, we only really support the SH5-101
+ * out of the box, and don't support dynamic probing for things
+ * like the SH5-103 or even cut2 of the SH5-101. Implement this
+ * later!
+ */
+int __init sh64_cache_init(void)
+{
+	/*
+	 * First, setup some sane values for the I-cache.
+	 */
+	cpu_data->icache.ways		= 4;
+	cpu_data->icache.sets		= 256;
+	cpu_data->icache.linesz		= L1_CACHE_BYTES;
+
+	/*
+	 * FIXME: This can probably be cleaned up a bit as well.. for example,
+	 * do we really need the way shift _and_ the way_step_shift ?? Judging
+	 * by the existing code, I would guess no.. is there any valid reason
+	 * why we need to be tracking this around?
+	 */
+	cpu_data->icache.way_shift	= 13;
+	cpu_data->icache.entry_shift	= 5;
+	cpu_data->icache.set_shift	= 4;
+	cpu_data->icache.way_step_shift	= 16;
+	cpu_data->icache.asid_shift	= 2;
+
+	/*
+	 * way offset = cache size / associativity, so just don't factor in
+	 * associativity in the first place..
+	 */
+	cpu_data->icache.way_ofs	= cpu_data->icache.sets *
+					  cpu_data->icache.linesz;
+
+	cpu_data->icache.asid_mask	= 0x3fc;
+	cpu_data->icache.idx_mask	= 0x1fe0;
+	cpu_data->icache.epn_mask	= 0xffffe000;
+	cpu_data->icache.flags		= 0;
+
+	/*
+	 * Next, setup some sane values for the D-cache.
+	 *
+	 * On the SH5, these are pretty consistent with the I-cache settings,
+	 * so we just copy over the existing definitions.. these can be fixed
+	 * up later, especially if we add runtime CPU probing.
+	 *
+	 * Though in the meantime it saves us from having to duplicate all of
+	 * the above definitions..
+	 */
+	cpu_data->dcache		= cpu_data->icache;
+
+	/*
+	 * Setup any cache-related flags here
+	 */
+#if defined(CONFIG_DCACHE_WRITE_THROUGH)
+	set_bit(SH_CACHE_MODE_WT, &(cpu_data->dcache.flags));
+#elif defined(CONFIG_DCACHE_WRITE_BACK)
+	set_bit(SH_CACHE_MODE_WB, &(cpu_data->dcache.flags));
+#endif
+
+	/*
+	 * We also need to reserve a slot for the D-cache in the DTLB, so we
+	 * do this now ..
+	 */
+	dtlb_cache_slot			= sh64_get_wired_dtlb_entry();
+
+	return 0;
+}
+
+/*##########################################################################*/
+
+/* From here onwards, a rewrite of the implementation,
+   by Richard.Curnow@superh.com.
+
+   The major changes in this compared to the old version are;
+   1. use more selective purging through OCBP instead of using ALLOCO to purge
+      by natural replacement.  This avoids purging out unrelated cache lines
+      that happen to be in the same set.
+   2. exploit the APIs copy_user_page and clear_user_page better
+   3. be more selective about I-cache purging, in particular use invalidate_all
+      more sparingly.
+
+   */
+
+/*##########################################################################
+			       SUPPORT FUNCTIONS
+  ##########################################################################*/
+
+/****************************************************************************/
+/* The following group of functions deal with mapping and unmapping a temporary
+   page into the DTLB slot that have been set aside for our exclusive use. */
+/* In order to accomplish this, we use the generic interface for adding and
+   removing a wired slot entry as defined in arch/sh64/mm/tlb.c */
+/****************************************************************************/
+
+static unsigned long slot_own_flags;
+
+static inline void sh64_setup_dtlb_cache_slot(unsigned long eaddr, unsigned long asid, unsigned long paddr)
+{
+	local_irq_save(slot_own_flags);
+	sh64_setup_tlb_slot(dtlb_cache_slot, eaddr, asid, paddr);
+}
+
+static inline void sh64_teardown_dtlb_cache_slot(void)
+{
+	sh64_teardown_tlb_slot(dtlb_cache_slot);
+	local_irq_restore(slot_own_flags);
+}
+
+/****************************************************************************/
+
+#ifndef CONFIG_ICACHE_DISABLED
+
+static void __inline__ sh64_icache_inv_all(void)
+{
+	unsigned long long addr, flag, data;
+	unsigned int flags;
+
+	addr=ICCR0;
+	flag=ICCR0_ICI;
+	data=0;
+
+	/* Make this a critical section for safety (probably not strictly necessary.) */
+	local_irq_save(flags);
+
+	/* Without %1 it gets unexplicably wrong */
+	asm volatile("getcfg	%3, 0, %0\n\t"
+			"or	%0, %2, %0\n\t"
+			"putcfg	%3, 0, %0\n\t"
+			"synci"
+			: "=&r" (data)
+			: "0" (data), "r" (flag), "r" (addr));
+
+	local_irq_restore(flags);
+}
+
+static void sh64_icache_inv_kernel_range(unsigned long start, unsigned long end)
+{
+	/* Invalidate range of addresses [start,end] from the I-cache, where
+	 * the addresses lie in the kernel superpage. */
+
+	unsigned long long ullend, addr, aligned_start;
+#if (NEFF == 32)
+	aligned_start = (unsigned long long)(signed long long)(signed long) start;
+#else
+#error "NEFF != 32"
+#endif
+	aligned_start &= L1_CACHE_ALIGN_MASK;
+	addr = aligned_start;
+#if (NEFF == 32)
+	ullend = (unsigned long long) (signed long long) (signed long) end;
+#else
+#error "NEFF != 32"
+#endif
+	while (addr <= ullend) {
+		asm __volatile__ ("icbi %0, 0" : : "r" (addr));
+		addr += L1_CACHE_BYTES;
+	}
+}
+
+static void sh64_icache_inv_user_page(struct vm_area_struct *vma, unsigned long eaddr)
+{
+	/* If we get called, we know that vma->vm_flags contains VM_EXEC.
+	   Also, eaddr is page-aligned. */
+
+	unsigned long long addr, end_addr;
+	unsigned long flags = 0;
+	unsigned long running_asid, vma_asid;
+	addr = eaddr;
+	end_addr = addr + PAGE_SIZE;
+
+	/* Check whether we can use the current ASID for the I-cache
+	   invalidation.  For example, if we're called via
+	   access_process_vm->flush_cache_page->here, (e.g. when reading from
+	   /proc), 'running_asid' will be that of the reader, not of the
+	   victim.
+
+	   Also, note the risk that we might get pre-empted between the ASID
+	   compare and blocking IRQs, and before we regain control, the
+	   pid->ASID mapping changes.  However, the whole cache will get
+	   invalidated when the mapping is renewed, so the worst that can
+	   happen is that the loop below ends up invalidating somebody else's
+	   cache entries.
+	*/
+
+	running_asid = get_asid();
+	vma_asid = (vma->vm_mm->context & MMU_CONTEXT_ASID_MASK);
+	if (running_asid != vma_asid) {
+		local_irq_save(flags);
+		switch_and_save_asid(vma_asid);
+	}
+	while (addr < end_addr) {
+		/* Worth unrolling a little */
+		asm __volatile__("icbi %0,  0" : : "r" (addr));
+		asm __volatile__("icbi %0, 32" : : "r" (addr));
+		asm __volatile__("icbi %0, 64" : : "r" (addr));
+		asm __volatile__("icbi %0, 96" : : "r" (addr));
+		addr += 128;
+	}
+	if (running_asid != vma_asid) {
+		switch_and_save_asid(running_asid);
+		local_irq_restore(flags);
+	}
+}
+
+/****************************************************************************/
+
+static void sh64_icache_inv_user_page_range(struct mm_struct *mm,
+			  unsigned long start, unsigned long end)
+{
+	/* Used for invalidating big chunks of I-cache, i.e. assume the range
+	   is whole pages.  If 'start' or 'end' is not page aligned, the code
+	   is conservative and invalidates to the ends of the enclosing pages.
+	   This is functionally OK, just a performance loss. */
+
+	/* See the comments below in sh64_dcache_purge_user_range() regarding
+	   the choice of algorithm.  However, for the I-cache option (2) isn't
+	   available because there are no physical tags so aliases can't be
+	   resolved.  The icbi instruction has to be used through the user
+	   mapping.   Because icbi is cheaper than ocbp on a cache hit, it
+	   would be cheaper to use the selective code for a large range than is
+	   possible with the D-cache.  Just assume 64 for now as a working
+	   figure.
+	   */
+
+	int n_pages;
+
+	if (!mm) return;
+
+	n_pages = ((end - start) >> PAGE_SHIFT);
+	if (n_pages >= 64) {
+		sh64_icache_inv_all();
+	} else {
+		unsigned long aligned_start;
+		unsigned long eaddr;
+		unsigned long after_last_page_start;
+		unsigned long mm_asid, current_asid;
+		unsigned long long flags = 0ULL;
+
+		mm_asid = mm->context & MMU_CONTEXT_ASID_MASK;
+		current_asid = get_asid();
+
+		if (mm_asid != current_asid) {
+			/* Switch ASID and run the invalidate loop under cli */
+			local_irq_save(flags);
+			switch_and_save_asid(mm_asid);
+		}
+
+		aligned_start = start & PAGE_MASK;
+		after_last_page_start = PAGE_SIZE + ((end - 1) & PAGE_MASK);
+
+		while (aligned_start < after_last_page_start) {
+			struct vm_area_struct *vma;
+			unsigned long vma_end;
+			vma = find_vma(mm, aligned_start);
+			if (!vma || (aligned_start <= vma->vm_end)) {
+				/* Avoid getting stuck in an error condition */
+				aligned_start += PAGE_SIZE;
+				continue;
+			}
+			vma_end = vma->vm_end;
+			if (vma->vm_flags & VM_EXEC) {
+				/* Executable */
+				eaddr = aligned_start;
+				while (eaddr < vma_end) {
+					sh64_icache_inv_user_page(vma, eaddr);
+					eaddr += PAGE_SIZE;
+				}
+			}
+			aligned_start = vma->vm_end; /* Skip to start of next region */
+		}
+		if (mm_asid != current_asid) {
+			switch_and_save_asid(current_asid);
+			local_irq_restore(flags);
+		}
+	}
+}
+
+static void sh64_icache_inv_user_small_range(struct mm_struct *mm,
+						unsigned long start, int len)
+{
+
+	/* Invalidate a small range of user context I-cache, not necessarily
+	   page (or even cache-line) aligned. */
+
+	unsigned long long eaddr = start;
+	unsigned long long eaddr_end = start + len;
+	unsigned long current_asid, mm_asid;
+	unsigned long long flags;
+	unsigned long long epage_start;
+
+	/* Since this is used inside ptrace, the ASID in the mm context
+	   typically won't match current_asid.  We'll have to switch ASID to do
+	   this.  For safety, and given that the range will be small, do all
+	   this under cli.
+
+	   Note, there is a hazard that the ASID in mm->context is no longer
+	   actually associated with mm, i.e. if the mm->context has started a
+	   new cycle since mm was last active.  However, this is just a
+	   performance issue: all that happens is that we invalidate lines
+	   belonging to another mm, so the owning process has to refill them
+	   when that mm goes live again.  mm itself can't have any cache
+	   entries because there will have been a flush_cache_all when the new
+	   mm->context cycle started. */
+
+	/* Align to start of cache line.  Otherwise, suppose len==8 and start
+	   was at 32N+28 : the last 4 bytes wouldn't get invalidated. */
+	eaddr = start & L1_CACHE_ALIGN_MASK;
+	eaddr_end = start + len;
+
+	local_irq_save(flags);
+	mm_asid = mm->context & MMU_CONTEXT_ASID_MASK;
+	current_asid = switch_and_save_asid(mm_asid);
+
+	epage_start = eaddr & PAGE_MASK;
+
+	while (eaddr < eaddr_end)
+	{
+		asm __volatile__("icbi %0, 0" : : "r" (eaddr));
+		eaddr += L1_CACHE_BYTES;
+	}
+	switch_and_save_asid(current_asid);
+	local_irq_restore(flags);
+}
+
+static void sh64_icache_inv_current_user_range(unsigned long start, unsigned long end)
+{
+	/* The icbi instruction never raises ITLBMISS.  i.e. if there's not a
+	   cache hit on the virtual tag the instruction ends there, without a
+	   TLB lookup. */
+
+	unsigned long long aligned_start;
+	unsigned long long ull_end;
+	unsigned long long addr;
+
+	ull_end = end;
+
+	/* Just invalidate over the range using the natural addresses.  TLB
+	   miss handling will be OK (TBC).  Since it's for the current process,
+	   either we're already in the right ASID context, or the ASIDs have
+	   been recycled since we were last active in which case we might just
+	   invalidate another processes I-cache entries : no worries, just a
+	   performance drop for him. */
+	aligned_start = start & L1_CACHE_ALIGN_MASK;
+	addr = aligned_start;
+	while (addr < ull_end) {
+		asm __volatile__ ("icbi %0, 0" : : "r" (addr));
+		asm __volatile__ ("nop");
+		asm __volatile__ ("nop");
+		addr += L1_CACHE_BYTES;
+	}
+}
+
+#endif /* !CONFIG_ICACHE_DISABLED */
+
+/****************************************************************************/
+
+#ifndef CONFIG_DCACHE_DISABLED
+
+/* Buffer used as the target of alloco instructions to purge data from cache
+   sets by natural eviction. -- RPC */
+#define DUMMY_ALLOCO_AREA_SIZE L1_CACHE_SIZE_BYTES + (1024 * 4)
+static unsigned char dummy_alloco_area[DUMMY_ALLOCO_AREA_SIZE] __cacheline_aligned = { 0, };
+
+/****************************************************************************/
+
+static void __inline__ sh64_dcache_purge_sets(int sets_to_purge_base, int n_sets)
+{
+	/* Purge all ways in a particular block of sets, specified by the base
+	   set number and number of sets.  Can handle wrap-around, if that's
+	   needed.  */
+
+	int dummy_buffer_base_set;
+	unsigned long long eaddr, eaddr0, eaddr1;
+	int j;
+	int set_offset;
+
+	dummy_buffer_base_set = ((int)&dummy_alloco_area & cpu_data->dcache.idx_mask) >> cpu_data->dcache.entry_shift;
+	set_offset = sets_to_purge_base - dummy_buffer_base_set;
+
+	for (j=0; j<n_sets; j++, set_offset++) {
+		set_offset &= (cpu_data->dcache.sets - 1);
+		eaddr0 = (unsigned long long)dummy_alloco_area + (set_offset << cpu_data->dcache.entry_shift);
+
+		/* Do one alloco which hits the required set per cache way.  For
+		   write-back mode, this will purge the #ways resident lines.   There's
+		   little point unrolling this loop because the allocos stall more if
+		   they're too close together. */
+		eaddr1 = eaddr0 + cpu_data->dcache.way_ofs * cpu_data->dcache.ways;
+		for (eaddr=eaddr0; eaddr<eaddr1; eaddr+=cpu_data->dcache.way_ofs) {
+			asm __volatile__ ("alloco %0, 0" : : "r" (eaddr));
+		}
+
+		eaddr1 = eaddr0 + cpu_data->dcache.way_ofs * cpu_data->dcache.ways;
+		for (eaddr=eaddr0; eaddr<eaddr1; eaddr+=cpu_data->dcache.way_ofs) {
+			/* Load from each address.  Required because alloco is a NOP if
+			   the cache is write-through.  Write-through is a config option. */
+			if (test_bit(SH_CACHE_MODE_WT, &(cpu_data->dcache.flags)))
+				*(volatile unsigned char *)(int)eaddr;
+		}
+	}
+
+	/* Don't use OCBI to invalidate the lines.  That costs cycles directly.
+	   If the dummy block is just left resident, it will naturally get
+	   evicted as required.  */
+
+	return;
+}
+
+/****************************************************************************/
+
+static void sh64_dcache_purge_all(void)
+{
+	/* Purge the entire contents of the dcache.  The most efficient way to
+	   achieve this is to use alloco instructions on a region of unused
+	   memory equal in size to the cache, thereby causing the current
+	   contents to be discarded by natural eviction.  The alternative,
+	   namely reading every tag, setting up a mapping for the corresponding
+	   page and doing an OCBP for the line, would be much more expensive.
+	   */
+
+	sh64_dcache_purge_sets(0, cpu_data->dcache.sets);
+
+	return;
+
+}
+
+/****************************************************************************/
+
+static void sh64_dcache_purge_kernel_range(unsigned long start, unsigned long end)
+{
+	/* Purge the range of addresses [start,end] from the D-cache.  The
+	   addresses lie in the superpage mapping.  There's no harm if we
+	   overpurge at either end - just a small performance loss. */
+	unsigned long long ullend, addr, aligned_start;
+#if (NEFF == 32)
+	aligned_start = (unsigned long long)(signed long long)(signed long) start;
+#else
+#error "NEFF != 32"
+#endif
+	aligned_start &= L1_CACHE_ALIGN_MASK;
+	addr = aligned_start;
+#if (NEFF == 32)
+	ullend = (unsigned long long) (signed long long) (signed long) end;
+#else
+#error "NEFF != 32"
+#endif
+	while (addr <= ullend) {
+		asm __volatile__ ("ocbp %0, 0" : : "r" (addr));
+		addr += L1_CACHE_BYTES;
+	}
+	return;
+}
+
+/* Assumes this address (+ (2**n_synbits) pages up from it) aren't used for
+   anything else in the kernel */
+#define MAGIC_PAGE0_START 0xffffffffec000000ULL
+
+static void sh64_dcache_purge_coloured_phy_page(unsigned long paddr, unsigned long eaddr)
+{
+	/* Purge the physical page 'paddr' from the cache.  It's known that any
+	   cache lines requiring attention have the same page colour as the the
+	   address 'eaddr'.
+
+	   This relies on the fact that the D-cache matches on physical tags
+	   when no virtual tag matches.  So we create an alias for the original
+	   page and purge through that.  (Alternatively, we could have done
+	   this by switching ASID to match the original mapping and purged
+	   through that, but that involves ASID switching cost + probably a
+	   TLBMISS + refill anyway.)
+	   */
+
+	unsigned long long magic_page_start;
+	unsigned long long magic_eaddr, magic_eaddr_end;
+
+	magic_page_start = MAGIC_PAGE0_START + (eaddr & CACHE_OC_SYN_MASK);
+
+	/* As long as the kernel is not pre-emptible, this doesn't need to be
+	   under cli/sti. */
+
+	sh64_setup_dtlb_cache_slot(magic_page_start, get_asid(), paddr);
+
+	magic_eaddr = magic_page_start;
+	magic_eaddr_end = magic_eaddr + PAGE_SIZE;
+	while (magic_eaddr < magic_eaddr_end) {
+		/* Little point in unrolling this loop - the OCBPs are blocking
+		   and won't go any quicker (i.e. the loop overhead is parallel
+		   to part of the OCBP execution.) */
+		asm __volatile__ ("ocbp %0, 0" : : "r" (magic_eaddr));
+		magic_eaddr += L1_CACHE_BYTES;
+	}
+
+	sh64_teardown_dtlb_cache_slot();
+}
+
+/****************************************************************************/
+
+static void sh64_dcache_purge_phy_page(unsigned long paddr)
+{
+	/* Pure a page given its physical start address, by creating a
+	   temporary 1 page mapping and purging across that.  Even if we know
+	   the virtual address (& vma or mm) of the page, the method here is
+	   more elegant because it avoids issues of coping with page faults on
+	   the purge instructions (i.e. no special-case code required in the
+	   critical path in the TLB miss handling). */
+
+	unsigned long long eaddr_start, eaddr, eaddr_end;
+	int i;
+
+	/* As long as the kernel is not pre-emptible, this doesn't need to be
+	   under cli/sti. */
+
+	eaddr_start = MAGIC_PAGE0_START;
+	for (i=0; i < (1 << CACHE_OC_N_SYNBITS); i++) {
+		sh64_setup_dtlb_cache_slot(eaddr_start, get_asid(), paddr);
+
+		eaddr = eaddr_start;
+		eaddr_end = eaddr + PAGE_SIZE;
+		while (eaddr < eaddr_end) {
+			asm __volatile__ ("ocbp %0, 0" : : "r" (eaddr));
+			eaddr += L1_CACHE_BYTES;
+		}
+
+		sh64_teardown_dtlb_cache_slot();
+		eaddr_start += PAGE_SIZE;
+	}
+}
+
+static void sh64_dcache_purge_virt_page(struct mm_struct *mm, unsigned long eaddr)
+{
+	unsigned long phys;
+	pgd_t *pgd;
+	pmd_t *pmd;
+	pte_t *pte;
+	pte_t entry;
+
+	pgd = pgd_offset(mm, eaddr);
+	pmd = pmd_offset(pgd, eaddr);
+
+	if (pmd_none(*pmd) || pmd_bad(*pmd))
+		return;
+
+	pte = pte_offset_kernel(pmd, eaddr);
+	entry = *pte;
+
+	if (pte_none(entry) || !pte_present(entry))
+		return;
+
+	phys = pte_val(entry) & PAGE_MASK;
+
+	sh64_dcache_purge_phy_page(phys);
+}
+
+static void sh64_dcache_purge_user_page(struct mm_struct *mm, unsigned long eaddr)
+{
+	pgd_t *pgd;
+	pmd_t *pmd;
+	pte_t *pte;
+	pte_t entry;
+	unsigned long paddr;
+
+	/* NOTE : all the callers of this have mm->page_table_lock held, so the
+	   following page table traversal is safe even on SMP/pre-emptible. */
+
+	if (!mm) return; /* No way to find physical address of page */
+	pgd = pgd_offset(mm, eaddr);
+	if (pgd_bad(*pgd)) return;
+
+	pmd = pmd_offset(pgd, eaddr);
+	if (pmd_none(*pmd) || pmd_bad(*pmd)) return;
+
+	pte = pte_offset_kernel(pmd, eaddr);
+	entry = *pte;
+	if (pte_none(entry) || !pte_present(entry)) return;
+
+	paddr = pte_val(entry) & PAGE_MASK;
+
+	sh64_dcache_purge_coloured_phy_page(paddr, eaddr);
+
+}
+/****************************************************************************/
+
+static void sh64_dcache_purge_user_range(struct mm_struct *mm,
+			  unsigned long start, unsigned long end)
+{
+	/* There are at least 5 choices for the implementation of this, with
+	   pros (+), cons(-), comments(*):
+
+	   1. ocbp each line in the range through the original user's ASID
+	      + no lines spuriously evicted
+	      - tlbmiss handling (must either handle faults on demand => extra
+		special-case code in tlbmiss critical path), or map the page in
+		advance (=> flush_tlb_range in advance to avoid multiple hits)
+	      - ASID switching
+	      - expensive for large ranges
+
+	   2. temporarily map each page in the range to a special effective
+	      address and ocbp through the temporary mapping; relies on the
+	      fact that SH-5 OCB* always do TLB lookup and match on ptags (they
+	      never look at the etags)
+	      + no spurious evictions
+	      - expensive for large ranges
+	      * surely cheaper than (1)
+
+	   3. walk all the lines in the cache, check the tags, if a match
+	      occurs create a page mapping to ocbp the line through
+	      + no spurious evictions
+	      - tag inspection overhead
+	      - (especially for small ranges)
+	      - potential cost of setting up/tearing down page mapping for
+		every line that matches the range
+	      * cost partly independent of range size
+
+	   4. walk all the lines in the cache, check the tags, if a match
+	      occurs use 4 * alloco to purge the line (+3 other probably
+	      innocent victims) by natural eviction
+	      + no tlb mapping overheads
+	      - spurious evictions
+	      - tag inspection overhead
+
+	   5. implement like flush_cache_all
+	      + no tag inspection overhead
+	      - spurious evictions
+	      - bad for small ranges
+
+	   (1) can be ruled out as more expensive than (2).  (2) appears best
+	   for small ranges.  The choice between (3), (4) and (5) for large
+	   ranges and the range size for the large/small boundary need
+	   benchmarking to determine.
+
+	   For now use approach (2) for small ranges and (5) for large ones.
+
+	   */
+
+	int n_pages;
+
+	n_pages = ((end - start) >> PAGE_SHIFT);
+	if (n_pages >= 64) {
+#if 1
+		sh64_dcache_purge_all();
+#else
+		unsigned long long set, way;
+		unsigned long mm_asid = mm->context & MMU_CONTEXT_ASID_MASK;
+		for (set = 0; set < cpu_data->dcache.sets; set++) {
+			unsigned long long set_base_config_addr = CACHE_OC_ADDRESS_ARRAY + (set << cpu_data->dcache.set_shift);
+			for (way = 0; way < cpu_data->dcache.ways; way++) {
+				unsigned long long config_addr = set_base_config_addr + (way << cpu_data->dcache.way_step_shift);
+				unsigned long long tag0;
+				unsigned long line_valid;
+
+				asm __volatile__("getcfg %1, 0, %0" : "=r" (tag0) : "r" (config_addr));
+				line_valid = tag0 & SH_CACHE_VALID;
+				if (line_valid) {
+					unsigned long cache_asid;
+					unsigned long epn;
+
+					cache_asid = (tag0 & cpu_data->dcache.asid_mask) >> cpu_data->dcache.asid_shift;
+					/* The next line needs some
+					   explanation.  The virtual tags
+					   encode bits [31:13] of the virtual
+					   address, bit [12] of the 'tag' being
+					   implied by the cache set index. */
+					epn = (tag0 & cpu_data->dcache.epn_mask) | ((set & 0x80) << cpu_data->dcache.entry_shift);
+
+					if ((cache_asid == mm_asid) && (start <= epn) && (epn < end)) {
+						/* TODO : could optimise this
+						   call by batching multiple
+						   adjacent sets together. */
+						sh64_dcache_purge_sets(set, 1);
+						break; /* Don't waste time inspecting other ways for this set */
+					}
+				}
+			}
+		}
+#endif
+	} else {
+		/* 'Small' range */
+		unsigned long aligned_start;
+		unsigned long eaddr;
+		unsigned long last_page_start;
+
+		aligned_start = start & PAGE_MASK;
+		/* 'end' is 1 byte beyond the end of the range */
+		last_page_start = (end - 1) & PAGE_MASK;
+
+		eaddr = aligned_start;
+		while (eaddr <= last_page_start) {
+			sh64_dcache_purge_user_page(mm, eaddr);
+			eaddr += PAGE_SIZE;
+		}
+	}
+	return;
+}
+
+static void sh64_dcache_wback_current_user_range(unsigned long start, unsigned long end)
+{
+	unsigned long long aligned_start;
+	unsigned long long ull_end;
+	unsigned long long addr;
+
+	ull_end = end;
+
+	/* Just wback over the range using the natural addresses.  TLB miss
+	   handling will be OK (TBC) : the range has just been written to by
+	   the signal frame setup code, so the PTEs must exist.
+
+	   Note, if we have CONFIG_PREEMPT and get preempted inside this loop,
+	   it doesn't matter, even if the pid->ASID mapping changes whilst
+	   we're away.  In that case the cache will have been flushed when the
+	   mapping was renewed.  So the writebacks below will be nugatory (and
+	   we'll doubtless have to fault the TLB entry/ies in again with the
+	   new ASID), but it's a rare case.
+	   */
+	aligned_start = start & L1_CACHE_ALIGN_MASK;
+	addr = aligned_start;
+	while (addr < ull_end) {
+		asm __volatile__ ("ocbwb %0, 0" : : "r" (addr));
+		addr += L1_CACHE_BYTES;
+	}
+}
+
+#endif /* !CONFIG_DCACHE_DISABLED */
+
+/****************************************************************************/
+
+/* These *MUST* lie in an area of virtual address space that's otherwise unused. */
+#define UNIQUE_EADDR_START 0xe0000000UL
+#define UNIQUE_EADDR_END   0xe8000000UL
+
+static unsigned long sh64_make_unique_eaddr(unsigned long user_eaddr, unsigned long paddr)
+{
+	/* Given a physical address paddr, and a user virtual address
+	   user_eaddr which will eventually be mapped to it, create a one-off
+	   kernel-private eaddr mapped to the same paddr.  This is used for
+	   creating special destination pages for copy_user_page and
+	   clear_user_page */
+
+	static unsigned long current_pointer = UNIQUE_EADDR_START;
+	unsigned long coloured_pointer;
+
+	if (current_pointer == UNIQUE_EADDR_END) {
+		sh64_dcache_purge_all();
+		current_pointer = UNIQUE_EADDR_START;
+	}
+
+	coloured_pointer = (current_pointer & ~CACHE_OC_SYN_MASK) | (user_eaddr & CACHE_OC_SYN_MASK);
+	sh64_setup_dtlb_cache_slot(coloured_pointer, get_asid(), paddr);
+
+	current_pointer += (PAGE_SIZE << CACHE_OC_N_SYNBITS);
+
+	return coloured_pointer;
+}
+
+/****************************************************************************/
+
+static void sh64_copy_user_page_coloured(void *to, void *from, unsigned long address)
+{
+	void *coloured_to;
+
+	/* Discard any existing cache entries of the wrong colour.  These are
+	   present quite often, if the kernel has recently used the page
+	   internally, then given it up, then it's been allocated to the user.
+	   */
+	sh64_dcache_purge_coloured_phy_page(__pa(to), (unsigned long) to);
+
+	coloured_to = (void *) sh64_make_unique_eaddr(address, __pa(to));
+	sh64_page_copy(from, coloured_to);
+
+	sh64_teardown_dtlb_cache_slot();
+}
+
+static void sh64_clear_user_page_coloured(void *to, unsigned long address)
+{
+	void *coloured_to;
+
+	/* Discard any existing kernel-originated lines of the wrong colour (as
+	   above) */
+	sh64_dcache_purge_coloured_phy_page(__pa(to), (unsigned long) to);
+
+	coloured_to = (void *) sh64_make_unique_eaddr(address, __pa(to));
+	sh64_page_clear(coloured_to);
+
+	sh64_teardown_dtlb_cache_slot();
+}
+
+/****************************************************************************/
+
+/*##########################################################################
+			    EXTERNALLY CALLABLE API.
+  ##########################################################################*/
+
+/* These functions are described in Documentation/cachetlb.txt.
+   Each one of these functions varies in behaviour depending on whether the
+   I-cache and/or D-cache are configured out.
+
+   Note that the Linux term 'flush' corresponds to what is termed 'purge' in
+   the sh/sh64 jargon for the D-cache, i.e. write back dirty data then
+   invalidate the cache lines, and 'invalidate' for the I-cache.
+   */
+
+#undef FLUSH_TRACE
+
+void flush_cache_all(void)
+{
+	/* Invalidate the entire contents of both caches, after writing back to
+	   memory any dirty data from the D-cache. */
+	sh64_dcache_purge_all();
+	sh64_icache_inv_all();
+}
+
+/****************************************************************************/
+
+void flush_cache_mm(struct mm_struct *mm)
+{
+	/* Invalidate an entire user-address space from both caches, after
+	   writing back dirty data (e.g. for shared mmap etc). */
+
+	/* This could be coded selectively by inspecting all the tags then
+	   doing 4*alloco on any set containing a match (as for
+	   flush_cache_range), but fork/exit/execve (where this is called from)
+	   are expensive anyway. */
+
+	/* Have to do a purge here, despite the comments re I-cache below.
+	   There could be odd-coloured dirty data associated with the mm still
+	   in the cache - if this gets written out through natural eviction
+	   after the kernel has reused the page there will be chaos.
+	   */
+
+	sh64_dcache_purge_all();
+
+	/* The mm being torn down won't ever be active again, so any Icache
+	   lines tagged with its ASID won't be visible for the rest of the
+	   lifetime of this ASID cycle.  Before the ASID gets reused, there
+	   will be a flush_cache_all.  Hence we don't need to touch the
+	   I-cache.  This is similar to the lack of action needed in
+	   flush_tlb_mm - see fault.c. */
+}
+
+/****************************************************************************/
+
+void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
+		       unsigned long end)
+{
+	struct mm_struct *mm = vma->vm_mm;
+
+	/* Invalidate (from both caches) the range [start,end) of virtual
+	   addresses from the user address space specified by mm, after writing
+	   back any dirty data.
+
+	   Note(1), 'end' is 1 byte beyond the end of the range to flush.
+
+	   Note(2), this is called with mm->page_table_lock held.*/
+
+	sh64_dcache_purge_user_range(mm, start, end);
+	sh64_icache_inv_user_page_range(mm, start, end);
+}
+
+/****************************************************************************/
+
+void flush_cache_page(struct vm_area_struct *vma, unsigned long eaddr)
+{
+	/* Invalidate any entries in either cache for the vma within the user
+	   address space vma->vm_mm for the page starting at virtual address
+	   'eaddr'.   This seems to be used primarily in breaking COW.  Note,
+	   the I-cache must be searched too in case the page in question is
+	   both writable and being executed from (e.g. stack trampolines.)
+
+	   Note(1), this is called with mm->page_table_lock held.
+	   */
+
+	sh64_dcache_purge_virt_page(vma->vm_mm, eaddr);
+
+	if (vma->vm_flags & VM_EXEC) {
+		sh64_icache_inv_user_page(vma, eaddr);
+	}
+}
+
+/****************************************************************************/
+
+#ifndef CONFIG_DCACHE_DISABLED
+
+void copy_user_page(void *to, void *from, unsigned long address, struct page *page)
+{
+	/* 'from' and 'to' are kernel virtual addresses (within the superpage
+	   mapping of the physical RAM).  'address' is the user virtual address
+	   where the copy 'to' will be mapped after.  This allows a custom
+	   mapping to be used to ensure that the new copy is placed in the
+	   right cache sets for the user to see it without having to bounce it
+	   out via memory.  Note however : the call to flush_page_to_ram in
+	   (generic)/mm/memory.c:(break_cow) undoes all this good work in that one
+	   very important case!
+
+	   TBD : can we guarantee that on every call, any cache entries for
+	   'from' are in the same colour sets as 'address' also?  i.e. is this
+	   always used just to deal with COW?  (I suspect not). */
+
+	/* There are two possibilities here for when the page 'from' was last accessed:
+	   * by the kernel : this is OK, no purge required.
+	   * by the/a user (e.g. for break_COW) : need to purge.
+
+	   If the potential user mapping at 'address' is the same colour as
+	   'from' there is no need to purge any cache lines from the 'from'
+	   page mapped into cache sets of colour 'address'.  (The copy will be
+	   accessing the page through 'from').
+	   */
+
+	if (((address ^ (unsigned long) from) & CACHE_OC_SYN_MASK) != 0) {
+		sh64_dcache_purge_coloured_phy_page(__pa(from), address);
+	}
+
+	if (((address ^ (unsigned long) to) & CACHE_OC_SYN_MASK) == 0) {
+		/* No synonym problem on destination */
+		sh64_page_copy(from, to);
+	} else {
+		sh64_copy_user_page_coloured(to, from, address);
+	}
+
+	/* Note, don't need to flush 'from' page from the cache again - it's
+	   done anyway by the generic code */
+}
+
+void clear_user_page(void *to, unsigned long address, struct page *page)
+{
+	/* 'to' is a kernel virtual address (within the superpage
+	   mapping of the physical RAM).  'address' is the user virtual address
+	   where the 'to' page will be mapped after.  This allows a custom
+	   mapping to be used to ensure that the new copy is placed in the
+	   right cache sets for the user to see it without having to bounce it
+	   out via memory.
+	*/
+
+	if (((address ^ (unsigned long) to) & CACHE_OC_SYN_MASK) == 0) {
+		/* No synonym problem on destination */
+		sh64_page_clear(to);
+	} else {
+		sh64_clear_user_page_coloured(to, address);
+	}
+}
+
+#endif /* !CONFIG_DCACHE_DISABLED */
+
+/****************************************************************************/
+
+void flush_dcache_page(struct page *page)
+{
+	sh64_dcache_purge_phy_page(page_to_phys(page));
+	wmb();
+}
+
+/****************************************************************************/
+
+void flush_icache_range(unsigned long start, unsigned long end)
+{
+	/* Flush the range [start,end] of kernel virtual adddress space from
+	   the I-cache.  The corresponding range must be purged from the
+	   D-cache also because the SH-5 doesn't have cache snooping between
+	   the caches.  The addresses will be visible through the superpage
+	   mapping, therefore it's guaranteed that there no cache entries for
+	   the range in cache sets of the wrong colour.
+
+	   Primarily used for cohering the I-cache after a module has
+	   been loaded.  */
+
+	/* We also make sure to purge the same range from the D-cache since
+	   flush_page_to_ram() won't be doing this for us! */
+
+	sh64_dcache_purge_kernel_range(start, end);
+	wmb();
+	sh64_icache_inv_kernel_range(start, end);
+}
+
+/****************************************************************************/
+
+void flush_icache_user_range(struct vm_area_struct *vma,
+			struct page *page, unsigned long addr, int len)
+{
+	/* Flush the range of user (defined by vma->vm_mm) address space
+	   starting at 'addr' for 'len' bytes from the cache.  The range does
+	   not straddle a page boundary, the unique physical page containing
+	   the range is 'page'.  This seems to be used mainly for invalidating
+	   an address range following a poke into the program text through the
+	   ptrace() call from another process (e.g. for BRK instruction
+	   insertion). */
+
+	sh64_dcache_purge_coloured_phy_page(page_to_phys(page), addr);
+	mb();
+
+	if (vma->vm_flags & VM_EXEC) {
+		sh64_icache_inv_user_small_range(vma->vm_mm, addr, len);
+	}
+}
+
+/*##########################################################################
+			ARCH/SH64 PRIVATE CALLABLE API.
+  ##########################################################################*/
+
+void flush_cache_sigtramp(unsigned long start, unsigned long end)
+{
+	/* For the address range [start,end), write back the data from the
+	   D-cache and invalidate the corresponding region of the I-cache for
+	   the current process.  Used to flush signal trampolines on the stack
+	   to make them executable. */
+
+	sh64_dcache_wback_current_user_range(start, end);
+	wmb();
+	sh64_icache_inv_current_user_range(start, end);
+}
+
--- diff/arch/sh64/mm/extable.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mm/extable.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,80 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mm/extable.c
+ *
+ * Copyright (C) 2003 Richard Curnow
+ * Copyright (C) 2003, 2004  Paul Mundt
+ *
+ * Cloned from the 2.5 SH version..
+ */
+#include <linux/config.h>
+#include <linux/rwsem.h>
+#include <linux/module.h>
+#include <asm/uaccess.h>
+
+extern unsigned long copy_user_memcpy, copy_user_memcpy_end, __copy_user_fixup;
+
+static const struct exception_table_entry __copy_user_fixup_ex = {
+	.fixup = (unsigned long)&__copy_user_fixup,
+};
+
+/* Some functions that may trap due to a bad user-mode address have too many loads
+   and stores in them to make it at all practical to label each one and put them all in
+   the main exception table.
+
+   In particular, the fast memcpy routine is like this.  It's fix-up is just to fall back
+   to a slow byte-at-a-time copy, which is handled the conventional way.  So it's functionally
+   OK to just handle any trap occurring in the fast memcpy with that fixup. */
+static const struct exception_table_entry *check_exception_ranges(unsigned long addr)
+{
+	if ((addr >= (unsigned long)&copy_user_memcpy) &&
+	    (addr <= (unsigned long)&copy_user_memcpy_end))
+		return &__copy_user_fixup_ex;
+
+	return NULL;
+}
+
+/* Simple binary search */
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+		 const struct exception_table_entry *last,
+		 unsigned long value)
+{
+	const struct exception_table_entry *mid;
+
+	mid = check_exception_ranges(value);
+	if (mid)
+		return mid;
+
+        while (first <= last) {
+		long diff;
+
+		mid = (last - first) / 2 + first;
+		diff = mid->insn - value;
+                if (diff == 0)
+                        return mid;
+                else if (diff < 0)
+                        first = mid+1;
+                else
+                        last = mid-1;
+        }
+
+        return NULL;
+}
+
+int fixup_exception(struct pt_regs *regs)
+{
+	const struct exception_table_entry *fixup;
+
+	fixup = search_exception_tables(regs->pc);
+	if (fixup) {
+		regs->pc = fixup->fixup;
+		return 1;
+	}
+
+	return 0;
+}
+
--- diff/arch/sh64/mm/fault.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mm/fault.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,591 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mm/fault.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Richard Curnow (/proc/tlb, bug fixes)
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+
+#include <linux/signal.h>
+#include <linux/rwsem.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/ptrace.h>
+#include <linux/mman.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/interrupt.h>
+
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/tlb.h>
+#include <asm/uaccess.h>
+#include <asm/pgalloc.h>
+#include <asm/hardirq.h>
+#include <asm/mmu_context.h>
+#include <asm/registers.h>		/* required by inline asm statements */
+
+#if defined(CONFIG_SH64_PROC_TLB)
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+/* Count numbers of tlb refills in each region */
+static unsigned long long calls_to_update_mmu_cache = 0ULL;
+static unsigned long long calls_to_flush_tlb_page   = 0ULL;
+static unsigned long long calls_to_flush_tlb_range  = 0ULL;
+static unsigned long long calls_to_flush_tlb_mm     = 0ULL;
+static unsigned long long calls_to_flush_tlb_all    = 0ULL;
+unsigned long long calls_to_do_slow_page_fault = 0ULL;
+unsigned long long calls_to_do_fast_page_fault = 0ULL;
+
+/* Count size of ranges for flush_tlb_range */
+static unsigned long long flush_tlb_range_1         = 0ULL;
+static unsigned long long flush_tlb_range_2         = 0ULL;
+static unsigned long long flush_tlb_range_3_4       = 0ULL;
+static unsigned long long flush_tlb_range_5_7       = 0ULL;
+static unsigned long long flush_tlb_range_8_11      = 0ULL;
+static unsigned long long flush_tlb_range_12_15     = 0ULL;
+static unsigned long long flush_tlb_range_16_up     = 0ULL;
+
+static unsigned long long page_not_present          = 0ULL;
+
+#endif
+
+extern void die(const char *,struct pt_regs *,long);
+
+#define PFLAG(val,flag)   (( (val) & (flag) ) ? #flag : "" )
+#define PPROT(flag) PFLAG(pgprot_val(prot),flag)
+
+static inline void print_prots(pgprot_t prot)
+{
+	printk("prot is 0x%08lx\n",pgprot_val(prot));
+
+	printk("%s %s %s %s %s\n",PPROT(_PAGE_SHARED),PPROT(_PAGE_READ),
+	       PPROT(_PAGE_EXECUTE),PPROT(_PAGE_WRITE),PPROT(_PAGE_USER));
+}
+
+static inline void print_vma(struct vm_area_struct *vma)
+{
+	printk("vma start 0x%08lx\n", vma->vm_start);
+	printk("vma end   0x%08lx\n", vma->vm_end);
+
+	print_prots(vma->vm_page_prot);
+	printk("vm_flags 0x%08lx\n", vma->vm_flags);
+}
+
+static inline void print_task(struct task_struct *tsk)
+{
+	printk("Task pid %d\n", tsk->pid);
+}
+
+static pte_t *lookup_pte(struct mm_struct *mm, unsigned long address)
+{
+	pgd_t *dir;
+	pmd_t *pmd;
+	pte_t *pte;
+	pte_t entry;
+
+	dir = pgd_offset(mm, address);
+	if (pgd_none(*dir)) {
+		return NULL;
+	}
+
+	pmd = pmd_offset(dir, address);
+	if (pmd_none(*pmd)) {
+		return NULL;
+	}
+
+	pte = pte_offset_kernel(pmd, address);
+	entry = *pte;
+
+	if (pte_none(entry)) {
+		return NULL;
+	}
+	if (!pte_present(entry)) {
+		return NULL;
+	}
+
+	return pte;
+}
+
+/*
+ * This routine handles page faults.  It determines the address,
+ * and the problem, and then passes it off to one of the appropriate
+ * routines.
+ */
+asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
+			      unsigned long textaccess, unsigned long address)
+{
+	struct task_struct *tsk;
+	struct mm_struct *mm;
+	struct vm_area_struct * vma;
+	const struct exception_table_entry *fixup;
+	pte_t *pte;
+
+#if defined(CONFIG_SH64_PROC_TLB)
+        ++calls_to_do_slow_page_fault;
+#endif
+
+	/* SIM
+	 * Note this is now called with interrupts still disabled
+	 * This is to cope with being called for a missing IO port
+	 * address with interupts disabled. This should be fixed as
+	 * soon as we have a better 'fast path' miss handler.
+	 *
+	 * Plus take care how you try and debug this stuff.
+	 * For example, writing debug data to a port which you
+	 * have just faulted on is not going to work.
+	 */
+
+	tsk = current;
+	mm = tsk->mm;
+
+	/* Not an IO address, so reenable interrupts */
+	sti();
+
+	/*
+	 * If we're in an interrupt or have no user
+	 * context, we must not take the fault..
+	 */
+	if (in_interrupt() || !mm)
+		goto no_context;
+
+	/* TLB misses upon some cache flushes get done under cli() */
+	down_read(&mm->mmap_sem);
+
+	vma = find_vma(mm, address);
+
+	if (!vma) {
+#ifdef DEBUG_FAULT
+		print_task(tsk);
+		printk("%s:%d fault, address is 0x%08x PC %016Lx textaccess %d writeaccess %d\n",
+		       __FUNCTION__,__LINE__,
+		       address,regs->pc,textaccess,writeaccess);
+		show_regs(regs);
+#endif
+		goto bad_area;
+	}
+	if (vma->vm_start <= address) {
+		goto good_area;
+	}
+
+	if (!(vma->vm_flags & VM_GROWSDOWN)) {
+#ifdef DEBUG_FAULT
+		print_task(tsk);
+		printk("%s:%d fault, address is 0x%08x PC %016Lx textaccess %d writeaccess %d\n",
+		       __FUNCTION__,__LINE__,
+		       address,regs->pc,textaccess,writeaccess);
+		show_regs(regs);
+
+		print_vma(vma);
+#endif
+		goto bad_area;
+	}
+	if (expand_stack(vma, address)) {
+#ifdef DEBUG_FAULT
+		print_task(tsk);
+		printk("%s:%d fault, address is 0x%08x PC %016Lx textaccess %d writeaccess %d\n",
+		       __FUNCTION__,__LINE__,
+		       address,regs->pc,textaccess,writeaccess);
+		show_regs(regs);
+#endif
+		goto bad_area;
+	}
+/*
+ * Ok, we have a good vm_area for this memory access, so
+ * we can handle it..
+ */
+good_area:
+	if (writeaccess) {
+		if (!(vma->vm_flags & VM_WRITE))
+			goto bad_area;
+	} else {
+		if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
+			goto bad_area;
+	}
+
+	if (textaccess) {
+		if (!(vma->vm_flags & VM_EXEC))
+			goto bad_area;
+	}
+
+	/*
+	 * If for any reason at all we couldn't handle the fault,
+	 * make sure we exit gracefully rather than endlessly redo
+	 * the fault.
+	 */
+survive:
+	switch (handle_mm_fault(mm, vma, address, writeaccess)) {
+	case 1:
+		tsk->min_flt++;
+		break;
+	case 2:
+		tsk->maj_flt++;
+		break;
+	case 0:
+		goto do_sigbus;
+	default:
+		goto out_of_memory;
+	}
+	/* If we get here, the page fault has been handled.  Do the TLB refill
+	   now from the newly-setup PTE, to avoid having to fault again right
+	   away on the same instruction. */
+	pte = lookup_pte (mm, address);
+	if (!pte) {
+		/* From empirical evidence, we can get here, due to
+		   !pte_present(pte).  (e.g. if a swap-in occurs, and the page
+		   is swapped back out again before the process that wanted it
+		   gets rescheduled?) */
+		goto no_pte;
+	}
+
+	__do_tlb_refill(address, textaccess, pte);
+
+no_pte:
+
+	up_read(&mm->mmap_sem);
+	return;
+
+/*
+ * Something tried to access memory that isn't in our memory map..
+ * Fix it, but check if it's kernel or user first..
+ */
+bad_area:
+#ifdef DEBUG_FAULT
+	printk("fault:bad area\n");
+#endif
+	up_read(&mm->mmap_sem);
+
+	if (user_mode(regs)) {
+		printk("user mode bad_area address=%08lx pid=%d (%s) pc=%08lx opcode=%08lx\n",
+			address, current->pid, current->comm,
+			(unsigned long) regs->pc,
+			*(unsigned long *)(u32)(regs->pc & ~3));
+		show_regs(regs);
+		if (tsk->pid == 1) {
+			panic("INIT had user mode bad_area\n");
+		}
+		tsk->thread.address = address;
+		tsk->thread.error_code = writeaccess;
+		force_sig(SIGSEGV, tsk);
+		return;
+	}
+
+no_context:
+#ifdef DEBUG_FAULT
+	printk("fault:No context\n");
+#endif
+	/* Are we prepared to handle this kernel fault?  */
+	fixup = search_exception_tables(regs->pc);
+	if (fixup) {
+		regs->pc = fixup->fixup;
+		return;
+	}
+
+/*
+ * Oops. The kernel tried to access some bad page. We'll have to
+ * terminate things with extreme prejudice.
+ *
+ */
+	if (address < PAGE_SIZE)
+		printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
+	else
+		printk(KERN_ALERT "Unable to handle kernel paging request");
+	printk(" at virtual address %08lx\n", address);
+	printk(KERN_ALERT "pc = %08Lx%08Lx\n", regs->pc >> 32, regs->pc & 0xffffffff);
+	die("Oops", regs, writeaccess);
+	do_exit(SIGKILL);
+
+/*
+ * We ran out of memory, or some other thing happened to us that made
+ * us unable to handle the page fault gracefully.
+ */
+out_of_memory:
+	if (current->pid == 1) {
+		panic("INIT out of memory\n");
+		yield();
+		goto survive;
+	}
+	printk("fault:Out of memory\n");
+	up_read(&mm->mmap_sem);
+	if (current->pid == 1) {
+		yield();
+		down_read(&mm->mmap_sem);
+		goto survive;
+	}
+	printk("VM: killing process %s\n", tsk->comm);
+	if (user_mode(regs))
+		do_exit(SIGKILL);
+	goto no_context;
+
+do_sigbus:
+	printk("fault:Do sigbus\n");
+	up_read(&mm->mmap_sem);
+
+	/*
+	 * Send a sigbus, regardless of whether we were in kernel
+	 * or user mode.
+	 */
+	tsk->thread.address = address;
+	tsk->thread.error_code = writeaccess;
+	tsk->thread.trap_no = 14;
+	force_sig(SIGBUS, tsk);
+
+	/* Kernel mode? Handle exceptions or die */
+	if (!user_mode(regs))
+		goto no_context;
+}
+
+
+void flush_tlb_all(void);
+
+void update_mmu_cache(struct vm_area_struct * vma,
+			unsigned long address, pte_t pte)
+{
+#if defined(CONFIG_SH64_PROC_TLB)
+	++calls_to_update_mmu_cache;
+#endif
+
+	/*
+	 * This appears to get called once for every pte entry that gets
+	 * established => I don't think it's efficient to try refilling the
+	 * TLBs with the pages - some may not get accessed even.  Also, for
+	 * executable pages, it is impossible to determine reliably here which
+	 * TLB they should be mapped into (or both even).
+	 *
+	 * So, just do nothing here and handle faults on demand.  In the
+	 * TLBMISS handling case, the refill is now done anyway after the pte
+	 * has been fixed up, so that deals with most useful cases.
+	 */
+}
+
+static void __flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
+{
+	unsigned long long match, pteh=0, lpage;
+	unsigned long tlb;
+	struct mm_struct *mm;
+
+	mm = vma->vm_mm;
+
+	if (mm->context == NO_CONTEXT)
+		return;
+
+	/*
+	 * Sign-extend based on neff.
+	 */
+	lpage = (page & NEFF_SIGN) ? (page | NEFF_MASK) : page;
+	match = ((mm->context & MMU_CONTEXT_ASID_MASK) << PTEH_ASID_SHIFT) | PTEH_VALID;
+	match |= lpage;
+
+        /* Do ITLB : don't bother for pages in non-exectutable VMAs */
+	if (vma->vm_flags & VM_EXEC) {
+		for_each_itlb_entry(tlb) {
+			asm volatile ("getcfg	%1, 0, %0"
+				      : "=r" (pteh)
+				      : "r" (tlb) );
+
+			if (pteh == match) {
+				__flush_tlb_slot(tlb);
+				break;
+			}
+
+		}
+	}
+
+        /* Do DTLB : any page could potentially be in here. */
+	for_each_dtlb_entry(tlb) {
+		asm volatile ("getcfg	%1, 0, %0"
+			      : "=r" (pteh)
+			      : "r" (tlb) );
+
+		if (pteh == match) {
+			__flush_tlb_slot(tlb);
+			break;
+		}
+
+	}
+}
+
+void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
+{
+	unsigned long flags;
+
+#if defined(CONFIG_SH64_PROC_TLB)
+        ++calls_to_flush_tlb_page;
+#endif
+
+	if (vma->vm_mm) {
+		page &= PAGE_MASK;
+		local_irq_save(flags);
+		__flush_tlb_page(vma, page);
+		local_irq_restore(flags);
+	}
+}
+
+void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
+		     unsigned long end)
+{
+	unsigned long flags;
+	unsigned long long match, pteh=0, pteh_epn, pteh_low;
+	unsigned long tlb;
+	struct mm_struct *mm;
+
+	mm = vma->vm_mm;
+
+#if defined(CONFIG_SH64_PROC_TLB)
+	++calls_to_flush_tlb_range;
+
+	{
+		unsigned long size = (end - 1) - start;
+		size >>= 12; /* divide by PAGE_SIZE */
+		size++; /* end=start+4096 => 1 page */
+		switch (size) {
+		  case  1        : flush_tlb_range_1++;     break;
+		  case  2        : flush_tlb_range_2++;     break;
+		  case  3 ...  4 : flush_tlb_range_3_4++;   break;
+		  case  5 ...  7 : flush_tlb_range_5_7++;   break;
+		  case  8 ... 11 : flush_tlb_range_8_11++;  break;
+		  case 12 ... 15 : flush_tlb_range_12_15++; break;
+		  default        : flush_tlb_range_16_up++; break;
+		}
+	}
+#endif
+
+	if (mm->context == NO_CONTEXT)
+		return;
+
+	local_irq_save(flags);
+
+	start &= PAGE_MASK;
+	end &= PAGE_MASK;
+
+	match = ((mm->context & MMU_CONTEXT_ASID_MASK) << PTEH_ASID_SHIFT) | PTEH_VALID;
+
+	/* Flush ITLB */
+	for_each_itlb_entry(tlb) {
+		asm volatile ("getcfg	%1, 0, %0"
+			      : "=r" (pteh)
+			      : "r" (tlb) );
+
+		pteh_epn = pteh & PAGE_MASK;
+		pteh_low = pteh & ~PAGE_MASK;
+
+		if (pteh_low == match && pteh_epn >= start && pteh_epn <= end)
+			__flush_tlb_slot(tlb);
+	}
+
+	/* Flush DTLB */
+	for_each_dtlb_entry(tlb) {
+		asm volatile ("getcfg	%1, 0, %0"
+			      : "=r" (pteh)
+			      : "r" (tlb) );
+
+		pteh_epn = pteh & PAGE_MASK;
+		pteh_low = pteh & ~PAGE_MASK;
+
+		if (pteh_low == match && pteh_epn >= start && pteh_epn <= end)
+			__flush_tlb_slot(tlb);
+	}
+
+	local_irq_restore(flags);
+}
+
+void flush_tlb_mm(struct mm_struct *mm)
+{
+	unsigned long flags;
+
+#if defined(CONFIG_SH64_PROC_TLB)
+	++calls_to_flush_tlb_mm;
+#endif
+
+	if (mm->context == NO_CONTEXT)
+		return;
+
+	local_irq_save(flags);
+
+	mm->context=NO_CONTEXT;
+	if(mm==current->mm)
+		activate_context(mm);
+
+	local_irq_restore(flags);
+
+}
+
+void flush_tlb_all(void)
+{
+	/* Invalidate all, including shared pages, excluding fixed TLBs */
+
+	unsigned long flags, tlb;
+
+#if defined(CONFIG_SH64_PROC_TLB)
+	++calls_to_flush_tlb_all;
+#endif
+
+	local_irq_save(flags);
+
+	/* Flush each ITLB entry */
+	for_each_itlb_entry(tlb) {
+		__flush_tlb_slot(tlb);
+	}
+
+	/* Flush each DTLB entry */
+	for_each_dtlb_entry(tlb) {
+		__flush_tlb_slot(tlb);
+	}
+
+	local_irq_restore(flags);
+}
+
+void flush_tlb_kernel_range(unsigned long start, unsigned long end)
+{
+        /* FIXME: Optimize this later.. */
+        flush_tlb_all();
+}
+
+#if defined(CONFIG_SH64_PROC_TLB)
+/* Procfs interface to read the performance information */
+
+static int
+tlb_proc_info(char *buf, char **start, off_t fpos, int length, int *eof, void *data)
+{
+  int len=0;
+  len += sprintf(buf+len, "do_fast_page_fault   called %12lld times\n", calls_to_do_fast_page_fault);
+  len += sprintf(buf+len, "do_slow_page_fault   called %12lld times\n", calls_to_do_slow_page_fault);
+  len += sprintf(buf+len, "update_mmu_cache     called %12lld times\n", calls_to_update_mmu_cache);
+  len += sprintf(buf+len, "flush_tlb_page       called %12lld times\n", calls_to_flush_tlb_page);
+  len += sprintf(buf+len, "flush_tlb_range      called %12lld times\n", calls_to_flush_tlb_range);
+  len += sprintf(buf+len, "flush_tlb_mm         called %12lld times\n", calls_to_flush_tlb_mm);
+  len += sprintf(buf+len, "flush_tlb_all        called %12lld times\n", calls_to_flush_tlb_all);
+  len += sprintf(buf+len, "flush_tlb_range_sizes\n"
+                          " 1      : %12lld\n"
+                          " 2      : %12lld\n"
+                          " 3 -  4 : %12lld\n"
+                          " 5 -  7 : %12lld\n"
+                          " 8 - 11 : %12lld\n"
+                          "12 - 15 : %12lld\n"
+                          "16+     : %12lld\n",
+                          flush_tlb_range_1, flush_tlb_range_2, flush_tlb_range_3_4,
+                          flush_tlb_range_5_7, flush_tlb_range_8_11, flush_tlb_range_12_15,
+                          flush_tlb_range_16_up);
+  len += sprintf(buf+len, "page not present           %12lld times\n", page_not_present);
+  *eof = 1;
+  return len;
+}
+
+static int __init register_proc_tlb(void)
+{
+  create_proc_read_entry("tlb", 0, NULL, tlb_proc_info, NULL);
+  return 0;
+}
+
+__initcall(register_proc_tlb);
+
+#endif
--- diff/arch/sh64/mm/hugetlbpage.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mm/hugetlbpage.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,264 @@
+/*
+ * arch/sh64/mm/hugetlbpage.c
+ *
+ * SuperH HugeTLB page support.
+ *
+ * Cloned from sparc64 by Paul Mundt.
+ *
+ * Copyright (C) 2002, 2003 David S. Miller (davem@redhat.com)
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/hugetlb.h>
+#include <linux/pagemap.h>
+#include <linux/smp_lock.h>
+#include <linux/slab.h>
+#include <linux/sysctl.h>
+
+#include <asm/mman.h>
+#include <asm/pgalloc.h>
+#include <asm/tlb.h>
+#include <asm/tlbflush.h>
+#include <asm/cacheflush.h>
+
+static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
+{
+	pgd_t *pgd;
+	pmd_t *pmd;
+	pte_t *pte = NULL;
+
+	pgd = pgd_offset(mm, addr);
+	if (pgd) {
+		pmd = pmd_alloc(mm, pgd, addr);
+		if (pmd)
+			pte = pte_alloc_map(mm, pmd, addr);
+	}
+	return pte;
+}
+
+static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
+{
+	pgd_t *pgd;
+	pmd_t *pmd;
+	pte_t *pte = NULL;
+
+	pgd = pgd_offset(mm, addr);
+	if (pgd) {
+		pmd = pmd_offset(pgd, addr);
+		if (pmd)
+			pte = pte_offset_map(pmd, addr);
+	}
+	return pte;
+}
+
+#define mk_pte_huge(entry) do { pte_val(entry) |= _PAGE_SZHUGE; } while (0)
+
+static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma,
+			 struct page *page, pte_t * page_table, int write_access)
+{
+	unsigned long i;
+	pte_t entry;
+
+	mm->rss += (HPAGE_SIZE / PAGE_SIZE);
+
+	if (write_access)
+		entry = pte_mkwrite(pte_mkdirty(mk_pte(page,
+						       vma->vm_page_prot)));
+	else
+		entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot));
+	entry = pte_mkyoung(entry);
+	mk_pte_huge(entry);
+
+	for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
+		set_pte(page_table, entry);
+		page_table++;
+
+		pte_val(entry) += PAGE_SIZE;
+	}
+}
+
+/*
+ * This function checks for proper alignment of input addr and len parameters.
+ */
+int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
+{
+	if (len & ~HPAGE_MASK)
+		return -EINVAL;
+	if (addr & ~HPAGE_MASK)
+		return -EINVAL;
+	return 0;
+}
+
+int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
+			    struct vm_area_struct *vma)
+{
+	pte_t *src_pte, *dst_pte, entry;
+	struct page *ptepage;
+	unsigned long addr = vma->vm_start;
+	unsigned long end = vma->vm_end;
+	int i;
+
+	while (addr < end) {
+		dst_pte = huge_pte_alloc(dst, addr);
+		if (!dst_pte)
+			goto nomem;
+		src_pte = huge_pte_offset(src, addr);
+		BUG_ON(!src_pte || pte_none(*src_pte));
+		entry = *src_pte;
+		ptepage = pte_page(entry);
+		get_page(ptepage);
+		for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
+			set_pte(dst_pte, entry);
+			pte_val(entry) += PAGE_SIZE;
+			dst_pte++;
+		}
+		dst->rss += (HPAGE_SIZE / PAGE_SIZE);
+		addr += HPAGE_SIZE;
+	}
+	return 0;
+
+nomem:
+	return -ENOMEM;
+}
+
+int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
+			struct page **pages, struct vm_area_struct **vmas,
+			unsigned long *position, int *length, int i)
+{
+	unsigned long vaddr = *position;
+	int remainder = *length;
+
+	WARN_ON(!is_vm_hugetlb_page(vma));
+
+	while (vaddr < vma->vm_end && remainder) {
+		if (pages) {
+			pte_t *pte;
+			struct page *page;
+
+			pte = huge_pte_offset(mm, vaddr);
+
+			/* hugetlb should be locked, and hence, prefaulted */
+			BUG_ON(!pte || pte_none(*pte));
+
+			page = pte_page(*pte);
+
+			WARN_ON(!PageCompound(page));
+
+			get_page(page);
+			pages[i] = page;
+		}
+
+		if (vmas)
+			vmas[i] = vma;
+
+		vaddr += PAGE_SIZE;
+		--remainder;
+		++i;
+	}
+
+	*length = remainder;
+	*position = vaddr;
+
+	return i;
+}
+
+struct page *follow_huge_addr(struct mm_struct *mm,
+			      unsigned long address, int write)
+{
+	return ERR_PTR(-EINVAL);
+}
+
+int pmd_huge(pmd_t pmd)
+{
+	return 0;
+}
+
+struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address,
+			     pmd_t *pmd, int write)
+{
+	return NULL;
+}
+
+void unmap_hugepage_range(struct vm_area_struct *vma,
+			  unsigned long start, unsigned long end)
+{
+	struct mm_struct *mm = vma->vm_mm;
+	unsigned long address;
+	pte_t *pte;
+	struct page *page;
+	int i;
+
+	BUG_ON(start & (HPAGE_SIZE - 1));
+	BUG_ON(end & (HPAGE_SIZE - 1));
+
+	for (address = start; address < end; address += HPAGE_SIZE) {
+		pte = huge_pte_offset(mm, address);
+		BUG_ON(!pte);
+		if (pte_none(*pte))
+			continue;
+		page = pte_page(*pte);
+		put_page(page);
+		for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
+			pte_clear(pte);
+			pte++;
+		}
+	}
+	mm->rss -= (end - start) >> PAGE_SHIFT;
+	flush_tlb_range(vma, start, end);
+}
+
+int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)
+{
+	struct mm_struct *mm = current->mm;
+	unsigned long addr;
+	int ret = 0;
+
+	BUG_ON(vma->vm_start & ~HPAGE_MASK);
+	BUG_ON(vma->vm_end & ~HPAGE_MASK);
+
+	spin_lock(&mm->page_table_lock);
+	for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) {
+		unsigned long idx;
+		pte_t *pte = huge_pte_alloc(mm, addr);
+		struct page *page;
+
+		if (!pte) {
+			ret = -ENOMEM;
+			goto out;
+		}
+		if (!pte_none(*pte))
+			continue;
+
+		idx = ((addr - vma->vm_start) >> HPAGE_SHIFT)
+			+ (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));
+		page = find_get_page(mapping, idx);
+		if (!page) {
+			/* charge the fs quota first */
+			if (hugetlb_get_quota(mapping)) {
+				ret = -ENOMEM;
+				goto out;
+			}
+			page = alloc_huge_page();
+			if (!page) {
+				hugetlb_put_quota(mapping);
+				ret = -ENOMEM;
+				goto out;
+			}
+			ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC);
+			if (! ret) {
+				unlock_page(page);
+			} else {
+				hugetlb_put_quota(mapping);
+				free_huge_page(page);
+				goto out;
+			}
+		}
+		set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE);
+	}
+out:
+	spin_unlock(&mm->page_table_lock);
+	return ret;
+}
--- diff/arch/sh64/mm/init.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mm/init.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,199 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mm/init.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ *
+ */
+
+#include <linux/init.h>
+#include <linux/rwsem.h>
+#include <linux/mm.h>
+#include <linux/swap.h>
+#include <linux/bootmem.h>
+
+#include <asm/mmu_context.h>
+#include <asm/page.h>
+#include <asm/pgalloc.h>
+#include <asm/pgtable.h>
+#include <asm/tlb.h>
+
+#ifdef CONFIG_BLK_DEV_INITRD
+#include <linux/blk.h>
+#endif
+
+DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
+
+/*
+ * Cache of MMU context last used.
+ */
+unsigned long mmu_context_cache;
+pgd_t * mmu_pdtp_cache;
+int after_bootmem = 0;
+
+/*
+ * BAD_PAGE is the page that is used for page faults when linux
+ * is out-of-memory. Older versions of linux just did a
+ * do_exit(), but using this instead means there is less risk
+ * for a process dying in kernel mode, possibly leaving an inode
+ * unused etc..
+ *
+ * BAD_PAGETABLE is the accompanying page-table: it is initialized
+ * to point to BAD_PAGE entries.
+ *
+ * ZERO_PAGE is a special page that is used for zero-initialized
+ * data and COW.
+ */
+
+extern unsigned char empty_zero_page[PAGE_SIZE];
+extern unsigned char empty_bad_page[PAGE_SIZE];
+extern pte_t empty_bad_pte_table[PTRS_PER_PTE];
+extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
+
+extern char _text, _etext, _edata, __bss_start, _end;
+extern char __init_begin, __init_end;
+
+/* It'd be good if these lines were in the standard header file. */
+#define START_PFN	(NODE_DATA(0)->bdata->node_boot_start >> PAGE_SHIFT)
+#define MAX_LOW_PFN	(NODE_DATA(0)->bdata->node_low_pfn)
+
+
+void show_mem(void)
+{
+	int i, total = 0, reserved = 0;
+	int shared = 0, cached = 0;
+
+	printk("Mem-info:\n");
+	show_free_areas();
+	printk("Free swap:       %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	i = max_mapnr;
+	while (i-- > 0) {
+		total++;
+		if (PageReserved(mem_map+i))
+			reserved++;
+		else if (PageSwapCache(mem_map+i))
+			cached++;
+		else if (page_count(mem_map+i))
+			shared += page_count(mem_map+i) - 1;
+	}
+	printk("%d pages of RAM\n",total);
+	printk("%d reserved pages\n",reserved);
+	printk("%d pages shared\n",shared);
+	printk("%d pages swap cached\n",cached);
+	printk("%ld pages in page table cache\n",pgtable_cache_size);
+}
+
+/*
+ * paging_init() sets up the page tables.
+ *
+ * head.S already did a lot to set up address translation for the kernel.
+ * Here we comes with:
+ * . MMU enabled
+ * . ASID set (SR)
+ * .  some 512MB regions being mapped of which the most relevant here is:
+ *   . CACHED segment (ASID 0 [irrelevant], shared AND NOT user)
+ * . possible variable length regions being mapped as:
+ *   . UNCACHED segment (ASID 0 [irrelevant], shared AND NOT user)
+ * . All of the memory regions are placed, independently from the platform
+ *   on high addresses, above 0x80000000.
+ * . swapper_pg_dir is already cleared out by the .space directive
+ *   in any case swapper does not require a real page directory since
+ *   it's all kernel contained.
+ *
+ * Those pesky NULL-reference errors in the kernel are then
+ * dealt with by not mapping address 0x00000000 at all.
+ *
+ */
+void __init paging_init(void)
+{
+	unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
+
+	pgd_init((unsigned long)swapper_pg_dir);
+	pgd_init((unsigned long)swapper_pg_dir +
+		 sizeof(pgd_t) * USER_PTRS_PER_PGD);
+
+	mmu_context_cache = MMU_CONTEXT_FIRST_VERSION;
+
+        /*
+	 * All memory is good as ZONE_NORMAL (fall-through) and ZONE_DMA.
+         */
+	zones_size[ZONE_DMA] = MAX_LOW_PFN - START_PFN;
+
+	free_area_init_node(0, NODE_DATA(0), 0, zones_size, __MEMORY_START >> PAGE_SHIFT, 0);
+
+	/* XXX: MRB-remove - this doesn't seem sane, should this be done somewhere else ?*/
+	mem_map = NODE_DATA(0)->node_mem_map;
+}
+
+void __init mem_init(void)
+{
+	int codesize, reservedpages, datasize, initsize;
+	int tmp;
+
+	max_mapnr = num_physpages = MAX_LOW_PFN - START_PFN;
+	high_memory = (void *)__va(MAX_LOW_PFN * PAGE_SIZE);
+
+	/*
+         * Clear the zero-page.
+         * This is not required but we might want to re-use
+         * this very page to pass boot parameters, one day.
+         */
+	memset(empty_zero_page, 0, PAGE_SIZE);
+
+	/* this will put all low memory onto the freelists */
+	totalram_pages += free_all_bootmem_node(NODE_DATA(0));
+	reservedpages = 0;
+	for (tmp = 0; tmp < num_physpages; tmp++)
+		/*
+		 * Only count reserved RAM pages
+		 */
+		if (PageReserved(mem_map+tmp))
+			reservedpages++;
+
+	after_bootmem = 1;
+
+	codesize =  (unsigned long) &_etext - (unsigned long) &_text;
+	datasize =  (unsigned long) &_edata - (unsigned long) &_etext;
+	initsize =  (unsigned long) &__init_end - (unsigned long) &__init_begin;
+
+	printk("Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init)\n",
+		(unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+		max_mapnr << (PAGE_SHIFT-10),
+		codesize >> 10,
+		reservedpages << (PAGE_SHIFT-10),
+		datasize >> 10,
+		initsize >> 10);
+}
+
+void free_initmem(void)
+{
+	unsigned long addr;
+
+	addr = (unsigned long)(&__init_begin);
+	for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
+		ClearPageReserved(virt_to_page(addr));
+		set_page_count(virt_to_page(addr), 1);
+		free_page(addr);
+		totalram_pages++;
+	}
+	printk ("Freeing unused kernel memory: %ldk freed\n", (&__init_end - &__init_begin) >> 10);
+}
+
+#ifdef CONFIG_BLK_DEV_INITRD
+void free_initrd_mem(unsigned long start, unsigned long end)
+{
+	unsigned long p;
+	for (p = start; p < end; p += PAGE_SIZE) {
+		ClearPageReserved(virt_to_page(p));
+		set_page_count(virt_to_page(p), 1);
+		free_page(p);
+		totalram_pages++;
+	}
+	printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
+}
+#endif
+
--- diff/arch/sh64/mm/ioremap.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mm/ioremap.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,469 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mm/ioremap.c
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ *
+ * Mostly derived from arch/sh/mm/ioremap.c which, in turn is mostly
+ * derived from arch/i386/mm/ioremap.c .
+ *
+ *   (C) Copyright 1995 1996 Linus Torvalds
+ */
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/sched.h>
+#include <linux/string.h>
+#include <asm/io.h>
+#include <asm/pgalloc.h>
+#include <asm/tlbflush.h>
+#include <linux/ioport.h>
+#include <linux/bootmem.h>
+#include <linux/proc_fs.h>
+
+static void shmedia_mapioaddr(unsigned long, unsigned long);
+static unsigned long shmedia_ioremap(struct resource *, u32, int);
+
+static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
+	unsigned long phys_addr, unsigned long flags)
+{
+	unsigned long end;
+	unsigned long pfn;
+	pgprot_t pgprot = __pgprot(_PAGE_PRESENT  | _PAGE_READ   |
+				   _PAGE_WRITE    | _PAGE_DIRTY  |
+				   _PAGE_ACCESSED | _PAGE_SHARED | flags);
+
+	address &= ~PMD_MASK;
+	end = address + size;
+	if (end > PMD_SIZE)
+		end = PMD_SIZE;
+	if (address >= end)
+		BUG();
+
+	pfn = phys_addr >> PAGE_SHIFT;
+
+	pr_debug("    %s: pte %p address %lx size %lx phys_addr %lx\n",
+		 __FUNCTION__,pte,address,size,phys_addr);
+
+	do {
+		if (!pte_none(*pte)) {
+			printk("remap_area_pte: page already exists\n");
+			BUG();
+		}
+
+		set_pte(pte, pfn_pte(pfn, pgprot));
+		address += PAGE_SIZE;
+		pfn++;
+		pte++;
+	} while (address && (address < end));
+}
+
+static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size,
+	unsigned long phys_addr, unsigned long flags)
+{
+	unsigned long end;
+
+	address &= ~PGDIR_MASK;
+	end = address + size;
+
+	if (end > PGDIR_SIZE)
+		end = PGDIR_SIZE;
+
+	phys_addr -= address;
+
+	if (address >= end)
+		BUG();
+
+	do {
+		pte_t * pte = pte_alloc_kernel(&init_mm, pmd, address);
+		if (!pte)
+			return -ENOMEM;
+		remap_area_pte(pte, address, end - address, address + phys_addr, flags);
+		address = (address + PMD_SIZE) & PMD_MASK;
+		pmd++;
+	} while (address && (address < end));
+	return 0;
+}
+
+static int remap_area_pages(unsigned long address, unsigned long phys_addr,
+				 unsigned long size, unsigned long flags)
+{
+	int error;
+	pgd_t * dir;
+	unsigned long end = address + size;
+
+	phys_addr -= address;
+	dir = pgd_offset_k(address);
+	flush_cache_all();
+	if (address >= end)
+		BUG();
+	spin_lock(&init_mm.page_table_lock);
+	do {
+		pmd_t *pmd = pmd_alloc(&init_mm, dir, address);
+		error = -ENOMEM;
+		if (!pmd)
+			break;
+		if (remap_area_pmd(pmd, address, end - address,
+				   phys_addr + address, flags)) {
+			 break;
+		}
+		error = 0;
+		address = (address + PGDIR_SIZE) & PGDIR_MASK;
+		dir++;
+	} while (address && (address < end));
+	spin_unlock(&init_mm.page_table_lock);
+	flush_tlb_all();
+	return 0;
+}
+
+/*
+ * Generic mapping function (not visible outside):
+ */
+
+/*
+ * Remap an arbitrary physical address space into the kernel virtual
+ * address space. Needed when the kernel wants to access high addresses
+ * directly.
+ *
+ * NOTE! We need to allow non-page-aligned mappings too: we will obviously
+ * have to convert them into an offset in a page-aligned mapping, but the
+ * caller shouldn't need to know that small detail.
+ */
+void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
+{
+	void * addr;
+	struct vm_struct * area;
+	unsigned long offset, last_addr;
+
+	/* Don't allow wraparound or zero size */
+	last_addr = phys_addr + size - 1;
+	if (!size || last_addr < phys_addr)
+		return NULL;
+
+	/*
+	 * Mappings have to be page-aligned
+	 */
+	offset = phys_addr & ~PAGE_MASK;
+	phys_addr &= PAGE_MASK;
+	size = PAGE_ALIGN(last_addr + 1) - phys_addr;
+
+	/*
+	 * Ok, go for it..
+	 */
+	area = get_vm_area(size, VM_IOREMAP);
+	pr_debug("Get vm_area returns %p addr %p\n",area,area->addr);
+	if (!area)
+		return NULL;
+	area->phys_addr = phys_addr;
+	addr = area->addr;
+	if (remap_area_pages((unsigned long)addr, phys_addr, size, flags)) {
+		vunmap(addr);
+		return NULL;
+	}
+	return (void *) (offset + (char *)addr);
+}
+
+void iounmap(void *addr)
+{
+	struct vm_struct *area;
+
+	vfree((void *) (PAGE_MASK & (unsigned long) addr));
+	area = remove_vm_area((void *) (PAGE_MASK & (unsigned long) addr));
+	if (!area) {
+		printk(KERN_ERR "iounmap: bad address %p\n", addr);
+		return;
+	}
+
+	kfree(area);
+}
+
+static struct resource shmedia_iomap = {
+        .name	= "shmedia_iomap",
+	.start	= IOBASE_VADDR,
+	.end	= IOBASE_END - 1,
+};
+
+static void shmedia_mapioaddr(unsigned long pa, unsigned long va);
+static void shmedia_unmapioaddr(unsigned long vaddr);
+static unsigned long shmedia_ioremap(struct resource *res, u32 pa, int sz);
+
+/*
+ * We have the same problem as the SPARC, so lets have the same comment:
+ * Our mini-allocator...
+ * Boy this is gross! We need it because we must map I/O for
+ * timers and interrupt controller before the kmalloc is available.
+ */
+
+#define XNMLN  15
+#define XNRES  10
+
+struct xresource {
+	struct resource xres;   /* Must be first */
+	int xflag;              /* 1 == used */
+	char xname[XNMLN+1];
+};
+
+static struct xresource xresv[XNRES];
+
+static struct xresource *xres_alloc(void)
+{
+        struct xresource *xrp;
+        int n;
+
+        xrp = xresv;
+        for (n = 0; n < XNRES; n++) {
+                if (xrp->xflag == 0) {
+                        xrp->xflag = 1;
+                        return xrp;
+                }
+                xrp++;
+        }
+        return NULL;
+}
+
+static void xres_free(struct xresource *xrp)
+{
+	xrp->xflag = 0;
+}
+
+static struct resource *shmedia_find_resource(struct resource *root,
+					      unsigned long vaddr)
+{
+	struct resource *res;
+
+	for (res = root->child; res; res = res->sibling)
+		if (res->start <= vaddr && res->end >= vaddr)
+			return res;
+
+	return NULL;
+}
+
+static unsigned long shmedia_alloc_io(unsigned long phys, unsigned long size,
+				      const char *name)
+{
+        static int printed_full = 0;
+        struct xresource *xres;
+        struct resource *res;
+        char *tack;
+        int tlen;
+
+        if (name == NULL) name = "???";
+
+        if ((xres = xres_alloc()) != 0) {
+                tack = xres->xname;
+                res = &xres->xres;
+        } else {
+                if (!printed_full) {
+                        printk("%s: done with statics, switching to kmalloc\n",
+			       __FUNCTION__);
+                        printed_full = 1;
+                }
+                tlen = strlen(name);
+                tack = kmalloc(sizeof (struct resource) + tlen + 1, GFP_KERNEL);
+                if (!tack)
+			return -ENOMEM;
+                memset(tack, 0, sizeof(struct resource));
+                res = (struct resource *) tack;
+                tack += sizeof (struct resource);
+        }
+
+        strncpy(tack, name, XNMLN);
+        tack[XNMLN] = 0;
+        res->name = tack;
+
+        return shmedia_ioremap(res, phys, size);
+}
+
+static unsigned long shmedia_ioremap(struct resource *res, u32 pa, int sz)
+{
+        unsigned long offset = ((unsigned long) pa) & (~PAGE_MASK);
+	unsigned long round_sz = (offset + sz + PAGE_SIZE-1) & PAGE_MASK;
+        unsigned long va;
+        unsigned int psz;
+
+        if (allocate_resource(&shmedia_iomap, res, round_sz,
+			      shmedia_iomap.start, shmedia_iomap.end,
+			      PAGE_SIZE, NULL, NULL) != 0) {
+                panic("alloc_io_res(%s): cannot occupy\n",
+                    (res->name != NULL)? res->name: "???");
+        }
+
+        va = res->start;
+        pa &= PAGE_MASK;
+
+	psz = (res->end - res->start + (PAGE_SIZE - 1)) / PAGE_SIZE;
+
+	/* log at boot time ... */
+	printk("mapioaddr: %6s  [%2d page%s]  va 0x%08lx   pa 0x%08x\n",
+	       ((res->name != NULL) ? res->name : "???"),
+	       psz, psz == 1 ? " " : "s", va, pa);
+
+        for (psz = res->end - res->start + 1; psz != 0; psz -= PAGE_SIZE) {
+                shmedia_mapioaddr(pa, va);
+                va += PAGE_SIZE;
+                pa += PAGE_SIZE;
+        }
+
+        res->start += offset;
+        res->end = res->start + sz - 1;         /* not strictly necessary.. */
+
+        return res->start;
+}
+
+static void shmedia_free_io(struct resource *res)
+{
+	unsigned long len = res->end - res->start + 1;
+
+	BUG_ON((len & (PAGE_SIZE - 1)) != 0);
+
+	while (len) {
+		len -= PAGE_SIZE;
+		shmedia_unmapioaddr(res->start + len);
+	}
+
+	release_resource(res);
+}
+
+static void *sh64_get_page(void)
+{
+	extern int after_bootmem;
+	void *page;
+
+	if (after_bootmem) {
+		page = (void *)get_zeroed_page(GFP_ATOMIC);
+	} else {
+		page = alloc_bootmem_pages(PAGE_SIZE);
+	}
+
+	if (!page || ((unsigned long)page & ~PAGE_MASK))
+		panic("sh64_get_page: Out of memory already?\n");
+
+	return page;
+}
+
+static void shmedia_mapioaddr(unsigned long pa, unsigned long va)
+{
+	pgd_t *pgdp;
+	pmd_t *pmdp;
+	pte_t *ptep, pte;
+	pgprot_t prot;
+	unsigned long flags = 1; /* 1 = CB0-1 device */
+
+	pr_debug("shmedia_mapiopage pa %08lx va %08lx\n",  pa, va);
+
+	pgdp = pgd_offset_k(va);
+	if (pgd_none(*pgdp) || !pgd_present(*pgdp)) {
+		pmdp = (pmd_t *)sh64_get_page();
+		set_pgd(pgdp, __pgd((unsigned long)pmdp | _KERNPG_TABLE));
+	}
+
+	pmdp = pmd_offset(pgdp, va);
+	if (pmd_none(*pmdp) || !pmd_present(*pmdp) ) {
+		ptep = (pte_t *)sh64_get_page();
+		set_pmd(pmdp, __pmd((unsigned long)ptep + _PAGE_TABLE));
+	}
+
+	prot = __pgprot(_PAGE_PRESENT | _PAGE_READ     | _PAGE_WRITE  |
+			_PAGE_DIRTY   | _PAGE_ACCESSED | _PAGE_SHARED | flags);
+
+	pte = pfn_pte(pa >> PAGE_SHIFT, prot);
+	ptep = pte_offset_kernel(pmdp, va);
+
+	if (!pte_none(*ptep) &&
+	    pte_val(*ptep) != pte_val(pte))
+		pte_ERROR(*ptep);
+
+	set_pte(ptep, pte);
+
+	flush_tlb_kernel_range(va, PAGE_SIZE);
+}
+
+static void shmedia_unmapioaddr(unsigned long vaddr)
+{
+	pgd_t *pgdp;
+	pmd_t *pmdp;
+	pte_t *ptep;
+
+	pgdp = pgd_offset_k(vaddr);
+	pmdp = pmd_offset(pgdp, vaddr);
+
+	if (pmd_none(*pmdp) || pmd_bad(*pmdp))
+		return;
+
+	ptep = pte_offset_kernel(pmdp, vaddr);
+
+	if (pte_none(*ptep) || !pte_present(*ptep))
+		return;
+
+	clear_page((void *)ptep);
+	pte_clear(ptep);
+}
+
+unsigned long onchip_remap(unsigned long phys, unsigned long size, const char *name)
+{
+	if (size < PAGE_SIZE)
+		size = PAGE_SIZE;
+
+	return shmedia_alloc_io(phys, size, name);
+}
+
+void onchip_unmap(unsigned long vaddr)
+{
+	struct resource *res;
+	unsigned int psz;
+
+	res = shmedia_find_resource(&shmedia_iomap, vaddr);
+	if (!res) {
+		printk(KERN_ERR "%s: Failed to free 0x%08lx\n",
+		       __FUNCTION__, vaddr);
+		return;
+	}
+
+        psz = (res->end - res->start + (PAGE_SIZE - 1)) / PAGE_SIZE;
+
+        printk(KERN_DEBUG "unmapioaddr: %6s  [%2d page%s] freed\n",
+	       res->name, psz, psz == 1 ? " " : "s");
+
+	shmedia_free_io(res);
+
+	if ((char *)res >= (char *)xresv &&
+	    (char *)res <  (char *)&xresv[XNRES]) {
+		xres_free((struct xresource *)res);
+	} else {
+		kfree(res);
+	}
+}
+
+#ifdef CONFIG_PROC_FS
+static int
+ioremap_proc_info(char *buf, char **start, off_t fpos, int length, int *eof,
+		  void *data)
+{
+	char *p = buf, *e = buf + length;
+	struct resource *r;
+	const char *nm;
+
+	for (r = ((struct resource *)data)->child; r != NULL; r = r->sibling) {
+		if (p + 32 >= e)        /* Better than nothing */
+			break;
+		if ((nm = r->name) == 0) nm = "???";
+		p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm);
+	}
+
+	return p-buf;
+}
+#endif /* CONFIG_PROC_FS */
+
+static int __init register_proc_onchip(void)
+{
+#ifdef CONFIG_PROC_FS
+	create_proc_read_entry("io_map",0,0, ioremap_proc_info, &shmedia_iomap);
+#endif
+	return 0;
+}
+
+__initcall(register_proc_onchip);
--- diff/arch/sh64/mm/tlb.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mm/tlb.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,166 @@
+/*
+ * arch/sh64/mm/tlb.c
+ *
+ * Copyright (C) 2003  Paul Mundt <lethal@linux-sh.org>
+ * Copyright (C) 2003  Richard Curnow <richard.curnow@superh.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ */
+#include <linux/mm.h>
+#include <linux/init.h>
+#include <asm/page.h>
+#include <asm/tlb.h>
+#include <asm/mmu_context.h>
+
+/**
+ * sh64_tlb_init
+ *
+ * Perform initial setup for the DTLB and ITLB.
+ */
+int __init sh64_tlb_init(void)
+{
+	/* Assign some sane DTLB defaults */
+	cpu_data->dtlb.entries	= 64;
+	cpu_data->dtlb.step	= 0x10;
+
+	cpu_data->dtlb.first	= DTLB_FIXED | cpu_data->dtlb.step;
+	cpu_data->dtlb.next	= cpu_data->dtlb.first;
+
+	cpu_data->dtlb.last	= DTLB_FIXED |
+				  ((cpu_data->dtlb.entries - 1) *
+				   cpu_data->dtlb.step);
+
+	/* And again for the ITLB */
+	cpu_data->itlb.entries	= 64;
+	cpu_data->itlb.step	= 0x10;
+
+	cpu_data->itlb.first	= ITLB_FIXED | cpu_data->itlb.step;
+	cpu_data->itlb.next	= cpu_data->itlb.first;
+	cpu_data->itlb.last	= ITLB_FIXED |
+				  ((cpu_data->itlb.entries - 1) *
+				   cpu_data->itlb.step);
+
+	return 0;
+}
+
+/**
+ * sh64_next_free_dtlb_entry
+ *
+ * Find the next available DTLB entry
+ */
+unsigned long long sh64_next_free_dtlb_entry(void)
+{
+	return cpu_data->dtlb.next;
+}
+
+/**
+ * sh64_get_wired_dtlb_entry
+ *
+ * Allocate a wired (locked-in) entry in the DTLB
+ */
+unsigned long long sh64_get_wired_dtlb_entry(void)
+{
+	unsigned long long entry = sh64_next_free_dtlb_entry();
+
+	cpu_data->dtlb.first += cpu_data->dtlb.step;
+	cpu_data->dtlb.next  += cpu_data->dtlb.step;
+
+	return entry;
+}
+
+/**
+ * sh64_put_wired_dtlb_entry
+ *
+ * @entry:	Address of TLB slot.
+ *
+ * Free a wired (locked-in) entry in the DTLB.
+ *
+ * Works like a stack, last one to allocate must be first one to free.
+ */
+int sh64_put_wired_dtlb_entry(unsigned long long entry)
+{
+	__flush_tlb_slot(entry);
+
+	/*
+	 * We don't do any particularly useful tracking of wired entries,
+	 * so this approach works like a stack .. last one to be allocated
+	 * has to be the first one to be freed.
+	 *
+	 * We could potentially load wired entries into a list and work on
+	 * rebalancing the list periodically (which also entails moving the
+	 * contents of a TLB entry) .. though I have a feeling that this is
+	 * more trouble than it's worth.
+	 */
+
+	/*
+	 * Entry must be valid .. we don't want any ITLB addresses!
+	 */
+	if (entry <= DTLB_FIXED)
+		return -EINVAL;
+
+	/*
+	 * Next, check if we're within range to be freed. (ie, must be the
+	 * entry beneath the first 'free' entry!
+	 */
+	if (entry < (cpu_data->dtlb.first - cpu_data->dtlb.step))
+		return -EINVAL;
+
+	/* If we are, then bring this entry back into the list */
+	cpu_data->dtlb.first	-= cpu_data->dtlb.step;
+	cpu_data->dtlb.next	= entry;
+
+	return 0;
+}
+
+/**
+ * sh64_setup_tlb_slot
+ *
+ * @config_addr:	Address of TLB slot.
+ * @eaddr:		Virtual address.
+ * @asid:		Address Space Identifier.
+ * @paddr:		Physical address.
+ *
+ * Load up a virtual<->physical translation for @eaddr<->@paddr in the
+ * pre-allocated TLB slot @config_addr (see sh64_get_wired_dtlb_entry).
+ */
+inline void sh64_setup_tlb_slot(unsigned long long config_addr,
+				unsigned long eaddr,
+				unsigned long asid,
+				unsigned long paddr)
+{
+	unsigned long long pteh, ptel;
+
+	/* Sign extension */
+#if (NEFF == 32)
+	pteh = (unsigned long long)(signed long long)(signed long) eaddr;
+#else
+#error "Can't sign extend more than 32 bits yet"
+#endif
+	pteh &= PAGE_MASK;
+	pteh |= (asid << PTEH_ASID_SHIFT) | PTEH_VALID;
+#if (NEFF == 32)
+	ptel = (unsigned long long)(signed long long)(signed long) paddr;
+#else
+#error "Can't sign extend more than 32 bits yet"
+#endif
+	ptel &= PAGE_MASK;
+	ptel |= (_PAGE_CACHABLE | _PAGE_READ | _PAGE_WRITE);
+
+	asm volatile("putcfg %0, 1, %1\n\t"
+			"putcfg %0, 0, %2\n"
+			: : "r" (config_addr), "r" (ptel), "r" (pteh));
+}
+
+/**
+ * sh64_teardown_tlb_slot
+ *
+ * @config_addr:	Address of TLB slot.
+ *
+ * Teardown any existing mapping in the TLB slot @config_addr.
+ */
+inline void sh64_teardown_tlb_slot(unsigned long long config_addr)
+	__attribute__ ((alias("__flush_tlb_slot")));
+
--- diff/arch/sh64/mm/tlbmiss.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/mm/tlbmiss.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,282 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * arch/sh64/mm/tlbmiss.c
+ *
+ * Original code from fault.c
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * Fast PTE->TLB refill path
+ * Copyright (C) 2003 Richard.Curnow@superh.com
+ *
+ * IMPORTANT NOTES :
+ * The do_fast_page_fault function is called from a context in entry.S where very few registers
+ * have been saved.  In particular, the code in this file must be compiled not to use ANY
+ * caller-save regiseters that are not part of the restricted save set.  Also, it means that
+ * code in this file must not make calls to functions elsewhere in the kernel, or else the
+ * excepting context will see corruption in its caller-save registers.  Plus, the entry.S save
+ * area is non-reentrant, so this code has to run with SR.BL==1, i.e. no interrupts taken inside
+ * it and panic on any exception.
+ *
+ */
+
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/ptrace.h>
+#include <linux/mman.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/interrupt.h>
+
+#include <asm/system.h>
+#include <asm/tlb.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/pgalloc.h>
+#include <asm/hardirq.h>
+#include <asm/mmu_context.h>
+#include <asm/registers.h>		/* required by inline asm statements */
+
+/* Callable from fault.c, so not static */
+inline void __do_tlb_refill(unsigned long address,
+                            unsigned long long is_text_not_data, pte_t *pte)
+{
+	unsigned long long ptel;
+	unsigned long long pteh=0;
+	struct tlb_info *tlbp;
+	unsigned long long next;
+
+	/* Get PTEL first */
+	ptel = pte_val(*pte);
+
+	/*
+	 * Set PTEH register
+	 */
+	pteh = address & MMU_VPN_MASK;
+
+	/* Sign extend based on neff. */
+#if (NEFF == 32)
+	/* Faster sign extension */
+	pteh = (unsigned long long)(signed long long)(signed long)pteh;
+#else
+	/* General case */
+	pteh = (pteh & NEFF_SIGN) ? (pteh | NEFF_MASK) : pteh;
+#endif
+
+	/* Set the ASID. */
+	pteh |= get_asid() << PTEH_ASID_SHIFT;
+	pteh |= PTEH_VALID;
+
+	/* Set PTEL register, set_pte has performed the sign extension */
+	ptel &= _PAGE_FLAGS_HARDWARE_MASK; /* drop software flags */
+	ptel |= _PAGE_FLAGS_HARDWARE_DEFAULT; /* add default flags */
+
+	tlbp = is_text_not_data ? &(cpu_data->itlb) : &(cpu_data->dtlb);
+	next = tlbp->next;
+	__flush_tlb_slot(next);
+	asm volatile ("putcfg %0,1,%2\n\n\t"
+		      "putcfg %0,0,%1\n"
+		      :  : "r" (next), "r" (pteh), "r" (ptel) );
+
+	next += TLB_STEP;
+	if (next > tlbp->last) next = tlbp->first;
+	tlbp->next = next;
+
+}
+
+static int handle_vmalloc_fault(struct mm_struct *mm, unsigned long protection_flags,
+                                unsigned long long textaccess,
+				unsigned long address)
+{
+	pgd_t *dir;
+	pmd_t *pmd;
+	static pte_t *pte;
+	pte_t entry;
+
+	dir = pgd_offset_k(address);
+	pmd = pmd_offset(dir, address);
+
+	if (pmd_none(*pmd)) {
+		return 0;
+	}
+
+	if (pmd_bad(*pmd)) {
+		pmd_clear(pmd);
+		return 0;
+	}
+
+	pte = pte_offset_kernel(pmd, address);
+	entry = *pte;
+
+	if (pte_none(entry) || !pte_present(entry)) {
+		return 0;
+	}
+
+	if ((pte_val(entry) & protection_flags) != protection_flags) {
+		return 0;
+	}
+
+        __do_tlb_refill(address, textaccess, pte);
+
+	return 1;
+}
+
+static int handle_tlbmiss(struct mm_struct *mm, unsigned long long protection_flags,
+			unsigned long long textaccess,
+			unsigned long address)
+{
+	pgd_t *dir;
+	pmd_t *pmd;
+	pte_t *pte;
+	pte_t entry;
+
+	/* NB. The PGD currently only contains a single entry - there is no
+	   page table tree stored for the top half of the address space since
+	   virtual pages in that region should never be mapped in user mode.
+	   (In kernel mode, the only things in that region are the 512Mb super
+	   page (locked in), and vmalloc (modules) +  I/O device pages (handled
+	   by handle_vmalloc_fault), so no PGD for the upper half is required
+	   by kernel mode either).
+
+	   See how mm->pgd is allocated and initialised in pgd_alloc to see why
+	   the next test is necessary.  - RPC */
+	if (address >= (unsigned long) TASK_SIZE) {
+		/* upper half - never has page table entries. */
+		return 0;
+	}
+	dir = pgd_offset(mm, address);
+	if (pgd_none(*dir)) {
+		return 0;
+	}
+	if (!pgd_present(*dir)) {
+		return 0;
+	}
+
+	pmd = pmd_offset(dir, address);
+	if (pmd_none(*pmd)) {
+		return 0;
+	}
+	if (!pmd_present(*pmd)) {
+		return 0;
+	}
+	pte = pte_offset_kernel(pmd, address);
+	entry = *pte;
+	if (pte_none(entry)) {
+		return 0;
+	}
+	if (!pte_present(entry)) {
+		return 0;
+	}
+
+	/* If the page doesn't have sufficient protection bits set to service the
+	   kind of fault being handled, there's not much point doing the TLB refill.
+	   Punt the fault to the general handler. */
+	if ((pte_val(entry) & protection_flags) != protection_flags) {
+		return 0;
+	}
+
+        __do_tlb_refill(address, textaccess, pte);
+
+	return 1;
+}
+
+/* Put all this information into one structure so that everything is just arithmetic
+   relative to a single base address.  This reduces the number of movi/shori pairs needed
+   just to load addresses of static data. */
+struct expevt_lookup {
+	unsigned short protection_flags[8];
+	unsigned char  is_text_access[8];
+	unsigned char  is_write_access[8];
+};
+
+#define PRU (1<<9)
+#define PRW (1<<8)
+#define PRX (1<<7)
+#define PRR (1<<6)
+
+#define DIRTY (_PAGE_DIRTY | _PAGE_ACCESSED)
+#define YOUNG (_PAGE_ACCESSED)
+
+/* Sized as 8 rather than 4 to allow checking the PTE's PRU bit against whether
+   the fault happened in user mode or privileged mode. */
+static struct expevt_lookup expevt_lookup_table = {
+	.protection_flags = {PRX, PRX, 0, 0, PRR, PRR, PRW, PRW},
+	.is_text_access   = {1,   1,   0, 0, 0,   0,   0,   0}
+};
+
+/*
+   This routine handles page faults that can be serviced just by refilling a
+   TLB entry from an existing page table entry.  (This case represents a very
+   large majority of page faults.) Return 1 if the fault was successfully
+   handled.  Return 0 if the fault could not be handled.  (This leads into the
+   general fault handling in fault.c which deals with mapping file-backed
+   pages, stack growth, segmentation faults, swapping etc etc)
+ */
+asmlinkage int do_fast_page_fault(unsigned long long ssr_md, unsigned long long expevt,
+			          unsigned long address)
+{
+	struct task_struct *tsk;
+	struct mm_struct *mm;
+	unsigned long long textaccess;
+	unsigned long long protection_flags;
+	unsigned long long index;
+	unsigned long long expevt4;
+
+	/* The next few lines implement a way of hashing EXPEVT into a small array index
+	   which can be used to lookup parameters specific to the type of TLBMISS being
+	   handled.  Note:
+	   ITLBMISS has EXPEVT==0xa40
+	   RTLBMISS has EXPEVT==0x040
+	   WTLBMISS has EXPEVT==0x060
+	*/
+
+	expevt4 = (expevt >> 4);
+	/* TODO : xor ssr_md into this expression too.  Then we can check that PRU is set
+	   when it needs to be. */
+	index = expevt4 ^ (expevt4 >> 5);
+	index &= 7;
+	protection_flags = expevt_lookup_table.protection_flags[index];
+	textaccess       = expevt_lookup_table.is_text_access[index];
+
+#ifdef CONFIG_SH64_PROC_TLB
+	++calls_to_do_fast_page_fault;
+#endif
+
+	/* SIM
+	 * Note this is now called with interrupts still disabled
+	 * This is to cope with being called for a missing IO port
+	 * address with interupts disabled. This should be fixed as
+	 * soon as we have a better 'fast path' miss handler.
+	 *
+	 * Plus take care how you try and debug this stuff.
+	 * For example, writing debug data to a port which you
+	 * have just faulted on is not going to work.
+	 */
+
+	tsk = current;
+	mm = tsk->mm;
+
+	if ((address >= VMALLOC_START && address < VMALLOC_END) ||
+	    (address >= IOBASE_VADDR  && address < IOBASE_END)) {
+		if (ssr_md) {
+			/* Process-contexts can never have this address range mapped */
+			if (handle_vmalloc_fault(mm, protection_flags, textaccess, address)) {
+				return 1;
+			}
+		}
+	} else if (!in_interrupt() && mm) {
+		if (handle_tlbmiss(mm, protection_flags, textaccess, address)) {
+			return 1;
+		}
+	}
+
+	return 0;
+}
+
--- diff/arch/sh64/oprofile/Kconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/oprofile/Kconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,23 @@
+
+menu "Profiling support"
+	depends on EXPERIMENTAL
+
+config PROFILING
+	bool "Profiling support (EXPERIMENTAL)"
+	help
+	  Say Y here to enable the extended profiling support mechanisms used
+	  by profilers such as OProfile.
+
+
+config OPROFILE
+	tristate "OProfile system profiling (EXPERIMENTAL)"
+	depends on PROFILING
+	help
+	  OProfile is a profiling system capable of profiling the
+	  whole system, include the kernel, kernel modules, libraries,
+	  and applications.
+
+	  If unsure, say N.
+
+endmenu
+
--- diff/arch/sh64/oprofile/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/oprofile/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,12 @@
+obj-$(CONFIG_OPROFILE) += oprofile.o
+
+DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
+		oprof.o cpu_buffer.o buffer_sync.o \
+		event_buffer.o oprofile_files.o \
+		oprofilefs.o oprofile_stats.o \
+		timer_int.o )
+
+profdrvr-y				:= op_model_null.o
+
+oprofile-y				:= $(DRIVER_OBJS) $(profdrvr-y)
+
--- diff/arch/sh64/oprofile/op_model_null.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/sh64/oprofile/op_model_null.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,23 @@
+/*
+ * arch/sh/oprofile/op_model_null.c
+ *
+ * Copyright (C) 2003  Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/kernel.h>
+#include <linux/oprofile.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+
+int __init oprofile_arch_init(struct oprofile_operations **ops)
+{
+	return -ENODEV;
+}
+
+void oprofile_arch_exit(void)
+{
+}
+
--- diff/arch/x86_64/Kconfig.kgdb	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/x86_64/Kconfig.kgdb	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,176 @@
+config KGDB
+	bool "Include kgdb kernel debugger"
+	depends on DEBUG_KERNEL
+	select DEBUG_INFO
+	help
+	  If you say Y here, the system will be compiled with the debug
+	  option (-g) and a debugging stub will be included in the
+	  kernel.  This stub communicates with gdb on another (host)
+	  computer via a serial port.  The host computer should have
+	  access to the kernel binary file (vmlinux) and a serial port
+	  that is connected to the target machine.  Gdb can be made to
+	  configure the serial port or you can use stty and setserial to
+	  do this. See the 'target' command in gdb. This option also
+	  configures in the ability to request a breakpoint early in the
+	  boot process.  To request the breakpoint just include 'kgdb'
+	  as a boot option when booting the target machine.  The system
+	  will then break as soon as it looks at the boot options.  This
+	  option also installs a breakpoint in panic and sends any
+	  kernel faults to the debugger. For more information see the
+	  Documentation/i386/kgdb.txt file.
+
+choice
+	depends on KGDB
+    	prompt "Debug serial port BAUD"
+	default KGDB_115200BAUD
+	help
+	  Gdb and the kernel stub need to agree on the baud rate to be
+	  used.  Some systems (x86 family at this writing) allow this to
+	  be configured.
+
+config KGDB_9600BAUD
+	bool "9600"
+
+config KGDB_19200BAUD
+	bool "19200"
+
+config KGDB_38400BAUD
+	bool "38400"
+
+config KGDB_57600BAUD
+	bool "57600"
+
+config KGDB_115200BAUD
+	bool "115200"
+endchoice
+
+config KGDB_PORT
+	hex "hex I/O port address of the debug serial port"
+	depends on KGDB
+	default  3f8
+	help
+	  Some systems (x86 family at this writing) allow the port
+	  address to be configured.  The number entered is assumed to be
+	  hex, don't put 0x in front of it.  The standard address are:
+	  COM1 3f8 , irq 4 and COM2 2f8 irq 3.  Setserial /dev/ttySx
+	  will tell you what you have.  It is good to test the serial
+	  connection with a live system before trying to debug.
+
+config KGDB_IRQ
+	int "IRQ of the debug serial port"
+	depends on KGDB
+	default 4
+	help
+	  This is the irq for the debug port.  If everything is working
+	  correctly and the kernel has interrupts on a control C to the
+	  port should cause a break into the kernel debug stub.
+
+config DEBUG_INFO
+	bool
+	depends on KGDB
+	default y
+
+config KGDB_MORE
+	bool "Add any additional compile options"
+	depends on KGDB
+	default n
+	help
+	  Saying yes here turns on the ability to enter additional
+	  compile options.
+
+
+config KGDB_OPTIONS
+	depends on KGDB_MORE
+	string "Additional compile arguments"
+	default "-O1"
+	help
+	  This option allows you enter additional compile options for
+	  the whole kernel compile.  Each platform will have a default
+	  that seems right for it.  For example on PPC "-ggdb -O1", and
+	  for i386 "-O1".  Note that by configuring KGDB "-g" is already
+	  turned on.  In addition, on i386 platforms
+	  "-fomit-frame-pointer" is deleted from the standard compile
+	  options.
+
+config NO_KGDB_CPUS
+	int "Number of CPUs"
+	depends on KGDB && SMP
+	default NR_CPUS
+	help
+
+	  This option sets the number of cpus for kgdb ONLY.  It is used
+	  to prune some internal structures so they look "nice" when
+	  displayed with gdb.  This is to overcome possibly larger
+	  numbers that may have been entered above.  Enter the real
+	  number to get nice clean kgdb_info displays.
+
+config KGDB_TS
+	bool "Enable kgdb time stamp macros?"
+	depends on KGDB
+	default n
+	help
+	  Kgdb event macros allow you to instrument your code with calls
+	  to the kgdb event recording function.  The event log may be
+	  examined with gdb at a break point.  Turning on this
+	  capability also allows you to choose how many events to
+	  keep. Kgdb always keeps the lastest events.
+
+choice
+	depends on KGDB_TS
+	prompt "Max number of time stamps to save?"
+	default KGDB_TS_128
+
+config KGDB_TS_64
+	bool "64"
+
+config KGDB_TS_128
+	bool "128"
+
+config KGDB_TS_256
+	bool "256"
+
+config KGDB_TS_512
+	bool "512"
+
+config KGDB_TS_1024
+	bool "1024"
+
+endchoice
+
+config STACK_OVERFLOW_TEST
+	bool "Turn on kernel stack overflow testing?"
+	depends on KGDB
+	default n
+	help
+	  This option enables code in the front line interrupt handlers
+	  to check for kernel stack overflow on interrupts and system
+	  calls.  This is part of the kgdb code on x86 systems.
+
+config KGDB_CONSOLE
+	bool "Enable serial console thru kgdb port"
+	depends on KGDB
+	default n
+	help
+	  This option enables the command line "console=kgdb" option.
+	  When the system is booted with this option in the command line
+	  all kernel printk output is sent to gdb (as well as to other
+	  consoles).  For this to work gdb must be connected.  For this
+	  reason, this command line option will generate a breakpoint if
+	  gdb has not yet connected.  After the gdb continue command is
+	  given all pent up console output will be printed by gdb on the
+	  host machine.  Neither this option, nor KGDB require the
+	  serial driver to be configured.
+
+config KGDB_SYSRQ
+	bool "Turn on SysRq 'G' command to do a break?"
+	depends on KGDB
+	default y
+	help
+	  This option includes an option in the SysRq code that allows
+	  you to enter SysRq G which generates a breakpoint to the KGDB
+	  stub.  This will work if the keyboard is alive and can
+	  interrupt the system.  Because of constraints on when the
+	  serial port interrupt can be enabled, this code may allow you
+	  to interrupt the system before the serial port control C is
+	  available.  Just say yes here.
+
--- diff/arch/x86_64/kernel/kgdb_stub.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/x86_64/kernel/kgdb_stub.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,2591 @@
+/*
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * General Public License for more details.
+ *
+ */
+
+/*
+ * Copyright (c) 2000 VERITAS Software Corporation.
+ *
+ */
+/****************************************************************************
+ *  Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
+ *
+ *  Module name: remcom.c $
+ *  Revision: 1.34 $
+ *  Date: 91/03/09 12:29:49 $
+ *  Contributor:     Lake Stevens Instrument Division$
+ *
+ *  Description:     low level support for gdb debugger. $
+ *
+ *  Considerations:  only works on target hardware $
+ *
+ *  Written by:	     Glenn Engel $
+ *  Updated by:	     David Grothe <dave@gcom.com>
+ *  Updated by:	     Robert Walsh <rjwalsh@durables.org>
+ *  Updated by:	     wangdi <wangdi@clusterfs.com>
+ *  ModuleState:     Experimental $
+ *
+ *  NOTES:	     See Below $
+ *
+ *  Modified for 386 by Jim Kingdon, Cygnus Support.
+ *  Compatibility with 2.1.xx kernel by David Grothe <dave@gcom.com>
+ *
+ *  Changes to allow auto initilization.  All that is needed is that it
+ *  be linked with the kernel and a break point (int 3) be executed.
+ *  The header file <asm/kgdb.h> defines BREAKPOINT to allow one to do
+ *  this. It should also be possible, once the interrupt system is up, to
+ *  call putDebugChar("+").  Once this is done, the remote debugger should
+ *  get our attention by sending a ^C in a packet. George Anzinger
+ *  <george@mvista.com>
+ *  Integrated into 2.2.5 kernel by Tigran Aivazian <tigran@sco.com>
+ *  Added thread support, support for multiple processors,
+ *	support for ia-32(x86) hardware debugging.
+ *	Amit S. Kale ( akale@veritas.com )
+ *
+ *  Modified to support debugging over ethernet by Robert Walsh
+ *  <rjwalsh@durables.org> and wangdi <wangdi@clusterfs.com>, based on
+ *  code by San Mehat.
+ *
+ *  X86_64 changes from Andi Kleen's patch merged by Jim Houston
+ * 	(jim.houston@ccur.com).  If it works thank Andi if its broken
+ * 	blame me.
+ *
+ *  To enable debugger support, two things need to happen.  One, a
+ *  call to set_debug_traps() is necessary in order to allow any breakpoints
+ *  or error conditions to be properly intercepted and reported to gdb.
+ *  Two, a breakpoint needs to be generated to begin communication.  This
+ *  is most easily accomplished by a call to breakpoint().  Breakpoint()
+ *  simulates a breakpoint by executing an int 3.
+ *
+ *************
+ *
+ *    The following gdb commands are supported:
+ *
+ * command	    function				   Return value
+ *
+ *    g		    return the value of the CPU registers  hex data or ENN
+ *    G		    set the value of the CPU registers	   OK or ENN
+ *
+ *    mAA..AA,LLLL  Read LLLL bytes at address AA..AA	   hex data or ENN
+ *    MAA..AA,LLLL: Write LLLL bytes at address AA.AA	   OK or ENN
+ *
+ *    c		    Resume at current address		   SNN	 ( signal NN)
+ *    cAA..AA	    Continue at address AA..AA		   SNN
+ *
+ *    s		    Step one instruction		   SNN
+ *    sAA..AA	    Step one instruction from AA..AA	   SNN
+ *
+ *    k		    kill
+ *
+ *    ?		    What was the last sigval ?		   SNN	 (signal NN)
+ *
+ * All commands and responses are sent with a packet which includes a
+ * checksum.  A packet consists of
+ *
+ * $<packet info>#<checksum>.
+ *
+ * where
+ * <packet info> :: <characters representing the command or response>
+ * <checksum>	 :: < two hex digits computed as modulo 256 sum of <packetinfo>>
+ *
+ * When a packet is received, it is first acknowledged with either '+' or '-'.
+ * '+' indicates a successful transfer.	 '-' indicates a failed transfer.
+ *
+ * Example:
+ *
+ * Host:		  Reply:
+ * $m0,10#2a		   +$00010203040506070809101112131415#42
+ *
+ ****************************************************************************/
+#define KGDB_VERSION "<20030915.1651.33>"
+#include <linux/config.h>
+#include <linux/types.h>
+#include <asm/string.h>		/* for strcpy */
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <asm/system.h>
+#include <asm/ptrace.h>		/* for linux pt_regs struct */
+#include <asm/kgdb_local.h>
+#include <linux/list.h>
+#include <asm/atomic.h>
+#include <asm/processor.h>
+#include <linux/irq.h>
+#include <asm/desc.h>
+#include <linux/inet.h>
+#include <linux/netpoll.h>
+#include <linux/cpumask.h>
+#include <linux/bitops.h>
+#include <linux/notifier.h>
+#include <asm/kdebug.h>
+#include <asm/uaccess.h>
+#include <linux/ptrace.h>
+
+#define Dearly_printk(x...)
+int kgdb_enabled = 0;
+
+/************************************************************************
+ *
+ * external low-level support routines
+ */
+typedef void (*Function) (void);	/* pointer to a function */
+
+/* Thread reference */
+typedef unsigned char threadref[8];
+
+extern int tty_putDebugChar(int);     /* write a single character      */
+extern int tty_getDebugChar(void);    /* read and return a single char */
+extern void tty_flushDebugChar(void); /* flush pending characters      */
+extern int eth_putDebugChar(int);     /* write a single character      */
+extern int eth_getDebugChar(void);    /* read and return a single char */
+extern void eth_flushDebugChar(void); /* flush pending characters      */
+
+/************************************************************************/
+/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
+/* at least NUMREGBYTES*2 are needed for register packets */
+/* Longer buffer is needed to list all threads */
+#define BUFMAX 400
+
+char *kgdb_version = KGDB_VERSION;
+
+/*  debug >  0 prints ill-formed commands in valid packets & checksum errors */
+int debug_regs = 0;		/* set to non-zero to print registers */
+
+/* filled in by an external module */
+char *gdb_module_offsets;
+
+static const char hexchars[] = "0123456789abcdef";
+
+/* Number of bytes of registers.  */
+#define NUMREGBYTES (NUMREGS * sizeof(unsigned long))
+/*
+ * Note that this register image is in a different order than
+ * the register image that Linux produces at interrupt time.
+ *
+ * Linux's register image is defined by struct pt_regs in ptrace.h.
+ * Just why GDB uses a different order is a historical mystery.
+ *
+ * Could add XMM and segment registers here.
+ */
+enum regnames {_RAX,
+	       _RBX,
+	       _RCX,
+	       _RDX,
+	       _RSI,
+	       _RDI,
+	       _RBP,
+	       _RSP,
+	       _R8,
+	       _R9,
+	       _R10,
+	       _R11,
+	       _R12,
+	       _R13,
+	       _R14,
+	       _R15,
+	       _PC,
+	       _PS,
+	       NUMREGS };
+
+
+/***************************  ASSEMBLY CODE MACROS *************************/
+/*
+ * Put the error code here just in case the user cares.
+ * Likewise, the vector number here (since GDB only gets the signal
+ * number through the usual means, and that's not very specific).
+ * The called_from is the return address so he can tell how we entered kgdb.
+ * This will allow him to seperate out the various possible entries.
+ */
+#define REMOTE_DEBUG 0		/* set != to turn on printing (also available in info) */
+
+#define PID_MAX PID_MAX_DEFAULT
+
+#ifdef CONFIG_SMP
+void smp_send_nmi_allbutself(void);
+#define IF_SMP(x) x
+#undef MAX_NO_CPUS
+#ifndef CONFIG_NO_KGDB_CPUS
+#define CONFIG_NO_KGDB_CPUS 2
+#endif
+#if CONFIG_NO_KGDB_CPUS > NR_CPUS
+#define MAX_NO_CPUS NR_CPUS
+#else
+#define MAX_NO_CPUS CONFIG_NO_KGDB_CPUS
+#endif
+#define hold_init hold_on_sstep: 1,
+#define MAX_CPU_MASK (unsigned long)((1LL << MAX_NO_CPUS) - 1LL)
+#define NUM_CPUS num_online_cpus()
+#else
+#define IF_SMP(x)
+#define hold_init
+#undef MAX_NO_CPUS
+#define MAX_NO_CPUS 1
+#define NUM_CPUS 1
+#endif
+#define NOCPU (struct task_struct *)0xbad1fbad
+/* *INDENT-OFF*	 */
+struct kgdb_info {
+	int used_malloc;
+	void *called_from;
+	long long entry_tsc;
+	int errcode;
+	int vector;
+	int print_debug_info;
+#ifdef CONFIG_SMP
+	int hold_on_sstep;
+	struct {
+		volatile struct task_struct *task;
+		int pid;
+		int hold;
+		struct pt_regs *regs;
+	} cpus_waiting[MAX_NO_CPUS];
+#endif
+} kgdb_info = {hold_init print_debug_info:REMOTE_DEBUG, vector:-1};
+
+/* *INDENT-ON*	*/
+
+#define used_m kgdb_info.used_malloc
+/*
+ * This is little area we set aside to contain the stack we
+ * need to build to allow gdb to call functions.  We use one
+ * per cpu to avoid locking issues.  We will do all this work
+ * with interrupts off so that should take care of the protection
+ * issues.
+ */
+#define LOOKASIDE_SIZE 200	/* should be more than enough */
+#define MALLOC_MAX   200	/* Max malloc size */
+struct {
+	unsigned long rsp;
+	unsigned long array[LOOKASIDE_SIZE];
+} fn_call_lookaside[MAX_NO_CPUS];
+
+static int trap_cpu;
+static unsigned long OLD_esp;
+
+#define END_OF_LOOKASIDE  &fn_call_lookaside[trap_cpu].array[LOOKASIDE_SIZE]
+#define IF_BIT 0x200
+#define TF_BIT 0x100
+
+#define MALLOC_ROUND 8-1
+
+static char malloc_array[MALLOC_MAX];
+IF_SMP(static void to_gdb(const char *mess));
+void *
+malloc(int size)
+{
+
+	if (size <= (MALLOC_MAX - used_m)) {
+		int old_used = used_m;
+		used_m += ((size + MALLOC_ROUND) & (~MALLOC_ROUND));
+		return &malloc_array[old_used];
+	} else {
+		return NULL;
+	}
+}
+
+/*
+ * I/O dispatch functions...
+ * Based upon kgdboe, either call the ethernet
+ * handler or the serial one..
+ */
+void
+putDebugChar(int c)
+{
+	if (!kgdboe) {
+		tty_putDebugChar(c);
+	} else {
+		eth_putDebugChar(c);
+	}
+}
+
+int
+getDebugChar(void)
+{
+	if (!kgdboe) {
+		return tty_getDebugChar();
+	} else {
+		return eth_getDebugChar();
+	}
+}
+
+void
+flushDebugChar(void)
+{
+	if (!kgdboe) {
+		tty_flushDebugChar();
+	} else {
+		eth_flushDebugChar();
+	}
+}
+
+/*
+ * Gdb calls functions by pushing agruments, including a return address
+ * on the stack and the adjusting EIP to point to the function.	 The
+ * whole assumption in GDB is that we are on a different stack than the
+ * one the "user" i.e. code that hit the break point, is on.  This, of
+ * course is not true in the kernel.  Thus various dodges are needed to
+ * do the call without directly messing with EIP (which we can not change
+ * as it is just a location and not a register.	 To adjust it would then
+ * require that we move every thing below EIP up or down as needed.  This
+ * will not work as we may well have stack relative pointer on the stack
+ * (such as the pointer to regs, for example).
+
+ * So here is what we do:
+ * We detect gdb attempting to store into the stack area and instead, store
+ * into the fn_call_lookaside.array at the same relative location as if it
+ * were the area ESP pointed at.  We also trap ESP modifications
+ * and uses these to adjust fn_call_lookaside.esp.  On entry
+ * fn_call_lookaside.esp will be set to point at the last entry in
+ * fn_call_lookaside.array.  This allows us to check if it has changed, and
+ * if so, on exit, we add the registers we will use to do the move and a
+ * trap/ interrupt return exit sequence.  We then adjust the eflags in the
+ * regs array (remember we now have a copy in the fn_call_lookaside.array) to
+ * kill the interrupt bit, AND we change EIP to point at our set up stub.
+ * As part of the register set up we preset the registers to point at the
+ * begining and end of the fn_call_lookaside.array, so all the stub needs to
+ * do is move words from the array to the stack until ESP= the desired value
+ * then do the rti.  This will then transfer to the desired function with
+ * all the correct registers.  Nifty huh?
+ */
+extern asmlinkage void fn_call_stub(void);
+extern asmlinkage void fn_rtn_stub(void);
+/*					   *INDENT-OFF*	 */
+__asm__("fn_rtn_stub:\n\t"
+	"movq %rax,%rsp\n\t"
+	"fn_call_stub:\n\t"
+	"1:\n\t"
+	"addq $-8,%rbx\n\t"
+	"movq (%rbx), %rax\n\t"
+	"pushq %rax\n\t"
+	"cmpq %rsp,%rcx\n\t"
+	"jne  1b\n\t"
+	"popq %rax\n\t"
+	"popq %rbx\n\t"
+	"popq %rcx\n\t"
+	"iret \n\t");
+/*					     *INDENT-ON*  */
+#define gdb_i386vector	kgdb_info.vector
+#define gdb_i386errcode kgdb_info.errcode
+#define waiting_cpus	kgdb_info.cpus_waiting
+#define remote_debug	kgdb_info.print_debug_info
+#define hold_cpu(cpu)	kgdb_info.cpus_waiting[cpu].hold
+/* gdb locks */
+
+#ifdef CONFIG_SMP
+static int in_kgdb_called;
+static spinlock_t waitlocks[MAX_NO_CPUS] =
+    {[0 ... MAX_NO_CPUS - 1] = SPIN_LOCK_UNLOCKED };
+/*
+ * The following array has the thread pointer of each of the "other"
+ * cpus.  We make it global so it can be seen by gdb.
+ */
+volatile int in_kgdb_entry_log[MAX_NO_CPUS];
+volatile struct pt_regs *in_kgdb_here_log[MAX_NO_CPUS];
+/*
+static spinlock_t continuelocks[MAX_NO_CPUS];
+*/
+spinlock_t kgdb_spinlock = SPIN_LOCK_UNLOCKED;
+/* waiters on our spinlock plus us */
+static atomic_t spinlock_waiters = ATOMIC_INIT(1);
+static int spinlock_count = 0;
+static int spinlock_cpu = 0;
+/*
+ * Note we use nested spin locks to account for the case where a break
+ * point is encountered when calling a function by user direction from
+ * kgdb. Also there is the memory exception recursion to account for.
+ * Well, yes, but this lets other cpus thru too.  Lets add a
+ * cpu id to the lock.
+ */
+#define KGDB_SPIN_LOCK(x) if( spinlock_count == 0 || \
+			      spinlock_cpu != smp_processor_id()){\
+				      atomic_inc(&spinlock_waiters); \
+				      while (! spin_trylock(x)) {\
+					    in_kgdb(&regs);\
+				      }\
+				      atomic_dec(&spinlock_waiters); \
+				      spinlock_count = 1; \
+				      spinlock_cpu = smp_processor_id(); \
+			  }else{  \
+				      spinlock_count++; \
+			  }
+#define KGDB_SPIN_UNLOCK(x) if( --spinlock_count == 0) spin_unlock(x)
+#else
+unsigned kgdb_spinlock = 0;
+#define KGDB_SPIN_LOCK(x) --*x
+#define KGDB_SPIN_UNLOCK(x) ++*x
+#endif
+
+int
+hex(char ch)
+{
+	if ((ch >= 'a') && (ch <= 'f'))
+		return (ch - 'a' + 10);
+	if ((ch >= '0') && (ch <= '9'))
+		return (ch - '0');
+	if ((ch >= 'A') && (ch <= 'F'))
+		return (ch - 'A' + 10);
+	return (-1);
+}
+
+/* scan for the sequence $<data>#<checksum>	*/
+void
+getpacket(char *buffer)
+{
+	unsigned char checksum;
+	unsigned char xmitcsum;
+	int i;
+	int count;
+	char ch;
+
+	do {
+		/* wait around for the start character, ignore all other characters */
+		while ((ch = (getDebugChar() & 0x7f)) != '$') ;
+		checksum = 0;
+		xmitcsum = -1;
+
+		count = 0;
+
+		/* now, read until a # or end of buffer is found */
+		while (count < BUFMAX) {
+			ch = getDebugChar() & 0x7f;
+			if (ch == '#')
+				break;
+			checksum = checksum + ch;
+			buffer[count] = ch;
+			count = count + 1;
+		}
+		buffer[count] = 0;
+
+		if (ch == '#') {
+			xmitcsum = hex(getDebugChar() & 0x7f) << 4;
+			xmitcsum += hex(getDebugChar() & 0x7f);
+			if ((remote_debug) && (checksum != xmitcsum)) {
+				printk
+				    ("bad checksum.	My count = 0x%x, sent=0x%x. buf=%s\n",
+				     checksum, xmitcsum, buffer);
+			}
+
+			if (checksum != xmitcsum)
+				putDebugChar('-');	/* failed checksum */
+			else {
+				putDebugChar('+');	/* successful transfer */
+				/* if a sequence char is present, reply the sequence ID */
+				if (buffer[2] == ':') {
+					putDebugChar(buffer[0]);
+					putDebugChar(buffer[1]);
+					/* remove sequence chars from buffer */
+					count = strlen(buffer);
+					for (i = 3; i <= count; i++)
+						buffer[i - 3] = buffer[i];
+				}
+			}
+		}
+	} while (checksum != xmitcsum);
+
+	if (remote_debug)
+		printk("R:%s\n", buffer);
+	flushDebugChar();
+}
+
+/* send the packet in buffer.  */
+
+void
+putpacket(char *buffer)
+{
+	unsigned char checksum;
+	int count;
+	char ch;
+
+	/*  $<packet info>#<checksum>. */
+
+	if (!kgdboe) {
+		do {
+			if (remote_debug)
+				printk("T:%s\n", buffer);
+			putDebugChar('$');
+			checksum = 0;
+			count = 0;
+
+			while ((ch = buffer[count])) {
+				putDebugChar(ch);
+				checksum += ch;
+				count += 1;
+			}
+
+			putDebugChar('#');
+			putDebugChar(hexchars[checksum >> 4]);
+			putDebugChar(hexchars[checksum % 16]);
+			flushDebugChar();
+
+		} while ((getDebugChar() & 0x7f) != '+');
+	} else {
+		/*
+		 * For udp, we can not transfer too much bytes once.
+		 * We only transfer MAX_SEND_COUNT size bytes each time
+		 */
+
+#define MAX_SEND_COUNT 30
+
+		int send_count = 0, i = 0;
+		char send_buf[MAX_SEND_COUNT];
+
+		do {
+			if (remote_debug)
+				printk("T:%s\n", buffer);
+			putDebugChar('$');
+			checksum = 0;
+			count = 0;
+			send_count = 0;
+			while ((ch = buffer[count])) {
+				if (send_count >= MAX_SEND_COUNT) {
+					for(i = 0; i < MAX_SEND_COUNT; i++) {
+						putDebugChar(send_buf[i]);
+					}
+					flushDebugChar();
+					send_count = 0;
+				} else {
+					send_buf[send_count] = ch;
+					checksum += ch;
+					count ++;
+					send_count++;
+				}
+			}
+			for(i = 0; i < send_count; i++)
+				putDebugChar(send_buf[i]);
+			putDebugChar('#');
+			putDebugChar(hexchars[checksum >> 4]);
+			putDebugChar(hexchars[checksum % 16]);
+			flushDebugChar();
+		} while ((getDebugChar() & 0x7f) != '+');
+	}
+}
+
+static char remcomInBuffer[BUFMAX];
+static char remcomOutBuffer[BUFMAX];
+static char lbuf[BUFMAX];
+static short error;
+
+void
+debug_error(char *format, char *parm)
+{
+	if (remote_debug)
+		printk(format, parm);
+}
+
+static void
+print_regs(struct pt_regs *regs)
+{
+	printk("RAX=%016lx RBX=%016lx RCX=%016lx\n",
+		regs->rax, regs->rbx, regs->rcx);
+	printk("RDX=%016lx RSI=%016lx RDI=%016lx\n",
+		regs->rdx, regs->rsi, regs->rdi);
+	printk("RBP=%016lx PS=%016lx PC=%016lx\n",
+		regs->rbp, regs->eflags, regs->rip);
+ 	printk("R8=%016lx R9=%016lx R10=%016lx\n",
+		regs->r8, regs->r9, regs->r10);
+	printk("R11=%016lx R12=%016lx R13=%016lx\n",
+		regs->r11, regs->r12, regs->r13);
+	printk("R14=%016lx R15=%016lx RSP=%016lx\n",
+		regs->r14, regs->r15, regs->rsp);
+}
+
+#define NEW_esp fn_call_lookaside[trap_cpu].rsp
+
+static void
+regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
+{
+	gdb_regs[_RAX] =  regs->rax;
+	gdb_regs[_RBX] =  regs->rbx;
+	gdb_regs[_RCX] =  regs->rcx;
+	gdb_regs[_RDX] =  regs->rdx;
+	gdb_regs[_RSI] =  regs->rsi;
+	gdb_regs[_RDI] =  regs->rdi;
+	gdb_regs[_RBP] =  regs->rbp;
+	gdb_regs[ _PS] =  regs->eflags;
+	gdb_regs[ _PC] =  regs->rip;
+	gdb_regs[ _R8] =  regs->r8;
+	gdb_regs[ _R9] =  regs->r9;
+	gdb_regs[_R10] = regs->r10;
+	gdb_regs[_R11] = regs->r11;
+	gdb_regs[_R12] = regs->r12;
+	gdb_regs[_R13] = regs->r13;
+	gdb_regs[_R14] = regs->r14;
+	gdb_regs[_R15] = regs->r15;
+	gdb_regs[_RSP] =  regs->rsp;
+
+	/* Note, as we are a debugging the kernel, we will always
+	 * trap in kernel code, this means no priviledge change,
+	 * and so the pt_regs structure is not completely valid.  In a non
+	 * privilege change trap, only EFLAGS, CS and EIP are put on the stack,
+	 * SS and ESP are not stacked, this means that the last 2 elements of
+	 * pt_regs is not valid (they would normally refer to the user stack)
+	 * also, using regs+1 is no good because you end up will a value that is
+	 * 2 longs (8) too high.  This used to cause stepping over functions
+	 * to fail, so my fix is to use the address of regs->esp, which
+	 * should point at the end of the stack frame.	Note I have ignored
+	 * completely exceptions that cause an error code to be stacked, such
+	 * as double fault.  Stuart Hughes, Zentropix.
+	 * original code: gdb_regs[_ESP] =  (int) (regs + 1) ;
+
+	 * this is now done on entry and moved to OLD_esp (as well as NEW_esp).
+	 */
+}
+
+static void
+gdb_regs_to_regs(unsigned long *gdb_regs, struct pt_regs *regs)
+{
+	regs->rax	=     gdb_regs[_RAX] ;
+	regs->rbx	=     gdb_regs[_RBX] ;
+	regs->rcx	=     gdb_regs[_RCX] ;
+	regs->rdx	=     gdb_regs[_RDX] ;
+	regs->rsi	=     gdb_regs[_RSI] ;
+	regs->rdi	=     gdb_regs[_RDI] ;
+	regs->rbp	=     gdb_regs[_RBP] ;
+	regs->eflags	=     gdb_regs[ _PS] ;
+	regs->rip	=     gdb_regs[ _PC] ;
+	regs->r8	=     gdb_regs[ _R8] ;
+	regs->r9	=     gdb_regs[ _R9] ;
+	regs->r10	=     gdb_regs[ _R10] ;
+	regs->r11	=     gdb_regs[ _R11] ;
+	regs->r12	=     gdb_regs[ _R12] ;
+	regs->r13	=     gdb_regs[ _R13] ;
+	regs->r14	=     gdb_regs[ _R14] ;
+	regs->r15	=     gdb_regs[ _R15] ;
+ #if 0					/* can't change these */
+	regs->rsp	=     gdb_regs[_RSP] ;
+	regs->ss	=     gdb_regs[ _SS] ;
+	regs->fs = gdb_regs[_FS];
+	regs->gs = gdb_regs[_GS];
+#endif
+}				/* gdb_regs_to_regs */
+
+int thread_list = 0;
+extern void thread_return(void);
+
+void
+get_gdb_regs(struct task_struct *p, struct pt_regs *regs, unsigned long *gdb_regs)
+{
+	unsigned long **rbp, *rsp, *rsp0, pc;
+	int count = 0;
+	IF_SMP(int i);
+	if (!p || p == current) {
+		regs_to_gdb_regs(gdb_regs, regs);
+		return;
+	}
+#ifdef CONFIG_SMP
+	for (i = 0; i < MAX_NO_CPUS; i++) {
+		if (p == kgdb_info.cpus_waiting[i].task) {
+			regs_to_gdb_regs(gdb_regs,
+					 kgdb_info.cpus_waiting[i].regs);
+			gdb_regs[_RSP] =
+			    (unsigned long)&kgdb_info.cpus_waiting[i].regs->rsp;
+
+			return;
+		}
+	}
+#endif
+	memset(gdb_regs, 0, NUMREGBYTES);
+	rsp = (unsigned long *)p->thread.rsp;
+	rbp = (unsigned long **)rsp[0];
+	rsp += 2;
+	gdb_regs[_PC] =  (unsigned long)thread_return;
+	gdb_regs[_RBP] = (unsigned long)rbp;
+	gdb_regs[_RSP] = (unsigned long)rsp;
+
+/*
+ * This code is to give a more informative notion of where a process
+ * is waiting.	It is used only when the user asks for a thread info
+ * list.  If he then switches to the thread, s/he will find the task
+ * is in schedule, but a back trace should show the same info we come
+ * up with.  This code was shamelessly purloined from process.c.  It was
+ * then enhanced to provide more registers than simply the program
+ * counter.
+ */
+
+	if (!thread_list) {
+		return;
+	}
+
+	if (p->state == TASK_RUNNING)
+		return;
+	rsp0 = (unsigned long *)p->thread.rsp0;
+	if (rsp < (unsigned long *) p->thread_info || rsp > rsp0)
+		return;
+	/* include/asm-i386/system.h:switch_to() pushes ebp last. */
+	do {
+		if (*rbp < rsp || *rbp > rsp0)
+			break;
+		rbp = (unsigned long **)*rbp;
+		rsp = (unsigned long *)rbp;
+		pc = rsp[1];
+
+		if (!in_sched_functions(pc))
+			break;
+		gdb_regs[_PC] = (unsigned long)pc;
+		gdb_regs[_RSP] = (unsigned long)rsp;
+		gdb_regs[_RBP] = (unsigned long)rbp;
+	} while (count++ < 16);
+	return;
+}
+
+/* convert the memory pointed to by mem into hex, placing result in buf */
+/* returns nonzero if any memory access fails. */
+int mem2hex( char* mem, char* buf, int   count)
+{
+	int i;
+	unsigned char ch;
+	int ret = 0;
+
+	for (i=0;i<count;i++) {
+		ch = 0;
+		ret |= __get_user(ch, mem);
+		mem++;
+		*buf++ = hexchars[ch >> 4];
+		*buf++ = hexchars[ch % 16];
+	}
+	*buf = 0;
+	if (ret) {
+		Dearly_printk("mem2hex: fault at accessing %p\n", mem);
+	}
+	return(ret);
+}
+
+/* convert the hex array pointed to by buf into binary to be placed in mem */
+/* return nonzero if any memory access fails. */
+int hex2mem( char* buf, char* mem, int count)
+{
+	int i;
+	unsigned char ch;
+	int ret = 0;
+
+	for (i=0;i<count;i++) {
+		ch = hex(*buf++) << 4;
+		ch = ch + hex(*buf++);
+		ret |= __put_user(ch, mem);
+		mem++;
+	}
+	if (ret) {
+		Dearly_printk("hex2mem: fault at %p\n", mem);
+	}
+	return(ret);
+}
+
+#if 0
+/* Indicate to caller of mem2hex or hex2mem that there has been an
+   error.  */
+static volatile int mem_err = 0;
+static volatile int mem_err_expected = 0;
+static volatile int mem_err_cnt = 0;
+static int garbage_loc = -1;
+
+int
+get_char(char *addr)
+{
+	return *addr;
+}
+
+void
+set_char(char *addr, int val, int may_fault)
+{
+	/*
+	 * This code traps references to the area mapped to the kernel
+	 * stack as given by the regs and, instead, stores to the
+	 * fn_call_lookaside[cpu].array
+	 */
+	if (may_fault &&
+	    (unsigned int) addr < OLD_esp &&
+	    ((unsigned int) addr > (OLD_esp - (unsigned int) LOOKASIDE_SIZE))) {
+		addr = (char *) END_OF_LOOKASIDE - ((char *) OLD_esp - addr);
+	}
+	*addr = val;
+}
+
+/* convert the memory pointed to by mem into hex, placing result in buf */
+/* return a pointer to the last char put in buf (null) */
+/* If MAY_FAULT is non-zero, then we should set mem_err in response to
+   a fault; if zero treat a fault like any other fault in the stub.  */
+char *
+mem2hex(char *mem, char *buf, int count, int may_fault)
+{
+	int i;
+	unsigned char ch;
+
+	if (may_fault) {
+		mem_err_expected = 1;
+		mem_err = 0;
+	}
+	for (i = 0; i < count; i++) {
+		/* printk("%lx = ", mem) ; */
+
+		ch = get_char(mem++);
+
+		/* printk("%02x\n", ch & 0xFF) ; */
+		if (may_fault && mem_err) {
+			if (remote_debug)
+				printk("Mem fault fetching from addr %lx\n",
+				       (long) (mem - 1));
+			*buf = 0;	/* truncate buffer */
+			return (buf);
+		}
+		*buf++ = hexchars[ch >> 4];
+		*buf++ = hexchars[ch % 16];
+	}
+	*buf = 0;
+	if (may_fault)
+		mem_err_expected = 0;
+	return (buf);
+}
+
+/* convert the hex array pointed to by buf into binary to be placed in mem */
+/* return a pointer to the character AFTER the last byte written */
+/* NOTE: We use the may fault flag to also indicate if the write is to
+ * the registers (0) or "other" memory (!=0)
+ */
+char *
+hex2mem(char *buf, char *mem, int count, int may_fault)
+{
+	int i;
+	unsigned char ch;
+
+	if (may_fault) {
+		mem_err_expected = 1;
+		mem_err = 0;
+	}
+	for (i = 0; i < count; i++) {
+		ch = hex(*buf++) << 4;
+		ch = ch + hex(*buf++);
+		set_char(mem++, ch, may_fault);
+
+		if (may_fault && mem_err) {
+			if (remote_debug)
+				printk("Mem fault storing to addr %lx\n",
+				       (long) (mem - 1));
+			return (mem);
+		}
+	}
+	if (may_fault)
+		mem_err_expected = 0;
+	return (mem);
+}
+#endif
+
+/**********************************************/
+/* WHILE WE FIND NICE HEX CHARS, BUILD AN INT */
+/* RETURN NUMBER OF CHARS PROCESSED	      */
+/**********************************************/
+int
+hexToLong(char **ptr, unsigned long *value)
+{
+	int numChars = 0;
+	int hexValue;
+
+	*value = 0;
+
+	while (**ptr) {
+		hexValue = hex(**ptr);
+		if (hexValue >= 0) {
+			*value = (*value << 4) | hexValue;
+			numChars++;
+		} else
+			break;
+
+		(*ptr)++;
+	}
+
+	return (numChars);
+}
+
+#define stubhex(h) hex(h)
+#ifdef old_thread_list
+
+static int
+stub_unpack_int(char *buff, int fieldlength)
+{
+	int nibble;
+	int retval = 0;
+
+	while (fieldlength) {
+		nibble = stubhex(*buff++);
+		retval |= nibble;
+		fieldlength--;
+		if (fieldlength)
+			retval = retval << 4;
+	}
+	return retval;
+}
+#endif
+static char *
+pack_hex_byte(char *pkt, int byte)
+{
+	*pkt++ = hexchars[(byte >> 4) & 0xf];
+	*pkt++ = hexchars[(byte & 0xf)];
+	return pkt;
+}
+
+#define BUF_THREAD_ID_SIZE 16
+
+static char *
+pack_threadid(char *pkt, threadref * id)
+{
+	char *limit;
+	unsigned char *altid;
+
+	altid = (unsigned char *) id;
+	limit = pkt + BUF_THREAD_ID_SIZE;
+	while (pkt < limit)
+		pkt = pack_hex_byte(pkt, *altid++);
+	return pkt;
+}
+
+#ifdef old_thread_list
+static char *
+unpack_byte(char *buf, int *value)
+{
+	*value = stub_unpack_int(buf, 2);
+	return buf + 2;
+}
+
+static char *
+unpack_threadid(char *inbuf, threadref * id)
+{
+	char *altref;
+	char *limit = inbuf + BUF_THREAD_ID_SIZE;
+	int x, y;
+
+	altref = (char *) id;
+
+	while (inbuf < limit) {
+		x = stubhex(*inbuf++);
+		y = stubhex(*inbuf++);
+		*altref++ = (x << 4) | y;
+	}
+	return inbuf;
+}
+#endif
+void
+int_to_threadref(threadref * id, int value)
+{
+	unsigned char *scan;
+
+	scan = (unsigned char *) id;
+	{
+		int i = 4;
+		while (i--)
+			*scan++ = 0;
+	}
+	*scan++ = (value >> 24) & 0xff;
+	*scan++ = (value >> 16) & 0xff;
+	*scan++ = (value >> 8) & 0xff;
+	*scan++ = (value & 0xff);
+}
+int
+int_to_hex_v(unsigned char * id, int value)
+{
+	unsigned char *start = id;
+	int shift;
+	int ch;
+
+	for (shift = 28; shift >= 0; shift -= 4) {
+		if ((ch = (value >> shift) & 0xf) || (id != start)) {
+			*id = hexchars[ch];
+			id++;
+		}
+	}
+	if (id == start)
+		*id++ = '0';
+	return id - start;
+}
+#ifdef old_thread_list
+
+static int
+threadref_to_int(threadref * ref)
+{
+	int i, value = 0;
+	unsigned char *scan;
+
+	scan = (char *) ref;
+	scan += 4;
+	i = 4;
+	while (i-- > 0)
+		value = (value << 8) | ((*scan++) & 0xff);
+	return value;
+}
+#endif
+static int
+cmp_str(char *s1, char *s2, int count)
+{
+	while (count--) {
+		if (*s1++ != *s2++)
+			return 0;
+	}
+	return 1;
+}
+
+#if 1				/* this is a hold over from 2.4 where O(1) was "sometimes" */
+extern struct task_struct *kgdb_get_idle(int cpu);
+#define idle_task(cpu) kgdb_get_idle(cpu)
+#else
+#define idle_task(cpu) init_tasks[cpu]
+#endif
+
+extern int kgdb_pid_init_done;
+
+struct task_struct *
+getthread(int pid)
+{
+	struct task_struct *thread;
+	if (pid >= PID_MAX && pid <= (PID_MAX + MAX_NO_CPUS)) {
+		if (!cpu_online(pid - PID_MAX))
+			return NULL;
+
+		return idle_task(pid - PID_MAX);
+	} else {
+		/*
+		 * find_task_by_pid is relatively safe all the time
+		 * Other pid functions require lock downs which imply
+		 * that we may be interrupting them (as we get here
+		 * in the middle of most any lock down).
+		 * Still we don't want to call until the table exists!
+		 */
+		if (kgdb_pid_init_done){
+			thread = find_task_by_pid(pid);
+			if (thread) {
+				return thread;
+			}
+		}
+	}
+	return NULL;
+}
+/* *INDENT-OFF*	 */
+struct hw_breakpoint {
+	unsigned enabled;
+	unsigned type;
+	unsigned len;
+	unsigned long addr;
+} breakinfo[4] = { {enabled:0},
+		   {enabled:0},
+		   {enabled:0},
+		   {enabled:0}};
+/* *INDENT-ON*	*/
+unsigned long hw_breakpoint_status;
+void
+correct_hw_break(void)
+{
+	int breakno;
+	int correctit;
+	int breakbit;
+	unsigned long dr7;
+
+	asm volatile ("movq %%db7, %0\n":"=r" (dr7)
+		      :);
+	/* *INDENT-OFF*	 */
+	do {
+		unsigned long addr0, addr1, addr2, addr3;
+		asm volatile ("movq %%db0, %0\n"
+			      "movq %%db1, %1\n"
+			      "movq %%db2, %2\n"
+			      "movq %%db3, %3\n"
+			      :"=r" (addr0), "=r"(addr1),
+			      "=r"(addr2), "=r"(addr3)
+			      :);
+	} while (0);
+	/* *INDENT-ON*	*/
+	correctit = 0;
+	for (breakno = 0; breakno < 3; breakno++) {
+		breakbit = 2 << (breakno << 1);
+		if (!(dr7 & breakbit) && breakinfo[breakno].enabled) {
+			correctit = 1;
+			dr7 |= breakbit;
+			dr7 &= ~(0xf0000 << (breakno << 2));
+			dr7 |= (((breakinfo[breakno].len << 2) |
+				 breakinfo[breakno].type) << 16) <<
+			    (breakno << 2);
+			switch (breakno) {
+			case 0:
+				asm volatile ("movq %0, %%dr0\n"::"r"
+					      (breakinfo[breakno].addr));
+				break;
+
+			case 1:
+				asm volatile ("movq %0, %%dr1\n"::"r"
+					      (breakinfo[breakno].addr));
+				break;
+
+			case 2:
+				asm volatile ("movq %0, %%dr2\n"::"r"
+					      (breakinfo[breakno].addr));
+				break;
+
+			case 3:
+				asm volatile ("movq %0, %%dr3\n"::"r"
+					      (breakinfo[breakno].addr));
+				break;
+			}
+		} else if ((dr7 & breakbit) && !breakinfo[breakno].enabled) {
+			correctit = 1;
+			dr7 &= ~breakbit;
+			dr7 &= ~(0xf0000 << (breakno << 2));
+		}
+	}
+	if (correctit) {
+		asm volatile ("movq %0, %%db7\n"::"r" (dr7));
+	}
+}
+
+int
+remove_hw_break(unsigned breakno)
+{
+	if (!breakinfo[breakno].enabled) {
+		return -1;
+	}
+	breakinfo[breakno].enabled = 0;
+	return 0;
+}
+
+int
+set_hw_break(unsigned breakno, unsigned type, unsigned len, unsigned addr)
+{
+	if (breakinfo[breakno].enabled) {
+		return -1;
+	}
+	breakinfo[breakno].enabled = 1;
+	breakinfo[breakno].type = type;
+	breakinfo[breakno].len = len;
+	breakinfo[breakno].addr = addr;
+	return 0;
+}
+
+#ifdef CONFIG_SMP
+static int in_kgdb_console = 0;
+
+int
+in_kgdb(struct pt_regs *regs)
+{
+	unsigned long flags;
+	int cpu;
+	if (!kgdb_enabled)
+		return 0;
+	cpu = smp_processor_id();
+	in_kgdb_called = 1;
+	if (!spin_is_locked(&kgdb_spinlock)) {
+		if (in_kgdb_here_log[cpu] ||	/* we are holding this cpu */
+		    in_kgdb_console) {	/* or we are doing slow i/o */
+			return 1;
+		}
+		return 0;
+	}
+
+	/* As I see it the only reason not to let all cpus spin on
+	 * the same spin_lock is to allow selected ones to proceed.
+	 * This would be a good thing, so we leave it this way.
+	 * Maybe someday....  Done !
+
+	 * in_kgdb() is called from an NMI so we don't pretend
+	 * to have any resources, like printk() for example.
+	 */
+
+	local_irq_save(flags);	/* only local here, to avoid hanging */
+	/*
+	 * log arival of this cpu
+	 * The NMI keeps on ticking.  Protect against recurring more
+	 * than once, and ignor the cpu that has the kgdb lock
+	 */
+	in_kgdb_entry_log[cpu]++;
+	in_kgdb_here_log[cpu] = regs;
+	if (cpu == spinlock_cpu || waiting_cpus[cpu].task)
+		goto exit_in_kgdb;
+
+	/*
+	 * For protection of the initilization of the spin locks by kgdb
+	 * it locks the kgdb spinlock before it gets the wait locks set
+	 * up.	We wait here for the wait lock to be taken.  If the
+	 * kgdb lock goes away first??	Well, it could be a slow exit
+	 * sequence where the wait lock is removed prior to the kgdb lock
+	 * so if kgdb gets unlocked, we just exit.
+	 */
+
+	while (spin_is_locked(&kgdb_spinlock) &&
+	       !spin_is_locked(waitlocks + cpu)) ;
+	if (!spin_is_locked(&kgdb_spinlock))
+		goto exit_in_kgdb;
+
+	waiting_cpus[cpu].task = current;
+	waiting_cpus[cpu].pid = (current->pid) ? : (PID_MAX + cpu);
+	waiting_cpus[cpu].regs = regs;
+
+	spin_unlock_wait(waitlocks + cpu);
+
+	/*
+	 * log departure of this cpu
+	 */
+	waiting_cpus[cpu].task = 0;
+	waiting_cpus[cpu].pid = 0;
+	waiting_cpus[cpu].regs = 0;
+	correct_hw_break();
+      exit_in_kgdb:
+	in_kgdb_here_log[cpu] = 0;
+	local_irq_restore(flags);
+	return 1;
+	/*
+	   spin_unlock(continuelocks + smp_processor_id());
+	 */
+}
+
+void
+smp__in_kgdb(struct pt_regs regs)
+{
+	ack_APIC_irq();
+	in_kgdb(&regs);
+}
+#else
+int
+in_kgdb(struct pt_regs *regs)
+{
+	return (kgdb_spinlock);
+}
+#endif
+
+void
+printexceptioninfo(int exceptionNo, int errorcode, char *buffer)
+{
+	unsigned long dr6;
+	int i;
+	switch (exceptionNo) {
+	case 1:		/* debug exception */
+		break;
+	case 3:		/* breakpoint */
+		sprintf(buffer, "Software breakpoint");
+		return;
+	default:
+		sprintf(buffer, "Details not available");
+		return;
+	}
+	asm volatile ("movq %%db6, %0\n":"=r" (dr6)
+		      :);
+	if (dr6 & 0x4000) {
+		sprintf(buffer, "Single step");
+		return;
+	}
+	for (i = 0; i < 4; ++i) {
+		if (dr6 & (1 << i)) {
+			sprintf(buffer, "Hardware breakpoint %d", i);
+			return;
+		}
+	}
+	sprintf(buffer, "Unknown trap");
+	return;
+}
+
+/*
+ * The ThreadExtraInfo query allows us to pass an arbitrary string
+ * for display with the "info threads" command.
+ */
+
+void
+print_extra_info(task_t *p, char *buf)
+{
+	if (!p) {
+		sprintf(buf, "Invalid thread");
+		return;
+	}
+	sprintf(buf, "0x%p %8d %4d  %c  %s",
+		   (void *)p,  p->parent->pid,
+		   task_cpu(p),
+		   (p->state == 0) ? (task_curr(p)?'R':'r') :
+		     (p->state < 0) ? 'U' :
+		     (p->state & TASK_UNINTERRUPTIBLE) ? 'D' :
+		     (p->state & TASK_STOPPED || p->ptrace & PT_PTRACED) ? 'T' :
+		     (p->state & (TASK_ZOMBIE | TASK_DEAD)) ? 'Z' :
+		     (p->state & TASK_INTERRUPTIBLE) ? 'S' : '?',
+		   p->comm);
+}
+
+/*
+ * This function does all command procesing for interfacing to gdb.
+ *
+ * NOTE:  The INT nn instruction leaves the state of the interrupt
+ *	  enable flag UNCHANGED.  That means that when this routine
+ *	  is entered via a breakpoint (INT 3) instruction from code
+ *	  that has interrupts enabled, then interrupts will STILL BE
+ *	  enabled when this routine is entered.	 The first thing that
+ *	  we do here is disable interrupts so as to prevent recursive
+ *	  entries and bothersome serial interrupts while we are
+ *	  trying to run the serial port in polled mode.
+ *
+ * For kernel version 2.1.xx the kgdb_cli() actually gets a spin lock so
+ * it is always necessary to do a restore_flags before returning
+ * so as to let go of that lock.
+ */
+int
+kgdb_handle_exception(int exceptionVector,
+		      int signo, int err_code, struct pt_regs *linux_regs)
+{
+	struct task_struct *usethread = NULL;
+	struct task_struct *thread_list_start = 0, *thread = NULL;
+	struct task_struct *p;
+	unsigned long addr, length;
+	unsigned long breakno, breaktype;
+	char *ptr;
+	unsigned long newPC;
+	threadref thref;
+	unsigned long threadid, tmpid;
+	int thread_min = PID_MAX + MAX_NO_CPUS;
+#ifdef old_thread_list
+	int maxthreads;
+#endif
+	int nothreads;
+	unsigned long flags;
+	unsigned long gdb_regs[NUMREGS];
+	unsigned long dr6;
+	IF_SMP(int entry_state = 0);	/* 0, ok, 1, no nmi, 2 sync failed */
+#define NO_NMI 1
+#define NO_SYNC 2
+#define	regs	(*linux_regs)
+	/*
+	 * If the entry is not from the kernel then return to the Linux
+	 * trap handler and let it process the interrupt normally.
+	 */
+	if ((linux_regs->eflags & VM_MASK) || (3 & linux_regs->cs)) {
+		printk("ignoring non-kernel exception\n");
+		print_regs(&regs);
+		return (0);
+	}
+	/*
+	 * If we're using eth mode, set the 'mode' in the netdevice.
+	 */
+
+	if (kgdboe)
+		netpoll_set_trap(1);
+
+	local_irq_save(flags);
+
+	/* Get kgdb spinlock */
+
+	KGDB_SPIN_LOCK(&kgdb_spinlock);
+	rdtscll(kgdb_info.entry_tsc);
+	/*
+	 * We depend on this spinlock and the NMI watch dog to control the
+	 * other cpus.	They will arrive at "in_kgdb()" as a result of the
+	 * NMI and will wait there for the following spin locks to be
+	 * released.
+	 */
+#ifdef CONFIG_SMP
+
+#if 0
+	if (cpu_callout_map & ~MAX_CPU_MASK) {
+		printk("kgdb : too many cpus, possibly not mapped"
+		       " in contiguous space, change MAX_NO_CPUS"
+		       " in kgdb_stub and make new kernel.\n"
+		       " cpu_callout_map is %lx\n", cpu_callout_map);
+		goto exit_just_unlock;
+	}
+#endif
+	if (spinlock_count == 1) {
+		int time, end_time, dum;
+		int i;
+		int cpu_logged_in[MAX_NO_CPUS] = {[0 ... MAX_NO_CPUS - 1] = (0)
+		};
+		if (remote_debug) {
+			printk("kgdb : cpu %d entry, syncing others\n",
+			       smp_processor_id());
+		}
+		for (i = 0; i < MAX_NO_CPUS; i++) {
+			/*
+			 * Use trylock as we may already hold the lock if
+			 * we are holding the cpu.  Net result is all
+			 * locked.
+			 */
+			spin_trylock(&waitlocks[i]);
+		}
+		for (i = 0; i < MAX_NO_CPUS; i++)
+			cpu_logged_in[i] = 0;
+		/*
+		 * Wait for their arrival.  We know the watch dog is active if
+		 * in_kgdb() has ever been called, as it is always called on a
+		 * watchdog tick.
+		 */
+		rdtsc(dum, time);
+		end_time = time + 2;	/* Note: we use the High order bits! */
+		i = 1;
+		if (num_online_cpus() > 1) {
+			int me_in_kgdb = in_kgdb_entry_log[smp_processor_id()];
+			smp_send_nmi_allbutself();
+
+			while (i < num_online_cpus() && time != end_time) {
+				int j;
+				for (j = 0; j < MAX_NO_CPUS; j++) {
+					if (waiting_cpus[j].task &&
+					    waiting_cpus[j].task != NOCPU &&
+					    !cpu_logged_in[j]) {
+						i++;
+						cpu_logged_in[j] = 1;
+						if (remote_debug) {
+							printk
+							    ("kgdb : cpu %d arrived at kgdb\n",
+							     j);
+						}
+						break;
+					} else if (!waiting_cpus[j].task &&
+						   !cpu_online(j)) {
+						waiting_cpus[j].task = NOCPU;
+						cpu_logged_in[j] = 1;
+						waiting_cpus[j].hold = 1;
+						break;
+					}
+					if (!waiting_cpus[j].task &&
+					    in_kgdb_here_log[j]) {
+
+						int wait = 100000;
+						while (wait--) ;
+						if (!waiting_cpus[j].task &&
+						    in_kgdb_here_log[j]) {
+							printk
+							    ("kgdb : cpu %d stall"
+							     " in in_kgdb\n",
+							     j);
+							i++;
+							cpu_logged_in[j] = 1;
+							waiting_cpus[j].task =
+							    (struct task_struct
+							     *) 1;
+						}
+					}
+				}
+
+				if (in_kgdb_entry_log[smp_processor_id()] >
+				    (me_in_kgdb + 10)) {
+					break;
+				}
+
+				rdtsc(dum, time);
+			}
+			if (i < num_online_cpus()) {
+				printk
+				    ("kgdb : time out, proceeding without sync\n");
+#if 0
+				printk("kgdb : Waiting_cpus: 0 = %d, 1 = %d\n",
+				       waiting_cpus[0].task != 0,
+				       waiting_cpus[1].task != 0);
+				printk("kgdb : Cpu_logged in: 0 = %d, 1 = %d\n",
+				       cpu_logged_in[0], cpu_logged_in[1]);
+				printk
+				    ("kgdb : in_kgdb_here_log in: 0 = %d, 1 = %d\n",
+				     in_kgdb_here_log[0] != 0,
+				     in_kgdb_here_log[1] != 0);
+#endif
+				entry_state = NO_SYNC;
+			} else {
+#if 0
+				int ent =
+				    in_kgdb_entry_log[smp_processor_id()] -
+				    me_in_kgdb;
+				printk("kgdb : sync after %d entries\n", ent);
+#endif
+			}
+		} else {
+			if (remote_debug) {
+				printk
+				    ("kgdb : %d cpus, but watchdog not active\n"
+				     "proceeding without locking down other cpus\n",
+				     (int)num_online_cpus());
+				entry_state = NO_NMI;
+			}
+		}
+	}
+#endif
+
+	if (remote_debug) {
+		unsigned long *lp = (unsigned long *) &linux_regs;
+
+		printk("handle_exception(exceptionVector=%d, "
+		       "signo=%d, err_code=%d, linux_regs=%p)\n",
+		       exceptionVector, signo, err_code, linux_regs);
+		if (debug_regs) {
+			print_regs(&regs);
+			printk("Stk: %8lx %8lx %8lx %8lx"
+			       "  %8lx %8lx %8lx %8lx\n",
+			       lp[0], lp[1], lp[2], lp[3],
+			       lp[4], lp[5], lp[6], lp[7]);
+			printk("     %8lx %8lx %8lx %8lx"
+			       "  %8lx %8lx %8lx %8lx\n",
+			       lp[8], lp[9], lp[10], lp[11],
+			       lp[12], lp[13], lp[14], lp[15]);
+			printk("     %8lx %8lx %8lx %8lx  "
+			       "%8lx %8lx %8lx %8lx\n",
+			       lp[16], lp[17], lp[18], lp[19],
+			       lp[20], lp[21], lp[22], lp[23]);
+			printk("     %8lx %8lx %8lx %8lx  "
+			       "%8lx %8lx %8lx %8lx\n",
+			       lp[24], lp[25], lp[26], lp[27],
+			       lp[28], lp[29], lp[30], lp[31]);
+		}
+	}
+
+	/* Disable hardware debugging while we are in kgdb */
+	/* Get the debug register status register */
+/*				       *INDENT-OFF*  */
+      __asm__("movq %0,%%db7"
+	      :	/* no output */
+	      :"r"(0UL));
+
+	asm volatile ("movq %%db6, %0\n"
+		      :"=r" (hw_breakpoint_status)
+		      :);
+
+#if 0
+/*				       *INDENT-ON*  */
+	switch (exceptionVector) {
+	case 0:		/* divide error */
+	case 1:		/* debug exception */
+	case 2:		/* NMI */
+	case 3:		/* breakpoint */
+	case 4:		/* overflow */
+	case 5:		/* bounds check */
+	case 6:		/* invalid opcode */
+	case 7:		/* device not available */
+	case 8:		/* double fault (errcode) */
+	case 10:		/* invalid TSS (errcode) */
+	case 12:		/* stack fault (errcode) */
+	case 16:		/* floating point error */
+	case 17:		/* alignment check (errcode) */
+	default:		/* any undocumented */
+		break;
+	case 11:		/* segment not present (errcode) */
+	case 13:		/* general protection (errcode) */
+	case 14:		/* page fault (special errcode) */
+	case 19:		/* cache flush denied */
+		if (mem_err_expected) {
+			/*
+			 * This fault occured because of the
+			 * get_char or set_char routines.  These
+			 * two routines use either eax of edx to
+			 * indirectly reference the location in
+			 * memory that they are working with.
+			 * For a page fault, when we return the
+			 * instruction will be retried, so we
+			 * have to make sure that these
+			 * registers point to valid memory.
+			 */
+			mem_err = 1;	/* set mem error flag */
+			mem_err_expected = 0;
+			mem_err_cnt++;	/* helps in debugging */
+			/* make valid address */
+			regs.eax = (long) &garbage_loc;
+			/* make valid address */
+			regs.edx = (long) &garbage_loc;
+			if (remote_debug)
+				printk("Return after memory error: "
+				       "mem_err_cnt=%d\n", mem_err_cnt);
+			if (debug_regs)
+				print_regs(&regs);
+			goto exit_kgdb;
+		}
+		break;
+	}
+#endif
+	if (remote_debug)
+		printk("kgdb : entered kgdb on cpu %d\n", smp_processor_id());
+
+	gdb_i386vector = exceptionVector;
+	gdb_i386errcode = err_code;
+	kgdb_info.called_from = __builtin_return_address(0);
+#ifdef CONFIG_SMP
+	/*
+	 * OK, we can now communicate, lets tell gdb about the sync.
+	 * but only if we had a problem.
+	 */
+	switch (entry_state) {
+	case NO_NMI:
+		to_gdb("NMI not active, other cpus not stopped\n");
+		break;
+	case NO_SYNC:
+		to_gdb("Some cpus not stopped, see 'kgdb_info' for details\n");
+	default:;
+	}
+
+#endif
+/*
+ * Set up the gdb function call area.
+ */
+	trap_cpu = smp_processor_id();
+	OLD_esp = NEW_esp = (unsigned long) (&linux_regs->rsp);
+
+      IF_SMP(once_again:)
+	    /* reply to host that an exception has occurred */
+	    remcomOutBuffer[0] = 'S';
+	remcomOutBuffer[1] = hexchars[signo >> 4];
+	remcomOutBuffer[2] = hexchars[signo % 16];
+	remcomOutBuffer[3] = 0;
+
+	putpacket(remcomOutBuffer);
+
+	while (1 == 1) {
+		error = 0;
+		remcomOutBuffer[0] = 0;
+		getpacket(remcomInBuffer);
+		switch (remcomInBuffer[0]) {
+		case '?':
+			remcomOutBuffer[0] = 'S';
+			remcomOutBuffer[1] = hexchars[signo >> 4];
+			remcomOutBuffer[2] = hexchars[signo % 16];
+			remcomOutBuffer[3] = 0;
+			break;
+		case 'd':
+			remote_debug = !(remote_debug);	/* toggle debug flag */
+			printk("Remote debug %s\n",
+			       remote_debug ? "on" : "off");
+			break;
+		case 'g':	/* return the value of the CPU registers */
+			get_gdb_regs(usethread, &regs, gdb_regs);
+			mem2hex((char *) gdb_regs,
+				remcomOutBuffer, NUMREGBYTES);
+			break;
+		case 'G':	/* set the value of the CPU registers - return OK */
+			hex2mem(&remcomInBuffer[1],
+				(char *) gdb_regs, NUMREGBYTES);
+			if (!usethread || usethread == current) {
+				gdb_regs_to_regs(gdb_regs, &regs);
+				strcpy(remcomOutBuffer, "OK");
+			} else {
+				strcpy(remcomOutBuffer, "E00");
+			}
+			break;
+
+		case 'P':{	/* set the value of a single CPU register -
+				   return OK */
+				/*
+				 * For some reason, gdb wants to talk about psudo
+				 * registers (greater than 15).
+				 */
+				unsigned long regno;
+
+				ptr = &remcomInBuffer[1];
+				regs_to_gdb_regs(gdb_regs, &regs);
+				if ((!usethread || usethread == current) &&
+				    hexToLong(&ptr, &regno) &&
+				    *ptr++ == '=' && (regno >= 0)) {
+					if (regno >= NUMREGS)
+						break;
+					hex2mem(ptr, (char *) &gdb_regs[regno],
+						8);
+					gdb_regs_to_regs(gdb_regs, &regs);
+					strcpy(remcomOutBuffer, "OK");
+					break;
+				}
+				strcpy(remcomOutBuffer, "E01");
+				break;
+			}
+
+			/* mAA..AA,LLLL	 Read LLLL bytes at address AA..AA */
+		case 'm':
+			/* TRY TO READ %x,%x.  IF SUCCEED, SET PTR = 0 */
+			ptr = &remcomInBuffer[1];
+			if (hexToLong(&ptr, &addr) &&
+			    (*(ptr++) == ',') && (hexToLong(&ptr, &length))) {
+				ptr = 0;
+				/*
+				 * hex doubles the byte count
+				 */
+				if (length > (BUFMAX / 2))
+					length = BUFMAX / 2;
+				if (mem2hex((char *) addr,
+					remcomOutBuffer, length)) {
+					strcpy(remcomOutBuffer, "E03");
+					debug_error("memory fault\n", NULL);
+				}
+			}
+
+			if (ptr) {
+				strcpy(remcomOutBuffer, "E01");
+				debug_error
+				    ("malformed read memory command: %s\n",
+				     remcomInBuffer);
+			}
+			break;
+
+			/* MAA..AA,LLLL:
+			   Write LLLL bytes at address AA.AA return OK */
+		case 'M':
+			/* TRY TO READ '%x,%x:'.  IF SUCCEED, SET PTR = 0 */
+			ptr = &remcomInBuffer[1];
+			if (hexToLong(&ptr, &addr) &&
+			    (*(ptr++) == ',') &&
+			    (hexToLong(&ptr, &length)) && (*(ptr++) == ':')) {
+				if (hex2mem(ptr, (char *) addr, length)) {
+					strcpy(remcomOutBuffer, "E03");
+					debug_error("memory fault\n", NULL);
+				} else {
+					strcpy(remcomOutBuffer, "OK");
+				}
+
+				ptr = 0;
+			}
+			if (ptr) {
+				strcpy(remcomOutBuffer, "E02");
+				debug_error
+				    ("malformed write memory command: %s\n",
+				     remcomInBuffer);
+			}
+			break;
+		case 'S':
+			remcomInBuffer[0] = 's';
+		case 'C':
+			/* Csig;AA..AA where ;AA..AA is optional
+			 * continue with signal
+			 * Since signals are meaning less to us, delete that
+			 * part and then fall into the 'c' code.
+			 */
+			ptr = &remcomInBuffer[1];
+			length = 2;
+			while (*ptr && *ptr != ';') {
+				length++;
+				ptr++;
+			}
+			if (*ptr) {
+				do {
+					ptr++;
+					*(ptr - length++) = *ptr;
+				} while (*ptr);
+			} else {
+				remcomInBuffer[1] = 0;
+			}
+
+			/* cAA..AA  Continue at address AA..AA(optional) */
+			/* sAA..AA  Step one instruction from AA..AA(optional) */
+			/* D	    detach, reply OK and then continue */
+		case 'c':
+		case 's':
+		case 'D':
+
+			/* try to read optional parameter,
+			   pc unchanged if no parm */
+			ptr = &remcomInBuffer[1];
+			if (hexToLong(&ptr, &addr)) {
+				if (remote_debug)
+					printk("Changing EIP to 0x%lx\n", addr);
+
+				regs.rip = addr;
+			}
+
+			newPC = regs.rip;
+
+			/* clear the trace bit */
+			regs.eflags &= 0xfffffeff;
+
+			/* set the trace bit if we're stepping */
+			if (remcomInBuffer[0] == 's')
+				regs.eflags |= 0x100;
+
+			/* detach is a friendly version of continue. Note that
+			   debugging is still enabled (e.g hit control C)
+			 */
+			if (remcomInBuffer[0] == 'D') {
+				strcpy(remcomOutBuffer, "OK");
+				putpacket(remcomOutBuffer);
+			}
+
+			if (remote_debug) {
+				printk("Resuming execution\n");
+				print_regs(&regs);
+			}
+			asm volatile ("movq %%db6, %0\n":"=r" (dr6)
+				      :);
+			if (!(dr6 & 0x4000)) {
+				for (breakno = 0; breakno < 4; ++breakno) {
+					if (dr6 & (1 << breakno) &&
+					    (breakinfo[breakno].type == 0)) {
+						/* Set restore flag */
+						regs.eflags |= 0x10000;
+						break;
+					}
+				}
+			}
+
+			if (kgdboe)
+				netpoll_set_trap(0);
+
+			correct_hw_break();
+			asm volatile ("movq %0, %%db6\n"::"r" (0UL));
+			goto exit_kgdb;
+
+			/* kill the program */
+		case 'k':	/* do nothing */
+			break;
+
+			/* query */
+		case 'q':
+			nothreads = 0;
+			switch (remcomInBuffer[1]) {
+			case 'f':
+				threadid = 1;
+				thread_list = 2;
+				thread_list_start = (usethread ? : current);
+			case 's':
+				if (!cmp_str(&remcomInBuffer[2],
+					     "ThreadInfo", 10))
+					break;
+
+				remcomOutBuffer[nothreads++] = 'm';
+				for (; threadid < PID_MAX + MAX_NO_CPUS;
+				     threadid++) {
+					thread = getthread(threadid);
+					if (thread) {
+						nothreads += int_to_hex_v(
+							&remcomOutBuffer[
+								nothreads],
+							threadid);
+						if (thread_min > threadid)
+							thread_min = threadid;
+						remcomOutBuffer[
+							nothreads] = ',';
+						nothreads++;
+						if (nothreads > BUFMAX - 10)
+							break;
+					}
+				}
+				if (remcomOutBuffer[nothreads - 1] == 'm') {
+					remcomOutBuffer[nothreads - 1] = 'l';
+				} else {
+					nothreads--;
+				}
+				remcomOutBuffer[nothreads] = 0;
+				break;
+
+#ifdef old_thread_list /* Old thread info request */
+			case 'L':
+				/* List threads */
+				thread_list = 2;
+				thread_list_start = (usethread ? : current);
+				unpack_byte(remcomInBuffer + 3, &maxthreads);
+				unpack_threadid(remcomInBuffer + 5, &thref);
+				do {
+					int buf_thread_limit =
+					    (BUFMAX - 22) / BUF_THREAD_ID_SIZE;
+					if (maxthreads > buf_thread_limit) {
+						maxthreads = buf_thread_limit;
+					}
+				} while (0);
+				remcomOutBuffer[0] = 'q';
+				remcomOutBuffer[1] = 'M';
+				remcomOutBuffer[4] = '0';
+				pack_threadid(remcomOutBuffer + 5, &thref);
+
+				/* If start flag set start at 0. */
+				if (remcomInBuffer[2] == '1')
+					threadid = 0;
+				else
+					threadid = threadref_to_int(&thref);
+				for (nothreads = 0;
+				     nothreads < maxthreads &&
+				     threadid < PID_MAX + MAX_NO_CPUS;
+				     threadid++) {
+					thread = getthread(threadid);
+					if (thread) {
+						int_to_threadref(&thref,
+								 threadid);
+						pack_threadid(remcomOutBuffer +
+							      21 +
+							      nothreads * 16,
+							      &thref);
+						nothreads++;
+						if (thread_min > threadid)
+							thread_min = threadid;
+					}
+				}
+
+				if (threadid == PID_MAX + MAX_NO_CPUS) {
+					remcomOutBuffer[4] = '1';
+				}
+				pack_hex_byte(remcomOutBuffer + 2, nothreads);
+				remcomOutBuffer[21 + nothreads * 16] = '\0';
+				break;
+#endif
+			case 'C':
+				/* Current thread id */
+				remcomOutBuffer[0] = 'Q';
+				remcomOutBuffer[1] = 'C';
+				threadid = current->pid;
+				if (!threadid) {
+					/*
+					 * idle thread
+					 */
+					for (threadid = PID_MAX;
+					     threadid < PID_MAX + MAX_NO_CPUS;
+					     threadid++) {
+						if (current ==
+						    idle_task(threadid -
+							      PID_MAX))
+							break;
+					}
+				}
+				int_to_threadref(&thref, threadid);
+				pack_threadid(remcomOutBuffer + 2, &thref);
+				remcomOutBuffer[18] = '\0';
+				break;
+
+			case 'E':
+				/* Print exception info */
+				printexceptioninfo(exceptionVector,
+						   err_code, remcomOutBuffer);
+				break;
+			case 'T':
+				ptr = &remcomInBuffer[0];
+				if (strncmp(ptr, "qThreadExtraInfo,",
+					strlen("qThreadExtraInfo,")) == 0) {
+					ptr += strlen("qThreadExtraInfo,");
+					hexToLong(&ptr, &tmpid);
+					p = getthread(tmpid);
+					print_extra_info(p, lbuf);
+					mem2hex(lbuf, remcomOutBuffer,
+						strlen(lbuf));
+				}
+				break;
+#if 0
+			case 'T':{
+				char * nptr;
+				/* Thread extra info */
+				if (!cmp_str(&remcomInBuffer[2],
+					    "hreadExtraInfo,", 15)) {
+					break;
+				}
+				ptr = &remcomInBuffer[17];
+				hexToLong(&ptr, &threadid);
+				thread = getthread(threadid);
+				nptr = &thread->comm[0];
+				length = 0;
+				ptr = &remcomOutBuffer[0];
+				do {
+					length++;
+					ptr = pack_hex_byte(ptr, *nptr++);
+				 } while (*nptr && length < 16);
+				/*
+				 * would like that 16 to be the size of
+				 * task_struct.comm but don't know the
+				 * syntax..
+				 */
+				*ptr = 0;
+			}
+#endif
+			}
+			break;
+
+			/* task related */
+		case 'H':
+			switch (remcomInBuffer[1]) {
+			case 'g':
+				ptr = &remcomInBuffer[2];
+				hexToLong(&ptr, &threadid);
+				thread = getthread(threadid);
+				if (!thread) {
+					remcomOutBuffer[0] = 'E';
+					remcomOutBuffer[1] = '\0';
+					break;
+				}
+				/*
+				 * Just in case I forget what this is all about,
+				 * the "thread info" command to gdb causes it
+				 * to ask for a thread list.  It then switches
+				 * to each thread and asks for the registers.
+				 * For this (and only this) usage, we want to
+				 * fudge the registers of tasks not on the run
+				 * list (i.e. waiting) to show the routine that
+				 * called schedule. Also, gdb, is a minimalist
+				 * in that if the current thread is the last
+				 * it will not re-read the info when done.
+				 * This means that in this case we must show
+				 * the real registers. So here is how we do it:
+				 * Each entry we keep track of the min
+				 * thread in the list (the last that gdb will)
+				 * get info for.  We also keep track of the
+				 * starting thread.
+				 * "thread_list" is cleared when switching back
+				 * to the min thread if it is was current, or
+				 * if it was not current, thread_list is set
+				 * to 1.  When the switch to current comes,
+				 * if thread_list is 1, clear it, else do
+				 * nothing.
+				 */
+				usethread = thread;
+				if ((thread_list == 1) &&
+				    (thread == thread_list_start)) {
+					thread_list = 0;
+				}
+				if (thread_list && (threadid == thread_min)) {
+					if (thread == thread_list_start) {
+						thread_list = 0;
+					} else {
+						thread_list = 1;
+					}
+				}
+				/* follow through */
+			case 'c':
+				remcomOutBuffer[0] = 'O';
+				remcomOutBuffer[1] = 'K';
+				remcomOutBuffer[2] = '\0';
+				break;
+			}
+			break;
+
+			/* Query thread status */
+		case 'T':
+			ptr = &remcomInBuffer[1];
+			hexToLong(&ptr, &threadid);
+			thread = getthread(threadid);
+			if (thread) {
+				remcomOutBuffer[0] = 'O';
+				remcomOutBuffer[1] = 'K';
+				remcomOutBuffer[2] = '\0';
+				if (thread_min > threadid)
+					thread_min = threadid;
+			} else {
+				remcomOutBuffer[0] = 'E';
+				remcomOutBuffer[1] = '\0';
+			}
+			break;
+
+		case 'Y': /* set up a hardware breakpoint */
+			ptr = &remcomInBuffer[1];
+			hexToLong(&ptr, &breakno);
+			ptr++;
+			hexToLong(&ptr, &breaktype);
+			ptr++;
+			hexToLong(&ptr, &length);
+			ptr++;
+			hexToLong(&ptr, &addr);
+			if (set_hw_break(breakno & 0x3,
+					 breaktype & 0x3,
+					 length & 0x3, addr) == 0) {
+				strcpy(remcomOutBuffer, "OK");
+			} else {
+				strcpy(remcomOutBuffer, "ERROR");
+			}
+			break;
+
+			/* Remove hardware breakpoint */
+		case 'y':
+			ptr = &remcomInBuffer[1];
+			hexToLong(&ptr, &breakno);
+			if (remove_hw_break(breakno & 0x3) == 0) {
+				strcpy(remcomOutBuffer, "OK");
+			} else {
+				strcpy(remcomOutBuffer, "ERROR");
+			}
+			break;
+
+		case 'r':	/* reboot */
+			strcpy(remcomOutBuffer, "OK");
+			putpacket(remcomOutBuffer);
+			/*to_gdb("Rebooting\n"); */
+			/* triplefault	 no return from here */
+			{
+				static long no_idt[2];
+				__asm__ __volatile__("lidt %0"::"m"(no_idt[0]));
+				BREAKPOINT;
+			}
+
+		}		/* switch */
+
+		/* reply to the request */
+		putpacket(remcomOutBuffer);
+	}			/* while(1==1) */
+	/*
+	 *  reached by goto only.
+	 */
+      exit_kgdb:
+	/*
+	 * Here is where we set up to trap a gdb function call.	 NEW_esp
+	 * will be changed if we are trying to do this.	 We handle both
+	 * adding and subtracting, thus allowing gdb to put grung on
+	 * the stack which it removes later.
+	 */
+	if (NEW_esp != OLD_esp) {
+		unsigned long *ptr = END_OF_LOOKASIDE;
+		if (NEW_esp < OLD_esp)
+			ptr -= (OLD_esp - NEW_esp) / sizeof (unsigned long);
+		*--ptr = linux_regs->eflags;
+		*--ptr = linux_regs->cs;
+		*--ptr = linux_regs->rip;
+		*--ptr = linux_regs->rcx;
+		*--ptr = linux_regs->rbx;
+		*--ptr = linux_regs->rax;
+		linux_regs->rcx = NEW_esp - (sizeof (unsigned long) * 6);
+		linux_regs->rbx = (unsigned long) END_OF_LOOKASIDE;
+		if (NEW_esp < OLD_esp) {
+			linux_regs->rip = (unsigned long) fn_call_stub;
+		} else {
+			linux_regs->rip = (unsigned long) fn_rtn_stub;
+			linux_regs->rax = NEW_esp;
+		}
+		linux_regs->eflags &= ~(IF_BIT | TF_BIT);
+	}
+#ifdef CONFIG_SMP
+	/*
+	 * Release gdb wait locks
+	 * Sanity check time.  Must have at least one cpu to run.  Also single
+	 * step must not be done if the current cpu is on hold.
+	 */
+	if (spinlock_count == 1) {
+		int ss_hold = (regs.eflags & 0x100) && kgdb_info.hold_on_sstep;
+		int cpu_avail = 0;
+		int i;
+
+		for (i = 0; i < MAX_NO_CPUS; i++) {
+			if (!cpu_online(i))
+				break;
+			if (!hold_cpu(i)) {
+				cpu_avail = 1;
+			}
+		}
+		/*
+		 * Early in the bring up there will be NO cpus on line...
+		 */
+		if (!cpu_avail && !cpus_empty(cpu_online_map)) {
+			to_gdb("No cpus unblocked, see 'kgdb_info.hold_cpu'\n");
+			goto once_again;
+		}
+		if (hold_cpu(smp_processor_id()) && (regs.eflags & 0x100)) {
+			to_gdb
+			    ("Current cpu must be unblocked to single step\n");
+			goto once_again;
+		}
+		if (!(ss_hold)) {
+			int i;
+			for (i = 0; i < MAX_NO_CPUS; i++) {
+				if (!hold_cpu(i)) {
+					spin_unlock(&waitlocks[i]);
+				}
+			}
+		} else {
+			spin_unlock(&waitlocks[smp_processor_id()]);
+		}
+		/* Release kgdb spinlock */
+		KGDB_SPIN_UNLOCK(&kgdb_spinlock);
+		/*
+		 * If this cpu is on hold, this is where we
+		 * do it.  Note, the NMI will pull us out of here,
+		 * but will return as the above lock is not held.
+		 * We will stay here till another cpu releases the lock for us.
+		 */
+		spin_unlock_wait(waitlocks + smp_processor_id());
+		local_irq_restore(flags);
+		return (1);
+	}
+#if 0
+exit_just_unlock:
+#endif
+#endif
+	/* Release kgdb spinlock */
+	KGDB_SPIN_UNLOCK(&kgdb_spinlock);
+	local_irq_restore(flags);
+	return (1);
+}
+
+#undef regs
+static int kgdb_notify(struct notifier_block *self, unsigned long cmd, void *ptr)
+{
+	struct die_args *d = ptr;
+
+	if (!kgdb_enabled || (cmd == DIE_DEBUG && user_mode(d->regs)))
+		return NOTIFY_DONE;
+	if (cmd == DIE_NMI_IPI) {
+		if (in_kgdb(d->regs))
+			return NOTIFY_BAD;
+	} else if (kgdb_handle_exception(d->trapnr, d->signr, d->err, d->regs))
+		return NOTIFY_BAD; /* skip */
+
+	return NOTIFY_DONE;
+}
+
+static struct notifier_block kgdb_notifier = {
+	.notifier_call = kgdb_notify,
+	.priority = 0,
+};
+
+void set_debug_traps(void)
+{
+	static int initialized = 0;
+
+	if (!initialized) {
+		initialized = 1;
+		notifier_chain_register(&die_chain, &kgdb_notifier);
+	}
+}
+
+/*
+ * Provide the command line "gdb" initial break
+ */
+int __init kgdb_initial_break(char * str)
+{
+	if (*str == '\0'){
+		breakpoint();
+		return 1;
+	}
+	return 0;
+}
+__setup("gdb",kgdb_initial_break);
+
+/* This function will generate a breakpoint exception.	It is used at the
+   beginning of a program to sync up with a debugger and can be used
+   otherwise as a quick means to stop program execution and "break" into
+   the debugger. */
+/* But really, just use the BREAKPOINT macro.  We will handle the int stuff
+ */
+
+void breakpoint(void)
+{
+
+	set_debug_traps();
+	kgdb_enabled = 1;
+#if 0
+	/*
+	 * These calls were not enough to allow breakpoint to be
+	 * called before trap_init().  I moved the argument parsing
+	 * after trap_init() and it seems to work.
+	 */
+	set_intr_usr_gate(3,&int3); /* disable ints on trap */
+	set_intr_gate(1,&debug);
+	set_intr_gate(14,&page_fault);
+#endif
+
+        BREAKPOINT;
+}
+
+#ifdef later
+/*
+ * possibly we should not go thru the traps.c code at all?  Someday.
+ */
+void
+do_kgdb_int3(struct pt_regs *regs, long error_code)
+{
+	kgdb_handle_exception(3, 5, error_code, regs);
+	return;
+}
+#endif
+#undef regs
+#ifdef CONFIG_TRAP_BAD_SYSCALL_EXITS
+asmlinkage void
+bad_sys_call_exit(int stuff)
+{
+	struct pt_regs *regs = (struct pt_regs *) &stuff;
+	printk("Sys call %d return with %x preempt_count\n",
+	       (int) regs->orig_eax, preempt_count());
+}
+#endif
+#ifdef CONFIG_STACK_OVERFLOW_TEST
+#include <asm/kgdb.h>
+asmlinkage void
+stack_overflow(void)
+{
+#ifdef BREAKPOINT
+	BREAKPOINT;
+#else
+	printk("Kernel stack overflow, looping forever\n");
+#endif
+	while (1) {
+	}
+}
+#endif
+
+#if defined(CONFIG_SMP) || defined(CONFIG_KGDB_CONSOLE)
+char gdbconbuf[BUFMAX];
+
+static void
+kgdb_gdb_message(const char *s, unsigned count)
+{
+	int i;
+	int wcount;
+	char *bufptr;
+	/*
+	 * This takes care of NMI while spining out chars to gdb
+	 */
+	IF_SMP(in_kgdb_console = 1);
+	gdbconbuf[0] = 'O';
+	bufptr = gdbconbuf + 1;
+	while (count > 0) {
+		if ((count << 1) > (BUFMAX - 2)) {
+			wcount = (BUFMAX - 2) >> 1;
+		} else {
+			wcount = count;
+		}
+		count -= wcount;
+		for (i = 0; i < wcount; i++) {
+			bufptr = pack_hex_byte(bufptr, s[i]);
+		}
+		*bufptr = '\0';
+		s += wcount;
+
+		putpacket(gdbconbuf);
+
+	}
+	IF_SMP(in_kgdb_console = 0);
+}
+#endif
+#ifdef CONFIG_SMP
+static void
+to_gdb(const char *s)
+{
+	int count = 0;
+	while (s[count] && (count++ < BUFMAX)) ;
+	kgdb_gdb_message(s, count);
+}
+#endif
+#ifdef CONFIG_KGDB_CONSOLE
+#include <linux/console.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <asm/semaphore.h>
+
+void
+kgdb_console_write(struct console *co, const char *s, unsigned count)
+{
+
+	if (gdb_i386vector == -1) {
+		/*
+		 * We have not yet talked to gdb.  What to do...
+		 * lets break, on continue we can do the write.
+		 * But first tell him whats up. Uh, well no can do,
+		 * as this IS the console.  Oh well...
+		 * We do need to wait or the messages will be lost.
+		 * Other option would be to tell the above code to
+		 * ignore this breakpoint and do an auto return,
+		 * but that might confuse gdb.	Also this happens
+		 * early enough in boot up that we don't have the traps
+		 * set up yet, so...
+		 */
+		breakpoint();
+	}
+	kgdb_gdb_message(s, count);
+}
+
+/*
+ * ------------------------------------------------------------
+ * Serial KGDB driver
+ * ------------------------------------------------------------
+ */
+
+static struct console kgdbcons = {
+	name:"kgdb",
+	write:kgdb_console_write,
+#ifdef CONFIG_KGDB_USER_CONSOLE
+	device:kgdb_console_device,
+#endif
+	flags:CON_PRINTBUFFER | CON_ENABLED,
+	index:-1,
+};
+
+/*
+ * The trick here is that this file gets linked before printk.o
+ * That means we get to peer at the console info in the command
+ * line before it does.	 If we are up, we register, otherwise,
+ * do nothing.	By returning 0, we allow printk to look also.
+ */
+static int kgdb_console_enabled;
+
+int __init
+kgdb_console_init(char *str)
+{
+	if ((strncmp(str, "kgdb", 4) == 0) || (strncmp(str, "gdb", 3) == 0)) {
+		register_console(&kgdbcons);
+		kgdb_console_enabled = 1;
+	}
+	return 0;		/* let others look at the string */
+}
+
+__setup("console=", kgdb_console_init);
+
+#ifdef CONFIG_KGDB_USER_CONSOLE
+static kdev_t kgdb_console_device(struct console *c);
+/* This stuff sort of works, but it knocks out telnet devices
+ * we are leaving it here in case we (or you) find time to figure it out
+ * better..
+ */
+
+/*
+ * We need a real char device as well for when the console is opened for user
+ * space activities.
+ */
+
+static int
+kgdb_consdev_open(struct inode *inode, struct file *file)
+{
+	return 0;
+}
+
+static ssize_t
+kgdb_consdev_write(struct file *file, const char *buf,
+		   size_t count, loff_t * ppos)
+{
+	int size, ret = 0;
+	static char kbuf[128];
+	static DECLARE_MUTEX(sem);
+
+	/* We are not reentrant... */
+	if (down_interruptible(&sem))
+		return -ERESTARTSYS;
+
+	while (count > 0) {
+		/* need to copy the data from user space */
+		size = count;
+		if (size > sizeof (kbuf))
+			size = sizeof (kbuf);
+		if (copy_from_user(kbuf, buf, size)) {
+			ret = -EFAULT;
+			break;;
+		}
+		kgdb_console_write(&kgdbcons, kbuf, size);
+		count -= size;
+		ret += size;
+		buf += size;
+	}
+
+	up(&sem);
+
+	return ret;
+}
+
+struct file_operations kgdb_consdev_fops = {
+	open:kgdb_consdev_open,
+	write:kgdb_consdev_write
+};
+static kdev_t
+kgdb_console_device(struct console *c)
+{
+	return MKDEV(TTYAUX_MAJOR, 1);
+}
+
+/*
+ * This routine gets called from the serial stub in the i386/lib
+ * This is so it is done late in bring up (just before the console open).
+ */
+void
+kgdb_console_finit(void)
+{
+	if (kgdb_console_enabled) {
+		char *cptr = cdevname(MKDEV(TTYAUX_MAJOR, 1));
+		char *cp = cptr;
+		while (*cptr && *cptr != '(')
+			cptr++;
+		*cptr = 0;
+		unregister_chrdev(TTYAUX_MAJOR, cp);
+		register_chrdev(TTYAUX_MAJOR, "kgdb", &kgdb_consdev_fops);
+	}
+}
+#endif
+#endif
+#ifdef CONFIG_KGDB_TS
+#include <asm/msr.h>		/* time stamp code */
+#include <asm/hardirq.h>	/* in_interrupt */
+#ifdef CONFIG_KGDB_TS_64
+#define DATA_POINTS 64
+#endif
+#ifdef CONFIG_KGDB_TS_128
+#define DATA_POINTS 128
+#endif
+#ifdef CONFIG_KGDB_TS_256
+#define DATA_POINTS 256
+#endif
+#ifdef CONFIG_KGDB_TS_512
+#define DATA_POINTS 512
+#endif
+#ifdef CONFIG_KGDB_TS_1024
+#define DATA_POINTS 1024
+#endif
+#ifndef DATA_POINTS
+#define DATA_POINTS 128		/* must be a power of two */
+#endif
+#define INDEX_MASK (DATA_POINTS - 1)
+#if (INDEX_MASK & DATA_POINTS)
+#error "CONFIG_KGDB_TS_COUNT must be a power of 2"
+#endif
+struct kgdb_and_then_struct {
+#ifdef CONFIG_SMP
+	int on_cpu;
+#endif
+	struct task_struct *task;
+	long long at_time;
+	int from_ln;
+	char *in_src;
+	void *from;
+	int *with_shpf;
+	int data0;
+	int data1;
+};
+struct kgdb_and_then_struct2 {
+#ifdef CONFIG_SMP
+	int on_cpu;
+#endif
+	struct task_struct *task;
+	long long at_time;
+	int from_ln;
+	char *in_src;
+	void *from;
+	int *with_shpf;
+	struct task_struct *t1;
+	struct task_struct *t2;
+};
+struct kgdb_and_then_struct kgdb_data[DATA_POINTS];
+
+struct kgdb_and_then_struct *kgdb_and_then = &kgdb_data[0];
+int kgdb_and_then_count;
+
+void
+kgdb_tstamp(int line, char *source, int data0, int data1)
+{
+	static spinlock_t ts_spin = SPIN_LOCK_UNLOCKED;
+	unsigned long flags;
+
+	local_irq_save(flags);
+	spin_lock(&ts_spin);
+	rdtscll(kgdb_and_then->at_time);
+#ifdef CONFIG_SMP
+	kgdb_and_then->on_cpu = smp_processor_id();
+#endif
+	kgdb_and_then->task = current;
+	kgdb_and_then->from_ln = line;
+	kgdb_and_then->in_src = source;
+	kgdb_and_then->from = __builtin_return_address(0);
+	kgdb_and_then->with_shpf = (int *)(long)(((flags & IF_BIT) >> 9) |
+					    (preempt_count() << 8));
+	kgdb_and_then->data0 = data0;
+	kgdb_and_then->data1 = data1;
+	kgdb_and_then = &kgdb_data[++kgdb_and_then_count & INDEX_MASK];
+	spin_unlock(&ts_spin);
+	local_irq_restore(flags);
+#ifdef CONFIG_PREEMPT
+
+#endif
+	return;
+}
+#endif
+typedef int gdb_debug_hook(int exceptionVector,
+			   int signo, int err_code, struct pt_regs *linux_regs);
+gdb_debug_hook *linux_debug_hook = &kgdb_handle_exception;	/* histerical reasons... */
+
+static int kgdb_need_breakpoint[NR_CPUS];
+
+void kgdb_schedule_breakpoint(void)
+{
+	kgdb_need_breakpoint[smp_processor_id()] = 1;
+}
+
+void kgdb_process_breakpoint(void)
+{
+	/*
+	 * Handle a breakpoint queued from inside network driver code
+         * to avoid reentrancy issues
+	 */
+	if (kgdb_need_breakpoint[smp_processor_id()]) {
+		kgdb_need_breakpoint[smp_processor_id()] = 0;
+		kgdb_enabled = 1;
+		BREAKPOINT;
+	}
+}
+
--- diff/arch/x86_64/lib/kgdb_serial.c	1970-01-01 01:00:00.000000000 +0100
+++ source/arch/x86_64/lib/kgdb_serial.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,490 @@
+/*
+ * Serial interface GDB stub
+ *
+ * Written (hacked together) by David Grothe (dave@gcom.com)
+ * Modified to allow invokation early in boot see also
+ * kgdb.h for instructions by George Anzinger(george@mvista.com)
+ * Modified to handle debugging over ethernet by Robert Walsh
+ * <rjwalsh@durables.org> and wangdi <wangdi@clusterfs.com>, based on
+ * code by San Mehat.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/timer.h>
+#include <linux/interrupt.h>
+#include <linux/tty.h>
+#include <linux/tty_flip.h>
+#include <linux/serial.h>
+#include <linux/serial_reg.h>
+#include <linux/config.h>
+#include <linux/major.h>
+#include <linux/string.h>
+#include <linux/fcntl.h>
+#include <linux/ptrace.h>
+#include <linux/ioport.h>
+#include <linux/mm.h>
+#include <linux/init.h>
+#include <linux/highmem.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/segment.h>
+#include <asm/bitops.h>
+#include <asm/system.h>
+#include <asm/kgdb_local.h>
+#ifdef CONFIG_KGDB_USER_CONSOLE
+extern void kgdb_console_finit(void);
+#endif
+#define PRNT_off
+#define TEST_EXISTANCE
+#ifdef PRNT
+#define dbprintk(s) printk s
+#else
+#define dbprintk(s)
+#endif
+#define TEST_INTERRUPT_off
+#ifdef TEST_INTERRUPT
+#define intprintk(s) printk s
+#else
+#define intprintk(s)
+#endif
+
+#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
+
+#define	GDB_BUF_SIZE	512	/* power of 2, please */
+
+static char gdb_buf[GDB_BUF_SIZE];
+static int gdb_buf_in_inx;
+static atomic_t gdb_buf_in_cnt;
+static int gdb_buf_out_inx;
+
+struct async_struct *gdb_async_info;
+static int gdb_async_irq;
+
+#define outb_px(a,b) outb_p(b,a)
+
+static void program_uart(struct async_struct *info);
+static void write_char(struct async_struct *info, int chr);
+/*
+ * Get a byte from the hardware data buffer and return it
+ */
+static int
+read_data_bfr(struct async_struct *info)
+{
+	char it = inb_p(info->port + UART_LSR);
+
+	if (it & UART_LSR_DR)
+		return (inb_p(info->port + UART_RX));
+	/*
+	 * If we have a framing error assume somebody messed with
+	 * our uart.  Reprogram it and send '-' both ways...
+	 */
+	if (it & 0xc) {
+		program_uart(info);
+		write_char(info, '-');
+		return ('-');
+	}
+	return (-1);
+
+}				/* read_data_bfr */
+
+/*
+ * Get a char if available, return -1 if nothing available.
+ * Empty the receive buffer first, then look at the interface hardware.
+
+ * Locking here is a bit of a problem.	We MUST not lock out communication
+ * if we are trying to talk to gdb about a kgdb entry.	ON the other hand
+ * we can loose chars in the console pass thru if we don't lock.  It is also
+ * possible that we could hold the lock or be waiting for it when kgdb
+ * NEEDS to talk.  Since kgdb locks down the world, it does not need locks.
+ * We do, of course have possible issues with interrupting a uart operation,
+ * but we will just depend on the uart status to help keep that straight.
+
+ */
+static spinlock_t uart_interrupt_lock = SPIN_LOCK_UNLOCKED;
+#ifdef CONFIG_SMP
+extern spinlock_t kgdb_spinlock;
+#endif
+
+static int
+read_char(struct async_struct *info)
+{
+	int chr;
+	unsigned long flags;
+	local_irq_save(flags);
+#ifdef CONFIG_SMP
+	if (!spin_is_locked(&kgdb_spinlock)) {
+		spin_lock(&uart_interrupt_lock);
+	}
+#endif
+	if (atomic_read(&gdb_buf_in_cnt) != 0) {	/* intr routine has q'd chars */
+		chr = gdb_buf[gdb_buf_out_inx++];
+		gdb_buf_out_inx &= (GDB_BUF_SIZE - 1);
+		atomic_dec(&gdb_buf_in_cnt);
+	} else {
+		chr = read_data_bfr(info);
+	}
+#ifdef CONFIG_SMP
+	if (!spin_is_locked(&kgdb_spinlock)) {
+		spin_unlock(&uart_interrupt_lock);
+	}
+#endif
+	local_irq_restore(flags);
+	return (chr);
+}
+
+/*
+ * Wait until the interface can accept a char, then write it.
+ */
+static void
+write_char(struct async_struct *info, int chr)
+{
+	while (!(inb_p(info->port + UART_LSR) & UART_LSR_THRE)) ;
+
+	outb_p(chr, info->port + UART_TX);
+
+}				/* write_char */
+
+/*
+ * Mostly we don't need a spinlock, but since the console goes
+ * thru here with interrutps on, well, we need to catch those
+ * chars.
+ */
+/*
+ * This is the receiver interrupt routine for the GDB stub.
+ * It will receive a limited number of characters of input
+ * from the gdb  host machine and save them up in a buffer.
+ *
+ * When the gdb stub routine tty_getDebugChar() is called it
+ * draws characters out of the buffer until it is empty and
+ * then reads directly from the serial port.
+ *
+ * We do not attempt to write chars from the interrupt routine
+ * since the stubs do all of that via tty_putDebugChar() which
+ * writes one byte after waiting for the interface to become
+ * ready.
+ *
+ * The debug stubs like to run with interrupts disabled since,
+ * after all, they run as a consequence of a breakpoint in
+ * the kernel.
+ *
+ * Perhaps someone who knows more about the tty driver than I
+ * care to learn can make this work for any low level serial
+ * driver.
+ */
+static irqreturn_t
+gdb_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	struct async_struct *info;
+	unsigned long flags;
+
+	info = gdb_async_info;
+	if (!info || !info->tty || irq != gdb_async_irq)
+		return IRQ_NONE;
+
+	local_irq_save(flags);
+	spin_lock(&uart_interrupt_lock);
+	do {
+		int chr = read_data_bfr(info);
+		intprintk(("Debug char on int: %x hex\n", chr));
+		if (chr < 0)
+			continue;
+
+		if (chr == 3) {	/* Ctrl-C means remote interrupt */
+			BREAKPOINT;
+			continue;
+		}
+
+		if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) {
+			/* buffer overflow tosses early char */
+			read_char(info);
+		}
+		gdb_buf[gdb_buf_in_inx++] = chr;
+		gdb_buf_in_inx &= (GDB_BUF_SIZE - 1);
+	} while (inb_p(info->port + UART_IIR) & UART_IIR_RDI);
+	spin_unlock(&uart_interrupt_lock);
+	local_irq_restore(flags);
+	return IRQ_HANDLED;
+}				/* gdb_interrupt */
+
+/*
+ * Just a NULL routine for testing.
+ */
+void
+gdb_null(void)
+{
+}				/* gdb_null */
+
+/* These structure are filled in with values defined in asm/kgdb_local.h
+ */
+static struct serial_state state = SB_STATE;
+static struct async_struct local_info = SB_INFO;
+static int ok_to_enable_ints = 0;
+static void kgdb_enable_ints_now(void);
+
+extern char *kgdb_version;
+/*
+ * Hook an IRQ for KGDB.
+ *
+ * This routine is called from tty_putDebugChar, below.
+ */
+static int ints_disabled = 1;
+int
+gdb_hook_interrupt(struct async_struct *info, int verb)
+{
+	struct serial_state *state = info->state;
+	unsigned long flags;
+	int port;
+#ifdef TEST_EXISTANCE
+	int scratch, scratch2;
+#endif
+
+	/* The above fails if memory managment is not set up yet.
+	 * Rather than fail the set up, just keep track of the fact
+	 * and pick up the interrupt thing later.
+	 */
+	gdb_async_info = info;
+	port = gdb_async_info->port;
+	gdb_async_irq = state->irq;
+	if (verb) {
+		printk("kgdb %s : port =%x, IRQ=%d, divisor =%d\n",
+		       kgdb_version,
+		       port,
+		       gdb_async_irq, gdb_async_info->state->custom_divisor);
+	}
+	local_irq_save(flags);
+#ifdef TEST_EXISTANCE
+	/* Existance test */
+	/* Should not need all this, but just in case.... */
+
+	scratch = inb_p(port + UART_IER);
+	outb_px(port + UART_IER, 0);
+	outb_px(0xff, 0x080);
+	scratch2 = inb_p(port + UART_IER);
+	outb_px(port + UART_IER, scratch);
+	if (scratch2) {
+		printk
+		    ("gdb_hook_interrupt: Could not clear IER, not a UART!\n");
+		local_irq_restore(flags);
+		return 1;	/* We failed; there's nothing here */
+	}
+	scratch2 = inb_p(port + UART_LCR);
+	outb_px(port + UART_LCR, 0xBF);	/* set up for StarTech test */
+	outb_px(port + UART_EFR, 0);	/* EFR is the same as FCR */
+	outb_px(port + UART_LCR, 0);
+	outb_px(port + UART_FCR, UART_FCR_ENABLE_FIFO);
+	scratch = inb_p(port + UART_IIR) >> 6;
+	if (scratch == 1) {
+		printk("gdb_hook_interrupt: Undefined UART type!"
+		       "  Not a UART! \n");
+		local_irq_restore(flags);
+		return 1;
+	} else {
+		dbprintk(("gdb_hook_interrupt: UART type "
+			  "is %d where 0=16450, 2=16550 3=16550A\n", scratch));
+	}
+	scratch = inb_p(port + UART_MCR);
+	outb_px(port + UART_MCR, UART_MCR_LOOP | scratch);
+	outb_px(port + UART_MCR, UART_MCR_LOOP | 0x0A);
+	scratch2 = inb_p(port + UART_MSR) & 0xF0;
+	outb_px(port + UART_MCR, scratch);
+	if (scratch2 != 0x90) {
+		printk("gdb_hook_interrupt: "
+		       "Loop back test failed! Not a UART!\n");
+		local_irq_restore(flags);
+		return scratch2 + 1000;	/* force 0 to fail */
+	}
+#endif				/* test existance */
+	program_uart(info);
+	local_irq_restore(flags);
+
+	return (0);
+
+}				/* gdb_hook_interrupt */
+
+static void
+program_uart(struct async_struct *info)
+{
+	int port = info->port;
+
+	(void) inb_p(port + UART_RX);
+	outb_px(port + UART_IER, 0);
+
+	(void) inb_p(port + UART_RX);	/* serial driver comments say */
+	(void) inb_p(port + UART_IIR);	/* this clears the interrupt regs */
+	(void) inb_p(port + UART_MSR);
+	outb_px(port + UART_LCR, UART_LCR_WLEN8 | UART_LCR_DLAB);
+	outb_px(port + UART_DLL, info->state->custom_divisor & 0xff);	/* LS */
+	outb_px(port + UART_DLM, info->state->custom_divisor >> 8);	/* MS  */
+	outb_px(port + UART_MCR, info->MCR);
+
+	outb_px(port + UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1 | UART_FCR_CLEAR_XMIT | UART_FCR_CLEAR_RCVR);	/* set fcr */
+	outb_px(port + UART_LCR, UART_LCR_WLEN8);	/* reset DLAB */
+	outb_px(port + UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1);	/* set fcr */
+	if (!ints_disabled) {
+		intprintk(("KGDB: Sending %d to port %x offset %d\n",
+			   gdb_async_info->IER,
+			   (int) gdb_async_info->port, UART_IER));
+		outb_px(gdb_async_info->port + UART_IER, gdb_async_info->IER);
+	}
+	return;
+}
+
+/*
+ * tty_getDebugChar
+ *
+ * This is a GDB stub routine.	It waits for a character from the
+ * serial interface and then returns it.  If there is no serial
+ * interface connection then it returns a bogus value which will
+ * almost certainly cause the system to hang.  In the
+ */
+int kgdb_in_isr = 0;
+int kgdb_in_lsr = 0;
+extern spinlock_t kgdb_spinlock;
+
+/* Caller takes needed protections */
+
+int
+tty_getDebugChar(void)
+{
+	volatile int chr, dum, time, end_time;
+
+	dbprintk(("tty_getDebugChar(port %x): ", gdb_async_info->port));
+
+	if (gdb_async_info == NULL) {
+		gdb_hook_interrupt(&local_info, 0);
+	}
+	/*
+	 * This trick says if we wait a very long time and get
+	 * no char, return the -1 and let the upper level deal
+	 * with it.
+	 */
+	rdtsc(dum, time);
+	end_time = time + 2;
+	while (((chr = read_char(gdb_async_info)) == -1) &&
+	       (end_time - time) > 0) {
+		rdtsc(dum, time);
+	};
+	/*
+	 * This covers our butts if some other code messes with
+	 * our uart, hay, it happens :o)
+	 */
+	if (chr == -1)
+		program_uart(gdb_async_info);
+
+	dbprintk(("%c\n", chr > ' ' && chr < 0x7F ? chr : ' '));
+	return (chr);
+
+}				/* tty_getDebugChar */
+
+static int count = 3;
+static spinlock_t one_at_atime = SPIN_LOCK_UNLOCKED;
+
+static int __init
+kgdb_enable_ints(void)
+{
+	set_debug_traps();
+	if (kgdboe) {
+		return 0;
+	}
+	if (gdb_async_info == NULL) {
+		gdb_hook_interrupt(&local_info, 1);
+	}
+	ok_to_enable_ints = 1;
+	kgdb_enable_ints_now();
+#ifdef CONFIG_KGDB_USER_CONSOLE
+	kgdb_console_finit();
+#endif
+	return 0;
+}
+
+#ifdef CONFIG_SERIAL_8250
+void shutdown_for_kgdb(struct async_struct *gdb_async_info);
+#endif
+
+#define kgdb_mem_init_done()    (1)
+
+static void
+kgdb_enable_ints_now(void)
+{
+	if (!spin_trylock(&one_at_atime))
+		return;
+	if (!ints_disabled)
+		goto exit;
+	if (kgdb_mem_init_done() &&
+			ints_disabled) {	/* don't try till mem init */
+#ifdef CONFIG_SERIAL_8250
+		/*
+		 * The ifdef here allows the system to be configured
+		 * without the serial driver.
+		 * Don't make it a module, however, it will steal the port
+		 */
+		shutdown_for_kgdb(gdb_async_info);
+#endif
+		ints_disabled = request_irq(gdb_async_info->state->irq,
+					    gdb_interrupt,
+					    IRQ_T(gdb_async_info),
+					    "KGDB-stub", NULL);
+		intprintk(("KGDB: request_irq returned %d\n", ints_disabled));
+	}
+	if (!ints_disabled) {
+		intprintk(("KGDB: Sending %d to port %x offset %d\n",
+			   gdb_async_info->IER,
+			   (int) gdb_async_info->port, UART_IER));
+		outb_px(gdb_async_info->port + UART_IER, gdb_async_info->IER);
+	}
+      exit:
+	spin_unlock(&one_at_atime);
+}
+
+/*
+ * tty_putDebugChar
+ *
+ * This is a GDB stub routine.	It waits until the interface is ready
+ * to transmit a char and then sends it.  If there is no serial
+ * interface connection then it simply returns to its caller, having
+ * pretended to send the char.	Caller takes needed protections.
+ */
+void
+tty_putDebugChar(int chr)
+{
+	dbprintk(("tty_putDebugChar(port %x): chr=%02x '%c', ints_on=%d\n",
+		  gdb_async_info->port,
+		  chr,
+		  chr > ' ' && chr < 0x7F ? chr : ' ', ints_disabled ? 0 : 1));
+
+	if (gdb_async_info == NULL) {
+		gdb_hook_interrupt(&local_info, 0);
+	}
+
+	write_char(gdb_async_info, chr);	/* this routine will wait */
+	count = (chr == '#') ? 0 : count + 1;
+	if ((count == 2)) {	/* try to enable after */
+		if (ints_disabled & ok_to_enable_ints)
+			kgdb_enable_ints_now();	/* try to enable after */
+
+		/* We do this a lot because, well we really want to get these
+		 * interrupts.	The serial driver will clear these bits when it
+		 * initializes the chip.  Every thing else it does is ok,
+		 * but this.
+		 */
+		if (!ints_disabled) {
+			outb_px(gdb_async_info->port + UART_IER,
+				gdb_async_info->IER);
+		}
+	}
+
+}				/* tty_putDebugChar */
+
+/*
+ * This does nothing for the serial port, since it doesn't buffer.
+ */
+
+void tty_flushDebugChar(void)
+{
+}
+
+module_init(kgdb_enable_ints);
--- diff/drivers/block/sx8.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/block/sx8.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,1763 @@
+/*
+ *  sx8.c: Driver for Promise SATA SX8 looks-like-I2O hardware
+ *
+ *  Copyright 2004 Red Hat, Inc.
+ *
+ *  Author/maintainer:  Jeff Garzik <jgarzik@pobox.com>
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file "COPYING" in the main directory of this archive
+ *  for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/blkdev.h>
+#include <linux/sched.h>
+#include <linux/devfs_fs_kernel.h>
+#include <linux/interrupt.h>
+#include <linux/compiler.h>
+#include <linux/workqueue.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
+#include <linux/time.h>
+#include <linux/hdreg.h>
+#include <asm/io.h>
+#include <asm/semaphore.h>
+#include <asm/uaccess.h>
+
+MODULE_AUTHOR("Jeff Garzik");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Promise SATA SX8 block driver");
+
+#if 0
+#define CARM_DEBUG
+#define CARM_VERBOSE_DEBUG
+#else
+#undef CARM_DEBUG
+#undef CARM_VERBOSE_DEBUG
+#endif
+#undef CARM_NDEBUG
+
+#define DRV_NAME "sx8"
+#define DRV_VERSION "0.8"
+#define PFX DRV_NAME ": "
+
+#define NEXT_RESP(idx)	((idx + 1) % RMSG_Q_LEN)
+
+/* 0xf is just arbitrary, non-zero noise; this is sorta like poisoning */
+#define TAG_ENCODE(tag)	(((tag) << 16) | 0xf)
+#define TAG_DECODE(tag)	(((tag) >> 16) & 0x1f)
+#define TAG_VALID(tag)	((((tag) & 0xf) == 0xf) && (TAG_DECODE(tag) < 32))
+
+/* note: prints function name for you */
+#ifdef CARM_DEBUG
+#define DPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
+#ifdef CARM_VERBOSE_DEBUG
+#define VPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
+#else
+#define VPRINTK(fmt, args...)
+#endif	/* CARM_VERBOSE_DEBUG */
+#else
+#define DPRINTK(fmt, args...)
+#define VPRINTK(fmt, args...)
+#endif	/* CARM_DEBUG */
+
+#ifdef CARM_NDEBUG
+#define assert(expr)
+#else
+#define assert(expr) \
+        if(unlikely(!(expr))) {                                   \
+        printk(KERN_ERR "Assertion failed! %s,%s,%s,line=%d\n", \
+        #expr,__FILE__,__FUNCTION__,__LINE__);          \
+        }
+#endif
+
+/* defines only for the constants which don't work well as enums */
+struct carm_host;
+
+enum {
+	/* adapter-wide limits */
+	CARM_MAX_PORTS		= 8,
+	CARM_SHM_SIZE		= (4096 << 7),
+	CARM_MINORS_PER_MAJOR	= 256 / CARM_MAX_PORTS,
+	CARM_MAX_WAIT_Q		= CARM_MAX_PORTS + 1,
+
+	/* command message queue limits */
+	CARM_MAX_REQ		= 64,	       /* max command msgs per host */
+	CARM_MAX_Q		= 1,		   /* one command at a time */
+	CARM_MSG_LOW_WATER	= (CARM_MAX_REQ / 4),	     /* refill mark */
+
+	/* S/G limits, host-wide and per-request */
+	CARM_MAX_REQ_SG		= 32,	     /* max s/g entries per request */
+	CARM_SG_BOUNDARY	= 0xffffUL,	    /* s/g segment boundary */
+	CARM_MAX_HOST_SG	= 600,		/* max s/g entries per host */
+	CARM_SG_LOW_WATER	= (CARM_MAX_HOST_SG / 4),   /* re-fill mark */
+
+	/* hardware registers */
+	CARM_IHQP		= 0x1c,
+	CARM_INT_STAT		= 0x10, /* interrupt status */
+	CARM_INT_MASK		= 0x14, /* interrupt mask */
+	CARM_HMUC		= 0x18, /* host message unit control */
+	RBUF_ADDR_LO		= 0x20, /* response msg DMA buf low 32 bits */
+	RBUF_ADDR_HI		= 0x24, /* response msg DMA buf high 32 bits */
+	RBUF_BYTE_SZ		= 0x28,
+	CARM_RESP_IDX		= 0x2c,
+	CARM_CMS0		= 0x30, /* command message size reg 0 */
+	CARM_LMUC		= 0x48,
+	CARM_HMPHA		= 0x6c,
+	CARM_INITC		= 0xb5,
+
+	/* bits in CARM_INT_{STAT,MASK} */
+	INT_RESERVED		= 0xfffffff0,
+	INT_WATCHDOG		= (1 << 3),	/* watchdog timer */
+	INT_Q_OVERFLOW		= (1 << 2),	/* cmd msg q overflow */
+	INT_Q_AVAILABLE		= (1 << 1),	/* cmd msg q has free space */
+	INT_RESPONSE		= (1 << 0),	/* response msg available */
+	INT_ACK_MASK		= INT_WATCHDOG | INT_Q_OVERFLOW,
+	INT_DEF_MASK		= INT_RESERVED | INT_Q_OVERFLOW |
+				  INT_RESPONSE,
+
+	/* command messages, and related register bits */
+	CARM_HAVE_RESP		= 0x01,
+	CARM_MSG_READ		= 1,
+	CARM_MSG_WRITE		= 2,
+	CARM_MSG_VERIFY		= 3,
+	CARM_MSG_GET_CAPACITY	= 4,
+	CARM_MSG_FLUSH		= 5,
+	CARM_MSG_IOCTL		= 6,
+	CARM_MSG_ARRAY		= 8,
+	CARM_MSG_MISC		= 9,
+	CARM_CME		= (1 << 2),
+	CARM_RME		= (1 << 1),
+	CARM_WZBC		= (1 << 0),
+	CARM_RMI		= (1 << 0),
+	CARM_Q_FULL		= (1 << 3),
+	CARM_MSG_SIZE		= 288,
+	CARM_Q_LEN		= 48,
+
+	/* CARM_MSG_IOCTL messages */
+	CARM_IOC_SCAN_CHAN	= 5,	/* scan channels for devices */
+	CARM_IOC_GET_TCQ	= 13,	/* get tcq/ncq depth */
+	CARM_IOC_SET_TCQ	= 14,	/* set tcq/ncq depth */
+
+	IOC_SCAN_CHAN_NODEV	= 0x1f,
+	IOC_SCAN_CHAN_OFFSET	= 0x40,
+
+	/* CARM_MSG_ARRAY messages */
+	CARM_ARRAY_INFO		= 0,
+
+	ARRAY_NO_EXIST		= (1 << 31),
+
+	/* response messages */
+	RMSG_SZ			= 8,	/* sizeof(struct carm_response) */
+	RMSG_Q_LEN		= 48,	/* resp. msg list length */
+	RMSG_OK			= 1,	/* bit indicating msg was successful */
+					/* length of entire resp. msg buffer */
+	RBUF_LEN		= RMSG_SZ * RMSG_Q_LEN,
+
+	PDC_SHM_SIZE		= (4096 << 7), /* length of entire h/w buffer */
+
+	/* CARM_MSG_MISC messages */
+	MISC_GET_FW_VER		= 2,
+	MISC_ALLOC_MEM		= 3,
+	MISC_SET_TIME		= 5,
+
+	/* MISC_GET_FW_VER feature bits */
+	FW_VER_4PORT		= (1 << 2), /* 1=4 ports, 0=8 ports */
+	FW_VER_NON_RAID		= (1 << 1), /* 1=non-RAID firmware, 0=RAID */
+	FW_VER_ZCR		= (1 << 0), /* zero channel RAID (whatever that is) */
+
+	/* carm_host flags */
+	FL_NON_RAID		= FW_VER_NON_RAID,
+	FL_4PORT		= FW_VER_4PORT,
+	FL_FW_VER_MASK		= (FW_VER_NON_RAID | FW_VER_4PORT),
+	FL_DAC			= (1 << 16),
+	FL_DYN_MAJOR		= (1 << 17),
+};
+
+enum scatter_gather_types {
+	SGT_32BIT		= 0,
+	SGT_64BIT		= 1,
+};
+
+enum host_states {
+	HST_INVALID,		/* invalid state; never used */
+	HST_ALLOC_BUF,		/* setting up master SHM area */
+	HST_ERROR,		/* we never leave here */
+	HST_PORT_SCAN,		/* start dev scan */
+	HST_DEV_SCAN_START,	/* start per-device probe */
+	HST_DEV_SCAN,		/* continue per-device probe */
+	HST_DEV_ACTIVATE,	/* activate devices we found */
+	HST_PROBE_FINISHED,	/* probe is complete */
+	HST_PROBE_START,	/* initiate probe */
+	HST_SYNC_TIME,		/* tell firmware what time it is */
+	HST_GET_FW_VER,		/* get firmware version, adapter port cnt */
+};
+
+#ifdef CARM_DEBUG
+static const char *state_name[] = {
+	"HST_INVALID",
+	"HST_ALLOC_BUF",
+	"HST_ERROR",
+	"HST_PORT_SCAN",
+	"HST_DEV_SCAN_START",
+	"HST_DEV_SCAN",
+	"HST_DEV_ACTIVATE",
+	"HST_PROBE_FINISHED",
+	"HST_PROBE_START",
+	"HST_SYNC_TIME",
+	"HST_GET_FW_VER",
+};
+#endif
+
+struct carm_port {
+	unsigned int			port_no;
+	unsigned int			n_queued;
+	struct gendisk			*disk;
+	struct carm_host		*host;
+
+	/* attached device characteristics */
+	u64				capacity;
+	char				name[41];
+	u16				dev_geom_head;
+	u16				dev_geom_sect;
+	u16				dev_geom_cyl;
+};
+
+struct carm_request {
+	unsigned int			tag;
+	int				n_elem;
+	unsigned int			msg_type;
+	unsigned int			msg_subtype;
+	unsigned int			msg_bucket;
+	struct request			*rq;
+	struct carm_port		*port;
+	struct scatterlist		sg[CARM_MAX_REQ_SG];
+};
+
+struct carm_host {
+	unsigned long			flags;
+	void				*mmio;
+	void				*shm;
+	dma_addr_t			shm_dma;
+
+	int				major;
+	int				id;
+	char				name[32];
+
+	spinlock_t			lock;
+	struct pci_dev			*pdev;
+	unsigned int			state;
+	u32				fw_ver;
+
+	request_queue_t			*oob_q;
+	unsigned int			n_oob;
+
+	unsigned int			hw_sg_used;
+
+	unsigned int			resp_idx;
+
+	unsigned int			wait_q_prod;
+	unsigned int			wait_q_cons;
+	request_queue_t			*wait_q[CARM_MAX_WAIT_Q];
+
+	unsigned int			n_msgs;
+	u64				msg_alloc;
+	struct carm_request		req[CARM_MAX_REQ];
+	void				*msg_base;
+	dma_addr_t			msg_dma;
+
+	int				cur_scan_dev;
+	unsigned long			dev_active;
+	unsigned long			dev_present;
+	struct carm_port		port[CARM_MAX_PORTS];
+
+	struct work_struct		fsm_task;
+
+	struct semaphore		probe_sem;
+};
+
+struct carm_response {
+	u32 ret_handle;
+	u32 status;
+}  __attribute__((packed));
+
+struct carm_msg_sg {
+	u32 start;
+	u32 len;
+}  __attribute__((packed));
+
+struct carm_msg_rw {
+	u8 type;
+	u8 id;
+	u8 sg_count;
+	u8 sg_type;
+	u32 handle;
+	u32 lba;
+	u16 lba_count;
+	u16 lba_high;
+	struct carm_msg_sg sg[32];
+}  __attribute__((packed));
+
+struct carm_msg_allocbuf {
+	u8 type;
+	u8 subtype;
+	u8 n_sg;
+	u8 sg_type;
+	u32 handle;
+	u32 addr;
+	u32 len;
+	u32 evt_pool;
+	u32 n_evt;
+	u32 rbuf_pool;
+	u32 n_rbuf;
+	u32 msg_pool;
+	u32 n_msg;
+	struct carm_msg_sg sg[8];
+}  __attribute__((packed));
+
+struct carm_msg_ioctl {
+	u8 type;
+	u8 subtype;
+	u8 array_id;
+	u8 reserved1;
+	u32 handle;
+	u32 data_addr;
+	u32 reserved2;
+}  __attribute__((packed));
+
+struct carm_msg_sync_time {
+	u8 type;
+	u8 subtype;
+	u16 reserved1;
+	u32 handle;
+	u32 reserved2;
+	u32 timestamp;
+}  __attribute__((packed));
+
+struct carm_msg_get_fw_ver {
+	u8 type;
+	u8 subtype;
+	u16 reserved1;
+	u32 handle;
+	u32 data_addr;
+	u32 reserved2;
+}  __attribute__((packed));
+
+struct carm_fw_ver {
+	u32 version;
+	u8 features;
+	u8 reserved1;
+	u16 reserved2;
+}  __attribute__((packed));
+
+struct carm_array_info {
+	u32 size;
+
+	u16 size_hi;
+	u16 stripe_size;
+
+	u32 mode;
+
+	u16 stripe_blk_sz;
+	u16 reserved1;
+
+	u16 cyl;
+	u16 head;
+
+	u16 sect;
+	u8 array_id;
+	u8 reserved2;
+
+	char name[40];
+
+	u32 array_status;
+
+	/* device list continues beyond this point? */
+}  __attribute__((packed));
+
+static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
+static void carm_remove_one (struct pci_dev *pdev);
+static int carm_bdev_ioctl(struct inode *ino, struct file *fil,
+			   unsigned int cmd, unsigned long arg);
+
+static struct pci_device_id carm_pci_tbl[] = {
+	{ PCI_VENDOR_ID_PROMISE, 0x8000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
+	{ PCI_VENDOR_ID_PROMISE, 0x8002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
+	{ }	/* terminate list */
+};
+MODULE_DEVICE_TABLE(pci, carm_pci_tbl);
+
+static struct pci_driver carm_driver = {
+	.name		= DRV_NAME,
+	.id_table	= carm_pci_tbl,
+	.probe		= carm_init_one,
+	.remove		= carm_remove_one,
+};
+
+static struct block_device_operations carm_bd_ops = {
+	.owner		= THIS_MODULE,
+	.ioctl		= carm_bdev_ioctl,
+};
+
+static unsigned int carm_host_id;
+static unsigned long carm_major_alloc;
+
+
+
+static int carm_bdev_ioctl(struct inode *ino, struct file *fil,
+			   unsigned int cmd, unsigned long arg)
+{
+	void __user *usermem = (void __user *) arg;
+	struct carm_port *port = ino->i_bdev->bd_disk->private_data;
+	struct hd_geometry geom;
+
+	switch (cmd) {
+	case HDIO_GETGEO:
+		if (!usermem)
+			return -EINVAL;
+
+		geom.heads = (u8) port->dev_geom_head;
+		geom.sectors = (u8) port->dev_geom_sect;
+		geom.cylinders = port->dev_geom_cyl;
+		geom.start = get_start_sect(ino->i_bdev);
+
+		if (copy_to_user(usermem, &geom, sizeof(geom)))
+			return -EFAULT;
+		return 0;
+
+	default:
+		break;
+	}
+
+	return -EOPNOTSUPP;
+}
+
+static const u32 msg_sizes[] = { 32, 64, 128, CARM_MSG_SIZE };
+
+static inline int carm_lookup_bucket(u32 msg_size)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(msg_sizes); i++)
+		if (msg_size <= msg_sizes[i])
+			return i;
+	
+	return -ENOENT;
+}
+
+static void carm_init_buckets(void *mmio)
+{
+	unsigned int i;
+
+	for (i = 0; i < ARRAY_SIZE(msg_sizes); i++)
+		writel(msg_sizes[i], mmio + CARM_CMS0 + (4 * i));
+}
+
+static inline void *carm_ref_msg(struct carm_host *host,
+				 unsigned int msg_idx)
+{
+	return host->msg_base + (msg_idx * CARM_MSG_SIZE);
+}
+
+static inline dma_addr_t carm_ref_msg_dma(struct carm_host *host,
+					  unsigned int msg_idx)
+{
+	return host->msg_dma + (msg_idx * CARM_MSG_SIZE);
+}
+
+static int carm_send_msg(struct carm_host *host,
+			 struct carm_request *crq)
+{
+	void *mmio = host->mmio;
+	u32 msg = (u32) carm_ref_msg_dma(host, crq->tag);
+	u32 cm_bucket = crq->msg_bucket;
+	u32 tmp;
+	int rc = 0;
+
+	VPRINTK("ENTER\n");
+
+	tmp = readl(mmio + CARM_HMUC);
+	if (tmp & CARM_Q_FULL) {
+#if 0
+		tmp = readl(mmio + CARM_INT_MASK);
+		tmp |= INT_Q_AVAILABLE;
+		writel(tmp, mmio + CARM_INT_MASK);
+		readl(mmio + CARM_INT_MASK);	/* flush */
+#endif
+		DPRINTK("host msg queue full\n");
+		rc = -EBUSY;
+	} else {
+		writel(msg | (cm_bucket << 1), mmio + CARM_IHQP);
+		readl(mmio + CARM_IHQP);	/* flush */
+	}
+
+	return rc;
+}
+
+static struct carm_request *carm_get_request(struct carm_host *host)
+{
+	unsigned int i;
+
+	/* obey global hardware limit on S/G entries */
+	if (host->hw_sg_used >= (CARM_MAX_HOST_SG - CARM_MAX_REQ_SG))
+		return NULL;
+
+	for (i = 0; i < CARM_MAX_Q; i++)
+		if ((host->msg_alloc & (1ULL << i)) == 0) {
+			struct carm_request *crq = &host->req[i];
+			crq->port = NULL;
+			crq->n_elem = 0;
+
+			host->msg_alloc |= (1ULL << i);
+			host->n_msgs++;
+
+			assert(host->n_msgs <= CARM_MAX_REQ);
+			return crq;
+		}
+	
+	DPRINTK("no request available, returning NULL\n");
+	return NULL;
+}
+
+static int carm_put_request(struct carm_host *host, struct carm_request *crq)
+{
+	assert(crq->tag < CARM_MAX_Q);
+
+	if (unlikely((host->msg_alloc & (1ULL << crq->tag)) == 0))
+		return -EINVAL; /* tried to clear a tag that was not active */
+
+	assert(host->hw_sg_used >= crq->n_elem);
+
+	host->msg_alloc &= ~(1ULL << crq->tag);
+	host->hw_sg_used -= crq->n_elem;
+	host->n_msgs--;
+
+	return 0;
+}
+
+static struct carm_request *carm_get_special(struct carm_host *host)
+{
+	unsigned long flags;
+	struct carm_request *crq = NULL;
+	struct request *rq;
+	int tries = 5000;
+
+	while (tries-- > 0) {
+		spin_lock_irqsave(&host->lock, flags);
+		crq = carm_get_request(host);
+		spin_unlock_irqrestore(&host->lock, flags);
+
+		if (crq)
+			break;
+		msleep(10);
+	}
+
+	if (!crq)
+		return NULL;
+
+	rq = blk_get_request(host->oob_q, WRITE /* bogus */, GFP_KERNEL);
+	if (!rq) {
+		spin_lock_irqsave(&host->lock, flags);
+		carm_put_request(host, crq);
+		spin_unlock_irqrestore(&host->lock, flags);
+		return NULL;
+	}
+
+	crq->rq = rq;
+	return crq;
+}
+
+static int carm_array_info (struct carm_host *host, unsigned int array_idx)
+{
+	struct carm_msg_ioctl *ioc;
+	unsigned int idx;
+	u32 msg_data;
+	dma_addr_t msg_dma;
+	struct carm_request *crq;
+	int rc;
+
+	crq = carm_get_special(host);
+	if (!crq) {
+		rc = -ENOMEM;
+		goto err_out;
+	}
+
+	idx = crq->tag;
+
+	ioc = carm_ref_msg(host, idx);
+	msg_dma = carm_ref_msg_dma(host, idx);
+	msg_data = (u32) (msg_dma + sizeof(struct carm_array_info));
+
+	crq->msg_type = CARM_MSG_ARRAY;
+	crq->msg_subtype = CARM_ARRAY_INFO;
+	rc = carm_lookup_bucket(sizeof(struct carm_msg_ioctl) +
+				sizeof(struct carm_array_info));
+	BUG_ON(rc < 0);
+	crq->msg_bucket = (u32) rc;
+
+	memset(ioc, 0, sizeof(*ioc));
+	ioc->type	= CARM_MSG_ARRAY;
+	ioc->subtype	= CARM_ARRAY_INFO;
+	ioc->array_id	= (u8) array_idx;
+	ioc->handle	= cpu_to_le32(TAG_ENCODE(idx));
+	ioc->data_addr	= cpu_to_le32(msg_data);
+
+	spin_lock_irq(&host->lock);
+	assert(host->state == HST_DEV_SCAN_START ||
+	       host->state == HST_DEV_SCAN);
+	spin_unlock_irq(&host->lock);
+
+	DPRINTK("blk_insert_request, tag == %u\n", idx);
+	blk_insert_request(host->oob_q, crq->rq, 1, crq, 0);
+
+	return 0;
+
+err_out:
+	spin_lock_irq(&host->lock);
+	host->state = HST_ERROR;
+	spin_unlock_irq(&host->lock);
+	return rc;
+}
+
+typedef unsigned int (*carm_sspc_t)(struct carm_host *, unsigned int, void *);
+
+static int carm_send_special (struct carm_host *host, carm_sspc_t func)
+{
+	struct carm_request *crq;
+	struct carm_msg_ioctl *ioc;
+	void *mem;
+	unsigned int idx, msg_size;
+	int rc;
+
+	crq = carm_get_special(host);
+	if (!crq)
+		return -ENOMEM;
+
+	idx = crq->tag;
+
+	mem = carm_ref_msg(host, idx);
+
+	msg_size = func(host, idx, mem);
+
+	ioc = mem;
+	crq->msg_type = ioc->type;
+	crq->msg_subtype = ioc->subtype;
+	rc = carm_lookup_bucket(msg_size);
+	BUG_ON(rc < 0);
+	crq->msg_bucket = (u32) rc;
+
+	DPRINTK("blk_insert_request, tag == %u\n", idx);
+	blk_insert_request(host->oob_q, crq->rq, 1, crq, 0);
+
+	return 0;
+}
+
+static unsigned int carm_fill_sync_time(struct carm_host *host,
+					unsigned int idx, void *mem)
+{
+	struct timeval tv;
+	struct carm_msg_sync_time *st = mem;
+
+	do_gettimeofday(&tv);
+
+	memset(st, 0, sizeof(*st));
+	st->type	= CARM_MSG_MISC;
+	st->subtype	= MISC_SET_TIME;
+	st->handle	= cpu_to_le32(TAG_ENCODE(idx));
+	st->timestamp	= cpu_to_le32(tv.tv_sec);
+
+	return sizeof(struct carm_msg_sync_time);
+}
+
+static unsigned int carm_fill_alloc_buf(struct carm_host *host,
+					unsigned int idx, void *mem)
+{
+	struct carm_msg_allocbuf *ab = mem;
+
+	memset(ab, 0, sizeof(*ab));
+	ab->type	= CARM_MSG_MISC;
+	ab->subtype	= MISC_ALLOC_MEM;
+	ab->handle	= cpu_to_le32(TAG_ENCODE(idx));
+	ab->n_sg	= 1;
+	ab->sg_type	= SGT_32BIT;
+	ab->addr	= cpu_to_le32(host->shm_dma + (PDC_SHM_SIZE >> 1));
+	ab->len		= cpu_to_le32(PDC_SHM_SIZE >> 1);
+	ab->evt_pool	= cpu_to_le32(host->shm_dma + (16 * 1024));
+	ab->n_evt	= cpu_to_le32(1024);
+	ab->rbuf_pool	= cpu_to_le32(host->shm_dma);
+	ab->n_rbuf	= cpu_to_le32(RMSG_Q_LEN);
+	ab->msg_pool	= cpu_to_le32(host->shm_dma + RBUF_LEN);
+	ab->n_msg	= cpu_to_le32(CARM_Q_LEN);
+	ab->sg[0].start	= cpu_to_le32(host->shm_dma + (PDC_SHM_SIZE >> 1));
+	ab->sg[0].len	= cpu_to_le32(65536);
+
+	return sizeof(struct carm_msg_allocbuf);
+}
+
+static unsigned int carm_fill_scan_channels(struct carm_host *host,
+					    unsigned int idx, void *mem)
+{
+	struct carm_msg_ioctl *ioc = mem;
+	u32 msg_data = (u32) (carm_ref_msg_dma(host, idx) +
+			      IOC_SCAN_CHAN_OFFSET);
+
+	memset(ioc, 0, sizeof(*ioc));
+	ioc->type	= CARM_MSG_IOCTL;
+	ioc->subtype	= CARM_IOC_SCAN_CHAN;
+	ioc->handle	= cpu_to_le32(TAG_ENCODE(idx));
+	ioc->data_addr	= cpu_to_le32(msg_data);
+
+	/* fill output data area with "no device" default values */
+	mem += IOC_SCAN_CHAN_OFFSET;
+	memset(mem, IOC_SCAN_CHAN_NODEV, CARM_MAX_PORTS);
+
+	return IOC_SCAN_CHAN_OFFSET + CARM_MAX_PORTS;
+}
+
+static unsigned int carm_fill_get_fw_ver(struct carm_host *host,
+					 unsigned int idx, void *mem)
+{
+	struct carm_msg_get_fw_ver *ioc = mem;
+	u32 msg_data = (u32) (carm_ref_msg_dma(host, idx) + sizeof(*ioc));
+
+	memset(ioc, 0, sizeof(*ioc));
+	ioc->type	= CARM_MSG_MISC;
+	ioc->subtype	= MISC_GET_FW_VER;
+	ioc->handle	= cpu_to_le32(TAG_ENCODE(idx));
+	ioc->data_addr	= cpu_to_le32(msg_data);
+
+	return sizeof(struct carm_msg_get_fw_ver) +
+	       sizeof(struct carm_fw_ver);
+}
+
+static inline void carm_end_request_queued(struct carm_host *host,
+					   struct carm_request *crq,
+					   int uptodate)
+{
+	struct request *req = crq->rq;
+	int rc;
+
+	rc = end_that_request_first(req, uptodate, req->hard_nr_sectors);
+	assert(rc == 0);
+
+	end_that_request_last(req);
+
+	rc = carm_put_request(host, crq);
+	assert(rc == 0);
+}
+
+static inline void carm_push_q (struct carm_host *host, request_queue_t *q)
+{
+	unsigned int idx = host->wait_q_prod % CARM_MAX_WAIT_Q;
+
+	blk_stop_queue(q);
+	VPRINTK("STOPPED QUEUE %p\n", q);
+
+	host->wait_q[idx] = q;
+	host->wait_q_prod++;
+	BUG_ON(host->wait_q_prod == host->wait_q_cons); /* overrun */
+}
+
+static inline request_queue_t *carm_pop_q(struct carm_host *host)
+{
+	unsigned int idx;
+
+	if (host->wait_q_prod == host->wait_q_cons)
+		return NULL;
+
+	idx = host->wait_q_cons % CARM_MAX_WAIT_Q;
+	host->wait_q_cons++;
+
+	return host->wait_q[idx];
+}
+
+static inline void carm_round_robin(struct carm_host *host)
+{
+	request_queue_t *q = carm_pop_q(host);
+	if (q) {
+		blk_start_queue(q);
+		VPRINTK("STARTED QUEUE %p\n", q);
+	}
+}
+
+static inline void carm_end_rq(struct carm_host *host, struct carm_request *crq,
+			int is_ok)
+{
+	carm_end_request_queued(host, crq, is_ok);
+	if (CARM_MAX_Q == 1)
+		carm_round_robin(host);
+	else if ((host->n_msgs <= CARM_MSG_LOW_WATER) &&
+		 (host->hw_sg_used <= CARM_SG_LOW_WATER)) {
+		carm_round_robin(host);
+	}
+}
+
+static void carm_oob_rq_fn(request_queue_t *q)
+{
+	struct carm_host *host = q->queuedata;
+	struct carm_request *crq;
+	struct request *rq;
+	int rc;
+
+	while (1) {
+		DPRINTK("get req\n");
+		rq = elv_next_request(q);
+		if (!rq)
+			break;
+
+		blkdev_dequeue_request(rq);
+
+		crq = rq->special;
+		assert(crq != NULL);
+		assert(crq->rq == rq);
+
+		crq->n_elem = 0;
+
+		DPRINTK("send req\n");
+		rc = carm_send_msg(host, crq);
+		if (rc) {
+			blk_requeue_request(q, rq);
+			carm_push_q(host, q);
+			return;		/* call us again later, eventually */
+		}
+	}
+}
+
+static void carm_rq_fn(request_queue_t *q)
+{
+	struct carm_port *port = q->queuedata;
+	struct carm_host *host = port->host;
+	struct carm_msg_rw *msg;
+	struct carm_request *crq;
+	struct request *rq;
+	struct scatterlist *sg;
+	int writing = 0, pci_dir, i, n_elem, rc;
+	u32 tmp;
+	unsigned int msg_size;
+
+queue_one_request:
+	VPRINTK("get req\n");
+	rq = elv_next_request(q);
+	if (!rq)
+		return;
+
+	crq = carm_get_request(host);
+	if (!crq) {
+		carm_push_q(host, q);
+		return;		/* call us again later, eventually */
+	}
+	crq->rq = rq;
+
+	blkdev_dequeue_request(rq);
+
+	if (rq_data_dir(rq) == WRITE) {
+		writing = 1;
+		pci_dir = PCI_DMA_TODEVICE;
+	} else {
+		pci_dir = PCI_DMA_FROMDEVICE;
+	}
+
+	/* get scatterlist from block layer */
+	sg = &crq->sg[0];
+	n_elem = blk_rq_map_sg(q, rq, sg);
+	if (n_elem <= 0) {
+		carm_end_rq(host, crq, 0);
+		return;		/* request with no s/g entries? */
+	}
+
+	/* map scatterlist to PCI bus addresses */
+	n_elem = pci_map_sg(host->pdev, sg, n_elem, pci_dir);
+	if (n_elem <= 0) {
+		carm_end_rq(host, crq, 0);
+		return;		/* request with no s/g entries? */
+	}
+	crq->n_elem = n_elem;
+	crq->port = port;
+	host->hw_sg_used += n_elem;
+
+	/*
+	 * build read/write message
+	 */
+
+	VPRINTK("build msg\n");
+	msg = (struct carm_msg_rw *) carm_ref_msg(host, crq->tag);
+
+	if (writing) {
+		msg->type = CARM_MSG_WRITE;
+		crq->msg_type = CARM_MSG_WRITE;
+	} else {
+		msg->type = CARM_MSG_READ;
+		crq->msg_type = CARM_MSG_READ;
+	}
+
+	msg->id		= port->port_no;
+	msg->sg_count	= n_elem;
+	msg->sg_type	= SGT_32BIT;
+	msg->handle	= cpu_to_le32(TAG_ENCODE(crq->tag));
+	msg->lba	= cpu_to_le32(rq->sector & 0xffffffff);
+	tmp		= (rq->sector >> 16) >> 16;
+	msg->lba_high	= cpu_to_le16( (u16) tmp );
+	msg->lba_count	= cpu_to_le16(rq->nr_sectors);
+
+	msg_size = sizeof(struct carm_msg_rw) - sizeof(msg->sg);
+	for (i = 0; i < n_elem; i++) {
+		struct carm_msg_sg *carm_sg = &msg->sg[i];
+		carm_sg->start = cpu_to_le32(sg_dma_address(&crq->sg[i]));
+		carm_sg->len = cpu_to_le32(sg_dma_len(&crq->sg[i]));
+		msg_size += sizeof(struct carm_msg_sg);
+	}
+
+	rc = carm_lookup_bucket(msg_size);
+	BUG_ON(rc < 0);
+	crq->msg_bucket = (u32) rc;
+
+	/*
+	 * queue read/write message to hardware
+	 */
+
+	VPRINTK("send msg, tag == %u\n", crq->tag);
+	rc = carm_send_msg(host, crq);
+	if (rc) {
+		carm_put_request(host, crq);
+		blk_requeue_request(q, rq);
+		carm_push_q(host, q);
+		return;		/* call us again later, eventually */
+	}
+
+	goto queue_one_request;
+}
+
+static void carm_handle_array_info(struct carm_host *host,
+				   struct carm_request *crq, u8 *mem,
+				   int is_ok)
+{
+	struct carm_port *port;
+	u8 *msg_data = mem + sizeof(struct carm_array_info);
+	struct carm_array_info *desc = (struct carm_array_info *) msg_data;
+	u64 lo, hi;
+	int cur_port;
+	size_t slen;
+
+	DPRINTK("ENTER\n");
+
+	carm_end_rq(host, crq, is_ok);
+
+	if (!is_ok)
+		goto out;
+	if (le32_to_cpu(desc->array_status) & ARRAY_NO_EXIST)
+		goto out;
+
+	cur_port = host->cur_scan_dev;
+
+	/* should never occur */
+	if ((cur_port < 0) || (cur_port >= CARM_MAX_PORTS)) {
+		printk(KERN_ERR PFX "BUG: cur_scan_dev==%d, array_id==%d\n",
+		       cur_port, (int) desc->array_id);
+		goto out;
+	}
+
+	port = &host->port[cur_port];
+
+	lo = (u64) le32_to_cpu(desc->size);
+	hi = (u64) le32_to_cpu(desc->size_hi);
+
+	port->capacity = lo | (hi << 32);
+	port->dev_geom_head = le16_to_cpu(desc->head);
+	port->dev_geom_sect = le16_to_cpu(desc->sect);
+	port->dev_geom_cyl = le16_to_cpu(desc->cyl);
+
+	host->dev_active |= (1 << cur_port);
+
+	strncpy(port->name, desc->name, sizeof(port->name));
+	port->name[sizeof(port->name) - 1] = 0;
+	slen = strlen(port->name);
+	while (slen && (port->name[slen - 1] == ' ')) {
+		port->name[slen - 1] = 0;
+		slen--;
+	}
+
+	printk(KERN_INFO DRV_NAME "(%s): port %u device %Lu sectors\n",
+	       pci_name(host->pdev), port->port_no,
+	       (unsigned long long) port->capacity);
+	printk(KERN_INFO DRV_NAME "(%s): port %u device \"%s\"\n",
+	       pci_name(host->pdev), port->port_no, port->name);
+
+out:
+	assert(host->state == HST_DEV_SCAN);
+	schedule_work(&host->fsm_task);
+}
+
+static void carm_handle_scan_chan(struct carm_host *host,
+				  struct carm_request *crq, u8 *mem,
+				  int is_ok)
+{
+	u8 *msg_data = mem + IOC_SCAN_CHAN_OFFSET;
+	unsigned int i, dev_count = 0;
+	int new_state = HST_DEV_SCAN_START;
+
+	DPRINTK("ENTER\n");
+
+	carm_end_rq(host, crq, is_ok);
+
+	if (!is_ok) {
+		new_state = HST_ERROR;
+		goto out;
+	}
+
+	/* TODO: scan and support non-disk devices */
+	for (i = 0; i < 8; i++)
+		if (msg_data[i] == 0) { /* direct-access device (disk) */
+			host->dev_present |= (1 << i);
+			dev_count++;
+		}
+
+	printk(KERN_INFO DRV_NAME "(%s): found %u interesting devices\n",
+	       pci_name(host->pdev), dev_count);
+
+out:
+	assert(host->state == HST_PORT_SCAN);
+	host->state = new_state;
+	schedule_work(&host->fsm_task);
+}
+
+static void carm_handle_generic(struct carm_host *host,
+				struct carm_request *crq, int is_ok,
+				int cur_state, int next_state)
+{
+	DPRINTK("ENTER\n");
+
+	carm_end_rq(host, crq, is_ok);
+
+	assert(host->state == cur_state);
+	if (is_ok)
+		host->state = next_state;
+	else
+		host->state = HST_ERROR;
+	schedule_work(&host->fsm_task);
+}
+
+static inline void carm_handle_rw(struct carm_host *host,
+				  struct carm_request *crq, int is_ok)
+{
+	int pci_dir;
+
+	VPRINTK("ENTER\n");
+
+	if (rq_data_dir(crq->rq) == WRITE)
+		pci_dir = PCI_DMA_TODEVICE;
+	else
+		pci_dir = PCI_DMA_FROMDEVICE;
+
+	pci_unmap_sg(host->pdev, &crq->sg[0], crq->n_elem, pci_dir);
+
+	carm_end_rq(host, crq, is_ok);
+}
+
+static inline void carm_handle_resp(struct carm_host *host,
+				    u32 ret_handle_le, u32 status)
+{
+	u32 handle = le32_to_cpu(ret_handle_le);
+	unsigned int msg_idx;
+	struct carm_request *crq;
+	int is_ok = (status == RMSG_OK);
+	u8 *mem;
+
+	VPRINTK("ENTER, handle == 0x%x\n", handle);
+
+	if (unlikely(!TAG_VALID(handle))) {
+		printk(KERN_ERR DRV_NAME "(%s): BUG: invalid tag 0x%x\n",
+		       pci_name(host->pdev), handle);
+		return;
+	}
+
+	msg_idx = TAG_DECODE(handle);
+	VPRINTK("tag == %u\n", msg_idx);
+
+	crq = &host->req[msg_idx];
+
+	/* fast path */
+	if (likely(crq->msg_type == CARM_MSG_READ ||
+		   crq->msg_type == CARM_MSG_WRITE)) {
+		carm_handle_rw(host, crq, is_ok);
+		return;
+	}
+
+	mem = carm_ref_msg(host, msg_idx);
+
+	switch (crq->msg_type) {
+	case CARM_MSG_IOCTL: {
+		switch (crq->msg_subtype) {
+		case CARM_IOC_SCAN_CHAN:
+			carm_handle_scan_chan(host, crq, mem, is_ok);
+			break;
+		default:
+			/* unknown / invalid response */
+			goto err_out;
+		}
+		break;
+	}
+
+	case CARM_MSG_MISC: {
+		switch (crq->msg_subtype) {
+		case MISC_ALLOC_MEM:
+			carm_handle_generic(host, crq, is_ok,
+					    HST_ALLOC_BUF, HST_SYNC_TIME);
+			break;
+		case MISC_SET_TIME:
+			carm_handle_generic(host, crq, is_ok,
+					    HST_SYNC_TIME, HST_GET_FW_VER);
+			break;
+		case MISC_GET_FW_VER: {
+			struct carm_fw_ver *ver = (struct carm_fw_ver *)
+				mem + sizeof(struct carm_msg_get_fw_ver);
+			if (is_ok) {
+				host->fw_ver = le32_to_cpu(ver->version);
+				host->flags |= (ver->features & FL_FW_VER_MASK);
+			}
+			carm_handle_generic(host, crq, is_ok,
+					    HST_GET_FW_VER, HST_PORT_SCAN);
+			break;
+		}
+		default:
+			/* unknown / invalid response */
+			goto err_out;
+		}
+		break;
+	}
+
+	case CARM_MSG_ARRAY: {
+		switch (crq->msg_subtype) {
+		case CARM_ARRAY_INFO:
+			carm_handle_array_info(host, crq, mem, is_ok);
+			break;
+		default:
+			/* unknown / invalid response */
+			goto err_out;
+		}
+		break;
+	}
+
+	default:
+		/* unknown / invalid response */
+		goto err_out;
+	}
+
+	return;
+
+err_out:
+	printk(KERN_WARNING DRV_NAME "(%s): BUG: unhandled message type %d/%d\n",
+	       pci_name(host->pdev), crq->msg_type, crq->msg_subtype);
+	carm_end_rq(host, crq, 0);
+}
+
+static inline void carm_handle_responses(struct carm_host *host)
+{
+	void *mmio = host->mmio;
+	struct carm_response *resp = (struct carm_response *) host->shm;
+	unsigned int work = 0;
+	unsigned int idx = host->resp_idx % RMSG_Q_LEN;
+
+	while (1) {
+		u32 status = le32_to_cpu(resp[idx].status);
+
+		if (status == 0xffffffff) {
+			VPRINTK("ending response on index %u\n", idx);
+			writel(idx << 3, mmio + CARM_RESP_IDX);
+			break;
+		}
+
+		/* response to a message we sent */
+		else if ((status & (1 << 31)) == 0) {
+			VPRINTK("handling msg response on index %u\n", idx);
+			carm_handle_resp(host, resp[idx].ret_handle, status);
+			resp[idx].status = 0xffffffff;
+		}
+
+		/* asynchronous events the hardware throws our way */
+		else if ((status & 0xff000000) == (1 << 31)) {
+			u8 *evt_type_ptr = (u8 *) &resp[idx];
+			u8 evt_type = *evt_type_ptr;
+			printk(KERN_WARNING DRV_NAME "(%s): unhandled event type %d\n",
+			       pci_name(host->pdev), (int) evt_type);
+			resp[idx].status = 0xffffffff;
+		}
+
+		idx = NEXT_RESP(idx);
+		work++;
+	}
+
+	VPRINTK("EXIT, work==%u\n", work);
+	host->resp_idx += work;
+}
+
+static irqreturn_t carm_interrupt(int irq, void *__host, struct pt_regs *regs)
+{
+	struct carm_host *host = __host;
+	void *mmio;
+	u32 mask;
+	int handled = 0;
+	unsigned long flags;
+
+	if (!host) {
+		VPRINTK("no host\n");
+		return IRQ_NONE;
+	}
+
+	spin_lock_irqsave(&host->lock, flags);
+
+	mmio = host->mmio;
+
+	/* reading should also clear interrupts */
+	mask = readl(mmio + CARM_INT_STAT);
+
+	if (mask == 0 || mask == 0xffffffff) {
+		VPRINTK("no work, mask == 0x%x\n", mask);
+		goto out;
+	}
+
+	if (mask & INT_ACK_MASK)
+		writel(mask, mmio + CARM_INT_STAT);
+
+	if (unlikely(host->state == HST_INVALID)) {
+		VPRINTK("not initialized yet, mask = 0x%x\n", mask);
+		goto out;
+	}
+
+	if (mask & CARM_HAVE_RESP) {
+		handled = 1;
+		carm_handle_responses(host);
+	}
+
+out:
+	spin_unlock_irqrestore(&host->lock, flags);
+	VPRINTK("EXIT\n");
+	return IRQ_RETVAL(handled);
+}
+
+static void carm_fsm_task (void *_data)
+{
+	struct carm_host *host = _data;
+	unsigned long flags;
+	unsigned int state;
+	int rc, i, next_dev;
+	int reschedule = 0;
+	int new_state = HST_INVALID;
+
+	spin_lock_irqsave(&host->lock, flags);
+	state = host->state;
+	spin_unlock_irqrestore(&host->lock, flags);
+
+	DPRINTK("ENTER, state == %s\n", state_name[state]);
+
+	switch (state) {
+	case HST_PROBE_START:
+		new_state = HST_ALLOC_BUF;
+		reschedule = 1;
+		break;
+
+	case HST_ALLOC_BUF:
+		rc = carm_send_special(host, carm_fill_alloc_buf);
+		if (rc) {
+			new_state = HST_ERROR;
+			reschedule = 1;
+		}
+		break;
+
+	case HST_SYNC_TIME:
+		rc = carm_send_special(host, carm_fill_sync_time);
+		if (rc) {
+			new_state = HST_ERROR;
+			reschedule = 1;
+		}
+		break;
+
+	case HST_GET_FW_VER:
+		rc = carm_send_special(host, carm_fill_get_fw_ver);
+		if (rc) {
+			new_state = HST_ERROR;
+			reschedule = 1;
+		}
+		break;
+
+	case HST_PORT_SCAN:
+		rc = carm_send_special(host, carm_fill_scan_channels);
+		if (rc) {
+			new_state = HST_ERROR;
+			reschedule = 1;
+		}
+		break;
+
+	case HST_DEV_SCAN_START:
+		host->cur_scan_dev = -1;
+		new_state = HST_DEV_SCAN;
+		reschedule = 1;
+		break;
+
+	case HST_DEV_SCAN:
+		next_dev = -1;
+		for (i = host->cur_scan_dev + 1; i < CARM_MAX_PORTS; i++)
+			if (host->dev_present & (1 << i)) {
+				next_dev = i;
+				break;
+			}
+
+		if (next_dev >= 0) {
+			host->cur_scan_dev = next_dev;
+			rc = carm_array_info(host, next_dev);
+			if (rc) {
+				new_state = HST_ERROR;
+				reschedule = 1;
+			}
+		} else {
+			new_state = HST_DEV_ACTIVATE;
+			reschedule = 1;
+		}
+		break;
+
+	case HST_DEV_ACTIVATE: {
+		int activated = 0;
+		for (i = 0; i < CARM_MAX_PORTS; i++)
+			if (host->dev_active & (1 << i)) {
+				struct carm_port *port = &host->port[i];
+				struct gendisk *disk = port->disk;
+
+				set_capacity(disk, port->capacity);
+				add_disk(disk);
+				activated++;
+			}
+
+		printk(KERN_INFO DRV_NAME "(%s): %d ports activated\n",
+		       pci_name(host->pdev), activated);
+
+		new_state = HST_PROBE_FINISHED;
+		reschedule = 1;
+		break;
+	}
+
+	case HST_PROBE_FINISHED:
+		up(&host->probe_sem);
+		break;
+
+	case HST_ERROR:
+		/* FIXME: TODO */
+		break;
+
+	default:
+		/* should never occur */
+		printk(KERN_ERR PFX "BUG: unknown state %d\n", state);
+		assert(0);
+		break;
+	}
+
+	if (new_state != HST_INVALID) {
+		spin_lock_irqsave(&host->lock, flags);
+		host->state = new_state;
+		spin_unlock_irqrestore(&host->lock, flags);
+	}
+	if (reschedule)
+		schedule_work(&host->fsm_task);
+}
+
+static int carm_init_wait(void *mmio, u32 bits, unsigned int test_bit)
+{
+	unsigned int i;
+
+	for (i = 0; i < 50000; i++) {
+		u32 tmp = readl(mmio + CARM_LMUC);
+		udelay(100);
+
+		if (test_bit) {
+			if ((tmp & bits) == bits)
+				return 0;
+		} else {
+			if ((tmp & bits) == 0)
+				return 0;
+		}
+
+		cond_resched();
+	}
+
+	printk(KERN_ERR PFX "carm_init_wait timeout, bits == 0x%x, test_bit == %s\n",
+	       bits, test_bit ? "yes" : "no");
+	return -EBUSY;
+}
+
+static void carm_init_responses(struct carm_host *host)
+{
+	void *mmio = host->mmio;
+	unsigned int i;
+	struct carm_response *resp = (struct carm_response *) host->shm;
+
+	for (i = 0; i < RMSG_Q_LEN; i++)
+		resp[i].status = 0xffffffff;
+
+	writel(0, mmio + CARM_RESP_IDX);
+}
+
+static int carm_init_host(struct carm_host *host)
+{
+	void *mmio = host->mmio;
+	u32 tmp;
+	u8 tmp8;
+	int rc;
+
+	DPRINTK("ENTER\n");
+
+	writel(0, mmio + CARM_INT_MASK);
+
+	tmp8 = readb(mmio + CARM_INITC);
+	if (tmp8 & 0x01) {
+		tmp8 &= ~0x01;
+		writeb(tmp8, CARM_INITC);
+		readb(mmio + CARM_INITC);	/* flush */
+
+		DPRINTK("snooze...\n");
+		msleep(5000);
+	}
+
+	tmp = readl(mmio + CARM_HMUC);
+	if (tmp & CARM_CME) {
+		DPRINTK("CME bit present, waiting\n");
+		rc = carm_init_wait(mmio, CARM_CME, 1);
+		if (rc) {
+			DPRINTK("EXIT, carm_init_wait 1 failed\n");
+			return rc;
+		}
+	}
+	if (tmp & CARM_RME) {
+		DPRINTK("RME bit present, waiting\n");
+		rc = carm_init_wait(mmio, CARM_RME, 1);
+		if (rc) {
+			DPRINTK("EXIT, carm_init_wait 2 failed\n");
+			return rc;
+		}
+	}
+
+	tmp &= ~(CARM_RME | CARM_CME);
+	writel(tmp, mmio + CARM_HMUC);
+	readl(mmio + CARM_HMUC);	/* flush */
+
+	rc = carm_init_wait(mmio, CARM_RME | CARM_CME, 0);
+	if (rc) {
+		DPRINTK("EXIT, carm_init_wait 3 failed\n");
+		return rc;
+	}
+
+	carm_init_buckets(mmio);
+
+	writel(host->shm_dma & 0xffffffff, mmio + RBUF_ADDR_LO);
+	writel((host->shm_dma >> 16) >> 16, mmio + RBUF_ADDR_HI);
+	writel(RBUF_LEN, mmio + RBUF_BYTE_SZ);
+
+	tmp = readl(mmio + CARM_HMUC);
+	tmp |= (CARM_RME | CARM_CME | CARM_WZBC);
+	writel(tmp, mmio + CARM_HMUC);
+	readl(mmio + CARM_HMUC);	/* flush */
+
+	rc = carm_init_wait(mmio, CARM_RME | CARM_CME, 1);
+	if (rc) {
+		DPRINTK("EXIT, carm_init_wait 4 failed\n");
+		return rc;
+	}
+
+	writel(0, mmio + CARM_HMPHA);
+	writel(INT_DEF_MASK, mmio + CARM_INT_MASK);
+
+	carm_init_responses(host);
+
+	/* start initialization, probing state machine */
+	spin_lock_irq(&host->lock);
+	assert(host->state == HST_INVALID);
+	host->state = HST_PROBE_START;
+	spin_unlock_irq(&host->lock);
+	schedule_work(&host->fsm_task);
+
+	DPRINTK("EXIT\n");
+	return 0;
+}
+
+static int carm_init_disks(struct carm_host *host)
+{
+	unsigned int i;
+	int rc = 0;
+
+	for (i = 0; i < CARM_MAX_PORTS; i++) {
+		struct gendisk *disk;
+		request_queue_t *q;
+		struct carm_port *port;
+
+		port = &host->port[i];
+		port->host = host;
+		port->port_no = i;
+
+		disk = alloc_disk(CARM_MINORS_PER_MAJOR);
+		if (!disk) {
+			rc = -ENOMEM;
+			break;
+		}
+
+		port->disk = disk;
+		sprintf(disk->disk_name, DRV_NAME "%u_%u", host->id, i);
+		sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i);
+		disk->major = host->major;
+		disk->first_minor = i * CARM_MINORS_PER_MAJOR;
+		disk->fops = &carm_bd_ops;
+		disk->private_data = port;
+
+		q = blk_init_queue(carm_rq_fn, &host->lock);
+		if (!q) {
+			rc = -ENOMEM;
+			break;
+		}
+		disk->queue = q;
+		blk_queue_max_hw_segments(q, CARM_MAX_REQ_SG);
+		blk_queue_max_phys_segments(q, CARM_MAX_REQ_SG);
+		blk_queue_segment_boundary(q, CARM_SG_BOUNDARY);
+
+		q->queuedata = port;
+	}
+
+	return rc;
+}
+
+static void carm_free_disks(struct carm_host *host)
+{
+	unsigned int i;
+
+	for (i = 0; i < CARM_MAX_PORTS; i++) {
+		struct gendisk *disk = host->port[i].disk;
+		if (disk) {
+			request_queue_t *q = disk->queue;
+
+			if (disk->flags & GENHD_FL_UP)
+				del_gendisk(disk);
+			if (q)
+				blk_cleanup_queue(q);
+			put_disk(disk);
+		}
+	}
+}
+
+static int carm_init_shm(struct carm_host *host)
+{
+	host->shm = pci_alloc_consistent(host->pdev, CARM_SHM_SIZE,
+					 &host->shm_dma);
+	if (!host->shm)
+		return -ENOMEM;
+
+	host->msg_base = host->shm + RBUF_LEN;
+	host->msg_dma = host->shm_dma + RBUF_LEN;
+
+	memset(host->shm, 0xff, RBUF_LEN);
+	memset(host->msg_base, 0, PDC_SHM_SIZE - RBUF_LEN);
+
+	return 0;
+}
+
+static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
+{
+	static unsigned int printed_version;
+	struct carm_host *host;
+	unsigned int pci_dac;
+	int rc;
+	request_queue_t *q;
+	unsigned int i;
+
+	if (!printed_version++)
+		printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
+
+	rc = pci_enable_device(pdev);
+	if (rc)
+		return rc;
+
+	rc = pci_request_regions(pdev, DRV_NAME);
+	if (rc)
+		goto err_out;
+
+#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
+	rc = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
+	if (!rc) {
+		rc = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
+		if (rc) {
+			printk(KERN_ERR DRV_NAME "(%s): consistent DMA mask failure\n",
+				pci_name(pdev));
+			goto err_out_regions;
+		}
+		pci_dac = 1;
+	} else {
+#endif
+		rc = pci_set_dma_mask(pdev, 0xffffffffULL);
+		if (rc) {
+			printk(KERN_ERR DRV_NAME "(%s): DMA mask failure\n",
+				pci_name(pdev));
+			goto err_out_regions;
+		}
+		pci_dac = 0;
+#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
+	}
+#endif
+
+	host = kmalloc(sizeof(*host), GFP_KERNEL);
+	if (!host) {
+		printk(KERN_ERR DRV_NAME "(%s): memory alloc failure\n",
+		       pci_name(pdev));
+		rc = -ENOMEM;
+		goto err_out_regions;
+	}
+
+	memset(host, 0, sizeof(*host));
+	host->pdev = pdev;
+	host->flags = pci_dac ? FL_DAC : 0;
+	spin_lock_init(&host->lock);
+	INIT_WORK(&host->fsm_task, carm_fsm_task, host);
+	init_MUTEX_LOCKED(&host->probe_sem);
+
+	for (i = 0; i < ARRAY_SIZE(host->req); i++)
+		host->req[i].tag = i;
+
+	host->mmio = ioremap(pci_resource_start(pdev, 0),
+			     pci_resource_len(pdev, 0));
+	if (!host->mmio) {
+		printk(KERN_ERR DRV_NAME "(%s): MMIO alloc failure\n",
+		       pci_name(pdev));
+		rc = -ENOMEM;
+		goto err_out_kfree;
+	}
+
+	rc = carm_init_shm(host);
+	if (rc) {
+		printk(KERN_ERR DRV_NAME "(%s): DMA SHM alloc failure\n",
+		       pci_name(pdev));
+		goto err_out_iounmap;
+	}
+
+	q = blk_init_queue(carm_oob_rq_fn, &host->lock);
+	if (!q) {
+		printk(KERN_ERR DRV_NAME "(%s): OOB queue alloc failure\n",
+		       pci_name(pdev));
+		rc = -ENOMEM;
+		goto err_out_pci_free;
+	}
+	host->oob_q = q;
+	q->queuedata = host;
+
+	/*
+	 * Figure out which major to use: 160, 161, or dynamic
+	 */
+	if (!test_and_set_bit(0, &carm_major_alloc))
+		host->major = 160;
+	else if (!test_and_set_bit(1, &carm_major_alloc))
+		host->major = 161;
+	else
+		host->flags |= FL_DYN_MAJOR;
+
+	host->id = carm_host_id;
+	sprintf(host->name, DRV_NAME "%d", carm_host_id);
+
+	rc = register_blkdev(host->major, host->name);
+	if (rc < 0)
+		goto err_out_free_majors;
+	if (host->flags & FL_DYN_MAJOR)
+		host->major = rc;
+
+	devfs_mk_dir(DRV_NAME);
+
+	rc = carm_init_disks(host);
+	if (rc)
+		goto err_out_blkdev_disks;
+
+	pci_set_master(pdev);
+
+	rc = request_irq(pdev->irq, carm_interrupt, SA_SHIRQ, DRV_NAME, host);
+	if (rc) {
+		printk(KERN_ERR DRV_NAME "(%s): irq alloc failure\n",
+		       pci_name(pdev));
+		goto err_out_blkdev_disks;
+	}
+
+	rc = carm_init_host(host);
+	if (rc)
+		goto err_out_free_irq;
+
+	DPRINTK("waiting for probe_sem\n");
+	down(&host->probe_sem);
+
+	printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n",
+	       host->name, pci_name(pdev), (int) CARM_MAX_PORTS,
+	       pci_resource_start(pdev, 0), pdev->irq, host->major);
+
+	carm_host_id++;
+	pci_set_drvdata(pdev, host);
+	return 0;
+
+err_out_free_irq:
+	free_irq(pdev->irq, host);
+err_out_blkdev_disks:
+	carm_free_disks(host);
+	unregister_blkdev(host->major, host->name);
+err_out_free_majors:
+	if (host->major == 160)
+		clear_bit(0, &carm_major_alloc);
+	else if (host->major == 161)
+		clear_bit(1, &carm_major_alloc);
+	blk_cleanup_queue(host->oob_q);
+err_out_pci_free:
+	pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma);
+err_out_iounmap:
+	iounmap(host->mmio);
+err_out_kfree:
+	kfree(host);
+err_out_regions:
+	pci_release_regions(pdev);
+err_out:
+	pci_disable_device(pdev);
+	return rc;
+}
+
+static void carm_remove_one (struct pci_dev *pdev)
+{
+	struct carm_host *host = pci_get_drvdata(pdev);
+
+	if (!host) {
+		printk(KERN_ERR PFX "BUG: no host data for PCI(%s)\n",
+		       pci_name(pdev));
+		return;
+	}
+
+	free_irq(pdev->irq, host);
+	carm_free_disks(host);
+	devfs_remove(DRV_NAME);
+	unregister_blkdev(host->major, host->name);
+	if (host->major == 160)
+		clear_bit(0, &carm_major_alloc);
+	else if (host->major == 161)
+		clear_bit(1, &carm_major_alloc);
+	blk_cleanup_queue(host->oob_q);
+	pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma);
+	iounmap(host->mmio);
+	kfree(host);
+	pci_release_regions(pdev);
+	pci_disable_device(pdev);
+	pci_set_drvdata(pdev, NULL);
+}
+
+static int __init carm_init(void)
+{
+	return pci_module_init(&carm_driver);
+}
+
+static void __exit carm_exit(void)
+{
+	pci_unregister_driver(&carm_driver);
+}
+
+module_init(carm_init);
+module_exit(carm_exit);
+
+
--- diff/drivers/char/ds1286.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/char/ds1286.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,578 @@
+/*
+ * DS1286 Real Time Clock interface for Linux
+ *
+ * Copyright (C) 1998, 1999, 2000 Ralf Baechle
+ *
+ * Based on code written by Paul Gortmaker.
+ *
+ * This driver allows use of the real time clock (built into nearly all
+ * computers) from user space. It exports the /dev/rtc interface supporting
+ * various ioctl() and also the /proc/rtc pseudo-file for status
+ * information.
+ *
+ * The ioctls can be used to set the interrupt behaviour and generation rate
+ * from the RTC via IRQ 8. Then the /dev/rtc interface can be used to make
+ * use of these timer interrupts, be they interval or alarm based.
+ *
+ * The /dev/rtc interface will block on reads until an interrupt has been
+ * received. If a RTC interrupt has already happened, it will output an
+ * unsigned long and then block. The output value contains the interrupt
+ * status in the low byte and the number of interrupts since the last read
+ * in the remaining high bytes. The /dev/rtc interface can also be used with
+ * the select(2) call.
+ *
+ * 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.
+ */
+#include <linux/ds1286.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/miscdevice.h>
+#include <linux/slab.h>
+#include <linux/ioport.h>
+#include <linux/fcntl.h>
+#include <linux/init.h>
+#include <linux/poll.h>
+#include <linux/rtc.h>
+#include <linux/spinlock.h>
+#include <linux/bcd.h>
+#include <linux/proc_fs.h>
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+
+#define DS1286_VERSION		"1.0"
+
+/*
+ *	We sponge a minor off of the misc major. No need slurping
+ *	up another valuable major dev number for this. If you add
+ *	an ioctl, make sure you don't conflict with SPARC's RTC
+ *	ioctls.
+ */
+
+static DECLARE_WAIT_QUEUE_HEAD(ds1286_wait);
+
+static ssize_t ds1286_read(struct file *file, char *buf,
+			size_t count, loff_t *ppos);
+
+static int ds1286_ioctl(struct inode *inode, struct file *file,
+                        unsigned int cmd, unsigned long arg);
+
+static unsigned int ds1286_poll(struct file *file, poll_table *wait);
+
+static void ds1286_get_alm_time (struct rtc_time *alm_tm);
+static void ds1286_get_time(struct rtc_time *rtc_tm);
+static int ds1286_set_time(struct rtc_time *rtc_tm);
+
+static inline unsigned char ds1286_is_updating(void);
+
+static spinlock_t ds1286_lock = SPIN_LOCK_UNLOCKED;
+
+static int ds1286_read_proc(char *page, char **start, off_t off,
+                            int count, int *eof, void *data);
+
+/*
+ *	Bits in rtc_status. (7 bits of room for future expansion)
+ */
+
+#define RTC_IS_OPEN		0x01	/* means /dev/rtc is in use	*/
+#define RTC_TIMER_ON		0x02	/* missed irq timer active	*/
+
+static unsigned char ds1286_status;	/* bitmapped status byte.	*/
+
+static unsigned char days_in_mo[] = {
+	0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
+};
+
+/*
+ *	Now all the various file operations that we export.
+ */
+
+static ssize_t ds1286_read(struct file *file, char *buf,
+                           size_t count, loff_t *ppos)
+{
+	return -EIO;
+}
+
+static int ds1286_ioctl(struct inode *inode, struct file *file,
+                        unsigned int cmd, unsigned long arg)
+{
+	struct rtc_time wtime;
+
+	switch (cmd) {
+	case RTC_AIE_OFF:	/* Mask alarm int. enab. bit	*/
+	{
+		unsigned int flags;
+		unsigned char val;
+
+		if (!capable(CAP_SYS_TIME))
+			return -EACCES;
+
+		spin_lock_irqsave(&ds1286_lock, flags);
+		val = rtc_read(RTC_CMD);
+		val |=  RTC_TDM;
+		rtc_write(val, RTC_CMD);
+		spin_unlock_irqrestore(&ds1286_lock, flags);
+
+		return 0;
+	}
+	case RTC_AIE_ON:	/* Allow alarm interrupts.	*/
+	{
+		unsigned int flags;
+		unsigned char val;
+
+		if (!capable(CAP_SYS_TIME))
+			return -EACCES;
+
+		spin_lock_irqsave(&ds1286_lock, flags);
+		val = rtc_read(RTC_CMD);
+		val &=  ~RTC_TDM;
+		rtc_write(val, RTC_CMD);
+		spin_unlock_irqrestore(&ds1286_lock, flags);
+
+		return 0;
+	}
+	case RTC_WIE_OFF:	/* Mask watchdog int. enab. bit	*/
+	{
+		unsigned int flags;
+		unsigned char val;
+
+		if (!capable(CAP_SYS_TIME))
+			return -EACCES;
+
+		spin_lock_irqsave(&ds1286_lock, flags);
+		val = rtc_read(RTC_CMD);
+		val |= RTC_WAM;
+		rtc_write(val, RTC_CMD);
+		spin_unlock_irqrestore(&ds1286_lock, flags);
+
+		return 0;
+	}
+	case RTC_WIE_ON:	/* Allow watchdog interrupts.	*/
+	{
+		unsigned int flags;
+		unsigned char val;
+
+		if (!capable(CAP_SYS_TIME))
+			return -EACCES;
+
+		spin_lock_irqsave(&ds1286_lock, flags);
+		val = rtc_read(RTC_CMD);
+		val &= ~RTC_WAM;
+		rtc_write(val, RTC_CMD);
+		spin_unlock_irqrestore(&ds1286_lock, flags);
+
+		return 0;
+	}
+	case RTC_ALM_READ:	/* Read the present alarm time */
+	{
+		/*
+		 * This returns a struct rtc_time. Reading >= 0xc0
+		 * means "don't care" or "match all". Only the tm_hour,
+		 * tm_min, and tm_sec values are filled in.
+		 */
+
+		memset(&wtime, 0, sizeof(wtime));
+		ds1286_get_alm_time(&wtime);
+		break;
+	}
+	case RTC_ALM_SET:	/* Store a time into the alarm */
+	{
+		/*
+		 * This expects a struct rtc_time. Writing 0xff means
+		 * "don't care" or "match all". Only the tm_hour,
+		 * tm_min and tm_sec are used.
+		 */
+		unsigned char hrs, min, sec;
+		struct rtc_time alm_tm;
+
+		if (!capable(CAP_SYS_TIME))
+			return -EACCES;
+
+		if (copy_from_user(&alm_tm, (struct rtc_time*)arg,
+				   sizeof(struct rtc_time)))
+			return -EFAULT;
+
+		hrs = alm_tm.tm_hour;
+		min = alm_tm.tm_min;
+
+		if (hrs >= 24)
+			hrs = 0xff;
+
+		if (min >= 60)
+			min = 0xff;
+
+		BIN_TO_BCD(sec);
+		BIN_TO_BCD(min);
+		BIN_TO_BCD(hrs);
+
+		spin_lock(&ds1286_lock);
+		rtc_write(hrs, RTC_HOURS_ALARM);
+		rtc_write(min, RTC_MINUTES_ALARM);
+		spin_unlock(&ds1286_lock);
+
+		return 0;
+	}
+	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
+	{
+		memset(&wtime, 0, sizeof(wtime));
+		ds1286_get_time(&wtime);
+		break;
+	}
+	case RTC_SET_TIME:	/* Set the RTC */
+	{
+		struct rtc_time rtc_tm;
+
+		if (!capable(CAP_SYS_TIME))
+			return -EACCES;
+
+		if (copy_from_user(&rtc_tm, (struct rtc_time*)arg,
+				   sizeof(struct rtc_time)))
+			return -EFAULT;
+
+		return ds1286_set_time(&rtc_tm);
+	}
+	default:
+		return -EINVAL;
+	}
+	return copy_to_user((void *)arg, &wtime, sizeof wtime) ? -EFAULT : 0;
+}
+
+/*
+ *	We enforce only one user at a time here with the open/close.
+ *	Also clear the previous interrupt data on an open, and clean
+ *	up things on a close.
+ */
+
+static int ds1286_open(struct inode *inode, struct file *file)
+{
+	spin_lock_irq(&ds1286_lock);
+
+	if (ds1286_status & RTC_IS_OPEN)
+		goto out_busy;
+
+	ds1286_status |= RTC_IS_OPEN;
+
+	spin_unlock_irq(&ds1286_lock);
+	return 0;
+
+out_busy:
+	spin_lock_irq(&ds1286_lock);
+	return -EBUSY;
+}
+
+static int ds1286_release(struct inode *inode, struct file *file)
+{
+	ds1286_status &= ~RTC_IS_OPEN;
+
+	return 0;
+}
+
+static unsigned int ds1286_poll(struct file *file, poll_table *wait)
+{
+	poll_wait(file, &ds1286_wait, wait);
+
+	return 0;
+}
+
+/*
+ *	The various file operations we support.
+ */
+
+static struct file_operations ds1286_fops = {
+	.llseek		= no_llseek,
+	.read		= ds1286_read,
+	.poll		= ds1286_poll,
+	.ioctl		= ds1286_ioctl,
+	.open		= ds1286_open,
+	.release	= ds1286_release,
+};
+
+static struct miscdevice ds1286_dev=
+{
+	.minor	= RTC_MINOR,
+	.name	= "rtc",
+	.fops	= &ds1286_fops,
+};
+
+static int __init ds1286_init(void)
+{
+	int err;
+
+	printk(KERN_INFO "DS1286 Real Time Clock Driver v%s\n", DS1286_VERSION);
+
+	err = misc_register(&ds1286_dev);
+	if (err)
+		goto out;
+
+	if (!create_proc_read_entry("driver/rtc", 0, 0, ds1286_read_proc, NULL)) {
+		err = -ENOMEM;
+
+		goto out_deregister;
+	}
+
+	return 0;
+
+out_deregister:
+	misc_deregister(&ds1286_dev);
+
+out:
+	return err;
+}
+
+static void __exit ds1286_exit(void)
+{
+	remove_proc_entry("driver/rtc", NULL);
+	misc_deregister(&ds1286_dev);
+}
+
+static char *days[] = {
+	"***", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+};
+
+/*
+ *	Info exported via "/proc/rtc".
+ */
+static int ds1286_proc_output(char *buf)
+{
+	char *p, *s;
+	struct rtc_time tm;
+	unsigned char hundredth, month, cmd, amode;
+
+	p = buf;
+
+	ds1286_get_time(&tm);
+	hundredth = rtc_read(RTC_HUNDREDTH_SECOND);
+	BCD_TO_BIN(hundredth);
+
+	p += sprintf(p,
+	             "rtc_time\t: %02d:%02d:%02d.%02d\n"
+	             "rtc_date\t: %04d-%02d-%02d\n",
+		     tm.tm_hour, tm.tm_min, tm.tm_sec, hundredth,
+		     tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday);
+
+	/*
+	 * We implicitly assume 24hr mode here. Alarm values >= 0xc0 will
+	 * match any value for that particular field. Values that are
+	 * greater than a valid time, but less than 0xc0 shouldn't appear.
+	 */
+	ds1286_get_alm_time(&tm);
+	p += sprintf(p, "alarm\t\t: %s ", days[tm.tm_wday]);
+	if (tm.tm_hour <= 24)
+		p += sprintf(p, "%02d:", tm.tm_hour);
+	else
+		p += sprintf(p, "**:");
+
+	if (tm.tm_min <= 59)
+		p += sprintf(p, "%02d\n", tm.tm_min);
+	else
+		p += sprintf(p, "**\n");
+
+	month = rtc_read(RTC_MONTH);
+	p += sprintf(p,
+	             "oscillator\t: %s\n"
+	             "square_wave\t: %s\n",
+	             (month & RTC_EOSC) ? "disabled" : "enabled",
+	             (month & RTC_ESQW) ? "disabled" : "enabled");
+
+	amode = ((rtc_read(RTC_MINUTES_ALARM) & 0x80) >> 5) |
+	        ((rtc_read(RTC_HOURS_ALARM) & 0x80) >> 6) |
+	        ((rtc_read(RTC_DAY_ALARM) & 0x80) >> 7);
+	if (amode == 7)      s = "each minute";
+	else if (amode == 3) s = "minutes match";
+	else if (amode == 1) s = "hours and minutes match";
+	else if (amode == 0) s = "days, hours and minutes match";
+	else                 s = "invalid";
+	p += sprintf(p, "alarm_mode\t: %s\n", s);
+
+	cmd = rtc_read(RTC_CMD);
+	p += sprintf(p,
+	             "alarm_enable\t: %s\n"
+	             "wdog_alarm\t: %s\n"
+	             "alarm_mask\t: %s\n"
+	             "wdog_alarm_mask\t: %s\n"
+	             "interrupt_mode\t: %s\n"
+	             "INTB_mode\t: %s_active\n"
+	             "interrupt_pins\t: %s\n",
+		     (cmd & RTC_TDF) ? "yes" : "no",
+		     (cmd & RTC_WAF) ? "yes" : "no",
+		     (cmd & RTC_TDM) ? "disabled" : "enabled",
+		     (cmd & RTC_WAM) ? "disabled" : "enabled",
+		     (cmd & RTC_PU_LVL) ? "pulse" : "level",
+		     (cmd & RTC_IBH_LO) ? "low" : "high",
+	             (cmd & RTC_IPSW) ? "unswapped" : "swapped");
+
+	return  p - buf;
+}
+
+static int ds1286_read_proc(char *page, char **start, off_t off,
+                         int count, int *eof, void *data)
+{
+	int len = ds1286_proc_output (page);
+	if (len <= off+count) *eof = 1;
+	*start = page + off;
+	len -= off;
+	if (len>count)
+		len = count;
+	if (len<0)
+		len = 0;
+
+	return len;
+}
+
+/*
+ * Returns true if a clock update is in progress
+ */
+static inline unsigned char ds1286_is_updating(void)
+{
+	return rtc_read(RTC_CMD) & RTC_TE;
+}
+
+
+static void ds1286_get_time(struct rtc_time *rtc_tm)
+{
+	unsigned char save_control;
+	unsigned int flags;
+	unsigned long uip_watchdog = jiffies;
+
+	/*
+	 * read RTC once any update in progress is done. The update
+	 * can take just over 2ms. We wait 10 to 20ms. There is no need to
+	 * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP.
+	 * If you need to know *exactly* when a second has started, enable
+	 * periodic update complete interrupts, (via ioctl) and then
+	 * immediately read /dev/rtc which will block until you get the IRQ.
+	 * Once the read clears, read the RTC time (again via ioctl). Easy.
+	 */
+
+	if (ds1286_is_updating() != 0)
+		while (jiffies - uip_watchdog < 2*HZ/100)
+			barrier();
+
+	/*
+	 * Only the values that we read from the RTC are set. We leave
+	 * tm_wday, tm_yday and tm_isdst untouched. Even though the
+	 * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
+	 * by the RTC when initially set to a non-zero value.
+	 */
+	spin_lock_irqsave(&ds1286_lock, flags);
+	save_control = rtc_read(RTC_CMD);
+	rtc_write((save_control|RTC_TE), RTC_CMD);
+
+	rtc_tm->tm_sec = rtc_read(RTC_SECONDS);
+	rtc_tm->tm_min = rtc_read(RTC_MINUTES);
+	rtc_tm->tm_hour = rtc_read(RTC_HOURS) & 0x3f;
+	rtc_tm->tm_mday = rtc_read(RTC_DATE);
+	rtc_tm->tm_mon = rtc_read(RTC_MONTH) & 0x1f;
+	rtc_tm->tm_year = rtc_read(RTC_YEAR);
+
+	rtc_write(save_control, RTC_CMD);
+	spin_unlock_irqrestore(&ds1286_lock, flags);
+
+	BCD_TO_BIN(rtc_tm->tm_sec);
+	BCD_TO_BIN(rtc_tm->tm_min);
+	BCD_TO_BIN(rtc_tm->tm_hour);
+	BCD_TO_BIN(rtc_tm->tm_mday);
+	BCD_TO_BIN(rtc_tm->tm_mon);
+	BCD_TO_BIN(rtc_tm->tm_year);
+
+	/*
+	 * Account for differences between how the RTC uses the values
+	 * and how they are defined in a struct rtc_time;
+	 */
+	if (rtc_tm->tm_year < 45)
+		rtc_tm->tm_year += 30;
+	if ((rtc_tm->tm_year += 40) < 70)
+		rtc_tm->tm_year += 100;
+
+	rtc_tm->tm_mon--;
+}
+
+static int ds1286_set_time(struct rtc_time *rtc_tm)
+{
+	unsigned char mon, day, hrs, min, sec, leap_yr;
+	unsigned char save_control;
+	unsigned int yrs, flags;
+
+
+	yrs = rtc_tm->tm_year + 1900;
+	mon = rtc_tm->tm_mon + 1;   /* tm_mon starts at zero */
+	day = rtc_tm->tm_mday;
+	hrs = rtc_tm->tm_hour;
+	min = rtc_tm->tm_min;
+	sec = rtc_tm->tm_sec;
+
+	if (yrs < 1970)
+		return -EINVAL;
+
+	leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400));
+
+	if ((mon > 12) || (day == 0))
+		return -EINVAL;
+
+	if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr)))
+		return -EINVAL;
+
+	if ((hrs >= 24) || (min >= 60) || (sec >= 60))
+		return -EINVAL;
+
+	if ((yrs -= 1940) > 255)    /* They are unsigned */
+		return -EINVAL;
+
+	if (yrs >= 100)
+		yrs -= 100;
+
+	BIN_TO_BCD(sec);
+	BIN_TO_BCD(min);
+	BIN_TO_BCD(hrs);
+	BIN_TO_BCD(day);
+	BIN_TO_BCD(mon);
+	BIN_TO_BCD(yrs);
+
+	spin_lock_irqsave(&ds1286_lock, flags);
+	save_control = rtc_read(RTC_CMD);
+	rtc_write((save_control|RTC_TE), RTC_CMD);
+
+	rtc_write(yrs, RTC_YEAR);
+	rtc_write(mon, RTC_MONTH);
+	rtc_write(day, RTC_DATE);
+	rtc_write(hrs, RTC_HOURS);
+	rtc_write(min, RTC_MINUTES);
+	rtc_write(sec, RTC_SECONDS);
+	rtc_write(0, RTC_HUNDREDTH_SECOND);
+
+	rtc_write(save_control, RTC_CMD);
+	spin_unlock_irqrestore(&ds1286_lock, flags);
+
+	return 0;
+}
+
+static void ds1286_get_alm_time(struct rtc_time *alm_tm)
+{
+	unsigned char cmd;
+	unsigned int flags;
+
+	/*
+	 * Only the values that we read from the RTC are set. That
+	 * means only tm_wday, tm_hour, tm_min.
+	 */
+	spin_lock_irqsave(&ds1286_lock, flags);
+	alm_tm->tm_min = rtc_read(RTC_MINUTES_ALARM) & 0x7f;
+	alm_tm->tm_hour = rtc_read(RTC_HOURS_ALARM)  & 0x1f;
+	alm_tm->tm_wday = rtc_read(RTC_DAY_ALARM)    & 0x07;
+	cmd = rtc_read(RTC_CMD);
+	spin_unlock_irqrestore(&ds1286_lock, flags);
+
+	BCD_TO_BIN(alm_tm->tm_min);
+	BCD_TO_BIN(alm_tm->tm_hour);
+	alm_tm->tm_sec = 0;
+}
+
+module_init(ds1286_init);
+module_exit(ds1286_exit);
+
+MODULE_AUTHOR("Ralf Baechle");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS_MISCDEV(RTC_MINOR);
--- diff/drivers/char/hpet.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/char/hpet.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,999 @@
+/*
+ * Intel & MS High Precision Event Timer Implementation.
+ * Contributors:
+ *	Venki Pallipadi
+ * 	Bob Picco
+ */
+
+#include <linux/config.h>
+#include <linux/interrupt.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/miscdevice.h>
+#include <linux/major.h>
+#include <linux/ioport.h>
+#include <linux/fcntl.h>
+#include <linux/init.h>
+#include <linux/poll.h>
+#include <linux/proc_fs.h>
+#include <linux/spinlock.h>
+#include <linux/sysctl.h>
+#include <linux/wait.h>
+#include <linux/bcd.h>
+#include <linux/seq_file.h>
+
+#include <asm/current.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/bitops.h>
+#include <asm/div64.h>
+
+#include <linux/acpi.h>
+#include <acpi/acpi_bus.h>
+#include <linux/hpet.h>
+
+/*
+ * The High Precision Event Timer driver.
+ * This driver is closely modelled after the rtc.c driver.
+ * http://www.intel.com/labs/platcomp/hpet/hpetspec.htm
+ */
+#define	HPET_USER_FREQ	(64)
+#define	HPET_DRIFT	(500)
+
+static u32 hpet_ntimer, hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
+
+/* A lock for concurrent access by app and isr hpet activity. */
+static spinlock_t hpet_lock = SPIN_LOCK_UNLOCKED;
+/* A lock for concurrent intermodule access to hpet and isr hpet activity. */
+static spinlock_t hpet_task_lock = SPIN_LOCK_UNLOCKED;
+
+#define	HPET_DEV_NAME	(7)
+
+struct hpet_dev {
+	struct hpets *hd_hpets;
+	struct hpet *hd_hpet;
+	struct hpet_timer *hd_timer;
+	unsigned long hd_ireqfreq;
+	unsigned long hd_irqdata;
+	wait_queue_head_t hd_waitqueue;
+	struct fasync_struct *hd_async_queue;
+	struct hpet_task *hd_task;
+	unsigned int hd_flags;
+	unsigned int hd_irq;
+	unsigned int hd_hdwirq;
+	char hd_name[HPET_DEV_NAME];
+};
+
+struct hpets {
+	struct hpets *hp_next;
+	struct hpet *hp_hpet;
+	unsigned long hp_period;
+	unsigned long hp_delta;
+	unsigned int hp_ntimer;
+	unsigned int hp_which;
+	struct hpet_dev hp_dev[1];
+};
+
+static struct hpets *hpets;
+
+#define	HPET_OPEN		0x0001
+#define	HPET_IE			0x0002	/* interrupt enabled */
+#define	HPET_PERIODIC		0x0004
+
+#if BITS_PER_LONG == 64
+#define	write_counter(V, MC)	writeq(V, MC)
+#define	read_counter(MC)	readq(MC)
+#else
+#define	write_counter(V, MC) 	writel(V, MC)
+#define	read_counter(MC)	readl(MC)
+#endif
+
+#ifndef readq
+static unsigned long long __inline readq(void *addr)
+{
+	return readl(addr) | (((unsigned long long)readl(addr + 4)) << 32LL);
+}
+#endif
+
+#ifndef writeq
+static void __inline writeq(unsigned long long v, void *addr)
+{
+	writel(v & 0xffffffff, addr);
+	writel(v >> 32, addr + 4);
+}
+#endif
+
+static irqreturn_t hpet_interrupt(int irq, void *data, struct pt_regs *regs)
+{
+	struct hpet_dev *devp;
+	unsigned long isr;
+
+	devp = data;
+
+	spin_lock(&hpet_lock);
+	devp->hd_irqdata++;
+
+	/*
+	 * For non-periodic timers, increment the accumulator.
+	 * This has the effect of treating non-periodic like periodic.
+	 */
+	if ((devp->hd_flags & (HPET_IE | HPET_PERIODIC)) == HPET_IE) {
+		unsigned long m, t;
+
+		t = devp->hd_ireqfreq;
+		m = read_counter(&devp->hd_hpet->hpet_mc);
+		write_counter(t + m + devp->hd_hpets->hp_delta,
+			      &devp->hd_timer->hpet_compare);
+	}
+
+	isr = (1 << (devp - devp->hd_hpets->hp_dev));
+	writeq(isr, &devp->hd_hpet->hpet_isr);
+	spin_unlock(&hpet_lock);
+
+	spin_lock(&hpet_task_lock);
+	if (devp->hd_task)
+		devp->hd_task->ht_func(devp->hd_task->ht_data);
+	spin_unlock(&hpet_task_lock);
+
+	wake_up_interruptible(&devp->hd_waitqueue);
+
+	kill_fasync(&devp->hd_async_queue, SIGIO, POLL_IN);
+
+	return IRQ_HANDLED;
+}
+
+static int hpet_open(struct inode *inode, struct file *file)
+{
+	struct hpet_dev *devp;
+	struct hpets *hpetp;
+	int i;
+
+	if (file->f_mode & FMODE_WRITE)
+		return -EINVAL;
+
+	spin_lock_irq(&hpet_lock);
+
+	for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
+		for (i = 0; i < hpetp->hp_ntimer; i++)
+			if (hpetp->hp_dev[i].hd_flags & HPET_OPEN
+			    || hpetp->hp_dev[i].hd_task)
+				continue;
+			else {
+				devp = &hpetp->hp_dev[i];
+				break;
+			}
+
+	if (!devp) {
+		spin_unlock_irq(&hpet_lock);
+		return -EBUSY;
+	}
+
+	file->private_data = devp;
+	devp->hd_irqdata = 0;
+	devp->hd_flags |= HPET_OPEN;
+	spin_unlock_irq(&hpet_lock);
+
+	return 0;
+}
+
+static ssize_t
+hpet_read(struct file *file, char __user *buf, size_t count, loff_t * ppos)
+{
+	DECLARE_WAITQUEUE(wait, current);
+	unsigned long data;
+	ssize_t retval;
+	struct hpet_dev *devp;
+
+	devp = file->private_data;
+	if (!devp->hd_ireqfreq)
+		return -EIO;
+
+	if (count < sizeof(unsigned long))
+		return -EINVAL;
+
+	add_wait_queue(&devp->hd_waitqueue, &wait);
+
+	for ( ; ; ) {
+		set_current_state(TASK_INTERRUPTIBLE);
+
+		spin_lock_irq(&hpet_lock);
+		data = devp->hd_irqdata;
+		devp->hd_irqdata = 0;
+		spin_unlock_irq(&hpet_lock);
+
+		if (data)
+			break;
+		else if (file->f_flags & O_NONBLOCK) {
+			retval = -EAGAIN;
+			goto out;
+		} else if (signal_pending(current)) {
+			retval = -ERESTARTSYS;
+			goto out;
+		}
+		schedule();
+	}
+
+	retval = put_user(data, (unsigned long __user *)buf);
+	if (!retval)
+		retval = sizeof(unsigned long);
+out:
+	__set_current_state(TASK_RUNNING);
+	remove_wait_queue(&devp->hd_waitqueue, &wait);
+
+	return retval;
+}
+
+static unsigned int hpet_poll(struct file *file, poll_table * wait)
+{
+	unsigned long v;
+	struct hpet_dev *devp;
+
+	devp = file->private_data;
+
+	if (!devp->hd_ireqfreq)
+		return 0;
+
+	poll_wait(file, &devp->hd_waitqueue, wait);
+
+	spin_lock_irq(&hpet_lock);
+	v = devp->hd_irqdata;
+	spin_unlock_irq(&hpet_lock);
+
+	if (v != 0)
+		return POLLIN | POLLRDNORM;
+
+	return 0;
+}
+
+static int hpet_mmap(struct file *file, struct vm_area_struct *vma)
+{
+#ifdef	CONFIG_HPET_NOMMAP
+	return -ENOSYS;
+#else
+	struct hpet_dev *devp;
+	unsigned long addr;
+
+	if (((vma->vm_end - vma->vm_start) != PAGE_SIZE) || vma->vm_pgoff)
+		return -EINVAL;
+
+	devp = file->private_data;
+	addr = (unsigned long)devp->hd_hpet;
+
+	if (addr & (PAGE_SIZE - 1))
+		return -ENOSYS;
+
+	vma->vm_flags |= VM_IO;
+	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+	addr = __pa(addr);
+
+	if (remap_page_range
+	    (vma, vma->vm_start, addr, PAGE_SIZE, vma->vm_page_prot)) {
+		printk(KERN_ERR "remap_page_range failed in hpet.c\n");
+		return -EAGAIN;
+	}
+
+	return 0;
+#endif
+}
+
+static int hpet_fasync(int fd, struct file *file, int on)
+{
+	struct hpet_dev *devp;
+
+	devp = file->private_data;
+
+	if (fasync_helper(fd, file, on, &devp->hd_async_queue) >= 0)
+		return 0;
+	else
+		return -EIO;
+}
+
+static int hpet_release(struct inode *inode, struct file *file)
+{
+	struct hpet_dev *devp;
+	struct hpet_timer *timer;
+	int irq = 0;
+
+	devp = file->private_data;
+	timer = devp->hd_timer;
+
+	spin_lock_irq(&hpet_lock);
+
+	writeq((readq(&timer->hpet_config) & ~Tn_INT_ENB_CNF_MASK),
+	       &timer->hpet_config);
+
+	irq = devp->hd_irq;
+	devp->hd_irq = 0;
+
+	devp->hd_ireqfreq = 0;
+
+	if (devp->hd_flags & HPET_PERIODIC
+	    && readq(&timer->hpet_config) & Tn_TYPE_CNF_MASK) {
+		unsigned long v;
+
+		v = readq(&timer->hpet_config);
+		v ^= Tn_TYPE_CNF_MASK;
+		writeq(v, &timer->hpet_config);
+	}
+
+	devp->hd_flags &= ~(HPET_OPEN | HPET_IE | HPET_PERIODIC);
+	spin_unlock_irq(&hpet_lock);
+
+	if (irq)
+		free_irq(irq, devp);
+
+	if (file->f_flags & FASYNC)
+		hpet_fasync(-1, file, 0);
+
+	file->private_data = 0;
+	return 0;
+}
+
+static int hpet_ioctl_common(struct hpet_dev *, int, unsigned long, int);
+
+static int
+hpet_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+	   unsigned long arg)
+{
+	struct hpet_dev *devp;
+
+	devp = file->private_data;
+	return hpet_ioctl_common(devp, cmd, arg, 0);
+}
+
+static int hpet_ioctl_ieon(struct hpet_dev *devp)
+{
+	struct hpet_timer *timer;
+	struct hpet *hpet;
+	struct hpets *hpetp;
+	int irq;
+	unsigned long g, v, t, m;
+	unsigned long flags, isr;
+
+	timer = devp->hd_timer;
+	hpet = devp->hd_hpet;
+	hpetp = devp->hd_hpets;
+
+	v = readq(&timer->hpet_config);
+	spin_lock_irq(&hpet_lock);
+
+	if (devp->hd_flags & HPET_IE) {
+		spin_unlock_irq(&hpet_lock);
+		return -EBUSY;
+	}
+
+	devp->hd_flags |= HPET_IE;
+	spin_unlock_irq(&hpet_lock);
+
+	t = readq(&timer->hpet_config);
+	irq = devp->hd_hdwirq;
+
+	if (irq) {
+		sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev));
+
+		if (request_irq
+		    (irq, hpet_interrupt, SA_INTERRUPT, devp->hd_name, (void *)devp)) {
+			printk(KERN_ERR "hpet: IRQ %d is not free\n", irq);
+			irq = 0;
+		}
+	}
+
+	if (irq == 0) {
+		spin_lock_irq(&hpet_lock);
+		devp->hd_flags ^= HPET_IE;
+		spin_unlock_irq(&hpet_lock);
+		return -EIO;
+	}
+
+	devp->hd_irq = irq;
+	t = devp->hd_ireqfreq;
+	v = readq(&timer->hpet_config);
+	g = v | Tn_INT_ENB_CNF_MASK;
+
+	if (devp->hd_flags & HPET_PERIODIC) {
+		write_counter(t, &timer->hpet_compare);
+		g |= Tn_TYPE_CNF_MASK;
+		v |= Tn_TYPE_CNF_MASK;
+		writeq(v, &timer->hpet_config);
+		v |= Tn_VAL_SET_CNF_MASK;
+		writeq(v, &timer->hpet_config);
+		local_irq_save(flags);
+		m = read_counter(&hpet->hpet_mc);
+		write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
+	} else {
+		local_irq_save(flags);
+		m = read_counter(&hpet->hpet_mc);
+		write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
+	}
+
+	isr = (1 << (devp - hpets->hp_dev));
+	writeq(isr, &hpet->hpet_isr);
+	writeq(g, &timer->hpet_config);
+	local_irq_restore(flags);
+
+	return 0;
+}
+
+static inline unsigned long hpet_time_div(unsigned long dis)
+{
+	unsigned long long m = 1000000000000000ULL;
+
+	do_div(m, dis);
+
+	return (unsigned long)m;
+}
+
+static int
+hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel)
+{
+	struct hpet_timer *timer;
+	struct hpet *hpet;
+	struct hpets *hpetp;
+	int err;
+	unsigned long v;
+
+	switch (cmd) {
+	case HPET_IE_OFF:
+	case HPET_INFO:
+	case HPET_EPI:
+	case HPET_DPI:
+	case HPET_IRQFREQ:
+		timer = devp->hd_timer;
+		hpet = devp->hd_hpet;
+		hpetp = devp->hd_hpets;
+		break;
+	case HPET_IE_ON:
+		return hpet_ioctl_ieon(devp);
+	default:
+		return -EINVAL;
+	}
+
+	err = 0;
+
+	switch (cmd) {
+	case HPET_IE_OFF:
+		if ((devp->hd_flags & HPET_IE) == 0)
+			break;
+		v = readq(&timer->hpet_config);
+		v &= ~Tn_INT_ENB_CNF_MASK;
+		writeq(v, &timer->hpet_config);
+		if (devp->hd_irq) {
+			free_irq(devp->hd_irq, devp);
+			devp->hd_irq = 0;
+		}
+		devp->hd_flags ^= HPET_IE;
+		break;
+	case HPET_INFO:
+		{
+			struct hpet_info info;
+
+			info.hi_ireqfreq = hpet_time_div(hpetp->hp_period *
+							 devp->hd_ireqfreq);
+			info.hi_flags =
+			    readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK;
+			info.hi_hpet = devp->hd_hpets->hp_which;
+			info.hi_timer = devp - devp->hd_hpets->hp_dev;
+			if (copy_to_user((void __user *)arg, &info, sizeof(info)))
+				err = -EFAULT;
+			break;
+		}
+	case HPET_EPI:
+		v = readq(&timer->hpet_config);
+		if ((v & Tn_PER_INT_CAP_MASK) == 0) {
+			err = -ENXIO;
+			break;
+		}
+		devp->hd_flags |= HPET_PERIODIC;
+		break;
+	case HPET_DPI:
+		v = readq(&timer->hpet_config);
+		if ((v & Tn_PER_INT_CAP_MASK) == 0) {
+			err = -ENXIO;
+			break;
+		}
+		if (devp->hd_flags & HPET_PERIODIC &&
+		    readq(&timer->hpet_config) & Tn_TYPE_CNF_MASK) {
+			v = readq(&timer->hpet_config);
+			v ^= Tn_TYPE_CNF_MASK;
+			writeq(v, &timer->hpet_config);
+		}
+		devp->hd_flags &= ~HPET_PERIODIC;
+		break;
+	case HPET_IRQFREQ:
+		if (!kernel && (arg > hpet_max_freq) &&
+		    !capable(CAP_SYS_RESOURCE)) {
+			err = -EACCES;
+			break;
+		}
+
+		if (arg & (arg - 1)) {
+			err = -EINVAL;
+			break;
+		}
+
+		devp->hd_ireqfreq = hpet_time_div(hpetp->hp_period * arg);
+	}
+
+	return err;
+}
+
+static struct file_operations hpet_fops = {
+	.owner = THIS_MODULE,
+	.llseek = no_llseek,
+	.read = hpet_read,
+	.poll = hpet_poll,
+	.ioctl = hpet_ioctl,
+	.open = hpet_open,
+	.release = hpet_release,
+	.fasync = hpet_fasync,
+	.mmap = hpet_mmap,
+};
+
+EXPORT_SYMBOL(hpet_alloc);
+EXPORT_SYMBOL(hpet_register);
+EXPORT_SYMBOL(hpet_unregister);
+EXPORT_SYMBOL(hpet_control);
+
+int hpet_register(struct hpet_task *tp, int periodic)
+{
+	unsigned int i;
+	u64 mask;
+	struct hpet_timer *timer;
+	struct hpet_dev *devp;
+	struct hpets *hpetp;
+
+	switch (periodic) {
+	case 1:
+		mask = Tn_PER_INT_CAP_MASK;
+		break;
+	case 0:
+		mask = 0;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	spin_lock_irq(&hpet_task_lock);
+	spin_lock(&hpet_lock);
+
+	for (devp = 0, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
+		for (timer = hpetp->hp_hpet->hpet_timers, i = 0;
+		     i < hpetp->hp_ntimer; i++, timer++) {
+			if ((readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK)
+			    != mask)
+				continue;
+
+			devp = &hpetp->hp_dev[i];
+
+			if (devp->hd_flags & HPET_OPEN || devp->hd_task) {
+				devp = 0;
+				continue;
+			}
+
+			tp->ht_opaque = devp;
+			devp->hd_task = tp;
+			break;
+		}
+
+	spin_unlock(&hpet_lock);
+	spin_unlock_irq(&hpet_task_lock);
+
+	if (tp->ht_opaque)
+		return 0;
+	else
+		return -EBUSY;
+}
+
+static inline int hpet_tpcheck(struct hpet_task *tp)
+{
+	struct hpet_dev *devp;
+	struct hpets *hpetp;
+
+	devp = tp->ht_opaque;
+
+	if (!devp)
+		return -ENXIO;
+
+	for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
+		if (devp >= hpetp->hp_dev
+		    && devp < (hpetp->hp_dev + hpetp->hp_ntimer)
+		    && devp->hd_hpet == hpetp->hp_hpet)
+			return 0;
+
+	return -ENXIO;
+}
+
+int hpet_unregister(struct hpet_task *tp)
+{
+	struct hpet_dev *devp;
+	struct hpet_timer *timer;
+	int err;
+
+	if ((err = hpet_tpcheck(tp)))
+		return err;
+
+	spin_lock_irq(&hpet_task_lock);
+	spin_lock(&hpet_lock);
+
+	devp = tp->ht_opaque;
+	if (devp->hd_task != tp) {
+		spin_unlock(&hpet_lock);
+		spin_unlock_irq(&hpet_task_lock);
+		return -ENXIO;
+	}
+
+	timer = devp->hd_timer;
+	writeq((readq(&timer->hpet_config) & ~Tn_INT_ENB_CNF_MASK),
+	       &timer->hpet_config);
+	devp->hd_flags &= ~(HPET_IE | HPET_PERIODIC);
+	devp->hd_task = 0;
+	spin_unlock(&hpet_lock);
+	spin_unlock_irq(&hpet_task_lock);
+
+	return 0;
+}
+
+int hpet_control(struct hpet_task *tp, unsigned int cmd, unsigned long arg)
+{
+	struct hpet_dev *devp;
+	int err;
+
+	if ((err = hpet_tpcheck(tp)))
+		return err;
+
+	spin_lock_irq(&hpet_lock);
+	devp = tp->ht_opaque;
+	if (devp->hd_task != tp) {
+		spin_unlock_irq(&hpet_lock);
+		return -ENXIO;
+	}
+	spin_unlock_irq(&hpet_lock);
+	return hpet_ioctl_common(devp, cmd, arg, 1);
+}
+
+#ifdef	CONFIG_TIME_INTERPOLATION
+
+static unsigned long hpet_offset, last_wall_hpet;
+static long hpet_nsecs_per_cycle, hpet_cycles_per_sec;
+
+static unsigned long hpet_getoffset(void)
+{
+	return hpet_offset + (read_counter(&hpets->hp_hpet->hpet_mc) -
+			      last_wall_hpet) * hpet_nsecs_per_cycle;
+}
+
+static void hpet_update(long delta)
+{
+	unsigned long mc;
+	unsigned long offset;
+
+	mc = read_counter(&hpets->hp_hpet->hpet_mc);
+	offset = hpet_offset + (mc - last_wall_hpet) * hpet_nsecs_per_cycle;
+
+	if (delta < 0 || (unsigned long)delta < offset)
+		hpet_offset = offset - delta;
+	else
+		hpet_offset = 0;
+	last_wall_hpet = mc;
+}
+
+static void hpet_reset(void)
+{
+	hpet_offset = 0;
+	last_wall_hpet = read_counter(&hpets->hp_hpet->hpet_mc);
+}
+
+static struct time_interpolator hpet_interpolator = {
+	.get_offset = hpet_getoffset,
+	.update = hpet_update,
+	.reset = hpet_reset
+};
+
+#endif
+
+static ctl_table hpet_table[] = {
+	{
+	 .ctl_name = 1,
+	 .procname = "max-user-freq",
+	 .data = &hpet_max_freq,
+	 .maxlen = sizeof(int),
+	 .mode = 0644,
+	 .proc_handler = &proc_dointvec,
+	 },
+	{.ctl_name = 0}
+};
+
+static ctl_table hpet_root[] = {
+	{
+	 .ctl_name = 1,
+	 .procname = "hpet",
+	 .maxlen = 0,
+	 .mode = 0555,
+	 .child = hpet_table,
+	 },
+	{.ctl_name = 0}
+};
+
+static ctl_table dev_root[] = {
+	{
+	 .ctl_name = CTL_DEV,
+	 .procname = "dev",
+	 .maxlen = 0,
+	 .mode = 0555,
+	 .child = hpet_root,
+	 },
+	{.ctl_name = 0}
+};
+
+static struct ctl_table_header *sysctl_header;
+
+/*
+ * Adjustment for when arming the timer with
+ * initial conditions.  That is, main counter
+ * ticks expired before interrupts are enabled.
+ */
+#define	TICK_CALIBRATE	(1000UL)
+
+static unsigned long __init hpet_calibrate(struct hpets *hpetp)
+{
+	struct hpet_timer *timer;
+	unsigned long t, m, count, i, flags, start;
+	struct hpet_dev *devp;
+	int j;
+	struct hpet *hpet;
+
+	for (timer = 0, j = 0, devp = hpetp->hp_dev; j < hpetp->hp_ntimer;
+	     j++, devp++)
+		if ((devp->hd_flags & HPET_OPEN) == 0) {
+			timer = devp->hd_timer;
+			break;
+		}
+
+	if (!timer)
+		return 0;
+
+	hpet = hpets->hp_hpet;
+	t = read_counter(&timer->hpet_compare);
+
+	i = 0;
+	count = hpet_time_div(hpetp->hp_period * TICK_CALIBRATE);
+
+	local_irq_save(flags);
+
+	start = read_counter(&hpet->hpet_mc);
+
+	do {
+		m = read_counter(&hpet->hpet_mc);
+		write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
+	} while (i++, (m - start) < count);
+
+	local_irq_restore(flags);
+
+	return (m - start) / i;
+}
+
+int __init hpet_alloc(struct hpet_data *hdp)
+{
+	u64 cap, mcfg;
+	struct hpet_dev *devp;
+	u32 i, ntimer;
+	struct hpets *hpetp;
+	size_t siz;
+	struct hpet *hpet;
+	static struct hpets *last __initdata = (struct hpets *)0;
+
+	/*
+	 * hpet_alloc can be called by platform dependent code.
+	 * if platform dependent code has allocated the hpet
+	 * ACPI also reports hpet, then we catch it here.
+	 */
+	for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
+		if (hpetp->hp_hpet == (struct hpet *)(hdp->hd_address))
+			return 0;
+
+	siz = sizeof(struct hpets) + ((hdp->hd_nirqs - 1) *
+				      sizeof(struct hpet_dev));
+
+	hpetp = kmalloc(siz, GFP_KERNEL);
+
+	if (!hpetp)
+		return -ENOMEM;
+
+	memset(hpetp, 0, siz);
+
+	hpetp->hp_which = hpet_nhpet++;
+	hpetp->hp_hpet = (struct hpet *)hdp->hd_address;
+
+	hpetp->hp_ntimer = hdp->hd_nirqs;
+
+	for (i = 0; i < hdp->hd_nirqs; i++)
+		hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i];
+
+	hpet = hpetp->hp_hpet;
+
+	cap = readq(&hpet->hpet_cap);
+
+	ntimer = ((cap & HPET_NUM_TIM_CAP_MASK) >> HPET_NUM_TIM_CAP_SHIFT) + 1;
+
+	if (hpetp->hp_ntimer != ntimer) {
+		printk(KERN_WARNING "hpet: number irqs doesn't agree"
+		       " with number of timers\n");
+		kfree(hpetp);
+		return -ENODEV;
+	}
+
+	if (last)
+		last->hp_next = hpetp;
+	else
+		hpets = hpetp;
+
+	last = hpetp;
+
+	hpetp->hp_period = (cap & HPET_COUNTER_CLK_PERIOD_MASK) >>
+	    HPET_COUNTER_CLK_PERIOD_SHIFT;
+
+	mcfg = readq(&hpet->hpet_config);
+	if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) {
+		write_counter(0L, &hpet->hpet_mc);
+		mcfg |= HPET_ENABLE_CNF_MASK;
+		writeq(mcfg, &hpet->hpet_config);
+	}
+
+	for (i = 0, devp = hpetp->hp_dev; i < hpetp->hp_ntimer;
+	     i++, hpet_ntimer++, devp++) {
+		unsigned long v;
+		struct hpet_timer *timer;
+
+		timer = &hpet->hpet_timers[devp - hpetp->hp_dev];
+		v = readq(&timer->hpet_config);
+
+		devp->hd_hpets = hpetp;
+		devp->hd_hpet = hpet;
+		devp->hd_timer = timer;
+
+		/*
+		 * If the timer was reserved by platform code,
+		 * then make timer unavailable for opens.
+		 */
+		if (hdp->hd_state & (1 << i)) {
+			devp->hd_flags = HPET_OPEN;
+			continue;
+		}
+
+		init_waitqueue_head(&devp->hd_waitqueue);
+	}
+
+	hpetp->hp_delta = hpet_calibrate(hpetp);
+
+	return 0;
+}
+
+static acpi_status __init hpet_resources(struct acpi_resource *res, void *data)
+{
+	struct hpet_data *hdp;
+	acpi_status status;
+	struct acpi_resource_address64 addr;
+	struct hpets *hpetp;
+
+	hdp = data;
+
+	status = acpi_resource_to_address64(res, &addr);
+
+	if (ACPI_SUCCESS(status)) {
+		unsigned long size;
+
+		size = addr.max_address_range - addr.min_address_range + 1;
+		hdp->hd_address =
+		    (unsigned long)ioremap(addr.min_address_range, size);
+
+		for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
+			if (hpetp->hp_hpet == (struct hpet *)(hdp->hd_address))
+				return -EBUSY;
+	} else if (res->id == ACPI_RSTYPE_EXT_IRQ) {
+		struct acpi_resource_ext_irq *irqp;
+		int i;
+
+		irqp = &res->data.extended_irq;
+
+		if (irqp->number_of_interrupts > 0) {
+			hdp->hd_nirqs = irqp->number_of_interrupts;
+
+			for (i = 0; i < hdp->hd_nirqs; i++)
+#ifdef	CONFIG_IA64
+				hdp->hd_irq[i] =
+				    acpi_register_gsi(irqp->interrupts[i],
+						      irqp->edge_level,
+						      irqp->active_high_low);
+#else
+				hdp->hd_irq[i] = irqp->interrupts[i];
+#endif
+		}
+	}
+
+	return AE_OK;
+}
+
+static int __init hpet_acpi_add(struct acpi_device *device)
+{
+	acpi_status result;
+	struct hpet_data data;
+
+	memset(&data, 0, sizeof(data));
+
+	result =
+	    acpi_walk_resources(device->handle, METHOD_NAME__CRS,
+				hpet_resources, &data);
+
+	if (ACPI_FAILURE(result))
+		return -ENODEV;
+
+	if (!data.hd_address || !data.hd_nirqs) {
+		printk("%s: no address or irqs in _CRS\n", __FUNCTION__);
+		return -ENODEV;
+	}
+
+	return hpet_alloc(&data);
+}
+
+static int __init hpet_acpi_remove(struct acpi_device *device, int type)
+{
+	return 0;
+}
+
+static struct acpi_driver hpet_acpi_driver __initdata = {
+	.name = "hpet",
+	.class = "",
+	.ids = "PNP0103",
+	.ops = {
+		.add = hpet_acpi_add,
+		.remove = hpet_acpi_remove,
+		},
+};
+
+static struct miscdevice hpet_misc = { HPET_MINOR, "hpet", &hpet_fops };
+
+static int __init hpet_init(void)
+{
+	(void)acpi_bus_register_driver(&hpet_acpi_driver);
+
+	if (hpets) {
+		if (misc_register(&hpet_misc))
+			return -ENODEV;
+
+		sysctl_header = register_sysctl_table(dev_root, 0);
+
+#ifdef	CONFIG_TIME_INTERPOLATION
+		{
+			struct hpet *hpet;
+
+			hpet = hpets->hp_hpet;
+			hpet_cycles_per_sec = hpet_time_div(hpets->hp_period);
+			hpet_interpolator.frequency = hpet_cycles_per_sec;
+			hpet_interpolator.drift = hpet_cycles_per_sec *
+			    HPET_DRIFT / 1000000;
+			hpet_nsecs_per_cycle = 1000000000 / hpet_cycles_per_sec;
+			register_time_interpolator(&hpet_interpolator);
+		}
+#endif
+		return 0;
+	} else
+		return -ENODEV;
+}
+
+static void __exit hpet_exit(void)
+{
+	acpi_bus_unregister_driver(&hpet_acpi_driver);
+
+	if (hpets)
+		unregister_sysctl_table(sysctl_header);
+
+	return;
+}
+
+module_init(hpet_init);
+module_exit(hpet_exit);
+MODULE_AUTHOR("Bob Picco <Robert.Picco@hp.com>");
+MODULE_LICENSE("GPL");
--- diff/drivers/char/ip27-rtc.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/char/ip27-rtc.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,327 @@
+/*
+ *	Driver for the SGS-Thomson M48T35 Timekeeper RAM chip
+ *
+ *	Real Time Clock interface for Linux
+ *
+ *	TODO: Implement periodic interrupts.
+ *
+ *	Copyright (C) 2000 Silicon Graphics, Inc.
+ *	Written by Ulf Carlsson (ulfc@engr.sgi.com)
+ *
+ *	Based on code written by Paul Gortmaker.
+ *
+ *	This driver allows use of the real time clock (built into
+ *	nearly all computers) from user space. It exports the /dev/rtc
+ *	interface supporting various ioctl() and also the /proc/rtc
+ *	pseudo-file for status information.
+ *
+ *	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.
+ *
+ */
+
+#define RTC_VERSION		"1.09b"
+
+#include <linux/bcd.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/miscdevice.h>
+#include <linux/ioport.h>
+#include <linux/fcntl.h>
+#include <linux/rtc.h>
+#include <linux/init.h>
+#include <linux/poll.h>
+#include <linux/proc_fs.h>
+#include <linux/smp_lock.h>
+
+#include <asm/m48t35.h>
+#include <asm/sn/ioc3.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/sn/klconfig.h>
+#include <asm/sn/sn0/ip27.h>
+#include <asm/sn/sn0/hub.h>
+#include <asm/sn/sn_private.h>
+
+static int rtc_ioctl(struct inode *inode, struct file *file,
+		     unsigned int cmd, unsigned long arg);
+
+static int rtc_read_proc(char *page, char **start, off_t off,
+                         int count, int *eof, void *data);
+
+static void get_rtc_time(struct rtc_time *rtc_tm);
+
+/*
+ *	Bits in rtc_status. (6 bits of room for future expansion)
+ */
+
+#define RTC_IS_OPEN		0x01	/* means /dev/rtc is in use	*/
+#define RTC_TIMER_ON		0x02	/* missed irq timer active	*/
+
+static unsigned char rtc_status;	/* bitmapped status byte.	*/
+static unsigned long rtc_freq;	/* Current periodic IRQ rate	*/
+static struct m48t35_rtc *rtc;
+
+/*
+ *	If this driver ever becomes modularised, it will be really nice
+ *	to make the epoch retain its value across module reload...
+ */
+
+static unsigned long epoch = 1970;	/* year corresponding to 0x00	*/
+
+static const unsigned char days_in_mo[] =
+{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+
+static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+		     unsigned long arg)
+{
+
+	struct rtc_time wtime;
+
+	switch (cmd) {
+	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
+	{
+		get_rtc_time(&wtime);
+		break;
+	}
+	case RTC_SET_TIME:	/* Set the RTC */
+	{
+		struct rtc_time rtc_tm;
+		unsigned char mon, day, hrs, min, sec, leap_yr;
+		unsigned int yrs;
+
+		if (!capable(CAP_SYS_TIME))
+			return -EACCES;
+
+		if (copy_from_user(&rtc_tm, (struct rtc_time*)arg,
+				   sizeof(struct rtc_time)))
+			return -EFAULT;
+
+		yrs = rtc_tm.tm_year + 1900;
+		mon = rtc_tm.tm_mon + 1;   /* tm_mon starts at zero */
+		day = rtc_tm.tm_mday;
+		hrs = rtc_tm.tm_hour;
+		min = rtc_tm.tm_min;
+		sec = rtc_tm.tm_sec;
+
+		if (yrs < 1970)
+			return -EINVAL;
+
+		leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400));
+
+		if ((mon > 12) || (day == 0))
+			return -EINVAL;
+
+		if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr)))
+			return -EINVAL;
+
+		if ((hrs >= 24) || (min >= 60) || (sec >= 60))
+			return -EINVAL;
+
+		if ((yrs -= epoch) > 255)    /* They are unsigned */
+			return -EINVAL;
+
+		if (yrs > 169)
+			return -EINVAL;
+
+		if (yrs >= 100)
+			yrs -= 100;
+
+		sec = BIN2BCD(sec);
+		min = BIN2BCD(min);
+		hrs = BIN2BCD(hrs);
+		day = BIN2BCD(day);
+		mon = BIN2BCD(mon);
+		yrs = BIN2BCD(yrs);
+
+		spin_lock_irq(&rtc_lock);
+		rtc->control |= M48T35_RTC_SET;
+		rtc->year = yrs;
+		rtc->month = mon;
+		rtc->date = day;
+		rtc->hour = hrs;
+		rtc->min = min;
+		rtc->sec = sec;
+		rtc->control &= ~M48T35_RTC_SET;
+		spin_unlock_irq(&rtc_lock);
+
+		return 0;
+	}
+	default:
+		return -EINVAL;
+	}
+	return copy_to_user((void *)arg, &wtime, sizeof wtime) ? -EFAULT : 0;
+}
+
+/*
+ *	We enforce only one user at a time here with the open/close.
+ *	Also clear the previous interrupt data on an open, and clean
+ *	up things on a close.
+ */
+
+static int rtc_open(struct inode *inode, struct file *file)
+{
+	spin_lock_irq(&rtc_lock);
+
+	if (rtc_status & RTC_IS_OPEN) {
+		spin_unlock_irq(&rtc_lock);
+		return -EBUSY;
+	}
+
+	rtc_status |= RTC_IS_OPEN;
+	spin_unlock_irq(&rtc_lock);
+
+	return 0;
+}
+
+static int rtc_release(struct inode *inode, struct file *file)
+{
+	/*
+	 * Turn off all interrupts once the device is no longer
+	 * in use, and clear the data.
+	 */
+
+	spin_lock_irq(&rtc_lock);
+	rtc_status &= ~RTC_IS_OPEN;
+	spin_unlock_irq(&rtc_lock);
+
+	return 0;
+}
+
+/*
+ *	The various file operations we support.
+ */
+
+static struct file_operations rtc_fops = {
+	.owner		= THIS_MODULE,
+	.ioctl		= rtc_ioctl,
+	.open		= rtc_open,
+	.release	= rtc_release,
+};
+
+static struct miscdevice rtc_dev=
+{
+	RTC_MINOR,
+	"rtc",
+	&rtc_fops
+};
+
+static int __init rtc_init(void)
+{
+	rtc = (struct m48t35_rtc *)
+	(KL_CONFIG_CH_CONS_INFO(master_nasid)->memory_base + IOC3_BYTEBUS_DEV0);
+
+	printk(KERN_INFO "Real Time Clock Driver v%s\n", RTC_VERSION);
+	if (misc_register(&rtc_dev)) {
+		printk(KERN_ERR "rtc: cannot register misc device.\n");
+		return -ENODEV;
+	}
+	if (!create_proc_read_entry("driver/rtc", 0, NULL, rtc_read_proc, NULL)) {
+		printk(KERN_ERR "rtc: cannot create /proc/rtc.\n");
+		misc_deregister(&rtc_dev);
+		return -ENOENT;
+	}
+
+	rtc_freq = 1024;
+
+	return 0;
+}
+
+static void __exit rtc_exit (void)
+{
+	/* interrupts and timer disabled at this point by rtc_release */
+
+	remove_proc_entry ("rtc", NULL);
+	misc_deregister(&rtc_dev);
+}
+
+module_init(rtc_init);
+module_exit(rtc_exit);
+
+/*
+ *	Info exported via "/proc/rtc".
+ */
+
+static int rtc_get_status(char *buf)
+{
+	char *p;
+	struct rtc_time tm;
+
+	/*
+	 * Just emulate the standard /proc/rtc
+	 */
+
+	p = buf;
+
+	get_rtc_time(&tm);
+
+	/*
+	 * There is no way to tell if the luser has the RTC set for local
+	 * time or for Universal Standard Time (GMT). Probably local though.
+	 */
+	p += sprintf(p,
+		     "rtc_time\t: %02d:%02d:%02d\n"
+		     "rtc_date\t: %04d-%02d-%02d\n"
+	 	     "rtc_epoch\t: %04lu\n"
+		     "24hr\t\t: yes\n",
+		     tm.tm_hour, tm.tm_min, tm.tm_sec,
+		     tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, epoch);
+
+	return  p - buf;
+}
+
+static int rtc_read_proc(char *page, char **start, off_t off,
+                                 int count, int *eof, void *data)
+{
+        int len = rtc_get_status(page);
+        if (len <= off+count) *eof = 1;
+        *start = page + off;
+        len -= off;
+        if (len>count) len = count;
+        if (len<0) len = 0;
+        return len;
+}
+
+static void get_rtc_time(struct rtc_time *rtc_tm)
+{
+	/*
+	 * Do we need to wait for the last update to finish?
+	 */
+
+	/*
+	 * Only the values that we read from the RTC are set. We leave
+	 * tm_wday, tm_yday and tm_isdst untouched. Even though the
+	 * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
+	 * by the RTC when initially set to a non-zero value.
+	 */
+	spin_lock_irq(&rtc_lock);
+	rtc->control |= M48T35_RTC_READ;
+	rtc_tm->tm_sec = rtc->sec;
+	rtc_tm->tm_min = rtc->min;
+	rtc_tm->tm_hour = rtc->hour;
+	rtc_tm->tm_mday = rtc->date;
+	rtc_tm->tm_mon = rtc->month;
+	rtc_tm->tm_year = rtc->year;
+	rtc->control &= ~M48T35_RTC_READ;
+	spin_unlock_irq(&rtc_lock);
+
+	rtc_tm->tm_sec = BCD2BIN(rtc_tm->tm_sec);
+	rtc_tm->tm_min = BCD2BIN(rtc_tm->tm_min);
+	rtc_tm->tm_hour = BCD2BIN(rtc_tm->tm_hour);
+	rtc_tm->tm_mday = BCD2BIN(rtc_tm->tm_mday);
+	rtc_tm->tm_mon = BCD2BIN(rtc_tm->tm_mon);
+	rtc_tm->tm_year = BCD2BIN(rtc_tm->tm_year);
+
+	/*
+	 * Account for differences between how the RTC uses the values
+	 * and how they are defined in a struct rtc_time;
+	 */
+	if ((rtc_tm->tm_year += (epoch - 1900)) <= 69)
+		rtc_tm->tm_year += 100;
+
+	rtc_tm->tm_mon--;
+}
--- diff/drivers/char/lcd.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/char/lcd.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,184 @@
+/*
+ * LED, LCD and Button panel driver for Cobalt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1996, 1997 by Andrew Bose
+ *
+ * Linux kernel version history:
+ *       March 2001: Ported from 2.0.34  by Liam Davies
+ *
+ */
+
+// function headers
+
+static int dqpoll(volatile unsigned long, volatile unsigned char );
+static int timeout(volatile unsigned long);
+
+#define LCD_CHARS_PER_LINE 40
+#define FLASH_SIZE 524288
+#define MAX_IDLE_TIME 120
+
+struct lcd_display {
+        unsigned long buttons;
+        int size1;
+        int size2;
+        unsigned char line1[LCD_CHARS_PER_LINE];
+        unsigned char line2[LCD_CHARS_PER_LINE];
+        unsigned char cursor_address;
+        unsigned char character;
+        unsigned char leds;
+        unsigned char *RomImage;
+};
+
+
+
+#define LCD_DRIVER	"Cobalt LCD Driver v2.10"
+
+#define kLCD_IR		0x0F000000
+#define kLCD_DR		0x0F000010
+#define kGPI		0x0D000000
+#define kLED		0x0C000000
+
+#define kDD_R00         0x00
+#define kDD_R01         0x27
+#define kDD_R10         0x40
+#define kDD_R11         0x67
+
+#define kLCD_Addr       0x00000080
+
+#define LCDTimeoutValue	0xfff
+
+
+// Flash definitions AMD 29F040
+#define kFlashBase	0x0FC00000
+
+#define kFlash_Addr1    0x5555
+#define kFlash_Addr2    0x2AAA
+#define kFlash_Data1    0xAA
+#define kFlash_Data2    0x55
+#define kFlash_Prog     0xA0
+#define kFlash_Erase3   0x80
+#define kFlash_Erase6   0x10
+#define kFlash_Read     0xF0
+
+#define kFlash_ID       0x90
+#define kFlash_VenAddr  0x00
+#define kFlash_DevAddr  0x01
+#define kFlash_VenID    0x01
+#define kFlash_DevID    0xA4    // 29F040
+//#define kFlash_DevID  0xAD    // 29F016
+
+
+// Macros
+
+#define LCDWriteData(x)	outl((x << 24), kLCD_DR)
+#define LCDWriteInst(x)	outl((x << 24), kLCD_IR)
+
+#define LCDReadData	(inl(kLCD_DR) >> 24)
+#define LCDReadInst	(inl(kLCD_IR) >> 24)
+
+#define GPIRead		(inl(kGPI) >> 24)
+
+#define LEDSet(x)	outb((char)x, kLED)
+
+#define WRITE_GAL(x,y)	outl(y, 0x04000000 | (x))
+#define BusyCheck()	while ((LCDReadInst & 0x80) == 0x80)
+
+#define WRITE_FLASH(x,y) outb((char)y, kFlashBase | (x))
+#define READ_FLASH(x)	(inb(kFlashBase | (x)))
+
+
+
+/*
+ * Function command codes for io_ctl.
+ */
+#define LCD_On			1
+#define LCD_Off			2
+#define LCD_Clear		3
+#define LCD_Reset		4
+#define LCD_Cursor_Left		5
+#define LCD_Cursor_Right	6
+#define LCD_Disp_Left		7
+#define LCD_Disp_Right		8
+#define LCD_Get_Cursor		9
+#define LCD_Set_Cursor		10
+#define LCD_Home		11
+#define LCD_Read		12
+#define LCD_Write		13
+#define LCD_Cursor_Off		14
+#define LCD_Cursor_On		15
+#define LCD_Get_Cursor_Pos	16
+#define LCD_Set_Cursor_Pos	17
+#define LCD_Blink_Off           18
+
+#define LED_Set			40
+#define LED_Bit_Set		41
+#define LED_Bit_Clear		42
+
+
+//  Button defs
+#define BUTTON_Read             50
+
+//  Flash command codes
+#define FLASH_Erase		60
+#define FLASH_Burn		61
+#define FLASH_Read		62
+
+
+// Ethernet LINK check hackaroo
+#define LINK_Check              90
+#define LINK_Check_2		91
+
+//  Button patterns  _B - single layer lcd boards
+
+#define BUTTON_NONE               0x3F
+#define BUTTON_NONE_B             0xFE
+
+#define BUTTON_Left               0x3B
+#define BUTTON_Left_B             0xFA
+
+#define BUTTON_Right              0x37
+#define BUTTON_Right_B            0xDE
+
+#define BUTTON_Up                 0x2F
+#define BUTTON_Up_B               0xF6
+
+#define BUTTON_Down               0x1F
+#define BUTTON_Down_B             0xEE
+
+#define BUTTON_Next               0x3D
+#define BUTTON_Next_B             0x7E
+
+#define BUTTON_Enter              0x3E
+#define BUTTON_Enter_B            0xBE
+
+#define BUTTON_Reset_B            0xFC
+
+
+// debounce constants
+
+#define BUTTON_SENSE            160000
+#define BUTTON_DEBOUNCE		5000
+
+
+//  Galileo register stuff
+
+#define kGal_DevBank2Cfg        0x1466DB33
+#define kGal_DevBank2PReg       0x464
+#define kGal_DevBank3Cfg        0x146FDFFB
+#define kGal_DevBank3PReg       0x468
+
+// Network
+
+#define kIPADDR			1
+#define kNETMASK		2
+#define kGATEWAY		3
+#define kDNS			4
+
+#define kClassA			5
+#define kClassB			6
+#define kClassC			7
+
--- diff/drivers/firmware/pcdp.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/firmware/pcdp.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,231 @@
+/*
+ * Copyright (C) 2002, 2003, 2004 Hewlett-Packard Co.
+ *	Khalid Aziz <khalid_aziz@hp.com>
+ *	Alex Williamson <alex.williamson@hp.com>
+ *	Bjorn Helgaas <bjorn.helgaas@hp.com>
+ *
+ * Parse the EFI PCDP table to locate the console device.
+ */
+
+#include <linux/acpi.h>
+#include <linux/console.h>
+#include <linux/efi.h>
+#include <linux/tty.h>
+#include <linux/serial.h>
+#include <linux/serial_core.h>
+#include <asm/serial.h>
+#include "pcdp.h"
+
+static inline int
+uart_irq_supported(int rev, struct pcdp_uart *uart)
+{
+	if (rev < 3)
+		return uart->pci_func & PCDP_UART_IRQ;
+	return uart->flags & PCDP_UART_IRQ;
+}
+
+static inline int
+uart_pci(int rev, struct pcdp_uart *uart)
+{
+	if (rev < 3)
+		return uart->pci_func & PCDP_UART_PCI;
+	return uart->flags & PCDP_UART_PCI;
+}
+
+static inline int
+uart_active_high_low(int rev, struct pcdp_uart *uart)
+{
+	if (uart_pci(rev, uart) || uart->flags & PCDP_UART_ACTIVE_LOW)
+		return ACPI_ACTIVE_LOW;
+	return ACPI_ACTIVE_HIGH;
+}
+
+static inline int
+uart_edge_level(int rev, struct pcdp_uart *uart)
+{
+	if (uart_pci(rev, uart))
+		return ACPI_LEVEL_SENSITIVE;
+	if (rev < 3 || uart->flags & PCDP_UART_EDGE_SENSITIVE)
+		return ACPI_EDGE_SENSITIVE;
+	return ACPI_LEVEL_SENSITIVE;
+}
+
+static void __init
+#ifndef	CONFIG_KGDB_EARLY
+setup_serial_console(int rev, struct pcdp_uart *uart)
+#else
+setup_serial_console(int rev, struct pcdp_uart *uart, int line)
+#endif
+{
+#ifdef CONFIG_SERIAL_8250_CONSOLE
+	struct uart_port port;
+	static char options[16];
+	int mapsize = 64;
+
+	memset(&port, 0, sizeof(port));
+#ifdef	CONFIG_KGDB_EARLY
+	port.line = line;
+#endif
+	port.uartclk = uart->clock_rate;
+	if (!port.uartclk)	/* some FW doesn't supply this */
+		port.uartclk = BASE_BAUD * 16;
+
+	if (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
+		port.mapbase = uart->addr.address;
+		port.membase = ioremap(port.mapbase, mapsize);
+		if (!port.membase) {
+			printk(KERN_ERR "%s: couldn't ioremap 0x%lx-0x%lx\n",
+				__FUNCTION__, port.mapbase, port.mapbase + mapsize);
+			return;
+		}
+		port.iotype = UPIO_MEM;
+	} else if (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
+		port.iobase = uart->addr.address;
+		port.iotype = UPIO_PORT;
+	} else
+		return;
+
+	switch (uart->pci_prog_intfc) {
+		case 0x0: port.type = PORT_8250;    break;
+		case 0x1: port.type = PORT_16450;   break;
+		case 0x2: port.type = PORT_16550;   break;
+		case 0x3: port.type = PORT_16650;   break;
+		case 0x4: port.type = PORT_16750;   break;
+		case 0x5: port.type = PORT_16850;   break;
+		case 0x6: port.type = PORT_16C950;  break;
+		default:  port.type = PORT_UNKNOWN; break;
+	}
+
+	port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_RESOURCES;
+
+	if (uart_irq_supported(rev, uart)) {
+		port.irq = acpi_register_gsi(uart->gsi,
+			uart_active_high_low(rev, uart),
+			uart_edge_level(rev, uart));
+		port.flags |= UPF_AUTO_IRQ;  /* some FW reported wrong GSI */
+		if (uart_pci(rev, uart))
+			port.flags |= UPF_SHARE_IRQ;
+	}
+
+	if (early_serial_setup(&port) < 0)
+		return;
+
+	snprintf(options, sizeof(options), "%lun%d", uart->baud,
+		uart->bits ? uart->bits : 8);
+#ifdef	CONFIG_KGDB_EARLY
+	if (!line)
+#endif
+	add_preferred_console("ttyS", port.line, options);
+
+	printk(KERN_INFO "PCDP: serial console at %s 0x%lx (ttyS%d, options %s)\n",
+		port.iotype == UPIO_MEM ? "MMIO" : "I/O",
+		uart->addr.address, port.line, options);
+#endif
+}
+
+static void __init
+setup_vga_console(struct pcdp_vga *vga)
+{
+#ifdef CONFIG_VT
+#ifdef CONFIG_VGA_CONSOLE
+	if (efi_mem_type(0xA0000) == EFI_CONVENTIONAL_MEMORY) {
+		printk(KERN_ERR "PCDP: VGA selected, but frame buffer is not MMIO!\n");
+		return;
+	}
+
+	conswitchp = &vga_con;
+	printk(KERN_INFO "PCDP: VGA console\n");
+#endif
+#endif
+}
+
+void __init
+efi_setup_pcdp_console(char *cmdline)
+{
+	struct pcdp *pcdp;
+	struct pcdp_uart *uart;
+	struct pcdp_device *dev, *end;
+	int i, serial = 0;
+
+	pcdp = efi.hcdp;
+	if (!pcdp)
+		return;
+
+	printk(KERN_INFO "PCDP: v%d at 0x%p\n", pcdp->rev, pcdp);
+
+	if (pcdp->rev < 3) {
+		if (strstr(cmdline, "console=ttyS0") || efi_uart_console_only())
+			serial = 1;
+	}
+
+	for (i = 0, uart = pcdp->uart; i < pcdp->num_uarts; i++, uart++) {
+		if (uart->flags & PCDP_UART_PRIMARY_CONSOLE || serial) {
+			if (uart->type == PCDP_CONSOLE_UART) {
+#ifndef	CONFIG_KGDB_EARLY
+				setup_serial_console(pcdp->rev, uart);
+				return;
+#else
+				setup_serial_console(pcdp->rev, uart, 0);
+				serial = 0;
+#endif
+			}
+		}
+#ifdef	CONFIG_KGDB_EARLY
+		else if (uart->type == PCDP_DEBUG_UART)
+				setup_serial_console(pcdp->rev, uart, 1);
+#endif
+	}
+
+	end = (struct pcdp_device *) ((u8 *) pcdp + pcdp->length);
+	for (dev = (struct pcdp_device *) (pcdp->uart + pcdp->num_uarts);
+	     dev < end;
+	     dev = (struct pcdp_device *) ((u8 *) dev + dev->length)) {
+		if (dev->flags & PCDP_PRIMARY_CONSOLE) {
+			if (dev->type == PCDP_CONSOLE_VGA) {
+				setup_vga_console((struct pcdp_vga *) dev);
+				return;
+			}
+		}
+	}
+}
+
+#ifdef CONFIG_IA64_EARLY_PRINTK_UART
+unsigned long
+hcdp_early_uart (void)
+{
+	efi_system_table_t *systab;
+	efi_config_table_t *config_tables;
+	unsigned long addr = 0;
+	struct pcdp *pcdp = 0;
+	struct pcdp_uart *uart;
+	int i;
+
+	systab = (efi_system_table_t *) ia64_boot_param->efi_systab;
+	if (!systab)
+		return 0;
+	systab = __va(systab);
+
+	config_tables = (efi_config_table_t *) systab->tables;
+	if (!config_tables)
+		return 0;
+	config_tables = __va(config_tables);
+
+	for (i = 0; i < systab->nr_tables; i++) {
+		if (efi_guidcmp(config_tables[i].guid, PCDP_TABLE_GUID) == 0) {
+			pcdp = (struct pcdp *) config_tables[i].table;
+			break;
+		}
+	}
+	if (!pcdp)
+		return 0;
+	pcdp = __va(pcdp);
+
+	for (i = 0, uart = pcdp->uart; i < pcdp->num_uarts; i++, uart++) {
+		if (uart->type == PCDP_CONSOLE_UART) {
+			addr = uart->addr.address;
+			break;
+		}
+	}
+	return addr;
+}
+#endif /* CONFIG_IA64_EARLY_PRINTK_UART */
--- diff/drivers/firmware/pcdp.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/firmware/pcdp.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2002, 2004 Hewlett-Packard Co.
+ *	Khalid Aziz <khalid_aziz@hp.com>
+ *	Bjorn Helgaas <bjorn.helgaas@hp.com>
+ *
+ * Definitions for PCDP-defined console devices
+ *
+ * v1.0a: http://www.dig64.org/specifications/DIG64_HCDPv10a_01.pdf
+ * v2.0:  http://www.dig64.org/specifications/DIG64_HCDPv20_042804.pdf
+ */
+
+#define PCDP_CONSOLE			0
+#define PCDP_DEBUG			1
+#define PCDP_CONSOLE_OUTPUT		2
+#define PCDP_CONSOLE_INPUT		3
+
+#define PCDP_UART			(0 << 3)
+#define PCDP_VGA			(1 << 3)
+#define PCDP_USB			(2 << 3)
+
+/* pcdp_uart.type and pcdp_device.type */
+#define PCDP_CONSOLE_UART		(PCDP_UART | PCDP_CONSOLE)
+#define PCDP_DEBUG_UART			(PCDP_UART | PCDP_DEBUG)
+#define PCDP_CONSOLE_VGA		(PCDP_VGA  | PCDP_CONSOLE_OUTPUT)
+#define PCDP_CONSOLE_USB		(PCDP_USB  | PCDP_CONSOLE_INPUT)
+
+/* pcdp_uart.flags */
+#define PCDP_UART_EDGE_SENSITIVE	(1 << 0)
+#define PCDP_UART_ACTIVE_LOW		(1 << 1)
+#define PCDP_UART_PRIMARY_CONSOLE	(1 << 2)
+#define PCDP_UART_IRQ			(1 << 6) /* in pci_func for rev < 3 */
+#define PCDP_UART_PCI			(1 << 7) /* in pci_func for rev < 3 */
+
+struct pcdp_uart {
+	u8				type;
+	u8				bits;
+	u8				parity;
+	u8				stop_bits;
+	u8				pci_seg;
+	u8				pci_bus;
+	u8				pci_dev;
+	u8				pci_func;
+	u64				baud;
+	struct acpi_generic_address	addr;
+	u16				pci_dev_id;
+	u16				pci_vendor_id;
+	u32				gsi;
+	u32				clock_rate;
+	u8				pci_prog_intfc;
+	u8				flags;
+};
+
+struct pcdp_vga {
+	u8			count;		/* address space descriptors */
+};
+
+/* pcdp_device.flags */
+#define PCDP_PRIMARY_CONSOLE	1
+
+struct pcdp_device {
+	u8			type;
+	u8			flags;
+	u16			length;
+	u16			efi_index;
+};
+
+struct pcdp {
+	u8			signature[4];
+	u32			length;
+	u8			rev;		/* PCDP v2.0 is rev 3 */
+	u8			chksum;
+	u8			oemid[6];
+	u8			oem_tabid[8];
+	u32			oem_rev;
+	u8			creator_id[4];
+	u32			creator_rev;
+	u32			num_uarts;
+	struct pcdp_uart	uart[0];	/* actual size is num_uarts */
+	/* remainder of table is pcdp_device structures */
+};
--- diff/drivers/input/serio/serio_raw.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/input/serio/serio_raw.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,390 @@
+/*
+ * Raw serio device providing access to a raw byte stream from underlying
+ * serio port. Closely emulates behavior of pre-2.6 /dev/psaux device
+ *
+ * Copyright (c) 2004 Dmitry Torokhov
+ *
+ * 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/slab.h>
+#include <linux/poll.h>
+#include <linux/module.h>
+#include <linux/serio.h>
+#include <linux/init.h>
+#include <linux/major.h>
+#include <linux/device.h>
+#include <linux/devfs_fs_kernel.h>
+#include <linux/miscdevice.h>
+#include <linux/wait.h>
+
+#define DRIVER_DESC	"Raw serio driver"
+
+MODULE_AUTHOR("Dmitry Torokhov <dtor@mail.ru>");
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
+#define SERIO_RAW_QUEUE_LEN	64
+struct serio_raw {
+	unsigned char queue[SERIO_RAW_QUEUE_LEN];
+	unsigned int tail, head;
+
+	char name[16];
+	unsigned int refcnt;
+	struct serio *serio;
+	struct miscdevice dev;
+	wait_queue_head_t wait;
+	struct list_head list;
+	struct list_head node;
+};
+
+struct serio_raw_list {
+	struct fasync_struct *fasync;
+	struct serio_raw *serio_raw;
+	struct list_head node;
+};
+
+static DECLARE_MUTEX(serio_raw_sem);
+static LIST_HEAD(serio_raw_list);
+static unsigned int serio_raw_no;
+
+/*********************************************************************
+ *             Interface with userspace (file operations)            *
+ *********************************************************************/
+
+static int serio_raw_fasync(int fd, struct file *file, int on)
+{
+	struct serio_raw_list *list = file->private_data;
+	int retval;
+
+	retval = fasync_helper(fd, file, on, &list->fasync);
+	return retval < 0 ? retval : 0;
+}
+
+static struct serio_raw *serio_raw_locate(int minor)
+{
+	struct serio_raw *serio_raw;
+
+	list_for_each_entry(serio_raw, &serio_raw_list, node) {
+		if (serio_raw->dev.minor == minor)
+			return serio_raw;
+	}
+
+	return NULL;
+}
+
+static int serio_raw_open(struct inode *inode, struct file *file)
+{
+	struct serio_raw *serio_raw;
+	struct serio_raw_list *list;
+	int retval = 0;
+
+	retval = down_interruptible(&serio_raw_sem);
+	if (retval)
+		return retval;
+
+	if (!(serio_raw = serio_raw_locate(iminor(inode)))) {
+		retval = -ENODEV;
+		goto out;
+	}
+
+	if (!serio_raw->serio) {
+		retval = -ENODEV;
+		goto out;
+	}
+
+	if (!(list = kmalloc(sizeof(struct serio_raw_list), GFP_KERNEL))) {
+		retval = -ENOMEM;
+		goto out;
+	}
+
+	memset(list, 0, sizeof(struct serio_raw_list));
+	list->serio_raw = serio_raw;
+	file->private_data = list;
+
+	serio_raw->refcnt++;
+	list_add_tail(&list->node, &serio_raw->list);
+
+out:
+	up(&serio_raw_sem);
+	return retval;
+}
+
+static int serio_raw_cleanup(struct serio_raw *serio_raw)
+{
+	if (--serio_raw->refcnt == 0) {
+		misc_deregister(&serio_raw->dev);
+		list_del_init(&serio_raw->node);
+		kfree(serio_raw);
+
+		return 1;
+	}
+
+	return 0;
+}
+
+static int serio_raw_release(struct inode *inode, struct file *file)
+{
+	struct serio_raw_list *list = file->private_data;
+	struct serio_raw *serio_raw = list->serio_raw;
+
+	down(&serio_raw_sem);
+
+	serio_raw_fasync(-1, file, 0);
+	serio_raw_cleanup(serio_raw);
+
+	up(&serio_raw_sem);
+	return 0;
+}
+
+static int serio_raw_fetch_byte(struct serio_raw *serio_raw, char *c)
+{
+	unsigned long flags;
+	int empty;
+
+	spin_lock_irqsave(&serio_raw->serio->lock, flags);
+
+	empty = serio_raw->head == serio_raw->tail;
+	if (!empty) {
+		*c = serio_raw->queue[serio_raw->tail];
+		serio_raw->tail = (serio_raw->tail + 1) % SERIO_RAW_QUEUE_LEN;
+	}
+
+	spin_unlock_irqrestore(&serio_raw->serio->lock, flags);
+
+	return !empty;
+}
+
+static ssize_t serio_raw_read(struct file *file, char *buffer, size_t count, loff_t *ppos)
+{
+	struct serio_raw_list *list = file->private_data;
+	struct serio_raw *serio_raw = list->serio_raw;
+	char c;
+	ssize_t retval = 0;
+
+	if (!serio_raw->serio)
+		return -ENODEV;
+
+	if (serio_raw->head == serio_raw->tail && (file->f_flags & O_NONBLOCK))
+		return -EAGAIN;
+
+	retval = wait_event_interruptible(list->serio_raw->wait,
+					  serio_raw->head != serio_raw->tail || !serio_raw->serio);
+	if (retval)
+		return retval;
+
+	if (!serio_raw->serio)
+		return -ENODEV;
+
+	while (retval < count && serio_raw_fetch_byte(serio_raw, &c)) {
+		if (put_user(c, buffer++))
+			return -EFAULT;
+		retval++;
+	}
+
+	return retval;
+}
+
+static ssize_t serio_raw_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
+{
+	struct serio_raw_list *list = file->private_data;
+	ssize_t written = 0;
+	int retval;
+	unsigned char c;
+
+	retval = down_interruptible(&serio_raw_sem);
+	if (retval)
+		return retval;
+
+	if (!list->serio_raw->serio) {
+		retval = -ENODEV;
+		goto out;
+	}
+
+	if (count > 32)
+		count = 32;
+
+	while (count--) {
+		if (get_user(c, buffer++)) {
+			retval = -EFAULT;
+			goto out;
+		}
+		if (serio_write(list->serio_raw->serio, c)) {
+			retval = -EIO;
+			goto out;
+		}
+		written++;
+	};
+
+out:
+	up(&serio_raw_sem);
+	return written;
+}
+
+static unsigned int serio_raw_poll(struct file *file, poll_table *wait)
+{
+	struct serio_raw_list *list = file->private_data;
+
+	poll_wait(file, &list->serio_raw->wait, wait);
+
+	if (list->serio_raw->head != list->serio_raw->tail)
+		return POLLIN | POLLRDNORM;
+
+	return 0;
+}
+
+struct file_operations serio_raw_fops = {
+	.owner =	THIS_MODULE,
+	.open =		serio_raw_open,
+	.release =	serio_raw_release,
+	.read =		serio_raw_read,
+	.write =	serio_raw_write,
+	.poll =		serio_raw_poll,
+	.fasync =	serio_raw_fasync,
+};
+
+
+/*********************************************************************
+ *                   Interface with serio port   	             *
+ *********************************************************************/
+
+static irqreturn_t serio_raw_interrupt(struct serio *serio, unsigned char data,
+					unsigned int dfl, struct pt_regs *regs)
+{
+	struct serio_raw *serio_raw = serio->private;
+	struct serio_raw_list *list;
+	unsigned int head = serio_raw->head;
+
+	/* we are holding serio->lock here so we are prootected */
+	serio_raw->queue[head] = data;
+	head = (head + 1) % SERIO_RAW_QUEUE_LEN;
+	if (likely(head != serio_raw->tail)) {
+		serio_raw->head = head;
+		list_for_each_entry(list, &serio_raw->list, node)
+			kill_fasync(&list->fasync, SIGIO, POLL_IN);
+		wake_up_interruptible(&serio_raw->wait);
+	}
+
+	return IRQ_HANDLED;
+}
+
+static void serio_raw_connect(struct serio *serio, struct serio_driver *drv)
+{
+	struct serio_raw *serio_raw;
+	int err;
+
+	if ((serio->type & SERIO_TYPE) != SERIO_8042)
+		return;
+
+	if (!(serio_raw = kmalloc(sizeof(struct serio_raw), GFP_KERNEL))) {
+		printk(KERN_ERR "serio_raw.c: can't allocate memory for a device\n");
+		return;
+	}
+
+	down(&serio_raw_sem);
+
+	memset(serio_raw, 0, sizeof(struct serio_raw));
+	snprintf(serio_raw->name, sizeof(serio_raw->name), "serio_raw%d", serio_raw_no++);
+	serio_raw->refcnt = 1;
+	serio_raw->serio = serio;
+	INIT_LIST_HEAD(&serio_raw->list);
+	init_waitqueue_head(&serio_raw->wait);
+
+	serio->private = serio_raw;
+	if (serio_open(serio, drv))
+		goto out_free;
+
+	list_add_tail(&serio_raw->node, &serio_raw_list);
+
+	serio_raw->dev.minor = PSMOUSE_MINOR;
+	serio_raw->dev.name = serio_raw->name;
+	serio_raw->dev.fops = &serio_raw_fops;
+
+	err = misc_register(&serio_raw->dev);
+	if (err) {
+		serio_raw->dev.minor = MISC_DYNAMIC_MINOR;
+		err = misc_register(&serio_raw->dev);
+	}
+
+	if (err) {
+		printk(KERN_INFO "serio_raw: failed to register raw access device for %s\n",
+			serio->phys);
+		goto out_close;
+	}
+
+	printk(KERN_INFO "serio_raw: raw access enabled on %s (%s, minor %d)\n",
+		serio->phys, serio_raw->name, serio_raw->dev.minor);
+	goto out;
+
+out_close:
+	serio_close(serio);
+	list_del_init(&serio_raw->node);
+out_free:
+	serio->private = NULL;
+	kfree(serio_raw);
+out:
+	up(&serio_raw_sem);
+}
+
+static int serio_raw_reconnect(struct serio *serio)
+{
+	struct serio_raw *serio_raw = serio->private;
+	struct serio_driver *drv = serio->drv;
+
+	if (!drv || !serio_raw) {
+		printk(KERN_DEBUG "serio_raw: reconnect request, but serio is disconnected, ignoring...\n");
+		return -1;
+	}
+
+	/*
+	 * Nothing needs to be done here, we just need this method to
+	 * keep the same device.
+	 */
+	return 0;
+}
+
+static void serio_raw_disconnect(struct serio *serio)
+{
+	struct serio_raw *serio_raw;
+
+	down(&serio_raw_sem);
+
+	serio_raw = serio->private;
+
+	serio_close(serio);
+	serio->private = NULL;
+
+	serio_raw->serio = NULL;
+	if (!serio_raw_cleanup(serio_raw))
+		wake_up_interruptible(&serio_raw->wait);
+
+	up(&serio_raw_sem);
+}
+
+static struct serio_driver serio_raw_drv = {
+	.driver		= {
+		.name	= "serio_raw",
+	},
+	.description	= DRIVER_DESC,
+	.interrupt	= serio_raw_interrupt,
+	.connect	= serio_raw_connect,
+	.reconnect	= serio_raw_reconnect,
+	.disconnect	= serio_raw_disconnect,
+	.manual_bind	= 1,
+};
+
+int __init serio_raw_init(void)
+{
+	serio_register_driver(&serio_raw_drv);
+	return 0;
+}
+
+void __exit serio_raw_exit(void)
+{
+	serio_unregister_driver(&serio_raw_drv);
+}
+
+module_init(serio_raw_init);
+module_exit(serio_raw_exit);
--- diff/drivers/md/dm-exception-store.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/dm-exception-store.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,648 @@
+/*
+ * dm-snapshot.c
+ *
+ * Copyright (C) 2001-2002 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm.h"
+#include "dm-snap.h"
+#include "dm-io.h"
+#include "kcopyd.h"
+
+#include <linux/mm.h>
+#include <linux/pagemap.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+
+/*-----------------------------------------------------------------
+ * Persistent snapshots, by persistent we mean that the snapshot
+ * will survive a reboot.
+ *---------------------------------------------------------------*/
+
+/*
+ * We need to store a record of which parts of the origin have
+ * been copied to the snapshot device.  The snapshot code
+ * requires that we copy exception chunks to chunk aligned areas
+ * of the COW store.  It makes sense therefore, to store the
+ * metadata in chunk size blocks.
+ *
+ * There is no backward or forward compatibility implemented,
+ * snapshots with different disk versions than the kernel will
+ * not be usable.  It is expected that "lvcreate" will blank out
+ * the start of a fresh COW device before calling the snapshot
+ * constructor.
+ *
+ * The first chunk of the COW device just contains the header.
+ * After this there is a chunk filled with exception metadata,
+ * followed by as many exception chunks as can fit in the
+ * metadata areas.
+ *
+ * All on disk structures are in little-endian format.  The end
+ * of the exceptions info is indicated by an exception with a
+ * new_chunk of 0, which is invalid since it would point to the
+ * header chunk.
+ */
+
+/*
+ * Magic for persistent snapshots: "SnAp" - Feeble isn't it.
+ */
+#define SNAP_MAGIC 0x70416e53
+
+/*
+ * The on-disk version of the metadata.
+ */
+#define SNAPSHOT_DISK_VERSION 1
+
+struct disk_header {
+	uint32_t magic;
+
+	/*
+	 * Is this snapshot valid.  There is no way of recovering
+	 * an invalid snapshot.
+	 */
+	uint32_t valid;
+
+	/*
+	 * Simple, incrementing version. no backward
+	 * compatibility.
+	 */
+	uint32_t version;
+
+	/* In sectors */
+	uint32_t chunk_size;
+};
+
+struct disk_exception {
+	uint64_t old_chunk;
+	uint64_t new_chunk;
+};
+
+struct commit_callback {
+	void (*callback)(void *, int success);
+	void *context;
+};
+
+/*
+ * The top level structure for a persistent exception store.
+ */
+struct pstore {
+	struct dm_snapshot *snap;	/* up pointer to my snapshot */
+	int version;
+	int valid;
+	uint32_t chunk_size;
+	uint32_t exceptions_per_area;
+
+	/*
+	 * Now that we have an asynchronous kcopyd there is no
+	 * need for large chunk sizes, so it wont hurt to have a
+	 * whole chunks worth of metadata in memory at once.
+	 */
+	void *area;
+
+	/*
+	 * Used to keep track of which metadata area the data in
+	 * 'chunk' refers to.
+	 */
+	uint32_t current_area;
+
+	/*
+	 * The next free chunk for an exception.
+	 */
+	uint32_t next_free;
+
+	/*
+	 * The index of next free exception in the current
+	 * metadata area.
+	 */
+	uint32_t current_committed;
+
+	atomic_t pending_count;
+	uint32_t callback_count;
+	struct commit_callback *callbacks;
+};
+
+static inline unsigned int sectors_to_pages(unsigned int sectors)
+{
+	return sectors / (PAGE_SIZE >> 9);
+}
+
+static int alloc_area(struct pstore *ps)
+{
+	int r = -ENOMEM;
+	size_t len;
+
+	len = ps->chunk_size << SECTOR_SHIFT;
+
+	/*
+	 * Allocate the chunk_size block of memory that will hold
+	 * a single metadata area.
+	 */
+	ps->area = vmalloc(len);
+	if (!ps->area)
+		return r;
+
+	return 0;
+}
+
+static void free_area(struct pstore *ps)
+{
+	vfree(ps->area);
+}
+
+/*
+ * Read or write a chunk aligned and sized block of data from a device.
+ */
+static int chunk_io(struct pstore *ps, uint32_t chunk, int rw)
+{
+	struct io_region where;
+	unsigned long bits;
+
+	where.bdev = ps->snap->cow->bdev;
+	where.sector = ps->chunk_size * chunk;
+	where.count = ps->chunk_size;
+
+	return dm_io_sync_vm(1, &where, rw, ps->area, &bits);
+}
+
+/*
+ * Read or write a metadata area.  Remembering to skip the first
+ * chunk which holds the header.
+ */
+static int area_io(struct pstore *ps, uint32_t area, int rw)
+{
+	int r;
+	uint32_t chunk;
+
+	/* convert a metadata area index to a chunk index */
+	chunk = 1 + ((ps->exceptions_per_area + 1) * area);
+
+	r = chunk_io(ps, chunk, rw);
+	if (r)
+		return r;
+
+	ps->current_area = area;
+	return 0;
+}
+
+static int zero_area(struct pstore *ps, uint32_t area)
+{
+	memset(ps->area, 0, ps->chunk_size << SECTOR_SHIFT);
+	return area_io(ps, area, WRITE);
+}
+
+static int read_header(struct pstore *ps, int *new_snapshot)
+{
+	int r;
+	struct disk_header *dh;
+
+	r = chunk_io(ps, 0, READ);
+	if (r)
+		return r;
+
+	dh = (struct disk_header *) ps->area;
+
+	if (le32_to_cpu(dh->magic) == 0) {
+		*new_snapshot = 1;
+
+	} else if (le32_to_cpu(dh->magic) == SNAP_MAGIC) {
+		*new_snapshot = 0;
+		ps->valid = le32_to_cpu(dh->valid);
+		ps->version = le32_to_cpu(dh->version);
+		ps->chunk_size = le32_to_cpu(dh->chunk_size);
+
+	} else {
+		DMWARN("Invalid/corrupt snapshot");
+		r = -ENXIO;
+	}
+
+	return r;
+}
+
+static int write_header(struct pstore *ps)
+{
+	struct disk_header *dh;
+
+	memset(ps->area, 0, ps->chunk_size << SECTOR_SHIFT);
+
+	dh = (struct disk_header *) ps->area;
+	dh->magic = cpu_to_le32(SNAP_MAGIC);
+	dh->valid = cpu_to_le32(ps->valid);
+	dh->version = cpu_to_le32(ps->version);
+	dh->chunk_size = cpu_to_le32(ps->chunk_size);
+
+	return chunk_io(ps, 0, WRITE);
+}
+
+/*
+ * Access functions for the disk exceptions, these do the endian conversions.
+ */
+static struct disk_exception *get_exception(struct pstore *ps, uint32_t index)
+{
+	if (index >= ps->exceptions_per_area)
+		return NULL;
+
+	return ((struct disk_exception *) ps->area) + index;
+}
+
+static int read_exception(struct pstore *ps,
+			  uint32_t index, struct disk_exception *result)
+{
+	struct disk_exception *e;
+
+	e = get_exception(ps, index);
+	if (!e)
+		return -EINVAL;
+
+	/* copy it */
+	result->old_chunk = le64_to_cpu(e->old_chunk);
+	result->new_chunk = le64_to_cpu(e->new_chunk);
+
+	return 0;
+}
+
+static int write_exception(struct pstore *ps,
+			   uint32_t index, struct disk_exception *de)
+{
+	struct disk_exception *e;
+
+	e = get_exception(ps, index);
+	if (!e)
+		return -EINVAL;
+
+	/* copy it */
+	e->old_chunk = cpu_to_le64(de->old_chunk);
+	e->new_chunk = cpu_to_le64(de->new_chunk);
+
+	return 0;
+}
+
+/*
+ * Registers the exceptions that are present in the current area.
+ * 'full' is filled in to indicate if the area has been
+ * filled.
+ */
+static int insert_exceptions(struct pstore *ps, int *full)
+{
+	int r;
+	unsigned int i;
+	struct disk_exception de;
+
+	/* presume the area is full */
+	*full = 1;
+
+	for (i = 0; i < ps->exceptions_per_area; i++) {
+		r = read_exception(ps, i, &de);
+
+		if (r)
+			return r;
+
+		/*
+		 * If the new_chunk is pointing at the start of
+		 * the COW device, where the first metadata area
+		 * is we know that we've hit the end of the
+		 * exceptions.  Therefore the area is not full.
+		 */
+		if (de.new_chunk == 0LL) {
+			ps->current_committed = i;
+			*full = 0;
+			break;
+		}
+
+		/*
+		 * Keep track of the start of the free chunks.
+		 */
+		if (ps->next_free <= de.new_chunk)
+			ps->next_free = de.new_chunk + 1;
+
+		/*
+		 * Otherwise we add the exception to the snapshot.
+		 */
+		r = dm_add_exception(ps->snap, de.old_chunk, de.new_chunk);
+		if (r)
+			return r;
+	}
+
+	return 0;
+}
+
+static int read_exceptions(struct pstore *ps)
+{
+	uint32_t area;
+	int r, full = 1;
+
+	/*
+	 * Keeping reading chunks and inserting exceptions until
+	 * we find a partially full area.
+	 */
+	for (area = 0; full; area++) {
+		r = area_io(ps, area, READ);
+		if (r)
+			return r;
+
+		r = insert_exceptions(ps, &full);
+		if (r)
+			return r;
+	}
+
+	return 0;
+}
+
+static inline struct pstore *get_info(struct exception_store *store)
+{
+	return (struct pstore *) store->context;
+}
+
+static void persistent_fraction_full(struct exception_store *store,
+				     sector_t *numerator, sector_t *denominator)
+{
+	*numerator = get_info(store)->next_free * store->snap->chunk_size;
+	*denominator = get_dev_size(store->snap->cow->bdev);
+}
+
+static void persistent_destroy(struct exception_store *store)
+{
+	struct pstore *ps = get_info(store);
+
+	dm_io_put(sectors_to_pages(ps->chunk_size));
+	vfree(ps->callbacks);
+	free_area(ps);
+	kfree(ps);
+}
+
+static int persistent_read_metadata(struct exception_store *store)
+{
+	int r, new_snapshot;
+	struct pstore *ps = get_info(store);
+
+	/*
+	 * Read the snapshot header.
+	 */
+	r = read_header(ps, &new_snapshot);
+	if (r)
+		return r;
+
+	/*
+	 * Do we need to setup a new snapshot ?
+	 */
+	if (new_snapshot) {
+		r = write_header(ps);
+		if (r) {
+			DMWARN("write_header failed");
+			return r;
+		}
+
+		r = zero_area(ps, 0);
+		if (r) {
+			DMWARN("zero_area(0) failed");
+			return r;
+		}
+
+	} else {
+		/*
+		 * Sanity checks.
+		 */
+		if (!ps->valid) {
+			DMWARN("snapshot is marked invalid");
+			return -EINVAL;
+		}
+
+		if (ps->version != SNAPSHOT_DISK_VERSION) {
+			DMWARN("unable to handle snapshot disk version %d",
+			       ps->version);
+			return -EINVAL;
+		}
+
+		/*
+		 * Read the metadata.
+		 */
+		r = read_exceptions(ps);
+		if (r)
+			return r;
+	}
+
+	return 0;
+}
+
+static int persistent_prepare(struct exception_store *store,
+			      struct exception *e)
+{
+	struct pstore *ps = get_info(store);
+	uint32_t stride;
+	sector_t size = get_dev_size(store->snap->cow->bdev);
+
+	/* Is there enough room ? */
+	if (size < ((ps->next_free + 1) * store->snap->chunk_size))
+		return -ENOSPC;
+
+	e->new_chunk = ps->next_free;
+
+	/*
+	 * Move onto the next free pending, making sure to take
+	 * into account the location of the metadata chunks.
+	 */
+	stride = (ps->exceptions_per_area + 1);
+	if ((++ps->next_free % stride) == 1)
+		ps->next_free++;
+
+	atomic_inc(&ps->pending_count);
+	return 0;
+}
+
+static void persistent_commit(struct exception_store *store,
+			      struct exception *e,
+			      void (*callback) (void *, int success),
+			      void *callback_context)
+{
+	int r;
+	unsigned int i;
+	struct pstore *ps = get_info(store);
+	struct disk_exception de;
+	struct commit_callback *cb;
+
+	de.old_chunk = e->old_chunk;
+	de.new_chunk = e->new_chunk;
+	write_exception(ps, ps->current_committed++, &de);
+
+	/*
+	 * Add the callback to the back of the array.  This code
+	 * is the only place where the callback array is
+	 * manipulated, and we know that it will never be called
+	 * multiple times concurrently.
+	 */
+	cb = ps->callbacks + ps->callback_count++;
+	cb->callback = callback;
+	cb->context = callback_context;
+
+	/*
+	 * If there are no more exceptions in flight, or we have
+	 * filled this metadata area we commit the exceptions to
+	 * disk.
+	 */
+	if (atomic_dec_and_test(&ps->pending_count) ||
+	    (ps->current_committed == ps->exceptions_per_area)) {
+		r = area_io(ps, ps->current_area, WRITE);
+		if (r)
+			ps->valid = 0;
+
+		for (i = 0; i < ps->callback_count; i++) {
+			cb = ps->callbacks + i;
+			cb->callback(cb->context, r == 0 ? 1 : 0);
+		}
+
+		ps->callback_count = 0;
+	}
+
+	/*
+	 * Have we completely filled the current area ?
+	 */
+	if (ps->current_committed == ps->exceptions_per_area) {
+		ps->current_committed = 0;
+		r = zero_area(ps, ps->current_area + 1);
+		if (r)
+			ps->valid = 0;
+	}
+}
+
+static void persistent_drop(struct exception_store *store)
+{
+	struct pstore *ps = get_info(store);
+
+	ps->valid = 0;
+	if (write_header(ps))
+		DMWARN("write header failed");
+}
+
+int dm_create_persistent(struct exception_store *store, uint32_t chunk_size)
+{
+	int r;
+	struct pstore *ps;
+
+	r = dm_io_get(sectors_to_pages(chunk_size));
+	if (r)
+		return r;
+
+	/* allocate the pstore */
+	ps = kmalloc(sizeof(*ps), GFP_KERNEL);
+	if (!ps) {
+		r = -ENOMEM;
+		goto bad;
+	}
+
+	ps->snap = store->snap;
+	ps->valid = 1;
+	ps->version = SNAPSHOT_DISK_VERSION;
+	ps->chunk_size = chunk_size;
+	ps->exceptions_per_area = (chunk_size << SECTOR_SHIFT) /
+	    sizeof(struct disk_exception);
+	ps->next_free = 2;	/* skipping the header and first area */
+	ps->current_committed = 0;
+
+	r = alloc_area(ps);
+	if (r)
+		goto bad;
+
+	/*
+	 * Allocate space for all the callbacks.
+	 */
+	ps->callback_count = 0;
+	atomic_set(&ps->pending_count, 0);
+	ps->callbacks = dm_vcalloc(ps->exceptions_per_area,
+				   sizeof(*ps->callbacks));
+
+	if (!ps->callbacks) {
+		r = -ENOMEM;
+		goto bad;
+	}
+
+	store->destroy = persistent_destroy;
+	store->read_metadata = persistent_read_metadata;
+	store->prepare_exception = persistent_prepare;
+	store->commit_exception = persistent_commit;
+	store->drop_snapshot = persistent_drop;
+	store->fraction_full = persistent_fraction_full;
+	store->context = ps;
+
+	return 0;
+
+      bad:
+	dm_io_put(sectors_to_pages(chunk_size));
+	if (ps) {
+		if (ps->area)
+			free_area(ps);
+
+		kfree(ps);
+	}
+	return r;
+}
+
+/*-----------------------------------------------------------------
+ * Implementation of the store for non-persistent snapshots.
+ *---------------------------------------------------------------*/
+struct transient_c {
+	sector_t next_free;
+};
+
+static void transient_destroy(struct exception_store *store)
+{
+	kfree(store->context);
+}
+
+static int transient_read_metadata(struct exception_store *store)
+{
+	return 0;
+}
+
+static int transient_prepare(struct exception_store *store, struct exception *e)
+{
+	struct transient_c *tc = (struct transient_c *) store->context;
+	sector_t size = get_dev_size(store->snap->cow->bdev);
+
+	if (size < (tc->next_free + store->snap->chunk_size))
+		return -1;
+
+	e->new_chunk = sector_to_chunk(store->snap, tc->next_free);
+	tc->next_free += store->snap->chunk_size;
+
+	return 0;
+}
+
+static void transient_commit(struct exception_store *store,
+		      struct exception *e,
+		      void (*callback) (void *, int success),
+		      void *callback_context)
+{
+	/* Just succeed */
+	callback(callback_context, 1);
+}
+
+static void transient_fraction_full(struct exception_store *store,
+				    sector_t *numerator, sector_t *denominator)
+{
+	*numerator = ((struct transient_c *) store->context)->next_free;
+	*denominator = get_dev_size(store->snap->cow->bdev);
+}
+
+int dm_create_transient(struct exception_store *store,
+			struct dm_snapshot *s, int blocksize)
+{
+	struct transient_c *tc;
+
+	memset(store, 0, sizeof(*store));
+	store->destroy = transient_destroy;
+	store->read_metadata = transient_read_metadata;
+	store->prepare_exception = transient_prepare;
+	store->commit_exception = transient_commit;
+	store->fraction_full = transient_fraction_full;
+	store->snap = s;
+
+	tc = kmalloc(sizeof(struct transient_c), GFP_KERNEL);
+	if (!tc)
+		return -ENOMEM;
+
+	tc->next_free = 0;
+	store->context = tc;
+
+	return 0;
+}
--- diff/drivers/md/dm-io.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/dm-io.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,647 @@
+/*
+ * Copyright (C) 2003 Sistina Software
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm-io.h"
+
+#include <linux/bio.h>
+#include <linux/mempool.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+
+#define BIO_POOL_SIZE 256
+
+
+/*-----------------------------------------------------------------
+ * Bio set, move this to bio.c
+ *---------------------------------------------------------------*/
+#define BV_NAME_SIZE 16
+struct biovec_pool {
+	int nr_vecs;
+	char name[BV_NAME_SIZE];
+	kmem_cache_t *slab;
+	mempool_t *pool;
+	atomic_t allocated;	/* FIXME: debug */
+};
+
+#define BIOVEC_NR_POOLS 6
+struct bio_set {
+	char name[BV_NAME_SIZE];
+	kmem_cache_t *bio_slab;
+	mempool_t *bio_pool;
+	struct biovec_pool pools[BIOVEC_NR_POOLS];
+};
+
+static void bio_set_exit(struct bio_set *bs)
+{
+	unsigned i;
+	struct biovec_pool *bp;
+
+	if (bs->bio_pool)
+		mempool_destroy(bs->bio_pool);
+
+	if (bs->bio_slab)
+		kmem_cache_destroy(bs->bio_slab);
+
+	for (i = 0; i < BIOVEC_NR_POOLS; i++) {
+		bp = bs->pools + i;
+		if (bp->pool)
+			mempool_destroy(bp->pool);
+
+		if (bp->slab)
+			kmem_cache_destroy(bp->slab);
+	}
+}
+
+static void mk_name(char *str, size_t len, const char *prefix, unsigned count)
+{
+	snprintf(str, len, "%s-%u", prefix, count);
+}
+
+static int bio_set_init(struct bio_set *bs, const char *slab_prefix,
+			 unsigned pool_entries, unsigned scale)
+{
+	/* FIXME: this must match bvec_index(), why not go the
+	 * whole hog and have a pool per power of 2 ? */
+	static unsigned _vec_lengths[BIOVEC_NR_POOLS] = {
+		1, 4, 16, 64, 128, BIO_MAX_PAGES
+	};
+
+
+	unsigned i, size;
+	struct biovec_pool *bp;
+
+	/* zero the bs so we can tear down properly on error */
+	memset(bs, 0, sizeof(*bs));
+
+	/*
+	 * Set up the bio pool.
+	 */
+	snprintf(bs->name, sizeof(bs->name), "%s-bio", slab_prefix);
+
+	bs->bio_slab = kmem_cache_create(bs->name, sizeof(struct bio), 0,
+					 SLAB_HWCACHE_ALIGN, NULL, NULL);
+	if (!bs->bio_slab) {
+		DMWARN("can't init bio slab");
+		goto bad;
+	}
+
+	bs->bio_pool = mempool_create(pool_entries, mempool_alloc_slab,
+				      mempool_free_slab, bs->bio_slab);
+	if (!bs->bio_pool) {
+		DMWARN("can't init bio pool");
+		goto bad;
+	}
+
+	/*
+	 * Set up the biovec pools.
+	 */
+	for (i = 0; i < BIOVEC_NR_POOLS; i++) {
+		bp = bs->pools + i;
+		bp->nr_vecs = _vec_lengths[i];
+		atomic_set(&bp->allocated, 1); /* FIXME: debug */
+
+
+		size = bp->nr_vecs * sizeof(struct bio_vec);
+
+		mk_name(bp->name, sizeof(bp->name), slab_prefix, i);
+		bp->slab = kmem_cache_create(bp->name, size, 0,
+					     SLAB_HWCACHE_ALIGN, NULL, NULL);
+		if (!bp->slab) {
+			DMWARN("can't init biovec slab cache");
+			goto bad;
+		}
+
+		if (i >= scale)
+			pool_entries >>= 1;
+
+		bp->pool = mempool_create(pool_entries, mempool_alloc_slab,
+					  mempool_free_slab, bp->slab);
+		if (!bp->pool) {
+			DMWARN("can't init biovec mempool");
+			goto bad;
+		}
+	}
+
+	return 0;
+
+ bad:
+	bio_set_exit(bs);
+	return -ENOMEM;
+}
+
+/* FIXME: blech */
+static inline unsigned bvec_index(unsigned nr)
+{
+	switch (nr) {
+	case 1:		return 0;
+	case 2 ... 4: 	return 1;
+	case 5 ... 16:	return 2;
+	case 17 ... 64:	return 3;
+	case 65 ... 128:return 4;
+	case 129 ... BIO_MAX_PAGES: return 5;
+	}
+
+	BUG();
+	return 0;
+}
+
+static inline void bs_bio_init(struct bio *bio)
+{
+	bio->bi_next = NULL;
+	bio->bi_flags = 1 << BIO_UPTODATE;
+	bio->bi_rw = 0;
+	bio->bi_vcnt = 0;
+	bio->bi_idx = 0;
+	bio->bi_phys_segments = 0;
+	bio->bi_hw_segments = 0;
+	bio->bi_size = 0;
+	bio->bi_max_vecs = 0;
+	bio->bi_end_io = NULL;
+	atomic_set(&bio->bi_cnt, 1);
+	bio->bi_private = NULL;
+}
+
+static unsigned _bio_count = 0;
+struct bio *bio_set_alloc(struct bio_set *bs, int gfp_mask, int nr_iovecs)
+{
+	struct biovec_pool *bp;
+	struct bio_vec *bv = NULL;
+	unsigned long idx;
+	struct bio *bio;
+
+	bio = mempool_alloc(bs->bio_pool, gfp_mask);
+	if (unlikely(!bio))
+		return NULL;
+
+	bio_init(bio);
+
+	if (likely(nr_iovecs)) {
+		idx = bvec_index(nr_iovecs);
+		bp = bs->pools + idx;
+		bv = mempool_alloc(bp->pool, gfp_mask);
+		if (!bv) {
+			mempool_free(bio, bs->bio_pool);
+			return NULL;
+		}
+
+		memset(bv, 0, bp->nr_vecs * sizeof(*bv));
+		bio->bi_flags |= idx << BIO_POOL_OFFSET;
+		bio->bi_max_vecs = bp->nr_vecs;
+		atomic_inc(&bp->allocated);
+	}
+
+	bio->bi_io_vec = bv;
+	return bio;
+}
+
+static void bio_set_free(struct bio_set *bs, struct bio *bio)
+{
+	struct biovec_pool *bp = bs->pools + BIO_POOL_IDX(bio);
+
+	if (atomic_dec_and_test(&bp->allocated))
+		BUG();
+
+	mempool_free(bio->bi_io_vec, bp->pool);
+	mempool_free(bio, bs->bio_pool);
+}
+
+/*-----------------------------------------------------------------
+ * dm-io proper
+ *---------------------------------------------------------------*/
+static struct bio_set _bios;
+
+/* FIXME: can we shrink this ? */
+struct io {
+	unsigned long error;
+	atomic_t count;
+	struct task_struct *sleeper;
+	io_notify_fn callback;
+	void *context;
+};
+
+/*
+ * io contexts are only dynamically allocated for asynchronous
+ * io.  Since async io is likely to be the majority of io we'll
+ * have the same number of io contexts as buffer heads ! (FIXME:
+ * must reduce this).
+ */
+static unsigned _num_ios;
+static mempool_t *_io_pool;
+
+static void *alloc_io(int gfp_mask, void *pool_data)
+{
+	return kmalloc(sizeof(struct io), gfp_mask);
+}
+
+static void free_io(void *element, void *pool_data)
+{
+	kfree(element);
+}
+
+static unsigned int pages_to_ios(unsigned int pages)
+{
+	return 4 * pages;	/* too many ? */
+}
+
+static int resize_pool(unsigned int new_ios)
+{
+	int r = 0;
+
+	if (_io_pool) {
+		if (new_ios == 0) {
+			/* free off the pool */
+			mempool_destroy(_io_pool);
+			_io_pool = NULL;
+			bio_set_exit(&_bios);
+
+		} else {
+			/* resize the pool */
+			r = mempool_resize(_io_pool, new_ios, GFP_KERNEL);
+		}
+
+	} else {
+		/* create new pool */
+		_io_pool = mempool_create(new_ios, alloc_io, free_io, NULL);
+		if (!_io_pool)
+			r = -ENOMEM;
+
+		r = bio_set_init(&_bios, "dm-io", 512, 1);
+		if (r) {
+			mempool_destroy(_io_pool);
+			_io_pool = NULL;
+		}
+	}
+
+	if (!r)
+		_num_ios = new_ios;
+
+	return r;
+}
+
+int dm_io_get(unsigned int num_pages)
+{
+	return resize_pool(_num_ios + pages_to_ios(num_pages));
+}
+
+void dm_io_put(unsigned int num_pages)
+{
+	resize_pool(_num_ios - pages_to_ios(num_pages));
+}
+
+/*-----------------------------------------------------------------
+ * We need to keep track of which region a bio is doing io for.
+ * In order to save a memory allocation we store this the last
+ * bvec which we know is unused (blech).
+ *---------------------------------------------------------------*/
+static inline void bio_set_region(struct bio *bio, unsigned region)
+{
+	bio->bi_io_vec[bio->bi_max_vecs - 1].bv_len = region;
+}
+
+static inline unsigned bio_get_region(struct bio *bio)
+{
+	return bio->bi_io_vec[bio->bi_max_vecs - 1].bv_len;
+}
+
+/*-----------------------------------------------------------------
+ * We need an io object to keep track of the number of bios that
+ * have been dispatched for a particular io.
+ *---------------------------------------------------------------*/
+static void dec_count(struct io *io, unsigned int region, int error)
+{
+	if (error)
+		set_bit(region, &io->error);
+
+	if (atomic_dec_and_test(&io->count)) {
+		if (io->sleeper)
+			wake_up_process(io->sleeper);
+
+		else {
+			int r = io->error;
+			io_notify_fn fn = io->callback;
+			void *context = io->context;
+
+			mempool_free(io, _io_pool);
+			fn(r, context);
+		}
+	}
+}
+
+/* FIXME Move this to bio.h? */
+static void zero_fill_bio(struct bio *bio)
+{
+	unsigned long flags;
+	struct bio_vec *bv;
+	int i;
+
+	bio_for_each_segment(bv, bio, i) {
+		char *data = bvec_kmap_irq(bv, &flags);
+		memset(data, 0, bv->bv_len);
+		flush_dcache_page(bv->bv_page);
+		bvec_kunmap_irq(data, &flags);
+	}
+}
+
+static int endio(struct bio *bio, unsigned int done, int error)
+{
+	struct io *io = (struct io *) bio->bi_private;
+
+	/* keep going until we've finished */
+	if (bio->bi_size)
+		return 1;
+
+	if (error && bio_data_dir(bio) == READ)
+		zero_fill_bio(bio);
+
+	dec_count(io, bio_get_region(bio), error);
+	bio_put(bio);
+
+	return 0;
+}
+
+static void bio_dtr(struct bio *bio)
+{
+	_bio_count--;
+	bio_set_free(&_bios, bio);
+}
+
+/*-----------------------------------------------------------------
+ * These little objects provide an abstraction for getting a new
+ * destination page for io.
+ *---------------------------------------------------------------*/
+struct dpages {
+	void (*get_page)(struct dpages *dp,
+			 struct page **p, unsigned long *len, unsigned *offset);
+	void (*next_page)(struct dpages *dp);
+
+	unsigned context_u;
+	void *context_ptr;
+};
+
+/*
+ * Functions for getting the pages from a list.
+ */
+static void list_get_page(struct dpages *dp,
+		  struct page **p, unsigned long *len, unsigned *offset)
+{
+	unsigned o = dp->context_u;
+	struct page_list *pl = (struct page_list *) dp->context_ptr;
+
+	*p = pl->page;
+	*len = PAGE_SIZE - o;
+	*offset = o;
+}
+
+static void list_next_page(struct dpages *dp)
+{
+	struct page_list *pl = (struct page_list *) dp->context_ptr;
+	dp->context_ptr = pl->next;
+	dp->context_u = 0;
+}
+
+static void list_dp_init(struct dpages *dp, struct page_list *pl, unsigned offset)
+{
+	dp->get_page = list_get_page;
+	dp->next_page = list_next_page;
+	dp->context_u = offset;
+	dp->context_ptr = pl;
+}
+
+/*
+ * Functions for getting the pages from a bvec.
+ */
+static void bvec_get_page(struct dpages *dp,
+		  struct page **p, unsigned long *len, unsigned *offset)
+{
+	struct bio_vec *bvec = (struct bio_vec *) dp->context_ptr;
+	*p = bvec->bv_page;
+	*len = bvec->bv_len;
+	*offset = bvec->bv_offset;
+}
+
+static void bvec_next_page(struct dpages *dp)
+{
+	struct bio_vec *bvec = (struct bio_vec *) dp->context_ptr;
+	dp->context_ptr = bvec + 1;
+}
+
+static void bvec_dp_init(struct dpages *dp, struct bio_vec *bvec)
+{
+	dp->get_page = bvec_get_page;
+	dp->next_page = bvec_next_page;
+	dp->context_ptr = bvec;
+}
+
+static void vm_get_page(struct dpages *dp,
+		 struct page **p, unsigned long *len, unsigned *offset)
+{
+	*p = vmalloc_to_page(dp->context_ptr);
+	*offset = dp->context_u;
+	*len = PAGE_SIZE - dp->context_u;
+}
+
+static void vm_next_page(struct dpages *dp)
+{
+	dp->context_ptr += PAGE_SIZE - dp->context_u;
+	dp->context_u = 0;
+}
+
+static void vm_dp_init(struct dpages *dp, void *data)
+{
+	dp->get_page = vm_get_page;
+	dp->next_page = vm_next_page;
+	dp->context_u = ((unsigned long) data) & (PAGE_SIZE - 1);
+	dp->context_ptr = data;
+}
+
+/*-----------------------------------------------------------------
+ * IO routines that accept a list of pages.
+ *---------------------------------------------------------------*/
+static void do_region(int rw, unsigned int region, struct io_region *where,
+		      struct dpages *dp, struct io *io)
+{
+	struct bio *bio;
+	struct page *page;
+	unsigned long len;
+	unsigned offset;
+	unsigned num_bvecs;
+	sector_t remaining = where->count;
+
+	while (remaining) {
+		/*
+		 * Allocate a suitably sized bio, we add an extra
+		 * bvec for bio_get/set_region().
+		 */
+		num_bvecs = (remaining / (PAGE_SIZE >> 9)) + 2;
+		_bio_count++;
+		bio = bio_set_alloc(&_bios, GFP_NOIO, num_bvecs);
+		bio->bi_sector = where->sector + (where->count - remaining);
+		bio->bi_bdev = where->bdev;
+		bio->bi_end_io = endio;
+		bio->bi_private = io;
+		bio->bi_destructor = bio_dtr;
+		bio_set_region(bio, region);
+
+		/*
+		 * Try and add as many pages as possible.
+		 */
+		while (remaining) {
+			dp->get_page(dp, &page, &len, &offset);
+			len = min(len, to_bytes(remaining));
+			if (!bio_add_page(bio, page, len, offset))
+				break;
+
+			offset = 0;
+			remaining -= to_sector(len);
+			dp->next_page(dp);
+		}
+
+		atomic_inc(&io->count);
+		submit_bio(rw, bio);
+	}
+}
+
+static void dispatch_io(int rw, unsigned int num_regions,
+			struct io_region *where, struct dpages *dp,
+			struct io *io, int sync)
+{
+	int i;
+	struct dpages old_pages = *dp;
+
+	if (sync)
+		rw |= (1 << BIO_RW_SYNC);
+
+	/*
+	 * For multiple regions we need to be careful to rewind
+	 * the dp object for each call to do_region.
+	 */
+	for (i = 0; i < num_regions; i++) {
+		*dp = old_pages;
+		if (where[i].count)
+			do_region(rw, i, where + i, dp, io);
+	}
+
+	/*
+	 * Drop the extra refence that we were holding to avoid
+	 * the io being completed too early.
+	 */
+	dec_count(io, 0, 0);
+}
+
+static int sync_io(unsigned int num_regions, struct io_region *where,
+	    int rw, struct dpages *dp, unsigned long *error_bits)
+{
+	struct io io;
+
+	if (num_regions > 1 && rw != WRITE) {
+		WARN_ON(1);
+		return -EIO;
+	}
+
+	io.error = 0;
+	atomic_set(&io.count, 1); /* see dispatch_io() */
+	io.sleeper = current;
+
+	dispatch_io(rw, num_regions, where, dp, &io, 1);
+
+	while (1) {
+		set_current_state(TASK_UNINTERRUPTIBLE);
+
+		if (!atomic_read(&io.count) || signal_pending(current))
+			break;
+
+		io_schedule();
+	}
+	set_current_state(TASK_RUNNING);
+
+	if (atomic_read(&io.count))
+		return -EINTR;
+
+	*error_bits = io.error;
+	return io.error ? -EIO : 0;
+}
+
+static int async_io(unsigned int num_regions, struct io_region *where, int rw,
+	     struct dpages *dp, io_notify_fn fn, void *context)
+{
+	struct io *io;
+
+	if (num_regions > 1 && rw != WRITE) {
+		WARN_ON(1);
+		fn(1, context);
+		return -EIO;
+	}
+
+	io = mempool_alloc(_io_pool, GFP_NOIO);
+	io->error = 0;
+	atomic_set(&io->count, 1); /* see dispatch_io() */
+	io->sleeper = NULL;
+	io->callback = fn;
+	io->context = context;
+
+	dispatch_io(rw, num_regions, where, dp, io, 0);
+	return 0;
+}
+
+int dm_io_sync(unsigned int num_regions, struct io_region *where, int rw,
+	       struct page_list *pl, unsigned int offset,
+	       unsigned long *error_bits)
+{
+	struct dpages dp;
+	list_dp_init(&dp, pl, offset);
+	return sync_io(num_regions, where, rw, &dp, error_bits);
+}
+
+int dm_io_sync_bvec(unsigned int num_regions, struct io_region *where, int rw,
+		    struct bio_vec *bvec, unsigned long *error_bits)
+{
+	struct dpages dp;
+	bvec_dp_init(&dp, bvec);
+	return sync_io(num_regions, where, rw, &dp, error_bits);
+}
+
+int dm_io_sync_vm(unsigned int num_regions, struct io_region *where, int rw,
+		  void *data, unsigned long *error_bits)
+{
+	struct dpages dp;
+	vm_dp_init(&dp, data);
+	return sync_io(num_regions, where, rw, &dp, error_bits);
+}
+
+int dm_io_async(unsigned int num_regions, struct io_region *where, int rw,
+		struct page_list *pl, unsigned int offset,
+		io_notify_fn fn, void *context)
+{
+	struct dpages dp;
+	list_dp_init(&dp, pl, offset);
+	return async_io(num_regions, where, rw, &dp, fn, context);
+}
+
+int dm_io_async_bvec(unsigned int num_regions, struct io_region *where, int rw,
+		     struct bio_vec *bvec, io_notify_fn fn, void *context)
+{
+	struct dpages dp;
+	bvec_dp_init(&dp, bvec);
+	return async_io(num_regions, where, rw, &dp, fn, context);
+}
+
+int dm_io_async_vm(unsigned int num_regions, struct io_region *where, int rw,
+		   void *data, io_notify_fn fn, void *context)
+{
+	struct dpages dp;
+	vm_dp_init(&dp, data);
+	return async_io(num_regions, where, rw, &dp, fn, context);
+}
+
+EXPORT_SYMBOL(dm_io_get);
+EXPORT_SYMBOL(dm_io_put);
+EXPORT_SYMBOL(dm_io_sync);
+EXPORT_SYMBOL(dm_io_async);
+EXPORT_SYMBOL(dm_io_sync_bvec);
+EXPORT_SYMBOL(dm_io_async_bvec);
+EXPORT_SYMBOL(dm_io_sync_vm);
+EXPORT_SYMBOL(dm_io_async_vm);
--- diff/drivers/md/dm-io.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/dm-io.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2003 Sistina Software
+ *
+ * This file is released under the GPL.
+ */
+
+#ifndef _DM_IO_H
+#define _DM_IO_H
+
+#include "dm.h"
+
+/* FIXME make this configurable */
+#define DM_MAX_IO_REGIONS 8
+
+struct io_region {
+	struct block_device *bdev;
+	sector_t sector;
+	sector_t count;
+};
+
+struct page_list {
+	struct page_list *next;
+	struct page *page;
+};
+
+
+/*
+ * 'error' is a bitset, with each bit indicating whether an error
+ * occurred doing io to the corresponding region.
+ */
+typedef void (*io_notify_fn)(unsigned long error, void *context);
+
+
+/*
+ * Before anyone uses the IO interface they should call
+ * dm_io_get(), specifying roughly how many pages they are
+ * expecting to perform io on concurrently.
+ *
+ * This function may block.
+ */
+int dm_io_get(unsigned int num_pages);
+void dm_io_put(unsigned int num_pages);
+
+/*
+ * Synchronous IO.
+ *
+ * Please ensure that the rw flag in the next two functions is
+ * either READ or WRITE, ie. we don't take READA.  Any
+ * regions with a zero count field will be ignored.
+ */
+int dm_io_sync(unsigned int num_regions, struct io_region *where, int rw,
+	       struct page_list *pl, unsigned int offset,
+	       unsigned long *error_bits);
+
+int dm_io_sync_bvec(unsigned int num_regions, struct io_region *where, int rw,
+		    struct bio_vec *bvec, unsigned long *error_bits);
+
+int dm_io_sync_vm(unsigned int num_regions, struct io_region *where, int rw,
+		  void *data, unsigned long *error_bits);
+
+/*
+ * Aynchronous IO.
+ *
+ * The 'where' array may be safely allocated on the stack since
+ * the function takes a copy.
+ */
+int dm_io_async(unsigned int num_regions, struct io_region *where, int rw,
+		struct page_list *pl, unsigned int offset,
+		io_notify_fn fn, void *context);
+
+int dm_io_async_bvec(unsigned int num_regions, struct io_region *where, int rw,
+		     struct bio_vec *bvec, io_notify_fn fn, void *context);
+
+int dm_io_async_vm(unsigned int num_regions, struct io_region *where, int rw,
+		   void *data, io_notify_fn fn, void *context);
+
+#endif
--- diff/drivers/md/dm-log.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/dm-log.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,629 @@
+/*
+ * Copyright (C) 2003 Sistina Software
+ *
+ * This file is released under the LGPL.
+ */
+
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/vmalloc.h>
+
+#include "dm-log.h"
+#include "dm-io.h"
+
+static LIST_HEAD(_log_types);
+static spinlock_t _lock = SPIN_LOCK_UNLOCKED;
+
+int dm_register_dirty_log_type(struct dirty_log_type *type)
+{
+	if (!try_module_get(type->module))
+		return -EINVAL;
+
+	spin_lock(&_lock);
+	type->use_count = 0;
+	list_add(&type->list, &_log_types);
+	spin_unlock(&_lock);
+
+	return 0;
+}
+
+int dm_unregister_dirty_log_type(struct dirty_log_type *type)
+{
+	spin_lock(&_lock);
+
+	if (type->use_count)
+		DMWARN("Attempt to unregister a log type that is still in use");
+	else {
+		list_del(&type->list);
+		module_put(type->module);
+	}
+
+	spin_unlock(&_lock);
+
+	return 0;
+}
+
+static struct dirty_log_type *get_type(const char *type_name)
+{
+	struct dirty_log_type *type;
+
+	spin_lock(&_lock);
+	list_for_each_entry (type, &_log_types, list)
+		if (!strcmp(type_name, type->name)) {
+			type->use_count++;
+			spin_unlock(&_lock);
+			return type;
+		}
+
+	spin_unlock(&_lock);
+	return NULL;
+}
+
+static void put_type(struct dirty_log_type *type)
+{
+	spin_lock(&_lock);
+	type->use_count--;
+	spin_unlock(&_lock);
+}
+
+struct dirty_log *dm_create_dirty_log(const char *type_name, struct dm_target *ti,
+				      unsigned int argc, char **argv)
+{
+	struct dirty_log_type *type;
+	struct dirty_log *log;
+
+	log = kmalloc(sizeof(*log), GFP_KERNEL);
+	if (!log)
+		return NULL;
+
+	type = get_type(type_name);
+	if (!type) {
+		kfree(log);
+		return NULL;
+	}
+
+	log->type = type;
+	if (type->ctr(log, ti, argc, argv)) {
+		kfree(log);
+		put_type(type);
+		return NULL;
+	}
+
+	return log;
+}
+
+void dm_destroy_dirty_log(struct dirty_log *log)
+{
+	log->type->dtr(log);
+	put_type(log->type);
+	kfree(log);
+}
+
+/*-----------------------------------------------------------------
+ * Persistent and core logs share a lot of their implementation.
+ * FIXME: need a reload method to be called from a resume
+ *---------------------------------------------------------------*/
+/*
+ * Magic for persistent mirrors: "MiRr"
+ */
+#define MIRROR_MAGIC 0x4D695272
+
+/*
+ * The on-disk version of the metadata.
+ */
+#define MIRROR_DISK_VERSION 1
+#define LOG_OFFSET 2
+
+struct log_header {
+	uint32_t magic;
+
+	/*
+	 * Simple, incrementing version. no backward
+	 * compatibility.
+	 */
+	uint32_t version;
+	sector_t nr_regions;
+};
+
+struct log_c {
+	struct dm_target *ti;
+	int touched;
+	sector_t region_size;
+	unsigned int region_count;
+	region_t sync_count;
+
+	unsigned bitset_uint32_count;
+	uint32_t *clean_bits;
+	uint32_t *sync_bits;
+	uint32_t *recovering_bits;	/* FIXME: this seems excessive */
+
+	int sync_search;
+
+	/*
+	 * Disk log fields
+	 */
+	struct dm_dev *log_dev;
+	struct log_header header;
+
+	struct io_region header_location;
+	struct log_header *disk_header;
+
+	struct io_region bits_location;
+	uint32_t *disk_bits;
+};
+
+/*
+ * The touched member needs to be updated every time we access
+ * one of the bitsets.
+ */
+static  inline int log_test_bit(uint32_t *bs, unsigned bit)
+{
+	return test_bit(bit, (unsigned long *) bs) ? 1 : 0;
+}
+
+static inline void log_set_bit(struct log_c *l,
+			       uint32_t *bs, unsigned bit)
+{
+	set_bit(bit, (unsigned long *) bs);
+	l->touched = 1;
+}
+
+static inline void log_clear_bit(struct log_c *l,
+				 uint32_t *bs, unsigned bit)
+{
+	clear_bit(bit, (unsigned long *) bs);
+	l->touched = 1;
+}
+
+/*----------------------------------------------------------------
+ * Header IO
+ *--------------------------------------------------------------*/
+static void header_to_disk(struct log_header *core, struct log_header *disk)
+{
+	disk->magic = cpu_to_le32(core->magic);
+	disk->version = cpu_to_le32(core->version);
+	disk->nr_regions = cpu_to_le64(core->nr_regions);
+}
+
+static void header_from_disk(struct log_header *core, struct log_header *disk)
+{
+	core->magic = le32_to_cpu(disk->magic);
+	core->version = le32_to_cpu(disk->version);
+	core->nr_regions = le64_to_cpu(disk->nr_regions);
+}
+
+static int read_header(struct log_c *log)
+{
+	int r;
+	unsigned long ebits;
+
+	r = dm_io_sync_vm(1, &log->header_location, READ,
+			  log->disk_header, &ebits);
+	if (r)
+		return r;
+
+	header_from_disk(&log->header, log->disk_header);
+
+	if (log->header.magic != MIRROR_MAGIC) {
+		log->header.magic = MIRROR_MAGIC;
+		log->header.version = MIRROR_DISK_VERSION;
+		log->header.nr_regions = 0;
+	}
+
+	if (log->header.version != MIRROR_DISK_VERSION) {
+		DMWARN("incompatible disk log version");
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static inline int write_header(struct log_c *log)
+{
+	unsigned long ebits;
+
+	header_to_disk(&log->header, log->disk_header);
+	return dm_io_sync_vm(1, &log->header_location, WRITE,
+			     log->disk_header, &ebits);
+}
+
+/*----------------------------------------------------------------
+ * Bits IO
+ *--------------------------------------------------------------*/
+static inline void bits_to_core(uint32_t *core, uint32_t *disk, unsigned count)
+{
+	unsigned i;
+
+	for (i = 0; i < count; i++)
+		core[i] = le32_to_cpu(disk[i]);
+}
+
+static inline void bits_to_disk(uint32_t *core, uint32_t *disk, unsigned count)
+{
+	unsigned i;
+
+	/* copy across the clean/dirty bitset */
+	for (i = 0; i < count; i++)
+		disk[i] = cpu_to_le32(core[i]);
+}
+
+static int read_bits(struct log_c *log)
+{
+	int r;
+	unsigned long ebits;
+
+	r = dm_io_sync_vm(1, &log->bits_location, READ,
+			  log->disk_bits, &ebits);
+	if (r)
+		return r;
+
+	bits_to_core(log->clean_bits, log->disk_bits,
+		     log->bitset_uint32_count);
+	return 0;
+}
+
+static int write_bits(struct log_c *log)
+{
+	unsigned long ebits;
+	bits_to_disk(log->clean_bits, log->disk_bits,
+		     log->bitset_uint32_count);
+	return dm_io_sync_vm(1, &log->bits_location, WRITE,
+			     log->disk_bits, &ebits);
+}
+
+/*----------------------------------------------------------------
+ * constructor/destructor
+ *--------------------------------------------------------------*/
+#define BYTE_SHIFT 3
+static int core_ctr(struct dirty_log *log, struct dm_target *ti,
+		    unsigned int argc, char **argv)
+{
+	struct log_c *lc;
+	sector_t region_size;
+	unsigned int region_count;
+	size_t bitset_size;
+
+	if (argc != 1) {
+		DMWARN("wrong number of arguments to log_c");
+		return -EINVAL;
+	}
+
+	if (sscanf(argv[0], SECTOR_FORMAT, &region_size) != 1) {
+		DMWARN("invalid region size string");
+		return -EINVAL;
+	}
+
+	region_count = dm_div_up(ti->len, region_size);
+
+	lc = kmalloc(sizeof(*lc), GFP_KERNEL);
+	if (!lc) {
+		DMWARN("couldn't allocate core log");
+		return -ENOMEM;
+	}
+
+	lc->ti = ti;
+	lc->touched = 0;
+	lc->region_size = region_size;
+	lc->region_count = region_count;
+
+	/*
+	 * Work out how many words we need to hold the bitset.
+	 */
+	bitset_size = dm_round_up(region_count,
+				  sizeof(*lc->clean_bits) << BYTE_SHIFT);
+	bitset_size >>= BYTE_SHIFT;
+
+	lc->bitset_uint32_count = bitset_size / 4;
+	lc->clean_bits = vmalloc(bitset_size);
+	if (!lc->clean_bits) {
+		DMWARN("couldn't allocate clean bitset");
+		kfree(lc);
+		return -ENOMEM;
+	}
+	memset(lc->clean_bits, -1, bitset_size);
+
+	lc->sync_bits = vmalloc(bitset_size);
+	if (!lc->sync_bits) {
+		DMWARN("couldn't allocate sync bitset");
+		vfree(lc->clean_bits);
+		kfree(lc);
+		return -ENOMEM;
+	}
+	memset(lc->sync_bits, 0, bitset_size);
+        lc->sync_count = 0;
+
+	lc->recovering_bits = vmalloc(bitset_size);
+	if (!lc->recovering_bits) {
+		DMWARN("couldn't allocate sync bitset");
+		vfree(lc->sync_bits);
+		vfree(lc->clean_bits);
+		kfree(lc);
+		return -ENOMEM;
+	}
+	memset(lc->recovering_bits, 0, bitset_size);
+	lc->sync_search = 0;
+	log->context = lc;
+	return 0;
+}
+
+static void core_dtr(struct dirty_log *log)
+{
+	struct log_c *lc = (struct log_c *) log->context;
+	vfree(lc->clean_bits);
+	vfree(lc->sync_bits);
+	vfree(lc->recovering_bits);
+	kfree(lc);
+}
+
+static int disk_ctr(struct dirty_log *log, struct dm_target *ti,
+		    unsigned int argc, char **argv)
+{
+	int r;
+	size_t size;
+	struct log_c *lc;
+	struct dm_dev *dev;
+
+	if (argc != 2) {
+		DMWARN("wrong number of arguments to log_d");
+		return -EINVAL;
+	}
+
+	r = dm_get_device(ti, argv[0], 0, 0 /* FIXME */,
+			  FMODE_READ | FMODE_WRITE, &dev);
+	if (r)
+		return r;
+
+	r = core_ctr(log, ti, argc - 1, argv + 1);
+	if (r) {
+		dm_put_device(ti, dev);
+		return r;
+	}
+
+	lc = (struct log_c *) log->context;
+	lc->log_dev = dev;
+
+	/* setup the disk header fields */
+	lc->header_location.bdev = lc->log_dev->bdev;
+	lc->header_location.sector = 0;
+	lc->header_location.count = 1;
+
+	/*
+	 * We can't read less than this amount, even though we'll
+	 * not be using most of this space.
+	 */
+	lc->disk_header = vmalloc(1 << SECTOR_SHIFT);
+	if (!lc->disk_header)
+		goto bad;
+
+	/* setup the disk bitset fields */
+	lc->bits_location.bdev = lc->log_dev->bdev;
+	lc->bits_location.sector = LOG_OFFSET;
+
+	size = dm_round_up(lc->bitset_uint32_count * sizeof(uint32_t),
+			   1 << SECTOR_SHIFT);
+	lc->bits_location.count = size >> SECTOR_SHIFT;
+	lc->disk_bits = vmalloc(size);
+	if (!lc->disk_bits) {
+		vfree(lc->disk_header);
+		goto bad;
+	}
+	return 0;
+
+ bad:
+	dm_put_device(ti, lc->log_dev);
+	core_dtr(log);
+	return -ENOMEM;
+}
+
+static void disk_dtr(struct dirty_log *log)
+{
+	struct log_c *lc = (struct log_c *) log->context;
+	dm_put_device(lc->ti, lc->log_dev);
+	vfree(lc->disk_header);
+	vfree(lc->disk_bits);
+	core_dtr(log);
+}
+
+static int count_bits32(uint32_t *addr, unsigned size)
+{
+	int count = 0, i;
+
+	for (i = 0; i < size; i++) {
+		count += hweight32(*(addr+i));
+	}
+	return count;
+}
+
+static int disk_resume(struct dirty_log *log)
+{
+	int r;
+	unsigned i;
+	struct log_c *lc = (struct log_c *) log->context;
+	size_t size = lc->bitset_uint32_count * sizeof(uint32_t);
+
+	/* read the disk header */
+	r = read_header(lc);
+	if (r)
+		return r;
+
+	/* read the bits */
+	r = read_bits(lc);
+	if (r)
+		return r;
+
+	/* zero any new bits if the mirror has grown */
+	for (i = lc->header.nr_regions; i < lc->region_count; i++)
+		/* FIXME: amazingly inefficient */
+		log_clear_bit(lc, lc->clean_bits, i);
+
+	/* copy clean across to sync */
+	memcpy(lc->sync_bits, lc->clean_bits, size);
+	lc->sync_count = count_bits32(lc->clean_bits, lc->bitset_uint32_count);
+
+	/* write the bits */
+	r = write_bits(lc);
+	if (r)
+		return r;
+
+	/* set the correct number of regions in the header */
+	lc->header.nr_regions = lc->region_count;
+
+	/* write the new header */
+	return write_header(lc);
+}
+
+static sector_t core_get_region_size(struct dirty_log *log)
+{
+	struct log_c *lc = (struct log_c *) log->context;
+	return lc->region_size;
+}
+
+static int core_is_clean(struct dirty_log *log, region_t region)
+{
+	struct log_c *lc = (struct log_c *) log->context;
+	return log_test_bit(lc->clean_bits, region);
+}
+
+static int core_in_sync(struct dirty_log *log, region_t region, int block)
+{
+	struct log_c *lc = (struct log_c *) log->context;
+	return log_test_bit(lc->sync_bits, region);
+}
+
+static int core_flush(struct dirty_log *log)
+{
+	/* no op */
+	return 0;
+}
+
+static int disk_flush(struct dirty_log *log)
+{
+	int r;
+	struct log_c *lc = (struct log_c *) log->context;
+
+	/* only write if the log has changed */
+	if (!lc->touched)
+		return 0;
+
+	r = write_bits(lc);
+	if (!r)
+		lc->touched = 0;
+
+	return r;
+}
+
+static void core_mark_region(struct dirty_log *log, region_t region)
+{
+	struct log_c *lc = (struct log_c *) log->context;
+	log_clear_bit(lc, lc->clean_bits, region);
+}
+
+static void core_clear_region(struct dirty_log *log, region_t region)
+{
+	struct log_c *lc = (struct log_c *) log->context;
+	log_set_bit(lc, lc->clean_bits, region);
+}
+
+static int core_get_resync_work(struct dirty_log *log, region_t *region)
+{
+	struct log_c *lc = (struct log_c *) log->context;
+
+	if (lc->sync_search >= lc->region_count)
+		return 0;
+
+	do {
+		*region = find_next_zero_bit((unsigned long *) lc->sync_bits,
+					     lc->region_count,
+					     lc->sync_search);
+		lc->sync_search = *region + 1;
+
+		if (*region == lc->region_count)
+			return 0;
+
+	} while (log_test_bit(lc->recovering_bits, *region));
+
+	log_set_bit(lc, lc->recovering_bits, *region);
+	return 1;
+}
+
+static void core_complete_resync_work(struct dirty_log *log, region_t region,
+				      int success)
+{
+	struct log_c *lc = (struct log_c *) log->context;
+
+	log_clear_bit(lc, lc->recovering_bits, region);
+	if (success) {
+		log_set_bit(lc, lc->sync_bits, region);
+                lc->sync_count++;
+        }
+}
+
+static region_t core_get_sync_count(struct dirty_log *log)
+{
+        struct log_c *lc = (struct log_c *) log->context;
+
+        return lc->sync_count;
+}
+
+static struct dirty_log_type _core_type = {
+	.name = "core",
+	.module = THIS_MODULE,
+	.ctr = core_ctr,
+	.dtr = core_dtr,
+	.get_region_size = core_get_region_size,
+	.is_clean = core_is_clean,
+	.in_sync = core_in_sync,
+	.flush = core_flush,
+	.mark_region = core_mark_region,
+	.clear_region = core_clear_region,
+	.get_resync_work = core_get_resync_work,
+	.complete_resync_work = core_complete_resync_work,
+        .get_sync_count = core_get_sync_count
+};
+
+static struct dirty_log_type _disk_type = {
+	.name = "disk",
+	.module = THIS_MODULE,
+	.ctr = disk_ctr,
+	.dtr = disk_dtr,
+	.suspend = disk_flush,
+	.resume = disk_resume,
+	.get_region_size = core_get_region_size,
+	.is_clean = core_is_clean,
+	.in_sync = core_in_sync,
+	.flush = disk_flush,
+	.mark_region = core_mark_region,
+	.clear_region = core_clear_region,
+	.get_resync_work = core_get_resync_work,
+	.complete_resync_work = core_complete_resync_work,
+        .get_sync_count = core_get_sync_count
+};
+
+int __init dm_dirty_log_init(void)
+{
+	int r;
+
+	r = dm_register_dirty_log_type(&_core_type);
+	if (r)
+		DMWARN("couldn't register core log");
+
+	r = dm_register_dirty_log_type(&_disk_type);
+	if (r) {
+		DMWARN("couldn't register disk type");
+		dm_unregister_dirty_log_type(&_core_type);
+	}
+
+	return r;
+}
+
+void dm_dirty_log_exit(void)
+{
+	dm_unregister_dirty_log_type(&_disk_type);
+	dm_unregister_dirty_log_type(&_core_type);
+}
+
+EXPORT_SYMBOL(dm_register_dirty_log_type);
+EXPORT_SYMBOL(dm_unregister_dirty_log_type);
+EXPORT_SYMBOL(dm_create_dirty_log);
+EXPORT_SYMBOL(dm_destroy_dirty_log);
--- diff/drivers/md/dm-log.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/dm-log.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2003 Sistina Software
+ *
+ * This file is released under the LGPL.
+ */
+
+#ifndef DM_DIRTY_LOG
+#define DM_DIRTY_LOG
+
+#include "dm.h"
+
+typedef sector_t region_t;
+
+struct dirty_log_type;
+
+struct dirty_log {
+	struct dirty_log_type *type;
+	void *context;
+};
+
+struct dirty_log_type {
+	struct list_head list;
+	const char *name;
+	struct module *module;
+	unsigned int use_count;
+
+	int (*ctr)(struct dirty_log *log, struct dm_target *ti,
+		   unsigned int argc, char **argv);
+	void (*dtr)(struct dirty_log *log);
+
+	/*
+	 * There are times when we don't want the log to touch
+	 * the disk.
+	 */
+	int (*suspend)(struct dirty_log *log);
+	int (*resume)(struct dirty_log *log);
+
+	/*
+	 * Retrieves the smallest size of region that the log can
+	 * deal with.
+	 */
+	sector_t (*get_region_size)(struct dirty_log *log);
+
+        /*
+	 * A predicate to say whether a region is clean or not.
+	 * May block.
+	 */
+	int (*is_clean)(struct dirty_log *log, region_t region);
+
+	/*
+	 *  Returns: 0, 1, -EWOULDBLOCK, < 0
+	 *
+	 * A predicate function to check the area given by
+	 * [sector, sector + len) is in sync.
+	 *
+	 * If -EWOULDBLOCK is returned the state of the region is
+	 * unknown, typically this will result in a read being
+	 * passed to a daemon to deal with, since a daemon is
+	 * allowed to block.
+	 */
+	int (*in_sync)(struct dirty_log *log, region_t region, int can_block);
+
+	/*
+	 * Flush the current log state (eg, to disk).  This
+	 * function may block.
+	 */
+	int (*flush)(struct dirty_log *log);
+
+	/*
+	 * Mark an area as clean or dirty.  These functions may
+	 * block, though for performance reasons blocking should
+	 * be extremely rare (eg, allocating another chunk of
+	 * memory for some reason).
+	 */
+	void (*mark_region)(struct dirty_log *log, region_t region);
+	void (*clear_region)(struct dirty_log *log, region_t region);
+
+	/*
+	 * Returns: <0 (error), 0 (no region), 1 (region)
+	 *
+	 * The mirrord will need perform recovery on regions of
+	 * the mirror that are in the NOSYNC state.  This
+	 * function asks the log to tell the caller about the
+	 * next region that this machine should recover.
+	 *
+	 * Do not confuse this function with 'in_sync()', one
+	 * tells you if an area is synchronised, the other
+	 * assigns recovery work.
+	*/
+	int (*get_resync_work)(struct dirty_log *log, region_t *region);
+
+	/*
+	 * This notifies the log that the resync of an area has
+	 * been completed.  The log should then mark this region
+	 * as CLEAN.
+	 */
+	void (*complete_resync_work)(struct dirty_log *log,
+				     region_t region, int success);
+
+        /*
+	 * Returns the number of regions that are in sync.
+         */
+        region_t (*get_sync_count)(struct dirty_log *log);
+};
+
+int dm_register_dirty_log_type(struct dirty_log_type *type);
+int dm_unregister_dirty_log_type(struct dirty_log_type *type);
+
+
+/*
+ * Make sure you use these two functions, rather than calling
+ * type->constructor/destructor() directly.
+ */
+struct dirty_log *dm_create_dirty_log(const char *type_name, struct dm_target *ti,
+				      unsigned int argc, char **argv);
+void dm_destroy_dirty_log(struct dirty_log *log);
+
+/*
+ * init/exit functions.
+ */
+int dm_dirty_log_init(void);
+void dm_dirty_log_exit(void);
+
+#endif
--- diff/drivers/md/dm-raid1.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/dm-raid1.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,1278 @@
+/*
+ * Copyright (C) 2003 Sistina Software Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm.h"
+#include "dm-bio-list.h"
+#include "dm-io.h"
+#include "dm-log.h"
+#include "kcopyd.h"
+
+#include <linux/ctype.h>
+#include <linux/init.h>
+#include <linux/mempool.h>
+#include <linux/module.h>
+#include <linux/pagemap.h>
+#include <linux/slab.h>
+#include <linux/time.h>
+#include <linux/vmalloc.h>
+#include <linux/workqueue.h>
+
+static struct workqueue_struct *_kmirrord_wq;
+static struct work_struct _kmirrord_work;
+
+static inline void wake(void)
+{
+	queue_work(_kmirrord_wq, &_kmirrord_work);
+}
+
+/*-----------------------------------------------------------------
+ * Region hash
+ *
+ * The mirror splits itself up into discrete regions.  Each
+ * region can be in one of three states: clean, dirty,
+ * nosync.  There is no need to put clean regions in the hash.
+ *
+ * In addition to being present in the hash table a region _may_
+ * be present on one of three lists.
+ *
+ *   clean_regions: Regions on this list have no io pending to
+ *   them, they are in sync, we are no longer interested in them,
+ *   they are dull.  rh_update_states() will remove them from the
+ *   hash table.
+ *
+ *   quiesced_regions: These regions have been spun down, ready
+ *   for recovery.  rh_recovery_start() will remove regions from
+ *   this list and hand them to kmirrord, which will schedule the
+ *   recovery io with kcopyd.
+ *
+ *   recovered_regions: Regions that kcopyd has successfully
+ *   recovered.  rh_update_states() will now schedule any delayed
+ *   io, up the recovery_count, and remove the region from the
+ *   hash.
+ *
+ * There are 2 locks:
+ *   A rw spin lock 'hash_lock' protects just the hash table,
+ *   this is never held in write mode from interrupt context,
+ *   which I believe means that we only have to disable irqs when
+ *   doing a write lock.
+ *
+ *   An ordinary spin lock 'region_lock' that protects the three
+ *   lists in the region_hash, with the 'state', 'list' and
+ *   'bhs_delayed' fields of the regions.  This is used from irq
+ *   context, so all other uses will have to suspend local irqs.
+ *---------------------------------------------------------------*/
+struct mirror_set;
+struct region_hash {
+	struct mirror_set *ms;
+	sector_t region_size;
+	unsigned region_shift;
+
+	/* holds persistent region state */
+	struct dirty_log *log;
+
+	/* hash table */
+	rwlock_t hash_lock;
+	mempool_t *region_pool;
+	unsigned int mask;
+	unsigned int nr_buckets;
+	struct list_head *buckets;
+
+	spinlock_t region_lock;
+	struct semaphore recovery_count;
+	struct list_head clean_regions;
+	struct list_head quiesced_regions;
+	struct list_head recovered_regions;
+};
+
+enum {
+	RH_CLEAN,
+	RH_DIRTY,
+	RH_NOSYNC,
+	RH_RECOVERING
+};
+
+struct region {
+	struct region_hash *rh;	/* FIXME: can we get rid of this ? */
+	region_t key;
+	int state;
+
+	struct list_head hash_list;
+	struct list_head list;
+
+	atomic_t pending;
+	struct bio_list delayed_bios;
+};
+
+/*
+ * Conversion fns
+ */
+static inline region_t bio_to_region(struct region_hash *rh, struct bio *bio)
+{
+	return bio->bi_sector >> rh->region_shift;
+}
+
+static inline sector_t region_to_sector(struct region_hash *rh, region_t region)
+{
+	return region << rh->region_shift;
+}
+
+/* FIXME move this */
+static void queue_bio(struct mirror_set *ms, struct bio *bio, int rw);
+
+static void *region_alloc(int gfp_mask, void *pool_data)
+{
+	return kmalloc(sizeof(struct region), gfp_mask);
+}
+
+static void region_free(void *element, void *pool_data)
+{
+	kfree(element);
+}
+
+#define MIN_REGIONS 64
+#define MAX_RECOVERY 1
+static int rh_init(struct region_hash *rh, struct mirror_set *ms,
+		   struct dirty_log *log, sector_t region_size,
+		   region_t nr_regions)
+{
+	unsigned int nr_buckets, max_buckets;
+	size_t i;
+
+	/*
+	 * Calculate a suitable number of buckets for our hash
+	 * table.
+	 */
+	max_buckets = nr_regions >> 6;
+	for (nr_buckets = 128u; nr_buckets < max_buckets; nr_buckets <<= 1)
+		;
+	nr_buckets >>= 1;
+
+	rh->ms = ms;
+	rh->log = log;
+	rh->region_size = region_size;
+	rh->region_shift = ffs(region_size) - 1;
+	rwlock_init(&rh->hash_lock);
+	rh->mask = nr_buckets - 1;
+	rh->nr_buckets = nr_buckets;
+
+	rh->buckets = vmalloc(nr_buckets * sizeof(*rh->buckets));
+	if (!rh->buckets) {
+		DMERR("unable to allocate region hash memory");
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < nr_buckets; i++)
+		INIT_LIST_HEAD(rh->buckets + i);
+
+	spin_lock_init(&rh->region_lock);
+	sema_init(&rh->recovery_count, 0);
+	INIT_LIST_HEAD(&rh->clean_regions);
+	INIT_LIST_HEAD(&rh->quiesced_regions);
+	INIT_LIST_HEAD(&rh->recovered_regions);
+
+	rh->region_pool = mempool_create(MIN_REGIONS, region_alloc,
+					 region_free, NULL);
+	if (!rh->region_pool) {
+		vfree(rh->buckets);
+		rh->buckets = NULL;
+		return -ENOMEM;
+	}
+
+	return 0;
+}
+
+static void rh_exit(struct region_hash *rh)
+{
+	unsigned int h;
+	struct region *reg, *nreg;
+
+	BUG_ON(!list_empty(&rh->quiesced_regions));
+	for (h = 0; h < rh->nr_buckets; h++) {
+		list_for_each_entry_safe(reg, nreg, rh->buckets + h, hash_list) {
+			BUG_ON(atomic_read(&reg->pending));
+			mempool_free(reg, rh->region_pool);
+		}
+	}
+
+	if (rh->log)
+		dm_destroy_dirty_log(rh->log);
+	if (rh->region_pool)
+		mempool_destroy(rh->region_pool);
+	vfree(rh->buckets);
+}
+
+#define RH_HASH_MULT 2654435387U
+
+static inline unsigned int rh_hash(struct region_hash *rh, region_t region)
+{
+	return (unsigned int) ((region * RH_HASH_MULT) >> 12) & rh->mask;
+}
+
+static struct region *__rh_lookup(struct region_hash *rh, region_t region)
+{
+	struct region *reg;
+
+	list_for_each_entry (reg, rh->buckets + rh_hash(rh, region), hash_list)
+		if (reg->key == region)
+			return reg;
+
+	return NULL;
+}
+
+static void __rh_insert(struct region_hash *rh, struct region *reg)
+{
+	unsigned int h = rh_hash(rh, reg->key);
+	list_add(&reg->hash_list, rh->buckets + h);
+}
+
+static struct region *__rh_alloc(struct region_hash *rh, region_t region)
+{
+	struct region *reg, *nreg;
+
+	read_unlock(&rh->hash_lock);
+	nreg = mempool_alloc(rh->region_pool, GFP_NOIO);
+	nreg->state = rh->log->type->in_sync(rh->log, region, 1) ?
+		RH_CLEAN : RH_NOSYNC;
+	nreg->rh = rh;
+	nreg->key = region;
+
+	INIT_LIST_HEAD(&nreg->list);
+
+	atomic_set(&nreg->pending, 0);
+	bio_list_init(&nreg->delayed_bios);
+	write_lock_irq(&rh->hash_lock);
+
+	reg = __rh_lookup(rh, region);
+	if (reg)
+		/* we lost the race */
+		mempool_free(nreg, rh->region_pool);
+
+	else {
+		__rh_insert(rh, nreg);
+		if (nreg->state == RH_CLEAN) {
+			spin_lock_irq(&rh->region_lock);
+			list_add(&nreg->list, &rh->clean_regions);
+			spin_unlock_irq(&rh->region_lock);
+		}
+		reg = nreg;
+	}
+	write_unlock_irq(&rh->hash_lock);
+	read_lock(&rh->hash_lock);
+
+	return reg;
+}
+
+static inline struct region *__rh_find(struct region_hash *rh, region_t region)
+{
+	struct region *reg;
+
+	reg = __rh_lookup(rh, region);
+	if (!reg)
+		reg = __rh_alloc(rh, region);
+
+	return reg;
+}
+
+static int rh_state(struct region_hash *rh, region_t region, int may_block)
+{
+	int r;
+	struct region *reg;
+
+	read_lock(&rh->hash_lock);
+	reg = __rh_lookup(rh, region);
+	read_unlock(&rh->hash_lock);
+
+	if (reg)
+		return reg->state;
+
+	/*
+	 * The region wasn't in the hash, so we fall back to the
+	 * dirty log.
+	 */
+	r = rh->log->type->in_sync(rh->log, region, may_block);
+
+	/*
+	 * Any error from the dirty log (eg. -EWOULDBLOCK) gets
+	 * taken as a RH_NOSYNC
+	 */
+	return r == 1 ? RH_CLEAN : RH_NOSYNC;
+}
+
+static inline int rh_in_sync(struct region_hash *rh,
+			     region_t region, int may_block)
+{
+	int state = rh_state(rh, region, may_block);
+	return state == RH_CLEAN || state == RH_DIRTY;
+}
+
+static void dispatch_bios(struct mirror_set *ms, struct bio_list *bio_list)
+{
+	struct bio *bio;
+
+	while ((bio = bio_list_pop(bio_list))) {
+		queue_bio(ms, bio, WRITE);
+	}
+}
+
+static void rh_update_states(struct region_hash *rh)
+{
+	struct region *reg, *next;
+
+	LIST_HEAD(clean);
+	LIST_HEAD(recovered);
+
+	/*
+	 * Quickly grab the lists.
+	 */
+	write_lock_irq(&rh->hash_lock);
+	spin_lock(&rh->region_lock);
+	if (!list_empty(&rh->clean_regions)) {
+		list_splice(&rh->clean_regions, &clean);
+		INIT_LIST_HEAD(&rh->clean_regions);
+
+		list_for_each_entry (reg, &clean, list) {
+			rh->log->type->clear_region(rh->log, reg->key);
+			list_del(&reg->hash_list);
+		}
+	}
+
+	if (!list_empty(&rh->recovered_regions)) {
+		list_splice(&rh->recovered_regions, &recovered);
+		INIT_LIST_HEAD(&rh->recovered_regions);
+
+		list_for_each_entry (reg, &recovered, list)
+			list_del(&reg->hash_list);
+	}
+	spin_unlock(&rh->region_lock);
+	write_unlock_irq(&rh->hash_lock);
+
+	/*
+	 * All the regions on the recovered and clean lists have
+	 * now been pulled out of the system, so no need to do
+	 * any more locking.
+	 */
+	list_for_each_entry_safe (reg, next, &recovered, list) {
+		rh->log->type->clear_region(rh->log, reg->key);
+		rh->log->type->complete_resync_work(rh->log, reg->key, 1);
+		dispatch_bios(rh->ms, &reg->delayed_bios);
+		up(&rh->recovery_count);
+		mempool_free(reg, rh->region_pool);
+	}
+
+	if (!list_empty(&recovered))
+		rh->log->type->flush(rh->log);
+
+	list_for_each_entry_safe (reg, next, &clean, list)
+		mempool_free(reg, rh->region_pool);
+}
+
+static void rh_inc(struct region_hash *rh, region_t region)
+{
+	struct region *reg;
+
+	read_lock(&rh->hash_lock);
+	reg = __rh_find(rh, region);
+	if (reg->state == RH_CLEAN) {
+		rh->log->type->mark_region(rh->log, reg->key);
+
+		spin_lock_irq(&rh->region_lock);
+		reg->state = RH_DIRTY;
+		list_del_init(&reg->list);	/* take off the clean list */
+		spin_unlock_irq(&rh->region_lock);
+	}
+
+	atomic_inc(&reg->pending);
+	read_unlock(&rh->hash_lock);
+}
+
+static void rh_inc_pending(struct region_hash *rh, struct bio_list *bios)
+{
+	struct bio *bio;
+
+	for (bio = bios->head; bio; bio = bio->bi_next)
+		rh_inc(rh, bio_to_region(rh, bio));
+}
+
+static void rh_dec(struct region_hash *rh, region_t region)
+{
+	unsigned long flags;
+	struct region *reg;
+	int should_wake = 0;
+
+	read_lock(&rh->hash_lock);
+	reg = __rh_lookup(rh, region);
+	read_unlock(&rh->hash_lock);
+
+	if (atomic_dec_and_test(&reg->pending)) {
+		spin_lock_irqsave(&rh->region_lock, flags);
+		if (reg->state == RH_RECOVERING) {
+			list_add_tail(&reg->list, &rh->quiesced_regions);
+		} else {
+			reg->state = RH_CLEAN;
+			list_add(&reg->list, &rh->clean_regions);
+		}
+		spin_unlock_irqrestore(&rh->region_lock, flags);
+		should_wake = 1;
+	}
+
+	if (should_wake)
+		wake();
+}
+
+/*
+ * Starts quiescing a region in preparation for recovery.
+ */
+static int __rh_recovery_prepare(struct region_hash *rh)
+{
+	int r;
+	struct region *reg;
+	region_t region;
+
+	/*
+	 * Ask the dirty log what's next.
+	 */
+	r = rh->log->type->get_resync_work(rh->log, &region);
+	if (r <= 0)
+		return r;
+
+	/*
+	 * Get this region, and start it quiescing by setting the
+	 * recovering flag.
+	 */
+	read_lock(&rh->hash_lock);
+	reg = __rh_find(rh, region);
+	read_unlock(&rh->hash_lock);
+
+	spin_lock_irq(&rh->region_lock);
+	reg->state = RH_RECOVERING;
+
+	/* Already quiesced ? */
+	if (atomic_read(&reg->pending))
+		list_del_init(&reg->list);
+
+	else {
+		list_del_init(&reg->list);
+		list_add(&reg->list, &rh->quiesced_regions);
+	}
+	spin_unlock_irq(&rh->region_lock);
+
+	return 1;
+}
+
+static void rh_recovery_prepare(struct region_hash *rh)
+{
+	while (!down_trylock(&rh->recovery_count))
+		if (__rh_recovery_prepare(rh) <= 0) {
+			up(&rh->recovery_count);
+			break;
+		}
+}
+
+/*
+ * Returns any quiesced regions.
+ */
+static struct region *rh_recovery_start(struct region_hash *rh)
+{
+	struct region *reg = NULL;
+
+	spin_lock_irq(&rh->region_lock);
+	if (!list_empty(&rh->quiesced_regions)) {
+		reg = list_entry(rh->quiesced_regions.next,
+				 struct region, list);
+		list_del_init(&reg->list);	/* remove from the quiesced list */
+	}
+	spin_unlock_irq(&rh->region_lock);
+
+	return reg;
+}
+
+/* FIXME: success ignored for now */
+static void rh_recovery_end(struct region *reg, int success)
+{
+	struct region_hash *rh = reg->rh;
+
+	spin_lock_irq(&rh->region_lock);
+	list_add(&reg->list, &reg->rh->recovered_regions);
+	spin_unlock_irq(&rh->region_lock);
+
+	wake();
+}
+
+static void rh_flush(struct region_hash *rh)
+{
+	rh->log->type->flush(rh->log);
+}
+
+static void rh_delay(struct region_hash *rh, struct bio *bio)
+{
+	struct region *reg;
+
+	read_lock(&rh->hash_lock);
+	reg = __rh_find(rh, bio_to_region(rh, bio));
+	bio_list_add(&reg->delayed_bios, bio);
+	read_unlock(&rh->hash_lock);
+}
+
+static void rh_stop_recovery(struct region_hash *rh)
+{
+	int i;
+
+	/* wait for any recovering regions */
+	for (i = 0; i < MAX_RECOVERY; i++)
+		down(&rh->recovery_count);
+}
+
+static void rh_start_recovery(struct region_hash *rh)
+{
+	int i;
+
+	for (i = 0; i < MAX_RECOVERY; i++)
+		up(&rh->recovery_count);
+
+	wake();
+}
+
+/*-----------------------------------------------------------------
+ * Mirror set structures.
+ *---------------------------------------------------------------*/
+struct mirror {
+	atomic_t error_count;
+	struct dm_dev *dev;
+	sector_t offset;
+};
+
+struct mirror_set {
+	struct dm_target *ti;
+	struct list_head list;
+	struct region_hash rh;
+	struct kcopyd_client *kcopyd_client;
+
+	spinlock_t lock;	/* protects the next two lists */
+	struct bio_list reads;
+	struct bio_list writes;
+
+	/* recovery */
+	region_t nr_regions;
+	int in_sync;
+
+	unsigned int nr_mirrors;
+	struct mirror mirror[0];
+};
+
+/*
+ * Every mirror should look like this one.
+ */
+#define DEFAULT_MIRROR 0
+
+/*
+ * This is yucky.  We squirrel the mirror_set struct away inside
+ * bi_next for write buffers.  This is safe since the bh
+ * doesn't get submitted to the lower levels of block layer.
+ */
+static struct mirror_set *bio_get_ms(struct bio *bio)
+{
+	return (struct mirror_set *) bio->bi_next;
+}
+
+static void bio_set_ms(struct bio *bio, struct mirror_set *ms)
+{
+	bio->bi_next = (struct bio *) ms;
+}
+
+/*-----------------------------------------------------------------
+ * Recovery.
+ *
+ * When a mirror is first activated we may find that some regions
+ * are in the no-sync state.  We have to recover these by
+ * recopying from the default mirror to all the others.
+ *---------------------------------------------------------------*/
+static void recovery_complete(int read_err, unsigned int write_err,
+			      void *context)
+{
+	struct region *reg = (struct region *) context;
+
+	/* FIXME: better error handling */
+	rh_recovery_end(reg, read_err || write_err);
+}
+
+static int recover(struct mirror_set *ms, struct region *reg)
+{
+	int r;
+	unsigned int i;
+	struct io_region from, to[ms->nr_mirrors - 1], *dest;
+	struct mirror *m;
+	unsigned long flags = 0;
+
+	/* fill in the source */
+	m = ms->mirror + DEFAULT_MIRROR;
+	from.bdev = m->dev->bdev;
+	from.sector = m->offset + region_to_sector(reg->rh, reg->key);
+	if (reg->key == (ms->nr_regions - 1)) {
+		/*
+		 * The final region may be smaller than
+		 * region_size.
+		 */
+		from.count = ms->ti->len & (reg->rh->region_size - 1);
+		if (!from.count)
+			from.count = reg->rh->region_size;
+	} else
+		from.count = reg->rh->region_size;
+
+	/* fill in the destinations */
+	for (i = 0, dest = to; i < ms->nr_mirrors; i++) {
+		if (i == DEFAULT_MIRROR)
+			continue;
+
+		m = ms->mirror + i;
+		dest->bdev = m->dev->bdev;
+		dest->sector = m->offset + region_to_sector(reg->rh, reg->key);
+		dest->count = from.count;
+		dest++;
+	}
+
+	/* hand to kcopyd */
+	set_bit(KCOPYD_IGNORE_ERROR, &flags);
+	r = kcopyd_copy(ms->kcopyd_client, &from, ms->nr_mirrors - 1, to, flags,
+			recovery_complete, reg);
+
+	return r;
+}
+
+static void do_recovery(struct mirror_set *ms)
+{
+	int r;
+	struct region *reg;
+	struct dirty_log *log = ms->rh.log;
+
+	/*
+	 * Start quiescing some regions.
+	 */
+	rh_recovery_prepare(&ms->rh);
+
+	/*
+	 * Copy any already quiesced regions.
+	 */
+	while ((reg = rh_recovery_start(&ms->rh))) {
+		r = recover(ms, reg);
+		if (r)
+			rh_recovery_end(reg, 0);
+	}
+
+	/*
+	 * Update the in sync flag.
+	 */
+	if (!ms->in_sync &&
+	    (log->type->get_sync_count(log) == ms->nr_regions)) {
+		/* the sync is complete */
+		dm_table_event(ms->ti->table);
+		ms->in_sync = 1;
+	}
+}
+
+/*-----------------------------------------------------------------
+ * Reads
+ *---------------------------------------------------------------*/
+static struct mirror *choose_mirror(struct mirror_set *ms, sector_t sector)
+{
+	/* FIXME: add read balancing */
+	return ms->mirror + DEFAULT_MIRROR;
+}
+
+/*
+ * remap a buffer to a particular mirror.
+ */
+static void map_bio(struct mirror_set *ms, struct mirror *m, struct bio *bio)
+{
+	bio->bi_bdev = m->dev->bdev;
+	bio->bi_sector = m->offset + (bio->bi_sector - ms->ti->begin);
+}
+
+static void do_reads(struct mirror_set *ms, struct bio_list *reads)
+{
+	region_t region;
+	struct bio *bio;
+	struct mirror *m;
+
+	while ((bio = bio_list_pop(reads))) {
+		region = bio_to_region(&ms->rh, bio);
+
+		/*
+		 * We can only read balance if the region is in sync.
+		 */
+		if (rh_in_sync(&ms->rh, region, 0))
+			m = choose_mirror(ms, bio->bi_sector);
+		else
+			m = ms->mirror + DEFAULT_MIRROR;
+
+		map_bio(ms, m, bio);
+		generic_make_request(bio);
+	}
+}
+
+/*-----------------------------------------------------------------
+ * Writes.
+ *
+ * We do different things with the write io depending on the
+ * state of the region that it's in:
+ *
+ * SYNC: 	increment pending, use kcopyd to write to *all* mirrors
+ * RECOVERING:	delay the io until recovery completes
+ * NOSYNC:	increment pending, just write to the default mirror
+ *---------------------------------------------------------------*/
+static void write_callback(unsigned long error, void *context)
+{
+	unsigned int i;
+	int uptodate = 1;
+	struct bio *bio = (struct bio *) context;
+	struct mirror_set *ms;
+
+	ms = bio_get_ms(bio);
+	bio_set_ms(bio, NULL);
+
+	/*
+	 * NOTE: We don't decrement the pending count here,
+	 * instead it is done by the targets endio function.
+	 * This way we handle both writes to SYNC and NOSYNC
+	 * regions with the same code.
+	 */
+
+	if (error) {
+		/*
+		 * only error the io if all mirrors failed.
+		 * FIXME: bogus
+		 */
+		uptodate = 0;
+		for (i = 0; i < ms->nr_mirrors; i++)
+			if (!test_bit(i, &error)) {
+				uptodate = 1;
+				break;
+			}
+	}
+	bio_endio(bio, bio->bi_size, 0);
+}
+
+static void do_write(struct mirror_set *ms, struct bio *bio)
+{
+	unsigned int i;
+	struct io_region io[ms->nr_mirrors];
+	struct mirror *m;
+
+	for (i = 0; i < ms->nr_mirrors; i++) {
+		m = ms->mirror + i;
+
+		io[i].bdev = m->dev->bdev;
+		io[i].sector = m->offset + (bio->bi_sector - ms->ti->begin);
+		io[i].count = bio->bi_size >> 9;
+	}
+
+	bio_set_ms(bio, ms);
+	dm_io_async_bvec(ms->nr_mirrors, io, WRITE,
+			 bio->bi_io_vec + bio->bi_idx,
+			 write_callback, bio);
+}
+
+static void do_writes(struct mirror_set *ms, struct bio_list *writes)
+{
+	int state;
+	struct bio *bio;
+	struct bio_list sync, nosync, recover, *this_list = NULL;
+
+	if (!writes->head)
+		return;
+
+	/*
+	 * Classify each write.
+	 */
+	bio_list_init(&sync);
+	bio_list_init(&nosync);
+	bio_list_init(&recover);
+
+	while ((bio = bio_list_pop(writes))) {
+		state = rh_state(&ms->rh, bio_to_region(&ms->rh, bio), 1);
+		switch (state) {
+		case RH_CLEAN:
+		case RH_DIRTY:
+			this_list = &sync;
+			break;
+
+		case RH_NOSYNC:
+			this_list = &nosync;
+			break;
+
+		case RH_RECOVERING:
+			this_list = &recover;
+			break;
+		}
+
+		bio_list_add(this_list, bio);
+	}
+
+	/*
+	 * Increment the pending counts for any regions that will
+	 * be written to (writes to recover regions are going to
+	 * be delayed).
+	 */
+	rh_inc_pending(&ms->rh, &sync);
+	rh_inc_pending(&ms->rh, &nosync);
+	rh_flush(&ms->rh);
+
+	/*
+	 * Dispatch io.
+	 */
+	while ((bio = bio_list_pop(&sync)))
+		do_write(ms, bio);
+
+	while ((bio = bio_list_pop(&recover)))
+		rh_delay(&ms->rh, bio);
+
+	while ((bio = bio_list_pop(&nosync))) {
+		map_bio(ms, ms->mirror + DEFAULT_MIRROR, bio);
+		generic_make_request(bio);
+	}
+}
+
+/*-----------------------------------------------------------------
+ * kmirrord
+ *---------------------------------------------------------------*/
+static LIST_HEAD(_mirror_sets);
+static DECLARE_RWSEM(_mirror_sets_lock);
+
+static void do_mirror(struct mirror_set *ms)
+{
+	struct bio_list reads, writes;
+
+	spin_lock(&ms->lock);
+	reads = ms->reads;
+	writes = ms->writes;
+	bio_list_init(&ms->reads);
+	bio_list_init(&ms->writes);
+	spin_unlock(&ms->lock);
+
+	rh_update_states(&ms->rh);
+	do_recovery(ms);
+	do_reads(ms, &reads);
+	do_writes(ms, &writes);
+}
+
+static void do_work(void *ignored)
+{
+	struct mirror_set *ms;
+
+	down_read(&_mirror_sets_lock);
+	list_for_each_entry (ms, &_mirror_sets, list)
+		do_mirror(ms);
+	up_read(&_mirror_sets_lock);
+}
+
+/*-----------------------------------------------------------------
+ * Target functions
+ *---------------------------------------------------------------*/
+static struct mirror_set *alloc_context(unsigned int nr_mirrors,
+					sector_t region_size,
+					struct dm_target *ti,
+					struct dirty_log *dl)
+{
+	size_t len;
+	struct mirror_set *ms = NULL;
+
+	if (array_too_big(sizeof(*ms), sizeof(ms->mirror[0]), nr_mirrors))
+		return NULL;
+
+	len = sizeof(*ms) + (sizeof(ms->mirror[0]) * nr_mirrors);
+
+	ms = kmalloc(len, GFP_KERNEL);
+	if (!ms) {
+		ti->error = "dm-mirror: Cannot allocate mirror context";
+		return NULL;
+	}
+
+	memset(ms, 0, len);
+	spin_lock_init(&ms->lock);
+
+	ms->ti = ti;
+	ms->nr_mirrors = nr_mirrors;
+	ms->nr_regions = dm_div_up(ti->len, region_size);
+	ms->in_sync = 0;
+
+	if (rh_init(&ms->rh, ms, dl, region_size, ms->nr_regions)) {
+		ti->error = "dm-mirror: Error creating dirty region hash";
+		kfree(ms);
+		return NULL;
+	}
+
+	return ms;
+}
+
+static void free_context(struct mirror_set *ms, struct dm_target *ti,
+			 unsigned int m)
+{
+	while (m--)
+		dm_put_device(ti, ms->mirror[m].dev);
+
+	rh_exit(&ms->rh);
+	kfree(ms);
+}
+
+static inline int _check_region_size(struct dm_target *ti, sector_t size)
+{
+	return !(size % (PAGE_SIZE >> 9) || (size & (size - 1)) ||
+		 size > ti->len);
+}
+
+static int get_mirror(struct mirror_set *ms, struct dm_target *ti,
+		      unsigned int mirror, char **argv)
+{
+	sector_t offset;
+
+	if (sscanf(argv[1], SECTOR_FORMAT, &offset) != 1) {
+		ti->error = "dm-mirror: Invalid offset";
+		return -EINVAL;
+	}
+
+	if (dm_get_device(ti, argv[0], offset, ti->len,
+			  dm_table_get_mode(ti->table),
+			  &ms->mirror[mirror].dev)) {
+		ti->error = "dm-mirror: Device lookup failure";
+		return -ENXIO;
+	}
+
+	ms->mirror[mirror].offset = offset;
+
+	return 0;
+}
+
+static int add_mirror_set(struct mirror_set *ms)
+{
+	down_write(&_mirror_sets_lock);
+	list_add_tail(&ms->list, &_mirror_sets);
+	up_write(&_mirror_sets_lock);
+	wake();
+
+	return 0;
+}
+
+static void del_mirror_set(struct mirror_set *ms)
+{
+	down_write(&_mirror_sets_lock);
+	list_del(&ms->list);
+	up_write(&_mirror_sets_lock);
+}
+
+/*
+ * Create dirty log: log_type #log_params <log_params>
+ */
+static struct dirty_log *create_dirty_log(struct dm_target *ti,
+					  unsigned int argc, char **argv,
+					  unsigned int *args_used)
+{
+	unsigned int param_count;
+	struct dirty_log *dl;
+
+	if (argc < 2) {
+		ti->error = "dm-mirror: Insufficient mirror log arguments";
+		return NULL;
+	}
+
+	if (sscanf(argv[1], "%u", &param_count) != 1) {
+		ti->error = "dm-mirror: Invalid mirror log argument count";
+		return NULL;
+	}
+
+	*args_used = 2 + param_count;
+
+	if (argc < *args_used) {
+		ti->error = "dm-mirror: Insufficient mirror log arguments";
+		return NULL;
+	}
+
+	dl = dm_create_dirty_log(argv[0], ti, param_count, argv + 2);
+	if (!dl) {
+		ti->error = "dm-mirror: Error creating mirror dirty log";
+		return NULL;
+	}
+
+	if (!_check_region_size(ti, dl->type->get_region_size(dl))) {
+		ti->error = "dm-mirror: Invalid region size";
+		dm_destroy_dirty_log(dl);
+		return NULL;
+	}
+
+	return dl;
+}
+
+/*
+ * Construct a mirror mapping:
+ *
+ * log_type #log_params <log_params>
+ * #mirrors [mirror_path offset]{2,}
+ *
+ * For now, #log_params = 1, log_type = "core"
+ *
+ */
+#define DM_IO_PAGES 64
+static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+{
+	int r;
+	unsigned int nr_mirrors, m, args_used;
+	struct mirror_set *ms;
+	struct dirty_log *dl;
+
+	dl = create_dirty_log(ti, argc, argv, &args_used);
+	if (!dl)
+		return -EINVAL;
+
+	argv += args_used;
+	argc -= args_used;
+
+	if (!argc || sscanf(argv[0], "%u", &nr_mirrors) != 1 ||
+	    nr_mirrors < 2) {
+		ti->error = "dm-mirror: Invalid number of mirrors";
+		dm_destroy_dirty_log(dl);
+		return -EINVAL;
+	}
+
+	argv++, argc--;
+
+	if (argc != nr_mirrors * 2) {
+		ti->error = "dm-mirror: Wrong number of mirror arguments";
+		dm_destroy_dirty_log(dl);
+		return -EINVAL;
+	}
+
+	ms = alloc_context(nr_mirrors, dl->type->get_region_size(dl), ti, dl);
+	if (!ms) {
+		dm_destroy_dirty_log(dl);
+		return -ENOMEM;
+	}
+
+	/* Get the mirror parameter sets */
+	for (m = 0; m < nr_mirrors; m++) {
+		r = get_mirror(ms, ti, m, argv);
+		if (r) {
+			free_context(ms, ti, m);
+			return r;
+		}
+		argv += 2;
+		argc -= 2;
+	}
+
+	ti->private = ms;
+
+	r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client);
+	if (r) {
+		free_context(ms, ti, ms->nr_mirrors);
+		return r;
+	}
+
+	add_mirror_set(ms);
+	return 0;
+}
+
+static void mirror_dtr(struct dm_target *ti)
+{
+	struct mirror_set *ms = (struct mirror_set *) ti->private;
+
+	del_mirror_set(ms);
+	kcopyd_client_destroy(ms->kcopyd_client);
+	free_context(ms, ti, ms->nr_mirrors);
+}
+
+static void queue_bio(struct mirror_set *ms, struct bio *bio, int rw)
+{
+	int should_wake = 0;
+	struct bio_list *bl;
+
+	bl = (rw == WRITE) ? &ms->writes : &ms->reads;
+	spin_lock(&ms->lock);
+	should_wake = !(bl->head);
+	bio_list_add(bl, bio);
+	spin_unlock(&ms->lock);
+
+	if (should_wake)
+		wake();
+}
+
+/*
+ * Mirror mapping function
+ */
+static int mirror_map(struct dm_target *ti, struct bio *bio,
+		      union map_info *map_context)
+{
+	int r, rw = bio_rw(bio);
+	struct mirror *m;
+	struct mirror_set *ms = ti->private;
+
+	map_context->ll = bio->bi_sector >> ms->rh.region_shift;
+
+	if (rw == WRITE) {
+		queue_bio(ms, bio, rw);
+		return 0;
+	}
+
+	r = ms->rh.log->type->in_sync(ms->rh.log,
+				      bio_to_region(&ms->rh, bio), 0);
+	if (r < 0 && r != -EWOULDBLOCK)
+		return r;
+
+	if (r == -EWOULDBLOCK)	/* FIXME: ugly */
+		r = 0;
+
+	/*
+	 * We don't want to fast track a recovery just for a read
+	 * ahead.  So we just let it silently fail.
+	 * FIXME: get rid of this.
+	 */
+	if (!r && rw == READA)
+		return -EIO;
+
+	if (!r) {
+		/* Pass this io over to the daemon */
+		queue_bio(ms, bio, rw);
+		return 0;
+	}
+
+	m = choose_mirror(ms, bio->bi_sector);
+	if (!m)
+		return -EIO;
+
+	map_bio(ms, m, bio);
+	return 1;
+}
+
+static int mirror_end_io(struct dm_target *ti, struct bio *bio,
+			 int error, union map_info *map_context)
+{
+	int rw = bio_rw(bio);
+	struct mirror_set *ms = (struct mirror_set *) ti->private;
+	region_t region = map_context->ll;
+
+	/*
+	 * We need to dec pending if this was a write.
+	 */
+	if (rw == WRITE)
+		rh_dec(&ms->rh, region);
+
+	return 0;
+}
+
+static void mirror_suspend(struct dm_target *ti)
+{
+	struct mirror_set *ms = (struct mirror_set *) ti->private;
+	struct dirty_log *log = ms->rh.log;
+	rh_stop_recovery(&ms->rh);
+	if (log->type->suspend && log->type->suspend(log))
+		/* FIXME: need better error handling */
+		DMWARN("log suspend failed");
+}
+
+static void mirror_resume(struct dm_target *ti)
+{
+	struct mirror_set *ms = (struct mirror_set *) ti->private;
+	struct dirty_log *log = ms->rh.log;
+	if (log->type->resume && log->type->resume(log))
+		/* FIXME: need better error handling */
+		DMWARN("log resume failed");
+	rh_start_recovery(&ms->rh);
+}
+
+static int mirror_status(struct dm_target *ti, status_type_t type,
+			 char *result, unsigned int maxlen)
+{
+	char buffer[32];
+	unsigned int m, sz = 0;
+	struct mirror_set *ms = (struct mirror_set *) ti->private;
+
+#define EMIT(x...) sz += ((sz >= maxlen) ? \
+			  0 : scnprintf(result + sz, maxlen - sz, x))
+
+	switch (type) {
+	case STATUSTYPE_INFO:
+		EMIT("%d ", ms->nr_mirrors);
+
+		for (m = 0; m < ms->nr_mirrors; m++) {
+			format_dev_t(buffer, ms->mirror[m].dev->bdev->bd_dev);
+			EMIT("%s ", buffer);
+		}
+
+		EMIT(SECTOR_FORMAT "/" SECTOR_FORMAT,
+		     ms->rh.log->type->get_sync_count(ms->rh.log),
+		     ms->nr_regions);
+		break;
+
+	case STATUSTYPE_TABLE:
+		EMIT("%s 1 " SECTOR_FORMAT " %d ",
+		     ms->rh.log->type->name, ms->rh.region_size,
+		     ms->nr_mirrors);
+
+		for (m = 0; m < ms->nr_mirrors; m++) {
+			format_dev_t(buffer, ms->mirror[m].dev->bdev->bd_dev);
+			EMIT("%s " SECTOR_FORMAT " ",
+			     buffer, ms->mirror[m].offset);
+		}
+	}
+
+	return 0;
+}
+
+static struct target_type mirror_target = {
+	.name	 = "mirror",
+	.version = {1, 0, 1},
+	.module	 = THIS_MODULE,
+	.ctr	 = mirror_ctr,
+	.dtr	 = mirror_dtr,
+	.map	 = mirror_map,
+	.end_io	 = mirror_end_io,
+	.suspend = mirror_suspend,
+	.resume	 = mirror_resume,
+	.status	 = mirror_status,
+};
+
+static int __init dm_mirror_init(void)
+{
+	int r;
+
+	r = dm_dirty_log_init();
+	if (r)
+		return r;
+
+	_kmirrord_wq = create_workqueue("kmirrord");
+	if (!_kmirrord_wq) {
+		DMERR("couldn't start kmirrord");
+		dm_dirty_log_exit();
+		return r;
+	}
+	INIT_WORK(&_kmirrord_work, do_work, NULL);
+
+	r = dm_register_target(&mirror_target);
+	if (r < 0) {
+		DMERR("%s: Failed to register mirror target",
+		      mirror_target.name);
+		dm_dirty_log_exit();
+		destroy_workqueue(_kmirrord_wq);
+	}
+
+	return r;
+}
+
+static void __exit dm_mirror_exit(void)
+{
+	int r;
+
+	r = dm_unregister_target(&mirror_target);
+	if (r < 0)
+		DMERR("%s: unregister failed %d", mirror_target.name, r);
+
+	destroy_workqueue(_kmirrord_wq);
+	dm_dirty_log_exit();
+}
+
+/* Module hooks */
+module_init(dm_mirror_init);
+module_exit(dm_mirror_exit);
+
+MODULE_DESCRIPTION(DM_NAME " mirror target");
+MODULE_AUTHOR("Joe Thornber");
+MODULE_LICENSE("GPL");
--- diff/drivers/md/dm-snap.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/dm-snap.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,1213 @@
+/*
+ * dm-snapshot.c
+ *
+ * Copyright (C) 2001-2002 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#include <linux/blkdev.h>
+#include <linux/config.h>
+#include <linux/ctype.h>
+#include <linux/device-mapper.h>
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/kdev_t.h>
+#include <linux/list.h>
+#include <linux/mempool.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+
+#include "dm-snap.h"
+#include "dm-bio-list.h"
+#include "kcopyd.h"
+
+/*
+ * The percentage increment we will wake up users at
+ */
+#define WAKE_UP_PERCENT 5
+
+/*
+ * kcopyd priority of snapshot operations
+ */
+#define SNAPSHOT_COPY_PRIORITY 2
+
+/*
+ * Each snapshot reserves this many pages for io
+ */
+#define SNAPSHOT_PAGES 256
+
+struct pending_exception {
+	struct exception e;
+
+	/*
+	 * Origin buffers waiting for this to complete are held
+	 * in a bio list
+	 */
+	struct bio_list origin_bios;
+	struct bio_list snapshot_bios;
+
+	/*
+	 * Other pending_exceptions that are processing this
+	 * chunk.  When this list is empty, we know we can
+	 * complete the origins.
+	 */
+	struct list_head siblings;
+
+	/* Pointer back to snapshot context */
+	struct dm_snapshot *snap;
+
+	/*
+	 * 1 indicates the exception has already been sent to
+	 * kcopyd.
+	 */
+	int started;
+};
+
+/*
+ * Hash table mapping origin volumes to lists of snapshots and
+ * a lock to protect it
+ */
+static kmem_cache_t *exception_cache;
+static kmem_cache_t *pending_cache;
+static mempool_t *pending_pool;
+
+/*
+ * One of these per registered origin, held in the snapshot_origins hash
+ */
+struct origin {
+	/* The origin device */
+	struct block_device *bdev;
+
+	struct list_head hash_list;
+
+	/* List of snapshots for this origin */
+	struct list_head snapshots;
+};
+
+/*
+ * Size of the hash table for origin volumes. If we make this
+ * the size of the minors list then it should be nearly perfect
+ */
+#define ORIGIN_HASH_SIZE 256
+#define ORIGIN_MASK      0xFF
+static struct list_head *_origins;
+static struct rw_semaphore _origins_lock;
+
+static int init_origin_hash(void)
+{
+	int i;
+
+	_origins = kmalloc(ORIGIN_HASH_SIZE * sizeof(struct list_head),
+			   GFP_KERNEL);
+	if (!_origins) {
+		DMERR("Device mapper: Snapshot: unable to allocate memory");
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < ORIGIN_HASH_SIZE; i++)
+		INIT_LIST_HEAD(_origins + i);
+	init_rwsem(&_origins_lock);
+
+	return 0;
+}
+
+static void exit_origin_hash(void)
+{
+	kfree(_origins);
+}
+
+static inline unsigned int origin_hash(struct block_device *bdev)
+{
+	return bdev->bd_dev & ORIGIN_MASK;
+}
+
+static struct origin *__lookup_origin(struct block_device *origin)
+{
+	struct list_head *ol;
+	struct origin *o;
+
+	ol = &_origins[origin_hash(origin)];
+	list_for_each_entry (o, ol, hash_list)
+		if (bdev_equal(o->bdev, origin))
+			return o;
+
+	return NULL;
+}
+
+static void __insert_origin(struct origin *o)
+{
+	struct list_head *sl = &_origins[origin_hash(o->bdev)];
+	list_add_tail(&o->hash_list, sl);
+}
+
+/*
+ * Make a note of the snapshot and its origin so we can look it
+ * up when the origin has a write on it.
+ */
+static int register_snapshot(struct dm_snapshot *snap)
+{
+	struct origin *o;
+	struct block_device *bdev = snap->origin->bdev;
+
+	down_write(&_origins_lock);
+	o = __lookup_origin(bdev);
+
+	if (!o) {
+		/* New origin */
+		o = kmalloc(sizeof(*o), GFP_KERNEL);
+		if (!o) {
+			up_write(&_origins_lock);
+			return -ENOMEM;
+		}
+
+		/* Initialise the struct */
+		INIT_LIST_HEAD(&o->snapshots);
+		o->bdev = bdev;
+
+		__insert_origin(o);
+	}
+
+	list_add_tail(&snap->list, &o->snapshots);
+
+	up_write(&_origins_lock);
+	return 0;
+}
+
+static void unregister_snapshot(struct dm_snapshot *s)
+{
+	struct origin *o;
+
+	down_write(&_origins_lock);
+	o = __lookup_origin(s->origin->bdev);
+
+	list_del(&s->list);
+	if (list_empty(&o->snapshots)) {
+		list_del(&o->hash_list);
+		kfree(o);
+	}
+
+	up_write(&_origins_lock);
+}
+
+/*
+ * Implementation of the exception hash tables.
+ */
+static int init_exception_table(struct exception_table *et, uint32_t size)
+{
+	unsigned int i;
+
+	et->hash_mask = size - 1;
+	et->table = dm_vcalloc(size, sizeof(struct list_head));
+	if (!et->table)
+		return -ENOMEM;
+
+	for (i = 0; i < size; i++)
+		INIT_LIST_HEAD(et->table + i);
+
+	return 0;
+}
+
+static void exit_exception_table(struct exception_table *et, kmem_cache_t *mem)
+{
+	struct list_head *slot;
+	struct exception *ex, *next;
+	int i, size;
+
+	size = et->hash_mask + 1;
+	for (i = 0; i < size; i++) {
+		slot = et->table + i;
+
+		list_for_each_entry_safe (ex, next, slot, hash_list)
+			kmem_cache_free(mem, ex);
+	}
+
+	vfree(et->table);
+}
+
+static inline uint32_t exception_hash(struct exception_table *et, chunk_t chunk)
+{
+	return chunk & et->hash_mask;
+}
+
+static void insert_exception(struct exception_table *eh, struct exception *e)
+{
+	struct list_head *l = &eh->table[exception_hash(eh, e->old_chunk)];
+	list_add(&e->hash_list, l);
+}
+
+static inline void remove_exception(struct exception *e)
+{
+	list_del(&e->hash_list);
+}
+
+/*
+ * Return the exception data for a sector, or NULL if not
+ * remapped.
+ */
+static struct exception *lookup_exception(struct exception_table *et,
+					  chunk_t chunk)
+{
+	struct list_head *slot;
+	struct exception *e;
+
+	slot = &et->table[exception_hash(et, chunk)];
+	list_for_each_entry (e, slot, hash_list)
+		if (e->old_chunk == chunk)
+			return e;
+
+	return NULL;
+}
+
+static inline struct exception *alloc_exception(void)
+{
+	struct exception *e;
+
+	e = kmem_cache_alloc(exception_cache, GFP_NOIO);
+	if (!e)
+		e = kmem_cache_alloc(exception_cache, GFP_ATOMIC);
+
+	return e;
+}
+
+static inline void free_exception(struct exception *e)
+{
+	kmem_cache_free(exception_cache, e);
+}
+
+static inline struct pending_exception *alloc_pending_exception(void)
+{
+	return mempool_alloc(pending_pool, GFP_NOIO);
+}
+
+static inline void free_pending_exception(struct pending_exception *pe)
+{
+	mempool_free(pe, pending_pool);
+}
+
+int dm_add_exception(struct dm_snapshot *s, chunk_t old, chunk_t new)
+{
+	struct exception *e;
+
+	e = alloc_exception();
+	if (!e)
+		return -ENOMEM;
+
+	e->old_chunk = old;
+	e->new_chunk = new;
+	insert_exception(&s->complete, e);
+	return 0;
+}
+
+/*
+ * Hard coded magic.
+ */
+static int calc_max_buckets(void)
+{
+	/* use a fixed size of 2MB */
+	unsigned long mem = 2 * 1024 * 1024;
+	mem /= sizeof(struct list_head);
+
+	return mem;
+}
+
+/*
+ * Rounds a number down to a power of 2.
+ */
+static inline uint32_t round_down(uint32_t n)
+{
+	while (n & (n - 1))
+		n &= (n - 1);
+	return n;
+}
+
+/*
+ * Allocate room for a suitable hash table.
+ */
+static int init_hash_tables(struct dm_snapshot *s)
+{
+	sector_t hash_size, cow_dev_size, origin_dev_size, max_buckets;
+
+	/*
+	 * Calculate based on the size of the original volume or
+	 * the COW volume...
+	 */
+	cow_dev_size = get_dev_size(s->cow->bdev);
+	origin_dev_size = get_dev_size(s->origin->bdev);
+	max_buckets = calc_max_buckets();
+
+	hash_size = min(origin_dev_size, cow_dev_size) >> s->chunk_shift;
+	hash_size = min(hash_size, max_buckets);
+
+	/* Round it down to a power of 2 */
+	hash_size = round_down(hash_size);
+	if (init_exception_table(&s->complete, hash_size))
+		return -ENOMEM;
+
+	/*
+	 * Allocate hash table for in-flight exceptions
+	 * Make this smaller than the real hash table
+	 */
+	hash_size >>= 3;
+	if (hash_size < 64)
+		hash_size = 64;
+
+	if (init_exception_table(&s->pending, hash_size)) {
+		exit_exception_table(&s->complete, exception_cache);
+		return -ENOMEM;
+	}
+
+	return 0;
+}
+
+/*
+ * Round a number up to the nearest 'size' boundary.  size must
+ * be a power of 2.
+ */
+static inline ulong round_up(ulong n, ulong size)
+{
+	size--;
+	return (n + size) & ~size;
+}
+
+/*
+ * Construct a snapshot mapping: <origin_dev> <COW-dev> <p/n> <chunk-size>
+ */
+static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+{
+	struct dm_snapshot *s;
+	unsigned long chunk_size;
+	int r = -EINVAL;
+	char persistent;
+	char *origin_path;
+	char *cow_path;
+	char *value;
+	int blocksize;
+
+	if (argc < 4) {
+		ti->error = "dm-snapshot: requires exactly 4 arguments";
+		r = -EINVAL;
+		goto bad1;
+	}
+
+	origin_path = argv[0];
+	cow_path = argv[1];
+	persistent = toupper(*argv[2]);
+
+	if (persistent != 'P' && persistent != 'N') {
+		ti->error = "Persistent flag is not P or N";
+		r = -EINVAL;
+		goto bad1;
+	}
+
+	chunk_size = simple_strtoul(argv[3], &value, 10);
+	if (chunk_size == 0 || value == NULL) {
+		ti->error = "Invalid chunk size";
+		r = -EINVAL;
+		goto bad1;
+	}
+
+	s = kmalloc(sizeof(*s), GFP_KERNEL);
+	if (s == NULL) {
+		ti->error = "Cannot allocate snapshot context private "
+		    "structure";
+		r = -ENOMEM;
+		goto bad1;
+	}
+
+	r = dm_get_device(ti, origin_path, 0, ti->len, FMODE_READ, &s->origin);
+	if (r) {
+		ti->error = "Cannot get origin device";
+		goto bad2;
+	}
+
+	r = dm_get_device(ti, cow_path, 0, 0,
+			  FMODE_READ | FMODE_WRITE, &s->cow);
+	if (r) {
+		dm_put_device(ti, s->origin);
+		ti->error = "Cannot get COW device";
+		goto bad2;
+	}
+
+	/*
+	 * Chunk size must be multiple of page size.  Silently
+	 * round up if it's not.
+	 */
+	chunk_size = round_up(chunk_size, PAGE_SIZE >> 9);
+
+	/* Validate the chunk size against the device block size */
+	blocksize = s->cow->bdev->bd_disk->queue->hardsect_size;
+	if (chunk_size % (blocksize >> 9)) {
+		ti->error = "Chunk size is not a multiple of device blocksize";
+		r = -EINVAL;
+		goto bad3;
+	}
+
+	/* Check chunk_size is a power of 2 */
+	if (chunk_size & (chunk_size - 1)) {
+		ti->error = "Chunk size is not a power of 2";
+		r = -EINVAL;
+		goto bad3;
+	}
+
+	s->chunk_size = chunk_size;
+	s->chunk_mask = chunk_size - 1;
+	s->type = persistent;
+	s->chunk_shift = ffs(chunk_size) - 1;
+
+	s->valid = 1;
+	s->have_metadata = 0;
+	s->last_percent = 0;
+	init_rwsem(&s->lock);
+	s->table = ti->table;
+
+	/* Allocate hash table for COW data */
+	if (init_hash_tables(s)) {
+		ti->error = "Unable to allocate hash table space";
+		r = -ENOMEM;
+		goto bad3;
+	}
+
+	/*
+	 * Check the persistent flag - done here because we need the iobuf
+	 * to check the LV header
+	 */
+	s->store.snap = s;
+
+	if (persistent == 'P')
+		r = dm_create_persistent(&s->store, chunk_size);
+	else
+		r = dm_create_transient(&s->store, s, blocksize);
+
+	if (r) {
+		ti->error = "Couldn't create exception store";
+		r = -EINVAL;
+		goto bad4;
+	}
+
+	r = kcopyd_client_create(SNAPSHOT_PAGES, &s->kcopyd_client);
+	if (r) {
+		ti->error = "Could not create kcopyd client";
+		goto bad5;
+	}
+
+	/* Add snapshot to the list of snapshots for this origin */
+	if (register_snapshot(s)) {
+		r = -EINVAL;
+		ti->error = "Cannot register snapshot origin";
+		goto bad6;
+	}
+
+	ti->private = s;
+	ti->split_io = chunk_size;
+
+	return 0;
+
+ bad6:
+	kcopyd_client_destroy(s->kcopyd_client);
+
+ bad5:
+	s->store.destroy(&s->store);
+
+ bad4:
+	exit_exception_table(&s->pending, pending_cache);
+	exit_exception_table(&s->complete, exception_cache);
+
+ bad3:
+	dm_put_device(ti, s->cow);
+	dm_put_device(ti, s->origin);
+
+ bad2:
+	kfree(s);
+
+ bad1:
+	return r;
+}
+
+static void snapshot_dtr(struct dm_target *ti)
+{
+	struct dm_snapshot *s = (struct dm_snapshot *) ti->private;
+
+	unregister_snapshot(s);
+
+	exit_exception_table(&s->pending, pending_cache);
+	exit_exception_table(&s->complete, exception_cache);
+
+	/* Deallocate memory used */
+	s->store.destroy(&s->store);
+
+	dm_put_device(ti, s->origin);
+	dm_put_device(ti, s->cow);
+	kcopyd_client_destroy(s->kcopyd_client);
+	kfree(s);
+}
+
+/*
+ * Flush a list of buffers.
+ */
+static void flush_bios(struct bio *bio)
+{
+	struct bio *n;
+
+	while (bio) {
+		n = bio->bi_next;
+		bio->bi_next = NULL;
+		generic_make_request(bio);
+		bio = n;
+	}
+}
+
+/*
+ * Error a list of buffers.
+ */
+static void error_bios(struct bio *bio)
+{
+	struct bio *n;
+
+	while (bio) {
+		n = bio->bi_next;
+		bio->bi_next = NULL;
+		bio_io_error(bio, bio->bi_size);
+		bio = n;
+	}
+}
+
+static struct bio *__flush_bios(struct pending_exception *pe)
+{
+	struct pending_exception *sibling;
+
+	if (list_empty(&pe->siblings))
+		return bio_list_get(&pe->origin_bios);
+
+	sibling = list_entry(pe->siblings.next,
+			     struct pending_exception, siblings);
+
+	list_del(&pe->siblings);
+
+	/* This is fine as long as kcopyd is single-threaded. If kcopyd
+	 * becomes multi-threaded, we'll need some locking here.
+	 */
+	bio_list_merge(&sibling->origin_bios, &pe->origin_bios);
+
+	return NULL;
+}
+
+static void pending_complete(struct pending_exception *pe, int success)
+{
+	struct exception *e;
+	struct dm_snapshot *s = pe->snap;
+	struct bio *flush = NULL;
+
+	if (success) {
+		e = alloc_exception();
+		if (!e) {
+			DMWARN("Unable to allocate exception.");
+			down_write(&s->lock);
+			s->store.drop_snapshot(&s->store);
+			s->valid = 0;
+			flush = __flush_bios(pe);
+			up_write(&s->lock);
+
+			error_bios(bio_list_get(&pe->snapshot_bios));
+			goto out;
+		}
+		*e = pe->e;
+
+		/*
+		 * Add a proper exception, and remove the
+		 * in-flight exception from the list.
+		 */
+		down_write(&s->lock);
+		insert_exception(&s->complete, e);
+		remove_exception(&pe->e);
+		flush = __flush_bios(pe);
+
+		/* Submit any pending write bios */
+		up_write(&s->lock);
+
+		flush_bios(bio_list_get(&pe->snapshot_bios));
+	} else {
+		/* Read/write error - snapshot is unusable */
+		down_write(&s->lock);
+		if (s->valid)
+			DMERR("Error reading/writing snapshot");
+		s->store.drop_snapshot(&s->store);
+		s->valid = 0;
+		remove_exception(&pe->e);
+		flush = __flush_bios(pe);
+		up_write(&s->lock);
+
+		error_bios(bio_list_get(&pe->snapshot_bios));
+
+		dm_table_event(s->table);
+	}
+
+ out:
+	free_pending_exception(pe);
+
+	if (flush)
+		flush_bios(flush);
+}
+
+static void commit_callback(void *context, int success)
+{
+	struct pending_exception *pe = (struct pending_exception *) context;
+	pending_complete(pe, success);
+}
+
+/*
+ * Called when the copy I/O has finished.  kcopyd actually runs
+ * this code so don't block.
+ */
+static void copy_callback(int read_err, unsigned int write_err, void *context)
+{
+	struct pending_exception *pe = (struct pending_exception *) context;
+	struct dm_snapshot *s = pe->snap;
+
+	if (read_err || write_err)
+		pending_complete(pe, 0);
+
+	else
+		/* Update the metadata if we are persistent */
+		s->store.commit_exception(&s->store, &pe->e, commit_callback,
+					  pe);
+}
+
+/*
+ * Dispatches the copy operation to kcopyd.
+ */
+static inline void start_copy(struct pending_exception *pe)
+{
+	struct dm_snapshot *s = pe->snap;
+	struct io_region src, dest;
+	struct block_device *bdev = s->origin->bdev;
+	sector_t dev_size;
+
+	dev_size = get_dev_size(bdev);
+
+	src.bdev = bdev;
+	src.sector = chunk_to_sector(s, pe->e.old_chunk);
+	src.count = min(s->chunk_size, dev_size - src.sector);
+
+	dest.bdev = s->cow->bdev;
+	dest.sector = chunk_to_sector(s, pe->e.new_chunk);
+	dest.count = src.count;
+
+	/* Hand over to kcopyd */
+	kcopyd_copy(s->kcopyd_client,
+		    &src, 1, &dest, 0, copy_callback, pe);
+}
+
+/*
+ * Looks to see if this snapshot already has a pending exception
+ * for this chunk, otherwise it allocates a new one and inserts
+ * it into the pending table.
+ *
+ * NOTE: a write lock must be held on snap->lock before calling
+ * this.
+ */
+static struct pending_exception *
+__find_pending_exception(struct dm_snapshot *s, struct bio *bio)
+{
+	struct exception *e;
+	struct pending_exception *pe;
+	chunk_t chunk = sector_to_chunk(s, bio->bi_sector);
+
+	/*
+	 * Is there a pending exception for this already ?
+	 */
+	e = lookup_exception(&s->pending, chunk);
+	if (e) {
+		/* cast the exception to a pending exception */
+		pe = container_of(e, struct pending_exception, e);
+
+	} else {
+		/*
+		 * Create a new pending exception, we don't want
+		 * to hold the lock while we do this.
+		 */
+		up_write(&s->lock);
+		pe = alloc_pending_exception();
+		down_write(&s->lock);
+
+		e = lookup_exception(&s->pending, chunk);
+		if (e) {
+			free_pending_exception(pe);
+			pe = container_of(e, struct pending_exception, e);
+		} else {
+			pe->e.old_chunk = chunk;
+			bio_list_init(&pe->origin_bios);
+			bio_list_init(&pe->snapshot_bios);
+			INIT_LIST_HEAD(&pe->siblings);
+			pe->snap = s;
+			pe->started = 0;
+
+			if (s->store.prepare_exception(&s->store, &pe->e)) {
+				free_pending_exception(pe);
+				s->valid = 0;
+				return NULL;
+			}
+
+			insert_exception(&s->pending, &pe->e);
+		}
+	}
+
+	return pe;
+}
+
+static inline void remap_exception(struct dm_snapshot *s, struct exception *e,
+				   struct bio *bio)
+{
+	bio->bi_bdev = s->cow->bdev;
+	bio->bi_sector = chunk_to_sector(s, e->new_chunk) +
+		(bio->bi_sector & s->chunk_mask);
+}
+
+static int snapshot_map(struct dm_target *ti, struct bio *bio,
+			union map_info *map_context)
+{
+	struct exception *e;
+	struct dm_snapshot *s = (struct dm_snapshot *) ti->private;
+	int r = 1;
+	chunk_t chunk;
+	struct pending_exception *pe;
+
+	chunk = sector_to_chunk(s, bio->bi_sector);
+
+	/* Full snapshots are not usable */
+	if (!s->valid)
+		return -1;
+
+	/*
+	 * Write to snapshot - higher level takes care of RW/RO
+	 * flags so we should only get this if we are
+	 * writeable.
+	 */
+	if (bio_rw(bio) == WRITE) {
+
+		/* FIXME: should only take write lock if we need
+		 * to copy an exception */
+		down_write(&s->lock);
+
+		/* If the block is already remapped - use that, else remap it */
+		e = lookup_exception(&s->complete, chunk);
+		if (e) {
+			remap_exception(s, e, bio);
+			up_write(&s->lock);
+
+		} else {
+			pe = __find_pending_exception(s, bio);
+
+			if (!pe) {
+				if (s->store.drop_snapshot)
+					s->store.drop_snapshot(&s->store);
+				s->valid = 0;
+				r = -EIO;
+				up_write(&s->lock);
+			} else {
+				remap_exception(s, &pe->e, bio);
+				bio_list_add(&pe->snapshot_bios, bio);
+
+				if (!pe->started) {
+					/* this is protected by snap->lock */
+					pe->started = 1;
+					up_write(&s->lock);
+					start_copy(pe);
+				} else
+					up_write(&s->lock);
+				r = 0;
+			}
+		}
+
+	} else {
+		/*
+		 * FIXME: this read path scares me because we
+		 * always use the origin when we have a pending
+		 * exception.  However I can't think of a
+		 * situation where this is wrong - ejt.
+		 */
+
+		/* Do reads */
+		down_read(&s->lock);
+
+		/* See if it it has been remapped */
+		e = lookup_exception(&s->complete, chunk);
+		if (e)
+			remap_exception(s, e, bio);
+		else
+			bio->bi_bdev = s->origin->bdev;
+
+		up_read(&s->lock);
+	}
+
+	return r;
+}
+
+static void snapshot_resume(struct dm_target *ti)
+{
+	struct dm_snapshot *s = (struct dm_snapshot *) ti->private;
+
+	if (s->have_metadata)
+		return;
+
+	if (s->store.read_metadata(&s->store)) {
+		down_write(&s->lock);
+		s->valid = 0;
+		up_write(&s->lock);
+	}
+
+	s->have_metadata = 1;
+}
+
+static int snapshot_status(struct dm_target *ti, status_type_t type,
+			   char *result, unsigned int maxlen)
+{
+	struct dm_snapshot *snap = (struct dm_snapshot *) ti->private;
+	char cow[32];
+	char org[32];
+
+	switch (type) {
+	case STATUSTYPE_INFO:
+		if (!snap->valid)
+			snprintf(result, maxlen, "Invalid");
+		else {
+			if (snap->store.fraction_full) {
+				sector_t numerator, denominator;
+				snap->store.fraction_full(&snap->store,
+							  &numerator,
+							  &denominator);
+				snprintf(result, maxlen,
+					 SECTOR_FORMAT "/" SECTOR_FORMAT,
+					 numerator, denominator);
+			}
+			else
+				snprintf(result, maxlen, "Unknown");
+		}
+		break;
+
+	case STATUSTYPE_TABLE:
+		/*
+		 * kdevname returns a static pointer so we need
+		 * to make private copies if the output is to
+		 * make sense.
+		 */
+		format_dev_t(cow, snap->cow->bdev->bd_dev);
+		format_dev_t(org, snap->origin->bdev->bd_dev);
+		snprintf(result, maxlen, "%s %s %c " SECTOR_FORMAT, org, cow,
+			 snap->type, snap->chunk_size);
+		break;
+	}
+
+	return 0;
+}
+
+/*-----------------------------------------------------------------
+ * Origin methods
+ *---------------------------------------------------------------*/
+static void list_merge(struct list_head *l1, struct list_head *l2)
+{
+	struct list_head *l1_n, *l2_p;
+
+	l1_n = l1->next;
+	l2_p = l2->prev;
+
+	l1->next = l2;
+	l2->prev = l1;
+
+	l2_p->next = l1_n;
+	l1_n->prev = l2_p;
+}
+
+static int __origin_write(struct list_head *snapshots, struct bio *bio)
+{
+	int r = 1, first = 1;
+	struct dm_snapshot *snap;
+	struct exception *e;
+	struct pending_exception *pe, *last = NULL;
+	chunk_t chunk;
+
+	/* Do all the snapshots on this origin */
+	list_for_each_entry (snap, snapshots, list) {
+
+		/* Only deal with valid snapshots */
+		if (!snap->valid)
+			continue;
+
+		down_write(&snap->lock);
+
+		/*
+		 * Remember, different snapshots can have
+		 * different chunk sizes.
+		 */
+		chunk = sector_to_chunk(snap, bio->bi_sector);
+
+		/*
+		 * Check exception table to see if block
+		 * is already remapped in this snapshot
+		 * and trigger an exception if not.
+		 */
+		e = lookup_exception(&snap->complete, chunk);
+		if (!e) {
+			pe = __find_pending_exception(snap, bio);
+			if (!pe) {
+				snap->store.drop_snapshot(&snap->store);
+				snap->valid = 0;
+
+			} else {
+				if (last)
+					list_merge(&pe->siblings,
+						   &last->siblings);
+
+				last = pe;
+				r = 0;
+			}
+		}
+
+		up_write(&snap->lock);
+	}
+
+	/*
+	 * Now that we have a complete pe list we can start the copying.
+	 */
+	if (last) {
+		pe = last;
+		do {
+			down_write(&pe->snap->lock);
+			if (first)
+				bio_list_add(&pe->origin_bios, bio);
+			if (!pe->started) {
+				pe->started = 1;
+				up_write(&pe->snap->lock);
+				start_copy(pe);
+			} else
+				up_write(&pe->snap->lock);
+			first = 0;
+			pe = list_entry(pe->siblings.next,
+					struct pending_exception, siblings);
+
+		} while (pe != last);
+	}
+
+	return r;
+}
+
+/*
+ * Called on a write from the origin driver.
+ */
+static int do_origin(struct dm_dev *origin, struct bio *bio)
+{
+	struct origin *o;
+	int r = 1;
+
+	down_read(&_origins_lock);
+	o = __lookup_origin(origin->bdev);
+	if (o)
+		r = __origin_write(&o->snapshots, bio);
+	up_read(&_origins_lock);
+
+	return r;
+}
+
+/*
+ * Origin: maps a linear range of a device, with hooks for snapshotting.
+ */
+
+/*
+ * Construct an origin mapping: <dev_path>
+ * The context for an origin is merely a 'struct dm_dev *'
+ * pointing to the real device.
+ */
+static int origin_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+{
+	int r;
+	struct dm_dev *dev;
+
+	if (argc != 1) {
+		ti->error = "dm-origin: incorrect number of arguments";
+		return -EINVAL;
+	}
+
+	r = dm_get_device(ti, argv[0], 0, ti->len,
+			  dm_table_get_mode(ti->table), &dev);
+	if (r) {
+		ti->error = "Cannot get target device";
+		return r;
+	}
+
+	ti->private = dev;
+	return 0;
+}
+
+static void origin_dtr(struct dm_target *ti)
+{
+	struct dm_dev *dev = (struct dm_dev *) ti->private;
+	dm_put_device(ti, dev);
+}
+
+static int origin_map(struct dm_target *ti, struct bio *bio,
+		      union map_info *map_context)
+{
+	struct dm_dev *dev = (struct dm_dev *) ti->private;
+	bio->bi_bdev = dev->bdev;
+
+	/* Only tell snapshots if this is a write */
+	return (bio_rw(bio) == WRITE) ? do_origin(dev, bio) : 1;
+}
+
+#define min_not_zero(l, r) (l == 0) ? r : ((r == 0) ? l : min(l, r))
+
+/*
+ * Set the target "split_io" field to the minimum of all the snapshots'
+ * chunk sizes.
+ */
+static void origin_resume(struct dm_target *ti)
+{
+	struct dm_dev *dev = (struct dm_dev *) ti->private;
+	struct dm_snapshot *snap;
+	struct origin *o;
+	chunk_t chunk_size = 0;
+
+	down_read(&_origins_lock);
+	o = __lookup_origin(dev->bdev);
+	if (o)
+		list_for_each_entry (snap, &o->snapshots, list)
+			chunk_size = min_not_zero(chunk_size, snap->chunk_size);
+	up_read(&_origins_lock);
+
+	ti->split_io = chunk_size;
+}
+
+static int origin_status(struct dm_target *ti, status_type_t type, char *result,
+			 unsigned int maxlen)
+{
+	struct dm_dev *dev = (struct dm_dev *) ti->private;
+	char buffer[32];
+
+	switch (type) {
+	case STATUSTYPE_INFO:
+		result[0] = '\0';
+		break;
+
+	case STATUSTYPE_TABLE:
+		format_dev_t(buffer, dev->bdev->bd_dev);
+		snprintf(result, maxlen, "%s", buffer);
+		break;
+	}
+
+	return 0;
+}
+
+static struct target_type origin_target = {
+	.name    = "snapshot-origin",
+	.version = {1, 0, 1},
+	.module  = THIS_MODULE,
+	.ctr     = origin_ctr,
+	.dtr     = origin_dtr,
+	.map     = origin_map,
+	.resume  = origin_resume,
+	.status  = origin_status,
+};
+
+static struct target_type snapshot_target = {
+	.name    = "snapshot",
+	.version = {1, 0, 1},
+	.module  = THIS_MODULE,
+	.ctr     = snapshot_ctr,
+	.dtr     = snapshot_dtr,
+	.map     = snapshot_map,
+	.resume  = snapshot_resume,
+	.status  = snapshot_status,
+};
+
+static int __init dm_snapshot_init(void)
+{
+	int r;
+
+	r = dm_register_target(&snapshot_target);
+	if (r) {
+		DMERR("snapshot target register failed %d", r);
+		return r;
+	}
+
+	r = dm_register_target(&origin_target);
+	if (r < 0) {
+		DMERR("Device mapper: Origin: register failed %d\n", r);
+		goto bad1;
+	}
+
+	r = init_origin_hash();
+	if (r) {
+		DMERR("init_origin_hash failed.");
+		goto bad2;
+	}
+
+	exception_cache = kmem_cache_create("dm-snapshot-ex",
+					    sizeof(struct exception),
+					    __alignof__(struct exception),
+					    0, NULL, NULL);
+	if (!exception_cache) {
+		DMERR("Couldn't create exception cache.");
+		r = -ENOMEM;
+		goto bad3;
+	}
+
+	pending_cache =
+	    kmem_cache_create("dm-snapshot-in",
+			      sizeof(struct pending_exception),
+			      __alignof__(struct pending_exception),
+			      0, NULL, NULL);
+	if (!pending_cache) {
+		DMERR("Couldn't create pending cache.");
+		r = -ENOMEM;
+		goto bad4;
+	}
+
+	pending_pool = mempool_create(128, mempool_alloc_slab,
+				      mempool_free_slab, pending_cache);
+	if (!pending_pool) {
+		DMERR("Couldn't create pending pool.");
+		r = -ENOMEM;
+		goto bad5;
+	}
+
+	return 0;
+
+      bad5:
+	kmem_cache_destroy(pending_cache);
+      bad4:
+	kmem_cache_destroy(exception_cache);
+      bad3:
+	exit_origin_hash();
+      bad2:
+	dm_unregister_target(&origin_target);
+      bad1:
+	dm_unregister_target(&snapshot_target);
+	return r;
+}
+
+static void __exit dm_snapshot_exit(void)
+{
+	int r;
+
+	r = dm_unregister_target(&snapshot_target);
+	if (r)
+		DMERR("snapshot unregister failed %d", r);
+
+	r = dm_unregister_target(&origin_target);
+	if (r)
+		DMERR("origin unregister failed %d", r);
+
+	exit_origin_hash();
+	mempool_destroy(pending_pool);
+	kmem_cache_destroy(pending_cache);
+	kmem_cache_destroy(exception_cache);
+}
+
+/* Module hooks */
+module_init(dm_snapshot_init);
+module_exit(dm_snapshot_exit);
+
+MODULE_DESCRIPTION(DM_NAME " snapshot target");
+MODULE_AUTHOR("Joe Thornber");
+MODULE_LICENSE("GPL");
--- diff/drivers/md/dm-snap.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/dm-snap.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,161 @@
+/*
+ * dm-snapshot.c
+ *
+ * Copyright (C) 2001-2002 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#ifndef DM_SNAPSHOT_H
+#define DM_SNAPSHOT_H
+
+#include "dm.h"
+#include <linux/blkdev.h>
+
+struct exception_table {
+	uint32_t hash_mask;
+	struct list_head *table;
+};
+
+/*
+ * The snapshot code deals with largish chunks of the disk at a
+ * time. Typically 64k - 256k.
+ */
+/* FIXME: can we get away with limiting these to a uint32_t ? */
+typedef sector_t chunk_t;
+
+/*
+ * An exception is used where an old chunk of data has been
+ * replaced by a new one.
+ */
+struct exception {
+	struct list_head hash_list;
+
+	chunk_t old_chunk;
+	chunk_t new_chunk;
+};
+
+/*
+ * Abstraction to handle the meta/layout of exception stores (the
+ * COW device).
+ */
+struct exception_store {
+
+	/*
+	 * Destroys this object when you've finished with it.
+	 */
+	void (*destroy) (struct exception_store *store);
+
+	/*
+	 * The target shouldn't read the COW device until this is
+	 * called.
+	 */
+	int (*read_metadata) (struct exception_store *store);
+
+	/*
+	 * Find somewhere to store the next exception.
+	 */
+	int (*prepare_exception) (struct exception_store *store,
+				  struct exception *e);
+
+	/*
+	 * Update the metadata with this exception.
+	 */
+	void (*commit_exception) (struct exception_store *store,
+				  struct exception *e,
+				  void (*callback) (void *, int success),
+				  void *callback_context);
+
+	/*
+	 * The snapshot is invalid, note this in the metadata.
+	 */
+	void (*drop_snapshot) (struct exception_store *store);
+
+	/*
+	 * Return how full the snapshot is.
+	 */
+	void (*fraction_full) (struct exception_store *store,
+			       sector_t *numerator,
+			       sector_t *denominator);
+
+	struct dm_snapshot *snap;
+	void *context;
+};
+
+struct dm_snapshot {
+	struct rw_semaphore lock;
+	struct dm_table *table;
+
+	struct dm_dev *origin;
+	struct dm_dev *cow;
+
+	/* List of snapshots per Origin */
+	struct list_head list;
+
+	/* Size of data blocks saved - must be a power of 2 */
+	chunk_t chunk_size;
+	chunk_t chunk_mask;
+	chunk_t chunk_shift;
+
+	/* You can't use a snapshot if this is 0 (e.g. if full) */
+	int valid;
+	int have_metadata;
+
+	/* Used for display of table */
+	char type;
+
+	/* The last percentage we notified */
+	int last_percent;
+
+	struct exception_table pending;
+	struct exception_table complete;
+
+	/* The on disk metadata handler */
+	struct exception_store store;
+
+	struct kcopyd_client *kcopyd_client;
+};
+
+/*
+ * Used by the exception stores to load exceptions hen
+ * initialising.
+ */
+int dm_add_exception(struct dm_snapshot *s, chunk_t old, chunk_t new);
+
+/*
+ * Constructor and destructor for the default persistent
+ * store.
+ */
+int dm_create_persistent(struct exception_store *store, uint32_t chunk_size);
+
+int dm_create_transient(struct exception_store *store,
+			struct dm_snapshot *s, int blocksize);
+
+/*
+ * Return the number of sectors in the device.
+ */
+static inline sector_t get_dev_size(struct block_device *bdev)
+{
+	return bdev->bd_inode->i_size >> SECTOR_SHIFT;
+}
+
+static inline chunk_t sector_to_chunk(struct dm_snapshot *s, sector_t sector)
+{
+	return (sector & ~s->chunk_mask) >> s->chunk_shift;
+}
+
+static inline sector_t chunk_to_sector(struct dm_snapshot *s, chunk_t chunk)
+{
+	return chunk << s->chunk_shift;
+}
+
+static inline int bdev_equal(struct block_device *lhs, struct block_device *rhs)
+{
+	/*
+	 * There is only ever one instance of a particular block
+	 * device so we can compare pointers safely.
+	 */
+	return lhs == rhs;
+}
+
+#endif
--- diff/drivers/md/dm-zero.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/dm-zero.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2003 Christophe Saout <christophe@saout.de>
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm.h"
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/bio.h>
+
+/*
+ * Construct a dummy mapping that only returns zeros
+ */
+static int zero_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+{
+	if (argc != 0) {
+		ti->error = "dm-zero: No arguments required";
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+/*
+ * Fills the bio pages with zeros
+ */
+static void zero_fill_bio(struct bio *bio)
+{
+	unsigned long flags;
+	struct bio_vec *bv;
+	int i;
+
+	bio_for_each_segment(bv, bio, i) {
+		char *data = bvec_kmap_irq(bv, &flags);
+		memset(data, 0, bv->bv_len);
+		flush_dcache_page(bv->bv_page);
+		bvec_kunmap_irq(data, &flags);
+	}
+}
+
+/*
+ * Return zeros only on reads
+ */
+static int zero_map(struct dm_target *ti, struct bio *bio,
+		      union map_info *map_context)
+{
+	switch(bio_rw(bio)) {
+	case READ:
+		zero_fill_bio(bio);
+		break;
+	case READA:
+		/* readahead of null bytes only wastes buffer cache */
+		return -EIO;
+	case WRITE:
+		/* writes get silently dropped */
+		break;
+	}
+
+	bio_endio(bio, bio->bi_size, 0);
+
+	/* accepted bio, don't make new request */
+	return 0;
+}
+
+static struct target_type zero_target = {
+	.name   = "zero",
+	.version = {1, 0, 0},
+	.module = THIS_MODULE,
+	.ctr    = zero_ctr,
+	.map    = zero_map,
+};
+
+int __init dm_zero_init(void)
+{
+	int r = dm_register_target(&zero_target);
+
+	if (r < 0)
+		DMERR("zero: register failed %d", r);
+
+	return r;
+}
+
+void __exit dm_zero_exit(void)
+{
+	int r = dm_unregister_target(&zero_target);
+
+	if (r < 0)
+		DMERR("zero: unregister failed %d", r);
+}
+
+module_init(dm_zero_init)
+module_exit(dm_zero_exit)
+
+MODULE_AUTHOR("Christophe Saout <christophe@saout.de>");
+MODULE_DESCRIPTION(DM_NAME " dummy target returning zeros");
+MODULE_LICENSE("GPL");
--- diff/drivers/md/kcopyd.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/kcopyd.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,699 @@
+/*
+ * Copyright (C) 2002 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ *
+ * Kcopyd provides a simple interface for copying an area of one
+ * block-device to one or more other block-devices, with an asynchronous
+ * completion notification.
+ */
+
+#include <asm/atomic.h>
+
+#include <linux/blkdev.h>
+#include <linux/config.h>
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/mempool.h>
+#include <linux/module.h>
+#include <linux/pagemap.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/workqueue.h>
+
+#include "kcopyd.h"
+
+/* FIXME: this is only needed for the DMERR macros */
+#include "dm.h"
+
+static struct workqueue_struct *_kcopyd_wq;
+static struct work_struct _kcopyd_work;
+
+static inline void wake(void)
+{
+	queue_work(_kcopyd_wq, &_kcopyd_work);
+}
+
+/*-----------------------------------------------------------------
+ * Each kcopyd client has its own little pool of preallocated
+ * pages for kcopyd io.
+ *---------------------------------------------------------------*/
+struct kcopyd_client {
+	struct list_head list;
+
+	spinlock_t lock;
+	struct page_list *pages;
+	unsigned int nr_pages;
+	unsigned int nr_free_pages;
+};
+
+static struct page_list *alloc_pl(void)
+{
+	struct page_list *pl;
+
+	pl = kmalloc(sizeof(*pl), GFP_KERNEL);
+	if (!pl)
+		return NULL;
+
+	pl->page = alloc_page(GFP_KERNEL);
+	if (!pl->page) {
+		kfree(pl);
+		return NULL;
+	}
+
+	return pl;
+}
+
+static void free_pl(struct page_list *pl)
+{
+	__free_page(pl->page);
+	kfree(pl);
+}
+
+static int kcopyd_get_pages(struct kcopyd_client *kc,
+			    unsigned int nr, struct page_list **pages)
+{
+	struct page_list *pl;
+
+	spin_lock(&kc->lock);
+	if (kc->nr_free_pages < nr) {
+		spin_unlock(&kc->lock);
+		return -ENOMEM;
+	}
+
+	kc->nr_free_pages -= nr;
+	for (*pages = pl = kc->pages; --nr; pl = pl->next)
+		;
+
+	kc->pages = pl->next;
+	pl->next = 0;
+
+	spin_unlock(&kc->lock);
+
+	return 0;
+}
+
+static void kcopyd_put_pages(struct kcopyd_client *kc, struct page_list *pl)
+{
+	struct page_list *cursor;
+
+	spin_lock(&kc->lock);
+	for (cursor = pl; cursor->next; cursor = cursor->next)
+		kc->nr_free_pages++;
+
+	kc->nr_free_pages++;
+	cursor->next = kc->pages;
+	kc->pages = pl;
+	spin_unlock(&kc->lock);
+}
+
+/*
+ * These three functions resize the page pool.
+ */
+static void drop_pages(struct page_list *pl)
+{
+	struct page_list *next;
+
+	while (pl) {
+		next = pl->next;
+		free_pl(pl);
+		pl = next;
+	}
+}
+
+static int client_alloc_pages(struct kcopyd_client *kc, unsigned int nr)
+{
+	unsigned int i;
+	struct page_list *pl = NULL, *next;
+
+	for (i = 0; i < nr; i++) {
+		next = alloc_pl();
+		if (!next) {
+			if (pl)
+				drop_pages(pl);
+			return -ENOMEM;
+		}
+		next->next = pl;
+		pl = next;
+	}
+
+	kcopyd_put_pages(kc, pl);
+	kc->nr_pages += nr;
+	return 0;
+}
+
+static void client_free_pages(struct kcopyd_client *kc)
+{
+	BUG_ON(kc->nr_free_pages != kc->nr_pages);
+	drop_pages(kc->pages);
+	kc->pages = NULL;
+	kc->nr_free_pages = kc->nr_pages = 0;
+}
+
+/*-----------------------------------------------------------------
+ * kcopyd_jobs need to be allocated by the *clients* of kcopyd,
+ * for this reason we use a mempool to prevent the client from
+ * ever having to do io (which could cause a deadlock).
+ *---------------------------------------------------------------*/
+struct kcopyd_job {
+	struct kcopyd_client *kc;
+	struct list_head list;
+	unsigned long flags;
+
+	/*
+	 * Error state of the job.
+	 */
+	int read_err;
+	unsigned int write_err;
+
+	/*
+	 * Either READ or WRITE
+	 */
+	int rw;
+	struct io_region source;
+
+	/*
+	 * The destinations for the transfer.
+	 */
+	unsigned int num_dests;
+	struct io_region dests[KCOPYD_MAX_REGIONS];
+
+	sector_t offset;
+	unsigned int nr_pages;
+	struct page_list *pages;
+
+	/*
+	 * Set this to ensure you are notified when the job has
+	 * completed.  'context' is for callback to use.
+	 */
+	kcopyd_notify_fn fn;
+	void *context;
+
+	/*
+	 * These fields are only used if the job has been split
+	 * into more manageable parts.
+	 */
+	struct semaphore lock;
+	atomic_t sub_jobs;
+	sector_t progress;
+};
+
+/* FIXME: this should scale with the number of pages */
+#define MIN_JOBS 512
+
+static kmem_cache_t *_job_cache;
+static mempool_t *_job_pool;
+
+/*
+ * We maintain three lists of jobs:
+ *
+ * i)   jobs waiting for pages
+ * ii)  jobs that have pages, and are waiting for the io to be issued.
+ * iii) jobs that have completed.
+ *
+ * All three of these are protected by job_lock.
+ */
+static spinlock_t _job_lock = SPIN_LOCK_UNLOCKED;
+
+static LIST_HEAD(_complete_jobs);
+static LIST_HEAD(_io_jobs);
+static LIST_HEAD(_pages_jobs);
+
+static int jobs_init(void)
+{
+	_job_cache = kmem_cache_create("kcopyd-jobs",
+				       sizeof(struct kcopyd_job),
+				       __alignof__(struct kcopyd_job),
+				       0, NULL, NULL);
+	if (!_job_cache)
+		return -ENOMEM;
+
+	_job_pool = mempool_create(MIN_JOBS, mempool_alloc_slab,
+				   mempool_free_slab, _job_cache);
+	if (!_job_pool) {
+		kmem_cache_destroy(_job_cache);
+		return -ENOMEM;
+	}
+
+	return 0;
+}
+
+static void jobs_exit(void)
+{
+	BUG_ON(!list_empty(&_complete_jobs));
+	BUG_ON(!list_empty(&_io_jobs));
+	BUG_ON(!list_empty(&_pages_jobs));
+
+	mempool_destroy(_job_pool);
+	kmem_cache_destroy(_job_cache);
+	_job_pool = NULL;
+	_job_cache = NULL;
+}
+
+/*
+ * Functions to push and pop a job onto the head of a given job
+ * list.
+ */
+static inline struct kcopyd_job *pop(struct list_head *jobs)
+{
+	struct kcopyd_job *job = NULL;
+	unsigned long flags;
+
+	spin_lock_irqsave(&_job_lock, flags);
+
+	if (!list_empty(jobs)) {
+		job = list_entry(jobs->next, struct kcopyd_job, list);
+		list_del(&job->list);
+	}
+	spin_unlock_irqrestore(&_job_lock, flags);
+
+	return job;
+}
+
+static inline void push(struct list_head *jobs, struct kcopyd_job *job)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&_job_lock, flags);
+	list_add_tail(&job->list, jobs);
+	spin_unlock_irqrestore(&_job_lock, flags);
+}
+
+/*
+ * These three functions process 1 item from the corresponding
+ * job list.
+ *
+ * They return:
+ * < 0: error
+ *   0: success
+ * > 0: can't process yet.
+ */
+static int run_complete_job(struct kcopyd_job *job)
+{
+	void *context = job->context;
+	int read_err = job->read_err;
+	unsigned int write_err = job->write_err;
+	kcopyd_notify_fn fn = job->fn;
+
+	kcopyd_put_pages(job->kc, job->pages);
+	mempool_free(job, _job_pool);
+	fn(read_err, write_err, context);
+	return 0;
+}
+
+static void complete_io(unsigned long error, void *context)
+{
+	struct kcopyd_job *job = (struct kcopyd_job *) context;
+
+	if (error) {
+		if (job->rw == WRITE)
+			job->write_err &= error;
+		else
+			job->read_err = 1;
+
+		if (!test_bit(KCOPYD_IGNORE_ERROR, &job->flags)) {
+			push(&_complete_jobs, job);
+			wake();
+			return;
+		}
+	}
+
+	if (job->rw == WRITE)
+		push(&_complete_jobs, job);
+
+	else {
+		job->rw = WRITE;
+		push(&_io_jobs, job);
+	}
+
+	wake();
+}
+
+/*
+ * Request io on as many buffer heads as we can currently get for
+ * a particular job.
+ */
+static int run_io_job(struct kcopyd_job *job)
+{
+	int r;
+
+	if (job->rw == READ)
+		r = dm_io_async(1, &job->source, job->rw,
+				job->pages,
+				job->offset, complete_io, job);
+
+	else
+		r = dm_io_async(job->num_dests, job->dests, job->rw,
+				job->pages,
+				job->offset, complete_io, job);
+
+	return r;
+}
+
+static int run_pages_job(struct kcopyd_job *job)
+{
+	int r;
+
+	job->nr_pages = dm_div_up(job->dests[0].count + job->offset,
+				  PAGE_SIZE >> 9);
+	r = kcopyd_get_pages(job->kc, job->nr_pages, &job->pages);
+	if (!r) {
+		/* this job is ready for io */
+		push(&_io_jobs, job);
+		return 0;
+	}
+
+	if (r == -ENOMEM)
+		/* can't complete now */
+		return 1;
+
+	return r;
+}
+
+/*
+ * Run through a list for as long as possible.  Returns the count
+ * of successful jobs.
+ */
+static int process_jobs(struct list_head *jobs, int (*fn) (struct kcopyd_job *))
+{
+	struct kcopyd_job *job;
+	int r, count = 0;
+
+	while ((job = pop(jobs))) {
+
+		r = fn(job);
+
+		if (r < 0) {
+			/* error this rogue job */
+			if (job->rw == WRITE)
+				job->write_err = (unsigned int) -1;
+			else
+				job->read_err = 1;
+			push(&_complete_jobs, job);
+			break;
+		}
+
+		if (r > 0) {
+			/*
+			 * We couldn't service this job ATM, so
+			 * push this job back onto the list.
+			 */
+			push(jobs, job);
+			break;
+		}
+
+		count++;
+	}
+
+	return count;
+}
+
+/*
+ * kcopyd does this every time it's woken up.
+ */
+static void do_work(void *ignored)
+{
+	/*
+	 * The order that these are called is *very* important.
+	 * complete jobs can free some pages for pages jobs.
+	 * Pages jobs when successful will jump onto the io jobs
+	 * list.  io jobs call wake when they complete and it all
+	 * starts again.
+	 */
+	process_jobs(&_complete_jobs, run_complete_job);
+	process_jobs(&_pages_jobs, run_pages_job);
+	process_jobs(&_io_jobs, run_io_job);
+}
+
+/*
+ * If we are copying a small region we just dispatch a single job
+ * to do the copy, otherwise the io has to be split up into many
+ * jobs.
+ */
+static void dispatch_job(struct kcopyd_job *job)
+{
+	push(&_pages_jobs, job);
+	wake();
+}
+
+#define SUB_JOB_SIZE 128
+static void segment_complete(int read_err,
+			     unsigned int write_err, void *context)
+{
+	/* FIXME: tidy this function */
+	sector_t progress = 0;
+	sector_t count = 0;
+	struct kcopyd_job *job = (struct kcopyd_job *) context;
+
+	down(&job->lock);
+
+	/* update the error */
+	if (read_err)
+		job->read_err = 1;
+
+	if (write_err)
+		job->write_err &= write_err;
+
+	/*
+	 * Only dispatch more work if there hasn't been an error.
+	 */
+	if ((!job->read_err && !job->write_err) ||
+	    test_bit(KCOPYD_IGNORE_ERROR, &job->flags)) {
+		/* get the next chunk of work */
+		progress = job->progress;
+		count = job->source.count - progress;
+		if (count) {
+			if (count > SUB_JOB_SIZE)
+				count = SUB_JOB_SIZE;
+
+			job->progress += count;
+		}
+	}
+	up(&job->lock);
+
+	if (count) {
+		int i;
+		struct kcopyd_job *sub_job = mempool_alloc(_job_pool, GFP_NOIO);
+
+		*sub_job = *job;
+		sub_job->source.sector += progress;
+		sub_job->source.count = count;
+
+		for (i = 0; i < job->num_dests; i++) {
+			sub_job->dests[i].sector += progress;
+			sub_job->dests[i].count = count;
+		}
+
+		sub_job->fn = segment_complete;
+		sub_job->context = job;
+		dispatch_job(sub_job);
+
+	} else if (atomic_dec_and_test(&job->sub_jobs)) {
+
+		/*
+		 * To avoid a race we must keep the job around
+		 * until after the notify function has completed.
+		 * Otherwise the client may try and stop the job
+		 * after we've completed.
+		 */
+		job->fn(read_err, write_err, job->context);
+		mempool_free(job, _job_pool);
+	}
+}
+
+/*
+ * Create some little jobs that will do the move between
+ * them.
+ */
+#define SPLIT_COUNT 8
+static void split_job(struct kcopyd_job *job)
+{
+	int i;
+
+	atomic_set(&job->sub_jobs, SPLIT_COUNT);
+	for (i = 0; i < SPLIT_COUNT; i++)
+		segment_complete(0, 0u, job);
+}
+
+int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from,
+		unsigned int num_dests, struct io_region *dests,
+		unsigned int flags, kcopyd_notify_fn fn, void *context)
+{
+	struct kcopyd_job *job;
+
+	/*
+	 * Allocate a new job.
+	 */
+	job = mempool_alloc(_job_pool, GFP_NOIO);
+
+	/*
+	 * set up for the read.
+	 */
+	job->kc = kc;
+	job->flags = flags;
+	job->read_err = 0;
+	job->write_err = 0;
+	job->rw = READ;
+
+	job->source = *from;
+
+	job->num_dests = num_dests;
+	memcpy(&job->dests, dests, sizeof(*dests) * num_dests);
+
+	job->offset = 0;
+	job->nr_pages = 0;
+	job->pages = NULL;
+
+	job->fn = fn;
+	job->context = context;
+
+	if (job->source.count < SUB_JOB_SIZE)
+		dispatch_job(job);
+
+	else {
+		init_MUTEX(&job->lock);
+		job->progress = 0;
+		split_job(job);
+	}
+
+	return 0;
+}
+
+/*
+ * Cancels a kcopyd job, eg. someone might be deactivating a
+ * mirror.
+ */
+int kcopyd_cancel(struct kcopyd_job *job, int block)
+{
+	/* FIXME: finish */
+	return -1;
+}
+
+/*-----------------------------------------------------------------
+ * Unit setup
+ *---------------------------------------------------------------*/
+static DECLARE_MUTEX(_client_lock);
+static LIST_HEAD(_clients);
+
+static int client_add(struct kcopyd_client *kc)
+{
+	down(&_client_lock);
+	list_add(&kc->list, &_clients);
+	up(&_client_lock);
+	return 0;
+}
+
+static void client_del(struct kcopyd_client *kc)
+{
+	down(&_client_lock);
+	list_del(&kc->list);
+	up(&_client_lock);
+}
+
+static DECLARE_MUTEX(kcopyd_init_lock);
+static int kcopyd_clients = 0;
+
+static int kcopyd_init(void)
+{
+	int r;
+
+	down(&kcopyd_init_lock);
+
+	if (kcopyd_clients) {
+		/* Already initialized. */
+		kcopyd_clients++;
+		up(&kcopyd_init_lock);
+		return 0;
+	}
+
+	r = jobs_init();
+	if (r) {
+		up(&kcopyd_init_lock);
+		return r;
+	}
+
+	_kcopyd_wq = create_singlethread_workqueue("kcopyd");
+	if (!_kcopyd_wq) {
+		jobs_exit();
+		up(&kcopyd_init_lock);
+		return -ENOMEM;
+	}
+
+	kcopyd_clients++;
+	INIT_WORK(&_kcopyd_work, do_work, NULL);
+	up(&kcopyd_init_lock);
+	return 0;
+}
+
+static void kcopyd_exit(void)
+{
+	down(&kcopyd_init_lock);
+	kcopyd_clients--;
+	if (!kcopyd_clients) {
+		jobs_exit();
+		destroy_workqueue(_kcopyd_wq);
+		_kcopyd_wq = NULL;
+	}
+	up(&kcopyd_init_lock);
+}
+
+int kcopyd_client_create(unsigned int nr_pages, struct kcopyd_client **result)
+{
+	int r = 0;
+	struct kcopyd_client *kc;
+
+	r = kcopyd_init();
+	if (r)
+		return r;
+
+	kc = kmalloc(sizeof(*kc), GFP_KERNEL);
+	if (!kc) {
+		kcopyd_exit();
+		return -ENOMEM;
+	}
+
+	kc->lock = SPIN_LOCK_UNLOCKED;
+	kc->pages = NULL;
+	kc->nr_pages = kc->nr_free_pages = 0;
+	r = client_alloc_pages(kc, nr_pages);
+	if (r) {
+		kfree(kc);
+		kcopyd_exit();
+		return r;
+	}
+
+	r = dm_io_get(nr_pages);
+	if (r) {
+		client_free_pages(kc);
+		kfree(kc);
+		kcopyd_exit();
+		return r;
+	}
+
+	r = client_add(kc);
+	if (r) {
+		dm_io_put(nr_pages);
+		client_free_pages(kc);
+		kfree(kc);
+		kcopyd_exit();
+		return r;
+	}
+
+	*result = kc;
+	return 0;
+}
+
+void kcopyd_client_destroy(struct kcopyd_client *kc)
+{
+	dm_io_put(kc->nr_pages);
+	client_free_pages(kc);
+	client_del(kc);
+	kfree(kc);
+	kcopyd_exit();
+}
+
+EXPORT_SYMBOL(kcopyd_client_create);
+EXPORT_SYMBOL(kcopyd_client_destroy);
+EXPORT_SYMBOL(kcopyd_copy);
+EXPORT_SYMBOL(kcopyd_cancel);
--- diff/drivers/md/kcopyd.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/md/kcopyd.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2001 Sistina Software
+ *
+ * This file is released under the GPL.
+ *
+ * Kcopyd provides a simple interface for copying an area of one
+ * block-device to one or more other block-devices, with an asynchronous
+ * completion notification.
+ */
+
+#ifndef DM_KCOPYD_H
+#define DM_KCOPYD_H
+
+#include "dm-io.h"
+
+/* FIXME: make this configurable */
+#define KCOPYD_MAX_REGIONS 8
+
+#define KCOPYD_IGNORE_ERROR 1
+
+/*
+ * To use kcopyd you must first create a kcopyd client object.
+ */
+struct kcopyd_client;
+int kcopyd_client_create(unsigned int num_pages, struct kcopyd_client **result);
+void kcopyd_client_destroy(struct kcopyd_client *kc);
+
+/*
+ * Submit a copy job to kcopyd.  This is built on top of the
+ * previous three fns.
+ *
+ * read_err is a boolean,
+ * write_err is a bitset, with 1 bit for each destination region
+ */
+typedef void (*kcopyd_notify_fn)(int read_err,
+				 unsigned int write_err, void *context);
+
+int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from,
+		unsigned int num_dests, struct io_region *dests,
+		unsigned int flags, kcopyd_notify_fn fn, void *context);
+
+#endif
--- diff/drivers/media/video/ovcamchip/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/media/video/ovcamchip/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,4 @@
+ovcamchip-objs     := ovcamchip_core.o ov6x20.o ov6x30.o ov7x10.o ov7x20.o \
+                      ov76be.o
+
+obj-$(CONFIG_VIDEO_OVCAMCHIP) += ovcamchip.o
--- diff/drivers/media/video/ovcamchip/ov6x20.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/media/video/ovcamchip/ov6x20.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,415 @@
+/* OmniVision OV6620/OV6120 Camera Chip Support Code
+ *
+ * Copyright (c) 1999-2004 Mark McClelland <mark@alpha.dyndns.org>
+ * http://alpha.dyndns.org/ov511/
+ *
+ * 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. NO WARRANTY OF ANY KIND is expressed or implied.
+ */
+
+#define DEBUG
+
+#include <linux/slab.h>
+#include "ovcamchip_priv.h"
+
+/* Registers */
+#define REG_GAIN		0x00	/* gain [5:0] */
+#define REG_BLUE		0x01	/* blue gain */
+#define REG_RED			0x02	/* red gain */
+#define REG_SAT			0x03	/* saturation */
+#define REG_CNT			0x05	/* Y contrast */
+#define REG_BRT			0x06	/* Y brightness */
+#define REG_WB_BLUE		0x0C	/* WB blue ratio [5:0] */
+#define REG_WB_RED		0x0D	/* WB red ratio [5:0] */
+#define REG_EXP			0x10	/* exposure */
+
+/* Window parameters */
+#define HWSBASE 0x38
+#define HWEBASE 0x3A
+#define VWSBASE 0x05
+#define VWEBASE 0x06
+
+struct ov6x20 {
+	int auto_brt;
+	int auto_exp;
+	int backlight;
+	int bandfilt;
+	int mirror;
+};
+
+/* Initial values for use with OV511/OV511+ cameras */
+static struct ovcamchip_regvals regvals_init_6x20_511[] = {
+	{ 0x12, 0x80 }, /* reset */
+	{ 0x11, 0x01 },
+	{ 0x03, 0x60 },
+	{ 0x05, 0x7f }, /* For when autoadjust is off */
+	{ 0x07, 0xa8 },
+	{ 0x0c, 0x24 },
+	{ 0x0d, 0x24 },
+	{ 0x0f, 0x15 }, /* COMS */
+	{ 0x10, 0x75 }, /* AEC Exposure time */
+	{ 0x12, 0x24 }, /* Enable AGC and AWB */
+	{ 0x14, 0x04 },
+	{ 0x16, 0x03 },
+	{ 0x26, 0xb2 }, /* BLC enable */
+	/* 0x28: 0x05 Selects RGB format if RGB on */
+	{ 0x28, 0x05 },
+	{ 0x2a, 0x04 }, /* Disable framerate adjust */
+	{ 0x2d, 0x99 },
+	{ 0x33, 0xa0 }, /* Color Processing Parameter */
+	{ 0x34, 0xd2 }, /* Max A/D range */
+	{ 0x38, 0x8b },
+	{ 0x39, 0x40 },
+
+	{ 0x3c, 0x39 }, /* Enable AEC mode changing */
+	{ 0x3c, 0x3c }, /* Change AEC mode */
+	{ 0x3c, 0x24 }, /* Disable AEC mode changing */
+
+	{ 0x3d, 0x80 },
+	/* These next two registers (0x4a, 0x4b) are undocumented. They
+	 * control the color balance */
+	{ 0x4a, 0x80 },
+	{ 0x4b, 0x80 },
+	{ 0x4d, 0xd2 }, /* This reduces noise a bit */
+	{ 0x4e, 0xc1 },
+	{ 0x4f, 0x04 },
+	{ 0xff, 0xff },	/* END MARKER */
+};
+
+/* Initial values for use with OV518 cameras */
+static struct ovcamchip_regvals regvals_init_6x20_518[] = {
+	{ 0x12, 0x80 }, /* Do a reset */
+	{ 0x03, 0xc0 }, /* Saturation */
+	{ 0x05, 0x8a }, /* Contrast */
+	{ 0x0c, 0x24 }, /* AWB blue */
+	{ 0x0d, 0x24 }, /* AWB red */
+	{ 0x0e, 0x8d }, /* Additional 2x gain */
+	{ 0x0f, 0x25 }, /* Black expanding level = 1.3V */
+	{ 0x11, 0x01 }, /* Clock div. */
+	{ 0x12, 0x24 }, /* Enable AGC and AWB */
+	{ 0x13, 0x01 }, /* (default) */
+	{ 0x14, 0x80 }, /* Set reserved bit 7 */
+	{ 0x15, 0x01 }, /* (default) */
+	{ 0x16, 0x03 }, /* (default) */
+	{ 0x17, 0x38 }, /* (default) */
+	{ 0x18, 0xea }, /* (default) */
+	{ 0x19, 0x04 },
+	{ 0x1a, 0x93 },
+	{ 0x1b, 0x00 }, /* (default) */
+	{ 0x1e, 0xc4 }, /* (default) */
+	{ 0x1f, 0x04 }, /* (default) */
+	{ 0x20, 0x20 }, /* Enable 1st stage aperture correction */
+	{ 0x21, 0x10 }, /* Y offset */
+	{ 0x22, 0x88 }, /* U offset */
+	{ 0x23, 0xc0 }, /* Set XTAL power level */
+	{ 0x24, 0x53 }, /* AEC bright ratio */
+	{ 0x25, 0x7a }, /* AEC black ratio */
+	{ 0x26, 0xb2 }, /* BLC enable */
+	{ 0x27, 0xa2 }, /* Full output range */
+	{ 0x28, 0x01 }, /* (default) */
+	{ 0x29, 0x00 }, /* (default) */
+	{ 0x2a, 0x84 }, /* (default) */
+	{ 0x2b, 0xa8 }, /* Set custom frame rate */
+	{ 0x2c, 0xa0 }, /* (reserved) */
+	{ 0x2d, 0x95 }, /* Enable banding filter */
+	{ 0x2e, 0x88 }, /* V offset */
+	{ 0x33, 0x22 }, /* Luminance gamma on */
+	{ 0x34, 0xc7 }, /* A/D bias */
+	{ 0x36, 0x12 }, /* (reserved) */
+	{ 0x37, 0x63 }, /* (reserved) */
+	{ 0x38, 0x8b }, /* Quick AEC/AEB */
+	{ 0x39, 0x00 }, /* (default) */
+	{ 0x3a, 0x0f }, /* (default) */
+	{ 0x3b, 0x3c }, /* (default) */
+	{ 0x3c, 0x5c }, /* AEC controls */
+	{ 0x3d, 0x80 }, /* Drop 1 (bad) frame when AEC change */
+	{ 0x3e, 0x80 }, /* (default) */
+	{ 0x3f, 0x02 }, /* (default) */
+	{ 0x40, 0x10 }, /* (reserved) */
+	{ 0x41, 0x10 }, /* (reserved) */
+	{ 0x42, 0x00 }, /* (reserved) */
+	{ 0x43, 0x7f }, /* (reserved) */
+	{ 0x44, 0x80 }, /* (reserved) */
+	{ 0x45, 0x1c }, /* (reserved) */
+	{ 0x46, 0x1c }, /* (reserved) */
+	{ 0x47, 0x80 }, /* (reserved) */
+	{ 0x48, 0x5f }, /* (reserved) */
+	{ 0x49, 0x00 }, /* (reserved) */
+	{ 0x4a, 0x00 }, /* Color balance (undocumented) */
+	{ 0x4b, 0x80 }, /* Color balance (undocumented) */
+	{ 0x4c, 0x58 }, /* (reserved) */
+	{ 0x4d, 0xd2 }, /* U *= .938, V *= .838 */
+	{ 0x4e, 0xa0 }, /* (default) */
+	{ 0x4f, 0x04 }, /* UV 3-point average */
+	{ 0x50, 0xff }, /* (reserved) */
+	{ 0x51, 0x58 }, /* (reserved) */
+	{ 0x52, 0xc0 }, /* (reserved) */
+	{ 0x53, 0x42 }, /* (reserved) */
+	{ 0x27, 0xa6 }, /* Enable manual offset adj. (reg 21 & 22) */
+	{ 0x12, 0x20 },
+	{ 0x12, 0x24 },
+
+	{ 0xff, 0xff },	/* END MARKER */
+};
+
+/* This initializes the OV6x20 camera chip and relevant variables. */
+static int ov6x20_init(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov6x20 *s;
+	int rc;
+
+	DDEBUG(4, &c->dev, "entered");
+
+	switch (c->adapter->id) {
+	case I2C_ALGO_SMBUS | I2C_HW_SMBUS_OV511:
+		rc = ov_write_regvals(c, regvals_init_6x20_511);
+		break;
+	case I2C_ALGO_SMBUS | I2C_HW_SMBUS_OV518:
+		rc = ov_write_regvals(c, regvals_init_6x20_518);
+		break;
+	default:
+		dev_err(&c->dev, "ov6x20: Unsupported adapter\n");
+		rc = -ENODEV;
+	}
+
+	if (rc < 0)
+		return rc;
+
+	ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL);
+	if (!s)
+		return -ENOMEM;
+	memset(s, 0, sizeof *s);
+
+	s->auto_brt = 1;
+	s->auto_exp = 1;
+
+	return rc;
+}
+
+static int ov6x20_free(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+
+	kfree(ov->spriv);
+	return 0;
+}
+
+static int ov6x20_set_control(struct i2c_client *c,
+			      struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov6x20 *s = ov->spriv;
+	int rc;
+	int v = ctl->value;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_CONT:
+		rc = ov_write(c, REG_CNT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_BRIGHT:
+		rc = ov_write(c, REG_BRT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_write(c, REG_SAT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_HUE:
+		rc = ov_write(c, REG_RED, 0xFF - (v >> 8));
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write(c, REG_BLUE, v >> 8);
+		break;
+	case OVCAMCHIP_CID_EXP:
+		rc = ov_write(c, REG_EXP, v);
+		break;
+	case OVCAMCHIP_CID_FREQ:
+	{
+		int sixty = (v == 60);
+
+		rc = ov_write(c, 0x2b, sixty?0xa8:0x28);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write(c, 0x2a, sixty?0x84:0xa4);
+		break;
+	}
+	case OVCAMCHIP_CID_BANDFILT:
+		rc = ov_write_mask(c, 0x2d, v?0x04:0x00, 0x04);
+		s->bandfilt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		rc = ov_write_mask(c, 0x2d, v?0x10:0x00, 0x10);
+		s->auto_brt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		rc = ov_write_mask(c, 0x13, v?0x01:0x00, 0x01);
+		s->auto_exp = v;
+		break;
+	case OVCAMCHIP_CID_BACKLIGHT:
+	{
+		rc = ov_write_mask(c, 0x4e, v?0xe0:0xc0, 0xe0);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x29, v?0x08:0x00, 0x08);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x0e, v?0x80:0x00, 0x80);
+		s->backlight = v;
+		break;
+	}
+	case OVCAMCHIP_CID_MIRROR:
+		rc = ov_write_mask(c, 0x12, v?0x40:0x00, 0x40);
+		s->mirror = v;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+out:
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, v, rc);
+	return rc;
+}
+
+static int ov6x20_get_control(struct i2c_client *c,
+			      struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov6x20 *s = ov->spriv;
+	int rc = 0;
+	unsigned char val = 0;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_CONT:
+		rc = ov_read(c, REG_CNT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_BRIGHT:
+		rc = ov_read(c, REG_BRT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_read(c, REG_SAT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_HUE:
+		rc = ov_read(c, REG_BLUE, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_EXP:
+		rc = ov_read(c, REG_EXP, &val);
+		ctl->value = val;
+		break;
+	case OVCAMCHIP_CID_BANDFILT:
+		ctl->value = s->bandfilt;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		ctl->value = s->auto_brt;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		ctl->value = s->auto_exp;
+		break;
+	case OVCAMCHIP_CID_BACKLIGHT:
+		ctl->value = s->backlight;
+		break;
+	case OVCAMCHIP_CID_MIRROR:
+		ctl->value = s->mirror;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, ctl->value, rc);
+	return rc;
+}
+
+static int ov6x20_mode_init(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	/******** QCIF-specific regs ********/
+
+	ov_write(c, 0x14, win->quarter?0x24:0x04);
+
+	/******** Palette-specific regs ********/
+
+	/* OV518 needs 8 bit multiplexed in color mode, and 16 bit in B&W */
+	if (c->adapter->id == (I2C_ALGO_SMBUS | I2C_HW_SMBUS_OV518)) {
+		if (win->format == VIDEO_PALETTE_GREY)
+			ov_write_mask(c, 0x13, 0x00, 0x20);
+		else
+			ov_write_mask(c, 0x13, 0x20, 0x20);
+	} else {
+		if (win->format == VIDEO_PALETTE_GREY)
+			ov_write_mask(c, 0x13, 0x20, 0x20);
+		else
+			ov_write_mask(c, 0x13, 0x00, 0x20);
+	}
+
+	/******** Clock programming ********/
+
+	/* The OV6620 needs special handling. This prevents the
+	 * severe banding that normally occurs */
+
+	/* Clock down */
+	ov_write(c, 0x2a, 0x04);
+
+	ov_write(c, 0x11, win->clockdiv);
+
+	ov_write(c, 0x2a, 0x84);
+	/* This next setting is critical. It seems to improve
+	 * the gain or the contrast. The "reserved" bits seem
+	 * to have some effect in this case. */
+	ov_write(c, 0x2d, 0x85); /* FIXME: This messes up banding filter */
+
+	return 0;
+}
+
+static int ov6x20_set_window(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	int ret, hwscale, vwscale;
+
+	ret = ov6x20_mode_init(c, win);
+	if (ret < 0)
+		return ret;
+
+	if (win->quarter) {
+		hwscale = 0;
+		vwscale = 0;
+	} else {
+		hwscale = 1;
+		vwscale = 1;	/* The datasheet says 0; it's wrong */
+	}
+
+	ov_write(c, 0x17, HWSBASE + (win->x >> hwscale));
+	ov_write(c, 0x18, HWEBASE + ((win->x + win->width) >> hwscale));
+	ov_write(c, 0x19, VWSBASE + (win->y >> vwscale));
+	ov_write(c, 0x1a, VWEBASE + ((win->y + win->height) >> vwscale));
+
+	return 0;
+}
+
+static int ov6x20_command(struct i2c_client *c, unsigned int cmd, void *arg)
+{
+	switch (cmd) {
+	case OVCAMCHIP_CMD_S_CTRL:
+		return ov6x20_set_control(c, arg);
+	case OVCAMCHIP_CMD_G_CTRL:
+		return ov6x20_get_control(c, arg);
+	case OVCAMCHIP_CMD_S_MODE:
+		return ov6x20_set_window(c, arg);
+	default:
+		DDEBUG(2, &c->dev, "command not supported: %d", cmd);
+		return -ENOIOCTLCMD;
+	}
+}
+
+struct ovcamchip_ops ov6x20_ops = {
+	.init    =	ov6x20_init,
+	.free    =	ov6x20_free,
+	.command =	ov6x20_command,
+};
--- diff/drivers/media/video/ovcamchip/ov6x30.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/media/video/ovcamchip/ov6x30.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,374 @@
+/* OmniVision OV6630/OV6130 Camera Chip Support Code
+ *
+ * Copyright (c) 1999-2004 Mark McClelland <mark@alpha.dyndns.org>
+ * http://alpha.dyndns.org/ov511/
+ *
+ * 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. NO WARRANTY OF ANY KIND is expressed or implied.
+ */
+
+#define DEBUG
+
+#include <linux/slab.h>
+#include "ovcamchip_priv.h"
+
+/* Registers */
+#define REG_GAIN		0x00	/* gain [5:0] */
+#define REG_BLUE		0x01	/* blue gain */
+#define REG_RED			0x02	/* red gain */
+#define REG_SAT			0x03	/* saturation [7:3] */
+#define REG_CNT			0x05	/* Y contrast [3:0] */
+#define REG_BRT			0x06	/* Y brightness */
+#define REG_SHARP		0x07	/* sharpness */
+#define REG_WB_BLUE		0x0C	/* WB blue ratio [5:0] */
+#define REG_WB_RED		0x0D	/* WB red ratio [5:0] */
+#define REG_EXP			0x10	/* exposure */
+
+/* Window parameters */
+#define HWSBASE 0x38
+#define HWEBASE 0x3A
+#define VWSBASE 0x05
+#define VWEBASE 0x06
+
+struct ov6x30 {
+	int auto_brt;
+	int auto_exp;
+	int backlight;
+	int bandfilt;
+	int mirror;
+};
+
+static struct ovcamchip_regvals regvals_init_6x30[] = {
+	{ 0x12, 0x80 }, /* reset */
+	{ 0x00, 0x1f }, /* Gain */
+	{ 0x01, 0x99 }, /* Blue gain */
+	{ 0x02, 0x7c }, /* Red gain */
+	{ 0x03, 0xc0 }, /* Saturation */
+	{ 0x05, 0x0a }, /* Contrast */
+	{ 0x06, 0x95 }, /* Brightness */
+	{ 0x07, 0x2d }, /* Sharpness */
+	{ 0x0c, 0x20 },
+	{ 0x0d, 0x20 },
+	{ 0x0e, 0x20 },
+	{ 0x0f, 0x05 },
+	{ 0x10, 0x9a }, /* "exposure check" */
+	{ 0x11, 0x00 }, /* Pixel clock = fastest */
+	{ 0x12, 0x24 }, /* Enable AGC and AWB */
+	{ 0x13, 0x21 },
+	{ 0x14, 0x80 },
+	{ 0x15, 0x01 },
+	{ 0x16, 0x03 },
+	{ 0x17, 0x38 },
+	{ 0x18, 0xea },
+	{ 0x19, 0x04 },
+	{ 0x1a, 0x93 },
+	{ 0x1b, 0x00 },
+	{ 0x1e, 0xc4 },
+	{ 0x1f, 0x04 },
+	{ 0x20, 0x20 },
+	{ 0x21, 0x10 },
+	{ 0x22, 0x88 },
+	{ 0x23, 0xc0 }, /* Crystal circuit power level */
+	{ 0x25, 0x9a }, /* Increase AEC black pixel ratio */
+	{ 0x26, 0xb2 }, /* BLC enable */
+	{ 0x27, 0xa2 },
+	{ 0x28, 0x00 },
+	{ 0x29, 0x00 },
+	{ 0x2a, 0x84 }, /* (keep) */
+	{ 0x2b, 0xa8 }, /* (keep) */
+	{ 0x2c, 0xa0 },
+	{ 0x2d, 0x95 },	/* Enable auto-brightness */
+	{ 0x2e, 0x88 },
+	{ 0x33, 0x26 },
+	{ 0x34, 0x03 },
+	{ 0x36, 0x8f },
+	{ 0x37, 0x80 },
+	{ 0x38, 0x83 },
+	{ 0x39, 0x80 },
+	{ 0x3a, 0x0f },
+	{ 0x3b, 0x3c },
+	{ 0x3c, 0x1a },
+	{ 0x3d, 0x80 },
+	{ 0x3e, 0x80 },
+	{ 0x3f, 0x0e },
+	{ 0x40, 0x00 }, /* White bal */
+	{ 0x41, 0x00 }, /* White bal */
+	{ 0x42, 0x80 },
+	{ 0x43, 0x3f }, /* White bal */
+	{ 0x44, 0x80 },
+	{ 0x45, 0x20 },
+	{ 0x46, 0x20 },
+	{ 0x47, 0x80 },
+	{ 0x48, 0x7f },
+	{ 0x49, 0x00 },
+	{ 0x4a, 0x00 },
+	{ 0x4b, 0x80 },
+	{ 0x4c, 0xd0 },
+	{ 0x4d, 0x10 }, /* U = 0.563u, V = 0.714v */
+	{ 0x4e, 0x40 },
+	{ 0x4f, 0x07 }, /* UV average mode, color killer: strongest */
+	{ 0x50, 0xff },
+	{ 0x54, 0x23 }, /* Max AGC gain: 18dB */
+	{ 0x55, 0xff },
+	{ 0x56, 0x12 },
+	{ 0x57, 0x81 }, /* (default) */
+	{ 0x58, 0x75 },
+	{ 0x59, 0x01 }, /* AGC dark current compensation: +1 */
+	{ 0x5a, 0x2c },
+	{ 0x5b, 0x0f }, /* AWB chrominance levels */
+	{ 0x5c, 0x10 },
+	{ 0x3d, 0x80 },
+	{ 0x27, 0xa6 },
+	/* Toggle AWB off and on */
+	{ 0x12, 0x20 },
+	{ 0x12, 0x24 },
+
+	{ 0xff, 0xff },	/* END MARKER */
+};
+
+/* This initializes the OV6x30 camera chip and relevant variables. */
+static int ov6x30_init(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov6x30 *s;
+	int rc;
+
+	DDEBUG(4, &c->dev, "entered");
+
+	rc = ov_write_regvals(c, regvals_init_6x30);
+	if (rc < 0)
+		return rc;
+
+	ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL);
+	if (!s)
+		return -ENOMEM;
+	memset(s, 0, sizeof *s);
+
+	s->auto_brt = 1;
+	s->auto_exp = 1;
+
+	return rc;
+}
+
+static int ov6x30_free(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+
+	kfree(ov->spriv);
+	return 0;
+}
+
+static int ov6x30_set_control(struct i2c_client *c,
+			      struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov6x30 *s = ov->spriv;
+	int rc;
+	int v = ctl->value;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_CONT:
+		rc = ov_write_mask(c, REG_CNT, v >> 12, 0x0f);
+		break;
+	case OVCAMCHIP_CID_BRIGHT:
+		rc = ov_write(c, REG_BRT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_write(c, REG_SAT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_HUE:
+		rc = ov_write(c, REG_RED, 0xFF - (v >> 8));
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write(c, REG_BLUE, v >> 8);
+		break;
+	case OVCAMCHIP_CID_EXP:
+		rc = ov_write(c, REG_EXP, v);
+		break;
+	case OVCAMCHIP_CID_FREQ:
+	{
+		int sixty = (v == 60);
+
+		rc = ov_write(c, 0x2b, sixty?0xa8:0x28);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write(c, 0x2a, sixty?0x84:0xa4);
+		break;
+	}
+	case OVCAMCHIP_CID_BANDFILT:
+		rc = ov_write_mask(c, 0x2d, v?0x04:0x00, 0x04);
+		s->bandfilt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		rc = ov_write_mask(c, 0x2d, v?0x10:0x00, 0x10);
+		s->auto_brt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		rc = ov_write_mask(c, 0x28, v?0x00:0x10, 0x10);
+		s->auto_exp = v;
+		break;
+	case OVCAMCHIP_CID_BACKLIGHT:
+	{
+		rc = ov_write_mask(c, 0x4e, v?0x80:0x60, 0xe0);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x29, v?0x08:0x00, 0x08);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x28, v?0x02:0x00, 0x02);
+		s->backlight = v;
+		break;
+	}
+	case OVCAMCHIP_CID_MIRROR:
+		rc = ov_write_mask(c, 0x12, v?0x40:0x00, 0x40);
+		s->mirror = v;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+out:
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, v, rc);
+	return rc;
+}
+
+static int ov6x30_get_control(struct i2c_client *c,
+			      struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov6x30 *s = ov->spriv;
+	int rc = 0;
+	unsigned char val = 0;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_CONT:
+		rc = ov_read(c, REG_CNT, &val);
+		ctl->value = (val & 0x0f) << 12;
+		break;
+	case OVCAMCHIP_CID_BRIGHT:
+		rc = ov_read(c, REG_BRT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_read(c, REG_SAT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_HUE:
+		rc = ov_read(c, REG_BLUE, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_EXP:
+		rc = ov_read(c, REG_EXP, &val);
+		ctl->value = val;
+		break;
+	case OVCAMCHIP_CID_BANDFILT:
+		ctl->value = s->bandfilt;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		ctl->value = s->auto_brt;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		ctl->value = s->auto_exp;
+		break;
+	case OVCAMCHIP_CID_BACKLIGHT:
+		ctl->value = s->backlight;
+		break;
+	case OVCAMCHIP_CID_MIRROR:
+		ctl->value = s->mirror;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, ctl->value, rc);
+	return rc;
+}
+
+static int ov6x30_mode_init(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	/******** QCIF-specific regs ********/
+
+	ov_write_mask(c, 0x14, win->quarter?0x20:0x00, 0x20);
+
+	/******** Palette-specific regs ********/
+
+	if (win->format == VIDEO_PALETTE_GREY) {
+		if (c->adapter->id == (I2C_ALGO_SMBUS | I2C_HW_SMBUS_OV518)) {
+			/* Do nothing - we're already in 8-bit mode */
+		} else {
+			ov_write_mask(c, 0x13, 0x20, 0x20);
+		}
+	} else {
+		/* The OV518 needs special treatment. Although both the OV518
+		 * and the OV6630 support a 16-bit video bus, only the 8 bit Y
+		 * bus is actually used. The UV bus is tied to ground.
+		 * Therefore, the OV6630 needs to be in 8-bit multiplexed
+		 * output mode */
+
+		if (c->adapter->id == (I2C_ALGO_SMBUS | I2C_HW_SMBUS_OV518)) {
+			/* Do nothing - we want to stay in 8-bit mode */
+			/* Warning: Messing with reg 0x13 breaks OV518 color */
+		} else {
+			ov_write_mask(c, 0x13, 0x00, 0x20);
+		}
+	}
+
+	/******** Clock programming ********/
+
+	ov_write(c, 0x11, win->clockdiv);
+
+	return 0;
+}
+
+static int ov6x30_set_window(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	int ret, hwscale, vwscale;
+
+	ret = ov6x30_mode_init(c, win);
+	if (ret < 0)
+		return ret;
+
+	if (win->quarter) {
+		hwscale = 0;
+		vwscale = 0;
+	} else {
+		hwscale = 1;
+		vwscale = 1;	/* The datasheet says 0; it's wrong */
+	}
+
+	ov_write(c, 0x17, HWSBASE + (win->x >> hwscale));
+	ov_write(c, 0x18, HWEBASE + ((win->x + win->width) >> hwscale));
+	ov_write(c, 0x19, VWSBASE + (win->y >> vwscale));
+	ov_write(c, 0x1a, VWEBASE + ((win->y + win->height) >> vwscale));
+
+	return 0;
+}
+
+static int ov6x30_command(struct i2c_client *c, unsigned int cmd, void *arg)
+{
+	switch (cmd) {
+	case OVCAMCHIP_CMD_S_CTRL:
+		return ov6x30_set_control(c, arg);
+	case OVCAMCHIP_CMD_G_CTRL:
+		return ov6x30_get_control(c, arg);
+	case OVCAMCHIP_CMD_S_MODE:
+		return ov6x30_set_window(c, arg);
+	default:
+		DDEBUG(2, &c->dev, "command not supported: %d", cmd);
+		return -ENOIOCTLCMD;
+	}
+}
+
+struct ovcamchip_ops ov6x30_ops = {
+	.init    =	ov6x30_init,
+	.free    =	ov6x30_free,
+	.command =	ov6x30_command,
+};
--- diff/drivers/media/video/ovcamchip/ov76be.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/media/video/ovcamchip/ov76be.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,303 @@
+/* OmniVision OV76BE Camera Chip Support Code
+ *
+ * Copyright (c) 1999-2004 Mark McClelland <mark@alpha.dyndns.org>
+ * http://alpha.dyndns.org/ov511/
+ *
+ * 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. NO WARRANTY OF ANY KIND is expressed or implied.
+ */
+
+#define DEBUG
+
+#include <linux/slab.h>
+#include "ovcamchip_priv.h"
+
+/* OV7610 registers: Since the OV76BE is undocumented, we'll settle for these
+ * for now. */
+#define REG_GAIN		0x00	/* gain [5:0] */
+#define REG_BLUE		0x01	/* blue channel balance */
+#define REG_RED			0x02	/* red channel balance */
+#define REG_SAT			0x03	/* saturation */
+#define REG_CNT			0x05	/* Y contrast */
+#define REG_BRT			0x06	/* Y brightness */
+#define REG_BLUE_BIAS		0x0C	/* blue channel bias [5:0] */
+#define REG_RED_BIAS		0x0D	/* red channel bias [5:0] */
+#define REG_GAMMA_COEFF		0x0E	/* gamma settings */
+#define REG_WB_RANGE		0x0F	/* AEC/ALC/S-AWB settings */
+#define REG_EXP			0x10	/* manual exposure setting */
+#define REG_CLOCK		0x11	/* polarity/clock prescaler */
+#define REG_FIELD_DIVIDE	0x16	/* field interval/mode settings */
+#define REG_HWIN_START		0x17	/* horizontal window start */
+#define REG_HWIN_END		0x18	/* horizontal window end */
+#define REG_VWIN_START		0x19	/* vertical window start */
+#define REG_VWIN_END		0x1A	/* vertical window end */
+#define REG_PIXEL_SHIFT   	0x1B	/* pixel shift */
+#define REG_YOFFSET		0x21	/* Y channel offset */
+#define REG_UOFFSET		0x22	/* U channel offset */
+#define REG_ECW			0x24	/* exposure white level for AEC */
+#define REG_ECB			0x25	/* exposure black level for AEC */
+#define REG_FRAMERATE_H		0x2A	/* frame rate MSB + misc */
+#define REG_FRAMERATE_L		0x2B	/* frame rate LSB */
+#define REG_ALC			0x2C	/* Auto Level Control settings */
+#define REG_VOFFSET		0x2E	/* V channel offset adjustment */
+#define REG_ARRAY_BIAS		0x2F	/* array bias -- don't change */
+#define REG_YGAMMA		0x33	/* misc gamma settings [7:6] */
+#define REG_BIAS_ADJUST		0x34	/* misc bias settings */
+
+/* Window parameters */
+#define HWSBASE 0x38
+#define HWEBASE 0x3a
+#define VWSBASE 0x05
+#define VWEBASE 0x05
+
+struct ov76be {
+	int auto_brt;
+	int auto_exp;
+	int bandfilt;
+	int mirror;
+};
+
+/* NOTE: These are the same as the 7x10 settings, but should eventually be
+ * optimized for the OV76BE */
+static struct ovcamchip_regvals regvals_init_76be[] = {
+	{ 0x10, 0xff },
+	{ 0x16, 0x03 },
+	{ 0x28, 0x24 },
+	{ 0x2b, 0xac },
+	{ 0x12, 0x00 },
+	{ 0x38, 0x81 },
+	{ 0x28, 0x24 },	/* 0c */
+	{ 0x0f, 0x85 },	/* lg's setting */
+	{ 0x15, 0x01 },
+	{ 0x20, 0x1c },
+	{ 0x23, 0x2a },
+	{ 0x24, 0x10 },
+	{ 0x25, 0x8a },
+	{ 0x26, 0xa2 },
+	{ 0x27, 0xc2 },
+	{ 0x2a, 0x04 },
+	{ 0x2c, 0xfe },
+	{ 0x2d, 0x93 },
+	{ 0x30, 0x71 },
+	{ 0x31, 0x60 },
+	{ 0x32, 0x26 },
+	{ 0x33, 0x20 },
+	{ 0x34, 0x48 },
+	{ 0x12, 0x24 },
+	{ 0x11, 0x01 },
+	{ 0x0c, 0x24 },
+	{ 0x0d, 0x24 },
+	{ 0xff, 0xff },	/* END MARKER */
+};
+
+/* This initializes the OV76be camera chip and relevant variables. */
+static int ov76be_init(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov76be *s;
+	int rc;
+
+	DDEBUG(4, &c->dev, "entered");
+
+	rc = ov_write_regvals(c, regvals_init_76be);
+	if (rc < 0)
+		return rc;
+
+	ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL);
+	if (!s)
+		return -ENOMEM;
+	memset(s, 0, sizeof *s);
+
+	s->auto_brt = 1;
+	s->auto_exp = 1;
+
+	return rc;
+}
+
+static int ov76be_free(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+
+	kfree(ov->spriv);
+	return 0;
+}
+
+static int ov76be_set_control(struct i2c_client *c,
+			      struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov76be *s = ov->spriv;
+	int rc;
+	int v = ctl->value;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_BRIGHT:
+		rc = ov_write(c, REG_BRT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_write(c, REG_SAT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_EXP:
+		rc = ov_write(c, REG_EXP, v);
+		break;
+	case OVCAMCHIP_CID_FREQ:
+	{
+		int sixty = (v == 60);
+
+		rc = ov_write_mask(c, 0x2a, sixty?0x00:0x80, 0x80);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write(c, 0x2b, sixty?0x00:0xac);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x76, 0x01, 0x01);
+		break;
+	}
+	case OVCAMCHIP_CID_BANDFILT:
+		rc = ov_write_mask(c, 0x2d, v?0x04:0x00, 0x04);
+		s->bandfilt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		rc = ov_write_mask(c, 0x2d, v?0x10:0x00, 0x10);
+		s->auto_brt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		rc = ov_write_mask(c, 0x13, v?0x01:0x00, 0x01);
+		s->auto_exp = v;
+		break;
+	case OVCAMCHIP_CID_MIRROR:
+		rc = ov_write_mask(c, 0x12, v?0x40:0x00, 0x40);
+		s->mirror = v;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+out:
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, v, rc);
+	return rc;
+}
+
+static int ov76be_get_control(struct i2c_client *c,
+			      struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov76be *s = ov->spriv;
+	int rc = 0;
+	unsigned char val = 0;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_BRIGHT:
+		rc = ov_read(c, REG_BRT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_read(c, REG_SAT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_EXP:
+		rc = ov_read(c, REG_EXP, &val);
+		ctl->value = val;
+		break;
+	case OVCAMCHIP_CID_BANDFILT:
+		ctl->value = s->bandfilt;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		ctl->value = s->auto_brt;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		ctl->value = s->auto_exp;
+		break;
+	case OVCAMCHIP_CID_MIRROR:
+		ctl->value = s->mirror;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, ctl->value, rc);
+	return rc;
+}
+
+static int ov76be_mode_init(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	int qvga = win->quarter;
+
+	/******** QVGA-specific regs ********/
+
+	ov_write(c, 0x14, qvga?0xa4:0x84);
+
+	/******** Palette-specific regs ********/
+
+	if (win->format == VIDEO_PALETTE_GREY) {
+		ov_write_mask(c, 0x0e, 0x40, 0x40);
+		ov_write_mask(c, 0x13, 0x20, 0x20);
+	} else {
+		ov_write_mask(c, 0x0e, 0x00, 0x40);
+		ov_write_mask(c, 0x13, 0x00, 0x20);
+	}
+
+	/******** Clock programming ********/
+
+	ov_write(c, 0x11, win->clockdiv);
+
+	/******** Resolution-specific ********/
+
+	if (win->width == 640 && win->height == 480)
+		ov_write(c, 0x35, 0x9e);
+	else
+		ov_write(c, 0x35, 0x1e);
+
+	return 0;
+}
+
+static int ov76be_set_window(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	int ret, hwscale, vwscale;
+
+	ret = ov76be_mode_init(c, win);
+	if (ret < 0)
+		return ret;
+
+	if (win->quarter) {
+		hwscale = 1;
+		vwscale = 0;
+	} else {
+		hwscale = 2;
+		vwscale = 1;
+	}
+
+	ov_write(c, 0x17, HWSBASE + (win->x >> hwscale));
+	ov_write(c, 0x18, HWEBASE + ((win->x + win->width) >> hwscale));
+	ov_write(c, 0x19, VWSBASE + (win->y >> vwscale));
+	ov_write(c, 0x1a, VWEBASE + ((win->y + win->height) >> vwscale));
+
+	return 0;
+}
+
+static int ov76be_command(struct i2c_client *c, unsigned int cmd, void *arg)
+{
+	switch (cmd) {
+	case OVCAMCHIP_CMD_S_CTRL:
+		return ov76be_set_control(c, arg);
+	case OVCAMCHIP_CMD_G_CTRL:
+		return ov76be_get_control(c, arg);
+	case OVCAMCHIP_CMD_S_MODE:
+		return ov76be_set_window(c, arg);
+	default:
+		DDEBUG(2, &c->dev, "command not supported: %d", cmd);
+		return -ENOIOCTLCMD;
+	}
+}
+
+struct ovcamchip_ops ov76be_ops = {
+	.init    =	ov76be_init,
+	.free    =	ov76be_free,
+	.command =	ov76be_command,
+};
--- diff/drivers/media/video/ovcamchip/ov7x10.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/media/video/ovcamchip/ov7x10.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,335 @@
+/* OmniVision OV7610/OV7110 Camera Chip Support Code
+ *
+ * Copyright (c) 1999-2004 Mark McClelland <mark@alpha.dyndns.org>
+ * http://alpha.dyndns.org/ov511/
+ *
+ * Color fixes by by Orion Sky Lawlor <olawlor@acm.org> (2/26/2000)
+ *
+ * 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. NO WARRANTY OF ANY KIND is expressed or implied.
+ */
+
+#define DEBUG
+
+#include <linux/slab.h>
+#include "ovcamchip_priv.h"
+
+/* Registers */
+#define REG_GAIN		0x00	/* gain [5:0] */
+#define REG_BLUE		0x01	/* blue channel balance */
+#define REG_RED			0x02	/* red channel balance */
+#define REG_SAT			0x03	/* saturation */
+#define REG_CNT			0x05	/* Y contrast */
+#define REG_BRT			0x06	/* Y brightness */
+#define REG_BLUE_BIAS		0x0C	/* blue channel bias [5:0] */
+#define REG_RED_BIAS		0x0D	/* red channel bias [5:0] */
+#define REG_GAMMA_COEFF		0x0E	/* gamma settings */
+#define REG_WB_RANGE		0x0F	/* AEC/ALC/S-AWB settings */
+#define REG_EXP			0x10	/* manual exposure setting */
+#define REG_CLOCK		0x11	/* polarity/clock prescaler */
+#define REG_FIELD_DIVIDE	0x16	/* field interval/mode settings */
+#define REG_HWIN_START		0x17	/* horizontal window start */
+#define REG_HWIN_END		0x18	/* horizontal window end */
+#define REG_VWIN_START		0x19	/* vertical window start */
+#define REG_VWIN_END		0x1A	/* vertical window end */
+#define REG_PIXEL_SHIFT   	0x1B	/* pixel shift */
+#define REG_YOFFSET		0x21	/* Y channel offset */
+#define REG_UOFFSET		0x22	/* U channel offset */
+#define REG_ECW			0x24	/* exposure white level for AEC */
+#define REG_ECB			0x25	/* exposure black level for AEC */
+#define REG_FRAMERATE_H		0x2A	/* frame rate MSB + misc */
+#define REG_FRAMERATE_L		0x2B	/* frame rate LSB */
+#define REG_ALC			0x2C	/* Auto Level Control settings */
+#define REG_VOFFSET		0x2E	/* V channel offset adjustment */
+#define REG_ARRAY_BIAS		0x2F	/* array bias -- don't change */
+#define REG_YGAMMA		0x33	/* misc gamma settings [7:6] */
+#define REG_BIAS_ADJUST		0x34	/* misc bias settings */
+
+/* Window parameters */
+#define HWSBASE 0x38
+#define HWEBASE 0x3a
+#define VWSBASE 0x05
+#define VWEBASE 0x05
+
+struct ov7x10 {
+	int auto_brt;
+	int auto_exp;
+	int bandfilt;
+	int mirror;
+};
+
+/* Lawrence Glaister <lg@jfm.bc.ca> reports:
+ *
+ * Register 0x0f in the 7610 has the following effects:
+ *
+ * 0x85 (AEC method 1): Best overall, good contrast range
+ * 0x45 (AEC method 2): Very overexposed
+ * 0xa5 (spec sheet default): Ok, but the black level is
+ *	shifted resulting in loss of contrast
+ * 0x05 (old driver setting): very overexposed, too much
+ *	contrast
+ */
+static struct ovcamchip_regvals regvals_init_7x10[] = {
+	{ 0x10, 0xff },
+	{ 0x16, 0x03 },
+	{ 0x28, 0x24 },
+	{ 0x2b, 0xac },
+	{ 0x12, 0x00 },
+	{ 0x38, 0x81 },
+	{ 0x28, 0x24 },	/* 0c */
+	{ 0x0f, 0x85 },	/* lg's setting */
+	{ 0x15, 0x01 },
+	{ 0x20, 0x1c },
+	{ 0x23, 0x2a },
+	{ 0x24, 0x10 },
+	{ 0x25, 0x8a },
+	{ 0x26, 0xa2 },
+	{ 0x27, 0xc2 },
+	{ 0x2a, 0x04 },
+	{ 0x2c, 0xfe },
+	{ 0x2d, 0x93 },
+	{ 0x30, 0x71 },
+	{ 0x31, 0x60 },
+	{ 0x32, 0x26 },
+	{ 0x33, 0x20 },
+	{ 0x34, 0x48 },
+	{ 0x12, 0x24 },
+	{ 0x11, 0x01 },
+	{ 0x0c, 0x24 },
+	{ 0x0d, 0x24 },
+	{ 0xff, 0xff },	/* END MARKER */
+};
+
+/* This initializes the OV7x10 camera chip and relevant variables. */
+static int ov7x10_init(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov7x10 *s;
+	int rc;
+
+	DDEBUG(4, &c->dev, "entered");
+
+	rc = ov_write_regvals(c, regvals_init_7x10);
+	if (rc < 0)
+		return rc;
+
+	ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL);
+	if (!s)
+		return -ENOMEM;
+	memset(s, 0, sizeof *s);
+
+	s->auto_brt = 1;
+	s->auto_exp = 1;
+
+	return rc;
+}
+
+static int ov7x10_free(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+
+	kfree(ov->spriv);
+	return 0;
+}
+
+static int ov7x10_set_control(struct i2c_client *c,
+			      struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov7x10 *s = ov->spriv;
+	int rc;
+	int v = ctl->value;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_CONT:
+		rc = ov_write(c, REG_CNT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_BRIGHT:
+		rc = ov_write(c, REG_BRT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_write(c, REG_SAT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_HUE:
+		rc = ov_write(c, REG_RED, 0xFF - (v >> 8));
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write(c, REG_BLUE, v >> 8);
+		break;
+	case OVCAMCHIP_CID_EXP:
+		rc = ov_write(c, REG_EXP, v);
+		break;
+	case OVCAMCHIP_CID_FREQ:
+	{
+		int sixty = (v == 60);
+
+		rc = ov_write_mask(c, 0x2a, sixty?0x00:0x80, 0x80);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write(c, 0x2b, sixty?0x00:0xac);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x13, 0x10, 0x10);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x13, 0x00, 0x10);
+		break;
+	}
+	case OVCAMCHIP_CID_BANDFILT:
+		rc = ov_write_mask(c, 0x2d, v?0x04:0x00, 0x04);
+		s->bandfilt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		rc = ov_write_mask(c, 0x2d, v?0x10:0x00, 0x10);
+		s->auto_brt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		rc = ov_write_mask(c, 0x29, v?0x00:0x80, 0x80);
+		s->auto_exp = v;
+		break;
+	case OVCAMCHIP_CID_MIRROR:
+		rc = ov_write_mask(c, 0x12, v?0x40:0x00, 0x40);
+		s->mirror = v;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+out:
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, v, rc);
+	return rc;
+}
+
+static int ov7x10_get_control(struct i2c_client *c,
+			      struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov7x10 *s = ov->spriv;
+	int rc = 0;
+	unsigned char val = 0;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_CONT:
+		rc = ov_read(c, REG_CNT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_BRIGHT:
+		rc = ov_read(c, REG_BRT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_read(c, REG_SAT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_HUE:
+		rc = ov_read(c, REG_BLUE, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_EXP:
+		rc = ov_read(c, REG_EXP, &val);
+		ctl->value = val;
+		break;
+	case OVCAMCHIP_CID_BANDFILT:
+		ctl->value = s->bandfilt;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		ctl->value = s->auto_brt;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		ctl->value = s->auto_exp;
+		break;
+	case OVCAMCHIP_CID_MIRROR:
+		ctl->value = s->mirror;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, ctl->value, rc);
+	return rc;
+}
+
+static int ov7x10_mode_init(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	int qvga = win->quarter;
+
+	/******** QVGA-specific regs ********/
+
+	ov_write(c, 0x14, qvga?0x24:0x04);
+
+	/******** Palette-specific regs ********/
+
+	if (win->format == VIDEO_PALETTE_GREY) {
+		ov_write_mask(c, 0x0e, 0x40, 0x40);
+		ov_write_mask(c, 0x13, 0x20, 0x20);
+	} else {
+		ov_write_mask(c, 0x0e, 0x00, 0x40);
+		ov_write_mask(c, 0x13, 0x00, 0x20);
+	}
+
+	/******** Clock programming ********/
+
+	ov_write(c, 0x11, win->clockdiv);
+
+	/******** Resolution-specific ********/
+
+	if (win->width == 640 && win->height == 480)
+		ov_write(c, 0x35, 0x9e);
+	else
+		ov_write(c, 0x35, 0x1e);
+
+	return 0;
+}
+
+static int ov7x10_set_window(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	int ret, hwscale, vwscale;
+
+	ret = ov7x10_mode_init(c, win);
+	if (ret < 0)
+		return ret;
+
+	if (win->quarter) {
+		hwscale = 1;
+		vwscale = 0;
+	} else {
+		hwscale = 2;
+		vwscale = 1;
+	}
+
+	ov_write(c, 0x17, HWSBASE + (win->x >> hwscale));
+	ov_write(c, 0x18, HWEBASE + ((win->x + win->width) >> hwscale));
+	ov_write(c, 0x19, VWSBASE + (win->y >> vwscale));
+	ov_write(c, 0x1a, VWEBASE + ((win->y + win->height) >> vwscale));
+
+	return 0;
+}
+
+static int ov7x10_command(struct i2c_client *c, unsigned int cmd, void *arg)
+{
+	switch (cmd) {
+	case OVCAMCHIP_CMD_S_CTRL:
+		return ov7x10_set_control(c, arg);
+	case OVCAMCHIP_CMD_G_CTRL:
+		return ov7x10_get_control(c, arg);
+	case OVCAMCHIP_CMD_S_MODE:
+		return ov7x10_set_window(c, arg);
+	default:
+		DDEBUG(2, &c->dev, "command not supported: %d", cmd);
+		return -ENOIOCTLCMD;
+	}
+}
+
+struct ovcamchip_ops ov7x10_ops = {
+	.init    =	ov7x10_init,
+	.free    =	ov7x10_free,
+	.command =	ov7x10_command,
+};
--- diff/drivers/media/video/ovcamchip/ov7x20.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/media/video/ovcamchip/ov7x20.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,455 @@
+/* OmniVision OV7620/OV7120 Camera Chip Support Code
+ *
+ * Copyright (c) 1999-2004 Mark McClelland <mark@alpha.dyndns.org>
+ * http://alpha.dyndns.org/ov511/
+ *
+ * OV7620 fixes by Charl P. Botha <cpbotha@ieee.org>
+ *
+ * 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. NO WARRANTY OF ANY KIND is expressed or implied.
+ */
+
+#define DEBUG
+
+#include <linux/slab.h>
+#include "ovcamchip_priv.h"
+
+/* Registers */
+#define REG_GAIN		0x00	/* gain [5:0] */
+#define REG_BLUE		0x01	/* blue gain */
+#define REG_RED			0x02	/* red gain */
+#define REG_SAT			0x03	/* saturation */
+#define REG_BRT			0x06	/* Y brightness */
+#define REG_SHARP		0x07	/* analog sharpness */
+#define REG_BLUE_BIAS		0x0C	/* WB blue ratio [5:0] */
+#define REG_RED_BIAS		0x0D	/* WB red ratio [5:0] */
+#define REG_EXP			0x10	/* exposure */
+
+/* Default control settings. Values are in terms of V4L2 controls. */
+#define OV7120_DFL_BRIGHT     0x60
+#define OV7620_DFL_BRIGHT     0x60
+#define OV7120_DFL_SAT        0xb0
+#define OV7620_DFL_SAT        0xc0
+#define DFL_AUTO_EXP             1
+#define DFL_AUTO_GAIN            1
+#define OV7120_DFL_GAIN       0x00
+#define OV7620_DFL_GAIN       0x00
+/* NOTE: Since autoexposure is the default, these aren't programmed into the
+ * OV7x20 chip. They are just here because V4L2 expects a default */
+#define OV7120_DFL_EXP        0x7f
+#define OV7620_DFL_EXP        0x7f
+
+/* Window parameters */
+#define HWSBASE 0x2F	/* From 7620.SET (spec is wrong) */
+#define HWEBASE 0x2F
+#define VWSBASE 0x05
+#define VWEBASE 0x05
+
+struct ov7x20 {
+	int auto_brt;
+	int auto_exp;
+	int auto_gain;
+	int backlight;
+	int bandfilt;
+	int mirror;
+};
+
+/* Contrast look-up table */
+static unsigned char ctab[] = {
+	0x01, 0x05, 0x09, 0x11, 0x15, 0x35, 0x37, 0x57,
+	0x5b, 0xa5, 0xa7, 0xc7, 0xc9, 0xcf, 0xef, 0xff
+};
+
+/* Settings for (Black & White) OV7120 camera chip */
+static struct ovcamchip_regvals regvals_init_7120[] = {
+	{ 0x12, 0x80 }, /* reset */
+	{ 0x13, 0x00 }, /* Autoadjust off */
+	{ 0x12, 0x20 }, /* Disable AWB */
+	{ 0x13, DFL_AUTO_GAIN?0x01:0x00 }, /* Autoadjust on (if desired) */
+	{ 0x00, OV7120_DFL_GAIN },
+	{ 0x01, 0x80 },
+	{ 0x02, 0x80 },
+	{ 0x03, OV7120_DFL_SAT },
+	{ 0x06, OV7120_DFL_BRIGHT },
+	{ 0x07, 0x00 },
+	{ 0x0c, 0x20 },
+	{ 0x0d, 0x20 },
+	{ 0x11, 0x01 },
+	{ 0x14, 0x84 },
+	{ 0x15, 0x01 },
+	{ 0x16, 0x03 },
+	{ 0x17, 0x2f },
+	{ 0x18, 0xcf },
+	{ 0x19, 0x06 },
+	{ 0x1a, 0xf5 },
+	{ 0x1b, 0x00 },
+	{ 0x20, 0x08 },
+	{ 0x21, 0x80 },
+	{ 0x22, 0x80 },
+	{ 0x23, 0x00 },
+	{ 0x26, 0xa0 },
+	{ 0x27, 0xfa },
+	{ 0x28, 0x20 }, /* DON'T set bit 6. It is for the OV7620 only */
+	{ 0x29, DFL_AUTO_EXP?0x00:0x80 },
+	{ 0x2a, 0x10 },
+	{ 0x2b, 0x00 },
+	{ 0x2c, 0x88 },
+	{ 0x2d, 0x95 },
+	{ 0x2e, 0x80 },
+	{ 0x2f, 0x44 },
+	{ 0x60, 0x20 },
+	{ 0x61, 0x02 },
+	{ 0x62, 0x5f },
+	{ 0x63, 0xd5 },
+	{ 0x64, 0x57 },
+	{ 0x65, 0x83 }, /* OV says "don't change this value" */
+	{ 0x66, 0x55 },
+	{ 0x67, 0x92 },
+	{ 0x68, 0xcf },
+	{ 0x69, 0x76 },
+	{ 0x6a, 0x22 },
+	{ 0x6b, 0xe2 },
+	{ 0x6c, 0x40 },
+	{ 0x6d, 0x48 },
+	{ 0x6e, 0x80 },
+	{ 0x6f, 0x0d },
+	{ 0x70, 0x89 },
+	{ 0x71, 0x00 },
+	{ 0x72, 0x14 },
+	{ 0x73, 0x54 },
+	{ 0x74, 0xa0 },
+	{ 0x75, 0x8e },
+	{ 0x76, 0x00 },
+	{ 0x77, 0xff },
+	{ 0x78, 0x80 },
+	{ 0x79, 0x80 },
+	{ 0x7a, 0x80 },
+	{ 0x7b, 0xe6 },
+	{ 0x7c, 0x00 },
+	{ 0x24, 0x3a },
+	{ 0x25, 0x60 },
+	{ 0xff, 0xff },	/* END MARKER */
+};
+
+/* Settings for (color) OV7620 camera chip */
+static struct ovcamchip_regvals regvals_init_7620[] = {
+	{ 0x12, 0x80 }, /* reset */
+	{ 0x00, OV7620_DFL_GAIN },
+	{ 0x01, 0x80 },
+	{ 0x02, 0x80 },
+	{ 0x03, OV7620_DFL_SAT },
+	{ 0x06, OV7620_DFL_BRIGHT },
+	{ 0x07, 0x00 },
+	{ 0x0c, 0x24 },
+	{ 0x0c, 0x24 },
+	{ 0x0d, 0x24 },
+	{ 0x11, 0x01 },
+	{ 0x12, 0x24 },
+	{ 0x13, DFL_AUTO_GAIN?0x01:0x00 },
+	{ 0x14, 0x84 },
+	{ 0x15, 0x01 },
+	{ 0x16, 0x03 },
+	{ 0x17, 0x2f },
+	{ 0x18, 0xcf },
+	{ 0x19, 0x06 },
+	{ 0x1a, 0xf5 },
+	{ 0x1b, 0x00 },
+	{ 0x20, 0x18 },
+	{ 0x21, 0x80 },
+	{ 0x22, 0x80 },
+	{ 0x23, 0x00 },
+	{ 0x26, 0xa2 },
+	{ 0x27, 0xea },
+	{ 0x28, 0x20 },
+	{ 0x29, DFL_AUTO_EXP?0x00:0x80 },
+	{ 0x2a, 0x10 },
+	{ 0x2b, 0x00 },
+	{ 0x2c, 0x88 },
+	{ 0x2d, 0x91 },
+	{ 0x2e, 0x80 },
+	{ 0x2f, 0x44 },
+	{ 0x60, 0x27 },
+	{ 0x61, 0x02 },
+	{ 0x62, 0x5f },
+	{ 0x63, 0xd5 },
+	{ 0x64, 0x57 },
+	{ 0x65, 0x83 },
+	{ 0x66, 0x55 },
+	{ 0x67, 0x92 },
+	{ 0x68, 0xcf },
+	{ 0x69, 0x76 },
+	{ 0x6a, 0x22 },
+	{ 0x6b, 0x00 },
+	{ 0x6c, 0x02 },
+	{ 0x6d, 0x44 },
+	{ 0x6e, 0x80 },
+	{ 0x6f, 0x1d },
+	{ 0x70, 0x8b },
+	{ 0x71, 0x00 },
+	{ 0x72, 0x14 },
+	{ 0x73, 0x54 },
+	{ 0x74, 0x00 },
+	{ 0x75, 0x8e },
+	{ 0x76, 0x00 },
+	{ 0x77, 0xff },
+	{ 0x78, 0x80 },
+	{ 0x79, 0x80 },
+	{ 0x7a, 0x80 },
+	{ 0x7b, 0xe2 },
+	{ 0x7c, 0x00 },
+	{ 0xff, 0xff },	/* END MARKER */
+};
+
+/* Returns index into the specified look-up table, with 'n' elements, for which
+ * the value is greater than or equal to "val". If a match isn't found, (n-1)
+ * is returned. The entries in the table must be in ascending order. */
+static inline int ov7x20_lut_find(unsigned char lut[], int n, unsigned char val)
+{
+	int i = 0;
+
+	while (lut[i] < val && i < n)
+		i++;
+
+	return i;
+}
+
+/* This initializes the OV7x20 camera chip and relevant variables. */
+static int ov7x20_init(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov7x20 *s;
+	int rc;
+
+	DDEBUG(4, &c->dev, "entered");
+
+	if (ov->mono)
+		rc = ov_write_regvals(c, regvals_init_7120);
+	else
+		rc = ov_write_regvals(c, regvals_init_7620);
+
+	if (rc < 0)
+		return rc;
+
+	ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL);
+	if (!s)
+		return -ENOMEM;
+	memset(s, 0, sizeof *s);
+
+	s->auto_brt = 1;
+	s->auto_exp = DFL_AUTO_EXP;
+	s->auto_gain = DFL_AUTO_GAIN;
+
+	return 0;
+}
+
+static int ov7x20_free(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+
+	kfree(ov->spriv);
+	return 0;
+}
+
+static int ov7x20_set_v4l1_control(struct i2c_client *c,
+				   struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov7x20 *s = ov->spriv;
+	int rc;
+	int v = ctl->value;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_CONT:
+	{
+		/* Use Y gamma control instead. Bit 0 enables it. */
+		rc = ov_write(c, 0x64, ctab[v >> 12]);
+		break;
+	}
+	case OVCAMCHIP_CID_BRIGHT:
+		/* 7620 doesn't like manual changes when in auto mode */
+		if (!s->auto_brt)
+			rc = ov_write(c, REG_BRT, v >> 8);
+		else
+			rc = 0;
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_write(c, REG_SAT, v >> 8);
+		break;
+	case OVCAMCHIP_CID_EXP:
+		if (!s->auto_exp)
+			rc = ov_write(c, REG_EXP, v);
+		else
+			rc = -EBUSY;
+		break;
+	case OVCAMCHIP_CID_FREQ:
+	{
+		int sixty = (v == 60);
+
+		rc = ov_write_mask(c, 0x2a, sixty?0x00:0x80, 0x80);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write(c, 0x2b, sixty?0x00:0xac);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x76, 0x01, 0x01);
+		break;
+	}
+	case OVCAMCHIP_CID_BANDFILT:
+		rc = ov_write_mask(c, 0x2d, v?0x04:0x00, 0x04);
+		s->bandfilt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		rc = ov_write_mask(c, 0x2d, v?0x10:0x00, 0x10);
+		s->auto_brt = v;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		rc = ov_write_mask(c, 0x13, v?0x01:0x00, 0x01);
+		s->auto_exp = v;
+		break;
+	case OVCAMCHIP_CID_BACKLIGHT:
+	{
+		rc = ov_write_mask(c, 0x68, v?0xe0:0xc0, 0xe0);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x29, v?0x08:0x00, 0x08);
+		if (rc < 0)
+			goto out;
+
+		rc = ov_write_mask(c, 0x28, v?0x02:0x00, 0x02);
+		s->backlight = v;
+		break;
+	}
+	case OVCAMCHIP_CID_MIRROR:
+		rc = ov_write_mask(c, 0x12, v?0x40:0x00, 0x40);
+		s->mirror = v;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+out:
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, v, rc);
+	return rc;
+}
+
+static int ov7x20_get_v4l1_control(struct i2c_client *c,
+				   struct ovcamchip_control *ctl)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	struct ov7x20 *s = ov->spriv;
+	int rc = 0;
+	unsigned char val = 0;
+
+	switch (ctl->id) {
+	case OVCAMCHIP_CID_CONT:
+		rc = ov_read(c, 0x64, &val);
+		ctl->value = ov7x20_lut_find(ctab, 16, val) << 12;
+		break;
+	case OVCAMCHIP_CID_BRIGHT:
+		rc = ov_read(c, REG_BRT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_SAT:
+		rc = ov_read(c, REG_SAT, &val);
+		ctl->value = val << 8;
+		break;
+	case OVCAMCHIP_CID_EXP:
+		rc = ov_read(c, REG_EXP, &val);
+		ctl->value = val;
+		break;
+	case OVCAMCHIP_CID_BANDFILT:
+		ctl->value = s->bandfilt;
+		break;
+	case OVCAMCHIP_CID_AUTOBRIGHT:
+		ctl->value = s->auto_brt;
+		break;
+	case OVCAMCHIP_CID_AUTOEXP:
+		ctl->value = s->auto_exp;
+		break;
+	case OVCAMCHIP_CID_BACKLIGHT:
+		ctl->value = s->backlight;
+		break;
+	case OVCAMCHIP_CID_MIRROR:
+		ctl->value = s->mirror;
+		break;
+	default:
+		DDEBUG(2, &c->dev, "control not supported: %d", ctl->id);
+		return -EPERM;
+	}
+
+	DDEBUG(3, &c->dev, "id=%d, arg=%d, rc=%d", ctl->id, ctl->value, rc);
+	return rc;
+}
+
+static int ov7x20_mode_init(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	int qvga = win->quarter;
+
+	/******** QVGA-specific regs ********/
+	ov_write_mask(c, 0x14, qvga?0x20:0x00, 0x20);
+	ov_write_mask(c, 0x28, qvga?0x00:0x20, 0x20);
+	ov_write(c, 0x24, qvga?0x20:0x3a);
+	ov_write(c, 0x25, qvga?0x30:0x60);
+	ov_write_mask(c, 0x2d, qvga?0x40:0x00, 0x40);
+	if (!ov->mono)
+		ov_write_mask(c, 0x67, qvga?0xf0:0x90, 0xf0);
+	ov_write_mask(c, 0x74, qvga?0x20:0x00, 0x20);
+
+	/******** Clock programming ********/
+
+	ov_write(c, 0x11, win->clockdiv);
+
+	return 0;
+}
+
+static int ov7x20_set_window(struct i2c_client *c, struct ovcamchip_window *win)
+{
+	int ret, hwscale, vwscale;
+
+	ret = ov7x20_mode_init(c, win);
+	if (ret < 0)
+		return ret;
+
+	if (win->quarter) {
+		hwscale = 1;
+		vwscale = 0;
+	} else {
+		hwscale = 2;
+		vwscale = 1;
+	}
+
+	ov_write(c, 0x17, HWSBASE + (win->x >> hwscale));
+	ov_write(c, 0x18, HWEBASE + ((win->x + win->width) >> hwscale));
+	ov_write(c, 0x19, VWSBASE + (win->y >> vwscale));
+	ov_write(c, 0x1a, VWEBASE + ((win->y + win->height) >> vwscale));
+
+	return 0;
+}
+
+static int ov7x20_command(struct i2c_client *c, unsigned int cmd, void *arg)
+{
+	switch (cmd) {
+	case OVCAMCHIP_CMD_S_CTRL:
+		return ov7x20_set_v4l1_control(c, arg);
+	case OVCAMCHIP_CMD_G_CTRL:
+		return ov7x20_get_v4l1_control(c, arg);
+	case OVCAMCHIP_CMD_S_MODE:
+		return ov7x20_set_window(c, arg);
+	default:
+		DDEBUG(2, &c->dev, "command not supported: %d", cmd);
+		return -ENOIOCTLCMD;
+	}
+}
+
+struct ovcamchip_ops ov7x20_ops = {
+	.init    =	ov7x20_init,
+	.free    =	ov7x20_free,
+	.command =	ov7x20_command,
+};
--- diff/drivers/media/video/ovcamchip/ovcamchip_core.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/media/video/ovcamchip/ovcamchip_core.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,446 @@
+/* Shared Code for OmniVision Camera Chip Drivers
+ *
+ * Copyright (c) 2004 Mark McClelland <mark@alpha.dyndns.org>
+ * http://alpha.dyndns.org/ov511/
+ *
+ * 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. NO WARRANTY OF ANY KIND is expressed or implied.
+ */
+
+#define DEBUG
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/slab.h>
+#include "ovcamchip_priv.h"
+
+#define DRIVER_VERSION "v2.27 for Linux 2.6"
+#define DRIVER_AUTHOR "Mark McClelland <mark@alpha.dyndns.org>"
+#define DRIVER_DESC "OV camera chip I2C driver"
+
+#define PINFO(fmt, args...) printk(KERN_INFO "ovcamchip: " fmt "\n" , ## args);
+#define PERROR(fmt, args...) printk(KERN_ERR "ovcamchip: " fmt "\n" , ## args);
+
+#ifdef DEBUG
+int ovcamchip_debug = 0;
+static int debug;
+module_param(debug, int, 0);
+MODULE_PARM_DESC(debug,
+  "Debug level: 0=none, 1=inits, 2=warning, 3=config, 4=functions, 5=all");
+#endif
+
+/* By default, let bridge driver tell us if chip is monochrome. mono=0
+ * will ignore that and always treat chips as color. mono=1 will force
+ * monochrome mode for all chips. */
+static int mono = -1;
+module_param(mono, int, 0);
+MODULE_PARM_DESC(mono,
+  "1=chips are monochrome (OVx1xx), 0=force color, -1=autodetect (default)");
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
+/* Registers common to all chips, that are needed for detection */
+#define GENERIC_REG_ID_HIGH       0x1C	/* manufacturer ID MSB */
+#define GENERIC_REG_ID_LOW        0x1D	/* manufacturer ID LSB */
+#define GENERIC_REG_COM_I         0x29	/* misc ID bits */
+
+extern struct ovcamchip_ops ov6x20_ops;
+extern struct ovcamchip_ops ov6x30_ops;
+extern struct ovcamchip_ops ov7x10_ops;
+extern struct ovcamchip_ops ov7x20_ops;
+extern struct ovcamchip_ops ov76be_ops;
+
+static char *chip_names[NUM_CC_TYPES] = {
+	[CC_UNKNOWN]	= "Unknown chip",
+	[CC_OV76BE]	= "OV76BE",
+	[CC_OV7610]	= "OV7610",
+	[CC_OV7620]	= "OV7620",
+	[CC_OV7620AE]	= "OV7620AE",
+	[CC_OV6620]	= "OV6620",
+	[CC_OV6630]	= "OV6630",
+	[CC_OV6630AE]	= "OV6630AE",
+	[CC_OV6630AF]	= "OV6630AF",
+};
+
+/* Forward declarations */
+static struct i2c_driver driver;
+static struct i2c_client client_template;
+
+/* ----------------------------------------------------------------------- */
+
+int ov_write_regvals(struct i2c_client *c, struct ovcamchip_regvals *rvals)
+{
+	int rc;
+
+	while (rvals->reg != 0xff) {
+		rc = ov_write(c, rvals->reg, rvals->val);
+		if (rc < 0)
+			return rc;
+		rvals++;
+	}
+
+	return 0;
+}
+
+/* Writes bits at positions specified by mask to an I2C reg. Bits that are in
+ * the same position as 1's in "mask" are cleared and set to "value". Bits
+ * that are in the same position as 0's in "mask" are preserved, regardless
+ * of their respective state in "value".
+ */
+int ov_write_mask(struct i2c_client *c,
+		  unsigned char reg,
+		  unsigned char value,
+		  unsigned char mask)
+{
+	int rc;
+	unsigned char oldval, newval;
+
+	if (mask == 0xff) {
+		newval = value;
+	} else {
+		rc = ov_read(c, reg, &oldval);
+		if (rc < 0)
+			return rc;
+
+		oldval &= (~mask);		/* Clear the masked bits */
+		value &= mask;			/* Enforce mask on value */
+		newval = oldval | value;	/* Set the desired bits */
+	}
+
+	return ov_write(c, reg, newval);
+}
+
+/* ----------------------------------------------------------------------- */
+
+/* Reset the chip and ensure that I2C is synchronized. Returns <0 if failure.
+ */
+static int init_camchip(struct i2c_client *c)
+{
+	int i, success;
+	unsigned char high, low;
+
+	/* Reset the chip */
+	ov_write(c, 0x12, 0x80);
+
+	/* Wait for it to initialize */
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	schedule_timeout(1 + 150 * HZ / 1000);
+
+	for (i = 0, success = 0; i < I2C_DETECT_RETRIES && !success; i++) {
+		if (ov_read(c, GENERIC_REG_ID_HIGH, &high) >= 0) {
+			if (ov_read(c, GENERIC_REG_ID_LOW, &low) >= 0) {
+				if (high == 0x7F && low == 0xA2) {
+					success = 1;
+					continue;
+				}
+			}
+		}
+
+		/* Reset the chip */
+		ov_write(c, 0x12, 0x80);
+
+		/* Wait for it to initialize */
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(1 + 150 * HZ / 1000);
+
+		/* Dummy read to sync I2C */
+		ov_read(c, 0x00, &low);
+	}
+
+	if (!success)
+		return -EIO;
+
+	PDEBUG(1, "I2C synced in %d attempt(s)", i);
+
+	return 0;
+}
+
+/* This detects the OV7610, OV7620, or OV76BE chip. */
+static int ov7xx0_detect(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	int rc;
+	unsigned char val;
+
+	PDEBUG(4, "");
+
+	/* Detect chip (sub)type */
+	rc = ov_read(c, GENERIC_REG_COM_I, &val);
+	if (rc < 0) {
+		PERROR("Error detecting ov7xx0 type");
+		return rc;
+	}
+
+	if ((val & 3) == 3) {
+		PINFO("Camera chip is an OV7610");
+		ov->subtype = CC_OV7610;
+	} else if ((val & 3) == 1) {
+		rc = ov_read(c, 0x15, &val);
+		if (rc < 0) {
+			PERROR("Error detecting ov7xx0 type");
+			return rc;
+		}
+
+		if (val & 1) {
+			PINFO("Camera chip is an OV7620AE");
+			/* OV7620 is a close enough match for now. There are
+			 * some definite differences though, so this should be
+			 * fixed */
+			ov->subtype = CC_OV7620;
+		} else {
+			PINFO("Camera chip is an OV76BE");
+			ov->subtype = CC_OV76BE;
+		}
+	} else if ((val & 3) == 0) {
+		PINFO("Camera chip is an OV7620");
+		ov->subtype = CC_OV7620;
+	} else {
+		PERROR("Unknown camera chip version: %d", val & 3);
+		return -ENOSYS;
+	}
+
+	if (ov->subtype == CC_OV76BE)
+		ov->sops = &ov76be_ops;
+	else if (ov->subtype == CC_OV7620)
+		ov->sops = &ov7x20_ops;
+	else
+		ov->sops = &ov7x10_ops;
+
+	return 0;
+}
+
+/* This detects the OV6620, OV6630, OV6630AE, or OV6630AF chip. */
+static int ov6xx0_detect(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	int rc;
+	unsigned char val;
+
+	PDEBUG(4, "");
+
+	/* Detect chip (sub)type */
+	rc = ov_read(c, GENERIC_REG_COM_I, &val);
+	if (rc < 0) {
+		PERROR("Error detecting ov6xx0 type");
+		return -1;
+	}
+
+	if ((val & 3) == 0) {
+		ov->subtype = CC_OV6630;
+		PINFO("Camera chip is an OV6630");
+	} else if ((val & 3) == 1) {
+		ov->subtype = CC_OV6620;
+		PINFO("Camera chip is an OV6620");
+	} else if ((val & 3) == 2) {
+		ov->subtype = CC_OV6630;
+		PINFO("Camera chip is an OV6630AE");
+	} else if ((val & 3) == 3) {
+		ov->subtype = CC_OV6630;
+		PINFO("Camera chip is an OV6630AF");
+	}
+
+	if (ov->subtype == CC_OV6620)
+		ov->sops = &ov6x20_ops;
+	else
+		ov->sops = &ov6x30_ops;
+
+	return 0;
+}
+
+static int ovcamchip_detect(struct i2c_client *c)
+{
+	/* Ideally we would just try a single register write and see if it NAKs.
+	 * That isn't possible since the OV518 can't report I2C transaction
+	 * failures. So, we have to try to initialize the chip (i.e. reset it
+	 * and check the ID registers) to detect its presence. */
+
+	/* Test for 7xx0 */
+	PDEBUG(3, "Testing for 0V7xx0");
+	c->addr = OV7xx0_SID;
+	if (init_camchip(c) < 0) {
+		/* Test for 6xx0 */
+		PDEBUG(3, "Testing for 0V6xx0");
+		c->addr = OV6xx0_SID;
+		if (init_camchip(c) < 0) {
+ 			return -ENODEV;
+		} else {
+			if (ov6xx0_detect(c) < 0) {
+				PERROR("Failed to init OV6xx0");
+ 				return -EIO;
+			}
+		}
+	} else {
+		if (ov7xx0_detect(c) < 0) {
+			PERROR("Failed to init OV7xx0");
+ 			return -EIO;
+		}
+	}
+
+	return 0;
+}
+
+/* ----------------------------------------------------------------------- */
+
+static int ovcamchip_attach(struct i2c_adapter *adap)
+{
+	int rc = 0;
+	struct ovcamchip *ov;
+	struct i2c_client *c;
+
+	/* I2C is not a PnP bus, so we can never be certain that we're talking
+	 * to the right chip. To prevent damage to EEPROMS and such, only
+	 * attach to adapters that are known to contain OV camera chips. */
+
+	switch (adap->id) {
+	case (I2C_ALGO_SMBUS | I2C_HW_SMBUS_OV511):
+	case (I2C_ALGO_SMBUS | I2C_HW_SMBUS_OV518):
+	case (I2C_ALGO_SMBUS | I2C_HW_SMBUS_OVFX2):
+	case (I2C_ALGO_SMBUS | I2C_HW_SMBUS_W9968CF):
+		PDEBUG(1, "Adapter ID 0x%06x accepted", adap->id);
+		break;
+	default:
+		PDEBUG(1, "Adapter ID 0x%06x rejected", adap->id);
+		return -ENODEV;
+	}
+
+	c = kmalloc(sizeof *c, GFP_KERNEL);
+	if (!c) {
+		rc = -ENOMEM;
+		goto no_client;
+	}
+	memcpy(c, &client_template, sizeof *c);
+	c->adapter = adap;
+	strcpy(i2c_clientname(c), "OV????");
+
+	ov = kmalloc(sizeof *ov, GFP_KERNEL);
+	if (!ov) {
+		rc = -ENOMEM;
+		goto no_ov;
+	}
+	memset(ov, 0, sizeof *ov);
+	i2c_set_clientdata(c, ov);
+
+	rc = ovcamchip_detect(c);
+	if (rc < 0)
+		goto error;
+
+	strcpy(i2c_clientname(c), chip_names[ov->subtype]);
+
+	PDEBUG(1, "Camera chip detection complete");
+
+	i2c_attach_client(c);
+
+	return rc;
+error:
+	kfree(ov);
+no_ov:
+	kfree(c);
+no_client:
+	PDEBUG(1, "returning %d", rc);
+	return rc;
+}
+
+static int ovcamchip_detach(struct i2c_client *c)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+	int rc;
+
+	rc = ov->sops->free(c);
+	if (rc < 0)
+		return rc;
+
+	i2c_detach_client(c);
+
+	kfree(ov);
+	kfree(c);
+	return 0;
+}
+
+static int ovcamchip_command(struct i2c_client *c, unsigned int cmd, void *arg)
+{
+	struct ovcamchip *ov = i2c_get_clientdata(c);
+
+	if (!ov->initialized &&
+	    cmd != OVCAMCHIP_CMD_Q_SUBTYPE &&
+	    cmd != OVCAMCHIP_CMD_INITIALIZE) {
+		dev_err(&c->dev, "ERROR: Camera chip not initialized yet!\n");
+		return -EPERM;
+	}
+
+	switch (cmd) {
+	case OVCAMCHIP_CMD_Q_SUBTYPE:
+	{
+		*(int *)arg = ov->subtype;
+		return 0;
+	}
+	case OVCAMCHIP_CMD_INITIALIZE:
+	{
+		int rc;
+
+		if (mono == -1)
+			ov->mono = *(int *)arg;
+		else
+			ov->mono = mono;
+
+		if (ov->mono) {
+			if (ov->subtype != CC_OV7620)
+				dev_warn(&c->dev, "Warning: Monochrome not "
+					"implemented for this chip\n");
+			else
+				dev_info(&c->dev, "Initializing chip as "
+					"monochrome\n");
+		}
+
+		rc = ov->sops->init(c);
+		if (rc < 0)
+			return rc;
+
+		ov->initialized = 1;
+		return 0;
+	}
+	default:
+		return ov->sops->command(c, cmd, arg);
+	}
+}
+
+/* ----------------------------------------------------------------------- */
+
+static struct i2c_driver driver = {
+	.owner =		THIS_MODULE,
+	.name =			"ovcamchip",
+	.id =			I2C_DRIVERID_OVCAMCHIP,
+	.class =		I2C_CLASS_CAM_DIGITAL,
+	.flags =		I2C_DF_NOTIFY,
+	.attach_adapter =	ovcamchip_attach,
+	.detach_client =	ovcamchip_detach,
+	.command =		ovcamchip_command,
+};
+
+static struct i2c_client client_template = {
+	I2C_DEVNAME("(unset)"),
+	.id =		-1,
+	.driver =	&driver,
+};
+
+static int __init ovcamchip_init(void)
+{
+#ifdef DEBUG
+	ovcamchip_debug = debug;
+#endif
+
+	PINFO(DRIVER_VERSION " : " DRIVER_DESC);
+	return i2c_add_driver(&driver);
+}
+
+static void __exit ovcamchip_exit(void)
+{
+	i2c_del_driver(&driver);
+}
+
+module_init(ovcamchip_init);
+module_exit(ovcamchip_exit);
--- diff/drivers/media/video/ovcamchip/ovcamchip_priv.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/media/video/ovcamchip/ovcamchip_priv.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,87 @@
+/* OmniVision* camera chip driver private definitions for core code and
+ * chip-specific code
+ *
+ * Copyright (c) 1999-2004 Mark McClelland
+ *
+ * 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. NO WARRANTY OF ANY KIND is expressed or implied.
+ *
+ * * OmniVision is a trademark of OmniVision Technologies, Inc. This driver
+ * is not sponsored or developed by them.
+ */
+
+#ifndef __LINUX_OVCAMCHIP_PRIV_H
+#define __LINUX_OVCAMCHIP_PRIV_H
+
+#include <media/ovcamchip.h>
+
+#ifdef DEBUG
+extern int ovcamchip_debug;
+#endif
+
+#define PDEBUG(level, fmt, args...) \
+	if (ovcamchip_debug >= (level))	pr_debug("[%s:%d] " fmt "\n", \
+		__FUNCTION__, __LINE__ , ## args)
+
+#define DDEBUG(level, dev, fmt, args...) \
+	if (ovcamchip_debug >= (level))	dev_dbg(dev, "[%s:%d] " fmt "\n", \
+		__FUNCTION__, __LINE__ , ## args)
+
+/* Number of times to retry chip detection. Increase this if you are getting
+ * "Failed to init camera chip" */
+#define I2C_DETECT_RETRIES	10
+
+struct ovcamchip_regvals {
+	unsigned char reg;
+	unsigned char val;
+};
+
+struct ovcamchip_ops {
+	int (*init)(struct i2c_client *);
+	int (*free)(struct i2c_client *);
+	int (*command)(struct i2c_client *, unsigned int, void *);
+};
+
+struct ovcamchip {
+	struct ovcamchip_ops *sops;
+	void *spriv;               /* Private data for OV7x10.c etc... */
+	int subtype;               /* = SEN_OV7610 etc... */
+	int mono;                  /* Monochrome chip? (invalid until init) */
+	int initialized;           /* OVCAMCHIP_CMD_INITIALIZE was successful */
+};
+
+/* --------------------------------- */
+/*              I2C I/O              */
+/* --------------------------------- */
+
+static inline int ov_read(struct i2c_client *c, unsigned char reg,
+			  unsigned char *value)
+{
+	int rc;
+
+	rc = i2c_smbus_read_byte_data(c, reg);
+	*value = (unsigned char) rc;
+	return rc;
+}
+
+static inline int ov_write(struct i2c_client *c, unsigned char reg,
+			   unsigned char value )
+{
+	return i2c_smbus_write_byte_data(c, reg, value);
+}
+
+/* --------------------------------- */
+/*        FUNCTION PROTOTYPES        */
+/* --------------------------------- */
+
+/* Functions in ovcamchip_core.c */
+
+extern int ov_write_regvals(struct i2c_client *c,
+			    struct ovcamchip_regvals *rvals);
+
+extern int ov_write_mask(struct i2c_client *c, unsigned char reg,
+	      		 unsigned char value, unsigned char mask);
+
+#endif
--- diff/drivers/net/arm/smc91x.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/net/arm/smc91x.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,2171 @@
+/*
+ * smc91x.c
+ * This is a driver for SMSC's 91C9x/91C1xx single-chip Ethernet devices.
+ *
+ * Copyright (C) 1996 by Erik Stahlman
+ * Copyright (C) 2001 Standard Microsystems Corporation
+ *	Developed by Simple Network Magic Corporation
+ * Copyright (C) 2003 Monta Vista Software, Inc.
+ *	Unified SMC91x driver by Nicolas Pitre
+ *
+ * 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
+ *
+ * Arguments:
+ * 	io	= for the base address
+ *	irq	= for the IRQ
+ *	nowait	= 0 for normal wait states, 1 eliminates additional wait states
+ *
+ * original author:
+ * 	Erik Stahlman <erik@vt.edu>
+ *
+ * hardware multicast code:
+ *    Peter Cammaert <pc@denkart.be>
+ *
+ * contributors:
+ * 	Daris A Nevil <dnevil@snmc.com>
+ *      Nicolas Pitre <nico@cam.org>
+ *	Russell King <rmk@arm.linux.org.uk>
+ *
+ * History:
+ *   08/20/00  Arnaldo Melo       fix kfree(skb) in smc_hardware_send_packet
+ *   12/15/00  Christian Jullien  fix "Warning: kfree_skb on hard IRQ"
+ *   03/16/01  Daris A Nevil      modified smc9194.c for use with LAN91C111
+ *   08/22/01  Scott Anderson     merge changes from smc9194 to smc91111
+ *   08/21/01  Pramod B Bhardwaj  added support for RevB of LAN91C111
+ *   12/20/01  Jeff Sutherland    initial port to Xscale PXA with DMA support
+ *   04/07/03  Nicolas Pitre      unified SMC91x driver, killed irq races,
+ *                                more bus abstraction, big cleanup, etc.
+ *   29/09/03  Russell King       - add driver model support
+ *                                - ethtool support
+ *                                - convert to use generic MII interface
+ *                                - add link up/down notification
+ *                                - don't try to handle full negotiation in
+ *                                  smc_phy_configure
+ *                                - clean up (and fix stack overrun) in PHY
+ *                                  MII read/write functions
+ */
+static const char version[] =
+	"smc91x.c: v1.0, mar 07 2003 by Nicolas Pitre <nico@cam.org>\n";
+
+/* Debugging level */
+#ifndef SMC_DEBUG
+#define SMC_DEBUG		0
+#endif
+
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/delay.h>
+#include <linux/timer.h>
+#include <linux/errno.h>
+#include <linux/ioport.h>
+#include <linux/crc32.h>
+#include <linux/device.h>
+#include <linux/spinlock.h>
+#include <linux/ethtool.h>
+#include <linux/mii.h>
+
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+
+#include <asm/io.h>
+#include <asm/hardware.h>
+#include <asm/irq.h>
+
+#include "smc91x.h"
+
+#ifdef CONFIG_ISA
+/*
+ * the LAN91C111 can be at any of the following port addresses.  To change,
+ * for a slightly different card, you can add it to the array.  Keep in
+ * mind that the array must end in zero.
+ */
+static unsigned int smc_portlist[] __initdata = {
+	0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
+	0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, 0
+};
+
+#ifndef SMC_IOADDR
+# define SMC_IOADDR		-1
+#endif
+static unsigned long io = SMC_IOADDR;
+module_param(io, ulong, 0400);
+MODULE_PARM_DESC(io, "I/O base address");
+
+#ifndef SMC_IRQ
+# define SMC_IRQ		-1
+#endif
+static int irq = SMC_IRQ;
+module_param(irq, int, 0400);
+MODULE_PARM_DESC(irq, "IRQ number");
+
+#endif  /* CONFIG_ISA */
+
+#ifndef SMC_NOWAIT
+# define SMC_NOWAIT		0
+#endif
+static int nowait = SMC_NOWAIT;
+module_param(nowait, int, 0400);
+MODULE_PARM_DESC(nowait, "set to 1 for no wait state");
+
+/*
+ * Transmit timeout, default 5 seconds.
+ */
+static int watchdog = 5000;
+module_param(watchdog, int, 0400);
+MODULE_PARM_DESC(watchdog, "transmit timeout in milliseconds");
+
+MODULE_LICENSE("GPL");
+
+/*
+ * The internal workings of the driver.  If you are changing anything
+ * here with the SMC stuff, you should have the datasheet and know
+ * what you are doing.
+ */
+#define CARDNAME "smc91x"
+
+/*
+ * Use power-down feature of the chip
+ */
+#define POWER_DOWN		1
+
+/*
+ * Wait time for memory to be free.  This probably shouldn't be
+ * tuned that much, as waiting for this means nothing else happens
+ * in the system
+ */
+#define MEMORY_WAIT_TIME	16
+
+/*
+ * This selects whether TX packets are sent one by one to the SMC91x internal
+ * memory and throttled until transmission completes.  This may prevent
+ * RX overruns a litle by keeping much of the memory free for RX packets
+ * but to the expense of reduced TX throughput and increased IRQ overhead.
+ * Note this is not a cure for a too slow data bus or too high IRQ latency.
+ */
+#define THROTTLE_TX_PKTS	0
+
+/*
+ * The MII clock high/low times.  2x this number gives the MII clock period
+ * in microseconds. (was 50, but this gives 6.4ms for each MII transaction!)
+ */
+#define MII_DELAY		1
+
+/* store this information for the driver.. */
+struct smc_local {
+	/*
+	 * If I have to wait until memory is available to send a
+	 * packet, I will store the skbuff here, until I get the
+	 * desired memory.  Then, I'll send it out and free it.
+	 */
+	struct sk_buff *saved_skb;
+
+ 	/*
+	 * these are things that the kernel wants me to keep, so users
+	 * can find out semi-useless statistics of how well the card is
+	 * performing
+	 */
+	struct net_device_stats stats;
+
+	/* version/revision of the SMC91x chip */
+	int	version;
+
+	/* Contains the current active transmission mode */
+	int	tcr_cur_mode;
+
+	/* Contains the current active receive mode */
+	int	rcr_cur_mode;
+
+	/* Contains the current active receive/phy mode */
+	int	rpc_cur_mode;
+	int	ctl_rfduplx;
+	int	ctl_rspeed;
+
+	u32	msg_enable;
+	u32	phy_type;
+	struct mii_if_info mii;
+	spinlock_t lock;
+
+#ifdef SMC_USE_PXA_DMA
+	/* DMA needs the physical address of the chip */
+	u_long physaddr;
+#endif
+};
+
+#if SMC_DEBUG > 0
+#define DBG(n, args...)					\
+	do {						\
+		if (SMC_DEBUG >= (n))			\
+			printk(KERN_DEBUG args);	\
+	} while (0)
+
+#define PRINTK(args...)   printk(args)
+#else
+#define DBG(n, args...)   do { } while(0)
+#define PRINTK(args...)   printk(KERN_DEBUG args)
+#endif
+
+#if SMC_DEBUG > 3
+static void PRINT_PKT(u_char *buf, int length)
+{
+	int i;
+	int remainder;
+	int lines;
+
+	lines = length / 16;
+	remainder = length % 16;
+
+	for (i = 0; i < lines ; i ++) {
+		int cur;
+		for (cur = 0; cur < 8; cur++) {
+			u_char a, b;
+			a = *buf++;
+			b = *buf++;
+			printk("%02x%02x ", a, b);
+		}
+		printk("\n");
+	}
+	for (i = 0; i < remainder/2 ; i++) {
+		u_char a, b;
+		a = *buf++;
+		b = *buf++;
+		printk("%02x%02x ", a, b);
+	}
+	printk("\n");
+}
+#else
+#define PRINT_PKT(x...)  do { } while(0)
+#endif
+
+
+/* this enables an interrupt in the interrupt mask register */
+#define SMC_ENABLE_INT(x) do {						\
+	unsigned long flags;						\
+	unsigned char mask;						\
+	spin_lock_irqsave(&lp->lock, flags);				\
+	mask = SMC_GET_INT_MASK();					\
+	mask |= (x);							\
+	SMC_SET_INT_MASK(mask);						\
+	spin_unlock_irqrestore(&lp->lock, flags);			\
+} while (0)
+
+/* this disables an interrupt from the interrupt mask register */
+#define SMC_DISABLE_INT(x) do {						\
+	unsigned long flags;						\
+	unsigned char mask;						\
+	spin_lock_irqsave(&lp->lock, flags);				\
+	mask = SMC_GET_INT_MASK();					\
+	mask &= ~(x);							\
+	SMC_SET_INT_MASK(mask);						\
+	spin_unlock_irqrestore(&lp->lock, flags);			\
+} while (0)
+
+/*
+ * Wait while MMU is busy.  This is usually in the order of a few nanosecs
+ * if at all, but let's avoid deadlocking the system if the hardware
+ * decides to go south.
+ */
+#define SMC_WAIT_MMU_BUSY() do {					\
+	if (unlikely(SMC_GET_MMU_CMD() & MC_BUSY)) {			\
+		unsigned long timeout = jiffies + 2;			\
+		while (SMC_GET_MMU_CMD() & MC_BUSY) {			\
+			if (time_after(jiffies, timeout)) {		\
+				printk("%s: timeout %s line %d\n",	\
+					dev->name, __FILE__, __LINE__);	\
+				break;					\
+			}						\
+			cpu_relax();					\
+		}							\
+	}								\
+} while (0)
+
+
+/*
+ * this does a soft reset on the device
+ */
+static void smc_reset(struct net_device *dev)
+{
+	unsigned long ioaddr = dev->base_addr;
+	unsigned int ctl, cfg;
+
+	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+
+	/*
+	 * This resets the registers mostly to defaults, but doesn't
+	 * affect EEPROM.  That seems unnecessary
+	 */
+	SMC_SELECT_BANK(0);
+	SMC_SET_RCR(RCR_SOFTRST);
+
+	/*
+	 * Setup the Configuration Register
+	 * This is necessary because the CONFIG_REG is not affected
+	 * by a soft reset
+	 */
+	SMC_SELECT_BANK(1);
+
+	cfg = CONFIG_DEFAULT;
+
+	/*
+	 * Setup for fast accesses if requested.  If the card/system
+	 * can't handle it then there will be no recovery except for
+	 * a hard reset or power cycle
+	 */
+	if (nowait)
+		cfg |= CONFIG_NO_WAIT;
+
+	/*
+	 * Release from possible power-down state
+	 * Configuration register is not affected by Soft Reset
+	 */
+	cfg |= CONFIG_EPH_POWER_EN;
+
+	SMC_SET_CONFIG(cfg);
+
+	/* this should pause enough for the chip to be happy */
+	/*
+	 * elaborate?  What does the chip _need_? --jgarzik
+	 *
+	 * This seems to be undocumented, but something the original
+	 * driver(s) have always done.  Suspect undocumented timing
+	 * info/determined empirically. --rmk
+	 */
+	udelay(1);
+
+	/* Disable transmit and receive functionality */
+	SMC_SELECT_BANK(0);
+	SMC_SET_RCR(RCR_CLEAR);
+	SMC_SET_TCR(TCR_CLEAR);
+
+	SMC_SELECT_BANK(1);
+	ctl = SMC_GET_CTL() | CTL_LE_ENABLE;
+
+	/*
+	 * Set the control register to automatically release successfully
+	 * transmitted packets, to make the best use out of our limited
+	 * memory
+	 */
+#if ! THROTTLE_TX_PKTS
+	ctl |= CTL_AUTO_RELEASE;
+#else
+	ctl &= ~CTL_AUTO_RELEASE;
+#endif
+	SMC_SET_CTL(ctl);
+
+	/* Disable all interrupts */
+	SMC_SELECT_BANK(2);
+	SMC_SET_INT_MASK(0);
+
+	/* Reset the MMU */
+	SMC_SET_MMU_CMD(MC_RESET);
+	SMC_WAIT_MMU_BUSY();
+}
+
+/*
+ * Enable Interrupts, Receive, and Transmit
+ */
+static void smc_enable(struct net_device *dev)
+{
+	unsigned long ioaddr = dev->base_addr;
+	struct smc_local *lp = netdev_priv(dev);
+	int mask;
+
+	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+
+	/* see the header file for options in TCR/RCR DEFAULT */
+	SMC_SELECT_BANK(0);
+	SMC_SET_TCR(lp->tcr_cur_mode);
+	SMC_SET_RCR(lp->rcr_cur_mode);
+
+	/* now, enable interrupts */
+	mask = IM_EPH_INT|IM_RX_OVRN_INT|IM_RCV_INT;
+	if (lp->version >= (CHIP_91100 << 4))
+		mask |= IM_MDINT;
+	SMC_SELECT_BANK(2);
+	SMC_SET_INT_MASK(mask);
+}
+
+/*
+ * this puts the device in an inactive state
+ */
+static void smc_shutdown(unsigned long ioaddr)
+{
+	DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
+
+	/* no more interrupts for me */
+	SMC_SELECT_BANK(2);
+	SMC_SET_INT_MASK(0);
+
+	/* and tell the card to stay away from that nasty outside world */
+	SMC_SELECT_BANK(0);
+	SMC_SET_RCR(RCR_CLEAR);
+	SMC_SET_TCR(TCR_CLEAR);
+
+#ifdef POWER_DOWN
+	/* finally, shut the chip down */
+	SMC_SELECT_BANK(1);
+	SMC_SET_CONFIG(SMC_GET_CONFIG() & ~CONFIG_EPH_POWER_EN);
+#endif
+}
+
+/*
+ * This is the procedure to handle the receipt of a packet.
+ */
+static inline void  smc_rcv(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned long ioaddr = dev->base_addr;
+	unsigned int packet_number, status, packet_len;
+
+	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
+
+	packet_number = SMC_GET_RXFIFO();
+	if (unlikely(packet_number & RXFIFO_REMPTY)) {
+		PRINTK("%s: smc_rcv with nothing on FIFO.\n", dev->name);
+		return;
+	}
+
+	/* read from start of packet */
+	SMC_SET_PTR(PTR_READ | PTR_RCV | PTR_AUTOINC);
+
+	/* First two words are status and packet length */
+	SMC_GET_PKT_HDR(status, packet_len);
+	packet_len &= 0x07ff;  /* mask off top bits */
+	DBG(2, "%s: RX PNR 0x%x STATUS 0x%04x LENGTH 0x%04x (%d)\n",
+		dev->name, packet_number, status,
+		packet_len, packet_len);
+
+	if (unlikely(status & RS_ERRORS)) {
+		lp->stats.rx_errors++;
+		if (status & RS_ALGNERR)
+			lp->stats.rx_frame_errors++;
+		if (status & (RS_TOOSHORT | RS_TOOLONG))
+			lp->stats.rx_length_errors++;
+		if (status & RS_BADCRC)
+			lp->stats.rx_crc_errors++;
+	} else {
+		struct sk_buff *skb;
+		unsigned char *data;
+		unsigned int data_len;
+
+		/* set multicast stats */
+		if (status & RS_MULTICAST)
+			lp->stats.multicast++;
+
+		/*
+		 * Actual payload is packet_len - 4 (or 3 if odd byte).
+		 * We want skb_reserve(2) and the final ctrl word
+		 * (2 bytes, possibly containing the payload odd byte).
+		 * Ence packet_len - 4 + 2 + 2.
+		 */
+		skb = dev_alloc_skb(packet_len);
+		if (unlikely(skb == NULL)) {
+			printk(KERN_NOTICE "%s: Low memory, packet dropped.\n",
+				dev->name);
+			lp->stats.rx_dropped++;
+			goto done;
+		}
+
+		/* Align IP header to 32 bits */
+		skb_reserve(skb, 2);
+
+		/* BUG: the LAN91C111 rev A never sets this bit. Force it. */
+		if (lp->version == 0x90)
+			status |= RS_ODDFRAME;
+
+		/*
+		 * If odd length: packet_len - 3,
+		 * otherwise packet_len - 4.
+		 */
+		data_len = packet_len - ((status & RS_ODDFRAME) ? 3 : 4);
+		data = skb_put(skb, data_len);
+		SMC_PULL_DATA(data, packet_len - 2);
+
+		PRINT_PKT(data, packet_len - 2);
+
+		dev->last_rx = jiffies;
+		skb->dev = dev;
+		skb->protocol = eth_type_trans(skb, dev);
+		netif_rx(skb);
+		lp->stats.rx_packets++;
+		lp->stats.rx_bytes += data_len;
+	}
+
+done:
+	SMC_WAIT_MMU_BUSY();
+	SMC_SET_MMU_CMD(MC_RELEASE);
+}
+
+/*
+ * This is called to actually send a packet to the chip.
+ * Returns non-zero when successful.
+ */
+static void smc_hardware_send_packet(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned long ioaddr = dev->base_addr;
+	struct sk_buff *skb = lp->saved_skb;
+	unsigned int packet_no, len;
+	unsigned char *buf;
+
+	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
+
+	packet_no = SMC_GET_AR();
+	if (unlikely(packet_no & AR_FAILED)) {
+		printk("%s: Memory allocation failed.\n", dev->name);
+		lp->saved_skb = NULL;
+		lp->stats.tx_errors++;
+		lp->stats.tx_fifo_errors++;
+		dev_kfree_skb_any(skb);
+		return;
+	}
+
+	/* point to the beginning of the packet */
+	SMC_SET_PN(packet_no);
+	SMC_SET_PTR(PTR_AUTOINC);
+
+	buf = skb->data;
+	len = skb->len;
+	DBG(2, "%s: TX PNR 0x%x LENGTH 0x%04x (%d) BUF 0x%p\n",
+		dev->name, packet_no, len, len, buf);
+	PRINT_PKT(buf, len);
+
+	/*
+	 * Send the packet length (+6 for status words, length, and ctl.
+	 * The card will pad to 64 bytes with zeroes if packet is too small.
+	 */
+	SMC_PUT_PKT_HDR(0, len + 6);
+
+	/* send the actual data */
+	SMC_PUSH_DATA(buf, len & ~1);
+
+	/* Send final ctl word with the last byte if there is one */
+	SMC_outw(((len & 1) ? (0x2000 | buf[len-1]) : 0), ioaddr, DATA_REG);
+
+	/* and let the chipset deal with it */
+	SMC_SET_MMU_CMD(MC_ENQUEUE);
+	SMC_ACK_INT(IM_TX_EMPTY_INT);
+
+	dev->trans_start = jiffies;
+	dev_kfree_skb_any(skb);
+	lp->saved_skb = NULL;
+	lp->stats.tx_packets++;
+	lp->stats.tx_bytes += len;
+}
+
+/*
+ * Since I am not sure if I will have enough room in the chip's ram
+ * to store the packet, I call this routine which either sends it
+ * now, or set the card to generates an interrupt when ready
+ * for the packet.
+ */
+static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned long ioaddr = dev->base_addr;
+	unsigned int numPages, poll_count, status, saved_bank;
+
+	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
+
+	BUG_ON(lp->saved_skb != NULL);
+	lp->saved_skb = skb;
+
+	/*
+	 * The MMU wants the number of pages to be the number of 256 bytes
+	 * 'pages', minus 1 (since a packet can't ever have 0 pages :))
+	 *
+	 * The 91C111 ignores the size bits, but earlier models don't.
+	 *
+	 * Pkt size for allocating is data length +6 (for additional status
+	 * words, length and ctl)
+	 *
+	 * If odd size then last byte is included in ctl word.
+	 */
+	numPages = ((skb->len & ~1) + (6 - 1)) >> 8;
+	if (unlikely(numPages > 7)) {
+		printk("%s: Far too big packet error.\n", dev->name);
+		lp->saved_skb = NULL;
+		lp->stats.tx_errors++;
+		lp->stats.tx_dropped++;
+		dev_kfree_skb(skb);
+		return 0;
+	}
+
+	/* now, try to allocate the memory */
+	saved_bank = SMC_CURRENT_BANK();
+	SMC_SELECT_BANK(2);
+	SMC_SET_MMU_CMD(MC_ALLOC | numPages);
+
+	/*
+	 * Poll the chip for a short amount of time in case the
+	 * allocation succeeds quickly.
+	 */
+	poll_count = MEMORY_WAIT_TIME;
+	do {
+		status = SMC_GET_INT();
+		if (status & IM_ALLOC_INT) {
+			SMC_ACK_INT(IM_ALLOC_INT);
+  			break;
+		}
+   	} while (--poll_count);
+
+   	if (!poll_count) {
+		/* oh well, wait until the chip finds memory later */
+		netif_stop_queue(dev);
+		DBG(2, "%s: TX memory allocation deferred.\n", dev->name);
+		SMC_ENABLE_INT(IM_ALLOC_INT);
+   	} else {
+		/*
+		 * Allocation succeeded: push packet to the chip's own memory
+		 * immediately.
+		 *
+		 * If THROTTLE_TX_PKTS is selected that means we don't want
+		 * more than a single TX packet taking up space in the chip's
+		 * internal memory at all time, in which case we stop the
+		 * queue right here until we're notified of TX completion.
+		 *
+		 * Otherwise we're quite happy to feed more TX packets right
+		 * away for better TX throughput, in which case the queue is
+		 * left active.
+		 */  
+#if THROTTLE_TX_PKTS
+		netif_stop_queue(dev);
+#endif
+		smc_hardware_send_packet(dev);
+		SMC_ENABLE_INT(IM_TX_INT | IM_TX_EMPTY_INT);
+	}
+
+	SMC_SELECT_BANK(saved_bank);
+	return 0;
+}
+
+/*
+ * This handles a TX interrupt, which is only called when:
+ * - a TX error occurred, or
+ * - CTL_AUTO_RELEASE is not set and TX of a packet completed.
+ */
+static void smc_tx(struct net_device *dev)
+{
+	unsigned long ioaddr = dev->base_addr;
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned int saved_packet, packet_no, tx_status, pkt_len;
+
+	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
+
+	/* If the TX FIFO is empty then nothing to do */
+	packet_no = SMC_GET_TXFIFO();
+	if (unlikely(packet_no & TXFIFO_TEMPTY)) {
+		PRINTK("%s: smc_tx with nothing on FIFO.\n", dev->name);
+		return;
+	}
+
+	/* select packet to read from */
+	saved_packet = SMC_GET_PN();
+	SMC_SET_PN(packet_no);
+
+	/* read the first word (status word) from this packet */
+	SMC_SET_PTR(PTR_AUTOINC | PTR_READ);
+	SMC_GET_PKT_HDR(tx_status, pkt_len);
+	DBG(2, "%s: TX STATUS 0x%04x PNR 0x%02x\n",
+		dev->name, tx_status, packet_no);
+
+	if (!(tx_status & TS_SUCCESS))
+		lp->stats.tx_errors++;
+	if (tx_status & TS_LOSTCAR)
+		lp->stats.tx_carrier_errors++;
+
+	SMC_WAIT_MMU_BUSY();
+
+	if (tx_status & TS_LATCOL) {
+		PRINTK("%s: late collision occurred on last xmit\n", dev->name);
+		lp->stats.tx_window_errors++;
+		/* It's really cheap to requeue the pkt here */
+		SMC_SET_MMU_CMD( MC_ENQUEUE );
+	} else {
+		/* kill the packet */
+		SMC_SET_MMU_CMD(MC_FREEPKT);
+	}
+
+	/* Don't restore Packet Number Reg until busy bit is cleared */
+	SMC_WAIT_MMU_BUSY();
+	SMC_SET_PN(saved_packet);
+
+	/* re-enable transmit */
+	SMC_SELECT_BANK(0);
+	SMC_SET_TCR(lp->tcr_cur_mode);
+	SMC_SELECT_BANK(2);
+}
+
+
+/*---PHY CONTROL AND CONFIGURATION-----------------------------------------*/
+
+static void smc_mii_out(struct net_device *dev, unsigned int val, int bits)
+{
+	unsigned long ioaddr = dev->base_addr;
+	unsigned int mii_reg, mask;
+
+	mii_reg = SMC_GET_MII() & ~(MII_MCLK | MII_MDOE | MII_MDO);
+	mii_reg |= MII_MDOE;
+
+	for (mask = 1 << (bits - 1); mask; mask >>= 1) {
+		if (val & mask)
+			mii_reg |= MII_MDO;
+		else
+			mii_reg &= ~MII_MDO;
+
+		SMC_SET_MII(mii_reg);
+		udelay(MII_DELAY);
+		SMC_SET_MII(mii_reg | MII_MCLK);
+		udelay(MII_DELAY);
+	}
+}
+
+static unsigned int smc_mii_in(struct net_device *dev, int bits)
+{
+	unsigned long ioaddr = dev->base_addr;
+	unsigned int mii_reg, mask, val;
+
+	mii_reg = SMC_GET_MII() & ~(MII_MCLK | MII_MDOE | MII_MDO);
+	SMC_SET_MII(mii_reg);
+
+	for (mask = 1 << (bits - 1), val = 0; mask; mask >>= 1) {
+		if (SMC_GET_MII() & MII_MDI)
+			val |= mask;
+
+		SMC_SET_MII(mii_reg);
+		udelay(MII_DELAY);
+		SMC_SET_MII(mii_reg | MII_MCLK);
+		udelay(MII_DELAY);
+	}
+
+	return val;
+}
+
+/*
+ * Reads a register from the MII Management serial interface
+ */
+static int smc_phy_read(struct net_device *dev, int phyaddr, int phyreg)
+{
+	unsigned long ioaddr = dev->base_addr;
+	unsigned int phydata, old_bank;
+
+	/* Save the current bank, and select bank 3 */
+	old_bank = SMC_CURRENT_BANK();
+	SMC_SELECT_BANK(3);
+
+	/* Idle - 32 ones */
+	smc_mii_out(dev, 0xffffffff, 32);
+
+	/* Start code (01) + read (10) + phyaddr + phyreg */
+	smc_mii_out(dev, 6 << 10 | phyaddr << 5 | phyreg, 14);
+
+	/* Turnaround (2bits) + phydata */
+	phydata = smc_mii_in(dev, 18);
+
+	/* Return to idle state */
+	SMC_SET_MII(SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO));
+
+	/* And select original bank */
+	SMC_SELECT_BANK(old_bank);
+
+	DBG(3, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n",
+		__FUNCTION__, phyaddr, phyreg, phydata);
+
+	return phydata;
+}
+
+/*
+ * Writes a register to the MII Management serial interface
+ */
+static void smc_phy_write(struct net_device *dev, int phyaddr, int phyreg,
+			  int phydata)
+{
+	unsigned long ioaddr = dev->base_addr;
+	unsigned int old_bank;
+
+	/* Save the current bank, and select bank 3 */
+	old_bank = SMC_CURRENT_BANK();
+	SMC_SELECT_BANK(3);
+
+	/* Idle - 32 ones */
+	smc_mii_out(dev, 0xffffffff, 32);
+
+	/* Start code (01) + write (01) + phyaddr + phyreg + turnaround + phydata */
+	smc_mii_out(dev, 5 << 28 | phyaddr << 23 | phyreg << 18 | 2 << 16 | phydata, 32);
+
+	/* Return to idle state */
+	SMC_SET_MII(SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO));
+
+	/* And select original bank */
+	SMC_SELECT_BANK(old_bank);
+
+	DBG(3, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n",
+		__FUNCTION__, phyaddr, phyreg, phydata);
+}
+
+/*
+ * Finds and reports the PHY address
+ */
+static void smc_detect_phy(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	int phyaddr;
+
+	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+
+	lp->phy_type = 0;
+
+	/*
+	 * Scan all 32 PHY addresses if necessary, starting at
+	 * PHY#1 to PHY#31, and then PHY#0 last.
+	 */
+	for (phyaddr = 1; phyaddr < 33; ++phyaddr) {
+		unsigned int id1, id2;
+
+		/* Read the PHY identifiers */
+		id1 = smc_phy_read(dev, phyaddr & 31, MII_PHYSID1);
+		id2 = smc_phy_read(dev, phyaddr & 31, MII_PHYSID2);
+
+		DBG(3, "%s: phy_id1=0x%x, phy_id2=0x%x\n",
+			dev->name, id1, id2);
+
+		/* Make sure it is a valid identifier */
+		if (id1 != 0x0000 && id1 != 0xffff && id1 != 0x8000 &&
+		    id2 != 0x0000 && id2 != 0xffff && id2 != 0x8000) {
+			/* Save the PHY's address */
+			lp->mii.phy_id = phyaddr & 31;
+			lp->phy_type = id1 << 16 | id2;
+			break;
+		}
+	}
+}
+
+/*
+ * Sets the PHY to a configuration as determined by the user
+ */
+static int smc_phy_fixed(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned long ioaddr = dev->base_addr;
+	int phyaddr = lp->mii.phy_id;
+	int bmcr, cfg1;
+
+	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
+
+	/* Enter Link Disable state */
+	cfg1 = smc_phy_read(dev, phyaddr, PHY_CFG1_REG);
+	cfg1 |= PHY_CFG1_LNKDIS;
+	smc_phy_write(dev, phyaddr, PHY_CFG1_REG, cfg1);
+
+	/*
+	 * Set our fixed capabilities
+	 * Disable auto-negotiation
+	 */
+	bmcr = 0;
+
+	if (lp->ctl_rfduplx)
+		bmcr |= BMCR_FULLDPLX;
+
+	if (lp->ctl_rspeed == 100)
+		bmcr |= BMCR_SPEED100;
+
+	/* Write our capabilities to the phy control register */
+	smc_phy_write(dev, phyaddr, MII_BMCR, bmcr);
+
+	/* Re-Configure the Receive/Phy Control register */
+	SMC_SET_RPC(lp->rpc_cur_mode);
+
+	return 1;
+}
+
+/*
+ * smc_phy_reset - reset the phy
+ * @dev: net device
+ * @phy: phy address
+ *
+ * Issue a software reset for the specified PHY and
+ * wait up to 100ms for the reset to complete.  We should
+ * not access the PHY for 50ms after issuing the reset.
+ *
+ * The time to wait appears to be dependent on the PHY.
+ *
+ * Must be called with lp->lock locked.
+ */
+static int smc_phy_reset(struct net_device *dev, int phy)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned int bmcr;
+	int timeout;
+
+	smc_phy_write(dev, phy, MII_BMCR, BMCR_RESET);
+
+	for (timeout = 2; timeout; timeout--) {
+		spin_unlock_irq(&lp->lock);
+		msleep(50);
+		spin_lock_irq(&lp->lock);
+
+		bmcr = smc_phy_read(dev, phy, MII_BMCR);
+		if (!(bmcr & BMCR_RESET))
+			break;
+	}
+
+	return bmcr & BMCR_RESET;
+}
+
+/*
+ * smc_phy_powerdown - powerdown phy
+ * @dev: net device
+ * @phy: phy address
+ *
+ * Power down the specified PHY
+ */
+static void smc_phy_powerdown(struct net_device *dev, int phy)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned int bmcr;
+
+	spin_lock_irq(&lp->lock);
+	bmcr = smc_phy_read(dev, phy, MII_BMCR);
+	smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN);
+	spin_unlock_irq(&lp->lock);
+}
+
+/*
+ * smc_phy_check_media - check the media status and adjust TCR
+ * @dev: net device
+ * @init: set true for initialisation
+ *
+ * Select duplex mode depending on negotiation state.  This
+ * also updates our carrier state.
+ */
+static void smc_phy_check_media(struct net_device *dev, int init)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned long ioaddr = dev->base_addr;
+
+	if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) {
+		unsigned int old_bank;
+
+		/* duplex state has changed */
+		if (lp->mii.full_duplex) {
+			lp->tcr_cur_mode |= TCR_SWFDUP;
+		} else {
+			lp->tcr_cur_mode &= ~TCR_SWFDUP;
+		}
+
+		old_bank = SMC_CURRENT_BANK();
+		SMC_SELECT_BANK(0);
+		SMC_SET_TCR(lp->tcr_cur_mode);
+		SMC_SELECT_BANK(old_bank);
+	}
+}
+
+/*
+ * Configures the specified PHY through the MII management interface
+ * using Autonegotiation.
+ * Calls smc_phy_fixed() if the user has requested a certain config.
+ * If RPC ANEG bit is set, the media selection is dependent purely on
+ * the selection by the MII (either in the MII BMCR reg or the result
+ * of autonegotiation.)  If the RPC ANEG bit is cleared, the selection
+ * is controlled by the RPC SPEED and RPC DPLX bits.
+ */
+static void smc_phy_configure(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned long ioaddr = dev->base_addr;
+	int phyaddr = lp->mii.phy_id;
+	int my_phy_caps; /* My PHY capabilities */
+	int my_ad_caps; /* My Advertised capabilities */
+	int status;
+
+	DBG(3, "%s:smc_program_phy()\n", dev->name);
+
+	spin_lock_irq(&lp->lock);
+
+	/*
+	 * We should not be called if phy_type is zero.
+	 */
+	if (lp->phy_type == 0)
+		goto smc_phy_configure_exit;
+
+	if (smc_phy_reset(dev, phyaddr)) {
+		printk("%s: PHY reset timed out\n", dev->name);
+		goto smc_phy_configure_exit;
+	}
+
+	/*
+	 * Enable PHY Interrupts (for register 18)
+	 * Interrupts listed here are disabled
+	 */
+	smc_phy_write(dev, phyaddr, PHY_MASK_REG,
+		PHY_INT_LOSSSYNC | PHY_INT_CWRD | PHY_INT_SSD |
+		PHY_INT_ESD | PHY_INT_RPOL | PHY_INT_JAB |
+		PHY_INT_SPDDET | PHY_INT_DPLXDET);
+
+	/* Configure the Receive/Phy Control register */
+	SMC_SELECT_BANK(0);
+	SMC_SET_RPC(lp->rpc_cur_mode);
+
+	/* If the user requested no auto neg, then go set his request */
+	if (lp->mii.force_media) {
+		smc_phy_fixed(dev);
+		goto smc_phy_configure_exit;
+	}
+
+	/* Copy our capabilities from MII_BMSR to MII_ADVERTISE */
+	my_phy_caps = smc_phy_read(dev, phyaddr, MII_BMSR);
+
+	if (!(my_phy_caps & BMSR_ANEGCAPABLE)) {
+		printk(KERN_INFO "Auto negotiation NOT supported\n");
+		smc_phy_fixed(dev);
+		goto smc_phy_configure_exit;
+	}
+
+	my_ad_caps = ADVERTISE_CSMA; /* I am CSMA capable */
+
+	if (my_phy_caps & BMSR_100BASE4)
+		my_ad_caps |= ADVERTISE_100BASE4;
+	if (my_phy_caps & BMSR_100FULL)
+		my_ad_caps |= ADVERTISE_100FULL;
+	if (my_phy_caps & BMSR_100HALF)
+		my_ad_caps |= ADVERTISE_100HALF;
+	if (my_phy_caps & BMSR_10FULL)
+		my_ad_caps |= ADVERTISE_10FULL;
+	if (my_phy_caps & BMSR_10HALF)
+		my_ad_caps |= ADVERTISE_10HALF;
+
+	/* Disable capabilities not selected by our user */
+	if (lp->ctl_rspeed != 100)
+		my_ad_caps &= ~(ADVERTISE_100BASE4|ADVERTISE_100FULL|ADVERTISE_100HALF);
+
+	if (!lp->ctl_rfduplx)
+		my_ad_caps &= ~(ADVERTISE_100FULL|ADVERTISE_10FULL);
+
+	/* Update our Auto-Neg Advertisement Register */
+	smc_phy_write(dev, phyaddr, MII_ADVERTISE, my_ad_caps);
+	lp->mii.advertising = my_ad_caps;
+
+	/*
+	 * Read the register back.  Without this, it appears that when
+	 * auto-negotiation is restarted, sometimes it isn't ready and
+	 * the link does not come up.
+	 */
+	status = smc_phy_read(dev, phyaddr, MII_ADVERTISE);
+
+	DBG(2, "%s: phy caps=%x\n", dev->name, my_phy_caps);
+	DBG(2, "%s: phy advertised caps=%x\n", dev->name, my_ad_caps);
+
+	/* Restart auto-negotiation process in order to advertise my caps */
+	smc_phy_write(dev, phyaddr, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART);
+
+	smc_phy_check_media(dev, 1);
+
+smc_phy_configure_exit:
+	spin_unlock_irq(&lp->lock);
+}
+
+/*
+ * smc_phy_interrupt
+ *
+ * Purpose:  Handle interrupts relating to PHY register 18. This is
+ *  called from the "hard" interrupt handler under our private spinlock.
+ */
+static void smc_phy_interrupt(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	int phyaddr = lp->mii.phy_id;
+	int phy18;
+
+	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+
+	if (lp->phy_type == 0)
+		return;
+
+	for(;;) {
+		smc_phy_check_media(dev, 0);
+
+		/* Read PHY Register 18, Status Output */
+		phy18 = smc_phy_read(dev, phyaddr, PHY_INT_REG);
+		if ((phy18 & PHY_INT_INT) == 0)
+			break;
+	}
+}
+
+/*--- END PHY CONTROL AND CONFIGURATION-------------------------------------*/
+
+static void smc_10bt_check_media(struct net_device *dev, int init)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned long ioaddr = dev->base_addr;
+	unsigned int old_carrier, new_carrier, old_bank;
+
+	old_bank = SMC_CURRENT_BANK();
+	SMC_SELECT_BANK(0);
+	old_carrier = netif_carrier_ok(dev) ? 1 : 0;
+	new_carrier = SMC_inw(ioaddr, EPH_STATUS_REG) & ES_LINK_OK ? 1 : 0;
+
+	if (init || (old_carrier != new_carrier)) {
+		if (!new_carrier) {
+			netif_carrier_off(dev);
+		} else {
+			netif_carrier_on(dev);
+		}
+		if (netif_msg_link(lp))
+			printk(KERN_INFO "%s: link %s\n", dev->name,
+			       new_carrier ? "up" : "down");
+	}
+	SMC_SELECT_BANK(old_bank);
+}
+
+static void smc_eph_interrupt(struct net_device *dev)
+{
+	unsigned long ioaddr = dev->base_addr;
+	unsigned int old_bank, ctl;
+
+	smc_10bt_check_media(dev, 0);
+
+	old_bank = SMC_CURRENT_BANK();
+	SMC_SELECT_BANK(1);
+
+	ctl = SMC_GET_CTL();
+	SMC_SET_CTL(ctl & ~CTL_LE_ENABLE);
+	SMC_SET_CTL(ctl);
+
+	SMC_SELECT_BANK(old_bank);
+}
+
+/*
+ * This is the main routine of the driver, to handle the device when
+ * it needs some attention.
+ */
+static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	struct net_device *dev = dev_id;
+	unsigned long ioaddr = dev->base_addr;
+	struct smc_local *lp = netdev_priv(dev);
+	int status, mask, timeout, card_stats;
+	int saved_bank, saved_pointer;
+
+	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
+
+	saved_bank = SMC_CURRENT_BANK();
+	SMC_SELECT_BANK(2);
+	saved_pointer = SMC_GET_PTR();
+	mask = SMC_GET_INT_MASK();
+	SMC_SET_INT_MASK(0);
+
+	/* set a timeout value, so I don't stay here forever */
+	timeout = 8;
+
+	do {
+		status = SMC_GET_INT();
+
+		DBG(2, "%s: IRQ 0x%02x MASK 0x%02x MEM 0x%04x FIFO 0x%04x\n",
+			dev->name, status, mask,
+			({ int meminfo; SMC_SELECT_BANK(0);
+			   meminfo = SMC_GET_MIR();
+			   SMC_SELECT_BANK(2); meminfo; }),
+			SMC_GET_FIFO());
+
+		status &= mask;
+		if (!status)
+			break;
+
+		spin_lock(&lp->lock);
+
+		if (status & IM_RCV_INT) {
+			DBG(3, "%s: RX irq\n", dev->name);
+			smc_rcv(dev);
+		} else if (status & IM_TX_INT) {
+			DBG(3, "%s: TX int\n", dev->name);
+			smc_tx(dev);
+			SMC_ACK_INT(IM_TX_INT);
+#if THROTTLE_TX_PKTS
+			netif_wake_queue(dev);
+#endif
+		} else if (status & IM_ALLOC_INT) {
+			DBG(3, "%s: Allocation irq\n", dev->name);
+			smc_hardware_send_packet(dev);
+			mask |= (IM_TX_INT | IM_TX_EMPTY_INT);
+			mask &= ~IM_ALLOC_INT;
+#if ! THROTTLE_TX_PKTS
+			netif_wake_queue(dev);
+#endif
+		} else if (status & IM_TX_EMPTY_INT) {
+			DBG(3, "%s: TX empty\n", dev->name);
+			mask &= ~IM_TX_EMPTY_INT;
+
+			/* update stats */
+			SMC_SELECT_BANK(0);
+			card_stats = SMC_GET_COUNTER();
+			SMC_SELECT_BANK(2);
+
+			/* single collisions */
+			lp->stats.collisions += card_stats & 0xF;
+			card_stats >>= 4;
+
+			/* multiple collisions */
+			lp->stats.collisions += card_stats & 0xF;
+		} else if (status & IM_RX_OVRN_INT) {
+			DBG(1, "%s: RX overrun\n", dev->name);
+			SMC_ACK_INT(IM_RX_OVRN_INT);
+			lp->stats.rx_errors++;
+			lp->stats.rx_fifo_errors++;
+		} else if (status & IM_EPH_INT) {
+			smc_eph_interrupt(dev);
+		} else if (status & IM_MDINT) {
+			SMC_ACK_INT(IM_MDINT);
+			smc_phy_interrupt(dev);
+		} else if (status & IM_ERCV_INT) {
+			SMC_ACK_INT(IM_ERCV_INT);
+			PRINTK("%s: UNSUPPORTED: ERCV INTERRUPT \n", dev->name);
+		}
+
+		spin_unlock(&lp->lock);
+	} while (--timeout);
+
+	/* restore register states */
+	SMC_SET_INT_MASK(mask);
+	SMC_SET_PTR(saved_pointer);
+	SMC_SELECT_BANK(saved_bank);
+
+	DBG(3, "%s: Interrupt done (%d loops)\n", dev->name, 8-timeout);
+
+	/*
+	 * We return IRQ_HANDLED unconditionally here even if there was
+	 * nothing to do.  There is a possibility that a packet might
+	 * get enqueued into the chip right after TX_EMPTY_INT is raised
+	 * but just before the CPU acknowledges the IRQ.
+	 * Better take an unneeded IRQ in some occasions than complexifying
+	 * the code for all cases.
+	 */
+	return IRQ_HANDLED;
+}
+
+/* Our watchdog timed out. Called by the networking layer */
+static void smc_timeout(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+
+	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+
+	smc_reset(dev);
+	smc_enable(dev);
+
+#if 0
+	/*
+	 * Reconfiguring the PHY doesn't seem like a bad idea here, but
+	 * it introduced a problem.  Now that this is a timeout routine,
+	 * we are getting called from within an interrupt context.
+	 * smc_phy_configure() calls msleep() which calls
+	 * schedule_timeout() which calls schedule().  When schedule()
+	 * is called from an interrupt context, it prints out
+	 * "Scheduling in interrupt" and then calls BUG().  This is
+	 * obviously not desirable.  This was worked around by removing
+	 * the call to smc_phy_configure() here because it didn't seem
+	 * absolutely necessary.  Ultimately, if msleep() is
+	 * supposed to be usable from an interrupt context (which it
+	 * looks like it thinks it should handle), it should be fixed.
+	 */
+	if (lp->phy_type != 0)
+		smc_phy_configure(dev);
+#endif
+
+	/* clear anything saved */
+	if (lp->saved_skb != NULL) {
+		dev_kfree_skb (lp->saved_skb);
+		lp->saved_skb = NULL;
+		lp->stats.tx_errors++;
+		lp->stats.tx_aborted_errors++;
+	}
+	/* We can accept TX packets again */
+	dev->trans_start = jiffies;
+	netif_wake_queue(dev);
+}
+
+/*
+ *    This sets the internal hardware table to filter out unwanted multicast
+ *    packets before they take up memory.
+ *
+ *    The SMC chip uses a hash table where the high 6 bits of the CRC of
+ *    address are the offset into the table.  If that bit is 1, then the
+ *    multicast packet is accepted.  Otherwise, it's dropped silently.
+ *
+ *    To use the 6 bits as an offset into the table, the high 3 bits are the
+ *    number of the 8 bit register, while the low 3 bits are the bit within
+ *    that register.
+ *
+ *    This routine is based very heavily on the one provided by Peter Cammaert.
+ */
+static void
+smc_setmulticast(unsigned long ioaddr, int count, struct dev_mc_list *addrs)
+{
+	int i;
+	unsigned char multicast_table[8];
+	struct dev_mc_list *cur_addr;
+
+	/* table for flipping the order of 3 bits */
+	static unsigned char invert3[] = { 0, 4, 2, 6, 1, 5, 3, 7 };
+
+	/* start with a table of all zeros: reject all */
+	memset(multicast_table, 0, sizeof(multicast_table));
+
+	cur_addr = addrs;
+	for (i = 0; i < count; i++, cur_addr = cur_addr->next) {
+		int position;
+
+		/* do we have a pointer here? */
+		if (!cur_addr)
+			break;
+		/* make sure this is a multicast address - shouldn't this
+		   be a given if we have it here ? */
+		if (!(*cur_addr->dmi_addr & 1))
+			continue;
+
+		/* only use the low order bits */
+		position = crc32_le(~0, cur_addr->dmi_addr, 6) & 0x3f;
+
+		/* do some messy swapping to put the bit in the right spot */
+		multicast_table[invert3[position&7]] |=
+					(1<<invert3[(position>>3)&7]);
+
+	}
+	/* now, the table can be loaded into the chipset */
+	SMC_SELECT_BANK(3);
+	SMC_SET_MCAST(multicast_table);
+}
+
+/*
+ * This routine will, depending on the values passed to it,
+ * either make it accept multicast packets, go into
+ * promiscuous mode (for TCPDUMP and cousins) or accept
+ * a select set of multicast packets
+ */
+static void smc_set_multicast_list(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned long ioaddr = dev->base_addr;
+
+	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+
+	SMC_SELECT_BANK(0);
+	if (dev->flags & IFF_PROMISC) {
+		DBG(2, "%s: RCR_PRMS\n", dev->name);
+		lp->rcr_cur_mode |= RCR_PRMS;
+		SMC_SET_RCR(lp->rcr_cur_mode);
+	}
+
+/* BUG?  I never disable promiscuous mode if multicasting was turned on.
+   Now, I turn off promiscuous mode, but I don't do anything to multicasting
+   when promiscuous mode is turned on.
+*/
+
+	/*
+	 * Here, I am setting this to accept all multicast packets.
+	 * I don't need to zero the multicast table, because the flag is
+	 * checked before the table is
+	 */
+	else if (dev->flags & IFF_ALLMULTI || dev->mc_count > 16) {
+		lp->rcr_cur_mode |= RCR_ALMUL;
+		SMC_SET_RCR(lp->rcr_cur_mode);
+		DBG(2, "%s: RCR_ALMUL\n", dev->name);
+	}
+
+	/*
+	 * We just get all multicast packets even if we only want them
+	 * from one source.  This will be changed at some future point.
+	 */
+	else if (dev->mc_count)  {
+		/* support hardware multicasting */
+
+		/* be sure I get rid of flags I might have set */
+		lp->rcr_cur_mode &= ~(RCR_PRMS | RCR_ALMUL);
+		SMC_SET_RCR(lp->rcr_cur_mode);
+		/*
+		 * NOTE: this has to set the bank, so make sure it is the
+		 * last thing called.  The bank is set to zero at the top
+		 */
+		smc_setmulticast(ioaddr, dev->mc_count, dev->mc_list);
+	} else  {
+		DBG(2, "%s: ~(RCR_PRMS|RCR_ALMUL)\n", dev->name);
+		lp->rcr_cur_mode &= ~(RCR_PRMS | RCR_ALMUL);
+		SMC_SET_RCR(lp->rcr_cur_mode);
+
+		/*
+		 * since I'm disabling all multicast entirely, I need to
+		 * clear the multicast list
+		 */
+		SMC_SELECT_BANK(3);
+		SMC_CLEAR_MCAST();
+	}
+}
+
+
+/*
+ * Open and Initialize the board
+ *
+ * Set up everything, reset the card, etc..
+ */
+static int
+smc_open(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	unsigned long ioaddr = dev->base_addr;
+
+	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+
+	/*
+	 * Check that the address is valid.  If its not, refuse
+	 * to bring the device up.  The user must specify an
+	 * address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
+	 */
+	if (!is_valid_ether_addr(dev->dev_addr)) {
+		DBG(2, (KERN_DEBUG "smc_open: no valid ethernet hw addr\n"));
+		return -EINVAL;
+	}
+
+	/* clear out all the junk that was put here before... */
+	lp->saved_skb = NULL;
+
+	/* Setup the default Register Modes */
+	lp->tcr_cur_mode = TCR_DEFAULT;
+	lp->rcr_cur_mode = RCR_DEFAULT;
+	lp->rpc_cur_mode = RPC_DEFAULT;
+
+	/*
+	 * If we are not using a MII interface, we need to
+	 * monitor our own carrier signal to detect faults.
+	 */
+	if (lp->phy_type == 0)
+		lp->tcr_cur_mode |= TCR_MON_CSN;
+
+	/* reset the hardware */
+	smc_reset(dev);
+	smc_enable(dev);
+
+	SMC_SELECT_BANK(1);
+	SMC_SET_MAC_ADDR(dev->dev_addr);
+
+	/* Configure the PHY */
+	if (lp->phy_type != 0)
+		smc_phy_configure(dev);
+	else {
+		spin_lock_irq(&lp->lock);
+		smc_10bt_check_media(dev, 1);
+		spin_unlock_irq(&lp->lock);
+	}
+
+	/*
+	 * make sure to initialize the link state with netif_carrier_off()
+	 * somewhere, too --jgarzik
+	 *
+	 * smc_phy_configure() and smc_10bt_check_media() does that. --rmk
+	 */
+	netif_start_queue(dev);
+	return 0;
+}
+
+/*
+ * smc_close
+ *
+ * this makes the board clean up everything that it can
+ * and not talk to the outside world.   Caused by
+ * an 'ifconfig ethX down'
+ */
+static int smc_close(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+
+	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+
+	netif_stop_queue(dev);
+	netif_carrier_off(dev);
+
+	/* clear everything */
+	smc_shutdown(dev->base_addr);
+
+	if (lp->phy_type != 0)
+		smc_phy_powerdown(dev, lp->mii.phy_id);
+
+	return 0;
+}
+
+/*
+ * Get the current statistics.
+ * This may be called with the card open or closed.
+ */
+static struct net_device_stats *smc_query_statistics(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+
+	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+
+	return &lp->stats;
+}
+
+/*
+ * Ethtool support
+ */
+static int
+smc_ethtool_getsettings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	int ret;
+
+	cmd->maxtxpkt = 1;
+	cmd->maxrxpkt = 1;
+
+	if (lp->phy_type != 0) {
+		spin_lock_irq(&lp->lock);
+		ret = mii_ethtool_gset(&lp->mii, cmd);
+		spin_unlock_irq(&lp->lock);
+	} else {
+		cmd->supported = SUPPORTED_10baseT_Half |
+				 SUPPORTED_10baseT_Full |
+				 SUPPORTED_TP | SUPPORTED_AUI;
+
+		if (lp->ctl_rspeed == 10)
+			cmd->speed = SPEED_10;
+		else if (lp->ctl_rspeed == 100)
+			cmd->speed = SPEED_100;
+
+		cmd->autoneg = AUTONEG_DISABLE;
+		cmd->transceiver = XCVR_INTERNAL;
+		cmd->port = 0;
+		cmd->duplex = lp->tcr_cur_mode & TCR_SWFDUP ? DUPLEX_FULL : DUPLEX_HALF;
+
+		ret = 0;
+	}
+
+	return ret;
+}
+
+static int
+smc_ethtool_setsettings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	int ret;
+
+	if (lp->phy_type != 0) {
+		spin_lock_irq(&lp->lock);
+		ret = mii_ethtool_sset(&lp->mii, cmd);
+		spin_unlock_irq(&lp->lock);
+	} else {
+		if (cmd->autoneg != AUTONEG_DISABLE ||
+		    cmd->speed != SPEED_10 ||
+		    (cmd->duplex != DUPLEX_HALF && cmd->duplex != DUPLEX_FULL) ||
+		    (cmd->port != PORT_TP && cmd->port != PORT_AUI))
+			return -EINVAL;
+
+//		lp->port = cmd->port;
+		lp->ctl_rfduplx = cmd->duplex == DUPLEX_FULL;
+
+//		if (netif_running(dev))
+//			smc_set_port(dev);
+
+		ret = 0;
+	}
+
+	return ret;
+}
+
+static void
+smc_ethtool_getdrvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
+{
+	strncpy(info->driver, CARDNAME, sizeof(info->driver));
+	strncpy(info->version, version, sizeof(info->version));
+	strncpy(info->bus_info, dev->class_dev.dev->bus_id, sizeof(info->bus_info));
+}
+
+static int smc_ethtool_nwayreset(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	int ret = -EINVAL;
+
+	if (lp->phy_type != 0) {
+		spin_lock_irq(&lp->lock);
+		ret = mii_nway_restart(&lp->mii);
+		spin_unlock_irq(&lp->lock);
+	}
+
+	return ret;
+}
+
+static u32 smc_ethtool_getmsglevel(struct net_device *dev)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	return lp->msg_enable;
+}
+
+static void smc_ethtool_setmsglevel(struct net_device *dev, u32 level)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	lp->msg_enable = level;
+}
+
+static struct ethtool_ops smc_ethtool_ops = {
+	.get_settings	= smc_ethtool_getsettings,
+	.set_settings	= smc_ethtool_setsettings,
+	.get_drvinfo	= smc_ethtool_getdrvinfo,
+
+	.get_msglevel	= smc_ethtool_getmsglevel,
+	.set_msglevel	= smc_ethtool_setmsglevel,
+	.nway_reset	= smc_ethtool_nwayreset,
+	.get_link	= ethtool_op_get_link,
+//	.get_eeprom	= smc_ethtool_geteeprom,
+//	.set_eeprom	= smc_ethtool_seteeprom,
+};
+
+/*
+ * smc_findirq
+ *
+ * This routine has a simple purpose -- make the SMC chip generate an
+ * interrupt, so an auto-detect routine can detect it, and find the IRQ,
+ */
+/*
+ * does this still work?
+ *
+ * I just deleted auto_irq.c, since it was never built...
+ *   --jgarzik
+ */
+static int __init smc_findirq(unsigned long ioaddr)
+{
+	int timeout = 20;
+	unsigned long cookie;
+
+	DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
+
+	cookie = probe_irq_on();
+
+	/*
+	 * What I try to do here is trigger an ALLOC_INT. This is done
+	 * by allocating a small chunk of memory, which will give an interrupt
+	 * when done.
+	 */
+	/* enable ALLOCation interrupts ONLY */
+	SMC_SELECT_BANK(2);
+	SMC_SET_INT_MASK(IM_ALLOC_INT);
+
+	/*
+ 	 * Allocate 512 bytes of memory.  Note that the chip was just
+	 * reset so all the memory is available
+	 */
+	SMC_SET_MMU_CMD(MC_ALLOC | 1);
+
+	/*
+	 * Wait until positive that the interrupt has been generated
+	 */
+	do {
+		int int_status;
+		udelay(10);
+		int_status = SMC_GET_INT();
+		if (int_status & IM_ALLOC_INT)
+			break;		/* got the interrupt */
+	} while (--timeout);
+
+	/*
+	 * there is really nothing that I can do here if timeout fails,
+	 * as autoirq_report will return a 0 anyway, which is what I
+	 * want in this case.   Plus, the clean up is needed in both
+	 * cases.
+	 */
+
+	/* and disable all interrupts again */
+	SMC_SET_INT_MASK(0);
+
+	/* and return what I found */
+	return probe_irq_off(cookie);
+}
+
+/*
+ * Function: smc_probe(unsigned long ioaddr)
+ *
+ * Purpose:
+ *	Tests to see if a given ioaddr points to an SMC91x chip.
+ *	Returns a 0 on success
+ *
+ * Algorithm:
+ *	(1) see if the high byte of BANK_SELECT is 0x33
+ * 	(2) compare the ioaddr with the base register's address
+ *	(3) see if I recognize the chip ID in the appropriate register
+ *
+ * Here I do typical initialization tasks.
+ *
+ * o  Initialize the structure if needed
+ * o  print out my vanity message if not done so already
+ * o  print out what type of hardware is detected
+ * o  print out the ethernet address
+ * o  find the IRQ
+ * o  set up my private data
+ * o  configure the dev structure with my subroutines
+ * o  actually GRAB the irq.
+ * o  GRAB the region
+ */
+static int __init smc_probe(struct net_device *dev, unsigned long ioaddr)
+{
+	struct smc_local *lp = netdev_priv(dev);
+	static int version_printed = 0;
+	int i, retval;
+	unsigned int val, revision_register;
+	const char *version_string;
+
+	DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
+
+	/* First, see if the high byte is 0x33 */
+	val = SMC_CURRENT_BANK();
+	DBG(2, "%s: bank signature probe returned 0x%04x\n", CARDNAME, val);
+	if ((val & 0xFF00) != 0x3300) {
+		if ((val & 0xFF) == 0x33) {
+			printk(KERN_WARNING
+				"%s: Detected possible byte-swapped interface"
+				" at IOADDR 0x%lx\n", CARDNAME, ioaddr);
+		}
+		retval = -ENODEV;
+		goto err_out;
+	}
+
+	/*
+	 * The above MIGHT indicate a device, but I need to write to
+	 * further test this.
+	 */
+	SMC_SELECT_BANK(0);
+	val = SMC_CURRENT_BANK();
+	if ((val & 0xFF00) != 0x3300) {
+		retval = -ENODEV;
+		goto err_out;
+	}
+
+	/*
+	 * well, we've already written once, so hopefully another
+	 * time won't hurt.  This time, I need to switch the bank
+	 * register to bank 1, so I can access the base address
+	 * register
+	 */
+	SMC_SELECT_BANK(1);
+	val = SMC_GET_BASE();
+	val = ((val & 0x1F00) >> 3) << SMC_IO_SHIFT;
+	if ((ioaddr & ((PAGE_SIZE-1)<<SMC_IO_SHIFT)) != val) {
+		printk("%s: IOADDR %lx doesn't match configuration (%x).\n",
+			CARDNAME, ioaddr, val);
+	}
+
+	/*
+	 * check if the revision register is something that I
+	 * recognize.  These might need to be added to later,
+	 * as future revisions could be added.
+	 */
+	SMC_SELECT_BANK(3);
+	revision_register = SMC_GET_REV();
+	DBG(2, "%s: revision = 0x%04x\n", CARDNAME, revision_register);
+	version_string = chip_ids[ (revision_register >> 4) & 0xF];
+	if (!version_string || (revision_register & 0xff00) != 0x3300) {
+		/* I don't recognize this chip, so... */
+		printk("%s: IO 0x%lx: Unrecognized revision register 0x%04x"
+			", Contact author.\n", CARDNAME,
+			ioaddr, revision_register);
+
+		retval = -ENODEV;
+		goto err_out;
+	}
+
+	/* At this point I'll assume that the chip is an SMC91x. */
+	if (version_printed++ == 0)
+		printk("%s", version);
+
+	/* fill in some of the fields */
+	dev->base_addr = ioaddr;
+	lp->version = revision_register & 0xff;
+
+	/* Get the MAC address */
+	SMC_SELECT_BANK(1);
+	SMC_GET_MAC_ADDR(dev->dev_addr);
+
+	/* now, reset the chip, and put it into a known state */
+	smc_reset(dev);
+
+	/*
+	 * If dev->irq is 0, then the device has to be banged on to see
+	 * what the IRQ is.
+ 	 *
+	 * This banging doesn't always detect the IRQ, for unknown reasons.
+	 * a workaround is to reset the chip and try again.
+	 *
+	 * Interestingly, the DOS packet driver *SETS* the IRQ on the card to
+	 * be what is requested on the command line.   I don't do that, mostly
+	 * because the card that I have uses a non-standard method of accessing
+	 * the IRQs, and because this _should_ work in most configurations.
+	 *
+	 * Specifying an IRQ is done with the assumption that the user knows
+	 * what (s)he is doing.  No checking is done!!!!
+	 */
+	if (dev->irq < 1) {
+		int trials;
+
+		trials = 3;
+		while (trials--) {
+			dev->irq = smc_findirq(ioaddr);
+			if (dev->irq)
+				break;
+			/* kick the card and try again */
+			smc_reset(dev);
+		}
+	}
+	if (dev->irq == 0) {
+		printk("%s: Couldn't autodetect your IRQ. Use irq=xx.\n",
+			dev->name);
+		retval = -ENODEV;
+		goto err_out;
+	}
+	dev->irq = irq_canonicalize(dev->irq);
+
+	/* Fill in the fields of the device structure with ethernet values. */
+	ether_setup(dev);
+
+	dev->open = smc_open;
+	dev->stop = smc_close;
+	dev->hard_start_xmit = smc_hard_start_xmit;
+	dev->tx_timeout = smc_timeout;
+	dev->watchdog_timeo = msecs_to_jiffies(watchdog);
+	dev->get_stats = smc_query_statistics;
+	dev->set_multicast_list = smc_set_multicast_list;
+	dev->ethtool_ops = &smc_ethtool_ops;
+
+	spin_lock_init(&lp->lock);
+	lp->mii.phy_id_mask = 0x1f;
+	lp->mii.reg_num_mask = 0x1f;
+	lp->mii.force_media = 0;
+	lp->mii.full_duplex = 0;
+	lp->mii.dev = dev;
+	lp->mii.mdio_read = smc_phy_read;
+	lp->mii.mdio_write = smc_phy_write;
+
+	/*
+	 * Locate the phy, if any.
+	 */
+	if (lp->version >= (CHIP_91100 << 4))
+		smc_detect_phy(dev);
+
+	/* Set default parameters */
+	lp->msg_enable = NETIF_MSG_LINK;
+	lp->ctl_rfduplx = 0;
+	lp->ctl_rspeed = 10;
+
+	if (lp->version >= (CHIP_91100 << 4)) {
+		lp->ctl_rfduplx = 1;
+		lp->ctl_rspeed = 100;
+	}
+
+	/* Grab the IRQ */
+      	retval = request_irq(dev->irq, &smc_interrupt, 0, dev->name, dev);
+      	if (retval)
+      		goto err_out;
+
+	set_irq_type(dev->irq, IRQT_RISING);
+#ifdef SMC_USE_PXA_DMA
+	{
+		int dma = pxa_request_dma(dev->name, DMA_PRIO_LOW,
+					  smc_pxa_dma_irq, NULL);
+		if (dma >= 0)
+			dev->dma = dma;
+	}
+#endif
+
+	retval = register_netdev(dev);
+	if (retval == 0) {
+		/* now, print out the card info, in a short format.. */
+		printk("%s: %s (rev %d) at %#lx IRQ %d",
+			dev->name, version_string, revision_register & 0x0f,
+			dev->base_addr, dev->irq);
+
+		if (dev->dma != (unsigned char)-1)
+			printk(" DMA %d", dev->dma);
+
+		printk("%s%s\n", nowait ? " [nowait]" : "",
+			THROTTLE_TX_PKTS ? " [throttle_tx]" : "");
+
+		if (!is_valid_ether_addr(dev->dev_addr)) {
+			printk("%s: Invalid ethernet MAC address.  Please "
+			       "set using ifconfig\n", dev->name);
+		} else {
+			/* Print the Ethernet address */
+			printk("%s: Ethernet addr: ", dev->name);
+			for (i = 0; i < 5; i++)
+				printk("%2.2x:", dev->dev_addr[i]);
+			printk("%2.2x\n", dev->dev_addr[5]);
+		}
+
+		if (lp->phy_type == 0) {
+			PRINTK("%s: No PHY found\n", dev->name);
+		} else if ((lp->phy_type & 0xfffffff0) == 0x0016f840) {
+			PRINTK("%s: PHY LAN83C183 (LAN91C111 Internal)\n", dev->name);
+		} else if ((lp->phy_type & 0xfffffff0) == 0x02821c50) {
+			PRINTK("%s: PHY LAN83C180\n", dev->name);
+		}
+	}
+
+err_out:
+#ifdef SMC_USE_PXA_DMA
+	if (retval && dev->dma != (unsigned char)-1)
+		pxa_free_dma(dev->dma);
+#endif
+	return retval;
+}
+
+static int smc_enable_device(unsigned long attrib_phys)
+{
+	unsigned long flags;
+	unsigned char ecor, ecsr;
+	void *addr;
+
+	/*
+	 * Map the attribute space.  This is overkill, but clean.
+	 */
+	addr = ioremap(attrib_phys, ATTRIB_SIZE);
+	if (!addr)
+		return -ENOMEM;
+
+	/*
+	 * Reset the device.  We must disable IRQs around this
+	 * since a reset causes the IRQ line become active.
+	 */
+	local_irq_save(flags);
+	ecor = readb(addr + (ECOR << SMC_IO_SHIFT)) & ~ECOR_RESET;
+	writeb(ecor | ECOR_RESET, addr + (ECOR << SMC_IO_SHIFT));
+	readb(addr + (ECOR << SMC_IO_SHIFT));
+
+	/*
+	 * Wait 100us for the chip to reset.
+	 */
+	udelay(100);
+
+	/*
+	 * The device will ignore all writes to the enable bit while
+	 * reset is asserted, even if the reset bit is cleared in the
+	 * same write.  Must clear reset first, then enable the device.
+	 */
+	writeb(ecor, addr + (ECOR << SMC_IO_SHIFT));
+	writeb(ecor | ECOR_ENABLE, addr + (ECOR << SMC_IO_SHIFT));
+
+	/*
+	 * Set the appropriate byte/word mode.
+	 */
+	ecsr = readb(addr + (ECSR << SMC_IO_SHIFT)) & ~ECSR_IOIS8;
+#ifndef SMC_CAN_USE_16BIT
+	ecsr |= ECSR_IOIS8;
+#endif
+	writeb(ecsr, addr + (ECSR << SMC_IO_SHIFT));
+	local_irq_restore(flags);
+
+	iounmap(addr);
+
+	/*
+	 * Wait for the chip to wake up.  We could poll the control
+	 * register in the main register space, but that isn't mapped
+	 * yet.  We know this is going to take 750us.
+	 */
+	msleep(1);
+
+	return 0;
+}
+
+/*
+ * smc_init(void)
+ *   Input parameters:
+ *	dev->base_addr == 0, try to find all possible locations
+ *	dev->base_addr > 0x1ff, this is the address to check
+ *	dev->base_addr == <anything else>, return failure code
+ *
+ *   Output:
+ *	0 --> there is a device
+ *	anything else, error
+ */
+static int smc_drv_probe(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct net_device *ndev;
+	struct resource *res, *ext = NULL;
+	unsigned int *addr;
+	int ret;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res) {
+		ret = -ENODEV;
+		goto out;
+	}
+
+	/*
+	 * Request the regions.
+	 */
+	if (!request_mem_region(res->start, SMC_IO_EXTENT, "smc91x")) {
+		ret = -EBUSY;
+		goto out;
+	}
+
+	ndev = alloc_etherdev(sizeof(struct smc_local));
+	if (!ndev) {
+		printk("%s: could not allocate device.\n", CARDNAME);
+		ret = -ENOMEM;
+		goto release_1;
+	}
+	SET_MODULE_OWNER(ndev);
+	SET_NETDEV_DEV(ndev, dev);
+
+	ndev->dma = (unsigned char)-1;
+	ndev->irq = platform_get_irq(pdev, 0);
+
+	ext = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+	if (ext) {
+		if (!request_mem_region(ext->start, ATTRIB_SIZE, ndev->name)) {
+			ret = -EBUSY;
+			goto release_1;
+		}
+
+#if defined(CONFIG_SA1100_ASSABET)
+		NCR_0 |= NCR_ENET_OSC_EN;
+#endif
+
+		ret = smc_enable_device(ext->start);
+		if (ret)
+			goto release_both;
+	}
+
+	addr = ioremap(res->start, SMC_IO_EXTENT);
+	if (!addr) {
+		ret = -ENOMEM;
+		goto release_both;
+	}
+
+	dev_set_drvdata(dev, ndev);
+	ret = smc_probe(ndev, (unsigned long)addr);
+	if (ret != 0) {
+		dev_set_drvdata(dev, NULL);
+		iounmap(addr);
+ release_both:
+		if (ext)
+			release_mem_region(ext->start, ATTRIB_SIZE);
+		free_netdev(ndev);
+ release_1:
+		release_mem_region(res->start, SMC_IO_EXTENT);
+ out:
+		printk("%s: not found (%d).\n", CARDNAME, ret);
+	}
+#ifdef SMC_USE_PXA_DMA
+	else {
+		struct smc_local *lp = netdev_priv(ndev);
+		lp->physaddr = res->start;
+	}
+#endif
+
+	return ret;
+}
+
+static int smc_drv_remove(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct net_device *ndev = dev_get_drvdata(dev);
+	struct resource *res;
+
+	dev_set_drvdata(dev, NULL);
+
+	unregister_netdev(ndev);
+
+	free_irq(ndev->irq, ndev);
+
+#ifdef SMC_USE_PXA_DMA
+	if (ndev->dma != (unsigned char)-1)
+		pxa_free_dma(ndev->dma);
+#endif
+	iounmap((void *)ndev->base_addr);
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+	if (res)
+		release_mem_region(res->start, ATTRIB_SIZE);
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	release_mem_region(res->start, SMC_IO_EXTENT);
+
+	free_netdev(ndev);
+
+	return 0;
+}
+
+static int smc_drv_suspend(struct device *dev, u32 state, u32 level)
+{
+	struct net_device *ndev = dev_get_drvdata(dev);
+
+	if (ndev && level == SUSPEND_DISABLE) {
+		if (netif_running(ndev)) {
+			netif_device_detach(ndev);
+			smc_shutdown(ndev->base_addr);
+		}
+	}
+	return 0;
+}
+
+static int smc_drv_resume(struct device *dev, u32 level)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct net_device *ndev = dev_get_drvdata(dev);
+
+	if (ndev && level == RESUME_ENABLE) {
+		struct smc_local *lp = netdev_priv(ndev);
+		unsigned long ioaddr = ndev->base_addr;
+
+		if (pdev->num_resources == 3)
+			smc_enable_device(pdev->resource[2].start);
+		if (netif_running(ndev)) {
+			smc_reset(ndev);
+			smc_enable(ndev);
+			SMC_SELECT_BANK(1);
+			SMC_SET_MAC_ADDR(ndev->dev_addr);
+			if (lp->phy_type != 0)
+				smc_phy_configure(ndev);
+			netif_device_attach(ndev);
+		}
+	}
+	return 0;
+}
+
+static struct device_driver smc_driver = {
+	.name		= CARDNAME,
+	.bus		= &platform_bus_type,
+	.probe		= smc_drv_probe,
+	.remove		= smc_drv_remove,
+	.suspend	= smc_drv_suspend,
+	.resume		= smc_drv_resume,
+};
+
+static int __init smc_init(void)
+{
+#ifdef MODULE
+	if (io == -1)
+		printk(KERN_WARNING 
+			"%s: You shouldn't use auto-probing with insmod!\n",
+			CARDNAME);
+#endif
+
+	return driver_register(&smc_driver);
+}
+
+static void __exit smc_cleanup(void)
+{
+	driver_unregister(&smc_driver);
+}
+
+module_init(smc_init);
+module_exit(smc_cleanup);
--- diff/drivers/net/arm/smc91x.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/net/arm/smc91x.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,829 @@
+/*------------------------------------------------------------------------
+ . smc91x.h - macros for SMSC's 91C9x/91C1xx single-chip Ethernet device.
+ .
+ . Copyright (C) 1996 by Erik Stahlman
+ . Copyright (C) 2001 Standard Microsystems Corporation
+ .	Developed by Simple Network Magic Corporation
+ . Copyright (C) 2003 Monta Vista Software, Inc.
+ .	Unified SMC91x driver by Nicolas Pitre
+ .
+ . 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
+ .
+ . Information contained in this file was obtained from the LAN91C111
+ . manual from SMC.  To get a copy, if you really want one, you can find
+ . information under www.smsc.com.
+ .
+ . Authors
+ .	Erik Stahlman		<erik@vt.edu>
+ .	Daris A Nevil		<dnevil@snmc.com>
+ .	Nicolas Pitre 		<nico@cam.org>
+ .
+ ---------------------------------------------------------------------------*/
+#ifndef _SMC91X_H_
+#define _SMC91X_H_
+
+
+/*
+ * Define your architecture specific bus configuration parameters here.
+ */
+
+#if	defined(CONFIG_SA1100_GRAPHICSCLIENT) || \
+	defined(CONFIG_SA1100_PFS168) || \
+	defined(CONFIG_SA1100_FLEXANET) || \
+	defined(CONFIG_SA1100_GRAPHICSMASTER) || \
+	defined(CONFIG_ARCH_LUBBOCK)
+
+/* We can only do 16-bit reads and writes in the static memory space. */
+#define SMC_CAN_USE_8BIT	0
+#define SMC_CAN_USE_16BIT	1
+#define SMC_CAN_USE_32BIT	0
+#define SMC_NOWAIT		1
+
+/* The first two address lines aren't connected... */
+#define SMC_IO_SHIFT		2
+
+#define SMC_inw(a, r)		readw((a) + (r))
+#define SMC_outw(v, a, r)	writew(v, (a) + (r))
+#define SMC_insw(a, r, p, l)	readsw((a) + (r), p, l)
+#define SMC_outsw(a, r, p, l)	writesw((a) + (r), p, l)
+
+#elif defined(CONFIG_SA1100_ASSABET)
+
+#include <asm/arch/neponset.h>
+
+/* We can only do 8-bit reads and writes in the static memory space. */
+#define SMC_CAN_USE_8BIT	1
+#define SMC_CAN_USE_16BIT	0
+#define SMC_CAN_USE_32BIT	0
+#define SMC_NOWAIT		1
+
+/* The first two address lines aren't connected... */
+#define SMC_IO_SHIFT		2
+
+#define SMC_inb(a, r)		readb((a) + (r))
+#define SMC_outb(v, a, r)	writeb(v, (a) + (r))
+#define SMC_insb(a, r, p, l)	readsb((a) + (r), p, (l))
+#define SMC_outsb(a, r, p, l)	writesb((a) + (r), p, (l))
+
+#elif	defined(CONFIG_ARCH_INNOKOM) || \
+	defined(CONFIG_MACH_MAINSTONE) || \
+	defined(CONFIG_ARCH_PXA_IDP) || \
+	defined(CONFIG_ARCH_RAMSES)
+
+#define SMC_CAN_USE_8BIT	1
+#define SMC_CAN_USE_16BIT	1
+#define SMC_CAN_USE_32BIT	1
+#define SMC_IO_SHIFT		0
+#define SMC_NOWAIT		1
+#define SMC_USE_PXA_DMA		1
+
+#define SMC_inb(a, r)		readb((a) + (r))
+#define SMC_inw(a, r)		readw((a) + (r))
+#define SMC_inl(a, r)		readl((a) + (r))
+#define SMC_outb(v, a, r)	writeb(v, (a) + (r))
+#define SMC_outl(v, a, r)	writel(v, (a) + (r))
+#define SMC_insl(a, r, p, l)	readsl((a) + (r), p, l)
+#define SMC_outsl(a, r, p, l)	writesl((a) + (r), p, l)
+
+/* We actually can't write halfwords properly if not word aligned */
+static inline void
+SMC_outw(u16 val, unsigned long ioaddr, int reg)
+{
+	if (reg & 2) {
+		unsigned int v = val << 16;
+		v |= readl(ioaddr + (reg & ~2)) & 0xffff;
+		writel(v, ioaddr + (reg & ~2));
+	} else {
+		writew(val, ioaddr + reg);
+	}
+}
+
+#elif	defined(CONFIG_ISA)
+
+#define SMC_CAN_USE_8BIT	1
+#define SMC_CAN_USE_16BIT	1
+#define SMC_CAN_USE_32BIT	0
+
+#define SMC_inb(a, r)		inb((a) + (r))
+#define SMC_inw(a, r)		inw((a) + (r))
+#define SMC_outb(v, a, r)	outb(v, (a) + (r))
+#define SMC_outw(v, a, r)	outw(v, (a) + (r))
+#define SMC_insw(a, r, p, l)	insw((a) + (r), p, l)
+#define SMC_outsw(a, r, p, l)	outsw((a) + (r), p, l)
+
+#else
+
+#define SMC_CAN_USE_8BIT	1
+#define SMC_CAN_USE_16BIT	1
+#define SMC_CAN_USE_32BIT	1
+#define SMC_NOWAIT		1
+
+#define SMC_inb(a, r)		readb((a) + (r))
+#define SMC_inw(a, r)		readw((a) + (r))
+#define SMC_inl(a, r)		readl((a) + (r))
+#define SMC_outb(v, a, r)	writeb(v, (a) + (r))
+#define SMC_outw(v, a, r)	writew(v, (a) + (r))
+#define SMC_outl(v, a, r)	writel(v, (a) + (r))
+#define SMC_insl(a, r, p, l)	readsl((a) + (r), p, l)
+#define SMC_outsl(a, r, p, l)	writesl((a) + (r), p, l)
+
+#define RPC_LSA_DEFAULT		RPC_LED_100_10
+#define RPC_LSB_DEFAULT		RPC_LED_TX_RX
+
+#endif
+
+
+#ifdef SMC_USE_PXA_DMA
+/*
+ * Let's use the DMA engine on the XScale PXA2xx for RX packets. This is
+ * always happening in irq context so no need to worry about races.  TX is
+ * different and probably not worth it for that reason, and not as critical
+ * as RX which can overrun memory and lose packets.
+ */
+#include <linux/pci.h>
+#include <asm/dma.h>
+
+#ifdef SMC_insl
+#undef SMC_insl
+#define SMC_insl(a, r, p, l) \
+	smc_pxa_dma_insl(a, lp->physaddr, r, dev->dma, p, l)
+static inline void
+smc_pxa_dma_insl(u_long ioaddr, u_long physaddr, int reg, int dma,
+		 u_char *buf, int len)
+{
+	dma_addr_t dmabuf;
+
+	/* fallback if no DMA available */
+	if (dma == (unsigned char)-1) {
+		readsl(ioaddr + reg, buf, len);
+		return;
+	}
+
+	/* 64 bit alignment is required for memory to memory DMA */
+	if ((long)buf & 4) {
+		*((u32 *)buf)++ = SMC_inl(ioaddr, reg);
+		len--;
+	}
+
+	len *= 4;
+	dmabuf = dma_map_single(NULL, buf, len, PCI_DMA_FROMDEVICE);
+	DCSR(dma) = DCSR_NODESC;
+	DTADR(dma) = dmabuf;
+	DSADR(dma) = physaddr + reg;
+	DCMD(dma) = (DCMD_INCTRGADDR | DCMD_BURST32 |
+		     DCMD_WIDTH4 | (DCMD_LENGTH & len));
+	DCSR(dma) = DCSR_NODESC | DCSR_RUN;
+	while (!(DCSR(dma) & DCSR_STOPSTATE));
+	DCSR(dma) = 0;
+	dma_unmap_single(NULL, dmabuf, len, PCI_DMA_FROMDEVICE);
+}
+#endif
+
+#ifdef SMC_insw
+#undef SMC_insw
+#define SMC_insw(a, r, p, l) \
+	smc_pxa_dma_insw(a, lp->physaddr, r, dev->dma, p, l)
+static inline void
+smc_pxa_dma_insw(u_long ioaddr, u_long physaddr, int reg, int dma,
+		 u_char *buf, int len)
+{
+	dma_addr_t dmabuf;
+
+	/* fallback if no DMA available */
+	if (dma == (unsigned char)-1) {
+		readsw(ioaddr + reg, buf, len);
+		return;
+	}
+
+	/* 64 bit alignment is required for memory to memory DMA */
+	while ((long)buf & 6) {
+		*((u16 *)buf)++ = SMC_inw(ioaddr, reg);
+		len--;
+	}
+
+	len *= 2;
+	dmabuf = dma_map_single(NULL, buf, len, PCI_DMA_FROMDEVICE);
+	DCSR(dma) = DCSR_NODESC;
+	DTADR(dma) = dmabuf;
+	DSADR(dma) = physaddr + reg;
+	DCMD(dma) = (DCMD_INCTRGADDR | DCMD_BURST32 |
+		     DCMD_WIDTH2 | (DCMD_LENGTH & len));
+	DCSR(dma) = DCSR_NODESC | DCSR_RUN;
+	while (!(DCSR(dma) & DCSR_STOPSTATE));
+	DCSR(dma) = 0;
+	dma_unmap_single(NULL, dmabuf, len, PCI_DMA_FROMDEVICE);
+}
+#endif
+
+static void
+smc_pxa_dma_irq(int dma, void *dummy, struct pt_regs *regs)
+{
+	DCSR(dma) = 0;
+}
+#endif  /* SMC_USE_PXA_DMA */
+
+
+/* Because of bank switching, the LAN91x uses only 16 I/O ports */
+#ifndef SMC_IO_SHIFT
+#define SMC_IO_SHIFT	0
+#endif
+#define SMC_IO_EXTENT	(16 << SMC_IO_SHIFT)
+
+
+/*
+ . Bank Select Register:
+ .
+ .		yyyy yyyy 0000 00xx
+ .		xx 		= bank number
+ .		yyyy yyyy	= 0x33, for identification purposes.
+*/
+#define BANK_SELECT		(14 << SMC_IO_SHIFT)
+
+
+// Transmit Control Register
+/* BANK 0  */
+#define TCR_REG 	SMC_REG(0x0000, 0)
+#define TCR_ENABLE	0x0001	// When 1 we can transmit
+#define TCR_LOOP	0x0002	// Controls output pin LBK
+#define TCR_FORCOL	0x0004	// When 1 will force a collision
+#define TCR_PAD_EN	0x0080	// When 1 will pad tx frames < 64 bytes w/0
+#define TCR_NOCRC	0x0100	// When 1 will not append CRC to tx frames
+#define TCR_MON_CSN	0x0400	// When 1 tx monitors carrier
+#define TCR_FDUPLX    	0x0800  // When 1 enables full duplex operation
+#define TCR_STP_SQET	0x1000	// When 1 stops tx if Signal Quality Error
+#define TCR_EPH_LOOP	0x2000	// When 1 enables EPH block loopback
+#define TCR_SWFDUP	0x8000	// When 1 enables Switched Full Duplex mode
+
+#define TCR_CLEAR	0	/* do NOTHING */
+/* the default settings for the TCR register : */
+#define TCR_DEFAULT	(TCR_ENABLE | TCR_PAD_EN)
+
+
+// EPH Status Register
+/* BANK 0  */
+#define EPH_STATUS_REG	SMC_REG(0x0002, 0)
+#define ES_TX_SUC	0x0001	// Last TX was successful
+#define ES_SNGL_COL	0x0002	// Single collision detected for last tx
+#define ES_MUL_COL	0x0004	// Multiple collisions detected for last tx
+#define ES_LTX_MULT	0x0008	// Last tx was a multicast
+#define ES_16COL	0x0010	// 16 Collisions Reached
+#define ES_SQET		0x0020	// Signal Quality Error Test
+#define ES_LTXBRD	0x0040	// Last tx was a broadcast
+#define ES_TXDEFR	0x0080	// Transmit Deferred
+#define ES_LATCOL	0x0200	// Late collision detected on last tx
+#define ES_LOSTCARR	0x0400	// Lost Carrier Sense
+#define ES_EXC_DEF	0x0800	// Excessive Deferral
+#define ES_CTR_ROL	0x1000	// Counter Roll Over indication
+#define ES_LINK_OK	0x4000	// Driven by inverted value of nLNK pin
+#define ES_TXUNRN	0x8000	// Tx Underrun
+
+
+// Receive Control Register
+/* BANK 0  */
+#define RCR_REG		SMC_REG(0x0004, 0)
+#define RCR_RX_ABORT	0x0001	// Set if a rx frame was aborted
+#define RCR_PRMS	0x0002	// Enable promiscuous mode
+#define RCR_ALMUL	0x0004	// When set accepts all multicast frames
+#define RCR_RXEN	0x0100	// IFF this is set, we can receive packets
+#define RCR_STRIP_CRC	0x0200	// When set strips CRC from rx packets
+#define RCR_ABORT_ENB	0x0200	// When set will abort rx on collision
+#define RCR_FILT_CAR	0x0400	// When set filters leading 12 bit s of carrier
+#define RCR_SOFTRST	0x8000 	// resets the chip
+
+/* the normal settings for the RCR register : */
+#define RCR_DEFAULT	(RCR_STRIP_CRC | RCR_RXEN)
+#define RCR_CLEAR	0x0	// set it to a base state
+
+
+// Counter Register
+/* BANK 0  */
+#define COUNTER_REG	SMC_REG(0x0006, 0)
+
+
+// Memory Information Register
+/* BANK 0  */
+#define MIR_REG		SMC_REG(0x0008, 0)
+
+
+// Receive/Phy Control Register
+/* BANK 0  */
+#define RPC_REG		SMC_REG(0x000A, 0)
+#define RPC_SPEED	0x2000	// When 1 PHY is in 100Mbps mode.
+#define RPC_DPLX	0x1000	// When 1 PHY is in Full-Duplex Mode
+#define RPC_ANEG	0x0800	// When 1 PHY is in Auto-Negotiate Mode
+#define RPC_LSXA_SHFT	5	// Bits to shift LS2A,LS1A,LS0A to lsb
+#define RPC_LSXB_SHFT	2	// Bits to get LS2B,LS1B,LS0B to lsb
+#define RPC_LED_100_10	(0x00)	// LED = 100Mbps OR's with 10Mbps link detect
+#define RPC_LED_RES	(0x01)	// LED = Reserved
+#define RPC_LED_10	(0x02)	// LED = 10Mbps link detect
+#define RPC_LED_FD	(0x03)	// LED = Full Duplex Mode
+#define RPC_LED_TX_RX	(0x04)	// LED = TX or RX packet occurred
+#define RPC_LED_100	(0x05)	// LED = 100Mbps link dectect
+#define RPC_LED_TX	(0x06)	// LED = TX packet occurred
+#define RPC_LED_RX	(0x07)	// LED = RX packet occurred
+
+#ifndef RPC_LSA_DEFAULT
+#define RPC_LSA_DEFAULT	RPC_LED_100
+#endif
+#ifndef RPC_LSB_DEFAULT
+#define RPC_LSB_DEFAULT RPC_LED_FD
+#endif
+
+#define RPC_DEFAULT (RPC_ANEG | (RPC_LSA_DEFAULT << RPC_LSXA_SHFT) | (RPC_LSB_DEFAULT << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)
+
+
+/* Bank 0 0x0C is reserved */
+
+// Bank Select Register
+/* All Banks */
+#define BSR_REG		0x000E
+
+
+// Configuration Reg
+/* BANK 1 */
+#define CONFIG_REG	SMC_REG(0x0000,	1)
+#define CONFIG_EXT_PHY	0x0200	// 1=external MII, 0=internal Phy
+#define CONFIG_GPCNTRL	0x0400	// Inverse value drives pin nCNTRL
+#define CONFIG_NO_WAIT	0x1000	// When 1 no extra wait states on ISA bus
+#define CONFIG_EPH_POWER_EN 0x8000 // When 0 EPH is placed into low power mode.
+
+// Default is powered-up, Internal Phy, Wait States, and pin nCNTRL=low
+#define CONFIG_DEFAULT	(CONFIG_EPH_POWER_EN)
+
+
+// Base Address Register
+/* BANK 1 */
+#define BASE_REG	SMC_REG(0x0002, 1)
+
+
+// Individual Address Registers
+/* BANK 1 */
+#define ADDR0_REG	SMC_REG(0x0004, 1)
+#define ADDR1_REG	SMC_REG(0x0006, 1)
+#define ADDR2_REG	SMC_REG(0x0008, 1)
+
+
+// General Purpose Register
+/* BANK 1 */
+#define GP_REG		SMC_REG(0x000A, 1)
+
+
+// Control Register
+/* BANK 1 */
+#define CTL_REG		SMC_REG(0x000C, 1)
+#define CTL_RCV_BAD	0x4000 // When 1 bad CRC packets are received
+#define CTL_AUTO_RELEASE 0x0800 // When 1 tx pages are released automatically
+#define CTL_LE_ENABLE	0x0080 // When 1 enables Link Error interrupt
+#define CTL_CR_ENABLE	0x0040 // When 1 enables Counter Rollover interrupt
+#define CTL_TE_ENABLE	0x0020 // When 1 enables Transmit Error interrupt
+#define CTL_EEPROM_SELECT 0x0004 // Controls EEPROM reload & store
+#define CTL_RELOAD	0x0002 // When set reads EEPROM into registers
+#define CTL_STORE	0x0001 // When set stores registers into EEPROM
+
+
+// MMU Command Register
+/* BANK 2 */
+#define MMU_CMD_REG	SMC_REG(0x0000, 2)
+#define MC_BUSY		1	// When 1 the last release has not completed
+#define MC_NOP		(0<<5)	// No Op
+#define MC_ALLOC	(1<<5) 	// OR with number of 256 byte packets
+#define MC_RESET	(2<<5)	// Reset MMU to initial state
+#define MC_REMOVE	(3<<5) 	// Remove the current rx packet
+#define MC_RELEASE  	(4<<5) 	// Remove and release the current rx packet
+#define MC_FREEPKT  	(5<<5) 	// Release packet in PNR register
+#define MC_ENQUEUE	(6<<5)	// Enqueue the packet for transmit
+#define MC_RSTTXFIFO	(7<<5)	// Reset the TX FIFOs
+
+
+// Packet Number Register
+/* BANK 2 */
+#define PN_REG		SMC_REG(0x0002, 2)
+
+
+// Allocation Result Register
+/* BANK 2 */
+#define AR_REG		SMC_REG(0x0003, 2)
+#define AR_FAILED	0x80	// Alocation Failed
+
+
+// TX FIFO Ports Register
+/* BANK 2 */
+#define TXFIFO_REG	SMC_REG(0x0004, 2)
+#define TXFIFO_TEMPTY	0x80	// TX FIFO Empty
+
+// RX FIFO Ports Register
+/* BANK 2 */
+#define RXFIFO_REG	SMC_REG(0x0005, 2)
+#define RXFIFO_REMPTY	0x80	// RX FIFO Empty
+
+#define FIFO_REG	SMC_REG(0x0004, 2)
+
+// Pointer Register
+/* BANK 2 */
+#define PTR_REG		SMC_REG(0x0006, 2)
+#define PTR_RCV		0x8000 // 1=Receive area, 0=Transmit area
+#define PTR_AUTOINC 	0x4000 // Auto increment the pointer on each access
+#define PTR_READ	0x2000 // When 1 the operation is a read
+
+
+// Data Register
+/* BANK 2 */
+#define DATA_REG	SMC_REG(0x0008, 2)
+
+
+// Interrupt Status/Acknowledge Register
+/* BANK 2 */
+#define INT_REG		SMC_REG(0x000C, 2)
+
+
+// Interrupt Mask Register
+/* BANK 2 */
+#define IM_REG		SMC_REG(0x000D, 2)
+#define IM_MDINT	0x80 // PHY MI Register 18 Interrupt
+#define IM_ERCV_INT	0x40 // Early Receive Interrupt
+#define IM_EPH_INT	0x20 // Set by Ethernet Protocol Handler section
+#define IM_RX_OVRN_INT	0x10 // Set by Receiver Overruns
+#define IM_ALLOC_INT	0x08 // Set when allocation request is completed
+#define IM_TX_EMPTY_INT	0x04 // Set if the TX FIFO goes empty
+#define IM_TX_INT	0x02 // Transmit Interrupt
+#define IM_RCV_INT	0x01 // Receive Interrupt
+
+
+// Multicast Table Registers
+/* BANK 3 */
+#define MCAST_REG1	SMC_REG(0x0000, 3)
+#define MCAST_REG2	SMC_REG(0x0002, 3)
+#define MCAST_REG3	SMC_REG(0x0004, 3)
+#define MCAST_REG4	SMC_REG(0x0006, 3)
+
+
+// Management Interface Register (MII)
+/* BANK 3 */
+#define MII_REG		SMC_REG(0x0008, 3)
+#define MII_MSK_CRS100	0x4000 // Disables CRS100 detection during tx half dup
+#define MII_MDOE	0x0008 // MII Output Enable
+#define MII_MCLK	0x0004 // MII Clock, pin MDCLK
+#define MII_MDI		0x0002 // MII Input, pin MDI
+#define MII_MDO		0x0001 // MII Output, pin MDO
+
+
+// Revision Register
+/* BANK 3 */
+/* ( hi: chip id   low: rev # ) */
+#define REV_REG		SMC_REG(0x000A, 3)
+
+
+// Early RCV Register
+/* BANK 3 */
+/* this is NOT on SMC9192 */
+#define ERCV_REG	SMC_REG(0x000C, 3)
+#define ERCV_RCV_DISCRD	0x0080 // When 1 discards a packet being received
+#define ERCV_THRESHOLD	0x001F // ERCV Threshold Mask
+
+
+// External Register
+/* BANK 7 */
+#define EXT_REG		SMC_REG(0x0000, 7)
+
+
+#define CHIP_9192	3
+#define CHIP_9194	4
+#define CHIP_9195	5
+#define CHIP_9196	6
+#define CHIP_91100	7
+#define CHIP_91100FD	8
+#define CHIP_91111FD	9
+
+static const char * chip_ids[ 16 ] =  {
+	NULL, NULL, NULL,
+	/* 3 */ "SMC91C90/91C92",
+	/* 4 */ "SMC91C94",
+	/* 5 */ "SMC91C95",
+	/* 6 */ "SMC91C96",
+	/* 7 */ "SMC91C100",
+	/* 8 */ "SMC91C100FD",
+	/* 9 */ "SMC91C11xFD",
+	NULL, NULL, NULL,
+	NULL, NULL, NULL};
+
+
+/*
+ . Transmit status bits
+*/
+#define TS_SUCCESS 0x0001
+#define TS_LOSTCAR 0x0400
+#define TS_LATCOL  0x0200
+#define TS_16COL   0x0010
+
+/*
+ . Receive status bits
+*/
+#define RS_ALGNERR	0x8000
+#define RS_BRODCAST	0x4000
+#define RS_BADCRC	0x2000
+#define RS_ODDFRAME	0x1000
+#define RS_TOOLONG	0x0800
+#define RS_TOOSHORT	0x0400
+#define RS_MULTICAST	0x0001
+#define RS_ERRORS	(RS_ALGNERR | RS_BADCRC | RS_TOOLONG | RS_TOOSHORT)
+
+
+/*
+ * PHY IDs
+ *  LAN83C183 == LAN91C111 Internal PHY
+ */
+#define PHY_LAN83C183	0x0016f840
+#define PHY_LAN83C180	0x02821c50
+
+/*
+ * PHY Register Addresses (LAN91C111 Internal PHY)
+ *
+ * Generic PHY registers can be found in <linux/mii.h>
+ *
+ * These phy registers are specific to our on-board phy.
+ */
+
+// PHY Configuration Register 1
+#define PHY_CFG1_REG		0x10
+#define PHY_CFG1_LNKDIS		0x8000	// 1=Rx Link Detect Function disabled
+#define PHY_CFG1_XMTDIS		0x4000	// 1=TP Transmitter Disabled
+#define PHY_CFG1_XMTPDN		0x2000	// 1=TP Transmitter Powered Down
+#define PHY_CFG1_BYPSCR		0x0400	// 1=Bypass scrambler/descrambler
+#define PHY_CFG1_UNSCDS		0x0200	// 1=Unscramble Idle Reception Disable
+#define PHY_CFG1_EQLZR		0x0100	// 1=Rx Equalizer Disabled
+#define PHY_CFG1_CABLE		0x0080	// 1=STP(150ohm), 0=UTP(100ohm)
+#define PHY_CFG1_RLVL0		0x0040	// 1=Rx Squelch level reduced by 4.5db
+#define PHY_CFG1_TLVL_SHIFT	2	// Transmit Output Level Adjust
+#define PHY_CFG1_TLVL_MASK	0x003C
+#define PHY_CFG1_TRF_MASK	0x0003	// Transmitter Rise/Fall time
+
+
+// PHY Configuration Register 2
+#define PHY_CFG2_REG		0x11
+#define PHY_CFG2_APOLDIS	0x0020	// 1=Auto Polarity Correction disabled
+#define PHY_CFG2_JABDIS		0x0010	// 1=Jabber disabled
+#define PHY_CFG2_MREG		0x0008	// 1=Multiple register access (MII mgt)
+#define PHY_CFG2_INTMDIO	0x0004	// 1=Interrupt signaled with MDIO pulseo
+
+// PHY Status Output (and Interrupt status) Register
+#define PHY_INT_REG		0x12	// Status Output (Interrupt Status)
+#define PHY_INT_INT		0x8000	// 1=bits have changed since last read
+#define PHY_INT_LNKFAIL		0x4000	// 1=Link Not detected
+#define PHY_INT_LOSSSYNC	0x2000	// 1=Descrambler has lost sync
+#define PHY_INT_CWRD		0x1000	// 1=Invalid 4B5B code detected on rx
+#define PHY_INT_SSD		0x0800	// 1=No Start Of Stream detected on rx
+#define PHY_INT_ESD		0x0400	// 1=No End Of Stream detected on rx
+#define PHY_INT_RPOL		0x0200	// 1=Reverse Polarity detected
+#define PHY_INT_JAB		0x0100	// 1=Jabber detected
+#define PHY_INT_SPDDET		0x0080	// 1=100Base-TX mode, 0=10Base-T mode
+#define PHY_INT_DPLXDET		0x0040	// 1=Device in Full Duplex
+
+// PHY Interrupt/Status Mask Register
+#define PHY_MASK_REG		0x13	// Interrupt Mask
+// Uses the same bit definitions as PHY_INT_REG
+
+
+/*
+ * SMC91C96 ethernet config and status registers.
+ * These are in the "attribute" space.
+ */
+#define ECOR			0x8000
+#define ECOR_RESET		0x80
+#define ECOR_LEVEL_IRQ		0x40
+#define ECOR_WR_ATTRIB		0x04
+#define ECOR_ENABLE		0x01
+
+#define ECSR			0x8002
+#define ECSR_IOIS8		0x20
+#define ECSR_PWRDWN		0x04
+#define ECSR_INT		0x02
+
+#define ATTRIB_SIZE		((64*1024) << SMC_IO_SHIFT)
+
+
+/*
+ * Macros to abstract register access according to the data bus
+ * capabilities.  Please use those and not the in/out primitives.
+ * Note: the following macros do *not* select the bank -- this must
+ * be done separately as needed in the main code.  The SMC_REG() macro
+ * only uses the bank argument for debugging purposes (when enabled).
+ */
+
+#if SMC_DEBUG > 0
+#define SMC_REG(reg, bank)						\
+	({								\
+		int __b = SMC_CURRENT_BANK();				\
+		if (unlikely((__b & ~0xf0) != (0x3300 | bank))) {	\
+			printk( "%s: bank reg screwed (0x%04x)\n",	\
+				CARDNAME, __b );			\
+			BUG();						\
+		}							\
+		reg<<SMC_IO_SHIFT;					\
+	})
+#else
+#define SMC_REG(reg, bank)	(reg<<SMC_IO_SHIFT)
+#endif
+
+#if SMC_CAN_USE_8BIT
+#define SMC_GET_PN()		SMC_inb( ioaddr, PN_REG )
+#define SMC_SET_PN(x)		SMC_outb( x, ioaddr, PN_REG )
+#define SMC_GET_AR()		SMC_inb( ioaddr, AR_REG )
+#define SMC_GET_TXFIFO()	SMC_inb( ioaddr, TXFIFO_REG )
+#define SMC_GET_RXFIFO()	SMC_inb( ioaddr, RXFIFO_REG )
+#define SMC_GET_INT()		SMC_inb( ioaddr, INT_REG )
+#define SMC_ACK_INT(x)		SMC_outb( x, ioaddr, INT_REG )
+#define SMC_GET_INT_MASK()	SMC_inb( ioaddr, IM_REG )
+#define SMC_SET_INT_MASK(x)	SMC_outb( x, ioaddr, IM_REG )
+#else
+#define SMC_GET_PN()		(SMC_inw( ioaddr, PN_REG ) & 0xFF)
+#define SMC_SET_PN(x)		SMC_outw( x, ioaddr, PN_REG )
+#define SMC_GET_AR()		(SMC_inw( ioaddr, PN_REG ) >> 8)
+#define SMC_GET_TXFIFO()	(SMC_inw( ioaddr, TXFIFO_REG ) & 0xFF)
+#define SMC_GET_RXFIFO()	(SMC_inw( ioaddr, TXFIFO_REG ) >> 8)
+#define SMC_GET_INT()		(SMC_inw( ioaddr, INT_REG ) & 0xFF)
+#define SMC_ACK_INT(x)							\
+	do {								\
+		unsigned long __flags;					\
+		int __mask;						\
+		local_irq_save(__flags);				\
+		__mask = SMC_inw( ioaddr, INT_REG ) & ~0xff;		\
+		SMC_outw( __mask | (x), ioaddr, INT_REG );		\
+		local_irq_restore(__flags);				\
+	} while (0)
+#define SMC_GET_INT_MASK()	(SMC_inw( ioaddr, INT_REG ) >> 8)
+#define SMC_SET_INT_MASK(x)	SMC_outw( (x) << 8, ioaddr, INT_REG )
+#endif
+
+#define SMC_CURRENT_BANK()	SMC_inw( ioaddr, BANK_SELECT )
+#define SMC_SELECT_BANK(x)	SMC_outw( x, ioaddr, BANK_SELECT )
+#define SMC_GET_BASE()		SMC_inw( ioaddr, BASE_REG )
+#define SMC_SET_BASE(x)		SMC_outw( x, ioaddr, BASE_REG )
+#define SMC_GET_CONFIG()	SMC_inw( ioaddr, CONFIG_REG )
+#define SMC_SET_CONFIG(x)	SMC_outw( x, ioaddr, CONFIG_REG )
+#define SMC_GET_COUNTER()	SMC_inw( ioaddr, COUNTER_REG )
+#define SMC_GET_CTL()		SMC_inw( ioaddr, CTL_REG )
+#define SMC_SET_CTL(x)		SMC_outw( x, ioaddr, CTL_REG )
+#define SMC_GET_MII()		SMC_inw( ioaddr, MII_REG )
+#define SMC_SET_MII(x)		SMC_outw( x, ioaddr, MII_REG )
+#define SMC_GET_MIR()		SMC_inw( ioaddr, MIR_REG )
+#define SMC_SET_MIR(x)		SMC_outw( x, ioaddr, MIR_REG )
+#define SMC_GET_MMU_CMD()	SMC_inw( ioaddr, MMU_CMD_REG )
+#define SMC_SET_MMU_CMD(x)	SMC_outw( x, ioaddr, MMU_CMD_REG )
+#define SMC_GET_FIFO()		SMC_inw( ioaddr, FIFO_REG )
+#define SMC_GET_PTR()		SMC_inw( ioaddr, PTR_REG )
+#define SMC_SET_PTR(x)		SMC_outw( x, ioaddr, PTR_REG )
+#define SMC_GET_RCR()		SMC_inw( ioaddr, RCR_REG )
+#define SMC_SET_RCR(x)		SMC_outw( x, ioaddr, RCR_REG )
+#define SMC_GET_REV()		SMC_inw( ioaddr, REV_REG )
+#define SMC_GET_RPC()		SMC_inw( ioaddr, RPC_REG )
+#define SMC_SET_RPC(x)		SMC_outw( x, ioaddr, RPC_REG )
+#define SMC_GET_TCR()		SMC_inw( ioaddr, TCR_REG )
+#define SMC_SET_TCR(x)		SMC_outw( x, ioaddr, TCR_REG )
+
+#ifndef SMC_GET_MAC_ADDR
+#define SMC_GET_MAC_ADDR(addr)						\
+	do {								\
+		unsigned int __v;					\
+		__v = SMC_inw( ioaddr, ADDR0_REG );			\
+		addr[0] = __v; addr[1] = __v >> 8;			\
+		__v = SMC_inw( ioaddr, ADDR1_REG );			\
+		addr[2] = __v; addr[3] = __v >> 8;			\
+		__v = SMC_inw( ioaddr, ADDR2_REG );			\
+		addr[4] = __v; addr[5] = __v >> 8;			\
+	} while (0)
+#endif
+
+#define SMC_SET_MAC_ADDR(addr)						\
+	do {								\
+		SMC_outw( addr[0]|(addr[1] << 8), ioaddr, ADDR0_REG );	\
+		SMC_outw( addr[2]|(addr[3] << 8), ioaddr, ADDR1_REG );	\
+		SMC_outw( addr[4]|(addr[5] << 8), ioaddr, ADDR2_REG );	\
+	} while (0)
+
+#define SMC_CLEAR_MCAST()						\
+	do {								\
+		SMC_outw( 0, ioaddr, MCAST_REG1 );			\
+		SMC_outw( 0, ioaddr, MCAST_REG2 );			\
+		SMC_outw( 0, ioaddr, MCAST_REG3 );			\
+		SMC_outw( 0, ioaddr, MCAST_REG4 );			\
+	} while (0)
+#define SMC_SET_MCAST(x)						\
+	do {								\
+		unsigned char *mt = (x);				\
+		SMC_outw( mt[0] | (mt[1] << 8), ioaddr, MCAST_REG1 );	\
+		SMC_outw( mt[2] | (mt[3] << 8), ioaddr, MCAST_REG2 );	\
+		SMC_outw( mt[4] | (mt[5] << 8), ioaddr, MCAST_REG3 );	\
+		SMC_outw( mt[6] | (mt[7] << 8), ioaddr, MCAST_REG4 );	\
+	} while (0)
+
+#if SMC_CAN_USE_32BIT
+/*
+ * Some setups just can't write 8 or 16 bits reliably when not aligned
+ * to a 32 bit boundary.  I tell you that exists!
+ * We re-do the ones here that can be easily worked around if they can have
+ * their low parts written to 0 without adverse effects.
+ */
+#undef SMC_SELECT_BANK
+#define SMC_SELECT_BANK(x)	SMC_outl( (x)<<16, ioaddr, 12<<SMC_IO_SHIFT )
+#undef SMC_SET_RPC
+#define SMC_SET_RPC(x)		SMC_outl( (x)<<16, ioaddr, SMC_REG(8, 0) )
+#undef SMC_SET_PN
+#define SMC_SET_PN(x)		SMC_outl( (x)<<16, ioaddr, SMC_REG(0, 2) )
+#undef SMC_SET_PTR
+#define SMC_SET_PTR(x)		SMC_outl( (x)<<16, ioaddr, SMC_REG(4, 2) )
+#endif
+
+#if SMC_CAN_USE_32BIT
+#define SMC_PUT_PKT_HDR(status, length)					\
+	SMC_outl( (status) | (length) << 16, ioaddr, DATA_REG )
+#define SMC_GET_PKT_HDR(status, length)					\
+	do {								\
+		unsigned int __val = SMC_inl( ioaddr, DATA_REG );	\
+		(status) = __val & 0xffff;				\
+		(length) = __val >> 16;					\
+	} while (0)
+#else
+#define SMC_PUT_PKT_HDR(status, length)					\
+	do {								\
+		SMC_outw( status, ioaddr, DATA_REG );			\
+		SMC_outw( length, ioaddr, DATA_REG );			\
+	} while (0)
+#define SMC_GET_PKT_HDR(status, length)					\
+	do {								\
+		(status) = SMC_inw( ioaddr, DATA_REG );			\
+		(length) = SMC_inw( ioaddr, DATA_REG );			\
+	} while (0)
+#endif
+
+#if SMC_CAN_USE_32BIT
+#define SMC_PUSH_DATA(p, l)						\
+	do {								\
+		char *__ptr = (p);					\
+		int __len = (l);					\
+		if (__len >= 2 && (long)__ptr & 2) {			\
+			__len -= 2;					\
+			SMC_outw( *((u16 *)__ptr)++, ioaddr, DATA_REG );\
+		}							\
+		SMC_outsl( ioaddr, DATA_REG, __ptr, __len >> 2);	\
+		if (__len & 2) {					\
+			__ptr += (__len & ~3);				\
+			SMC_outw( *((u16 *)__ptr), ioaddr, DATA_REG );	\
+		}							\
+	} while (0)
+#define SMC_PULL_DATA(p, l)						\
+	do {								\
+		char *__ptr = (p);					\
+		int __len = (l);					\
+		if ((long)__ptr & 2) {					\
+			/*						\
+			 * We want 32bit alignment here.		\
+			 * Since some buses perform a full 32bit	\
+			 * fetch even for 16bit data we can't use	\
+			 * SMC_inw() here.  Back both source (on chip	\
+			 * and destination) pointers of 2 bytes.	\
+			 */						\
+			(long)__ptr &= ~2;				\
+			__len += 2;					\
+			SMC_SET_PTR( 2|PTR_READ|PTR_RCV|PTR_AUTOINC );	\
+		}							\
+		__len += 2;						\
+		SMC_insl( ioaddr, DATA_REG, __ptr, __len >> 2);		\
+	} while (0)
+#elif SMC_CAN_USE_16BIT
+#define SMC_PUSH_DATA(p, l)	SMC_outsw( ioaddr, DATA_REG, p, (l) >> 1 )
+#define SMC_PULL_DATA(p, l)	SMC_insw ( ioaddr, DATA_REG, p, (l) >> 1 )
+#elif SMC_CAN_USE_8BIT
+#define SMC_PUSH_DATA(p, l)	SMC_outsb( ioaddr, DATA_REG, p, l )
+#define SMC_PULL_DATA(p, l)	SMC_insb ( ioaddr, DATA_REG, p, l )
+#endif
+
+#if ! SMC_CAN_USE_16BIT
+#define SMC_outw(x, ioaddr, reg)					\
+	do {								\
+		unsigned int __val16 = (x);				\
+		SMC_outb( __val16, ioaddr, reg );			\
+		SMC_outb( __val16 >> 8, ioaddr, reg + (1 << SMC_IO_SHIFT));\
+	} while (0)
+#define SMC_inw(ioaddr, reg)						\
+	({								\
+		unsigned int __val16;					\
+		__val16 =  SMC_inb( ioaddr, reg );			\
+		__val16 |= SMC_inb( ioaddr, reg + (1 << SMC_IO_SHIFT)) << 8; \
+		__val16;						\
+	})
+#endif
+
+
+#endif  /* _SMC91X_H_ */
--- diff/drivers/net/kgdb_eth.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/net/kgdb_eth.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,132 @@
+/*
+ * Network interface GDB stub
+ *
+ * Written by San Mehat (nettwerk@biodome.org)
+ * Based upon 'gdbserial' by David Grothe (dave@gcom.com)
+ * and Scott Foehner (sfoehner@engr.sgi.com)
+ *
+ * Twiddled for 2.6 by Robert Walsh <rjwalsh@durables.org>
+ * and wangdi <wangdi@clusterfs.com>.
+ *
+ * Refactored for netpoll API by Matt Mackall <mpm@selenic.com>
+ *
+ */
+
+#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/config.h>
+#include <linux/string.h>
+#include <linux/netpoll.h>
+
+#include <asm/system.h>
+#include <asm/kgdb.h>
+#include <asm/io.h>
+#include <asm/bitops.h>
+#include <asm/system.h>
+#include <asm/irq.h>
+#include <asm/atomic.h>
+
+#define IN_BUF_SIZE 512 /* power of 2, please */
+#define OUT_BUF_SIZE 256
+
+static char in_buf[IN_BUF_SIZE], out_buf[OUT_BUF_SIZE];
+static int in_head, in_tail, out_count;
+static atomic_t in_count;
+int kgdboe = 0; /* Default to tty mode */
+
+extern void set_debug_traps(void);
+extern void breakpoint(void);
+static void rx_hook(struct netpoll *np, int port, char *msg, int len);
+
+static struct netpoll np = {
+	.name = "kgdboe",
+	.dev_name = "eth0",
+	.rx_hook = rx_hook,
+	.local_port = 6443,
+	.remote_port = 6442,
+	.remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
+};
+static int configured;
+
+int eth_getDebugChar(void)
+{
+	int chr;
+
+	while (atomic_read(&in_count) == 0)
+		netpoll_poll(&np);
+
+	chr = in_buf[in_tail++];
+	in_tail &= (IN_BUF_SIZE - 1);
+	atomic_dec(&in_count);
+	return chr;
+}
+
+void eth_flushDebugChar(void)
+{
+	if(out_count && np.dev) {
+		netpoll_send_udp(&np, out_buf, out_count);
+		out_count = 0;
+	}
+}
+
+void eth_putDebugChar(int chr)
+{
+	out_buf[out_count++] = chr;
+	if(out_count == OUT_BUF_SIZE)
+		eth_flushDebugChar();
+}
+
+static void rx_hook(struct netpoll *np, int port, char *msg, int len)
+{
+	int i;
+
+	np->remote_port = port;
+
+	/* Is this gdb trying to attach? */
+	if (!netpoll_trap() && len == 8 && !strncmp(msg, "$Hc-1#09", 8))
+		kgdb_schedule_breakpoint();
+
+	for (i = 0; i < len; i++) {
+		if (msg[i] == 3)
+			kgdb_schedule_breakpoint();
+
+		if (atomic_read(&in_count) >= IN_BUF_SIZE) {
+			/* buffer overflow, clear it */
+			in_head = in_tail = 0;
+			atomic_set(&in_count, 0);
+			break;
+		}
+		in_buf[in_head++] = msg[i];
+		in_head &= (IN_BUF_SIZE - 1);
+		atomic_inc(&in_count);
+	}
+}
+
+static int option_setup(char *opt)
+{
+	configured = !netpoll_parse_options(&np, opt);
+	return 0;
+}
+__setup("kgdboe=", option_setup);
+
+static int init_kgdboe(void)
+{
+#ifdef CONFIG_SMP
+	if (num_online_cpus() > CONFIG_NO_KGDB_CPUS) {
+		printk("kgdb: too manu cpus. Cannot enable debugger with more than %d cpus\n", CONFIG_NO_KGDB_CPUS);
+		return -1;
+	}
+#endif
+
+	set_debug_traps();
+
+	if(!configured || netpoll_setup(&np))
+		return 1;
+
+	kgdboe = 1;
+	printk(KERN_INFO "kgdb: debugging over ethernet enabled\n");
+
+	return 0;
+}
+
+module_init(init_kgdboe);
--- diff/drivers/net/mv64340_eth.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/net/mv64340_eth.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,2702 @@
+/*
+ * drivers/net/mv64340_eth.c - Driver for MV64340X ethernet ports
+ * Copyright (C) 2002 Matthew Dharm <mdharm@momenco.com>
+ *
+ * Based on the 64360 driver from:
+ * Copyright (C) 2002 rabeeh@galileo.co.il
+ *
+ * Copyright (C) 2003 PMC-Sierra, Inc.,
+ *	written by Manish Lachwani (lachwani@pmc-sierra.com)
+ *
+ * Copyright (C) 2003 Ralf Baechle <ralf@linux-mips.org>
+ *
+ * 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/config.h>
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <linux/ptrace.h>
+#include <linux/fcntl.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/ip.h>
+#include <linux/init.h>
+#include <linux/in.h>
+#include <linux/pci.h>
+#include <linux/workqueue.h>
+#include <asm/smp.h>
+#include <linux/skbuff.h>
+#include <linux/tcp.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <net/ip.h>
+
+#include <asm/bitops.h>
+#include <asm/io.h>
+#include <asm/types.h>
+#include <asm/pgtable.h>
+#include <asm/system.h>
+#include "mv64340_eth.h"
+
+/*
+ * The first part is the high level driver of the gigE ethernet ports. 
+ */
+
+/* Definition for configuring driver */
+#undef MV64340_RX_QUEUE_FILL_ON_TASK
+
+/* Constants */
+#define EXTRA_BYTES 32
+#define WRAP       ETH_HLEN + 2 + 4 + 16
+#define BUFFER_MTU dev->mtu + WRAP
+#define INT_CAUSE_UNMASK_ALL		0x0007ffff
+#define INT_CAUSE_UNMASK_ALL_EXT	0x0011ffff
+#ifdef MV64340_RX_FILL_ON_TASK
+#define INT_CAUSE_MASK_ALL		0x00000000
+#define INT_CAUSE_CHECK_BITS		INT_CAUSE_UNMASK_ALL
+#define INT_CAUSE_CHECK_BITS_EXT	INT_CAUSE_UNMASK_ALL_EXT
+#endif
+
+/* Static function declarations */
+static int mv64340_eth_real_open(struct net_device *);
+static int mv64340_eth_real_stop(struct net_device *);
+static int mv64340_eth_change_mtu(struct net_device *, int);
+static struct net_device_stats *mv64340_eth_get_stats(struct net_device *);
+static void eth_port_init_mac_tables(unsigned int eth_port_num);
+#ifdef MV64340_NAPI
+static int mv64340_poll(struct net_device *dev, int *budget);
+#endif
+
+unsigned char prom_mac_addr_base[6];
+unsigned long mv64340_sram_base;
+
+/*
+ * Changes MTU (maximum transfer unit) of the gigabit ethenret port
+ *
+ * Input : pointer to ethernet interface network device structure
+ *         new mtu size 
+ * Output : 0 upon success, -EINVAL upon failure
+ */
+static int mv64340_eth_change_mtu(struct net_device *dev, int new_mtu)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	unsigned long flags;
+
+	spin_lock_irqsave(&mp->lock, flags);
+
+	if ((new_mtu > 9500) || (new_mtu < 64)) {
+		spin_unlock_irqrestore(&mp->lock, flags);
+		return -EINVAL;
+	}
+
+	dev->mtu = new_mtu;
+	/* 
+	 * Stop then re-open the interface. This will allocate RX skb's with
+	 * the new MTU.
+	 * There is a possible danger that the open will not successed, due
+	 * to memory is full, which might fail the open function.
+	 */
+	if (netif_running(dev)) {
+		if (mv64340_eth_real_stop(dev))
+			printk(KERN_ERR
+			       "%s: Fatal error on stopping device\n",
+			       dev->name);
+		if (mv64340_eth_real_open(dev))
+			printk(KERN_ERR
+			       "%s: Fatal error on opening device\n",
+			       dev->name);
+	}
+
+	spin_unlock_irqrestore(&mp->lock, flags);
+	return 0;
+}
+
+/*
+ * mv64340_eth_rx_task
+ *								       
+ * Fills / refills RX queue on a certain gigabit ethernet port
+ *
+ * Input : pointer to ethernet interface network device structure
+ * Output : N/A
+ */
+static void mv64340_eth_rx_task(void *data)
+{
+	struct net_device *dev = (struct net_device *) data;
+	struct mv64340_private *mp = netdev_priv(dev);
+	struct pkt_info pkt_info;
+	struct sk_buff *skb;
+
+	if (test_and_set_bit(0, &mp->rx_task_busy))
+		panic("%s: Error in test_set_bit / clear_bit", dev->name);
+
+	while (mp->rx_ring_skbs < (mp->rx_ring_size - 5)) {
+		/* The +8 for buffer allignment and another 32 byte extra */
+
+		skb = dev_alloc_skb(BUFFER_MTU + 8 + EXTRA_BYTES);
+		if (!skb)
+			/* Better luck next time */
+			break;
+		mp->rx_ring_skbs++;
+		pkt_info.cmd_sts = ETH_RX_ENABLE_INTERRUPT;
+		pkt_info.byte_cnt = dev->mtu + ETH_HLEN + 4 + 2 + EXTRA_BYTES;
+		/* Allign buffer to 8 bytes */
+		if (pkt_info.byte_cnt & ~0x7) {
+			pkt_info.byte_cnt &= ~0x7;
+			pkt_info.byte_cnt += 8;
+		}
+		pkt_info.buf_ptr =
+		    pci_map_single(0, skb->data,
+				   dev->mtu + ETH_HLEN + 4 + 2 + EXTRA_BYTES,
+				   PCI_DMA_FROMDEVICE);
+		pkt_info.return_info = skb;
+		if (eth_rx_return_buff(mp, &pkt_info) != ETH_OK) {
+			printk(KERN_ERR
+			       "%s: Error allocating RX Ring\n", dev->name);
+			break;
+		}
+		skb_reserve(skb, 2);
+	}
+	clear_bit(0, &mp->rx_task_busy);
+	/*
+	 * If RX ring is empty of SKB, set a timer to try allocating
+	 * again in a later time .
+	 */
+	if ((mp->rx_ring_skbs == 0) && (mp->rx_timer_flag == 0)) {
+		printk(KERN_INFO "%s: Rx ring is empty\n", dev->name);
+		/* After 100mSec */
+		mp->timeout.expires = jiffies + (HZ / 10);
+		add_timer(&mp->timeout);
+		mp->rx_timer_flag = 1;
+	}
+#if MV64340_RX_QUEUE_FILL_ON_TASK
+	else {
+		/* Return interrupts */
+		MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(mp->port_num),
+			 INT_CAUSE_UNMASK_ALL);
+	}
+#endif
+}
+
+/*
+ * mv64340_eth_rx_task_timer_wrapper
+ *								       
+ * Timer routine to wake up RX queue filling task. This function is
+ * used only in case the RX queue is empty, and all alloc_skb has
+ * failed (due to out of memory event).
+ *
+ * Input : pointer to ethernet interface network device structure
+ * Output : N/A
+ */
+static void mv64340_eth_rx_task_timer_wrapper(unsigned long data)
+{
+	struct net_device *dev = (struct net_device *) data;
+	struct mv64340_private *mp = netdev_priv(dev);
+
+	mp->rx_timer_flag = 0;
+	mv64340_eth_rx_task((void *) data);
+}
+
+
+/*
+ * mv64340_eth_update_mac_address
+ *								       
+ * Update the MAC address of the port in the address table
+ *
+ * Input : pointer to ethernet interface network device structure
+ * Output : N/A
+ */
+static void mv64340_eth_update_mac_address(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	unsigned int port_num = mp->port_num;
+
+	eth_port_init_mac_tables(port_num);
+	memcpy(mp->port_mac_addr, dev->dev_addr, 6);
+	eth_port_uc_addr_set(port_num, mp->port_mac_addr);
+}
+
+/*
+ * mv64340_eth_set_rx_mode
+ *								       
+ * Change from promiscuos to regular rx mode
+ *
+ * Input : pointer to ethernet interface network device structure
+ * Output : N/A
+ */
+static void mv64340_eth_set_rx_mode(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+
+	if (dev->flags & IFF_PROMISC) {
+		ethernet_set_config_reg
+		    (mp->port_num,
+		     ethernet_get_config_reg(mp->port_num) |
+		     ETH_UNICAST_PROMISCUOUS_MODE);
+	} else {
+		ethernet_set_config_reg
+		    (mp->port_num,
+		     ethernet_get_config_reg(mp->port_num) &
+		     ~(unsigned int) ETH_UNICAST_PROMISCUOUS_MODE);
+	}
+}
+
+
+/*
+ * mv64340_eth_set_mac_address
+ *								       
+ * Change the interface's mac address.
+ * No special hardware thing should be done because interface is always
+ * put in promiscuous mode.
+ *
+ * Input : pointer to ethernet interface network device structure and
+ *         a pointer to the designated entry to be added to the cache.
+ * Output : zero upon success, negative upon failure
+ */
+static int mv64340_eth_set_mac_address(struct net_device *dev, void *addr)
+{
+	int i;
+
+	for (i = 0; i < 6; i++)
+		/* +2 is for the offset of the HW addr type */
+		dev->dev_addr[i] = ((unsigned char *) addr)[i + 2];
+	mv64340_eth_update_mac_address(dev);
+	return 0;
+}
+
+/*
+ * mv64340_eth_tx_timeout
+ *								       
+ * Called upon a timeout on transmitting a packet
+ *
+ * Input : pointer to ethernet interface network device structure.
+ * Output : N/A
+ */
+static void mv64340_eth_tx_timeout(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+
+	printk(KERN_INFO "%s: TX timeout  ", dev->name);
+
+	/* Do the reset outside of interrupt context */
+	schedule_work(&mp->tx_timeout_task);
+}
+
+/*
+ * mv64340_eth_tx_timeout_task
+ *
+ * Actual routine to reset the adapter when a timeout on Tx has occurred
+ */
+static void mv64340_eth_tx_timeout_task(struct net_device *dev)
+{
+        struct mv64340_private *mp = netdev_priv(dev);
+
+        netif_device_detach(dev);
+        eth_port_reset(mp->port_num);
+        eth_port_start(mp);
+        netif_device_attach(dev);
+}
+
+/*
+ * mv64340_eth_free_tx_queue
+ *
+ * Input : dev - a pointer to the required interface
+ *
+ * Output : 0 if was able to release skb , nonzero otherwise
+ */
+static int mv64340_eth_free_tx_queue(struct net_device *dev,
+			      unsigned int eth_int_cause_ext)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	struct net_device_stats *stats = &mp->stats;
+	struct pkt_info pkt_info;
+	int released = 1;
+
+	if (!(eth_int_cause_ext & (BIT0 | BIT8)))
+		return released;
+
+	spin_lock(&mp->lock);
+
+	/* Check only queue 0 */
+	while (eth_tx_return_desc(mp, &pkt_info) == ETH_OK) {
+		if (pkt_info.cmd_sts & BIT0) {
+			printk("%s: Error in TX\n", dev->name);
+			stats->tx_errors++;
+		}
+
+		/* 
+		 * If return_info is different than 0, release the skb.
+		 * The case where return_info is not 0 is only in case
+		 * when transmitted a scatter/gather packet, where only
+		 * last skb releases the whole chain.
+		 */
+		if (pkt_info.return_info) {
+			dev_kfree_skb_irq((struct sk_buff *)
+					  pkt_info.return_info);
+			released = 0;
+			if (skb_shinfo(pkt_info.return_info)->nr_frags)
+				pci_unmap_page(NULL, pkt_info.buf_ptr,
+					pkt_info.byte_cnt, PCI_DMA_TODEVICE);
+
+			if (mp->tx_ring_skbs != 1)
+				mp->tx_ring_skbs--;
+		} else 
+			pci_unmap_page(NULL, pkt_info.buf_ptr,
+					pkt_info.byte_cnt, PCI_DMA_TODEVICE);
+
+		/* 
+		 * Decrement the number of outstanding skbs counter on
+		 * the TX queue.
+		 */
+		if (mp->tx_ring_skbs == 0)
+			panic("ERROR - TX outstanding SKBs counter is corrupted");
+
+	}
+
+	spin_unlock(&mp->lock);
+
+	return released;
+}
+
+/*
+ * mv64340_eth_receive
+ *
+ * This function is forward packets that are received from the port's
+ * queues toward kernel core or FastRoute them to another interface.
+ *
+ * Input : dev - a pointer to the required interface
+ *         max - maximum number to receive (0 means unlimted)
+ *
+ * Output : number of served packets
+ */
+#ifdef MV64340_NAPI
+static int mv64340_eth_receive_queue(struct net_device *dev, unsigned int max,
+								int budget)
+#else
+static int mv64340_eth_receive_queue(struct net_device *dev, unsigned int max)
+#endif
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	struct net_device_stats *stats = &mp->stats;
+	unsigned int received_packets = 0;
+	struct sk_buff *skb;
+	struct pkt_info pkt_info;
+
+#ifdef MV64340_NAPI
+	while (eth_port_receive(mp, &pkt_info) == ETH_OK && budget > 0) {
+#else
+	while ((--max) && eth_port_receive(mp, &pkt_info) == ETH_OK) {
+#endif
+		mp->rx_ring_skbs--;
+		received_packets++;
+#ifdef MV64340_NAPI
+		budget--;
+#endif
+		/* Update statistics. Note byte count includes 4 byte CRC count */
+		stats->rx_packets++;
+		stats->rx_bytes += pkt_info.byte_cnt;
+		skb = (struct sk_buff *) pkt_info.return_info;
+		/*
+		 * In case received a packet without first / last bits on OR
+		 * the error summary bit is on, the packets needs to be dropeed.
+		 */
+		if (((pkt_info.cmd_sts
+		      & (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) !=
+		     (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC))
+		    || (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)) {
+			stats->rx_dropped++;
+			if ((pkt_info.cmd_sts & (ETH_RX_FIRST_DESC |
+						 ETH_RX_LAST_DESC)) !=
+			    (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) {
+				if (net_ratelimit())
+					printk(KERN_ERR
+					       "%s: Received packet spread on multiple"
+					       " descriptors\n",
+					       dev->name);
+			}
+			if (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)
+				stats->rx_errors++;
+
+			dev_kfree_skb_irq(skb);
+		} else {
+			/*
+			 * The -4 is for the CRC in the trailer of the
+			 * received packet
+			 */
+			skb_put(skb, pkt_info.byte_cnt - 4);
+			skb->dev = dev;
+
+			if (pkt_info.cmd_sts & ETH_LAYER_4_CHECKSUM_OK) {
+				skb->ip_summed = CHECKSUM_UNNECESSARY;
+				skb->csum = htons((pkt_info.cmd_sts
+							& 0x0007fff8) >> 3);
+			}
+			skb->protocol = eth_type_trans(skb, dev);
+#ifdef MV64340_NAPI
+			netif_receive_skb(skb);
+#else
+			netif_rx(skb);
+#endif
+		}
+	}
+
+	return received_packets;
+}
+
+/*
+ * mv64340_eth_int_handler
+ *
+ * Main interrupt handler for the gigbit ethernet ports
+ *
+ * Input : irq - irq number (not used)
+ *         dev_id - a pointer to the required interface's data structure
+ *         regs   - not used
+ * Output : N/A
+ */
+
+static irqreturn_t mv64340_eth_int_handler(int irq, void *dev_id,
+	struct pt_regs *regs)
+{
+	struct net_device *dev = (struct net_device *) dev_id;
+	struct mv64340_private *mp = netdev_priv(dev);
+	u32 eth_int_cause, eth_int_cause_ext = 0;
+	unsigned int port_num = mp->port_num;
+
+	/* Read interrupt cause registers */
+	eth_int_cause = MV_READ(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num)) &
+			INT_CAUSE_UNMASK_ALL;
+
+	if (eth_int_cause & BIT1)
+		eth_int_cause_ext =
+		MV_READ(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num)) &
+		INT_CAUSE_UNMASK_ALL_EXT;
+
+#ifdef MV64340_NAPI
+	if (!(eth_int_cause & 0x0007fffd)) {
+	/* Dont ack the Rx interrupt */
+#endif
+		/*
+	 	 * Clear specific ethernet port intrerrupt registers by
+		 * acknowleding relevant bits.
+		 */
+		MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num),
+			 ~eth_int_cause);
+		if (eth_int_cause_ext != 0x0)
+			MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num),
+				 ~eth_int_cause_ext);
+
+		/* UDP change : We may need this */
+		if ((eth_int_cause_ext & 0x0000ffff) &&
+		    (mv64340_eth_free_tx_queue(dev, eth_int_cause_ext) == 0) &&
+		    (MV64340_TX_QUEUE_SIZE > mp->tx_ring_skbs + 1))
+                                         netif_wake_queue(dev);
+#ifdef MV64340_NAPI
+	} else {
+		if (netif_rx_schedule_prep(dev)) {
+			/* Mask all the interrupts */
+			MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num),0);
+			MV_WRITE(MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port_num), 0);
+			__netif_rx_schedule(dev);
+		}
+#else
+		{
+		if (eth_int_cause & (BIT2 | BIT11))
+			mv64340_eth_receive_queue(dev, 0);
+
+		/*
+		 * After forwarded received packets to upper layer,  add a task
+		 * in an interrupts enabled context that refills the RX ring
+		 * with skb's.
+		 */
+#if MV64340_RX_QUEUE_FILL_ON_TASK
+		/* Unmask all interrupts on ethernet port */
+		MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num),
+		         INT_CAUSE_MASK_ALL);
+		queue_task(&mp->rx_task, &tq_immediate);
+		mark_bh(IMMEDIATE_BH);
+#else
+		mp->rx_task.func(dev);
+#endif
+#endif
+	}
+	/* PHY status changed */
+	if (eth_int_cause_ext & (BIT16 | BIT20)) {
+		unsigned int phy_reg_data;
+
+		/* Check Link status on ethernet port */
+		eth_port_read_smi_reg(port_num, 1, &phy_reg_data);
+		if (!(phy_reg_data & 0x20)) {
+			netif_stop_queue(dev);
+		} else {
+			netif_wake_queue(dev);
+
+			/*
+			 * Start all TX queues on ethernet port. This is good in
+			 * case of previous packets where not transmitted, due
+			 * to link down and this command re-enables all TX
+			 * queues.
+			 * Note that it is possible to get a TX resource error
+			 * interrupt after issuing this, since not all TX queues
+			 * are enabled, or has anything to send.
+			 */
+			MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(port_num), 1);
+		}
+	}
+
+	/*
+	 * If no real interrupt occured, exit.
+	 * This can happen when using gigE interrupt coalescing mechanism.
+	 */
+	if ((eth_int_cause == 0x0) && (eth_int_cause_ext == 0x0))
+		return IRQ_NONE;
+
+	return IRQ_HANDLED;
+}
+
+#ifdef MV64340_COAL
+
+/*
+ * eth_port_set_rx_coal - Sets coalescing interrupt mechanism on RX path
+ *
+ * DESCRIPTION:
+ *	This routine sets the RX coalescing interrupt mechanism parameter.
+ *	This parameter is a timeout counter, that counts in 64 t_clk
+ *	chunks ; that when timeout event occurs a maskable interrupt
+ *	occurs.
+ *	The parameter is calculated using the tClk of the MV-643xx chip
+ *	, and the required delay of the interrupt in usec.
+ *
+ * INPUT:
+ *	unsigned int eth_port_num      Ethernet port number
+ *	unsigned int t_clk        t_clk of the MV-643xx chip in HZ units
+ *	unsigned int delay       Delay in usec
+ *
+ * OUTPUT:
+ *	Interrupt coalescing mechanism value is set in MV-643xx chip.
+ *
+ * RETURN:
+ *	The interrupt coalescing value set in the gigE port.
+ *
+ */
+static unsigned int eth_port_set_rx_coal(unsigned int eth_port_num,
+	unsigned int t_clk, unsigned int delay)
+{
+	unsigned int coal = ((t_clk / 1000000) * delay) / 64;
+
+	/* Set RX Coalescing mechanism */
+	MV_WRITE(MV64340_ETH_SDMA_CONFIG_REG(eth_port_num),
+		 ((coal & 0x3fff) << 8) |
+		 (MV_READ(MV64340_ETH_SDMA_CONFIG_REG(eth_port_num))
+		  & 0xffc000ff));
+
+	return coal;
+}
+#endif
+
+/*
+ * eth_port_set_tx_coal - Sets coalescing interrupt mechanism on TX path
+ *
+ * DESCRIPTION:
+ *	This routine sets the TX coalescing interrupt mechanism parameter.
+ *	This parameter is a timeout counter, that counts in 64 t_clk
+ *	chunks ; that when timeout event occurs a maskable interrupt
+ *	occurs.
+ *	The parameter is calculated using the t_cLK frequency of the 
+ *	MV-643xx chip and the required delay in the interrupt in uSec
+ *
+ * INPUT:
+ *	unsigned int eth_port_num      Ethernet port number
+ *	unsigned int t_clk        t_clk of the MV-643xx chip in HZ units
+ *	unsigned int delay       Delay in uSeconds
+ *
+ * OUTPUT:
+ *	Interrupt coalescing mechanism value is set in MV-643xx chip.
+ *
+ * RETURN:
+ *	The interrupt coalescing value set in the gigE port.
+ *
+ */
+static unsigned int eth_port_set_tx_coal(unsigned int eth_port_num,
+	unsigned int t_clk, unsigned int delay)
+{
+	unsigned int coal;
+	coal = ((t_clk / 1000000) * delay) / 64;
+	/* Set TX Coalescing mechanism */
+	MV_WRITE(MV64340_ETH_TX_FIFO_URGENT_THRESHOLD_REG(eth_port_num),
+		 coal << 4);
+	return coal;
+}
+
+/*
+ * mv64340_eth_open
+ *
+ * This function is called when openning the network device. The function
+ * should initialize all the hardware, initialize cyclic Rx/Tx
+ * descriptors chain and buffers and allocate an IRQ to the network
+ * device.
+ *
+ * Input : a pointer to the network device structure
+ *
+ * Output : zero of success , nonzero if fails.
+ */
+
+static int mv64340_eth_open(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	unsigned int port_num = mp->port_num;
+	int err = err;
+
+	spin_lock_irq(&mp->lock);
+
+	err = request_irq(dev->irq, mv64340_eth_int_handler,
+	                  SA_INTERRUPT | SA_SAMPLE_RANDOM, dev->name, dev);
+
+	if (err) {
+		printk(KERN_ERR "Can not assign IRQ number to MV64340_eth%d\n",
+		       port_num);
+		err = -EAGAIN;
+		goto out;
+	}
+
+	if (mv64340_eth_real_open(dev)) {
+		printk("%s: Error opening interface\n", dev->name);
+		err = -EBUSY;
+		goto out_free;
+	}
+
+	spin_unlock_irq(&mp->lock);
+
+	return 0;
+
+out_free:
+	free_irq(dev->irq, dev);
+
+out:
+	spin_unlock_irq(&mp->lock);
+
+	return err;
+}
+
+/*
+ * ether_init_rx_desc_ring - Curve a Rx chain desc list and buffer in memory.
+ *
+ * DESCRIPTION:
+ *       This function prepares a Rx chained list of descriptors and packet 
+ *       buffers in a form of a ring. The routine must be called after port 
+ *       initialization routine and before port start routine. 
+ *       The Ethernet SDMA engine uses CPU bus addresses to access the various 
+ *       devices in the system (i.e. DRAM). This function uses the ethernet 
+ *       struct 'virtual to physical' routine (set by the user) to set the ring 
+ *       with physical addresses.
+ *
+ * INPUT:
+ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
+ *      int 			rx_desc_num       Number of Rx descriptors
+ *      int 			rx_buff_size      Size of Rx buffer
+ *      unsigned int    rx_desc_base_addr  Rx descriptors memory area base addr.
+ *      unsigned int    rx_buff_base_addr  Rx buffer memory area base addr.
+ *
+ * OUTPUT:
+ *      The routine updates the Ethernet port control struct with information 
+ *      regarding the Rx descriptors and buffers.
+ *
+ * RETURN:
+ *      false if the given descriptors memory area is not aligned according to
+ *      Ethernet SDMA specifications.
+ *      true otherwise.
+ */
+static int ether_init_rx_desc_ring(struct mv64340_private * mp,
+	unsigned long rx_buff_base_addr)
+{
+	unsigned long buffer_addr = rx_buff_base_addr;
+	volatile struct eth_rx_desc *p_rx_desc;
+	int rx_desc_num = mp->rx_ring_size;
+	unsigned long rx_desc_base_addr = (unsigned long) mp->p_rx_desc_area;
+	int rx_buff_size = 1536;	/* Dummy, will be replaced later */
+	int i;
+
+	p_rx_desc = (struct eth_rx_desc *) rx_desc_base_addr;
+
+	/* Rx desc Must be 4LW aligned (i.e. Descriptor_Address[3:0]=0000). */
+	if (rx_buff_base_addr & 0xf)
+		return 0;
+
+	/* Rx buffers are limited to 64K bytes and Minimum size is 8 bytes  */
+	if ((rx_buff_size < 8) || (rx_buff_size > RX_BUFFER_MAX_SIZE))
+		return 0;
+
+	/* Rx buffers must be 64-bit aligned.       */
+	if ((rx_buff_base_addr + rx_buff_size) & 0x7)
+		return 0;
+
+	/* initialize the Rx descriptors ring */
+	for (i = 0; i < rx_desc_num; i++) {
+		p_rx_desc[i].buf_size = rx_buff_size;
+		p_rx_desc[i].byte_cnt = 0x0000;
+		p_rx_desc[i].cmd_sts =
+			ETH_BUFFER_OWNED_BY_DMA | ETH_RX_ENABLE_INTERRUPT;
+		p_rx_desc[i].next_desc_ptr =
+			(struct eth_rx_desc *) mp->rx_desc_dma +
+				(i + 1) % rx_desc_num;
+		p_rx_desc[i].buf_ptr = buffer_addr;
+
+		mp->rx_skb[i] = NULL;
+		buffer_addr += rx_buff_size;
+	}
+
+	/* Save Rx desc pointer to driver struct. */
+	mp->rx_curr_desc_q = 0;
+	mp->rx_used_desc_q = 0;
+
+	mp->rx_desc_area_size = rx_desc_num * sizeof(struct eth_rx_desc);
+
+	mp->port_rx_queue_command |= 1;
+
+	return 1;
+}
+
+/*
+ * ether_init_tx_desc_ring - Curve a Tx chain desc list and buffer in memory.
+ *
+ * DESCRIPTION:
+ *       This function prepares a Tx chained list of descriptors and packet 
+ *       buffers in a form of a ring. The routine must be called after port 
+ *       initialization routine and before port start routine. 
+ *       The Ethernet SDMA engine uses CPU bus addresses to access the various 
+ *       devices in the system (i.e. DRAM). This function uses the ethernet 
+ *       struct 'virtual to physical' routine (set by the user) to set the ring 
+ *       with physical addresses.
+ *
+ * INPUT:
+ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
+ *      int 		tx_desc_num        Number of Tx descriptors
+ *      int 		tx_buff_size	   Size of Tx buffer
+ *      unsigned int    tx_desc_base_addr  Tx descriptors memory area base addr.
+ *
+ * OUTPUT:
+ *      The routine updates the Ethernet port control struct with information 
+ *      regarding the Tx descriptors and buffers.
+ *
+ * RETURN:
+ *      false if the given descriptors memory area is not aligned according to
+ *      Ethernet SDMA specifications.
+ *      true otherwise.
+ */
+static int ether_init_tx_desc_ring(struct mv64340_private *mp)
+{
+	unsigned long tx_desc_base_addr = (unsigned long) mp->p_tx_desc_area;
+	int tx_desc_num = mp->tx_ring_size;
+	struct eth_tx_desc *p_tx_desc;
+	int i;
+
+	/* Tx desc Must be 4LW aligned (i.e. Descriptor_Address[3:0]=0000). */
+	if (tx_desc_base_addr & 0xf)
+		return 0;
+
+	/* save the first desc pointer to link with the last descriptor */
+	p_tx_desc = (struct eth_tx_desc *) tx_desc_base_addr;
+
+	/* Initialize the Tx descriptors ring */
+	for (i = 0; i < tx_desc_num; i++) {
+		p_tx_desc[i].byte_cnt	= 0x0000;
+		p_tx_desc[i].l4i_chk	= 0x0000;
+		p_tx_desc[i].cmd_sts	= 0x00000000;
+		p_tx_desc[i].next_desc_ptr =
+			(struct eth_tx_desc *) mp->tx_desc_dma +
+			(i + 1) % tx_desc_num;
+		p_tx_desc[i].buf_ptr	= 0x00000000;
+		mp->tx_skb[i]		= NULL;
+	}
+
+	/* Set Tx desc pointer in driver struct. */
+	mp->tx_curr_desc_q = 0;
+	mp->tx_used_desc_q = 0;
+#ifdef MV64340_CHECKSUM_OFFLOAD_TX
+        mp->tx_first_desc_q = 0;
+#endif
+	/* Init Tx ring base and size parameters */
+	mp->tx_desc_area_size	= tx_desc_num * sizeof(struct eth_tx_desc);
+
+	/* Add the queue to the list of Tx queues of this port */
+	mp->port_tx_queue_command |= 1;
+
+	return 1;
+}
+
+/* Helper function for mv64340_eth_open */
+static int mv64340_eth_real_open(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	unsigned int port_num = mp->port_num;
+	u32 phy_reg_data;
+	unsigned int size;
+
+	/* Stop RX Queues */
+	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(port_num),
+		 0x0000ff00);
+
+	/* Clear the ethernet port interrupts */
+	MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num), 0);
+	MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
+
+	/* Unmask RX buffer and TX end interrupt */
+	MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num),
+		 INT_CAUSE_UNMASK_ALL);
+
+	/* Unmask phy and link status changes interrupts */
+	MV_WRITE(MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port_num),
+		 INT_CAUSE_UNMASK_ALL_EXT);
+
+	/* Set the MAC Address */
+	memcpy(mp->port_mac_addr, dev->dev_addr, 6);
+
+	eth_port_init(mp);
+
+	INIT_WORK(&mp->rx_task, (void (*)(void *)) mv64340_eth_rx_task, dev);
+
+	memset(&mp->timeout, 0, sizeof(struct timer_list));
+	mp->timeout.function = mv64340_eth_rx_task_timer_wrapper;
+	mp->timeout.data = (unsigned long) dev;
+
+	mp->rx_task_busy = 0;
+	mp->rx_timer_flag = 0;
+
+	/* Allocate TX ring */
+	mp->tx_ring_skbs = 0;
+	mp->tx_ring_size = MV64340_TX_QUEUE_SIZE;
+	size = mp->tx_ring_size * sizeof(struct eth_tx_desc);
+	mp->tx_desc_area_size = size;
+
+	/* Assumes allocated ring is 16 bytes alligned */
+	mp->p_tx_desc_area = pci_alloc_consistent(NULL, size, &mp->tx_desc_dma);
+	if (!mp->p_tx_desc_area) {
+		printk(KERN_ERR "%s: Cannot allocate Tx Ring (size %d bytes)\n",
+		       dev->name, size);
+		return -ENOMEM;
+	}
+	memset((void *) mp->p_tx_desc_area, 0, mp->tx_desc_area_size);
+
+	/* Dummy will be replaced upon real tx */
+	ether_init_tx_desc_ring(mp);
+
+	/* Allocate RX ring */
+	/* Meantime RX Ring are fixed - but must be configurable by user */
+	mp->rx_ring_size = MV64340_RX_QUEUE_SIZE;
+	mp->rx_ring_skbs = 0;
+	size = mp->rx_ring_size * sizeof(struct eth_rx_desc);
+	mp->rx_desc_area_size = size;
+
+	/* Assumes allocated ring is 16 bytes aligned */
+
+	mp->p_rx_desc_area = pci_alloc_consistent(NULL, size, &mp->rx_desc_dma);
+
+	if (!mp->p_rx_desc_area) {
+		printk(KERN_ERR "%s: Cannot allocate Rx ring (size %d bytes)\n",
+		       dev->name, size);
+		printk(KERN_ERR "%s: Freeing previously allocated TX queues...",
+		       dev->name);
+		pci_free_consistent(0, mp->tx_desc_area_size,
+				    (void *) mp->p_tx_desc_area,
+				    mp->tx_desc_dma);
+		return -ENOMEM;
+	}
+	memset(mp->p_rx_desc_area, 0, size);
+
+	if (!(ether_init_rx_desc_ring(mp, 0)))
+		panic("%s: Error initializing RX Ring", dev->name);
+
+	mv64340_eth_rx_task(dev);	/* Fill RX ring with skb's */
+
+	eth_port_start(mp);
+
+	/* Interrupt Coalescing */
+
+#ifdef MV64340_COAL
+	mp->rx_int_coal =
+		eth_port_set_rx_coal(port_num, 133000000, MV64340_RX_COAL);
+#endif
+
+	mp->tx_int_coal =
+		eth_port_set_tx_coal (port_num, 133000000, MV64340_TX_COAL);  
+
+	/* Increase the Rx side buffer size */
+
+	MV_WRITE (MV64340_ETH_PORT_SERIAL_CONTROL_REG(port_num), (0x5 << 17) |
+			(MV_READ(MV64340_ETH_PORT_SERIAL_CONTROL_REG(port_num))
+					& 0xfff1ffff));
+
+	/* Check Link status on phy */
+	eth_port_read_smi_reg(port_num, 1, &phy_reg_data);
+	if (!(phy_reg_data & 0x20))
+		netif_stop_queue(dev);
+	else
+		netif_start_queue(dev);
+
+	return 0;
+}
+
+static void mv64340_eth_free_tx_rings(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	unsigned int port_num = mp->port_num;
+	unsigned int curr;
+
+	/* Stop Tx Queues */
+	MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(port_num),
+		 0x0000ff00);
+
+	/* Free TX rings */
+	/* Free outstanding skb's on TX rings */
+	for (curr = 0;
+	     (mp->tx_ring_skbs) && (curr < MV64340_TX_QUEUE_SIZE);
+	     curr++) {
+		if (mp->tx_skb[curr]) {
+			dev_kfree_skb(mp->tx_skb[curr]);
+			mp->tx_ring_skbs--;
+		}
+	}
+	if (mp->tx_ring_skbs != 0)
+		printk("%s: Error on Tx descriptor free - could not free %d"
+		     " descriptors\n", dev->name,
+		     mp->tx_ring_skbs);
+	pci_free_consistent(0, mp->tx_desc_area_size,
+			    (void *) mp->p_tx_desc_area, mp->tx_desc_dma);
+}
+
+static void mv64340_eth_free_rx_rings(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	unsigned int port_num = mp->port_num;
+	int curr;
+
+	/* Stop RX Queues */
+	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(port_num),
+		 0x0000ff00);
+
+	/* Free RX rings */
+	/* Free preallocated skb's on RX rings */
+	for (curr = 0;
+		mp->rx_ring_skbs && (curr < MV64340_RX_QUEUE_SIZE);
+		curr++) {
+		if (mp->rx_skb[curr]) {
+			dev_kfree_skb(mp->rx_skb[curr]);
+			mp->rx_ring_skbs--;
+		}
+	}
+
+	if (mp->rx_ring_skbs != 0)
+		printk(KERN_ERR
+		       "%s: Error in freeing Rx Ring. %d skb's still"
+		       " stuck in RX Ring - ignoring them\n", dev->name,
+		       mp->rx_ring_skbs);
+	pci_free_consistent(0, mp->rx_desc_area_size,
+			    (void *) mp->p_rx_desc_area,
+			    mp->rx_desc_dma);
+}
+
+/*
+ * mv64340_eth_stop
+ *
+ * This function is used when closing the network device. 
+ * It updates the hardware, 
+ * release all memory that holds buffers and descriptors and release the IRQ.
+ * Input : a pointer to the device structure
+ * Output : zero if success , nonzero if fails
+ */
+
+/* Helper function for mv64340_eth_stop */
+
+static int mv64340_eth_real_stop(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	unsigned int port_num = mp->port_num;
+
+	netif_stop_queue(dev);
+
+	mv64340_eth_free_tx_rings(dev);
+	mv64340_eth_free_rx_rings(dev);
+
+	eth_port_reset(mp->port_num);
+
+	/* Disable ethernet port interrupts */
+	MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num), 0);
+	MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
+
+	/* Mask RX buffer and TX end interrupt */
+	MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num), 0);
+
+	/* Mask phy and link status changes interrupts */
+	MV_WRITE(MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port_num), 0);
+
+	return 0;
+}
+
+static int mv64340_eth_stop(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+
+	spin_lock_irq(&mp->lock);
+
+	mv64340_eth_real_stop(dev);
+
+	free_irq(dev->irq, dev);
+	spin_unlock_irq(&mp->lock);
+
+	return 0;
+}
+
+#ifdef MV64340_NAPI
+static void mv64340_tx(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+        struct pkt_info pkt_info;
+
+	while (eth_tx_return_desc(mp, &pkt_info) == ETH_OK) {
+		if (pkt_info.return_info) {
+			dev_kfree_skb_irq((struct sk_buff *)
+                                                  pkt_info.return_info);
+			if (skb_shinfo(pkt_info.return_info)->nr_frags) 
+                                 pci_unmap_page(NULL, pkt_info.buf_ptr,
+                                             pkt_info.byte_cnt,
+                                             PCI_DMA_TODEVICE);
+
+                         if (mp->tx_ring_skbs != 1)
+                                  mp->tx_ring_skbs--;
+                } else 
+                       pci_unmap_page(NULL, pkt_info.buf_ptr, pkt_info.byte_cnt,
+                                      PCI_DMA_TODEVICE);
+	}
+
+	if (netif_queue_stopped(dev) &&
+            MV64340_TX_QUEUE_SIZE > mp->tx_ring_skbs + 1)
+                       netif_wake_queue(dev);
+}
+
+/*
+ * mv64340_poll
+ *
+ * This function is used in case of NAPI
+ */
+static int mv64340_poll(struct net_device *dev, int *budget)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	int	done = 1, orig_budget, work_done;
+	unsigned int port_num = mp->port_num;
+	unsigned long flags;
+
+#ifdef MV64340_TX_FAST_REFILL
+	if (++mp->tx_clean_threshold > 5) {
+		spin_lock_irqsave(&mp->lock, flags);
+		mv64340_tx(dev);
+		mp->tx_clean_threshold = 0;
+		spin_unlock_irqrestore(&mp->lock, flags);
+	}
+#endif
+
+	if ((u32)(MV_READ(MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_0(port_num)))                                      != (u32)mp->rx_used_desc_q) {
+		orig_budget = *budget;
+		if (orig_budget > dev->quota)
+			orig_budget = dev->quota;
+		work_done = mv64340_eth_receive_queue(dev, 0, orig_budget);
+		mp->rx_task.func(dev);
+		*budget -= work_done;
+		dev->quota -= work_done;
+		if (work_done >= orig_budget)
+			done = 0;
+	}
+
+	if (done) {
+		spin_lock_irqsave(&mp->lock, flags);
+		__netif_rx_complete(dev);
+		MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_REG(port_num),0);
+                MV_WRITE(MV64340_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num),0);
+		MV_WRITE(MV64340_ETH_INTERRUPT_MASK_REG(port_num), 
+						INT_CAUSE_UNMASK_ALL);
+		MV_WRITE(MV64340_ETH_INTERRUPT_EXTEND_MASK_REG(port_num),
+				                 INT_CAUSE_UNMASK_ALL_EXT);
+		spin_unlock_irqrestore(&mp->lock, flags);
+	}
+
+	return done ? 0 : 1;
+}
+#endif
+
+/*
+ * mv64340_eth_start_xmit
+ *
+ * This function is queues a packet in the Tx descriptor for 
+ * required port.
+ *
+ * Input : skb - a pointer to socket buffer
+ *         dev - a pointer to the required port
+ *
+ * Output : zero upon success
+ */
+static int mv64340_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+	struct net_device_stats *stats = &mp->stats;
+	ETH_FUNC_RET_STATUS status;
+	unsigned long flags;
+	struct pkt_info pkt_info;
+
+	if (netif_queue_stopped(dev)) {
+		printk(KERN_ERR
+		       "%s: Tried sending packet when interface is stopped\n",
+		       dev->name);
+		return 1;
+	}
+
+	/* This is a hard error, log it. */
+	if ((MV64340_TX_QUEUE_SIZE - mp->tx_ring_skbs) <=
+	    (skb_shinfo(skb)->nr_frags + 1)) {
+		netif_stop_queue(dev);
+		printk(KERN_ERR
+		       "%s: Bug in mv64340_eth - Trying to transmit when"
+		       " queue full !\n", dev->name);
+		return 1;
+	}
+
+	/* Paranoid check - this shouldn't happen */
+	if (skb == NULL) {
+		stats->tx_dropped++;
+		return 1;
+	}
+
+	spin_lock_irqsave(&mp->lock, flags);
+
+	/* Update packet info data structure -- DMA owned, first last */
+#ifdef MV64340_CHECKSUM_OFFLOAD_TX
+	if (!skb_shinfo(skb)->nr_frags || (skb_shinfo(skb)->nr_frags > 3)) {
+#endif
+		pkt_info.cmd_sts = ETH_TX_ENABLE_INTERRUPT |
+	    	                   ETH_TX_FIRST_DESC | ETH_TX_LAST_DESC;
+
+		pkt_info.byte_cnt = skb->len;
+		pkt_info.buf_ptr = pci_map_single(0, skb->data, skb->len,
+		                                  PCI_DMA_TODEVICE);
+
+
+		pkt_info.return_info = skb;
+		status = eth_port_send(mp, &pkt_info);
+		if ((status == ETH_ERROR) || (status == ETH_QUEUE_FULL))
+			printk(KERN_ERR "%s: Error on transmitting packet\n",
+				       dev->name);
+		mp->tx_ring_skbs++;
+#ifdef MV64340_CHECKSUM_OFFLOAD_TX
+	} else {
+		unsigned int    frag;
+		u32		ipheader;
+
+                /* first frag which is skb header */
+                pkt_info.byte_cnt = skb_headlen(skb);
+                pkt_info.buf_ptr = pci_map_single(0, skb->data,
+                                        skb_headlen(skb), PCI_DMA_TODEVICE);
+                pkt_info.return_info = 0;
+                ipheader = skb->nh.iph->ihl << 11;
+                pkt_info.cmd_sts = ETH_TX_FIRST_DESC | 
+					ETH_GEN_TCP_UDP_CHECKSUM |
+					ETH_GEN_IP_V_4_CHECKSUM |
+                                        ipheader;
+		/* CPU already calculated pseudo header checksum. So, use it */
+                pkt_info.l4i_chk = skb->h.th->check;
+                status = eth_port_send(mp, &pkt_info);
+		if (status != ETH_OK) {
+	                if ((status == ETH_ERROR))
+        	                printk(KERN_ERR "%s: Error on transmitting packet\n", dev->name);
+	                if (status == ETH_QUEUE_FULL)
+        	                printk("Error on Queue Full \n");
+                	if (status == ETH_QUEUE_LAST_RESOURCE)
+                        	printk("Tx resource error \n");
+		}
+
+                /* Check for the remaining frags */
+                for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
+                        skb_frag_t *this_frag = &skb_shinfo(skb)->frags[frag];
+                        pkt_info.l4i_chk = 0x0000;
+                        pkt_info.cmd_sts = 0x00000000;
+
+                        /* Last Frag enables interrupt and frees the skb */
+                        if (frag == (skb_shinfo(skb)->nr_frags - 1)) {
+                                pkt_info.cmd_sts |= ETH_TX_ENABLE_INTERRUPT |
+                                                        ETH_TX_LAST_DESC;
+                                pkt_info.return_info = skb;
+                                mp->tx_ring_skbs++;
+                        }
+                        else {
+                                pkt_info.return_info = 0;
+                        }
+                        pkt_info.byte_cnt = this_frag->size;
+                        if (this_frag->size < 8)
+                                printk("%d : \n", skb_shinfo(skb)->nr_frags);
+
+                        pkt_info.buf_ptr = pci_map_page(NULL, this_frag->page,
+                                        this_frag->page_offset,
+                                        this_frag->size, PCI_DMA_TODEVICE);
+
+                        status = eth_port_send(mp, &pkt_info);
+
+			if (status != ETH_OK) {
+	                        if ((status == ETH_ERROR))
+        	                        printk(KERN_ERR "%s: Error on transmitting packet\n", dev->name);
+
+       		                 if (status == ETH_QUEUE_LAST_RESOURCE)
+                	                printk("Tx resource error \n");
+
+                        	if (status == ETH_QUEUE_FULL)
+                                	printk("Queue is full \n");
+			}
+                }
+        }
+#endif
+
+	/* Check if TX queue can handle another skb. If not, then
+	 * signal higher layers to stop requesting TX
+	 */
+	if (MV64340_TX_QUEUE_SIZE <= (mp->tx_ring_skbs + 1))
+		/* 
+		 * Stop getting skb's from upper layers.
+		 * Getting skb's from upper layers will be enabled again after
+		 * packets are released.
+		 */
+		netif_stop_queue(dev);
+
+	/* Update statistics and start of transmittion time */
+	stats->tx_bytes += skb->len;
+	stats->tx_packets++;
+	dev->trans_start = jiffies;
+
+	spin_unlock_irqrestore(&mp->lock, flags);
+
+	return 0;		/* success */
+}
+
+/*
+ * mv64340_eth_get_stats
+ *
+ * Returns a pointer to the interface statistics.
+ *
+ * Input : dev - a pointer to the required interface
+ *
+ * Output : a pointer to the interface's statistics
+ */
+
+static struct net_device_stats *mv64340_eth_get_stats(struct net_device *dev)
+{
+	struct mv64340_private *mp = netdev_priv(dev);
+
+	return &mp->stats;
+}
+
+/*/
+ * mv64340_eth_init
+ *								       
+ * First function called after registering the network device. 
+ * It's purpose is to initialize the device as an ethernet device, 
+ * fill the structure that was given in registration with pointers
+ * to functions, and setting the MAC address of the interface
+ *
+ * Input : number of port to initialize
+ * Output : -ENONMEM if failed , 0 if success
+ */
+static int mv64340_eth_init(int port_num)
+{
+	struct mv64340_private *mp;
+	struct net_device *dev;
+	int err;
+
+	dev = alloc_etherdev(sizeof(struct mv64340_private));
+	if (!dev)
+		return -ENOMEM;
+
+	mp = netdev_priv(dev);
+
+	dev->irq = ETH_PORT0_IRQ_NUM + port_num;
+
+	dev->open = mv64340_eth_open;
+	dev->stop = mv64340_eth_stop;
+	dev->hard_start_xmit = mv64340_eth_start_xmit;
+	dev->get_stats = mv64340_eth_get_stats;
+	dev->set_mac_address = mv64340_eth_set_mac_address;
+	dev->set_multicast_list = mv64340_eth_set_rx_mode;
+
+	/* No need to Tx Timeout */
+	dev->tx_timeout = mv64340_eth_tx_timeout;
+#ifdef MV64340_NAPI
+        dev->poll = mv64340_poll;
+        dev->weight = 64;
+#endif
+
+	dev->watchdog_timeo = 2 * HZ;
+	dev->tx_queue_len = MV64340_TX_QUEUE_SIZE;
+	dev->base_addr = 0;
+	dev->change_mtu = mv64340_eth_change_mtu;
+
+#ifdef MV64340_CHECKSUM_OFFLOAD_TX
+#ifdef MAX_SKB_FRAGS
+#ifndef CONFIG_JAGUAR_DMALOW
+        /*
+         * Zero copy can only work if we use Discovery II memory. Else, we will
+         * have to map the buffers to ISA memory which is only 16 MB
+         */
+        dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_HW_CSUM;
+#endif
+#endif
+#endif
+
+	mp->port_num = port_num;
+
+	/* Configure the timeout task */
+        INIT_WORK(&mp->tx_timeout_task,
+                  (void (*)(void *))mv64340_eth_tx_timeout_task, dev);
+
+	spin_lock_init(&mp->lock);
+
+	/* set MAC addresses */
+	memcpy(dev->dev_addr, prom_mac_addr_base, 6);
+	dev->dev_addr[5] += port_num;
+
+	err = register_netdev(dev);
+	if (err)
+		goto out_free_dev;
+
+	printk(KERN_NOTICE "%s: port %d with MAC address %02x:%02x:%02x:%02x:%02x:%02x\n",
+		dev->name, port_num,
+		dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
+		dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
+
+	if (dev->features & NETIF_F_SG)
+		printk("Scatter Gather Enabled  ");
+
+	if (dev->features & NETIF_F_IP_CSUM)
+		printk("TX TCP/IP Checksumming Supported  \n");
+
+	printk("RX TCP/UDP Checksum Offload ON, \n");
+	printk("TX and RX Interrupt Coalescing ON \n");
+
+#ifdef MV64340_NAPI
+	printk("RX NAPI Enabled \n");
+#endif
+
+	return 0;
+
+out_free_dev:
+	free_netdev(dev);
+
+	return err;
+}
+
+/*
+ * mv64340_init_module
+ *
+ * Registers the network drivers into the Linux kernel
+ *
+ * Input : N/A
+ *
+ * Output : N/A
+ */
+static int __init mv64340_init_module(void)
+{
+	printk(KERN_NOTICE "MV-64340 10/100/1000 Ethernet Driver\n");
+#ifdef CONFIG_MV64340_ETH_0
+	if (mv64340_eth_init(0)) {
+		printk(KERN_ERR
+		       "Error registering MV-64360 ethernet port 0\n");
+	}
+#endif
+#ifdef CONFIG_MV64340_ETH_1
+	if (mv64340_eth_init(1)) {
+		printk(KERN_ERR
+		       "Error registering MV-64360 ethernet port 1\n");
+	}
+#endif
+#ifdef CONFIG_MV64340_ETH_2
+	if (mv64340_eth_init(2)) {
+		printk(KERN_ERR
+		       "Error registering MV-64360 ethernet port 2\n");
+	}
+#endif
+	return 0;
+}
+
+/*
+ * mv64340_cleanup_module
+ *
+ * Registers the network drivers into the Linux kernel
+ *
+ * Input : N/A
+ *
+ * Output : N/A
+ */
+static void __init mv64340_cleanup_module(void)
+{
+	/* Nothing to do here ! it's not a removable module */
+}
+
+module_init(mv64340_init_module);
+module_exit(mv64340_cleanup_module);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Rabeeh Khoury, Assaf Hoffman, Matthew Dharm and Manish Lachwani");
+MODULE_DESCRIPTION("Ethernet driver for Marvell MV64340");
+
+/*
+ *  The second part is the low level driver of the gigE ethernet ports.
+ */
+
+/*
+ * Marvell's Gigabit Ethernet controller low level driver
+ *
+ * DESCRIPTION:
+ *       This file introduce low level API to Marvell's Gigabit Ethernet
+ *		controller. This Gigabit Ethernet Controller driver API controls
+ *		1) Operations (i.e. port init, start, reset etc').
+ *		2) Data flow (i.e. port send, receive etc').
+ *		Each Gigabit Ethernet port is controlled via
+ *              struct mv64340_private.
+ *		This struct includes user configuration information as well as
+ *		driver internal data needed for its operations.
+ *
+ *		Supported Features:  
+ *		- This low level driver is OS independent. Allocating memory for
+ *		  the descriptor rings and buffers are not within the scope of
+ *		  this driver.
+ *		- The user is free from Rx/Tx queue managing.
+ *		- This low level driver introduce functionality API that enable
+ *		  the to operate Marvell's Gigabit Ethernet Controller in a
+ *		  convenient way.
+ *		- Simple Gigabit Ethernet port operation API.
+ *		- Simple Gigabit Ethernet port data flow API.
+ *		- Data flow and operation API support per queue functionality.
+ *		- Support cached descriptors for better performance.
+ *		- Enable access to all four DRAM banks and internal SRAM memory
+ *		  spaces.
+ *		- PHY access and control API.
+ *		- Port control register configuration API.
+ *		- Full control over Unicast and Multicast MAC configurations.
+ *								   
+ *		Operation flow:
+ *
+ *		Initialization phase
+ *		This phase complete the initialization of the the mv64340_private
+ *		struct. 
+ *		User information regarding port configuration has to be set
+ *		prior to calling the port initialization routine.
+ *
+ *		In this phase any port Tx/Rx activity is halted, MIB counters
+ *		are cleared, PHY address is set according to user parameter and
+ *		access to DRAM and internal SRAM memory spaces.
+ *
+ *		Driver ring initialization
+ *		Allocating memory for the descriptor rings and buffers is not 
+ *		within the scope of this driver. Thus, the user is required to
+ *		allocate memory for the descriptors ring and buffers. Those
+ *		memory parameters are used by the Rx and Tx ring initialization
+ *		routines in order to curve the descriptor linked list in a form
+ *		of a ring.
+ *		Note: Pay special attention to alignment issues when using
+ *		cached descriptors/buffers. In this phase the driver store
+ *		information in the mv64340_private struct regarding each queue
+ *		ring.
+ *
+ *		Driver start 
+ *		This phase prepares the Ethernet port for Rx and Tx activity.
+ *		It uses the information stored in the mv64340_private struct to 
+ *		initialize the various port registers.
+ *
+ *		Data flow:
+ *		All packet references to/from the driver are done using
+ *              struct pkt_info.
+ *		This struct is a unified struct used with Rx and Tx operations. 
+ *		This way the user is not required to be familiar with neither
+ *		Tx nor Rx descriptors structures.
+ *		The driver's descriptors rings are management by indexes.
+ *		Those indexes controls the ring resources and used to indicate
+ *		a SW resource error:
+ *		'current' 
+ *		This index points to the current available resource for use. For 
+ *		example in Rx process this index will point to the descriptor  
+ *		that will be passed to the user upon calling the receive routine.
+ *		In Tx process, this index will point to the descriptor
+ *		that will be assigned with the user packet info and transmitted.
+ *		'used'    
+ *		This index points to the descriptor that need to restore its 
+ *		resources. For example in Rx process, using the Rx buffer return
+ *		API will attach the buffer returned in packet info to the
+ *		descriptor pointed by 'used'. In Tx process, using the Tx
+ *		descriptor return will merely return the user packet info with
+ *		the command status of  the transmitted buffer pointed by the
+ *		'used' index. Nevertheless, it is essential to use this routine
+ *		to update the 'used' index.
+ *		'first'
+ *		This index supports Tx Scatter-Gather. It points to the first 
+ *		descriptor of a packet assembled of multiple buffers. For example
+ *		when in middle of Such packet we have a Tx resource error the 
+ *		'curr' index get the value of 'first' to indicate that the ring 
+ *		returned to its state before trying to transmit this packet.
+ *
+ *		Receive operation:
+ *		The eth_port_receive API set the packet information struct,
+ *		passed by the caller, with received information from the 
+ *		'current' SDMA descriptor. 
+ *		It is the user responsibility to return this resource back
+ *		to the Rx descriptor ring to enable the reuse of this source.
+ *		Return Rx resource is done using the eth_rx_return_buff API.
+ *
+ *		Transmit operation:
+ *		The eth_port_send API supports Scatter-Gather which enables to
+ *		send a packet spanned over multiple buffers. This means that
+ *		for each packet info structure given by the user and put into
+ *		the Tx descriptors ring, will be transmitted only if the 'LAST'
+ *		bit will be set in the packet info command status field. This
+ *		API also consider restriction regarding buffer alignments and
+ *		sizes.
+ *		The user must return a Tx resource after ensuring the buffer
+ *		has been transmitted to enable the Tx ring indexes to update.
+ *
+ *		BOARD LAYOUT
+ *		This device is on-board.  No jumper diagram is necessary.
+ *
+ *		EXTERNAL INTERFACE
+ *
+ *       Prior to calling the initialization routine eth_port_init() the user
+ *	 must set the following fields under mv64340_private struct:
+ *       port_num             User Ethernet port number.
+ *       port_mac_addr[6]	    User defined port MAC address.
+ *       port_config          User port configuration value.
+ *       port_config_extend    User port config extend value.
+ *       port_sdma_config      User port SDMA config value.
+ *       port_serial_control   User port serial control value.
+ *
+ *       This driver introduce a set of default values:
+ *       PORT_CONFIG_VALUE           Default port configuration value
+ *       PORT_CONFIG_EXTEND_VALUE    Default port extend configuration value
+ *       PORT_SDMA_CONFIG_VALUE      Default sdma control value
+ *       PORT_SERIAL_CONTROL_VALUE   Default port serial control value
+ *
+ *		This driver data flow is done using the struct pkt_info which
+ *              is a unified struct for Rx and Tx operations:
+ *
+ *		byte_cnt	Tx/Rx descriptor buffer byte count.
+ *		l4i_chk		CPU provided TCP Checksum. For Tx operation
+ *                              only.
+ *		cmd_sts		Tx/Rx descriptor command status.
+ *		buf_ptr		Tx/Rx descriptor buffer pointer.
+ *		return_info	Tx/Rx user resource return information.
+ */
+
+/* defines */
+/* SDMA command macros */
+#define ETH_ENABLE_TX_QUEUE(eth_port) \
+	MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(eth_port), 1)
+
+#define ETH_DISABLE_TX_QUEUE(eth_port) \
+	MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(eth_port),	\
+	         (1 << 8))
+
+#define ETH_ENABLE_RX_QUEUE(rx_queue, eth_port) \
+	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port),	\
+	         (1 << rx_queue))
+
+#define ETH_DISABLE_RX_QUEUE(rx_queue, eth_port) \
+	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port),	\
+	         (1 << (8 + rx_queue)))
+
+#define LINK_UP_TIMEOUT		100000
+#define PHY_BUSY_TIMEOUT	10000000
+
+/* locals */
+
+/* PHY routines */
+#ifdef MDD_CUT
+static void ethernet_phy_set(unsigned int eth_port_num, int phy_addr);
+#endif
+static int ethernet_phy_get(unsigned int eth_port_num);
+
+/* Ethernet Port routines */
+static int eth_port_uc_addr(unsigned int eth_port_num, unsigned char uc_nibble,
+	int option);
+
+#ifdef MDD_CUT
+static void eth_b_copy(unsigned int src_addr, unsigned int dst_addr,
+	int byte_count);
+#endif
+
+/*
+ * eth_port_init - Initialize the Ethernet port driver
+ *
+ * DESCRIPTION:
+ *       This function prepares the ethernet port to start its activity:
+ *       1) Completes the ethernet port driver struct initialization toward port
+ *           start routine.
+ *       2) Resets the device to a quiescent state in case of warm reboot.
+ *       3) Enable SDMA access to all four DRAM banks as well as internal SRAM.
+ *       4) Clean MAC tables. The reset status of those tables is unknown.
+ *       5) Set PHY address. 
+ *       Note: Call this routine prior to eth_port_start routine and after
+ *       setting user values in the user fields of Ethernet port control
+ *       struct.
+ *
+ * INPUT:
+ *       struct mv64340_private *mp   Ethernet port control struct
+ *
+ * OUTPUT:
+ *       See description.
+ *
+ * RETURN:
+ *       None.
+ */
+static void eth_port_init(struct mv64340_private * mp)
+{
+	mp->port_config = PORT_CONFIG_VALUE;
+	mp->port_config_extend = PORT_CONFIG_EXTEND_VALUE;
+#if defined(__BIG_ENDIAN)
+	mp->port_sdma_config = PORT_SDMA_CONFIG_VALUE;
+#elif defined(__LITTLE_ENDIAN)
+	mp->port_sdma_config = PORT_SDMA_CONFIG_VALUE |
+		ETH_BLM_RX_NO_SWAP | ETH_BLM_TX_NO_SWAP;
+#else
+#error One of __LITTLE_ENDIAN or __BIG_ENDIAN must be defined!
+#endif
+	mp->port_serial_control = PORT_SERIAL_CONTROL_VALUE;
+
+	mp->port_rx_queue_command = 0;
+	mp->port_tx_queue_command = 0;
+
+	mp->rx_resource_err = 0;
+	mp->tx_resource_err = 0;
+
+	eth_port_reset(mp->port_num);
+
+	eth_port_init_mac_tables(mp->port_num);
+
+	ethernet_phy_reset(mp->port_num);
+}
+
+/*
+ * eth_port_start - Start the Ethernet port activity.
+ *
+ * DESCRIPTION:
+ *       This routine prepares the Ethernet port for Rx and Tx activity:
+ *       1. Initialize Tx and Rx Current Descriptor Pointer for each queue that
+ *          has been initialized a descriptor's ring (using
+ *          ether_init_tx_desc_ring for Tx and ether_init_rx_desc_ring for Rx)
+ *       2. Initialize and enable the Ethernet configuration port by writing to
+ *          the port's configuration and command registers.
+ *       3. Initialize and enable the SDMA by writing to the SDMA's 
+ *          configuration and command registers.  After completing these steps,
+ *          the ethernet port SDMA can starts to perform Rx and Tx activities.
+ *
+ *       Note: Each Rx and Tx queue descriptor's list must be initialized prior
+ *       to calling this function (use ether_init_tx_desc_ring for Tx queues
+ *       and ether_init_rx_desc_ring for Rx queues).
+ *
+ * INPUT:
+ *       struct mv64340_private 	*mp   Ethernet port control struct
+ *
+ * OUTPUT:
+ *       Ethernet port is ready to receive and transmit.
+ *
+ * RETURN:
+ *       false if the port PHY is not up.
+ *       true otherwise.
+ */
+static int eth_port_start(struct mv64340_private *mp)
+{
+	unsigned int eth_port_num = mp->port_num;
+	int tx_curr_desc, rx_curr_desc;
+	unsigned int phy_reg_data;
+
+	/* Assignment of Tx CTRP of given queue */
+	tx_curr_desc = mp->tx_curr_desc_q;
+	MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(eth_port_num),
+	         (struct eth_tx_desc *) mp->tx_desc_dma + tx_curr_desc);
+
+	/* Assignment of Rx CRDP of given queue */
+	rx_curr_desc = mp->rx_curr_desc_q;
+	MV_WRITE(MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_0(eth_port_num),
+		 (struct eth_rx_desc *) mp->rx_desc_dma + rx_curr_desc);
+
+	/* Add the assigned Ethernet address to the port's address table */
+	eth_port_uc_addr_set(mp->port_num, mp->port_mac_addr);
+
+	/* Assign port configuration and command. */
+	MV_WRITE(MV64340_ETH_PORT_CONFIG_REG(eth_port_num),
+		 mp->port_config);
+
+	MV_WRITE(MV64340_ETH_PORT_CONFIG_EXTEND_REG(eth_port_num),
+		 mp->port_config_extend);
+
+	MV_WRITE(MV64340_ETH_PORT_SERIAL_CONTROL_REG(eth_port_num),
+		 mp->port_serial_control);
+
+	MV_SET_REG_BITS(MV64340_ETH_PORT_SERIAL_CONTROL_REG(eth_port_num),
+			ETH_SERIAL_PORT_ENABLE);
+
+	/* Assign port SDMA configuration */
+	MV_WRITE(MV64340_ETH_SDMA_CONFIG_REG(eth_port_num),
+		 mp->port_sdma_config);
+
+	/* Enable port Rx. */
+	MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(eth_port_num),
+		 mp->port_rx_queue_command);
+
+	/* Check if link is up */
+	eth_port_read_smi_reg(eth_port_num, 1, &phy_reg_data);
+
+	if (!(phy_reg_data & 0x20))
+		return 0;
+
+	return 1;
+}
+
+/*
+ * eth_port_uc_addr_set - This function Set the port Unicast address.
+ *
+ * DESCRIPTION:
+ *		This function Set the port Ethernet MAC address.
+ *
+ * INPUT:
+ *	unsigned int eth_port_num     Port number.
+ *	char *        p_addr		Address to be set 
+ *
+ * OUTPUT:
+ *	Set MAC address low and high registers. also calls eth_port_uc_addr() 
+ *       To set the unicast table with the proper information.
+ *
+ * RETURN:
+ *	N/A.
+ *
+ */
+static void eth_port_uc_addr_set(unsigned int eth_port_num,
+				 unsigned char *p_addr)
+{
+	unsigned int mac_h;
+	unsigned int mac_l;
+
+	mac_l = (p_addr[4] << 8) | (p_addr[5]);
+	mac_h = (p_addr[0] << 24) | (p_addr[1] << 16) |
+	    (p_addr[2] << 8) | (p_addr[3] << 0);
+
+	MV_WRITE(MV64340_ETH_MAC_ADDR_LOW(eth_port_num), mac_l);
+	MV_WRITE(MV64340_ETH_MAC_ADDR_HIGH(eth_port_num), mac_h);
+
+	/* Accept frames of this address */
+	eth_port_uc_addr(eth_port_num, p_addr[5], ACCEPT_MAC_ADDR);
+
+	return;
+}
+
+/*
+ * eth_port_uc_addr - This function Set the port unicast address table
+ *
+ * DESCRIPTION:
+ *	This function locates the proper entry in the Unicast table for the 
+ *	specified MAC nibble and sets its properties according to function 
+ *	parameters.
+ *
+ * INPUT:
+ *	unsigned int 	eth_port_num      Port number.
+ *	unsigned char uc_nibble		Unicast MAC Address last nibble. 
+ *	int 			option      0 = Add, 1 = remove address.
+ *
+ * OUTPUT:
+ *	This function add/removes MAC addresses from the port unicast address
+ *	table. 
+ *
+ * RETURN:
+ *	true is output succeeded.
+ *	false if option parameter is invalid.
+ *
+ */
+static int eth_port_uc_addr(unsigned int eth_port_num,
+	unsigned char uc_nibble, int option)
+{
+	unsigned int unicast_reg;
+	unsigned int tbl_offset;
+	unsigned int reg_offset;
+
+	/* Locate the Unicast table entry */
+	uc_nibble = (0xf & uc_nibble);
+	tbl_offset = (uc_nibble / 4) * 4;	/* Register offset from unicast table base */
+	reg_offset = uc_nibble % 4;	/* Entry offset within the above register */
+
+	switch (option) {
+	case REJECT_MAC_ADDR:
+		/* Clear accepts frame bit at specified unicast DA table entry */
+		unicast_reg = MV_READ((MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
+				  (eth_port_num) + tbl_offset));
+
+		unicast_reg &= (0x0E << (8 * reg_offset));
+
+		MV_WRITE(
+			 (MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
+			  (eth_port_num) + tbl_offset), unicast_reg);
+		break;
+
+	case ACCEPT_MAC_ADDR:
+		/* Set accepts frame bit at unicast DA filter table entry */
+		unicast_reg =
+		    MV_READ(
+				 (MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
+				  (eth_port_num) + tbl_offset));
+
+		unicast_reg |= (0x01 << (8 * reg_offset));
+
+		MV_WRITE(
+			 (MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
+			  (eth_port_num) + tbl_offset), unicast_reg);
+
+		break;
+
+	default:
+		return 0;
+	}
+
+	return 1;
+}
+
+/*
+ * eth_port_init_mac_tables - Clear all entrance in the UC, SMC and OMC tables
+ *
+ * DESCRIPTION:
+ *       Go through all the DA filter tables (Unicast, Special Multicast &
+ *       Other Multicast) and set each entry to 0.
+ *
+ * INPUT:
+ *	unsigned int    eth_port_num   Ethernet Port number.
+ *
+ * OUTPUT:
+ *       Multicast and Unicast packets are rejected.
+ *
+ * RETURN:
+ *       None.
+ */
+static void eth_port_init_mac_tables(unsigned int eth_port_num)
+{
+	int table_index;
+
+	/* Clear DA filter unicast table (Ex_dFUT) */
+	for (table_index = 0; table_index <= 0xC; table_index += 4)
+		MV_WRITE(
+			 (MV64340_ETH_DA_FILTER_UNICAST_TABLE_BASE
+			  (eth_port_num) + table_index), 0);
+
+	for (table_index = 0; table_index <= 0xFC; table_index += 4) {
+		/* Clear DA filter special multicast table (Ex_dFSMT) */
+		MV_WRITE(
+			 (MV64340_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
+			  (eth_port_num) + table_index), 0);
+		/* Clear DA filter other multicast table (Ex_dFOMT) */
+		MV_WRITE((MV64340_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE
+			  (eth_port_num) + table_index), 0);
+	}
+}
+
+/*
+ * eth_clear_mib_counters - Clear all MIB counters
+ *
+ * DESCRIPTION:
+ *       This function clears all MIB counters of a specific ethernet port.
+ *       A read from the MIB counter will reset the counter.
+ *
+ * INPUT:
+ *	unsigned int    eth_port_num   Ethernet Port number.
+ *
+ * OUTPUT:
+ *       After reading all MIB counters, the counters resets.
+ *
+ * RETURN:
+ *       MIB counter value.
+ *
+ */
+static void eth_clear_mib_counters(unsigned int eth_port_num)
+{
+	int i;
+
+	/* Perform dummy reads from MIB counters */
+	for (i = ETH_MIB_GOOD_OCTETS_RECEIVED_LOW; i < ETH_MIB_LATE_COLLISION; i += 4)
+		MV_READ(MV64340_ETH_MIB_COUNTERS_BASE(eth_port_num) + i);
+}
+
+
+#ifdef MDD_CUT
+/*
+ * ethernet_phy_set - Set the ethernet port PHY address.
+ *
+ * DESCRIPTION:
+ *       This routine set the ethernet port PHY address according to given 
+ *       parameter.
+ *
+ * INPUT:
+ *		unsigned int   eth_port_num   Ethernet Port number.
+ *
+ * OUTPUT:
+ *       Set PHY Address Register with given PHY address parameter.
+ *
+ * RETURN:
+ *       None.
+ */
+static void ethernet_phy_set(unsigned int eth_port_num, int phy_addr)
+{
+	unsigned int reg_data;
+
+	reg_data = MV_READ(MV64340_ETH_PHY_ADDR_REG);
+
+	reg_data &= ~(0x1F << (5 * eth_port_num));
+	reg_data |= (phy_addr << (5 * eth_port_num));
+
+	MV_WRITE(MV64340_ETH_PHY_ADDR_REG, reg_data);
+
+	return;
+}
+#endif
+
+/*
+ * ethernet_phy_get - Get the ethernet port PHY address.
+ *
+ * DESCRIPTION:
+ *       This routine returns the given ethernet port PHY address.
+ *
+ * INPUT:
+ *		unsigned int   eth_port_num   Ethernet Port number.
+ *
+ * OUTPUT:
+ *       None.
+ *
+ * RETURN:
+ *       PHY address.
+ *
+ */
+static int ethernet_phy_get(unsigned int eth_port_num)
+{
+	unsigned int reg_data;
+
+	reg_data = MV_READ(MV64340_ETH_PHY_ADDR_REG);
+
+	return ((reg_data >> (5 * eth_port_num)) & 0x1f);
+}
+
+/*
+ * ethernet_phy_reset - Reset Ethernet port PHY.
+ *
+ * DESCRIPTION:
+ *       This routine utilize the SMI interface to reset the ethernet port PHY.
+ *       The routine waits until the link is up again or link up is timeout.
+ *
+ * INPUT:
+ *	unsigned int   eth_port_num   Ethernet Port number.
+ *
+ * OUTPUT:
+ *       The ethernet port PHY renew its link.
+ *
+ * RETURN:
+ *       None.
+ *
+ */
+static int ethernet_phy_reset(unsigned int eth_port_num)
+{
+	unsigned int time_out = 50;
+	unsigned int phy_reg_data;
+
+	/* Reset the PHY */
+	eth_port_read_smi_reg(eth_port_num, 0, &phy_reg_data);
+	phy_reg_data |= 0x8000;	/* Set bit 15 to reset the PHY */
+	eth_port_write_smi_reg(eth_port_num, 0, phy_reg_data);
+
+	/* Poll on the PHY LINK */
+	do {
+		eth_port_read_smi_reg(eth_port_num, 1, &phy_reg_data);
+
+		if (time_out-- == 0)
+			return 0;
+	} while (!(phy_reg_data & 0x20));
+
+	return 1;
+}
+
+/*
+ * eth_port_reset - Reset Ethernet port
+ *
+ * DESCRIPTION:
+ * 	This routine resets the chip by aborting any SDMA engine activity and
+ *      clearing the MIB counters. The Receiver and the Transmit unit are in 
+ *      idle state after this command is performed and the port is disabled.
+ *
+ * INPUT:
+ *	unsigned int   eth_port_num   Ethernet Port number.
+ *
+ * OUTPUT:
+ *       Channel activity is halted.
+ *
+ * RETURN:
+ *       None.
+ *
+ */
+static void eth_port_reset(unsigned int eth_port_num)
+{
+	unsigned int reg_data;
+
+	/* Stop Tx port activity. Check port Tx activity. */
+	reg_data =
+	    MV_READ(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG(eth_port_num));
+
+	if (reg_data & 0xFF) {
+		/* Issue stop command for active channels only */
+		MV_WRITE(MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG
+			 (eth_port_num), (reg_data << 8));
+
+		/* Wait for all Tx activity to terminate. */
+		do {
+			/* Check port cause register that all Tx queues are stopped */
+			reg_data =
+			    MV_READ
+			    (MV64340_ETH_TRANSMIT_QUEUE_COMMAND_REG
+			     (eth_port_num));
+		}
+		while (reg_data & 0xFF);
+	}
+
+	/* Stop Rx port activity. Check port Rx activity. */
+	reg_data =
+	    MV_READ(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG
+			 (eth_port_num));
+
+	if (reg_data & 0xFF) {
+		/* Issue stop command for active channels only */
+		MV_WRITE(MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG
+			 (eth_port_num), (reg_data << 8));
+
+		/* Wait for all Rx activity to terminate. */
+		do {
+			/* Check port cause register that all Rx queues are stopped */
+			reg_data =
+			    MV_READ
+			    (MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG
+			     (eth_port_num));
+		}
+		while (reg_data & 0xFF);
+	}
+
+
+	/* Clear all MIB counters */
+	eth_clear_mib_counters(eth_port_num);
+
+	/* Reset the Enable bit in the Configuration Register */
+	reg_data =
+	    MV_READ(MV64340_ETH_PORT_SERIAL_CONTROL_REG (eth_port_num));
+	reg_data &= ~ETH_SERIAL_PORT_ENABLE;
+	MV_WRITE(MV64340_ETH_PORT_SERIAL_CONTROL_REG(eth_port_num), reg_data);
+
+	return;
+}
+
+/*
+ * ethernet_set_config_reg - Set specified bits in configuration register.
+ *
+ * DESCRIPTION:
+ *       This function sets specified bits in the given ethernet 
+ *       configuration register. 
+ *
+ * INPUT:
+ *	unsigned int   eth_port_num   Ethernet Port number.
+ *      unsigned int    value   32 bit value.
+ *
+ * OUTPUT:
+ *      The set bits in the value parameter are set in the configuration 
+ *      register.
+ *
+ * RETURN:
+ *      None.
+ *
+ */
+static void ethernet_set_config_reg(unsigned int eth_port_num,
+				    unsigned int value)
+{
+	unsigned int eth_config_reg;
+
+	eth_config_reg =
+	    MV_READ(MV64340_ETH_PORT_CONFIG_REG(eth_port_num));
+	eth_config_reg |= value;
+	MV_WRITE(MV64340_ETH_PORT_CONFIG_REG(eth_port_num),
+		 eth_config_reg);
+}
+
+/*
+ * ethernet_get_config_reg - Get the port configuration register
+ *
+ * DESCRIPTION:
+ *       This function returns the configuration register value of the given 
+ *       ethernet port.
+ *
+ * INPUT:
+ *	unsigned int   eth_port_num   Ethernet Port number.
+ *
+ * OUTPUT:
+ *       None.
+ *
+ * RETURN:
+ *       Port configuration register value.
+ */
+static unsigned int ethernet_get_config_reg(unsigned int eth_port_num)
+{
+	unsigned int eth_config_reg;
+
+	eth_config_reg = MV_READ(MV64340_ETH_PORT_CONFIG_EXTEND_REG
+				      (eth_port_num));
+	return eth_config_reg;
+}
+
+
+/*
+ * eth_port_read_smi_reg - Read PHY registers
+ *
+ * DESCRIPTION:
+ *       This routine utilize the SMI interface to interact with the PHY in 
+ *       order to perform PHY register read.
+ *
+ * INPUT:
+ *	unsigned int   eth_port_num   Ethernet Port number.
+ *       unsigned int   phy_reg   PHY register address offset.
+ *       unsigned int   *value   Register value buffer.
+ *
+ * OUTPUT:
+ *       Write the value of a specified PHY register into given buffer.
+ *
+ * RETURN:
+ *       false if the PHY is busy or read data is not in valid state.
+ *       true otherwise.
+ *
+ */
+static int eth_port_read_smi_reg(unsigned int eth_port_num,
+	unsigned int phy_reg, unsigned int *value)
+{
+	int phy_addr = ethernet_phy_get(eth_port_num);
+	unsigned int time_out = PHY_BUSY_TIMEOUT;
+	unsigned int reg_value;
+
+	/* first check that it is not busy */
+	do {
+		reg_value = MV_READ(MV64340_ETH_SMI_REG);
+		if (time_out-- == 0)
+			return 0;
+	} while (reg_value & ETH_SMI_BUSY);
+
+	/* not busy */
+
+	MV_WRITE(MV64340_ETH_SMI_REG,
+		 (phy_addr << 16) | (phy_reg << 21) | ETH_SMI_OPCODE_READ);
+
+	time_out = PHY_BUSY_TIMEOUT;	/* initialize the time out var again */
+
+	do {
+		reg_value = MV_READ(MV64340_ETH_SMI_REG);
+		if (time_out-- == 0)
+			return 0;
+	} while (reg_value & ETH_SMI_READ_VALID);
+
+	/* Wait for the data to update in the SMI register */
+	for (time_out = 0; time_out < PHY_BUSY_TIMEOUT; time_out++);
+
+	reg_value = MV_READ(MV64340_ETH_SMI_REG);
+
+	*value = reg_value & 0xffff;
+
+	return 1;
+}
+
+/*
+ * eth_port_write_smi_reg - Write to PHY registers
+ *
+ * DESCRIPTION:
+ *       This routine utilize the SMI interface to interact with the PHY in 
+ *       order to perform writes to PHY registers.
+ *
+ * INPUT:
+ *	unsigned int   eth_port_num   Ethernet Port number.
+ *      unsigned int   phy_reg   PHY register address offset.
+ *      unsigned int    value   Register value.
+ *
+ * OUTPUT:
+ *      Write the given value to the specified PHY register.
+ *
+ * RETURN:
+ *      false if the PHY is busy.
+ *      true otherwise.
+ *
+ */
+static int eth_port_write_smi_reg(unsigned int eth_port_num,
+	unsigned int phy_reg, unsigned int value)
+{
+	unsigned int time_out = PHY_BUSY_TIMEOUT;
+	unsigned int reg_value;
+	int phy_addr;
+
+	phy_addr = ethernet_phy_get(eth_port_num);
+
+	/* first check that it is not busy */
+	do {
+		reg_value = MV_READ(MV64340_ETH_SMI_REG);
+		if (time_out-- == 0)
+			return 0;
+	} while (reg_value & ETH_SMI_BUSY);
+
+	/* not busy */
+	MV_WRITE(MV64340_ETH_SMI_REG, (phy_addr << 16) | (phy_reg << 21) |
+		 ETH_SMI_OPCODE_WRITE | (value & 0xffff));
+
+	return 1;
+}
+
+/*
+ * eth_port_send - Send an Ethernet packet
+ *
+ * DESCRIPTION:
+ *	This routine send a given packet described by p_pktinfo parameter. It 
+ *      supports transmitting of a packet spaned over multiple buffers. The 
+ *      routine updates 'curr' and 'first' indexes according to the packet 
+ *      segment passed to the routine. In case the packet segment is first, 
+ *      the 'first' index is update. In any case, the 'curr' index is updated. 
+ *      If the routine get into Tx resource error it assigns 'curr' index as 
+ *      'first'. This way the function can abort Tx process of multiple 
+ *      descriptors per packet.
+ *
+ * INPUT:
+ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
+ *	struct pkt_info        *p_pkt_info       User packet buffer.
+ *
+ * OUTPUT:
+ *	Tx ring 'curr' and 'first' indexes are updated. 
+ *
+ * RETURN:
+ *      ETH_QUEUE_FULL in case of Tx resource error.
+ *	ETH_ERROR in case the routine can not access Tx desc ring.
+ *	ETH_QUEUE_LAST_RESOURCE if the routine uses the last Tx resource.
+ *      ETH_OK otherwise.
+ *
+ */
+#ifdef  MV64340_CHECKSUM_OFFLOAD_TX
+/*
+ * Modified to include the first descriptor pointer in case of SG
+ */
+static ETH_FUNC_RET_STATUS eth_port_send(struct mv64340_private * mp,
+                                         struct pkt_info * p_pkt_info)
+{
+	int tx_desc_curr, tx_desc_used, tx_first_desc, tx_next_desc;
+	volatile struct eth_tx_desc *current_descriptor;
+	volatile struct eth_tx_desc *first_descriptor;
+	u32 command_status, first_chip_ptr;
+
+	/* Do not process Tx ring in case of Tx ring resource error */
+	if (mp->tx_resource_err)
+		return ETH_QUEUE_FULL;
+
+	/* Get the Tx Desc ring indexes */
+	tx_desc_curr = mp->tx_curr_desc_q;
+	tx_desc_used = mp->tx_used_desc_q;
+
+	current_descriptor = &mp->p_tx_desc_area[tx_desc_curr];
+	if (current_descriptor == NULL)
+		return ETH_ERROR;
+
+	tx_next_desc = (tx_desc_curr + 1) % MV64340_TX_QUEUE_SIZE;
+	command_status = p_pkt_info->cmd_sts | ETH_ZERO_PADDING | ETH_GEN_CRC;
+
+	if (command_status & ETH_TX_FIRST_DESC) {
+		tx_first_desc = tx_desc_curr;
+		mp->tx_first_desc_q = tx_first_desc;
+
+                /* fill first descriptor */
+                first_descriptor = &mp->p_tx_desc_area[tx_desc_curr];
+                first_descriptor->l4i_chk = p_pkt_info->l4i_chk;
+                first_descriptor->cmd_sts = command_status;
+                first_descriptor->byte_cnt = p_pkt_info->byte_cnt;
+                first_descriptor->buf_ptr = p_pkt_info->buf_ptr;
+                first_descriptor->next_desc_ptr =
+			(struct eth_tx_desc *) mp->tx_desc_dma + tx_next_desc;
+		wmb();
+        } else {
+                tx_first_desc = mp->tx_first_desc_q;
+                first_descriptor = &mp->p_tx_desc_area[tx_first_desc];
+                if (first_descriptor == NULL) {
+                        printk("First desc is NULL !!\n");
+                        return ETH_ERROR;
+                }
+                if (command_status & ETH_TX_LAST_DESC)
+                        current_descriptor->next_desc_ptr = 0x00000000;
+                else {
+                        command_status |= ETH_BUFFER_OWNED_BY_DMA;
+                        current_descriptor->next_desc_ptr =
+			  (struct eth_tx_desc *) mp->tx_desc_dma + tx_next_desc;
+                }
+        }
+
+        if (p_pkt_info->byte_cnt < 8) {
+                printk(" < 8 problem \n");
+                return ETH_ERROR;
+        }
+
+        current_descriptor->buf_ptr = p_pkt_info->buf_ptr;
+        current_descriptor->byte_cnt = p_pkt_info->byte_cnt;
+        current_descriptor->l4i_chk = p_pkt_info->l4i_chk;
+        current_descriptor->cmd_sts = command_status;
+
+        mp->tx_skb[tx_desc_curr] = (struct sk_buff*) p_pkt_info->return_info;
+
+        wmb();
+
+        /* Set last desc with DMA ownership and interrupt enable. */
+        if (command_status & ETH_TX_LAST_DESC) {
+                current_descriptor->cmd_sts = command_status |
+                                        ETH_TX_ENABLE_INTERRUPT |
+                                        ETH_BUFFER_OWNED_BY_DMA;
+
+		if (!(command_status & ETH_TX_FIRST_DESC))
+			first_descriptor->cmd_sts |= ETH_BUFFER_OWNED_BY_DMA;
+		wmb();
+
+		first_chip_ptr = MV_READ(MV64340_ETH_CURRENT_SERVED_TX_DESC_PTR(mp->port_num));
+
+		/* Apply send command */
+		if (first_chip_ptr == 0x00000000)
+			MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(mp->port_num), (struct eth_tx_desc *) mp->tx_desc_dma + tx_first_desc);
+
+                ETH_ENABLE_TX_QUEUE(mp->port_num);
+
+		/*
+		 * Finish Tx packet. Update first desc in case of Tx resource
+		 * error */
+                tx_first_desc = tx_next_desc;
+                mp->tx_first_desc_q = tx_first_desc;
+	} else {
+		if (! (command_status & ETH_TX_FIRST_DESC) ) {
+			current_descriptor->cmd_sts = command_status;
+			wmb();
+		}
+	}
+
+        /* Check for ring index overlap in the Tx desc ring */
+        if (tx_next_desc == tx_desc_used) {
+                mp->tx_resource_err = 1;
+                mp->tx_curr_desc_q = tx_first_desc;
+
+                return ETH_QUEUE_LAST_RESOURCE;
+	}
+
+        mp->tx_curr_desc_q = tx_next_desc;
+        wmb();
+
+        return ETH_OK;
+}
+#else
+static ETH_FUNC_RET_STATUS eth_port_send(struct mv64340_private * mp,
+					 struct pkt_info * p_pkt_info)
+{
+	int tx_desc_curr;
+	int tx_desc_used;
+	volatile struct eth_tx_desc* current_descriptor;
+	unsigned int command_status;
+
+	/* Do not process Tx ring in case of Tx ring resource error */
+	if (mp->tx_resource_err)
+		return ETH_QUEUE_FULL;
+
+	/* Get the Tx Desc ring indexes */
+	tx_desc_curr = mp->tx_curr_desc_q;
+	tx_desc_used = mp->tx_used_desc_q;
+	current_descriptor = &mp->p_tx_desc_area[tx_desc_curr];
+
+	if (current_descriptor == NULL)
+		return ETH_ERROR;
+
+	command_status = p_pkt_info->cmd_sts | ETH_ZERO_PADDING | ETH_GEN_CRC;
+
+/* XXX Is this for real ?!?!? */
+	/* Buffers with a payload smaller than 8 bytes must be aligned to a
+	 * 64-bit boundary. We use the memory allocated for Tx descriptor.
+	 * This memory is located in TX_BUF_OFFSET_IN_DESC offset within the
+	 * Tx descriptor. */
+	if (p_pkt_info->byte_cnt <= 8) {
+		printk(KERN_ERR
+		       "You have failed in the < 8 bytes errata - fixme\n");
+		return ETH_ERROR;
+	}
+	current_descriptor->buf_ptr = p_pkt_info->buf_ptr;
+	current_descriptor->byte_cnt = p_pkt_info->byte_cnt;
+	mp->tx_skb[tx_desc_curr] = (struct sk_buff *) p_pkt_info->return_info;
+
+	mb();
+
+	/* Set last desc with DMA ownership and interrupt enable. */
+	current_descriptor->cmd_sts = command_status |
+			ETH_BUFFER_OWNED_BY_DMA | ETH_TX_ENABLE_INTERRUPT;
+
+	/* Apply send command */
+	ETH_ENABLE_TX_QUEUE(mp->port_num);
+
+	/* Finish Tx packet. Update first desc in case of Tx resource error */
+	tx_desc_curr = (tx_desc_curr + 1) % MV64340_TX_QUEUE_SIZE;
+
+	/* Update the current descriptor */
+ 	mp->tx_curr_desc_q = tx_desc_curr;
+
+	/* Check for ring index overlap in the Tx desc ring */
+	if (tx_desc_curr == tx_desc_used) {
+		mp->tx_resource_err = 1;
+		return ETH_QUEUE_LAST_RESOURCE;
+	}
+
+	return ETH_OK;
+}
+#endif
+
+/*
+ * eth_tx_return_desc - Free all used Tx descriptors
+ *
+ * DESCRIPTION:
+ *	This routine returns the transmitted packet information to the caller.
+ *      It uses the 'first' index to support Tx desc return in case a transmit 
+ *      of a packet spanned over multiple buffer still in process.
+ *      In case the Tx queue was in "resource error" condition, where there are 
+ *      no available Tx resources, the function resets the resource error flag.
+ *
+ * INPUT:
+ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
+ *	struct pkt_info        *p_pkt_info       User packet buffer.
+ *
+ * OUTPUT:
+ *	Tx ring 'first' and 'used' indexes are updated. 
+ *
+ * RETURN:
+ *	ETH_ERROR in case the routine can not access Tx desc ring.
+ *      ETH_RETRY in case there is transmission in process.
+ *	ETH_END_OF_JOB if the routine has nothing to release.
+ *      ETH_OK otherwise.
+ *
+ */
+static ETH_FUNC_RET_STATUS eth_tx_return_desc(struct mv64340_private * mp,
+					      struct pkt_info * p_pkt_info)
+{
+	int tx_desc_used, tx_desc_curr;
+#ifdef MV64340_CHECKSUM_OFFLOAD_TX
+        int tx_first_desc;
+#endif
+	volatile struct eth_tx_desc *p_tx_desc_used;
+	unsigned int command_status;
+
+	/* Get the Tx Desc ring indexes */
+	tx_desc_curr = mp->tx_curr_desc_q;
+	tx_desc_used = mp->tx_used_desc_q;
+#ifdef MV64340_CHECKSUM_OFFLOAD_TX
+        tx_first_desc = mp->tx_first_desc_q;
+#endif
+	p_tx_desc_used = &mp->p_tx_desc_area[tx_desc_used];
+
+	/* XXX Sanity check */
+	if (p_tx_desc_used == NULL)
+		return ETH_ERROR;
+
+	command_status = p_tx_desc_used->cmd_sts;
+
+	/* Still transmitting... */
+#ifndef MV64340_CHECKSUM_OFFLOAD_TX
+	if (command_status & (ETH_BUFFER_OWNED_BY_DMA))
+		return ETH_RETRY;
+#endif
+	/* Stop release. About to overlap the current available Tx descriptor */
+#ifdef MV64340_CHECKSUM_OFFLOAD_TX
+	if (tx_desc_used == tx_first_desc && !mp->tx_resource_err)
+		return ETH_END_OF_JOB;
+#else
+	if (tx_desc_used == tx_desc_curr && !mp->tx_resource_err)
+		return ETH_END_OF_JOB;
+#endif
+
+	/* Pass the packet information to the caller */
+	p_pkt_info->cmd_sts = command_status;
+	p_pkt_info->return_info = mp->tx_skb[tx_desc_used];
+	mp->tx_skb[tx_desc_used] = NULL;
+
+	/* Update the next descriptor to release. */
+	mp->tx_used_desc_q = (tx_desc_used + 1) % MV64340_TX_QUEUE_SIZE;
+
+	/* Any Tx return cancels the Tx resource error status */
+	mp->tx_resource_err = 0;
+
+	return ETH_OK;
+}
+
+/*
+ * eth_port_receive - Get received information from Rx ring.
+ *
+ * DESCRIPTION:
+ * 	This routine returns the received data to the caller. There is no 
+ *	data copying during routine operation. All information is returned 
+ *	using pointer to packet information struct passed from the caller. 
+ *      If the routine exhausts	Rx ring resources then the resource error flag 
+ *      is set.  
+ *
+ * INPUT:
+ *	struct mv64340_private   *mp   Ethernet Port Control srtuct. 
+ *	struct pkt_info        *p_pkt_info       User packet buffer.
+ *
+ * OUTPUT:
+ *	Rx ring current and used indexes are updated. 
+ *
+ * RETURN:
+ *	ETH_ERROR in case the routine can not access Rx desc ring.
+ *	ETH_QUEUE_FULL if Rx ring resources are exhausted.
+ *	ETH_END_OF_JOB if there is no received data.
+ *      ETH_OK otherwise.
+ */
+static ETH_FUNC_RET_STATUS eth_port_receive(struct mv64340_private * mp,
+					    struct pkt_info * p_pkt_info)
+{
+	int rx_next_curr_desc, rx_curr_desc, rx_used_desc;
+	volatile struct eth_rx_desc * p_rx_desc;
+	unsigned int command_status;
+
+	/* Do not process Rx ring in case of Rx ring resource error */
+	if (mp->rx_resource_err)
+		return ETH_QUEUE_FULL;
+
+	/* Get the Rx Desc ring 'curr and 'used' indexes */
+	rx_curr_desc = mp->rx_curr_desc_q;
+	rx_used_desc = mp->rx_used_desc_q;
+
+	p_rx_desc = &mp->p_rx_desc_area[rx_curr_desc];
+
+	/* The following parameters are used to save readings from memory */
+	command_status = p_rx_desc->cmd_sts;
+
+	/* Nothing to receive... */
+	if (command_status & (ETH_BUFFER_OWNED_BY_DMA))
+		return ETH_END_OF_JOB;
+
+	p_pkt_info->byte_cnt = (p_rx_desc->byte_cnt) - RX_BUF_OFFSET;
+	p_pkt_info->cmd_sts = command_status;
+	p_pkt_info->buf_ptr = (p_rx_desc->buf_ptr) + RX_BUF_OFFSET;
+	p_pkt_info->return_info = mp->rx_skb[rx_curr_desc];
+	p_pkt_info->l4i_chk = p_rx_desc->buf_size;
+
+	/* Clean the return info field to indicate that the packet has been */
+	/* moved to the upper layers                                        */
+	mp->rx_skb[rx_curr_desc] = NULL;
+
+	/* Update current index in data structure */
+	rx_next_curr_desc = (rx_curr_desc + 1) % MV64340_RX_QUEUE_SIZE;
+	mp->rx_curr_desc_q = rx_next_curr_desc;
+
+	/* Rx descriptors exhausted. Set the Rx ring resource error flag */
+	if (rx_next_curr_desc == rx_used_desc)
+		mp->rx_resource_err = 1;
+
+	mb();
+	return ETH_OK;
+}
+
+/*
+ * eth_rx_return_buff - Returns a Rx buffer back to the Rx ring.
+ *
+ * DESCRIPTION:
+ *	This routine returns a Rx buffer back to the Rx ring. It retrieves the 
+ *      next 'used' descriptor and attached the returned buffer to it.
+ *      In case the Rx ring was in "resource error" condition, where there are 
+ *      no available Rx resources, the function resets the resource error flag.
+ *
+ * INPUT:
+ *	struct mv64340_private *mp   Ethernet Port Control srtuct. 
+ *      struct pkt_info        *p_pkt_info   Information on the returned buffer.
+ *
+ * OUTPUT:
+ *	New available Rx resource in Rx descriptor ring.
+ *
+ * RETURN:
+ *	ETH_ERROR in case the routine can not access Rx desc ring.
+ *      ETH_OK otherwise.
+ */
+static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv64340_private * mp,
+	struct pkt_info * p_pkt_info)
+{
+	int used_rx_desc;	/* Where to return Rx resource */
+	volatile struct eth_rx_desc* p_used_rx_desc;
+
+	/* Get 'used' Rx descriptor */
+	used_rx_desc = mp->rx_used_desc_q;
+	p_used_rx_desc = &mp->p_rx_desc_area[used_rx_desc];
+
+	p_used_rx_desc->buf_ptr = p_pkt_info->buf_ptr;
+	p_used_rx_desc->buf_size = p_pkt_info->byte_cnt;
+	mp->rx_skb[used_rx_desc] = p_pkt_info->return_info;
+
+	/* Flush the write pipe */
+	mb();
+
+	/* Return the descriptor to DMA ownership */
+	p_used_rx_desc->cmd_sts =
+		ETH_BUFFER_OWNED_BY_DMA | ETH_RX_ENABLE_INTERRUPT;
+
+	/* Flush descriptor and CPU pipe */
+	mb();
+
+	/* Move the used descriptor pointer to the next descriptor */
+	mp->rx_used_desc_q = (used_rx_desc + 1) % MV64340_RX_QUEUE_SIZE;
+
+	/* Any Rx return cancels the Rx resource error status */
+	mp->rx_resource_err = 0;
+
+	return ETH_OK;
+}
+
+#ifdef MDD_CUT
+/*
+ * eth_b_copy - Copy bytes from source to destination
+ *
+ * DESCRIPTION:
+ *       This function supports the eight bytes limitation on Tx buffer size. 
+ *       The routine will zero eight bytes starting from the destination address
+ *       followed by copying bytes from the source address to the destination.
+ *
+ * INPUT:
+ *       unsigned int src_addr    32 bit source address.
+ *       unsigned int dst_addr    32 bit destination address.
+ *       int        byte_count    Number of bytes to copy.
+ *
+ * OUTPUT:
+ *       See description.
+ *
+ * RETURN:
+ *       None.
+ *
+ */
+static void eth_b_copy(unsigned int src_addr, unsigned int dst_addr,
+		       int byte_count)
+{
+	/* Zero the dst_addr area */
+	*(unsigned int *) dst_addr = 0x0;
+
+	while (byte_count != 0) {
+		*(char *) dst_addr = *(char *) src_addr;
+		dst_addr++;
+		src_addr++;
+		byte_count--;
+	}
+}
+#endif
--- diff/drivers/net/mv64340_eth.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/net/mv64340_eth.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,601 @@
+#ifndef __MV64340_ETH_H__
+#define __MV64340_ETH_H__
+
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/spinlock.h>
+#include <linux/workqueue.h>
+
+#include <asm/mv64340.h>
+
+#define	BIT0	0x00000001
+#define	BIT1	0x00000002
+#define	BIT2	0x00000004
+#define	BIT3	0x00000008
+#define	BIT4	0x00000010
+#define	BIT5	0x00000020
+#define	BIT6	0x00000040
+#define	BIT7	0x00000080
+#define	BIT8	0x00000100
+#define	BIT9	0x00000200
+#define	BIT10	0x00000400
+#define	BIT11	0x00000800
+#define	BIT12	0x00001000
+#define	BIT13	0x00002000
+#define	BIT14	0x00004000
+#define	BIT15	0x00008000
+#define	BIT16	0x00010000
+#define	BIT17	0x00020000
+#define	BIT18	0x00040000
+#define	BIT19	0x00080000
+#define	BIT20	0x00100000
+#define	BIT21	0x00200000
+#define	BIT22	0x00400000
+#define	BIT23	0x00800000
+#define	BIT24	0x01000000
+#define	BIT25	0x02000000
+#define	BIT26	0x04000000
+#define	BIT27	0x08000000
+#define	BIT28	0x10000000
+#define	BIT29	0x20000000
+#define	BIT30	0x40000000
+#define	BIT31	0x80000000
+
+/*
+ *  The first part is the high level driver of the gigE ethernet ports.
+ */
+
+#define ETH_PORT0_IRQ_NUM 48			/* main high register, bit0 */
+#define ETH_PORT1_IRQ_NUM ETH_PORT0_IRQ_NUM+1	/* main high register, bit1 */
+#define ETH_PORT2_IRQ_NUM ETH_PORT0_IRQ_NUM+2	/* main high register, bit1 */
+
+/* Checksum offload for Tx works */
+#define  MV64340_CHECKSUM_OFFLOAD_TX
+#define	 MV64340_NAPI
+#define	 MV64340_TX_FAST_REFILL
+#undef	 MV64340_COAL
+
+/* 
+ * Number of RX / TX descriptors on RX / TX rings.
+ * Note that allocating RX descriptors is done by allocating the RX
+ * ring AND a preallocated RX buffers (skb's) for each descriptor.
+ * The TX descriptors only allocates the TX descriptors ring,
+ * with no pre allocated TX buffers (skb's are allocated by higher layers.
+ */
+
+/* Default TX ring size is 1000 descriptors */
+#define MV64340_TX_QUEUE_SIZE 1000
+
+/* Default RX ring size is 400 descriptors */
+#define MV64340_RX_QUEUE_SIZE 400
+
+#define MV64340_TX_COAL 100
+#ifdef MV64340_COAL
+#define MV64340_RX_COAL 100
+#endif
+
+
+/*
+ * The second part is the low level driver of the gigE ethernet ports.   *
+ */
+
+
+/*
+ * Header File for : MV-643xx network interface header 
+ *
+ * DESCRIPTION:
+ *       This header file contains macros typedefs and function declaration for
+ *       the Marvell Gig Bit Ethernet Controller. 
+ *
+ * DEPENDENCIES:
+ *       None.
+ *
+ */
+
+/* Default port configuration value */
+#define PORT_CONFIG_VALUE                       \
+             ETH_UNICAST_NORMAL_MODE		|   \
+             ETH_DEFAULT_RX_QUEUE_0		|   \
+             ETH_DEFAULT_RX_ARP_QUEUE_0		|   \
+             ETH_RECEIVE_BC_IF_NOT_IP_OR_ARP	|   \
+             ETH_RECEIVE_BC_IF_IP		|   \
+             ETH_RECEIVE_BC_IF_ARP 		|   \
+             ETH_CAPTURE_TCP_FRAMES_DIS		|   \
+             ETH_CAPTURE_UDP_FRAMES_DIS		|   \
+             ETH_DEFAULT_RX_TCP_QUEUE_0		|   \
+             ETH_DEFAULT_RX_UDP_QUEUE_0		|   \
+             ETH_DEFAULT_RX_BPDU_QUEUE_0
+
+/* Default port extend configuration value */
+#define PORT_CONFIG_EXTEND_VALUE		\
+             ETH_SPAN_BPDU_PACKETS_AS_NORMAL	|   \
+             ETH_PARTITION_DISABLE
+
+
+/* Default sdma control value */
+#define PORT_SDMA_CONFIG_VALUE			\
+			 ETH_RX_BURST_SIZE_16_64BIT 	|	\
+			 GT_ETH_IPG_INT_RX(0) 		|	\
+			 ETH_TX_BURST_SIZE_16_64BIT;
+
+#define GT_ETH_IPG_INT_RX(value)                \
+            ((value & 0x3fff) << 8)
+
+/* Default port serial control value */
+#define PORT_SERIAL_CONTROL_VALUE		\
+			ETH_FORCE_LINK_PASS 			|	\
+			ETH_ENABLE_AUTO_NEG_FOR_DUPLX		|	\
+			ETH_DISABLE_AUTO_NEG_FOR_FLOW_CTRL 	|	\
+			ETH_ADV_SYMMETRIC_FLOW_CTRL 		|	\
+			ETH_FORCE_FC_MODE_NO_PAUSE_DIS_TX 	|	\
+			ETH_FORCE_BP_MODE_NO_JAM 		|	\
+			BIT9 					|	\
+			ETH_DO_NOT_FORCE_LINK_FAIL 		|	\
+			ETH_RETRANSMIT_16_ATTEMPTS 		|	\
+			ETH_ENABLE_AUTO_NEG_SPEED_GMII	 	|	\
+			ETH_DTE_ADV_0 				|	\
+			ETH_DISABLE_AUTO_NEG_BYPASS		|	\
+			ETH_AUTO_NEG_NO_CHANGE 			|	\
+			ETH_MAX_RX_PACKET_9700BYTE 		|	\
+			ETH_CLR_EXT_LOOPBACK 			|	\
+			ETH_SET_FULL_DUPLEX_MODE 		|	\
+			ETH_ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX
+
+#define RX_BUFFER_MAX_SIZE  0x4000000
+#define TX_BUFFER_MAX_SIZE  0x4000000
+
+/* MAC accepet/reject macros */
+#define ACCEPT_MAC_ADDR	    0
+#define REJECT_MAC_ADDR	    1
+
+/* Buffer offset from buffer pointer */
+#define RX_BUF_OFFSET				0x2
+
+/* Gigabit Ethernet Unit Global Registers */
+
+/* MIB Counters register definitions */
+#define ETH_MIB_GOOD_OCTETS_RECEIVED_LOW   0x0
+#define ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH  0x4
+#define ETH_MIB_BAD_OCTETS_RECEIVED        0x8
+#define ETH_MIB_INTERNAL_MAC_TRANSMIT_ERR  0xc
+#define ETH_MIB_GOOD_FRAMES_RECEIVED       0x10
+#define ETH_MIB_BAD_FRAMES_RECEIVED        0x14
+#define ETH_MIB_BROADCAST_FRAMES_RECEIVED  0x18
+#define ETH_MIB_MULTICAST_FRAMES_RECEIVED  0x1c
+#define ETH_MIB_FRAMES_64_OCTETS           0x20
+#define ETH_MIB_FRAMES_65_TO_127_OCTETS    0x24
+#define ETH_MIB_FRAMES_128_TO_255_OCTETS   0x28
+#define ETH_MIB_FRAMES_256_TO_511_OCTETS   0x2c
+#define ETH_MIB_FRAMES_512_TO_1023_OCTETS  0x30
+#define ETH_MIB_FRAMES_1024_TO_MAX_OCTETS  0x34
+#define ETH_MIB_GOOD_OCTETS_SENT_LOW       0x38
+#define ETH_MIB_GOOD_OCTETS_SENT_HIGH      0x3c
+#define ETH_MIB_GOOD_FRAMES_SENT           0x40
+#define ETH_MIB_EXCESSIVE_COLLISION        0x44
+#define ETH_MIB_MULTICAST_FRAMES_SENT      0x48
+#define ETH_MIB_BROADCAST_FRAMES_SENT      0x4c
+#define ETH_MIB_UNREC_MAC_CONTROL_RECEIVED 0x50
+#define ETH_MIB_FC_SENT                    0x54
+#define ETH_MIB_GOOD_FC_RECEIVED           0x58
+#define ETH_MIB_BAD_FC_RECEIVED            0x5c
+#define ETH_MIB_UNDERSIZE_RECEIVED         0x60
+#define ETH_MIB_FRAGMENTS_RECEIVED         0x64
+#define ETH_MIB_OVERSIZE_RECEIVED          0x68
+#define ETH_MIB_JABBER_RECEIVED            0x6c
+#define ETH_MIB_MAC_RECEIVE_ERROR          0x70
+#define ETH_MIB_BAD_CRC_EVENT              0x74
+#define ETH_MIB_COLLISION                  0x78
+#define ETH_MIB_LATE_COLLISION             0x7c
+
+/* Port serial status reg (PSR) */
+#define ETH_INTERFACE_GMII_MII                          0
+#define ETH_INTERFACE_PCM                               BIT0
+#define ETH_LINK_IS_DOWN                                0
+#define ETH_LINK_IS_UP                                  BIT1
+#define ETH_PORT_AT_HALF_DUPLEX                         0
+#define ETH_PORT_AT_FULL_DUPLEX                         BIT2
+#define ETH_RX_FLOW_CTRL_DISABLED                       0
+#define ETH_RX_FLOW_CTRL_ENBALED                        BIT3
+#define ETH_GMII_SPEED_100_10                           0
+#define ETH_GMII_SPEED_1000                             BIT4
+#define ETH_MII_SPEED_10                                0
+#define ETH_MII_SPEED_100                               BIT5
+#define ETH_NO_TX                                       0
+#define ETH_TX_IN_PROGRESS                              BIT7
+#define ETH_BYPASS_NO_ACTIVE                            0
+#define ETH_BYPASS_ACTIVE                               BIT8
+#define ETH_PORT_NOT_AT_PARTITION_STATE                 0
+#define ETH_PORT_AT_PARTITION_STATE                     BIT9
+#define ETH_PORT_TX_FIFO_NOT_EMPTY                      0
+#define ETH_PORT_TX_FIFO_EMPTY                          BIT10
+
+
+/* These macros describes the Port configuration reg (Px_cR) bits */
+#define ETH_UNICAST_NORMAL_MODE                         0
+#define ETH_UNICAST_PROMISCUOUS_MODE                    BIT0
+#define ETH_DEFAULT_RX_QUEUE_0                          0
+#define ETH_DEFAULT_RX_QUEUE_1                          BIT1
+#define ETH_DEFAULT_RX_QUEUE_2                          BIT2
+#define ETH_DEFAULT_RX_QUEUE_3                          (BIT2 | BIT1)
+#define ETH_DEFAULT_RX_QUEUE_4                          BIT3
+#define ETH_DEFAULT_RX_QUEUE_5                          (BIT3 | BIT1)
+#define ETH_DEFAULT_RX_QUEUE_6                          (BIT3 | BIT2)
+#define ETH_DEFAULT_RX_QUEUE_7                          (BIT3 | BIT2 | BIT1)
+#define ETH_DEFAULT_RX_ARP_QUEUE_0                      0
+#define ETH_DEFAULT_RX_ARP_QUEUE_1                      BIT4
+#define ETH_DEFAULT_RX_ARP_QUEUE_2                      BIT5
+#define ETH_DEFAULT_RX_ARP_QUEUE_3                      (BIT5 | BIT4)
+#define ETH_DEFAULT_RX_ARP_QUEUE_4                      BIT6
+#define ETH_DEFAULT_RX_ARP_QUEUE_5                      (BIT6 | BIT4)
+#define ETH_DEFAULT_RX_ARP_QUEUE_6                      (BIT6 | BIT5)
+#define ETH_DEFAULT_RX_ARP_QUEUE_7                      (BIT6 | BIT5 | BIT4)
+#define ETH_RECEIVE_BC_IF_NOT_IP_OR_ARP                 0
+#define ETH_REJECT_BC_IF_NOT_IP_OR_ARP                  BIT7
+#define ETH_RECEIVE_BC_IF_IP                            0
+#define ETH_REJECT_BC_IF_IP                             BIT8
+#define ETH_RECEIVE_BC_IF_ARP                           0
+#define ETH_REJECT_BC_IF_ARP                            BIT9
+#define ETH_TX_AM_NO_UPDATE_ERROR_SUMMARY               BIT12
+#define ETH_CAPTURE_TCP_FRAMES_DIS                      0
+#define ETH_CAPTURE_TCP_FRAMES_EN                       BIT14
+#define ETH_CAPTURE_UDP_FRAMES_DIS                      0
+#define ETH_CAPTURE_UDP_FRAMES_EN                       BIT15
+#define ETH_DEFAULT_RX_TCP_QUEUE_0                      0
+#define ETH_DEFAULT_RX_TCP_QUEUE_1                      BIT16
+#define ETH_DEFAULT_RX_TCP_QUEUE_2                      BIT17
+#define ETH_DEFAULT_RX_TCP_QUEUE_3                      (BIT17 | BIT16)
+#define ETH_DEFAULT_RX_TCP_QUEUE_4                      BIT18
+#define ETH_DEFAULT_RX_TCP_QUEUE_5                      (BIT18 | BIT16)
+#define ETH_DEFAULT_RX_TCP_QUEUE_6                      (BIT18 | BIT17)
+#define ETH_DEFAULT_RX_TCP_QUEUE_7                      (BIT18 | BIT17 | BIT16)
+#define ETH_DEFAULT_RX_UDP_QUEUE_0                      0
+#define ETH_DEFAULT_RX_UDP_QUEUE_1                      BIT19
+#define ETH_DEFAULT_RX_UDP_QUEUE_2                      BIT20
+#define ETH_DEFAULT_RX_UDP_QUEUE_3                      (BIT20 | BIT19)
+#define ETH_DEFAULT_RX_UDP_QUEUE_4                      (BIT21
+#define ETH_DEFAULT_RX_UDP_QUEUE_5                      (BIT21 | BIT19)
+#define ETH_DEFAULT_RX_UDP_QUEUE_6                      (BIT21 | BIT20)
+#define ETH_DEFAULT_RX_UDP_QUEUE_7                      (BIT21 | BIT20 | BIT19)
+#define ETH_DEFAULT_RX_BPDU_QUEUE_0                      0
+#define ETH_DEFAULT_RX_BPDU_QUEUE_1                     BIT22
+#define ETH_DEFAULT_RX_BPDU_QUEUE_2                     BIT23
+#define ETH_DEFAULT_RX_BPDU_QUEUE_3                     (BIT23 | BIT22)
+#define ETH_DEFAULT_RX_BPDU_QUEUE_4                     BIT24
+#define ETH_DEFAULT_RX_BPDU_QUEUE_5                     (BIT24 | BIT22)
+#define ETH_DEFAULT_RX_BPDU_QUEUE_6                     (BIT24 | BIT23)
+#define ETH_DEFAULT_RX_BPDU_QUEUE_7                     (BIT24 | BIT23 | BIT22)
+
+
+/* These macros describes the Port configuration extend reg (Px_cXR) bits*/
+#define ETH_CLASSIFY_EN                                 BIT0
+#define ETH_SPAN_BPDU_PACKETS_AS_NORMAL                 0
+#define ETH_SPAN_BPDU_PACKETS_TO_RX_QUEUE_7             BIT1
+#define ETH_PARTITION_DISABLE                           0
+#define ETH_PARTITION_ENABLE                            BIT2
+
+
+/* Tx/Rx queue command reg (RQCR/TQCR)*/
+#define ETH_QUEUE_0_ENABLE                              BIT0
+#define ETH_QUEUE_1_ENABLE                              BIT1
+#define ETH_QUEUE_2_ENABLE                              BIT2
+#define ETH_QUEUE_3_ENABLE                              BIT3
+#define ETH_QUEUE_4_ENABLE                              BIT4
+#define ETH_QUEUE_5_ENABLE                              BIT5
+#define ETH_QUEUE_6_ENABLE                              BIT6
+#define ETH_QUEUE_7_ENABLE                              BIT7
+#define ETH_QUEUE_0_DISABLE                             BIT8
+#define ETH_QUEUE_1_DISABLE                             BIT9
+#define ETH_QUEUE_2_DISABLE                             BIT10
+#define ETH_QUEUE_3_DISABLE                             BIT11
+#define ETH_QUEUE_4_DISABLE                             BIT12
+#define ETH_QUEUE_5_DISABLE                             BIT13
+#define ETH_QUEUE_6_DISABLE                             BIT14
+#define ETH_QUEUE_7_DISABLE                             BIT15
+
+
+/* These macros describes the Port Sdma configuration reg (SDCR) bits */
+#define ETH_RIFB                                        BIT0
+#define ETH_RX_BURST_SIZE_1_64BIT                       0
+#define ETH_RX_BURST_SIZE_2_64BIT                       BIT1
+#define ETH_RX_BURST_SIZE_4_64BIT                       BIT2
+#define ETH_RX_BURST_SIZE_8_64BIT                       (BIT2 | BIT1)
+#define ETH_RX_BURST_SIZE_16_64BIT                      BIT3
+#define ETH_BLM_RX_NO_SWAP                              BIT4
+#define ETH_BLM_RX_BYTE_SWAP                            0
+#define ETH_BLM_TX_NO_SWAP                              BIT5
+#define ETH_BLM_TX_BYTE_SWAP                            0
+#define ETH_DESCRIPTORS_BYTE_SWAP                       BIT6
+#define ETH_DESCRIPTORS_NO_SWAP                         0
+#define ETH_TX_BURST_SIZE_1_64BIT                       0
+#define ETH_TX_BURST_SIZE_2_64BIT                       BIT22
+#define ETH_TX_BURST_SIZE_4_64BIT                       BIT23
+#define ETH_TX_BURST_SIZE_8_64BIT                       (BIT23 | BIT22)
+#define ETH_TX_BURST_SIZE_16_64BIT                      BIT24
+
+
+
+/* These macros describes the Port serial control reg (PSCR) bits */
+#define ETH_SERIAL_PORT_DISABLE                         0
+#define ETH_SERIAL_PORT_ENABLE                          BIT0
+#define ETH_FORCE_LINK_PASS                             BIT1
+#define ETH_DO_NOT_FORCE_LINK_PASS                      0
+#define ETH_ENABLE_AUTO_NEG_FOR_DUPLX                   0
+#define ETH_DISABLE_AUTO_NEG_FOR_DUPLX                  BIT2
+#define ETH_ENABLE_AUTO_NEG_FOR_FLOW_CTRL               0
+#define ETH_DISABLE_AUTO_NEG_FOR_FLOW_CTRL              BIT3
+#define ETH_ADV_NO_FLOW_CTRL                            0
+#define ETH_ADV_SYMMETRIC_FLOW_CTRL                     BIT4
+#define ETH_FORCE_FC_MODE_NO_PAUSE_DIS_TX               0
+#define ETH_FORCE_FC_MODE_TX_PAUSE_DIS                  BIT5
+#define ETH_FORCE_BP_MODE_NO_JAM                        0
+#define ETH_FORCE_BP_MODE_JAM_TX                        BIT7
+#define ETH_FORCE_BP_MODE_JAM_TX_ON_RX_ERR              BIT8
+#define ETH_FORCE_LINK_FAIL                             0
+#define ETH_DO_NOT_FORCE_LINK_FAIL                      BIT10
+#define ETH_RETRANSMIT_16_ATTEMPTS                      0
+#define ETH_RETRANSMIT_FOREVER                          BIT11
+#define ETH_DISABLE_AUTO_NEG_SPEED_GMII                 BIT13
+#define ETH_ENABLE_AUTO_NEG_SPEED_GMII                  0
+#define ETH_DTE_ADV_0                                   0
+#define ETH_DTE_ADV_1                                   BIT14
+#define ETH_DISABLE_AUTO_NEG_BYPASS                     0
+#define ETH_ENABLE_AUTO_NEG_BYPASS                      BIT15
+#define ETH_AUTO_NEG_NO_CHANGE                          0
+#define ETH_RESTART_AUTO_NEG                            BIT16
+#define ETH_MAX_RX_PACKET_1518BYTE                      0
+#define ETH_MAX_RX_PACKET_1522BYTE                      BIT17
+#define ETH_MAX_RX_PACKET_1552BYTE                      BIT18
+#define ETH_MAX_RX_PACKET_9022BYTE                      (BIT18 | BIT17)
+#define ETH_MAX_RX_PACKET_9192BYTE                      BIT19
+#define ETH_MAX_RX_PACKET_9700BYTE                      (BIT19 | BIT17)
+#define ETH_SET_EXT_LOOPBACK                            BIT20
+#define ETH_CLR_EXT_LOOPBACK                            0
+#define ETH_SET_FULL_DUPLEX_MODE                        BIT21
+#define ETH_SET_HALF_DUPLEX_MODE                        0
+#define ETH_ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX       BIT22
+#define ETH_DISABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX      0
+#define ETH_SET_GMII_SPEED_TO_10_100                    0
+#define ETH_SET_GMII_SPEED_TO_1000                      BIT23
+#define ETH_SET_MII_SPEED_TO_10                         0
+#define ETH_SET_MII_SPEED_TO_100                        BIT24
+
+
+/* SMI reg */
+#define ETH_SMI_BUSY        	BIT28	/* 0 - Write, 1 - Read          */
+#define ETH_SMI_READ_VALID  	BIT27	/* 0 - Write, 1 - Read          */
+#define ETH_SMI_OPCODE_WRITE	0	/* Completion of Read operation */
+#define ETH_SMI_OPCODE_READ 	BIT26	/* Operation is in progress             */
+
+/* SDMA command status fields macros */
+
+/* Tx & Rx descriptors status */
+#define ETH_ERROR_SUMMARY                   (BIT0)
+
+/* Tx & Rx descriptors command */
+#define ETH_BUFFER_OWNED_BY_DMA             (BIT31)
+
+/* Tx descriptors status */
+#define ETH_LC_ERROR                        (0	  )
+#define ETH_UR_ERROR                        (BIT1 )
+#define ETH_RL_ERROR                        (BIT2 )
+#define ETH_LLC_SNAP_FORMAT                 (BIT9 )
+
+/* Rx descriptors status */
+#define ETH_CRC_ERROR                       (0	  )
+#define ETH_OVERRUN_ERROR                   (BIT1 )
+#define ETH_MAX_FRAME_LENGTH_ERROR          (BIT2 )
+#define ETH_RESOURCE_ERROR                  ((BIT2 | BIT1))
+#define ETH_VLAN_TAGGED                     (BIT19)
+#define ETH_BPDU_FRAME                      (BIT20)
+#define ETH_TCP_FRAME_OVER_IP_V_4           (0    )
+#define ETH_UDP_FRAME_OVER_IP_V_4           (BIT21)
+#define ETH_OTHER_FRAME_TYPE                (BIT22)
+#define ETH_LAYER_2_IS_ETH_V_2              (BIT23)
+#define ETH_FRAME_TYPE_IP_V_4               (BIT24)
+#define ETH_FRAME_HEADER_OK                 (BIT25)
+#define ETH_RX_LAST_DESC                    (BIT26)
+#define ETH_RX_FIRST_DESC                   (BIT27)
+#define ETH_UNKNOWN_DESTINATION_ADDR        (BIT28)
+#define ETH_RX_ENABLE_INTERRUPT             (BIT29)
+#define ETH_LAYER_4_CHECKSUM_OK             (BIT30)
+
+/* Rx descriptors byte count */
+#define ETH_FRAME_FRAGMENTED                (BIT2)
+
+/* Tx descriptors command */
+#define ETH_LAYER_4_CHECKSUM_FIRST_DESC		(BIT10)
+#define ETH_FRAME_SET_TO_VLAN               (BIT15)
+#define ETH_TCP_FRAME                       (0	  )
+#define ETH_UDP_FRAME                       (BIT16)
+#define ETH_GEN_TCP_UDP_CHECKSUM            (BIT17)
+#define ETH_GEN_IP_V_4_CHECKSUM             (BIT18)
+#define ETH_ZERO_PADDING                    (BIT19)
+#define ETH_TX_LAST_DESC                    (BIT20)
+#define ETH_TX_FIRST_DESC                   (BIT21)
+#define ETH_GEN_CRC                         (BIT22)
+#define ETH_TX_ENABLE_INTERRUPT             (BIT23)
+#define ETH_AUTO_MODE                       (BIT30)
+
+/* typedefs */
+
+typedef enum _eth_func_ret_status {
+	ETH_OK,			/* Returned as expected.                    */
+	ETH_ERROR,		/* Fundamental error.                       */
+	ETH_RETRY,		/* Could not process request. Try later.    */
+	ETH_END_OF_JOB,		/* Ring has nothing to process.             */
+	ETH_QUEUE_FULL,		/* Ring resource error.                     */
+	ETH_QUEUE_LAST_RESOURCE	/* Ring resources about to exhaust.         */
+} ETH_FUNC_RET_STATUS;
+
+typedef enum _eth_target {
+	ETH_TARGET_DRAM,
+	ETH_TARGET_DEVICE,
+	ETH_TARGET_CBS,
+	ETH_TARGET_PCI0,
+	ETH_TARGET_PCI1
+} ETH_TARGET;
+
+/* These are for big-endian machines.  Little endian needs different
+ * definitions.
+ */
+#if defined(__BIG_ENDIAN)
+struct eth_rx_desc {
+	u16	byte_cnt;	/* Descriptor buffer byte count     */
+	u16	buf_size;	/* Buffer size                      */
+	u32	cmd_sts;	/* Descriptor command status        */
+	u32	next_desc_ptr;	/* Next descriptor pointer          */
+	u32	buf_ptr;	/* Descriptor buffer pointer        */
+};
+
+struct eth_tx_desc {
+	u16	byte_cnt;	/* buffer byte count */
+	u16	l4i_chk;	/* CPU provided TCP checksum */
+	u32	cmd_sts;	/* Command/status field */
+	u32	next_desc_ptr;	/* Pointer to next descriptor */
+	u32	buf_ptr;	/* pointer to buffer for this descriptor */
+};
+
+#elif defined(__LITTLE_ENDIAN)
+struct eth_rx_desc {
+	u32	cmd_sts;	/* Descriptor command status        */
+	u16	buf_size;	/* Buffer size                      */
+	u16	byte_cnt;	/* Descriptor buffer byte count     */
+	u32	buf_ptr;	/* Descriptor buffer pointer        */
+	u32	next_desc_ptr;	/* Next descriptor pointer          */
+};
+
+struct eth_tx_desc {
+	u32	cmd_sts;	/* Command/status field */
+	u16	l4i_chk;	/* CPU provided TCP checksum */
+	u16	byte_cnt;	/* buffer byte count */
+	u32	buf_ptr;	/* pointer to buffer for this descriptor */
+	u32	next_desc_ptr;	/* Pointer to next descriptor */
+};
+#else
+#error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
+#endif
+
+/* Unified struct for Rx and Tx operations. The user is not required to */
+/* be familier with neither Tx nor Rx descriptors.                       */
+struct pkt_info {
+	unsigned short	byte_cnt;	/* Descriptor buffer byte count     */
+	unsigned short	l4i_chk;	/* Tx CPU provided TCP Checksum     */
+	unsigned int	cmd_sts;	/* Descriptor command status        */
+	dma_addr_t	buf_ptr;	/* Descriptor buffer pointer        */
+	struct sk_buff	* return_info;	/* User resource return information */
+};
+
+
+/* Ethernet port specific infomation */
+
+struct mv64340_private {
+	int	port_num;		/* User Ethernet port number */
+	u8	port_mac_addr[6];	/* User defined port MAC address. */
+	u32	port_config;		/* User port configuration value */
+	u32	port_config_extend;	/* User port config extend value */
+	u32	port_sdma_config;	/* User port SDMA config value */
+	u32	port_serial_control;	/* User port serial control value */
+	u32	port_tx_queue_command;	/* Port active Tx queues summary */
+	u32	port_rx_queue_command;	/* Port active Rx queues summary */
+
+	int	rx_resource_err;	/* Rx ring resource error flag */
+	int	tx_resource_err;	/* Tx ring resource error flag */
+
+	/* Tx/Rx rings managment indexes fields. For driver use */
+
+	/* Next available and first returning Rx resource */
+	int rx_curr_desc_q, rx_used_desc_q;
+
+	/* Next available and first returning Tx resource */
+	int tx_curr_desc_q, tx_used_desc_q;
+#ifdef MV64340_CHECKSUM_OFFLOAD_TX
+        int tx_first_desc_q;
+#endif
+
+#ifdef MV64340_TX_FAST_REFILL
+	u32	tx_clean_threshold;
+#endif
+
+	volatile struct eth_rx_desc	* p_rx_desc_area;
+	dma_addr_t			rx_desc_dma;
+	unsigned int			rx_desc_area_size;
+	struct sk_buff			* rx_skb[MV64340_RX_QUEUE_SIZE];
+
+	volatile struct eth_tx_desc	* p_tx_desc_area;
+	dma_addr_t			tx_desc_dma;
+	unsigned int			tx_desc_area_size;
+	struct sk_buff			* tx_skb[MV64340_TX_QUEUE_SIZE];
+
+	struct work_struct		tx_timeout_task;
+
+	/*
+	 * Former struct mv64340_eth_priv members start here
+	 */
+	struct net_device_stats stats;
+	spinlock_t lock;
+	/* Size of Tx Ring per queue */
+	unsigned int tx_ring_size;
+	/* Ammont of SKBs outstanding on Tx queue */
+	unsigned int tx_ring_skbs;
+	/* Size of Rx Ring per queue */
+	unsigned int rx_ring_size;
+	/* Ammount of SKBs allocated to Rx Ring per queue */
+	unsigned int rx_ring_skbs;
+
+	/*
+	 * rx_task used to fill RX ring out of bottom half context 
+	 */
+	struct work_struct rx_task;
+
+	/* 
+	 * Used in case RX Ring is empty, which can be caused when 
+	 * system does not have resources (skb's) 
+	 */
+	struct timer_list timeout;
+	long rx_task_busy __attribute__ ((aligned(SMP_CACHE_BYTES)));
+	unsigned rx_timer_flag;
+
+	u32 rx_int_coal;
+	u32 tx_int_coal;
+};
+
+/* ethernet.h API list */
+
+/* Port operation control routines */
+static void eth_port_init(struct mv64340_private *mp);
+static void eth_port_reset(unsigned int eth_port_num);
+static int eth_port_start(struct mv64340_private *mp);
+
+static void ethernet_set_config_reg(unsigned int eth_port_num,
+				    unsigned int value);
+static unsigned int ethernet_get_config_reg(unsigned int eth_port_num);
+
+/* Port MAC address routines */
+static void eth_port_uc_addr_set(unsigned int eth_port_num,
+				 unsigned char *p_addr);
+
+/* PHY and MIB routines */
+static int ethernet_phy_reset(unsigned int eth_port_num);
+
+static int eth_port_write_smi_reg(unsigned int eth_port_num,
+				   unsigned int phy_reg,
+				   unsigned int value);
+
+static int eth_port_read_smi_reg(unsigned int eth_port_num,
+				  unsigned int phy_reg,
+				  unsigned int *value);
+
+static void eth_clear_mib_counters(unsigned int eth_port_num);
+
+/* Port data flow control routines */
+static ETH_FUNC_RET_STATUS eth_port_send(struct mv64340_private *mp,
+					 struct pkt_info * p_pkt_info);
+static ETH_FUNC_RET_STATUS eth_tx_return_desc(struct mv64340_private *mp,
+					      struct pkt_info * p_pkt_info);
+static ETH_FUNC_RET_STATUS eth_port_receive(struct mv64340_private *mp,
+					    struct pkt_info * p_pkt_info);
+static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv64340_private *mp,
+					      struct pkt_info * p_pkt_info);
+
+#endif  /* __MV64340_ETH_H__ */
--- diff/drivers/net/via-velocity.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/net/via-velocity.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,3366 @@
+/*
+ * This code is derived from the VIA reference driver (copyright message
+ * below) provided to Red Hat by VIA Networking Technologies, Inc. for
+ * addition to the Linux kernel.
+ *
+ * The code has been merged into one source file, cleaned up to follow
+ * Linux coding style,  ported to the Linux 2.6 kernel tree and cleaned
+ * for 64bit hardware platforms.
+ *
+ * TODO
+ *	Big-endian support
+ *	rx_copybreak/alignment
+ *	Scatter gather
+ *	More testing
+ *
+ * The changes are (c) Copyright 2004, Red Hat Inc. <alan@redhat.com>
+ * Additional fixes and clean up: Francois Romieu
+ *
+ * This source has not been verified for use in safety critical systems.
+ *
+ * Please direct queries about the revamped driver to the linux-kernel
+ * list not VIA.
+ *
+ * Original code:
+ *
+ * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
+ * All rights reserved.
+ *
+ * This software may be redistributed and/or modified under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * Author: Chuang Liang-Shing, AJ Jiang
+ *
+ * Date: Jan 24, 2003
+ *
+ * MODULE_LICENSE("GPL");
+ *
+ */
+
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/mm.h>
+#include <linux/errno.h>
+#include <linux/ioport.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+#include <linux/delay.h>
+#include <linux/timer.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h>
+#include <linux/version.h>
+#include <linux/string.h>
+#include <linux/wait.h>
+#include <asm/io.h>
+#include <linux/if.h>
+#include <linux/config.h>
+#include <asm/uaccess.h>
+#include <linux/proc_fs.h>
+#include <linux/inetdevice.h>
+#include <linux/reboot.h>
+#include <linux/ethtool.h>
+#include <linux/mii.h>
+#include <linux/in.h>
+#include <linux/if_arp.h>
+#include <linux/ip.h>
+#include <linux/tcp.h>
+#include <linux/udp.h>
+
+#include "via-velocity.h"
+
+
+static int velocity_nics = 0;
+static int msglevel = MSG_LEVEL_INFO;
+
+
+static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
+static struct ethtool_ops velocity_ethtool_ops;
+
+/*
+    Define module options
+*/
+
+MODULE_AUTHOR("VIA Networking Technologies, Inc.");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("VIA Networking Velocity Family Gigabit Ethernet Adapter Driver");
+
+#define VELOCITY_PARAM(N,D) \
+        static const int N[MAX_UNITS]=OPTION_DEFAULT;\
+        MODULE_PARM(N, "1-" __MODULE_STRING(MAX_UNITS) "i");\
+        MODULE_PARM_DESC(N, D);
+
+#define RX_DESC_MIN     64
+#define RX_DESC_MAX     255
+#define RX_DESC_DEF     64
+VELOCITY_PARAM(RxDescriptors, "Number of receive descriptors");
+
+#define TX_DESC_MIN     16
+#define TX_DESC_MAX     256
+#define TX_DESC_DEF     64
+VELOCITY_PARAM(TxDescriptors, "Number of transmit descriptors");
+
+#define VLAN_ID_MIN     0
+#define VLAN_ID_MAX     4095
+#define VLAN_ID_DEF     0
+/* VID_setting[] is used for setting the VID of NIC.
+   0: default VID.
+   1-4094: other VIDs.
+*/
+VELOCITY_PARAM(VID_setting, "802.1Q VLAN ID");
+
+#define RX_THRESH_MIN   0
+#define RX_THRESH_MAX   3
+#define RX_THRESH_DEF   0
+/* rx_thresh[] is used for controlling the receive fifo threshold.
+   0: indicate the rxfifo threshold is 128 bytes.
+   1: indicate the rxfifo threshold is 512 bytes.
+   2: indicate the rxfifo threshold is 1024 bytes.
+   3: indicate the rxfifo threshold is store & forward.
+*/
+VELOCITY_PARAM(rx_thresh, "Receive fifo threshold");
+
+#define DMA_LENGTH_MIN  0
+#define DMA_LENGTH_MAX  7
+#define DMA_LENGTH_DEF  0
+
+/* DMA_length[] is used for controlling the DMA length
+   0: 8 DWORDs
+   1: 16 DWORDs
+   2: 32 DWORDs
+   3: 64 DWORDs
+   4: 128 DWORDs
+   5: 256 DWORDs
+   6: SF(flush till emply)
+   7: SF(flush till emply)
+*/
+VELOCITY_PARAM(DMA_length, "DMA length");
+
+#define TAGGING_DEF     0
+/* enable_tagging[] is used for enabling 802.1Q VID tagging.
+   0: disable VID seeting(default).
+   1: enable VID setting.
+*/
+VELOCITY_PARAM(enable_tagging, "Enable 802.1Q tagging");
+
+#define IP_ALIG_DEF     0
+/* IP_byte_align[] is used for IP header DWORD byte aligned
+   0: indicate the IP header won't be DWORD byte aligned.(Default) .
+   1: indicate the IP header will be DWORD byte aligned.
+      In some enviroment, the IP header should be DWORD byte aligned,
+      or the packet will be droped when we receive it. (eg: IPVS)
+*/
+VELOCITY_PARAM(IP_byte_align, "Enable IP header dword aligned");
+
+#define TX_CSUM_DEF     1
+/* txcsum_offload[] is used for setting the checksum offload ability of NIC.
+   (We only support RX checksum offload now)
+   0: disable csum_offload[checksum offload
+   1: enable checksum offload. (Default)
+*/
+VELOCITY_PARAM(txcsum_offload, "Enable transmit packet checksum offload");
+
+#define FLOW_CNTL_DEF   1
+#define FLOW_CNTL_MIN   1
+#define FLOW_CNTL_MAX   5
+
+/* flow_control[] is used for setting the flow control ability of NIC.
+   1: hardware deafult - AUTO (default). Use Hardware default value in ANAR.
+   2: enable TX flow control.
+   3: enable RX flow control.
+   4: enable RX/TX flow control.
+   5: disable
+*/
+VELOCITY_PARAM(flow_control, "Enable flow control ability");
+
+#define MED_LNK_DEF 0
+#define MED_LNK_MIN 0
+#define MED_LNK_MAX 4
+/* speed_duplex[] is used for setting the speed and duplex mode of NIC.
+   0: indicate autonegotiation for both speed and duplex mode
+   1: indicate 100Mbps half duplex mode
+   2: indicate 100Mbps full duplex mode
+   3: indicate 10Mbps half duplex mode
+   4: indicate 10Mbps full duplex mode
+
+   Note:
+        if EEPROM have been set to the force mode, this option is ignored
+            by driver.
+*/
+VELOCITY_PARAM(speed_duplex, "Setting the speed and duplex mode");
+
+#define VAL_PKT_LEN_DEF     0
+/* ValPktLen[] is used for setting the checksum offload ability of NIC.
+   0: Receive frame with invalid layer 2 length (Default)
+   1: Drop frame with invalid layer 2 length
+*/
+VELOCITY_PARAM(ValPktLen, "Receiving or Drop invalid 802.3 frame");
+
+#define WOL_OPT_DEF     0
+#define WOL_OPT_MIN     0
+#define WOL_OPT_MAX     7
+/* wol_opts[] is used for controlling wake on lan behavior.
+   0: Wake up if recevied a magic packet. (Default)
+   1: Wake up if link status is on/off.
+   2: Wake up if recevied an arp packet.
+   4: Wake up if recevied any unicast packet.
+   Those value can be sumed up to support more than one option.
+*/
+VELOCITY_PARAM(wol_opts, "Wake On Lan options");
+
+#define INT_WORKS_DEF   20
+#define INT_WORKS_MIN   10
+#define INT_WORKS_MAX   64
+
+VELOCITY_PARAM(int_works, "Number of packets per interrupt services");
+
+static int rx_copybreak = 200;
+MODULE_PARM(rx_copybreak, "i");
+MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames");
+
+static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, struct velocity_info_tbl *info);
+static int velocity_get_pci_info(struct velocity_info *, struct pci_dev *pdev);
+static void velocity_print_info(struct velocity_info *vptr);
+static int velocity_open(struct net_device *dev);
+static int velocity_change_mtu(struct net_device *dev, int mtu);
+static int velocity_xmit(struct sk_buff *skb, struct net_device *dev);
+static int velocity_intr(int irq, void *dev_instance, struct pt_regs *regs);
+static void velocity_set_multi(struct net_device *dev);
+static struct net_device_stats *velocity_get_stats(struct net_device *dev);
+static int velocity_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
+static int velocity_close(struct net_device *dev);
+static int velocity_receive_frame(struct velocity_info *, int idx);
+static int velocity_alloc_rx_buf(struct velocity_info *, int idx);
+static void velocity_free_rd_ring(struct velocity_info *vptr);
+static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_info *);
+static int velocity_soft_reset(struct velocity_info *vptr);
+static void mii_init(struct velocity_info *vptr, u32 mii_status);
+static u32 velocity_get_opt_media_mode(struct velocity_info *vptr);
+static void velocity_print_link_status(struct velocity_info *vptr);
+static void safe_disable_mii_autopoll(struct mac_regs * regs);
+static void velocity_shutdown(struct velocity_info *vptr);
+static void enable_flow_control_ability(struct velocity_info *vptr);
+static void enable_mii_autopoll(struct mac_regs * regs);
+static int velocity_mii_read(struct mac_regs *, u8 byIdx, u16 * pdata);
+static int velocity_mii_write(struct mac_regs *, u8 byMiiAddr, u16 data);
+static u32 mii_check_media_mode(struct mac_regs * regs);
+static u32 check_connection_type(struct mac_regs * regs);
+static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status);
+
+#ifdef CONFIG_PM
+static int velocity_suspend(struct pci_dev *pdev, u32 state);
+static int velocity_resume(struct pci_dev *pdev);
+
+static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr);
+
+static struct notifier_block velocity_inetaddr_notifier = {
+      .notifier_call	= velocity_netdev_event,
+};
+static int velocity_notifier_registered;
+
+#endif				/* CONFIG_PM */
+
+/*
+ *	Internal board variants. At the moment we have only one
+ */
+
+static struct velocity_info_tbl chip_info_table[] = {
+	{CHIP_TYPE_VT6110, "VIA Networking Velocity Family Gigabit Ethernet Adapter", 256, 1, 0x00FFFFFFUL},
+	{0, NULL}
+};
+
+/*
+ *	Describe the PCI device identifiers that we support in this
+ *	device driver. Used for hotplug autoloading.
+ */
+
+static struct pci_device_id velocity_id_table[] __devinitdata = {
+	{PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_612X,
+	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) chip_info_table},
+	{0, }
+};
+
+MODULE_DEVICE_TABLE(pci, velocity_id_table);
+
+/**
+ *	get_chip_name	- 	identifier to name
+ *	@id: chip identifier
+ *
+ *	Given a chip identifier return a suitable description. Returns
+ *	a pointer a static string valid while the driver is loaded.
+ */
+
+static char __devinit *get_chip_name(enum chip_type chip_id)
+{
+	int i;
+	for (i = 0; chip_info_table[i].name != NULL; i++)
+		if (chip_info_table[i].chip_id == chip_id)
+			break;
+	return chip_info_table[i].name;
+}
+
+/**
+ *	velocity_remove1	-	device unplug
+ *	@pdev: PCI device being removed
+ *
+ *	Device unload callback. Called on an unplug or on module
+ *	unload for each active device that is present. Disconnects
+ *	the device from the network layer and frees all the resources
+ */
+
+static void __devexit velocity_remove1(struct pci_dev *pdev)
+{
+	struct net_device *dev = pci_get_drvdata(pdev);
+	struct velocity_info *vptr = dev->priv;
+
+	unregister_netdev(dev);
+	iounmap(vptr->mac_regs);
+	pci_release_regions(pdev);
+	pci_disable_device(pdev);
+	pci_set_drvdata(pdev, NULL);
+	free_netdev(dev);
+}
+
+/**
+ *	velocity_set_int_opt	-	parser for integer options
+ *	@opt: pointer to option value
+ *	@val: value the user requested (or -1 for default)
+ *	@min: lowest value allowed
+ *	@max: highest value allowed
+ *	@def: default value
+ *	@name: property name
+ *	@dev: device name
+ *
+ *	Set an integer property in the module options. This function does
+ *	all the verification and checking as well as reporting so that
+ *	we don't duplicate code for each option.
+ */
+
+static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, int def, char *name, char *devname)
+{
+	if (val == -1)
+		*opt = def;
+	else if (val < min || val > max) {
+		VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: the value of parameter %s is invalid, the valid range is (%d-%d)\n",
+					devname, name, min, max);
+		*opt = def;
+	} else {
+		VELOCITY_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: set value of parameter %s to %d\n",
+					devname, name, val);
+		*opt = val;
+	}
+}
+
+/**
+ *	velocity_set_bool_opt	-	parser for boolean options
+ *	@opt: pointer to option value
+ *	@val: value the user requested (or -1 for default)
+ *	@def: default value (yes/no)
+ *	@flag: numeric value to set for true.
+ *	@name: property name
+ *	@dev: device name
+ *
+ *	Set a boolean property in the module options. This function does
+ *	all the verification and checking as well as reporting so that
+ *	we don't duplicate code for each option.
+ */
+
+static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 flag, char *name, char *devname)
+{
+	(*opt) &= (~flag);
+	if (val == -1)
+		*opt |= (def ? flag : 0);
+	else if (val < 0 || val > 1) {
+		printk(KERN_NOTICE "%s: the value of parameter %s is invalid, the valid range is (0-1)\n", 
+			devname, name);
+		*opt |= (def ? flag : 0);
+	} else {
+		printk(KERN_INFO "%s: set parameter %s to %s\n", 
+			devname, name, val ? "TRUE" : "FALSE");
+		*opt |= (val ? flag : 0);
+	}
+}
+
+/**
+ *	velocity_get_options	-	set options on device
+ *	@opts: option structure for the device
+ *	@index: index of option to use in module options array
+ *	@devname: device name
+ *
+ *	Turn the module and command options into a single structure
+ *	for the current device
+ */
+
+static void __devinit velocity_get_options(struct velocity_opt *opts, int index, char *devname)
+{
+
+	velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname);
+	velocity_set_int_opt(&opts->DMA_length, DMA_length[index], DMA_LENGTH_MIN, DMA_LENGTH_MAX, DMA_LENGTH_DEF, "DMA_length", devname);
+	velocity_set_int_opt(&opts->numrx, RxDescriptors[index], RX_DESC_MIN, RX_DESC_MAX, RX_DESC_DEF, "RxDescriptors", devname);
+	velocity_set_int_opt(&opts->numtx, TxDescriptors[index], TX_DESC_MIN, TX_DESC_MAX, TX_DESC_DEF, "TxDescriptors", devname);
+	velocity_set_int_opt(&opts->vid, VID_setting[index], VLAN_ID_MIN, VLAN_ID_MAX, VLAN_ID_DEF, "VID_setting", devname);
+	velocity_set_bool_opt(&opts->flags, enable_tagging[index], TAGGING_DEF, VELOCITY_FLAGS_TAGGING, "enable_tagging", devname);
+	velocity_set_bool_opt(&opts->flags, txcsum_offload[index], TX_CSUM_DEF, VELOCITY_FLAGS_TX_CSUM, "txcsum_offload", devname);
+	velocity_set_int_opt(&opts->flow_cntl, flow_control[index], FLOW_CNTL_MIN, FLOW_CNTL_MAX, FLOW_CNTL_DEF, "flow_control", devname);
+	velocity_set_bool_opt(&opts->flags, IP_byte_align[index], IP_ALIG_DEF, VELOCITY_FLAGS_IP_ALIGN, "IP_byte_align", devname);
+	velocity_set_bool_opt(&opts->flags, ValPktLen[index], VAL_PKT_LEN_DEF, VELOCITY_FLAGS_VAL_PKT_LEN, "ValPktLen", devname);
+	velocity_set_int_opt((int *) &opts->spd_dpx, speed_duplex[index], MED_LNK_MIN, MED_LNK_MAX, MED_LNK_DEF, "Media link mode", devname);
+	velocity_set_int_opt((int *) &opts->wol_opts, wol_opts[index], WOL_OPT_MIN, WOL_OPT_MAX, WOL_OPT_DEF, "Wake On Lan options", devname);
+	velocity_set_int_opt((int *) &opts->int_works, int_works[index], INT_WORKS_MIN, INT_WORKS_MAX, INT_WORKS_DEF, "Interrupt service works", devname);
+	opts->numrx = (opts->numrx & ~3);
+}
+
+/**
+ *	velocity_init_cam_filter	-	initialise CAM
+ *	@vptr: velocity to program
+ *
+ *	Initialize the content addressable memory used for filters. Load
+ *	appropriately according to the presence of VLAN
+ */
+
+static void velocity_init_cam_filter(struct velocity_info *vptr)
+{
+	struct mac_regs * regs = vptr->mac_regs;
+
+	/* T urn on MCFG_PQEN, turn off MCFG_RTGOPT */
+	WORD_REG_BITS_SET(MCFG_PQEN, MCFG_RTGOPT, &regs->MCFG);
+	WORD_REG_BITS_ON(MCFG_VIDFR, &regs->MCFG);
+
+	/* Disable all CAMs */
+	memset(vptr->vCAMmask, 0, sizeof(u8) * 8);
+	memset(vptr->mCAMmask, 0, sizeof(u8) * 8);
+	mac_set_cam_mask(regs, vptr->vCAMmask, VELOCITY_VLAN_ID_CAM);
+	mac_set_cam_mask(regs, vptr->mCAMmask, VELOCITY_MULTICAST_CAM);
+
+	/* Enable first VCAM */
+	if (vptr->flags & VELOCITY_FLAGS_TAGGING) {
+		/* If Tagging option is enabled and VLAN ID is not zero, then
+		   turn on MCFG_RTGOPT also */
+		if (vptr->options.vid != 0)
+			WORD_REG_BITS_ON(MCFG_RTGOPT, &regs->MCFG);
+
+		mac_set_cam(regs, 0, (u8 *) & (vptr->options.vid), VELOCITY_VLAN_ID_CAM);
+		vptr->vCAMmask[0] |= 1;
+		mac_set_cam_mask(regs, vptr->vCAMmask, VELOCITY_VLAN_ID_CAM);
+	} else {
+		u16 temp = 0;
+		mac_set_cam(regs, 0, (u8 *) &temp, VELOCITY_VLAN_ID_CAM);
+		temp = 1;
+		mac_set_cam_mask(regs, (u8 *) &temp, VELOCITY_VLAN_ID_CAM);
+	}
+}
+
+static inline void velocity_give_rx_desc(struct rx_desc *rd)
+{
+	*(u32 *)&rd->rdesc0 = 0;
+	rd->rdesc0.owner = cpu_to_le32(OWNED_BY_NIC);
+}
+
+/**
+ *	velocity_rx_reset	-	handle a receive reset
+ *	@vptr: velocity we are resetting
+ *
+ *	Reset the ownership and status for the receive ring side.
+ *	Hand all the receive queue to the NIC.
+ */
+
+static void velocity_rx_reset(struct velocity_info *vptr)
+{
+
+	struct mac_regs * regs = vptr->mac_regs;
+	int i;
+
+	vptr->rd_dirty = vptr->rd_filled = vptr->rd_curr = 0;
+
+	/*
+	 *	Init state, all RD entries belong to the NIC
+	 */
+	for (i = 0; i < vptr->options.numrx; ++i)
+		velocity_give_rx_desc(vptr->rd_ring + i);
+
+	writew(vptr->options.numrx, &regs->RBRDU);
+	writel(vptr->rd_pool_dma, &regs->RDBaseLo);
+	writew(0, &regs->RDIdx);
+	writew(vptr->options.numrx - 1, &regs->RDCSize);
+}
+
+/**
+ *	velocity_init_registers	-	initialise MAC registers
+ *	@vptr: velocity to init
+ *	@type: type of initialisation (hot or cold)
+ *
+ *	Initialise the MAC on a reset or on first set up on the
+ *	hardware.
+ */
+
+static void velocity_init_registers(struct velocity_info *vptr, 
+				    enum velocity_init_type type)
+{
+	struct mac_regs * regs = vptr->mac_regs;
+	int i, mii_status;
+
+	mac_wol_reset(regs);
+
+	switch (type) {
+	case VELOCITY_INIT_RESET:
+	case VELOCITY_INIT_WOL:
+
+		netif_stop_queue(vptr->dev);
+
+		/*
+		 *	Reset RX to prevent RX pointer not on the 4X location
+		 */
+		velocity_rx_reset(vptr);
+		mac_rx_queue_run(regs);
+		mac_rx_queue_wake(regs);
+
+		mii_status = velocity_get_opt_media_mode(vptr);
+		if (velocity_set_media_mode(vptr, mii_status) != VELOCITY_LINK_CHANGE) {
+			velocity_print_link_status(vptr);
+			if (!(vptr->mii_status & VELOCITY_LINK_FAIL))
+				netif_wake_queue(vptr->dev);
+		}
+
+		enable_flow_control_ability(vptr);
+
+		mac_clear_isr(regs);
+		writel(CR0_STOP, &regs->CR0Clr);
+		writel((CR0_DPOLL | CR0_TXON | CR0_RXON | CR0_STRT), 
+							&regs->CR0Set);
+
+		break;
+
+	case VELOCITY_INIT_COLD:
+	default:
+		/*
+		 *	Do reset
+		 */
+		velocity_soft_reset(vptr);
+		mdelay(5);
+
+		mac_eeprom_reload(regs);
+		for (i = 0; i < 6; i++) {
+			writeb(vptr->dev->dev_addr[i], &(regs->PAR[i]));
+		}
+		/*
+		 *	clear Pre_ACPI bit.
+		 */
+		BYTE_REG_BITS_OFF(CFGA_PACPI, &(regs->CFGA));
+		mac_set_rx_thresh(regs, vptr->options.rx_thresh);
+		mac_set_dma_length(regs, vptr->options.DMA_length);
+
+		writeb(WOLCFG_SAM | WOLCFG_SAB, &regs->WOLCFGSet);
+		/*
+		 *	Bback off algorithm use original IEEE standard
+		 */
+		BYTE_REG_BITS_SET(CFGB_OFSET, (CFGB_CRANDOM | CFGB_CAP | CFGB_MBA | CFGB_BAKOPT), &regs->CFGB);
+
+		/*
+		 *	Set packet filter: Receive directed and broadcast address
+		 */
+		velocity_set_multi(vptr->dev);
+
+		/*
+		 *	Enable MII auto-polling
+		 */
+		enable_mii_autopoll(regs);
+
+		vptr->int_mask = INT_MASK_DEF;
+
+		writel(cpu_to_le32(vptr->rd_pool_dma), &regs->RDBaseLo);
+		writew(vptr->options.numrx - 1, &regs->RDCSize);
+		mac_rx_queue_run(regs);
+		mac_rx_queue_wake(regs);
+
+		writew(vptr->options.numtx - 1, &regs->TDCSize);
+
+		for (i = 0; i < vptr->num_txq; i++) {
+			writel(cpu_to_le32(vptr->td_pool_dma[i]), &(regs->TDBaseLo[i]));
+			mac_tx_queue_run(regs, i);
+		}
+
+		velocity_init_cam_filter(vptr);
+
+		init_flow_control_register(vptr);
+
+		writel(CR0_STOP, &regs->CR0Clr);
+		writel((CR0_DPOLL | CR0_TXON | CR0_RXON | CR0_STRT), &regs->CR0Set);
+
+		mii_status = velocity_get_opt_media_mode(vptr);
+		netif_stop_queue(vptr->dev);
+		mac_clear_isr(regs);
+
+		mii_init(vptr, mii_status);
+
+		if (velocity_set_media_mode(vptr, mii_status) != VELOCITY_LINK_CHANGE) {
+			velocity_print_link_status(vptr);
+			if (!(vptr->mii_status & VELOCITY_LINK_FAIL))
+				netif_wake_queue(vptr->dev);
+		}
+
+		enable_flow_control_ability(vptr);
+		mac_hw_mibs_init(regs);
+		mac_write_int_mask(vptr->int_mask, regs);
+		mac_clear_isr(regs);
+
+	}
+}
+
+/**
+ *	velocity_soft_reset	-	soft reset
+ *	@vptr: velocity to reset
+ *
+ *	Kick off a soft reset of the velocity adapter and then poll
+ *	until the reset sequence has completed before returning.
+ */
+
+static int velocity_soft_reset(struct velocity_info *vptr)
+{
+	struct mac_regs * regs = vptr->mac_regs;
+	int i = 0;
+
+	writel(CR0_SFRST, &regs->CR0Set);
+
+	for (i = 0; i < W_MAX_TIMEOUT; i++) {
+		udelay(5);
+		if (!DWORD_REG_BITS_IS_ON(CR0_SFRST, &regs->CR0Set))
+			break;
+	}
+
+	if (i == W_MAX_TIMEOUT) {
+		writel(CR0_FORSRST, &regs->CR0Set);
+		/* FIXME: PCI POSTING */
+		/* delay 2ms */
+		mdelay(2);
+	}
+	return 0;
+}
+
+/**
+ *	velocity_found1		-	set up discovered velocity card
+ *	@pdev: PCI device
+ *	@ent: PCI device table entry that matched
+ *
+ *	Configure a discovered adapter from scratch. Return a negative
+ *	errno error code on failure paths.
+ */
+
+static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_device_id *ent)
+{
+	static int first = 1;
+	struct net_device *dev;
+	int i;
+	struct velocity_info_tbl *info = (struct velocity_info_tbl *) ent->driver_data;
+	struct velocity_info *vptr;
+	struct mac_regs * regs;
+	int ret = -ENOMEM;
+
+	if (velocity_nics++ >= MAX_UNITS) {
+		printk(KERN_NOTICE VELOCITY_NAME ": already found %d NICs.\n", 
+				velocity_nics);
+		return -ENODEV;
+	}
+
+	dev = alloc_etherdev(sizeof(struct velocity_info));
+
+	if (dev == NULL) {
+		printk(KERN_ERR VELOCITY_NAME ": allocate net device failed.\n");
+		goto out;
+	}
+	
+	/* Chain it all together */
+	
+	SET_MODULE_OWNER(dev);
+	SET_NETDEV_DEV(dev, &pdev->dev);
+	vptr = dev->priv;
+
+
+	if (first) {
+		printk(KERN_INFO "%s Ver. %s\n", 
+			VELOCITY_FULL_DRV_NAM, VELOCITY_VERSION);
+		printk(KERN_INFO "Copyright (c) 2002, 2003 VIA Networking Technologies, Inc.\n");
+		printk(KERN_INFO "Copyright (c) 2004 Red Hat Inc.\n");
+		first = 0;
+	}
+
+	velocity_init_info(pdev, vptr, info);
+
+	vptr->dev = dev;
+
+	dev->priv = vptr;
+	dev->irq = pdev->irq;
+
+	ret = pci_enable_device(pdev);
+	if (ret < 0) 
+		goto err_free_dev;
+
+	ret = velocity_get_pci_info(vptr, pdev);
+	if (ret < 0) {
+		printk(KERN_ERR VELOCITY_NAME ": Failed to find PCI device.\n");
+		goto err_disable;
+	}
+
+	ret = pci_request_regions(pdev, VELOCITY_NAME);
+	if (ret < 0) {
+		printk(KERN_ERR VELOCITY_NAME ": Failed to find PCI device.\n");
+		goto err_disable;
+	}
+
+	regs = ioremap(vptr->memaddr, vptr->io_size);
+	if (regs == NULL) {
+		ret = -EIO;
+		goto err_release_res;
+	}
+
+	vptr->mac_regs = regs;
+
+	mac_wol_reset(regs);
+
+	dev->base_addr = vptr->ioaddr;
+
+	for (i = 0; i < 6; i++)
+		dev->dev_addr[i] = readb(&regs->PAR[i]);
+
+
+	velocity_get_options(&vptr->options, velocity_nics - 1, dev->name);
+
+	/* 
+	 *	Mask out the options cannot be set to the chip
+	 */
+	 
+	vptr->options.flags &= info->flags;
+
+	/*
+	 *	Enable the chip specified capbilities
+	 */
+	 
+	vptr->flags = vptr->options.flags | (info->flags & 0xFF000000UL);
+
+	vptr->wol_opts = vptr->options.wol_opts;
+	vptr->flags |= VELOCITY_FLAGS_WOL_ENABLED;
+
+	vptr->phy_id = MII_GET_PHY_ID(vptr->mac_regs);
+
+	dev->irq = pdev->irq;
+	dev->open = velocity_open;
+	dev->hard_start_xmit = velocity_xmit;
+	dev->stop = velocity_close;
+	dev->get_stats = velocity_get_stats;
+	dev->set_multicast_list = velocity_set_multi;
+	dev->do_ioctl = velocity_ioctl;
+	dev->ethtool_ops = &velocity_ethtool_ops;
+	dev->change_mtu = velocity_change_mtu;
+#ifdef  VELOCITY_ZERO_COPY_SUPPORT
+	dev->features |= NETIF_F_SG;
+#endif
+
+	if (vptr->flags & VELOCITY_FLAGS_TX_CSUM) {
+		dev->features |= NETIF_F_HW_CSUM;
+	}
+
+	ret = register_netdev(dev);
+	if (ret < 0)
+		goto err_iounmap;
+
+	velocity_print_info(vptr);
+	pci_set_drvdata(pdev, dev);
+	
+	/* and leave the chip powered down */
+	
+	pci_set_power_state(pdev, 3);
+out:
+#ifdef CONFIG_PM
+	if (ret == 0 && !velocity_notifier_registered) {
+		velocity_notifier_registered = 1;
+		register_inetaddr_notifier(&velocity_inetaddr_notifier);
+	}
+#endif
+	return ret;
+
+err_iounmap:
+	iounmap(regs);
+err_release_res:
+	pci_release_regions(pdev);
+err_disable:
+	pci_disable_device(pdev);
+err_free_dev:
+	free_netdev(dev);
+	goto out;
+}
+
+/**
+ *	velocity_print_info	-	per driver data
+ *	@vptr: velocity
+ *
+ *	Print per driver data as the kernel driver finds Velocity
+ *	hardware
+ */
+
+static void __devinit velocity_print_info(struct velocity_info *vptr)
+{
+	struct net_device *dev = vptr->dev;
+
+	printk(KERN_INFO "%s: %s\n", dev->name, get_chip_name(vptr->chip_id));
+	printk(KERN_INFO "%s: Ethernet Address: %2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n", 
+		dev->name, 
+		dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 
+		dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
+}
+
+/**
+ *	velocity_init_info	-	init private data
+ *	@pdev: PCI device
+ *	@vptr: Velocity info
+ *	@info: Board type
+ *
+ *	Set up the initial velocity_info struct for the device that has been
+ *	discovered.
+ */
+
+static void __devinit velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, struct velocity_info_tbl *info)
+{
+	memset(vptr, 0, sizeof(struct velocity_info));
+
+	vptr->pdev = pdev;
+	vptr->chip_id = info->chip_id;
+	vptr->io_size = info->io_size;
+	vptr->num_txq = info->txqueue;
+	vptr->multicast_limit = MCAM_SIZE;
+
+	spin_lock_init(&vptr->lock);
+	spin_lock_init(&vptr->xmit_lock);
+}
+
+/**
+ *	velocity_get_pci_info	-	retrieve PCI info for device
+ *	@vptr: velocity device
+ *	@pdev: PCI device it matches
+ *
+ *	Retrieve the PCI configuration space data that interests us from
+ *	the kernel PCI layer
+ */
+
+static int __devinit velocity_get_pci_info(struct velocity_info *vptr, struct pci_dev *pdev)
+{
+
+	if(pci_read_config_byte(pdev, PCI_REVISION_ID, &vptr->rev_id) < 0)
+		return -EIO;
+		
+	pci_set_master(pdev);
+
+	vptr->ioaddr = pci_resource_start(pdev, 0);
+	vptr->memaddr = pci_resource_start(pdev, 1);
+	
+	if(!(pci_resource_flags(pdev, 0) & IORESOURCE_IO))
+	{
+		printk(KERN_ERR "%s: region #0 is not an I/O resource, aborting.\n",
+				pci_name(pdev));
+		return -EINVAL;
+	}
+
+	if((pci_resource_flags(pdev, 1) & IORESOURCE_IO))
+	{
+		printk(KERN_ERR "%s: region #1 is an I/O resource, aborting.\n",
+				pci_name(pdev));
+		return -EINVAL;
+	}
+
+	if(pci_resource_len(pdev, 1) < 256)
+	{
+		printk(KERN_ERR "%s: region #1 is too small.\n", 
+				pci_name(pdev));
+		return -EINVAL;
+	}
+	vptr->pdev = pdev;
+
+	return 0;
+}
+
+/**
+ *	velocity_init_rings	-	set up DMA rings
+ *	@vptr: Velocity to set up
+ *
+ *	Allocate PCI mapped DMA rings for the receive and transmit layer
+ *	to use.
+ */
+
+static int velocity_init_rings(struct velocity_info *vptr)
+{
+	int i;
+	unsigned int psize;
+	unsigned int tsize;
+	dma_addr_t pool_dma;
+	u8 *pool;
+
+	/*
+	 *	Allocate all RD/TD rings a single pool 
+	 */
+	 
+	psize = vptr->options.numrx * sizeof(struct rx_desc) + 
+		vptr->options.numtx * sizeof(struct tx_desc) * vptr->num_txq;
+
+	/*
+	 * pci_alloc_consistent() fulfills the requirement for 64 bytes
+	 * alignment
+	 */
+	pool = pci_alloc_consistent(vptr->pdev, psize, &pool_dma);
+
+	if (pool == NULL) {
+		printk(KERN_ERR "%s : DMA memory allocation failed.\n", 
+					vptr->dev->name);
+		return -ENOMEM;
+	}
+
+	memset(pool, 0, psize);
+
+	vptr->rd_ring = (struct rx_desc *) pool;
+
+	vptr->rd_pool_dma = pool_dma;
+
+	tsize = vptr->options.numtx * PKT_BUF_SZ * vptr->num_txq;
+	vptr->tx_bufs = pci_alloc_consistent(vptr->pdev, tsize, 
+						&vptr->tx_bufs_dma);
+
+	if (vptr->tx_bufs == NULL) {
+		printk(KERN_ERR "%s: DMA memory allocation failed.\n", 
+					vptr->dev->name);
+		pci_free_consistent(vptr->pdev, psize, pool, pool_dma);
+		return -ENOMEM;
+	}
+
+	memset(vptr->tx_bufs, 0, vptr->options.numtx * PKT_BUF_SZ * vptr->num_txq);
+
+	i = vptr->options.numrx * sizeof(struct rx_desc);
+	pool += i;
+	pool_dma += i;
+	for (i = 0; i < vptr->num_txq; i++) {
+		int offset = vptr->options.numtx * sizeof(struct tx_desc);
+
+		vptr->td_pool_dma[i] = pool_dma;
+		vptr->td_rings[i] = (struct tx_desc *) pool;
+		pool += offset;
+		pool_dma += offset;
+	}
+	return 0;
+}
+
+/**
+ *	velocity_free_rings	-	free PCI ring pointers
+ *	@vptr: Velocity to free from
+ *
+ *	Clean up the PCI ring buffers allocated to this velocity.
+ */
+
+static void velocity_free_rings(struct velocity_info *vptr)
+{
+	int size;
+
+	size = vptr->options.numrx * sizeof(struct rx_desc) + 
+	       vptr->options.numtx * sizeof(struct tx_desc) * vptr->num_txq;
+
+	pci_free_consistent(vptr->pdev, size, vptr->rd_ring, vptr->rd_pool_dma);
+
+	size = vptr->options.numtx * PKT_BUF_SZ * vptr->num_txq;
+
+	pci_free_consistent(vptr->pdev, size, vptr->tx_bufs, vptr->tx_bufs_dma);
+}
+
+static inline void velocity_give_many_rx_descs(struct velocity_info *vptr)
+{
+	struct mac_regs *regs = vptr->mac_regs;
+	int avail, dirty, unusable;
+
+	/*
+	 * RD number must be equal to 4X per hardware spec
+	 * (programming guide rev 1.20, p.13)
+	 */
+	if (vptr->rd_filled < 4)
+		return;
+
+	wmb();
+
+	unusable = vptr->rd_filled | 0x0003;
+	dirty = vptr->rd_dirty - unusable + 1;
+	for (avail = vptr->rd_filled & 0xfffc; avail; avail--) {
+		dirty = (dirty > 0) ? dirty - 1 : vptr->options.numrx - 1;
+		velocity_give_rx_desc(vptr->rd_ring + dirty);
+	}
+
+	writew(vptr->rd_filled & 0xfffc, &regs->RBRDU);
+	vptr->rd_filled = unusable;
+}
+
+static int velocity_rx_refill(struct velocity_info *vptr)
+{
+	int dirty = vptr->rd_dirty, done = 0, ret = 0;
+
+	do {
+		struct rx_desc *rd = vptr->rd_ring + dirty;
+
+		/* Fine for an all zero Rx desc at init time as well */
+		if (rd->rdesc0.owner == cpu_to_le32(OWNED_BY_NIC))
+			break;
+
+		if (!vptr->rd_info[dirty].skb) {
+			ret = velocity_alloc_rx_buf(vptr, dirty);
+			if (ret < 0)
+				break;
+		}
+		done++;
+		dirty = (dirty < vptr->options.numrx - 1) ? dirty + 1 : 0;	
+	} while (dirty != vptr->rd_curr);
+
+	if (done) {
+		vptr->rd_dirty = dirty;
+		vptr->rd_filled += done;
+		velocity_give_many_rx_descs(vptr);
+	}
+
+	return ret;
+}
+
+/**
+ *	velocity_init_rd_ring	-	set up receive ring
+ *	@vptr: velocity to configure
+ *
+ *	Allocate and set up the receive buffers for each ring slot and
+ *	assign them to the network adapter.
+ */
+
+static int velocity_init_rd_ring(struct velocity_info *vptr)
+{
+	int ret = -ENOMEM;
+	unsigned int rsize = sizeof(struct velocity_rd_info) * 
+					vptr->options.numrx;
+
+	vptr->rd_info = kmalloc(rsize, GFP_KERNEL);
+	if(vptr->rd_info == NULL)
+		goto out;
+	memset(vptr->rd_info, 0, rsize);
+
+	vptr->rd_filled = vptr->rd_dirty = vptr->rd_curr = 0;
+
+	ret = velocity_rx_refill(vptr);
+	if (ret < 0) {
+		VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR
+			"%s: failed to allocate RX buffer.\n", vptr->dev->name);
+		velocity_free_rd_ring(vptr);
+	}
+out:
+	return ret;
+}
+
+/**
+ *	velocity_free_rd_ring	-	set up receive ring
+ *	@vptr: velocity to clean up
+ *
+ *	Free the receive buffers for each ring slot and any
+ *	attached socket buffers that need to go away.
+ */
+
+static void velocity_free_rd_ring(struct velocity_info *vptr)
+{
+	int i;
+
+	if (vptr->rd_info == NULL)
+		return;
+
+	for (i = 0; i < vptr->options.numrx; i++) {
+		struct velocity_rd_info *rd_info = &(vptr->rd_info[i]);
+
+		if (!rd_info->skb)
+			continue;
+		pci_unmap_single(vptr->pdev, rd_info->skb_dma, vptr->rx_buf_sz,
+				 PCI_DMA_FROMDEVICE);
+		rd_info->skb_dma = (dma_addr_t) NULL;
+
+		dev_kfree_skb(rd_info->skb);
+		rd_info->skb = NULL;
+	}
+
+	kfree(vptr->rd_info);
+	vptr->rd_info = NULL;
+}
+
+/**
+ *	velocity_init_td_ring	-	set up transmit ring
+ *	@vptr:	velocity
+ *
+ *	Set up the transmit ring and chain the ring pointers together.
+ *	Returns zero on success or a negative posix errno code for
+ *	failure.
+ */
+ 
+static int velocity_init_td_ring(struct velocity_info *vptr)
+{
+	int i, j;
+	dma_addr_t curr;
+	struct tx_desc *td;
+	struct velocity_td_info *td_info;
+	unsigned int tsize = sizeof(struct velocity_td_info) * 
+					vptr->options.numtx;
+
+	/* Init the TD ring entries */
+	for (j = 0; j < vptr->num_txq; j++) {
+		curr = vptr->td_pool_dma[j];
+
+		vptr->td_infos[j] = kmalloc(tsize, GFP_KERNEL);
+		if(vptr->td_infos[j] == NULL)
+		{
+			while(--j >= 0)
+				kfree(vptr->td_infos[j]);
+			return -ENOMEM;
+		}
+		memset(vptr->td_infos[j], 0, tsize);
+
+		for (i = 0; i < vptr->options.numtx; i++, curr += sizeof(struct tx_desc)) {
+			td = &(vptr->td_rings[j][i]);
+			td_info = &(vptr->td_infos[j][i]);
+			td_info->buf = vptr->tx_bufs + (i + j) * PKT_BUF_SZ;
+			td_info->buf_dma = vptr->tx_bufs_dma + (i + j) * PKT_BUF_SZ;
+		}
+		vptr->td_tail[j] = vptr->td_curr[j] = vptr->td_used[j] = 0;
+	}
+	return 0;
+}
+
+/*
+ *	FIXME: could we merge this with velocity_free_tx_buf ?
+ */
+
+static void velocity_free_td_ring_entry(struct velocity_info *vptr,
+							 int q, int n)
+{
+	struct velocity_td_info * td_info = &(vptr->td_infos[q][n]);
+	int i;
+	
+	if (td_info == NULL)
+		return;
+		
+	if (td_info->skb) {
+		for (i = 0; i < td_info->nskb_dma; i++)
+		{
+			if (td_info->skb_dma[i]) {
+				pci_unmap_single(vptr->pdev, td_info->skb_dma[i], 
+					td_info->skb->len, PCI_DMA_TODEVICE);
+				td_info->skb_dma[i] = (dma_addr_t) NULL;
+			}
+		}
+		dev_kfree_skb(td_info->skb);
+		td_info->skb = NULL;
+	}
+}
+
+/**
+ *	velocity_free_td_ring	-	free td ring
+ *	@vptr: velocity
+ *
+ *	Free up the transmit ring for this particular velocity adapter.
+ *	We free the ring contents but not the ring itself.
+ */
+ 
+static void velocity_free_td_ring(struct velocity_info *vptr)
+{
+	int i, j;
+
+	for (j = 0; j < vptr->num_txq; j++) {
+		if (vptr->td_infos[j] == NULL)
+			continue;
+		for (i = 0; i < vptr->options.numtx; i++) {
+			velocity_free_td_ring_entry(vptr, j, i);
+
+		}
+		if (vptr->td_infos[j]) {
+			kfree(vptr->td_infos[j]);
+			vptr->td_infos[j] = NULL;
+		}
+	}
+}
+
+/**
+ *	velocity_rx_srv		-	service RX interrupt
+ *	@vptr: velocity
+ *	@status: adapter status (unused)
+ *
+ *	Walk the receive ring of the velocity adapter and remove
+ *	any received packets from the receive queue. Hand the ring
+ *	slots back to the adapter for reuse.
+ */
+ 
+static int velocity_rx_srv(struct velocity_info *vptr, int status)
+{
+	struct net_device_stats *stats = &vptr->stats;
+	int rd_curr = vptr->rd_curr;
+	int works = 0;
+
+	while (1) {
+		struct rx_desc *rd = vptr->rd_ring + rd_curr;
+
+		if (!vptr->rd_info[rd_curr].skb || (works++ > 15))
+			break;
+
+		if (rd->rdesc0.owner == OWNED_BY_NIC)
+			break;
+
+		/*
+		 *	Don't drop CE or RL error frame although RXOK is off
+		 */
+		if ((rd->rdesc0.RSR & RSR_RXOK) || (!(rd->rdesc0.RSR & RSR_RXOK) && (rd->rdesc0.RSR & (RSR_CE | RSR_RL)))) {
+			if (velocity_receive_frame(vptr, rd_curr) < 0)
+				stats->rx_dropped++;
+		} else {
+			if (rd->rdesc0.RSR & RSR_CRC)
+				stats->rx_crc_errors++;
+			if (rd->rdesc0.RSR & RSR_FAE)
+				stats->rx_frame_errors++;
+
+			stats->rx_dropped++;
+		}
+
+		rd->inten = 1;
+
+		vptr->dev->last_rx = jiffies;
+
+		rd_curr++;
+		if (rd_curr >= vptr->options.numrx)
+			rd_curr = 0;
+	}
+
+	if (velocity_rx_refill(vptr) < 0) {
+		VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR
+			"%s: rx buf allocation failure\n", vptr->dev->name);
+	}
+
+	vptr->rd_curr = rd_curr;
+	VAR_USED(stats);
+	return works;
+}
+
+/**
+ *	velocity_rx_csum	-	checksum process
+ *	@rd: receive packet descriptor
+ *	@skb: network layer packet buffer
+ *
+ *	Process the status bits for the received packet and determine
+ *	if the checksum was computed and verified by the hardware
+ */
+ 
+static inline void velocity_rx_csum(struct rx_desc *rd, struct sk_buff *skb)
+{
+	skb->ip_summed = CHECKSUM_NONE;
+
+	if (rd->rdesc1.CSM & CSM_IPKT) {
+		if (rd->rdesc1.CSM & CSM_IPOK) {
+			if ((rd->rdesc1.CSM & CSM_TCPKT) || 
+					(rd->rdesc1.CSM & CSM_UDPKT)) {
+				if (!(rd->rdesc1.CSM & CSM_TUPOK)) {
+					return;
+				}
+			}
+			skb->ip_summed = CHECKSUM_UNNECESSARY;
+		}
+	}
+}
+
+/**
+ *	velocity_rx_copy	-	in place Rx copy for small packets
+ *	@rx_skb: network layer packet buffer candidate
+ *	@pkt_size: received data size
+ *	@rd: receive packet descriptor
+ *	@dev: network device
+ *
+ *	Replace the current skb that is scheduled for Rx processing by a
+ *	shorter, immediatly allocated skb, if the received packet is small
+ *	enough. This function returns a negative value if the received
+ *	packet is too big or if memory is exhausted.
+ */
+static inline int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size,
+				   struct velocity_info *vptr)
+{
+	int ret = -1;
+
+	if (pkt_size < rx_copybreak) {
+		struct sk_buff *new_skb;
+
+		new_skb = dev_alloc_skb(pkt_size + 2);
+		if (new_skb) {
+			new_skb->dev = vptr->dev;
+			new_skb->ip_summed = rx_skb[0]->ip_summed;
+
+			if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN)
+				skb_reserve(new_skb, 2);
+
+			memcpy(new_skb->data, rx_skb[0]->tail, pkt_size);
+			*rx_skb = new_skb;
+			ret = 0;
+		}
+		
+	}
+	return ret;
+}
+
+/**
+ *	velocity_iph_realign	-	IP header alignment
+ *	@vptr: velocity we are handling
+ *	@skb: network layer packet buffer
+ *	@pkt_size: received data size
+ *
+ *	Align IP header on a 2 bytes boundary. This behavior can be
+ *	configured by the user.
+ */
+static inline void velocity_iph_realign(struct velocity_info *vptr,
+					struct sk_buff *skb, int pkt_size)
+{
+	/* FIXME - memmove ? */
+	if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN) {
+		int i;
+
+		for (i = pkt_size; i >= 0; i--)
+			*(skb->data + i + 2) = *(skb->data + i);
+		skb_reserve(skb, 2);
+	}
+}
+
+/**
+ *	velocity_receive_frame	-	received packet processor
+ *	@vptr: velocity we are handling
+ *	@idx: ring index
+ *	
+ *	A packet has arrived. We process the packet and if appropriate
+ *	pass the frame up the network stack
+ */
+ 
+static int velocity_receive_frame(struct velocity_info *vptr, int idx)
+{
+	void (*pci_action)(struct pci_dev *, dma_addr_t, size_t, int);
+	struct net_device_stats *stats = &vptr->stats;
+	struct velocity_rd_info *rd_info = &(vptr->rd_info[idx]);
+	struct rx_desc *rd = &(vptr->rd_ring[idx]);
+	int pkt_len = rd->rdesc0.len;
+	struct sk_buff *skb;
+
+	if (rd->rdesc0.RSR & (RSR_STP | RSR_EDP)) {
+		VELOCITY_PRT(MSG_LEVEL_VERBOSE, KERN_ERR " %s : the received frame span multple RDs.\n", vptr->dev->name);
+		stats->rx_length_errors++;
+		return -EINVAL;
+	}
+
+	if (rd->rdesc0.RSR & RSR_MAR)
+		vptr->stats.multicast++;
+
+	skb = rd_info->skb;
+	skb->dev = vptr->dev;
+
+	pci_dma_sync_single_for_cpu(vptr->pdev, rd_info->skb_dma,
+				    vptr->rx_buf_sz, PCI_DMA_FROMDEVICE);
+
+	/*
+	 *	Drop frame not meeting IEEE 802.3
+	 */
+	 
+	if (vptr->flags & VELOCITY_FLAGS_VAL_PKT_LEN) {
+		if (rd->rdesc0.RSR & RSR_RL) {
+			stats->rx_length_errors++;
+			return -EINVAL;
+		}
+	}
+
+	pci_action = pci_dma_sync_single_for_device;
+
+	velocity_rx_csum(rd, skb);
+
+	if (velocity_rx_copy(&skb, pkt_len, vptr) < 0) {
+		velocity_iph_realign(vptr, skb, pkt_len);
+		pci_action = pci_unmap_single;
+		rd_info->skb = NULL;
+	}
+
+	pci_action(vptr->pdev, rd_info->skb_dma, vptr->rx_buf_sz,
+		   PCI_DMA_FROMDEVICE);
+
+	skb_put(skb, pkt_len - 4);
+	skb->protocol = eth_type_trans(skb, skb->dev);	
+
+	stats->rx_bytes += pkt_len;
+	netif_rx(skb);
+
+	return 0;
+}
+
+/**
+ *	velocity_alloc_rx_buf	-	allocate aligned receive buffer
+ *	@vptr: velocity
+ *	@idx: ring index
+ *
+ *	Allocate a new full sized buffer for the reception of a frame and
+ *	map it into PCI space for the hardware to use. The hardware
+ *	requires *64* byte alignment of the buffer which makes life
+ *	less fun than would be ideal.
+ */
+ 
+static int velocity_alloc_rx_buf(struct velocity_info *vptr, int idx)
+{
+	struct rx_desc *rd = &(vptr->rd_ring[idx]);
+	struct velocity_rd_info *rd_info = &(vptr->rd_info[idx]);
+
+	rd_info->skb = dev_alloc_skb(vptr->rx_buf_sz + 64);
+	if (rd_info->skb == NULL)
+		return -ENOMEM;
+
+	/*
+	 *	Do the gymnastics to get the buffer head for data at
+	 *	64byte alignment.
+	 */
+	skb_reserve(rd_info->skb, (unsigned long) rd_info->skb->tail & 63);
+	rd_info->skb->dev = vptr->dev;
+	rd_info->skb_dma = pci_map_single(vptr->pdev, rd_info->skb->tail, vptr->rx_buf_sz, PCI_DMA_FROMDEVICE);
+	
+	/*
+	 *	Fill in the descriptor to match
+ 	 */	
+ 	 
+	*((u32 *) & (rd->rdesc0)) = 0;
+	rd->len = cpu_to_le32(vptr->rx_buf_sz);
+	rd->inten = 1;
+	rd->pa_low = cpu_to_le32(rd_info->skb_dma);
+	rd->pa_high = 0;
+	return 0;
+}
+
+/**
+ *	tx_srv		-	transmit interrupt service
+ *	@vptr; Velocity
+ *	@status:
+ *
+ *	Scan the queues looking for transmitted packets that
+ *	we can complete and clean up. Update any statistics as
+ *	neccessary/
+ */
+ 
+static int velocity_tx_srv(struct velocity_info *vptr, u32 status)
+{
+	struct tx_desc *td;
+	int qnum;
+	int full = 0;
+	int idx;
+	int works = 0;
+	struct velocity_td_info *tdinfo;
+	struct net_device_stats *stats = &vptr->stats;
+
+	for (qnum = 0; qnum < vptr->num_txq; qnum++) {
+		for (idx = vptr->td_tail[qnum]; vptr->td_used[qnum] > 0; 
+			idx = (idx + 1) % vptr->options.numtx) {
+
+			/*
+			 *	Get Tx Descriptor
+			 */
+			td = &(vptr->td_rings[qnum][idx]);
+			tdinfo = &(vptr->td_infos[qnum][idx]);
+
+			if (td->tdesc0.owner == OWNED_BY_NIC)
+				break;
+
+			if ((works++ > 15))
+				break;
+
+			if (td->tdesc0.TSR & TSR0_TERR) {
+				stats->tx_errors++;
+				stats->tx_dropped++;
+				if (td->tdesc0.TSR & TSR0_CDH)
+					stats->tx_heartbeat_errors++;
+				if (td->tdesc0.TSR & TSR0_CRS)
+					stats->tx_carrier_errors++;
+				if (td->tdesc0.TSR & TSR0_ABT)
+					stats->tx_aborted_errors++;
+				if (td->tdesc0.TSR & TSR0_OWC)
+					stats->tx_window_errors++;
+			} else {
+				stats->tx_packets++;
+				stats->tx_bytes += tdinfo->skb->len;
+			}
+			velocity_free_tx_buf(vptr, tdinfo);
+			vptr->td_used[qnum]--;
+		}
+		vptr->td_tail[qnum] = idx;
+
+		if (AVAIL_TD(vptr, qnum) < 1) {
+			full = 1;
+		}
+	}
+	/*
+	 *	Look to see if we should kick the transmit network
+	 *	layer for more work.
+	 */
+	if (netif_queue_stopped(vptr->dev) && (full == 0)
+	    && (!(vptr->mii_status & VELOCITY_LINK_FAIL))) {
+		netif_wake_queue(vptr->dev);
+	}
+	return works;
+}
+
+/**
+ *	velocity_print_link_status	-	link status reporting
+ *	@vptr: velocity to report on
+ *
+ *	Turn the link status of the velocity card into a kernel log
+ *	description of the new link state, detailing speed and duplex
+ *	status
+ */
+
+static void velocity_print_link_status(struct velocity_info *vptr)
+{
+
+	if (vptr->mii_status & VELOCITY_LINK_FAIL) {
+		VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: failed to detect cable link\n", vptr->dev->name);
+	} else if (vptr->options.spd_dpx == SPD_DPX_AUTO) {
+		VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: Link autonegation", vptr->dev->name);
+
+		if (vptr->mii_status & VELOCITY_SPEED_1000)
+			VELOCITY_PRT(MSG_LEVEL_INFO, " speed 1000M bps");
+		else if (vptr->mii_status & VELOCITY_SPEED_100)
+			VELOCITY_PRT(MSG_LEVEL_INFO, " speed 100M bps");
+		else
+			VELOCITY_PRT(MSG_LEVEL_INFO, " speed 10M bps");
+
+		if (vptr->mii_status & VELOCITY_DUPLEX_FULL)
+			VELOCITY_PRT(MSG_LEVEL_INFO, " full duplex\n");
+		else
+			VELOCITY_PRT(MSG_LEVEL_INFO, " half duplex\n");
+	} else {
+		VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: Link forced", vptr->dev->name);
+		switch (vptr->options.spd_dpx) {
+		case SPD_DPX_100_HALF:
+			VELOCITY_PRT(MSG_LEVEL_INFO, " speed 100M bps half duplex\n");
+			break;
+		case SPD_DPX_100_FULL:
+			VELOCITY_PRT(MSG_LEVEL_INFO, " speed 100M bps full duplex\n");
+			break;
+		case SPD_DPX_10_HALF:
+			VELOCITY_PRT(MSG_LEVEL_INFO, " speed 10M bps half duplex\n");
+			break;
+		case SPD_DPX_10_FULL:
+			VELOCITY_PRT(MSG_LEVEL_INFO, " speed 10M bps full duplex\n");
+			break;
+		default:
+			break;
+		}
+	}
+}
+
+/**
+ *	velocity_error	-	handle error from controller
+ *	@vptr: velocity
+ *	@status: card status
+ *
+ *	Process an error report from the hardware and attempt to recover
+ *	the card itself. At the moment we cannot recover from some 
+ *	theoretically impossible errors but this could be fixed using
+ *	the pci_device_failed logic to bounce the hardware
+ *
+ */
+ 
+static void velocity_error(struct velocity_info *vptr, int status)
+{
+
+	if (status & ISR_TXSTLI) {
+		struct mac_regs * regs = vptr->mac_regs;
+
+		printk(KERN_ERR "TD structure errror TDindex=%hx\n", readw(&regs->TDIdx[0]));
+		BYTE_REG_BITS_ON(TXESR_TDSTR, &regs->TXESR);
+		writew(TRDCSR_RUN, &regs->TDCSRClr);
+		netif_stop_queue(vptr->dev);
+		
+		/* FIXME: port over the pci_device_failed code and use it
+		   here */
+	}
+
+	if (status & ISR_SRCI) {
+		struct mac_regs * regs = vptr->mac_regs;
+		int linked;
+
+		if (vptr->options.spd_dpx == SPD_DPX_AUTO) {
+			vptr->mii_status = check_connection_type(regs);
+
+			/*
+			 *	If it is a 3119, disable frame bursting in 
+			 *	halfduplex mode and enable it in fullduplex
+			 *	 mode
+			 */
+			if (vptr->rev_id < REV_ID_VT3216_A0) {
+				if (vptr->mii_status | VELOCITY_DUPLEX_FULL)
+					BYTE_REG_BITS_ON(TCR_TB2BDIS, &regs->TCR);
+				else
+					BYTE_REG_BITS_OFF(TCR_TB2BDIS, &regs->TCR);
+			}
+			/*
+			 *	Only enable CD heart beat counter in 10HD mode
+			 */
+			if (!(vptr->mii_status & VELOCITY_DUPLEX_FULL) && (vptr->mii_status & VELOCITY_SPEED_10)) {
+				BYTE_REG_BITS_OFF(TESTCFG_HBDIS, &regs->TESTCFG);
+			} else {
+				BYTE_REG_BITS_ON(TESTCFG_HBDIS, &regs->TESTCFG);
+			}
+		}
+		/*
+		 *	Get link status from PHYSR0
+		 */
+		linked = readb(&regs->PHYSR0) & PHYSR0_LINKGD;
+
+		if (linked) {
+			vptr->mii_status &= ~VELOCITY_LINK_FAIL;
+		} else {
+			vptr->mii_status |= VELOCITY_LINK_FAIL;
+		}
+
+		velocity_print_link_status(vptr);
+		enable_flow_control_ability(vptr);
+
+		/*
+		 *	Re-enable auto-polling because SRCI will disable 
+		 *	auto-polling
+		 */
+		 
+		enable_mii_autopoll(regs);
+
+		if (vptr->mii_status & VELOCITY_LINK_FAIL)
+			netif_stop_queue(vptr->dev);
+		else
+			netif_wake_queue(vptr->dev);
+
+	};
+	if (status & ISR_MIBFI)
+		velocity_update_hw_mibs(vptr);
+	if (status & ISR_LSTEI)
+		mac_rx_queue_wake(vptr->mac_regs);
+}
+
+/**
+ *	velocity_free_tx_buf	-	free transmit buffer
+ *	@vptr: velocity
+ *	@tdinfo: buffer
+ *
+ *	Release an transmit buffer. If the buffer was preallocated then
+ *	recycle it, if not then unmap the buffer.
+ */
+ 
+static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_info *tdinfo)
+{
+	struct sk_buff *skb = tdinfo->skb;
+	int i;
+
+	/*
+	 *	Don't unmap the pre-allocated tx_bufs
+	 */
+	if (tdinfo->skb_dma && (tdinfo->skb_dma[0] != tdinfo->buf_dma)) {
+
+		for (i = 0; i < tdinfo->nskb_dma; i++) {
+#ifdef VELOCITY_ZERO_COPY_SUPPORT
+			pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], td->tdesc1.len, PCI_DMA_TODEVICE);
+#else
+			pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], skb->len, PCI_DMA_TODEVICE);
+#endif
+			tdinfo->skb_dma[i] = 0;
+		}
+	}
+	dev_kfree_skb_irq(skb);
+	tdinfo->skb = NULL;
+}
+
+/**
+ *	velocity_open		-	interface activation callback
+ *	@dev: network layer device to open
+ *
+ *	Called when the network layer brings the interface up. Returns
+ *	a negative posix error code on failure, or zero on success.
+ *
+ *	All the ring allocation and set up is done on open for this
+ *	adapter to minimise memory usage when inactive
+ */
+ 
+static int velocity_open(struct net_device *dev)
+{
+	struct velocity_info *vptr = dev->priv;
+	int ret;
+
+	vptr->rx_buf_sz = (dev->mtu <= 1504 ? PKT_BUF_SZ : dev->mtu + 32);
+
+	ret = velocity_init_rings(vptr);
+	if (ret < 0)
+		goto out;
+
+	ret = velocity_init_rd_ring(vptr);
+	if (ret < 0)
+		goto err_free_desc_rings;
+
+	ret = velocity_init_td_ring(vptr);
+	if (ret < 0)
+		goto err_free_rd_ring;
+	
+	/* Ensure chip is running */	
+	pci_set_power_state(vptr->pdev, 0);
+	
+	velocity_init_registers(vptr, VELOCITY_INIT_COLD);
+
+	ret = request_irq(vptr->pdev->irq, &velocity_intr, SA_SHIRQ,
+			  dev->name, dev);
+	if (ret < 0) {
+		/* Power down the chip */
+		pci_set_power_state(vptr->pdev, 3);
+		goto err_free_td_ring;
+	}
+
+	mac_enable_int(vptr->mac_regs);
+	netif_start_queue(dev);
+	vptr->flags |= VELOCITY_FLAGS_OPENED;
+out:
+	return ret;
+
+err_free_td_ring:
+	velocity_free_td_ring(vptr);
+err_free_rd_ring:
+	velocity_free_rd_ring(vptr);
+err_free_desc_rings:
+	velocity_free_rings(vptr);
+	goto out;
+}
+
+/** 
+ *	velocity_change_mtu	-	MTU change callback
+ *	@dev: network device
+ *	@new_mtu: desired MTU
+ *
+ *	Handle requests from the networking layer for MTU change on
+ *	this interface. It gets called on a change by the network layer.
+ *	Return zero for success or negative posix error code.
+ */
+ 
+static int velocity_change_mtu(struct net_device *dev, int new_mtu)
+{
+	struct velocity_info *vptr = dev->priv;
+	unsigned long flags;
+	int oldmtu = dev->mtu;
+	int ret = 0;
+
+	if ((new_mtu < VELOCITY_MIN_MTU) || new_mtu > (VELOCITY_MAX_MTU)) {
+		VELOCITY_PRT(MSG_LEVEL_ERR, KERN_NOTICE "%s: Invalid MTU.\n", 
+				vptr->dev->name);
+		return -EINVAL;
+	}
+
+	if (new_mtu != oldmtu) {
+		spin_lock_irqsave(&vptr->lock, flags);
+
+		netif_stop_queue(dev);
+		velocity_shutdown(vptr);
+
+		velocity_free_td_ring(vptr);
+		velocity_free_rd_ring(vptr);
+
+		dev->mtu = new_mtu;
+		if (new_mtu > 8192)
+			vptr->rx_buf_sz = 9 * 1024;
+		else if (new_mtu > 4096)
+			vptr->rx_buf_sz = 8192;
+		else
+			vptr->rx_buf_sz = 4 * 1024;
+
+		ret = velocity_init_rd_ring(vptr);
+		if (ret < 0)
+			goto out_unlock;
+
+		ret = velocity_init_td_ring(vptr);
+		if (ret < 0)
+			goto out_unlock;
+
+		velocity_init_registers(vptr, VELOCITY_INIT_COLD);
+
+		mac_enable_int(vptr->mac_regs);
+		netif_start_queue(dev);
+out_unlock:
+		spin_unlock_irqrestore(&vptr->lock, flags);
+	}
+
+	return ret;
+}
+
+/**
+ *	velocity_shutdown	-	shut down the chip
+ *	@vptr: velocity to deactivate
+ *
+ *	Shuts down the internal operations of the velocity and
+ *	disables interrupts, autopolling, transmit and receive
+ */
+ 
+static void velocity_shutdown(struct velocity_info *vptr)
+{
+	struct mac_regs * regs = vptr->mac_regs;
+	mac_disable_int(regs);
+	writel(CR0_STOP, &regs->CR0Set);
+	writew(0xFFFF, &regs->TDCSRClr);
+	writeb(0xFF, &regs->RDCSRClr);
+	safe_disable_mii_autopoll(regs);
+	mac_clear_isr(regs);
+}
+
+/**
+ *	velocity_close		-	close adapter callback
+ *	@dev: network device
+ *
+ *	Callback from the network layer when the velocity is being
+ *	deactivated by the network layer
+ */
+
+static int velocity_close(struct net_device *dev)
+{
+	struct velocity_info *vptr = dev->priv;
+
+	netif_stop_queue(dev);
+	velocity_shutdown(vptr);
+
+	if (vptr->flags & VELOCITY_FLAGS_WOL_ENABLED)
+		velocity_get_ip(vptr);
+	if (dev->irq != 0)
+		free_irq(dev->irq, dev);
+		
+	/* Power down the chip */
+	pci_set_power_state(vptr->pdev, 3);
+	
+	/* Free the resources */
+	velocity_free_td_ring(vptr);
+	velocity_free_rd_ring(vptr);
+	velocity_free_rings(vptr);
+
+	vptr->flags &= (~VELOCITY_FLAGS_OPENED);
+	return 0;
+}
+
+/**
+ *	velocity_xmit		-	transmit packet callback
+ *	@skb: buffer to transmit
+ *	@dev: network device
+ *
+ *	Called by the networ layer to request a packet is queued to
+ *	the velocity. Returns zero on success.
+ */
+ 
+static int velocity_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct velocity_info *vptr = dev->priv;
+	int qnum = 0;
+	struct tx_desc *td_ptr;
+	struct velocity_td_info *tdinfo;
+	unsigned long flags;
+	int index;
+
+	int pktlen = skb->len;
+
+	spin_lock_irqsave(&vptr->lock, flags);
+
+	index = vptr->td_curr[qnum];
+	td_ptr = &(vptr->td_rings[qnum][index]);
+	tdinfo = &(vptr->td_infos[qnum][index]);
+
+	td_ptr->tdesc1.TCPLS = TCPLS_NORMAL;
+	td_ptr->tdesc1.TCR = TCR0_TIC;
+	td_ptr->td_buf[0].queue = 0;
+
+	/*
+	 *	Pad short frames. 
+	 */
+	if (pktlen < ETH_ZLEN) {
+		/* Cannot occur until ZC support */
+		if(skb_linearize(skb, GFP_ATOMIC))
+			return 0; 
+		pktlen = ETH_ZLEN;
+		memcpy(tdinfo->buf, skb->data, skb->len);
+		memset(tdinfo->buf + skb->len, 0, ETH_ZLEN - skb->len);
+		tdinfo->skb = skb;
+		tdinfo->skb_dma[0] = tdinfo->buf_dma;
+		td_ptr->tdesc0.pktsize = pktlen;
+		td_ptr->td_buf[0].pa_low = cpu_to_le32(tdinfo->skb_dma[0]);
+		td_ptr->td_buf[0].pa_high = 0;
+		td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize;
+		tdinfo->nskb_dma = 1;
+		td_ptr->tdesc1.CMDZ = 2;
+	} else
+#ifdef VELOCITY_ZERO_COPY_SUPPORT
+	if (skb_shinfo(skb)->nr_frags > 0) {
+		int nfrags = skb_shinfo(skb)->nr_frags;
+		tdinfo->skb = skb;
+		if (nfrags > 6) {
+			skb_linearize(skb, GFP_ATOMIC);
+			memcpy(tdinfo->buf, skb->data, skb->len);
+			tdinfo->skb_dma[0] = tdinfo->buf_dma;
+			td_ptr->tdesc0.pktsize = 
+			td_ptr->td_buf[0].pa_low = cpu_to_le32(tdinfo->skb_dma[0]);
+			td_ptr->td_buf[0].pa_high = 0;
+			td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize;
+			tdinfo->nskb_dma = 1;
+			td_ptr->tdesc1.CMDZ = 2;
+		} else {
+			int i = 0;
+			tdinfo->nskb_dma = 0;
+			tdinfo->skb_dma[i] = pci_map_single(vptr->pdev, skb->data, skb->len - skb->data_len, PCI_DMA_TODEVICE);
+
+			td_ptr->tdesc0.pktsize = pktlen;
+
+			/* FIXME: support 48bit DMA later */
+			td_ptr->td_buf[i].pa_low = cpu_to_le32(tdinfo->skb_dma);
+			td_ptr->td_buf[i].pa_high = 0;
+			td_ptr->td_buf[i].bufsize = skb->len->skb->data_len;
+
+			for (i = 0; i < nfrags; i++) {
+				skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
+				void *addr = ((void *) page_address(frag->page + frag->page_offset));
+
+				tdinfo->skb_dma[i + 1] = pci_map_single(vptr->pdev, addr, frag->size, PCI_DMA_TODEVICE);
+
+				td_ptr->td_buf[i + 1].pa_low = cpu_to_le32(tdinfo->skb_dma[i + 1]);
+				td_ptr->td_buf[i + 1].pa_high = 0;
+				td_ptr->td_buf[i + 1].bufsize = frag->size;
+			}
+			tdinfo->nskb_dma = i - 1;
+			td_ptr->tdesc1.CMDZ = i;
+		}
+
+	} else
+#endif
+	{
+		/*
+		 *	Map the linear network buffer into PCI space and
+		 *	add it to the transmit ring.
+		 */
+		tdinfo->skb = skb;
+		tdinfo->skb_dma[0] = pci_map_single(vptr->pdev, skb->data, pktlen, PCI_DMA_TODEVICE);
+		td_ptr->tdesc0.pktsize = pktlen;
+		td_ptr->td_buf[0].pa_low = cpu_to_le32(tdinfo->skb_dma[0]);
+		td_ptr->td_buf[0].pa_high = 0;
+		td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize;
+		tdinfo->nskb_dma = 1;
+		td_ptr->tdesc1.CMDZ = 2;
+	}
+
+	if (vptr->flags & VELOCITY_FLAGS_TAGGING) {
+		td_ptr->tdesc1.pqinf.VID = (vptr->options.vid & 0xfff);
+		td_ptr->tdesc1.pqinf.priority = 0;
+		td_ptr->tdesc1.pqinf.CFI = 0;
+		td_ptr->tdesc1.TCR |= TCR0_VETAG;
+	}
+
+	/*
+	 *	Handle hardware checksum
+	 */
+	if ((vptr->flags & VELOCITY_FLAGS_TX_CSUM)
+				 && (skb->ip_summed == CHECKSUM_HW)) {
+		struct iphdr *ip = skb->nh.iph;
+		if (ip->protocol == IPPROTO_TCP)
+			td_ptr->tdesc1.TCR |= TCR0_TCPCK;
+		else if (ip->protocol == IPPROTO_UDP)
+			td_ptr->tdesc1.TCR |= (TCR0_UDPCK);
+		td_ptr->tdesc1.TCR |= TCR0_IPCK;
+	}
+	{
+
+		int prev = index - 1;
+
+		if (prev < 0)
+			prev = vptr->options.numtx - 1;
+		td_ptr->tdesc0.owner = OWNED_BY_NIC;
+		vptr->td_used[qnum]++;
+		vptr->td_curr[qnum] = (index + 1) % vptr->options.numtx;
+
+		if (AVAIL_TD(vptr, qnum) < 1)
+			netif_stop_queue(dev);
+
+		td_ptr = &(vptr->td_rings[qnum][prev]);
+		td_ptr->td_buf[0].queue = 1;
+		mac_tx_queue_wake(vptr->mac_regs, qnum);
+	}
+	dev->trans_start = jiffies;
+	spin_unlock_irqrestore(&vptr->lock, flags);
+	return 0;
+}
+
+/**
+ *	velocity_intr		-	interrupt callback
+ *	@irq: interrupt number
+ *	@dev_instance: interrupting device
+ *	@pt_regs: CPU register state at interrupt
+ *
+ *	Called whenever an interrupt is generated by the velocity
+ *	adapter IRQ line. We may not be the source of the interrupt
+ *	and need to identify initially if we are, and if not exit as
+ *	efficiently as possible.
+ */
+ 
+static int velocity_intr(int irq, void *dev_instance, struct pt_regs *regs)
+{
+	struct net_device *dev = dev_instance;
+	struct velocity_info *vptr = dev->priv;
+	u32 isr_status;
+	int max_count = 0;
+
+
+	spin_lock(&vptr->lock);
+	isr_status = mac_read_isr(vptr->mac_regs);
+
+	/* Not us ? */
+	if (isr_status == 0) {
+		spin_unlock(&vptr->lock);
+		return IRQ_NONE;
+	}
+
+	mac_disable_int(vptr->mac_regs);
+
+	/*
+	 *	Keep processing the ISR until we have completed
+	 *	processing and the isr_status becomes zero
+	 */
+	 
+	while (isr_status != 0) {
+		mac_write_isr(vptr->mac_regs, isr_status);
+		if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
+			velocity_error(vptr, isr_status);
+		if (isr_status & (ISR_PRXI | ISR_PPRXI))
+			max_count += velocity_rx_srv(vptr, isr_status);
+		if (isr_status & (ISR_PTXI | ISR_PPTXI))
+			max_count += velocity_tx_srv(vptr, isr_status);
+		isr_status = mac_read_isr(vptr->mac_regs);
+		if (max_count > vptr->options.int_works)
+		{
+			printk(KERN_WARNING "%s: excessive work at interrupt.\n", 
+				dev->name);
+			max_count = 0;
+		}
+	}
+	spin_unlock(&vptr->lock);
+	mac_enable_int(vptr->mac_regs);
+	return IRQ_HANDLED;
+
+}
+
+
+/**
+ *	ether_crc	-	ethernet CRC function
+ *
+ *	Compute an ethernet CRC hash of the data block provided. This
+ *	is not performance optimised but is not needed in performance
+ *	critical code paths.
+ *
+ *	FIXME: could we use shared code here ?
+ */
+ 
+static inline u32 ether_crc(int length, unsigned char *data)
+{
+	static unsigned const ethernet_polynomial = 0x04c11db7U;
+	
+	int crc = -1;
+
+	while (--length >= 0) {
+		unsigned char current_octet = *data++;
+		int bit;
+		for (bit = 0; bit < 8; bit++, current_octet >>= 1) {
+			crc = (crc << 1) ^ ((crc < 0) ^ (current_octet & 1) ? ethernet_polynomial : 0);
+		}
+	}
+	return crc;
+}
+
+/**
+ *	velocity_set_multi	-	filter list change callback
+ *	@dev: network device
+ *
+ *	Called by the network layer when the filter lists need to change
+ *	for a velocity adapter. Reload the CAMs with the new address
+ *	filter ruleset.
+ */
+ 
+static void velocity_set_multi(struct net_device *dev)
+{
+	struct velocity_info *vptr = dev->priv;
+	struct mac_regs * regs = vptr->mac_regs;
+	u8 rx_mode;
+	int i;
+	struct dev_mc_list *mclist;
+
+	if (dev->flags & IFF_PROMISC) {	/* Set promiscuous. */
+		/* Unconditionally log net taps. */
+		printk(KERN_NOTICE "%s: Promiscuous mode enabled.\n", dev->name);
+		writel(0xffffffff, &regs->MARCAM[0]);
+		writel(0xffffffff, &regs->MARCAM[4]);
+		rx_mode = (RCR_AM | RCR_AB | RCR_PROM);
+	} else if ((dev->mc_count > vptr->multicast_limit)
+		   || (dev->flags & IFF_ALLMULTI)) {
+		writel(0xffffffff, &regs->MARCAM[0]);
+		writel(0xffffffff, &regs->MARCAM[4]);
+		rx_mode = (RCR_AM | RCR_AB);
+	} else {
+		int offset = MCAM_SIZE - vptr->multicast_limit;
+		mac_get_cam_mask(regs, vptr->mCAMmask, VELOCITY_MULTICAST_CAM);
+
+		for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; i++, mclist = mclist->next) {
+			mac_set_cam(regs, i + offset, mclist->dmi_addr, VELOCITY_MULTICAST_CAM);
+			vptr->mCAMmask[(offset + i) / 8] |= 1 << ((offset + i) & 7);
+		}
+
+		mac_set_cam_mask(regs, vptr->mCAMmask, VELOCITY_MULTICAST_CAM);
+		rx_mode = (RCR_AM | RCR_AB);
+	}
+	if (dev->mtu > 1500)
+		rx_mode |= RCR_AL;
+
+	BYTE_REG_BITS_ON(rx_mode, &regs->RCR);
+
+}
+
+/**
+ *	velocity_get_status	-	statistics callback
+ *	@dev: network device
+ *
+ *	Callback from the network layer to allow driver statistics
+ *	to be resynchronized with hardware collected state. In the
+ *	case of the velocity we need to pull the MIB counters from
+ *	the hardware into the counters before letting the network
+ *	layer display them.
+ */
+ 
+static struct net_device_stats *velocity_get_stats(struct net_device *dev)
+{
+	struct velocity_info *vptr = dev->priv;
+	
+	/* If the hardware is down, don't touch MII */
+	if(!netif_running(dev))
+		return &vptr->stats;
+
+	spin_lock_irq(&vptr->lock);
+	velocity_update_hw_mibs(vptr);
+	spin_unlock_irq(&vptr->lock);
+
+	vptr->stats.rx_packets = vptr->mib_counter[HW_MIB_ifRxAllPkts];
+	vptr->stats.rx_errors = vptr->mib_counter[HW_MIB_ifRxErrorPkts];
+	vptr->stats.rx_length_errors = vptr->mib_counter[HW_MIB_ifInRangeLengthErrors];
+
+//  unsigned long   rx_dropped;     /* no space in linux buffers    */
+	vptr->stats.collisions = vptr->mib_counter[HW_MIB_ifTxEtherCollisions];
+	/* detailed rx_errors: */
+//  unsigned long   rx_length_errors;
+//  unsigned long   rx_over_errors;     /* receiver ring buff overflow  */
+	vptr->stats.rx_crc_errors = vptr->mib_counter[HW_MIB_ifRxPktCRCE];
+//  unsigned long   rx_frame_errors;    /* recv'd frame alignment error */
+//  unsigned long   rx_fifo_errors;     /* recv'r fifo overrun      */
+//  unsigned long   rx_missed_errors;   /* receiver missed packet   */
+
+	/* detailed tx_errors */
+//  unsigned long   tx_fifo_errors;
+
+	return &vptr->stats;
+}
+
+
+/**
+ *	velocity_ioctl		-	ioctl entry point
+ *	@dev: network device
+ *	@rq: interface request ioctl
+ *	@cmd: command code
+ *
+ *	Called when the user issues an ioctl request to the network
+ *	device in question. The velocity interface supports MII.
+ */
+ 
+static int velocity_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+{
+	struct velocity_info *vptr = dev->priv;
+	int ret;
+
+	/* If we are asked for information and the device is power
+	   saving then we need to bring the device back up to talk to it */
+	   	
+	if(!netif_running(dev))
+		pci_set_power_state(vptr->pdev, 0);
+		
+	switch (cmd) {
+	case SIOCGMIIPHY:	/* Get address of MII PHY in use. */
+	case SIOCGMIIREG:	/* Read MII PHY register. */
+	case SIOCSMIIREG:	/* Write to MII PHY register. */
+		ret = velocity_mii_ioctl(dev, rq, cmd);
+		break;
+
+	default:
+		ret = -EOPNOTSUPP;
+	}
+	if(!netif_running(dev))
+		pci_set_power_state(vptr->pdev, 3);
+		
+		
+	return ret;
+}
+
+/*
+ *	Definition for our device driver. The PCI layer interface
+ *	uses this to handle all our card discover and plugging
+ */
+ 
+static struct pci_driver velocity_driver = {
+      .name	= VELOCITY_NAME,
+      .id_table	= velocity_id_table,
+      .probe	= velocity_found1,
+      .remove	= __devexit_p(velocity_remove1),
+#ifdef CONFIG_PM
+      .suspend	= velocity_suspend,
+      .resume	= velocity_resume,
+#endif
+};
+
+/**
+ *	velocity_init_module	-	load time function
+ *
+ *	Called when the velocity module is loaded. The PCI driver
+ *	is registered with the PCI layer, and in turn will call
+ *	the probe functions for each velocity adapter installed
+ *	in the system.
+ */
+ 
+static int __init velocity_init_module(void)
+{
+	int ret;
+	ret = pci_module_init(&velocity_driver);
+
+	return ret;
+}
+
+/**
+ *	velocity_cleanup	-	module unload
+ *
+ *	When the velocity hardware is unloaded this function is called.
+ *	It will clean up the notifiers and the unregister the PCI 
+ *	driver interface for this hardware. This in turn cleans up
+ *	all discovered interfaces before returning from the function
+ */
+ 
+static void __exit velocity_cleanup_module(void)
+{
+#ifdef CONFIG_PM
+	if (velocity_notifier_registered) {
+		unregister_inetaddr_notifier(&velocity_inetaddr_notifier);
+		velocity_notifier_registered = 0;
+	}
+#endif
+	pci_unregister_driver(&velocity_driver);
+}
+
+module_init(velocity_init_module);
+module_exit(velocity_cleanup_module);
+
+
+/*
+ * MII access , media link mode setting functions
+ */
+ 
+ 
+/**
+ *	mii_init	-	set up MII
+ *	@vptr: velocity adapter
+ *	@mii_status:  links tatus
+ *
+ *	Set up the PHY for the current link state.
+ */
+ 
+static void mii_init(struct velocity_info *vptr, u32 mii_status)
+{
+	u16 BMCR;
+
+	switch (PHYID_GET_PHY_ID(vptr->phy_id)) {
+	case PHYID_CICADA_CS8201:
+		/*
+		 *	Reset to hardware default
+		 */
+		MII_REG_BITS_OFF((ANAR_ASMDIR | ANAR_PAUSE), MII_REG_ANAR, vptr->mac_regs);
+		/*
+		 *	Turn on ECHODIS bit in NWay-forced full mode and turn it
+		 *	off it in NWay-forced half mode for NWay-forced v.s. 
+		 *	legacy-forced issue.
+		 */
+		if (vptr->mii_status & VELOCITY_DUPLEX_FULL)
+			MII_REG_BITS_ON(TCSR_ECHODIS, MII_REG_TCSR, vptr->mac_regs);
+		else
+			MII_REG_BITS_OFF(TCSR_ECHODIS, MII_REG_TCSR, vptr->mac_regs);
+		/*
+		 *	Turn on Link/Activity LED enable bit for CIS8201
+		 */
+		MII_REG_BITS_ON(PLED_LALBE, MII_REG_PLED, vptr->mac_regs);
+		break;
+	case PHYID_VT3216_32BIT:
+	case PHYID_VT3216_64BIT:
+		/*
+		 *	Reset to hardware default
+		 */
+		MII_REG_BITS_ON((ANAR_ASMDIR | ANAR_PAUSE), MII_REG_ANAR, vptr->mac_regs);
+		/*
+		 *	Turn on ECHODIS bit in NWay-forced full mode and turn it
+		 *	off it in NWay-forced half mode for NWay-forced v.s. 
+		 *	legacy-forced issue
+		 */
+		if (vptr->mii_status & VELOCITY_DUPLEX_FULL)
+			MII_REG_BITS_ON(TCSR_ECHODIS, MII_REG_TCSR, vptr->mac_regs);
+		else
+			MII_REG_BITS_OFF(TCSR_ECHODIS, MII_REG_TCSR, vptr->mac_regs);
+		break;
+
+	case PHYID_MARVELL_1000:
+	case PHYID_MARVELL_1000S:
+		/*
+		 *	Assert CRS on Transmit 
+		 */
+		MII_REG_BITS_ON(PSCR_ACRSTX, MII_REG_PSCR, vptr->mac_regs);
+		/*
+		 *	Reset to hardware default 
+		 */
+		MII_REG_BITS_ON((ANAR_ASMDIR | ANAR_PAUSE), MII_REG_ANAR, vptr->mac_regs);
+		break;
+	default:
+		;
+	}
+	velocity_mii_read(vptr->mac_regs, MII_REG_BMCR, &BMCR);
+	if (BMCR & BMCR_ISO) {
+		BMCR &= ~BMCR_ISO;
+		velocity_mii_write(vptr->mac_regs, MII_REG_BMCR, BMCR);
+	}
+}
+
+/**
+ *	safe_disable_mii_autopoll	-	autopoll off
+ *	@regs: velocity registers
+ *
+ *	Turn off the autopoll and wait for it to disable on the chip
+ */
+ 
+static void safe_disable_mii_autopoll(struct mac_regs * regs)
+{
+	u16 ww;
+
+	/*  turn off MAUTO */
+	writeb(0, &regs->MIICR);
+	for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
+		udelay(1);
+		if (BYTE_REG_BITS_IS_ON(MIISR_MIDLE, &regs->MIISR))
+			break;
+	}
+}
+
+/**
+ *	enable_mii_autopoll	-	turn on autopolling
+ *	@regs: velocity registers
+ *
+ *	Enable the MII link status autopoll feature on the Velocity
+ *	hardware. Wait for it to enable.
+ */
+
+static void enable_mii_autopoll(struct mac_regs * regs)
+{
+	int ii;
+
+	writeb(0, &(regs->MIICR));
+	writeb(MIIADR_SWMPL, &regs->MIIADR);
+
+	for (ii = 0; ii < W_MAX_TIMEOUT; ii++) {
+		udelay(1);
+		if (BYTE_REG_BITS_IS_ON(MIISR_MIDLE, &regs->MIISR))
+			break;
+	}
+
+	writeb(MIICR_MAUTO, &regs->MIICR);
+
+	for (ii = 0; ii < W_MAX_TIMEOUT; ii++) {
+		udelay(1);
+		if (!BYTE_REG_BITS_IS_ON(MIISR_MIDLE, &regs->MIISR))
+			break;
+	}
+
+}
+
+/**
+ *	velocity_mii_read	-	read MII data
+ *	@regs: velocity registers
+ *	@index: MII register index
+ *	@data: buffer for received data
+ *
+ *	Perform a single read of an MII 16bit register. Returns zero
+ *	on success or -ETIMEDOUT if the PHY did not respond.
+ */
+ 
+static int velocity_mii_read(struct mac_regs * regs, u8 index, u16 *data)
+{
+	u16 ww;
+
+	/*
+	 *	Disable MIICR_MAUTO, so that mii addr can be set normally
+	 */
+	safe_disable_mii_autopoll(regs);
+
+	writeb(index, &regs->MIIADR);
+
+	BYTE_REG_BITS_ON(MIICR_RCMD, &regs->MIICR);
+
+	for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
+		if (!(readb(&regs->MIICR) & MIICR_RCMD))
+			break;
+	}
+
+	*data = readw(&regs->MIIDATA);
+
+	enable_mii_autopoll(regs);
+	if (ww == W_MAX_TIMEOUT)
+		return -ETIMEDOUT;
+	return 0;
+}
+
+/**
+ *	velocity_mii_write	-	write MII data
+ *	@regs: velocity registers
+ *	@index: MII register index
+ *	@data: 16bit data for the MII register
+ *
+ *	Perform a single write to an MII 16bit register. Returns zero
+ *	on success or -ETIMEDOUT if the PHY did not respond.
+ */
+ 
+static int velocity_mii_write(struct mac_regs * regs, u8 mii_addr, u16 data)
+{
+	u16 ww;
+
+	/*
+	 *	Disable MIICR_MAUTO, so that mii addr can be set normally
+	 */
+	safe_disable_mii_autopoll(regs);
+
+	/* MII reg offset */
+	writeb(mii_addr, &regs->MIIADR);
+	/* set MII data */
+	writew(data, &regs->MIIDATA);
+
+	/* turn on MIICR_WCMD */
+	BYTE_REG_BITS_ON(MIICR_WCMD, &regs->MIICR);
+
+	/* W_MAX_TIMEOUT is the timeout period */
+	for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
+		udelay(5);
+		if (!(readb(&regs->MIICR) & MIICR_WCMD))
+			break;
+	}
+	enable_mii_autopoll(regs);
+
+	if (ww == W_MAX_TIMEOUT)
+		return -ETIMEDOUT;
+	return 0;
+}
+
+/**
+ *	velocity_get_opt_media_mode	-	get media selection
+ *	@vptr: velocity adapter
+ *
+ *	Get the media mode stored in EEPROM or module options and load
+ *	mii_status accordingly. The requested link state information
+ *	is also returned.
+ */
+ 
+static u32 velocity_get_opt_media_mode(struct velocity_info *vptr)
+{
+	u32 status = 0;
+
+	switch (vptr->options.spd_dpx) {
+	case SPD_DPX_AUTO:
+		status = VELOCITY_AUTONEG_ENABLE;
+		break;
+	case SPD_DPX_100_FULL:
+		status = VELOCITY_SPEED_100 | VELOCITY_DUPLEX_FULL;
+		break;
+	case SPD_DPX_10_FULL:
+		status = VELOCITY_SPEED_10 | VELOCITY_DUPLEX_FULL;
+		break;
+	case SPD_DPX_100_HALF:
+		status = VELOCITY_SPEED_100;
+		break;
+	case SPD_DPX_10_HALF:
+		status = VELOCITY_SPEED_10;
+		break;
+	}
+	vptr->mii_status = status;
+	return status;
+}
+
+/**
+ *	mii_set_auto_on		-	autonegotiate on
+ *	@vptr: velocity
+ *
+ *	Enable autonegotation on this interface
+ */
+ 
+static void mii_set_auto_on(struct velocity_info *vptr)
+{
+	if (MII_REG_BITS_IS_ON(BMCR_AUTO, MII_REG_BMCR, vptr->mac_regs))
+		MII_REG_BITS_ON(BMCR_REAUTO, MII_REG_BMCR, vptr->mac_regs);
+	else
+		MII_REG_BITS_ON(BMCR_AUTO, MII_REG_BMCR, vptr->mac_regs);
+}
+
+
+/*
+static void mii_set_auto_off(struct velocity_info * vptr)
+{
+    MII_REG_BITS_OFF(BMCR_AUTO, MII_REG_BMCR, vptr->mac_regs);
+}
+*/
+
+/**
+ *	set_mii_flow_control	-	flow control setup
+ *	@vptr: velocity interface
+ *
+ *	Set up the flow control on this interface according to
+ *	the supplied user/eeprom options.
+ */
+ 
+static void set_mii_flow_control(struct velocity_info *vptr)
+{
+	/*Enable or Disable PAUSE in ANAR */
+	switch (vptr->options.flow_cntl) {
+	case FLOW_CNTL_TX:
+		MII_REG_BITS_OFF(ANAR_PAUSE, MII_REG_ANAR, vptr->mac_regs);
+		MII_REG_BITS_ON(ANAR_ASMDIR, MII_REG_ANAR, vptr->mac_regs);
+		break;
+
+	case FLOW_CNTL_RX:
+		MII_REG_BITS_ON(ANAR_PAUSE, MII_REG_ANAR, vptr->mac_regs);
+		MII_REG_BITS_ON(ANAR_ASMDIR, MII_REG_ANAR, vptr->mac_regs);
+		break;
+
+	case FLOW_CNTL_TX_RX:
+		MII_REG_BITS_ON(ANAR_PAUSE, MII_REG_ANAR, vptr->mac_regs);
+		MII_REG_BITS_ON(ANAR_ASMDIR, MII_REG_ANAR, vptr->mac_regs);
+		break;
+
+	case FLOW_CNTL_DISABLE:
+		MII_REG_BITS_OFF(ANAR_PAUSE, MII_REG_ANAR, vptr->mac_regs);
+		MII_REG_BITS_OFF(ANAR_ASMDIR, MII_REG_ANAR, vptr->mac_regs);
+		break;
+	default:
+		break;
+	}
+}
+
+/**
+ *	velocity_set_media_mode		-	set media mode
+ *	@mii_status: old MII link state
+ *
+ *	Check the media link state and configure the flow control
+ *	PHY and also velocity hardware setup accordingly. In particular
+ *	we need to set up CD polling and frame bursting.
+ */
+ 
+static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status)
+{
+	u32 curr_status;
+	struct mac_regs * regs = vptr->mac_regs;
+
+	vptr->mii_status = mii_check_media_mode(vptr->mac_regs);
+	curr_status = vptr->mii_status & (~VELOCITY_LINK_FAIL);
+
+	/* Set mii link status */
+	set_mii_flow_control(vptr);
+
+	/*
+	   Check if new status is consisent with current status
+	   if (((mii_status & curr_status) & VELOCITY_AUTONEG_ENABLE)
+	   || (mii_status==curr_status)) {
+	   vptr->mii_status=mii_check_media_mode(vptr->mac_regs);
+	   vptr->mii_status=check_connection_type(vptr->mac_regs);
+	   VELOCITY_PRT(MSG_LEVEL_INFO, "Velocity link no change\n");
+	   return 0;
+	   }
+	 */
+
+	if (PHYID_GET_PHY_ID(vptr->phy_id) == PHYID_CICADA_CS8201) {
+		MII_REG_BITS_ON(AUXCR_MDPPS, MII_REG_AUXCR, vptr->mac_regs);
+	}
+
+	/*
+	 *	If connection type is AUTO
+	 */
+	if (mii_status & VELOCITY_AUTONEG_ENABLE) {
+		VELOCITY_PRT(MSG_LEVEL_INFO, "Velocity is AUTO mode\n");
+		/* clear force MAC mode bit */
+		BYTE_REG_BITS_OFF(CHIPGCR_FCMODE, &regs->CHIPGCR);
+		/* set duplex mode of MAC according to duplex mode of MII */
+		MII_REG_BITS_ON(ANAR_TXFD | ANAR_TX | ANAR_10FD | ANAR_10, MII_REG_ANAR, vptr->mac_regs);
+		MII_REG_BITS_ON(G1000CR_1000FD | G1000CR_1000, MII_REG_G1000CR, vptr->mac_regs);
+		MII_REG_BITS_ON(BMCR_SPEED1G, MII_REG_BMCR, vptr->mac_regs);
+
+		/* enable AUTO-NEGO mode */
+		mii_set_auto_on(vptr);
+	} else {
+		u16 ANAR;
+		u8 CHIPGCR;
+
+		/*
+		 * 1. if it's 3119, disable frame bursting in halfduplex mode
+		 *    and enable it in fullduplex mode
+		 * 2. set correct MII/GMII and half/full duplex mode in CHIPGCR
+		 * 3. only enable CD heart beat counter in 10HD mode
+		 */
+
+		/* set force MAC mode bit */
+		BYTE_REG_BITS_ON(CHIPGCR_FCMODE, &regs->CHIPGCR);
+
+		CHIPGCR = readb(&regs->CHIPGCR);
+		CHIPGCR &= ~CHIPGCR_FCGMII;
+
+		if (mii_status & VELOCITY_DUPLEX_FULL) {
+			CHIPGCR |= CHIPGCR_FCFDX;
+			writeb(CHIPGCR, &regs->CHIPGCR);
+			VELOCITY_PRT(MSG_LEVEL_INFO, "set Velocity to forced full mode\n");
+			if (vptr->rev_id < REV_ID_VT3216_A0)
+				BYTE_REG_BITS_OFF(TCR_TB2BDIS, &regs->TCR);
+		} else {
+			CHIPGCR &= ~CHIPGCR_FCFDX;
+			VELOCITY_PRT(MSG_LEVEL_INFO, "set Velocity to forced half mode\n");
+			writeb(CHIPGCR, &regs->CHIPGCR);
+			if (vptr->rev_id < REV_ID_VT3216_A0)
+				BYTE_REG_BITS_ON(TCR_TB2BDIS, &regs->TCR);
+		}
+
+		MII_REG_BITS_OFF(G1000CR_1000FD | G1000CR_1000, MII_REG_G1000CR, vptr->mac_regs);
+
+		if (!(mii_status & VELOCITY_DUPLEX_FULL) && (mii_status & VELOCITY_SPEED_10)) {
+			BYTE_REG_BITS_OFF(TESTCFG_HBDIS, &regs->TESTCFG);
+		} else {
+			BYTE_REG_BITS_ON(TESTCFG_HBDIS, &regs->TESTCFG);
+		}
+		/* MII_REG_BITS_OFF(BMCR_SPEED1G, MII_REG_BMCR, vptr->mac_regs); */
+		velocity_mii_read(vptr->mac_regs, MII_REG_ANAR, &ANAR);
+		ANAR &= (~(ANAR_TXFD | ANAR_TX | ANAR_10FD | ANAR_10));
+		if (mii_status & VELOCITY_SPEED_100) {
+			if (mii_status & VELOCITY_DUPLEX_FULL)
+				ANAR |= ANAR_TXFD;
+			else
+				ANAR |= ANAR_TX;
+		} else {
+			if (mii_status & VELOCITY_DUPLEX_FULL)
+				ANAR |= ANAR_10FD;
+			else
+				ANAR |= ANAR_10;
+		}
+		velocity_mii_write(vptr->mac_regs, MII_REG_ANAR, ANAR);
+		/* enable AUTO-NEGO mode */
+		mii_set_auto_on(vptr);
+		/* MII_REG_BITS_ON(BMCR_AUTO, MII_REG_BMCR, vptr->mac_regs); */
+	}
+	/* vptr->mii_status=mii_check_media_mode(vptr->mac_regs); */
+	/* vptr->mii_status=check_connection_type(vptr->mac_regs); */
+	return VELOCITY_LINK_CHANGE;
+}
+
+/**
+ *	mii_check_media_mode	-	check media state
+ *	@regs: velocity registers
+ *
+ *	Check the current MII status and determine the link status
+ *	accordingly
+ */
+ 
+static u32 mii_check_media_mode(struct mac_regs * regs)
+{
+	u32 status = 0;
+	u16 ANAR;
+
+	if (!MII_REG_BITS_IS_ON(BMSR_LNK, MII_REG_BMSR, regs))
+		status |= VELOCITY_LINK_FAIL;
+
+	if (MII_REG_BITS_IS_ON(G1000CR_1000FD, MII_REG_G1000CR, regs))
+		status |= VELOCITY_SPEED_1000 | VELOCITY_DUPLEX_FULL;
+	else if (MII_REG_BITS_IS_ON(G1000CR_1000, MII_REG_G1000CR, regs))
+		status |= (VELOCITY_SPEED_1000);
+	else {
+		velocity_mii_read(regs, MII_REG_ANAR, &ANAR);
+		if (ANAR & ANAR_TXFD)
+			status |= (VELOCITY_SPEED_100 | VELOCITY_DUPLEX_FULL);
+		else if (ANAR & ANAR_TX)
+			status |= VELOCITY_SPEED_100;
+		else if (ANAR & ANAR_10FD)
+			status |= (VELOCITY_SPEED_10 | VELOCITY_DUPLEX_FULL);
+		else
+			status |= (VELOCITY_SPEED_10);
+	}
+
+	if (MII_REG_BITS_IS_ON(BMCR_AUTO, MII_REG_BMCR, regs)) {
+		velocity_mii_read(regs, MII_REG_ANAR, &ANAR);
+		if ((ANAR & (ANAR_TXFD | ANAR_TX | ANAR_10FD | ANAR_10))
+		    == (ANAR_TXFD | ANAR_TX | ANAR_10FD | ANAR_10)) {
+			if (MII_REG_BITS_IS_ON(G1000CR_1000 | G1000CR_1000FD, MII_REG_G1000CR, regs))
+				status |= VELOCITY_AUTONEG_ENABLE;
+		}
+	}
+
+	return status;
+}
+
+static u32 check_connection_type(struct mac_regs * regs)
+{
+	u32 status = 0;
+	u8 PHYSR0;
+	u16 ANAR;
+	PHYSR0 = readb(&regs->PHYSR0);
+
+	/*
+	   if (!(PHYSR0 & PHYSR0_LINKGD))
+	   status|=VELOCITY_LINK_FAIL;
+	 */
+
+	if (PHYSR0 & PHYSR0_FDPX)
+		status |= VELOCITY_DUPLEX_FULL;
+
+	if (PHYSR0 & PHYSR0_SPDG)
+		status |= VELOCITY_SPEED_1000;
+	if (PHYSR0 & PHYSR0_SPD10)
+		status |= VELOCITY_SPEED_10;
+	else
+		status |= VELOCITY_SPEED_100;
+
+	if (MII_REG_BITS_IS_ON(BMCR_AUTO, MII_REG_BMCR, regs)) {
+		velocity_mii_read(regs, MII_REG_ANAR, &ANAR);
+		if ((ANAR & (ANAR_TXFD | ANAR_TX | ANAR_10FD | ANAR_10))
+		    == (ANAR_TXFD | ANAR_TX | ANAR_10FD | ANAR_10)) {
+			if (MII_REG_BITS_IS_ON(G1000CR_1000 | G1000CR_1000FD, MII_REG_G1000CR, regs))
+				status |= VELOCITY_AUTONEG_ENABLE;
+		}
+	}
+
+	return status;
+}
+
+/**
+ *	enable_flow_control_ability	-	flow control
+ *	@vptr: veloity to configure
+ *
+ *	Set up flow control according to the flow control options
+ *	determined by the eeprom/configuration.
+ */
+
+static void enable_flow_control_ability(struct velocity_info *vptr)
+{
+
+	struct mac_regs * regs = vptr->mac_regs;
+
+	switch (vptr->options.flow_cntl) {
+
+	case FLOW_CNTL_DEFAULT:
+		if (BYTE_REG_BITS_IS_ON(PHYSR0_RXFLC, &regs->PHYSR0))
+			writel(CR0_FDXRFCEN, &regs->CR0Set);
+		else
+			writel(CR0_FDXRFCEN, &regs->CR0Clr);
+
+		if (BYTE_REG_BITS_IS_ON(PHYSR0_TXFLC, &regs->PHYSR0))
+			writel(CR0_FDXTFCEN, &regs->CR0Set);
+		else
+			writel(CR0_FDXTFCEN, &regs->CR0Clr);
+		break;
+
+	case FLOW_CNTL_TX:
+		writel(CR0_FDXTFCEN, &regs->CR0Set);
+		writel(CR0_FDXRFCEN, &regs->CR0Clr);
+		break;
+
+	case FLOW_CNTL_RX:
+		writel(CR0_FDXRFCEN, &regs->CR0Set);
+		writel(CR0_FDXTFCEN, &regs->CR0Clr);
+		break;
+
+	case FLOW_CNTL_TX_RX:
+		writel(CR0_FDXTFCEN, &regs->CR0Set);
+		writel(CR0_FDXRFCEN, &regs->CR0Set);
+		break;
+
+	case FLOW_CNTL_DISABLE:
+		writel(CR0_FDXRFCEN, &regs->CR0Clr);
+		writel(CR0_FDXTFCEN, &regs->CR0Clr);
+		break;
+
+	default:
+		break;
+	}
+
+}
+
+
+/**
+ *	velocity_ethtool_up	-	pre hook for ethtool
+ *	@dev: network device
+ *
+ *	Called before an ethtool operation. We need to make sure the
+ *	chip is out of D3 state before we poke at it.
+ */
+ 
+static int velocity_ethtool_up(struct net_device *dev)
+{
+	struct velocity_info *vptr = dev->priv;
+	if(!netif_running(dev))
+		pci_set_power_state(vptr->pdev, 0);
+	return 0;
+}	
+
+/**
+ *	velocity_ethtool_down	-	post hook for ethtool
+ *	@dev: network device
+ *
+ *	Called after an ethtool operation. Restore the chip back to D3
+ *	state if it isn't running.
+ */
+ 
+static void velocity_ethtool_down(struct net_device *dev)
+{
+	struct velocity_info *vptr = dev->priv;
+	if(!netif_running(dev))
+		pci_set_power_state(vptr->pdev, 3);
+}
+
+static int velocity_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct velocity_info *vptr = dev->priv;
+	struct mac_regs * regs = vptr->mac_regs;
+	u32 status;
+	status = check_connection_type(vptr->mac_regs);
+
+	cmd->supported = SUPPORTED_TP | SUPPORTED_Autoneg | SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full;
+	if (status & VELOCITY_SPEED_100)
+		cmd->speed = SPEED_100;
+	else
+		cmd->speed = SPEED_10;
+	cmd->autoneg = (status & VELOCITY_AUTONEG_ENABLE) ? AUTONEG_ENABLE : AUTONEG_DISABLE;
+	cmd->port = PORT_TP;
+	cmd->transceiver = XCVR_INTERNAL;
+	cmd->phy_address = readb(&regs->MIIADR) & 0x1F;
+
+	if (status & VELOCITY_DUPLEX_FULL)
+		cmd->duplex = DUPLEX_FULL;
+	else
+		cmd->duplex = DUPLEX_HALF;
+		
+	return 0;
+}
+
+static int velocity_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct velocity_info *vptr = dev->priv;
+	u32 curr_status;
+	u32 new_status = 0;
+	int ret = 0;
+	
+	curr_status = check_connection_type(vptr->mac_regs);
+	curr_status &= (~VELOCITY_LINK_FAIL);
+
+	new_status |= ((cmd->autoneg) ? VELOCITY_AUTONEG_ENABLE : 0);
+	new_status |= ((cmd->speed == SPEED_100) ? VELOCITY_SPEED_100 : 0);
+	new_status |= ((cmd->speed == SPEED_10) ? VELOCITY_SPEED_10 : 0);
+	new_status |= ((cmd->duplex == DUPLEX_FULL) ? VELOCITY_DUPLEX_FULL : 0);
+
+	if ((new_status & VELOCITY_AUTONEG_ENABLE) && (new_status != (curr_status | VELOCITY_AUTONEG_ENABLE)))
+		ret = -EINVAL;
+	else
+		velocity_set_media_mode(vptr, new_status);
+
+	return ret;
+}
+
+static u32 velocity_get_link(struct net_device *dev)
+{
+	struct velocity_info *vptr = dev->priv;
+	struct mac_regs * regs = vptr->mac_regs;
+	return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, &regs->PHYSR0)  ? 0 : 1;
+}
+
+static void velocity_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
+{
+	struct velocity_info *vptr = dev->priv;
+	strcpy(info->driver, VELOCITY_NAME);
+	strcpy(info->version, VELOCITY_VERSION);
+	strcpy(info->bus_info, vptr->pdev->slot_name);
+}
+
+static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
+{
+	struct velocity_info *vptr = dev->priv;
+	wol->supported = WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_ARP;
+	wol->wolopts |= WAKE_MAGIC;
+	/*
+	   if (vptr->wol_opts & VELOCITY_WOL_PHY)
+		   wol.wolopts|=WAKE_PHY;
+			 */
+	if (vptr->wol_opts & VELOCITY_WOL_UCAST)
+		wol->wolopts |= WAKE_UCAST;
+	if (vptr->wol_opts & VELOCITY_WOL_ARP)
+		wol->wolopts |= WAKE_ARP;
+	memcpy(&wol->sopass, vptr->wol_passwd, 6);
+}
+
+static int velocity_ethtool_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
+{
+	struct velocity_info *vptr = dev->priv;
+
+	if (!(wol->wolopts & (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_ARP)))
+		return -EFAULT;
+	vptr->wol_opts = VELOCITY_WOL_MAGIC;
+
+	/*
+	   if (wol.wolopts & WAKE_PHY) {
+	   vptr->wol_opts|=VELOCITY_WOL_PHY;
+	   vptr->flags |=VELOCITY_FLAGS_WOL_ENABLED;
+	   }
+	 */
+
+	if (wol->wolopts & WAKE_MAGIC) {
+		vptr->wol_opts |= VELOCITY_WOL_MAGIC;
+		vptr->flags |= VELOCITY_FLAGS_WOL_ENABLED;
+	}
+	if (wol->wolopts & WAKE_UCAST) {
+		vptr->wol_opts |= VELOCITY_WOL_UCAST;
+		vptr->flags |= VELOCITY_FLAGS_WOL_ENABLED;
+	}
+	if (wol->wolopts & WAKE_ARP) {
+		vptr->wol_opts |= VELOCITY_WOL_ARP;
+		vptr->flags |= VELOCITY_FLAGS_WOL_ENABLED;
+	}
+	memcpy(vptr->wol_passwd, wol->sopass, 6);
+	return 0;
+}
+
+static u32 velocity_get_msglevel(struct net_device *dev)
+{
+	return msglevel;
+}
+
+static void velocity_set_msglevel(struct net_device *dev, u32 value)
+{
+	 msglevel = value;
+}
+
+static struct ethtool_ops velocity_ethtool_ops = {
+	.get_settings	=	velocity_get_settings,
+	.set_settings	=	velocity_set_settings,
+	.get_drvinfo	=	velocity_get_drvinfo,
+	.get_wol	=	velocity_ethtool_get_wol,
+	.set_wol	=	velocity_ethtool_set_wol,
+	.get_msglevel	=	velocity_get_msglevel,
+	.set_msglevel	=	velocity_set_msglevel,
+	.get_link	=	velocity_get_link,
+	.begin		=	velocity_ethtool_up,
+	.complete	=	velocity_ethtool_down
+};
+
+/**
+ *	velocity_mii_ioctl		-	MII ioctl handler
+ *	@dev: network device
+ *	@ifr: the ifreq block for the ioctl
+ *	@cmd: the command
+ *
+ *	Process MII requests made via ioctl from the network layer. These
+ *	are used by tools like kudzu to interrogate the link state of the
+ *	hardware
+ */
+ 
+static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+{
+	struct velocity_info *vptr = dev->priv;
+	struct mac_regs * regs = vptr->mac_regs;
+	unsigned long flags;
+	struct mii_ioctl_data *miidata = (struct mii_ioctl_data *) &(ifr->ifr_data);
+	int err;
+	
+	switch (cmd) {
+	case SIOCGMIIPHY:
+		miidata->phy_id = readb(&regs->MIIADR) & 0x1f;
+		break;
+	case SIOCGMIIREG:
+		if (!capable(CAP_NET_ADMIN))
+			return -EPERM;
+		if(velocity_mii_read(vptr->mac_regs, miidata->reg_num & 0x1f, &(miidata->val_out)) < 0)
+			return -ETIMEDOUT;
+		break;
+	case SIOCSMIIREG:
+		if (!capable(CAP_NET_ADMIN))
+			return -EPERM;
+		spin_lock_irqsave(&vptr->lock, flags);
+		err = velocity_mii_write(vptr->mac_regs, miidata->reg_num & 0x1f, miidata->val_in);
+		spin_unlock_irqrestore(&vptr->lock, flags);
+		check_connection_type(vptr->mac_regs);
+		if(err)
+			return err;
+		break;
+	default:
+		return -EOPNOTSUPP;
+	}
+	return 0;
+}
+
+#ifdef CONFIG_PM
+
+/**
+ *	velocity_save_context	-	save registers
+ *	@vptr: velocity 
+ *	@context: buffer for stored context
+ *
+ *	Retrieve the current configuration from the velocity hardware
+ *	and stash it in the context structure, for use by the context
+ *	restore functions. This allows us to save things we need across
+ *	power down states
+ */
+ 
+static void velocity_save_context(struct velocity_info *vptr, struct velocity_context * context)
+{
+	struct mac_regs * regs = vptr->mac_regs;
+	u16 i;
+	u8 *ptr = (u8 *)regs;
+
+	for (i = MAC_REG_PAR; i < MAC_REG_CR0_CLR; i += 4)
+		*((u32 *) (context->mac_reg + i)) = readl(ptr + i);
+
+	for (i = MAC_REG_MAR; i < MAC_REG_TDCSR_CLR; i += 4)
+		*((u32 *) (context->mac_reg + i)) = readl(ptr + i);
+
+	for (i = MAC_REG_RDBASE_LO; i < MAC_REG_FIFO_TEST0; i += 4)
+		*((u32 *) (context->mac_reg + i)) = readl(ptr + i);
+
+}
+
+/**
+ *	velocity_restore_context	-	restore registers
+ *	@vptr: velocity 
+ *	@context: buffer for stored context
+ *
+ *	Reload the register configuration from the velocity context 
+ *	created by velocity_save_context.
+ */
+ 
+static void velocity_restore_context(struct velocity_info *vptr, struct velocity_context *context)
+{
+	struct mac_regs * regs = vptr->mac_regs;
+	int i;
+	u8 *ptr = (u8 *)regs;
+
+	for (i = MAC_REG_PAR; i < MAC_REG_CR0_SET; i += 4) {
+		writel(*((u32 *) (context->mac_reg + i)), ptr + i);
+	}
+
+	/* Just skip cr0 */
+	for (i = MAC_REG_CR1_SET; i < MAC_REG_CR0_CLR; i++) {
+		/* Clear */
+		writeb(~(*((u8 *) (context->mac_reg + i))), ptr + i + 4);
+		/* Set */
+		writeb(*((u8 *) (context->mac_reg + i)), ptr + i);
+	}
+
+	for (i = MAC_REG_MAR; i < MAC_REG_IMR; i += 4) {
+		writel(*((u32 *) (context->mac_reg + i)), ptr + i);
+	}
+
+	for (i = MAC_REG_RDBASE_LO; i < MAC_REG_FIFO_TEST0; i += 4) {
+		writel(*((u32 *) (context->mac_reg + i)), ptr + i);
+	}
+
+	for (i = MAC_REG_TDCSR_SET; i <= MAC_REG_RDCSR_SET; i++) {
+		writeb(*((u8 *) (context->mac_reg + i)), ptr + i);
+	}
+
+}
+
+/*
+ * Purpose: Functions to set WOL.
+ */
+
+const static unsigned short crc16_tab[256] = {
+	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
+	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
+	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
+	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
+	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
+	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
+	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
+	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
+	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
+	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
+	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
+	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
+	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
+	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
+	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
+	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
+	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
+	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
+	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
+	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
+	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
+	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
+	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
+	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
+	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
+	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
+	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
+	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
+	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
+	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
+	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
+	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
+};
+
+/**
+ *	ether_crc16	-	compute ethernet CRC
+ *	@len: buffer length
+ *	@cp: buffer
+ *	@crc16: initial CRC
+ *
+ *	Compute a CRC value for a block of data.
+ *	FIXME: can we use generic functions ?
+ */
+
+static u16 ether_crc16(int len, u8 * cp, u16 crc16)
+{
+	while (len--)
+		crc16 = (crc16 >> 8) ^ crc16_tab[(crc16 ^ *cp++) & 0xff];
+	return (crc16);
+}
+
+/**
+ *	bit_reverse		-	16bit reverse
+ *	@data: 16bit data t reverse
+ *
+ *	Reverse the order of a 16bit value and return the reversed bits
+ */
+
+static u16 bit_reverse(u16 data)
+{
+	u32 new = 0x00000000;
+	int ii;
+
+
+	for (ii = 0; ii < 16; ii++) {
+		new |= ((u32) (data & 1) << (31 - ii));
+		data >>= 1;
+	}
+
+	return (u16) (new >> 16);
+}
+
+/**
+ *	wol_calc_crc		-	WOL CRC
+ *	@pattern: data pattern
+ *	@mask_pattern: mask
+ *
+ *	Compute the wake on lan crc hashes for the packet header
+ *	we are interested in.
+ */
+
+u16 wol_calc_crc(int size, u8 * pattern, u8 *mask_pattern)
+{
+	u16 crc = 0xFFFF;
+	u8 mask;
+	int i, j;
+
+	for (i = 0; i < size; i++) {
+		mask = mask_pattern[i];
+
+		/* Skip this loop if the mask equals to zero */
+		if (mask == 0x00)
+			continue;
+
+		for (j = 0; j < 8; j++) {
+			if ((mask & 0x01) == 0) {
+				mask >>= 1;
+				continue;
+			}
+			mask >>= 1;
+			crc = ether_crc16(1, &(pattern[i * 8 + j]), crc);
+		}
+	}
+	/*	Finally, invert the result once to get the correct data */
+	crc = ~crc;
+	return bit_reverse(crc);
+}
+
+/**
+ *	velocity_set_wol	-	set up for wake on lan
+ *	@vptr: velocity to set WOL status on
+ *
+ *	Set a card up for wake on lan either by unicast or by
+ *	ARP packet.
+ *
+ *	FIXME: check static buffer is safe here
+ */
+
+static int velocity_set_wol(struct velocity_info *vptr)
+{
+	struct mac_regs * regs = vptr->mac_regs;
+	static u8 buf[256];
+	int i;
+
+	static u32 mask_pattern[2][4] = {
+		{0x00203000, 0x000003C0, 0x00000000, 0x0000000}, /* ARP */
+		{0xfffff000, 0xffffffff, 0xffffffff, 0x000ffff}	 /* Magic Packet */
+	};
+
+	writew(0xFFFF, &regs->WOLCRClr);
+	writeb(WOLCFG_SAB | WOLCFG_SAM, &regs->WOLCFGSet);
+	writew(WOLCR_MAGIC_EN, &regs->WOLCRSet);
+
+	/*
+	   if (vptr->wol_opts & VELOCITY_WOL_PHY)
+	   writew((WOLCR_LINKON_EN|WOLCR_LINKOFF_EN), &regs->WOLCRSet);
+	 */
+
+	if (vptr->wol_opts & VELOCITY_WOL_UCAST) {
+		writew(WOLCR_UNICAST_EN, &regs->WOLCRSet);
+	}
+
+	if (vptr->wol_opts & VELOCITY_WOL_ARP) {
+		struct arp_packet *arp = (struct arp_packet *) buf;
+		u16 crc;
+		memset(buf, 0, sizeof(struct arp_packet) + 7);
+
+		for (i = 0; i < 4; i++)
+			writel(mask_pattern[0][i], &regs->ByteMask[0][i]);
+
+		arp->type = htons(ETH_P_ARP);
+		arp->ar_op = htons(1);
+
+		memcpy(arp->ar_tip, vptr->ip_addr, 4);
+
+		crc = wol_calc_crc((sizeof(struct arp_packet) + 7) / 8, buf,
+				(u8 *) & mask_pattern[0][0]);
+
+		writew(crc, &regs->PatternCRC[0]);
+		writew(WOLCR_ARP_EN, &regs->WOLCRSet);
+	}
+
+	BYTE_REG_BITS_ON(PWCFG_WOLTYPE, &regs->PWCFGSet);
+	BYTE_REG_BITS_ON(PWCFG_LEGACY_WOLEN, &regs->PWCFGSet);
+
+	writew(0x0FFF, &regs->WOLSRClr);
+
+	if (vptr->mii_status & VELOCITY_AUTONEG_ENABLE) {
+		if (PHYID_GET_PHY_ID(vptr->phy_id) == PHYID_CICADA_CS8201)
+			MII_REG_BITS_ON(AUXCR_MDPPS, MII_REG_AUXCR, vptr->mac_regs);
+
+		MII_REG_BITS_OFF(G1000CR_1000FD | G1000CR_1000, MII_REG_G1000CR, vptr->mac_regs);
+	}
+
+	if (vptr->mii_status & VELOCITY_SPEED_1000)
+		MII_REG_BITS_ON(BMCR_REAUTO, MII_REG_BMCR, vptr->mac_regs);
+
+	BYTE_REG_BITS_ON(CHIPGCR_FCMODE, &regs->CHIPGCR);
+
+	{
+		u8 GCR;
+		GCR = readb(&regs->CHIPGCR);
+		GCR = (GCR & ~CHIPGCR_FCGMII) | CHIPGCR_FCFDX;
+		writeb(GCR, &regs->CHIPGCR);
+	}
+
+	BYTE_REG_BITS_OFF(ISR_PWEI, &regs->ISR);
+	/* Turn on SWPTAG just before entering power mode */
+	BYTE_REG_BITS_ON(STICKHW_SWPTAG, &regs->STICKHW);
+	/* Go to bed ..... */
+	BYTE_REG_BITS_ON((STICKHW_DS1 | STICKHW_DS0), &regs->STICKHW);
+
+	return 0;
+}
+
+static int velocity_suspend(struct pci_dev *pdev, u32 state)
+{
+	struct velocity_info *vptr = pci_get_drvdata(pdev);
+	unsigned long flags;
+
+	if(!netif_running(vptr->dev))
+		return 0;
+
+	netif_device_detach(vptr->dev);
+
+	spin_lock_irqsave(&vptr->lock, flags);
+	pci_save_state(pdev, vptr->pci_state);
+#ifdef ETHTOOL_GWOL
+	if (vptr->flags & VELOCITY_FLAGS_WOL_ENABLED) {
+		velocity_get_ip(vptr);
+		velocity_save_context(vptr, &vptr->context);
+		velocity_shutdown(vptr);
+		velocity_set_wol(vptr);
+		pci_enable_wake(pdev, 3, 1);
+		pci_set_power_state(pdev, 3);
+	} else {
+		velocity_save_context(vptr, &vptr->context);
+		velocity_shutdown(vptr);
+		pci_disable_device(pdev);
+		pci_set_power_state(pdev, state);
+	}
+#else
+	pci_set_power_state(pdev, state);
+#endif
+	spin_unlock_irqrestore(&vptr->lock, flags);
+	return 0;
+}
+
+static int velocity_resume(struct pci_dev *pdev)
+{
+	struct velocity_info *vptr = pci_get_drvdata(pdev);
+	unsigned long flags;
+	int i;
+
+	if(!netif_running(vptr->dev))
+		return 0;
+
+	pci_set_power_state(pdev, 0);
+	pci_enable_wake(pdev, 0, 0);
+	pci_restore_state(pdev, vptr->pci_state);
+
+	mac_wol_reset(vptr->mac_regs);
+
+	spin_lock_irqsave(&vptr->lock, flags);
+	velocity_restore_context(vptr, &vptr->context);
+	velocity_init_registers(vptr, VELOCITY_INIT_WOL);
+	mac_disable_int(vptr->mac_regs);
+
+	velocity_tx_srv(vptr, 0);
+
+	for (i = 0; i < vptr->num_txq; i++) {
+		if (vptr->td_used[i]) {
+			mac_tx_queue_wake(vptr->mac_regs, i);
+		}
+	}
+
+	mac_enable_int(vptr->mac_regs);
+	spin_unlock_irqrestore(&vptr->lock, flags);
+	netif_device_attach(vptr->dev);
+
+	return 0;
+}
+
+static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr)
+{
+	struct in_ifaddr *ifa = (struct in_ifaddr *) ptr;
+	struct net_device *dev;
+	struct velocity_info *vptr;
+
+	if (ifa) {
+		dev = ifa->ifa_dev->dev;
+		vptr = dev->priv;
+		velocity_get_ip(vptr);
+	}
+	return NOTIFY_DONE;
+}
+#endif
--- diff/drivers/net/via-velocity.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/net/via-velocity.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,1885 @@
+/*
+ * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
+ * All rights reserved.
+ *
+ * This software may be redistributed and/or modified under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or
+ * 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.
+ *
+ * File: via-velocity.h
+ *
+ * Purpose: Header file to define driver's private structures.
+ *
+ * Author: Chuang Liang-Shing, AJ Jiang
+ *
+ * Date: Jan 24, 2003
+ */
+
+
+#ifndef VELOCITY_H
+#define VELOCITY_H
+
+#define VELOCITY_TX_CSUM_SUPPORT
+
+#define VELOCITY_NAME          "via-velocity"
+#define VELOCITY_FULL_DRV_NAM  "VIA Networking Velocity Family Gigabit Ethernet Adapter Driver"
+#define VELOCITY_VERSION       "1.13"
+
+#define PKT_BUF_SZ          1540
+
+#define MAX_UNITS           8
+#define OPTION_DEFAULT      { [0 ... MAX_UNITS-1] = -1}
+
+#define REV_ID_VT6110       (0)
+
+#define BYTE_REG_BITS_ON(x,p)       do { writeb(readb((p))|(x),(p));} while (0)
+#define WORD_REG_BITS_ON(x,p)       do { writew(readw((p))|(x),(p));} while (0)
+#define DWORD_REG_BITS_ON(x,p)      do { writel(readl((p))|(x),(p));} while (0)
+
+#define BYTE_REG_BITS_IS_ON(x,p)    (readb((p)) & (x))
+#define WORD_REG_BITS_IS_ON(x,p)    (readw((p)) & (x))
+#define DWORD_REG_BITS_IS_ON(x,p)   (readl((p)) & (x))
+
+#define BYTE_REG_BITS_OFF(x,p)      do { writeb(readb((p)) & (~(x)),(p));} while (0)
+#define WORD_REG_BITS_OFF(x,p)      do { writew(readw((p)) & (~(x)),(p));} while (0)
+#define DWORD_REG_BITS_OFF(x,p)     do { writel(readl((p)) & (~(x)),(p));} while (0)
+
+#define BYTE_REG_BITS_SET(x,m,p)    do { writeb( (readb((p)) & (~(m))) |(x),(p));} while (0)
+#define WORD_REG_BITS_SET(x,m,p)    do { writew( (readw((p)) & (~(m))) |(x),(p));} while (0)
+#define DWORD_REG_BITS_SET(x,m,p)   do { writel( (readl((p)) & (~(m)))|(x),(p));}  while (0)
+
+#define VAR_USED(p)     do {(p)=(p);} while (0)
+
+/*
+ * Purpose: Structures for MAX RX/TX descriptors.
+ */
+
+
+#define B_OWNED_BY_CHIP     1
+#define B_OWNED_BY_HOST     0
+
+/*
+ * Bits in the RSR0 register
+ */
+
+#define RSR_DETAG          0x0080
+#define RSR_SNTAG          0x0040
+#define RSR_RXER           0x0020
+#define RSR_RL             0x0010
+#define RSR_CE             0x0008
+#define RSR_FAE            0x0004
+#define RSR_CRC            0x0002
+#define RSR_VIDM           0x0001
+
+/*
+ * Bits in the RSR1 register
+ */
+
+#define RSR_RXOK           0x8000	// rx OK
+#define RSR_PFT            0x4000	// Perfect filtering address match
+#define RSR_MAR            0x2000	// MAC accept multicast address packet
+#define RSR_BAR            0x1000	// MAC accept broadcast address packet
+#define RSR_PHY            0x0800	// MAC accept physical address packet
+#define RSR_VTAG           0x0400	// 802.1p/1q tagging packet indicator
+#define RSR_STP            0x0200	// start of packet
+#define RSR_EDP            0x0100	// end of packet
+
+/*
+ * Bits in the RSR1 register
+ */
+
+#define RSR1_RXOK           0x80	// rx OK
+#define RSR1_PFT            0x40	// Perfect filtering address match
+#define RSR1_MAR            0x20	// MAC accept multicast address packet
+#define RSR1_BAR            0x10	// MAC accept broadcast address packet
+#define RSR1_PHY            0x08	// MAC accept physical address packet
+#define RSR1_VTAG           0x04	// 802.1p/1q tagging packet indicator
+#define RSR1_STP            0x02	// start of packet
+#define RSR1_EDP            0x01	// end of packet
+
+/*
+ * Bits in the CSM register
+ */
+
+#define CSM_IPOK            0x40	//IP Checkusm validatiaon ok
+#define CSM_TUPOK           0x20	//TCP/UDP Checkusm validatiaon ok
+#define CSM_FRAG            0x10	//Fragment IP datagram
+#define CSM_IPKT            0x04	//Received an IP packet
+#define CSM_TCPKT           0x02	//Received a TCP packet
+#define CSM_UDPKT           0x01	//Received a UDP packet
+
+/*
+ * Bits in the TSR0 register
+ */
+
+#define TSR0_ABT            0x0080	// Tx abort because of excessive collision
+#define TSR0_OWT            0x0040	// Jumbo frame Tx abort
+#define TSR0_OWC            0x0020	// Out of window collision
+#define TSR0_COLS           0x0010	// experience collision in this transmit event
+#define TSR0_NCR3           0x0008	// collision retry counter[3]
+#define TSR0_NCR2           0x0004	// collision retry counter[2]
+#define TSR0_NCR1           0x0002	// collision retry counter[1]
+#define TSR0_NCR0           0x0001	// collision retry counter[0]
+#define TSR0_TERR           0x8000	//
+#define TSR0_FDX            0x4000	// current transaction is serviced by full duplex mode
+#define TSR0_GMII           0x2000	// current transaction is serviced by GMII mode
+#define TSR0_LNKFL          0x1000	// packet serviced during link down
+#define TSR0_SHDN           0x0400	// shutdown case
+#define TSR0_CRS            0x0200	// carrier sense lost
+#define TSR0_CDH            0x0100	// AQE test fail (CD heartbeat)
+
+/*
+ * Bits in the TSR1 register
+ */
+
+#define TSR1_TERR           0x80	//
+#define TSR1_FDX            0x40	// current transaction is serviced by full duplex mode
+#define TSR1_GMII           0x20	// current transaction is serviced by GMII mode
+#define TSR1_LNKFL          0x10	// packet serviced during link down
+#define TSR1_SHDN           0x04	// shutdown case
+#define TSR1_CRS            0x02	// carrier sense lost
+#define TSR1_CDH            0x01	// AQE test fail (CD heartbeat)
+
+//
+// Bits in the TCR0 register
+//
+#define TCR0_TIC            0x80	// assert interrupt immediately while descriptor has been send complete
+#define TCR0_PIC            0x40	// priority interrupt request, INA# is issued over adaptive interrupt scheme
+#define TCR0_VETAG          0x20	// enable VLAN tag
+#define TCR0_IPCK           0x10	// request IP  checksum calculation.
+#define TCR0_UDPCK          0x08	// request UDP checksum calculation.
+#define TCR0_TCPCK          0x04	// request TCP checksum calculation.
+#define TCR0_JMBO           0x02	// indicate a jumbo packet in GMAC side
+#define TCR0_CRC            0x01	// disable CRC generation
+
+#define TCPLS_NORMAL        3
+#define TCPLS_START         2
+#define TCPLS_END           1
+#define TCPLS_MED           0
+
+
+// max transmit or receive buffer size
+#define CB_RX_BUF_SIZE     2048UL	// max buffer size
+					// NOTE: must be multiple of 4
+
+#define CB_MAX_RD_NUM       512	// MAX # of RD
+#define CB_MAX_TD_NUM       256	// MAX # of TD
+
+#define CB_INIT_RD_NUM_3119 128	// init # of RD, for setup VT3119
+#define CB_INIT_TD_NUM_3119 64	// init # of TD, for setup VT3119
+
+#define CB_INIT_RD_NUM      128	// init # of RD, for setup default
+#define CB_INIT_TD_NUM      64	// init # of TD, for setup default
+
+// for 3119
+#define CB_TD_RING_NUM      4	// # of TD rings.
+#define CB_MAX_SEG_PER_PKT  7	// max data seg per packet (Tx)
+
+
+/*
+ *	If collisions excess 15 times , tx will abort, and
+ *	if tx fifo underflow, tx will fail
+ *	we should try to resend it
+ */
+
+#define CB_MAX_TX_ABORT_RETRY   3
+
+/*
+ *	Receive descriptor
+ */
+
+struct rdesc0 {
+	u16 RSR;		/* Receive status */
+	u16 len:14;		/* Received packet length */
+	u16 reserved:1;
+	u16 owner:1;		/* Who owns this buffer ? */
+};
+
+struct rdesc1 {
+	u16 PQTAG;
+	u8 CSM;
+	u8 IPKT;
+};
+
+struct rx_desc {
+	struct rdesc0 rdesc0;
+	struct rdesc1 rdesc1;
+	u32 pa_low;		/* Low 32 bit PCI address */
+	u16 pa_high;		/* Next 16 bit PCI address (48 total) */
+	u16 len:15;		/* Frame size */
+	u16 inten:1;		/* Enable interrupt */
+} __attribute__ ((__packed__));
+
+/*
+ *	Transmit descriptor
+ */
+
+struct tdesc0 {
+	u16 TSR;		/* Transmit status register */
+	u16 pktsize:14;		/* Size of frame */
+	u16 reserved:1;
+	u16 owner:1;		/* Who owns the buffer */
+};
+
+struct pqinf {			/* Priority queue info */
+	u16 VID:12;
+	u16 CFI:1;
+	u16 priority:3;
+} __attribute__ ((__packed__));
+
+struct tdesc1 {
+	struct pqinf pqinf;
+	u8 TCR;
+	u8 TCPLS:2;
+	u8 reserved:2;
+	u8 CMDZ:4;
+} __attribute__ ((__packed__));
+
+struct td_buf {
+	u32 pa_low;
+	u16 pa_high;
+	u16 bufsize:14;	
+	u16 reserved:1;
+	u16 queue:1;
+} __attribute__ ((__packed__));
+
+struct tx_desc {
+	struct tdesc0 tdesc0;
+	struct tdesc1 tdesc1;
+	struct td_buf td_buf[7];
+};
+
+struct velocity_rd_info {
+	struct sk_buff *skb;
+	dma_addr_t skb_dma;
+};
+
+/**
+ *	alloc_rd_info		-	allocate an rd info block
+ *
+ *	Alocate and initialize a receive info structure used for keeping
+ *	track of kernel side information related to each receive
+ *	descriptor we are using
+ */
+
+static inline struct velocity_rd_info *alloc_rd_info(void)
+{
+	struct velocity_rd_info *ptr;
+	if ((ptr = kmalloc(sizeof(struct velocity_rd_info), GFP_ATOMIC)) == NULL)
+		return NULL;
+	else {
+		memset(ptr, 0, sizeof(struct velocity_rd_info));
+		return ptr;
+	}
+}
+
+/*
+ *	Used to track transmit side buffers.
+ */
+
+struct velocity_td_info {
+	struct sk_buff *skb;
+	u8 *buf;
+	int nskb_dma;
+	dma_addr_t skb_dma[7];
+	dma_addr_t buf_dma;
+};
+
+enum {
+	OWNED_BY_HOST = 0,
+	OWNED_BY_NIC = 1
+} velocity_owner;
+
+
+/*
+ *	MAC registers and macros.
+ */
+
+
+#define MCAM_SIZE           64
+#define VCAM_SIZE           64
+#define TX_QUEUE_NO         4
+
+#define MAX_HW_MIB_COUNTER  32
+#define VELOCITY_MIN_MTU    (1514-14)
+#define VELOCITY_MAX_MTU    (9000)
+
+/*
+ *	Registers in the MAC
+ */
+
+#define MAC_REG_PAR         0x00	// physical address
+#define MAC_REG_RCR         0x06
+#define MAC_REG_TCR         0x07
+#define MAC_REG_CR0_SET     0x08
+#define MAC_REG_CR1_SET     0x09
+#define MAC_REG_CR2_SET     0x0A
+#define MAC_REG_CR3_SET     0x0B
+#define MAC_REG_CR0_CLR     0x0C
+#define MAC_REG_CR1_CLR     0x0D
+#define MAC_REG_CR2_CLR     0x0E
+#define MAC_REG_CR3_CLR     0x0F
+#define MAC_REG_MAR         0x10
+#define MAC_REG_CAM         0x10
+#define MAC_REG_DEC_BASE_HI 0x18
+#define MAC_REG_DBF_BASE_HI 0x1C
+#define MAC_REG_ISR_CTL     0x20
+#define MAC_REG_ISR_HOTMR   0x20
+#define MAC_REG_ISR_TSUPTHR 0x20
+#define MAC_REG_ISR_RSUPTHR 0x20
+#define MAC_REG_ISR_CTL1    0x21
+#define MAC_REG_TXE_SR      0x22
+#define MAC_REG_RXE_SR      0x23
+#define MAC_REG_ISR         0x24
+#define MAC_REG_ISR0        0x24
+#define MAC_REG_ISR1        0x25
+#define MAC_REG_ISR2        0x26
+#define MAC_REG_ISR3        0x27
+#define MAC_REG_IMR         0x28
+#define MAC_REG_IMR0        0x28
+#define MAC_REG_IMR1        0x29
+#define MAC_REG_IMR2        0x2A
+#define MAC_REG_IMR3        0x2B
+#define MAC_REG_TDCSR_SET   0x30
+#define MAC_REG_RDCSR_SET   0x32
+#define MAC_REG_TDCSR_CLR   0x34
+#define MAC_REG_RDCSR_CLR   0x36
+#define MAC_REG_RDBASE_LO   0x38
+#define MAC_REG_RDINDX      0x3C
+#define MAC_REG_TDBASE_LO   0x40
+#define MAC_REG_RDCSIZE     0x50
+#define MAC_REG_TDCSIZE     0x52
+#define MAC_REG_TDINDX      0x54
+#define MAC_REG_TDIDX0      0x54
+#define MAC_REG_TDIDX1      0x56
+#define MAC_REG_TDIDX2      0x58
+#define MAC_REG_TDIDX3      0x5A
+#define MAC_REG_PAUSE_TIMER 0x5C
+#define MAC_REG_RBRDU       0x5E
+#define MAC_REG_FIFO_TEST0  0x60
+#define MAC_REG_FIFO_TEST1  0x64
+#define MAC_REG_CAMADDR     0x68
+#define MAC_REG_CAMCR       0x69
+#define MAC_REG_GFTEST      0x6A
+#define MAC_REG_FTSTCMD     0x6B
+#define MAC_REG_MIICFG      0x6C
+#define MAC_REG_MIISR       0x6D
+#define MAC_REG_PHYSR0      0x6E
+#define MAC_REG_PHYSR1      0x6F
+#define MAC_REG_MIICR       0x70
+#define MAC_REG_MIIADR      0x71
+#define MAC_REG_MIIDATA     0x72
+#define MAC_REG_SOFT_TIMER0 0x74
+#define MAC_REG_SOFT_TIMER1 0x76
+#define MAC_REG_CFGA        0x78
+#define MAC_REG_CFGB        0x79
+#define MAC_REG_CFGC        0x7A
+#define MAC_REG_CFGD        0x7B
+#define MAC_REG_DCFG0       0x7C
+#define MAC_REG_DCFG1       0x7D
+#define MAC_REG_MCFG0       0x7E
+#define MAC_REG_MCFG1       0x7F
+
+#define MAC_REG_TBIST       0x80
+#define MAC_REG_RBIST       0x81
+#define MAC_REG_PMCC        0x82
+#define MAC_REG_STICKHW     0x83
+#define MAC_REG_MIBCR       0x84
+#define MAC_REG_EERSV       0x85
+#define MAC_REG_REVID       0x86
+#define MAC_REG_MIBREAD     0x88
+#define MAC_REG_BPMA        0x8C
+#define MAC_REG_EEWR_DATA   0x8C
+#define MAC_REG_BPMD_WR     0x8F
+#define MAC_REG_BPCMD       0x90
+#define MAC_REG_BPMD_RD     0x91
+#define MAC_REG_EECHKSUM    0x92
+#define MAC_REG_EECSR       0x93
+#define MAC_REG_EERD_DATA   0x94
+#define MAC_REG_EADDR       0x96
+#define MAC_REG_EMBCMD      0x97
+#define MAC_REG_JMPSR0      0x98
+#define MAC_REG_JMPSR1      0x99
+#define MAC_REG_JMPSR2      0x9A
+#define MAC_REG_JMPSR3      0x9B
+#define MAC_REG_CHIPGSR     0x9C
+#define MAC_REG_TESTCFG     0x9D
+#define MAC_REG_DEBUG       0x9E
+#define MAC_REG_CHIPGCR     0x9F
+#define MAC_REG_WOLCR0_SET  0xA0
+#define MAC_REG_WOLCR1_SET  0xA1
+#define MAC_REG_PWCFG_SET   0xA2
+#define MAC_REG_WOLCFG_SET  0xA3
+#define MAC_REG_WOLCR0_CLR  0xA4
+#define MAC_REG_WOLCR1_CLR  0xA5
+#define MAC_REG_PWCFG_CLR   0xA6
+#define MAC_REG_WOLCFG_CLR  0xA7
+#define MAC_REG_WOLSR0_SET  0xA8
+#define MAC_REG_WOLSR1_SET  0xA9
+#define MAC_REG_WOLSR0_CLR  0xAC
+#define MAC_REG_WOLSR1_CLR  0xAD
+#define MAC_REG_PATRN_CRC0  0xB0
+#define MAC_REG_PATRN_CRC1  0xB2
+#define MAC_REG_PATRN_CRC2  0xB4
+#define MAC_REG_PATRN_CRC3  0xB6
+#define MAC_REG_PATRN_CRC4  0xB8
+#define MAC_REG_PATRN_CRC5  0xBA
+#define MAC_REG_PATRN_CRC6  0xBC
+#define MAC_REG_PATRN_CRC7  0xBE
+#define MAC_REG_BYTEMSK0_0  0xC0
+#define MAC_REG_BYTEMSK0_1  0xC4
+#define MAC_REG_BYTEMSK0_2  0xC8
+#define MAC_REG_BYTEMSK0_3  0xCC
+#define MAC_REG_BYTEMSK1_0  0xD0
+#define MAC_REG_BYTEMSK1_1  0xD4
+#define MAC_REG_BYTEMSK1_2  0xD8
+#define MAC_REG_BYTEMSK1_3  0xDC
+#define MAC_REG_BYTEMSK2_0  0xE0
+#define MAC_REG_BYTEMSK2_1  0xE4
+#define MAC_REG_BYTEMSK2_2  0xE8
+#define MAC_REG_BYTEMSK2_3  0xEC
+#define MAC_REG_BYTEMSK3_0  0xF0
+#define MAC_REG_BYTEMSK3_1  0xF4
+#define MAC_REG_BYTEMSK3_2  0xF8
+#define MAC_REG_BYTEMSK3_3  0xFC
+
+/*
+ *	Bits in the RCR register
+ */
+
+#define RCR_AS              0x80
+#define RCR_AP              0x40
+#define RCR_AL              0x20
+#define RCR_PROM            0x10
+#define RCR_AB              0x08
+#define RCR_AM              0x04
+#define RCR_AR              0x02
+#define RCR_SEP             0x01
+
+/*
+ *	Bits in the TCR register
+ */
+
+#define TCR_TB2BDIS         0x80
+#define TCR_COLTMC1         0x08
+#define TCR_COLTMC0         0x04
+#define TCR_LB1             0x02	/* loopback[1] */
+#define TCR_LB0             0x01	/* loopback[0] */
+
+/*
+ *	Bits in the CR0 register
+ */
+
+#define CR0_TXON            0x00000008UL
+#define CR0_RXON            0x00000004UL
+#define CR0_STOP            0x00000002UL	/* stop MAC, default = 1 */
+#define CR0_STRT            0x00000001UL	/* start MAC */
+#define CR0_SFRST           0x00008000UL	/* software reset */
+#define CR0_TM1EN           0x00004000UL
+#define CR0_TM0EN           0x00002000UL
+#define CR0_DPOLL           0x00000800UL	/* disable rx/tx auto polling */
+#define CR0_DISAU           0x00000100UL
+#define CR0_XONEN           0x00800000UL
+#define CR0_FDXTFCEN        0x00400000UL	/* full-duplex TX flow control enable */
+#define CR0_FDXRFCEN        0x00200000UL	/* full-duplex RX flow control enable */
+#define CR0_HDXFCEN         0x00100000UL	/* half-duplex flow control enable */
+#define CR0_XHITH1          0x00080000UL	/* TX XON high threshold 1 */
+#define CR0_XHITH0          0x00040000UL	/* TX XON high threshold 0 */
+#define CR0_XLTH1           0x00020000UL	/* TX pause frame low threshold 1 */
+#define CR0_XLTH0           0x00010000UL	/* TX pause frame low threshold 0 */
+#define CR0_GSPRST          0x80000000UL
+#define CR0_FORSRST         0x40000000UL
+#define CR0_FPHYRST         0x20000000UL
+#define CR0_DIAG            0x10000000UL
+#define CR0_INTPCTL         0x04000000UL
+#define CR0_GINTMSK1        0x02000000UL
+#define CR0_GINTMSK0        0x01000000UL
+
+/*
+ *	Bits in the CR1 register
+ */
+
+#define CR1_SFRST           0x80	/* software reset */
+#define CR1_TM1EN           0x40
+#define CR1_TM0EN           0x20
+#define CR1_DPOLL           0x08	/* disable rx/tx auto polling */
+#define CR1_DISAU           0x01
+
+/*
+ *	Bits in the CR2 register
+ */
+
+#define CR2_XONEN           0x80
+#define CR2_FDXTFCEN        0x40	/* full-duplex TX flow control enable */
+#define CR2_FDXRFCEN        0x20	/* full-duplex RX flow control enable */
+#define CR2_HDXFCEN         0x10	/* half-duplex flow control enable */
+#define CR2_XHITH1          0x08	/* TX XON high threshold 1 */
+#define CR2_XHITH0          0x04	/* TX XON high threshold 0 */
+#define CR2_XLTH1           0x02	/* TX pause frame low threshold 1 */
+#define CR2_XLTH0           0x01	/* TX pause frame low threshold 0 */
+
+/*
+ *	Bits in the CR3 register
+ */
+
+#define CR3_GSPRST          0x80
+#define CR3_FORSRST         0x40
+#define CR3_FPHYRST         0x20
+#define CR3_DIAG            0x10
+#define CR3_INTPCTL         0x04
+#define CR3_GINTMSK1        0x02
+#define CR3_GINTMSK0        0x01
+
+#define ISRCTL_UDPINT       0x8000
+#define ISRCTL_TSUPDIS      0x4000
+#define ISRCTL_RSUPDIS      0x2000
+#define ISRCTL_PMSK1        0x1000
+#define ISRCTL_PMSK0        0x0800
+#define ISRCTL_INTPD        0x0400
+#define ISRCTL_HCRLD        0x0200
+#define ISRCTL_SCRLD        0x0100
+
+/*
+ *	Bits in the ISR_CTL1 register
+ */
+
+#define ISRCTL1_UDPINT      0x80
+#define ISRCTL1_TSUPDIS     0x40
+#define ISRCTL1_RSUPDIS     0x20
+#define ISRCTL1_PMSK1       0x10
+#define ISRCTL1_PMSK0       0x08
+#define ISRCTL1_INTPD       0x04
+#define ISRCTL1_HCRLD       0x02
+#define ISRCTL1_SCRLD       0x01
+
+/*
+ *	Bits in the TXE_SR register
+ */
+
+#define TXESR_TFDBS         0x08
+#define TXESR_TDWBS         0x04
+#define TXESR_TDRBS         0x02
+#define TXESR_TDSTR         0x01
+
+/*
+ *	Bits in the RXE_SR register
+ */
+
+#define RXESR_RFDBS         0x08
+#define RXESR_RDWBS         0x04
+#define RXESR_RDRBS         0x02
+#define RXESR_RDSTR         0x01
+
+/*
+ *	Bits in the ISR register
+ */
+
+#define ISR_ISR3            0x80000000UL
+#define ISR_ISR2            0x40000000UL
+#define ISR_ISR1            0x20000000UL
+#define ISR_ISR0            0x10000000UL
+#define ISR_TXSTLI          0x02000000UL
+#define ISR_RXSTLI          0x01000000UL
+#define ISR_HFLD            0x00800000UL
+#define ISR_UDPI            0x00400000UL
+#define ISR_MIBFI           0x00200000UL
+#define ISR_SHDNI           0x00100000UL
+#define ISR_PHYI            0x00080000UL
+#define ISR_PWEI            0x00040000UL
+#define ISR_TMR1I           0x00020000UL
+#define ISR_TMR0I           0x00010000UL
+#define ISR_SRCI            0x00008000UL
+#define ISR_LSTPEI          0x00004000UL
+#define ISR_LSTEI           0x00002000UL
+#define ISR_OVFI            0x00001000UL
+#define ISR_FLONI           0x00000800UL
+#define ISR_RACEI           0x00000400UL
+#define ISR_TXWB1I          0x00000200UL
+#define ISR_TXWB0I          0x00000100UL
+#define ISR_PTX3I           0x00000080UL
+#define ISR_PTX2I           0x00000040UL
+#define ISR_PTX1I           0x00000020UL
+#define ISR_PTX0I           0x00000010UL
+#define ISR_PTXI            0x00000008UL
+#define ISR_PRXI            0x00000004UL
+#define ISR_PPTXI           0x00000002UL
+#define ISR_PPRXI           0x00000001UL
+
+/*
+ *	Bits in the IMR register
+ */
+
+#define IMR_TXSTLM          0x02000000UL
+#define IMR_UDPIM           0x00400000UL
+#define IMR_MIBFIM          0x00200000UL
+#define IMR_SHDNIM          0x00100000UL
+#define IMR_PHYIM           0x00080000UL
+#define IMR_PWEIM           0x00040000UL
+#define IMR_TMR1IM          0x00020000UL
+#define IMR_TMR0IM          0x00010000UL
+
+#define IMR_SRCIM           0x00008000UL
+#define IMR_LSTPEIM         0x00004000UL
+#define IMR_LSTEIM          0x00002000UL
+#define IMR_OVFIM           0x00001000UL
+#define IMR_FLONIM          0x00000800UL
+#define IMR_RACEIM          0x00000400UL
+#define IMR_TXWB1IM         0x00000200UL
+#define IMR_TXWB0IM         0x00000100UL
+
+#define IMR_PTX3IM          0x00000080UL
+#define IMR_PTX2IM          0x00000040UL
+#define IMR_PTX1IM          0x00000020UL
+#define IMR_PTX0IM          0x00000010UL
+#define IMR_PTXIM           0x00000008UL
+#define IMR_PRXIM           0x00000004UL
+#define IMR_PPTXIM          0x00000002UL
+#define IMR_PPRXIM          0x00000001UL
+
+/* 0x0013FB0FUL  =  initial value of IMR */
+
+#define INT_MASK_DEF        (IMR_PPTXIM|IMR_PPRXIM|IMR_PTXIM|IMR_PRXIM|\
+                            IMR_PWEIM|IMR_TXWB0IM|IMR_TXWB1IM|IMR_FLONIM|\
+                            IMR_OVFIM|IMR_LSTEIM|IMR_LSTPEIM|IMR_SRCIM|IMR_MIBFIM|\
+                            IMR_SHDNIM|IMR_TMR1IM|IMR_TMR0IM|IMR_TXSTLM)
+
+/*
+ *	Bits in the TDCSR0/1, RDCSR0 register
+ */
+
+#define TRDCSR_DEAD         0x0008
+#define TRDCSR_WAK          0x0004
+#define TRDCSR_ACT          0x0002
+#define TRDCSR_RUN	    0x0001
+
+/*
+ *	Bits in the CAMADDR register
+ */
+
+#define CAMADDR_CAMEN       0x80
+#define CAMADDR_VCAMSL      0x40
+
+/*
+ *	Bits in the CAMCR register
+ */
+
+#define CAMCR_PS1           0x80
+#define CAMCR_PS0           0x40
+#define CAMCR_AITRPKT       0x20
+#define CAMCR_AITR16        0x10
+#define CAMCR_CAMRD         0x08
+#define CAMCR_CAMWR         0x04
+#define CAMCR_PS_CAM_MASK   0x40
+#define CAMCR_PS_CAM_DATA   0x80
+#define CAMCR_PS_MAR        0x00
+
+/*
+ *	Bits in the MIICFG register
+ */
+
+#define MIICFG_MPO1         0x80
+#define MIICFG_MPO0         0x40
+#define MIICFG_MFDC         0x20
+
+/*
+ *	Bits in the MIISR register
+ */
+
+#define MIISR_MIDLE         0x80
+
+/*
+ *	 Bits in the PHYSR0 register
+ */
+
+#define PHYSR0_PHYRST       0x80
+#define PHYSR0_LINKGD       0x40
+#define PHYSR0_FDPX         0x10
+#define PHYSR0_SPDG         0x08
+#define PHYSR0_SPD10        0x04
+#define PHYSR0_RXFLC        0x02
+#define PHYSR0_TXFLC        0x01
+
+/*
+ *	Bits in the PHYSR1 register
+ */
+
+#define PHYSR1_PHYTBI       0x01
+
+/*
+ *	Bits in the MIICR register
+ */
+
+#define MIICR_MAUTO         0x80
+#define MIICR_RCMD          0x40
+#define MIICR_WCMD          0x20
+#define MIICR_MDPM          0x10
+#define MIICR_MOUT          0x08
+#define MIICR_MDO           0x04
+#define MIICR_MDI           0x02
+#define MIICR_MDC           0x01
+
+/*
+ *	Bits in the MIIADR register
+ */
+
+#define MIIADR_SWMPL        0x80
+
+/*
+ *	Bits in the CFGA register
+ */
+
+#define CFGA_PMHCTG         0x08
+#define CFGA_GPIO1PD        0x04
+#define CFGA_ABSHDN         0x02
+#define CFGA_PACPI          0x01
+
+/*
+ *	Bits in the CFGB register
+ */
+
+#define CFGB_GTCKOPT        0x80
+#define CFGB_MIIOPT         0x40
+#define CFGB_CRSEOPT        0x20
+#define CFGB_OFSET          0x10
+#define CFGB_CRANDOM        0x08
+#define CFGB_CAP            0x04
+#define CFGB_MBA            0x02
+#define CFGB_BAKOPT         0x01
+
+/*
+ *	Bits in the CFGC register
+ */
+
+#define CFGC_EELOAD         0x80
+#define CFGC_BROPT          0x40
+#define CFGC_DLYEN          0x20
+#define CFGC_DTSEL          0x10
+#define CFGC_BTSEL          0x08
+#define CFGC_BPS2           0x04	/* bootrom select[2] */
+#define CFGC_BPS1           0x02	/* bootrom select[1] */
+#define CFGC_BPS0           0x01	/* bootrom select[0] */
+
+/*
+ * Bits in the CFGD register
+ */
+
+#define CFGD_IODIS          0x80
+#define CFGD_MSLVDACEN      0x40
+#define CFGD_CFGDACEN       0x20
+#define CFGD_PCI64EN        0x10
+#define CFGD_HTMRL4         0x08
+
+/*
+ *	Bits in the DCFG1 register
+ */
+
+#define DCFG_XMWI           0x8000
+#define DCFG_XMRM           0x4000
+#define DCFG_XMRL           0x2000
+#define DCFG_PERDIS         0x1000
+#define DCFG_MRWAIT         0x0400
+#define DCFG_MWWAIT         0x0200
+#define DCFG_LATMEN         0x0100
+
+/*
+ *	Bits in the MCFG0 register
+ */
+
+#define MCFG_RXARB          0x0080
+#define MCFG_RFT1           0x0020
+#define MCFG_RFT0           0x0010
+#define MCFG_LOWTHOPT       0x0008
+#define MCFG_PQEN           0x0004
+#define MCFG_RTGOPT         0x0002
+#define MCFG_VIDFR          0x0001
+
+/*
+ *	Bits in the MCFG1 register
+ */
+
+#define MCFG_TXARB          0x8000
+#define MCFG_TXQBK1         0x0800
+#define MCFG_TXQBK0         0x0400
+#define MCFG_TXQNOBK        0x0200
+#define MCFG_SNAPOPT        0x0100
+
+/*
+ *	Bits in the PMCC  register
+ */
+
+#define PMCC_DSI            0x80
+#define PMCC_D2_DIS         0x40
+#define PMCC_D1_DIS         0x20
+#define PMCC_D3C_EN         0x10
+#define PMCC_D3H_EN         0x08
+#define PMCC_D2_EN          0x04
+#define PMCC_D1_EN          0x02
+#define PMCC_D0_EN          0x01
+
+/*
+ *	Bits in STICKHW
+ */
+
+#define STICKHW_SWPTAG      0x10
+#define STICKHW_WOLSR       0x08
+#define STICKHW_WOLEN       0x04
+#define STICKHW_DS1         0x02	/* R/W by software/cfg cycle */
+#define STICKHW_DS0         0x01	/* suspend well DS write port */
+
+/*
+ *	Bits in the MIBCR register
+ */
+
+#define MIBCR_MIBISTOK      0x80
+#define MIBCR_MIBISTGO      0x40
+#define MIBCR_MIBINC        0x20
+#define MIBCR_MIBHI         0x10
+#define MIBCR_MIBFRZ        0x08
+#define MIBCR_MIBFLSH       0x04
+#define MIBCR_MPTRINI       0x02
+#define MIBCR_MIBCLR        0x01
+
+/*
+ *	Bits in the EERSV register
+ */
+
+#define EERSV_BOOT_RPL      ((u8) 0x01)	 /* Boot method selection for VT6110 */
+
+#define EERSV_BOOT_MASK     ((u8) 0x06)
+#define EERSV_BOOT_INT19    ((u8) 0x00)
+#define EERSV_BOOT_INT18    ((u8) 0x02)
+#define EERSV_BOOT_LOCAL    ((u8) 0x04)
+#define EERSV_BOOT_BEV      ((u8) 0x06)
+
+
+/*
+ *	Bits in BPCMD
+ */
+
+#define BPCMD_BPDNE         0x80
+#define BPCMD_EBPWR         0x02
+#define BPCMD_EBPRD         0x01
+
+/*
+ *	Bits in the EECSR register
+ */
+
+#define EECSR_EMBP          0x40	/* eeprom embeded programming */
+#define EECSR_RELOAD        0x20	/* eeprom content reload */
+#define EECSR_DPM           0x10	/* eeprom direct programming */
+#define EECSR_ECS           0x08	/* eeprom CS pin */
+#define EECSR_ECK           0x04	/* eeprom CK pin */
+#define EECSR_EDI           0x02	/* eeprom DI pin */
+#define EECSR_EDO           0x01	/* eeprom DO pin */
+
+/*
+ *	Bits in the EMBCMD register
+ */
+
+#define EMBCMD_EDONE        0x80
+#define EMBCMD_EWDIS        0x08
+#define EMBCMD_EWEN         0x04
+#define EMBCMD_EWR          0x02
+#define EMBCMD_ERD          0x01
+
+/*
+ *	Bits in TESTCFG register
+ */
+
+#define TESTCFG_HBDIS       0x80
+
+/*
+ *	Bits in CHIPGCR register
+ */
+
+#define CHIPGCR_FCGMII      0x80
+#define CHIPGCR_FCFDX       0x40
+#define CHIPGCR_FCRESV      0x20
+#define CHIPGCR_FCMODE      0x10
+#define CHIPGCR_LPSOPT      0x08
+#define CHIPGCR_TM1US       0x04
+#define CHIPGCR_TM0US       0x02
+#define CHIPGCR_PHYINTEN    0x01
+
+/*
+ *	Bits in WOLCR0
+ */
+
+#define WOLCR_MSWOLEN7      0x0080	/* enable pattern match filtering */
+#define WOLCR_MSWOLEN6      0x0040
+#define WOLCR_MSWOLEN5      0x0020
+#define WOLCR_MSWOLEN4      0x0010
+#define WOLCR_MSWOLEN3      0x0008
+#define WOLCR_MSWOLEN2      0x0004
+#define WOLCR_MSWOLEN1      0x0002
+#define WOLCR_MSWOLEN0      0x0001
+#define WOLCR_ARP_EN        0x0001
+
+/*
+ *	Bits in WOLCR1
+ */
+
+#define WOLCR_LINKOFF_EN      0x0800	/* link off detected enable */
+#define WOLCR_LINKON_EN       0x0400	/* link on detected enable */
+#define WOLCR_MAGIC_EN        0x0200	/* magic packet filter enable */
+#define WOLCR_UNICAST_EN      0x0100	/* unicast filter enable */
+
+
+/*
+ *	Bits in PWCFG
+ */
+
+#define PWCFG_PHYPWOPT          0x80	/* internal MII I/F timing */
+#define PWCFG_PCISTICK          0x40	/* PCI sticky R/W enable */
+#define PWCFG_WOLTYPE           0x20	/* pulse(1) or button (0) */
+#define PWCFG_LEGCY_WOL         0x10
+#define PWCFG_PMCSR_PME_SR      0x08
+#define PWCFG_PMCSR_PME_EN      0x04	/* control by PCISTICK */
+#define PWCFG_LEGACY_WOLSR      0x02	/* Legacy WOL_SR shadow */
+#define PWCFG_LEGACY_WOLEN      0x01	/* Legacy WOL_EN shadow */
+
+/*
+ *	Bits in WOLCFG
+ */
+
+#define WOLCFG_PMEOVR           0x80	/* for legacy use, force PMEEN always */
+#define WOLCFG_SAM              0x20	/* accept multicast case reset, default=0 */
+#define WOLCFG_SAB              0x10	/* accept broadcast case reset, default=0 */
+#define WOLCFG_SMIIACC          0x08	/* ?? */
+#define WOLCFG_SGENWH           0x02
+#define WOLCFG_PHYINTEN         0x01	/* 0:PHYINT trigger enable, 1:use internal MII
+					  to report status change */
+/*
+ *	Bits in WOLSR1
+ */
+
+#define WOLSR_LINKOFF_INT      0x0800
+#define WOLSR_LINKON_INT       0x0400
+#define WOLSR_MAGIC_INT        0x0200
+#define WOLSR_UNICAST_INT      0x0100
+
+/*
+ *	Ethernet address filter type
+ */
+
+#define PKT_TYPE_NONE               0x0000	/* Turn off receiver */
+#define PKT_TYPE_DIRECTED           0x0001	/* obselete, directed address is always accepted */
+#define PKT_TYPE_MULTICAST          0x0002
+#define PKT_TYPE_ALL_MULTICAST      0x0004
+#define PKT_TYPE_BROADCAST          0x0008
+#define PKT_TYPE_PROMISCUOUS        0x0020
+#define PKT_TYPE_LONG               0x2000	/* NOTE.... the definition of LONG is >2048 bytes in our chip */
+#define PKT_TYPE_RUNT               0x4000
+#define PKT_TYPE_ERROR              0x8000	/* Accept error packets, e.g. CRC error */
+
+/*
+ *	Loopback mode
+ */
+
+#define MAC_LB_NONE         0x00
+#define MAC_LB_INTERNAL     0x01
+#define MAC_LB_EXTERNAL     0x02
+
+/*
+ *	Enabled mask value of irq
+ */
+
+#if defined(_SIM)
+#define IMR_MASK_VALUE      0x0033FF0FUL	/* initial value of IMR
+						   set IMR0 to 0x0F according to spec */
+
+#else
+#define IMR_MASK_VALUE      0x0013FB0FUL	/* initial value of IMR
+						   ignore MIBFI,RACEI to
+						   reduce intr. frequency
+						   NOTE.... do not enable NoBuf int mask at driver driver
+						      when (1) NoBuf -> RxThreshold = SF
+							   (2) OK    -> RxThreshold = original value
+						 */
+#endif
+
+/*
+ *	Revision id
+ */
+
+#define REV_ID_VT3119_A0	0x00
+#define REV_ID_VT3119_A1	0x01
+#define REV_ID_VT3216_A0	0x10
+
+/*
+ *	Max time out delay time
+ */
+
+#define W_MAX_TIMEOUT       0x0FFFU
+
+
+/*
+ *	MAC registers as a structure. Cannot be directly accessed this
+ *	way but generates offsets for readl/writel() calls
+ */
+
+struct mac_regs {
+	volatile u8 PAR[6];		/* 0x00 */
+	volatile u8 RCR;
+	volatile u8 TCR;
+
+	volatile u32 CR0Set;		/* 0x08 */
+	volatile u32 CR0Clr;		/* 0x0C */
+
+	volatile u8 MARCAM[8];		/* 0x10 */
+
+	volatile u32 DecBaseHi;		/* 0x18 */
+	volatile u16 DbfBaseHi;		/* 0x1C */
+	volatile u16 reserved_1E;
+
+	volatile u16 ISRCTL;		/* 0x20 */
+	volatile u8 TXESR;
+	volatile u8 RXESR;
+
+	volatile u32 ISR;		/* 0x24 */
+	volatile u32 IMR;
+
+	volatile u32 TDStatusPort;	/* 0x2C */
+
+	volatile u16 TDCSRSet;		/* 0x30 */
+	volatile u8 RDCSRSet;
+	volatile u8 reserved_33;
+	volatile u16 TDCSRClr;
+	volatile u8 RDCSRClr;
+	volatile u8 reserved_37;
+
+	volatile u32 RDBaseLo;		/* 0x38 */
+	volatile u16 RDIdx;		/* 0x3C */
+	volatile u16 reserved_3E;
+
+	volatile u32 TDBaseLo[4];	/* 0x40 */
+
+	volatile u16 RDCSize;		/* 0x50 */
+	volatile u16 TDCSize;		/* 0x52 */
+	volatile u16 TDIdx[4];		/* 0x54 */
+	volatile u16 tx_pause_timer;	/* 0x5C */
+	volatile u16 RBRDU;		/* 0x5E */
+
+	volatile u32 FIFOTest0;		/* 0x60 */
+	volatile u32 FIFOTest1;		/* 0x64 */
+
+	volatile u8 CAMADDR;		/* 0x68 */
+	volatile u8 CAMCR;		/* 0x69 */
+	volatile u8 GFTEST;		/* 0x6A */
+	volatile u8 FTSTCMD;		/* 0x6B */
+
+	volatile u8 MIICFG;		/* 0x6C */
+	volatile u8 MIISR;
+	volatile u8 PHYSR0;
+	volatile u8 PHYSR1;
+	volatile u8 MIICR;
+	volatile u8 MIIADR;
+	volatile u16 MIIDATA;
+
+	volatile u16 SoftTimer0;	/* 0x74 */
+	volatile u16 SoftTimer1;
+
+	volatile u8 CFGA;		/* 0x78 */
+	volatile u8 CFGB;
+	volatile u8 CFGC;
+	volatile u8 CFGD;
+
+	volatile u16 DCFG;		/* 0x7C */
+	volatile u16 MCFG;
+
+	volatile u8 TBIST;		/* 0x80 */
+	volatile u8 RBIST;
+	volatile u8 PMCPORT;
+	volatile u8 STICKHW;
+
+	volatile u8 MIBCR;		/* 0x84 */
+	volatile u8 reserved_85;
+	volatile u8 rev_id;
+	volatile u8 PORSTS;
+
+	volatile u32 MIBData;		/* 0x88 */
+
+	volatile u16 EEWrData;
+
+	volatile u8 reserved_8E;
+	volatile u8 BPMDWr;
+	volatile u8 BPCMD;
+	volatile u8 BPMDRd;
+
+	volatile u8 EECHKSUM;		/* 0x92 */
+	volatile u8 EECSR;
+
+	volatile u16 EERdData;		/* 0x94 */
+	volatile u8 EADDR;
+	volatile u8 EMBCMD;
+
+
+	volatile u8 JMPSR0;		/* 0x98 */
+	volatile u8 JMPSR1;
+	volatile u8 JMPSR2;
+	volatile u8 JMPSR3;
+	volatile u8 CHIPGSR;		/* 0x9C */
+	volatile u8 TESTCFG;
+	volatile u8 DEBUG;
+	volatile u8 CHIPGCR;
+
+	volatile u16 WOLCRSet;		/* 0xA0 */
+	volatile u8 PWCFGSet;
+	volatile u8 WOLCFGSet;
+
+	volatile u16 WOLCRClr;		/* 0xA4 */
+	volatile u8 PWCFGCLR;
+	volatile u8 WOLCFGClr;
+
+	volatile u16 WOLSRSet;		/* 0xA8 */
+	volatile u16 reserved_AA;
+
+	volatile u16 WOLSRClr;		/* 0xAC */
+	volatile u16 reserved_AE;
+
+	volatile u16 PatternCRC[8];	/* 0xB0 */
+	volatile u32 ByteMask[4][4];	/* 0xC0 */
+} __attribute__ ((__packed__));
+
+
+enum hw_mib {
+	HW_MIB_ifRxAllPkts = 0,
+	HW_MIB_ifRxOkPkts,
+	HW_MIB_ifTxOkPkts,
+	HW_MIB_ifRxErrorPkts,
+	HW_MIB_ifRxRuntOkPkt,
+	HW_MIB_ifRxRuntErrPkt,
+	HW_MIB_ifRx64Pkts,
+	HW_MIB_ifTx64Pkts,
+	HW_MIB_ifRx65To127Pkts,
+	HW_MIB_ifTx65To127Pkts,
+	HW_MIB_ifRx128To255Pkts,
+	HW_MIB_ifTx128To255Pkts,
+	HW_MIB_ifRx256To511Pkts,
+	HW_MIB_ifTx256To511Pkts,
+	HW_MIB_ifRx512To1023Pkts,
+	HW_MIB_ifTx512To1023Pkts,
+	HW_MIB_ifRx1024To1518Pkts,
+	HW_MIB_ifTx1024To1518Pkts,
+	HW_MIB_ifTxEtherCollisions,
+	HW_MIB_ifRxPktCRCE,
+	HW_MIB_ifRxJumboPkts,
+	HW_MIB_ifTxJumboPkts,
+	HW_MIB_ifRxMacControlFrames,
+	HW_MIB_ifTxMacControlFrames,
+	HW_MIB_ifRxPktFAE,
+	HW_MIB_ifRxLongOkPkt,
+	HW_MIB_ifRxLongPktErrPkt,
+	HW_MIB_ifTXSQEErrors,
+	HW_MIB_ifRxNobuf,
+	HW_MIB_ifRxSymbolErrors,
+	HW_MIB_ifInRangeLengthErrors,
+	HW_MIB_ifLateCollisions,
+	HW_MIB_SIZE
+};
+
+enum chip_type {
+	CHIP_TYPE_VT6110 = 1,
+};
+
+struct velocity_info_tbl {
+	enum chip_type chip_id;
+	char *name;
+	int io_size;
+	int txqueue;
+	u32 flags;
+};
+
+#define mac_hw_mibs_init(regs) {\
+	BYTE_REG_BITS_ON(MIBCR_MIBFRZ,&((regs)->MIBCR));\
+	BYTE_REG_BITS_ON(MIBCR_MIBCLR,&((regs)->MIBCR));\
+	do {}\
+		while (BYTE_REG_BITS_IS_ON(MIBCR_MIBCLR,&((regs)->MIBCR)));\
+	BYTE_REG_BITS_OFF(MIBCR_MIBFRZ,&((regs)->MIBCR));\
+}
+
+#define mac_read_isr(regs)  		readl(&((regs)->ISR))
+#define mac_write_isr(regs, x)  	writel((x),&((regs)->ISR))
+#define mac_clear_isr(regs) 		writel(0xffffffffL,&((regs)->ISR))
+
+#define mac_write_int_mask(mask, regs) 	writel((mask),&((regs)->IMR));
+#define mac_disable_int(regs)       	writel(CR0_GINTMSK1,&((regs)->CR0Clr))
+#define mac_enable_int(regs)    	writel(CR0_GINTMSK1,&((regs)->CR0Set))
+
+#define mac_hw_mibs_read(regs, MIBs) {\
+	int i;\
+	BYTE_REG_BITS_ON(MIBCR_MPTRINI,&((regs)->MIBCR));\
+	for (i=0;i<HW_MIB_SIZE;i++) {\
+		(MIBs)[i]=readl(&((regs)->MIBData));\
+	}\
+}
+
+#define mac_set_dma_length(regs, n) {\
+	BYTE_REG_BITS_SET((n),0x07,&((regs)->DCFG));\
+}
+
+#define mac_set_rx_thresh(regs, n) {\
+	BYTE_REG_BITS_SET((n),(MCFG_RFT0|MCFG_RFT1),&((regs)->MCFG));\
+}
+
+#define mac_rx_queue_run(regs) {\
+	writeb(TRDCSR_RUN, &((regs)->RDCSRSet));\
+}
+
+#define mac_rx_queue_wake(regs) {\
+	writeb(TRDCSR_WAK, &((regs)->RDCSRSet));\
+}
+
+#define mac_tx_queue_run(regs, n) {\
+	writew(TRDCSR_RUN<<((n)*4),&((regs)->TDCSRSet));\
+}
+
+#define mac_tx_queue_wake(regs, n) {\
+	writew(TRDCSR_WAK<<(n*4),&((regs)->TDCSRSet));\
+}
+
+#define mac_eeprom_reload(regs) {\
+	int i=0;\
+	BYTE_REG_BITS_ON(EECSR_RELOAD,&((regs)->EECSR));\
+	do {\
+		udelay(10);\
+		if (i++>0x1000) {\
+			break;\
+		}\
+	}while (BYTE_REG_BITS_IS_ON(EECSR_RELOAD,&((regs)->EECSR)));\
+}
+
+enum velocity_cam_type {
+	VELOCITY_VLAN_ID_CAM = 0,
+	VELOCITY_MULTICAST_CAM
+};
+
+/**
+ *	mac_get_cam_mask	-	Read a CAM mask
+ *	@regs: register block for this velocity
+ *	@mask: buffer to store mask
+ *	@cam_type: CAM to fetch
+ *
+ *	Fetch the mask bits of the selected CAM and store them into the
+ *	provided mask buffer.
+ */
+
+static inline void mac_get_cam_mask(struct mac_regs * regs, u8 * mask, enum velocity_cam_type cam_type)
+{
+	int i;
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_CAM_MASK, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+	if (cam_type == VELOCITY_VLAN_ID_CAM)
+		writeb(CAMADDR_VCAMSL, &regs->CAMADDR);
+	else
+		writeb(0, &regs->CAMADDR);
+
+	/* read mask */
+	for (i = 0; i < 8; i++)
+		*mask++ = readb(&(regs->MARCAM[i]));
+
+	/* disable CAMEN */
+	writeb(0, &regs->CAMADDR);
+
+	/* Select mar */
+	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+}
+
+/**
+ *	mac_set_cam_mask	-	Set a CAM mask
+ *	@regs: register block for this velocity
+ *	@mask: CAM mask to load
+ *	@cam_type: CAM to store
+ *
+ *	Store a new mask into a CAM
+ */
+
+static inline void mac_set_cam_mask(struct mac_regs * regs, u8 * mask, enum velocity_cam_type cam_type)
+{
+	int i;
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_CAM_MASK, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+	if (cam_type == VELOCITY_VLAN_ID_CAM)
+		writeb(CAMADDR_CAMEN | CAMADDR_VCAMSL, &regs->CAMADDR);
+	else
+		writeb(CAMADDR_CAMEN, &regs->CAMADDR);
+
+	for (i = 0; i < 8; i++) {
+		writeb(*mask++, &(regs->MARCAM[i]));
+	}
+	/* disable CAMEN */
+	writeb(0, &regs->CAMADDR);
+
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+}
+
+/**
+ *	mac_set_cam	-	set CAM data
+ *	@regs: register block of this velocity
+ *	@idx: Cam index
+ *	@addr: 2 or 6 bytes of CAM data
+ *	@cam_type: CAM to load
+ *
+ *	Load an address or vlan tag into a CAM
+ */
+
+static inline void mac_set_cam(struct mac_regs * regs, int idx, u8 *addr, enum velocity_cam_type cam_type)
+{
+	int i;
+
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_CAM_DATA, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+	idx &= (64 - 1);
+
+	if (cam_type == VELOCITY_VLAN_ID_CAM)
+		writeb(CAMADDR_CAMEN | CAMADDR_VCAMSL | idx, &regs->CAMADDR);
+	else
+		writeb(CAMADDR_CAMEN | idx, &regs->CAMADDR);
+
+	if (cam_type == VELOCITY_VLAN_ID_CAM)
+		writew(*((u16 *) addr), &regs->MARCAM[0]);
+	else {
+		for (i = 0; i < 6; i++) {
+			writeb(*addr++, &(regs->MARCAM[i]));
+		}
+	}
+	BYTE_REG_BITS_ON(CAMCR_CAMWR, &regs->CAMCR);
+
+	udelay(10);
+
+	writeb(0, &regs->CAMADDR);
+
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+}
+
+/**
+ *	mac_get_cam	-	fetch CAM data
+ *	@regs: register block of this velocity
+ *	@idx: Cam index
+ *	@addr: buffer to hold up to 6 bytes of CAM data
+ *	@cam_type: CAM to load
+ *
+ *	Load an address or vlan tag from a CAM into the buffer provided by
+ *	the caller. VLAN tags are 2 bytes the address cam entries are 6.
+ */
+
+static inline void mac_get_cam(struct mac_regs * regs, int idx, u8 *addr, enum velocity_cam_type cam_type)
+{
+	int i;
+
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_CAM_DATA, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+	idx &= (64 - 1);
+
+	if (cam_type == VELOCITY_VLAN_ID_CAM)
+		writeb(CAMADDR_CAMEN | CAMADDR_VCAMSL | idx, &regs->CAMADDR);
+	else
+		writeb(CAMADDR_CAMEN | idx, &regs->CAMADDR);
+
+	BYTE_REG_BITS_ON(CAMCR_CAMRD, &regs->CAMCR);
+
+	udelay(10);
+
+	if (cam_type == VELOCITY_VLAN_ID_CAM)
+		*((u16 *) addr) = readw(&(regs->MARCAM[0]));
+	else
+		for (i = 0; i < 6; i++, addr++)
+			*((u8 *) addr) = readb(&(regs->MARCAM[i]));
+
+	writeb(0, &regs->CAMADDR);
+
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+}
+
+/**
+ *	mac_wol_reset	-	reset WOL after exiting low power
+ *	@regs: register block of this velocity
+ *
+ *	Called after we drop out of wake on lan mode in order to
+ *	reset the Wake on lan features. This function doesn't restore
+ *	the rest of the logic from the result of sleep/wakeup
+ */
+
+inline static void mac_wol_reset(struct mac_regs * regs)
+{
+
+	/* Turn off SWPTAG right after leaving power mode */
+	BYTE_REG_BITS_OFF(STICKHW_SWPTAG, &regs->STICKHW);
+	/* clear sticky bits */
+	BYTE_REG_BITS_OFF((STICKHW_DS1 | STICKHW_DS0), &regs->STICKHW);
+
+	BYTE_REG_BITS_OFF(CHIPGCR_FCGMII, &regs->CHIPGCR);
+	BYTE_REG_BITS_OFF(CHIPGCR_FCMODE, &regs->CHIPGCR);
+	/* disable force PME-enable */
+	writeb(WOLCFG_PMEOVR, &regs->WOLCFGClr);
+	/* disable power-event config bit */
+	writew(0xFFFF, &regs->WOLCRClr);
+	/* clear power status */
+	writew(0xFFFF, &regs->WOLSRClr);
+}
+
+
+/*
+ * Header for WOL definitions. Used to compute hashes
+ */
+
+typedef u8 MCAM_ADDR[ETH_ALEN];
+
+struct arp_packet {
+	u8 dest_mac[ETH_ALEN];
+	u8 src_mac[ETH_ALEN];
+	u16 type;
+	u16 ar_hrd;
+	u16 ar_pro;
+	u8 ar_hln;
+	u8 ar_pln;
+	u16 ar_op;
+	u8 ar_sha[ETH_ALEN];
+	u8 ar_sip[4];
+	u8 ar_tha[ETH_ALEN];
+	u8 ar_tip[4];
+} __attribute__ ((__packed__));
+
+struct _magic_packet {
+	u8 dest_mac[6];
+	u8 src_mac[6];
+	u16 type;
+	u8 MAC[16][6];
+	u8 password[6];
+} __attribute__ ((__packed__));
+
+/*
+ *	Store for chip context when saving and restoring status. Not
+ *	all fields are saved/restored currently.
+ */
+
+struct velocity_context {
+	u8 mac_reg[256];
+	MCAM_ADDR cam_addr[MCAM_SIZE];
+	u16 vcam[VCAM_SIZE];
+	u32 cammask[2];
+	u32 patcrc[2];
+	u32 pattern[8];
+};
+
+
+/*
+ *	MII registers.
+ */
+
+
+/*
+ *	Registers in the MII (offset unit is WORD)
+ */
+
+#define MII_REG_BMCR        0x00	// physical address
+#define MII_REG_BMSR        0x01	//
+#define MII_REG_PHYID1      0x02	// OUI
+#define MII_REG_PHYID2      0x03	// OUI + Module ID + REV ID
+#define MII_REG_ANAR        0x04	//
+#define MII_REG_ANLPAR      0x05	//
+#define MII_REG_G1000CR     0x09	//
+#define MII_REG_G1000SR     0x0A	//
+#define MII_REG_MODCFG      0x10	//
+#define MII_REG_TCSR        0x16	//
+#define MII_REG_PLED        0x1B	//
+// NS, MYSON only
+#define MII_REG_PCR         0x17	//
+// ESI only
+#define MII_REG_PCSR        0x17	//
+#define MII_REG_AUXCR       0x1C	//
+
+// Marvell 88E1000/88E1000S
+#define MII_REG_PSCR        0x10	// PHY specific control register
+
+//
+// Bits in the BMCR register
+//
+#define BMCR_RESET          0x8000	//
+#define BMCR_LBK            0x4000	//
+#define BMCR_SPEED100       0x2000	//
+#define BMCR_AUTO           0x1000	//
+#define BMCR_PD             0x0800	//
+#define BMCR_ISO            0x0400	//
+#define BMCR_REAUTO         0x0200	//
+#define BMCR_FDX            0x0100	//
+#define BMCR_SPEED1G        0x0040	//
+//
+// Bits in the BMSR register
+//
+#define BMSR_AUTOCM         0x0020	//
+#define BMSR_LNK            0x0004	//
+
+//
+// Bits in the ANAR register
+//
+#define ANAR_ASMDIR         0x0800	// Asymmetric PAUSE support
+#define ANAR_PAUSE          0x0400	// Symmetric PAUSE Support
+#define ANAR_T4             0x0200	//
+#define ANAR_TXFD           0x0100	//
+#define ANAR_TX             0x0080	//
+#define ANAR_10FD           0x0040	//
+#define ANAR_10             0x0020	//
+//
+// Bits in the ANLPAR register
+//
+#define ANLPAR_ASMDIR       0x0800	// Asymmetric PAUSE support
+#define ANLPAR_PAUSE        0x0400	// Symmetric PAUSE Support
+#define ANLPAR_T4           0x0200	//
+#define ANLPAR_TXFD         0x0100	//
+#define ANLPAR_TX           0x0080	//
+#define ANLPAR_10FD         0x0040	//
+#define ANLPAR_10           0x0020	//
+
+//
+// Bits in the G1000CR register
+//
+#define G1000CR_1000FD      0x0200	// PHY is 1000-T Full-duplex capable
+#define G1000CR_1000        0x0100	// PHY is 1000-T Half-duplex capable
+
+//
+// Bits in the G1000SR register
+//
+#define G1000SR_1000FD      0x0800	// LP PHY is 1000-T Full-duplex capable
+#define G1000SR_1000        0x0400	// LP PHY is 1000-T Half-duplex capable
+
+#define TCSR_ECHODIS        0x2000	//
+#define AUXCR_MDPPS         0x0004	//
+
+// Bits in the PLED register
+#define PLED_LALBE			0x0004	//
+
+// Marvell 88E1000/88E1000S Bits in the PHY specific control register (10h)
+#define PSCR_ACRSTX         0x0800	// Assert CRS on Transmit
+
+#define PHYID_CICADA_CS8201 0x000FC410UL
+#define PHYID_VT3216_32BIT  0x000FC610UL
+#define PHYID_VT3216_64BIT  0x000FC600UL
+#define PHYID_MARVELL_1000  0x01410C50UL
+#define PHYID_MARVELL_1000S 0x01410C40UL
+
+#define PHYID_REV_ID_MASK   0x0000000FUL
+
+#define PHYID_GET_PHY_REV_ID(i)     ((i) & PHYID_REV_ID_MASK)
+#define PHYID_GET_PHY_ID(i)         ((i) & ~PHYID_REV_ID_MASK)
+
+#define MII_REG_BITS_ON(x,i,p) do {\
+    u16 w;\
+    velocity_mii_read((p),(i),&(w));\
+    (w)|=(x);\
+    velocity_mii_write((p),(i),(w));\
+} while (0)
+
+#define MII_REG_BITS_OFF(x,i,p) do {\
+    u16 w;\
+    velocity_mii_read((p),(i),&(w));\
+    (w)&=(~(x));\
+    velocity_mii_write((p),(i),(w));\
+} while (0)
+
+#define MII_REG_BITS_IS_ON(x,i,p) ({\
+    u16 w;\
+    velocity_mii_read((p),(i),&(w));\
+    ((int) ((w) & (x)));})
+
+#define MII_GET_PHY_ID(p) ({\
+    u32 id;\
+    velocity_mii_read((p),MII_REG_PHYID2,(u16 *) &id);\
+    velocity_mii_read((p),MII_REG_PHYID1,((u16 *) &id)+1);\
+    (id);})
+
+/*
+ * Inline debug routine
+ */
+
+
+enum velocity_msg_level {
+	MSG_LEVEL_ERR = 0,	//Errors that will cause abnormal operation.
+	MSG_LEVEL_NOTICE = 1,	//Some errors need users to be notified.
+	MSG_LEVEL_INFO = 2,	//Normal message.
+	MSG_LEVEL_VERBOSE = 3,	//Will report all trival errors.
+	MSG_LEVEL_DEBUG = 4	//Only for debug purpose.
+};
+
+#ifdef VELOCITY_DEBUG
+#define ASSERT(x) { \
+	if (!(x)) { \
+		printk(KERN_ERR "assertion %s failed: file %s line %d\n", #x,\
+			__FUNCTION__, __LINE__);\
+		BUG(); \
+	}\
+}
+#define VELOCITY_DBG(p,args...) printk(p, ##args)
+#else
+#define ASSERT(x)
+#define VELOCITY_DBG(x)
+#endif
+
+#define VELOCITY_PRT(l, p, args...) do {if (l<=msglevel) printk( p ,##args);} while (0)
+
+#define VELOCITY_PRT_CAMMASK(p,t) {\
+	int i;\
+	if ((t)==VELOCITY_MULTICAST_CAM) {\
+        	for (i=0;i<(MCAM_SIZE/8);i++)\
+			printk("%02X",(p)->mCAMmask[i]);\
+	}\
+	else {\
+		for (i=0;i<(VCAM_SIZE/8);i++)\
+			printk("%02X",(p)->vCAMmask[i]);\
+	}\
+	printk("\n");\
+}
+
+
+
+#define     VELOCITY_WOL_MAGIC             0x00000000UL
+#define     VELOCITY_WOL_PHY               0x00000001UL
+#define     VELOCITY_WOL_ARP               0x00000002UL
+#define     VELOCITY_WOL_UCAST             0x00000004UL
+#define     VELOCITY_WOL_BCAST             0x00000010UL
+#define     VELOCITY_WOL_MCAST             0x00000020UL
+#define     VELOCITY_WOL_MAGIC_SEC         0x00000040UL
+
+/*
+ *	Flags for options
+ */
+
+#define     VELOCITY_FLAGS_TAGGING         0x00000001UL
+#define     VELOCITY_FLAGS_TX_CSUM         0x00000002UL
+#define     VELOCITY_FLAGS_RX_CSUM         0x00000004UL
+#define     VELOCITY_FLAGS_IP_ALIGN        0x00000008UL
+#define     VELOCITY_FLAGS_VAL_PKT_LEN     0x00000010UL
+
+#define     VELOCITY_FLAGS_FLOW_CTRL       0x01000000UL
+
+/*
+ *	Flags for driver status
+ */
+
+#define     VELOCITY_FLAGS_OPENED          0x00010000UL
+#define     VELOCITY_FLAGS_VMNS_CONNECTED  0x00020000UL
+#define     VELOCITY_FLAGS_VMNS_COMMITTED  0x00040000UL
+#define     VELOCITY_FLAGS_WOL_ENABLED     0x00080000UL
+
+/*
+ *	Flags for MII status
+ */
+
+#define     VELOCITY_LINK_FAIL             0x00000001UL
+#define     VELOCITY_SPEED_10              0x00000002UL
+#define     VELOCITY_SPEED_100             0x00000004UL
+#define     VELOCITY_SPEED_1000            0x00000008UL
+#define     VELOCITY_DUPLEX_FULL           0x00000010UL
+#define     VELOCITY_AUTONEG_ENABLE        0x00000020UL
+#define     VELOCITY_FORCED_BY_EEPROM      0x00000040UL
+
+/*
+ *	For velocity_set_media_duplex
+ */
+
+#define     VELOCITY_LINK_CHANGE           0x00000001UL
+
+enum speed_opt {
+	SPD_DPX_AUTO = 0,
+	SPD_DPX_100_HALF = 1,
+	SPD_DPX_100_FULL = 2,
+	SPD_DPX_10_HALF = 3,
+	SPD_DPX_10_FULL = 4
+};
+
+enum velocity_init_type {
+	VELOCITY_INIT_COLD = 0,
+	VELOCITY_INIT_RESET,
+	VELOCITY_INIT_WOL
+};
+
+enum velocity_flow_cntl_type {
+	FLOW_CNTL_DEFAULT = 1,
+	FLOW_CNTL_TX,
+	FLOW_CNTL_RX,
+	FLOW_CNTL_TX_RX,
+	FLOW_CNTL_DISABLE,
+};
+
+struct velocity_opt {
+	int numrx;			/* Number of RX descriptors */
+	int numtx;			/* Number of TX descriptors */
+	enum speed_opt spd_dpx;		/* Media link mode */
+	int vid;			/* vlan id */
+	int DMA_length;			/* DMA length */
+	int rx_thresh;			/* RX_THRESH */
+	int flow_cntl;
+	int wol_opts;			/* Wake on lan options */
+	int td_int_count;
+	int int_works;
+	int rx_bandwidth_hi;
+	int rx_bandwidth_lo;
+	int rx_bandwidth_en;
+	u32 flags;
+};
+
+struct velocity_info {
+	struct velocity_info *next;
+	struct velocity_info *prev;
+
+	struct pci_dev *pdev;
+	struct net_device *dev;
+	struct net_device_stats stats;
+
+#if CONFIG_PM
+	u32 pci_state[16];
+#endif
+
+	dma_addr_t rd_pool_dma;
+	dma_addr_t td_pool_dma[TX_QUEUE_NO];
+
+	dma_addr_t tx_bufs_dma;
+	u8 *tx_bufs;
+
+	u8 ip_addr[4];
+	enum chip_type chip_id;
+
+	struct mac_regs * mac_regs;
+	unsigned long memaddr;
+	unsigned long ioaddr;
+	u32 io_size;
+
+	u8 rev_id;
+
+#define AVAIL_TD(p,q)   ((p)->options.numtx-((p)->td_used[(q)]))
+
+	int num_txq;
+
+	volatile int td_used[TX_QUEUE_NO];
+	int td_curr[TX_QUEUE_NO];
+	int td_tail[TX_QUEUE_NO];
+	struct tx_desc *td_rings[TX_QUEUE_NO];
+	struct velocity_td_info *td_infos[TX_QUEUE_NO];
+
+	int rd_curr;
+	int rd_dirty;
+	u32 rd_filled;
+	struct rx_desc *rd_ring;
+	struct velocity_rd_info *rd_info;	/* It's an array */
+
+#define GET_RD_BY_IDX(vptr, idx)   (vptr->rd_ring[idx])
+	u32 mib_counter[MAX_HW_MIB_COUNTER];
+	struct velocity_opt options;
+
+	u32 int_mask;
+
+	u32 flags;
+
+	int rx_buf_sz;
+	u32 mii_status;
+	u32 phy_id;
+	int multicast_limit;
+
+	u8 vCAMmask[(VCAM_SIZE / 8)];
+	u8 mCAMmask[(MCAM_SIZE / 8)];
+
+	spinlock_t lock;
+	spinlock_t xmit_lock;
+
+	int wol_opts;
+	u8 wol_passwd[6];
+
+	struct velocity_context context;
+
+	u32 ticks;
+	u32 rx_bytes;
+
+};
+
+/**
+ *	velocity_get_ip		-	find an IP address for the device
+ *	@vptr: Velocity to query
+ *
+ *	Dig out an IP address for this interface so that we can
+ *	configure wakeup with WOL for ARP. If there are multiple IP
+ *	addresses on this chain then we use the first - multi-IP WOL is not
+ *	supported.
+ *
+ *	CHECK ME: locking
+ */
+
+inline static int velocity_get_ip(struct velocity_info *vptr)
+{
+	struct in_device *in_dev = (struct in_device *) vptr->dev->ip_ptr;
+	struct in_ifaddr *ifa;
+
+	if (in_dev != NULL) {
+		ifa = (struct in_ifaddr *) in_dev->ifa_list;
+		if (ifa != NULL) {
+			memcpy(vptr->ip_addr, &ifa->ifa_address, 4);
+			return 0;
+		}
+	}
+	return -ENOENT;
+}
+
+/**
+ *	velocity_update_hw_mibs	-	fetch MIB counters from chip
+ *	@vptr: velocity to update
+ *
+ *	The velocity hardware keeps certain counters in the hardware
+ * 	side. We need to read these when the user asks for statistics
+ *	or when they overflow (causing an interrupt). The read of the
+ *	statistic clears it, so we keep running master counters in user
+ *	space.
+ */
+
+static inline void velocity_update_hw_mibs(struct velocity_info *vptr)
+{
+	u32 tmp;
+	int i;
+	BYTE_REG_BITS_ON(MIBCR_MIBFLSH, &(vptr->mac_regs->MIBCR));
+
+	while (BYTE_REG_BITS_IS_ON(MIBCR_MIBFLSH, &(vptr->mac_regs->MIBCR)));
+
+	BYTE_REG_BITS_ON(MIBCR_MPTRINI, &(vptr->mac_regs->MIBCR));
+	for (i = 0; i < HW_MIB_SIZE; i++) {
+		tmp = readl(&(vptr->mac_regs->MIBData)) & 0x00FFFFFFUL;
+		vptr->mib_counter[i] += tmp;
+	}
+}
+
+/**
+ *	init_flow_control_register 	-	set up flow control
+ *	@vptr: velocity to configure
+ *
+ *	Configure the flow control registers for this velocity device.
+ */
+
+static inline void init_flow_control_register(struct velocity_info *vptr)
+{
+	struct mac_regs * regs = vptr->mac_regs;
+
+	/* Set {XHITH1, XHITH0, XLTH1, XLTH0} in FlowCR1 to {1, 0, 1, 1}
+	   depend on RD=64, and Turn on XNOEN in FlowCR1 */
+	writel((CR0_XONEN | CR0_XHITH1 | CR0_XLTH1 | CR0_XLTH0), &regs->CR0Set);
+	writel((CR0_FDXTFCEN | CR0_FDXRFCEN | CR0_HDXFCEN | CR0_XHITH0), &regs->CR0Clr);
+
+	/* Set TxPauseTimer to 0xFFFF */
+	writew(0xFFFF, &regs->tx_pause_timer);
+
+	/* Initialize RBRDU to Rx buffer count. */
+	writew(vptr->options.numrx, &regs->RBRDU);
+}
+
+
+#endif
--- diff/drivers/net/wireless/prism54/prismcompat.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/net/wireless/prism54/prismcompat.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,46 @@
+/*  
+ *  (C) 2004 Margit Schubert-While <margitsw@t-online.de>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License
+ *
+ *  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
+ *
+ */
+
+/*  
+ *	Compatibility header file to aid support of different kernel versions
+ */
+
+#ifdef PRISM54_COMPAT24
+#include "prismcompat24.h"
+#else	/* PRISM54_COMPAT24 */
+
+#ifndef _PRISM_COMPAT_H
+#define _PRISM_COMPAT_H
+
+#include <linux/device.h>
+#include <linux/firmware.h>
+#include <linux/config.h>
+#include <linux/moduleparam.h>
+#include <linux/workqueue.h>
+#include <linux/compiler.h>
+
+#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE)
+#error Firmware Loading is not configured in the kernel !
+#endif
+
+#define prism54_synchronize_irq(irq) synchronize_irq(irq)
+
+#define PRISM_FW_PDEV		&priv->pdev->dev
+
+#endif				/* _PRISM_COMPAT_H */
+#endif				/* PRISM54_COMPAT24 */
--- diff/drivers/pcmcia/pd6729.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/pcmcia/pd6729.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,732 @@
+/*
+ * Driver for the Cirrus PD6729 PCI-PCMCIA bridge.
+ *
+ * Based on the i82092.c driver.
+ *
+ * This software may be used and distributed according to the terms of
+ * the GNU General Public License, incorporated herein by reference.
+ */
+
+#include <linux/kernel.h>
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/workqueue.h>
+#include <linux/interrupt.h>
+#include <linux/device.h>
+
+#include <pcmcia/cs_types.h>
+#include <pcmcia/ss.h>
+#include <pcmcia/cs.h>
+
+#include <asm/system.h>
+#include <asm/io.h>
+
+#include "pd6729.h"
+#include "i82365.h"
+#include "cirrus.h"
+
+MODULE_LICENSE("GPL");
+
+#define MAX_SOCKETS 2
+
+/* simple helper functions */
+/* External clock time, in nanoseconds.  120 ns = 8.33 MHz */
+#define to_cycles(ns)	((ns)/120)
+
+static spinlock_t port_lock = SPIN_LOCK_UNLOCKED;
+
+/* basic value read/write functions */
+
+static unsigned char indirect_read(struct pd6729_socket *socket, unsigned short reg)
+{
+	unsigned long port;
+	unsigned char val;
+	unsigned long flags;
+
+	spin_lock_irqsave(&port_lock, flags);
+	reg += socket->number * 0x40;
+	port = socket->io_base;
+	outb(reg, port);
+	val = inb(port + 1);
+	spin_unlock_irqrestore(&port_lock, flags);
+
+	return val;
+}
+
+static unsigned short indirect_read16(struct pd6729_socket *socket, unsigned short reg)
+{
+	unsigned long port;
+	unsigned short tmp;
+	unsigned long flags;
+
+	spin_lock_irqsave(&port_lock, flags);
+	reg  = reg + socket->number * 0x40;
+	port = socket->io_base;
+	outb(reg, port);
+	tmp = inb(port + 1);
+	reg++;
+	outb(reg, port);
+	tmp = tmp | (inb(port + 1) << 8);
+	spin_unlock_irqrestore(&port_lock, flags);
+
+	return tmp;
+}
+
+static void indirect_write(struct pd6729_socket *socket, unsigned short reg, unsigned char value)
+{
+	unsigned long port;
+	unsigned long flags;
+
+	spin_lock_irqsave(&port_lock, flags);
+	reg = reg + socket->number * 0x40;
+	port = socket->io_base;
+	outb(reg, port);
+	outb(value, port + 1);
+	spin_unlock_irqrestore(&port_lock, flags);
+}
+
+static void indirect_setbit(struct pd6729_socket *socket, unsigned short reg, unsigned char mask)
+{
+	unsigned long port;
+	unsigned char val;
+	unsigned long flags;
+
+	spin_lock_irqsave(&port_lock, flags);
+	reg = reg + socket->number * 0x40;
+	port = socket->io_base;
+	outb(reg, port);
+	val = inb(port + 1);
+	val |= mask;
+	outb(reg, port);
+	outb(val, port + 1);
+	spin_unlock_irqrestore(&port_lock, flags);
+}
+
+static void indirect_resetbit(struct pd6729_socket *socket, unsigned short reg, unsigned char mask)
+{
+	unsigned long port;
+	unsigned char val;
+	unsigned long flags;
+
+	spin_lock_irqsave(&port_lock, flags);
+	reg = reg + socket->number * 0x40;
+	port = socket->io_base;
+	outb(reg, port);
+	val = inb(port + 1);
+	val &= ~mask;
+	outb(reg, port);
+	outb(val, port + 1);
+	spin_unlock_irqrestore(&port_lock, flags);
+}
+
+static void indirect_write16(struct pd6729_socket *socket, unsigned short reg, unsigned short value)
+{
+	unsigned long port;
+	unsigned char val;
+	unsigned long flags;
+
+	spin_lock_irqsave(&port_lock, flags);
+	reg = reg + socket->number * 0x40;
+	port = socket->io_base;
+
+	outb(reg, port);
+	val = value & 255;
+	outb(val, port + 1);
+
+	reg++;
+
+	outb(reg, port);
+	val = value >> 8;
+	outb(val, port + 1);
+	spin_unlock_irqrestore(&port_lock, flags);
+}
+
+/* Interrupt handler functionality */
+
+static irqreturn_t pd6729_interrupt(int irq, void *dev, struct pt_regs *regs)
+{
+	struct pd6729_socket *socket = (struct pd6729_socket *)dev;
+	int i;
+	int loopcount = 0;
+	int handled = 0;
+	unsigned int events, active = 0;
+
+	while (1) {
+		loopcount++;
+		if (loopcount > 20) {
+			printk(KERN_ERR "pd6729: infinite eventloop in interrupt\n");
+			break;
+		}
+
+		active = 0;
+
+		for (i = 0; i < MAX_SOCKETS; i++) {
+			unsigned int csc;
+
+			/* card status change register */
+			csc = indirect_read(&socket[i], I365_CSC);
+			if (csc == 0)  /* no events on this socket */
+				continue;
+
+			handled = 1;
+			events = 0;
+
+			if (csc & I365_CSC_DETECT) {
+				events |= SS_DETECT;
+				dprintk("Card detected in socket %i!\n", i);
+			}
+
+			if (indirect_read(&socket[i], I365_INTCTL) & I365_PC_IOCARD) {
+				/* For IO/CARDS, bit 0 means "read the card" */
+				events |= (csc & I365_CSC_STSCHG) ? SS_STSCHG : 0;
+			} else {
+				/* Check for battery/ready events */
+				events |= (csc & I365_CSC_BVD1) ? SS_BATDEAD : 0;
+				events |= (csc & I365_CSC_BVD2) ? SS_BATWARN : 0;
+				events |= (csc & I365_CSC_READY) ? SS_READY : 0;
+			}
+
+			if (events) {
+				pcmcia_parse_events(&socket[i].socket, events);
+			}
+			active |= events;
+		}
+
+		if (active == 0) /* no more events to handle */
+			break;
+	}
+	return IRQ_RETVAL(handled);
+}
+
+/* socket functions */
+
+static void set_bridge_state(struct pd6729_socket *socket)
+{
+	indirect_write(socket, I365_GBLCTL, 0x00);
+	indirect_write(socket, I365_GENCTL, 0x00);
+
+	indirect_setbit(socket, I365_INTCTL, 0x08);
+}
+
+static int pd6729_get_status(struct pcmcia_socket *sock, u_int *value)
+{
+	struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
+	unsigned int status;
+	unsigned int data;
+	struct pd6729_socket *t;
+
+	/* Interface Status Register */
+	status = indirect_read(socket, I365_STATUS);
+	*value = 0;
+
+	if ((status & I365_CS_DETECT) == I365_CS_DETECT) {
+		*value |= SS_DETECT;
+	}
+
+	/* IO cards have a different meaning of bits 0,1 */
+	/* Also notice the inverse-logic on the bits */
+	if (indirect_read(socket, I365_INTCTL) & I365_PC_IOCARD) {
+		/* IO card */
+		if (!(status & I365_CS_STSCHG))
+			*value |= SS_STSCHG;
+	} else {
+		/* non I/O card */
+		if (!(status & I365_CS_BVD1))
+			*value |= SS_BATDEAD;
+		if (!(status & I365_CS_BVD2))
+			*value |= SS_BATWARN;
+	}
+
+	if (status & I365_CS_WRPROT)
+		*value |= SS_WRPROT;	/* card is write protected */
+
+	if (status & I365_CS_READY)
+		*value |= SS_READY;	/* card is not busy */
+
+	if (status & I365_CS_POWERON)
+		*value |= SS_POWERON;	/* power is applied to the card */
+
+	t = (socket->number) ? socket : socket + 1;
+	indirect_write(t, PD67_EXT_INDEX, PD67_EXTERN_DATA);
+	data = indirect_read16(t, PD67_EXT_DATA);
+	*value |= (data & PD67_EXD_VS1(socket->number)) ? 0 : SS_3VCARD;
+
+	return 0;
+}
+
+
+static int pd6729_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
+{
+	struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
+	unsigned char reg, vcc, vpp;
+
+	state->flags    = 0;
+	state->Vcc      = 0;
+	state->Vpp      = 0;
+	state->io_irq   = 0;
+	state->csc_mask = 0;
+
+	/* First the power status of the socket */
+	/* PCTRL - Power Control Register */
+	reg = indirect_read(socket, I365_POWER);
+
+	if (reg & I365_PWR_AUTO)
+		state->flags |= SS_PWR_AUTO;  /* Automatic Power Switch */
+
+	if (reg & I365_PWR_OUT)
+		state->flags |= SS_OUTPUT_ENA; /* Output signals are enabled */
+
+	vcc = reg & I365_VCC_MASK;    vpp = reg & I365_VPP1_MASK;
+
+	if (reg & I365_VCC_5V) {
+		state->Vcc = (indirect_read(socket, PD67_MISC_CTL_1) &
+			PD67_MC1_VCC_3V) ? 33 : 50;
+
+		if (vpp == I365_VPP1_5V) {
+			if (state->Vcc == 50)
+				state->Vpp = 50;
+			else
+				state->Vpp = 33;
+		}
+		if (vpp == I365_VPP1_12V)
+			state->Vpp = 120;
+	}
+
+	/* Now the IO card, RESET flags and IO interrupt */
+	/* IGENC, Interrupt and General Control */
+	reg = indirect_read(socket, I365_INTCTL);
+
+	if ((reg & I365_PC_RESET) == 0)
+		state->flags |= SS_RESET;
+	if (reg & I365_PC_IOCARD)
+		state->flags |= SS_IOCARD; /* This is an IO card */
+
+	/* Set the IRQ number */
+	state->io_irq = socket->socket.pci_irq;
+
+	/* Card status change */
+	/* CSCICR, Card Status Change Interrupt Configuration */
+	reg = indirect_read(socket, I365_CSCINT);
+
+	if (reg & I365_CSC_DETECT)
+		state->csc_mask |= SS_DETECT; /* Card detect is enabled */
+
+	if (state->flags & SS_IOCARD) {/* IO Cards behave different */
+		if (reg & I365_CSC_STSCHG)
+			state->csc_mask |= SS_STSCHG;
+	} else {
+		if (reg & I365_CSC_BVD1)
+			state->csc_mask |= SS_BATDEAD;
+		if (reg & I365_CSC_BVD2)
+			state->csc_mask |= SS_BATWARN;
+		if (reg & I365_CSC_READY)
+			state->csc_mask |= SS_READY;
+	}
+
+	return 0;
+}
+
+static int pd6729_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
+{
+	struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
+	unsigned char reg;
+
+	/* First, set the global controller options */
+
+	set_bridge_state(socket);
+
+	/* Values for the IGENC register */
+
+	reg = 0;
+ 	/* The reset bit has "inverse" logic */
+	if (!(state->flags & SS_RESET))
+		reg = reg | I365_PC_RESET;
+	if (state->flags & SS_IOCARD)
+		reg = reg | I365_PC_IOCARD;
+
+	/* IGENC, Interrupt and General Control Register */
+	indirect_write(socket, I365_INTCTL, reg);
+
+	/* Power registers */
+
+	reg = I365_PWR_NORESET; /* default: disable resetdrv on resume */
+
+	if (state->flags & SS_PWR_AUTO) {
+		dprintk("Auto power\n");
+		reg |= I365_PWR_AUTO;	/* automatic power mngmnt */
+	}
+	if (state->flags & SS_OUTPUT_ENA) {
+		dprintk("Power Enabled\n");
+		reg |= I365_PWR_OUT;	/* enable power */
+	}
+
+	switch (state->Vcc) {
+	case 0:
+		break;
+	case 33:
+		dprintk("setting voltage to Vcc to 3.3V on socket %i\n",
+			socket->number);
+		reg |= I365_VCC_5V;
+		indirect_setbit(socket, PD67_MISC_CTL_1, PD67_MC1_VCC_3V);
+		break;
+	case 50:
+		dprintk("setting voltage to Vcc to 5V on socket %i\n",
+			socket->number);
+		reg |= I365_VCC_5V;
+		indirect_resetbit(socket, PD67_MISC_CTL_1, PD67_MC1_VCC_3V);
+		break;
+	default:
+		dprintk("pd6729: pd6729_set_socket called with invalid VCC power value: %i\n",
+			state->Vcc);
+		return -EINVAL;
+	}
+
+	switch (state->Vpp) {
+	case 0:
+		dprintk("not setting Vpp on socket %i\n", socket->number);
+		break;
+	case 33:
+	case 50:
+		dprintk("setting Vpp to Vcc for socket %i\n", socket->number);
+		reg |= I365_VPP1_5V;
+		break;
+	case 120:
+		dprintk("setting Vpp to 12.0\n");
+		reg |= I365_VPP1_12V;
+		break;
+	default:
+		dprintk("pd6729: pd6729_set_socket called with invalid VPP power value: %i\n",
+			state->Vpp);
+		return -EINVAL;
+	}
+
+	/* only write if changed */
+	if (reg != indirect_read(socket, I365_POWER))
+		indirect_write(socket, I365_POWER, reg);
+
+	/* Now, specifiy that all interrupts are to be done as PCI interrupts */
+	indirect_write(socket, PD67_EXT_INDEX, PD67_EXT_CTL_1);
+	indirect_write(socket, PD67_EXT_DATA, PD67_EC1_INV_MGMT_IRQ | PD67_EC1_INV_CARD_IRQ);
+
+	/* Enable specific interrupt events */
+
+	reg = 0x00;
+	if (state->csc_mask & SS_DETECT) {
+		reg |= I365_CSC_DETECT;
+	}
+	if (state->flags & SS_IOCARD) {
+		if (state->csc_mask & SS_STSCHG)
+			reg |= I365_CSC_STSCHG;
+	} else {
+		if (state->csc_mask & SS_BATDEAD)
+			reg |= I365_CSC_BVD1;
+		if (state->csc_mask & SS_BATWARN)
+			reg |= I365_CSC_BVD2;
+		if (state->csc_mask & SS_READY)
+			reg |= I365_CSC_READY;
+	}
+	reg |= 0x30;	/* management IRQ: PCI INTA# = "irq 3" */
+	indirect_write(socket, I365_CSCINT, reg);
+
+	reg = indirect_read(socket, I365_INTCTL);
+	reg |= 0x03;	/* card IRQ: PCI INTA# = "irq 3" */
+	indirect_write(socket, I365_INTCTL, reg);
+
+	/* now clear the (probably bogus) pending stuff by doing a dummy read */
+	(void)indirect_read(socket, I365_CSC);
+
+	return 0;
+}
+
+static int pd6729_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *io)
+{
+	struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
+	unsigned char map, ioctl;
+
+	map = io->map;
+
+	/* Check error conditions */
+	if (map > 1) {
+		dprintk("pd6729_set_io_map with invalid map");
+		return -EINVAL;
+	}
+
+	/* Turn off the window before changing anything */
+	if (indirect_read(socket, I365_ADDRWIN) & I365_ENA_IO(map))
+		indirect_resetbit(socket, I365_ADDRWIN, I365_ENA_IO(map));
+
+/*	dprintk("set_io_map: Setting range to %x - %x\n", io->start, io->stop);*/
+
+	/* write the new values */
+	indirect_write16(socket, I365_IO(map)+I365_W_START, io->start);
+	indirect_write16(socket, I365_IO(map)+I365_W_STOP, io->stop);
+
+	ioctl = indirect_read(socket, I365_IOCTL) & ~I365_IOCTL_MASK(map);
+
+	if (io->flags & MAP_0WS) ioctl |= I365_IOCTL_0WS(map);
+	if (io->flags & MAP_16BIT) ioctl |= I365_IOCTL_16BIT(map);
+	if (io->flags & MAP_AUTOSZ) ioctl |= I365_IOCTL_IOCS16(map);
+
+	indirect_write(socket, I365_IOCTL, ioctl);
+
+	/* Turn the window back on if needed */
+	if (io->flags & MAP_ACTIVE)
+		indirect_setbit(socket, I365_ADDRWIN, I365_ENA_IO(map));
+
+	return 0;
+}
+
+static int pd6729_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *mem)
+{
+	struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
+	unsigned short base, i;
+	unsigned char map;
+
+	map = mem->map;
+	if (map > 4) {
+		printk("pd6729_set_mem_map: invalid map");
+		return -EINVAL;
+	}
+
+	if ((mem->sys_start > mem->sys_stop) || (mem->speed > 1000)) {
+		printk("pd6729_set_mem_map: invalid address / speed");
+		/* printk("invalid mem map for socket %i : %lx to %lx with a start of %x\n",
+			 sock, mem->sys_start, mem->sys_stop, mem->card_start); */
+		return -EINVAL;
+	}
+
+	/* Turn off the window before changing anything */
+	if (indirect_read(socket, I365_ADDRWIN) & I365_ENA_MEM(map))
+		indirect_resetbit(socket, I365_ADDRWIN, I365_ENA_MEM(map));
+
+	/* write the start address */
+	base = I365_MEM(map);
+	i = (mem->sys_start >> 12) & 0x0fff;
+	if (mem->flags & MAP_16BIT)
+		i |= I365_MEM_16BIT;
+	if (mem->flags & MAP_0WS)
+		i |= I365_MEM_0WS;
+	indirect_write16(socket, base + I365_W_START, i);
+
+	/* write the stop address */
+
+	i= (mem->sys_stop >> 12) & 0x0fff;
+	switch (to_cycles(mem->speed)) {
+	case 0:
+		break;
+	case 1:
+		i |= I365_MEM_WS0;
+		break;
+	case 2:
+		i |= I365_MEM_WS1;
+		break;
+	default:
+		i |= I365_MEM_WS1 | I365_MEM_WS0;
+		break;
+	}
+
+	indirect_write16(socket, base + I365_W_STOP, i);
+
+	/* Take care of high byte */
+	indirect_write(socket, PD67_EXT_INDEX, PD67_MEM_PAGE(map));
+	indirect_write(socket, PD67_EXT_DATA, mem->sys_start >> 24);
+
+	/* card start */
+
+	i = ((mem->card_start - mem->sys_start) >> 12) & 0x3fff;
+	if (mem->flags & MAP_WRPROT)
+		i |= I365_MEM_WRPROT;
+	if (mem->flags & MAP_ATTRIB) {
+/*		dprintk("requesting attribute memory for socket %i\n",
+			socket->number);*/
+		i |= I365_MEM_REG;
+	} else {
+/*		dprintk("requesting normal memory for socket %i\n",
+			socket->number);*/
+	}
+	indirect_write16(socket, base + I365_W_OFF, i);
+
+	/* Enable the window if necessary */
+	if (mem->flags & MAP_ACTIVE)
+		indirect_setbit(socket, I365_ADDRWIN, I365_ENA_MEM(map));
+
+	return 0;
+}
+
+static int pd6729_suspend(struct pcmcia_socket *sock)
+{
+	return pd6729_set_socket(sock, &dead_socket);
+}
+
+static int pd6729_init(struct pcmcia_socket *sock)
+{
+	int i;
+	struct resource res = { .end = 0x0fff };
+	pccard_io_map io = { 0, 0, 0, 0, 1 };
+	pccard_mem_map mem = { .res = &res, .sys_stop = 0x0fff };
+
+	pd6729_set_socket(sock, &dead_socket);
+	for (i = 0; i < 2; i++) {
+		io.map = i;
+		pd6729_set_io_map(sock, &io);
+	}
+	for (i = 0; i < 5; i++) {
+		mem.map = i;
+		pd6729_set_mem_map(sock, &mem);
+	}
+
+	return 0;
+}
+
+
+/* the pccard structure and its functions */
+static struct pccard_operations pd6729_operations = {
+	.init 			= pd6729_init,
+	.suspend		= pd6729_suspend,
+	.get_status		= pd6729_get_status,
+	.get_socket		= pd6729_get_socket,
+	.set_socket		= pd6729_set_socket,
+	.set_io_map		= pd6729_set_io_map,
+	.set_mem_map		= pd6729_set_mem_map,
+};
+
+static int __devinit pd6729_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
+{
+	int i, j, ret;
+	char configbyte;
+	struct pd6729_socket *socket;
+
+	socket = kmalloc(sizeof(struct pd6729_socket) * MAX_SOCKETS, GFP_KERNEL);
+	if (!socket)
+		return -ENOMEM;
+
+	memset(socket, 0, sizeof(struct pd6729_socket) * MAX_SOCKETS);
+
+	if ((ret = pci_enable_device(dev)))
+		goto err_out_free_mem;
+
+	printk(KERN_INFO "pd6729: Cirrus PD6729 PCI to PCMCIA Bridge at 0x%lx on irq %d\n",
+		pci_resource_start(dev, 0), dev->irq);
+	printk(KERN_INFO "pd6729: configured as a %d socket device.\n", MAX_SOCKETS);
+ 	/* Since we have no memory BARs some firmware we may not
+ 	   have had PCI_COMMAND_MEM enabled, yet the device needs
+ 	   it. */
+	pci_read_config_byte(dev, PCI_COMMAND, &configbyte);
+	if (!(configbyte & PCI_COMMAND_MEMORY)) {
+		printk(KERN_DEBUG "pd6729: Enabling PCI_COMMAND_MEMORY.\n");
+		configbyte |= PCI_COMMAND_MEMORY;
+		pci_write_config_byte(dev, PCI_COMMAND, configbyte);
+	}
+
+	ret = pci_request_regions(dev, "pd6729");
+	if (ret) {
+		printk(KERN_INFO "pd6729: pci request region failed.\n");
+		goto err_out_disable;
+	}
+
+	for (i = 0; i < MAX_SOCKETS; i++) {
+		socket[i].io_base = pci_resource_start(dev, 0);
+		socket[i].socket.features |= SS_CAP_PCCARD;
+		socket[i].socket.map_size = 0x1000;
+		socket[i].socket.irq_mask = 0;
+		socket[i].socket.pci_irq  = dev->irq;
+		socket[i].socket.owner = THIS_MODULE;
+
+		socket[i].number = i;
+
+		socket[i].socket.ops = &pd6729_operations;
+		socket[i].socket.dev.dev = &dev->dev;
+		socket[i].socket.driver_data = &socket[i];
+	}
+
+	pci_set_drvdata(dev, socket);
+
+	/* Register the interrupt handler */
+	if ((ret = request_irq(dev->irq, pd6729_interrupt, SA_SHIRQ, "pd6729", socket))) {
+		printk(KERN_ERR "pd6729: Failed to register irq %d, aborting\n", dev->irq);
+		goto err_out_free_res;
+	}
+
+	for (i = 0; i < MAX_SOCKETS; i++) {
+		ret = pcmcia_register_socket(&socket[i].socket);
+		if (ret) {
+			printk(KERN_INFO "pd6729: pcmcia_register_socket failed.\n");
+			for (j = 0; j < i ; j++)
+				pcmcia_unregister_socket(&socket[j].socket);
+			goto err_out_free_res2;
+		}
+	}
+
+	return 0;
+
+ err_out_free_res2:
+	free_irq(dev->irq, socket);
+ err_out_free_res:
+	pci_release_regions(dev);
+ err_out_disable:
+	pci_disable_device(dev);
+
+ err_out_free_mem:
+	kfree(socket);
+	return ret;
+}
+
+static void __devexit pd6729_pci_remove(struct pci_dev *dev)
+{
+	int i;
+	struct pd6729_socket *socket = pci_get_drvdata(dev);
+
+	for (i = 0; i < MAX_SOCKETS; i++)
+		pcmcia_unregister_socket(&socket[i].socket);
+
+	free_irq(dev->irq, socket);
+	pci_release_regions(dev);
+	pci_disable_device(dev);
+
+	kfree(socket);
+}
+
+static int pd6729_socket_suspend(struct pci_dev *dev, u32 state)
+{
+	return pcmcia_socket_dev_suspend(&dev->dev, state);
+}
+
+static int pd6729_socket_resume(struct pci_dev *dev)
+{
+	return pcmcia_socket_dev_resume(&dev->dev);
+}
+
+static struct pci_device_id pd6729_pci_ids[] = {
+	{
+		.vendor		= PCI_VENDOR_ID_CIRRUS,
+		.device		= PCI_DEVICE_ID_CIRRUS_6729,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= PCI_ANY_ID,
+	},
+	{ }
+};
+MODULE_DEVICE_TABLE(pci, pd6729_pci_ids);
+
+static struct pci_driver pd6729_pci_drv = {
+	.name		= "pd6729",
+	.id_table	= pd6729_pci_ids,
+	.probe		= pd6729_pci_probe,
+	.remove		= __devexit_p(pd6729_pci_remove),
+	.suspend	= pd6729_socket_suspend,
+	.resume		= pd6729_socket_resume,
+};
+
+static int pd6729_module_init(void)
+{
+	return pci_module_init(&pd6729_pci_drv);
+}
+
+static void pd6729_module_exit(void)
+{
+	pci_unregister_driver(&pd6729_pci_drv);
+}
+
+module_init(pd6729_module_init);
+module_exit(pd6729_module_exit);
--- diff/drivers/pcmcia/pd6729.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/pcmcia/pd6729.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,28 @@
+#ifndef _INCLUDE_GUARD_PD6729_H_
+#define _INCLUDE_GUARD_PD6729_H_
+
+/* Debuging defines */
+#ifdef NOTRACE
+#define dprintk(fmt, args...) printk(fmt , ## args)
+#else
+#define dprintk(fmt, args...) do {} while (0)
+#endif
+
+/* Flags for I365_GENCTL */
+#define I365_DF_VS1		0x40	/* DF-step Voltage Sense */
+#define I365_DF_VS2		0x80
+
+/* Fields in PD67_EXTERN_DATA */
+#define PD67_EXD_VS1(s)		(0x01 << ((s) << 1))
+#define PD67_EXD_VS2(s)		(0x02 << ((s) << 1))
+
+
+
+
+struct pd6729_socket {
+	int	number;
+	unsigned long io_base; 	/* base io address of the socket */
+	struct pcmcia_socket socket;
+};
+
+#endif
--- diff/drivers/perfctr/Kconfig	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/Kconfig	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,45 @@
+# $Id: Kconfig,v 1.10 2004/05/24 11:00:55 mikpe Exp $
+# Performance-monitoring counters driver configuration
+#
+
+menu "Performance-monitoring counters support"
+
+config PERFCTR
+	bool "Performance monitoring counters support"
+	help
+	  This driver provides access to the performance-monitoring counter
+	  registers available in some (but not all) modern processors.
+	  These special-purpose registers can be programmed to count low-level
+	  performance-related events which occur during program execution,
+	  such as cache misses, pipeline stalls, etc.
+
+	  You can safely say Y here, even if you intend to run the kernel
+	  on a processor without performance-monitoring counters.
+
+config PERFCTR_INIT_TESTS
+	bool "Init-time hardware tests"
+	depends on PERFCTR
+	help
+	  This option makes the driver perform additional hardware tests
+	  during initialisation, and log their results in the kernel's
+	  message buffer. For most supported processors, these tests simply
+	  measure the runtime overheads of performance counter operations.
+
+	  If you have a less well-known processor (one not listed in the
+	  etc/costs/ directory in the user-space package), you should enable
+	  this option and email the results to the perfctr developers.
+
+	  If unsure, say N.
+
+config PERFCTR_VIRTUAL
+	bool "Virtual performance counters support"
+	depends on PERFCTR
+	help
+	  The processor's performance-monitoring counters are special-purpose
+	  global registers. This option adds support for virtual per-process
+	  performance-monitoring counters which only run when the process
+	  to which they belong is executing. This improves the accuracy of
+	  performance measurements by reducing "noise" from other processes.
+
+	  Say Y.
+endmenu
--- diff/drivers/perfctr/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,16 @@
+# $Id: Makefile,v 1.26 2004/05/30 23:02:14 mikpe Exp $
+# Makefile for the Performance-monitoring counters driver.
+
+# This also covers x86_64.
+perfctr-objs-$(CONFIG_X86) := x86.o
+tests-objs-$(CONFIG_X86) := x86_tests.o
+
+perfctr-objs-$(CONFIG_PPC32) := ppc.o
+tests-objs-$(CONFIG_PPC32) := ppc_tests.o
+
+perfctr-objs-y += init.o
+perfctr-objs-$(CONFIG_PERFCTR_INIT_TESTS) += $(tests-objs-y)
+perfctr-objs-$(CONFIG_PERFCTR_VIRTUAL) += virtual.o
+
+perfctr-objs		:= $(perfctr-objs-y)
+obj-$(CONFIG_PERFCTR)	:= perfctr.o
--- diff/drivers/perfctr/cpumask.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/cpumask.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,24 @@
+/* $Id: cpumask.h,v 1.7 2004/05/12 19:59:01 mikpe Exp $
+ * Performance-monitoring counters driver.
+ * Partial simulation of cpumask_t on non-cpumask_t kernels.
+ * Extension to allow inspecting a cpumask_t as array of ulong.
+ * Appropriate definition of perfctr_cpus_forbidden_mask.
+ *
+ * Copyright (C) 2003-2004  Mikael Pettersson
+ */
+
+#ifdef CPU_ARRAY_SIZE
+#define PERFCTR_CPUMASK_NRLONGS	CPU_ARRAY_SIZE
+#else
+#define PERFCTR_CPUMASK_NRLONGS	1
+#endif
+
+/* `perfctr_cpus_forbidden_mask' used to be defined in <asm/perfctr.h>,
+   but cpumask_t compatibility issues forced it to be moved here. */
+#ifdef PERFCTR_CPUS_FORBIDDEN_MASK_NEEDED
+extern cpumask_t perfctr_cpus_forbidden_mask;
+#define perfctr_cpu_is_forbidden(cpu)	cpu_isset((cpu), perfctr_cpus_forbidden_mask)
+#else
+#define perfctr_cpus_forbidden_mask	CPU_MASK_NONE
+#define perfctr_cpu_is_forbidden(cpu)	0 /* cpu_isset() needs an lvalue :-( */
+#endif
--- diff/drivers/perfctr/init.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/init.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,97 @@
+/* $Id: init.c,v 1.76 2004/05/31 18:18:55 mikpe Exp $
+ * Performance-monitoring counters driver.
+ * Top-level initialisation code.
+ *
+ * Copyright (C) 1999-2004  Mikael Pettersson
+ */
+#include <linux/config.h>
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/perfctr.h>
+
+#include <asm/uaccess.h>
+
+#include "cpumask.h"
+#include "virtual.h"
+#include "version.h"
+
+struct perfctr_info perfctr_info = {
+	.abi_version = PERFCTR_ABI_VERSION,
+	.driver_version = VERSION,
+};
+
+char *perfctr_cpu_name __initdata;
+
+static int cpus_copy_to_user(const cpumask_t *cpus, struct perfctr_cpu_mask *argp)
+{
+	const unsigned int k_nrwords = PERFCTR_CPUMASK_NRLONGS*(sizeof(long)/sizeof(int));
+	unsigned int u_nrwords;
+	unsigned int ui, ki, j;
+
+	if (get_user(u_nrwords, &argp->nrwords))
+		return -EFAULT;
+	if (put_user(k_nrwords, &argp->nrwords))
+		return -EFAULT;
+	if (u_nrwords < k_nrwords)
+		return -EOVERFLOW;
+	for(ui = 0, ki = 0; ki < PERFCTR_CPUMASK_NRLONGS; ++ki) {
+		unsigned long mask = cpus_addr(*cpus)[ki];
+		for(j = 0; j < sizeof(long)/sizeof(int); ++j) {
+			if (put_user((unsigned int)mask, &argp->mask[ui]))
+				return -EFAULT;
+			++ui;
+			mask = (mask >> (8*sizeof(int)-1)) >> 1;
+		}
+	}
+	return 0;
+}
+
+asmlinkage long sys_perfctr_info(struct perfctr_info *infop,
+				 struct perfctr_cpu_mask *cpusp,
+				 struct perfctr_cpu_mask *forbiddenp)
+{
+	if (infop && copy_to_user(infop, &perfctr_info, sizeof perfctr_info))
+		return -EFAULT;
+	if (cpusp) {
+		cpumask_t cpus = cpu_online_map;
+		int err = cpus_copy_to_user(&cpus, cpusp);
+		if (err)
+			return err;
+	}
+	if (forbiddenp) {
+		cpumask_t cpus = perfctr_cpus_forbidden_mask;
+		int err = cpus_copy_to_user(&cpus, forbiddenp);
+		if (err)
+			return err;
+	}
+	return 0;
+}
+
+int __init perfctr_init(void)
+{
+	int err;
+
+	err = perfctr_cpu_init();
+	if (err) {
+		printk(KERN_INFO "perfctr: not supported by this processor\n");
+		return err;
+	}
+	err = vperfctr_init();
+	if (err)
+		return err;
+	printk(KERN_INFO "perfctr: driver %s, cpu type %s at %u kHz\n",
+	       perfctr_info.driver_version,
+	       perfctr_cpu_name,
+	       perfctr_info.cpu_khz);
+	return 0;
+}
+
+void __exit perfctr_exit(void)
+{
+	vperfctr_exit();
+	perfctr_cpu_exit();
+}
+
+module_init(perfctr_init)
+module_exit(perfctr_exit)
--- diff/drivers/perfctr/ppc.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/ppc.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,943 @@
+/* $Id: ppc.c,v 1.12 2004/05/31 18:13:42 mikpe Exp $
+ * PPC32 performance-monitoring counters driver.
+ *
+ * Copyright (C) 2004  Mikael Pettersson
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/fs.h>
+#include <linux/perfctr.h>
+#include <asm/prom.h>
+#include <asm/time.h>		/* tb_ticks_per_jiffy, get_tbl() */
+
+#include "ppc_tests.h"
+
+/* Support for lazy evntsel and perfctr SPR updates. */
+struct per_cpu_cache {	/* roughly a subset of perfctr_cpu_state */
+	union {
+		unsigned int id;	/* cache owner id */
+	} k1;
+	/* Physically indexed cache of the MMCRs. */
+	unsigned int ppc_mmcr[3];
+} ____cacheline_aligned;
+static DEFINE_PER_CPU(struct per_cpu_cache, per_cpu_cache);
+#define get_cpu_cache()	__get_cpu_var(per_cpu_cache)
+
+/* Structure for counter snapshots, as 32-bit values. */
+struct perfctr_low_ctrs {
+	unsigned int tsc;
+	unsigned int pmc[6];
+};
+
+enum pm_type {
+	PM_NONE,
+	PM_604,
+	PM_604e,
+	PM_750,	/* XXX: Minor event set diffs between IBM and Moto. */
+	PM_7400,
+	PM_7450,
+};
+static enum pm_type pm_type;
+
+/* Bits users shouldn't set in control.ppc.mmcr0:
+ * - PMXE because we don't yet support overflow interrupts
+ * - PMC1SEL/PMC2SEL because event selectors are in control.evntsel[]
+ */
+#define MMCR0_RESERVED		(MMCR0_PMXE | MMCR0_PMC1SEL | MMCR0_PMC2SEL)
+
+static unsigned int new_id(void)
+{
+	static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+	static unsigned int counter;
+	int id;
+
+	spin_lock(&lock);
+	id = ++counter;
+	spin_unlock(&lock);
+	return id;
+}
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+static void perfctr_default_ihandler(unsigned long pc)
+{
+}
+
+static perfctr_ihandler_t perfctr_ihandler = perfctr_default_ihandler;
+
+void do_perfctr_interrupt(struct pt_regs *regs)
+{
+	preempt_disable();
+	(*perfctr_ihandler)(regs->nip);
+	preempt_enable_no_resched();
+}
+
+void perfctr_cpu_set_ihandler(perfctr_ihandler_t ihandler)
+{
+	perfctr_ihandler = ihandler ? ihandler : perfctr_default_ihandler;
+}
+
+#else
+#define perfctr_cstatus_has_ictrs(cstatus)	0
+#endif
+
+#if defined(CONFIG_SMP) && defined(PERFCTR_INTERRUPT_SUPPORT)
+
+static inline void
+set_isuspend_cpu(struct perfctr_cpu_state *state, int cpu)
+{
+	state->k1.isuspend_cpu = cpu;
+}
+
+static inline int
+is_isuspend_cpu(const struct perfctr_cpu_state *state, int cpu)
+{
+	return state->k1.isuspend_cpu == cpu;
+}
+
+static inline void clear_isuspend_cpu(struct perfctr_cpu_state *state)
+{
+	state->k1.isuspend_cpu = NR_CPUS;
+}
+
+#else
+static inline void set_isuspend_cpu(struct perfctr_cpu_state *state, int cpu) { }
+static inline int is_isuspend_cpu(const struct perfctr_cpu_state *state, int cpu) { return 1; }
+static inline void clear_isuspend_cpu(struct perfctr_cpu_state *state) { }
+#endif
+
+/****************************************************************
+ *								*
+ * Driver procedures.						*
+ *								*
+ ****************************************************************/
+
+/*
+ * The PowerPC 604/750/74xx family.
+ *
+ * Common features
+ * ---------------
+ * - Per counter event selection data in subfields of control registers.
+ *   MMCR0 contains both global control and PMC1/PMC2 event selectors.
+ * - Overflow interrupt support is present in all processors, but an
+ *   erratum makes it difficult to use in 750/7400/7410 processors.
+ * - There is no concept of per-counter qualifiers:
+ *   - User-mode/supervisor-mode restrictions are global.
+ *   - Two groups of counters, PMC1 and PMC2-PMC<highest>. Each group
+ *     has a single overflow interrupt/event enable/disable flag.
+ * - The instructions used to read (mfspr) and write (mtspr) the control
+ *   and counter registers (SPRs) only support hardcoded register numbers.
+ *   There is no support for accessing an SPR via a runtime value.
+ * - Each counter supports its own unique set of events. However, events
+ *   0-1 are common for PMC1-PMC4, and events 2-4 are common for PMC1-PMC4.
+ * - There is no separate high-resolution core clock counter.
+ *   The time-base counter is available, but it typically runs an order of
+ *   magnitude slower than the core clock.
+ *   Any performance counter can be programmed to count core clocks, but
+ *   doing this (a) reserves one PMC, and (b) needs indirect accesses
+ *   since the SPR number in general isn't known at compile-time.
+ *
+ * Driver notes
+ * ------------
+ * - The driver currently does not support performance monitor interrupts,
+ *   mostly because of the 750/7400/7410 erratum. Working around it would
+ *   require disabling the decrementer interrupt, reserving a performance
+ *   counter and setting it up for TBL bit-flip events, and having the PMI
+ *   handler invoke the decrementer handler.
+ *
+ * 604
+ * ---
+ * 604 has MMCR0, PMC1, PMC2, SIA, and SDA.
+ *
+ * MMCR0[THRESHOLD] is not automatically multiplied.
+ *
+ * On the 604, software must always reset MMCR0[ENINT] after
+ * taking a PMI. This is not the case for the 604e.
+ *
+ * 604e
+ * ----
+ * 604e adds MMCR1, PMC3, and PMC4.
+ * Bus-to-core multiplier is available via HID1[PLL_CFG].
+ *
+ * MMCR0[THRESHOLD] is automatically multiplied by 4.
+ *
+ * When the 604e vectors to the PMI handler, it automatically
+ * clears any pending PMIs. Unlike the 604, the 604e does not
+ * require MMCR0[ENINT] to be cleared (and possibly reset)
+ * before external interrupts can be re-enabled.
+ *
+ * 750
+ * ---
+ * 750 adds user-readable MMCRn/PMCn/SIA registers, and removes SDA.
+ *
+ * MMCR0[THRESHOLD] is not automatically multiplied.
+ *
+ * Motorola MPC750UM.pdf, page C-78, states: "The performance monitor
+ * of the MPC755 functions the same as that of the MPC750, (...), except
+ * that for both the MPC750 and MPC755, no combination of the thermal
+ * assist unit, the decrementer register, and the performance monitor
+ * can be used at any one time. If exceptions for any two of these
+ * functional blocks are enabled together, multiple exceptions caused
+ * by any of these three blocks cause unpredictable results."
+ *
+ * IBM 750CXe_Err_DD2X.pdf, Erratum #13, states that a PMI which
+ * occurs immediately after a delayed decrementer exception can
+ * corrupt SRR0, causing the processor to hang. It also states that
+ * PMIs via TB bit transitions can be used to simulate the decrementer.
+ *
+ * 750FX adds dual-PLL support and programmable core frequency switching.
+ *
+ * 74xx
+ * ----
+ * 7400 adds MMCR2 and BAMR.
+ *
+ * MMCR0[THRESHOLD] is multiplied by 2 or 32, as specified
+ * by MMCR2[THRESHMULT].
+ *
+ * 74xx changes the semantics of several MMCR0 control bits,
+ * compared to 604/750.
+ *
+ * PPC7410 Erratum No. 10: Like the MPC750 TAU/DECR/PMI erratum.
+ * Erratum No. 14 marks TAU as unsupported in 7410, but this leaves
+ * perfmon and decrementer interrupts as being mutually exclusive.
+ * Affects PPC7410 1.0-1.2 (PVR 0x800C1100-0x800C1102). 1.3 and up
+ * (PVR 0x800C1103 up) are Ok.
+ *
+ * 7450 adds PMC5 and PMC6.
+ *
+ * 7455/7445 V3.3 (PVR 80010303) and later use the 7457 PLL table,
+ * earlier revisions use the 7450 PLL table
+ */
+
+static inline unsigned int read_pmc(unsigned int pmc)
+{
+	switch (pmc) {
+	default: /* impossible, but silences gcc warning */
+	case 0:
+		return mfspr(SPRN_PMC1);
+	case 1:
+		return mfspr(SPRN_PMC2);
+	case 2:
+		return mfspr(SPRN_PMC3);
+	case 3:
+		return mfspr(SPRN_PMC4);
+	case 4:
+		return mfspr(SPRN_PMC5);
+	case 5:
+		return mfspr(SPRN_PMC6);
+	}
+}
+
+static void ppc_read_counters(/*const*/ struct perfctr_cpu_state *state,
+			      struct perfctr_low_ctrs *ctrs)
+{
+	unsigned int cstatus, nrctrs, i;
+
+	cstatus = state->cstatus;
+	if (perfctr_cstatus_has_tsc(cstatus))
+		ctrs->tsc = get_tbl();
+	nrctrs = perfctr_cstatus_nractrs(cstatus);
+	for(i = 0; i < nrctrs; ++i) {
+		unsigned int pmc = state->pmc[i].map;
+		ctrs->pmc[i] = read_pmc(pmc);
+	}
+	/* handle MMCR0 changes due to FCECE or TRIGGER on 74xx */
+	if (state->cstatus & (1<<30)) {
+		unsigned int mmcr0 = mfspr(SPRN_MMCR0);
+		state->ppc_mmcr[0] = mmcr0;
+		get_cpu_cache().ppc_mmcr[0] = mmcr0;
+	}
+}
+
+static unsigned int pmc_max_event(unsigned int pmc)
+{
+	switch (pmc) {
+	default: /* impossible, but silences gcc warning */
+	case 0:
+		return 127;
+	case 1:
+		return 63;
+	case 2:
+		return 31;
+	case 3:
+		return 31;
+	case 4:
+		return 31;
+	case 5:
+		return 63;
+	}
+}
+
+static unsigned int get_nr_pmcs(void)
+{
+	switch (pm_type) {
+	case PM_7450:
+		return 6;
+	case PM_7400:
+	case PM_750:
+	case PM_604e:
+		return 4;
+	case PM_604:
+		return 2;
+	default: /* PM_NONE, but silences gcc warning */
+		return 0;
+	}
+}
+
+static int ppc_check_control(struct perfctr_cpu_state *state)
+{
+	unsigned int i, nrctrs, pmc_mask, pmc;
+	unsigned int nr_pmcs, evntsel[6];
+
+	nr_pmcs = get_nr_pmcs();
+	nrctrs = state->control.nractrs;
+	if (state->control.nrictrs || nrctrs > nr_pmcs)
+		return -EINVAL;
+
+	pmc_mask = 0;
+	memset(evntsel, 0, sizeof evntsel);
+	for(i = 0; i < nrctrs; ++i) {
+		pmc = state->control.pmc_map[i];
+		state->pmc[i].map = pmc;
+		if (pmc >= nr_pmcs || (pmc_mask & (1<<pmc)))
+			return -EINVAL;
+		pmc_mask |= (1<<pmc);
+
+		evntsel[pmc] = state->control.evntsel[i];
+		if (evntsel[pmc] > pmc_max_event(pmc))
+			return -EINVAL;
+	}
+
+	switch (pm_type) {
+	case PM_7450:
+		if (state->control.ppc.mmcr2 & MMCR2_RESERVED)
+			return -EINVAL;
+		state->ppc_mmcr[2] = state->control.ppc.mmcr2;
+		break;
+	default:
+		if (state->control.ppc.mmcr2)
+			return -EINVAL;
+		state->ppc_mmcr[2] = 0;
+	}
+
+	if (state->control.ppc.mmcr0 & MMCR0_RESERVED)
+		return -EINVAL;
+	state->ppc_mmcr[0] = (state->control.ppc.mmcr0
+			      | (evntsel[0] << (31-25))
+			      | (evntsel[1] << (31-31)));
+
+	state->ppc_mmcr[1] = ((  evntsel[2] << (31-4))
+			      | (evntsel[3] << (31-9))
+			      | (evntsel[4] << (31-14))
+			      | (evntsel[5] << (31-20)));
+
+	state->k1.id = new_id();
+
+	/*
+	 * MMCR0[FC] and MMCR0[TRIGGER] may change on 74xx if FCECE or
+	 * TRIGGER is set. To avoid undoing those changes, we must read
+	 * MMCR0 back into state->ppc_mmcr[0] and the cache at suspends.
+	 */
+	switch (pm_type) {
+	case PM_7450:
+	case PM_7400:
+		if (state->ppc_mmcr[0] & (MMCR0_FCECE | MMCR0_TRIGGER))
+			state->cstatus |= (1<<30);
+	default:
+		;
+	}
+
+	return 0;
+}
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+static void ppc_isuspend(struct perfctr_cpu_state *state)
+{
+	// XXX
+}
+
+static void ppc_iresume(const struct perfctr_cpu_state *state)
+{
+	// XXX
+}
+#endif
+
+static void ppc_write_control(const struct perfctr_cpu_state *state)
+{
+	struct per_cpu_cache *cache;
+	unsigned int value;
+
+	cache = &get_cpu_cache();
+	if (cache->k1.id == state->k1.id)
+		return;
+	/*
+	 * Order matters here: update threshmult and event
+	 * selectors before updating global control, which
+	 * potentially enables PMIs.
+	 *
+	 * Since mtspr doesn't accept a runtime value for the
+	 * SPR number, unroll the loop so each mtspr targets
+	 * a constant SPR.
+	 *
+	 * For processors without MMCR2, we ensure that the
+	 * cache and the state indicate the same value for it,
+	 * preventing any actual mtspr to it. Ditto for MMCR1.
+	 */
+	value = state->ppc_mmcr[2];
+	if (value != cache->ppc_mmcr[2]) {
+		cache->ppc_mmcr[2] = value;
+		mtspr(SPRN_MMCR2, value);
+	}
+	value = state->ppc_mmcr[1];
+	if (value != cache->ppc_mmcr[1]) {
+		cache->ppc_mmcr[1] = value;
+		mtspr(SPRN_MMCR1, value);
+	}
+	value = state->ppc_mmcr[0];
+	if (value != cache->ppc_mmcr[0]) {
+		cache->ppc_mmcr[0] = value;
+		mtspr(SPRN_MMCR0, value);
+	}
+	cache->k1.id = state->k1.id;
+}
+
+static void ppc_clear_counters(void)
+{
+	switch (pm_type) {
+	case PM_7450:
+	case PM_7400:
+		mtspr(SPRN_MMCR2, 0);
+		mtspr(SPRN_BAMR, 0);
+	case PM_750:
+	case PM_604e:
+		mtspr(SPRN_MMCR1, 0);
+	case PM_604:
+		mtspr(SPRN_MMCR0, 0);
+	case PM_NONE:
+		;
+	}
+	switch (pm_type) {
+	case PM_7450:
+		mtspr(SPRN_PMC6, 0);
+		mtspr(SPRN_PMC5, 0);
+	case PM_7400:
+	case PM_750:
+	case PM_604e:
+		mtspr(SPRN_PMC4, 0);
+		mtspr(SPRN_PMC3, 0);
+	case PM_604:
+		mtspr(SPRN_PMC2, 0);
+		mtspr(SPRN_PMC1, 0);
+	case PM_NONE:
+		;
+	}
+}
+
+/*
+ * Driver methods, internal and exported.
+ */
+
+static void perfctr_cpu_write_control(const struct perfctr_cpu_state *state)
+{
+	return ppc_write_control(state);
+}
+
+static void perfctr_cpu_read_counters(/*const*/ struct perfctr_cpu_state *state,
+				      struct perfctr_low_ctrs *ctrs)
+{
+	return ppc_read_counters(state, ctrs);
+}
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+static void perfctr_cpu_isuspend(struct perfctr_cpu_state *state)
+{
+	return ppc_isuspend(state);
+}
+
+static void perfctr_cpu_iresume(const struct perfctr_cpu_state *state)
+{
+	return ppc_iresume(state);
+}
+
+/* Call perfctr_cpu_ireload() just before perfctr_cpu_resume() to
+   bypass internal caching and force a reload if the I-mode PMCs. */
+void perfctr_cpu_ireload(struct perfctr_cpu_state *state)
+{
+#ifdef CONFIG_SMP
+	clear_isuspend_cpu(state);
+#else
+	get_cpu_cache().k1.id = 0;
+#endif
+}
+
+/* PRE: the counters have been suspended and sampled by perfctr_cpu_suspend() */
+unsigned int perfctr_cpu_identify_overflow(struct perfctr_cpu_state *state)
+{
+	unsigned int cstatus, nrctrs, pmc, pmc_mask;
+
+	cstatus = state->cstatus;
+	pmc = perfctr_cstatus_nractrs(cstatus);
+	nrctrs = perfctr_cstatus_nrctrs(cstatus);
+
+	for(pmc_mask = 0; pmc < nrctrs; ++pmc) {
+		if ((int)state->pmc[pmc].start < 0) { /* PPC-specific */
+			/* XXX: "+=" to correct for overshots */
+			state->pmc[pmc].start = state->control.ireset[pmc];
+			pmc_mask |= (1 << pmc);
+		}
+	}
+	/* XXX: if pmc_mask == 0, then it must have been a TBL bit flip */
+	/* XXX: HW cleared MMCR0[ENINT]. We presumably cleared the entire
+	   MMCR0, so the re-enable occurs automatically later, no? */
+	return pmc_mask;
+}
+
+static inline int check_ireset(const struct perfctr_cpu_state *state)
+{
+	unsigned int nrctrs, i;
+
+	i = state->control.nractrs;
+	nrctrs = i + state->control.nrictrs;
+	for(; i < nrctrs; ++i)
+		if (state->control.ireset[i] < 0)	/* PPC-specific */
+			return -EINVAL;
+	return 0;
+}
+
+static inline void setup_imode_start_values(struct perfctr_cpu_state *state)
+{
+	unsigned int cstatus, nrctrs, i;
+
+	cstatus = state->cstatus;
+	nrctrs = perfctr_cstatus_nrctrs(cstatus);
+	for(i = perfctr_cstatus_nractrs(cstatus); i < nrctrs; ++i)
+		state->pmc[i].start = state->control.ireset[i];
+}
+
+#else	/* PERFCTR_INTERRUPT_SUPPORT */
+static inline void perfctr_cpu_isuspend(struct perfctr_cpu_state *state) { }
+static inline void perfctr_cpu_iresume(const struct perfctr_cpu_state *state) { }
+static inline int check_ireset(const struct perfctr_cpu_state *state) { return 0; }
+static inline void setup_imode_start_values(struct perfctr_cpu_state *state) { }
+#endif	/* PERFCTR_INTERRUPT_SUPPORT */
+
+static int check_control(struct perfctr_cpu_state *state)
+{
+	return ppc_check_control(state);
+}
+
+int perfctr_cpu_update_control(struct perfctr_cpu_state *state, int is_global)
+{
+	int err;
+
+	clear_isuspend_cpu(state);
+	state->cstatus = 0;
+
+	/* disallow i-mode counters if we cannot catch the interrupts */
+	if (!(perfctr_info.cpu_features & PERFCTR_FEATURE_PCINT)
+	    && state->control.nrictrs)
+		return -EPERM;
+
+	err = check_ireset(state);
+	if (err < 0)
+		return err;
+	err = check_control(state); /* may initialise state->cstatus */
+	if (err < 0)
+		return err;
+	state->cstatus |= perfctr_mk_cstatus(state->control.tsc_on,
+					     state->control.nractrs,
+					     state->control.nrictrs);
+	setup_imode_start_values(state);
+	return 0;
+}
+
+void perfctr_cpu_suspend(struct perfctr_cpu_state *state)
+{
+	unsigned int i, cstatus, nractrs;
+	struct perfctr_low_ctrs now;
+
+	if (perfctr_cstatus_has_ictrs(state->cstatus))
+		perfctr_cpu_isuspend(state);
+	perfctr_cpu_read_counters(state, &now);
+	cstatus = state->cstatus;
+	if (perfctr_cstatus_has_tsc(cstatus))
+		state->tsc_sum += now.tsc - state->tsc_start;
+	nractrs = perfctr_cstatus_nractrs(cstatus);
+	for(i = 0; i < nractrs; ++i)
+		state->pmc[i].sum += now.pmc[i] - state->pmc[i].start;
+}
+
+void perfctr_cpu_resume(struct perfctr_cpu_state *state)
+{
+	if (perfctr_cstatus_has_ictrs(state->cstatus))
+	    perfctr_cpu_iresume(state);
+	perfctr_cpu_write_control(state);
+	//perfctr_cpu_read_counters(state, &state->start);
+	{
+		struct perfctr_low_ctrs now;
+		unsigned int i, cstatus, nrctrs;
+		perfctr_cpu_read_counters(state, &now);
+		cstatus = state->cstatus;
+		if (perfctr_cstatus_has_tsc(cstatus))
+			state->tsc_start = now.tsc;
+		nrctrs = perfctr_cstatus_nractrs(cstatus);
+		for(i = 0; i < nrctrs; ++i)
+			state->pmc[i].start = now.pmc[i];
+	}
+	/* XXX: if (SMP && start.tsc == now.tsc) ++now.tsc; */
+}
+
+void perfctr_cpu_sample(struct perfctr_cpu_state *state)
+{
+	unsigned int i, cstatus, nractrs;
+	struct perfctr_low_ctrs now;
+
+	perfctr_cpu_read_counters(state, &now);
+	cstatus = state->cstatus;
+	if (perfctr_cstatus_has_tsc(cstatus)) {
+		state->tsc_sum += now.tsc - state->tsc_start;
+		state->tsc_start = now.tsc;
+	}
+	nractrs = perfctr_cstatus_nractrs(cstatus);
+	for(i = 0; i < nractrs; ++i) {
+		state->pmc[i].sum += now.pmc[i] - state->pmc[i].start;
+		state->pmc[i].start = now.pmc[i];
+	}
+}
+
+static void perfctr_cpu_clear_counters(void)
+{
+	struct per_cpu_cache *cache;
+
+	cache = &get_cpu_cache();
+	memset(cache, 0, sizeof *cache);
+	cache->k1.id = -1;
+
+	ppc_clear_counters();
+}
+
+/****************************************************************
+ *								*
+ * Processor detection and initialisation procedures.		*
+ *								*
+ ****************************************************************/
+
+/* Derive CPU core frequency from TB frequency and PLL_CFG. */
+
+enum pll_type {
+	PLL_NONE,	/* for e.g. 604 which has no HID1[PLL_CFG] */
+	PLL_604e,
+	PLL_750,
+	PLL_750FX,
+	PLL_7400,
+	PLL_7450,
+	PLL_7457,
+};
+
+/* These are the known bus-to-core ratios, indexed by PLL_CFG.
+   Multiplied by 2 since half-multiplier steps are present. */
+
+static unsigned char cfg_ratio_604e[16] __initdata = { // *2
+	2, 2, 14, 2, 4, 13, 5, 9,
+	6, 11, 8, 10, 3, 12, 7, 0
+};
+
+static unsigned char cfg_ratio_750[16] __initdata = { // *2
+	5, 15, 14, 2, 4, 13, 20, 9, // 0b0110 is 18 if L1_TSTCLK=0, but that is abnormal
+	6, 11, 8, 10, 16, 12, 7, 0
+};
+
+static unsigned char cfg_ratio_750FX[32] __initdata = { // *2
+	0, 0, 2, 2, 4, 5, 6, 7,
+	8, 9, 10, 11, 12, 13, 14, 15,
+	16, 17, 18, 19, 20, 22, 24, 26,
+	28, 30, 32, 34, 36, 38, 40, 0
+};
+
+static unsigned char cfg_ratio_7400[16] __initdata = { // *2
+	18, 15, 14, 2, 4, 13, 5, 9,
+	6, 11, 8, 10, 16, 12, 7, 0
+};
+
+static unsigned char cfg_ratio_7450[32] __initdata = { // *2
+	1, 0, 15, 30, 14, 0, 2, 0,
+	4, 0, 13, 26, 5, 0, 9, 18,
+	6, 0, 11, 22, 8, 20, 10, 24,
+	16, 28, 12, 32, 7, 0, 0, 0
+};
+
+static unsigned char cfg_ratio_7457[32] __initdata = { // *2
+	23, 34, 15, 30, 14, 36, 2, 40,
+	4, 42, 13, 26, 17, 48, 19, 18,
+	6, 21, 11, 22, 8, 20, 10, 24,
+	16, 28, 12, 32, 27, 56, 0, 25
+};
+
+static unsigned int __init tb_to_core_ratio(enum pll_type pll_type)
+{
+	unsigned char *cfg_ratio;
+	unsigned int shift = 28, mask = 0xF, hid1, pll_cfg, ratio;
+
+	switch (pll_type) {
+	case PLL_604e:
+		cfg_ratio = cfg_ratio_604e;
+		break;
+	case PLL_750:
+		cfg_ratio = cfg_ratio_750;
+		break;
+	case PLL_750FX:
+		cfg_ratio = cfg_ratio_750FX;
+		hid1 = mfspr(SPRN_HID1);
+		switch ((hid1 >> 16) & 0x3) { /* HID1[PI0,PS] */
+		case 0:		/* PLL0 with external config */
+			shift = 31-4;	/* access HID1[PCE] */
+			break;
+		case 2:		/* PLL0 with internal config */
+			shift = 31-20;	/* access HID1[PC0] */
+			break;
+		case 1: case 3:	/* PLL1 */
+			shift = 31-28;	/* access HID1[PC1] */
+			break;
+		}
+		mask = 0x1F;
+		break;
+	case PLL_7400:
+		cfg_ratio = cfg_ratio_7400;
+		break;
+	case PLL_7450:
+		cfg_ratio = cfg_ratio_7450;
+		shift = 12;
+		mask = 0x1F;
+		break;
+	case PLL_7457:
+		cfg_ratio = cfg_ratio_7457;
+		shift = 12;
+		mask = 0x1F;
+		break;
+	default:
+		return 0;
+	}
+	hid1 = mfspr(SPRN_HID1);
+	pll_cfg = (hid1 >> shift) & mask;
+	ratio = cfg_ratio[pll_cfg];
+	if (!ratio)
+		printk(KERN_WARNING "perfctr: unknown PLL_CFG 0x%x\n", pll_cfg);
+	return (4/2) * ratio;
+}
+
+static unsigned int __init pll_to_core_khz(enum pll_type pll_type)
+{
+	unsigned int tb_to_core = tb_to_core_ratio(pll_type);
+	perfctr_info.tsc_to_cpu_mult = tb_to_core;
+	return tb_ticks_per_jiffy * tb_to_core * (HZ/10) / (1000/10);
+}
+
+/* Extract core and timebase frequencies from Open Firmware. */
+
+static unsigned int __init of_to_core_khz(void)
+{
+	struct device_node *cpu;
+	unsigned int *fp, core, tb;
+
+	cpu = find_type_devices("cpu");
+	if (!cpu)
+		return 0;
+	fp = (unsigned int*)get_property(cpu, "clock-frequency", NULL);
+	if (!fp || !(core = *fp))
+		return 0;
+	fp = (unsigned int*)get_property(cpu, "timebase-frequency", NULL);
+	if (!fp || !(tb = *fp))
+		return 0;
+	perfctr_info.tsc_to_cpu_mult = core / tb;
+	return core / 1000;
+}
+
+static unsigned int __init detect_cpu_khz(enum pll_type pll_type)
+{
+	unsigned int khz;
+
+	khz = pll_to_core_khz(pll_type);
+	if (khz)
+		return khz;
+
+	khz = of_to_core_khz();
+	if (khz)
+		return khz;
+
+	printk(KERN_WARNING "perfctr: unable to determine CPU speed\n");
+	return 0;
+}
+
+static int __init known_init(void)
+{
+	static char known_name[] __initdata = "PowerPC 60x/7xx/74xx";
+	unsigned int features;
+	enum pll_type pll_type;
+	unsigned int pvr;
+	int have_mmcr1;
+
+	features = PERFCTR_FEATURE_RDTSC | PERFCTR_FEATURE_RDPMC;
+	have_mmcr1 = 1;
+	pvr = mfspr(SPRN_PVR);
+	switch (PVR_VER(pvr)) {
+	case 0x0004: /* 604 */
+		pm_type = PM_604;
+		pll_type = PLL_NONE;
+		features = PERFCTR_FEATURE_RDTSC;
+		have_mmcr1 = 0;
+		break;
+	case 0x0009: /* 604e;  */
+	case 0x000A: /* 604ev */
+		pm_type = PM_604e;
+		pll_type = PLL_604e;
+		features = PERFCTR_FEATURE_RDTSC;
+		break;
+	case 0x0008: /* 750/740 */
+		pm_type = PM_750;
+		pll_type = PLL_750;
+		break;
+	case 0x7000: case 0x7001: /* IBM750FX */
+	case 0x7002: /* IBM750GX */
+		pm_type = PM_750;
+		pll_type = PLL_750FX;
+		break;
+	case 0x000C: /* 7400 */
+		pm_type = PM_7400;
+		pll_type = PLL_7400;
+		break;
+	case 0x800C: /* 7410 */
+		pm_type = PM_7400;
+		pll_type = PLL_7400;
+		break;
+	case 0x8000: /* 7451/7441 */
+		pm_type = PM_7450;
+		pll_type = PLL_7450;
+		break;
+	case 0x8001: /* 7455/7445 */
+		pm_type = PM_7450;
+		pll_type = ((pvr & 0xFFFF) < 0x0303) ? PLL_7450 : PLL_7457;
+		break;
+	case 0x8002: /* 7457/7447 */
+		pm_type = PM_7450;
+		pll_type = PLL_7457;
+		break;
+	default:
+		return -ENODEV;
+	}
+	perfctr_info.cpu_features = features;
+	perfctr_info.cpu_type = 0; /* user-space should inspect PVR */
+	perfctr_cpu_name = known_name;
+	perfctr_info.cpu_khz = detect_cpu_khz(pll_type);
+	perfctr_ppc_init_tests(have_mmcr1);
+	return 0;
+}
+
+static int __init unknown_init(void)
+{
+	static char unknown_name[] __initdata = "Generic PowerPC with TB";
+	unsigned int khz;
+
+	khz = detect_cpu_khz(PLL_NONE);
+	if (!khz)
+		return -ENODEV;
+	perfctr_info.cpu_features = PERFCTR_FEATURE_RDTSC;
+	perfctr_info.cpu_type = 0;
+	perfctr_cpu_name = unknown_name;
+	perfctr_info.cpu_khz = khz;
+	pm_type = PM_NONE;
+	return 0;
+}
+
+static void __init perfctr_cpu_init_one(void *ignore)
+{
+	/* PREEMPT note: when called via smp_call_function(),
+	   this is in IRQ context with preemption disabled. */
+	perfctr_cpu_clear_counters();
+}
+
+static void __exit perfctr_cpu_exit_one(void *ignore)
+{
+	/* PREEMPT note: when called via smp_call_function(),
+	   this is in IRQ context with preemption disabled. */
+	perfctr_cpu_clear_counters();
+}
+
+static int init_done;
+
+int __init perfctr_cpu_init(void)
+{
+	int err;
+
+	preempt_disable();
+
+	perfctr_info.cpu_features = 0;
+
+	err = known_init();
+	if (err) {
+		err = unknown_init();
+		if (err)
+			goto out;
+	}
+
+	perfctr_cpu_init_one(NULL);
+	smp_call_function(perfctr_cpu_init_one, NULL, 1, 1);
+	perfctr_cpu_set_ihandler(NULL);
+	init_done = 1;
+ out:
+	preempt_enable();
+	return err;
+}
+
+void __exit perfctr_cpu_exit(void)
+{
+	preempt_disable();
+	perfctr_cpu_exit_one(NULL);
+	smp_call_function(perfctr_cpu_exit_one, NULL, 1, 1);
+	perfctr_cpu_set_ihandler(NULL);
+	preempt_enable();
+}
+
+/****************************************************************
+ *								*
+ * Hardware reservation.					*
+ *								*
+ ****************************************************************/
+
+static DECLARE_MUTEX(mutex);
+static const char *current_service = 0;
+
+const char *perfctr_cpu_reserve(const char *service)
+{
+	const char *ret;
+
+	if (!init_done)
+		return "unsupported hardware";
+	down(&mutex);
+	ret = current_service;
+	if (!ret)
+		current_service = service;
+	up(&mutex);
+	return ret;
+}
+
+static void perfctr_cpu_clear_one(void *ignore)
+{
+	/* PREEMPT note: when called via smp_call_function(),
+	   this is in IRQ context with preemption disabled. */
+	perfctr_cpu_clear_counters();
+}
+
+void perfctr_cpu_release(const char *service)
+{
+	down(&mutex);
+	if (service != current_service) {
+		printk(KERN_ERR "%s: attempt by %s to release while reserved by %s\n",
+		       __FUNCTION__, service, current_service);
+	} else {
+		/* power down the counters */
+		on_each_cpu(perfctr_cpu_clear_one, NULL, 1, 1);
+		perfctr_cpu_set_ihandler(NULL);
+		current_service = 0;
+	}
+	up(&mutex);
+}
--- diff/drivers/perfctr/ppc_tests.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/ppc_tests.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,286 @@
+/* $Id: ppc_tests.c,v 1.4 2004/05/21 16:57:53 mikpe Exp $
+ * Performance-monitoring counters driver.
+ * Optional PPC32-specific init-time tests.
+ *
+ * Copyright (C) 2004  Mikael Pettersson
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/fs.h>
+#include <linux/perfctr.h>
+#include <asm/processor.h>
+#include <asm/time.h>	/* for tb_ticks_per_jiffy */
+#include "ppc_tests.h"
+
+#define NITER	256
+#define X2(S)	S"; "S
+#define X8(S)	X2(X2(X2(S)))
+
+static void __init do_read_tbl(unsigned int unused)
+{
+	unsigned int i, dummy;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mftbl %0") : "=r"(dummy));
+}
+
+static void __init do_read_pmc1(unsigned int unused)
+{
+	unsigned int i, dummy;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mfspr %0," __stringify(SPRN_PMC1)) : "=r"(dummy));
+}
+
+static void __init do_read_pmc2(unsigned int unused)
+{
+	unsigned int i, dummy;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mfspr %0," __stringify(SPRN_PMC2)) : "=r"(dummy));
+}
+
+static void __init do_read_pmc3(unsigned int unused)
+{
+	unsigned int i, dummy;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mfspr %0," __stringify(SPRN_PMC3)) : "=r"(dummy));
+}
+
+static void __init do_read_pmc4(unsigned int unused)
+{
+	unsigned int i, dummy;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mfspr %0," __stringify(SPRN_PMC4)) : "=r"(dummy));
+}
+
+static void __init do_read_mmcr0(unsigned int unused)
+{
+	unsigned int i, dummy;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mfspr %0," __stringify(SPRN_MMCR0)) : "=r"(dummy));
+}
+
+static void __init do_read_mmcr1(unsigned int unused)
+{
+	unsigned int i, dummy;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mfspr %0," __stringify(SPRN_MMCR1)) : "=r"(dummy));
+}
+
+static void __init do_write_pmc2(unsigned int arg)
+{
+	unsigned int i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mtspr " __stringify(SPRN_PMC2) ",%0") : : "r"(arg));
+}
+
+static void __init do_write_pmc3(unsigned int arg)
+{
+	unsigned int i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mtspr " __stringify(SPRN_PMC3) ",%0") : : "r"(arg));
+}
+
+static void __init do_write_pmc4(unsigned int arg)
+{
+	unsigned int i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mtspr " __stringify(SPRN_PMC4) ",%0") : : "r"(arg));
+}
+
+static void __init do_write_mmcr1(unsigned int arg)
+{
+	unsigned int i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mtspr " __stringify(SPRN_MMCR1) ",%0") : : "r"(arg));
+}
+
+static void __init do_write_mmcr0(unsigned int arg)
+{
+	unsigned int i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("mtspr " __stringify(SPRN_MMCR0) ",%0") : : "r"(arg));
+}
+
+static void __init do_empty_loop(unsigned int unused)
+{
+	unsigned i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__("" : : );
+}
+
+static unsigned __init run(void (*doit)(unsigned int), unsigned int arg)
+{
+	unsigned int start, stop;
+	start = mfspr(SPRN_PMC1);
+	(*doit)(arg);	/* should take < 2^32 cycles to complete */
+	stop = mfspr(SPRN_PMC1);
+	return stop - start;
+}
+
+static void __init init_tests_message(void)
+{
+	unsigned int pvr = mfspr(SPRN_PVR);
+	printk(KERN_INFO "Please email the following PERFCTR INIT lines "
+	       "to mikpe@csd.uu.se\n"
+	       KERN_INFO "To remove this message, rebuild the driver "
+	       "with CONFIG_PERFCTR_INIT_TESTS=n\n");
+	printk(KERN_INFO "PERFCTR INIT: PVR 0x%08x, CPU clock %u kHz, TB clock %u kHz\n",
+	       pvr,
+	       perfctr_info.cpu_khz,
+	       tb_ticks_per_jiffy*(HZ/10)/(1000/10));
+}
+
+static void __init clear(int have_mmcr1)
+{
+	mtspr(SPRN_MMCR0, 0);
+	mtspr(SPRN_PMC1, 0);
+	mtspr(SPRN_PMC2, 0);
+	if (have_mmcr1) {
+		mtspr(SPRN_MMCR1, 0);
+		mtspr(SPRN_PMC3, 0);
+		mtspr(SPRN_PMC4, 0);
+	}
+}
+
+static void __init check_fcece(unsigned int pmc1ce)
+{
+	unsigned int mmcr0;
+
+	/*
+	 * This test checks if MMCR0[FC] is set after PMC1 overflows
+	 * when MMCR0[FCECE] is set.
+	 * 74xx documentation states this behaviour, while documentation
+	 * for 604/750 processors doesn't mention this at all.
+	 *
+	 * Also output the value of PMC1 shortly after the overflow.
+	 * This tells us if PMC1 really was frozen. On 604/750, it may not
+	 * freeze since we don't enable PMIs. [No freeze confirmed on 750.]
+	 *
+	 * When pmc1ce == 0, MMCR0[PMC1CE] is zero. It's unclear whether
+	 * this masks all PMC1 overflow events or just PMC1 PMIs.
+	 *
+	 * PMC1 counts processor cycles, with 100 to go before overflowing.
+	 * FCECE is set.
+	 * PMC1CE is clear if !pmc1ce, otherwise set.
+	 */
+	mtspr(SPRN_PMC1, 0x80000000-100);
+	mmcr0 = (1<<(31-6)) | (0x01 << 6);
+	if (pmc1ce)
+		mmcr0 |= (1<<(31-16));
+	mtspr(SPRN_MMCR0, mmcr0);
+	do {
+		do_empty_loop(0);
+	} while (!(mfspr(SPRN_PMC1) & 0x80000000));
+	do_empty_loop(0);
+	printk(KERN_INFO "PERFCTR INIT: %s(%u): MMCR0[FC] is %u, PMC1 is %#x\n",
+	       __FUNCTION__, pmc1ce,
+	       !!(mfspr(SPRN_MMCR0) & (1<<(31-0))), mfspr(SPRN_PMC1));
+	mtspr(SPRN_MMCR0, 0);
+	mtspr(SPRN_PMC1, 0);
+}
+
+static void __init check_trigger(unsigned int pmc1ce)
+{
+	unsigned int mmcr0;
+
+	/*
+	 * This test checks if MMCR0[TRIGGER] is reset after PMC1 overflows.
+	 * 74xx documentation states this behaviour, while documentation
+	 * for 604/750 processors doesn't mention this at all.
+	 * [No reset confirmed on 750.]
+	 *
+	 * Also output the values of PMC1 and PMC2 shortly after the overflow.
+	 * PMC2 should be equal to PMC1-0x80000000.
+	 *
+	 * When pmc1ce == 0, MMCR0[PMC1CE] is zero. It's unclear whether
+	 * this masks all PMC1 overflow events or just PMC1 PMIs.
+	 *
+	 * PMC1 counts processor cycles, with 100 to go before overflowing.
+	 * PMC2 counts processor cycles, starting from 0.
+	 * TRIGGER is set, so PMC2 doesn't start until PMC1 overflows.
+	 * PMC1CE is clear if !pmc1ce, otherwise set.
+	 */
+	mtspr(SPRN_PMC2, 0);
+	mtspr(SPRN_PMC1, 0x80000000-100);
+	mmcr0 = (1<<(31-18)) | (0x01 << 6) | (0x01 << 0);
+	if (pmc1ce)
+		mmcr0 |= (1<<(31-16));
+	mtspr(SPRN_MMCR0, mmcr0);
+	do {
+		do_empty_loop(0);
+	} while (!(mfspr(SPRN_PMC1) & 0x80000000));
+	do_empty_loop(0);
+	printk(KERN_INFO "PERFCTR INIT: %s(%u): MMCR0[TRIGGER] is %u, PMC1 is %#x, PMC2 is %#x\n",
+	       __FUNCTION__, pmc1ce,
+	       !!(mfspr(SPRN_MMCR0) & (1<<(31-18))), mfspr(SPRN_PMC1), mfspr(SPRN_PMC2));
+	mtspr(SPRN_MMCR0, 0);
+	mtspr(SPRN_PMC1, 0);
+	mtspr(SPRN_PMC2, 0);
+}
+
+static void __init
+measure_overheads(int have_mmcr1)
+{
+	int i;
+	unsigned int mmcr0, loop, ticks[12];
+	const char *name[12];
+
+	clear(have_mmcr1);
+
+	/* PMC1 = "processor cycles",
+	   PMC2 = "completed instructions",
+	   not disabled in any mode,
+	   no interrupts */
+	mmcr0 = (0x01 << 6) | (0x02 << 0);
+	mtspr(SPRN_MMCR0, mmcr0);
+
+	name[0] = "mftbl";
+	ticks[0] = run(do_read_tbl, 0);
+	name[1] = "mfspr (pmc1)";
+	ticks[1] = run(do_read_pmc1, 0);
+	name[2] = "mfspr (pmc2)";
+	ticks[2] = run(do_read_pmc2, 0);
+	name[3] = "mfspr (pmc3)";
+	ticks[3] = have_mmcr1 ? run(do_read_pmc3, 0) : 0;
+	name[4] = "mfspr (pmc4)";
+	ticks[4] = have_mmcr1 ? run(do_read_pmc4, 0) : 0;
+	name[5] = "mfspr (mmcr0)";
+	ticks[5] = run(do_read_mmcr0, 0);
+	name[6] = "mfspr (mmcr1)";
+	ticks[6] = have_mmcr1 ? run(do_read_mmcr1, 0) : 0;
+	name[7] = "mtspr (pmc2)";
+	ticks[7] = run(do_write_pmc2, 0);
+	name[8] = "mtspr (pmc3)";
+	ticks[8] = have_mmcr1 ? run(do_write_pmc3, 0) : 0;
+	name[9] = "mtspr (pmc4)";
+	ticks[9] = have_mmcr1 ? run(do_write_pmc4, 0) : 0;
+	name[10] = "mtspr (mmcr1)";
+	ticks[10] = have_mmcr1 ? run(do_write_mmcr1, 0) : 0;
+	name[11] = "mtspr (mmcr0)";
+	ticks[11] = run(do_write_mmcr0, mmcr0);
+
+	loop = run(do_empty_loop, 0);
+
+	clear(have_mmcr1);
+
+	init_tests_message();
+	printk(KERN_INFO "PERFCTR INIT: NITER == %u\n", NITER);
+	printk(KERN_INFO "PERFCTR INIT: loop overhead is %u cycles\n", loop);
+	for(i = 0; i < ARRAY_SIZE(ticks); ++i) {
+		unsigned int x;
+		if (!ticks[i])
+			continue;
+		x = ((ticks[i] - loop) * 10) / NITER;
+		printk(KERN_INFO "PERFCTR INIT: %s cost is %u.%u cycles (%u total)\n",
+		       name[i], x/10, x%10, ticks[i]);
+	}
+	check_fcece(0);
+	check_fcece(1);
+	check_trigger(0);
+	check_trigger(1);
+}
+
+void __init perfctr_ppc_init_tests(int have_mmcr1)
+{
+	measure_overheads(have_mmcr1);
+}
--- diff/drivers/perfctr/ppc_tests.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/ppc_tests.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,12 @@
+/* $Id: ppc_tests.h,v 1.1 2004/01/12 01:59:11 mikpe Exp $
+ * Performance-monitoring counters driver.
+ * Optional PPC32-specific init-time tests.
+ *
+ * Copyright (C) 2004  Mikael Pettersson
+ */
+
+#ifdef CONFIG_PERFCTR_INIT_TESTS
+extern void perfctr_ppc_init_tests(int have_mmcr1);
+#else
+static inline void perfctr_ppc_init_tests(int have_mmcr1) { }
+#endif
--- diff/drivers/perfctr/version.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/version.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1 @@
+#define VERSION "2.7.3"
--- diff/drivers/perfctr/virtual.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/virtual.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,937 @@
+/* $Id: virtual.c,v 1.95 2004/05/31 20:36:37 mikpe Exp $
+ * Virtual per-process performance counters.
+ *
+ * Copyright (C) 1999-2004  Mikael Pettersson
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/compiler.h>	/* for unlikely() in 2.4.18 and older */
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/ptrace.h>
+#include <linux/fs.h>
+#include <linux/file.h>
+#include <linux/perfctr.h>
+
+#include <asm/io.h>
+#include <asm/uaccess.h>
+
+#include "cpumask.h"
+#include "virtual.h"
+
+/****************************************************************
+ *								*
+ * Data types and macros.					*
+ *								*
+ ****************************************************************/
+
+struct vperfctr {
+/* User-visible fields: (must be first for mmap()) */
+	struct perfctr_cpu_state cpu_state;
+/* Kernel-private fields: */
+	int si_signo;
+	atomic_t count;
+	spinlock_t owner_lock;
+	struct task_struct *owner;
+	/* sampling_timer and bad_cpus_allowed are frequently
+	   accessed, so they get to share a cache line */
+	unsigned int sampling_timer ____cacheline_aligned;
+#ifdef PERFCTR_CPUS_FORBIDDEN_MASK_NEEDED
+	atomic_t bad_cpus_allowed;
+#endif
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+	unsigned int iresume_cstatus;
+#endif
+};
+#define IS_RUNNING(perfctr)	perfctr_cstatus_enabled((perfctr)->cpu_state.cstatus)
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+
+static void vperfctr_ihandler(unsigned long pc);
+
+static inline void vperfctr_set_ihandler(void)
+{
+	perfctr_cpu_set_ihandler(vperfctr_ihandler);
+}
+
+static inline void vperfctr_clear_iresume_cstatus(struct vperfctr *perfctr)
+{
+	perfctr->iresume_cstatus = 0;
+}
+
+#else
+static inline void vperfctr_set_ihandler(void) { }
+static inline void vperfctr_clear_iresume_cstatus(struct vperfctr *perfctr) { }
+#endif
+
+#ifdef PERFCTR_CPUS_FORBIDDEN_MASK_NEEDED
+
+static inline void vperfctr_init_bad_cpus_allowed(struct vperfctr *perfctr)
+{
+	atomic_set(&perfctr->bad_cpus_allowed, 0);
+}
+
+/* Concurrent set_cpus_allowed() is possible. The only lock it
+   can take is the task lock, so we have to take it as well.
+   task_lock/unlock also disables/enables preemption. */
+
+static inline void vperfctr_task_lock(struct task_struct *p)
+{
+	task_lock(p);
+}
+
+static inline void vperfctr_task_unlock(struct task_struct *p)
+{
+	task_unlock(p);
+}
+
+#else	/* !PERFCTR_CPUS_FORBIDDEN_MASK_NEEDED */
+
+static inline void vperfctr_init_bad_cpus_allowed(struct vperfctr *perfctr) { }
+
+/* Concurrent set_cpus_allowed() is impossible or irrelevant.
+   Disabling and enabling preemption suffices for an atomic region. */
+
+static inline void vperfctr_task_lock(struct task_struct *p)
+{
+	preempt_disable();
+}
+
+static inline void vperfctr_task_unlock(struct task_struct *p)
+{
+	preempt_enable();
+}
+
+#endif	/* !PERFCTR_CPUS_FORBIDDEN_MASK_NEEDED */
+
+/****************************************************************
+ *								*
+ * Resource management.						*
+ *								*
+ ****************************************************************/
+
+/* XXX: perhaps relax this to number of _live_ perfctrs */
+static spinlock_t nrctrs_lock = SPIN_LOCK_UNLOCKED;
+static int nrctrs;
+static const char this_service[] = __FILE__;
+
+static int inc_nrctrs(void)
+{
+	const char *other;
+
+	other = NULL;
+	spin_lock(&nrctrs_lock);
+	if (++nrctrs == 1) {
+		other = perfctr_cpu_reserve(this_service);
+		if (other)
+			nrctrs = 0;
+	}
+	spin_unlock(&nrctrs_lock);
+	if (other) {
+		printk(KERN_ERR __FILE__
+		       ": cannot operate, perfctr hardware taken by '%s'\n",
+		       other);
+		return -EBUSY;
+	}
+	vperfctr_set_ihandler();
+	return 0;
+}
+
+static void dec_nrctrs(void)
+{
+	spin_lock(&nrctrs_lock);
+	if (--nrctrs == 0)
+		perfctr_cpu_release(this_service);
+	spin_unlock(&nrctrs_lock);
+}
+
+static struct vperfctr *vperfctr_alloc(void)
+{
+	unsigned long page;
+
+	if (inc_nrctrs() != 0)
+		return ERR_PTR(-EBUSY);
+	page = get_zeroed_page(GFP_KERNEL);
+	if (!page) {
+		dec_nrctrs();
+		return ERR_PTR(-ENOMEM);
+	}
+	SetPageReserved(virt_to_page(page));
+	return (struct vperfctr*) page;
+}
+
+static void vperfctr_free(struct vperfctr *perfctr)
+{
+	ClearPageReserved(virt_to_page(perfctr));
+	free_page((unsigned long)perfctr);
+	dec_nrctrs();
+}
+
+static struct vperfctr *get_empty_vperfctr(void)
+{
+	struct vperfctr *perfctr = vperfctr_alloc();
+	if (!IS_ERR(perfctr)) {
+		atomic_set(&perfctr->count, 1);
+		vperfctr_init_bad_cpus_allowed(perfctr);
+		spin_lock_init(&perfctr->owner_lock);
+	}
+	return perfctr;
+}
+
+static void put_vperfctr(struct vperfctr *perfctr)
+{
+	if (atomic_dec_and_test(&perfctr->count))
+		vperfctr_free(perfctr);
+}
+
+/****************************************************************
+ *								*
+ * Basic counter operations.					*
+ * These must all be called by the owner process only.		*
+ * These must all be called with preemption disabled.		*
+ *								*
+ ****************************************************************/
+
+/* PRE: IS_RUNNING(perfctr)
+ * Suspend the counters.
+ * XXX: When called from switch_to(), perfctr belongs to 'prev'
+ * but current is 'next'.
+ */
+static inline void vperfctr_suspend(struct vperfctr *perfctr)
+{
+	perfctr_cpu_suspend(&perfctr->cpu_state);
+}
+
+static inline void vperfctr_reset_sampling_timer(struct vperfctr *perfctr)
+{
+	/* XXX: base the value on perfctr_info.cpu_khz instead! */
+	perfctr->sampling_timer = HZ/2;
+}
+
+/* PRE: perfctr == current->thread.perfctr && IS_RUNNING(perfctr)
+ * Restart the counters.
+ */
+static inline void vperfctr_resume(struct vperfctr *perfctr)
+{
+	perfctr_cpu_resume(&perfctr->cpu_state);
+	vperfctr_reset_sampling_timer(perfctr);
+}
+
+/* Sample the counters but do not suspend them. */
+static void vperfctr_sample(struct vperfctr *perfctr)
+{
+	if (IS_RUNNING(perfctr)) {
+		perfctr_cpu_sample(&perfctr->cpu_state);
+		vperfctr_reset_sampling_timer(perfctr);
+	}
+}
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+/* vperfctr interrupt handler (XXX: add buffering support) */
+/* PREEMPT note: called in IRQ context with preemption disabled. */
+static void vperfctr_ihandler(unsigned long pc)
+{
+	struct task_struct *tsk = current;
+	struct vperfctr *perfctr;
+	unsigned int pmc_mask;
+	siginfo_t si;
+
+	perfctr = tsk->thread.perfctr;
+	if (!perfctr) {
+		printk(KERN_ERR "%s: BUG! pid %d has no vperfctr\n",
+		       __FUNCTION__, tsk->pid);
+		return;
+	}
+	if (!perfctr_cstatus_has_ictrs(perfctr->cpu_state.cstatus)) {
+		printk(KERN_ERR "%s: BUG! vperfctr has cstatus %#x (pid %d, comm %s)\n",
+		       __FUNCTION__, perfctr->cpu_state.cstatus, tsk->pid, tsk->comm);
+		return;
+	}
+	vperfctr_suspend(perfctr);
+	pmc_mask = perfctr_cpu_identify_overflow(&perfctr->cpu_state);
+	if (!pmc_mask) {
+		printk(KERN_ERR "%s: BUG! pid %d has unidentifiable overflow source\n",
+		       __FUNCTION__, tsk->pid);
+		return;
+	}
+	/* suspend a-mode and i-mode PMCs, leaving only TSC on */
+	/* XXX: some people also want to suspend the TSC */
+	perfctr->iresume_cstatus = perfctr->cpu_state.cstatus;
+	if (perfctr_cstatus_has_tsc(perfctr->iresume_cstatus)) {
+		perfctr->cpu_state.cstatus = perfctr_mk_cstatus(1, 0, 0);
+		vperfctr_resume(perfctr);
+	} else
+		perfctr->cpu_state.cstatus = 0;
+	si.si_signo = perfctr->si_signo;
+	si.si_errno = 0;
+	si.si_code = SI_PMC_OVF;
+	si.si_pmc_ovf_mask = pmc_mask;
+	if (!send_sig_info(si.si_signo, &si, tsk))
+		send_sig(si.si_signo, tsk, 1);
+}
+#endif
+
+/****************************************************************
+ *								*
+ * Process management operations.				*
+ * These must all, with the exception of vperfctr_unlink()	*
+ * and __vperfctr_set_cpus_allowed(), be called by the owner	*
+ * process only.						*
+ *								*
+ ****************************************************************/
+
+/* Called from exit_thread() or do_vperfctr_unlink().
+ * If the counters are running, stop them and sample their final values.
+ * Detach the vperfctr object from its owner task.
+ * PREEMPT note: exit_thread() does not run with preemption disabled.
+ */
+static void vperfctr_unlink(struct task_struct *owner, struct vperfctr *perfctr)
+{
+	/* this synchronises with sys_vperfctr() */
+	spin_lock(&perfctr->owner_lock);
+	perfctr->owner = NULL;
+	spin_unlock(&perfctr->owner_lock);
+
+	/* perfctr suspend+detach must be atomic wrt process suspend */
+	/* this also synchronises with perfctr_set_cpus_allowed() */
+	vperfctr_task_lock(owner);
+	if (IS_RUNNING(perfctr) && owner == current)
+		vperfctr_suspend(perfctr);
+	owner->thread.perfctr = NULL;
+	vperfctr_task_unlock(owner);
+
+	perfctr->cpu_state.cstatus = 0;
+	vperfctr_clear_iresume_cstatus(perfctr);
+	put_vperfctr(perfctr);
+}
+
+void __vperfctr_exit(struct vperfctr *perfctr)
+{
+	vperfctr_unlink(current, perfctr);
+}
+
+/* schedule() --> switch_to() --> .. --> __vperfctr_suspend().
+ * If the counters are running, suspend them.
+ * PREEMPT note: switch_to() runs with preemption disabled.
+ */
+void __vperfctr_suspend(struct vperfctr *perfctr)
+{
+	if (IS_RUNNING(perfctr))
+		vperfctr_suspend(perfctr);
+}
+
+/* schedule() --> switch_to() --> .. --> __vperfctr_resume().
+ * PRE: perfctr == current->thread.perfctr
+ * If the counters are runnable, resume them.
+ * PREEMPT note: switch_to() runs with preemption disabled.
+ */
+void __vperfctr_resume(struct vperfctr *perfctr)
+{
+	if (IS_RUNNING(perfctr)) {
+#ifdef PERFCTR_CPUS_FORBIDDEN_MASK_NEEDED
+		if (unlikely(atomic_read(&perfctr->bad_cpus_allowed)) &&
+		    perfctr_cstatus_nrctrs(perfctr->cpu_state.cstatus)) {
+			perfctr->cpu_state.cstatus = 0;
+			vperfctr_clear_iresume_cstatus(perfctr);
+			BUG_ON(current->state != TASK_RUNNING);
+			send_sig(SIGILL, current, 1);
+			return;
+		}
+#endif
+		vperfctr_resume(perfctr);
+	}
+}
+
+/* Called from update_one_process() [triggered by timer interrupt].
+ * PRE: perfctr == current->thread.perfctr.
+ * Sample the counters but do not suspend them.
+ * Needed to avoid precision loss due to multiple counter
+ * wraparounds between resume/suspend for CPU-bound processes.
+ * PREEMPT note: called in IRQ context with preemption disabled.
+ */
+void __vperfctr_sample(struct vperfctr *perfctr)
+{
+	if (--perfctr->sampling_timer == 0)
+		vperfctr_sample(perfctr);
+}
+
+#ifdef PERFCTR_CPUS_FORBIDDEN_MASK_NEEDED
+/* Called from set_cpus_allowed().
+ * PRE: current holds task_lock(owner)
+ * PRE: owner->thread.perfctr == perfctr
+ */
+void __vperfctr_set_cpus_allowed(struct task_struct *owner,
+				 struct vperfctr *perfctr,
+				 cpumask_t new_mask)
+{
+	cpumask_t tmp;
+
+	cpus_and(tmp, new_mask, perfctr_cpus_forbidden_mask);
+	if (!cpus_empty(tmp)) {
+		atomic_set(&perfctr->bad_cpus_allowed, 1);
+		printk(KERN_WARNING "perfctr: process %d (comm %s) issued unsafe"
+		       " set_cpus_allowed() on process %d (comm %s)\n",
+		       current->pid, current->comm, owner->pid, owner->comm);
+	} else
+		atomic_set(&perfctr->bad_cpus_allowed, 0);
+}
+#endif
+
+/****************************************************************
+ *								*
+ * Virtual perfctr system calls implementation.			*
+ * These can be called by the owner process (tsk == current),	*
+ * a monitor process which has the owner under ptrace ATTACH	*
+ * control (tsk && tsk != current), or anyone with a handle to	*
+ * an unlinked perfctr (!tsk).					*
+ *								*
+ ****************************************************************/
+
+static int do_vperfctr_control(struct vperfctr *perfctr,
+			       const struct vperfctr_control *argp,
+			       struct task_struct *tsk)
+{
+	struct vperfctr_control control;
+	int err;
+	unsigned int next_cstatus;
+	unsigned int nrctrs, i;
+
+	if (!tsk)
+		return -ESRCH;	/* attempt to update unlinked perfctr */
+
+	if (copy_from_user(&control, argp, sizeof control))
+		return -EFAULT;
+
+	if (control.cpu_control.nractrs || control.cpu_control.nrictrs) {
+		cpumask_t tmp, old_mask, new_mask;
+
+		tmp = perfctr_cpus_forbidden_mask;
+		old_mask = tsk->cpus_allowed;
+		cpus_andnot(new_mask, old_mask, tmp);
+
+		if (cpus_empty(new_mask))
+			return -EINVAL;
+		if (!cpus_equal(new_mask, old_mask))
+			set_cpus_allowed(tsk, new_mask);
+	}
+
+	/* PREEMPT note: preemption is disabled over the entire
+	   region since we're updating an active perfctr. */
+	preempt_disable();
+	if (IS_RUNNING(perfctr)) {
+		if (tsk == current)
+			vperfctr_suspend(perfctr);
+		perfctr->cpu_state.cstatus = 0;
+		vperfctr_clear_iresume_cstatus(perfctr);
+	}
+	perfctr->cpu_state.control = control.cpu_control;
+	/* remote access note: perfctr_cpu_update_control() is ok */
+	err = perfctr_cpu_update_control(&perfctr->cpu_state, 0);
+	if (err < 0)
+		goto out;
+	next_cstatus = perfctr->cpu_state.cstatus;
+	if (!perfctr_cstatus_enabled(next_cstatus))
+		goto out;
+
+	/* XXX: validate si_signo? */
+	perfctr->si_signo = control.si_signo;
+
+	if (!perfctr_cstatus_has_tsc(next_cstatus))
+		perfctr->cpu_state.tsc_sum = 0;
+
+	nrctrs = perfctr_cstatus_nrctrs(next_cstatus);
+	for(i = 0; i < nrctrs; ++i)
+		if (!(control.preserve & (1<<i)))
+			perfctr->cpu_state.pmc[i].sum = 0;
+
+	if (tsk == current)
+		vperfctr_resume(perfctr);
+
+ out:
+	preempt_enable();
+	return err;
+}
+
+static int do_vperfctr_iresume(struct vperfctr *perfctr, const struct task_struct *tsk)
+{
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+	unsigned int iresume_cstatus;
+
+	if (!tsk)
+		return -ESRCH;	/* attempt to update unlinked perfctr */
+
+	iresume_cstatus = perfctr->iresume_cstatus;
+	if (!perfctr_cstatus_has_ictrs(iresume_cstatus))
+		return -EPERM;
+
+	/* PREEMPT note: preemption is disabled over the entire
+	   region because we're updating an active perfctr. */
+	preempt_disable();
+
+	if (IS_RUNNING(perfctr) && tsk == current)
+		vperfctr_suspend(perfctr);
+
+	perfctr->cpu_state.cstatus = iresume_cstatus;
+	perfctr->iresume_cstatus = 0;
+
+	/* remote access note: perfctr_cpu_ireload() is ok */
+	perfctr_cpu_ireload(&perfctr->cpu_state);
+
+	if (tsk == current)
+		vperfctr_resume(perfctr);
+
+	preempt_enable();
+
+	return 0;
+#else
+	return -ENOSYS;
+#endif
+}
+
+static int do_vperfctr_unlink(struct vperfctr *perfctr, struct task_struct *tsk)
+{
+	if (tsk)
+		vperfctr_unlink(tsk, perfctr);
+	return 0;
+}
+
+static int do_vperfctr_read(struct vperfctr *perfctr,
+			    struct perfctr_sum_ctrs *sump,
+			    struct vperfctr_control *controlp,
+			    const struct task_struct *tsk)
+{
+	struct perfctr_sum_ctrs sum;
+	struct vperfctr_control control;
+
+	/* PREEMPT note: While we're reading our own control, another
+	   process may ptrace ATTACH to us and update our control.
+	   Disable preemption to ensure we get a consistent copy.
+	   Not needed for other cases since the perfctr is either
+	   unlinked or its owner is ptrace ATTACH suspended by us. */
+	if (tsk == current) {
+		preempt_disable();
+		if (sump)
+			vperfctr_sample(perfctr);
+	}
+	if (sump) { //sum = perfctr->cpu_state.sum;
+		int j;
+		sum.tsc = perfctr->cpu_state.tsc_sum;
+		for(j = 0; j < ARRAY_SIZE(sum.pmc); ++j)
+			sum.pmc[j] = perfctr->cpu_state.pmc[j].sum;
+	}
+	if (controlp) {
+		control.si_signo = perfctr->si_signo;
+		control.cpu_control = perfctr->cpu_state.control;
+		control.preserve = 0;
+	}
+	if (tsk == current)
+		preempt_enable();
+	if (sump && copy_to_user(sump, &sum, sizeof sum))
+		return -EFAULT;
+	if (controlp && copy_to_user(controlp, &control, sizeof control))
+		return -EFAULT;
+	return 0;
+}
+
+/****************************************************************
+ *								*
+ * Virtual perfctr file operations.				*
+ *								*
+ ****************************************************************/
+
+static int vperfctr_mmap(struct file *filp, struct vm_area_struct *vma)
+{
+	struct vperfctr *perfctr;
+
+	/* Only allow read-only mapping of first page. */
+	if ((vma->vm_end - vma->vm_start) != PAGE_SIZE ||
+	    vma->vm_pgoff != 0 ||
+	    (pgprot_val(vma->vm_page_prot) & _PAGE_RW) ||
+	    (vma->vm_flags & (VM_WRITE | VM_MAYWRITE)))
+		return -EPERM;
+	perfctr = filp->private_data;
+	if (!perfctr)
+		return -EPERM;
+	return remap_page_range(vma, vma->vm_start, virt_to_phys(perfctr),
+				PAGE_SIZE, vma->vm_page_prot);
+}
+
+static int vperfctr_release(struct inode *inode, struct file *filp)
+{
+	struct vperfctr *perfctr = filp->private_data;
+	filp->private_data = NULL;
+	if (perfctr)
+		put_vperfctr(perfctr);
+	return 0;
+}
+
+static struct file_operations vperfctr_file_ops = {
+	.mmap = vperfctr_mmap,
+	.release = vperfctr_release,
+};
+
+/****************************************************************
+ *								*
+ * File system for virtual perfctrs. Based on pipefs.		*
+ *								*
+ ****************************************************************/
+
+#define VPERFCTRFS_MAGIC (('V'<<24)|('P'<<16)|('M'<<8)|('C'))
+
+/* The code to set up a `struct file_system_type' for a pseudo fs
+   is unfortunately not the same in 2.4 and 2.6. */
+#include <linux/mount.h> /* needed for 2.6, included by fs.h in 2.4 */
+
+static struct super_block *
+vperfctrfs_get_sb(struct file_system_type *fs_type,
+		  int flags, const char *dev_name, void *data)
+{
+	return get_sb_pseudo(fs_type, "vperfctr:", NULL, VPERFCTRFS_MAGIC);
+}
+
+static struct file_system_type vperfctrfs_type = {
+	.name		= "vperfctrfs",
+	.get_sb		= vperfctrfs_get_sb,
+	.kill_sb	= kill_anon_super,
+};
+
+/* XXX: check if s/vperfctr_mnt/vperfctrfs_type.kern_mnt/ would work */
+static struct vfsmount *vperfctr_mnt;
+#define vperfctr_fs_init_done()	(vperfctr_mnt != NULL)
+
+static int __init vperfctrfs_init(void)
+{
+	int err = register_filesystem(&vperfctrfs_type);
+	if (!err) {
+		vperfctr_mnt = kern_mount(&vperfctrfs_type);
+		if (!IS_ERR(vperfctr_mnt))
+			return 0;
+		err = PTR_ERR(vperfctr_mnt);
+		unregister_filesystem(&vperfctrfs_type);
+		vperfctr_mnt = NULL;
+	}
+	return err;
+}
+
+static void __exit vperfctrfs_exit(void)
+{
+	unregister_filesystem(&vperfctrfs_type);
+	mntput(vperfctr_mnt);
+}
+
+static struct inode *vperfctr_get_inode(void)
+{
+	struct inode *inode;
+
+	inode = new_inode(vperfctr_mnt->mnt_sb);
+	if (!inode)
+		return NULL;
+	inode->i_fop = &vperfctr_file_ops;
+	inode->i_state = I_DIRTY;
+	inode->i_mode = S_IFCHR | S_IRUSR | S_IWUSR;
+	inode->i_uid = current->fsuid;
+	inode->i_gid = current->fsgid;
+	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_blksize = 0;
+	return inode;
+}
+
+static int vperfctrfs_delete_dentry(struct dentry *dentry)
+{
+	return 1;
+}
+
+static struct dentry_operations vperfctrfs_dentry_operations = {
+	.d_delete	= vperfctrfs_delete_dentry,
+};
+
+static struct dentry *vperfctr_d_alloc_root(struct inode *inode)
+{
+	struct qstr this;
+	char name[32];
+	struct dentry *dentry;
+
+	sprintf(name, "[%lu]", inode->i_ino);
+	this.name = name;
+	this.len = strlen(name);
+	this.hash = inode->i_ino; /* will go */
+	dentry = d_alloc(vperfctr_mnt->mnt_sb->s_root, &this);
+	if (dentry) {
+		dentry->d_op = &vperfctrfs_dentry_operations;
+		d_add(dentry, inode);
+	}
+	return dentry;
+}
+
+static struct file *vperfctr_get_filp(void)
+{
+	struct file *filp;
+	struct inode *inode;
+	struct dentry *dentry;
+
+	filp = get_empty_filp();
+	if (!filp)
+		goto out;
+	inode = vperfctr_get_inode();
+	if (!inode)
+		goto out_filp;
+	dentry = vperfctr_d_alloc_root(inode);
+	if (!dentry)
+		goto out_inode;
+
+	filp->f_vfsmnt = mntget(vperfctr_mnt);
+	filp->f_dentry = dentry;
+	filp->f_mapping = dentry->d_inode->i_mapping;
+
+	filp->f_pos = 0;
+	filp->f_flags = 0;
+	filp->f_op = &vperfctr_file_ops; /* fops_get() if MODULE */
+	filp->f_mode = FMODE_READ;
+	filp->f_version = 0;
+
+	return filp;
+
+ out_inode:
+	iput(inode);
+ out_filp:
+	put_filp(filp);	/* doesn't run ->release() like fput() does */
+ out:
+	return NULL;
+}
+
+/****************************************************************
+ *								*
+ * Virtual perfctr actual system calls.				*
+ *								*
+ ****************************************************************/
+
+/* tid is the actual task/thread id (née pid, stored as ->pid),
+   pid/tgid is that 2.6 thread group id crap (stored as ->tgid) */
+asmlinkage long sys_vperfctr_open(int tid, int creat)
+{
+	struct file *filp;
+	struct task_struct *tsk;
+	struct vperfctr *perfctr;
+	int err;
+	int fd;
+
+	if (!vperfctr_fs_init_done())
+		return -ENODEV;
+	filp = vperfctr_get_filp();
+	if (!filp)
+		return -ENOMEM;
+	err = fd = get_unused_fd();
+	if (err < 0)
+		goto err_filp;
+	perfctr = NULL;
+	if (creat) {
+		perfctr = get_empty_vperfctr(); /* may sleep */
+		if (IS_ERR(perfctr)) {
+			err = PTR_ERR(perfctr);
+			goto err_fd;
+		}
+	}
+	tsk = current;
+	if (tid != 0 && tid != tsk->pid) { /* remote? */
+		read_lock(&tasklist_lock);
+		tsk = find_task_by_pid(tid);
+		if (tsk)
+			get_task_struct(tsk);
+		read_unlock(&tasklist_lock);
+		err = -ESRCH;
+		if (!tsk)
+			goto err_perfctr;
+		err = ptrace_check_attach(tsk, 0);
+		if (err < 0)
+			goto err_tsk;
+	}
+	if (creat) {
+		/* check+install must be atomic to prevent remote-control races */
+		vperfctr_task_lock(tsk);
+		if (!tsk->thread.perfctr) {
+			perfctr->owner = tsk;
+			tsk->thread.perfctr = perfctr;
+			err = 0;
+		} else
+			err = -EEXIST;
+		vperfctr_task_unlock(tsk);
+		if (err)
+			goto err_tsk;
+	} else {
+		perfctr = tsk->thread.perfctr;
+		/* XXX: Old API needed to allow NULL perfctr here.
+		   Do we want to keep or change that rule? */
+	}
+	filp->private_data = perfctr;
+	if (perfctr)
+		atomic_inc(&perfctr->count);
+	if (tsk != current)
+		put_task_struct(tsk);
+	fd_install(fd, filp);
+	return fd;
+ err_tsk:
+	if (tsk != current)
+		put_task_struct(tsk);
+ err_perfctr:
+	if (perfctr)	/* can only occur if creat != 0 */
+		put_vperfctr(perfctr);
+ err_fd:
+	put_unused_fd(fd);
+ err_filp:
+	fput(filp);
+	return err;
+}
+
+static struct vperfctr *fd_get_vperfctr(int fd)
+{
+	struct vperfctr *perfctr;
+	struct file *filp;
+	int err;
+
+	err = -EBADF;
+	filp = fget(fd);
+	if (!filp)
+		goto out;
+	err = -EINVAL;
+	if (filp->f_op != &vperfctr_file_ops)
+		goto out_filp;
+	perfctr = filp->private_data;
+	if (!perfctr)
+		goto out_filp;
+	atomic_inc(&perfctr->count);
+	fput(filp);
+	return perfctr;
+ out_filp:
+	fput(filp);
+ out:
+	return ERR_PTR(err);
+}
+
+static struct task_struct *vperfctr_get_tsk(struct vperfctr *perfctr)
+{
+	struct task_struct *tsk;
+
+	tsk = current;
+	if (perfctr != current->thread.perfctr) {
+		/* this synchronises with vperfctr_unlink() and itself */
+		spin_lock(&perfctr->owner_lock);
+		tsk = perfctr->owner;
+		if (tsk)
+			get_task_struct(tsk);
+		spin_unlock(&perfctr->owner_lock);
+		if (tsk) {
+			int ret = ptrace_check_attach(tsk, 0);
+			if (ret < 0) {
+				put_task_struct(tsk);
+				return ERR_PTR(ret);
+			}
+		}
+	}
+	return tsk;
+}
+
+static void vperfctr_put_tsk(struct task_struct *tsk)
+{
+	if (tsk && tsk != current)
+		put_task_struct(tsk);
+}
+
+asmlinkage long sys_vperfctr_control(int fd, const struct vperfctr_control *control)
+{
+	struct vperfctr *perfctr;
+	struct task_struct *tsk;
+	int ret;
+
+	perfctr = fd_get_vperfctr(fd);
+	if (IS_ERR(perfctr))
+		return PTR_ERR(perfctr);
+	tsk = vperfctr_get_tsk(perfctr);
+	if (IS_ERR(tsk)) {
+		ret = PTR_ERR(tsk);
+		goto out;
+	}
+	ret = do_vperfctr_control(perfctr, control, tsk);
+	vperfctr_put_tsk(tsk);
+ out:
+	put_vperfctr(perfctr);
+	return ret;
+}
+
+asmlinkage long sys_vperfctr_unlink(int fd)
+{
+	struct vperfctr *perfctr;
+	struct task_struct *tsk;
+	int ret;
+
+	perfctr = fd_get_vperfctr(fd);
+	if (IS_ERR(perfctr))
+		return PTR_ERR(perfctr);
+	tsk = vperfctr_get_tsk(perfctr);
+	if (IS_ERR(tsk)) {
+		ret = PTR_ERR(tsk);
+		goto out;
+	}
+	ret = do_vperfctr_unlink(perfctr, tsk);
+	vperfctr_put_tsk(tsk);
+ out:
+	put_vperfctr(perfctr);
+	return ret;
+}
+
+asmlinkage long sys_vperfctr_iresume(int fd)
+{
+	struct vperfctr *perfctr;
+	struct task_struct *tsk;
+	int ret;
+
+	perfctr = fd_get_vperfctr(fd);
+	if (IS_ERR(perfctr))
+		return PTR_ERR(perfctr);
+	tsk = vperfctr_get_tsk(perfctr);
+	if (IS_ERR(tsk)) {
+		ret = PTR_ERR(tsk);
+		goto out;
+	}
+	ret = do_vperfctr_iresume(perfctr, tsk);
+	vperfctr_put_tsk(tsk);
+ out:
+	put_vperfctr(perfctr);
+	return ret;
+}
+
+asmlinkage long sys_vperfctr_read(int fd, struct perfctr_sum_ctrs *sum, struct vperfctr_control *control)
+{
+	struct vperfctr *perfctr;
+	struct task_struct *tsk;
+	int ret;
+
+	perfctr = fd_get_vperfctr(fd);
+	if (IS_ERR(perfctr))
+		return PTR_ERR(perfctr);
+	tsk = vperfctr_get_tsk(perfctr);
+	if (IS_ERR(tsk)) {
+		ret = PTR_ERR(tsk);
+		goto out;
+	}
+	ret = do_vperfctr_read(perfctr, sum, control, tsk);
+	vperfctr_put_tsk(tsk);
+ out:
+	put_vperfctr(perfctr);
+	return ret;
+}
+
+/****************************************************************
+ *								*
+ * module_init/exit						*
+ *								*
+ ****************************************************************/
+
+int __init vperfctr_init(void)
+{
+	return vperfctrfs_init();
+}
+
+void __exit vperfctr_exit(void)
+{
+	vperfctrfs_exit();
+}
--- diff/drivers/perfctr/virtual.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/virtual.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,13 @@
+/* $Id: virtual.h,v 1.13 2004/05/31 18:18:55 mikpe Exp $
+ * Virtual per-process performance counters.
+ *
+ * Copyright (C) 1999-2004  Mikael Pettersson
+ */
+
+#ifdef CONFIG_PERFCTR_VIRTUAL
+extern int vperfctr_init(void);
+extern void vperfctr_exit(void);
+#else
+static inline int vperfctr_init(void) { return 0; }
+static inline void vperfctr_exit(void) { }
+#endif
--- diff/drivers/perfctr/x86.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/x86.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,1628 @@
+/* $Id: x86.c,v 1.141 2004/05/31 18:13:42 mikpe Exp $
+ * x86/x86_64 performance-monitoring counters driver.
+ *
+ * Copyright (C) 1999-2004  Mikael Pettersson
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/perfctr.h>
+
+#include <asm/msr.h>
+#undef MSR_P6_PERFCTR0
+#undef MSR_IA32_MISC_ENABLE
+#include <asm/fixmap.h>
+#include <asm/apic.h>
+struct hw_interrupt_type;
+#include <asm/hw_irq.h>
+#include <asm/timex.h>	/* cpu_khz */
+
+#include "cpumask.h"
+#include "x86_tests.h"
+
+/* Support for lazy evntsel and perfctr MSR updates. */
+struct per_cpu_cache {	/* roughly a subset of perfctr_cpu_state */
+	union {
+		unsigned int p5_cesr;
+		unsigned int id;	/* cache owner id */
+	} k1;
+	struct {
+		/* NOTE: these caches have physical indices, not virtual */
+		unsigned int evntsel[18];
+		unsigned int escr[0x3E2-0x3A0];
+		unsigned int pebs_enable;
+		unsigned int pebs_matrix_vert;
+	} control;
+} ____cacheline_aligned;
+static DEFINE_PER_CPU(struct per_cpu_cache, per_cpu_cache);
+
+/* Structure for counter snapshots, as 32-bit values. */
+struct perfctr_low_ctrs {
+	unsigned int tsc;
+	unsigned int pmc[18];
+};
+
+/* Intel P5, Cyrix 6x86MX/MII/III, Centaur WinChip C6/2/3 */
+#define MSR_P5_CESR		0x11
+#define MSR_P5_CTR0		0x12		/* .. 0x13 */
+#define P5_CESR_CPL		0x00C0
+#define P5_CESR_RESERVED	(~0x01FF)
+#define MII_CESR_RESERVED	(~0x05FF)
+#define C6_CESR_RESERVED	(~0x00FF)
+
+/* Intel P6, VIA C3 */
+#define MSR_P6_PERFCTR0		0xC1		/* .. 0xC2 */
+#define MSR_P6_EVNTSEL0		0x186		/* .. 0x187 */
+#define P6_EVNTSEL_ENABLE	0x00400000
+#define P6_EVNTSEL_INT		0x00100000
+#define P6_EVNTSEL_CPL		0x00030000
+#define P6_EVNTSEL_RESERVED	0x00280000
+#define VC3_EVNTSEL1_RESERVED	(~0x1FF)
+
+/* AMD K7 */
+#define MSR_K7_EVNTSEL0		0xC0010000	/* .. 0xC0010003 */
+#define MSR_K7_PERFCTR0		0xC0010004	/* .. 0xC0010007 */
+
+/* Intel P4, Intel Pentium M */
+#define MSR_IA32_MISC_ENABLE	0x1A0
+#define MSR_IA32_MISC_ENABLE_PERF_AVAIL (1<<7)	/* read-only status bit */
+#define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1<<12) /* read-only status bit */
+
+/* Intel P4 */
+#define MSR_P4_PERFCTR0		0x300		/* .. 0x311 */
+#define MSR_P4_CCCR0		0x360		/* .. 0x371 */
+#define MSR_P4_ESCR0		0x3A0		/* .. 0x3E1, with some gaps */
+
+#define MSR_P4_PEBS_ENABLE	0x3F1
+#define P4_PE_REPLAY_TAG_BITS	0x00000607
+#define P4_PE_UOP_TAG		0x01000000
+#define P4_PE_RESERVED		0xFEFFF9F8	/* only allow ReplayTagging */
+
+#define MSR_P4_PEBS_MATRIX_VERT	0x3F2
+#define P4_PMV_REPLAY_TAG_BITS	0x00000003
+#define P4_PMV_RESERVED		0xFFFFFFFC
+
+#define P4_CCCR_OVF		0x80000000
+#define P4_CCCR_CASCADE		0x40000000
+#define P4_CCCR_OVF_PMI_T1	0x08000000
+#define P4_CCCR_OVF_PMI_T0	0x04000000
+#define P4_CCCR_FORCE_OVF	0x02000000
+#define P4_CCCR_ACTIVE_THREAD	0x00030000
+#define P4_CCCR_ENABLE		0x00001000
+#define P4_CCCR_ESCR_SELECT(X)	(((X) >> 13) & 0x7)
+#define P4_CCCR_EXTENDED_CASCADE	0x00000800
+#define P4_CCCR_RESERVED	(0x300007FF|P4_CCCR_OVF|P4_CCCR_OVF_PMI_T1)
+
+#define P4_ESCR_CPL_T1		0x00000003
+#define P4_ESCR_CPL_T0		0x0000000C
+#define P4_ESCR_TAG_ENABLE	0x00000010
+#define P4_ESCR_RESERVED	(0x80000000)
+
+#define P4_FAST_RDPMC		0x80000000
+#define P4_MASK_FAST_RDPMC	0x0000001F	/* we only need low 5 bits */
+
+/* missing from <asm-i386/cpufeature.h> */
+#define cpu_has_msr	boot_cpu_has(X86_FEATURE_MSR)
+
+#define rdmsr_low(msr,low) \
+	__asm__ __volatile__("rdmsr" : "=a"(low) : "c"(msr) : "edx")
+#define rdpmc_low(ctr,low) \
+	__asm__ __volatile__("rdpmc" : "=a"(low) : "c"(ctr) : "edx")
+
+static void clear_msr_range(unsigned int base, unsigned int n)
+{
+	unsigned int i;
+
+	for(i = 0; i < n; ++i)
+		wrmsr(base+i, 0, 0);
+}
+
+static inline void set_in_cr4_local(unsigned int mask)
+{
+	write_cr4(read_cr4() | mask);
+}
+
+static inline void clear_in_cr4_local(unsigned int mask)
+{
+	write_cr4(read_cr4() & ~mask);
+}
+
+static unsigned int new_id(void)
+{
+	static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+	static unsigned int counter;
+	int id;
+
+	spin_lock(&lock);
+	id = ++counter;
+	spin_unlock(&lock);
+	return id;
+}
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+static void perfctr_default_ihandler(unsigned long pc)
+{
+}
+
+static perfctr_ihandler_t perfctr_ihandler = perfctr_default_ihandler;
+
+asmlinkage void smp_perfctr_interrupt(struct pt_regs *regs)
+{
+	/* PREEMPT note: invoked via an interrupt gate, which
+	   masks interrupts. We're still on the originating CPU. */
+	/* XXX: recursive interrupts? delay the ACK, mask LVTPC, or queue? */
+	ack_APIC_irq();
+	irq_enter();
+	(*perfctr_ihandler)(instruction_pointer(regs));
+	irq_exit();
+}
+
+void perfctr_cpu_set_ihandler(perfctr_ihandler_t ihandler)
+{
+	perfctr_ihandler = ihandler ? ihandler : perfctr_default_ihandler;
+}
+
+#else
+#define perfctr_cstatus_has_ictrs(cstatus)	0
+#undef cpu_has_apic
+#define cpu_has_apic				0
+#undef apic_write
+#define apic_write(reg,vector)			do{}while(0)
+#endif
+
+#if defined(CONFIG_SMP) && defined(PERFCTR_INTERRUPT_SUPPORT)
+
+static inline void
+set_isuspend_cpu(struct perfctr_cpu_state *state, int cpu)
+{
+	state->k1.isuspend_cpu = cpu;
+}
+
+static inline int
+is_isuspend_cpu(const struct perfctr_cpu_state *state, int cpu)
+{
+	return state->k1.isuspend_cpu == cpu;
+}
+
+static inline void clear_isuspend_cpu(struct perfctr_cpu_state *state)
+{
+	state->k1.isuspend_cpu = NR_CPUS;
+}
+
+#else
+static inline void set_isuspend_cpu(struct perfctr_cpu_state *state, int cpu) { }
+static inline int is_isuspend_cpu(const struct perfctr_cpu_state *state, int cpu) { return 1; }
+static inline void clear_isuspend_cpu(struct perfctr_cpu_state *state) { }
+#endif
+
+/****************************************************************
+ *								*
+ * Driver procedures.						*
+ *								*
+ ****************************************************************/
+
+/*
+ * Intel P5 family (Pentium, family code 5).
+ * - One TSC and two 40-bit PMCs.
+ * - A single 32-bit CESR (MSR 0x11) controls both PMCs.
+ *   CESR has two halves, each controlling one PMC.
+ *   To keep the API reasonably clean, the user puts 16 bits of
+ *   control data in each counter's evntsel; the driver combines
+ *   these to a single 32-bit CESR value.
+ * - Overflow interrupts are not available.
+ * - Pentium MMX added the RDPMC instruction. RDPMC has lower
+ *   overhead than RDMSR and it can be used in user-mode code.
+ * - The MMX events are not symmetric: some events are only available
+ *   for some PMC, and some event codes denote different events
+ *   depending on which PMCs they control.
+ */
+
+/* shared with MII and C6 */
+static int p5_like_check_control(struct perfctr_cpu_state *state,
+				 unsigned int reserved_bits, int is_c6)
+{
+	unsigned short cesr_half[2];
+	unsigned int pmc, evntsel, i;
+
+	if (state->control.nrictrs != 0 || state->control.nractrs > 2)
+		return -EINVAL;
+	cesr_half[0] = 0;
+	cesr_half[1] = 0;
+	for(i = 0; i < state->control.nractrs; ++i) {
+		pmc = state->control.pmc_map[i];
+		state->pmc[i].map = pmc;
+		if (pmc > 1 || cesr_half[pmc] != 0)
+			return -EINVAL;
+		evntsel = state->control.evntsel[i];
+		/* protect reserved bits */
+		if ((evntsel & reserved_bits) != 0)
+			return -EPERM;
+		/* the CPL field (if defined) must be non-zero */
+		if (!is_c6 && !(evntsel & P5_CESR_CPL))
+			return -EINVAL;
+		cesr_half[pmc] = evntsel;
+	}
+	state->k1.id = (cesr_half[1] << 16) | cesr_half[0];
+	return 0;
+}
+
+static int p5_check_control(struct perfctr_cpu_state *state, int is_global)
+{
+	return p5_like_check_control(state, P5_CESR_RESERVED, 0);
+}
+
+/* shared with MII but not C6 */
+static void p5_write_control(const struct perfctr_cpu_state *state)
+{
+	struct per_cpu_cache *cache;
+	unsigned int cesr;
+
+	cesr = state->k1.id;
+	if (!cesr)	/* no PMC is on (this test doesn't work on C6) */
+		return;
+	cache = &__get_cpu_var(per_cpu_cache);
+	if (cache->k1.p5_cesr != cesr) {
+		cache->k1.p5_cesr = cesr;
+		wrmsr(MSR_P5_CESR, cesr, 0);
+	}
+}
+
+static void p5_read_counters(const struct perfctr_cpu_state *state,
+			     struct perfctr_low_ctrs *ctrs)
+{
+	unsigned int cstatus, nrctrs, i;
+
+	/* The P5 doesn't allocate a cache line on a write miss, so do
+	   a dummy read to avoid a write miss here _and_ a read miss
+	   later in our caller. */
+	asm("" : : "r"(ctrs->tsc));
+
+	cstatus = state->cstatus;
+	if (perfctr_cstatus_has_tsc(cstatus))
+		rdtscl(ctrs->tsc);
+	nrctrs = perfctr_cstatus_nractrs(cstatus);
+	for(i = 0; i < nrctrs; ++i) {
+		unsigned int pmc = state->pmc[i].map;
+		rdmsr_low(MSR_P5_CTR0+pmc, ctrs->pmc[i]);
+	}
+}
+
+/* used by all except pre-MMX P5 */
+static void rdpmc_read_counters(const struct perfctr_cpu_state *state,
+				struct perfctr_low_ctrs *ctrs)
+{
+	unsigned int cstatus, nrctrs, i;
+
+	cstatus = state->cstatus;
+	if (perfctr_cstatus_has_tsc(cstatus))
+		rdtscl(ctrs->tsc);
+	nrctrs = perfctr_cstatus_nractrs(cstatus);
+	for(i = 0; i < nrctrs; ++i) {
+		unsigned int pmc = state->pmc[i].map;
+		rdpmc_low(pmc, ctrs->pmc[i]);
+	}
+}
+
+/* shared with MII and C6 */
+static void p5_clear_counters(void)
+{
+	clear_msr_range(MSR_P5_CESR, 1+2);
+}
+
+/*
+ * Cyrix 6x86/MII/III.
+ * - Same MSR assignments as P5 MMX. Has RDPMC and two 48-bit PMCs.
+ * - Event codes and CESR formatting as in the plain P5 subset.
+ * - Many but not all P5 MMX event codes are implemented.
+ * - Cyrix adds a few more event codes. The event code is widened
+ *   to 7 bits, and Cyrix puts the high bit in CESR bit 10
+ *   (and CESR bit 26 for PMC1).
+ */
+
+static int mii_check_control(struct perfctr_cpu_state *state, int is_global)
+{
+	return p5_like_check_control(state, MII_CESR_RESERVED, 0);
+}
+
+/*
+ * Centaur WinChip C6/2/3.
+ * - Same MSR assignments as P5 MMX. Has RDPMC and two 40-bit PMCs.
+ * - CESR is formatted with two halves, like P5. However, there
+ *   are no defined control fields for e.g. CPL selection, and
+ *   there is no defined method for stopping the counters.
+ * - Only a few event codes are defined.
+ * - The 64-bit TSC is synthesised from the low 32 bits of the
+ *   two PMCs, and CESR has to be set up appropriately.
+ *   Reprogramming CESR causes RDTSC to yield invalid results.
+ *   (The C6 may also hang in this case, due to C6 erratum I-13.)
+ *   Therefore, using the PMCs on any of these processors requires
+ *   that the TSC is not accessed at all:
+ *   1. The kernel must be configured or a TSC-less processor, i.e.
+ *      generic 586 or less.
+ *   2. The "notsc" boot parameter must be passed to the kernel.
+ *   3. User-space libraries and code must also be configured and
+ *      compiled for a generic 586 or less.
+ */
+
+#if !defined(CONFIG_X86_TSC)
+static int c6_check_control(struct perfctr_cpu_state *state, int is_global)
+{
+	if (state->control.tsc_on)
+		return -EINVAL;
+	return p5_like_check_control(state, C6_CESR_RESERVED, 1);
+}
+
+static void c6_write_control(const struct perfctr_cpu_state *state)
+{
+	struct per_cpu_cache *cache;
+	unsigned int cesr;
+
+	if (perfctr_cstatus_nractrs(state->cstatus) == 0) /* no PMC is on */
+		return;
+	cache = &__get_cpu_var(per_cpu_cache);
+	cesr = state->k1.id;
+	if (cache->k1.p5_cesr != cesr) {
+		cache->k1.p5_cesr = cesr;
+		wrmsr(MSR_P5_CESR, cesr, 0);
+	}
+}
+#endif
+
+/*
+ * Intel P6 family (Pentium Pro, Pentium II, and Pentium III cores,
+ * and Xeon and Celeron versions of Pentium II and III cores).
+ * - One TSC and two 40-bit PMCs.
+ * - One 32-bit EVNTSEL MSR for each PMC.
+ * - EVNTSEL0 contains a global enable/disable bit.
+ *   That bit is reserved in EVNTSEL1.
+ * - Each EVNTSEL contains a CPL field.
+ * - Overflow interrupts are possible, but requires that the
+ *   local APIC is available. Some Mobile P6s have no local APIC.
+ * - The PMCs cannot be initialised with arbitrary values, since
+ *   wrmsr fills the high bits by sign-extending from bit 31.
+ * - Most events are symmetric, but a few are not.
+ */
+
+/* shared with K7 */
+static int p6_like_check_control(struct perfctr_cpu_state *state, int is_k7)
+{
+	unsigned int evntsel, i, nractrs, nrctrs, pmc_mask, pmc;
+
+	nractrs = state->control.nractrs;
+	nrctrs = nractrs + state->control.nrictrs;
+	if (nrctrs < nractrs || nrctrs > (is_k7 ? 4 : 2))
+		return -EINVAL;
+
+	pmc_mask = 0;
+	for(i = 0; i < nrctrs; ++i) {
+		pmc = state->control.pmc_map[i];
+		state->pmc[i].map = pmc;
+		if (pmc >= (is_k7 ? 4 : 2) || (pmc_mask & (1<<pmc)))
+			return -EINVAL;
+		pmc_mask |= (1<<pmc);
+		evntsel = state->control.evntsel[i];
+		/* protect reserved bits */
+		if (evntsel & P6_EVNTSEL_RESERVED)
+			return -EPERM;
+		/* check ENable bit */
+		if (is_k7) {
+			/* ENable bit must be set in each evntsel */
+			if (!(evntsel & P6_EVNTSEL_ENABLE))
+				return -EINVAL;
+		} else {
+			/* only evntsel[0] has the ENable bit */
+			if (evntsel & P6_EVNTSEL_ENABLE) {
+				if (pmc > 0)
+					return -EPERM;
+			} else {
+				if (pmc == 0)
+					return -EINVAL;
+			}
+		}
+		/* the CPL field must be non-zero */
+		if (!(evntsel & P6_EVNTSEL_CPL))
+			return -EINVAL;
+		/* INT bit must be off for a-mode and on for i-mode counters */
+		if (evntsel & P6_EVNTSEL_INT) {
+			if (i < nractrs)
+				return -EINVAL;
+		} else {
+			if (i >= nractrs)
+				return -EINVAL;
+		}
+	}
+	state->k1.id = new_id();
+	return 0;
+}
+
+static int p6_check_control(struct perfctr_cpu_state *state, int is_global)
+{
+	return p6_like_check_control(state, 0);
+}
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+/* PRE: perfctr_cstatus_has_ictrs(state->cstatus) != 0 */
+/* shared with K7 and P4 */
+static void p6_like_isuspend(struct perfctr_cpu_state *state,
+			     unsigned int msr_evntsel0)
+{
+	struct per_cpu_cache *cache;
+	unsigned int cstatus, nrctrs, i;
+	int cpu;
+
+	cpu = smp_processor_id();
+	set_isuspend_cpu(state, cpu); /* early to limit cpu's live range */
+	cache = &per_cpu(per_cpu_cache, cpu);
+	cstatus = state->cstatus;
+	nrctrs = perfctr_cstatus_nrctrs(cstatus);
+	for(i = perfctr_cstatus_nractrs(cstatus); i < nrctrs; ++i) {
+		unsigned int pmc_raw, pmc_idx, now;
+		pmc_raw = state->pmc[i].map;
+		/* Note: P4_MASK_FAST_RDPMC is a no-op for P6 and K7.
+		   We don't need to make it into a parameter. */
+		pmc_idx = pmc_raw & P4_MASK_FAST_RDPMC;
+		cache->control.evntsel[pmc_idx] = 0;
+		/* On P4 this intensionally also clears the CCCR.OVF flag. */
+		wrmsr(msr_evntsel0+pmc_idx, 0, 0);
+		/* P4 erratum N17 does not apply since we read only low 32 bits. */
+		rdpmc_low(pmc_raw, now);
+		state->pmc[i].sum += now - state->pmc[i].start;
+		state->pmc[i].start = now;
+	}
+	/* cache->k1.id is still == state->k1.id */
+}
+
+/* PRE: perfctr_cstatus_has_ictrs(state->cstatus) != 0 */
+/* shared with K7 and P4 */
+static void p6_like_iresume(const struct perfctr_cpu_state *state,
+			    unsigned int msr_evntsel0,
+			    unsigned int msr_perfctr0)
+{
+	struct per_cpu_cache *cache;
+	unsigned int cstatus, nrctrs, i;
+	int cpu;
+
+	cpu = smp_processor_id();
+	cache = &per_cpu(per_cpu_cache, cpu);
+	if (cache->k1.id == state->k1.id) {
+		cache->k1.id = 0; /* force reload of cleared EVNTSELs */
+		if (is_isuspend_cpu(state, cpu))
+			return; /* skip reload of PERFCTRs */
+	}
+	cstatus = state->cstatus;
+	nrctrs = perfctr_cstatus_nrctrs(cstatus);
+	for(i = perfctr_cstatus_nractrs(cstatus); i < nrctrs; ++i) {
+		/* Note: P4_MASK_FAST_RDPMC is a no-op for P6 and K7.
+		   We don't need to make it into a parameter. */
+		unsigned int pmc = state->pmc[i].map & P4_MASK_FAST_RDPMC;
+		/* If the control wasn't ours we must disable the evntsels
+		   before reinitialising the counters, to prevent unexpected
+		   counter increments and missed overflow interrupts. */
+		if (cache->control.evntsel[pmc]) {
+			cache->control.evntsel[pmc] = 0;
+			wrmsr(msr_evntsel0+pmc, 0, 0);
+		}
+		/* P4 erratum N15 does not apply since the CCCR is disabled. */
+		wrmsr(msr_perfctr0+pmc, state->pmc[i].start, -1);
+	}
+	/* cache->k1.id remains != state->k1.id */
+}
+
+static void p6_isuspend(struct perfctr_cpu_state *state)
+{
+	p6_like_isuspend(state, MSR_P6_EVNTSEL0);
+}
+
+static void p6_iresume(const struct perfctr_cpu_state *state)
+{
+	p6_like_iresume(state, MSR_P6_EVNTSEL0, MSR_P6_PERFCTR0);
+}
+#endif	/* PERFCTR_INTERRUPT_SUPPORT */
+
+/* shared with K7 and VC3 */
+static void p6_like_write_control(const struct perfctr_cpu_state *state,
+				  unsigned int msr_evntsel0)
+{
+	struct per_cpu_cache *cache;
+	unsigned int nrctrs, i;
+
+	cache = &__get_cpu_var(per_cpu_cache);
+	if (cache->k1.id == state->k1.id)
+		return;
+	nrctrs = perfctr_cstatus_nrctrs(state->cstatus);
+	for(i = 0; i < nrctrs; ++i) {
+		unsigned int evntsel = state->control.evntsel[i];
+		unsigned int pmc = state->pmc[i].map;
+		if (evntsel != cache->control.evntsel[pmc]) {
+			cache->control.evntsel[pmc] = evntsel;
+			wrmsr(msr_evntsel0+pmc, evntsel, 0);
+		}
+	}
+	cache->k1.id = state->k1.id;
+}
+
+/* shared with VC3, Generic*/
+static void p6_write_control(const struct perfctr_cpu_state *state)
+{
+	p6_like_write_control(state, MSR_P6_EVNTSEL0);
+}
+
+static void p6_clear_counters(void)
+{
+	clear_msr_range(MSR_P6_EVNTSEL0, 2);
+	clear_msr_range(MSR_P6_PERFCTR0, 2);
+}
+
+/*
+ * AMD K7 family (Athlon, Duron).
+ * - Somewhat similar to the Intel P6 family.
+ * - Four 48-bit PMCs.
+ * - Four 32-bit EVNTSEL MSRs with similar layout as in P6.
+ * - Completely different MSR assignments :-(
+ * - Fewer countable events defined :-(
+ * - The events appear to be completely symmetric.
+ * - The EVNTSEL MSRs are symmetric since each has its own enable bit.
+ * - Publicly available documentation is incomplete.
+ * - K7 model 1 does not have a local APIC. AMD Document #22007
+ *   Revision J hints that it may use debug interrupts instead.
+ *
+ * The K8 has the same hardware layout as the K7. It also has
+ * better documentation and a different set of available events.
+ */
+
+static int k7_check_control(struct perfctr_cpu_state *state, int is_global)
+{
+	return p6_like_check_control(state, 1);
+}
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+static void k7_isuspend(struct perfctr_cpu_state *state)
+{
+	p6_like_isuspend(state, MSR_K7_EVNTSEL0);
+}
+
+static void k7_iresume(const struct perfctr_cpu_state *state)
+{
+	p6_like_iresume(state, MSR_K7_EVNTSEL0, MSR_K7_PERFCTR0);
+}
+#endif	/* PERFCTR_INTERRUPT_SUPPORT */
+
+static void k7_write_control(const struct perfctr_cpu_state *state)
+{
+	p6_like_write_control(state, MSR_K7_EVNTSEL0);
+}
+
+static void k7_clear_counters(void)
+{
+	clear_msr_range(MSR_K7_EVNTSEL0, 4+4);
+}
+
+/*
+ * VIA C3 family.
+ * - A Centaur design somewhat similar to the P6/Celeron.
+ * - PERFCTR0 is an alias for the TSC, and EVNTSEL0 is read-only.
+ * - PERFCTR1 is 32 bits wide.
+ * - EVNTSEL1 has no defined control fields, and there is no
+ *   defined method for stopping the counter.
+ * - According to testing, the reserved fields in EVNTSEL1 have
+ *   no function. We always fill them with zeroes.
+ * - Only a few event codes are defined.
+ * - No local APIC or interrupt-mode support.
+ * - pmc_map[0] must be 1, if nractrs == 1.
+ */
+static int vc3_check_control(struct perfctr_cpu_state *state, int is_global)
+{
+	if (state->control.nrictrs || state->control.nractrs > 1)
+		return -EINVAL;
+	if (state->control.nractrs == 1) {
+		if (state->control.pmc_map[0] != 1)
+			return -EINVAL;
+		state->pmc[0].map = 1;
+		if (state->control.evntsel[0] & VC3_EVNTSEL1_RESERVED)
+			return -EPERM;
+		state->k1.id = state->control.evntsel[0];
+	} else
+		state->k1.id = 0;
+	return 0;
+}
+
+static void vc3_clear_counters(void)
+{
+	/* Not documented, but seems to be default after boot. */
+	wrmsr(MSR_P6_EVNTSEL0+1, 0x00070079, 0);
+}
+
+/*
+ * Intel Pentium 4.
+ * Current implementation restrictions:
+ * - No DS/PEBS support.
+ *
+ * Known quirks:
+ * - OVF_PMI+FORCE_OVF counters must have an ireset value of -1.
+ *   This allows the regular overflow check to also handle FORCE_OVF
+ *   counters. Not having this restriction would lead to MAJOR
+ *   complications in the driver's "detect overflow counters" code.
+ *   There is no loss of functionality since the ireset value doesn't
+ *   affect the counter's PMI rate for FORCE_OVF counters.
+ * - In experiments with FORCE_OVF counters, and regular OVF_PMI
+ *   counters with small ireset values between -8 and -1, it appears
+ *   that the faulting instruction is subjected to a new PMI before
+ *   it can complete, ad infinitum. This occurs even though the driver
+ *   clears the CCCR (and in testing also the ESCR) and invokes a
+ *   user-space signal handler before restoring the CCCR and resuming
+ *   the instruction.
+ */
+
+/*
+ * Table 15-4 in the IA32 Volume 3 manual contains a 18x8 entry mapping
+ * from counter/CCCR number (0-17) and ESCR SELECT value (0-7) to the
+ * actual ESCR MSR number. This mapping contains some repeated patterns,
+ * so we can compact it to a 4x8 table of MSR offsets:
+ *
+ * 1. CCCRs 16 and 17 are mapped just like CCCRs 13 and 14, respectively.
+ *    Thus, we only consider the 16 CCCRs 0-15.
+ * 2. The CCCRs are organised in pairs, and both CCCRs in a pair use the
+ *    same mapping. Thus, we only consider the 8 pairs 0-7.
+ * 3. In each pair of pairs, the second odd-numbered pair has the same domain
+ *    as the first even-numbered pair, and the range is 1+ the range of the
+ *    the first even-numbered pair. For example, CCCR(0) and (1) map ESCR
+ *    SELECT(7) to 0x3A0, and CCCR(2) and (3) map it to 0x3A1.
+ *    The only exception is that pair (7) [CCCRs 14 and 15] does not have
+ *    ESCR SELECT(3) in its domain, like pair (6) [CCCRs 12 and 13] has.
+ *    NOTE: Revisions of IA32 Volume 3 older than #245472-007 had an error
+ *    in this table: CCCRs 12, 13, and 16 had their mappings for ESCR SELECT
+ *    values 2 and 3 swapped.
+ * 4. All MSR numbers are on the form 0x3??. Instead of storing these as
+ *    16-bit numbers, the table only stores the 8-bit offsets from 0x300.
+ */
+
+static const unsigned char p4_cccr_escr_map[4][8] = {
+	/* 0x00 and 0x01 as is, 0x02 and 0x03 are +1 */
+	[0x00/4] {	[7] 0xA0,
+			[6] 0xA2,
+			[2] 0xAA,
+			[4] 0xAC,
+			[0] 0xB2,
+			[1] 0xB4,
+			[3] 0xB6,
+			[5] 0xC8, },
+	/* 0x04 and 0x05 as is, 0x06 and 0x07 are +1 */
+	[0x04/4] {	[0] 0xC0,
+			[2] 0xC2,
+			[1] 0xC4, },
+	/* 0x08 and 0x09 as is, 0x0A and 0x0B are +1 */
+	[0x08/4] {	[1] 0xA4,
+			[0] 0xA6,
+			[5] 0xA8,
+			[2] 0xAE,
+			[3] 0xB0, },
+	/* 0x0C, 0x0D, and 0x10 as is,
+	   0x0E, 0x0F, and 0x11 are +1 except [3] is not in the domain */
+	[0x0C/4] {	[4] 0xB8,
+			[5] 0xCC,
+			[6] 0xE0,
+			[0] 0xBA,
+			[2] 0xBC,
+			[3] 0xBE,
+			[1] 0xCA, },
+};
+
+static unsigned int p4_escr_addr(unsigned int pmc, unsigned int cccr_val)
+{
+	unsigned int escr_select, pair, escr_offset;
+
+	escr_select = P4_CCCR_ESCR_SELECT(cccr_val);
+	if (pmc > 0x11)
+		return 0;	/* pmc range error */
+	if (pmc > 0x0F)
+		pmc -= 3;	/* 0 <= pmc <= 0x0F */
+	pair = pmc / 2;		/* 0 <= pair <= 7 */
+	escr_offset = p4_cccr_escr_map[pair / 2][escr_select];
+	if (!escr_offset || (pair == 7 && escr_select == 3))
+		return 0;	/* ESCR SELECT range error */
+	return escr_offset + (pair & 1) + 0x300;
+};
+
+static int p4_IQ_ESCR_ok;	/* only models <= 2 can use IQ_ESCR{0,1} */
+static int p4_is_ht;		/* affects several CCCR & ESCR fields */
+static int p4_extended_cascade_ok;	/* only models >= 2 can use extended cascading */
+
+static int p4_check_control(struct perfctr_cpu_state *state, int is_global)
+{
+	unsigned int i, nractrs, nrctrs, pmc_mask;
+
+	nractrs = state->control.nractrs;
+	nrctrs = nractrs + state->control.nrictrs;
+	if (nrctrs < nractrs || nrctrs > 18)
+		return -EINVAL;
+
+	pmc_mask = 0;
+	for(i = 0; i < nrctrs; ++i) {
+		unsigned int pmc, cccr_val, escr_val, escr_addr;
+		/* check that pmc_map[] is well-defined;
+		   pmc_map[i] is what we pass to RDPMC, the PMC itself
+		   is extracted by masking off the FAST_RDPMC flag */
+		pmc = state->control.pmc_map[i] & ~P4_FAST_RDPMC;
+		state->pmc[i].map = state->control.pmc_map[i];
+		if (pmc >= 18 || (pmc_mask & (1<<pmc)))
+			return -EINVAL;
+		pmc_mask |= (1<<pmc);
+		/* check CCCR contents */
+		cccr_val = state->control.evntsel[i];
+		if (cccr_val & P4_CCCR_RESERVED)
+			return -EPERM;
+		if (cccr_val & P4_CCCR_EXTENDED_CASCADE) {
+			if (!p4_extended_cascade_ok)
+				return -EPERM;
+			if (!(pmc == 12 || pmc >= 15))
+				return -EPERM;
+		}
+		if ((cccr_val & P4_CCCR_ACTIVE_THREAD) != P4_CCCR_ACTIVE_THREAD && !p4_is_ht)
+			return -EINVAL;
+		if (!(cccr_val & (P4_CCCR_ENABLE | P4_CCCR_CASCADE | P4_CCCR_EXTENDED_CASCADE)))
+			return -EINVAL;
+		if (cccr_val & P4_CCCR_OVF_PMI_T0) {
+			if (i < nractrs)
+				return -EINVAL;
+			if ((cccr_val & P4_CCCR_FORCE_OVF) &&
+			    state->control.ireset[i] != -1)
+				return -EINVAL;
+		} else {
+			if (i >= nractrs)
+				return -EINVAL;
+		}
+		/* check ESCR contents */
+		escr_val = state->control.p4.escr[i];
+		if (escr_val & P4_ESCR_RESERVED)
+			return -EPERM;
+		if ((escr_val & P4_ESCR_CPL_T1) && (!p4_is_ht || !is_global))
+			return -EINVAL;
+		/* compute and cache ESCR address */
+		escr_addr = p4_escr_addr(pmc, cccr_val);
+		if (!escr_addr)
+			return -EINVAL;		/* ESCR SELECT range error */
+		/* IQ_ESCR0 and IQ_ESCR1 only exist in models <= 2 */
+		if ((escr_addr & ~0x001) == 0x3BA && !p4_IQ_ESCR_ok)
+			return -EINVAL;
+		/* XXX: Two counters could map to the same ESCR. Should we
+		   check that they use the same ESCR value? */
+		state->p4_escr_map[i] = escr_addr - MSR_P4_ESCR0;
+	}
+	/* check ReplayTagging control (PEBS_ENABLE and PEBS_MATRIX_VERT) */
+	if (state->control.p4.pebs_enable) {
+		if (!nrctrs)
+			return -EPERM;
+		if (state->control.p4.pebs_enable & P4_PE_RESERVED)
+			return -EPERM;
+		if (!(state->control.p4.pebs_enable & P4_PE_UOP_TAG))
+			return -EINVAL;
+		if (!(state->control.p4.pebs_enable & P4_PE_REPLAY_TAG_BITS))
+			return -EINVAL;
+		if (state->control.p4.pebs_matrix_vert & P4_PMV_RESERVED)
+			return -EPERM;
+		if (!(state->control.p4.pebs_matrix_vert & P4_PMV_REPLAY_TAG_BITS))
+			return -EINVAL;
+	} else if (state->control.p4.pebs_matrix_vert)
+		return -EPERM;
+	state->k1.id = new_id();
+	return 0;
+}
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+static void p4_isuspend(struct perfctr_cpu_state *state)
+{
+	return p6_like_isuspend(state, MSR_P4_CCCR0);
+}
+
+static void p4_iresume(const struct perfctr_cpu_state *state)
+{
+	return p6_like_iresume(state, MSR_P4_CCCR0, MSR_P4_PERFCTR0);
+}
+#endif	/* PERFCTR_INTERRUPT_SUPPORT */
+
+static void p4_write_control(const struct perfctr_cpu_state *state)
+{
+	struct per_cpu_cache *cache;
+	unsigned int nrctrs, i;
+
+	cache = &__get_cpu_var(per_cpu_cache);
+	if (cache->k1.id == state->k1.id)
+		return;
+	nrctrs = perfctr_cstatus_nrctrs(state->cstatus);
+	for(i = 0; i < nrctrs; ++i) {
+		unsigned int escr_val, escr_off, cccr_val, pmc;
+		escr_val = state->control.p4.escr[i];
+		escr_off = state->p4_escr_map[i];
+		if (escr_val != cache->control.escr[escr_off]) {
+			cache->control.escr[escr_off] = escr_val;
+			wrmsr(MSR_P4_ESCR0+escr_off, escr_val, 0);
+		}
+		cccr_val = state->control.evntsel[i];
+		pmc = state->pmc[i].map & P4_MASK_FAST_RDPMC;
+		if (cccr_val != cache->control.evntsel[pmc]) {
+			cache->control.evntsel[pmc] = cccr_val;
+			wrmsr(MSR_P4_CCCR0+pmc, cccr_val, 0);
+		}
+	}
+	if (state->control.p4.pebs_enable != cache->control.pebs_enable) {
+		cache->control.pebs_enable = state->control.p4.pebs_enable;
+		wrmsr(MSR_P4_PEBS_ENABLE, state->control.p4.pebs_enable, 0);
+	}
+	if (state->control.p4.pebs_matrix_vert != cache->control.pebs_matrix_vert) {
+		cache->control.pebs_matrix_vert = state->control.p4.pebs_matrix_vert;
+		wrmsr(MSR_P4_PEBS_MATRIX_VERT, state->control.p4.pebs_matrix_vert, 0);
+	}
+	cache->k1.id = state->k1.id;
+}
+
+static void p4_clear_counters(void)
+{
+	/* MSR 0x3F0 seems to have a default value of 0xFC00, but current
+	   docs doesn't fully define it, so leave it alone for now. */
+	/* clear PEBS_ENABLE and PEBS_MATRIX_VERT; they handle both PEBS
+	   and ReplayTagging, and should exist even if PEBS is disabled */
+	clear_msr_range(0x3F1, 2);
+	clear_msr_range(0x3A0, 31);
+	clear_msr_range(0x3C0, 6);
+	clear_msr_range(0x3C8, 6);
+	clear_msr_range(0x3E0, 2);
+	clear_msr_range(MSR_P4_CCCR0, 18);
+	clear_msr_range(MSR_P4_PERFCTR0, 18);
+}
+
+/*
+ * Generic driver for any x86 with a working TSC.
+ */
+
+static int generic_check_control(struct perfctr_cpu_state *state, int is_global)
+{
+	if (state->control.nractrs || state->control.nrictrs)
+		return -EINVAL;
+	return 0;
+}
+
+static void generic_clear_counters(void)
+{
+}
+
+/*
+ * Driver methods, internal and exported.
+ *
+ * Frequently called functions (write_control, read_counters,
+ * isuspend and iresume) are back-patched to invoke the correct
+ * processor-specific methods directly, thereby saving the
+ * overheads of indirect function calls.
+ *
+ * Backpatchable call sites must have been "finalised" after
+ * initialisation. The reason for this is that unsynchronised code
+ * modification doesn't work in multiprocessor systems, due to
+ * Intel P6 errata. Consequently, all backpatchable call sites
+ * must be known and local to this file.
+ *
+ * Backpatchable calls must initially be to 'noinline' stubs.
+ * Otherwise the compiler may inline the stubs, which breaks
+ * redirect_call() and finalise_backpatching().
+ */
+
+static int redirect_call_disable;
+
+static noinline void redirect_call(void *ra, void *to)
+{
+	/* XXX: make this function __init later */
+	if (redirect_call_disable)
+		printk(KERN_ERR __FILE__ ":%s: unresolved call to %p at %p\n",
+		       __FUNCTION__, to, ra);
+	/* we can only redirect `call near relative' instructions */
+	if (*((unsigned char*)ra - 5) != 0xE8) {
+		printk(KERN_WARNING __FILE__ ":%s: unable to redirect caller %p to %p\n",
+		       __FUNCTION__, ra, to);
+		return;
+	}
+	*(int*)((char*)ra - 4) = (char*)to - (char*)ra;
+}
+
+static void (*write_control)(const struct perfctr_cpu_state*);
+static noinline void perfctr_cpu_write_control(const struct perfctr_cpu_state *state)
+{
+	redirect_call(__builtin_return_address(0), write_control);
+	return write_control(state);
+}
+
+static void (*read_counters)(const struct perfctr_cpu_state*,
+			     struct perfctr_low_ctrs*);
+static noinline void perfctr_cpu_read_counters(const struct perfctr_cpu_state *state,
+					       struct perfctr_low_ctrs *ctrs)
+{
+	redirect_call(__builtin_return_address(0), read_counters);
+	return read_counters(state, ctrs);
+}
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+static void (*cpu_isuspend)(struct perfctr_cpu_state*);
+static noinline void perfctr_cpu_isuspend(struct perfctr_cpu_state *state)
+{
+	redirect_call(__builtin_return_address(0), cpu_isuspend);
+	return cpu_isuspend(state);
+}
+
+static void (*cpu_iresume)(const struct perfctr_cpu_state*);
+static noinline void perfctr_cpu_iresume(const struct perfctr_cpu_state *state)
+{
+	redirect_call(__builtin_return_address(0), cpu_iresume);
+	return cpu_iresume(state);
+}
+
+/* Call perfctr_cpu_ireload() just before perfctr_cpu_resume() to
+   bypass internal caching and force a reload if the I-mode PMCs. */
+void perfctr_cpu_ireload(struct perfctr_cpu_state *state)
+{
+#ifdef CONFIG_SMP
+	clear_isuspend_cpu(state);
+#else
+	__get_cpu_var(per_cpu_cache).k1.id = 0;
+#endif
+}
+
+/* PRE: the counters have been suspended and sampled by perfctr_cpu_suspend() */
+static int lvtpc_reinit_needed;
+unsigned int perfctr_cpu_identify_overflow(struct perfctr_cpu_state *state)
+{
+	unsigned int cstatus, nrctrs, pmc, pmc_mask;
+
+	cstatus = state->cstatus;
+	pmc = perfctr_cstatus_nractrs(cstatus);
+	nrctrs = perfctr_cstatus_nrctrs(cstatus);
+
+	for(pmc_mask = 0; pmc < nrctrs; ++pmc) {
+		if ((int)state->pmc[pmc].start >= 0) { /* XXX: ">" ? */
+			/* XXX: "+=" to correct for overshots */
+			state->pmc[pmc].start = state->control.ireset[pmc];
+			pmc_mask |= (1 << pmc);
+			/* On a P4 we should now clear the OVF flag in the
+			   counter's CCCR. However, p4_isuspend() already
+			   did that as a side-effect of clearing the CCCR
+			   in order to stop the i-mode counters. */
+		}
+	}
+	if (lvtpc_reinit_needed)
+		apic_write(APIC_LVTPC, LOCAL_PERFCTR_VECTOR);
+	return pmc_mask;
+}
+
+static inline int check_ireset(const struct perfctr_cpu_state *state)
+{
+	unsigned int nrctrs, i;
+
+	i = state->control.nractrs;
+	nrctrs = i + state->control.nrictrs;
+	for(; i < nrctrs; ++i)
+		if (state->control.ireset[i] >= 0)
+			return -EINVAL;
+	return 0;
+}
+
+static inline void setup_imode_start_values(struct perfctr_cpu_state *state)
+{
+	unsigned int cstatus, nrctrs, i;
+
+	cstatus = state->cstatus;
+	nrctrs = perfctr_cstatus_nrctrs(cstatus);
+	for(i = perfctr_cstatus_nractrs(cstatus); i < nrctrs; ++i)
+		state->pmc[i].start = state->control.ireset[i];
+}
+
+#else	/* PERFCTR_INTERRUPT_SUPPORT */
+static inline void perfctr_cpu_isuspend(struct perfctr_cpu_state *state) { }
+static inline void perfctr_cpu_iresume(const struct perfctr_cpu_state *state) { }
+static inline int check_ireset(const struct perfctr_cpu_state *state) { return 0; }
+static inline void setup_imode_start_values(struct perfctr_cpu_state *state) { }
+#endif	/* PERFCTR_INTERRUPT_SUPPORT */
+
+static int (*check_control)(struct perfctr_cpu_state*, int);
+int perfctr_cpu_update_control(struct perfctr_cpu_state *state, int is_global)
+{
+	int err;
+
+	clear_isuspend_cpu(state);
+	state->cstatus = 0;
+
+	/* disallow i-mode counters if we cannot catch the interrupts */
+	if (!(perfctr_info.cpu_features & PERFCTR_FEATURE_PCINT)
+	    && state->control.nrictrs)
+		return -EPERM;
+
+	err = check_control(state, is_global);
+	if (err < 0)
+		return err;
+	err = check_ireset(state);
+	if (err < 0)
+		return err;
+	state->cstatus = perfctr_mk_cstatus(state->control.tsc_on,
+					    state->control.nractrs,
+					    state->control.nrictrs);
+	setup_imode_start_values(state);
+	return 0;
+}
+
+void perfctr_cpu_suspend(struct perfctr_cpu_state *state)
+{
+	unsigned int i, cstatus, nractrs;
+	struct perfctr_low_ctrs now;
+
+	if (perfctr_cstatus_has_ictrs(state->cstatus))
+	    perfctr_cpu_isuspend(state);
+	perfctr_cpu_read_counters(state, &now);
+	cstatus = state->cstatus;
+	if (perfctr_cstatus_has_tsc(cstatus))
+		state->tsc_sum += now.tsc - state->tsc_start;
+	nractrs = perfctr_cstatus_nractrs(cstatus);
+	for(i = 0; i < nractrs; ++i)
+		state->pmc[i].sum += now.pmc[i] - state->pmc[i].start;
+	/* perfctr_cpu_disable_rdpmc(); */	/* not for x86 */
+}
+
+void perfctr_cpu_resume(struct perfctr_cpu_state *state)
+{
+	if (perfctr_cstatus_has_ictrs(state->cstatus))
+	    perfctr_cpu_iresume(state);
+	/* perfctr_cpu_enable_rdpmc(); */	/* not for x86 or global-mode */
+	perfctr_cpu_write_control(state);
+	//perfctr_cpu_read_counters(state, &state->start);
+	{
+		struct perfctr_low_ctrs now;
+		unsigned int i, cstatus, nrctrs;
+		perfctr_cpu_read_counters(state, &now);
+		cstatus = state->cstatus;
+		if (perfctr_cstatus_has_tsc(cstatus))
+			state->tsc_start = now.tsc;
+		nrctrs = perfctr_cstatus_nractrs(cstatus);
+		for(i = 0; i < nrctrs; ++i)
+			state->pmc[i].start = now.pmc[i];
+	}
+	/* XXX: if (SMP && start.tsc == now.tsc) ++now.tsc; */
+}
+
+void perfctr_cpu_sample(struct perfctr_cpu_state *state)
+{
+	unsigned int i, cstatus, nractrs;
+	struct perfctr_low_ctrs now;
+
+	perfctr_cpu_read_counters(state, &now);
+	cstatus = state->cstatus;
+	if (perfctr_cstatus_has_tsc(cstatus)) {
+		state->tsc_sum += now.tsc - state->tsc_start;
+		state->tsc_start = now.tsc;
+	}
+	nractrs = perfctr_cstatus_nractrs(cstatus);
+	for(i = 0; i < nractrs; ++i) {
+		state->pmc[i].sum += now.pmc[i] - state->pmc[i].start;
+		state->pmc[i].start = now.pmc[i];
+	}
+}
+
+static void (*clear_counters)(void);
+static void perfctr_cpu_clear_counters(void)
+{
+	return clear_counters();
+}
+
+/****************************************************************
+ *								*
+ * Processor detection and initialisation procedures.		*
+ *								*
+ ****************************************************************/
+
+static inline void clear_perfctr_cpus_forbidden_mask(void)
+{
+#if !defined(perfctr_cpus_forbidden_mask)
+	cpus_clear(perfctr_cpus_forbidden_mask);
+#endif
+}
+
+static inline void set_perfctr_cpus_forbidden_mask(cpumask_t mask)
+{
+#if !defined(perfctr_cpus_forbidden_mask)
+	perfctr_cpus_forbidden_mask = mask;
+#endif
+}
+
+/* see comment above at redirect_call() */
+static void __init finalise_backpatching(void)
+{
+	struct per_cpu_cache *cache;
+	struct perfctr_cpu_state state;
+	cpumask_t old_mask;
+
+	old_mask = perfctr_cpus_forbidden_mask;
+	clear_perfctr_cpus_forbidden_mask();
+
+	cache = &__get_cpu_var(per_cpu_cache);
+	memset(cache, 0, sizeof *cache);
+	memset(&state, 0, sizeof state);
+	state.cstatus =
+		(perfctr_info.cpu_features & PERFCTR_FEATURE_PCINT)
+		? perfctr_mk_cstatus(0, 0, 1)
+		: 0;
+	perfctr_cpu_sample(&state);
+	perfctr_cpu_resume(&state);
+	perfctr_cpu_suspend(&state);
+
+	set_perfctr_cpus_forbidden_mask(old_mask);
+
+	redirect_call_disable = 1;
+}
+
+#ifdef CONFIG_SMP
+
+cpumask_t perfctr_cpus_forbidden_mask;
+
+static void __init p4_ht_mask_setup_cpu(void *forbidden)
+{
+	unsigned int local_apic_physical_id = cpuid_ebx(1) >> 24;
+	unsigned int logical_processor_id = local_apic_physical_id & 1;
+	if (logical_processor_id != 0)
+		/* We rely on cpu_set() being atomic! */
+		cpu_set(smp_processor_id(), *(cpumask_t*)forbidden);
+}
+
+static int __init p4_ht_smp_init(void)
+{
+	cpumask_t forbidden;
+	unsigned int cpu;
+
+	cpus_clear(forbidden);
+	smp_call_function(p4_ht_mask_setup_cpu, &forbidden, 1, 1);
+	p4_ht_mask_setup_cpu(&forbidden);
+	if (cpus_empty(forbidden))
+		return 0;
+	perfctr_cpus_forbidden_mask = forbidden;
+	printk(KERN_INFO "perfctr/x86.c: hyper-threaded P4s detected:"
+	       " restricting access for CPUs");
+	for(cpu = 0; cpu < NR_CPUS; ++cpu)
+		if (cpu_isset(cpu, forbidden))
+			printk(" %u", cpu);
+	printk("\n");
+	return 0;
+}
+#else /* SMP */
+#define p4_ht_smp_init()	(0)
+#endif /* SMP */
+
+static int __init p4_ht_init(void)
+{
+	unsigned int nr_siblings;
+
+	if (!cpu_has_ht)
+		return 0;
+	nr_siblings = (cpuid_ebx(1) >> 16) & 0xFF;
+	if (nr_siblings > 2) {
+		printk(KERN_WARNING "perfctr/x86.c: hyper-threaded P4s detected:"
+		       " unsupported number of siblings: %u -- bailing out\n",
+		       nr_siblings);
+		return -ENODEV;
+	}
+	if (nr_siblings < 2)
+		return 0;
+	p4_is_ht = 1;	/* needed even in a UP kernel */
+	return p4_ht_smp_init();
+}
+
+static int __init intel_init(void)
+{
+	static char p5_name[] __initdata = "Intel P5";
+	static char p6_name[] __initdata = "Intel P6";
+	static char p4_name[] __initdata = "Intel P4";
+	unsigned int misc_enable;
+
+	if (!cpu_has_tsc)
+		return -ENODEV;
+	switch (current_cpu_data.x86) {
+	case 5:
+		if (cpu_has_mmx) {
+			read_counters = rdpmc_read_counters;
+
+			/* Avoid Pentium Erratum 74. */
+			if (current_cpu_data.x86_model == 4 &&
+			    (current_cpu_data.x86_mask == 4 ||
+			     (current_cpu_data.x86_mask == 3 &&
+			      ((cpuid_eax(1) >> 12) & 0x3) == 1)))
+				perfctr_info.cpu_features &= ~PERFCTR_FEATURE_RDPMC;
+		} else {
+			perfctr_info.cpu_features &= ~PERFCTR_FEATURE_RDPMC;
+			read_counters = p5_read_counters;
+		}
+		perfctr_set_tests_type(PTT_P5);
+		perfctr_cpu_name = p5_name;
+		write_control = p5_write_control;
+		check_control = p5_check_control;
+		clear_counters = p5_clear_counters;
+		return 0;
+	case 6:
+		if (current_cpu_data.x86_model == 9 ||
+		    current_cpu_data.x86_model == 13) {	/* Pentium M */
+			/* Pentium M added the MISC_ENABLE MSR from P4. */
+			rdmsr_low(MSR_IA32_MISC_ENABLE, misc_enable);
+			if (!(misc_enable & MSR_IA32_MISC_ENABLE_PERF_AVAIL))
+				break;
+			/* Erratum Y3 probably does not apply since we
+			   read only the low 32 bits. */
+		} else if (current_cpu_data.x86_model < 3) {	/* Pentium Pro */
+			/* Avoid Pentium Pro Erratum 26. */
+			if (current_cpu_data.x86_mask < 9)
+				perfctr_info.cpu_features &= ~PERFCTR_FEATURE_RDPMC;
+		}
+		perfctr_set_tests_type(PTT_P6);
+		perfctr_cpu_name = p6_name;
+		read_counters = rdpmc_read_counters;
+		write_control = p6_write_control;
+		check_control = p6_check_control;
+		clear_counters = p6_clear_counters;
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+		if (cpu_has_apic) {
+			perfctr_info.cpu_features |= PERFCTR_FEATURE_PCINT;
+			cpu_isuspend = p6_isuspend;
+			cpu_iresume = p6_iresume;
+			/* P-M apparently inherited P4's LVTPC auto-masking :-( */
+			if (current_cpu_data.x86_model == 9 ||
+			    current_cpu_data.x86_model == 13)
+				lvtpc_reinit_needed = 1;
+		}
+#endif
+		return 0;
+	case 15:	/* Pentium 4 */
+		rdmsr_low(MSR_IA32_MISC_ENABLE, misc_enable);
+		if (!(misc_enable & MSR_IA32_MISC_ENABLE_PERF_AVAIL))
+			break;
+		if (p4_ht_init() != 0)
+			break;
+		if (current_cpu_data.x86_model <= 2)
+			p4_IQ_ESCR_ok = 1;
+		if (current_cpu_data.x86_model >= 2)
+			p4_extended_cascade_ok = 1;
+		perfctr_set_tests_type(PTT_P4);
+		perfctr_cpu_name = p4_name;
+		read_counters = rdpmc_read_counters;
+		write_control = p4_write_control;
+		check_control = p4_check_control;
+		clear_counters = p4_clear_counters;
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+		if (cpu_has_apic) {
+			perfctr_info.cpu_features |= PERFCTR_FEATURE_PCINT;
+			cpu_isuspend = p4_isuspend;
+			cpu_iresume = p4_iresume;
+			lvtpc_reinit_needed = 1;
+		}
+#endif
+		return 0;
+	}
+	return -ENODEV;
+}
+
+static int __init amd_init(void)
+{
+	static char amd_name[] __initdata = "AMD K7/K8";
+
+	if (!cpu_has_tsc)
+		return -ENODEV;
+	switch (current_cpu_data.x86) {
+	case 6: /* K7 */
+	case 15: /* K8. Like a K7 with a different event set. */
+		break;
+	default:
+		return -ENODEV;
+	}
+	perfctr_set_tests_type(PTT_AMD);
+	perfctr_cpu_name = amd_name;
+	read_counters = rdpmc_read_counters;
+	write_control = k7_write_control;
+	check_control = k7_check_control;
+	clear_counters = k7_clear_counters;
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+	if (cpu_has_apic) {
+		perfctr_info.cpu_features |= PERFCTR_FEATURE_PCINT;
+		cpu_isuspend = k7_isuspend;
+		cpu_iresume = k7_iresume;
+	}
+#endif
+	return 0;
+}
+
+static int __init cyrix_init(void)
+{
+	static char mii_name[] __initdata = "Cyrix 6x86MX/MII/III";
+	if (!cpu_has_tsc)
+		return -ENODEV;
+	switch (current_cpu_data.x86) {
+	case 6:	/* 6x86MX, MII, or III */
+		perfctr_set_tests_type(PTT_P5);
+		perfctr_cpu_name = mii_name;
+		read_counters = rdpmc_read_counters;
+		write_control = p5_write_control;
+		check_control = mii_check_control;
+		clear_counters = p5_clear_counters;
+		return 0;
+	}
+	return -ENODEV;
+}
+
+static int __init centaur_init(void)
+{
+#if !defined(CONFIG_X86_TSC)
+	static char winchip_name[] __initdata = "WinChip C6/2/3";
+#endif
+	static char vc3_name[] __initdata = "VIA C3";
+	switch (current_cpu_data.x86) {
+#if !defined(CONFIG_X86_TSC)
+	case 5:
+		switch (current_cpu_data.x86_model) {
+		case 4: /* WinChip C6 */
+		case 8: /* WinChip 2, 2A, or 2B */
+		case 9: /* WinChip 3, a 2A with larger cache and lower voltage */
+			break;
+		default:
+			return -ENODEV;
+		}
+		perfctr_set_tests_type(PTT_WINCHIP);
+		perfctr_cpu_name = winchip_name;
+		/*
+		 * TSC must be inaccessible for perfctrs to work.
+		 */
+		if (!(read_cr4() & X86_CR4_TSD) || cpu_has_tsc)
+			return -ENODEV;
+		perfctr_info.cpu_features &= ~PERFCTR_FEATURE_RDTSC;
+		read_counters = rdpmc_read_counters;
+		write_control = c6_write_control;
+		check_control = c6_check_control;
+		clear_counters = p5_clear_counters;
+		return 0;
+#endif
+	case 6: /* VIA C3 */
+		if (!cpu_has_tsc)
+			return -ENODEV;
+		switch (current_cpu_data.x86_model) {
+		case 6:	/* Cyrix III */
+		case 7:	/* Samuel 2, Ezra (steppings >= 8) */
+		case 8:	/* Ezra-T */
+		case 9: /* Antaur/Nehemiah */
+			break;
+		default:
+			return -ENODEV;
+		}
+		perfctr_set_tests_type(PTT_VC3);
+		perfctr_cpu_name = vc3_name;
+		read_counters = rdpmc_read_counters;
+		write_control = p6_write_control;
+		check_control = vc3_check_control;
+		clear_counters = vc3_clear_counters;
+		return 0;
+	}
+	return -ENODEV;
+}
+
+static int __init generic_init(void)
+{
+	static char generic_name[] __initdata = "Generic x86 with TSC";
+	if (!cpu_has_tsc)
+		return -ENODEV;
+	perfctr_info.cpu_features &= ~PERFCTR_FEATURE_RDPMC;
+	perfctr_set_tests_type(PTT_GENERIC);
+	perfctr_cpu_name = generic_name;
+	check_control = generic_check_control;
+	write_control = p6_write_control;
+	read_counters = rdpmc_read_counters;
+	clear_counters = generic_clear_counters;
+	return 0;
+}
+
+static void perfctr_cpu_invalidate_cache(void)
+{
+	/*
+	 * per_cpu_cache[] is initialised to contain "impossible"
+	 * evntsel values guaranteed to differ from anything accepted
+	 * by perfctr_cpu_update_control().
+	 * All-bits-one works for all currently supported processors.
+	 * The memset also sets the ids to -1, which is intentional.
+	 */
+	memset(&__get_cpu_var(per_cpu_cache), ~0,
+	       sizeof(struct per_cpu_cache));
+}
+
+static void perfctr_cpu_init_one(void *ignore)
+{
+	/* PREEMPT note: when called via smp_call_function(),
+	   this is in IRQ context with preemption disabled. */
+	perfctr_cpu_clear_counters();
+	perfctr_cpu_invalidate_cache();
+	if (cpu_has_apic)
+		apic_write(APIC_LVTPC, LOCAL_PERFCTR_VECTOR);
+	if (perfctr_info.cpu_features & PERFCTR_FEATURE_RDPMC)
+		set_in_cr4_local(X86_CR4_PCE);
+}
+
+static void perfctr_cpu_exit_one(void *ignore)
+{
+	/* PREEMPT note: when called via smp_call_function(),
+	   this is in IRQ context with preemption disabled. */
+	perfctr_cpu_clear_counters();
+	perfctr_cpu_invalidate_cache();
+	if (cpu_has_apic)
+		apic_write(APIC_LVTPC, APIC_DM_NMI | APIC_LVT_MASKED);
+	if (perfctr_info.cpu_features & PERFCTR_FEATURE_RDPMC)
+		clear_in_cr4_local(X86_CR4_PCE);
+}
+
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PM)
+
+static void perfctr_pm_suspend(void)
+{
+	/* XXX: clear control registers */
+	printk("perfctr/x86: PM suspend\n");
+}
+
+static void perfctr_pm_resume(void)
+{
+	/* XXX: reload control registers */
+	printk("perfctr/x86: PM resume\n");
+}
+
+#include <linux/sysdev.h>
+
+static int perfctr_device_suspend(struct sys_device *dev, u32 state)
+{
+	perfctr_pm_suspend();
+	return 0;
+}
+
+static int perfctr_device_resume(struct sys_device *dev)
+{
+	perfctr_pm_resume();
+	return 0;
+}
+
+static struct sysdev_class perfctr_sysclass = {
+	set_kset_name("perfctr"),
+	.resume		= perfctr_device_resume,
+	.suspend	= perfctr_device_suspend,
+};
+
+static struct sys_device device_perfctr = {
+	.id	= 0,
+	.cls	= &perfctr_sysclass,
+};
+
+static void x86_pm_init(void)
+{
+	if (sysdev_class_register(&perfctr_sysclass) == 0)
+		sysdev_register(&device_perfctr);
+}
+
+static void x86_pm_exit(void)
+{
+	sysdev_unregister(&device_perfctr);
+	sysdev_class_unregister(&perfctr_sysclass);
+}
+
+#else
+
+static inline void x86_pm_init(void) { }
+static inline void x86_pm_exit(void) { }
+
+#endif	/* CONFIG_X86_LOCAL_APIC && CONFIG_PM */
+
+#if !defined(CONFIG_X86_LOCAL_APIC)
+static inline int reserve_lapic_nmi(void) { return 0; }
+static inline void release_lapic_nmi(void) { }
+#endif
+
+static void do_init_tests(void)
+{
+#ifdef CONFIG_PERFCTR_INIT_TESTS
+	if (reserve_lapic_nmi() >= 0) {
+		perfctr_x86_init_tests();
+		release_lapic_nmi();
+	}
+#endif
+}
+
+static int init_done;
+
+int __init perfctr_cpu_init(void)
+{
+	int err = -ENODEV;
+
+	preempt_disable();
+
+	/* RDPMC and RDTSC are on by default. They will be disabled
+	   by the init procedures if necessary. */
+	perfctr_info.cpu_features = PERFCTR_FEATURE_RDPMC | PERFCTR_FEATURE_RDTSC;
+
+	if (cpu_has_msr) {
+		switch (current_cpu_data.x86_vendor) {
+		case X86_VENDOR_INTEL:
+			err = intel_init();
+			break;
+		case X86_VENDOR_AMD:
+			err = amd_init();
+			break;
+		case X86_VENDOR_CYRIX:
+			err = cyrix_init();
+			break;
+		case X86_VENDOR_CENTAUR:
+			err = centaur_init();
+		}
+	}
+	if (err) {
+		err = generic_init();	/* last resort */
+		if (err)
+			goto out;
+	}
+	do_init_tests();
+	finalise_backpatching();
+
+	perfctr_info.cpu_khz = cpu_khz;
+	perfctr_info.tsc_to_cpu_mult = 1;
+	init_done = 1;
+
+ out:
+	preempt_enable();
+	return err;
+}
+
+void __exit perfctr_cpu_exit(void)
+{
+}
+
+/****************************************************************
+ *								*
+ * Hardware reservation.					*
+ *								*
+ ****************************************************************/
+
+static DECLARE_MUTEX(mutex);
+static const char *current_service = 0;
+
+const char *perfctr_cpu_reserve(const char *service)
+{
+	const char *ret;
+
+	if (!init_done)
+		return "unsupported hardware";
+	down(&mutex);
+	ret = current_service;
+	if (ret)
+		goto out_up;
+	ret = "unknown driver (oprofile?)";
+	if (reserve_lapic_nmi() < 0)
+		goto out_up;
+	current_service = service;
+	if (perfctr_info.cpu_features & PERFCTR_FEATURE_RDPMC)
+		mmu_cr4_features |= X86_CR4_PCE;
+	on_each_cpu(perfctr_cpu_init_one, NULL, 1, 1);
+	perfctr_cpu_set_ihandler(NULL);
+	x86_pm_init();
+	ret = NULL;
+ out_up:
+	up(&mutex);
+	return ret;
+}
+
+void perfctr_cpu_release(const char *service)
+{
+	down(&mutex);
+	if (service != current_service) {
+		printk(KERN_ERR "%s: attempt by %s to release while reserved by %s\n",
+		       __FUNCTION__, service, current_service);
+		goto out_up;
+	}
+	/* power down the counters */
+	if (perfctr_info.cpu_features & PERFCTR_FEATURE_RDPMC)
+		mmu_cr4_features &= ~X86_CR4_PCE;
+	on_each_cpu(perfctr_cpu_exit_one, NULL, 1, 1);
+	perfctr_cpu_set_ihandler(NULL);
+	x86_pm_exit();
+	current_service = 0;
+	release_lapic_nmi();
+ out_up:
+	up(&mutex);
+}
--- diff/drivers/perfctr/x86_tests.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/x86_tests.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,275 @@
+/* $Id: x86_tests.c,v 1.28 2004/05/23 23:22:44 mikpe Exp $
+ * Performance-monitoring counters driver.
+ * Optional x86/x86_64-specific init-time tests.
+ *
+ * Copyright (C) 1999-2004  Mikael Pettersson
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/fs.h>
+#include <linux/perfctr.h>
+#include <asm/msr.h>
+#undef MSR_P6_PERFCTR0
+#undef MSR_P4_IQ_CCCR0
+#undef MSR_P4_CRU_ESCR0
+#include <asm/fixmap.h>
+#include <asm/apic.h>
+#include <asm/timex.h>	/* cpu_khz */
+#include "x86_tests.h"
+
+#define MSR_P5_CESR		0x11
+#define MSR_P5_CTR0		0x12
+#define P5_CESR_VAL		(0x16 | (3<<6))
+#define MSR_P6_PERFCTR0		0xC1
+#define MSR_P6_EVNTSEL0		0x186
+#define P6_EVNTSEL0_VAL		(0xC0 | (3<<16) | (1<<22))
+#define MSR_K7_EVNTSEL0		0xC0010000
+#define MSR_K7_PERFCTR0		0xC0010004
+#define K7_EVNTSEL0_VAL		(0xC0 | (3<<16) | (1<<22))
+#define VC3_EVNTSEL1_VAL	0xC0
+#define MSR_P4_IQ_COUNTER0	0x30C
+#define MSR_P4_IQ_CCCR0		0x36C
+#define MSR_P4_CRU_ESCR0	0x3B8
+#define P4_CRU_ESCR0_VAL	((2<<25) | (1<<9) | (0x3<<2))
+#define P4_IQ_CCCR0_VAL		((0x3<<16) | (4<<13) | (1<<12))
+
+#define NITER	64
+#define X2(S)	S";"S
+#define X8(S)	X2(X2(X2(S)))
+
+#ifdef __x86_64__
+#define CR4MOV	"movq"
+#else
+#define CR4MOV	"movl"
+#endif
+
+static void __init do_rdpmc(unsigned pmc, unsigned unused2)
+{
+	unsigned i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("rdpmc") : : "c"(pmc) : "eax", "edx");
+}
+
+static void __init do_rdmsr(unsigned msr, unsigned unused2)
+{
+	unsigned i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("rdmsr") : : "c"(msr) : "eax", "edx");
+}
+
+static void __init do_wrmsr(unsigned msr, unsigned data)
+{
+	unsigned i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("wrmsr") : : "c"(msr), "a"(data), "d"(0));
+}
+
+static void __init do_rdcr4(unsigned unused1, unsigned unused2)
+{
+	unsigned i;
+	unsigned long dummy;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8(CR4MOV" %%cr4,%0") : "=r"(dummy));
+}
+
+static void __init do_wrcr4(unsigned cr4, unsigned unused2)
+{
+	unsigned i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8(CR4MOV" %0,%%cr4") : : "r"((long)cr4));
+}
+
+static void __init do_rdtsc(unsigned unused1, unsigned unused2)
+{
+	unsigned i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__(X8("rdtsc") : : : "eax", "edx");
+}
+
+static void __init do_wrlvtpc(unsigned val, unsigned unused2)
+{
+	unsigned i;
+	for(i = 0; i < NITER/8; ++i) {
+		apic_write(APIC_LVTPC, val);
+		apic_write(APIC_LVTPC, val);
+		apic_write(APIC_LVTPC, val);
+		apic_write(APIC_LVTPC, val);
+		apic_write(APIC_LVTPC, val);
+		apic_write(APIC_LVTPC, val);
+		apic_write(APIC_LVTPC, val);
+		apic_write(APIC_LVTPC, val);
+	}
+}
+
+static void __init do_empty_loop(unsigned unused1, unsigned unused2)
+{
+	unsigned i;
+	for(i = 0; i < NITER/8; ++i)
+		__asm__ __volatile__("" : : "c"(0));
+}
+
+static unsigned __init run(void (*doit)(unsigned, unsigned),
+			   unsigned arg1, unsigned arg2)
+{
+	unsigned start, dummy, stop;
+	rdtsc(start, dummy);
+	(*doit)(arg1, arg2);	/* should take < 2^32 cycles to complete */
+	rdtsc(stop, dummy);
+	return stop - start;
+}
+
+static void __init init_tests_message(void)
+{
+	printk(KERN_INFO "Please email the following PERFCTR INIT lines "
+	       "to mikpe@csd.uu.se\n"
+	       KERN_INFO "To remove this message, rebuild the driver "
+	       "with CONFIG_PERFCTR_INIT_TESTS=n\n");
+	printk(KERN_INFO "PERFCTR INIT: vendor %u, family %u, model %u, stepping %u, clock %u kHz\n",
+	       current_cpu_data.x86_vendor,
+	       current_cpu_data.x86,
+	       current_cpu_data.x86_model,
+	       current_cpu_data.x86_mask,
+	       (unsigned int)cpu_khz);
+}
+
+static void __init
+measure_overheads(unsigned msr_evntsel0, unsigned evntsel0, unsigned msr_perfctr0,
+		  unsigned msr_cccr, unsigned cccr_val)
+{
+	int i;
+	unsigned int loop, ticks[12];
+	const char *name[12];
+
+	if (msr_evntsel0)
+		wrmsr(msr_evntsel0, 0, 0);
+	if (msr_cccr)
+		wrmsr(msr_cccr, 0, 0);
+
+	name[0] = "rdtsc";
+	ticks[0] = run(do_rdtsc, 0, 0);
+	name[1] = "rdpmc";
+	ticks[1] = (perfctr_info.cpu_features & PERFCTR_FEATURE_RDPMC)
+		? run(do_rdpmc,1,0) : 0;
+	name[2] = "rdmsr (counter)";
+	ticks[2] = msr_perfctr0 ? run(do_rdmsr, msr_perfctr0, 0) : 0;
+	name[3] = msr_cccr ? "rdmsr (escr)" : "rdmsr (evntsel)";
+	ticks[3] = msr_evntsel0 ? run(do_rdmsr, msr_evntsel0, 0) : 0;
+	name[4] = "wrmsr (counter)";
+	ticks[4] = msr_perfctr0 ? run(do_wrmsr, msr_perfctr0, 0) : 0;
+	name[5] = msr_cccr ? "wrmsr (escr)" : "wrmsr (evntsel)";
+	ticks[5] = msr_evntsel0 ? run(do_wrmsr, msr_evntsel0, evntsel0) : 0;
+	name[6] = "read cr4";
+	ticks[6] = run(do_rdcr4, 0, 0);
+	name[7] = "write cr4";
+	ticks[7] = run(do_wrcr4, read_cr4(), 0);
+	name[8] = "rdpmc (fast)";
+	ticks[8] = msr_cccr ? run(do_rdpmc, 0x80000001, 0) : 0;
+	name[9] = "rdmsr (cccr)";
+	ticks[9] = msr_cccr ? run(do_rdmsr, msr_cccr, 0) : 0;
+	name[10] = "wrmsr (cccr)";
+	ticks[10] = msr_cccr ? run(do_wrmsr, msr_cccr, cccr_val) : 0;
+	name[11] = "write LVTPC";
+	ticks[11] = (perfctr_info.cpu_features & PERFCTR_FEATURE_PCINT)
+		? run(do_wrlvtpc, APIC_DM_NMI|APIC_LVT_MASKED, 0) : 0;
+
+	loop = run(do_empty_loop, 0, 0);
+
+	if (msr_evntsel0)
+		wrmsr(msr_evntsel0, 0, 0);
+	if (msr_cccr)
+		wrmsr(msr_cccr, 0, 0);
+
+	init_tests_message();
+	printk(KERN_INFO "PERFCTR INIT: NITER == %u\n", NITER);
+	printk(KERN_INFO "PERFCTR INIT: loop overhead is %u cycles\n", loop);
+	for(i = 0; i < ARRAY_SIZE(ticks); ++i) {
+		unsigned int x;
+		if (!ticks[i])
+			continue;
+		x = ((ticks[i] - loop) * 10) / NITER;
+		printk(KERN_INFO "PERFCTR INIT: %s cost is %u.%u cycles (%u total)\n",
+		       name[i], x/10, x%10, ticks[i]);
+	}
+}
+
+#ifndef __x86_64__
+static inline void perfctr_p5_init_tests(void)
+{
+	measure_overheads(MSR_P5_CESR, P5_CESR_VAL, MSR_P5_CTR0, 0, 0);
+}
+
+static inline void perfctr_p6_init_tests(void)
+{
+	measure_overheads(MSR_P6_EVNTSEL0, P6_EVNTSEL0_VAL, MSR_P6_PERFCTR0, 0, 0);
+}
+
+#if !defined(CONFIG_X86_TSC)
+static inline void perfctr_c6_init_tests(void)
+{
+	unsigned int cesr, dummy;
+
+	rdmsr(MSR_P5_CESR, cesr, dummy);
+	init_tests_message();
+	printk(KERN_INFO "PERFCTR INIT: boot CESR == %#08x\n", cesr);
+}
+#endif
+
+static inline void perfctr_vc3_init_tests(void)
+{
+	measure_overheads(MSR_P6_EVNTSEL0+1, VC3_EVNTSEL1_VAL, MSR_P6_PERFCTR0+1, 0, 0);
+}
+
+static inline void perfctr_p4_init_tests(void)
+{
+	measure_overheads(MSR_P4_CRU_ESCR0, P4_CRU_ESCR0_VAL, MSR_P4_IQ_COUNTER0,
+			  MSR_P4_IQ_CCCR0, P4_IQ_CCCR0_VAL);
+}
+#endif /* !__x86_64__ */
+
+static inline void perfctr_k7_init_tests(void)
+{
+	measure_overheads(MSR_K7_EVNTSEL0, K7_EVNTSEL0_VAL, MSR_K7_PERFCTR0, 0, 0);
+}
+
+static inline void perfctr_generic_init_tests(void)
+{
+	measure_overheads(0, 0, 0, 0, 0);
+}
+
+enum perfctr_x86_tests_type perfctr_x86_tests_type __initdata = PTT_UNKNOWN;
+
+void __init perfctr_x86_init_tests(void)
+{
+	switch (perfctr_x86_tests_type) {
+#ifndef __x86_64__
+	case PTT_P5: /* Intel P5, P5MMX; Cyrix 6x86MX, MII, III */
+		perfctr_p5_init_tests();
+		break;
+	case PTT_P6: /* Intel PPro, PII, PIII, PENTM */
+		perfctr_p6_init_tests();
+		break;
+#if !defined(CONFIG_X86_TSC)
+	case PTT_WINCHIP: /* WinChip C6, 2, 3 */
+		perfctr_c6_init_tests();
+		break;
+#endif
+	case PTT_VC3: /* VIA C3 */
+		perfctr_vc3_init_tests();
+		break;
+	case PTT_P4: /* Intel P4 */
+		perfctr_p4_init_tests();
+		break;
+#endif /* !__x86_64__ */
+	case PTT_AMD: /* AMD K7, K8 */
+		perfctr_k7_init_tests();
+		break;
+	case PTT_GENERIC:
+		perfctr_generic_init_tests();
+		break;
+	default:
+		printk(KERN_INFO "%s: unknown CPU type %u\n",
+		       __FUNCTION__, perfctr_x86_tests_type);
+		break;
+	}
+}
--- diff/drivers/perfctr/x86_tests.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/perfctr/x86_tests.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,30 @@
+/* $Id: x86_tests.h,v 1.10 2004/05/22 20:48:57 mikpe Exp $
+ * Performance-monitoring counters driver.
+ * Optional x86/x86_64-specific init-time tests.
+ *
+ * Copyright (C) 1999-2004  Mikael Pettersson
+ */
+
+/* 'enum perfctr_x86_tests_type' classifies CPUs according
+   to relevance for perfctr_x86_init_tests(). */
+enum perfctr_x86_tests_type {
+	PTT_UNKNOWN,
+	PTT_GENERIC,
+	PTT_P5,
+	PTT_P6,
+	PTT_P4,
+	PTT_AMD,
+	PTT_WINCHIP,
+	PTT_VC3,
+};
+
+extern enum perfctr_x86_tests_type perfctr_x86_tests_type;
+
+static inline void perfctr_set_tests_type(enum perfctr_x86_tests_type t)
+{
+#ifdef CONFIG_PERFCTR_INIT_TESTS
+	perfctr_x86_tests_type = t;
+#endif
+}
+
+extern void perfctr_x86_init_tests(void);
--- diff/drivers/scsi/3w-9xxx.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/scsi/3w-9xxx.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,2153 @@
+/*
+   3w-9xxx.c -- 3ware 9000 Storage Controller device driver for Linux.
+
+   Written By: Adam Radford <linuxraid@amcc.com>
+
+   Copyright (C) 2004 Applied Micro Circuits Corporation.
+
+   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; version 2 of the License.
+
+   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.
+
+   NO WARRANTY
+   THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
+   CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
+   LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
+   solely responsible for determining the appropriateness of using and
+   distributing the Program and assumes all risks associated with its
+   exercise of rights under this Agreement, including but not limited to
+   the risks and costs of program errors, damage to or loss of data,
+   programs or equipment, and unavailability or interruption of operations.
+
+   DISCLAIMER OF LIABILITY
+   NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
+   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
+   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+   TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+   USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+   HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
+
+   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
+
+   Bugs/Comments/Suggestions should be mailed to:
+   linuxraid@amcc.com
+
+   For more information, goto:
+   http://www.amcc.com
+
+   Note: This version of the driver does not contain a bundled firmware
+         image.
+
+   History
+   -------
+   2.26.02.000 - Driver cleanup for kernel submission.
+   2.26.02.001 - Replace schedule_timeout() calls with msleep().
+*/
+
+#include <linux/module.h>
+#include <linux/reboot.h>
+#include <linux/spinlock.h>
+#include <linux/interrupt.h>
+#include <linux/moduleparam.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/delay.h>
+#include <linux/pci.h>
+#include <linux/time.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/uaccess.h>
+#include <scsi/scsi.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>
+#include <scsi/scsi_cmnd.h>
+#include "3w-9xxx.h"
+
+/* Globals */
+static const char *twa_driver_version="2.26.02.001";
+static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT];
+static unsigned int twa_device_extension_count;
+static int twa_major = -1;
+extern struct timezone sys_tz;
+
+/* Module parameters */
+MODULE_AUTHOR ("AMCC");
+MODULE_DESCRIPTION ("3ware 9000 Storage Controller Linux Driver");
+MODULE_LICENSE("GPL");
+
+/* Function prototypes */
+static void twa_aen_queue_event(TW_Device_Extension *tw_dev, TW_Command_Apache_Header *header);
+static int twa_aen_read_queue(TW_Device_Extension *tw_dev, int request_id);
+static char *twa_aen_severity_lookup(unsigned char severity_code);
+static void twa_aen_sync_time(TW_Device_Extension *tw_dev, int request_id);
+static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg);
+static int twa_chrdev_open(struct inode *inode, struct file *file);
+static int twa_fill_sense(TW_Device_Extension *tw_dev, int request_id, int copy_sense, int print_host);
+static void twa_free_request_id(TW_Device_Extension *tw_dev,int request_id);
+static void twa_get_request_id(TW_Device_Extension *tw_dev, int *request_id);
+static int twa_initconnection(TW_Device_Extension *tw_dev, int message_credits,
+ 			      u32 set_features, unsigned short current_fw_srl, 
+			      unsigned short current_fw_arch_id, 
+			      unsigned short current_fw_branch, 
+			      unsigned short current_fw_build, 
+			      unsigned short *fw_on_ctlr_srl, 
+			      unsigned short *fw_on_ctlr_arch_id, 
+			      unsigned short *fw_on_ctlr_branch, 
+			      unsigned short *fw_on_ctlr_build, 
+			      u32 *init_connect_result);
+static void twa_load_sgl(TW_Command_Full *full_command_packet, int request_id, dma_addr_t dma_handle, int length);
+static int twa_poll_response(TW_Device_Extension *tw_dev, int request_id, int seconds);
+static int twa_poll_status_gone(TW_Device_Extension *tw_dev, u32 flag, int seconds);
+static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id, char internal);
+static int twa_reset_device_extension(TW_Device_Extension *tw_dev);
+static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset);
+static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Apache *sglistarg);
+static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id);
+static char *twa_string_lookup(twa_message_type *table, unsigned int aen_code);
+static void twa_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id);
+
+/* Functions */
+
+/* Show some statistics about the card */
+static ssize_t twa_show_stats(struct class_device *class_dev, char *buf)
+{
+	struct Scsi_Host *host = class_to_shost(class_dev);
+	TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata;
+	unsigned long flags = 0;
+	ssize_t len;
+
+	spin_lock_irqsave(tw_dev->host->host_lock, flags);
+	len = snprintf(buf, PAGE_SIZE, "Driver version: %s\n"
+		       "Current commands posted:   %4d\n"
+		       "Max commands posted:       %4d\n"
+		       "Current pending commands:  %4d\n"
+		       "Max pending commands:      %4d\n"
+		       "Last sgl length:           %4d\n"
+		       "Max sgl length:            %4d\n"
+		       "Last sector count:         %4d\n"
+		       "Max sector count:          %4d\n"
+		       "SCSI Host Resets:          %4d\n"
+		       "SCSI Aborts/Timeouts:      %4d\n"
+		       "AEN's:                     %4d\n", 
+		       twa_driver_version,
+		       tw_dev->posted_request_count,
+		       tw_dev->max_posted_request_count,
+		       tw_dev->pending_request_count,
+		       tw_dev->max_pending_request_count,
+		       tw_dev->sgl_entries,
+		       tw_dev->max_sgl_entries,
+		       tw_dev->sector_count,
+		       tw_dev->max_sector_count,
+		       tw_dev->num_resets,
+		       tw_dev->num_aborts,
+		       tw_dev->aen_count);
+	spin_unlock_irqrestore(tw_dev->host->host_lock, flags);
+	return len;
+} /* End twa_show_stats() */
+
+/* This function will set a devices queue depth */
+static ssize_t twa_store_queue_depth(struct device *dev, const char *buf, size_t count)
+{
+	int queue_depth;
+	struct scsi_device *sdev = to_scsi_device(dev);
+
+	queue_depth = simple_strtoul(buf, NULL, 0);
+	if (queue_depth > TW_Q_LENGTH-2)
+		return -EINVAL;
+	scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth);
+
+	return count;
+} /* End twa_store_queue_depth() */
+
+/* Create sysfs 'queue_depth' entry */
+static struct device_attribute twa_queue_depth_attr = {
+	.attr = {
+		.name =		"queue_depth",
+		.mode =		S_IRUSR | S_IWUSR,
+	},
+	.store = twa_store_queue_depth
+};
+
+/* Device attributes initializer */
+static struct device_attribute *twa_dev_attrs[] = {
+	&twa_queue_depth_attr,
+	NULL,
+};
+
+/* Create sysfs 'stats' entry */
+static struct class_device_attribute twa_host_stats_attr = {
+	.attr = {
+		.name = 	"stats",
+		.mode =		S_IRUGO,
+	},
+	.show = twa_show_stats
+};
+
+/* Host attributes initializer */
+static struct class_device_attribute *twa_host_attrs[] = {
+	&twa_host_stats_attr,
+	NULL,
+};
+
+/* File operations struct for character device */
+static struct file_operations twa_fops = {
+	.owner		= THIS_MODULE,
+	.ioctl		= twa_chrdev_ioctl,
+	.open		= twa_chrdev_open,
+	.release	= NULL
+};
+
+/* This function will complete an aen request from the isr */
+static int twa_aen_complete(TW_Device_Extension *tw_dev, int request_id)
+{
+	TW_Command_Full *full_command_packet;
+	TW_Command *command_packet;
+	TW_Command_Apache_Header *header;
+	unsigned short aen;
+	int retval = 1;
+
+	header = (TW_Command_Apache_Header *)tw_dev->generic_buffer_virt[request_id];
+	tw_dev->posted_request_count--;
+	aen = header->status_block.error;
+	full_command_packet = tw_dev->command_packet_virt[request_id];
+	command_packet = &full_command_packet->command.oldcommand;
+
+	/* First check for internal completion of set param for time sync */
+	if (TW_OP_OUT(command_packet->opcode__sgloffset) == TW_OP_SET_PARAM) {
+		/* Keep reading the queue in case there are more aen's */
+		if (twa_aen_read_queue(tw_dev, request_id))
+			goto out2;
+	        else {
+			retval = 0;
+			goto out;
+		}
+	}
+
+	switch (aen) {
+	case TW_AEN_QUEUE_EMPTY:
+		/* Quit reading the queue if this is the last one */
+		break;
+	case TW_AEN_SYNC_TIME_WITH_HOST:
+		twa_aen_sync_time(tw_dev, request_id);
+		retval = 0;
+		goto out;
+	default:
+		twa_aen_queue_event(tw_dev, header);
+
+		/* If there are more aen's, keep reading the queue */
+		if (twa_aen_read_queue(tw_dev, request_id))
+			goto out2;
+		else {
+			retval = 0;
+			goto out;
+		}
+	}
+	retval = 0;
+out2:
+	tw_dev->state[request_id] = TW_S_COMPLETED;
+	twa_free_request_id(tw_dev, request_id);
+	clear_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags);
+out:
+	return retval;
+} /* End twa_aen_complete() */
+
+/* This function will drain aen queue */
+static int twa_aen_drain_queue(TW_Device_Extension *tw_dev, int no_check_reset)
+{
+	int request_id = 0;
+	char cdb[TW_MAX_CDB_LEN];
+	TW_SG_Apache sglist[1];
+	int finished = 0, count = 0;
+	TW_Command_Full *full_command_packet;
+	TW_Command_Apache_Header *header;
+	unsigned short aen;
+	int first_reset = 0, queue = 0, retval = 1;
+
+	if (no_check_reset)
+		first_reset = 0;
+	else
+		first_reset = 1;
+
+	full_command_packet = tw_dev->command_packet_virt[request_id];
+	memset(full_command_packet, 0, sizeof(TW_Command_Full));
+
+	/* Initialize cdb */
+	memset(&cdb, 0, TW_MAX_CDB_LEN);
+	cdb[0] = REQUEST_SENSE; /* opcode */
+	cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */
+
+	/* Initialize sglist */
+	memset(&sglist, 0, sizeof(TW_SG_Apache));
+	sglist[0].length = TW_SECTOR_SIZE;
+	sglist[0].address = tw_dev->generic_buffer_phys[request_id];
+
+	if (sglist[0].address & TW_ALIGNMENT_9000_SGL) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1, "Found unaligned address during AEN drain");
+		goto out;
+	}
+
+	/* Mark internal command */
+	tw_dev->srb[request_id] = NULL;
+
+	do {
+		/* Send command to the board */
+		if (twa_scsiop_execute_scsi(tw_dev, request_id, cdb, 1, sglist)) {
+			TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2, "Error posting request sense");
+			goto out;
+		}
+
+		/* Now poll for completion */
+		if (twa_poll_response(tw_dev, request_id, 30)) {
+			TW_PRINTK(tw_dev->host, TW_DRIVER, 0x3, "No valid response while draining AEN queue");
+			tw_dev->posted_request_count--;
+			goto out;
+		}
+
+		tw_dev->posted_request_count--;
+		header = (TW_Command_Apache_Header *)tw_dev->generic_buffer_virt[request_id];
+		aen = header->status_block.error;
+		queue = 0;
+		count++;
+
+		switch (aen) {
+		case TW_AEN_QUEUE_EMPTY:
+			if (first_reset != 1)
+				goto out;
+			else
+				finished = 1;
+			break;
+		case TW_AEN_SOFT_RESET:
+			if (first_reset == 0)
+				first_reset = 1;
+			else
+				queue = 1;
+			break;
+		case TW_AEN_SYNC_TIME_WITH_HOST:
+			break;
+		default:
+			queue = 1;
+		}
+
+		/* Now queue an event info */
+		if (queue)
+			twa_aen_queue_event(tw_dev, header);
+	} while ((finished == 0) && (count < TW_MAX_AEN_DRAIN));
+
+	if (count == TW_MAX_AEN_DRAIN)
+		goto out;
+
+	retval = 0;
+out:
+	tw_dev->state[request_id] = TW_S_INITIAL;
+	return retval;
+} /* End twa_aen_drain_queue() */
+
+/* This function will queue an event */
+static void twa_aen_queue_event(TW_Device_Extension *tw_dev, TW_Command_Apache_Header *header)
+{
+	u32 local_time;
+	struct timeval time;
+	TW_Event *event;
+	unsigned short aen;
+	char host[16];
+
+	tw_dev->aen_count++;
+
+	/* Fill out event info */
+	event = tw_dev->event_queue[tw_dev->error_index];
+
+	/* Check for clobber */
+	host[0] = '\0';
+	if (tw_dev->host) {
+		sprintf(host, " scsi%d:", tw_dev->host->host_no);
+		if (event->retrieved == TW_AEN_NOT_RETRIEVED)
+			tw_dev->aen_clobber = 1;
+	}
+
+	aen = header->status_block.error;
+	memset(event, 0, sizeof(TW_Event));
+
+	event->severity = TW_SEV_OUT(header->status_block.severity__reserved);
+	do_gettimeofday(&time);
+	local_time = (u32)(time.tv_sec - (sys_tz.tz_minuteswest * 60));
+	event->time_stamp_sec = local_time;
+	event->aen_code = aen;
+	event->retrieved = TW_AEN_NOT_RETRIEVED;
+	event->sequence_id = tw_dev->error_sequence_id;
+	tw_dev->error_sequence_id++;
+
+	header->err_specific_desc[sizeof(header->err_specific_desc) - 1] = '\0';
+	event->parameter_len = strlen(header->err_specific_desc);
+	memcpy(event->parameter_data, header->err_specific_desc, event->parameter_len);
+	if (event->severity != TW_AEN_SEVERITY_DEBUG)
+		printk(KERN_WARNING "3w-9xxx:%s AEN: %s (0x%02X:0x%04X): %s:%s.\n",
+		       host,
+		       twa_aen_severity_lookup(TW_SEV_OUT(header->status_block.severity__reserved)),
+		       TW_MESSAGE_SOURCE_CONTROLLER_EVENT, aen,
+		       twa_string_lookup(twa_aen_table, aen),
+		       header->err_specific_desc);
+	else
+		tw_dev->aen_count--;
+
+	if ((tw_dev->error_index + 1) == TW_Q_LENGTH)
+		tw_dev->event_queue_wrapped = 1;
+	tw_dev->error_index = (tw_dev->error_index + 1 ) % TW_Q_LENGTH;
+} /* End twa_aen_queue_event() */
+
+/* This function will read the aen queue from the isr */
+static int twa_aen_read_queue(TW_Device_Extension *tw_dev, int request_id)
+{
+	char cdb[TW_MAX_CDB_LEN];
+	TW_SG_Apache sglist[1];
+	TW_Command_Full *full_command_packet;
+	int retval = 1;
+
+	full_command_packet = tw_dev->command_packet_virt[request_id];
+	memset(full_command_packet, 0, sizeof(TW_Command_Full));
+
+	/* Initialize cdb */
+	memset(&cdb, 0, TW_MAX_CDB_LEN);
+	cdb[0] = REQUEST_SENSE; /* opcode */
+	cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */
+
+	/* Initialize sglist */
+	memset(&sglist, 0, sizeof(TW_SG_Apache));
+	sglist[0].length = TW_SECTOR_SIZE;
+	sglist[0].address = tw_dev->generic_buffer_phys[request_id];
+
+	/* Mark internal command */
+	tw_dev->srb[request_id] = NULL;
+
+	/* Now post the command packet */
+	if (twa_scsiop_execute_scsi(tw_dev, request_id, cdb, 1, sglist)) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x4, "Post failed while reading AEN queue");
+		goto out;
+	}
+	retval = 0;
+out:
+	return retval;
+} /* End twa_aen_read_queue() */
+
+/* This function will look up an AEN severity string */
+static char *twa_aen_severity_lookup(unsigned char severity_code)
+{
+	char *retval = NULL;
+
+	if ((severity_code < (unsigned char) TW_AEN_SEVERITY_ERROR) ||
+	    (severity_code > (unsigned char) TW_AEN_SEVERITY_DEBUG))
+		goto out;
+
+	retval = twa_aen_severity_table[severity_code];
+out:
+	return retval;
+} /* End twa_aen_severity_lookup() */
+
+/* This function will sync firmware time with the host time */
+static void twa_aen_sync_time(TW_Device_Extension *tw_dev, int request_id)
+{
+	u32 schedulertime;
+	struct timeval utc;
+	TW_Command_Full *full_command_packet;
+	TW_Command *command_packet;
+	TW_Param_Apache *param;
+	u32 local_time;
+
+	/* Fill out the command packet */
+	full_command_packet = tw_dev->command_packet_virt[request_id];
+	memset(full_command_packet, 0, sizeof(TW_Command_Full));
+	command_packet = &full_command_packet->command.oldcommand;
+	command_packet->opcode__sgloffset = TW_OPSGL_IN(2, TW_OP_SET_PARAM);
+	command_packet->request_id = request_id;
+	command_packet->byte8_offset.param.sgl[0].address = tw_dev->generic_buffer_phys[request_id];
+	command_packet->byte8_offset.param.sgl[0].length = TW_SECTOR_SIZE;
+	command_packet->size = TW_COMMAND_SIZE;
+	command_packet->byte6_offset.parameter_count = 1;
+
+	/* Setup the param */
+	param = (TW_Param_Apache *)tw_dev->generic_buffer_virt[request_id];
+	memset(param, 0, TW_SECTOR_SIZE);
+	param->table_id = TW_TIMEKEEP_TABLE | 0x8000; /* Controller time keep table */
+	param->parameter_id = 0x3; /* SchedulerTime */
+	param->parameter_size_bytes = 4;
+
+	/* Convert system time in UTC to local time seconds since last 
+           Sunday 12:00AM */
+	do_gettimeofday(&utc);
+	local_time = (u32)(utc.tv_sec - (sys_tz.tz_minuteswest * 60));
+	schedulertime = local_time - (3 * 86400);
+	schedulertime = schedulertime % 604800;
+
+	memcpy(param->data, &schedulertime, sizeof(u32));
+
+	/* Mark internal command */
+	tw_dev->srb[request_id] = NULL;
+
+	/* Now post the command */
+	twa_post_command_packet(tw_dev, request_id, 1);
+} /* End twa_aen_sync_time() */
+
+/* This function will allocate memory and check if it is correctly aligned */
+static int twa_allocate_memory(TW_Device_Extension *tw_dev, int size, int which)
+{
+	int i;
+	dma_addr_t dma_handle;
+	unsigned long *cpu_addr;
+	int retval = 1;
+
+	cpu_addr = pci_alloc_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, &dma_handle);
+	if (!cpu_addr) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x5, "Memory allocation failed");
+		goto out;
+	}
+
+	if ((unsigned long)cpu_addr % (TW_ALIGNMENT_9000)) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x6, "Failed to allocate correctly aligned memory");
+		pci_free_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, cpu_addr, dma_handle);
+		goto out;
+	}
+
+	memset(cpu_addr, 0, size*TW_Q_LENGTH);
+
+	for (i = 0; i < TW_Q_LENGTH; i++) {
+		switch(which) {
+		case 0:
+			tw_dev->command_packet_phys[i] = dma_handle+(i*size);
+			tw_dev->command_packet_virt[i] = (TW_Command_Full *)((unsigned char *)cpu_addr + (i*size));
+			break;
+		case 1:
+			tw_dev->generic_buffer_phys[i] = dma_handle+(i*size);
+			tw_dev->generic_buffer_virt[i] = (unsigned long *)((unsigned char *)cpu_addr + (i*size));
+			break;
+		}
+	}
+	retval = 0;
+out:
+	return retval;
+} /* End twa_allocate_memory() */
+
+/* This function will check the status register for unexpected bits */
+static int twa_check_bits(u32 status_reg_value)
+{
+	int retval = 1;
+
+	if ((status_reg_value & TW_STATUS_EXPECTED_BITS) != TW_STATUS_EXPECTED_BITS)
+		goto out;
+	if ((status_reg_value & TW_STATUS_UNEXPECTED_BITS) != 0)
+		goto out;
+
+	retval = 0;
+out:
+	return retval;
+} /* End twa_check_bits() */
+
+/* This function will check the srl and decide if we are compatible  */
+static int twa_check_srl(TW_Device_Extension *tw_dev, int *flashed)
+{
+	int retval = 1;
+	unsigned short fw_on_ctlr_srl = 0, fw_on_ctlr_arch_id = 0;
+	unsigned short fw_on_ctlr_branch = 0, fw_on_ctlr_build = 0;
+	u32 init_connect_result = 0;
+
+	if (twa_initconnection(tw_dev, TW_INIT_MESSAGE_CREDITS,
+			       TW_EXTENDED_INIT_CONNECT, TW_CURRENT_FW_SRL,
+			       TW_9000_ARCH_ID, TW_CURRENT_FW_BRANCH,
+			       TW_CURRENT_FW_BUILD, &fw_on_ctlr_srl,
+			       &fw_on_ctlr_arch_id, &fw_on_ctlr_branch,
+			       &fw_on_ctlr_build, &init_connect_result)) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x7, "Initconnection failed while checking SRL");
+		goto out;
+	}
+
+	tw_dev->working_srl = TW_CURRENT_FW_SRL;
+	tw_dev->working_branch = TW_CURRENT_FW_BRANCH;
+	tw_dev->working_build = TW_CURRENT_FW_BUILD;
+
+	/* Try base mode compatibility */
+	if (!(init_connect_result & TW_CTLR_FW_COMPATIBLE)) {
+		if (twa_initconnection(tw_dev, TW_INIT_MESSAGE_CREDITS,
+				       TW_EXTENDED_INIT_CONNECT,
+				       TW_BASE_FW_SRL, TW_9000_ARCH_ID,
+				       TW_BASE_FW_BRANCH, TW_BASE_FW_BUILD,
+				       &fw_on_ctlr_srl, &fw_on_ctlr_arch_id,
+				       &fw_on_ctlr_branch, &fw_on_ctlr_build,
+				       &init_connect_result)) {
+			TW_PRINTK(tw_dev->host, TW_DRIVER, 0xa, "Initconnection (base mode) failed while checking SRL");
+			goto out;
+		}
+		if (!(init_connect_result & TW_CTLR_FW_COMPATIBLE)) {
+			if (TW_CURRENT_FW_SRL > fw_on_ctlr_srl) {
+				TW_PRINTK(tw_dev->host, TW_DRIVER, 0x32, "Firmware and driver incompatibility: please upgrade firmware");
+			} else {
+				TW_PRINTK(tw_dev->host, TW_DRIVER, 0x33, "Firmware and driver incompatibility: please upgrade driver");
+			}
+			goto out;
+		}
+		tw_dev->working_srl = TW_BASE_FW_SRL;
+		tw_dev->working_branch = TW_BASE_FW_BRANCH;
+		tw_dev->working_build = TW_BASE_FW_BUILD;
+	}
+	retval = 0;
+out:
+	return retval;
+} /* End twa_check_srl() */
+
+/* This function handles ioctl for the character device */
+static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+	long timeout;
+	unsigned long *cpu_addr, data_buffer_length_adjusted = 0, flags = 0;
+	dma_addr_t dma_handle;
+	int request_id = 0;
+	unsigned int sequence_id = 0;
+	unsigned char event_index, start_index;
+	TW_Ioctl_Driver_Command driver_command;
+	TW_Ioctl_Buf_Apache *tw_ioctl;
+	TW_Lock *tw_lock;
+	TW_Command_Full *full_command_packet;
+	TW_Compatibility_Info *tw_compat_info;
+	TW_Event *event;
+	struct timeval current_time;
+	u32 current_time_ms;
+	TW_Device_Extension *tw_dev = twa_device_extension_list[iminor(inode)];
+	int retval = TW_IOCTL_ERROR_OS_EFAULT;
+
+	/* Only let one of these through at a time */
+	if (down_interruptible(&tw_dev->ioctl_sem)) {
+		retval = TW_IOCTL_ERROR_OS_EINTR;
+		goto out;
+	}
+
+	/* First copy down the driver command */
+	if (copy_from_user(&driver_command, (void *)arg, sizeof(TW_Ioctl_Driver_Command)))
+		goto out2;
+
+	/* Check data buffer size */
+	if (driver_command.buffer_length > TW_MAX_SECTORS * 512) {
+		retval = TW_IOCTL_ERROR_OS_EINVAL;
+		goto out2;
+	}
+
+	/* Hardware can only do multiple of 512 byte transfers */
+	data_buffer_length_adjusted = (driver_command.buffer_length + 511) & ~511;
+
+	/* Now allocate ioctl buf memory */
+	cpu_addr = pci_alloc_consistent(tw_dev->tw_pci_dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, &dma_handle);
+	if (!cpu_addr) {
+		retval = TW_IOCTL_ERROR_OS_ENOMEM;
+		goto out2;
+	}
+
+	tw_ioctl = (TW_Ioctl_Buf_Apache *)cpu_addr;
+
+	/* Now copy down the entire ioctl */
+	if (copy_from_user(tw_ioctl, (void *)arg, driver_command.buffer_length + sizeof(TW_Ioctl_Buf_Apache) - 1))
+		goto out3;
+
+	/* See which ioctl we are doing */
+	switch (cmd) {
+	case TW_IOCTL_FIRMWARE_PASS_THROUGH:
+		spin_lock_irqsave(tw_dev->host->host_lock, flags);
+		twa_get_request_id(tw_dev, &request_id);
+
+		/* Flag internal command */
+		tw_dev->srb[request_id] = 0;
+
+		/* Flag chrdev ioctl */
+		tw_dev->chrdev_request_id = request_id;
+
+		full_command_packet = &tw_ioctl->firmware_command;
+
+		/* Load request id and sglist for both command types */
+		twa_load_sgl(full_command_packet, request_id, dma_handle, data_buffer_length_adjusted);
+
+		memcpy(tw_dev->command_packet_virt[request_id], &(tw_ioctl->firmware_command), sizeof(TW_Command_Full));
+
+		/* Now post the command packet to the controller */
+		twa_post_command_packet(tw_dev, request_id, 1);
+		spin_unlock_irqrestore(tw_dev->host->host_lock, flags);
+
+		timeout = TW_IOCTL_CHRDEV_TIMEOUT*HZ;
+
+		/* Now wait for command to complete */
+		timeout = wait_event_interruptible_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout);
+
+		/* Check if we timed out, got a signal, or didn't get
+                   an interrupt */
+		if ((timeout <= 0) && (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE)) {
+			/* Now we need to reset the board */
+			if (timeout == TW_IOCTL_ERROR_OS_ERESTARTSYS) {
+				retval = timeout;
+			} else {
+				printk(KERN_WARNING "3w-9xxx: scsi%d: WARNING: (0x%02X:0x%04X): Character ioctl (0x%x) timed out, resetting card.\n",
+				       tw_dev->host->host_no, TW_DRIVER, 0xc,
+				       cmd);
+				retval = TW_IOCTL_ERROR_OS_EIO;
+			}
+			spin_lock_irqsave(tw_dev->host->host_lock, flags);
+			tw_dev->state[request_id] = TW_S_COMPLETED;
+			twa_free_request_id(tw_dev, request_id);
+			tw_dev->posted_request_count--;
+			twa_reset_device_extension(tw_dev);
+			spin_unlock_irqrestore(tw_dev->host->host_lock, flags);
+			goto out3;
+		}
+
+		/* Now copy in the command packet response */
+		memcpy(&(tw_ioctl->firmware_command), tw_dev->command_packet_virt[request_id], sizeof(TW_Command_Full));
+		
+		/* Now complete the io */
+		spin_lock_irqsave(tw_dev->host->host_lock, flags);
+		tw_dev->posted_request_count--;
+		tw_dev->state[request_id] = TW_S_COMPLETED;
+		twa_free_request_id(tw_dev, request_id);
+		spin_unlock_irqrestore(tw_dev->host->host_lock, flags);
+		break;
+	case TW_IOCTL_GET_COMPATIBILITY_INFO:
+		tw_ioctl->driver_command.status = 0;
+		/* Copy compatiblity struct into ioctl data buffer */
+		tw_compat_info = (TW_Compatibility_Info *)tw_ioctl->data_buffer;
+		strncpy(tw_compat_info->driver_version, twa_driver_version, strlen(twa_driver_version));
+		tw_compat_info->working_srl = tw_dev->working_srl;
+		tw_compat_info->working_branch = tw_dev->working_branch;
+		tw_compat_info->working_build = tw_dev->working_build;
+		break;
+	case TW_IOCTL_GET_LAST_EVENT:
+		if (tw_dev->event_queue_wrapped) {
+			if (tw_dev->aen_clobber) {
+				tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER;
+				tw_dev->aen_clobber = 0;
+			} else
+				tw_ioctl->driver_command.status = 0;
+		} else {
+			if (!tw_dev->error_index) {
+				tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS;
+				break;
+			}
+			tw_ioctl->driver_command.status = 0;
+		}
+		event_index = (tw_dev->error_index - 1 + TW_Q_LENGTH) % TW_Q_LENGTH;
+		memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event));
+		tw_dev->event_queue[event_index]->retrieved = TW_AEN_RETRIEVED;
+		break;
+	case TW_IOCTL_GET_FIRST_EVENT:
+		if (tw_dev->event_queue_wrapped) {
+			if (tw_dev->aen_clobber) {
+				tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER;
+				tw_dev->aen_clobber = 0;
+			} else 
+				tw_ioctl->driver_command.status = 0;
+			event_index = tw_dev->error_index;
+		} else {
+			if (!tw_dev->error_index) {
+				tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS;
+				break;
+			}
+			tw_ioctl->driver_command.status = 0;
+			event_index = 0;
+		}
+		memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event));
+		tw_dev->event_queue[event_index]->retrieved = TW_AEN_RETRIEVED;
+		break;
+	case TW_IOCTL_GET_NEXT_EVENT:
+		event = (TW_Event *)tw_ioctl->data_buffer;
+		sequence_id = event->sequence_id;
+		tw_ioctl->driver_command.status = 0;
+
+		if (tw_dev->event_queue_wrapped) {
+			if (tw_dev->aen_clobber) {
+				tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER;
+				tw_dev->aen_clobber = 0;
+			}
+			start_index = tw_dev->error_index;
+		} else {
+			if (!tw_dev->error_index) {
+				tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS;
+				break;
+			}
+			start_index = 0;
+		}
+		event_index = (start_index + sequence_id - tw_dev->event_queue[start_index]->sequence_id + 1) % TW_Q_LENGTH;
+
+		if (!(tw_dev->event_queue[event_index]->sequence_id > sequence_id)) {
+			if (tw_ioctl->driver_command.status == TW_IOCTL_ERROR_STATUS_AEN_CLOBBER)
+				tw_dev->aen_clobber = 1;
+			tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS;
+			break;
+		}
+		memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event));
+		tw_dev->event_queue[event_index]->retrieved = TW_AEN_RETRIEVED;
+		break;
+	case TW_IOCTL_GET_PREVIOUS_EVENT:
+		event = (TW_Event *)tw_ioctl->data_buffer;
+		sequence_id = event->sequence_id;
+		tw_ioctl->driver_command.status = 0;
+
+		if (tw_dev->event_queue_wrapped) {
+			if (tw_dev->aen_clobber) {
+				tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_AEN_CLOBBER;
+				tw_dev->aen_clobber = 0;
+			}
+			start_index = tw_dev->error_index;
+		} else {
+			if (!tw_dev->error_index) {
+				tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS;
+				break;
+			}
+			start_index = 0;
+		}
+		event_index = (start_index + sequence_id - tw_dev->event_queue[start_index]->sequence_id - 1) % TW_Q_LENGTH;
+
+		if (!(tw_dev->event_queue[event_index]->sequence_id < sequence_id)) {
+			if (tw_ioctl->driver_command.status == TW_IOCTL_ERROR_STATUS_AEN_CLOBBER)
+				tw_dev->aen_clobber = 1;
+			tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS;
+			break;
+		}
+		memcpy(tw_ioctl->data_buffer, tw_dev->event_queue[event_index], sizeof(TW_Event));
+		tw_dev->event_queue[event_index]->retrieved = TW_AEN_RETRIEVED;
+		break;
+	case TW_IOCTL_GET_LOCK:
+		tw_lock = (TW_Lock *)tw_ioctl->data_buffer;
+		do_gettimeofday(&current_time);
+		current_time_ms = (current_time.tv_sec * 1000) + (current_time.tv_usec / 1000);
+
+		if ((tw_lock->force_flag == 1) || (tw_dev->ioctl_sem_lock == 0) || (current_time_ms >= tw_dev->ioctl_msec)) {
+			tw_dev->ioctl_sem_lock = 1;
+			tw_dev->ioctl_msec = current_time_ms + tw_lock->timeout_msec;
+			tw_ioctl->driver_command.status = 0;
+			tw_lock->time_remaining_msec = tw_lock->timeout_msec;
+		} else {
+			tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_LOCKED;
+			tw_lock->time_remaining_msec = tw_dev->ioctl_msec - current_time_ms;
+		}
+		break;
+	case TW_IOCTL_RELEASE_LOCK:
+		if (tw_dev->ioctl_sem_lock == 1) {
+			tw_dev->ioctl_sem_lock = 0;
+			tw_ioctl->driver_command.status = 0;
+		} else {
+			tw_ioctl->driver_command.status = TW_IOCTL_ERROR_STATUS_NOT_LOCKED;
+		}
+		break;
+	default:
+		retval = TW_IOCTL_ERROR_OS_ENOTTY;
+		goto out3;
+	}
+
+	/* Now copy the entire response to userspace */
+	if (copy_to_user((void *)arg, tw_ioctl, sizeof(TW_Ioctl_Buf_Apache) + driver_command.buffer_length - 1) == 0)
+		retval = 0;
+out3:
+	/* Now free ioctl buf memory */
+	pci_free_consistent(tw_dev->tw_pci_dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, cpu_addr, dma_handle);
+out2:
+	up(&tw_dev->ioctl_sem);
+out:
+	return retval;
+} /* End twa_chrdev_ioctl() */
+
+/* This function handles open for the character device */
+static int twa_chrdev_open(struct inode *inode, struct file *file)
+{
+	unsigned int minor_number;
+	int retval = TW_IOCTL_ERROR_OS_ENODEV;
+
+	minor_number = iminor(inode);
+	if (minor_number >= twa_device_extension_count)
+		goto out;
+	retval = 0;
+out:
+	return retval;
+} /* End twa_chrdev_open() */
+
+/* This function will print readable messages from status register errors */
+static int twa_decode_bits(TW_Device_Extension *tw_dev, u32 status_reg_value)
+{
+	int retval = 1;
+
+	/* Check for various error conditions and handle them appropriately */
+	if (status_reg_value & TW_STATUS_PCI_PARITY_ERROR) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0xc, "PCI Parity Error: clearing");
+		writel(TW_CONTROL_CLEAR_PARITY_ERROR, TW_CONTROL_REG_ADDR(tw_dev));
+	}
+
+	if (status_reg_value & TW_STATUS_PCI_ABORT) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0xd, "PCI Abort: clearing");
+		writel(TW_CONTROL_CLEAR_PCI_ABORT, TW_CONTROL_REG_ADDR(tw_dev));
+		pci_write_config_word(tw_dev->tw_pci_dev, PCI_STATUS, TW_PCI_CLEAR_PCI_ABORT);
+	}
+
+	if (status_reg_value & TW_STATUS_QUEUE_ERROR) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0xe, "Controller Queue Error: clearing");
+		writel(TW_CONTROL_CLEAR_QUEUE_ERROR, TW_CONTROL_REG_ADDR(tw_dev));
+	}
+
+	if (status_reg_value & TW_STATUS_SBUF_WRITE_ERROR) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0xf, "SBUF Write Error: clearing");
+		writel(TW_CONTROL_CLEAR_SBUF_WRITE_ERROR, TW_CONTROL_REG_ADDR(tw_dev));
+	}
+
+	if (status_reg_value & TW_STATUS_MICROCONTROLLER_ERROR) {
+		if (tw_dev->reset_print == 0) {
+			TW_PRINTK(tw_dev->host, TW_DRIVER, 0x10, "Microcontroller Error: clearing");
+			tw_dev->reset_print = 1;
+		}
+		goto out;
+	}
+	retval = 0;
+out:
+	return retval;
+} /* End twa_decode_bits() */
+
+/* This function will empty the response queue */
+static int twa_empty_response_queue(TW_Device_Extension *tw_dev)
+{
+	u32 status_reg_value, response_que_value;
+	int count = 0, retval = 1;
+
+	status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+
+	while (((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) && (count < TW_MAX_RESPONSE_DRAIN)) {
+		response_que_value = readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev));
+		status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+		count++;
+	}
+	if (count == TW_MAX_RESPONSE_DRAIN)
+		goto out;
+
+	retval = 0;
+out:
+	return retval;
+} /* End twa_empty_response_queue() */
+
+/* This function passes sense keys from firmware to scsi layer */
+static int twa_fill_sense(TW_Device_Extension *tw_dev, int request_id, int copy_sense, int print_host)
+{
+	TW_Command_Full *full_command_packet;
+	unsigned short error;
+	int retval = 1;
+
+	full_command_packet = tw_dev->command_packet_virt[request_id];
+	/* Don't print error for Logical unit not supported during rollcall */
+	error = full_command_packet->header.status_block.error;
+	if ((error != TW_ERROR_LOGICAL_UNIT_NOT_SUPPORTED) && (error != TW_ERROR_UNIT_OFFLINE)) {
+		if (print_host)
+			printk(KERN_WARNING "3w-9xxx: scsi%d: ERROR: (0x%02X:0x%04X): %s:%s.\n",
+			       tw_dev->host->host_no,
+			       TW_MESSAGE_SOURCE_CONTROLLER_ERROR,
+			       full_command_packet->header.status_block.error,
+			       twa_string_lookup(twa_error_table,
+						 full_command_packet->header.status_block.error),
+			       full_command_packet->header.err_specific_desc);
+		else
+			printk(KERN_WARNING "3w-9xxx: ERROR: (0x%02X:0x%04X): %s:%s.\n",
+			       TW_MESSAGE_SOURCE_CONTROLLER_ERROR,
+			       full_command_packet->header.status_block.error,
+			       twa_string_lookup(twa_error_table,
+						 full_command_packet->header.status_block.error),
+			       full_command_packet->header.err_specific_desc);
+	}
+
+	if (copy_sense) {
+		memcpy(tw_dev->srb[request_id]->sense_buffer, full_command_packet->header.sense_data, TW_SENSE_DATA_LENGTH);
+		tw_dev->srb[request_id]->result = (full_command_packet->command.newcommand.status << 1);
+		retval = TW_ISR_DONT_RESULT;
+		goto out;
+	}
+	retval = 0;
+out:
+	return retval;
+} /* End twa_fill_sense() */
+
+/* This function will free up device extension resources */
+static void twa_free_device_extension(TW_Device_Extension *tw_dev)
+{
+	if (tw_dev->command_packet_virt[0])
+		pci_free_consistent(tw_dev->tw_pci_dev,
+				    sizeof(TW_Command_Full)*TW_Q_LENGTH,
+				    tw_dev->command_packet_virt[0],
+				    tw_dev->command_packet_phys[0]);
+
+	if (tw_dev->generic_buffer_virt[0])
+		pci_free_consistent(tw_dev->tw_pci_dev,
+				    TW_SECTOR_SIZE*TW_Q_LENGTH,
+				    tw_dev->generic_buffer_virt[0],
+				    tw_dev->generic_buffer_phys[0]);
+
+	if (tw_dev->event_queue[0])
+		kfree(tw_dev->event_queue[0]);
+} /* End twa_free_device_extension() */
+
+/* This function will free a request id */
+static void twa_free_request_id(TW_Device_Extension *tw_dev, int request_id)
+{
+	tw_dev->free_queue[tw_dev->free_tail] = request_id;
+	tw_dev->state[request_id] = TW_S_FINISHED;
+	tw_dev->free_tail = (tw_dev->free_tail + 1) % TW_Q_LENGTH;
+} /* End twa_free_request_id() */
+
+/* This function will get parameter table entires from the firmware */
+static void *twa_get_param(TW_Device_Extension *tw_dev, int request_id, int table_id, int parameter_id, int parameter_size_bytes)
+{
+	TW_Command_Full *full_command_packet;
+	TW_Command *command_packet;
+	TW_Param_Apache *param;
+	unsigned long param_value;
+	void *retval = NULL;
+
+	/* Setup the command packet */
+	full_command_packet = tw_dev->command_packet_virt[request_id];
+	memset(full_command_packet, 0, sizeof(TW_Command_Full));
+	command_packet = &full_command_packet->command.oldcommand;
+
+	command_packet->opcode__sgloffset = TW_OPSGL_IN(2, TW_OP_GET_PARAM);
+	command_packet->size              = TW_COMMAND_SIZE;
+	command_packet->request_id        = request_id;
+	command_packet->byte6_offset.block_count = 1;
+
+	/* Now setup the param */
+	param = (TW_Param_Apache *)tw_dev->generic_buffer_virt[request_id];
+	memset(param, 0, TW_SECTOR_SIZE);
+	param->table_id = table_id | 0x8000;
+	param->parameter_id = parameter_id;
+	param->parameter_size_bytes = parameter_size_bytes;
+	param_value = tw_dev->generic_buffer_phys[request_id];
+
+	command_packet->byte8_offset.param.sgl[0].address = param_value;
+	command_packet->byte8_offset.param.sgl[0].length = TW_SECTOR_SIZE;
+
+	/* Post the command packet to the board */
+	twa_post_command_packet(tw_dev, request_id, 1);
+
+	/* Poll for completion */
+	if (twa_poll_response(tw_dev, request_id, 30))
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x13, "No valid response during get param")
+	else
+		retval = (void *)&(param->data[0]);
+
+	tw_dev->posted_request_count--;
+	tw_dev->state[request_id] = TW_S_INITIAL;
+
+	return retval;
+} /* End twa_get_param() */
+
+/* This function will assign an available request id */
+static void twa_get_request_id(TW_Device_Extension *tw_dev, int *request_id)
+{
+	*request_id = tw_dev->free_queue[tw_dev->free_head];
+	tw_dev->free_head = (tw_dev->free_head + 1) % TW_Q_LENGTH;
+	tw_dev->state[*request_id] = TW_S_STARTED;
+} /* End twa_get_request_id() */
+
+/* This function will send an initconnection command to controller */
+static int twa_initconnection(TW_Device_Extension *tw_dev, int message_credits,
+ 			      u32 set_features, unsigned short current_fw_srl, 
+			      unsigned short current_fw_arch_id, 
+			      unsigned short current_fw_branch, 
+			      unsigned short current_fw_build, 
+			      unsigned short *fw_on_ctlr_srl, 
+			      unsigned short *fw_on_ctlr_arch_id, 
+			      unsigned short *fw_on_ctlr_branch, 
+			      unsigned short *fw_on_ctlr_build, 
+			      u32 *init_connect_result)
+{
+	TW_Command_Full *full_command_packet;
+	TW_Initconnect *tw_initconnect;
+	int request_id = 0, retval = 1;
+
+	/* Initialize InitConnection command packet */
+	full_command_packet = tw_dev->command_packet_virt[request_id];
+	memset(full_command_packet, 0, sizeof(TW_Command_Full));
+	full_command_packet->header.header_desc.size_header = 128;
+	
+	tw_initconnect = (TW_Initconnect *)&full_command_packet->command.oldcommand;
+	tw_initconnect->opcode__reserved = TW_OPRES_IN(0, TW_OP_INIT_CONNECTION);
+	tw_initconnect->request_id = request_id;
+	tw_initconnect->message_credits = message_credits;
+	tw_initconnect->features = set_features;
+#if BITS_PER_LONG > 32
+	/* Turn on 64-bit sgl support */
+	tw_initconnect->features |= 1;
+#endif
+
+	if (set_features & TW_EXTENDED_INIT_CONNECT) {
+		tw_initconnect->size = TW_INIT_COMMAND_PACKET_SIZE_EXTENDED;
+		tw_initconnect->fw_srl = current_fw_srl;
+		tw_initconnect->fw_arch_id = current_fw_arch_id;
+		tw_initconnect->fw_branch = current_fw_branch;
+		tw_initconnect->fw_build = current_fw_build;
+	} else 
+		tw_initconnect->size = TW_INIT_COMMAND_PACKET_SIZE;
+
+	/* Send command packet to the board */
+	twa_post_command_packet(tw_dev, request_id, 1);
+
+	/* Poll for completion */
+	if (twa_poll_response(tw_dev, request_id, 30)) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x15, "No valid response during init connection");
+	} else {
+		if (set_features & TW_EXTENDED_INIT_CONNECT) {
+			*fw_on_ctlr_srl = tw_initconnect->fw_srl;
+			*fw_on_ctlr_arch_id = tw_initconnect->fw_arch_id;
+			*fw_on_ctlr_branch = tw_initconnect->fw_branch;
+			*fw_on_ctlr_build = tw_initconnect->fw_build;
+			*init_connect_result = tw_initconnect->result;
+		}
+		retval = 0;
+	}
+
+	tw_dev->posted_request_count--;
+	tw_dev->state[request_id] = TW_S_INITIAL;
+
+	return retval;
+} /* End twa_initconnection() */
+
+/* This function will initialize the fields of a device extension */
+static int twa_initialize_device_extension(TW_Device_Extension *tw_dev)
+{
+	int i, retval = 1;
+
+	/* Initialize command packet buffers */
+	if (twa_allocate_memory(tw_dev, sizeof(TW_Command_Full), 0)) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x16, "Command packet memory allocation failed");
+		goto out;
+	}
+
+	/* Initialize generic buffer */
+	if (twa_allocate_memory(tw_dev, TW_SECTOR_SIZE, 1)) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x17, "Generic memory allocation failed");
+		goto out;
+	}
+
+	/* Allocate event info space */
+	tw_dev->event_queue[0] = kmalloc(sizeof(TW_Event) * TW_Q_LENGTH, GFP_KERNEL);
+	if (!tw_dev->event_queue[0]) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x18, "Event info memory allocation failed");
+		goto out;
+	}
+
+	memset(tw_dev->event_queue[0], 0, sizeof(TW_Event) * TW_Q_LENGTH);
+
+	for (i = 0; i < TW_Q_LENGTH; i++) {
+		tw_dev->event_queue[i] = (TW_Event *)((unsigned char *)tw_dev->event_queue[0] + (i * sizeof(TW_Event)));
+		tw_dev->free_queue[i] = i;
+		tw_dev->state[i] = TW_S_INITIAL;
+	}
+
+	tw_dev->pending_head = TW_Q_START;
+	tw_dev->pending_tail = TW_Q_START;
+	tw_dev->free_head = TW_Q_START;
+	tw_dev->free_tail = TW_Q_START;
+	tw_dev->error_sequence_id = 1;
+	tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
+
+	init_MUTEX(&tw_dev->ioctl_sem);
+	init_waitqueue_head(&tw_dev->ioctl_wqueue);
+
+	retval = 0;
+out:
+	return retval;
+} /* End twa_initialize_device_extension() */
+
+/* This function is the interrupt service routine */
+static irqreturn_t twa_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
+{
+	int request_id, error = 0;
+	u32 status_reg_value;
+	TW_Response_Queue response_que;
+	TW_Command_Full *full_command_packet;
+	TW_Command *command_packet;
+	TW_Device_Extension *tw_dev = (TW_Device_Extension *)dev_instance;
+	int handled = 0;
+
+	/* Get the per adapter lock */
+	spin_lock(tw_dev->host->host_lock);
+
+	/* See if the interrupt matches this instance */
+	if (tw_dev->tw_pci_dev->irq == (unsigned int)irq) {
+
+		handled = 1;
+
+		/* Read the registers */
+		status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+
+		/* Check if this is our interrupt, otherwise bail */
+		if (!(status_reg_value & TW_STATUS_VALID_INTERRUPT))
+			goto twa_interrupt_bail;
+
+		/* Check controller for errors */
+		if (twa_check_bits(status_reg_value)) {
+			if (twa_decode_bits(tw_dev, status_reg_value)) {
+				TW_CLEAR_ALL_INTERRUPTS(tw_dev);
+				goto twa_interrupt_bail;
+			}
+		}
+
+		/* Handle host interrupt */
+		if (status_reg_value & TW_STATUS_HOST_INTERRUPT)
+			TW_CLEAR_HOST_INTERRUPT(tw_dev);
+
+		/* Handle attention interrupt */
+		if (status_reg_value & TW_STATUS_ATTENTION_INTERRUPT) {
+			TW_CLEAR_ATTENTION_INTERRUPT(tw_dev);
+			if (!(test_and_set_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags))) {
+				twa_get_request_id(tw_dev, &request_id);
+
+				error = twa_aen_read_queue(tw_dev, request_id);
+				if (error) {
+					tw_dev->state[request_id] = TW_S_COMPLETED;
+					twa_free_request_id(tw_dev, request_id);
+					clear_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags);
+				}
+			}
+		}
+
+		/* Handle command interrupt */
+		if (status_reg_value & TW_STATUS_COMMAND_INTERRUPT) {
+			TW_MASK_COMMAND_INTERRUPT(tw_dev);
+			/* Drain as many pending commands as we can */
+			while (tw_dev->pending_request_count > 0) {
+				request_id = tw_dev->pending_queue[tw_dev->pending_head];
+				if (tw_dev->state[request_id] != TW_S_PENDING) {
+					TW_PRINTK(tw_dev->host, TW_DRIVER, 0x19, "Found request id that wasn't pending");
+					TW_CLEAR_ALL_INTERRUPTS(tw_dev);
+					goto twa_interrupt_bail;
+				}
+				if (twa_post_command_packet(tw_dev, request_id, 1)==0) {
+					tw_dev->pending_head = (tw_dev->pending_head + 1) % TW_Q_LENGTH;
+					tw_dev->pending_request_count--;
+				} else {
+					/* If we get here, we will continue re-posting on the next command interrupt */
+					break;
+				}
+			}
+		}
+
+		/* Handle response interrupt */
+		if (status_reg_value & TW_STATUS_RESPONSE_INTERRUPT) {
+
+			/* Drain the response queue from the board */
+			while ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) {
+				/* Complete the response */
+				response_que.value = readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev));
+				request_id = TW_RESID_OUT(response_que.response_id);
+				full_command_packet = tw_dev->command_packet_virt[request_id];
+				error = 0;
+				command_packet = &full_command_packet->command.oldcommand;
+				/* Check for command packet errors */
+				if (full_command_packet->command.newcommand.status != 0) {
+					if (tw_dev->srb[request_id] != 0) {
+						error = twa_fill_sense(tw_dev, request_id, 1, 1);
+					} else {
+						/* Skip ioctl error prints */
+						if (request_id != tw_dev->chrdev_request_id) {
+							error = twa_fill_sense(tw_dev, request_id, 0, 1);
+						}
+					}
+				}
+
+				/* Check for correct state */
+				if (tw_dev->state[request_id] != TW_S_POSTED) {
+					if (tw_dev->srb[request_id] != 0) {
+						TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Received a request id that wasn't posted");
+					        TW_CLEAR_ALL_INTERRUPTS(tw_dev);
+						goto twa_interrupt_bail;
+					}
+				}
+
+				/* Check for internal command completion */
+				if (tw_dev->srb[request_id] == 0) {
+					if (request_id != tw_dev->chrdev_request_id) {
+						if (twa_aen_complete(tw_dev, request_id))
+							TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Error completing AEN during attention interrupt");
+					} else {
+						tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
+						wake_up(&tw_dev->ioctl_wqueue);
+					}
+				} else {
+					twa_scsiop_execute_scsi_complete(tw_dev, request_id);
+					/* If no error command was a success */
+					if (error == 0) {
+						tw_dev->srb[request_id]->result = (DID_OK << 16);
+					}
+
+					/* If error, command failed */
+					if (error == 1) {
+						/* Ask for a host reset */
+						tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
+					}
+
+					/* Now complete the io */
+					tw_dev->state[request_id] = TW_S_COMPLETED;
+					twa_free_request_id(tw_dev, request_id);
+					tw_dev->posted_request_count--;
+					tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]);
+					twa_unmap_scsi_data(tw_dev, request_id);
+				}
+
+				/* Check for valid status after each drain */
+				status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+				if (twa_check_bits(status_reg_value)) {
+					if (twa_decode_bits(tw_dev, status_reg_value)) {
+						TW_CLEAR_ALL_INTERRUPTS(tw_dev);
+						goto twa_interrupt_bail;
+					}
+				}
+			}
+		}
+	}
+twa_interrupt_bail:
+	spin_unlock(tw_dev->host->host_lock);
+	return IRQ_RETVAL(handled);
+} /* End twa_interrupt() */
+
+/* This function will load the request id and various sgls for ioctls */
+static void twa_load_sgl(TW_Command_Full *full_command_packet, int request_id, dma_addr_t dma_handle, int length)
+{
+	TW_Command *oldcommand;
+	TW_Command_Apache *newcommand;
+	TW_SG_Entry *sgl;
+
+	if (TW_OP_OUT(full_command_packet->command.newcommand.opcode__reserved) == TW_OP_EXECUTE_SCSI) {
+		newcommand = &full_command_packet->command.newcommand;
+		newcommand->request_id = request_id;
+		newcommand->sg_list[0].address = dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1;
+		newcommand->sg_list[0].length = length;
+	} else {
+		oldcommand = &full_command_packet->command.oldcommand;
+		oldcommand->request_id = request_id;
+
+		if (TW_SGL_OUT(oldcommand->opcode__sgloffset)) {
+			/* Load the sg list */
+			sgl = (TW_SG_Entry *)((u32 *)oldcommand+TW_SGL_OUT(oldcommand->opcode__sgloffset));
+			sgl->address = dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1;
+			sgl->length = length;
+		}
+	}
+} /* End twa_load_sgl() */
+
+/* This function will perform a pci-dma mapping for a scatter gather list */
+static int twa_map_scsi_sg_data(TW_Device_Extension *tw_dev, int request_id)
+{
+	int use_sg;
+	struct scsi_cmnd *cmd = tw_dev->srb[request_id];
+	struct pci_dev *pdev = tw_dev->tw_pci_dev;
+	int retval = 0;
+
+	if (cmd->use_sg == 0)
+		goto out;
+
+	use_sg = pci_map_sg(pdev, cmd->buffer, cmd->use_sg, DMA_BIDIRECTIONAL);
+
+	if (use_sg == 0) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1c, "Failed to map scatter gather list");
+		goto out;
+	}
+
+	cmd->SCp.phase = TW_PHASE_SGLIST;
+	cmd->SCp.have_data_in = use_sg;
+	retval = use_sg;
+out:
+	return retval;
+} /* End twa_map_scsi_sg_data() */
+
+/* This function will perform a pci-dma map for a single buffer */
+static dma_addr_t twa_map_scsi_single_data(TW_Device_Extension *tw_dev, int request_id)
+{
+	dma_addr_t mapping;
+	struct scsi_cmnd *cmd = tw_dev->srb[request_id];
+	struct pci_dev *pdev = tw_dev->tw_pci_dev;
+	int retval = 0;
+
+	if (cmd->request_bufflen == 0) {
+		retval = 0;
+		goto out;
+	}
+
+	mapping = pci_map_single(pdev, cmd->request_buffer, cmd->request_bufflen, DMA_BIDIRECTIONAL);
+
+	if (mapping == 0) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1d, "Failed to map page");
+		goto out;
+	}
+
+	cmd->SCp.phase = TW_PHASE_SINGLE;
+	cmd->SCp.have_data_in = mapping;
+	retval = mapping;
+out:
+	return retval;
+} /* End twa_map_scsi_single_data() */
+
+/* This function will poll for a response interrupt of a request */
+static int twa_poll_response(TW_Device_Extension *tw_dev, int request_id, int seconds)
+{
+	int retval = 1, found = 0, response_request_id;
+	TW_Response_Queue response_queue;
+	TW_Command_Full *full_command_packet = tw_dev->command_packet_virt[request_id];
+
+	if (twa_poll_status_gone(tw_dev, TW_STATUS_RESPONSE_QUEUE_EMPTY, seconds) == 0) {
+		response_queue.value = readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev));
+		response_request_id = TW_RESID_OUT(response_queue.response_id);
+		if (request_id != response_request_id) {
+			TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1e, "Found unexpected request id while polling for response");
+			goto out;
+		}
+		if (TW_OP_OUT(full_command_packet->command.newcommand.opcode__reserved) == TW_OP_EXECUTE_SCSI) {
+			if (full_command_packet->command.newcommand.status != 0) {
+				/* bad response */
+				twa_fill_sense(tw_dev, request_id, 0, 0);
+				goto out;
+			}
+			found = 1;
+		} else {
+			if (full_command_packet->command.oldcommand.status != 0) {
+				/* bad response */
+				twa_fill_sense(tw_dev, request_id, 0, 0);
+				goto out;
+			}
+			found = 1;
+		}
+	}
+
+	if (found)
+		retval = 0;
+out:
+	return retval;
+} /* End twa_poll_response() */
+
+/* This function will poll the status register for a flag */
+static int twa_poll_status(TW_Device_Extension *tw_dev, u32 flag, int seconds)
+{
+	u32 status_reg_value; 
+	unsigned long before;
+	int retval = 1;
+
+	status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+	before = jiffies;
+
+	if (twa_check_bits(status_reg_value))
+		twa_decode_bits(tw_dev, status_reg_value);
+
+	while ((status_reg_value & flag) != flag) {
+		status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+
+		if (twa_check_bits(status_reg_value))
+			twa_decode_bits(tw_dev, status_reg_value);
+
+		if (time_after(jiffies, before + HZ * seconds))
+			goto out;
+
+		msleep(50);
+	}
+	retval = 0;
+out:
+	return retval;
+} /* End twa_poll_status() */
+
+/* This function will poll the status register for disappearance of a flag */
+static int twa_poll_status_gone(TW_Device_Extension *tw_dev, u32 flag, int seconds)
+{
+	u32 status_reg_value;
+	unsigned long before;
+	int retval = 1;
+
+	status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+	before = jiffies;
+
+	if (twa_check_bits(status_reg_value))
+		twa_decode_bits(tw_dev, status_reg_value);
+
+	while ((status_reg_value & flag) != 0) {
+		status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+		if (twa_check_bits(status_reg_value))
+			twa_decode_bits(tw_dev, status_reg_value);
+
+		if (time_after(jiffies, before + HZ * seconds))
+			goto out;
+
+		msleep(50);
+	}
+	retval = 0;
+out:
+	return retval;
+} /* End twa_poll_status_gone() */
+
+/* This function will attempt to post a command packet to the board */
+static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id, char internal)
+{
+	u32 status_reg_value;
+	unsigned long command_que_value;
+	int retval = 1;
+
+	command_que_value = tw_dev->command_packet_phys[request_id];
+	status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+
+	if (twa_check_bits(status_reg_value))
+		twa_decode_bits(tw_dev, status_reg_value);
+
+	if (((tw_dev->pending_request_count > 0) && (tw_dev->state[request_id] != TW_S_PENDING)) || (status_reg_value & TW_STATUS_COMMAND_QUEUE_FULL)) {
+
+		/* Only pend internal driver commands */
+		if (!internal) {
+			retval = SCSI_MLQUEUE_HOST_BUSY;
+			goto out;
+		}
+
+		/* Couldn't post the command packet, so we do it later */
+		if (tw_dev->state[request_id] != TW_S_PENDING) {
+			tw_dev->state[request_id] = TW_S_PENDING;
+			tw_dev->pending_request_count++;
+			if (tw_dev->pending_request_count > tw_dev->max_pending_request_count) {
+				tw_dev->max_pending_request_count = tw_dev->pending_request_count;
+			}
+			tw_dev->pending_queue[tw_dev->pending_tail] = request_id;
+			tw_dev->pending_tail = (tw_dev->pending_tail + 1) % TW_Q_LENGTH;
+		}
+		TW_UNMASK_COMMAND_INTERRUPT(tw_dev);
+		goto out;
+	} else {
+		/* We successfully posted the command packet */
+#if BITS_PER_LONG > 32
+		writeq(TW_COMMAND_OFFSET + command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
+#else
+		writel(TW_COMMAND_OFFSET + command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
+#endif
+		tw_dev->state[request_id] = TW_S_POSTED;
+		tw_dev->posted_request_count++;
+		if (tw_dev->posted_request_count > tw_dev->max_posted_request_count) {
+			tw_dev->max_posted_request_count = tw_dev->posted_request_count;
+		}
+	}
+	retval = 0;
+out:
+	return retval;
+} /* End twa_post_command_packet() */
+
+/* This function will reset a device extension */
+static int twa_reset_device_extension(TW_Device_Extension *tw_dev)
+{
+	int i = 0;
+	int retval = 1;
+
+	/* Abort all requests that are in progress */
+	for (i = 0; i < TW_Q_LENGTH; i++) {
+		if ((tw_dev->state[i] != TW_S_FINISHED) &&
+		    (tw_dev->state[i] != TW_S_INITIAL) &&
+		    (tw_dev->state[i] != TW_S_COMPLETED)) {
+			if (tw_dev->srb[i]) {
+				tw_dev->srb[i]->result = (DID_RESET << 16);
+				tw_dev->srb[i]->scsi_done(tw_dev->srb[i]);
+				twa_unmap_scsi_data(tw_dev, i);
+			}
+		}
+	}
+
+	/* Reset queues and counts */
+	for (i = 0; i < TW_Q_LENGTH; i++) {
+		tw_dev->free_queue[i] = i;
+		tw_dev->state[i] = TW_S_INITIAL;
+	}
+	tw_dev->free_head = TW_Q_START;
+	tw_dev->free_tail = TW_Q_START;
+	tw_dev->posted_request_count = 0;
+	tw_dev->pending_request_count = 0;
+	tw_dev->pending_head = TW_Q_START;
+	tw_dev->pending_tail = TW_Q_START;
+	tw_dev->reset_print = 0;
+	tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
+	tw_dev->flags = 0;
+
+	TW_DISABLE_INTERRUPTS(tw_dev);
+
+	if (twa_reset_sequence(tw_dev, 1))
+		goto out;
+
+        TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev);
+
+	retval = 0;
+out:
+	return retval;
+} /* End twa_reset_device_extension() */
+
+/* This function will reset a controller */
+static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset)
+{
+	int tries = 0, retval = 1, flashed = 0, do_soft_reset = soft_reset;
+
+	while (tries < TW_MAX_RESET_TRIES) {
+		if (do_soft_reset)
+			TW_SOFT_RESET(tw_dev);
+
+		/* Make sure controller is in a good state */
+		if (twa_poll_status(tw_dev, TW_STATUS_MICROCONTROLLER_READY | (do_soft_reset == 1 ? TW_STATUS_ATTENTION_INTERRUPT : 0), 30)) {
+			TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1f, "Microcontroller not ready during reset sequence");
+			do_soft_reset = 1;
+			tries++;
+			continue;
+		}
+
+		/* Empty response queue */
+		if (twa_empty_response_queue(tw_dev)) {
+			TW_PRINTK(tw_dev->host, TW_DRIVER, 0x20, "Response queue empty failed during reset sequence");
+			do_soft_reset = 1;
+			tries++;
+			continue;
+		}
+
+		flashed = 0;
+
+		/* Check for compatibility/flash */
+		if (twa_check_srl(tw_dev, &flashed)) {
+			TW_PRINTK(tw_dev->host, TW_DRIVER, 0x21, "Compatibility check failed during reset sequence");
+			do_soft_reset = 1;
+			tries++;
+			continue;
+		} else {
+			if (flashed) {
+				tries++;
+				continue;
+			}
+		}
+
+		/* Drain the AEN queue */
+		if (twa_aen_drain_queue(tw_dev, soft_reset)) {
+			TW_PRINTK(tw_dev->host, TW_DRIVER, 0x22, "AEN drain failed during reset sequence");
+			do_soft_reset = 1;
+			tries++;
+			continue;
+		}
+
+		/* If we got here, controller is in a good state */
+		retval = 0;
+		goto out;
+	}
+out:
+	return retval;
+} /* End twa_reset_sequence() */
+
+/* This funciton returns unit geometry in cylinders/heads/sectors */
+static int twa_scsi_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[])
+{
+	int heads, sectors, cylinders;
+	TW_Device_Extension *tw_dev;
+
+	tw_dev = (TW_Device_Extension *)sdev->host->hostdata;
+
+	if (capacity >= 0x200000) {
+		heads = 255;
+		sectors = 63;
+		cylinders = sector_div(capacity, heads * sectors);
+	} else {
+		heads = 64;
+		sectors = 32;
+		cylinders = sector_div(capacity, heads * sectors);
+	}
+
+	geom[0] = heads;
+	geom[1] = sectors;
+	geom[2] = cylinders;
+
+	return 0;
+} /* End twa_scsi_biosparam() */
+
+/* This is the new scsi eh abort function */
+static int twa_scsi_eh_abort(struct scsi_cmnd *SCpnt)
+{
+	int i;
+	TW_Device_Extension *tw_dev = NULL;
+	int retval = FAILED;
+
+	tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata;
+
+	spin_unlock_irq(tw_dev->host->host_lock);
+
+	tw_dev->num_aborts++;
+
+	/* If we find any IO's in process, we have to reset the card */
+	for (i = 0; i < TW_Q_LENGTH; i++) {
+		if ((tw_dev->state[i] != TW_S_FINISHED) && (tw_dev->state[i] != TW_S_INITIAL)) {
+			printk(KERN_WARNING "3w-9xxx: scsi%d: WARNING: (0x%02X:0x%04X): Unit #%d: Command (0x%x) timed out, resetting card.\n",
+			       tw_dev->host->host_no, TW_DRIVER, 0x2c,
+			       SCpnt->device->id, SCpnt->cmnd[0]);
+			if (twa_reset_device_extension(tw_dev)) {
+				TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2a, "Controller reset failed during scsi abort");
+				goto out;
+			}
+			break;
+		}
+	}
+	retval = SUCCESS;
+out:
+	spin_lock_irq(tw_dev->host->host_lock);
+	return retval;
+} /* End twa_scsi_eh_abort() */
+
+/* This is the new scsi eh reset function */
+static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt)
+{
+	TW_Device_Extension *tw_dev = NULL;
+	int retval = FAILED;
+
+	tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata;
+
+	spin_unlock_irq(tw_dev->host->host_lock);
+
+	tw_dev->num_resets++;
+
+	printk(KERN_WARNING "3w-9xxx: scsi%d: SCSI host reset started.\n", tw_dev->host->host_no);
+
+	/* Now reset the card and some of the device extension data */
+	if (twa_reset_device_extension(tw_dev)) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2b, "Controller reset failed during scsi host reset");
+		goto out;
+	}
+	printk(KERN_WARNING "3w-9xxx: scsi%d: SCSI host reset succeeded.\n", tw_dev->host->host_no);
+	retval = SUCCESS;
+out:
+	spin_lock_irq(tw_dev->host->host_lock);
+	return retval;
+} /* End twa_scsi_eh_reset() */
+
+/* This is the main scsi queue function to handle scsi opcodes */
+static int twa_scsi_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
+{
+	int request_id, retval;
+	TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata;
+
+	/* Save done function into scsi_cmnd struct */
+	SCpnt->scsi_done = done;
+		
+	/* Get a free request id */
+	twa_get_request_id(tw_dev, &request_id);
+
+	/* Save the scsi command for use by the ISR */
+	tw_dev->srb[request_id] = SCpnt;
+
+	/* Initialize phase to zero */
+	SCpnt->SCp.phase = TW_PHASE_INITIAL;
+
+	retval = twa_scsiop_execute_scsi(tw_dev, request_id, NULL, 0, NULL);
+	switch (retval) {
+	case SCSI_MLQUEUE_HOST_BUSY:
+		twa_free_request_id(tw_dev, request_id);
+		break;
+	case 1:
+		tw_dev->state[request_id] = TW_S_COMPLETED;
+		twa_free_request_id(tw_dev, request_id);
+		SCpnt->result = (DID_ERROR << 16);
+		done(SCpnt);
+	}
+
+	return retval;
+} /* End twa_scsi_queue() */
+
+/* This function hands scsi cdb's to the firmware */
+static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Apache *sglistarg)
+{
+	TW_Command_Full *full_command_packet;
+	TW_Command_Apache *command_packet;
+	u32 num_sectors = 0x0;
+	int i, sg_count;
+	struct scsi_cmnd *srb = NULL;
+	struct scatterlist *sglist = NULL;
+	u32 buffaddr = 0x0;
+	int retval = 1;
+
+	if (tw_dev->srb[request_id]) {
+		if (tw_dev->srb[request_id]->request_buffer) {
+			sglist = (struct scatterlist *)tw_dev->srb[request_id]->request_buffer;
+		}
+		srb = tw_dev->srb[request_id];
+	}
+
+	/* Initialize command packet */
+	full_command_packet = tw_dev->command_packet_virt[request_id];
+	full_command_packet->header.header_desc.size_header = 128;
+	full_command_packet->header.status_block.error = 0;
+	full_command_packet->header.status_block.severity__reserved = 0;
+
+	command_packet = &full_command_packet->command.newcommand;
+	command_packet->status = 0;
+	command_packet->opcode__reserved = TW_OPRES_IN(0, TW_OP_EXECUTE_SCSI);
+
+	/* We forced 16 byte cdb use earlier */
+	if (!cdb)
+		memcpy(command_packet->cdb, srb->cmnd, TW_MAX_CDB_LEN);
+	else
+		memcpy(command_packet->cdb, cdb, TW_MAX_CDB_LEN);
+
+	if (srb)
+		command_packet->unit = srb->device->id;
+	else
+		command_packet->unit = 0;
+
+	command_packet->request_id = request_id;
+	command_packet->sgl_offset = 16;
+
+	if (!sglistarg) {
+		/* Map sglist from scsi layer to cmd packet */
+		if (tw_dev->srb[request_id]->use_sg == 0) {
+			if (tw_dev->srb[request_id]->request_bufflen < TW_MIN_SGL_LENGTH) {
+				command_packet->sg_list[0].address = tw_dev->generic_buffer_phys[request_id];
+				command_packet->sg_list[0].length = TW_MIN_SGL_LENGTH;
+			} else {
+				buffaddr = twa_map_scsi_single_data(tw_dev, request_id);
+				if (buffaddr == 0)
+					goto out;
+
+				command_packet->sg_list[0].address = buffaddr;
+				command_packet->sg_list[0].length = tw_dev->srb[request_id]->request_bufflen;
+			}
+			command_packet->sgl_entries = 1;
+
+			if (command_packet->sg_list[0].address & TW_ALIGNMENT_9000_SGL) {
+				TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2d, "Found unaligned address during execute scsi");
+				goto out;
+			}
+		}
+
+		if (tw_dev->srb[request_id]->use_sg > 0) {
+			sg_count = twa_map_scsi_sg_data(tw_dev, request_id);
+			if (sg_count == 0)
+				goto out;
+
+			for (i = 0; i < sg_count; i++) {
+				command_packet->sg_list[i].address = sg_dma_address(&sglist[i]);
+				command_packet->sg_list[i].length = sg_dma_len(&sglist[i]);
+				if (command_packet->sg_list[i].address & TW_ALIGNMENT_9000_SGL) {
+					TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2e, "Found unaligned sgl address during execute scsi");
+					goto out;
+				}
+			}
+			command_packet->sgl_entries = tw_dev->srb[request_id]->use_sg;
+		}
+	} else {
+		/* Internal cdb post */
+		for (i = 0; i < use_sg; i++) {
+			command_packet->sg_list[i].address = sglistarg[i].address;
+			command_packet->sg_list[i].length = sglistarg[i].length;
+			if (command_packet->sg_list[i].address & TW_ALIGNMENT_9000_SGL) {
+				TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2f, "Found unaligned sgl address during internal post");
+				goto out;
+			}
+		}
+		command_packet->sgl_entries = use_sg;
+	}
+
+	if (srb) {
+		if (srb->cmnd[0] == READ_6 || srb->cmnd[0] == WRITE_6)
+			num_sectors = (u32)srb->cmnd[4];
+
+		if (srb->cmnd[0] == READ_10 || srb->cmnd[0] == WRITE_10)
+			num_sectors = (u32)srb->cmnd[8] | ((u32)srb->cmnd[7] << 8);
+	}
+
+	/* Update sector statistic */
+	tw_dev->sector_count = num_sectors;
+	if (tw_dev->sector_count > tw_dev->max_sector_count)
+		tw_dev->max_sector_count = tw_dev->sector_count;
+
+	/* Update SG statistics */
+	if (srb) {
+		tw_dev->sgl_entries = tw_dev->srb[request_id]->use_sg;
+		if (tw_dev->sgl_entries > tw_dev->max_sgl_entries)
+			tw_dev->max_sgl_entries = tw_dev->sgl_entries;
+	}
+
+	/* Now post the command to the board */
+	if (srb) {
+		retval = twa_post_command_packet(tw_dev, request_id, 0);
+	} else {
+		twa_post_command_packet(tw_dev, request_id, 1);
+		retval = 0;
+	}
+out:
+	return retval;
+} /* End twa_scsiop_execute_scsi() */
+
+/* This function completes an execute scsi operation */
+static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id)
+{
+	/* Copy the response if too small */
+	if ((tw_dev->srb[request_id]->request_buffer) && (tw_dev->srb[request_id]->request_bufflen < TW_MIN_SGL_LENGTH)) {
+		memcpy(tw_dev->srb[request_id]->request_buffer,
+		       tw_dev->generic_buffer_virt[request_id],
+		       tw_dev->srb[request_id]->request_bufflen);
+	}
+} /* End twa_scsiop_execute_scsi_complete() */
+
+/* This function tells the controller to shut down */
+static void __twa_shutdown(TW_Device_Extension *tw_dev)
+{
+	/* Disable interrupts */
+	TW_DISABLE_INTERRUPTS(tw_dev);
+
+	printk(KERN_WARNING "3w-9xxx: Shutting down host %d.\n", tw_dev->host->host_no);
+
+	/* Tell the card we are shutting down */
+	if (twa_initconnection(tw_dev, 1, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL)) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x31, "Connection shutdown failed");
+	} else {
+		printk(KERN_WARNING "3w-9xxx: Shutdown complete.\n");
+	}
+
+	/* Clear all interrupts just before exit */
+	TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev);
+} /* End __twa_shutdown() */
+
+/* Wrapper for __twa_shutdown */
+static void twa_shutdown(struct device *dev)
+{
+	struct Scsi_Host *host = pci_get_drvdata(to_pci_dev(dev));
+	TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata;
+
+	__twa_shutdown(tw_dev);
+} /* End twa_shutdown() */
+
+/* This function will look up a string */
+static char *twa_string_lookup(twa_message_type *table, unsigned int code)
+{
+	int index;
+
+	for (index = 0; ((code != table[index].code) &&
+		      (table[index].text != (char *)0)); index++);
+	return(table[index].text);
+} /* End twa_string_lookup() */
+
+/* This function will perform a pci-dma unmap */
+static void twa_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id)
+{
+	struct scsi_cmnd *cmd = tw_dev->srb[request_id];
+	struct pci_dev *pdev = tw_dev->tw_pci_dev;
+
+	switch(cmd->SCp.phase) {
+	case TW_PHASE_SINGLE:
+		pci_unmap_single(pdev, cmd->SCp.have_data_in, cmd->request_bufflen, DMA_BIDIRECTIONAL);
+		break;
+	case TW_PHASE_SGLIST:
+		pci_unmap_sg(pdev, cmd->request_buffer, cmd->use_sg, DMA_BIDIRECTIONAL);
+		break;
+	}
+} /* End twa_unmap_scsi_data() */
+
+/* scsi_host_template initializer */
+static struct scsi_host_template driver_template = {
+	.module			= THIS_MODULE,
+	.name			= "3ware 9000 Storage Controller",
+	.queuecommand		= twa_scsi_queue,
+	.eh_abort_handler	= twa_scsi_eh_abort,
+	.eh_host_reset_handler	= twa_scsi_eh_reset,
+	.bios_param		= twa_scsi_biosparam,
+	.can_queue		= TW_Q_LENGTH-2,
+	.this_id		= -1,
+	.sg_tablesize		= TW_APACHE_MAX_SGL_LENGTH,
+	.max_sectors		= TW_MAX_SECTORS,
+	.cmd_per_lun		= TW_MAX_CMDS_PER_LUN,
+	.use_clustering		= ENABLE_CLUSTERING,
+	.shost_attrs		= twa_host_attrs,
+	.sdev_attrs		= twa_dev_attrs,
+	.emulated		= 1
+};
+
+/* This function will probe and initialize a card */
+static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
+{
+	struct Scsi_Host *host = NULL;
+	TW_Device_Extension *tw_dev;
+	u32 mem_addr;
+	int retval = -ENODEV;
+
+	retval = pci_enable_device(pdev);
+	if (retval) {
+		TW_PRINTK(host, TW_DRIVER, 0x34, "Failed to enable pci device");
+		goto out_disable_device;
+	}
+
+	pci_set_master(pdev);
+
+	retval = pci_set_dma_mask(pdev, TW_DMA_MASK);
+	if (retval) {
+		TW_PRINTK(host, TW_DRIVER, 0x23, "Failed to set dma mask");
+		goto out_disable_device;
+	}
+
+	host = scsi_host_alloc(&driver_template, sizeof(TW_Device_Extension));
+	if (!host) {
+		TW_PRINTK(host, TW_DRIVER, 0x24, "Failed to allocate memory for device extension");
+		retval = -ENOMEM;
+		goto out_disable_device;
+	}
+	tw_dev = (TW_Device_Extension *)host->hostdata;
+
+	memset(tw_dev, 0, sizeof(TW_Device_Extension));
+
+	/* Save values to device extension */
+	tw_dev->host = host;
+	tw_dev->tw_pci_dev = pdev;
+
+	if (twa_initialize_device_extension(tw_dev)) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x25, "Failed to initialize device extension");
+		goto out_free_device_extension;
+	}
+
+	/* Request IO regions */
+	retval = pci_request_regions(pdev, "3w-9xxx");
+	if (retval) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x26, "Failed to get mem region");
+		goto out_free_device_extension;
+	}
+
+	mem_addr = pci_resource_start(pdev, 1);
+
+	/* Save base address */
+	tw_dev->base_addr = ioremap(mem_addr, PAGE_SIZE);
+	if (!tw_dev->base_addr) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x35, "Failed to ioremap");
+		goto out_release_mem_region;
+	}
+
+	/* Disable interrupts on the card */
+	TW_DISABLE_INTERRUPTS(tw_dev);
+
+	/* Initialize the card */
+	if (twa_reset_sequence(tw_dev, 0))
+		goto out_release_mem_region;
+
+	/* Set host specific parameters */
+	host->max_id = TW_MAX_UNITS;
+	host->max_cmd_len = TW_MAX_CDB_LEN;
+
+	/* Luns and channels aren't supported by adapter */
+	host->max_lun = 0;
+	host->max_channel = 0;
+
+	/* Register the card with the kernel SCSI layer */
+	retval = scsi_add_host(host, &pdev->dev);
+	if (retval) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x27, "scsi add host failed");
+		goto out_release_mem_region;
+	}
+
+	pci_set_drvdata(pdev, host);
+
+	printk(KERN_WARNING "3w-9xxx: scsi%d: Found a 3ware 9000 Storage Controller at 0x%x, IRQ: %d.\n",
+	       host->host_no, mem_addr, pdev->irq);
+	printk(KERN_WARNING "3w-9xxx: scsi%d: Firmware %s, BIOS %s, Ports: %d.\n",
+	       host->host_no,
+	       (char *)twa_get_param(tw_dev, 0, TW_VERSION_TABLE,
+				     TW_PARAM_FWVER, TW_PARAM_FWVER_LENGTH),
+	       (char *)twa_get_param(tw_dev, 1, TW_VERSION_TABLE,
+				     TW_PARAM_BIOSVER, TW_PARAM_BIOSVER_LENGTH),
+	       *(int *)twa_get_param(tw_dev, 2, TW_INFORMATION_TABLE,
+				     TW_PARAM_PORTCOUNT, TW_PARAM_PORTCOUNT_LENGTH));
+
+	/* Now setup the interrupt handler */
+	retval = request_irq(pdev->irq, twa_interrupt, SA_SHIRQ, "3w-9xxx", tw_dev);
+	if (retval) {
+		TW_PRINTK(tw_dev->host, TW_DRIVER, 0x30, "Error requesting IRQ");
+		goto out_remove_host;
+	}
+
+	twa_device_extension_list[twa_device_extension_count] = tw_dev;
+	twa_device_extension_count++;
+
+	/* Re-enable interrupts on the card */
+	TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev);
+
+	/* Finally, scan the host */
+	scsi_scan_host(host);
+
+	if (twa_major == -1) {
+		if ((twa_major = register_chrdev (0, "twa", &twa_fops)) < 0)
+			TW_PRINTK(host, TW_DRIVER, 0x29, "Failed to register character device");
+	}
+	return 0;
+
+out_remove_host:
+	scsi_remove_host(host);
+out_release_mem_region:
+	pci_release_regions(pdev);
+out_free_device_extension:
+	twa_free_device_extension(tw_dev);
+	scsi_host_put(host);
+out_disable_device:
+	pci_disable_device(pdev);
+
+	return retval;
+} /* End twa_probe() */
+
+/* This function is called to remove a device */
+static void twa_remove(struct pci_dev *pdev)
+{
+	struct Scsi_Host *host = pci_get_drvdata(pdev);
+	TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata;
+
+	scsi_remove_host(tw_dev->host);
+
+	__twa_shutdown(tw_dev);
+
+	/* Free up the IRQ */
+	free_irq(tw_dev->tw_pci_dev->irq, tw_dev);
+
+	/* Free up the mem region */
+	pci_release_regions(pdev);
+
+	/* Free up device extension resources */
+	twa_free_device_extension(tw_dev);
+
+	/* Unregister character device */
+	if (twa_major >= 0) {
+		unregister_chrdev(twa_major, "twa");
+		twa_major = -1;
+	}
+
+	scsi_host_put(tw_dev->host);
+	pci_disable_device(pdev);
+	twa_device_extension_count--;
+} /* End twa_remove() */
+
+/* PCI Devices supported by this driver */
+static struct pci_device_id twa_pci_tbl[] __devinitdata = {
+	{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9000,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{ }
+};
+MODULE_DEVICE_TABLE(pci, twa_pci_tbl);
+
+/* pci_driver initializer */
+static struct pci_driver twa_driver = {
+	.name		= "3w-9xxx",
+	.id_table	= twa_pci_tbl,
+	.probe		= twa_probe,
+	.remove		= twa_remove,
+	.driver		= {
+		.shutdown = twa_shutdown
+	}
+};
+
+/* This function is called on driver initialization */
+static int __init twa_init(void)
+{
+	printk(KERN_WARNING "3ware 9000 Storage Controller device driver for Linux v%s.\n", twa_driver_version);
+
+	return pci_module_init(&twa_driver);
+} /* End twa_init() */
+
+/* This function is called on driver exit */
+static void __exit twa_exit(void)
+{
+	pci_unregister_driver(&twa_driver);
+} /* End twa_exit() */
+
+module_init(twa_init);
+module_exit(twa_exit);
+
--- diff/drivers/scsi/3w-9xxx.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/scsi/3w-9xxx.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,704 @@
+/*
+   3w-9xxx.h -- 3ware 9000 Storage Controller device driver for Linux.
+
+   Written By: Adam Radford <linuxraid@amcc.com>
+
+   Copyright (C) 2004 Applied Micro Circuits Corporation.
+
+   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; version 2 of the License.
+
+   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.
+
+   NO WARRANTY
+   THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
+   CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
+   LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
+   solely responsible for determining the appropriateness of using and
+   distributing the Program and assumes all risks associated with its
+   exercise of rights under this Agreement, including but not limited to
+   the risks and costs of program errors, damage to or loss of data,
+   programs or equipment, and unavailability or interruption of operations.
+
+   DISCLAIMER OF LIABILITY
+   NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
+   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
+   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+   TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+   USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+   HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
+
+   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
+
+   Bugs/Comments/Suggestions should be mailed to:
+   linuxraid@amcc.com
+
+   For more information, goto:
+   http://www.amcc.com
+*/
+
+#ifndef _3W_9XXX_H
+#define _3W_9XXX_H
+
+/* AEN string type */
+typedef struct TAG_twa_message_type {
+  unsigned int   code;
+  char*          text;
+} twa_message_type;
+
+/* AEN strings */
+static twa_message_type twa_aen_table[] = {
+	{0x0000, "AEN queue empty"},
+	{0x0001, "Controller reset occurred"},
+	{0x0002, "Degraded unit detected"},
+	{0x0003, "Controller error occured"},
+	{0x0004, "Background rebuild failed"},
+	{0x0005, "Background rebuild done"},
+	{0x0006, "Incomplete unit detected"},
+	{0x0007, "Background initialize done"},
+	{0x0008, "Unclean shutdown detected"},
+	{0x0009, "Drive timeout detected"},
+	{0x000A, "Drive error detected"},
+	{0x000B, "Rebuild started"},
+	{0x000C, "Background initialize started"},
+	{0x000D, "Entire logical unit was deleted"},
+	{0x000E, "Background initialize failed"},
+	{0x000F, "SMART attribute exceeded threshold"},
+	{0x0010, "Power supply reported AC under range"},
+	{0x0011, "Power supply reported DC out of range"},
+	{0x0012, "Power supply reported a malfunction"},
+	{0x0013, "Power supply predicted malfunction"},
+	{0x0014, "Battery charge is below threshold"},
+	{0x0015, "Fan speed is below threshold"},
+	{0x0016, "Temperature sensor is above threshold"},
+	{0x0017, "Power supply was removed"},
+	{0x0018, "Power supply was inserted"},
+	{0x0019, "Drive was removed from a bay"},
+	{0x001A, "Drive was inserted into a bay"},
+	{0x001B, "Drive bay cover door was opened"},
+	{0x001C, "Drive bay cover door was closed"},
+	{0x001D, "Product case was opened"},
+	{0x0020, "Prepare for shutdown (power-off)"},
+	{0x0021, "Downgrade UDMA mode to lower speed"},
+	{0x0022, "Upgrade UDMA mode to higher speed"},
+	{0x0023, "Sector repair completed"},
+	{0x0024, "Sbuf memory test failed"},
+	{0x0025, "Error flushing cached write data to array"},
+	{0x0026, "Drive reported data ECC error"},
+	{0x0027, "DCB has checksum error"},
+	{0x0028, "DCB version is unsupported"},
+	{0x0029, "Background verify started"},
+	{0x002A, "Background verify failed"},
+	{0x002B, "Background verify done"},
+	{0x002C, "Bad sector overwritten during rebuild"},
+	{0x002D, "Background rebuild error on source drive"},
+	{0x002E, "Replace failed because replacement drive too small"},
+	{0x002F, "Verify failed because array was never initialized"},
+	{0x0030, "Unsupported ATA drive"},
+	{0x0031, "Synchronize host/controller time"},
+	{0x0032, "Spare capacity is inadequate for some units"},
+	{0x0033, "Background migration started"},
+	{0x0034, "Background migration failed"},
+	{0x0035, "Background migration done"},
+	{0x0036, "Verify detected and fixed data/parity mismatch"},
+	{0x0037, "SO-DIMM incompatible"},
+	{0x0038, "SO-DIMM not detected"},
+	{0x0039, "Corrected Sbuf ECC error"},
+	{0x003A, "Drive power on reset detected"},
+	{0x003B, "Background rebuild paused"},
+	{0x003C, "Background initialize paused"},
+	{0x003D, "Background verify paused"},
+	{0x003E, "Background migration paused"},
+	{0x003F, "Corrupt flash file system detected"},
+	{0x0040, "Flash file system repaired"},
+	{0x0041, "Unit number assignments were lost"},
+	{0x0042, "Error during read of primary DCB"},
+	{0x0043, "Latent error found in backup DCB"},
+	{0x00FC, "Recovered/finished array membership update"},
+	{0x00FD, "Handler lockup"},
+	{0x00FE, "Retrying PCI transfer"},
+	{0x00FF, "AEN queue is full"},
+	{0xFFFFFFFF, (char*) 0}
+};
+
+/* AEN severity table */
+static char *twa_aen_severity_table[] =
+{
+	"None", "ERROR", "WARNING", "INFO", "DEBUG", (char*) 0
+};
+
+/* Error strings */
+static twa_message_type twa_error_table[] = {
+	{0x0100, "SGL entry contains zero data"},
+	{0x0101, "Invalid command opcode"},
+	{0x0102, "SGL entry has unaligned address"},
+	{0x0103, "SGL size does not match command"},
+	{0x0104, "SGL entry has illegal length"},
+	{0x0105, "Command packet is not aligned"},
+	{0x0106, "Invalid request ID"},
+	{0x0107, "Duplicate request ID"},
+	{0x0108, "ID not locked"},
+	{0x0109, "LBA out of range"},
+	{0x010A, "Logical unit not supported"},
+	{0x010B, "Parameter table does not exist"},
+	{0x010C, "Parameter index does not exist"},
+	{0x010D, "Invalid field in CDB"},
+	{0x010E, "Specified port has invalid drive"},
+	{0x010F, "Parameter item size mismatch"},
+	{0x0110, "Failed memory allocation"},
+	{0x0111, "Memory request too large"},
+	{0x0112, "Out of memory segments"},
+	{0x0113, "Invalid address to deallocate"},
+	{0x0114, "Out of memory"},
+	{0x0115, "Out of heap"},
+	{0x0120, "Double degrade"},
+	{0x0121, "Drive not degraded"},
+	{0x0122, "Reconstruct error"},
+	{0x0123, "Replace not accepted"},
+	{0x0124, "Replace drive capacity too small"},
+	{0x0125, "Sector count not allowed"},
+	{0x0126, "No spares left"},
+	{0x0127, "Reconstruct error"},
+	{0x0128, "Unit is offline"},
+	{0x0129, "Cannot update status to DCB"},
+	{0x0130, "Invalid stripe handle"},
+	{0x0131, "Handle that was not locked"},
+	{0x0132, "Handle that was not empty"},
+	{0x0133, "Handle has different owner"},
+	{0x0140, "IPR has parent"},
+	{0x0150, "Illegal Pbuf address alignment"},
+	{0x0151, "Illegal Pbuf transfer length"},
+	{0x0152, "Illegal Sbuf address alignment"},
+	{0x0153, "Illegal Sbuf transfer length"},
+	{0x0160, "Command packet too large"},
+	{0x0161, "SGL exceeds maximum length"},
+	{0x0162, "SGL has too many entries"},
+	{0x0170, "Insufficient resources for rebuilder"},
+	{0x0171, "Verify error (data != parity)"},
+	{0x0180, "Requested segment not in directory of this DCB"},
+	{0x0181, "DCB segment has unsupported version"},
+	{0x0182, "DCB segment has checksum error"},
+	{0x0183, "DCB support (settings) segment invalid"},
+	{0x0184, "DCB UDB (unit descriptor block) segment invalid"},
+	{0x0185, "DCB GUID (globally unique identifier) segment invalid"},
+	{0x01A0, "Could not clear Sbuf"},
+	{0x01C0, "Flash identify failed"},
+	{0x01C1, "Flash out of bounds"},
+	{0x01C2, "Flash verify error"},
+	{0x01C3, "Flash file object not found"},
+	{0x01C4, "Flash file already present"},
+	{0x01C5, "Flash file system full"},
+	{0x01C6, "Flash file not present"},
+	{0x01C7, "Flash file size error"},
+	{0x01C8, "Bad flash file checksum"},
+	{0x01CA, "Corrupt flash file system detected"},
+	{0x01D0, "Invalid field in parameter list"},
+	{0x01D1, "Parameter list length error"},
+	{0x01D2, "Parameter item is not changeable"},
+	{0x01D3, "Parameter item is not saveable"},
+	{0x0200, "UDMA CRC error"},
+	{0x0201, "Internal CRC error"},
+	{0x0202, "Data ECC error"},
+	{0x0203, "ADP level 1 error"},
+	{0x0204, "Port timeout"},
+	{0x0205, "Drive power on reset"},
+	{0x0206, "ADP level 2 error"},
+	{0x0207, "Soft reset failed"},
+	{0x0208, "Drive not ready"},
+	{0x0209, "Unclassified port error"},
+	{0x020A, "Drive aborted command"},
+	{0x0210, "Internal CRC error"},
+	{0x0211, "PCI abort error"},
+	{0x0212, "PCI parity error"},
+	{0x0213, "Port handler error"},
+	{0x0214, "Token interrupt count error"},
+	{0x0215, "Timeout waiting for PCI transfer"},
+	{0x0216, "Corrected buffer ECC"},
+	{0x0217, "Uncorrected buffer ECC"},
+	{0x0230, "Unsupported command during flash recovery"},
+	{0x0231, "Next image buffer expected"},
+	{0x0232, "Binary image architecture incompatible"},
+	{0x0233, "Binary image has no signature"},
+	{0x0234, "Binary image has bad checksum"},
+	{0x0235, "Image downloaded overflowed buffer"},
+	{0x0240, "I2C device not found"},
+	{0x0241, "I2C transaction aborted"},
+	{0x0242, "SO-DIMM parameter(s) incompatible using defaults"},
+	{0x0243, "SO-DIMM unsupported"},
+	{0x0248, "SPI transfer status error"},
+	{0x0249, "SPI transfer timeout error"},
+	{0x0250, "Invalid unit descriptor size in CreateUnit"},
+	{0x0251, "Unit descriptor size exceeds data buffer in CreateUnit"},
+	{0x0252, "Invalid value in CreateUnit descriptor"},
+	{0x0253, "Inadequate disk space to support descriptor in CreateUnit"},
+	{0x0254, "Unable to create data channel for this unit descriptor"},
+	{0x0255, "CreateUnit descriptor specifies a drive already in use"},
+	{0x0256, "Unable to write configuration to all disks during CreateUnit"},
+	{0x0257, "CreateUnit does not support this descriptor version"},
+	{0x0258, "Invalid subunit for RAID 0 or 5 in CreateUnit"},
+	{0x0259, "Too many descriptors in CreateUnit"},
+	{0x025A, "Invalid configuration specified in CreateUnit descriptor"},
+	{0x025B, "Invalid LBA offset specified in CreateUnit descriptor"},
+	{0x025C, "Invalid stripelet size specified in CreateUnit descriptor"},
+	{0x0260, "SMART attribute exceeded threshold"},
+	{0xFFFFFFFF, (char*) 0}
+};
+
+/* Control register bit definitions */
+#define TW_CONTROL_CLEAR_HOST_INTERRUPT	       0x00080000
+#define TW_CONTROL_CLEAR_ATTENTION_INTERRUPT   0x00040000
+#define TW_CONTROL_MASK_COMMAND_INTERRUPT      0x00020000
+#define TW_CONTROL_MASK_RESPONSE_INTERRUPT     0x00010000
+#define TW_CONTROL_UNMASK_COMMAND_INTERRUPT    0x00008000
+#define TW_CONTROL_UNMASK_RESPONSE_INTERRUPT   0x00004000
+#define TW_CONTROL_CLEAR_ERROR_STATUS	       0x00000200
+#define TW_CONTROL_ISSUE_SOFT_RESET	       0x00000100
+#define TW_CONTROL_ENABLE_INTERRUPTS	       0x00000080
+#define TW_CONTROL_DISABLE_INTERRUPTS	       0x00000040
+#define TW_CONTROL_ISSUE_HOST_INTERRUPT	       0x00000020
+#define TW_CONTROL_CLEAR_PARITY_ERROR          0x00800000
+#define TW_CONTROL_CLEAR_QUEUE_ERROR           0x00400000
+#define TW_CONTROL_CLEAR_PCI_ABORT             0x00100000
+#define TW_CONTROL_CLEAR_SBUF_WRITE_ERROR      0x00000008
+
+/* Status register bit definitions */
+#define TW_STATUS_MAJOR_VERSION_MASK	       0xF0000000
+#define TW_STATUS_MINOR_VERSION_MASK	       0x0F000000
+#define TW_STATUS_PCI_PARITY_ERROR	       0x00800000
+#define TW_STATUS_QUEUE_ERROR		       0x00400000
+#define TW_STATUS_MICROCONTROLLER_ERROR	       0x00200000
+#define TW_STATUS_PCI_ABORT		       0x00100000
+#define TW_STATUS_HOST_INTERRUPT	       0x00080000
+#define TW_STATUS_ATTENTION_INTERRUPT	       0x00040000
+#define TW_STATUS_COMMAND_INTERRUPT	       0x00020000
+#define TW_STATUS_RESPONSE_INTERRUPT	       0x00010000
+#define TW_STATUS_COMMAND_QUEUE_FULL	       0x00008000
+#define TW_STATUS_RESPONSE_QUEUE_EMPTY	       0x00004000
+#define TW_STATUS_MICROCONTROLLER_READY	       0x00002000
+#define TW_STATUS_COMMAND_QUEUE_EMPTY	       0x00001000
+#define TW_STATUS_EXPECTED_BITS		       0x00002000
+#define TW_STATUS_UNEXPECTED_BITS	       0x00F00008
+#define TW_STATUS_SBUF_WRITE_ERROR             0x00000008
+#define TW_STATUS_VALID_INTERRUPT              0x00DF0008
+
+/* RESPONSE QUEUE BIT DEFINITIONS */
+#define TW_RESPONSE_ID_MASK		       0x00000FF0
+
+/* PCI related defines */
+#define TW_DEVICE_NAME			       "3w-9xxx"
+#define TW_NUMDEVICES 1
+#define TW_PCI_CLEAR_PARITY_ERRORS 0xc100
+#define TW_PCI_CLEAR_PCI_ABORT     0x2000
+
+/* Command packet opcodes used by the driver */
+#define TW_OP_INIT_CONNECTION 0x1
+#define TW_OP_GET_PARAM	      0x12
+#define TW_OP_SET_PARAM	      0x13
+#define TW_OP_EXECUTE_SCSI    0x10
+#define TW_OP_DOWNLOAD_FIRMWARE 0x16
+#define TW_OP_RESET             0x1C
+
+/* Asynchronous Event Notification (AEN) codes used by the driver */
+#define TW_AEN_QUEUE_EMPTY       0x0000
+#define TW_AEN_SOFT_RESET        0x0001
+#define TW_AEN_SYNC_TIME_WITH_HOST 0x031
+#define TW_AEN_SEVERITY_ERROR    0x1
+#define TW_AEN_SEVERITY_DEBUG    0x4
+#define TW_AEN_NOT_RETRIEVED 0x1
+#define TW_AEN_RETRIEVED 0x2
+
+/* Command state defines */
+#define TW_S_INITIAL   0x1  /* Initial state */
+#define TW_S_STARTED   0x2  /* Id in use */
+#define TW_S_POSTED    0x4  /* Posted to the controller */
+#define TW_S_PENDING   0x8  /* Waiting to be posted in isr */
+#define TW_S_COMPLETED 0x10 /* Completed by isr */
+#define TW_S_FINISHED  0x20 /* I/O completely done */
+
+/* Compatibility defines */
+#define TW_9000_ARCH_ID 0x5
+#define TW_CURRENT_FW_SRL 24
+#define TW_CURRENT_FW_BUILD 5
+#define TW_CURRENT_FW_BRANCH 1
+
+/* Phase defines */
+#define TW_PHASE_INITIAL 0
+#define TW_PHASE_SINGLE  1
+#define TW_PHASE_SGLIST  2
+
+/* Misc defines */
+#define TW_SECTOR_SIZE                        512
+#define TW_ALIGNMENT_9000                     4  /* 4 bytes */
+#define TW_ALIGNMENT_9000_SGL                 0x3
+#define TW_MAX_UNITS			      16
+#define TW_INIT_MESSAGE_CREDITS		      0x100
+#define TW_INIT_COMMAND_PACKET_SIZE	      0x3
+#define TW_INIT_COMMAND_PACKET_SIZE_EXTENDED  0x6
+#define TW_EXTENDED_INIT_CONNECT	      0x2
+#define TW_BUNDLED_FW_SAFE_TO_FLASH	      0x4
+#define TW_CTLR_FW_RECOMMENDS_FLASH	      0x8
+#define TW_CTLR_FW_COMPATIBLE		      0x2
+#define TW_BASE_FW_SRL			      0x17
+#define TW_BASE_FW_BRANCH		      0
+#define TW_BASE_FW_BUILD		      1
+#if BITS_PER_LONG > 32
+#define TW_APACHE_MAX_SGL_LENGTH 72
+#define TW_ESCALADE_MAX_SGL_LENGTH 41
+#define TW_APACHE_CMD_PKT_SIZE 5
+#else
+#define TW_APACHE_MAX_SGL_LENGTH 109
+#define TW_ESCALADE_MAX_SGL_LENGTH 62
+#define TW_APACHE_CMD_PKT_SIZE 4
+#endif
+#define TW_ATA_PASS_SGL_MAX                   60
+#define TW_Q_LENGTH			      256
+#define TW_Q_START			      0
+#define TW_MAX_SLOT			      32
+#define TW_MAX_RESET_TRIES		      2
+#define TW_MAX_CMDS_PER_LUN		      254
+#define TW_MAX_RESPONSE_DRAIN		      256
+#define TW_MAX_AEN_DRAIN		      40
+#define TW_IN_IOCTL                           2
+#define TW_IN_CHRDEV_IOCTL                    3
+#define TW_IN_ATTENTION_LOOP		      4
+#define TW_MAX_SECTORS                        256
+#define TW_AEN_WAIT_TIME                      1000
+#define TW_IOCTL_WAIT_TIME                    (1 * HZ) /* 1 second */
+#define TW_MAX_CDB_LEN                        16
+#define TW_ISR_DONT_COMPLETE                  2
+#define TW_ISR_DONT_RESULT                    3
+#define TW_IOCTL_CHRDEV_TIMEOUT               60 /* 60 seconds */
+#define TW_IOCTL_CHRDEV_FREE                  -1
+#define TW_COMMAND_OFFSET                     128 /* 128 bytes */
+#define TW_VERSION_TABLE                      0x0402
+#define TW_TIMEKEEP_TABLE		      0x040A
+#define TW_INFORMATION_TABLE		      0x0403
+#define TW_PARAM_FWVER			      3
+#define TW_PARAM_FWVER_LENGTH		      16
+#define TW_PARAM_BIOSVER		      4
+#define TW_PARAM_BIOSVER_LENGTH		      16
+#define TW_PARAM_PORTCOUNT		      3
+#define TW_PARAM_PORTCOUNT_LENGTH	      1
+#define TW_MIN_SGL_LENGTH                     0x200 /* 512 bytes */
+#define TW_MAX_SENSE_LENGTH                   256
+#define TW_EVENT_SOURCE_AEN                   0x1000
+#define TW_EVENT_SOURCE_COMMAND               0x1001
+#define TW_EVENT_SOURCE_PCHIP                 0x1002
+#define TW_EVENT_SOURCE_DRIVER                0x1003
+#define TW_IOCTL_GET_COMPATIBILITY_INFO	      0x101
+#define TW_IOCTL_GET_LAST_EVENT               0x102
+#define TW_IOCTL_GET_FIRST_EVENT              0x103
+#define TW_IOCTL_GET_NEXT_EVENT               0x104
+#define TW_IOCTL_GET_PREVIOUS_EVENT           0x105
+#define TW_IOCTL_GET_LOCK                     0x106
+#define TW_IOCTL_RELEASE_LOCK                 0x107
+#define TW_IOCTL_FIRMWARE_PASS_THROUGH        0x108
+#define TW_IOCTL_ERROR_STATUS_NOT_LOCKED      0x1001 // Not locked
+#define TW_IOCTL_ERROR_STATUS_LOCKED          0x1002 // Already locked
+#define TW_IOCTL_ERROR_STATUS_NO_MORE_EVENTS  0x1003 // No more events
+#define TW_IOCTL_ERROR_STATUS_AEN_CLOBBER     0x1004 // AEN clobber occurred
+#define TW_IOCTL_ERROR_OS_EFAULT	      -EFAULT // Bad address
+#define TW_IOCTL_ERROR_OS_EINTR		      -EINTR  // Interrupted system call
+#define TW_IOCTL_ERROR_OS_EINVAL	      -EINVAL // Invalid argument
+#define TW_IOCTL_ERROR_OS_ENOMEM	      -ENOMEM // Out of memory
+#define TW_IOCTL_ERROR_OS_ERESTARTSYS	      -ERESTARTSYS // Restart system call
+#define TW_IOCTL_ERROR_OS_EIO		      -EIO // I/O error
+#define TW_IOCTL_ERROR_OS_ENOTTY	      -ENOTTY // Not a typewriter
+#define TW_IOCTL_ERROR_OS_ENODEV	      -ENODEV // No such device
+#define TW_ALLOCATION_LENGTH		      128
+#define TW_SENSE_DATA_LENGTH		      18
+#define TW_STATUS_CHECK_CONDITION	      2
+#define TW_ERROR_LOGICAL_UNIT_NOT_SUPPORTED   0x10a
+#define TW_ERROR_UNIT_OFFLINE                 0x128
+#define TW_MESSAGE_SOURCE_CONTROLLER_ERROR    3
+#define TW_MESSAGE_SOURCE_CONTROLLER_EVENT    4
+#define TW_MESSAGE_SOURCE_LINUX_DRIVER        6
+#define TW_DRIVER TW_MESSAGE_SOURCE_LINUX_DRIVER
+#define TW_MESSAGE_SOURCE_LINUX_OS            9
+#define TW_OS TW_MESSAGE_SOURCE_LINUX_OS
+#if BITS_PER_LONG > 32
+#define TW_COMMAND_SIZE			      5
+#define TW_DMA_MASK			      DMA_64BIT_MASK
+#else
+#define TW_COMMAND_SIZE			      4
+#define TW_DMA_MASK			      DMA_32BIT_MASK
+#endif
+#ifndef PCI_DEVICE_ID_3WARE_9000
+#define PCI_DEVICE_ID_3WARE_9000 0x1002
+#endif
+
+/* Bitmask macros to eliminate bitfields */
+
+/* opcode: 5, reserved: 3 */
+#define TW_OPRES_IN(x,y) ((x << 5) | (y & 0x1f))
+#define TW_OP_OUT(x) (x & 0x1f)
+
+/* opcode: 5, sgloffset: 3 */
+#define TW_OPSGL_IN(x,y) ((x << 5) | (y & 0x1f))
+#define TW_SGL_OUT(x) ((x >> 5) & 0x7)
+
+/* severity: 3, reserved: 5 */
+#define TW_SEV_OUT(x) (x & 0x7)
+
+/* reserved_1: 4, response_id: 8, reserved_2: 20 */
+#define TW_RESID_OUT(x) ((x >> 4) & 0xff)
+
+/* Macros */
+#define TW_CONTROL_REG_ADDR(x) (x->base_addr)
+#define TW_STATUS_REG_ADDR(x) ((unsigned char *)x->base_addr + 0x4)
+#if BITS_PER_LONG > 32
+#define TW_COMMAND_QUEUE_REG_ADDR(x) ((unsigned char *)x->base_addr + 0x20)
+#else
+#define TW_COMMAND_QUEUE_REG_ADDR(x) ((unsigned char *)x->base_addr + 0x8)
+#endif
+#define TW_RESPONSE_QUEUE_REG_ADDR(x) ((unsigned char *)x->base_addr + 0xC)
+#define TW_CLEAR_ALL_INTERRUPTS(x) (writel(TW_STATUS_VALID_INTERRUPT, TW_CONTROL_REG_ADDR(x)))
+#define TW_CLEAR_ATTENTION_INTERRUPT(x) (writel(TW_CONTROL_CLEAR_ATTENTION_INTERRUPT, TW_CONTROL_REG_ADDR(x)))
+#define TW_CLEAR_HOST_INTERRUPT(x) (writel(TW_CONTROL_CLEAR_HOST_INTERRUPT, TW_CONTROL_REG_ADDR(x)))
+#define TW_DISABLE_INTERRUPTS(x) (writel(TW_CONTROL_DISABLE_INTERRUPTS, TW_CONTROL_REG_ADDR(x)))
+#define TW_ENABLE_AND_CLEAR_INTERRUPTS(x) (writel(TW_CONTROL_CLEAR_ATTENTION_INTERRUPT | TW_CONTROL_UNMASK_RESPONSE_INTERRUPT | TW_CONTROL_ENABLE_INTERRUPTS, TW_CONTROL_REG_ADDR(x)))
+#define TW_MASK_COMMAND_INTERRUPT(x) (writel(TW_CONTROL_MASK_COMMAND_INTERRUPT, TW_CONTROL_REG_ADDR(x)))
+#define TW_UNMASK_COMMAND_INTERRUPT(x) (writel(TW_CONTROL_UNMASK_COMMAND_INTERRUPT, TW_CONTROL_REG_ADDR(x)))
+#define TW_SOFT_RESET(x) (writel(TW_CONTROL_ISSUE_SOFT_RESET | \
+			TW_CONTROL_CLEAR_HOST_INTERRUPT | \
+			TW_CONTROL_CLEAR_ATTENTION_INTERRUPT | \
+			TW_CONTROL_MASK_COMMAND_INTERRUPT | \
+			TW_CONTROL_MASK_RESPONSE_INTERRUPT | \
+			TW_CONTROL_CLEAR_ERROR_STATUS | \
+			TW_CONTROL_DISABLE_INTERRUPTS, TW_CONTROL_REG_ADDR(x)))
+#define TW_PRINTK(h,a,b,c) { \
+if (h) \
+printk(KERN_WARNING "3w-9xxx: scsi%d: ERROR: (0x%02X:0x%04X): %s.\n",h->host_no,a,b,c); \
+else \
+printk(KERN_WARNING "3w-9xxx: ERROR: (0x%02X:0x%04X): %s.\n",a,b,c); \
+}
+
+#pragma pack(1)
+
+/* Scatter Gather List Entry */
+typedef struct TAG_TW_SG_Entry {
+	unsigned long address;
+	u32 length;
+} TW_SG_Entry;
+
+/* Command Packet */
+typedef struct TW_Command {
+	unsigned char opcode__sgloffset;
+	unsigned char size;
+	unsigned char request_id;
+	unsigned char unit__hostid;
+	/* Second DWORD */
+	unsigned char status;
+	unsigned char flags;
+	union {
+		unsigned short block_count;
+		unsigned short parameter_count;
+	} byte6_offset;
+	union {
+		struct {
+			u32 lba;
+			TW_SG_Entry sgl[TW_ESCALADE_MAX_SGL_LENGTH];
+#if BITS_PER_LONG > 32
+			u32 padding[2];	/* pad to 512 bytes */
+#else
+			u32 padding;
+#endif
+		} io;
+		struct {
+			TW_SG_Entry sgl[TW_ESCALADE_MAX_SGL_LENGTH];
+#if BITS_PER_LONG > 32
+			u32 padding[3];
+#else
+			u32 padding[2];
+#endif
+		} param;
+	} byte8_offset;
+} TW_Command;
+
+/* Scatter gather element for 9000+ controllers */
+typedef struct TAG_TW_SG_Apache {
+	unsigned long address;
+	u32 length;
+} TW_SG_Apache;
+
+/* Command Packet for 9000+ controllers */
+typedef struct TAG_TW_Command_Apache {
+	unsigned char opcode__reserved;
+	unsigned char unit;
+	unsigned short request_id;
+	unsigned char status;
+	unsigned char sgl_offset;
+	unsigned short sgl_entries;
+	unsigned char cdb[16];
+	TW_SG_Apache sg_list[TW_APACHE_MAX_SGL_LENGTH];
+#if BITS_PER_LONG > 32
+	unsigned char padding[8];
+#endif
+} TW_Command_Apache;
+
+/* New command packet header */
+typedef struct TAG_TW_Command_Apache_Header {
+	unsigned char sense_data[TW_SENSE_DATA_LENGTH];
+	struct {
+		char reserved[4];
+		unsigned short error;
+		unsigned char padding;
+		unsigned char severity__reserved;
+	} status_block;
+	unsigned char err_specific_desc[98];
+	struct {
+		unsigned char size_header;
+		unsigned short reserved;
+		unsigned char size_sense;
+	} header_desc;
+} TW_Command_Apache_Header;
+
+/* This struct is a union of the 2 command packets */
+typedef struct TAG_TW_Command_Full {
+	TW_Command_Apache_Header header;
+	union {
+		TW_Command oldcommand;
+		TW_Command_Apache newcommand;
+	} command;
+} TW_Command_Full;
+
+/* Initconnection structure */
+typedef struct TAG_TW_Initconnect {
+	unsigned char opcode__reserved;
+	unsigned char size;
+	unsigned char request_id;
+	unsigned char res2;
+	unsigned char status;
+	unsigned char flags;
+	unsigned short message_credits;
+	u32 features;
+	unsigned short fw_srl;
+	unsigned short fw_arch_id;
+	unsigned short fw_branch;
+	unsigned short fw_build;
+	u32 result;
+} TW_Initconnect;
+
+/* Event info structure */
+typedef struct TAG_TW_Event
+{
+	unsigned int sequence_id;
+	unsigned int time_stamp_sec;
+	unsigned short aen_code;
+	unsigned char severity;
+	unsigned char retrieved;
+	unsigned char repeat_count;
+	unsigned char parameter_len;
+	unsigned char parameter_data[98];
+} TW_Event;
+
+typedef struct TAG_TW_Ioctl_Driver_Command {
+	unsigned int control_code;
+	unsigned int status;
+	unsigned int unique_id;
+	unsigned int sequence_id;
+	unsigned int os_specific;
+	unsigned int buffer_length;
+} TW_Ioctl_Driver_Command;
+
+typedef struct TAG_TW_Ioctl_Apache {
+	TW_Ioctl_Driver_Command driver_command;
+        char padding[488];
+	TW_Command_Full firmware_command;
+	char data_buffer[1];
+} TW_Ioctl_Buf_Apache;
+
+/* Lock structure for ioctl get/release lock */
+typedef struct TAG_TW_Lock {
+	unsigned long timeout_msec;
+	unsigned long time_remaining_msec;
+	unsigned long force_flag;
+} TW_Lock;
+
+/* GetParam descriptor */
+typedef struct {
+	unsigned short	table_id;
+	unsigned short	parameter_id;
+	unsigned short	parameter_size_bytes;
+	unsigned short  actual_parameter_size_bytes;
+	unsigned char	data[1];
+} TW_Param_Apache, *PTW_Param_Apache;
+
+/* Response queue */
+typedef union TAG_TW_Response_Queue {
+	u32 response_id;
+	u32 value;
+} TW_Response_Queue;
+
+typedef struct TAG_TW_Info {
+	char *buffer;
+	int length;
+	int offset;
+	int position;
+} TW_Info;
+
+/* Compatibility information structure */
+typedef struct TAG_TW_Compatibility_Info
+{
+	char driver_version[32];
+	unsigned short working_srl;
+	unsigned short working_branch;
+	unsigned short working_build;
+} TW_Compatibility_Info;
+
+typedef struct TAG_TW_Device_Extension {
+	u32                     *base_addr;
+	unsigned long	       	*generic_buffer_virt[TW_Q_LENGTH];
+	unsigned long	       	generic_buffer_phys[TW_Q_LENGTH];
+	TW_Command_Full	       	*command_packet_virt[TW_Q_LENGTH];
+	unsigned long		command_packet_phys[TW_Q_LENGTH];
+	struct pci_dev		*tw_pci_dev;
+	struct scsi_cmnd	*srb[TW_Q_LENGTH];
+	unsigned char		free_queue[TW_Q_LENGTH];
+	unsigned char		free_head;
+	unsigned char		free_tail;
+	unsigned char		pending_queue[TW_Q_LENGTH];
+	unsigned char		pending_head;
+	unsigned char		pending_tail;
+	int     		state[TW_Q_LENGTH];
+	unsigned int		posted_request_count;
+	unsigned int		max_posted_request_count;
+	unsigned int	        pending_request_count;
+	unsigned int		max_pending_request_count;
+	unsigned int		max_sgl_entries;
+	unsigned int		sgl_entries;
+	unsigned int		num_aborts;
+	unsigned int		num_resets;
+	unsigned int		sector_count;
+	unsigned int		max_sector_count;
+	unsigned int		aen_count;
+	struct Scsi_Host	*host;
+	long			flags;
+	int			reset_print;
+	TW_Event                *event_queue[TW_Q_LENGTH];
+	unsigned char           error_index;
+	unsigned char		event_queue_wrapped;
+	unsigned int            error_sequence_id;
+	int                     ioctl_sem_lock;
+	u32                     ioctl_msec;
+	int			chrdev_request_id;
+	wait_queue_head_t	ioctl_wqueue;
+	struct semaphore	ioctl_sem;
+	char			aen_clobber;
+	unsigned short		working_srl;
+	unsigned short		working_branch;
+	unsigned short		working_build;
+} TW_Device_Extension;
+
+#pragma pack()
+
+#endif /* _3W_9XXX_H */
+
--- diff/drivers/scsi/fdomain.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/scsi/fdomain.h	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,24 @@
+/*
+ * fdomain.c -- Future Domain TMC-16x0 SCSI driver
+ * Author: Rickard E. Faith, faith@cs.unc.edu
+ * Copyright 1992-1996, 1998 Rickard E. Faith (faith@acm.org)
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+extern struct scsi_host_template fdomain_driver_template;
+extern int fdomain_setup(char *str);
+extern struct Scsi_Host *__fdomain_16x0_detect(struct  scsi_host_template *tpnt );
+extern int fdomain_16x0_bus_reset(struct scsi_cmnd *SCpnt);
--- diff/drivers/scsi/sata_nv.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/scsi/sata_nv.c	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,353 @@
+/*
+ *  sata_nv.c - NVIDIA nForce SATA
+ *
+ *  Copyright 2004 NVIDIA Corp.  All rights reserved.
+ *  Copyright 2004 Andrew Chew
+ *
+ *  The contents of this file are subject to the Open
+ *  Software License version 1.1 that can be found at
+ *  http://www.opensource.org/licenses/osl-1.1.txt and is included herein
+ *  by reference.
+ *
+ *  Alternatively, the contents of this file may be used under the terms
+ *  of the GNU General Public License version 2 (the "GPL") as distributed
+ *  in the kernel source COPYING file, in which case the provisions of
+ *  the GPL are applicable instead of the above.  If you wish to allow
+ *  the use of your version of this file only under the terms of the
+ *  GPL and not to allow others to use your version of this file under
+ *  the OSL, indicate your decision by deleting the provisions above and
+ *  replace them with the notice and other provisions required by the GPL.
+ *  If you do not delete the provisions above, a recipient may use your
+ *  version of this file under either the OSL or the GPL.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/blkdev.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include "scsi.h"
+#include <scsi/scsi_host.h>
+#include <linux/libata.h>
+
+#define DRV_NAME			"sata_nv"
+#define DRV_VERSION			"0.01"
+
+#define NV_PORTS			2
+#define NV_PIO_MASK			0x1f
+#define NV_UDMA_MASK			0x7f
+#define NV_PORT0_BMDMA_REG_OFFSET	0x00
+#define NV_PORT1_BMDMA_REG_OFFSET	0x08
+#define NV_PORT0_SCR_REG_OFFSET		0x00
+#define NV_PORT1_SCR_REG_OFFSET		0x40
+
+#define NV_INT_STATUS			0x10
+#define NV_INT_STATUS_PDEV_INT		0x01
+#define NV_INT_STATUS_PDEV_PM		0x02
+#define NV_INT_STATUS_PDEV_ADDED	0x04
+#define NV_INT_STATUS_PDEV_REMOVED	0x08
+#define NV_INT_STATUS_SDEV_INT		0x10
+#define NV_INT_STATUS_SDEV_PM		0x20
+#define NV_INT_STATUS_SDEV_ADDED	0x40
+#define NV_INT_STATUS_SDEV_REMOVED	0x80
+#define NV_INT_STATUS_PDEV_HOTPLUG	(NV_INT_STATUS_PDEV_ADDED | \
+					NV_INT_STATUS_PDEV_REMOVED)
+#define NV_INT_STATUS_SDEV_HOTPLUG	(NV_INT_STATUS_SDEV_ADDED | \
+					NV_INT_STATUS_SDEV_REMOVED)
+#define NV_INT_STATUS_HOTPLUG		(NV_INT_STATUS_PDEV_HOTPLUG | \
+					NV_INT_STATUS_SDEV_HOTPLUG)
+
+#define NV_INT_ENABLE			0x11
+#define NV_INT_ENABLE_PDEV_MASK		0x01
+#define NV_INT_ENABLE_PDEV_PM		0x02
+#define NV_INT_ENABLE_PDEV_ADDED	0x04
+#define NV_INT_ENABLE_PDEV_REMOVED	0x08
+#define NV_INT_ENABLE_SDEV_MASK		0x10
+#define NV_INT_ENABLE_SDEV_PM		0x20
+#define NV_INT_ENABLE_SDEV_ADDED	0x40
+#define NV_INT_ENABLE_SDEV_REMOVED	0x80
+#define NV_INT_ENABLE_PDEV_HOTPLUG	(NV_INT_ENABLE_PDEV_ADDED | \
+					NV_INT_ENABLE_PDEV_REMOVED)
+#define NV_INT_ENABLE_SDEV_HOTPLUG	(NV_INT_ENABLE_SDEV_ADDED | \
+					NV_INT_ENABLE_SDEV_REMOVED)
+#define NV_INT_ENABLE_HOTPLUG		(NV_INT_ENABLE_PDEV_HOTPLUG | \
+					NV_INT_ENABLE_SDEV_HOTPLUG)
+
+#define NV_INT_CONFIG			0x12
+#define NV_INT_CONFIG_METHD		0x01 // 0 = INT, 1 = SMI
+
+static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
+irqreturn_t nv_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
+static u32 nv_scr_read (struct ata_port *ap, unsigned int sc_reg);
+static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
+static void nv_host_stop (struct ata_host_set *host_set);
+
+static struct pci_device_id nv_pci_tbl[] = {
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA,
+		PCI_ANY_ID, PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA,
+		PCI_ANY_ID, PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2,
+		PCI_ANY_ID, PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA,
+		PCI_ANY_ID, PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2,
+		PCI_ANY_ID, PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA,
+		PCI_ANY_ID, PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2,
+		PCI_ANY_ID, PCI_ANY_ID, },
+	{ 0, } /* terminate list */
+};
+
+static struct pci_driver nv_pci_driver = {
+	.name			= DRV_NAME,
+	.id_table		= nv_pci_tbl,
+	.probe			= nv_init_one,
+	.remove			= ata_pci_remove_one,
+};
+
+static Scsi_Host_Template nv_sht = {
+	.module			= THIS_MODULE,
+	.name			= DRV_NAME,
+	.queuecommand		= ata_scsi_queuecmd,
+	.eh_strategy_handler	= ata_scsi_error,
+	.can_queue		= ATA_DEF_QUEUE,
+	.this_id		= ATA_SHT_THIS_ID,
+	.sg_tablesize		= ATA_MAX_PRD,
+	.max_sectors		= ATA_MAX_SECTORS,
+	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
+	.emulated		= ATA_SHT_EMULATED,
+	.use_clustering		= ATA_SHT_USE_CLUSTERING,
+	.proc_name		= DRV_NAME,
+	.dma_boundary		= ATA_DMA_BOUNDARY,
+	.slave_configure	= ata_scsi_slave_config,
+	.bios_param		= ata_std_bios_param,
+};
+
+static struct ata_port_operations nv_ops = {
+	.port_disable		= ata_port_disable,
+	.tf_load		= ata_tf_load_pio,
+	.tf_read		= ata_tf_read_pio,
+	.exec_command		= ata_exec_command_pio,
+	.check_status		= ata_check_status_pio,
+	.phy_reset		= sata_phy_reset,
+	.bmdma_setup		= ata_bmdma_setup_pio,
+	.bmdma_start		= ata_bmdma_start_pio,
+	.qc_prep		= ata_qc_prep,
+	.eng_timeout		= ata_eng_timeout,
+	.irq_handler		= nv_interrupt,
+	.scr_read		= nv_scr_read,
+	.scr_write		= nv_scr_write,
+	.port_start		= ata_port_start,
+	.port_stop		= ata_port_stop,
+	.host_stop		= nv_host_stop,
+};
+
+MODULE_AUTHOR("NVIDIA");
+MODULE_DESCRIPTION("low-level driver for NVIDIA nForce SATA controller");
+MODULE_LICENSE("GPL");
+MODULE_DEVICE_TABLE(pci, nv_pci_tbl);
+
+irqreturn_t nv_interrupt (int irq, void *dev_instance, struct pt_regs *regs)
+{
+	struct ata_host_set *host_set = dev_instance;
+	unsigned int i;
+	unsigned int handled = 0;
+	unsigned long flags;
+	u8 intr_status;
+	u8 intr_enable;
+
+	spin_lock_irqsave(&host_set->lock, flags);
+
+	for (i = 0; i < host_set->n_ports; i++) {
+		struct ata_port *ap;
+
+		ap = host_set->ports[i];
+		if (ap && (!(ap->flags & ATA_FLAG_PORT_DISABLED))) {
+			struct ata_queued_cmd *qc;
+
+			qc = ata_qc_from_tag(ap, ap->active_tag);
+			if (qc && (!(qc->tf.ctl & ATA_NIEN)))
+				handled += ata_host_intr(ap, qc);
+		}
+
+		intr_status = inb(ap->ioaddr.scr_addr + NV_INT_STATUS);
+		intr_enable = inb(ap->ioaddr.scr_addr + NV_INT_ENABLE);
+
+		// Clear interrupt status.
+		outb(0xff, ap->ioaddr.scr_addr + NV_INT_STATUS);
+
+		if (intr_status & NV_INT_STATUS_HOTPLUG) {
+			if (intr_status & NV_INT_STATUS_PDEV_ADDED) {
+				printk(KERN_WARNING "ata%u: "
+					"Primary device added\n", ap->id);
+			}
+
+			if (intr_status & NV_INT_STATUS_PDEV_REMOVED) {
+				printk(KERN_WARNING "ata%u: "
+					"Primary device removed\n", ap->id);
+			}
+
+			if (intr_status & NV_INT_STATUS_SDEV_ADDED) {
+				printk(KERN_WARNING "ata%u: "
+					"Secondary device added\n", ap->id);
+			}
+
+			if (intr_status & NV_INT_STATUS_SDEV_REMOVED) {
+				printk(KERN_WARNING "ata%u: "
+					"Secondary device removed\n", ap->id);
+			}
+		}
+	}
+
+	spin_unlock_irqrestore(&host_set->lock, flags);
+
+	return IRQ_RETVAL(handled);
+}
+
+static u32 nv_scr_read (struct ata_port *ap, unsigned int sc_reg)
+{
+	if (sc_reg > SCR_CONTROL)
+		return 0xffffffffU;
+
+	return inl(ap->ioaddr.scr_addr + (sc_reg * 4));
+}
+
+static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
+{
+	if (sc_reg > SCR_CONTROL)
+		return;
+
+	outl(val, ap->ioaddr.scr_addr + (sc_reg * 4));
+}
+
+static void nv_host_stop (struct ata_host_set *host_set)
+{
+	int i;
+
+	for (i=0; i<host_set->n_ports; i++) {
+		u8 intr_mask;
+
+		// Disable hotplug event interrupts.
+		intr_mask = inb(host_set->ports[i]->ioaddr.scr_addr +
+				NV_INT_ENABLE);
+		intr_mask &= ~(NV_INT_ENABLE_HOTPLUG);
+		outb(intr_mask, host_set->ports[i]->ioaddr.scr_addr +
+				NV_INT_ENABLE);
+	}
+}
+
+static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
+{
+	static int printed_version = 0;
+	struct ata_probe_ent *probe_ent = NULL;
+	int i;
+	int rc;
+
+	if (!printed_version++)
+		printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
+
+	rc = pci_enable_device(pdev);
+	if (rc)
+		return rc;
+
+	rc = pci_request_regions(pdev, DRV_NAME);
+	if (rc)
+		goto err_out;
+
+	rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
+	if (rc)
+		goto err_out_regions;
+	rc = pci_set_consistent_dma_mask(pdev, ATA_DMA_MASK);
+	if (rc)
+		goto err_out_regions;
+
+	probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL);
+	if (!probe_ent) {
+		rc = -ENOMEM;
+		goto err_out_regions;
+	}
+
+	memset(probe_ent, 0, sizeof(*probe_ent));
+	INIT_LIST_HEAD(&probe_ent->node);
+
+	probe_ent->pdev = pdev;
+	probe_ent->sht = &nv_sht;
+	probe_ent->host_flags = ATA_FLAG_SATA |
+				ATA_FLAG_SATA_RESET |
+				ATA_FLAG_SRST |
+				ATA_FLAG_NO_LEGACY;
+	probe_ent->port_ops = &nv_ops;
+	probe_ent->n_ports = NV_PORTS;
+	probe_ent->irq = pdev->irq;
+	probe_ent->irq_flags = SA_SHIRQ;
+	probe_ent->pio_mask = NV_PIO_MASK;
+	probe_ent->udma_mask = NV_UDMA_MASK;
+
+	probe_ent->port[0].cmd_addr = pci_resource_start(pdev, 0);
+	ata_std_ports(&probe_ent->port[0]);
+	probe_ent->port[0].altstatus_addr =
+	probe_ent->port[0].ctl_addr =
+		pci_resource_start(pdev, 1) | ATA_PCI_CTL_OFS;
+	probe_ent->port[0].bmdma_addr =
+		pci_resource_start(pdev, 4) | NV_PORT0_BMDMA_REG_OFFSET;
+	probe_ent->port[0].scr_addr =
+		pci_resource_start(pdev, 5) | NV_PORT0_SCR_REG_OFFSET;
+
+	probe_ent->port[1].cmd_addr = pci_resource_start(pdev, 2);
+	ata_std_ports(&probe_ent->port[1]);
+	probe_ent->port[1].altstatus_addr =
+	probe_ent->port[1].ctl_addr =
+		pci_resource_start(pdev, 3) | ATA_PCI_CTL_OFS;
+	probe_ent->port[1].bmdma_addr =
+		pci_resource_start(pdev, 4) | NV_PORT1_BMDMA_REG_OFFSET;
+	probe_ent->port[1].scr_addr =
+		pci_resource_start(pdev, 5) | NV_PORT1_SCR_REG_OFFSET;
+
+	pci_set_master(pdev);
+
+	rc = ata_device_add(probe_ent);
+	if (rc != NV_PORTS)
+		goto err_out_regions;
+
+	// Enable hotplug event interrupts.
+	for (i=0; i<probe_ent->n_ports; i++) {
+		u8 intr_mask;
+
+		outb(NV_INT_STATUS_HOTPLUG, probe_ent->port[i].scr_addr +
+						NV_INT_STATUS);
+
+		intr_mask = inb(probe_ent->port[i].scr_addr + NV_INT_ENABLE);
+		intr_mask |= NV_INT_ENABLE_HOTPLUG;
+		outb(intr_mask, probe_ent->port[i].scr_addr + NV_INT_ENABLE);
+	}
+
+	kfree(probe_ent);
+
+	return 0;
+
+err_out_regions:
+	pci_release_regions(pdev);
+
+err_out:
+	pci_disable_device(pdev);
+	return rc;
+}
+
+static int __init nv_init(void)
+{
+	return pci_module_init(&nv_pci_driver);
+}
+
+static void __exit nv_exit(void)
+{
+	pci_unregister_driver(&nv_pci_driver);
+}
+
+module_init(nv_init);
+module_exit(nv_exit);
--- diff/drivers/serial/cpm_uart/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/serial/cpm_uart/Makefile	2004-07-01 21:32:56.000000000 +0100
@@ -0,0 +1,11 @@
+#
+# Makefile for the Motorola 8xx FEC ethernet controller
+#
+
+obj-$(CONFIG_SERIAL_CPM) += cpm_uart.o
+
+# Select the correct platform objects.
+cpm_uart-objs-$(CONFIG_CPM2)	+= cpm_uart_cpm2.o
+cpm_uart-objs-$(CONFIG_8xx)	+= cpm_uart_cpm1.o
+
+cpm_uart-objs	:= cpm_uart_core.o $(cpm_uart-objs-y)
--- diff/drivers/serial/cpm_uart/cpm_uart.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/serial/cpm_uart/cpm_uart.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,92 @@
+/*
+ *  linux/drivers/serial/cpm_uart.h
+ *
+ *  Driver for CPM (SCC/SMC) serial ports
+ *
+ *  Copyright (C) 2004 Freescale Semiconductor, Inc.
+ *
+ */
+#ifndef CPM_UART_H
+#define CPM_UART_H
+
+#include <linux/config.h>
+
+#if defined(CONFIG_CPM2)
+#include "cpm_uart_cpm2.h"
+#elif defined(CONFIG_8xx)
+#include "cpm_uart_cpm1.h"
+#endif
+
+#ifndef CONFIG_SERIAL_8250
+#define SERIAL_CPM_MAJOR	TTY_MAJOR
+#define SERIAL_CPM_MINOR	64
+#else
+#define SERIAL_CPM_MAJOR	204
+#define SERIAL_CPM_MINOR	42
+#endif
+
+#define IS_SMC(pinfo) 		(pinfo->flags & FLAG_SMC)
+#define IS_DISCARDING(pinfo)	(pinfo->flags & FLAG_DISCARDING)
+#define FLAG_DISCARDING	0x00000004	/* when set, don't discard */
+#define FLAG_SMC	0x00000002
+#define FLAG_CONSOLE	0x00000001
+
+#define UART_SMC1	0
+#define UART_SMC2	1
+#define UART_SCC1	2
+#define UART_SCC2	3
+#define UART_SCC3	4
+#define UART_SCC4	5
+
+#define UART_NR	6
+
+#define RX_NUM_FIFO	4
+#define RX_BUF_SIZE	32
+#define TX_NUM_FIFO	4
+#define TX_BUF_SIZE	32
+
+struct uart_cpm_port {
+	struct uart_port	port;
+	u16			rx_nrfifos;	
+	u16			rx_fifosize;
+	u16			tx_nrfifos;	
+	u16			tx_fifosize;
+	smc_t			*smcp;	
+	smc_uart_t		*smcup;
+	scc_t			*sccp;
+	scc_uart_t		*sccup;
+	volatile cbd_t		*rx_bd_base;
+	volatile cbd_t		*rx_cur;
+	volatile cbd_t		*tx_bd_base;
+	volatile cbd_t		*tx_cur;
+	unsigned char		*tx_buf;
+	unsigned char		*rx_buf;
+	u32			flags;
+	void			(*set_lineif)(struct uart_cpm_port *);
+	u8			brg;
+	uint			 dp_addr;
+	void			*mem_addr;
+	dma_addr_t		 dma_addr;
+	/* helpers */
+	int			 baud;
+	int			 bits;
+};
+
+extern int cpm_uart_port_map[UART_NR];
+extern int cpm_uart_nr;
+extern struct uart_cpm_port cpm_uart_ports[UART_NR];
+
+/* these are located in their respective files */
+void cpm_line_cr_cmd(int line, int cmd);
+int cpm_uart_init_portdesc(void);
+int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con);
+void cpm_uart_freebuf(struct uart_cpm_port *pinfo);
+
+void smc1_lineif(struct uart_cpm_port *pinfo);
+void smc2_lineif(struct uart_cpm_port *pinfo);
+void scc1_lineif(struct uart_cpm_port *pinfo);
+void scc2_lineif(struct uart_cpm_port *pinfo);
+void scc3_lineif(struct uart_cpm_port *pinfo);
+void scc4_lineif(struct uart_cpm_port *pinfo);
+
+#endif /* CPM_UART_H */
--- diff/drivers/serial/cpm_uart/cpm_uart_core.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/serial/cpm_uart/cpm_uart_core.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,1177 @@
+/*
+ *  linux/drivers/serial/cpm_uart.c
+ *
+ *  Driver for CPM (SCC/SMC) serial ports; core driver
+ *
+ *  Based on arch/ppc/cpm2_io/uart.c by Dan Malek
+ *  Based on ppc8xx.c by Thomas Gleixner
+ *  Based on drivers/serial/amba.c by Russell King
+ *
+ *  Maintainer: Kumar Gala (kumar.gala@freescale.com) (CPM2)
+ *              Pantelis Antoniou (panto@intracom.gr) (CPM1)
+ * 
+ *  Copyright (C) 2004 Freescale Semiconductor, Inc.
+ *            (C) 2004 Intracom, S.A.
+ *
+ * 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/config.h>
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/ioport.h>
+#include <linux/init.h>
+#include <linux/serial.h>
+#include <linux/console.h>
+#include <linux/sysrq.h>
+#include <linux/device.h>
+#include <linux/bootmem.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/delay.h>
+
+#if defined(CONFIG_SERIAL_CPM_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+#define SUPPORT_SYSRQ
+#endif
+
+#include <linux/serial_core.h>
+#include <linux/kernel.h>
+
+#include "cpm_uart.h"
+
+/***********************************************************************/
+
+/* Track which ports are configured as uarts */
+int cpm_uart_port_map[UART_NR];
+/* How many ports did we config as uarts */
+int cpm_uart_nr;
+
+/**************************************************************/
+
+static int  cpm_uart_tx_pump(struct uart_port *port);
+static void cpm_uart_init_smc(struct uart_cpm_port *pinfo, int bits, u16 cval);
+static void cpm_uart_init_scc(struct uart_cpm_port *pinfo, int sbits, u16 sval);
+
+/**************************************************************/
+
+/*
+ * Check, if transmit buffers are processed		
+*/
+static unsigned int cpm_uart_tx_empty(struct uart_port *port)
+{
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+	volatile cbd_t *bdp = pinfo->tx_bd_base;
+	int ret = 0;
+
+	while (1) {
+		if (bdp->cbd_sc & BD_SC_READY)
+			break;
+
+		if (bdp->cbd_sc & BD_SC_WRAP) {
+			ret = TIOCSER_TEMT;
+			break;
+		}
+		bdp++;
+	}
+
+	pr_debug("CPM uart[%d]:tx_empty: %d\n", port->line, ret);
+
+	return ret;
+}
+
+static void cpm_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
+{
+	/* Whee. Do nothing. */
+}
+
+static unsigned int cpm_uart_get_mctrl(struct uart_port *port)
+{
+	/* Whee. Do nothing. */
+	return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS;
+}
+
+/*
+ * Stop transmitter
+ */
+static void cpm_uart_stop_tx(struct uart_port *port, unsigned int tty_stop)
+{
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+	volatile smc_t *smcp = pinfo->smcp;
+	volatile scc_t *sccp = pinfo->sccp;
+
+	pr_debug("CPM uart[%d]:stop tx\n", port->line);
+
+	if (IS_SMC(pinfo))
+		smcp->smc_smcm &= ~SMCM_TX;
+	else
+		sccp->scc_sccm &= ~UART_SCCM_TX;
+}
+
+/*
+ * Start transmitter
+ */
+static void cpm_uart_start_tx(struct uart_port *port, unsigned int tty_start)
+{
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+	volatile smc_t *smcp = pinfo->smcp;
+	volatile scc_t *sccp = pinfo->sccp;
+
+	pr_debug("CPM uart[%d]:start tx\n", port->line);
+
+	/* if in the middle of discarding return */
+	if (IS_DISCARDING(pinfo))
+		return;
+
+	if (IS_SMC(pinfo)) {
+		if (smcp->smc_smcm & SMCM_TX)
+			return;
+	} else {
+		if (sccp->scc_sccm & UART_SCCM_TX)
+			return;
+	}
+
+	if (cpm_uart_tx_pump(port) != 0) {
+		if (IS_SMC(pinfo))
+			smcp->smc_smcm |= SMCM_TX;
+		else
+			sccp->scc_sccm |= UART_SCCM_TX;
+	}
+}
+
+/*
+ * Stop receiver 
+ */
+static void cpm_uart_stop_rx(struct uart_port *port)
+{
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+	volatile smc_t *smcp = pinfo->smcp;
+	volatile scc_t *sccp = pinfo->sccp;
+
+	pr_debug("CPM uart[%d]:stop rx\n", port->line);
+
+	if (IS_SMC(pinfo))
+		smcp->smc_smcm &= ~SMCM_RX;
+	else
+		sccp->scc_sccm &= ~UART_SCCM_RX;
+}
+
+/*
+ * Enable Modem status interrupts
+ */
+static void cpm_uart_enable_ms(struct uart_port *port)
+{
+	pr_debug("CPM uart[%d]:enable ms\n", port->line);
+}
+
+/*
+ * Generate a break. 
+ */
+static void cpm_uart_break_ctl(struct uart_port *port, int break_state)
+{
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+
+	pr_debug("CPM uart[%d]:break ctrl, break_state: %d\n", port->line,
+		break_state);
+
+	if (break_state)
+		cpm_line_cr_cmd(pinfo->port.line, CPM_CR_STOP_TX);
+	else
+		cpm_line_cr_cmd(pinfo->port.line, CPM_CR_RESTART_TX);
+}
+
+/*
+ * Transmit characters, refill buffer descriptor, if possible
+ */
+static void cpm_uart_int_tx(struct uart_port *port, struct pt_regs *regs)
+{
+	pr_debug("CPM uart[%d]:TX INT\n", port->line);
+
+	cpm_uart_tx_pump(port);
+}
+
+/*
+ * Receive characters
+ */
+static void cpm_uart_int_rx(struct uart_port *port, struct pt_regs *regs)
+{
+	int i;
+	unsigned char ch, *cp;
+	struct tty_struct *tty = port->info->tty;
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+	volatile cbd_t *bdp;
+	u16 status;
+	unsigned int flg;
+
+	pr_debug("CPM uart[%d]:RX INT\n", port->line);
+
+	/* Just loop through the closed BDs and copy the characters into
+	 * the buffer.
+	 */
+	bdp = pinfo->rx_cur;
+	for (;;) {
+		/* get status */
+		status = bdp->cbd_sc;
+		/* If this one is empty, return happy */
+		if (status & BD_SC_EMPTY)
+			break;
+
+		/* get number of characters, and check spce in flip-buffer */
+		i = bdp->cbd_datlen;
+
+		/* If we have not enough room in tty flip buffer, then we try 
+		 * later, which will be the next rx-interrupt or a timeout
+		 */
+		if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE) {
+			tty->flip.work.func((void *)tty);
+			if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE) {
+				printk(KERN_WARNING "TTY_DONT_FLIP set\n");
+				return;
+			}
+		}
+
+		/* get pointer */
+		cp = (unsigned char *)bus_to_virt(bdp->cbd_bufaddr);
+
+		/* loop through the buffer */
+		while (i-- > 0) {
+			ch = *cp++;
+			port->icount.rx++;
+			flg = TTY_NORMAL;
+
+			if (status &
+			    (BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV))
+				goto handle_error;
+			if (uart_handle_sysrq_char(port, ch, regs))
+				continue;
+
+		      error_return:
+			*tty->flip.char_buf_ptr++ = ch;
+			*tty->flip.flag_buf_ptr++ = flg;
+			tty->flip.count++;
+
+		}		/* End while (i--) */
+
+		/* This BD is ready to be used again. Clear status. get next */
+		bdp->cbd_sc &= ~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV);
+		bdp->cbd_sc |= BD_SC_EMPTY;
+
+		if (bdp->cbd_sc & BD_SC_WRAP)
+			bdp = pinfo->rx_bd_base;
+		else
+			bdp++;
+	} /* End for (;;) */
+
+	/* Write back buffer pointer */
+	pinfo->rx_cur = (volatile cbd_t *) bdp;
+
+	/* activate BH processing */
+	tty_flip_buffer_push(tty);
+
+	return;
+
+	/* Error processing */
+
+      handle_error:
+	/* Statistics */
+	if (status & BD_SC_BR)
+		port->icount.brk++;
+	if (status & BD_SC_PR)
+		port->icount.parity++;
+	if (status & BD_SC_FR)
+		port->icount.frame++;
+	if (status & BD_SC_OV)
+		port->icount.overrun++;
+
+	/* Mask out ignored conditions */
+	status &= port->read_status_mask;
+
+	/* Handle the remaining ones */
+	if (status & BD_SC_BR)
+		flg = TTY_BREAK;
+	else if (status & BD_SC_PR)
+		flg = TTY_PARITY;
+	else if (status & BD_SC_FR)
+		flg = TTY_FRAME;
+
+	/* overrun does not affect the current character ! */
+	if (status & BD_SC_OV) {
+		ch = 0;
+		flg = TTY_OVERRUN;
+		/* We skip this buffer */
+		/* CHECK: Is really nothing senseful there */
+		/* ASSUMPTION: it contains nothing valid */
+		i = 0;
+	}
+#ifdef SUPPORT_SYSRQ
+	port->sysrq = 0;
+#endif
+	goto error_return;
+}
+
+/*
+ * Asynchron mode interrupt handler
+ */
+static irqreturn_t cpm_uart_int(int irq, void *data, struct pt_regs *regs)
+{
+	u8 events;
+	struct uart_port *port = (struct uart_port *)data;
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+	volatile smc_t *smcp = pinfo->smcp;
+	volatile scc_t *sccp = pinfo->sccp;
+
+	pr_debug("CPM uart[%d]:IRQ\n", port->line);
+
+	if (IS_SMC(pinfo)) {
+		events = smcp->smc_smce;
+		if (events & SMCM_BRKE)
+			uart_handle_break(port);
+		if (events & SMCM_RX)
+			cpm_uart_int_rx(port, regs);
+		if (events & SMCM_TX)
+			cpm_uart_int_tx(port, regs);
+		smcp->smc_smce = events;
+	} else {
+		events = sccp->scc_scce;
+		if (events & UART_SCCM_BRKE)
+			uart_handle_break(port);
+		if (events & UART_SCCM_RX)
+			cpm_uart_int_rx(port, regs);
+		if (events & UART_SCCM_TX)
+			cpm_uart_int_tx(port, regs);
+		sccp->scc_scce = events;
+	}
+	return (events) ? IRQ_HANDLED : IRQ_NONE;
+}
+
+static int cpm_uart_startup(struct uart_port *port)
+{
+	int retval;
+
+	pr_debug("CPM uart[%d]:startup\n", port->line);
+
+	/* Install interrupt handler. */
+	retval = request_irq(port->irq, cpm_uart_int, 0, "cpm_uart", port);
+	if (retval)
+		return retval;
+
+	return 0;
+}
+
+/*
+ * Shutdown the uart
+ */
+static void cpm_uart_shutdown(struct uart_port *port)
+{
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+
+	pr_debug("CPM uart[%d]:shutdown\n", port->line);
+
+	/* free interrupt handler */
+	free_irq(port->irq, port);
+
+	/* If the port is not the console, disable Rx and Tx. */
+	if (!(pinfo->flags & FLAG_CONSOLE)) {
+		/* Stop uarts */
+		if (IS_SMC(pinfo)) {
+			volatile smc_t *smcp = pinfo->smcp;
+			smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
+			smcp->smc_smcm &= ~(SMCM_RX | SMCM_TX);
+		} else {
+			volatile scc_t *sccp = pinfo->sccp;
+			sccp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+			sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
+		}
+
+		/* Shut them really down and reinit buffer descriptors */
+		cpm_line_cr_cmd(pinfo->port.line, CPM_CR_INIT_TRX);
+	}
+}
+
+static void cpm_uart_set_termios(struct uart_port *port,
+				 struct termios *termios, struct termios *old)
+{
+	int baud;
+	unsigned long flags;
+	u16 cval, scval;
+	int bits, sbits;
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+	volatile cbd_t *bdp;
+
+	pr_debug("CPM uart[%d]:set_termios\n", port->line);
+
+	spin_lock_irqsave(&port->lock, flags);
+	/* disable uart interrupts */
+	if (IS_SMC(pinfo))
+		pinfo->smcp->smc_smcm &= ~(SMCM_RX | SMCM_TX);
+	else
+		pinfo->sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
+	pinfo->flags |= FLAG_DISCARDING;
+	spin_unlock_irqrestore(&port->lock, flags);
+
+	/* if previous configuration exists wait for tx to finish */
+	if (pinfo->baud != 0 && pinfo->bits != 0) {
+
+		/* point to the last txed bd */
+		bdp = pinfo->tx_cur;
+		if (bdp == pinfo->tx_bd_base)
+			bdp = pinfo->tx_bd_base + pinfo->tx_nrfifos;
+		else
+			bdp--;
+
+		/* wait for it to be transmitted */
+		while ((bdp->cbd_sc & BD_SC_READY) != 0)
+			schedule();
+
+		/* and delay for the hw fifo to drain */
+		udelay((3 * 1000000 * pinfo->bits) / pinfo->baud);
+	}
+
+	spin_lock_irqsave(&port->lock, flags);
+
+	/* Send the CPM an initialize command. */
+	cpm_line_cr_cmd(pinfo->port.line, CPM_CR_STOP_TX);
+
+	/* Stop uart */
+	if (IS_SMC(pinfo))
+		pinfo->smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
+	else
+		pinfo->sccp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+
+	/* Send the CPM an initialize command. */
+	cpm_line_cr_cmd(pinfo->port.line, CPM_CR_INIT_TRX);
+
+	spin_unlock_irqrestore(&port->lock, flags);
+
+	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16);
+
+	/* Character length programmed into the mode register is the
+	 * sum of: 1 start bit, number of data bits, 0 or 1 parity bit,
+	 * 1 or 2 stop bits, minus 1.
+	 * The value 'bits' counts this for us.
+	 */
+	cval = 0;
+	scval = 0;
+
+	/* byte size */
+	switch (termios->c_cflag & CSIZE) {
+	case CS5:
+		bits = 5;
+		break;
+	case CS6:
+		bits = 6;
+		break;
+	case CS7:
+		bits = 7;
+		break;
+	case CS8:
+		bits = 8;
+		break;
+		/* Never happens, but GCC is too dumb to figure it out */
+	default:
+		bits = 8;
+		break;
+	}
+	sbits = bits - 5;
+
+	if (termios->c_cflag & CSTOPB) {
+		cval |= SMCMR_SL;	/* Two stops */
+		scval |= SCU_PSMR_SL;
+		bits++;
+	}
+
+	if (termios->c_cflag & PARENB) {
+		cval |= SMCMR_PEN;
+		scval |= SCU_PSMR_PEN;
+		bits++;
+		if (!(termios->c_cflag & PARODD)) {
+			cval |= SMCMR_PM_EVEN;
+			scval |= (SCU_PSMR_REVP | SCU_PSMR_TEVP);
+		}
+	}
+
+	/*
+	 * Set up parity check flag
+	 */
+#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
+
+	port->read_status_mask = (BD_SC_EMPTY | BD_SC_OV);
+	if (termios->c_iflag & INPCK)
+		port->read_status_mask |= BD_SC_FR | BD_SC_PR;
+	if ((termios->c_iflag & BRKINT) || (termios->c_iflag & PARMRK))
+		port->read_status_mask |= BD_SC_BR;
+
+	/*
+	 * Characters to ignore
+	 */
+	port->ignore_status_mask = 0;
+	if (termios->c_iflag & IGNPAR)
+		port->ignore_status_mask |= BD_SC_PR | BD_SC_FR;
+	if (termios->c_iflag & IGNBRK) {
+		port->ignore_status_mask |= BD_SC_BR;
+		/*
+		 * If we're ignore parity and break indicators, ignore
+		 * overruns too.  (For real raw support).
+		 */
+		if (termios->c_iflag & IGNPAR)
+			port->ignore_status_mask |= BD_SC_OV;
+	}
+	/*
+	 * !!! ignore all characters if CREAD is not set
+	 */
+	if ((termios->c_cflag & CREAD) == 0)
+		port->read_status_mask &= ~BD_SC_EMPTY;
+	
+	spin_lock_irqsave(&port->lock, flags);
+
+	cpm_set_brg(pinfo->brg - 1, baud);
+
+	/* Start bit has not been added (so don't, because we would just
+	 * subtract it later), and we need to add one for the number of
+	 * stops bits (there is always at least one).
+	 */
+	bits++;
+
+	/* re-init */
+	if (IS_SMC(pinfo))
+		cpm_uart_init_smc(pinfo, bits, cval);
+	else
+		cpm_uart_init_scc(pinfo, sbits, scval);
+
+	pinfo->baud = baud;
+	pinfo->bits = bits;
+
+	pinfo->flags &= ~FLAG_DISCARDING;
+	spin_unlock_irqrestore(&port->lock, flags);
+
+}
+
+static const char *cpm_uart_type(struct uart_port *port)
+{
+	pr_debug("CPM uart[%d]:uart_type\n", port->line);
+
+	return port->type == PORT_CPM ? "CPM UART" : NULL;
+}
+
+/*
+ * verify the new serial_struct (for TIOCSSERIAL).
+ */
+static int cpm_uart_verify_port(struct uart_port *port,
+				struct serial_struct *ser)
+{
+	int ret = 0;
+
+	pr_debug("CPM uart[%d]:verify_port\n", port->line);
+
+	if (ser->type != PORT_UNKNOWN && ser->type != PORT_CPM)
+		ret = -EINVAL;
+	if (ser->irq < 0 || ser->irq >= NR_IRQS)
+		ret = -EINVAL;
+	if (ser->baud_base < 9600)
+		ret = -EINVAL;
+	return ret;
+}
+
+/*
+ * Transmit characters, refill buffer descriptor, if possible
+ */
+static int cpm_uart_tx_pump(struct uart_port *port)
+{
+	volatile cbd_t *bdp;
+	unsigned char *p;
+	int count;
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+	struct circ_buf *xmit = &port->info->xmit;
+
+	/* Handle xon/xoff */
+	if (port->x_char) {
+		/* Pick next descriptor and fill from buffer */
+		bdp = pinfo->tx_cur;
+
+		p = bus_to_virt(bdp->cbd_bufaddr);
+		*p++ = xmit->buf[xmit->tail];
+		bdp->cbd_datlen = 1;
+		bdp->cbd_sc |= BD_SC_READY;
+		/* Get next BD. */
+		if (bdp->cbd_sc & BD_SC_WRAP)
+			bdp = pinfo->tx_bd_base;
+		else
+			bdp++;
+		pinfo->tx_cur = bdp;
+
+		port->icount.tx++;
+		port->x_char = 0;
+		return 1;
+	}
+
+	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
+		cpm_uart_stop_tx(port, 0);
+		return 0;
+	}
+
+	/* Pick next descriptor and fill from buffer */
+	bdp = pinfo->tx_cur;
+
+	while (!(bdp->cbd_sc & BD_SC_READY) && (xmit->tail != xmit->head)) {
+		count = 0;
+		p = bus_to_virt(bdp->cbd_bufaddr);
+		while (count < pinfo->tx_fifosize) {
+			*p++ = xmit->buf[xmit->tail];
+			xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
+			port->icount.tx++;
+			count++;
+			if (xmit->head == xmit->tail)
+				break;
+		}
+		bdp->cbd_datlen = count;
+		bdp->cbd_sc |= BD_SC_READY;
+		/* Get next BD. */
+		if (bdp->cbd_sc & BD_SC_WRAP)
+			bdp = pinfo->tx_bd_base;
+		else
+			bdp++;
+	}
+	pinfo->tx_cur = bdp;
+
+	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+		uart_write_wakeup(port);
+
+	if (uart_circ_empty(xmit)) {
+		cpm_uart_stop_tx(port, 0);
+		return 0;
+	}
+
+	return 1;
+}
+
+static void cpm_uart_init_scc(struct uart_cpm_port *pinfo, int bits, u16 scval)
+{
+	volatile scc_t *scp;
+	volatile scc_uart_t *sup;
+	u8 *mem_addr;
+	volatile cbd_t *bdp;
+	int i;
+
+	pr_debug("CPM uart[%d]:init_scc\n", pinfo->port.line);
+
+	scp = pinfo->sccp;
+	sup = pinfo->sccup;
+
+	/* Set the physical address of the host memory
+	 * buffers in the buffer descriptors, and the
+	 * virtual address for us to work with.
+	 */
+	pinfo->rx_cur = pinfo->rx_bd_base;
+	mem_addr = pinfo->mem_addr;
+	for (bdp = pinfo->rx_bd_base, i = 0; i < pinfo->rx_nrfifos; i++, bdp++) {
+		bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+		bdp->cbd_sc = BD_SC_EMPTY | BD_SC_INTRPT | (i < (pinfo->rx_nrfifos - 1) ? 0 : BD_SC_WRAP);
+		mem_addr += pinfo->rx_fifosize;
+	}
+
+	/* Set the physical address of the host memory
+	 * buffers in the buffer descriptors, and the
+	 * virtual address for us to work with.
+	 */
+	mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize);
+	pinfo->tx_cur = pinfo->tx_bd_base;
+	for (bdp = pinfo->tx_bd_base, i = 0; i < pinfo->tx_nrfifos; i++, bdp++) {
+		bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+		bdp->cbd_sc = BD_SC_INTRPT | (i < (pinfo->tx_nrfifos - 1) ? 0 : BD_SC_WRAP);
+		mem_addr += pinfo->tx_fifosize;
+		bdp++;
+	}
+
+	/* Store address */
+	pinfo->sccup->scc_genscc.scc_rbase = (unsigned char *)pinfo->rx_bd_base - DPRAM_BASE;
+	pinfo->sccup->scc_genscc.scc_tbase = (unsigned char *)pinfo->tx_bd_base - DPRAM_BASE;
+
+	/* Set up the uart parameters in the
+	 * parameter ram.
+	 */
+
+	cpm_set_scc_fcr(sup);
+
+	sup->scc_genscc.scc_mrblr = pinfo->rx_fifosize;
+	sup->scc_maxidl = pinfo->rx_fifosize;
+	sup->scc_brkcr = 1;
+	sup->scc_parec = 0;
+	sup->scc_frmec = 0;
+	sup->scc_nosec = 0;
+	sup->scc_brkec = 0;
+	sup->scc_uaddr1 = 0;
+	sup->scc_uaddr2 = 0;
+	sup->scc_toseq = 0;
+	sup->scc_char1 = 0x8000;
+	sup->scc_char2 = 0x8000;
+	sup->scc_char3 = 0x8000;
+	sup->scc_char4 = 0x8000;
+	sup->scc_char5 = 0x8000;
+	sup->scc_char6 = 0x8000;
+	sup->scc_char7 = 0x8000;
+	sup->scc_char8 = 0x8000;
+	sup->scc_rccm = 0xc0ff;
+
+	/* Send the CPM an initialize command.
+	 */
+	cpm_line_cr_cmd(pinfo->port.line, CPM_CR_INIT_TRX);
+
+	/* Set UART mode, 8 bit, no parity, one stop.
+	 * Enable receive and transmit.
+	 */
+	scp->scc_gsmrh = 0;
+	scp->scc_gsmrl =
+	    (SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);
+
+	/* Enable rx interrupts  and clear all pending events.  */
+	scp->scc_sccm = UART_SCCM_RX;
+	scp->scc_scce = 0xffff;
+	scp->scc_dsr = 0x7e7e;
+	scp->scc_psmr = (bits << 12) | scval;
+
+	scp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+}
+
+static void cpm_uart_init_smc(struct uart_cpm_port *pinfo, int bits, u16 cval)
+{
+	volatile smc_t *sp;
+	volatile smc_uart_t *up;
+	volatile u8 *mem_addr;
+	volatile cbd_t *bdp;
+	int i;
+
+	pr_debug("CPM uart[%d]:init_smc\n", pinfo->port.line);
+
+	sp = pinfo->smcp;
+	up = pinfo->smcup;
+
+	/* Set the physical address of the host memory
+	 * buffers in the buffer descriptors, and the
+	 * virtual address for us to work with.
+	 */
+	mem_addr = pinfo->mem_addr;
+	pinfo->rx_cur = pinfo->rx_bd_base;
+	for (bdp = pinfo->rx_bd_base, i = 0; i < pinfo->rx_nrfifos; i++, bdp++) {
+		bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+		bdp->cbd_sc = BD_SC_EMPTY | BD_SC_INTRPT | (i < (pinfo->rx_nrfifos - 1) ? 0 : BD_SC_WRAP);
+		mem_addr += pinfo->rx_fifosize;
+	}
+
+	/* Set the physical address of the host memory
+	 * buffers in the buffer descriptors, and the
+	 * virtual address for us to work with.
+	 */
+	mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize);
+	pinfo->tx_cur = pinfo->tx_bd_base;
+	for (bdp = pinfo->tx_bd_base, i = 0; i < pinfo->tx_nrfifos; i++, bdp++) {
+		bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+		bdp->cbd_sc = BD_SC_INTRPT | (i < (pinfo->tx_nrfifos - 1) ? 0 : BD_SC_WRAP);
+		mem_addr += pinfo->tx_fifosize;
+	}
+
+	/* Store address */
+	pinfo->smcup->smc_rbase = (u_char *)pinfo->rx_bd_base - DPRAM_BASE;
+	pinfo->smcup->smc_tbase = (u_char *)pinfo->tx_bd_base - DPRAM_BASE;
+
+	/* Set up the uart parameters in the
+	 * parameter ram.
+	 */
+	cpm_set_smc_fcr(up);
+
+	/* Using idle charater time requires some additional tuning.  */
+	up->smc_mrblr = pinfo->rx_fifosize;
+	up->smc_maxidl = pinfo->rx_fifosize;
+	up->smc_brkcr = 1;
+
+	cpm_line_cr_cmd(pinfo->port.line, CPM_CR_INIT_TRX);
+
+	/* Set UART mode, according to the parameters */
+	sp->smc_smcmr = smcr_mk_clen(bits) | cval | SMCMR_SM_UART;
+
+	/* Enable only rx interrupts clear all pending events. */
+	sp->smc_smcm = SMCM_RX;
+	sp->smc_smce = 0xff;
+
+	sp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN);
+}
+
+/*
+ * Initialize port. This is called from early_console stuff
+ * so we have to be careful here !
+ */
+static int cpm_uart_request_port(struct uart_port *port)
+{
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+	int ret;
+
+	pr_debug("CPM uart[%d]:request port\n", port->line);
+
+	if (pinfo->flags & FLAG_CONSOLE)
+		return 0;
+
+	/*
+	 * Setup any port IO, connect any baud rate generators,
+	 * etc.  This is expected to be handled by board
+	 * dependant code 
+	 */
+	if (pinfo->set_lineif)
+		pinfo->set_lineif(pinfo);
+
+	ret = cpm_uart_allocbuf(pinfo, 0);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static void cpm_uart_release_port(struct uart_port *port)
+{
+	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+
+	if (!(pinfo->flags & FLAG_CONSOLE))
+		cpm_uart_freebuf(pinfo);
+}
+
+/*
+ * Configure/autoconfigure the port.
+ */
+static void cpm_uart_config_port(struct uart_port *port, int flags)
+{
+	pr_debug("CPM uart[%d]:config_port\n", port->line);
+
+	if (flags & UART_CONFIG_TYPE) {
+		port->type = PORT_CPM;
+		cpm_uart_request_port(port);
+	}
+}
+static struct uart_ops cpm_uart_pops = {
+	.tx_empty	= cpm_uart_tx_empty,
+	.set_mctrl	= cpm_uart_set_mctrl,
+	.get_mctrl	= cpm_uart_get_mctrl,
+	.stop_tx	= cpm_uart_stop_tx,
+	.start_tx	= cpm_uart_start_tx,
+	.stop_rx	= cpm_uart_stop_rx,
+	.enable_ms	= cpm_uart_enable_ms,
+	.break_ctl	= cpm_uart_break_ctl,
+	.startup	= cpm_uart_startup,
+	.shutdown	= cpm_uart_shutdown,
+	.set_termios	= cpm_uart_set_termios,
+	.type		= cpm_uart_type,
+	.release_port	= cpm_uart_release_port,
+	.request_port	= cpm_uart_request_port,
+	.config_port	= cpm_uart_config_port,
+	.verify_port	= cpm_uart_verify_port,
+};
+
+struct uart_cpm_port cpm_uart_ports[UART_NR] = {
+	[UART_SMC1] = {
+		.port = {
+			.irq		= SMC1_IRQ,
+			.ops		= &cpm_uart_pops,
+			.iotype		= SERIAL_IO_MEM,
+			.line		= UART_SMC1,
+		},
+		.flags = FLAG_SMC,
+		.tx_nrfifos = TX_NUM_FIFO,
+		.tx_fifosize = TX_BUF_SIZE,
+		.rx_nrfifos = RX_NUM_FIFO, 
+		.rx_fifosize = RX_BUF_SIZE,
+		.set_lineif = smc1_lineif,
+	},
+	[UART_SMC2] = {
+		.port = {
+			.irq		= SMC2_IRQ,
+			.ops		= &cpm_uart_pops,
+			.iotype		= SERIAL_IO_MEM,
+		},
+		.flags = FLAG_SMC,
+		.tx_nrfifos = TX_NUM_FIFO,
+		.tx_fifosize = TX_BUF_SIZE,
+		.rx_nrfifos = RX_NUM_FIFO, 
+		.rx_fifosize = RX_BUF_SIZE,
+		.set_lineif = smc2_lineif,
+	},
+	[UART_SCC1] = {
+		.port = {
+			.irq		= SCC1_IRQ,
+			.ops		= &cpm_uart_pops,
+			.iotype		= SERIAL_IO_MEM,
+			.line		= UART_SCC1,
+		},
+		.tx_nrfifos = TX_NUM_FIFO,
+		.tx_fifosize = TX_BUF_SIZE,
+		.rx_nrfifos = RX_NUM_FIFO, 
+		.rx_fifosize = RX_BUF_SIZE,
+		.set_lineif = scc1_lineif,
+	},
+	[UART_SCC2] = {
+		.port = {
+			.irq		= SCC2_IRQ,
+			.ops		= &cpm_uart_pops,
+			.iotype		= SERIAL_IO_MEM,
+		},
+		.tx_nrfifos = TX_NUM_FIFO,
+		.tx_fifosize = TX_BUF_SIZE,
+		.rx_nrfifos = RX_NUM_FIFO, 
+		.rx_fifosize = RX_BUF_SIZE,
+		.set_lineif = scc2_lineif,
+	},
+	[UART_SCC3] = {
+		.port = {
+			.irq		= SCC3_IRQ,
+			.ops		= &cpm_uart_pops,
+			.iotype		= SERIAL_IO_MEM,
+		},
+		.tx_nrfifos = TX_NUM_FIFO,
+		.tx_fifosize = TX_BUF_SIZE,
+		.rx_nrfifos = RX_NUM_FIFO, 
+		.rx_fifosize = RX_BUF_SIZE,
+		.set_lineif = scc3_lineif,
+	},
+	[UART_SCC4] = {
+		.port = {
+			.irq		= SCC4_IRQ,
+			.ops		= &cpm_uart_pops,
+			.iotype		= SERIAL_IO_MEM,
+			.line		= UART_SCC4,
+		},
+		.tx_nrfifos = TX_NUM_FIFO,
+		.tx_fifosize = TX_BUF_SIZE,
+		.rx_nrfifos = RX_NUM_FIFO, 
+		.rx_fifosize = RX_BUF_SIZE,
+		.set_lineif = scc4_lineif,
+	},
+};
+
+#ifdef CONFIG_SERIAL_CPM_CONSOLE
+/*
+ *	Print a string to the serial port trying not to disturb
+ *	any possible real use of the port...
+ *
+ *	Note that this is called with interrupts already disabled
+ */
+static void cpm_uart_console_write(struct console *co, const char *s,
+				   u_int count)
+{
+	struct uart_cpm_port *pinfo =
+	    &cpm_uart_ports[cpm_uart_port_map[co->index]];
+	unsigned int i;
+	volatile cbd_t *bdp, *bdbase;
+	volatile unsigned char *cp;
+
+	if (IS_DISCARDING(pinfo))
+		return;
+
+	/* Get the address of the host memory buffer.
+	 */
+	bdp = pinfo->tx_cur;
+	bdbase = pinfo->tx_bd_base;
+
+	/*
+	 * Now, do each character.  This is not as bad as it looks
+	 * since this is a holding FIFO and not a transmitting FIFO.
+	 * We could add the complexity of filling the entire transmit
+	 * buffer, but we would just wait longer between accesses......
+	 */
+	for (i = 0; i < count; i++, s++) {
+		/* Wait for transmitter fifo to empty.
+		 * Ready indicates output is ready, and xmt is doing
+		 * that, not that it is ready for us to send.
+		 */
+		while ((bdp->cbd_sc & BD_SC_READY) != 0)
+			;
+
+		/* Send the character out.
+		 * If the buffer address is in the CPM DPRAM, don't
+		 * convert it.
+		 */
+		if ((uint) (bdp->cbd_bufaddr) > (uint) CPM_ADDR)
+			cp = (unsigned char *) (bdp->cbd_bufaddr);
+		else
+			cp = bus_to_virt(bdp->cbd_bufaddr);
+		
+		*cp = *s;
+
+		bdp->cbd_datlen = 1;
+		bdp->cbd_sc |= BD_SC_READY;
+
+		if (bdp->cbd_sc & BD_SC_WRAP)
+			bdp = bdbase;
+		else
+			bdp++;
+
+		/* if a LF, also do CR... */
+		if (*s == 10) {
+			while ((bdp->cbd_sc & BD_SC_READY) != 0)
+				;
+
+			if ((uint) (bdp->cbd_bufaddr) > (uint) CPM_ADDR)
+				cp = (unsigned char *) (bdp->cbd_bufaddr);
+			else
+				cp = bus_to_virt(bdp->cbd_bufaddr);
+
+			*cp = 13;
+			bdp->cbd_datlen = 1;
+			bdp->cbd_sc |= BD_SC_READY;
+
+			if (bdp->cbd_sc & BD_SC_WRAP)
+				bdp = bdbase;
+			else
+				bdp++;
+		}
+	}
+
+	/*
+	 * Finally, Wait for transmitter & holding register to empty
+	 *  and restore the IER
+	 */
+	while ((bdp->cbd_sc & BD_SC_READY) != 0)
+		;
+
+	pinfo->tx_cur = (volatile cbd_t *) bdp;
+}
+
+/*
+ * Setup console. Be careful is called early !
+ */
+static int __init cpm_uart_console_setup(struct console *co, char *options)
+{
+	struct uart_port *port;
+	struct uart_cpm_port *pinfo;
+	int baud = 38400;
+	int bits = 8;
+	int parity = 'n';
+	int flow = 'n';
+	int ret;
+
+	port =
+	    (struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]];
+	pinfo = (struct uart_cpm_port *)port;
+	
+	pinfo->flags |= FLAG_CONSOLE;
+
+	if (options) {
+		uart_parse_options(options, &baud, &parity, &bits, &flow);
+	} else {
+		bd_t *bd = (bd_t *) __res;
+
+		if (bd->bi_baudrate)
+			baud = bd->bi_baudrate;
+		else
+			baud = 9600;
+	}
+
+	/*
+	 * Setup any port IO, connect any baud rate generators,
+	 * etc.  This is expected to be handled by board
+	 * dependant code 
+	 */
+	if (pinfo->set_lineif)
+		pinfo->set_lineif(pinfo);
+
+	ret = cpm_uart_allocbuf(pinfo, 1);
+	if (ret)
+		return ret;
+
+	uart_set_options(port, co, baud, parity, bits, flow);
+
+	return 0;
+}
+
+extern struct uart_driver cpm_reg;
+static struct console cpm_scc_uart_console = {
+	.name		"ttyCPM",
+	.write		cpm_uart_console_write,
+	.device		uart_console_device,
+	.setup		cpm_uart_console_setup,
+	.flags		CON_PRINTBUFFER,
+	.index		-1,
+	.data		= &cpm_reg,
+};
+
+int __init cpm_uart_console_init(void)
+{
+	int ret = cpm_uart_init_portdesc();
+
+	if (!ret)
+		register_console(&cpm_scc_uart_console);
+	return ret;
+}
+
+console_initcall(cpm_uart_console_init);
+
+#define CPM_UART_CONSOLE	&cpm_scc_uart_console
+#else
+#define CPM_UART_CONSOLE	NULL
+#endif
+
+static struct uart_driver cpm_reg = {
+	.owner		= THIS_MODULE,
+	.driver_name	= "ttyCPM",
+	.dev_name	= "ttyCPM",
+	.major		= SERIAL_CPM_MAJOR,
+	.minor		= SERIAL_CPM_MINOR,
+	.cons		= CPM_UART_CONSOLE,
+};
+
+static int __init cpm_uart_init(void)
+{
+	int ret, i;
+
+	printk(KERN_INFO "Serial: CPM driver $Revision: 0.01 $\n");
+
+#ifndef CONFIG_SERIAL_CPM_CONSOLE
+	ret = cpm_uart_init_portdesc();
+	if (ret)
+		return ret;
+#endif
+
+	cpm_reg.nr = cpm_uart_nr;
+	ret = uart_register_driver(&cpm_reg);
+
+	if (ret)
+		return ret;
+
+	for (i = 0; i < cpm_uart_nr; i++) {
+		int con = cpm_uart_port_map[i];
+		cpm_uart_ports[con].port.line = i;
+		cpm_uart_ports[con].port.flags = UPF_BOOT_AUTOCONF;
+		uart_add_one_port(&cpm_reg, &cpm_uart_ports[con].port);
+	}
+
+	return ret;
+}
+
+static void __exit cpm_uart_exit(void)
+{
+	int i;
+
+	for (i = 0; i < cpm_uart_nr; i++) {
+		int con = cpm_uart_port_map[i];
+		uart_remove_one_port(&cpm_reg, &cpm_uart_ports[con].port);
+	}
+
+	uart_unregister_driver(&cpm_reg);
+}
+
+module_init(cpm_uart_init);
+module_exit(cpm_uart_exit);
+
+MODULE_AUTHOR("Kumar Gala/Antoniou Pantelis");
+MODULE_DESCRIPTION("CPM SCC/SMC port driver $Revision: 0.01 $");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS_CHARDEV(SERIAL_CPM_MAJOR, SERIAL_CPM_MINOR);
--- diff/drivers/serial/cpm_uart/cpm_uart_cpm1.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/serial/cpm_uart/cpm_uart_cpm1.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,275 @@
+/*
+ *  linux/drivers/serial/cpm_uart.c
+ *
+ *  Driver for CPM (SCC/SMC) serial ports; CPM1 definitions
+ *
+ *  Maintainer: Kumar Gala (kumar.gala@freescale.com) (CPM2)
+ *              Pantelis Antoniou (panto@intracom.gr) (CPM1)
+ * 
+ *  Copyright (C) 2004 Freescale Semiconductor, Inc.
+ *            (C) 2004 Intracom, S.A.
+ *
+ * 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/config.h>
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/ioport.h>
+#include <linux/init.h>
+#include <linux/serial.h>
+#include <linux/console.h>
+#include <linux/sysrq.h>
+#include <linux/device.h>
+#include <linux/bootmem.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+
+#include <linux/serial_core.h>
+#include <linux/kernel.h>
+
+#include "cpm_uart.h"
+
+/**************************************************************/
+
+void cpm_line_cr_cmd(int line, int cmd)
+{
+	ushort val;
+	volatile cpm8xx_t *cp = cpmp;
+
+	switch (line) {
+	case UART_SMC1:
+		val = mk_cr_cmd(CPM_CR_CH_SMC1, cmd) | CPM_CR_FLG;
+		break;
+	case UART_SMC2:
+		val = mk_cr_cmd(CPM_CR_CH_SMC2, cmd) | CPM_CR_FLG;
+		break;
+	case UART_SCC1:
+		val = mk_cr_cmd(CPM_CR_CH_SCC1, cmd) | CPM_CR_FLG;
+		break;
+	case UART_SCC2:
+		val = mk_cr_cmd(CPM_CR_CH_SCC2, cmd) | CPM_CR_FLG;
+		break;
+	case UART_SCC3:
+		val = mk_cr_cmd(CPM_CR_CH_SCC3, cmd) | CPM_CR_FLG;
+		break;
+	case UART_SCC4:
+		val = mk_cr_cmd(CPM_CR_CH_SCC4, cmd) | CPM_CR_FLG;
+		break;
+	default:
+		return;
+
+	}
+	cp->cp_cpcr = val;
+	while (cp->cp_cpcr & CPM_CR_FLG) ;
+}
+
+void smc1_lineif(struct uart_cpm_port *pinfo)
+{
+	volatile cpm8xx_t *cp = cpmp;
+
+	cp->cp_pbpar |= 0x000000c0;
+	cp->cp_pbdir &= ~0x000000c0;
+	cp->cp_pbodr &= ~0x000000c0;
+
+	pinfo->brg = 1;
+}
+
+void smc2_lineif(struct uart_cpm_port *pinfo)
+{
+	/* XXX SMC2: insert port configuration here */
+	pinfo->brg = 2;
+}
+
+void scc1_lineif(struct uart_cpm_port *pinfo)
+{
+	/* XXX SCC1: insert port configuration here */
+	pinfo->brg = 1;
+}
+
+void scc2_lineif(struct uart_cpm_port *pinfo)
+{
+	/* XXX SCC2: insert port configuration here */
+	pinfo->brg = 2;
+}
+
+void scc3_lineif(struct uart_cpm_port *pinfo)
+{
+	/* XXX SCC3: insert port configuration here */
+	pinfo->brg = 3;
+}
+
+void scc4_lineif(struct uart_cpm_port *pinfo)
+{
+	/* XXX SCC4: insert port configuration here */
+	pinfo->brg = 4;
+}
+
+/*
+ * Allocate DP-Ram and memory buffers. We need to allocate a transmit and 
+ * receive buffer descriptors from dual port ram, and a character
+ * buffer area from host mem. If we are allocating for the console we need
+ * to do it from bootmem
+ */
+int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
+{
+	int dpmemsz, memsz;
+	u8 *dp_mem;
+	uint dp_addr;
+	u8 *mem_addr;
+	dma_addr_t dma_addr;
+
+	pr_debug("CPM uart[%d]:allocbuf\n", pinfo->port.line);
+
+	dpmemsz = sizeof(cbd_t) * (pinfo->rx_nrfifos + pinfo->tx_nrfifos);
+	dp_mem = m8xx_cpm_dpalloc(dpmemsz);
+	if (dp_mem == NULL) {
+		printk(KERN_ERR
+		       "cpm_uart_cpm1.c: could not allocate buffer descriptors\n");
+		return -ENOMEM;
+	}
+	dp_addr = m8xx_cpm_dpram_offset(dp_mem);
+
+	memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) +
+	    L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
+	if (is_con) {
+		mem_addr = (u8 *) m8xx_cpm_hostalloc(memsz);
+		dma_addr = 0;
+	} else
+		mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr,
+					      GFP_KERNEL);
+
+	if (mem_addr == NULL) {
+		m8xx_cpm_dpfree(dp_mem);
+		printk(KERN_ERR
+		       "cpm_uart_cpm1.c: could not allocate coherent memory\n");
+		return -ENOMEM;
+	}
+
+	pinfo->dp_addr = dp_addr;
+	pinfo->mem_addr = mem_addr;
+	pinfo->dma_addr = dma_addr;
+
+	pinfo->rx_buf = mem_addr;
+	pinfo->tx_buf = pinfo->rx_buf + L1_CACHE_ALIGN(pinfo->rx_nrfifos
+						       * pinfo->rx_fifosize);
+
+	pinfo->rx_bd_base = (volatile cbd_t *)dp_mem;
+	pinfo->tx_bd_base = pinfo->rx_bd_base + pinfo->rx_nrfifos;
+
+	return 0;
+}
+
+void cpm_uart_freebuf(struct uart_cpm_port *pinfo)
+{
+	dma_free_coherent(NULL, L1_CACHE_ALIGN(pinfo->rx_nrfifos *
+					       pinfo->rx_fifosize) +
+			  L1_CACHE_ALIGN(pinfo->tx_nrfifos *
+					 pinfo->tx_fifosize), pinfo->mem_addr,
+			  pinfo->dma_addr);
+
+	m8xx_cpm_dpfree(m8xx_cpm_dpram_addr(pinfo->dp_addr));
+}
+
+/* Setup any dynamic params in the uart desc */
+int cpm_uart_init_portdesc(void)
+{
+	pr_debug("CPM uart[-]:init portdesc\n");
+
+	cpm_uart_nr = 0;
+#ifdef CONFIG_SERIAL_CPM_SMC1
+	cpm_uart_ports[UART_SMC1].smcp = &cpmp->cp_smc[0];
+	cpm_uart_ports[UART_SMC1].smcup =
+	    (smc_uart_t *) & cpmp->cp_dparam[PROFF_SMC1];
+	cpm_uart_ports[UART_SMC1].port.mapbase =
+	    (unsigned long)&cpmp->cp_smc[0];
+	cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX);
+	cpm_uart_ports[UART_SMC1].smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
+	cpm_uart_ports[UART_SMC1].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SMC1;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SMC2
+	cpm_uart_ports[UART_SMC2].smcp = &cpmp->cp_smc[1];
+	cpm_uart_ports[UART_SMC2].smcup =
+	    (smc_uart_t *) & cpmp->cp_dparam[PROFF_SMC2];
+	cpm_uart_ports[UART_SMC2].port.mapbase =
+	    (unsigned long)&cpmp->cp_smc[1];
+	cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX);
+	cpm_uart_ports[UART_SMC2].smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
+	cpm_uart_ports[UART_SMC2].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SMC2;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SCC1
+	cpm_uart_ports[UART_SCC1].sccp = &cpmp->cp_scc[0];
+	cpm_uart_ports[UART_SCC1].sccup =
+	    (scc_uart_t *) & cpmp->cp_dparam[PROFF_SCC1];
+	cpm_uart_ports[UART_SCC1].port.mapbase =
+	    (unsigned long)&cpmp->cp_scc[0];
+	cpm_uart_ports[UART_SCC1].sccp->scc_sccm &=
+	    ~(UART_SCCM_TX | UART_SCCM_RX);
+	cpm_uart_ports[UART_SCC1].sccp->scc_gsmrl &=
+	    ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+	cpm_uart_ports[UART_SCC1].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SCC1;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SCC2
+	cpm_uart_ports[UART_SCC2].sccp = &cpmp->cp_scc[1];
+	cpm_uart_ports[UART_SCC2].sccup =
+	    (scc_uart_t *) & cpmp->cp_dparam[PROFF_SCC2];
+	cpm_uart_ports[UART_SCC2].port.mapbase =
+	    (unsigned long)&cpmp->cp_scc[1];
+	cpm_uart_ports[UART_SCC2].sccp->scc_sccm &=
+	    ~(UART_SCCM_TX | UART_SCCM_RX);
+	cpm_uart_ports[UART_SCC2].sccp->scc_gsmrl &=
+	    ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+	cpm_uart_ports[UART_SCC2].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SCC2;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SCC3
+	cpm_uart_ports[UART_SCC3].sccp = &cpmp->cp_scc[2];
+	cpm_uart_ports[UART_SCC3].sccup =
+	    (scc_uart_t *) & cpmp->cp_dparam[PROFF_SCC3];
+	cpm_uart_ports[UART_SCC3].port.mapbase =
+	    (unsigned long)&cpmp->cp_scc[2];
+	cpm_uart_ports[UART_SCC3].sccp->scc_sccm &=
+	    ~(UART_SCCM_TX | UART_SCCM_RX);
+	cpm_uart_ports[UART_SCC3].sccp->scc_gsmrl &=
+	    ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+	cpm_uart_ports[UART_SCC3].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SCC3;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SCC4
+	cpm_uart_ports[UART_SCC4].sccp = &cpmp->cp_scc[3];
+	cpm_uart_ports[UART_SCC4].sccup =
+	    (scc_uart_t *) & cpmp->cp_dparam[PROFF_SCC4];
+	cpm_uart_ports[UART_SCC4].port.mapbase =
+	    (unsigned long)&cpmp->cp_scc[3];
+	cpm_uart_ports[UART_SCC4].sccp->scc_sccm &=
+	    ~(UART_SCCM_TX | UART_SCCM_RX);
+	cpm_uart_ports[UART_SCC4].sccp->scc_gsmrl &=
+	    ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+	cpm_uart_ports[UART_SCC4].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SCC4;
+#endif
+	return 0;
+}
--- diff/drivers/serial/cpm_uart/cpm_uart_cpm1.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/serial/cpm_uart/cpm_uart_cpm1.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,45 @@
+/*
+ * linux/drivers/serial/cpm_uart_cpm1.h
+ *
+ * Driver for CPM (SCC/SMC) serial ports
+ * 
+ * definitions for cpm1
+ *
+ */
+
+#ifndef CPM_UART_CPM1_H
+#define CPM_UART_CPM1_H
+
+#include <asm/commproc.h>
+
+/* defines for IRQs */
+#define SMC1_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SMC1)
+#define SMC2_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SMC2)
+#define SCC1_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SCC1)
+#define SCC2_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SCC2)
+#define SCC3_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SCC3)
+#define SCC4_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SCC4)
+
+/* the CPM address */
+#define CPM_ADDR	IMAP_ADDR
+
+static inline void cpm_set_brg(int brg, int baud)
+{
+	m8xx_cpm_setbrg(brg, baud);
+}
+
+static inline void cpm_set_scc_fcr(volatile scc_uart_t * sup)
+{
+	sup->scc_genscc.scc_rfcr = SMC_EB;
+	sup->scc_genscc.scc_tfcr = SMC_EB;
+}
+
+static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
+{
+	up->smc_rfcr = SMC_EB;
+	up->smc_tfcr = SMC_EB;
+}
+
+#define DPRAM_BASE	((unsigned char *)&cpmp->cp_dpmem[0])
+
+#endif
--- diff/drivers/serial/cpm_uart/cpm_uart_cpm2.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/serial/cpm_uart/cpm_uart_cpm2.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,328 @@
+/*
+ *  linux/drivers/serial/cpm_uart_cpm2.c
+ *
+ *  Driver for CPM (SCC/SMC) serial ports; CPM2 definitions
+ *
+ *  Maintainer: Kumar Gala (kumar.gala@freescale.com) (CPM2)
+ *              Pantelis Antoniou (panto@intracom.gr) (CPM1)
+ * 
+ *  Copyright (C) 2004 Freescale Semiconductor, Inc.
+ *            (C) 2004 Intracom, S.A.
+ *
+ * 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/config.h>
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/ioport.h>
+#include <linux/init.h>
+#include <linux/serial.h>
+#include <linux/console.h>
+#include <linux/sysrq.h>
+#include <linux/device.h>
+#include <linux/bootmem.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+
+#include <linux/serial_core.h>
+#include <linux/kernel.h>
+
+#include "cpm_uart.h"
+
+/**************************************************************/
+
+void cpm_line_cr_cmd(int line, int cmd)
+{
+	volatile cpm_cpm2_t *cp = cpmp;
+	ulong val;
+
+	switch (line) {
+	case UART_SMC1:
+		val = mk_cr_cmd(CPM_CR_SMC1_PAGE, CPM_CR_SMC1_SBLOCK, 0,
+				cmd) | CPM_CR_FLG;
+		break;
+	case UART_SMC2:
+		val = mk_cr_cmd(CPM_CR_SMC2_PAGE, CPM_CR_SMC2_SBLOCK, 0,
+				cmd) | CPM_CR_FLG;
+		break;
+	case UART_SCC1:
+		val = mk_cr_cmd(CPM_CR_SCC1_PAGE, CPM_CR_SCC1_SBLOCK, 0,
+				cmd) | CPM_CR_FLG;
+		break;
+	case UART_SCC2:
+		val = mk_cr_cmd(CPM_CR_SCC2_PAGE, CPM_CR_SCC2_SBLOCK, 0,
+				cmd) | CPM_CR_FLG;
+		break;
+	case UART_SCC3:
+		val = mk_cr_cmd(CPM_CR_SCC3_PAGE, CPM_CR_SCC3_SBLOCK, 0,
+				cmd) | CPM_CR_FLG;
+		break;
+	case UART_SCC4:
+		val = mk_cr_cmd(CPM_CR_SCC4_PAGE, CPM_CR_SCC4_SBLOCK, 0,
+				cmd) | CPM_CR_FLG;
+		break;
+	default:
+		return;
+
+	}
+	cp->cp_cpcr = val;
+	while (cp->cp_cpcr & CPM_CR_FLG) ;
+}
+
+void smc1_lineif(struct uart_cpm_port *pinfo)
+{
+	volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
+
+	/* SMC1 is only on port D */
+	io->iop_ppard |= 0x00c00000;
+	io->iop_pdird |= 0x00400000;
+	io->iop_pdird &= ~0x00800000;
+	io->iop_psord &= ~0x00c00000;
+
+	/* Wire BRG1 to SMC1 */
+	cpm2_immr->im_cpmux.cmx_smr &= 0x0f;
+	pinfo->brg = 1;
+}
+
+void smc2_lineif(struct uart_cpm_port *pinfo)
+{
+	volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
+
+	/* SMC2 is only on port A */
+	io->iop_ppara |= 0x00c00000;
+	io->iop_pdira |= 0x00400000;
+	io->iop_pdira &= ~0x00800000;
+	io->iop_psora &= ~0x00c00000;
+
+	/* Wire BRG2 to SMC2 */
+	cpm2_immr->im_cpmux.cmx_smr &= 0xf0;
+	pinfo->brg = 2;
+}
+
+void scc1_lineif(struct uart_cpm_port *pinfo)
+{
+	volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
+
+	/* Use Port D for SCC1 instead of other functions.  */
+	io->iop_ppard |= 0x00000003;
+	io->iop_psord &= ~0x00000001;	/* Rx */
+	io->iop_psord |= 0x00000002;	/* Tx */
+	io->iop_pdird &= ~0x00000001;	/* Rx */
+	io->iop_pdird |= 0x00000002;	/* Tx */
+
+	/* Wire BRG1 to SCC1 */
+	cpm2_immr->im_cpmux.cmx_scr &= ~0x00ffffff;
+	cpm2_immr->im_cpmux.cmx_scr |= 0x00000000;
+	pinfo->brg = 1;
+}
+
+void scc2_lineif(struct uart_cpm_port *pinfo)
+{
+	volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
+	io->iop_pparb |= 0x008b0000;
+	io->iop_pdirb |= 0x00880000;
+	io->iop_psorb |= 0x00880000;
+	io->iop_pdirb &= ~0x00030000;
+	io->iop_psorb &= ~0x00030000;
+	cpm2_immr->im_cpmux.cmx_scr &= ~0xff00ffff;
+	cpm2_immr->im_cpmux.cmx_scr |= 0x00090000;
+	pinfo->brg = 2;
+}
+
+void scc3_lineif(struct uart_cpm_port *pinfo)
+{
+	volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
+	io->iop_pparb |= 0x008b0000;
+	io->iop_pdirb |= 0x00880000;
+	io->iop_psorb |= 0x00880000;
+	io->iop_pdirb &= ~0x00030000;
+	io->iop_psorb &= ~0x00030000;
+	cpm2_immr->im_cpmux.cmx_scr &= ~0xffff00ff;
+	cpm2_immr->im_cpmux.cmx_scr |= 0x00001200;
+	pinfo->brg = 3;
+}
+
+void scc4_lineif(struct uart_cpm_port *pinfo)
+{
+	volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
+
+	io->iop_ppard |= 0x00000600;
+	io->iop_psord &= ~0x00000600;	/* Tx/Rx */
+	io->iop_pdird &= ~0x00000200;	/* Rx */
+	io->iop_pdird |= 0x00000400;	/* Tx */
+
+	cpm2_immr->im_cpmux.cmx_scr &= ~0xffffff00;
+	cpm2_immr->im_cpmux.cmx_scr |= 0x0000001b;
+	pinfo->brg = 4;
+}
+
+/*
+ * Allocate DP-Ram and memory buffers. We need to allocate a transmit and 
+ * receive buffer descriptors from dual port ram, and a character
+ * buffer area from host mem. If we are allocating for the console we need
+ * to do it from bootmem
+ */
+int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
+{
+	int dpmemsz, memsz;
+	u8 *dp_mem;
+	uint dp_addr;
+	u8 *mem_addr;
+	dma_addr_t dma_addr = 0;
+
+	pr_debug("CPM uart[%d]:allocbuf\n", pinfo->port.line);
+
+	dpmemsz = sizeof(cbd_t) * (pinfo->rx_nrfifos + pinfo->tx_nrfifos);
+	dp_mem = cpm2_dpalloc(dpmemsz, 8);
+	if (dp_mem == NULL) {
+		printk(KERN_ERR
+		       "cpm_uart_cpm1.c: could not allocate buffer descriptors\n");
+		return -ENOMEM;
+	}
+
+	dp_addr = cpm2_dpram_offset(dp_mem);
+
+	memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) +
+	    L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
+	if (is_con)
+		mem_addr = alloc_bootmem(memsz);
+	else
+		mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr,
+					      GFP_KERNEL);
+
+	if (mem_addr == NULL) {
+		cpm2_dpfree(dp_mem);
+		printk(KERN_ERR
+		       "cpm_uart_cpm1.c: could not allocate coherent memory\n");
+		return -ENOMEM;
+	}
+
+	pinfo->dp_addr = dp_addr;
+	pinfo->mem_addr = mem_addr;
+	pinfo->dma_addr = dma_addr;
+
+	pinfo->rx_buf = mem_addr;
+	pinfo->tx_buf = pinfo->rx_buf + L1_CACHE_ALIGN(pinfo->rx_nrfifos
+						       * pinfo->rx_fifosize);
+
+	pinfo->rx_bd_base = (volatile cbd_t *)dp_mem;
+	pinfo->tx_bd_base = pinfo->rx_bd_base + pinfo->rx_nrfifos;
+
+	return 0;
+}
+
+void cpm_uart_freebuf(struct uart_cpm_port *pinfo)
+{
+	dma_free_coherent(NULL, L1_CACHE_ALIGN(pinfo->rx_nrfifos *
+					       pinfo->rx_fifosize) +
+			  L1_CACHE_ALIGN(pinfo->tx_nrfifos *
+					 pinfo->tx_fifosize), pinfo->mem_addr,
+			  pinfo->dma_addr);
+
+	cpm2_dpfree(&pinfo->dp_addr);
+}
+
+/* Setup any dynamic params in the uart desc */
+int cpm_uart_init_portdesc(void)
+{
+	pr_debug("CPM uart[-]:init portdesc\n");
+
+	cpm_uart_nr = 0;
+#ifdef CONFIG_SERIAL_CPM_SMC1
+	cpm_uart_ports[UART_SMC1].smcp = (smc_t *) & cpm2_immr->im_smc[0];
+	cpm_uart_ports[UART_SMC1].smcup =
+	    (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC1];
+	cpm_uart_ports[UART_SMC1].port.mapbase =
+	    (unsigned long)&cpm2_immr->im_smc[0];
+	cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX);
+	cpm_uart_ports[UART_SMC1].smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
+	cpm_uart_ports[UART_SMC1].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SMC1;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SMC2
+	cpm_uart_ports[UART_SMC2].smcp = (smc_t *) & cpm2_immr->im_smc[1];
+	cpm_uart_ports[UART_SMC2].smcup =
+	    (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC2];
+	cpm_uart_ports[UART_SMC2].port.mapbase =
+	    (unsigned long)&cpm2_immr->im_smc[1];
+	cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX);
+	cpm_uart_ports[UART_SMC2].smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
+	cpm_uart_ports[UART_SMC2].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SMC2;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SCC1
+	cpm_uart_ports[UART_SCC1].sccp = (scc_t *) & cpm2_immr->im_scc[0];
+	cpm_uart_ports[UART_SCC1].sccup =
+	    (scc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SCC1];
+	cpm_uart_ports[UART_SCC1].port.mapbase =
+	    (unsigned long)&cpm2_immr->im_scc[0];
+	cpm_uart_ports[UART_SCC1].sccp->scc_sccm &=
+	    ~(UART_SCCM_TX | UART_SCCM_RX);
+	cpm_uart_ports[UART_SCC1].sccp->scc_gsmrl &=
+	    ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+	cpm_uart_ports[UART_SCC1].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SCC1;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SCC2
+	cpm_uart_ports[UART_SCC2].sccp = (scc_t *) & cpm2_immr->im_scc[1];
+	cpm_uart_ports[UART_SCC2].sccup =
+	    (scc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SCC2];
+	cpm_uart_ports[UART_SCC2].port.mapbase =
+	    (unsigned long)&cpm2_immr->im_scc[1];
+	cpm_uart_ports[UART_SCC2].sccp->scc_sccm &=
+	    ~(UART_SCCM_TX | UART_SCCM_RX);
+	cpm_uart_ports[UART_SCC2].sccp->scc_gsmrl &=
+	    ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+	cpm_uart_ports[UART_SCC2].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SCC2;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SCC3
+	cpm_uart_ports[UART_SCC3].sccp = (scc_t *) & cpm2_immr->im_scc[2];
+	cpm_uart_ports[UART_SCC3].sccup =
+	    (scc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SCC3];
+	cpm_uart_ports[UART_SCC3].port.mapbase =
+	    (unsigned long)&cpm2_immr->im_scc[2];
+	cpm_uart_ports[UART_SCC3].sccp->scc_sccm &=
+	    ~(UART_SCCM_TX | UART_SCCM_RX);
+	cpm_uart_ports[UART_SCC3].sccp->scc_gsmrl &=
+	    ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+	cpm_uart_ports[UART_SCC3].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SCC3;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SCC4
+	cpm_uart_ports[UART_SCC4].sccp = (scc_t *) & cpm2_immr->im_scc[3];
+	cpm_uart_ports[UART_SCC4].sccup =
+	    (scc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SCC4];
+	cpm_uart_ports[UART_SCC4].port.mapbase =
+	    (unsigned long)&cpm2_immr->im_scc[3];
+	cpm_uart_ports[UART_SCC4].sccp->scc_sccm &=
+	    ~(UART_SCCM_TX | UART_SCCM_RX);
+	cpm_uart_ports[UART_SCC4].sccp->scc_gsmrl &=
+	    ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+	cpm_uart_ports[UART_SCC4].port.uartclk = (((bd_t *) __res)->bi_intfreq);
+	cpm_uart_port_map[cpm_uart_nr++] = UART_SCC4;
+#endif
+
+	return 0;
+}
--- diff/drivers/serial/cpm_uart/cpm_uart_cpm2.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/serial/cpm_uart/cpm_uart_cpm2.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,45 @@
+/*
+ * linux/drivers/serial/cpm_uart_cpm2.h
+ *
+ * Driver for CPM (SCC/SMC) serial ports
+ * 
+ * definitions for cpm2
+ *
+ */
+
+#ifndef CPM_UART_CPM2_H
+#define CPM_UART_CPM2_H
+
+#include <asm/cpm2.h>
+
+/* defines for IRQs */
+#define SMC1_IRQ	SIU_INT_SMC1
+#define SMC2_IRQ	SIU_INT_SMC2
+#define SCC1_IRQ	SIU_INT_SCC1
+#define SCC2_IRQ	SIU_INT_SCC2
+#define SCC3_IRQ	SIU_INT_SCC3
+#define SCC4_IRQ	SIU_INT_SCC4
+
+/* the CPM address */
+#define CPM_ADDR	CPM_MAP_ADDR
+
+static inline void cpm_set_brg(int brg, int baud)
+{
+	cpm2_setbrg(brg, baud);
+}
+
+static inline void cpm_set_scc_fcr(volatile scc_uart_t * sup)
+{
+	sup->scc_genscc.scc_rfcr = CPMFCR_GBL | CPMFCR_EB;
+	sup->scc_genscc.scc_tfcr = CPMFCR_GBL | CPMFCR_EB;
+}
+
+static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
+{
+	up->smc_rfcr = CPMFCR_GBL | CPMFCR_EB;
+	up->smc_tfcr = CPMFCR_GBL | CPMFCR_EB;
+}
+
+#define DPRAM_BASE	((unsigned char *)&cpm2_immr->im_dprambase[0])
+
+#endif
--- diff/drivers/serial/serial_lh7a40x.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/serial/serial_lh7a40x.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,708 @@
+/* drivers/serial/serial_lh7a40x.c
+ *
+ *  Copyright (C) 2004 Coastal Environmental Systems
+ *
+ *  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.
+ *
+ */
+
+/* Driver for Sharp LH7A40X embedded serial ports
+ *
+ *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
+ *  Based on drivers/serial/amba.c, by Deep Blue Solutions Ltd.
+ *
+ *  ---
+ *
+ * This driver supports the embedded UARTs of the Sharp LH7A40X series
+ * CPUs.  While similar to the 16550 and other UART chips, there is
+ * nothing close to register compatibility.  Moreover, some of the
+ * modem control lines are not available, either in the chip or they
+ * are lacking in the board-level implementation.
+ *
+ * - Use of SIRDIS
+ *   For simplicity, we disable the IR functions of any UART whenever
+ *   we enable it.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/ioport.h>
+#include <linux/init.h>
+#include <linux/serial.h>
+#include <linux/console.h>
+#include <linux/sysrq.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+
+#if defined(CONFIG_SERIAL_LH7A40X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+#define SUPPORT_SYSRQ
+#endif
+
+#include <linux/serial_core.h>
+
+#include <asm/arch/serial.h>
+
+#define DEV_MAJOR	204
+#define DEV_MINOR	16
+#define DEV_NR		3
+
+#define ISR_LOOP_LIMIT	256
+
+#define UR(p,o)	_UR ((p)->membase, o)
+#define _UR(b,o) (*((volatile unsigned int*)(((unsigned char*) b) + (o))))
+#define BIT_CLR(p,o,m)	UR(p,o) = UR(p,o) & (~(unsigned int)m)
+#define BIT_SET(p,o,m)	UR(p,o) = UR(p,o) | ( (unsigned int)m)
+
+#define UART_REG_SIZE	32
+
+#define UARTEN		(0x01)		/* UART enable */
+#define SIRDIS		(0x02)		/* Serial IR disable (UART1 only) */
+
+#define RxEmpty		(0x10)
+#define TxEmpty		(0x80)
+#define TxFull		(0x20)
+#define nRxRdy		RxEmpty
+#define nTxRdy		TxFull
+#define TxBusy		(0x08)
+
+#define RxBreak		(0x0800)
+#define RxOverrunError	(0x0400)
+#define RxParityError	(0x0200)
+#define RxFramingError	(0x0100)
+#define RxError     (RxBreak | RxOverrunError | RxParityError | RxFramingError)
+
+#define DCD		(0x04)
+#define DSR		(0x02)
+#define CTS		(0x01)
+
+#define RxInt		(0x01)
+#define TxInt		(0x02)
+#define ModemInt	(0x04)
+#define RxTimeoutInt	(0x08)
+
+#define MSEOI		(0x10)
+
+#define WLEN_8		(0x60)
+#define WLEN_7		(0x40)
+#define WLEN_6		(0x20)
+#define WLEN_5		(0x00)
+#define WLEN		(0x60)	/* Mask for all word-length bits */
+#define STP2		(0x08)
+#define PEN		(0x02)	/* Parity Enable */
+#define EPS		(0x04)	/* Even Parity Set */
+#define FEN		(0x10)	/* FIFO Enable */
+#define BRK		(0x01)	/* Send Break */
+
+
+struct uart_port_lh7a40x {
+	struct uart_port port;
+	unsigned int statusPrev; /* Most recently read modem status */
+};
+
+static void lh7a40xuart_stop_tx (struct uart_port* port, unsigned int tty_stop)
+{
+	BIT_CLR (port, UART_R_INTEN, TxInt);
+}
+
+static void lh7a40xuart_start_tx (struct uart_port* port,
+				  unsigned int tty_start)
+{
+	BIT_SET (port, UART_R_INTEN, TxInt);
+
+	/* *** FIXME: do I need to check for startup of the
+		      transmitter?  The old driver did, but AMBA
+		      doesn't . */
+}
+
+static void lh7a40xuart_stop_rx (struct uart_port* port)
+{
+	BIT_SET (port, UART_R_INTEN, RxTimeoutInt | RxInt);
+}
+
+static void lh7a40xuart_enable_ms (struct uart_port* port)
+{
+	BIT_SET (port, UART_R_INTEN, ModemInt);
+}
+
+static void
+#ifdef SUPPORT_SYSRQ
+lh7a40xuart_rx_chars (struct uart_port* port, struct pt_regs* regs)
+#else
+lh7a40xuart_rx_chars (struct uart_port* port)
+#endif
+{
+	struct tty_struct* tty = port->info->tty;
+	int cbRxMax = 256;	/* (Gross) limit on receive */
+	unsigned int data;	/* Received data and status */
+
+	while (!(UR (port, UART_R_STATUS) & nRxRdy) && --cbRxMax) {
+		if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+			tty->flip.work.func((void*)tty);
+			if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+				printk(KERN_WARNING "TTY_DONT_FLIP set\n");
+				return;
+			}
+		}
+
+		data = UR (port, UART_R_DATA);
+
+		*tty->flip.char_buf_ptr = (unsigned char) data;
+		*tty->flip.flag_buf_ptr = TTY_NORMAL;
+		++port->icount.rx;
+
+		if (data & RxError) {	/* Quick check, short-circuit */
+			if (data & RxBreak) {
+				data &= ~(RxFramingError | RxParityError);
+				++port->icount.brk;
+				if (uart_handle_break (port))
+					continue;
+			}
+			else if (data & RxParityError)
+				++port->icount.parity;
+			else if (data & RxFramingError)
+				++port->icount.frame;
+			if (data & RxOverrunError)
+				++port->icount.overrun;
+
+				/* Mask by termios, leave Rx'd byte */
+			data &= port->read_status_mask | 0xff;
+
+			if (data & RxBreak)
+				*tty->flip.flag_buf_ptr = TTY_BREAK;
+			else if (data & RxParityError)
+				*tty->flip.flag_buf_ptr = TTY_PARITY;
+			else if (data & RxFramingError)
+				*tty->flip.flag_buf_ptr = TTY_FRAME;
+		}
+
+		if (uart_handle_sysrq_char (port, (unsigned char) data, regs))
+			continue;
+
+		if ((data & port->ignore_status_mask) == 0) {
+			++tty->flip.flag_buf_ptr;
+			++tty->flip.char_buf_ptr;
+			++tty->flip.count;
+		}
+		if ((data & RxOverrunError)
+		    && tty->flip.count < TTY_FLIPBUF_SIZE) {
+			/*
+			 * Overrun is special, since it's reported
+			 * immediately, and doesn't affect the current
+			 * character
+			 */
+			*tty->flip.char_buf_ptr++ = 0;
+			*tty->flip.flag_buf_ptr++ = TTY_OVERRUN;
+			++tty->flip.count;
+		}
+	}
+	tty_flip_buffer_push (tty);
+	return;
+}
+
+static void lh7a40xuart_tx_chars (struct uart_port* port)
+{
+	struct circ_buf* xmit = &port->info->xmit;
+	int cbTxMax = port->fifosize;
+
+	if (port->x_char) {
+		UR (port, UART_R_DATA) = port->x_char;
+		++port->icount.tx;
+		port->x_char = 0;
+		return;
+	}
+	if (uart_circ_empty (xmit) || uart_tx_stopped (port)) {
+		lh7a40xuart_stop_tx (port, 0);
+		return;
+	}
+
+	/* Unlike the AMBA UART, the lh7a40x UART does not guarantee
+	   that at least half of the FIFO is empty.  Instead, we check
+	   status for every character.  Using the AMBA method causes
+	   the transmitter to drop characters. */
+
+	do {
+		UR (port, UART_R_DATA) = xmit->buf[xmit->tail];
+		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
+		++port->icount.tx;
+		if (uart_circ_empty(xmit))
+			break;
+	} while (!(UR (port, UART_R_STATUS) & nTxRdy)
+		 && cbTxMax--);
+
+	if (uart_circ_chars_pending (xmit) < WAKEUP_CHARS)
+		uart_write_wakeup (port);
+
+	if (uart_circ_empty (xmit))
+		lh7a40xuart_stop_tx (port, 0);
+}
+
+static void lh7a40xuart_modem_status (struct uart_port* port)
+{
+	unsigned int status = UR (port, UART_R_STATUS);
+	unsigned int delta
+		= status ^ ((struct uart_port_lh7a40x*) port)->statusPrev;
+
+	BIT_SET (port, UART_R_RAWISR, MSEOI); /* Clear modem status intr */
+
+	if (!delta)		/* Only happens if we missed 2 transitions */
+		return;
+
+	((struct uart_port_lh7a40x*) port)->statusPrev = status;
+
+	if (delta & DCD)
+		uart_handle_dcd_change (port, status & DCD);
+
+	if (delta & DSR)
+		++port->icount.dsr;
+
+	if (delta & CTS)
+		uart_handle_cts_change (port, status & CTS);
+
+	wake_up_interruptible (&port->info->delta_msr_wait);
+}
+
+static irqreturn_t lh7a40xuart_int (int irq, void* dev_id,
+				    struct pt_regs* regs)
+{
+	struct uart_port* port = dev_id;
+	unsigned int cLoopLimit = ISR_LOOP_LIMIT;
+	unsigned int isr = UR (port, UART_R_ISR);
+
+
+	do {
+		if (isr & (RxInt | RxTimeoutInt))
+#ifdef SUPPORT_SYSRQ
+			lh7a40xuart_rx_chars(port, regs);
+#else
+			lh7a40xuart_rx_chars(port);
+#endif
+		if (isr & ModemInt)
+			lh7a40xuart_modem_status (port);
+		if (isr & TxInt)
+			lh7a40xuart_tx_chars (port);
+
+		if (--cLoopLimit == 0)
+			break;
+
+		isr = UR (port, UART_R_ISR);
+	} while (isr & (RxInt | TxInt | RxTimeoutInt));
+
+	return IRQ_HANDLED;
+}
+
+static unsigned int lh7a40xuart_tx_empty (struct uart_port* port)
+{
+	return (UR (port, UART_R_STATUS) & TxEmpty) ? TIOCSER_TEMT : 0;
+}
+
+static unsigned int lh7a40xuart_get_mctrl (struct uart_port* port)
+{
+	unsigned int result = 0;
+	unsigned int status = UR (port, UART_R_STATUS);
+
+	if (status & DCD)
+		result |= TIOCM_CAR;
+	if (status & DSR)
+		result |= TIOCM_DSR;
+	if (status & CTS)
+		result |= TIOCM_CTS;
+
+	return result;
+}
+
+static void lh7a40xuart_set_mctrl (struct uart_port* port, unsigned int mctrl)
+{
+	/* None of the ports supports DTR. UART1 supports RTS through GPIO. */
+	/* Note, kernel appears to be setting DTR and RTS on console. */
+
+	/* *** FIXME: this deserves more work.  There's some work in
+               tracing all of the IO pins. */
+#if 0
+	if( port->mapbase == UART1_PHYS) {
+		gpioRegs_t *gpio = (gpioRegs_t *)IO_ADDRESS(GPIO_PHYS);
+
+		if (mctrl & TIOCM_RTS)
+			gpio->pbdr &= ~GPIOB_UART1_RTS;
+		else
+			gpio->pbdr |= GPIOB_UART1_RTS;
+	}
+#endif
+}
+
+static void lh7a40xuart_break_ctl (struct uart_port* port, int break_state)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&port->lock, flags);
+	if (break_state == -1)
+		BIT_SET (port, UART_R_FCON, BRK); /* Assert break */
+	else
+		BIT_CLR (port, UART_R_FCON, BRK); /* Deassert break */
+	spin_unlock_irqrestore(&port->lock, flags);
+}
+
+static int lh7a40xuart_startup (struct uart_port* port)
+{
+	int retval;
+
+	retval = request_irq (port->irq, lh7a40xuart_int, 0,
+			      "serial_lh7a40x", port);
+	if (retval)
+		return retval;
+
+				/* Initial modem control-line settings */
+	((struct uart_port_lh7a40x*) port)->statusPrev
+		= UR (port, UART_R_STATUS);
+
+	/* There is presently no configuration option to enable IR.
+	   Thus, we always disable it. */
+
+	BIT_SET (port, UART_R_CON, UARTEN | SIRDIS);
+	BIT_SET (port, UART_R_INTEN, RxTimeoutInt | RxInt);
+
+	return 0;
+}
+
+static void lh7a40xuart_shutdown (struct uart_port* port)
+{
+	free_irq (port->irq, port);
+	BIT_CLR (port, UART_R_FCON, BRK | FEN);
+	BIT_CLR (port, UART_R_CON, UARTEN);
+}
+
+static void lh7a40xuart_set_termios (struct uart_port* port,
+				     struct termios* termios,
+				     struct termios* old)
+{
+	unsigned int con;
+	unsigned int inten;
+	unsigned int fcon;
+	unsigned long flags;
+	unsigned int baud;
+	unsigned int quot;
+
+	baud = uart_get_baud_rate (port, termios, old, 8, port->uartclk/16);
+	quot = uart_get_divisor (port, baud); /* -1 performed elsewhere */
+
+	switch (termios->c_cflag & CSIZE) {
+	case CS5:
+		fcon = WLEN_5;
+		break;
+	case CS6:
+		fcon = WLEN_6;
+		break;
+	case CS7:
+		fcon = WLEN_7;
+		break;
+	case CS8:
+	default:
+		fcon = WLEN_8;
+		break;
+	}
+	if (termios->c_cflag & CSTOPB)
+		fcon |= STP2;
+	if (termios->c_cflag & PARENB) {
+		fcon |= PEN;
+		if (!(termios->c_cflag & PARODD))
+			fcon |= EPS;
+	}
+	if (port->fifosize > 1)
+		fcon |= FEN;
+
+	spin_lock_irqsave (&port->lock, flags);
+
+	uart_update_timeout (port, termios->c_cflag, baud);
+
+	port->read_status_mask = RxOverrunError;
+	if (termios->c_iflag & INPCK)
+		port->read_status_mask |= RxFramingError | RxParityError;
+	if (termios->c_iflag & (BRKINT | PARMRK))
+		port->read_status_mask |= RxBreak;
+
+		/* Figure mask for status we ignore */
+	port->ignore_status_mask = 0;
+	if (termios->c_iflag & IGNPAR)
+		port->ignore_status_mask |= RxFramingError | RxParityError;
+	if (termios->c_iflag & IGNBRK) {
+		port->ignore_status_mask |= RxBreak;
+		/* Ignore overrun when ignorning parity */
+		/* *** FIXME: is this in the right place? */
+		if (termios->c_iflag & IGNPAR)
+			port->ignore_status_mask |= RxOverrunError;
+	}
+
+		/* Ignore all receive errors when receive disabled */
+	if ((termios->c_cflag & CREAD) == 0)
+		port->ignore_status_mask |= RxError;
+
+	con   = UR (port, UART_R_CON);
+	inten = (UR (port, UART_R_INTEN) & ~ModemInt);
+
+	if (UART_ENABLE_MS (port, termios->c_cflag))
+		inten |= ModemInt;
+
+	BIT_CLR (port, UART_R_CON, UARTEN);	/* Disable UART */
+	UR (port, UART_R_INTEN) = 0;		/* Disable interrupts */
+	UR (port, UART_R_BRCON) = quot - 1;	/* Set baud rate divisor */
+	UR (port, UART_R_FCON)  = fcon;		/* Set FIFO and frame ctrl */
+	UR (port, UART_R_INTEN) = inten;	/* Enable interrupts */
+	UR (port, UART_R_CON)   = con;		/* Restore UART mode */
+
+	spin_unlock_irqrestore(&port->lock, flags);
+}
+
+static const char* lh7a40xuart_type (struct uart_port* port)
+{
+	return port->type == PORT_LH7A40X ? "LH7A40X" : NULL;
+}
+
+static void lh7a40xuart_release_port (struct uart_port* port)
+{
+	release_mem_region (port->mapbase, UART_REG_SIZE);
+}
+
+static int lh7a40xuart_request_port (struct uart_port* port)
+{
+	return request_mem_region (port->mapbase, UART_REG_SIZE,
+				   "serial_lh7a40x") != NULL
+		? 0 : -EBUSY;
+}
+
+static void lh7a40xuart_config_port (struct uart_port* port, int flags)
+{
+	if (flags & UART_CONFIG_TYPE) {
+		port->type = PORT_LH7A40X;
+		lh7a40xuart_request_port (port);
+	}
+}
+
+static int lh7a40xuart_verify_port (struct uart_port* port,
+				    struct serial_struct* ser)
+{
+	int ret = 0;
+
+	if (ser->type != PORT_UNKNOWN && ser->type != PORT_LH7A40X)
+		ret = -EINVAL;
+	if (ser->irq < 0 || ser->irq >= NR_IRQS)
+		ret = -EINVAL;
+	if (ser->baud_base < 9600) /* *** FIXME: is this true? */
+		ret = -EINVAL;
+	return ret;
+}
+
+static struct uart_ops lh7a40x_uart_ops = {
+	.tx_empty	= lh7a40xuart_tx_empty,
+	.set_mctrl	= lh7a40xuart_set_mctrl,
+	.get_mctrl	= lh7a40xuart_get_mctrl,
+	.stop_tx	= lh7a40xuart_stop_tx,
+	.start_tx	= lh7a40xuart_start_tx,
+	.stop_rx	= lh7a40xuart_stop_rx,
+	.enable_ms	= lh7a40xuart_enable_ms,
+	.break_ctl	= lh7a40xuart_break_ctl,
+	.startup	= lh7a40xuart_startup,
+	.shutdown	= lh7a40xuart_shutdown,
+	.set_termios	= lh7a40xuart_set_termios,
+	.type		= lh7a40xuart_type,
+	.release_port	= lh7a40xuart_release_port,
+	.request_port	= lh7a40xuart_request_port,
+	.config_port	= lh7a40xuart_config_port,
+	.verify_port	= lh7a40xuart_verify_port,
+};
+
+static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = {
+	{
+		.port = {
+			.membase	= (void*) io_p2v (UART1_PHYS),
+			.mapbase	= UART1_PHYS,
+			.iotype		= SERIAL_IO_MEM,
+			.irq		= IRQ_UART1INTR,
+			.uartclk	= 14745600/2,
+			.fifosize	= 16,
+			.ops		= &lh7a40x_uart_ops,
+			.flags		= ASYNC_BOOT_AUTOCONF,
+			.line		= 0,
+		},
+	},
+	{
+		.port = {
+			.membase	= (void*) io_p2v (UART2_PHYS),
+			.mapbase	= UART2_PHYS,
+			.iotype		= SERIAL_IO_MEM,
+			.irq		= IRQ_UART2INTR,
+			.uartclk	= 14745600/2,
+			.fifosize	= 16,
+			.ops		= &lh7a40x_uart_ops,
+			.flags		= ASYNC_BOOT_AUTOCONF,
+			.line		= 1,
+		},
+	},
+	{
+		.port = {
+			.membase	= (void*) io_p2v (UART3_PHYS),
+			.mapbase	= UART3_PHYS,
+			.iotype		= SERIAL_IO_MEM,
+			.irq		= IRQ_UART3INTR,
+			.uartclk	= 14745600/2,
+			.fifosize	= 16,
+			.ops		= &lh7a40x_uart_ops,
+			.flags		= ASYNC_BOOT_AUTOCONF,
+			.line		= 2,
+		},
+	},
+};
+
+#ifndef CONFIG_SERIAL_LH7A40X_CONSOLE
+# define LH7A40X_CONSOLE NULL
+#else
+# define LH7A40X_CONSOLE &lh7a40x_console
+
+
+static void lh7a40xuart_console_write (struct console* co,
+				       const char* s,
+				       unsigned int count)
+{
+	struct uart_port* port = &lh7a40x_ports[co->index].port;
+	unsigned int con = UR (port, UART_R_CON);
+	unsigned int inten = UR (port, UART_R_INTEN);
+
+
+	UR (port, UART_R_INTEN) = 0;		/* Disable all interrupts */
+	BIT_SET (port, UART_R_CON, UARTEN | SIRDIS); /* Enable UART */
+
+	for (; count-- > 0; ++s) {
+		while (UR (port, UART_R_STATUS) & nTxRdy)
+			;
+		UR (port, UART_R_DATA) = *s;
+		if (*s == '\n') {
+			while ((UR (port, UART_R_STATUS) & TxBusy))
+				;
+			UR (port, UART_R_DATA) = '\r';
+		}
+	}
+
+				/* Wait until all characters are sent */
+	while (UR (port, UART_R_STATUS) & TxBusy)
+		;
+
+				/* Restore control and interrupt mask */
+	UR (port, UART_R_CON) = con;
+	UR (port, UART_R_INTEN) = inten;
+}
+
+static void __init lh7a40xuart_console_get_options (struct uart_port* port,
+						    int* baud,
+						    int* parity,
+						    int* bits)
+{
+	if (UR (port, UART_R_CON) & UARTEN) {
+		unsigned int fcon = UR (port, UART_R_FCON);
+		unsigned int quot = UR (port, UART_R_BRCON) + 1;
+
+		switch (fcon & (PEN | EPS)) {
+		default:        *parity = 'n'; break;
+		case PEN:       *parity = 'o'; break;
+		case PEN | EPS: *parity = 'e'; break;
+		}
+
+		switch (fcon & WLEN) {
+		default:
+		case WLEN_8: *bits = 8; break;
+		case WLEN_7: *bits = 7; break;
+		case WLEN_6: *bits = 6; break;
+		case WLEN_5: *bits = 5; break;
+		}
+
+		*baud = port->uartclk/(16*quot);
+	}
+}
+
+static int __init lh7a40xuart_console_setup (struct console* co, char* options)
+{
+	struct uart_port* port;
+	int baud = 38400;
+	int bits = 8;
+	int parity = 'n';
+	int flow = 'n';
+
+	if (co->index >= DEV_NR) /* Bounds check on device number */
+		co->index = 0;
+	port = &lh7a40x_ports[co->index].port;
+
+	if (options)
+		uart_parse_options (options, &baud, &parity, &bits, &flow);
+	else
+		lh7a40xuart_console_get_options (port, &baud, &parity, &bits);
+
+	return uart_set_options (port, co, baud, parity, bits, flow);
+}
+
+extern struct uart_driver lh7a40x_reg;
+static struct console lh7a40x_console = {
+	.name		= "ttyAM",
+	.write		= lh7a40xuart_console_write,
+	.device		= uart_console_device,
+	.setup		= lh7a40xuart_console_setup,
+	.flags		= CON_PRINTBUFFER,
+	.index		= -1,
+	.data		= &lh7a40x_reg,
+};
+
+static int __init lh7a40xuart_console_init(void)
+{
+	register_console (&lh7a40x_console);
+	return 0;
+}
+
+console_initcall (lh7a40xuart_console_init);
+
+#endif
+
+static struct uart_driver lh7a40x_reg = {
+	.owner			= THIS_MODULE,
+	.driver_name		= "ttyAM",
+	.dev_name		= "ttyAM",
+	.major			= DEV_MAJOR,
+	.minor			= DEV_MINOR,
+	.nr			= DEV_NR,
+	.cons			= LH7A40X_CONSOLE,
+};
+
+static int __init lh7a40xuart_init(void)
+{
+	int ret;
+
+	printk (KERN_INFO "serial: LH7A40X serial driver\n");
+
+	ret = uart_register_driver (&lh7a40x_reg);
+
+	if (ret == 0) {
+		int i;
+
+		for (i = 0; i < DEV_NR; i++)
+			uart_add_one_port (&lh7a40x_reg,
+					   &lh7a40x_ports[i].port);
+	}
+	return ret;
+}
+
+static void __exit lh7a40xuart_exit(void)
+{
+	int i;
+
+	for (i = 0; i < DEV_NR; i++)
+		uart_remove_one_port (&lh7a40x_reg, &lh7a40x_ports[i].port);
+
+	uart_unregister_driver (&lh7a40x_reg);
+}
+
+module_init (lh7a40xuart_init);
+module_exit (lh7a40xuart_exit);
+
+MODULE_AUTHOR ("Marc Singer");
+MODULE_DESCRIPTION ("Sharp LH7A40X serial port driver");
+MODULE_LICENSE ("GPL");
--- diff/drivers/serial/sn_console.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/serial/sn_console.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,1191 @@
+/*
+ * C-Brick Serial Port (and console) driver for SGI Altix machines.
+ *
+ * This driver is NOT suitable for talking to the l1-controller for
+ * anything other than 'console activities' --- please use the l1
+ * driver for that.
+ *
+ *
+ * Copyright (c) 2004 Silicon Graphics, Inc.  All Rights Reserved.
+ *
+ * This program 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.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like.  Any license provided herein, whether implied or
+ * otherwise, applies only to this software file.  Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
+ * Mountain View, CA  94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/NoticeExplan
+ */
+
+#include <linux/config.h>
+#include <linux/interrupt.h>
+#include <linux/tty.h>
+#include <linux/serial.h>
+#include <linux/console.h>
+#include <linux/module.h>
+#include <linux/sysrq.h>
+#include <linux/circ_buf.h>
+#include <linux/serial_reg.h>
+#include <linux/delay.h> /* for mdelay */
+#include <linux/miscdevice.h>
+#include <linux/serial_core.h>
+
+#include <asm/sn/simulator.h>
+#include <asm/sn/sn2/sn_private.h>
+#include <asm/sn/sn_sal.h>
+
+/* number of characters we can transmit to the SAL console at a time */
+#define SN_SAL_MAX_CHARS 120
+
+/* 64K, when we're asynch, it must be at least printk's LOG_BUF_LEN to
+ * avoid losing chars, (always has to be a power of 2) */
+#define SN_SAL_BUFFER_SIZE (64 * (1 << 10))
+
+#define SN_SAL_UART_FIFO_DEPTH 16
+#define SN_SAL_UART_FIFO_SPEED_CPS 9600/10
+
+/* sn_transmit_chars() calling args */
+#define TRANSMIT_BUFFERED	0
+#define TRANSMIT_RAW		1
+
+/* To use dynamic numbers only and not use the assigned major and minor,
+ * define the following.. */
+/* #define USE_DYNAMIC_MINOR 1 */ /* use dynamic minor number */
+#define USE_DYNAMIC_MINOR 0 /* Don't rely on misc_register dynamic minor */
+
+/* Device name we're using */
+#define DEVICE_NAME "ttySG"
+#define DEVICE_NAME_DYNAMIC "ttySG0"  /* need full name for misc_register */
+/* The major/minor we are using, ignored for USE_DYNAMIC_MINOR */
+#define DEVICE_MAJOR 204
+#define DEVICE_MINOR 40
+
+/*
+ * Port definition - this kinda drives it all
+ */
+struct sn_cons_port {
+	struct timer_list sc_timer;
+	struct uart_port sc_port;
+	struct sn_sal_ops {
+		int (*sal_puts_raw) (const char *s, int len);
+		int (*sal_puts) (const char *s, int len);
+		int (*sal_getc) (void);
+		int (*sal_input_pending) (void);
+		void (*sal_wakeup_transmit) (struct sn_cons_port *, int);
+	} *sc_ops;
+	unsigned long sc_interrupt_timeout;
+	int sc_is_asynch;
+};
+
+static struct sn_cons_port sal_console_port;
+
+/* Only used if USE_DYNAMIC_MINOR is set to 1 */
+static struct miscdevice misc; /* used with misc_register for dynamic */
+
+extern u64 master_node_bedrock_address;
+extern void early_sn_setup(void);
+
+static int sn_debug_printf(const char *fmt, ...);
+
+#undef DEBUG
+#ifdef DEBUG
+#define DPRINTF(x...) sn_debug_printf(x)
+#else
+#define DPRINTF(x...) do { } while (0)
+#endif
+
+/* Prototypes */
+static int snt_hw_puts_raw(const char *, int);
+static int snt_hw_puts_buffered(const char *, int);
+static int snt_poll_getc(void);
+static int snt_poll_input_pending(void);
+static int snt_sim_puts(const char *, int);
+static int snt_sim_getc(void);
+static int snt_sim_input_pending(void);
+static int snt_intr_getc(void);
+static int snt_intr_input_pending(void);
+static void sn_transmit_chars(struct sn_cons_port *, int);
+
+/* A table for polling:
+ */
+static struct sn_sal_ops poll_ops = {
+	.sal_puts_raw = snt_hw_puts_raw,
+	.sal_puts = snt_hw_puts_raw,
+	.sal_getc = snt_poll_getc,
+	.sal_input_pending = snt_poll_input_pending
+};
+
+/* A table for the simulator */
+static struct sn_sal_ops sim_ops = {
+	.sal_puts_raw = snt_sim_puts,
+	.sal_puts = snt_sim_puts,
+	.sal_getc = snt_sim_getc,
+	.sal_input_pending = snt_sim_input_pending
+};
+
+/* A table for interrupts enabled */
+static struct sn_sal_ops intr_ops = {
+	.sal_puts_raw = snt_hw_puts_raw,
+	.sal_puts = snt_hw_puts_buffered,
+	.sal_getc = snt_intr_getc,
+	.sal_input_pending = snt_intr_input_pending,
+	.sal_wakeup_transmit = sn_transmit_chars
+};
+
+/* the console does output in two distinctly different ways:
+ * synchronous (raw) and asynchronous (buffered).  initally, early_printk
+ * does synchronous output.  any data written goes directly to the SAL
+ * to be output (incidentally, it is internally buffered by the SAL)
+ * after interrupts and timers are initialized and available for use,
+ * the console init code switches to asynchronous output.  this is
+ * also the earliest opportunity to begin polling for console input.
+ * after console initialization, console output and tty (serial port)
+ * output is buffered and sent to the SAL asynchronously (either by
+ * timer callback or by UART interrupt) */
+
+
+/* routines for running the console in polling mode */
+
+/**
+ * snt_poll_getc - Get a character from the console in polling mode
+ *
+ */
+static int
+snt_poll_getc(void)
+{
+	int ch;
+
+	ia64_sn_console_getc(&ch);
+	return ch;
+}
+
+/**
+ * snt_poll_input_pending - Check if any input is waiting - polling mode.
+ *
+ */
+static int
+snt_poll_input_pending(void)
+{
+	int status, input;
+
+	status = ia64_sn_console_check(&input);
+	return !status && input;
+}
+
+/* routines for running the console on the simulator */
+
+/**
+ * snt_sim_puts - send to the console, used in simulator mode
+ * @str: String to send
+ * @count: length of string
+ *
+ */
+static int
+snt_sim_puts(const char *str, int count)
+{
+	int counter = count;
+
+#ifdef FLAG_DIRECT_CONSOLE_WRITES
+	/* This is an easy way to pre-pend the output to know whether the output
+	 * was done via sal or directly */
+	writeb('[', master_node_bedrock_address + (UART_TX << 3));
+	writeb('+', master_node_bedrock_address + (UART_TX << 3));
+	writeb(']', master_node_bedrock_address + (UART_TX << 3));
+	writeb(' ', master_node_bedrock_address + (UART_TX << 3));
+#endif				/* FLAG_DIRECT_CONSOLE_WRITES */
+	while (counter > 0) {
+		writeb(*str, master_node_bedrock_address + (UART_TX << 3));
+		counter--;
+		str++;
+	}
+	return count;
+}
+
+/**
+ * snt_sim_getc - Get character from console in simulator mode
+ *
+ */
+static int
+snt_sim_getc(void)
+{
+	return readb(master_node_bedrock_address + (UART_RX << 3));
+}
+
+/**
+ * snt_sim_input_pending - Check if there is input pending in simulator mode
+ *
+ */
+static int
+snt_sim_input_pending(void)
+{
+	return readb(master_node_bedrock_address +
+		     (UART_LSR << 3)) & UART_LSR_DR;
+}
+
+/* routines for an interrupt driven console (normal) */
+
+/**
+ * snt_intr_getc - Get a character from the console, interrupt mode
+ *
+ */
+static int
+snt_intr_getc(void)
+{
+	return ia64_sn_console_readc();
+}
+
+/**
+ * snt_intr_input_pending - Check if input is pending, interrupt mode
+ *
+ */
+static int
+snt_intr_input_pending(void)
+{
+	return ia64_sn_console_intr_status() & SAL_CONSOLE_INTR_RECV;
+}
+
+/* these functions are polled and interrupt */
+
+/**
+ * snt_hw_puts_raw - Send raw string to the console, polled or interrupt mode
+ * @s: String
+ * @len: Length
+ *
+ */
+static int
+snt_hw_puts_raw(const char *s, int len)
+{
+	/* this will call the PROM and not return until this is done */
+	return ia64_sn_console_putb(s, len);
+}
+
+/**
+ * snt_hw_puts_buffered - Send string to console, polled or interrupt mode
+ * @s: String
+ * @len: Length
+ *
+ */
+static int
+snt_hw_puts_buffered(const char *s, int len)
+{
+	/* queue data to the PROM */
+	return ia64_sn_console_xmit_chars((char *)s, len);
+}
+
+/* uart interface structs
+ * These functions are associated with the uart_port that the serial core
+ * infrastructure calls.
+ *
+ * Note: Due to how the console works, many routines are no-ops.
+ */
+
+/**
+ * snp_type - What type of console are we?
+ * @port: Port to operate with (we ignore since we only have one port)
+ *
+ */
+static const char *
+snp_type(struct uart_port *port)
+{
+	return ("SGI SN L1");
+}
+
+/**
+ * snp_tx_empty - Is the transmitter empty?  We pretend we're always empty
+ * @port: Port to operate on (we ignore since we only have one port)
+ *
+ */
+static unsigned int
+snp_tx_empty(struct uart_port *port)
+{
+	return 1;
+}
+
+/**
+ * snp_stop_tx - stop the transmitter - no-op for us
+ * @port: Port to operat eon - we ignore - no-op function
+ * @tty_stop: Set to 1 if called via uart_stop
+ *
+ */
+static void
+snp_stop_tx(struct uart_port *port, unsigned int tty_stop)
+{
+}
+
+/**
+ * snp_release_port - Free i/o and resources for port - no-op for us
+ * @port: Port to operate on - we ignore - no-op function
+ *
+ */
+static void
+snp_release_port(struct uart_port *port)
+{
+}
+
+/**
+ * snp_enable_ms - Force modem status interrupts on - no-op for us
+ * @port: Port to operate on - we ignore - no-op function
+ *
+ */
+static void
+snp_enable_ms(struct uart_port *port)
+{
+}
+
+/**
+ * snp_shutdown - shut down the port - free irq and disable - no-op for us
+ * @port: Port to shut down - we ignore
+ *
+ */
+static void
+snp_shutdown(struct uart_port *port)
+{
+}
+
+/**
+ * snp_set_mctrl - set control lines (dtr, rts, etc) - no-op for our console
+ * @port: Port to operate on - we ignore
+ * @mctrl: Lines to set/unset - we ignore
+ *
+ */
+static void
+snp_set_mctrl(struct uart_port *port, unsigned int mctrl)
+{
+}
+
+/**
+ * snp_get_mctrl - get contorl line info, we just return a static value
+ * @port: port to operate on - we only have one port so we ignore this
+ *
+ */
+static unsigned int
+snp_get_mctrl(struct uart_port *port)
+{
+	return TIOCM_CAR | TIOCM_RNG | TIOCM_DSR | TIOCM_CTS;
+}
+
+/**
+ * snp_stop_rx - Stop the receiver - we ignor ethis
+ * @port: Port to operate on - we ignore
+ *
+ */
+static void
+snp_stop_rx(struct uart_port *port)
+{
+}
+
+/**
+ * snp_start_tx - Start transmitter
+ * @port: Port to operate on
+ * @tty_stop: Set to 1 if called via uart_start
+ *
+ */
+static void
+snp_start_tx(struct uart_port *port, unsigned int tty_stop)
+{
+	if (sal_console_port.sc_ops->sal_wakeup_transmit)
+		sal_console_port.sc_ops->sal_wakeup_transmit(&sal_console_port, TRANSMIT_BUFFERED);
+
+}
+
+/**
+ * snp_break_ctl - handle breaks - ignored by us
+ * @port: Port to operate on
+ * @break_state: Break state
+ *
+ */
+static void
+snp_break_ctl(struct uart_port *port, int break_state)
+{
+}
+
+/**
+ * snp_startup - Start up the serial port - always return 0 (We're always on)
+ * @port: Port to operate on
+ *
+ */
+static int
+snp_startup(struct uart_port *port)
+{
+	return 0;
+}
+
+/**
+ * snp_set_termios - set termios stuff - we ignore these
+ * @port: port to operate on
+ * @termios: New settings
+ * @termios: Old
+ *
+ */
+static void
+snp_set_termios(struct uart_port *port, struct termios *termios,
+		struct termios *old)
+{
+}
+
+/**
+ * snp_request_port - allocate resources for port - ignored by us
+ * @port: port to operate on
+ *
+ */
+static int
+snp_request_port(struct uart_port *port)
+{
+	return 0;
+}
+
+/**
+ * snp_config_port - allocate resources, set up - we ignore,  we're always on
+ * @port: Port to operate on
+ * @flags: flags used for port setup
+ *
+ */
+static void
+snp_config_port(struct uart_port *port, int flags)
+{
+}
+
+/* Associate the uart functions above - given to serial core */
+
+static struct uart_ops sn_console_ops = {
+	.tx_empty = snp_tx_empty,
+	.set_mctrl = snp_set_mctrl,
+	.get_mctrl = snp_get_mctrl,
+	.stop_tx = snp_stop_tx,
+	.start_tx = snp_start_tx,
+	.stop_rx = snp_stop_rx,
+	.enable_ms = snp_enable_ms,
+	.break_ctl = snp_break_ctl,
+	.startup = snp_startup,
+	.shutdown = snp_shutdown,
+	.set_termios = snp_set_termios,
+	.pm = NULL,
+	.type = snp_type,
+	.release_port = snp_release_port,
+	.request_port = snp_request_port,
+	.config_port = snp_config_port,
+	.verify_port = NULL,
+};
+
+/* End of uart struct functions and defines */
+
+/**
+ * sn_debug_printf - close to hardware debugging printf
+ * @fmt: printf format
+ *
+ * This is as "close to the metal" as we can get, used when the driver
+ * itself may be broken.
+ *
+ */
+static int
+sn_debug_printf(const char *fmt, ...)
+{
+	static char printk_buf[1024];
+	int printed_len;
+	va_list args;
+
+	va_start(args, fmt);
+	printed_len = vsnprintf(printk_buf, sizeof (printk_buf), fmt, args);
+
+	if (!sal_console_port.sc_ops) {
+		if (IS_RUNNING_ON_SIMULATOR())
+			sal_console_port.sc_ops = &sim_ops;
+		else
+			sal_console_port.sc_ops = &poll_ops;
+
+		early_sn_setup();
+	}
+	sal_console_port.sc_ops->sal_puts_raw(printk_buf, printed_len);
+
+	va_end(args);
+	return printed_len;
+}
+
+/*
+ * Interrupt handling routines.
+ */
+
+
+/**
+ * sn_receive_chars - Grab characters, pass them to tty layer
+ * @port: Port to operate on
+ * @regs: Saved registers (needed by uart_handle_sysrq_char)
+ *
+ * Note: If we're not registered with the serial core infrastructure yet,
+ * we don't try to send characters to it...
+ *
+ */
+static void
+sn_receive_chars(struct sn_cons_port *port, struct pt_regs *regs)
+{
+	int ch;
+	struct tty_struct *tty;
+
+	if (!port) {
+		printk(KERN_ERR "sn_receive_chars - port NULL so can't receieve\n");
+		return;
+	}
+
+	if (!port->sc_ops) {
+		printk(KERN_ERR "sn_receive_chars - port->sc_ops  NULL so can't receieve\n");
+		return;
+	}
+
+	if (port->sc_port.info) {
+		/* The serial_core stuffs are initilized, use them */
+		tty = port->sc_port.info->tty;
+	}
+	else {
+		/* Not registered yet - can't pass to tty layer.  */
+		tty = NULL;
+	}
+
+	while (port->sc_ops->sal_input_pending()) {
+		ch = port->sc_ops->sal_getc();
+		if (ch < 0) {
+			printk(KERN_ERR "sn_console: An error occured while "
+			       "obtaining data from the console (0x%0x)\n", ch);
+			break;
+		}
+#if defined(CONFIG_SERIAL_SGI_L1_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+		if (uart_handle_sysrq_char(&port->sc_port, ch, regs))
+			continue;
+#endif				/* CONFIG_SERIAL_SGI_L1_CONSOLE && CONFIG_MAGIC_SYSRQ */
+
+		/* record the character to pass up to the tty layer */
+		if (tty) {
+			*tty->flip.char_buf_ptr = ch;
+			*tty->flip.flag_buf_ptr = TTY_NORMAL;
+			tty->flip.char_buf_ptr++;
+			tty->flip.count++;
+			if (tty->flip.count == TTY_FLIPBUF_SIZE)
+				break;
+		}
+		else {
+		}
+		port->sc_port.icount.rx++;
+	}
+
+	if (tty)
+		tty_flip_buffer_push(tty);
+}
+
+/**
+ * sn_transmit_chars - grab characters from serial core, send off
+ * @port: Port to operate on
+ * @raw: Transmit raw or buffered
+ *
+ * Note: If we're early, before we're registered with serial core, the
+ * writes are going through sn_sal_console_write because that's how
+ * register_console has been set up.  We currently could have asynch
+ * polls calling this function due to sn_sal_switch_to_asynch but we can
+ * ignore them until we register with the serial core stuffs.
+ *
+ */
+static void
+sn_transmit_chars(struct sn_cons_port *port, int raw)
+{
+	int xmit_count, tail, head, loops, ii;
+	int result;
+	char *start;
+	struct circ_buf *xmit;
+
+	if (!port)
+		return;
+
+	BUG_ON(!port->sc_is_asynch);
+
+	if (port->sc_port.info) {
+		/* We're initilized, using serial core infrastructure */
+		xmit = &port->sc_port.info->xmit;
+	}
+	else {
+		/* Probably sn_sal_switch_to_asynch has been run but serial core isn't
+		 * initilized yet.  Just return.  Writes are going through
+		 * sn_sal_console_write (due to register_console) at this time.
+		 */
+		return;
+	}
+
+	if (uart_circ_empty(xmit) || uart_tx_stopped(&port->sc_port)) {
+		/* Nothing to do. */
+		return;
+	}
+
+	head = xmit->head;
+	tail = xmit->tail;
+	start = &xmit->buf[tail];
+
+	/* twice around gets the tail to the end of the buffer and
+	 * then to the head, if needed */
+	loops = (head < tail) ? 2 : 1;
+
+	for (ii = 0; ii < loops; ii++) {
+		xmit_count = (head < tail) ?
+		    (UART_XMIT_SIZE - tail) : (head - tail);
+
+		if (xmit_count > 0) {
+			if (raw == TRANSMIT_RAW)
+				result =
+				    port->sc_ops->sal_puts_raw(start,
+							       xmit_count);
+			else
+				result =
+				    port->sc_ops->sal_puts(start, xmit_count);
+#ifdef DEBUG
+			if (!result)
+				sn_debug_printf("`");
+#endif
+			if (result > 0) {
+				xmit_count -= result;
+				port->sc_port.icount.tx += result;
+				tail += result;
+				tail &= UART_XMIT_SIZE - 1;
+				xmit->tail = tail;
+				start = &xmit->buf[tail];
+			}
+		}
+	}
+
+	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+		uart_write_wakeup(&port->sc_port);
+
+	if (uart_circ_empty(xmit))
+		snp_stop_tx(&port->sc_port, 0); /* no-op for us */
+}
+
+/**
+ * sn_sal_interrupt - Handle console interrupts
+ * @irq: irq #, useful for debug statements
+ * @dev_id: our pointer to our port (sn_cons_port which contains the uart port)
+ * @regs: Saved registers, used by sn_receive_chars for uart_handle_sysrq_char
+ *
+ */
+static irqreturn_t
+sn_sal_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	struct sn_cons_port *port = (struct sn_cons_port *) dev_id;
+	unsigned long flags;
+	int status = ia64_sn_console_intr_status();
+
+	if (!port)
+		return IRQ_NONE;
+
+	spin_lock_irqsave(&port->sc_port.lock, flags);
+	if (status & SAL_CONSOLE_INTR_RECV) {
+		sn_receive_chars(port, regs);
+	}
+	if (status & SAL_CONSOLE_INTR_XMIT) {
+		sn_transmit_chars(port, TRANSMIT_BUFFERED);
+	}
+	spin_unlock_irqrestore(&port->sc_port.lock, flags);
+	return IRQ_HANDLED;
+}
+
+/**
+ * sn_sal_connect_interrupt - Request interrupt, handled by sn_sal_interrupt
+ * @port: Our sn_cons_port (which contains the uart port)
+ *
+ * returns the console irq if interrupt is successfully registered, else 0
+ *
+ */
+static int
+sn_sal_connect_interrupt(struct sn_cons_port *port)
+{
+	if (request_irq(SGI_UART_VECTOR, sn_sal_interrupt, SA_INTERRUPT,
+			"SAL console driver", port) >= 0) {
+		return SGI_UART_VECTOR;
+	}
+
+	printk(KERN_INFO "sn_console: console proceeding in polled mode\n");
+	return 0;
+}
+
+/**
+ * sn_sal_timer_poll - this function handles polled console mode
+ * @data: A pointer to our sn_cons_port (which contains the uart port)
+ *
+ * data is the pointer that init_timer will store for us.  This function is
+ * associated with init_timer to see if there is any console traffic.
+ * Obviously not used in interrupt mode
+ *
+ */
+static void
+sn_sal_timer_poll(unsigned long data)
+{
+	struct sn_cons_port *port = (struct sn_cons_port *) data;
+	unsigned long flags;
+
+	if (!port)
+		return;
+
+	if (!port->sc_port.irq) {
+		spin_lock_irqsave(&port->sc_port.lock, flags);
+		sn_receive_chars(port, NULL);
+		sn_transmit_chars(port, TRANSMIT_RAW);
+		spin_unlock_irqrestore(&port->sc_port.lock, flags);
+		mod_timer(&port->sc_timer,
+			  jiffies + port->sc_interrupt_timeout);
+	}
+}
+
+/*
+ * Boot-time initialization code
+ */
+
+/**
+ * sn_sal_switch_to_asynch - Switch to async mode (as opposed to synch)
+ * @port: Our sn_cons_port (which contains the uart port)
+ *
+ * So this is used by sn_sal_serial_console_init (early on, before we're
+ * registered with serial core).  It's also used by sn_sal_module_init
+ * right after we've registered with serial core.  The later only happens
+ * if we didn't already come through here via sn_sal_serial_console_init.
+ *
+ */
+static void __init
+sn_sal_switch_to_asynch(struct sn_cons_port *port)
+{
+	unsigned long flags;
+
+	if (!port)
+		return;
+
+	DPRINTF("sn_console: about to switch to asynchronous console\n");
+
+	/* without early_printk, we may be invoked late enough to race
+	 * with other cpus doing console IO at this point, however
+	 * console interrupts will never be enabled */
+	spin_lock_irqsave(&port->sc_port.lock, flags);
+
+	/* early_printk invocation may have done this for us */
+	if (!port->sc_ops) {
+		if (IS_RUNNING_ON_SIMULATOR())
+			port->sc_ops = &sim_ops;
+		else
+			port->sc_ops = &poll_ops;
+	}
+
+	/* we can't turn on the console interrupt (as request_irq
+	 * calls kmalloc, which isn't set up yet), so we rely on a
+	 * timer to poll for input and push data from the console
+	 * buffer.
+	 */
+	init_timer(&port->sc_timer);
+	port->sc_timer.function = sn_sal_timer_poll;
+	port->sc_timer.data = (unsigned long) port;
+
+	if (IS_RUNNING_ON_SIMULATOR())
+		port->sc_interrupt_timeout = 6;
+	else {
+		/* 960cps / 16 char FIFO = 60HZ
+		 * HZ / (SN_SAL_FIFO_SPEED_CPS / SN_SAL_FIFO_DEPTH) */
+		port->sc_interrupt_timeout =
+		    HZ * SN_SAL_UART_FIFO_DEPTH / SN_SAL_UART_FIFO_SPEED_CPS;
+	}
+	mod_timer(&port->sc_timer, jiffies + port->sc_interrupt_timeout);
+
+	port->sc_is_asynch = 1;
+	spin_unlock_irqrestore(&port->sc_port.lock, flags);
+}
+
+/**
+ * sn_sal_switch_to_interrupts - Switch to interrupt driven mode
+ * @port: Our sn_cons_port (which contains the uart port)
+ *
+ * In sn_sal_module_init, after we're registered with serial core and
+ * the port is added, this function is called to switch us to interrupt
+ * mode.  We were previously in asynch/polling mode (using init_timer).
+ *
+ * We attempt to switch to interrupt mode here by calling
+ * sn_sal_connect_interrupt.  If that works out, we enable receive interrupts.
+ */
+static void __init
+sn_sal_switch_to_interrupts(struct sn_cons_port *port)
+{
+	int irq;
+	unsigned long flags;
+
+	if (!port)
+		return;
+
+	DPRINTF("sn_console: switching to interrupt driven console\n");
+
+	spin_lock_irqsave(&port->sc_port.lock, flags);
+
+	irq = sn_sal_connect_interrupt(port);
+
+	if (irq) {
+		port->sc_port.irq = irq;
+		port->sc_ops = &intr_ops;
+
+		/* turn on receive interrupts */
+		ia64_sn_console_intr_enable(SAL_CONSOLE_INTR_RECV);
+	}
+	spin_unlock_irqrestore(&port->sc_port.lock, flags);
+}
+
+/*
+ * Kernel console definitions
+ */
+
+#ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
+static void sn_sal_console_write(struct console *, const char *, unsigned);
+static int __init sn_sal_console_setup(struct console *, char *);
+extern struct uart_driver sal_console_uart;
+extern struct tty_driver *uart_console_device(struct console *, int *);
+
+static struct console sal_console = {
+	.name = DEVICE_NAME,
+	.write = sn_sal_console_write,
+	.device = uart_console_device,
+	.setup = sn_sal_console_setup,
+	.index = -1, /* unspecified */
+	.data = &sal_console_uart,
+};
+
+#define SAL_CONSOLE	&sal_console
+#else
+#define SAL_CONSOLE	0
+#endif				/* CONFIG_SERIAL_SGI_L1_CONSOLE */
+
+static struct uart_driver sal_console_uart = {
+	.owner = THIS_MODULE,
+	.driver_name = "sn_console",
+	.dev_name = DEVICE_NAME,
+	.major = 0, /* major/minor set at registration time per USE_DYNAMIC_MINOR */
+	.minor = 0,
+	.nr = 1,	/* one port */
+	.cons = SAL_CONSOLE,
+};
+
+/**
+ * sn_sal_module_init - When the kernel loads us, get us rolling w/ serial core
+ *
+ * Before this is called, we've been printing kernel messages in a special
+ * early mode not making use of the serial core infrastructure.  When our
+ * driver is loaded for real, we register the driver and port with serial
+ * core and try to enable interrupt driven mode.
+ *
+ */
+static int __init
+sn_sal_module_init(void)
+{
+	int retval;
+
+	printk(KERN_INFO "sn_console: Console driver init\n");
+
+	if (!ia64_platform_is("sn2"))
+		return -ENODEV;
+
+	if (USE_DYNAMIC_MINOR == 1) {
+		misc.minor = MISC_DYNAMIC_MINOR;
+		misc.name = DEVICE_NAME_DYNAMIC;
+		retval = misc_register(&misc);
+		if (retval != 0) {
+			printk("Failed to register console device using misc_register.\n");
+			return -ENODEV;
+		}
+		sal_console_uart.major = MISC_MAJOR;
+		sal_console_uart.minor = misc.minor;
+	}
+	else {
+		sal_console_uart.major = DEVICE_MAJOR;
+		sal_console_uart.minor = DEVICE_MINOR;
+	}
+
+	/* We register the driver and the port before switching to interrupts
+    * or async above so the proper uart structures are populated */
+
+	if (uart_register_driver(&sal_console_uart) < 0) {
+		printk("ERROR sn_sal_module_init failed uart_register_driver, line %d\n",
+		  __LINE__);
+		return -ENODEV;
+	}
+
+	sal_console_port.sc_port.lock = SPIN_LOCK_UNLOCKED;
+
+	/* Setup the port struct with the minimum needed */
+	sal_console_port.sc_port.membase = (char *)1;	/* just needs to be non-zero */
+	sal_console_port.sc_port.type = PORT_16550A;
+	sal_console_port.sc_port.fifosize = SN_SAL_MAX_CHARS;
+	sal_console_port.sc_port.ops = &sn_console_ops;
+	sal_console_port.sc_port.line = 0;
+
+	if (uart_add_one_port(&sal_console_uart, &sal_console_port.sc_port) < 0) {
+		/* error - not sure what I'd do - so I'll do nothing */
+		printk(KERN_ERR "%s: unable to add port\n", __FUNCTION__);
+	}
+
+	/* when this driver is compiled in, the console initialization
+	 * will have already switched us into asynchronous operation
+	 * before we get here through the module initcalls */
+	if (!sal_console_port.sc_is_asynch) {
+		sn_sal_switch_to_asynch(&sal_console_port);
+	}
+
+	/* at this point (module_init) we can try to turn on interrupts */
+	if (!IS_RUNNING_ON_SIMULATOR()) {
+		sn_sal_switch_to_interrupts(&sal_console_port);
+	}
+	return 0;
+}
+
+/**
+ * sn_sal_module_exit - When we're unloaded, remove the driver/port
+ *
+ */
+static void __exit
+sn_sal_module_exit(void)
+{
+	del_timer_sync(&sal_console_port.sc_timer);
+	uart_remove_one_port(&sal_console_uart, &sal_console_port.sc_port);
+	uart_unregister_driver(&sal_console_uart);
+	misc_deregister(&misc);
+}
+
+module_init(sn_sal_module_init);
+module_exit(sn_sal_module_exit);
+
+#ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
+
+/**
+ * puts_raw_fixed - sn_sal_console_write helper for adding \r's as required
+ * @s: input string
+ * @count: length
+ *
+ * We need a \r ahead of every \n for direct writes through
+ * ia64_sn_console_putb (what sal_puts_raw below actually does).
+ *
+ */
+static void puts_raw_fixed(const char *s, int count)
+{
+	const char *s1;
+	struct sn_cons_port *port = &sal_console_port;
+
+	/* Output '\r' before each '\n' */
+	while ((s1 = memchr(s, '\n', count)) != NULL) {
+		port->sc_ops->sal_puts_raw(s, s1 - s);
+		port->sc_ops->sal_puts_raw("\r\n", 2);
+		count -= s1 + 1 - s;
+		s = s1 + 1;
+	}
+	port->sc_ops->sal_puts_raw(s, count);
+}
+
+/**
+ * sn_sal_console_write - Print statements before serial core available
+ * @console: Console to operate on - we ignore since we have just one
+ * @s: String to send
+ * @count: length
+ *
+ * This is referenced in the console struct.  It is used for early
+ * console printing before we register with serial core and for things
+ * such as kdb.  The console_lock must be held when we get here.
+ *
+ * This function has some code for trying to print output even if the lock
+ * is held.  We try to cover the case where a lock holder could have died.
+ * We don't use this special case code if we're not registered with serial
+ * core yet.  After we're registered with serial core, the only time this
+ * function would be used is for high level kernel output like magic sys req,
+ * kdb, and printk's.
+ */
+static void
+sn_sal_console_write(struct console *co, const char *s, unsigned count)
+{
+	unsigned long flags = 0;
+	struct sn_cons_port *port = &sal_console_port;
+#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
+	static int stole_lock = 0;
+#endif
+
+	BUG_ON(!port->sc_is_asynch);
+
+	/* We can't look at the xmit buffer if we're not registered with serial core
+	 *  yet.  So only do the fancy recovery after registering
+	 */
+	if (port->sc_port.info) {
+
+		/* somebody really wants this output, might be an
+	 	* oops, kdb, panic, etc.  make sure they get it. */
+#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
+		if (spin_is_locked(&port->sc_port.lock)) {
+			int lhead = port->sc_port.info->xmit.head;
+			int ltail = port->sc_port.info->xmit.tail;
+			int counter, got_lock = 0;
+
+			/*
+		 	 * We attempt to determine if someone has died with the
+		 	 * lock. We wait ~20 secs after the head and tail ptrs
+		 	 * stop moving and assume the lock holder is not functional
+		 	 * and plow ahead. If the lock is freed within the time out
+		 	 * period we re-get the lock and go ahead normally. We also
+		 	 * remember if we have plowed ahead so that we don't have
+			 * to wait out the time out period again - the asumption
+		 	 * is that we will time out again.
+		 	 */
+
+			for (counter = 0; counter < 150; mdelay(125), counter++) {
+				if (!spin_is_locked(&port->sc_port.lock) || stole_lock) {
+					if (!stole_lock) {
+						spin_lock_irqsave(&port->sc_port.lock, flags);
+						got_lock = 1;
+					}
+					break;
+				}
+				else {
+					/* still locked */
+					if ((lhead != port->sc_port.info->xmit.head) || (ltail != port->sc_port.info->xmit.tail)) {
+						lhead = port->sc_port.info->xmit.head;
+						ltail = port->sc_port.info->xmit.tail;
+						counter = 0;
+					}
+				}
+			}
+			/* flush anything in the serial core xmit buffer, raw */
+			sn_transmit_chars(port, 1);
+			if (got_lock) {
+				spin_unlock_irqrestore(&port->sc_port.lock, flags);
+				stole_lock = 0;
+			}
+			else {
+				/* fell thru */
+				stole_lock = 1;
+			}
+			puts_raw_fixed(s, count);
+		}
+		else {
+			stole_lock = 0;
+#endif
+			spin_lock_irqsave(&port->sc_port.lock, flags);
+			sn_transmit_chars(port, 1);
+			spin_unlock_irqrestore(&port->sc_port.lock, flags);
+
+			puts_raw_fixed(s, count);
+		}
+	}
+	else {
+		/* Not yet registered with serial core - simple case */
+		puts_raw_fixed(s, count);
+	}
+}
+
+
+/**
+ * sn_sal_console_setup - Set up console for early printing
+ * @co: Console to work with
+ * @options: Options to set
+ *
+ * Altix console doesn't do anything with baud rates, etc, anyway.
+ *
+ * This isn't required since not providing the setup function in the
+ * console struct is ok.  However, other patches like KDB plop something
+ * here so providing it is easier.
+ *
+ */
+static int __init
+sn_sal_console_setup(struct console *co, char *options)
+{
+	return 0;
+}
+
+/**
+ * sn_sal_console_write_early - simple early output routine
+ * @co - console struct
+ * @s - string to print
+ * @count - count
+ *
+ * Simple function to provide early output, before even
+ * sn_sal_serial_console_init is called.  Referenced in the
+ * console struct registerd in sn_serial_console_early_setup.
+ *
+ */
+static void __init
+sn_sal_console_write_early(struct console *co, const char *s, unsigned count)
+{
+	sal_console_port.sc_ops->sal_puts(s, count);
+}
+
+/* Used for very early console printing - again, before
+ * sn_sal_serial_console_init is run */
+static struct console sal_console_early __initdata = {
+	.name = "sn_sal",
+	.write = sn_sal_console_write_early,
+	.flags = CON_PRINTBUFFER,
+	.index  = -1,
+};
+
+/**
+ * sn_serial_console_early_setup - Sets up early console output support
+ *
+ * Register a console early on...  This is for output before even
+ * sn_sal_serial_cosnole_init is called.  This function is called from
+ * setup.c.  This allows us to do really early polled writes. When
+ * sn_sal_serial_console_init is called, this console is unregistered
+ * and a new one registered.
+ */
+int __init
+sn_serial_console_early_setup(void)
+{
+	if (!ia64_platform_is("sn2"))
+		return -1;
+
+	if (IS_RUNNING_ON_SIMULATOR())
+		sal_console_port.sc_ops = &sim_ops;
+	else
+		sal_console_port.sc_ops = &poll_ops;
+
+	early_sn_setup(); /* Find SAL entry points */
+	register_console(&sal_console_early);
+
+	return 0;
+}
+
+
+/**
+ * sn_sal_serial_console_init - Early console output - set up for register
+ *
+ * This function is called when regular console init happens.  Because we
+ * support even earlier console output with sn_serial_console_early_setup
+ * (called from setup.c directly), this function unregisters the really
+ * early console.
+ *
+ * Note: Even if setup.c doesn't register sal_console_early, unregistering
+ * it here doesn't hurt anything.
+ *
+ */
+static int __init
+sn_sal_serial_console_init(void)
+{
+	if (ia64_platform_is("sn2")) {
+		sn_sal_switch_to_asynch(&sal_console_port);
+		DPRINTF ("sn_sal_serial_console_init : register console\n");
+		register_console(&sal_console);
+		unregister_console(&sal_console_early);
+	}
+	return 0;
+}
+
+console_initcall(sn_sal_serial_console_init);
+
+#endif				/* CONFIG_SERIAL_SGI_L1_CONSOLE */
--- diff/drivers/usb/class/cdc-acm.h	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/usb/class/cdc-acm.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,127 @@
+/*
+ *
+ * Includes for cdc-acm.c
+ *
+ * Mainly take from usbnet's cdc-ether part
+ *
+ */
+
+/*
+ * CMSPAR, some architectures can't have space and mark parity.
+ */
+
+#ifndef CMSPAR
+#define CMSPAR			0
+#endif
+
+/*
+ * Major and minor numbers.
+ */
+
+#define ACM_TTY_MAJOR		166
+#define ACM_TTY_MINORS		32
+
+/*
+ * Requests.
+ */
+
+#define USB_RT_ACM		(USB_TYPE_CLASS | USB_RECIP_INTERFACE)
+
+#define ACM_REQ_COMMAND		0x00
+#define ACM_REQ_RESPONSE	0x01
+#define ACM_REQ_SET_FEATURE	0x02
+#define ACM_REQ_GET_FEATURE	0x03
+#define ACM_REQ_CLEAR_FEATURE	0x04
+
+#define ACM_REQ_SET_LINE	0x20
+#define ACM_REQ_GET_LINE	0x21
+#define ACM_REQ_SET_CONTROL	0x22
+#define ACM_REQ_SEND_BREAK	0x23
+
+/*
+ * IRQs.
+ */
+
+#define ACM_IRQ_NETWORK		0x00
+#define ACM_IRQ_LINE_STATE	0x20
+
+/*
+ * Output control lines.
+ */
+
+#define ACM_CTRL_DTR		0x01
+#define ACM_CTRL_RTS		0x02
+
+/*
+ * Input control lines and line errors.
+ */
+
+#define ACM_CTRL_DCD		0x01
+#define ACM_CTRL_DSR		0x02
+#define ACM_CTRL_BRK		0x04
+#define ACM_CTRL_RI		0x08
+
+#define ACM_CTRL_FRAMING	0x10
+#define ACM_CTRL_PARITY		0x20
+#define ACM_CTRL_OVERRUN	0x40
+
+/*
+ * Line speed and caracter encoding.
+ */
+
+struct acm_line {
+	__u32 speed;
+	__u8 stopbits;
+	__u8 parity;
+	__u8 databits;
+} __attribute__ ((packed));
+
+/*
+ * Internal driver structures.
+ */
+
+struct acm {
+	struct usb_device *dev;				/* the corresponding usb device */
+	struct usb_interface *control;			/* control interface */
+	struct usb_interface *data;			/* data interface */
+	struct tty_struct *tty;				/* the corresponding tty */
+	struct urb *ctrlurb, *readurb, *writeurb;	/* urbs */
+	u8 *ctrl_buffer, *read_buffer, *write_buffer;	/* buffers of urbs */
+	dma_addr_t ctrl_dma, read_dma, write_dma;	/* dma handles of buffers */
+	struct acm_line line;				/* line coding (bits, stop, parity) */
+	struct work_struct work;			/* work queue entry for line discipline waking up */
+	struct tasklet_struct bh;			/* rx processing */
+	spinlock_t throttle_lock;			/* synchronize throtteling and read callback */
+	unsigned int ctrlin;				/* input control lines (DCD, DSR, RI, break, overruns) */
+	unsigned int ctrlout;				/* output control lines (DTR, RTS) */
+	unsigned int writesize;				/* max packet size for the output bulk endpoint */
+	unsigned int readsize,ctrlsize;			/* buffer sizes for freeing */
+	unsigned int used;				/* someone has this acm's device open */
+	unsigned int minor;				/* acm minor number */
+	unsigned char throttle;				/* throttled by tty layer */
+	unsigned char clocal;				/* termios CLOCAL */
+	unsigned char ready_for_write;			/* write urb can be used */
+	unsigned char resubmit_to_unthrottle;		/* throtteling has disabled the read urb */
+	unsigned int ctrl_caps;				/* control capabilities from the class specific header */
+};
+
+/* "Union Functional Descriptor" from CDC spec 5.2.3.X */
+struct union_desc {
+	u8	bLength;
+	u8	bDescriptorType;
+	u8	bDescriptorSubType;
+
+	u8	bMasterInterface0;
+	u8	bSlaveInterface0;
+	/* ... and there could be other slave interfaces */
+} __attribute__ ((packed));
+
+/* class specific descriptor types */
+#define CDC_CALL_MANAGEMENT_TYPE	0x01
+#define CDC_AC_MANAGEMENT_TYPE		0x02
+#define CDC_UNION_TYPE			0x06
+#define CDC_COUNTRY_TYPE		0x07
+
+#define CDC_DATA_INTERFACE_TYPE	0x0a
+
+
--- diff/drivers/usb/host/ohci-lh7a404.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/usb/host/ohci-lh7a404.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,385 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * (C) Copyright 2002 Hewlett-Packard Company
+ *
+ * Bus Glue for Sharp LH7A404
+ *
+ * Written by Christopher Hoover <ch@hpl.hp.com>
+ * Based on fragments of previous driver by Rusell King et al.
+ *
+ * Modified for LH7A404 from ohci-sa1111.c
+ *  by Durgesh Pattamatta <pattamattad@sharpsec.com>
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/arch/hardware.h>
+
+
+extern int usb_disabled(void);
+
+/*-------------------------------------------------------------------------*/
+
+static void lh7a404_start_hc(struct platform_device *dev)
+{
+	printk(KERN_DEBUG __FILE__
+	       ": starting LH7A404 OHCI USB Controller\n");
+
+	/*
+	 * Now, carefully enable the USB clock, and take
+	 * the USB host controller out of reset.
+	 */
+	CSC_PWRCNT |= CSC_PWRCNT_USBH_EN; /* Enable clock */
+	udelay(1000);
+	USBH_CMDSTATUS = OHCI_HCR;
+	
+	printk(KERN_DEBUG __FILE__
+		   ": Clock to USB host has been enabled \n");
+}
+
+static void lh7a404_stop_hc(struct platform_device *dev)
+{
+	printk(KERN_DEBUG __FILE__
+	       ": stopping LH7A404 OHCI USB Controller\n");
+
+	CSC_PWRCNT &= ~CSC_PWRCNT_USBH_EN; /* Disable clock */
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+
+static irqreturn_t usb_hcd_lh7a404_hcim_irq (int irq, void *__hcd,
+					     struct pt_regs * r)
+{
+	struct usb_hcd *hcd = __hcd;
+
+	return usb_hcd_irq(irq, hcd, r);
+}
+
+/*-------------------------------------------------------------------------*/
+
+void usb_hcd_lh7a404_remove (struct usb_hcd *, struct platform_device *);
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+
+/**
+ * usb_hcd_lh7a404_probe - initialize LH7A404-based HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ */
+int usb_hcd_lh7a404_probe (const struct hc_driver *driver,
+			  struct usb_hcd **hcd_out,
+			  struct platform_device *dev)
+{
+	int retval;
+	struct usb_hcd *hcd = 0;
+
+	unsigned int *addr = NULL;
+
+	if (!request_mem_region(dev->resource[0].start,
+				dev->resource[0].end
+				- dev->resource[0].start + 1, hcd_name)) {
+		pr_debug("request_mem_region failed");
+		return -EBUSY;
+	}
+	
+	
+	lh7a404_start_hc(dev);
+	
+	addr = ioremap(dev->resource[0].start,
+		       dev->resource[0].end
+		       - dev->resource[0].start + 1);
+	if (!addr) {
+		pr_debug("ioremap failed");
+		retval = -ENOMEM;
+		goto err1;
+	}
+	
+
+	hcd = driver->hcd_alloc ();
+	if (hcd == NULL){
+		pr_debug ("hcd_alloc failed");
+		retval = -ENOMEM;
+		goto err1;
+	}
+
+	if(dev->resource[1].flags != IORESOURCE_IRQ){
+		pr_debug ("resource[1] is not IORESOURCE_IRQ");
+		retval = -ENOMEM;
+		goto err1;
+	}
+
+	hcd->driver = (struct hc_driver *) driver;
+	hcd->description = driver->description;
+	hcd->irq = dev->resource[1].start;
+	hcd->regs = addr;
+	hcd->self.controller = &dev->dev;
+
+	retval = hcd_buffer_create (hcd);
+	if (retval != 0) {
+		pr_debug ("pool alloc fail");
+		goto err1;
+	}
+
+	retval = request_irq (hcd->irq, usb_hcd_lh7a404_hcim_irq, SA_INTERRUPT,
+			      hcd->description, hcd);
+	if (retval != 0) {
+		pr_debug("request_irq failed");
+		retval = -EBUSY;
+		goto err2;
+	}
+
+	pr_debug ("%s (LH7A404) at 0x%p, irq %d",
+	     hcd->description, hcd->regs, hcd->irq);
+
+	usb_bus_init (&hcd->self);
+	hcd->self.op = &usb_hcd_operations;
+	hcd->self.hcpriv = (void *) hcd;
+	hcd->self.bus_name = "lh7a404";
+	hcd->product_desc = "LH7A404 OHCI";
+
+	INIT_LIST_HEAD (&hcd->dev_list);
+
+	usb_register_bus (&hcd->self);
+
+	if ((retval = driver->start (hcd)) < 0)
+	{
+		usb_hcd_lh7a404_remove(hcd, dev);
+		return retval;
+	}
+
+	*hcd_out = hcd;
+	return 0;
+
+ err2:
+	hcd_buffer_destroy (hcd);
+	if (hcd)
+		driver->hcd_free(hcd);
+ err1:
+	lh7a404_stop_hc(dev);
+	release_mem_region(dev->resource[0].start,
+				dev->resource[0].end
+			   - dev->resource[0].start + 1);
+	return retval;
+}
+
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_lh7a404_remove - shutdown processing for LH7A404-based HCDs
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_lh7a404_probe(), first invoking
+ * the HCD's stop() method.  It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ */
+void usb_hcd_lh7a404_remove (struct usb_hcd *hcd, struct platform_device *dev)
+{
+	void *base;
+
+	pr_debug ("remove: %s, state %x", hcd->self.bus_name, hcd->state);
+
+	if (in_interrupt ())
+		BUG ();
+
+	hcd->state = USB_STATE_QUIESCING;
+
+	pr_debug ("%s: roothub graceful disconnect", hcd->self.bus_name);
+	usb_disconnect (&hcd->self.root_hub);
+
+	hcd->driver->stop (hcd);
+	hcd->state = USB_STATE_HALT;
+
+	free_irq (hcd->irq, hcd);
+	hcd_buffer_destroy (hcd);
+
+	usb_deregister_bus (&hcd->self);
+
+	base = hcd->regs;
+	hcd->driver->hcd_free (hcd);
+
+	lh7a404_stop_hc(dev);
+	release_mem_region(dev->resource[0].start,
+			   dev->resource[0].end
+			   - dev->resource[0].start + 1);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int __devinit
+ohci_lh7a404_start (struct usb_hcd *hcd)
+{
+	struct ohci_hcd	*ohci = hcd_to_ohci (hcd);
+	int		ret;
+
+	ohci_dbg (ohci, "ohci_lh7a404_start, ohci:%p", ohci);
+			
+	ohci->hcca = dma_alloc_coherent (hcd->self.controller,
+			sizeof *ohci->hcca, &ohci->hcca_dma, 0);
+	if (!ohci->hcca)
+		return -ENOMEM;
+
+	ohci_dbg (ohci, "ohci_lh7a404_start, ohci->hcca:%p",
+			ohci->hcca);
+
+	memset (ohci->hcca, 0, sizeof (struct ohci_hcca));
+
+	if ((ret = ohci_mem_init (ohci)) < 0) {
+		ohci_stop (hcd);
+		return ret;
+	}
+	ohci->regs = hcd->regs;
+
+	if (hc_reset (ohci) < 0) {
+		ohci_stop (hcd);
+		return -ENODEV;
+	}
+
+	if (hc_start (ohci) < 0) {
+		err ("can't start %s", ohci->hcd.self.bus_name);
+		ohci_stop (hcd);
+		return -EBUSY;
+	}
+	create_debug_files (ohci);
+
+#ifdef	DEBUG
+	ohci_dump (ohci, 1);
+#endif /*DEBUG*/
+	return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static const struct hc_driver ohci_lh7a404_hc_driver = {
+	.description =		hcd_name,
+
+	/*
+	 * generic hardware linkage
+	 */
+	.irq =			ohci_irq,
+	.flags =		HCD_USB11,
+
+	/*
+	 * basic lifecycle operations
+	 */
+	.start =		ohci_lh7a404_start,
+#ifdef	CONFIG_PM
+	/* suspend:		ohci_lh7a404_suspend,  -- tbd */
+	/* resume:		ohci_lh7a404_resume,   -- tbd */
+#endif /*CONFIG_PM*/
+	.stop =			ohci_stop,
+
+	/*
+	 * memory lifecycle (except per-request)
+	 */
+	.hcd_alloc =		ohci_hcd_alloc,
+	.hcd_free =		ohci_hcd_free,
+
+	/*
+	 * managing i/o requests and associated device resources
+	 */
+	.urb_enqueue =		ohci_urb_enqueue,
+	.urb_dequeue =		ohci_urb_dequeue,
+	.endpoint_disable =	ohci_endpoint_disable,
+
+	/*
+	 * scheduling support
+	 */
+	.get_frame_number =	ohci_get_frame,
+
+	/*
+	 * root hub support
+	 */
+	.hub_status_data =	ohci_hub_status_data,
+	.hub_control =		ohci_hub_control,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int ohci_hcd_lh7a404_drv_probe(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct usb_hcd *hcd = NULL;
+	int ret;
+
+	pr_debug ("In ohci_hcd_lh7a404_drv_probe");
+
+	if (usb_disabled())
+		return -ENODEV;
+
+	ret = usb_hcd_lh7a404_probe(&ohci_lh7a404_hc_driver, &hcd, pdev);
+
+	if (ret == 0)
+		dev_set_drvdata(dev, hcd);
+
+	return ret;
+}
+
+static int ohci_hcd_lh7a404_drv_remove(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+	usb_hcd_lh7a404_remove(hcd, pdev);
+	dev_set_drvdata(dev, NULL);
+	return 0;
+}
+	/*TBD*/
+/*static int ohci_hcd_lh7a404_drv_suspend(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+	return 0;
+}
+static int ohci_hcd_lh7a404_drv_resume(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+
+	return 0;
+}
+*/
+
+static struct device_driver ohci_hcd_lh7a404_driver = {
+	.name		= "lh7a404-ohci",
+	.bus		= &platform_bus_type,
+	.probe		= ohci_hcd_lh7a404_drv_probe,
+	.remove		= ohci_hcd_lh7a404_drv_remove,
+	/*.suspend	= ohci_hcd_lh7a404_drv_suspend, */
+	/*.resume	= ohci_hcd_lh7a404_drv_resume, */
+};
+
+static int __init ohci_hcd_lh7a404_init (void)
+{
+	pr_debug (DRIVER_INFO " (LH7A404)");
+	pr_debug ("block sizes: ed %d td %d\n",
+		sizeof (struct ed), sizeof (struct td));
+
+	return driver_register(&ohci_hcd_lh7a404_driver);
+}
+
+static void __exit ohci_hcd_lh7a404_cleanup (void)
+{
+	driver_unregister(&ohci_hcd_lh7a404_driver);
+}
+
+module_init (ohci_hcd_lh7a404_init);
+module_exit (ohci_hcd_lh7a404_cleanup);
--- diff/drivers/video/riva/rivafb-i2c.c	1970-01-01 01:00:00.000000000 +0100
+++ source/drivers/video/riva/rivafb-i2c.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,209 @@
+/*
+ * linux/drivers/video/riva/fbdev-i2c.c - nVidia i2c
+ *
+ * Maintained by Ani Joshi <ajoshi@shell.unixbox.com>
+ *
+ * Copyright 2004 Antonino A. Daplas <adaplas @pol.net>
+ *
+ * Based on radeonfb-i2c.c
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/delay.h>
+#include <linux/pci.h>
+#include <linux/fb.h>
+
+#include <asm/io.h>
+
+#include "rivafb.h"
+#include "../edid.h"
+
+#define RIVA_DDC 	0x50
+
+static void riva_gpio_setscl(void* data, int state)
+{
+	struct riva_i2c_chan 	*chan = (struct riva_i2c_chan *)data;
+	struct riva_par 	*par = chan->par;
+	u32			val;
+
+	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1);
+	val = VGA_RD08(par->riva.PCIO, 0x3d5) & 0xf0;
+
+	if (state)
+		val |= 0x20;
+	else
+		val &= ~0x20;
+
+	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1);
+	VGA_WR08(par->riva.PCIO, 0x3d5, val | 0x1);
+}
+
+static void riva_gpio_setsda(void* data, int state)
+{
+	struct riva_i2c_chan 	*chan = (struct riva_i2c_chan *)data;
+	struct riva_par 	*par = chan->par;
+	u32			val;
+
+	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1);
+	val = VGA_RD08(par->riva.PCIO, 0x3d5) & 0xf0;
+
+	if (state)
+		val |= 0x10;
+	else
+		val &= ~0x10;
+
+	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1);
+	VGA_WR08(par->riva.PCIO, 0x3d5, val | 0x1);
+}
+
+static int riva_gpio_getscl(void* data)
+{
+	struct riva_i2c_chan 	*chan = (struct riva_i2c_chan *)data;
+	struct riva_par 	*par = chan->par;
+	u32			val = 0;
+
+	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base);
+	if (VGA_RD08(par->riva.PCIO, 0x3d5) & 0x04)
+		val = 1;
+
+	val = VGA_RD08(par->riva.PCIO, 0x3d5);
+
+	return val;
+}
+
+static int riva_gpio_getsda(void* data)
+{
+	struct riva_i2c_chan 	*chan = (struct riva_i2c_chan *)data;
+	struct riva_par 	*par = chan->par;
+	u32			val = 0;
+
+	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base);
+	if (VGA_RD08(par->riva.PCIO, 0x3d5) & 0x08)
+		val = 1;
+
+	return val;
+}
+
+#define I2C_ALGO_RIVA   0x0e0000
+static int riva_setup_i2c_bus(struct riva_i2c_chan *chan, const char *name)
+{
+	int rc;
+
+	strcpy(chan->adapter.name, name);
+	chan->adapter.owner		= THIS_MODULE;
+	chan->adapter.id		= I2C_ALGO_RIVA;
+	chan->adapter.algo_data		= &chan->algo;
+	chan->adapter.dev.parent	= &chan->par->pdev->dev;
+	chan->algo.setsda		= riva_gpio_setsda;
+	chan->algo.setscl		= riva_gpio_setscl;
+	chan->algo.getsda		= riva_gpio_getsda;
+	chan->algo.getscl		= riva_gpio_getscl;
+	chan->algo.udelay		= 40;
+	chan->algo.timeout		= 20;
+	chan->algo.data 		= chan;
+
+	i2c_set_adapdata(&chan->adapter, chan);
+
+	/* Raise SCL and SDA */
+	riva_gpio_setsda(chan, 1);
+	riva_gpio_setscl(chan, 1);
+	udelay(20);
+
+	rc = i2c_bit_add_bus(&chan->adapter);
+	if (rc == 0)
+		dev_dbg(&chan->par->pdev->dev, "I2C bus %s registered.\n", name);
+	else
+		dev_warn(&chan->par->pdev->dev, "Failed to register I2C bus %s.\n", name);
+	return rc;
+}
+
+void riva_create_i2c_busses(struct riva_par *par)
+{
+	par->chan[0].par	= par;
+	par->chan[1].par	= par;
+	par->chan[2].par        = par;
+
+	switch (par->riva.Architecture) {
+#if 0		/* no support yet for other nVidia chipsets */
+		par->chan[2].ddc_base   = 0x50;
+		riva_setup_i2c_bus(&par->chan[2], "BUS2");
+#endif
+	case NV_ARCH_10:
+	case NV_ARCH_20:
+	case NV_ARCH_04:
+		par->chan[1].ddc_base	= 0x36;
+		riva_setup_i2c_bus(&par->chan[1], "BUS1");
+	case NV_ARCH_03:
+		par->chan[0].ddc_base	= 0x3e;
+		riva_setup_i2c_bus(&par->chan[0], "BUS0");
+	}
+}
+
+void riva_delete_i2c_busses(struct riva_par *par)
+{
+	if (par->chan[0].par)
+		i2c_bit_del_bus(&par->chan[0].adapter);
+	par->chan[0].par = NULL;
+
+	if (par->chan[1].par)
+		i2c_bit_del_bus(&par->chan[1].adapter);
+	par->chan[1].par = NULL;
+
+}
+
+static u8 *riva_do_probe_i2c_edid(struct riva_i2c_chan *chan)
+{
+	u8 start = 0x0;
+	struct i2c_msg msgs[] = {
+		{
+			.addr	= RIVA_DDC,
+			.len	= 1,
+			.buf	= &start,
+		}, {
+			.addr	= RIVA_DDC,
+			.flags	= I2C_M_RD,
+			.len	= EDID_LENGTH,
+		},
+	};
+	u8 *buf;
+
+	buf = kmalloc(EDID_LENGTH, GFP_KERNEL);
+	if (!buf) {
+		dev_warn(&chan->par->pdev->dev, "Out of memory!\n");
+		return NULL;
+	}
+	msgs[1].buf = buf;
+
+	if (i2c_transfer(&chan->adapter, msgs, 2) == 2)
+		return buf;
+	dev_dbg(&chan->par->pdev->dev, "Unable to read EDID block.\n");
+	kfree(buf);
+	return NULL;
+}
+
+int riva_probe_i2c_connector(struct riva_par *par, int conn, u8 **out_edid)
+{
+	u8 *edid = NULL;
+	int i;
+
+	for (i = 0; i < 3; i++) {
+		/* Do the real work */
+		edid = riva_do_probe_i2c_edid(&par->chan[conn-1]);
+		if (edid)
+			break;
+	}
+	if (out_edid)
+		*out_edid = edid;
+	if (!edid)
+		return 1;
+
+	return 0;
+}
+
--- diff/fs/ext3/resize.c	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/ext3/resize.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,951 @@
+/*
+ *  linux/fs/ext3/resize.c
+ *
+ * Support for resizing an ext3 filesystem while it is mounted.
+ *
+ * Copyright (C) 2001, 2002 Andreas Dilger <adilger@clusterfs.com>
+ *
+ * This could probably be made into a module, because it is not often in use.
+ */
+
+#include <linux/config.h>
+
+#define EXT3FS_DEBUG
+
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
+#include <linux/ext3_jbd.h>
+
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+
+#define outside(b, first, last)	((b) < (first) || (b) >= (last))
+#define inside(b, first, last)	((b) >= (first) && (b) < (last))
+
+static int verify_group_input(struct super_block *sb,
+			      struct ext3_new_group_data *input)
+{
+	struct ext3_sb_info *sbi = EXT3_SB(sb);
+	struct ext3_super_block *es = sbi->s_es;
+	unsigned start = le32_to_cpu(es->s_blocks_count);
+	unsigned end = start + input->blocks_count;
+	unsigned group = input->group;
+	unsigned itend = input->inode_table + EXT3_SB(sb)->s_itb_per_group;
+	unsigned overhead = ext3_bg_has_super(sb, group) ?
+		(1 + ext3_bg_num_gdb(sb, group) +
+		 le16_to_cpu(es->s_reserved_gdt_blocks)) : 0;
+	unsigned metaend = start + overhead;
+	struct buffer_head *bh;
+	int free_blocks_count;
+	int err = -EINVAL;
+
+	input->free_blocks_count = free_blocks_count =
+		input->blocks_count - 2 - overhead - sbi->s_itb_per_group;
+
+	if (test_opt(sb, DEBUG))
+		printk("EXT3-fs: adding %s group %u: %u blocks "
+		       "(%d free, %u reserved)\n",
+		       ext3_bg_has_super(sb, input->group) ? "normal" :
+		       "no-super", input->group, input->blocks_count,
+		       free_blocks_count, input->reserved_blocks);
+
+	if (group != sbi->s_groups_count)
+		ext3_warning(sb, __FUNCTION__,
+			     "Cannot add at group %u (only %lu groups)",
+			     input->group, sbi->s_groups_count);
+	else if ((start - le32_to_cpu(es->s_first_data_block)) %
+		 EXT3_BLOCKS_PER_GROUP(sb))
+		ext3_warning(sb, __FUNCTION__, "Last group not full");
+	else if (input->reserved_blocks > input->blocks_count / 5)
+		ext3_warning(sb, __FUNCTION__, "Reserved blocks too high (%u)",
+			     input->reserved_blocks);
+	else if (free_blocks_count < 0)
+		ext3_warning(sb, __FUNCTION__, "Bad blocks count %u",
+			     input->blocks_count);
+	else if (!(bh = sb_bread(sb, end - 1)))
+		ext3_warning(sb, __FUNCTION__, "Cannot read last block (%u)",
+			     end - 1);
+	else if (outside(input->block_bitmap, start, end))
+		ext3_warning(sb, __FUNCTION__,
+			     "Block bitmap not in group (block %u)",
+			     input->block_bitmap);
+	else if (outside(input->inode_bitmap, start, end))
+		ext3_warning(sb, __FUNCTION__,
+			     "Inode bitmap not in group (block %u)",
+			     input->inode_bitmap);
+	else if (outside(input->inode_table, start, end) ||
+	         outside(itend - 1, start, end))
+		ext3_warning(sb, __FUNCTION__,
+			     "Inode table not in group (blocks %u-%u)",
+			     input->inode_table, itend - 1);
+	else if (input->inode_bitmap == input->block_bitmap)
+		ext3_warning(sb, __FUNCTION__,
+			     "Block bitmap same as inode bitmap (%u)",
+			     input->block_bitmap);
+	else if (inside(input->block_bitmap, input->inode_table, itend))
+		ext3_warning(sb, __FUNCTION__,
+			     "Block bitmap (%u) in inode table (%u-%u)",
+			     input->block_bitmap, input->inode_table, itend-1);
+	else if (inside(input->inode_bitmap, input->inode_table, itend))
+		ext3_warning(sb, __FUNCTION__,
+			     "Inode bitmap (%u) in inode table (%u-%u)",
+			     input->inode_bitmap, input->inode_table, itend-1);
+	else if (inside(input->block_bitmap, start, metaend))
+		ext3_warning(sb, __FUNCTION__,
+			     "Block bitmap (%u) in GDT table (%u-%u)",
+			     input->block_bitmap, start, metaend - 1);
+	else if (inside(input->inode_bitmap, start, metaend))
+		ext3_warning(sb, __FUNCTION__,
+			     "Inode bitmap (%u) in GDT table (%u-%u)",
+			     input->inode_bitmap, start, metaend - 1);
+	else if (inside(input->inode_table, start, metaend) ||
+	         inside(itend - 1, start, metaend))
+		ext3_warning(sb, __FUNCTION__,
+			     "Inode table (%u-%u) overlaps GDT table (%u-%u)",
+			     input->inode_table, itend - 1, start, metaend - 1);
+	else {
+		brelse(bh);
+		err = 0;
+	}
+
+	return err;
+}
+
+static struct buffer_head *bclean(handle_t *handle, struct super_block *sb,
+				  unsigned long blk)
+{
+	struct buffer_head *bh;
+	int err;
+
+	bh = sb_getblk(sb, blk);
+	set_buffer_uptodate(bh);
+	if ((err = ext3_journal_get_write_access(handle, bh))) {
+		brelse(bh);
+		bh = ERR_PTR(err);
+	} else
+		memset(bh->b_data, 0, sb->s_blocksize);
+
+	return bh;
+}
+
+/*
+ * To avoid calling the atomic setbit hundreds or thousands of times, we only
+ * need to use it within a single byte (to ensure we get endianness right).
+ * We can use memset for the rest of the bitmap as there are no other users.
+ */
+static void mark_bitmap_end(int start_bit, int end_bit, char *bitmap)
+{
+	int i;
+
+	if (start_bit >= end_bit)
+		return;
+
+	ext3_debug("mark end bits +%d through +%d used\n", start_bit, end_bit);
+	for (i = start_bit; i < ((start_bit + 7) & ~7UL); i++)
+		ext3_set_bit(i, bitmap);
+	if (i < end_bit)
+		memset(bitmap + (i >> 3), 0xff, (end_bit - i) >> 3);
+}
+
+/*
+ * Set up the block and inode bitmaps, and the inode table for the new group.
+ * This doesn't need to be part of the main transaction, since we are only
+ * changing blocks outside the actual filesystem.  We still do journaling to
+ * ensure the recovery is correct in case of a failure just after resize.
+ * If any part of this fails, we simply abort the resize.
+ *
+ * We only pass inode because of the ext3 journal wrappers.
+ */
+static int setup_new_group_blocks(struct super_block *sb, struct inode *inode,
+				  struct ext3_new_group_data *input)
+{
+	struct ext3_sb_info *sbi = EXT3_SB(sb);
+	unsigned long start = input->group * sbi->s_blocks_per_group +
+		le32_to_cpu(sbi->s_es->s_first_data_block);
+	int reserved_gdb = ext3_bg_has_super(sb, input->group) ?
+		le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks) : 0;
+	unsigned long gdblocks = ext3_bg_num_gdb(sb, input->group);
+	struct buffer_head *bh;
+	handle_t *handle;
+	unsigned long block;
+	int bit;
+	int i;
+	int err = 0, err2;
+
+	handle = ext3_journal_start(inode, reserved_gdb + gdblocks +
+				    2 + sbi->s_itb_per_group);
+	if (IS_ERR(handle))
+		return PTR_ERR(handle);
+
+	lock_super(sb);
+	if (input->group != sbi->s_groups_count) {
+		err = -EBUSY;
+		goto exit_journal;
+	}
+
+	if (IS_ERR(bh = bclean(handle, sb, input->block_bitmap))) {
+		err = PTR_ERR(bh);
+		goto exit_journal;
+	}
+
+	if (ext3_bg_has_super(sb, input->group)) {
+		ext3_debug("mark backup superblock %#04lx (+0)\n", start);
+		ext3_set_bit(0, bh->b_data);
+	}
+
+	/* Copy all of the GDT blocks into the backup in this group */
+	for (i = 0, bit = 1, block = start + 1;
+	     i < gdblocks; i++, block++, bit++) {
+		struct buffer_head *gdb;
+
+		ext3_debug("update backup group %#04lx (+%d)\n", block, bit);
+
+		gdb = sb_getblk(sb, block);
+		set_buffer_uptodate(gdb);
+		if ((err = ext3_journal_get_write_access(handle, gdb))) {
+			brelse(gdb);
+			goto exit_bh;
+		}
+		memcpy(gdb->b_data, sbi->s_group_desc[i], bh->b_size);
+		ext3_journal_dirty_metadata(handle, gdb);
+		ext3_set_bit(bit, bh->b_data);
+		brelse(gdb);
+	}
+
+	/* Zero out all of the reserved backup group descriptor table blocks */
+	for (i = 0, bit = gdblocks + 1, block = start + bit;
+	     i < reserved_gdb; i++, block++, bit++) {
+		struct buffer_head *gdb;
+
+		ext3_debug("clear reserved block %#04lx (+%d)\n", block, bit);
+
+		if (IS_ERR(gdb = bclean(handle, sb, block))) {
+			err = PTR_ERR(bh);
+			goto exit_bh;
+		}
+		ext3_journal_dirty_metadata(handle, gdb);
+		ext3_set_bit(bit, bh->b_data);
+		brelse(gdb);
+	}
+	ext3_debug("mark block bitmap %#04x (+%ld)\n", input->block_bitmap,
+		   input->block_bitmap - start);
+	ext3_set_bit(input->block_bitmap - start, bh->b_data);
+	ext3_debug("mark inode bitmap %#04x (+%ld)\n", input->inode_bitmap,
+		   input->inode_bitmap - start);
+	ext3_set_bit(input->inode_bitmap - start, bh->b_data);
+
+	/* Zero out all of the inode table blocks */
+	for (i = 0, block = input->inode_table, bit = block - start;
+	     i < sbi->s_itb_per_group; i++, bit++, block++) {
+		struct buffer_head *it;
+
+		ext3_debug("clear inode block %#04x (+%ld)\n", block, bit);
+		if (IS_ERR(it = bclean(handle, sb, block))) {
+			err = PTR_ERR(it);
+			goto exit_bh;
+		}
+		ext3_journal_dirty_metadata(handle, it);
+		brelse(it);
+		ext3_set_bit(bit, bh->b_data);
+	}
+	mark_bitmap_end(input->blocks_count, EXT3_BLOCKS_PER_GROUP(sb),
+			bh->b_data);
+	ext3_journal_dirty_metadata(handle, bh);
+	brelse(bh);
+
+	/* Mark unused entries in inode bitmap used */
+	ext3_debug("clear inode bitmap %#04x (+%ld)\n",
+		   input->inode_bitmap, input->inode_bitmap - start);
+	if (IS_ERR(bh = bclean(handle, sb, input->inode_bitmap))) {
+		err = PTR_ERR(bh);
+		goto exit_journal;
+	}
+
+	mark_bitmap_end(EXT3_INODES_PER_GROUP(sb), EXT3_BLOCKS_PER_GROUP(sb),
+			bh->b_data);
+	ext3_journal_dirty_metadata(handle, bh);
+exit_bh:
+	brelse(bh);
+
+exit_journal:
+	unlock_super(sb);
+	if ((err2 = ext3_journal_stop(handle)) && !err)
+		err = err2;
+
+	return err;
+}
+
+/*
+ * Iterate through the groups which hold BACKUP superblock/GDT copies in an
+ * ext3 filesystem.  The counters should be initialized to 1, 5, and 7 before
+ * calling this for the first time.  In a sparse filesystem it will be the
+ * sequence of powers of 3, 5, and 7: 1, 3, 5, 7, 9, 25, 27, 49, 81, ...
+ * For a non-sparse filesystem it will be every group: 1, 2, 3, 4, ...
+ */
+unsigned ext3_list_backups(struct super_block *sb, unsigned *three,
+			   unsigned *five, unsigned *seven)
+{
+	unsigned *min = three;
+	int mult = 3;
+	unsigned ret;
+
+	if (!EXT3_HAS_RO_COMPAT_FEATURE(sb,
+					EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
+		ret = *min;
+		*min += 1;
+		return ret;
+	}
+
+	if (*five < *min) {
+		min = five;
+		mult = 5;
+	}
+	if (*seven < *min) {
+		min = seven;
+		mult = 7;
+	}
+
+	ret = *min;
+	*min *= mult;
+
+	return ret;
+}
+
+/*
+ * Check that all of the backup GDT blocks are held in the primary GDT block.
+ * It is assumed that they are stored in group order.  Returns the number of
+ * groups in current filesystem that have BACKUPS, or -ve error code.
+ */
+static int verify_reserved_gdb(struct super_block *sb,
+			       struct buffer_head *primary)
+{
+	const unsigned long blk = primary->b_blocknr;
+	const unsigned long end = EXT3_SB(sb)->s_groups_count;
+	unsigned three = 1;
+	unsigned five = 5;
+	unsigned seven = 7;
+	unsigned grp;
+	__u32 *p = (__u32 *)primary->b_data;
+	int gdbackups = 0;
+
+	while ((grp = ext3_list_backups(sb, &three, &five, &seven)) < end) {
+		if (le32_to_cpu(*p++) != grp * EXT3_BLOCKS_PER_GROUP(sb) + blk){
+			ext3_warning(sb, __FUNCTION__,
+				     "reserved GDT %ld missing grp %d (%ld)\n",
+				     blk, grp,
+				     grp * EXT3_BLOCKS_PER_GROUP(sb) + blk);
+			return -EINVAL;
+		}
+		if (++gdbackups > EXT3_ADDR_PER_BLOCK(sb))
+			return -EFBIG;
+	}
+
+	return gdbackups;
+}
+
+/*
+ * Called when we need to bring a reserved group descriptor table block into
+ * use from the resize inode.  The primary copy of the new GDT block currently
+ * is an indirect block (under the double indirect block in the resize inode).
+ * The new backup GDT blocks will be stored as leaf blocks in this indirect
+ * block, in group order.  Even though we know all the block numbers we need,
+ * we check to ensure that the resize inode has actually reserved these blocks.
+ *
+ * Don't need to update the block bitmaps because the blocks are still in use.
+ *
+ * We get all of the error cases out of the way, so that we are sure to not
+ * fail once we start modifying the data on disk, because JBD has no rollback.
+ */
+static int add_new_gdb(handle_t *handle, struct inode *inode,
+		       struct ext3_new_group_data *input,
+		       struct buffer_head **primary)
+{
+	struct super_block *sb = inode->i_sb;
+	struct ext3_super_block *es = EXT3_SB(sb)->s_es;
+	unsigned long gdb_num = input->group / EXT3_DESC_PER_BLOCK(sb);
+	unsigned long gdblock = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + gdb_num;
+	struct buffer_head **o_group_desc, **n_group_desc;
+	struct buffer_head *dind;
+	int gdbackups;
+	struct ext3_iloc iloc;
+	__u32 *data;
+	int err;
+
+	if (test_opt(sb, DEBUG))
+		printk("EXT3-fs: ext3_add_new_gdb: adding group block %lu\n",
+		       gdb_num);
+
+	/*
+	 * If we are not using the primary superblock/GDT copy don't resize,
+	 * because the user tools have no way of handling this.  Probably a
+	 * bad time to do it anyways.
+	 */
+	if (EXT3_SB(sb)->s_sbh->b_blocknr !=
+	    le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block)) {
+		ext3_warning(sb, __FUNCTION__,
+			"won't resize using backup superblock at %llu\n",
+			(unsigned long long)EXT3_SB(sb)->s_sbh->b_blocknr);
+		return -EPERM;
+	}
+
+	*primary = sb_bread(sb, gdblock);
+	if (!*primary)
+		return -EIO;
+
+	if ((gdbackups = verify_reserved_gdb(sb, *primary)) < 0) {
+		err = gdbackups;
+		goto exit_bh;
+	}
+
+	data = EXT3_I(inode)->i_data + EXT3_DIND_BLOCK;
+	dind = sb_bread(sb, le32_to_cpu(*data));
+	if (!dind) {
+		err = -EIO;
+		goto exit_bh;
+	}
+
+	data = (__u32 *)dind->b_data;
+	if (le32_to_cpu(data[gdb_num % EXT3_ADDR_PER_BLOCK(sb)]) != gdblock) {
+		ext3_warning(sb, __FUNCTION__,
+			     "new group %u GDT block %lu not reserved\n",
+			     input->group, gdblock);
+		err = -EINVAL;
+		goto exit_dind;
+	}
+
+	if ((err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh)))
+		goto exit_dind;
+
+	if ((err = ext3_journal_get_write_access(handle, *primary)))
+		goto exit_sbh;
+
+	if ((err = ext3_journal_get_write_access(handle, dind)))
+		goto exit_primary;
+
+	/* ext3_reserve_inode_write() gets a reference on the iloc */
+	if ((err = ext3_reserve_inode_write(handle, inode, &iloc)))
+		goto exit_dindj;
+
+	n_group_desc = (struct buffer_head **)kmalloc((gdb_num + 1) *
+				sizeof(struct buffer_head *), GFP_KERNEL);
+	if (!n_group_desc) {
+		err = -ENOMEM;
+		ext3_warning (sb, __FUNCTION__,
+			      "not enough memory for %lu groups", gdb_num + 1);
+		goto exit_inode;
+	}
+
+	/*
+	 * Finally, we have all of the possible failures behind us...
+	 *
+	 * Remove new GDT block from inode double-indirect block and clear out
+	 * the new GDT block for use (which also "frees" the backup GDT blocks
+	 * from the reserved inode).  We don't need to change the bitmaps for
+	 * these blocks, because they are marked as in-use from being in the
+	 * reserved inode, and will become GDT blocks (primary and backup).
+	 */
+	data[gdb_num % EXT3_ADDR_PER_BLOCK(sb)] = 0;
+	ext3_journal_dirty_metadata(handle, dind);
+	brelse(dind);
+	inode->i_blocks -= (gdbackups + 1) * sb->s_blocksize >> 9;
+	ext3_mark_iloc_dirty(handle, inode, &iloc);
+	memset((*primary)->b_data, 0, sb->s_blocksize);
+	ext3_journal_dirty_metadata(handle, *primary);
+
+	o_group_desc = EXT3_SB(sb)->s_group_desc;
+	memcpy(n_group_desc, o_group_desc,
+	       EXT3_SB(sb)->s_gdb_count * sizeof(struct buffer_head *));
+	n_group_desc[gdb_num] = *primary;
+	EXT3_SB(sb)->s_group_desc = n_group_desc;
+	EXT3_SB(sb)->s_gdb_count++;
+	kfree(o_group_desc);
+
+	es->s_reserved_gdt_blocks =
+		cpu_to_le16(le16_to_cpu(es->s_reserved_gdt_blocks) - 1);
+	ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
+
+	return 0;
+
+exit_inode:
+	//ext3_journal_release_buffer(handle, iloc.bh);
+	brelse(iloc.bh);
+exit_dindj:
+	//ext3_journal_release_buffer(handle, dind);
+exit_primary:
+	//ext3_journal_release_buffer(handle, *primary);
+exit_sbh:
+	//ext3_journal_release_buffer(handle, *primary);
+exit_dind:
+	brelse(dind);
+exit_bh:
+	brelse(*primary);
+
+	ext3_debug("leaving with error %d\n", err);
+	return err;
+}
+
+/*
+ * Called when we are adding a new group which has a backup copy of each of
+ * the GDT blocks (i.e. sparse group) and there are reserved GDT blocks.
+ * We need to add these reserved backup GDT blocks to the resize inode, so
+ * that they are kept for future resizing and not allocated to files.
+ *
+ * Each reserved backup GDT block will go into a different indirect block.
+ * The indirect blocks are actually the primary reserved GDT blocks,
+ * so we know in advance what their block numbers are.  We only get the
+ * double-indirect block to verify it is pointing to the primary reserved
+ * GDT blocks so we don't overwrite a data block by accident.  The reserved
+ * backup GDT blocks are stored in their reserved primary GDT block.
+ */
+static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
+			      struct ext3_new_group_data *input)
+{
+	struct super_block *sb = inode->i_sb;
+	int reserved_gdb =le16_to_cpu(EXT3_SB(sb)->s_es->s_reserved_gdt_blocks);
+	struct buffer_head **primary;
+	struct buffer_head *dind;
+	struct ext3_iloc iloc;
+	unsigned long blk;
+	__u32 *data, *end;
+	int gdbackups = 0;
+	int res, i;
+	int err;
+
+	primary = kmalloc(reserved_gdb * sizeof(*primary), GFP_KERNEL);
+	if (!primary)
+		return -ENOMEM;
+
+	data = EXT3_I(inode)->i_data + EXT3_DIND_BLOCK;
+	dind = sb_bread(sb, le32_to_cpu(*data));
+	if (!dind) {
+		err = -EIO;
+		goto exit_free;
+	}
+
+	blk = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + EXT3_SB(sb)->s_gdb_count;
+	data = (__u32 *)dind->b_data + EXT3_SB(sb)->s_gdb_count;
+	end = (__u32 *)dind->b_data + EXT3_ADDR_PER_BLOCK(sb);
+
+	/* Get each reserved primary GDT block and verify it holds backups */
+	for (res = 0; res < reserved_gdb; res++, blk++) {
+		if (le32_to_cpu(*data) != blk) {
+			ext3_warning(sb, __FUNCTION__,
+				     "reserved block %lu not at offset %ld\n",
+				     blk, (long)(data - (__u32 *)dind->b_data));
+			err = -EINVAL;
+			goto exit_bh;
+		}
+		primary[res] = sb_bread(sb, blk);
+		if (!primary[res]) {
+			err = -EIO;
+			goto exit_bh;
+		}
+		if ((gdbackups = verify_reserved_gdb(sb, primary[res])) < 0) {
+			brelse(primary[res]);
+			err = gdbackups;
+			goto exit_bh;
+		}
+		if (++data >= end)
+			data = (__u32 *)dind->b_data;
+	}
+
+	for (i = 0; i < reserved_gdb; i++) {
+		if ((err = ext3_journal_get_write_access(handle, primary[i]))) {
+			/*
+			int j;
+			for (j = 0; j < i; j++)
+				ext3_journal_release_buffer(handle, primary[j]);
+			 */
+			goto exit_bh;
+		}
+	}
+
+	if ((err = ext3_reserve_inode_write(handle, inode, &iloc)))
+		goto exit_bh;
+
+	/*
+	 * Finally we can add each of the reserved backup GDT blocks from
+	 * the new group to its reserved primary GDT block.
+	 */
+	blk = input->group * EXT3_BLOCKS_PER_GROUP(sb);
+	for (i = 0; i < reserved_gdb; i++) {
+		int err2;
+		data = (__u32 *)primary[i]->b_data;
+		/* printk("reserving backup %lu[%u] = %lu\n",
+		       primary[i]->b_blocknr, gdbackups,
+		       blk + primary[i]->b_blocknr); */
+		data[gdbackups] = cpu_to_le32(blk + primary[i]->b_blocknr);
+		err2 = ext3_journal_dirty_metadata(handle, primary[i]);
+		if (!err)
+			err = err2;
+	}
+	inode->i_blocks += reserved_gdb * sb->s_blocksize >> 9;
+	ext3_mark_iloc_dirty(handle, inode, &iloc);
+
+exit_bh:
+	while (--res >= 0)
+		brelse(primary[res]);
+	brelse(dind);
+
+exit_free:
+	kfree(primary);
+
+	return err;
+}
+
+/*
+ * Update the backup copies of the ext3 metadata.  These don't need to be part
+ * of the main resize transaction, because e2fsck will re-write them if there
+ * is a problem (basically only OOM will cause a problem).  However, we
+ * _should_ update the backups if possible, in case the primary gets trashed
+ * for some reason and we need to run e2fsck from a backup superblock.  The
+ * important part is that the new block and inode counts are in the backup
+ * superblocks, and the location of the new group metadata in the GDT backups.
+ *
+ * We do not need lock_super() for this, because these blocks are not
+ * otherwise touched by the filesystem code when it is mounted.  We don't
+ * need to worry about last changing from sbi->s_groups_count, because the
+ * worst that can happen is that we do not copy the full number of backups
+ * at this time.  The resize which changed s_groups_count will backup again.
+ *
+ * We only pass inode because of the ext3 journal wrappers.
+ */
+static void update_backups(struct super_block *sb, struct inode *inode,
+			   int blk_off, char *data, int size)
+{
+	struct ext3_sb_info *sbi = EXT3_SB(sb);
+	const unsigned long last = sbi->s_groups_count;
+	const int bpg = EXT3_BLOCKS_PER_GROUP(sb);
+	unsigned three = 1;
+	unsigned five = 5;
+	unsigned seven = 7;
+	unsigned group;
+	int rest = sb->s_blocksize - size;
+	handle_t *handle;
+	int err = 0, err2;
+
+	handle = ext3_journal_start(inode, EXT3_MAX_TRANS_DATA);
+	if (IS_ERR(handle)) {
+		group = 1;
+		err = PTR_ERR(handle);
+		goto exit_err;
+	}
+
+	while ((group = ext3_list_backups(sb, &three, &five, &seven)) < last) {
+		struct buffer_head *bh;
+
+		/* Out of journal space, and can't get more - abort - so sad */
+		if (handle->h_buffer_credits == 0 &&
+		    ext3_journal_extend(handle, EXT3_MAX_TRANS_DATA) &&
+		    (err = ext3_journal_restart(handle, EXT3_MAX_TRANS_DATA)))
+			break;
+
+		bh = sb_getblk(sb, group * bpg + blk_off);
+		set_buffer_uptodate(bh);
+		ext3_debug(sb, __FUNCTION__, "update metadata backup %#04lx\n",
+			   bh->b_blocknr);
+		if ((err = ext3_journal_get_write_access(handle, bh)))
+			break;
+		memcpy(bh->b_data, data, size);
+		if (rest)
+			memset(bh->b_data + size, 0, rest);
+		ext3_journal_dirty_metadata(handle, bh);
+		brelse(bh);
+	}
+	if ((err2 = ext3_journal_stop(handle)) && !err)
+		err = err2;
+
+	/*
+	 * Ugh! Need to have e2fsck write the backup copies.  It is too
+	 * late to revert the resize, we shouldn't fail just because of
+	 * the backup copies (they are only needed in case of corruption).
+	 *
+	 * However, if we got here we have a journal problem too, so we
+	 * can't really start a transaction to mark the superblock.
+	 * Chicken out and just set the flag on the hope it will be written
+	 * to disk, and if not - we will simply wait until next fsck.
+	 */
+exit_err:
+	if (err) {
+		ext3_warning(sb, __FUNCTION__,
+			     "can't update backup for group %d (err %d), "
+			     "forcing fsck on next reboot\n", group, err);
+		sbi->s_mount_state &= ~EXT3_VALID_FS;
+		sbi->s_es->s_state &= ~cpu_to_le16(EXT3_VALID_FS);
+		mark_buffer_dirty(sbi->s_sbh);
+	}
+}
+
+/* Add group descriptor data to an existing or new group descriptor block.
+ * Ensure we handle all possible error conditions _before_ we start modifying
+ * the filesystem, because we cannot abort the transaction and not have it
+ * write the data to disk.
+ *
+ * If we are on a GDT block boundary, we need to get the reserved GDT block.
+ * Otherwise, we may need to add backup GDT blocks for a sparse group.
+ *
+ * We only need to hold the superblock lock while we are actually adding
+ * in the new group's counts to the superblock.  Prior to that we have
+ * not really "added" the group at all.  We re-check that we are still
+ * adding in the last group in case things have changed since verifying.
+ */
+int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input)
+{
+	struct ext3_sb_info *sbi = EXT3_SB(sb);
+	struct ext3_super_block *es = sbi->s_es;
+	int reserved_gdb = ext3_bg_has_super(sb, input->group) ?
+		le16_to_cpu(es->s_reserved_gdt_blocks) : 0;
+	struct buffer_head *primary = NULL;
+	struct ext3_group_desc *gdp;
+	struct inode *inode = NULL;
+	struct inode bogus;
+	handle_t *handle;
+	int gdb_off, gdb_num;
+	int err, err2;
+
+	gdb_num = input->group / EXT3_DESC_PER_BLOCK(sb);
+	gdb_off = input->group % EXT3_DESC_PER_BLOCK(sb);
+
+	if (gdb_off == 0 && !EXT3_HAS_RO_COMPAT_FEATURE(sb,
+					EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
+		ext3_warning(sb, __FUNCTION__,
+			     "Can't resize non-sparse filesystem further\n");
+		return -EPERM;
+	}
+
+	if (reserved_gdb || gdb_off == 0) {
+		if (!EXT3_HAS_COMPAT_FEATURE(sb,
+					     EXT3_FEATURE_COMPAT_RESIZE_INODE)){
+			ext3_warning(sb, __FUNCTION__,
+				     "No reserved GDT blocks, can't resize\n");
+			return -EPERM;
+		}
+		inode = iget(sb, EXT3_RESIZE_INO);
+		if (!inode || is_bad_inode(inode)) {
+			ext3_warning(sb, __FUNCTION__,
+				     "Error opening resize inode\n");
+			iput(inode);
+			return -ENOENT;
+		}
+	} else {
+		/* Used only for ext3 journal wrapper functions to get sb */
+		inode = &bogus;
+		bogus.i_sb = sb;
+	}
+
+	if ((err = verify_group_input(sb, input)))
+		goto exit_put;
+
+	if ((err = setup_new_group_blocks(sb, inode, input)))
+		goto exit_put;
+
+	/*
+	 * We will always be modifying at least the superblock and a GDT
+	 * block.  If we are adding a group past the last current GDT block,
+	 * we will also modify the inode and the dindirect block.  If we
+	 * are adding a group with superblock/GDT backups  we will also
+	 * modify each of the reserved GDT dindirect blocks.
+	 */
+	handle = ext3_journal_start(inode, ext3_bg_has_super(sb, input->group) ?
+				    3 + reserved_gdb : 4);
+	if (IS_ERR(handle)) {
+		err = PTR_ERR(handle);
+		goto exit_put;
+	}
+
+	lock_super(sb);
+	if (input->group != EXT3_SB(sb)->s_groups_count) {
+		ext3_warning(sb, __FUNCTION__,
+			     "multiple resizers run on filesystem!\n");
+		goto exit_journal;
+	}
+
+	if ((err = ext3_journal_get_write_access(handle, sbi->s_sbh)))
+		goto exit_journal;
+
+	/*
+	 * We will only either add reserved group blocks to a backup group
+	 * or remove reserved blocks for the first group in a new group block.
+	 * Doing both would be mean more complex code, and sane people don't
+	 * use non-sparse filesystems anymore.  This is already checked above.
+	 */
+	if (gdb_off) {
+		primary = sbi->s_group_desc[gdb_num];
+		if ((err = ext3_journal_get_write_access(handle, primary)))
+			goto exit_journal;
+
+		if (reserved_gdb && ext3_bg_num_gdb(sb, input->group) &&
+		    (err = reserve_backup_gdb(handle, inode, input)))
+			goto exit_journal;
+	} else if ((err = add_new_gdb(handle, inode, input, &primary)))
+		goto exit_journal;
+
+	/* Finally update group descriptor block for new group */
+	gdp = (struct ext3_group_desc *)primary->b_data + gdb_off;
+
+	gdp->bg_block_bitmap = cpu_to_le32(input->block_bitmap);
+	gdp->bg_inode_bitmap = cpu_to_le32(input->inode_bitmap);
+	gdp->bg_inode_table = cpu_to_le32(input->inode_table);
+	gdp->bg_free_blocks_count = cpu_to_le16(input->free_blocks_count);
+	gdp->bg_free_inodes_count = cpu_to_le16(EXT3_INODES_PER_GROUP(sb));
+
+	EXT3_SB(sb)->s_groups_count++;
+	ext3_journal_dirty_metadata(handle, primary);
+
+	/* Update superblock with new block counts */
+	es->s_blocks_count = cpu_to_le32(le32_to_cpu(es->s_blocks_count) +
+		input->blocks_count);
+	es->s_free_blocks_count =
+		cpu_to_le32(le32_to_cpu(es->s_free_blocks_count) +
+			    input->free_blocks_count);
+	es->s_r_blocks_count = cpu_to_le32(le32_to_cpu(es->s_r_blocks_count) +
+		input->reserved_blocks);
+	es->s_inodes_count = cpu_to_le32(le32_to_cpu(es->s_inodes_count) +
+		EXT3_INODES_PER_GROUP(sb));
+	es->s_free_inodes_count =
+		cpu_to_le32(le32_to_cpu(es->s_free_inodes_count) +
+			    EXT3_INODES_PER_GROUP(sb));
+	ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
+	sb->s_dirt = 1;
+
+exit_journal:
+	unlock_super(sb);
+	handle->h_sync = 1;
+	if ((err2 = ext3_journal_stop(handle)) && !err)
+		err = err2;
+	if (!err) {
+		update_backups(sb, inode, sbi->s_sbh->b_blocknr, (char *)es,
+			       sizeof(struct ext3_super_block));
+		update_backups(sb, inode, primary->b_blocknr, primary->b_data,
+			       primary->b_size);
+	}
+exit_put:
+	if (inode != &bogus)
+		iput(inode);
+	return err;
+} /* ext3_group_add */
+
+/* Extend the filesystem to the new number of blocks specified.  This entry
+ * point is only used to extend the current filesystem to the end of the last
+ * existing group.  It can be accessed via ioctl, or by "remount,resize=<size>"
+ * for emergencies (because it has no dependencies on reserved blocks).
+ *
+ * If we _really_ wanted, we could use default values to call ext3_group_add()
+ * allow the "remount" trick to work for arbitrary resizing, assuming enough
+ * GDT blocks are reserved to grow to the desired size.
+ */
+int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es,
+		      unsigned long n_blocks_count)
+{
+	unsigned long o_blocks_count;
+	unsigned long o_groups_count;
+	unsigned long last;
+	int add;
+	struct inode *inode;
+	struct buffer_head * bh;
+	handle_t *handle;
+	int err;
+
+	o_blocks_count = le32_to_cpu(es->s_blocks_count);
+	o_groups_count = EXT3_SB(sb)->s_groups_count;
+
+	if (test_opt(sb, DEBUG))
+		printk("EXT3-fs: extending last group from %lu to %lu blocks\n",
+		       o_blocks_count, n_blocks_count);
+
+	if (n_blocks_count == 0 || n_blocks_count == o_blocks_count)
+		return 0;
+
+	if (n_blocks_count < o_blocks_count) {
+		ext3_warning(sb, __FUNCTION__,
+			     "can't shrink FS - resize aborted");
+		return -EBUSY;
+	}
+
+	/* Handle the remaining blocks in the last group only. */
+	last = (o_blocks_count - le32_to_cpu(es->s_first_data_block)) %
+		EXT3_BLOCKS_PER_GROUP(sb);
+
+	if (last == 0) {
+		ext3_warning(sb, __FUNCTION__,
+			     "need to use ext2online to resize further\n");
+		return -EPERM;
+	}
+
+	add = EXT3_BLOCKS_PER_GROUP(sb) - last;
+
+	if (o_blocks_count + add > n_blocks_count)
+		add = n_blocks_count - o_blocks_count;
+
+	if (o_blocks_count + add < n_blocks_count)
+		ext3_warning(sb, __FUNCTION__,
+			     "will only finish group (%lu blocks, %u new)",
+			     o_blocks_count + add, add);
+
+	/* See if the device is actually as big as what was requested */
+	bh = sb_bread(sb, o_blocks_count + add -1);
+	if (!bh) {
+		ext3_warning(sb, __FUNCTION__,
+			     "can't read last block, resize aborted");
+		return -ENOSPC;
+	}
+	brelse(bh);
+
+	/* Get a bogus inode to "free" the new blocks in this group. */
+	if (!(inode = new_inode(sb))) {
+		ext3_warning(sb, __FUNCTION__,
+			     "error getting dummy resize inode");
+		return -ENOMEM;
+	}
+	inode->i_ino = 0;
+
+	EXT3_I(inode)->i_state = EXT3_STATE_RESIZE;
+
+	/* We will update the superblock, one block bitmap, and
+	 * one group descriptor via ext3_free_blocks().
+	 */
+	handle = ext3_journal_start(inode, 3);
+	if (IS_ERR(handle)) {
+		err = PTR_ERR(handle);
+		ext3_warning(sb, __FUNCTION__, "error %d on journal start",err);
+		goto exit_put;
+	}
+
+	lock_super(sb);
+	if (o_blocks_count != le32_to_cpu(es->s_blocks_count)) {
+		ext3_warning(sb, __FUNCTION__,
+			     "multiple resizers run on filesystem!\n");
+		err = -EBUSY;
+		goto exit_put;
+	}
+
+	if ((err = ext3_journal_get_write_access(handle,
+						 EXT3_SB(sb)->s_sbh))) {
+		ext3_warning(sb, __FUNCTION__,
+			     "error %d on journal write access", err);
+		unlock_super(sb);
+		ext3_journal_stop(handle);
+		goto exit_put;
+	}
+	es->s_blocks_count = cpu_to_le32(o_blocks_count + add);
+	ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
+	sb->s_dirt = 1;
+	unlock_super(sb);
+	ext3_debug("freeing blocks %ld through %ld\n", o_blocks_count,
+		   o_blocks_count + add);
+	ext3_free_blocks(handle, inode, o_blocks_count, add);
+	ext3_debug("freed blocks %ld through %ld\n", o_blocks_count,
+		   o_blocks_count + add);
+	if ((err = ext3_journal_stop(handle)))
+		goto exit_put;
+	if (test_opt(sb, DEBUG))
+		printk("EXT3-fs: extended group to %u blocks\n",
+		       le32_to_cpu(es->s_blocks_count));
+	update_backups(sb, inode, EXT3_SB(sb)->s_sbh->b_blocknr, (char *)es,
+		       sizeof(struct ext3_super_block));
+exit_put:
+	iput(inode);
+
+	return err;
+} /* ext3_group_extend */
--- diff/fs/isofs/export.c	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/isofs/export.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,228 @@
+/*
+ * fs/isofs/export.c
+ *
+ *  (C) 2004  Paul Serice - The new inode scheme requires switching
+ *                          from iget() to iget5_locked() which means
+ *                          the NFS export operations have to be hand
+ *                          coded because the default routines rely on
+ *                          iget().
+ *
+ * The following files are helpful:
+ *
+ *     Documentation/filesystems/Exporting
+ *     fs/exportfs/expfs.c.
+ */
+
+#include <linux/buffer_head.h>
+#include <linux/errno.h>
+#include <linux/fs.h>
+#include <linux/iso_fs.h>
+#include <linux/kernel.h>
+
+static struct dentry *
+isofs_export_iget(struct super_block *sb,
+		  unsigned long block,
+		  unsigned long offset,
+		  __u32 generation)
+{
+	struct inode *inode;
+	struct dentry *result;
+	if (block == 0)
+		return ERR_PTR(-ESTALE);
+	inode = isofs_iget(sb, block, offset);
+	if (inode == NULL)
+		return ERR_PTR(-ENOMEM);
+	if (is_bad_inode(inode)
+	    || (generation && inode->i_generation != generation))
+	{
+		iput(inode);
+		return ERR_PTR(-ESTALE);
+	}
+	result = d_alloc_anon(inode);
+	if (!result) {
+		iput(inode);
+		return ERR_PTR(-ENOMEM);
+	}
+	return result;
+}
+
+static struct dentry *
+isofs_export_get_dentry(struct super_block *sb, void *vobjp)
+{
+	__u32 *objp = vobjp;
+	unsigned long block = objp[0];
+	unsigned long offset = objp[1];
+	__u32 generation = objp[2];
+	return isofs_export_iget(sb, block, offset, generation);
+}
+
+/* This function is surprisingly simple.  The trick is understanding
+ * that "child" is always a directory. So, to find its parent, you
+ * simply need to find its ".." entry, normalize its block and offset,
+ * and return the underlying inode.  See the comments for
+ * isofs_normalize_block_and_offset(). */
+static struct dentry *isofs_export_get_parent(struct dentry *child)
+{
+	unsigned long parent_block = 0;
+	unsigned long parent_offset = 0;
+	struct inode *child_inode = child->d_inode;
+	struct iso_inode_info *e_child_inode = ISOFS_I(child_inode);
+	struct inode *parent_inode = NULL;
+	struct iso_directory_record *de = NULL;
+	struct buffer_head * bh = NULL;
+	struct dentry *rv = NULL;
+
+	/* "child" must always be a directory. */
+	if (!S_ISDIR(child_inode->i_mode)) {
+		printk(KERN_ERR "isofs: isofs_export_get_parent(): "
+		       "child is not a directory!\n");
+		rv = ERR_PTR(-EACCES);
+		goto out;
+	}
+
+	/* It is an invariant that the directory offset is zero.  If
+	 * it is not zero, it means the directory failed to be
+	 * normalized for some reason. */
+	if (e_child_inode->i_iget5_offset != 0) {
+		printk(KERN_ERR "isofs: isofs_export_get_parent(): "
+		       "child directory not normalized!\n");
+		rv = ERR_PTR(-EACCES);
+		goto out;
+	}
+
+	/* The child inode has been normalized such that its
+	 * i_iget5_block value points to the "." entry.  Fortunately,
+	 * the ".." entry is located in the same block. */
+	parent_block = e_child_inode->i_iget5_block;
+
+	/* Get the block in question. */
+	bh = sb_bread(child_inode->i_sb, parent_block);
+	if (bh == NULL) {
+		rv = ERR_PTR(-EACCES);
+		goto out;
+	}
+
+	/* This is the "." entry. */
+	de = (struct iso_directory_record*)bh->b_data;
+
+	/* The ".." entry is always the second entry. */
+	parent_offset = (unsigned long)isonum_711(de->length);
+	de = (struct iso_directory_record*)(bh->b_data + parent_offset);
+
+	/* Verify it is in fact the ".." entry. */
+	if ((isonum_711(de->name_len) != 1) || (de->name[0] != 1)) {
+		printk(KERN_ERR "isofs: Unable to find the \"..\" "
+		       "directory for NFS.\n");
+		rv = ERR_PTR(-EACCES);
+		goto out;
+	}
+
+	/* Normalize */
+	isofs_normalize_block_and_offset(de, &parent_block, &parent_offset);
+
+	/* Get the inode. */
+	parent_inode = isofs_iget(child_inode->i_sb,
+				  parent_block,
+				  parent_offset);
+	if (parent_inode == NULL) {
+		rv = ERR_PTR(-EACCES);
+		goto out;
+	}
+
+	/* Allocate the dentry. */
+	rv = d_alloc_anon(parent_inode);
+	if (rv == NULL) {
+		rv = ERR_PTR(-ENOMEM);
+		goto out;
+	}
+
+ out:
+	if (bh) {
+		brelse(bh);
+	}
+	return rv;
+}
+
+static int
+isofs_export_encode_fh(struct dentry *dentry,
+		       __u32 *fh32,
+		       int *max_len,
+		       int connectable)
+{
+	struct inode * inode = dentry->d_inode;
+	struct iso_inode_info * ei = ISOFS_I(inode);
+	int len = *max_len;
+	int type = 1;
+	__u16 *fh16 = (__u16*)fh32;
+
+	/*
+	 * WARNING: max_len is 5 for NFSv2.  Because of this
+	 * limitation, we use the lower 16 bits of fh32[1] to hold the
+	 * offset of the inode and the upper 16 bits of fh32[1] to
+	 * hold the offset of the parent.
+	 */
+
+	if (len < 3 || (connectable && len < 5))
+		return 255;
+
+	len = 3;
+	fh32[0] = ei->i_iget5_block;
+ 	fh16[2] = (__u16)ei->i_iget5_offset;  /* fh16 [sic] */
+	fh32[2] = inode->i_generation;
+	if (connectable && !S_ISDIR(inode->i_mode)) {
+		struct inode *parent;
+		struct iso_inode_info *eparent;
+		spin_lock(&dentry->d_lock);
+		parent = dentry->d_parent->d_inode;
+		eparent = ISOFS_I(parent);
+		fh32[3] = eparent->i_iget5_block;
+		fh16[3] = (__u16)eparent->i_iget5_offset;  /* fh16 [sic] */
+		fh32[4] = parent->i_generation;
+		spin_unlock(&dentry->d_lock);
+		len = 5;
+		type = 2;
+	}
+	*max_len = len;
+	return type;
+}
+
+
+static struct dentry *
+isofs_export_decode_fh(struct super_block *sb,
+		       __u32 *fh32,
+		       int fh_len,
+		       int fileid_type,
+		       int (*acceptable)(void *context, struct dentry *de),
+		       void *context)
+{
+	__u16 *fh16 = (__u16*)fh32;
+	__u32 child[3];   /* The child is what triggered all this. */
+	__u32 parent[3];  /* The parent is just along for the ride. */
+
+	if (fh_len < 3 || fileid_type > 2)
+		return NULL;
+
+	child[0] = fh32[0];
+	child[1] = fh16[2];  /* fh16 [sic] */
+	child[2] = fh32[2];
+
+	parent[0] = 0;
+	parent[1] = 0;
+	parent[2] = 0;
+	if (fileid_type == 2) {
+		if (fh_len > 2) parent[0] = fh32[3];
+		parent[1] = fh16[3];  /* fh16 [sic] */
+		if (fh_len > 4) parent[2] = fh32[4];
+	}
+
+	return sb->s_export_op->find_exported_dentry(sb, child, parent,
+						     acceptable, context);
+}
+
+
+struct export_operations isofs_export_ops = {
+	.decode_fh	= isofs_export_decode_fh,
+	.encode_fh	= isofs_export_encode_fh,
+	.get_dentry	= isofs_export_get_dentry,
+	.get_parent     = isofs_export_get_parent,
+};
--- diff/fs/nls/nls_ascii.c	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/nls/nls_ascii.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,167 @@
+/*
+ * linux/fs/nls_ascii.c
+ *
+ * Charset ascii translation tables.
+ * Generated automatically from the Unicode and charset
+ * tables from the Unicode Organization (www.unicode.org).
+ * The Unicode to charset table has only exact mappings.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/nls.h>
+#include <linux/errno.h>
+
+static wchar_t charset2uni[128] = {
+	/* 0x00*/
+	0x0000, 0x0001, 0x0002, 0x0003,
+	0x0004, 0x0005, 0x0006, 0x0007,
+	0x0008, 0x0009, 0x000a, 0x000b,
+	0x000c, 0x000d, 0x000e, 0x000f,
+	/* 0x10*/
+	0x0010, 0x0011, 0x0012, 0x0013,
+	0x0014, 0x0015, 0x0016, 0x0017,
+	0x0018, 0x0019, 0x001a, 0x001b,
+	0x001c, 0x001d, 0x001e, 0x001f,
+	/* 0x20*/
+	0x0020, 0x0021, 0x0022, 0x0023,
+	0x0024, 0x0025, 0x0026, 0x0027,
+	0x0028, 0x0029, 0x002a, 0x002b,
+	0x002c, 0x002d, 0x002e, 0x002f,
+	/* 0x30*/
+	0x0030, 0x0031, 0x0032, 0x0033,
+	0x0034, 0x0035, 0x0036, 0x0037,
+	0x0038, 0x0039, 0x003a, 0x003b,
+	0x003c, 0x003d, 0x003e, 0x003f,
+	/* 0x40*/
+	0x0040, 0x0041, 0x0042, 0x0043,
+	0x0044, 0x0045, 0x0046, 0x0047,
+	0x0048, 0x0049, 0x004a, 0x004b,
+	0x004c, 0x004d, 0x004e, 0x004f,
+	/* 0x50*/
+	0x0050, 0x0051, 0x0052, 0x0053,
+	0x0054, 0x0055, 0x0056, 0x0057,
+	0x0058, 0x0059, 0x005a, 0x005b,
+	0x005c, 0x005d, 0x005e, 0x005f,
+	/* 0x60*/
+	0x0060, 0x0061, 0x0062, 0x0063,
+	0x0064, 0x0065, 0x0066, 0x0067,
+	0x0068, 0x0069, 0x006a, 0x006b,
+	0x006c, 0x006d, 0x006e, 0x006f,
+	/* 0x70*/
+	0x0070, 0x0071, 0x0072, 0x0073,
+	0x0074, 0x0075, 0x0076, 0x0077,
+	0x0078, 0x0079, 0x007a, 0x007b,
+	0x007c, 0x007d, 0x007e, 0x007f,
+};
+
+static unsigned char page00[128] = {
+	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
+	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
+	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
+	0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */
+	0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */
+	0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */
+	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */
+	0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */
+	0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x40-0x47 */
+	0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x48-0x4f */
+	0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x50-0x57 */
+	0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */
+	0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x60-0x67 */
+	0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x68-0x6f */
+	0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x70-0x77 */
+	0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */
+};
+
+static unsigned char *page_uni2charset[128] = {
+	page00, NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
+};
+
+static unsigned char charset2lower[128] = {
+	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
+	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
+	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
+	0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */
+	0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */
+	0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */
+	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */
+	0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */
+	0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x40-0x47 */
+	0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x48-0x4f */
+	0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x50-0x57 */
+	0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */
+	0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x60-0x67 */
+	0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x68-0x6f */
+	0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x70-0x77 */
+	0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */
+};
+
+static unsigned char charset2upper[128] = {
+	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
+	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
+	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
+	0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */
+	0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */
+	0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */
+	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */
+	0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */
+	0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x40-0x47 */
+	0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x48-0x4f */
+	0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x50-0x57 */
+	0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */
+	0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x60-0x67 */
+	0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x68-0x6f */
+	0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x70-0x77 */
+	0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */
+};
+
+static int uni2char(wchar_t uni, unsigned char *out, int boundlen)
+{
+	unsigned char *uni2charset;
+	unsigned char cl = uni & 0x00ff;
+	unsigned char ch = (uni & 0xff00) >> 8;
+
+	if (boundlen <= 0)
+		return -ENAMETOOLONG;
+
+	uni2charset = page_uni2charset[ch];
+	if (uni2charset && uni2charset[cl])
+		out[0] = uni2charset[cl];
+	else
+		return -EINVAL;
+	return 1;
+}
+
+static int char2uni(const unsigned char *rawstring, int boundlen, wchar_t *uni)
+{
+	*uni = charset2uni[*rawstring];
+	if (*uni == 0x0000)
+		return -EINVAL;
+	return 1;
+}
+
+static struct nls_table table = {
+	.charset	= "ascii",
+	.uni2char	= uni2char,
+	.char2uni	= char2uni,
+	.charset2lower	= charset2lower,
+	.charset2upper	= charset2upper,
+	.owner		= THIS_MODULE,
+};
+
+static int __init init_nls_ascii(void)
+{
+	return register_nls(&table);
+}
+
+static void __exit exit_nls_ascii(void)
+{
+	unregister_nls(&table);
+}
+
+module_init(init_nls_ascii)
+module_exit(exit_nls_ascii)
+
+MODULE_LICENSE("Dual BSD/GPL");
--- diff/fs/ntfs/collate.c	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/ntfs/collate.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,121 @@
+/*
+ * collate.c - NTFS kernel collation handling.  Part of the Linux-NTFS project.
+ *
+ * Copyright (c) 2004 Anton Altaparmakov
+ *
+ * This program/include file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program/include file is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (in the main directory of the Linux-NTFS
+ * distribution in the file COPYING); if not, write to the Free Software
+ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "ntfs.h"
+#include "collate.h"
+
+static int ntfs_collate_binary(ntfs_volume *vol,
+		const void *data1, const int data1_len,
+		const void *data2, const int data2_len)
+{
+	int rc;
+
+	ntfs_debug("Entering.");
+	rc = memcmp(data1, data2, min(data1_len, data2_len));
+	if (!rc && (data1_len != data2_len)) {
+		if (data1_len < data2_len)
+			rc = -1;
+		else
+			rc = 1;
+	}
+	ntfs_debug("Done, returning %i", rc);
+	return rc;
+}
+
+static int ntfs_collate_ntofs_ulong(ntfs_volume *vol,
+		const void *data1, const int data1_len,
+		const void *data2, const int data2_len)
+{
+	int rc;
+	u32 d1, d2;
+
+	ntfs_debug("Entering.");
+	// FIXME:  We don't really want to bug here.
+	BUG_ON(data1_len != data2_len);
+	BUG_ON(data1_len != 4);
+	d1 = le32_to_cpup(data1);
+	d2 = le32_to_cpup(data2);
+	if (d1 < d2)
+		rc = -1;
+	else {
+		if (d1 == d2)
+			rc = 0;
+		else
+			rc = 1;
+	}
+	ntfs_debug("Done, returning %i", rc);
+	return rc;
+}
+
+typedef int (*ntfs_collate_func_t)(ntfs_volume *, const void *, const int,
+		const void *, const int);
+
+static ntfs_collate_func_t ntfs_do_collate0x0[3] = {
+	ntfs_collate_binary,
+	NULL/*ntfs_collate_file_name*/,
+	NULL/*ntfs_collate_unicode_string*/,
+};
+
+static ntfs_collate_func_t ntfs_do_collate0x1[4] = {
+	ntfs_collate_ntofs_ulong,
+	NULL/*ntfs_collate_ntofs_sid*/,
+	NULL/*ntfs_collate_ntofs_security_hash*/,
+	NULL/*ntfs_collate_ntofs_ulongs*/,
+};
+
+/**
+ * ntfs_collate - collate two data items using a specified collation rule
+ * @vol:	ntfs volume to which the data items belong
+ * @cr:		collation rule to use when comparing the items
+ * @data1:	first data item to collate
+ * @data1_len:	length in bytes of @data1
+ * @data2:	second data item to collate
+ * @data2_len:	length in bytes of @data2
+ *
+ * Collate the two data items @data1 and @data2 using the collation rule @cr
+ * and return -1, 0, ir 1 if @data1 is found, respectively, to collate before,
+ * to match, or to collate after @data2.
+ *
+ * For speed we use the collation rule @cr as an index into two tables of
+ * function pointers to call the appropriate collation function.
+ */
+int ntfs_collate(ntfs_volume *vol, COLLATION_RULES cr,
+		const void *data1, const int data1_len,
+		const void *data2, const int data2_len) {
+	ntfs_debug("Entering.");
+	/*
+	 * FIXME:  At the moment we only support COLLATION_BINARY and
+	 * COLLATION_NTOFS_ULONG, so we BUG() for everything else for now.
+	 */
+	BUG_ON(cr != COLLATION_BINARY && cr != COLLATION_NTOFS_ULONG);
+	cr = le32_to_cpu(cr);
+	BUG_ON(cr < 0);
+	if (cr <= 0x02)
+		return ntfs_do_collate0x0[cr](vol, data1, data1_len,
+				data2, data2_len);
+	BUG_ON(cr < 0x10);
+	cr -= 0x10;
+	if (likely(cr <= 3))
+		return ntfs_do_collate0x1[cr](vol, data1, data1_len,
+				data2, data2_len);
+	BUG();
+	return 0;
+}
--- diff/fs/ntfs/collate.h	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/ntfs/collate.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,48 @@
+/*
+ * collate.h - Defines for NTFS kernel collation handling.  Part of the
+ *	       Linux-NTFS project.
+ *
+ * Copyright (c) 2004 Anton Altaparmakov
+ *
+ * This program/include file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program/include file is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (in the main directory of the Linux-NTFS
+ * distribution in the file COPYING); if not, write to the Free Software
+ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _LINUX_NTFS_COLLATE_H
+#define _LINUX_NTFS_COLLATE_H
+
+#include "types.h"
+#include "volume.h"
+
+static inline BOOL ntfs_is_collation_rule_supported(COLLATION_RULES cr) {
+	/*
+	 * FIXME:  At the moment we only support COLLATION_BINARY and
+	 * COLLATION_NTOFS_ULONG, so we return false for everything else for
+	 * now.
+	 */
+	if (unlikely(cr != COLLATION_BINARY && cr != COLLATION_NTOFS_ULONG))
+		return FALSE;
+	cr = le32_to_cpu(cr);
+	if (likely(((cr >= 0) && (cr <= 0x02)) ||
+			((cr >= 0x10) && (cr <= 0x13))))
+		return TRUE;
+	return FALSE;
+}
+
+extern int ntfs_collate(ntfs_volume *vol, COLLATION_RULES cr,
+		const void *data1, const int data1_len,
+		const void *data2, const int data2_len);
+
+#endif /* _LINUX_NTFS_COLLATE_H */
--- diff/fs/ntfs/index.c	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/ntfs/index.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,459 @@
+/*
+ * index.c - NTFS kernel index handling.  Part of the Linux-NTFS project.
+ *
+ * Copyright (c) 2004 Anton Altaparmakov
+ *
+ * This program/include file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program/include file is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (in the main directory of the Linux-NTFS
+ * distribution in the file COPYING); if not, write to the Free Software
+ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "ntfs.h"
+#include "collate.h"
+#include "index.h"
+
+/**
+ * ntfs_index_ctx_get - allocate and initialize a new index context
+ * @idx_ni:	ntfs index inode with which to initialize the context
+ *
+ * Allocate a new index context, initialize it with @idx_ni and return it.
+ * Return NULL if allocation failed.
+ *
+ * Locking:  Caller must hold i_sem on the index inode.
+ */
+ntfs_index_context *ntfs_index_ctx_get(ntfs_inode *idx_ni)
+{
+	ntfs_index_context *ictx;
+
+	ictx = kmem_cache_alloc(ntfs_index_ctx_cache, SLAB_NOFS);
+	if (ictx) {
+		ictx->idx_ni = idx_ni;
+		ictx->entry = NULL;
+		ictx->data = NULL;
+		ictx->data_len = 0;
+		ictx->is_in_root = 0;
+		ictx->ir = NULL;
+		ictx->actx = NULL;
+		ictx->base_ni = NULL;
+		ictx->ia = NULL;
+		ictx->page = NULL;
+	}
+	return ictx;
+}
+
+/**
+ * ntfs_index_ctx_put - release an index context
+ * @ictx:	index context to free
+ *
+ * Release the index context @ictx, releasing all associated resources.
+ *
+ * Locking:  Caller must hold i_sem on the index inode.
+ */
+void ntfs_index_ctx_put(ntfs_index_context *ictx)
+{
+	if (ictx->entry) {
+		if (ictx->is_in_root) {
+			if (ictx->actx)
+				put_attr_search_ctx(ictx->actx);
+			if (ictx->base_ni)
+				unmap_mft_record(ictx->base_ni);
+		} else {
+			struct page *page = ictx->page;
+			if (page) {
+				BUG_ON(!PageLocked(page));
+				unlock_page(page);
+				ntfs_unmap_page(page);
+			}
+		}
+	}
+	kmem_cache_free(ntfs_index_ctx_cache, ictx);
+	return;
+}
+
+/**
+ * ntfs_index_lookup - find a key in an index and return its index entry
+ * @key:	[IN] key for which to search in the index
+ * @key_len:	[IN] length of @key in bytes
+ * @ictx:	[IN/OUT] context describing the index and the returned entry
+ *
+ * Before calling ntfs_index_lookup(), @ictx must have been obtained from a
+ * call to ntfs_index_ctx_get().
+ *
+ * Look for the @key in the index specified by the index lookup context @ictx.
+ * ntfs_index_lookup() walks the contents of the index looking for the @key.
+ *
+ * If the @key is found in the index, 0 is returned and @ictx is setup to
+ * describe the index entry containing the matching @key.  @ictx->entry is the
+ * index entry and @ictx->data and @ictx->data_len are the index entry data and
+ * its length in bytes, respectively.
+ *
+ * If the @key is not found in the index, -ENOENT is returned and @ictx is
+ * setup to describe the index entry whose key collates immediately after the
+ * search @key, i.e. this is the position in the index at which an index entry
+ * with a key of @key would need to be inserted.
+ *
+ * If an error occurs return the negative error code and @ictx is left
+ * untouched.
+ *
+ * When finished with the entry and its data, call ntfs_index_ctx_put() to free
+ * the context and other associated resources.
+ *
+ * If the index entry was modified, call flush_dcache_index_entry_page()
+ * immediately after the modification and either ntfs_index_entry_mark_dirty()
+ * or ntfs_index_entry_write() before the call to ntfs_index_ctx_put() to
+ * ensure that the changes are written to disk.
+ *
+ * Locking:  - Caller must hold i_sem on the index inode.
+ *	     - Each page cache page in the index allocation mapping must be
+ *	       locked whilst being accessed otherwise we may find a corrupt
+ *	       page due to it being under ->writepage at the moment which
+ *	       applies the mst protection fixups before writing out and then
+ *	       removes them again after the write is complete after which it 
+ *	       unlocks the page.
+ */
+int ntfs_index_lookup(const void *key, const int key_len,
+		ntfs_index_context *ictx)
+{
+	ntfs_inode *idx_ni = ictx->idx_ni;
+	ntfs_volume *vol = idx_ni->vol;
+	struct super_block *sb = vol->sb;
+	ntfs_inode *base_ni = idx_ni->ext.base_ntfs_ino;
+	MFT_RECORD *m;
+	INDEX_ROOT *ir;
+	INDEX_ENTRY *ie;
+	INDEX_ALLOCATION *ia;
+	u8 *index_end;
+	attr_search_context *actx;
+	int rc, err = 0;
+	VCN vcn, old_vcn;
+	struct address_space *ia_mapping;
+	struct page *page;
+	u8 *kaddr;
+
+	ntfs_debug("Entering.");
+	BUG_ON(!NInoAttr(idx_ni));
+	BUG_ON(idx_ni->type != AT_INDEX_ALLOCATION);
+	BUG_ON(idx_ni->nr_extents != -1);
+	BUG_ON(!base_ni);
+	BUG_ON(!key);
+	BUG_ON(key_len <= 0);
+	if (!ntfs_is_collation_rule_supported(
+			idx_ni->itype.index.collation_rule)) {
+		ntfs_error(sb, "Index uses unsupported collation rule 0x%x.  "
+				"Aborting lookup.", le32_to_cpu(
+				idx_ni->itype.index.collation_rule));
+		return -EOPNOTSUPP;
+	}
+	/* Get hold of the mft record for the index inode. */
+	m = map_mft_record(base_ni);
+	if (unlikely(IS_ERR(m))) {
+		ntfs_error(sb, "map_mft_record() failed with error code %ld.",
+				-PTR_ERR(m));
+		return PTR_ERR(m);
+	}
+	actx = get_attr_search_ctx(base_ni, m);
+	if (unlikely(!actx)) {
+		err = -ENOMEM;
+		goto err_out;
+	}
+	/* Find the index root attribute in the mft record. */
+	if (!lookup_attr(AT_INDEX_ROOT, idx_ni->name, idx_ni->name_len,
+			CASE_SENSITIVE, 0, NULL, 0, actx)) {
+		ntfs_error(sb, "Index root attribute missing in inode 0x%lx.",
+				idx_ni->mft_no);
+		err = -EIO;
+		goto err_out;
+	}
+	/* Get to the index root value (it has been verified in read_inode). */
+	ir = (INDEX_ROOT*)((u8*)actx->attr +
+			le16_to_cpu(actx->attr->data.resident.value_offset));
+	index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length);
+	/* The first index entry. */
+	ie = (INDEX_ENTRY*)((u8*)&ir->index +
+			le32_to_cpu(ir->index.entries_offset));
+	/*
+	 * Loop until we exceed valid memory (corruption case) or until we
+	 * reach the last entry.
+	 */
+	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
+		/* Bounds checks. */
+		if ((u8*)ie < (u8*)actx->mrec || (u8*)ie +
+				sizeof(INDEX_ENTRY_HEADER) > index_end ||
+				(u8*)ie + le16_to_cpu(ie->length) > index_end)
+			goto idx_err_out;
+		/*
+		 * The last entry cannot contain a key.  It can however contain
+		 * a pointer to a child node in the B+tree so we just break out.
+		 */
+		if (ie->flags & INDEX_ENTRY_END)
+			break;
+		/* Further bounds checks. */
+		if ((u32)sizeof(INDEX_ENTRY_HEADER) +
+				le16_to_cpu(ie->key_length) >
+				le16_to_cpu(ie->data.vi.data_offset) ||
+				(u32)le16_to_cpu(ie->data.vi.data_offset) +
+				le16_to_cpu(ie->data.vi.data_length) >
+				le16_to_cpu(ie->length))
+			goto idx_err_out;
+		/* If the keys match perfectly, we setup @ictx and return 0. */
+		if ((key_len == le16_to_cpu(ie->key_length)) && !memcmp(key,
+				&ie->key, key_len)) {
+ir_done:
+			ictx->is_in_root = TRUE;
+			ictx->actx = actx;
+			ictx->base_ni = base_ni;
+			ictx->ia = NULL;
+			ictx->page = NULL;
+done:
+			ictx->entry = ie;
+			ictx->data = (u8*)ie +
+					le16_to_cpu(ie->data.vi.data_offset);
+			ictx->data_len = le16_to_cpu(ie->data.vi.data_length);
+			ntfs_debug("Done.");
+			return err;
+		}
+		/*
+		 * Not a perfect match, need to do full blown collation so we
+		 * know which way in the B+tree we have to go.
+		 */
+		rc = ntfs_collate(vol, idx_ni->itype.index.collation_rule, key,
+				key_len, &ie->key, le16_to_cpu(ie->key_length));
+		/*
+		 * If @key collates before the key of the current entry, there
+		 * is definitely no such key in this index but we might need to
+		 * descend into the B+tree so we just break out of the loop.
+		 */
+		if (rc == -1)
+			break;
+		/*
+		 * A match should never happen as the memcmp() call should have
+		 * cought it, but we still treat it correctly.
+		 */
+		if (!rc)
+			goto ir_done;
+		/* The keys are not equal, continue the search. */
+	}
+	/*
+	 * We have finished with this index without success.  Check for the
+	 * presence of a child node and if not present setup @ictx and return
+	 * -ENOENT.
+	 */
+	if (!(ie->flags & INDEX_ENTRY_NODE)) {
+		ntfs_debug("Entry not found.");
+		err = -ENOENT;
+		goto ir_done;
+	} /* Child node present, descend into it. */
+	/* Consistency check: Verify that an index allocation exists. */
+	if (!NInoIndexAllocPresent(idx_ni)) {
+		ntfs_error(sb, "No index allocation attribute but index entry "
+				"requires one.  Inode 0x%lx is corrupt or "
+				"driver bug.", idx_ni->mft_no);
+		err = -EIO;
+		goto err_out;
+	}
+	/* Get the starting vcn of the index_block holding the child node. */
+	vcn = sle64_to_cpup((u8*)ie + le16_to_cpu(ie->length) - 8);
+	ia_mapping = VFS_I(idx_ni)->i_mapping;
+	/*
+	 * We are done with the index root and the mft record.  Release them,
+	 * otherwise we deadlock with ntfs_map_page().
+	 */
+	put_attr_search_ctx(actx);
+	unmap_mft_record(base_ni);
+	m = NULL;
+	actx = NULL;
+descend_into_child_node:
+	/*
+	 * Convert vcn to index into the index allocation attribute in units
+	 * of PAGE_CACHE_SIZE and map the page cache page, reading it from
+	 * disk if necessary.
+	 */
+	page = ntfs_map_page(ia_mapping, vcn <<
+			idx_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT);
+	if (IS_ERR(page)) {
+		ntfs_error(sb, "Failed to map index page, error %ld.",
+				-PTR_ERR(page));
+		err = PTR_ERR(page);
+		goto err_out;
+	}
+	lock_page(page);
+	kaddr = (u8*)page_address(page);
+fast_descend_into_child_node:
+	/* Get to the index allocation block. */
+	ia = (INDEX_ALLOCATION*)(kaddr + ((vcn <<
+			idx_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK));
+	/* Bounds checks. */
+	if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_CACHE_SIZE) {
+		ntfs_error(sb, "Out of bounds check failed.  Corrupt inode "
+				"0x%lx or driver bug.", idx_ni->mft_no);
+		err = -EIO;
+		goto unm_err_out;
+	}
+	if (sle64_to_cpu(ia->index_block_vcn) != vcn) {
+		ntfs_error(sb, "Actual VCN (0x%llx) of index buffer is "
+				"different from expected VCN (0x%llx).  Inode "
+				"0x%lx is corrupt or driver bug.",
+				(unsigned long long)
+				sle64_to_cpu(ia->index_block_vcn),
+				(unsigned long long)vcn, idx_ni->mft_no);
+		err = -EIO;
+		goto unm_err_out;
+	}
+	if (le32_to_cpu(ia->index.allocated_size) + 0x18 !=
+			idx_ni->itype.index.block_size) {
+		ntfs_error(sb, "Index buffer (VCN 0x%llx) of inode 0x%lx has "
+				"a size (%u) differing from the index "
+				"specified size (%u).  Inode is corrupt or "
+				"driver bug.", (unsigned long long)vcn,
+				idx_ni->mft_no,
+				le32_to_cpu(ia->index.allocated_size) + 0x18,
+				idx_ni->itype.index.block_size);
+		err = -EIO;
+		goto unm_err_out;
+	}
+	index_end = (u8*)ia + idx_ni->itype.index.block_size;
+	if (index_end > kaddr + PAGE_CACHE_SIZE) {
+		ntfs_error(sb, "Index buffer (VCN 0x%llx) of inode 0x%lx "
+				"crosses page boundary.  Impossible!  Cannot "
+				"access!  This is probably a bug in the "
+				"driver.", (unsigned long long)vcn,
+				idx_ni->mft_no);
+		err = -EIO;
+		goto unm_err_out;
+	}
+	index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length);
+	if (index_end > (u8*)ia + idx_ni->itype.index.block_size) {
+		ntfs_error(sb, "Size of index buffer (VCN 0x%llx) of inode "
+				"0x%lx exceeds maximum size.",
+				(unsigned long long)vcn, idx_ni->mft_no);
+		err = -EIO;
+		goto unm_err_out;
+	}
+	/* The first index entry. */
+	ie = (INDEX_ENTRY*)((u8*)&ia->index +
+			le32_to_cpu(ia->index.entries_offset));
+	/*
+	 * Iterate similar to above big loop but applied to index buffer, thus
+	 * loop until we exceed valid memory (corruption case) or until we
+	 * reach the last entry.
+	 */
+	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
+		/* Bounds checks. */
+		if ((u8*)ie < (u8*)ia || (u8*)ie +
+				sizeof(INDEX_ENTRY_HEADER) > index_end ||
+				(u8*)ie + le16_to_cpu(ie->length) > index_end) {
+			ntfs_error(sb, "Index entry out of bounds in inode "
+					"0x%lx.", idx_ni->mft_no);
+			err = -EIO;
+			goto unm_err_out;
+		}
+		/*
+		 * The last entry cannot contain a ket.  It can however contain
+		 * a pointer to a child node in the B+tree so we just break out.
+		 */
+		if (ie->flags & INDEX_ENTRY_END)
+			break;
+		/* Further bounds checks. */
+		if ((u32)sizeof(INDEX_ENTRY_HEADER) +
+				le16_to_cpu(ie->key_length) >
+				le16_to_cpu(ie->data.vi.data_offset) ||
+				(u32)le16_to_cpu(ie->data.vi.data_offset) +
+				le16_to_cpu(ie->data.vi.data_length) >
+				le16_to_cpu(ie->length)) {
+			ntfs_error(sb, "Index entry out of bounds in inode "
+					"0x%lx.", idx_ni->mft_no);
+			err = -EIO;
+			goto unm_err_out;
+		}
+		/* If the keys match perfectly, we setup @ictx and return 0. */
+		if ((key_len == le16_to_cpu(ie->key_length)) && !memcmp(key,
+				&ie->key, key_len)) {
+ia_done:
+			ictx->is_in_root = FALSE;
+			ictx->actx = NULL;
+			ictx->base_ni = NULL;
+			ictx->ia = ia;
+			ictx->page = page;
+			goto done;
+		}
+		/*
+		 * Not a perfect match, need to do full blown collation so we
+		 * know which way in the B+tree we have to go.
+		 */
+		rc = ntfs_collate(vol, idx_ni->itype.index.collation_rule, key,
+				key_len, &ie->key, le16_to_cpu(ie->key_length));
+		/*
+		 * If @key collates before the key of the current entry, there
+		 * is definitely no such key in this index but we might need to
+		 * descend into the B+tree so we just break out of the loop.
+		 */
+		if (rc == -1)
+			break;
+		/*
+		 * A match should never happen as the memcmp() call should have
+		 * cought it, but we still treat it correctly.
+		 */
+		if (!rc)
+			goto ia_done;
+		/* The keys are not equal, continue the search. */
+	}
+	/*
+	 * We have finished with this index buffer without success.  Check for
+	 * the presence of a child node and if not present return -ENOENT.
+	 */
+	if (!(ie->flags & INDEX_ENTRY_NODE)) {
+		ntfs_debug("Entry not found.");
+		err = -ENOENT;
+		goto ia_done;
+	}
+	if ((ia->index.flags & NODE_MASK) == LEAF_NODE) {
+		ntfs_error(sb, "Index entry with child node found in a leaf "
+				"node in inode 0x%lx.", idx_ni->mft_no);
+		err = -EIO;
+		goto unm_err_out;
+	}
+	/* Child node present, descend into it. */
+	old_vcn = vcn;
+	vcn = sle64_to_cpup((u8*)ie + le16_to_cpu(ie->length) - 8);
+	if (vcn >= 0) {
+		/*
+		 * If vcn is in the same page cache page as old_vcn we recycle
+		 * the mapped page.
+		 */
+		if (old_vcn << vol->cluster_size_bits >>
+				PAGE_CACHE_SHIFT == vcn <<
+				vol->cluster_size_bits >>
+				PAGE_CACHE_SHIFT)
+			goto fast_descend_into_child_node;
+		unlock_page(page);
+		ntfs_unmap_page(page);
+		goto descend_into_child_node;
+	}
+	ntfs_error(sb, "Negative child node vcn in inode 0x%lx.",
+			idx_ni->mft_no);
+	err = -EIO;
+unm_err_out:
+	unlock_page(page);
+	ntfs_unmap_page(page);
+err_out:
+	if (actx)
+		put_attr_search_ctx(actx);
+	if (m)
+		unmap_mft_record(base_ni);
+	return err;
+idx_err_out:
+	ntfs_error(sb, "Corrupt index.  Aborting lookup.");
+	err = -EIO;
+	goto err_out;
+}
--- diff/fs/ntfs/index.h	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/ntfs/index.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,155 @@
+/*
+ * index.h - Defines for NTFS kernel index handling.  Part of the Linux-NTFS
+ *	     project.
+ *
+ * Copyright (c) 2004 Anton Altaparmakov
+ *
+ * This program/include file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program/include file is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (in the main directory of the Linux-NTFS
+ * distribution in the file COPYING); if not, write to the Free Software
+ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _LINUX_NTFS_INDEX_H
+#define _LINUX_NTFS_INDEX_H
+
+#include <linux/fs.h>
+
+#include "types.h"
+#include "layout.h"
+#include "inode.h"
+#include "attrib.h"
+#include "mft.h"
+
+/**
+ * @idx_ni:	index inode containing the @entry described by this context
+ * @entry:	index entry (points into @ir or @ia)
+ * @data:	index entry data (points into @entry)
+ * @data_len:	length in bytes of @data
+ * @is_in_root:	TRUE if @entry is in @ir and FALSE if it is in @ia
+ * @ir:		index root if @is_in_root and NULL otherwise
+ * @actx:	attribute search context if @is_in_root and NULL otherwise
+ * @base_ni:	base inode if @is_in_root and NULL otherwise
+ * @ia:		index block if @is_in_root is FALSE and NULL otherwise
+ * @page:	page if @is_in_root is FALSE and NULL otherwise
+ *
+ * @idx_ni is the index inode this context belongs to.
+ *
+ * @entry is the index entry described by this context.  @data and @data_len
+ * are the index entry data and its length in bytes, respectively.  @data
+ * simply points into @entry.  This is probably what the user is interested in.
+ *
+ * If @is_in_root is TRUE, @entry is in the index root attribute @ir described
+ * by the attribute search context @actx and the base inode @base_ni.  @ia and
+ * @page are NULL in this case.
+ *
+ * If @is_in_root is FALSE, @entry is in the index allocation attribute and @ia
+ * and @page point to the index allocation block and the locked page it is in,
+ * respectively.  @ir, @actx and @base_ni are NULL in this case.
+ *
+ * To obtain a context call ntfs_index_ctx_get().
+ *
+ * We use this context to allow ntfs_index_lookup() to return the found index
+ * @entry and its @data without having to allocate a buffer and copy the @entry
+ * and/or its @data into it.
+ *
+ * When finished with the @entry and its @data, call ntfs_index_ctx_put() to
+ * free the context and other associated resources.
+ *
+ * If the index entry was modified, call flush_dcache_index_entry_page()
+ * immediately after the modification and either ntfs_index_entry_mark_dirty()
+ * or ntfs_index_entry_write() before the call to ntfs_index_ctx_put() to
+ * ensure that the changes are written to disk.
+ */
+typedef struct {
+	ntfs_inode *idx_ni;
+	INDEX_ENTRY *entry;
+	void *data;
+	u16 data_len;
+	BOOL is_in_root;
+	INDEX_ROOT *ir;
+	attr_search_context *actx;
+	ntfs_inode *base_ni;
+	INDEX_ALLOCATION *ia;
+	struct page *page;
+} ntfs_index_context;
+
+extern ntfs_index_context *ntfs_index_ctx_get(ntfs_inode *idx_ni);
+extern void ntfs_index_ctx_put(ntfs_index_context *ictx);
+
+extern int ntfs_index_lookup(const void *key, const int key_len,
+		ntfs_index_context *ictx);
+
+#ifdef NTFS_RW
+
+/**
+ * ntfs_index_entry_flush_dcache_page - flush_dcache_page() for index entries
+ * @ictx:	ntfs index context describing the index entry
+ *
+ * Call flush_dcache_page() for the page in which an index entry resides.
+ *
+ * This must be called every time an index entry is modified, just after the
+ * modification.
+ *
+ * If the index entry is in the index root attribute, simply flush the page
+ * containing the mft record containing the index root attribute.
+ *
+ * If the index entry is in an index block belonging to the index allocation
+ * attribute, simply flush the page cache page containing the index block.
+ */
+static inline void ntfs_index_entry_flush_dcache_page(ntfs_index_context *ictx)
+{
+	if (ictx->is_in_root)
+		flush_dcache_mft_record_page(ictx->actx->ntfs_ino);
+	else
+		flush_dcache_page(ictx->page);
+}
+
+/**
+ * ntfs_index_entry_mark_dirty - mark an index entry dirty
+ * @ictx:	ntfs index context describing the index entry
+ *
+ * Mark the index entry described by the index entry context @ictx dirty.
+ *
+ * If the index entry is in the index root attribute, simply mark the mft
+ * record containing the index root attribute dirty.  This ensures the mft
+ * record, and hence the index root attribute, will be written out to disk
+ * later.
+ *
+ * If the index entry is in an index block belonging to the index allocation
+ * attribute, simply mark the page cache page the index block is in dirty.
+ * This automatically marks the VFS inode of the ntfs index inode to which the
+ * index entry belongs dirty, too (I_DIRTY_PAGES) and this in turn ensures the
+ * page, and hence the dirty index block, will be written out to disk later.
+ *
+ * Note, that if an index block is smaller than PAGE_CACHE_SIZE, i.e. if there
+ * are multiple index blocks in each page cache page, dirtying an index entry
+ * in one index block will cause all index blocks located in the same page
+ * cache page to be written out, too but this is a small price to pay
+ * considering how much more complicated the code would have to be to keep
+ * track of which index block inside a page is dirty and which is not.  And
+ * anyway, on ia32 architectures index blocks are usually 4kiB in size which is
+ * the PAGE_CACHE_SIZE and hence this problem does not exist in the majority of
+ * cases.
+ */
+static inline void ntfs_index_entry_mark_dirty(ntfs_index_context *ictx)
+{
+	if (ictx->is_in_root)
+		mark_mft_record_dirty(ictx->actx->ntfs_ino);
+	else
+		__set_page_dirty_nobuffers(ictx->page);
+}
+
+#endif /* NTFS_RW */
+
+#endif /* _LINUX_NTFS_INDEX_H */
--- diff/fs/ntfs/quota.c	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/ntfs/quota.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,115 @@
+/*
+ * quota.c - NTFS kernel quota ($Quota) handling.  Part of the Linux-NTFS
+ *	     project.
+ *
+ * Copyright (c) 2004 Anton Altaparmakov
+ *
+ * This program/include file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program/include file is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (in the main directory of the Linux-NTFS
+ * distribution in the file COPYING); if not, write to the Free Software
+ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifdef NTFS_RW
+
+#include "ntfs.h"
+#include "index.h"
+#include "quota.h"
+
+/**
+ * ntfs_mark_quotas_out_of_date - mark the quotas out of date on an ntfs volume
+ * @vol:	ntfs volume on which to mark the quotas out of date
+ *
+ * Mark the quotas out of date on the ntfs volume @vol and return TRUE on
+ * success and FALSE on error.
+ */
+BOOL ntfs_mark_quotas_out_of_date(ntfs_volume *vol)
+{
+	ntfs_index_context *ictx;
+	QUOTA_CONTROL_ENTRY *qce;
+	const u32 qid = QUOTA_DEFAULTS_ID;
+	int err;
+
+	ntfs_debug("Entering.");
+	if (NVolQuotaOutOfDate(vol))
+		goto done;
+	if (!vol->quota_ino || !vol->quota_q_ino) {
+		ntfs_error(vol->sb, "Quota inodes are not open.");
+		return FALSE;
+	}
+	down(&vol->quota_q_ino->i_sem);
+	ictx = ntfs_index_ctx_get(NTFS_I(vol->quota_q_ino));
+	if (!ictx) {
+		ntfs_error(vol->sb, "Failed to get index context.");
+		return FALSE;
+	}
+	err = ntfs_index_lookup(&qid, sizeof(qid), ictx);
+	if (err) {
+		if (err == -ENOENT)
+			ntfs_error(vol->sb, "Quota defaults entry is not "
+					"present.");
+		else
+			ntfs_error(vol->sb, "Lookup of quota defaults entry "
+					"failed.");
+		goto err_out;
+	}
+	if (ictx->data_len < offsetof(QUOTA_CONTROL_ENTRY, sid)) {
+		ntfs_error(vol->sb, "Quota defaults entry size is invalid.  "
+				"Run chkdsk.");
+		goto err_out;
+	}
+	qce = (QUOTA_CONTROL_ENTRY*)ictx->data;
+	if (le32_to_cpu(qce->version) != QUOTA_VERSION) {
+		ntfs_error(vol->sb, "Quota defaults entry version 0x%x is not "
+				"supported.", le32_to_cpu(qce->version));
+		goto err_out;
+	}
+	ntfs_debug("Quota defaults flags = 0x%x.", le32_to_cpu(qce->flags));
+	/* If quotas are already marked out of date, no need to do anything. */
+	if (qce->flags & QUOTA_FLAG_OUT_OF_DATE)
+		goto set_done;
+	/*
+	 * If quota tracking is neither requested, nor enabled and there are no
+	 * pending deletes, no need to mark the quotas out of date.
+	 */
+	if (!(qce->flags & (QUOTA_FLAG_TRACKING_ENABLED |
+			QUOTA_FLAG_TRACKING_REQUESTED |
+			QUOTA_FLAG_PENDING_DELETES)))
+		goto set_done;
+	/*
+	 * Set the QUOTA_FLAG_OUT_OF_DATE bit thus marking quotas out of date.
+	 * This is verified on WinXP to be sufficient to cause windows to
+	 * rescan the volume on boot and update all quota entries.
+	 */
+	qce->flags |= QUOTA_FLAG_OUT_OF_DATE;
+	/* Ensure the modified flags are written to disk. */
+	ntfs_index_entry_flush_dcache_page(ictx);
+	ntfs_index_entry_mark_dirty(ictx);
+set_done:
+	ntfs_index_ctx_put(ictx);
+	up(&vol->quota_q_ino->i_sem);
+	/*
+	 * We set the flag so we do not try to mark the quotas out of date
+	 * again on remount.
+	 */
+	NVolSetQuotaOutOfDate(vol);
+done:
+	ntfs_debug("Done.");
+	return TRUE;
+err_out:
+	ntfs_index_ctx_put(ictx);
+	up(&vol->quota_q_ino->i_sem);
+	return FALSE;
+}
+
+#endif /* NTFS_RW */
--- diff/fs/ntfs/quota.h	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/ntfs/quota.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,35 @@
+/*
+ * quota.h - Defines for NTFS kernel quota ($Quota) handling.  Part of the
+ *	     Linux-NTFS project.
+ *
+ * Copyright (c) 2004 Anton Altaparmakov
+ *
+ * This program/include file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program/include file is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (in the main directory of the Linux-NTFS
+ * distribution in the file COPYING); if not, write to the Free Software
+ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _LINUX_NTFS_QUOTA_H
+#define _LINUX_NTFS_QUOTA_H
+
+#ifdef NTFS_RW
+
+#include "types.h"
+#include "volume.h"
+
+extern BOOL ntfs_mark_quotas_out_of_date(ntfs_volume *vol);
+
+#endif /* NTFS_RW */
+
+#endif /* _LINUX_NTFS_QUOTA_H */
--- diff/fs/xfs/linux-2.6/kmem.c	1970-01-01 01:00:00.000000000 +0100
+++ source/fs/xfs/linux-2.6/kmem.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
+ *
+ * This program 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.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like.  Any license provided herein, whether implied or
+ * otherwise, applies only to this software file.  Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA  94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ */
+
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/vmalloc.h>
+#include <linux/highmem.h>
+#include <linux/swap.h>
+
+#include "time.h"
+#include "kmem.h"
+
+#define MAX_VMALLOCS	6
+#define MAX_SLAB_SIZE	0x20000
+
+
+void *
+kmem_alloc(size_t size, int flags)
+{
+	int	retries = 0, lflags = kmem_flags_convert(flags);
+	void	*ptr;
+
+	do {
+		if (size < MAX_SLAB_SIZE || retries > MAX_VMALLOCS)
+			ptr = kmalloc(size, lflags);
+		else
+			ptr = __vmalloc(size, lflags, PAGE_KERNEL);
+		if (ptr || (flags & (KM_MAYFAIL|KM_NOSLEEP)))
+			return ptr;
+		if (!(++retries % 100))
+			printk(KERN_ERR "possible deadlock in %s (mode:0x%x)\n",
+					__FUNCTION__, lflags);
+	} while (1);
+}
+
+void *
+kmem_zalloc(size_t size, int flags)
+{
+	void	*ptr;
+
+	ptr = kmem_alloc(size, flags);
+	if (ptr)
+		memset((char *)ptr, 0, (int)size);
+	return ptr;
+}
+
+void
+kmem_free(void *ptr, size_t size)
+{
+	if (((unsigned long)ptr < VMALLOC_START) ||
+	    ((unsigned long)ptr >= VMALLOC_END)) {
+		kfree(ptr);
+	} else {
+		vfree(ptr);
+	}
+}
+
+void *
+kmem_realloc(void *ptr, size_t newsize, size_t oldsize, int flags)
+{
+	void	*new;
+
+	new = kmem_alloc(newsize, flags);
+	if (ptr) {
+		if (new)
+			memcpy(new, ptr,
+				((oldsize < newsize) ? oldsize : newsize));
+		kmem_free(ptr, oldsize);
+	}
+	return new;
+}
+
+void *
+kmem_zone_alloc(kmem_zone_t *zone, int flags)
+{
+	int	retries = 0, lflags = kmem_flags_convert(flags);
+	void	*ptr;
+
+	do {
+		ptr = kmem_cache_alloc(zone, lflags);
+		if (ptr || (flags & (KM_MAYFAIL|KM_NOSLEEP)))
+			return ptr;
+		if (!(++retries % 100))
+			printk(KERN_ERR "possible deadlock in %s (mode:0x%x)\n",
+					__FUNCTION__, lflags);
+	} while (1);
+}
+
+void *
+kmem_zone_zalloc(kmem_zone_t *zone, int flags)
+{
+	void	*ptr;
+
+	ptr = kmem_zone_alloc(zone, flags);
+	if (ptr)
+		memset((char *)ptr, 0, kmem_cache_size(zone));
+	return ptr;
+}
--- diff/include/asm-alpha/lockmeter.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-alpha/lockmeter.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,84 @@
+/*
+ *  Written by John Hawkes (hawkes@sgi.com)
+ *  Based on klstat.h by Jack Steiner (steiner@sgi.com)
+ *
+ *  Modified by Peter Rival (frival@zk3.dec.com)
+ */
+
+#ifndef _ALPHA_LOCKMETER_H
+#define _ALPHA_LOCKMETER_H
+
+#include <asm/hwrpb.h>
+#define CPU_CYCLE_FREQUENCY	hwrpb->cycle_freq
+
+#define get_cycles64()		get_cycles()
+
+#define THIS_CPU_NUMBER		smp_processor_id()
+
+#include <linux/version.h>
+
+#define SPINLOCK_MAGIC_INIT /**/
+
+/*
+ * Macros to cache and retrieve an index value inside of a lock
+ * these macros assume that there are less than 65536 simultaneous
+ * (read mode) holders of a rwlock.
+ * We also assume that the hash table has less than 32767 entries.
+ * the high order bit is used for write locking a rw_lock
+ * Note: although these defines and macros are the same as what is being used
+ *       in include/asm-i386/lockmeter.h, they are present here to easily
+ *	 allow an alternate Alpha implementation.
+ */
+/*
+ * instrumented spinlock structure -- never used to allocate storage
+ * only used in macros below to overlay a spinlock_t
+ */
+typedef struct inst_spinlock_s {
+	/* remember, Alpha is little endian */
+	unsigned short lock;
+	unsigned short index;
+} inst_spinlock_t;
+#define PUT_INDEX(lock_ptr,indexv)	((inst_spinlock_t *)(lock_ptr))->index = indexv
+#define GET_INDEX(lock_ptr)		((inst_spinlock_t *)(lock_ptr))->index
+
+/*
+ * macros to cache and retrieve an index value in a read/write lock
+ * as well as the cpu where a reader busy period started
+ * we use the 2nd word (the debug word) for this, so require the
+ * debug word to be present
+ */
+/*
+ * instrumented rwlock structure -- never used to allocate storage
+ * only used in macros below to overlay a rwlock_t
+ */
+typedef struct inst_rwlock_s {
+	volatile int lock;
+	unsigned short index;
+	unsigned short cpu;
+} inst_rwlock_t;
+#define PUT_RWINDEX(rwlock_ptr,indexv)	((inst_rwlock_t *)(rwlock_ptr))->index = indexv
+#define GET_RWINDEX(rwlock_ptr)		((inst_rwlock_t *)(rwlock_ptr))->index
+#define PUT_RW_CPU(rwlock_ptr,cpuv)	((inst_rwlock_t *)(rwlock_ptr))->cpu = cpuv
+#define GET_RW_CPU(rwlock_ptr)		((inst_rwlock_t *)(rwlock_ptr))->cpu
+
+/*
+ * return true if rwlock is write locked
+ * (note that other lock attempts can cause the lock value to be negative)
+ */
+#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr) (((inst_rwlock_t *)rwlock_ptr)->lock & 1)
+#define IABS(x) ((x) > 0 ? (x) : -(x))
+
+#define RWLOCK_READERS(rwlock_ptr)	rwlock_readers(rwlock_ptr)
+extern inline int rwlock_readers(rwlock_t *rwlock_ptr)
+{
+	int tmp = (int) ((inst_rwlock_t *)rwlock_ptr)->lock;
+	/* readers subtract 2, so we have to:		*/
+	/* 	- andnot off a possible writer (bit 0)	*/
+	/*	- get the absolute value		*/
+	/*	- divide by 2 (right shift by one)	*/
+	/* to find the number of readers		*/
+	if (tmp == 0) return(0);
+	else return(IABS(tmp & ~1)>>1);
+}
+
+#endif /* _ALPHA_LOCKMETER_H */
--- diff/include/asm-alpha/setup.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-alpha/setup.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ALPHA_SETUP_H
+#define __ALPHA_SETUP_H
+
+#define COMMAND_LINE_SIZE	256
+
+#endif
--- diff/include/asm-arm/hardware/clock.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-arm/hardware/clock.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,121 @@
+/*
+ *  linux/include/asm-arm/hardware/clock.h
+ *
+ *  Copyright (C) 2004 ARM Limited.
+ *  Written by Deep Blue Solutions Limited.
+ *
+ * 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.
+ */
+#ifndef ASMARM_CLOCK_H
+#define ASMARM_CLOCK_H
+
+struct device;
+
+/*
+ * The base API.
+ */
+
+
+/*
+ * struct clk - an machine class defined object / cookie.
+ */
+struct clk;
+
+/**
+ * clk_get - lookup and obtain a reference to a clock producer.
+ * @dev: device for clock "consumer"
+ * @id: device ID
+ *
+ * Returns a struct clk corresponding to the clock producer, or
+ * valid IS_ERR() condition containing errno.
+ */
+struct clk *clk_get(struct device *dev, const char *id);
+
+/**
+ * clk_enable - inform the system when the clock source should be running.
+ * @clk: clock source
+ *
+ * If the clock can not be enabled/disabled, this should return success.
+ *
+ * Returns success (0) or negative errno.
+ */
+int clk_enable(struct clk *clk);
+
+/**
+ * clk_disable - inform the system when the clock source is no longer required.
+ * @clk: clock source
+ */
+void clk_disable(struct clk *clk);
+
+/**
+ * clk_use - increment the use count
+ * @clk: clock source
+ *
+ * Returns success (0) or negative errno.
+ */
+int clk_use(struct clk *clk);
+
+/**
+ * clk_unuse - decrement the use count
+ * @clk: clock source
+ */
+void clk_unuse(struct clk *clk);
+
+/**
+ * clk_get_rate - obtain the current clock rate for a clock source.
+ *		  This is only valid once the clock source has been enabled.
+ * @clk: clock source
+ */
+unsigned long clk_get_rate(struct clk *clk);
+
+/**
+ * clk_put	- "free" the clock source
+ * @clk: clock source
+ */
+void clk_put(struct clk *clk);
+
+
+/*
+ * The remaining APIs are optional for machine class support.
+ */
+
+
+/**
+ * clk_round_rate - adjust a rate to the exact rate a clock can provide
+ * @clk: clock source
+ * @rate: desired clock rate in kHz
+ *
+ * Returns rounded clock rate, or negative errno.
+ */
+long clk_round_rate(struct clk *clk, unsigned long rate);
+ 
+/**
+ * clk_set_rate - set the clock rate for a clock source
+ * @clk: clock source
+ * @rate: desired clock rate in kHz
+ *
+ * Returns success (0) or negative errno.
+ */
+int clk_set_rate(struct clk *clk, unsigned long rate);
+ 
+/**
+ * clk_set_parent - set the parent clock source for this clock
+ * @clk: clock source
+ * @parent: parent clock source
+ *
+ * Returns success (0) or negative errno.
+ */
+int clk_set_parent(struct clk *clk, struct clk *parent);
+                                                                                
+/**
+ * clk_get_parent - get the parent clock source for this clock
+ * @clk: clock source
+ *
+ * Returns struct clk corresponding to parent clock source, or
+ * valid IS_ERR() condition containing errno.
+ */
+struct clk *clk_get_parent(struct clk *clk);
+
+#endif
--- diff/include/asm-arm/mach/time.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-arm/mach/time.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,20 @@
+/*
+ * linux/include/asm-arm/mach/time.h
+ *
+ * Copyright (C) 2004 MontaVista Software, Inc.
+ *
+ * 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.
+ */
+#ifndef __ASM_ARM_MACH_TIME_H
+#define __ASM_ARM_MACH_TIME_H
+
+extern void (*init_arch_time)(void);
+
+extern int (*set_rtc)(void);
+extern unsigned long(*gettimeoffset)(void);
+
+void timer_tick(struct pt_regs *);
+
+#endif
--- diff/include/asm-arm/vfp.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-arm/vfp.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,78 @@
+/*
+ * linux/include/asm-arm/vfp.h
+ *
+ * VFP register definitions.
+ * First, the standard VFP set.
+ */
+
+#define FPSID			cr0
+#define FPSCR			cr1
+#define FPEXC			cr8
+
+/* FPSID bits */
+#define FPSID_IMPLEMENTER_BIT	(24)
+#define FPSID_IMPLEMENTER_MASK	(0xff << FPSID_IMPLEMENTER_BIT)
+#define FPSID_SOFTWARE		(1<<23)
+#define FPSID_FORMAT_BIT	(21)
+#define FPSID_FORMAT_MASK	(0x3  << FPSID_FORMAT_BIT)
+#define FPSID_NODOUBLE		(1<<20)
+#define FPSID_ARCH_BIT		(16)
+#define FPSID_ARCH_MASK		(0xF  << FPSID_ARCH_BIT)
+#define FPSID_PART_BIT		(8)
+#define FPSID_PART_MASK		(0xFF << FPSID_PART_BIT)
+#define FPSID_VARIANT_BIT	(4)
+#define FPSID_VARIANT_MASK	(0xF  << FPSID_VARIANT_BIT)
+#define FPSID_REV_BIT		(0)
+#define FPSID_REV_MASK		(0xF  << FPSID_REV_BIT)
+
+/* FPEXC bits */
+#define FPEXC_EXCEPTION		(1<<31)
+#define FPEXC_ENABLE		(1<<30)
+
+/* FPSCR bits */
+#define FPSCR_DEFAULT_NAN	(1<<25)
+#define FPSCR_FLUSHTOZERO	(1<<24)
+#define FPSCR_ROUND_NEAREST	(0<<22)
+#define FPSCR_ROUND_PLUSINF	(1<<22)
+#define FPSCR_ROUND_MINUSINF	(2<<22)
+#define FPSCR_ROUND_TOZERO	(3<<22)
+#define FPSCR_RMODE_BIT		(22)
+#define FPSCR_RMODE_MASK	(3 << FPSCR_RMODE_BIT)
+#define FPSCR_STRIDE_BIT	(20)
+#define FPSCR_STRIDE_MASK	(3 << FPSCR_STRIDE_BIT)
+#define FPSCR_LENGTH_BIT	(16)
+#define FPSCR_LENGTH_MASK	(7 << FPSCR_LENGTH_BIT)
+#define FPSCR_IOE		(1<<8)
+#define FPSCR_DZE		(1<<9)
+#define FPSCR_OFE		(1<<10)
+#define FPSCR_UFE		(1<<11)
+#define FPSCR_IXE		(1<<12)
+#define FPSCR_IDE		(1<<15)
+#define FPSCR_IOC		(1<<0)
+#define FPSCR_DZC		(1<<1)
+#define FPSCR_OFC		(1<<2)
+#define FPSCR_UFC		(1<<3)
+#define FPSCR_IXC		(1<<4)
+#define FPSCR_IDC		(1<<7)
+
+/*
+ * VFP9-S specific.
+ */
+#define FPINST			cr9
+#define FPINST2			cr10
+
+/* FPEXC bits */
+#define FPEXC_FPV2		(1<<28)
+#define FPEXC_LENGTH_BIT	(8)
+#define FPEXC_LENGTH_MASK	(7 << FPEXC_LENGTH_BIT)
+#define FPEXC_INV		(1 << 7)
+#define FPEXC_UFC		(1 << 3)
+#define FPEXC_OFC		(1 << 2)
+#define FPEXC_IOC		(1 << 0)
+
+/* Bit patterns for decoding the packaged operation descriptors */
+#define VFPOPDESC_LENGTH_BIT	(9)
+#define VFPOPDESC_LENGTH_MASK	(0x07 << VFPOPDESC_LENGTH_BIT)
+#define VFPOPDESC_UNUSED_BIT	(24)
+#define VFPOPDESC_UNUSED_MASK	(0xFF << VFPOPDESC_UNUSED_BIT)
+#define VFPOPDESC_OPDESC_MASK	(~(VFPOPDESC_LENGTH_MASK | VFPOPDESC_UNUSED_MASK))
--- diff/include/asm-arm/vfpmacros.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-arm/vfpmacros.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,25 @@
+/*
+ * linux/include/asm-arm/vfpmacros.h
+ *
+ * Assembler-only file containing VFP macros and register definitions.
+ */
+#include "vfp.h"
+
+@ Macros to allow building with old toolkits (with no VFP support)
+	.macro	VFPFMRX, rd, sysreg, cond
+	MRC\cond	p10, 7, \rd, \sysreg, cr0, 0	@ FMRX	\rd, \sysreg
+	.endm
+
+	.macro	VFPFMXR, sysreg, rd, cond
+	MCR\cond	p10, 7, \rd, \sysreg, cr0, 0	@ FMXR	\sysreg, \rd
+	.endm
+
+	@ read all the working registers back into the VFP
+	.macro	VFPFLDMIA, base
+	LDC	p11, cr0, [\base],#33*4		    @ FLDMIAX \base!, {d0-d15}
+	.endm
+
+	@ write all the working registers out of the VFP
+	.macro	VFPFSTMIA, base
+	STC	p11, cr0, [\base],#33*4		    @ FSTMIAX \base!, {d0-d15}
+	.endm
--- diff/include/asm-i386/kgdb.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-i386/kgdb.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,69 @@
+#ifndef __KGDB
+#define __KGDB
+
+/*
+ * This file should not include ANY others.  This makes it usable
+ * most anywhere without the fear of include order or inclusion.
+ * Make it so!
+ *
+ * This file may be included all the time.  It is only active if
+ * CONFIG_KGDB is defined, otherwise it stubs out all the macros
+ * and entry points.
+ */
+#if defined(CONFIG_KGDB) && !defined(__ASSEMBLY__)
+
+extern void breakpoint(void);
+#define INIT_KGDB_INTS kgdb_enable_ints()
+
+#ifndef BREAKPOINT
+#define BREAKPOINT   asm("   int $3")
+#endif
+
+extern void kgdb_schedule_breakpoint(void);
+extern void kgdb_process_breakpoint(void);
+
+extern int kgdb_tty_hook(void);
+extern int kgdb_eth_hook(void);
+extern int kgdboe;
+
+/*
+ * GDB debug stub (or any debug stub) can point the 'linux_debug_hook'
+ * pointer to its routine and it will be entered as the first thing
+ * when a trap occurs.
+ *
+ * Return values are, at present, undefined.
+ *
+ * The debug hook routine does not necessarily return to its caller.
+ * It has the register image and thus may choose to resume execution
+ * anywhere it pleases.
+ */
+struct pt_regs;
+
+extern int kgdb_handle_exception(int trapno,
+				 int signo, int err_code, struct pt_regs *regs);
+extern int in_kgdb(struct pt_regs *regs);
+
+#ifdef CONFIG_KGDB_TS
+void kgdb_tstamp(int line, char *source, int data0, int data1);
+/*
+ * This is the time stamp function.  The macro adds the source info and
+ * does a cast on the data to allow most any 32-bit value.
+ */
+
+#define kgdb_ts(data0,data1) kgdb_tstamp(__LINE__,__FILE__,(int)data0,(int)data1)
+#else
+#define kgdb_ts(data0,data1)
+#endif
+#else				/* CONFIG_KGDB  && ! __ASSEMBLY__ ,stubs follow... */
+#ifndef BREAKPOINT
+#define BREAKPOINT
+#endif
+#define kgdb_ts(data0,data1)
+#define in_kgdb
+#define kgdb_handle_exception
+#define breakpoint
+#define INIT_KGDB_INTS
+#define kgdb_process_breakpoint() do {} while(0)
+
+#endif
+#endif				/* __KGDB */
--- diff/include/asm-i386/kgdb_local.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-i386/kgdb_local.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,102 @@
+#ifndef __KGDB_LOCAL
+#define ___KGDB_LOCAL
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/serial.h>
+#include <linux/serialP.h>
+#include <linux/spinlock.h>
+#include <asm/processor.h>
+#include <asm/msr.h>
+#include <asm/kgdb.h>
+
+#define PORT 0x3f8
+#ifdef CONFIG_KGDB_PORT
+#undef PORT
+#define PORT CONFIG_KGDB_PORT
+#endif
+#define IRQ 4
+#ifdef CONFIG_KGDB_IRQ
+#undef IRQ
+#define IRQ CONFIG_KGDB_IRQ
+#endif
+#define SB_CLOCK 1843200
+#define SB_BASE (SB_CLOCK/16)
+#define SB_BAUD9600 SB_BASE/9600
+#define SB_BAUD192  SB_BASE/19200
+#define SB_BAUD384  SB_BASE/38400
+#define SB_BAUD576  SB_BASE/57600
+#define SB_BAUD1152 SB_BASE/115200
+#ifdef CONFIG_KGDB_9600BAUD
+#define SB_BAUD SB_BAUD9600
+#endif
+#ifdef CONFIG_KGDB_19200BAUD
+#define SB_BAUD SB_BAUD192
+#endif
+#ifdef CONFIG_KGDB_38400BAUD
+#define SB_BAUD SB_BAUD384
+#endif
+#ifdef CONFIG_KGDB_57600BAUD
+#define SB_BAUD SB_BAUD576
+#endif
+#ifdef CONFIG_KGDB_115200BAUD
+#define SB_BAUD SB_BAUD1152
+#endif
+#ifndef SB_BAUD
+#define SB_BAUD SB_BAUD1152	/* Start with this if not given */
+#endif
+
+#ifndef CONFIG_X86_TSC
+#undef rdtsc
+#define rdtsc(a,b) if (a++ > 10000){a = 0; b++;}
+#undef rdtscll
+#define rdtscll(s) s++
+#endif
+
+#ifdef _raw_read_unlock		/* must use a name that is "define"ed, not an inline */
+#undef spin_lock
+#undef spin_trylock
+#undef spin_unlock
+#define spin_lock	 _raw_spin_lock
+#define spin_trylock	 _raw_spin_trylock
+#define spin_unlock	 _raw_spin_unlock
+#else
+#endif
+#undef spin_unlock_wait
+#define spin_unlock_wait(x)  do { cpu_relax(); barrier();} \
+                                     while(spin_is_locked(x))
+
+#define SB_IER 1
+#define SB_MCR UART_MCR_OUT2 | UART_MCR_DTR | UART_MCR_RTS
+
+#define FLAGS 0
+#define SB_STATE { \
+     magic: SSTATE_MAGIC, \
+     baud_base: SB_BASE,  \
+     port:      PORT,     \
+     irq:       IRQ,      \
+     flags:     FLAGS,    \
+     custom_divisor:SB_BAUD}
+#define SB_INFO  { \
+      magic: SERIAL_MAGIC, \
+      port:  PORT,0,FLAGS, \
+      state: &state,       \
+      tty:   (struct tty_struct *)&state, \
+      IER:   SB_IER,       \
+      MCR:   SB_MCR}
+extern void putDebugChar(int);
+/* RTAI support needs us to really stop/start interrupts */
+
+#define kgdb_sti() __asm__ __volatile__("sti": : :"memory")
+#define kgdb_cli() __asm__ __volatile__("cli": : :"memory")
+#define kgdb_local_save_flags(x) __asm__ __volatile__(\
+                                   "pushfl ; popl %0":"=g" (x): /* no input */)
+#define kgdb_local_irq_restore(x) __asm__ __volatile__(\
+                                   "pushl %0 ; popfl": \
+                                     /* no output */ :"g" (x):"memory", "cc")
+#define kgdb_local_irq_save(x) kgdb_local_save_flags(x); kgdb_cli()
+
+#ifdef CONFIG_SERIAL
+extern void shutdown_for_kgdb(struct async_struct *info);
+#endif
+#define INIT_KDEBUG putDebugChar("+");
+#endif				/* __KGDB_LOCAL */
--- diff/include/asm-i386/lockmeter.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-i386/lockmeter.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,115 @@
+/*
+ *  Copyright (C) 1999,2000 Silicon Graphics, Inc.
+ *
+ *  Written by John Hawkes (hawkes@sgi.com)
+ *  Based on klstat.h by Jack Steiner (steiner@sgi.com)
+ *
+ *  Modified by Ray Bryant (raybry@us.ibm.com)
+ *  Changes Copyright (C) 2000 IBM, Inc.
+ *  Added save of index in spinlock_t to improve efficiency
+ *  of "hold" time reporting for spinlocks.
+ *  Added support for hold time statistics for read and write
+ *  locks.
+ *  Moved machine dependent code here from include/lockmeter.h.
+ *
+ */
+
+#ifndef _I386_LOCKMETER_H
+#define _I386_LOCKMETER_H
+
+#include <asm/spinlock.h>
+#include <asm/rwlock.h>
+
+#include <linux/version.h>
+
+#ifdef __KERNEL__
+extern unsigned long cpu_khz;
+#define CPU_CYCLE_FREQUENCY	(cpu_khz * 1000)
+#else
+#define CPU_CYCLE_FREQUENCY	450000000
+#endif
+
+#define THIS_CPU_NUMBER		smp_processor_id()
+
+/*
+ * macros to cache and retrieve an index value inside of a spin lock
+ * these macros assume that there are less than 65536 simultaneous
+ * (read mode) holders of a rwlock.  Not normally a problem!!
+ * we also assume that the hash table has less than 65535 entries.
+ */
+/*
+ * instrumented spinlock structure -- never used to allocate storage
+ * only used in macros below to overlay a spinlock_t
+ */
+typedef struct inst_spinlock_s {
+	/* remember, Intel is little endian */
+	unsigned short lock;
+	unsigned short index;
+} inst_spinlock_t;
+#define PUT_INDEX(lock_ptr,indexv) ((inst_spinlock_t *)(lock_ptr))->index = indexv
+#define GET_INDEX(lock_ptr)        ((inst_spinlock_t *)(lock_ptr))->index
+
+/*
+ * macros to cache and retrieve an index value in a read/write lock
+ * as well as the cpu where a reader busy period started
+ * we use the 2nd word (the debug word) for this, so require the
+ * debug word to be present
+ */
+/*
+ * instrumented rwlock structure -- never used to allocate storage
+ * only used in macros below to overlay a rwlock_t
+ */
+typedef struct inst_rwlock_s {
+	volatile int lock;
+	unsigned short index;
+	unsigned short cpu;
+} inst_rwlock_t;
+#define PUT_RWINDEX(rwlock_ptr,indexv) ((inst_rwlock_t *)(rwlock_ptr))->index = indexv
+#define GET_RWINDEX(rwlock_ptr)        ((inst_rwlock_t *)(rwlock_ptr))->index
+#define PUT_RW_CPU(rwlock_ptr,cpuv)    ((inst_rwlock_t *)(rwlock_ptr))->cpu = cpuv
+#define GET_RW_CPU(rwlock_ptr)         ((inst_rwlock_t *)(rwlock_ptr))->cpu
+
+/*
+ * return the number of readers for a rwlock_t
+ */
+#define RWLOCK_READERS(rwlock_ptr)   rwlock_readers(rwlock_ptr)
+
+extern inline int rwlock_readers(rwlock_t *rwlock_ptr)
+{
+	int tmp = (int) rwlock_ptr->lock;
+	/* read and write lock attempts may cause the lock value to temporarily */
+	/* be negative.  Until it is >= 0 we know nothing (i. e. can't tell if  */
+	/* is -1 because it was write locked and somebody tried to read lock it */
+	/* or if it is -1 because it was read locked and somebody tried to write*/
+	/* lock it. ........................................................... */
+	do {
+		tmp = (int) rwlock_ptr->lock;
+	} while (tmp < 0);
+	if (tmp == 0) return(0);
+	else return(RW_LOCK_BIAS-tmp);
+}
+
+/*
+ * return true if rwlock is write locked
+ * (note that other lock attempts can cause the lock value to be negative)
+ */
+#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr) ((rwlock_ptr)->lock <= 0)
+#define IABS(x) ((x) > 0 ? (x) : -(x))
+#define RWLOCK_IS_READ_LOCKED(rwlock_ptr)  ((IABS((rwlock_ptr)->lock) % RW_LOCK_BIAS) != 0)
+
+/* this is a lot of typing just to get gcc to emit "rdtsc" */
+static inline long long get_cycles64 (void)
+{
+	union longlong_u {
+		long long intlong;
+		struct intint_s {
+			uint32_t eax;
+			uint32_t edx;
+		} intint;
+	} longlong;
+
+	rdtsc(longlong.intint.eax,longlong.intint.edx);
+	return longlong.intlong;
+}
+
+#endif /* _I386_LOCKMETER_H */
--- diff/include/asm-i386/perfctr.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-i386/perfctr.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,200 @@
+/* $Id: perfctr.h,v 1.52 2004/05/23 22:36:34 mikpe Exp $
+ * x86/x86_64 Performance-Monitoring Counters driver
+ *
+ * Copyright (C) 1999-2004  Mikael Pettersson
+ */
+#ifndef _ASM_I386_PERFCTR_H
+#define _ASM_I386_PERFCTR_H
+
+/* cpu_type values */
+#define PERFCTR_X86_GENERIC	0	/* any x86 with rdtsc */
+#define PERFCTR_X86_INTEL_P5	1	/* no rdpmc */
+#define PERFCTR_X86_INTEL_P5MMX	2
+#define PERFCTR_X86_INTEL_P6	3
+#define PERFCTR_X86_INTEL_PII	4
+#define PERFCTR_X86_INTEL_PIII	5
+#define PERFCTR_X86_CYRIX_MII	6
+#define PERFCTR_X86_WINCHIP_C6	7	/* no rdtsc */
+#define PERFCTR_X86_WINCHIP_2	8	/* no rdtsc */
+#define PERFCTR_X86_AMD_K7	9
+#define PERFCTR_X86_VIA_C3	10	/* no pmc0 */
+#define PERFCTR_X86_INTEL_P4	11	/* model 0 and 1 */
+#define PERFCTR_X86_INTEL_P4M2	12	/* model 2 */
+#define PERFCTR_X86_AMD_K8	13
+#define PERFCTR_X86_INTEL_PENTM	14	/* Pentium M */
+#define PERFCTR_X86_AMD_K8C	15	/* Revision C */
+#define PERFCTR_X86_INTEL_P4M3	16	/* model 3 and above */
+
+struct perfctr_sum_ctrs {
+	unsigned long long tsc;
+	unsigned long long pmc[18];
+};
+
+struct perfctr_cpu_control {
+	unsigned int tsc_on;
+	unsigned int nractrs;		/* # of a-mode counters */
+	unsigned int nrictrs;		/* # of i-mode counters */
+	unsigned int pmc_map[18];
+	unsigned int evntsel[18];	/* one per counter, even on P5 */
+	struct {
+		unsigned int escr[18];
+		unsigned int pebs_enable;	/* for replay tagging */
+		unsigned int pebs_matrix_vert;	/* for replay tagging */
+	} p4;
+	int ireset[18];			/* < 0, for i-mode counters */
+	unsigned int _reserved1;
+	unsigned int _reserved2;
+	unsigned int _reserved3;
+	unsigned int _reserved4;
+};
+
+struct perfctr_cpu_state {
+	unsigned int cstatus;
+	struct {	/* k1 is opaque in the user ABI */
+		unsigned int id;
+		int isuspend_cpu;
+	} k1;
+	/* The two tsc fields must be inlined. Placing them in a
+	   sub-struct causes unwanted internal padding on x86-64. */
+	unsigned int tsc_start;
+	unsigned long long tsc_sum;
+	struct {
+		unsigned int map;
+		unsigned int start;
+		unsigned long long sum;
+	} pmc[18];	/* the size is not part of the user ABI */
+#ifdef __KERNEL__
+	struct perfctr_cpu_control control;
+	unsigned int p4_escr_map[18];
+#endif
+};
+
+/* cstatus is a re-encoding of control.tsc_on/nractrs/nrictrs
+   which should have less overhead in most cases */
+
+static inline
+unsigned int perfctr_mk_cstatus(unsigned int tsc_on, unsigned int nractrs,
+				unsigned int nrictrs)
+{
+	return (tsc_on<<31) | (nrictrs<<16) | ((nractrs+nrictrs)<<8) | nractrs;
+}
+
+static inline unsigned int perfctr_cstatus_enabled(unsigned int cstatus)
+{
+	return cstatus;
+}
+
+static inline int perfctr_cstatus_has_tsc(unsigned int cstatus)
+{
+	return (int)cstatus < 0;	/* test and jump on sign */
+}
+
+static inline unsigned int perfctr_cstatus_nractrs(unsigned int cstatus)
+{
+	return cstatus & 0x7F;		/* and with imm8 */
+}
+
+static inline unsigned int perfctr_cstatus_nrctrs(unsigned int cstatus)
+{
+	return (cstatus >> 8) & 0x7F;
+}
+
+static inline unsigned int perfctr_cstatus_has_ictrs(unsigned int cstatus)
+{
+	return cstatus & (0x7F << 16);
+}
+
+/*
+ * 'struct siginfo' support for perfctr overflow signals.
+ * In unbuffered mode, si_code is set to SI_PMC_OVF and a bitmask
+ * describing which perfctrs overflowed is put in si_pmc_ovf_mask.
+ * A bitmask is used since more than one perfctr can have overflowed
+ * by the time the interrupt handler runs.
+ *
+ * glibc's <signal.h> doesn't seem to define __SI_FAULT or __SI_CODE(),
+ * and including <asm/siginfo.h> as well may cause redefinition errors,
+ * so the user and kernel values are different #defines here.
+ */
+#ifdef __KERNEL__
+#define SI_PMC_OVF	(__SI_FAULT|'P')
+#else
+#define SI_PMC_OVF	('P')
+#endif
+#define si_pmc_ovf_mask	_sifields._pad[0] /* XXX: use an unsigned field later */
+
+/* version number for user-visible CPU-specific data */
+#define PERFCTR_CPU_VERSION	0x0500	/* 5.0 */
+
+#ifdef __KERNEL__
+
+#if defined(CONFIG_PERFCTR)
+
+/* Driver init/exit. */
+extern int perfctr_cpu_init(void);
+extern void perfctr_cpu_exit(void);
+
+/* CPU type name. */
+extern char *perfctr_cpu_name;
+
+/* Hardware reservation. */
+extern const char *perfctr_cpu_reserve(const char *service);
+extern void perfctr_cpu_release(const char *service);
+
+/* PRE: state has no running interrupt-mode counters.
+   Check that the new control data is valid.
+   Update the driver's private control data.
+   is_global should be zero for per-process counters and non-zero
+   for global-mode counters. This matters for HT P4s, alas.
+   Returns a negative error code if the control data is invalid. */
+extern int perfctr_cpu_update_control(struct perfctr_cpu_state *state, int is_global);
+
+/* Read a-mode counters. Subtract from start and accumulate into sums.
+   Must be called with preemption disabled. */
+extern void perfctr_cpu_suspend(struct perfctr_cpu_state *state);
+
+/* Write control registers. Read a-mode counters into start.
+   Must be called with preemption disabled. */
+extern void perfctr_cpu_resume(struct perfctr_cpu_state *state);
+
+/* Perform an efficient combined suspend/resume operation.
+   Must be called with preemption disabled. */
+extern void perfctr_cpu_sample(struct perfctr_cpu_state *state);
+
+/* The type of a perfctr overflow interrupt handler.
+   It will be called in IRQ context, with preemption disabled. */
+typedef void (*perfctr_ihandler_t)(unsigned long pc);
+
+#if defined(CONFIG_X86_LOCAL_APIC)
+#define PERFCTR_INTERRUPT_SUPPORT 1
+#endif
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+extern void perfctr_cpu_set_ihandler(perfctr_ihandler_t);
+extern void perfctr_cpu_ireload(struct perfctr_cpu_state*);
+extern unsigned int perfctr_cpu_identify_overflow(struct perfctr_cpu_state*);
+#else
+static inline void perfctr_cpu_set_ihandler(perfctr_ihandler_t x) { }
+#endif
+
+#if defined(CONFIG_SMP)
+/* CPUs in `perfctr_cpus_forbidden_mask' must not use the
+   performance-monitoring counters. TSC use is unrestricted.
+   This is needed to prevent resource conflicts on hyper-threaded P4s.
+   The declaration of `perfctr_cpus_forbidden_mask' is in the driver's
+   private compat.h, since it needs to handle cpumask_t incompatibilities. */
+#define PERFCTR_CPUS_FORBIDDEN_MASK_NEEDED 1
+#endif
+
+#endif	/* CONFIG_PERFCTR */
+
+#if defined(CONFIG_PERFCTR) && defined(PERFCTR_INTERRUPT_SUPPORT)
+asmlinkage void perfctr_interrupt(struct pt_regs*);
+#define perfctr_vector_init()	\
+	set_intr_gate(LOCAL_PERFCTR_VECTOR, perfctr_interrupt)
+#else
+#define perfctr_vector_init()	do{}while(0)
+#endif
+
+#endif	/* __KERNEL__ */
+
+#endif	/* _ASM_I386_PERFCTR_H */
--- diff/include/asm-ia64/kgdb.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ia64/kgdb.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,69 @@
+#ifndef __KGDB
+#define __KGDB
+
+/*
+ * This file should not include ANY others.  This makes it usable
+ * most anywhere without the fear of include order or inclusion.
+ * Make it so!
+ *
+ * This file may be included all the time.  It is only active if
+ * CONFIG_KGDB is defined, otherwise it stubs out all the macros
+ * and entry points.
+ */
+#if defined(CONFIG_KGDB) && !defined(__ASSEMBLY__)
+
+extern void breakpoint(void);
+#define INIT_KGDB_INTS kgdb_enable_ints()
+
+#ifndef BREAKPOINT
+#define BREAKPOINT   asm volatile ("break.m 0x6665")
+#endif
+
+extern void kgdb_schedule_breakpoint(void);
+extern void kgdb_process_breakpoint(void);
+
+extern int kgdb_tty_hook(void);
+extern int kgdb_eth_hook(void);
+extern int kgdboe;
+
+struct kgdb_serial {
+	unsigned long	iobase;
+	unsigned long	shift;
+	int		line;
+	int		iotype;
+	int		claimed;
+};
+
+/*
+ * GDB debug stub (or any debug stub) can point the 'linux_debug_hook'
+ * pointer to its routine and it will be entered as the first thing
+ * when a trap occurs.
+ *
+ * Return values are, at present, undefined.
+ *
+ * The debug hook routine does not necessarily return to its caller.
+ * It has the register image and thus may choose to resume execution
+ * anywhere it pleases.
+ */
+struct pt_regs;
+
+extern int kgdb_handle_exception(int trapno,
+				 int signo, unsigned long err_code, struct pt_regs *regs);
+struct unw_frame_info;
+extern int in_kgdb(struct pt_regs *regs, struct unw_frame_info *);
+#ifdef	CONFIG_KGDB_EARLY
+extern void __init kgdb_serial_init(void);
+#endif
+
+#else				/* CONFIG_KGDB  && ! __ASSEMBLY__ ,stubs follow... */
+#ifndef BREAKPOINT
+#define BREAKPOINT
+#endif
+#define in_kgdb
+#define kgdb_handle_exception
+#define breakpoint
+#define INIT_KGDB_INTS
+#define kgdb_process_breakpoint() do {} while(0)
+
+#endif
+#endif				/* __KGDB */
--- diff/include/asm-ia64/kgdb_local.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ia64/kgdb_local.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,114 @@
+#ifndef __KGDB_LOCAL
+#define ___KGDB_LOCAL
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/serial.h>
+#include <linux/serialP.h>
+#include <linux/spinlock.h>
+#include <asm/processor.h>
+#include <asm/kgdb.h>
+
+#define PORT 0x0
+#ifdef CONFIG_KGDB_PORT
+#undef PORT
+#define PORT CONFIG_KGDB_PORT
+#define IOTYPE SERIAL_IO_PORT
+#endif
+
+#define	IOMEM 0x0
+#ifdef	CONFIG_KGDB_IOMEM
+#undef	IOMEM
+#define	IOMEM CONFIG_KGDB_IOMEM
+#define	IOTYPE SERIAL_IO_MEM
+#endif
+
+#define IRQ 4
+#ifdef CONFIG_KGDB_IRQ
+#undef IRQ
+#define IRQ CONFIG_KGDB_IRQ
+#endif
+
+#define	IOMEM_REG_SHIFT 0
+#ifdef	CONFIG_IOMEM_REG_SHIFT
+#undef	IOMEM_REG_SHIFT
+#define	IOMEM_REG_SHIFT CONFIG_IOMEM_REG_SHIFT
+#endif
+
+
+#define SB_CLOCK 1843200
+#define SB_BASE (SB_CLOCK/16)
+#define SB_BAUD9600 SB_BASE/9600
+#define SB_BAUD192  SB_BASE/19200
+#define SB_BAUD384  SB_BASE/38400
+#define SB_BAUD576  SB_BASE/57600
+#define SB_BAUD1152 SB_BASE/115200
+#ifdef CONFIG_KGDB_9600BAUD
+#define SB_BAUD SB_BAUD9600
+#endif
+#ifdef CONFIG_KGDB_19200BAUD
+#define SB_BAUD SB_BAUD192
+#endif
+#ifdef CONFIG_KGDB_38400BAUD
+#define SB_BAUD SB_BAUD384
+#endif
+#ifdef CONFIG_KGDB_57600BAUD
+#define SB_BAUD SB_BAUD576
+#endif
+#ifdef CONFIG_KGDB_115200BAUD
+#define SB_BAUD SB_BAUD1152
+#endif
+#ifndef SB_BAUD
+#define SB_BAUD SB_BAUD1152	/* Start with this if not given */
+#endif
+
+
+#ifdef _raw_read_unlock		/* must use a name that is "define"ed, not an inline */
+#undef spin_lock
+#undef spin_trylock
+#undef spin_unlock
+#define spin_lock	 _raw_spin_lock
+#define spin_trylock	 _raw_spin_trylock
+#define spin_unlock	 _raw_spin_unlock
+#else
+#endif
+#undef spin_unlock_wait
+#define spin_unlock_wait(x)  do { cpu_relax(); barrier();} \
+                                     while(spin_is_locked(x))
+
+#define SB_IER 1
+#define SB_MCR UART_MCR_OUT2 | UART_MCR_DTR | UART_MCR_RTS
+
+#define FLAGS 0
+#define SB_STATE { \
+     magic: SSTATE_MAGIC, \
+     baud_base: SB_BASE,  \
+     port:      PORT,     \
+     iomem_base:(u8 *) IOMEM,    \
+     iomem_reg_shift: IOMEM_REG_SHIFT,\
+     io_type: IOTYPE,	\
+     irq:       IRQ,      \
+     flags:     FLAGS,    \
+     custom_divisor:SB_BAUD}
+#define SB_INFO  { \
+      magic: SERIAL_MAGIC, \
+      port:  PORT,0,FLAGS, \
+      io_type: IOTYPE,	   \
+      iomem_base: (u8 *) IOMEM,   \
+      iomem_reg_shift: IOMEM_REG_SHIFT, \
+      state: &state,       \
+      tty:   (struct tty_struct *)&state, \
+      IER:   SB_IER,       \
+      MCR:   SB_MCR}
+extern void putDebugChar(int);
+/* RTAI support needs us to really stop/start interrupts */
+
+#define kgdb_local_save_flags(x) 	local_save_flags(x)
+#define kgdb_local_irq_restore(x) 	local_irq_restore(x)
+#define kgdb_local_irq_save(x) 		local_irq_save(x)
+
+#ifdef CONFIG_SERIAL
+extern void shutdown_for_kgdb(struct async_struct *info);
+extern void kgdb_serial_setup(struct uart_port *);
+#endif
+#define INIT_KDEBUG putDebugChar("+");
+#endif				/* __KGDB_LOCAL */
--- diff/include/asm-ia64/lockmeter.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ia64/lockmeter.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,72 @@
+/*
+ *  Copyright (C) 1999,2000 Silicon Graphics, Inc.
+ *
+ *  Written by John Hawkes (hawkes@sgi.com)
+ *  Based on klstat.h by Jack Steiner (steiner@sgi.com)
+ */
+
+#ifndef _IA64_LOCKMETER_H
+#define _IA64_LOCKMETER_H
+
+#ifdef local_cpu_data
+#define CPU_CYCLE_FREQUENCY	local_cpu_data->itc_freq
+#else
+#define CPU_CYCLE_FREQUENCY	my_cpu_data.itc_freq
+#endif
+#define get_cycles64()		get_cycles()
+
+#define THIS_CPU_NUMBER		smp_processor_id()
+
+/*
+ * macros to cache and retrieve an index value inside of a lock
+ * these macros assume that there are less than 65536 simultaneous
+ * (read mode) holders of a rwlock.
+ * we also assume that the hash table has less than 32767 entries.
+ */
+/*
+ * instrumented spinlock structure -- never used to allocate storage
+ * only used in macros below to overlay a spinlock_t
+ */
+typedef struct inst_spinlock_s {
+	/* remember, Intel is little endian */
+	volatile unsigned short lock;
+	volatile unsigned short index;
+} inst_spinlock_t;
+#define PUT_INDEX(lock_ptr,indexv) ((inst_spinlock_t *)(lock_ptr))->index = indexv
+#define GET_INDEX(lock_ptr)        ((inst_spinlock_t *)(lock_ptr))->index
+
+/*
+ * macros to cache and retrieve an index value in a read/write lock
+ * as well as the cpu where a reader busy period started
+ * we use the 2nd word (the debug word) for this, so require the
+ * debug word to be present
+ */
+/*
+ * instrumented rwlock structure -- never used to allocate storage
+ * only used in macros below to overlay a rwlock_t
+ */
+typedef struct inst_rwlock_s {
+	volatile int read_counter:31;
+	volatile int write_lock:1;
+	volatile unsigned short index;
+	volatile unsigned short cpu;
+} inst_rwlock_t;
+#define PUT_RWINDEX(rwlock_ptr,indexv) ((inst_rwlock_t *)(rwlock_ptr))->index = indexv
+#define GET_RWINDEX(rwlock_ptr)        ((inst_rwlock_t *)(rwlock_ptr))->index
+#define PUT_RW_CPU(rwlock_ptr,cpuv)    ((inst_rwlock_t *)(rwlock_ptr))->cpu = cpuv
+#define GET_RW_CPU(rwlock_ptr)         ((inst_rwlock_t *)(rwlock_ptr))->cpu
+
+/*
+ * return the number of readers for a rwlock_t
+ */
+#define RWLOCK_READERS(rwlock_ptr)	((rwlock_ptr)->read_counter)
+
+/*
+ * return true if rwlock is write locked
+ * (note that other lock attempts can cause the lock value to be negative)
+ */
+#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr) ((rwlock_ptr)->write_lock)
+#define RWLOCK_IS_READ_LOCKED(rwlock_ptr)  ((rwlock_ptr)->read_counter)
+
+#endif /* _IA64_LOCKMETER_H */
+
--- diff/include/asm-ia64/setup.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ia64/setup.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __IA64_SETUP_H
+#define __IA64_SETUP_H
+
+#define COMMAND_LINE_SIZE	512
+
+#endif
--- diff/include/asm-mips/gt64240.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-mips/gt64240.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,1264 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright - Galileo technology.
+ * Copyright (C) 2004 by Ralf Baechle
+ */
+#ifndef __ASM_MIPS_MV64240_H
+#define __ASM_MIPS_MV64240_H
+
+#include <asm/addrspace.h>
+#include <asm/byteorder.h>
+
+/*
+ * CPU Control Registers
+ */
+
+#define CPU_CONFIGURATION					0x000
+#define CPU_MODE						0x120
+#define CPU_READ_RESPONSE_CROSSBAR_LOW				0x170
+#define CPU_READ_RESPONSE_CROSSBAR_HIGH				0x178
+
+/*
+ * Processor Address Space
+ */
+
+/* Sdram's BAR'S */
+#define SCS_0_LOW_DECODE_ADDRESS				0x008
+#define SCS_0_HIGH_DECODE_ADDRESS				0x010
+#define SCS_1_LOW_DECODE_ADDRESS				0x208
+#define SCS_1_HIGH_DECODE_ADDRESS				0x210
+#define SCS_2_LOW_DECODE_ADDRESS				0x018
+#define SCS_2_HIGH_DECODE_ADDRESS				0x020
+#define SCS_3_LOW_DECODE_ADDRESS				0x218
+#define SCS_3_HIGH_DECODE_ADDRESS				0x220
+/* Devices BAR'S */
+#define CS_0_LOW_DECODE_ADDRESS					0x028
+#define CS_0_HIGH_DECODE_ADDRESS				0x030
+#define CS_1_LOW_DECODE_ADDRESS					0x228
+#define CS_1_HIGH_DECODE_ADDRESS				0x230
+#define CS_2_LOW_DECODE_ADDRESS					0x248
+#define CS_2_HIGH_DECODE_ADDRESS				0x250
+#define CS_3_LOW_DECODE_ADDRESS					0x038
+#define CS_3_HIGH_DECODE_ADDRESS				0x040
+#define BOOTCS_LOW_DECODE_ADDRESS				0x238
+#define BOOTCS_HIGH_DECODE_ADDRESS				0x240
+
+#define PCI_0I_O_LOW_DECODE_ADDRESS				0x048
+#define PCI_0I_O_HIGH_DECODE_ADDRESS				0x050
+#define PCI_0MEMORY0_LOW_DECODE_ADDRESS				0x058
+#define PCI_0MEMORY0_HIGH_DECODE_ADDRESS			0x060
+#define PCI_0MEMORY1_LOW_DECODE_ADDRESS				0x080
+#define PCI_0MEMORY1_HIGH_DECODE_ADDRESS			0x088
+#define PCI_0MEMORY2_LOW_DECODE_ADDRESS				0x258
+#define PCI_0MEMORY2_HIGH_DECODE_ADDRESS			0x260
+#define PCI_0MEMORY3_LOW_DECODE_ADDRESS				0x280
+#define PCI_0MEMORY3_HIGH_DECODE_ADDRESS			0x288
+
+#define PCI_1I_O_LOW_DECODE_ADDRESS				0x090
+#define PCI_1I_O_HIGH_DECODE_ADDRESS				0x098
+#define PCI_1MEMORY0_LOW_DECODE_ADDRESS				0x0a0
+#define PCI_1MEMORY0_HIGH_DECODE_ADDRESS			0x0a8
+#define PCI_1MEMORY1_LOW_DECODE_ADDRESS				0x0b0
+#define PCI_1MEMORY1_HIGH_DECODE_ADDRESS			0x0b8
+#define PCI_1MEMORY2_LOW_DECODE_ADDRESS				0x2a0
+#define PCI_1MEMORY2_HIGH_DECODE_ADDRESS			0x2a8
+#define PCI_1MEMORY3_LOW_DECODE_ADDRESS				0x2b0
+#define PCI_1MEMORY3_HIGH_DECODE_ADDRESS			0x2b8
+
+#define INTERNAL_SPACE_DECODE					0x068
+
+#define CPU_0_LOW_DECODE_ADDRESS				0x290
+#define CPU_0_HIGH_DECODE_ADDRESS				0x298
+#define CPU_1_LOW_DECODE_ADDRESS				0x2c0
+#define CPU_1_HIGH_DECODE_ADDRESS				0x2c8
+
+#define PCI_0I_O_ADDRESS_REMAP					0x0f0
+#define PCI_0MEMORY0_ADDRESS_REMAP				0x0f8
+#define PCI_0MEMORY0_HIGH_ADDRESS_REMAP				0x320
+#define PCI_0MEMORY1_ADDRESS_REMAP				0x100
+#define PCI_0MEMORY1_HIGH_ADDRESS_REMAP				0x328
+#define PCI_0MEMORY2_ADDRESS_REMAP				0x2f8
+#define PCI_0MEMORY2_HIGH_ADDRESS_REMAP				0x330
+#define PCI_0MEMORY3_ADDRESS_REMAP				0x300
+#define PCI_0MEMORY3_HIGH_ADDRESS_REMAP				0x338
+
+#define PCI_1I_O_ADDRESS_REMAP					0x108
+#define PCI_1MEMORY0_ADDRESS_REMAP				0x110
+#define PCI_1MEMORY0_HIGH_ADDRESS_REMAP				0x340
+#define PCI_1MEMORY1_ADDRESS_REMAP				0x118
+#define PCI_1MEMORY1_HIGH_ADDRESS_REMAP				0x348
+#define PCI_1MEMORY2_ADDRESS_REMAP				0x310
+#define PCI_1MEMORY2_HIGH_ADDRESS_REMAP				0x350
+#define PCI_1MEMORY3_ADDRESS_REMAP				0x318
+#define PCI_1MEMORY3_HIGH_ADDRESS_REMAP				0x358
+
+/*
+ * CPU Sync Barrier
+ */
+
+#define PCI_0SYNC_BARIER_VIRTUAL_REGISTER			0x0c0
+#define PCI_1SYNC_BARIER_VIRTUAL_REGISTER			0x0c8
+
+
+/*
+ * CPU Access Protect
+ */
+
+#define CPU_LOW_PROTECT_ADDRESS_0				0X180
+#define CPU_HIGH_PROTECT_ADDRESS_0				0X188
+#define CPU_LOW_PROTECT_ADDRESS_1				0X190
+#define CPU_HIGH_PROTECT_ADDRESS_1				0X198
+#define CPU_LOW_PROTECT_ADDRESS_2				0X1a0
+#define CPU_HIGH_PROTECT_ADDRESS_2				0X1a8
+#define CPU_LOW_PROTECT_ADDRESS_3				0X1b0
+#define CPU_HIGH_PROTECT_ADDRESS_3				0X1b8
+#define CPU_LOW_PROTECT_ADDRESS_4				0X1c0
+#define CPU_HIGH_PROTECT_ADDRESS_4				0X1c8
+#define CPU_LOW_PROTECT_ADDRESS_5				0X1d0
+#define CPU_HIGH_PROTECT_ADDRESS_5				0X1d8
+#define CPU_LOW_PROTECT_ADDRESS_6				0X1e0
+#define CPU_HIGH_PROTECT_ADDRESS_6				0X1e8
+#define CPU_LOW_PROTECT_ADDRESS_7				0X1f0
+#define CPU_HIGH_PROTECT_ADDRESS_7				0X1f8
+
+
+/*
+ * Snoop Control
+ */
+
+#define SNOOP_BASE_ADDRESS_0					0x380
+#define SNOOP_TOP_ADDRESS_0					0x388
+#define SNOOP_BASE_ADDRESS_1					0x390
+#define SNOOP_TOP_ADDRESS_1					0x398
+#define SNOOP_BASE_ADDRESS_2					0x3a0
+#define SNOOP_TOP_ADDRESS_2					0x3a8
+#define SNOOP_BASE_ADDRESS_3					0x3b0
+#define SNOOP_TOP_ADDRESS_3					0x3b8
+
+/*
+ * CPU Error Report
+ */
+
+#define CPU_ERROR_ADDRESS_LOW					0x070
+#define CPU_ERROR_ADDRESS_HIGH					0x078
+#define CPU_ERROR_DATA_LOW					0x128
+#define CPU_ERROR_DATA_HIGH					0x130
+#define CPU_ERROR_PARITY					0x138
+#define CPU_ERROR_CAUSE						0x140
+#define CPU_ERROR_MASK						0x148
+
+/*
+ * Pslave Debug
+ */
+
+#define X_0_ADDRESS						0x360
+#define X_0_COMMAND_ID						0x368
+#define X_1_ADDRESS						0x370
+#define X_1_COMMAND_ID						0x378
+#define WRITE_DATA_LOW						0x3c0
+#define WRITE_DATA_HIGH						0x3c8
+#define WRITE_BYTE_ENABLE					0X3e0
+#define READ_DATA_LOW						0x3d0
+#define READ_DATA_HIGH						0x3d8
+#define READ_ID							0x3e8
+
+
+/*
+ * SDRAM and Device Address Space
+ */
+
+
+/*
+ * SDRAM Configuration
+ */
+
+#define SDRAM_CONFIGURATION					0x448
+#define SDRAM_OPERATION_MODE					0x474
+#define SDRAM_ADDRESS_DECODE					0x47C
+#define SDRAM_TIMING_PARAMETERS					0x4b4
+#define SDRAM_UMA_CONTROL					0x4a4
+#define SDRAM_CROSS_BAR_CONTROL_LOW				0x4a8
+#define SDRAM_CROSS_BAR_CONTROL_HIGH				0x4ac
+#define SDRAM_CROSS_BAR_TIMEOUT					0x4b0
+
+
+/*
+ * SDRAM Parameters
+ */
+
+#define SDRAM_BANK0PARAMETERS					0x44C
+#define SDRAM_BANK1PARAMETERS					0x450
+#define SDRAM_BANK2PARAMETERS					0x454
+#define SDRAM_BANK3PARAMETERS					0x458
+
+
+/*
+ * SDRAM Error Report
+ */
+
+#define SDRAM_ERROR_DATA_LOW					0x484
+#define SDRAM_ERROR_DATA_HIGH					0x480
+#define SDRAM_AND_DEVICE_ERROR_ADDRESS				0x490
+#define SDRAM_RECEIVED_ECC					0x488
+#define SDRAM_CALCULATED_ECC					0x48c
+#define SDRAM_ECC_CONTROL					0x494
+#define SDRAM_ECC_ERROR_COUNTER					0x498
+
+
+/*
+ * SDunit Debug (for internal use)
+ */
+
+#define X0_ADDRESS						0x500
+#define X0_COMMAND_AND_ID					0x504
+#define X0_WRITE_DATA_LOW					0x508
+#define X0_WRITE_DATA_HIGH					0x50c
+#define X0_WRITE_BYTE_ENABLE					0x518
+#define X0_READ_DATA_LOW					0x510
+#define X0_READ_DATA_HIGH					0x514
+#define X0_READ_ID						0x51c
+#define X1_ADDRESS						0x520
+#define X1_COMMAND_AND_ID					0x524
+#define X1_WRITE_DATA_LOW					0x528
+#define X1_WRITE_DATA_HIGH					0x52c
+#define X1_WRITE_BYTE_ENABLE					0x538
+#define X1_READ_DATA_LOW					0x530
+#define X1_READ_DATA_HIGH					0x534
+#define X1_READ_ID						0x53c
+#define X0_SNOOP_ADDRESS					0x540
+#define X0_SNOOP_COMMAND					0x544
+#define X1_SNOOP_ADDRESS					0x548
+#define X1_SNOOP_COMMAND					0x54c
+
+
+/*
+ * Device Parameters
+ */
+
+#define DEVICE_BANK0PARAMETERS					0x45c
+#define DEVICE_BANK1PARAMETERS					0x460
+#define DEVICE_BANK2PARAMETERS					0x464
+#define DEVICE_BANK3PARAMETERS					0x468
+#define DEVICE_BOOT_BANK_PARAMETERS				0x46c
+#define DEVICE_CONTROL						0x4c0
+#define DEVICE_CROSS_BAR_CONTROL_LOW				0x4c8
+#define DEVICE_CROSS_BAR_CONTROL_HIGH				0x4cc
+#define DEVICE_CROSS_BAR_TIMEOUT				0x4c4
+
+
+/*
+ * Device Interrupt
+ */
+
+#define DEVICE_INTERRUPT_CAUSE					0x4d0
+#define DEVICE_INTERRUPT_MASK					0x4d4
+#define DEVICE_ERROR_ADDRESS					0x4d8
+
+/*
+ * DMA Record
+ */
+
+#define CHANNEL0_DMA_BYTE_COUNT					0x800
+#define CHANNEL1_DMA_BYTE_COUNT					0x804
+#define CHANNEL2_DMA_BYTE_COUNT					0x808
+#define CHANNEL3_DMA_BYTE_COUNT					0x80C
+#define CHANNEL4_DMA_BYTE_COUNT					0x900
+#define CHANNEL5_DMA_BYTE_COUNT					0x904
+#define CHANNEL6_DMA_BYTE_COUNT					0x908
+#define CHANNEL7_DMA_BYTE_COUNT					0x90C
+#define CHANNEL0_DMA_SOURCE_ADDRESS				0x810
+#define CHANNEL1_DMA_SOURCE_ADDRESS				0x814
+#define CHANNEL2_DMA_SOURCE_ADDRESS				0x818
+#define CHANNEL3_DMA_SOURCE_ADDRESS				0x81C
+#define CHANNEL4_DMA_SOURCE_ADDRESS				0x910
+#define CHANNEL5_DMA_SOURCE_ADDRESS				0x914
+#define CHANNEL6_DMA_SOURCE_ADDRESS				0x918
+#define CHANNEL7_DMA_SOURCE_ADDRESS				0x91C
+#define CHANNEL0_DMA_DESTINATION_ADDRESS			0x820
+#define CHANNEL1_DMA_DESTINATION_ADDRESS			0x824
+#define CHANNEL2_DMA_DESTINATION_ADDRESS			0x828
+#define CHANNEL3_DMA_DESTINATION_ADDRESS			0x82C
+#define CHANNEL4_DMA_DESTINATION_ADDRESS			0x920
+#define CHANNEL5_DMA_DESTINATION_ADDRESS			0x924
+#define CHANNEL6_DMA_DESTINATION_ADDRESS			0x928
+#define CHANNEL7_DMA_DESTINATION_ADDRESS			0x92C
+#define CHANNEL0NEXT_RECORD_POINTER				0x830
+#define CHANNEL1NEXT_RECORD_POINTER				0x834
+#define CHANNEL2NEXT_RECORD_POINTER				0x838
+#define CHANNEL3NEXT_RECORD_POINTER				0x83C
+#define CHANNEL4NEXT_RECORD_POINTER				0x930
+#define CHANNEL5NEXT_RECORD_POINTER				0x934
+#define CHANNEL6NEXT_RECORD_POINTER				0x938
+#define CHANNEL7NEXT_RECORD_POINTER				0x93C
+#define CHANNEL0CURRENT_DESCRIPTOR_POINTER			0x870
+#define CHANNEL1CURRENT_DESCRIPTOR_POINTER			0x874
+#define CHANNEL2CURRENT_DESCRIPTOR_POINTER			0x878
+#define CHANNEL3CURRENT_DESCRIPTOR_POINTER			0x87C
+#define CHANNEL4CURRENT_DESCRIPTOR_POINTER			0x970
+#define CHANNEL5CURRENT_DESCRIPTOR_POINTER			0x974
+#define CHANNEL6CURRENT_DESCRIPTOR_POINTER			0x978
+#define CHANNEL7CURRENT_DESCRIPTOR_POINTER			0x97C
+#define CHANNEL0_DMA_SOURCE_HIGH_PCI_ADDRESS			0x890
+#define CHANNEL1_DMA_SOURCE_HIGH_PCI_ADDRESS			0x894
+#define CHANNEL2_DMA_SOURCE_HIGH_PCI_ADDRESS			0x898
+#define CHANNEL3_DMA_SOURCE_HIGH_PCI_ADDRESS			0x89c
+#define CHANNEL4_DMA_SOURCE_HIGH_PCI_ADDRESS			0x990
+#define CHANNEL5_DMA_SOURCE_HIGH_PCI_ADDRESS			0x994
+#define CHANNEL6_DMA_SOURCE_HIGH_PCI_ADDRESS			0x998
+#define CHANNEL7_DMA_SOURCE_HIGH_PCI_ADDRESS			0x99c
+#define CHANNEL0_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x8a0
+#define CHANNEL1_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x8a4
+#define CHANNEL2_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x8a8
+#define CHANNEL3_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x8ac
+#define CHANNEL4_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x9a0
+#define CHANNEL5_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x9a4
+#define CHANNEL6_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x9a8
+#define CHANNEL7_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x9ac
+#define CHANNEL0_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x8b0
+#define CHANNEL1_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x8b4
+#define CHANNEL2_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x8b8
+#define CHANNEL3_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x8bc
+#define CHANNEL4_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x9b0
+#define CHANNEL5_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x9b4
+#define CHANNEL6_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x9b8
+#define CHANNEL7_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x9bc
+
+/*
+ * DMA Channel Control
+ */
+
+#define CHANNEL0CONTROL						0x840
+#define CHANNEL0CONTROL_HIGH					0x880
+
+#define CHANNEL1CONTROL						0x844
+#define CHANNEL1CONTROL_HIGH					0x884
+
+#define CHANNEL2CONTROL						0x848
+#define CHANNEL2CONTROL_HIGH					0x888
+
+#define CHANNEL3CONTROL						0x84C
+#define CHANNEL3CONTROL_HIGH					0x88C
+
+#define CHANNEL4CONTROL						0x940
+#define CHANNEL4CONTROL_HIGH					0x980
+
+#define CHANNEL5CONTROL						0x944
+#define CHANNEL5CONTROL_HIGH					0x984
+
+#define CHANNEL6CONTROL						0x948
+#define CHANNEL6CONTROL_HIGH					0x988
+
+#define CHANNEL7CONTROL						0x94C
+#define CHANNEL7CONTROL_HIGH					0x98C
+
+
+/*
+ * DMA Arbiter
+ */
+
+#define ARBITER_CONTROL_0_3					0x860
+#define ARBITER_CONTROL_4_7					0x960
+
+
+/*
+ * DMA Interrupt
+ */
+
+#define CHANELS0_3_INTERRUPT_CAUSE				0x8c0
+#define CHANELS0_3_INTERRUPT_MASK				0x8c4
+#define CHANELS0_3_ERROR_ADDRESS				0x8c8
+#define CHANELS0_3_ERROR_SELECT					0x8cc
+#define CHANELS4_7_INTERRUPT_CAUSE				0x9c0
+#define CHANELS4_7_INTERRUPT_MASK				0x9c4
+#define CHANELS4_7_ERROR_ADDRESS				0x9c8
+#define CHANELS4_7_ERROR_SELECT					0x9cc
+
+
+/*
+ * DMA Debug (for internal use)
+ */
+
+#define DMA_X0_ADDRESS						0x8e0
+#define DMA_X0_COMMAND_AND_ID					0x8e4
+#define DMA_X0_WRITE_DATA_LOW					0x8e8
+#define DMA_X0_WRITE_DATA_HIGH					0x8ec
+#define DMA_X0_WRITE_BYTE_ENABLE				0x8f8
+#define DMA_X0_READ_DATA_LOW					0x8f0
+#define DMA_X0_READ_DATA_HIGH					0x8f4
+#define DMA_X0_READ_ID						0x8fc
+#define DMA_X1_ADDRESS						0x9e0
+#define DMA_X1_COMMAND_AND_ID					0x9e4
+#define DMA_X1_WRITE_DATA_LOW					0x9e8
+#define DMA_X1_WRITE_DATA_HIGH					0x9ec
+#define DMA_X1_WRITE_BYTE_ENABLE				0x9f8
+#define DMA_X1_READ_DATA_LOW					0x9f0
+#define DMA_X1_READ_DATA_HIGH					0x9f4
+#define DMA_X1_READ_ID						0x9fc
+
+/*
+ * Timer_Counter
+ */
+
+#define TIMER_COUNTER0						0x850
+#define TIMER_COUNTER1						0x854
+#define TIMER_COUNTER2						0x858
+#define TIMER_COUNTER3						0x85C
+#define TIMER_COUNTER_0_3_CONTROL				0x864
+#define TIMER_COUNTER_0_3_INTERRUPT_CAUSE			0x868
+#define TIMER_COUNTER_0_3_INTERRUPT_MASK			0x86c
+#define TIMER_COUNTER4						0x950
+#define TIMER_COUNTER5						0x954
+#define TIMER_COUNTER6						0x958
+#define TIMER_COUNTER7						0x95C
+#define TIMER_COUNTER_4_7_CONTROL				0x964
+#define TIMER_COUNTER_4_7_INTERRUPT_CAUSE			0x968
+#define TIMER_COUNTER_4_7_INTERRUPT_MASK			0x96c
+
+/*
+ * PCI Slave Address Decoding
+ */
+
+#define PCI_0SCS_0_BANK_SIZE					0xc08
+#define PCI_1SCS_0_BANK_SIZE					0xc88
+#define PCI_0SCS_1_BANK_SIZE					0xd08
+#define PCI_1SCS_1_BANK_SIZE					0xd88
+#define PCI_0SCS_2_BANK_SIZE					0xc0c
+#define PCI_1SCS_2_BANK_SIZE					0xc8c
+#define PCI_0SCS_3_BANK_SIZE					0xd0c
+#define PCI_1SCS_3_BANK_SIZE					0xd8c
+#define PCI_0CS_0_BANK_SIZE					0xc10
+#define PCI_1CS_0_BANK_SIZE					0xc90
+#define PCI_0CS_1_BANK_SIZE					0xd10
+#define PCI_1CS_1_BANK_SIZE					0xd90
+#define PCI_0CS_2_BANK_SIZE					0xd18
+#define PCI_1CS_2_BANK_SIZE					0xd98
+#define PCI_0CS_3_BANK_SIZE					0xc14
+#define PCI_1CS_3_BANK_SIZE					0xc94
+#define PCI_0CS_BOOT_BANK_SIZE					0xd14
+#define PCI_1CS_BOOT_BANK_SIZE					0xd94
+#define PCI_0P2P_MEM0_BAR_SIZE					0xd1c
+#define PCI_1P2P_MEM0_BAR_SIZE					0xd9c
+#define PCI_0P2P_MEM1_BAR_SIZE					0xd20
+#define PCI_1P2P_MEM1_BAR_SIZE					0xda0
+#define PCI_0P2P_I_O_BAR_SIZE					0xd24
+#define PCI_1P2P_I_O_BAR_SIZE					0xda4
+#define PCI_0CPU_BAR_SIZE					0xd28
+#define PCI_1CPU_BAR_SIZE					0xda8
+#define PCI_0DAC_SCS_0_BANK_SIZE				0xe00
+#define PCI_1DAC_SCS_0_BANK_SIZE				0xe80
+#define PCI_0DAC_SCS_1_BANK_SIZE				0xe04
+#define PCI_1DAC_SCS_1_BANK_SIZE				0xe84
+#define PCI_0DAC_SCS_2_BANK_SIZE				0xe08
+#define PCI_1DAC_SCS_2_BANK_SIZE				0xe88
+#define PCI_0DAC_SCS_3_BANK_SIZE				0xe0c
+#define PCI_1DAC_SCS_3_BANK_SIZE				0xe8c
+#define PCI_0DAC_CS_0_BANK_SIZE					0xe10
+#define PCI_1DAC_CS_0_BANK_SIZE					0xe90
+#define PCI_0DAC_CS_1_BANK_SIZE					0xe14
+#define PCI_1DAC_CS_1_BANK_SIZE					0xe94
+#define PCI_0DAC_CS_2_BANK_SIZE					0xe18
+#define PCI_1DAC_CS_2_BANK_SIZE					0xe98
+#define PCI_0DAC_CS_3_BANK_SIZE					0xe1c
+#define PCI_1DAC_CS_3_BANK_SIZE					0xe9c
+#define PCI_0DAC_BOOTCS_BANK_SIZE				0xe20
+#define PCI_1DAC_BOOTCS_BANK_SIZE				0xea0
+#define PCI_0DAC_P2P_MEM0_BAR_SIZE				0xe24
+#define PCI_1DAC_P2P_MEM0_BAR_SIZE				0xea4
+#define PCI_0DAC_P2P_MEM1_BAR_SIZE				0xe28
+#define PCI_1DAC_P2P_MEM1_BAR_SIZE				0xea8
+#define PCI_0DAC_CPU_BAR_SIZE					0xe2c
+#define PCI_1DAC_CPU_BAR_SIZE					0xeac
+#define PCI_0EXPANSION_ROM_BAR_SIZE				0xd2c
+#define PCI_1EXPANSION_ROM_BAR_SIZE				0xdac
+#define PCI_0BASE_ADDRESS_REGISTERS_ENABLE			0xc3c
+#define PCI_1BASE_ADDRESS_REGISTERS_ENABLE			0xcbc
+#define PCI_0SCS_0_BASE_ADDRESS_REMAP				0xc48
+#define PCI_1SCS_0_BASE_ADDRESS_REMAP				0xcc8
+#define PCI_0SCS_1_BASE_ADDRESS_REMAP				0xd48
+#define PCI_1SCS_1_BASE_ADDRESS_REMAP				0xdc8
+#define PCI_0SCS_2_BASE_ADDRESS_REMAP				0xc4c
+#define PCI_1SCS_2_BASE_ADDRESS_REMAP				0xccc
+#define PCI_0SCS_3_BASE_ADDRESS_REMAP				0xd4c
+#define PCI_1SCS_3_BASE_ADDRESS_REMAP				0xdcc
+#define PCI_0CS_0_BASE_ADDRESS_REMAP				0xc50
+#define PCI_1CS_0_BASE_ADDRESS_REMAP				0xcd0
+#define PCI_0CS_1_BASE_ADDRESS_REMAP				0xd50
+#define PCI_1CS_1_BASE_ADDRESS_REMAP				0xdd0
+#define PCI_0CS_2_BASE_ADDRESS_REMAP				0xd58
+#define PCI_1CS_2_BASE_ADDRESS_REMAP				0xdd8
+#define PCI_0CS_3_BASE_ADDRESS_REMAP				0xc54
+#define PCI_1CS_3_BASE_ADDRESS_REMAP				0xcd4
+#define PCI_0CS_BOOTCS_BASE_ADDRESS_REMAP			0xd54
+#define PCI_1CS_BOOTCS_BASE_ADDRESS_REMAP			0xdd4
+#define PCI_0P2P_MEM0_BASE_ADDRESS_REMAP_LOW			0xd5c
+#define PCI_1P2P_MEM0_BASE_ADDRESS_REMAP_LOW			0xddc
+#define PCI_0P2P_MEM0_BASE_ADDRESS_REMAP_HIGH			0xd60
+#define PCI_1P2P_MEM0_BASE_ADDRESS_REMAP_HIGH			0xde0
+#define PCI_0P2P_MEM1_BASE_ADDRESS_REMAP_LOW			0xd64
+#define PCI_1P2P_MEM1_BASE_ADDRESS_REMAP_LOW			0xde4
+#define PCI_0P2P_MEM1_BASE_ADDRESS_REMAP_HIGH			0xd68
+#define PCI_1P2P_MEM1_BASE_ADDRESS_REMAP_HIGH			0xde8
+#define PCI_0P2P_I_O_BASE_ADDRESS_REMAP				0xd6c
+#define PCI_1P2P_I_O_BASE_ADDRESS_REMAP				0xdec
+#define PCI_0CPU_BASE_ADDRESS_REMAP				0xd70
+#define PCI_1CPU_BASE_ADDRESS_REMAP				0xdf0
+#define PCI_0DAC_SCS_0_BASE_ADDRESS_REMAP			0xf00
+#define PCI_1DAC_SCS_0_BASE_ADDRESS_REMAP			0xff0
+#define PCI_0DAC_SCS_1_BASE_ADDRESS_REMAP			0xf04
+#define PCI_1DAC_SCS_1_BASE_ADDRESS_REMAP			0xf84
+#define PCI_0DAC_SCS_2_BASE_ADDRESS_REMAP			0xf08
+#define PCI_1DAC_SCS_2_BASE_ADDRESS_REMAP			0xf88
+#define PCI_0DAC_SCS_3_BASE_ADDRESS_REMAP			0xf0c
+#define PCI_1DAC_SCS_3_BASE_ADDRESS_REMAP			0xf8c
+#define PCI_0DAC_CS_0_BASE_ADDRESS_REMAP			0xf10
+#define PCI_1DAC_CS_0_BASE_ADDRESS_REMAP			0xf90
+#define PCI_0DAC_CS_1_BASE_ADDRESS_REMAP			0xf14
+#define PCI_1DAC_CS_1_BASE_ADDRESS_REMAP			0xf94
+#define PCI_0DAC_CS_2_BASE_ADDRESS_REMAP			0xf18
+#define PCI_1DAC_CS_2_BASE_ADDRESS_REMAP			0xf98
+#define PCI_0DAC_CS_3_BASE_ADDRESS_REMAP			0xf1c
+#define PCI_1DAC_CS_3_BASE_ADDRESS_REMAP			0xf9c
+#define PCI_0DAC_BOOTCS_BASE_ADDRESS_REMAP			0xf20
+#define PCI_1DAC_BOOTCS_BASE_ADDRESS_REMAP			0xfa0
+#define PCI_0DAC_P2P_MEM0_BASE_ADDRESS_REMAP_LOW		0xf24
+#define PCI_1DAC_P2P_MEM0_BASE_ADDRESS_REMAP_LOW		0xfa4
+#define PCI_0DAC_P2P_MEM0_BASE_ADDRESS_REMAP_HIGH		0xf28
+#define PCI_1DAC_P2P_MEM0_BASE_ADDRESS_REMAP_HIGH		0xfa8
+#define PCI_0DAC_P2P_MEM1_BASE_ADDRESS_REMAP_LOW		0xf2c
+#define PCI_1DAC_P2P_MEM1_BASE_ADDRESS_REMAP_LOW		0xfac
+#define PCI_0DAC_P2P_MEM1_BASE_ADDRESS_REMAP_HIGH		0xf30
+#define PCI_1DAC_P2P_MEM1_BASE_ADDRESS_REMAP_HIGH		0xfb0
+#define PCI_0DAC_CPU_BASE_ADDRESS_REMAP				0xf34
+#define PCI_1DAC_CPU_BASE_ADDRESS_REMAP				0xfb4
+#define PCI_0EXPANSION_ROM_BASE_ADDRESS_REMAP			0xf38
+#define PCI_1EXPANSION_ROM_BASE_ADDRESS_REMAP			0xfb8
+#define PCI_0ADDRESS_DECODE_CONTROL				0xd3c
+#define PCI_1ADDRESS_DECODE_CONTROL				0xdbc
+
+/*
+ * PCI Control
+ */
+
+#define PCI_0COMMAND						0xc00
+#define PCI_1COMMAND						0xc80
+#define PCI_0MODE						0xd00
+#define PCI_1MODE						0xd80
+#define PCI_0TIMEOUT_RETRY					0xc04
+#define PCI_1TIMEOUT_RETRY					0xc84
+#define PCI_0READ_BUFFER_DISCARD_TIMER				0xd04
+#define PCI_1READ_BUFFER_DISCARD_TIMER				0xd84
+#define MSI_0TRIGGER_TIMER					0xc38
+#define MSI_1TRIGGER_TIMER					0xcb8
+#define PCI_0ARBITER_CONTROL					0x1d00
+#define PCI_1ARBITER_CONTROL					0x1d80
+/* changing untill here */
+#define PCI_0CROSS_BAR_CONTROL_LOW				 0x1d08
+#define PCI_0CROSS_BAR_CONTROL_HIGH				 0x1d0c
+#define PCI_0CROSS_BAR_TIMEOUT					 0x1d04
+#define PCI_0READ_RESPONSE_CROSS_BAR_CONTROL_LOW		 0x1d18
+#define PCI_0READ_RESPONSE_CROSS_BAR_CONTROL_HIGH		 0x1d1c
+#define PCI_0SYNC_BARRIER_VIRTUAL_REGISTER			 0x1d10
+#define PCI_0P2P_CONFIGURATION					 0x1d14
+#define PCI_0ACCESS_CONTROL_BASE_0_LOW				 0x1e00
+#define PCI_0ACCESS_CONTROL_BASE_0_HIGH				 0x1e04
+#define PCI_0ACCESS_CONTROL_TOP_0				 0x1e08
+#define PCI_0ACCESS_CONTROL_BASE_1_LOW				 0c1e10
+#define PCI_0ACCESS_CONTROL_BASE_1_HIGH				 0x1e14
+#define PCI_0ACCESS_CONTROL_TOP_1				 0x1e18
+#define PCI_0ACCESS_CONTROL_BASE_2_LOW				 0c1e20
+#define PCI_0ACCESS_CONTROL_BASE_2_HIGH				 0x1e24
+#define PCI_0ACCESS_CONTROL_TOP_2				 0x1e28
+#define PCI_0ACCESS_CONTROL_BASE_3_LOW				 0c1e30
+#define PCI_0ACCESS_CONTROL_BASE_3_HIGH				 0x1e34
+#define PCI_0ACCESS_CONTROL_TOP_3				 0x1e38
+#define PCI_0ACCESS_CONTROL_BASE_4_LOW				 0c1e40
+#define PCI_0ACCESS_CONTROL_BASE_4_HIGH				 0x1e44
+#define PCI_0ACCESS_CONTROL_TOP_4				 0x1e48
+#define PCI_0ACCESS_CONTROL_BASE_5_LOW				 0c1e50
+#define PCI_0ACCESS_CONTROL_BASE_5_HIGH				 0x1e54
+#define PCI_0ACCESS_CONTROL_TOP_5				 0x1e58
+#define PCI_0ACCESS_CONTROL_BASE_6_LOW				 0c1e60
+#define PCI_0ACCESS_CONTROL_BASE_6_HIGH				 0x1e64
+#define PCI_0ACCESS_CONTROL_TOP_6				 0x1e68
+#define PCI_0ACCESS_CONTROL_BASE_7_LOW				 0c1e70
+#define PCI_0ACCESS_CONTROL_BASE_7_HIGH				 0x1e74
+#define PCI_0ACCESS_CONTROL_TOP_7				 0x1e78
+#define PCI_1CROSS_BAR_CONTROL_LOW				 0x1d88
+#define PCI_1CROSS_BAR_CONTROL_HIGH				 0x1d8c
+#define PCI_1CROSS_BAR_TIMEOUT					 0x1d84
+#define PCI_1READ_RESPONSE_CROSS_BAR_CONTROL_LOW		 0x1d98
+#define PCI_1READ_RESPONSE_CROSS_BAR_CONTROL_HIGH		 0x1d9c
+#define PCI_1SYNC_BARRIER_VIRTUAL_REGISTER			 0x1d90
+#define PCI_1P2P_CONFIGURATION					 0x1d94
+#define PCI_1ACCESS_CONTROL_BASE_0_LOW				 0x1e80
+#define PCI_1ACCESS_CONTROL_BASE_0_HIGH				 0x1e84
+#define PCI_1ACCESS_CONTROL_TOP_0				 0x1e88
+#define PCI_1ACCESS_CONTROL_BASE_1_LOW				 0c1e90
+#define PCI_1ACCESS_CONTROL_BASE_1_HIGH				 0x1e94
+#define PCI_1ACCESS_CONTROL_TOP_1				 0x1e98
+#define PCI_1ACCESS_CONTROL_BASE_2_LOW				 0c1ea0
+#define PCI_1ACCESS_CONTROL_BASE_2_HIGH				 0x1ea4
+#define PCI_1ACCESS_CONTROL_TOP_2				 0x1ea8
+#define PCI_1ACCESS_CONTROL_BASE_3_LOW				 0c1eb0
+#define PCI_1ACCESS_CONTROL_BASE_3_HIGH				 0x1eb4
+#define PCI_1ACCESS_CONTROL_TOP_3				 0x1eb8
+#define PCI_1ACCESS_CONTROL_BASE_4_LOW				 0c1ec0
+#define PCI_1ACCESS_CONTROL_BASE_4_HIGH				 0x1ec4
+#define PCI_1ACCESS_CONTROL_TOP_4				 0x1ec8
+#define PCI_1ACCESS_CONTROL_BASE_5_LOW				 0c1ed0
+#define PCI_1ACCESS_CONTROL_BASE_5_HIGH				 0x1ed4
+#define PCI_1ACCESS_CONTROL_TOP_5				 0x1ed8
+#define PCI_1ACCESS_CONTROL_BASE_6_LOW				 0c1ee0
+#define PCI_1ACCESS_CONTROL_BASE_6_HIGH				 0x1ee4
+#define PCI_1ACCESS_CONTROL_TOP_6				 0x1ee8
+#define PCI_1ACCESS_CONTROL_BASE_7_LOW				 0c1ef0
+#define PCI_1ACCESS_CONTROL_BASE_7_HIGH				 0x1ef4
+#define PCI_1ACCESS_CONTROL_TOP_7				 0x1ef8
+
+/*
+ * PCI Snoop Control
+ */
+
+#define PCI_0SNOOP_CONTROL_BASE_0_LOW				 0x1f00
+#define PCI_0SNOOP_CONTROL_BASE_0_HIGH				 0x1f04
+#define PCI_0SNOOP_CONTROL_TOP_0				 0x1f08
+#define PCI_0SNOOP_CONTROL_BASE_1_0_LOW				 0x1f10
+#define PCI_0SNOOP_CONTROL_BASE_1_0_HIGH			 0x1f14
+#define PCI_0SNOOP_CONTROL_TOP_1				 0x1f18
+#define PCI_0SNOOP_CONTROL_BASE_2_0_LOW				 0x1f20
+#define PCI_0SNOOP_CONTROL_BASE_2_0_HIGH			 0x1f24
+#define PCI_0SNOOP_CONTROL_TOP_2				 0x1f28
+#define PCI_0SNOOP_CONTROL_BASE_3_0_LOW				 0x1f30
+#define PCI_0SNOOP_CONTROL_BASE_3_0_HIGH			 0x1f34
+#define PCI_0SNOOP_CONTROL_TOP_3				 0x1f38
+#define PCI_1SNOOP_CONTROL_BASE_0_LOW				 0x1f80
+#define PCI_1SNOOP_CONTROL_BASE_0_HIGH				 0x1f84
+#define PCI_1SNOOP_CONTROL_TOP_0				 0x1f88
+#define PCI_1SNOOP_CONTROL_BASE_1_0_LOW				 0x1f90
+#define PCI_1SNOOP_CONTROL_BASE_1_0_HIGH			 0x1f94
+#define PCI_1SNOOP_CONTROL_TOP_1				 0x1f98
+#define PCI_1SNOOP_CONTROL_BASE_2_0_LOW				 0x1fa0
+#define PCI_1SNOOP_CONTROL_BASE_2_0_HIGH			 0x1fa4
+#define PCI_1SNOOP_CONTROL_TOP_2				 0x1fa8
+#define PCI_1SNOOP_CONTROL_BASE_3_0_LOW				 0x1fb0
+#define PCI_1SNOOP_CONTROL_BASE_3_0_HIGH			 0x1fb4
+#define PCI_1SNOOP_CONTROL_TOP_3				 0x1fb8
+
+/*
+ * PCI Configuration Address
+ */
+
+#define PCI_0CONFIGURATION_ADDRESS				0xcf8
+#define PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER		0xcfc
+#define PCI_1CONFIGURATION_ADDRESS				0xc78
+#define PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER		0xc7c
+#define PCI_0INTERRUPT_ACKNOWLEDGE_VIRTUAL_REGISTER		0xc34
+#define PCI_1INTERRUPT_ACKNOWLEDGE_VIRTUAL_REGISTER		0xcb4
+
+/*
+ * PCI Error Report
+ */
+
+#define PCI_0SERR_MASK						 0xc28
+#define PCI_0ERROR_ADDRESS_LOW					 0x1d40
+#define PCI_0ERROR_ADDRESS_HIGH					 0x1d44
+#define PCI_0ERROR_DATA_LOW					 0x1d48
+#define PCI_0ERROR_DATA_HIGH					 0x1d4c
+#define PCI_0ERROR_COMMAND					 0x1d50
+#define PCI_0ERROR_CAUSE					 0x1d58
+#define PCI_0ERROR_MASK						 0x1d5c
+
+#define PCI_1SERR_MASK						 0xca8
+#define PCI_1ERROR_ADDRESS_LOW					 0x1dc0
+#define PCI_1ERROR_ADDRESS_HIGH					 0x1dc4
+#define PCI_1ERROR_DATA_LOW					 0x1dc8
+#define PCI_1ERROR_DATA_HIGH					 0x1dcc
+#define PCI_1ERROR_COMMAND					 0x1dd0
+#define PCI_1ERROR_CAUSE					 0x1dd8
+#define PCI_1ERROR_MASK						 0x1ddc
+
+
+/*
+ * Lslave Debug	 (for internal use)
+ */
+
+#define L_SLAVE_X0_ADDRESS					0x1d20
+#define L_SLAVE_X0_COMMAND_AND_ID				0x1d24
+#define L_SLAVE_X1_ADDRESS					0x1d28
+#define L_SLAVE_X1_COMMAND_AND_ID				0x1d2c
+#define L_SLAVE_WRITE_DATA_LOW					0x1d30
+#define L_SLAVE_WRITE_DATA_HIGH					0x1d34
+#define L_SLAVE_WRITE_BYTE_ENABLE				0x1d60
+#define L_SLAVE_READ_DATA_LOW					0x1d38
+#define L_SLAVE_READ_DATA_HIGH					0x1d3c
+#define L_SLAVE_READ_ID						0x1d64
+
+#if 0 /* Disabled because PCI_* namespace belongs to PCI subsystem ... */
+
+/*
+ * PCI Configuration Function 0
+ */
+
+#define PCI_DEVICE_AND_VENDOR_ID				0x000
+#define PCI_STATUS_AND_COMMAND					0x004
+#define PCI_CLASS_CODE_AND_REVISION_ID				0x008
+#define PCI_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE		0x00C
+#define PCI_SCS_0_BASE_ADDRESS					0x010
+#define PCI_SCS_1_BASE_ADDRESS					0x014
+#define PCI_SCS_2_BASE_ADDRESS					0x018
+#define PCI_SCS_3_BASE_ADDRESS					0x01C
+#define PCI_INTERNAL_REGISTERS_MEMORY_MAPPED_BASE_ADDRESS	0x020
+#define PCI_INTERNAL_REGISTERS_I_OMAPPED_BASE_ADDRESS		0x024
+#define PCI_SUBSYSTEM_ID_AND_SUBSYSTEM_VENDOR_ID		0x02C
+#define PCI_EXPANSION_ROM_BASE_ADDRESS_REGISTER			0x030
+#define PCI_CAPABILTY_LIST_POINTER				0x034
+#define PCI_INTERRUPT_PIN_AND_LINE				0x03C
+#define PCI_POWER_MANAGEMENT_CAPABILITY				0x040
+#define PCI_POWER_MANAGEMENT_STATUS_AND_CONTROL			0x044
+#define PCI_VPD_ADDRESS						0x048
+#define PCI_VPD_DATA						0X04c
+#define PCI_MSI_MESSAGE_CONTROL					0x050
+#define PCI_MSI_MESSAGE_ADDRESS					0x054
+#define PCI_MSI_MESSAGE_UPPER_ADDRESS				0x058
+#define PCI_MSI_MESSAGE_DATA					0x05c
+#define PCI_COMPACT_PCI_HOT_SWAP_CAPABILITY			0x058
+
+/*
+ * PCI Configuration Function 1
+ */
+
+#define PCI_CS_0_BASE_ADDRESS					0x110
+#define PCI_CS_1_BASE_ADDRESS					0x114
+#define PCI_CS_2_BASE_ADDRESS					0x118
+#define PCI_CS_3_BASE_ADDRESS					0x11c
+#define PCI_BOOTCS_BASE_ADDRESS					0x120
+
+/*
+ * PCI Configuration Function 2
+ */
+
+#define PCI_P2P_MEM0_BASE_ADDRESS				0x210
+#define PCI_P2P_MEM1_BASE_ADDRESS				0x214
+#define PCI_P2P_I_O_BASE_ADDRESS				0x218
+#define PCI_CPU_BASE_ADDRESS					0x21c
+
+/*
+ * PCI Configuration Function 4
+ */
+
+#define PCI_DAC_SCS_0_BASE_ADDRESS_LOW				0x410
+#define PCI_DAC_SCS_0_BASE_ADDRESS_HIGH				0x414
+#define PCI_DAC_SCS_1_BASE_ADDRESS_LOW				0x418
+#define PCI_DAC_SCS_1_BASE_ADDRESS_HIGH				0x41c
+#define PCI_DAC_P2P_MEM0_BASE_ADDRESS_LOW			0x420
+#define PCI_DAC_P2P_MEM0_BASE_ADDRESS_HIGH			0x424
+
+
+/*
+ * PCI Configuration Function 5
+ */
+
+#define PCI_DAC_SCS_2_BASE_ADDRESS_LOW				0x510
+#define PCI_DAC_SCS_2_BASE_ADDRESS_HIGH				0x514
+#define PCI_DAC_SCS_3_BASE_ADDRESS_LOW				0x518
+#define PCI_DAC_SCS_3_BASE_ADDRESS_HIGH				0x51c
+#define PCI_DAC_P2P_MEM1_BASE_ADDRESS_LOW			0x520
+#define PCI_DAC_P2P_MEM1_BASE_ADDRESS_HIGH			0x524
+
+
+/*
+ * PCI Configuration Function 6
+ */
+
+#define PCI_DAC_CS_0_BASE_ADDRESS_LOW				0x610
+#define PCI_DAC_CS_0_BASE_ADDRESS_HIGH				0x614
+#define PCI_DAC_CS_1_BASE_ADDRESS_LOW				0x618
+#define PCI_DAC_CS_1_BASE_ADDRESS_HIGH				0x61c
+#define PCI_DAC_CS_2_BASE_ADDRESS_LOW				0x620
+#define PCI_DAC_CS_2_BASE_ADDRESS_HIGH				0x624
+
+/*
+ * PCI Configuration Function 7
+ */
+
+#define PCI_DAC_CS_3_BASE_ADDRESS_LOW				0x710
+#define PCI_DAC_CS_3_BASE_ADDRESS_HIGH				0x714
+#define PCI_DAC_BOOTCS_BASE_ADDRESS_LOW				0x718
+#define PCI_DAC_BOOTCS_BASE_ADDRESS_HIGH			0x71c
+#define PCI_DAC_CPU_BASE_ADDRESS_LOW				0x720
+#define PCI_DAC_CPU_BASE_ADDRESS_HIGH				0x724
+#endif
+
+/*
+ * Interrupts
+ */
+
+#define LOW_INTERRUPT_CAUSE_REGISTER				0xc18
+#define HIGH_INTERRUPT_CAUSE_REGISTER				0xc68
+#define CPU_INTERRUPT_MASK_REGISTER_LOW				0xc1c
+#define CPU_INTERRUPT_MASK_REGISTER_HIGH			0xc6c
+#define CPU_SELECT_CAUSE_REGISTER				0xc70
+#define PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW			0xc24
+#define PCI_0INTERRUPT_CAUSE_MASK_REGISTER_HIGH			0xc64
+#define PCI_0SELECT_CAUSE					0xc74
+#define PCI_1INTERRUPT_CAUSE_MASK_REGISTER_LOW			0xca4
+#define PCI_1INTERRUPT_CAUSE_MASK_REGISTER_HIGH			0xce4
+#define PCI_1SELECT_CAUSE					0xcf4
+#define CPU_INT_0_MASK						0xe60
+#define CPU_INT_1_MASK						0xe64
+#define CPU_INT_2_MASK						0xe68
+#define CPU_INT_3_MASK						0xe6c
+
+/*
+ * I20 Support registers
+ */
+
+#define INBOUND_MESSAGE_REGISTER0_PCI0_SIDE			0x010
+#define INBOUND_MESSAGE_REGISTER1_PCI0_SIDE			0x014
+#define OUTBOUND_MESSAGE_REGISTER0_PCI0_SIDE			0x018
+#define OUTBOUND_MESSAGE_REGISTER1_PCI0_SIDE			0x01C
+#define INBOUND_DOORBELL_REGISTER_PCI0_SIDE			0x020
+#define INBOUND_INTERRUPT_CAUSE_REGISTER_PCI0_SIDE		0x024
+#define INBOUND_INTERRUPT_MASK_REGISTER_PCI0_SIDE		0x028
+#define OUTBOUND_DOORBELL_REGISTER_PCI0_SIDE			0x02C
+#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_PCI0_SIDE		0x030
+#define OUTBOUND_INTERRUPT_MASK_REGISTER_PCI0_SIDE		0x034
+#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI0_SIDE		0x040
+#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI0_SIDE		0x044
+#define QUEUE_CONTROL_REGISTER_PCI0_SIDE			0x050
+#define QUEUE_BASE_ADDRESS_REGISTER_PCI0_SIDE			0x054
+#define INBOUND_FREE_HEAD_POINTER_REGISTER_PCI0_SIDE		0x060
+#define INBOUND_FREE_TAIL_POINTER_REGISTER_PCI0_SIDE		0x064
+#define INBOUND_POST_HEAD_POINTER_REGISTER_PCI0_SIDE		0x068
+#define INBOUND_POST_TAIL_POINTER_REGISTER_PCI0_SIDE		0x06C
+#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_PCI0_SIDE		0x070
+#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_PCI0_SIDE		0x074
+#define OUTBOUND_POST_HEAD_POINTER_REGISTER_PCI0_SIDE		0x0F8
+#define OUTBOUND_POST_TAIL_POINTER_REGISTER_PCI0_SIDE		0x0FC
+
+#define INBOUND_MESSAGE_REGISTER0_PCI1_SIDE			0x090
+#define INBOUND_MESSAGE_REGISTER1_PCI1_SIDE			0x094
+#define OUTBOUND_MESSAGE_REGISTER0_PCI1_SIDE			0x098
+#define OUTBOUND_MESSAGE_REGISTER1_PCI1_SIDE			0x09C
+#define INBOUND_DOORBELL_REGISTER_PCI1_SIDE			0x0A0
+#define INBOUND_INTERRUPT_CAUSE_REGISTER_PCI1_SIDE		0x0A4
+#define INBOUND_INTERRUPT_MASK_REGISTER_PCI1_SIDE		0x0A8
+#define OUTBOUND_DOORBELL_REGISTER_PCI1_SIDE			0x0AC
+#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_PCI1_SIDE		0x0B0
+#define OUTBOUND_INTERRUPT_MASK_REGISTER_PCI1_SIDE		0x0B4
+#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI1_SIDE		0x0C0
+#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI1_SIDE		0x0C4
+#define QUEUE_CONTROL_REGISTER_PCI1_SIDE			0x0D0
+#define QUEUE_BASE_ADDRESS_REGISTER_PCI1_SIDE			0x0D4
+#define INBOUND_FREE_HEAD_POINTER_REGISTER_PCI1_SIDE		0x0E0
+#define INBOUND_FREE_TAIL_POINTER_REGISTER_PCI1_SIDE		0x0E4
+#define INBOUND_POST_HEAD_POINTER_REGISTER_PCI1_SIDE		0x0E8
+#define INBOUND_POST_TAIL_POINTER_REGISTER_PCI1_SIDE		0x0EC
+#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_PCI1_SIDE		0x0F0
+#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_PCI1_SIDE		0x0F4
+#define OUTBOUND_POST_HEAD_POINTER_REGISTER_PCI1_SIDE		0x078
+#define OUTBOUND_POST_TAIL_POINTER_REGISTER_PCI1_SIDE		0x07C
+
+#define INBOUND_MESSAGE_REGISTER0_CPU0_SIDE			0X1C10
+#define INBOUND_MESSAGE_REGISTER1_CPU0_SIDE			0X1C14
+#define OUTBOUND_MESSAGE_REGISTER0_CPU0_SIDE			0X1C18
+#define OUTBOUND_MESSAGE_REGISTER1_CPU0_SIDE			0X1C1C
+#define INBOUND_DOORBELL_REGISTER_CPU0_SIDE			0X1C20
+#define INBOUND_INTERRUPT_CAUSE_REGISTER_CPU0_SIDE		0X1C24
+#define INBOUND_INTERRUPT_MASK_REGISTER_CPU0_SIDE		0X1C28
+#define OUTBOUND_DOORBELL_REGISTER_CPU0_SIDE			0X1C2C
+#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_CPU0_SIDE		0X1C30
+#define OUTBOUND_INTERRUPT_MASK_REGISTER_CPU0_SIDE		0X1C34
+#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU0_SIDE		0X1C40
+#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU0_SIDE		0X1C44
+#define QUEUE_CONTROL_REGISTER_CPU0_SIDE			0X1C50
+#define QUEUE_BASE_ADDRESS_REGISTER_CPU0_SIDE			0X1C54
+#define INBOUND_FREE_HEAD_POINTER_REGISTER_CPU0_SIDE		0X1C60
+#define INBOUND_FREE_TAIL_POINTER_REGISTER_CPU0_SIDE		0X1C64
+#define INBOUND_POST_HEAD_POINTER_REGISTER_CPU0_SIDE		0X1C68
+#define INBOUND_POST_TAIL_POINTER_REGISTER_CPU0_SIDE		0X1C6C
+#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_CPU0_SIDE		0X1C70
+#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_CPU0_SIDE		0X1C74
+#define OUTBOUND_POST_HEAD_POINTER_REGISTER_CPU0_SIDE		0X1CF8
+#define OUTBOUND_POST_TAIL_POINTER_REGISTER_CPU0_SIDE		0X1CFC
+
+#define INBOUND_MESSAGE_REGISTER0_CPU1_SIDE			0X1C90
+#define INBOUND_MESSAGE_REGISTER1_CPU1_SIDE			0X1C94
+#define OUTBOUND_MESSAGE_REGISTER0_CPU1_SIDE			0X1C98
+#define OUTBOUND_MESSAGE_REGISTER1_CPU1_SIDE			0X1C9C
+#define INBOUND_DOORBELL_REGISTER_CPU1_SIDE			0X1CA0
+#define INBOUND_INTERRUPT_CAUSE_REGISTER_CPU1_SIDE		0X1CA4
+#define INBOUND_INTERRUPT_MASK_REGISTER_CPU1_SIDE		0X1CA8
+#define OUTBOUND_DOORBELL_REGISTER_CPU1_SIDE			0X1CAC
+#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_CPU1_SIDE		0X1CB0
+#define OUTBOUND_INTERRUPT_MASK_REGISTER_CPU1_SIDE		0X1CB4
+#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU1_SIDE		0X1CC0
+#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU1_SIDE		0X1CC4
+#define QUEUE_CONTROL_REGISTER_CPU1_SIDE			0X1CD0
+#define QUEUE_BASE_ADDRESS_REGISTER_CPU1_SIDE			0X1CD4
+#define INBOUND_FREE_HEAD_POINTER_REGISTER_CPU1_SIDE		0X1CE0
+#define INBOUND_FREE_TAIL_POINTER_REGISTER_CPU1_SIDE		0X1CE4
+#define INBOUND_POST_HEAD_POINTER_REGISTER_CPU1_SIDE		0X1CE8
+#define INBOUND_POST_TAIL_POINTER_REGISTER_CPU1_SIDE		0X1CEC
+#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_CPU1_SIDE		0X1CF0
+#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_CPU1_SIDE		0X1CF4
+#define OUTBOUND_POST_HEAD_POINTER_REGISTER_CPU1_SIDE		0X1C78
+#define OUTBOUND_POST_TAIL_POINTER_REGISTER_CPU1_SIDE		0X1C7C
+
+/*
+ * Communication Unit Registers
+ */
+
+#define ETHERNET_0_ADDRESS_CONTROL_LOW
+#define ETHERNET_0_ADDRESS_CONTROL_HIGH				0xf204
+#define ETHERNET_0_RECEIVE_BUFFER_PCI_HIGH_ADDRESS		0xf208
+#define ETHERNET_0_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS		0xf20c
+#define ETHERNET_0_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf210
+#define ETHERNET_0_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf214
+#define ETHERNET_0_HASH_TABLE_PCI_HIGH_ADDRESS			0xf218
+#define ETHERNET_1_ADDRESS_CONTROL_LOW				0xf220
+#define ETHERNET_1_ADDRESS_CONTROL_HIGH				0xf224
+#define ETHERNET_1_RECEIVE_BUFFER_PCI_HIGH_ADDRESS		0xf228
+#define ETHERNET_1_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS		0xf22c
+#define ETHERNET_1_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf230
+#define ETHERNET_1_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf234
+#define ETHERNET_1_HASH_TABLE_PCI_HIGH_ADDRESS			0xf238
+#define ETHERNET_2_ADDRESS_CONTROL_LOW				0xf240
+#define ETHERNET_2_ADDRESS_CONTROL_HIGH				0xf244
+#define ETHERNET_2_RECEIVE_BUFFER_PCI_HIGH_ADDRESS		0xf248
+#define ETHERNET_2_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS		0xf24c
+#define ETHERNET_2_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf250
+#define ETHERNET_2_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf254
+#define ETHERNET_2_HASH_TABLE_PCI_HIGH_ADDRESS			0xf258
+#define MPSC_0_ADDRESS_CONTROL_LOW				0xf280
+#define MPSC_0_ADDRESS_CONTROL_HIGH				0xf284
+#define MPSC_0_RECEIVE_BUFFER_PCI_HIGH_ADDRESS			0xf288
+#define MPSC_0_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS			0xf28c
+#define MPSC_0_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf290
+#define MPSC_0_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf294
+#define MPSC_1_ADDRESS_CONTROL_LOW				0xf2a0
+#define MPSC_1_ADDRESS_CONTROL_HIGH				0xf2a4
+#define MPSC_1_RECEIVE_BUFFER_PCI_HIGH_ADDRESS			0xf2a8
+#define MPSC_1_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS			0xf2ac
+#define MPSC_1_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf2b0
+#define MPSC_1_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf2b4
+#define MPSC_2_ADDRESS_CONTROL_LOW				0xf2c0
+#define MPSC_2_ADDRESS_CONTROL_HIGH				0xf2c4
+#define MPSC_2_RECEIVE_BUFFER_PCI_HIGH_ADDRESS			0xf2c8
+#define MPSC_2_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS			0xf2cc
+#define MPSC_2_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf2d0
+#define MPSC_2_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS		0xf2d4
+#define SERIAL_INIT_PCI_HIGH_ADDRESS				0xf320
+#define SERIAL_INIT_LAST_DATA					0xf324
+#define SERIAL_INIT_STATUS_AND_CONTROL				0xf328
+#define COMM_UNIT_ARBITER_CONTROL				0xf300
+#define COMM_UNIT_CROSS_BAR_TIMEOUT				0xf304
+#define COMM_UNIT_INTERRUPT_CAUSE				0xf310
+#define COMM_UNIT_INTERRUPT_MASK				0xf314
+#define COMM_UNIT_ERROR_ADDRESS					0xf314
+
+/*
+ * Cunit Debug	(for internal use)
+ */
+
+#define CUNIT_ADDRESS						0xf340
+#define CUNIT_COMMAND_AND_ID					0xf344
+#define CUNIT_WRITE_DATA_LOW					0xf348
+#define CUNIT_WRITE_DATA_HIGH					0xf34c
+#define CUNIT_WRITE_BYTE_ENABLE					0xf358
+#define CUNIT_READ_DATA_LOW					0xf350
+#define CUNIT_READ_DATA_HIGH					0xf354
+#define CUNIT_READ_ID						0xf35c
+
+/*
+ * Fast Ethernet Unit Registers
+ */
+
+/* Ethernet */
+
+#define ETHERNET_PHY_ADDRESS_REGISTER				0x2000
+#define ETHERNET_SMI_REGISTER					0x2010
+
+/* Ethernet 0 */
+
+#define ETHERNET0_PORT_CONFIGURATION_REGISTER			0x2400
+#define ETHERNET0_PORT_CONFIGURATION_EXTEND_REGISTER		0x2408
+#define ETHERNET0_PORT_COMMAND_REGISTER				0x2410
+#define ETHERNET0_PORT_STATUS_REGISTER				0x2418
+#define ETHERNET0_SERIAL_PARAMETRS_REGISTER			0x2420
+#define ETHERNET0_HASH_TABLE_POINTER_REGISTER			0x2428
+#define ETHERNET0_FLOW_CONTROL_SOURCE_ADDRESS_LOW		0x2430
+#define ETHERNET0_FLOW_CONTROL_SOURCE_ADDRESS_HIGH		0x2438
+#define ETHERNET0_SDMA_CONFIGURATION_REGISTER			0x2440
+#define ETHERNET0_SDMA_COMMAND_REGISTER				0x2448
+#define ETHERNET0_INTERRUPT_CAUSE_REGISTER			0x2450
+#define ETHERNET0_INTERRUPT_MASK_REGISTER			0x2458
+#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER0			0x2480
+#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER1			0x2484
+#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER2			0x2488
+#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER3			0x248c
+#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER0		0x24a0
+#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER1		0x24a4
+#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER2		0x24a8
+#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER3		0x24ac
+#define ETHERNET0_CURRENT_TX_DESCRIPTOR_POINTER0		0x24e0
+#define ETHERNET0_CURRENT_TX_DESCRIPTOR_POINTER1		0x24e4
+#define ETHERNET0_MIB_COUNTER_BASE				0x2500
+
+/* Ethernet 1 */
+
+#define ETHERNET1_PORT_CONFIGURATION_REGISTER			0x2800
+#define ETHERNET1_PORT_CONFIGURATION_EXTEND_REGISTER		0x2808
+#define ETHERNET1_PORT_COMMAND_REGISTER				0x2810
+#define ETHERNET1_PORT_STATUS_REGISTER				0x2818
+#define ETHERNET1_SERIAL_PARAMETRS_REGISTER			0x2820
+#define ETHERNET1_HASH_TABLE_POINTER_REGISTER			0x2828
+#define ETHERNET1_FLOW_CONTROL_SOURCE_ADDRESS_LOW		0x2830
+#define ETHERNET1_FLOW_CONTROL_SOURCE_ADDRESS_HIGH		0x2838
+#define ETHERNET1_SDMA_CONFIGURATION_REGISTER			0x2840
+#define ETHERNET1_SDMA_COMMAND_REGISTER				0x2848
+#define ETHERNET1_INTERRUPT_CAUSE_REGISTER			0x2850
+#define ETHERNET1_INTERRUPT_MASK_REGISTER			0x2858
+#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER0			0x2880
+#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER1			0x2884
+#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER2			0x2888
+#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER3			0x288c
+#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER0		0x28a0
+#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER1		0x28a4
+#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER2		0x28a8
+#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER3		0x28ac
+#define ETHERNET1_CURRENT_TX_DESCRIPTOR_POINTER0		0x28e0
+#define ETHERNET1_CURRENT_TX_DESCRIPTOR_POINTER1		0x28e4
+#define ETHERNET1_MIB_COUNTER_BASE				0x2900
+
+/* Ethernet 2 */
+
+#define ETHERNET2_PORT_CONFIGURATION_REGISTER			0x2c00
+#define ETHERNET2_PORT_CONFIGURATION_EXTEND_REGISTER		0x2c08
+#define ETHERNET2_PORT_COMMAND_REGISTER				0x2c10
+#define ETHERNET2_PORT_STATUS_REGISTER				0x2c18
+#define ETHERNET2_SERIAL_PARAMETRS_REGISTER			0x2c20
+#define ETHERNET2_HASH_TABLE_POINTER_REGISTER			0x2c28
+#define ETHERNET2_FLOW_CONTROL_SOURCE_ADDRESS_LOW		0x2c30
+#define ETHERNET2_FLOW_CONTROL_SOURCE_ADDRESS_HIGH		0x2c38
+#define ETHERNET2_SDMA_CONFIGURATION_REGISTER			0x2c40
+#define ETHERNET2_SDMA_COMMAND_REGISTER				0x2c48
+#define ETHERNET2_INTERRUPT_CAUSE_REGISTER			0x2c50
+#define ETHERNET2_INTERRUPT_MASK_REGISTER			0x2c58
+#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER0			0x2c80
+#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER1			0x2c84
+#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER2			0x2c88
+#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER3			0x2c8c
+#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER0		0x2ca0
+#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER1		0x2ca4
+#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER2		0x2ca8
+#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER3		0x2cac
+#define ETHERNET2_CURRENT_TX_DESCRIPTOR_POINTER0		0x2ce0
+#define ETHERNET2_CURRENT_TX_DESCRIPTOR_POINTER1		0x2ce4
+#define ETHERNET2_MIB_COUNTER_BASE				0x2d00
+
+/*
+ * SDMA Registers
+ */
+
+#define SDMA_GROUP_CONFIGURATION_REGISTER			0xb1f0
+#define CHANNEL0_CONFIGURATION_REGISTER				0x4000
+#define CHANNEL0_COMMAND_REGISTER				0x4008
+#define CHANNEL0_RX_CMD_STATUS					0x4800
+#define CHANNEL0_RX_PACKET_AND_BUFFER_SIZES			0x4804
+#define CHANNEL0_RX_BUFFER_POINTER				0x4808
+#define CHANNEL0_RX_NEXT_POINTER				0x480c
+#define CHANNEL0_CURRENT_RX_DESCRIPTOR_POINTER			0x4810
+#define CHANNEL0_TX_CMD_STATUS					0x4C00
+#define CHANNEL0_TX_PACKET_SIZE					0x4C04
+#define CHANNEL0_TX_BUFFER_POINTER				0x4C08
+#define CHANNEL0_TX_NEXT_POINTER				0x4C0c
+#define CHANNEL0_CURRENT_TX_DESCRIPTOR_POINTER			0x4c10
+#define CHANNEL0_FIRST_TX_DESCRIPTOR_POINTER			0x4c14
+#define CHANNEL1_CONFIGURATION_REGISTER				0x6000
+#define CHANNEL1_COMMAND_REGISTER				0x6008
+#define CHANNEL1_RX_CMD_STATUS					0x6800
+#define CHANNEL1_RX_PACKET_AND_BUFFER_SIZES			0x6804
+#define CHANNEL1_RX_BUFFER_POINTER				0x6808
+#define CHANNEL1_RX_NEXT_POINTER				0x680c
+#define CHANNEL1_CURRENT_RX_DESCRIPTOR_POINTER			0x6810
+#define CHANNEL1_TX_CMD_STATUS					0x6C00
+#define CHANNEL1_TX_PACKET_SIZE					0x6C04
+#define CHANNEL1_TX_BUFFER_POINTER				0x6C08
+#define CHANNEL1_TX_NEXT_POINTER				0x6C0c
+#define CHANNEL1_CURRENT_RX_DESCRIPTOR_POINTER			0x6810
+#define CHANNEL1_CURRENT_TX_DESCRIPTOR_POINTER			0x6c10
+#define CHANNEL1_FIRST_TX_DESCRIPTOR_POINTER			0x6c14
+
+/* SDMA Interrupt */
+
+#define SDMA_CAUSE						0xb820
+#define SDMA_MASK						0xb8a0
+
+
+/*
+ * Baude Rate Generators Registers
+ */
+
+/* BRG 0 */
+
+#define BRG0_CONFIGURATION_REGISTER				0xb200
+#define BRG0_BAUDE_TUNING_REGISTER				0xb204
+
+/* BRG 1 */
+
+#define BRG1_CONFIGURATION_REGISTER				0xb208
+#define BRG1_BAUDE_TUNING_REGISTER				0xb20c
+
+/* BRG 2 */
+
+#define BRG2_CONFIGURATION_REGISTER				0xb210
+#define BRG2_BAUDE_TUNING_REGISTER				0xb214
+
+/* BRG Interrupts */
+
+#define BRG_CAUSE_REGISTER					0xb834
+#define BRG_MASK_REGISTER					0xb8b4
+
+/* MISC */
+
+#define MAIN_ROUTING_REGISTER					0xb400
+#define RECEIVE_CLOCK_ROUTING_REGISTER				0xb404
+#define TRANSMIT_CLOCK_ROUTING_REGISTER				0xb408
+#define COMM_UNIT_ARBITER_CONFIGURATION_REGISTER		0xb40c
+#define WATCHDOG_CONFIGURATION_REGISTER				0xb410
+#define WATCHDOG_VALUE_REGISTER					0xb414
+
+
+/*
+ * Flex TDM Registers
+ */
+
+/* FTDM Port */
+
+#define FLEXTDM_TRANSMIT_READ_POINTER				0xa800
+#define FLEXTDM_RECEIVE_READ_POINTER				0xa804
+#define FLEXTDM_CONFIGURATION_REGISTER				0xa808
+#define FLEXTDM_AUX_CHANNELA_TX_REGISTER			0xa80c
+#define FLEXTDM_AUX_CHANNELA_RX_REGISTER			0xa810
+#define FLEXTDM_AUX_CHANNELB_TX_REGISTER			0xa814
+#define FLEXTDM_AUX_CHANNELB_RX_REGISTER			0xa818
+
+/* FTDM Interrupts */
+
+#define FTDM_CAUSE_REGISTER					0xb830
+#define FTDM_MASK_REGISTER					0xb8b0
+
+
+/*
+ * GPP Interface Registers
+ */
+
+#define GPP_IO_CONTROL						0xf100
+#define GPP_LEVEL_CONTROL					0xf110
+#define GPP_VALUE						0xf104
+#define GPP_INTERRUPT_CAUSE					0xf108
+#define GPP_INTERRUPT_MASK					0xf10c
+
+#define MPP_CONTROL0						0xf000
+#define MPP_CONTROL1						0xf004
+#define MPP_CONTROL2						0xf008
+#define MPP_CONTROL3						0xf00c
+#define DEBUG_PORT_MULTIPLEX					0xf014
+#define SERIAL_PORT_MULTIPLEX					0xf010
+
+/*
+ * I2C Registers
+ */
+
+#define I2C_SLAVE_ADDRESS					0xc000
+#define I2C_EXTENDED_SLAVE_ADDRESS				0xc040
+#define I2C_DATA						0xc004
+#define I2C_CONTROL						0xc008
+#define I2C_STATUS_BAUDE_RATE					0xc00C
+#define I2C_SOFT_RESET						0xc01c
+
+/*
+ * MPSC Registers
+ */
+
+/*
+ * MPSC0
+ */
+
+#define MPSC0_MAIN_CONFIGURATION_LOW				0x8000
+#define MPSC0_MAIN_CONFIGURATION_HIGH				0x8004
+#define MPSC0_PROTOCOL_CONFIGURATION				0x8008
+#define CHANNEL0_REGISTER1					0x800c
+#define CHANNEL0_REGISTER2					0x8010
+#define CHANNEL0_REGISTER3					0x8014
+#define CHANNEL0_REGISTER4					0x8018
+#define CHANNEL0_REGISTER5					0x801c
+#define CHANNEL0_REGISTER6					0x8020
+#define CHANNEL0_REGISTER7					0x8024
+#define CHANNEL0_REGISTER8					0x8028
+#define CHANNEL0_REGISTER9					0x802c
+#define CHANNEL0_REGISTER10					0x8030
+#define CHANNEL0_REGISTER11					0x8034
+
+/*
+ * MPSC1
+ */
+
+#define MPSC1_MAIN_CONFIGURATION_LOW				0x9000
+#define MPSC1_MAIN_CONFIGURATION_HIGH				0x9004
+#define MPSC1_PROTOCOL_CONFIGURATION				0x9008
+#define CHANNEL1_REGISTER1					0x900c
+#define CHANNEL1_REGISTER2					0x9010
+#define CHANNEL1_REGISTER3					0x9014
+#define CHANNEL1_REGISTER4					0x9018
+#define CHANNEL1_REGISTER5					0x901c
+#define CHANNEL1_REGISTER6					0x9020
+#define CHANNEL1_REGISTER7					0x9024
+#define CHANNEL1_REGISTER8					0x9028
+#define CHANNEL1_REGISTER9					0x902c
+#define CHANNEL1_REGISTER10					0x9030
+#define CHANNEL1_REGISTER11					0x9034
+
+/*
+ * MPSCs Interupts
+ */
+
+#define MPSC0_CAUSE						0xb804
+#define MPSC0_MASK						0xb884
+#define MPSC1_CAUSE						0xb80c
+#define MPSC1_MASK						0xb88c
+
+extern unsigned long gt64240_base;
+
+#define GT64240_BASE	   (gt64240_base)
+
+/*
+ * Because of an error/peculiarity in the Galileo chip, we need to swap the
+ * bytes when running bigendian.
+ */
+#define __GT_READ(ofs)							\
+	(*(volatile u32 *)(GT64240_BASE+(ofs)))
+#define __GT_WRITE(ofs, data)						\
+	do { *(volatile u32 *)(GT64240_BASE+(ofs)) = (data); } while (0)
+
+#define GT_READ(ofs)		le32_to_cpu(__GT_READ(ofs))
+#define GT_WRITE(ofs, data)	__GT_WRITE(ofs, cpu_to_le32(data))
+
+#define GT_READ_16(ofs, data)						\
+        le16_to_cpu(*(volatile u16 *)(GT64240_BASE+(ofs)))
+#define GT_WRITE_16(ofs, data)  \
+        *(volatile u16 *)(GT64240_BASE+(ofs)) = cpu_to_le16(data)
+
+#define GT_READ_8(ofs, data)						\
+        *(data) = *(volatile u8 *)(GT64240_BASE+(ofs))
+#define GT_WRITE_8(ofs, data)						\
+        *(volatile u8 *)(GT64240_BASE+(ofs)) = data
+
+extern struct pci_ops gt_bus0_pci_ops;
+extern struct pci_ops gt_bus1_pci_ops;
+
+#endif	/* __ASM_MIPS_MV64240_H */
--- diff/include/asm-mips/lockmeter.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-mips/lockmeter.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,126 @@
+/*
+ *  Copyright (C) 1999,2000 Silicon Graphics, Inc.
+ *
+ *  Written by John Hawkes (hawkes@sgi.com)
+ *  Based on klstat.h by Jack Steiner (steiner@sgi.com)
+ *  Ported to mips32 for Asita Technologies
+ *   by D.J. Barrow ( dj.barrow@asitatechnologies.com )
+ */
+#ifndef _ASM_LOCKMETER_H
+#define _ASM_LOCKMETER_H
+
+/* do_gettimeoffset is a function pointer on mips */
+/* & it is not included by <linux/time.h> */
+#include <asm/time.h>
+#include <linux/time.h>
+#include <asm/div64.h>
+
+#define SPINLOCK_MAGIC_INIT	/* */
+
+#define CPU_CYCLE_FREQUENCY	get_cpu_cycle_frequency()
+
+#define THIS_CPU_NUMBER		smp_processor_id()
+
+static uint32_t cpu_cycle_frequency = 0;
+
+static uint32_t get_cpu_cycle_frequency(void)
+{
+    /* a total hack, slow and invasive, but ... it works */
+    int sec;
+    uint32_t start_cycles;
+    struct timeval tv;
+
+    if (cpu_cycle_frequency == 0) {	/* uninitialized */
+	do_gettimeofday(&tv);
+	sec = tv.tv_sec;	/* set up to catch the tv_sec rollover */
+	while (sec == tv.tv_sec) { do_gettimeofday(&tv); }
+	sec = tv.tv_sec;	/* rolled over to a new sec value */
+	start_cycles = get_cycles();
+	while (sec == tv.tv_sec) { do_gettimeofday(&tv); }
+	cpu_cycle_frequency = get_cycles() - start_cycles;
+    }
+
+    return cpu_cycle_frequency;
+}
+
+extern struct timeval xtime;
+
+static uint64_t get_cycles64(void)
+{
+    static uint64_t last_get_cycles64 = 0;
+    uint64_t ret;
+    unsigned long sec;
+    unsigned long usec, usec_offset;
+
+again:
+    sec  = xtime.tv_sec;
+    usec = xtime.tv_usec;
+    usec_offset = do_gettimeoffset();
+    if ((xtime.tv_sec != sec)  ||
+	(xtime.tv_usec != usec)||
+	(usec_offset >= 20000))
+	goto again;
+
+    ret = ((uint64_t)(usec + usec_offset) * cpu_cycle_frequency);
+    /* We can't do a normal 64 bit division on mips without libgcc.a */
+    do_div(ret,1000000);
+    ret +=  ((uint64_t)sec * cpu_cycle_frequency);
+
+    /* XXX why does time go backwards?  do_gettimeoffset?  general time adj? */
+    if (ret <= last_get_cycles64)
+	ret  = last_get_cycles64+1;
+    last_get_cycles64 = ret;
+
+    return ret;
+}
+
+/*
+ * macros to cache and retrieve an index value inside of a lock
+ * these macros assume that there are less than 65536 simultaneous
+ * (read mode) holders of a rwlock.
+ * we also assume that the hash table has less than 32767 entries.
+ * the high order bit is used for write locking a rw_lock
+ */
+#define INDEX_MASK   0x7FFF0000
+#define READERS_MASK 0x0000FFFF
+#define INDEX_SHIFT 16
+#define PUT_INDEX(lockp,index)   \
+        lockp->lock = (((lockp->lock) & ~INDEX_MASK) | (index) << INDEX_SHIFT)
+#define GET_INDEX(lockp) \
+        (((lockp->lock) & INDEX_MASK) >> INDEX_SHIFT)
+
+/*
+ * macros to cache and retrieve an index value in a read/write lock
+ * as well as the cpu where a reader busy period started
+ * we use the 2nd word (the debug word) for this, so require the
+ * debug word to be present
+ */
+/*
+ * instrumented rwlock structure -- never used to allocate storage
+ * only used in macros below to overlay a rwlock_t
+ */
+typedef struct inst_rwlock_s {
+	volatile int lock;
+	unsigned short index;
+	unsigned short cpu;
+} inst_rwlock_t;
+#define PUT_RWINDEX(rwlock_ptr,indexv) ((inst_rwlock_t *)(rwlock_ptr))->index = indexv
+#define GET_RWINDEX(rwlock_ptr)        ((inst_rwlock_t *)(rwlock_ptr))->index
+#define PUT_RW_CPU(rwlock_ptr,cpuv)    ((inst_rwlock_t *)(rwlock_ptr))->cpu = cpuv
+#define GET_RW_CPU(rwlock_ptr)         ((inst_rwlock_t *)(rwlock_ptr))->cpu
+
+/*
+ * return the number of readers for a rwlock_t
+ */
+#define RWLOCK_READERS(rwlock_ptr)   rwlock_readers(rwlock_ptr)
+
+extern inline int rwlock_readers(rwlock_t *rwlock_ptr)
+{
+	int tmp = (int) rwlock_ptr->lock;
+	return (tmp >= 0) ? tmp : 0;
+}
+
+#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr) ((rwlock_ptr)->lock < 0)
+#define RWLOCK_IS_READ_LOCKED(rwlock_ptr)  ((rwlock_ptr)->lock > 0)
+
+#endif /* _ASM_LOCKMETER_H */
--- diff/include/asm-mips/mach-yosemite/cpu-feature-overrides.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-mips/mach-yosemite/cpu-feature-overrides.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,38 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003, 2004 Ralf Baechle
+ */
+#ifndef __ASM_MACH_YOSEMITE_CPU_FEATURE_OVERRIDES_H
+#define __ASM_MACH_YOSEMITE_CPU_FEATURE_OVERRIDES_H
+
+/*
+ * Momentum Jaguar ATX always has the RM9000 processor.
+ */
+#define cpu_has_watch		1
+#define cpu_has_mips16		0
+#define cpu_has_divec		0
+#define cpu_has_vce		0
+#define cpu_has_cache_cdex_p	0
+#define cpu_has_cache_cdex_s	0
+#define cpu_has_prefetch	1
+#define cpu_has_mcheck		0
+#define cpu_has_ejtag		0
+
+#define cpu_has_llsc		1
+#define cpu_has_vtag_icache	0
+#define cpu_has_dc_aliases	0
+#define cpu_has_ic_fills_f_dc	0
+
+#define cpu_has_nofpuex		0
+#define cpu_has_64bits		1
+
+#define cpu_has_subset_pcaches	0
+
+#define cpu_dcache_line_size()	32
+#define cpu_icache_line_size()	32
+#define cpu_scache_line_size()	32
+
+#endif /* __ASM_MACH_YOSEMITE_CPU_FEATURE_OVERRIDES_H */
--- diff/include/asm-mips/setup.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-mips/setup.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,8 @@
+#ifdef __KERNEL__
+#ifndef _MIPS_SETUP_H
+#define _MIPS_SETUP_H
+
+#define COMMAND_LINE_SIZE	256
+
+#endif /* __SETUP_H */
+#endif /* __KERNEL__ */
--- diff/include/asm-mips/vr41xx/tb0219.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-mips/vr41xx/tb0219.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,42 @@
+/*
+ *  tb0219.h, Include file for TANBAC TB0219.
+ *
+ *  Copyright (C) 2002-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *
+ *  Modified for TANBAC TB0219:
+ *  Copyright (C) 2003 Megasolution Inc.  <matsu@megasolution.jp>
+ *
+ *  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
+ */
+#ifndef __TANBAC_TB0219_H
+#define __TANBAC_TB0219_H
+
+#include <asm/vr41xx/vr41xx.h>
+
+/*
+ * General-Purpose I/O Pin Number
+ */
+#define TB0219_PCI_SLOT1_PIN		2
+#define TB0219_PCI_SLOT2_PIN		3
+#define TB0219_PCI_SLOT3_PIN		4
+
+/*
+ * Interrupt Number
+ */
+#define TB0219_PCI_SLOT1_IRQ		GIU_IRQ(TB0219_PCI_SLOT1_PIN)
+#define TB0219_PCI_SLOT2_IRQ		GIU_IRQ(TB0219_PCI_SLOT2_PIN)
+#define TB0219_PCI_SLOT3_IRQ		GIU_IRQ(TB0219_PCI_SLOT3_PIN)
+
+#endif /* __TANBAC_TB0219_H */
--- diff/include/asm-ppc/cpm2.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ppc/cpm2.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,1041 @@
+/*
+ * Communication Processor Module v2.
+ *
+ * This file contains structures and information for the communication
+ * processor channels found in the dual port RAM or parameter RAM.
+ * All CPM control and status is available through the CPM2 internal
+ * memory map.  See immap_cpm2.h for details.
+ */
+#ifdef __KERNEL__
+#ifndef __CPM2__
+#define __CPM2__
+
+#include <asm/immap_cpm2.h>
+
+/* CPM Command register.
+*/
+#define CPM_CR_RST	((uint)0x80000000)
+#define CPM_CR_PAGE	((uint)0x7c000000)
+#define CPM_CR_SBLOCK	((uint)0x03e00000)
+#define CPM_CR_FLG	((uint)0x00010000)
+#define CPM_CR_MCN	((uint)0x00003fc0)
+#define CPM_CR_OPCODE	((uint)0x0000000f)
+
+/* Device sub-block and page codes.
+*/
+#define CPM_CR_SCC1_SBLOCK	(0x04)
+#define CPM_CR_SCC2_SBLOCK	(0x05)
+#define CPM_CR_SCC3_SBLOCK	(0x06)
+#define CPM_CR_SCC4_SBLOCK	(0x07)
+#define CPM_CR_SMC1_SBLOCK	(0x08)
+#define CPM_CR_SMC2_SBLOCK	(0x09)
+#define CPM_CR_SPI_SBLOCK	(0x0a)
+#define CPM_CR_I2C_SBLOCK	(0x0b)
+#define CPM_CR_TIMER_SBLOCK	(0x0f)
+#define CPM_CR_RAND_SBLOCK	(0x0e)
+#define CPM_CR_FCC1_SBLOCK	(0x10)
+#define CPM_CR_FCC2_SBLOCK	(0x11)
+#define CPM_CR_FCC3_SBLOCK	(0x12)
+#define CPM_CR_IDMA1_SBLOCK	(0x14)
+#define CPM_CR_IDMA2_SBLOCK	(0x15)
+#define CPM_CR_IDMA3_SBLOCK	(0x16)
+#define CPM_CR_IDMA4_SBLOCK	(0x17)
+#define CPM_CR_MCC1_SBLOCK	(0x1c)
+
+#define CPM_CR_SCC1_PAGE	(0x00)
+#define CPM_CR_SCC2_PAGE	(0x01)
+#define CPM_CR_SCC3_PAGE	(0x02)
+#define CPM_CR_SCC4_PAGE	(0x03)
+#define CPM_CR_SMC1_PAGE	(0x07)
+#define CPM_CR_SMC2_PAGE	(0x08)
+#define CPM_CR_SPI_PAGE		(0x09)
+#define CPM_CR_I2C_PAGE		(0x0a)
+#define CPM_CR_TIMER_PAGE	(0x0a)
+#define CPM_CR_RAND_PAGE	(0x0a)
+#define CPM_CR_FCC1_PAGE	(0x04)
+#define CPM_CR_FCC2_PAGE	(0x05)
+#define CPM_CR_FCC3_PAGE	(0x06)
+#define CPM_CR_IDMA1_PAGE	(0x07)
+#define CPM_CR_IDMA2_PAGE	(0x08)
+#define CPM_CR_IDMA3_PAGE	(0x09)
+#define CPM_CR_IDMA4_PAGE	(0x0a)
+#define CPM_CR_MCC1_PAGE	(0x07)
+#define CPM_CR_MCC2_PAGE	(0x08)
+
+/* Some opcodes (there are more...later)
+*/
+#define CPM_CR_INIT_TRX		((ushort)0x0000)
+#define CPM_CR_INIT_RX		((ushort)0x0001)
+#define CPM_CR_INIT_TX		((ushort)0x0002)
+#define CPM_CR_HUNT_MODE	((ushort)0x0003)
+#define CPM_CR_STOP_TX		((ushort)0x0004)
+#define CPM_CR_RESTART_TX	((ushort)0x0006)
+#define CPM_CR_SET_GADDR	((ushort)0x0008)
+#define CPM_CR_START_IDMA	((ushort)0x0009)
+#define CPM_CR_STOP_IDMA	((ushort)0x000b)
+
+#define mk_cr_cmd(PG, SBC, MCN, OP) \
+	((PG << 26) | (SBC << 21) | (MCN << 6) | OP)
+
+/* Dual Port RAM addresses.  The first 16K is available for almost
+ * any CPM use, so we put the BDs there.  The first 128 bytes are
+ * used for SMC1 and SMC2 parameter RAM, so we start allocating
+ * BDs above that.  All of this must change when we start
+ * downloading RAM microcode.
+ */
+#define CPM_DATAONLY_BASE	((uint)128)
+#define CPM_DP_NOSPACE		((uint)0x7fffffff)
+#ifdef CONFIG_8272
+#define CPM_DATAONLY_SIZE	((uint)(8 * 1024) - CPM_DATAONLY_BASE)
+#define CPM_FCC_SPECIAL_BASE	((uint)0x00009000)
+#else
+#define CPM_DATAONLY_SIZE	((uint)(16 * 1024) - CPM_DATAONLY_BASE)
+#define CPM_FCC_SPECIAL_BASE	((uint)0x0000b000)
+#endif
+
+/* The number of pages of host memory we allocate for CPM.  This is
+ * done early in kernel initialization to get physically contiguous
+ * pages.
+ */
+#define NUM_CPM_HOST_PAGES	2
+
+
+/* Export the base address of the communication processor registers
+ * and dual port ram.
+ */
+extern		cpm_cpm2_t	*cpmp;	 /* Pointer to comm processor */
+extern void *cpm2_dpalloc(uint size, uint align);
+extern int cpm2_dpfree(void *addr);
+extern void *cpm2_dpalloc_fixed(void *addr, uint size, uint allign);
+extern void cpm2_dpdump(void);
+extern unsigned int cpm2_dpram_offset(void *addr);
+extern void *cpm2_dpram_addr(int offset);
+extern void cpm2_setbrg(uint brg, uint rate);
+extern void cpm2_fastbrg(uint brg, uint rate, int div16);
+
+/* Buffer descriptors used by many of the CPM protocols.
+*/
+typedef struct cpm_buf_desc {
+	ushort	cbd_sc;		/* Status and Control */
+	ushort	cbd_datlen;	/* Data length in buffer */
+	uint	cbd_bufaddr;	/* Buffer address in host memory */
+} cbd_t;
+
+#define BD_SC_EMPTY	((ushort)0x8000)	/* Receive is empty */
+#define BD_SC_READY	((ushort)0x8000)	/* Transmit is ready */
+#define BD_SC_WRAP	((ushort)0x2000)	/* Last buffer descriptor */
+#define BD_SC_INTRPT	((ushort)0x1000)	/* Interrupt on change */
+#define BD_SC_LAST	((ushort)0x0800)	/* Last buffer in frame */
+#define BD_SC_CM	((ushort)0x0200)	/* Continous mode */
+#define BD_SC_ID	((ushort)0x0100)	/* Rec'd too many idles */
+#define BD_SC_P		((ushort)0x0100)	/* xmt preamble */
+#define BD_SC_BR	((ushort)0x0020)	/* Break received */
+#define BD_SC_FR	((ushort)0x0010)	/* Framing error */
+#define BD_SC_PR	((ushort)0x0008)	/* Parity error */
+#define BD_SC_OV	((ushort)0x0002)	/* Overrun */
+#define BD_SC_CD	((ushort)0x0001)	/* ?? */
+
+/* Function code bits, usually generic to devices.
+*/
+#define CPMFCR_GBL	((u_char)0x20)	/* Set memory snooping */
+#define CPMFCR_EB	((u_char)0x10)	/* Set big endian byte order */
+#define CPMFCR_TC2	((u_char)0x04)	/* Transfer code 2 value */
+#define CPMFCR_DTB	((u_char)0x02)	/* Use local bus for data when set */
+#define CPMFCR_BDB	((u_char)0x01)	/* Use local bus for BD when set */
+
+/* Parameter RAM offsets from the base.
+*/
+#define PROFF_SCC1		((uint)0x8000)
+#define PROFF_SCC2		((uint)0x8100)
+#define PROFF_SCC3		((uint)0x8200)
+#define PROFF_SCC4		((uint)0x8300)
+#define PROFF_FCC1		((uint)0x8400)
+#define PROFF_FCC2		((uint)0x8500)
+#define PROFF_FCC3		((uint)0x8600)
+#define PROFF_MCC1		((uint)0x8700)
+#define PROFF_SMC1_BASE		((uint)0x87fc)
+#define PROFF_IDMA1_BASE	((uint)0x87fe)
+#define PROFF_MCC2		((uint)0x8800)
+#define PROFF_SMC2_BASE		((uint)0x88fc)
+#define PROFF_IDMA2_BASE	((uint)0x88fe)
+#define PROFF_SPI_BASE		((uint)0x89fc)
+#define PROFF_IDMA3_BASE	((uint)0x89fe)
+#define PROFF_TIMERS		((uint)0x8ae0)
+#define PROFF_REVNUM		((uint)0x8af0)
+#define PROFF_RAND		((uint)0x8af8)
+#define PROFF_I2C_BASE		((uint)0x8afc)
+#define PROFF_IDMA4_BASE	((uint)0x8afe)
+
+/* The SMCs are relocated to any of the first eight DPRAM pages.
+ * We will fix these at the first locations of DPRAM, until we
+ * get some microcode patches :-).
+ * The parameter ram space for the SMCs is fifty-some bytes, and
+ * they are required to start on a 64 byte boundary.
+ */
+#define PROFF_SMC1	(0)
+#define PROFF_SMC2	(64)
+
+
+/* Define enough so I can at least use the serial port as a UART.
+ */
+typedef struct smc_uart {
+	ushort	smc_rbase;	/* Rx Buffer descriptor base address */
+	ushort	smc_tbase;	/* Tx Buffer descriptor base address */
+	u_char	smc_rfcr;	/* Rx function code */
+	u_char	smc_tfcr;	/* Tx function code */
+	ushort	smc_mrblr;	/* Max receive buffer length */
+	uint	smc_rstate;	/* Internal */
+	uint	smc_idp;	/* Internal */
+	ushort	smc_rbptr;	/* Internal */
+	ushort	smc_ibc;	/* Internal */
+	uint	smc_rxtmp;	/* Internal */
+	uint	smc_tstate;	/* Internal */
+	uint	smc_tdp;	/* Internal */
+	ushort	smc_tbptr;	/* Internal */
+	ushort	smc_tbc;	/* Internal */
+	uint	smc_txtmp;	/* Internal */
+	ushort	smc_maxidl;	/* Maximum idle characters */
+	ushort	smc_tmpidl;	/* Temporary idle counter */
+	ushort	smc_brklen;	/* Last received break length */
+	ushort	smc_brkec;	/* rcv'd break condition counter */
+	ushort	smc_brkcr;	/* xmt break count register */
+	ushort	smc_rmask;	/* Temporary bit mask */
+	uint	smc_stmp;	/* SDMA Temp */
+} smc_uart_t;
+
+/* SMC uart mode register (Internal memory map).
+*/
+#define SMCMR_REN	((ushort)0x0001)
+#define SMCMR_TEN	((ushort)0x0002)
+#define SMCMR_DM	((ushort)0x000c)
+#define SMCMR_SM_GCI	((ushort)0x0000)
+#define SMCMR_SM_UART	((ushort)0x0020)
+#define SMCMR_SM_TRANS	((ushort)0x0030)
+#define SMCMR_SM_MASK	((ushort)0x0030)
+#define SMCMR_PM_EVEN	((ushort)0x0100)	/* Even parity, else odd */
+#define SMCMR_REVD	SMCMR_PM_EVEN
+#define SMCMR_PEN	((ushort)0x0200)	/* Parity enable */
+#define SMCMR_BS	SMCMR_PEN
+#define SMCMR_SL	((ushort)0x0400)	/* Two stops, else one */
+#define SMCR_CLEN_MASK	((ushort)0x7800)	/* Character length */
+#define smcr_mk_clen(C)	(((C) << 11) & SMCR_CLEN_MASK)
+
+/* SMC Event and Mask register.
+*/
+#define SMCM_BRKE       ((unsigned char)0x40)   /* When in UART Mode */
+#define SMCM_BRK        ((unsigned char)0x10)   /* When in UART Mode */
+#define SMCM_TXE	((unsigned char)0x10)
+#define SMCM_BSY	((unsigned char)0x04)
+#define SMCM_TX		((unsigned char)0x02)
+#define SMCM_RX		((unsigned char)0x01)
+
+/* Baud rate generators.
+*/
+#define CPM_BRG_RST		((uint)0x00020000)
+#define CPM_BRG_EN		((uint)0x00010000)
+#define CPM_BRG_EXTC_INT	((uint)0x00000000)
+#define CPM_BRG_EXTC_CLK3_9	((uint)0x00004000)
+#define CPM_BRG_EXTC_CLK5_15	((uint)0x00008000)
+#define CPM_BRG_ATB		((uint)0x00002000)
+#define CPM_BRG_CD_MASK		((uint)0x00001ffe)
+#define CPM_BRG_DIV16		((uint)0x00000001)
+
+/* SCCs.
+*/
+#define SCC_GSMRH_IRP		((uint)0x00040000)
+#define SCC_GSMRH_GDE		((uint)0x00010000)
+#define SCC_GSMRH_TCRC_CCITT	((uint)0x00008000)
+#define SCC_GSMRH_TCRC_BISYNC	((uint)0x00004000)
+#define SCC_GSMRH_TCRC_HDLC	((uint)0x00000000)
+#define SCC_GSMRH_REVD		((uint)0x00002000)
+#define SCC_GSMRH_TRX		((uint)0x00001000)
+#define SCC_GSMRH_TTX		((uint)0x00000800)
+#define SCC_GSMRH_CDP		((uint)0x00000400)
+#define SCC_GSMRH_CTSP		((uint)0x00000200)
+#define SCC_GSMRH_CDS		((uint)0x00000100)
+#define SCC_GSMRH_CTSS		((uint)0x00000080)
+#define SCC_GSMRH_TFL		((uint)0x00000040)
+#define SCC_GSMRH_RFW		((uint)0x00000020)
+#define SCC_GSMRH_TXSY		((uint)0x00000010)
+#define SCC_GSMRH_SYNL16	((uint)0x0000000c)
+#define SCC_GSMRH_SYNL8		((uint)0x00000008)
+#define SCC_GSMRH_SYNL4		((uint)0x00000004)
+#define SCC_GSMRH_RTSM		((uint)0x00000002)
+#define SCC_GSMRH_RSYN		((uint)0x00000001)
+
+#define SCC_GSMRL_SIR		((uint)0x80000000)	/* SCC2 only */
+#define SCC_GSMRL_EDGE_NONE	((uint)0x60000000)
+#define SCC_GSMRL_EDGE_NEG	((uint)0x40000000)
+#define SCC_GSMRL_EDGE_POS	((uint)0x20000000)
+#define SCC_GSMRL_EDGE_BOTH	((uint)0x00000000)
+#define SCC_GSMRL_TCI		((uint)0x10000000)
+#define SCC_GSMRL_TSNC_3	((uint)0x0c000000)
+#define SCC_GSMRL_TSNC_4	((uint)0x08000000)
+#define SCC_GSMRL_TSNC_14	((uint)0x04000000)
+#define SCC_GSMRL_TSNC_INF	((uint)0x00000000)
+#define SCC_GSMRL_RINV		((uint)0x02000000)
+#define SCC_GSMRL_TINV		((uint)0x01000000)
+#define SCC_GSMRL_TPL_128	((uint)0x00c00000)
+#define SCC_GSMRL_TPL_64	((uint)0x00a00000)
+#define SCC_GSMRL_TPL_48	((uint)0x00800000)
+#define SCC_GSMRL_TPL_32	((uint)0x00600000)
+#define SCC_GSMRL_TPL_16	((uint)0x00400000)
+#define SCC_GSMRL_TPL_8		((uint)0x00200000)
+#define SCC_GSMRL_TPL_NONE	((uint)0x00000000)
+#define SCC_GSMRL_TPP_ALL1	((uint)0x00180000)
+#define SCC_GSMRL_TPP_01	((uint)0x00100000)
+#define SCC_GSMRL_TPP_10	((uint)0x00080000)
+#define SCC_GSMRL_TPP_ZEROS	((uint)0x00000000)
+#define SCC_GSMRL_TEND		((uint)0x00040000)
+#define SCC_GSMRL_TDCR_32	((uint)0x00030000)
+#define SCC_GSMRL_TDCR_16	((uint)0x00020000)
+#define SCC_GSMRL_TDCR_8	((uint)0x00010000)
+#define SCC_GSMRL_TDCR_1	((uint)0x00000000)
+#define SCC_GSMRL_RDCR_32	((uint)0x0000c000)
+#define SCC_GSMRL_RDCR_16	((uint)0x00008000)
+#define SCC_GSMRL_RDCR_8	((uint)0x00004000)
+#define SCC_GSMRL_RDCR_1	((uint)0x00000000)
+#define SCC_GSMRL_RENC_DFMAN	((uint)0x00003000)
+#define SCC_GSMRL_RENC_MANCH	((uint)0x00002000)
+#define SCC_GSMRL_RENC_FM0	((uint)0x00001000)
+#define SCC_GSMRL_RENC_NRZI	((uint)0x00000800)
+#define SCC_GSMRL_RENC_NRZ	((uint)0x00000000)
+#define SCC_GSMRL_TENC_DFMAN	((uint)0x00000600)
+#define SCC_GSMRL_TENC_MANCH	((uint)0x00000400)
+#define SCC_GSMRL_TENC_FM0	((uint)0x00000200)
+#define SCC_GSMRL_TENC_NRZI	((uint)0x00000100)
+#define SCC_GSMRL_TENC_NRZ	((uint)0x00000000)
+#define SCC_GSMRL_DIAG_LE	((uint)0x000000c0)	/* Loop and echo */
+#define SCC_GSMRL_DIAG_ECHO	((uint)0x00000080)
+#define SCC_GSMRL_DIAG_LOOP	((uint)0x00000040)
+#define SCC_GSMRL_DIAG_NORM	((uint)0x00000000)
+#define SCC_GSMRL_ENR		((uint)0x00000020)
+#define SCC_GSMRL_ENT		((uint)0x00000010)
+#define SCC_GSMRL_MODE_ENET	((uint)0x0000000c)
+#define SCC_GSMRL_MODE_DDCMP	((uint)0x00000009)
+#define SCC_GSMRL_MODE_BISYNC	((uint)0x00000008)
+#define SCC_GSMRL_MODE_V14	((uint)0x00000007)
+#define SCC_GSMRL_MODE_AHDLC	((uint)0x00000006)
+#define SCC_GSMRL_MODE_PROFIBUS	((uint)0x00000005)
+#define SCC_GSMRL_MODE_UART	((uint)0x00000004)
+#define SCC_GSMRL_MODE_SS7	((uint)0x00000003)
+#define SCC_GSMRL_MODE_ATALK	((uint)0x00000002)
+#define SCC_GSMRL_MODE_HDLC	((uint)0x00000000)
+
+#define SCC_TODR_TOD		((ushort)0x8000)
+
+/* SCC Event and Mask register.
+*/
+#define SCCM_TXE	((unsigned char)0x10)
+#define SCCM_BSY	((unsigned char)0x04)
+#define SCCM_TX		((unsigned char)0x02)
+#define SCCM_RX		((unsigned char)0x01)
+
+typedef struct scc_param {
+	ushort	scc_rbase;	/* Rx Buffer descriptor base address */
+	ushort	scc_tbase;	/* Tx Buffer descriptor base address */
+	u_char	scc_rfcr;	/* Rx function code */
+	u_char	scc_tfcr;	/* Tx function code */
+	ushort	scc_mrblr;	/* Max receive buffer length */
+	uint	scc_rstate;	/* Internal */
+	uint	scc_idp;	/* Internal */
+	ushort	scc_rbptr;	/* Internal */
+	ushort	scc_ibc;	/* Internal */
+	uint	scc_rxtmp;	/* Internal */
+	uint	scc_tstate;	/* Internal */
+	uint	scc_tdp;	/* Internal */
+	ushort	scc_tbptr;	/* Internal */
+	ushort	scc_tbc;	/* Internal */
+	uint	scc_txtmp;	/* Internal */
+	uint	scc_rcrc;	/* Internal */
+	uint	scc_tcrc;	/* Internal */
+} sccp_t;
+
+/* CPM Ethernet through SCC1.
+ */
+typedef struct scc_enet {
+	sccp_t	sen_genscc;
+	uint	sen_cpres;	/* Preset CRC */
+	uint	sen_cmask;	/* Constant mask for CRC */
+	uint	sen_crcec;	/* CRC Error counter */
+	uint	sen_alec;	/* alignment error counter */
+	uint	sen_disfc;	/* discard frame counter */
+	ushort	sen_pads;	/* Tx short frame pad character */
+	ushort	sen_retlim;	/* Retry limit threshold */
+	ushort	sen_retcnt;	/* Retry limit counter */
+	ushort	sen_maxflr;	/* maximum frame length register */
+	ushort	sen_minflr;	/* minimum frame length register */
+	ushort	sen_maxd1;	/* maximum DMA1 length */
+	ushort	sen_maxd2;	/* maximum DMA2 length */
+	ushort	sen_maxd;	/* Rx max DMA */
+	ushort	sen_dmacnt;	/* Rx DMA counter */
+	ushort	sen_maxb;	/* Max BD byte count */
+	ushort	sen_gaddr1;	/* Group address filter */
+	ushort	sen_gaddr2;
+	ushort	sen_gaddr3;
+	ushort	sen_gaddr4;
+	uint	sen_tbuf0data0;	/* Save area 0 - current frame */
+	uint	sen_tbuf0data1;	/* Save area 1 - current frame */
+	uint	sen_tbuf0rba;	/* Internal */
+	uint	sen_tbuf0crc;	/* Internal */
+	ushort	sen_tbuf0bcnt;	/* Internal */
+	ushort	sen_paddrh;	/* physical address (MSB) */
+	ushort	sen_paddrm;
+	ushort	sen_paddrl;	/* physical address (LSB) */
+	ushort	sen_pper;	/* persistence */
+	ushort	sen_rfbdptr;	/* Rx first BD pointer */
+	ushort	sen_tfbdptr;	/* Tx first BD pointer */
+	ushort	sen_tlbdptr;	/* Tx last BD pointer */
+	uint	sen_tbuf1data0;	/* Save area 0 - current frame */
+	uint	sen_tbuf1data1;	/* Save area 1 - current frame */
+	uint	sen_tbuf1rba;	/* Internal */
+	uint	sen_tbuf1crc;	/* Internal */
+	ushort	sen_tbuf1bcnt;	/* Internal */
+	ushort	sen_txlen;	/* Tx Frame length counter */
+	ushort	sen_iaddr1;	/* Individual address filter */
+	ushort	sen_iaddr2;
+	ushort	sen_iaddr3;
+	ushort	sen_iaddr4;
+	ushort	sen_boffcnt;	/* Backoff counter */
+
+	/* NOTE: Some versions of the manual have the following items
+	 * incorrectly documented.  Below is the proper order.
+	 */
+	ushort	sen_taddrh;	/* temp address (MSB) */
+	ushort	sen_taddrm;
+	ushort	sen_taddrl;	/* temp address (LSB) */
+} scc_enet_t;
+
+
+/* SCC Event register as used by Ethernet.
+*/
+#define SCCE_ENET_GRA	((ushort)0x0080)	/* Graceful stop complete */
+#define SCCE_ENET_TXE	((ushort)0x0010)	/* Transmit Error */
+#define SCCE_ENET_RXF	((ushort)0x0008)	/* Full frame received */
+#define SCCE_ENET_BSY	((ushort)0x0004)	/* All incoming buffers full */
+#define SCCE_ENET_TXB	((ushort)0x0002)	/* A buffer was transmitted */
+#define SCCE_ENET_RXB	((ushort)0x0001)	/* A buffer was received */
+
+/* SCC Mode Register (PSMR) as used by Ethernet.
+*/
+#define SCC_PSMR_HBC	((ushort)0x8000)	/* Enable heartbeat */
+#define SCC_PSMR_FC	((ushort)0x4000)	/* Force collision */
+#define SCC_PSMR_RSH	((ushort)0x2000)	/* Receive short frames */
+#define SCC_PSMR_IAM	((ushort)0x1000)	/* Check individual hash */
+#define SCC_PSMR_ENCRC	((ushort)0x0800)	/* Ethernet CRC mode */
+#define SCC_PSMR_PRO	((ushort)0x0200)	/* Promiscuous mode */
+#define SCC_PSMR_BRO	((ushort)0x0100)	/* Catch broadcast pkts */
+#define SCC_PSMR_SBT	((ushort)0x0080)	/* Special backoff timer */
+#define SCC_PSMR_LPB	((ushort)0x0040)	/* Set Loopback mode */
+#define SCC_PSMR_SIP	((ushort)0x0020)	/* Sample Input Pins */
+#define SCC_PSMR_LCW	((ushort)0x0010)	/* Late collision window */
+#define SCC_PSMR_NIB22	((ushort)0x000a)	/* Start frame search */
+#define SCC_PSMR_FDE	((ushort)0x0001)	/* Full duplex enable */
+
+/* Buffer descriptor control/status used by Ethernet receive.
+ * Common to SCC and FCC.
+ */
+#define BD_ENET_RX_EMPTY	((ushort)0x8000)
+#define BD_ENET_RX_WRAP		((ushort)0x2000)
+#define BD_ENET_RX_INTR		((ushort)0x1000)
+#define BD_ENET_RX_LAST		((ushort)0x0800)
+#define BD_ENET_RX_FIRST	((ushort)0x0400)
+#define BD_ENET_RX_MISS		((ushort)0x0100)
+#define BD_ENET_RX_BC		((ushort)0x0080)	/* FCC Only */
+#define BD_ENET_RX_MC		((ushort)0x0040)	/* FCC Only */
+#define BD_ENET_RX_LG		((ushort)0x0020)
+#define BD_ENET_RX_NO		((ushort)0x0010)
+#define BD_ENET_RX_SH		((ushort)0x0008)
+#define BD_ENET_RX_CR		((ushort)0x0004)
+#define BD_ENET_RX_OV		((ushort)0x0002)
+#define BD_ENET_RX_CL		((ushort)0x0001)
+#define BD_ENET_RX_STATS	((ushort)0x01ff)	/* All status bits */
+
+/* Buffer descriptor control/status used by Ethernet transmit.
+ * Common to SCC and FCC.
+ */
+#define BD_ENET_TX_READY	((ushort)0x8000)
+#define BD_ENET_TX_PAD		((ushort)0x4000)
+#define BD_ENET_TX_WRAP		((ushort)0x2000)
+#define BD_ENET_TX_INTR		((ushort)0x1000)
+#define BD_ENET_TX_LAST		((ushort)0x0800)
+#define BD_ENET_TX_TC		((ushort)0x0400)
+#define BD_ENET_TX_DEF		((ushort)0x0200)
+#define BD_ENET_TX_HB		((ushort)0x0100)
+#define BD_ENET_TX_LC		((ushort)0x0080)
+#define BD_ENET_TX_RL		((ushort)0x0040)
+#define BD_ENET_TX_RCMASK	((ushort)0x003c)
+#define BD_ENET_TX_UN		((ushort)0x0002)
+#define BD_ENET_TX_CSL		((ushort)0x0001)
+#define BD_ENET_TX_STATS	((ushort)0x03ff)	/* All status bits */
+
+/* SCC as UART
+*/
+typedef struct scc_uart {
+	sccp_t	scc_genscc;
+	uint	scc_res1;	/* Reserved */
+	uint	scc_res2;	/* Reserved */
+	ushort	scc_maxidl;	/* Maximum idle chars */
+	ushort	scc_idlc;	/* temp idle counter */
+	ushort	scc_brkcr;	/* Break count register */
+	ushort	scc_parec;	/* receive parity error counter */
+	ushort	scc_frmec;	/* receive framing error counter */
+	ushort	scc_nosec;	/* receive noise counter */
+	ushort	scc_brkec;	/* receive break condition counter */
+	ushort	scc_brkln;	/* last received break length */
+	ushort	scc_uaddr1;	/* UART address character 1 */
+	ushort	scc_uaddr2;	/* UART address character 2 */
+	ushort	scc_rtemp;	/* Temp storage */
+	ushort	scc_toseq;	/* Transmit out of sequence char */
+	ushort	scc_char1;	/* control character 1 */
+	ushort	scc_char2;	/* control character 2 */
+	ushort	scc_char3;	/* control character 3 */
+	ushort	scc_char4;	/* control character 4 */
+	ushort	scc_char5;	/* control character 5 */
+	ushort	scc_char6;	/* control character 6 */
+	ushort	scc_char7;	/* control character 7 */
+	ushort	scc_char8;	/* control character 8 */
+	ushort	scc_rccm;	/* receive control character mask */
+	ushort	scc_rccr;	/* receive control character register */
+	ushort	scc_rlbc;	/* receive last break character */
+} scc_uart_t;
+
+/* SCC Event and Mask registers when it is used as a UART.
+*/
+#define UART_SCCM_GLR		((ushort)0x1000)
+#define UART_SCCM_GLT		((ushort)0x0800)
+#define UART_SCCM_AB		((ushort)0x0200)
+#define UART_SCCM_IDL		((ushort)0x0100)
+#define UART_SCCM_GRA		((ushort)0x0080)
+#define UART_SCCM_BRKE		((ushort)0x0040)
+#define UART_SCCM_BRKS		((ushort)0x0020)
+#define UART_SCCM_CCR		((ushort)0x0008)
+#define UART_SCCM_BSY		((ushort)0x0004)
+#define UART_SCCM_TX		((ushort)0x0002)
+#define UART_SCCM_RX		((ushort)0x0001)
+
+/* The SCC PSMR when used as a UART.
+*/
+#define SCU_PSMR_FLC		((ushort)0x8000)
+#define SCU_PSMR_SL		((ushort)0x4000)
+#define SCU_PSMR_CL		((ushort)0x3000)
+#define SCU_PSMR_UM		((ushort)0x0c00)
+#define SCU_PSMR_FRZ		((ushort)0x0200)
+#define SCU_PSMR_RZS		((ushort)0x0100)
+#define SCU_PSMR_SYN		((ushort)0x0080)
+#define SCU_PSMR_DRT		((ushort)0x0040)
+#define SCU_PSMR_PEN		((ushort)0x0010)
+#define SCU_PSMR_RPM		((ushort)0x000c)
+#define SCU_PSMR_REVP		((ushort)0x0008)
+#define SCU_PSMR_TPM		((ushort)0x0003)
+#define SCU_PSMR_TEVP		((ushort)0x0003)
+
+/* CPM Transparent mode SCC.
+ */
+typedef struct scc_trans {
+	sccp_t	st_genscc;
+	uint	st_cpres;	/* Preset CRC */
+	uint	st_cmask;	/* Constant mask for CRC */
+} scc_trans_t;
+
+#define BD_SCC_TX_LAST		((ushort)0x0800)
+
+/* How about some FCCs.....
+*/
+#define FCC_GFMR_DIAG_NORM	((uint)0x00000000)
+#define FCC_GFMR_DIAG_LE	((uint)0x40000000)
+#define FCC_GFMR_DIAG_AE	((uint)0x80000000)
+#define FCC_GFMR_DIAG_ALE	((uint)0xc0000000)
+#define FCC_GFMR_TCI		((uint)0x20000000)
+#define FCC_GFMR_TRX		((uint)0x10000000)
+#define FCC_GFMR_TTX		((uint)0x08000000)
+#define FCC_GFMR_TTX		((uint)0x08000000)
+#define FCC_GFMR_CDP		((uint)0x04000000)
+#define FCC_GFMR_CTSP		((uint)0x02000000)
+#define FCC_GFMR_CDS		((uint)0x01000000)
+#define FCC_GFMR_CTSS		((uint)0x00800000)
+#define FCC_GFMR_SYNL_NONE	((uint)0x00000000)
+#define FCC_GFMR_SYNL_AUTO	((uint)0x00004000)
+#define FCC_GFMR_SYNL_8		((uint)0x00008000)
+#define FCC_GFMR_SYNL_16	((uint)0x0000c000)
+#define FCC_GFMR_RTSM		((uint)0x00002000)
+#define FCC_GFMR_RENC_NRZ	((uint)0x00000000)
+#define FCC_GFMR_RENC_NRZI	((uint)0x00000800)
+#define FCC_GFMR_REVD		((uint)0x00000400)
+#define FCC_GFMR_TENC_NRZ	((uint)0x00000000)
+#define FCC_GFMR_TENC_NRZI	((uint)0x00000100)
+#define FCC_GFMR_TCRC_16	((uint)0x00000000)
+#define FCC_GFMR_TCRC_32	((uint)0x00000080)
+#define FCC_GFMR_ENR		((uint)0x00000020)
+#define FCC_GFMR_ENT		((uint)0x00000010)
+#define FCC_GFMR_MODE_ENET	((uint)0x0000000c)
+#define FCC_GFMR_MODE_ATM	((uint)0x0000000a)
+#define FCC_GFMR_MODE_HDLC	((uint)0x00000000)
+
+/* Generic FCC parameter ram.
+*/
+typedef struct fcc_param {
+	ushort	fcc_riptr;	/* Rx Internal temp pointer */
+	ushort	fcc_tiptr;	/* Tx Internal temp pointer */
+	ushort	fcc_res1;
+	ushort	fcc_mrblr;	/* Max receive buffer length, mod 32 bytes */
+	uint	fcc_rstate;	/* Upper byte is Func code, must be set */
+	uint	fcc_rbase;	/* Receive BD base */
+	ushort	fcc_rbdstat;	/* RxBD status */
+	ushort	fcc_rbdlen;	/* RxBD down counter */
+	uint	fcc_rdptr;	/* RxBD internal data pointer */
+	uint	fcc_tstate;	/* Upper byte is Func code, must be set */
+	uint	fcc_tbase;	/* Transmit BD base */
+	ushort	fcc_tbdstat;	/* TxBD status */
+	ushort	fcc_tbdlen;	/* TxBD down counter */
+	uint	fcc_tdptr;	/* TxBD internal data pointer */
+	uint	fcc_rbptr;	/* Rx BD Internal buf pointer */
+	uint	fcc_tbptr;	/* Tx BD Internal buf pointer */
+	uint	fcc_rcrc;	/* Rx temp CRC */
+	uint	fcc_res2;
+	uint	fcc_tcrc;	/* Tx temp CRC */
+} fccp_t;
+
+
+/* Ethernet controller through FCC.
+*/
+typedef struct fcc_enet {
+	fccp_t	fen_genfcc;
+	uint	fen_statbuf;	/* Internal status buffer */
+	uint	fen_camptr;	/* CAM address */
+	uint	fen_cmask;	/* Constant mask for CRC */
+	uint	fen_cpres;	/* Preset CRC */
+	uint	fen_crcec;	/* CRC Error counter */
+	uint	fen_alec;	/* alignment error counter */
+	uint	fen_disfc;	/* discard frame counter */
+	ushort	fen_retlim;	/* Retry limit */
+	ushort	fen_retcnt;	/* Retry counter */
+	ushort	fen_pper;	/* Persistence */
+	ushort	fen_boffcnt;	/* backoff counter */
+	uint	fen_gaddrh;	/* Group address filter, high 32-bits */
+	uint	fen_gaddrl;	/* Group address filter, low 32-bits */
+	ushort	fen_tfcstat;	/* out of sequence TxBD */
+	ushort	fen_tfclen;
+	uint	fen_tfcptr;
+	ushort	fen_mflr;	/* Maximum frame length (1518) */
+	ushort	fen_paddrh;	/* MAC address */
+	ushort	fen_paddrm;
+	ushort	fen_paddrl;
+	ushort	fen_ibdcount;	/* Internal BD counter */
+	ushort	fen_ibdstart;	/* Internal BD start pointer */
+	ushort	fen_ibdend;	/* Internal BD end pointer */
+	ushort	fen_txlen;	/* Internal Tx frame length counter */
+	uint	fen_ibdbase[8]; /* Internal use */
+	uint	fen_iaddrh;	/* Individual address filter */
+	uint	fen_iaddrl;
+	ushort	fen_minflr;	/* Minimum frame length (64) */
+	ushort	fen_taddrh;	/* Filter transfer MAC address */
+	ushort	fen_taddrm;
+	ushort	fen_taddrl;
+	ushort	fen_padptr;	/* Pointer to pad byte buffer */
+	ushort	fen_cftype;	/* control frame type */
+	ushort	fen_cfrange;	/* control frame range */
+	ushort	fen_maxb;	/* maximum BD count */
+	ushort	fen_maxd1;	/* Max DMA1 length (1520) */
+	ushort	fen_maxd2;	/* Max DMA2 length (1520) */
+	ushort	fen_maxd;	/* internal max DMA count */
+	ushort	fen_dmacnt;	/* internal DMA counter */
+	uint	fen_octc;	/* Total octect counter */
+	uint	fen_colc;	/* Total collision counter */
+	uint	fen_broc;	/* Total broadcast packet counter */
+	uint	fen_mulc;	/* Total multicast packet count */
+	uint	fen_uspc;	/* Total packets < 64 bytes */
+	uint	fen_frgc;	/* Total packets < 64 bytes with errors */
+	uint	fen_ospc;	/* Total packets > 1518 */
+	uint	fen_jbrc;	/* Total packets > 1518 with errors */
+	uint	fen_p64c;	/* Total packets == 64 bytes */
+	uint	fen_p65c;	/* Total packets 64 < bytes <= 127 */
+	uint	fen_p128c;	/* Total packets 127 < bytes <= 255 */
+	uint	fen_p256c;	/* Total packets 256 < bytes <= 511 */
+	uint	fen_p512c;	/* Total packets 512 < bytes <= 1023 */
+	uint	fen_p1024c;	/* Total packets 1024 < bytes <= 1518 */
+	uint	fen_cambuf;	/* Internal CAM buffer poiner */
+	ushort	fen_rfthr;	/* Received frames threshold */
+	ushort	fen_rfcnt;	/* Received frames count */
+} fcc_enet_t;
+
+/* FCC Event/Mask register as used by Ethernet.
+*/
+#define FCC_ENET_GRA	((ushort)0x0080)	/* Graceful stop complete */
+#define FCC_ENET_RXC	((ushort)0x0040)	/* Control Frame Received */
+#define FCC_ENET_TXC	((ushort)0x0020)	/* Out of seq. Tx sent */
+#define FCC_ENET_TXE	((ushort)0x0010)	/* Transmit Error */
+#define FCC_ENET_RXF	((ushort)0x0008)	/* Full frame received */
+#define FCC_ENET_BSY	((ushort)0x0004)	/* Busy.  Rx Frame dropped */
+#define FCC_ENET_TXB	((ushort)0x0002)	/* A buffer was transmitted */
+#define FCC_ENET_RXB	((ushort)0x0001)	/* A buffer was received */
+
+/* FCC Mode Register (FPSMR) as used by Ethernet.
+*/
+#define FCC_PSMR_HBC	((uint)0x80000000)	/* Enable heartbeat */
+#define FCC_PSMR_FC	((uint)0x40000000)	/* Force Collision */
+#define FCC_PSMR_SBT	((uint)0x20000000)	/* Stop backoff timer */
+#define FCC_PSMR_LPB	((uint)0x10000000)	/* Local protect. 1 = FDX */
+#define FCC_PSMR_LCW	((uint)0x08000000)	/* Late collision select */
+#define FCC_PSMR_FDE	((uint)0x04000000)	/* Full Duplex Enable */
+#define FCC_PSMR_MON	((uint)0x02000000)	/* RMON Enable */
+#define FCC_PSMR_PRO	((uint)0x00400000)	/* Promiscuous Enable */
+#define FCC_PSMR_FCE	((uint)0x00200000)	/* Flow Control Enable */
+#define FCC_PSMR_RSH	((uint)0x00100000)	/* Receive Short Frames */
+#define FCC_PSMR_CAM	((uint)0x00000400)	/* CAM enable */
+#define FCC_PSMR_BRO	((uint)0x00000200)	/* Broadcast pkt discard */
+#define FCC_PSMR_ENCRC	((uint)0x00000080)	/* Use 32-bit CRC */
+
+/* IIC parameter RAM.
+*/
+typedef struct iic {
+	ushort	iic_rbase;	/* Rx Buffer descriptor base address */
+	ushort	iic_tbase;	/* Tx Buffer descriptor base address */
+	u_char	iic_rfcr;	/* Rx function code */
+	u_char	iic_tfcr;	/* Tx function code */
+	ushort	iic_mrblr;	/* Max receive buffer length */
+	uint	iic_rstate;	/* Internal */
+	uint	iic_rdp;	/* Internal */
+	ushort	iic_rbptr;	/* Internal */
+	ushort	iic_rbc;	/* Internal */
+	uint	iic_rxtmp;	/* Internal */
+	uint	iic_tstate;	/* Internal */
+	uint	iic_tdp;	/* Internal */
+	ushort	iic_tbptr;	/* Internal */
+	ushort	iic_tbc;	/* Internal */
+	uint	iic_txtmp;	/* Internal */
+} iic_t;
+
+/* SPI parameter RAM.
+*/
+typedef struct spi {
+	ushort	spi_rbase;	/* Rx Buffer descriptor base address */
+	ushort	spi_tbase;	/* Tx Buffer descriptor base address */
+	u_char	spi_rfcr;	/* Rx function code */
+	u_char	spi_tfcr;	/* Tx function code */
+	ushort	spi_mrblr;	/* Max receive buffer length */
+	uint	spi_rstate;	/* Internal */
+	uint	spi_rdp;	/* Internal */
+	ushort	spi_rbptr;	/* Internal */
+	ushort	spi_rbc;	/* Internal */
+	uint	spi_rxtmp;	/* Internal */
+	uint	spi_tstate;	/* Internal */
+	uint	spi_tdp;	/* Internal */
+	ushort	spi_tbptr;	/* Internal */
+	ushort	spi_tbc;	/* Internal */
+	uint	spi_txtmp;	/* Internal */
+	uint	spi_res;	/* Tx temp. */
+	uint	spi_res1[4];	/* SDMA temp. */
+} spi_t;
+
+/* SPI Mode register.
+*/
+#define SPMODE_LOOP	((ushort)0x4000)	/* Loopback */
+#define SPMODE_CI	((ushort)0x2000)	/* Clock Invert */
+#define SPMODE_CP	((ushort)0x1000)	/* Clock Phase */
+#define SPMODE_DIV16	((ushort)0x0800)	/* BRG/16 mode */
+#define SPMODE_REV	((ushort)0x0400)	/* Reversed Data */
+#define SPMODE_MSTR	((ushort)0x0200)	/* SPI Master */
+#define SPMODE_EN	((ushort)0x0100)	/* Enable */
+#define SPMODE_LENMSK	((ushort)0x00f0)	/* character length */
+#define SPMODE_PMMSK	((ushort)0x000f)	/* prescale modulus */
+
+#define SPMODE_LEN(x)	((((x)-1)&0xF)<<4)
+#define SPMODE_PM(x)	((x) &0xF)
+
+#define SPI_EB		((u_char)0x10)		/* big endian byte order */
+
+#define BD_IIC_START		((ushort)0x0400)
+
+/* IDMA parameter RAM
+*/
+typedef struct idma {
+	ushort ibase;		/* IDMA buffer descriptor table base address */
+	ushort dcm;		/* DMA channel mode */
+	ushort ibdptr;		/* IDMA current buffer descriptor pointer */
+	ushort dpr_buf;		/* IDMA transfer buffer base address */
+	ushort buf_inv;		/* internal buffer inventory */
+	ushort ss_max;		/* steady-state maximum transfer size */
+	ushort dpr_in_ptr;	/* write pointer inside the internal buffer */
+	ushort sts;		/* source transfer size */
+	ushort dpr_out_ptr;	/* read pointer inside the internal buffer */
+	ushort seob;		/* source end of burst */
+	ushort deob;		/* destination end of burst */
+	ushort dts;		/* destination transfer size */
+	ushort ret_add;		/* return address when working in ERM=1 mode */
+	ushort res0;		/* reserved */
+	uint   bd_cnt;		/* internal byte count */
+	uint   s_ptr;		/* source internal data pointer */
+	uint   d_ptr;		/* destination internal data pointer */
+	uint   istate;		/* internal state */
+	u_char res1[20];	/* pad to 64-byte length */
+} idma_t;
+
+/* DMA channel mode bit fields
+*/
+#define IDMA_DCM_FB		((ushort)0x8000) /* fly-by mode */
+#define IDMA_DCM_LP		((ushort)0x4000) /* low priority */
+#define IDMA_DCM_TC2		((ushort)0x0400) /* value driven on TC[2] */
+#define IDMA_DCM_DMA_WRAP_MASK	((ushort)0x01c0) /* mask for DMA wrap */
+#define IDMA_DCM_DMA_WRAP_64	((ushort)0x0000) /* 64-byte DMA xfer buffer */
+#define IDMA_DCM_DMA_WRAP_128	((ushort)0x0040) /* 128-byte DMA xfer buffer */
+#define IDMA_DCM_DMA_WRAP_256	((ushort)0x0080) /* 256-byte DMA xfer buffer */
+#define IDMA_DCM_DMA_WRAP_512	((ushort)0x00c0) /* 512-byte DMA xfer buffer */
+#define IDMA_DCM_DMA_WRAP_1024	((ushort)0x0100) /* 1024-byte DMA xfer buffer */
+#define IDMA_DCM_DMA_WRAP_2048	((ushort)0x0140) /* 2048-byte DMA xfer buffer */
+#define IDMA_DCM_SINC		((ushort)0x0020) /* source inc addr */
+#define IDMA_DCM_DINC		((ushort)0x0010) /* destination inc addr */
+#define IDMA_DCM_ERM		((ushort)0x0008) /* external request mode */
+#define IDMA_DCM_DT		((ushort)0x0004) /* DONE treatment */
+#define IDMA_DCM_SD_MASK	((ushort)0x0003) /* mask for SD bit field */
+#define IDMA_DCM_SD_MEM2MEM	((ushort)0x0000) /* memory-to-memory xfer */
+#define IDMA_DCM_SD_PER2MEM	((ushort)0x0002) /* peripheral-to-memory xfer */
+#define IDMA_DCM_SD_MEM2PER	((ushort)0x0001) /* memory-to-peripheral xfer */
+
+/* IDMA Buffer Descriptors
+*/
+typedef struct idma_bd {
+	uint flags;
+	uint len;	/* data length */
+	uint src;	/* source data buffer pointer */
+	uint dst;	/* destination data buffer pointer */
+} idma_bd_t;
+
+/* IDMA buffer descriptor flag bit fields
+*/
+#define IDMA_BD_V	((uint)0x80000000)	/* valid */
+#define IDMA_BD_W	((uint)0x20000000)	/* wrap */
+#define IDMA_BD_I	((uint)0x10000000)	/* interrupt */
+#define IDMA_BD_L	((uint)0x08000000)	/* last */
+#define IDMA_BD_CM	((uint)0x02000000)	/* continuous mode */
+#define IDMA_BD_SDN	((uint)0x00400000)	/* source done */
+#define IDMA_BD_DDN	((uint)0x00200000)	/* destination done */
+#define IDMA_BD_DGBL	((uint)0x00100000)	/* destination global */
+#define IDMA_BD_DBO_LE	((uint)0x00040000)	/* little-end dest byte order */
+#define IDMA_BD_DBO_BE	((uint)0x00080000)	/* big-end dest byte order */
+#define IDMA_BD_DDTB	((uint)0x00010000)	/* destination data bus */
+#define IDMA_BD_SGBL	((uint)0x00002000)	/* source global */
+#define IDMA_BD_SBO_LE	((uint)0x00000800)	/* little-end src byte order */
+#define IDMA_BD_SBO_BE	((uint)0x00001000)	/* big-end src byte order */
+#define IDMA_BD_SDTB	((uint)0x00000200)	/* source data bus */
+
+/* per-channel IDMA registers
+*/
+typedef struct im_idma {
+	u_char idsr;			/* IDMAn event status register */
+	u_char res0[3];
+	u_char idmr;			/* IDMAn event mask register */
+	u_char res1[3];
+} im_idma_t;
+
+/* IDMA event register bit fields
+*/
+#define IDMA_EVENT_SC	((unsigned char)0x08)	/* stop completed */
+#define IDMA_EVENT_OB	((unsigned char)0x04)	/* out of buffers */
+#define IDMA_EVENT_EDN	((unsigned char)0x02)	/* external DONE asserted */
+#define IDMA_EVENT_BC	((unsigned char)0x01)	/* buffer descriptor complete */
+
+/* RISC Controller Configuration Register (RCCR) bit fields
+*/
+#define RCCR_TIME	((uint)0x80000000) /* timer enable */
+#define RCCR_TIMEP_MASK	((uint)0x3f000000) /* mask for timer period bit field */
+#define RCCR_DR0M	((uint)0x00800000) /* IDMA0 request mode */
+#define RCCR_DR1M	((uint)0x00400000) /* IDMA1 request mode */
+#define RCCR_DR2M	((uint)0x00000080) /* IDMA2 request mode */
+#define RCCR_DR3M	((uint)0x00000040) /* IDMA3 request mode */
+#define RCCR_DR0QP_MASK	((uint)0x00300000) /* mask for IDMA0 req priority */
+#define RCCR_DR0QP_HIGH ((uint)0x00000000) /* IDMA0 has high req priority */
+#define RCCR_DR0QP_MED	((uint)0x00100000) /* IDMA0 has medium req priority */
+#define RCCR_DR0QP_LOW	((uint)0x00200000) /* IDMA0 has low req priority */
+#define RCCR_DR1QP_MASK	((uint)0x00030000) /* mask for IDMA1 req priority */
+#define RCCR_DR1QP_HIGH ((uint)0x00000000) /* IDMA1 has high req priority */
+#define RCCR_DR1QP_MED	((uint)0x00010000) /* IDMA1 has medium req priority */
+#define RCCR_DR1QP_LOW	((uint)0x00020000) /* IDMA1 has low req priority */
+#define RCCR_DR2QP_MASK	((uint)0x00000030) /* mask for IDMA2 req priority */
+#define RCCR_DR2QP_HIGH ((uint)0x00000000) /* IDMA2 has high req priority */
+#define RCCR_DR2QP_MED	((uint)0x00000010) /* IDMA2 has medium req priority */
+#define RCCR_DR2QP_LOW	((uint)0x00000020) /* IDMA2 has low req priority */
+#define RCCR_DR3QP_MASK	((uint)0x00000003) /* mask for IDMA3 req priority */
+#define RCCR_DR3QP_HIGH ((uint)0x00000000) /* IDMA3 has high req priority */
+#define RCCR_DR3QP_MED	((uint)0x00000001) /* IDMA3 has medium req priority */
+#define RCCR_DR3QP_LOW	((uint)0x00000002) /* IDMA3 has low req priority */
+#define RCCR_EIE	((uint)0x00080000) /* external interrupt enable */
+#define RCCR_SCD	((uint)0x00040000) /* scheduler configuration */
+#define RCCR_ERAM_MASK	((uint)0x0000e000) /* mask for enable RAM microcode */
+#define RCCR_ERAM_0KB	((uint)0x00000000) /* use 0KB of dpram for microcode */
+#define RCCR_ERAM_2KB	((uint)0x00002000) /* use 2KB of dpram for microcode */
+#define RCCR_ERAM_4KB	((uint)0x00004000) /* use 4KB of dpram for microcode */
+#define RCCR_ERAM_6KB	((uint)0x00006000) /* use 6KB of dpram for microcode */
+#define RCCR_ERAM_8KB	((uint)0x00008000) /* use 8KB of dpram for microcode */
+#define RCCR_ERAM_10KB	((uint)0x0000a000) /* use 10KB of dpram for microcode */
+#define RCCR_ERAM_12KB	((uint)0x0000c000) /* use 12KB of dpram for microcode */
+#define RCCR_EDM0	((uint)0x00000800) /* DREQ0 edge detect mode */
+#define RCCR_EDM1	((uint)0x00000400) /* DREQ1 edge detect mode */
+#define RCCR_EDM2	((uint)0x00000200) /* DREQ2 edge detect mode */
+#define RCCR_EDM3	((uint)0x00000100) /* DREQ3 edge detect mode */
+#define RCCR_DEM01	((uint)0x00000008) /* DONE0/DONE1 edge detect mode */
+#define RCCR_DEM23	((uint)0x00000004) /* DONE2/DONE3 edge detect mode */
+
+/*-----------------------------------------------------------------------
+ * CMXFCR - CMX FCC Clock Route Register
+ */
+#define CMXFCR_FC1         0x40000000   /* FCC1 connection              */
+#define CMXFCR_RF1CS_MSK   0x38000000   /* Receive FCC1 Clock Source Mask */
+#define CMXFCR_TF1CS_MSK   0x07000000   /* Transmit FCC1 Clock Source Mask */
+#define CMXFCR_FC2         0x00400000   /* FCC2 connection              */
+#define CMXFCR_RF2CS_MSK   0x00380000   /* Receive FCC2 Clock Source Mask */
+#define CMXFCR_TF2CS_MSK   0x00070000   /* Transmit FCC2 Clock Source Mask */
+#define CMXFCR_FC3         0x00004000   /* FCC3 connection              */
+#define CMXFCR_RF3CS_MSK   0x00003800   /* Receive FCC3 Clock Source Mask */
+#define CMXFCR_TF3CS_MSK   0x00000700   /* Transmit FCC3 Clock Source Mask */
+
+#define CMXFCR_RF1CS_BRG5  0x00000000   /* Receive FCC1 Clock Source is BRG5 */
+#define CMXFCR_RF1CS_BRG6  0x08000000   /* Receive FCC1 Clock Source is BRG6 */
+#define CMXFCR_RF1CS_BRG7  0x10000000   /* Receive FCC1 Clock Source is BRG7 */
+#define CMXFCR_RF1CS_BRG8  0x18000000   /* Receive FCC1 Clock Source is BRG8 */
+#define CMXFCR_RF1CS_CLK9  0x20000000   /* Receive FCC1 Clock Source is CLK9 */
+#define CMXFCR_RF1CS_CLK10 0x28000000   /* Receive FCC1 Clock Source is CLK10 */
+#define CMXFCR_RF1CS_CLK11 0x30000000   /* Receive FCC1 Clock Source is CLK11 */
+#define CMXFCR_RF1CS_CLK12 0x38000000   /* Receive FCC1 Clock Source is CLK12 */
+
+#define CMXFCR_TF1CS_BRG5  0x00000000   /* Transmit FCC1 Clock Source is BRG5 */
+#define CMXFCR_TF1CS_BRG6  0x01000000   /* Transmit FCC1 Clock Source is BRG6 */
+#define CMXFCR_TF1CS_BRG7  0x02000000   /* Transmit FCC1 Clock Source is BRG7 */
+#define CMXFCR_TF1CS_BRG8  0x03000000   /* Transmit FCC1 Clock Source is BRG8 */
+#define CMXFCR_TF1CS_CLK9  0x04000000   /* Transmit FCC1 Clock Source is CLK9 */
+#define CMXFCR_TF1CS_CLK10 0x05000000   /* Transmit FCC1 Clock Source is CLK10 */
+#define CMXFCR_TF1CS_CLK11 0x06000000   /* Transmit FCC1 Clock Source is CLK11 */
+#define CMXFCR_TF1CS_CLK12 0x07000000   /* Transmit FCC1 Clock Source is CLK12 */
+
+#define CMXFCR_RF2CS_BRG5  0x00000000   /* Receive FCC2 Clock Source is BRG5 */
+#define CMXFCR_RF2CS_BRG6  0x00080000   /* Receive FCC2 Clock Source is BRG6 */
+#define CMXFCR_RF2CS_BRG7  0x00100000   /* Receive FCC2 Clock Source is BRG7 */
+#define CMXFCR_RF2CS_BRG8  0x00180000   /* Receive FCC2 Clock Source is BRG8 */
+#define CMXFCR_RF2CS_CLK13 0x00200000   /* Receive FCC2 Clock Source is CLK13 */
+#define CMXFCR_RF2CS_CLK14 0x00280000   /* Receive FCC2 Clock Source is CLK14 */
+#define CMXFCR_RF2CS_CLK15 0x00300000   /* Receive FCC2 Clock Source is CLK15 */
+#define CMXFCR_RF2CS_CLK16 0x00380000   /* Receive FCC2 Clock Source is CLK16 */
+
+#define CMXFCR_TF2CS_BRG5  0x00000000   /* Transmit FCC2 Clock Source is BRG5 */
+#define CMXFCR_TF2CS_BRG6  0x00010000   /* Transmit FCC2 Clock Source is BRG6 */
+#define CMXFCR_TF2CS_BRG7  0x00020000   /* Transmit FCC2 Clock Source is BRG7 */
+#define CMXFCR_TF2CS_BRG8  0x00030000   /* Transmit FCC2 Clock Source is BRG8 */
+#define CMXFCR_TF2CS_CLK13 0x00040000   /* Transmit FCC2 Clock Source is CLK13 */
+#define CMXFCR_TF2CS_CLK14 0x00050000   /* Transmit FCC2 Clock Source is CLK14 */
+#define CMXFCR_TF2CS_CLK15 0x00060000   /* Transmit FCC2 Clock Source is CLK15 */
+#define CMXFCR_TF2CS_CLK16 0x00070000   /* Transmit FCC2 Clock Source is CLK16 */
+
+#define CMXFCR_RF3CS_BRG5  0x00000000   /* Receive FCC3 Clock Source is BRG5 */
+#define CMXFCR_RF3CS_BRG6  0x00000800   /* Receive FCC3 Clock Source is BRG6 */
+#define CMXFCR_RF3CS_BRG7  0x00001000   /* Receive FCC3 Clock Source is BRG7 */
+#define CMXFCR_RF3CS_BRG8  0x00001800   /* Receive FCC3 Clock Source is BRG8 */
+#define CMXFCR_RF3CS_CLK13 0x00002000   /* Receive FCC3 Clock Source is CLK13 */
+#define CMXFCR_RF3CS_CLK14 0x00002800   /* Receive FCC3 Clock Source is CLK14 */
+#define CMXFCR_RF3CS_CLK15 0x00003000   /* Receive FCC3 Clock Source is CLK15 */
+#define CMXFCR_RF3CS_CLK16 0x00003800   /* Receive FCC3 Clock Source is CLK16 */
+
+#define CMXFCR_TF3CS_BRG5  0x00000000   /* Transmit FCC3 Clock Source is BRG5 */
+#define CMXFCR_TF3CS_BRG6  0x00000100   /* Transmit FCC3 Clock Source is BRG6 */
+#define CMXFCR_TF3CS_BRG7  0x00000200   /* Transmit FCC3 Clock Source is BRG7 */
+#define CMXFCR_TF3CS_BRG8  0x00000300   /* Transmit FCC3 Clock Source is BRG8 */
+#define CMXFCR_TF3CS_CLK13 0x00000400   /* Transmit FCC3 Clock Source is CLK13 */
+#define CMXFCR_TF3CS_CLK14 0x00000500   /* Transmit FCC3 Clock Source is CLK14 */
+#define CMXFCR_TF3CS_CLK15 0x00000600   /* Transmit FCC3 Clock Source is CLK15 */
+#define CMXFCR_TF3CS_CLK16 0x00000700   /* Transmit FCC3 Clock Source is CLK16 */
+
+/*-----------------------------------------------------------------------
+ * CMXSCR - CMX SCC Clock Route Register
+ */
+#define CMXSCR_GR1         0x80000000   /* Grant Support of SCC1        */
+#define CMXSCR_SC1         0x40000000   /* SCC1 connection              */
+#define CMXSCR_RS1CS_MSK   0x38000000   /* Receive SCC1 Clock Source Mask */
+#define CMXSCR_TS1CS_MSK   0x07000000   /* Transmit SCC1 Clock Source Mask */
+#define CMXSCR_GR2         0x00800000   /* Grant Support of SCC2        */
+#define CMXSCR_SC2         0x00400000   /* SCC2 connection              */
+#define CMXSCR_RS2CS_MSK   0x00380000   /* Receive SCC2 Clock Source Mask */
+#define CMXSCR_TS2CS_MSK   0x00070000   /* Transmit SCC2 Clock Source Mask */
+#define CMXSCR_GR3         0x00008000   /* Grant Support of SCC3        */
+#define CMXSCR_SC3         0x00004000   /* SCC3 connection              */
+#define CMXSCR_RS3CS_MSK   0x00003800   /* Receive SCC3 Clock Source Mask */
+#define CMXSCR_TS3CS_MSK   0x00000700   /* Transmit SCC3 Clock Source Mask */
+#define CMXSCR_GR4         0x00000080   /* Grant Support of SCC4        */
+#define CMXSCR_SC4         0x00000040   /* SCC4 connection              */
+#define CMXSCR_RS4CS_MSK   0x00000038   /* Receive SCC4 Clock Source Mask */
+#define CMXSCR_TS4CS_MSK   0x00000007   /* Transmit SCC4 Clock Source Mask */
+
+#define CMXSCR_RS1CS_BRG1  0x00000000   /* SCC1 Rx Clock Source is BRG1 */
+#define CMXSCR_RS1CS_BRG2  0x08000000   /* SCC1 Rx Clock Source is BRG2 */
+#define CMXSCR_RS1CS_BRG3  0x10000000   /* SCC1 Rx Clock Source is BRG3 */
+#define CMXSCR_RS1CS_BRG4  0x18000000   /* SCC1 Rx Clock Source is BRG4 */
+#define CMXSCR_RS1CS_CLK11 0x20000000   /* SCC1 Rx Clock Source is CLK11 */
+#define CMXSCR_RS1CS_CLK12 0x28000000   /* SCC1 Rx Clock Source is CLK12 */
+#define CMXSCR_RS1CS_CLK3  0x30000000   /* SCC1 Rx Clock Source is CLK3 */
+#define CMXSCR_RS1CS_CLK4  0x38000000   /* SCC1 Rx Clock Source is CLK4 */
+
+#define CMXSCR_TS1CS_BRG1  0x00000000   /* SCC1 Tx Clock Source is BRG1 */
+#define CMXSCR_TS1CS_BRG2  0x01000000   /* SCC1 Tx Clock Source is BRG2 */
+#define CMXSCR_TS1CS_BRG3  0x02000000   /* SCC1 Tx Clock Source is BRG3 */
+#define CMXSCR_TS1CS_BRG4  0x03000000   /* SCC1 Tx Clock Source is BRG4 */
+#define CMXSCR_TS1CS_CLK11 0x04000000   /* SCC1 Tx Clock Source is CLK11 */
+#define CMXSCR_TS1CS_CLK12 0x05000000   /* SCC1 Tx Clock Source is CLK12 */
+#define CMXSCR_TS1CS_CLK3  0x06000000   /* SCC1 Tx Clock Source is CLK3 */
+#define CMXSCR_TS1CS_CLK4  0x07000000   /* SCC1 Tx Clock Source is CLK4 */
+
+#define CMXSCR_RS2CS_BRG1  0x00000000   /* SCC2 Rx Clock Source is BRG1 */
+#define CMXSCR_RS2CS_BRG2  0x00080000   /* SCC2 Rx Clock Source is BRG2 */
+#define CMXSCR_RS2CS_BRG3  0x00100000   /* SCC2 Rx Clock Source is BRG3 */
+#define CMXSCR_RS2CS_BRG4  0x00180000   /* SCC2 Rx Clock Source is BRG4 */
+#define CMXSCR_RS2CS_CLK11 0x00200000   /* SCC2 Rx Clock Source is CLK11 */
+#define CMXSCR_RS2CS_CLK12 0x00280000   /* SCC2 Rx Clock Source is CLK12 */
+#define CMXSCR_RS2CS_CLK3  0x00300000   /* SCC2 Rx Clock Source is CLK3 */
+#define CMXSCR_RS2CS_CLK4  0x00380000   /* SCC2 Rx Clock Source is CLK4 */
+
+#define CMXSCR_TS2CS_BRG1  0x00000000   /* SCC2 Tx Clock Source is BRG1 */
+#define CMXSCR_TS2CS_BRG2  0x00010000   /* SCC2 Tx Clock Source is BRG2 */
+#define CMXSCR_TS2CS_BRG3  0x00020000   /* SCC2 Tx Clock Source is BRG3 */
+#define CMXSCR_TS2CS_BRG4  0x00030000   /* SCC2 Tx Clock Source is BRG4 */
+#define CMXSCR_TS2CS_CLK11 0x00040000   /* SCC2 Tx Clock Source is CLK11 */
+#define CMXSCR_TS2CS_CLK12 0x00050000   /* SCC2 Tx Clock Source is CLK12 */
+#define CMXSCR_TS2CS_CLK3  0x00060000   /* SCC2 Tx Clock Source is CLK3 */
+#define CMXSCR_TS2CS_CLK4  0x00070000   /* SCC2 Tx Clock Source is CLK4 */
+
+#define CMXSCR_RS3CS_BRG1  0x00000000   /* SCC3 Rx Clock Source is BRG1 */
+#define CMXSCR_RS3CS_BRG2  0x00000800   /* SCC3 Rx Clock Source is BRG2 */
+#define CMXSCR_RS3CS_BRG3  0x00001000   /* SCC3 Rx Clock Source is BRG3 */
+#define CMXSCR_RS3CS_BRG4  0x00001800   /* SCC3 Rx Clock Source is BRG4 */
+#define CMXSCR_RS3CS_CLK5  0x00002000   /* SCC3 Rx Clock Source is CLK5 */
+#define CMXSCR_RS3CS_CLK6  0x00002800   /* SCC3 Rx Clock Source is CLK6 */
+#define CMXSCR_RS3CS_CLK7  0x00003000   /* SCC3 Rx Clock Source is CLK7 */
+#define CMXSCR_RS3CS_CLK8  0x00003800   /* SCC3 Rx Clock Source is CLK8 */
+
+#define CMXSCR_TS3CS_BRG1  0x00000000   /* SCC3 Tx Clock Source is BRG1 */
+#define CMXSCR_TS3CS_BRG2  0x00000100   /* SCC3 Tx Clock Source is BRG2 */
+#define CMXSCR_TS3CS_BRG3  0x00000200   /* SCC3 Tx Clock Source is BRG3 */
+#define CMXSCR_TS3CS_BRG4  0x00000300   /* SCC3 Tx Clock Source is BRG4 */
+#define CMXSCR_TS3CS_CLK5  0x00000400   /* SCC3 Tx Clock Source is CLK5 */
+#define CMXSCR_TS3CS_CLK6  0x00000500   /* SCC3 Tx Clock Source is CLK6 */
+#define CMXSCR_TS3CS_CLK7  0x00000600   /* SCC3 Tx Clock Source is CLK7 */
+#define CMXSCR_TS3CS_CLK8  0x00000700   /* SCC3 Tx Clock Source is CLK8 */
+
+#define CMXSCR_RS4CS_BRG1  0x00000000   /* SCC4 Rx Clock Source is BRG1 */
+#define CMXSCR_RS4CS_BRG2  0x00000008   /* SCC4 Rx Clock Source is BRG2 */
+#define CMXSCR_RS4CS_BRG3  0x00000010   /* SCC4 Rx Clock Source is BRG3 */
+#define CMXSCR_RS4CS_BRG4  0x00000018   /* SCC4 Rx Clock Source is BRG4 */
+#define CMXSCR_RS4CS_CLK5  0x00000020   /* SCC4 Rx Clock Source is CLK5 */
+#define CMXSCR_RS4CS_CLK6  0x00000028   /* SCC4 Rx Clock Source is CLK6 */
+#define CMXSCR_RS4CS_CLK7  0x00000030   /* SCC4 Rx Clock Source is CLK7 */
+#define CMXSCR_RS4CS_CLK8  0x00000038   /* SCC4 Rx Clock Source is CLK8 */
+
+#define CMXSCR_TS4CS_BRG1  0x00000000   /* SCC4 Tx Clock Source is BRG1 */
+#define CMXSCR_TS4CS_BRG2  0x00000001   /* SCC4 Tx Clock Source is BRG2 */
+#define CMXSCR_TS4CS_BRG3  0x00000002   /* SCC4 Tx Clock Source is BRG3 */
+#define CMXSCR_TS4CS_BRG4  0x00000003   /* SCC4 Tx Clock Source is BRG4 */
+#define CMXSCR_TS4CS_CLK5  0x00000004   /* SCC4 Tx Clock Source is CLK5 */
+#define CMXSCR_TS4CS_CLK6  0x00000005   /* SCC4 Tx Clock Source is CLK6 */
+#define CMXSCR_TS4CS_CLK7  0x00000006   /* SCC4 Tx Clock Source is CLK7 */
+#define CMXSCR_TS4CS_CLK8  0x00000007   /* SCC4 Tx Clock Source is CLK8 */
+
+#endif /* __CPM2__ */
+#endif /* __KERNEL__ */
+
+
--- diff/include/asm-ppc/fsl_ocp.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ppc/fsl_ocp.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,54 @@
+/*
+ * include/asm-ppc/fsl_ocp.h
+ *
+ * Definitions for the on-chip peripherals on Freescale PPC processors
+ *
+ * Maintainer: Kumar Gala (kumar.gala@freescale.com)
+ *
+ * Copyright 2004 Freescale Semiconductor, Inc
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_FS_OCP_H__
+#define __ASM_FS_OCP_H__
+
+/* A table of information for supporting the Gianfar Ethernet Controller
+ * This helps identify which enet controller we are dealing with,
+ * and what type of enet controller it is
+ */
+struct ocp_gfar_data {
+	uint interruptTransmit;
+	uint interruptError;
+	uint interruptReceive;
+	uint interruptPHY;
+	uint flags;
+	uint phyid;
+	uint phyregidx;
+	unsigned char mac_addr[6];
+};
+
+/* Flags in the flags field */
+#define GFAR_HAS_COALESCE		0x20
+#define GFAR_HAS_RMON			0x10
+#define GFAR_HAS_MULTI_INTR		0x08
+#define GFAR_FIRM_SET_MACADDR		0x04
+#define GFAR_HAS_PHY_INTR		0x02	/* if not set use a timer */
+#define GFAR_HAS_GIGABIT		0x01
+
+/* Data structure for I2C support.  Just contains a couple flags
+ * to distinguish various I2C implementations*/
+struct ocp_fs_i2c_data {
+	uint flags;
+};
+
+/* Flags for I2C */
+#define FS_I2C_SEPARATE_DFSRR	0x02
+#define FS_I2C_32BIT		0x01
+
+#endif	/* __ASM_FS_OCP_H__ */
+#endif	/* __KERNEL__ */
--- diff/include/asm-ppc/immap_85xx.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ppc/immap_85xx.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,126 @@
+/*
+ * include/asm-ppc/immap_85xx.h
+ *
+ * MPC85xx Internal Memory Map
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor, Inc
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_IMMAP_85XX_H__
+#define __ASM_IMMAP_85XX_H__
+
+/* Eventually this should define all the IO block registers in 85xx */
+
+/* PCI Registers */
+typedef struct ccsr_pci {
+	uint	cfg_addr;	/* 0x.000 - PCI Configuration Address Register */
+	uint	cfg_data;	/* 0x.004 - PCI Configuration Data Register */
+	uint	int_ack;	/* 0x.008 - PCI Interrupt Acknowledge Register */
+	char	res1[3060];
+	uint	potar0;		/* 0x.c00 - PCI Outbound Transaction Address Register 0 */
+	uint	potear0;	/* 0x.c04 - PCI Outbound Translation Extended Address Register 0 */
+	uint	powbar0;	/* 0x.c08 - PCI Outbound Window Base Address Register 0 */
+	char	res2[4];
+	uint	powar0;		/* 0x.c10 - PCI Outbound Window Attributes Register 0 */
+	char	res3[12];
+	uint	potar1;		/* 0x.c20 - PCI Outbound Transaction Address Register 1 */
+	uint	potear1;	/* 0x.c24 - PCI Outbound Translation Extended Address Register 1 */
+	uint	powbar1;	/* 0x.c28 - PCI Outbound Window Base Address Register 1 */
+	char	res4[4];
+	uint	powar1;		/* 0x.c30 - PCI Outbound Window Attributes Register 1 */
+	char	res5[12];
+	uint	potar2;		/* 0x.c40 - PCI Outbound Transaction Address Register 2 */
+	uint	potear2;	/* 0x.c44 - PCI Outbound Translation Extended Address Register 2 */
+	uint	powbar2;	/* 0x.c48 - PCI Outbound Window Base Address Register 2 */
+	char	res6[4];
+	uint	powar2;		/* 0x.c50 - PCI Outbound Window Attributes Register 2 */
+	char	res7[12];
+	uint	potar3;		/* 0x.c60 - PCI Outbound Transaction Address Register 3 */
+	uint	potear3;	/* 0x.c64 - PCI Outbound Translation Extended Address Register 3 */
+	uint	powbar3;	/* 0x.c68 - PCI Outbound Window Base Address Register 3 */
+	char	res8[4];
+	uint	powar3;		/* 0x.c70 - PCI Outbound Window Attributes Register 3 */
+	char	res9[12];
+	uint	potar4;		/* 0x.c80 - PCI Outbound Transaction Address Register 4 */
+	uint	potear4;	/* 0x.c84 - PCI Outbound Translation Extended Address Register 4 */
+	uint	powbar4;	/* 0x.c88 - PCI Outbound Window Base Address Register 4 */
+	char	res10[4];
+	uint	powar4;		/* 0x.c90 - PCI Outbound Window Attributes Register 4 */
+	char	res11[268];
+	uint	pitar3;		/* 0x.da0 - PCI Inbound Translation Address Register 3  */
+	char	res12[4];
+	uint	piwbar3;	/* 0x.da8 - PCI Inbound Window Base Address Register 3 */
+	uint	piwbear3;	/* 0x.dac - PCI Inbound Window Base Extended Address Register 3 */
+	uint	piwar3;		/* 0x.db0 - PCI Inbound Window Attributes Register 3 */
+	char	res13[12];
+	uint	pitar2;		/* 0x.dc0 - PCI Inbound Translation Address Register 2  */
+	char	res14[4];
+	uint	piwbar2;	/* 0x.dc8 - PCI Inbound Window Base Address Register 2 */
+	uint	piwbear2;	/* 0x.dcc - PCI Inbound Window Base Extended Address Register 2 */
+	uint	piwar2;		/* 0x.dd0 - PCI Inbound Window Attributes Register 2 */
+	char	res15[12];
+	uint	pitar1;		/* 0x.de0 - PCI Inbound Translation Address Register 1  */
+	char	res16[4];
+	uint	piwbar1;	/* 0x.de8 - PCI Inbound Window Base Address Register 1 */
+	char	res17[4];
+	uint	piwar1;		/* 0x.df0 - PCI Inbound Window Attributes Register 1 */
+	char	res18[12];
+	uint	err_dr;		/* 0x.e00 - PCI Error Detect Register */
+	uint	err_cap_dr;	/* 0x.e04 - PCI Error Capture Disable Register */
+	uint	err_en;		/* 0x.e08 - PCI Error Enable Register */
+	uint	err_attrib;	/* 0x.e0c - PCI Error Attributes Capture Register */
+	uint	err_addr;	/* 0x.e10 - PCI Error Address Capture Register */
+	uint	err_ext_addr;	/* 0x.e14 - PCI Error Extended Address Capture Register */
+	uint	err_dl;		/* 0x.e18 - PCI Error Data Low Capture Register */
+	uint	err_dh;		/* 0x.e1c - PCI Error Data High Capture Register */
+	uint	gas_timr;	/* 0x.e20 - PCI Gasket Timer Register */
+	uint	pci_timr;	/* 0x.e24 - PCI Timer Register */
+	char	res19[472];
+} ccsr_pci_t;
+
+/* Global Utility Registers */
+typedef struct ccsr_guts {
+	uint	porpllsr;	/* 0x.0000 - POR PLL Ratio Status Register */
+	uint	porbmsr;	/* 0x.0004 - POR Boot Mode Status Register */
+	uint	porimpscr;	/* 0x.0008 - POR I/O Impedance Status and Control Register */
+	uint	pordevsr;	/* 0x.000c - POR I/O Device Status Register */
+	uint	pordbgmsr;	/* 0x.0010 - POR Debug Mode Status Register */
+	char	res1[12];
+	uint	gpporcr;	/* 0x.0020 - General-Purpose POR Configuration Register */
+	char	res2[12];
+	uint	gpiocr;		/* 0x.0030 - GPIO Control Register */
+	char	res3[12];
+	uint	gpoutdr;	/* 0x.0040 - General-Purpose Output Data Register */
+	char	res4[12];
+	uint	gpindr;		/* 0x.0050 - General-Purpose Input Data Register */
+	char	res5[12];
+	uint	pmuxcr;		/* 0x.0060 - Alternate Function Signal Multiplex Control */
+	char	res6[12];
+	uint	devdisr;	/* 0x.0070 - Device Disable Control */
+	char	res7[12];
+	uint	powmgtcsr;	/* 0x.0080 - Power Management Status and Control Register */
+	char	res8[12];
+	uint	mcpsumr;	/* 0x.0090 - Machine Check Summary Register */
+	char	res9[12];
+	uint	pvr;		/* 0x.00a0 - Processor Version Register */
+	uint	svr;		/* 0x.00a4 - System Version Register */
+	char	res10[3416];
+	uint	clkocr;		/* 0x.0e00 - Clock Out Select Register */
+	char	res11[12];
+	uint	ddrdllcr;	/* 0x.0e10 - DDR DLL Control Register */
+	char	res12[12];
+	uint	lbcdllcr;	/* 0x.0e20 - LBC DLL Control Register */
+	char	res13[61916];
+} ccsr_guts_t;
+
+#endif /* __ASM_IMMAP_85XX_H__ */
+#endif /* __KERNEL__ */
--- diff/include/asm-ppc/immap_cpm2.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ppc/immap_cpm2.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,648 @@
+/*
+ * CPM2 Internal Memory Map
+ * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
+ *
+ * The Internal Memory Map for devices with CPM2 on them.  This
+ * is the superset of all CPM2 devices (8260, 8266, 8280, 8272,
+ * 8560). 
+ */
+#ifdef __KERNEL__
+#ifndef __IMMAP_CPM2__
+#define __IMMAP_CPM2__
+
+/* System configuration registers.
+*/
+typedef	struct sys_82xx_conf {
+	u32	sc_siumcr;
+	u32	sc_sypcr;
+	u8	res1[6];
+	u16	sc_swsr;
+	u8	res2[20];
+	u32	sc_bcr;
+	u8	sc_ppc_acr;
+	u8	res3[3];
+	u32	sc_ppc_alrh;
+	u32	sc_ppc_alrl;
+	u8	sc_lcl_acr;
+	u8	res4[3];
+	u32	sc_lcl_alrh;
+	u32	sc_lcl_alrl;
+	u32	sc_tescr1;
+	u32	sc_tescr2;
+	u32	sc_ltescr1;
+	u32	sc_ltescr2;
+	u32	sc_pdtea;
+	u8	sc_pdtem;
+	u8	res5[3];
+	u32	sc_ldtea;
+	u8	sc_ldtem;
+	u8	res6[163];
+} sysconf_82xx_cpm2_t;
+
+typedef	struct sys_85xx_conf {
+	u32	sc_cear;
+	u16	sc_ceer;
+	u16	sc_cemr;
+	u8	res1[70];
+	u32	sc_smaer;
+	u8	res2[4];
+	u32	sc_smevr;
+	u32	sc_smctr;
+	u32	sc_lmaer;
+	u8	res3[4];
+	u32	sc_lmevr;
+	u32	sc_lmctr;
+	u8	res4[144];
+} sysconf_85xx_cpm2_t;
+
+typedef union sys_conf {
+	sysconf_82xx_cpm2_t	siu_82xx;
+	sysconf_85xx_cpm2_t	siu_85xx;
+} sysconf_cpm2_t;
+
+
+
+/* Memory controller registers.
+*/
+typedef struct	mem_ctlr {
+	u32	memc_br0;
+	u32	memc_or0;
+	u32	memc_br1;
+	u32	memc_or1;
+	u32	memc_br2;
+	u32	memc_or2;
+	u32	memc_br3;
+	u32	memc_or3;
+	u32	memc_br4;
+	u32	memc_or4;
+	u32	memc_br5;
+	u32	memc_or5;
+	u32	memc_br6;
+	u32	memc_or6;
+	u32	memc_br7;
+	u32	memc_or7;
+	u32	memc_br8;
+	u32	memc_or8;
+	u32	memc_br9;
+	u32	memc_or9;
+	u32	memc_br10;
+	u32	memc_or10;
+	u32	memc_br11;
+	u32	memc_or11;
+	u8	res1[8];
+	u32	memc_mar;
+	u8	res2[4];
+	u32	memc_mamr;
+	u32	memc_mbmr;
+	u32	memc_mcmr;
+	u8	res3[8];
+	u16	memc_mptpr;
+	u8	res4[2];
+	u32	memc_mdr;
+	u8	res5[4];
+	u32	memc_psdmr;
+	u32	memc_lsdmr;
+	u8	memc_purt;
+	u8	res6[3];
+	u8	memc_psrt;
+	u8	res7[3];
+	u8	memc_lurt;
+	u8	res8[3];
+	u8	memc_lsrt;
+	u8	res9[3];
+	u32	memc_immr;
+	u32	memc_pcibr0;
+	u32	memc_pcibr1;
+	u8	res10[16];
+	u32	memc_pcimsk0;
+	u32	memc_pcimsk1;
+	u8	res11[52];
+} memctl_cpm2_t;
+
+/* System Integration Timers.
+*/
+typedef struct	sys_int_timers {
+	u8	res1[32];
+	u16	sit_tmcntsc;
+	u8	res2[2];
+	u32	sit_tmcnt;
+	u8	res3[4];
+	u32	sit_tmcntal;
+	u8	res4[16];
+	u16	sit_piscr;
+	u8	res5[2];
+	u32	sit_pitc;
+	u32	sit_pitr;
+	u8	res6[92];
+	u8	res7[390];
+} sit_cpm2_t;
+
+#define PISCR_PIRQ_MASK		((u16)0xff00)
+#define PISCR_PS		((u16)0x0080)
+#define PISCR_PIE		((u16)0x0004)
+#define PISCR_PTF		((u16)0x0002)
+#define PISCR_PTE		((u16)0x0001)
+
+/* PCI Controller.
+*/
+typedef struct pci_ctlr {
+	u32	pci_omisr;
+	u32	pci_omimr;
+	u8	res1[8];
+	u32	pci_ifqpr;
+	u32	pci_ofqpr;
+	u8	res2[8];
+	u32	pci_imr0;
+	u32	pci_imr1;
+	u32	pci_omr0;
+	u32	pci_omr1;
+	u32	pci_odr;
+	u8	res3[4];
+	u32	pci_idr;
+	u8	res4[20];
+	u32	pci_imisr;
+	u32	pci_imimr;
+	u8	res5[24];
+	u32	pci_ifhpr;
+	u8	res6[4];
+	u32	pci_iftpr;
+	u8	res7[4];
+	u32	pci_iphpr;
+	u8	res8[4];
+	u32	pci_iptpr;
+	u8	res9[4];
+	u32	pci_ofhpr;
+	u8	res10[4];
+	u32	pci_oftpr;
+	u8	res11[4];
+	u32	pci_ophpr;
+	u8	res12[4];
+	u32	pci_optpr;
+	u8	res13[8];
+	u32	pci_mucr;
+	u8	res14[8];
+	u32	pci_qbar;
+	u8	res15[12];
+	u32	pci_dmamr0;
+	u32	pci_dmasr0;
+	u32	pci_dmacdar0;
+	u8	res16[4];
+	u32	pci_dmasar0;
+	u8	res17[4];
+	u32	pci_dmadar0;
+	u8	res18[4];
+	u32	pci_dmabcr0;
+	u32	pci_dmandar0;
+	u8	res19[86];
+	u32	pci_dmamr1;
+	u32	pci_dmasr1;
+	u32	pci_dmacdar1;
+	u8	res20[4];
+	u32	pci_dmasar1;
+	u8	res21[4];
+	u32	pci_dmadar1;
+	u8	res22[4];
+	u32	pci_dmabcr1;
+	u32	pci_dmandar1;
+	u8	res23[88];
+	u32	pci_dmamr2;
+	u32	pci_dmasr2;
+	u32	pci_dmacdar2;
+	u8	res24[4];
+	u32	pci_dmasar2;
+	u8	res25[4];
+	u32	pci_dmadar2;
+	u8	res26[4];
+	u32	pci_dmabcr2;
+	u32	pci_dmandar2;
+	u8	res27[88];
+	u32	pci_dmamr3;
+	u32	pci_dmasr3;
+	u32	pci_dmacdar3;
+	u8	res28[4];
+	u32	pci_dmasar3;
+	u8	res29[4];
+	u32	pci_dmadar3;
+	u8	res30[4];
+	u32	pci_dmabcr3;
+	u32	pci_dmandar3;
+	u8	res31[344];
+	u32	pci_potar0;
+	u8	res32[4];
+	u32	pci_pobar0;
+	u8	res33[4];
+	u32	pci_pocmr0;
+	u8	res34[4];
+	u32	pci_potar1;
+	u8	res35[4];
+	u32	pci_pobar1;
+	u8	res36[4];
+	u32	pci_pocmr1;
+	u8	res37[4];
+	u32	pci_potar2;
+	u8	res38[4];
+	u32	pci_pobar2;
+	u8	res39[4];
+	u32	pci_pocmr2;
+	u8	res40[50];
+	u32	pci_ptcr;
+	u32	pci_gpcr;
+	u32	pci_gcr;
+	u32	pci_esr;
+	u32	pci_emr;
+	u32	pci_ecr;
+	u32	pci_eacr;
+	u8	res41[4];
+	u32	pci_edcr;
+	u8	res42[4];
+	u32	pci_eccr;
+	u8	res43[44];
+	u32	pci_pitar1;
+	u8	res44[4];
+	u32	pci_pibar1;
+	u8	res45[4];
+	u32	pci_picmr1;
+	u8	res46[4];
+	u32	pci_pitar0;
+	u8	res47[4];
+	u32	pci_pibar0;
+	u8	res48[4];
+	u32	pci_picmr0;
+	u8	res49[4];
+	u32	pci_cfg_addr;
+	u32	pci_cfg_data;
+	u32	pci_int_ack;
+	u8	res50[756];
+} pci_cpm2_t;
+
+/* Interrupt Controller.
+*/
+typedef struct interrupt_controller {
+	u16	ic_sicr;
+	u8	res1[2];
+	u32	ic_sivec;
+	u32	ic_sipnrh;
+	u32	ic_sipnrl;
+	u32	ic_siprr;
+	u32	ic_scprrh;
+	u32	ic_scprrl;
+	u32	ic_simrh;
+	u32	ic_simrl;
+	u32	ic_siexr;
+	u8	res2[88];
+} intctl_cpm2_t;
+
+/* Clocks and Reset.
+*/
+typedef struct clk_and_reset {
+	u32	car_sccr;
+	u8	res1[4];
+	u32	car_scmr;
+	u8	res2[4];
+	u32	car_rsr;
+	u32	car_rmr;
+	u8	res[104];
+} car_cpm2_t;
+
+/* Input/Output Port control/status registers.
+ * Names consistent with processor manual, although they are different
+ * from the original 8xx names.......
+ */
+typedef struct io_port {
+	u32	iop_pdira;
+	u32	iop_ppara;
+	u32	iop_psora;
+	u32	iop_podra;
+	u32	iop_pdata;
+	u8	res1[12];
+	u32	iop_pdirb;
+	u32	iop_pparb;
+	u32	iop_psorb;
+	u32	iop_podrb;
+	u32	iop_pdatb;
+	u8	res2[12];
+	u32	iop_pdirc;
+	u32	iop_pparc;
+	u32	iop_psorc;
+	u32	iop_podrc;
+	u32	iop_pdatc;
+	u8	res3[12];
+	u32	iop_pdird;
+	u32	iop_ppard;
+	u32	iop_psord;
+	u32	iop_podrd;
+	u32	iop_pdatd;
+	u8	res4[12];
+} iop_cpm2_t;
+
+/* Communication Processor Module Timers
+*/
+typedef struct cpm_timers {
+	u8	cpmt_tgcr1;
+	u8	res1[3];
+	u8	cpmt_tgcr2;
+	u8	res2[11];
+	u16	cpmt_tmr1;
+	u16	cpmt_tmr2;
+	u16	cpmt_trr1;
+	u16	cpmt_trr2;
+	u16	cpmt_tcr1;
+	u16	cpmt_tcr2;
+	u16	cpmt_tcn1;
+	u16	cpmt_tcn2;
+	u16	cpmt_tmr3;
+	u16	cpmt_tmr4;
+	u16	cpmt_trr3;
+	u16	cpmt_trr4;
+	u16	cpmt_tcr3;
+	u16	cpmt_tcr4;
+	u16	cpmt_tcn3;
+	u16	cpmt_tcn4;
+	u16	cpmt_ter1;
+	u16	cpmt_ter2;
+	u16	cpmt_ter3;
+	u16	cpmt_ter4;
+	u8	res3[584];
+} cpmtimer_cpm2_t;
+
+/* DMA control/status registers.
+*/
+typedef struct sdma_csr {
+	u8	res0[24];
+	u8	sdma_sdsr;
+	u8	res1[3];
+	u8	sdma_sdmr;
+	u8	res2[3];
+	u8	sdma_idsr1;
+	u8	res3[3];
+	u8	sdma_idmr1;
+	u8	res4[3];
+	u8	sdma_idsr2;
+	u8	res5[3];
+	u8	sdma_idmr2;
+	u8	res6[3];
+	u8	sdma_idsr3;
+	u8	res7[3];
+	u8	sdma_idmr3;
+	u8	res8[3];
+	u8	sdma_idsr4;
+	u8	res9[3];
+	u8	sdma_idmr4;
+	u8	res10[707];
+} sdma_cpm2_t;
+
+/* Fast controllers
+*/
+typedef struct fcc {
+	u32	fcc_gfmr;
+	u32	fcc_fpsmr;
+	u16	fcc_ftodr;
+	u8	res1[2];
+	u16	fcc_fdsr;
+	u8	res2[2];
+	u16	fcc_fcce;
+	u8	res3[2];
+	u16	fcc_fccm;
+	u8	res4[2];
+	u8	fcc_fccs;
+	u8	res5[3];
+	u8	fcc_ftirr_phy[4];
+} fcc_t;
+
+/* Fast controllers continued
+ */
+typedef struct fcc_c {
+	u32	fcc_firper;
+	u32	fcc_firer;
+	u32	fcc_firsr_hi;
+	u32	fcc_firsr_lo;
+	u8	fcc_gfemr;
+	u8	res1[15];
+} fcc_c_t;
+
+/* TC Layer
+ */
+typedef struct tclayer {
+	u16	tc_tcmode;
+	u16	tc_cdsmr;
+	u16	tc_tcer;
+	u16	tc_rcc;
+	u16	tc_tcmr;
+	u16	tc_fcc;
+	u16	tc_ccc;
+	u16	tc_icc;
+	u16	tc_tcc;
+	u16	tc_ecc;
+	u8	res1[12];
+} tclayer_t;
+
+
+/* I2C
+*/
+typedef struct i2c {
+	u8	i2c_i2mod;
+	u8	res1[3];
+	u8	i2c_i2add;
+	u8	res2[3];
+	u8	i2c_i2brg;
+	u8	res3[3];
+	u8	i2c_i2com;
+	u8	res4[3];
+	u8	i2c_i2cer;
+	u8	res5[3];
+	u8	i2c_i2cmr;
+	u8	res6[331];
+} i2c_cpm2_t;
+
+typedef struct scc {		/* Serial communication channels */
+	u32	scc_gsmrl;
+	u32	scc_gsmrh;
+	u16	scc_psmr;
+	u8	res1[2];
+	u16	scc_todr;
+	u16	scc_dsr;
+	u16	scc_scce;
+	u8	res2[2];
+	u16	scc_sccm;
+	u8	res3;
+	u8	scc_sccs;
+	u8	res4[8];
+} scc_t;
+
+typedef struct smc {		/* Serial management channels */
+	u8	res1[2];
+	u16	smc_smcmr;
+	u8	res2[2];
+	u8	smc_smce;
+	u8	res3[3];
+	u8	smc_smcm;
+	u8	res4[5];
+} smc_t;
+
+/* Serial Peripheral Interface.
+*/
+typedef struct spi_ctrl {
+	u16	spi_spmode;
+	u8	res1[4];
+	u8	spi_spie;
+	u8	res2[3];
+	u8	spi_spim;
+	u8	res3[2];
+	u8	spi_spcom;
+	u8	res4[82];
+} spictl_cpm2_t;
+
+/* CPM Mux.
+*/
+typedef struct cpmux {
+	u8	cmx_si1cr;
+	u8	res1;
+	u8	cmx_si2cr;
+	u8	res2;
+	u32	cmx_fcr;
+	u32	cmx_scr;
+	u8	cmx_smr;
+	u8	res3;
+	u16	cmx_uar;
+	u8	res4[16];
+} cpmux_t;
+
+/* SIRAM control
+*/
+typedef struct siram {
+	u16	si_amr;
+	u16	si_bmr;
+	u16	si_cmr;
+	u16	si_dmr;
+	u8	si_gmr;
+	u8	res1;
+	u8	si_cmdr;
+	u8	res2;
+	u8	si_str;
+	u8	res3;
+	u16	si_rsr;
+} siramctl_t;
+
+typedef struct mcc {
+	u16	mcc_mcce;
+	u8	res1[2];
+	u16	mcc_mccm;
+	u8	res2[2];
+	u8	mcc_mccf;
+	u8	res3[7];
+} mcc_t;
+
+typedef struct comm_proc {
+	u32	cp_cpcr;
+	u32	cp_rccr;
+	u8	res1[14];
+	u16	cp_rter;
+	u8	res2[2];
+	u16	cp_rtmr;
+	u16	cp_rtscr;
+	u8	res3[2];
+	u32	cp_rtsr;
+	u8	res4[12];
+} cpm_cpm2_t;
+
+/* USB Controller.
+*/
+typedef struct usb_ctlr {
+	u8	usb_usmod;
+	u8	usb_usadr;
+	u8	usb_uscom;
+	u8	res1[1];
+	u16	usb_usep1;
+	u16	usb_usep2;
+	u16	usb_usep3;
+	u16	usb_usep4;
+	u8	res2[4];
+	u16	usb_usber;
+	u8	res3[2];
+	u16	usb_usbmr;
+	u8	usb_usbs;
+	u8	res4[7];
+} usb_cpm2_t;
+
+/* ...and the whole thing wrapped up....
+*/
+
+typedef struct immap {
+	/* Some references are into the unique and known dpram spaces,
+	 * others are from the generic base.
+	 */
+#define im_dprambase	im_dpram1
+	u8		im_dpram1[16*1024];
+	u8		res1[16*1024];
+	u8		im_dpram2[4*1024];
+	u8		res2[8*1024];
+	u8		im_dpram3[4*1024];
+	u8		res3[16*1024];
+
+	sysconf_cpm2_t	im_siu_conf;	/* SIU Configuration */
+	memctl_cpm2_t	im_memctl;	/* Memory Controller */
+	sit_cpm2_t	im_sit;		/* System Integration Timers */
+	pci_cpm2_t	im_pci;		/* PCI Controller */
+	intctl_cpm2_t	im_intctl;	/* Interrupt Controller */
+	car_cpm2_t	im_clkrst;	/* Clocks and reset */
+	iop_cpm2_t	im_ioport;	/* IO Port control/status */
+	cpmtimer_cpm2_t	im_cpmtimer;	/* CPM timers */
+	sdma_cpm2_t	im_sdma;	/* SDMA control/status */
+
+	fcc_t		im_fcc[3];	/* Three FCCs */
+	u8		res4z[32];
+	fcc_c_t		im_fcc_c[3];	/* Continued FCCs */
+
+	u8		res4[32];
+
+	tclayer_t	im_tclayer[8];	/* Eight TCLayers */
+	u16		tc_tcgsr;
+	u16		tc_tcger;
+	
+	/* First set of baud rate generators.
+	*/
+	u8		res[236];
+	u32		im_brgc5;
+	u32		im_brgc6;
+	u32		im_brgc7;
+	u32		im_brgc8;
+
+	u8		res5[608];
+
+	i2c_cpm2_t	im_i2c;		/* I2C control/status */
+	cpm_cpm2_t	im_cpm;		/* Communication processor */
+
+	/* Second set of baud rate generators.
+	*/
+	u32		im_brgc1;
+	u32		im_brgc2;
+	u32		im_brgc3;
+	u32		im_brgc4;
+
+	scc_t		im_scc[4];	/* Four SCCs */
+	smc_t		im_smc[2];	/* Couple of SMCs */
+	spictl_cpm2_t	im_spi;		/* A SPI */
+	cpmux_t		im_cpmux;	/* CPM clock route mux */
+	siramctl_t	im_siramctl1;	/* First SI RAM Control */
+	mcc_t		im_mcc1;	/* First MCC */
+	siramctl_t	im_siramctl2;	/* Second SI RAM Control */
+	mcc_t		im_mcc2;	/* Second MCC */
+	usb_cpm2_t	im_usb;		/* USB Controller */
+
+	u8		res6[1153];
+
+	u16		im_si1txram[256];
+	u8		res7[512];
+	u16		im_si1rxram[256];
+	u8		res8[512];
+	u16		im_si2txram[256];
+	u8		res9[512];
+	u16		im_si2rxram[256];
+	u8		res10[512];
+	u8		res11[4096];
+} cpm2_map_t;
+
+extern cpm2_map_t	*cpm2_immr;
+
+#endif /* __IMMAP_CPM2__ */
+#endif /* __KERNEL__ */
--- diff/include/asm-ppc/m8260_pci.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ppc/m8260_pci.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,186 @@
+/*
+ * include/asm-ppc/m8260_pci.h
+ *
+ * Definitions for the MPC8250/MPC8265/MPC8266 integrated PCI host bridge.
+ *
+ * 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.
+ */
+
+#ifdef __KERNEL__
+#ifndef __M8260_PCI_H
+#define __M8260_PCI_H
+
+#include <linux/pci_ids.h>
+
+/*
+ * Define the vendor/device ID for the MPC8265.
+ */
+#define	PCI_DEVICE_ID_MPC8265	((0x18C0 << 16) | PCI_VENDOR_ID_MOTOROLA)
+
+#define M8265_PCIBR0	0x101ac
+#define M8265_PCIBR1	0x101b0
+#define M8265_PCIMSK0	0x101c4
+#define M8265_PCIMSK1	0x101c8
+
+/* Bit definitions for PCIBR registers */
+
+#define PCIBR_ENABLE        0x00000001
+
+/* Bit definitions for PCIMSK registers */
+
+#define PCIMSK_32KiB         0xFFFF8000  /* Size of window, smallest */
+#define PCIMSK_64KiB         0xFFFF0000
+#define PCIMSK_128KiB        0xFFFE0000
+#define PCIMSK_256KiB        0xFFFC0000
+#define PCIMSK_512KiB        0xFFF80000
+#define PCIMSK_1MiB          0xFFF00000
+#define PCIMSK_2MiB          0xFFE00000
+#define PCIMSK_4MiB          0xFFC00000
+#define PCIMSK_8MiB          0xFF800000
+#define PCIMSK_16MiB         0xFF000000
+#define PCIMSK_32MiB         0xFE000000
+#define PCIMSK_64MiB         0xFC000000
+#define PCIMSK_128MiB        0xF8000000
+#define PCIMSK_256MiB        0xF0000000
+#define PCIMSK_512MiB        0xE0000000
+#define PCIMSK_1GiB          0xC0000000  /* Size of window, largest */
+
+
+#define M826X_SCCR_PCI_MODE_EN 0x100
+
+
+/*
+ * Outbound ATU registers (3 sets). These registers control how 60x bus (local) 
+ * addresses are translated to PCI addresses when the MPC826x is a PCI bus 
+ * master (initiator).
+ */
+
+#define POTAR_REG0          0x10800     /* PCI Outbound Translation Addr registers */
+#define POTAR_REG1          0x10818
+#define POTAR_REG2          0x10830
+
+#define POBAR_REG0          0x10808     /* PCI Outbound Base Addr registers */
+#define POBAR_REG1          0x10820
+#define POBAR_REG2          0x10838
+
+#define POCMR_REG0          0x10810     /* PCI Outbound Comparison Mask registers */
+#define POCMR_REG1          0x10828
+#define POCMR_REG2          0x10840
+
+/* Bit definitions for POMCR registers */
+
+#define POCMR_MASK_4KiB      0x000FFFFF
+#define POCMR_MASK_8KiB      0x000FFFFE
+#define POCMR_MASK_16KiB     0x000FFFFC
+#define POCMR_MASK_32KiB     0x000FFFF8
+#define POCMR_MASK_64KiB     0x000FFFF0
+#define POCMR_MASK_128KiB    0x000FFFE0
+#define POCMR_MASK_256KiB    0x000FFFC0
+#define POCMR_MASK_512KiB    0x000FFF80
+#define POCMR_MASK_1MiB      0x000FFF00
+#define POCMR_MASK_2MiB      0x000FFE00
+#define POCMR_MASK_4MiB      0x000FFC00
+#define POCMR_MASK_8MiB      0x000FF800
+#define POCMR_MASK_16MiB     0x000FF000
+#define POCMR_MASK_32MiB     0x000FE000
+#define POCMR_MASK_64MiB     0x000FC000
+#define POCMR_MASK_128MiB    0x000F8000
+#define POCMR_MASK_256MiB    0x000F0000
+#define POCMR_MASK_512MiB    0x000E0000
+#define POCMR_MASK_1GiB      0x000C0000
+
+#define POCMR_ENABLE        0x80000000
+#define POCMR_PCI_IO        0x40000000
+#define POCMR_PREFETCH_EN   0x20000000
+
+/* Soft PCI reset */
+
+#define PCI_GCR_REG         0x10880
+
+/* Bit definitions for PCI_GCR registers */
+
+#define PCIGCR_PCI_BUS_EN   0x1
+
+#define PCI_EMR_REG	    0x10888
+/*
+ * Inbound ATU registers (2 sets). These registers control how PCI addresses 
+ * are translated to 60x bus (local) addresses when the MPC826x is a PCI bus target.
+ */
+
+#define PITAR_REG1          0x108D0
+#define PIBAR_REG1          0x108D8
+#define PICMR_REG1          0x108E0
+#define PITAR_REG0          0x108E8
+#define PIBAR_REG0          0x108F0
+#define PICMR_REG0          0x108F8
+
+/* Bit definitions for PCI Inbound Comparison Mask registers */
+
+#define PICMR_MASK_4KiB       0x000FFFFF
+#define PICMR_MASK_8KiB       0x000FFFFE
+#define PICMR_MASK_16KiB      0x000FFFFC
+#define PICMR_MASK_32KiB      0x000FFFF8
+#define PICMR_MASK_64KiB      0x000FFFF0
+#define PICMR_MASK_128KiB     0x000FFFE0
+#define PICMR_MASK_256KiB     0x000FFFC0
+#define PICMR_MASK_512KiB     0x000FFF80
+#define PICMR_MASK_1MiB       0x000FFF00
+#define PICMR_MASK_2MiB       0x000FFE00
+#define PICMR_MASK_4MiB       0x000FFC00
+#define PICMR_MASK_8MiB       0x000FF800
+#define PICMR_MASK_16MiB      0x000FF000
+#define PICMR_MASK_32MiB      0x000FE000
+#define PICMR_MASK_64MiB      0x000FC000
+#define PICMR_MASK_128MiB     0x000F8000
+#define PICMR_MASK_256MiB     0x000F0000
+#define PICMR_MASK_512MiB     0x000E0000
+#define PICMR_MASK_1GiB       0x000C0000
+
+#define PICMR_ENABLE         0x80000000
+#define PICMR_NO_SNOOP_EN    0x40000000
+#define PICMR_PREFETCH_EN    0x20000000
+
+/* PCI error Registers */
+
+#define	PCI_ERROR_STATUS_REG		0x10884
+#define	PCI_ERROR_MASK_REG		0x10888
+#define	PCI_ERROR_CONTROL_REG		0x1088C
+#define PCI_ERROR_ADRS_CAPTURE_REG      0x10890
+#define PCI_ERROR_DATA_CAPTURE_REG      0x10898
+#define PCI_ERROR_CTRL_CAPTURE_REG      0x108A0
+
+/* PCI error Register bit defines */
+
+#define	PCI_ERROR_PCI_ADDR_PAR			0x00000001
+#define	PCI_ERROR_PCI_DATA_PAR_WR		0x00000002
+#define	PCI_ERROR_PCI_DATA_PAR_RD		0x00000004
+#define	PCI_ERROR_PCI_NO_RSP			0x00000008
+#define	PCI_ERROR_PCI_TAR_ABT			0x00000010
+#define	PCI_ERROR_PCI_SERR			0x00000020
+#define	PCI_ERROR_PCI_PERR_RD			0x00000040
+#define	PCI_ERROR_PCI_PERR_WR			0x00000080
+#define	PCI_ERROR_I2O_OFQO			0x00000100
+#define	PCI_ERROR_I2O_IPQO			0x00000200
+#define	PCI_ERROR_IRA				0x00000400
+#define	PCI_ERROR_NMI				0x00000800
+#define	PCI_ERROR_I2O_DBMC			0x00001000
+
+/*
+ * Register pair used to generate configuration cycles on the PCI bus
+ * and access the MPC826x's own PCI configuration registers.
+ */
+
+#define PCI_CFG_ADDR_REG     0x10900
+#define PCI_CFG_DATA_REG     0x10904
+
+/* Bus parking decides where the bus control sits when idle */
+/* If modifying memory controllers for PCI park on the core */
+
+#define PPC_ACR_BUS_PARK_CORE 0x6
+#define PPC_ACR_BUS_PARK_PCI  0x3
+
+#endif /* __M8260_PCI_H */
+#endif /* __KERNEL__ */
--- diff/include/asm-ppc/mpc8260_pci9.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ppc/mpc8260_pci9.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,51 @@
+/* include/asm-ppc/mpc8260_pci9.h
+ *
+ * Undefine the PCI read* and in* macros so we can define them as functions
+ * that implement the workaround for the MPC8260 device erratum PCI 9.
+ *
+ * This header file should only be included at the end of include/asm-ppc/io.h
+ * and never included directly anywhere else.
+ *
+ * Author:  andy_lowe@mvista.com
+ *
+ * 2003 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#ifndef _PPC_IO_H
+#error "Do not include mpc8260_pci9.h directly."
+#endif
+
+#ifdef __KERNEL__
+#ifndef __CONFIG_8260_PCI9_DEFS
+#define __CONFIG_8260_PCI9_DEFS
+
+#undef readb
+#undef readw
+#undef readl
+#undef insb
+#undef insw
+#undef insl
+#undef inb
+#undef inw
+#undef inl
+#undef insw_ns
+#undef insl_ns
+#undef memcpy_fromio
+
+extern int readb(volatile unsigned char *addr);
+extern int readw(volatile unsigned short *addr);
+extern unsigned readl(volatile unsigned *addr);
+extern void insb(unsigned port, void *buf, int ns);
+extern void insw(unsigned port, void *buf, int ns);
+extern void insl(unsigned port, void *buf, int nl);
+extern int inb(unsigned port);
+extern int inw(unsigned port);
+extern unsigned inl(unsigned port);
+extern void insw_ns(unsigned port, void *buf, int ns);
+extern void insl_ns(unsigned port, void *buf, int nl);
+extern void *memcpy_fromio(void *dest, unsigned long src, size_t count);
+
+#endif /* !__CONFIG_8260_PCI9_DEFS */
+#endif /* __KERNEL__ */
--- diff/include/asm-ppc/mpc85xx.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ppc/mpc85xx.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,131 @@
+/*
+ * include/asm-ppc/mpc85xx.h
+ *
+ * MPC85xx definitions
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor, Inc
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_MPC85xx_H__
+#define __ASM_MPC85xx_H__
+
+#include <linux/config.h>
+#include <asm/mmu.h>
+
+#ifdef CONFIG_85xx
+
+#ifdef CONFIG_MPC8540_ADS
+#include <platforms/85xx/mpc8540_ads.h>
+#endif
+#ifdef CONFIG_SBC8560
+#include <platforms/85xx/sbc8560.h>
+#endif
+
+#define _IO_BASE        isa_io_base
+#define _ISA_MEM_BASE   isa_mem_base
+#define PCI_DRAM_OFFSET pci_dram_offset
+
+/*
+ * The "residual" board information structure the boot loader passes
+ * into the kernel.
+ */
+extern unsigned char __res[];
+
+/* Internal IRQs on MPC85xx OpenPIC */
+/* Not all of these exist on all MPC85xx implementations */
+
+#ifndef MPC85xx_OPENPIC_IRQ_OFFSET
+#define MPC85xx_OPENPIC_IRQ_OFFSET	64
+#endif
+
+/* The 32 internal sources */
+#define MPC85xx_IRQ_L2CACHE	( 0 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_ECM		( 1 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_DDR		( 2 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_LBIU	( 3 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_DMA0	( 4 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_DMA1	( 5 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_DMA2	( 6 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_DMA3	( 7 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_PCI1	( 8 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_PCI2	( 9 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_RIO_ERROR	( 9 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_RIO_BELL	(10 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_RIO_TX	(11 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_RIO_RX	(12 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_TSEC1_TX	(13 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_TSEC1_RX	(14 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_TSEC1_ERROR	(18 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_TSEC2_TX	(19 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_TSEC2_RX	(20 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_TSEC2_ERROR	(24 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_FEC		(25 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_DUART	(26 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_IIC1	(27 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_PERFMON	(28 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_CPM		(30 + MPC85xx_OPENPIC_IRQ_OFFSET)
+
+/* The 12 external interrupt lines */
+#define MPC85xx_IRQ_EXT0        (32 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT1        (33 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT2        (34 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT3        (35 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT4        (36 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT5        (37 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT6        (38 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT7        (39 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT8        (40 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT9        (41 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT10       (42 + MPC85xx_OPENPIC_IRQ_OFFSET)
+#define MPC85xx_IRQ_EXT11       (43 + MPC85xx_OPENPIC_IRQ_OFFSET)
+
+/* Offset from CCSRBAR */
+#define MPC85xx_CPM_OFFSET	(0x80000)
+#define MPC85xx_CPM_SIZE	(0x40000)
+#define MPC85xx_DMA_OFFSET	(0x21000)
+#define MPC85xx_DMA_SIZE	(0x01000)
+#define MPC85xx_ENET1_OFFSET	(0x24000)
+#define MPC85xx_ENET1_SIZE	(0x01000)
+#define MPC85xx_ENET2_OFFSET	(0x25000)
+#define MPC85xx_ENET2_SIZE	(0x01000)
+#define MPC85xx_ENET3_OFFSET	(0x26000)
+#define MPC85xx_ENET3_SIZE	(0x01000)
+#define MPC85xx_GUTS_OFFSET	(0xe0000)
+#define MPC85xx_GUTS_SIZE	(0x01000)
+#define MPC85xx_IIC1_OFFSET	(0x03000)
+#define MPC85xx_IIC1_SIZE	(0x01000)
+#define MPC85xx_OPENPIC_OFFSET	(0x40000)
+#define MPC85xx_OPENPIC_SIZE	(0x40000)
+#define MPC85xx_PCI1_OFFSET	(0x08000)
+#define MPC85xx_PCI1_SIZE	(0x01000)
+#define MPC85xx_PCI2_OFFSET	(0x09000)
+#define MPC85xx_PCI2_SIZE	(0x01000)
+#define MPC85xx_PERFMON_OFFSET	(0xe1000)
+#define MPC85xx_PERFMON_SIZE	(0x01000)
+#define MPC85xx_UART0_OFFSET	(0x04500)
+#define MPC85xx_UART0_SIZE	(0x00100)
+#define MPC85xx_UART1_OFFSET	(0x04600)
+#define MPC85xx_UART1_SIZE	(0x00100)
+
+#define MPC85xx_CCSRBAR_SIZE	(1024*1024)
+
+/* Let modules/drivers get at CCSRBAR */
+extern phys_addr_t get_ccsrbar(void);
+
+#ifdef MODULE
+#define CCSRBAR get_ccsrbar()
+#else
+#define CCSRBAR BOARD_CCSRBAR
+#endif
+
+#endif /* CONFIG_85xx */
+#endif /* __ASM_MPC85xx_H__ */
+#endif /* __KERNEL__ */
--- diff/include/asm-ppc/perfctr.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ppc/perfctr.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,171 @@
+/* $Id: perfctr.h,v 1.6 2004/05/30 14:47:34 mikpe Exp $
+ * PPC32 Performance-Monitoring Counters driver
+ *
+ * Copyright (C) 2004  Mikael Pettersson
+ */
+#ifndef _ASM_PPC_PERFCTR_H
+#define _ASM_PPC_PERFCTR_H
+
+/* perfctr_info.cpu_type values */
+#define PERFCTR_PPC_GENERIC	0
+#define PERFCTR_PPC_604		1
+#define PERFCTR_PPC_604e	2
+#define PERFCTR_PPC_750		3
+#define PERFCTR_PPC_7400	4
+#define PERFCTR_PPC_7450	5
+
+struct perfctr_sum_ctrs {
+	unsigned long long tsc;
+	unsigned long long pmc[8];
+};
+
+struct perfctr_cpu_control {
+	unsigned int tsc_on;
+	unsigned int nractrs;		/* # of a-mode counters */
+	unsigned int nrictrs;		/* # of i-mode counters */
+	unsigned int pmc_map[8];
+	unsigned int evntsel[8];	/* one per counter, even on P5 */
+	int ireset[8];			/* [0,0x7fffffff], for i-mode counters */
+	struct {
+		unsigned int mmcr0;	/* sans PMC{1,2}SEL */
+		unsigned int mmcr2;	/* only THRESHMULT */
+		/* IABR/DABR/BAMR not supported */
+	} ppc;
+	unsigned int _reserved1;
+	unsigned int _reserved2;
+	unsigned int _reserved3;
+	unsigned int _reserved4;
+};
+
+struct perfctr_cpu_state {
+	unsigned int cstatus;
+	struct {	/* k1 is opaque in the user ABI */
+		unsigned int id;
+		int isuspend_cpu;
+	} k1;
+	/* The two tsc fields must be inlined. Placing them in a
+	   sub-struct causes unwanted internal padding on x86-64. */
+	unsigned int tsc_start;
+	unsigned long long tsc_sum;
+	struct {
+		unsigned int map;
+		unsigned int start;
+		unsigned long long sum;
+	} pmc[8];	/* the size is not part of the user ABI */
+#ifdef __KERNEL__
+	unsigned int ppc_mmcr[3];
+	struct perfctr_cpu_control control;
+#endif
+};
+
+/* cstatus is a re-encoding of control.tsc_on/nractrs/nrictrs
+   which should have less overhead in most cases */
+/* XXX: ppc driver internally also uses cstatus&(1<<30) */
+
+static inline
+unsigned int perfctr_mk_cstatus(unsigned int tsc_on, unsigned int nractrs,
+				unsigned int nrictrs)
+{
+	return (tsc_on<<31) | (nrictrs<<16) | ((nractrs+nrictrs)<<8) | nractrs;
+}
+
+static inline unsigned int perfctr_cstatus_enabled(unsigned int cstatus)
+{
+	return cstatus;
+}
+
+static inline int perfctr_cstatus_has_tsc(unsigned int cstatus)
+{
+	return (int)cstatus < 0;	/* test and jump on sign */
+}
+
+static inline unsigned int perfctr_cstatus_nractrs(unsigned int cstatus)
+{
+	return cstatus & 0x7F;		/* and with imm8 */
+}
+
+static inline unsigned int perfctr_cstatus_nrctrs(unsigned int cstatus)
+{
+	return (cstatus >> 8) & 0x7F;
+}
+
+static inline unsigned int perfctr_cstatus_has_ictrs(unsigned int cstatus)
+{
+	return cstatus & (0x7F << 16);
+}
+
+/*
+ * 'struct siginfo' support for perfctr overflow signals.
+ * In unbuffered mode, si_code is set to SI_PMC_OVF and a bitmask
+ * describing which perfctrs overflowed is put in si_pmc_ovf_mask.
+ * A bitmask is used since more than one perfctr can have overflowed
+ * by the time the interrupt handler runs.
+ *
+ * glibc's <signal.h> doesn't seem to define __SI_FAULT or __SI_CODE(),
+ * and including <asm/siginfo.h> as well may cause redefinition errors,
+ * so the user and kernel values are different #defines here.
+ */
+#ifdef __KERNEL__
+#define SI_PMC_OVF	(__SI_FAULT|'P')
+#else
+#define SI_PMC_OVF	('P')
+#endif
+#define si_pmc_ovf_mask	_sifields._pad[0] /* XXX: use an unsigned field later */
+
+/* version number for user-visible CPU-specific data */
+#define PERFCTR_CPU_VERSION	0	/* XXX: not yet cast in stone */
+
+#ifdef __KERNEL__
+
+#if defined(CONFIG_PERFCTR)
+
+/* Driver init/exit. */
+extern int perfctr_cpu_init(void);
+extern void perfctr_cpu_exit(void);
+
+/* CPU type name. */
+extern char *perfctr_cpu_name;
+
+/* Hardware reservation. */
+extern const char *perfctr_cpu_reserve(const char *service);
+extern void perfctr_cpu_release(const char *service);
+
+/* PRE: state has no running interrupt-mode counters.
+   Check that the new control data is valid.
+   Update the driver's private control data.
+   Returns a negative error code if the control data is invalid. */
+extern int perfctr_cpu_update_control(struct perfctr_cpu_state *state, int is_global);
+
+/* Read a-mode counters. Subtract from start and accumulate into sums.
+   Must be called with preemption disabled. */
+extern void perfctr_cpu_suspend(struct perfctr_cpu_state *state);
+
+/* Write control registers. Read a-mode counters into start.
+   Must be called with preemption disabled. */
+extern void perfctr_cpu_resume(struct perfctr_cpu_state *state);
+
+/* Perform an efficient combined suspend/resume operation.
+   Must be called with preemption disabled. */
+extern void perfctr_cpu_sample(struct perfctr_cpu_state *state);
+
+/* The type of a perfctr overflow interrupt handler.
+   It will be called in IRQ context, with preemption disabled. */
+typedef void (*perfctr_ihandler_t)(unsigned long pc);
+
+/* XXX: The hardware supports overflow interrupts, but the driver
+   does not yet enable this due to an erratum in 750/7400/7410. */
+//#define PERFCTR_INTERRUPT_SUPPORT 1
+
+#ifdef PERFCTR_INTERRUPT_SUPPORT
+extern void perfctr_cpu_set_ihandler(perfctr_ihandler_t);
+extern void perfctr_cpu_ireload(struct perfctr_cpu_state*);
+extern unsigned int perfctr_cpu_identify_overflow(struct perfctr_cpu_state*);
+#else
+static inline void perfctr_cpu_set_ihandler(perfctr_ihandler_t x) { }
+#endif
+
+#endif	/* CONFIG_PERFCTR */
+
+#endif	/* __KERNEL__ */
+
+#endif	/* _ASM_PPC_PERFCTR_H */
--- diff/include/asm-ppc/rheap.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-ppc/rheap.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,85 @@
+/*
+ * include/asm-ppc/rheap.c
+ *
+ * Header file for the implementation of a remote heap.
+ *
+ * Author: Pantelis Antoniou <panto@intracom.gr>
+ *
+ * 2004 (c) INTRACOM S.A. Greece. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#ifndef __ASM_PPC_RHEAP_H__
+#define __ASM_PPC_RHEAP_H__
+
+#include <linux/list.h>
+
+typedef struct _rh_block {
+	struct list_head list;
+	void *start;
+	int size;
+	const char *owner;
+} rh_block_t;
+
+typedef struct _rh_info {
+	unsigned int alignment;
+	int max_blocks;
+	int empty_slots;
+	rh_block_t *block;
+	struct list_head empty_list;
+	struct list_head free_list;
+	struct list_head taken_list;
+	unsigned int flags;
+} rh_info_t;
+
+#define RHIF_STATIC_INFO	0x1
+#define RHIF_STATIC_BLOCK	0x2
+
+typedef struct rh_stats_t {
+	void *start;
+	int size;
+	const char *owner;
+} rh_stats_t;
+
+#define RHGS_FREE	0
+#define RHGS_TAKEN	1
+
+/* Create a remote heap dynamically */
+extern rh_info_t *rh_create(unsigned int alignment);
+
+/* Destroy a remote heap, created by rh_create() */
+extern void rh_destroy(rh_info_t * info);
+
+/* Initialize in place a remote info block */
+extern void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks,
+		    rh_block_t * block);
+
+/* Attach a free region to manage */
+extern int rh_attach_region(rh_info_t * info, void *start, int size);
+
+/* Detach a free region */
+extern void *rh_detach_region(rh_info_t * info, void *start, int size);
+
+/* Allocate the given size from the remote heap */
+extern void *rh_alloc(rh_info_t * info, int size, const char *owner);
+
+/* Allocate the given size from the given address */
+extern void *rh_alloc_fixed(rh_info_t * info, void *start, int size,
+			    const char *owner);
+
+/* Free the allocated area */
+extern int rh_free(rh_info_t * info, void *start);
+
+/* Get stats for debugging purposes */
+extern int rh_get_stats(rh_info_t * info, int what, int max_stats,
+			rh_stats_t * stats);
+
+/* Simple dump of remote heap info */
+extern void rh_dump(rh_info_t * info);
+
+/* Set owner of taken block */
+extern int rh_set_owner(rh_info_t * info, void *start, const char *owner);
+
+#endif				/* __ASM_PPC_RHEAP_H__ */
--- diff/include/asm-sh/adc.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/adc.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,12 @@
+#ifndef __ASM_ADC_H
+#define __ASM_ADC_H
+
+/*
+ * Copyright (C) 2004  Andriy Skulysh
+ */
+
+#include <asm/cpu/adc.h>
+
+int adc_single(unsigned int channel);
+
+#endif /* __ASM_ADC_H */
--- diff/include/asm-sh/bus-sh.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/bus-sh.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,65 @@
+/*
+ * include/asm-sh/bus-sh.h
+ *
+ * Copyright (C) 2004 Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#ifndef __ASM_SH_BUS_SH_H
+#define __ASM_SH_BUS_SH_H
+
+extern struct bus_type sh_bus_types[];
+
+struct sh_dev {
+	struct device	dev;
+	char		*name;
+	unsigned int	dev_id;
+	unsigned int	bus_id;
+	struct resource	res;
+	void		*mapbase;
+	unsigned int	irq[6];
+	u64		*dma_mask;
+};
+
+#define to_sh_dev(d)	container_of((d), struct sh_dev, dev)
+
+#define sh_get_drvdata(d)	dev_get_drvdata(&(d)->dev)
+#define sh_set_drvdata(d,p)	dev_set_drvdata(&(d)->dev, (p))
+
+struct sh_driver {
+	struct device_driver	drv;
+	unsigned int		dev_id;
+	unsigned int		bus_id;
+	int (*probe)(struct sh_dev *);
+	int (*remove)(struct sh_dev *);
+	int (*suspend)(struct sh_dev *, u32);
+	int (*resume)(struct sh_dev *);
+};
+
+#define to_sh_driver(d)	container_of((d), struct sh_driver, drv)
+#define sh_name(d)	((d)->dev.driver->name)
+
+/*
+ * Device ID numbers for bus types
+ */
+enum {
+	SH_DEV_ID_USB_OHCI,
+};
+
+#define SH_NR_BUSES		1
+#define SH_BUS_NAME_VIRT	"shbus"
+
+enum {
+	SH_BUS_VIRT,
+};
+
+/* arch/sh/kernel/cpu/bus.c */
+extern int sh_device_register(struct sh_dev *dev);
+extern void sh_device_unregister(struct sh_dev *dev);
+extern int sh_driver_register(struct sh_driver *drv);
+extern void sh_driver_unregister(struct sh_driver *drv);
+
+#endif /* __ASM_SH_BUS_SH_H */
+
--- diff/include/asm-sh/cpu-sh3/adc.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/cpu-sh3/adc.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,28 @@
+#ifndef __ASM_CPU_SH3_ADC_H
+#define __ASM_CPU_SH3_ADC_H
+
+/*
+ * Copyright (C) 2004  Andriy Skulysh
+ */
+
+
+#define ADDRAH	0xa4000080
+#define ADDRAL	0xa4000082
+#define ADDRBH	0xa4000084
+#define ADDRBL	0xa4000086
+#define ADDRCH	0xa4000088
+#define ADDRCL	0xa400008a
+#define ADDRDH	0xa400008c
+#define ADDRDL	0xa400008e
+#define ADCSR	0xa4000090
+
+#define ADCSR_ADF	0x80
+#define ADCSR_ADIE	0x40
+#define ADCSR_ADST	0x20
+#define ADCSR_MULTI	0x10
+#define ADCSR_CKS	0x08
+#define ADCSR_CH_MASK	0x07
+
+#define ADCR	0xa4000092
+
+#endif /* __ASM_CPU_SH3_ADC_H */
--- diff/include/asm-sh/fixmap.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/fixmap.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,111 @@
+/*
+ * fixmap.h: compile-time virtual memory allocation
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1998 Ingo Molnar
+ *
+ * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
+ */
+
+#ifndef _ASM_FIXMAP_H
+#define _ASM_FIXMAP_H
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <asm/page.h>
+#ifdef CONFIG_HIGHMEM
+#include <linux/threads.h>
+#include <asm/kmap_types.h>
+#endif
+
+/*
+ * Here we define all the compile-time 'special' virtual
+ * addresses. The point is to have a constant address at
+ * compile time, but to set the physical address only
+ * in the boot process. We allocate these special  addresses
+ * from the end of virtual memory (0xfffff000) backwards.
+ * Also this lets us do fail-safe vmalloc(), we
+ * can guarantee that these special addresses and
+ * vmalloc()-ed addresses never overlap.
+ *
+ * these 'compile-time allocated' memory buffers are
+ * fixed-size 4k pages. (or larger if used with an increment
+ * highger than 1) use fixmap_set(idx,phys) to associate
+ * physical memory with fixmap indices.
+ *
+ * TLB entries of such buffers will not be flushed across
+ * task switches.
+ */
+
+/*
+ * on UP currently we will have no trace of the fixmap mechanizm,
+ * no page table allocations, etc. This might change in the
+ * future, say framebuffers for the console driver(s) could be
+ * fix-mapped?
+ */
+enum fixed_addresses {
+#ifdef CONFIG_HIGHMEM
+	FIX_KMAP_BEGIN,	/* reserved pte's for temporary kernel mappings */
+	FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
+#endif
+	__end_of_fixed_addresses
+};
+
+extern void __set_fixmap (enum fixed_addresses idx,
+					unsigned long phys, pgprot_t flags);
+
+#define set_fixmap(idx, phys) \
+		__set_fixmap(idx, phys, PAGE_KERNEL)
+/*
+ * Some hardware wants to get fixmapped without caching.
+ */
+#define set_fixmap_nocache(idx, phys) \
+		__set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
+/*
+ * used by vmalloc.c.
+ *
+ * Leave one empty page between vmalloc'ed areas and
+ * the start of the fixmap, and leave one page empty
+ * at the top of mem..
+ */
+#define FIXADDR_TOP	(P4SEG - PAGE_SIZE)
+#define FIXADDR_SIZE	(__end_of_fixed_addresses << PAGE_SHIFT)
+#define FIXADDR_START	(FIXADDR_TOP - FIXADDR_SIZE)
+
+#define __fix_to_virt(x)	(FIXADDR_TOP - ((x) << PAGE_SHIFT))
+#define __virt_to_fix(x)	((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
+
+extern void __this_fixmap_does_not_exist(void);
+
+/*
+ * 'index to address' translation. If anyone tries to use the idx
+ * directly without tranlation, we catch the bug with a NULL-deference
+ * kernel oops. Illegal ranges of incoming indices are caught too.
+ */
+static inline unsigned long fix_to_virt(const unsigned int idx)
+{
+	/*
+	 * this branch gets completely eliminated after inlining,
+	 * except when someone tries to use fixaddr indices in an
+	 * illegal way. (such as mixing up address types or using
+	 * out-of-range indices).
+	 *
+	 * If it doesn't get removed, the linker will complain
+	 * loudly with a reasonably clear error message..
+	 */
+	if (idx >= __end_of_fixed_addresses)
+		__this_fixmap_does_not_exist();
+
+        return __fix_to_virt(idx);
+}
+
+static inline unsigned long virt_to_fix(const unsigned long vaddr)
+{
+	BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
+	return __virt_to_fix(vaddr);
+}
+
+#endif
--- diff/include/asm-sh/hp6xx/ide.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/hp6xx/ide.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,8 @@
+#ifndef __ASM_SH_HP6XX_IDE_H
+#define __ASM_SH_HP6XX_IDE_H
+
+#define IRQ_CFCARD	93
+#define IRQ_PCMCIA	94
+
+#endif /* __ASM_SH_HP6XX_IDE_H */
+
--- diff/include/asm-sh/hs7751rvoip/hs7751rvoip.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/hs7751rvoip/hs7751rvoip.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,47 @@
+#ifndef __ASM_SH_RENESAS_HS7751RVOIP_H
+#define __ASM_SH_RENESAS_HS7751RVOIP_H
+
+/*
+ * linux/include/asm-sh/hs7751rvoip/hs7751rvoip.h
+ *
+ * Copyright (C) 2000  Atom Create Engineering Co., Ltd.
+ *
+ * Renesas Technology Sales HS7751RVoIP support
+ */
+
+/* Box specific addresses.  */
+
+#define PA_BCR		0xa4000000	/* FPGA */
+#define PA_SLICCNTR1	0xa4000006	/* SLIC PIO Control 1 */
+#define PA_SLICCNTR2	0xa4000008	/* SLIC PIO Control 2 */
+#define PA_DMACNTR	0xa400000a	/* USB DMA Control */
+#define PA_INPORTR	0xa400000c	/* Input Port Register */
+#define PA_OUTPORTR	0xa400000e	/* Output Port Reguster */
+#define PA_VERREG	0xa4000014	/* FPGA Version Register */
+
+#define PA_AREA5_IO	0xb4000000	/* Area 5 IO Memory */
+#define PA_AREA6_IO	0xb8000000	/* Area 6 IO Memory */
+#define PA_IDE_OFFSET	0x1f0		/* CF IDE Offset */
+
+#define IRLCNTR1	(PA_BCR + 0)	/* Interrupt Control Register1 */
+#define IRLCNTR2	(PA_BCR + 2)	/* Interrupt Control Register2 */
+#define IRLCNTR3	(PA_BCR + 4)	/* Interrupt Control Register3 */
+#define IRLCNTR4	(PA_BCR + 16)	/* Interrupt Control Register4 */
+#define IRLCNTR5	(PA_BCR + 18)	/* Interrupt Control Register5 */
+
+#define IRQ_PCIETH	6		/* PCI Ethernet IRQ */
+#define IRQ_PCIHUB	7		/* PCI Ethernet Hub IRQ */
+#define IRQ_USBCOM	8		/* USB Comunication IRQ */
+#define IRQ_USBCON	9		/* USB Connect IRQ */
+#define IRQ_USBDMA	10		/* USB DMA IRQ */
+#define IRQ_CFCARD	11		/* CF Card IRQ */
+#define IRQ_PCMCIA	12		/* PCMCIA IRQ */
+#define IRQ_PCISLOT	13		/* PCI Slot #1 IRQ */
+#define IRQ_ONHOOK1	0		/* ON HOOK1 IRQ */
+#define IRQ_OFFHOOK1	1		/* OFF HOOK1 IRQ */
+#define IRQ_ONHOOK2	2		/* ON HOOK2 IRQ */
+#define IRQ_OFFHOOK2	3		/* OFF HOOK2 IRQ */
+#define	IRQ_RINGING	4		/* Ringing IRQ */
+#define	IRQ_CODEC	5		/* CODEC IRQ */
+
+#endif  /* __ASM_SH_RENESAS_HS7751RVOIP */
--- diff/include/asm-sh/hs7751rvoip/ide.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/hs7751rvoip/ide.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,8 @@
+#ifndef __ASM_SH_HS7751RVOIP_IDE_H
+#define __ASM_SH_HS7751RVOIP_IDE_H
+
+/* Nothing to see here.. */
+#include <asm/hs7751rvoip/hs7751rvoip.h>
+
+#endif /* __ASM_SH_HS7751RVOIP_IDE_H */
+
--- diff/include/asm-sh/hs7751rvoip/io.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/hs7751rvoip/io.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,39 @@
+/*
+ * include/asm-sh/hs7751rvoip/hs7751rvoip.h
+ *
+ * Modified version of io_se.h for the hs7751rvoip-specific functions.
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * IO functions for an Renesas Technology sales HS7751RVOIP
+ */
+
+#ifndef _ASM_SH_IO_HS7751RVOIP_H
+#define _ASM_SH_IO_HS7751RVOIP_H
+
+#include <asm/io_generic.h>
+
+extern unsigned char hs7751rvoip_inb(unsigned long port);
+extern unsigned short hs7751rvoip_inw(unsigned long port);
+extern unsigned int hs7751rvoip_inl(unsigned long port);
+
+extern void hs7751rvoip_outb(unsigned char value, unsigned long port);
+extern void hs7751rvoip_outw(unsigned short value, unsigned long port);
+extern void hs7751rvoip_outl(unsigned int value, unsigned long port);
+
+extern unsigned char hs7751rvoip_inb_p(unsigned long port);
+extern void hs7751rvoip_outb_p(unsigned char value, unsigned long port);
+
+extern void hs7751rvoip_insb(unsigned long port, void *addr, unsigned long count);
+extern void hs7751rvoip_insw(unsigned long port, void *addr, unsigned long count);
+extern void hs7751rvoip_insl(unsigned long port, void *addr, unsigned long count);
+extern void hs7751rvoip_outsb(unsigned long port, const void *addr, unsigned long count);
+extern void hs7751rvoip_outsw(unsigned long port, const void *addr, unsigned long count);
+extern void hs7751rvoip_outsl(unsigned long port, const void *addr, unsigned long count);
+
+extern void *hs7751rvoip_ioremap(unsigned long offset, unsigned long size);
+
+extern unsigned long hs7751rvoip_isa_port2addr(unsigned long offset);
+
+#endif /* _ASM_SH_IO_HS7751RVOIP_H */
--- diff/include/asm-sh/rts7751r2d/ide.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/rts7751r2d/ide.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,8 @@
+#ifndef __ASM_SH_RTS7751R2D_IDE_H
+#define __ASM_SH_RTS7751R2D_IDE_H
+
+/* Nothing to see here.. */
+#include <asm/rts7751r2d/rts7751r2d.h>
+
+#endif /* __ASM_SH_RTS7751R2D_IDE_H */
+
--- diff/include/asm-sh/rts7751r2d/io.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/rts7751r2d/io.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,37 @@
+/*
+ * include/asm-sh/io_rts7751r2d.h
+ *
+ * Modified version of io_se.h for the rts7751r2d-specific functions.
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ * IO functions for an Renesas Technology sales RTS7751R2D
+ */
+
+#ifndef _ASM_SH_IO_RTS7751R2D_H
+#define _ASM_SH_IO_RTS7751R2D_H
+
+extern unsigned char rts7751r2d_inb(unsigned long port);
+extern unsigned short rts7751r2d_inw(unsigned long port);
+extern unsigned int rts7751r2d_inl(unsigned long port);
+
+extern void rts7751r2d_outb(unsigned char value, unsigned long port);
+extern void rts7751r2d_outw(unsigned short value, unsigned long port);
+extern void rts7751r2d_outl(unsigned int value, unsigned long port);
+
+extern unsigned char rts7751r2d_inb_p(unsigned long port);
+extern void rts7751r2d_outb_p(unsigned char value, unsigned long port);
+
+extern void rts7751r2d_insb(unsigned long port, void *addr, unsigned long count);
+extern void rts7751r2d_insw(unsigned long port, void *addr, unsigned long count);
+extern void rts7751r2d_insl(unsigned long port, void *addr, unsigned long count);
+extern void rts7751r2d_outsb(unsigned long port, const void *addr, unsigned long count);
+extern void rts7751r2d_outsw(unsigned long port, const void *addr, unsigned long count);
+extern void rts7751r2d_outsl(unsigned long port, const void *addr, unsigned long count);
+
+extern void *rts7751r2d_ioremap(unsigned long offset, unsigned long size);
+
+extern unsigned long rts7751r2d_isa_port2addr(unsigned long offset);
+
+#endif /* _ASM_SH_IO_RTS7751R2D_H */
--- diff/include/asm-sh/rts7751r2d/rts7751r2d.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/rts7751r2d/rts7751r2d.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,73 @@
+#ifndef __ASM_SH_RENESAS_RTS7751R2D_H
+#define __ASM_SH_RENESAS_RTS7751R2D_H
+
+/*
+ * linux/include/asm-sh/renesas_rts7751r2d.h
+ *
+ * Copyright (C) 2000  Atom Create Engineering Co., Ltd.
+ *
+ * Renesas Technology Sales RTS7751R2D support
+ */
+
+/* Box specific addresses.  */
+
+#define PA_BCR		0xa4000000	/* FPGA */
+#define PA_IRLMON	0xa4000002	/* Interrupt Status control */
+#define PA_CFCTL	0xa4000004	/* CF Timing control */
+#define PA_CFPOW	0xa4000006	/* CF Power control */
+#define PA_DISPCTL	0xa4000008	/* Display Timing control */
+#define PA_SDMPOW	0xa400000a	/* SD Power control */
+#define PA_RTCCE	0xa400000c	/* RTC(9701) Enable control */
+#define PA_PCICD	0xa400000e	/* PCI Extention detect control */
+#define PA_VOYAGERRTS	0xa4000020	/* VOYAGER Reset control */
+#if defined(CONFIG_RTS7751R2D_REV11)
+#define PA_AXRST	0xa4000022	/* AX_LAN Reset control */
+#define PA_CFRST	0xa4000024	/* CF Reset control */
+#define	PA_ADMRTS	0xa4000026	/* SD Reset control */
+#define PA_EXTRST	0xa4000028	/* Extention Reset control */
+#define PA_CFCDINTCLR	0xa400002a	/* CF Insert Interrupt clear */
+#else
+#define PA_CFRST	0xa4000022	/* CF Reset control */
+#define	PA_ADMRTS	0xa4000024	/* SD Reset control */
+#define PA_EXTRST	0xa4000026	/* Extention Reset control */
+#define PA_CFCDINTCLR	0xa4000028	/* CF Insert Interrupt clear */
+#define	PA_KEYCTLCLR	0xa400002a	/* Key Interrupt clear */
+#endif
+#define PA_POWOFF	0xa4000030	/* Board Power OFF control */
+#define PA_VERREG	0xa4000032	/* FPGA Version Register */
+#define PA_INPORT	0xa4000034	/* KEY Input Port control */
+#define PA_OUTPORT	0xa4000036	/* LED control */
+#define PA_DMPORT	0xa4000038	/* DM270 Output Port control */
+
+#define PA_AX88796L	0xaa000400	/* AX88796L Area */
+#define PA_VOYAGER	0xab000000	/* VOYAGER GX Area */
+#define PA_AREA5_IO	0xb4000000	/* Area 5 IO Memory */
+#define PA_AREA6_IO	0xb8000000	/* Area 6 IO Memory */
+#define PA_IDE_OFFSET	0x1f0		/* CF IDE Offset */
+#define AX88796L_IO_BASE	0x1000	/* AX88796L IO Base Address */
+
+#define IRLCNTR1	(PA_BCR + 0)	/* Interrupt Control Register1 */
+
+#if defined(CONFIG_RTS7751R2D_REV11)
+#define IRQ_PCIETH	0		/* PCI Ethernet IRQ */
+#define IRQ_CFCARD	1		/* CF Card IRQ */
+#define IRQ_CFINST	2		/* CF Card Insert IRQ */
+#define IRQ_PCMCIA	3		/* PCMCIA IRQ */
+#define IRQ_VOYAGER	4		/* VOYAGER IRQ */
+#define IRQ_ONETH	5		/* On board Ethernet IRQ */
+#else
+#define IRQ_KEYIN	0		/* Key Input IRQ */
+#define IRQ_PCIETH	1		/* PCI Ethernet IRQ */
+#define IRQ_CFCARD	2		/* CF Card IRQ */
+#define IRQ_CFINST	3		/* CF Card Insert IRQ */
+#define IRQ_PCMCIA	4		/* PCMCIA IRQ */
+#define IRQ_VOYAGER	5		/* VOYAGER IRQ */
+#endif
+#define IRQ_RTCALM	6		/* RTC Alarm IRQ */
+#define IRQ_RTCTIME	7		/* RTC Timer IRQ */
+#define IRQ_SDCARD	8		/* SD Card IRQ */
+#define IRQ_PCISLOT1	9		/* PCI Slot #1 IRQ */
+#define IRQ_PCISLOT2	10		/* PCI Slot #2 IRQ */
+#define	IRQ_EXTENTION	11		/* EXTn IRQ */
+
+#endif  /* __ASM_SH_RENESAS_RTS7751R2D */
--- diff/include/asm-sh/rts7751r2d/voyagergx_reg.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/rts7751r2d/voyagergx_reg.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,313 @@
+/* -------------------------------------------------------------------- */
+/* voyagergx_reg.h                                                      */
+/* -------------------------------------------------------------------- */
+/*  This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+    Copyright 2003 (c) Lineo uSolutions,Inc.
+*/
+/* -------------------------------------------------------------------- */
+
+#ifndef _VOYAGER_GX_REG_H
+#define _VOYAGER_GX_REG_H
+
+#define VOYAGER_BASE			0xb3e00000
+#define VOYAGER_USBH_BASE		(0x40000 + VOYAGER_BASE)
+#define VOYAGER_UART_BASE		(0x30000 + VOYAGER_BASE)
+#define	VOYAGER_AC97_BASE		(0xa0000 + VOYAGER_BASE)
+
+#define VOYAGER_IRQ_NUM			32
+#define VOYAGER_IRQ_BASE		50
+#define VOYAGER_USBH_IRQ		VOYAGER_IRQ_BASE + 6
+#define VOYAGER_8051_IRQ		VOYAGER_IRQ_BASE + 10
+#define VOYAGER_UART0_IRQ		VOYAGER_IRQ_BASE + 12
+#define VOYAGER_UART1_IRQ		VOYAGER_IRQ_BASE + 13
+#define	VOYAGER_AC97_IRQ		VOYAGER_IRQ_BASE + 17
+
+/* ----- MISC controle  register ------------------------------ */
+#define MISC_CTRL			(0x000004 + VOYAGER_BASE)
+#define MISC_CTRL_USBCLK_48		(3 << 28)
+#define MISC_CTRL_USBCLK_96		(2 << 28)
+#define MISC_CTRL_USBCLK_CRYSTAL	(1 << 28)
+
+/* ----- GPIO[31:0] register --------------------------------- */
+#define GPIO_MUX_LOW			(0x000008 + VOYAGER_BASE)
+#define GPIO_MUX_LOW_AC97		0x1F000000
+#define GPIO_MUX_LOW_8051		0x0000ffff
+#define GPIO_MUX_LOW_PWM		(1 << 29)
+
+/* ----- GPIO[63:32] register --------------------------------- */
+#define GPIO_MUX_HIGH			(0x00000C + VOYAGER_BASE)
+
+/* ----- DRAM controle  register ------------------------------- */
+#define DRAM_CTRL			(0x000010 + VOYAGER_BASE)
+#define DRAM_CTRL_EMBEDDED		(1 << 31)
+#define DRAM_CTRL_CPU_BURST_1		(0 << 28)
+#define DRAM_CTRL_CPU_BURST_2		(1 << 28)
+#define DRAM_CTRL_CPU_BURST_4		(2 << 28)
+#define DRAM_CTRL_CPU_BURST_8		(3 << 28)
+#define DRAM_CTRL_CPU_CAS_LATENCY	(1 << 27)
+#define DRAM_CTRL_CPU_SIZE_2		(0 << 24)
+#define DRAM_CTRL_CPU_SIZE_4		(1 << 24)
+#define DRAM_CTRL_CPU_SIZE_64		(4 << 24)
+#define DRAM_CTRL_CPU_SIZE_32		(5 << 24)
+#define DRAM_CTRL_CPU_SIZE_16		(6 << 24)
+#define DRAM_CTRL_CPU_SIZE_8		(7 << 24)
+#define DRAM_CTRL_CPU_COLUMN_SIZE_1024	(0 << 22)
+#define DRAM_CTRL_CPU_COLUMN_SIZE_512	(2 << 22)
+#define DRAM_CTRL_CPU_COLUMN_SIZE_256	(3 << 22)
+#define DRAM_CTRL_CPU_ACTIVE_PRECHARGE	(1 << 21)
+#define DRAM_CTRL_CPU_RESET		(1 << 20)
+#define DRAM_CTRL_CPU_BANKS		(1 << 19)
+#define DRAM_CTRL_CPU_WRITE_PRECHARGE	(1 << 18)
+#define DRAM_CTRL_BLOCK_WRITE		(1 << 17)
+#define DRAM_CTRL_REFRESH_COMMAND	(1 << 16)
+#define DRAM_CTRL_SIZE_4		(0 << 13)
+#define DRAM_CTRL_SIZE_8		(1 << 13)
+#define DRAM_CTRL_SIZE_16		(2 << 13)
+#define DRAM_CTRL_SIZE_32		(3 << 13)
+#define DRAM_CTRL_SIZE_64		(4 << 13)
+#define DRAM_CTRL_SIZE_2		(5 << 13)
+#define DRAM_CTRL_COLUMN_SIZE_256	(0 << 11)
+#define DRAM_CTRL_COLUMN_SIZE_512	(2 << 11)
+#define DRAM_CTRL_COLUMN_SIZE_1024	(3 << 11)
+#define DRAM_CTRL_BLOCK_WRITE_TIME	(1 << 10)
+#define DRAM_CTRL_BLOCK_WRITE_PRECHARGE	(1 << 9)
+#define DRAM_CTRL_ACTIVE_PRECHARGE	(1 << 8)
+#define DRAM_CTRL_RESET			(1 << 7)
+#define DRAM_CTRL_REMAIN_ACTIVE		(1 << 6)
+#define DRAM_CTRL_BANKS			(1 << 1)
+#define DRAM_CTRL_WRITE_PRECHARGE	(1 << 0)
+
+/* ----- Arvitration control register -------------------------- */
+#define ARBITRATION_CTRL		(0x000014 + VOYAGER_BASE)
+#define ARBITRATION_CTRL_CPUMEM		(1 << 29)
+#define ARBITRATION_CTRL_INTMEM		(1 << 28)
+#define ARBITRATION_CTRL_USB_OFF	(0 << 24)
+#define ARBITRATION_CTRL_USB_PRIORITY_1	(1 << 24)
+#define ARBITRATION_CTRL_USB_PRIORITY_2	(2 << 24)
+#define ARBITRATION_CTRL_USB_PRIORITY_3	(3 << 24)
+#define ARBITRATION_CTRL_USB_PRIORITY_4	(4 << 24)
+#define ARBITRATION_CTRL_USB_PRIORITY_5	(5 << 24)
+#define ARBITRATION_CTRL_USB_PRIORITY_6	(6 << 24)
+#define ARBITRATION_CTRL_USB_PRIORITY_7	(7 << 24)
+#define ARBITRATION_CTRL_PANEL_OFF	(0 << 20)
+#define ARBITRATION_CTRL_PANEL_PRIORITY_1	(1 << 20)
+#define ARBITRATION_CTRL_PANEL_PRIORITY_2	(2 << 20)
+#define ARBITRATION_CTRL_PANEL_PRIORITY_3	(3 << 20)
+#define ARBITRATION_CTRL_PANEL_PRIORITY_4	(4 << 20)
+#define ARBITRATION_CTRL_PANEL_PRIORITY_5	(5 << 20)
+#define ARBITRATION_CTRL_PANEL_PRIORITY_6	(6 << 20)
+#define ARBITRATION_CTRL_PANEL_PRIORITY_7	(7 << 20)
+#define ARBITRATION_CTRL_ZVPORT_OFF	(0 << 16)
+#define ARBITRATION_CTRL_ZVPORTL_PRIORITY_1	(1 << 16)
+#define ARBITRATION_CTRL_ZVPORTL_PRIORITY_2	(2 << 16)
+#define ARBITRATION_CTRL_ZVPORTL_PRIORITY_3	(3 << 16)
+#define ARBITRATION_CTRL_ZVPORTL_PRIORITY_4	(4 << 16)
+#define ARBITRATION_CTRL_ZVPORTL_PRIORITY_5	(5 << 16)
+#define ARBITRATION_CTRL_ZVPORTL_PRIORITY_6	(6 << 16)
+#define ARBITRATION_CTRL_ZVPORTL_PRIORITY_7	(7 << 16)
+#define ARBITRATION_CTRL_CMD_INTPR_OFF	(0 << 12)
+#define ARBITRATION_CTRL_CMD_INTPR_PRIORITY_1	(1 << 12)
+#define ARBITRATION_CTRL_CMD_INTPR_PRIORITY_2	(2 << 12)
+#define ARBITRATION_CTRL_CMD_INTPR_PRIORITY_3	(3 << 12)
+#define ARBITRATION_CTRL_CMD_INTPR_PRIORITY_4	(4 << 12)
+#define ARBITRATION_CTRL_CMD_INTPR_PRIORITY_5	(5 << 12)
+#define ARBITRATION_CTRL_CMD_INTPR_PRIORITY_6	(6 << 12)
+#define ARBITRATION_CTRL_CMD_INTPR_PRIORITY_7	(7 << 12)
+#define ARBITRATION_CTRL_DMA_OFF	(0 << 8)
+#define ARBITRATION_CTRL_DMA_PRIORITY_1	(1 << 8)
+#define ARBITRATION_CTRL_DMA_PRIORITY_2	(2 << 8)
+#define ARBITRATION_CTRL_DMA_PRIORITY_3	(3 << 8)
+#define ARBITRATION_CTRL_DMA_PRIORITY_4	(4 << 8)
+#define ARBITRATION_CTRL_DMA_PRIORITY_5	(5 << 8)
+#define ARBITRATION_CTRL_DMA_PRIORITY_6	(6 << 8)
+#define ARBITRATION_CTRL_DMA_PRIORITY_7	(7 << 8)
+#define ARBITRATION_CTRL_VIDEO_OFF	(0 << 4)
+#define ARBITRATION_CTRL_VIDEO_PRIORITY_1	(1 << 4)
+#define ARBITRATION_CTRL_VIDEO_PRIORITY_2	(2 << 4)
+#define ARBITRATION_CTRL_VIDEO_PRIORITY_3	(3 << 4)
+#define ARBITRATION_CTRL_VIDEO_PRIORITY_4	(4 << 4)
+#define ARBITRATION_CTRL_VIDEO_PRIORITY_5	(5 << 4)
+#define ARBITRATION_CTRL_VIDEO_PRIORITY_6	(6 << 4)
+#define ARBITRATION_CTRL_VIDEO_PRIORITY_7	(7 << 4)
+#define ARBITRATION_CTRL_CRT_OFF	(0 << 0)
+#define ARBITRATION_CTRL_CRT_PRIORITY_1	(1 << 0)
+#define ARBITRATION_CTRL_CRT_PRIORITY_2	(2 << 0)
+#define ARBITRATION_CTRL_CRT_PRIORITY_3	(3 << 0)
+#define ARBITRATION_CTRL_CRT_PRIORITY_4	(4 << 0)
+#define ARBITRATION_CTRL_CRT_PRIORITY_5	(5 << 0)
+#define ARBITRATION_CTRL_CRT_PRIORITY_6	(6 << 0)
+#define ARBITRATION_CTRL_CRT_PRIORITY_7	(7 << 0)
+
+/* ----- Command list status register -------------------------- */
+#define CMD_INTPR_STATUS		(0x000024 + VOYAGER_BASE)
+
+/* ----- Interrupt status register ----------------------------- */
+#define INT_STATUS			(0x00002c + VOYAGER_BASE)
+#define INT_STATUS_UH			(1 << 6)
+#define INT_STATUS_MC			(1 << 10)
+#define INT_STATUS_U0			(1 << 12)
+#define INT_STATUS_U1			(1 << 13)
+#define	INT_STATUS_AC			(1 << 17)
+
+/* ----- Interrupt mask register ------------------------------ */
+#define VOYAGER_INT_MASK		(0x000030 + VOYAGER_BASE)
+#define VOYAGER_INT_MASK_AC		(1 << 17)
+
+/* ----- Current Gate register ---------------------------------*/
+#define CURRENT_GATE			(0x000038 + VOYAGER_BASE)
+
+/* ----- Power mode 0 gate register --------------------------- */
+#define POWER_MODE0_GATE		(0x000040 + VOYAGER_BASE)
+#define POWER_MODE0_GATE_G		(1 << 6)
+#define POWER_MODE0_GATE_U0		(1 << 7)
+#define POWER_MODE0_GATE_U1		(1 << 8)
+#define POWER_MODE0_GATE_UH		(1 << 11)
+#define	POWER_MODE0_GATE_AC		(1 << 18)
+
+/* ----- Power mode 1 gate register --------------------------- */
+#define POWER_MODE1_GATE		(0x000048 + VOYAGER_BASE)
+#define POWER_MODE1_GATE_G		(1 << 6)
+#define POWER_MODE1_GATE_U0		(1 << 7)
+#define POWER_MODE1_GATE_U1		(1 << 8)
+#define POWER_MODE1_GATE_UH		(1 << 11)
+#define	POWER_MODE1_GATE_AC		(1 << 18)
+
+/* ----- Power mode 0 clock register -------------------------- */
+#define POWER_MODE0_CLOCK		(0x000044 + VOYAGER_BASE)
+
+/* ----- Power mode 1 clock register -------------------------- */
+#define POWER_MODE1_CLOCK		(0x00004C + VOYAGER_BASE)
+
+/* ----- Power mode controll register ------------------------- */
+#define POWER_MODE_CTRL			(0x000054 + VOYAGER_BASE)
+
+/* ----- Miscellaneous Timing register ------------------------ */
+#define SYSTEM_DRAM_CTRL		(0x000068 + VOYAGER_BASE)
+
+/* ----- PWM register ------------------------------------------*/
+#define PWM_0				(0x010020 + VOYAGER_BASE)
+#define PWM_0_HC(x)			(((x)&0x0fff)<<20)
+#define PWM_0_LC(x)			(((x)&0x0fff)<<8 )
+#define PWM_0_CLK_DEV(x)		(((x)&0x000f)<<4 )
+#define PWM_0_EN			(1<<0)
+
+/* ----- I2C register ----------------------------------------- */
+#define I2C_BYTECOUNT			(0x010040 + VOYAGER_BASE)
+#define I2C_CONTROL			(0x010041 + VOYAGER_BASE)
+#define I2C_STATUS			(0x010042 + VOYAGER_BASE)
+#define I2C_RESET			(0x010042 + VOYAGER_BASE)
+#define I2C_SADDRESS			(0x010043 + VOYAGER_BASE)
+#define I2C_DATA			(0x010044 + VOYAGER_BASE)
+
+/* ----- Controle register bits ----------------------------------------- */
+#define I2C_CONTROL_E			(1 << 0)
+#define I2C_CONTROL_MODE		(1 << 1)
+#define I2C_CONTROL_STATUS		(1 << 2)
+#define I2C_CONTROL_INT			(1 << 4)
+#define I2C_CONTROL_INTACK		(1 << 5)
+#define I2C_CONTROL_REPEAT		(1 << 6)
+
+/* ----- Status register bits ----------------------------------------- */
+#define I2C_STATUS_BUSY			(1 << 0)
+#define I2C_STATUS_ACK			(1 << 1)
+#define I2C_STATUS_ERROR		(1 << 2)
+#define I2C_STATUS_COMPLETE		(1 << 3)
+
+/* ----- Reset register  ---------------------------------------------- */
+#define I2C_RESET_ERROR			(1 << 2)
+
+/* ----- transmission frequencies ------------------------------------- */
+#define I2C_SADDRESS_SELECT		(1 << 0)
+
+/* ----- Display Controll register ----------------------------------------- */
+#define PANEL_DISPLAY_CTRL		(0x080000 + VOYAGER_BASE)
+#define PANEL_DISPLAY_CTRL_BIAS         (1<<26)
+#define PANEL_PAN_CTRL			(0x080004 + VOYAGER_BASE)
+#define PANEL_COLOR_KEY			(0x080008 + VOYAGER_BASE)
+#define PANEL_FB_ADDRESS		(0x08000C + VOYAGER_BASE)
+#define PANEL_FB_WIDTH			(0x080010 + VOYAGER_BASE)
+#define PANEL_WINDOW_WIDTH		(0x080014 + VOYAGER_BASE)
+#define PANEL_WINDOW_HEIGHT		(0x080018 + VOYAGER_BASE)
+#define PANEL_PLANE_TL			(0x08001C + VOYAGER_BASE)
+#define PANEL_PLANE_BR			(0x080020 + VOYAGER_BASE)
+#define PANEL_HORIZONTAL_TOTAL		(0x080024 + VOYAGER_BASE)
+#define PANEL_HORIZONTAL_SYNC		(0x080028 + VOYAGER_BASE)
+#define PANEL_VERTICAL_TOTAL		(0x08002C + VOYAGER_BASE)
+#define PANEL_VERTICAL_SYNC		(0x080030 + VOYAGER_BASE)
+#define PANEL_CURRENT_LINE		(0x080034 + VOYAGER_BASE)
+#define VIDEO_DISPLAY_CTRL		(0x080040 + VOYAGER_BASE)
+#define VIDEO_FB_0_ADDRESS		(0x080044 + VOYAGER_BASE)
+#define VIDEO_FB_WIDTH			(0x080048 + VOYAGER_BASE)
+#define VIDEO_FB_0_LAST_ADDRESS		(0x08004C + VOYAGER_BASE)
+#define VIDEO_PLANE_TL			(0x080050 + VOYAGER_BASE)
+#define VIDEO_PLANE_BR			(0x080054 + VOYAGER_BASE)
+#define VIDEO_SCALE			(0x080058 + VOYAGER_BASE)
+#define VIDEO_INITIAL_SCALE		(0x08005C + VOYAGER_BASE)
+#define VIDEO_YUV_CONSTANTS		(0x080060 + VOYAGER_BASE)
+#define VIDEO_FB_1_ADDRESS		(0x080064 + VOYAGER_BASE)
+#define VIDEO_FB_1_LAST_ADDRESS		(0x080068 + VOYAGER_BASE)
+#define VIDEO_ALPHA_DISPLAY_CTRL	(0x080080 + VOYAGER_BASE)
+#define VIDEO_ALPHA_FB_ADDRESS		(0x080084 + VOYAGER_BASE)
+#define VIDEO_ALPHA_FB_WIDTH		(0x080088 + VOYAGER_BASE)
+#define VIDEO_ALPHA_FB_LAST_ADDRESS	(0x08008C + VOYAGER_BASE)
+#define VIDEO_ALPHA_PLANE_TL		(0x080090 + VOYAGER_BASE)
+#define VIDEO_ALPHA_PLANE_BR		(0x080094 + VOYAGER_BASE)
+#define VIDEO_ALPHA_SCALE		(0x080098 + VOYAGER_BASE)
+#define VIDEO_ALPHA_INITIAL_SCALE	(0x08009C + VOYAGER_BASE)
+#define VIDEO_ALPHA_CHROMA_KEY		(0x0800A0 + VOYAGER_BASE)
+#define PANEL_HWC_ADDRESS		(0x0800F0 + VOYAGER_BASE)
+#define PANEL_HWC_LOCATION		(0x0800F4 + VOYAGER_BASE)
+#define PANEL_HWC_COLOR_12		(0x0800F8 + VOYAGER_BASE)
+#define PANEL_HWC_COLOR_3		(0x0800FC + VOYAGER_BASE)
+#define ALPHA_DISPLAY_CTRL		(0x080100 + VOYAGER_BASE)
+#define ALPHA_FB_ADDRESS		(0x080104 + VOYAGER_BASE)
+#define ALPHA_FB_WIDTH			(0x080108 + VOYAGER_BASE)
+#define ALPHA_PLANE_TL			(0x08010C + VOYAGER_BASE)
+#define ALPHA_PLANE_BR			(0x080110 + VOYAGER_BASE)
+#define ALPHA_CHROMA_KEY		(0x080114 + VOYAGER_BASE)
+#define CRT_DISPLAY_CTRL		(0x080200 + VOYAGER_BASE)
+#define CRT_FB_ADDRESS			(0x080204 + VOYAGER_BASE)
+#define CRT_FB_WIDTH			(0x080208 + VOYAGER_BASE)
+#define CRT_HORIZONTAL_TOTAL		(0x08020C + VOYAGER_BASE)
+#define CRT_HORIZONTAL_SYNC		(0x080210 + VOYAGER_BASE)
+#define CRT_VERTICAL_TOTAL		(0x080214 + VOYAGER_BASE)
+#define CRT_VERTICAL_SYNC		(0x080218 + VOYAGER_BASE)
+#define CRT_SIGNATURE_ANALYZER		(0x08021C + VOYAGER_BASE)
+#define CRT_CURRENT_LINE		(0x080220 + VOYAGER_BASE)
+#define CRT_MONITOR_DETECT		(0x080224 + VOYAGER_BASE)
+#define CRT_HWC_ADDRESS			(0x080230 + VOYAGER_BASE)
+#define CRT_HWC_LOCATION		(0x080234 + VOYAGER_BASE)
+#define CRT_HWC_COLOR_12		(0x080238 + VOYAGER_BASE)
+#define CRT_HWC_COLOR_3			(0x08023C + VOYAGER_BASE)
+#define CRT_PALETTE_RAM			(0x080400 + VOYAGER_BASE)
+#define PANEL_PALETTE_RAM		(0x080800 + VOYAGER_BASE)
+#define VIDEO_PALETTE_RAM		(0x080C00 + VOYAGER_BASE)
+
+/* ----- 8051 Controle register ----------------------------------------- */
+#define VOYAGER_8051_BASE		(0x000c0000 + VOYAGER_BASE)
+#define VOYAGER_8051_RESET		(0x000b0000 + VOYAGER_BASE)
+#define VOYAGER_8051_SELECT		(0x000b0004 + VOYAGER_BASE)
+#define VOYAGER_8051_CPU_INT		(0x000b000c + VOYAGER_BASE)
+
+/* ----- AC97 Controle register ----------------------------------------- */
+#define AC97_TX_SLOT0			(0x00000000 + VOYAGER_AC97_BASE)
+#define AC97_CONTROL_STATUS		(0x00000080 + VOYAGER_AC97_BASE)
+#define AC97C_READ			(1 << 19)
+#define AC97C_WD_BIT			(1 << 2)
+#define AC97C_INDEX_MASK		0x7f
+/* -------------------------------------------------------------------- */
+
+#endif /* _VOYAGER_GX_REG_H */
--- diff/include/asm-sh/se7300/io.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/se7300/io.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,29 @@
+/*
+ * include/asm-sh/se7300/io.h
+ *
+ * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
+ * IO functions for SH-Mobile(SH7300) SolutionEngine
+ */
+
+#ifndef _ASM_SH_IO_7300SE_H
+#define _ASM_SH_IO_7300SE_H
+
+extern unsigned char sh7300se_inb(unsigned long port);
+extern unsigned short sh7300se_inw(unsigned long port);
+extern unsigned int sh7300se_inl(unsigned long port);
+
+extern void sh7300se_outb(unsigned char value, unsigned long port);
+extern void sh7300se_outw(unsigned short value, unsigned long port);
+extern void sh7300se_outl(unsigned int value, unsigned long port);
+
+extern unsigned char sh7300se_inb_p(unsigned long port);
+extern void sh7300se_outb_p(unsigned char value, unsigned long port);
+
+extern void sh7300se_insb(unsigned long port, void *addr, unsigned long count);
+extern void sh7300se_insw(unsigned long port, void *addr, unsigned long count);
+extern void sh7300se_insl(unsigned long port, void *addr, unsigned long count);
+extern void sh7300se_outsb(unsigned long port, const void *addr, unsigned long count);
+extern void sh7300se_outsw(unsigned long port, const void *addr, unsigned long count);
+extern void sh7300se_outsl(unsigned long port, const void *addr, unsigned long count);
+
+#endif /* _ASM_SH_IO_7300SE_H */
--- diff/include/asm-sh/se7300/se7300.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/se7300/se7300.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,61 @@
+#ifndef __ASM_SH_HITACHI_SE7300_H
+#define __ASM_SH_HITACHI_SE7300_H
+
+/*
+ * linux/include/asm-sh/se/se7300.h
+ *
+ * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
+ *
+ * SH-Mobile SolutionEngine 7300 support
+ */
+
+/* Box specific addresses.  */
+
+/* Area 0 */
+#define PA_ROM		0x00000000	/* EPROM */
+#define PA_ROM_SIZE	0x00400000	/* EPROM size 4M byte(Actually 2MB) */
+#define PA_FROM		0x00400000	/* Flash ROM */
+#define PA_FROM_SIZE	0x00400000	/* Flash size 4M byte */
+#define PA_SRAM		0x00800000	/* SRAM */
+#define PA_FROM_SIZE	0x00400000	/* SRAM size 4M byte */
+/* Area 1 */
+#define PA_EXT1		0x04000000
+#define PA_EXT1_SIZE	0x04000000
+/* Area 2 */
+#define PA_EXT2		0x08000000
+#define PA_EXT2_SIZE	0x04000000
+/* Area 3 */
+#define PA_SDRAM	0x0c000000
+#define PA_SDRAM_SIZE	0x04000000
+/* Area 4 */
+#define PA_PCIC		0x10000000	/* MR-SHPC-01 PCMCIA */
+#define PA_MRSHPC       0xb03fffe0      /* MR-SHPC-01 PCMCIA controller */
+#define PA_MRSHPC_MW1   0xb0400000      /* MR-SHPC-01 memory window base */
+#define PA_MRSHPC_MW2   0xb0500000      /* MR-SHPC-01 attribute window base */
+#define PA_MRSHPC_IO    0xb0600000      /* MR-SHPC-01 I/O window base */
+#define MRSHPC_OPTION   (PA_MRSHPC + 6)
+#define MRSHPC_CSR      (PA_MRSHPC + 8)
+#define MRSHPC_ISR      (PA_MRSHPC + 10)
+#define MRSHPC_ICR      (PA_MRSHPC + 12)
+#define MRSHPC_CPWCR    (PA_MRSHPC + 14)
+#define MRSHPC_MW0CR1   (PA_MRSHPC + 16)
+#define MRSHPC_MW1CR1   (PA_MRSHPC + 18)
+#define MRSHPC_IOWCR1   (PA_MRSHPC + 20)
+#define MRSHPC_MW0CR2   (PA_MRSHPC + 22)
+#define MRSHPC_MW1CR2   (PA_MRSHPC + 24)
+#define MRSHPC_IOWCR2   (PA_MRSHPC + 26)
+#define MRSHPC_CDCR     (PA_MRSHPC + 28)
+#define MRSHPC_PCIC_INFO (PA_MRSHPC + 30)
+#define PA_LED		0xb0800000	/* LED */
+#define PA_DIPSW	0xb0900000	/* Dip switch 31 */
+#define PA_EPLD_MODESET	0xb0a00000	/* FPGA Mode set register */
+#define PA_EPLD_ST1	0xb0a80000	/* FPGA Interrupt status register1 */
+#define PA_EPLD_ST2	0xb0ac0000	/* FPGA Interrupt status register2 */
+/* Area 5 */
+#define PA_EXT5		0x14000000
+#define PA_EXT5_SIZE	0x04000000
+/* Area 6 */
+#define PA_LCD1		0xb8000000
+#define PA_LCD2		0xb8800000
+
+#endif  /* __ASM_SH_HITACHI_SE7300_H */
--- diff/include/asm-sh/setup.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh/setup.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,8 @@
+#ifdef __KERNEL__
+#ifndef _SH_SETUP_H
+#define _SH_SETUP_H
+
+#define COMMAND_LINE_SIZE 256
+
+#endif /* _SH_SETUP_H */
+#endif /* __KERNEL__ */
--- diff/include/asm-sh64/a.out.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/a.out.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,37 @@
+#ifndef __ASM_SH64_A_OUT_H
+#define __ASM_SH64_A_OUT_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/a.out.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+struct exec
+{
+  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
+  unsigned a_text;		/* length of text, in bytes */
+  unsigned a_data;		/* length of data, in bytes */
+  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
+  unsigned a_syms;		/* length of symbol table data in file, in bytes */
+  unsigned a_entry;		/* start address */
+  unsigned a_trsize;		/* length of relocation info for text, in bytes */
+  unsigned a_drsize;		/* length of relocation info for data, in bytes */
+};
+
+#define N_TRSIZE(a)	((a).a_trsize)
+#define N_DRSIZE(a)	((a).a_drsize)
+#define N_SYMSIZE(a)	((a).a_syms)
+
+#ifdef __KERNEL__
+
+#define STACK_TOP	TASK_SIZE
+
+#endif
+
+#endif /* __ASM_SH64_A_OUT_H */
--- diff/include/asm-sh64/atomic.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/atomic.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,126 @@
+#ifndef __ASM_SH64_ATOMIC_H
+#define __ASM_SH64_ATOMIC_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/atomic.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+
+/*
+ * Atomic operations that C can't guarantee us.  Useful for
+ * resource counting etc..
+ *
+ */
+
+typedef struct { volatile int counter; } atomic_t;
+
+#define ATOMIC_INIT(i)	( (atomic_t) { (i) } )
+
+#define atomic_read(v)		((v)->counter)
+#define atomic_set(v,i)		((v)->counter = (i))
+
+#include <asm/system.h>
+
+/*
+ * To get proper branch prediction for the main line, we must branch
+ * forward to code at the end of this object's .text section, then
+ * branch back to restart the operation.
+ */
+
+static __inline__ void atomic_add(int i, atomic_t * v)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	*(long *)v += i;
+	local_irq_restore(flags);
+}
+
+static __inline__ void atomic_sub(int i, atomic_t *v)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	*(long *)v -= i;
+	local_irq_restore(flags);
+}
+
+static __inline__ int atomic_add_return(int i, atomic_t * v)
+{
+	unsigned long temp, flags;
+
+	local_irq_save(flags);
+	temp = *(long *)v;
+	temp += i;
+	*(long *)v = temp;
+	local_irq_restore(flags);
+
+	return temp;
+}
+
+#define atomic_add_negative(a, v)	(atomic_add_return((a), (v)) < 0)
+
+static __inline__ int atomic_sub_return(int i, atomic_t * v)
+{
+	unsigned long temp, flags;
+
+	local_irq_save(flags);
+	temp = *(long *)v;
+	temp -= i;
+	*(long *)v = temp;
+	local_irq_restore(flags);
+
+	return temp;
+}
+
+#define atomic_dec_return(v) atomic_sub_return(1,(v))
+#define atomic_inc_return(v) atomic_add_return(1,(v))
+
+/*
+ * atomic_inc_and_test - increment and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1
+ * and returns true if the result is zero, or false for all
+ * other cases.
+ */
+#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
+
+#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
+#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
+
+#define atomic_inc(v) atomic_add(1,(v))
+#define atomic_dec(v) atomic_sub(1,(v))
+
+static __inline__ void atomic_clear_mask(unsigned int mask, atomic_t *v)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	*(long *)v &= ~mask;
+	local_irq_restore(flags);
+}
+
+static __inline__ void atomic_set_mask(unsigned int mask, atomic_t *v)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	*(long *)v |= mask;
+	local_irq_restore(flags);
+}
+
+/* Atomic operations are already serializing on SH */
+#define smp_mb__before_atomic_dec()	barrier()
+#define smp_mb__after_atomic_dec()	barrier()
+#define smp_mb__before_atomic_inc()	barrier()
+#define smp_mb__after_atomic_inc()	barrier()
+
+#endif /* __ASM_SH64_ATOMIC_H */
--- diff/include/asm-sh64/bitops.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/bitops.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,518 @@
+#ifndef __ASM_SH64_BITOPS_H
+#define __ASM_SH64_BITOPS_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/bitops.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ */
+
+#ifdef __KERNEL__
+#include <linux/compiler.h>
+#include <asm/system.h>
+/* For __swab32 */
+#include <asm/byteorder.h>
+
+static __inline__ void set_bit(int nr, volatile void * addr)
+{
+	int	mask;
+	volatile unsigned int *a = addr;
+	unsigned long flags;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	local_irq_save(flags);
+	*a |= mask;
+	local_irq_restore(flags);
+}
+
+static inline void __set_bit(int nr, void *addr)
+{
+	int	mask;
+	unsigned int *a = addr;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	*a |= mask;
+}
+
+/*
+ * clear_bit() doesn't provide any barrier for the compiler.
+ */
+#define smp_mb__before_clear_bit()	barrier()
+#define smp_mb__after_clear_bit()	barrier()
+static __inline__ void clear_bit(int nr, void * addr)
+{
+	int	mask;
+	unsigned int *a = addr;
+	unsigned long flags;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	local_irq_save(flags);
+	*a &= ~mask;
+	local_irq_restore(flags);
+}
+
+static inline void __clear_bit(int nr, void *addr)
+{
+	int	mask;
+	unsigned int *a = addr;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	*a &= ~mask;
+}
+
+static __inline__ void change_bit(int nr, volatile void * addr)
+{
+	int	mask;
+	volatile unsigned int *a = addr;
+	unsigned long flags;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	local_irq_save(flags);
+	*a ^= mask;
+	local_irq_restore(flags);
+}
+
+static __inline__ void __change_bit(int nr, volatile void * addr)
+{
+	int	mask;
+	volatile unsigned int *a = addr;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	*a ^= mask;
+}
+
+static __inline__ int test_and_set_bit(int nr, volatile void * addr)
+{
+	int	mask, retval;
+	volatile unsigned int *a = addr;
+	unsigned long flags;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	local_irq_save(flags);
+	retval = (mask & *a) != 0;
+	*a |= mask;
+	local_irq_restore(flags);
+
+	return retval;
+}
+
+static __inline__ int __test_and_set_bit(int nr, volatile void * addr)
+{
+	int	mask, retval;
+	volatile unsigned int *a = addr;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	retval = (mask & *a) != 0;
+	*a |= mask;
+
+	return retval;
+}
+
+static __inline__ int test_and_clear_bit(int nr, volatile void * addr)
+{
+	int	mask, retval;
+	volatile unsigned int *a = addr;
+	unsigned long flags;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	local_irq_save(flags);
+	retval = (mask & *a) != 0;
+	*a &= ~mask;
+	local_irq_restore(flags);
+
+	return retval;
+}
+
+static __inline__ int __test_and_clear_bit(int nr, volatile void * addr)
+{
+	int	mask, retval;
+	volatile unsigned int *a = addr;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	retval = (mask & *a) != 0;
+	*a &= ~mask;
+
+	return retval;
+}
+
+static __inline__ int test_and_change_bit(int nr, volatile void * addr)
+{
+	int	mask, retval;
+	volatile unsigned int *a = addr;
+	unsigned long flags;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	local_irq_save(flags);
+	retval = (mask & *a) != 0;
+	*a ^= mask;
+	local_irq_restore(flags);
+
+	return retval;
+}
+
+static __inline__ int __test_and_change_bit(int nr, volatile void * addr)
+{
+	int	mask, retval;
+	volatile unsigned int *a = addr;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	retval = (mask & *a) != 0;
+	*a ^= mask;
+
+	return retval;
+}
+
+static __inline__ int test_bit(int nr, const volatile void *addr)
+{
+	return 1UL & (((const volatile unsigned int *) addr)[nr >> 5] >> (nr & 31));
+}
+
+static __inline__ unsigned long ffz(unsigned long word)
+{
+	unsigned long result, __d2, __d3;
+
+        __asm__("gettr  tr0, %2\n\t"
+                "pta    $+32, tr0\n\t"
+                "andi   %1, 1, %3\n\t"
+                "beq    %3, r63, tr0\n\t"
+                "pta    $+4, tr0\n"
+                "0:\n\t"
+                "shlri.l        %1, 1, %1\n\t"
+                "addi   %0, 1, %0\n\t"
+                "andi   %1, 1, %3\n\t"
+                "beqi   %3, 1, tr0\n"
+                "1:\n\t"
+                "ptabs  %2, tr0\n\t"
+                : "=r" (result), "=r" (word), "=r" (__d2), "=r" (__d3)
+                : "0" (0L), "1" (word));
+
+	return result;
+}
+
+/**
+ * __ffs - find first bit in word
+ * @word: The word to search
+ *
+ * Undefined if no bit exists, so code should check against 0 first.
+ */
+static inline unsigned long __ffs(unsigned long word)
+{
+	int r = 0;
+
+	if (!word)
+		return 0;
+	if (!(word & 0xffff)) {
+		word >>= 16;
+		r += 16;
+	}
+	if (!(word & 0xff)) {
+		word >>= 8;
+		r += 8;
+	}
+	if (!(word & 0xf)) {
+		word >>= 4;
+		r += 4;
+	}
+	if (!(word & 3)) {
+		word >>= 2;
+		r += 2;
+	}
+	if (!(word & 1)) {
+		word >>= 1;
+		r += 1;
+	}
+	return r;
+}
+
+/**
+ * find_next_bit - find the next set bit in a memory region
+ * @addr: The address to base the search on
+ * @offset: The bitnumber to start searching at
+ * @size: The maximum size to search
+ */
+static inline unsigned long find_next_bit(unsigned long *addr,
+	unsigned long size, unsigned long offset)
+{
+	unsigned int *p = ((unsigned int *) addr) + (offset >> 5);
+	unsigned int result = offset & ~31UL;
+	unsigned int tmp;
+
+	if (offset >= size)
+		return size;
+	size -= result;
+	offset &= 31UL;
+	if (offset) {
+		tmp = *p++;
+		tmp &= ~0UL << offset;
+		if (size < 32)
+			goto found_first;
+		if (tmp)
+			goto found_middle;
+		size -= 32;
+		result += 32;
+	}
+	while (size >= 32) {
+		if ((tmp = *p++) != 0)
+			goto found_middle;
+		result += 32;
+		size -= 32;
+	}
+	if (!size)
+		return result;
+	tmp = *p;
+
+found_first:
+	tmp &= ~0UL >> (32 - size);
+	if (tmp == 0UL)        /* Are any bits set? */
+		return result + size; /* Nope. */
+found_middle:
+	return result + __ffs(tmp);
+}
+
+/**
+ * find_first_bit - find the first set bit in a memory region
+ * @addr: The address to start the search at
+ * @size: The maximum size to search
+ *
+ * Returns the bit-number of the first set bit, not the number of the byte
+ * containing a bit.
+ */
+#define find_first_bit(addr, size) \
+	find_next_bit((addr), (size), 0)
+
+
+static inline int find_next_zero_bit(void *addr, int size, int offset)
+{
+	unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
+	unsigned long result = offset & ~31UL;
+	unsigned long tmp;
+
+	if (offset >= size)
+		return size;
+	size -= result;
+	offset &= 31UL;
+	if (offset) {
+		tmp = *(p++);
+		tmp |= ~0UL >> (32-offset);
+		if (size < 32)
+			goto found_first;
+		if (~tmp)
+			goto found_middle;
+		size -= 32;
+		result += 32;
+	}
+	while (size & ~31UL) {
+		if (~(tmp = *(p++)))
+			goto found_middle;
+		result += 32;
+		size -= 32;
+	}
+	if (!size)
+		return result;
+	tmp = *p;
+
+found_first:
+	tmp |= ~0UL << size;
+found_middle:
+	return result + ffz(tmp);
+}
+
+#define find_first_zero_bit(addr, size) \
+        find_next_zero_bit((addr), (size), 0)
+
+/*
+ * hweightN: returns the hamming weight (i.e. the number
+ * of bits set) of a N-bit word
+ */
+
+#define hweight32(x)	generic_hweight32(x)
+#define hweight16(x)	generic_hweight16(x)
+#define hweight8(x)	generic_hweight8(x)
+
+/*
+ * Every architecture must define this function. It's the fastest
+ * way of searching a 140-bit bitmap where the first 100 bits are
+ * unlikely to be set. It's guaranteed that at least one of the 140
+ * bits is cleared.
+ */
+
+static inline int sched_find_first_bit(unsigned long *b)
+{
+	if (unlikely(b[0]))
+		return __ffs(b[0]);
+	if (unlikely(b[1]))
+		return __ffs(b[1]) + 32;
+	if (unlikely(b[2]))
+		return __ffs(b[2]) + 64;
+	if (b[3])
+		return __ffs(b[3]) + 96;
+	return __ffs(b[4]) + 128;
+}
+
+/*
+ * ffs: find first bit set. This is defined the same way as
+ * the libc and compiler builtin ffs routines, therefore
+ * differs in spirit from the above ffz (man ffs).
+ */
+
+#define ffs(x) generic_ffs(x)
+
+/*
+ * hweightN: returns the hamming weight (i.e. the number
+ * of bits set) of a N-bit word
+ */
+
+#define hweight32(x) generic_hweight32(x)
+#define hweight16(x) generic_hweight16(x)
+#define hweight8(x) generic_hweight8(x)
+
+#ifdef __LITTLE_ENDIAN__
+#define ext2_set_bit(nr, addr) test_and_set_bit((nr), (addr))
+#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr), (addr))
+#define ext2_test_bit(nr, addr) test_bit((nr), (addr))
+#define ext2_find_first_zero_bit(addr, size) find_first_zero_bit((addr), (size))
+#define ext2_find_next_zero_bit(addr, size, offset) \
+                find_next_zero_bit((addr), (size), (offset))
+#else
+static __inline__ int ext2_set_bit(int nr, volatile void * addr)
+{
+	int		mask, retval;
+	unsigned long	flags;
+	volatile unsigned char	*ADDR = (unsigned char *) addr;
+
+	ADDR += nr >> 3;
+	mask = 1 << (nr & 0x07);
+	local_irq_save(flags);
+	retval = (mask & *ADDR) != 0;
+	*ADDR |= mask;
+	local_irq_restore(flags);
+	return retval;
+}
+
+static __inline__ int ext2_clear_bit(int nr, volatile void * addr)
+{
+	int		mask, retval;
+	unsigned long	flags;
+	volatile unsigned char	*ADDR = (unsigned char *) addr;
+
+	ADDR += nr >> 3;
+	mask = 1 << (nr & 0x07);
+	local_irq_save(flags);
+	retval = (mask & *ADDR) != 0;
+	*ADDR &= ~mask;
+	local_irq_restore(flags);
+	return retval;
+}
+
+static __inline__ int ext2_test_bit(int nr, const volatile void * addr)
+{
+	int			mask;
+	const volatile unsigned char	*ADDR = (const unsigned char *) addr;
+
+	ADDR += nr >> 3;
+	mask = 1 << (nr & 0x07);
+	return ((mask & *ADDR) != 0);
+}
+
+#define ext2_find_first_zero_bit(addr, size) \
+        ext2_find_next_zero_bit((addr), (size), 0)
+
+static __inline__ unsigned long ext2_find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
+{
+	unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
+	unsigned long result = offset & ~31UL;
+	unsigned long tmp;
+
+	if (offset >= size)
+		return size;
+	size -= result;
+	offset &= 31UL;
+	if(offset) {
+		/* We hold the little endian value in tmp, but then the
+		 * shift is illegal. So we could keep a big endian value
+		 * in tmp, like this:
+		 *
+		 * tmp = __swab32(*(p++));
+		 * tmp |= ~0UL >> (32-offset);
+		 *
+		 * but this would decrease preformance, so we change the
+		 * shift:
+		 */
+		tmp = *(p++);
+		tmp |= __swab32(~0UL >> (32-offset));
+		if(size < 32)
+			goto found_first;
+		if(~tmp)
+			goto found_middle;
+		size -= 32;
+		result += 32;
+	}
+	while(size & ~31UL) {
+		if(~(tmp = *(p++)))
+			goto found_middle;
+		result += 32;
+		size -= 32;
+	}
+	if(!size)
+		return result;
+	tmp = *p;
+
+found_first:
+	/* tmp is little endian, so we would have to swab the shift,
+	 * see above. But then we have to swab tmp below for ffz, so
+	 * we might as well do this here.
+	 */
+	return result + ffz(__swab32(tmp) | (~0UL << size));
+found_middle:
+	return result + ffz(__swab32(tmp));
+}
+#endif
+
+#define ext2_set_bit_atomic(lock, nr, addr)		\
+	({						\
+		int ret;				\
+		spin_lock(lock);			\
+		ret = ext2_set_bit((nr), (addr));	\
+		spin_unlock(lock);			\
+		ret;					\
+	})
+
+#define ext2_clear_bit_atomic(lock, nr, addr)		\
+	({						\
+		int ret;				\
+		spin_lock(lock);			\
+		ret = ext2_clear_bit((nr), (addr));	\
+		spin_unlock(lock);			\
+		ret;					\
+	})
+
+/* Bitmap functions for the minix filesystem.  */
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_bit(nr,addr) test_bit(nr,addr)
+#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
+
+#define ffs(x)	generic_ffs(x)
+#define fls(x)	generic_fls(x)
+
+#endif /* __KERNEL__ */
+
+#endif /* __ASM_SH64_BITOPS_H */
--- diff/include/asm-sh64/bug.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/bug.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,7 @@
+#ifndef __ASM_SH64_BUG_H
+#define __ASM_SH64_BUG_H
+
+#include <asm-sh/bug.h>
+
+#endif /* __ASM_SH64_BUG_H */
+
--- diff/include/asm-sh64/bugs.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/bugs.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,38 @@
+#ifndef __ASM_SH64_BUGS_H
+#define __ASM_SH64_BUGS_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/bugs.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+
+/*
+ * This is included by init/main.c to check for architecture-dependent bugs.
+ *
+ * Needs:
+ *	void check_bugs(void);
+ */
+
+/*
+ * I don't know of any Super-H bugs yet.
+ */
+
+#include <asm/processor.h>
+
+static void __init check_bugs(void)
+{
+	extern char *get_cpu_subtype(void);
+	extern unsigned long loops_per_jiffy;
+
+	cpu_data->loops_per_jiffy = loops_per_jiffy;
+
+	printk("CPU: %s\n", get_cpu_subtype());
+}
+#endif /* __ASM_SH64_BUGS_H */
--- diff/include/asm-sh64/byteorder.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/byteorder.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,49 @@
+#ifndef __ASM_SH64_BYTEORDER_H
+#define __ASM_SH64_BYTEORDER_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/byteorder.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <asm/types.h>
+
+static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
+{
+	__asm__("byterev	%0, %0\n\t"
+		"shari		%0, 32, %0"
+		: "=r" (x)
+		: "0" (x));
+	return x;
+}
+
+static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
+{
+	__asm__("byterev	%0, %0\n\t"
+		"shari		%0, 48, %0"
+		: "=r" (x)
+		: "0" (x));
+	return x;
+}
+
+#define __arch__swab32(x) ___arch__swab32(x)
+#define __arch__swab16(x) ___arch__swab16(x)
+
+#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+#  define __BYTEORDER_HAS_U64__
+#  define __SWAB_64_THRU_32__
+#endif
+
+#ifdef __LITTLE_ENDIAN__
+#include <linux/byteorder/little_endian.h>
+#else
+#include <linux/byteorder/big_endian.h>
+#endif
+
+#endif /* __ASM_SH64_BYTEORDER_H */
--- diff/include/asm-sh64/cache.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/cache.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,141 @@
+#ifndef __ASM_SH64_CACHE_H
+#define __ASM_SH64_CACHE_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/cache.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ *
+ */
+#include <asm/cacheflush.h>
+
+#define L1_CACHE_SHIFT		5
+/* bytes per L1 cache line */
+#define L1_CACHE_BYTES		(1 << L1_CACHE_SHIFT)
+#define L1_CACHE_ALIGN_MASK	(~(L1_CACHE_BYTES - 1))
+#define L1_CACHE_ALIGN(x)	(((x)+(L1_CACHE_BYTES - 1)) & L1_CACHE_ALIGN_MASK)
+#define L1_CACHE_SIZE_BYTES	(L1_CACHE_BYTES << 10)
+/* Largest L1 which this arch supports */
+#define L1_CACHE_SHIFT_MAX	5
+
+#ifdef MODULE
+#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES)))
+#else
+#define __cacheline_aligned					\
+  __attribute__((__aligned__(L1_CACHE_BYTES),			\
+		 __section__(".data.cacheline_aligned")))
+#endif
+
+/*
+ * Control Registers.
+ */
+#define ICCR_BASE	0x01600000	/* Instruction Cache Control Register */
+#define ICCR_REG0	0		/* Register 0 offset */
+#define ICCR_REG1	1		/* Register 1 offset */
+#define ICCR0		ICCR_BASE+ICCR_REG0
+#define ICCR1		ICCR_BASE+ICCR_REG1
+
+#define ICCR0_OFF	0x0		/* Set ICACHE off */
+#define ICCR0_ON	0x1		/* Set ICACHE on */
+#define ICCR0_ICI	0x2		/* Invalidate all in IC */
+
+#define ICCR1_NOLOCK	0x0		/* Set No Locking */
+
+#define OCCR_BASE	0x01E00000	/* Operand Cache Control Register */
+#define OCCR_REG0	0		/* Register 0 offset */
+#define OCCR_REG1	1		/* Register 1 offset */
+#define OCCR0		OCCR_BASE+OCCR_REG0
+#define OCCR1		OCCR_BASE+OCCR_REG1
+
+#define OCCR0_OFF	0x0		/* Set OCACHE off */
+#define OCCR0_ON	0x1		/* Set OCACHE on */
+#define OCCR0_OCI	0x2		/* Invalidate all in OC */
+#define OCCR0_WT	0x4		/* Set OCACHE in WT Mode */
+#define OCCR0_WB	0x0		/* Set OCACHE in WB Mode */
+
+#define OCCR1_NOLOCK	0x0		/* Set No Locking */
+
+
+/*
+ * SH-5
+ * A bit of description here, for neff=32.
+ *
+ *                               |<--- tag  (19 bits) --->|
+ * +-----------------------------+-----------------+------+----------+------+
+ * |                             |                 | ways |set index |offset|
+ * +-----------------------------+-----------------+------+----------+------+
+ *                                ^                 2 bits   8 bits   5 bits
+ *                                +- Bit 31
+ *
+ * Cacheline size is based on offset: 5 bits = 32 bytes per line
+ * A cache line is identified by a tag + set but OCACHETAG/ICACHETAG
+ * have a broader space for registers. These are outlined by
+ * CACHE_?C_*_STEP below.
+ *
+ */
+
+/* Valid and Dirty bits */
+#define SH_CACHE_VALID		(1LL<<0)
+#define SH_CACHE_UPDATED	(1LL<<57)
+
+/* Cache flags */
+#define SH_CACHE_MODE_WT	(1LL<<0)
+#define SH_CACHE_MODE_WB	(1LL<<1)
+
+#ifndef __ASSEMBLY__
+
+/*
+ * Cache information structure.
+ *
+ * Defined for both I and D cache, per-processor.
+ */
+struct cache_info {
+	unsigned int ways;
+	unsigned int sets;
+	unsigned int linesz;
+
+	unsigned int way_shift;
+	unsigned int entry_shift;
+	unsigned int set_shift;
+	unsigned int way_step_shift;
+	unsigned int asid_shift;
+
+	unsigned int way_ofs;
+
+	unsigned int asid_mask;
+	unsigned int idx_mask;
+	unsigned int epn_mask;
+
+	unsigned long flags;
+};
+
+#endif /* __ASSEMBLY__ */
+
+/* Instruction cache */
+#define CACHE_IC_ADDRESS_ARRAY 0x01000000
+
+/* Operand Cache */
+#define CACHE_OC_ADDRESS_ARRAY 0x01800000
+
+/* These declarations relate to cache 'synonyms' in the operand cache.  A
+   'synonym' occurs where effective address bits overlap between those used for
+   indexing the cache sets and those passed to the MMU for translation.  In the
+   case of SH5-101 & SH5-103, only bit 12 is affected for 4k pages. */
+
+#define CACHE_OC_N_SYNBITS  1               /* Number of synonym bits */
+#define CACHE_OC_SYN_SHIFT  12
+/* Mask to select synonym bit(s) */
+#define CACHE_OC_SYN_MASK   (((1UL<<CACHE_OC_N_SYNBITS)-1)<<CACHE_OC_SYN_SHIFT)
+
+
+/*
+ * Instruction cache can't be invalidated based on physical addresses.
+ * No Instruction Cache defines required, then.
+ */
+
+#endif /* __ASM_SH64_CACHE_H */
--- diff/include/asm-sh64/cacheflush.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/cacheflush.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,44 @@
+#ifndef __ASM_SH64_CACHEFLUSH_H
+#define __ASM_SH64_CACHEFLUSH_H
+
+#ifndef __ASSEMBLY__
+
+#include <asm/page.h>
+
+struct vm_area_struct;
+struct page;
+struct mm_struct;
+
+extern void flush_cache_all(void);
+extern void flush_cache_mm(struct mm_struct *mm);
+extern void flush_cache_sigtramp(unsigned long start, unsigned long end);
+extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
+			      unsigned long end);
+extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr);
+extern void flush_dcache_page(struct page *pg);
+extern void flush_icache_range(unsigned long start, unsigned long end);
+extern void flush_icache_user_range(struct vm_area_struct *vma,
+				    struct page *page, unsigned long addr,
+				    int len);
+
+#define flush_dcache_mmap_lock(mapping)		do { } while (0)
+#define flush_dcache_mmap_unlock(mapping)	do { } while (0)
+
+#define flush_cache_vmap(start, end)		flush_cache_all()
+#define flush_cache_vunmap(start, end)		flush_cache_all()
+
+#define flush_icache_page(vma, page)	do { } while (0)
+
+#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
+do { memcpy(dst, src, len); \
+     flush_icache_user_range(vma, page, vaddr, len); \
+} while (0)
+
+#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
+	memcpy(dst, src, len)
+
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __ASM_SH64_CACHEFLUSH_H */
+
--- diff/include/asm-sh64/cayman.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/cayman.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,20 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/cayman.h
+ *
+ * Cayman definitions
+ *
+ * Global defintions for the SH5 Cayman board
+ *
+ * Copyright (C) 2002 Stuart Menefy
+ */
+
+
+/* Setup for the SMSC FDC37C935 / LAN91C100FD */
+#define SMSC_IRQ         IRQ_IRL1
+
+/* Setup for PCI Bus 2, which transmits interrupts via the EPLD */
+#define PCI2_IRQ         IRQ_IRL3
--- diff/include/asm-sh64/checksum.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/checksum.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,95 @@
+#ifndef __ASM_SH64_CHECKSUM_H
+#define __ASM_SH64_CHECKSUM_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/checksum.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <asm/registers.h>
+
+/*
+ * computes the checksum of a memory block at buff, length len,
+ * and adds in "sum" (32-bit)
+ *
+ * returns a 32-bit number suitable for feeding into itself
+ * or csum_tcpudp_magic
+ *
+ * this function must be called with even lengths, except
+ * for the last fragment, which may be odd
+ *
+ * it's best to have buff aligned on a 32-bit boundary
+ */
+asmlinkage unsigned int csum_partial(const unsigned char *buff, int len,
+				     unsigned int sum);
+
+/*
+ *	Note: when you get a NULL pointer exception here this means someone
+ *	passed in an incorrect kernel address to one of these functions.
+ *
+ *	If you use these functions directly please don't forget the
+ *	verify_area().
+ */
+
+
+unsigned int csum_partial_copy_nocheck(const char *src, char *dst, int len,
+				       unsigned int sum);
+
+unsigned int csum_partial_copy_from_user(const char *src, char *dst,
+					 int len, int sum, int *err_ptr);
+
+/*
+ * These are the old (and unsafe) way of doing checksums, a warning message will be
+ * printed if they are used and an exeption occurs.
+ *
+ * these functions should go away after some time.
+ */
+
+#define csum_partial_copy_fromuser csum_partial_copy
+
+unsigned int csum_partial_copy(const char *src, char *dst, int len,
+			       unsigned int sum);
+
+static inline unsigned short csum_fold(unsigned int sum)
+{
+        sum = (sum & 0xffff) + (sum >> 16);
+        sum = (sum & 0xffff) + (sum >> 16);
+        return ~(sum);
+}
+
+unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl);
+
+unsigned long csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr,
+				 unsigned short len, unsigned short proto,
+				 unsigned int sum);
+
+/*
+ * computes the checksum of the TCP/UDP pseudo-header
+ * returns a 16-bit checksum, already complemented
+ */
+static inline unsigned short int csum_tcpudp_magic(unsigned long saddr,
+						   unsigned long daddr,
+						   unsigned short len,
+						   unsigned short proto,
+						   unsigned int sum)
+{
+	return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
+}
+
+/*
+ * this routine is used for miscellaneous IP-like checksums, mainly
+ * in icmp.c
+ */
+static inline unsigned short ip_compute_csum(unsigned char * buff, int len)
+{
+	return csum_fold(csum_partial(buff, len, 0));
+}
+
+#endif /* __ASM_SH64_CHECKSUM_H */
+
--- diff/include/asm-sh64/cpumask.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/cpumask.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_CPUMASK_H
+#define __ASM_SH64_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* __ASM_SH64_CPUMASK_H */
--- diff/include/asm-sh64/current.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/current.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,28 @@
+#ifndef __ASM_SH64_CURRENT_H
+#define __ASM_SH64_CURRENT_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/current.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+
+#include <linux/thread_info.h>
+
+struct task_struct;
+
+static __inline__ struct task_struct * get_current(void)
+{
+	return current_thread_info()->task;
+}
+
+#define current get_current()
+
+#endif /* __ASM_SH64_CURRENT_H */
+
--- diff/include/asm-sh64/delay.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/delay.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,11 @@
+#ifndef __ASM_SH64_DELAY_H
+#define __ASM_SH64_DELAY_H
+
+extern void __delay(int loops);
+extern void __udelay(unsigned long long usecs, unsigned long lpj);
+extern void __ndelay(unsigned long long nsecs, unsigned long lpj);
+extern void udelay(unsigned long usecs);
+extern void ndelay(unsigned long nsecs);
+
+#endif /* __ASM_SH64_DELAY_H */
+
--- diff/include/asm-sh64/div64.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/div64.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_DIV64_H
+#define __ASM_SH64_DIV64_H
+
+#include <asm-generic/div64.h>
+
+#endif /* __ASM_SH64_DIV64_H */
--- diff/include/asm-sh64/dma-mapping.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/dma-mapping.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,163 @@
+#ifndef __ASM_SH_DMA_MAPPING_H
+#define __ASM_SH_DMA_MAPPING_H
+
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/device.h>
+#include <asm/scatterlist.h>
+#include <asm/io.h>
+
+struct pci_dev;
+extern void *consistent_alloc(struct pci_dev *hwdev, size_t size,
+				    dma_addr_t *dma_handle);
+extern void consistent_free(struct pci_dev *hwdev, size_t size,
+				  void *vaddr, dma_addr_t dma_handle);
+
+#define dma_supported(dev, mask)	(1)
+
+static inline int dma_set_mask(struct device *dev, u64 mask)
+{
+	if (!dev->dma_mask || !dma_supported(dev, mask))
+		return -EIO;
+
+	*dev->dma_mask = mask;
+
+	return 0;
+}
+
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+			 dma_addr_t *dma_handle, int flag)
+{
+	return consistent_alloc(NULL, size, dma_handle);
+}
+
+static inline void dma_free_coherent(struct device *dev, size_t size,
+		       void *vaddr, dma_addr_t dma_handle)
+{
+	consistent_free(NULL, size, vaddr, dma_handle);
+}
+
+static inline void dma_cache_sync(void *vaddr, size_t size,
+				  enum dma_data_direction dir)
+{
+	dma_cache_wback_inv((unsigned long)vaddr, size);
+}
+
+static inline dma_addr_t dma_map_single(struct device *dev,
+					void *ptr, size_t size,
+					enum dma_data_direction dir)
+{
+#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT)
+	if (dev->bus == &pci_bus_type)
+		return virt_to_bus(ptr);
+#endif
+	dma_cache_sync(ptr, size, dir);
+
+	return virt_to_bus(ptr);
+}
+
+#define dma_unmap_single(dev, addr, size, dir)	do { } while (0)
+
+static inline int dma_map_sg(struct device *dev, struct scatterlist *sg,
+			     int nents, enum dma_data_direction dir)
+{
+	int i;
+
+	for (i = 0; i < nents; i++) {
+#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
+		dma_cache_sync(page_address(sg[i].page) + sg[i].offset,
+			       sg[i].length, dir);
+#endif
+		sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
+	}
+
+	return nents;
+}
+
+#define dma_unmap_sg(dev, sg, nents, dir)	do { } while (0)
+
+static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
+				      unsigned long offset, size_t size,
+				      enum dma_data_direction dir)
+{
+	return dma_map_single(dev, page_address(page) + offset, size, dir);
+}
+
+static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address,
+				  size_t size, enum dma_data_direction dir)
+{
+	dma_unmap_single(dev, dma_address, size, dir);
+}
+
+static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle,
+				   size_t size, enum dma_data_direction dir)
+{
+#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT)
+	if (dev->bus == &pci_bus_type)
+		return;
+#endif
+	dma_cache_sync(bus_to_virt(dma_handle), size, dir);
+}
+
+static inline void dma_sync_single_range(struct device *dev,
+					 dma_addr_t dma_handle,
+					 unsigned long offset, size_t size,
+					 enum dma_data_direction dir)
+{
+#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT)
+	if (dev->bus == &pci_bus_type)
+		return;
+#endif
+	dma_cache_sync(bus_to_virt(dma_handle) + offset, size, dir);
+}
+
+static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
+			       int nelems, enum dma_data_direction dir)
+{
+	int i;
+
+	for (i = 0; i < nelems; i++) {
+#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
+		dma_cache_sync(page_address(sg[i].page) + sg[i].offset,
+			       sg[i].length, dir);
+#endif
+		sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
+	}
+}
+
+static inline void dma_sync_single_for_cpu(struct device *dev,
+					   dma_addr_t dma_handle, size_t size,
+					   enum dma_data_direction dir)
+	__attribute__ ((alias("dma_sync_single")));
+
+static inline void dma_sync_single_for_device(struct device *dev,
+					   dma_addr_t dma_handle, size_t size,
+					   enum dma_data_direction dir)
+	__attribute__ ((alias("dma_sync_single")));
+
+static inline void dma_sync_sg_for_cpu(struct device *dev,
+				       struct scatterlist *sg, int nelems,
+				       enum dma_data_direction dir)
+	__attribute__ ((alias("dma_sync_sg")));
+
+static inline void dma_sync_sg_for_device(struct device *dev,
+				       struct scatterlist *sg, int nelems,
+				       enum dma_data_direction dir)
+	__attribute__ ((alias("dma_sync_sg")));
+
+static inline int dma_get_cache_alignment(void)
+{
+	/*
+	 * Each processor family will define its own L1_CACHE_SHIFT,
+	 * L1_CACHE_BYTES wraps to this, so this is always safe.
+	 */
+	return L1_CACHE_BYTES;
+}
+
+static inline int dma_mapping_error(dma_addr_t dma_addr)
+{
+	return dma_addr == 0;
+}
+
+#endif /* __ASM_SH_DMA_MAPPING_H */
+
--- diff/include/asm-sh64/dma.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/dma.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,41 @@
+#ifndef __ASM_SH64_DMA_H
+#define __ASM_SH64_DMA_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/dma.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+
+#include <linux/mm.h>
+#include <asm/io.h>
+#include <asm/pgtable.h>
+
+#define MAX_DMA_CHANNELS	4
+
+/*
+ * SH5 can DMA in any memory area.
+ *
+ * The static definition is dodgy because it should limit
+ * the highest DMA-able address based on the actual
+ * Physical memory available. This is actually performed
+ * at run time in defining the memory allowed to DMA_ZONE.
+ */
+#define MAX_DMA_ADDRESS		~(NPHYS_MASK)
+
+#define DMA_MODE_READ		0
+#define DMA_MODE_WRITE		1
+
+#ifdef CONFIG_PCI
+extern int isa_dma_bridge_buggy;
+#else
+#define isa_dma_bridge_buggy 	(0)
+#endif
+
+#endif /* __ASM_SH64_DMA_H */
--- diff/include/asm-sh64/elf.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/elf.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,101 @@
+#ifndef __ASM_SH64_ELF_H
+#define __ASM_SH64_ELF_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/elf.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+/*
+ * ELF register definitions..
+ */
+
+#include <asm/ptrace.h>
+#include <asm/user.h>
+#include <asm/byteorder.h>
+
+typedef unsigned long elf_greg_t;
+
+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef struct user_fpu_struct elf_fpregset_t;
+
+/*
+ * This is used to ensure we don't load something for the wrong architecture.
+ */
+#define elf_check_arch(x) ( (x)->e_machine == EM_SH )
+
+/*
+ * These are used to set parameters in the core dumps.
+ */
+#define ELF_CLASS	ELFCLASS32
+#ifdef __LITTLE_ENDIAN__
+#define ELF_DATA	ELFDATA2LSB
+#else
+#define ELF_DATA	ELFDATA2MSB
+#endif
+#define ELF_ARCH	EM_SH
+
+#define USE_ELF_CORE_DUMP
+#define ELF_EXEC_PAGESIZE	4096
+
+/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
+   use of this is to invoke "./ld.so someprog" to test out a new version of
+   the loader.  We need to make sure that it is out of the way of the program
+   that it will "exec", and that there is sufficient room for the brk.  */
+
+#define ELF_ET_DYN_BASE         (2 * TASK_SIZE / 3)
+
+
+#define ELF_CORE_COPY_REGS(_dest,_regs)				\
+	memcpy((char *) &_dest, (char *) _regs,			\
+	       sizeof(struct pt_regs));
+
+/* This yields a mask that user programs can use to figure out what
+   instruction set this CPU supports.  This could be done in user space,
+   but it's not easy, and we've already done it here.  */
+
+#define ELF_HWCAP	(0)
+
+/* This yields a string that ld.so will use to load implementation
+   specific libraries for optimization.  This is more specific in
+   intent than poking at uname or /proc/cpuinfo.
+
+   For the moment, we have only optimizations for the Intel generations,
+   but that could change... */
+
+#define ELF_PLATFORM  (NULL)
+
+#define ELF_PLAT_INIT(_r, load_addr) \
+  do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \
+       _r->regs[4]=0; _r->regs[5]=0; _r->regs[6]=0; _r->regs[7]=0; \
+       _r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; \
+       _r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; _r->regs[15]=0; \
+       _r->regs[16]=0; _r->regs[17]=0; _r->regs[18]=0; _r->regs[19]=0; \
+       _r->regs[20]=0; _r->regs[21]=0; _r->regs[22]=0; _r->regs[23]=0; \
+       _r->regs[24]=0; _r->regs[25]=0; _r->regs[26]=0; _r->regs[27]=0; \
+       _r->regs[28]=0; _r->regs[29]=0; _r->regs[30]=0; _r->regs[31]=0; \
+       _r->regs[32]=0; _r->regs[33]=0; _r->regs[34]=0; _r->regs[35]=0; \
+       _r->regs[36]=0; _r->regs[37]=0; _r->regs[38]=0; _r->regs[39]=0; \
+       _r->regs[40]=0; _r->regs[41]=0; _r->regs[42]=0; _r->regs[43]=0; \
+       _r->regs[44]=0; _r->regs[45]=0; _r->regs[46]=0; _r->regs[47]=0; \
+       _r->regs[48]=0; _r->regs[49]=0; _r->regs[50]=0; _r->regs[51]=0; \
+       _r->regs[52]=0; _r->regs[53]=0; _r->regs[54]=0; _r->regs[55]=0; \
+       _r->regs[56]=0; _r->regs[57]=0; _r->regs[58]=0; _r->regs[59]=0; \
+       _r->regs[60]=0; _r->regs[61]=0; _r->regs[62]=0; \
+       _r->tregs[0]=0; _r->tregs[1]=0; _r->tregs[2]=0; _r->tregs[3]=0; \
+       _r->tregs[4]=0; _r->tregs[5]=0; _r->tregs[6]=0; _r->tregs[7]=0; \
+       _r->sr = SR_FD | SR_MMU; } while (0)
+
+#ifdef __KERNEL__
+#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT)
+#endif
+
+#endif /* __ASM_SH64_ELF_H */
--- diff/include/asm-sh64/errno.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/errno.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_ERRNO_H
+#define __ASM_SH64_ERRNO_H
+
+#include <asm-generic/errno.h>
+
+#endif /* __ASM_SH64_ERRNO_H */
--- diff/include/asm-sh64/fcntl.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/fcntl.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,7 @@
+#ifndef __ASM_SH64_FCNTL_H
+#define __ASM_SH64_FCNTL_H
+
+#include <asm-sh/fcntl.h>
+
+#endif /* __ASM_SH64_FCNTL_H */
+
--- diff/include/asm-sh64/hardirq.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/hardirq.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,7 @@
+#ifndef __ASM_SH64_HARDIRQ_H
+#define __ASM_SH64_HARDIRQ_H
+
+#include <asm-sh/hardirq.h>
+
+#endif /* __ASM_SH64_HARDIRQ_H */
+
--- diff/include/asm-sh64/hardware.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/hardware.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,45 @@
+#ifndef __ASM_SH64_HARDWARE_H
+#define __ASM_SH64_HARDWARE_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/hardware.h
+ *
+ * Copyright (C) 2002 Stuart Menefy
+ * Copyright (C) 2003 Paul Mundt
+ *
+ * Defitions of the locations of registers in the physical address space.
+ */
+
+#define	PHYS_PERIPHERAL_BLOCK	0x09000000
+#define PHYS_DMAC_BLOCK		0x0e000000
+#define PHYS_PCI_BLOCK		0x60000000
+
+#ifndef __ASSEMBLY__
+#include <linux/types.h>
+#include <asm/io.h>
+
+struct vcr_info {
+	u8	perr_flags;	/* P-port Error flags */
+	u8	merr_flags;	/* Module Error flags */
+	u16	mod_vers;	/* Module Version */
+	u16	mod_id;		/* Module ID */
+	u8	bot_mb;		/* Bottom Memory block */
+	u8	top_mb;		/* Top Memory block */
+};
+
+static inline struct vcr_info sh64_get_vcr_info(unsigned long base)
+{
+	unsigned long long tmp;
+
+	tmp = sh64_in64(base);
+
+	return *((struct vcr_info *)&tmp);
+}
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __ASM_SH64_HARDWARE_H */
--- diff/include/asm-sh64/hdreg.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/hdreg.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_HDREG_H
+#define __ASM_SH64_HDREG_H
+
+#include <asm-generic/hdreg.h>
+
+#endif /* __ASM_SH64_HDREG_H */
--- diff/include/asm-sh64/hw_irq.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/hw_irq.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,16 @@
+#ifndef __ASM_SH64_HW_IRQ_H
+#define __ASM_SH64_HW_IRQ_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/hw_irq.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+static __inline__ void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { /* Nothing to do */ }
+
+#endif /* __ASM_SH64_HW_IRQ_H */
--- diff/include/asm-sh64/ide.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/ide.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,30 @@
+/*
+ *  linux/include/asm-sh64/ide.h
+ *
+ *  Copyright (C) 1994-1996  Linus Torvalds & authors
+ *
+ *  sh64 version by Richard Curnow & Paul Mundt
+ */
+
+/*
+ *  This file contains the sh64 architecture specific IDE code.
+ */
+
+#ifndef __ASM_SH64_IDE_H
+#define __ASM_SH64_IDE_H
+
+#ifdef __KERNEL__
+
+#include <linux/config.h>
+
+#ifndef MAX_HWIFS
+#define MAX_HWIFS	CONFIG_IDE_MAX_HWIFS
+#endif
+
+#define ide_default_io_ctl(base)	(0)
+
+#include <asm-generic/ide_iops.h>
+
+#endif /* __KERNEL__ */
+
+#endif /* __ASM_SH64_IDE_H */
--- diff/include/asm-sh64/io.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/io.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,217 @@
+#ifndef __ASM_SH64_IO_H
+#define __ASM_SH64_IO_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/io.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+
+/*
+ * Convention:
+ *    read{b,w,l}/write{b,w,l} are for PCI,
+ *    while in{b,w,l}/out{b,w,l} are for ISA
+ * These may (will) be platform specific function.
+ *
+ * In addition, we have
+ *   ctrl_in{b,w,l}/ctrl_out{b,w,l} for SuperH specific I/O.
+ * which are processor specific. Address should be the result of
+ * onchip_remap();
+ */
+
+#include <asm/cache.h>
+#include <asm/system.h>
+#include <asm/page.h>
+
+#define virt_to_bus virt_to_phys
+#define bus_to_virt phys_to_virt
+#define page_to_bus page_to_phys
+
+/*
+ * Nothing overly special here.. instead of doing the same thing
+ * over and over again, we just define a set of sh64_in/out functions
+ * with an implicit size. The traditional read{b,w,l}/write{b,w,l}
+ * mess is wrapped to this, as are the SH-specific ctrl_in/out routines.
+ */
+static inline unsigned char sh64_in8(unsigned long addr)
+{
+	return *(volatile unsigned char *)addr;
+}
+
+static inline unsigned short sh64_in16(unsigned long addr)
+{
+	return *(volatile unsigned short *)addr;
+}
+
+static inline unsigned long sh64_in32(unsigned long addr)
+{
+	return *(volatile unsigned long *)addr;
+}
+
+static inline unsigned long long sh64_in64(unsigned long addr)
+{
+	return *(volatile unsigned long long *)addr;
+}
+
+static inline void sh64_out8(unsigned char b, unsigned long addr)
+{
+	*(volatile unsigned char *)addr = b;
+	wmb();
+}
+
+static inline void sh64_out16(unsigned short b, unsigned long addr)
+{
+	*(volatile unsigned short *)addr = b;
+	wmb();
+}
+
+static inline void sh64_out32(unsigned long b, unsigned long addr)
+{
+	*(volatile unsigned long *)addr = b;
+	wmb();
+}
+
+static inline void sh64_out64(unsigned long long b, unsigned long addr)
+{
+	*(volatile unsigned long long *)addr = b;
+	wmb();
+}
+
+#define readb(addr)		sh64_in8(addr)
+#define readw(addr)		sh64_in16(addr)
+#define readl(addr)		sh64_in32(addr)
+
+#define writeb(b, addr)		sh64_out8(b, addr)
+#define writew(b, addr)		sh64_out16(b, addr)
+#define writel(b, addr)		sh64_out32(b, addr)
+
+#define ctrl_inb(addr)		sh64_in8(addr)
+#define ctrl_inw(addr)		sh64_in16(addr)
+#define ctrl_inl(addr)		sh64_in32(addr)
+
+#define ctrl_outb(b, addr)	sh64_out8(b, addr)
+#define ctrl_outw(b, addr)	sh64_out16(b, addr)
+#define ctrl_outl(b, addr)	sh64_out32(b, addr)
+
+unsigned long inb(unsigned long port);
+unsigned long inw(unsigned long port);
+unsigned long inl(unsigned long port);
+void outb(unsigned long value, unsigned long port);
+void outw(unsigned long value, unsigned long port);
+void outl(unsigned long value, unsigned long port);
+
+#ifdef __KERNEL__
+
+#ifdef CONFIG_SH_CAYMAN
+extern unsigned long smsc_superio_virt;
+#endif
+#ifdef CONFIG_PCI
+extern unsigned long pciio_virt;
+#endif
+
+#define IO_SPACE_LIMIT 0xffffffff
+
+/*
+ * Change virtual addresses to physical addresses and vv.
+ * These are trivial on the 1:1 Linux/SuperH mapping
+ */
+extern __inline__ unsigned long virt_to_phys(volatile void * address)
+{
+	return __pa(address);
+}
+
+extern __inline__ void * phys_to_virt(unsigned long address)
+{
+	return __va(address);
+}
+
+extern void * __ioremap(unsigned long phys_addr, unsigned long size,
+			unsigned long flags);
+
+extern __inline__ void * ioremap(unsigned long phys_addr, unsigned long size)
+{
+	return __ioremap(phys_addr, size, 1);
+}
+
+extern __inline__ void * ioremap_nocache (unsigned long phys_addr, unsigned long size)
+{
+	return __ioremap(phys_addr, size, 0);
+}
+
+extern void iounmap(void *addr);
+
+unsigned long onchip_remap(unsigned long addr, unsigned long size, const char* name);
+extern void onchip_unmap(unsigned long vaddr);
+
+static __inline__ int check_signature(unsigned long io_addr,
+			const unsigned char *signature, int length)
+{
+	int retval = 0;
+	do {
+		if (readb(io_addr) != *signature)
+			goto out;
+		io_addr++;
+		signature++;
+		length--;
+	} while (length);
+	retval = 1;
+out:
+	return retval;
+}
+
+/*
+ * The caches on some architectures aren't dma-coherent and have need to
+ * handle this in software.  There are three types of operations that
+ * can be applied to dma buffers.
+ *
+ *  - dma_cache_wback_inv(start, size) makes caches and RAM coherent by
+ *    writing the content of the caches back to memory, if necessary.
+ *    The function also invalidates the affected part of the caches as
+ *    necessary before DMA transfers from outside to memory.
+ *  - dma_cache_inv(start, size) invalidates the affected parts of the
+ *    caches.  Dirty lines of the caches may be written back or simply
+ *    be discarded.  This operation is necessary before dma operations
+ *    to the memory.
+ *  - dma_cache_wback(start, size) writes back any dirty lines but does
+ *    not invalidate the cache.  This can be used before DMA reads from
+ *    memory,
+ */
+
+static __inline__ void dma_cache_wback_inv (unsigned long start, unsigned long size)
+{
+	unsigned long s = start & L1_CACHE_ALIGN_MASK;
+	unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK;
+
+	for (; s <= e; s += L1_CACHE_BYTES)
+		asm volatile ("ocbp	%0, 0" : : "r" (s));
+}
+
+static __inline__ void dma_cache_inv (unsigned long start, unsigned long size)
+{
+	// Note that caller has to be careful with overzealous
+	// invalidation should there be partial cache lines at the extremities
+	// of the specified range
+	unsigned long s = start & L1_CACHE_ALIGN_MASK;
+	unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK;
+
+	for (; s <= e; s += L1_CACHE_BYTES)
+		asm volatile ("ocbi	%0, 0" : : "r" (s));
+}
+
+static __inline__ void dma_cache_wback (unsigned long start, unsigned long size)
+{
+	unsigned long s = start & L1_CACHE_ALIGN_MASK;
+	unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK;
+
+	for (; s <= e; s += L1_CACHE_BYTES)
+		asm volatile ("ocbwb	%0, 0" : : "r" (s));
+}
+
+#endif /* __KERNEL__ */
+#endif /* __ASM_SH64_IO_H */
--- diff/include/asm-sh64/ioctl.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/ioctl.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,83 @@
+#ifndef __ASM_SH64_IOCTL_H
+#define __ASM_SH64_IOCTL_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/ioctl.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * linux/ioctl.h for Linux by H.H. Bergman.
+ *
+ */
+
+/* ioctl command encoding: 32 bits total, command in lower 16 bits,
+ * size of the parameter structure in the lower 14 bits of the
+ * upper 16 bits.
+ * Encoding the size of the parameter structure in the ioctl request
+ * is useful for catching programs compiled with old versions
+ * and to avoid overwriting user space outside the user buffer area.
+ * The highest 2 bits are reserved for indicating the ``access mode''.
+ * NOTE: This limits the max parameter size to 16kB -1 !
+ */
+
+/*
+ * The following is for compatibility across the various Linux
+ * platforms.  The i386 ioctl numbering scheme doesn't really enforce
+ * a type field.  De facto, however, the top 8 bits of the lower 16
+ * bits are indeed used as a type field, so we might just as well make
+ * this explicit here.  Please be sure to use the decoding macros
+ * below from now on.
+ */
+#define _IOC_NRBITS	8
+#define _IOC_TYPEBITS	8
+#define _IOC_SIZEBITS	14
+#define _IOC_DIRBITS	2
+
+#define _IOC_NRMASK	((1 << _IOC_NRBITS)-1)
+#define _IOC_TYPEMASK	((1 << _IOC_TYPEBITS)-1)
+#define _IOC_SIZEMASK	((1 << _IOC_SIZEBITS)-1)
+#define _IOC_DIRMASK	((1 << _IOC_DIRBITS)-1)
+
+#define _IOC_NRSHIFT	0
+#define _IOC_TYPESHIFT	(_IOC_NRSHIFT+_IOC_NRBITS)
+#define _IOC_SIZESHIFT	(_IOC_TYPESHIFT+_IOC_TYPEBITS)
+#define _IOC_DIRSHIFT	(_IOC_SIZESHIFT+_IOC_SIZEBITS)
+
+/*
+ * Direction bits.
+ */
+#define _IOC_NONE	0U
+#define _IOC_WRITE	1U
+#define _IOC_READ	2U
+
+#define _IOC(dir,type,nr,size) \
+	(((dir)  << _IOC_DIRSHIFT) | \
+	 ((type) << _IOC_TYPESHIFT) | \
+	 ((nr)   << _IOC_NRSHIFT) | \
+	 ((size) << _IOC_SIZESHIFT))
+
+/* used to create numbers */
+#define _IO(type,nr)		_IOC(_IOC_NONE,(type),(nr),0)
+#define _IOR(type,nr,size)	_IOC(_IOC_READ,(type),(nr),sizeof(size))
+#define _IOW(type,nr,size)	_IOC(_IOC_WRITE,(type),(nr),sizeof(size))
+#define _IOWR(type,nr,size)	_IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
+
+/* used to decode ioctl numbers.. */
+#define _IOC_DIR(nr)		(((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
+#define _IOC_TYPE(nr)		(((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
+#define _IOC_NR(nr)		(((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
+#define _IOC_SIZE(nr)		(((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
+
+/* ...and for the drivers/sound files... */
+
+#define IOC_IN		(_IOC_WRITE << _IOC_DIRSHIFT)
+#define IOC_OUT		(_IOC_READ << _IOC_DIRSHIFT)
+#define IOC_INOUT	((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
+#define IOCSIZE_MASK	(_IOC_SIZEMASK << _IOC_SIZESHIFT)
+#define IOCSIZE_SHIFT	(_IOC_SIZESHIFT)
+
+#endif /* __ASM_SH64_IOCTL_H */
--- diff/include/asm-sh64/ioctls.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/ioctls.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,111 @@
+#ifndef __ASM_SH64_IOCTLS_H
+#define __ASM_SH64_IOCTLS_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/ioctls.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <asm/ioctl.h>
+
+#define FIOCLEX		_IO('f', 1)
+#define FIONCLEX	_IO('f', 2)
+#define FIOASYNC	_IOW('f', 125, int)
+#define FIONBIO		_IOW('f', 126, int)
+#define FIONREAD	_IOR('f', 127, int)
+#define TIOCINQ		FIONREAD
+#define FIOQSIZE	_IOR('f', 128, loff_t)
+
+#define TCGETS		0x5401
+#define TCSETS		0x5402
+#define TCSETSW		0x5403
+#define TCSETSF		0x5404
+
+#define TCGETA		_IOR('t', 23, struct termio)
+#define TCSETA		_IOW('t', 24, struct termio)
+#define TCSETAW		_IOW('t', 25, struct termio)
+#define TCSETAF		_IOW('t', 28, struct termio)
+
+#define TCSBRK		_IO('t', 29)
+#define TCXONC		_IO('t', 30)
+#define TCFLSH		_IO('t', 31)
+
+#define TIOCSWINSZ	_IOW('t', 103, struct winsize)
+#define TIOCGWINSZ	_IOR('t', 104, struct winsize)
+#define	TIOCSTART	_IO('t', 110)		/* start output, like ^Q */
+#define	TIOCSTOP	_IO('t', 111)		/* stop output, like ^S */
+#define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
+
+#define TIOCSPGRP	_IOW('t', 118, int)
+#define TIOCGPGRP	_IOR('t', 119, int)
+
+#define TIOCEXCL	_IO('T', 12) /* 0x540C */
+#define TIOCNXCL	_IO('T', 13) /* 0x540D */
+#define TIOCSCTTY	_IO('T', 14) /* 0x540E */
+
+#define TIOCSTI		_IOW('T', 18, char) /* 0x5412 */
+#define TIOCMGET	_IOR('T', 21, unsigned int) /* 0x5415 */
+#define TIOCMBIS	_IOW('T', 22, unsigned int) /* 0x5416 */
+#define TIOCMBIC	_IOW('T', 23, unsigned int) /* 0x5417 */
+#define TIOCMSET	_IOW('T', 24, unsigned int) /* 0x5418 */
+# define TIOCM_LE	0x001
+# define TIOCM_DTR	0x002
+# define TIOCM_RTS	0x004
+# define TIOCM_ST	0x008
+# define TIOCM_SR	0x010
+# define TIOCM_CTS	0x020
+# define TIOCM_CAR	0x040
+# define TIOCM_RNG	0x080
+# define TIOCM_DSR	0x100
+# define TIOCM_CD	TIOCM_CAR
+# define TIOCM_RI	TIOCM_RNG
+
+#define TIOCGSOFTCAR	_IOR('T', 25, unsigned int) /* 0x5419 */
+#define TIOCSSOFTCAR	_IOW('T', 26, unsigned int) /* 0x541A */
+#define TIOCLINUX	_IOW('T', 28, char) /* 0x541C */
+#define TIOCCONS	_IO('T', 29) /* 0x541D */
+#define TIOCGSERIAL	_IOR('T', 30, struct serial_struct) /* 0x541E */
+#define TIOCSSERIAL	_IOW('T', 31, struct serial_struct) /* 0x541F */
+#define TIOCPKT		_IOW('T', 32, int) /* 0x5420 */
+# define TIOCPKT_DATA		 0
+# define TIOCPKT_FLUSHREAD	 1
+# define TIOCPKT_FLUSHWRITE	 2
+# define TIOCPKT_STOP		 4
+# define TIOCPKT_START		 8
+# define TIOCPKT_NOSTOP		16
+# define TIOCPKT_DOSTOP		32
+
+
+#define TIOCNOTTY	_IO('T', 34) /* 0x5422 */
+#define TIOCSETD	_IOW('T', 35, int) /* 0x5423 */
+#define TIOCGETD	_IOR('T', 36, int) /* 0x5424 */
+#define TCSBRKP		_IOW('T', 37, int) /* 0x5425 */	/* Needed for POSIX tcsendbreak() */
+#define TIOCTTYGSTRUCT	_IOR('T', 38, struct tty_struct) /* 0x5426 */ /* For debugging only */
+#define TIOCSBRK	_IO('T', 39) /* 0x5427 */ /* BSD compatibility */
+#define TIOCCBRK	_IO('T', 40) /* 0x5428 */ /* BSD compatibility */
+#define TIOCGSID	_IOR('T', 41, pid_t) /* 0x5429 */ /* Return the session ID of FD */
+#define TIOCGPTN	_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+#define TIOCSPTLCK	_IOW('T',0x31, int)  /* Lock/unlock Pty */
+
+#define TIOCSERCONFIG	_IO('T', 83) /* 0x5453 */
+#define TIOCSERGWILD	_IOR('T', 84,  int) /* 0x5454 */
+#define TIOCSERSWILD	_IOW('T', 85,  int) /* 0x5455 */
+#define TIOCGLCKTRMIOS	0x5456
+#define TIOCSLCKTRMIOS	0x5457
+#define TIOCSERGSTRUCT	_IOR('T', 88, struct async_struct) /* 0x5458 */ /* For debugging only */
+#define TIOCSERGETLSR   _IOR('T', 89, unsigned int) /* 0x5459 */ /* Get line status register */
+  /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+# define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
+#define TIOCSERGETMULTI _IOR('T', 90, struct serial_multiport_struct) /* 0x545A */ /* Get multiport config  */
+#define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* 0x545B */ /* Set multiport config */
+
+#define TIOCMIWAIT	_IO('T', 92) /* 0x545C */	/* wait for a change on serial input line(s) */
+#define TIOCGICOUNT	_IOR('T', 93, struct async_icount) /* 0x545D */	/* read serial port inline interrupt counts */
+
+#endif /* __ASM_SH64_IOCTLS_H */
--- diff/include/asm-sh64/ipc.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/ipc.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_IPC_H
+#define __ASM_SH64_IPC_H
+
+#include <asm-sh/ipc.h>
+
+#endif /* __ASM_SH64_IPC_H */
--- diff/include/asm-sh64/ipcbuf.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/ipcbuf.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,40 @@
+#ifndef __ASM_SH64_IPCBUF_H__
+#define __ASM_SH64_IPCBUF_H__
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/ipcbuf.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+/*
+ * The ipc64_perm structure for i386 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode_t and seq
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct ipc64_perm
+{
+	__kernel_key_t		key;
+	__kernel_uid32_t	uid;
+	__kernel_gid32_t	gid;
+	__kernel_uid32_t	cuid;
+	__kernel_gid32_t	cgid;
+	__kernel_mode_t		mode;
+	unsigned short		__pad1;
+	unsigned short		seq;
+	unsigned short		__pad2;
+	unsigned long		__unused1;
+	unsigned long		__unused2;
+};
+
+#endif /* __ASM_SH64_IPCBUF_H__ */
--- diff/include/asm-sh64/irq.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/irq.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,148 @@
+#ifndef __ASM_SH64_IRQ_H
+#define __ASM_SH64_IRQ_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/irq.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <linux/config.h>
+
+/*
+ * Encoded IRQs are not considered worth to be supported.
+ * Main reason is that there's no per-encoded-interrupt
+ * enable/disable mechanism (as there was in SH3/4).
+ * An all enabled/all disabled is worth only if there's
+ * a cascaded IC to disable/enable/ack on. Until such
+ * IC is available there's no such support.
+ *
+ * Presumably Encoded IRQs may use extra IRQs beyond 64,
+ * below. Some logic must be added to cope with IRQ_IRL?
+ * in an exclusive way.
+ *
+ * Priorities are set at Platform level, when IRQ_IRL0-3
+ * are set to 0 Encoding is allowed. Otherwise it's not
+ * allowed.
+ */
+
+/* Independent IRQs */
+#define IRQ_IRL0	0
+#define IRQ_IRL1	1
+#define IRQ_IRL2	2
+#define IRQ_IRL3	3
+
+#define IRQ_INTA	4
+#define IRQ_INTB	5
+#define IRQ_INTC	6
+#define IRQ_INTD	7
+
+#define IRQ_SERR	12
+#define IRQ_ERR		13
+#define IRQ_PWR3	14
+#define IRQ_PWR2	15
+#define IRQ_PWR1	16
+#define IRQ_PWR0	17
+
+#define IRQ_DMTE0	18
+#define IRQ_DMTE1	19
+#define IRQ_DMTE2	20
+#define IRQ_DMTE3	21
+#define IRQ_DAERR	22
+
+#define IRQ_TUNI0	32
+#define IRQ_TUNI1	33
+#define IRQ_TUNI2	34
+#define IRQ_TICPI2	35
+
+#define IRQ_ATI		36
+#define IRQ_PRI		37
+#define IRQ_CUI		38
+
+#define IRQ_ERI		39
+#define IRQ_RXI		40
+#define IRQ_BRI		41
+#define IRQ_TXI		42
+
+#define IRQ_ITI		63
+
+#define NR_INTC_IRQS	64
+
+#ifdef CONFIG_SH_CAYMAN
+#define NR_EXT_IRQS     32
+#define START_EXT_IRQS  64
+
+/* PCI bus 2 uses encoded external interrupts on the Cayman board */
+#define IRQ_P2INTA      (START_EXT_IRQS + (3*8) + 0)
+#define IRQ_P2INTB      (START_EXT_IRQS + (3*8) + 1)
+#define IRQ_P2INTC      (START_EXT_IRQS + (3*8) + 2)
+#define IRQ_P2INTD      (START_EXT_IRQS + (3*8) + 3)
+
+#define START_EXT_IRQS  64
+
+#define I8042_KBD_IRQ	(START_EXT_IRQS + 2)
+#define I8042_AUX_IRQ	(START_EXT_IRQS + 6)
+
+#else
+#define NR_EXT_IRQS	0
+#endif
+
+#define NR_IRQS		(NR_INTC_IRQS+NR_EXT_IRQS)
+
+
+/* Default IRQs, fixed */
+#define TIMER_IRQ	IRQ_TUNI0
+#define RTC_IRQ		IRQ_CUI
+
+/* Default Priorities, Platform may choose differently */
+#define	NO_PRIORITY	0	/* Disabled */
+#define TIMER_PRIORITY	2
+#define RTC_PRIORITY	TIMER_PRIORITY
+#define SCIF_PRIORITY	3
+#define INTD_PRIORITY	3
+#define	IRL3_PRIORITY	4
+#define INTC_PRIORITY	6
+#define	IRL2_PRIORITY	7
+#define INTB_PRIORITY	9
+#define	IRL1_PRIORITY	10
+#define INTA_PRIORITY	12
+#define	IRL0_PRIORITY	13
+#define TOP_PRIORITY	15
+
+extern void disable_irq(unsigned int);
+extern void disable_irq_nosync(unsigned int);
+extern void enable_irq(unsigned int);
+
+extern int intc_evt_to_irq[(0xE20/0x20)+1];
+int intc_irq_describe(char* p, int irq);
+
+#define irq_canonicalize(irq)	(irq)
+
+#ifdef CONFIG_SH_CAYMAN
+int cayman_irq_demux(int evt);
+int cayman_irq_describe(char* p, int irq);
+#define irq_demux(x) cayman_irq_demux(x)
+#define irq_describe(p, x) cayman_irq_describe(p, x)
+#else
+#define irq_demux(x) (intc_evt_to_irq[x])
+#define irq_describe(p, x) intc_irq_describe(p, x)
+#endif
+
+/*
+ * Function for "on chip support modules".
+ */
+
+/*
+ * SH-5 supports Priority based interrupts only.
+ * Interrupt priorities are defined at platform level.
+ */
+#define set_ipr_data(a, b, c, d)
+#define make_ipr_irq(a)
+#define make_imask_irq(a)
+
+#endif /* __ASM_SH64_IRQ_H */
--- diff/include/asm-sh64/keyboard.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/keyboard.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,74 @@
+/*
+ *  linux/include/asm-shmedia/keyboard.h
+ *
+ * Copied from i386 version:
+ *    Created 3 Nov 1996 by Geert Uytterhoeven
+ */
+
+/*
+ *  This file contains the i386 architecture specific keyboard definitions
+ */
+
+#ifndef __ASM_SH64_KEYBOARD_H
+#define __ASM_SH64_KEYBOARD_H
+
+#ifdef __KERNEL__
+
+#include <linux/kernel.h>
+#include <linux/ioport.h>
+#include <asm/io.h>
+
+#ifdef CONFIG_SH_CAYMAN
+#define KEYBOARD_IRQ			(START_EXT_IRQS + 2) /* SMSC SuperIO IRQ 1 */
+#endif
+#define DISABLE_KBD_DURING_INTERRUPTS	0
+
+extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
+extern int pckbd_getkeycode(unsigned int scancode);
+extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
+			   char raw_mode);
+extern char pckbd_unexpected_up(unsigned char keycode);
+extern void pckbd_leds(unsigned char leds);
+extern void pckbd_init_hw(void);
+extern unsigned char pckbd_sysrq_xlate[128];
+
+#define kbd_setkeycode		pckbd_setkeycode
+#define kbd_getkeycode		pckbd_getkeycode
+#define kbd_translate		pckbd_translate
+#define kbd_unexpected_up	pckbd_unexpected_up
+#define kbd_leds		pckbd_leds
+#define kbd_init_hw		pckbd_init_hw
+#define kbd_sysrq_xlate		pckbd_sysrq_xlate
+
+#define SYSRQ_KEY 0x54
+
+/* resource allocation */
+#define kbd_request_region()
+#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
+                                             "keyboard", NULL)
+
+/* How to access the keyboard macros on this platform.  */
+#define kbd_read_input() inb(KBD_DATA_REG)
+#define kbd_read_status() inb(KBD_STATUS_REG)
+#define kbd_write_output(val) outb(val, KBD_DATA_REG)
+#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
+
+/* Some stoneage hardware needs delays after some operations.  */
+#define kbd_pause() do { } while(0)
+
+/*
+ * Machine specific bits for the PS/2 driver
+ */
+
+#ifdef CONFIG_SH_CAYMAN
+#define AUX_IRQ (START_EXT_IRQS + 6) /* SMSC SuperIO IRQ12 */
+#endif
+
+#define aux_request_irq(hand, dev_id)					\
+	request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
+
+#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
+
+#endif /* __KERNEL__ */
+#endif /* __ASM_SH64_KEYBOARD_H */
+
--- diff/include/asm-sh64/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/kmap_types.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,7 @@
+#ifndef __ASM_SH64_KMAP_TYPES_H
+#define __ASM_SH64_KMAP_TYPES_H
+
+#include <asm-sh/kmap_types.h>
+
+#endif /* __ASM_SH64_KMAP_TYPES_H */
+
--- diff/include/asm-sh64/linkage.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/linkage.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,7 @@
+#ifndef __ASM_SH64_LINKAGE_H
+#define __ASM_SH64_LINKAGE_H
+
+#include <asm-sh/linkage.h>
+
+#endif /* __ASM_SH64_LINKAGE_H */
+
--- diff/include/asm-sh64/local.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/local.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,7 @@
+#ifndef __ASM_SH64_LOCAL_H
+#define __ASM_SH64_LOCAL_H
+
+#include <asm-generic/local.h>
+
+#endif /* __ASM_SH64_LOCAL_H */
+
--- diff/include/asm-sh64/mc146818rtc.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/mc146818rtc.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,7 @@
+/*
+ * linux/include/asm-sh64/mc146818rtc.h
+ *
+*/
+
+/* For now, an empty place-holder to get IDE to compile. */
+
--- diff/include/asm-sh64/mman.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/mman.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_MMAN_H
+#define __ASM_SH64_MMAN_H
+
+#include <asm-sh/mman.h>
+
+#endif /* __ASM_SH64_MMAN_H */
--- diff/include/asm-sh64/mmu.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/mmu.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,7 @@
+#ifndef __MMU_H
+#define __MMU_H
+
+/* Default "unsigned long" context */
+typedef unsigned long mm_context_t;
+
+#endif
--- diff/include/asm-sh64/mmu_context.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/mmu_context.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,209 @@
+#ifndef __ASM_SH64_MMU_CONTEXT_H
+#define __ASM_SH64_MMU_CONTEXT_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/mmu_context.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ * ASID handling idea taken from MIPS implementation.
+ *
+ */
+
+#ifndef __ASSEMBLY__
+
+/*
+ * Cache of MMU context last used.
+ *
+ * The MMU "context" consists of two things:
+ *   (a) TLB cache version (or cycle, top 24 bits of mmu_context_cache)
+ *   (b) ASID (Address Space IDentifier, bottom 8 bits of mmu_context_cache)
+ */
+extern unsigned long mmu_context_cache;
+
+#include <linux/config.h>
+#include <asm/page.h>
+
+
+/* Current mm's pgd */
+extern pgd_t *mmu_pdtp_cache;
+
+#define SR_ASID_MASK		0xffffffffff00ffffULL
+#define SR_ASID_SHIFT		16
+
+#define MMU_CONTEXT_ASID_MASK		0x000000ff
+#define MMU_CONTEXT_VERSION_MASK	0xffffff00
+#define MMU_CONTEXT_FIRST_VERSION	0x00000100
+#define NO_CONTEXT			0
+
+/* ASID is 8-bit value, so it can't be 0x100 */
+#define MMU_NO_ASID			0x100
+
+
+/*
+ * Virtual Page Number mask
+ */
+#define MMU_VPN_MASK	0xfffff000
+
+extern __inline__ void
+get_new_mmu_context(struct mm_struct *mm)
+{
+	extern void flush_tlb_all(void);
+	extern void flush_cache_all(void);
+
+	unsigned long mc = ++mmu_context_cache;
+
+	if (!(mc & MMU_CONTEXT_ASID_MASK)) {
+		/* We exhaust ASID of this version.
+		   Flush all TLB and start new cycle. */
+		flush_tlb_all();
+		/* We have to flush all caches as ASIDs are
+                   used in cache */
+		flush_cache_all();
+		/* Fix version if needed.
+		   Note that we avoid version #0/asid #0 to distingush NO_CONTEXT. */
+		if (!mc)
+			mmu_context_cache = mc = MMU_CONTEXT_FIRST_VERSION;
+	}
+	mm->context = mc;
+}
+
+/*
+ * Get MMU context if needed.
+ */
+static __inline__ void
+get_mmu_context(struct mm_struct *mm)
+{
+	if (mm) {
+		unsigned long mc = mmu_context_cache;
+		/* Check if we have old version of context.
+		   If it's old, we need to get new context with new version. */
+		if ((mm->context ^ mc) & MMU_CONTEXT_VERSION_MASK)
+			get_new_mmu_context(mm);
+	}
+}
+
+/*
+ * Initialize the context related info for a new mm_struct
+ * instance.
+ */
+static inline int init_new_context(struct task_struct *tsk,
+					struct mm_struct *mm)
+{
+	mm->context = NO_CONTEXT;
+
+	return 0;
+}
+
+/*
+ * Destroy context related info for an mm_struct that is about
+ * to be put to rest.
+ */
+static inline void destroy_context(struct mm_struct *mm)
+{
+	extern void flush_tlb_mm(struct mm_struct *mm);
+
+	/* Well, at least free TLB entries */
+	flush_tlb_mm(mm);
+}
+
+#endif	/* __ASSEMBLY__ */
+
+/* Common defines */
+#define TLB_STEP	0x00000010
+#define TLB_PTEH	0x00000000
+#define TLB_PTEL	0x00000008
+
+/* PTEH defines */
+#define PTEH_ASID_SHIFT	2
+#define PTEH_VALID	0x0000000000000001
+#define PTEH_SHARED	0x0000000000000002
+#define PTEH_MATCH_ASID	0x00000000000003ff
+
+#ifndef __ASSEMBLY__
+/* This has to be a common function because the next location to fill
+ * information is shared. */
+extern void __do_tlb_refill(unsigned long address, unsigned long long is_text_not_data, pte_t *pte);
+
+/* Profiling counter. */
+#ifdef CONFIG_SH64_PROC_TLB
+extern unsigned long long calls_to_do_fast_page_fault;
+#endif
+
+static inline unsigned long get_asid(void)
+{
+	unsigned long long sr;
+
+	asm volatile ("getcon   " __SR ", %0\n\t"
+		      : "=r" (sr));
+
+	sr = (sr >> SR_ASID_SHIFT) & MMU_CONTEXT_ASID_MASK;
+	return (unsigned long) sr;
+}
+
+/* Set ASID into SR */
+static inline void set_asid(unsigned long asid)
+{
+	unsigned long long sr, pc;
+
+	asm volatile ("getcon	" __SR ", %0" : "=r" (sr));
+
+	sr = (sr & SR_ASID_MASK) | (asid << SR_ASID_SHIFT);
+
+	/*
+	 * It is possible that this function may be inlined and so to avoid
+	 * the assembler reporting duplicate symbols we make use of the gas trick
+	 * of generating symbols using numerics and forward reference.
+	 */
+	asm volatile ("movi	1, %1\n\t"
+		      "shlli	%1, 28, %1\n\t"
+		      "or	%0, %1, %1\n\t"
+		      "putcon	%1, " __SR "\n\t"
+		      "putcon	%0, " __SSR "\n\t"
+		      "movi	1f, %1\n\t"
+		      "ori	%1, 1 , %1\n\t"
+		      "putcon	%1, " __SPC "\n\t"
+		      "rte\n"
+		      "1:\n\t"
+		      : "=r" (sr), "=r" (pc) : "0" (sr));
+}
+
+/*
+ * After we have set current->mm to a new value, this activates
+ * the context for the new mm so we see the new mappings.
+ */
+static __inline__ void activate_context(struct mm_struct *mm)
+{
+	get_mmu_context(mm);
+	set_asid(mm->context & MMU_CONTEXT_ASID_MASK);
+}
+
+
+static __inline__ void switch_mm(struct mm_struct *prev,
+				 struct mm_struct *next,
+				 struct task_struct *tsk)
+{
+	if (prev != next) {
+		mmu_pdtp_cache = next->pgd;
+		activate_context(next);
+	}
+}
+
+#define deactivate_mm(tsk,mm)	do { } while (0)
+
+#define activate_mm(prev, next) \
+	switch_mm((prev),(next),NULL)
+
+static inline void
+enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
+{
+}
+
+#endif	/* __ASSEMBLY__ */
+
+#endif /* __ASM_SH64_MMU_CONTEXT_H */
--- diff/include/asm-sh64/module.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/module.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,12 @@
+#ifndef __ASM_SH64_MODULE_H
+#define __ASM_SH64_MODULE_H
+/*
+ * This file contains the SH architecture specific module code.
+ */
+
+#define module_map(x)		vmalloc(x)
+#define module_unmap(x)		vfree(x)
+#define module_arch_init(x)	(0)
+#define arch_init_modules(x)	do { } while (0)
+
+#endif /* __ASM_SH64_MODULE_H */
--- diff/include/asm-sh64/msgbuf.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/msgbuf.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,42 @@
+#ifndef __ASM_SH64_MSGBUF_H
+#define __ASM_SH64_MSGBUF_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/msgbuf.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+/*
+ * The msqid64_ds structure for i386 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+	struct ipc64_perm msg_perm;
+	__kernel_time_t msg_stime;	/* last msgsnd time */
+	unsigned long	__unused1;
+	__kernel_time_t msg_rtime;	/* last msgrcv time */
+	unsigned long	__unused2;
+	__kernel_time_t msg_ctime;	/* last change time */
+	unsigned long	__unused3;
+	unsigned long  msg_cbytes;	/* current number of bytes on queue */
+	unsigned long  msg_qnum;	/* number of messages in queue */
+	unsigned long  msg_qbytes;	/* max number of bytes on queue */
+	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
+	__kernel_pid_t msg_lrpid;	/* last receive pid */
+	unsigned long  __unused4;
+	unsigned long  __unused5;
+};
+
+#endif /* __ASM_SH64_MSGBUF_H */
--- diff/include/asm-sh64/namei.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/namei.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,24 @@
+#ifndef __ASM_SH64_NAMEI_H
+#define __ASM_SH64_NAMEI_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/namei.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * Included from linux/fs/namei.c
+ *
+ */
+
+/* This dummy routine maybe changed to something useful
+ * for /usr/gnemul/ emulation stuff.
+ * Look at asm-sparc/namei.h for details.
+ */
+
+#define __emul_prefix() NULL
+
+#endif /* __ASM_SH64_NAMEI_H */
--- diff/include/asm-sh64/page.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/page.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,137 @@
+#ifndef __ASM_SH64_PAGE_H
+#define __ASM_SH64_PAGE_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/page.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ *
+ * benedict.gaster@superh.com 19th, 24th July 2002.
+ *
+ * Modified to take account of enabling for D-CACHE support.
+ *
+ */
+
+#include <linux/config.h>
+
+/* PAGE_SHIFT determines the page size */
+#define PAGE_SHIFT	12
+#ifdef __ASSEMBLY__
+#define PAGE_SIZE	4096
+#else
+#define PAGE_SIZE	(1UL << PAGE_SHIFT)
+#endif
+#define PAGE_MASK	(~(PAGE_SIZE-1))
+#define PTE_MASK	PAGE_MASK
+
+#if defined(CONFIG_HUGETLB_PAGE_SIZE_64K)
+#define HPAGE_SHIFT	16
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_1MB)
+#define HPAGE_SHIFT	20
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_512MB)
+#define HPAGE_SHIFT	29
+#endif
+
+#ifdef CONFIG_HUGETLB_PAGE
+#define HPAGE_SIZE		(1UL << HPAGE_SHIFT)
+#define HPAGE_MASK		(~(HPAGE_SIZE-1))
+#define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT-PAGE_SHIFT)
+#endif
+
+#ifdef __KERNEL__
+#ifndef __ASSEMBLY__
+
+extern struct page *mem_map;
+extern void sh64_page_clear(void *page);
+extern void sh64_page_copy(void *from, void *to);
+
+#define clear_page(page)               sh64_page_clear(page)
+#define copy_page(to,from)             sh64_page_copy(from, to)
+
+#if defined(CONFIG_DCACHE_DISABLED)
+
+#define clear_user_page(page, vaddr, pg)	clear_page(page)
+#define copy_user_page(to, from, vaddr, pg)	copy_page(to, from)
+
+#else
+
+extern void clear_user_page(void *to, unsigned long address, struct page *pg);
+extern void copy_user_page(void *to, void *from, unsigned long address, struct page *pg);
+
+#endif /* defined(CONFIG_DCACHE_DISABLED) */
+
+/*
+ * These are used to make use of C type-checking..
+ */
+typedef struct { unsigned long long pte; } pte_t;
+typedef struct { unsigned long pmd; } pmd_t;
+typedef struct { unsigned long pgd; } pgd_t;
+typedef struct { unsigned long pgprot; } pgprot_t;
+
+#define pte_val(x)	((x).pte)
+#define pmd_val(x)	((x).pmd)
+#define pgd_val(x)	((x).pgd)
+#define pgprot_val(x)	((x).pgprot)
+
+#define __pte(x) ((pte_t) { (x) } )
+#define __pmd(x) ((pmd_t) { (x) } )
+#define __pgd(x) ((pgd_t) { (x) } )
+#define __pgprot(x)	((pgprot_t) { (x) } )
+
+#endif /* !__ASSEMBLY__ */
+
+/* to align the pointer to the (next) page boundary */
+#define PAGE_ALIGN(addr)	(((addr)+PAGE_SIZE-1)&PAGE_MASK)
+
+/*
+ * Kconfig defined.
+ */
+#define __MEMORY_START		(CONFIG_MEMORY_START)
+#define PAGE_OFFSET		(CONFIG_CACHED_MEMORY_OFFSET)
+
+#define __pa(x)			((unsigned long)(x)-PAGE_OFFSET)
+#define __va(x)			((void *)((unsigned long)(x)+PAGE_OFFSET))
+#define MAP_NR(addr)		((__pa(addr)-__MEMORY_START) >> PAGE_SHIFT)
+#define VALID_PAGE(page)	((page - mem_map) < max_mapnr)
+
+#define phys_to_page(phys)	(mem_map + (((phys) - __MEMORY_START) >> PAGE_SHIFT))
+#define page_to_phys(page)	(((page - mem_map) << PAGE_SHIFT) + __MEMORY_START)
+
+/* PFN start number, because of __MEMORY_START */
+#define PFN_START		(__MEMORY_START >> PAGE_SHIFT)
+
+#define pfn_to_page(pfn)	(mem_map + (pfn) - PFN_START)
+#define page_to_pfn(page)	((unsigned long)((page) - mem_map) + PFN_START)
+#define virt_to_page(kaddr)	pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
+#define pfn_valid(pfn)		(((pfn) - PFN_START) < max_mapnr)
+#define virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
+
+#define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
+				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
+#ifndef __ASSEMBLY__
+
+/* Pure 2^n version of get_order */
+extern __inline__ int get_order(unsigned long size)
+{
+	int order;
+
+	size = (size-1) >> (PAGE_SHIFT-1);
+	order = -1;
+	do {
+		size >>= 1;
+		order++;
+	} while (size);
+	return order;
+}
+
+#endif
+
+#endif /* __KERNEL__ */
+
+#endif /* __ASM_SH64_PAGE_H */
--- diff/include/asm-sh64/param.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/param.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,43 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/param.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+#ifndef __ASM_SH64_PARAM_H
+#define __ASM_SH64_PARAM_H
+
+#include <linux/config.h>
+
+#ifdef __KERNEL__
+# ifdef CONFIG_SH_WDT
+#  define HZ		1000		/* Needed for high-res WOVF */
+# else
+#  define HZ		100
+# endif
+# define USER_HZ	100		/* User interfaces are in "ticks" */
+# define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
+#ifndef HZ
+#define HZ 100
+#endif
+
+#define EXEC_PAGESIZE	4096
+
+#ifndef NGROUPS
+#define NGROUPS		32
+#endif
+
+#ifndef NOGROUP
+#define NOGROUP		(-1)
+#endif
+
+#define MAXHOSTNAMELEN	64	/* max length of hostname */
+
+#endif /* __ASM_SH64_PARAM_H */
--- diff/include/asm-sh64/pci.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/pci.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,110 @@
+#ifndef __ASM_SH64_PCI_H
+#define __ASM_SH64_PCI_H
+
+#ifdef __KERNEL__
+
+#include <linux/dma-mapping.h>
+
+/* Can be used to override the logic in pci_scan_bus for skipping
+   already-configured bus numbers - to be used for buggy BIOSes
+   or architectures with incomplete PCI setup by the loader */
+
+#define pcibios_assign_all_busses()     1
+
+/*
+ * These are currently the correct values for the STM overdrive board
+ * We need some way of setting this on a board specific way, it will
+ * not be the same on other boards I think
+ */
+#if defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
+#define PCIBIOS_MIN_IO          0x2000
+#define PCIBIOS_MIN_MEM         0x40000000
+#endif
+
+extern void pcibios_set_master(struct pci_dev *dev);
+
+/*
+ * Set penalize isa irq function
+ */
+static inline void pcibios_penalize_isa_irq(int irq)
+{
+	/* We don't do dynamic PCI IRQ allocation */
+}
+
+/* Dynamic DMA mapping stuff.
+ * SuperH has everything mapped statically like x86.
+ */
+
+/* The PCI address space does equal the physical memory
+ * address space.  The networking and block device layers use
+ * this boolean for bounce buffer decisions.
+ */
+#define PCI_DMA_BUS_IS_PHYS	(1)
+
+#include <linux/types.h>
+#include <linux/slab.h>
+#include <asm/scatterlist.h>
+#include <linux/string.h>
+#include <asm/io.h>
+
+/* pci_unmap_{single,page} being a nop depends upon the
+ * configuration.
+ */
+#ifdef CONFIG_SH_PCIDMA_NONCOHERENT
+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)	\
+	dma_addr_t ADDR_NAME;
+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)		\
+	__u32 LEN_NAME;
+#define pci_unmap_addr(PTR, ADDR_NAME)			\
+	((PTR)->ADDR_NAME)
+#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)		\
+	(((PTR)->ADDR_NAME) = (VAL))
+#define pci_unmap_len(PTR, LEN_NAME)			\
+	((PTR)->LEN_NAME)
+#define pci_unmap_len_set(PTR, LEN_NAME, VAL)		\
+	(((PTR)->LEN_NAME) = (VAL))
+#else
+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
+#define pci_unmap_addr(PTR, ADDR_NAME)		(0)
+#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)	do { } while (0)
+#define pci_unmap_len(PTR, LEN_NAME)		(0)
+#define pci_unmap_len_set(PTR, LEN_NAME, VAL)	do { } while (0)
+#endif
+
+/* Not supporting more than 32-bit PCI bus addresses now, but
+ * must satisfy references to this function.  Change if needed.
+ */
+#define pci_dac_dma_supported(pci_dev, mask) (0)
+
+/* These macros should be used after a pci_map_sg call has been done
+ * to get bus addresses of each of the SG entries and their lengths.
+ * You should only work with the number of sg entries pci_map_sg
+ * returns, or alternatively stop on the first sg_dma_len(sg) which
+ * is 0.
+ */
+#define sg_dma_address(sg)	((sg)->dma_address)
+#define sg_dma_len(sg)		((sg)->length)
+
+/* Board-specific fixup routines. */
+extern void pcibios_fixup(void);
+extern void pcibios_fixup_irqs(void);
+
+#ifdef CONFIG_PCI_AUTO
+extern int pciauto_assign_resources(int busno, struct pci_channel *hose);
+#endif
+
+static inline void pcibios_add_platform_entries(struct pci_dev *dev)
+{
+}
+
+#endif /* __KERNEL__ */
+
+/* generic pci stuff */
+#include <asm-generic/pci.h>
+
+/* generic DMA-mapping stuff */
+#include <asm-generic/pci-dma-compat.h>
+
+#endif /* __ASM_SH64_PCI_H */
+
--- diff/include/asm-sh64/percpu.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/percpu.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_PERCPU
+#define __ASM_SH64_PERCPU
+
+#include <asm-generic/percpu.h>
+
+#endif /* __ASM_SH64_PERCPU */
--- diff/include/asm-sh64/pgalloc.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/pgalloc.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,202 @@
+#ifndef __ASM_SH64_PGALLOC_H
+#define __ASM_SH64_PGALLOC_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/pgalloc.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ * Copyright (C) 2003, 2004  Richard Curnow
+ *
+ */
+
+#include <asm/processor.h>
+#include <linux/threads.h>
+#include <linux/mm.h>
+
+#define pgd_quicklist (current_cpu_data.pgd_quick)
+#define pmd_quicklist (current_cpu_data.pmd_quick)
+#define pte_quicklist (current_cpu_data.pte_quick)
+#define pgtable_cache_size (current_cpu_data.pgtable_cache_sz)
+
+static inline void pgd_init(unsigned long page)
+{
+	unsigned long *pgd = (unsigned long *)page;
+	extern pte_t empty_bad_pte_table[PTRS_PER_PTE];
+	int i;
+
+	for (i = 0; i < USER_PTRS_PER_PGD; i++)
+		pgd[i] = (unsigned long)empty_bad_pte_table;
+}
+
+/*
+ * Allocate and free page tables. The xxx_kernel() versions are
+ * used to allocate a kernel page table - this turns on ASN bits
+ * if any.
+ */
+
+extern __inline__ pgd_t *get_pgd_slow(void)
+{
+	unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t));
+	pgd_t *ret = (pgd_t *)kmalloc(pgd_size, GFP_KERNEL);
+	return ret;
+}
+
+extern __inline__ pgd_t *get_pgd_fast(void)
+{
+	unsigned long *ret;
+
+	if ((ret = pgd_quicklist) != NULL) {
+		pgd_quicklist = (unsigned long *)(*ret);
+		ret[0] = 0;
+		pgtable_cache_size--;
+	} else
+		ret = (unsigned long *)get_pgd_slow();
+
+	if (ret) {
+		memset(ret, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
+	}
+	return (pgd_t *)ret;
+}
+
+extern __inline__ void free_pgd_fast(pgd_t *pgd)
+{
+	*(unsigned long *)pgd = (unsigned long) pgd_quicklist;
+	pgd_quicklist = (unsigned long *) pgd;
+	pgtable_cache_size++;
+}
+
+extern __inline__ void free_pgd_slow(pgd_t *pgd)
+{
+	kfree((void *)pgd);
+}
+
+extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted);
+extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted);
+
+extern __inline__ pte_t *get_pte_fast(void)
+{
+	unsigned long *ret;
+
+	if((ret = (unsigned long *)pte_quicklist) != NULL) {
+		pte_quicklist = (unsigned long *)(*ret);
+		ret[0] = ret[1];
+		pgtable_cache_size--;
+	}
+	return (pte_t *)ret;
+}
+
+extern __inline__ void free_pte_fast(pte_t *pte)
+{
+	*(unsigned long *)pte = (unsigned long) pte_quicklist;
+	pte_quicklist = (unsigned long *) pte;
+	pgtable_cache_size++;
+}
+
+static inline void pte_free_kernel(pte_t *pte)
+{
+	free_page((unsigned long)pte);
+}
+
+static inline void pte_free(struct page *pte)
+{
+	__free_page(pte);
+}
+
+static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
+					   unsigned long address)
+{
+	pte_t *pte;
+
+	pte = (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT);
+	if (pte)
+		clear_page(pte);
+
+	return pte;
+}
+
+static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
+{
+	struct page *pte;
+
+	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
+	if (pte)
+		clear_page(page_address(pte));
+
+	return pte;
+}
+
+#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
+
+/*
+ * allocating and freeing a pmd is trivial: the 1-entry pmd is
+ * inside the pgd, so has no extra memory associated with it.
+ */
+
+#if defined(CONFIG_SH64_PGTABLE_2_LEVEL)
+
+#define pmd_alloc_one(mm, addr)		({ BUG(); ((pmd_t *)2); })
+#define pmd_free(x)			do { } while (0)
+#define pgd_populate(mm, pmd, pte)	BUG()
+#define __pte_free_tlb(tlb,pte)		tlb_remove_page((tlb),(pte))
+#define __pmd_free_tlb(tlb,pmd)		do { } while (0)
+
+#elif defined(CONFIG_SH64_PGTABLE_3_LEVEL)
+
+static __inline__ pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
+{
+	pmd_t *pmd;
+	pmd = (pmd_t *) __get_free_page(GFP_KERNEL|__GFP_REPEAT);
+	if (pmd)
+		clear_page(pmd);
+	return pmd;
+}
+
+static __inline__ void pmd_free(pmd_t *pmd)
+{
+	free_page((unsigned long) pmd);
+}
+
+#define pgd_populate(mm, pgd, pmd) pgd_set(pgd, pmd)
+#define __pmd_free_tlb(tlb,pmd)		pmd_free(pmd)
+
+#else
+#error "No defined page table size"
+#endif
+
+#define check_pgt_cache()		do { } while (0)
+#define pgd_free(pgd)		free_pgd_slow(pgd)
+#define pgd_alloc(mm)		get_pgd_fast()
+
+extern int do_check_pgt_cache(int, int);
+
+extern inline void set_pgdir(unsigned long address, pgd_t entry)
+{
+	struct task_struct * p;
+	pgd_t *pgd;
+
+	read_lock(&tasklist_lock);
+	for_each_process(p) {
+		if (!p->mm)
+			continue;
+		*pgd_offset(p->mm,address) = entry;
+	}
+	read_unlock(&tasklist_lock);
+	for (pgd = (pgd_t *)pgd_quicklist; pgd; pgd = (pgd_t *)*(unsigned long *)pgd)
+		pgd[address >> PGDIR_SHIFT] = entry;
+}
+
+#define pmd_populate_kernel(mm, pmd, pte) \
+	set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) (pte)))
+
+static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
+				struct page *pte)
+{
+	set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) page_address (pte)));
+}
+
+#endif /* __ASM_SH64_PGALLOC_H */
--- diff/include/asm-sh64/pgtable.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/pgtable.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,498 @@
+#ifndef __ASM_SH64_PGTABLE_H
+#define __ASM_SH64_PGTABLE_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/pgtable.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ * Copyright (C) 2003, 2004  Richard Curnow
+ *
+ * This file contains the functions and defines necessary to modify and use
+ * the SuperH page table tree.
+ */
+
+#ifndef __ASSEMBLY__
+#include <asm/processor.h>
+#include <asm/page.h>
+#include <linux/threads.h>
+#include <linux/config.h>
+
+extern void paging_init(void);
+
+/* We provide our own get_unmapped_area to avoid cache synonym issue */
+#define HAVE_ARCH_UNMAPPED_AREA
+
+/*
+ * Basically we have the same two-level (which is the logical three level
+ * Linux page table layout folded) page tables as the i386.
+ */
+
+/*
+ * ZERO_PAGE is a global shared page that is always zero: used
+ * for zero-mapped memory areas etc..
+ */
+extern unsigned char empty_zero_page[PAGE_SIZE];
+#define ZERO_PAGE(vaddr) (mem_map + MAP_NR(empty_zero_page))
+
+#endif /* !__ASSEMBLY__ */
+
+/*
+ * NEFF and NPHYS related defines.
+ * FIXME : These need to be model-dependent.  For now this is OK, SH5-101 and SH5-103
+ * implement 32 bits effective and 32 bits physical.  But future implementations may
+ * extend beyond this.
+ */
+#define NEFF		32
+#define	NEFF_SIGN	(1LL << (NEFF - 1))
+#define	NEFF_MASK	(-1LL << NEFF)
+
+#define NPHYS		32
+#define	NPHYS_SIGN	(1LL << (NPHYS - 1))
+#define	NPHYS_MASK	(-1LL << NPHYS)
+
+/* Typically 2-level is sufficient up to 32 bits of virtual address space, beyond
+   that 3-level would be appropriate. */
+#if defined(CONFIG_SH64_PGTABLE_2_LEVEL)
+/* For 4k pages, this contains 512 entries, i.e. 9 bits worth of address. */
+#define PTRS_PER_PTE	((1<<PAGE_SHIFT)/sizeof(unsigned long long))
+#define PTE_MAGNITUDE	3	      /* sizeof(unsigned long long) magnit. */
+#define PTE_SHIFT	PAGE_SHIFT
+#define PTE_BITS	(PAGE_SHIFT - PTE_MAGNITUDE)
+
+/* top level: PMD. */
+#define PGDIR_SHIFT	(PTE_SHIFT + PTE_BITS)
+#define PGD_BITS	(NEFF - PGDIR_SHIFT)
+#define PTRS_PER_PGD	(1<<PGD_BITS)
+
+/* middle level: PMD. This doesn't do anything for the 2-level case. */
+#define PTRS_PER_PMD	(1)
+
+#define PGDIR_SIZE	(1UL << PGDIR_SHIFT)
+#define PGDIR_MASK	(~(PGDIR_SIZE-1))
+#define PMD_SHIFT	PGDIR_SHIFT
+#define PMD_SIZE	PGDIR_SIZE
+#define PMD_MASK	PGDIR_MASK
+
+#elif defined(CONFIG_SH64_PGTABLE_3_LEVEL)
+/*
+ * three-level asymmetric paging structure: PGD is top level.
+ * The asymmetry comes from 32-bit pointers and 64-bit PTEs.
+ */
+/* bottom level: PTE. It's 9 bits = 512 pointers */
+#define PTRS_PER_PTE	((1<<PAGE_SHIFT)/sizeof(unsigned long long))
+#define PTE_MAGNITUDE	3	      /* sizeof(unsigned long long) magnit. */
+#define PTE_SHIFT	PAGE_SHIFT
+#define PTE_BITS	(PAGE_SHIFT - PTE_MAGNITUDE)
+
+/* middle level: PMD. It's 10 bits = 1024 pointers */
+#define PTRS_PER_PMD	((1<<PAGE_SHIFT)/sizeof(unsigned long long *))
+#define PMD_MAGNITUDE	2	      /* sizeof(unsigned long long *) magnit. */
+#define PMD_SHIFT	(PTE_SHIFT + PTE_BITS)
+#define PMD_BITS	(PAGE_SHIFT - PMD_MAGNITUDE)
+
+/* top level: PMD. It's 1 bit = 2 pointers */
+#define PGDIR_SHIFT	(PMD_SHIFT + PMD_BITS)
+#define PGD_BITS	(NEFF - PGDIR_SHIFT)
+#define PTRS_PER_PGD	(1<<PGD_BITS)
+
+#define PMD_SIZE	(1UL << PMD_SHIFT)
+#define PMD_MASK	(~(PMD_SIZE-1))
+#define PGDIR_SIZE	(1UL << PGDIR_SHIFT)
+#define PGDIR_MASK	(~(PGDIR_SIZE-1))
+
+#else
+#error "No defined number of page table levels"
+#endif
+
+/*
+ * Error outputs.
+ */
+#define pte_ERROR(e) \
+	printk("%s:%d: bad pte %016Lx.\n", __FILE__, __LINE__, pte_val(e))
+#define pmd_ERROR(e) \
+	printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
+#define pgd_ERROR(e) \
+	printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
+
+/*
+ * Table setting routines. Used within arch/mm only.
+ */
+#define set_pgd(pgdptr, pgdval) (*(pgdptr) = pgdval)
+#define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval)
+
+static __inline__ void set_pte(pte_t *pteptr, pte_t pteval)
+{
+	unsigned long long x = ((unsigned long long) pteval.pte);
+	unsigned long long *xp = (unsigned long long *) pteptr;
+	/*
+	 * Sign-extend based on NPHYS.
+	 */
+	*(xp) = (x & NPHYS_SIGN) ? (x | NPHYS_MASK) : x;
+}
+
+static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep)
+{
+	pmd_val(*pmdp) = (unsigned long) ptep;
+}
+
+/*
+ * PGD defines. Top level.
+ */
+
+/* To find an entry in a generic PGD. */
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
+#define __pgd_offset(address) pgd_index(address)
+#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
+
+/* To find an entry in a kernel PGD. */
+#define pgd_offset_k(address) pgd_offset(&init_mm, address)
+
+/*
+ * PGD level access routines.
+ *
+ * Note1:
+ * There's no need to use physical addresses since the tree walk is all
+ * in performed in software, until the PTE translation.
+ *
+ * Note 2:
+ * A PGD entry can be uninitialized (_PGD_UNUSED), generically bad,
+ * clear (_PGD_EMPTY), present. When present, lower 3 nibbles contain
+ * _KERNPG_TABLE. Being a kernel virtual pointer also bit 31 must
+ * be 1. Assuming an arbitrary clear value of bit 31 set to 0 and
+ * lower 3 nibbles set to 0xFFF (_PGD_EMPTY) any other value is a
+ * bad pgd that must be notified via printk().
+ *
+ */
+#define _PGD_EMPTY		0x0
+
+#if defined(CONFIG_SH64_PGTABLE_2_LEVEL)
+static inline int pgd_none(pgd_t pgd)		{ return 0; }
+static inline int pgd_bad(pgd_t pgd)		{ return 0; }
+#define pgd_present(pgd) ((pgd_val(pgd) & _PAGE_PRESENT) ? 1 : 0)
+#define pgd_clear(xx)				do { } while(0)
+
+#elif defined(CONFIG_SH64_PGTABLE_3_LEVEL)
+#define pgd_present(pgd_entry)	(1)
+#define pgd_none(pgd_entry)	(pgd_val((pgd_entry)) == _PGD_EMPTY)
+/* TODO: Think later about what a useful definition of 'bad' would be now. */
+#define pgd_bad(pgd_entry)	(0)
+#define pgd_clear(pgd_entry_p)	(set_pgd((pgd_entry_p), __pgd(_PGD_EMPTY)))
+
+#endif
+
+
+#define pgd_page(pgd_entry)	((unsigned long) (pgd_val(pgd_entry) & PAGE_MASK))
+
+/*
+ * PMD defines. Middle level.
+ */
+
+/* PGD to PMD dereferencing */
+#if defined(CONFIG_SH64_PGTABLE_2_LEVEL)
+static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
+{
+	return (pmd_t *) dir;
+}
+#elif defined(CONFIG_SH64_PGTABLE_3_LEVEL)
+#define __pmd_offset(address) \
+		(((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
+#define pmd_offset(dir, addr) \
+		((pmd_t *) ((pgd_val(*(dir))) & PAGE_MASK) + __pmd_offset((addr)))
+#endif
+
+/*
+ * PMD level access routines. Same notes as above.
+ */
+#define _PMD_EMPTY		0x0
+/* Either the PMD is empty or present, it's not paged out */
+#define pmd_present(pmd_entry)	(pmd_val(pmd_entry) & _PAGE_PRESENT)
+#define pmd_clear(pmd_entry_p)	(set_pmd((pmd_entry_p), __pmd(_PMD_EMPTY)))
+#define pmd_none(pmd_entry)	(pmd_val((pmd_entry)) == _PMD_EMPTY)
+#define pmd_bad(pmd_entry)	((pmd_val(pmd_entry) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
+
+#define pmd_page_kernel(pmd_entry) \
+	((unsigned long) __va(pmd_val(pmd_entry) & PAGE_MASK))
+
+#define pmd_page(pmd) \
+	(virt_to_page(pmd_val(pmd)))
+
+/* PMD to PTE dereferencing */
+#define pte_index(address) \
+		((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+
+#define pte_offset_kernel(dir, addr) \
+		((pte_t *) ((pmd_val(*(dir))) & PAGE_MASK) + pte_index((addr)))
+
+#define pte_offset_map(dir,addr)	pte_offset_kernel(dir, addr)
+#define pte_offset_map_nested(dir,addr)	pte_offset_kernel(dir, addr)
+#define pte_unmap(pte)		do { } while (0)
+#define pte_unmap_nested(pte)	do { } while (0)
+
+/* Round it up ! */
+#define USER_PTRS_PER_PGD	((TASK_SIZE+PGDIR_SIZE-1)/PGDIR_SIZE)
+#define FIRST_USER_PGD_NR	0
+
+#ifndef __ASSEMBLY__
+#define VMALLOC_END	0xff000000
+#define VMALLOC_START	0xf0000000
+#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+
+#define IOBASE_VADDR	0xff000000
+#define IOBASE_END	0xffffffff
+
+/*
+ * PTEL coherent flags.
+ * See Chapter 17 ST50 CPU Core Volume 1, Architecture.
+ */
+/* The bits that are required in the SH-5 TLB are placed in the h/w-defined
+   positions, to avoid expensive bit shuffling on every refill.  The remaining
+   bits are used for s/w purposes and masked out on each refill.
+
+   Note, the PTE slots are used to hold data of type swp_entry_t when a page is
+   swapped out.  Only the _PAGE_PRESENT flag is significant when the page is
+   swapped out, and it must be placed so that it doesn't overlap either the
+   type or offset fields of swp_entry_t.  For x86, offset is at [31:8] and type
+   at [6:1], with _PAGE_PRESENT at bit 0 for both pte_t and swp_entry_t.  This
+   scheme doesn't map to SH-5 because bit [0] controls cacheability.  So bit
+   [2] is used for _PAGE_PRESENT and the type field of swp_entry_t is split
+   into 2 pieces.  That is handled by SWP_ENTRY and SWP_TYPE below. */
+#define _PAGE_WT	0x001  /* CB0: if cacheable, 1->write-thru, 0->write-back */
+#define _PAGE_DEVICE	0x001  /* CB0: if uncacheable, 1->device (i.e. no write-combining or reordering at bus level) */
+#define _PAGE_CACHABLE	0x002  /* CB1: uncachable/cachable */
+#define _PAGE_PRESENT	0x004  /* software: page referenced */
+#define _PAGE_FILE	0x004  /* software: only when !present */
+#define _PAGE_SIZE0	0x008  /* SZ0-bit : size of page */
+#define _PAGE_SIZE1	0x010  /* SZ1-bit : size of page */
+#define _PAGE_SHARED	0x020  /* software: reflects PTEH's SH */
+#define _PAGE_READ	0x040  /* PR0-bit : read access allowed */
+#define _PAGE_EXECUTE	0x080  /* PR1-bit : execute access allowed */
+#define _PAGE_WRITE	0x100  /* PR2-bit : write access allowed */
+#define _PAGE_USER	0x200  /* PR3-bit : user space access allowed */
+#define _PAGE_DIRTY	0x400  /* software: page accessed in write */
+#define _PAGE_ACCESSED	0x800  /* software: page referenced */
+
+/* Mask which drops software flags */
+#define _PAGE_FLAGS_HARDWARE_MASK	0xfffffffffffff3dbLL
+/* Flags default: 4KB, Read, Not write, Not execute, Not user */
+#define _PAGE_FLAGS_HARDWARE_DEFAULT	0x0000000000000040LL
+
+/*
+ * HugeTLB support
+ */
+#if defined(CONFIG_HUGETLB_PAGE_SIZE_64K)
+#define _PAGE_SZHUGE	(_PAGE_SIZE0)
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_1MB)
+#define _PAGE_SZHUGE	(_PAGE_SIZE1)
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_512MB)
+#define _PAGE_SZHUGE	(_PAGE_SIZE0 | _PAGE_SIZE1)
+#endif
+
+/*
+ * Default flags for a Kernel page.
+ * This is fundametally also SHARED because the main use of this define
+ * (other than for PGD/PMD entries) is for the VMALLOC pool which is
+ * contextless.
+ *
+ * _PAGE_EXECUTE is required for modules
+ *
+ */
+#define _KERNPG_TABLE	(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
+			 _PAGE_EXECUTE | \
+			 _PAGE_CACHABLE | _PAGE_ACCESSED | _PAGE_DIRTY | \
+			 _PAGE_SHARED)
+
+/* Default flags for a User page */
+#define _PAGE_TABLE	(_KERNPG_TABLE | _PAGE_USER)
+
+#define _PAGE_CHG_MASK	(PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
+
+#define PAGE_NONE	__pgprot(_PAGE_CACHABLE | _PAGE_ACCESSED)
+#define PAGE_SHARED	__pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
+				 _PAGE_CACHABLE | _PAGE_ACCESSED | _PAGE_USER | \
+				 _PAGE_SHARED)
+/* We need to include PAGE_EXECUTE in PAGE_COPY because it is the default
+ * protection mode for the stack. */
+#define PAGE_COPY	__pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_CACHABLE | \
+				 _PAGE_ACCESSED | _PAGE_USER | _PAGE_EXECUTE)
+#define PAGE_READONLY	__pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_CACHABLE | \
+				 _PAGE_ACCESSED | _PAGE_USER)
+#define PAGE_KERNEL	__pgprot(_KERNPG_TABLE)
+
+
+/*
+ * In ST50 we have full permissions (Read/Write/Execute/Shared).
+ * Just match'em all. These are for mmap(), therefore all at least
+ * User/Cachable/Present/Accessed. No point in making Fault on Write.
+ */
+#define __MMAP_COMMON	(_PAGE_PRESENT | _PAGE_USER | _PAGE_CACHABLE | _PAGE_ACCESSED)
+       /* sxwr */
+#define __P000	__pgprot(__MMAP_COMMON)
+#define __P001	__pgprot(__MMAP_COMMON | _PAGE_READ)
+#define __P010	__pgprot(__MMAP_COMMON)
+#define __P011	__pgprot(__MMAP_COMMON | _PAGE_READ)
+#define __P100	__pgprot(__MMAP_COMMON | _PAGE_EXECUTE)
+#define __P101	__pgprot(__MMAP_COMMON | _PAGE_EXECUTE | _PAGE_READ)
+#define __P110	__pgprot(__MMAP_COMMON | _PAGE_EXECUTE)
+#define __P111	__pgprot(__MMAP_COMMON | _PAGE_EXECUTE | _PAGE_READ)
+
+#define __S000	__pgprot(__MMAP_COMMON | _PAGE_SHARED)
+#define __S001	__pgprot(__MMAP_COMMON | _PAGE_SHARED | _PAGE_READ)
+#define __S010	__pgprot(__MMAP_COMMON | _PAGE_SHARED | _PAGE_WRITE)
+#define __S011	__pgprot(__MMAP_COMMON | _PAGE_SHARED | _PAGE_READ | _PAGE_WRITE)
+#define __S100	__pgprot(__MMAP_COMMON | _PAGE_SHARED | _PAGE_EXECUTE)
+#define __S101	__pgprot(__MMAP_COMMON | _PAGE_SHARED | _PAGE_EXECUTE | _PAGE_READ)
+#define __S110	__pgprot(__MMAP_COMMON | _PAGE_SHARED | _PAGE_EXECUTE | _PAGE_WRITE)
+#define __S111	__pgprot(__MMAP_COMMON | _PAGE_SHARED | _PAGE_EXECUTE | _PAGE_READ | _PAGE_WRITE)
+
+/* Make it a device mapping for maximum safety (e.g. for mapping device
+   registers into user-space via /dev/map).  */
+#define pgprot_noncached(x) __pgprot(((x).pgprot & ~(_PAGE_CACHABLE)) | _PAGE_DEVICE)
+#define pgprot_writecombine(prot) __pgprot(pgprot_val(prot) & ~_PAGE_CACHABLE)
+
+/*
+ * Handling allocation failures during page table setup.
+ */
+extern void __handle_bad_pmd_kernel(pmd_t * pmd);
+#define __handle_bad_pmd(x)	__handle_bad_pmd_kernel(x)
+
+/*
+ * PTE level access routines.
+ *
+ * Note1:
+ * It's the tree walk leaf. This is physical address to be stored.
+ *
+ * Note 2:
+ * Regarding the choice of _PTE_EMPTY:
+
+   We must choose a bit pattern that cannot be valid, whether or not the page
+   is present.  bit[2]==1 => present, bit[2]==0 => swapped out.  If swapped
+   out, bits [31:8], [6:3], [1:0] are under swapper control, so only bit[7] is
+   left for us to select.  If we force bit[7]==0 when swapped out, we could use
+   the combination bit[7,2]=2'b10 to indicate an empty PTE.  Alternatively, if
+   we force bit[7]==1 when swapped out, we can use all zeroes to indicate
+   empty.  This is convenient, because the page tables get cleared to zero
+   when they are allocated.
+
+ */
+#define _PTE_EMPTY	0x0
+#define pte_present(x)	(pte_val(x) & _PAGE_PRESENT)
+#define pte_clear(xp)	(set_pte(xp, __pte(_PTE_EMPTY)))
+#define pte_none(x)	(pte_val(x) == _PTE_EMPTY)
+
+/*
+ * Some definitions to translate between mem_map, PTEs, and page
+ * addresses:
+ */
+
+/*
+ * Given a PTE, return the index of the mem_map[] entry corresponding
+ * to the page frame the PTE. Get the absolute physical address, make
+ * a relative physical address and translate it to an index.
+ */
+#define pte_pagenr(x)		(((unsigned long) (pte_val(x)) - \
+				 __MEMORY_START) >> PAGE_SHIFT)
+
+/*
+ * Given a PTE, return the "struct page *".
+ */
+#define pte_page(x)		(mem_map + pte_pagenr(x))
+
+/*
+ * Return number of (down rounded) MB corresponding to x pages.
+ */
+#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
+
+
+/*
+ * The following have defined behavior only work if pte_present() is true.
+ */
+static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_READ; }
+static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXECUTE; }
+static inline int pte_dirty(pte_t pte){ return pte_val(pte) & _PAGE_DIRTY; }
+static inline int pte_young(pte_t pte){ return pte_val(pte) & _PAGE_ACCESSED; }
+static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
+static inline int pte_write(pte_t pte){ return pte_val(pte) & _PAGE_WRITE; }
+
+extern inline pte_t pte_rdprotect(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_READ)); return pte; }
+extern inline pte_t pte_wrprotect(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_WRITE)); return pte; }
+extern inline pte_t pte_exprotect(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_EXECUTE)); return pte; }
+extern inline pte_t pte_mkclean(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; }
+extern inline pte_t pte_mkold(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; }
+
+extern inline pte_t pte_mkread(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_READ)); return pte; }
+extern inline pte_t pte_mkwrite(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_WRITE)); return pte; }
+extern inline pte_t pte_mkexec(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_EXECUTE)); return pte; }
+extern inline pte_t pte_mkdirty(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; }
+extern inline pte_t pte_mkyoung(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; }
+
+/*
+ * Conversion functions: convert a page and protection to a page entry.
+ *
+ * extern pte_t mk_pte(struct page *page, pgprot_t pgprot)
+ */
+#define mk_pte(page,pgprot)							\
+({										\
+	pte_t __pte;								\
+										\
+	set_pte(&__pte, __pte((((page)-mem_map) << PAGE_SHIFT) | 		\
+		__MEMORY_START | pgprot_val((pgprot))));			\
+	__pte;									\
+})
+
+/*
+ * This takes a (absolute) physical page address that is used
+ * by the remapping functions
+ */
+#define mk_pte_phys(physpage, pgprot) \
+({ pte_t __pte; set_pte(&__pte, __pte(physpage | pgprot_val(pgprot))); __pte; })
+
+extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
+{ set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; }
+
+#define page_pte_prot(page, prot) mk_pte(page, prot)
+#define page_pte(page) page_pte_prot(page, __pgprot(0))
+
+typedef pte_t *pte_addr_t;
+#define pgtable_cache_init()	do { } while (0)
+
+extern void update_mmu_cache(struct vm_area_struct * vma,
+			     unsigned long address, pte_t pte);
+
+/* Encode and decode a swap entry */
+#define __swp_type(x)			(((x).val & 3) + (((x).val >> 1) & 0x3c))
+#define __swp_offset(x)			((x).val >> 8)
+#define __swp_entry(type, offset)	((swp_entry_t) { ((offset << 8) + ((type & 0x3c) << 1) + (type & 3)) })
+#define __pte_to_swp_entry(pte)		((swp_entry_t) { pte_val(pte) })
+#define __swp_entry_to_pte(x)		((pte_t) { (x).val })
+
+/* Encode and decode a nonlinear file mapping entry */
+#define PTE_FILE_MAX_BITS		29
+#define pte_to_pgoff(pte)		(pte_val(pte))
+#define pgoff_to_pte(off)		((pte_t) { (off) | _PAGE_FILE })
+
+/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
+#define PageSkip(page)		(0)
+#define kern_addr_valid(addr)	(1)
+
+#define io_remap_page_range remap_page_range
+#endif /* !__ASSEMBLY__ */
+
+/*
+ * No page table caches to initialise
+ */
+#define pgtable_cache_init()    do { } while (0)
+
+#define pte_pfn(x)		(((unsigned long)((x).pte)) >> PAGE_SHIFT)
+#define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define pfn_pmd(pfn, prot)	__pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+
+extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
+
+#include <asm-generic/pgtable.h>
+
+#endif /* __ASM_SH64_PGTABLE_H */
--- diff/include/asm-sh64/platform.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/platform.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,69 @@
+#ifndef __ASM_SH64_PLATFORM_H
+#define __ASM_SH64_PLATFORM_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/platform.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * benedict.gaster@superh.com:	 3rd May 2002
+ *    Added support for ramdisk, removing statically linked romfs at the same time.
+ */
+
+#include <linux/ioport.h>
+#include <asm/irq.h>
+
+
+/*
+ * Platform definition structure.
+ */
+struct sh64_platform {
+	unsigned int readonly_rootfs;
+	unsigned int ramdisk_flags;
+	unsigned int initial_root_dev;
+	unsigned int loader_type;
+	unsigned int initrd_start;
+	unsigned int initrd_size;
+	unsigned int fpu_flags;
+	unsigned int io_res_count;
+	unsigned int kram_res_count;
+	unsigned int xram_res_count;
+	unsigned int rom_res_count;
+	struct resource *io_res_p;
+	struct resource *kram_res_p;
+	struct resource *xram_res_p;
+	struct resource *rom_res_p;
+};
+
+extern struct sh64_platform platform_parms;
+
+extern unsigned long long memory_start, memory_end;
+
+extern unsigned long long fpu_in_use;
+
+extern int platform_int_priority[NR_INTC_IRQS];
+
+#define FPU_FLAGS		(platform_parms.fpu_flags)
+#define STANDARD_IO_RESOURCES	(platform_parms.io_res_count)
+#define STANDARD_KRAM_RESOURCES	(platform_parms.kram_res_count)
+#define STANDARD_XRAM_RESOURCES	(platform_parms.xram_res_count)
+#define STANDARD_ROM_RESOURCES	(platform_parms.rom_res_count)
+
+/*
+ * Kernel Memory description, Respectively:
+ * code = last but one memory descriptor
+ * data = last memory descriptor
+ */
+#define code_resource (platform_parms.kram_res_p[STANDARD_KRAM_RESOURCES - 2])
+#define data_resource (platform_parms.kram_res_p[STANDARD_KRAM_RESOURCES - 1])
+
+/* Be prepared to 64-bit sign extensions */
+#define PFN_UP(x)       ((((x) + PAGE_SIZE-1) >> PAGE_SHIFT) & 0x000fffff)
+#define PFN_DOWN(x)     (((x) >> PAGE_SHIFT) & 0x000fffff)
+#define PFN_PHYS(x)     ((x) << PAGE_SHIFT)
+
+#endif	/* __ASM_SH64_PLATFORM_H */
--- diff/include/asm-sh64/poll.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/poll.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,36 @@
+#ifndef __ASM_SH64_POLL_H
+#define __ASM_SH64_POLL_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/poll.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+/* These are specified by iBCS2 */
+#define POLLIN		0x0001
+#define POLLPRI		0x0002
+#define POLLOUT		0x0004
+#define POLLERR		0x0008
+#define POLLHUP		0x0010
+#define POLLNVAL	0x0020
+
+/* The rest seem to be more-or-less nonstandard. Check them! */
+#define POLLRDNORM	0x0040
+#define POLLRDBAND	0x0080
+#define POLLWRNORM	0x0100
+#define POLLWRBAND	0x0200
+#define POLLMSG		0x0400
+
+struct pollfd {
+	int fd;
+	short events;
+	short revents;
+};
+
+#endif /* __ASM_SH64_POLL_H */
--- diff/include/asm-sh64/posix_types.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/posix_types.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,131 @@
+#ifndef __ASM_SH64_POSIX_TYPES_H
+#define __ASM_SH64_POSIX_TYPES_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/posix_types.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ * This file is generally used by user-level software, so you need to
+ * be a little careful about namespace pollution etc.  Also, we cannot
+ * assume GCC is being used.
+ */
+
+typedef unsigned long	__kernel_ino_t;
+typedef unsigned short	__kernel_mode_t;
+typedef unsigned short	__kernel_nlink_t;
+typedef long		__kernel_off_t;
+typedef int		__kernel_pid_t;
+typedef unsigned short	__kernel_ipc_pid_t;
+typedef unsigned short	__kernel_uid_t;
+typedef unsigned short	__kernel_gid_t;
+typedef long unsigned int	__kernel_size_t;
+typedef int		__kernel_ssize_t;
+typedef int		__kernel_ptrdiff_t;
+typedef long		__kernel_time_t;
+typedef long		__kernel_suseconds_t;
+typedef long		__kernel_clock_t;
+typedef int		__kernel_timer_t;
+typedef int		__kernel_clockid_t;
+typedef int		__kernel_daddr_t;
+typedef char *		__kernel_caddr_t;
+typedef unsigned short	__kernel_uid16_t;
+typedef unsigned short	__kernel_gid16_t;
+typedef unsigned int	__kernel_uid32_t;
+typedef unsigned int	__kernel_gid32_t;
+
+typedef unsigned short	__kernel_old_uid_t;
+typedef unsigned short	__kernel_old_gid_t;
+typedef unsigned short	__kernel_old_dev_t;
+
+#ifdef __GNUC__
+typedef long long	__kernel_loff_t;
+#endif
+
+typedef struct {
+#if defined(__KERNEL__) || defined(__USE_ALL)
+	int	val[2];
+#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+	int	__val[2];
+#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+} __kernel_fsid_t;
+
+#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+
+#undef	__FD_SET
+static __inline__ void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
+{
+	unsigned long __tmp = __fd / __NFDBITS;
+	unsigned long __rem = __fd % __NFDBITS;
+	__fdsetp->fds_bits[__tmp] |= (1UL<<__rem);
+}
+
+#undef	__FD_CLR
+static __inline__ void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp)
+{
+	unsigned long __tmp = __fd / __NFDBITS;
+	unsigned long __rem = __fd % __NFDBITS;
+	__fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem);
+}
+
+
+#undef	__FD_ISSET
+static __inline__ int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p)
+{
+	unsigned long __tmp = __fd / __NFDBITS;
+	unsigned long __rem = __fd % __NFDBITS;
+	return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0;
+}
+
+/*
+ * This will unroll the loop for the normal constant case (8 ints,
+ * for a 256-bit fd_set)
+ */
+#undef	__FD_ZERO
+static __inline__ void __FD_ZERO(__kernel_fd_set *__p)
+{
+	unsigned long *__tmp = __p->fds_bits;
+	int __i;
+
+	if (__builtin_constant_p(__FDSET_LONGS)) {
+		switch (__FDSET_LONGS) {
+		case 16:
+			__tmp[ 0] = 0; __tmp[ 1] = 0;
+			__tmp[ 2] = 0; __tmp[ 3] = 0;
+			__tmp[ 4] = 0; __tmp[ 5] = 0;
+			__tmp[ 6] = 0; __tmp[ 7] = 0;
+			__tmp[ 8] = 0; __tmp[ 9] = 0;
+			__tmp[10] = 0; __tmp[11] = 0;
+			__tmp[12] = 0; __tmp[13] = 0;
+			__tmp[14] = 0; __tmp[15] = 0;
+			return;
+
+		case 8:
+			__tmp[ 0] = 0; __tmp[ 1] = 0;
+			__tmp[ 2] = 0; __tmp[ 3] = 0;
+			__tmp[ 4] = 0; __tmp[ 5] = 0;
+			__tmp[ 6] = 0; __tmp[ 7] = 0;
+			return;
+
+		case 4:
+			__tmp[ 0] = 0; __tmp[ 1] = 0;
+			__tmp[ 2] = 0; __tmp[ 3] = 0;
+			return;
+		}
+	}
+	__i = __FDSET_LONGS;
+	while (__i) {
+		__i--;
+		*__tmp = 0;
+		__tmp++;
+	}
+}
+
+#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
+
+#endif /* __ASM_SH64_POSIX_TYPES_H */
--- diff/include/asm-sh64/processor.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/processor.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,292 @@
+#ifndef __ASM_SH64_PROCESSOR_H
+#define __ASM_SH64_PROCESSOR_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/processor.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ * Copyright (C) 2004  Richard Curnow
+ *
+ */
+
+#include <asm/page.h>
+
+#ifndef __ASSEMBLY__
+
+#include <asm/types.h>
+#include <asm/cache.h>
+#include <asm/registers.h>
+#include <linux/threads.h>
+
+/*
+ * Default implementation of macro that returns current
+ * instruction pointer ("program counter").
+ */
+#define current_text_addr() ({ \
+void *pc; \
+unsigned long long __dummy = 0; \
+__asm__("gettr	tr0, %1\n\t" \
+	"pta	4, tr0\n\t" \
+	"gettr	tr0, %0\n\t" \
+	"ptabs	%1, tr0\n\t"	\
+	:"=r" (pc), "=r" (__dummy) \
+	: "1" (__dummy)); \
+pc; })
+
+/*
+ *  CPU type and hardware bug flags. Kept separately for each CPU.
+ */
+enum cpu_type {
+	CPU_SH5_101,
+	CPU_SH5_103,
+	CPU_SH_NONE
+};
+
+/*
+ * TLB information structure
+ *
+ * Defined for both I and D tlb, per-processor.
+ */
+struct tlb_info {
+	unsigned long long next;
+	unsigned long long first;
+	unsigned long long last;
+
+	unsigned int entries;
+	unsigned int step;
+
+	unsigned long flags;
+};
+
+struct sh_cpuinfo {
+	enum cpu_type type;
+	unsigned long loops_per_jiffy;
+
+	char	hard_math;
+
+	unsigned long *pgd_quick;
+	unsigned long *pmd_quick;
+	unsigned long *pte_quick;
+	unsigned long pgtable_cache_sz;
+	unsigned int cpu_clock, master_clock, bus_clock, module_clock;
+
+	/* Cache info */
+	struct cache_info icache;
+	struct cache_info dcache;
+
+	/* TLB info */
+	struct tlb_info itlb;
+	struct tlb_info dtlb;
+};
+
+extern struct sh_cpuinfo boot_cpu_data;
+
+#define cpu_data (&boot_cpu_data)
+#define current_cpu_data boot_cpu_data
+
+#endif
+
+/*
+ * User space process size: 2GB - 4k.
+ */
+#define TASK_SIZE	0x7ffff000UL
+
+/* This decides where the kernel will search for a free chunk of vm
+ * space during mmap's.
+ */
+#define TASK_UNMAPPED_BASE	(TASK_SIZE / 3)
+
+/*
+ * Bit of SR register
+ *
+ * FD-bit:
+ *     When it's set, it means the processor doesn't have right to use FPU,
+ *     and it results exception when the floating operation is executed.
+ *
+ * IMASK-bit:
+ *     Interrupt level mask
+ *
+ * STEP-bit:
+ *     Single step bit
+ *
+ */
+#define SR_FD    0x00008000
+
+#if defined(CONFIG_SH64_SR_WATCH)
+#define SR_MMU   0x84000000
+#else
+#define SR_MMU   0x80000000
+#endif
+
+#define SR_IMASK 0x000000f0
+#define SR_SSTEP 0x08000000
+
+#ifndef __ASSEMBLY__
+
+/*
+ * FPU structure and data : require 8-byte alignment as we need to access it
+   with fld.p, fst.p
+ */
+
+struct sh_fpu_hard_struct {
+	unsigned long fp_regs[64];
+	unsigned int fpscr;
+	/* long status; * software status information */
+};
+
+#if 0
+/* Dummy fpu emulator  */
+struct sh_fpu_soft_struct {
+	unsigned long long fp_regs[32];
+	unsigned int fpscr;
+	unsigned char lookahead;
+	unsigned long entry_pc;
+};
+#endif
+
+union sh_fpu_union {
+	struct sh_fpu_hard_struct hard;
+	/* 'hard' itself only produces 32 bit alignment, yet we need
+	   to access it using 64 bit load/store as well. */
+	unsigned long long alignment_dummy;
+};
+
+struct thread_struct {
+	unsigned long sp;
+	unsigned long pc;
+	/* This stores the address of the pt_regs built during a context
+	   switch, or of the register save area built for a kernel mode
+	   exception.  It is used for backtracing the stack of a sleeping task
+	   or one that traps in kernel mode. */
+        struct pt_regs *kregs;
+	/* This stores the address of the pt_regs constructed on entry from
+	   user mode.  It is a fixed value over the lifetime of a process, or
+	   NULL for a kernel thread. */
+	struct pt_regs *uregs;
+
+	unsigned long trap_no, error_code;
+	unsigned long address;
+	/* Hardware debugging registers may come here */
+
+	/* floating point info */
+	union sh_fpu_union fpu;
+};
+
+#define INIT_MMAP \
+{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
+
+extern  struct pt_regs fake_swapper_regs;
+
+#define INIT_THREAD  {				\
+	.sp		= sizeof(init_stack) +	\
+			  (long) &init_stack,	\
+	.pc		= 0,			\
+        .kregs		= &fake_swapper_regs,	\
+	.uregs	        = NULL,			\
+	.trap_no	= 0,			\
+	.error_code	= 0,			\
+	.address	= 0,			\
+	.fpu		= { { { 0, } }, }	\
+}
+
+/*
+ * Do necessary setup to start up a newly executed thread.
+ */
+#define SR_USER (SR_MMU | SR_FD)
+
+#define start_thread(regs, new_pc, new_sp) 	 		\
+	set_fs(USER_DS);			 		\
+	regs->sr = SR_USER;	/* User mode. */ 		\
+	regs->pc = new_pc - 4;	/* Compensate syscall exit */	\
+	regs->pc |= 1;		/* Set SHmedia ! */		\
+	regs->regs[18] = 0;   		 	 		\
+	regs->regs[15] = new_sp
+
+/* Forward declaration, a strange C thing */
+struct task_struct;
+struct mm_struct;
+
+/* Free all resources held by a thread. */
+extern void release_thread(struct task_struct *);
+/*
+ * create a kernel thread without removing it from tasklists
+ */
+extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
+
+/*
+ * Bus types
+ */
+#define MCA_bus 0
+#define MCA_bus__is_a_macro /* for versions in ksyms.c */
+
+
+/* Copy and release all segment info associated with a VM */
+#define copy_segments(p, mm)	do { } while (0)
+#define release_segments(mm)	do { } while (0)
+#define forget_segments()	do { } while (0)
+#define prepare_to_copy(tsk)	do { } while (0)
+/*
+ * FPU lazy state save handling.
+ */
+
+extern __inline__ void release_fpu(void)
+{
+	unsigned long long __dummy;
+
+	/* Set FD flag in SR */
+	__asm__ __volatile__("getcon	" __SR ", %0\n\t"
+			     "or	%0, %1, %0\n\t"
+			     "putcon	%0, " __SR "\n\t"
+			     : "=&r" (__dummy)
+			     : "r" (SR_FD));
+}
+
+extern __inline__ void grab_fpu(void)
+{
+	unsigned long long __dummy;
+
+	/* Clear out FD flag in SR */
+	__asm__ __volatile__("getcon	" __SR ", %0\n\t"
+			     "and	%0, %1, %0\n\t"
+			     "putcon	%0, " __SR "\n\t"
+			     : "=&r" (__dummy)
+			     : "r" (~SR_FD));
+}
+
+/* Round to nearest, no exceptions on inexact, overflow, underflow,
+   zero-divide, invalid.  Configure option for whether to flush denorms to
+   zero, or except if a denorm is encountered.  */
+#if defined(CONFIG_SH64_FPU_DENORM_FLUSH)
+#define FPSCR_INIT  0x00040000
+#else
+#define FPSCR_INIT  0x00000000
+#endif
+
+/* Save the current FP regs */
+void fpsave(struct sh_fpu_hard_struct *fpregs);
+
+/* Initialise the FP state of a task */
+void fpinit(struct sh_fpu_hard_struct *fpregs);
+
+extern struct task_struct *last_task_used_math;
+
+/*
+ * Return saved PC of a blocked thread.
+ */
+#define thread_saved_pc(tsk)	(tsk->thread.pc)
+
+extern unsigned long get_wchan(struct task_struct *p);
+
+#define KSTK_EIP(tsk)  ((tsk)->thread.pc)
+#define KSTK_ESP(tsk)  ((tsk)->thread.sp)
+
+#define cpu_relax()	do { } while (0)
+
+#endif	/* __ASSEMBLY__ */
+#endif /* __ASM_SH64_PROCESSOR_H */
+
--- diff/include/asm-sh64/ptrace.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/ptrace.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,36 @@
+#ifndef __ASM_SH64_PTRACE_H
+#define __ASM_SH64_PTRACE_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/ptrace.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+/*
+ * This struct defines the way the registers are stored on the
+ * kernel stack during a system call or other kernel entry.
+ */
+struct pt_regs {
+	unsigned long long pc;
+	unsigned long long sr;
+	unsigned long long syscall_nr;
+	unsigned long long regs[63];
+	unsigned long long tregs[8];
+	unsigned long long pad[2];
+};
+
+#ifdef __KERNEL__
+#define user_mode(regs) (((regs)->sr & 0x40000000)==0)
+#define instruction_pointer(regs) ((regs)->pc)
+extern void show_regs(struct pt_regs *);
+#endif
+
+#define PTRACE_O_TRACESYSGOOD     0x00000001
+
+#endif /* __ASM_SH64_PTRACE_H */
--- diff/include/asm-sh64/registers.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/registers.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,106 @@
+#ifndef __ASM_SH64_REGISTERS_H
+#define __ASM_SH64_REGISTERS_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/registers.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2004  Richard Curnow
+ */
+
+#ifdef __ASSEMBLY__
+/* =====================================================================
+**
+** Section 1: acts on assembly sources pre-processed by GPP ( <source.S>).
+**	      Assigns symbolic names to control & target registers.
+*/
+
+/*
+ * Define some useful aliases for control registers.
+ */
+#define SR	cr0
+#define SSR	cr1
+#define PSSR	cr2
+			/* cr3 UNDEFINED */
+#define INTEVT	cr4
+#define EXPEVT	cr5
+#define PEXPEVT	cr6
+#define TRA	cr7
+#define SPC	cr8
+#define PSPC	cr9
+#define RESVEC	cr10
+#define VBR	cr11
+			/* cr12 UNDEFINED */
+#define TEA	cr13
+			/* cr14-cr15 UNDEFINED */
+#define DCR	cr16
+#define KCR0	cr17
+#define KCR1	cr18
+			/* cr19-cr31 UNDEFINED */
+			/* cr32-cr61 RESERVED */
+#define CTC	cr62
+#define USR	cr63
+
+/*
+ * ABI dependent registers (general purpose set)
+ */
+#define RET	r2
+#define ARG1	r2
+#define ARG2	r3
+#define ARG3	r4
+#define ARG4	r5
+#define ARG5	r6
+#define ARG6	r7
+#define SP	r15
+#define LINK	r18
+#define ZERO	r63
+
+/*
+ * Status register defines: used only by assembly sources (and
+ * 			    syntax independednt)
+ */
+#define SR_RESET_VAL	0x0000000050008000
+#define SR_HARMLESS	0x00000000500080f0	/* Write ignores for most */
+#define SR_ENABLE_FPU	0xffffffffffff7fff	/* AND with this */
+
+#if defined (CONFIG_SH64_SR_WATCH)
+#define SR_ENABLE_MMU	0x0000000084000000	/* OR with this */
+#else
+#define SR_ENABLE_MMU	0x0000000080000000	/* OR with this */
+#endif
+
+#define SR_UNBLOCK_EXC	0xffffffffefffffff	/* AND with this */
+#define SR_BLOCK_EXC	0x0000000010000000	/* OR with this */
+
+#else	/* Not __ASSEMBLY__ syntax */
+
+/*
+** Stringify reg. name
+*/
+#define __str(x)  #x
+
+/* Stringify control register names for use in inline assembly */
+#define __SR __str(SR)
+#define __SSR __str(SSR)
+#define __PSSR __str(PSSR)
+#define __INTEVT __str(INTEVT)
+#define __EXPEVT __str(EXPEVT)
+#define __PEXPEVT __str(PEXPEVT)
+#define __TRA __str(TRA)
+#define __SPC __str(SPC)
+#define __PSPC __str(PSPC)
+#define __RESVEC __str(RESVEC)
+#define __VBR __str(VBR)
+#define __TEA __str(TEA)
+#define __DCR __str(DCR)
+#define __KCR0 __str(KCR0)
+#define __KCR1 __str(KCR1)
+#define __CTC __str(CTC)
+#define __USR __str(USR)
+
+#endif /* __ASSEMBLY__ */
+#endif /* __ASM_SH64_REGISTERS_H */
--- diff/include/asm-sh64/resource.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/resource.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,47 @@
+#ifndef __ASM_SH_RESOURCE_H
+#define __ASM_SH_RESOURCE_H
+
+/*
+ * Resource limits
+ */
+
+#define RLIMIT_CPU	0		/* CPU time in ms */
+#define RLIMIT_FSIZE	1		/* Maximum filesize */
+#define RLIMIT_DATA	2		/* max data size */
+#define RLIMIT_STACK	3		/* max stack size */
+#define RLIMIT_CORE	4		/* max core file size */
+#define RLIMIT_RSS	5		/* max resident set size */
+#define RLIMIT_NPROC	6		/* max number of processes */
+#define RLIMIT_NOFILE	7		/* max number of open files */
+#define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
+#define RLIMIT_AS	9		/* address space limit */
+#define RLIMIT_LOCKS	10		/* maximum file locks held */
+
+#define RLIM_NLIMITS	11
+
+#ifdef __KERNEL__
+
+/*
+ * SuS says limits have to be unsigned.
+ * Which makes a ton more sense anyway.
+ */
+#define RLIM_INFINITY	(~0UL)
+
+#define INIT_RLIMITS					\
+{							\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{      _STK_LIM, RLIM_INFINITY },		\
+	{             0, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{             0,             0 },		\
+	{      INR_OPEN,     INR_OPEN  },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+}
+
+#endif /* __KERNEL__ */
+
+#endif /* __ASM_SH_RESOURCE_H */
--- diff/include/asm-sh64/scatterlist.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/scatterlist.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,23 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/scatterlist.h
+ *
+ * Copyright (C) 2003  Paul Mundt
+ *
+ */
+#ifndef __ASM_SH64_SCATTERLIST_H
+#define __ASM_SH64_SCATTERLIST_H
+
+struct scatterlist {
+    struct page * page; /* Location for highmem page, if any */
+    unsigned int offset;/* for highmem, page offset */
+    dma_addr_t dma_address;
+    unsigned int length;
+};
+
+#define ISA_DMA_THRESHOLD (0xffffffff)
+
+#endif /* !__ASM_SH64_SCATTERLIST_H */
--- diff/include/asm-sh64/sections.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/sections.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,7 @@
+#ifndef __ASM_SH64_SECTIONS_H
+#define __ASM_SH64_SECTIONS_H
+
+#include <asm-sh/sections.h>
+
+#endif /* __ASM_SH64_SECTIONS_H */
+
--- diff/include/asm-sh64/segment.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/segment.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef _ASM_SEGMENT_H
+#define _ASM_SEGMENT_H
+
+/* Only here because we have some old header files that expect it.. */
+
+#endif /* _ASM_SEGMENT_H */
--- diff/include/asm-sh64/semaphore-helper.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/semaphore-helper.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,101 @@
+#ifndef __ASM_SH64_SEMAPHORE_HELPER_H
+#define __ASM_SH64_SEMAPHORE_HELPER_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/semaphore-helper.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+#include <asm/errno.h>
+
+/*
+ * SMP- and interrupt-safe semaphores helper functions.
+ *
+ * (C) Copyright 1996 Linus Torvalds
+ * (C) Copyright 1999 Andrea Arcangeli
+ */
+
+/*
+ * These two _must_ execute atomically wrt each other.
+ *
+ * This is trivially done with load_locked/store_cond,
+ * which we have.  Let the rest of the losers suck eggs.
+ */
+static __inline__ void wake_one_more(struct semaphore * sem)
+{
+	atomic_inc((atomic_t *)&sem->sleepers);
+}
+
+static __inline__ int waking_non_zero(struct semaphore *sem)
+{
+	unsigned long flags;
+	int ret = 0;
+
+	spin_lock_irqsave(&semaphore_wake_lock, flags);
+	if (sem->sleepers > 0) {
+		sem->sleepers--;
+		ret = 1;
+	}
+	spin_unlock_irqrestore(&semaphore_wake_lock, flags);
+	return ret;
+}
+
+/*
+ * waking_non_zero_interruptible:
+ *	1	got the lock
+ *	0	go to sleep
+ *	-EINTR	interrupted
+ *
+ * We must undo the sem->count down_interruptible() increment while we are
+ * protected by the spinlock in order to make atomic this atomic_inc() with the
+ * atomic_read() in wake_one_more(), otherwise we can race. -arca
+ */
+static __inline__ int waking_non_zero_interruptible(struct semaphore *sem,
+						struct task_struct *tsk)
+{
+	unsigned long flags;
+	int ret = 0;
+
+	spin_lock_irqsave(&semaphore_wake_lock, flags);
+	if (sem->sleepers > 0) {
+		sem->sleepers--;
+		ret = 1;
+	} else if (signal_pending(tsk)) {
+		atomic_inc(&sem->count);
+		ret = -EINTR;
+	}
+	spin_unlock_irqrestore(&semaphore_wake_lock, flags);
+	return ret;
+}
+
+/*
+ * waking_non_zero_trylock:
+ *	1	failed to lock
+ *	0	got the lock
+ *
+ * We must undo the sem->count down_trylock() increment while we are
+ * protected by the spinlock in order to make atomic this atomic_inc() with the
+ * atomic_read() in wake_one_more(), otherwise we can race. -arca
+ */
+static __inline__ int waking_non_zero_trylock(struct semaphore *sem)
+{
+	unsigned long flags;
+	int ret = 1;
+
+	spin_lock_irqsave(&semaphore_wake_lock, flags);
+	if (sem->sleepers <= 0)
+		atomic_inc(&sem->count);
+	else {
+		sem->sleepers--;
+		ret = 0;
+	}
+	spin_unlock_irqrestore(&semaphore_wake_lock, flags);
+	return ret;
+}
+
+#endif /* __ASM_SH64_SEMAPHORE_HELPER_H */
--- diff/include/asm-sh64/semaphore.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/semaphore.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,146 @@
+#ifndef __ASM_SH64_SEMAPHORE_H
+#define __ASM_SH64_SEMAPHORE_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/semaphore.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * SMP- and interrupt-safe semaphores.
+ *
+ * (C) Copyright 1996 Linus Torvalds
+ *
+ * SuperH verison by Niibe Yutaka
+ *  (Currently no asm implementation but generic C code...)
+ *
+ */
+
+#include <linux/linkage.h>
+#include <linux/spinlock.h>
+#include <linux/wait.h>
+#include <linux/rwsem.h>
+
+#include <asm/system.h>
+#include <asm/atomic.h>
+
+struct semaphore {
+	atomic_t count;
+	int sleepers;
+	wait_queue_head_t wait;
+#ifdef WAITQUEUE_DEBUG
+	long __magic;
+#endif
+};
+
+#ifdef WAITQUEUE_DEBUG
+# define __SEM_DEBUG_INIT(name) \
+		, (int)&(name).__magic
+#else
+# define __SEM_DEBUG_INIT(name)
+#endif
+
+#define __SEMAPHORE_INITIALIZER(name,count) \
+{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
+	__SEM_DEBUG_INIT(name) }
+
+#define __MUTEX_INITIALIZER(name) \
+	__SEMAPHORE_INITIALIZER(name,1)
+
+#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
+	struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
+
+#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
+#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
+
+static inline void sema_init (struct semaphore *sem, int val)
+{
+/*
+ *	*sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
+ *
+ * i'd rather use the more flexible initialization above, but sadly
+ * GCC 2.7.2.3 emits a bogus warning. EGCS doesnt. Oh well.
+ */
+	atomic_set(&sem->count, val);
+	sem->sleepers = 0;
+	init_waitqueue_head(&sem->wait);
+#ifdef WAITQUEUE_DEBUG
+	sem->__magic = (int)&sem->__magic;
+#endif
+}
+
+static inline void init_MUTEX (struct semaphore *sem)
+{
+	sema_init(sem, 1);
+}
+
+static inline void init_MUTEX_LOCKED (struct semaphore *sem)
+{
+	sema_init(sem, 0);
+}
+
+#if 0
+asmlinkage void __down_failed(void /* special register calling convention */);
+asmlinkage int  __down_failed_interruptible(void  /* params in registers */);
+asmlinkage int  __down_failed_trylock(void  /* params in registers */);
+asmlinkage void __up_wakeup(void /* special register calling convention */);
+#endif
+
+asmlinkage void __down(struct semaphore * sem);
+asmlinkage int  __down_interruptible(struct semaphore * sem);
+asmlinkage int  __down_trylock(struct semaphore * sem);
+asmlinkage void __up(struct semaphore * sem);
+
+extern spinlock_t semaphore_wake_lock;
+
+static inline void down(struct semaphore * sem)
+{
+#ifdef WAITQUEUE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
+
+	if (atomic_dec_return(&sem->count) < 0)
+		__down(sem);
+}
+
+static inline int down_interruptible(struct semaphore * sem)
+{
+	int ret = 0;
+#ifdef WAITQUEUE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
+
+	if (atomic_dec_return(&sem->count) < 0)
+		ret = __down_interruptible(sem);
+	return ret;
+}
+
+static inline int down_trylock(struct semaphore * sem)
+{
+	int ret = 0;
+#ifdef WAITQUEUE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
+
+	if (atomic_dec_return(&sem->count) < 0)
+		ret = __down_trylock(sem);
+	return ret;
+}
+
+/*
+ * Note! This is subtle. We jump to wake people up only if
+ * the semaphore was negative (== somebody was waiting on it).
+ */
+static inline void up(struct semaphore * sem)
+{
+#ifdef WAITQUEUE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
+	if (atomic_inc_return(&sem->count) <= 0)
+		__up(sem);
+}
+
+#endif /* __ASM_SH64_SEMAPHORE_H */
--- diff/include/asm-sh64/sembuf.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/sembuf.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,36 @@
+#ifndef __ASM_SH64_SEMBUF_H
+#define __ASM_SH64_SEMBUF_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/sembuf.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+/*
+ * The semid64_ds structure for i386 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct semid64_ds {
+	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */
+	__kernel_time_t	sem_otime;		/* last semop time */
+	unsigned long	__unused1;
+	__kernel_time_t	sem_ctime;		/* last change time */
+	unsigned long	__unused2;
+	unsigned long	sem_nsems;		/* no. of semaphores in array */
+	unsigned long	__unused3;
+	unsigned long	__unused4;
+};
+
+#endif /* __ASM_SH64_SEMBUF_H */
--- diff/include/asm-sh64/serial.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/serial.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,33 @@
+/*
+ * include/asm-sh/serial.h
+ *
+ * Configuration details for 8250, 16450, 16550, etc. serial ports
+ */
+
+#ifndef _ASM_SERIAL_H
+#define _ASM_SERIAL_H
+
+/*
+ * This assumes you have a 1.8432 MHz clock for your UART.
+ *
+ * It'd be nice if someone built a serial card with a 24.576 MHz
+ * clock, since the 16550A is capable of handling a top speed of 1.5
+ * megabits/second; but this requires the faster clock.
+ */
+#define BASE_BAUD ( 1843200 / 16 )
+
+#define RS_TABLE_SIZE  2
+
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
+
+#define STD_SERIAL_PORT_DEFNS			\
+	/* UART CLK   PORT IRQ     FLAGS        */			\
+	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\
+	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }	/* ttyS1 */
+
+#define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS
+
+/* XXX: This should be moved ino irq.h */
+#define irq_cannonicalize(x) (x)
+
+#endif /* _ASM_SERIAL_H */
--- diff/include/asm-sh64/shmbuf.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/shmbuf.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,53 @@
+#ifndef __ASM_SH64_SHMBUF_H
+#define __ASM_SH64_SHMBUF_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/shmbuf.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+/*
+ * The shmid64_ds structure for i386 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+	struct ipc64_perm	shm_perm;	/* operation perms */
+	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_time_t		shm_atime;	/* last attach time */
+	unsigned long		__unused1;
+	__kernel_time_t		shm_dtime;	/* last detach time */
+	unsigned long		__unused2;
+	__kernel_time_t		shm_ctime;	/* last change time */
+	unsigned long		__unused3;
+	__kernel_pid_t		shm_cpid;	/* pid of creator */
+	__kernel_pid_t		shm_lpid;	/* pid of last operator */
+	unsigned long		shm_nattch;	/* no. of current attaches */
+	unsigned long		__unused4;
+	unsigned long		__unused5;
+};
+
+struct shminfo64 {
+	unsigned long	shmmax;
+	unsigned long	shmmin;
+	unsigned long	shmmni;
+	unsigned long	shmseg;
+	unsigned long	shmall;
+	unsigned long	__unused1;
+	unsigned long	__unused2;
+	unsigned long	__unused3;
+	unsigned long	__unused4;
+};
+
+#endif /* __ASM_SH64_SHMBUF_H */
--- diff/include/asm-sh64/shmparam.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/shmparam.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,20 @@
+#ifndef __ASM_SH64_SHMPARAM_H
+#define __ASM_SH64_SHMPARAM_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/shmparam.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <asm/cache.h>
+
+/* attach addr a multiple of this */
+#define	SHMLBA	(cpu_data->dcache.sets * L1_CACHE_BYTES)
+
+#endif /* __ASM_SH64_SHMPARAM_H */
--- diff/include/asm-sh64/sigcontext.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/sigcontext.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,30 @@
+#ifndef __ASM_SH64_SIGCONTEXT_H
+#define __ASM_SH64_SIGCONTEXT_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/sigcontext.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+struct sigcontext {
+	unsigned long	oldmask;
+
+	/* CPU registers */
+	unsigned long long sc_regs[63];
+	unsigned long long sc_tregs[8];
+	unsigned long long sc_pc;
+	unsigned long long sc_sr;
+
+	/* FPU registers */
+	unsigned long long sc_fpregs[32];
+	unsigned int sc_fpscr;
+	unsigned int sc_fpvalid;
+};
+
+#endif /* __ASM_SH64_SIGCONTEXT_H */
--- diff/include/asm-sh64/siginfo.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/siginfo.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_SIGINFO_H
+#define __ASM_SH64_SIGINFO_H
+
+#include <asm-generic/siginfo.h>
+
+#endif /* __ASM_SH64_SIGINFO_H */
--- diff/include/asm-sh64/signal.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/signal.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,185 @@
+#ifndef __ASM_SH64_SIGNAL_H
+#define __ASM_SH64_SIGNAL_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/signal.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <linux/types.h>
+#include <asm/processor.h>
+
+/* Avoid too many header ordering problems.  */
+struct siginfo;
+
+#define _NSIG		64
+#define _NSIG_BPW	32
+#define _NSIG_WORDS	(_NSIG / _NSIG_BPW)
+
+typedef unsigned long old_sigset_t;		/* at least 32 bits */
+
+typedef struct {
+	unsigned long sig[_NSIG_WORDS];
+} sigset_t;
+
+#define SIGHUP		 1
+#define SIGINT		 2
+#define SIGQUIT		 3
+#define SIGILL		 4
+#define SIGTRAP		 5
+#define SIGABRT		 6
+#define SIGIOT		 6
+#define SIGBUS		 7
+#define SIGFPE		 8
+#define SIGKILL		 9
+#define SIGUSR1		10
+#define SIGSEGV		11
+#define SIGUSR2		12
+#define SIGPIPE		13
+#define SIGALRM		14
+#define SIGTERM		15
+#define SIGSTKFLT	16
+#define SIGCHLD		17
+#define SIGCONT		18
+#define SIGSTOP		19
+#define SIGTSTP		20
+#define SIGTTIN		21
+#define SIGTTOU		22
+#define SIGURG		23
+#define SIGXCPU		24
+#define SIGXFSZ		25
+#define SIGVTALRM	26
+#define SIGPROF		27
+#define SIGWINCH	28
+#define SIGIO		29
+#define SIGPOLL		SIGIO
+/*
+#define SIGLOST		29
+*/
+#define SIGPWR		30
+#define SIGSYS		31
+#define	SIGUNUSED	31
+
+/* These should not be considered constants from userland.  */
+#define SIGRTMIN	32
+#define SIGRTMAX	(_NSIG-1)
+
+/*
+ * SA_FLAGS values:
+ *
+ * SA_ONSTACK indicates that a registered stack_t will be used.
+ * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
+ * SA_RESTART flag to get restarting signals (which were the default long ago)
+ * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
+ * SA_RESETHAND clears the handler when the signal is delivered.
+ * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
+ * SA_NODEFER prevents the current signal from being masked in the handler.
+ *
+ * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
+ * Unix names RESETHAND and NODEFER respectively.
+ */
+#define SA_NOCLDSTOP	0x00000001
+#define SA_NOCLDWAIT	0x00000002 /* not supported yet */
+#define SA_SIGINFO	0x00000004
+#define SA_ONSTACK	0x08000000
+#define SA_RESTART	0x10000000
+#define SA_NODEFER	0x40000000
+#define SA_RESETHAND	0x80000000
+
+#define SA_NOMASK	SA_NODEFER
+#define SA_ONESHOT	SA_RESETHAND
+#define SA_INTERRUPT	0x20000000 /* dummy -- ignored */
+
+#define SA_RESTORER	0x04000000
+
+/*
+ * sigaltstack controls
+ */
+#define SS_ONSTACK	1
+#define SS_DISABLE	2
+
+#define MINSIGSTKSZ	2048
+#define SIGSTKSZ	THREAD_SIZE
+
+#ifdef __KERNEL__
+
+/*
+ * These values of sa_flags are used only by the kernel as part of the
+ * irq handling routines.
+ *
+ * SA_INTERRUPT is also used by the irq handling routines.
+ * SA_SHIRQ is for shared interrupt support on PCI and EISA.
+ */
+#define SA_PROBE		SA_ONESHOT
+#define SA_SAMPLE_RANDOM	SA_RESTART
+#define SA_SHIRQ		0x04000000
+#endif
+
+#define SIG_BLOCK          0	/* for blocking signals */
+#define SIG_UNBLOCK        1	/* for unblocking signals */
+#define SIG_SETMASK        2	/* for setting the signal mask */
+
+/* Type of a signal handler.  */
+typedef void (*__sighandler_t)(int);
+
+#define SIG_DFL	((__sighandler_t)0)	/* default signal handling */
+#define SIG_IGN	((__sighandler_t)1)	/* ignore signal */
+#define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
+
+#ifdef __KERNEL__
+struct old_sigaction {
+	__sighandler_t sa_handler;
+	old_sigset_t sa_mask;
+	unsigned long sa_flags;
+	void (*sa_restorer)(void);
+};
+
+struct sigaction {
+	__sighandler_t sa_handler;
+	unsigned long sa_flags;
+	void (*sa_restorer)(void);
+	sigset_t sa_mask;		/* mask last for extensibility */
+};
+
+struct k_sigaction {
+	struct sigaction sa;
+};
+#else
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+struct sigaction {
+	union {
+	  __sighandler_t _sa_handler;
+	  void (*_sa_sigaction)(int, struct siginfo *, void *);
+	} _u;
+	sigset_t sa_mask;
+	unsigned long sa_flags;
+	void (*sa_restorer)(void);
+};
+
+#define sa_handler	_u._sa_handler
+#define sa_sigaction	_u._sa_sigaction
+
+#endif /* __KERNEL__ */
+
+typedef struct sigaltstack {
+	void *ss_sp;
+	int ss_flags;
+	size_t ss_size;
+} stack_t;
+
+#ifdef __KERNEL__
+#include <asm/sigcontext.h>
+
+#define sigmask(sig)	(1UL << ((sig) - 1))
+#define ptrace_signal_deliver(regs, cookie) do { } while (0)
+
+#endif /* __KERNEL__ */
+
+#endif /* __ASM_SH64_SIGNAL_H */
--- diff/include/asm-sh64/smp.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/smp.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,15 @@
+#ifndef __ASM_SH64_SMP_H
+#define __ASM_SH64_SMP_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/smp.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#endif /* __ASM_SH64_SMP_H */
--- diff/include/asm-sh64/smplock.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/smplock.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,77 @@
+#ifndef __ASM_SH64_SMPLOCK_H
+#define __ASM_SH64_SMPLOCK_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/smplock.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <linux/config.h>
+
+#ifndef CONFIG_SMP
+
+#define lock_kernel()				do { } while(0)
+#define unlock_kernel()				do { } while(0)
+#define release_kernel_lock(task, cpu, depth)	((depth) = 1)
+#define reacquire_kernel_lock(task, cpu, depth)	do { } while(0)
+
+#else
+
+#error "We do not support SMP on SH64 yet"
+/*
+ * Default SMP lock implementation
+ */
+
+#include <linux/interrupt.h>
+#include <asm/spinlock.h>
+
+extern spinlock_t kernel_flag;
+
+/*
+ * Getting the big kernel lock.
+ *
+ * This cannot happen asynchronously,
+ * so we only need to worry about other
+ * CPU's.
+ */
+extern __inline__ void lock_kernel(void)
+{
+	if (!++current->lock_depth)
+		spin_lock(&kernel_flag);
+}
+
+extern __inline__ void unlock_kernel(void)
+{
+	if (--current->lock_depth < 0)
+		spin_unlock(&kernel_flag);
+}
+
+/*
+ * Release global kernel lock and global interrupt lock
+ */
+#define release_kernel_lock(task, cpu) \
+do { \
+	if (task->lock_depth >= 0) \
+		spin_unlock(&kernel_flag); \
+	release_irqlock(cpu); \
+	__sti(); \
+} while (0)
+
+/*
+ * Re-acquire the kernel lock
+ */
+#define reacquire_kernel_lock(task) \
+do { \
+	if (task->lock_depth >= 0) \
+		spin_lock(&kernel_flag); \
+} while (0)
+
+#endif /* CONFIG_SMP */
+
+#endif /* __ASM_SH64_SMPLOCK_H */
--- diff/include/asm-sh64/socket.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/socket.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_SOCKET_H
+#define __ASM_SH64_SOCKET_H
+
+#include <asm-sh/socket.h>
+
+#endif /* __ASM_SH64_SOCKET_H */
--- diff/include/asm-sh64/sockios.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/sockios.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,24 @@
+#ifndef __ASM_SH64_SOCKIOS_H
+#define __ASM_SH64_SOCKIOS_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/sockios.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+/* Socket-level I/O control calls. */
+#define FIOGETOWN	_IOR('f', 123, int)
+#define FIOSETOWN 	_IOW('f', 124, int)
+
+#define SIOCATMARK	_IOR('s', 7, int)
+#define SIOCSPGRP	_IOW('s', 8, pid_t)
+#define SIOCGPGRP	_IOR('s', 9, pid_t)
+
+#define SIOCGSTAMP	_IOR('s', 100, struct timeval) /* Get stamp - linux-specific */
+#endif /* __ASM_SH64_SOCKIOS_H */
--- diff/include/asm-sh64/softirq.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/softirq.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,30 @@
+#ifndef __ASM_SH_SOFTIRQ_H
+#define __ASM_SH_SOFTIRQ_H
+
+#include <asm/atomic.h>
+#include <asm/hardirq.h>
+
+#define local_bh_disable()			\
+do {						\
+	local_bh_count(smp_processor_id())++;	\
+	barrier();				\
+} while (0)
+
+#define __local_bh_enable()			\
+do {						\
+	barrier();				\
+	local_bh_count(smp_processor_id())--;	\
+} while (0)
+
+#define local_bh_enable()				\
+do {							\
+	barrier();					\
+	if (!--local_bh_count(smp_processor_id())	\
+	    && softirq_pending(smp_processor_id())) {	\
+		do_softirq();				\
+	}						\
+} while (0)
+
+#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
+
+#endif /* __ASM_SH_SOFTIRQ_H */
--- diff/include/asm-sh64/spinlock.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/spinlock.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,17 @@
+#ifndef __ASM_SH64_SPINLOCK_H
+#define __ASM_SH64_SPINLOCK_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/spinlock.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#error "No SMP on SH64"
+
+#endif /* __ASM_SH64_SPINLOCK_H */
--- diff/include/asm-sh64/stat.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/stat.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,88 @@
+#ifndef __ASM_SH64_STAT_H
+#define __ASM_SH64_STAT_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/stat.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+struct __old_kernel_stat {
+	unsigned short st_dev;
+	unsigned short st_ino;
+	unsigned short st_mode;
+	unsigned short st_nlink;
+	unsigned short st_uid;
+	unsigned short st_gid;
+	unsigned short st_rdev;
+	unsigned long  st_size;
+	unsigned long  st_atime;
+	unsigned long  st_mtime;
+	unsigned long  st_ctime;
+};
+
+struct stat {
+	unsigned short st_dev;
+	unsigned short __pad1;
+	unsigned long st_ino;
+	unsigned short st_mode;
+	unsigned short st_nlink;
+	unsigned short st_uid;
+	unsigned short st_gid;
+	unsigned short st_rdev;
+	unsigned short __pad2;
+	unsigned long  st_size;
+	unsigned long  st_blksize;
+	unsigned long  st_blocks;
+	unsigned long  st_atime;
+	unsigned long  st_atime_nsec;
+	unsigned long  st_mtime;
+	unsigned long  st_mtime_nsec;
+	unsigned long  st_ctime;
+	unsigned long  st_ctime_nsec;
+	unsigned long  __unused4;
+	unsigned long  __unused5;
+};
+
+/* This matches struct stat64 in glibc2.1, hence the absolutely
+ * insane amounts of padding around dev_t's.
+ */
+struct stat64 {
+	unsigned short	st_dev;
+	unsigned char	__pad0[10];
+
+	unsigned long	st_ino;
+	unsigned int	st_mode;
+	unsigned int	st_nlink;
+
+	unsigned long	st_uid;
+	unsigned long	st_gid;
+
+	unsigned short	st_rdev;
+	unsigned char	__pad3[10];
+
+	long long	st_size;
+	unsigned long	st_blksize;
+
+	unsigned long	st_blocks;	/* Number 512-byte blocks allocated. */
+	unsigned long	__pad4;		/* future possible st_blocks high bits */
+
+	unsigned long	st_atime;
+	unsigned long	st_atime_nsec;
+
+	unsigned long	st_mtime;
+	unsigned long	st_mtime_nsec;
+
+	unsigned long	st_ctime;
+	unsigned long	st_ctime_nsec;	/* will be high 32 bits of ctime someday */
+
+	unsigned long	__unused1;
+	unsigned long	__unused2;
+};
+
+#endif /* __ASM_SH64_STAT_H */
--- diff/include/asm-sh64/statfs.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/statfs.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_STATFS_H
+#define __ASM_SH64_STATFS_H
+
+#include <asm-generic/statfs.h>
+
+#endif /* __ASM_SH64_STATFS_H */
--- diff/include/asm-sh64/string.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/string.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,21 @@
+#ifndef __ASM_SH64_STRING_H
+#define __ASM_SH64_STRING_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/string.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ * Empty on purpose. ARCH SH64 ASM libs are out of the current project scope.
+ *
+ */
+
+#define __HAVE_ARCH_MEMCPY
+
+extern void *memcpy(void *dest, const void *src, size_t count);
+
+#endif
--- diff/include/asm-sh64/system.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/system.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,194 @@
+#ifndef __ASM_SH64_SYSTEM_H
+#define __ASM_SH64_SYSTEM_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/system.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ * Copyright (C) 2004  Richard Curnow
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <asm/registers.h>
+#include <asm/processor.h>
+
+/*
+ *	switch_to() should switch tasks to task nr n, first
+ */
+
+typedef struct {
+	unsigned long seg;
+} mm_segment_t;
+
+extern struct task_struct *sh64_switch_to(struct task_struct *prev,
+					  struct thread_struct *prev_thread,
+					  struct task_struct *next,
+					  struct thread_struct *next_thread);
+
+#define switch_to(prev,next,last) \
+	do {\
+		if (last_task_used_math != next) {\
+			struct pt_regs *regs = next->thread.uregs;\
+			if (regs) regs->sr |= SR_FD;\
+		}\
+		last = sh64_switch_to(prev, &prev->thread, next, &next->thread);\
+	} while(0)
+
+#define nop() __asm__ __volatile__ ("nop")
+
+#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+
+#define tas(ptr) (xchg((ptr), 1))
+
+extern void __xchg_called_with_bad_pointer(void);
+
+#define mb()	__asm__ __volatile__ ("synco": : :"memory")
+#define rmb()	mb()
+#define wmb()	__asm__ __volatile__ ("synco": : :"memory")
+#define read_barrier_depends()	do { } while (0)
+
+#ifdef CONFIG_SMP
+#define smp_mb()	mb()
+#define smp_rmb()	rmb()
+#define smp_wmb()	wmb()
+#define smp_read_barrier_depends()	read_barrier_depends()
+#else
+#define smp_mb()	barrier()
+#define smp_rmb()	barrier()
+#define smp_wmb()	barrier()
+#define smp_read_barrier_depends()	do { } while (0)
+#endif /* CONFIG_SMP */
+
+#define set_rmb(var, value) do { xchg(&var, value); } while (0)
+#define set_mb(var, value) set_rmb(var, value)
+#define set_wmb(var, value) do { var = value; wmb(); } while (0)
+
+/* Interrupt Control */
+#ifndef HARD_CLI
+#define SR_MASK_L 0x000000f0L
+#define SR_MASK_LL 0x00000000000000f0LL
+#else
+#define SR_MASK_L 0x10000000L
+#define SR_MASK_LL 0x0000000010000000LL
+#endif
+
+static __inline__ void local_irq_enable(void)
+{
+	/* cli/sti based on SR.BL */
+	unsigned long long __dummy0, __dummy1=~SR_MASK_LL;
+
+	__asm__ __volatile__("getcon	" __SR ", %0\n\t"
+			     "and	%0, %1, %0\n\t"
+			     "putcon	%0, " __SR "\n\t"
+			     : "=&r" (__dummy0)
+			     : "r" (__dummy1));
+}
+
+static __inline__ void local_irq_disable(void)
+{
+	/* cli/sti based on SR.BL */
+	unsigned long long __dummy0, __dummy1=SR_MASK_LL;
+	__asm__ __volatile__("getcon	" __SR ", %0\n\t"
+			     "or	%0, %1, %0\n\t"
+			     "putcon	%0, " __SR "\n\t"
+			     : "=&r" (__dummy0)
+			     : "r" (__dummy1));
+}
+
+#define local_save_flags(x) 						\
+(__extension__ ({	unsigned long long __dummy=SR_MASK_LL;		\
+	__asm__ __volatile__(						\
+		"getcon	" __SR ", %0\n\t"				\
+		"and	%0, %1, %0"					\
+		: "=&r" (x)						\
+		: "r" (__dummy));}))
+
+#define local_irq_save(x)						\
+(__extension__ ({	unsigned long long __d2=SR_MASK_LL, __d1;	\
+	__asm__ __volatile__(          	         			\
+		"getcon	" __SR ", %1\n\t" 				\
+		"or	%1, r63, %0\n\t"				\
+		"or	%1, %2, %1\n\t"					\
+		"putcon	%1, " __SR "\n\t"    				\
+		"and	%0, %2, %0"    					\
+		: "=&r" (x), "=&r" (__d1)				\
+		: "r" (__d2));}));
+
+#define local_irq_restore(x) do { 					\
+	if ( ((x) & SR_MASK_L) == 0 )		/* dropping to 0 ? */	\
+		local_irq_enable();		/* yes...re-enable */	\
+} while (0)
+
+#define irqs_disabled()			\
+({					\
+	unsigned long flags;		\
+	local_save_flags(flags);	\
+	(flags != 0);			\
+})
+
+extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val)
+{
+	unsigned long flags, retval;
+
+	local_irq_save(flags);
+	retval = *m;
+	*m = val;
+	local_irq_restore(flags);
+	return retval;
+}
+
+extern __inline__ unsigned long xchg_u8(volatile unsigned char * m, unsigned long val)
+{
+	unsigned long flags, retval;
+
+	local_irq_save(flags);
+	retval = *m;
+	*m = val & 0xff;
+	local_irq_restore(flags);
+	return retval;
+}
+
+static __inline__ unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
+{
+	switch (size) {
+	case 4:
+		return xchg_u32(ptr, x);
+		break;
+	case 1:
+		return xchg_u8(ptr, x);
+		break;
+	}
+	__xchg_called_with_bad_pointer();
+	return x;
+}
+
+/* XXX
+ * disable hlt during certain critical i/o operations
+ */
+#define HAVE_DISABLE_HLT
+void disable_hlt(void);
+void enable_hlt(void);
+
+
+#define smp_mb()        barrier()
+#define smp_rmb()       barrier()
+#define smp_wmb()       barrier()
+
+#ifdef CONFIG_SH_ALPHANUMERIC
+/* This is only used for debugging. */
+extern void print_seg(char *file,int line);
+#define PLS() print_seg(__FILE__,__LINE__)
+#else	/* CONFIG_SH_ALPHANUMERIC */
+#define PLS()
+#endif	/* CONFIG_SH_ALPHANUMERIC */
+
+#define PL() printk("@ <%s,%s:%d>\n",__FILE__,__FUNCTION__,__LINE__)
+
+#endif /* __ASM_SH64_SYSTEM_H */
--- diff/include/asm-sh64/termbits.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/termbits.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_TERMBITS_H
+#define __ASM_SH64_TERMBITS_H
+
+#include <asm-sh/termbits.h>
+
+#endif /* __ASM_SH64_TERMBITS_H */
--- diff/include/asm-sh64/termios.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/termios.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,117 @@
+#ifndef __ASM_SH64_TERMIOS_H
+#define __ASM_SH64_TERMIOS_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/termios.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <asm/termbits.h>
+#include <asm/ioctls.h>
+
+struct winsize {
+	unsigned short ws_row;
+	unsigned short ws_col;
+	unsigned short ws_xpixel;
+	unsigned short ws_ypixel;
+};
+
+#define NCC 8
+struct termio {
+	unsigned short c_iflag;		/* input mode flags */
+	unsigned short c_oflag;		/* output mode flags */
+	unsigned short c_cflag;		/* control mode flags */
+	unsigned short c_lflag;		/* local mode flags */
+	unsigned char c_line;		/* line discipline */
+	unsigned char c_cc[NCC];	/* control characters */
+};
+
+/* modem lines */
+#define TIOCM_LE	0x001
+#define TIOCM_DTR	0x002
+#define TIOCM_RTS	0x004
+#define TIOCM_ST	0x008
+#define TIOCM_SR	0x010
+#define TIOCM_CTS	0x020
+#define TIOCM_CAR	0x040
+#define TIOCM_RNG	0x080
+#define TIOCM_DSR	0x100
+#define TIOCM_CD	TIOCM_CAR
+#define TIOCM_RI	TIOCM_RNG
+#define TIOCM_OUT1	0x2000
+#define TIOCM_OUT2	0x4000
+#define TIOCM_LOOP	0x8000
+
+/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+
+/* line disciplines */
+#define N_TTY		0
+#define N_SLIP		1
+#define N_MOUSE		2
+#define N_PPP		3
+#define N_STRIP		4
+#define N_AX25		5
+#define N_X25		6	/* X.25 async */
+#define N_6PACK		7
+#define N_MASC		8	/* Reserved for Mobitex module <kaz@cafe.net> */
+#define N_R3964		9	/* Reserved for Simatic R3964 module */
+#define N_PROFIBUS_FDL	10	/* Reserved for Profibus <Dave@mvhi.com> */
+#define N_IRDA		11	/* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */
+#define N_SMSBLOCK	12	/* SMS block mode - for talking to GSM data cards about SMS messages */
+#define N_HDLC		13	/* synchronous HDLC */
+#define N_SYNC_PPP	14
+#define N_HCI		15	/* Bluetooth HCI UART */
+
+#ifdef __KERNEL__
+
+/*	intr=^C		quit=^\		erase=del	kill=^U
+	eof=^D		vtime=\0	vmin=\1		sxtc=\0
+	start=^Q	stop=^S		susp=^Z		eol=\0
+	reprint=^R	discard=^U	werase=^W	lnext=^V
+	eol2=\0
+*/
+#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
+
+/*
+ * Translate a "termio" structure into a "termios". Ugh.
+ */
+#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
+	unsigned short __tmp; \
+	get_user(__tmp,&(termio)->x); \
+	*(unsigned short *) &(termios)->x = __tmp; \
+}
+
+#define user_termio_to_kernel_termios(termios, termio) \
+({ \
+	SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
+	SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
+	SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
+	SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
+	copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
+})
+
+/*
+ * Translate a "termios" structure into a "termio". Ugh.
+ */
+#define kernel_termios_to_user_termio(termio, termios) \
+({ \
+	put_user((termios)->c_iflag, &(termio)->c_iflag); \
+	put_user((termios)->c_oflag, &(termio)->c_oflag); \
+	put_user((termios)->c_cflag, &(termio)->c_cflag); \
+	put_user((termios)->c_lflag, &(termio)->c_lflag); \
+	put_user((termios)->c_line,  &(termio)->c_line); \
+	copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
+})
+
+#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
+#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
+
+#endif	/* __KERNEL__ */
+
+#endif	/* __ASM_SH64_TERMIOS_H */
--- diff/include/asm-sh64/thread_info.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/thread_info.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,82 @@
+#ifndef __ASM_SH64_THREAD_INFO_H
+#define __ASM_SH64_THREAD_INFO_H
+
+/*
+ * SuperH 5 version
+ * Copyright (C) 2003  Paul Mundt
+ */
+
+#ifdef __KERNEL__
+
+#ifndef __ASSEMBLY__
+#include <asm/registers.h>
+
+/*
+ * low level task data that entry.S needs immediate access to
+ * - this struct should fit entirely inside of one cache line
+ * - this struct shares the supervisor stack pages
+ * - if the contents of this structure are changed, the assembly constants must also be changed
+ */
+struct thread_info {
+	struct task_struct	*task;		/* main task structure */
+	struct exec_domain	*exec_domain;	/* execution domain */
+	__u32			flags;		/* low level flags */
+	/* Put the 4 32-bit fields together to make asm offsetting easier. */
+	__s32			preempt_count; /* 0 => preemptable, <0 => BUG */
+	__u16			cpu;
+
+	mm_segment_t		addr_limit;
+	struct restart_block	restart_block;
+
+	__u8			supervisor_stack[0];
+};
+
+/*
+ * macros/functions for gaining access to the thread information structure
+ */
+#define INIT_THREAD_INFO(tsk)			\
+{						\
+	.task		= &tsk,			\
+	.exec_domain	= &default_exec_domain,	\
+	.flags		= 0,			\
+	.cpu		= 0,			\
+	.preempt_count	= 1,			\
+	.addr_limit     = KERNEL_DS,            \
+	.restart_block	= {			\
+		.fn = do_no_restart_syscall,	\
+	},					\
+}
+
+#define init_thread_info	(init_thread_union.thread_info)
+#define init_stack		(init_thread_union.stack)
+
+/* how to get the thread information struct from C */
+static inline struct thread_info *current_thread_info(void)
+{
+	struct thread_info *ti;
+
+	__asm__ __volatile__ ("getcon " __KCR0 ", %0\n\t" : "=r" (ti));
+
+	return ti;
+}
+
+/* thread information allocation */
+#define alloc_thread_info(ti) ((struct thread_info *) __get_free_pages(GFP_KERNEL,2))
+#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
+#define get_thread_info(ti) get_task_struct((ti)->task)
+#define put_thread_info(ti) put_task_struct((ti)->task)
+
+#endif /* __ASSEMBLY__ */
+
+#define PREEMPT_ACTIVE		0x4000000
+
+/* thread information flags */
+#define TIF_SYSCALL_TRACE	0	/* syscall trace active */
+#define TIF_SIGPENDING		2	/* signal pending */
+#define TIF_NEED_RESCHED	3	/* rescheduling necessary */
+
+#define THREAD_SIZE	16384
+
+#endif /* __KERNEL__ */
+
+#endif /* __ASM_SH64_THREAD_INFO_H */
--- diff/include/asm-sh64/timex.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/timex.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,36 @@
+#ifndef __ASM_SH64_TIMEX_H
+#define __ASM_SH64_TIMEX_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/timex.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ *
+ * sh-5 architecture timex specifications
+ *
+ */
+
+#define CLOCK_TICK_RATE	1193180 /* Underlying HZ */
+#define CLOCK_TICK_FACTOR	20	/* Factor of both 1000000 and CLOCK_TICK_RATE */
+#define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \
+	(1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \
+		<< (SHIFT_SCALE-SHIFT_HZ)) / HZ)
+
+typedef unsigned long cycles_t;
+
+extern cycles_t cacheflush_time;
+
+static __inline__ cycles_t get_cycles (void)
+{
+	return 0;
+}
+
+#define vxtime_lock()		do {} while (0)
+#define vxtime_unlock()		do {} while (0)
+
+#endif /* __ASM_SH64_TIMEX_H */
--- diff/include/asm-sh64/tlb.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/tlb.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,92 @@
+/*
+ * include/asm-sh64/tlb.h
+ *
+ * Copyright (C) 2003  Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ */
+#ifndef __ASM_SH64_TLB_H
+#define __ASM_SH64_TLB_H
+
+/*
+ * Note! These are mostly unused, we just need the xTLB_LAST_VAR_UNRESTRICTED
+ * for head.S! Once this limitation is gone, we can clean the rest of this up.
+ */
+
+/* ITLB defines */
+#define ITLB_FIXED	0x00000000	/* First fixed ITLB, see head.S */
+#define ITLB_LAST_VAR_UNRESTRICTED	0x000003F0	/* Last ITLB */
+
+/* DTLB defines */
+#define DTLB_FIXED	0x00800000	/* First fixed DTLB, see head.S */
+#define DTLB_LAST_VAR_UNRESTRICTED	0x008003F0	/* Last DTLB */
+
+#ifndef __ASSEMBLY__
+
+/**
+ * for_each_dtlb_entry
+ *
+ * @tlb:	TLB entry
+ *
+ * Iterate over free (non-wired) DTLB entries
+ */
+#define for_each_dtlb_entry(tlb)		\
+	for (tlb  = cpu_data->dtlb.first;	\
+	     tlb <= cpu_data->dtlb.last;	\
+	     tlb += cpu_data->dtlb.step)
+
+/**
+ * for_each_itlb_entry
+ *
+ * @tlb:	TLB entry
+ *
+ * Iterate over free (non-wired) ITLB entries
+ */
+#define for_each_itlb_entry(tlb)		\
+	for (tlb  = cpu_data->itlb.first;	\
+	     tlb <= cpu_data->itlb.last;	\
+	     tlb += cpu_data->itlb.step)
+
+/**
+ * __flush_tlb_slot
+ *
+ * @slot:	Address of TLB slot.
+ *
+ * Flushes TLB slot @slot.
+ */
+static inline void __flush_tlb_slot(unsigned long long slot)
+{
+	__asm__ __volatile__ ("putcfg %0, 0, r63\n" : : "r" (slot));
+}
+
+/* arch/sh64/mm/tlb.c */
+extern int sh64_tlb_init(void);
+extern unsigned long long sh64_next_free_dtlb_entry(void);
+extern unsigned long long sh64_get_wired_dtlb_entry(void);
+extern int sh64_put_wired_dtlb_entry(unsigned long long entry);
+
+extern void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr, unsigned long asid, unsigned long paddr);
+extern void sh64_teardown_tlb_slot(unsigned long long config_addr);
+
+#define tlb_start_vma(tlb, vma) \
+	flush_cache_range(vma, vma->vm_start, vma->vm_end)
+
+#define tlb_end_vma(tlb, vma)	\
+	flush_tlb_range(vma, vma->vm_start, vma->vm_end)
+
+#define __tlb_remove_tlb_entry(tlb, pte, address)	do { } while (0)
+
+/*
+ * Flush whole TLBs for MM
+ */
+#define tlb_flush(tlb)		flush_tlb_mm((tlb)->mm)
+
+#include <asm-generic/tlb.h>
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __ASM_SH64_TLB_H */
+
--- diff/include/asm-sh64/tlbflush.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/tlbflush.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,31 @@
+#ifndef __ASM_SH64_TLBFLUSH_H
+#define __ASM_SH64_TLBFLUSH_H
+
+#include <asm/pgalloc.h>
+
+/*
+ * TLB flushing:
+ *
+ *  - flush_tlb() flushes the current mm struct TLBs
+ *  - flush_tlb_all() flushes all processes TLBs
+ *  - flush_tlb_mm(mm) flushes the specified mm context TLB's
+ *  - flush_tlb_page(vma, vmaddr) flushes one page
+ *  - flush_tlb_range(mm, start, end) flushes a range of pages
+ *
+ */
+
+extern void flush_tlb(void);
+extern void flush_tlb_all(void);
+extern void flush_tlb_mm(struct mm_struct *mm);
+extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
+			    unsigned long end);
+extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
+extern inline void flush_tlb_pgtables(struct mm_struct *mm,
+				      unsigned long start, unsigned long end)
+{
+}
+
+extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
+
+#endif /* __ASM_SH64_TLBFLUSH_H */
+
--- diff/include/asm-sh64/topology.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/topology.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef __ASM_SH64_TOPOLOGY_H
+#define __ASM_SH64_TOPOLOGY_H
+
+#include <asm-generic/topology.h>
+
+#endif /* __ASM_SH64_TOPOLOGY_H */
--- diff/include/asm-sh64/types.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/types.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,76 @@
+#ifndef __ASM_SH64_TYPES_H
+#define __ASM_SH64_TYPES_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/types.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#ifndef __ASSEMBLY__
+
+typedef unsigned short umode_t;
+
+/*
+ * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
+ * header files exported to user space
+ */
+
+typedef __signed__ char __s8;
+typedef unsigned char __u8;
+
+typedef __signed__ short __s16;
+typedef unsigned short __u16;
+
+typedef __signed__ int __s32;
+typedef unsigned int __u32;
+
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+#endif
+
+#endif /* __ASSEMBLY__ */
+
+/*
+ * These aren't exported outside the kernel to avoid name space clashes
+ */
+#ifdef __KERNEL__
+
+#ifndef __ASSEMBLY__
+
+typedef __signed__ char s8;
+typedef unsigned char u8;
+
+typedef __signed__ short s16;
+typedef unsigned short u16;
+
+typedef __signed__ int s32;
+typedef unsigned int u32;
+
+typedef __signed__ long long s64;
+typedef unsigned long long u64;
+
+/* DMA addresses come in generic and 64-bit flavours.  */
+
+#ifdef CONFIG_HIGHMEM64G
+typedef u64 dma_addr_t;
+#else
+typedef u32 dma_addr_t;
+#endif
+typedef u64 dma64_addr_t;
+
+typedef unsigned int kmem_bufctl_t;
+
+#endif /* __ASSEMBLY__ */
+
+#define BITS_PER_LONG 32
+
+#endif /* __KERNEL__ */
+
+#endif /* __ASM_SH64_TYPES_H */
--- diff/include/asm-sh64/uaccess.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/uaccess.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,317 @@
+#ifndef __ASM_SH64_UACCESS_H
+#define __ASM_SH64_UACCESS_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/uaccess.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003, 2004  Paul Mundt
+ *
+ * User space memory access functions
+ *
+ * Copyright (C) 1999  Niibe Yutaka
+ *
+ *  Based on:
+ *     MIPS implementation version 1.15 by
+ *              Copyright (C) 1996, 1997, 1998 by Ralf Baechle
+ *     and i386 version.
+ *
+ */
+
+#include <linux/errno.h>
+#include <linux/sched.h>
+
+#define VERIFY_READ    0
+#define VERIFY_WRITE   1
+
+/*
+ * The fs value determines whether argument validity checking should be
+ * performed or not.  If get_fs() == USER_DS, checking is performed, with
+ * get_fs() == KERNEL_DS, checking is bypassed.
+ *
+ * For historical reasons (Data Segment Register?), these macros are misnamed.
+ */
+
+#define MAKE_MM_SEG(s)	((mm_segment_t) { (s) })
+
+#define KERNEL_DS	MAKE_MM_SEG(0xFFFFFFFF)
+#define USER_DS		MAKE_MM_SEG(0x80000000)
+
+#define get_ds()	(KERNEL_DS)
+#define get_fs()        (current_thread_info()->addr_limit)
+#define set_fs(x)       (current_thread_info()->addr_limit=(x))
+
+#define segment_eq(a,b)	((a).seg == (b).seg)
+
+#define __addr_ok(addr) ((unsigned long)(addr) < (current_thread_info()->addr_limit.seg))
+
+/*
+ * Uhhuh, this needs 33-bit arithmetic. We have a carry..
+ *
+ * sum := addr + size;  carry? --> flag = true;
+ * if (sum >= addr_limit) flag = true;
+ */
+#define __range_ok(addr,size) (((unsigned long) (addr) + (size) < (current_thread_info()->addr_limit.seg)) ? 0 : 1)
+
+#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
+#define __access_ok(addr,size) (__range_ok(addr,size) == 0)
+
+extern inline int verify_area(int type, const void __user * addr, unsigned long size)
+{
+	return access_ok(type,addr,size) ? 0 : -EFAULT;
+}
+
+/*
+ * Uh, these should become the main single-value transfer routines ...
+ * They automatically use the right size if we just have the right
+ * pointer type ...
+ *
+ * As MIPS uses the same address space for kernel and user data, we
+ * can just do these as direct assignments.
+ *
+ * Careful to not
+ * (a) re-use the arguments for side effects (sizeof is ok)
+ * (b) require any knowledge of processes at this stage
+ */
+#define put_user(x,ptr)	__put_user_check((x),(ptr),sizeof(*(ptr)))
+#define get_user(x,ptr) __get_user_check((x),(ptr),sizeof(*(ptr)))
+
+/*
+ * The "__xxx" versions do not do address space checking, useful when
+ * doing multiple accesses to the same area (the user has to do the
+ * checks by hand with "access_ok()")
+ */
+#define __put_user(x,ptr) __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
+#define __get_user(x,ptr) __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
+
+/*
+ * The "xxx_ret" versions return constant specified in third argument, if
+ * something bad happens. These macros can be optimized for the
+ * case of just returning from the function xxx_ret is used.
+ */
+
+#define put_user_ret(x,ptr,ret) ({ \
+if (put_user(x,ptr)) return ret; })
+
+#define get_user_ret(x,ptr,ret) ({ \
+if (get_user(x,ptr)) return ret; })
+
+#define __put_user_ret(x,ptr,ret) ({ \
+if (__put_user(x,ptr)) return ret; })
+
+#define __get_user_ret(x,ptr,ret) ({ \
+if (__get_user(x,ptr)) return ret; })
+
+struct __large_struct { unsigned long buf[100]; };
+#define __m(x) (*(struct __large_struct *)(x))
+
+#define __get_user_size(x,ptr,size,retval)			\
+do {								\
+	retval = 0;						\
+	switch (size) {						\
+	case 1:							\
+		retval = __get_user_asm_b(x, ptr);		\
+		break;						\
+	case 2:							\
+		retval = __get_user_asm_w(x, ptr);		\
+		break;						\
+	case 4:							\
+		retval = __get_user_asm_l(x, ptr);		\
+		break;						\
+	case 8:							\
+		retval = __get_user_asm_q(x, ptr);		\
+		break;						\
+	default:						\
+		__get_user_unknown();				\
+		break;						\
+	}							\
+} while (0)
+
+#define __get_user_nocheck(x,ptr,size)				\
+({								\
+	long __gu_addr = (long)(ptr);				\
+	long __gu_err;						\
+	__typeof(*(ptr)) __gu_val;				\
+	__asm__ ("":"=r" (__gu_val));				\
+	__asm__ ("":"=r" (__gu_err));				\
+	__get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \
+	(x) = (__typeof__(*(ptr))) __gu_val;			\
+	__gu_err;						\
+})
+
+#define __get_user_check(x,ptr,size)				\
+({								\
+	long __gu_addr = (long)(ptr);				\
+	long __gu_err = -EFAULT;				\
+	__typeof(*(ptr)) __gu_val;				\
+	__asm__ ("":"=r" (__gu_val));				\
+	__asm__ ("":"=r" (__gu_err));				\
+	if (__access_ok(__gu_addr, (size)))			\
+		__get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \
+	(x) = (__typeof__(*(ptr))) __gu_val;			\
+	__gu_err;						\
+})
+
+extern long __get_user_asm_b(void *, long);
+extern long __get_user_asm_w(void *, long);
+extern long __get_user_asm_l(void *, long);
+extern long __get_user_asm_q(void *, long);
+extern void __get_user_unknown(void);
+
+#define __put_user_size(x,ptr,size,retval)			\
+do {								\
+	retval = 0;						\
+	switch (size) {						\
+	case 1:							\
+		retval = __put_user_asm_b(x, ptr);		\
+		break;						\
+	case 2:							\
+		retval = __put_user_asm_w(x, ptr);		\
+		break;						\
+	case 4:							\
+		retval = __put_user_asm_l(x, ptr);		\
+		break;						\
+	case 8:							\
+		retval = __put_user_asm_q(x, ptr);		\
+		break;						\
+	default:						\
+		__put_user_unknown();				\
+	}							\
+} while (0)
+
+#define __put_user_nocheck(x,ptr,size)				\
+({								\
+	long __pu_err;						\
+	__typeof__(*(ptr)) __pu_val = (x);			\
+	__put_user_size((void *)&__pu_val, (long)(ptr), (size), __pu_err); \
+	__pu_err;						\
+})
+
+#define __put_user_check(x,ptr,size)				\
+({								\
+	long __pu_err = -EFAULT;				\
+	long __pu_addr = (long)(ptr);				\
+	__typeof__(*(ptr)) __pu_val = (x);			\
+								\
+	if (__access_ok(__pu_addr, (size)))			\
+		__put_user_size((void *)&__pu_val, __pu_addr, (size), __pu_err);\
+	__pu_err;						\
+})
+
+extern long __put_user_asm_b(void *, long);
+extern long __put_user_asm_w(void *, long);
+extern long __put_user_asm_l(void *, long);
+extern long __put_user_asm_q(void *, long);
+extern void __put_user_unknown(void);
+
+
+/* Generic arbitrary sized copy.  */
+/* Return the number of bytes NOT copied */
+/* XXX: should be such that: 4byte and the rest. */
+extern __kernel_size_t __copy_user(void *__to, const void *__from, __kernel_size_t __n);
+
+#define copy_to_user(to,from,n) ({ \
+void *__copy_to = (void *) (to); \
+__kernel_size_t __copy_size = (__kernel_size_t) (n); \
+__kernel_size_t __copy_res; \
+if(__copy_size && __access_ok((unsigned long)__copy_to, __copy_size)) { \
+__copy_res = __copy_user(__copy_to, (void *) (from), __copy_size); \
+} else __copy_res = __copy_size; \
+__copy_res; })
+
+#define copy_to_user_ret(to,from,n,retval) ({ \
+if (copy_to_user(to,from,n)) \
+	return retval; \
+})
+
+#define __copy_to_user(to,from,n)		\
+	__copy_user((void *)(to),		\
+		    (void *)(from), n)
+
+#define __copy_to_user_ret(to,from,n,retval) ({ \
+if (__copy_to_user(to,from,n)) \
+	return retval; \
+})
+
+#define copy_from_user(to,from,n) ({ \
+void *__copy_to = (void *) (to); \
+void *__copy_from = (void *) (from); \
+__kernel_size_t __copy_size = (__kernel_size_t) (n); \
+__kernel_size_t __copy_res; \
+if(__copy_size && __access_ok((unsigned long)__copy_from, __copy_size)) { \
+__copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \
+} else __copy_res = __copy_size; \
+__copy_res; })
+
+#define copy_from_user_ret(to,from,n,retval) ({ \
+if (copy_from_user(to,from,n)) \
+	return retval; \
+})
+
+#define __copy_from_user(to,from,n)		\
+	__copy_user((void *)(to),		\
+		    (void *)(from), n)
+
+#define __copy_from_user_ret(to,from,n,retval) ({ \
+if (__copy_from_user(to,from,n)) \
+	return retval; \
+})
+
+/* XXX: Not sure it works well..
+   should be such that: 4byte clear and the rest. */
+extern __kernel_size_t __clear_user(void *addr, __kernel_size_t size);
+
+#define clear_user(addr,n) ({ \
+void * __cl_addr = (addr); \
+unsigned long __cl_size = (n); \
+if (__cl_size && __access_ok(((unsigned long)(__cl_addr)), __cl_size)) \
+__cl_size = __clear_user(__cl_addr, __cl_size); \
+__cl_size; })
+
+extern int __strncpy_from_user(unsigned long __dest, unsigned long __src, int __count);
+
+#define strncpy_from_user(dest,src,count) ({ \
+unsigned long __sfu_src = (unsigned long) (src); \
+int __sfu_count = (int) (count); \
+long __sfu_res = -EFAULT; \
+if(__access_ok(__sfu_src, __sfu_count)) { \
+__sfu_res = __strncpy_from_user((unsigned long) (dest), __sfu_src, __sfu_count); \
+} __sfu_res; })
+
+#define strlen_user(str) strnlen_user(str, ~0UL >> 1)
+
+/*
+ * Return the size of a string (including the ending 0!)
+ */
+extern long __strnlen_user(const char *__s, long __n);
+
+extern __inline__ long strnlen_user(const char *s, long n)
+{
+	if (!__addr_ok(s))
+		return 0;
+	else
+		return __strnlen_user(s, n);
+}
+
+struct exception_table_entry
+{
+	unsigned long insn, fixup;
+};
+
+#define ARCH_HAS_SEARCH_EXTABLE
+
+/* If gcc inlines memset, it will use st.q instructions.  Therefore, we need
+   kmalloc allocations to be 8-byte aligned.  Without this, the alignment
+   becomes BYTE_PER_WORD i.e. only 4 (since sizeof(long)==sizeof(void*)==4 on
+   sh64 at the moment). */
+#define ARCH_KMALLOC_MINALIGN 8
+
+/* Returns 0 if exception not found and fixup.unit otherwise.  */
+extern unsigned long search_exception_table(unsigned long addr);
+extern const struct exception_table_entry *search_exception_tables (unsigned long addr);
+
+#endif /* __ASM_SH64_UACCESS_H */
--- diff/include/asm-sh64/ucontext.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/ucontext.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,23 @@
+#ifndef __ASM_SH64_UCONTEXT_H
+#define __ASM_SH64_UCONTEXT_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/ucontext.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+struct ucontext {
+	unsigned long	  uc_flags;
+	struct ucontext  *uc_link;
+	stack_t		  uc_stack;
+	struct sigcontext uc_mcontext;
+	sigset_t	  uc_sigmask;	/* mask last for extensibility */
+};
+
+#endif /* __ASM_SH64_UCONTEXT_H */
--- diff/include/asm-sh64/unaligned.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/unaligned.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,28 @@
+#ifndef __ASM_SH64_UNALIGNED_H
+#define __ASM_SH64_UNALIGNED_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/unaligned.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <linux/string.h>
+
+
+/* Use memmove here, so gcc does not insert a __builtin_memcpy. */
+
+#define get_unaligned(ptr) \
+  ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
+
+#define put_unaligned(val, ptr)				\
+  ({ __typeof__(*(ptr)) __tmp = (val);			\
+     memmove((ptr), &__tmp, sizeof(*(ptr)));		\
+     (void)0; })
+
+#endif /* __ASM_SH64_UNALIGNED_H */
--- diff/include/asm-sh64/unistd.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/unistd.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,555 @@
+#ifndef __ASM_SH64_UNISTD_H
+#define __ASM_SH64_UNISTD_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/unistd.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ * Copyright (C) 2003  Paul Mundt
+ * Copyright (C) 2004  Sean McGoogan
+ *
+ * This file contains the system call numbers.
+ *
+ */
+
+#define __NR_setup		  0	/* used only by init, to get system going */
+#define __NR_exit		  1
+#define __NR_fork		  2
+#define __NR_read		  3
+#define __NR_write		  4
+#define __NR_open		  5
+#define __NR_close		  6
+#define __NR_waitpid		  7
+#define __NR_creat		  8
+#define __NR_link		  9
+#define __NR_unlink		 10
+#define __NR_execve		 11
+#define __NR_chdir		 12
+#define __NR_time		 13
+#define __NR_mknod		 14
+#define __NR_chmod		 15
+#define __NR_lchown		 16
+#define __NR_break		 17
+#define __NR_oldstat		 18
+#define __NR_lseek		 19
+#define __NR_getpid		 20
+#define __NR_mount		 21
+#define __NR_umount		 22
+#define __NR_setuid		 23
+#define __NR_getuid		 24
+#define __NR_stime		 25
+#define __NR_ptrace		 26
+#define __NR_alarm		 27
+#define __NR_oldfstat		 28
+#define __NR_pause		 29
+#define __NR_utime		 30
+#define __NR_stty		 31
+#define __NR_gtty		 32
+#define __NR_access		 33
+#define __NR_nice		 34
+#define __NR_ftime		 35
+#define __NR_sync		 36
+#define __NR_kill		 37
+#define __NR_rename		 38
+#define __NR_mkdir		 39
+#define __NR_rmdir		 40
+#define __NR_dup		 41
+#define __NR_pipe		 42
+#define __NR_times		 43
+#define __NR_prof		 44
+#define __NR_brk		 45
+#define __NR_setgid		 46
+#define __NR_getgid		 47
+#define __NR_signal		 48
+#define __NR_geteuid		 49
+#define __NR_getegid		 50
+#define __NR_acct		 51
+#define __NR_umount2		 52
+#define __NR_lock		 53
+#define __NR_ioctl		 54
+#define __NR_fcntl		 55
+#define __NR_mpx		 56
+#define __NR_setpgid		 57
+#define __NR_ulimit		 58
+#define __NR_oldolduname	 59
+#define __NR_umask		 60
+#define __NR_chroot		 61
+#define __NR_ustat		 62
+#define __NR_dup2		 63
+#define __NR_getppid		 64
+#define __NR_getpgrp		 65
+#define __NR_setsid		 66
+#define __NR_sigaction		 67
+#define __NR_sgetmask		 68
+#define __NR_ssetmask		 69
+#define __NR_setreuid		 70
+#define __NR_setregid		 71
+#define __NR_sigsuspend		 72
+#define __NR_sigpending		 73
+#define __NR_sethostname	 74
+#define __NR_setrlimit		 75
+#define __NR_getrlimit	 	 76	/* Back compatible 2Gig limited rlimit */
+#define __NR_getrusage		 77
+#define __NR_gettimeofday	 78
+#define __NR_settimeofday	 79
+#define __NR_getgroups		 80
+#define __NR_setgroups		 81
+#define __NR_select		 82
+#define __NR_symlink		 83
+#define __NR_oldlstat		 84
+#define __NR_readlink		 85
+#define __NR_uselib		 86
+#define __NR_swapon		 87
+#define __NR_reboot		 88
+#define __NR_readdir		 89
+#define __NR_mmap		 90
+#define __NR_munmap		 91
+#define __NR_truncate		 92
+#define __NR_ftruncate		 93
+#define __NR_fchmod		 94
+#define __NR_fchown		 95
+#define __NR_getpriority	 96
+#define __NR_setpriority	 97
+#define __NR_profil		 98
+#define __NR_statfs		 99
+#define __NR_fstatfs		100
+#define __NR_ioperm		101
+#define __NR_socketcall		102	/* old implementation of socket systemcall */
+#define __NR_syslog		103
+#define __NR_setitimer		104
+#define __NR_getitimer		105
+#define __NR_stat		106
+#define __NR_lstat		107
+#define __NR_fstat		108
+#define __NR_olduname		109
+#define __NR_iopl		110
+#define __NR_vhangup		111
+#define __NR_idle		112
+#define __NR_vm86old		113
+#define __NR_wait4		114
+#define __NR_swapoff		115
+#define __NR_sysinfo		116
+#define __NR_ipc		117
+#define __NR_fsync		118
+#define __NR_sigreturn		119
+#define __NR_clone		120
+#define __NR_setdomainname	121
+#define __NR_uname		122
+#define __NR_modify_ldt		123
+#define __NR_adjtimex		124
+#define __NR_mprotect		125
+#define __NR_sigprocmask	126
+#define __NR_create_module	127
+#define __NR_init_module	128
+#define __NR_delete_module	129
+#define __NR_get_kernel_syms	130
+#define __NR_quotactl		131
+#define __NR_getpgid		132
+#define __NR_fchdir		133
+#define __NR_bdflush		134
+#define __NR_sysfs		135
+#define __NR_personality	136
+#define __NR_afs_syscall	137 /* Syscall for Andrew File System */
+#define __NR_setfsuid		138
+#define __NR_setfsgid		139
+#define __NR__llseek		140
+#define __NR_getdents		141
+#define __NR__newselect		142
+#define __NR_flock		143
+#define __NR_msync		144
+#define __NR_readv		145
+#define __NR_writev		146
+#define __NR_getsid		147
+#define __NR_fdatasync		148
+#define __NR__sysctl		149
+#define __NR_mlock		150
+#define __NR_munlock		151
+#define __NR_mlockall		152
+#define __NR_munlockall		153
+#define __NR_sched_setparam		154
+#define __NR_sched_getparam		155
+#define __NR_sched_setscheduler		156
+#define __NR_sched_getscheduler		157
+#define __NR_sched_yield		158
+#define __NR_sched_get_priority_max	159
+#define __NR_sched_get_priority_min	160
+#define __NR_sched_rr_get_interval	161
+#define __NR_nanosleep		162
+#define __NR_mremap		163
+#define __NR_setresuid		164
+#define __NR_getresuid		165
+#define __NR_vm86		166
+#define __NR_query_module	167
+#define __NR_poll		168
+#define __NR_nfsservctl		169
+#define __NR_setresgid		170
+#define __NR_getresgid		171
+#define __NR_prctl              172
+#define __NR_rt_sigreturn	173
+#define __NR_rt_sigaction	174
+#define __NR_rt_sigprocmask	175
+#define __NR_rt_sigpending	176
+#define __NR_rt_sigtimedwait	177
+#define __NR_rt_sigqueueinfo	178
+#define __NR_rt_sigsuspend	179
+#define __NR_pread		180
+#define __NR_pwrite		181
+#define __NR_chown		182
+#define __NR_getcwd		183
+#define __NR_capget		184
+#define __NR_capset		185
+#define __NR_sigaltstack	186
+#define __NR_sendfile		187
+#define __NR_streams1		188	/* some people actually want it */
+#define __NR_streams2		189	/* some people actually want it */
+#define __NR_vfork		190
+#define __NR_ugetrlimit		191	/* SuS compliant getrlimit */
+#define __NR_mmap2		192
+#define __NR_truncate64		193
+#define __NR_ftruncate64	194
+#define __NR_stat64		195
+#define __NR_lstat64		196
+#define __NR_fstat64		197
+#define __NR_lchown32		198
+#define __NR_getuid32		199
+#define __NR_getgid32		200
+#define __NR_geteuid32		201
+#define __NR_getegid32		202
+#define __NR_setreuid32		203
+#define __NR_setregid32		204
+#define __NR_getgroups32	205
+#define __NR_setgroups32	206
+#define __NR_fchown32		207
+#define __NR_setresuid32	208
+#define __NR_getresuid32	209
+#define __NR_setresgid32	210
+#define __NR_getresgid32	211
+#define __NR_chown32		212
+#define __NR_setuid32		213
+#define __NR_setgid32		214
+#define __NR_setfsuid32		215
+#define __NR_setfsgid32		216
+#define __NR_pivot_root		217
+#define __NR_mincore		218
+#define __NR_madvise		219
+
+/* Non-multiplexed socket family */
+#define __NR_socket		220
+#define __NR_bind		221
+#define __NR_connect		222
+#define __NR_listen		223
+#define __NR_accept		224
+#define __NR_getsockname	225
+#define __NR_getpeername	226
+#define __NR_socketpair		227
+#define __NR_send		228
+#define __NR_sendto		229
+#define __NR_recv		230
+#define __NR_recvfrom		231
+#define __NR_shutdown		232
+#define __NR_setsockopt		233
+#define __NR_getsockopt		234
+#define __NR_sendmsg		235
+#define __NR_recvmsg		236
+
+/* Non-multiplexed IPC family */
+#define __NR_semop		237
+#define __NR_semget		238
+#define __NR_semctl		239
+#define __NR_msgsnd		240
+#define __NR_msgrcv		241
+#define __NR_msgget		242
+#define __NR_msgctl		243
+#if 0
+#define __NR_shmatcall		244
+#endif
+#define __NR_shmdt		245
+#define __NR_shmget		246
+#define __NR_shmctl		247
+
+#define __NR_getdents64		248
+#define __NR_fcntl64		249
+/* 223 is unused */
+#define __NR_gettid		252
+#define __NR_readahead		253
+#define __NR_setxattr		254
+#define __NR_lsetxattr		255
+#define __NR_fsetxattr		256
+#define __NR_getxattr		257
+#define __NR_lgetxattr		258
+#define __NR_fgetxattr		269
+#define __NR_listxattr		260
+#define __NR_llistxattr		261
+#define __NR_flistxattr		262
+#define __NR_removexattr	263
+#define __NR_lremovexattr	264
+#define __NR_fremovexattr	265
+#define __NR_tkill		266
+#define __NR_sendfile64		267
+#define __NR_futex		268
+#define __NR_sched_setaffinity	269
+#define __NR_sched_getaffinity	270
+#define __NR_set_thread_area	271
+#define __NR_get_thread_area	272
+#define __NR_io_setup		273
+#define __NR_io_destroy		274
+#define __NR_io_getevents	275
+#define __NR_io_submit		276
+#define __NR_io_cancel		277
+#define __NR_fadvise64		278
+#define __NR_exit_group		280
+
+#define __NR_lookup_dcookie	281
+#define __NR_epoll_create	282
+#define __NR_epoll_ctl		283
+#define __NR_epoll_wait		284
+#define __NR_remap_file_pages	285
+#define __NR_set_tid_address	286
+#define __NR_timer_create	287
+#define __NR_timer_settime	(__NR_timer_create+1)
+#define __NR_timer_gettime	(__NR_timer_create+2)
+#define __NR_timer_getoverrun	(__NR_timer_create+3)
+#define __NR_timer_delete	(__NR_timer_create+4)
+#define __NR_clock_settime	(__NR_timer_create+5)
+#define __NR_clock_gettime	(__NR_timer_create+6)
+#define __NR_clock_getres	(__NR_timer_create+7)
+#define __NR_clock_nanosleep	(__NR_timer_create+8)
+#define __NR_statfs64		296
+#define __NR_fstatfs64		297
+#define __NR_tgkill		298
+#define __NR_utimes		299
+#define __NR_fadvise64_64	300
+#define __NR_vserver		301
+#define __NR_mbind              302
+#define __NR_get_mempolicy      303
+#define __NR_set_mempolicy      304
+#define __NR_mq_open            305
+#define __NR_mq_unlink          (__NR_mq_open+1)
+#define __NR_mq_timedsend       (__NR_mq_open+2)
+#define __NR_mq_timedreceive    (__NR_mq_open+3)
+#define __NR_mq_notify          (__NR_mq_open+4)
+#define __NR_mq_getsetattr      (__NR_mq_open+5)
+
+#define NR_syscalls 311
+
+/* user-visible error numbers are in the range -1 - -125: see <asm-sh64/errno.h> */
+
+#define __syscall_return(type, res) \
+do { \
+	/* Note: when returning from kernel the return value is in r9	    \
+	**       This prevents conflicts between return value and arg1      \
+	**       when dispatching signal handler, in other words makes	    \
+	**       life easier in the system call epilogue (see entry.S)      \
+	*/								    \
+        register unsigned long __sr2 __asm__ ("r2") = res;		    \
+	if ((unsigned long)(res) >= (unsigned long)(-125)) { \
+		errno = -(res);						    \
+		__sr2 = -1; 						    \
+	} \
+	return (type) (__sr2); 						    \
+} while (0)
+
+/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
+
+#define _syscall0(type,name) \
+type name(void) \
+{ \
+register unsigned long __sc0 __asm__ ("r9") = ((0x10 << 16) | __NR_##name); \
+__asm__ __volatile__ ("trapa	%1 !\t\t\t" #name "()"			    \
+	: "=r" (__sc0) 							    \
+	: "r" (__sc0) ); 						    \
+__syscall_return(type,__sc0); 						    \
+}
+
+	/*
+	 * The apparent spurious "dummy" assembler comment is *needed*,
+	 * as without it, the compiler treats the arg<n> variables
+	 * as no longer live just before the asm. The compiler can
+	 * then optimize the storage into any registers it wishes.
+	 * The additional dummy statement forces the compiler to put
+	 * the arguments into the correct registers before the TRAPA.
+	 */
+#define _syscall1(type,name,type1,arg1) \
+type name(type1 arg1) \
+{ \
+register unsigned long __sc0 __asm__ ("r9") = ((0x11 << 16) | __NR_##name); \
+register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1;	    \
+__asm__ __volatile__ ("trapa	%1 !\t\t\t" #name "(%2)"		    \
+	: "=r" (__sc0) 							    \
+	: "r" (__sc0), "r" (__sc2));					    \
+__asm__ __volatile__ ("!dummy	%0 %1"				   	    \
+	:								    \
+	: "r" (__sc0), "r" (__sc2));					    \
+__syscall_return(type,__sc0); 						    \
+}
+
+#define _syscall2(type,name,type1,arg1,type2,arg2) \
+type name(type1 arg1,type2 arg2) \
+{ \
+register unsigned long __sc0 __asm__ ("r9") = ((0x12 << 16) | __NR_##name); \
+register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1;	    \
+register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2;	    \
+__asm__ __volatile__ ("trapa	%1 !\t\t\t" #name "(%2,%3)"		    \
+	: "=r" (__sc0) 							    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3) );			    \
+__asm__ __volatile__ ("!dummy	%0 %1 %2"			   	    \
+	:								    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3) );			    \
+__syscall_return(type,__sc0); 						    \
+}
+
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+type name(type1 arg1,type2 arg2,type3 arg3) \
+{ \
+register unsigned long __sc0 __asm__ ("r9") = ((0x13 << 16) | __NR_##name); \
+register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1;	    \
+register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2;	    \
+register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3;	    \
+__asm__ __volatile__ ("trapa	%1 !\t\t\t" #name "(%2,%3,%4)"		    \
+	: "=r" (__sc0) 							    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4) );		    \
+__asm__ __volatile__ ("!dummy	%0 %1 %2 %3"			   	    \
+	:								    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4) );	   	    \
+__syscall_return(type,__sc0); 						    \
+}
+
+#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
+type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
+{ \
+register unsigned long __sc0 __asm__ ("r9") = ((0x14 << 16) | __NR_##name); \
+register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1;	    \
+register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2;	    \
+register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3;	    \
+register unsigned long __sc5 __asm__ ("r5") = (unsigned long) arg4;	    \
+__asm__ __volatile__ ("trapa	%1 !\t\t\t" #name "(%2,%3,%4,%5)"	    \
+	: "=r" (__sc0) 							    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5) );\
+__asm__ __volatile__ ("!dummy	%0 %1 %2 %3 %4"			   	    \
+	:								    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5) );\
+__syscall_return(type,__sc0); 						    \
+}
+
+#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
+type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
+{ \
+register unsigned long __sc0 __asm__ ("r9") = ((0x15 << 16) | __NR_##name); \
+register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1;	    \
+register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2;	    \
+register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3;	    \
+register unsigned long __sc5 __asm__ ("r5") = (unsigned long) arg4;	    \
+register unsigned long __sc6 __asm__ ("r6") = (unsigned long) arg5;	    \
+__asm__ __volatile__ ("trapa	%1 !\t\t\t" #name "(%2,%3,%4,%5,%6)"	    \
+	: "=r" (__sc0) 							    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5),  \
+	  "r" (__sc6));							    \
+__asm__ __volatile__ ("!dummy	%0 %1 %2 %3 %4 %5"		   	    \
+	:								    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5),  \
+	  "r" (__sc6));							    \
+__syscall_return(type,__sc0); 						    \
+}
+
+#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5, type6, arg6) \
+type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) \
+{ \
+register unsigned long __sc0 __asm__ ("r9") = ((0x16 << 16) | __NR_##name); \
+register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1;	    \
+register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2;	    \
+register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3;	    \
+register unsigned long __sc5 __asm__ ("r5") = (unsigned long) arg4;	    \
+register unsigned long __sc6 __asm__ ("r6") = (unsigned long) arg5;	    \
+register unsigned long __sc7 __asm__ ("r7") = (unsigned long) arg6;	    \
+__asm__ __volatile__ ("trapa	%1 !\t\t\t" #name "(%2,%3,%4,%5,%6,%7)"	    \
+	: "=r" (__sc0) 							    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5),  \
+	  "r" (__sc6), "r" (__sc7));					    \
+__asm__ __volatile__ ("!dummy	%0 %1 %2 %3 %4 %5 %6"		   	    \
+	:								    \
+	: "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5),  \
+	  "r" (__sc6), "r" (__sc7));					    \
+__syscall_return(type,__sc0); 						    \
+}
+
+#ifdef __KERNEL__
+#define __ARCH_WANT_IPC_PARSE_VERSION
+#define __ARCH_WANT_OLD_READDIR
+#define __ARCH_WANT_OLD_STAT
+#define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SYS_ALARM
+#define __ARCH_WANT_SYS_GETHOSTNAME
+#define __ARCH_WANT_SYS_PAUSE
+#define __ARCH_WANT_SYS_SGETMASK
+#define __ARCH_WANT_SYS_SIGNAL
+#define __ARCH_WANT_SYS_TIME
+#define __ARCH_WANT_SYS_UTIME
+#define __ARCH_WANT_SYS_WAITPID
+#define __ARCH_WANT_SYS_SOCKETCALL
+#define __ARCH_WANT_SYS_FADVISE64
+#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
+#define __ARCH_WANT_SYS_NICE
+#define __ARCH_WANT_SYS_OLD_GETRLIMIT
+#define __ARCH_WANT_SYS_OLDUMOUNT
+#define __ARCH_WANT_SYS_SIGPENDING
+#define __ARCH_WANT_SYS_SIGPROCMASK
+#define __ARCH_WANT_SYS_RT_SIGACTION
+#endif
+
+#ifdef __KERNEL_SYSCALLS__
+
+/* Copy from sh */
+#include <linux/compiler.h>
+#include <linux/types.h>
+#include <asm/ptrace.h>
+
+/*
+ * we need this inline - forking from kernel space will result
+ * in NO COPY ON WRITE (!!!), until an execve is executed. This
+ * is no problem, but for the stack. This is handled by not letting
+ * main() use the stack at all after fork(). Thus, no function
+ * calls - which means inline code for fork too, as otherwise we
+ * would use the stack upon exit from 'fork()'.
+ *
+ * Actually only pause and fork are needed inline, so that there
+ * won't be any messing with the stack from main(), but we define
+ * some others too.
+ */
+#define __NR__exit __NR_exit
+static inline _syscall0(int,pause)
+static inline _syscall1(int,setup,int,magic)
+static inline _syscall0(int,sync)
+static inline _syscall0(pid_t,setsid)
+static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
+static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
+static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
+static inline _syscall1(int,dup,int,fd)
+static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
+static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
+static inline _syscall1(int,close,int,fd)
+static inline _syscall1(int,_exit,int,exitcode)
+static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
+static inline _syscall1(int,delete_module,const char *,name)
+
+static inline pid_t wait(int * wait_stat)
+{
+	return waitpid(-1,wait_stat,0);
+}
+#endif
+
+/*
+ * "Conditional" syscalls
+ *
+ * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
+ * but it doesn't work on all toolchains, so we just do it by hand
+ */
+#ifndef cond_syscall
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#endif
+
+#endif /* __ASM_SH64_UNISTD_H */
--- diff/include/asm-sh64/user.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sh64/user.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,71 @@
+#ifndef __ASM_SH64_USER_H
+#define __ASM_SH64_USER_H
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * include/asm-sh64/user.h
+ *
+ * Copyright (C) 2000, 2001  Paolo Alberelli
+ *
+ */
+
+#include <linux/types.h>
+#include <asm/processor.h>
+#include <asm/ptrace.h>
+#include <asm/page.h>
+
+/*
+ * Core file format: The core file is written in such a way that gdb
+ * can understand it and provide useful information to the user (under
+ * linux we use the `trad-core' bfd).  The file contents are as follows:
+ *
+ *  upage: 1 page consisting of a user struct that tells gdb
+ *	what is present in the file.  Directly after this is a
+ *	copy of the task_struct, which is currently not used by gdb,
+ *	but it may come in handy at some point.  All of the registers
+ *	are stored as part of the upage.  The upage should always be
+ *	only one page long.
+ *  data: The data segment follows next.  We use current->end_text to
+ *	current->brk to pick up all of the user variables, plus any memory
+ *	that may have been sbrk'ed.  No attempt is made to determine if a
+ *	page is demand-zero or if a page is totally unused, we just cover
+ *	the entire range.  All of the addresses are rounded in such a way
+ *	that an integral number of pages is written.
+ *  stack: We need the stack information in order to get a meaningful
+ *	backtrace.  We need to write the data from usp to
+ *	current->start_stack, so we round each of these in order to be able
+ *	to write an integer number of pages.
+ */
+
+struct user_fpu_struct {
+        unsigned long long fp_regs[32];
+	unsigned int fpscr;
+};
+
+struct user {
+	struct pt_regs	regs;			/* entire machine state */
+	struct user_fpu_struct fpu;	/* Math Co-processor registers  */
+	int u_fpvalid;		/* True if math co-processor being used */
+	size_t		u_tsize;		/* text size (pages) */
+	size_t		u_dsize;		/* data size (pages) */
+	size_t		u_ssize;		/* stack size (pages) */
+	unsigned long	start_code;		/* text starting address */
+	unsigned long	start_data;		/* data starting address */
+	unsigned long	start_stack;		/* stack starting address */
+	long int	signal;			/* signal causing core dump */
+	struct regs *	u_ar0;			/* help gdb find registers */
+	struct user_fpu_struct* u_fpstate;	/* Math Co-processor pointer */
+	unsigned long	magic;			/* identifies a core file */
+	char		u_comm[32];		/* user command name */
+};
+
+#define NBPG			PAGE_SIZE
+#define UPAGES			1
+#define HOST_TEXT_START_ADDR	(u.start_code)
+#define HOST_DATA_START_ADDR	(u.start_data)
+#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
+
+#endif /* __ASM_SH64_USER_H */
--- diff/include/asm-sparc64/lockmeter.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-sparc64/lockmeter.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2000 Anton Blanchard (anton@linuxcare.com)
+ * Copyright (C) 2003 David S. Miller (davem@redhat.com)
+ */
+
+#ifndef _SPARC64_LOCKMETER_H
+#define _SPARC64_LOCKMETER_H
+
+#include <linux/smp.h>
+#include <asm/spinlock.h>
+#include <asm/timer.h>
+#include <asm/timex.h>
+
+/* Actually, this is not the CPU frequency by the system tick
+ * frequency which is good enough for lock metering.
+ */
+#define CPU_CYCLE_FREQUENCY	(timer_tick_offset * HZ)
+#define THIS_CPU_NUMBER		smp_processor_id()
+
+#define PUT_INDEX(lock_ptr,indexv)	(lock_ptr)->index = (indexv)
+#define GET_INDEX(lock_ptr)		(lock_ptr)->index
+
+#define PUT_RWINDEX(rwlock_ptr,indexv) (rwlock_ptr)->index = (indexv)
+#define GET_RWINDEX(rwlock_ptr)        (rwlock_ptr)->index
+#define PUT_RW_CPU(rwlock_ptr,cpuv)    (rwlock_ptr)->cpu = (cpuv)
+#define GET_RW_CPU(rwlock_ptr)         (rwlock_ptr)->cpu
+
+#define RWLOCK_READERS(rwlock_ptr)	rwlock_readers(rwlock_ptr)
+
+extern inline int rwlock_readers(rwlock_t *rwlock_ptr)
+{
+	signed int tmp = rwlock_ptr->lock;
+
+	if (tmp > 0)
+		return tmp;
+	else
+		return 0;
+}
+
+#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr)	((signed int)((rwlock_ptr)->lock) < 0)
+#define RWLOCK_IS_READ_LOCKED(rwlock_ptr)	((signed int)((rwlock_ptr)->lock) > 0)
+
+#define get_cycles64()	get_cycles()
+
+#endif /* _SPARC64_LOCKMETER_H */
--- diff/include/asm-um/setup.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-um/setup.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef SETUP_H_INCLUDED
+#define SETUP_H_INCLUDED
+
+#define COMMAND_LINE_SIZE 512
+
+#endif		/* SETUP_H_INCLUDED */
--- diff/include/asm-v850/setup.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-v850/setup.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef _V850_SETUP_H
+#define _V850_SETUP_H
+
+#define COMMAND_LINE_SIZE	512
+
+#endif /* __SETUP_H */
--- diff/include/asm-x86_64/kgdb.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-x86_64/kgdb.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,71 @@
+#ifndef __KGDB
+#define __KGDB
+
+/*
+ * This file should not include ANY others.  This makes it usable
+ * most anywhere without the fear of include order or inclusion.
+ * Make it so!
+ *
+ * This file may be included all the time.  It is only active if
+ * CONFIG_KGDB is defined, otherwise it stubs out all the macros
+ * and entry points.
+ */
+#if defined(CONFIG_KGDB) && !defined(__ASSEMBLY__)
+
+extern void breakpoint(void);
+#define INIT_KGDB_INTS kgdb_enable_ints()
+
+#ifndef BREAKPOINT
+#define BREAKPOINT   asm("   int $3")
+#endif
+
+extern void kgdb_schedule_breakpoint(void);
+extern void kgdb_process_breakpoint(void);
+
+extern int kgdb_tty_hook(void);
+extern int kgdb_eth_hook(void);
+extern int kgdboe;
+
+/*
+ * GDB debug stub (or any debug stub) can point the 'linux_debug_hook'
+ * pointer to its routine and it will be entered as the first thing
+ * when a trap occurs.
+ *
+ * Return values are, at present, undefined.
+ *
+ * The debug hook routine does not necessarily return to its caller.
+ * It has the register image and thus may choose to resume execution
+ * anywhere it pleases.
+ */
+struct pt_regs;
+
+extern int kgdb_handle_exception(int trapno,
+				 int signo, int err_code, struct pt_regs *regs);
+extern int in_kgdb(struct pt_regs *regs);
+
+extern void set_debug_traps(void);
+
+#ifdef CONFIG_KGDB_TS
+void kgdb_tstamp(int line, char *source, int data0, int data1);
+/*
+ * This is the time stamp function.  The macro adds the source info and
+ * does a cast on the data to allow most any 32-bit value.
+ */
+
+#define kgdb_ts(data0,data1) kgdb_tstamp(__LINE__,__FILE__,(int)data0,(int)data1)
+#else
+#define kgdb_ts(data0,data1)
+#endif
+#else				/* CONFIG_KGDB  && ! __ASSEMBLY__ ,stubs follow... */
+#ifndef BREAKPOINT
+#define BREAKPOINT
+#endif
+#define kgdb_ts(data0,data1)
+#define in_kgdb	(0)
+#define kgdb_handle_exception
+#define breakpoint
+#define INIT_KGDB_INTS
+#define kgdb_process_breakpoint() do {} while(0)
+
+#endif
+#endif				/* __KGDB */
--- diff/include/asm-x86_64/kgdb_local.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-x86_64/kgdb_local.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,102 @@
+#ifndef __KGDB_LOCAL
+#define ___KGDB_LOCAL
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/serial.h>
+#include <linux/serialP.h>
+#include <linux/spinlock.h>
+#include <asm/processor.h>
+#include <asm/msr.h>
+#include <asm/kgdb.h>
+
+#define PORT 0x3f8
+#ifdef CONFIG_KGDB_PORT
+#undef PORT
+#define PORT CONFIG_KGDB_PORT
+#endif
+#define IRQ 4
+#ifdef CONFIG_KGDB_IRQ
+#undef IRQ
+#define IRQ CONFIG_KGDB_IRQ
+#endif
+#define SB_CLOCK 1843200
+#define SB_BASE (SB_CLOCK/16)
+#define SB_BAUD9600 SB_BASE/9600
+#define SB_BAUD192  SB_BASE/19200
+#define SB_BAUD384  SB_BASE/38400
+#define SB_BAUD576  SB_BASE/57600
+#define SB_BAUD1152 SB_BASE/115200
+#ifdef CONFIG_KGDB_9600BAUD
+#define SB_BAUD SB_BAUD9600
+#endif
+#ifdef CONFIG_KGDB_19200BAUD
+#define SB_BAUD SB_BAUD192
+#endif
+#ifdef CONFIG_KGDB_38400BAUD
+#define SB_BAUD SB_BAUD384
+#endif
+#ifdef CONFIG_KGDB_57600BAUD
+#define SB_BAUD SB_BAUD576
+#endif
+#ifdef CONFIG_KGDB_115200BAUD
+#define SB_BAUD SB_BAUD1152
+#endif
+#ifndef SB_BAUD
+#define SB_BAUD SB_BAUD1152	/* Start with this if not given */
+#endif
+
+#ifndef CONFIG_X86_TSC
+#undef rdtsc
+#define rdtsc(a,b) if (a++ > 10000){a = 0; b++;}
+#undef rdtscll
+#define rdtscll(s) s++
+#endif
+
+#ifdef _raw_read_unlock		/* must use a name that is "define"ed, not an inline */
+#undef spin_lock
+#undef spin_trylock
+#undef spin_unlock
+#define spin_lock	 _raw_spin_lock
+#define spin_trylock	 _raw_spin_trylock
+#define spin_unlock	 _raw_spin_unlock
+#else
+#endif
+#undef spin_unlock_wait
+#define spin_unlock_wait(x)  do { cpu_relax(); barrier();} \
+                                     while(spin_is_locked(x))
+
+#define SB_IER 1
+#define SB_MCR UART_MCR_OUT2 | UART_MCR_DTR | UART_MCR_RTS
+
+#define FLAGS 0
+#define SB_STATE { \
+     magic: SSTATE_MAGIC, \
+     baud_base: SB_BASE,  \
+     port:      PORT,     \
+     irq:       IRQ,      \
+     flags:     FLAGS,    \
+     custom_divisor:SB_BAUD}
+#define SB_INFO  { \
+      magic: SERIAL_MAGIC, \
+      port:  PORT,0,FLAGS, \
+      state: &state,       \
+      tty:   (struct tty_struct *)&state, \
+      IER:   SB_IER,       \
+      MCR:   SB_MCR}
+extern void putDebugChar(int);
+/* RTAI support needs us to really stop/start interrupts */
+
+#define kgdb_sti() __asm__ __volatile__("sti": : :"memory")
+#define kgdb_cli() __asm__ __volatile__("cli": : :"memory")
+#define kgdb_local_save_flags(x) __asm__ __volatile__(\
+                                   "pushfl ; popl %0":"=g" (x): /* no input */)
+#define kgdb_local_irq_restore(x) __asm__ __volatile__(\
+                                   "pushl %0 ; popfl": \
+                                     /* no output */ :"g" (x):"memory", "cc")
+#define kgdb_local_irq_save(x) kgdb_local_save_flags(x); kgdb_cli()
+
+#ifdef CONFIG_SERIAL
+extern void shutdown_for_kgdb(struct async_struct *info);
+#endif
+#define INIT_KDEBUG putDebugChar("+");
+#endif				/* __KGDB_LOCAL */
--- diff/include/asm-x86_64/perfctr.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/asm-x86_64/perfctr.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1 @@
+#include <asm-i386/perfctr.h>
--- diff/include/linux/crc16.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/crc16.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,15 @@
+#ifndef _LINUX_CRC16_H
+#define _LINUX_CRC16_H
+
+#include <linux/types.h>
+
+extern u16 const crc16_table[256];
+
+extern u16 crc16(u16 crc, const u8 *buffer, size_t len);
+
+static inline u16 crc16_byte(u16 crc, const u8 c)
+{
+	return (crc >> 8) ^ crc16_table[(crc ^ c) & 0xff];
+}
+
+#endif /* _LINUX_CRC16_H */
--- diff/include/linux/dmi.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/dmi.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,47 @@
+#ifndef __DMI_H__
+#define __DMI_H__
+
+enum dmi_field {
+	DMI_NONE,
+	DMI_BIOS_VENDOR,
+	DMI_BIOS_VERSION,
+	DMI_BIOS_DATE,
+	DMI_SYS_VENDOR,
+	DMI_PRODUCT_NAME,
+	DMI_PRODUCT_VERSION,
+	DMI_BOARD_VENDOR,
+	DMI_BOARD_NAME,
+	DMI_BOARD_VERSION,
+	DMI_STRING_MAX,
+};
+
+/*
+ *	DMI callbacks for problem boards
+ */
+struct dmi_strmatch {
+	u8 slot;
+	char *substr;
+};
+
+struct dmi_system_id {
+	int (*callback)(struct dmi_system_id *);
+	char *ident;
+	struct dmi_strmatch matches[4];
+	void *driver_data;
+};
+
+#define DMI_MATCH(a,b)	{ a, b }
+
+#if defined(CONFIG_X86) && !defined(CONFIG_X86_64)
+
+extern int dmi_check_system(struct dmi_system_id *list);
+extern char * dmi_get_system_info(int field);
+
+#else
+
+static inline int dmi_check_system(struct dmi_system_id *list) { return 0; }
+static inline char * dmi_get_system_info(int field) { return NULL; }
+
+#endif
+
+#endif	/* __DMI_H__ */
--- diff/include/linux/ds1286.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/ds1286.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 1998, 1999, 2003 Ralf Baechle
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#ifndef __LINUX_DS1286_H
+#define __LINUX_DS1286_H
+
+#include <asm/ds1286.h>
+
+/**********************************************************************
+ * register summary
+ **********************************************************************/
+#define RTC_HUNDREDTH_SECOND	0
+#define RTC_SECONDS		1
+#define RTC_MINUTES		2
+#define RTC_MINUTES_ALARM	3
+#define RTC_HOURS		4
+#define RTC_HOURS_ALARM		5
+#define RTC_DAY			6
+#define RTC_DAY_ALARM		7
+#define RTC_DATE		8
+#define RTC_MONTH		9
+#define RTC_YEAR		10
+#define RTC_CMD			11
+#define RTC_WHSEC		12
+#define RTC_WSEC		13
+#define RTC_UNUSED		14
+
+/* RTC_*_alarm is always true if 2 MSBs are set */
+# define RTC_ALARM_DONT_CARE 	0xC0
+
+
+/*
+ * Bits in the month register
+ */
+#define RTC_EOSC		0x80
+#define RTC_ESQW		0x40
+
+/*
+ * Bits in the Command register
+ */
+#define RTC_TDF			0x01
+#define RTC_WAF			0x02
+#define RTC_TDM			0x04
+#define RTC_WAM			0x08
+#define RTC_PU_LVL		0x10
+#define RTC_IBH_LO		0x20
+#define RTC_IPSW		0x40
+#define RTC_TE			0x80
+
+#endif /* __LINUX_DS1286_H */
--- diff/include/linux/dwarf2-lang.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/dwarf2-lang.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,132 @@
+#ifndef DWARF2_LANG
+#define DWARF2_LANG
+#include <linux/dwarf2.h>
+
+/*
+ * This is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2, or (at your option) any later
+ * version.
+ */
+/*
+ * This file defines macros that allow generation of DWARF debug records
+ * for asm files.  This file is platform independent.  Register numbers
+ * (which are about the only thing that is platform dependent) are to be
+ * supplied by a platform defined file.
+ */
+#define DWARF_preamble()	.section	.debug_frame,"",@progbits
+/*
+ * This macro starts a debug frame section.  The debug_frame describes
+ * where to find the registers that the enclosing function saved on
+ * entry.
+ *
+ * ORD is use by the label generator and should be the same as what is
+ * passed to CFI_postamble.
+ *
+ * pc,	pc register gdb ordinal.
+ *
+ * code_align this is the factor used to define locations or regions
+ * where the given definitions apply.  If you use labels to define these
+ * this should be 1.
+ *
+ * data_align this is the factor used to define register offsets.  If
+ * you use struct offset, this should be the size of the register in
+ * bytes or the negative of that.  This is how it is used: you will
+ * define a register as the reference register, say the stack pointer,
+ * then you will say where a register is located relative to this
+ * reference registers value, say 40 for register 3 (the gdb register
+ * number).  The <40> will be multiplied by <data_align> to define the
+ * byte offset of the given register (3, in this example).  So if your
+ * <40> is the byte offset and the reference register points at the
+ * begining, you would want 1 for the data_offset.  If <40> was the 40th
+ * 4-byte element in that structure you would want 4.  And if your
+ * reference register points at the end of the structure you would want
+ * a negative data_align value(and you would have to do other math as
+ * well).
+ */
+
+#define CFI_preamble(ORD, pc, code_align, data_align)	\
+.section	.debug_frame,"",@progbits ;		\
+frame/**/_/**/ORD:						\
+	.long end/**/_/**/ORD-start/**/_/**/ORD;			\
+start/**/_/**/ORD:						\
+	.long	DW_CIE_ID;				\
+	.byte	DW_CIE_VERSION;			\
+	.byte 0	 ;				\
+	.uleb128 code_align;				\
+	.sleb128 data_align;				\
+	.byte pc;
+
+/*
+ * After the above macro and prior to the CFI_postamble, you need to
+ * define the initial state.  This starts with defining the reference
+ * register and, usually the pc.  Here are some helper macros:
+ */
+
+#define CFA_define_reference(reg, offset)	\
+	.byte DW_CFA_def_cfa;			\
+	.uleb128 reg;				\
+	.uleb128 (offset);
+
+#define CFA_define_offset(reg, offset)		\
+	.byte (DW_CFA_offset + reg);		\
+	.uleb128 (offset);
+
+#define CFI_postamble(ORD)			\
+	.align 4;				\
+end/**/_/**/ORD:
+/*
+ * So now your code pushs stuff on the stack, you need a new location
+ * and the rules for what to do.  This starts a running description of
+ * the call frame.  You need to describe what changes with respect to
+ * the call registers as the location of the pc moves through the code.
+ * The following builds an FDE (fram descriptor entry?).  Like the
+ * above, it has a preamble and a postamble.  It also is tied to the CFI
+ * above.
+ * The first entry after the preamble must be the location in the code
+ * that the call frame is being described for.
+ */
+#define FDE_preamble(ORD, fde_no, initial_address, length)	\
+	.long FDE_end/**/_/**/fde_no-FDE_start/**/_/**/fde_no;		\
+FDE_start/**/_/**/fde_no:						\
+	.long frame/**/_/**/ORD;					\
+	.long initial_address;					\
+	.long length;
+
+#define FDE_postamble(fde_no)			\
+	.align 4;				\
+FDE_end/**/_/**/fde_no:
+/*
+ * That done, you can now add registers, subtract registers, move the
+ * reference and even change the reference.  You can also define a new
+ * area of code the info applies to.  For discontinuous bits you should
+ * start a new FDE.  You may have as many as you like.
+ */
+
+/*
+ * To advance the address by <bytes>
+ */
+
+#define FDE_advance(bytes)			\
+	.byte DW_CFA_advance_loc4		\
+	.long bytes
+
+
+
+/*
+ * With the above you can define all the register locations.  But
+ * suppose the reference register moves... Takes the new offset NOT an
+ * increment.  This is how esp is tracked if it is not saved.
+ */
+
+#define CFA_define_cfa_offset(offset) \
+	.byte $DW_CFA_def_cfa_offset; \
+	.uleb128 (offset);
+/*
+ * Or suppose you want to use a different reference register...
+ */
+#define CFA_define_cfa_register(reg)		\
+	.byte DW_CFA_def_cfa_register;		\
+	.uleb128 reg;
+
+#endif
--- diff/include/linux/dwarf2.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/dwarf2.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,738 @@
+/* Declarations and definitions of codes relating to the DWARF2 symbolic
+   debugging information format.
+   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002
+   Free Software Foundation, Inc.
+
+   Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
+   Office (AJPO), Florida State Unviversity and Silicon Graphics Inc.
+   provided support for this effort -- June 21, 1995.
+
+   Derived from the DWARF 1 implementation written by Ron Guilmette
+   (rfg@netcom.com), November 1990.
+
+   This file is part of GCC.
+
+   GCC is free software; you can redistribute it and/or modify it under
+   the terms of the GNU General Public License as published by the Free
+   Software Foundation; either version 2, or (at your option) any later
+   version.
+
+   GCC 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 GCC; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
+
+/* This file is derived from the DWARF specification (a public document)
+   Revision 2.0.0 (July 27, 1993) developed by the UNIX International
+   Programming Languages Special Interest Group (UI/PLSIG) and distributed
+   by UNIX International.  Copies of this specification are available from
+   UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
+
+   This file also now contains definitions from the DWARF 3 specification.  */
+
+/* This file is shared between GCC and GDB, and should not contain
+   prototypes.	*/
+
+#ifndef _ELF_DWARF2_H
+#define _ELF_DWARF2_H
+
+/* Structure found in the .debug_line section.	*/
+#ifndef __ASSEMBLY__
+typedef struct
+{
+  unsigned char li_length	   [4];
+  unsigned char li_version	   [2];
+  unsigned char li_prologue_length [4];
+  unsigned char li_min_insn_length [1];
+  unsigned char li_default_is_stmt [1];
+  unsigned char li_line_base	   [1];
+  unsigned char li_line_range	   [1];
+  unsigned char li_opcode_base	   [1];
+}
+DWARF2_External_LineInfo;
+
+typedef struct
+{
+  unsigned long  li_length;
+  unsigned short li_version;
+  unsigned int	 li_prologue_length;
+  unsigned char  li_min_insn_length;
+  unsigned char  li_default_is_stmt;
+  int		 li_line_base;
+  unsigned char  li_line_range;
+  unsigned char  li_opcode_base;
+}
+DWARF2_Internal_LineInfo;
+
+/* Structure found in .debug_pubnames section.	*/
+typedef struct
+{
+  unsigned char pn_length  [4];
+  unsigned char pn_version [2];
+  unsigned char pn_offset  [4];
+  unsigned char pn_size    [4];
+}
+DWARF2_External_PubNames;
+
+typedef struct
+{
+  unsigned long  pn_length;
+  unsigned short pn_version;
+  unsigned long  pn_offset;
+  unsigned long  pn_size;
+}
+DWARF2_Internal_PubNames;
+
+/* Structure found in .debug_info section.  */
+typedef struct
+{
+  unsigned char  cu_length	  [4];
+  unsigned char  cu_version	  [2];
+  unsigned char  cu_abbrev_offset [4];
+  unsigned char  cu_pointer_size  [1];
+}
+DWARF2_External_CompUnit;
+
+typedef struct
+{
+  unsigned long  cu_length;
+  unsigned short cu_version;
+  unsigned long  cu_abbrev_offset;
+  unsigned char  cu_pointer_size;
+}
+DWARF2_Internal_CompUnit;
+
+typedef struct
+{
+  unsigned char  ar_length	 [4];
+  unsigned char  ar_version	 [2];
+  unsigned char  ar_info_offset  [4];
+  unsigned char  ar_pointer_size [1];
+  unsigned char  ar_segment_size [1];
+}
+DWARF2_External_ARange;
+
+typedef struct
+{
+  unsigned long  ar_length;
+  unsigned short ar_version;
+  unsigned long  ar_info_offset;
+  unsigned char  ar_pointer_size;
+  unsigned char  ar_segment_size;
+}
+DWARF2_Internal_ARange;
+
+#define ENUM(name) enum name {
+#define IF_NOT_ASM(a) a
+#define COMMA ,
+#else
+#define ENUM(name)
+#define IF_NOT_ASM(a)
+#define COMMA
+
+#endif
+
+/* Tag names and codes.  */
+ENUM(dwarf_tag)
+
+    DW_TAG_padding = 0x00 COMMA
+    DW_TAG_array_type = 0x01 COMMA
+    DW_TAG_class_type = 0x02 COMMA
+    DW_TAG_entry_point = 0x03 COMMA
+    DW_TAG_enumeration_type = 0x04 COMMA
+    DW_TAG_formal_parameter = 0x05 COMMA
+    DW_TAG_imported_declaration = 0x08 COMMA
+    DW_TAG_label = 0x0a COMMA
+    DW_TAG_lexical_block = 0x0b COMMA
+    DW_TAG_member = 0x0d COMMA
+    DW_TAG_pointer_type = 0x0f COMMA
+    DW_TAG_reference_type = 0x10 COMMA
+    DW_TAG_compile_unit = 0x11 COMMA
+    DW_TAG_string_type = 0x12 COMMA
+    DW_TAG_structure_type = 0x13 COMMA
+    DW_TAG_subroutine_type = 0x15 COMMA
+    DW_TAG_typedef = 0x16 COMMA
+    DW_TAG_union_type = 0x17 COMMA
+    DW_TAG_unspecified_parameters = 0x18 COMMA
+    DW_TAG_variant = 0x19 COMMA
+    DW_TAG_common_block = 0x1a COMMA
+    DW_TAG_common_inclusion = 0x1b COMMA
+    DW_TAG_inheritance = 0x1c COMMA
+    DW_TAG_inlined_subroutine = 0x1d COMMA
+    DW_TAG_module = 0x1e COMMA
+    DW_TAG_ptr_to_member_type = 0x1f COMMA
+    DW_TAG_set_type = 0x20 COMMA
+    DW_TAG_subrange_type = 0x21 COMMA
+    DW_TAG_with_stmt = 0x22 COMMA
+    DW_TAG_access_declaration = 0x23 COMMA
+    DW_TAG_base_type = 0x24 COMMA
+    DW_TAG_catch_block = 0x25 COMMA
+    DW_TAG_const_type = 0x26 COMMA
+    DW_TAG_constant = 0x27 COMMA
+    DW_TAG_enumerator = 0x28 COMMA
+    DW_TAG_file_type = 0x29 COMMA
+    DW_TAG_friend = 0x2a COMMA
+    DW_TAG_namelist = 0x2b COMMA
+    DW_TAG_namelist_item = 0x2c COMMA
+    DW_TAG_packed_type = 0x2d COMMA
+    DW_TAG_subprogram = 0x2e COMMA
+    DW_TAG_template_type_param = 0x2f COMMA
+    DW_TAG_template_value_param = 0x30 COMMA
+    DW_TAG_thrown_type = 0x31 COMMA
+    DW_TAG_try_block = 0x32 COMMA
+    DW_TAG_variant_part = 0x33 COMMA
+    DW_TAG_variable = 0x34 COMMA
+    DW_TAG_volatile_type = 0x35 COMMA
+    /* DWARF 3.  */
+    DW_TAG_dwarf_procedure = 0x36 COMMA
+    DW_TAG_restrict_type = 0x37 COMMA
+    DW_TAG_interface_type = 0x38 COMMA
+    DW_TAG_namespace = 0x39 COMMA
+    DW_TAG_imported_module = 0x3a COMMA
+    DW_TAG_unspecified_type = 0x3b COMMA
+    DW_TAG_partial_unit = 0x3c COMMA
+    DW_TAG_imported_unit = 0x3d COMMA
+    /* SGI/MIPS Extensions.  */
+    DW_TAG_MIPS_loop = 0x4081 COMMA
+    /* GNU extensions.	*/
+    DW_TAG_format_label = 0x4101 COMMA	/* For FORTRAN 77 and Fortran 90.  */
+    DW_TAG_function_template = 0x4102 COMMA	/* For C++.  */
+    DW_TAG_class_template = 0x4103 COMMA	/* For C++.  */
+    DW_TAG_GNU_BINCL = 0x4104 COMMA
+    DW_TAG_GNU_EINCL = 0x4105 COMMA
+    /* Extensions for UPC.  See: http://upc.gwu.edu/~upc.  */
+    DW_TAG_upc_shared_type = 0x8765 COMMA
+    DW_TAG_upc_strict_type = 0x8766 COMMA
+    DW_TAG_upc_relaxed_type = 0x8767
+IF_NOT_ASM(};)
+
+#define DW_TAG_lo_user	0x4080
+#define DW_TAG_hi_user	0xffff
+
+/* Flag that tells whether entry has a child or not.  */
+#define DW_children_no	 0
+#define	DW_children_yes  1
+
+/* Form names and codes.  */
+ENUM(dwarf_form)
+
+    DW_FORM_addr = 0x01 COMMA
+    DW_FORM_block2 = 0x03 COMMA
+    DW_FORM_block4 = 0x04 COMMA
+    DW_FORM_data2 = 0x05 COMMA
+    DW_FORM_data4 = 0x06 COMMA
+    DW_FORM_data8 = 0x07 COMMA
+    DW_FORM_string = 0x08 COMMA
+    DW_FORM_block = 0x09 COMMA
+    DW_FORM_block1 = 0x0a COMMA
+    DW_FORM_data1 = 0x0b COMMA
+    DW_FORM_flag = 0x0c COMMA
+    DW_FORM_sdata = 0x0d COMMA
+    DW_FORM_strp = 0x0e COMMA
+    DW_FORM_udata = 0x0f COMMA
+    DW_FORM_ref_addr = 0x10 COMMA
+    DW_FORM_ref1 = 0x11 COMMA
+    DW_FORM_ref2 = 0x12 COMMA
+    DW_FORM_ref4 = 0x13 COMMA
+    DW_FORM_ref8 = 0x14 COMMA
+    DW_FORM_ref_udata = 0x15 COMMA
+    DW_FORM_indirect = 0x16
+IF_NOT_ASM(};)
+
+/* Attribute names and codes.  */
+
+ENUM(dwarf_attribute)
+
+    DW_AT_sibling = 0x01 COMMA
+    DW_AT_location = 0x02 COMMA
+    DW_AT_name = 0x03 COMMA
+    DW_AT_ordering = 0x09 COMMA
+    DW_AT_subscr_data = 0x0a COMMA
+    DW_AT_byte_size = 0x0b COMMA
+    DW_AT_bit_offset = 0x0c COMMA
+    DW_AT_bit_size = 0x0d COMMA
+    DW_AT_element_list = 0x0f COMMA
+    DW_AT_stmt_list = 0x10 COMMA
+    DW_AT_low_pc = 0x11 COMMA
+    DW_AT_high_pc = 0x12 COMMA
+    DW_AT_language = 0x13 COMMA
+    DW_AT_member = 0x14 COMMA
+    DW_AT_discr = 0x15 COMMA
+    DW_AT_discr_value = 0x16 COMMA
+    DW_AT_visibility = 0x17 COMMA
+    DW_AT_import = 0x18 COMMA
+    DW_AT_string_length = 0x19 COMMA
+    DW_AT_common_reference = 0x1a COMMA
+    DW_AT_comp_dir = 0x1b COMMA
+    DW_AT_const_value = 0x1c COMMA
+    DW_AT_containing_type = 0x1d COMMA
+    DW_AT_default_value = 0x1e COMMA
+    DW_AT_inline = 0x20 COMMA
+    DW_AT_is_optional = 0x21 COMMA
+    DW_AT_lower_bound = 0x22 COMMA
+    DW_AT_producer = 0x25 COMMA
+    DW_AT_prototyped = 0x27 COMMA
+    DW_AT_return_addr = 0x2a COMMA
+    DW_AT_start_scope = 0x2c COMMA
+    DW_AT_stride_size = 0x2e COMMA
+    DW_AT_upper_bound = 0x2f COMMA
+    DW_AT_abstract_origin = 0x31 COMMA
+    DW_AT_accessibility = 0x32 COMMA
+    DW_AT_address_class = 0x33 COMMA
+    DW_AT_artificial = 0x34 COMMA
+    DW_AT_base_types = 0x35 COMMA
+    DW_AT_calling_convention = 0x36 COMMA
+    DW_AT_count = 0x37 COMMA
+    DW_AT_data_member_location = 0x38 COMMA
+    DW_AT_decl_column = 0x39 COMMA
+    DW_AT_decl_file = 0x3a COMMA
+    DW_AT_decl_line = 0x3b COMMA
+    DW_AT_declaration = 0x3c COMMA
+    DW_AT_discr_list = 0x3d COMMA
+    DW_AT_encoding = 0x3e COMMA
+    DW_AT_external = 0x3f COMMA
+    DW_AT_frame_base = 0x40 COMMA
+    DW_AT_friend = 0x41 COMMA
+    DW_AT_identifier_case = 0x42 COMMA
+    DW_AT_macro_info = 0x43 COMMA
+    DW_AT_namelist_items = 0x44 COMMA
+    DW_AT_priority = 0x45 COMMA
+    DW_AT_segment = 0x46 COMMA
+    DW_AT_specification = 0x47 COMMA
+    DW_AT_static_link = 0x48 COMMA
+    DW_AT_type = 0x49 COMMA
+    DW_AT_use_location = 0x4a COMMA
+    DW_AT_variable_parameter = 0x4b COMMA
+    DW_AT_virtuality = 0x4c COMMA
+    DW_AT_vtable_elem_location = 0x4d COMMA
+    /* DWARF 3 values.	*/
+    DW_AT_allocated	= 0x4e COMMA
+    DW_AT_associated	= 0x4f COMMA
+    DW_AT_data_location = 0x50 COMMA
+    DW_AT_stride	= 0x51 COMMA
+    DW_AT_entry_pc	= 0x52 COMMA
+    DW_AT_use_UTF8	= 0x53 COMMA
+    DW_AT_extension	= 0x54 COMMA
+    DW_AT_ranges	= 0x55 COMMA
+    DW_AT_trampoline	= 0x56 COMMA
+    DW_AT_call_column	= 0x57 COMMA
+    DW_AT_call_file	= 0x58 COMMA
+    DW_AT_call_line	= 0x59 COMMA
+    /* SGI/MIPS extensions.  */
+    DW_AT_MIPS_fde = 0x2001 COMMA
+    DW_AT_MIPS_loop_begin = 0x2002 COMMA
+    DW_AT_MIPS_tail_loop_begin = 0x2003 COMMA
+    DW_AT_MIPS_epilog_begin = 0x2004 COMMA
+    DW_AT_MIPS_loop_unroll_factor = 0x2005 COMMA
+    DW_AT_MIPS_software_pipeline_depth = 0x2006 COMMA
+    DW_AT_MIPS_linkage_name = 0x2007 COMMA
+    DW_AT_MIPS_stride = 0x2008 COMMA
+    DW_AT_MIPS_abstract_name = 0x2009 COMMA
+    DW_AT_MIPS_clone_origin = 0x200a COMMA
+    DW_AT_MIPS_has_inlines = 0x200b COMMA
+    /* GNU extensions.	*/
+    DW_AT_sf_names   = 0x2101 COMMA
+    DW_AT_src_info   = 0x2102 COMMA
+    DW_AT_mac_info   = 0x2103 COMMA
+    DW_AT_src_coords = 0x2104 COMMA
+    DW_AT_body_begin = 0x2105 COMMA
+    DW_AT_body_end   = 0x2106 COMMA
+    DW_AT_GNU_vector = 0x2107 COMMA
+    /* VMS extensions.	*/
+    DW_AT_VMS_rtnbeg_pd_address = 0x2201 COMMA
+    /* UPC extension.  */
+    DW_AT_upc_threads_scaled = 0x3210
+IF_NOT_ASM(};)
+
+#define DW_AT_lo_user	0x2000	/* Implementation-defined range start.	*/
+#define DW_AT_hi_user	0x3ff0	/* Implementation-defined range end.  */
+
+/* Location atom names and codes.  */
+ENUM(dwarf_location_atom)
+
+    DW_OP_addr = 0x03 COMMA
+    DW_OP_deref = 0x06 COMMA
+    DW_OP_const1u = 0x08 COMMA
+    DW_OP_const1s = 0x09 COMMA
+    DW_OP_const2u = 0x0a COMMA
+    DW_OP_const2s = 0x0b COMMA
+    DW_OP_const4u = 0x0c COMMA
+    DW_OP_const4s = 0x0d COMMA
+    DW_OP_const8u = 0x0e COMMA
+    DW_OP_const8s = 0x0f COMMA
+    DW_OP_constu = 0x10 COMMA
+    DW_OP_consts = 0x11 COMMA
+    DW_OP_dup = 0x12 COMMA
+    DW_OP_drop = 0x13 COMMA
+    DW_OP_over = 0x14 COMMA
+    DW_OP_pick = 0x15 COMMA
+    DW_OP_swap = 0x16 COMMA
+    DW_OP_rot = 0x17 COMMA
+    DW_OP_xderef = 0x18 COMMA
+    DW_OP_abs = 0x19 COMMA
+    DW_OP_and = 0x1a COMMA
+    DW_OP_div = 0x1b COMMA
+    DW_OP_minus = 0x1c COMMA
+    DW_OP_mod = 0x1d COMMA
+    DW_OP_mul = 0x1e COMMA
+    DW_OP_neg = 0x1f COMMA
+    DW_OP_not = 0x20 COMMA
+    DW_OP_or = 0x21 COMMA
+    DW_OP_plus = 0x22 COMMA
+    DW_OP_plus_uconst = 0x23 COMMA
+    DW_OP_shl = 0x24 COMMA
+    DW_OP_shr = 0x25 COMMA
+    DW_OP_shra = 0x26 COMMA
+    DW_OP_xor = 0x27 COMMA
+    DW_OP_bra = 0x28 COMMA
+    DW_OP_eq = 0x29 COMMA
+    DW_OP_ge = 0x2a COMMA
+    DW_OP_gt = 0x2b COMMA
+    DW_OP_le = 0x2c COMMA
+    DW_OP_lt = 0x2d COMMA
+    DW_OP_ne = 0x2e COMMA
+    DW_OP_skip = 0x2f COMMA
+    DW_OP_lit0 = 0x30 COMMA
+    DW_OP_lit1 = 0x31 COMMA
+    DW_OP_lit2 = 0x32 COMMA
+    DW_OP_lit3 = 0x33 COMMA
+    DW_OP_lit4 = 0x34 COMMA
+    DW_OP_lit5 = 0x35 COMMA
+    DW_OP_lit6 = 0x36 COMMA
+    DW_OP_lit7 = 0x37 COMMA
+    DW_OP_lit8 = 0x38 COMMA
+    DW_OP_lit9 = 0x39 COMMA
+    DW_OP_lit10 = 0x3a COMMA
+    DW_OP_lit11 = 0x3b COMMA
+    DW_OP_lit12 = 0x3c COMMA
+    DW_OP_lit13 = 0x3d COMMA
+    DW_OP_lit14 = 0x3e COMMA
+    DW_OP_lit15 = 0x3f COMMA
+    DW_OP_lit16 = 0x40 COMMA
+    DW_OP_lit17 = 0x41 COMMA
+    DW_OP_lit18 = 0x42 COMMA
+    DW_OP_lit19 = 0x43 COMMA
+    DW_OP_lit20 = 0x44 COMMA
+    DW_OP_lit21 = 0x45 COMMA
+    DW_OP_lit22 = 0x46 COMMA
+    DW_OP_lit23 = 0x47 COMMA
+    DW_OP_lit24 = 0x48 COMMA
+    DW_OP_lit25 = 0x49 COMMA
+    DW_OP_lit26 = 0x4a COMMA
+    DW_OP_lit27 = 0x4b COMMA
+    DW_OP_lit28 = 0x4c COMMA
+    DW_OP_lit29 = 0x4d COMMA
+    DW_OP_lit30 = 0x4e COMMA
+    DW_OP_lit31 = 0x4f COMMA
+    DW_OP_reg0 = 0x50 COMMA
+    DW_OP_reg1 = 0x51 COMMA
+    DW_OP_reg2 = 0x52 COMMA
+    DW_OP_reg3 = 0x53 COMMA
+    DW_OP_reg4 = 0x54 COMMA
+    DW_OP_reg5 = 0x55 COMMA
+    DW_OP_reg6 = 0x56 COMMA
+    DW_OP_reg7 = 0x57 COMMA
+    DW_OP_reg8 = 0x58 COMMA
+    DW_OP_reg9 = 0x59 COMMA
+    DW_OP_reg10 = 0x5a COMMA
+    DW_OP_reg11 = 0x5b COMMA
+    DW_OP_reg12 = 0x5c COMMA
+    DW_OP_reg13 = 0x5d COMMA
+    DW_OP_reg14 = 0x5e COMMA
+    DW_OP_reg15 = 0x5f COMMA
+    DW_OP_reg16 = 0x60 COMMA
+    DW_OP_reg17 = 0x61 COMMA
+    DW_OP_reg18 = 0x62 COMMA
+    DW_OP_reg19 = 0x63 COMMA
+    DW_OP_reg20 = 0x64 COMMA
+    DW_OP_reg21 = 0x65 COMMA
+    DW_OP_reg22 = 0x66 COMMA
+    DW_OP_reg23 = 0x67 COMMA
+    DW_OP_reg24 = 0x68 COMMA
+    DW_OP_reg25 = 0x69 COMMA
+    DW_OP_reg26 = 0x6a COMMA
+    DW_OP_reg27 = 0x6b COMMA
+    DW_OP_reg28 = 0x6c COMMA
+    DW_OP_reg29 = 0x6d COMMA
+    DW_OP_reg30 = 0x6e COMMA
+    DW_OP_reg31 = 0x6f COMMA
+    DW_OP_breg0 = 0x70 COMMA
+    DW_OP_breg1 = 0x71 COMMA
+    DW_OP_breg2 = 0x72 COMMA
+    DW_OP_breg3 = 0x73 COMMA
+    DW_OP_breg4 = 0x74 COMMA
+    DW_OP_breg5 = 0x75 COMMA
+    DW_OP_breg6 = 0x76 COMMA
+    DW_OP_breg7 = 0x77 COMMA
+    DW_OP_breg8 = 0x78 COMMA
+    DW_OP_breg9 = 0x79 COMMA
+    DW_OP_breg10 = 0x7a COMMA
+    DW_OP_breg11 = 0x7b COMMA
+    DW_OP_breg12 = 0x7c COMMA
+    DW_OP_breg13 = 0x7d COMMA
+    DW_OP_breg14 = 0x7e COMMA
+    DW_OP_breg15 = 0x7f COMMA
+    DW_OP_breg16 = 0x80 COMMA
+    DW_OP_breg17 = 0x81 COMMA
+    DW_OP_breg18 = 0x82 COMMA
+    DW_OP_breg19 = 0x83 COMMA
+    DW_OP_breg20 = 0x84 COMMA
+    DW_OP_breg21 = 0x85 COMMA
+    DW_OP_breg22 = 0x86 COMMA
+    DW_OP_breg23 = 0x87 COMMA
+    DW_OP_breg24 = 0x88 COMMA
+    DW_OP_breg25 = 0x89 COMMA
+    DW_OP_breg26 = 0x8a COMMA
+    DW_OP_breg27 = 0x8b COMMA
+    DW_OP_breg28 = 0x8c COMMA
+    DW_OP_breg29 = 0x8d COMMA
+    DW_OP_breg30 = 0x8e COMMA
+    DW_OP_breg31 = 0x8f COMMA
+    DW_OP_regx = 0x90 COMMA
+    DW_OP_fbreg = 0x91 COMMA
+    DW_OP_bregx = 0x92 COMMA
+    DW_OP_piece = 0x93 COMMA
+    DW_OP_deref_size = 0x94 COMMA
+    DW_OP_xderef_size = 0x95 COMMA
+    DW_OP_nop = 0x96 COMMA
+    /* DWARF 3 extensions.  */
+    DW_OP_push_object_address = 0x97 COMMA
+    DW_OP_call2 = 0x98 COMMA
+    DW_OP_call4 = 0x99 COMMA
+    DW_OP_call_ref = 0x9a COMMA
+    /* GNU extensions.	*/
+    DW_OP_GNU_push_tls_address = 0xe0
+IF_NOT_ASM(};)
+
+#define DW_OP_lo_user	0xe0	/* Implementation-defined range start.	*/
+#define DW_OP_hi_user	0xff	/* Implementation-defined range end.  */
+
+/* Type encodings.  */
+ENUM(dwarf_type)
+
+    DW_ATE_void = 0x0 COMMA
+    DW_ATE_address = 0x1 COMMA
+    DW_ATE_boolean = 0x2 COMMA
+    DW_ATE_complex_float = 0x3 COMMA
+    DW_ATE_float = 0x4 COMMA
+    DW_ATE_signed = 0x5 COMMA
+    DW_ATE_signed_char = 0x6 COMMA
+    DW_ATE_unsigned = 0x7 COMMA
+    DW_ATE_unsigned_char = 0x8 COMMA
+    /* DWARF 3.  */
+    DW_ATE_imaginary_float = 0x9
+IF_NOT_ASM(};)
+
+#define	DW_ATE_lo_user 0x80
+#define	DW_ATE_hi_user 0xff
+
+/* Array ordering names and codes.  */
+ENUM(dwarf_array_dim_ordering)
+
+    DW_ORD_row_major = 0 COMMA
+    DW_ORD_col_major = 1
+IF_NOT_ASM(};)
+
+/* Access attribute.  */
+ENUM(dwarf_access_attribute)
+
+    DW_ACCESS_public = 1 COMMA
+    DW_ACCESS_protected = 2 COMMA
+    DW_ACCESS_private = 3
+IF_NOT_ASM(};)
+
+/* Visibility.	*/
+ENUM(dwarf_visibility_attribute)
+
+    DW_VIS_local = 1 COMMA
+    DW_VIS_exported = 2 COMMA
+    DW_VIS_qualified = 3
+IF_NOT_ASM(};)
+
+/* Virtuality.	*/
+ENUM(dwarf_virtuality_attribute)
+
+    DW_VIRTUALITY_none = 0 COMMA
+    DW_VIRTUALITY_virtual = 1 COMMA
+    DW_VIRTUALITY_pure_virtual = 2
+IF_NOT_ASM(};)
+
+/* Case sensitivity.  */
+ENUM(dwarf_id_case)
+
+    DW_ID_case_sensitive = 0 COMMA
+    DW_ID_up_case = 1 COMMA
+    DW_ID_down_case = 2 COMMA
+    DW_ID_case_insensitive = 3
+IF_NOT_ASM(};)
+
+/* Calling convention.	*/
+ENUM(dwarf_calling_convention)
+
+    DW_CC_normal = 0x1 COMMA
+    DW_CC_program = 0x2 COMMA
+    DW_CC_nocall = 0x3
+IF_NOT_ASM(};)
+
+#define DW_CC_lo_user 0x40
+#define DW_CC_hi_user 0xff
+
+/* Inline attribute.  */
+ENUM(dwarf_inline_attribute)
+
+    DW_INL_not_inlined = 0 COMMA
+    DW_INL_inlined = 1 COMMA
+    DW_INL_declared_not_inlined = 2 COMMA
+    DW_INL_declared_inlined = 3
+IF_NOT_ASM(};)
+
+/* Discriminant lists.	*/
+ENUM(dwarf_discrim_list)
+
+    DW_DSC_label = 0 COMMA
+    DW_DSC_range = 1
+IF_NOT_ASM(};)
+
+/* Line number opcodes.  */
+ENUM(dwarf_line_number_ops)
+
+    DW_LNS_extended_op = 0 COMMA
+    DW_LNS_copy = 1 COMMA
+    DW_LNS_advance_pc = 2 COMMA
+    DW_LNS_advance_line = 3 COMMA
+    DW_LNS_set_file = 4 COMMA
+    DW_LNS_set_column = 5 COMMA
+    DW_LNS_negate_stmt = 6 COMMA
+    DW_LNS_set_basic_block = 7 COMMA
+    DW_LNS_const_add_pc = 8 COMMA
+    DW_LNS_fixed_advance_pc = 9 COMMA
+    /* DWARF 3.  */
+    DW_LNS_set_prologue_end = 10 COMMA
+    DW_LNS_set_epilogue_begin = 11 COMMA
+    DW_LNS_set_isa = 12
+IF_NOT_ASM(};)
+
+/* Line number extended opcodes.  */
+ENUM(dwarf_line_number_x_ops)
+
+    DW_LNE_end_sequence = 1 COMMA
+    DW_LNE_set_address = 2 COMMA
+    DW_LNE_define_file = 3
+IF_NOT_ASM(};)
+
+/* Call frame information.  */
+ENUM(dwarf_call_frame_info)
+
+    DW_CFA_advance_loc = 0x40 COMMA
+    DW_CFA_offset = 0x80 COMMA
+    DW_CFA_restore = 0xc0 COMMA
+    DW_CFA_nop = 0x00 COMMA
+    DW_CFA_set_loc = 0x01 COMMA
+    DW_CFA_advance_loc1 = 0x02 COMMA
+    DW_CFA_advance_loc2 = 0x03 COMMA
+    DW_CFA_advance_loc4 = 0x04 COMMA
+    DW_CFA_offset_extended = 0x05 COMMA
+    DW_CFA_restore_extended = 0x06 COMMA
+    DW_CFA_undefined = 0x07 COMMA
+    DW_CFA_same_value = 0x08 COMMA
+    DW_CFA_register = 0x09 COMMA
+    DW_CFA_remember_state = 0x0a COMMA
+    DW_CFA_restore_state = 0x0b COMMA
+    DW_CFA_def_cfa = 0x0c COMMA
+    DW_CFA_def_cfa_register = 0x0d COMMA
+    DW_CFA_def_cfa_offset = 0x0e COMMA
+
+    /* DWARF 3.  */
+    DW_CFA_def_cfa_expression = 0x0f COMMA
+    DW_CFA_expression = 0x10 COMMA
+    DW_CFA_offset_extended_sf = 0x11 COMMA
+    DW_CFA_def_cfa_sf = 0x12 COMMA
+    DW_CFA_def_cfa_offset_sf = 0x13 COMMA
+
+    /* SGI/MIPS specific.  */
+    DW_CFA_MIPS_advance_loc8 = 0x1d COMMA
+
+    /* GNU extensions.	*/
+    DW_CFA_GNU_window_save = 0x2d COMMA
+    DW_CFA_GNU_args_size = 0x2e COMMA
+    DW_CFA_GNU_negative_offset_extended = 0x2f
+IF_NOT_ASM(};)
+
+#define DW_CIE_ID	  0xffffffff
+#define DW_CIE_VERSION	  1
+
+#define DW_CFA_extended   0
+#define DW_CFA_lo_user	  0x1c
+#define DW_CFA_hi_user	  0x3f
+
+#define DW_CHILDREN_no		     0x00
+#define DW_CHILDREN_yes		     0x01
+
+#define DW_ADDR_none		0
+
+/* Source language names and codes.  */
+ENUM(dwarf_source_language)
+
+    DW_LANG_C89 = 0x0001 COMMA
+    DW_LANG_C = 0x0002 COMMA
+    DW_LANG_Ada83 = 0x0003 COMMA
+    DW_LANG_C_plus_plus = 0x0004 COMMA
+    DW_LANG_Cobol74 = 0x0005 COMMA
+    DW_LANG_Cobol85 = 0x0006 COMMA
+    DW_LANG_Fortran77 = 0x0007 COMMA
+    DW_LANG_Fortran90 = 0x0008 COMMA
+    DW_LANG_Pascal83 = 0x0009 COMMA
+    DW_LANG_Modula2 = 0x000a COMMA
+    DW_LANG_Java = 0x000b COMMA
+    /* DWARF 3.  */
+    DW_LANG_C99 = 0x000c COMMA
+    DW_LANG_Ada95 = 0x000d COMMA
+    DW_LANG_Fortran95 = 0x000e COMMA
+    /* MIPS.  */
+    DW_LANG_Mips_Assembler = 0x8001 COMMA
+    /* UPC.  */
+    DW_LANG_Upc = 0x8765
+IF_NOT_ASM(};)
+
+#define DW_LANG_lo_user 0x8000	/* Implementation-defined range start.	*/
+#define DW_LANG_hi_user 0xffff	/* Implementation-defined range start.	*/
+
+/* Names and codes for macro information.  */
+ENUM(dwarf_macinfo_record_type)
+
+    DW_MACINFO_define = 1 COMMA
+    DW_MACINFO_undef = 2 COMMA
+    DW_MACINFO_start_file = 3 COMMA
+    DW_MACINFO_end_file = 4 COMMA
+    DW_MACINFO_vendor_ext = 255
+IF_NOT_ASM(};)
+
+/* @@@ For use with GNU frame unwind information.  */
+
+#define DW_EH_PE_absptr		0x00
+#define DW_EH_PE_omit		0xff
+
+#define DW_EH_PE_uleb128	0x01
+#define DW_EH_PE_udata2		0x02
+#define DW_EH_PE_udata4		0x03
+#define DW_EH_PE_udata8		0x04
+#define DW_EH_PE_sleb128	0x09
+#define DW_EH_PE_sdata2		0x0A
+#define DW_EH_PE_sdata4		0x0B
+#define DW_EH_PE_sdata8		0x0C
+#define DW_EH_PE_signed		0x08
+
+#define DW_EH_PE_pcrel		0x10
+#define DW_EH_PE_textrel	0x20
+#define DW_EH_PE_datarel	0x30
+#define DW_EH_PE_funcrel	0x40
+#define DW_EH_PE_aligned	0x50
+
+#define DW_EH_PE_indirect	0x80
+
+#endif /* _ELF_DWARF2_H */
--- diff/include/linux/hpet.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/hpet.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,133 @@
+#ifndef	__HPET__
+#define	__HPET__ 1
+
+/*
+ * Offsets into HPET Registers
+ */
+
+struct hpet {
+	u64 hpet_cap;		/* capabilities */
+	u64 res0;		/* reserved */
+	u64 hpet_config;	/* configuration */
+	u64 res1;		/* reserved */
+	u64 hpet_isr;		/* interrupt status reg */
+	u64 res2[25];		/* reserved */
+	union {			/* main counter */
+		u64 _hpet_mc64;
+		u32 _hpet_mc32;
+		unsigned long _hpet_mc;
+	} _u0;
+	u64 res3;		/* reserved */
+	struct hpet_timer {
+		u64 hpet_config;	/* configuration/cap */
+		union {		/* timer compare register */
+			u64 _hpet_hc64;
+			u32 _hpet_hc32;
+			unsigned long _hpet_compare;
+		} _u1;
+		u64 hpet_fsb[2];	/* FSB route */
+	} hpet_timers[1];
+};
+
+#define	hpet_mc		_u0._hpet_mc
+#define	hpet_compare	_u1._hpet_compare
+
+#define	HPET_MAX_TIMERS	(32)
+
+/*
+ * HPET general capabilities register
+ */
+
+#define	HPET_COUNTER_CLK_PERIOD_MASK	(0xffffffff00000000ULL)
+#define	HPET_COUNTER_CLK_PERIOD_SHIFT	(32UL)
+#define	HPET_VENDOR_ID_MASK		(0x00000000ffff0000ULL)
+#define	HPET_VENDOR_ID_SHIFT		(16ULL)
+#define	HPET_LEG_RT_CAP_MASK		(0x8000)
+#define	HPET_COUNTER_SIZE_MASK		(0x2000)
+#define	HPET_NUM_TIM_CAP_MASK		(0x1f00)
+#define	HPET_NUM_TIM_CAP_SHIFT		(8ULL)
+
+/*
+ * HPET general configuration register
+ */
+
+#define	HPET_LEG_RT_CNF_MASK		(2UL)
+#define	HPET_ENABLE_CNF_MASK		(1UL)
+
+
+/*
+ * Timer configuration register
+ */
+
+#define	Tn_INT_ROUTE_CAP_MASK		(0xffffffff00000000ULL)
+#define	Tn_INI_ROUTE_CAP_SHIFT		(32UL)
+#define	Tn_FSB_INT_DELCAP_MASK		(0x8000UL)
+#define	Tn_FSB_INT_DELCAP_SHIFT		(15)
+#define	Tn_FSB_EN_CNF_MASK		(0x4000UL)
+#define	Tn_FSB_EN_CNF_SHIFT		(14)
+#define	Tn_INT_ROUTE_CNF_MASK		(0x3e00UL)
+#define	Tn_INT_ROUTE_CNF_SHIFT		(9)
+#define	Tn_32MODE_CNF_MASK		(0x0100UL)
+#define	Tn_VAL_SET_CNF_MASK		(0x0040UL)
+#define	Tn_SIZE_CAP_MASK		(0x0020UL)
+#define	Tn_PER_INT_CAP_MASK		(0x0010UL)
+#define	Tn_TYPE_CNF_MASK		(0x0008UL)
+#define	Tn_INT_ENB_CNF_MASK		(0x0004UL)
+#define	Tn_INT_TYPE_CNF_MASK		(0x0002UL)
+
+/*
+ * Timer FSB Interrupt Route Register
+ */
+
+#define	Tn_FSB_INT_ADDR_MASK		(0xffffffff00000000ULL)
+#define	Tn_FSB_INT_ADDR_SHIFT		(32UL)
+#define	Tn_FSB_INT_VAL_MASK		(0x00000000ffffffffULL)
+
+struct hpet_info {
+	unsigned long hi_ireqfreq;	/* Hz */
+	unsigned long hi_flags;	/* information */
+	unsigned short hi_hpet;
+	unsigned short hi_timer;
+};
+
+#define	HPET_INFO_PERIODIC	0x0001	/* timer is periodic */
+
+#define	HPET_IE_ON	_IO('h', 0x01)	/* interrupt on */
+#define	HPET_IE_OFF	_IO('h', 0x02)	/* interrupt off */
+#define	HPET_INFO	_IOR('h', 0x03, struct hpet_info)
+#define	HPET_EPI	_IO('h', 0x04)	/* enable periodic */
+#define	HPET_DPI	_IO('h', 0x05)	/* disable periodic */
+#define	HPET_IRQFREQ	_IOW('h', 0x6, unsigned long)	/* IRQFREQ usec */
+
+/*
+ * exported interfaces
+ */
+
+struct hpet_task {
+	void (*ht_func) (void *);
+	void *ht_data;
+	void *ht_opaque;
+};
+
+struct hpet_data {
+	unsigned long hd_address;
+	unsigned short hd_nirqs;
+	unsigned short hd_flags;
+	unsigned int hd_state;	/* timer allocated */
+	unsigned int hd_irq[HPET_MAX_TIMERS];
+};
+
+#define	HPET_DATA_PLATFORM	0x0001	/* platform call to hpet_alloc */
+
+static inline void hpet_reserve_timer(struct hpet_data *hd, int timer)
+{
+	hd->hd_state |= (1 << timer);
+	return;
+}
+
+int hpet_alloc(struct hpet_data *);
+int hpet_register(struct hpet_task *, int);
+int hpet_unregister(struct hpet_task *);
+int hpet_control(struct hpet_task *, unsigned int, unsigned long);
+
+#endif				/* !__HPET__ */
--- diff/include/linux/lockmeter.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/lockmeter.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,320 @@
+/*
+ *  Copyright (C) 1999-2002 Silicon Graphics, Inc.
+ *
+ *  Written by John Hawkes (hawkes@sgi.com)
+ *  Based on klstat.h by Jack Steiner (steiner@sgi.com)
+ *
+ *  Modified by Ray Bryant (raybry@us.ibm.com) Feb-Apr 2000
+ *  Changes Copyright (C) 2000 IBM, Inc.
+ *  Added save of index in spinlock_t to improve efficiency
+ *  of "hold" time reporting for spinlocks
+ *  Added support for hold time statistics for read and write
+ *  locks.
+ *  Moved machine dependent code to include/asm/lockmeter.h.
+ *
+ */
+
+#ifndef _LINUX_LOCKMETER_H
+#define _LINUX_LOCKMETER_H
+
+
+/*---------------------------------------------------
+ *	architecture-independent lockmeter.h
+ *-------------------------------------------------*/
+
+/*
+ * raybry -- version 2: added efficient hold time statistics
+ *           requires lstat recompile, so flagged as new version
+ * raybry -- version 3: added global reader lock data
+ * hawkes -- version 4: removed some unnecessary fields to simplify mips64 port
+ */
+#define LSTAT_VERSION	5
+
+int	lstat_update(void*, void*, int);
+int	lstat_update_time(void*, void*, int, uint32_t);
+
+/*
+ * Currently, the mips64 and sparc64 kernels talk to a 32-bit lockstat, so we
+ * need to force compatibility in the inter-communication data structure.
+ */
+
+#if defined(CONFIG_MIPS32_COMPAT)
+#define TIME_T		uint32_t
+#elif defined(CONFIG_SPARC) || defined(CONFIG_SPARC64)
+#define TIME_T		uint64_t
+#else
+#define TIME_T		time_t
+#endif
+
+#if defined(__KERNEL__) || (!defined(CONFIG_MIPS32_COMPAT) && !defined(CONFIG_SPARC) && !defined(CONFIG_SPARC64)) || (_MIPS_SZLONG==32)
+#define POINTER		void *
+#else
+#define	POINTER		int64_t
+#endif
+
+/*
+ * Values for the "action" parameter passed to lstat_update.
+ *	ZZZ - do we want a try-success status here???
+ */
+#define LSTAT_ACT_NO_WAIT	0
+#define LSTAT_ACT_SPIN		1
+#define LSTAT_ACT_REJECT	2
+#define LSTAT_ACT_WW_SPIN       3
+#define LSTAT_ACT_SLEPT		4 /* UNUSED */
+
+#define LSTAT_ACT_MAX_VALUES	4 /* NOTE: Increase to 5 if use ACT_SLEPT */
+
+/*
+ * Special values for the low 2 bits of an RA passed to
+ * lstat_update.
+ */
+/* we use these values to figure out what kind of lock data */
+/* is stored in the statistics table entry at index ....... */
+#define LSTAT_RA_SPIN           0  /* spin lock data */
+#define LSTAT_RA_READ           1  /* read lock statistics */
+#define LSTAT_RA_SEMA		2  /* RESERVED */
+#define LSTAT_RA_WRITE          3  /* write lock statistics*/
+
+#define LSTAT_RA(n)	\
+	((void*)( ((unsigned long)__builtin_return_address(0) & ~3) | n) )
+
+/*
+ * Constants used for lock addresses in the lstat_directory
+ * to indicate special values of the lock address.
+ */
+#define	LSTAT_MULTI_LOCK_ADDRESS	NULL
+
+/*
+ * Maximum size of the lockstats tables. Increase this value
+ * if its not big enough. (Nothing bad happens if its not
+ * big enough although some locks will not be monitored.)
+ * We record overflows of this quantity in lstat_control.dir_overflows
+ *
+ * Note:  The max value here must fit into the field set
+ * and obtained by the macro's PUT_INDEX() and GET_INDEX().
+ * This value depends on how many bits are available in the
+ * lock word in the particular machine implementation we are on.
+ */
+#define LSTAT_MAX_STAT_INDEX		2000
+
+/*
+ * Size and mask for the hash table into the directory.
+ */
+#define LSTAT_HASH_TABLE_SIZE		4096		/* must be 2**N */
+#define LSTAT_HASH_TABLE_MASK		(LSTAT_HASH_TABLE_SIZE-1)
+
+#define DIRHASH(ra)      ((unsigned long)(ra)>>2 & LSTAT_HASH_TABLE_MASK)
+
+/*
+ *	This defines an entry in the lockstat directory. It contains
+ *	information about a lock being monitored.
+ *	A directory entry only contains the lock identification -
+ *	counts on usage of the lock are kept elsewhere in a per-cpu
+ *	data structure to minimize cache line pinging.
+ */
+typedef struct {
+	POINTER	caller_ra;		  /* RA of code that set lock */
+	POINTER	lock_ptr;		  /* lock address */
+	ushort	next_stat_index;  /* Used to link multiple locks that have the same hash table value */
+} lstat_directory_entry_t;
+
+/*
+ *	A multi-dimensioned array used to contain counts for lock accesses.
+ *	The array is 3-dimensional:
+ *		- CPU number. Keep from thrashing cache lines between CPUs
+ *		- Directory entry index. Identifies the lock
+ *		- Action. Indicates what kind of contention occurred on an
+ *		  access to the lock.
+ *
+ *	The index of an entry in the directory is the same as the 2nd index
+ *	of the entry in the counts array.
+ */
+/*
+ *  This table contains data for spin_locks, write locks, and read locks
+ *  Not all data is used for all cases.  In particular, the hold time
+ *  information is not stored here for read locks since that is a global
+ *  (e. g. cannot be separated out by return address) quantity.
+ *  See the lstat_read_lock_counts_t structure for the global read lock
+ *  hold time.
+ */
+typedef struct {
+	uint64_t    cum_wait_ticks;	/* sum of wait times               */
+	                                /* for write locks, sum of time a  */
+					/* writer is waiting for a reader  */
+	int64_t	    cum_hold_ticks;	/* cumulative sum of holds         */
+	                                /* not used for read mode locks    */
+					/* must be signed. ............... */
+	uint32_t    max_wait_ticks;	/* max waiting time                */
+	uint32_t    max_hold_ticks;	/* max holding time                */
+	uint64_t    cum_wait_ww_ticks;  /* sum times writer waits on writer*/
+	uint32_t    max_wait_ww_ticks;  /* max wait time writer vs writer  */
+	                                /* prev 2 only used for write locks*/
+	uint32_t    acquire_time;       /* time lock acquired this CPU     */
+	uint32_t    count[LSTAT_ACT_MAX_VALUES];
+} lstat_lock_counts_t;
+
+typedef lstat_lock_counts_t	lstat_cpu_counts_t[LSTAT_MAX_STAT_INDEX];
+
+/*
+ * User request to:
+ *	- turn statistic collection on/off, or to reset
+ */
+#define LSTAT_OFF	 0
+#define LSTAT_ON	 1
+#define LSTAT_RESET      2
+#define LSTAT_RELEASE    3
+
+#define LSTAT_MAX_READ_LOCK_INDEX 1000
+typedef struct {
+	POINTER	    lock_ptr;            /* address of lock for output stats */
+	uint32_t    read_lock_count;
+	int64_t     cum_hold_ticks;       /* sum of read lock hold times over */
+	                                  /* all callers. ....................*/
+	uint32_t    write_index;          /* last write lock hash table index */
+	uint32_t    busy_periods;         /* count of busy periods ended this */
+	uint64_t    start_busy;           /* time this busy period started. ..*/
+	uint64_t    busy_ticks;           /* sum of busy periods this lock. ..*/
+	uint64_t    max_busy;             /* longest busy period for this lock*/
+	uint32_t    max_readers;          /* maximum number of readers ...... */
+#ifdef USER_MODE_TESTING
+	rwlock_t    entry_lock;           /* lock for this read lock entry... */
+	                                  /* avoid having more than one rdr at*/
+	                                  /* needed for user space testing... */
+	                                  /* not needed for kernel 'cause it  */
+					  /* is non-preemptive. ............. */
+#endif
+} lstat_read_lock_counts_t;
+typedef lstat_read_lock_counts_t	lstat_read_lock_cpu_counts_t[LSTAT_MAX_READ_LOCK_INDEX];
+
+#if defined(__KERNEL__) || defined(USER_MODE_TESTING)
+
+#ifndef USER_MODE_TESTING
+#include <asm/lockmeter.h>
+#else
+#include "asm_newlockmeter.h"
+#endif
+
+/*
+ * Size and mask for the hash table into the directory.
+ */
+#define LSTAT_HASH_TABLE_SIZE		4096		/* must be 2**N */
+#define LSTAT_HASH_TABLE_MASK		(LSTAT_HASH_TABLE_SIZE-1)
+
+#define DIRHASH(ra)      ((unsigned long)(ra)>>2 & LSTAT_HASH_TABLE_MASK)
+
+/*
+ * This version eliminates the per processor lock stack.  What we do is to
+ * store the index of the lock hash structure in unused bits in the lock
+ * itself.  Then on unlock we can find the statistics record without doing
+ * any additional hash or lock stack lookup.  This works for spin_locks.
+ * Hold time reporting is now basically as cheap as wait time reporting
+ * so we ignore the difference between LSTAT_ON_HOLD and LSTAT_ON_WAIT
+ * as in version 1.1.* of lockmeter.
+ *
+ * For rw_locks, we store the index of a global reader stats structure in
+ * the lock and the writer index is stored in the latter structure.
+ * For read mode locks we hash at the time of the lock to find an entry
+ * in the directory for reader wait time and the like.
+ * At unlock time for read mode locks, we update just the global structure
+ * so we don't need to know the reader directory index value at unlock time.
+ *
+ */
+
+/*
+ * Protocol to change lstat_control.state
+ *   This is complicated because we don't want the cum_hold_time for
+ * a rw_lock to be decremented in _read_lock_ without making sure it
+ * is incremented in _read_lock_ and vice versa.  So here is the
+ * way we change the state of lstat_control.state:
+ * I.  To Turn Statistics On
+ *     After allocating storage, set lstat_control.state non-zero.
+ * This works because we don't start updating statistics for in use
+ * locks until the reader lock count goes to zero.
+ * II. To Turn Statistics Off:
+ * (0)  Disable interrupts on this CPU
+ * (1)  Seize the lstat_control.directory_lock
+ * (2)  Obtain the current value of lstat_control.next_free_read_lock_index
+ * (3)  Store a zero in lstat_control.state.
+ * (4)  Release the lstat_control.directory_lock
+ * (5)  For each lock in the read lock list up to the saved value
+ *      (well, -1) of the next_free_read_lock_index, do the following:
+ *      (a)  Check validity of the stored lock address
+ *           by making sure that the word at the saved addr
+ *           has an index that matches this entry.  If not
+ *           valid, then skip this entry.
+ *      (b)  If there is a write lock already set on this lock,
+ *           skip to (d) below.
+ *      (c)  Set a non-metered write lock on the lock
+ *      (d)  set the cached INDEX in the lock to zero
+ *      (e)  Release the non-metered write lock.
+ * (6)  Re-enable interrupts
+ *
+ * These rules ensure that a read lock will not have its statistics
+ * partially updated even though the global lock recording state has
+ * changed.  See put_lockmeter_info() for implementation.
+ *
+ * The reason for (b) is that there may be write locks set on the
+ * syscall path to put_lockmeter_info() from user space.  If we do
+ * not do this check, then we can deadlock.  A similar problem would
+ * occur if the lock was read locked by the current CPU.  At the
+ * moment this does not appear to happen.
+ */
+
+/*
+ * Main control structure for lockstat. Used to turn statistics on/off
+ * and to maintain directory info.
+ */
+typedef struct {
+	int				state;
+	spinlock_t		control_lock;		/* used to serialize turning statistics on/off   */
+	spinlock_t		directory_lock;		/* for serialize adding entries to directory     */
+	volatile int	next_free_dir_index;/* next free entry in the directory */
+	/* FIXME not all of these fields are used / needed .............. */
+                /* the following fields represent data since     */
+		/* first "lstat on" or most recent "lstat reset" */
+	TIME_T      first_started_time;     /* time when measurement first enabled */
+	TIME_T      started_time;           /* time when measurement last started  */
+	TIME_T      ending_time;            /* time when measurement last disabled */
+	uint64_t    started_cycles64;       /* cycles when measurement last started          */
+	uint64_t    ending_cycles64;        /* cycles when measurement last disabled         */
+	uint64_t    enabled_cycles64;       /* total cycles with measurement enabled         */
+	int         intervals;              /* number of measurement intervals recorded      */
+	                                    /* i. e. number of times did lstat on;lstat off  */
+	lstat_directory_entry_t	*dir;		/* directory */
+	int         dir_overflow;           /* count of times ran out of space in directory  */
+	int         rwlock_overflow;        /* count of times we couldn't allocate a rw block*/
+	ushort		*hashtab;		 	    /* hash table for quick dir scans */
+	lstat_cpu_counts_t	*counts[NR_CPUS];	 /* Array of pointers to per-cpu stats */
+    int         next_free_read_lock_index;   /* next rwlock reader (global) stats block  */
+    lstat_read_lock_cpu_counts_t *read_lock_counts[NR_CPUS]; /* per cpu read lock stats  */
+} lstat_control_t;
+
+#endif	/* defined(__KERNEL__) || defined(USER_MODE_TESTING) */
+
+typedef struct {
+	short		lstat_version;		/* version of the data */
+	short		state;			/* the current state is returned */
+	int		maxcpus;		/* Number of cpus present */
+	int		next_free_dir_index;	/* index of the next free directory entry */
+	TIME_T          first_started_time;	/* when measurement enabled for first time */
+	TIME_T          started_time;		/* time in secs since 1969 when stats last turned on  */
+	TIME_T		ending_time;		/* time in secs since 1969 when stats last turned off */
+	uint32_t	cycleval;		/* cycles per second */
+#ifdef notyet
+	void		*kernel_magic_addr;	/* address of kernel_magic */
+	void		*kernel_end_addr;	/* contents of kernel magic (points to "end") */
+#endif
+	int              next_free_read_lock_index; /* index of next (global) read lock stats struct */
+	uint64_t         started_cycles64;	/* cycles when measurement last started        */
+	uint64_t         ending_cycles64;	/* cycles when stats last turned off           */
+	uint64_t         enabled_cycles64;	/* total cycles with measurement enabled       */
+	int              intervals;		/* number of measurement intervals recorded      */
+						/* i.e. number of times we did lstat on;lstat off*/
+	int              dir_overflow;		/* number of times we wanted more space in directory */
+	int              rwlock_overflow;	/* # of times we wanted more space in read_locks_count */
+	struct new_utsname   uts;		/* info about machine where stats are measured */
+						/* -T option of lockstat allows data to be     */
+						/* moved to another machine. ................. */
+} lstat_user_request_t;
+
+#endif /* _LINUX_LOCKMETER_H */
--- diff/include/linux/netfilter_ipv4/ipt_addrtype.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/netfilter_ipv4/ipt_addrtype.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,11 @@
+#ifndef _IPT_ADDRTYPE_H
+#define _IPT_ADDRTYPE_H
+
+struct ipt_addrtype_info {
+	u_int16_t	source;		/* source-type mask */
+	u_int16_t	dest;		/* dest-type mask */
+	u_int32_t	invert_source;
+	u_int32_t	invert_dest;
+};
+
+#endif
--- diff/include/linux/netfilter_ipv4/ipt_realm.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/netfilter_ipv4/ipt_realm.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,10 @@
+#ifndef _IPT_REALM_H
+#define _IPT_REALM_H
+
+struct ipt_realm_info {
+	u_int32_t id;
+	u_int32_t mask;
+	u_int8_t invert;
+};
+
+#endif /* _IPT_REALM_H */
--- diff/include/linux/perfctr.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/linux/perfctr.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,158 @@
+/* $Id: perfctr.h,v 1.78 2004/05/31 20:45:51 mikpe Exp $
+ * Performance-Monitoring Counters driver
+ *
+ * Copyright (C) 1999-2004  Mikael Pettersson
+ */
+#ifndef _LINUX_PERFCTR_H
+#define _LINUX_PERFCTR_H
+
+#ifdef CONFIG_PERFCTR	/* don't break archs without <asm/perfctr.h> */
+
+#include <asm/perfctr.h>
+
+struct perfctr_info {
+	unsigned int abi_version;
+	char driver_version[32];
+	unsigned int cpu_type;
+	unsigned int cpu_features;
+	unsigned int cpu_khz;
+	unsigned int tsc_to_cpu_mult;
+	unsigned int _reserved2;
+	unsigned int _reserved3;
+	unsigned int _reserved4;
+};
+
+struct perfctr_cpu_mask {
+	unsigned int nrwords;
+	unsigned int mask[1];	/* actually 'nrwords' */
+};
+
+/* abi_version values: Lower 16 bits contain the CPU data version, upper
+   16 bits contain the API version. Each half has a major version in its
+   upper 8 bits, and a minor version in its lower 8 bits. */
+#define PERFCTR_API_VERSION	0x0600	/* 6.0 */
+#define PERFCTR_ABI_VERSION	((PERFCTR_API_VERSION<<16)|PERFCTR_CPU_VERSION)
+
+/* cpu_features flag bits */
+#define PERFCTR_FEATURE_RDPMC	0x01
+#define PERFCTR_FEATURE_RDTSC	0x02
+#define PERFCTR_FEATURE_PCINT	0x04
+
+/* user's view of mmap:ed virtual perfctr */
+struct vperfctr_state {
+	struct perfctr_cpu_state cpu_state;
+};
+
+/* virtual perfctr control object */
+struct vperfctr_control {
+	int si_signo;
+	struct perfctr_cpu_control cpu_control;
+	unsigned int preserve;
+	unsigned int _reserved1;
+	unsigned int _reserved2;
+	unsigned int _reserved3;
+	unsigned int _reserved4;
+};
+
+#else
+struct perfctr_info;
+struct perfctr_cpu_mask;
+struct perfctr_sum_ctrs;
+struct vperfctr_control;
+#endif	/* CONFIG_PERFCTR */
+
+#ifdef __KERNEL__
+
+/*
+ * The perfctr system calls.
+ */
+asmlinkage long sys_perfctr_info(struct perfctr_info*, struct perfctr_cpu_mask*, struct perfctr_cpu_mask*);
+asmlinkage long sys_vperfctr_open(int tid, int creat);
+asmlinkage long sys_vperfctr_control(int fd, const struct vperfctr_control*);
+asmlinkage long sys_vperfctr_unlink(int fd);
+asmlinkage long sys_vperfctr_iresume(int fd);
+asmlinkage long sys_vperfctr_read(int fd,
+				  struct perfctr_sum_ctrs*,
+				  struct vperfctr_control*);
+
+extern struct perfctr_info perfctr_info;
+
+#ifdef CONFIG_PERFCTR_VIRTUAL
+
+/*
+ * Virtual per-process performance-monitoring counters.
+ */
+struct vperfctr;	/* opaque */
+
+/* process management operations */
+extern struct vperfctr *__vperfctr_copy(struct vperfctr*);
+extern void __vperfctr_exit(struct vperfctr*);
+extern void __vperfctr_suspend(struct vperfctr*);
+extern void __vperfctr_resume(struct vperfctr*);
+extern void __vperfctr_sample(struct vperfctr*);
+extern void __vperfctr_set_cpus_allowed(struct task_struct*, struct vperfctr*, cpumask_t);
+
+static inline void perfctr_copy_thread(struct thread_struct *thread)
+{
+	thread->perfctr = NULL;
+}
+
+static inline void perfctr_exit_thread(struct thread_struct *thread)
+{
+	struct vperfctr *perfctr;
+	perfctr = thread->perfctr;
+	if (perfctr)
+		__vperfctr_exit(perfctr);
+}
+
+static inline void perfctr_suspend_thread(struct thread_struct *prev)
+{
+	struct vperfctr *perfctr;
+	perfctr = prev->perfctr;
+	if (perfctr)
+		__vperfctr_suspend(perfctr);
+}
+
+static inline void perfctr_resume_thread(struct thread_struct *next)
+{
+	struct vperfctr *perfctr;
+	perfctr = next->perfctr;
+	if (perfctr)
+		__vperfctr_resume(perfctr);
+}
+
+static inline void perfctr_sample_thread(struct thread_struct *thread)
+{
+	struct vperfctr *perfctr;
+	perfctr = thread->perfctr;
+	if (perfctr)
+		__vperfctr_sample(perfctr);
+}
+
+static inline void perfctr_set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
+{
+#ifdef PERFCTR_CPUS_FORBIDDEN_MASK_NEEDED
+	struct vperfctr *perfctr;
+
+	task_lock(p);
+	perfctr = p->thread.perfctr;
+	if (perfctr)
+		__vperfctr_set_cpus_allowed(p, perfctr, new_mask);
+	task_unlock(p);
+#endif
+}
+
+#else	/* !CONFIG_PERFCTR_VIRTUAL */
+
+static inline void perfctr_copy_thread(struct thread_struct *t) { }
+static inline void perfctr_exit_thread(struct thread_struct *t) { }
+static inline void perfctr_suspend_thread(struct thread_struct *t) { }
+static inline void perfctr_resume_thread(struct thread_struct *t) { }
+static inline void perfctr_sample_thread(struct thread_struct *t) { }
+static inline void perfctr_set_cpus_allowed(struct task_struct *p, cpumask_t m) { }
+
+#endif	/* CONFIG_PERFCTR_VIRTUAL */
+
+#endif	/* __KERNEL__ */
+
+#endif	/* _LINUX_PERFCTR_H */
--- diff/include/media/ovcamchip.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/media/ovcamchip.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,104 @@
+/* OmniVision* camera chip driver API
+ *
+ * Copyright (c) 1999-2004 Mark McClelland
+ *
+ * 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. NO WARRANTY OF ANY KIND is expressed or implied.
+ *
+ * * OmniVision is a trademark of OmniVision Technologies, Inc. This driver
+ * is not sponsored or developed by them.
+ */
+
+#ifndef __LINUX_OVCAMCHIP_H
+#define __LINUX_OVCAMCHIP_H
+
+#include <linux/videodev.h>
+#include <linux/i2c.h>
+
+/* Remove these once they are officially defined */
+#ifndef I2C_DRIVERID_OVCAMCHIP
+	#define I2C_DRIVERID_OVCAMCHIP	0xf00f
+#endif
+#ifndef I2C_HW_SMBUS_OV511
+	#define I2C_HW_SMBUS_OV511	0xfe
+#endif
+#ifndef I2C_HW_SMBUS_OV518
+	#define I2C_HW_SMBUS_OV518	0xff
+#endif
+#ifndef I2C_HW_SMBUS_OVFX2
+	#define I2C_HW_SMBUS_OVFX2	0xfd
+#endif
+
+/* --------------------------------- */
+/*           ENUMERATIONS            */
+/* --------------------------------- */
+
+/* Controls */
+enum {
+	OVCAMCHIP_CID_CONT,		/* Contrast */
+	OVCAMCHIP_CID_BRIGHT,		/* Brightness */
+	OVCAMCHIP_CID_SAT,		/* Saturation */
+	OVCAMCHIP_CID_HUE,		/* Hue */
+	OVCAMCHIP_CID_EXP,		/* Exposure */
+	OVCAMCHIP_CID_FREQ,		/* Light frequency */
+	OVCAMCHIP_CID_BANDFILT,		/* Banding filter */
+	OVCAMCHIP_CID_AUTOBRIGHT,	/* Auto brightness */
+	OVCAMCHIP_CID_AUTOEXP,		/* Auto exposure */
+	OVCAMCHIP_CID_BACKLIGHT,	/* Back light compensation */
+	OVCAMCHIP_CID_MIRROR,		/* Mirror horizontally */
+};
+
+/* Chip types */
+#define NUM_CC_TYPES	9
+enum {
+	CC_UNKNOWN,
+	CC_OV76BE,
+	CC_OV7610,
+	CC_OV7620,
+	CC_OV7620AE,
+	CC_OV6620,
+	CC_OV6630,
+	CC_OV6630AE,
+	CC_OV6630AF,
+};
+
+/* --------------------------------- */
+/*           I2C ADDRESSES           */
+/* --------------------------------- */
+
+#define OV7xx0_SID   (0x42 >> 1)
+#define OV6xx0_SID   (0xC0 >> 1)
+
+/* --------------------------------- */
+/*                API                */
+/* --------------------------------- */
+
+struct ovcamchip_control {
+	__u32 id;
+	__s32 value;
+};
+
+struct ovcamchip_window {
+	int x;
+	int y;
+	int width;
+	int height;
+	int format;
+	int quarter;		/* Scale width and height down 2x */
+
+	/* This stuff will be removed eventually */
+	int clockdiv;		/* Clock divisor setting */
+};
+
+/* Commands */
+#define OVCAMCHIP_CMD_Q_SUBTYPE     _IOR  (0x88, 0x00, int)
+#define OVCAMCHIP_CMD_INITIALIZE    _IOW  (0x88, 0x01, int)
+/* You must call OVCAMCHIP_CMD_INITIALIZE before any of commands below! */
+#define OVCAMCHIP_CMD_S_CTRL        _IOW  (0x88, 0x02, struct ovcamchip_control)
+#define OVCAMCHIP_CMD_G_CTRL        _IOWR (0x88, 0x03, struct ovcamchip_control)
+#define OVCAMCHIP_CMD_S_MODE        _IOW  (0x88, 0x04, struct ovcamchip_window)
+#define OVCAMCHIP_MAX_CMD           _IO   (0x88, 0x3f)
+
+#endif
--- diff/include/net/ip6_checksum.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/net/ip6_checksum.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,94 @@
+/*
+ * INET		An implementation of the TCP/IP protocol suite for the LINUX
+ *		operating system.  INET is implemented using the  BSD Socket
+ *		interface as the means of communication with the user level.
+ *
+ *		Checksumming functions for IPv6
+ *
+ * Authors:	Jorge Cwik, <jorge@laser.satlink.net>
+ *		Arnt Gulbrandsen, <agulbra@nvg.unit.no>
+ *		Borrows very liberally from tcp.c and ip.c, see those
+ *		files for more names.
+ *
+ *		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.
+ */
+
+/*
+ *	Fixes:
+ *
+ *	Ralf Baechle			:	generic ipv6 checksum
+ *	<ralf@waldorf-gmbh.de>
+ */
+
+#ifndef _CHECKSUM_IPV6_H
+#define _CHECKSUM_IPV6_H
+
+#include <asm/types.h>
+#include <asm/byteorder.h>
+#include <net/ip.h>
+#include <asm/checksum.h>
+#include <linux/in6.h>
+
+#ifndef _HAVE_ARCH_IPV6_CSUM
+
+static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
+						     struct in6_addr *daddr,
+						     __u16 len,
+						     unsigned short proto,
+						     unsigned int csum) 
+{
+
+	int carry;
+	__u32 ulen;
+	__u32 uproto;
+
+	csum += saddr->s6_addr32[0];
+	carry = (csum < saddr->s6_addr32[0]);
+	csum += carry;
+
+	csum += saddr->s6_addr32[1];
+	carry = (csum < saddr->s6_addr32[1]);
+	csum += carry;
+
+	csum += saddr->s6_addr32[2];
+	carry = (csum < saddr->s6_addr32[2]);
+	csum += carry;
+
+	csum += saddr->s6_addr32[3];
+	carry = (csum < saddr->s6_addr32[3]);
+	csum += carry;
+
+	csum += daddr->s6_addr32[0];
+	carry = (csum < daddr->s6_addr32[0]);
+	csum += carry;
+
+	csum += daddr->s6_addr32[1];
+	carry = (csum < daddr->s6_addr32[1]);
+	csum += carry;
+
+	csum += daddr->s6_addr32[2];
+	carry = (csum < daddr->s6_addr32[2]);
+	csum += carry;
+
+	csum += daddr->s6_addr32[3];
+	carry = (csum < daddr->s6_addr32[3]);
+	csum += carry;
+
+	ulen = htonl((__u32) len);
+	csum += ulen;
+	carry = (csum < ulen);
+	csum += carry;
+
+	uproto = htonl(proto);
+	csum += uproto;
+	carry = (csum < uproto);
+	csum += carry;
+
+	return csum_fold(csum);
+}
+
+#endif
+#endif
--- diff/include/net/pkt_act.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/net/pkt_act.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,286 @@
+#ifndef __NET_PKT_ACT_H
+#define __NET_PKT_ACT_H
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/bitops.h>
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/in.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <linux/rtnetlink.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+#include <net/sock.h>
+#include <net/pkt_sched.h>
+
+#define tca_st(val) (struct tcf_##val *)
+#define PRIV(a,name) ( tca_st(name) (a)->priv)
+
+#if 0 /* control */
+#define DPRINTK(format,args...) printk(KERN_DEBUG format,##args)
+#else
+#define DPRINTK(format,args...)
+#endif
+
+#if 0 /* data */
+#define D2PRINTK(format,args...) printk(KERN_DEBUG format,##args)
+#else
+#define D2PRINTK(format,args...)
+#endif
+
+static __inline__ unsigned
+tcf_hash(u32 index)
+{
+	return index & MY_TAB_MASK;
+}
+
+/* probably move this from being inline
+ * and put into act_generic
+*/
+static inline void
+tcf_hash_destroy(struct tcf_st *p)
+{
+	unsigned h = tcf_hash(p->index);
+	struct tcf_st **p1p;
+
+	for (p1p = &tcf_ht[h]; *p1p; p1p = &(*p1p)->next) {
+		if (*p1p == p) {
+			write_lock_bh(&tcf_t_lock);
+			*p1p = p->next;
+			write_unlock_bh(&tcf_t_lock);
+#ifdef CONFIG_NET_ESTIMATOR
+			qdisc_kill_estimator(&p->stats);
+#endif
+			kfree(p);
+			return;
+		}
+	}
+	BUG_TRAP(0);
+}
+
+static inline int
+tcf_hash_release(struct tcf_st *p, int bind )
+{
+	int ret = 0;
+	if (p) {
+		if (bind) {
+			p->bindcnt--;
+		}
+		p->refcnt--;
+	       	if(p->bindcnt <=0 && p->refcnt <= 0) {
+			tcf_hash_destroy(p);
+			ret = 1;
+		}
+	}
+	return ret;
+}
+
+static __inline__ int
+tcf_dump_walker(struct sk_buff *skb, struct netlink_callback *cb,
+		struct tc_action *a)
+{
+	struct tcf_st *p;
+	int err =0, index =  -1,i= 0, s_i = 0, n_i = 0;
+	struct rtattr *r ;
+
+	read_lock(&tcf_t_lock);
+
+	s_i = cb->args[0];
+
+	for (i = 0; i < MY_TAB_SIZE; i++) {
+		p = tcf_ht[tcf_hash(i)];
+
+		for (; p; p = p->next) {
+			index++;
+			if (index < s_i)
+				continue;
+			a->priv = p;
+			a->order = n_i;
+			r = (struct rtattr*) skb->tail;
+			RTA_PUT(skb, a->order, 0, NULL);
+			err = tcf_action_dump_1(skb, a, 0, 0);
+			if (0 > err) {
+				index--;
+				skb_trim(skb, (u8*)r - skb->data);
+				goto done;
+			}
+			r->rta_len = skb->tail - (u8*)r;
+			n_i++;
+			if (n_i >= TCA_ACT_MAX_PRIO) {
+				goto done;
+			}
+		}
+	}
+done:
+	read_unlock(&tcf_t_lock);
+	if (n_i)
+		cb->args[0] += n_i;
+	return n_i;
+
+rtattr_failure:
+	skb_trim(skb, (u8*)r - skb->data);
+	goto done;
+}
+
+static __inline__ int
+tcf_del_walker(struct sk_buff *skb, struct tc_action *a)
+{
+	struct tcf_st *p, *s_p;
+	struct rtattr *r ;
+	int i= 0, n_i = 0;
+
+	r = (struct rtattr*) skb->tail;
+	RTA_PUT(skb, a->order, 0, NULL);
+	RTA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind);
+	for (i = 0; i < MY_TAB_SIZE; i++) {
+		p = tcf_ht[tcf_hash(i)];
+
+		while (p != NULL) {
+			s_p = p->next;
+			if (ACT_P_DELETED == tcf_hash_release(p, 0)) {
+				 module_put(a->ops->owner);
+			}
+			n_i++;
+			p = s_p;
+		}
+	}
+	RTA_PUT(skb, TCA_FCNT, 4, &n_i);
+	r->rta_len = skb->tail - (u8*)r;
+
+	return n_i;
+rtattr_failure:
+	skb_trim(skb, (u8*)r - skb->data);
+	return -EINVAL;
+}
+
+static __inline__ int
+tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb, int type,
+		struct tc_action *a)
+{
+		if (type == RTM_DELACTION) {
+			return tcf_del_walker(skb,a);
+		} else if (type == RTM_GETACTION) {
+			return tcf_dump_walker(skb,cb,a);
+		} else {
+			printk("tcf_generic_walker: unknown action %d\n",type);
+			return -EINVAL;
+		}
+}
+
+static __inline__ struct tcf_st *
+tcf_hash_lookup(u32 index)
+{
+	struct tcf_st *p;
+
+	read_lock(&tcf_t_lock);
+	for (p = tcf_ht[tcf_hash(index)]; p; p = p->next) {
+		if (p->index == index)
+			break;
+	}
+	read_unlock(&tcf_t_lock);
+	return p;
+}
+
+static __inline__ u32
+tcf_hash_new_index(void)
+{
+	do {
+		if (++idx_gen == 0)
+			idx_gen = 1;
+	} while (tcf_hash_lookup(idx_gen));
+
+	return idx_gen;
+}
+
+
+static inline int
+tcf_hash_search(struct tc_action *a, u32 index)
+{
+	struct tcf_st *p = tcf_hash_lookup(index);
+
+	if (p != NULL) {
+		a->priv = p;
+		return 1;
+	} else {
+		return 0;
+	}
+}
+
+#ifdef CONFIG_NET_ACT_INIT
+static inline struct tcf_st *
+tcf_hash_check(struct tc_st *parm, struct tc_action *a, int ovr, int bind)
+{
+	struct tcf_st *p = NULL;
+	if (parm->index && (p = tcf_hash_lookup(parm->index)) != NULL) {
+		spin_lock(&p->lock);
+		if (bind) {
+			p->bindcnt++;
+			p->refcnt++;
+		}
+		spin_unlock(&p->lock);
+		a->priv = (void *) p;
+	}
+	return p;
+}
+
+static inline struct tcf_st *
+tcf_hash_create(struct tc_st *parm, struct rtattr *est, struct tc_action *a, int size, int ovr, int bind)
+{
+	unsigned h;
+	struct tcf_st *p = NULL;
+
+	p = kmalloc(size, GFP_KERNEL);
+	if (p == NULL)
+		return p;
+
+	memset(p, 0, size);
+	p->refcnt = 1;
+
+	if (bind) {
+		p->bindcnt = 1;
+	}
+
+	spin_lock_init(&p->lock);
+	p->stats.lock = &p->lock;
+	p->index = parm->index ? : tcf_hash_new_index();
+	p->tm.install = jiffies;
+	p->tm.lastuse = jiffies;
+#ifdef CONFIG_NET_ESTIMATOR
+	if (est) {
+		qdisc_new_estimator(&p->stats, est);
+	}
+#endif
+	h = tcf_hash(p->index);
+	write_lock_bh(&tcf_t_lock);
+	p->next = tcf_ht[h];
+	tcf_ht[h] = p;
+	write_unlock_bh(&tcf_t_lock);
+
+	a->priv = (void *) p;
+	return p;
+}
+
+static inline struct tcf_st *
+tcf_hash_init(struct tc_st *parm, struct rtattr *est, struct tc_action *a, int size, int ovr, int bind)
+{
+	struct tcf_st *p;
+	p = tcf_hash_check (parm,a,ovr,bind);
+	if (NULL == p) {
+		return tcf_hash_create(parm, est, a, size, ovr, bind);
+	}
+}
+
+#endif
+
+#endif
--- diff/include/scsi/scsi_dbg.h	1970-01-01 01:00:00.000000000 +0100
+++ source/include/scsi/scsi_dbg.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,18 @@
+#ifndef _SCSI_SCSI_DBG_H
+#define _SCSI_SCSI_DBG_H
+
+struct scsi_cmnd;
+struct scsi_request;
+
+extern void scsi_print_command(struct scsi_cmnd *);
+extern void __scsi_print_command(unsigned char *);
+extern void scsi_print_sense(const char *, struct scsi_cmnd *);
+extern void scsi_print_req_sense(const char *, struct scsi_request *);
+extern void scsi_print_driverbyte(int);
+extern void scsi_print_hostbyte(int);
+extern void scsi_print_status(unsigned char);
+extern int scsi_print_msg(const unsigned char *);
+extern const char *scsi_sense_key_string(unsigned char);
+extern const char *scsi_extd_sense_format(unsigned char, unsigned char);
+
+#endif /* _SCSI_SCSI_DBG_H */
--- diff/kernel/lockmeter.c	1970-01-01 01:00:00.000000000 +0100
+++ source/kernel/lockmeter.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,1178 @@
+/*
+ *  Copyright (C) 1999,2000 Silicon Graphics, Inc.
+ *
+ *  Written by John Hawkes (hawkes@sgi.com)
+ *  Based on klstat.c by Jack Steiner (steiner@sgi.com)
+ *
+ *  Modified by Ray Bryant (raybry@us.ibm.com)
+ *  Changes Copyright (C) 2000 IBM, Inc.
+ *  Added save of index in spinlock_t to improve efficiency
+ *  of "hold" time reporting for spinlocks
+ *  Added support for hold time statistics for read and write
+ *  locks.
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/sched.h>
+#include <linux/smp.h>
+#include <linux/threads.h>
+#include <linux/version.h>
+#include <linux/vmalloc.h>
+#include <linux/spinlock.h>
+#include <linux/utsname.h>
+#include <linux/module.h>
+#include <asm/system.h>
+#include <asm/uaccess.h>
+
+#include <linux/lockmeter.h>
+
+#define ASSERT(cond)
+#define bzero(loc,size)		memset(loc,0,size)
+
+/*<---------------------------------------------------*/
+/*              lockmeter.c                           */
+/*>---------------------------------------------------*/
+
+static lstat_control_t lstat_control __cacheline_aligned =
+	{ LSTAT_OFF, SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED,
+	  19 * 0, NR_CPUS * 0, 0, NR_CPUS * 0 };
+
+static ushort lstat_make_dir_entry(void *, void *);
+
+/*
+ * lstat_lookup
+ *
+ * Given a RA, locate the directory entry for the lock.
+ */
+static ushort
+lstat_lookup(void *lock_ptr, void *caller_ra)
+{
+	ushort index;
+	lstat_directory_entry_t *dirp;
+
+	dirp = lstat_control.dir;
+
+	index = lstat_control.hashtab[DIRHASH(caller_ra)];
+	while (dirp[index].caller_ra != caller_ra) {
+		if (index == 0) {
+			return lstat_make_dir_entry(lock_ptr, caller_ra);
+		}
+		index = dirp[index].next_stat_index;
+	}
+
+	if (dirp[index].lock_ptr != NULL && dirp[index].lock_ptr != lock_ptr) {
+		dirp[index].lock_ptr = NULL;
+	}
+
+	return index;
+}
+
+/*
+ * lstat_make_dir_entry
+ * Called to add a new lock to the lock directory.
+ */
+static ushort
+lstat_make_dir_entry(void *lock_ptr, void *caller_ra)
+{
+	lstat_directory_entry_t *dirp;
+	ushort index, hindex;
+	unsigned long flags;
+
+	/* lock the table without recursively reentering this metering code */
+	local_irq_save(flags);
+	_raw_spin_lock(&lstat_control.directory_lock);
+
+	hindex = DIRHASH(caller_ra);
+	index = lstat_control.hashtab[hindex];
+	dirp = lstat_control.dir;
+	while (index && dirp[index].caller_ra != caller_ra)
+		index = dirp[index].next_stat_index;
+
+	if (index == 0) {
+		if (lstat_control.next_free_dir_index < LSTAT_MAX_STAT_INDEX) {
+			index = lstat_control.next_free_dir_index++;
+			lstat_control.dir[index].caller_ra = caller_ra;
+			lstat_control.dir[index].lock_ptr = lock_ptr;
+			lstat_control.dir[index].next_stat_index =
+				lstat_control.hashtab[hindex];
+			lstat_control.hashtab[hindex] = index;
+		} else {
+			lstat_control.dir_overflow++;
+		}
+	}
+	_raw_spin_unlock(&lstat_control.directory_lock);
+	local_irq_restore(flags);
+	return index;
+}
+
+int
+lstat_update(void *lock_ptr, void *caller_ra, int action)
+{
+	int index;
+	int cpu;
+
+	ASSERT(action < LSTAT_ACT_MAX_VALUES);
+
+	if (lstat_control.state == LSTAT_OFF)
+		return 0;
+
+	index = lstat_lookup(lock_ptr, caller_ra);
+	cpu = THIS_CPU_NUMBER;
+	(*lstat_control.counts[cpu])[index].count[action]++;
+	(*lstat_control.counts[cpu])[index].acquire_time = get_cycles();
+
+	return index;
+}
+
+int
+lstat_update_time(void *lock_ptr, void *caller_ra, int action, uint32_t ticks)
+{
+	ushort index;
+	int cpu;
+
+	ASSERT(action < LSTAT_ACT_MAX_VALUES);
+
+	if (lstat_control.state == LSTAT_OFF)
+		return 0;
+
+	index = lstat_lookup(lock_ptr, caller_ra);
+	cpu = THIS_CPU_NUMBER;
+	(*lstat_control.counts[cpu])[index].count[action]++;
+	(*lstat_control.counts[cpu])[index].cum_wait_ticks += (uint64_t) ticks;
+	if ((*lstat_control.counts[cpu])[index].max_wait_ticks < ticks)
+		(*lstat_control.counts[cpu])[index].max_wait_ticks = ticks;
+
+	(*lstat_control.counts[cpu])[index].acquire_time = get_cycles();
+
+	return index;
+}
+
+void
+_metered_spin_lock(spinlock_t * lock_ptr)
+{
+	if (lstat_control.state == LSTAT_OFF) {
+		_raw_spin_lock(lock_ptr);	/* do the real lock */
+		PUT_INDEX(lock_ptr, 0);	/* clean index in case lockmetering  */
+		/* gets turned on before unlock */
+	} else {
+		void *this_pc = LSTAT_RA(LSTAT_RA_SPIN);
+		int index;
+
+		if (_raw_spin_trylock(lock_ptr)) {
+			index = lstat_update(lock_ptr, this_pc,
+						LSTAT_ACT_NO_WAIT);
+		} else {
+			uint32_t start_cycles = get_cycles();
+			_raw_spin_lock(lock_ptr);	/* do the real lock */
+			index = lstat_update_time(lock_ptr, this_pc,
+				LSTAT_ACT_SPIN, get_cycles() - start_cycles);
+		}
+		/* save the index in the lock itself for use in spin unlock */
+		PUT_INDEX(lock_ptr, index);
+	}
+}
+
+int
+_metered_spin_trylock(spinlock_t * lock_ptr)
+{
+	if (lstat_control.state == LSTAT_OFF) {
+		return _raw_spin_trylock(lock_ptr);
+	} else {
+		int retval;
+		void *this_pc = LSTAT_RA(LSTAT_RA_SPIN);
+
+		if ((retval = _raw_spin_trylock(lock_ptr))) {
+			int index = lstat_update(lock_ptr, this_pc,
+						LSTAT_ACT_NO_WAIT);
+			/*
+			 * save the index in the lock itself for use in spin
+			 * unlock
+			 */
+			PUT_INDEX(lock_ptr, index);
+		} else {
+			lstat_update(lock_ptr, this_pc, LSTAT_ACT_REJECT);
+		}
+
+		return retval;
+	}
+}
+
+void
+_metered_spin_unlock(spinlock_t * lock_ptr)
+{
+	int index = -1;
+
+	if (lstat_control.state != LSTAT_OFF) {
+		index = GET_INDEX(lock_ptr);
+		/*
+		 * If statistics were turned off when we set the lock,
+		 * then the index can be zero.  If that is the case,
+		 * then collect no stats on this call.
+		 */
+		if (index > 0) {
+			uint32_t hold_time;
+			int cpu = THIS_CPU_NUMBER;
+			hold_time = get_cycles() -
+			 (*lstat_control.counts[cpu])[index].acquire_time;
+			(*lstat_control.counts[cpu])[index].cum_hold_ticks +=
+				(uint64_t) hold_time;
+			if ((*lstat_control.counts[cpu])[index].max_hold_ticks <
+			    hold_time)
+				(*lstat_control.counts[cpu])[index].
+				    max_hold_ticks = hold_time;
+		}
+	}
+
+	/* make sure we don't have a stale index value saved */
+	PUT_INDEX(lock_ptr, 0);
+	_raw_spin_unlock(lock_ptr);	/* do the real unlock */
+}
+
+/*
+ * allocate the next global read lock structure and store its index
+ * in the rwlock at "lock_ptr".
+ */
+uint32_t
+alloc_rwlock_struct(rwlock_t * rwlock_ptr)
+{
+	int index;
+	unsigned long flags;
+	int cpu = THIS_CPU_NUMBER;
+
+	/* If we've already overflowed, then do a quick exit */
+	if (lstat_control.next_free_read_lock_index >
+			LSTAT_MAX_READ_LOCK_INDEX) {
+		lstat_control.rwlock_overflow++;
+		return 0;
+	}
+
+	local_irq_save(flags);
+	_raw_spin_lock(&lstat_control.directory_lock);
+
+	/* It is possible this changed while we were waiting for the directory_lock */
+	if (lstat_control.state == LSTAT_OFF) {
+		index = 0;
+		goto unlock;
+	}
+
+	/* It is possible someone else got here first and set the index */
+	if ((index = GET_RWINDEX(rwlock_ptr)) == 0) {
+		/*
+		 * we can't turn on read stats for this lock while there are
+		 * readers (this would mess up the running hold time sum at
+		 * unlock time)
+		 */
+		if (RWLOCK_READERS(rwlock_ptr) != 0) {
+			index = 0;
+			goto unlock;
+		}
+
+		/*
+		 * if stats are turned on after being off, we may need to
+		 * return an old index from when the statistics were on last
+		 * time.
+		 */
+		for (index = 1; index < lstat_control.next_free_read_lock_index;
+				index++)
+			if ((*lstat_control.read_lock_counts[cpu])[index].
+					lock_ptr == rwlock_ptr)
+				goto put_index_and_unlock;
+
+		/* allocate the next global read lock structure */
+		if (lstat_control.next_free_read_lock_index >=
+		    LSTAT_MAX_READ_LOCK_INDEX) {
+			lstat_control.rwlock_overflow++;
+			index = 0;
+			goto unlock;
+		}
+		index = lstat_control.next_free_read_lock_index++;
+
+		/*
+		 * initialize the global read stats data structure for each
+		 * cpu
+		 */
+		for (cpu = 0; cpu < num_online_cpus(); cpu++) {
+			(*lstat_control.read_lock_counts[cpu])[index].lock_ptr =
+				rwlock_ptr;
+		}
+put_index_and_unlock:
+		/* store the index for the read lock structure into the lock */
+		PUT_RWINDEX(rwlock_ptr, index);
+	}
+
+unlock:
+	_raw_spin_unlock(&lstat_control.directory_lock);
+	local_irq_restore(flags);
+	return index;
+}
+
+void
+_metered_read_lock(rwlock_t * rwlock_ptr)
+{
+	void *this_pc;
+	uint32_t start_cycles;
+	int index;
+	int cpu;
+	unsigned long flags;
+	int readers_before, readers_after;
+	uint64_t cycles64;
+
+	if (lstat_control.state == LSTAT_OFF) {
+		_raw_read_lock(rwlock_ptr);
+		/* clean index in case lockmetering turns on before an unlock */
+		PUT_RWINDEX(rwlock_ptr, 0);
+		return;
+	}
+
+	this_pc = LSTAT_RA(LSTAT_RA_READ);
+	cpu = THIS_CPU_NUMBER;
+	index = GET_RWINDEX(rwlock_ptr);
+
+	/* allocate the global stats entry for this lock, if needed */
+	if (index == 0)
+		index = alloc_rwlock_struct(rwlock_ptr);
+
+	readers_before = RWLOCK_READERS(rwlock_ptr);
+	if (_raw_read_trylock(rwlock_ptr)) {
+		/*
+		 * We have decremented the lock to count a new reader,
+		 * and have confirmed that no writer has it locked.
+		 */
+		/* update statistics if enabled */
+		if (index > 0) {
+			local_irq_save(flags);
+			lstat_update((void *) rwlock_ptr, this_pc,
+					LSTAT_ACT_NO_WAIT);
+			/* preserve value of TSC so cum_hold_ticks and start_busy use same value */
+			cycles64 = get_cycles64();
+			(*lstat_control.read_lock_counts[cpu])[index].
+				cum_hold_ticks -= cycles64;
+
+			/* record time and cpu of start of busy period */
+			/* this is not perfect (some race conditions are possible) */
+			if (readers_before == 0) {
+				(*lstat_control.read_lock_counts[cpu])[index].
+					start_busy = cycles64;
+				PUT_RW_CPU(rwlock_ptr, cpu);
+			}
+			readers_after = RWLOCK_READERS(rwlock_ptr);
+			if (readers_after >
+				(*lstat_control.read_lock_counts[cpu])[index].
+					max_readers)
+				(*lstat_control.read_lock_counts[cpu])[index].
+					max_readers = readers_after;
+			local_irq_restore(flags);
+		}
+
+		return;
+	}
+	/* If we get here, then we could not quickly grab the read lock */
+
+	start_cycles = get_cycles();	/* start counting the wait time */
+
+	/* Now spin until read_lock is successful */
+	_raw_read_lock(rwlock_ptr);
+
+	lstat_update_time((void *) rwlock_ptr, this_pc, LSTAT_ACT_SPIN,
+			  get_cycles() - start_cycles);
+
+	/* update statistics if they are enabled for this lock */
+	if (index > 0) {
+		local_irq_save(flags);
+		cycles64 = get_cycles64();
+		(*lstat_control.read_lock_counts[cpu])[index].cum_hold_ticks -=
+				cycles64;
+
+		/* this is not perfect (some race conditions are possible) */
+		if (readers_before == 0) {
+			(*lstat_control.read_lock_counts[cpu])[index].
+				start_busy = cycles64;
+			PUT_RW_CPU(rwlock_ptr, cpu);
+		}
+		readers_after = RWLOCK_READERS(rwlock_ptr);
+		if (readers_after >
+		    (*lstat_control.read_lock_counts[cpu])[index].max_readers)
+			(*lstat_control.read_lock_counts[cpu])[index].
+				max_readers = readers_after;
+		local_irq_restore(flags);
+	}
+}
+
+void
+_metered_read_unlock(rwlock_t * rwlock_ptr)
+{
+	int index;
+	int cpu;
+	unsigned long flags;
+	uint64_t busy_length;
+	uint64_t cycles64;
+
+	if (lstat_control.state == LSTAT_OFF) {
+		_raw_read_unlock(rwlock_ptr);
+		return;
+	}
+
+	index = GET_RWINDEX(rwlock_ptr);
+	cpu = THIS_CPU_NUMBER;
+
+	if (index > 0) {
+		local_irq_save(flags);
+		/*
+		 * preserve value of TSC so cum_hold_ticks and busy_ticks are
+		 * consistent.
+		 */
+		cycles64 = get_cycles64();
+		(*lstat_control.read_lock_counts[cpu])[index].cum_hold_ticks +=
+			cycles64;
+		(*lstat_control.read_lock_counts[cpu])[index].read_lock_count++;
+
+		/*
+		 * once again, this is not perfect (some race conditions are
+		 * possible)
+		 */
+		if (RWLOCK_READERS(rwlock_ptr) == 1) {
+			int cpu1 = GET_RW_CPU(rwlock_ptr);
+			uint64_t last_start_busy =
+				(*lstat_control.read_lock_counts[cpu1])[index].
+					start_busy;
+			(*lstat_control.read_lock_counts[cpu])[index].
+				busy_periods++;
+			if (cycles64 > last_start_busy) {
+				busy_length = cycles64 - last_start_busy;
+				(*lstat_control.read_lock_counts[cpu])[index].
+					busy_ticks += busy_length;
+				if (busy_length >
+					(*lstat_control.
+						read_lock_counts[cpu])[index].
+							max_busy)
+					(*lstat_control.
+					 read_lock_counts[cpu])[index].
+						max_busy = busy_length;
+			}
+		}
+		local_irq_restore(flags);
+	}
+	_raw_read_unlock(rwlock_ptr);
+}
+
+void
+_metered_write_lock(rwlock_t * rwlock_ptr)
+{
+	uint32_t start_cycles;
+	void *this_pc;
+	uint32_t spin_ticks = 0; /* in anticipation of a potential wait */
+	int index;
+	int write_index = 0;
+	int cpu;
+	enum {
+		writer_writer_conflict,
+		writer_reader_conflict
+	} why_wait = writer_writer_conflict;
+
+	if (lstat_control.state == LSTAT_OFF) {
+		_raw_write_lock(rwlock_ptr);
+		/* clean index in case lockmetering turns on before an unlock */
+		PUT_RWINDEX(rwlock_ptr, 0);
+		return;
+	}
+
+	this_pc = LSTAT_RA(LSTAT_RA_WRITE);
+	cpu = THIS_CPU_NUMBER;
+	index = GET_RWINDEX(rwlock_ptr);
+
+	/* allocate the global stats entry for this lock, if needed */
+	if (index == 0) {
+		index = alloc_rwlock_struct(rwlock_ptr);
+	}
+
+	if (_raw_write_trylock(rwlock_ptr)) {
+		/* We acquired the lock on the first try */
+		write_index = lstat_update((void *) rwlock_ptr, this_pc,
+					LSTAT_ACT_NO_WAIT);
+		/* save the write_index for use in unlock if stats enabled */
+		if (index > 0)
+			(*lstat_control.read_lock_counts[cpu])[index].
+				write_index = write_index;
+		return;
+	}
+
+	/* If we get here, then we could not quickly grab the write lock */
+	start_cycles = get_cycles();	/* start counting the wait time */
+
+	why_wait = RWLOCK_READERS(rwlock_ptr) ?
+			writer_reader_conflict : writer_writer_conflict;
+
+	/* Now set the lock and wait for conflicts to disappear */
+	_raw_write_lock(rwlock_ptr);
+
+	spin_ticks = get_cycles() - start_cycles;
+
+	/* update stats -- if enabled */
+	if (index > 0 && spin_ticks) {
+		if (why_wait == writer_reader_conflict) {
+			/* waited due to a reader holding the lock */
+			write_index = lstat_update_time((void *)rwlock_ptr,
+					this_pc, LSTAT_ACT_SPIN, spin_ticks);
+		} else {
+			/*
+			 * waited due to another writer holding the lock
+			 */
+			write_index = lstat_update_time((void *)rwlock_ptr,
+				this_pc, LSTAT_ACT_WW_SPIN, spin_ticks);
+			(*lstat_control.counts[cpu])[write_index].
+				cum_wait_ww_ticks += spin_ticks;
+			if (spin_ticks >
+				(*lstat_control.counts[cpu])[write_index].
+					max_wait_ww_ticks) {
+				(*lstat_control.counts[cpu])[write_index].
+					max_wait_ww_ticks = spin_ticks;
+			}
+		}
+
+		/* save the directory index for use on write_unlock */
+		(*lstat_control.read_lock_counts[cpu])[index].
+			write_index = write_index;
+	}
+}
+
+void
+_metered_write_unlock(rwlock_t * rwlock_ptr)
+{
+	int index;
+	int cpu;
+	int write_index;
+	uint32_t hold_time;
+
+	if (lstat_control.state == LSTAT_OFF) {
+		_raw_write_unlock(rwlock_ptr);
+		return;
+	}
+
+	cpu = THIS_CPU_NUMBER;
+	index = GET_RWINDEX(rwlock_ptr);
+
+	/* update statistics if stats enabled for this lock */
+	if (index > 0) {
+		write_index =
+		    (*lstat_control.read_lock_counts[cpu])[index].write_index;
+
+		hold_time = get_cycles() -
+			(*lstat_control.counts[cpu])[write_index].acquire_time;
+		(*lstat_control.counts[cpu])[write_index].cum_hold_ticks +=
+			(uint64_t) hold_time;
+		if ((*lstat_control.counts[cpu])[write_index].max_hold_ticks <
+				hold_time)
+			(*lstat_control.counts[cpu])[write_index].
+				max_hold_ticks = hold_time;
+	}
+	_raw_write_unlock(rwlock_ptr);
+}
+
+int
+_metered_write_trylock(rwlock_t * rwlock_ptr)
+{
+	int retval;
+	void *this_pc = LSTAT_RA(LSTAT_RA_WRITE);
+
+	if ((retval = _raw_write_trylock(rwlock_ptr))) {
+		lstat_update(rwlock_ptr, this_pc, LSTAT_ACT_NO_WAIT);
+	} else {
+		lstat_update(rwlock_ptr, this_pc, LSTAT_ACT_REJECT);
+	}
+
+	return retval;
+}
+
+static void
+init_control_space(void)
+{
+	/* Set all control space pointers to null and indices to "empty" */
+	int cpu;
+
+	/*
+	 * Access CPU_CYCLE_FREQUENCY at the outset, which in some
+	 * architectures may trigger a runtime calculation that uses a
+	 * spinlock.  Let's do this before lockmetering is turned on.
+	 */
+	if (CPU_CYCLE_FREQUENCY == 0)
+		BUG();
+
+	lstat_control.hashtab = NULL;
+	lstat_control.dir = NULL;
+	for (cpu = 0; cpu < NR_CPUS; cpu++) {
+		lstat_control.counts[cpu] = NULL;
+		lstat_control.read_lock_counts[cpu] = NULL;
+	}
+}
+
+static int
+reset_lstat_data(void)
+{
+	int cpu, flags;
+
+	flags = 0;
+	lstat_control.next_free_dir_index = 1;	/* 0 is for overflows */
+	lstat_control.next_free_read_lock_index = 1;
+	lstat_control.dir_overflow = 0;
+	lstat_control.rwlock_overflow = 0;
+
+	lstat_control.started_cycles64 = 0;
+	lstat_control.ending_cycles64 = 0;
+	lstat_control.enabled_cycles64 = 0;
+	lstat_control.first_started_time = 0;
+	lstat_control.started_time = 0;
+	lstat_control.ending_time = 0;
+	lstat_control.intervals = 0;
+
+	/*
+	 * paranoia -- in case someone does a "lockstat reset" before
+	 * "lockstat on"
+	 */
+	if (lstat_control.hashtab) {
+		bzero(lstat_control.hashtab,
+			LSTAT_HASH_TABLE_SIZE * sizeof (short));
+		bzero(lstat_control.dir, LSTAT_MAX_STAT_INDEX *
+				sizeof (lstat_directory_entry_t));
+
+		for (cpu = 0; cpu < num_online_cpus(); cpu++) {
+			bzero(lstat_control.counts[cpu],
+				sizeof (lstat_cpu_counts_t));
+			bzero(lstat_control.read_lock_counts[cpu],
+				sizeof (lstat_read_lock_cpu_counts_t));
+		}
+	}
+#ifdef NOTDEF
+	_raw_spin_unlock(&lstat_control.directory_lock);
+	local_irq_restore(flags);
+#endif
+	return 1;
+}
+
+static void
+release_control_space(void)
+{
+	/*
+	 * Called when either (1) allocation of kmem
+	 * or (2) when user writes LSTAT_RELEASE to /pro/lockmeter.
+	 * Assume that all pointers have been initialized to zero,
+	 * i.e., nonzero pointers are valid addresses.
+	 */
+	int cpu;
+
+	if (lstat_control.hashtab) {
+		kfree(lstat_control.hashtab);
+		lstat_control.hashtab = NULL;
+	}
+
+	if (lstat_control.dir) {
+		vfree(lstat_control.dir);
+		lstat_control.dir = NULL;
+	}
+
+	for (cpu = 0; cpu < NR_CPUS; cpu++) {
+		if (lstat_control.counts[cpu]) {
+			vfree(lstat_control.counts[cpu]);
+			lstat_control.counts[cpu] = NULL;
+		}
+		if (lstat_control.read_lock_counts[cpu]) {
+			kfree(lstat_control.read_lock_counts[cpu]);
+			lstat_control.read_lock_counts[cpu] = NULL;
+		}
+	}
+}
+
+int
+get_lockmeter_info_size(void)
+{
+	return sizeof (lstat_user_request_t)
+		+ num_online_cpus() * sizeof (lstat_cpu_counts_t)
+		+ num_online_cpus() * sizeof (lstat_read_lock_cpu_counts_t)
+		+ (LSTAT_MAX_STAT_INDEX * sizeof (lstat_directory_entry_t));
+}
+
+ssize_t
+get_lockmeter_info(char *buffer, size_t max_len, loff_t * last_index)
+{
+	lstat_user_request_t req;
+	struct timeval tv;
+	ssize_t next_ret_bcount;
+	ssize_t actual_ret_bcount = 0;
+	int cpu;
+
+	*last_index = 0;	/* a one-shot read */
+
+	req.lstat_version = LSTAT_VERSION;
+	req.state = lstat_control.state;
+	req.maxcpus = num_online_cpus();
+	req.cycleval = CPU_CYCLE_FREQUENCY;
+#ifdef notyet
+	req.kernel_magic_addr = (void *) &_etext;
+	req.kernel_end_addr = (void *) &_etext;
+#endif
+	req.uts = system_utsname;
+	req.intervals = lstat_control.intervals;
+
+	req.first_started_time = lstat_control.first_started_time;
+	req.started_time = lstat_control.started_time;
+	req.started_cycles64 = lstat_control.started_cycles64;
+
+	req.next_free_dir_index = lstat_control.next_free_dir_index;
+	req.next_free_read_lock_index = lstat_control.next_free_read_lock_index;
+	req.dir_overflow = lstat_control.dir_overflow;
+	req.rwlock_overflow = lstat_control.rwlock_overflow;
+
+	if (lstat_control.state == LSTAT_OFF) {
+		if (req.intervals == 0) {
+			/* mesasurement is off and no valid data present */
+			next_ret_bcount = sizeof (lstat_user_request_t);
+			req.enabled_cycles64 = 0;
+
+			if ((actual_ret_bcount + next_ret_bcount) > max_len)
+				return actual_ret_bcount;
+
+			copy_to_user(buffer, (void *) &req, next_ret_bcount);
+			actual_ret_bcount += next_ret_bcount;
+			return actual_ret_bcount;
+		} else {
+			/*
+			 * measurement is off but valid data present
+			 * fetch time info from lstat_control
+			 */
+			req.ending_time = lstat_control.ending_time;
+			req.ending_cycles64 = lstat_control.ending_cycles64;
+			req.enabled_cycles64 = lstat_control.enabled_cycles64;
+		}
+	} else {
+		/*
+		 * this must be a read while data active--use current time,
+		 * etc
+		 */
+		do_gettimeofday(&tv);
+		req.ending_time = tv.tv_sec;
+		req.ending_cycles64 = get_cycles64();
+		req.enabled_cycles64 = req.ending_cycles64 -
+			req.started_cycles64 + lstat_control.enabled_cycles64;
+	}
+
+	next_ret_bcount = sizeof (lstat_user_request_t);
+	if ((actual_ret_bcount + next_ret_bcount) > max_len)
+		return actual_ret_bcount;
+
+	copy_to_user(buffer, (void *) &req, next_ret_bcount);
+	actual_ret_bcount += next_ret_bcount;
+
+	if (!lstat_control.counts[0])	/* not initialized? */
+		return actual_ret_bcount;
+
+	next_ret_bcount = sizeof (lstat_cpu_counts_t);
+	for (cpu = 0; cpu < num_online_cpus(); cpu++) {
+		if ((actual_ret_bcount + next_ret_bcount) > max_len)
+			return actual_ret_bcount;	/* leave early */
+		copy_to_user(buffer + actual_ret_bcount,
+				lstat_control.counts[cpu], next_ret_bcount);
+		actual_ret_bcount += next_ret_bcount;
+	}
+
+	next_ret_bcount = LSTAT_MAX_STAT_INDEX *
+			sizeof (lstat_directory_entry_t);
+	if (((actual_ret_bcount + next_ret_bcount) > max_len)
+			|| !lstat_control.dir)
+		return actual_ret_bcount;	/* leave early */
+
+	copy_to_user(buffer + actual_ret_bcount, lstat_control.dir,
+			next_ret_bcount);
+	actual_ret_bcount += next_ret_bcount;
+
+	next_ret_bcount = sizeof (lstat_read_lock_cpu_counts_t);
+	for (cpu = 0; cpu < num_online_cpus(); cpu++) {
+		if (actual_ret_bcount + next_ret_bcount > max_len)
+			return actual_ret_bcount;
+		copy_to_user(buffer + actual_ret_bcount,
+				lstat_control.read_lock_counts[cpu],
+				next_ret_bcount);
+		actual_ret_bcount += next_ret_bcount;
+	}
+
+	return actual_ret_bcount;
+}
+
+/*
+ *  Writing to the /proc lockmeter node enables or disables metering.
+ *  based upon the first byte of the "written" data.
+ *  The following values are defined:
+ *  LSTAT_ON: 1st call: allocates storage, intializes and turns on measurement
+ *            subsequent calls just turn on measurement
+ *  LSTAT_OFF: turns off measurement
+ *  LSTAT_RESET: resets statistics
+ *  LSTAT_RELEASE: releases statistics storage
+ *
+ *  This allows one to accumulate statistics over several lockstat runs:
+ *
+ *  lockstat on
+ *  lockstat off
+ *  ...repeat above as desired...
+ *  lockstat get
+ *  ...now start a new set of measurements...
+ *  lockstat reset
+ *  lockstat on
+ *  ...
+ *
+ */
+ssize_t
+put_lockmeter_info(const char *buffer, size_t len)
+{
+	int error = 0;
+	int dirsize, countsize, read_lock_countsize, hashsize;
+	int cpu;
+	char put_char;
+	int i, read_lock_blocks;
+	unsigned long flags;
+	rwlock_t *lock_ptr;
+	struct timeval tv;
+
+	if (len <= 0)
+		return -EINVAL;
+
+	_raw_spin_lock(&lstat_control.control_lock);
+
+	get_user(put_char, buffer);
+	switch (put_char) {
+
+	case LSTAT_OFF:
+		if (lstat_control.state != LSTAT_OFF) {
+			/*
+			 * To avoid seeing read lock hold times in an
+			 * inconsisent state, we have to follow this protocol
+			 * to turn off statistics
+			 */
+			local_irq_save(flags);
+			/*
+			 * getting this lock will stop any read lock block
+			 * allocations
+			 */
+			_raw_spin_lock(&lstat_control.directory_lock);
+			/*
+			 * keep any more read lock blocks from being
+			 * allocated
+			 */
+			lstat_control.state = LSTAT_OFF;
+			/* record how may read lock blocks there are */
+			read_lock_blocks =
+				lstat_control.next_free_read_lock_index;
+			_raw_spin_unlock(&lstat_control.directory_lock);
+			/* now go through the list of read locks */
+			cpu = THIS_CPU_NUMBER;
+			for (i = 1; i < read_lock_blocks; i++) {
+				lock_ptr =
+				    (*lstat_control.read_lock_counts[cpu])[i].
+				    lock_ptr;
+				/* is this saved lock address still valid? */
+				if (GET_RWINDEX(lock_ptr) == i) {
+					/*
+					 * lock address appears to still be
+					 * valid because we only hold one lock
+					 * at a time, this can't cause a
+					 * deadlock unless this is a lock held
+					 * as part of the current system call
+					 * path. At the moment there
+					 * are no READ mode locks held to get
+					 * here from user space, so we solve
+					 * this by skipping locks held in
+					 * write mode.
+					 */
+					if (RWLOCK_IS_WRITE_LOCKED(lock_ptr)) {
+						PUT_RWINDEX(lock_ptr, 0);
+						continue;
+					}
+					/*
+					 * now we know there are no read
+					 * holders of this lock! stop
+					 * statistics collection for this
+					 * lock
+					 */
+					_raw_write_lock(lock_ptr);
+					PUT_RWINDEX(lock_ptr, 0);
+					_raw_write_unlock(lock_ptr);
+				}
+				/*
+				 * it may still be possible for the hold time
+				 * sum to be negative e.g. if a lock is
+				 * reallocated while "busy" we will have to fix
+				 * this up in the data reduction program.
+				 */
+			}
+			local_irq_restore(flags);
+			lstat_control.intervals++;
+			lstat_control.ending_cycles64 = get_cycles64();
+			lstat_control.enabled_cycles64 +=
+				lstat_control.ending_cycles64 -
+				lstat_control.started_cycles64;
+			do_gettimeofday(&tv);
+			lstat_control.ending_time = tv.tv_sec;
+			/*
+			 * don't deallocate the structures -- we may do a
+			 * lockstat on to add to the data that is already
+			 * there. Use LSTAT_RELEASE to release storage
+			 */
+		} else {
+			error = -EBUSY;	/* already OFF */
+		}
+		break;
+
+	case LSTAT_ON:
+		if (lstat_control.state == LSTAT_OFF) {
+#ifdef DEBUG_LOCKMETER
+			printk("put_lockmeter_info(cpu=%d): LSTAT_ON\n",
+				THIS_CPU_NUMBER);
+#endif
+			lstat_control.next_free_dir_index = 1;	/* 0 is for overflows */
+
+			dirsize = LSTAT_MAX_STAT_INDEX *
+					sizeof (lstat_directory_entry_t);
+			hashsize =
+				(1 + LSTAT_HASH_TABLE_SIZE) * sizeof (ushort);
+			countsize = sizeof (lstat_cpu_counts_t);
+			read_lock_countsize =
+				sizeof (lstat_read_lock_cpu_counts_t);
+#ifdef DEBUG_LOCKMETER
+			printk(" dirsize:%d", dirsize);
+			printk(" hashsize:%d", hashsize);
+			printk(" countsize:%d", countsize);
+			printk(" read_lock_countsize:%d\n",
+				read_lock_countsize);
+#endif
+#ifdef DEBUG_LOCKMETER
+			{
+				int secs;
+				unsigned long cycles;
+				uint64_t cycles64;
+
+				do_gettimeofday(&tv);
+				secs = tv.tv_sec;
+				do {
+					do_gettimeofday(&tv);
+				} while (secs == tv.tv_sec);
+				cycles = get_cycles();
+				cycles64 = get_cycles64();
+				secs = tv.tv_sec;
+				do {
+					do_gettimeofday(&tv);
+				} while (secs == tv.tv_sec);
+				cycles = get_cycles() - cycles;
+				cycles64 = get_cycles64() - cycles;
+				printk("lockmeter: cycleFrequency:%d "
+					"cycles:%d cycles64:%d\n",
+					CPU_CYCLE_FREQUENCY, cycles, cycles64);
+			}
+#endif
+
+			/*
+			 * if this is the first call, allocate storage and
+			 * initialize
+			 */
+			if (!lstat_control.hashtab) {
+
+				spin_lock_init(&lstat_control.directory_lock);
+
+				/* guarantee all pointers at zero */
+				init_control_space();
+
+				lstat_control.hashtab =
+				    kmalloc(hashsize, GFP_KERNEL);
+				if (!lstat_control.hashtab) {
+					error = -ENOSPC;
+#ifdef DEBUG_LOCKMETER
+					printk("!!error kmalloc of hashtab\n");
+#endif
+				}
+				lstat_control.dir = vmalloc(dirsize);
+				if (!lstat_control.dir) {
+					error = -ENOSPC;
+#ifdef DEBUG_LOCKMETER
+					printk("!!error kmalloc of dir\n");
+#endif
+				}
+
+				for (cpu = 0; cpu < num_online_cpus(); cpu++) {
+					lstat_control.counts[cpu] =
+						vmalloc(countsize);
+					if (!lstat_control.counts[cpu]) {
+						error = -ENOSPC;
+#ifdef DEBUG_LOCKMETER
+						printk("!!error vmalloc of "
+							"counts[%d]\n", cpu);
+#endif
+					}
+					lstat_control.read_lock_counts[cpu] =
+						(lstat_read_lock_cpu_counts_t *)
+						kmalloc(read_lock_countsize,
+							GFP_KERNEL);
+					if (!lstat_control.
+							read_lock_counts[cpu]) {
+						error = -ENOSPC;
+#ifdef DEBUG_LOCKMETER
+						printk("!!error kmalloc of "
+						  "read_lock_counts[%d]\n",
+							cpu);
+#endif
+					}
+				}
+			}
+
+			if (error) {
+				/*
+				 * One or more kmalloc failures -- free
+				 * everything
+				 */
+				release_control_space();
+			} else {
+
+				if (!reset_lstat_data()) {
+					error = -EINVAL;
+					break;
+				};
+
+				/*
+				 * record starting and ending times and the
+				 * like
+				 */
+				if (lstat_control.intervals == 0) {
+					do_gettimeofday(&tv);
+					lstat_control.first_started_time =
+						tv.tv_sec;
+				}
+				lstat_control.started_cycles64 = get_cycles64();
+				do_gettimeofday(&tv);
+				lstat_control.started_time = tv.tv_sec;
+
+				lstat_control.state = LSTAT_ON;
+			}
+		} else {
+			error = -EBUSY;	/* already ON */
+		}
+		break;
+
+	case LSTAT_RESET:
+		if (lstat_control.state == LSTAT_OFF) {
+			if (!reset_lstat_data())
+				error = -EINVAL;
+		} else {
+			error = -EBUSY;	/* still on; can't reset */
+		}
+		break;
+
+	case LSTAT_RELEASE:
+		if (lstat_control.state == LSTAT_OFF) {
+			release_control_space();
+			lstat_control.intervals = 0;
+			lstat_control.enabled_cycles64 = 0;
+		} else {
+			error = -EBUSY;
+		}
+		break;
+
+	default:
+		error = -EINVAL;
+	}			/* switch */
+
+	_raw_spin_unlock(&lstat_control.control_lock);
+	return error ? error : len;
+}
+
+#ifdef USER_MODE_TESTING
+/* following used for user mode testing */
+void
+lockmeter_init()
+{
+	int dirsize, hashsize, countsize, read_lock_countsize, cpu;
+
+	printf("lstat_control is at %x size=%d\n", &lstat_control,
+		sizeof (lstat_control));
+	printf("sizeof(spinlock_t)=%d\n", sizeof (spinlock_t));
+	lstat_control.state = LSTAT_ON;
+
+	lstat_control.directory_lock = SPIN_LOCK_UNLOCKED;
+	lstat_control.next_free_dir_index = 1;	/* 0 is for overflows */
+	lstat_control.next_free_read_lock_index = 1;
+
+	dirsize = LSTAT_MAX_STAT_INDEX * sizeof (lstat_directory_entry_t);
+	hashsize = (1 + LSTAT_HASH_TABLE_SIZE) * sizeof (ushort);
+	countsize = sizeof (lstat_cpu_counts_t);
+	read_lock_countsize = sizeof (lstat_read_lock_cpu_counts_t);
+
+	lstat_control.hashtab = (ushort *) malloc(hashsize);
+
+	if (lstat_control.hashtab == 0) {
+		printf("malloc failure for at line %d in lockmeter.c\n",
+			__LINE__);
+		exit(0);
+	}
+
+	lstat_control.dir = (lstat_directory_entry_t *) malloc(dirsize);
+
+	if (lstat_control.dir == 0) {
+		printf("malloc failure for at line %d in lockmeter.c\n", cpu,
+			__LINE__);
+		exit(0);
+	}
+
+	for (cpu = 0; cpu < num_online_cpus(); cpu++) {
+		int j, k;
+		j = (int) (lstat_control.counts[cpu] =
+			   (lstat_cpu_counts_t *) malloc(countsize));
+		k = (int) (lstat_control.read_lock_counts[cpu] =
+			   (lstat_read_lock_cpu_counts_t *)
+			   malloc(read_lock_countsize));
+		if (j * k == 0) {
+			printf("malloc failure for cpu=%d at line %d in "
+				"lockmeter.c\n", cpu, __LINE__);
+			exit(0);
+		}
+	}
+
+	memset(lstat_control.hashtab, 0, hashsize);
+	memset(lstat_control.dir, 0, dirsize);
+
+	for (cpu = 0; cpu < num_online_cpus(); cpu++) {
+		memset(lstat_control.counts[cpu], 0, countsize);
+		memset(lstat_control.read_lock_counts[cpu], 0,
+			read_lock_countsize);
+	}
+}
+
+asm(" \
+.align	4 \
+.globl	__write_lock_failed \
+__write_lock_failed: \
+	" LOCK "addl	$" RW_LOCK_BIAS_STR ",(%eax) \
+1:	cmpl	$" RW_LOCK_BIAS_STR ",(%eax) \
+	jne	1b \
+\
+	" LOCK "subl	$" RW_LOCK_BIAS_STR ",(%eax) \
+	jnz	__write_lock_failed \
+	ret \
+\
+\
+.align	4 \
+.globl	__read_lock_failed \
+__read_lock_failed: \
+	lock ; incl	(%eax) \
+1:	cmpl	$1,(%eax) \
+	js	1b \
+\
+	lock ; decl	(%eax) \
+	js	__read_lock_failed \
+	ret \
+");
+#endif
+
+EXPORT_SYMBOL(_metered_spin_lock);
+EXPORT_SYMBOL(_metered_spin_unlock);
+EXPORT_SYMBOL(_metered_spin_trylock);
+EXPORT_SYMBOL(_metered_read_lock);
+EXPORT_SYMBOL(_metered_read_unlock);
+EXPORT_SYMBOL(_metered_write_lock);
+EXPORT_SYMBOL(_metered_write_unlock);
--- diff/kernel/power/smp.c	1970-01-01 01:00:00.000000000 +0100
+++ source/kernel/power/smp.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,85 @@
+/*
+ * drivers/power/smp.c - Functions for stopping other CPUs.
+ *
+ * Copyright 2004 Pavel Machek <pavel@suse.cz>
+ * Copyright (C) 2002-2003 Nigel Cunningham <ncunningham@clear.net.nz>
+ *
+ * This file is released under the GPLv2.
+ */
+
+#undef DEBUG
+
+#include <linux/smp_lock.h>
+#include <linux/interrupt.h>
+#include <linux/suspend.h>
+#include <linux/module.h>
+#include <asm/atomic.h>
+#include <asm/tlbflush.h>
+
+static atomic_t cpu_counter, freeze;
+
+
+static void smp_pause(void * data)
+{
+	struct saved_context ctxt;
+	__save_processor_state(&ctxt);
+	printk("Sleeping in:\n");
+	dump_stack();
+	atomic_inc(&cpu_counter);
+	while (atomic_read(&freeze)) {
+		/* FIXME: restore takes place at random piece inside this.
+		   This should probably be written in assembly, and
+		   preserve general-purpose registers, too
+
+		   What about stack? We may need to move to new stack here.
+
+		   This should better be ran with interrupts disabled.
+		 */
+		cpu_relax();
+		barrier();
+	}
+	atomic_dec(&cpu_counter);
+	__restore_processor_state(&ctxt);
+}
+
+cpumask_t oldmask;
+
+void disable_nonboot_cpus(void)
+{
+	printk("Freezing CPUs (at %d)", smp_processor_id());
+	oldmask = current->cpus_allowed;
+	set_cpus_allowed(current, cpumask_of_cpu(0));
+	current->state = TASK_INTERRUPTIBLE;
+	schedule_timeout(HZ);
+	printk("...");
+	BUG_ON(smp_processor_id() != 0);
+
+	/* FIXME: for this to work, all the CPUs must be running
+	 * "idle" thread (or we deadlock). Is that guaranteed? */
+
+	atomic_set(&cpu_counter, 0);
+	atomic_set(&freeze, 1);
+	smp_call_function(smp_pause, NULL, 0, 0);
+	while (atomic_read(&cpu_counter) < (num_online_cpus() - 1)) {
+		cpu_relax();
+		barrier();
+	}
+	printk("ok\n");
+}
+
+void enable_nonboot_cpus(void)
+{
+	printk("Restarting CPUs");
+	atomic_set(&freeze, 0);
+	while (atomic_read(&cpu_counter)) {
+		cpu_relax();
+		barrier();
+	}
+	printk("...");
+	set_cpus_allowed(current, oldmask);
+	schedule();
+	printk("ok\n");
+
+}
+
+
--- diff/lib/crc16.c	1970-01-01 01:00:00.000000000 +0100
+++ source/lib/crc16.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,69 @@
+/*
+ *	linux/lib/crc16.c
+ *
+ *	This source code is licensed under the GNU General Public License,
+ *	Version 2. See the file COPYING for more details.
+ */
+
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/crc16.h>
+
+/*
+ * This mysterious table is just the CRC of each possible byte. It can be
+ * computed using the standard bit-at-a-time methods. The polynomial can
+ * be seen in entry 128, 0x8408. This corresponds to x^0 + x^5 + x^12.
+ * Add the implicit x^16, and you have the standard CRC-CCITT.
+ */
+u16 const crc16_table[256] = {
+	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
+	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
+	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
+	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
+	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
+	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
+	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
+	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
+	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
+	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
+	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
+	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
+	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
+	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
+	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
+	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
+	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
+	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
+	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
+	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
+	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
+	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
+	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
+	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
+	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
+	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
+	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
+	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
+	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
+	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
+	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
+	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
+};
+EXPORT_SYMBOL(crc16_table);
+
+/**
+ *	crc16 - recompute the CRC for the data buffer
+ *	@crc - previous CRC value
+ *	@buffer - data pointer
+ *	@len - number of bytes in the buffer
+ */
+u16 crc16(u16 crc, u8 const *buffer, size_t len)
+{
+	while (len--)
+		crc = crc16_byte(crc, *buffer++);
+	return crc;
+}
+EXPORT_SYMBOL(crc16);
+
+MODULE_DESCRIPTION("CRC16 calculations");
+MODULE_LICENSE("GPL");
--- diff/net/core/stream.c	1970-01-01 01:00:00.000000000 +0100
+++ source/net/core/stream.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,287 @@
+/*
+ *     SUCS NET3:
+ *
+ *     Generic stream handling routines. These are generic for most
+ *     protocols. Even IP. Tonight 8-).
+ *     This is used because TCP, LLC (others too) layer all have mostly
+ *     identical sendmsg() and recvmsg() code.
+ *     So we (will) share it here.
+ *
+ *     Authors:        Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *                     (from old tcp.c code)
+ *                     Alan Cox <alan@redhat.com> (Borrowed comments 8-))
+ */
+
+#include <linux/module.h>
+#include <linux/net.h>
+#include <linux/signal.h>
+#include <linux/tcp.h>
+#include <linux/wait.h>
+#include <net/sock.h>
+
+/**
+ * sk_stream_write_space - stream socket write_space callback.
+ * sk - socket
+ *
+ * FIXME: write proper description
+ */
+void sk_stream_write_space(struct sock *sk)
+{
+	struct socket *sock = sk->sk_socket;
+
+	if (sk_stream_wspace(sk) >= sk_stream_min_wspace(sk) && sock) {
+		clear_bit(SOCK_NOSPACE, &sock->flags);
+
+		if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
+			wake_up_interruptible(sk->sk_sleep);
+		if (sock->fasync_list && !(sk->sk_shutdown & SEND_SHUTDOWN))
+			sock_wake_async(sock, 2, POLL_OUT);
+	}
+}
+
+EXPORT_SYMBOL(sk_stream_write_space);
+
+/**
+ * sk_stream_wait_connect - Wait for a socket to get into the connected state
+ * @sk - sock to wait on
+ * @timeo_p - for how long to wait
+ *
+ * Must be called with the socket locked.
+ */
+int sk_stream_wait_connect(struct sock *sk, long *timeo_p)
+{
+	struct task_struct *tsk = current;
+	DEFINE_WAIT(wait);
+
+	while (1) {
+		if (sk->sk_err)
+			return sock_error(sk);
+		if ((1 << sk->sk_state) & ~(TCPF_SYN_SENT | TCPF_SYN_RECV))
+			return -EPIPE;
+		if (!*timeo_p)
+			return -EAGAIN;
+		if (signal_pending(tsk))
+			return sock_intr_errno(*timeo_p);
+
+		prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE);
+		sk->sk_write_pending++;
+		if (sk_wait_event(sk, timeo_p,
+				  !((1 << sk->sk_state) & 
+				    ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT))))
+			break;
+		finish_wait(sk->sk_sleep, &wait);
+		sk->sk_write_pending--;
+	}
+	return 0;
+}
+
+EXPORT_SYMBOL(sk_stream_wait_connect);
+
+/**
+ * sk_stream_closing - Return 1 if we still have things to send in our buffers.
+ * @sk - socket to verify
+ */
+static inline int sk_stream_closing(struct sock *sk)
+{
+	return (1 << sk->sk_state) &
+	       (TCPF_FIN_WAIT1 | TCPF_CLOSING | TCPF_LAST_ACK);
+}
+
+void sk_stream_wait_close(struct sock *sk, long timeout)
+{
+	if (timeout) {
+		DEFINE_WAIT(wait);
+
+		do {
+			prepare_to_wait(sk->sk_sleep, &wait,
+					TASK_INTERRUPTIBLE);
+			if (sk_wait_event(sk, &timeout, !sk_stream_closing(sk)))
+				break;
+		} while (!signal_pending(current) && timeout);
+
+		finish_wait(sk->sk_sleep, &wait);
+	}
+}
+
+EXPORT_SYMBOL(sk_stream_wait_close);
+
+/**
+ * sk_stream_wait_memory - Wait for more memory for a socket
+ * @sk - socket to wait for memory
+ * @timeo_p - for how long
+ */
+int sk_stream_wait_memory(struct sock *sk, long *timeo_p)
+{
+	int err = 0;
+	long vm_wait = 0;
+	long current_timeo = *timeo_p;
+	DEFINE_WAIT(wait);
+
+	if (sk_stream_memory_free(sk))
+		current_timeo = vm_wait = (net_random() % (HZ / 5)) + 2;
+
+	while (1) {
+		set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
+
+		prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE);
+
+		if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN))
+			goto do_error;
+		if (!*timeo_p)
+			goto do_nonblock;
+		if (signal_pending(current))
+			goto do_interrupted;
+		clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
+		if (sk_stream_memory_free(sk) && !vm_wait)
+			break;
+
+		set_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
+		sk->sk_write_pending++;
+		sk_wait_event(sk, &current_timeo, sk_stream_memory_free(sk) &&
+						  vm_wait);
+		sk->sk_write_pending--;
+
+		if (vm_wait) {
+			vm_wait -= current_timeo;
+			current_timeo = *timeo_p;
+			if (current_timeo != MAX_SCHEDULE_TIMEOUT &&
+			    (current_timeo -= vm_wait) < 0)
+				current_timeo = 0;
+			vm_wait = 0;
+		}
+		*timeo_p = current_timeo;
+	}
+out:
+	finish_wait(sk->sk_sleep, &wait);
+	return err;
+
+do_error:
+	err = -EPIPE;
+	goto out;
+do_nonblock:
+	err = -EAGAIN;
+	goto out;
+do_interrupted:
+	err = sock_intr_errno(*timeo_p);
+	goto out;
+}
+
+EXPORT_SYMBOL(sk_stream_wait_memory);
+
+void sk_stream_rfree(struct sk_buff *skb)
+{
+	struct sock *sk = skb->sk;
+
+	atomic_sub(skb->truesize, &sk->sk_rmem_alloc);
+	sk->sk_forward_alloc += skb->truesize;
+}
+
+EXPORT_SYMBOL(sk_stream_rfree);
+
+int sk_stream_error(struct sock *sk, int flags, int err)
+{
+	if (err == -EPIPE)
+		err = sock_error(sk) ? : -EPIPE;
+	if (err == -EPIPE && !(flags & MSG_NOSIGNAL))
+		send_sig(SIGPIPE, current, 0);
+	return err;
+}
+
+EXPORT_SYMBOL(sk_stream_error);
+
+void __sk_stream_mem_reclaim(struct sock *sk)
+{
+	if (sk->sk_forward_alloc >= SK_STREAM_MEM_QUANTUM) {
+		atomic_sub(sk->sk_forward_alloc / SK_STREAM_MEM_QUANTUM,
+			   sk->sk_prot->memory_allocated);
+		sk->sk_forward_alloc &= SK_STREAM_MEM_QUANTUM - 1;
+		if (*sk->sk_prot->memory_pressure &&
+		    (atomic_read(sk->sk_prot->memory_allocated) <
+		     sk->sk_prot->sysctl_mem[0]))
+			*sk->sk_prot->memory_pressure = 0;
+	}
+}
+
+EXPORT_SYMBOL(__sk_stream_mem_reclaim);
+
+int sk_stream_mem_schedule(struct sock *sk, int size, int kind)
+{
+	int amt = sk_stream_pages(size);
+
+	sk->sk_forward_alloc += amt * SK_STREAM_MEM_QUANTUM;
+	atomic_add(amt, sk->sk_prot->memory_allocated);
+
+	/* Under limit. */
+	if (atomic_read(sk->sk_prot->memory_allocated) < sk->sk_prot->sysctl_mem[0]) {
+		if (*sk->sk_prot->memory_pressure)
+			*sk->sk_prot->memory_pressure = 0;
+		return 1;
+	}
+
+	/* Over hard limit. */
+	if (atomic_read(sk->sk_prot->memory_allocated) > sk->sk_prot->sysctl_mem[2]) {
+		sk->sk_prot->enter_memory_pressure();
+		goto suppress_allocation;
+	}
+
+	/* Under pressure. */
+	if (atomic_read(sk->sk_prot->memory_allocated) > sk->sk_prot->sysctl_mem[1])
+		sk->sk_prot->enter_memory_pressure();
+
+	if (kind) {
+		if (atomic_read(&sk->sk_rmem_alloc) < sk->sk_prot->sysctl_rmem[0])
+			return 1;
+	} else if (sk->sk_wmem_queued < sk->sk_prot->sysctl_wmem[0])
+		return 1;
+
+	if (!*sk->sk_prot->memory_pressure ||
+	    sk->sk_prot->sysctl_mem[2] > atomic_read(sk->sk_prot->sockets_allocated) *
+				sk_stream_pages(sk->sk_wmem_queued +
+						atomic_read(&sk->sk_rmem_alloc) +
+						sk->sk_forward_alloc))
+		return 1;
+
+suppress_allocation:
+
+	if (!kind) {
+		sk_stream_moderate_sndbuf(sk);
+
+		/* Fail only if socket is _under_ its sndbuf.
+		 * In this case we cannot block, so that we have to fail.
+		 */
+		if (sk->sk_wmem_queued + size >= sk->sk_sndbuf)
+			return 1;
+	}
+
+	/* Alas. Undo changes. */
+	sk->sk_forward_alloc -= amt * SK_STREAM_MEM_QUANTUM;
+	atomic_sub(amt, sk->sk_prot->memory_allocated);
+	return 0;
+}
+
+EXPORT_SYMBOL(sk_stream_mem_schedule);
+
+void sk_stream_kill_queues(struct sock *sk)
+{
+	/* First the read buffer. */
+	__skb_queue_purge(&sk->sk_receive_queue);
+
+	/* Next, the error queue. */
+	__skb_queue_purge(&sk->sk_error_queue);
+
+	/* Next, the write queue. */
+	BUG_TRAP(skb_queue_empty(&sk->sk_write_queue));
+
+	/* Account for returned memory. */
+	sk_stream_mem_reclaim(sk);
+
+	BUG_TRAP(!sk->sk_wmem_queued);
+	BUG_TRAP(!sk->sk_forward_alloc);
+
+	/* It is _impossible_ for the backlog to contain anything
+	 * when we get here.  All user references to this socket
+	 * have gone away, only the net layer knows can touch it.
+	 */
+}
+
+EXPORT_SYMBOL(sk_stream_kill_queues);
--- diff/net/ipv4/netfilter/ipt_addrtype.c	1970-01-01 01:00:00.000000000 +0100
+++ source/net/ipv4/netfilter/ipt_addrtype.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,77 @@
+/*
+ *  iptables module to match inet_addr_type() of an ip.
+ *
+ *  Copyright (c) 2004 Patrick McHardy <kaber@trash.net>
+ *
+ *  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/kernel.h>
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+#include <linux/ip.h>
+#include <net/route.h>
+
+#include <linux/netfilter_ipv4/ipt_addrtype.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
+MODULE_DESCRIPTION("iptables addrtype match");
+
+static inline int match_type(u_int32_t addr, u_int16_t mask)
+{
+	return !!(mask & (1 << inet_addr_type(addr)));
+}
+
+static int match(const struct sk_buff *skb, const struct net_device *in,
+		 const struct net_device *out, const void *matchinfo,
+		 int offset, int *hotdrop)
+{
+	const struct ipt_addrtype_info *info = matchinfo;
+	const struct iphdr *iph = skb->nh.iph;
+	int ret = 1;
+
+	if (info->source)
+		ret &= match_type(iph->saddr, info->source)^info->invert_source;
+	if (info->dest)
+		ret &= match_type(iph->daddr, info->dest)^info->invert_dest;
+	
+	return ret;
+}
+
+static int checkentry(const char *tablename, const struct ipt_ip *ip,
+		      void *matchinfo, unsigned int matchsize,
+		      unsigned int hook_mask)
+{
+	if (matchsize != IPT_ALIGN(sizeof(struct ipt_addrtype_info))) {
+		printk(KERN_ERR "ipt_addrtype: invalid size (%u != %Zu)\n.",
+		       matchsize, IPT_ALIGN(sizeof(struct ipt_addrtype_info)));
+		return 0;
+	}
+
+	return 1;
+}
+
+static struct ipt_match addrtype_match = {
+	.name		= "addrtype",
+	.match		= match,
+	.checkentry	= checkentry,
+	.me		= THIS_MODULE
+};
+
+static int __init init(void)
+{
+	return ipt_register_match(&addrtype_match);
+}
+
+static void __exit fini(void)
+{
+	ipt_unregister_match(&addrtype_match);
+}
+
+module_init(init);
+module_exit(fini);
--- diff/net/ipv4/netfilter/ipt_realm.c	1970-01-01 01:00:00.000000000 +0100
+++ source/net/ipv4/netfilter/ipt_realm.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,76 @@
+/* IP tables module for matching the routing realm
+ *
+ * $Id: ipt_realm.c,v 1.3 2004/03/05 13:25:40 laforge Exp $
+ *
+ * (C) 2003 by Sampsa Ranta <sampsa@netsonic.fi>
+ *
+ * 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/module.h>
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+#include <net/route.h>
+
+#include <linux/netfilter_ipv4/ipt_realm.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+
+MODULE_AUTHOR("Sampsa Ranta <sampsa@netsonic.fi>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("iptables realm match");
+
+static int
+match(const struct sk_buff *skb,
+      const struct net_device *in,
+      const struct net_device *out,
+      const void *matchinfo,
+      int offset,
+      int *hotdrop)
+{
+	const struct ipt_realm_info *info = matchinfo;
+	struct dst_entry *dst = skb->dst;
+    
+	return (info->id == (dst->tclassid & info->mask)) ^ info->invert;
+}
+
+static int check(const char *tablename,
+                 const struct ipt_ip *ip,
+                 void *matchinfo,
+                 unsigned int matchsize,
+                 unsigned int hook_mask)
+{
+	if (hook_mask
+	    & ~((1 << NF_IP_POST_ROUTING) | (1 << NF_IP_FORWARD) |
+	        (1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_LOCAL_IN))) {
+		printk("ipt_realm: only valid for POST_ROUTING, LOCAL_OUT, "
+		       "LOCAL_IN or FORWARD.\n");
+		return 0;
+	}
+	if (matchsize != IPT_ALIGN(sizeof(struct ipt_realm_info))) {
+		printk("ipt_realm: invalid matchsize.\n");
+		return 0;
+	}
+	return 1;
+}
+
+static struct ipt_match realm_match = {
+	.name		= "realm",
+	.match		= match, 
+	.checkentry	= check,
+	.me		= THIS_MODULE
+};
+
+static int __init init(void)
+{
+	return ipt_register_match(&realm_match);
+}
+
+static void __exit fini(void)
+{
+	ipt_unregister_match(&realm_match);
+}
+
+module_init(init);
+module_exit(fini);
--- diff/net/ipv6/xfrm6_tunnel.c	1970-01-01 01:00:00.000000000 +0100
+++ source/net/ipv6/xfrm6_tunnel.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,634 @@
+/*
+ * Copyright (C)2003,2004 USAGI/WIDE Project
+ *
+ * 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
+ *
+ * Authors	Mitsuru KANDA  <mk@linux-ipv6.org>
+ * 		YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+ *
+ * Based on net/ipv4/xfrm4_tunnel.c
+ *
+ */
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/xfrm.h>
+#include <linux/list.h>
+#include <net/ip.h>
+#include <net/xfrm.h>
+#include <net/icmp.h>
+#include <net/ipv6.h>
+#include <linux/ipv6.h>
+#include <linux/icmpv6.h>
+
+#ifdef CONFIG_IPV6_XFRM6_TUNNEL_DEBUG
+# define X6TDEBUG	3
+#else
+# define X6TDEBUG	1
+#endif
+
+#define X6TPRINTK(fmt, args...)		printk(fmt, ## args)
+#define X6TNOPRINTK(fmt, args...)	do { ; } while(0)
+
+#if X6TDEBUG >= 1
+# define X6TPRINTK1	X6TPRINTK
+#else
+# define X6TPRINTK1	X6TNOPRINTK
+#endif
+
+#if X6TDEBUG >= 3
+# define X6TPRINTK3	X6TPRINTK
+#else
+# define X6TPRINTK3	X6TNOPRINTK
+#endif
+
+/*
+ * xfrm_tunnel_spi things are for allocating unique id ("spi") 
+ * per xfrm_address_t.
+ */
+struct xfrm6_tunnel_spi {
+	struct hlist_node list_byaddr;
+	struct hlist_node list_byspi;
+	xfrm_address_t addr;
+	u32 spi;
+	atomic_t refcnt;
+#ifdef XFRM6_TUNNEL_SPI_MAGIC
+	u32 magic;
+#endif
+};
+
+#ifdef CONFIG_IPV6_XFRM6_TUNNEL_DEBUG
+# define XFRM6_TUNNEL_SPI_MAGIC 0xdeadbeef
+#endif
+
+static rwlock_t xfrm6_tunnel_spi_lock = RW_LOCK_UNLOCKED;
+
+static u32 xfrm6_tunnel_spi;
+
+#define XFRM6_TUNNEL_SPI_MIN	1
+#define XFRM6_TUNNEL_SPI_MAX	0xffffffff
+
+static kmem_cache_t *xfrm6_tunnel_spi_kmem;
+
+#define XFRM6_TUNNEL_SPI_BYADDR_HSIZE 256
+#define XFRM6_TUNNEL_SPI_BYSPI_HSIZE 256
+
+static struct hlist_head xfrm6_tunnel_spi_byaddr[XFRM6_TUNNEL_SPI_BYADDR_HSIZE];
+static struct hlist_head xfrm6_tunnel_spi_byspi[XFRM6_TUNNEL_SPI_BYSPI_HSIZE];
+
+#ifdef XFRM6_TUNNEL_SPI_MAGIC
+static int x6spi_check_magic(const struct xfrm6_tunnel_spi *x6spi,
+			     const char *name)
+{
+	if (unlikely(x6spi->magic != XFRM6_TUNNEL_SPI_MAGIC)) {
+		X6TPRINTK3(KERN_DEBUG "%s(): x6spi object "
+				      "at %p has corrupted magic %08x "
+				      "(should be %08x)\n",
+			   name, x6spi, x6spi->magic, XFRM6_TUNNEL_SPI_MAGIC);
+		return -1;
+	}
+	return 0;
+}
+#else
+static int inline x6spi_check_magic(const struct xfrm6_tunnel_spi *x6spi,
+				    const char *name)
+{
+	return 0;
+}
+#endif
+
+#define X6SPI_CHECK_MAGIC(x6spi) x6spi_check_magic((x6spi), __FUNCTION__)
+
+
+static unsigned inline xfrm6_tunnel_spi_hash_byaddr(xfrm_address_t *addr)
+{
+	unsigned h;
+
+	X6TPRINTK3(KERN_DEBUG "%s(addr=%p)\n", __FUNCTION__, addr);
+
+	h = addr->a6[0] ^ addr->a6[1] ^ addr->a6[2] ^ addr->a6[3];
+	h ^= h >> 16;
+	h ^= h >> 8;
+	h &= XFRM6_TUNNEL_SPI_BYADDR_HSIZE - 1;
+
+	X6TPRINTK3(KERN_DEBUG "%s() = %u\n", __FUNCTION__, h);
+
+	return h;
+}
+
+static unsigned inline xfrm6_tunnel_spi_hash_byspi(u32 spi)
+{
+	return spi % XFRM6_TUNNEL_SPI_BYSPI_HSIZE;
+}
+
+
+static int xfrm6_tunnel_spi_init(void)
+{
+	int i;
+
+	X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__);
+
+	xfrm6_tunnel_spi = 0;
+	xfrm6_tunnel_spi_kmem = kmem_cache_create("xfrm6_tunnel_spi",
+						  sizeof(struct xfrm6_tunnel_spi),
+						  0, SLAB_HWCACHE_ALIGN,
+						  NULL, NULL);
+	if (!xfrm6_tunnel_spi_kmem) {
+		X6TPRINTK1(KERN_ERR
+			   "%s(): failed to allocate xfrm6_tunnel_spi_kmem\n",
+		           __FUNCTION__);
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < XFRM6_TUNNEL_SPI_BYADDR_HSIZE; i++)
+		INIT_HLIST_HEAD(&xfrm6_tunnel_spi_byaddr[i]);
+	for (i = 0; i < XFRM6_TUNNEL_SPI_BYSPI_HSIZE; i++)
+		INIT_HLIST_HEAD(&xfrm6_tunnel_spi_byspi[i]);
+	return 0;
+}
+
+static void xfrm6_tunnel_spi_fini(void)
+{
+	int i;
+
+	X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__);
+
+	for (i = 0; i < XFRM6_TUNNEL_SPI_BYADDR_HSIZE; i++) {
+		if (!hlist_empty(&xfrm6_tunnel_spi_byaddr[i]))
+			goto err;
+	}
+	for (i = 0; i < XFRM6_TUNNEL_SPI_BYSPI_HSIZE; i++) {
+		if (!hlist_empty(&xfrm6_tunnel_spi_byspi[i]))
+			goto err;
+	}
+	kmem_cache_destroy(xfrm6_tunnel_spi_kmem);
+	xfrm6_tunnel_spi_kmem = NULL;
+	return;
+err:
+	X6TPRINTK1(KERN_ERR "%s(): table is not empty\n", __FUNCTION__);
+	return;
+}
+
+static struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr)
+{
+	struct xfrm6_tunnel_spi *x6spi;
+	struct hlist_node *pos;
+
+	X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr);
+
+	hlist_for_each_entry(x6spi, pos,
+			     &xfrm6_tunnel_spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)],
+			     list_byaddr) {
+		if (memcmp(&x6spi->addr, saddr, sizeof(x6spi->addr)) == 0) {
+			X6SPI_CHECK_MAGIC(x6spi);
+			X6TPRINTK3(KERN_DEBUG "%s() = %p(%u)\n", __FUNCTION__, x6spi, x6spi->spi);
+			return x6spi;
+		}
+	}
+
+	X6TPRINTK3(KERN_DEBUG "%s() = NULL(0)\n", __FUNCTION__);
+	return NULL;
+}
+
+u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr)
+{
+	struct xfrm6_tunnel_spi *x6spi;
+	u32 spi;
+
+	X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr);
+
+	read_lock_bh(&xfrm6_tunnel_spi_lock);
+	x6spi = __xfrm6_tunnel_spi_lookup(saddr);
+	spi = x6spi ? x6spi->spi : 0;
+	read_unlock_bh(&xfrm6_tunnel_spi_lock);
+	return spi;
+}
+
+EXPORT_SYMBOL(xfrm6_tunnel_spi_lookup);
+
+static u32 __xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr)
+{
+	u32 spi;
+	struct xfrm6_tunnel_spi *x6spi;
+	struct hlist_node *pos;
+	unsigned index;
+
+	X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr);
+
+	if (xfrm6_tunnel_spi < XFRM6_TUNNEL_SPI_MIN ||
+	    xfrm6_tunnel_spi >= XFRM6_TUNNEL_SPI_MAX)
+		xfrm6_tunnel_spi = XFRM6_TUNNEL_SPI_MIN;
+	else
+		xfrm6_tunnel_spi++;
+
+	for (spi = xfrm6_tunnel_spi; spi <= XFRM6_TUNNEL_SPI_MAX; spi++) {
+		index = xfrm6_tunnel_spi_hash_byspi(spi);
+		hlist_for_each_entry(x6spi, pos, 
+				     &xfrm6_tunnel_spi_byspi[index], 
+				     list_byspi) {
+			if (x6spi->spi == spi)
+				goto try_next_1;
+		}
+		xfrm6_tunnel_spi = spi;
+		goto alloc_spi;
+try_next_1:;
+	}
+	for (spi = XFRM6_TUNNEL_SPI_MIN; spi < xfrm6_tunnel_spi; spi++) {
+		index = xfrm6_tunnel_spi_hash_byspi(spi);
+		hlist_for_each_entry(x6spi, pos, 
+				     &xfrm6_tunnel_spi_byspi[index], 
+				     list_byspi) {
+			if (x6spi->spi == spi)
+				goto try_next_2;
+		}
+		xfrm6_tunnel_spi = spi;
+		goto alloc_spi;
+try_next_2:;
+	}
+	spi = 0;
+	goto out;
+alloc_spi:
+	X6TPRINTK3(KERN_DEBUG "%s(): allocate new spi for "
+			      "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 
+			      __FUNCTION__, 
+			      NIP6(*(struct in6_addr *)saddr));
+	x6spi = kmem_cache_alloc(xfrm6_tunnel_spi_kmem, SLAB_ATOMIC);
+	if (!x6spi) {
+		X6TPRINTK1(KERN_ERR "%s(): kmem_cache_alloc() failed\n", 
+			   __FUNCTION__);
+		goto out;
+	}
+#ifdef XFRM6_TUNNEL_SPI_MAGIC
+	x6spi->magic = XFRM6_TUNNEL_SPI_MAGIC;
+#endif
+	memcpy(&x6spi->addr, saddr, sizeof(x6spi->addr));
+	x6spi->spi = spi;
+	atomic_set(&x6spi->refcnt, 1);
+
+	hlist_add_head(&x6spi->list_byspi, &xfrm6_tunnel_spi_byspi[index]);
+
+	index = xfrm6_tunnel_spi_hash_byaddr(saddr);
+	hlist_add_head(&x6spi->list_byaddr, &xfrm6_tunnel_spi_byaddr[index]);
+	X6SPI_CHECK_MAGIC(x6spi);
+out:
+	X6TPRINTK3(KERN_DEBUG "%s() = %u\n", __FUNCTION__, spi);
+	return spi;
+}
+
+u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr)
+{
+	struct xfrm6_tunnel_spi *x6spi;
+	u32 spi;
+
+	X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr);
+
+	write_lock_bh(&xfrm6_tunnel_spi_lock);
+	x6spi = __xfrm6_tunnel_spi_lookup(saddr);
+	if (x6spi) {
+		atomic_inc(&x6spi->refcnt);
+		spi = x6spi->spi;
+	} else
+		spi = __xfrm6_tunnel_alloc_spi(saddr);
+	write_unlock_bh(&xfrm6_tunnel_spi_lock);
+
+	X6TPRINTK3(KERN_DEBUG "%s() = %u\n", __FUNCTION__, spi);
+
+	return spi;
+}
+
+EXPORT_SYMBOL(xfrm6_tunnel_alloc_spi);
+
+void xfrm6_tunnel_free_spi(xfrm_address_t *saddr)
+{
+	struct xfrm6_tunnel_spi *x6spi;
+	struct hlist_node *pos, *n;
+
+	X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr);
+
+	write_lock_bh(&xfrm6_tunnel_spi_lock);
+
+	hlist_for_each_entry_safe(x6spi, pos, n, 
+				  &xfrm6_tunnel_spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)],
+				  list_byaddr)
+	{
+		if (memcmp(&x6spi->addr, saddr, sizeof(x6spi->addr)) == 0) {
+			X6TPRINTK3(KERN_DEBUG "%s(): x6spi object "
+					      "for %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x "
+					      "found at %p\n",
+				   __FUNCTION__, 
+				   NIP6(*(struct in6_addr *)saddr),
+				   x6spi);
+			X6SPI_CHECK_MAGIC(x6spi);
+			if (atomic_dec_and_test(&x6spi->refcnt)) {
+				hlist_del(&x6spi->list_byaddr);
+				hlist_del(&x6spi->list_byspi);
+				kmem_cache_free(xfrm6_tunnel_spi_kmem, x6spi);
+				break;
+			}
+		}
+	}
+	write_unlock_bh(&xfrm6_tunnel_spi_lock);
+}
+
+EXPORT_SYMBOL(xfrm6_tunnel_free_spi);
+
+int xfrm6_tunnel_check_size(struct sk_buff *skb)
+{
+	int mtu, ret = 0;
+	struct dst_entry *dst = skb->dst;
+
+	mtu = dst_pmtu(dst) - sizeof(struct ipv6hdr);
+	if (mtu < IPV6_MIN_MTU)
+		mtu = IPV6_MIN_MTU;
+
+	if (skb->len > mtu) {
+		icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
+		ret = -EMSGSIZE;
+	}
+
+	return ret;
+}
+
+EXPORT_SYMBOL(xfrm6_tunnel_check_size);
+
+static int xfrm6_tunnel_output(struct sk_buff **pskb)
+{
+	struct sk_buff *skb = *pskb;
+	struct dst_entry *dst = skb->dst;
+	struct xfrm_state *x = dst->xfrm;
+	struct ipv6hdr *iph, *top_iph;
+	int err;
+
+	if ((err = xfrm6_tunnel_check_size(skb)) != 0)
+		goto error_nolock;
+
+	iph = skb->nh.ipv6h;
+
+	top_iph = (struct ipv6hdr *)skb_push(skb, x->props.header_len);
+	top_iph->version = 6;
+	top_iph->priority = iph->priority;
+	top_iph->flow_lbl[0] = iph->flow_lbl[0];
+	top_iph->flow_lbl[1] = iph->flow_lbl[1];
+	top_iph->flow_lbl[2] = iph->flow_lbl[2];
+	top_iph->nexthdr = IPPROTO_IPV6; 
+	top_iph->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
+	top_iph->hop_limit = iph->hop_limit;
+	memcpy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr, sizeof(struct in6_addr));
+	memcpy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr, sizeof(struct in6_addr));
+	skb->nh.raw = skb->data;
+	skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr);
+
+	x->curlft.bytes += skb->len;
+	x->curlft.packets++;
+
+	spin_unlock_bh(&x->lock);
+
+	if ((skb->dst = dst_pop(dst)) == NULL) { 
+		kfree_skb(skb);
+		err = -EHOSTUNREACH;
+		goto error_nolock;
+	}
+
+	return NET_XMIT_BYPASS;
+
+error_nolock:
+	kfree_skb(skb);
+	return err;
+}
+
+static int xfrm6_tunnel_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb)
+{
+	if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) 
+		return -EINVAL;
+
+	skb->mac.raw = skb->nh.raw;
+	skb->nh.raw = skb->data;
+	dst_release(skb->dst);
+	skb->dst = NULL;
+	skb->protocol = htons(ETH_P_IPV6);
+	skb->pkt_type = PACKET_HOST;
+	netif_rx(skb);
+
+	return 0;
+}
+
+static struct xfrm6_tunnel *xfrm6_tunnel_handler;
+static DECLARE_MUTEX(xfrm6_tunnel_sem);
+
+int xfrm6_tunnel_register(struct xfrm6_tunnel *handler)
+{
+	int ret;
+
+	down(&xfrm6_tunnel_sem);
+	ret = 0;
+	if (xfrm6_tunnel_handler != NULL)
+		ret = -EINVAL;
+	if (!ret)
+		xfrm6_tunnel_handler = handler;
+	up(&xfrm6_tunnel_sem);
+
+	return ret;
+}
+
+EXPORT_SYMBOL(xfrm6_tunnel_register);
+
+int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler)
+{
+	int ret;
+
+	down(&xfrm6_tunnel_sem);
+	ret = 0;
+	if (xfrm6_tunnel_handler != handler)
+		ret = -EINVAL;
+	if (!ret)
+		xfrm6_tunnel_handler = NULL;
+	up(&xfrm6_tunnel_sem);
+
+	synchronize_net();
+
+	return ret;
+}
+
+EXPORT_SYMBOL(xfrm6_tunnel_deregister);
+
+static int xfrm6_tunnel_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
+{
+	struct sk_buff *skb = *pskb;
+	struct xfrm6_tunnel *handler = xfrm6_tunnel_handler;
+	struct xfrm_state *x = NULL;
+	struct ipv6hdr *iph = skb->nh.ipv6h;
+	int err = 0;
+	u32 spi;
+
+	/* device-like_ip6ip6_handler() */
+	if (handler) {
+		err = handler->handler(pskb, nhoffp);
+		if (!err)
+			goto out;
+	}
+
+	spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&iph->saddr);
+	x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, 
+			spi,
+			IPPROTO_IPV6, AF_INET6);
+
+	if (!x)
+		goto drop;
+
+	spin_lock(&x->lock);
+
+	if (unlikely(x->km.state != XFRM_STATE_VALID))
+		goto drop_unlock;
+
+	err = xfrm6_tunnel_input(x, NULL, skb);
+	if (err)
+		goto drop_unlock;
+
+	x->curlft.bytes += skb->len;
+	x->curlft.packets++; 
+	spin_unlock(&x->lock); 
+	xfrm_state_put(x); 
+
+out:
+	return 0;
+
+drop_unlock:
+	spin_unlock(&x->lock);
+	xfrm_state_put(x);
+drop:
+	kfree_skb(skb);
+	return -1;
+}
+
+static void xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
+			     int type, int code, int offset, __u32 info)
+{
+	struct xfrm6_tunnel *handler = xfrm6_tunnel_handler;
+
+	/* call here first for device-like ip6ip6 err handling */
+	if (handler) {
+		handler->err_handler(skb, opt, type, code, offset, info);
+		return;
+	}
+
+	/* xfrm6_tunnel native err handling */
+	switch (type) {
+	case ICMPV6_DEST_UNREACH: 
+		switch (code) {
+		case ICMPV6_NOROUTE: 
+		case ICMPV6_ADM_PROHIBITED:
+		case ICMPV6_NOT_NEIGHBOUR:
+		case ICMPV6_ADDR_UNREACH:
+		case ICMPV6_PORT_UNREACH:
+		default:
+			X6TPRINTK3(KERN_DEBUG
+				   "xfrm6_tunnel: Destination Unreach.\n");
+			break;
+		}
+		break;
+	case ICMPV6_PKT_TOOBIG:
+			X6TPRINTK3(KERN_DEBUG 
+				   "xfrm6_tunnel: Packet Too Big.\n");
+		break;
+	case ICMPV6_TIME_EXCEED:
+		switch (code) {
+		case ICMPV6_EXC_HOPLIMIT:
+			X6TPRINTK3(KERN_DEBUG
+				   "xfrm6_tunnel: Too small Hoplimit.\n");
+			break;
+		case ICMPV6_EXC_FRAGTIME:
+		default: 
+			break;
+		}
+		break;
+	case ICMPV6_PARAMPROB:
+		switch (code) {
+		case ICMPV6_HDR_FIELD: break;
+		case ICMPV6_UNK_NEXTHDR: break;
+		case ICMPV6_UNK_OPTION: break;
+		}
+		break;
+	default:
+		break;
+	}
+	return;
+}
+
+static int xfrm6_tunnel_init_state(struct xfrm_state *x, void *args)
+{
+	if (!x->props.mode)
+		return -EINVAL;
+
+	x->props.header_len = sizeof(struct ipv6hdr);
+
+	return 0;
+}
+
+static void xfrm6_tunnel_destroy(struct xfrm_state *x)
+{
+	xfrm6_tunnel_free_spi((xfrm_address_t *)&x->props.saddr);
+}
+
+static struct xfrm_type xfrm6_tunnel_type = {
+	.description	= "IP6IP6",
+	.owner          = THIS_MODULE,
+	.proto		= IPPROTO_IPV6,
+	.init_state	= xfrm6_tunnel_init_state,
+	.destructor	= xfrm6_tunnel_destroy,
+	.input		= xfrm6_tunnel_input,
+	.output		= xfrm6_tunnel_output,
+};
+
+static struct inet6_protocol xfrm6_tunnel_protocol = {
+	.handler	= xfrm6_tunnel_rcv,
+	.err_handler	= xfrm6_tunnel_err, 
+	.flags          = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
+};
+
+void __init xfrm6_tunnel_init(void)
+{
+	X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__);
+
+	if (xfrm_register_type(&xfrm6_tunnel_type, AF_INET6) < 0) {
+		X6TPRINTK1(KERN_ERR
+			   "xfrm6_tunnel init: can't add xfrm type\n");
+		return;
+	}
+	if (inet6_add_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6) < 0) {
+		X6TPRINTK1(KERN_ERR
+			   "xfrm6_tunnel init(): can't add protocol\n");
+		xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6);
+		return;
+	}
+	if (xfrm6_tunnel_spi_init() < 0) {
+		X6TPRINTK1(KERN_ERR
+			   "xfrm6_tunnel init: failed to initialize spi\n");
+		inet6_del_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6);
+		xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6);
+		return;
+	}
+}
+
+void __exit xfrm6_tunnel_fini(void)
+{
+	X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__);
+
+	xfrm6_tunnel_spi_fini();
+	if (inet6_del_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6) < 0)
+		X6TPRINTK1(KERN_ERR 
+			   "xfrm6_tunnel close: can't remove protocol\n");
+	if (xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6) < 0)
+		X6TPRINTK1(KERN_ERR
+			   "xfrm6_tunnel close: can't remove xfrm type\n");
+}
--- diff/net/sched/act_api.c	1970-01-01 01:00:00.000000000 +0100
+++ source/net/sched/act_api.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,1017 @@
+/*
+ * net/sched/act_api.c	Packet action API.
+ *
+ *		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.
+ *
+ * Author:	Jamal Hadi Salim
+ *
+ *
+ */
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/bitops.h>
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/in.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <linux/rtnetlink.h>
+#include <linux/init.h>
+#include <linux/kmod.h>
+#include <net/sock.h>
+#include <net/pkt_sched.h>
+
+#if 1 /* control */
+#define DPRINTK(format,args...) printk(KERN_DEBUG format,##args)
+#else
+#define DPRINTK(format,args...)
+#endif
+
+static struct tc_action_ops *act_base = NULL;
+static rwlock_t act_mod_lock = RW_LOCK_UNLOCKED;
+
+int tcf_register_action(struct tc_action_ops *act)
+{
+	struct tc_action_ops *a, **ap;
+
+	write_lock(&act_mod_lock);
+	for (ap = &act_base; (a=*ap)!=NULL; ap = &a->next) {
+		if (act->type == a->type || (strcmp(act->kind, a->kind) == 0)) {
+			write_unlock(&act_mod_lock);
+			return -EEXIST;
+		}
+	}
+
+        act->next = NULL;
+	*ap = act;
+
+	write_unlock(&act_mod_lock);
+
+	return 0;
+}
+
+int tcf_unregister_action(struct tc_action_ops *act)
+{
+	struct tc_action_ops *a, **ap;
+	int err = -ENOENT;
+
+	write_lock(&act_mod_lock);
+	for (ap = &act_base; (a=*ap)!=NULL; ap = &a->next) 
+		if(a == act)
+			break;
+
+	if (a) {
+		*ap = a->next;
+		a->next = NULL;
+		err = 0;
+	}
+	write_unlock(&act_mod_lock);
+	return err;
+}
+
+/* lookup by name */
+struct tc_action_ops *tc_lookup_action_n(char *kind)
+{
+
+	struct tc_action_ops *a = NULL;
+
+	if (kind) {
+		read_lock(&act_mod_lock);
+		for (a = act_base; a; a = a->next) {
+			if (strcmp(kind,a->kind) == 0) {
+				if (!try_module_get(a->owner)) {
+					read_unlock(&act_mod_lock);
+					return NULL;
+				} 
+				break;
+			}
+		}
+		read_unlock(&act_mod_lock);
+	}
+
+	return a;
+}
+
+/* lookup by rtattr */
+struct tc_action_ops *tc_lookup_action(struct rtattr *kind)
+{
+
+	struct tc_action_ops *a = NULL;
+
+	if (kind) {
+		read_lock(&act_mod_lock);
+		for (a = act_base; a; a = a->next) {
+
+			if (strcmp((char*)RTA_DATA(kind),a->kind) == 0){
+				if (!try_module_get(a->owner)) {
+					read_unlock(&act_mod_lock);
+					return NULL;
+				} 
+				break;
+			}
+		}
+		read_unlock(&act_mod_lock);
+	}
+
+	return a;
+}
+
+/* lookup by id */
+struct tc_action_ops *tc_lookup_action_id(u32 type)
+{
+	struct tc_action_ops *a = NULL;
+
+	if (type) {
+		read_lock(&act_mod_lock);
+		for (a = act_base; a; a = a->next) {
+			if (a->type == type) {
+				if (!try_module_get(a->owner)) {
+					read_unlock(&act_mod_lock);
+					return NULL;
+				} 
+				break;
+			}
+		}
+		read_unlock(&act_mod_lock);
+	}
+
+	return a;
+}
+
+int tcf_action_exec(struct sk_buff *skb,struct tc_action *act)
+{
+
+	struct tc_action *a;
+	int ret = -1; 
+
+	if (skb->tc_verd & TC_NCLS) {
+		skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
+		DPRINTK("(%p)tcf_action_exec: cleared TC_NCLS in %s out %s\n",skb,skb->input_dev?skb->input_dev->name:"xxx",skb->dev->name);
+		return TC_ACT_OK;
+	}
+	while ((a = act) != NULL) {
+repeat:
+		if (a->ops && a->ops->act) {
+			ret = a->ops->act(&skb,a);
+				if (TC_MUNGED & skb->tc_verd) {
+					/* copied already, allow trampling */
+					skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd);
+					skb->tc_verd = CLR_TC_MUNGED(skb->tc_verd);
+				}
+
+			if (ret != TC_ACT_PIPE)
+				goto exec_done;
+			if (ret == TC_ACT_REPEAT)
+				goto repeat;	/* we need a ttl - JHS */
+
+		}
+		act = a->next;
+	}
+
+exec_done:
+
+	return ret;
+}
+
+void tcf_action_destroy(struct tc_action *act, int bind)
+{
+	struct tc_action *a;
+
+	for (a = act; act; a = act) {
+		if (a && a->ops && a->ops->cleanup) {
+			DPRINTK("tcf_action_destroy destroying %p next %p\n", a,a->next?a->next:NULL);
+			act = act->next;
+			if (ACT_P_DELETED == a->ops->cleanup(a, bind)) {
+				module_put(a->ops->owner);
+			}
+			
+			a->ops = NULL;  
+			kfree(a);
+		} else { /*FIXME: Remove later - catch insertion bugs*/
+			printk("tcf_action_destroy: BUG? destroying NULL ops \n");
+			if (a) {
+				act = act->next;
+				kfree(a);
+			} else {
+				printk("tcf_action_destroy: BUG? destroying NULL action! \n");
+				break;
+			}
+		}
+	}
+}
+
+int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
+{
+	int err = -EINVAL;
+
+
+	if ( (NULL == a) || (NULL == a->ops)
+	   || (NULL == a->ops->dump) )
+		return err;
+	return a->ops->dump(skb, a, bind, ref);
+
+}
+
+
+int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
+{
+	int err = -EINVAL;
+	unsigned char    *b = skb->tail;
+	struct rtattr *r;
+
+
+	if ( (NULL == a) || (NULL == a->ops)
+	   || (NULL == a->ops->dump) || (NULL == a->ops->kind))
+		return err;
+
+
+	RTA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind);
+	if (tcf_action_copy_stats(skb,a))
+		goto rtattr_failure;
+	r = (struct rtattr*) skb->tail;
+	RTA_PUT(skb, TCA_OPTIONS, 0, NULL);
+	if ((err = tcf_action_dump_old(skb, a, bind, ref)) > 0) {
+		r->rta_len = skb->tail - (u8*)r;
+		return err;
+	}
+
+
+rtattr_failure:
+	skb_trim(skb, b - skb->data);
+	return -1;
+
+}
+
+int tcf_action_dump(struct sk_buff *skb, struct tc_action *act, int bind, int ref)
+{
+	struct tc_action *a;
+	int err = -EINVAL;
+	unsigned char    *b = skb->tail;
+	struct rtattr *r ;
+
+	while ((a = act) != NULL) {
+		r = (struct rtattr*) skb->tail;
+		act = a->next;
+		RTA_PUT(skb, a->order, 0, NULL);
+		err = tcf_action_dump_1(skb, a, bind, ref);
+		if (0 > err) 
+			goto rtattr_failure;
+
+		r->rta_len = skb->tail - (u8*)r;
+	}
+
+	return 0;
+
+rtattr_failure:
+	skb_trim(skb, b - skb->data);
+	return -err;
+	
+}
+
+int tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *a, char *name, int ovr, int bind )
+{
+	struct tc_action_ops *a_o;
+	char act_name[4 + IFNAMSIZ + 1];
+	struct rtattr *tb[TCA_ACT_MAX+1];
+	struct rtattr *kind = NULL;
+
+	int err = -EINVAL;
+
+	if (NULL == name) {
+		if (rtattr_parse(tb, TCA_ACT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta))<0)
+			goto err_out;
+		kind = tb[TCA_ACT_KIND-1];
+		if (NULL != kind) {
+			sprintf(act_name, "%s", (char*)RTA_DATA(kind));
+			if (RTA_PAYLOAD(kind) >= IFNAMSIZ) {
+				printk(" Action %s bad\n", (char*)RTA_DATA(kind));
+				goto err_out;
+			}
+
+		} else {
+			printk("Action bad kind\n");
+			goto err_out;
+		}
+		a_o = tc_lookup_action(kind);
+	} else {
+		sprintf(act_name, "%s", name);
+		DPRINTK("tcf_action_init_1: finding  %s\n",act_name);
+		a_o = tc_lookup_action_n(name);
+	}
+#ifdef CONFIG_KMOD
+	if (NULL == a_o) {
+		DPRINTK("tcf_action_init_1: trying to load module %s\n",act_name);
+		request_module (act_name);
+		a_o = tc_lookup_action_n(act_name);
+	}
+
+#endif
+	if (NULL == a_o) {
+		printk("failed to find %s\n",act_name);
+		goto err_out;
+	}
+
+	if (NULL == a) {
+		goto err_mod;
+	}
+
+	/* backward compatibility for policer */
+	if (NULL == name) {
+		err = a_o->init(tb[TCA_ACT_OPTIONS-1], est, a, ovr, bind);
+		if (0 > err ) {
+			err = -EINVAL;
+			goto err_mod;
+		}
+	} else {
+		err = a_o->init(rta, est, a, ovr, bind);
+		if (0 > err ) {
+			err = -EINVAL;
+			goto err_mod;
+		}
+	}
+
+	/* module count goes up only when brand new policy is created
+	   if it exists and is only bound to in a_o->init() then
+           ACT_P_CREATED is not returned (a zero is).
+        */
+	if (ACT_P_CREATED != err) {
+		module_put(a_o->owner);
+	} 
+	a->ops = a_o;
+	DPRINTK("tcf_action_init_1: successfull %s \n",act_name);
+
+	return 0;
+err_mod:
+	module_put(a_o->owner);
+err_out:
+	return err;
+}
+
+int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a, char *name, int ovr , int bind)
+{
+	struct rtattr *tb[TCA_ACT_MAX_PRIO+1];
+	int i;
+	struct tc_action *act = a, *a_s = a;
+
+	int err = -EINVAL;
+
+	if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(rta), RTA_PAYLOAD(rta))<0)
+		return err;
+
+	for (i=0; i < TCA_ACT_MAX_PRIO ; i++) {
+		if (tb[i]) {
+			if (NULL == act) {
+				act = kmalloc(sizeof(*act),GFP_KERNEL);
+				if (NULL == act) {
+					err = -ENOMEM;
+					goto bad_ret;
+				}
+				memset(act, 0,sizeof(*act));
+			}
+			act->next = NULL;
+			if (0 > tcf_action_init_1(tb[i],est,act,name,ovr,bind)) {
+				printk("Error processing action order %d\n",i);
+				return err;
+			}
+
+			act->order = i+1;
+			if (a_s != act) {
+				a_s->next = act;
+				a_s = act;
+			}
+			act = NULL;
+		}
+
+	}
+
+	return 0;
+bad_ret:
+	tcf_action_destroy(a, bind);
+	return err;
+}
+
+int tcf_action_copy_stats (struct sk_buff *skb,struct tc_action *a)
+{
+#ifdef CONFIG_KMOD
+	/* place holder */
+#endif
+
+	if (NULL == a->ops || NULL == a->ops->get_stats)
+		return 1;
+
+	return a->ops->get_stats(skb,a);
+}
+
+
+static int
+tca_get_fill(struct sk_buff *skb,  struct tc_action *a,
+	      u32 pid, u32 seq, unsigned flags, int event, int bind, int ref)
+{
+	struct tcamsg *t;
+	struct nlmsghdr  *nlh;
+	unsigned char	 *b = skb->tail;
+	struct rtattr *x;
+
+	nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*t));
+	nlh->nlmsg_flags = flags;
+	t = NLMSG_DATA(nlh);
+	t->tca_family = AF_UNSPEC;
+	
+	x = (struct rtattr*) skb->tail;
+	RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
+
+	if (0 > tcf_action_dump(skb, a, bind, ref)) {
+		goto rtattr_failure;
+	}
+
+	x->rta_len = skb->tail - (u8*)x;
+	
+	nlh->nlmsg_len = skb->tail - b;
+	return skb->len;
+
+rtattr_failure:
+nlmsg_failure:
+	skb_trim(skb, b - skb->data);
+	return -1;
+}
+
+static int act_get_notify(u32 pid, struct nlmsghdr *n,
+			   struct tc_action *a, int event)
+{
+	struct sk_buff *skb;
+
+	int err = 0;
+
+	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
+	if (!skb)
+		return -ENOBUFS;
+
+	if (tca_get_fill(skb, a,  pid, n->nlmsg_seq, 0, event, 0, 0) <= 0) {
+		kfree_skb(skb);
+		return -EINVAL;
+	}
+
+	err =  netlink_unicast(rtnl,skb, pid, MSG_DONTWAIT);
+	if (err > 0)
+		err = 0;
+	return err;
+}
+
+int tcf_action_get_1(struct rtattr *rta, struct tc_action *a, struct nlmsghdr *n, u32 pid)
+{
+	struct tc_action_ops *a_o;
+	char act_name[4 + IFNAMSIZ + 1];
+	struct rtattr *tb[TCA_ACT_MAX+1];
+	struct rtattr *kind = NULL;
+	int index;
+
+	int err = -EINVAL;
+
+	if (rtattr_parse(tb, TCA_ACT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta))<0)
+		goto err_out;
+
+
+	kind = tb[TCA_ACT_KIND-1];
+	if (NULL != kind) {
+		sprintf(act_name, "%s", (char*)RTA_DATA(kind));
+		if (RTA_PAYLOAD(kind) >= IFNAMSIZ) {
+			printk("tcf_action_get_1: action %s bad\n", (char*)RTA_DATA(kind));
+			goto err_out;
+		}
+
+	} else {
+		printk("tcf_action_get_1: action bad kind\n");
+		goto err_out;
+	}
+
+	if (tb[TCA_ACT_INDEX - 1]) {
+		index = *(int *)RTA_DATA(tb[TCA_ACT_INDEX - 1]);
+	} else {
+		printk("tcf_action_get_1: index not received\n");
+		goto err_out;
+	}
+
+	a_o = tc_lookup_action(kind);
+#ifdef CONFIG_KMOD
+	if (NULL == a_o) {
+		request_module (act_name);
+		a_o = tc_lookup_action_n(act_name);
+	}
+
+#endif
+	if (NULL == a_o) {
+		printk("failed to find %s\n",act_name);
+		goto err_out;
+	}
+
+	if (NULL == a) {
+		goto err_mod;
+	}
+
+	a->ops = a_o;
+
+	if (NULL == a_o->lookup || 0 == a_o->lookup(a, index)) {
+		a->ops = NULL;
+		err = -EINVAL;
+		goto err_mod;
+	}
+
+	module_put(a_o->owner);
+	return 0;
+err_mod:
+	module_put(a_o->owner);
+err_out:
+	return err;
+}
+
+void cleanup_a (struct tc_action *act) 
+{
+	struct tc_action *a;
+
+	for (a = act; act; a = act) {
+		if (a) {
+			act = act->next;
+			a->ops = NULL;
+			a->priv = NULL;
+			kfree(a);
+		} else {
+			printk("cleanup_a: BUG? empty action\n");
+		}
+	}
+}
+
+struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a)
+{
+	char act_name[4 + IFNAMSIZ + 1];
+	struct tc_action_ops *a_o = NULL;
+
+	if (NULL != kind) {
+		sprintf(act_name, "%s", (char*)RTA_DATA(kind));
+		if (RTA_PAYLOAD(kind) >= IFNAMSIZ) {
+			printk("get_ao: action %s bad\n", (char*)RTA_DATA(kind));
+			return NULL;
+		}
+
+	} else {
+		printk("get_ao: action bad kind\n");
+		return NULL;
+	}
+
+	a_o = tc_lookup_action(kind);
+#ifdef CONFIG_KMOD
+	if (NULL == a_o) {
+		DPRINTK("get_ao: trying to load module %s\n",act_name);
+		request_module (act_name);
+		a_o = tc_lookup_action_n(act_name);
+	}
+#endif
+
+	if (NULL == a_o) {
+		printk("get_ao: failed to find %s\n",act_name);
+		return NULL;
+	}
+
+	a->ops = a_o;
+	return a_o;
+}
+
+struct tc_action *create_a(int i)
+{
+	struct tc_action *act = NULL;
+
+	act = kmalloc(sizeof(*act),GFP_KERNEL);
+	if (NULL == act) { /* grrr .. */
+		printk("create_a: failed to alloc! \n");
+		return NULL;
+	}
+
+	memset(act, 0,sizeof(*act));
+
+	act->order = i;
+
+	return act;
+}
+
+int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
+{
+	struct sk_buff *skb;
+	unsigned char *b;
+	struct nlmsghdr *nlh;
+	struct tcamsg *t;
+	struct netlink_callback dcb;
+	struct rtattr *x;
+	struct rtattr *tb[TCA_ACT_MAX+1];
+	struct rtattr *kind = NULL;
+	struct tc_action *a = create_a(0);
+	int err = -EINVAL;
+
+	if (NULL == a) {
+		printk("tca_action_flush: couldnt create tc_action\n");
+		return err;
+	}
+
+	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
+	if (!skb) {
+		printk("tca_action_flush: failed skb alloc\n");
+		kfree(a);
+		return -ENOBUFS;
+	}
+
+	b = (unsigned char *)skb->tail;
+
+	if (rtattr_parse(tb, TCA_ACT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta))<0) {
+		goto err_out;
+	}
+
+	kind = tb[TCA_ACT_KIND-1];
+	if (NULL == get_ao(kind, a)) {
+		goto err_out;
+	}
+
+	nlh = NLMSG_PUT(skb, pid,  n->nlmsg_seq, RTM_DELACTION, sizeof (*t));
+	t = NLMSG_DATA(nlh);
+	t->tca_family = AF_UNSPEC;
+
+	x = (struct rtattr *) skb->tail;
+	RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
+
+	err = a->ops->walk(skb, &dcb, RTM_DELACTION, a);
+	if (0 > err ) {
+		goto rtattr_failure;
+	}
+
+	x->rta_len = skb->tail - (u8 *) x;
+
+	nlh->nlmsg_len = skb->tail - b;
+	nlh->nlmsg_flags |= NLM_F_ROOT;
+	module_put(a->ops->owner);
+	kfree(a);
+	err = rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO);
+	if (err > 0)
+		return 0;
+
+	return err;
+
+
+rtattr_failure:
+	module_put(a->ops->owner);
+nlmsg_failure:
+err_out:
+	kfree_skb(skb);
+	kfree(a);
+	return err;
+}
+
+int tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event )
+{
+
+	int s = 0;
+	int i, ret = 0;
+	struct tc_action *act = NULL;
+	struct rtattr *tb[TCA_ACT_MAX_PRIO+1];
+	struct tc_action *a = NULL, *a_s = NULL;
+
+	if (event != RTM_GETACTION  && event != RTM_DELACTION)
+		ret = -EINVAL;
+
+	if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(rta), RTA_PAYLOAD(rta))<0) {
+		ret = -EINVAL;
+		goto nlmsg_failure;
+	}
+
+	if (event == RTM_DELACTION && n->nlmsg_flags&NLM_F_ROOT) {
+		if (NULL != tb[0]  && NULL == tb[1]) {
+			return tca_action_flush(tb[0],n,pid);
+		}
+	}
+
+	for (i=0; i < TCA_ACT_MAX_PRIO ; i++) {
+
+		if (NULL == tb[i])
+			break;
+
+		act = create_a(i+1);
+		if (NULL != a && a != act) {
+			a->next = act;
+			a = act;
+		} else {
+			a = act;
+		}
+
+		if (!s) {
+			s = 1;
+			a_s = a;
+		}
+
+		ret = tcf_action_get_1(tb[i],act,n,pid);
+		if (ret < 0) {
+			printk("tcf_action_get: failed to get! \n");
+			ret = -EINVAL;
+			goto rtattr_failure;
+		}
+
+	}
+
+
+	if (RTM_GETACTION == event) {
+		ret = act_get_notify(pid, n, a_s, event);
+	} else { /* delete */
+
+		struct sk_buff *skb;
+
+		skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
+		if (!skb) {
+			ret = -ENOBUFS;
+			goto nlmsg_failure;
+		}
+
+		if (tca_get_fill(skb, a_s,  pid, n->nlmsg_seq, 0, event, 0 , 1) <= 0) {
+			kfree_skb(skb);
+			ret = -EINVAL;
+			goto nlmsg_failure;
+		}
+
+		/* now do the delete */
+		tcf_action_destroy(a_s, 0);
+
+		ret = rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO);
+		if (ret > 0)
+			return 0;
+		return ret;
+	}
+rtattr_failure:
+nlmsg_failure:
+	cleanup_a(a_s);
+	return ret;
+}
+
+
+int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, unsigned flags) 
+{
+	struct tcamsg *t;
+	struct nlmsghdr  *nlh;
+	struct sk_buff *skb;
+	struct rtattr *x;
+	unsigned char *b;
+
+
+	int err = 0;
+
+	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
+	if (!skb)
+		return -ENOBUFS;
+
+	b = (unsigned char *)skb->tail;
+
+	nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*t));
+	nlh->nlmsg_flags = flags;
+	t = NLMSG_DATA(nlh);
+	t->tca_family = AF_UNSPEC;
+	
+	x = (struct rtattr*) skb->tail;
+	RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
+
+	if (0 > tcf_action_dump(skb, a, 0, 0)) {
+		goto rtattr_failure;
+	}
+
+	x->rta_len = skb->tail - (u8*)x;
+	
+	nlh->nlmsg_len = skb->tail - b;
+	NETLINK_CB(skb).dst_groups = RTMGRP_TC;
+	
+	err = rtnetlink_send(skb, pid, RTMGRP_TC, flags&NLM_F_ECHO);
+	if (err > 0)
+		err = 0;
+
+	return err;
+
+rtattr_failure:
+nlmsg_failure:
+	skb_trim(skb, b - skb->data);
+	return -1;
+}
+
+	
+int tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr ) 
+{
+	int ret = 0;
+	struct tc_action *act = NULL;
+	struct tc_action *a = NULL;
+	u32 seq = n->nlmsg_seq;
+
+	act = kmalloc(sizeof(*act),GFP_KERNEL);
+	if (NULL == act)
+		return -ENOMEM;
+
+	ret = tcf_action_init(rta, NULL,act,NULL,ovr,0);
+	/* NOTE: We have an all-or-none model
+	 * This means that of any of the actions fail
+	 * to update then all are undone.
+	 * */
+	if (0 > ret) {
+		tcf_action_destroy(act, 0);
+		goto done;
+	}
+
+	/* dump then free all the actions after update; inserted policy
+	 * stays intact
+	 * */
+	ret = tcf_add_notify(act, pid, seq, RTM_NEWACTION, n->nlmsg_flags); 
+	for (a = act; act; a = act) {
+		if (a) {
+			act = act->next;
+			a->ops = NULL;
+			a->priv = NULL;
+			kfree(a);
+		} else {
+			printk("tcf_action_add: BUG? empty action\n");
+		}
+	}
+done:
+
+	return ret;
+}
+
+static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
+{
+	struct rtattr **tca = arg;
+	u32 pid = skb ? NETLINK_CB(skb).pid : 0;
+
+	int ret = 0, ovr = 0;
+
+	if (NULL == tca[TCA_ACT_TAB-1]) {
+			printk("tc_ctl_action: received NO action attribs\n");
+			return -EINVAL;
+	}
+
+	/* n->nlmsg_flags&NLM_F_CREATE
+	 * */
+	switch (n->nlmsg_type) {
+	case RTM_NEWACTION:    
+		/* we are going to assume all other flags
+		 * imply create only if it doesnt exist
+		 * Note that CREATE | EXCL implies that
+		 * but since we want avoid ambiguity (eg when flags
+		 * is zero) then just set this
+		 */
+		if (n->nlmsg_flags&NLM_F_REPLACE) {
+			ovr = 1;
+		}
+		ret =  tcf_action_add(tca[TCA_ACT_TAB-1], n, pid, ovr);
+		break;
+	case RTM_DELACTION:
+		ret = tca_action_gd(tca[TCA_ACT_TAB-1], n, pid,RTM_DELACTION);
+		break;
+	case RTM_GETACTION:
+		ret = tca_action_gd(tca[TCA_ACT_TAB-1], n, pid,RTM_GETACTION);
+		break;
+	default:
+		printk(" Unknown cmd was detected\n");
+		break;
+	}
+
+	return ret;
+}
+
+char *
+find_dump_kind(struct nlmsghdr *n)
+{
+	struct rtattr *tb1, *tb2[TCA_ACT_MAX+1];
+	struct rtattr *tb[TCA_ACT_MAX_PRIO + 1];
+	struct rtattr *rta[TCAA_MAX + 1];
+	struct rtattr *kind = NULL;
+	int min_len = NLMSG_LENGTH(sizeof (struct tcamsg));
+
+	int attrlen = n->nlmsg_len - NLMSG_ALIGN(min_len);
+	struct rtattr *attr = (void *) n + NLMSG_ALIGN(min_len);
+
+	if (rtattr_parse(rta, TCAA_MAX, attr, attrlen) < 0)
+		return NULL;
+	tb1 = rta[TCA_ACT_TAB - 1];
+	if (NULL == tb1) {
+		return NULL;
+	}
+
+	if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(tb1), NLMSG_ALIGN(RTA_PAYLOAD(tb1))) < 0)
+		return NULL;
+	if (NULL == tb[0]) 
+		return NULL;
+
+	if (rtattr_parse(tb2, TCA_ACT_MAX, RTA_DATA(tb[0]), RTA_PAYLOAD(tb[0]))<0)
+		return NULL;
+	kind = tb2[TCA_ACT_KIND-1];
+
+	return (char *) RTA_DATA(kind);
+}
+
+static int
+tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
+{
+	struct nlmsghdr *nlh;
+	unsigned char *b = skb->tail;
+	struct rtattr *x;
+	struct tc_action_ops *a_o;
+	struct tc_action a;
+	int ret = 0;
+
+	struct tcamsg *t = (struct tcamsg *) NLMSG_DATA(cb->nlh);
+	char *kind = find_dump_kind(cb->nlh);
+	if (NULL == kind) {
+		printk("tc_dump_action: action bad kind\n");
+		return 0;
+	}
+
+	a_o = tc_lookup_action_n(kind);
+
+#ifdef CONFIG_KMOD
+	if (NULL == a_o) {
+		DPRINTK("tc_dump_action: trying to load module %s\n", kind);
+		request_module(kind);
+		a_o = tc_lookup_action_n(kind);
+	}
+#endif
+	if (NULL == a_o) {
+		printk("failed to find %s\n", kind);
+		return 0;
+	}
+
+	memset(&a,0,sizeof(struct tc_action));
+	a.ops = a_o;
+
+	if (NULL == a_o->walk) {
+		printk("tc_dump_action: %s !capable of dumping table\n",kind);
+		goto rtattr_failure;
+	}
+
+	nlh = NLMSG_PUT(skb, NETLINK_CB(cb->skb).pid,  cb->nlh->nlmsg_seq, cb->nlh->nlmsg_type, sizeof (*t));
+	t = NLMSG_DATA(nlh);
+	t->tca_family = AF_UNSPEC;
+
+	x = (struct rtattr *) skb->tail;
+	RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
+
+	ret = a_o->walk(skb, cb, RTM_GETACTION, &a);
+	if (0 > ret ) {
+		goto rtattr_failure;
+	}
+
+	if (ret > 0) {
+		x->rta_len = skb->tail - (u8 *) x;
+		ret = skb->len;
+	} else {
+		skb_trim(skb, (u8*)x - skb->data);
+	}
+
+	nlh->nlmsg_len = skb->tail - b;
+	if (NETLINK_CB(cb->skb).pid && ret) 
+		nlh->nlmsg_flags |= NLM_F_MULTI;
+	module_put(a_o->owner);
+	return skb->len;
+
+rtattr_failure:
+nlmsg_failure:
+	module_put(a_o->owner);
+	skb_trim(skb, b - skb->data);
+	return skb->len;
+}
+
+static int __init tc_action_init(void)
+{
+	struct rtnetlink_link *link_p = rtnetlink_links[PF_UNSPEC];
+
+	if (link_p) {
+		link_p[RTM_NEWACTION-RTM_BASE].doit = tc_ctl_action;
+		link_p[RTM_DELACTION-RTM_BASE].doit = tc_ctl_action;
+		link_p[RTM_GETACTION-RTM_BASE].doit = tc_ctl_action;
+		link_p[RTM_GETACTION-RTM_BASE].dumpit = tc_dump_action;
+	}
+
+	printk("TC classifier action (bugs to netdev@oss.sgi.com cc hadi@cyberus.ca)\n");
+	return 0;
+}
+
+subsys_initcall(tc_action_init);
+
+EXPORT_SYMBOL(tcf_register_action);
+EXPORT_SYMBOL(tcf_unregister_action);
+EXPORT_SYMBOL(tcf_action_init_1);
+EXPORT_SYMBOL(tcf_action_init);
+EXPORT_SYMBOL(tcf_action_destroy);
+EXPORT_SYMBOL(tcf_action_exec);
+EXPORT_SYMBOL(tcf_action_copy_stats);
+EXPORT_SYMBOL(tcf_action_dump);
+EXPORT_SYMBOL(tcf_action_dump_1);
+EXPORT_SYMBOL(tcf_action_dump_old);
--- diff/scripts/mkmakefile	1970-01-01 01:00:00.000000000 +0100
+++ source/scripts/mkmakefile	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Generates a small Makefile used in the root of the output
+# directory, to allow make to be started from there.
+# The Makefile also allow for more convinient build of external modules
+
+# Usage
+# $1 - Kernel src directory
+# $2 - Output directory
+# $3 - version
+# $4 - patchlevel
+
+
+cat << EOF
+# Automatically generated by $0: don't edit
+
+VERSION = $3
+PATCHLEVEL = $4
+
+KERNELSRC    := $1
+KERNELOUTPUT := $2
+
+MAKEFLAGS += --no-print-directory
+
+all:
+	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
+
+%::
+	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
+
+EOF
+
--- diff/scripts/package/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ source/scripts/package/Makefile	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,71 @@
+# Makefile for the different targets used to generate full packages of a kernel
+# It uses the generic clean infrastructure of kbuild
+
+# Ignore the following files/directories during tar operation
+TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS
+
+
+# RPM target
+# ---------------------------------------------------------------------------
+# The rpm target generates two rpm files:
+# /usr/src/packages/SRPMS/kernel-2.6.7rc2-1.src.rpm
+# /usr/src/packages/RPMS/i386/kernel-2.6.7rc2-1.<arch>.rpm
+# The src.rpm files includes all source for the kernel being built
+# The <arch>.rpm includes kernel configuration, modules etc.
+#
+# Process to create the rpm files
+# a) clean the kernel
+# b) Generate .spec file
+# c) Build a tar ball, using symlink to make kernel version
+#    first entry in the path
+# d) and pack the result to a tar.gz file
+# e) generate the rpm files, based on kernel.spec
+# - Use /. to avoid tar packing just the symlink
+
+# Do we have rpmbuild, otherwise fall back to the older rpm
+RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
+	           else echo rpm; fi)
+
+# Remove hyphens since they have special meaning in RPM filenames
+KERNELPATH := kernel-$(subst -,,$(KERNELRELEASE))
+MKSPEC     := $(srctree)/scripts/package/mkspec
+PREV       := set -e; cd ..;
+
+.PHONY: rpm-pkg rpm
+
+$(objtree)/kernel.spec: $(MKSPEC)
+	$(CONFIG_SHELL) $(MKSPEC) > $@
+
+rpm-pkg rpm: $(objtree)/kernel.spec
+	$(MAKE) clean
+	$(PREV) ln -sf $(srctree) $(KERNELPATH)
+	$(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
+	$(PREV) rm $(KERNELPATH)
+
+	set -e; \
+	$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
+	set -e; \
+	mv -f $(objtree)/.tmp_version $(objtree)/.version
+
+	$(RPM) --target $(UTS_MACHINE) -ta ../$(KERNELPATH).tar.gz
+	rm ../$(KERNELPATH).tar.gz
+
+clean-rule +=  rm -f $(objtree)/kernel.spec
+
+# Deb target
+# ---------------------------------------------------------------------------
+#
+.PHONY: deb-pkg
+deb-pkg:
+	$(MAKE)
+	$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
+
+clean-rule += && rm -rf $(objtree)/debian/
+
+
+# Help text displayed when executing 'make help'
+# ---------------------------------------------------------------------------
+help:
+	@echo  '  rpm-pkg         - Build the kernel as an RPM package'
+	@echo  '  deb-pkg         - Build the kernel as an deb package'
+
--- diff/scripts/package/builddeb	1970-01-01 01:00:00.000000000 +0100
+++ source/scripts/package/builddeb	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,79 @@
+#!/bin/sh
+#
+# builddeb 1.2
+# Copyright 2003 Wichert Akkerman <wichert@wiggy.net>
+#
+# Simple script to generate a deb package for a Linux kernel. All the
+# complexity of what to do with a kernel after it is installer or removed
+# is left to other scripts and packages: they can install scripts in the
+# /etc/kernel/{pre,post}{inst,rm}.d/ directories that will be called on
+# package install and removal.
+
+set -e
+
+# Some variables and settings used throughout the script
+version="$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
+tmpdir="$objtree/debian/tmp"
+
+# Setup the directory structure
+rm -rf "$tmpdir"
+mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
+
+# Build and install the kernel
+cp System.map "$tmpdir/boot/System.map-$version"
+cp .config "$tmpdir/boot/config-$version"
+cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
+
+if grep -q '^CONFIG_MODULES=y' .config ; then
+	INSTALL_MOD_PATH="$tmpdir" make modules_install
+fi
+
+# Install the maintainer scripts
+for script in postinst postrm preinst prerm ; do
+	mkdir -p "$tmpdir/etc/kernel/$script.d"
+	cat <<EOF > "$tmpdir/DEBIAN/$script"
+#!/bin/sh
+
+set -e
+
+test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d
+exit 0
+EOF
+	chmod 755 "$tmpdir/DEBIAN/$script"
+done
+
+name="Kernel Compiler <$(id -nu)@$(hostname -f)>"
+# Generate a simple changelog template
+cat <<EOF > debian/changelog
+linux ($version) unstable; urgency=low
+
+  * A standard release
+
+ -- $name  $(date -R)
+EOF
+
+# Generate a control file
+cat <<EOF > debian/control
+Source: linux
+Section: base
+Priority: optional
+Maintainer: $name
+Standards-Version: 3.6.1
+
+Package: linux-$version
+Architecture: any
+Description: Linux kernel, version $version
+ This package contains the Linux kernel, modules and corresponding other
+ files version $version.
+EOF
+
+# Fix some ownership and permissions
+chown -R root:root "$tmpdir"
+chmod -R go-w "$tmpdir"
+
+# Perform the final magic
+dpkg-gencontrol -isp
+dpkg --build "$tmpdir" ..
+
+exit 0
+
--- diff/scripts/package/mkspec	1970-01-01 01:00:00.000000000 +0100
+++ source/scripts/package/mkspec	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+#	Output a simple RPM spec file that uses no fancy features requring
+#	RPM v4. This is intended to work with any RPM distro.
+#
+#	The only gothic bit here is redefining install_post to avoid
+#	stripping the symbols from files in the kernel which we want
+#
+#	Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
+#
+
+# starting to output the spec
+if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
+	PROVIDES=kernel-drm
+fi
+
+PROVIDES="$PROVIDES kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
+
+echo "Name: kernel"
+echo "Summary: The Linux Kernel"
+echo "Version: "$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION | sed -e "s/-//g"
+# we need to determine the NEXT version number so that uname and
+# rpm -q will agree
+echo "Release: `. $srctree/scripts/mkversion`"
+echo "License: GPL"
+echo "Group: System Environment/Kernel"
+echo "Vendor: The Linux Community"
+echo "URL: http://www.kernel.org"
+echo -n "Source: kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL"
+echo "$EXTRAVERSION.tar.gz" | sed -e "s/-//g"
+echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root"
+echo "Provides: $PROVIDES"
+echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"
+echo "%define debug_package %{nil}"
+echo ""
+echo "%description"
+echo "The Linux Kernel, the operating system core itself"
+echo ""
+echo "%prep"
+echo "%setup -q"
+echo ""
+echo "%build"
+echo "make clean && make"
+echo ""
+echo "%install"
+echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
+
+echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install'
+echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
+
+echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
+
+echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
+echo ""
+echo "%clean"
+echo '#echo -rf $RPM_BUILD_ROOT'
+echo ""
+echo "%files"
+echo '%defattr (-, root, root)'
+echo "%dir /lib/modules"
+echo "/lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
+echo "/boot/*"
+echo ""
--- diff/security/selinux/nlmsgtab.c	1970-01-01 01:00:00.000000000 +0100
+++ source/security/selinux/nlmsgtab.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,153 @@
+/*
+ * Netlink message type permission tables, for user generated messages.
+ *
+ * Author: James Morris <jmorris@redhat.com>
+ *
+ * Copyright (C) 2004 Red Hat, Inc., James Morris <jmorris@redhat.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/types.h>
+#include <linux/kernel.h>
+#include <linux/skbuff.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <linux/if.h>
+#include <linux/netfilter_ipv4/ip_queue.h>
+#include <linux/tcp_diag.h>
+#include <linux/xfrm.h>
+#include <linux/audit.h>
+
+#include "flask.h"
+#include "av_permissions.h"
+
+struct nlmsg_perm
+{
+	u16	nlmsg_type;
+	u32	perm;
+};
+
+static struct nlmsg_perm nlmsg_route_perms[] =
+{
+	{ RTM_NEWLINK,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_DELLINK,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_GETLINK,		NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_SETLINK,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_NEWADDR,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_DELADDR,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_GETADDR,		NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_NEWROUTE,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_DELROUTE,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_GETROUTE,		NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_NEWNEIGH,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_DELNEIGH,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_GETNEIGH,		NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_NEWRULE,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_DELRULE,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_GETRULE,		NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_NEWQDISC,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_DELQDISC,		NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_GETQDISC,		NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_NEWTCLASS,	NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_DELTCLASS,	NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_GETTCLASS,	NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_NEWTFILTER,	NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_DELTFILTER,	NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_GETTFILTER,	NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_NEWPREFIX,	NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+	{ RTM_GETPREFIX,	NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_GETMULTICAST,	NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+	{ RTM_GETANYCAST,	NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+};
+
+static struct nlmsg_perm nlmsg_firewall_perms[] =
+{
+	{ IPQM_MODE,		NETLINK_FIREWALL_SOCKET__NLMSG_WRITE },
+	{ IPQM_VERDICT,		NETLINK_FIREWALL_SOCKET__NLMSG_WRITE },
+};
+
+static struct nlmsg_perm nlmsg_tcpdiag_perms[] =
+{
+	{ TCPDIAG_GETSOCK,	NETLINK_TCPDIAG_SOCKET__NLMSG_READ },
+};
+
+static struct nlmsg_perm nlmsg_xfrm_perms[] =
+{
+	{ XFRM_MSG_NEWSA,	NETLINK_XFRM_SOCKET__NLMSG_WRITE },
+	{ XFRM_MSG_DELSA,	NETLINK_XFRM_SOCKET__NLMSG_WRITE },
+	{ XFRM_MSG_GETSA,	NETLINK_XFRM_SOCKET__NLMSG_READ  },
+	{ XFRM_MSG_NEWPOLICY,	NETLINK_XFRM_SOCKET__NLMSG_WRITE },
+	{ XFRM_MSG_DELPOLICY,	NETLINK_XFRM_SOCKET__NLMSG_WRITE },
+	{ XFRM_MSG_GETPOLICY,	NETLINK_XFRM_SOCKET__NLMSG_READ  },
+	{ XFRM_MSG_ALLOCSPI,	NETLINK_XFRM_SOCKET__NLMSG_WRITE },
+	{ XFRM_MSG_UPDPOLICY,	NETLINK_XFRM_SOCKET__NLMSG_WRITE },
+	{ XFRM_MSG_UPDSA,	NETLINK_XFRM_SOCKET__NLMSG_WRITE },
+};
+
+static struct nlmsg_perm nlmsg_audit_perms[] =
+{
+	{ AUDIT_GET,		NETLINK_AUDIT_SOCKET__NLMSG_READ  },
+	{ AUDIT_SET,		NETLINK_AUDIT_SOCKET__NLMSG_WRITE },
+	{ AUDIT_LIST,		NETLINK_AUDIT_SOCKET__NLMSG_READ  },
+	{ AUDIT_ADD,		NETLINK_AUDIT_SOCKET__NLMSG_WRITE },
+	{ AUDIT_DEL,		NETLINK_AUDIT_SOCKET__NLMSG_WRITE },
+	{ AUDIT_USER,		NETLINK_AUDIT_SOCKET__NLMSG_WRITE },
+	{ AUDIT_LOGIN,		NETLINK_AUDIT_SOCKET__NLMSG_WRITE },
+};
+
+
+static int nlmsg_perm(u16 nlmsg_type, u32 *perm, struct nlmsg_perm *tab, size_t tabsize)
+{
+	int i, err = -EINVAL;
+
+	for (i = 0; i < tabsize/sizeof(struct nlmsg_perm); i++)
+		if (nlmsg_type == tab[i].nlmsg_type) {
+			*perm = tab[i].perm;
+			err = 0;
+			break;
+		}
+
+	return err;
+}
+
+int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm)
+{
+	int err = 0;
+
+	switch (sclass) {
+	case SECCLASS_NETLINK_ROUTE_SOCKET:
+		err = nlmsg_perm(nlmsg_type, perm, nlmsg_route_perms,
+				 sizeof(nlmsg_route_perms));
+		break;
+
+	case SECCLASS_NETLINK_FIREWALL_SOCKET:
+	case NETLINK_IP6_FW:
+		err = nlmsg_perm(nlmsg_type, perm, nlmsg_firewall_perms,
+				 sizeof(nlmsg_firewall_perms));
+		break;
+
+	case SECCLASS_NETLINK_TCPDIAG_SOCKET:
+		err = nlmsg_perm(nlmsg_type, perm, nlmsg_tcpdiag_perms,
+				 sizeof(nlmsg_tcpdiag_perms));
+		break;
+
+	case SECCLASS_NETLINK_XFRM_SOCKET:
+		err = nlmsg_perm(nlmsg_type, perm, nlmsg_xfrm_perms,
+				 sizeof(nlmsg_xfrm_perms));
+		break;
+
+	case SECCLASS_NETLINK_AUDIT_SOCKET:
+		err = nlmsg_perm(nlmsg_type, perm, nlmsg_audit_perms,
+				 sizeof(nlmsg_audit_perms));
+		break;
+
+	/* No messaging from userspace, or class unknown/unhandled */
+	default:
+		err = -ENOENT;
+		break;
+	}
+
+	return err;
+}
--- diff/sound/pci/ice1712/vt1720_mobo.c	1970-01-01 01:00:00.000000000 +0100
+++ source/sound/pci/ice1712/vt1720_mobo.c	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,97 @@
+/*
+ *   ALSA driver for VT1720/VT1724 (Envy24PT/Envy24HT)
+ *
+ *   Lowlevel functions for VT1720-based motherboards
+ *
+ *	Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 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 <sound/driver.h>
+#include <asm/io.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <sound/core.h>
+
+#include "ice1712.h"
+#include "vt1720_mobo.h"
+
+
+static int __devinit k8x800_init(ice1712_t *ice)
+{
+	ice->vt1720 = 1;
+
+	/* VT1616 codec */
+	ice->num_total_dacs = 6;
+	ice->num_total_adcs = 2;
+
+	/* WM8728 codec */
+	/* FIXME: TODO */
+
+	return 0;
+}
+
+static int __devinit k8x800_add_controls(ice1712_t *ice)
+{
+	/* FIXME: needs some quirks for VT1616? */
+	return 0;
+}
+
+/* EEPROM image */
+
+static unsigned char k8x800_eeprom[] __devinitdata = {
+	0x01,	/* SYSCONF: clock 256, 1ADC, 2DACs */
+	0x02,	/* ACLINK: ACLINK, packed */
+	0x00,	/* I2S: - */
+	0x00,	/* SPDIF: - */
+	0xff,	/* GPIO_DIR */
+	0xff,	/* GPIO_DIR1 */
+	0x00,	/* - */
+	0xff,	/* GPIO_MASK */
+	0xff,	/* GPIO_MASK1 */
+	0x00,	/* - */
+	0x00,	/* GPIO_STATE */
+	0x00,	/* GPIO_STATE1 */
+	0x00,	/* - */
+};
+
+
+/* entry point */
+struct snd_ice1712_card_info snd_vt1720_mobo_cards[] __devinitdata = {
+	{
+		.subvendor = VT1720_SUBDEVICE_K8X800,
+		.name = "Albatron K8X800 Pro II",
+		.model = "k8x800",
+		.chip_init = k8x800_init,
+		.build_controls = k8x800_add_controls,
+		.eeprom_size = sizeof(k8x800_eeprom),
+		.eeprom_data = k8x800_eeprom,
+	},
+	{
+		.subvendor = VT1720_SUBDEVICE_ZNF3_150,
+		.name = "Chaintech ZNF3-150",
+		/* identical with k8x800 */
+		.chip_init = k8x800_init,
+		.build_controls = k8x800_add_controls,
+		.eeprom_size = sizeof(k8x800_eeprom),
+		.eeprom_data = k8x800_eeprom,
+	},
+	{ } /* terminator */
+};
+
--- diff/sound/pci/ice1712/vt1720_mobo.h	1970-01-01 01:00:00.000000000 +0100
+++ source/sound/pci/ice1712/vt1720_mobo.h	2004-07-01 21:32:57.000000000 +0100
@@ -0,0 +1,35 @@
+#ifndef __SOUND_VT1720_MOBO_H
+#define __SOUND_VT1720_MOBO_H
+
+/*
+ *   ALSA driver for VT1720/VT1724 (Envy24PT/Envy24HT)
+ *
+ *   Lowlevel functions for VT1720-based motherboards
+ *
+ *	Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 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
+ *
+ */      
+
+#define VT1720_MOBO_DEVICE_DESC        "{Albatron,K8X800 Pro II},"\
+				       "{Chaintech,ZNF3-150},"
+
+#define VT1720_SUBDEVICE_K8X800		0xf217052c
+#define VT1720_SUBDEVICE_ZNF3_150	0x0f2741f6
+
+extern struct snd_ice1712_card_info  snd_vt1720_mobo_cards[];
+
+#endif /* __SOUND_VT1720_MOBO_H */
--- diff/Documentation/as-iosched.txt	2004-05-19 22:10:50.000000000 +0100
+++ source/Documentation/as-iosched.txt	1970-01-01 01:00:00.000000000 +0100
@@ -1,165 +0,0 @@
-Anticipatory IO scheduler
--------------------------
-Nick Piggin <piggin@cyberone.com.au>    13 Sep 2003
-
-Attention! Database servers, especially those using "TCQ" disks should
-investigate performance with the 'deadline' IO scheduler. Any system with high
-disk performance requirements should do so, in fact.
-
-If you see unusual performance characteristics of your disk systems, or you
-see big performance regressions versus the deadline scheduler, please email
-me. Database users don't bother unless you're willing to test a lot of patches
-from me ;) its a known issue.
-
-Also, users with hardware RAID controllers, doing striping, may find
-highly variable performance results with using the as-iosched. The
-as-iosched anticipatory implementation is based on the notion that a disk
-device has only one physical seeking head.  A striped RAID controller
-actually has a head for each physical device in the logical RAID device.
-
-However, setting the antic_expire (see tunable parameters below) produces
-very similar behavior to the deadline IO scheduler.
-
-
-Selecting IO schedulers
------------------------
-To choose IO schedulers at boot time, use the argument 'elevator=deadline'.
-'noop' and 'as' (the default) are also available. IO schedulers are assigned
-globally at boot time only presently.
-
-
-Anticipatory IO scheduler Policies
-----------------------------------
-The as-iosched implementation implements several layers of policies
-to determine when an IO request is dispatched to the disk controller.
-Here are the policies outlined, in order of application.
-
-1. one-way Elevator algorithm.
-
-The elevator algorithm is similar to that used in deadline scheduler, with
-the addition that it allows limited backward movement of the elevator
-(i.e. seeks backwards).  A seek backwards can occur when choosing between
-two IO requests where one is behind the elevator's current position, and
-the other is in front of the elevator's position. If the seek distance to
-the request in back of the elevator is less than half the seek distance to
-the request in front of the elevator, then the request in back can be chosen.
-Backward seeks are also limited to a maximum of MAXBACK (1024*1024) sectors.
-This favors forward movement of the elevator, while allowing opportunistic
-"short" backward seeks.
-
-2. FIFO expiration times for reads and for writes.
-
-This is again very similar to the deadline IO scheduler.  The expiration
-times for requests on these lists is tunable using the parameters read_expire
-and write_expire discussed below.  When a read or a write expires in this way,
-the IO scheduler will interrupt its current elevator sweep or read anticipation
-to service the expired request.
-
-3. Read and write request batching
-
-A batch is a collection of read requests or a collection of write
-requests.  The as scheduler alternates dispatching read and write batches
-to the driver.  In the case a read batch, the scheduler submits read
-requests to the driver as long as there are read requests to submit, and
-the read batch time limit has not been exceeded (read_batch_expire).
-The read batch time limit begins counting down only when there are
-competing write requests pending.
-
-In the case of a write batch, the scheduler submits write requests to
-the driver as long as there are write requests available, and the
-write batch time limit has not been exceeded (write_batch_expire).
-However, the length of write batches will be gradually shortened
-when read batches frequently exceed their time limit.
-
-When changing between batch types, the scheduler waits for all requests
-from the previous batch to complete before scheduling requests for the
-next batch.
-
-The read and write fifo expiration times described in policy 2 above
-are checked only when in scheduling IO of a batch for the corresponding
-(read/write) type.  So for example, the read FIFO timeout values are
-tested only during read batches.  Likewise, the write FIFO timeout
-values are tested only during write batches.  For this reason,
-it is generally not recommended for the read batch time
-to be longer than the write expiration time, nor for the write batch
-time to exceed the read expiration time (see tunable parameters below).
-
-When the IO scheduler changes from a read to a write batch,
-it begins the elevator from the request that is on the head of the
-write expiration FIFO.  Likewise, when changing from a write batch to
-a read batch, scheduler begins the elevator from the first entry
-on the read expiration FIFO.
-
-4. Read anticipation.
-
-Read anticipation occurs only when scheduling a read batch.
-This implementation of read anticipation allows only one read request
-to be dispatched to the disk controller at a time.  In
-contrast, many write requests may be dispatched to the disk controller
-at a time during a write batch.  It is this characteristic that can make
-the anticipatory scheduler perform anomalously with controllers supporting
-TCQ, or with hardware striped RAID devices. Setting the antic_expire
-queue paramter (see below) to zero disables this behavior, and the anticipatory
-scheduler behaves essentially like the deadline scheduler.
-
-When read anticipation is enabled (antic_expire is not zero), reads
-are dispatched to the disk controller one at a time.
-At the end of each read request, the IO scheduler examines its next
-candidate read request from its sorted read list.  If that next request
-is from the same process as the request that just completed,
-or if the next request in the queue is "very close" to the
-just completed request, it is dispatched immediately.  Otherwise,
-statistics (average think time, average seek distance) on the process
-that submitted the just completed request are examined.  If it seems
-likely that that process will submit another request soon, and that
-request is likely to be near the just completed request, then the IO
-scheduler will stop dispatching more read requests for up time (antic_expire)
-milliseconds, hoping that process will submit a new request near the one
-that just completed.  If such a request is made, then it is dispatched
-immediately.  If the antic_expire wait time expires, then the IO scheduler
-will dispatch the next read request from the sorted read queue.
-
-To decide whether an anticipatory wait is worthwhile, the scheduler
-maintains statistics for each process that can be used to compute
-mean "think time" (the time between read requests), and mean seek
-distance for that process.  One observation is that these statistics
-are associated with each process, but those statistics are not associated
-with a specific IO device.  So for example, if a process is doing IO
-on several file systems on separate devices, the statistics will be
-a combination of IO behavior from all those devices.
-
-
-Tuning the anticipatory IO scheduler
-------------------------------------
-When using 'as', the anticipatory IO scheduler there are 5 parameters under
-/sys/block/*/iosched/. All are units of milliseconds.
-
-The parameters are:
-* read_expire
-    Controls how long until a read request becomes "expired". It also controls the
-    interval between which expired requests are served, so set to 50, a request
-    might take anywhere < 100ms to be serviced _if_ it is the next on the
-    expired list. Obviously request expiration strategies won't make the disk
-    go faster. The result basically equates to the timeslice a single reader
-    gets in the presence of other IO. 100*((seek time / read_expire) + 1) is
-    very roughly the % streaming read efficiency your disk should get with
-    multiple readers.
-
-* read_batch_expire
-    Controls how much time a batch of reads is given before pending writes are
-    served. A higher value is more efficient. This might be set below read_expire
-    if writes are to be given higher priority than reads, but reads are to be
-    as efficient as possible when there are no writes. Generally though, it
-    should be some multiple of read_expire.
-   
-* write_expire, and
-* write_batch_expire are equivalent to the above, for writes.
-
-* antic_expire
-    Controls the maximum amount of time we can anticipate a good read (one
-    with a short seek distance from the most recently completed request) before
-    giving up. Many other factors may cause anticipation to be stopped early,
-    or some processes will not be "anticipated" at all. Should be a bit higher
-    for big seek time devices though not a linear correspondence - most
-    processes have only a few ms thinktime.
-
--- diff/arch/arm/common/platform.c	2004-05-19 22:10:54.000000000 +0100
+++ source/arch/arm/common/platform.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-#include <linux/ioport.h>
-#include <linux/device.h>
-#include <linux/init.h>
-
-int __init platform_add_device(struct platform_device *dev)
-{
-	int i;
-
-	for (i = 0; i < dev->num_resources; i++) {
-		struct resource *r = &dev->resource[i];
-
-		r->name = dev->dev.bus_id;
-
-		if (r->flags & IORESOURCE_MEM &&
-		    request_resource(&iomem_resource, r)) {
-			printk(KERN_ERR
-			       "%s%d: failed to claim resource %d\n",
-			       dev->name, dev->id, i);
-			break;
-		}
-	}
-	if (i == dev->num_resources)
-		platform_device_register(dev);
-	return 0;
-}
-
-int __init platform_add_devices(struct platform_device **devs, int num)
-{
-	int i;
-
-	for (i = 0; i < num; i++)
-		platform_add_device(devs[i]);
-
-	return 0;
-}
--- diff/arch/arm/common/plx90x0.c	2004-05-19 22:10:54.000000000 +0100
+++ source/arch/arm/common/plx90x0.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,178 +0,0 @@
-/* 
- * Driver for PLX Technology PCI9000-series host bridge.
- *
- * Copyright (C) 1997, 1998, 1999, 2000 FutureTV Labs Ltd
- */
-
-/*
- * 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.
- */
-
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/init.h>
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/ptrace.h>
-#include <asm/irq.h>
-#include <asm/mach/pci.h>
-
-/*
- * Since the following functions are all very similar, the common parts
- * are pulled out into these macros.
- */
-
-#define PLX_CLEAR_CONFIG						\
-	__raw_writel(0, PLX_BASE + 0xac);				\
-	local_irq_restore(flags); }
-
-#define PLX_SET_CONFIG							\
-	{ unsigned long flags;						\
-	local_irq_save(flags);						\
-	__raw_writel((1<<31 | (bus->number << 16)			\
-		| (devfn << 8) | (where & ~3)				\
-		| ((bus->number == 0)?0:1)), PLX_BASE + 0xac);		\
-
-#define PLX_CONFIG_WRITE(size)						\
-	PLX_SET_CONFIG							\
-	__raw_write##size(value, PCIO_BASE + (where & 3));		\
-	if (__raw_readw(PLX_BASE + 0x6) & 0x2000)			\
-		__raw_writew(0x2000, PLX_BASE + 0x6);			\
-	PLX_CLEAR_CONFIG						\
-	return PCIBIOS_SUCCESSFUL;
-
-#define PLX_CONFIG_READ(size)						\
-	PLX_SET_CONFIG							\
-	*value = __raw_read##size(PCIO_BASE + (where & 3));		\
-	if (__raw_readw(PLX_BASE + 0x6) & 0x2000) {			\
-		__raw_writew(0x2000, PLX_BASE + 0x6);			\
-		*value = 0xffffffffUL;					\
-	}								\
-	PLX_CLEAR_CONFIG						\
-	return PCIBIOS_SUCCESSFUL;
-
-/* Configuration space access routines */
-
-static int 
-plx90x0_read_config (struct pci_bus *bus, unsigned int devfn, int where,
-		     int where, int size, u32 *value)
-{
-	switch (size) {
-	case 1:
-		PLX_CONFIG_READ(b)
-		break;
-	case 2:
-		PLX_CONFIG_READ(w)
-		break;
-	case 4:
-		PLX_CONFIG_READ(l)
-		break;
-	}
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static int 
-plx90x0_write_config (struct pci_bus *bus, unsigned int devfn, int where,
-		      int where, int size, u32 value)
-{
-	switch (size) {
-	case 1:
-		PLX_CONFIG_WRITE(b)
-		break;
-	case 2:
-		PLX_CONFIG_WRITE(w)
-		break;
-	case 4:
-		PLX_CONFIG_WRITE(l)
-		break;
-	}
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static struct pci_ops plx90x0_ops = 
-{
-	.read	= plx90x0_read_config,
-	.write	= plx90x0_write_config,
-};
-
-static void 
-plx_syserr_handler(int irq, void *handle, struct pt_regs *regs)
-{
-	printk("PLX90x0: machine check %04x (pc=%08lx)\n", 
-	       readw(PLX_BASE + 6), regs->ARM_pc);
-	__raw_writew(0xf000, PLX_BASE + 6);
-}
-
-/*
- * Initialise the PCI system.
- */
-
-void __init
-plx90x0_init(struct arm_sysdata *sysdata)
-{
-	static const unsigned long int base = PLX_BASE;
-	char *what;
-	unsigned long bar = (unsigned long)virt_to_bus((void *)PAGE_OFFSET);
-
-	/* Have a sniff around and see which PLX device is present. */
-	unsigned long id = __raw_readl(base + 0xf0);
-	
-#if 0
-	/* This check was a good idea, but can fail.  The PLX9060 puts no
-	   default value in these registers unless NB# is asserted (which it
-	   isn't on these cards).  */
-	if ((id & 0xffff) != PCI_VENDOR_ID_PLX)
-		return;		/* Nothing found */
-#endif
-
-	/* Found one - now work out what it is. */
-	switch (id >> 16) {
-	case 0:		/* PCI_DEVICE_ID_PLX_9060 */
-		what = "PCI9060";
-		break;
-	case PCI_DEVICE_ID_PLX_9060ES:
-		what = "PCI9060ES";
-		break;
-	case PCI_DEVICE_ID_PLX_9060SD:
-		what = "PCI9060SD";		/* uhuhh.. */
-		break;
-	case PCI_DEVICE_ID_PLX_9080:
-		what = "PCI9080";
-		break;
-	default:
-		printk("PCI: Unknown PLX device %04lx found -- ignored.\n",
-		       id >> 16);
-		return;
-	}
-	
-	printk("PCI: PLX Technology %s host bridge found.\n", what);
-	
-	/* Now set it up for both master and slave accesses. */
-	__raw_writel(0xffff0147,	base + 0x4);
-	__raw_writeb(32,		base + 0xd);
-	__raw_writel(0x8 | bar,		base + 0x18);
-	__raw_writel(0xf8000008,	base + 0x80);
-	__raw_writel(0x40000001,	base + 0x84);
-	__raw_writel(0,			base + 0x88);
-	__raw_writel(0,			base + 0x8c);
-	__raw_writel(0x11,		base + 0x94);
-	__raw_writel(0xC3 + (4 << 28)
-		+ (8 << 11) + (1 << 10)
-		     + (1 << 24),	base + 0x98);
-	__raw_writel(0xC0000000,	base + 0x9c);
-	__raw_writel(PLX_MEM_START,	base + 0xa0);
-	__raw_writel(PLX_IO_START,	base + 0xa4);
-	__raw_writel(0x3,		base + 0xa8);
-	__raw_writel(0,			base + 0xac);
-	__raw_writel(0x10001,		base + 0xe8);
-	__raw_writel(0x8000767e,	base + 0xec);
-	
-	request_irq(IRQ_SYSERR, plx_syserr_handler, 0, 
-		    "system error", NULL);
-
-	pci_scan_bus(0, &plx90x0_ops, sysdata);
-}
--- diff/arch/arm/configs/adi_evb_defconfig	2004-05-19 22:10:54.000000000 +0100
+++ source/arch/arm/configs/adi_evb_defconfig	1970-01-01 01:00:00.000000000 +0100
@@ -1,678 +0,0 @@
-#
-# Automatically generated by make menuconfig: don't edit
-#
-CONFIG_ARM=y
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-CONFIG_UID16=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
-# CONFIG_GENERIC_BUST_SPINLOCK is not set
-# CONFIG_GENERIC_ISA_DMA is not set
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-# CONFIG_OBSOLETE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
-# CONFIG_KMOD is not set
-
-#
-# System Type
-#
-CONFIG_ARCH_ADIFCC=y
-# CONFIG_ARCH_ARCA5K is not set
-# CONFIG_ARCH_CLPS7500 is not set
-# CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
-# CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
-# CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
-# CONFIG_ARCH_IOP310 is not set
-# CONFIG_ARCH_L7200 is not set
-# CONFIG_ARCH_RPC is not set
-# CONFIG_ARCH_SA1100 is not set
-# CONFIG_ARCH_SHARK is not set
-
-#
-# Archimedes/A5000 Implementations
-#
-# CONFIG_ARCH_ARC is not set
-# CONFIG_ARCH_A5K is not set
-
-#
-# Footbridge Implementations
-#
-# CONFIG_ARCH_CATS is not set
-# CONFIG_ARCH_PERSONAL_SERVER is not set
-# CONFIG_ARCH_EBSA285_ADDIN is not set
-# CONFIG_ARCH_EBSA285_HOST is not set
-# CONFIG_ARCH_NETWINDER is not set
-
-#
-# SA11x0 Implementations
-#
-# CONFIG_SA1100_ASSABET is not set
-# CONFIG_ASSABET_NEPONSET is not set
-# CONFIG_SA1100_ADSBITSY is not set
-# CONFIG_SA1100_BRUTUS is not set
-# CONFIG_SA1100_CERF is not set
-# CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_EXTENEX1 is not set
-# CONFIG_SA1100_FLEXANET is not set
-# CONFIG_SA1100_FREEBIRD is not set
-# CONFIG_SA1100_GRAPHICSCLIENT is not set
-# CONFIG_SA1100_GRAPHICSMASTER is not set
-# CONFIG_SA1100_JORNADA720 is not set
-# CONFIG_SA1100_HUW_WEBPANEL is not set
-# CONFIG_SA1100_ITSY is not set
-# CONFIG_SA1100_LART is not set
-# CONFIG_SA1100_NANOENGINE is not set
-# CONFIG_SA1100_OMNIMETER is not set
-# CONFIG_SA1100_PANGOLIN is not set
-# CONFIG_SA1100_PLEB is not set
-# CONFIG_SA1100_SHERMAN is not set
-# CONFIG_SA1100_SIMPAD is not set
-# CONFIG_SA1100_PFS168 is not set
-# CONFIG_SA1100_VICTOR is not set
-# CONFIG_SA1100_XP860 is not set
-# CONFIG_SA1100_YOPY is not set
-# CONFIG_SA1100_USB is not set
-# CONFIG_SA1100_USB_NETLINK is not set
-# CONFIG_SA1100_USB_CHAR is not set
-
-#
-# CLPS711X/EP721X Implementations
-#
-# CONFIG_ARCH_CDB89712 is not set
-# CONFIG_ARCH_CLEP7312 is not set
-# CONFIG_ARCH_EDB7211 is not set
-# CONFIG_ARCH_P720T is not set
-# CONFIG_ARCH_EP7211 is not set
-# CONFIG_ARCH_EP7212 is not set
-CONFIG_ARCH_ADI_EVB=y
-CONFIG_XSCALE_PMU_TIMER=y
-# CONFIG_ARCH_ACORN is not set
-# CONFIG_FOOTBRIDGE is not set
-# CONFIG_FOOTBRIDGE_HOST is not set
-# CONFIG_FOOTBRIDGE_ADDIN is not set
-CONFIG_CPU_32=y
-# CONFIG_CPU_26 is not set
-# CONFIG_CPU_32v3 is not set
-# CONFIG_CPU_32v4 is not set
-# CONFIG_CPU_ARM610 is not set
-# CONFIG_CPU_ARM710 is not set
-# CONFIG_CPU_ARM720T is not set
-# CONFIG_CPU_ARM920T is not set
-# CONFIG_CPU_ARM926T is not set
-# CONFIG_CPU_ARM1020 is not set
-# CONFIG_CPU_SA110 is not set
-# CONFIG_CPU_SA1100 is not set
-CONFIG_CPU_32v4=y
-CONFIG_CPU_XSCALE=y
-CONFIG_ARM_THUMB=y
-# CONFIG_XSCALE_TOOLS is not set
-CONFIG_XSCALE_WRITE_ALLOC=y
-CONFIG_XSCALE_PMU=y
-CONFIG_ARM_THUMB=y
-# CONFIG_DISCONTIGMEM is not set
-
-#
-# General setup
-#
-# CONFIG_PCI is not set
-# CONFIG_ISA is not set
-# CONFIG_ISA_DMA is not set
-# CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
-CONFIG_NET=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
-CONFIG_FPE_NWFPE=y
-# CONFIG_FPE_FASTFPE is not set
-CONFIG_KCORE_ELF=y
-# CONFIG_KCORE_AOUT is not set
-CONFIG_BINFMT_AOUT=y
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_MISC is not set
-# CONFIG_PM is not set
-# CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/mtdblock1 mem=32M initrd=0xc0800000,3M"
-CONFIG_ALIGNMENT_TRAP=y
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=y
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_PARTITIONS=y
-# CONFIG_MTD_REDBOOT_PARTS is not set
-# CONFIG_MTD_BOOTLDR_PARTS is not set
-# CONFIG_MTD_AFS_PARTS is not set
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLOCK=y
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=y
-# CONFIG_MTD_JEDECPROBE is not set
-CONFIG_MTD_GEN_PROBE=y
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_CFI_INTELEXT=y
-# CONFIG_MTD_CFI_AMDSTD is not set
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-# CONFIG_MTD_ABSENT is not set
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-# CONFIG_MTD_AMDSTD is not set
-# CONFIG_MTD_SHARP is not set
-# CONFIG_MTD_JEDEC is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_NORA is not set
-# CONFIG_MTD_ARM_INTEGRATOR is not set
-# CONFIG_MTD_CDB89712 is not set
-# CONFIG_MTD_SA1100 is not set
-# CONFIG_MTD_DC21285 is not set
-# CONFIG_MTD_IQ80310 is not set
-CONFIG_MTD_ADI_EVB=y
-# CONFIG_MTD_PCI is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLKMTD is not set
-# CONFIG_MTD_DOC1000 is not set
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOCPROBE is not set
-
-#
-# NAND Flash Device Drivers
-#
-# CONFIG_MTD_NAND is not set
-
-#
-# Plug and Play configuration
-#
-# CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_CISS_SCSI_TAPE is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_LOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_BLK_DEV_INITRD=y
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-# CONFIG_PACKET is not set
-CONFIG_NETLINK=y
-CONFIG_RTNETLINK=y
-# CONFIG_NETLINK_DEV is not set
-# CONFIG_NETFILTER is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
-CONFIG_IP_PNP_BOOTP=y
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_INET_ECN is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
-# CONFIG_ETHERTAP is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-# CONFIG_ARM_AM79C961A is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
-# CONFIG_SHAPER is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Input core support
-#
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
-
-#
-# Character devices
-#
-# CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
-# CONFIG_SERIAL_NONSTANDARD is not set
-
-#
-# Serial drivers
-#
-# CONFIG_SERIAL_AMBA is not set
-# CONFIG_SERIAL_AMBA_CONSOLE is not set
-# CONFIG_SERIAL_CLPS711X is not set
-# CONFIG_SERIAL_CLPS711X_CONSOLE is not set
-# CONFIG_SERIAL_21285 is not set
-# CONFIG_SERIAL_21285_OLD is not set
-# CONFIG_SERIAL_21285_CONSOLE is not set
-# CONFIG_SERIAL_UART00 is not set
-# CONFIG_SERIAL_UART00_CONSOLE is not set
-# CONFIG_SERIAL_SA1100 is not set
-# CONFIG_SERIAL_SA1100_CONSOLE is not set
-# CONFIG_SERIAL_8250 is not set
-# CONFIG_SERIAL_8250_CONSOLE is not set
-# CONFIG_SERIAL_8250_EXTENDED is not set
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-# CONFIG_SERIAL_8250_SHARE_IRQ is not set
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-# CONFIG_SERIAL_8250_MULTIPORT is not set
-# CONFIG_SERIAL_8250_HUB6 is not set
-CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
-
-#
-# I2C support
-#
-# CONFIG_I2C is not set
-
-#
-# L3 serial bus support
-#
-# CONFIG_L3 is not set
-# CONFIG_L3_ALGOBIT is not set
-# CONFIG_L3_BIT_SA1100_GPIO is not set
-# CONFIG_L3_SA1111 is not set
-# CONFIG_BIT_SA1100_GPIO is not set
-
-#
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_GAMEPORT is not set
-# CONFIG_QIC02_TAPE is not set
-
-#
-# Watchdog Cards
-#
-# CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
-# CONFIG_NVRAM is not set
-# CONFIG_RTC is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-# CONFIG_AGP is not set
-# CONFIG_DRM is not set
-
-#
-# Multimedia devices
-#
-# CONFIG_VIDEO_DEV is not set
-
-#
-# File systems
-#
-# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-# CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_CMS_FS is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
-# CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=y
-CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_CRAMFS is not set
-# CONFIG_TMPFS is not set
-CONFIG_RAMFS=y
-# CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_FREEVXFS_FS is not set
-# CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-# CONFIG_HPFS_FS is not set
-CONFIG_PROC_FS=y
-# CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
-CONFIG_DEVPTS_FS=y
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_EXT2_FS=y
-# CONFIG_SYSV_FS is not set
-# CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
-# CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-# CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
-# CONFIG_NFS_FS is not set
-# CONFIG_NFS_V3 is not set
-# CONFIG_ROOT_NFS is not set
-# CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
-# CONFIG_SUNRPC is not set
-# CONFIG_LOCKD is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-# CONFIG_OSF_PARTITION is not set
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-# CONFIG_MAC_PARTITION is not set
-# CONFIG_MSDOS_PARTITION is not set
-# CONFIG_LDM_PARTITION is not set
-# CONFIG_SGI_PARTITION is not set
-# CONFIG_ULTRIX_PARTITION is not set
-# CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
-
-#
-# Multimedia Capabilities Port drivers
-#
-# CONFIG_MCP is not set
-# CONFIG_MCP_SA1100 is not set
-# CONFIG_MCP_UCB1200 is not set
-# CONFIG_MCP_UCB1200_AUDIO is not set
-# CONFIG_MCP_UCB1200_TS is not set
-
-#
-# USB support
-#
-# CONFIG_USB is not set
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-# CONFIG_USB_OHCI_SA1111 is not set
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_USS720 is not set
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_ID75 is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
-
-#
-# Kernel hacking
-#
-CONFIG_FRAME_POINTER=y
-CONFIG_DEBUG_ERRORS=y
-CONFIG_DEBUG_USER=y
-# CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_SLAB=y
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_NO_PGT_CACHE is not set
-CONFIG_DEBUG_LL=y
-# CONFIG_DEBUG_DC21285_PORT is not set
-# CONFIG_DEBUG_CLPS711X_UART2 is not set
--- diff/arch/arm/kernel/time-acorn.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/kernel/time-acorn.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,66 +0,0 @@
-/*
- *  linux/arch/arm/kernel/time-acorn.c
- *
- *  Copyright (c) 1996-2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Changelog:
- *   24-Sep-1996	RMK	Created
- *   10-Oct-1996	RMK	Brought up to date with arch-sa110eval
- *   04-Dec-1997	RMK	Updated for new arch/arm/time.c
- */
-#include <linux/timex.h>
-#include <linux/init.h>
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/hardware/ioc.h>
-
-extern unsigned long (*gettimeoffset)(void);
-
-static unsigned long ioctime_gettimeoffset(void)
-{
-	unsigned int count1, count2, status;
-	long offset;
-
-	ioc_writeb (0, IOC_T0LATCH);
-	barrier ();
-	count1 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
-	barrier ();
-	status = ioc_readb(IOC_IRQREQA);
-	barrier ();
-	ioc_writeb (0, IOC_T0LATCH);
-	barrier ();
-	count2 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
-
-	offset = count2;
-	if (count2 < count1) {
-		/*
-		 * We have not had an interrupt between reading count1
-		 * and count2.
-		 */
-		if (status & (1 << 5))
-			offset -= LATCH;
-	} else if (count2 > count1) {
-		/*
-		 * We have just had another interrupt between reading
-		 * count1 and count2.
-		 */
-		offset -= LATCH;
-	}
-
-	offset = (LATCH - offset) * (tick_nsec / 1000);
-	return (offset + LATCH/2) / LATCH;
-}
-
-void __init ioctime_init(void)
-{
-	ioc_writeb(LATCH & 255, IOC_T0LTCHL);
-	ioc_writeb(LATCH >> 8, IOC_T0LTCHH);
-	ioc_writeb(0, IOC_T0GO);
-
-	gettimeoffset = ioctime_gettimeoffset;
-}
--- diff/arch/arm/mach-adifcc/Makefile	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-adifcc/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y			:= arch.o irq.o mm.o
-obj-m			:=
-obj-n			:=
-obj-			:=
-
--- diff/arch/arm/mach-adifcc/arch.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-adifcc/arch.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-/*
- *  linux/arch/arm/mach-adifcc/arch.c
- *
- *  Copyright (C) 2001 MontaVista Software, Inc.
- *
- * 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/init.h>
-#include <linux/major.h>
-#include <linux/fs.h>
-
-#include <asm/setup.h>
-#include <asm/memory.h>
-#include <asm/hardware.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-extern void adifcc_map_io(void);
-extern void adifcc_init_irq(void);
-
-#ifdef CONFIG_ARCH_ADI_EVB
-MACHINE_START(ADI_EVB, "ADI 80200FCC Evaluation Board")
-	MAINTAINER("MontaVista Software Inc.")
-	BOOT_MEM(0xc0000000, 0x00400000, 0xff400000)
-	MAPIO(adifcc_map_io)
-	INITIRQ(adifcc_init_irq)
-MACHINE_END
-#endif
-
--- diff/arch/arm/mach-adifcc/irq.c	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/arm/mach-adifcc/irq.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,61 +0,0 @@
-/*
- * linux/arch/arm/mach-xscale/irq.c
- *
- * Author:  Deepak Saxena
- * Copyright:   (C) 2001 MontaVista Software Inc.
- *
- * 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.
- *
- * Based on IOP80310 code.  Currently there's nothing more than the
- * 80200 on chip interrupts. That'll change once the hardware adds
- * support for PCI though.
- */
-#include <linux/init.h>
-#include <linux/interrupt.h>
-
-#include <asm/mach/irq.h>
-#include <asm/irq.h>
-#include <asm/hardware.h>
-
-static void xs80200_irq_mask (unsigned int irq)
-{
-	long INTCTL;
-	asm ("mrc p13, 0, %0, c0, c0, 0" : "=r" (INTCTL));
-	switch (irq) {
-	    case IRQ_XS80200_BCU:     INTCTL &= ~(1<<3); break;
-	    case IRQ_XS80200_PMU:     INTCTL &= ~(1<<2); break;
-	    case IRQ_XS80200_EXTIRQ:  INTCTL &= ~(1<<1); break;
-	    case IRQ_XS80200_EXTFIQ:  INTCTL &= ~(1<<0); break;
-	}
-	asm ("mcr p13, 0, %0, c0, c0, 0" : : "r" (INTCTL));
-}
-
-static void xs80200_irq_unmask (unsigned int irq)
-{
-	long INTCTL;
-	asm ("mrc p13, 0, %0, c0, c0, 0" : "=r" (INTCTL));
-	switch (irq) {
-	    case IRQ_XS80200_BCU:	INTCTL |= (1<<3); break;
-	    case IRQ_XS80200_PMU:	INTCTL |= (1<<2); break;
-	    case IRQ_XS80200_EXTIRQ:	INTCTL |= (1<<1); break;
-	    case IRQ_XS80200_EXTFIQ:	INTCTL |= (1<<0); break;
-	}
-	asm ("mcr p13, 0, %0, c0, c0, 0" : : "r" (INTCTL));
-}
-
-void __init adifcc_init_irq(void)
-{
-	int i;
-
-	for (i = 0; i < NR_XS80200_IRQS; i++) {
-		irq_desc[i].valid	= 1;
-		irq_desc[i].probe_ok	= 0;
-		irq_desc[i].mask_ack	= xs80200_irq_mask;
-		irq_desc[i].mask	= xs80200_irq_mask;
-		irq_desc[i].unmask	= xs80200_irq_unmask;
-	}
-}
-
-
--- diff/arch/arm/mach-adifcc/mm.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-adifcc/mm.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-/*
- *  linux/arch/arm/mach-xscale/mm.c
- */
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/init.h>
-
-#include <asm/io.h>
-#include <asm/pgtable.h>
-#include <asm/page.h>
-
-#include <asm/mach/map.h>
-
-
-static struct map_desc adifcc_io_desc[] __initdata = {
- /* on-board devices */
- { 0xff400000,   0x00400000,   0x00300000,   MT_DEVICE }
-};
-
-void __init adifcc_map_io(void)
-{
-	iotable_init(adifcc_io_desc, ARRAY_SIZE(adifcc_io_desc));
-}
--- diff/arch/arm/mach-ftvpci/Makefile	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-ftvpci/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y			:= core.o
-obj-m			:=
-obj-n			:=
-obj-			:=
-
-obj-$(CONFIG_PCI)	+= pci.o
-obj-$(CONFIG_LEDS)	+= leds.o
--- diff/arch/arm/mach-ftvpci/core.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-ftvpci/core.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,96 +0,0 @@
-/*
- *  linux/arch/arm/mach-ftvpci/core.c
- *
- *  Architecture specific fixups.
- *
- * 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.
- */
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/init.h>
-
-#include <asm/setup.h>
-#include <asm/mach-types.h>
-
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-#include <asm/irq.h>
-#include <asm/io.h>
-#include <asm/pgtable.h>
-#include <asm/page.h>
-
-extern unsigned long soft_irq_mask;
-
-static const unsigned char irq_cmd[] =
-{
-	INTCONT_IRQ_DUART,
-	INTCONT_IRQ_PLX,
-	INTCONT_IRQ_D,
-	INTCONT_IRQ_C,
-	INTCONT_IRQ_B,
-	INTCONT_IRQ_A,
-	INTCONT_IRQ_SYSERR
-};
-
-static void ftvpci_mask_irq(unsigned int irq)
-{
-	__raw_writel(irq_cmd[irq], INTCONT_BASE);
-	soft_irq_mask &= ~(1<<irq);
-}
-
-static void ftvpci_unmask_irq(unsigned int irq)
-{
-	soft_irq_mask |= (1<<irq);
-	__raw_writel(irq_cmd[irq] | 1, INTCONT_BASE);
-}
- 
-static void __init ftvpci_init_irq(void)
-{
-	unsigned int i;
-
-	/* Mask all FIQs */
-	__raw_writel(INTCONT_FIQ_PLX, INTCONT_BASE);
-	__raw_writel(INTCONT_FIQ_D, INTCONT_BASE);
-	__raw_writel(INTCONT_FIQ_C, INTCONT_BASE);
-	__raw_writel(INTCONT_FIQ_B, INTCONT_BASE);
-	__raw_writel(INTCONT_FIQ_A, INTCONT_BASE);
-	__raw_writel(INTCONT_FIQ_SYSERR, INTCONT_BASE);
-
-	/* Disable all interrupts initially. */
-	for (i = 0; i < NR_IRQS; i++) {
-		if (i >= FIRST_IRQ && i <= LAST_IRQ) {
-			irq_desc[i].valid	= 1;
-			irq_desc[i].probe_ok	= 1;
-			irq_desc[i].mask_ack	= ftvpci_mask_irq;
-			irq_desc[i].mask	= ftvpci_mask_irq;
-			irq_desc[i].unmask	= ftvpci_unmask_irq;
-			ftvpci_mask_irq(i);
-		} else {
-			irq_desc[i].valid	= 0;
-			irq_desc[i].probe_ok	= 0;
-		}	
-	}		
-}
-
-static struct map_desc ftvpci_io_desc[] __initdata = {
- 	{ INTCONT_BASE,	INTCONT_START,	0x00001000, MT_DEVICE },
- 	{ PLX_BASE,	PLX_START,	0x00001000, MT_DEVICE },
- 	{ PCIO_BASE,	PLX_IO_START,	0x00100000, MT_DEVICE },
- 	{ DUART_BASE,	DUART_START,	0x00001000, MT_DEVICE },
-	{ STATUS_BASE,	STATUS_START,	0x00001000, MT_DEVICE }
-};
-
-static void __init ftvpci_map_io(void)
-{
-	iotable_init(ftvpci_io_desc, ARRAY_SIZE(ftvpci_io_desc));
-}
-
-MACHINE_START(NEXUSPCI, "FTV/PCI")
-	MAINTAINER("Philip Blundell")
-	BOOT_MEM(0x40000000, 0x10000000, 0xe0000000)
-	MAPIO(ftvpci_map_io)
-	INITIRQ(ftvpci_init_irq)
-MACHINE_END
--- diff/arch/arm/mach-ftvpci/leds.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-ftvpci/leds.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,36 +0,0 @@
-/*
- *  linux/arch/arm/kernel/leds-ftvpci.c
- *
- *  Copyright (C) 1999 FutureTV Labs Ltd
- */
-
-#include <linux/module.h>
-#include <linux/init.h>
-
-#include <asm/hardware.h>
-#include <asm/leds.h>
-#include <asm/system.h>
-#include <asm/io.h>
-
-static void ftvpci_leds_event(led_event_t ledevt)
-{
-	static int led_state = 0;
-
-	switch(ledevt) {
-	case led_timer:
-		led_state ^= 1;
-		raw_writeb(0x1a | led_state, INTCONT_BASE);
-		break;
-
-	default:
-		break;
-	}
-}
-
-static int __init ftvpci_leds_init(void)
-{
-	leds_event = ftvpci_leds_event;
-	return 0;
-}
-
-arch_initcall(ftvpci_leds_init);
--- diff/arch/arm/mach-ftvpci/pci.c	2004-05-19 22:10:55.000000000 +0100
+++ source/arch/arm/mach-ftvpci/pci.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,60 +0,0 @@
-/*
- *  linux/arch/arm/kernel/ftv-pci.c
- *
- *  PCI bios-type initialisation for PCI machines
- *
- *  Bits taken from various places.
- */
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/init.h>
-
-#include <asm/irq.h>
-#include <asm/mach/pci.h>
-#include <asm/mach-types.h>
-
-/*
- * Owing to a PCB cockup, issue A backplanes are wired thus:
- *
- * Slot 1    2    3    4    5   Bridge   S1    S2    S3    S4
- * IRQ  D    C    B    A    A            C     B     A     D
- *      A    D    C    B    B            D     C     B     A
- *      B    A    D    C    C            A     D     C     B
- *      C    B    A    D    D            B     A     D     C
- *
- * ID A31  A30  A29  A28  A27   A26      DEV4  DEV5  DEV6  DEV7
- *
- * Actually, this isn't too bad, because with the processor card
- * in slot 5 on the primary bus, the IRQs rotate on both sides
- * as you'd expect.
- */
-
-static int irqmap_ftv[] __initdata = { IRQ_PCI_D, IRQ_PCI_C, IRQ_PCI_B, IRQ_PCI_A };
-
-static int __init ftv_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
-{
-	if (slot > 0x10)
-		slot--;
-	return irqmap_ftv[(slot - pin) & 3];
-}
-
-static u8 __init ftv_swizzle(struct pci_dev *dev, u8 *pin)
-{
-	return PCI_SLOT(dev->devfn);
-}
-
-/* ftv host-specific stuff */
-static struct hw_pci ftv_pci __initdata = {
-	.init		= plx90x0_init,
-	.swizzle	= ftv_swizzle,
-	.map_irq	= ftv_map_irq,
-};
-
-static int __init ftv_pci_init(void)
-{
-	if (machine_is_ftvpci())
-		pci_common_init(&ftv_pci);
-	return 0;
-}
-
-subsys_initcall(ftv_pci_init);
--- diff/arch/arm/mach-tbox/Makefile	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-tbox/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y			:= core.o
-obj-m			:=
-obj-n			:=
-obj-			:=
-
--- diff/arch/arm/mach-tbox/core.c	2004-05-19 22:10:57.000000000 +0100
+++ source/arch/arm/mach-tbox/core.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,73 +0,0 @@
-/*
- *  linux/arch/arm/mm/mm-tbox.c
- *
- *  Copyright (C) 1998, 1999, 2000 Phil Blundell
- *  Copyright (C) 1998-1999 Russell King
- *
- *  Extra MM routines for the Tbox architecture
- */
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/init.h>
-
-#include <asm/elf.h>
-#include <asm/setup.h>
-#include <asm/mach-types.h>
-#include <asm/io.h>
-#include <asm/pgtable.h>
-#include <asm/page.h>
-
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-
-extern unsigned long soft_irq_mask;
-
-static void tbox_mask_irq(unsigned int irq)
-{
-	__raw_writel(0, INTCONT + (irq << 2));
-	soft_irq_mask &= ~(1<<irq);
-}
-
-static void tbox_unmask_irq(unsigned int irq)
-{
-	soft_irq_mask |= (1<<irq);
-	__raw_writel(1, INTCONT + (irq << 2));
-}
- 
-static void tbox_init_irq(void)
-{
-	unsigned int i;
-
-	/* Disable all interrupts initially. */
-	for (i = 0; i < NR_IRQS; i++) {
-		if (i <= 10 || (i >= 12 && i <= 13)) {
-			irq_desc[i].valid	= 1;
-			irq_desc[i].probe_ok	= 0;
-			irq_desc[i].mask_ack	= tbox_mask_irq;
-			irq_desc[i].mask	= tbox_mask_irq;
-			irq_desc[i].unmask	= tbox_unmask_irq;
-			tbox_mask_irq(i);
-		} else {
-			irq_desc[i].valid	= 0;
-			irq_desc[i].probe_ok	= 0;
-		}
-	}
-}
-
-static struct map_desc tbox_io_desc[] __initdata = {
-	/* See hardware.h for details */
-	{ IO_BASE,	IO_START,	0x00100000, MT_DEVICE }
-};
-
-static void __init tbox_map_io(void)
-{
-	iotable_init(tbox_io_desc, ARRAY_SIZE(tbox_io_desc));
-}
-
-MACHINE_START(TBOX, "unknown-TBOX")
-	MAINTAINER("Philip Blundell")
-	BOOT_MEM(0x80000000, 0x00400000, 0xe0000000)
-	MAPIO(tbox_map_io)
-	INITIRQ(tbox_init_irq)
-MACHINE_END
-
--- diff/arch/i386/boot98/Makefile	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/boot98/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,102 +0,0 @@
-#
-# arch/i386/boot/Makefile
-#
-# This file is subject to the terms and conditions of the GNU General Public
-# License.  See the file "COPYING" in the main directory of this archive
-# for more details.
-#
-# Copyright (C) 1994 by Linus Torvalds
-#
-
-# ROOT_DEV specifies the default root-device when making the image.
-# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
-# the default of FLOPPY is used by 'build'.
-
-ROOT_DEV := CURRENT
-
-# If you want to preset the SVGA mode, uncomment the next line and
-# set SVGA_MODE to whatever number you want.
-# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
-# The number is the same as you would ordinarily press at bootup.
-
-SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
-
-# If you want the RAM disk device, define this to be the size in blocks.
-
-#RAMDISK := -DRAMDISK=512
-
-targets		:= vmlinux.bin bootsect bootsect.o setup setup.o \
-		   zImage bzImage
-subdir- 	:= compressed
-
-host-progs	:= tools/build
-
-# ---------------------------------------------------------------------------
-
-$(obj)/zImage:  IMAGE_OFFSET := 0x1000
-$(obj)/zImage:  EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK)
-$(obj)/bzImage: IMAGE_OFFSET := 0x100000
-$(obj)/bzImage: EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
-$(obj)/bzImage: BUILDFLAGS   := -b
-
-quiet_cmd_image = BUILD   $@
-cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \
-	    $(obj)/vmlinux.bin $(ROOT_DEV) > $@
-
-$(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \
-			      $(obj)/vmlinux.bin $(obj)/tools/build FORCE
-	$(call if_changed,image)
-	@echo 'Kernel: $@ is ready'
-
-$(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
-	$(call if_changed,objcopy)
-
-LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary
-LDFLAGS_setup	 := -Ttext 0x0 -s --oformat binary -e begtext
-
-$(obj)/setup $(obj)/bootsect: %: %.o FORCE
-	$(call if_changed,ld)
-
-$(obj)/compressed/vmlinux: FORCE
-	$(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
-
-# Set this if you want to pass append arguments to the zdisk/fdimage kernel
-FDARGS = 
-
-$(obj)/mtools.conf: $(src)/mtools.conf.in
-	sed -e 's|@OBJ@|$(obj)|g' < $< > $@
-
-# This requires write access to /dev/fd0
-zdisk: $(BOOTIMAGE) $(obj)/mtools.conf
-	MTOOLSRC=$(obj)/mtools.conf mformat a:			; sync
-	syslinux /dev/fd0					; sync
-	echo 'default linux $(FDARGS)' | \
-		MTOOLSRC=$(src)/mtools.conf mcopy - a:syslinux.cfg
-	MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) a:linux	; sync
-
-# These require being root or having syslinux 2.02 or higher installed
-fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf
-	dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440
-	MTOOLSRC=$(obj)/mtools.conf mformat v:			; sync
-	syslinux $(obj)/fdimage					; sync
-	echo 'default linux $(FDARGS)' | \
-		MTOOLSRC=$(obj)/mtools.conf mcopy - v:syslinux.cfg
-	MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) v:linux	; sync
-
-fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf
-	dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880
-	MTOOLSRC=$(obj)/mtools.conf mformat w:			; sync
-	syslinux $(obj)/fdimage					; sync
-	echo 'default linux $(FDARGS)' | \
-		MTOOLSRC=$(obj)/mtools.conf mcopy - w:syslinux.cfg
-	MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) w:linux	; sync
-
-zlilo: $(BOOTIMAGE)
-	if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi
-	if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
-	cat $(BOOTIMAGE) > $(INSTALL_PATH)/vmlinuz
-	cp System.map $(INSTALL_PATH)/
-	if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
-
-install: $(BOOTIMAGE)
-	sh $(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
--- diff/arch/i386/boot98/bootsect.S	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/boot98/bootsect.S	1970-01-01 01:00:00.000000000 +0100
@@ -1,397 +0,0 @@
-/*	
- *	bootsect.S - boot sector for NEC PC-9800 series
- *
- *	Linux/98 project at Kyoto University Microcomputer Club (KMC)
- *		    FUJITA Norimasa, TAKAI Kousuke  1997-1998
- *	rewritten by TAKAI Kousuke (as86 -> gas), Nov 1999
- *
- * Based on:
- *	bootsect.S		Copyright (C) 1991, 1992 Linus Torvalds
- *	modified by Drew Eckhardt
- *	modified by Bruce Evans (bde)
- *
- * bootsect.S is loaded at 0x1FC00 or 0x1FE00 by the bios-startup routines,
- * and moves itself out of the way to address 0x90000, and jumps there.
- *
- * It then loads 'setup' directly after itself (0x90200), and the system
- * at 0x10000, using BIOS interrupts. 
- *
- * NOTE! currently system is at most (8*65536-4096) bytes long. This should 
- * be no problem, even in the future. I want to keep it simple. This 508 kB
- * kernel size should be enough, especially as this doesn't contain the
- * buffer cache as in minix (and especially now that the kernel is 
- * compressed :-)
- *
- * The loader has been made as simple as possible, and continuous
- * read errors will result in a unbreakable loop. Reboot by hand. It
- * loads pretty fast by getting whole tracks at a time whenever possible.
- */
-
-#include <linux/config.h>		/* for CONFIG_ROOT_RDONLY */
-#include <asm/boot.h>
-
-SETUPSECTS	= 4			/* default nr of setup-sectors */
-BOOTSEG		= 0x1FC0		/* original address of boot-sector */
-INITSEG		= DEF_INITSEG		/* we move boot here - out of the way */
-SETUPSEG	= DEF_SETUPSEG		/* setup starts here */
-SYSSEG		= DEF_SYSSEG		/* system loaded at 0x10000 (65536) */
-SYSSIZE		= DEF_SYSSIZE		/* system size: # of 16-byte clicks */
-					/* to be loaded */
-ROOT_DEV	= 0 			/* ROOT_DEV is now written by "build" */
-SWAP_DEV	= 0			/* SWAP_DEV is now written by "build" */
-
-#ifndef SVGA_MODE
-#define SVGA_MODE ASK_VGA
-#endif
-
-#ifndef RAMDISK
-#define RAMDISK 0
-#endif 
-
-#ifndef ROOT_RDONLY
-#define ROOT_RDONLY 1
-#endif
-
-/* normal/hireso text VRAM segments */
-#define NORMAL_TEXT	0xa000
-#define HIRESO_TEXT	0xe000
-
-/* bios work area addresses */
-#define EXPMMSZ		0x0401
-#define BIOS_FLAG	0x0501
-#define	DISK_BOOT	0x0584
-
-.code16
-.text
-
-.global _start
-_start:
-
-#if 0 /* hook for debugger, harmless unless BIOS is fussy (old HP) */
-	int	$0x3
-#endif
-	jmp	real_start
-	.ascii	"Linux 98"
-	.word	0
-real_start:
-	xorw	%di, %di		/* %di = 0 */
-	movw	%di, %ss		/* %ss = 0 */
-	movw	$0x03F0, %sp
-	pushw	%cx			/* for hint */
-
-	movw	$0x0A00, %ax		/* normal mode defaults (80x25) */
-
-	testb	$0x08, %ss:BIOS_FLAG	/* check hi-reso bit */
-	jnz	set_crt_mode
-/*
- * Hi-Reso (high-resolution) machine.
- *
- * Some hi-reso machines have no RAMs on bank 8/A (0x080000 - 0x0BFFFF).
- * On such machines we get two RAM banks from top of protect menory and
- * map them on bank 8/A.
- * These work-around must be done before moving myself on INITSEG (0x090000-).
- */
-	movw	$(HIRESO_TEXT >> 8), %cs:(vram + 1)	/* text VRAM segment */
-
-	/* set memory window */
-	movb	$0x08, %al
-	outb	%al, $0x91		/* map native RAM (if any) */
-	movb	$0x0A, %al
-	outb	%al, $0x93
-
-	/* check bank ram A */
-	pushw	$0xA500
-	popw	%ds
-	movw	(%di), %cx		/* %si == 0 from entry */
-	notw	%cx
-	movw	%cx, (%di)
-
-	movw	$0x43F, %dx		/* cache flush for 486 and up. */
-	movb	$0xA0, %al
-	outb	%al, %dx
-	
-	cmpw	%cx, (%di)
-	je	hireso_done
-
-	/* 
-	 * Write test failed; we have no native RAM on 080000h - 0BFFFFh.
-	 * Take 256KB of RAM from top of protected memory.
-	 */
-	movb	%ss:EXPMMSZ, %al
-	subb	$2, %al			/* reduce 2 x 128KB */
-	movb	%al, %ss:EXPMMSZ
-	addb	%al, %al
-	addb	$0x10, %al
-	outb	%al, $0x91
-	addb	$2, %al
-	outb	%al, $0x93
-
-hireso_done:
-	movb	$0x10, %al		/* CRT mode 80x31, %ah still 0Ah */
-
-set_crt_mode:
-	int	$0x18			/* set CRT mode */
-
-	movb	$0x0C, %ah		/* turn on text displaying */
-	int	$0x18
-
-	xorw	%dx, %dx		/* position cursor to home */
-	movb	$0x13, %ah
-	int	$0x18
-
-	movb	$0x11, %ah		/* turn cursor displaying on */
-	int	$0x18
-
-	/* move 1 kilobytes from [BOOTSEG:0000h] to [INITSEG:0000h] */
-	cld
-	xorw	%si, %si
-	pushw	$INITSEG
-	popw	%es
-	movw	$512, %cx		/* %di == 0 from entry */
-	rep
-	cs
-	movsw
-
-	ljmp	$INITSEG, $go
-
-go:
-	pushw	%cs
-	popw	%ds		/* %ds = %cs */
-
-	popw	%dx		/* %dh = saved %ch passed from BIOS */
-	movb	%ss:DISK_BOOT, %al
-	andb	$0xf0, %al	/* %al = Device Address */
-	movb	$18, %ch	/* 18 secs/track,  512 b/sec (1440 KB) */
-	cmpb	$0x30, %al
-	je	try512
-	cmpb	$0x90, %al	/* 1 MB I/F, 1 MB floppy */
-	je	try1.2M
-	cmpb	$0xf0, %al	/* 640 KB I/F, 1 MB floppy */
-	je	try1.2M
-	movb	$9, %ch		/*  9 secs/track,  512 b/sec ( 720 KB) */
-	cmpb	$0x10, %al	/* 1 MB I/F, 640 KB floppy */
-	je	try512
-	cmpb	$0x70, %al	/* 640 KB I/F, 640 KB floppy */
-	jne	error		/* unknown device? */
-
-	/* XXX: Does it make sense to support 8 secs/track, 512 b/sec 
-		(640 KB) floppy? */
-
-try512:	movb	$2, %cl		/* 512 b/sec */
-lasttry:call	tryload
-/*
- * Display error message and halt
- */
-error:	movw	$error_msg, %si
-	call	print
-wait_reboot:
-	movb	$0x0, %ah
-	int	$0x18			/* wait keyboard input */
-1:	movb	$0, %al
-	outb	%al, $0xF0		/* reset CPU */
-	jmp	1b			/* just in case... */
-
-try1.2M:cmpb	$2, %dh
-	je	try2HC
-	movw	$0x0803, %cx	/*  8 secs/track, 1024 b/sec (1232 KB) */
-	call	tryload
-	movb	$15, %ch	/* 15 secs/track,  512 b/sec (1200 KB) */
-	jmp	try512
-try2HC:	movw	$0x0F02, %cx	/* 15 secs/track,  512 b/sec (1200 KB) */
-	call	tryload
-	movw	$0x0803, %cx	/*  8 secs/track, 1024 b/sec (1232 KB) */
-	jmp	lasttry
-
-/*
- * Try to load SETUP and SYSTEM provided geometry information in %cx.
- * This routine *will not* return on successful load...
- */
-tryload:
-	movw	%cx, sectlen
-	movb	%ss:DISK_BOOT, %al
-	movb	$0x7, %ah		/* recalibrate the drive */
-	int	$0x1b
-	jc	error			/* recalibration should succeed */
-
-	/*
-	 * Load SETUP into memory. It is assumed that SETUP fits into
-	 * first cylinder (2 tracks, 9KB on 2DD, 15-18KB on 2HD).
-	 */
-	movb	$0, %bl
-	movb	setup_sects, %bh
-	incb	%bh
-	shlw	%bx			/* %bx = (setup_sects + 1) * 512 */
-	movw	$128, %bp
-	shlw	%cl, %bp		/* %bp = <sector size> */
-	subw	%bp, %bx		/* length to load */
-	movw	$0x0002, %dx		/* head 0, sector 2 */
-	movb	%cl, %ch		/* `N' for sector address */
-	movb	$0, %cl			/* cylinder 0 */
-	pushw	%cs
-	popw	%es			/* %es = %cs (= INITSEG) */
-	movb	$0xd6, %ah		/* read, multi-track, MFM */
-	int	$0x1b			/* load it! */
-	jc	read_error
-
-	movw	$loading_msg, %si
-	call	print
-
-	movw	$SYSSEG, %ax
-	movw	%ax, %es		/* %es = SYSSEG */
-
-/*
- * This routine loads the system at address 0x10000, making sure
- * no 64kB boundaries are crossed. We try to load it as fast as
- * possible, loading whole tracks whenever we can.
- *
- * in:	es - starting address segment (normally 0x1000)
- */
-	movb	%ch, %cl
-	addb	$7, %cl			/* %cl = log2 <sector_size> */
-	shrw	%cl, %bx		/* %bx = # of phys. sectors in SETUP */
-	addb	%bl, %dl		/* %dl = start sector # of SYSTEM */
-	decb	%dl			/* %dl is 0-based in below loop */
-
-rp_read_newseg:
-	xorw	%bp, %bp		/* = starting address within segment */
-#ifdef __BIG_KERNEL__
-	bootsect_kludge = 0x220		/* 0x200 (size of bootsector) + 0x20 (offset */
-	lcall	*bootsect_kludge	/* of bootsect_kludge in setup.S */
-#else
-	movw	%es, %ax
-	subw	$SYSSEG, %ax
-#endif
-	cmpw	syssize, %ax
-	ja	boot			/* done! */
-
-rp_read:
-	movb	sectors, %al
-	addb	%al, %al
-	movb	%al, %ch		/* # of sectors on both surface */
-	subb	%dl, %al		/* # of sectors left on this track */
-	movb	$0, %ah
-	shlw	%cl, %ax		/* # of bytes left on this track */
-	movw	%ax, %bx		/* transfer length */
-	addw	%bp, %ax		/* cross 64K boundary? */
-	jnc	1f			/* ok. */
-	jz	1f			/* also ok. */
-	/*
-	 * Oops, we are crossing 64K boundary...
-	 * Adjust transfer length to make transfer fit in the boundary.
-	 *
-	 * Note: sector size is assumed to be a measure of 65536.
-	 */
-	xorw	%bx, %bx
-	subw	%bp, %bx
-1:	pushw	%dx
-	movw	$dot_msg, %si		/* give progress message */
-	call	print
-	xchgw	%ax, %dx
-	movb	$0, %ah
-	divb	sectors
-	xchgb	%al, %ah
-	xchgw	%ax, %dx		/* %dh = head # / %dl = sector # */
-	incb	%dl			/* fix %dl to 1-based */
-	pushw	%cx
-	movw	cylinder, %cx
-	movb	$0xd6, %ah		/* read, multi-track, seek, MFM */
-	movb	%ss:DISK_BOOT, %al
-	int	$0x1b
-	popw	%cx
-	popw	%dx
-	jc	read_error
-	movw	%bx, %ax		/* # of bytes just read */
-	shrw	%cl, %ax		/* %ax = # of sectors just read */
-	addb	%al, %dl		/* advance sector # */
-	cmpb	%ch, %dl		/* %ch = # of sectors/cylinder */
-	jb	2f
-	incb	cylinder		/* next cylinder */
-	xorb	%dl, %dl		/* sector 0 */
-2:	addw	%bx, %bp		/* advance offset pointer */
-	jnc	rp_read
-	/* offset pointer wrapped; advance segment pointer. */
-	movw	%es, %ax
-	addw	$0x1000, %ax
-	movw	%ax, %es
-	jmp	rp_read_newseg
-
-read_error:
-	ret
-
-boot:	movw	%cs, %ax		/* = INITSEG */
-	/* movw	%ax, %ds */
-	movw	%ax, %ss
-	movw	$0x4000, %sp		/* 0x4000 is arbitrary value >=
-					 * length of bootsect + length of
-					 * setup + room for stack;
-					 * PC-9800 never have BIOS workareas
-					 * on high memory.
-					 */
-/*
- * After that we check which root-device to use. If the device is
- * not defined, /dev/fd0 (2, 0) will be used.
- */
-	cmpw	$0, root_dev
-	jne	3f
-	movb	$2, root_dev+1
-3:
-
-/*
- * After that (everything loaded), we jump to the setup-routine
- * loaded directly after the bootblock:
- */
-	ljmp	$SETUPSEG, $0
-
-/*
- * Subroutine for print string on console.
- *	%cs:%si	- pointer to message
- */
-print:
-	pushaw
-	pushw	%ds
-	pushw	%es
-	pushw	%cs
-	popw	%ds
-	lesw	curpos, %di		/* %es:%di = current text VRAM addr. */
-1:	xorw	%ax, %ax
-	lodsb
-	testb	%al, %al
-	jz	2f			/* end of string */
-	stosw					/* character code */
-	movb	$0xE1, %es:0x2000-2(%di)	/* character attribute */
-	jmp	1b
-2:	movw	%di, %dx
-	movb	$0x13, %ah
-	int	$0x18			/* move cursor to current point */
-	popw	%es
-	popw	%ds
-	popaw
-	ret
-
-loading_msg:
-	.string	"Loading"
-dot_msg:
-	.string	"."
-error_msg:
-	.string	"Read Error!"
-
-	.org	490
-
-curpos:	.word	160		/* current cursor position */
-vram:	.word	NORMAL_TEXT	/* text VRAM segment */
-
-cylinder:	.byte	0	/* current cylinder (lower byte)	*/
-sectlen:	.byte	0	/* (log2 of <sector size>) - 7		*/
-sectors:	.byte	0x0F	/* default is 2HD (15 sector/track)	*/
-
-# XXX: This is a fairly snug fit.
-
-.org 497
-setup_sects:	.byte SETUPSECTS
-root_flags:	.word ROOT_RDONLY
-syssize:	.word SYSSIZE
-swap_dev:	.word SWAP_DEV
-ram_size:	.word RAMDISK
-vid_mode:	.word SVGA_MODE
-root_dev:	.word ROOT_DEV
-boot_flag:	.word 0xAA55
--- diff/arch/i386/boot98/install.sh	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/boot98/install.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-#!/bin/sh
-#
-# arch/i386/boot/install.sh
-#
-# This file is subject to the terms and conditions of the GNU General Public
-# License.  See the file "COPYING" in the main directory of this archive
-# for more details.
-#
-# Copyright (C) 1995 by Linus Torvalds
-#
-# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
-#
-# "make install" script for i386 architecture
-#
-# Arguments:
-#   $1 - kernel version
-#   $2 - kernel image file
-#   $3 - kernel map file
-#   $4 - default install path (blank if root directory)
-#
-
-# User may have a custom install script
-
-if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi
-if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi
-
-# Default install - same as make zlilo
-
-if [ -f $4/vmlinuz ]; then
-	mv $4/vmlinuz $4/vmlinuz.old
-fi
-
-if [ -f $4/System.map ]; then
-	mv $4/System.map $4/System.old
-fi
-
-cat $2 > $4/vmlinuz
-cp $3 $4/System.map
-
-if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
--- diff/arch/i386/boot98/mtools.conf.in	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/boot98/mtools.conf.in	1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-#
-# mtools configuration file for "make (b)zdisk"
-#
-
-# Actual floppy drive
-drive a:
-  file="/dev/fd0"
-
-# 1.44 MB floppy disk image
-drive v:
-  file="@OBJ@/fdimage" cylinders=80 heads=2 sectors=18 filter
-
-# 2.88 MB floppy disk image (mostly for virtual uses)
-drive w:
-  file="@OBJ@/fdimage" cylinders=80 heads=2 sectors=36 filter
-
-
--- diff/arch/i386/boot98/setup.S	2004-06-30 14:25:40.000000000 +0100
+++ source/arch/i386/boot98/setup.S	1970-01-01 01:00:00.000000000 +0100
@@ -1,876 +0,0 @@
-/*
- *	setup.S		Copyright (C) 1991, 1992 Linus Torvalds
- *
- * setup.s is responsible for getting the system data from the BIOS,
- * and putting them into the appropriate places in system memory.
- * both setup.s and system has been loaded by the bootblock.
- *
- * This code asks the bios for memory/disk/other parameters, and
- * puts them in a "safe" place: 0x90000-0x901FF, ie where the
- * boot-block used to be. It is then up to the protected mode
- * system to read them from there before the area is overwritten
- * for buffer-blocks.
- *
- * Move PS/2 aux init code to psaux.c
- * (troyer@saifr00.cfsat.Honeywell.COM) 03Oct92
- *
- * some changes and additional features by Christoph Niemann,
- * March 1993/June 1994 (Christoph.Niemann@linux.org)
- *
- * add APM BIOS checking by Stephen Rothwell, May 1994
- * (sfr@canb.auug.org.au)
- *
- * High load stuff, initrd support and position independency
- * by Hans Lermen & Werner Almesberger, February 1996
- * <lermen@elserv.ffm.fgan.de>, <almesber@lrc.epfl.ch>
- *
- * Video handling moved to video.S by Martin Mares, March 1996
- * <mj@k332.feld.cvut.cz>
- *
- * Extended memory detection scheme retwiddled by orc@pell.chi.il.us (david
- * parsons) to avoid loadlin confusion, July 1997
- *
- * Transcribed from Intel (as86) -> AT&T (gas) by Chris Noe, May 1999.
- * <stiker@northlink.com>
- *
- * Fix to work around buggy BIOSes which dont use carry bit correctly
- * and/or report extended memory in CX/DX for e801h memory size detection 
- * call.  As a result the kernel got wrong figures.  The int15/e801h docs
- * from Ralf Brown interrupt list seem to indicate AX/BX should be used
- * anyway.  So to avoid breaking many machines (presumably there was a reason
- * to orginally use CX/DX instead of AX/BX), we do a kludge to see
- * if CX/DX have been changed in the e801 call and if so use AX/BX .
- * Michael Miller, April 2001 <michaelm@mjmm.org>
- *
- * New A20 code ported from SYSLINUX by H. Peter Anvin. AMD Elan bugfixes
- * by Robert Schwebel, December 2001 <robert@schwebel.de>
- *
- * Heavily modified for NEC PC-9800 series by Kyoto University Microcomputer
- * Club (KMC) Linux/98 project <seraphim@kmc.kyoto-u.ac.jp>, 1997-1999
- */
-
-#include <linux/config.h>
-#include <asm/segment.h>
-#include <linux/version.h>
-#include <linux/compile.h>
-#include <asm/boot.h>
-#include <asm/e820.h>
-#include <asm/page.h>
-	
-/* Signature words to ensure LILO loaded us right */
-#define SIG1	0xAA55
-#define SIG2	0x5A5A
-
-#define HIRESO_TEXT	0xe000
-#define NORMAL_TEXT	0xa000
-
-#define BIOS_FLAG2	0x0400
-#define BIOS_FLAG5	0x0458
-#define RDISK_EQUIP	0x0488
-#define BIOS_FLAG	0x0501
-#define KB_SHFT_STS	0x053a
-#define DISK_EQUIP	0x055c
-
-INITSEG  = DEF_INITSEG		# 0x9000, we move boot here, out of the way
-SYSSEG   = DEF_SYSSEG		# 0x1000, system loaded at 0x10000 (65536).
-SETUPSEG = DEF_SETUPSEG		# 0x9020, this is the current segment
-				# ... and the former contents of CS
-
-DELTA_INITSEG = SETUPSEG - INITSEG	# 0x0020
-
-.code16
-.globl begtext, begdata, begbss, endtext, enddata, endbss
-
-.text
-begtext:
-.data
-begdata:
-.bss
-begbss:
-.text
-
-start:
-	jmp	trampoline
-
-# This is the setup header, and it must start at %cs:2 (old 0x9020:2)
-
-		.ascii	"HdrS"		# header signature
-		.word	0x0203		# header version number (>= 0x0105)
-					# or else old loadlin-1.5 will fail)
-realmode_swtch:	.word	0, 0		# default_switch, SETUPSEG
-start_sys_seg:	.word	SYSSEG
-		.word	kernel_version	# pointing to kernel version string
-					# above section of header is compatible
-					# with loadlin-1.5 (header v1.5). Don't
-					# change it.
-
-type_of_loader:	.byte	0		# = 0, old one (LILO, Loadlin,
-					#      Bootlin, SYSLX, bootsect...)
-					# See Documentation/i386/boot.txt for
-					# assigned ids
-	
-# flags, unused bits must be zero (RFU) bit within loadflags
-loadflags:
-LOADED_HIGH	= 1			# If set, the kernel is loaded high
-CAN_USE_HEAP	= 0x80			# If set, the loader also has set
-					# heap_end_ptr to tell how much
-					# space behind setup.S can be used for
-					# heap purposes.
-					# Only the loader knows what is free
-#ifndef __BIG_KERNEL__
-		.byte	0
-#else
-		.byte	LOADED_HIGH
-#endif
-
-setup_move_size: .word  0x8000		# size to move, when setup is not
-					# loaded at 0x90000. We will move setup 
-					# to 0x90000 then just before jumping
-					# into the kernel. However, only the
-					# loader knows how much data behind
-					# us also needs to be loaded.
-
-code32_start:				# here loaders can put a different
-					# start address for 32-bit code.
-#ifndef __BIG_KERNEL__
-		.long	0x1000		#   0x1000 = default for zImage
-#else
-		.long	0x100000	# 0x100000 = default for big kernel
-#endif
-
-ramdisk_image:	.long	0		# address of loaded ramdisk image
-					# Here the loader puts the 32-bit
-					# address where it loaded the image.
-					# This only will be read by the kernel.
-
-ramdisk_size:	.long	0		# its size in bytes
-
-bootsect_kludge:
-		.long	0		# obsolete
-
-heap_end_ptr:	.word	modelist+1024	# (Header version 0x0201 or later)
-					# space from here (exclusive) down to
-					# end of setup code can be used by setup
-					# for local heap purposes.
-
-pad1:		.word	0
-cmd_line_ptr:	.long 0			# (Header version 0x0202 or later)
-					# If nonzero, a 32-bit pointer
-					# to the kernel command line.
-					# The command line should be
-					# located between the start of
-					# setup and the end of low
-					# memory (0xa0000), or it may
-					# get overwritten before it
-					# gets read.  If this field is
-					# used, there is no longer
-					# anything magical about the
-					# 0x90000 segment; the setup
-					# can be located anywhere in
-					# low memory 0x10000 or higher.
-
-ramdisk_max:	.long MAXMEM-1		# (Header version 0x0203 or later)
-					# The highest safe address for
-					# the contents of an initrd
-
-trampoline:	call	start_of_setup
-		.space	1024
-# End of setup header #####################################################
-
-start_of_setup:
-# Set %ds = %cs, we know that SETUPSEG = %cs at this point
-	movw	%cs, %ax		# aka SETUPSEG
-	movw	%ax, %ds
-# Check signature at end of setup
-	cmpw	$SIG1, setup_sig1
-	jne	bad_sig
-
-	cmpw	$SIG2, setup_sig2
-	jne	bad_sig
-
-	jmp	good_sig1
-
-# Routine to print asciiz string at ds:si
-prtstr:
-	lodsb
-	andb	%al, %al
-	jz	fin
-
-	call	prtchr
-	jmp	prtstr
-
-fin:	ret
-
-no_sig_mess: .string	"No setup signature found ..."
-
-good_sig1:
-	jmp	good_sig
-
-# We now have to find the rest of the setup code/data
-bad_sig:
-	movw	%cs, %ax			# SETUPSEG
-	subw	$DELTA_INITSEG, %ax		# INITSEG
-	movw	%ax, %ds
-	xorb	%bh, %bh
-	movb	(497), %bl			# get setup sect from bootsect
-	subw	$4, %bx				# LILO loads 4 sectors of setup
-	shlw	$8, %bx				# convert to words (1sect=2^8 words)
-	movw	%bx, %cx
-	shrw	$3, %bx				# convert to segment
-	addw	$SYSSEG, %bx
-	movw	%bx, %cs:start_sys_seg
-# Move rest of setup code/data to here
-	movw	$2048, %di			# four sectors loaded by LILO
-	subw	%si, %si
-	pushw	%cs
-	popw	%es
-	movw	$SYSSEG, %ax
-	movw	%ax, %ds
-	rep
-	movsw
-	movw	%cs, %ax			# aka SETUPSEG
-	movw	%ax, %ds
-	cmpw	$SIG1, setup_sig1
-	jne	no_sig
-
-	cmpw	$SIG2, setup_sig2
-	jne	no_sig
-
-	jmp	good_sig
-
-no_sig:
-	lea	no_sig_mess, %si
-	call	prtstr
-
-no_sig_loop:
-	hlt
-	jmp	no_sig_loop
-
-good_sig:
-	movw	%cs, %ax			# aka SETUPSEG
-	subw	$DELTA_INITSEG, %ax 		# aka INITSEG
-	movw	%ax, %ds
-# Check if an old loader tries to load a big-kernel
-	testb	$LOADED_HIGH, %cs:loadflags	# Do we have a big kernel?
-	jz	loader_ok			# No, no danger for old loaders.
-
-	cmpb	$0, %cs:type_of_loader 		# Do we have a loader that
-						# can deal with us?
-	jnz	loader_ok			# Yes, continue.
-
-	pushw	%cs				# No, we have an old loader,
-	popw	%ds				# die. 
-	lea	loader_panic_mess, %si
-	call	prtstr
-
-	jmp	no_sig_loop
-
-loader_panic_mess: .string "Wrong loader, giving up..."
-
-loader_ok:
-# Get memory size (extended mem, kB)
-
-# On PC-9800, memory size detection is done completely in 32-bit
-# kernel initialize code (kernel/setup.c).
-	pushw	%es
-	xorl	%eax, %eax
-	movw	%ax, %es
-	movb	%al, (E820NR)		# PC-9800 has no E820
-	movb	%es:(0x401), %al
-	shll	$7, %eax
-	addw	$1024, %ax
-	movw	%ax, (2)
-	movl	%eax, (0x1e0)
-	movw	%es:(0x594), %ax
-	shll	$10, %eax
-	addl	%eax, (0x1e0)
-	popw	%es
-
-# Check for video adapter and its parameters and allow the
-# user to browse video modes.
-	call	video				# NOTE: we need %ds pointing
-						# to bootsector
-
-# Get text video mode
-	movb	$0x0B, %ah
-	int	$0x18		# CRT mode sense
-	movw	$(20 << 8) + 40, %cx
-	testb	$0x10, %al
-	jnz	3f
-	movb	$20, %ch
-	testb	$0x01, %al
-	jnz	1f
-	movb	$25, %ch
-	jmp	1f
-3:	# If bit 4 was 1, it means either 1) 31 lines for hi-reso mode,
-	# or 2) 30 lines for PC-9821.
-	movb	$31, %ch	# hireso mode value
-	pushw	$0
-	popw	%es
-	testb	$0x08, %es:BIOS_FLAG
-	jnz	1f
-	movb	$30, %ch
-1:	# Now we got # of rows in %ch
-	movb	%ch, (14)
-
-	testb	$0x02, %al
-	jnz	2f
-	movb	$80, %cl
-2:	# Now we got # of columns in %cl
-	movb	%cl, (7)
-
-	# Next, get horizontal frequency if supported
-	movw	$0x3100, %ax
-	int	$0x18		# Call CRT bios
-	movb	%al, (6)	# If 31h is unsupported, %al remains 0
-
-# Get hd0-3 data...
-	pushw	%ds				# aka INITSEG
-	popw	%es
-	xorw	%ax, %ax
-	movw	%ax, %ds
-	cld
-	movw	$0x0080, %di
-	movb	DISK_EQUIP+1, %ah
-	movb	$0x80, %al
-
-get_hd_info:
-	shrb	%ah
-	pushw	%ax
-	jnc	1f
-	movb	$0x84, %ah
-	int	$0x1b
-	jnc	2f				# Success
-1:	xorw	%cx, %cx			# `0 cylinders' means no drive
-2:	# Attention! Work area (drive_info) is arranged for PC-9800.
-	movw	%cx, %ax			# # of cylinders
-	stosw
-	movw	%dx, %ax			# # of sectors / # of heads
-	stosw
-	movw	%bx, %ax			# sector size in bytes
-	stosw
-	popw	%ax
-	incb	%al
-	cmpb	$0x84, %al
-	jb	get_hd_info
-
-# Get fd data...
-	movw	DISK_EQUIP, %ax
-	andw	$0xf00f, %ax
-	orb	%al, %ah
-	movb	RDISK_EQUIP, %al
-	notb	%al
-	andb	%al, %ah			# ignore all `RAM drive'
-
-	movb	$0x30, %al
-
-get_fd_info:
-	shrb	%ah
-	pushw	%ax
-	jnc	1f
-	movb	$0xc4, %ah
-	int	$0x1b
-	movb	%ah, %al
-	andb	$4, %al				# 1.44MB support flag
-	shrb	%al
-	addb	$2, %al				# %al = 2 (1.2MB) or 4 (1.44MB)
-	jmp	2f
-1:	movb	$0, %al				# no drive
-2:	stosb
-	popw	%ax
-	incb	%al
-	testb	$0x04, %al
-	jz	get_fd_info
-
-	addb	$(0xb0 - 0x34), %al
-	jnc	get_fd_info			# check FDs on 640KB I/F
-
-	pushw	%es
-	popw	%ds				# %ds got bootsector again
-#if 0
-	mov	$0, (0x1ff)			# default is no pointing device
-#endif
-
-#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
-# Then check for an APM BIOS...
-						# %ds points to the bootsector
-	movw	$0, 0x40			# version = 0 means no APM BIOS
-	movw	$0x09a00, %ax			# APM BIOS installation check
-	xorw	%bx, %bx
-	int	$0x1f
-	jc	done_apm_bios			# Nope, no APM BIOS
-
-	cmpw	$0x0504d, %bx			# Check for "PM" signature
-	jne	done_apm_bios			# No signature, no APM BIOS
-
-	testb	$0x02, %cl			# Is 32 bit supported?
-	je	done_apm_bios			# No 32-bit, no (good) APM BIOS
-
-	movw	$0x09a04, %ax			# Disconnect first just in case
-	xorw	%bx, %bx
-	int	$0x1f				# ignore return code
-	movw	$0x09a03, %ax			# 32 bit connect
-	xorl	%ebx, %ebx
-	int	$0x1f
-	jc	no_32_apm_bios			# Ack, error.
-
-	movw	%ax,  (66)			# BIOS code segment
-	movl	%ebx, (68)			# BIOS entry point offset
-	movw	%cx,  (72)			# BIOS 16 bit code segment
-	movw	%dx,  (74)			# BIOS data segment
-	movl	%esi, (78)			# BIOS code segment length
-	movw	%di,  (82)			# BIOS data segment length
-# Redo the installation check as the 32 bit connect
-# modifies the flags returned on some BIOSs
-	movw	$0x09a00, %ax			# APM BIOS installation check
-	xorw	%bx, %bx
-	int	$0x1f
-	jc	apm_disconnect			# error -> shouldn't happen
-
-	cmpw	$0x0504d, %bx			# check for "PM" signature
-	jne	apm_disconnect			# no sig -> shouldn't happen
-
-	movw	%ax, (64)			# record the APM BIOS version
-	movw	%cx, (76)			# and flags
-	jmp	done_apm_bios
-
-apm_disconnect:					# Tidy up
-	movw	$0x09a04, %ax			# Disconnect
-	xorw	%bx, %bx
-	int	$0x1f				# ignore return code
-
-	jmp	done_apm_bios
-
-no_32_apm_bios:
-	andw	$0xfffd, (76)			# remove 32 bit support bit
-done_apm_bios:
-#endif
-
-# Pass cursor position to kernel...
-	movw	%cs:cursor_address, %ax
-	shrw	%ax		# cursor_address is 2 bytes unit
-	movb	$80, %cl
-	divb	%cl
-	xchgb	%al, %ah	# (0) = %al = X, (1) = %ah = Y
-	movw	%ax, (0)
-
-#if 0
-	movw	$msg_cpos, %si
-	call	prtstr_cs
-	call	prthex
-	call	prtstr_cs
-	movw	%ds, %ax
-	call	prthex
-	call	prtstr_cs
-	movb	$0x11, %ah
-	int	$0x18
-	movb	$0, %ah
-	int	$0x18
-	.section .rodata, "a"
-msg_cpos:	.string	"Cursor position: 0x"
-		.string	", %ds:0x"
-		.string	"\r\n"
-	.previous
-#endif
-
-# Now we want to move to protected mode ...
-	cmpw	$0, %cs:realmode_swtch
-	jz	rmodeswtch_normal
-
-	lcall	*%cs:realmode_swtch
-
-	jmp	rmodeswtch_end
-
-rmodeswtch_normal:
-        pushw	%cs
-	call	default_switch
-
-rmodeswtch_end:
-# we get the code32 start address and modify the below 'jmpi'
-# (loader may have changed it)
-	movl	%cs:code32_start, %eax
-	movl	%eax, %cs:code32
-
-# Now we move the system to its rightful place ... but we check if we have a
-# big-kernel. In that case we *must* not move it ...
-	testb	$LOADED_HIGH, %cs:loadflags
-	jz	do_move0			# .. then we have a normal low
-						# loaded zImage
-						# .. or else we have a high
-						# loaded bzImage
-	jmp	end_move			# ... and we skip moving
-
-do_move0:
-	movw	$0x100, %ax			# start of destination segment
-	movw	%cs, %bp			# aka SETUPSEG
-	subw	$DELTA_INITSEG, %bp		# aka INITSEG
-	movw	%cs:start_sys_seg, %bx		# start of source segment
-	cld
-do_move:
-	movw	%ax, %es			# destination segment
-	incb	%ah				# instead of add ax,#0x100
-	movw	%bx, %ds			# source segment
-	addw	$0x100, %bx
-	subw	%di, %di
-	subw	%si, %si
-	movw 	$0x800, %cx
-	rep
-	movsw
-	cmpw	%bp, %bx			# assume start_sys_seg > 0x200,
-						# so we will perhaps read one
-						# page more than needed, but
-						# never overwrite INITSEG
-						# because destination is a
-						# minimum one page below source
-	jb	do_move
-
-end_move:
-# then we load the segment descriptors
-	movw	%cs, %ax			# aka SETUPSEG
-	movw	%ax, %ds
-               
-# Check whether we need to be downward compatible with version <=201
-	cmpl	$0, cmd_line_ptr
-	jne	end_move_self		# loader uses version >=202 features
-	cmpb	$0x20, type_of_loader
-	je	end_move_self		# bootsect loader, we know of it
- 
-# Boot loader does not support boot protocol version 2.02.
-# If we have our code not at 0x90000, we need to move it there now.
-# We also then need to move the params behind it (commandline)
-# Because we would overwrite the code on the current IP, we move
-# it in two steps, jumping high after the first one.
-	movw	%cs, %ax
-	cmpw	$SETUPSEG, %ax
-	je	end_move_self
-
-	cli					# make sure we really have
-						# interrupts disabled !
-						# because after this the stack
-						# should not be used
-	subw	$DELTA_INITSEG, %ax		# aka INITSEG
-	movw	%ss, %dx
-	cmpw	%ax, %dx
-	jb	move_self_1
-
-	addw	$INITSEG, %dx
-	subw	%ax, %dx			# this will go into %ss after
-						# the move
-move_self_1:
-	movw	%ax, %ds
-	movw	$INITSEG, %ax			# real INITSEG
-	movw	%ax, %es
-	movw	%cs:setup_move_size, %cx
-	std					# we have to move up, so we use
-						# direction down because the
-						# areas may overlap
-	movw	%cx, %di
-	decw	%di
-	movw	%di, %si
-	subw	$move_self_here+0x200, %cx
-	rep
-	movsb
-	ljmp	$SETUPSEG, $move_self_here
-
-move_self_here:
-	movw	$move_self_here+0x200, %cx
-	rep
-	movsb
-	movw	$SETUPSEG, %ax
-	movw	%ax, %ds
-	movw	%dx, %ss
-
-end_move_self:					# now we are at the right place
-	lidt	idt_48				# load idt with 0,0
-	xorl	%eax, %eax			# Compute gdt_base
-	movw	%ds, %ax			# (Convert %ds:gdt to a linear ptr)
-	shll	$4, %eax
-	addl	$gdt, %eax
-	movl	%eax, (gdt_48+2)
-	lgdt	gdt_48				# load gdt with whatever is
-						# appropriate
-
-# that was painless, now we enable A20
-
-	outb	%al, $0xf2			# A20 on
-	movb	$0x02, %al
-	outb	%al, $0xf6			# also A20 on; making ITF's
-						# way our model
-
-	# PC-9800 seems to enable A20 at the moment of `outb';
-	# so we don't wait unlike IBM PCs (see ../setup.S).
-
-# enable DMA to access memory over 0x100000 (1MB).
-
-	movw	$0x439, %dx
-	inb	%dx, %al
-	andb	$(~4), %al
-	outb	%al, %dx
-
-# Set DMA to increment its bank address automatically at 16MB boundary.
-# Initial setting is 64KB boundary mode so that we can't run DMA crossing
-# physical address 0xXXXXFFFF.
-
-	movb	$0x0c, %al
-	outb	%al, $0x29			# ch. 0
-	movb	$0x0d, %al
-	outb	%al, $0x29			# ch. 1
-	movb	$0x0e, %al
-	outb	%al, $0x29			# ch. 2
-	movb	$0x0f, %al
-	outb	%al, $0x29			# ch. 3
-	movb	$0x50, %al
-	outb	%al, $0x11			# reinitialize DMAC
-
-# make sure any possible coprocessor is properly reset..
-	movb	$0, %al
-	outb	%al, $0xf8
-	outb	%al, $0x5f			# delay
-
-# well, that went ok, I hope. Now we mask all interrupts - the rest
-# is done in init_IRQ().
-	movb	$0xFF, %al			# mask all interrupts for now
-	outb	%al, $0x0A
-	outb	%al, $0x5f			# delay
-	
-	movb	$0x7F, %al			# mask all irq's but irq7 which
-	outb	%al, $0x02			# is cascaded
-
-# Well, that certainly wasn't fun :-(. Hopefully it works, and we don't
-# need no steenking BIOS anyway (except for the initial loading :-).
-# The BIOS-routine wants lots of unnecessary data, and it's less
-# "interesting" anyway. This is how REAL programmers do it.
-#
-# Well, now's the time to actually move into protected mode. To make
-# things as simple as possible, we do no register set-up or anything,
-# we let the gnu-compiled 32-bit programs do that. We just jump to
-# absolute address 0x1000 (or the loader supplied one),
-# in 32-bit protected mode.
-#
-# Note that the short jump isn't strictly needed, although there are
-# reasons why it might be a good idea. It won't hurt in any case.
-	movw	$1, %ax				# protected mode (PE) bit
-	lmsw	%ax				# This is it!
-	jmp	flush_instr
-
-flush_instr:
-	xorw	%bx, %bx			# Flag to indicate a boot
-	xorl	%esi, %esi			# Pointer to real-mode code
-	movw	%cs, %si
-	subw	$DELTA_INITSEG, %si
-	shll	$4, %esi			# Convert to 32-bit pointer
-# NOTE: For high loaded big kernels we need a
-#	jmpi    0x100000,__BOOT_CS
-#
-#	but we yet haven't reloaded the CS register, so the default size 
-#	of the target offset still is 16 bit.
-#       However, using an operand prefix (0x66), the CPU will properly
-#	take our 48 bit far pointer. (INTeL 80386 Programmer's Reference
-#	Manual, Mixing 16-bit and 32-bit code, page 16-6)
-
-	.byte 0x66, 0xea			# prefix + jmpi-opcode
-code32:	.long	0x1000				# will be set to 0x100000
-						# for big kernels
-	.word	__BOOT_CS
-
-# Here's a bunch of information about your current kernel..
-kernel_version:	.ascii	UTS_RELEASE
-		.ascii	" ("
-		.ascii	LINUX_COMPILE_BY
-		.ascii	"@"
-		.ascii	LINUX_COMPILE_HOST
-		.ascii	") "
-		.ascii	UTS_VERSION
-		.byte	0
-
-# This is the default real mode switch routine.
-# to be called just before protected mode transition
-default_switch:
-	cli					# no interrupts allowed !
-	outb	%al, $0x50			# disable NMI for bootup
-						# sequence
-	lret
-
-
-# This routine prints one character (in %al) on console.
-# PC-9800 doesn't have BIOS-function to do it like IBM PC's INT 10h - 0Eh,
-# so we hardcode `prtchr' subroutine here.
-prtchr:
-	pushaw
-	pushw	%es
-	cmpb	$0, %cs:prtchr_initialized
-	jnz	prtchr_ok
-	xorw	%cx, %cx
-	movw	%cx, %es
-	testb	$0x8, %es:BIOS_FLAG
-	jz	1f
-	movb	$(HIRESO_TEXT >> 8), %cs:cursor_address+3
-	movw	$(80 * 31 * 2), %cs:max_cursor_offset
-1:	pushw	%ax
-	call	get_cursor_position
-	movw	%ax, %cs:cursor_address
-	popw	%ax
-	movb	$1, %cs:prtchr_initialized
-prtchr_ok:
-	lesw	%cs:cursor_address, %di
-	movw	$160, %bx
-	movb	$0, %ah
-	cmpb	$13, %al
-	je	do_cr
-	cmpb	$10, %al
-	je	do_lf
-
-	# normal (printable) character
-	stosw
-	movb	$0xe1, %es:0x2000-2(%di)
-	jmp	1f
-
-do_cr:	movw	%di, %ax
-	divb	%bl				# %al = Y, %ah = X * 2
-	mulb	%bl
-	movw	%ax, %dx
-	jmp	2f
-
-do_lf:	addw	%bx, %di
-1:	movw	%cs:max_cursor_offset, %cx
-	cmpw	%cx, %di
-	movw	%di, %dx
-	jb	2f
-	# cursor reaches bottom of screen; scroll it
-	subw	%bx, %dx
-	xorw	%di, %di
-	movw	%bx, %si
-	cld
-	subw	%bx, %cx
-	shrw	%cx
-	pushw	%cx
-	rep; es; movsw
-	movb	$32, %al			# clear bottom line characters
-	movb	$80, %cl
-	rep; stosw
-	movw	$0x2000, %di
-	popw	%cx
-	leaw	(%bx,%di), %si
-	rep; es; movsw
-	movb	$0xe1, %al			# clear bottom line attributes
-	movb	$80, %cl
-	rep; stosw
-2:	movw	%dx, %cs:cursor_address
-	movb	$0x13, %ah			# move cursor to right position
-	int	$0x18
-	popw	%es
-	popaw
-	ret
-
-cursor_address:
-	.word	0
-	.word	NORMAL_TEXT
-max_cursor_offset:
-	.word	80 * 25 * 2			# for normal 80x25 mode
-
-# putstr may called without running through start_of_setup (via bootsect_panic)
-# so we should initialize ourselves on demand.
-prtchr_initialized:
-	.byte	0
-
-# This routine queries GDC (graphic display controller) for current cursor
-# position. Cursor position is returned in %ax (CPU offset address).
-get_cursor_position:
-1:	inb	$0x60, %al
-	outb	%al, $0x5f			# delay
-	outb	%al, $0x5f			# delay
-	testb	$0x04, %al			# Is FIFO empty?
-	jz	1b				# no -> wait until empty
-
-	movb	$0xe0, %al			# CSRR command
-	outb	%al, $0x62			# command write
-	outb	%al, $0x5f			# delay
-	outb	%al, $0x5f			# delay
-
-2:	inb	$0x60, %al
-	outb	%al, $0x5f			# delay
-	outb	%al, $0x5f			# delay
-	testb	$0x01, %al			# Is DATA READY?
-	jz	2b				# no -> wait until ready
-
-	inb	$0x62, %al			# read xAD (L)
-	outb	%al, $0x5f			# delay
-	outb	%al, $0x5f			# delay
-	movb	%al, %ah
-	inb	$0x62, %al			# read xAD (H)
-	outb	%al, $0x5f			# delay
-	outb	%al, $0x5f			# delay
-	xchgb	%al, %ah			# correct byte order
-	pushw	%ax
-	inb	$0x62, %al			# read yAD (L)
-	outb	%al, $0x5f			# delay
-	outb	%al, $0x5f			# delay
-	inb	$0x62, %al			# read yAD (M)
-	outb	%al, $0x5f			# delay
-	outb	%al, $0x5f			# delay
-	inb	$0x62, %al			# read yAD (H)
-						# yAD is not our interest,
-						# so discard it.
-	popw	%ax
-	addw	%ax, %ax			# convert to CPU address
-	ret
-
-# Descriptor tables
-#
-# NOTE: The intel manual says gdt should be sixteen bytes aligned for
-# efficiency reasons.  However, there are machines which are known not
-# to boot with misaligned GDTs, so alter this at your peril!  If you alter
-# GDT_ENTRY_BOOT_CS (in asm/segment.h) remember to leave at least two
-# empty GDT entries (one for NULL and one reserved).
-#
-# NOTE:	On some CPUs, the GDT must be 8 byte aligned.  This is
-# true for the Voyager Quad CPU card which will not boot without
-# This directive.  16 byte aligment is recommended by intel.
-#
-	.align 16
-gdt:
-	.fill GDT_ENTRY_BOOT_CS,8,0
-
-	.word	0xFFFF				# 4Gb - (0x100000*0x1000 = 4Gb)
-	.word	0				# base address = 0
-	.word	0x9A00				# code read/exec
-	.word	0x00CF				# granularity = 4096, 386
-						#  (+5th nibble of limit)
-
-	.word	0xFFFF				# 4Gb - (0x100000*0x1000 = 4Gb)
-	.word	0				# base address = 0
-	.word	0x9200				# data read/write
-	.word	0x00CF				# granularity = 4096, 386
-						#  (+5th nibble of limit)
-gdt_end:
-	.align	4
-	
-	.word	0				# alignment byte
-idt_48:
-	.word	0				# idt limit = 0
-	.word	0, 0				# idt base = 0L
-
-	.word	0				# alignment byte
-gdt_48:
-	.word	gdt_end - gdt - 1		# gdt limit
-	.word	0, 0				# gdt base (filled in later)
-
-# Include video setup & detection code
-
-#include "video.S"
-
-# Setup signature -- must be last
-setup_sig1:	.word	SIG1
-setup_sig2:	.word	SIG2
-
-# After this point, there is some free space which is used by the video mode
-# handling code to store the temporary mode table (not used by the kernel).
-
-modelist:
-
-.text
-endtext:
-.data
-enddata:
-.bss
-endbss:
--- diff/arch/i386/boot98/video.S	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/boot98/video.S	1970-01-01 01:00:00.000000000 +0100
@@ -1,262 +0,0 @@
-/*	video.S
- *
- *  Video mode setup, etc. for NEC PC-9800 series.
- *
- *  Copyright (C) 1997,98,99  Linux/98 project  <seraphim@kmc.kyoto-u.ac.jp>
- *
- *  Based on the video.S for IBM PC:
- *	copyright (C) Martin Mares <mj@atrey.karlin.mff.cuni.cz>
- */
-
-/* Positions of various video parameters passed to the kernel */
-/* (see also include/linux/tty.h) */
-#define PARAM_CURSOR_POS	0x00
-#define PARAM_VIDEO_PAGE	0x04
-#define PARAM_VIDEO_MODE	0x06
-#define PARAM_VIDEO_COLS	0x07
-#define PARAM_VIDEO_EGA_BX	0x0a
-#define PARAM_VIDEO_LINES	0x0e
-#define PARAM_HAVE_VGA		0x0f
-#define PARAM_FONT_POINTS	0x10
-
-#define PARAM_VIDEO98_COMPAT	0x0a
-#define PARAM_VIDEO98_HIRESO	0x0b
-#define PARAM_VIDEO98_MACHTYPE	0x0c
-#define PARAM_VIDEO98_LINES	0x0e
-#define PARAM_VIDEO98_COLS	0x0f
-
-# PARAM_LFB_* and PARAM_VESAPM_* are unused on PC-9800.
-
-# This is the main entry point called by setup.S
-# %ds *must* be pointing to the bootsector
-video:	xorw	%ax, %ax
-	movw	%ax, %es			# %es = 0
-
-	movb	%es:BIOS_FLAG, %al
-	movb	%al, PARAM_VIDEO_MODE
-
-	movb	$0, PARAM_VIDEO98_HIRESO	# 0 = normal
-	movw	$NORMAL_TEXT, PARAM_VIDEO_PAGE
-	testb	$0x8, %al
-	movw	$(80 * 256 + 25), %ax
-	jz	1f
-	# hireso machine.
-	movb	$1, PARAM_VIDEO98_HIRESO	# !0 = hi-reso
-	movb	$(HIRESO_TEXT >> 8), PARAM_VIDEO_PAGE + 1
-	movw	$(80 * 256 + 31), %ax
-1:	movw	%ax, PARAM_VIDEO98_LINES	# also sets VIDEO98_COLS
-
-	movb	$0xc0, %ch			# 400-line graphic mode
-	movb	$0x42, %ah
-	int	$0x18
-
-	movw	$80, PARAM_VIDEO_COLS
-
-	movw	$msg_probing, %si
-	call	prtstr_cs
-
-# Check vendor from font pattern of `A'...
-
-1:	inb	$0x60, %al			# wait V-sync
-	testb	$0x20, %al
-	jnz	1b
-2:	inb	$0x60, %al
-	testb	$0x20, %al
-	jz	2b
-
-	movb	$0x00, %al			# select font of `A'
-	outb	%al, $0xa1
-	movb	$0x41, %al
-	outb	%al, $0xa3
-
-	movw	$8, %cx
-	movw	PARAM_VIDEO_PAGE, %ax
-	cmpw	$NORMAL_TEXT, %ax
-	je	3f
-	movb	$24, %cl			# for hi-reso machine
-3:	addw	$0x400, %ax			# %ax = CG window segment
-	pushw	%ds
-	movw	%ax, %ds
-	xorw	%dx, %dx			# get sum of `A' pattern...
-	xorw	%si, %si
-4:	lodsw
-	addw	%ax, %dx
-	loop	4b
-	popw	%ds
-
-	movw	%dx, %ax
-	movw	$msg_nec, %si
-	xorw	%bx, %bx			# vendor info will go into %bx
-	testb	$8, %es:BIOS_FLAG
-	jnz	check_hireso_vendor
-	cmpw	$0xc7f8, %ax
-	je	5f
-	jmp	6f
-check_hireso_vendor:
-	cmpw	$0x9639, %ax			# XXX: NOT VERIFIED!!!
-	je	5f
-6:	incw	%bx				# compatible machine
-	movw	$msg_compat, %si
-5:	movb	%bl, PARAM_VIDEO98_COMPAT
-	call	prtstr_cs
-
-	movw	$msg_fontdata, %si
-	call	prtstr_cs			# " (CG sum of A = 0x"
-	movw	%dx, %ax
-	call	prthex
-	call	prtstr_cs			# ") PC-98"
-
-	movb	$'0', %al
-	pushw	%ds
-	pushw	$0xf8e8
-	popw	%ds
-	cmpw	$0x2198, (0)
-	popw	%ds
-	jne	7f
-	movb	$'2', %al
-7:	call	prtchr
-	call	prtstr_cs			# "1 "
-
-	movb	$0, PARAM_VIDEO98_MACHTYPE
-#if 0	/* XXX - This check is bogus? [0000:BIOS_FLAG2]-bit7 does NOT
-		 indicate whether it is a note machine, but merely indicates
-		 whether it has ``RAM drive''. */
-# check note machine
-	testb	$0x80, %es:BIOS_FLAG2
-	jnz	is_note
-	pushw	%ds
-	pushw	$0xfd80
-	popw	%ds
-	movb	(4), %al
-	popw	%ds
-	cmpb	$0x20, %al			# EPSON note A
-	je	epson_note
-	cmpb	$0x22, %al			# EPSON note W
-	je	epson_note
-	cmpb	$0x27, %al			# EPSON note AE
-	je	epson_note
-	cmpb	$0x2a, %al			# EPSON note WR
-	jne	note_done
-epson_note:
-	movb	$1, PARAM_VIDEO98_MACHTYPE
-	movw	$msg_note, %si
-	call	prtstr_cs
-note_done:
-#endif
-	
-# print h98 ? (only NEC)
-	cmpb	$0, PARAM_VIDEO98_COMPAT
-	jnz	8f				# not NEC -> not H98
-
-	testb	$0x80, %es:BIOS_FLAG5
-	jz	8f				# have NESA bus -> H98
-	movw	$msg_h98, %si
-	call	prtstr_cs
-	orb	$2, PARAM_VIDEO98_MACHTYPE
-8:	testb	$0x40, %es:BIOS_FLAG5
-	jz	9f
-	movw	$msg_gs, %si
-	call	prtstr_cs			# only prints it :-)
-9:
-	movw	$msg_normal, %si		# "normal"
-	testb	$0x8, %es:BIOS_FLAG
-	jz	1f
-	movw	$msg_hireso, %si
-1:	call	prtstr_cs
-
-	movw	$msg_sysclk, %si
-	call	prtstr_cs
-	movb	$'5', %al
-	testb	$0x80, %es:BIOS_FLAG
-	jz	2f
-	movb	$'8', %al
-2:	call	prtchr
-	call	prtstr_cs
-
-#if 0
-	testb	$0x40, %es:(0x45c)
-	jz	no_30line			# no 30-line support
-
-	movb	%es:KB_SHFT_STS, %al
-	testb	$0x01, %al			# is SHIFT key pressed?
-	jz	no_30line
-
-	testb	$0x10, %al			# is CTRL key pressed?
-	jnz	line40
-
-	# switch to 30-line mode
-	movb	$30, PARAM_VIDEO98_LINES
-	movw	$msg_30line, %si
-	jmp	3f
-
-line40:
-	movb	$37, PARAM_VIDEO98_LINES
-	movw	$40, PARAM_VIDEO_LINES
-	movw	$msg_40line, %si
-3:	call	prtstr_cs
-
-	movb	$0x32, %bh
-	movw	$0x300c, %ax
-	int	$0x18				# switch video mode
-	movb	$0x0c, %ah
-	int	$0x18				# turn on text plane
-	movw	%cs:cursor_address, %dx
-	movb	$0x13, %ah
-	int	$0x18				# move cursor to correct place
-	mov	$0x11, %ah
-	int	$0x18				# turn on text plane
-
-	call	prtstr_cs			# "Ok.\r\n"
-no_30line:
-#endif
-	ret
-
-prtstr_cs:
-	pushw	%ds
-	pushw	%cs
-	popw	%ds
-	call	prtstr
-	popw	%ds
-	ret
-
-# prthex is for debugging purposes, and prints %ax in hexadecimal.
-prthex:	pushw	%cx
-	movw	$4, %cx
-1:	rolw	$4, %ax
-	pushw	%ax
-	andb	$0xf, %al
-	cmpb	$10, %al
-	sbbb	$0x69, %al
-	das
-	call	prtchr
-	popw	%ax
-	loop	1b
-	popw	%cx
-	ret
-
-msg_probing:	.string	"Probing machine: "
-
-msg_nec:	.string	"NEC"
-msg_compat:	.string	"compatible"
-
-msg_fontdata:	.string	" (CG sum of A = 0x"
-		.string	") PC-98"
-		.string	"1 "
-
-msg_gs:		.string	"(GS) "
-msg_h98:	.string	"(H98) "
-
-msg_normal:	.string	"normal"
-msg_hireso:	.string	"Hi-reso"
-
-msg_sysclk:	.string	" mode, system clock "
-		.string	"MHz\r\n"
-
-#if 0
-msg_40line:	# cpp will concat following lines, so the assembler can deal.
-		.ascii	"\
-Video mode will be adjusted to 37-line (so-called ``40-line'') mode later.\r\n\
-THIS MODE MAY DAMAGE YOUR MONITOR PHYSICALLY. USE AT YOUR OWN RISK.\r\n"
-msg_30line:	.string	"Switching video mode to 30-line (640x480) mode... "
-		.string	"Ok.\r\n"
-#endif
--- diff/arch/i386/kernel/std_resources.c	2004-05-19 22:11:00.000000000 +0100
+++ source/arch/i386/kernel/std_resources.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,204 +0,0 @@
-/*
- *  Machine specific resource allocation for generic.
- */
-
-#include <linux/ioport.h>
-#include <asm/io.h>
-#include <asm/std_resources.h>
-
-#define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
-
-static struct resource system_rom_resource = {
-	.name	= "System ROM",
-	.start	= 0xf0000,
-	.end	= 0xfffff,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
-};
-
-static struct resource extension_rom_resource = {
-	.name	= "Extension ROM",
-	.start	= 0xe0000,
-	.end	= 0xeffff,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
-};
-
-static struct resource adapter_rom_resources[] = { {
-	.name 	= "Adapter ROM",
-	.start	= 0xc8000,
-	.end	= 0,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
-}, {
-	.name 	= "Adapter ROM",
-	.start	= 0,
-	.end	= 0,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
-}, {
-	.name 	= "Adapter ROM",
-	.start	= 0,
-	.end	= 0,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
-}, {
-	.name 	= "Adapter ROM",
-	.start	= 0,
-	.end	= 0,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
-}, {
-	.name 	= "Adapter ROM",
-	.start	= 0,
-	.end	= 0,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
-}, {
-	.name 	= "Adapter ROM",
-	.start	= 0,
-	.end	= 0,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
-} };
-
-#define ADAPTER_ROM_RESOURCES \
-	(sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
-
-static struct resource video_rom_resource = {
-	.name 	= "Video ROM",
-	.start	= 0xc0000,
-	.end	= 0xc7fff,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
-};
-
-static struct resource vram_resource = {
-	.name	= "Video RAM area",
-	.start	= 0xa0000,
-	.end	= 0xbffff,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
-};
-
-static struct resource standard_io_resources[] = { {
-	.name	= "dma1",
-	.start	= 0x0000,
-	.end	= 0x001f,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
-}, {
-	.name	= "pic1",
-	.start	= 0x0020,
-	.end	= 0x0021,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
-}, {
-	.name	= "timer",
-	.start	= 0x0040,
-	.end	= 0x005f,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
-}, {
-	.name	= "keyboard",
-	.start	= 0x0060,
-	.end	= 0x006f,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
-}, {
-	.name	= "dma page reg",
-	.start	= 0x0080,
-	.end	= 0x008f,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
-}, {
-	.name	= "pic2",
-	.start	= 0x00a0,
-	.end	= 0x00a1,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
-}, {
-	.name	= "dma2",
-	.start	= 0x00c0,
-	.end	= 0x00df,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
-}, {
-	.name	= "fpu",
-	.start	= 0x00f0,
-	.end	= 0x00ff,
-	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
-} };
-
-#define STANDARD_IO_RESOURCES \
-	(sizeof standard_io_resources / sizeof standard_io_resources[0])
-
-static int __init checksum(unsigned char *rom, unsigned long length)
-{
-	unsigned char *p, sum = 0;
-
-	for (p = rom; p < rom + length; p++)
-		sum += *p;
-	return sum == 0;
-}
-
-void __init probe_roms(void)
-{
-	unsigned long start, length, upper;
-	unsigned char *rom;
-	int	      i;
-
-	/* video rom */
-	upper = adapter_rom_resources[0].start;
-	for (start = video_rom_resource.start; start < upper; start += 2048) {
-		rom = isa_bus_to_virt(start);
-		if (!romsignature(rom))
-			continue;
-
-		video_rom_resource.start = start;
-
-		/* 0 < length <= 0x7f * 512, historically */
-		length = rom[2] * 512;
-
-		/* if checksum okay, trust length byte */
-		if (length && checksum(rom, length))
-			video_rom_resource.end = start + length - 1;
-
-		request_resource(&iomem_resource, &video_rom_resource);
-		break;
-	}
-
-	start = (video_rom_resource.end + 1 + 2047) & ~2047UL;
-	if (start < upper)
-		start = upper;
-
-	/* system rom */
-	request_resource(&iomem_resource, &system_rom_resource);
-	upper = system_rom_resource.start;
-
-	/* check for extension rom (ignore length byte!) */
-	rom = isa_bus_to_virt(extension_rom_resource.start);
-	if (romsignature(rom)) {
-		length = extension_rom_resource.end - extension_rom_resource.start + 1;
-		if (checksum(rom, length)) {
-			request_resource(&iomem_resource, &extension_rom_resource);
-			upper = extension_rom_resource.start;
-		}
-	}
-
-	/* check for adapter roms on 2k boundaries */
-	for (i = 0; i < ADAPTER_ROM_RESOURCES && start < upper; start += 2048) {
-		rom = isa_bus_to_virt(start);
-		if (!romsignature(rom))
-			continue;
-
-		/* 0 < length <= 0x7f * 512, historically */
-		length = rom[2] * 512;
-
-		/* but accept any length that fits if checksum okay */
-		if (!length || start + length > upper || !checksum(rom, length))
-			continue;
-
-		adapter_rom_resources[i].start = start;
-		adapter_rom_resources[i].end = start + length - 1;
-		request_resource(&iomem_resource, &adapter_rom_resources[i]);
-
-		start = adapter_rom_resources[i++].end & ~2047UL;
-	}
-}
-
-void __init request_graphics_resource(void)
-{
-	request_resource(&iomem_resource, &vram_resource);
-}
-
-void __init request_standard_io_resources(void)
-{
-	int i;
-
-	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
-		request_resource(&ioport_resource, &standard_io_resources[i]);
-}
--- diff/arch/i386/mach-pc9800/Makefile	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-pc9800/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-obj-y				:= setup.o topology.o std_resources.o
--- diff/arch/i386/mach-pc9800/setup.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-pc9800/setup.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,117 +0,0 @@
-/*
- *	Machine specific setup for pc9800
- */
-
-#include <linux/config.h>
-#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/init.h>
-#include <linux/irq.h>
-#include <linux/interrupt.h>
-#include <linux/apm_bios.h>
-#include <asm/setup.h>
-#include <asm/arch_hooks.h>
-
-struct sys_desc_table_struct {
-	unsigned short length;
-	unsigned char table[0];
-};
-
-/**
- * pre_intr_init_hook - initialisation prior to setting up interrupt vectors
- *
- * Description:
- *	Perform any necessary interrupt initialisation prior to setting up
- *	the "ordinary" interrupt call gates.  For legacy reasons, the ISA
- *	interrupts should be initialised here if the machine emulates a PC
- *	in any way.
- **/
-void __init pre_intr_init_hook(void)
-{
-	init_ISA_irqs();
-}
-
-/*
- * IRQ7 is cascade interrupt to second interrupt controller
- */
-static struct irqaction irq7 = { no_action, 0, 0, "cascade", NULL, NULL};
-
-/**
- * intr_init_hook - post gate setup interrupt initialisation
- *
- * Description:
- *	Fill in any interrupts that may have been left out by the general
- *	init_IRQ() routine.  interrupts having to do with the machine rather
- *	than the devices on the I/O bus (like APIC interrupts in intel MP
- *	systems) are started here.
- **/
-void __init intr_init_hook(void)
-{
-#ifdef CONFIG_X86_LOCAL_APIC
-	apic_intr_init();
-#endif
-
-	setup_irq(7, &irq7);
-}
-
-/**
- * pre_setup_arch_hook - hook called prior to any setup_arch() execution
- *
- * Description:
- *	generally used to activate any machine specific identification
- *	routines that may be needed before setup_arch() runs.  On VISWS
- *	this is used to get the board revision and type.
- **/
-void __init pre_setup_arch_hook(void)
-{
-	SYS_DESC_TABLE.length = 0;
-	MCA_bus = 0;
-	/* In PC-9800, APM BIOS version is written in BCD...?? */
-	APM_BIOS_INFO.version = (APM_BIOS_INFO.version & 0xff00)
-				| ((APM_BIOS_INFO.version & 0x00f0) >> 4);
-}
-
-/**
- * trap_init_hook - initialise system specific traps
- *
- * Description:
- *	Called as the final act of trap_init().  Used in VISWS to initialise
- *	the various board specific APIC traps.
- **/
-void __init trap_init_hook(void)
-{
-}
-
-static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL};
-
-/**
- * time_init_hook - do any specific initialisations for the system timer.
- *
- * Description:
- *	Must plug the system timer interrupt source at HZ into the IRQ listed
- *	in irq_vectors.h:TIMER_IRQ
- **/
-void __init time_init_hook(void)
-{
-	setup_irq(0, &irq0);
-}
-
-#ifdef CONFIG_MCA
-/**
- * mca_nmi_hook - hook into MCA specific NMI chain
- *
- * Description:
- *	The MCA (Microchannel Architecture) has an NMI chain for NMI sources
- *	along the MCA bus.  Use this to hook into that chain if you will need
- *	it.
- **/
-void __init mca_nmi_hook(void)
-{
-	/* If I recall correctly, there's a whole bunch of other things that
-	 * we can do to check for NMI problems, but that's all I know about
-	 * at the moment.
-	 */
-
-	printk("NMI generated from unknown source!\n");
-}
-#endif
--- diff/arch/i386/mach-pc9800/std_resources.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-pc9800/std_resources.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,195 +0,0 @@
-/*
- *  Machine specific resource allocation for PC-9800.
- *  Written by Osamu Tomita <tomita@cinet.co.jp>
- */
-
-#include <linux/ioport.h>
-#include <asm/io.h>
-#include <asm/std_resources.h>
-
-static char str_pic1[] = "pic1";
-static char str_dma[] = "dma";
-static char str_pic2[] = "pic2";
-static char str_calender_clock[] = "calender clock";
-static char str_system[] = "system";
-static char str_nmi_control[] = "nmi control";
-static char str_kanji_rom[] = "kanji rom";
-static char str_keyboard[] = "keyboard";
-static char str_text_gdc[] = "text gdc";
-static char str_crtc[] = "crtc";
-static char str_timer[] = "timer";
-static char str_graphic_gdc[] = "graphic gdc";
-static char str_dma_ex_bank[] = "dma ex. bank";
-static char str_beep_freq[] = "beep freq.";
-static char str_mouse_pio[] = "mouse pio";
-struct resource standard_io_resources[] = {
-	{ str_pic1, 0x00, 0x00, IORESOURCE_BUSY },
-	{ str_dma, 0x01, 0x01, IORESOURCE_BUSY },
-	{ str_pic1, 0x02, 0x02, IORESOURCE_BUSY },
-	{ str_dma, 0x03, 0x03, IORESOURCE_BUSY },
-	{ str_dma, 0x05, 0x05, IORESOURCE_BUSY },
-	{ str_dma, 0x07, 0x07, IORESOURCE_BUSY },
-	{ str_pic2, 0x08, 0x08, IORESOURCE_BUSY },
-	{ str_dma, 0x09, 0x09, IORESOURCE_BUSY },
-	{ str_pic2, 0x0a, 0x0a, IORESOURCE_BUSY },
-	{ str_dma, 0x0b, 0x0b, IORESOURCE_BUSY },
-	{ str_dma, 0x0d, 0x0d, IORESOURCE_BUSY },
-	{ str_dma, 0x0f, 0x0f, IORESOURCE_BUSY },
-	{ str_dma, 0x11, 0x11, IORESOURCE_BUSY },
-	{ str_dma, 0x13, 0x13, IORESOURCE_BUSY },
-	{ str_dma, 0x15, 0x15, IORESOURCE_BUSY },
-	{ str_dma, 0x17, 0x17, IORESOURCE_BUSY },
-	{ str_dma, 0x19, 0x19, IORESOURCE_BUSY },
-	{ str_dma, 0x1b, 0x1b, IORESOURCE_BUSY },
-	{ str_dma, 0x1d, 0x1d, IORESOURCE_BUSY },
-	{ str_dma, 0x1f, 0x1f, IORESOURCE_BUSY },
-	{ str_calender_clock, 0x20, 0x20, 0 },
-	{ str_dma, 0x21, 0x21, IORESOURCE_BUSY },
-	{ str_calender_clock, 0x22, 0x22, 0 },
-	{ str_dma, 0x23, 0x23, IORESOURCE_BUSY },
-	{ str_dma, 0x25, 0x25, IORESOURCE_BUSY },
-	{ str_dma, 0x27, 0x27, IORESOURCE_BUSY },
-	{ str_dma, 0x29, 0x29, IORESOURCE_BUSY },
-	{ str_dma, 0x2b, 0x2b, IORESOURCE_BUSY },
-	{ str_dma, 0x2d, 0x2d, IORESOURCE_BUSY },
-	{ str_system, 0x31, 0x31, IORESOURCE_BUSY },
-	{ str_system, 0x33, 0x33, IORESOURCE_BUSY },
-	{ str_system, 0x35, 0x35, IORESOURCE_BUSY },
-	{ str_system, 0x37, 0x37, IORESOURCE_BUSY },
-	{ str_nmi_control, 0x50, 0x50, IORESOURCE_BUSY },
-	{ str_nmi_control, 0x52, 0x52, IORESOURCE_BUSY },
-	{ "time stamp", 0x5c, 0x5f, IORESOURCE_BUSY },
-	{ str_kanji_rom, 0xa1, 0xa1, IORESOURCE_BUSY },
-	{ str_kanji_rom, 0xa3, 0xa3, IORESOURCE_BUSY },
-	{ str_kanji_rom, 0xa5, 0xa5, IORESOURCE_BUSY },
-	{ str_kanji_rom, 0xa7, 0xa7, IORESOURCE_BUSY },
-	{ str_kanji_rom, 0xa9, 0xa9, IORESOURCE_BUSY },
-	{ str_keyboard, 0x41, 0x41, IORESOURCE_BUSY },
-	{ str_keyboard, 0x43, 0x43, IORESOURCE_BUSY },
-	{ str_text_gdc, 0x60, 0x60, IORESOURCE_BUSY },
-	{ str_text_gdc, 0x62, 0x62, IORESOURCE_BUSY },
-	{ str_text_gdc, 0x64, 0x64, IORESOURCE_BUSY },
-	{ str_text_gdc, 0x66, 0x66, IORESOURCE_BUSY },
-	{ str_text_gdc, 0x68, 0x68, IORESOURCE_BUSY },
-	{ str_text_gdc, 0x6a, 0x6a, IORESOURCE_BUSY },
-	{ str_text_gdc, 0x6c, 0x6c, IORESOURCE_BUSY },
-	{ str_text_gdc, 0x6e, 0x6e, IORESOURCE_BUSY },
-	{ str_crtc, 0x70, 0x70, IORESOURCE_BUSY },
-	{ str_crtc, 0x72, 0x72, IORESOURCE_BUSY },
-	{ str_crtc, 0x74, 0x74, IORESOURCE_BUSY },
-	{ str_crtc, 0x74, 0x74, IORESOURCE_BUSY },
-	{ str_crtc, 0x76, 0x76, IORESOURCE_BUSY },
-	{ str_crtc, 0x78, 0x78, IORESOURCE_BUSY },
-	{ str_crtc, 0x7a, 0x7a, IORESOURCE_BUSY },
-	{ str_timer, 0x71, 0x71, IORESOURCE_BUSY },
-	{ str_timer, 0x73, 0x73, IORESOURCE_BUSY },
-	{ str_timer, 0x75, 0x75, IORESOURCE_BUSY },
-	{ str_timer, 0x77, 0x77, IORESOURCE_BUSY },
-	{ str_graphic_gdc, 0xa0, 0xa0, IORESOURCE_BUSY },
-	{ str_graphic_gdc, 0xa2, 0xa2, IORESOURCE_BUSY },
-	{ str_graphic_gdc, 0xa4, 0xa4, IORESOURCE_BUSY },
-	{ str_graphic_gdc, 0xa6, 0xa6, IORESOURCE_BUSY },
-	{ "cpu", 0xf0, 0xf7, IORESOURCE_BUSY },
-	{ "fpu", 0xf8, 0xff, IORESOURCE_BUSY },
-	{ str_dma_ex_bank, 0x0e05, 0x0e05, 0 },
-	{ str_dma_ex_bank, 0x0e07, 0x0e07, 0 },
-	{ str_dma_ex_bank, 0x0e09, 0x0e09, 0 },
-	{ str_dma_ex_bank, 0x0e0b, 0x0e0b, 0 },
-	{ str_beep_freq, 0x3fd9, 0x3fd9, IORESOURCE_BUSY },
-	{ str_beep_freq, 0x3fdb, 0x3fdb, IORESOURCE_BUSY },
-	{ str_beep_freq, 0x3fdd, 0x3fdd, IORESOURCE_BUSY },
-	{ str_beep_freq, 0x3fdf, 0x3fdf, IORESOURCE_BUSY },
-	/* All PC-9800 have (exactly) one mouse interface.  */
-	{ str_mouse_pio, 0x7fd9, 0x7fd9, 0 },
-	{ str_mouse_pio, 0x7fdb, 0x7fdb, 0 },
-	{ str_mouse_pio, 0x7fdd, 0x7fdd, 0 },
-	{ str_mouse_pio, 0x7fdf, 0x7fdf, 0 },
-	{ "mouse timer", 0xbfdb, 0xbfdb, 0 },
-	{ "mouse irq", 0x98d7, 0x98d7, 0 },
-};
-
-#define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource))
-
-static struct resource tvram_resource = { "Text VRAM/CG window", 0xa0000, 0xa4fff, IORESOURCE_BUSY };
-static struct resource gvram_brg_resource = { "Graphic VRAM (B/R/G)", 0xa8000, 0xbffff, IORESOURCE_BUSY };
-static struct resource gvram_e_resource = { "Graphic VRAM (E)", 0xe0000, 0xe7fff, IORESOURCE_BUSY };
-
-/* System ROM resources */
-#define MAXROMS 6
-static struct resource rom_resources[MAXROMS] = {
-	{ "System ROM", 0xe8000, 0xfffff, IORESOURCE_BUSY }
-};
-
-void __init probe_roms(void)
-{
-	int i;
-	__u8 *xrom_id;
-	int roms = 1;
-
-	request_resource(&iomem_resource, rom_resources+0);
-
-	xrom_id = (__u8 *) isa_bus_to_virt(PC9800SCA_XROM_ID + 0x10);
-
-	for (i = 0; i < 16; i++) {
-		if (xrom_id[i] & 0x80) {
-			int j;
-
-			for (j = i + 1; j < 16 && (xrom_id[j] & 0x80); j++)
-				;
-			rom_resources[roms].start = 0x0d0000 + i * 0x001000;
-			rom_resources[roms].end = 0x0d0000 + j * 0x001000 - 1;
-			rom_resources[roms].name = "Extension ROM";
-			rom_resources[roms].flags = IORESOURCE_BUSY;
-
-			request_resource(&iomem_resource,
-					  rom_resources + roms);
-			if (++roms >= MAXROMS)
-				return;
-		}
-	}
-}
-
-void __init request_graphics_resource(void)
-{
-	int i;
-
-	if (PC9800_HIGHRESO_P()) {
-		tvram_resource.start = 0xe0000;
-		tvram_resource.end   = 0xe4fff;
-		gvram_brg_resource.name  = "Graphic VRAM";
-		gvram_brg_resource.start = 0xc0000;
-		gvram_brg_resource.end   = 0xdffff;
-	}
-
-	request_resource(&iomem_resource, &tvram_resource);
-	request_resource(&iomem_resource, &gvram_brg_resource);
-	if (!PC9800_HIGHRESO_P())
-		request_resource(&iomem_resource, &gvram_e_resource);
-
-	if (PC9800_HIGHRESO_P() || PC9800_9821_P()) {
-		static char graphics[] = "graphics";
-		static struct resource graphics_resources[] = {
-			{ graphics, 0x9a0, 0x9a0, 0 },
-			{ graphics, 0x9a2, 0x9a2, 0 },
-			{ graphics, 0x9a4, 0x9a4, 0 },
-			{ graphics, 0x9a6, 0x9a6, 0 },
-			{ graphics, 0x9a8, 0x9a8, 0 },
-			{ graphics, 0x9aa, 0x9aa, 0 },
-			{ graphics, 0x9ac, 0x9ac, 0 },
-			{ graphics, 0x9ae, 0x9ae, 0 },
-		};
-
-#define GRAPHICS_RESOURCES (sizeof(graphics_resources)/sizeof(struct resource))
-
-		for (i = 0; i < GRAPHICS_RESOURCES; i++)
-			request_resource(&ioport_resource, graphics_resources + i);
-	}
-}
-
-void __init request_standard_io_resources(void)
-{
-	int i;
-
-	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
-		request_resource(&ioport_resource, standard_io_resources+i);
-}
--- diff/arch/i386/mach-pc9800/topology.c	2004-05-19 22:11:01.000000000 +0100
+++ source/arch/i386/mach-pc9800/topology.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,44 +0,0 @@
-/*
- * arch/i386/mach-pc9800/topology.c - Populate driverfs with topology information
- *
- * Written by: Matthew Dobson, IBM Corporation
- * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL
- *
- * Copyright (C) 2002, IBM Corp.
- *
- * All rights reserved.          
- *
- * 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, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Modify for PC-9800 by Osamu Tomita <tomita@cinet.co.jp>
- *
- */
-#include <linux/init.h>
-#include <linux/smp.h>
-#include <asm/cpu.h>
-
-struct i386_cpu cpu_devices[NR_CPUS];
-
-static int __init topology_init(void)
-{
-	int i;
-
-	for (i = 0; i < NR_CPUS; i++)
-		if (cpu_possible(i)) arch_register_cpu(i);
-	return 0;
-}
-
-subsys_initcall(topology_init);
--- diff/arch/mips/mm-32/Makefile	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm-32/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-#
-# Makefile for the Linux/MIPS-specific parts of the memory manager.
-#
-
-obj-$(CONFIG_CPU_TX49XX)	+= tlbex-r4k.o
-obj-$(CONFIG_CPU_R4300)		+= tlbex-r4k.o
-obj-$(CONFIG_CPU_R4X00)		+= tlbex-r4k.o
-obj-$(CONFIG_CPU_VR41XX)	+= tlbex-r4k.o
-obj-$(CONFIG_CPU_R5000)		+= tlbex-r4k.o
-obj-$(CONFIG_CPU_NEVADA)	+= tlbex-r4k.o
-obj-$(CONFIG_CPU_R5432)		+= tlbex-r4k.o
-obj-$(CONFIG_CPU_RM7000)	+= tlbex-r4k.o
-obj-$(CONFIG_CPU_RM9000)	+= tlbex-r4k.o
-obj-$(CONFIG_CPU_R10000)	+= tlbex-r4k.o
-obj-$(CONFIG_CPU_MIPS32)	+= tlbex-r4k.o
-obj-$(CONFIG_CPU_MIPS64)	+= tlbex-r4k.o
-obj-$(CONFIG_CPU_SB1)		+= tlbex-r4k.o
-
-EXTRA_AFLAGS := $(CFLAGS)
--- diff/arch/mips/mm-32/tlbex-r4k.S	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm-32/tlbex-r4k.S	1970-01-01 01:00:00.000000000 +0100
@@ -1,524 +0,0 @@
-/*
- * TLB exception handling code for r4k.
- *
- * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
- *
- * Multi-cpu abstraction and reworking:
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- *
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
- */
-#include <linux/init.h>
-#include <linux/config.h>
-
-#include <asm/asm.h>
-#include <asm/offset.h>
-#include <asm/cachectl.h>
-#include <asm/fpregdef.h>
-#include <asm/mipsregs.h>
-#include <asm/page.h>
-#include <asm/pgtable-bits.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-#include <asm/war.h>
-
-#define TLB_OPTIMIZE /* If you are paranoid, disable this. */
-
-#ifdef CONFIG_64BIT_PHYS_ADDR
-#define PTE_L		ld
-#define PTE_S		sd
-#define PTE_SRL		dsrl
-#define P_MTC0		dmtc0
-#define PTE_SIZE	8
-#define PTEP_INDX_MSK	0xff0
-#define PTE_INDX_MSK	0xff8
-#define PTE_INDX_SHIFT	9
-#else
-#define PTE_L		lw
-#define PTE_S		sw
-#define PTE_SRL		srl
-#define P_MTC0		mtc0
-#define PTE_SIZE	4
-#define PTEP_INDX_MSK	0xff8
-#define PTE_INDX_MSK	0xffc
-#define PTE_INDX_SHIFT	10
-#endif
-
-/*
- * ABUSE of CPP macros 101.
- *
- * After this macro runs, the pte faulted on is
- * in register PTE, a ptr into the table in which
- * the pte belongs is in PTR.
- */
-
-#ifdef CONFIG_SMP
-#define GET_PGD(scratch, ptr)        \
-	mfc0    ptr, CP0_CONTEXT;    \
-	la      scratch, pgd_current;\
-	srl     ptr, 23;             \
-	sll     ptr, 2;              \
-	addu    ptr, scratch, ptr;   \
-	lw      ptr, (ptr);
-#else
-#define GET_PGD(scratch, ptr)    \
-	lw	ptr, pgd_current;
-#endif
-
-#define LOAD_PTE(pte, ptr) \
-	GET_PGD(pte, ptr)          \
-	mfc0	pte, CP0_BADVADDR; \
-	srl	pte, pte, _PGDIR_SHIFT; \
-	sll	pte, pte, 2; \
-	addu	ptr, ptr, pte; \
-	mfc0	pte, CP0_BADVADDR; \
-	lw	ptr, (ptr); \
-	srl	pte, pte, PTE_INDX_SHIFT; \
-	and	pte, pte, PTE_INDX_MSK; \
-	addu	ptr, ptr, pte; \
-	PTE_L	pte, (ptr);
-
-	/* This places the even/odd pte pair in the page
-	 * table at PTR into ENTRYLO0 and ENTRYLO1 using
-	 * TMP as a scratch register.
-	 */
-#define PTE_RELOAD(ptr, tmp) \
-	ori	ptr, ptr, PTE_SIZE; \
-	xori	ptr, ptr, PTE_SIZE; \
-	PTE_L	tmp, PTE_SIZE(ptr); \
-	PTE_L	ptr, 0(ptr); \
-	PTE_SRL	tmp, tmp, 6; \
-	P_MTC0	tmp, CP0_ENTRYLO1; \
-	PTE_SRL	ptr, ptr, 6; \
-	P_MTC0	ptr, CP0_ENTRYLO0;
-
-#define DO_FAULT(write) \
-	.set	noat; \
-	SAVE_ALL; \
-	mfc0	a2, CP0_BADVADDR; \
-	KMODE; \
-	.set	at; \
-	move	a0, sp; \
-	jal	do_page_fault; \
-	 li	a1, write; \
-	j	ret_from_exception; \
-	 nop; \
-	.set	noat;
-
-	/* Check is PTE is present, if not then jump to LABEL.
-	 * PTR points to the page table where this PTE is located,
-	 * when the macro is done executing PTE will be restored
-	 * with it's original value.
-	 */
-#define PTE_PRESENT(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	bnez	pte, label; \
-	 PTE_L	pte, (ptr);
-
-	/* Make PTE valid, store result in PTR. */
-#define PTE_MAKEVALID(pte, ptr) \
-	ori	pte, pte, (_PAGE_VALID | _PAGE_ACCESSED); \
-	PTE_S	pte, (ptr);
-
-	/* Check if PTE can be written to, if not branch to LABEL.
-	 * Regardless restore PTE with value from PTR when done.
-	 */
-#define PTE_WRITABLE(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	bnez	pte, label; \
-	 PTE_L	pte, (ptr);
-
-	/* Make PTE writable, update software status bits as well,
-	 * then store at PTR.
-	 */
-#define PTE_MAKEWRITE(pte, ptr) \
-	ori	pte, pte, (_PAGE_ACCESSED | _PAGE_MODIFIED | \
-			   _PAGE_VALID | _PAGE_DIRTY); \
-	PTE_S	pte, (ptr);
-
-	__INIT
-
-#ifdef CONFIG_64BIT_PHYS_ADDR
-#define GET_PTE_OFF(reg)
-#elif CONFIG_CPU_VR41XX
-#define GET_PTE_OFF(reg)	srl	reg, reg, 3
-#else
-#define GET_PTE_OFF(reg)	srl	reg, reg, 1
-#endif
-
-/*
- * These handlers much be written in a relocatable manner
- * because based upon the cpu type an arbitrary one of the
- * following pieces of code will be copied to the KSEG0
- * vector location.
- */
-	/* TLB refill, EXL == 0, R4xx0, non-R4600 version */
-	.set	noreorder
-	.set	noat
-	LEAF(except_vec0_r4000)
-	.set	mips3
-	GET_PGD(k0, k1)				# get pgd pointer
-	mfc0	k0, CP0_BADVADDR		# Get faulting address
-	srl	k0, k0, _PGDIR_SHIFT		# get pgd only bits
-
-	sll	k0, k0, 2
-	addu	k1, k1, k0			# add in pgd offset
-	mfc0	k0, CP0_CONTEXT			# get context reg
-	lw	k1, (k1)
-	GET_PTE_OFF(k0)				# get pte offset
-	and	k0, k0, PTEP_INDX_MSK
-	addu	k1, k1, k0			# add in offset
-	PTE_L	k0, 0(k1)			# get even pte
-	PTE_L	k1, PTE_SIZE(k1)		# get odd pte
-	PTE_SRL	k0, k0, 6			# convert to entrylo0
-	P_MTC0	k0, CP0_ENTRYLO0		# load it
-	PTE_SRL	k1, k1, 6			# convert to entrylo1
-	P_MTC0	k1, CP0_ENTRYLO1		# load it
-	mtc0_tlbw_hazard
-	tlbwr					# write random tlb entry
-	tlbw_eret_hazard
-	eret					# return from trap
-	END(except_vec0_r4000)
-
-	/* TLB refill, EXL == 0, R4600 version */
-	LEAF(except_vec0_r4600)
-	.set	mips3
-	GET_PGD(k0, k1)				# get pgd pointer
-	mfc0	k0, CP0_BADVADDR
-	srl	k0, k0, _PGDIR_SHIFT
-	sll	k0, k0, 2			# log2(sizeof(pgd_t)
-	addu	k1, k1, k0
-	mfc0	k0, CP0_CONTEXT
-	lw	k1, (k1)
-	GET_PTE_OFF(k0)				# get pte offset
-	and	k0, k0, PTEP_INDX_MSK
-	addu	k1, k1, k0
-	PTE_L	k0, 0(k1)
-	PTE_L	k1, PTE_SIZE(k1)
-	PTE_SRL	k0, k0, 6
-	P_MTC0	k0, CP0_ENTRYLO0
-	PTE_SRL	k1, k1, 6
-	P_MTC0	k1, CP0_ENTRYLO1
-	nop
-	tlbwr
-	nop
-	eret
-	END(except_vec0_r4600)
-
-	/* TLB refill, EXL == 0, R52x0 "Nevada" version */
-        /*
-         * This version has a bug workaround for the Nevada.  It seems
-         * as if under certain circumstances the move from cp0_context
-         * might produce a bogus result when the mfc0 instruction and
-         * it's consumer are in a different cacheline or a load instruction,
-         * probably any memory reference, is between them.  This is
-         * potencially slower than the R4000 version, so we use this
-         * special version.
-         */
-	.set	noreorder
-	.set	noat
-	LEAF(except_vec0_nevada)
-	.set	mips3
-	mfc0	k0, CP0_BADVADDR		# Get faulting address
-	srl	k0, k0, _PGDIR_SHIFT		# get pgd only bits
-	lw	k1, pgd_current			# get pgd pointer
-	sll	k0, k0, 2			# log2(sizeof(pgd_t)
-	addu	k1, k1, k0			# add in pgd offset
-	lw	k1, (k1)
-	mfc0	k0, CP0_CONTEXT			# get context reg
-	GET_PTE_OFF(k0)				# get pte offset
-	and	k0, k0, PTEP_INDX_MSK
-	addu	k1, k1, k0			# add in offset
-	PTE_L	k0, 0(k1)			# get even pte
-	PTE_L	k1, PTE_SIZE(k1)		# get odd pte
-	PTE_SRL	k0, k0, 6			# convert to entrylo0
-	P_MTC0	k0, CP0_ENTRYLO0		# load it
-	PTE_SRL	k1, k1, 6			# convert to entrylo1
-	P_MTC0	k1, CP0_ENTRYLO1		# load it
-	nop					# QED specified nops
-	nop
-	tlbwr					# write random tlb entry
-	nop					# traditional nop
-	eret					# return from trap
-	END(except_vec0_nevada)
-
-	/* TLB refill, EXL == 0, SB1 with M3 errata handling version */
-	LEAF(except_vec0_sb1)
-#if BCM1250_M3_WAR
-	mfc0	k0, CP0_BADVADDR
-	mfc0	k1, CP0_ENTRYHI
-	xor	k0, k1
-	srl	k0, k0, PAGE_SHIFT+1
-	bnez	k0, 1f
-#endif
-	GET_PGD(k0, k1)				# get pgd pointer
-	mfc0	k0, CP0_BADVADDR		# Get faulting address
-	srl	k0, k0, _PGDIR_SHIFT		# get pgd only bits
-	sll	k0, k0, 2
-	addu	k1, k1, k0			# add in pgd offset
-	mfc0	k0, CP0_CONTEXT			# get context reg
-	lw	k1, (k1)
-	GET_PTE_OFF(k0)				# get pte offset
-	and	k0, k0, PTEP_INDX_MSK
-	addu	k1, k1, k0			# add in offset
-	PTE_L	k0, 0(k1)			# get even pte
-	PTE_L	k1, PTE_SIZE(k1)		# get odd pte
-	PTE_SRL	k0, k0, 6			# convert to entrylo0
-	P_MTC0	k0, CP0_ENTRYLO0		# load it
-	PTE_SRL	k1, k1, 6			# convert to entrylo1
-	P_MTC0	k1, CP0_ENTRYLO1		# load it
-	tlbwr					# write random tlb entry
-1:	eret					# return from trap
-	END(except_vec0_sb1)
-
-	/* TLB refill, EXL == 0, R4[40]00/R5000 badvaddr hwbug version */
-	LEAF(except_vec0_r45k_bvahwbug)
-	.set	mips3
-	GET_PGD(k0, k1)				# get pgd pointer
-	mfc0	k0, CP0_BADVADDR
-	srl	k0, k0, _PGDIR_SHIFT
-	sll	k0, k0, 2			# log2(sizeof(pgd_t)
-	addu	k1, k1, k0
-	mfc0	k0, CP0_CONTEXT
-	lw	k1, (k1)
-#ifndef CONFIG_64BIT_PHYS_ADDR
-	srl	k0, k0, 1
-#endif
-	and	k0, k0, PTEP_INDX_MSK
-	addu	k1, k1, k0
-	PTE_L	k0, 0(k1)
-	PTE_L	k1, PTE_SIZE(k1)
-	nop				/* XXX */
-	tlbp
-	PTE_SRL	k0, k0, 6
-	P_MTC0	k0, CP0_ENTRYLO0
-	PTE_SRL	k1, k1, 6
-	mfc0	k0, CP0_INDEX
-	P_MTC0	k1, CP0_ENTRYLO1
-	bltzl	k0, 1f
-	tlbwr
-1:
-	nop
-	eret
-	END(except_vec0_r45k_bvahwbug)
-
-#ifdef CONFIG_SMP
-	/* TLB refill, EXL == 0, R4000 MP badvaddr hwbug version */
-	LEAF(except_vec0_r4k_mphwbug)
-	.set	mips3
-	GET_PGD(k0, k1)				# get pgd pointer
-	mfc0	k0, CP0_BADVADDR
-	srl	k0, k0, _PGDIR_SHIFT
-	sll	k0, k0, 2			# log2(sizeof(pgd_t)
-	addu	k1, k1, k0
-	mfc0	k0, CP0_CONTEXT
-	lw	k1, (k1)
-#ifndef CONFIG_64BIT_PHYS_ADDR
-	srl	k0, k0, 1
-#endif
-	and	k0, k0, PTEP_INDX_MSK
-	addu	k1, k1, k0
-	PTE_L	k0, 0(k1)
-	PTE_L	k1, PTE_SIZE(k1)
-	nop				/* XXX */
-	tlbp
-	PTE_SRL	k0, k0, 6
-	P_MTC0	k0, CP0_ENTRYLO0
-	PTE_SRL	k1, k1, 6
-	mfc0	k0, CP0_INDEX
-	P_MTC0	k1, CP0_ENTRYLO1
-	bltzl	k0, 1f
-	tlbwr
-1:
-	nop
-	eret
-	END(except_vec0_r4k_mphwbug)
-#endif
-
-	/* TLB refill, EXL == 0, R4000 UP 250MHZ entrylo[01] hwbug version */
-	LEAF(except_vec0_r4k_250MHZhwbug)
-	.set	mips3
-	GET_PGD(k0, k1)				# get pgd pointer
-	mfc0	k0, CP0_BADVADDR
-	srl	k0, k0, _PGDIR_SHIFT
-	sll	k0, k0, 2			# log2(sizeof(pgd_t)
-	addu	k1, k1, k0
-	mfc0	k0, CP0_CONTEXT
-	lw	k1, (k1)
-#ifndef CONFIG_64BIT_PHYS_ADDR
-	srl	k0, k0, 1
-#endif
-	and	k0, k0, PTEP_INDX_MSK
-	addu	k1, k1, k0
-	PTE_L	k0, 0(k1)
-	PTE_L	k1, PTE_SIZE(k1)
-	PTE_SRL	k0, k0, 6
-	P_MTC0	zero, CP0_ENTRYLO0
-	P_MTC0	k0, CP0_ENTRYLO0
-	PTE_SRL	k1, k1, 6
-	P_MTC0	zero, CP0_ENTRYLO1
-	P_MTC0	k1, CP0_ENTRYLO1
-	b	1f
-	tlbwr
-1:
-	nop
-	eret
-	END(except_vec0_r4k_250MHZhwbug)
-
-#ifdef CONFIG_SMP
-	/* TLB refill, EXL == 0, R4000 MP 250MHZ entrylo[01]+badvaddr bug version */
-	LEAF(except_vec0_r4k_MP250MHZhwbug)
-	.set	mips3
-	GET_PGD(k0, k1)				# get pgd pointer
-	mfc0	k0, CP0_BADVADDR
-	srl	k0, k0, _PGDIR_SHIFT
-	sll	k0, k0, 2			# log2(sizeof(pgd_t)
-	addu	k1, k1, k0
-	mfc0	k0, CP0_CONTEXT
-	lw	k1, (k1)
-#ifndef CONFIG_64BIT_PHYS_ADDR
-	srl	k0, k0, 1
-#endif
-	and	k0, k0, PTEP_INDX_MSK
-	addu	k1, k1, k0
-	PTE_L	k0, 0(k1)
-	PTE_L	k1, PTE_SIZE(k1)
-	nop				/* XXX */
-	tlbp
-	PTE_SRL	k0, k0, 6
-	P_MTC0  zero, CP0_ENTRYLO0
-	P_MTC0  k0, CP0_ENTRYLO0
-	mfc0    k0, CP0_INDEX
-	PTE_SRL	k1, k1, 6
-	P_MTC0	zero, CP0_ENTRYLO1
-	P_MTC0	k1, CP0_ENTRYLO1
-	bltzl	k0, 1f
-	tlbwr
-1:
-	nop
-	eret
-	END(except_vec0_r4k_MP250MHZhwbug)
-#endif
-
-	__FINIT
-
-	.set	noreorder
-
-/*
- * From the IDT errata for the QED RM5230 (Nevada), processor revision 1.0:
- * 2. A timing hazard exists for the TLBP instruction.
- *
- *      stalling_instruction
- *      TLBP
- *
- * The JTLB is being read for the TLBP throughout the stall generated by the
- * previous instruction. This is not really correct as the stalling instruction
- * can modify the address used to access the JTLB.  The failure symptom is that
- * the TLBP instruction will use an address created for the stalling instruction
- * and not the address held in C0_ENHI and thus report the wrong results.
- *
- * The software work-around is to not allow the instruction preceding the TLBP
- * to stall - make it an NOP or some other instruction guaranteed not to stall.
- *
- * Errata 2 will not be fixed.  This errata is also on the R5000.
- *
- * As if we MIPS hackers wouldn't know how to nop pipelines happy ...
- */
-#define R5K_HAZARD nop
-
-	/*
-	 * Note for many R4k variants tlb probes cannot be executed out
-	 * of the instruction cache else you get bogus results.
-	 */
-	.align	5
-	NESTED(handle_tlbl, PT_SIZE, sp)
-	.set	noat
-#if BCM1250_M3_WAR
-	mfc0	k0, CP0_BADVADDR
-	mfc0	k1, CP0_ENTRYHI
-	xor	k0, k1
-	srl	k0, k0, PAGE_SHIFT+1
-	beqz	k0, 1f
-	 nop
-	.set	mips3
-	eret
-	.set	mips0
-1:
-#endif
-invalid_tlbl:
-#ifdef TLB_OPTIMIZE
-	.set	mips3
-	/* Test present bit in entry. */
-	LOAD_PTE(k0, k1)
-	R5K_HAZARD
-	tlbp
-	PTE_PRESENT(k0, k1, nopage_tlbl)
-	PTE_MAKEVALID(k0, k1)
-	PTE_RELOAD(k1, k0)
-	mtc0_tlbw_hazard
-	tlbwi
-	tlbw_eret_hazard
-	.set	mips3
-	eret
-	.set	mips0
-#endif
-
-nopage_tlbl:
-	DO_FAULT(0)
-	END(handle_tlbl)
-
-	.align	5
-	NESTED(handle_tlbs, PT_SIZE, sp)
-	.set	noat
-#ifdef TLB_OPTIMIZE
-	.set	mips3
-        li      k0,0
-	LOAD_PTE(k0, k1)
-	R5K_HAZARD
-	tlbp				# find faulting entry
-	PTE_WRITABLE(k0, k1, nopage_tlbs)
-	PTE_MAKEWRITE(k0, k1)
-	PTE_RELOAD(k1, k0)
-	mtc0_tlbw_hazard
-	tlbwi
-	tlbw_eret_hazard
-	.set	mips3
-	eret
-	.set	mips0
-#endif
-
-nopage_tlbs:
-	DO_FAULT(1)
-	END(handle_tlbs)
-
-	.align	5
-	NESTED(handle_mod, PT_SIZE, sp)
-	.set	noat
-#ifdef TLB_OPTIMIZE
-	.set	mips3
-	LOAD_PTE(k0, k1)
-	R5K_HAZARD
-	tlbp					# find faulting entry
-	andi	k0, k0, _PAGE_WRITE
-	beqz	k0, nowrite_mod
-	 PTE_L	k0, (k1)
-
-	/* Present and writable bits set, set accessed and dirty bits. */
-	PTE_MAKEWRITE(k0, k1)
-
-	/* Now reload the entry into the tlb. */
-	PTE_RELOAD(k1, k0)
-	mtc0_tlbw_hazard
-	tlbwi
-	tlbw_eret_hazard
-	.set	mips3
-	eret
-	.set	mips0
-#endif
-
-nowrite_mod:
-	DO_FAULT(1)
-	END(handle_mod)
--- diff/arch/mips/mm-64/Makefile	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm-64/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-#
-# Makefile for the Linux/MIPS-specific parts of the memory manager.
-#
-
-obj-y				:= tlbex-r4k.o
-
-obj-$(CONFIG_CPU_R4300)		+= tlb-glue-r4k.o
-obj-$(CONFIG_CPU_R4X00)		+= tlb-glue-r4k.o
-obj-$(CONFIG_CPU_R5000)		+= tlb-glue-r4k.o
-obj-$(CONFIG_CPU_NEVADA)	+= tlb-glue-r4k.o
-obj-$(CONFIG_CPU_R5432)		+= tlb-glue-r4k.o
-obj-$(CONFIG_CPU_RM7000)	+= tlb-glue-r4k.o
-obj-$(CONFIG_CPU_RM9000)	+= tlb-glue-r4k.o
-obj-$(CONFIG_CPU_R10000)	+= tlb-glue-r4k.o
-obj-$(CONFIG_CPU_SB1)		+= tlb-glue-sb1.o
-obj-$(CONFIG_CPU_MIPS64)	+= tlb-glue-r4k.o
-
-#
-# Debug TLB exception handler, currently unused
-#
-#obj-y				+=  tlb-dbg-r4k.o
-
-AFLAGS_tlb-glue-r4k.o := -P
-
-EXTRA_AFLAGS := $(CFLAGS)
--- diff/arch/mips/mm-64/tlb-dbg-r4k.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm-64/tlb-dbg-r4k.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,71 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1999 Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
- *
- * TLB debugging routines.  These perform horribly slow but can easily be
- * modified for debugging purposes.
- */
-#include <linux/linkage.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/ptrace.h>
-#include <asm/system.h>
-
-asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
-                              unsigned long address);
-
-asmlinkage void tlb_refill_debug(struct pt_regs regs)
-{
-	show_regs(&regs);
-	panic("%s called.  This Does Not Happen (TM).", __FUNCTION__);
-}
-
-asmlinkage void xtlb_refill_debug(struct pt_regs *regs)
-{
-	unsigned long addr;
-	pgd_t *pgd;
-	pmd_t *pmd;
-	pte_t *pte;
-
-	addr = regs->cp0_badvaddr & ~((PAGE_SIZE << 1) - 1);
-	pgd = pgd_offset(current->active_mm, addr);
-	pmd = pmd_offset(pgd, addr);
-	pte = pte_offset(pmd, addr);
-
-	write_c0_entrylo0(pte_val(pte[0]) >> 6);
-	write_c0_entrylo1(pte_val(pte[1]) >> 6);
-	__asm__ __volatile__("nop;nop;nop");
-
-	tlb_write_random();
-}
-
-asmlinkage void xtlb_mod_debug(struct pt_regs *regs)
-{
-	unsigned long addr;
-
-	addr = regs->cp0_badvaddr;
-	do_page_fault(regs, 1, addr);
-}
-
-asmlinkage void xtlb_tlbl_debug(struct pt_regs *regs)
-{
-	unsigned long addr;
-
-	addr = regs->cp0_badvaddr;
-	do_page_fault(regs, 0, addr);
-}
-
-asmlinkage void xtlb_tlbs_debug(struct pt_regs *regs)
-{
-	unsigned long addr;
-
-	addr = regs->cp0_badvaddr;
-	do_page_fault(regs, 1, addr);
-}
--- diff/arch/mips/mm-64/tlb-glue-r4k.S	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm-64/tlb-glue-r4k.S	1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1999 Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
- */
-#include <linux/init.h>
-#include <asm/mipsregs.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-
-	.macro	__BUILD_cli
-	CLI
-	.endm
-
-	.macro	__BUILD_sti
-	STI
-	.endm
-
-	.macro	__BUILD_kmode
-	KMODE
-	.endm
-
-	.macro	tlb_handler name interruptible writebit
-	NESTED(__\name, PT_SIZE, sp)
-	SAVE_ALL
-	dmfc0	a2, CP0_BADVADDR
-	__BUILD_\interruptible
-	li	a1, \writebit
-	sd	a2, PT_BVADDR(sp)
-	move	a0, sp
-	jal	do_page_fault
-	j	ret_from_exception
-	END(__\name)
-	.endm
-
-	tlb_handler	xtlb_mod kmode 1
-	tlb_handler	xtlb_tlbl kmode 0
-	tlb_handler	xtlb_tlbs kmode 1
--- diff/arch/mips/mm-64/tlb-glue-sb1.S	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm-64/tlb-glue-sb1.S	1970-01-01 01:00:00.000000000 +0100
@@ -1,66 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1999 Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
- */
-#include <linux/init.h>
-#include <asm/mipsregs.h>
-#include <asm/page.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-#include <asm/war.h>
-
-	.macro	__BUILD_cli
-	CLI
-	.endm
-
-	.macro	__BUILD_sti
-	STI
-	.endm
-
-	.macro	__BUILD_kmode
-	KMODE
-	.endm
-
-	.macro	tlb_handler name interruptible writebit
-	NESTED(__\name, PT_SIZE, sp)
-	SAVE_ALL
-	dmfc0	a2, CP0_BADVADDR
-	__BUILD_\interruptible
-	li	a1, \writebit
-	sd	a2, PT_BVADDR(sp)
-	move	a0, sp
-	jal	do_page_fault
-	j	ret_from_exception
-	END(__\name)
-	.endm
-
-	.macro	tlb_handler_m3 name interruptible writebit
-	NESTED(__\name, PT_SIZE, sp)
-	dmfc0	k0, CP0_BADVADDR
-	dmfc0	k1, CP0_ENTRYHI
-	xor	k0, k1
-	dsrl	k0, k0, PAGE_SHIFT + 1
-	bnez	k0, 1f
-	SAVE_ALL
-	dmfc0	a2, CP0_BADVADDR
-	__BUILD_\interruptible
-	li	a1, \writebit
-	sd	a2, PT_BVADDR(sp)
-	move	a0, sp
-	jal	do_page_fault
-1:
-	j	ret_from_exception
-	END(__\name)
-	.endm
-
-	tlb_handler	xtlb_mod kmode 1
-#if BCM1250_M3_WAR
-	tlb_handler_m3	xtlb_tlbl kmode 0
-#else
-	tlb_handler	xtlb_tlbl kmode 0
-#endif
-	tlb_handler	xtlb_tlbs kmode 1
--- diff/arch/mips/mm-64/tlbex-r4k.S	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm-64/tlbex-r4k.S	1970-01-01 01:00:00.000000000 +0100
@@ -1,203 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2000 Silicon Graphics, Inc.
- * Written by Ulf Carlsson (ulfc@engr.sgi.com)
- * Copyright (C) 2002  Maciej W. Rozycki
- */
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/threads.h>
-
-#include <asm/asm.h>
-#include <asm/hazards.h>
-#include <asm/regdef.h>
-#include <asm/mipsregs.h>
-#include <asm/stackframe.h>
-#include <asm/war.h>
-
-#define _VMALLOC_START	0xc000000000000000
-
-	/*
-	 * After this macro runs we have a pointer to the pte of the address
-	 * that caused the fault in PTR.
-	 */
-	.macro	LOAD_PTE2, ptr, tmp, kaddr
-#ifdef CONFIG_SMP
-	dmfc0	\ptr, CP0_CONTEXT
-	dmfc0	\tmp, CP0_BADVADDR
-	dsra	\ptr, 23			# get pgd_current[cpu]
-#else
-	dmfc0	\tmp, CP0_BADVADDR
-	dla	\ptr, pgd_current
-#endif
-	bltz	\tmp, \kaddr
-	 ld	\ptr, (\ptr)
-	dsrl	\tmp, (_PGDIR_SHIFT-3)		# get pgd offset in bytes
-	andi	\tmp, ((_PTRS_PER_PGD - 1)<<3)
-	daddu	\ptr, \tmp			# add in pgd offset
-	dmfc0	\tmp, CP0_BADVADDR
-	ld	\ptr, (\ptr)			# get pmd pointer
-	dsrl	\tmp, (_PMD_SHIFT-3)		# get pmd offset in bytes
-	andi	\tmp, ((_PTRS_PER_PMD - 1)<<3)
-	daddu	\ptr, \tmp			# add in pmd offset
-	dmfc0	\tmp, CP0_XCONTEXT
-	ld	\ptr, (\ptr)			# get pte pointer
-	andi	\tmp, 0xff0			# get pte offset
-	daddu	\ptr, \tmp
-	.endm
-
-
-	/*
-	 * Ditto for the kernel table.
-	 */
-	.macro	LOAD_KPTE2, ptr, tmp, not_vmalloc
-	/*
-	 * First, determine that the address is in/above vmalloc range.
-	 */
-	dmfc0	\tmp, CP0_BADVADDR
-	dli	\ptr, _VMALLOC_START
-
-	/*
-	 * Now find offset into kptbl.
-	 */
-	dsubu	\tmp, \tmp, \ptr
-	dla	\ptr, kptbl
-	dsrl	\tmp, (_PAGE_SHIFT+1)		# get vpn2
-	dsll	\tmp, 4				# byte offset of pte
-	daddu	\ptr, \ptr, \tmp
-
-	/*
-	 * Determine that fault address is within vmalloc range.
-	 */
-	dla	\tmp, ekptbl
-	slt	\tmp, \ptr, \tmp
-	beqz	\tmp, \not_vmalloc		# not vmalloc
-	 nop
-	.endm
-
-
-	/*
-	 * This places the even/odd pte pair in the page table at the pte
-	 * entry pointed to by PTE into ENTRYLO0 and ENTRYLO1.
-	 */
-	.macro	PTE_RELOAD, pte0, pte1
-	dsrl	\pte0, 6			# convert to entrylo0
-	dmtc0	\pte0, CP0_ENTRYLO0		# load it
-	dsrl	\pte1, 6			# convert to entrylo1
-	dmtc0	\pte1, CP0_ENTRYLO1		# load it
-	.endm
-
-
-	.text
-	.set	noreorder
-	.set	mips3
-
-	__INIT
-
-	/*
-	 * TLB refill handlers for the R4000 and SB1.
-	 * Attention:  We may only use 32 instructions / 128 bytes.
-	 */
-	.align  5
-LEAF(except_vec1_r4k)
-	.set    noat
-	dla     k0, handle_vec1_r4k
-	jr      k0
-	 nop
-END(except_vec1_r4k)
-
-LEAF(except_vec1_sb1)
-#if BCM1250_M3_WAR
-	dmfc0	k0, CP0_BADVADDR
-	dmfc0	k1, CP0_ENTRYHI
-	xor	k0, k1
-	dsrl	k0, k0, _PAGE_SHIFT+1
-	bnez	k0, 1f
-#endif
-	.set    noat
-	dla     k0, handle_vec1_r4k
-	jr      k0
-	 nop
-
-1:	eret
-	nop
-END(except_vec1_sb1)
-
-	__FINIT
-
-	.align  5
-LEAF(handle_vec1_r4k)
-	.set    noat
-	LOAD_PTE2 k1 k0 9f
-	ld	k0, 0(k1)			# get even pte
-	ld	k1, 8(k1)			# get odd pte
-	PTE_RELOAD k0 k1
-	mtc0_tlbw_hazard
-	tlbwr
-	tlbw_eret_hazard
-	eret
-
-9:						# handle the vmalloc range
-	LOAD_KPTE2 k1 k0 invalid_vmalloc_address
-	ld	k0, 0(k1)			# get even pte
-	ld	k1, 8(k1)			# get odd pte
-	PTE_RELOAD k0 k1
-	mtc0_tlbw_hazard
-	 tlbwr
-	tlbw_eret_hazard
-	eret
-END(handle_vec1_r4k)
-
-
-	__INIT
-
-	/*
-	 * TLB refill handler for the R10000.
-	 * Attention:  We may only use 32 instructions / 128 bytes.
-	 */
-	.align	5
-LEAF(except_vec1_r10k)
-	.set    noat
-	dla     k0, handle_vec1_r10k
-	jr      k0
-	 nop
-END(except_vec1_r10k)
-
-	__FINIT
-
-	.align	5
-LEAF(handle_vec1_r10k)
-	.set	noat
-	LOAD_PTE2 k1 k0 9f
-	ld	k0, 0(k1)			# get even pte
-	ld	k1, 8(k1)			# get odd pte
-	PTE_RELOAD k0 k1
-	nop
-	tlbwr
-	eret
-
-9:						# handle the vmalloc range
-	LOAD_KPTE2 k1 k0 invalid_vmalloc_address
-	ld	k0, 0(k1)			# get even pte
-	ld	k1, 8(k1)			# get odd pte
-	PTE_RELOAD k0 k1
-	nop
-	tlbwr
-	eret
-END(handle_vec1_r10k)
-
-
-	.align	5
-LEAF(invalid_vmalloc_address)
-	.set	noat
-	SAVE_ALL
-	CLI
-	dmfc0	t0, CP0_BADVADDR
-	sd	t0, PT_BVADDR(sp)
-	move	a0, sp
-	jal	show_regs
-	PANIC("Invalid kernel address")
-END(invalid_vmalloc_address)
--- diff/arch/mips/mm/tlbex-r3k.S	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/mm/tlbex-r3k.S	1970-01-01 01:00:00.000000000 +0100
@@ -1,224 +0,0 @@
-/*
- * TLB exception handling code for R2000/R3000.
- *
- * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
- *
- * Multi-CPU abstraction reworking:
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- *
- * Further modifications to make this work:
- * Copyright (c) 1998 Harald Koerfgen
- * Copyright (c) 1998, 1999 Gleb Raiko & Vladimir Roganov
- * Copyright (c) 2001 Ralf Baechle
- * Copyright (c) 2001 MIPS Technologies, Inc.
- */
-#include <linux/init.h>
-#include <asm/asm.h>
-#include <asm/cachectl.h>
-#include <asm/fpregdef.h>
-#include <asm/mipsregs.h>
-#include <asm/page.h>
-#include <asm/pgtable-bits.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-
-#define TLB_OPTIMIZE /* If you are paranoid, disable this. */
-
-	.text
-	.set	mips1
-	.set	noreorder
-
-	__INIT
-
-	/* TLB refill, R[23]00 version */
-	LEAF(except_vec0_r2300)
-	.set	noat
-	.set	mips1
-	mfc0	k0, CP0_BADVADDR
-	lw	k1, pgd_current			# get pgd pointer
-	srl	k0, k0, 22
-	sll	k0, k0, 2
-	addu	k1, k1, k0
-	mfc0	k0, CP0_CONTEXT
-	lw	k1, (k1)
-	and	k0, k0, 0xffc
-	addu	k1, k1, k0
-	lw	k0, (k1)
-	nop
-	mtc0	k0, CP0_ENTRYLO0
-	mfc0	k1, CP0_EPC
-	tlbwr
-	jr	k1
-	rfe
-	END(except_vec0_r2300)
-
-	__FINIT
-
-	/* ABUSE of CPP macros 101. */
-
-	/* After this macro runs, the pte faulted on is
-	 * in register PTE, a ptr into the table in which
-	 * the pte belongs is in PTR.
-	 */
-#define LOAD_PTE(pte, ptr) \
-	mfc0	pte, CP0_BADVADDR; \
-	lw	ptr, pgd_current; \
-	srl	pte, pte, 22; \
-	sll	pte, pte, 2; \
-	addu	ptr, ptr, pte; \
-	mfc0	pte, CP0_CONTEXT; \
-	lw	ptr, (ptr); \
-	andi	pte, pte, 0xffc; \
-	addu	ptr, ptr, pte; \
-	lw	pte, (ptr); \
-	nop;
-
-	/* This places the even/odd pte pair in the page
-	 * table at PTR into ENTRYLO0 and ENTRYLO1 using
-	 * TMP as a scratch register.
-	 */
-#define PTE_RELOAD(ptr) \
-	lw	ptr, (ptr)	; \
-	nop			; \
-	mtc0	ptr, CP0_ENTRYLO0; \
-	nop;
-
-#define DO_FAULT(write) \
-	.set	noat; \
-	.set	macro; \
-	SAVE_ALL; \
-	mfc0	a2, CP0_BADVADDR; \
-	KMODE; \
-	.set	at; \
-	move	a0, sp; \
-	jal	do_page_fault; \
-	 li	a1, write; \
-	j	ret_from_exception; \
-	 nop; \
-	.set	noat; \
-	.set	nomacro;
-
-	/* Check is PTE is present, if not then jump to LABEL.
-	 * PTR points to the page table where this PTE is located,
-	 * when the macro is done executing PTE will be restored
-	 * with it's original value.
-	 */
-#define PTE_PRESENT(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	bnez	pte, label; \
-	.set	push;       \
-	.set	reorder;    \
-	 lw	pte, (ptr); \
-	.set	pop;
-
-	/* Make PTE valid, store result in PTR. */
-#define PTE_MAKEVALID(pte, ptr) \
-	ori	pte, pte, (_PAGE_VALID | _PAGE_ACCESSED); \
-	sw	pte, (ptr);
-
-	/* Check if PTE can be written to, if not branch to LABEL.
-	 * Regardless restore PTE with value from PTR when done.
-	 */
-#define PTE_WRITABLE(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	bnez	pte, label; \
-	.set    push;       \
-	.set    reorder;    \
-	lw      pte, (ptr); \
-	.set    pop;
-
-
-	/* Make PTE writable, update software status bits as well,
-	 * then store at PTR.
-	 */
-#define PTE_MAKEWRITE(pte, ptr) \
-	ori	pte, pte, (_PAGE_ACCESSED | _PAGE_MODIFIED | \
-			   _PAGE_VALID | _PAGE_DIRTY); \
-	sw	pte, (ptr);
-
-/*
- * The index register may have the probe fail bit set,
- * because we would trap on access kseg2, i.e. without refill.
- */
-#define TLB_WRITE(reg) \
-	mfc0	reg, CP0_INDEX; \
-	nop; \
-	bltz    reg, 1f; \
-	 nop; \
-	tlbwi; \
-	j	2f; \
-	 nop; \
-1:	tlbwr; \
-2:
-
-#define RET(reg) \
-	mfc0	reg, CP0_EPC; \
-	nop; \
-	jr	reg; \
-	 rfe
-
-	.set	noreorder
-
-	.align	5
-NESTED(handle_tlbl, PT_SIZE, sp)
-	.set	noat
-
-#ifdef TLB_OPTIMIZE
-	/* Test present bit in entry. */
-	LOAD_PTE(k0, k1)
-        tlbp
-        PTE_PRESENT(k0, k1, nopage_tlbl)
-        PTE_MAKEVALID(k0, k1)
-        PTE_RELOAD(k1)
-	TLB_WRITE(k0)
-	RET(k0)
-nopage_tlbl:
-#endif
-
-	DO_FAULT(0)
-END(handle_tlbl)
-
-NESTED(handle_tlbs, PT_SIZE, sp)
-	.set	noat
-
-#ifdef TLB_OPTIMIZE
-	LOAD_PTE(k0, k1)
-	tlbp                            # find faulting entry
-	PTE_WRITABLE(k0, k1, nopage_tlbs)
-	PTE_MAKEWRITE(k0, k1)
-	PTE_RELOAD(k1)
-	TLB_WRITE(k0)
-	RET(k0)
-nopage_tlbs:
-#endif
-
-	DO_FAULT(1)
-END(handle_tlbs)
-
-	.align	5
-NESTED(handle_mod, PT_SIZE, sp)
-	.set	noat
-#ifdef TLB_OPTIMIZE
-	LOAD_PTE(k0, k1)
-	tlbp					# find faulting entry
-	andi	k0, k0, _PAGE_WRITE
-	beqz	k0, nowrite_mod
-	.set	push
-	.set    reorder
-	lw	k0, (k1)
-	.set    pop
-
-	/* Present and writable bits set, set accessed and dirty bits. */
-	PTE_MAKEWRITE(k0, k1)
-
-	/* Now reload the entry into the tlb. */
-	PTE_RELOAD(k1)
-	tlbwi
-	RET(k0)
-#endif
-
-nowrite_mod:
-	DO_FAULT(1)
-END(handle_mod)
--- diff/arch/mips/momentum/ocelot_c/pci-irq.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_c/pci-irq.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,72 +0,0 @@
-/*
- * Copyright 2002 Momentum Computer Inc.
- * Author: Matthew Dharm <mdharm@momenco.com> 
- *
- * Based on work for the Linux port to the Ocelot board, which is
- * Copyright 2001 MontaVista Software Inc.
- * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
- *
- * arch/mips/momentum/ocelot_g/pci.c
- *     Board-specific PCI routines for mv64340 controller.
- *
- * 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.
- */
-#include <linux/types.h>
-#include <linux/pci.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <asm/pci.h>
-
-
-void __init mv64340_board_pcibios_fixup_bus(struct pci_bus *bus)
-{
-	struct pci_bus *current_bus = bus;
-	struct pci_dev *devices;
-	struct list_head *devices_link;
-	u16 cmd;
-
-	/* loop over all known devices on this bus */
-	list_for_each(devices_link, &(current_bus->devices)) {
-
-		devices = pci_dev_b(devices_link);
-		if (devices == NULL)
-			continue;
-
-		if ((current_bus->number == 0) &&
-			(PCI_SLOT(devices->devfn) == 1) &&
-			(PCI_FUNC(devices->devfn) == 0)) {
-			/* LSI 53C10101R SCSI (A) */
-			devices->irq = 2;
-		} else if ((current_bus->number == 0) &&
-			(PCI_SLOT(devices->devfn) == 1) &&
-			(PCI_FUNC(devices->devfn) == 1)) {
-			/* LSI 53C10101R SCSI (B) */
-			devices->irq = 2;
-		} else if ((current_bus->number == 1) &&
-			(PCI_SLOT(devices->devfn) == 1)) {
-			/* Intel 21555 bridge */
-			devices->irq = 12;
-		} else if ((current_bus->number == 1) &&
-			(PCI_SLOT(devices->devfn) == 2)) {
-			/* PMC Slot */
-			devices->irq = 4;
-		} else {
-			/* We don't have assign interrupts for other devices. */
-			devices->irq = 0xff;
-		}
-
-		/* Assign an interrupt number for the device */
-		bus->ops->write_byte(devices, PCI_INTERRUPT_LINE, devices->irq);
-
-		/* enable master for everything but the MV-64340 */
-		if (((current_bus->number != 0) && (current_bus->number != 1))
-				|| (PCI_SLOT(devices->devfn) != 0)) {
-			bus->ops->read_word(devices, PCI_COMMAND, &cmd);
-			cmd |= PCI_COMMAND_MASTER;
-			bus->ops->write_word(devices, PCI_COMMAND, cmd);
-		}
-	}
-}
--- diff/arch/mips/momentum/ocelot_g/gt64240.h	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_g/gt64240.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,1238 +0,0 @@
-/* gt64240r.h - GT-64240 Internal registers definition file */
-
-/* Copyright - Galileo technology. */
-
-#ifndef __INCgt64240rh
-#define __INCgt64240rh
-
-#define GTREG(v)        (((v) & 0xff) << 24) | (((v) & 0xff00) << 8) | \
-                        (((v) >> 24) & 0xff) | (((v) >> 8) & 0xff00)
-
-#if 0
-#define GTREG_SHORT(X)	(((X) << 8) | ((X) >> 8))
-
-#define LONG_GTREG(X)	((l64) \
-			(((X)&0x00000000000000ffULL) << 56) | \
-			(((X)&0x000000000000ff00ULL) << 40) | \
-			(((X)&0x0000000000ff0000ULL) << 24) | \
-			(((X)&0x00000000ff000000ULL) << 8)  | \
-			(((X)&0x000000ff00000000ULL) >> 8)  | \
-			(((X)&0x0000ff0000000000ULL) >> 24) | \
-			(((X)&0x00ff000000000000ULL) >> 40) | \
-			(((X)&0xff00000000000000ULL) >> 56))
-#endif
-
-#include "gt64240_dep.h"
-
-/****************************************/
-/* CPU Control Registers		*/
-/****************************************/
-
-#define CPU_CONFIGURATION					0x000
-#define CPU_MODE						0x120
-#define CPU_READ_RESPONSE_CROSSBAR_LOW				0x170
-#define CPU_READ_RESPONSE_CROSSBAR_HIGH				0x178
-
-/****************************************/
-/* Processor Address Space		*/
-/****************************************/
-
-/* Sdram's BAR'S */
-#define SCS_0_LOW_DECODE_ADDRESS				0x008
-#define SCS_0_HIGH_DECODE_ADDRESS				0x010
-#define SCS_1_LOW_DECODE_ADDRESS				0x208
-#define SCS_1_HIGH_DECODE_ADDRESS				0x210
-#define SCS_2_LOW_DECODE_ADDRESS				0x018
-#define SCS_2_HIGH_DECODE_ADDRESS				0x020
-#define SCS_3_LOW_DECODE_ADDRESS				0x218
-#define SCS_3_HIGH_DECODE_ADDRESS				0x220
-/* Devices BAR'S */
-#define CS_0_LOW_DECODE_ADDRESS					0x028
-#define CS_0_HIGH_DECODE_ADDRESS				0x030
-#define CS_1_LOW_DECODE_ADDRESS					0x228
-#define CS_1_HIGH_DECODE_ADDRESS				0x230
-#define CS_2_LOW_DECODE_ADDRESS					0x248
-#define CS_2_HIGH_DECODE_ADDRESS				0x250
-#define CS_3_LOW_DECODE_ADDRESS					0x038
-#define CS_3_HIGH_DECODE_ADDRESS				0x040
-#define BOOTCS_LOW_DECODE_ADDRESS				0x238
-#define BOOTCS_HIGH_DECODE_ADDRESS				0x240
-
-#define PCI_0I_O_LOW_DECODE_ADDRESS				0x048
-#define PCI_0I_O_HIGH_DECODE_ADDRESS				0x050
-#define PCI_0MEMORY0_LOW_DECODE_ADDRESS				0x058
-#define PCI_0MEMORY0_HIGH_DECODE_ADDRESS			0x060
-#define PCI_0MEMORY1_LOW_DECODE_ADDRESS				0x080
-#define PCI_0MEMORY1_HIGH_DECODE_ADDRESS			0x088
-#define PCI_0MEMORY2_LOW_DECODE_ADDRESS				0x258
-#define PCI_0MEMORY2_HIGH_DECODE_ADDRESS			0x260
-#define PCI_0MEMORY3_LOW_DECODE_ADDRESS				0x280
-#define PCI_0MEMORY3_HIGH_DECODE_ADDRESS			0x288
-
-#define PCI_1I_O_LOW_DECODE_ADDRESS				0x090
-#define PCI_1I_O_HIGH_DECODE_ADDRESS				0x098
-#define PCI_1MEMORY0_LOW_DECODE_ADDRESS				0x0a0
-#define PCI_1MEMORY0_HIGH_DECODE_ADDRESS			0x0a8
-#define PCI_1MEMORY1_LOW_DECODE_ADDRESS				0x0b0
-#define PCI_1MEMORY1_HIGH_DECODE_ADDRESS			0x0b8
-#define PCI_1MEMORY2_LOW_DECODE_ADDRESS				0x2a0
-#define PCI_1MEMORY2_HIGH_DECODE_ADDRESS			0x2a8
-#define PCI_1MEMORY3_LOW_DECODE_ADDRESS				0x2b0
-#define PCI_1MEMORY3_HIGH_DECODE_ADDRESS			0x2b8
-
-#define INTERNAL_SPACE_DECODE					0x068
-
-#define CPU_0_LOW_DECODE_ADDRESS                            0x290
-#define CPU_0_HIGH_DECODE_ADDRESS                           0x298
-#define CPU_1_LOW_DECODE_ADDRESS                            0x2c0
-#define CPU_1_HIGH_DECODE_ADDRESS                           0x2c8
-
-#define PCI_0I_O_ADDRESS_REMAP					0x0f0
-#define PCI_0MEMORY0_ADDRESS_REMAP  				0x0f8
-#define PCI_0MEMORY0_HIGH_ADDRESS_REMAP				0x320
-#define PCI_0MEMORY1_ADDRESS_REMAP  				0x100
-#define PCI_0MEMORY1_HIGH_ADDRESS_REMAP				0x328
-#define PCI_0MEMORY2_ADDRESS_REMAP  				0x2f8
-#define PCI_0MEMORY2_HIGH_ADDRESS_REMAP				0x330
-#define PCI_0MEMORY3_ADDRESS_REMAP  			  	0x300
-#define PCI_0MEMORY3_HIGH_ADDRESS_REMAP			   	0x338
-
-#define PCI_1I_O_ADDRESS_REMAP					0x108
-#define PCI_1MEMORY0_ADDRESS_REMAP  				0x110
-#define PCI_1MEMORY0_HIGH_ADDRESS_REMAP				0x340
-#define PCI_1MEMORY1_ADDRESS_REMAP  				0x118
-#define PCI_1MEMORY1_HIGH_ADDRESS_REMAP				0x348
-#define PCI_1MEMORY2_ADDRESS_REMAP  				0x310
-#define PCI_1MEMORY2_HIGH_ADDRESS_REMAP				0x350
-#define PCI_1MEMORY3_ADDRESS_REMAP  				0x318
-#define PCI_1MEMORY3_HIGH_ADDRESS_REMAP				0x358
-
-/****************************************/
-/* CPU Sync Barrier             		*/
-/****************************************/
-
-#define PCI_0SYNC_BARIER_VIRTUAL_REGISTER			0x0c0
-#define PCI_1SYNC_BARIER_VIRTUAL_REGISTER			0x0c8
-
-
-/****************************************/
-/* CPU Access Protect             		*/
-/****************************************/
-
-#define CPU_LOW_PROTECT_ADDRESS_0                           0X180
-#define CPU_HIGH_PROTECT_ADDRESS_0                          0X188
-#define CPU_LOW_PROTECT_ADDRESS_1                           0X190
-#define CPU_HIGH_PROTECT_ADDRESS_1                          0X198
-#define CPU_LOW_PROTECT_ADDRESS_2                           0X1a0
-#define CPU_HIGH_PROTECT_ADDRESS_2                          0X1a8
-#define CPU_LOW_PROTECT_ADDRESS_3                           0X1b0
-#define CPU_HIGH_PROTECT_ADDRESS_3                          0X1b8
-#define CPU_LOW_PROTECT_ADDRESS_4                           0X1c0
-#define CPU_HIGH_PROTECT_ADDRESS_4                          0X1c8
-#define CPU_LOW_PROTECT_ADDRESS_5                           0X1d0
-#define CPU_HIGH_PROTECT_ADDRESS_5                          0X1d8
-#define CPU_LOW_PROTECT_ADDRESS_6                           0X1e0
-#define CPU_HIGH_PROTECT_ADDRESS_6                          0X1e8
-#define CPU_LOW_PROTECT_ADDRESS_7                           0X1f0
-#define CPU_HIGH_PROTECT_ADDRESS_7                          0X1f8
-
-
-/****************************************/
-/*          Snoop Control          		*/
-/****************************************/
-
-#define SNOOP_BASE_ADDRESS_0                                0x380
-#define SNOOP_TOP_ADDRESS_0                                 0x388
-#define SNOOP_BASE_ADDRESS_1                                0x390
-#define SNOOP_TOP_ADDRESS_1                                 0x398
-#define SNOOP_BASE_ADDRESS_2                                0x3a0
-#define SNOOP_TOP_ADDRESS_2                                 0x3a8
-#define SNOOP_BASE_ADDRESS_3                                0x3b0
-#define SNOOP_TOP_ADDRESS_3                                 0x3b8
-
-/****************************************/
-/*          CPU Error Report       		*/
-/****************************************/
-
-#define CPU_ERROR_ADDRESS_LOW 				    0x070
-#define CPU_ERROR_ADDRESS_HIGH 				    0x078
-#define CPU_ERROR_DATA_LOW                                  0x128
-#define CPU_ERROR_DATA_HIGH                                 0x130
-#define CPU_ERROR_PARITY                                    0x138
-#define CPU_ERROR_CAUSE                                     0x140
-#define CPU_ERROR_MASK                                      0x148
-
-/****************************************/
-/*          Pslave Debug           		*/
-/****************************************/
-
-#define X_0_ADDRESS                                         0x360
-#define X_0_COMMAND_ID                                      0x368
-#define X_1_ADDRESS                                         0x370
-#define X_1_COMMAND_ID                                      0x378
-#define WRITE_DATA_LOW                                      0x3c0
-#define WRITE_DATA_HIGH                                     0x3c8
-#define WRITE_BYTE_ENABLE                                   0X3e0
-#define READ_DATA_LOW                                       0x3d0
-#define READ_DATA_HIGH                                      0x3d8
-#define READ_ID                                             0x3e8
-
-
-/****************************************/
-/* SDRAM and Device Address Space	*/
-/****************************************/
-
-
-/****************************************/
-/* SDRAM Configuration			*/
-/****************************************/
-
-#define SDRAM_CONFIGURATION	 			0x448
-#define SDRAM_OPERATION_MODE				0x474
-#define SDRAM_ADDRESS_DECODE				0x47C
-#define SDRAM_TIMING_PARAMETERS                         0x4b4
-#define SDRAM_UMA_CONTROL                               0x4a4
-#define SDRAM_CROSS_BAR_CONTROL_LOW                     0x4a8
-#define SDRAM_CROSS_BAR_CONTROL_HIGH                    0x4ac
-#define SDRAM_CROSS_BAR_TIMEOUT                         0x4b0
-
-
-/****************************************/
-/* SDRAM Parameters			*/
-/****************************************/
-
-#define SDRAM_BANK0PARAMETERS				0x44C
-#define SDRAM_BANK1PARAMETERS				0x450
-#define SDRAM_BANK2PARAMETERS				0x454
-#define SDRAM_BANK3PARAMETERS				0x458
-
-
-/****************************************/
-/* SDRAM Error Report 			*/
-/****************************************/
-
-#define SDRAM_ERROR_DATA_LOW                            0x484
-#define SDRAM_ERROR_DATA_HIGH                           0x480
-#define SDRAM_AND_DEVICE_ERROR_ADDRESS                  0x490
-#define SDRAM_RECEIVED_ECC                              0x488
-#define SDRAM_CALCULATED_ECC                            0x48c
-#define SDRAM_ECC_CONTROL                               0x494
-#define SDRAM_ECC_ERROR_COUNTER                         0x498
-
-
-/****************************************/
-/* SDunit Debug (for internal use)	*/
-/****************************************/
-
-#define X0_ADDRESS                                      0x500
-#define X0_COMMAND_AND_ID                               0x504
-#define X0_WRITE_DATA_LOW                               0x508
-#define X0_WRITE_DATA_HIGH                              0x50c
-#define X0_WRITE_BYTE_ENABLE                            0x518
-#define X0_READ_DATA_LOW                                0x510
-#define X0_READ_DATA_HIGH                               0x514
-#define X0_READ_ID                                      0x51c
-#define X1_ADDRESS                                      0x520
-#define X1_COMMAND_AND_ID                               0x524
-#define X1_WRITE_DATA_LOW                               0x528
-#define X1_WRITE_DATA_HIGH                              0x52c
-#define X1_WRITE_BYTE_ENABLE                            0x538
-#define X1_READ_DATA_LOW                                0x530
-#define X1_READ_DATA_HIGH                               0x534
-#define X1_READ_ID                                      0x53c
-#define X0_SNOOP_ADDRESS                                0x540
-#define X0_SNOOP_COMMAND                                0x544
-#define X1_SNOOP_ADDRESS                                0x548
-#define X1_SNOOP_COMMAND                                0x54c
-
-
-/****************************************/
-/* Device Parameters			*/
-/****************************************/
-
-#define DEVICE_BANK0PARAMETERS				0x45c
-#define DEVICE_BANK1PARAMETERS				0x460
-#define DEVICE_BANK2PARAMETERS				0x464
-#define DEVICE_BANK3PARAMETERS				0x468
-#define DEVICE_BOOT_BANK_PARAMETERS			0x46c
-#define DEVICE_CONTROL                                  0x4c0
-#define DEVICE_CROSS_BAR_CONTROL_LOW                    0x4c8
-#define DEVICE_CROSS_BAR_CONTROL_HIGH                   0x4cc
-#define DEVICE_CROSS_BAR_TIMEOUT                        0x4c4
-
-
-/****************************************/
-/* Device Interrupt 			*/
-/****************************************/
-
-#define DEVICE_INTERRUPT_CAUSE                              0x4d0
-#define DEVICE_INTERRUPT_MASK                               0x4d4
-#define DEVICE_ERROR_ADDRESS                                0x4d8
-
-/****************************************/
-/* DMA Record				*/
-/****************************************/
-
-#define CHANNEL0_DMA_BYTE_COUNT					0x800
-#define CHANNEL1_DMA_BYTE_COUNT	 				0x804
-#define CHANNEL2_DMA_BYTE_COUNT	 				0x808
-#define CHANNEL3_DMA_BYTE_COUNT	 				0x80C
-#define CHANNEL4_DMA_BYTE_COUNT					0x900
-#define CHANNEL5_DMA_BYTE_COUNT	 				0x904
-#define CHANNEL6_DMA_BYTE_COUNT	 				0x908
-#define CHANNEL7_DMA_BYTE_COUNT	 				0x90C
-#define CHANNEL0_DMA_SOURCE_ADDRESS				0x810
-#define CHANNEL1_DMA_SOURCE_ADDRESS				0x814
-#define CHANNEL2_DMA_SOURCE_ADDRESS				0x818
-#define CHANNEL3_DMA_SOURCE_ADDRESS				0x81C
-#define CHANNEL4_DMA_SOURCE_ADDRESS				0x910
-#define CHANNEL5_DMA_SOURCE_ADDRESS				0x914
-#define CHANNEL6_DMA_SOURCE_ADDRESS				0x918
-#define CHANNEL7_DMA_SOURCE_ADDRESS				0x91C
-#define CHANNEL0_DMA_DESTINATION_ADDRESS			0x820
-#define CHANNEL1_DMA_DESTINATION_ADDRESS			0x824
-#define CHANNEL2_DMA_DESTINATION_ADDRESS			0x828
-#define CHANNEL3_DMA_DESTINATION_ADDRESS			0x82C
-#define CHANNEL4_DMA_DESTINATION_ADDRESS			0x920
-#define CHANNEL5_DMA_DESTINATION_ADDRESS			0x924
-#define CHANNEL6_DMA_DESTINATION_ADDRESS			0x928
-#define CHANNEL7_DMA_DESTINATION_ADDRESS			0x92C
-#define CHANNEL0NEXT_RECORD_POINTER				0x830
-#define CHANNEL1NEXT_RECORD_POINTER				0x834
-#define CHANNEL2NEXT_RECORD_POINTER				0x838
-#define CHANNEL3NEXT_RECORD_POINTER				0x83C
-#define CHANNEL4NEXT_RECORD_POINTER				0x930
-#define CHANNEL5NEXT_RECORD_POINTER				0x934
-#define CHANNEL6NEXT_RECORD_POINTER				0x938
-#define CHANNEL7NEXT_RECORD_POINTER				0x93C
-#define CHANNEL0CURRENT_DESCRIPTOR_POINTER			0x870
-#define CHANNEL1CURRENT_DESCRIPTOR_POINTER			0x874
-#define CHANNEL2CURRENT_DESCRIPTOR_POINTER			0x878
-#define CHANNEL3CURRENT_DESCRIPTOR_POINTER			0x87C
-#define CHANNEL4CURRENT_DESCRIPTOR_POINTER			0x970
-#define CHANNEL5CURRENT_DESCRIPTOR_POINTER			0x974
-#define CHANNEL6CURRENT_DESCRIPTOR_POINTER			0x978
-#define CHANNEL7CURRENT_DESCRIPTOR_POINTER			0x97C
-#define CHANNEL0_DMA_SOURCE_HIGH_PCI_ADDRESS			0x890
-#define CHANNEL1_DMA_SOURCE_HIGH_PCI_ADDRESS			0x894
-#define CHANNEL2_DMA_SOURCE_HIGH_PCI_ADDRESS			0x898
-#define CHANNEL3_DMA_SOURCE_HIGH_PCI_ADDRESS			0x89c
-#define CHANNEL4_DMA_SOURCE_HIGH_PCI_ADDRESS			0x990
-#define CHANNEL5_DMA_SOURCE_HIGH_PCI_ADDRESS			0x994
-#define CHANNEL6_DMA_SOURCE_HIGH_PCI_ADDRESS			0x998
-#define CHANNEL7_DMA_SOURCE_HIGH_PCI_ADDRESS			0x99c
-#define CHANNEL0_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x8a0
-#define CHANNEL1_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x8a4
-#define CHANNEL2_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x8a8
-#define CHANNEL3_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x8ac
-#define CHANNEL4_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x9a0
-#define CHANNEL5_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x9a4
-#define CHANNEL6_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x9a8
-#define CHANNEL7_DMA_DESTINATION_HIGH_PCI_ADDRESS		0x9ac
-#define CHANNEL0_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x8b0
-#define CHANNEL1_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x8b4
-#define CHANNEL2_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x8b8
-#define CHANNEL3_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x8bc
-#define CHANNEL4_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x9b0
-#define CHANNEL5_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x9b4
-#define CHANNEL6_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x9b8
-#define CHANNEL7_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS	0x9bc
-
-/****************************************/
-/* DMA Channel Control			*/
-/****************************************/
-
-#define CHANNEL0CONTROL 					0x840
-#define CHANNEL0CONTROL_HIGH					0x880
-
-#define CHANNEL1CONTROL 					0x844
-#define CHANNEL1CONTROL_HIGH					0x884
-
-#define CHANNEL2CONTROL 					0x848
-#define CHANNEL2CONTROL_HIGH					0x888
-
-#define CHANNEL3CONTROL 					0x84C
-#define CHANNEL3CONTROL_HIGH					0x88C
-
-#define CHANNEL4CONTROL 					0x940
-#define CHANNEL4CONTROL_HIGH					0x980
-
-#define CHANNEL5CONTROL 					0x944
-#define CHANNEL5CONTROL_HIGH					0x984
-
-#define CHANNEL6CONTROL 					0x948
-#define CHANNEL6CONTROL_HIGH					0x988
-
-#define CHANNEL7CONTROL 					0x94C
-#define CHANNEL7CONTROL_HIGH					0x98C
-
-
-/****************************************/
-/* DMA Arbiter				*/
-/****************************************/
-
-#define ARBITER_CONTROL_0_3					0x860
-#define ARBITER_CONTROL_4_7					0x960
-
-
-/****************************************/
-/* DMA Interrupt			*/
-/****************************************/
-
-#define CHANELS0_3_INTERRUPT_CAUSE				0x8c0
-#define CHANELS0_3_INTERRUPT_MASK				0x8c4
-#define CHANELS0_3_ERROR_ADDRESS				0x8c8
-#define CHANELS0_3_ERROR_SELECT					0x8cc
-#define CHANELS4_7_INTERRUPT_CAUSE				0x9c0
-#define CHANELS4_7_INTERRUPT_MASK				0x9c4
-#define CHANELS4_7_ERROR_ADDRESS				0x9c8
-#define CHANELS4_7_ERROR_SELECT					0x9cc
-
-
-/****************************************/
-/* DMA Debug (for internal use)         */
-/****************************************/
-
-#define DMA_X0_ADDRESS                                      0x8e0
-#define DMA_X0_COMMAND_AND_ID                               0x8e4
-#define DMA_X0_WRITE_DATA_LOW                               0x8e8
-#define DMA_X0_WRITE_DATA_HIGH                              0x8ec
-#define DMA_X0_WRITE_BYTE_ENABLE                            0x8f8
-#define DMA_X0_READ_DATA_LOW                                0x8f0
-#define DMA_X0_READ_DATA_HIGH                               0x8f4
-#define DMA_X0_READ_ID                                      0x8fc
-#define DMA_X1_ADDRESS                                      0x9e0
-#define DMA_X1_COMMAND_AND_ID                               0x9e4
-#define DMA_X1_WRITE_DATA_LOW                               0x9e8
-#define DMA_X1_WRITE_DATA_HIGH                              0x9ec
-#define DMA_X1_WRITE_BYTE_ENABLE                            0x9f8
-#define DMA_X1_READ_DATA_LOW                                0x9f0
-#define DMA_X1_READ_DATA_HIGH                               0x9f4
-#define DMA_X1_READ_ID                                      0x9fc
-
-/****************************************/
-/* Timer_Counter 						*/
-/****************************************/
-
-#define TIMER_COUNTER0						0x850
-#define TIMER_COUNTER1						0x854
-#define TIMER_COUNTER2						0x858
-#define TIMER_COUNTER3						0x85C
-#define TIMER_COUNTER_0_3_CONTROL				0x864
-#define TIMER_COUNTER_0_3_INTERRUPT_CAUSE			0x868
-#define TIMER_COUNTER_0_3_INTERRUPT_MASK      			0x86c
-#define TIMER_COUNTER4						0x950
-#define TIMER_COUNTER5						0x954
-#define TIMER_COUNTER6						0x958
-#define TIMER_COUNTER7						0x95C
-#define TIMER_COUNTER_4_7_CONTROL				0x964
-#define TIMER_COUNTER_4_7_INTERRUPT_CAUSE			0x968
-#define TIMER_COUNTER_4_7_INTERRUPT_MASK      			0x96c
-
-/****************************************/
-/* PCI Slave Address Decoding           */
-/****************************************/
-
-#define PCI_0SCS_0_BANK_SIZE					0xc08
-#define PCI_1SCS_0_BANK_SIZE					0xc88
-#define PCI_0SCS_1_BANK_SIZE					0xd08
-#define PCI_1SCS_1_BANK_SIZE					0xd88
-#define PCI_0SCS_2_BANK_SIZE					0xc0c
-#define PCI_1SCS_2_BANK_SIZE					0xc8c
-#define PCI_0SCS_3_BANK_SIZE					0xd0c
-#define PCI_1SCS_3_BANK_SIZE					0xd8c
-#define PCI_0CS_0_BANK_SIZE				    	0xc10
-#define PCI_1CS_0_BANK_SIZE				    	0xc90
-#define PCI_0CS_1_BANK_SIZE				    	0xd10
-#define PCI_1CS_1_BANK_SIZE				    	0xd90
-#define PCI_0CS_2_BANK_SIZE				    	0xd18
-#define PCI_1CS_2_BANK_SIZE				    	0xd98
-#define PCI_0CS_3_BANK_SIZE			       		0xc14
-#define PCI_1CS_3_BANK_SIZE			       		0xc94
-#define PCI_0CS_BOOT_BANK_SIZE					0xd14
-#define PCI_1CS_BOOT_BANK_SIZE					0xd94
-#define PCI_0P2P_MEM0_BAR_SIZE                              0xd1c
-#define PCI_1P2P_MEM0_BAR_SIZE                              0xd9c
-#define PCI_0P2P_MEM1_BAR_SIZE                              0xd20
-#define PCI_1P2P_MEM1_BAR_SIZE                              0xda0
-#define PCI_0P2P_I_O_BAR_SIZE                               0xd24
-#define PCI_1P2P_I_O_BAR_SIZE                               0xda4
-#define PCI_0CPU_BAR_SIZE                                   0xd28
-#define PCI_1CPU_BAR_SIZE                                   0xda8
-#define PCI_0DAC_SCS_0_BANK_SIZE                            0xe00
-#define PCI_1DAC_SCS_0_BANK_SIZE                            0xe80
-#define PCI_0DAC_SCS_1_BANK_SIZE                            0xe04
-#define PCI_1DAC_SCS_1_BANK_SIZE                            0xe84
-#define PCI_0DAC_SCS_2_BANK_SIZE                            0xe08
-#define PCI_1DAC_SCS_2_BANK_SIZE                            0xe88
-#define PCI_0DAC_SCS_3_BANK_SIZE                            0xe0c
-#define PCI_1DAC_SCS_3_BANK_SIZE                            0xe8c
-#define PCI_0DAC_CS_0_BANK_SIZE                             0xe10
-#define PCI_1DAC_CS_0_BANK_SIZE                             0xe90
-#define PCI_0DAC_CS_1_BANK_SIZE                             0xe14
-#define PCI_1DAC_CS_1_BANK_SIZE                             0xe94
-#define PCI_0DAC_CS_2_BANK_SIZE                             0xe18
-#define PCI_1DAC_CS_2_BANK_SIZE                             0xe98
-#define PCI_0DAC_CS_3_BANK_SIZE                             0xe1c
-#define PCI_1DAC_CS_3_BANK_SIZE                             0xe9c
-#define PCI_0DAC_BOOTCS_BANK_SIZE                           0xe20
-#define PCI_1DAC_BOOTCS_BANK_SIZE                           0xea0
-#define PCI_0DAC_P2P_MEM0_BAR_SIZE                          0xe24
-#define PCI_1DAC_P2P_MEM0_BAR_SIZE                          0xea4
-#define PCI_0DAC_P2P_MEM1_BAR_SIZE                          0xe28
-#define PCI_1DAC_P2P_MEM1_BAR_SIZE                          0xea8
-#define PCI_0DAC_CPU_BAR_SIZE                               0xe2c
-#define PCI_1DAC_CPU_BAR_SIZE                               0xeac
-#define PCI_0EXPANSION_ROM_BAR_SIZE                         0xd2c
-#define PCI_1EXPANSION_ROM_BAR_SIZE                         0xdac
-#define PCI_0BASE_ADDRESS_REGISTERS_ENABLE 			0xc3c
-#define PCI_1BASE_ADDRESS_REGISTERS_ENABLE 			0xcbc
-#define PCI_0SCS_0_BASE_ADDRESS_REMAP				0xc48
-#define PCI_1SCS_0_BASE_ADDRESS_REMAP				0xcc8
-#define PCI_0SCS_1_BASE_ADDRESS_REMAP				0xd48
-#define PCI_1SCS_1_BASE_ADDRESS_REMAP				0xdc8
-#define PCI_0SCS_2_BASE_ADDRESS_REMAP				0xc4c
-#define PCI_1SCS_2_BASE_ADDRESS_REMAP				0xccc
-#define PCI_0SCS_3_BASE_ADDRESS_REMAP				0xd4c
-#define PCI_1SCS_3_BASE_ADDRESS_REMAP				0xdcc
-#define PCI_0CS_0_BASE_ADDRESS_REMAP				0xc50
-#define PCI_1CS_0_BASE_ADDRESS_REMAP				0xcd0
-#define PCI_0CS_1_BASE_ADDRESS_REMAP				0xd50
-#define PCI_1CS_1_BASE_ADDRESS_REMAP				0xdd0
-#define PCI_0CS_2_BASE_ADDRESS_REMAP				0xd58
-#define PCI_1CS_2_BASE_ADDRESS_REMAP				0xdd8
-#define PCI_0CS_3_BASE_ADDRESS_REMAP           			0xc54
-#define PCI_1CS_3_BASE_ADDRESS_REMAP           			0xcd4
-#define PCI_0CS_BOOTCS_BASE_ADDRESS_REMAP      			0xd54
-#define PCI_1CS_BOOTCS_BASE_ADDRESS_REMAP      			0xdd4
-#define PCI_0P2P_MEM0_BASE_ADDRESS_REMAP_LOW                0xd5c
-#define PCI_1P2P_MEM0_BASE_ADDRESS_REMAP_LOW                0xddc
-#define PCI_0P2P_MEM0_BASE_ADDRESS_REMAP_HIGH               0xd60
-#define PCI_1P2P_MEM0_BASE_ADDRESS_REMAP_HIGH               0xde0
-#define PCI_0P2P_MEM1_BASE_ADDRESS_REMAP_LOW                0xd64
-#define PCI_1P2P_MEM1_BASE_ADDRESS_REMAP_LOW                0xde4
-#define PCI_0P2P_MEM1_BASE_ADDRESS_REMAP_HIGH               0xd68
-#define PCI_1P2P_MEM1_BASE_ADDRESS_REMAP_HIGH               0xde8
-#define PCI_0P2P_I_O_BASE_ADDRESS_REMAP                     0xd6c
-#define PCI_1P2P_I_O_BASE_ADDRESS_REMAP                     0xdec
-#define PCI_0CPU_BASE_ADDRESS_REMAP                         0xd70
-#define PCI_1CPU_BASE_ADDRESS_REMAP                         0xdf0
-#define PCI_0DAC_SCS_0_BASE_ADDRESS_REMAP                   0xf00
-#define PCI_1DAC_SCS_0_BASE_ADDRESS_REMAP                   0xff0
-#define PCI_0DAC_SCS_1_BASE_ADDRESS_REMAP                   0xf04
-#define PCI_1DAC_SCS_1_BASE_ADDRESS_REMAP                   0xf84
-#define PCI_0DAC_SCS_2_BASE_ADDRESS_REMAP                   0xf08
-#define PCI_1DAC_SCS_2_BASE_ADDRESS_REMAP                   0xf88
-#define PCI_0DAC_SCS_3_BASE_ADDRESS_REMAP                   0xf0c
-#define PCI_1DAC_SCS_3_BASE_ADDRESS_REMAP                   0xf8c
-#define PCI_0DAC_CS_0_BASE_ADDRESS_REMAP                    0xf10
-#define PCI_1DAC_CS_0_BASE_ADDRESS_REMAP                    0xf90
-#define PCI_0DAC_CS_1_BASE_ADDRESS_REMAP                    0xf14
-#define PCI_1DAC_CS_1_BASE_ADDRESS_REMAP                    0xf94
-#define PCI_0DAC_CS_2_BASE_ADDRESS_REMAP                    0xf18
-#define PCI_1DAC_CS_2_BASE_ADDRESS_REMAP                    0xf98
-#define PCI_0DAC_CS_3_BASE_ADDRESS_REMAP                    0xf1c
-#define PCI_1DAC_CS_3_BASE_ADDRESS_REMAP                    0xf9c
-#define PCI_0DAC_BOOTCS_BASE_ADDRESS_REMAP                  0xf20
-#define PCI_1DAC_BOOTCS_BASE_ADDRESS_REMAP                  0xfa0
-#define PCI_0DAC_P2P_MEM0_BASE_ADDRESS_REMAP_LOW            0xf24
-#define PCI_1DAC_P2P_MEM0_BASE_ADDRESS_REMAP_LOW            0xfa4
-#define PCI_0DAC_P2P_MEM0_BASE_ADDRESS_REMAP_HIGH           0xf28
-#define PCI_1DAC_P2P_MEM0_BASE_ADDRESS_REMAP_HIGH           0xfa8
-#define PCI_0DAC_P2P_MEM1_BASE_ADDRESS_REMAP_LOW            0xf2c
-#define PCI_1DAC_P2P_MEM1_BASE_ADDRESS_REMAP_LOW            0xfac
-#define PCI_0DAC_P2P_MEM1_BASE_ADDRESS_REMAP_HIGH           0xf30
-#define PCI_1DAC_P2P_MEM1_BASE_ADDRESS_REMAP_HIGH           0xfb0
-#define PCI_0DAC_CPU_BASE_ADDRESS_REMAP                     0xf34
-#define PCI_1DAC_CPU_BASE_ADDRESS_REMAP                     0xfb4
-#define PCI_0EXPANSION_ROM_BASE_ADDRESS_REMAP               0xf38
-#define PCI_1EXPANSION_ROM_BASE_ADDRESS_REMAP               0xfb8
-#define PCI_0ADDRESS_DECODE_CONTROL                         0xd3c
-#define PCI_1ADDRESS_DECODE_CONTROL                         0xdbc
-
-/****************************************/
-/* PCI Control                          */
-/****************************************/
-
-#define PCI_0COMMAND						0xc00
-#define PCI_1COMMAND						0xc80
-#define PCI_0MODE                                           0xd00
-#define PCI_1MODE                                           0xd80
-#define PCI_0TIMEOUT_RETRY					0xc04
-#define PCI_1TIMEOUT_RETRY					0xc84
-#define PCI_0READ_BUFFER_DISCARD_TIMER                      0xd04
-#define PCI_1READ_BUFFER_DISCARD_TIMER                      0xd84
-#define MSI_0TRIGGER_TIMER                                  0xc38
-#define MSI_1TRIGGER_TIMER                                  0xcb8
-#define PCI_0ARBITER_CONTROL                                0x1d00
-#define PCI_1ARBITER_CONTROL                                0x1d80
-/* changing untill here */
-#define PCI_0CROSS_BAR_CONTROL_LOW                           0x1d08
-#define PCI_0CROSS_BAR_CONTROL_HIGH                          0x1d0c
-#define PCI_0CROSS_BAR_TIMEOUT                               0x1d04
-#define PCI_0READ_RESPONSE_CROSS_BAR_CONTROL_LOW             0x1d18
-#define PCI_0READ_RESPONSE_CROSS_BAR_CONTROL_HIGH            0x1d1c
-#define PCI_0SYNC_BARRIER_VIRTUAL_REGISTER                   0x1d10
-#define PCI_0P2P_CONFIGURATION                               0x1d14
-#define PCI_0ACCESS_CONTROL_BASE_0_LOW                       0x1e00
-#define PCI_0ACCESS_CONTROL_BASE_0_HIGH                      0x1e04
-#define PCI_0ACCESS_CONTROL_TOP_0                            0x1e08
-#define PCI_0ACCESS_CONTROL_BASE_1_LOW                       0c1e10
-#define PCI_0ACCESS_CONTROL_BASE_1_HIGH                      0x1e14
-#define PCI_0ACCESS_CONTROL_TOP_1                            0x1e18
-#define PCI_0ACCESS_CONTROL_BASE_2_LOW                       0c1e20
-#define PCI_0ACCESS_CONTROL_BASE_2_HIGH                      0x1e24
-#define PCI_0ACCESS_CONTROL_TOP_2                            0x1e28
-#define PCI_0ACCESS_CONTROL_BASE_3_LOW                       0c1e30
-#define PCI_0ACCESS_CONTROL_BASE_3_HIGH                      0x1e34
-#define PCI_0ACCESS_CONTROL_TOP_3                            0x1e38
-#define PCI_0ACCESS_CONTROL_BASE_4_LOW                       0c1e40
-#define PCI_0ACCESS_CONTROL_BASE_4_HIGH                      0x1e44
-#define PCI_0ACCESS_CONTROL_TOP_4                            0x1e48
-#define PCI_0ACCESS_CONTROL_BASE_5_LOW                       0c1e50
-#define PCI_0ACCESS_CONTROL_BASE_5_HIGH                      0x1e54
-#define PCI_0ACCESS_CONTROL_TOP_5                            0x1e58
-#define PCI_0ACCESS_CONTROL_BASE_6_LOW                       0c1e60
-#define PCI_0ACCESS_CONTROL_BASE_6_HIGH                      0x1e64
-#define PCI_0ACCESS_CONTROL_TOP_6                            0x1e68
-#define PCI_0ACCESS_CONTROL_BASE_7_LOW                       0c1e70
-#define PCI_0ACCESS_CONTROL_BASE_7_HIGH                      0x1e74
-#define PCI_0ACCESS_CONTROL_TOP_7                            0x1e78
-#define PCI_1CROSS_BAR_CONTROL_LOW                           0x1d88
-#define PCI_1CROSS_BAR_CONTROL_HIGH                          0x1d8c
-#define PCI_1CROSS_BAR_TIMEOUT                               0x1d84
-#define PCI_1READ_RESPONSE_CROSS_BAR_CONTROL_LOW             0x1d98
-#define PCI_1READ_RESPONSE_CROSS_BAR_CONTROL_HIGH            0x1d9c
-#define PCI_1SYNC_BARRIER_VIRTUAL_REGISTER                   0x1d90
-#define PCI_1P2P_CONFIGURATION                               0x1d94
-#define PCI_1ACCESS_CONTROL_BASE_0_LOW                       0x1e80
-#define PCI_1ACCESS_CONTROL_BASE_0_HIGH                      0x1e84
-#define PCI_1ACCESS_CONTROL_TOP_0                            0x1e88
-#define PCI_1ACCESS_CONTROL_BASE_1_LOW                       0c1e90
-#define PCI_1ACCESS_CONTROL_BASE_1_HIGH                      0x1e94
-#define PCI_1ACCESS_CONTROL_TOP_1                            0x1e98
-#define PCI_1ACCESS_CONTROL_BASE_2_LOW                       0c1ea0
-#define PCI_1ACCESS_CONTROL_BASE_2_HIGH                      0x1ea4
-#define PCI_1ACCESS_CONTROL_TOP_2                            0x1ea8
-#define PCI_1ACCESS_CONTROL_BASE_3_LOW                       0c1eb0
-#define PCI_1ACCESS_CONTROL_BASE_3_HIGH                      0x1eb4
-#define PCI_1ACCESS_CONTROL_TOP_3                            0x1eb8
-#define PCI_1ACCESS_CONTROL_BASE_4_LOW                       0c1ec0
-#define PCI_1ACCESS_CONTROL_BASE_4_HIGH                      0x1ec4
-#define PCI_1ACCESS_CONTROL_TOP_4                            0x1ec8
-#define PCI_1ACCESS_CONTROL_BASE_5_LOW                       0c1ed0
-#define PCI_1ACCESS_CONTROL_BASE_5_HIGH                      0x1ed4
-#define PCI_1ACCESS_CONTROL_TOP_5                            0x1ed8
-#define PCI_1ACCESS_CONTROL_BASE_6_LOW                       0c1ee0
-#define PCI_1ACCESS_CONTROL_BASE_6_HIGH                      0x1ee4
-#define PCI_1ACCESS_CONTROL_TOP_6                            0x1ee8
-#define PCI_1ACCESS_CONTROL_BASE_7_LOW                       0c1ef0
-#define PCI_1ACCESS_CONTROL_BASE_7_HIGH                      0x1ef4
-#define PCI_1ACCESS_CONTROL_TOP_7                            0x1ef8
-
-/****************************************/
-/* PCI Snoop Control                    */
-/****************************************/
-
-#define PCI_0SNOOP_CONTROL_BASE_0_LOW                        0x1f00
-#define PCI_0SNOOP_CONTROL_BASE_0_HIGH                       0x1f04
-#define PCI_0SNOOP_CONTROL_TOP_0                             0x1f08
-#define PCI_0SNOOP_CONTROL_BASE_1_0_LOW                      0x1f10
-#define PCI_0SNOOP_CONTROL_BASE_1_0_HIGH                     0x1f14
-#define PCI_0SNOOP_CONTROL_TOP_1                             0x1f18
-#define PCI_0SNOOP_CONTROL_BASE_2_0_LOW                      0x1f20
-#define PCI_0SNOOP_CONTROL_BASE_2_0_HIGH                     0x1f24
-#define PCI_0SNOOP_CONTROL_TOP_2                             0x1f28
-#define PCI_0SNOOP_CONTROL_BASE_3_0_LOW                      0x1f30
-#define PCI_0SNOOP_CONTROL_BASE_3_0_HIGH                     0x1f34
-#define PCI_0SNOOP_CONTROL_TOP_3                             0x1f38
-#define PCI_1SNOOP_CONTROL_BASE_0_LOW                        0x1f80
-#define PCI_1SNOOP_CONTROL_BASE_0_HIGH                       0x1f84
-#define PCI_1SNOOP_CONTROL_TOP_0                             0x1f88
-#define PCI_1SNOOP_CONTROL_BASE_1_0_LOW                      0x1f90
-#define PCI_1SNOOP_CONTROL_BASE_1_0_HIGH                     0x1f94
-#define PCI_1SNOOP_CONTROL_TOP_1                             0x1f98
-#define PCI_1SNOOP_CONTROL_BASE_2_0_LOW                      0x1fa0
-#define PCI_1SNOOP_CONTROL_BASE_2_0_HIGH                     0x1fa4
-#define PCI_1SNOOP_CONTROL_TOP_2                             0x1fa8
-#define PCI_1SNOOP_CONTROL_BASE_3_0_LOW                      0x1fb0
-#define PCI_1SNOOP_CONTROL_BASE_3_0_HIGH                     0x1fb4
-#define PCI_1SNOOP_CONTROL_TOP_3                             0x1fb8
-
-/****************************************/
-/* PCI Configuration Address            */
-/****************************************/
-
-#define PCI_0CONFIGURATION_ADDRESS 				0xcf8
-#define PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER           	0xcfc
-#define PCI_1CONFIGURATION_ADDRESS 				0xc78
-#define PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER           	0xc7c
-#define PCI_0INTERRUPT_ACKNOWLEDGE_VIRTUAL_REGISTER		0xc34
-#define PCI_1INTERRUPT_ACKNOWLEDGE_VIRTUAL_REGISTER		0xcb4
-
-/****************************************/
-/* PCI Error Report                     */
-/****************************************/
-
-#define PCI_0SERR_MASK						 0xc28
-#define PCI_0ERROR_ADDRESS_LOW                               0x1d40
-#define PCI_0ERROR_ADDRESS_HIGH                              0x1d44
-#define PCI_0ERROR_DATA_LOW                                  0x1d48
-#define PCI_0ERROR_DATA_HIGH                                 0x1d4c
-#define PCI_0ERROR_COMMAND                                   0x1d50
-#define PCI_0ERROR_CAUSE                                     0x1d58
-#define PCI_0ERROR_MASK                                      0x1d5c
-
-#define PCI_1SERR_MASK						 0xca8
-#define PCI_1ERROR_ADDRESS_LOW                               0x1dc0
-#define PCI_1ERROR_ADDRESS_HIGH                              0x1dc4
-#define PCI_1ERROR_DATA_LOW                                  0x1dc8
-#define PCI_1ERROR_DATA_HIGH                                 0x1dcc
-#define PCI_1ERROR_COMMAND                                   0x1dd0
-#define PCI_1ERROR_CAUSE                                     0x1dd8
-#define PCI_1ERROR_MASK                                      0x1ddc
-
-
-/****************************************/
-/* Lslave Debug  (for internal use)     */
-/****************************************/
-
-#define L_SLAVE_X0_ADDRESS                                  0x1d20
-#define L_SLAVE_X0_COMMAND_AND_ID                           0x1d24
-#define L_SLAVE_X1_ADDRESS                                  0x1d28
-#define L_SLAVE_X1_COMMAND_AND_ID                           0x1d2c
-#define L_SLAVE_WRITE_DATA_LOW                              0x1d30
-#define L_SLAVE_WRITE_DATA_HIGH                             0x1d34
-#define L_SLAVE_WRITE_BYTE_ENABLE                           0x1d60
-#define L_SLAVE_READ_DATA_LOW                               0x1d38
-#define L_SLAVE_READ_DATA_HIGH                              0x1d3c
-#define L_SLAVE_READ_ID                                     0x1d64
-
-/****************************************/
-/* PCI Configuration Function 0         */
-/****************************************/
-
-#define PCI_DEVICE_AND_VENDOR_ID 				0x000
-#define PCI_STATUS_AND_COMMAND					0x004
-#define PCI_CLASS_CODE_AND_REVISION_ID			        0x008
-#define PCI_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE 		0x00C
-#define PCI_SCS_0_BASE_ADDRESS	    				0x010
-#define PCI_SCS_1_BASE_ADDRESS 					0x014
-#define PCI_SCS_2_BASE_ADDRESS 					0x018
-#define PCI_SCS_3_BASE_ADDRESS      				0x01C
-#define PCI_INTERNAL_REGISTERS_MEMORY_MAPPED_BASE_ADDRESS	0x020
-#define PCI_INTERNAL_REGISTERS_I_OMAPPED_BASE_ADDRESS		0x024
-#define PCI_SUBSYSTEM_ID_AND_SUBSYSTEM_VENDOR_ID		0x02C
-#define PCI_EXPANSION_ROM_BASE_ADDRESS_REGISTER			0x030
-#define PCI_CAPABILTY_LIST_POINTER                          0x034
-#define PCI_INTERRUPT_PIN_AND_LINE 			    0x03C
-#define PCI_POWER_MANAGEMENT_CAPABILITY                     0x040
-#define PCI_POWER_MANAGEMENT_STATUS_AND_CONTROL             0x044
-#define PCI_VPD_ADDRESS                                     0x048
-#define PCI_VPD_DATA                                        0X04c
-#define PCI_MSI_MESSAGE_CONTROL                             0x050
-#define PCI_MSI_MESSAGE_ADDRESS                             0x054
-#define PCI_MSI_MESSAGE_UPPER_ADDRESS                       0x058
-#define PCI_MSI_MESSAGE_DATA                                0x05c
-#define PCI_COMPACT_PCI_HOT_SWAP_CAPABILITY                 0x058
-
-/****************************************/
-/* PCI Configuration Function 1         */
-/****************************************/
-
-#define PCI_CS_0_BASE_ADDRESS	    				0x110
-#define PCI_CS_1_BASE_ADDRESS 					0x114
-#define PCI_CS_2_BASE_ADDRESS 					0x118
-#define PCI_CS_3_BASE_ADDRESS     				0x11c
-#define PCI_BOOTCS_BASE_ADDRESS                     	    0x120
-
-/****************************************/
-/* PCI Configuration Function 2         */
-/****************************************/
-
-#define PCI_P2P_MEM0_BASE_ADDRESS	    			0x210
-#define PCI_P2P_MEM1_BASE_ADDRESS 				0x214
-#define PCI_P2P_I_O_BASE_ADDRESS 				0x218
-#define PCI_CPU_BASE_ADDRESS      				0x21c
-
-/****************************************/
-/* PCI Configuration Function 4         */
-/****************************************/
-
-#define PCI_DAC_SCS_0_BASE_ADDRESS_LOW 				0x410
-#define PCI_DAC_SCS_0_BASE_ADDRESS_HIGH			 	0x414
-#define PCI_DAC_SCS_1_BASE_ADDRESS_LOW   			0x418
-#define PCI_DAC_SCS_1_BASE_ADDRESS_HIGH  		    0x41c
-#define PCI_DAC_P2P_MEM0_BASE_ADDRESS_LOW              	    0x420
-#define PCI_DAC_P2P_MEM0_BASE_ADDRESS_HIGH             	    0x424
-
-
-/****************************************/
-/* PCI Configuration Function 5         */
-/****************************************/
-
-#define PCI_DAC_SCS_2_BASE_ADDRESS_LOW 				0x510
-#define PCI_DAC_SCS_2_BASE_ADDRESS_HIGH				0x514
-#define PCI_DAC_SCS_3_BASE_ADDRESS_LOW   		 	0x518
-#define PCI_DAC_SCS_3_BASE_ADDRESS_HIGH  		 	0x51c
-#define PCI_DAC_P2P_MEM1_BASE_ADDRESS_LOW              	    0x520
-#define PCI_DAC_P2P_MEM1_BASE_ADDRESS_HIGH             	    0x524
-
-
-/****************************************/
-/* PCI Configuration Function 6         */
-/****************************************/
-
-#define PCI_DAC_CS_0_BASE_ADDRESS_LOW 				0x610
-#define PCI_DAC_CS_0_BASE_ADDRESS_HIGH				0x614
-#define PCI_DAC_CS_1_BASE_ADDRESS_LOW   			0x618
-#define PCI_DAC_CS_1_BASE_ADDRESS_HIGH  			0x61c
-#define PCI_DAC_CS_2_BASE_ADDRESS_LOW            	        0x620
-#define PCI_DAC_CS_2_BASE_ADDRESS_HIGH           	        0x624
-
-/****************************************/
-/* PCI Configuration Function 7         */
-/****************************************/
-
-#define PCI_DAC_CS_3_BASE_ADDRESS_LOW 				0x710
-#define PCI_DAC_CS_3_BASE_ADDRESS_HIGH			 	0x714
-#define PCI_DAC_BOOTCS_BASE_ADDRESS_LOW   		 	0x718
-#define PCI_DAC_BOOTCS_BASE_ADDRESS_HIGH  			0x71c
-#define PCI_DAC_CPU_BASE_ADDRESS_LOW            	        0x720
-#define PCI_DAC_CPU_BASE_ADDRESS_HIGH           	        0x724
-
-/****************************************/
-/* Interrupts	  			*/
-/****************************************/
-
-#define LOW_INTERRUPT_CAUSE_REGISTER   				0xc18
-#define HIGH_INTERRUPT_CAUSE_REGISTER				0xc68
-#define CPU_INTERRUPT_MASK_REGISTER_LOW				0xc1c
-#define CPU_INTERRUPT_MASK_REGISTER_HIGH			0xc6c
-#define CPU_SELECT_CAUSE_REGISTER				0xc70
-#define PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW			0xc24
-#define PCI_0INTERRUPT_CAUSE_MASK_REGISTER_HIGH			0xc64
-#define PCI_0SELECT_CAUSE                                   0xc74
-#define PCI_1INTERRUPT_CAUSE_MASK_REGISTER_LOW			0xca4
-#define PCI_1INTERRUPT_CAUSE_MASK_REGISTER_HIGH			0xce4
-#define PCI_1SELECT_CAUSE                                   0xcf4
-#define CPU_INT_0_MASK                                      0xe60
-#define CPU_INT_1_MASK                                      0xe64
-#define CPU_INT_2_MASK                                      0xe68
-#define CPU_INT_3_MASK                                      0xe6c
-
-/****************************************/
-/* I20 Support registers		*/
-/****************************************/
-
-#define INBOUND_MESSAGE_REGISTER0_PCI0_SIDE			0x010
-#define INBOUND_MESSAGE_REGISTER1_PCI0_SIDE  			0x014
-#define OUTBOUND_MESSAGE_REGISTER0_PCI0_SIDE 			0x018
-#define OUTBOUND_MESSAGE_REGISTER1_PCI0_SIDE  			0x01C
-#define INBOUND_DOORBELL_REGISTER_PCI0_SIDE  			0x020
-#define INBOUND_INTERRUPT_CAUSE_REGISTER_PCI0_SIDE  		0x024
-#define INBOUND_INTERRUPT_MASK_REGISTER_PCI0_SIDE		0x028
-#define OUTBOUND_DOORBELL_REGISTER_PCI0_SIDE 			0x02C
-#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_PCI0_SIDE   		0x030
-#define OUTBOUND_INTERRUPT_MASK_REGISTER_PCI0_SIDE   		0x034
-#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI0_SIDE  		0x040
-#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI0_SIDE   	0x044
-#define QUEUE_CONTROL_REGISTER_PCI0_SIDE 			0x050
-#define QUEUE_BASE_ADDRESS_REGISTER_PCI0_SIDE 			0x054
-#define INBOUND_FREE_HEAD_POINTER_REGISTER_PCI0_SIDE		0x060
-#define INBOUND_FREE_TAIL_POINTER_REGISTER_PCI0_SIDE  		0x064
-#define INBOUND_POST_HEAD_POINTER_REGISTER_PCI0_SIDE 		0x068
-#define INBOUND_POST_TAIL_POINTER_REGISTER_PCI0_SIDE 		0x06C
-#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_PCI0_SIDE		0x070
-#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_PCI0_SIDE		0x074
-#define OUTBOUND_POST_HEAD_POINTER_REGISTER_PCI0_SIDE		0x0F8
-#define OUTBOUND_POST_TAIL_POINTER_REGISTER_PCI0_SIDE		0x0FC
-
-#define INBOUND_MESSAGE_REGISTER0_PCI1_SIDE				0x090
-#define INBOUND_MESSAGE_REGISTER1_PCI1_SIDE  				0x094
-#define OUTBOUND_MESSAGE_REGISTER0_PCI1_SIDE 				0x098
-#define OUTBOUND_MESSAGE_REGISTER1_PCI1_SIDE  				0x09C
-#define INBOUND_DOORBELL_REGISTER_PCI1_SIDE  				0x0A0
-#define INBOUND_INTERRUPT_CAUSE_REGISTER_PCI1_SIDE  		0x0A4
-#define INBOUND_INTERRUPT_MASK_REGISTER_PCI1_SIDE			0x0A8
-#define OUTBOUND_DOORBELL_REGISTER_PCI1_SIDE 				0x0AC
-#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_PCI1_SIDE   		0x0B0
-#define OUTBOUND_INTERRUPT_MASK_REGISTER_PCI1_SIDE   		0x0B4
-#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI1_SIDE  		0x0C0
-#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI1_SIDE   	0x0C4
-#define QUEUE_CONTROL_REGISTER_PCI1_SIDE 				0x0D0
-#define QUEUE_BASE_ADDRESS_REGISTER_PCI1_SIDE 				0x0D4
-#define INBOUND_FREE_HEAD_POINTER_REGISTER_PCI1_SIDE		0x0E0
-#define INBOUND_FREE_TAIL_POINTER_REGISTER_PCI1_SIDE  		0x0E4
-#define INBOUND_POST_HEAD_POINTER_REGISTER_PCI1_SIDE 		0x0E8
-#define INBOUND_POST_TAIL_POINTER_REGISTER_PCI1_SIDE 		0x0EC
-#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_PCI1_SIDE		0x0F0
-#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_PCI1_SIDE		0x0F4
-#define OUTBOUND_POST_HEAD_POINTER_REGISTER_PCI1_SIDE		0x078
-#define OUTBOUND_POST_TAIL_POINTER_REGISTER_PCI1_SIDE		0x07C
-
-#define INBOUND_MESSAGE_REGISTER0_CPU0_SIDE				0X1C10
-#define INBOUND_MESSAGE_REGISTER1_CPU0_SIDE  				0X1C14
-#define OUTBOUND_MESSAGE_REGISTER0_CPU0_SIDE 				0X1C18
-#define OUTBOUND_MESSAGE_REGISTER1_CPU0_SIDE  				0X1C1C
-#define INBOUND_DOORBELL_REGISTER_CPU0_SIDE  				0X1C20
-#define INBOUND_INTERRUPT_CAUSE_REGISTER_CPU0_SIDE  		0X1C24
-#define INBOUND_INTERRUPT_MASK_REGISTER_CPU0_SIDE			0X1C28
-#define OUTBOUND_DOORBELL_REGISTER_CPU0_SIDE 				0X1C2C
-#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_CPU0_SIDE   		0X1C30
-#define OUTBOUND_INTERRUPT_MASK_REGISTER_CPU0_SIDE   		0X1C34
-#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU0_SIDE  		0X1C40
-#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU0_SIDE   	0X1C44
-#define QUEUE_CONTROL_REGISTER_CPU0_SIDE 				0X1C50
-#define QUEUE_BASE_ADDRESS_REGISTER_CPU0_SIDE 				0X1C54
-#define INBOUND_FREE_HEAD_POINTER_REGISTER_CPU0_SIDE		0X1C60
-#define INBOUND_FREE_TAIL_POINTER_REGISTER_CPU0_SIDE  		0X1C64
-#define INBOUND_POST_HEAD_POINTER_REGISTER_CPU0_SIDE 		0X1C68
-#define INBOUND_POST_TAIL_POINTER_REGISTER_CPU0_SIDE 		0X1C6C
-#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_CPU0_SIDE		0X1C70
-#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_CPU0_SIDE		0X1C74
-#define OUTBOUND_POST_HEAD_POINTER_REGISTER_CPU0_SIDE		0X1CF8
-#define OUTBOUND_POST_TAIL_POINTER_REGISTER_CPU0_SIDE		0X1CFC
-
-#define INBOUND_MESSAGE_REGISTER0_CPU1_SIDE				0X1C90
-#define INBOUND_MESSAGE_REGISTER1_CPU1_SIDE  				0X1C94
-#define OUTBOUND_MESSAGE_REGISTER0_CPU1_SIDE 				0X1C98
-#define OUTBOUND_MESSAGE_REGISTER1_CPU1_SIDE  				0X1C9C
-#define INBOUND_DOORBELL_REGISTER_CPU1_SIDE  				0X1CA0
-#define INBOUND_INTERRUPT_CAUSE_REGISTER_CPU1_SIDE  		0X1CA4
-#define INBOUND_INTERRUPT_MASK_REGISTER_CPU1_SIDE			0X1CA8
-#define OUTBOUND_DOORBELL_REGISTER_CPU1_SIDE 				0X1CAC
-#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_CPU1_SIDE   		0X1CB0
-#define OUTBOUND_INTERRUPT_MASK_REGISTER_CPU1_SIDE   		0X1CB4
-#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU1_SIDE  		0X1CC0
-#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU1_SIDE   	0X1CC4
-#define QUEUE_CONTROL_REGISTER_CPU1_SIDE 				0X1CD0
-#define QUEUE_BASE_ADDRESS_REGISTER_CPU1_SIDE 				0X1CD4
-#define INBOUND_FREE_HEAD_POINTER_REGISTER_CPU1_SIDE		0X1CE0
-#define INBOUND_FREE_TAIL_POINTER_REGISTER_CPU1_SIDE  		0X1CE4
-#define INBOUND_POST_HEAD_POINTER_REGISTER_CPU1_SIDE 		0X1CE8
-#define INBOUND_POST_TAIL_POINTER_REGISTER_CPU1_SIDE 		0X1CEC
-#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_CPU1_SIDE		0X1CF0
-#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_CPU1_SIDE		0X1CF4
-#define OUTBOUND_POST_HEAD_POINTER_REGISTER_CPU1_SIDE		0X1C78
-#define OUTBOUND_POST_TAIL_POINTER_REGISTER_CPU1_SIDE		0X1C7C
-
-/****************************************/
-/* Communication Unit Registers         */
-/****************************************/
-
-#define ETHERNET_0_ADDRESS_CONTROL_LOW
-#define ETHERNET_0_ADDRESS_CONTROL_HIGH                     0xf204
-#define ETHERNET_0_RECEIVE_BUFFER_PCI_HIGH_ADDRESS          0xf208
-#define ETHERNET_0_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS         0xf20c
-#define ETHERNET_0_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS      0xf210
-#define ETHERNET_0_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS     0xf214
-#define ETHERNET_0_HASH_TABLE_PCI_HIGH_ADDRESS              0xf218
-#define ETHERNET_1_ADDRESS_CONTROL_LOW                      0xf220
-#define ETHERNET_1_ADDRESS_CONTROL_HIGH                     0xf224
-#define ETHERNET_1_RECEIVE_BUFFER_PCI_HIGH_ADDRESS          0xf228
-#define ETHERNET_1_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS         0xf22c
-#define ETHERNET_1_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS      0xf230
-#define ETHERNET_1_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS     0xf234
-#define ETHERNET_1_HASH_TABLE_PCI_HIGH_ADDRESS              0xf238
-#define ETHERNET_2_ADDRESS_CONTROL_LOW                      0xf240
-#define ETHERNET_2_ADDRESS_CONTROL_HIGH                     0xf244
-#define ETHERNET_2_RECEIVE_BUFFER_PCI_HIGH_ADDRESS          0xf248
-#define ETHERNET_2_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS         0xf24c
-#define ETHERNET_2_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS      0xf250
-#define ETHERNET_2_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS     0xf254
-#define ETHERNET_2_HASH_TABLE_PCI_HIGH_ADDRESS              0xf258
-#define MPSC_0_ADDRESS_CONTROL_LOW                          0xf280
-#define MPSC_0_ADDRESS_CONTROL_HIGH                         0xf284
-#define MPSC_0_RECEIVE_BUFFER_PCI_HIGH_ADDRESS              0xf288
-#define MPSC_0_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS             0xf28c
-#define MPSC_0_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS          0xf290
-#define MPSC_0_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS         0xf294
-#define MPSC_1_ADDRESS_CONTROL_LOW                          0xf2a0
-#define MPSC_1_ADDRESS_CONTROL_HIGH                         0xf2a4
-#define MPSC_1_RECEIVE_BUFFER_PCI_HIGH_ADDRESS              0xf2a8
-#define MPSC_1_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS             0xf2ac
-#define MPSC_1_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS          0xf2b0
-#define MPSC_1_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS         0xf2b4
-#define MPSC_2_ADDRESS_CONTROL_LOW                          0xf2c0
-#define MPSC_2_ADDRESS_CONTROL_HIGH                         0xf2c4
-#define MPSC_2_RECEIVE_BUFFER_PCI_HIGH_ADDRESS              0xf2c8
-#define MPSC_2_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS             0xf2cc
-#define MPSC_2_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS          0xf2d0
-#define MPSC_2_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS         0xf2d4
-#define SERIAL_INIT_PCI_HIGH_ADDRESS                        0xf320
-#define SERIAL_INIT_LAST_DATA                               0xf324
-#define SERIAL_INIT_STATUS_AND_CONTROL                      0xf328
-#define COMM_UNIT_ARBITER_CONTROL                           0xf300
-#define COMM_UNIT_CROSS_BAR_TIMEOUT                         0xf304
-#define COMM_UNIT_INTERRUPT_CAUSE                           0xf310
-#define COMM_UNIT_INTERRUPT_MASK                            0xf314
-#define COMM_UNIT_ERROR_ADDRESS                             0xf314
-
-/****************************************/
-/* Cunit Debug  (for internal use)     */
-/****************************************/
-
-#define CUNIT_ADDRESS                                       0xf340
-#define CUNIT_COMMAND_AND_ID                                0xf344
-#define CUNIT_WRITE_DATA_LOW                                0xf348
-#define CUNIT_WRITE_DATA_HIGH                               0xf34c
-#define CUNIT_WRITE_BYTE_ENABLE                             0xf358
-#define CUNIT_READ_DATA_LOW                                 0xf350
-#define CUNIT_READ_DATA_HIGH                                0xf354
-#define CUNIT_READ_ID                                       0xf35c
-
-/****************************************/
-/* Fast Ethernet Unit Registers         */
-/****************************************/
-
-/* Ethernet */
-
-#define ETHERNET_PHY_ADDRESS_REGISTER                       0x2000
-#define ETHERNET_SMI_REGISTER                               0x2010
-
-/* Ethernet 0 */
-
-#define ETHERNET0_PORT_CONFIGURATION_REGISTER               0x2400
-#define ETHERNET0_PORT_CONFIGURATION_EXTEND_REGISTER        0x2408
-#define ETHERNET0_PORT_COMMAND_REGISTER                     0x2410
-#define ETHERNET0_PORT_STATUS_REGISTER                      0x2418
-#define ETHERNET0_SERIAL_PARAMETRS_REGISTER                 0x2420
-#define ETHERNET0_HASH_TABLE_POINTER_REGISTER               0x2428
-#define ETHERNET0_FLOW_CONTROL_SOURCE_ADDRESS_LOW           0x2430
-#define ETHERNET0_FLOW_CONTROL_SOURCE_ADDRESS_HIGH          0x2438
-#define ETHERNET0_SDMA_CONFIGURATION_REGISTER               0x2440
-#define ETHERNET0_SDMA_COMMAND_REGISTER                     0x2448
-#define ETHERNET0_INTERRUPT_CAUSE_REGISTER                  0x2450
-#define ETHERNET0_INTERRUPT_MASK_REGISTER                   0x2458
-#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER0              0x2480
-#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER1              0x2484
-#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER2              0x2488
-#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER3              0x248c
-#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER0            0x24a0
-#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER1            0x24a4
-#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER2            0x24a8
-#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER3            0x24ac
-#define ETHERNET0_CURRENT_TX_DESCRIPTOR_POINTER0            0x24e0
-#define ETHERNET0_CURRENT_TX_DESCRIPTOR_POINTER1            0x24e4
-#define ETHERNET0_MIB_COUNTER_BASE                          0x2500
-
-/* Ethernet 1 */
-
-#define ETHERNET1_PORT_CONFIGURATION_REGISTER               0x2800
-#define ETHERNET1_PORT_CONFIGURATION_EXTEND_REGISTER        0x2808
-#define ETHERNET1_PORT_COMMAND_REGISTER                     0x2810
-#define ETHERNET1_PORT_STATUS_REGISTER                      0x2818
-#define ETHERNET1_SERIAL_PARAMETRS_REGISTER                 0x2820
-#define ETHERNET1_HASH_TABLE_POINTER_REGISTER               0x2828
-#define ETHERNET1_FLOW_CONTROL_SOURCE_ADDRESS_LOW           0x2830
-#define ETHERNET1_FLOW_CONTROL_SOURCE_ADDRESS_HIGH          0x2838
-#define ETHERNET1_SDMA_CONFIGURATION_REGISTER               0x2840
-#define ETHERNET1_SDMA_COMMAND_REGISTER                     0x2848
-#define ETHERNET1_INTERRUPT_CAUSE_REGISTER                  0x2850
-#define ETHERNET1_INTERRUPT_MASK_REGISTER                   0x2858
-#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER0              0x2880
-#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER1              0x2884
-#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER2              0x2888
-#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER3              0x288c
-#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER0            0x28a0
-#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER1            0x28a4
-#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER2            0x28a8
-#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER3            0x28ac
-#define ETHERNET1_CURRENT_TX_DESCRIPTOR_POINTER0            0x28e0
-#define ETHERNET1_CURRENT_TX_DESCRIPTOR_POINTER1            0x28e4
-#define ETHERNET1_MIB_COUNTER_BASE                          0x2900
-
-/* Ethernet 2 */
-
-#define ETHERNET2_PORT_CONFIGURATION_REGISTER               0x2c00
-#define ETHERNET2_PORT_CONFIGURATION_EXTEND_REGISTER        0x2c08
-#define ETHERNET2_PORT_COMMAND_REGISTER                     0x2c10
-#define ETHERNET2_PORT_STATUS_REGISTER                      0x2c18
-#define ETHERNET2_SERIAL_PARAMETRS_REGISTER                 0x2c20
-#define ETHERNET2_HASH_TABLE_POINTER_REGISTER               0x2c28
-#define ETHERNET2_FLOW_CONTROL_SOURCE_ADDRESS_LOW           0x2c30
-#define ETHERNET2_FLOW_CONTROL_SOURCE_ADDRESS_HIGH          0x2c38
-#define ETHERNET2_SDMA_CONFIGURATION_REGISTER               0x2c40
-#define ETHERNET2_SDMA_COMMAND_REGISTER                     0x2c48
-#define ETHERNET2_INTERRUPT_CAUSE_REGISTER                  0x2c50
-#define ETHERNET2_INTERRUPT_MASK_REGISTER                   0x2c58
-#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER0              0x2c80
-#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER1              0x2c84
-#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER2              0x2c88
-#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER3              0x2c8c
-#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER0            0x2ca0
-#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER1            0x2ca4
-#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER2            0x2ca8
-#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER3            0x2cac
-#define ETHERNET2_CURRENT_TX_DESCRIPTOR_POINTER0            0x2ce0
-#define ETHERNET2_CURRENT_TX_DESCRIPTOR_POINTER1            0x2ce4
-#define ETHERNET2_MIB_COUNTER_BASE                          0x2d00
-
-/****************************************/
-/* SDMA Registers                       */
-/****************************************/
-
-#define SDMA_GROUP_CONFIGURATION_REGISTER                   0xb1f0
-#define CHANNEL0_CONFIGURATION_REGISTER                     0x4000
-#define CHANNEL0_COMMAND_REGISTER                           0x4008
-#define CHANNEL0_RX_CMD_STATUS                              0x4800
-#define CHANNEL0_RX_PACKET_AND_BUFFER_SIZES                 0x4804
-#define CHANNEL0_RX_BUFFER_POINTER                          0x4808
-#define CHANNEL0_RX_NEXT_POINTER                            0x480c
-#define CHANNEL0_CURRENT_RX_DESCRIPTOR_POINTER              0x4810
-#define CHANNEL0_TX_CMD_STATUS                              0x4C00
-#define CHANNEL0_TX_PACKET_SIZE                             0x4C04
-#define CHANNEL0_TX_BUFFER_POINTER                          0x4C08
-#define CHANNEL0_TX_NEXT_POINTER                            0x4C0c
-#define CHANNEL0_CURRENT_TX_DESCRIPTOR_POINTER              0x4c10
-#define CHANNEL0_FIRST_TX_DESCRIPTOR_POINTER                0x4c14
-#define CHANNEL1_CONFIGURATION_REGISTER                     0x6000
-#define CHANNEL1_COMMAND_REGISTER                           0x6008
-#define CHANNEL1_RX_CMD_STATUS                              0x6800
-#define CHANNEL1_RX_PACKET_AND_BUFFER_SIZES                 0x6804
-#define CHANNEL1_RX_BUFFER_POINTER                          0x6808
-#define CHANNEL1_RX_NEXT_POINTER                            0x680c
-#define CHANNEL1_CURRENT_RX_DESCRIPTOR_POINTER              0x6810
-#define CHANNEL1_TX_CMD_STATUS                              0x6C00
-#define CHANNEL1_TX_PACKET_SIZE                             0x6C04
-#define CHANNEL1_TX_BUFFER_POINTER                          0x6C08
-#define CHANNEL1_TX_NEXT_POINTER                            0x6C0c
-#define CHANNEL1_CURRENT_RX_DESCRIPTOR_POINTER              0x6810
-#define CHANNEL1_CURRENT_TX_DESCRIPTOR_POINTER              0x6c10
-#define CHANNEL1_FIRST_TX_DESCRIPTOR_POINTER                0x6c14
-
-/* SDMA Interrupt */
-
-#define SDMA_CAUSE                                          0xb820
-#define SDMA_MASK                                           0xb8a0
-
-
-/****************************************/
-/* Baude Rate Generators Registers      */
-/****************************************/
-
-/* BRG 0 */
-
-#define BRG0_CONFIGURATION_REGISTER                         0xb200
-#define BRG0_BAUDE_TUNING_REGISTER                          0xb204
-
-/* BRG 1 */
-
-#define BRG1_CONFIGURATION_REGISTER                         0xb208
-#define BRG1_BAUDE_TUNING_REGISTER                          0xb20c
-
-/* BRG 2 */
-
-#define BRG2_CONFIGURATION_REGISTER                         0xb210
-#define BRG2_BAUDE_TUNING_REGISTER                          0xb214
-
-/* BRG Interrupts */
-
-#define BRG_CAUSE_REGISTER                                  0xb834
-#define BRG_MASK_REGISTER                                   0xb8b4
-
-/* MISC */
-
-#define MAIN_ROUTING_REGISTER                               0xb400
-#define RECEIVE_CLOCK_ROUTING_REGISTER                      0xb404
-#define TRANSMIT_CLOCK_ROUTING_REGISTER                     0xb408
-#define COMM_UNIT_ARBITER_CONFIGURATION_REGISTER            0xb40c
-#define WATCHDOG_CONFIGURATION_REGISTER                     0xb410
-#define WATCHDOG_VALUE_REGISTER                             0xb414
-
-
-/****************************************/
-/* Flex TDM Registers                   */
-/****************************************/
-
-/* FTDM Port */
-
-#define FLEXTDM_TRANSMIT_READ_POINTER                       0xa800
-#define FLEXTDM_RECEIVE_READ_POINTER                        0xa804
-#define FLEXTDM_CONFIGURATION_REGISTER                      0xa808
-#define FLEXTDM_AUX_CHANNELA_TX_REGISTER                    0xa80c
-#define FLEXTDM_AUX_CHANNELA_RX_REGISTER                    0xa810
-#define FLEXTDM_AUX_CHANNELB_TX_REGISTER                    0xa814
-#define FLEXTDM_AUX_CHANNELB_RX_REGISTER                    0xa818
-
-/* FTDM Interrupts */
-
-#define FTDM_CAUSE_REGISTER                                 0xb830
-#define FTDM_MASK_REGISTER                                  0xb8b0
-
-
-/****************************************/
-/* GPP Interface Registers              */
-/****************************************/
-
-#define GPP_IO_CONTROL                                      0xf100
-#define GPP_LEVEL_CONTROL                                   0xf110
-#define GPP_VALUE                                           0xf104
-#define GPP_INTERRUPT_CAUSE                                 0xf108
-#define GPP_INTERRUPT_MASK                                  0xf10c
-
-#define MPP_CONTROL0                                        0xf000
-#define MPP_CONTROL1                                        0xf004
-#define MPP_CONTROL2                                        0xf008
-#define MPP_CONTROL3                                        0xf00c
-#define DEBUG_PORT_MULTIPLEX                                0xf014
-#define SERIAL_PORT_MULTIPLEX                               0xf010
-
-/****************************************/
-/* I2C Registers                        */
-/****************************************/
-
-#define I2C_SLAVE_ADDRESS                                   0xc000
-#define I2C_EXTENDED_SLAVE_ADDRESS                          0xc040
-#define I2C_DATA                                            0xc004
-#define I2C_CONTROL                                         0xc008
-#define I2C_STATUS_BAUDE_RATE                               0xc00C
-#define I2C_SOFT_RESET                                      0xc01c
-
-/****************************************/
-/* MPSC Registers                       */
-/****************************************/
-
-/* MPSC0  */
-
-#define MPSC0_MAIN_CONFIGURATION_LOW                        0x8000
-#define MPSC0_MAIN_CONFIGURATION_HIGH                       0x8004
-#define MPSC0_PROTOCOL_CONFIGURATION                        0x8008
-#define CHANNEL0_REGISTER1                                  0x800c
-#define CHANNEL0_REGISTER2                                  0x8010
-#define CHANNEL0_REGISTER3                                  0x8014
-#define CHANNEL0_REGISTER4                                  0x8018
-#define CHANNEL0_REGISTER5                                  0x801c
-#define CHANNEL0_REGISTER6                                  0x8020
-#define CHANNEL0_REGISTER7                                  0x8024
-#define CHANNEL0_REGISTER8                                  0x8028
-#define CHANNEL0_REGISTER9                                  0x802c
-#define CHANNEL0_REGISTER10                                 0x8030
-#define CHANNEL0_REGISTER11                                 0x8034
-
-/* MPSC1  */
-
-#define MPSC1_MAIN_CONFIGURATION_LOW                        0x9000
-#define MPSC1_MAIN_CONFIGURATION_HIGH                       0x9004
-#define MPSC1_PROTOCOL_CONFIGURATION                        0x9008
-#define CHANNEL1_REGISTER1                                  0x900c
-#define CHANNEL1_REGISTER2                                  0x9010
-#define CHANNEL1_REGISTER3                                  0x9014
-#define CHANNEL1_REGISTER4                                  0x9018
-#define CHANNEL1_REGISTER5                                  0x901c
-#define CHANNEL1_REGISTER6                                  0x9020
-#define CHANNEL1_REGISTER7                                  0x9024
-#define CHANNEL1_REGISTER8                                  0x9028
-#define CHANNEL1_REGISTER9                                  0x902c
-#define CHANNEL1_REGISTER10                                 0x9030
-#define CHANNEL1_REGISTER11                                 0x9034
-
-/* MPSCs Interupts  */
-
-#define MPSC0_CAUSE                                         0xb804
-#define MPSC0_MASK                                          0xb884
-#define MPSC1_CAUSE                                         0xb80c
-#define MPSC1_MASK                                          0xb88c
-
-#endif /* __INCgt64240rh */
--- diff/arch/mips/momentum/ocelot_g/gt64240_dep.h	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_g/gt64240_dep.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,57 +0,0 @@
-/***********************************************************************
- * Copyright 2001 MontaVista Software Inc.
- * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
- *
- * arch/mips/gt64240/gt64240-dep.h
- *     Board-dependent definitions for GT-64120 chip.
- *
- * 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.
- ***********************************************************************
- */
-
-#ifndef _ASM_GT64240_DEP_H
-#define _ASM_GT64240_DEP_H
-
-#include <asm/addrspace.h>		/* for KSEG1ADDR() */
-#include <asm/byteorder.h>		/* for cpu_to_le32() */
-
-/*
- * PCI address allocation
- */
-#if 0
-#define GT_PCI_MEM_BASE    (0x22000000)
-#define GT_PCI_MEM_SIZE    GT_DEF_PCI0_MEM0_SIZE
-#define GT_PCI_IO_BASE     (0x20000000)
-#define GT_PCI_IO_SIZE     GT_DEF_PCI0_IO_SIZE
-#endif
-
-extern unsigned long gt64240_base;
-
-#define GT64240_BASE       (gt64240_base)
-
-/*
- * Because of an error/peculiarity in the Galileo chip, we need to swap the
- * bytes when running bigendian.
- */
-
-#define GT_WRITE(ofs, data)  \
-        *(volatile u32 *)(GT64240_BASE+(ofs)) = cpu_to_le32(data)
-#define GT_READ(ofs, data)   \
-        *(data) = le32_to_cpu(*(volatile u32 *)(GT64240_BASE+(ofs)))
-#define GT_READ_DATA(ofs)    \
-        le32_to_cpu(*(volatile u32 *)(GT64240_BASE+(ofs)))
-
-#define GT_WRITE_16(ofs, data)  \
-        *(volatile u16 *)(GT64240_BASE+(ofs)) = cpu_to_le16(data)
-#define GT_READ_16(ofs, data)   \
-        *(data) = le16_to_cpu(*(volatile u16 *)(GT64240_BASE+(ofs)))
-
-#define GT_WRITE_8(ofs, data)  \
-        *(volatile u8 *)(GT64240_BASE+(ofs)) = data
-#define GT_READ_8(ofs, data)   \
-        *(data) = *(volatile u8 *)(GT64240_BASE+(ofs))
-
-#endif  /* _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H */
--- diff/arch/mips/momentum/ocelot_g/pci-irq.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/momentum/ocelot_g/pci-irq.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,73 +0,0 @@
-/*
- * Copyright 2002 Momentum Computer Inc.
- * Author: Matthew Dharm <mdharm@momenco.com>
- *
- * Based on work for the Linux port to the Ocelot board, which is
- * Copyright 2001 MontaVista Software Inc.
- * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
- *
- * arch/mips/momentum/ocelot_g/pci.c
- *     Board-specific PCI routines for gt64240 controller.
- *
- * 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.
- */
-#include <linux/types.h>
-#include <linux/pci.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <asm/pci.h>
-
-
-void __devinit gt64240_board_pcibios_fixup_bus(struct pci_bus *bus)
-{
-	struct pci_bus *current_bus = bus;
-	struct pci_dev *devices;
-	struct list_head *devices_link;
-	u16 cmd;
-
-	/* loop over all known devices on this bus */
-	list_for_each(devices_link, &(current_bus->devices)) {
-
-		devices = pci_dev_b(devices_link);
-		if (devices == NULL)
-			continue;
-
-		if ((current_bus->number == 0) &&
-				PCI_SLOT(devices->devfn) == 1) {
-			/* Intel 82543 Gigabit MAC */
-			devices->irq = 2;       /* irq_nr is 2 for INT0 */
-		} else if ((current_bus->number == 0) &&
-				PCI_SLOT(devices->devfn) == 2) {
-			/* Intel 82543 Gigabit MAC */
-			devices->irq = 3;       /* irq_nr is 3 for INT1 */
-		} else if ((current_bus->number == 1) &&
-				PCI_SLOT(devices->devfn) == 3) {
-			/* Intel 21555 bridge */
-			devices->irq = 5;       /* irq_nr is 8 for INT6 */
-		} else if ((current_bus->number == 1) &&
-				PCI_SLOT(devices->devfn) == 4) {
-			/* PMC Slot */
-			devices->irq = 9;       /* irq_nr is 9 for INT7 */
-		} else {
-			/* We don't have assign interrupts for other devices. */
-			devices->irq = 0xff;
-		}
-
-		/* Assign an interrupt number for the device */
-		bus->ops->write(current_bus, devices,
-			PCI_INTERRUPT_LINE, 1, devices->irq);
-
-		/* enable master for everything but the GT-64240 */
-		if (((current_bus->number != 0) && (current_bus->number != 1))
-				|| (PCI_SLOT(devices->devfn) != 0)) {
-			bus->ops->read(current_bus, devices,
-					PCI_COMMAND, 2, &cmd);
-			cmd |= PCI_COMMAND_MASTER;
-			bus->ops->write(current_bus, devices,
-					PCI_COMMAND, 2, cmd);
-		}
-	}
-}
--- diff/arch/mips/pci/fixup-mv64340.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/fixup-mv64340.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Marvell MV64340 interrupt fixup code.
- *
- * Marvell wants an NDA for their docs so this was written without
- * documentation.  You've been warned.
- *
- * Copyright (C) 2004 Ralf Baechle
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-
-#include <asm/mipsregs.h>
-#include <asm/pci_channel.h>
-
-/*
- * WARNING: Example of how _NOT_ to do it.
- */
-int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
-{
-	int bus = dev->bus->number;
-
-	if (bus == 0 && slot == 1)
-		return 3;	/* PCI-X A */
-	if (bus == 0 && slot == 2)
-		return 4;	/* PCI-X B */
-	if (bus == 1 && slot == 1)
-		return 5;	/* PCI A */
-	if (bus == 1 && slot == 2)
-		return 6;	/* PCI B */
-
-return 0;
-	panic("Whooops in pcibios_map_irq");
-}
-
-struct pci_fixup pcibios_fixups[] = {
-	{0}
-};
--- diff/arch/mips/pci/fixup-tb0229.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/fixup-tb0229.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-/*
- * FILE NAME
- *	arch/mips/vr41xx/tanbac-tb0229/pci_fixup.c
- *
- * BRIEF MODULE DESCRIPTION
- *	The TANBAC TB0229(VR4131DIMM) specific PCI fixups.
- *
- * Copyright 2003 Megasolution Inc.
- *                matsu@megasolution.jp
- *
- *  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.
- */
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-
-#include <asm/vr41xx/tb0229.h>
-
-void __init pcibios_fixup_irqs(void)
-{
-#ifdef CONFIG_TANBAC_TB0219
-	struct pci_dev *dev = NULL;
-	u8 slot;
-
-	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
-		slot = PCI_SLOT(dev->devfn);
-		dev->irq = 0;
-
-		switch (slot) {
-		case 12:
-			vr41xx_set_irq_trigger(TB0219_PCI_SLOT1_PIN,
-					       TRIGGER_LEVEL,
-					       SIGNAL_THROUGH);
-			vr41xx_set_irq_level(TB0219_PCI_SLOT1_PIN,
-					     LEVEL_LOW);
-			dev->irq = TB0219_PCI_SLOT1_IRQ;
-			break;
-		case 13:
-			vr41xx_set_irq_trigger(TB0219_PCI_SLOT2_PIN,
-					       TRIGGER_LEVEL,
-					       SIGNAL_THROUGH);
-			vr41xx_set_irq_level(TB0219_PCI_SLOT2_PIN,
-					     LEVEL_LOW);
-			dev->irq = TB0219_PCI_SLOT2_IRQ;
-			break;
-		case 14:
-			vr41xx_set_irq_trigger(TB0219_PCI_SLOT3_PIN,
-					       TRIGGER_LEVEL,
-					       SIGNAL_THROUGH);
-			vr41xx_set_irq_level(TB0219_PCI_SLOT3_PIN,
-					     LEVEL_LOW);
-			dev->irq = TB0219_PCI_SLOT3_IRQ;
-			break;
-		default:
-			break;
-		}
-
-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
-	}
-#endif
-}
--- diff/arch/mips/pci/fixup-victor-mpc30x.c	2004-05-19 22:11:11.000000000 +0100
+++ source/arch/mips/pci/fixup-victor-mpc30x.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,48 +0,0 @@
-/*
- * FILE NAME
- *	arch/mips/vr41xx/victor-mpc30x/pci_fixup.c
- *
- * BRIEF MODULE DESCRIPTION
- *	The Victor MP-C303/304 specific PCI fixups.
- *
- * Copyright 2002 Yoichi Yuasa
- *                yuasa@hh.iij4u.or.jp
- *
- *  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.
- */
-#include <linux/init.h>
-#include <linux/pci.h>
-
-#include <asm/vr41xx/vrc4173.h>
-#include <asm/vr41xx/mpc30x.h>
-
-/*
- * Shortcuts
- */
-#define PCMCIA1	VRC4173_PCMCIA1_IRQ
-#define PCMCIA2	VRC4173_PCMCIA2_IRQ
-#define MQ	MQ200_IRQ
-
-static const int internal_func_irqs[8] __initdata = {
-	VRC4173_CASCADE_IRQ,
-	VRC4173_AC97_IRQ,
-	VRC4173_USB_IRQ,
-	
-};
-
-static char irq_tab_mpc30x[][5] __initdata = {
- [12] = { PCMCIA1, PCMCIA1, 0, 0 },
- [13] = { PCMCIA2, PCMCIA2, 0, 0 },
- [29] = {      MQ,      MQ, 0, 0 },		/* mediaQ MQ-200 */
-};
-
-int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
-{
-	if (slot == 30)
-		return internal_func_irqs[PCI_FUNC(dev->devfn)];
-
-	return irq_tab_mpc30x[slot][pin];
-}
--- diff/arch/mips/vr41xx/tanbac-tb0229/reboot.c	2004-05-19 22:11:12.000000000 +0100
+++ source/arch/mips/vr41xx/tanbac-tb0229/reboot.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/*
- * FILE NAME
- *	arch/mips/vr41xx/tanbac-tb0229/reboot.c
- *
- * BRIEF MODULE DESCRIPTION
- *	Depending on TANBAC TB0229(VR4131DIMM) of reboot system call.
- *
- * Copyright 2003 Megasolution Inc.
- *                matsu@megasolution.jp
- *
- *  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.
- */
-#include <linux/config.h>
-#include <asm/io.h>
-#include <asm/vr41xx/tb0229.h>
-
-#define tb0229_hard_reset()	writew(0, TB0219_RESET_REGS)
-
-void tanbac_tb0229_restart(char *command)
-{
-	local_irq_disable();
-	tb0229_hard_reset();
-	while (1);
-}
--- diff/arch/ppc/8260_io/commproc.c	2004-05-19 22:11:13.000000000 +0100
+++ source/arch/ppc/8260_io/commproc.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,179 +0,0 @@
-/*
- * General Purpose functions for the global management of the
- * 8260 Communication Processor Module.
- * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
- * Copyright (c) 2000 MontaVista Software, Inc (source@mvista.com)
- *	2.3.99 Updates
- *
- * In addition to the individual control of the communication
- * channels, there are a few functions that globally affect the
- * communication processor.
- *
- * Buffer descriptors must be allocated from the dual ported memory
- * space.  The allocator for that is here.  When the communication
- * process is reset, we reclaim the memory available.  There is
- * currently no deallocator for this memory.
- */
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
-#include <linux/bootmem.h>
-#include <asm/irq.h>
-#include <asm/mpc8260.h>
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/immap_8260.h>
-#include <asm/cpm_8260.h>
-
-static	uint	dp_alloc_base;	/* Starting offset in DP ram */
-static	uint	dp_alloc_top;	/* Max offset + 1 */
-static	uint	host_buffer;	/* One page of host buffer */
-static	uint	host_end;	/* end + 1 */
-cpm8260_t	*cpmp;		/* Pointer to comm processor space */
-
-/* We allocate this here because it is used almost exclusively for
- * the communication processor devices.
- */
-immap_t		*immr;
-
-void
-m8260_cpm_reset(void)
-{
-	volatile immap_t	 *imp;
-	volatile cpm8260_t	*commproc;
-	uint			vpgaddr;
-
-	immr = imp = (volatile immap_t *)IMAP_ADDR;
-	commproc = &imp->im_cpm;
-
-	/* Reclaim the DP memory for our use.
-	*/
-	dp_alloc_base = CPM_DATAONLY_BASE;
-	dp_alloc_top = dp_alloc_base + CPM_DATAONLY_SIZE;
-
-	/* Set the host page for allocation.
-	*/
-	host_buffer =
-		(uint) alloc_bootmem_pages(PAGE_SIZE * NUM_CPM_HOST_PAGES);
-	host_end = host_buffer + (PAGE_SIZE * NUM_CPM_HOST_PAGES);
-
-	vpgaddr = host_buffer;
-
-	/* Tell everyone where the comm processor resides.
-	*/
-	cpmp = (cpm8260_t *)commproc;
-}
-
-/* Allocate some memory from the dual ported ram.
- * To help protocols with object alignment restrictions, we do that
- * if they ask.
- */
-uint
-m8260_cpm_dpalloc(uint size, uint align)
-{
-	uint	retloc;
-	uint	align_mask, off;
-	uint	savebase;
-
-	align_mask = align - 1;
-	savebase = dp_alloc_base;
-
-	if ((off = (dp_alloc_base & align_mask)) != 0)
-		dp_alloc_base += (align - off);
-
-	if ((dp_alloc_base + size) >= dp_alloc_top) {
-		dp_alloc_base = savebase;
-		return(CPM_DP_NOSPACE);
-	}
-
-	retloc = dp_alloc_base;
-	dp_alloc_base += size;
-
-	return(retloc);
-}
-
-/* We also own one page of host buffer space for the allocation of
- * UART "fifos" and the like.
- */
-uint
-m8260_cpm_hostalloc(uint size, uint align)
-{
-	uint	retloc;
-	uint	align_mask, off;
-	uint	savebase;
-
-	align_mask = align - 1;
-	savebase = host_buffer;
-
-	if ((off = (host_buffer & align_mask)) != 0)
-		host_buffer += (align - off);
-
-	if ((host_buffer + size) >= host_end) {
-		host_buffer = savebase;
-		return(0);
-	}
-
-	retloc = host_buffer;
-	host_buffer += size;
-
-	return(retloc);
-}
-
-/* Set a baud rate generator.  This needs lots of work.  There are
- * eight BRGs, which can be connected to the CPM channels or output
- * as clocks.  The BRGs are in two different block of internal
- * memory mapped space.
- * The baud rate clock is the system clock divided by something.
- * It was set up long ago during the initial boot phase and is
- * is given to us.
- * Baud rate clocks are zero-based in the driver code (as that maps
- * to port numbers).  Documentation uses 1-based numbering.
- */
-#define BRG_INT_CLK	(((bd_t *)__res)->bi_brgfreq)
-#define BRG_UART_CLK	(BRG_INT_CLK/16)
-
-/* This function is used by UARTS, or anything else that uses a 16x
- * oversampled clock.
- */
-void
-m8260_cpm_setbrg(uint brg, uint rate)
-{
-	volatile uint	*bp;
-
-	/* This is good enough to get SMCs running.....
-	*/
-	if (brg < 4) {
-		bp = (uint *)&immr->im_brgc1;
-	}
-	else {
-		bp = (uint *)&immr->im_brgc5;
-		brg -= 4;
-	}
-	bp += brg;
-	*bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN;
-}
-
-/* This function is used to set high speed synchronous baud rate
- * clocks.
- */
-void
-m8260_cpm_fastbrg(uint brg, uint rate, int div16)
-{
-	volatile uint	*bp;
-
-	if (brg < 4) {
-		bp = (uint *)&immr->im_brgc1;
-	}
-	else {
-		bp = (uint *)&immr->im_brgc5;
-		brg -= 4;
-	}
-	bp += brg;
-	*bp = ((BRG_INT_CLK / rate) << 1) | CPM_BRG_EN;
-	if (div16)
-		*bp |= CPM_BRG_DIV16;
-}
--- diff/arch/ppc/8260_io/uart.c	2004-06-30 14:25:42.000000000 +0100
+++ source/arch/ppc/8260_io/uart.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,3061 +0,0 @@
-/*
- *  UART driver for MPC8260 CPM SCC or SMC
- *  Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
- *  Copyright (c) 2000 MontaVista Software, Inc. (source@mvista.com)
- *	2.3.99 updates
- *  Copyright (c) 2002 Allen Curtis, Ones and Zeros, Inc. (acurtis@onz.com)
- *	2.5.50 updates
- *  Fix the console driver to be registered with initcalls and some minor fixup
- *  for 2.6.2, by Petter Larsen, moreCom as (petter.larsen@morecom.no) and
- *  Miguel Valero, AxxessIT ASA (miguel.valero@axxessit.no)
- *
- * I used the 8xx uart.c driver as the framework for this driver.
- * The original code was written for the EST8260 board.  I tried to make
- * it generic, but there may be some assumptions in the structures that
- * have to be fixed later.
- *
- * The 8xx and 8260 are similar, but not identical.  Over time we
- * could probably merge these two drivers.
- * To save porting time, I did not bother to change any object names
- * that are not accessed outside of this file.
- * It still needs lots of work........When it was easy, I included code
- * to support the SCCs.
- * Only the SCCs support modem control, so that is not complete either.
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
-#include <linux/workqueue.h>
-#include <linux/interrupt.h>
-#include <linux/tty.h>
-#include <linux/tty_flip.h>
-#include <linux/serial.h>
-#include <linux/serialP.h>
-#include <linux/major.h>
-#include <linux/string.h>
-#include <linux/fcntl.h>
-#include <linux/ptrace.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <asm/uaccess.h>
-#include <asm/immap_8260.h>
-#include <asm/mpc8260.h>
-#include <asm/cpm_8260.h>
-#include <asm/irq.h>
-
-#ifdef CONFIG_MAGIC_SYSRQ
-#include <linux/sysrq.h>
-#endif
-
-#ifdef CONFIG_SERIAL_CONSOLE
-#include <linux/console.h>
-
-/* SCC Console configuration.  Not quite finished.  The SCC_CONSOLE
- * should be the number of the SCC to use, but only SCC1 will
- * work at this time.
- */
-#ifdef CONFIG_SCC_CONSOLE
-#define SCC_CONSOLE 1
-#endif
-
-/* this defines the index into rs_table for the port to use
-*/
-#ifndef CONFIG_SERIAL_CONSOLE_PORT
-#define CONFIG_SERIAL_CONSOLE_PORT	0
-#endif
-#endif
-#define CONFIG_SERIAL_CONSOLE_PORT	0
-
-#define TX_WAKEUP	ASYNC_SHARE_IRQ
-
-static char *serial_name = "CPM UART driver";
-static char *serial_version = "0.02";
-
-static struct tty_driver *serial_driver;
-static int __init serial_console_setup( struct console *co, char *options);
-static void serial_console_write(struct console *c, const char *s,
-		                                unsigned count);
-
-static struct tty_driver *serial_console_device(struct console *c, int *index);
-
-#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-static unsigned long break_pressed; /* break, really ... */
-#endif
-
-/*
- * Serial driver configuration section.  Here are the various options:
- */
-#define SERIAL_PARANOIA_CHECK
-#define CONFIG_SERIAL_NOPAUSE_IO
-#define SERIAL_DO_RESTART
-
-/* Set of debugging defines */
-
-#undef SERIAL_DEBUG_INTR
-#undef SERIAL_DEBUG_OPEN
-#undef SERIAL_DEBUG_FLOW
-#undef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
-
-#define _INLINE_ inline
-
-#define DBG_CNT(s)
-
-/* We overload some of the items in the data structure to meet our
- * needs.  For example, the port address is the CPM parameter ram
- * offset for the SCC or SMC.  The maximum number of ports is 4 SCCs and
- * 2 SMCs.  The "hub6" field is used to indicate the channel number, with
- * 0 and 1 indicating the SMCs and 2, 3, 4, and 5 are the SCCs.
- * Since these ports are so versatile, I don't yet have a strategy for
- * their management.  For example, SCC1 is used for Ethernet.  Right
- * now, just don't put them in the table.  Of course, right now I just
- * want the SMC to work as a uart :-)..
- * The "type" field is currently set to 0, for PORT_UNKNOWN.  It is
- * not currently used.  I should probably use it to indicate the port
- * type of CMS or SCC.
- * The SMCs do not support any modem control signals.
- */
-#define smc_scc_num	hub6
-
-/* The choice of serial port to use for KGDB.  If the system has
- * two ports, you can use one for console and one for KGDB (which
- * doesn't make sense to me, but people asked for it).
- */
-#ifdef CONFIG_KGDB_TTYS1
-#define KGDB_SER_IDX 1		/* SCC2/SMC2 */
-#else
-#define KGDB_SER_IDX 0		/* SCC1/SMC1 */
-#endif
-
-#ifndef SCC_CONSOLE
-
-/* SMC2 is sometimes used for low performance TDM interfaces.  Define
- * this as 1 if you want SMC2 as a serial port UART managed by this driver.
- * Define this as 0 if you wish to use SMC2 for something else.
- */
-#define USE_SMC2 1
-
-/* Define SCC to ttySx mapping.
-*/
-#define SCC_NUM_BASE	(USE_SMC2 + 1)	/* SCC base tty "number" */
-
-/* Define which SCC is the first one to use for a serial port.  These
- * are 0-based numbers, i.e. this assumes the first SCC (SCC1) is used
- * for Ethernet, and the first available SCC for serial UART is SCC2.
- * NOTE:  IF YOU CHANGE THIS, you have to change the PROFF_xxx and
- * interrupt vectors in the table below to match.
- */
-#define SCC_IDX_BASE	1	/* table index */
-
-static struct serial_state rs_table[] = {
-	/* UART CLK   PORT          IRQ      FLAGS  NUM   */
-	{ 0,     0, PROFF_SMC1, SIU_INT_SMC1,   0,    0 },    /* SMC1 ttyS0 */
-#ifdef USE_SMC2
-	{ 0,     0, PROFF_SMC2, SIU_INT_SMC2,   0,    1 },    /* SMC2 ttyS1 */
-#endif
-#ifndef CONFIG_SCC1_ENET
-	{ 0,     0, PROFF_SCC1, SIU_INT_SCC1,   0, SCC_NUM_BASE},    /* SCC1 ttyS2 */
-#endif
-#if !defined(CONFIG_SBC82xx) && !defined(CONFIG_SCC2_ENET)
-	{ 0,     0, PROFF_SCC2, SIU_INT_SCC2,   0, SCC_NUM_BASE + 1},    /* SCC2 ttyS3 */
-#endif
-};
-
-#else /* SCC_CONSOLE */
-#define SCC_NUM_BASE	0	/* SCC base tty "number" */
-#define SCC_IDX_BASE	0	/* table index */
-static struct serial_state rs_table[] = {
-	/* UART CLK   PORT          IRQ      FLAGS  NUM   */
-	{ 0,     0, PROFF_SCC1, SIU_INT_SCC1,   0, SCC_NUM_BASE},    /* SCC1 ttyS2 */
-	{ 0,     0, PROFF_SCC2, SIU_INT_SCC2,   0, SCC_NUM_BASE + 1},    /* SCC2 ttyS3 */
-};
-#endif /* SCC_CONSOLE */
-
-#define PORT_NUM(P)	(((P) < (SCC_NUM_BASE)) ? (P) : (P)-(SCC_NUM_BASE))
-
-#define NR_PORTS	(sizeof(rs_table)/sizeof(struct serial_state))
-
-/* The number of buffer descriptors and their sizes.
-*/
-#define RX_NUM_FIFO	4
-#define RX_BUF_SIZE	32
-#define TX_NUM_FIFO	4
-#define TX_BUF_SIZE	32
-
-/* The async_struct in serial.h does not really give us what we
- * need, so define our own here.
- */
-typedef struct serial_info {
-	int			magic;
-	int			flags;
-	struct serial_state	*state;
-	struct tty_struct 	*tty;
-	int			read_status_mask;
-	int			ignore_status_mask;
-	int			timeout;
-	int			line;
-	int			x_char;	/* xon/xoff character */
-	int			close_delay;
-	unsigned short		closing_wait;
-	unsigned short		closing_wait2;
-	unsigned long		event;
-	unsigned long		last_active;
-	int			blocked_open; /* # of blocked opens */
-	struct work_struct	tqueue;
-	struct work_struct	tqueue_hangup;
-	wait_queue_head_t	open_wait;
-	wait_queue_head_t	close_wait;
-
-	/* CPM Buffer Descriptor pointers.
-	*/
-	cbd_t			*rx_bd_base;
-	cbd_t			*rx_cur;
-	cbd_t			*tx_bd_base;
-	cbd_t			*tx_cur;
-} ser_info_t;
-
-static struct console sercons = {
-	.name =		"ttyS",
-	.write =	serial_console_write,
-	.device =	serial_console_device,
-	.setup =	serial_console_setup,
-	.flags =	CON_PRINTBUFFER,
-	.index =	CONFIG_SERIAL_CONSOLE_PORT,
-};
-
-static void change_speed(ser_info_t *info);
-static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout);
-
-static inline int serial_paranoia_check(ser_info_t *info,
-					char *name, const char *routine)
-{
-#ifdef SERIAL_PARANOIA_CHECK
-	static const char *badmagic =
-		"Warning: bad magic number for serial struct (%s) in %s\n";
-	static const char *badinfo =
-		"Warning: null async_struct for (%s) in %s\n";
-
-	if (!info) {
-		printk(badinfo, name, routine);
-		return 1;
-	}
-	if (info->magic != SERIAL_MAGIC) {
-		printk(badmagic, name, routine);
-		return 1;
-	}
-#endif
-	return 0;
-}
-
-/*
- * This is used to figure out the divisor speeds and the timeouts,
- * indexed by the termio value.  The generic CPM functions are responsible
- * for setting and assigning baud rate generators for us.
- */
-static int baud_table[] = {
-	0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
-	9600, 19200, 38400, 57600, 115200, 230400, 460800, 0 };
-
-
-/*
- * ------------------------------------------------------------
- * rs_stop() and rs_start()
- *
- * This routines are called before setting or resetting tty->stopped.
- * They enable or disable transmitter interrupts, as necessary.
- * ------------------------------------------------------------
- */
-static void rs_8xx_stop(struct tty_struct *tty)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-	int	idx;
-	unsigned long flags;
-	volatile scc_t	*sccp;
-	volatile smc_t	*smcp;
-
-	if (serial_paranoia_check(info, tty->name, "rs_stop"))
-		return;
-
-	save_flags(flags); cli();
-	if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) {
-		smcp = &immr->im_smc[idx];
-		smcp->smc_smcm &= ~SMCM_TX;
-	}
-	else {
-		sccp = &immr->im_scc[idx - SCC_IDX_BASE];
-		sccp->scc_sccm &= ~UART_SCCM_TX;
-	}
-	restore_flags(flags);
-}
-
-static void rs_8xx_start(struct tty_struct *tty)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-	int	idx;
-	unsigned long flags;
-	volatile scc_t	*sccp;
-	volatile smc_t	*smcp;
-
-	if (serial_paranoia_check(info, tty->name, "rs_stop"))
-		return;
-
-	save_flags(flags); cli();
-	if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) {
-		smcp = &immr->im_smc[idx];
-		smcp->smc_smcm |= SMCM_TX;
-	}
-	else {
-		sccp = &immr->im_scc[idx - SCC_IDX_BASE];
-		sccp->scc_sccm |= UART_SCCM_TX;
-	}
-	restore_flags(flags);
-}
-
-/*
- * ----------------------------------------------------------------------
- *
- * Here starts the interrupt handling routines.  All of the following
- * subroutines are declared as inline and are folded into
- * rs_interrupt().  They were separated out for readability's sake.
- *
- * Note: rs_interrupt() is a "fast" interrupt, which means that it
- * runs with interrupts turned off.  People who may want to modify
- * rs_interrupt() should try to keep the interrupt handler as fast as
- * possible.  After you are done making modifications, it is not a bad
- * idea to do:
- *
- * gcc -S -DKERNEL -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer serial.c
- *
- * and look at the resulting assemble code in serial.s.
- *
- * 				- Ted Ts'o (tytso@mit.edu), 7-Mar-93
- * -----------------------------------------------------------------------
- */
-
-/*
- * This routine is used by the interrupt handler to schedule
- * processing in the software interrupt portion of the driver.
- */
-static _INLINE_ void rs_sched_event(ser_info_t *info,
-				  int event)
-{
-	info->event |= 1 << event;
-	schedule_work(&info->tqueue);
-}
-
-static _INLINE_ void receive_chars(ser_info_t *info, struct pt_regs *regs)
-{
-	struct tty_struct *tty = info->tty;
-	unsigned char ch, *cp;
-	/*int	ignored = 0;*/
-	int	i;
-	ushort	status;
-	struct	async_icount *icount;
-	volatile cbd_t	*bdp;
-
-	icount = &info->state->icount;
-
-	/* Just loop through the closed BDs and copy the characters into
-	 * the buffer.
-	 */
-	bdp = info->rx_cur;
-	for (;;) {
-		if (bdp->cbd_sc & BD_SC_EMPTY)	/* If this one is empty */
-			break;			/*   we are all done */
-
-		/* The read status mask tell us what we should do with
-		 * incoming characters, especially if errors occur.
-		 * One special case is the use of BD_SC_EMPTY.  If
-		 * this is not set, we are supposed to be ignoring
-		 * inputs.  In this case, just mark the buffer empty and
-		 * continue.
-		if (!(info->read_status_mask & BD_SC_EMPTY)) {
-			bdp->cbd_sc |= BD_SC_EMPTY;
-			bdp->cbd_sc &=
-				~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV);
-
-			if (bdp->cbd_sc & BD_SC_WRAP)
-				bdp = info->rx_bd_base;
-			else
-				bdp++;
-			continue;
-		}
-		 */
-
-		/* Get the number of characters and the buffer pointer.
-		*/
-		i = bdp->cbd_datlen;
-		cp = (unsigned char *)__va(bdp->cbd_bufaddr);
-		status = bdp->cbd_sc;
-#ifdef CONFIG_KGDB
-		if (info->state->smc_scc_num == KGDB_SER_IDX) {
-			if (*cp == 0x03 || *cp == '$')
-				breakpoint();
-			return;
-		}
-#endif
-
-		/* Check to see if there is room in the tty buffer for
-		 * the characters in our BD buffer.  If not, we exit
-		 * now, leaving the BD with the characters.  We'll pick
-		 * them up again on the next receive interrupt (which could
-		 * be a timeout).
-		 */
-		if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE)
-			break;
-
-		while (i-- > 0) {
-			ch = *cp++;
-			*tty->flip.char_buf_ptr = ch;
-			icount->rx++;
-
-#ifdef SERIAL_DEBUG_INTR
-			printk("DR%02x:%02x...", ch, *status);
-#endif
-			*tty->flip.flag_buf_ptr = 0;
-			if (status & (BD_SC_BR | BD_SC_FR |
-				       BD_SC_PR | BD_SC_OV)) {
-				/*
-				 * For statistics only
-				 */
-				if (status & BD_SC_BR)
-					icount->brk++;
-				else if (status & BD_SC_PR)
-					icount->parity++;
-				else if (status & BD_SC_FR)
-					icount->frame++;
-				if (status & BD_SC_OV)
-					icount->overrun++;
-
-				/*
-				 * Now check to see if character should be
-				 * ignored, and mask off conditions which
-				 * should be ignored.
-				if (status & info->ignore_status_mask) {
-					if (++ignored > 100)
-						break;
-					continue;
-				}
-				 */
-				status &= info->read_status_mask;
-
-				if (status & (BD_SC_BR)) {
-#ifdef SERIAL_DEBUG_INTR
-					printk("handling break....");
-#endif
-					*tty->flip.flag_buf_ptr = TTY_BREAK;
-					if (info->flags & ASYNC_SAK)
-						do_SAK(tty);
-				} else if (status & BD_SC_PR)
-					*tty->flip.flag_buf_ptr = TTY_PARITY;
-				else if (status & BD_SC_FR)
-					*tty->flip.flag_buf_ptr = TTY_FRAME;
-				if (status & BD_SC_OV) {
-					/*
-					 * Overrun is special, since it's
-					 * reported immediately, and doesn't
-					 * affect the current character
-					 */
-					if (tty->flip.count < TTY_FLIPBUF_SIZE) {
-						tty->flip.count++;
-						tty->flip.flag_buf_ptr++;
-						tty->flip.char_buf_ptr++;
-						*tty->flip.flag_buf_ptr =
-								TTY_OVERRUN;
-					}
-				}
-			}
-
-#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-			if (break_pressed && info->line == sercons.index) {
-				if (ch != 0 && time_before(jiffies,
-							break_pressed + HZ*5)) {
-					handle_sysrq(ch, regs, NULL);
-					break_pressed = 0;
-					goto ignore_char;
-				} else
-					break_pressed = 0;
-			}
-#endif
-	
-			if (tty->flip.count >= TTY_FLIPBUF_SIZE)
-				break;
-
-			tty->flip.flag_buf_ptr++;
-			tty->flip.char_buf_ptr++;
-			tty->flip.count++;
-		}
-
-#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-	ignore_char:
-#endif
-
-		/* This BD is ready to be used again.  Clear status.
-		 * Get next BD.
-		 */
-		bdp->cbd_sc |= BD_SC_EMPTY;
-		bdp->cbd_sc &= ~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV);
-
-		if (bdp->cbd_sc & BD_SC_WRAP)
-			bdp = info->rx_bd_base;
-		else
-			bdp++;
-	}
-
-	info->rx_cur = (cbd_t *)bdp;
-
-	schedule_delayed_work(&tty->flip.work, 1);
-}
-
-static _INLINE_ void receive_break(ser_info_t *info, struct pt_regs *regs)
-{
-	struct tty_struct *tty = info->tty;
-
-	info->state->icount.brk++;
-
-#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-	if (info->line == sercons.index) {
-		if (!break_pressed) {
-			break_pressed = jiffies;
-			return;
-		} else
-			break_pressed = 0;
-	}
-#endif
-
-	/* Check to see if there is room in the tty buffer for
-	 * the break.  If not, we exit now, losing the break.  FIXME
-	 */
-	if ((tty->flip.count + 1) >= TTY_FLIPBUF_SIZE)
-		return;
-	*(tty->flip.flag_buf_ptr++) = TTY_BREAK;
-	*(tty->flip.char_buf_ptr++) = 0;
-	tty->flip.count++;
-}
-
-
-static _INLINE_ void transmit_chars(ser_info_t *info, struct pt_regs *regs)
-{
-
-	if (info->flags & TX_WAKEUP) {
-		rs_sched_event(info, RS_EVENT_WRITE_WAKEUP);
-	}
-
-#ifdef SERIAL_DEBUG_INTR
-	printk("THRE...");
-#endif
-}
-
-#ifdef notdef
-	/* I need to do this for the SCCs, so it is left as a reminder.
-	*/
-static _INLINE_ void check_modem_status(struct async_struct *info)
-{
-	int	status;
-	struct	async_icount *icount;
-
-	status = serial_in(info, UART_MSR);
-
-	if (status & UART_MSR_ANY_DELTA) {
-		icount = &info->state->icount;
-		/* update input line counters */
-		if (status & UART_MSR_TERI)
-			icount->rng++;
-		if (status & UART_MSR_DDSR)
-			icount->dsr++;
-		if (status & UART_MSR_DDCD) {
-			icount->dcd++;
-#ifdef CONFIG_HARD_PPS
-			if ((info->flags & ASYNC_HARDPPS_CD) &&
-			    (status & UART_MSR_DCD))
-				hardpps();
-#endif
-		}
-		if (status & UART_MSR_DCTS)
-			icount->cts++;
-		wake_up_interruptible(&info->delta_msr_wait);
-	}
-
-	if ((info->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {
-#if (defined(SERIAL_DEBUG_OPEN) || defined(SERIAL_DEBUG_INTR))
-		printk("ttys%d CD now %s...", info->line,
-		       (status & UART_MSR_DCD) ? "on" : "off");
-#endif
-		if (status & UART_MSR_DCD)
-			wake_up_interruptible(&info->open_wait);
-		else {
-#ifdef SERIAL_DEBUG_OPEN
-			printk("scheduling hangup...");
-#endif
-			schedule_work(&info->tqueue_hangup);
-		}
-	}
-	if (info->flags & ASYNC_CTS_FLOW) {
-		if (info->tty->hw_stopped) {
-			if (status & UART_MSR_CTS) {
-#if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW))
-				printk("CTS tx start...");
-#endif
-				info->tty->hw_stopped = 0;
-				info->IER |= UART_IER_THRI;
-				serial_out(info, UART_IER, info->IER);
-				rs_sched_event(info, RS_EVENT_WRITE_WAKEUP);
-				return;
-			}
-		} else {
-			if (!(status & UART_MSR_CTS)) {
-#if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW))
-				printk("CTS tx stop...");
-#endif
-				info->tty->hw_stopped = 1;
-				info->IER &= ~UART_IER_THRI;
-				serial_out(info, UART_IER, info->IER);
-			}
-		}
-	}
-}
-#endif
-
-/*
- * This is the serial driver's interrupt routine for a single port
- */
-static irqreturn_t rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs)
-{
-	u_char	events;
-	int	idx;
-	ser_info_t *info;
-	volatile smc_t	*smcp;
-	volatile scc_t	*sccp;
-
-	info = (ser_info_t *)dev_id;
-
-	if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) {
-		smcp = &immr->im_smc[idx];
-		events = smcp->smc_smce;
-		if (events & SMCM_BRKE)
-			receive_break(info, regs);
-		if (events & SMCM_RX)
-			receive_chars(info, regs);
-		if (events & SMCM_TX)
-			transmit_chars(info, regs);
-		smcp->smc_smce = events;
-	}
-	else {
-		sccp = &immr->im_scc[idx - SCC_IDX_BASE];
-		events = sccp->scc_scce;
-		if (events & SMCM_BRKE)
-			receive_break(info, regs);
-		if (events & SCCM_RX)
-			receive_chars(info, regs);
-		if (events & SCCM_TX)
-			transmit_chars(info, regs);
-		sccp->scc_scce = events;
-	}
-
-#ifdef SERIAL_DEBUG_INTR
-	printk("rs_interrupt_single(%d, %x)...",
-					info->state->smc_scc_num, events);
-#endif
-#ifdef modem_control
-	check_modem_status(info);
-#endif
-	info->last_active = jiffies;
-#ifdef SERIAL_DEBUG_INTR
-	printk("end.\n");
-#endif
-	return IRQ_HANDLED;
-}
-
-
-/*
- * -------------------------------------------------------------------
- * Here ends the serial interrupt routines.
- * -------------------------------------------------------------------
- */
-
-/*
- * This routine is used to handle the "bottom half" processing for the
- * serial driver, known also the "software interrupt" processing.
- * This processing is done at the kernel interrupt level, after the
- * rs_interrupt() has returned, BUT WITH INTERRUPTS TURNED ON.  This
- * is where time-consuming activities which can not be done in the
- * interrupt driver proper are done; the interrupt driver schedules
- * them using rs_sched_event(), and they get done here.
- */
-static void do_softint(void *private_)
-{
-	ser_info_t	*info = (ser_info_t *) private_;
-	struct tty_struct	*tty;
-
-	tty = info->tty;
-	if (!tty)
-		return;
-
-	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
-		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
-		    tty->ldisc.write_wakeup)
-			(tty->ldisc.write_wakeup)(tty);
-		wake_up_interruptible(&tty->write_wait);
-	}
-}
-
-/*
- * This routine is called from the scheduler work queue when the interrupt
- * routine has signalled that a hangup has occurred.  The path of
- * hangup processing is:
- *
- * 	serial interrupt routine -> (scheduler tqueue) ->
- * 	do_serial_hangup() -> tty->hangup() -> rs_hangup()
- *
- */
-static void do_serial_hangup(void *private_)
-{
-	struct async_struct	*info = (struct async_struct *) private_;
-	struct tty_struct	*tty;
-
-	tty = info->tty;
-	if (tty)
-		tty_hangup(tty);
-}
-
-/*static void rs_8xx_timer(void)
-{
-	printk("rs_8xx_timer\n");
-}*/
-
-
-static int startup(ser_info_t *info)
-{
-	unsigned long flags;
-	int	retval=0;
-	int	idx;
-	struct serial_state *state= info->state;
-	volatile smc_t		*smcp;
-	volatile scc_t		*sccp;
-	volatile smc_uart_t	*up;
-	volatile scc_uart_t	*scup;
-
-
-	save_flags(flags); cli();
-
-	if (info->flags & ASYNC_INITIALIZED) {
-		goto errout;
-	}
-
-#ifdef maybe
-	if (!state->port || !state->type) {
-		if (info->tty)
-			set_bit(TTY_IO_ERROR, &info->tty->flags);
-		goto errout;
-	}
-#endif
-
-#ifdef SERIAL_DEBUG_OPEN
-	printk("starting up ttys%d (irq %d)...", info->line, state->irq);
-#endif
-
-
-#ifdef modem_control
-	info->MCR = 0;
-	if (info->tty->termios->c_cflag & CBAUD)
-		info->MCR = UART_MCR_DTR | UART_MCR_RTS;
-#endif
-
-	if (info->tty)
-		clear_bit(TTY_IO_ERROR, &info->tty->flags);
-
-	/*
-	 * and set the speed of the serial port
-	 */
-	change_speed(info);
-
-	if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) {
-		smcp = &immr->im_smc[idx];
-
-		/* Enable interrupts and I/O.
-		*/
-		smcp->smc_smcm |= (SMCM_RX | SMCM_TX);
-		smcp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN);
-
-		/* We can tune the buffer length and idle characters
-		 * to take advantage of the entire incoming buffer size.
-		 * If mrblr is something other than 1, maxidl has to be
-		 * non-zero or we never get an interrupt.  The maxidl
-		 * is the number of character times we wait after reception
-		 * of the last character before we decide no more characters
-		 * are coming.
-		 */
-		up = (smc_uart_t *)&immr->im_dprambase[state->port];
-#if 0
-		up->smc_mrblr = 1;	/* receive buffer length */
-		up->smc_maxidl = 0;	/* wait forever for next char */
-#else
-		up->smc_mrblr = RX_BUF_SIZE;
-		up->smc_maxidl = RX_BUF_SIZE;
-#endif
-		up->smc_brkcr = 1;	/* number of break chars */
-	}
-	else {
-		sccp = &immr->im_scc[idx - SCC_IDX_BASE];
-		scup = (scc_uart_t *)&immr->im_dprambase[state->port];
-#if 0
-		scup->scc_genscc.scc_mrblr = 1;	/* receive buffer length */
-		scup->scc_maxidl = 0;	/* wait forever for next char */
-#else
-		scup->scc_genscc.scc_mrblr = RX_BUF_SIZE;
-		scup->scc_maxidl = RX_BUF_SIZE;
-#endif
-
-		sccp->scc_sccm |= (UART_SCCM_TX | UART_SCCM_RX);
-		sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT);
-	}
-
-	info->flags |= ASYNC_INITIALIZED;
-	restore_flags(flags);
-	return 0;
-
-errout:
-	restore_flags(flags);
-	return retval;
-}
-
-/*
- * This routine will shutdown a serial port; interrupts are disabled, and
- * DTR is dropped if the hangup on close termio flag is on.
- */
-static void shutdown(ser_info_t * info)
-{
-	unsigned long	flags;
-	struct serial_state *state;
-	int		idx;
-	volatile smc_t	*smcp;
-	volatile scc_t	*sccp;
-
-	if (!(info->flags & ASYNC_INITIALIZED))
-		return;
-
-	state = info->state;
-
-#ifdef SERIAL_DEBUG_OPEN
-	printk("Shutting down serial port %d (irq %d)....", info->line,
-	       state->irq);
-#endif
-
-	save_flags(flags); cli(); /* Disable interrupts */
-
-	if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) {
-		smcp = &immr->im_smc[idx];
-
-		/* Disable interrupts and I/O.
-		*/
-		smcp->smc_smcm &= ~(SMCM_RX | SMCM_TX);
-#ifdef CONFIG_SERIAL_CONSOLE
-		/* We can't disable the transmitter if this is the
-		 * system console.
-		 */
-		if (idx != CONFIG_SERIAL_CONSOLE_PORT)
-#endif
-			smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
-	}
-	else {
-		sccp = &immr->im_scc[idx - SCC_IDX_BASE];
-		sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
-#ifdef CONFIG_SERIAL_CONSOLE
-		if (idx != CONFIG_SERIAL_CONSOLE_PORT)
-			sccp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
-#endif
-	}
-
-	if (info->tty)
-		set_bit(TTY_IO_ERROR, &info->tty->flags);
-
-	info->flags &= ~ASYNC_INITIALIZED;
-	restore_flags(flags);
-}
-
-/*
- * This routine is called to set the UART divisor registers to match
- * the specified baud rate for a serial port.
- */
-static void change_speed(ser_info_t *info)
-{
-	int	baud_rate;
-	unsigned cflag, cval, scval, prev_mode;
-	int	i, bits, sbits, idx;
-	unsigned long	flags;
-	volatile smc_t	*smcp;
-	volatile scc_t	*sccp;
-
-	if (!info->tty || !info->tty->termios)
-		return;
-	cflag = info->tty->termios->c_cflag;
-
-	/* Character length programmed into the mode register is the
-	 * sum of: 1 start bit, number of data bits, 0 or 1 parity bit,
-	 * 1 or 2 stop bits, minus 1.
-	 * The value 'bits' counts this for us.
-	 */
-	cval = 0;
-	scval = 0;
-
-	/* byte size and parity */
-	switch (cflag & CSIZE) {
-	      case CS5: bits = 5; break;
-	      case CS6: bits = 6; break;
-	      case CS7: bits = 7; break;
-	      case CS8: bits = 8; break;
-	      /* Never happens, but GCC is too dumb to figure it out */
-	      default:  bits = 8; break;
-	}
-	sbits = bits - 5;
-
-	if (cflag & CSTOPB) {
-		cval |= SMCMR_SL;	/* Two stops */
-		scval |= SCU_PMSR_SL;
-		bits++;
-	}
-	if (cflag & PARENB) {
-		cval |= SMCMR_PEN;
-		scval |= SCU_PMSR_PEN;
-		bits++;
-	}
-	if (!(cflag & PARODD)) {
-		cval |= SMCMR_PM_EVEN;
-		scval |= (SCU_PMSR_REVP | SCU_PMSR_TEVP);
-	}
-
-	/* Determine divisor based on baud rate */
-	i = cflag & CBAUD;
-	if (i >= (sizeof(baud_table)/sizeof(int)))
-		baud_rate = 9600;
-	else
-		baud_rate = baud_table[i];
-
-	info->timeout = (TX_BUF_SIZE*HZ*bits);
-	info->timeout += HZ/50;		/* Add .02 seconds of slop */
-
-#ifdef modem_control
-	/* CTS flow control flag and modem status interrupts */
-	info->IER &= ~UART_IER_MSI;
-	if (info->flags & ASYNC_HARDPPS_CD)
-		info->IER |= UART_IER_MSI;
-	if (cflag & CRTSCTS) {
-		info->flags |= ASYNC_CTS_FLOW;
-		info->IER |= UART_IER_MSI;
-	} else
-		info->flags &= ~ASYNC_CTS_FLOW;
-	if (cflag & CLOCAL)
-		info->flags &= ~ASYNC_CHECK_CD;
-	else {
-		info->flags |= ASYNC_CHECK_CD;
-		info->IER |= UART_IER_MSI;
-	}
-	serial_out(info, UART_IER, info->IER);
-#endif
-
-	/*
-	 * Set up parity check flag
-	 */
-#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
-
-	info->read_status_mask = (BD_SC_EMPTY | BD_SC_OV);
-	if (I_INPCK(info->tty))
-		info->read_status_mask |= BD_SC_FR | BD_SC_PR;
-	if (I_BRKINT(info->tty) || I_PARMRK(info->tty))
-		info->read_status_mask |= BD_SC_BR;
-
-	/*
-	 * Characters to ignore
-	 */
-	info->ignore_status_mask = 0;
-	if (I_IGNPAR(info->tty))
-		info->ignore_status_mask |= BD_SC_PR | BD_SC_FR;
-	if (I_IGNBRK(info->tty)) {
-		info->ignore_status_mask |= BD_SC_BR;
-		/*
-		 * If we're ignore parity and break indicators, ignore
-		 * overruns too.  (For real raw support).
-		 */
-		if (I_IGNPAR(info->tty))
-			info->ignore_status_mask |= BD_SC_OV;
-	}
-	/*
-	 * !!! ignore all characters if CREAD is not set
-	 */
-	if ((cflag & CREAD) == 0)
-		info->read_status_mask &= ~BD_SC_EMPTY;
-	save_flags(flags); cli();
-
-	/* Start bit has not been added (so don't, because we would just
-	 * subtract it later), and we need to add one for the number of
-	 * stops bits (there is always at least one).
-	 */
-	bits++;
-	if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) {
-		smcp = &immr->im_smc[idx];
-
-		/* Set the mode register.  We want to keep a copy of the
-		 * enables, because we want to put them back if they were
-		 * present.
-		 */
-		prev_mode = smcp->smc_smcmr;
-		smcp->smc_smcmr = smcr_mk_clen(bits) | cval |  SMCMR_SM_UART;
-		smcp->smc_smcmr |= (prev_mode & (SMCMR_REN | SMCMR_TEN));
-	}
-	else {
-		sccp = &immr->im_scc[idx - SCC_IDX_BASE];
-		sccp->scc_pmsr = (sbits << 12) | scval;
-	}
-
-	m8260_cpm_setbrg(info->state->smc_scc_num, baud_rate);
-
-	restore_flags(flags);
-}
-
-static void rs_8xx_put_char(struct tty_struct *tty, unsigned char ch)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-	volatile cbd_t	*bdp;
-
-	if (serial_paranoia_check(info, tty->name, "rs_put_char"))
-		return;
-
-	if (!tty)
-		return;
-
-	bdp = info->tx_cur;
-	while (bdp->cbd_sc & BD_SC_READY);
-
-	*((char *)__va(bdp->cbd_bufaddr)) = ch;
-	bdp->cbd_datlen = 1;
-	bdp->cbd_sc |= BD_SC_READY;
-
-	/* Get next BD.
-	*/
-	if (bdp->cbd_sc & BD_SC_WRAP)
-		bdp = info->tx_bd_base;
-	else
-		bdp++;
-
-	info->tx_cur = (cbd_t *)bdp;
-
-}
-
-static int rs_8xx_write(struct tty_struct * tty, int from_user,
-		    const unsigned char *buf, int count)
-{
-	int	c, ret = 0;
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-	volatile cbd_t *bdp;
-
-	if (serial_paranoia_check(info, tty->name, "rs_write"))
-		return 0;
-
-	if (!tty)
-		return 0;
-
-	bdp = info->tx_cur;
-
-	while (1) {
-		c = min(count, TX_BUF_SIZE);
-
-		if (c <= 0)
-			break;
-
-		if (bdp->cbd_sc & BD_SC_READY) {
-			info->flags |= TX_WAKEUP;
-			break;
-		}
-
-		if (from_user) {
-			if (copy_from_user(__va(bdp->cbd_bufaddr), buf, c)) {
-				if (!ret)
-					ret = -EFAULT;
-				break;
-			}
-		} else {
-			memcpy(__va(bdp->cbd_bufaddr), buf, c);
-		}
-
-		bdp->cbd_datlen = c;
-		bdp->cbd_sc |= BD_SC_READY;
-
-		buf += c;
-		count -= c;
-		ret += c;
-
-		/* Get next BD.
-		*/
-		if (bdp->cbd_sc & BD_SC_WRAP)
-			bdp = info->tx_bd_base;
-		else
-			bdp++;
-		info->tx_cur = (cbd_t *)bdp;
-	}
-	return ret;
-}
-
-static int rs_8xx_write_room(struct tty_struct *tty)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-	int	ret;
-
-	if (serial_paranoia_check(info, tty->name, "rs_write_room"))
-		return 0;
-
-	if ((info->tx_cur->cbd_sc & BD_SC_READY) == 0) {
-		info->flags &= ~TX_WAKEUP;
-		ret = TX_BUF_SIZE;
-	}
-	else {
-		info->flags |= TX_WAKEUP;
-		ret = 0;
-	}
-	return ret;
-}
-
-/* I could track this with transmit counters....maybe later.
-*/
-static int rs_8xx_chars_in_buffer(struct tty_struct *tty)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-		
-	if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
-		return 0;
-	return 0;
-}
-
-static void rs_8xx_flush_buffer(struct tty_struct *tty)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-		
-	if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
-		return;
-
-	/* There is nothing to "flush", whatever we gave the CPM
-	 * is on its way out.
-	 */
-	wake_up_interruptible(&tty->write_wait);
-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
-	    tty->ldisc.write_wakeup)
-		(tty->ldisc.write_wakeup)(tty);
-	info->flags &= ~TX_WAKEUP;
-}
-
-/*
- * This function is used to send a high-priority XON/XOFF character to
- * the device
- */
-static void rs_8xx_send_xchar(struct tty_struct *tty, char ch)
-{
-	volatile cbd_t	*bdp;
-
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-
-	if (serial_paranoia_check(info, tty->name, "rs_send_char"))
-		return;
-
-	bdp = info->tx_cur;
-	while (bdp->cbd_sc & BD_SC_READY);
-
-	*((char *)__va(bdp->cbd_bufaddr)) = ch;
-	bdp->cbd_datlen = 1;
-	bdp->cbd_sc |= BD_SC_READY;
-
-	/* Get next BD.
-	*/
-	if (bdp->cbd_sc & BD_SC_WRAP)
-		bdp = info->tx_bd_base;
-	else
-		bdp++;
-
-	info->tx_cur = (cbd_t *)bdp;
-}
-
-/*
- * ------------------------------------------------------------
- * rs_throttle()
- *
- * This routine is called by the upper-layer tty layer to signal that
- * incoming characters should be throttled.
- * ------------------------------------------------------------
- */
-static void rs_8xx_throttle(struct tty_struct * tty)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-#ifdef SERIAL_DEBUG_THROTTLE
-	char	buf[64];
-
-	printk("throttle %s: %d....\n", _tty_name(tty, buf),
-	       tty->ldisc.chars_in_buffer(tty));
-#endif
-
-	if (serial_paranoia_check(info, tty->name, "rs_throttle"))
-		return;
-
-	if (I_IXOFF(tty))
-		rs_8xx_send_xchar(tty, STOP_CHAR(tty));
-
-#ifdef modem_control
-	if (tty->termios->c_cflag & CRTSCTS)
-		info->MCR &= ~UART_MCR_RTS;
-
-	cli();
-	serial_out(info, UART_MCR, info->MCR);
-	sti();
-#endif
-}
-
-static void rs_8xx_unthrottle(struct tty_struct * tty)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-#ifdef SERIAL_DEBUG_THROTTLE
-	char	buf[64];
-
-	printk("unthrottle %s: %d....\n", _tty_name(tty, buf),
-	       tty->ldisc.chars_in_buffer(tty));
-#endif
-
-	if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
-		return;
-
-	if (I_IXOFF(tty)) {
-		if (info->x_char)
-			info->x_char = 0;
-		else
-			rs_8xx_send_xchar(tty, START_CHAR(tty));
-	}
-#ifdef modem_control
-	if (tty->termios->c_cflag & CRTSCTS)
-		info->MCR |= UART_MCR_RTS;
-	cli();
-	serial_out(info, UART_MCR, info->MCR);
-	sti();
-#endif
-}
-
-/*
- * ------------------------------------------------------------
- * rs_ioctl() and friends
- * ------------------------------------------------------------
- */
-
-#ifdef maybe
-/*
- * get_lsr_info - get line status register info
- *
- * Purpose: Let user call ioctl() to get info when the UART physically
- * 	    is emptied.  On bus types like RS485, the transmitter must
- * 	    release the bus after transmitting. This must be done when
- * 	    the transmit shift register is empty, not be done when the
- * 	    transmit holding register is empty.  This functionality
- * 	    allows an RS485 driver to be written in user space.
- */
-static int get_lsr_info(struct async_struct * info, unsigned int *value)
-{
-	unsigned char status;
-	unsigned int result;
-
-	cli();
-	status = serial_in(info, UART_LSR);
-	sti();
-	result = ((status & UART_LSR_TEMT) ? TIOCSER_TEMT : 0);
-	return put_user(result,value);
-}
-#endif
-
-static int get_modem_info(ser_info_t *info, unsigned int *value)
-{
-	unsigned int result = 0;
-#ifdef modem_control
-	unsigned char control, status;
-
-	control = info->MCR;
-	cli();
-	status = serial_in(info, UART_MSR);
-	sti();
-	result =  ((control & UART_MCR_RTS) ? TIOCM_RTS : 0)
-		| ((control & UART_MCR_DTR) ? TIOCM_DTR : 0)
-#ifdef TIOCM_OUT1
-		| ((control & UART_MCR_OUT1) ? TIOCM_OUT1 : 0)
-		| ((control & UART_MCR_OUT2) ? TIOCM_OUT2 : 0)
-#endif
-		| ((status  & UART_MSR_DCD) ? TIOCM_CAR : 0)
-		| ((status  & UART_MSR_RI) ? TIOCM_RNG : 0)
-		| ((status  & UART_MSR_DSR) ? TIOCM_DSR : 0)
-		| ((status  & UART_MSR_CTS) ? TIOCM_CTS : 0);
-#endif
-	return put_user(result,value);
-}
-
-static int set_modem_info(ser_info_t *info, unsigned int cmd,
-			  unsigned int *value)
-{
-	int error;
-	unsigned int arg;
-
-	error = get_user(arg, value);
-	if (error)
-		return error;
-#ifdef modem_control
-	switch (cmd) {
-	case TIOCMBIS:
-		if (arg & TIOCM_RTS)
-			info->MCR |= UART_MCR_RTS;
-		if (arg & TIOCM_DTR)
-			info->MCR |= UART_MCR_DTR;
-#ifdef TIOCM_OUT1
-		if (arg & TIOCM_OUT1)
-			info->MCR |= UART_MCR_OUT1;
-		if (arg & TIOCM_OUT2)
-			info->MCR |= UART_MCR_OUT2;
-#endif
-		break;
-	case TIOCMBIC:
-		if (arg & TIOCM_RTS)
-			info->MCR &= ~UART_MCR_RTS;
-		if (arg & TIOCM_DTR)
-			info->MCR &= ~UART_MCR_DTR;
-#ifdef TIOCM_OUT1
-		if (arg & TIOCM_OUT1)
-			info->MCR &= ~UART_MCR_OUT1;
-		if (arg & TIOCM_OUT2)
-			info->MCR &= ~UART_MCR_OUT2;
-#endif
-		break;
-	case TIOCMSET:
-		info->MCR = ((info->MCR & ~(UART_MCR_RTS |
-#ifdef TIOCM_OUT1
-					    UART_MCR_OUT1 |
-					    UART_MCR_OUT2 |
-#endif
-					    UART_MCR_DTR))
-			     | ((arg & TIOCM_RTS) ? UART_MCR_RTS : 0)
-#ifdef TIOCM_OUT1
-			     | ((arg & TIOCM_OUT1) ? UART_MCR_OUT1 : 0)
-			     | ((arg & TIOCM_OUT2) ? UART_MCR_OUT2 : 0)
-#endif
-			     | ((arg & TIOCM_DTR) ? UART_MCR_DTR : 0));
-		break;
-	default:
-		return -EINVAL;
-	}
-	cli();
-	serial_out(info, UART_MCR, info->MCR);
-	sti();
-#endif
-	return 0;
-}
-
-/* Sending a break is a two step process on the SMC/SCC.  It is accomplished
- * by sending a STOP TRANSMIT command followed by a RESTART TRANSMIT
- * command.  We take advantage of the begin/end functions to make this
- * happen.
- */
-static void begin_break(ser_info_t *info)
-{
-	volatile cpm8260_t *cp;
-	uint	page, sblock;
-	int	num;
-
-	cp = cpmp;
-
-	if ((num = info->state->smc_scc_num) < SCC_NUM_BASE) {
-		if (num == 0) {
-			page = CPM_CR_SMC1_PAGE;
-			sblock = CPM_CR_SMC1_SBLOCK;
-		}
-		else {
-			page = CPM_CR_SMC2_PAGE;
-			sblock = CPM_CR_SMC2_SBLOCK;
-		}
-	}
-	else {
-		num -= SCC_NUM_BASE;
-		switch (num) {
-		case 0:
-			page = CPM_CR_SCC1_PAGE;
-			sblock = CPM_CR_SCC1_SBLOCK;
-			break;
-		case 1:
-			page = CPM_CR_SCC2_PAGE;
-			sblock = CPM_CR_SCC2_SBLOCK;
-			break;
-		case 2:
-			page = CPM_CR_SCC3_PAGE;
-			sblock = CPM_CR_SCC3_SBLOCK;
-			break;
-		case 3:
-			page = CPM_CR_SCC4_PAGE;
-			sblock = CPM_CR_SCC4_SBLOCK;
-			break;
-		default: return;
-		}
-	}
-	cp->cp_cpcr = mk_cr_cmd(page, sblock, 0, CPM_CR_STOP_TX) | CPM_CR_FLG;
-	while (cp->cp_cpcr & CPM_CR_FLG);
-}
-
-static void end_break(ser_info_t *info)
-{
-	volatile cpm8260_t *cp;
-	uint	page, sblock;
-	int	num;
-
-	cp = cpmp;
-
-	if ((num = info->state->smc_scc_num) < SCC_NUM_BASE) {
-		if (num == 0) {
-			page = CPM_CR_SMC1_PAGE;
-			sblock = CPM_CR_SMC1_SBLOCK;
-		}
-		else {
-			page = CPM_CR_SMC2_PAGE;
-			sblock = CPM_CR_SMC2_SBLOCK;
-		}
-	}
-	else {
-		num -= SCC_NUM_BASE;
-		switch (num) {
-		case 0:
-			page = CPM_CR_SCC1_PAGE;
-			sblock = CPM_CR_SCC1_SBLOCK;
-			break;
-		case 1:
-			page = CPM_CR_SCC2_PAGE;
-			sblock = CPM_CR_SCC2_SBLOCK;
-			break;
-		case 2:
-			page = CPM_CR_SCC3_PAGE;
-			sblock = CPM_CR_SCC3_SBLOCK;
-			break;
-		case 3:
-			page = CPM_CR_SCC4_PAGE;
-			sblock = CPM_CR_SCC4_SBLOCK;
-			break;
-		default: return;
-		}
-	}
-	cp->cp_cpcr = mk_cr_cmd(page, sblock, 0, CPM_CR_RESTART_TX) | CPM_CR_FLG;
-	while (cp->cp_cpcr & CPM_CR_FLG);
-}
-
-/*
- * This routine sends a break character out the serial port.
- */
-static void send_break(ser_info_t *info, int duration)
-{
-	current->state = TASK_INTERRUPTIBLE;
-#ifdef SERIAL_DEBUG_SEND_BREAK
-	printk("rs_send_break(%d) jiff=%lu...", duration, jiffies);
-#endif
-	begin_break(info);
-	schedule_timeout(duration);
-	end_break(info);
-#ifdef SERIAL_DEBUG_SEND_BREAK
-	printk("done jiffies=%lu\n", jiffies);
-#endif
-}
-
-
-static int rs_8xx_ioctl(struct tty_struct *tty, struct file * file,
-		    unsigned int cmd, unsigned long arg)
-{
-	int error;
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-	int retval;
-	struct async_icount cnow;	/* kernel counter temps */
-	struct serial_icounter_struct *p_cuser;	/* user space */
-
-	if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
-		return -ENODEV;
-
-	if ((cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
-		if (tty->flags & (1 << TTY_IO_ERROR))
-		    return -EIO;
-	}
-
-	switch (cmd) {
-		case TCSBRK:	/* SVID version: non-zero arg --> no break */
-			retval = tty_check_change(tty);
-			if (retval)
-				return retval;
-			tty_wait_until_sent(tty, 0);
-			if (signal_pending(current))
-				return -EINTR;
-			if (!arg) {
-				send_break(info, HZ/4);	/* 1/4 second */
-				if (signal_pending(current))
-					return -EINTR;
-			}
-			return 0;
-		case TCSBRKP:	/* support for POSIX tcsendbreak() */
-			retval = tty_check_change(tty);
-			if (retval)
-				return retval;
-			tty_wait_until_sent(tty, 0);
-			if (signal_pending(current))
-				return -EINTR;
-			send_break(info, arg ? arg*(HZ/10) : HZ/4);
-			if (signal_pending(current))
-				return -EINTR;
-			return 0;
-		case TIOCSBRK:
-			retval = tty_check_change(tty);
-			if (retval)
-				return retval;
-			tty_wait_until_sent(tty, 0);
-			begin_break(info);
-			return 0;
-		case TIOCCBRK:
-			retval = tty_check_change(tty);
-			if (retval)
-				return retval;
-			end_break(info);
-			return 0;
-		case TIOCGSOFTCAR:
-			return put_user(C_CLOCAL(tty) ? 1 : 0, (int *) arg);
-		case TIOCSSOFTCAR:
-			error = get_user(arg, (unsigned int *) arg);
-			if (error)
-				return error;
-			tty->termios->c_cflag =
-				((tty->termios->c_cflag & ~CLOCAL) |
-				 (arg ? CLOCAL : 0));
-			return 0;
-		case TIOCMGET:
-			return get_modem_info(info, (unsigned int *) arg);
-		case TIOCMBIS:
-		case TIOCMBIC:
-		case TIOCMSET:
-			return set_modem_info(info, cmd, (unsigned int *) arg);
-#ifdef maybe
-		case TIOCSERGETLSR: /* Get line status register */
-			return get_lsr_info(info, (unsigned int *) arg);
-#endif
-		/*
-		 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
-		 * - mask passed in arg for lines of interest
- 		 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
-		 * Caller should use TIOCGICOUNT to see which one it was
-		 */
-		 case TIOCMIWAIT:
-#ifdef modem_control
-			cli();
-			/* note the counters on entry */
-			cprev = info->state->icount;
-			sti();
-			while (1) {
-				interruptible_sleep_on(&info->delta_msr_wait);
-				/* see if a signal did it */
-				if (signal_pending(current))
-					return -ERESTARTSYS;
-				cli();
-				cnow = info->state->icount; /* atomic copy */
-				sti();
-				if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
-				    cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
-					return -EIO; /* no change => error */
-				if ( ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
-				     ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
-				     ((arg & TIOCM_CD)  && (cnow.dcd != cprev.dcd)) ||
-				     ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) {
-					return 0;
-				}
-				cprev = cnow;
-			}
-			/* NOTREACHED */
-#else
-			return 0;
-#endif
-
-		/*
-		 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-		 * Return: write counters to the user passed counter struct
-		 * NB: both 1->0 and 0->1 transitions are counted except for
-		 *     RI where only 0->1 is counted.
-		 */
-		case TIOCGICOUNT:
-			cli();
-			cnow = info->state->icount;
-			sti();
-			p_cuser = (struct serial_icounter_struct *) arg;
-			error = put_user(cnow.cts, &p_cuser->cts);
-			if (error) return error;
-			error = put_user(cnow.dsr, &p_cuser->dsr);
-			if (error) return error;
-			error = put_user(cnow.rng, &p_cuser->rng);
-			if (error) return error;
-			error = put_user(cnow.dcd, &p_cuser->dcd);
-			if (error) return error;
-			return 0;
-
-		default:
-			return -ENOIOCTLCMD;
-		}
-	return 0;
-}
-
-/* FIX UP modem control here someday......
-*/
-static void rs_8xx_set_termios(struct tty_struct *tty, struct termios *old_termios)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-
-	if (   (tty->termios->c_cflag == old_termios->c_cflag)
-	    && (   RELEVANT_IFLAG(tty->termios->c_iflag)
-		== RELEVANT_IFLAG(old_termios->c_iflag)))
-	  return;
-
-	change_speed(info);
-
-#ifdef modem_control
-	/* Handle transition to B0 status */
-	if ((old_termios->c_cflag & CBAUD) &&
-	    !(tty->termios->c_cflag & CBAUD)) {
-		info->MCR &= ~(UART_MCR_DTR|UART_MCR_RTS);
-		cli();
-		serial_out(info, UART_MCR, info->MCR);
-		sti();
-	}
-
-	/* Handle transition away from B0 status */
-	if (!(old_termios->c_cflag & CBAUD) &&
-	    (tty->termios->c_cflag & CBAUD)) {
-		info->MCR |= UART_MCR_DTR;
-		if (!tty->hw_stopped ||
-		    !(tty->termios->c_cflag & CRTSCTS)) {
-			info->MCR |= UART_MCR_RTS;
-		}
-		cli();
-		serial_out(info, UART_MCR, info->MCR);
-		sti();
-	}
-
-	/* Handle turning off CRTSCTS */
-	if ((old_termios->c_cflag & CRTSCTS) &&
-	    !(tty->termios->c_cflag & CRTSCTS)) {
-		tty->hw_stopped = 0;
-		rs_8xx_start(tty);
-	}
-#endif
-
-#if 0
-	/*
-	 * No need to wake up processes in open wait, since they
-	 * sample the CLOCAL flag once, and don't recheck it.
-	 * XXX  It's not clear whether the current behavior is correct
-	 * or not.  Hence, this may change.....
-	 */
-	if (!(old_termios->c_cflag & CLOCAL) &&
-	    (tty->termios->c_cflag & CLOCAL))
-		wake_up_interruptible(&info->open_wait);
-#endif
-}
-
-/*
- * ------------------------------------------------------------
- * rs_close()
- *
- * This routine is called when the serial port gets closed.  First, we
- * wait for the last remaining data to be sent.  Then, we unlink its
- * async structure from the interrupt chain if necessary, and we free
- * that IRQ if nothing is left in the chain.
- * ------------------------------------------------------------
- */
-static void rs_8xx_close(struct tty_struct *tty, struct file * filp)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-	struct serial_state *state;
-	unsigned long	flags;
-	int		idx;
-	volatile smc_t	*smcp;
-	volatile scc_t	*sccp;
-
-	if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
-		return;
-
-	state = info->state;
-
-	save_flags(flags); cli();
-
-	if (tty_hung_up_p(filp)) {
-		DBG_CNT("before DEC-hung");
-		restore_flags(flags);
-		return;
-	}
-
-#ifdef SERIAL_DEBUG_OPEN
-	printk("rs_close ttys%d, count = %d\n", info->line, state->count);
-#endif
-	if ((tty->count == 1) && (state->count != 1)) {
-		/*
-		 * Uh, oh.  tty->count is 1, which means that the tty
-		 * structure will be freed.  state->count should always
-		 * be one in these conditions.  If it's greater than
-		 * one, we've got real problems, since it means the
-		 * serial port won't be shutdown.
-		 */
-		printk("rs_close: bad serial port count; tty->count is 1, "
-		       "state->count is %d\n", state->count);
-		state->count = 1;
-	}
-	if (--state->count < 0) {
-		printk("rs_close: bad serial port count for ttys%d: %d\n",
-		       info->line, state->count);
-		state->count = 0;
-	}
-	if (state->count) {
-		DBG_CNT("before DEC-2");
-		restore_flags(flags);
-		return;
-	}
-	info->flags |= ASYNC_CLOSING;
-	/*
-	 * Now we wait for the transmit buffer to clear; and we notify
-	 * the line discipline to only process XON/XOFF characters.
-	 */
-	tty->closing = 1;
-	if (info->closing_wait != ASYNC_CLOSING_WAIT_NONE)
-		tty_wait_until_sent(tty, info->closing_wait);
-	/*
-	 * At this point we stop accepting input.  To do this, we
-	 * disable the receive line status interrupts, and tell the
-	 * interrupt driver to stop checking the data ready bit in the
-	 * line status register.
-	 */
-	info->read_status_mask &= ~BD_SC_EMPTY;
-	if (info->flags & ASYNC_INITIALIZED) {
-		if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) {
-			smcp = &immr->im_smc[idx];
-			smcp->smc_smcm &= ~SMCM_RX;
-			smcp->smc_smcmr &= ~SMCMR_REN;
-		}
-		else {
-			sccp = &immr->im_scc[idx - SCC_IDX_BASE];
-			sccp->scc_sccm &= ~UART_SCCM_RX;
-			sccp->scc_gsmrl &= ~SCC_GSMRL_ENR;
-		}
-		/*
-		 * Before we drop DTR, make sure the UART transmitter
-		 * has completely drained; this is especially
-		 * important if there is a transmit FIFO!
-		 */
-		rs_8xx_wait_until_sent(tty, info->timeout);
-	}
-	shutdown(info);
-	if (tty->driver->flush_buffer)
-		tty->driver->flush_buffer(tty);
-	if (tty->ldisc.flush_buffer)
-		tty->ldisc.flush_buffer(tty);
-	tty->closing = 0;
-	info->event = 0;
-	info->tty = 0;
-	if (info->blocked_open) {
-		if (info->close_delay) {
-			current->state = TASK_INTERRUPTIBLE;
-			schedule_timeout(info->close_delay);
-		}
-		wake_up_interruptible(&info->open_wait);
-	}
-	info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
-	wake_up_interruptible(&info->close_wait);
-	restore_flags(flags);
-}
-
-/*
- * rs_wait_until_sent() --- wait until the transmitter is empty
- */
-static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-	unsigned long orig_jiffies, char_time;
-	/*int lsr;*/
-	volatile cbd_t *bdp;
-
-	if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent"))
-		return;
-
-#ifdef maybe
-	if (info->state->type == PORT_UNKNOWN)
-		return;
-#endif
-
-	orig_jiffies = jiffies;
-	/*
-	 * Set the check interval to be 1/5 of the estimated time to
-	 * send a single character, and make it at least 1.  The check
-	 * interval should also be less than the timeout.
-	 *
-	 * Note: we have to use pretty tight timings here to satisfy
-	 * the NIST-PCTS.
-	 */
-	char_time = 1;
-	if (timeout)
-		char_time = min(char_time, (unsigned long)timeout);
-#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
-	printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time);
-	printk("jiff=%lu...", jiffies);
-#endif
-
-	/* We go through the loop at least once because we can't tell
-	 * exactly when the last character exits the shifter.  There can
-	 * be at least two characters waiting to be sent after the buffers
-	 * are empty.
-	 */
-	do {
-#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
-		printk("lsr = %d (jiff=%lu)...", lsr, jiffies);
-#endif
-		current->state = TASK_INTERRUPTIBLE;
-/*		current->dyn_prio = 0;	 make us low-priority */
-		schedule_timeout(char_time);
-		if (signal_pending(current))
-			break;
-		if (timeout && time_after(jiffies, orig_jiffies + timeout))
-			break;
-		bdp = info->tx_cur;
-	} while (bdp->cbd_sc & BD_SC_READY);
-	current->state = TASK_RUNNING;
-#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
-	printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies);
-#endif
-}
-
-/*
- * rs_hangup() --- called by tty_hangup() when a hangup is signaled.
- */
-static void rs_8xx_hangup(struct tty_struct *tty)
-{
-	ser_info_t *info = (ser_info_t *)tty->driver_data;
-	struct serial_state *state = info->state;
-
-	if (serial_paranoia_check(info, tty->name, "rs_hangup"))
-		return;
-
-	state = info->state;
-
-	rs_8xx_flush_buffer(tty);
-	shutdown(info);
-	info->event = 0;
-	state->count = 0;
-	info->flags &= ~ASYNC_NORMAL_ACTIVE;
-	info->tty = 0;
-	wake_up_interruptible(&info->open_wait);
-}
-
-/*
- * ------------------------------------------------------------
- * rs_open() and friends
- * ------------------------------------------------------------
- */
-static int block_til_ready(struct tty_struct *tty, struct file * filp,
-			   ser_info_t *info)
-{
-#ifdef DO_THIS_LATER
-	DECLARE_WAITQUEUE(wait, current);
-	struct serial_state *state = info->state;
-#endif
-	int		retval;
-	int		do_clocal = 0;
-
-	/*
-	 * If the device is in the middle of being closed, then block
-	 * until it's done, and then try again.
-	 */
-	if (tty_hung_up_p(filp) ||
-	    (info->flags & ASYNC_CLOSING)) {
-		if (info->flags & ASYNC_CLOSING)
-			interruptible_sleep_on(&info->close_wait);
-#ifdef SERIAL_DO_RESTART
-		if (info->flags & ASYNC_HUP_NOTIFY)
-			return -EAGAIN;
-		else
-			return -ERESTARTSYS;
-#else
-		return -EAGAIN;
-#endif
-	}
-
-	/*
-	 * If non-blocking mode is set, or the port is not enabled,
-	 * then make the check up front and then exit.
-	 * If this is an SMC port, we don't have modem control to wait
-	 * for, so just get out here.
-	 */
-	if ((filp->f_flags & O_NONBLOCK) ||
-	    (tty->flags & (1 << TTY_IO_ERROR)) ||
-	    (info->state->smc_scc_num < SCC_NUM_BASE)) {
-		info->flags |= ASYNC_NORMAL_ACTIVE;
-		return 0;
-	}
-
-	if (tty->termios->c_cflag & CLOCAL)
-		do_clocal = 1;
-
-	/*
-	 * Block waiting for the carrier detect and the line to become
-	 * free (i.e., not in use by the callout).  While we are in
-	 * this loop, state->count is dropped by one, so that
-	 * rs_close() knows when to free things.  We restore it upon
-	 * exit, either normal or abnormal.
-	 */
-	retval = 0;
-#ifdef DO_THIS_LATER
-	add_wait_queue(&info->open_wait, &wait);
-#ifdef SERIAL_DEBUG_OPEN
-	printk("block_til_ready before block: ttys%d, count = %d\n",
-	       state->line, state->count);
-#endif
-	cli();
-	if (!tty_hung_up_p(filp))
-		state->count--;
-	sti();
-	info->blocked_open++;
-	while (1) {
-		cli();
-		if (tty->termios->c_cflag & CBAUD)
-			serial_out(info, UART_MCR,
-				   serial_inp(info, UART_MCR) |
-				   (UART_MCR_DTR | UART_MCR_RTS));
-		sti();
-		set_current_state(TASK_INTERRUPTIBLE);
-		if (tty_hung_up_p(filp) ||
-		    !(info->flags & ASYNC_INITIALIZED)) {
-#ifdef SERIAL_DO_RESTART
-			if (info->flags & ASYNC_HUP_NOTIFY)
-				retval = -EAGAIN;
-			else
-				retval = -ERESTARTSYS;
-#else
-			retval = -EAGAIN;
-#endif
-			break;
-		}
-		if (!(info->flags & ASYNC_CLOSING) &&
-		    (do_clocal || (serial_in(info, UART_MSR) &
-				   UART_MSR_DCD)))
-			break;
-		if (signal_pending(current)) {
-			retval = -ERESTARTSYS;
-			break;
-		}
-#ifdef SERIAL_DEBUG_OPEN
-		printk("block_til_ready blocking: ttys%d, count = %d\n",
-		       info->line, state->count);
-#endif
-		schedule();
-	}
-	current->state = TASK_RUNNING;
-	remove_wait_queue(&info->open_wait, &wait);
-	if (!tty_hung_up_p(filp))
-		state->count++;
-	info->blocked_open--;
-#ifdef SERIAL_DEBUG_OPEN
-	printk("block_til_ready after blocking: ttys%d, count = %d\n",
-	       info->line, state->count);
-#endif
-#endif /* DO_THIS_LATER */
-	if (retval)
-		return retval;
-	info->flags |= ASYNC_NORMAL_ACTIVE;
-	return 0;
-}
-
-static int get_async_struct(int line, ser_info_t **ret_info)
-{
-	struct serial_state *sstate;
-
-	sstate = rs_table + line;
-	if (sstate->info) {
-		sstate->count++;
-		*ret_info = (ser_info_t *)sstate->info;
-		return 0;
-	}
-	else {
-		return -ENOMEM;
-	}
-}
-
-/*
- * This routine is called whenever a serial port is opened.  It
- * enables interrupts for a serial port, linking in its async structure into
- * the IRQ chain.   It also performs the serial-specific
- * initialization for the tty structure.
- */
-static int rs_8xx_open(struct tty_struct *tty, struct file * filp)
-{
-	ser_info_t	*info;
-	int 		retval, line;
-
-	line = tty->index;
-	if ((line < 0) || (line >= NR_PORTS))
-		return -ENODEV;
-	retval = get_async_struct(line, &info);
-	if (retval)
-		return retval;
-	if (serial_paranoia_check(info, tty->name, "rs_open"))
-		return -ENODEV;
-
-#ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open %s, count = %d\n", tty->name, info->state->count);
-#endif
-	tty->driver_data = info;
-	info->tty = tty;
-
-	/*
-	 * Start up serial port
-	 */
-	retval = startup(info);
-	if (retval)
-		return retval;
-
-	retval = block_til_ready(tty, filp, info);
-	if (retval) {
-#ifdef SERIAL_DEBUG_OPEN
-		printk("rs_open returning after block_til_ready with %d\n",
-		       retval);
-#endif
-		return retval;
-	}
-
-#ifdef SERIAL_DEBUG_OPEN
-	printk("rs_open %s successful...", line);
-#endif
-	return 0;
-}
-
-/*
- * /proc fs routines....
- */
-
-static inline int line_info(char *buf, struct serial_state *state)
-{
-#ifdef notdef
-	struct async_struct *info = state->info, scr_info;
-	char	stat_buf[30], control, status;
-#endif
-	int	ret;
-
-	ret = sprintf(buf, "%d: uart:%s port:%X irq:%d",
-		      state->line,
-		      (state->smc_scc_num < SCC_NUM_BASE) ? "SMC" : "SCC",
-		      (unsigned int)(state->port), state->irq);
-
-	if (!state->port || (state->type == PORT_UNKNOWN)) {
-		ret += sprintf(buf+ret, "\n");
-		return ret;
-	}
-
-#ifdef notdef
-	/*
-	 * Figure out the current RS-232 lines
-	 */
-	if (!info) {
-		info = &scr_info;	/* This is just for serial_{in,out} */
-
-		info->magic = SERIAL_MAGIC;
-		info->port = state->port;
-		info->flags = state->flags;
-		info->quot = 0;
-		info->tty = 0;
-	}
-	cli();
-	status = serial_in(info, UART_MSR);
-	control = info ? info->MCR : serial_in(info, UART_MCR);
-	sti();
-
-	stat_buf[0] = 0;
-	stat_buf[1] = 0;
-	if (control & UART_MCR_RTS)
-		strcat(stat_buf, "|RTS");
-	if (status & UART_MSR_CTS)
-		strcat(stat_buf, "|CTS");
-	if (control & UART_MCR_DTR)
-		strcat(stat_buf, "|DTR");
-	if (status & UART_MSR_DSR)
-		strcat(stat_buf, "|DSR");
-	if (status & UART_MSR_DCD)
-		strcat(stat_buf, "|CD");
-	if (status & UART_MSR_RI)
-		strcat(stat_buf, "|RI");
-
-	if (info->quot) {
-		ret += sprintf(buf+ret, " baud:%d",
-			       state->baud_base / info->quot);
-	}
-
-	ret += sprintf(buf+ret, " tx:%d rx:%d",
-		      state->icount.tx, state->icount.rx);
-
-	if (state->icount.frame)
-		ret += sprintf(buf+ret, " fe:%d", state->icount.frame);
-
-	if (state->icount.parity)
-		ret += sprintf(buf+ret, " pe:%d", state->icount.parity);
-
-	if (state->icount.brk)
-		ret += sprintf(buf+ret, " brk:%d", state->icount.brk);
-
-	if (state->icount.overrun)
-		ret += sprintf(buf+ret, " oe:%d", state->icount.overrun);
-
-	/*
-	 * Last thing is the RS-232 status lines
-	 */
-	ret += sprintf(buf+ret, " %s\n", stat_buf+1);
-#endif
-	return ret;
-}
-
-int rs_8xx_read_proc(char *page, char **start, off_t off, int count,
-		 int *eof, void *data)
-{
-	int i, len = 0;
-	off_t	begin = 0;
-
-	len += sprintf(page, "serinfo:1.0 driver:%s\n", serial_version);
-	for (i = 0; i < NR_PORTS && len < 4000; i++) {
-		len += line_info(page + len, &rs_table[i]);
-		if (len+begin > off+count)
-			goto done;
-		if (len+begin < off) {
-			begin += len;
-			len = 0;
-		}
-	}
-	*eof = 1;
-done:
-	if (off >= len+begin)
-		return 0;
-	*start = page + (begin-off);
-	return ((count < begin+len-off) ? count : begin+len-off);
-}
-
-/*
- * ---------------------------------------------------------------------
- * rs_init() and friends
- *
- * rs_init() is called at boot-time to initialize the serial driver.
- * ---------------------------------------------------------------------
- */
-
-/*
- * This routine prints out the appropriate serial driver version
- * number, and identifies which options were configured into this
- * driver.
- */
-static _INLINE_ void show_serial_version(void)
-{
- 	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
-}
-
-
-/*
- * The serial console driver used during boot.  Note that these names
- * clash with those found in "serial.c", so we currently can't support
- * the 16xxx uarts and these at the same time.  I will fix this to become
- * an indirect function call from tty_io.c (or something).
- */
-
-#ifdef CONFIG_SERIAL_CONSOLE
-
-/*
- * Print a string to the serial port trying not to disturb any possible
- * real use of the port...
- * These funcitons work equally well for SCC, even though they are
- * designed for SMC.  Our only interests are the transmit/receive
- * buffers, which are identically mapped for either the SCC or SMC.
- */
-static void my_console_write(int idx, const char *s,
-				unsigned count)
-{
-	struct		serial_state	*ser;
-	ser_info_t			*info;
-	unsigned			i;
-	volatile	cbd_t		*bdp, *bdbase;
-	volatile	smc_uart_t	*up;
-	volatile	u_char		*cp;
-
-	ser = rs_table + idx;
-
-	/* If the port has been initialized for general use, we have
-	 * to use the buffer descriptors allocated there.  Otherwise,
-	 * we simply use the single buffer allocated.
-	 */
-	if ((info = (ser_info_t *)ser->info) != NULL) {
-		bdp = info->tx_cur;
-		bdbase = info->tx_bd_base;
-	}
-	else {
-		/* Pointer to UART in parameter ram.
-		*/
-		up = (smc_uart_t *)&immr->im_dprambase[ser->port];
-
-		/* Get the address of the host memory buffer.
-		 */
-		bdp = bdbase = (cbd_t *)&immr->im_dprambase[up->smc_tbase];
-	}
-
-	/*
-	 * We need to gracefully shut down the transmitter, disable
-	 * interrupts, then send our bytes out.
-	 */
-
-	/*
-	 * Now, do each character.  This is not as bad as it looks
-	 * since this is a holding FIFO and not a transmitting FIFO.
-	 * We could add the complexity of filling the entire transmit
-	 * buffer, but we would just wait longer between accesses......
-	 */
-	for (i = 0; i < count; i++, s++) {
-		/* Wait for transmitter fifo to empty.
-		 * Ready indicates output is ready, and xmt is doing
-		 * that, not that it is ready for us to send.
-		 */
-		while (bdp->cbd_sc & BD_SC_READY);
-
-		/* Send the character out.
-		 * If the buffer address is in the CPM DPRAM, don't
-		 * convert it.
-		 */
-		if ((uint)(bdp->cbd_bufaddr) > (uint)IMAP_ADDR)
-			cp = (u_char *)(bdp->cbd_bufaddr);
-		else
-			cp = __va(bdp->cbd_bufaddr);
-		*cp = *s;
-
-		bdp->cbd_datlen = 1;
-		bdp->cbd_sc |= BD_SC_READY;
-
-		if (bdp->cbd_sc & BD_SC_WRAP)
-			bdp = bdbase;
-		else
-			bdp++;
-
-		/* if a LF, also do CR... */
-		if (*s == 10) {
-			while (bdp->cbd_sc & BD_SC_READY);
-			cp = __va(bdp->cbd_bufaddr);
-			*cp = 13;
-			bdp->cbd_datlen = 1;
-			bdp->cbd_sc |= BD_SC_READY;
-
-			if (bdp->cbd_sc & BD_SC_WRAP) {
-				bdp = bdbase;
-			}
-			else {
-				bdp++;
-			}
-		}
-	}
-
-	/*
-	 * Finally, Wait for transmitter & holding register to empty
-	 *  and restore the IER
-	 */
-	while (bdp->cbd_sc & BD_SC_READY);
-
-	if (info)
-		info->tx_cur = (cbd_t *)bdp;
-}
-
-static void serial_console_write(struct console *c, const char *s,
-				unsigned count)
-{
-#if defined(CONFIG_KGDB_CONSOLE) && !defined(CONFIG_USE_SERIAL2_KGDB)
-	/* Try to let stub handle output. Returns true if it did. */
-	if (kgdb_output_string(s, count))
-		return;
-#endif
-	my_console_write(c->index, s, count);
-}
-
-#ifdef CONFIG_XMON
-int
-xmon_8xx_write(const char *s, unsigned count)
-{
-	my_console_write(KGDB_SER_IDX, s, count);
-	return(count);
-}
-#endif
-
-#ifdef CONFIG_KGDB
-void
-putDebugChar(char ch)
-{
-	my_console_write(KGDB_SER_IDX, &ch, 1);
-}
-#endif
-
-#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
-/*
- * Receive character from the serial port.  This only works well
- * before the port is initialize for real use.
- */
-static int my_console_wait_key(int idx, int xmon, char *obuf)
-{
-	struct serial_state		*ser;
-	u_char				c, *cp;
-	ser_info_t			*info;
-	volatile	cbd_t		*bdp;
-	volatile	smc_uart_t	*up;
-	int				i;
-
-	ser = rs_table + idx;
-
-	/* Pointer to UART in parameter ram.
-	*/
-	up = (smc_uart_t *)&immr->im_dprambase[ser->port];
-
-	/* Get the address of the host memory buffer.
-	 * If the port has been initialized for general use, we must
-	 * use information from the port structure.
-	 */
-	if ((info = (ser_info_t *)ser->info))
-		bdp = info->rx_cur;
-	else
-		bdp = (cbd_t *)&immr->im_dprambase[up->smc_rbase];
-
-	/*
-	 * We need to gracefully shut down the receiver, disable
-	 * interrupts, then read the input.
-	 * XMON just wants a poll.  If no character, return -1, else
-	 * return the character.
-	 */
-	if (!xmon) {
-		while (bdp->cbd_sc & BD_SC_EMPTY);
-	}
-	else {
-		if (bdp->cbd_sc & BD_SC_EMPTY)
-			return -1;
-	}
-
-	/* If the buffer address is in the CPM DPRAM, don't
-	 * convert it.
-	 */
-	if ((uint)(bdp->cbd_bufaddr) > (uint)IMAP_ADDR)
-		cp = (u_char *)(bdp->cbd_bufaddr);
-	else
-		cp = __va(bdp->cbd_bufaddr);
-
-	if (obuf) {
-		i = c = bdp->cbd_datlen;
-		while (i-- > 0)
-			*obuf++ = *cp++;
-	}
-	else {
-		c = *cp;
-	}
-	bdp->cbd_sc |= BD_SC_EMPTY;
-
-	if (info) {
-		if (bdp->cbd_sc & BD_SC_WRAP) {
-			bdp = info->rx_bd_base;
-		}
-		else {
-			bdp++;
-		}
-		info->rx_cur = (cbd_t *)bdp;
-	}
-
-	return((int)c);
-}
-#endif /* CONFIG_XMON || CONFIG_KGDB */
-
-#ifdef CONFIG_XMON
-int
-xmon_8xx_read_poll(void)
-{
-	return(my_console_wait_key(KGDB_SER_IDX, 1, NULL));
-}
-
-int
-xmon_8xx_read_char(void)
-{
-	return(my_console_wait_key(KGDB_SER_IDX, 0, NULL));
-}
-#endif
-
-#ifdef CONFIG_KGDB
-static char kgdb_buf[RX_BUF_SIZE], *kgdp;
-static int kgdb_chars;
-
-char
-getDebugChar(void)
-{
-	if (kgdb_chars <= 0) {
-		kgdb_chars = my_console_wait_key(KGDB_SER_IDX, 0, kgdb_buf);
-		kgdp = kgdb_buf;
-	}
-	kgdb_chars--;
-
-	return(*kgdp++);
-}
-
-void kgdb_interruptible(int yes)
-{
-	volatile smc_t	*smcp;
-
-	smcp = &immr->im_smc[KGDB_SER_IDX];
-
-	if (yes == 1)
-		smcp->smc_smcm |= SMCM_RX;
-	else
-		smcp->smc_smcm &= ~SMCM_RX;
-}
-
-void kgdb_map_scc(void)
-{
-	ushort		serbase;
-	uint		mem_addr;
-	volatile	cbd_t		*bdp;
-	volatile	smc_uart_t	*up;
-
-	/* The serial port has already been initialized before
-	 * we get here.  We have to assign some pointers needed by
-	 * the kernel, and grab a memory location in the CPM that will
-	 * work until the driver is really initialized.
-	 */
-	immr = (immap_t *)IMAP_ADDR;
-
-	/* Right now, assume we are using SMCs.
-	*/
-#ifdef USE_KGDB_SMC2
-	*(ushort *)(&immr->im_dprambase[PROFF_SMC2_BASE]) = serbase = PROFF_SMC2;
-#else
-	*(ushort *)(&immr->im_dprambase[PROFF_SMC1_BASE]) = serbase = PROFF_SMC1;
-#endif
-	up = (smc_uart_t *)&immr->im_dprambase[serbase];
-
-	/* Allocate space for an input FIFO, plus a few bytes for output.
-	 * Allocate bytes to maintain word alignment.
-	 */
-	mem_addr = (uint)(&immr->im_dprambase[0x1000]);
-
-	/* Set the physical address of the host memory buffers in
-	 * the buffer descriptors.
-	 */
-	bdp = (cbd_t *)&immr->im_dprambase[up->smc_rbase];
-	bdp->cbd_bufaddr = mem_addr;
-
-	bdp = (cbd_t *)&immr->im_dprambase[up->smc_tbase];
-	bdp->cbd_bufaddr = mem_addr+RX_BUF_SIZE;
-
-	up->smc_mrblr = RX_BUF_SIZE;		/* receive buffer length */
-	up->smc_maxidl = RX_BUF_SIZE;
-}
-#endif
-
-static struct tty_driver *serial_console_device(struct console *c, int *index)
-{
-	*index = c->index;
-	return serial_driver;
-}
-
-/*
- *	Register console.
- */
-static int __init console_8xx_init(void)
-{
-	register_console(&sercons);
-	return 0;
-}
-
-console_initcall(console_8xx_init);
-
-#endif
-
-/* Default console baud rate as determined by the board information
- * structure.
- */
-static	int	baud_idx;
-
-static struct tty_operations rs_8xx_ops = {
-	.open = rs_8xx_open,
-	.close = rs_8xx_close,
-	.write = rs_8xx_write,
-	.put_char = rs_8xx_put_char,
-	.write_room = rs_8xx_write_room,
-	.chars_in_buffer = rs_8xx_chars_in_buffer,
-	.flush_buffer = rs_8xx_flush_buffer,
-	.ioctl = rs_8xx_ioctl,
-	.throttle = rs_8xx_throttle,
-	.unthrottle = rs_8xx_unthrottle,
-	.send_xchar = rs_8xx_send_xchar,
-	.set_termios = rs_8xx_set_termios,
-	.stop = rs_8xx_stop,
-	.start = rs_8xx_start,
-	.hangup = rs_8xx_hangup,
-	.wait_until_sent = rs_8xx_wait_until_sent,
-	.read_proc = rs_8xx_read_proc,
-};
-
-/*
- * The serial driver boot-time initialization code!
- */
-static int __init rs_8xx_init(void)
-{
-	struct serial_state * state;
-	ser_info_t	*info;
-	uint		mem_addr, dp_addr;
-	int		i, j, idx;
-	uint		page, sblock;
-	volatile	cbd_t		*bdp;
-	volatile	cpm8260_t	*cp;
-	volatile	smc_t		*sp;
-	volatile	smc_uart_t	*up;
-	volatile	scc_t		*scp;
-	volatile	scc_uart_t	*sup;
-	volatile	immap_t		*immap;
-	volatile	iop8260_t	*io;
-
-	serial_driver = alloc_tty_driver(NR_PORTS);
-	if (!serial_driver)
-		return -ENOMEM;
-
-	show_serial_version();
-
-	/* Initialize the tty_driver structure */
-
-	serial_driver->owner = THIS_MODULE;
-	serial_driver->driver_name = "serial";
-	serial_driver->devfs_name = "tts/";
-	serial_driver->name = "ttyS";
-	serial_driver->major = TTY_MAJOR;
-	serial_driver->minor_start = 64;
-	serial_driver->type = TTY_DRIVER_TYPE_SERIAL;
-	serial_driver->subtype = SERIAL_TYPE_NORMAL;
-	serial_driver->init_termios = tty_std_termios;
-	serial_driver->init_termios.c_cflag =
-		baud_idx | CS8 | CREAD | HUPCL | CLOCAL;
-	serial_driver->flags = TTY_DRIVER_REAL_RAW;
-	tty_set_operations(serial_driver, &rs_8xx_ops);
-	if (tty_register_driver(serial_driver))
-		panic("Couldn't register serial driver\n");
-
-	immap = immr;
-	cp = &immap->im_cpm;
-	io = &immap->im_ioport;
-
-	/* This should have been done long ago by the early boot code,
-	 * but do it again to make sure.
-	 */
-	*(ushort *)(&immap->im_dprambase[PROFF_SMC1_BASE]) = PROFF_SMC1;
-	*(ushort *)(&immap->im_dprambase[PROFF_SMC2_BASE]) = PROFF_SMC2;
-
-	/* Geeze, here we go....Picking I/O port bits....Lots of
-	 * choices.  If you don't like mine, pick your own.
-	 * Configure SMCs Tx/Rx.  SMC1 is only on Port D, SMC2 is
-	 * only on Port A.  You either pick 'em, or not.
-	 */
-#ifndef SCC_CONSOLE
-	io->iop_ppard |= 0x00c00000;
-	io->iop_pdird |= 0x00400000;
-	io->iop_pdird &= ~0x00800000;
-	io->iop_psord &= ~0x00c00000;
-#ifdef USE_SMC2
-	io->iop_ppara |= 0x00c00000;
-	io->iop_pdira |= 0x00400000;
-	io->iop_pdira &= ~0x00800000;
-	io->iop_psora &= ~0x00c00000;
-#endif
-
-	/* Configure SCC2 and SCC3.  Be careful about the fine print.
-	 * Secondary options are only available when you take away
-	 * the primary option.  Unless the pins are used for something
-	 * else, SCC2 and SCC3 are on Port B.
-	 *	Port B,  8 - SCC3 TxD
-	 *	Port B, 12 - SCC2 TxD
-	 *	Port B, 14 - SCC3 RxD
-	 *	Port B, 15 - SCC2 RxD
-	 */
-	io->iop_pparb |= 0x008b0000;
-	io->iop_pdirb |= 0x00880000;
-	io->iop_psorb |= 0x00880000;
-	io->iop_pdirb &= ~0x00030000;
-	io->iop_psorb &= ~0x00030000;
-
-	/* Wire BRG1 to SMC1 and BRG2 to SMC2.
-	*/
-	immap->im_cpmux.cmx_smr = 0;
-
-	/* Connect SCC2 and SCC3 to NMSI.  Connect BRG3 to SCC2 and
-	 * BRG4 to SCC3.
-	 */
-	immap->im_cpmux.cmx_scr &= ~0x00ffff00;
-	immap->im_cpmux.cmx_scr |= 0x00121b00;
-#else
-	io->iop_pparb |= 0x008b0000;
-	io->iop_pdirb |= 0x00880000;
-	io->iop_psorb |= 0x00880000;
-	io->iop_pdirb &= ~0x00030000;
-	io->iop_psorb &= ~0x00030000;
-
-	/* Use Port D for SCC1 instead of other functions.
-	*/
-	io->iop_ppard |= 0x00000003;
-	io->iop_psord &= ~0x00000001;	/* Rx */
-	io->iop_psord |= 0x00000002;	/* Tx */
-	io->iop_pdird &= ~0x00000001;	/* Rx */
-	io->iop_pdird |= 0x00000002;	/* Tx */
-
-	/* Connect SCC1, SCC2, SCC3 to NMSI.  Connect BRG1 to SCC1,
-	 * BRG2 to SCC2, BRG3 to SCC3.
-	 */
-	immap->im_cpmux.cmx_scr &= ~0xffffff00;
-	immap->im_cpmux.cmx_scr |= 0x00091200;
-#endif
-
-	for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) {
-		state->magic = SSTATE_MAGIC;
-		state->line = i;
-		state->type = PORT_UNKNOWN;
-		state->custom_divisor = 0;
-		state->close_delay = 5*HZ/10;
-		state->closing_wait = 30*HZ;
-		state->icount.cts = state->icount.dsr =
-			state->icount.rng = state->icount.dcd = 0;
-		state->icount.rx = state->icount.tx = 0;
-		state->icount.frame = state->icount.parity = 0;
-		state->icount.overrun = state->icount.brk = 0;
- 		printk (KERN_INFO "ttyS%d on %s%d at 0x%04x, BRG%d\n",
- 			i,
- 			(state->smc_scc_num < SCC_NUM_BASE) ? "SMC" : "SCC",
- 			PORT_NUM(state->smc_scc_num) + 1,
- 			(unsigned int)(state->port),
- 			state->smc_scc_num + 1);
-#ifdef CONFIG_SERIAL_CONSOLE
-		/* If we just printed the message on the console port, and
-		 * we are about to initialize it for general use, we have
-		 * to wait a couple of character times for the CR/NL to
-		 * make it out of the transmit buffer.
-		 */
-		if (i == CONFIG_SERIAL_CONSOLE_PORT)
-			mdelay(300);
-#endif
-		info = kmalloc(sizeof(ser_info_t), GFP_KERNEL);
-		if (info) {
-			/*memset(info, 0, sizeof(ser_info_t));*/
-			__clear_user(info,sizeof(ser_info_t));
-			init_waitqueue_head(&info->open_wait);
-			init_waitqueue_head(&info->close_wait);
-			info->magic = SERIAL_MAGIC;
-			info->flags = state->flags;
-			INIT_WORK(&info->tqueue, do_softint, info);
-			INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info);
-			info->line = i;
-			info->state = state;
-			state->info = (struct async_struct *)info;
-
-			/* We need to allocate a transmit and receive buffer
-			 * descriptors from dual port ram, and a character
-			 * buffer area from host mem.
-			 */
-			dp_addr = m8260_cpm_dpalloc(sizeof(cbd_t) * RX_NUM_FIFO, 8);
-
-			/* Allocate space for FIFOs in the host memory.
-			*/
-			mem_addr = m8260_cpm_hostalloc(RX_NUM_FIFO * RX_BUF_SIZE, 1);
-
-			/* Set the physical address of the host memory
-			 * buffers in the buffer descriptors, and the
-			 * virtual address for us to work with.
-			 */
-			bdp = (cbd_t *)&immap->im_dprambase[dp_addr];
-			info->rx_cur = info->rx_bd_base = (cbd_t *)bdp;
-
-			for (j=0; j<(RX_NUM_FIFO-1); j++) {
-				bdp->cbd_bufaddr = __pa(mem_addr);
-				bdp->cbd_sc = BD_SC_EMPTY | BD_SC_INTRPT;
-				mem_addr += RX_BUF_SIZE;
-				bdp++;
-			}
-			bdp->cbd_bufaddr = __pa(mem_addr);
-			bdp->cbd_sc = BD_SC_WRAP | BD_SC_EMPTY | BD_SC_INTRPT;
-
-			if ((idx = state->smc_scc_num) < SCC_NUM_BASE) {
-				sp = &immap->im_smc[idx];
-				up = (smc_uart_t *)&immap->im_dprambase[state->port];
-				up->smc_rbase = dp_addr;
-			}
-			else {
-				scp = &immap->im_scc[idx - SCC_IDX_BASE];
-				sup = (scc_uart_t *)&immap->im_dprambase[state->port];
-				scp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
-				sup->scc_genscc.scc_rbase = dp_addr;
-			}
-
-			dp_addr = m8260_cpm_dpalloc(sizeof(cbd_t) * TX_NUM_FIFO, 8);
-
-			/* Allocate space for FIFOs in the host memory.
-			*/
-			mem_addr = m8260_cpm_hostalloc(TX_NUM_FIFO * TX_BUF_SIZE, 1);
-
-			/* Set the physical address of the host memory
-			 * buffers in the buffer descriptors, and the
-			 * virtual address for us to work with.
-			 */
-			bdp = (cbd_t *)&immap->im_dprambase[dp_addr];
-			info->tx_cur = info->tx_bd_base = (cbd_t *)bdp;
-
-			for (j=0; j<(TX_NUM_FIFO-1); j++) {
-				bdp->cbd_bufaddr = __pa(mem_addr);
-				bdp->cbd_sc = BD_SC_INTRPT;
-				mem_addr += TX_BUF_SIZE;
-				bdp++;
-			}
-			bdp->cbd_bufaddr = __pa(mem_addr);
-			bdp->cbd_sc = (BD_SC_WRAP | BD_SC_INTRPT);
-
-			if (idx < SCC_NUM_BASE) {
-				up->smc_tbase = dp_addr;
-
-				/* Set up the uart parameters in the
-				 * parameter ram.
-				 */
-				up->smc_rfcr = CPMFCR_GBL | CPMFCR_EB;
-				up->smc_tfcr = CPMFCR_GBL | CPMFCR_EB;
-
-				/* Set this to 1 for now, so we get single
-				 * character interrupts.  Using idle charater
-				 * time requires some additional tuning.
-				 */
-				up->smc_mrblr = 1;
-				up->smc_maxidl = 0;
-				up->smc_brkcr = 1;
-
-				/* Send the CPM an initialize command.
-				*/
-				if (state->smc_scc_num == 0) {
-					page = CPM_CR_SMC1_PAGE;
-					sblock = CPM_CR_SMC1_SBLOCK;
-				}
-				else {
-					page = CPM_CR_SMC2_PAGE;
-					sblock = CPM_CR_SMC2_SBLOCK;
-				}
-
-				cp->cp_cpcr = mk_cr_cmd(page, sblock, 0,
-						CPM_CR_INIT_TRX) | CPM_CR_FLG;
-				while (cp->cp_cpcr & CPM_CR_FLG);
-
-				/* Set UART mode, 8 bit, no parity, one stop.
-				 * Enable receive and transmit.
-				 */
-				sp->smc_smcmr = smcr_mk_clen(9) | SMCMR_SM_UART;
-
-				/* Disable all interrupts and clear all pending
-				 * events.
-				 */
-				sp->smc_smcm = 0;
-				sp->smc_smce = 0xff;
-			}
-			else {
-				sup->scc_genscc.scc_tbase = dp_addr;
-
-				/* Set up the uart parameters in the
-				 * parameter ram.
-				 */
-				sup->scc_genscc.scc_rfcr = CPMFCR_GBL | CPMFCR_EB;
-				sup->scc_genscc.scc_tfcr = CPMFCR_GBL | CPMFCR_EB;
-
-				/* Set this to 1 for now, so we get single
-				 * character interrupts.  Using idle charater
-				 * time requires some additional tuning.
-				 */
-				sup->scc_genscc.scc_mrblr = 1;
-				sup->scc_maxidl = 0;
-				sup->scc_brkcr = 1;
-				sup->scc_parec = 0;
-				sup->scc_frmec = 0;
-				sup->scc_nosec = 0;
-				sup->scc_brkec = 0;
-				sup->scc_uaddr1 = 0;
-				sup->scc_uaddr2 = 0;
-				sup->scc_toseq = 0;
-				sup->scc_char1 = 0x8000;
-				sup->scc_char2 = 0x8000;
-				sup->scc_char3 = 0x8000;
-				sup->scc_char4 = 0x8000;
-				sup->scc_char5 = 0x8000;
-				sup->scc_char6 = 0x8000;
-				sup->scc_char7 = 0x8000;
-				sup->scc_char8 = 0x8000;
-				sup->scc_rccm = 0xc0ff;
-
-				/* Send the CPM an initialize command.
-				*/
-#ifdef SCC_CONSOLE
-				switch (state->smc_scc_num) {
-				case 0:
-					page = CPM_CR_SCC1_PAGE;
-					sblock = CPM_CR_SCC1_SBLOCK;
-					break;
-				case 1:
-					page = CPM_CR_SCC2_PAGE;
-					sblock = CPM_CR_SCC2_SBLOCK;
-					break;
-				case 2:
-					page = CPM_CR_SCC3_PAGE;
-					sblock = CPM_CR_SCC3_SBLOCK;
-					break;
-				}
-#else
-				if (state->smc_scc_num == 2) {
-					page = CPM_CR_SCC2_PAGE;
-					sblock = CPM_CR_SCC2_SBLOCK;
-				}
-				else {
-					page = CPM_CR_SCC3_PAGE;
-					sblock = CPM_CR_SCC3_SBLOCK;
-				}
-#endif
-
-				cp->cp_cpcr = mk_cr_cmd(page, sblock, 0,
-						CPM_CR_INIT_TRX) | CPM_CR_FLG;
-				while (cp->cp_cpcr & CPM_CR_FLG);
-
-				/* Set UART mode, 8 bit, no parity, one stop.
-				 * Enable receive and transmit.
-				 */
-				scp->scc_gsmrh = 0;
-				scp->scc_gsmrl =
-					(SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);
-
-				/* Disable all interrupts and clear all pending
-				 * events.
-				 */
-				scp->scc_sccm = 0;
-				scp->scc_scce = 0xffff;
-				scp->scc_dsr = 0x7e7e;
-				scp->scc_pmsr = 0x3000;
-			}
-
-			/* Install interrupt handler.
-			*/
-			request_irq(state->irq, rs_8xx_interrupt, 0, "uart", info);
-
-			/* Set up the baud rate generator.
-			*/
-			m8260_cpm_setbrg(state->smc_scc_num,
-							baud_table[baud_idx]);
-
-			/* If the port is the console, enable Rx and Tx.
-			*/
-#ifdef CONFIG_SERIAL_CONSOLE
-			if (i == CONFIG_SERIAL_CONSOLE_PORT) {
-				if (idx < SCC_NUM_BASE)
-					sp->smc_smcmr |= SMCMR_REN | SMCMR_TEN;
-				else
-					scp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT);
-			}
-#endif
-		}
-	}
-	return 0;
-}
-module_init(rs_8xx_init);
-
-/* This must always be called before the rs_8xx_init() function, otherwise
- * it blows away the port control information.
-*/
-static int __init serial_console_setup(struct console *co, char *options)
-{
-	struct		serial_state *ser;
-	uint		mem_addr, dp_addr, bidx;
-	volatile	cbd_t		*bdp;
-	volatile	cpm8260_t	*cp;
-	volatile	immap_t		*immap;
-#ifndef SCC_CONSOLE
-	volatile	smc_t		*sp;
-	volatile	smc_uart_t	*up;
-#endif
-#ifdef SCC_CONSOLE
-	volatile	scc_t		*scp;
-	volatile	scc_uart_t	*sup;
-#endif
-	volatile	iop8260_t	*io;
-	bd_t				*bd;
-
-	bd = (bd_t *)__res;
-
-	for (bidx = 0; bidx < (sizeof(baud_table) / sizeof(int)); bidx++)
-		if (bd->bi_baudrate == baud_table[bidx])
-			break;
-
-	co->cflag = CREAD|CLOCAL|bidx|CS8;
-	baud_idx = bidx;
-
-	ser = rs_table + co->index;
-
-	immap = immr;
-	cp = &immap->im_cpm;
-	io = &immap->im_ioport;
-
-#ifdef SCC_CONSOLE
-	scp = (scc_t *)&(immap->im_scc[SCC_CONSOLE-1]);
-	sup = (scc_uart_t *)&immap->im_dprambase[PROFF_SCC1 + ((SCC_CONSOLE-1) << 8)];
-	scp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
-	scp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
-
-	/* Use Port D for SCC1 instead of other functions.
-	*/
-	io->iop_ppard |= 0x00000003;
-	io->iop_psord &= ~0x00000001;	/* Rx */
-	io->iop_psord |= 0x00000002;	/* Tx */
-	io->iop_pdird &= ~0x00000001;	/* Rx */
-	io->iop_pdird |= 0x00000002;	/* Tx */
-
-#else
-	/* This should have been done long ago by the early boot code,
-	 * but do it again to make sure.
-	 */
-	*(ushort *)(&immap->im_dprambase[PROFF_SMC1_BASE]) = PROFF_SMC1;
-	*(ushort *)(&immap->im_dprambase[PROFF_SMC2_BASE]) = PROFF_SMC2;
-
-	/* Right now, assume we are using SMCs.
-	*/
-	sp = &immap->im_smc[ser->smc_scc_num];
-
-	/* When we get here, the CPM has been reset, so we need
-	 * to configure the port.
-	 * We need to allocate a transmit and receive buffer descriptor
-	 * from dual port ram, and a character buffer area from host mem.
-	 */
-	up = (smc_uart_t *)&immap->im_dprambase[ser->port];
-
-	/* Disable transmitter/receiver.
-	*/
-	sp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
-
-	/* Use Port D for SMC1 instead of other functions.
-	*/
-	io->iop_ppard |= 0x00c00000;
-	io->iop_pdird |= 0x00400000;
-	io->iop_pdird &= ~0x00800000;
-	io->iop_psord &= ~0x00c00000;
-#endif
-
-	/* Allocate space for two buffer descriptors in the DP ram.
-	*/
-	dp_addr = m8260_cpm_dpalloc(sizeof(cbd_t) * 2, 8);
-
-	/* Allocate space for two 2 byte FIFOs in the host memory.
-	*/
-	mem_addr = m8260_cpm_hostalloc(4, 1);
-
-	/* Set the physical address of the host memory buffers in
-	 * the buffer descriptors.
-	 */
-	bdp = (cbd_t *)&immap->im_dprambase[dp_addr];
-	bdp->cbd_bufaddr = __pa(mem_addr);
-	(bdp+1)->cbd_bufaddr = __pa(mem_addr+2);
-
-	/* For the receive, set empty and wrap.
-	 * For transmit, set wrap.
-	 */
-	bdp->cbd_sc = BD_SC_EMPTY | BD_SC_WRAP;
-	(bdp+1)->cbd_sc = BD_SC_WRAP;
-
-	/* Set up the uart parameters in the parameter ram.
-	*/
-#ifdef SCC_CONSOLE
-	sup->scc_genscc.scc_rbase = dp_addr;
-	sup->scc_genscc.scc_tbase = dp_addr + sizeof(cbd_t);
-
-	/* Set up the uart parameters in the
-	 * parameter ram.
-	 */
-	sup->scc_genscc.scc_rfcr = CPMFCR_GBL | CPMFCR_EB;
-	sup->scc_genscc.scc_tfcr = CPMFCR_GBL | CPMFCR_EB;
-
-	sup->scc_genscc.scc_mrblr = 1;
-	sup->scc_maxidl = 0;
-	sup->scc_brkcr = 1;
-	sup->scc_parec = 0;
-	sup->scc_frmec = 0;
-	sup->scc_nosec = 0;
-	sup->scc_brkec = 0;
-	sup->scc_uaddr1 = 0;
-	sup->scc_uaddr2 = 0;
-	sup->scc_toseq = 0;
-	sup->scc_char1 = 0x8000;
-	sup->scc_char2 = 0x8000;
-	sup->scc_char3 = 0x8000;
-	sup->scc_char4 = 0x8000;
-	sup->scc_char5 = 0x8000;
-	sup->scc_char6 = 0x8000;
-	sup->scc_char7 = 0x8000;
-	sup->scc_char8 = 0x8000;
-	sup->scc_rccm = 0xc0ff;
-
-	/* Send the CPM an initialize command.
-	*/
-	cp->cp_cpcr = mk_cr_cmd(CPM_CR_SCC1_PAGE, CPM_CR_SCC1_SBLOCK, 0,
-			CPM_CR_INIT_TRX) | CPM_CR_FLG;
-	while (cp->cp_cpcr & CPM_CR_FLG);
-
-	/* Set UART mode, 8 bit, no parity, one stop.
-	 * Enable receive and transmit.
-	 */
-	scp->scc_gsmrh = 0;
-	scp->scc_gsmrl =
-		(SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);
-
-	/* Disable all interrupts and clear all pending
-	 * events.
-	 */
-	scp->scc_sccm = 0;
-	scp->scc_scce = 0xffff;
-	scp->scc_dsr = 0x7e7e;
-	scp->scc_pmsr = 0x3000;
-
-	/* Wire BRG1 to SCC1.  The serial init will take care of
-	 * others.
-	 */
-	immap->im_cpmux.cmx_scr = 0;
-
-	/* Set up the baud rate generator.
-	*/
-	m8260_cpm_setbrg(ser->smc_scc_num, bd->bi_baudrate);
-
-	scp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT);
-#else
-	up->smc_rbase = dp_addr;	/* Base of receive buffer desc. */
-	up->smc_tbase = dp_addr+sizeof(cbd_t);	/* Base of xmt buffer desc. */
-	up->smc_rfcr = CPMFCR_GBL | CPMFCR_EB;
-	up->smc_tfcr = CPMFCR_GBL | CPMFCR_EB;
-
-	/* Set this to 1 for now, so we get single character interrupts.
-	*/
-	up->smc_mrblr = 1;		/* receive buffer length */
-	up->smc_maxidl = 0;		/* wait forever for next char */
-
-	/* Send the CPM an initialize command.
-	*/
-	cp->cp_cpcr = mk_cr_cmd(CPM_CR_SMC1_PAGE, CPM_CR_SMC1_SBLOCK, 0,
-			CPM_CR_INIT_TRX) | CPM_CR_FLG;
-	while (cp->cp_cpcr & CPM_CR_FLG);
-
-	/* Set UART mode, 8 bit, no parity, one stop.
-	 * Enable receive and transmit.
-	 */
-	sp->smc_smcmr = smcr_mk_clen(9) |  SMCMR_SM_UART;
-
-	/* Set up the baud rate generator.
-	*/
-	m8260_cpm_setbrg(ser->smc_scc_num, bd->bi_baudrate);
-
-	/* And finally, enable Rx and Tx.
-	*/
-	sp->smc_smcmr |= SMCMR_REN | SMCMR_TEN;
-#endif
-
-	return 0;
-}
--- diff/arch/ppc/syslib/ppc8260_pic.c	2004-05-19 22:11:17.000000000 +0100
+++ source/arch/ppc/syslib/ppc8260_pic.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,131 +0,0 @@
-#include <linux/stddef.h>
-#include <linux/init.h>
-#include <linux/sched.h>
-#include <linux/signal.h>
-#include <asm/irq.h>
-#include <asm/immap_8260.h>
-#include <asm/mpc8260.h>
-#include "ppc8260_pic.h"
-
-/* The 8260 internal interrupt controller.  It is usually
- * the only interrupt controller.
- * There are two 32-bit registers (high/low) for up to 64
- * possible interrupts.
- *
- * Now, the fun starts.....Interrupt Numbers DO NOT MAP
- * in a simple arithmetic fashion to mask or pending registers.
- * That is, interrupt 4 does not map to bit position 4.
- * We create two tables, indexed by vector number, to indicate
- * which register to use and which bit in the register to use.
- */
-static	u_char	irq_to_siureg[] = {
-	1, 1, 1, 1, 1, 1, 1, 1,
-	1, 1, 1, 1, 1, 1, 1, 1,
-	0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0,
-	1, 1, 1, 1, 1, 1, 1, 1,
-	1, 1, 1, 1, 1, 1, 1, 1,
-	0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0
-};
-
-static	u_char	irq_to_siubit[] = {
-	31, 16, 17, 18, 19, 20, 21, 22,
-	23, 24, 25, 26, 27, 28, 29, 30,
-	29, 30, 16, 17, 18, 19, 20, 21,
-	22, 23, 24, 25, 26, 27, 28, 31,
-	 0,  1,  2,  3,  4,  5,  6,  7,
-	 8,  9, 10, 11, 12, 13, 14, 15,
-	15, 14, 13, 12, 11, 10,  9,  8,
-	 7,  6,  5,  4,  3,  2,  1,  0
-};
-
-static void m8260_mask_irq(unsigned int irq_nr)
-{
-	int	bit, word;
-	volatile uint	*simr;
-
-	bit = irq_to_siubit[irq_nr];
-	word = irq_to_siureg[irq_nr];
-
-	simr = &(immr->im_intctl.ic_simrh);
-	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
-	simr[word] = ppc_cached_irq_mask[word];
-}
-
-static void m8260_unmask_irq(unsigned int irq_nr)
-{
-	int	bit, word;
-	volatile uint	*simr;
-
-	bit = irq_to_siubit[irq_nr];
-	word = irq_to_siureg[irq_nr];
-
-	simr = &(immr->im_intctl.ic_simrh);
-	ppc_cached_irq_mask[word] |= (1 << (31 - bit));
-	simr[word] = ppc_cached_irq_mask[word];
-}
-
-static void m8260_mask_and_ack(unsigned int irq_nr)
-{
-	int	bit, word;
-	volatile uint	*simr, *sipnr;
-
-	bit = irq_to_siubit[irq_nr];
-	word = irq_to_siureg[irq_nr];
-
-	simr = &(immr->im_intctl.ic_simrh);
-	sipnr = &(immr->im_intctl.ic_sipnrh);
-	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
-	simr[word] = ppc_cached_irq_mask[word];
-	sipnr[word] = 1 << (31 - bit);
-}
-
-static void m8260_end_irq(unsigned int irq_nr)
-{
-	int	bit, word;
-	volatile uint	*simr;
-
-	if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))
-			&& irq_desc[irq_nr].action) {
-
-		bit = irq_to_siubit[irq_nr];
-		word = irq_to_siureg[irq_nr];
-
-		simr = &(immr->im_intctl.ic_simrh);
-		ppc_cached_irq_mask[word] |= (1 << (31 - bit));
-		simr[word] = ppc_cached_irq_mask[word];
-	}
-}
-
-struct hw_interrupt_type ppc8260_pic = {
-	" 8260 SIU  ",
-	NULL,
-	NULL,
-	m8260_unmask_irq,
-	m8260_mask_irq,
-	m8260_mask_and_ack,
-	m8260_end_irq,
-	0
-};
-
-
-int
-m8260_get_irq(struct pt_regs *regs)
-{
-	int irq;
-        unsigned long bits;
-
-        /* For MPC8260, read the SIVEC register and shift the bits down
-         * to get the irq number.         */
-        bits = immr->im_intctl.ic_sivec;
-        irq = bits >> 26;
-
-	if (irq == 0)
-		return(-1);
-#if 0
-        irq += ppc8260_pic.irq_offset;
-#endif
-	return irq;
-}
-
--- diff/arch/ppc/syslib/ppc8260_pic.h	2004-05-19 22:11:17.000000000 +0100
+++ source/arch/ppc/syslib/ppc8260_pic.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-#ifndef _PPC_KERNEL_PPC8260_H
-#define _PPC_KERNEL_PPC8260_H
-
-#include <linux/irq.h>
-
-extern struct hw_interrupt_type ppc8260_pic;
-
-void m8260_pic_init(void);
-void m8260_do_IRQ(struct pt_regs *regs,
-                 int            cpu);
-int m8260_get_irq(struct pt_regs *regs);
-
-#endif /* _PPC_KERNEL_PPC8260_H */
--- diff/arch/sh/boards/systemh/Makefile	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/boards/systemh/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-#
-# Makefile for the SystemH specific parts of the kernel
-#
-
-obj-y	 := setup.o irq.o io.o
-
-# XXX: This wants to be consolidated in arch/sh/drivers/pci, and more
-# importantly, with the generic sh7751_pcic_init() code. For now, we'll
-# just abuse the hell out of kbuild, because we can..
-
-obj-$(CONFIG_PCI) += pci.o
-pci-y := ../se/7751/pci.o
-
--- diff/arch/sh/boards/systemh/io.c	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/boards/systemh/io.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,283 +0,0 @@
-/* 
- * linux/arch/sh/boards/systemh/io.c
- *
- * Copyright (C) 2001  Ian da Silva, Jeremy Siegel
- * Based largely on io_se.c.
- *
- * I/O routine for Hitachi 7751 Systemh.
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <asm/systemh/7751systemh.h>
-#include <asm/addrspace.h>
-#include <asm/io.h>
-
-#include <linux/pci.h>
-#include "../../drivers/pci/pci-sh7751.h"
-
-/*
- * The 7751 SystemH Engine uses the built-in PCI controller (PCIC)
- * of the 7751 processor, and has a SuperIO accessible on its memory 
- * bus.
- */ 
-
-#define PCIIOBR		(volatile long *)PCI_REG(SH7751_PCIIOBR)
-#define PCIMBR          (volatile long *)PCI_REG(SH7751_PCIMBR)
-#define PCI_IO_AREA	SH7751_PCI_IO_BASE
-#define PCI_MEM_AREA	SH7751_PCI_CONFIG_BASE
-
-#define PCI_IOMAP(adr)	(PCI_IO_AREA + (adr & ~SH7751_PCIIOBR_MASK))
-#define ETHER_IOMAP(adr) (0xB3000000 + (adr)) /*map to 16bits access area
-                                                of smc lan chip*/ 
-
-#define maybebadio(name,port) \
-  printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \
-	 #name, (port), (__u32) __builtin_return_address(0))
-
-static inline void delay(void)
-{
-	ctrl_inw(0xa0000000);
-}
-
-static inline volatile __u16 *
-port2adr(unsigned int port)
-{
-	if (port >= 0x2000)
-		return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000));
-#if 0
-	else
-		return (volatile __u16 *) (PA_SUPERIO + (port << 1));
-#endif
-	maybebadio(name,(unsigned long)port);
-	return (volatile __u16*)port;
-}
-
-/* In case someone configures the kernel w/o PCI support: in that */
-/* scenario, don't ever bother to check for PCI-window addresses */
-
-/* NOTE: WINDOW CHECK MAY BE A BIT OFF, HIGH PCIBIOS_MIN_IO WRAPS? */
-#if defined(CONFIG_PCI)
-#define CHECK_SH7751_PCIIO(port) \
-  ((port >= PCIBIOS_MIN_IO) && (port < (PCIBIOS_MIN_IO + SH7751_PCI_IO_SIZE)))
-#else
-#define CHECK_SH7751_PCIIO(port) (0)
-#endif
-
-/*
- * General outline: remap really low stuff [eventually] to SuperIO,
- * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
- * is mapped through the PCI IO window.  Stuff with high bits (PXSEG)
- * should be way beyond the window, and is used  w/o translation for
- * compatibility.
- */
-unsigned char sh7751systemh_inb(unsigned long port)
-{
-	if (PXSEG(port))
-		return *(volatile unsigned char *)port;
-	else if (CHECK_SH7751_PCIIO(port))
-		return *(volatile unsigned char *)PCI_IOMAP(port);
-	else if (port <= 0x3F1)
-		return *(volatile unsigned char *)ETHER_IOMAP(port);
-	else
-		return (*port2adr(port))&0xff; 
-}
-
-unsigned char sh7751systemh_inb_p(unsigned long port)
-{
-	unsigned char v;
-
-        if (PXSEG(port))
-                v = *(volatile unsigned char *)port;
-	else if (CHECK_SH7751_PCIIO(port))
-                v = *(volatile unsigned char *)PCI_IOMAP(port);
-	else if (port <= 0x3F1)
-		v = *(volatile unsigned char *)ETHER_IOMAP(port);
-	else
-		v = (*port2adr(port))&0xff; 
-	delay();
-	return v;
-}
-
-unsigned short sh7751systemh_inw(unsigned long port)
-{
-        if (PXSEG(port))
-                return *(volatile unsigned short *)port;
-	else if (CHECK_SH7751_PCIIO(port))
-                return *(volatile unsigned short *)PCI_IOMAP(port);
-	else if (port >= 0x2000)
-		return *port2adr(port);
-	else if (port <= 0x3F1)
-		return *(volatile unsigned int *)ETHER_IOMAP(port);
-	else
-		maybebadio(inw, port);
-	return 0;
-}
-
-unsigned int sh7751systemh_inl(unsigned long port)
-{
-        if (PXSEG(port))
-                return *(volatile unsigned long *)port;
-	else if (CHECK_SH7751_PCIIO(port))
-                return *(volatile unsigned int *)PCI_IOMAP(port);
-	else if (port >= 0x2000)
-		return *port2adr(port);
-	else if (port <= 0x3F1)
-		return *(volatile unsigned int *)ETHER_IOMAP(port);
-	else
-		maybebadio(inl, port);
-	return 0;
-}
-
-void sh7751systemh_outb(unsigned char value, unsigned long port)
-{
-
-        if (PXSEG(port))
-                *(volatile unsigned char *)port = value;
-	else if (CHECK_SH7751_PCIIO(port))
-        	*((unsigned char*)PCI_IOMAP(port)) = value;
-	else if (port <= 0x3F1)
-		*(volatile unsigned char *)ETHER_IOMAP(port) = value;
-	else
-		*(port2adr(port)) = value;
-}
-
-void sh7751systemh_outb_p(unsigned char value, unsigned long port)
-{
-        if (PXSEG(port))
-                *(volatile unsigned char *)port = value;
-	else if (CHECK_SH7751_PCIIO(port))
-        	*((unsigned char*)PCI_IOMAP(port)) = value;
-	else if (port <= 0x3F1)
-		*(volatile unsigned char *)ETHER_IOMAP(port) = value;
-	else
-		*(port2adr(port)) = value;
-	delay();
-}
-
-void sh7751systemh_outw(unsigned short value, unsigned long port)
-{
-        if (PXSEG(port))
-                *(volatile unsigned short *)port = value;
-	else if (CHECK_SH7751_PCIIO(port))
-        	*((unsigned short *)PCI_IOMAP(port)) = value;
-	else if (port >= 0x2000)
-		*port2adr(port) = value;
-	else if (port <= 0x3F1)
-		*(volatile unsigned short *)ETHER_IOMAP(port) = value;
-	else
-		maybebadio(outw, port);
-}
-
-void sh7751systemh_outl(unsigned int value, unsigned long port)
-{
-        if (PXSEG(port))
-                *(volatile unsigned long *)port = value;
-	else if (CHECK_SH7751_PCIIO(port))
-        	*((unsigned long*)PCI_IOMAP(port)) = value;
-	else
-		maybebadio(outl, port);
-}
-
-void sh7751systemh_insb(unsigned long port, void *addr, unsigned long count)
-{
-	unsigned char *p = addr;
-	while (count--) *p++ = sh7751systemh_inb(port);
-}
-
-void sh7751systemh_insw(unsigned long port, void *addr, unsigned long count)
-{
-	unsigned short *p = addr;
-	while (count--) *p++ = sh7751systemh_inw(port);
-}
-
-void sh7751systemh_insl(unsigned long port, void *addr, unsigned long count)
-{
-	maybebadio(insl, port);
-}
-
-void sh7751systemh_outsb(unsigned long port, const void *addr, unsigned long count)
-{
-	unsigned char *p = (unsigned char*)addr;
-	while (count--) sh7751systemh_outb(*p++, port);
-}
-
-void sh7751systemh_outsw(unsigned long port, const void *addr, unsigned long count)
-{
-	unsigned short *p = (unsigned short*)addr;
-	while (count--) sh7751systemh_outw(*p++, port);
-}
-
-void sh7751systemh_outsl(unsigned long port, const void *addr, unsigned long count)
-{
-	maybebadio(outsw, port);
-}
-
-/* For read/write calls, just copy generic (pass-thru); PCIMBR is  */
-/* already set up.  For a larger memory space, these would need to */
-/* reset PCIMBR as needed on a per-call basis...                   */
-
-unsigned char sh7751systemh_readb(unsigned long addr)
-{
-	return *(volatile unsigned char*)addr;
-}
-
-unsigned short sh7751systemh_readw(unsigned long addr)
-{
-	return *(volatile unsigned short*)addr;
-}
-
-unsigned int sh7751systemh_readl(unsigned long addr)
-{
-	return *(volatile unsigned long*)addr;
-}
-
-void sh7751systemh_writeb(unsigned char b, unsigned long addr)
-{
-	*(volatile unsigned char*)addr = b;
-}
-
-void sh7751systemh_writew(unsigned short b, unsigned long addr)
-{
-	*(volatile unsigned short*)addr = b;
-}
-
-void sh7751systemh_writel(unsigned int b, unsigned long addr)
-{
-        *(volatile unsigned long*)addr = b;
-}
-
-
-
-/* Map ISA bus address to the real address. Only for PCMCIA.  */
-
-/* ISA page descriptor.  */
-static __u32 sh_isa_memmap[256];
-
-#if 0
-static int
-sh_isa_mmap(__u32 start, __u32 length, __u32 offset)
-{
-	int idx;
-
-	if (start >= 0x100000 || (start & 0xfff) || (length != 0x1000))
-		return -1;
-
-	idx = start >> 12;
-	sh_isa_memmap[idx] = 0xb8000000 + (offset &~ 0xfff);
-	printk("sh_isa_mmap: start %x len %x offset %x (idx %x paddr %x)\n",
-	       start, length, offset, idx, sh_isa_memmap[idx]);
-	return 0;
-}
-#endif
-
-unsigned long
-sh7751systemh_isa_port2addr(unsigned long offset)
-{
-	int idx;
-
-	idx = (offset >> 12) & 0xff;
-	offset &= 0xfff;
-	return sh_isa_memmap[idx] + offset;
-}
--- diff/arch/sh/boards/systemh/irq.c	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/boards/systemh/irq.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,111 +0,0 @@
-/* 
- * linux/arch/sh/boards/systemh/irq.c
- *
- * Copyright (C) 2000  Kazumoto Kojima
- *
- * Hitachi SystemH Support.
- *
- * Modified for 7751 SystemH by
- * Jonathan Short.
- */
-
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/irq.h>
-
-#include <linux/hdreg.h>
-#include <linux/ide.h>
-#include <asm/io.h>
-#include <asm/mach/7751systemh.h>
-#include <asm/smc37c93x.h>
-
-/* address of external interrupt mask register
- * address must be set prior to use these (maybe in init_XXX_irq())
- * XXX : is it better to use .config than specifying it in code? */
-static unsigned long *systemh_irq_mask_register = (unsigned long *)0xB3F10004;
-static unsigned long *systemh_irq_request_register = (unsigned long *)0xB3F10000;
-
-/* forward declaration */
-static unsigned int startup_systemh_irq(unsigned int irq);
-static void shutdown_systemh_irq(unsigned int irq);
-static void enable_systemh_irq(unsigned int irq);
-static void disable_systemh_irq(unsigned int irq);
-static void mask_and_ack_systemh(unsigned int);
-static void end_systemh_irq(unsigned int irq);
-
-/* hw_interrupt_type */
-static struct hw_interrupt_type systemh_irq_type = {
-	" SystemH Register",
-	startup_systemh_irq,
-	shutdown_systemh_irq,
-	enable_systemh_irq,
-	disable_systemh_irq,
-	mask_and_ack_systemh,
-	end_systemh_irq
-};
-
-static unsigned int startup_systemh_irq(unsigned int irq)
-{ 
-	enable_systemh_irq(irq);
-	return 0; /* never anything pending */
-}
-
-static void shutdown_systemh_irq(unsigned int irq)
-{
-	disable_systemh_irq(irq);
-}
-
-static void disable_systemh_irq(unsigned int irq)
-{
-	if (systemh_irq_mask_register) {
-		unsigned long flags;
-		unsigned long val, mask = 0x01 << 1;
-
-		/* Clear the "irq"th bit in the mask and set it in the request */
-		local_irq_save(flags);
-
-		val = ctrl_inl((unsigned long)systemh_irq_mask_register);
-		val &= ~mask;
-		ctrl_outl(val, (unsigned long)systemh_irq_mask_register);
-
-		val = ctrl_inl((unsigned long)systemh_irq_request_register);
-		val |= mask;
-		ctrl_outl(val, (unsigned long)systemh_irq_request_register);
-
-		local_irq_restore(flags);
-	}
-}
-
-static void enable_systemh_irq(unsigned int irq)
-{
-	if (systemh_irq_mask_register) {
-		unsigned long flags;
-		unsigned long val, mask = 0x01 << 1;
-
-		/* Set "irq"th bit in the mask register */
-		local_irq_save(flags);
-		val = ctrl_inl((unsigned long)systemh_irq_mask_register);
-		val |= mask;
-		ctrl_outl(val, (unsigned long)systemh_irq_mask_register);
-		local_irq_restore(flags);
-	}
-}
-
-static void mask_and_ack_systemh(unsigned int irq)
-{
-	disable_systemh_irq(irq);
-}
-
-static void end_systemh_irq(unsigned int irq)
-{
-	if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
-		enable_systemh_irq(irq);
-}
-
-void make_systemh_irq(unsigned int irq)
-{
-	disable_irq_nosync(irq);
-	irq_desc[irq].handler = &systemh_irq_type;
-	disable_systemh_irq(irq);
-}
-
--- diff/arch/sh/boards/systemh/setup.c	2004-05-19 22:11:21.000000000 +0100
+++ source/arch/sh/boards/systemh/setup.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,80 +0,0 @@
-/* 
- * linux/arch/sh/boards/systemh/setup.c
- *
- * Copyright (C) 2000  Kazumoto Kojima
- * Copyright (C) 2003  Paul Mundt
- *
- * Hitachi SystemH Support.
- *
- * Modified for 7751 SystemH by Jonathan Short.
- *
- * Rewritten for 2.6 by Paul Mundt.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-#include <linux/init.h>
-#include <asm/mach/7751systemh.h>
-#include <asm/mach/io.h>
-#include <asm/machvec.h>
-
-extern void make_systemh_irq(unsigned int irq);
-
-const char *get_system_type(void)
-{
-	return "7751 SystemH";
-}
-
-/*
- * Initialize IRQ setting
- */
-void __init init_7751systemh_IRQ(void)
-{
-/*  	make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); LAN */
-/*  	make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-4); */
-	make_systemh_irq(0xb);	/* Ethernet interrupt */
-}
-
-struct sh_machine_vector mv_7751systemh __initmv = {
-	.mv_nr_irqs		= 72,
-
-	.mv_inb			= sh7751systemh_inb,
-	.mv_inw			= sh7751systemh_inw,
-	.mv_inl			= sh7751systemh_inl,
-	.mv_outb		= sh7751systemh_outb,
-	.mv_outw		= sh7751systemh_outw,
-	.mv_outl		= sh7751systemh_outl,
-
-	.mv_inb_p		= sh7751systemh_inb_p,
-	.mv_inw_p		= sh7751systemh_inw,
-	.mv_inl_p		= sh7751systemh_inl,
-	.mv_outb_p		= sh7751systemh_outb_p,
-	.mv_outw_p		= sh7751systemh_outw,
-	.mv_outl_p		= sh7751systemh_outl,
-
-	.mv_insb		= sh7751systemh_insb,
-	.mv_insw		= sh7751systemh_insw,
-	.mv_insl		= sh7751systemh_insl,
-	.mv_outsb		= sh7751systemh_outsb,
-	.mv_outsw		= sh7751systemh_outsw,
-	.mv_outsl		= sh7751systemh_outsl,
-
-	.mv_readb		= sh7751systemh_readb,
-	.mv_readw		= sh7751systemh_readw,
-	.mv_readl		= sh7751systemh_readl,
-	.mv_writeb		= sh7751systemh_writeb,
-	.mv_writew		= sh7751systemh_writew,
-	.mv_writel		= sh7751systemh_writel,
-
-	.mv_isa_port2addr	= sh7751systemh_isa_port2addr,
-
-	.mv_init_irq		= init_7751systemh_IRQ,
-};
-ALIAS_MV(7751systemh)
-
-int __init platform_setup(void)
-{
-	return 0;
-}
-
--- diff/drivers/block/carmel.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/block/carmel.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,1763 +0,0 @@
-/*
- *  carmel.c: Driver for Promise SATA SX8 looks-like-I2O hardware
- *
- *  Copyright 2004 Red Hat, Inc.
- *
- *  Author/maintainer:  Jeff Garzik <jgarzik@pobox.com>
- *
- *  This file is subject to the terms and conditions of the GNU General Public
- *  License.  See the file "COPYING" in the main directory of this archive
- *  for more details.
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
-#include <linux/blkdev.h>
-#include <linux/sched.h>
-#include <linux/devfs_fs_kernel.h>
-#include <linux/interrupt.h>
-#include <linux/compiler.h>
-#include <linux/workqueue.h>
-#include <linux/bitops.h>
-#include <linux/delay.h>
-#include <linux/time.h>
-#include <linux/hdreg.h>
-#include <asm/io.h>
-#include <asm/semaphore.h>
-#include <asm/uaccess.h>
-
-MODULE_AUTHOR("Jeff Garzik");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Promise SATA SX8 (carmel) block driver");
-
-#if 0
-#define CARM_DEBUG
-#define CARM_VERBOSE_DEBUG
-#else
-#undef CARM_DEBUG
-#undef CARM_VERBOSE_DEBUG
-#endif
-#undef CARM_NDEBUG
-
-#define DRV_NAME "carmel"
-#define DRV_VERSION "0.8"
-#define PFX DRV_NAME ": "
-
-#define NEXT_RESP(idx)	((idx + 1) % RMSG_Q_LEN)
-
-/* 0xf is just arbitrary, non-zero noise; this is sorta like poisoning */
-#define TAG_ENCODE(tag)	(((tag) << 16) | 0xf)
-#define TAG_DECODE(tag)	(((tag) >> 16) & 0x1f)
-#define TAG_VALID(tag)	((((tag) & 0xf) == 0xf) && (TAG_DECODE(tag) < 32))
-
-/* note: prints function name for you */
-#ifdef CARM_DEBUG
-#define DPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
-#ifdef CARM_VERBOSE_DEBUG
-#define VPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
-#else
-#define VPRINTK(fmt, args...)
-#endif	/* CARM_VERBOSE_DEBUG */
-#else
-#define DPRINTK(fmt, args...)
-#define VPRINTK(fmt, args...)
-#endif	/* CARM_DEBUG */
-
-#ifdef CARM_NDEBUG
-#define assert(expr)
-#else
-#define assert(expr) \
-        if(unlikely(!(expr))) {                                   \
-        printk(KERN_ERR "Assertion failed! %s,%s,%s,line=%d\n", \
-        #expr,__FILE__,__FUNCTION__,__LINE__);          \
-        }
-#endif
-
-/* defines only for the constants which don't work well as enums */
-struct carm_host;
-
-enum {
-	/* adapter-wide limits */
-	CARM_MAX_PORTS		= 8,
-	CARM_SHM_SIZE		= (4096 << 7),
-	CARM_MINORS_PER_MAJOR	= 256 / CARM_MAX_PORTS,
-	CARM_MAX_WAIT_Q		= CARM_MAX_PORTS + 1,
-
-	/* command message queue limits */
-	CARM_MAX_REQ		= 64,	       /* max command msgs per host */
-	CARM_MAX_Q		= 1,		   /* one command at a time */
-	CARM_MSG_LOW_WATER	= (CARM_MAX_REQ / 4),	     /* refill mark */
-
-	/* S/G limits, host-wide and per-request */
-	CARM_MAX_REQ_SG		= 32,	     /* max s/g entries per request */
-	CARM_SG_BOUNDARY	= 0xffffUL,	    /* s/g segment boundary */
-	CARM_MAX_HOST_SG	= 600,		/* max s/g entries per host */
-	CARM_SG_LOW_WATER	= (CARM_MAX_HOST_SG / 4),   /* re-fill mark */
-
-	/* hardware registers */
-	CARM_IHQP		= 0x1c,
-	CARM_INT_STAT		= 0x10, /* interrupt status */
-	CARM_INT_MASK		= 0x14, /* interrupt mask */
-	CARM_HMUC		= 0x18, /* host message unit control */
-	RBUF_ADDR_LO		= 0x20, /* response msg DMA buf low 32 bits */
-	RBUF_ADDR_HI		= 0x24, /* response msg DMA buf high 32 bits */
-	RBUF_BYTE_SZ		= 0x28,
-	CARM_RESP_IDX		= 0x2c,
-	CARM_CMS0		= 0x30, /* command message size reg 0 */
-	CARM_LMUC		= 0x48,
-	CARM_HMPHA		= 0x6c,
-	CARM_INITC		= 0xb5,
-
-	/* bits in CARM_INT_{STAT,MASK} */
-	INT_RESERVED		= 0xfffffff0,
-	INT_WATCHDOG		= (1 << 3),	/* watchdog timer */
-	INT_Q_OVERFLOW		= (1 << 2),	/* cmd msg q overflow */
-	INT_Q_AVAILABLE		= (1 << 1),	/* cmd msg q has free space */
-	INT_RESPONSE		= (1 << 0),	/* response msg available */
-	INT_ACK_MASK		= INT_WATCHDOG | INT_Q_OVERFLOW,
-	INT_DEF_MASK		= INT_RESERVED | INT_Q_OVERFLOW |
-				  INT_RESPONSE,
-
-	/* command messages, and related register bits */
-	CARM_HAVE_RESP		= 0x01,
-	CARM_MSG_READ		= 1,
-	CARM_MSG_WRITE		= 2,
-	CARM_MSG_VERIFY		= 3,
-	CARM_MSG_GET_CAPACITY	= 4,
-	CARM_MSG_FLUSH		= 5,
-	CARM_MSG_IOCTL		= 6,
-	CARM_MSG_ARRAY		= 8,
-	CARM_MSG_MISC		= 9,
-	CARM_CME		= (1 << 2),
-	CARM_RME		= (1 << 1),
-	CARM_WZBC		= (1 << 0),
-	CARM_RMI		= (1 << 0),
-	CARM_Q_FULL		= (1 << 3),
-	CARM_MSG_SIZE		= 288,
-	CARM_Q_LEN		= 48,
-
-	/* CARM_MSG_IOCTL messages */
-	CARM_IOC_SCAN_CHAN	= 5,	/* scan channels for devices */
-	CARM_IOC_GET_TCQ	= 13,	/* get tcq/ncq depth */
-	CARM_IOC_SET_TCQ	= 14,	/* set tcq/ncq depth */
-
-	IOC_SCAN_CHAN_NODEV	= 0x1f,
-	IOC_SCAN_CHAN_OFFSET	= 0x40,
-
-	/* CARM_MSG_ARRAY messages */
-	CARM_ARRAY_INFO		= 0,
-
-	ARRAY_NO_EXIST		= (1 << 31),
-
-	/* response messages */
-	RMSG_SZ			= 8,	/* sizeof(struct carm_response) */
-	RMSG_Q_LEN		= 48,	/* resp. msg list length */
-	RMSG_OK			= 1,	/* bit indicating msg was successful */
-					/* length of entire resp. msg buffer */
-	RBUF_LEN		= RMSG_SZ * RMSG_Q_LEN,
-
-	PDC_SHM_SIZE		= (4096 << 7), /* length of entire h/w buffer */
-
-	/* CARM_MSG_MISC messages */
-	MISC_GET_FW_VER		= 2,
-	MISC_ALLOC_MEM		= 3,
-	MISC_SET_TIME		= 5,
-
-	/* MISC_GET_FW_VER feature bits */
-	FW_VER_4PORT		= (1 << 2), /* 1=4 ports, 0=8 ports */
-	FW_VER_NON_RAID		= (1 << 1), /* 1=non-RAID firmware, 0=RAID */
-	FW_VER_ZCR		= (1 << 0), /* zero channel RAID (whatever that is) */
-
-	/* carm_host flags */
-	FL_NON_RAID		= FW_VER_NON_RAID,
-	FL_4PORT		= FW_VER_4PORT,
-	FL_FW_VER_MASK		= (FW_VER_NON_RAID | FW_VER_4PORT),
-	FL_DAC			= (1 << 16),
-	FL_DYN_MAJOR		= (1 << 17),
-};
-
-enum scatter_gather_types {
-	SGT_32BIT		= 0,
-	SGT_64BIT		= 1,
-};
-
-enum host_states {
-	HST_INVALID,		/* invalid state; never used */
-	HST_ALLOC_BUF,		/* setting up master SHM area */
-	HST_ERROR,		/* we never leave here */
-	HST_PORT_SCAN,		/* start dev scan */
-	HST_DEV_SCAN_START,	/* start per-device probe */
-	HST_DEV_SCAN,		/* continue per-device probe */
-	HST_DEV_ACTIVATE,	/* activate devices we found */
-	HST_PROBE_FINISHED,	/* probe is complete */
-	HST_PROBE_START,	/* initiate probe */
-	HST_SYNC_TIME,		/* tell firmware what time it is */
-	HST_GET_FW_VER,		/* get firmware version, adapter port cnt */
-};
-
-#ifdef CARM_DEBUG
-static const char *state_name[] = {
-	"HST_INVALID",
-	"HST_ALLOC_BUF",
-	"HST_ERROR",
-	"HST_PORT_SCAN",
-	"HST_DEV_SCAN_START",
-	"HST_DEV_SCAN",
-	"HST_DEV_ACTIVATE",
-	"HST_PROBE_FINISHED",
-	"HST_PROBE_START",
-	"HST_SYNC_TIME",
-	"HST_GET_FW_VER",
-};
-#endif
-
-struct carm_port {
-	unsigned int			port_no;
-	unsigned int			n_queued;
-	struct gendisk			*disk;
-	struct carm_host		*host;
-
-	/* attached device characteristics */
-	u64				capacity;
-	char				name[41];
-	u16				dev_geom_head;
-	u16				dev_geom_sect;
-	u16				dev_geom_cyl;
-};
-
-struct carm_request {
-	unsigned int			tag;
-	int				n_elem;
-	unsigned int			msg_type;
-	unsigned int			msg_subtype;
-	unsigned int			msg_bucket;
-	struct request			*rq;
-	struct carm_port		*port;
-	struct scatterlist		sg[CARM_MAX_REQ_SG];
-};
-
-struct carm_host {
-	unsigned long			flags;
-	void				*mmio;
-	void				*shm;
-	dma_addr_t			shm_dma;
-
-	int				major;
-	int				id;
-	char				name[32];
-
-	spinlock_t			lock;
-	struct pci_dev			*pdev;
-	unsigned int			state;
-	u32				fw_ver;
-
-	request_queue_t			*oob_q;
-	unsigned int			n_oob;
-
-	unsigned int			hw_sg_used;
-
-	unsigned int			resp_idx;
-
-	unsigned int			wait_q_prod;
-	unsigned int			wait_q_cons;
-	request_queue_t			*wait_q[CARM_MAX_WAIT_Q];
-
-	unsigned int			n_msgs;
-	u64				msg_alloc;
-	struct carm_request		req[CARM_MAX_REQ];
-	void				*msg_base;
-	dma_addr_t			msg_dma;
-
-	int				cur_scan_dev;
-	unsigned long			dev_active;
-	unsigned long			dev_present;
-	struct carm_port		port[CARM_MAX_PORTS];
-
-	struct work_struct		fsm_task;
-
-	struct semaphore		probe_sem;
-};
-
-struct carm_response {
-	u32 ret_handle;
-	u32 status;
-}  __attribute__((packed));
-
-struct carm_msg_sg {
-	u32 start;
-	u32 len;
-}  __attribute__((packed));
-
-struct carm_msg_rw {
-	u8 type;
-	u8 id;
-	u8 sg_count;
-	u8 sg_type;
-	u32 handle;
-	u32 lba;
-	u16 lba_count;
-	u16 lba_high;
-	struct carm_msg_sg sg[32];
-}  __attribute__((packed));
-
-struct carm_msg_allocbuf {
-	u8 type;
-	u8 subtype;
-	u8 n_sg;
-	u8 sg_type;
-	u32 handle;
-	u32 addr;
-	u32 len;
-	u32 evt_pool;
-	u32 n_evt;
-	u32 rbuf_pool;
-	u32 n_rbuf;
-	u32 msg_pool;
-	u32 n_msg;
-	struct carm_msg_sg sg[8];
-}  __attribute__((packed));
-
-struct carm_msg_ioctl {
-	u8 type;
-	u8 subtype;
-	u8 array_id;
-	u8 reserved1;
-	u32 handle;
-	u32 data_addr;
-	u32 reserved2;
-}  __attribute__((packed));
-
-struct carm_msg_sync_time {
-	u8 type;
-	u8 subtype;
-	u16 reserved1;
-	u32 handle;
-	u32 reserved2;
-	u32 timestamp;
-}  __attribute__((packed));
-
-struct carm_msg_get_fw_ver {
-	u8 type;
-	u8 subtype;
-	u16 reserved1;
-	u32 handle;
-	u32 data_addr;
-	u32 reserved2;
-}  __attribute__((packed));
-
-struct carm_fw_ver {
-	u32 version;
-	u8 features;
-	u8 reserved1;
-	u16 reserved2;
-}  __attribute__((packed));
-
-struct carm_array_info {
-	u32 size;
-
-	u16 size_hi;
-	u16 stripe_size;
-
-	u32 mode;
-
-	u16 stripe_blk_sz;
-	u16 reserved1;
-
-	u16 cyl;
-	u16 head;
-
-	u16 sect;
-	u8 array_id;
-	u8 reserved2;
-
-	char name[40];
-
-	u32 array_status;
-
-	/* device list continues beyond this point? */
-}  __attribute__((packed));
-
-static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
-static void carm_remove_one (struct pci_dev *pdev);
-static int carm_bdev_ioctl(struct inode *ino, struct file *fil,
-			   unsigned int cmd, unsigned long arg);
-
-static struct pci_device_id carm_pci_tbl[] = {
-	{ PCI_VENDOR_ID_PROMISE, 0x8000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
-	{ PCI_VENDOR_ID_PROMISE, 0x8002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
-	{ }	/* terminate list */
-};
-MODULE_DEVICE_TABLE(pci, carm_pci_tbl);
-
-static struct pci_driver carm_driver = {
-	.name		= DRV_NAME,
-	.id_table	= carm_pci_tbl,
-	.probe		= carm_init_one,
-	.remove		= carm_remove_one,
-};
-
-static struct block_device_operations carm_bd_ops = {
-	.owner		= THIS_MODULE,
-	.ioctl		= carm_bdev_ioctl,
-};
-
-static unsigned int carm_host_id;
-static unsigned long carm_major_alloc;
-
-
-
-static int carm_bdev_ioctl(struct inode *ino, struct file *fil,
-			   unsigned int cmd, unsigned long arg)
-{
-	void __user *usermem = (void __user *) arg;
-	struct carm_port *port = ino->i_bdev->bd_disk->private_data;
-	struct hd_geometry geom;
-
-	switch (cmd) {
-	case HDIO_GETGEO:
-		if (!usermem)
-			return -EINVAL;
-
-		geom.heads = (u8) port->dev_geom_head;
-		geom.sectors = (u8) port->dev_geom_sect;
-		geom.cylinders = port->dev_geom_cyl;
-		geom.start = get_start_sect(ino->i_bdev);
-
-		if (copy_to_user(usermem, &geom, sizeof(geom)))
-			return -EFAULT;
-		return 0;
-
-	default:
-		break;
-	}
-
-	return -EOPNOTSUPP;
-}
-
-static const u32 msg_sizes[] = { 32, 64, 128, CARM_MSG_SIZE };
-
-static inline int carm_lookup_bucket(u32 msg_size)
-{
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(msg_sizes); i++)
-		if (msg_size <= msg_sizes[i])
-			return i;
-	
-	return -ENOENT;
-}
-
-static void carm_init_buckets(void *mmio)
-{
-	unsigned int i;
-
-	for (i = 0; i < ARRAY_SIZE(msg_sizes); i++)
-		writel(msg_sizes[i], mmio + CARM_CMS0 + (4 * i));
-}
-
-static inline void *carm_ref_msg(struct carm_host *host,
-				 unsigned int msg_idx)
-{
-	return host->msg_base + (msg_idx * CARM_MSG_SIZE);
-}
-
-static inline dma_addr_t carm_ref_msg_dma(struct carm_host *host,
-					  unsigned int msg_idx)
-{
-	return host->msg_dma + (msg_idx * CARM_MSG_SIZE);
-}
-
-static int carm_send_msg(struct carm_host *host,
-			 struct carm_request *crq)
-{
-	void *mmio = host->mmio;
-	u32 msg = (u32) carm_ref_msg_dma(host, crq->tag);
-	u32 cm_bucket = crq->msg_bucket;
-	u32 tmp;
-	int rc = 0;
-
-	VPRINTK("ENTER\n");
-
-	tmp = readl(mmio + CARM_HMUC);
-	if (tmp & CARM_Q_FULL) {
-#if 0
-		tmp = readl(mmio + CARM_INT_MASK);
-		tmp |= INT_Q_AVAILABLE;
-		writel(tmp, mmio + CARM_INT_MASK);
-		readl(mmio + CARM_INT_MASK);	/* flush */
-#endif
-		DPRINTK("host msg queue full\n");
-		rc = -EBUSY;
-	} else {
-		writel(msg | (cm_bucket << 1), mmio + CARM_IHQP);
-		readl(mmio + CARM_IHQP);	/* flush */
-	}
-
-	return rc;
-}
-
-static struct carm_request *carm_get_request(struct carm_host *host)
-{
-	unsigned int i;
-
-	/* obey global hardware limit on S/G entries */
-	if (host->hw_sg_used >= (CARM_MAX_HOST_SG - CARM_MAX_REQ_SG))
-		return NULL;
-
-	for (i = 0; i < CARM_MAX_Q; i++)
-		if ((host->msg_alloc & (1ULL << i)) == 0) {
-			struct carm_request *crq = &host->req[i];
-			crq->port = NULL;
-			crq->n_elem = 0;
-
-			host->msg_alloc |= (1ULL << i);
-			host->n_msgs++;
-
-			assert(host->n_msgs <= CARM_MAX_REQ);
-			return crq;
-		}
-	
-	DPRINTK("no request available, returning NULL\n");
-	return NULL;
-}
-
-static int carm_put_request(struct carm_host *host, struct carm_request *crq)
-{
-	assert(crq->tag < CARM_MAX_Q);
-
-	if (unlikely((host->msg_alloc & (1ULL << crq->tag)) == 0))
-		return -EINVAL; /* tried to clear a tag that was not active */
-
-	assert(host->hw_sg_used >= crq->n_elem);
-
-	host->msg_alloc &= ~(1ULL << crq->tag);
-	host->hw_sg_used -= crq->n_elem;
-	host->n_msgs--;
-
-	return 0;
-}
-
-static struct carm_request *carm_get_special(struct carm_host *host)
-{
-	unsigned long flags;
-	struct carm_request *crq = NULL;
-	struct request *rq;
-	int tries = 5000;
-
-	while (tries-- > 0) {
-		spin_lock_irqsave(&host->lock, flags);
-		crq = carm_get_request(host);
-		spin_unlock_irqrestore(&host->lock, flags);
-
-		if (crq)
-			break;
-		msleep(10);
-	}
-
-	if (!crq)
-		return NULL;
-
-	rq = blk_get_request(host->oob_q, WRITE /* bogus */, GFP_KERNEL);
-	if (!rq) {
-		spin_lock_irqsave(&host->lock, flags);
-		carm_put_request(host, crq);
-		spin_unlock_irqrestore(&host->lock, flags);
-		return NULL;
-	}
-
-	crq->rq = rq;
-	return crq;
-}
-
-static int carm_array_info (struct carm_host *host, unsigned int array_idx)
-{
-	struct carm_msg_ioctl *ioc;
-	unsigned int idx;
-	u32 msg_data;
-	dma_addr_t msg_dma;
-	struct carm_request *crq;
-	int rc;
-
-	crq = carm_get_special(host);
-	if (!crq) {
-		rc = -ENOMEM;
-		goto err_out;
-	}
-
-	idx = crq->tag;
-
-	ioc = carm_ref_msg(host, idx);
-	msg_dma = carm_ref_msg_dma(host, idx);
-	msg_data = (u32) (msg_dma + sizeof(struct carm_array_info));
-
-	crq->msg_type = CARM_MSG_ARRAY;
-	crq->msg_subtype = CARM_ARRAY_INFO;
-	rc = carm_lookup_bucket(sizeof(struct carm_msg_ioctl) +
-				sizeof(struct carm_array_info));
-	BUG_ON(rc < 0);
-	crq->msg_bucket = (u32) rc;
-
-	memset(ioc, 0, sizeof(*ioc));
-	ioc->type	= CARM_MSG_ARRAY;
-	ioc->subtype	= CARM_ARRAY_INFO;
-	ioc->array_id	= (u8) array_idx;
-	ioc->handle	= cpu_to_le32(TAG_ENCODE(idx));
-	ioc->data_addr	= cpu_to_le32(msg_data);
-
-	spin_lock_irq(&host->lock);
-	assert(host->state == HST_DEV_SCAN_START ||
-	       host->state == HST_DEV_SCAN);
-	spin_unlock_irq(&host->lock);
-
-	DPRINTK("blk_insert_request, tag == %u\n", idx);
-	blk_insert_request(host->oob_q, crq->rq, 1, crq, 0);
-
-	return 0;
-
-err_out:
-	spin_lock_irq(&host->lock);
-	host->state = HST_ERROR;
-	spin_unlock_irq(&host->lock);
-	return rc;
-}
-
-typedef unsigned int (*carm_sspc_t)(struct carm_host *, unsigned int, void *);
-
-static int carm_send_special (struct carm_host *host, carm_sspc_t func)
-{
-	struct carm_request *crq;
-	struct carm_msg_ioctl *ioc;
-	void *mem;
-	unsigned int idx, msg_size;
-	int rc;
-
-	crq = carm_get_special(host);
-	if (!crq)
-		return -ENOMEM;
-
-	idx = crq->tag;
-
-	mem = carm_ref_msg(host, idx);
-
-	msg_size = func(host, idx, mem);
-
-	ioc = mem;
-	crq->msg_type = ioc->type;
-	crq->msg_subtype = ioc->subtype;
-	rc = carm_lookup_bucket(msg_size);
-	BUG_ON(rc < 0);
-	crq->msg_bucket = (u32) rc;
-
-	DPRINTK("blk_insert_request, tag == %u\n", idx);
-	blk_insert_request(host->oob_q, crq->rq, 1, crq, 0);
-
-	return 0;
-}
-
-static unsigned int carm_fill_sync_time(struct carm_host *host,
-					unsigned int idx, void *mem)
-{
-	struct timeval tv;
-	struct carm_msg_sync_time *st = mem;
-
-	do_gettimeofday(&tv);
-
-	memset(st, 0, sizeof(*st));
-	st->type	= CARM_MSG_MISC;
-	st->subtype	= MISC_SET_TIME;
-	st->handle	= cpu_to_le32(TAG_ENCODE(idx));
-	st->timestamp	= cpu_to_le32(tv.tv_sec);
-
-	return sizeof(struct carm_msg_sync_time);
-}
-
-static unsigned int carm_fill_alloc_buf(struct carm_host *host,
-					unsigned int idx, void *mem)
-{
-	struct carm_msg_allocbuf *ab = mem;
-
-	memset(ab, 0, sizeof(*ab));
-	ab->type	= CARM_MSG_MISC;
-	ab->subtype	= MISC_ALLOC_MEM;
-	ab->handle	= cpu_to_le32(TAG_ENCODE(idx));
-	ab->n_sg	= 1;
-	ab->sg_type	= SGT_32BIT;
-	ab->addr	= cpu_to_le32(host->shm_dma + (PDC_SHM_SIZE >> 1));
-	ab->len		= cpu_to_le32(PDC_SHM_SIZE >> 1);
-	ab->evt_pool	= cpu_to_le32(host->shm_dma + (16 * 1024));
-	ab->n_evt	= cpu_to_le32(1024);
-	ab->rbuf_pool	= cpu_to_le32(host->shm_dma);
-	ab->n_rbuf	= cpu_to_le32(RMSG_Q_LEN);
-	ab->msg_pool	= cpu_to_le32(host->shm_dma + RBUF_LEN);
-	ab->n_msg	= cpu_to_le32(CARM_Q_LEN);
-	ab->sg[0].start	= cpu_to_le32(host->shm_dma + (PDC_SHM_SIZE >> 1));
-	ab->sg[0].len	= cpu_to_le32(65536);
-
-	return sizeof(struct carm_msg_allocbuf);
-}
-
-static unsigned int carm_fill_scan_channels(struct carm_host *host,
-					    unsigned int idx, void *mem)
-{
-	struct carm_msg_ioctl *ioc = mem;
-	u32 msg_data = (u32) (carm_ref_msg_dma(host, idx) +
-			      IOC_SCAN_CHAN_OFFSET);
-
-	memset(ioc, 0, sizeof(*ioc));
-	ioc->type	= CARM_MSG_IOCTL;
-	ioc->subtype	= CARM_IOC_SCAN_CHAN;
-	ioc->handle	= cpu_to_le32(TAG_ENCODE(idx));
-	ioc->data_addr	= cpu_to_le32(msg_data);
-
-	/* fill output data area with "no device" default values */
-	mem += IOC_SCAN_CHAN_OFFSET;
-	memset(mem, IOC_SCAN_CHAN_NODEV, CARM_MAX_PORTS);
-
-	return IOC_SCAN_CHAN_OFFSET + CARM_MAX_PORTS;
-}
-
-static unsigned int carm_fill_get_fw_ver(struct carm_host *host,
-					 unsigned int idx, void *mem)
-{
-	struct carm_msg_get_fw_ver *ioc = mem;
-	u32 msg_data = (u32) (carm_ref_msg_dma(host, idx) + sizeof(*ioc));
-
-	memset(ioc, 0, sizeof(*ioc));
-	ioc->type	= CARM_MSG_MISC;
-	ioc->subtype	= MISC_GET_FW_VER;
-	ioc->handle	= cpu_to_le32(TAG_ENCODE(idx));
-	ioc->data_addr	= cpu_to_le32(msg_data);
-
-	return sizeof(struct carm_msg_get_fw_ver) +
-	       sizeof(struct carm_fw_ver);
-}
-
-static inline void carm_end_request_queued(struct carm_host *host,
-					   struct carm_request *crq,
-					   int uptodate)
-{
-	struct request *req = crq->rq;
-	int rc;
-
-	rc = end_that_request_first(req, uptodate, req->hard_nr_sectors);
-	assert(rc == 0);
-
-	end_that_request_last(req);
-
-	rc = carm_put_request(host, crq);
-	assert(rc == 0);
-}
-
-static inline void carm_push_q (struct carm_host *host, request_queue_t *q)
-{
-	unsigned int idx = host->wait_q_prod % CARM_MAX_WAIT_Q;
-
-	blk_stop_queue(q);
-	VPRINTK("STOPPED QUEUE %p\n", q);
-
-	host->wait_q[idx] = q;
-	host->wait_q_prod++;
-	BUG_ON(host->wait_q_prod == host->wait_q_cons); /* overrun */
-}
-
-static inline request_queue_t *carm_pop_q(struct carm_host *host)
-{
-	unsigned int idx;
-
-	if (host->wait_q_prod == host->wait_q_cons)
-		return NULL;
-
-	idx = host->wait_q_cons % CARM_MAX_WAIT_Q;
-	host->wait_q_cons++;
-
-	return host->wait_q[idx];
-}
-
-static inline void carm_round_robin(struct carm_host *host)
-{
-	request_queue_t *q = carm_pop_q(host);
-	if (q) {
-		blk_start_queue(q);
-		VPRINTK("STARTED QUEUE %p\n", q);
-	}
-}
-
-static inline void carm_end_rq(struct carm_host *host, struct carm_request *crq,
-			int is_ok)
-{
-	carm_end_request_queued(host, crq, is_ok);
-	if (CARM_MAX_Q == 1)
-		carm_round_robin(host);
-	else if ((host->n_msgs <= CARM_MSG_LOW_WATER) &&
-		 (host->hw_sg_used <= CARM_SG_LOW_WATER)) {
-		carm_round_robin(host);
-	}
-}
-
-static void carm_oob_rq_fn(request_queue_t *q)
-{
-	struct carm_host *host = q->queuedata;
-	struct carm_request *crq;
-	struct request *rq;
-	int rc;
-
-	while (1) {
-		DPRINTK("get req\n");
-		rq = elv_next_request(q);
-		if (!rq)
-			break;
-
-		blkdev_dequeue_request(rq);
-
-		crq = rq->special;
-		assert(crq != NULL);
-		assert(crq->rq == rq);
-
-		crq->n_elem = 0;
-
-		DPRINTK("send req\n");
-		rc = carm_send_msg(host, crq);
-		if (rc) {
-			blk_requeue_request(q, rq);
-			carm_push_q(host, q);
-			return;		/* call us again later, eventually */
-		}
-	}
-}
-
-static void carm_rq_fn(request_queue_t *q)
-{
-	struct carm_port *port = q->queuedata;
-	struct carm_host *host = port->host;
-	struct carm_msg_rw *msg;
-	struct carm_request *crq;
-	struct request *rq;
-	struct scatterlist *sg;
-	int writing = 0, pci_dir, i, n_elem, rc;
-	u32 tmp;
-	unsigned int msg_size;
-
-queue_one_request:
-	VPRINTK("get req\n");
-	rq = elv_next_request(q);
-	if (!rq)
-		return;
-
-	crq = carm_get_request(host);
-	if (!crq) {
-		carm_push_q(host, q);
-		return;		/* call us again later, eventually */
-	}
-	crq->rq = rq;
-
-	blkdev_dequeue_request(rq);
-
-	if (rq_data_dir(rq) == WRITE) {
-		writing = 1;
-		pci_dir = PCI_DMA_TODEVICE;
-	} else {
-		pci_dir = PCI_DMA_FROMDEVICE;
-	}
-
-	/* get scatterlist from block layer */
-	sg = &crq->sg[0];
-	n_elem = blk_rq_map_sg(q, rq, sg);
-	if (n_elem <= 0) {
-		carm_end_rq(host, crq, 0);
-		return;		/* request with no s/g entries? */
-	}
-
-	/* map scatterlist to PCI bus addresses */
-	n_elem = pci_map_sg(host->pdev, sg, n_elem, pci_dir);
-	if (n_elem <= 0) {
-		carm_end_rq(host, crq, 0);
-		return;		/* request with no s/g entries? */
-	}
-	crq->n_elem = n_elem;
-	crq->port = port;
-	host->hw_sg_used += n_elem;
-
-	/*
-	 * build read/write message
-	 */
-
-	VPRINTK("build msg\n");
-	msg = (struct carm_msg_rw *) carm_ref_msg(host, crq->tag);
-
-	if (writing) {
-		msg->type = CARM_MSG_WRITE;
-		crq->msg_type = CARM_MSG_WRITE;
-	} else {
-		msg->type = CARM_MSG_READ;
-		crq->msg_type = CARM_MSG_READ;
-	}
-
-	msg->id		= port->port_no;
-	msg->sg_count	= n_elem;
-	msg->sg_type	= SGT_32BIT;
-	msg->handle	= cpu_to_le32(TAG_ENCODE(crq->tag));
-	msg->lba	= cpu_to_le32(rq->sector & 0xffffffff);
-	tmp		= (rq->sector >> 16) >> 16;
-	msg->lba_high	= cpu_to_le16( (u16) tmp );
-	msg->lba_count	= cpu_to_le16(rq->nr_sectors);
-
-	msg_size = sizeof(struct carm_msg_rw) - sizeof(msg->sg);
-	for (i = 0; i < n_elem; i++) {
-		struct carm_msg_sg *carm_sg = &msg->sg[i];
-		carm_sg->start = cpu_to_le32(sg_dma_address(&crq->sg[i]));
-		carm_sg->len = cpu_to_le32(sg_dma_len(&crq->sg[i]));
-		msg_size += sizeof(struct carm_msg_sg);
-	}
-
-	rc = carm_lookup_bucket(msg_size);
-	BUG_ON(rc < 0);
-	crq->msg_bucket = (u32) rc;
-
-	/*
-	 * queue read/write message to hardware
-	 */
-
-	VPRINTK("send msg, tag == %u\n", crq->tag);
-	rc = carm_send_msg(host, crq);
-	if (rc) {
-		carm_put_request(host, crq);
-		blk_requeue_request(q, rq);
-		carm_push_q(host, q);
-		return;		/* call us again later, eventually */
-	}
-
-	goto queue_one_request;
-}
-
-static void carm_handle_array_info(struct carm_host *host,
-				   struct carm_request *crq, u8 *mem,
-				   int is_ok)
-{
-	struct carm_port *port;
-	u8 *msg_data = mem + sizeof(struct carm_array_info);
-	struct carm_array_info *desc = (struct carm_array_info *) msg_data;
-	u64 lo, hi;
-	int cur_port;
-	size_t slen;
-
-	DPRINTK("ENTER\n");
-
-	carm_end_rq(host, crq, is_ok);
-
-	if (!is_ok)
-		goto out;
-	if (le32_to_cpu(desc->array_status) & ARRAY_NO_EXIST)
-		goto out;
-
-	cur_port = host->cur_scan_dev;
-
-	/* should never occur */
-	if ((cur_port < 0) || (cur_port >= CARM_MAX_PORTS)) {
-		printk(KERN_ERR PFX "BUG: cur_scan_dev==%d, array_id==%d\n",
-		       cur_port, (int) desc->array_id);
-		goto out;
-	}
-
-	port = &host->port[cur_port];
-
-	lo = (u64) le32_to_cpu(desc->size);
-	hi = (u64) le32_to_cpu(desc->size_hi);
-
-	port->capacity = lo | (hi << 32);
-	port->dev_geom_head = le16_to_cpu(desc->head);
-	port->dev_geom_sect = le16_to_cpu(desc->sect);
-	port->dev_geom_cyl = le16_to_cpu(desc->cyl);
-
-	host->dev_active |= (1 << cur_port);
-
-	strncpy(port->name, desc->name, sizeof(port->name));
-	port->name[sizeof(port->name) - 1] = 0;
-	slen = strlen(port->name);
-	while (slen && (port->name[slen - 1] == ' ')) {
-		port->name[slen - 1] = 0;
-		slen--;
-	}
-
-	printk(KERN_INFO DRV_NAME "(%s): port %u device %Lu sectors\n",
-	       pci_name(host->pdev), port->port_no,
-	       (unsigned long long) port->capacity);
-	printk(KERN_INFO DRV_NAME "(%s): port %u device \"%s\"\n",
-	       pci_name(host->pdev), port->port_no, port->name);
-
-out:
-	assert(host->state == HST_DEV_SCAN);
-	schedule_work(&host->fsm_task);
-}
-
-static void carm_handle_scan_chan(struct carm_host *host,
-				  struct carm_request *crq, u8 *mem,
-				  int is_ok)
-{
-	u8 *msg_data = mem + IOC_SCAN_CHAN_OFFSET;
-	unsigned int i, dev_count = 0;
-	int new_state = HST_DEV_SCAN_START;
-
-	DPRINTK("ENTER\n");
-
-	carm_end_rq(host, crq, is_ok);
-
-	if (!is_ok) {
-		new_state = HST_ERROR;
-		goto out;
-	}
-
-	/* TODO: scan and support non-disk devices */
-	for (i = 0; i < 8; i++)
-		if (msg_data[i] == 0) { /* direct-access device (disk) */
-			host->dev_present |= (1 << i);
-			dev_count++;
-		}
-
-	printk(KERN_INFO DRV_NAME "(%s): found %u interesting devices\n",
-	       pci_name(host->pdev), dev_count);
-
-out:
-	assert(host->state == HST_PORT_SCAN);
-	host->state = new_state;
-	schedule_work(&host->fsm_task);
-}
-
-static void carm_handle_generic(struct carm_host *host,
-				struct carm_request *crq, int is_ok,
-				int cur_state, int next_state)
-{
-	DPRINTK("ENTER\n");
-
-	carm_end_rq(host, crq, is_ok);
-
-	assert(host->state == cur_state);
-	if (is_ok)
-		host->state = next_state;
-	else
-		host->state = HST_ERROR;
-	schedule_work(&host->fsm_task);
-}
-
-static inline void carm_handle_rw(struct carm_host *host,
-				  struct carm_request *crq, int is_ok)
-{
-	int pci_dir;
-
-	VPRINTK("ENTER\n");
-
-	if (rq_data_dir(crq->rq) == WRITE)
-		pci_dir = PCI_DMA_TODEVICE;
-	else
-		pci_dir = PCI_DMA_FROMDEVICE;
-
-	pci_unmap_sg(host->pdev, &crq->sg[0], crq->n_elem, pci_dir);
-
-	carm_end_rq(host, crq, is_ok);
-}
-
-static inline void carm_handle_resp(struct carm_host *host,
-				    u32 ret_handle_le, u32 status)
-{
-	u32 handle = le32_to_cpu(ret_handle_le);
-	unsigned int msg_idx;
-	struct carm_request *crq;
-	int is_ok = (status == RMSG_OK);
-	u8 *mem;
-
-	VPRINTK("ENTER, handle == 0x%x\n", handle);
-
-	if (unlikely(!TAG_VALID(handle))) {
-		printk(KERN_ERR DRV_NAME "(%s): BUG: invalid tag 0x%x\n",
-		       pci_name(host->pdev), handle);
-		return;
-	}
-
-	msg_idx = TAG_DECODE(handle);
-	VPRINTK("tag == %u\n", msg_idx);
-
-	crq = &host->req[msg_idx];
-
-	/* fast path */
-	if (likely(crq->msg_type == CARM_MSG_READ ||
-		   crq->msg_type == CARM_MSG_WRITE)) {
-		carm_handle_rw(host, crq, is_ok);
-		return;
-	}
-
-	mem = carm_ref_msg(host, msg_idx);
-
-	switch (crq->msg_type) {
-	case CARM_MSG_IOCTL: {
-		switch (crq->msg_subtype) {
-		case CARM_IOC_SCAN_CHAN:
-			carm_handle_scan_chan(host, crq, mem, is_ok);
-			break;
-		default:
-			/* unknown / invalid response */
-			goto err_out;
-		}
-		break;
-	}
-
-	case CARM_MSG_MISC: {
-		switch (crq->msg_subtype) {
-		case MISC_ALLOC_MEM:
-			carm_handle_generic(host, crq, is_ok,
-					    HST_ALLOC_BUF, HST_SYNC_TIME);
-			break;
-		case MISC_SET_TIME:
-			carm_handle_generic(host, crq, is_ok,
-					    HST_SYNC_TIME, HST_GET_FW_VER);
-			break;
-		case MISC_GET_FW_VER: {
-			struct carm_fw_ver *ver = (struct carm_fw_ver *)
-				mem + sizeof(struct carm_msg_get_fw_ver);
-			if (is_ok) {
-				host->fw_ver = le32_to_cpu(ver->version);
-				host->flags |= (ver->features & FL_FW_VER_MASK);
-			}
-			carm_handle_generic(host, crq, is_ok,
-					    HST_GET_FW_VER, HST_PORT_SCAN);
-			break;
-		}
-		default:
-			/* unknown / invalid response */
-			goto err_out;
-		}
-		break;
-	}
-
-	case CARM_MSG_ARRAY: {
-		switch (crq->msg_subtype) {
-		case CARM_ARRAY_INFO:
-			carm_handle_array_info(host, crq, mem, is_ok);
-			break;
-		default:
-			/* unknown / invalid response */
-			goto err_out;
-		}
-		break;
-	}
-
-	default:
-		/* unknown / invalid response */
-		goto err_out;
-	}
-
-	return;
-
-err_out:
-	printk(KERN_WARNING DRV_NAME "(%s): BUG: unhandled message type %d/%d\n",
-	       pci_name(host->pdev), crq->msg_type, crq->msg_subtype);
-	carm_end_rq(host, crq, 0);
-}
-
-static inline void carm_handle_responses(struct carm_host *host)
-{
-	void *mmio = host->mmio;
-	struct carm_response *resp = (struct carm_response *) host->shm;
-	unsigned int work = 0;
-	unsigned int idx = host->resp_idx % RMSG_Q_LEN;
-
-	while (1) {
-		u32 status = le32_to_cpu(resp[idx].status);
-
-		if (status == 0xffffffff) {
-			VPRINTK("ending response on index %u\n", idx);
-			writel(idx << 3, mmio + CARM_RESP_IDX);
-			break;
-		}
-
-		/* response to a message we sent */
-		else if ((status & (1 << 31)) == 0) {
-			VPRINTK("handling msg response on index %u\n", idx);
-			carm_handle_resp(host, resp[idx].ret_handle, status);
-			resp[idx].status = 0xffffffff;
-		}
-
-		/* asynchronous events the hardware throws our way */
-		else if ((status & 0xff000000) == (1 << 31)) {
-			u8 *evt_type_ptr = (u8 *) &resp[idx];
-			u8 evt_type = *evt_type_ptr;
-			printk(KERN_WARNING DRV_NAME "(%s): unhandled event type %d\n",
-			       pci_name(host->pdev), (int) evt_type);
-			resp[idx].status = 0xffffffff;
-		}
-
-		idx = NEXT_RESP(idx);
-		work++;
-	}
-
-	VPRINTK("EXIT, work==%u\n", work);
-	host->resp_idx += work;
-}
-
-static irqreturn_t carm_interrupt(int irq, void *__host, struct pt_regs *regs)
-{
-	struct carm_host *host = __host;
-	void *mmio;
-	u32 mask;
-	int handled = 0;
-	unsigned long flags;
-
-	if (!host) {
-		VPRINTK("no host\n");
-		return IRQ_NONE;
-	}
-
-	spin_lock_irqsave(&host->lock, flags);
-
-	mmio = host->mmio;
-
-	/* reading should also clear interrupts */
-	mask = readl(mmio + CARM_INT_STAT);
-
-	if (mask == 0 || mask == 0xffffffff) {
-		VPRINTK("no work, mask == 0x%x\n", mask);
-		goto out;
-	}
-
-	if (mask & INT_ACK_MASK)
-		writel(mask, mmio + CARM_INT_STAT);
-
-	if (unlikely(host->state == HST_INVALID)) {
-		VPRINTK("not initialized yet, mask = 0x%x\n", mask);
-		goto out;
-	}
-
-	if (mask & CARM_HAVE_RESP) {
-		handled = 1;
-		carm_handle_responses(host);
-	}
-
-out:
-	spin_unlock_irqrestore(&host->lock, flags);
-	VPRINTK("EXIT\n");
-	return IRQ_RETVAL(handled);
-}
-
-static void carm_fsm_task (void *_data)
-{
-	struct carm_host *host = _data;
-	unsigned long flags;
-	unsigned int state;
-	int rc, i, next_dev;
-	int reschedule = 0;
-	int new_state = HST_INVALID;
-
-	spin_lock_irqsave(&host->lock, flags);
-	state = host->state;
-	spin_unlock_irqrestore(&host->lock, flags);
-
-	DPRINTK("ENTER, state == %s\n", state_name[state]);
-
-	switch (state) {
-	case HST_PROBE_START:
-		new_state = HST_ALLOC_BUF;
-		reschedule = 1;
-		break;
-
-	case HST_ALLOC_BUF:
-		rc = carm_send_special(host, carm_fill_alloc_buf);
-		if (rc) {
-			new_state = HST_ERROR;
-			reschedule = 1;
-		}
-		break;
-
-	case HST_SYNC_TIME:
-		rc = carm_send_special(host, carm_fill_sync_time);
-		if (rc) {
-			new_state = HST_ERROR;
-			reschedule = 1;
-		}
-		break;
-
-	case HST_GET_FW_VER:
-		rc = carm_send_special(host, carm_fill_get_fw_ver);
-		if (rc) {
-			new_state = HST_ERROR;
-			reschedule = 1;
-		}
-		break;
-
-	case HST_PORT_SCAN:
-		rc = carm_send_special(host, carm_fill_scan_channels);
-		if (rc) {
-			new_state = HST_ERROR;
-			reschedule = 1;
-		}
-		break;
-
-	case HST_DEV_SCAN_START:
-		host->cur_scan_dev = -1;
-		new_state = HST_DEV_SCAN;
-		reschedule = 1;
-		break;
-
-	case HST_DEV_SCAN:
-		next_dev = -1;
-		for (i = host->cur_scan_dev + 1; i < CARM_MAX_PORTS; i++)
-			if (host->dev_present & (1 << i)) {
-				next_dev = i;
-				break;
-			}
-
-		if (next_dev >= 0) {
-			host->cur_scan_dev = next_dev;
-			rc = carm_array_info(host, next_dev);
-			if (rc) {
-				new_state = HST_ERROR;
-				reschedule = 1;
-			}
-		} else {
-			new_state = HST_DEV_ACTIVATE;
-			reschedule = 1;
-		}
-		break;
-
-	case HST_DEV_ACTIVATE: {
-		int activated = 0;
-		for (i = 0; i < CARM_MAX_PORTS; i++)
-			if (host->dev_active & (1 << i)) {
-				struct carm_port *port = &host->port[i];
-				struct gendisk *disk = port->disk;
-
-				set_capacity(disk, port->capacity);
-				add_disk(disk);
-				activated++;
-			}
-
-		printk(KERN_INFO DRV_NAME "(%s): %d ports activated\n",
-		       pci_name(host->pdev), activated);
-
-		new_state = HST_PROBE_FINISHED;
-		reschedule = 1;
-		break;
-	}
-
-	case HST_PROBE_FINISHED:
-		up(&host->probe_sem);
-		break;
-
-	case HST_ERROR:
-		/* FIXME: TODO */
-		break;
-
-	default:
-		/* should never occur */
-		printk(KERN_ERR PFX "BUG: unknown state %d\n", state);
-		assert(0);
-		break;
-	}
-
-	if (new_state != HST_INVALID) {
-		spin_lock_irqsave(&host->lock, flags);
-		host->state = new_state;
-		spin_unlock_irqrestore(&host->lock, flags);
-	}
-	if (reschedule)
-		schedule_work(&host->fsm_task);
-}
-
-static int carm_init_wait(void *mmio, u32 bits, unsigned int test_bit)
-{
-	unsigned int i;
-
-	for (i = 0; i < 50000; i++) {
-		u32 tmp = readl(mmio + CARM_LMUC);
-		udelay(100);
-
-		if (test_bit) {
-			if ((tmp & bits) == bits)
-				return 0;
-		} else {
-			if ((tmp & bits) == 0)
-				return 0;
-		}
-
-		cond_resched();
-	}
-
-	printk(KERN_ERR PFX "carm_init_wait timeout, bits == 0x%x, test_bit == %s\n",
-	       bits, test_bit ? "yes" : "no");
-	return -EBUSY;
-}
-
-static void carm_init_responses(struct carm_host *host)
-{
-	void *mmio = host->mmio;
-	unsigned int i;
-	struct carm_response *resp = (struct carm_response *) host->shm;
-
-	for (i = 0; i < RMSG_Q_LEN; i++)
-		resp[i].status = 0xffffffff;
-
-	writel(0, mmio + CARM_RESP_IDX);
-}
-
-static int carm_init_host(struct carm_host *host)
-{
-	void *mmio = host->mmio;
-	u32 tmp;
-	u8 tmp8;
-	int rc;
-
-	DPRINTK("ENTER\n");
-
-	writel(0, mmio + CARM_INT_MASK);
-
-	tmp8 = readb(mmio + CARM_INITC);
-	if (tmp8 & 0x01) {
-		tmp8 &= ~0x01;
-		writeb(tmp8, CARM_INITC);
-		readb(mmio + CARM_INITC);	/* flush */
-
-		DPRINTK("snooze...\n");
-		msleep(5000);
-	}
-
-	tmp = readl(mmio + CARM_HMUC);
-	if (tmp & CARM_CME) {
-		DPRINTK("CME bit present, waiting\n");
-		rc = carm_init_wait(mmio, CARM_CME, 1);
-		if (rc) {
-			DPRINTK("EXIT, carm_init_wait 1 failed\n");
-			return rc;
-		}
-	}
-	if (tmp & CARM_RME) {
-		DPRINTK("RME bit present, waiting\n");
-		rc = carm_init_wait(mmio, CARM_RME, 1);
-		if (rc) {
-			DPRINTK("EXIT, carm_init_wait 2 failed\n");
-			return rc;
-		}
-	}
-
-	tmp &= ~(CARM_RME | CARM_CME);
-	writel(tmp, mmio + CARM_HMUC);
-	readl(mmio + CARM_HMUC);	/* flush */
-
-	rc = carm_init_wait(mmio, CARM_RME | CARM_CME, 0);
-	if (rc) {
-		DPRINTK("EXIT, carm_init_wait 3 failed\n");
-		return rc;
-	}
-
-	carm_init_buckets(mmio);
-
-	writel(host->shm_dma & 0xffffffff, mmio + RBUF_ADDR_LO);
-	writel((host->shm_dma >> 16) >> 16, mmio + RBUF_ADDR_HI);
-	writel(RBUF_LEN, mmio + RBUF_BYTE_SZ);
-
-	tmp = readl(mmio + CARM_HMUC);
-	tmp |= (CARM_RME | CARM_CME | CARM_WZBC);
-	writel(tmp, mmio + CARM_HMUC);
-	readl(mmio + CARM_HMUC);	/* flush */
-
-	rc = carm_init_wait(mmio, CARM_RME | CARM_CME, 1);
-	if (rc) {
-		DPRINTK("EXIT, carm_init_wait 4 failed\n");
-		return rc;
-	}
-
-	writel(0, mmio + CARM_HMPHA);
-	writel(INT_DEF_MASK, mmio + CARM_INT_MASK);
-
-	carm_init_responses(host);
-
-	/* start initialization, probing state machine */
-	spin_lock_irq(&host->lock);
-	assert(host->state == HST_INVALID);
-	host->state = HST_PROBE_START;
-	spin_unlock_irq(&host->lock);
-	schedule_work(&host->fsm_task);
-
-	DPRINTK("EXIT\n");
-	return 0;
-}
-
-static int carm_init_disks(struct carm_host *host)
-{
-	unsigned int i;
-	int rc = 0;
-
-	for (i = 0; i < CARM_MAX_PORTS; i++) {
-		struct gendisk *disk;
-		request_queue_t *q;
-		struct carm_port *port;
-
-		port = &host->port[i];
-		port->host = host;
-		port->port_no = i;
-
-		disk = alloc_disk(CARM_MINORS_PER_MAJOR);
-		if (!disk) {
-			rc = -ENOMEM;
-			break;
-		}
-
-		port->disk = disk;
-		sprintf(disk->disk_name, DRV_NAME "%u_%u", host->id, i);
-		sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i);
-		disk->major = host->major;
-		disk->first_minor = i * CARM_MINORS_PER_MAJOR;
-		disk->fops = &carm_bd_ops;
-		disk->private_data = port;
-
-		q = blk_init_queue(carm_rq_fn, &host->lock);
-		if (!q) {
-			rc = -ENOMEM;
-			break;
-		}
-		disk->queue = q;
-		blk_queue_max_hw_segments(q, CARM_MAX_REQ_SG);
-		blk_queue_max_phys_segments(q, CARM_MAX_REQ_SG);
-		blk_queue_segment_boundary(q, CARM_SG_BOUNDARY);
-
-		q->queuedata = port;
-	}
-
-	return rc;
-}
-
-static void carm_free_disks(struct carm_host *host)
-{
-	unsigned int i;
-
-	for (i = 0; i < CARM_MAX_PORTS; i++) {
-		struct gendisk *disk = host->port[i].disk;
-		if (disk) {
-			request_queue_t *q = disk->queue;
-
-			if (disk->flags & GENHD_FL_UP)
-				del_gendisk(disk);
-			if (q)
-				blk_cleanup_queue(q);
-			put_disk(disk);
-		}
-	}
-}
-
-static int carm_init_shm(struct carm_host *host)
-{
-	host->shm = pci_alloc_consistent(host->pdev, CARM_SHM_SIZE,
-					 &host->shm_dma);
-	if (!host->shm)
-		return -ENOMEM;
-
-	host->msg_base = host->shm + RBUF_LEN;
-	host->msg_dma = host->shm_dma + RBUF_LEN;
-
-	memset(host->shm, 0xff, RBUF_LEN);
-	memset(host->msg_base, 0, PDC_SHM_SIZE - RBUF_LEN);
-
-	return 0;
-}
-
-static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
-{
-	static unsigned int printed_version;
-	struct carm_host *host;
-	unsigned int pci_dac;
-	int rc;
-	request_queue_t *q;
-	unsigned int i;
-
-	if (!printed_version++)
-		printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
-
-	rc = pci_enable_device(pdev);
-	if (rc)
-		return rc;
-
-	rc = pci_request_regions(pdev, DRV_NAME);
-	if (rc)
-		goto err_out;
-
-#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
-	rc = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
-	if (!rc) {
-		rc = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
-		if (rc) {
-			printk(KERN_ERR DRV_NAME "(%s): consistent DMA mask failure\n",
-				pci_name(pdev));
-			goto err_out_regions;
-		}
-		pci_dac = 1;
-	} else {
-#endif
-		rc = pci_set_dma_mask(pdev, 0xffffffffULL);
-		if (rc) {
-			printk(KERN_ERR DRV_NAME "(%s): DMA mask failure\n",
-				pci_name(pdev));
-			goto err_out_regions;
-		}
-		pci_dac = 0;
-#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
-	}
-#endif
-
-	host = kmalloc(sizeof(*host), GFP_KERNEL);
-	if (!host) {
-		printk(KERN_ERR DRV_NAME "(%s): memory alloc failure\n",
-		       pci_name(pdev));
-		rc = -ENOMEM;
-		goto err_out_regions;
-	}
-
-	memset(host, 0, sizeof(*host));
-	host->pdev = pdev;
-	host->flags = pci_dac ? FL_DAC : 0;
-	spin_lock_init(&host->lock);
-	INIT_WORK(&host->fsm_task, carm_fsm_task, host);
-	init_MUTEX_LOCKED(&host->probe_sem);
-
-	for (i = 0; i < ARRAY_SIZE(host->req); i++)
-		host->req[i].tag = i;
-
-	host->mmio = ioremap(pci_resource_start(pdev, 0),
-			     pci_resource_len(pdev, 0));
-	if (!host->mmio) {
-		printk(KERN_ERR DRV_NAME "(%s): MMIO alloc failure\n",
-		       pci_name(pdev));
-		rc = -ENOMEM;
-		goto err_out_kfree;
-	}
-
-	rc = carm_init_shm(host);
-	if (rc) {
-		printk(KERN_ERR DRV_NAME "(%s): DMA SHM alloc failure\n",
-		       pci_name(pdev));
-		goto err_out_iounmap;
-	}
-
-	q = blk_init_queue(carm_oob_rq_fn, &host->lock);
-	if (!q) {
-		printk(KERN_ERR DRV_NAME "(%s): OOB queue alloc failure\n",
-		       pci_name(pdev));
-		rc = -ENOMEM;
-		goto err_out_pci_free;
-	}
-	host->oob_q = q;
-	q->queuedata = host;
-
-	/*
-	 * Figure out which major to use: 160, 161, or dynamic
-	 */
-	if (!test_and_set_bit(0, &carm_major_alloc))
-		host->major = 160;
-	else if (!test_and_set_bit(1, &carm_major_alloc))
-		host->major = 161;
-	else
-		host->flags |= FL_DYN_MAJOR;
-
-	host->id = carm_host_id;
-	sprintf(host->name, DRV_NAME "%d", carm_host_id);
-
-	rc = register_blkdev(host->major, host->name);
-	if (rc < 0)
-		goto err_out_free_majors;
-	if (host->flags & FL_DYN_MAJOR)
-		host->major = rc;
-
-	devfs_mk_dir(DRV_NAME);
-
-	rc = carm_init_disks(host);
-	if (rc)
-		goto err_out_blkdev_disks;
-
-	pci_set_master(pdev);
-
-	rc = request_irq(pdev->irq, carm_interrupt, SA_SHIRQ, DRV_NAME, host);
-	if (rc) {
-		printk(KERN_ERR DRV_NAME "(%s): irq alloc failure\n",
-		       pci_name(pdev));
-		goto err_out_blkdev_disks;
-	}
-
-	rc = carm_init_host(host);
-	if (rc)
-		goto err_out_free_irq;
-
-	DPRINTK("waiting for probe_sem\n");
-	down(&host->probe_sem);
-
-	printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n",
-	       host->name, pci_name(pdev), (int) CARM_MAX_PORTS,
-	       pci_resource_start(pdev, 0), pdev->irq, host->major);
-
-	carm_host_id++;
-	pci_set_drvdata(pdev, host);
-	return 0;
-
-err_out_free_irq:
-	free_irq(pdev->irq, host);
-err_out_blkdev_disks:
-	carm_free_disks(host);
-	unregister_blkdev(host->major, host->name);
-err_out_free_majors:
-	if (host->major == 160)
-		clear_bit(0, &carm_major_alloc);
-	else if (host->major == 161)
-		clear_bit(1, &carm_major_alloc);
-	blk_cleanup_queue(host->oob_q);
-err_out_pci_free:
-	pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma);
-err_out_iounmap:
-	iounmap(host->mmio);
-err_out_kfree:
-	kfree(host);
-err_out_regions:
-	pci_release_regions(pdev);
-err_out:
-	pci_disable_device(pdev);
-	return rc;
-}
-
-static void carm_remove_one (struct pci_dev *pdev)
-{
-	struct carm_host *host = pci_get_drvdata(pdev);
-
-	if (!host) {
-		printk(KERN_ERR PFX "BUG: no host data for PCI(%s)\n",
-		       pci_name(pdev));
-		return;
-	}
-
-	free_irq(pdev->irq, host);
-	carm_free_disks(host);
-	devfs_remove(DRV_NAME);
-	unregister_blkdev(host->major, host->name);
-	if (host->major == 160)
-		clear_bit(0, &carm_major_alloc);
-	else if (host->major == 161)
-		clear_bit(1, &carm_major_alloc);
-	blk_cleanup_queue(host->oob_q);
-	pci_free_consistent(pdev, CARM_SHM_SIZE, host->shm, host->shm_dma);
-	iounmap(host->mmio);
-	kfree(host);
-	pci_release_regions(pdev);
-	pci_disable_device(pdev);
-	pci_set_drvdata(pdev, NULL);
-}
-
-static int __init carm_init(void)
-{
-	return pci_module_init(&carm_driver);
-}
-
-static void __exit carm_exit(void)
-{
-	pci_unregister_driver(&carm_driver);
-}
-
-module_init(carm_init);
-module_exit(carm_exit);
-
-
--- diff/drivers/block/floppy98.c	2004-06-30 14:25:43.000000000 +0100
+++ source/drivers/block/floppy98.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,4682 +0,0 @@
-/*
- *  linux/drivers/block/floppy.c
- *
- *  Copyright (C) 1991, 1992  Linus Torvalds
- *  Copyright (C) 1993, 1994  Alain Knaff
- *  Copyright (C) 1998 Alan Cox
- */
-/*
- * 02.12.91 - Changed to static variables to indicate need for reset
- * and recalibrate. This makes some things easier (output_byte reset
- * checking etc), and means less interrupt jumping in case of errors,
- * so the code is hopefully easier to understand.
- */
-
-/*
- * This file is certainly a mess. I've tried my best to get it working,
- * but I don't like programming floppies, and I have only one anyway.
- * Urgel. I should check for more errors, and do more graceful error
- * recovery. Seems there are problems with several drives. I've tried to
- * correct them. No promises.
- */
-
-/*
- * As with hd.c, all routines within this file can (and will) be called
- * by interrupts, so extreme caution is needed. A hardware interrupt
- * handler may not sleep, or a kernel panic will happen. Thus I cannot
- * call "floppy-on" directly, but have to set a special timer interrupt
- * etc.
- */
-
-/*
- * 28.02.92 - made track-buffering routines, based on the routines written
- * by entropy@wintermute.wpi.edu (Lawrence Foard). Linus.
- */
-
-/*
- * Automatic floppy-detection and formatting written by Werner Almesberger
- * (almesber@nessie.cs.id.ethz.ch), who also corrected some problems with
- * the floppy-change signal detection.
- */
-
-/*
- * 1992/7/22 -- Hennus Bergman: Added better error reporting, fixed
- * FDC data overrun bug, added some preliminary stuff for vertical
- * recording support.
- *
- * 1992/9/17: Added DMA allocation & DMA functions. -- hhb.
- *
- * TODO: Errors are still not counted properly.
- */
-
-/* 1992/9/20
- * Modifications for ``Sector Shifting'' by Rob Hooft (hooft@chem.ruu.nl)
- * modeled after the freeware MS-DOS program fdformat/88 V1.8 by
- * Christoph H. Hochst\"atter.
- * I have fixed the shift values to the ones I always use. Maybe a new
- * ioctl() should be created to be able to modify them.
- * There is a bug in the driver that makes it impossible to format a
- * floppy as the first thing after bootup.
- */
-
-/*
- * 1993/4/29 -- Linus -- cleaned up the timer handling in the kernel, and
- * this helped the floppy driver as well. Much cleaner, and still seems to
- * work.
- */
-
-/* 1994/6/24 --bbroad-- added the floppy table entries and made
- * minor modifications to allow 2.88 floppies to be run.
- */
-
-/* 1994/7/13 -- Paul Vojta -- modified the probing code to allow three or more
- * disk types.
- */
-
-/*
- * 1994/8/8 -- Alain Knaff -- Switched to fdpatch driver: Support for bigger
- * format bug fixes, but unfortunately some new bugs too...
- */
-
-/* 1994/9/17 -- Koen Holtman -- added logging of physical floppy write
- * errors to allow safe writing by specialized programs.
- */
-
-/* 1995/4/24 -- Dan Fandrich -- added support for Commodore 1581 3.5" disks
- * by defining bit 1 of the "stretch" parameter to mean put sectors on the
- * opposite side of the disk, leaving the sector IDs alone (i.e. Commodore's
- * drives are "upside-down").
- */
-
-/*
- * 1995/8/26 -- Andreas Busse -- added Mips support.
- */
-
-/*
- * 1995/10/18 -- Ralf Baechle -- Portability cleanup; move machine dependent
- * features to asm/floppy.h.
- */
-
-/*
- * 1998/05/07 -- Russell King -- More portability cleanups; moved definition of
- * interrupt and dma channel to asm/floppy.h. Cleaned up some formatting &
- * use of '0' for NULL.
- */
- 
-/*
- * 1998/06/07 -- Alan Cox -- Merged the 2.0.34 fixes for resource allocation
- * failures.
- */
-
-/*
- * 1998/09/20 -- David Weinehall -- Added slow-down code for buggy PS/2-drives.
- */
-
-/*
- * 1999/01/19 -- N.Fujita & Linux/98 Project -- Added code for NEC PC-9800
- * series.
- */
-
-/*
- * 1999/08/13 -- Paul Slootman -- floppy stopped working on Alpha after 24
- * days, 6 hours, 32 minutes and 32 seconds (i.e. MAXINT jiffies; ints were
- * being used to store jiffies, which are unsigned longs).
- */
-
-/*
- * 2000/08/28 -- Arnaldo Carvalho de Melo <acme@conectiva.com.br>
- * - get rid of check_region
- * - s/suser/capable/
- */
-
-/*
- * 2001/08/26 -- Paul Gortmaker - fix insmod oops on machines with no
- * floppy controller (lingering task on list after module is gone... boom.)
- */
-
-/*
- * 2002/02/07 -- Anton Altaparmakov - Fix io ports reservation to correct range
- * (0x3f2-0x3f5, 0x3f7). This fix is a bit of a hack but the proper fix
- * requires many non-obvious changes in arch dependent code.
- */
-
-/*
- * 2002/10/12 -- Osamu Tomita <tomita@cinet.co.jp>
- * split code from floppy.c
- * support NEC PC-9800 only
- */
-
-#define FLOPPY_SANITY_CHECK
-#undef  FLOPPY_SILENT_DCL_CLEAR
-
-/*
-#define PC9800_DEBUG_FLOPPY
-#define PC9800_DEBUG_FLOPPY2
-*/
-
-#define REALLY_SLOW_IO
-
-#define DEBUGT 2
-#define DCL_DEBUG /* debug disk change line */
-
-/* do print messages for unexpected interrupts */
-static int print_unex=1;
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/timer.h>
-#include <linux/workqueue.h>
-#include <linux/version.h>
-#include <linux/fdreg.h>
-#include <linux/blkdev.h>
-#include <linux/blkpg.h>
-#include <linux/cdrom.h>	/* for the compatibility eject ioctl */
-#include <linux/completion.h>
-
-/*
- * 1998/1/21 -- Richard Gooch <rgooch@atnf.csiro.au> -- devfs support
- */
-
-
-#include <linux/fd.h>
-#define FLOPPY98_MOTOR_MASK 0x08
-
-#include <linux/hdreg.h>
-#define FD98_STATUS	(0 + FD_IOPORT )
-#define FD98_DATA	(2 + FD_IOPORT )
-#define FD_MODE		(4 + FD_IOPORT )
-#define FD_MODE_CHANGE	0xbe
-#define FD_EMODE_CHANGE	0x4be
-
-#include <linux/errno.h>
-#include <linux/slab.h>
-#include <linux/mm.h>
-#include <linux/bio.h>
-#include <linux/string.h>
-#include <linux/fcntl.h>
-#include <linux/delay.h>
-#include <linux/mc146818rtc.h> /* CMOS defines */
-#include <linux/ioport.h>
-#include <linux/interrupt.h>
-#include <linux/init.h>
-#include <linux/devfs_fs_kernel.h>
-#include <linux/device.h>
-#include <linux/buffer_head.h>		/* for invalidate_buffers() */
-
-/*
- * PS/2 floppies have much slower step rates than regular floppies.
- * It's been recommended that take about 1/4 of the default speed
- * in some more extreme cases.
- */
-static int slow_floppy;
-
-#include <asm/dma.h>
-#include <asm/irq.h>
-#include <asm/system.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
-
-#ifndef DEFAULT_FLOPPY_IRQ
-# define DEFAULT_FLOPPY_IRQ	11
-#endif
-#ifndef DEFAULT_FLOPPY_DMA
-# define DEFAULT_FLOPPY_DMA	2
-#endif
-
-static int FLOPPY_IRQ=DEFAULT_FLOPPY_IRQ;
-static int FLOPPY_DMA=DEFAULT_FLOPPY_DMA;
-static int can_use_virtual_dma=2;
-static int auto_detect_mode = 0;
-static int retry_auto_detect = 0;
-#define FD_AFTER_RESET_DELAY 1000
-
-/* =======
- * can use virtual DMA:
- * 0 = use of virtual DMA disallowed by config
- * 1 = use of virtual DMA prescribed by config
- * 2 = no virtual DMA preference configured.  By default try hard DMA,
- * but fall back on virtual DMA when not enough memory available
- */
-
-static int use_virtual_dma;
-/* =======
- * use virtual DMA
- * 0 using hard DMA
- * 1 using virtual DMA
- * This variable is set to virtual when a DMA mem problem arises, and
- * reset back in floppy_grab_irq_and_dma.
- * It is not safe to reset it in other circumstances, because the floppy
- * driver may have several buffers in use at once, and we do currently not
- * record each buffers capabilities
- */
-
-static spinlock_t floppy_lock = SPIN_LOCK_UNLOCKED;
-static struct completion device_release;
-
-static unsigned short virtual_dma_port=0x3f0;
-irqreturn_t floppy_interrupt(int irq, void *dev_id, struct pt_regs * regs);
-static int set_mode(char mask, char data);
-static void register_devfs_entries (int drive) __init;
-
-#define K_64	0x10000		/* 64KB */
-
-/* the following is the mask of allowed drives. By default units 2 and
- * 3 of both floppy controllers are disabled, because switching on the
- * motor of these drives causes system hangs on some PCI computers. drive
- * 0 is the low bit (0x1), and drive 7 is the high bit (0x80). Bits are on if
- * a drive is allowed.
- *
- * NOTE: This must come before we include the arch floppy header because
- *       some ports reference this variable from there. -DaveM
- */
-
-static int allowed_drive_mask = 0x0f;
-
-#include <asm/floppy.h>
-
-static int irqdma_allocated;
-
-#define LOCAL_END_REQUEST
-#define DEVICE_NAME "floppy"
-
-#include <linux/blkpg.h>
-#include <linux/cdrom.h> /* for the compatibility eject ioctl */
-#include <linux/completion.h>
-
-static struct request *current_req;
-static struct request_queue *floppy_queue;
-
-#ifndef fd_get_dma_residue
-#define fd_get_dma_residue() get_dma_residue(FLOPPY_DMA)
-#endif
-
-/* Dma Memory related stuff */
-
-#ifndef fd_dma_mem_free
-#define fd_dma_mem_free(addr, size) free_pages(addr, get_order(size))
-#endif
-
-#ifndef fd_dma_mem_alloc
-#define fd_dma_mem_alloc(size) __get_dma_pages(GFP_KERNEL,get_order(size))
-#endif
-
-static inline void fallback_on_nodma_alloc(char **addr, size_t l)
-{
-#ifdef FLOPPY_CAN_FALLBACK_ON_NODMA
-	if (*addr)
-		return; /* we have the memory */
-	if (can_use_virtual_dma != 2)
-		return; /* no fallback allowed */
-	printk("DMA memory shortage. Temporarily falling back on virtual DMA\n");
-	*addr = (char *) nodma_mem_alloc(l);
-#else
-	return;
-#endif
-}
-
-/* End dma memory related stuff */
-
-static unsigned long fake_change;
-static int initialising=1;
-
-#define ITYPE(x) (((x)>>2) & 0x1f)
-#define TOMINOR(x) ((x & 3) | ((x & 4) << 5))
-#define UNIT(x) ((x) & 0x03)		/* drive on fdc */
-#define FDC(x) (((x) & 0x04) >> 2)  /* fdc of drive */
-#define REVDRIVE(fdc, unit) ((unit) + ((fdc) << 2))
-				/* reverse mapping from unit and fdc to drive */
-#define DP (&drive_params[current_drive])
-#define DRS (&drive_state[current_drive])
-#define DRWE (&write_errors[current_drive])
-#define FDCS (&fdc_state[fdc])
-#define CLEARF(x) (clear_bit(x##_BIT, &DRS->flags))
-#define SETF(x) (set_bit(x##_BIT, &DRS->flags))
-#define TESTF(x) (test_bit(x##_BIT, &DRS->flags))
-
-#define UDP (&drive_params[drive])
-#define UDRS (&drive_state[drive])
-#define UDRWE (&write_errors[drive])
-#define UFDCS (&fdc_state[FDC(drive)])
-#define UCLEARF(x) (clear_bit(x##_BIT, &UDRS->flags))
-#define USETF(x) (set_bit(x##_BIT, &UDRS->flags))
-#define UTESTF(x) (test_bit(x##_BIT, &UDRS->flags))
-
-#define DPRINT(format, args...) printk(DEVICE_NAME "%d: " format, current_drive , ## args)
-
-#define PH_HEAD(floppy,head) (((((floppy)->stretch & 2) >>1) ^ head) << 2)
-#define STRETCH(floppy) ((floppy)->stretch & FD_STRETCH)
-
-#define CLEARSTRUCT(x) memset((x), 0, sizeof(*(x)))
-
-/* read/write */
-#define COMMAND raw_cmd->cmd[0]
-#define DR_SELECT raw_cmd->cmd[1]
-#define TRACK raw_cmd->cmd[2]
-#define HEAD raw_cmd->cmd[3]
-#define SECTOR raw_cmd->cmd[4]
-#define SIZECODE raw_cmd->cmd[5]
-#define SECT_PER_TRACK raw_cmd->cmd[6]
-#define GAP raw_cmd->cmd[7]
-#define SIZECODE2 raw_cmd->cmd[8]
-#define NR_RW 9
-
-/* format */
-#define F_SIZECODE raw_cmd->cmd[2]
-#define F_SECT_PER_TRACK raw_cmd->cmd[3]
-#define F_GAP raw_cmd->cmd[4]
-#define F_FILL raw_cmd->cmd[5]
-#define NR_F 6
-
-/*
- * Maximum disk size (in kilobytes). This default is used whenever the
- * current disk size is unknown.
- * [Now it is rather a minimum]
- */
-#define MAX_DISK_SIZE 4 /* 3984*/
-
-
-/*
- * globals used by 'result()'
- */
-#define MAX_REPLIES 16
-static unsigned char reply_buffer[MAX_REPLIES];
-static int inr; /* size of reply buffer, when called from interrupt */
-#define ST0 (reply_buffer[0])
-#define ST1 (reply_buffer[1])
-#define ST2 (reply_buffer[2])
-#define ST3 (reply_buffer[0]) /* result of GETSTATUS */
-#define R_TRACK (reply_buffer[3])
-#define R_HEAD (reply_buffer[4])
-#define R_SECTOR (reply_buffer[5])
-#define R_SIZECODE (reply_buffer[6])
-
-#define SEL_DLY (2*HZ/100)
-
-/*
- * this struct defines the different floppy drive types.
- */
-static struct {
-	struct floppy_drive_params params;
-	const char *name; /* name printed while booting */
-} default_drive_params[]= {
-/* NOTE: the time values in jiffies should be in msec!
- CMOS drive type
-  |     Maximum data rate supported by drive type
-  |     |   Head load time, msec
-  |     |   |   Head unload time, msec (not used)
-  |     |   |   |     Step rate interval, usec
-  |     |   |   |     |       Time needed for spinup time (jiffies)
-  |     |   |   |     |       |      Timeout for spinning down (jiffies)
-  |     |   |   |     |       |      |   Spindown offset (where disk stops)
-  |     |   |   |     |       |      |   |     Select delay
-  |     |   |   |     |       |      |   |     |     RPS
-  |     |   |   |     |       |      |   |     |     |    Max number of tracks
-  |     |   |   |     |       |      |   |     |     |    |     Interrupt timeout
-  |     |   |   |     |       |      |   |     |     |    |     |   Max nonintlv. sectors
-  |     |   |   |     |       |      |   |     |     |    |     |   | -Max Errors- flags */
-{{0,  500, 16, 16, 8000,    1*HZ, 3*HZ,  0, SEL_DLY, 5,  80, 3*HZ, 20, {3,1,2,0,2}, 0,
-      0, { 7, 4, 8, 2, 1, 5, 3,10}, 3*HZ/2, 0 }, "unknown" },
-
-{{1,  300, 16, 16, 8000,    1*HZ, 3*HZ,  0, SEL_DLY, 5,  40, 3*HZ, 17, {3,1,2,0,2}, 0,
-      0, { 1, 0, 0, 0, 0, 0, 0, 0}, 3*HZ/2, 1 }, "360K PC" }, /*5 1/4 360 KB PC*/
-
-{{2,  500, 16, 16, 6000, 4*HZ/10, 3*HZ, 14, SEL_DLY, 6,  83, 3*HZ, 17, {3,1,2,0,2}, 0,
-      0, { 2, 6, 4, 0, 0, 0, 0, 0}, 3*HZ/2, 2 }, "1.2M" }, /*5 1/4 HD AT*/
-
-{{3,  250, 16, 16, 3000,    1*HZ, 3*HZ,  0, SEL_DLY, 5,  83, 3*HZ, 20, {3,1,2,0,2}, 0,
-      0, { 4, 6, 0, 0, 0, 0, 0, 0}, 3*HZ/2, 4 }, "720k" }, /*3 1/2 DD*/
-
-{{4,  500, 16, 16, 4000, 4*HZ/10, 3*HZ, 10, SEL_DLY, 5,  83, 3*HZ, 20, {3,1,2,0,2}, 0,
-      0, { 7,10, 2, 4, 6, 0, 0, 0}, 3*HZ/2, 7 }, "1.44M" }, /*3 1/2 HD*/
-
-{{5, 1000, 15,  8, 3000, 4*HZ/10, 3*HZ, 10, SEL_DLY, 5,  83, 3*HZ, 40, {3,1,2,0,2}, 0,
-      0, { 7, 8, 4,25,28,22,31,21}, 3*HZ/2, 8 }, "2.88M AMI BIOS" }, /*3 1/2 ED*/
-
-{{6, 1000, 15,  8, 3000, 4*HZ/10, 3*HZ, 10, SEL_DLY, 5,  83, 3*HZ, 40, {3,1,2,0,2}, 0,
-      0, { 7, 8, 4,25,28,22,31,21}, 3*HZ/2, 8 }, "2.88M" } /*3 1/2 ED*/
-/*    |  --autodetected formats---    |      |      |
- *    read_track                      |      |    Name printed when booting
- *				      |     Native format
- *	            Frequency of disk change checks */
-};
-
-static struct floppy_drive_params drive_params[N_DRIVE];
-static struct floppy_drive_struct drive_state[N_DRIVE];
-static struct floppy_write_errors write_errors[N_DRIVE];
-static struct timer_list motor_off_timer[N_DRIVE];
-static struct gendisk *disks[N_DRIVE];
-static struct block_device *opened_bdev[N_DRIVE];
-static DECLARE_MUTEX(open_lock);
-static struct floppy_raw_cmd *raw_cmd, default_raw_cmd;
-
-/*
- * This struct defines the different floppy types.
- *
- * Bit 0 of 'stretch' tells if the tracks need to be doubled for some
- * types (e.g. 360kB diskette in 1.2MB drive, etc.).  Bit 1 of 'stretch'
- * tells if the disk is in Commodore 1581 format, which means side 0 sectors
- * are located on side 1 of the disk but with a side 0 ID, and vice-versa.
- * This is the same as the Sharp MZ-80 5.25" CP/M disk format, except that the
- * 1581's logical side 0 is on physical side 1, whereas the Sharp's logical
- * side 0 is on physical side 0 (but with the misnamed sector IDs).
- * 'stretch' should probably be renamed to something more general, like
- * 'options'.  Other parameters should be self-explanatory (see also
- * setfdprm(8)).
- */
-/*
-	    Size
-	     |  Sectors per track
-	     |  | Head
-	     |  | |  Tracks
-	     |  | |  | Stretch
-	     |  | |  | |  Gap 1 size
-	     |  | |  | |    |  Data rate, | 0x40 for perp
-	     |  | |  | |    |    |  Spec1 (stepping rate, head unload
-	     |  | |  | |    |    |    |    /fmt gap (gap2) */
-static struct floppy_struct floppy_type[32] = {
-	{    0, 0,0, 0,0,0x00,0x00,0x00,0x00,NULL    },	/*  0 no testing    */
-#if 0
-	{  720, 9,2,40,0,0x2A,0x02,0xDF,0x50,"d360"  }, /*  1 360KB PC      */
-#else
-	{ 2464,16,2,77,0,0x35,0x48,0xDF,0x74,"d360"  }, /*  1 1.25MB 98     */
-#endif
-	{ 2400,15,2,80,0,0x1B,0x00,0xDF,0x54,"h1200" },	/*  2 1.2MB AT      */
-	{  720, 9,1,80,0,0x2A,0x02,0xDF,0x50,"D360"  },	/*  3 360KB SS 3.5" */
-	{ 1440, 9,2,80,0,0x2A,0x02,0xDF,0x50,"D720"  },	/*  4 720KB 3.5"    */
-	{  720, 9,2,40,1,0x23,0x01,0xDF,0x50,"h360"  },	/*  5 360KB AT      */
-	{ 1440, 9,2,80,0,0x23,0x01,0xDF,0x50,"h720"  },	/*  6 720KB AT      */
-	{ 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,"H1440" },	/*  7 1.44MB 3.5"   */
-	{ 5760,36,2,80,0,0x1B,0x43,0xAF,0x54,"E2880" },	/*  8 2.88MB 3.5"   */
-	{ 6240,39,2,80,0,0x1B,0x43,0xAF,0x28,"E3120" },	/*  9 3.12MB 3.5"   */
-
-	{ 2880,18,2,80,0,0x25,0x00,0xDF,0x02,"h1440" }, /* 10 1.44MB 5.25"  */
-	{ 3360,21,2,80,0,0x1C,0x00,0xCF,0x0C,"H1680" }, /* 11 1.68MB 3.5"   */
-	{  820,10,2,41,1,0x25,0x01,0xDF,0x2E,"h410"  },	/* 12 410KB 5.25"   */
-	{ 1640,10,2,82,0,0x25,0x02,0xDF,0x2E,"H820"  },	/* 13 820KB 3.5"    */
-	{ 2952,18,2,82,0,0x25,0x00,0xDF,0x02,"h1476" },	/* 14 1.48MB 5.25"  */
-	{ 3444,21,2,82,0,0x25,0x00,0xDF,0x0C,"H1722" },	/* 15 1.72MB 3.5"   */
-	{  840,10,2,42,1,0x25,0x01,0xDF,0x2E,"h420"  },	/* 16 420KB 5.25"   */
-	{ 1660,10,2,83,0,0x25,0x02,0xDF,0x2E,"H830"  },	/* 17 830KB 3.5"    */
-	{ 2988,18,2,83,0,0x25,0x00,0xDF,0x02,"h1494" },	/* 18 1.49MB 5.25"  */
-	{ 3486,21,2,83,0,0x25,0x00,0xDF,0x0C,"H1743" }, /* 19 1.74 MB 3.5"  */
-
-	{ 1760,11,2,80,0,0x1C,0x09,0xCF,0x00,"h880"  }, /* 20 880KB 5.25"   */
-	{ 2080,13,2,80,0,0x1C,0x01,0xCF,0x00,"D1040" }, /* 21 1.04MB 3.5"   */
-	{ 2240,14,2,80,0,0x1C,0x19,0xCF,0x00,"D1120" }, /* 22 1.12MB 3.5"   */
-	{ 3200,20,2,80,0,0x1C,0x20,0xCF,0x2C,"h1600" }, /* 23 1.6MB 5.25"   */
-	{ 3520,22,2,80,0,0x1C,0x08,0xCF,0x2e,"H1760" }, /* 24 1.76MB 3.5"   */
-	{ 3840,24,2,80,0,0x1C,0x20,0xCF,0x00,"H1920" }, /* 25 1.92MB 3.5"   */
-	{ 6400,40,2,80,0,0x25,0x5B,0xCF,0x00,"E3200" }, /* 26 3.20MB 3.5"   */
-	{ 7040,44,2,80,0,0x25,0x5B,0xCF,0x00,"E3520" }, /* 27 3.52MB 3.5"   */
-	{ 7680,48,2,80,0,0x25,0x63,0xCF,0x00,"E3840" }, /* 28 3.84MB 3.5"   */
-
-	{ 3680,23,2,80,0,0x1C,0x10,0xCF,0x00,"H1840" }, /* 29 1.84MB 3.5"   */
-	{ 1600,10,2,80,0,0x25,0x02,0xDF,0x2E,"D800"  },	/* 30 800KB 3.5"    */
-	{ 3200,20,2,80,0,0x1C,0x00,0xCF,0x2C,"H1600" }, /* 31 1.6MB 3.5"    */
-};
-
-#define	NUMBER(x)	(sizeof(x) / sizeof(*(x)))
-#define SECTSIZE (_FD_SECTSIZE(*floppy))
-
-/* Auto-detection: Disk type used until the next media change occurs. */
-static struct floppy_struct *current_type[N_DRIVE];
-
-/*
- * User-provided type information. current_type points to
- * the respective entry of this array.
- */
-static struct floppy_struct user_params[N_DRIVE];
-
-static sector_t floppy_sizes[256];
-
-/*
- * The driver is trying to determine the correct media format
- * while probing is set. rw_interrupt() clears it after a
- * successful access.
- */
-static int probing;
-
-/* Synchronization of FDC access. */
-#define FD_COMMAND_NONE -1
-#define FD_COMMAND_ERROR 2
-#define FD_COMMAND_OKAY 3
-
-static volatile int command_status = FD_COMMAND_NONE;
-static unsigned long fdc_busy;
-static DECLARE_WAIT_QUEUE_HEAD(fdc_wait);
-static DECLARE_WAIT_QUEUE_HEAD(command_done);
-
-#define NO_SIGNAL (!interruptible || !signal_pending(current))
-#define CALL(x) if ((x) == -EINTR) return -EINTR
-#define ECALL(x) if ((ret = (x))) return ret;
-#define _WAIT(x,i) CALL(ret=wait_til_done((x),i))
-#define WAIT(x) _WAIT((x),interruptible)
-#define IWAIT(x) _WAIT((x),1)
-
-/* Errors during formatting are counted here. */
-static int format_errors;
-
-/* Format request descriptor. */
-static struct format_descr format_req;
-
-/*
- * Rate is 0 for 500kb/s, 1 for 300kbps, 2 for 250kbps
- * Spec1 is 0xSH, where S is stepping rate (F=1ms, E=2ms, D=3ms etc),
- * H is head unload time (1=16ms, 2=32ms, etc)
- */
-
-/*
- * Track buffer
- * Because these are written to by the DMA controller, they must
- * not contain a 64k byte boundary crossing, or data will be
- * corrupted/lost.
- */
-static char *floppy_track_buffer;
-static int max_buffer_sectors;
-
-static int *errors;
-typedef void (*done_f)(int);
-static struct cont_t {
-	void (*interrupt)(void); /* this is called after the interrupt of the
-				  * main command */
-	void (*redo)(void); /* this is called to retry the operation */
-	void (*error)(void); /* this is called to tally an error */
-	done_f done; /* this is called to say if the operation has 
-		      * succeeded/failed */
-} *cont;
-
-static void floppy_ready(void);
-static void floppy_start(void);
-static void process_fd_request(void);
-static void recalibrate_floppy(void);
-static void floppy_shutdown(unsigned long);
-
-static int floppy_grab_irq_and_dma(void);
-static void floppy_release_irq_and_dma(void);
-
-/*
- * The "reset" variable should be tested whenever an interrupt is scheduled,
- * after the commands have been sent. This is to ensure that the driver doesn't
- * get wedged when the interrupt doesn't come because of a failed command.
- * reset doesn't need to be tested before sending commands, because
- * output_byte is automatically disabled when reset is set.
- */
-#define CHECK_RESET { if (FDCS->reset){ reset_fdc(); return; } }
-static void reset_fdc(void);
-
-/*
- * These are global variables, as that's the easiest way to give
- * information to interrupts. They are the data used for the current
- * request.
- */
-#define NO_TRACK -1
-#define NEED_1_RECAL -2
-#define NEED_2_RECAL -3
-
-static int usage_count;
-
-/* buffer related variables */
-static int buffer_track = -1;
-static int buffer_drive = -1;
-static int buffer_min = -1;
-static int buffer_max = -1;
-
-/* fdc related variables, should end up in a struct */
-static struct floppy_fdc_state fdc_state[N_FDC];
-static int fdc; /* current fdc */
-
-static struct floppy_struct *_floppy = floppy_type;
-static unsigned char current_drive;
-static long current_count_sectors;
-static unsigned char fsector_t; /* sector in track */
-static unsigned char in_sector_offset;	/* offset within physical sector,
-					 * expressed in units of 512 bytes */
-
-#ifndef fd_eject
-static inline int fd_eject(int drive)
-{
-	return -EINVAL;
-}
-#endif
-
-#ifdef DEBUGT
-static long unsigned debugtimer;
-#endif
-
-/*
- * Debugging
- * =========
- */
-static inline void set_debugt(void)
-{
-#ifdef DEBUGT
-	debugtimer = jiffies;
-#endif
-}
-
-static inline void debugt(const char *message)
-{
-#ifdef DEBUGT
-	if (DP->flags & DEBUGT)
-		printk("%s dtime=%lu\n", message, jiffies-debugtimer);
-#endif
-}
-
-typedef void (*timeout_fn)(unsigned long);
-static struct timer_list fd_timeout = TIMER_INITIALIZER(floppy_shutdown, 0, 0);
-
-static const char *timeout_message;
-
-#ifdef FLOPPY_SANITY_CHECK
-static void is_alive(const char *message)
-{
-	/* this routine checks whether the floppy driver is "alive" */
-	if (fdc_busy && command_status < 2 && !timer_pending(&fd_timeout)){
-		DPRINT("timeout handler died: %s\n",message);
-	}
-}
-#endif
-
-static void (*do_floppy)(void) = NULL;
-
-#ifdef FLOPPY_SANITY_CHECK
-
-#define OLOGSIZE 20
-
-static void (*lasthandler)(void);
-static unsigned long interruptjiffies;
-static unsigned long resultjiffies;
-static int resultsize;
-static unsigned long lastredo;
-
-static struct output_log {
-	unsigned char data;
-	unsigned char status;
-	unsigned long jiffies;
-} output_log[OLOGSIZE];
-
-static int output_log_pos;
-#endif
-
-#define current_reqD -1
-#define MAXTIMEOUT -2
-
-static void reschedule_timeout(int drive, const char *message, int marg)
-{
-	unsigned long delay;
-
-	if (drive == current_reqD)
-		drive = current_drive;
-	if (drive < 0 || drive > N_DRIVE) {
-		delay = 20UL*HZ;
-		drive=0;
-	} else
-		delay = UDP->timeout;
-	mod_timer(&fd_timeout, delay + jiffies);
-	if (UDP->flags & FD_DEBUG){
-		DPRINT("reschedule timeout ");
-		printk(message, marg);
-		printk("\n");
-	}
-	timeout_message = message;
-}
-
-static int maximum(int a, int b)
-{
-	if (a > b)
-		return a;
-	else
-		return b;
-}
-#define INFBOUND(a,b) (a)=maximum((a),(b));
-
-static int minimum(int a, int b)
-{
-	if (a < b)
-		return a;
-	else
-		return b;
-}
-#define SUPBOUND(a,b) (a)=minimum((a),(b));
-
-
-/*
- * Bottom half floppy driver.
- * ==========================
- *
- * This part of the file contains the code talking directly to the hardware,
- * and also the main service loop (seek-configure-spinup-command)
- */
-
-/*
- * disk change.
- * This routine is responsible for maintaining the FD_DISK_CHANGE flag,
- * and the last_checked date.
- *
- * last_checked is the date of the last check which showed 'no disk change'
- * FD_DISK_CHANGE is set under two conditions:
- * 1. The floppy has been changed after some i/o to that floppy already
- *    took place.
- * 2. No floppy disk is in the drive. This is done in order to ensure that
- *    requests are quickly flushed in case there is no disk in the drive. It
- *    follows that FD_DISK_CHANGE can only be cleared if there is a disk in
- *    the drive.
- *
- * For 1., maxblock is observed. Maxblock is 0 if no i/o has taken place yet.
- * For 2., FD_DISK_NEWCHANGE is watched. FD_DISK_NEWCHANGE is cleared on
- *  each seek. If a disk is present, the disk change line should also be
- *  cleared on each seek. Thus, if FD_DISK_NEWCHANGE is clear, but the disk
- *  change line is set, this means either that no disk is in the drive, or
- *  that it has been removed since the last seek.
- *
- * This means that we really have a third possibility too:
- *  The floppy has been changed after the last seek.
- */
-
-static int disk_change(int drive)
-{
-	return UTESTF(FD_DISK_CHANGED);
-}
-
-static int set_mode(char mask, char data)
-{
-	register unsigned char newdor, olddor;
-
-	olddor = FDCS->dor;
-	newdor = (olddor & mask) | data;
-	if (newdor != olddor) {
-		FDCS->dor = newdor;
-		fd_outb(newdor, FD_MODE);
-	}
-
-	if (newdor & FLOPPY98_MOTOR_MASK)
-		floppy_grab_irq_and_dma();
-
-	if (olddor & FLOPPY98_MOTOR_MASK)
-		floppy_release_irq_and_dma();
-
-	return olddor;
-}
-
-static void twaddle(void)
-{
-	if (DP->select_delay)
-		return;
-
-	fd_outb(FDCS->dor & 0xf7, FD_MODE);
-	fd_outb(FDCS->dor, FD_MODE);
-	DRS->select_date = jiffies;
-}
-
-/* reset all driver information about the current fdc. This is needed after
- * a reset, and after a raw command. */
-static void reset_fdc_info(int mode)
-{
-	int drive;
-
-	FDCS->spec1 = FDCS->spec2 = -1;
-	FDCS->need_configure = 1;
-	FDCS->perp_mode = 1;
-	FDCS->rawcmd = 0;
-	for (drive = 0; drive < N_DRIVE; drive++)
-		if (FDC(drive) == fdc &&
-		    (mode || UDRS->track != NEED_1_RECAL))
-			UDRS->track = NEED_2_RECAL;
-}
-
-/* selects the fdc and drive, and enables the fdc's input/dma. */
-static void set_fdc(int drive)
-{
-	fdc = 0;
-	current_drive = drive;
-	set_mode(~0, 0x10);
-	if (FDCS->rawcmd == 2)
-		reset_fdc_info(1);
-
-	if (fd_inb(FD98_STATUS) != STATUS_READY)
-		FDCS->reset = 1;
-}
-
-/* locks the driver */
-static int _lock_fdc(int drive, int interruptible, int line)
-{
-	if (!usage_count){
-		printk(KERN_ERR "Trying to lock fdc while usage count=0 at line %d\n", line);
-		return -1;
-	}
-	if(floppy_grab_irq_and_dma()==-1)
-		return -EBUSY;
-
-	if (test_and_set_bit(0, &fdc_busy)) {
-		DECLARE_WAITQUEUE(wait, current);
-		add_wait_queue(&fdc_wait, &wait);
-
-		for (;;) {
-			set_current_state(TASK_INTERRUPTIBLE);
-
-			if (!test_and_set_bit(0, &fdc_busy))
-				break;
-
-			schedule();
-
-			if (!NO_SIGNAL) {
-				remove_wait_queue(&fdc_wait, &wait);
-				return -EINTR;
-			}
-		}
-
-		set_current_state(TASK_RUNNING);
-		remove_wait_queue(&fdc_wait, &wait);
-	}
-	command_status = FD_COMMAND_NONE;
-
-	reschedule_timeout(drive, "lock fdc", 0);
-	set_fdc(drive);
-	return 0;
-}
-
-#define lock_fdc(drive,interruptible) _lock_fdc(drive,interruptible, __LINE__)
-
-#define LOCK_FDC(drive,interruptible) \
-if (lock_fdc(drive,interruptible)) return -EINTR;
-
-
-/* unlocks the driver */
-static inline void unlock_fdc(void)
-{
-	raw_cmd = 0;
-	if (!fdc_busy)
-		DPRINT("FDC access conflict!\n");
-
-	if (do_floppy)
-		DPRINT("device interrupt still active at FDC release: %p!\n",
-			do_floppy);
-	command_status = FD_COMMAND_NONE;
-	del_timer(&fd_timeout);
-	cont = NULL;
-	clear_bit(0, &fdc_busy);
-	floppy_release_irq_and_dma();
-	wake_up(&fdc_wait);
-}
-
-#ifndef CONFIG_PC9800_MOTOR_OFF /* tomita */
-
-/* switches the motor off after a given timeout */
-static void motor_off_callback(unsigned long nr)
-{
-	printk(KERN_DEBUG "fdc%lu: turn off motor\n", nr);
-}
-
-/* schedules motor off */
-static void floppy_off(unsigned int drive)
-{
-}
-
-#else /* CONFIG_PC9800_MOTOR_OFF */
-
-/* switches the motor off after a given timeout */
-static void motor_off_callback(unsigned long fdc)
-{
-	printk(KERN_DEBUG "fdc%u: turn off motor\n", (unsigned int) fdc);
-
-	fd_outb(0, FD_MODE);	/* MTON = 0 */
-}
-
-static struct timer_list motor_off_timer[N_FDC] = {
-	{ data: 0, function: motor_off_callback },
-#if N_FDC > 1
-	{ data: 1, function: motor_off_callback },
-#endif
-#if N_FDC > 2
-# error "N_FDC > 2; please fix initializer for motor_off_timer[]"
-#endif
-};
-
-/* schedules motor off */
-static void floppy_off(unsigned int drive)
-{
-	unsigned long volatile delta;
-	register int fdc = FDC(drive);
-
-	if (!(FDCS->dor & (0x10 << UNIT(drive))))
-		return;
-
-	del_timer(motor_off_timer + fdc);
-
-#if 0
-	/* make spindle stop in a position which minimizes spinup time
-	 * next time */
-	if (UDP->rps){
-		delta = jiffies - UDRS->first_read_date + HZ -
-			UDP->spindown_offset;
-		delta = ((delta * UDP->rps) % HZ) / UDP->rps;
-		motor_off_timer[drive].expires = jiffies + UDP->spindown - delta;
-	}
-#else
-	if (UDP->rps)
-		motor_off_timer[drive].expires = jiffies + UDP->spindown;
-#endif
-
-	add_timer(motor_off_timer + fdc);
-}
-
-#endif /* CONFIG_PC9800_MOTOR_OFF */
-
-/*
- * cycle through all N_DRIVE floppy drives, for disk change testing.
- * stopping at current drive. This is done before any long operation, to
- * be sure to have up to date disk change information.
- */
-static void scandrives(void)
-{
-	int i, drive, saved_drive;
-
-	if (DP->select_delay)
-		return;
-
-	saved_drive = current_drive;
-	for (i=0; i < N_DRIVE; i++){
-		drive = (saved_drive + i + 1) % N_DRIVE;
-		if (UDRS->fd_ref == 0 || UDP->select_delay != 0)
-			continue; /* skip closed drives */
-		set_fdc(drive);
-	}
-	set_fdc(saved_drive);
-}
-
-static void empty(void)
-{
-}
-
-static DECLARE_WORK(floppy_work, NULL, NULL);
-
-static void schedule_bh(void (*handler) (void))
-{
-	PREPARE_WORK(&floppy_work, (void (*)(void *))handler, NULL);
-	schedule_work(&floppy_work);
-}
-
-static struct timer_list fd_timer = TIMER_INITIALIZER(NULL, 0, 0);
-
-static void cancel_activity(void)
-{
-	do_floppy = NULL;
-	PREPARE_WORK(&floppy_work, (void*)(void*)empty, NULL);
-	del_timer(&fd_timer);
-}
-
-/* this function makes sure that the disk stays in the drive during the
- * transfer */
-static void fd_watchdog(void)
-{
-#ifdef DCL_DEBUG
-	if (DP->flags & FD_DEBUG){
-		DPRINT("calling disk change from watchdog\n");
-	}
-#endif
-
-	if (disk_change(current_drive)){
-		DPRINT("disk removed during i/o\n");
-		cancel_activity();
-		cont->done(0);
-		reset_fdc();
-	} else {
-		del_timer(&fd_timer);
-		fd_timer.function = (timeout_fn) fd_watchdog;
-		fd_timer.expires = jiffies + HZ / 10;
-		add_timer(&fd_timer);
-	}
-}
-
-static void main_command_interrupt(void)
-{
-	del_timer(&fd_timer);
-	cont->interrupt();
-}
-
-/* waits for a delay (spinup or select) to pass */
-static int fd_wait_for_completion(unsigned long delay, timeout_fn function)
-{
-	if (FDCS->reset){
-		reset_fdc(); /* do the reset during sleep to win time
-			      * if we don't need to sleep, it's a good
-			      * occasion anyways */
-		return 1;
-	}
-
-	if ((signed) (jiffies - delay) < 0){
-		del_timer(&fd_timer);
-		fd_timer.function = function;
-		fd_timer.expires = delay;
-		add_timer(&fd_timer);
-		return 1;
-	}
-	return 0;
-}
-
-static spinlock_t floppy_hlt_lock = SPIN_LOCK_UNLOCKED;
-static int hlt_disabled;
-static void floppy_disable_hlt(void)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&floppy_hlt_lock, flags);
-	if (!hlt_disabled) {
-		hlt_disabled=1;
-#ifdef HAVE_DISABLE_HLT
-		disable_hlt();
-#endif
-	}
-	spin_unlock_irqrestore(&floppy_hlt_lock, flags);
-}
-
-static void floppy_enable_hlt(void)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&floppy_hlt_lock, flags);
-	if (hlt_disabled){
-		hlt_disabled=0;
-#ifdef HAVE_DISABLE_HLT
-		enable_hlt();
-#endif
-	}
-	spin_unlock_irqrestore(&floppy_hlt_lock, flags);
-}
-
-
-static void setup_DMA(void)
-{
-	unsigned long f;
-
-#ifdef FLOPPY_SANITY_CHECK
-	if (raw_cmd->length == 0){
-		int i;
-
-		printk("zero dma transfer size:");
-		for (i=0; i < raw_cmd->cmd_count; i++)
-			printk("%x,", raw_cmd->cmd[i]);
-		printk("\n");
-		cont->done(0);
-		FDCS->reset = 1;
-		return;
-	}
-	if (((unsigned long) raw_cmd->kernel_data) % 512){
-		printk("non aligned address: %p\n", raw_cmd->kernel_data);
-		cont->done(0);
-		FDCS->reset=1;
-		return;
-	}
-#endif
-	f=claim_dma_lock();
-	fd_disable_dma();
-#ifdef fd_dma_setup
-	if (fd_dma_setup(raw_cmd->kernel_data, raw_cmd->length, 
-			(raw_cmd->flags & FD_RAW_READ)?
-			DMA_MODE_READ : DMA_MODE_WRITE,
-			FDCS->address) < 0) {
-		release_dma_lock(f);
-		cont->done(0);
-		FDCS->reset=1;
-		return;
-	}
-	release_dma_lock(f);
-#else	
-	fd_clear_dma_ff();
-	fd_cacheflush(raw_cmd->kernel_data, raw_cmd->length);
-	fd_set_dma_mode((raw_cmd->flags & FD_RAW_READ)?
-			DMA_MODE_READ : DMA_MODE_WRITE);
-	fd_set_dma_addr(raw_cmd->kernel_data);
-	fd_set_dma_count(raw_cmd->length);
-	virtual_dma_port = FDCS->address;
-	fd_enable_dma();
-	release_dma_lock(f);
-#endif
-	floppy_disable_hlt();
-}
-
-static void show_floppy(void);
-
-/* waits until the fdc becomes ready */
-
-#ifdef PC9800_DEBUG_FLOPPY
-#define READY_DELAY 10000000
-#else
-#define READY_DELAY 100000
-#endif
-
-static int wait_til_ready(void)
-{
-	int counter, status;
-	if (FDCS->reset)
-		return -1;
-	for (counter = 0; counter < READY_DELAY; counter++) {
-		status = fd_inb(FD98_STATUS);		
-		if (status & STATUS_READY)
-			return status;
-	}
-	if (!initialising) {
-		DPRINT("Getstatus times out (%x) on fdc %d\n",
-			status, fdc);
-		show_floppy();
-	}
-	FDCS->reset = 1;
-	return -1;
-}
-
-/* sends a command byte to the fdc */
-static int output_byte(char byte)
-{
-	int status;
-
-	if ((status = wait_til_ready()) < 0)
-		return -1;
-	if ((status & (STATUS_READY|STATUS_DIR|STATUS_DMA)) == STATUS_READY){
-		fd_outb(byte,FD98_DATA);
-#ifdef FLOPPY_SANITY_CHECK
-		output_log[output_log_pos].data = byte;
-		output_log[output_log_pos].status = status;
-		output_log[output_log_pos].jiffies = jiffies;
-		output_log_pos = (output_log_pos + 1) % OLOGSIZE;
-#endif
-		return 0;
-	}
-	FDCS->reset = 1;
-	if (!initialising) {
-		DPRINT("Unable to send byte %x to FDC. Fdc=%x Status=%x\n",
-		       byte, fdc, status);
-		show_floppy();
-	}
-	return -1;
-}
-#define LAST_OUT(x) if (output_byte(x)<0){ reset_fdc();return;}
-
-/* gets the response from the fdc */
-static int result(void)
-{
-	int i, status=0;
-
-	for(i=0; i < MAX_REPLIES; i++) {
-		if ((status = wait_til_ready()) < 0)
-			break;
-		status &= STATUS_DIR|STATUS_READY|STATUS_BUSY|STATUS_DMA;
-		if ((status & ~STATUS_BUSY) == STATUS_READY){
-#ifdef FLOPPY_SANITY_CHECK
-			resultjiffies = jiffies;
-			resultsize = i;
-#endif
-			return i;
-		}
-		if (status == (STATUS_DIR|STATUS_READY|STATUS_BUSY))
-			reply_buffer[i] = fd_inb(FD98_DATA);
-		else
-			break;
-	}
-	if (!initialising) {
-		DPRINT("get result error. Fdc=%d Last status=%x Read bytes=%d\n",
-		       fdc, status, i);
-		show_floppy();
-	}
-	FDCS->reset = 1;
-	return -1;
-}
-
-static int fifo_depth = 0xa;
-static int no_fifo;
-
-#define NOMINAL_DTR 500
-
-/* Issue a "SPECIFY" command to set the step rate time, head unload time,
- * head load time, and DMA disable flag to values needed by floppy.
- *
- * The value "dtr" is the data transfer rate in Kbps.  It is needed
- * to account for the data rate-based scaling done by the 82072 and 82077
- * FDC types.  This parameter is ignored for other types of FDCs (i.e.
- * 8272a).
- *
- * Note that changing the data transfer rate has a (probably deleterious)
- * effect on the parameters subject to scaling for 82072/82077 FDCs, so
- * fdc_specify is called again after each data transfer rate
- * change.
- *
- * srt: 1000 to 16000 in microseconds
- * hut: 16 to 240 milliseconds
- * hlt: 2 to 254 milliseconds
- *
- * These values are rounded up to the next highest available delay time.
- */
-static void fdc_specify(void)
-{
-	output_byte(FD_SPECIFY);
-	output_byte(FDCS->spec1 = 0xdf);
-	output_byte(FDCS->spec2 = 0x24);
-}
-
-static void tell_sector(void)
-{
-	printk(": track %d, head %d, sector %d, size %d",
-	       R_TRACK, R_HEAD, R_SECTOR, R_SIZECODE);
-} /* tell_sector */
-
-static int auto_detect_mode_pc9800(void)
-{
-#ifdef PC9800_DEBUG_FLOPPY
-	printk("auto_detect_mode_pc9800: retry_auto_detect=%d\n",
-		retry_auto_detect);
-#endif
-	if (retry_auto_detect > 4) {
-		retry_auto_detect = 0;	   
-		return 1;
-	}
-
-	switch ((int)(_floppy - floppy_type)) {
-		case 2:
-			_floppy = floppy_type + 4;
-			break;
-
-		case 4:
-		case 6:
-			_floppy = floppy_type + 7;
-			break;
-
-		case 7:
-		case 10:
-			_floppy = floppy_type + 2;
-			break;
-
-		default:
-			_floppy = floppy_type + 7;
-	}
-
-	retry_auto_detect++;
-	return 0;
-}
-
-static void access_mode_change_pc9800(void);
-
-/*
- * OK, this error interpreting routine is called after a
- * DMA read/write has succeeded
- * or failed, so we check the results, and copy any buffers.
- * hhb: Added better error reporting.
- * ak: Made this into a separate routine.
- */
-static int interpret_errors(void)
-{
-	char bad;
-
-	if (inr!=7) {
-		DPRINT("-- FDC reply error");
-		FDCS->reset = 1;
-		return 1;
-	}
-
-	/* check IC to find cause of interrupt */
-	switch (ST0 & ST0_INTR) {
-		case 0x40:	/* error occurred during command execution */
-			if (ST1 & ST1_EOC)
-				return 0; /* occurs with pseudo-DMA */
-			bad = 1;
-			if (ST1 & ST1_WP) {
-				DPRINT("Drive is write protected\n");
-				CLEARF(FD_DISK_WRITABLE);
-				cont->done(0);
-				bad = 2;
-			} else if (ST1 & ST1_ND) {
-				SETF(FD_NEED_TWADDLE);
-			} else if (ST1 & ST1_OR) {
-				if (DP->flags & FTD_MSG)
-					DPRINT("Over/Underrun - retrying\n");
-				bad = 0;
-			}else if (*errors >= DP->max_errors.reporting){
-				if (ST0 & ST0_ECE) {
-					printk("Recalibrate failed!");
-				} else if (ST2 & ST2_CRC) {
-					printk("data CRC error");
-					tell_sector();
-				} else if (ST1 & ST1_CRC) {
-					printk("CRC error");
-					tell_sector();
-				} else if ((ST1 & (ST1_MAM|ST1_ND)) || (ST2 & ST2_MAM)) {
-					if (auto_detect_mode) {
-						bad = (char)auto_detect_mode_pc9800();
-						access_mode_change_pc9800();
-					}
-
-					if (bad) {
-						printk("floppy error: MA: _floppy - floppy_type=%d\n", (int)(_floppy - floppy_type));
-						printk("bad=%d\n", (int)bad);
-						if (!probing) {
-							printk("sector not found");
-							tell_sector();
-						} else
-							printk("probe failed...");
-					}
-				} else if (ST2 & ST2_WC) {	/* seek error */
-					printk("wrong cylinder");
-				} else if (ST2 & ST2_BC) {	/* cylinder marked as bad */
-					printk("bad cylinder");
-				} else {
-					printk("unknown error. ST[0..2] are: 0x%x 0x%x 0x%x", ST0, ST1, ST2);
-					tell_sector();
-				}
-				printk("\n");
-
-			}
-			if (ST2 & ST2_WC || ST2 & ST2_BC)
-				/* wrong cylinder => recal */
-				DRS->track = NEED_2_RECAL;
-			return bad;
-		case 0x80: /* invalid command given */
-			DPRINT("Invalid FDC command given!\n");
-			cont->done(0);
-			return 2;
-		case 0xc0:
-			SETF(FD_DISK_CHANGED);
-			SETF(FD_DISK_WRITABLE);
-			DPRINT("Abnormal termination caused by polling\n");
-			cont->error();
-			return 2;
-		default: /* (0) Normal command termination */
-			auto_detect_mode = 0;
-			return 0;
-	}
-}
-
-/*
- * This routine is called when everything should be correctly set up
- * for the transfer (i.e. floppy motor is on, the correct floppy is
- * selected, and the head is sitting on the right track).
- */
-static void setup_rw_floppy(void)
-{
-	int i,r, flags,dflags;
-	unsigned long ready_date;
-	timeout_fn function;
-
-	access_mode_change_pc9800();
-	flags = raw_cmd->flags;
-	if (flags & (FD_RAW_READ | FD_RAW_WRITE))
-		flags |= FD_RAW_INTR;
-
-	if ((flags & FD_RAW_SPIN) && !(flags & FD_RAW_NO_MOTOR)){
-		ready_date = DRS->spinup_date + DP->spinup;
-		/* If spinup will take a long time, rerun scandrives
-		 * again just before spinup completion. Beware that
-		 * after scandrives, we must again wait for selection.
-		 */
-		if ((signed) (ready_date - jiffies) > DP->select_delay){
-			ready_date -= DP->select_delay;
-			function = (timeout_fn) floppy_start;
-		} else
-			function = (timeout_fn) setup_rw_floppy;
-
-		/* wait until the floppy is spinning fast enough */
-		if (fd_wait_for_completion(ready_date,function))
-			return;
-	}
-	dflags = DRS->flags;
-
-	if ((flags & FD_RAW_READ) || (flags & FD_RAW_WRITE))
-		setup_DMA();
-
-	if (flags & FD_RAW_INTR)
-		do_floppy = main_command_interrupt;
-
-	r=0;
-	for (i=0; i< raw_cmd->cmd_count; i++)
-		r|=output_byte(raw_cmd->cmd[i]);
-
-#ifdef DEBUGT
-	debugt("rw_command: ");
-#endif
-	if (r){
-		cont->error();
-		reset_fdc();
-		return;
-	}
-
-	if (!(flags & FD_RAW_INTR)){
-		inr = result();
-		cont->interrupt();
-	} else if (flags & FD_RAW_NEED_DISK)
-		fd_watchdog();
-}
-
-static int blind_seek;
-
-/*
- * This is the routine called after every seek (or recalibrate) interrupt
- * from the floppy controller.
- */
-static void seek_interrupt(void)
-{
-#ifdef DEBUGT
-	debugt("seek interrupt:");
-#endif
-	if (inr != 2 || (ST0 & 0xF8) != 0x20) {
-		DRS->track = NEED_2_RECAL;
-		cont->error();
-		cont->redo();
-		return;
-	}
-	if (DRS->track >= 0 && DRS->track != ST1 && !blind_seek){
-#ifdef DCL_DEBUG
-		if (DP->flags & FD_DEBUG){
-			DPRINT("clearing NEWCHANGE flag because of effective seek\n");
-			DPRINT("jiffies=%lu\n", jiffies);
-		}
-#endif
-		CLEARF(FD_DISK_NEWCHANGE); /* effective seek */
-		CLEARF(FD_DISK_CHANGED); /* effective seek */
-		DRS->select_date = jiffies;
-	}
-	DRS->track = ST1;
-	floppy_ready();
-}
-
-static void check_wp(void)
-{
-	if (TESTF(FD_VERIFY)) {
-		/* check write protection */
-		output_byte(FD_GETSTATUS);
-		output_byte(UNIT(current_drive));
-		if (result() != 1){
-			FDCS->reset = 1;
-			return;
-		}
-		CLEARF(FD_VERIFY);
-		CLEARF(FD_NEED_TWADDLE);
-#ifdef DCL_DEBUG
-		if (DP->flags & FD_DEBUG){
-			DPRINT("checking whether disk is write protected\n");
-			DPRINT("wp=%x\n",ST3 & 0x40);
-		}
-#endif
-		if (!(ST3  & 0x40))
-			SETF(FD_DISK_WRITABLE);
-		else
-			CLEARF(FD_DISK_WRITABLE);
-	}
-}
-
-static void seek_floppy(void)
-{
-	int track;
-
-	blind_seek=0;
-
-#ifdef DCL_DEBUG
-	if (DP->flags & FD_DEBUG){
-		DPRINT("calling disk change from seek\n");
-	}
-#endif
-
-	if (!TESTF(FD_DISK_NEWCHANGE) &&
-	    disk_change(current_drive) &&
-	    (raw_cmd->flags & FD_RAW_NEED_DISK)){
-		/* the media changed flag should be cleared after the seek.
-		 * If it isn't, this means that there is really no disk in
-		 * the drive.
-		 */
-		SETF(FD_DISK_CHANGED);
-		cont->done(0);
-		cont->redo();
-		return;
-	}
-	if (DRS->track <= NEED_1_RECAL){
-		recalibrate_floppy();
-		return;
-	} else if (TESTF(FD_DISK_NEWCHANGE) &&
-		   (raw_cmd->flags & FD_RAW_NEED_DISK) &&
-		   (DRS->track <= NO_TRACK || DRS->track == raw_cmd->track)) {
-		/* we seek to clear the media-changed condition. Does anybody
-		 * know a more elegant way, which works on all drives? */
-		if (raw_cmd->track)
-			track = raw_cmd->track - 1;
-		else {
-			if (DP->flags & FD_SILENT_DCL_CLEAR){
-				blind_seek = 1;
-				raw_cmd->flags |= FD_RAW_NEED_SEEK;
-			}
-			track = 1;
-		}
-	} else {
-		check_wp();
-		if (raw_cmd->track != DRS->track &&
-		    (raw_cmd->flags & FD_RAW_NEED_SEEK))
-			track = raw_cmd->track;
-		else {
-			setup_rw_floppy();
-			return;
-		}
-	}
-
-	do_floppy = seek_interrupt;
-	output_byte(FD_SEEK);
-	output_byte(UNIT(current_drive));
-	LAST_OUT(track);
-#ifdef DEBUGT
-	debugt("seek command:");
-#endif
-}
-
-static void recal_interrupt(void)
-{
-#ifdef DEBUGT
-	debugt("recal interrupt:");
-#endif
-	if (inr !=2)
-		FDCS->reset = 1;
-	else if (ST0 & ST0_ECE) {
-	       	switch(DRS->track){
-			case NEED_1_RECAL:
-#ifdef DEBUGT
-				debugt("recal interrupt need 1 recal:");
-#endif
-				/* after a second recalibrate, we still haven't
-				 * reached track 0. Probably no drive. Raise an
-				 * error, as failing immediately might upset
-				 * computers possessed by the Devil :-) */
-				cont->error();
-				cont->redo();
-				return;
-			case NEED_2_RECAL:
-#ifdef DEBUGT
-				debugt("recal interrupt need 2 recal:");
-#endif
-				/* If we already did a recalibrate,
-				 * and we are not at track 0, this
-				 * means we have moved. (The only way
-				 * not to move at recalibration is to
-				 * be already at track 0.) Clear the
-				 * new change flag */
-#ifdef DCL_DEBUG
-				if (DP->flags & FD_DEBUG){
-					DPRINT("clearing NEWCHANGE flag because of second recalibrate\n");
-				}
-#endif
-
-				CLEARF(FD_DISK_NEWCHANGE);
-				DRS->select_date = jiffies;
-				/* fall through */
-			default:
-#ifdef DEBUGT
-				debugt("recal interrupt default:");
-#endif
-				/* Recalibrate moves the head by at
-				 * most 80 steps. If after one
-				 * recalibrate we don't have reached
-				 * track 0, this might mean that we
-				 * started beyond track 80.  Try
-				 * again.  */
-				DRS->track = NEED_1_RECAL;
-				break;
-		}
-	} else
-		DRS->track = ST1;
-	floppy_ready();
-}
-
-static void print_result(char *message, int inr)
-{
-	int i;
-
-	DPRINT("%s ", message);
-	if (inr >= 0)
-		for (i=0; i<inr; i++)
-			printk("repl[%d]=%x ", i, reply_buffer[i]);
-	printk("\n");
-}
-
-/* interrupt handler. Note that this can be called externally on the Sparc */
-irqreturn_t floppy_interrupt(int irq, void *dev_id, struct pt_regs * regs)
-{
-	void (*handler)(void) = do_floppy;
-	int do_print;
-	unsigned long f;
-
-	lasthandler = handler;
-	interruptjiffies = jiffies;
-
-	f=claim_dma_lock();
-	fd_disable_dma();
-	release_dma_lock(f);
-
-	floppy_enable_hlt();
-	do_floppy = NULL;
-	if (fdc >= N_FDC || FDCS->address == -1){
-		/* we don't even know which FDC is the culprit */
-		printk("DOR0=%x\n", fdc_state[0].dor);
-		printk("floppy interrupt on bizarre fdc %d\n",fdc);
-		printk("handler=%p\n", handler);
-		is_alive("bizarre fdc");
-		return IRQ_NONE;
-	}
-
-	FDCS->reset = 0;
-	/* We have to clear the reset flag here, because apparently on boxes
-	 * with level triggered interrupts (PS/2, Sparc, ...), it is needed to
-	 * emit SENSEI's to clear the interrupt line. And FDCS->reset blocks the
-	 * emission of the SENSEI's.
-	 * It is OK to emit floppy commands because we are in an interrupt
-	 * handler here, and thus we have to fear no interference of other
-	 * activity.
-	 */
-
-	do_print = !handler && print_unex && !initialising;
-
-	inr = result();
-	if (inr && do_print)
-		print_result("unexpected interrupt", inr);
-	if (inr == 0){
-		do {
-			output_byte(FD_SENSEI);
-			inr = result();
-			if ((ST0 & ST0_INTR) == 0xC0) {
-				int drive = ST0 & ST0_DS;
-
-				/* Attention Interrupt. */
-				if (ST0 & ST0_NR) {
-#ifdef PC9800_DEBUG_FLOPPY
-					if (do_print)
-						printk(KERN_DEBUG
-							"floppy debug: floppy ejected (drive %d)\n",
-							drive);
-#endif
-					USETF(FD_DISK_CHANGED);
-					USETF(FD_VERIFY);
-				} else {
-#ifdef PC9800_DEBUG_FLOPPY
-					if (do_print)
-						printk(KERN_DEBUG
-							"floppy debug: floppy inserted (drive %d)\n",
-							drive);
-#endif
-				}
-			} /* Attention Interrupt */
-#ifdef PC9800_DEBUG_FLOPPY
-			else {
-				printk(KERN_DEBUG
-					"floppy debug : unknown interrupt\n");
-			}
-#endif
-		} while ((ST0 & 0x83) != UNIT(current_drive) && inr == 2);
-	}
-	if (handler) {
-		schedule_bh(handler);
-	} else {
-#if 0
-		FDCS->reset = 1;
-#endif
-	}
-	is_alive("normal interrupt end");
-
-	/* FIXME! Was it really for us? */
-	return IRQ_HANDLED;
-}
-
-static void recalibrate_floppy(void)
-{
-#ifdef DEBUGT
-	debugt("recalibrate floppy:");
-#endif
-	do_floppy = recal_interrupt;
-	output_byte(FD_RECALIBRATE);
-	LAST_OUT(UNIT(current_drive));
-}
-
-/*
- * Must do 4 FD_SENSEIs after reset because of ``drive polling''.
- */
-static void reset_interrupt(void)
-{
-#ifdef PC9800_DEBUG_FLOPPY
-	printk("floppy debug: reset interrupt\n");
-#endif
-#ifdef DEBUGT
-	debugt("reset interrupt:");
-#endif
-	result();		/* get the status ready for set_fdc */
-	if (FDCS->reset) {
-		printk("reset set in interrupt, calling %p\n", cont->error);
-		cont->error(); /* a reset just after a reset. BAD! */
-	}
-	cont->redo();
-}
-
-/*
- * reset is done by pulling bit 2 of DOR low for a while (old FDCs),
- * or by setting the self clearing bit 7 of STATUS (newer FDCs)
- */
-static void reset_fdc(void)
-{
-	unsigned long flags;
-
-#ifdef PC9800_DEBUG_FLOPPY
-	printk("floppy debug: reset_fdc\n");
-#endif
-
-	do_floppy = reset_interrupt;
-	FDCS->reset = 0;
-	reset_fdc_info(0);
-
-	/* Pseudo-DMA may intercept 'reset finished' interrupt.  */
-	/* Irrelevant for systems with true DMA (i386).          */
-
-	flags=claim_dma_lock();
-	fd_disable_dma();
-	release_dma_lock(flags);
-
-	fd_outb(FDCS->dor | 0x80, FD_MODE);
-	udelay(FD_RESET_DELAY);
-	fd_outb(FDCS->dor, FD_MODE);
-	udelay(FD_AFTER_RESET_DELAY);
-}
-
-static void show_floppy(void)
-{
-	int i;
-
-	printk("\n");
-	printk("floppy driver state\n");
-	printk("-------------------\n");
-	printk("now=%lu last interrupt=%lu diff=%lu last called handler=%p\n",
-	       jiffies, interruptjiffies, jiffies-interruptjiffies, lasthandler);
-
-
-#ifdef FLOPPY_SANITY_CHECK
-	printk("timeout_message=%s\n", timeout_message);
-	printk("last output bytes:\n");
-	for (i=0; i < OLOGSIZE; i++)
-		printk("%2x %2x %lu\n",
-		       output_log[(i+output_log_pos) % OLOGSIZE].data,
-		       output_log[(i+output_log_pos) % OLOGSIZE].status,
-		       output_log[(i+output_log_pos) % OLOGSIZE].jiffies);
-	printk("last result at %lu\n", resultjiffies);
-	printk("last redo_fd_request at %lu\n", lastredo);
-	for (i=0; i<resultsize; i++){
-		printk("%2x ", reply_buffer[i]);
-	}
-	printk("\n");
-#endif
-
-	printk("status=%x\n", fd_inb(FD98_STATUS));
-	printk("fdc_busy=%lu\n", fdc_busy);
-	if (do_floppy)
-		printk("do_floppy=%p\n", do_floppy);
-	if (floppy_work.pending)
-		printk("floppy_work.func=%p\n", floppy_work.func);
-	if (timer_pending(&fd_timer))
-		printk("fd_timer.function=%p\n", fd_timer.function);
-	if (timer_pending(&fd_timeout)){
-		printk("timer_function=%p\n",fd_timeout.function);
-		printk("expires=%lu\n",fd_timeout.expires-jiffies);
-		printk("now=%lu\n",jiffies);
-	}
-	printk("cont=%p\n", cont);
-	printk("current_req=%p\n", current_req);
-	printk("command_status=%d\n", command_status);
-	printk("\n");
-}
-
-static void floppy_shutdown(unsigned long data)
-{
-	unsigned long flags;
-	
-	if (!initialising)
-		show_floppy();
-	cancel_activity();
-
-	floppy_enable_hlt();
-	
-	flags=claim_dma_lock();
-	fd_disable_dma();
-	release_dma_lock(flags);
-	
-	/* avoid dma going to a random drive after shutdown */
-
-	if (!initialising)
-		DPRINT("floppy timeout called\n");
-	FDCS->reset = 1;
-	if (cont){
-		cont->done(0);
-		cont->redo(); /* this will recall reset when needed */
-	} else {
-		printk("no cont in shutdown!\n");
-		process_fd_request();
-	}
-	is_alive("floppy shutdown");
-}
-/*typedef void (*timeout_fn)(unsigned long);*/
-
-static void access_mode_change_pc9800(void)
-{
-	static int access_mode, mode_change_now, old_mode, new_set = 1;
-#ifdef PC9800_DEBUG_FLOPPY2
-	printk("enter access_mode_change\n");
-#endif
-	access_mode = mode_change_now = 0;
-	if (DP->cmos==4) {
-		switch ((int)(_floppy - &floppy_type[0])) {
-		case 1:
-		case 2:
-			new_set = 1;
-			access_mode = 2;
-			break;
-
-		case 4:
-		case 6:
-			new_set = 1;
-			access_mode = 3;
-			break;
-
-		case 7:
-		case 10:
-			new_set = 1;
-			access_mode = 1;
-			break;
-
-		default:
-			access_mode = 1;
-			break;
-		}
-
-		old_mode = fd_inb(FD_MODE_CHANGE) & 3;
-
-		switch (access_mode) {
-		case 1:
-			if ((old_mode & 2) == 0) {
-				fd_outb(old_mode | 2, FD_MODE_CHANGE);
-				mode_change_now = 1;
-			} else {
-				fd_outb(current_drive << 5, FD_EMODE_CHANGE);
-				if (fd_inb(FD_EMODE_CHANGE) == 0xff)
-					return;
-			}
-
-			fd_outb((current_drive << 5) | 0x11, FD_EMODE_CHANGE);
-			mode_change_now = 1;
-			break;
-
-		case 2:
-			if ((old_mode & 2) == 0) {
-				fd_outb(old_mode | 2, FD_MODE_CHANGE);
-				mode_change_now = 1;
-			} else {
-				fd_outb(current_drive << 5, FD_EMODE_CHANGE);
-				if ((fd_inb(FD_EMODE_CHANGE) & 1) == 0)
-					return;
-				fd_outb((current_drive << 5) | 0x10, FD_EMODE_CHANGE);
-				mode_change_now = 1;
-			}
-
-			break;
-
-		case 3:
-			if ((old_mode & 2) == 0)
-				return;
-			fd_outb(current_drive << 5, FD_EMODE_CHANGE);
-			if (fd_inb(FD_EMODE_CHANGE) & 1)
-				fd_outb((current_drive << 5) | 0x10, FD_EMODE_CHANGE);
-			fd_outb(old_mode & 0xfd, FD_MODE_CHANGE);
-			mode_change_now = 1;
-			break;
-
-		default:
-			break;
-		}
-	} else {
-		switch ((int)(_floppy - &floppy_type[0])) {
-		case 1:
-		case 2:
-			new_set = 1;
-			access_mode = 2;
-			break;
-
-		case 4:
-		case 6:
-			new_set = 1;
-			access_mode = 3;
-			break;
-
-		default:
-			switch (DP->cmos) {
-			case 2:
-				access_mode = 2;
-				break;
-
-			case 3:
-				access_mode = 3;
-				break;
-
-			default:
-				break;
-			}
-
-			break;
-		}
-
-		old_mode = fd_inb(FD_MODE_CHANGE) & 3;
-
-		switch (access_mode) {
-		case 2:
-			if ((old_mode & 2) == 0) {
-				fd_outb(old_mode | 2, FD_MODE_CHANGE);
-				mode_change_now = 1;
-			}
-
-			break;
-
-		case 3:
-			if (old_mode & 2) {
-				fd_outb(old_mode & 0xfd, FD_MODE_CHANGE);
-				mode_change_now = 1;
-			}
-
-			break;
-
-		default:
-			break;
-		}
-	}
-#ifdef PC9800_DEBUG_FLOPPY2
-	printk("floppy debug: DP->cmos=%d\n", DP->cmos);
-	printk("floppy debug: mode_change_now=%d\n", mode_change_now);
-	printk("floppy debug: access_mode=%d\n", access_mode);
-	printk("floppy debug: old_mode=%d\n", old_mode);
-	printk("floppy debug: _floppy - &floppy_type[0]=%d\n", (int)(_floppy - &floppy_type[0]));
-#endif /* PC9800_DEBUG_FLOPPY2 */
-	if(mode_change_now)
-		reset_fdc();
-}
-
-/* start motor, check media-changed condition and write protection */
-static int start_motor(void (*function)(void) )
-{
-	access_mode_change_pc9800();
-	set_mode(~0, 0x8);
-
-	/* wait_for_completion also schedules reset if needed. */
-	return(fd_wait_for_completion(DRS->select_date+DP->select_delay,
-				   (timeout_fn) function));
-}
-
-static void floppy_ready(void)
-{
-	CHECK_RESET;
-	if (start_motor(floppy_ready)) return;
-
-#ifdef DCL_DEBUG
-	if (DP->flags & FD_DEBUG){
-		DPRINT("calling disk change from floppy_ready\n");
-	}
-#endif
-	if (!(raw_cmd->flags & FD_RAW_NO_MOTOR) &&
-	   disk_change(current_drive) &&
-	   !DP->select_delay)
-		twaddle(); /* this clears the dcl on certain drive/controller
-			    * combinations */
-
-#ifdef fd_chose_dma_mode
-	if ((raw_cmd->flags & FD_RAW_READ) || 
-	    (raw_cmd->flags & FD_RAW_WRITE))
-	{
-		unsigned long flags = claim_dma_lock();
-		fd_chose_dma_mode(raw_cmd->kernel_data,
-				  raw_cmd->length);
-		release_dma_lock(flags);
-	}
-#endif
-
-#if 0
-	access_mode_change_pc9800();
-#endif
-	if (raw_cmd->flags & (FD_RAW_NEED_SEEK | FD_RAW_NEED_DISK)){
-		fdc_specify(); /* must be done here because of hut, hlt ... */
-		seek_floppy();
-	} else {
-		if ((raw_cmd->flags & FD_RAW_READ) || 
-		    (raw_cmd->flags & FD_RAW_WRITE))
-			fdc_specify();
-		setup_rw_floppy();
-	}
-}
-
-static void floppy_start(void)
-{
-	reschedule_timeout(current_reqD, "floppy start", 0);
-
-	scandrives();
-#ifdef DCL_DEBUG
-	if (DP->flags & FD_DEBUG){
-		DPRINT("setting NEWCHANGE in floppy_start\n");
-	}
-#endif
-	SETF(FD_DISK_NEWCHANGE);
-	floppy_ready();
-}
-
-/*
- * ========================================================================
- * here ends the bottom half. Exported routines are:
- * floppy_start, floppy_off, floppy_ready, lock_fdc, unlock_fdc, set_fdc,
- * start_motor, reset_fdc, reset_fdc_info, interpret_errors.
- * Initialization also uses output_byte, result, set_dor, floppy_interrupt
- * and set_dor.
- * ========================================================================
- */
-/*
- * General purpose continuations.
- * ==============================
- */
-
-static void do_wakeup(void)
-{
-	reschedule_timeout(MAXTIMEOUT, "do wakeup", 0);
-	cont = 0;
-	command_status += 2;
-	wake_up(&command_done);
-}
-
-static struct cont_t wakeup_cont={
-	empty,
-	do_wakeup,
-	empty,
-	(done_f)empty
-};
-
-
-static struct cont_t intr_cont={
-	empty,
-	process_fd_request,
-	empty,
-	(done_f) empty
-};
-
-static int wait_til_done(void (*handler)(void), int interruptible)
-{
-	int ret;
-
-	schedule_bh((void *)(void *)handler);
-
-	if (command_status < 2 && NO_SIGNAL) {
-		DECLARE_WAITQUEUE(wait, current);
-
-		add_wait_queue(&command_done, &wait);
-		for (;;) {
-			set_current_state(interruptible?
-					  TASK_INTERRUPTIBLE:
-					  TASK_UNINTERRUPTIBLE);
-
-			if (command_status >= 2 || !NO_SIGNAL)
-				break;
-
-			is_alive("wait_til_done");
-
-			schedule();
-		}
-
-		set_current_state(TASK_RUNNING);
-		remove_wait_queue(&command_done, &wait);
-	}
-
-	if (command_status < 2){
-		cancel_activity();
-		cont = &intr_cont;
-		reset_fdc();
-		return -EINTR;
-	}
-
-#ifdef PC9800_DEBUG_FLOPPY
-	if (command_status != FD_COMMAND_OKAY)
-		printk("floppy check: wait_til_done out:%d\n", command_status);
-#endif
-	if (FDCS->reset)
-		command_status = FD_COMMAND_ERROR;
-	if (command_status == FD_COMMAND_OKAY)
-		ret=0;
-	else
-		ret=-EIO;
-	command_status = FD_COMMAND_NONE;
-	return ret;
-}
-
-static void generic_done(int result)
-{
-	command_status = result;
-	cont = &wakeup_cont;
-}
-
-static void generic_success(void)
-{
-	cont->done(1);
-}
-
-static void generic_failure(void)
-{
-	cont->done(0);
-}
-
-static void success_and_wakeup(void)
-{
-	generic_success();
-	cont->redo();
-}
-
-
-/*
- * formatting and rw support.
- * ==========================
- */
-
-static int next_valid_format(void)
-{
-	int probed_format;
-
-	probed_format = DRS->probed_format;
-	while(1){
-		if (probed_format >= 8 ||
-		     !DP->autodetect[probed_format]){
-			DRS->probed_format = 0;
-			return 1;
-		}
-		if (floppy_type[DP->autodetect[probed_format]].sect){
-			DRS->probed_format = probed_format;
-			return 0;
-		}
-		probed_format++;
-	}
-}
-
-static void bad_flp_intr(void)
-{
-	if (probing){
-		DRS->probed_format++;
-		if (!next_valid_format())
-			return;
-	}
-	(*errors)++;
-	INFBOUND(DRWE->badness, *errors);
-	if (*errors > DP->max_errors.abort)
-		cont->done(0);
-	if (*errors > DP->max_errors.reset)
-		FDCS->reset = 1;
-	else if (*errors > DP->max_errors.recal)
-		DRS->track = NEED_2_RECAL;
-}
-
-static void set_floppy(int drive)
-{
-	int type = ITYPE(UDRS->fd_device);
-	if (type) {
-		auto_detect_mode = 0;
-		_floppy = floppy_type + type;
-	} else if (auto_detect_mode == 0) {
-		auto_detect_mode = 1;
-		retry_auto_detect = 0;
-		_floppy = current_type[drive];
-	}
-#ifdef PC9800_DEBUG_FLOPPY2
-	printk("set_floppy: set floppy type=%d\n", (int)(_floppy - floppy_type));
-#endif
-}
-
-/*
- * formatting support.
- * ===================
- */
-static void format_interrupt(void)
-{
-	switch (interpret_errors()){
-		case 1:
-			cont->error();
-		case 2:
-			break;
-		case 0:
-			cont->done(1);
-	}
-	cont->redo();
-}
-
-#define CODE2SIZE (ssize = ((1 << SIZECODE) + 3) >> 2)
-#define FM_MODE(x,y) ((y) & ~(((x)->rate & 0x80) >>1))
-#define CT(x) ((x) | 0xc0)
-static void setup_format_params(int track)
-{
-	struct fparm {
-		unsigned char track,head,sect,size;
-	} *here = (struct fparm *)floppy_track_buffer;
-	int il,n;
-	int count,head_shift,track_shift;
-
-	raw_cmd = &default_raw_cmd;
-	raw_cmd->track = track;
-
-	raw_cmd->flags = FD_RAW_WRITE | FD_RAW_INTR | FD_RAW_SPIN |
-		FD_RAW_NEED_DISK | FD_RAW_NEED_SEEK;
-	raw_cmd->rate = _floppy->rate & 0x43;
-	raw_cmd->cmd_count = NR_F;
-	COMMAND = FM_MODE(_floppy,FD_FORMAT);
-	DR_SELECT = UNIT(current_drive) + PH_HEAD(_floppy,format_req.head);
-	F_SIZECODE = FD_SIZECODE(_floppy);
-	F_SECT_PER_TRACK = _floppy->sect << 2 >> F_SIZECODE;
-	F_GAP = _floppy->fmt_gap;
-	F_FILL = FD_FILL_BYTE;
-
-	raw_cmd->kernel_data = floppy_track_buffer;
-	raw_cmd->length = 4 * F_SECT_PER_TRACK;
-
-	/* allow for about 30ms for data transport per track */
-	head_shift  = (F_SECT_PER_TRACK + 5) / 6;
-
-	/* a ``cylinder'' is two tracks plus a little stepping time */
-	track_shift = 2 * head_shift + 3;
-
-	/* position of logical sector 1 on this track */
-	n = (track_shift * format_req.track + head_shift * format_req.head)
-		% F_SECT_PER_TRACK;
-
-	/* determine interleave */
-	il = 1;
-	if (_floppy->fmt_gap < 0x22)
-		il++;
-
-	/* initialize field */
-	for (count = 0; count < F_SECT_PER_TRACK; ++count) {
-		here[count].track = format_req.track;
-		here[count].head = format_req.head;
-		here[count].sect = 0;
-		here[count].size = F_SIZECODE;
-	}
-	/* place logical sectors */
-	for (count = 1; count <= F_SECT_PER_TRACK; ++count) {
-		here[n].sect = count;
-		n = (n+il) % F_SECT_PER_TRACK;
-		if (here[n].sect) { /* sector busy, find next free sector */
-			++n;
-			if (n>= F_SECT_PER_TRACK) {
-				n-=F_SECT_PER_TRACK;
-				while (here[n].sect) ++n;
-			}
-		}
-	}
-}
-
-static void redo_format(void)
-{
-	buffer_track = -1;
-	setup_format_params(format_req.track << STRETCH(_floppy));
-	floppy_start();
-#ifdef DEBUGT
-	debugt("queue format request");
-#endif
-}
-
-static struct cont_t format_cont={
-	format_interrupt,
-	redo_format,
-	bad_flp_intr,
-	generic_done };
-
-static int do_format(int drive, struct format_descr *tmp_format_req)
-{
-	int ret;
-
-	LOCK_FDC(drive,1);
-	set_floppy(drive);
-	if (!_floppy ||
-	    _floppy->track > DP->tracks ||
-	    tmp_format_req->track >= _floppy->track ||
-	    tmp_format_req->head >= _floppy->head ||
-	    (_floppy->sect << 2) % (1 <<  FD_SIZECODE(_floppy)) ||
-	    !_floppy->fmt_gap) {
-		process_fd_request();
-		return -EINVAL;
-	}
-	format_req = *tmp_format_req;
-	format_errors = 0;
-	cont = &format_cont;
-	errors = &format_errors;
-	IWAIT(redo_format);
-	process_fd_request();
-	return ret;
-}
-
-/*
- * Buffer read/write and support
- * =============================
- */
-
-static void floppy_end_request(struct request *req, int uptodate)
-{
-	if (end_that_request_first(req, uptodate, current_count_sectors))
-		return;
-	add_disk_randomness(req->rq_disk);
-	floppy_off((long)req->rq_disk->private_data);
-	blkdev_dequeue_request(req);
-	end_that_request_last(req);
-
-	/* We're done with the request */
-	current_req = NULL;
-}
-
-
-/* new request_done. Can handle physical sectors which are smaller than a
- * logical buffer */
-static void request_done(int uptodate)
-{
-	struct request_queue *q = floppy_queue;
-	struct request *req = current_req;
-	unsigned long flags;
-	int block;
-
-	probing = 0;
-	reschedule_timeout(MAXTIMEOUT, "request done %d", uptodate);
-
-	if (!req) {
-		printk("floppy.c: no request in request_done\n");
-		return;
-	}
-
-	if (uptodate){
-		/* maintain values for invalidation on geometry
-		 * change */
-		block = current_count_sectors + req->sector;
-		INFBOUND(DRS->maxblock, block);
-		if (block > _floppy->sect)
-			DRS->maxtrack = 1;
-
-		/* unlock chained buffers */
-		spin_lock_irqsave(q->queue_lock, flags);
-		floppy_end_request(req, 1);
-		spin_unlock_irqrestore(q->queue_lock, flags);
-	} else {
-		if (rq_data_dir(req) == WRITE) {
-			/* record write error information */
-			DRWE->write_errors++;
-			if (DRWE->write_errors == 1) {
-				DRWE->first_error_sector = req->sector;
-				DRWE->first_error_generation = DRS->generation;
-			}
-			DRWE->last_error_sector = req->sector;
-			DRWE->last_error_generation = DRS->generation;
-		}
-		spin_lock_irqsave(q->queue_lock, flags);
-		floppy_end_request(req, 0);
-		spin_unlock_irqrestore(q->queue_lock, flags);
-	}
-}
-
-/* Interrupt handler evaluating the result of the r/w operation */
-static void rw_interrupt(void)
-{
-	int nr_sectors, ssize, eoc, heads;
-
-	if (R_HEAD >= 2) {
-	    /* some Toshiba floppy controllers occasionnally seem to
-	     * return bogus interrupts after read/write operations, which
-	     * can be recognized by a bad head number (>= 2) */
-	     return;
-	}  
-
-	if (!DRS->first_read_date)
-		DRS->first_read_date = jiffies;
-
-	nr_sectors = 0;
-	CODE2SIZE;
-
-	if (ST1 & ST1_EOC)
-		eoc = 1;
-	else
-		eoc = 0;
-
-	if (COMMAND & 0x80)
-		heads = 2;
-	else
-		heads = 1;
-
-	nr_sectors = (((R_TRACK-TRACK) * heads +
-				   R_HEAD-HEAD) * SECT_PER_TRACK +
-				   R_SECTOR-SECTOR + eoc) << SIZECODE >> 2;
-
-#ifdef FLOPPY_SANITY_CHECK
-	if (nr_sectors / ssize > 
-		(in_sector_offset + current_count_sectors + ssize - 1) / ssize) {
-		DPRINT("long rw: %x instead of %lx\n",
-			nr_sectors, current_count_sectors);
-		printk("rs=%d s=%d\n", R_SECTOR, SECTOR);
-		printk("rh=%d h=%d\n", R_HEAD, HEAD);
-		printk("rt=%d t=%d\n", R_TRACK, TRACK);
-		printk("heads=%d eoc=%d\n", heads, eoc);
-		printk("spt=%d st=%d ss=%d\n", SECT_PER_TRACK,
-		       fsector_t, ssize);
-		printk("in_sector_offset=%d\n", in_sector_offset);
-	}
-#endif
-
-	nr_sectors -= in_sector_offset;
-	INFBOUND(nr_sectors,0);
-	SUPBOUND(current_count_sectors, nr_sectors);
-
-	switch (interpret_errors()){
-		case 2:
-			cont->redo();
-			return;
-		case 1:
-			if (!current_count_sectors){
-				cont->error();
-				cont->redo();
-				return;
-			}
-			break;
-		case 0:
-			if (!current_count_sectors){
-				cont->redo();
-				return;
-			}
-			current_type[current_drive] = _floppy;
-			floppy_sizes[TOMINOR(current_drive) ]= _floppy->size;
-			break;
-	}
-
-	if (probing) {
-		if (DP->flags & FTD_MSG)
-			DPRINT("Auto-detected floppy type %s in fd%d\n",
-				_floppy->name,current_drive);
-		current_type[current_drive] = _floppy;
-		floppy_sizes[TOMINOR(current_drive)] = _floppy->size;
-		probing = 0;
-	}
-
-	if (CT(COMMAND) != FD_READ || 
-	     raw_cmd->kernel_data == current_req->buffer){
-		/* transfer directly from buffer */
-		cont->done(1);
-	} else if (CT(COMMAND) == FD_READ){
-		buffer_track = raw_cmd->track;
-		buffer_drive = current_drive;
-		INFBOUND(buffer_max, nr_sectors + fsector_t);
-	}
-	cont->redo();
-}
-
-/* Compute maximal contiguous buffer size. */
-static int buffer_chain_size(void)
-{
-	struct bio *bio;
-	struct bio_vec *bv;
-	int size, i;
-	char *base;
-
-	base = bio_data(current_req->bio);
-	size = 0;
-
-	rq_for_each_bio(bio, current_req) {
-		bio_for_each_segment(bv, bio, i) {
-			if (page_address(bv->bv_page) + bv->bv_offset != base + size)
-				break;
-
-			size += bv->bv_len;
-		}
-	}
-
-	return size >> 9;
-}
-
-/* Compute the maximal transfer size */
-static int transfer_size(int ssize, int max_sector, int max_size)
-{
-	SUPBOUND(max_sector, fsector_t + max_size);
-
-	/* alignment */
-	max_sector -= (max_sector % _floppy->sect) % ssize;
-
-	/* transfer size, beginning not aligned */
-	current_count_sectors = max_sector - fsector_t ;
-
-	return max_sector;
-}
-
-/*
- * Move data from/to the track buffer to/from the buffer cache.
- */
-static void copy_buffer(int ssize, int max_sector, int max_sector_2)
-{
-	int remaining; /* number of transferred 512-byte sectors */
-	struct bio_vec *bv;
-	struct bio *bio;
-	char *buffer, *dma_buffer;
-	int size, i;
-
-	max_sector = transfer_size(ssize,
-				   minimum(max_sector, max_sector_2),
-				   current_req->nr_sectors);
-
-	if (current_count_sectors <= 0 && CT(COMMAND) == FD_WRITE &&
-	    buffer_max > fsector_t + current_req->nr_sectors)
-		current_count_sectors = minimum(buffer_max - fsector_t,
-						current_req->nr_sectors);
-
-	remaining = current_count_sectors << 9;
-#ifdef FLOPPY_SANITY_CHECK
-	if ((remaining >> 9) > current_req->nr_sectors  &&
-	    CT(COMMAND) == FD_WRITE){
-		DPRINT("in copy buffer\n");
-		printk("current_count_sectors=%ld\n", current_count_sectors);
-		printk("remaining=%d\n", remaining >> 9);
-		printk("current_req->nr_sectors=%ld\n",current_req->nr_sectors);
-		printk("current_req->current_nr_sectors=%u\n",
-		       current_req->current_nr_sectors);
-		printk("max_sector=%d\n", max_sector);
-		printk("ssize=%d\n", ssize);
-	}
-#endif
-
-	buffer_max = maximum(max_sector, buffer_max);
-
-	dma_buffer = floppy_track_buffer + ((fsector_t - buffer_min) << 9);
-
-	size = current_req->current_nr_sectors << 9;
-
-	rq_for_each_bio(bio, current_req) {
-		bio_for_each_segment(bv, bio, i) {
-			if (!remaining)
-				break;
-
-			size = bv->bv_len;
-			SUPBOUND(size, remaining);
-
-			buffer = page_address(bv->bv_page) + bv->bv_offset;
-#ifdef FLOPPY_SANITY_CHECK
-		if (dma_buffer + size >
-		    floppy_track_buffer + (max_buffer_sectors << 10) ||
-		    dma_buffer < floppy_track_buffer){
-			DPRINT("buffer overrun in copy buffer %d\n",
-				(int) ((floppy_track_buffer - dma_buffer) >>9));
-			printk("fsector_t=%d buffer_min=%d\n",
-			       fsector_t, buffer_min);
-			printk("current_count_sectors=%ld\n",
-			       current_count_sectors);
-			if (CT(COMMAND) == FD_READ)
-				printk("read\n");
-			if (CT(COMMAND) == FD_WRITE)
-				printk("write\n");
-			break;
-		}
-		if (((unsigned long)buffer) % 512)
-			DPRINT("%p buffer not aligned\n", buffer);
-#endif
-			if (CT(COMMAND) == FD_READ)
-				memcpy(buffer, dma_buffer, size);
-			else
-				memcpy(dma_buffer, buffer, size);
-
-			remaining -= size;
-			dma_buffer += size;
-		}
-	}
-#ifdef FLOPPY_SANITY_CHECK
-	if (remaining){
-		if (remaining > 0)
-			max_sector -= remaining >> 9;
-		DPRINT("weirdness: remaining %d\n", remaining>>9);
-	}
-#endif
-}
-
-#if 0
-static inline int check_dma_crossing(char *start, 
-				     unsigned long length, char *message)
-{
-	if (CROSS_64KB(start, length)) {
-		printk("DMA xfer crosses 64KB boundary in %s %p-%p\n", 
-		       message, start, start+length);
-		return 1;
-	} else
-		return 0;
-}
-#endif
-
-/* work around a bug in pseudo DMA
- * (on some FDCs) pseudo DMA does not stop when the CPU stops
- * sending data.  Hence we need a different way to signal the
- * transfer length:  We use SECT_PER_TRACK.  Unfortunately, this
- * does not work with MT, hence we can only transfer one head at
- * a time
- */
-static void virtualdmabug_workaround(void)
-{
-	int hard_sectors, end_sector;
-
-	if(CT(COMMAND) == FD_WRITE) {
-		COMMAND &= ~0x80; /* switch off multiple track mode */
-
-		hard_sectors = raw_cmd->length >> (7 + SIZECODE);
-		end_sector = SECTOR + hard_sectors - 1;
-#ifdef FLOPPY_SANITY_CHECK
-		if(end_sector > SECT_PER_TRACK) {
-			printk("too many sectors %d > %d\n",
-			       end_sector, SECT_PER_TRACK);
-			return;
-		}
-#endif
-		SECT_PER_TRACK = end_sector; /* make sure SECT_PER_TRACK points
-					      * to end of transfer */
-	}
-}
-
-/*
- * Formulate a read/write request.
- * this routine decides where to load the data (directly to buffer, or to
- * tmp floppy area), how much data to load (the size of the buffer, the whole
- * track, or a single sector)
- * All floppy_track_buffer handling goes in here. If we ever add track buffer
- * allocation on the fly, it should be done here. No other part should need
- * modification.
- */
-
-static int make_raw_rw_request(void)
-{
-	int aligned_sector_t;
-	int max_sector, max_size, tracksize, ssize;
-
-	if(max_buffer_sectors == 0) {
-		printk("VFS: Block I/O scheduled on unopened device\n");
-		return 0;
-	}
-
-	set_fdc((long)current_req->rq_disk->private_data);
-
-	raw_cmd = &default_raw_cmd;
-	raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_DISK | FD_RAW_NEED_DISK |
-		FD_RAW_NEED_SEEK;
-	raw_cmd->cmd_count = NR_RW;
-	if (rq_data_dir(current_req) == READ) {
-		raw_cmd->flags |= FD_RAW_READ;
-		COMMAND = FM_MODE(_floppy,FD_READ);
-	} else if (rq_data_dir(current_req) == WRITE){
-		raw_cmd->flags |= FD_RAW_WRITE;
-		COMMAND = FM_MODE(_floppy,FD_WRITE);
-	} else {
-		DPRINT("make_raw_rw_request: unknown command\n");
-		return 0;
-	}
-
-	max_sector = _floppy->sect * _floppy->head;
-
-	TRACK = (int)current_req->sector / max_sector;
-	fsector_t = (int)current_req->sector % max_sector;
-	if (_floppy->track && TRACK >= _floppy->track) {
-		if (current_req->current_nr_sectors & 1) {
-			current_count_sectors = 1;
-			return 1;
-		} else
-			return 0;
-	}
-	HEAD = fsector_t / _floppy->sect;
-
-	if (((_floppy->stretch & FD_SWAPSIDES) || TESTF(FD_NEED_TWADDLE)) &&
-	    fsector_t < _floppy->sect)
-		max_sector = _floppy->sect;
-
-	/* 2M disks have phantom sectors on the first track */
-	if ((_floppy->rate & FD_2M) && (!TRACK) && (!HEAD)){
-		max_sector = 2 * _floppy->sect / 3;
-		if (fsector_t >= max_sector){
-			current_count_sectors = minimum(_floppy->sect - fsector_t,
-							current_req->nr_sectors);
-			return 1;
-		}
-		SIZECODE = 2;
-	} else
-		SIZECODE = FD_SIZECODE(_floppy);
-	raw_cmd->rate = _floppy->rate & 0x43;
-	if ((_floppy->rate & FD_2M) &&
-	    (TRACK || HEAD) &&
-	    raw_cmd->rate == 2)
-		raw_cmd->rate = 1;
-
-	if (SIZECODE)
-		SIZECODE2 = 0xff;
-	else
-		SIZECODE2 = 0x80;
-	raw_cmd->track = TRACK << STRETCH(_floppy);
-	DR_SELECT = UNIT(current_drive) + PH_HEAD(_floppy,HEAD);
-	GAP = _floppy->gap;
-	CODE2SIZE;
-	SECT_PER_TRACK = _floppy->sect << 2 >> SIZECODE;
-	SECTOR = ((fsector_t % _floppy->sect) << 2 >> SIZECODE) + 1;
-
-	/* tracksize describes the size which can be filled up with sectors
-	 * of size ssize.
-	 */
-	tracksize = _floppy->sect - _floppy->sect % ssize;
-	if (tracksize < _floppy->sect){
-		SECT_PER_TRACK ++;
-		if (tracksize <= fsector_t % _floppy->sect)
-			SECTOR--;
-
-		/* if we are beyond tracksize, fill up using smaller sectors */
-		while (tracksize <= fsector_t % _floppy->sect){
-			while(tracksize + ssize > _floppy->sect){
-				SIZECODE--;
-				ssize >>= 1;
-			}
-			SECTOR++; SECT_PER_TRACK ++;
-			tracksize += ssize;
-		}
-		max_sector = HEAD * _floppy->sect + tracksize;
-	} else if (!TRACK && !HEAD && !(_floppy->rate & FD_2M) && probing) {
-		max_sector = _floppy->sect;
-	} else if (!HEAD && CT(COMMAND) == FD_WRITE) {
-		/* for virtual DMA bug workaround */
-		max_sector = _floppy->sect;
-	}
-
-	in_sector_offset = (fsector_t % _floppy->sect) % ssize;
-	aligned_sector_t = fsector_t - in_sector_offset;
-	max_size = current_req->nr_sectors;
-	if ((raw_cmd->track == buffer_track) && 
-	    (current_drive == buffer_drive) &&
-	    (fsector_t >= buffer_min) && (fsector_t < buffer_max)) {
-		/* data already in track buffer */
-		if (CT(COMMAND) == FD_READ) {
-			copy_buffer(1, max_sector, buffer_max);
-			return 1;
-		}
-	} else if (in_sector_offset || current_req->nr_sectors < ssize){
-		if (CT(COMMAND) == FD_WRITE){
-			if (fsector_t + current_req->nr_sectors > ssize &&
-			    fsector_t + current_req->nr_sectors < ssize + ssize)
-				max_size = ssize + ssize;
-			else
-				max_size = ssize;
-		}
-		raw_cmd->flags &= ~FD_RAW_WRITE;
-		raw_cmd->flags |= FD_RAW_READ;
-		COMMAND = FM_MODE(_floppy,FD_READ);
-	} else if ((unsigned long)current_req->buffer < MAX_DMA_ADDRESS) {
-		unsigned long dma_limit;
-		int direct, indirect;
-
-		indirect= transfer_size(ssize,max_sector,max_buffer_sectors*2) -
-			fsector_t;
-
-		/*
-		 * Do NOT use minimum() here---MAX_DMA_ADDRESS is 64 bits wide
-		 * on a 64 bit machine!
-		 */
-		max_size = buffer_chain_size();
-		dma_limit = (MAX_DMA_ADDRESS - ((unsigned long) current_req->buffer)) >> 9;
-		if ((unsigned long) max_size > dma_limit) {
-			max_size = dma_limit;
-		}
-		/* 64 kb boundaries */
-		if (CROSS_64KB(current_req->buffer, max_size << 9))
-			max_size = (K_64 - 
-				    ((unsigned long)current_req->buffer) % K_64)>>9;
-		direct = transfer_size(ssize,max_sector,max_size) - fsector_t;
-		/*
-		 * We try to read tracks, but if we get too many errors, we
-		 * go back to reading just one sector at a time.
-		 *
-		 * This means we should be able to read a sector even if there
-		 * are other bad sectors on this track.
-		 */
-		if (!direct ||
-		    (indirect * 2 > direct * 3 &&
-		     *errors < DP->max_errors.read_track &&
-		     /*!TESTF(FD_NEED_TWADDLE) &&*/
-		     ((!probing || (DP->read_track&(1<<DRS->probed_format)))))){
-			max_size = current_req->nr_sectors;
-		} else {
-			raw_cmd->kernel_data = current_req->buffer;
-			raw_cmd->length = current_count_sectors << 9;
-			if (raw_cmd->length == 0){
-				DPRINT("zero dma transfer attempted from make_raw_request\n");
-				DPRINT("indirect=%d direct=%d fsector_t=%d",
-					indirect, direct, fsector_t);
-				return 0;
-			}
-/*			check_dma_crossing(raw_cmd->kernel_data, 
-					   raw_cmd->length, 
-					   "end of make_raw_request [1]");*/
-
-			virtualdmabug_workaround();
-			return 2;
-		}
-	}
-
-	if (CT(COMMAND) == FD_READ)
-		max_size = max_sector; /* unbounded */
-
-	/* claim buffer track if needed */
-	if (buffer_track != raw_cmd->track ||  /* bad track */
-	    buffer_drive !=current_drive || /* bad drive */
-	    fsector_t > buffer_max ||
-	    fsector_t < buffer_min ||
-	    ((CT(COMMAND) == FD_READ ||
-	      (!in_sector_offset && current_req->nr_sectors >= ssize))&&
-	     max_sector > 2 * max_buffer_sectors + buffer_min &&
-	     max_size + fsector_t > 2 * max_buffer_sectors + buffer_min)
-	    /* not enough space */){
-		buffer_track = -1;
-		buffer_drive = current_drive;
-		buffer_max = buffer_min = aligned_sector_t;
-	}
-	raw_cmd->kernel_data = floppy_track_buffer + 
-		((aligned_sector_t-buffer_min)<<9);
-
-	if (CT(COMMAND) == FD_WRITE){
-		/* copy write buffer to track buffer.
-		 * if we get here, we know that the write
-		 * is either aligned or the data already in the buffer
-		 * (buffer will be overwritten) */
-#ifdef FLOPPY_SANITY_CHECK
-		if (in_sector_offset && buffer_track == -1)
-			DPRINT("internal error offset !=0 on write\n");
-#endif
-		buffer_track = raw_cmd->track;
-		buffer_drive = current_drive;
-		copy_buffer(ssize, max_sector, 2*max_buffer_sectors+buffer_min);
-	} else
-		transfer_size(ssize, max_sector,
-			      2*max_buffer_sectors+buffer_min-aligned_sector_t);
-
-	/* round up current_count_sectors to get dma xfer size */
-	raw_cmd->length = in_sector_offset+current_count_sectors;
-	raw_cmd->length = ((raw_cmd->length -1)|(ssize-1))+1;
-	raw_cmd->length <<= 9;
-#ifdef FLOPPY_SANITY_CHECK
-	/*check_dma_crossing(raw_cmd->kernel_data, raw_cmd->length, 
-	  "end of make_raw_request");*/
-	if ((raw_cmd->length < current_count_sectors << 9) ||
-	    (raw_cmd->kernel_data != current_req->buffer &&
-	     CT(COMMAND) == FD_WRITE &&
-	     (aligned_sector_t + (raw_cmd->length >> 9) > buffer_max ||
-	      aligned_sector_t < buffer_min)) ||
-	    raw_cmd->length % (128 << SIZECODE) ||
-	    raw_cmd->length <= 0 || current_count_sectors <= 0){
-		DPRINT("fractionary current count b=%lx s=%lx\n",
-			raw_cmd->length, current_count_sectors);
-		if (raw_cmd->kernel_data != current_req->buffer)
-			printk("addr=%d, length=%ld\n",
-			       (int) ((raw_cmd->kernel_data - 
-				       floppy_track_buffer) >> 9),
-			       current_count_sectors);
-		printk("st=%d ast=%d mse=%d msi=%d\n",
-		       fsector_t, aligned_sector_t, max_sector, max_size);
-		printk("ssize=%x SIZECODE=%d\n", ssize, SIZECODE);
-		printk("command=%x SECTOR=%d HEAD=%d, TRACK=%d\n",
-		       COMMAND, SECTOR, HEAD, TRACK);
-		printk("buffer drive=%d\n", buffer_drive);
-		printk("buffer track=%d\n", buffer_track);
-		printk("buffer_min=%d\n", buffer_min);
-		printk("buffer_max=%d\n", buffer_max);
-		return 0;
-	}
-
-	if (raw_cmd->kernel_data != current_req->buffer){
-		if (raw_cmd->kernel_data < floppy_track_buffer ||
-		    current_count_sectors < 0 ||
-		    raw_cmd->length < 0 ||
-		    raw_cmd->kernel_data + raw_cmd->length >
-		    floppy_track_buffer + (max_buffer_sectors  << 10)){
-			DPRINT("buffer overrun in schedule dma\n");
-			printk("fsector_t=%d buffer_min=%d current_count=%ld\n",
-			       fsector_t, buffer_min,
-			       raw_cmd->length >> 9);
-			printk("current_count_sectors=%ld\n",
-			       current_count_sectors);
-			if (CT(COMMAND) == FD_READ)
-				printk("read\n");
-			if (CT(COMMAND) == FD_WRITE)
-				printk("write\n");
-			return 0;
-		}
-	} else if (raw_cmd->length > current_req->nr_sectors << 9 ||
-		   current_count_sectors > current_req->nr_sectors){
-		DPRINT("buffer overrun in direct transfer\n");
-		return 0;
-	} else if (raw_cmd->length < current_count_sectors << 9){
-		DPRINT("more sectors than bytes\n");
-		printk("bytes=%ld\n", raw_cmd->length >> 9);
-		printk("sectors=%ld\n", current_count_sectors);
-	}
-	if (raw_cmd->length == 0){
-		DPRINT("zero dma transfer attempted from make_raw_request\n");
-		return 0;
-	}
-#endif
-
-	virtualdmabug_workaround();
-	return 2;
-}
-
-static void redo_fd_request(void)
-{
-#define REPEAT {request_done(0); continue; }
-	int drive;
-	int tmp;
-
-	lastredo = jiffies;
-	if (current_drive < N_DRIVE)
-		floppy_off(current_drive);
-
-	for (;;) {
-		if (!current_req) {
-			struct request *req;
-
-			spin_lock_irq(floppy_queue->queue_lock);
-			req = elv_next_request(floppy_queue);
-			spin_unlock_irq(floppy_queue->queue_lock);
-			if (!req) {
-				do_floppy = NULL;
-				unlock_fdc();
-				return;
-			}
-			current_req = req;
-		}
-		drive = (long)current_req->rq_disk->private_data;
-		set_fdc(drive);
-		reschedule_timeout(current_reqD, "redo fd request", 0);
-
-		set_floppy(drive);
-		raw_cmd = & default_raw_cmd;
-		raw_cmd->flags = 0;
-		if (start_motor(redo_fd_request)) return;
-		disk_change(current_drive);
-		if (test_bit(current_drive, &fake_change) ||
-		   TESTF(FD_DISK_CHANGED)){
-			DPRINT("disk absent or changed during operation\n");
-			REPEAT;
-		}
-		if (!_floppy) { /* Autodetection */
-			if (!probing){
-				DRS->probed_format = 0;
-				if (next_valid_format()){
-					DPRINT("no autodetectable formats\n");
-					_floppy = NULL;
-					REPEAT;
-				}
-			}
-			probing = 1;
-			_floppy = floppy_type+DP->autodetect[DRS->probed_format];
-		} else
-			probing = 0;
-		errors = & (current_req->errors);
-		tmp = make_raw_rw_request();
-		if (tmp < 2){
-			request_done(tmp);
-			continue;
-		}
-
-		if (TESTF(FD_NEED_TWADDLE))
-			twaddle();
-		schedule_bh( (void *)(void *) floppy_start);
-#ifdef DEBUGT
-		debugt("queue fd request");
-#endif
-		return;
-	}
-#undef REPEAT
-}
-
-static struct cont_t rw_cont={
-	rw_interrupt,
-	redo_fd_request,
-	bad_flp_intr,
-	request_done };
-
-static void process_fd_request(void)
-{
-	cont = &rw_cont;
-	schedule_bh( (void *)(void *) redo_fd_request);
-}
-
-static void do_fd_request(request_queue_t * q)
-{
-	if(max_buffer_sectors == 0) {
-		printk("VFS: do_fd_request called on non-open device\n");
-		return;
-	}
-
-	if (usage_count == 0) {
-		printk("warning: usage count=0, current_req=%p exiting\n", current_req);
-		printk("sect=%ld flags=%lx\n", (long)current_req->sector, current_req->flags);
-		return;
-	}
-	if (fdc_busy){
-		/* fdc busy, this new request will be treated when the
-		   current one is done */
-		is_alive("do fd request, old request running");
-		return;
-	}
-	lock_fdc(MAXTIMEOUT,0);
-	process_fd_request();
-	is_alive("do fd request");
-}
-
-static struct cont_t poll_cont={
-	success_and_wakeup,
-	floppy_ready,
-	generic_failure,
-	generic_done };
-
-static int poll_drive(int interruptible, int flag)
-{
-	int ret;
-	/* no auto-sense, just clear dcl */
-	raw_cmd = &default_raw_cmd;
-	raw_cmd->flags= flag;
-	raw_cmd->track=0;
-	raw_cmd->cmd_count=0;
-	cont = &poll_cont;
-#ifdef DCL_DEBUG
-	if (DP->flags & FD_DEBUG){
-		DPRINT("setting NEWCHANGE in poll_drive\n");
-	}
-#endif
-	SETF(FD_DISK_NEWCHANGE);
-	WAIT(floppy_ready);
-	return ret;
-}
-
-/*
- * User triggered reset
- * ====================
- */
-
-static void reset_intr(void)
-{
-	printk("weird, reset interrupt called\n");
-}
-
-static struct cont_t reset_cont={
-	reset_intr,
-	success_and_wakeup,
-	generic_failure,
-	generic_done };
-
-static int user_reset_fdc(int drive, int arg, int interruptible)
-{
-	int ret;
-
-	ret=0;
-	LOCK_FDC(drive,interruptible);
-	if (arg == FD_RESET_ALWAYS)
-		FDCS->reset=1;
-	if (FDCS->reset){
-		cont = &reset_cont;
-		WAIT(reset_fdc);
-	}
-	process_fd_request();
-	return ret;
-}
-
-/*
- * Misc Ioctl's and support
- * ========================
- */
-static inline int fd_copyout(void *param, const void *address, unsigned long size)
-{
-	return copy_to_user(param,address, size) ? -EFAULT : 0;
-}
-
-static inline int fd_copyin(void *param, void *address, unsigned long size)
-{
-	return copy_from_user(address, param, size) ? -EFAULT : 0;
-}
-
-#define _COPYOUT(x) (copy_to_user((void *)param, &(x), sizeof(x)) ? -EFAULT : 0)
-#define _COPYIN(x) (copy_from_user(&(x), (void *)param, sizeof(x)) ? -EFAULT : 0)
-
-#define COPYOUT(x) ECALL(_COPYOUT(x))
-#define COPYIN(x) ECALL(_COPYIN(x))
-
-static inline const char *drive_name(int type, int drive)
-{
-	struct floppy_struct *floppy;
-
-	if (type)
-		floppy = floppy_type + type;
-	else {
-		if (UDP->native_format)
-			floppy = floppy_type + UDP->native_format;
-		else
-			return "(null)";
-	}
-	if (floppy->name)
-		return floppy->name;
-	else
-		return "(null)";
-}
-
-
-/* raw commands */
-static void raw_cmd_done(int flag)
-{
-	int i;
-
-	if (!flag) {
-		raw_cmd->flags |= FD_RAW_FAILURE;
-		raw_cmd->flags |= FD_RAW_HARDFAILURE;
-	} else {
-		raw_cmd->reply_count = inr;
-		if (raw_cmd->reply_count > MAX_REPLIES)
-			raw_cmd->reply_count=0;
-		for (i=0; i< raw_cmd->reply_count; i++)
-			raw_cmd->reply[i] = reply_buffer[i];
-
-		if (raw_cmd->flags & (FD_RAW_READ | FD_RAW_WRITE))
-		{
-			unsigned long flags;
-			flags=claim_dma_lock();
-			raw_cmd->length = fd_get_dma_residue();
-			release_dma_lock(flags);
-		}
-		
-		if ((raw_cmd->flags & FD_RAW_SOFTFAILURE) &&
-		    (!raw_cmd->reply_count || (raw_cmd->reply[0] & 0xc0)))
-			raw_cmd->flags |= FD_RAW_FAILURE;
-
-		if (disk_change(current_drive))
-			raw_cmd->flags |= FD_RAW_DISK_CHANGE;
-		else
-			raw_cmd->flags &= ~FD_RAW_DISK_CHANGE;
-		if (raw_cmd->flags & FD_RAW_NO_MOTOR_AFTER)
-			motor_off_callback(current_drive);
-
-		if (raw_cmd->next &&
-		   (!(raw_cmd->flags & FD_RAW_FAILURE) ||
-		    !(raw_cmd->flags & FD_RAW_STOP_IF_FAILURE)) &&
-		   ((raw_cmd->flags & FD_RAW_FAILURE) ||
-		    !(raw_cmd->flags &FD_RAW_STOP_IF_SUCCESS))) {
-			raw_cmd = raw_cmd->next;
-			return;
-		}
-	}
-	generic_done(flag);
-}
-
-
-static struct cont_t raw_cmd_cont={
-	success_and_wakeup,
-	floppy_start,
-	generic_failure,
-	raw_cmd_done
-};
-
-static inline int raw_cmd_copyout(int cmd, char *param,
-				  struct floppy_raw_cmd *ptr)
-{
-	int ret;
-
-	while(ptr) {
-		COPYOUT(*ptr);
-		param += sizeof(struct floppy_raw_cmd);
-		if ((ptr->flags & FD_RAW_READ) && ptr->buffer_length){
-			if (ptr->length>=0 && ptr->length<=ptr->buffer_length)
-				ECALL(fd_copyout(ptr->data, 
-						 ptr->kernel_data, 
-						 ptr->buffer_length - 
-						 ptr->length));
-		}
-		ptr = ptr->next;
-	}
-	return 0;
-}
-
-
-static void raw_cmd_free(struct floppy_raw_cmd **ptr)
-{
-	struct floppy_raw_cmd *next,*this;
-
-	this = *ptr;
-	*ptr = 0;
-	while(this) {
-		if (this->buffer_length) {
-			fd_dma_mem_free((unsigned long)this->kernel_data,
-					this->buffer_length);
-			this->buffer_length = 0;
-		}
-		next = this->next;
-		kfree(this);
-		this = next;
-	}
-}
-
-
-static inline int raw_cmd_copyin(int cmd, char *param,
-				 struct floppy_raw_cmd **rcmd)
-{
-	struct floppy_raw_cmd *ptr;
-	int ret;
-	int i;
-	
-	*rcmd = 0;
-	while(1) {
-		ptr = (struct floppy_raw_cmd *) 
-			kmalloc(sizeof(struct floppy_raw_cmd), GFP_USER);
-		if (!ptr)
-			return -ENOMEM;
-		*rcmd = ptr;
-		COPYIN(*ptr);
-		ptr->next = 0;
-		ptr->buffer_length = 0;
-		param += sizeof(struct floppy_raw_cmd);
-		if (ptr->cmd_count > 33)
-			/* the command may now also take up the space
-			 * initially intended for the reply & the
-			 * reply count. Needed for long 82078 commands
-			 * such as RESTORE, which takes ... 17 command
-			 * bytes. Murphy's law #137: When you reserve
-			 * 16 bytes for a structure, you'll one day
-			 * discover that you really need 17...
-			 */
-			return -EINVAL;
-
-		for (i=0; i< 16; i++)
-			ptr->reply[i] = 0;
-		ptr->resultcode = 0;
-		ptr->kernel_data = 0;
-
-		if (ptr->flags & (FD_RAW_READ | FD_RAW_WRITE)) {
-			if (ptr->length <= 0)
-				return -EINVAL;
-			ptr->kernel_data =(char*)fd_dma_mem_alloc(ptr->length);
-			fallback_on_nodma_alloc(&ptr->kernel_data,
-						ptr->length);
-			if (!ptr->kernel_data)
-				return -ENOMEM;
-			ptr->buffer_length = ptr->length;
-		}
-		if (ptr->flags & FD_RAW_WRITE)
-			ECALL(fd_copyin(ptr->data, ptr->kernel_data, 
-					ptr->length));
-		rcmd = & (ptr->next);
-		if (!(ptr->flags & FD_RAW_MORE))
-			return 0;
-		ptr->rate &= 0x43;
-	}
-}
-
-
-static int raw_cmd_ioctl(int cmd, void *param)
-{
-	int drive, ret, ret2;
-	struct floppy_raw_cmd *my_raw_cmd;
-
-	if (FDCS->rawcmd <= 1)
-		FDCS->rawcmd = 1;
-	for (drive= 0; drive < N_DRIVE; drive++){
-		if (FDC(drive) != fdc)
-			continue;
-		if (drive == current_drive){
-			if (UDRS->fd_ref > 1){
-				FDCS->rawcmd = 2;
-				break;
-			}
-		} else if (UDRS->fd_ref){
-			FDCS->rawcmd = 2;
-			break;
-		}
-	}
-
-	if (FDCS->reset)
-		return -EIO;
-
-	ret = raw_cmd_copyin(cmd, param, &my_raw_cmd);
-	if (ret) {
-		raw_cmd_free(&my_raw_cmd);
-		return ret;
-	}
-
-	raw_cmd = my_raw_cmd;
-	cont = &raw_cmd_cont;
-	ret=wait_til_done(floppy_start,1);
-#ifdef DCL_DEBUG
-	if (DP->flags & FD_DEBUG){
-		DPRINT("calling disk change from raw_cmd ioctl\n");
-	}
-#endif
-
-	if (ret != -EINTR && FDCS->reset)
-		ret = -EIO;
-
-	DRS->track = NO_TRACK;
-
-	ret2 = raw_cmd_copyout(cmd, param, my_raw_cmd);
-	if (!ret)
-		ret = ret2;
-	raw_cmd_free(&my_raw_cmd);
-	return ret;
-}
-
-static int invalidate_drive(struct block_device *bdev)
-{
-	/* invalidate the buffer track to force a reread */
-	set_bit((long)bdev->bd_disk->private_data, &fake_change);
-	process_fd_request();
-	check_disk_change(bdev);
-	return 0;
-}
-
-
-static inline void clear_write_error(int drive)
-{
-	CLEARSTRUCT(UDRWE);
-}
-
-static inline int set_geometry(unsigned int cmd, struct floppy_struct *g,
-			       int drive, int type, struct block_device *bdev)
-{
-	int cnt;
-
-	/* sanity checking for parameters.*/
-	if (g->sect <= 0 ||
-	    g->head <= 0 ||
-	    g->track <= 0 ||
-	    g->track > UDP->tracks>>STRETCH(g) ||
-	    /* check if reserved bits are set */
-	    (g->stretch&~(FD_STRETCH|FD_SWAPSIDES)) != 0)
-		return -EINVAL;
-	if (type){
-		if (!capable(CAP_SYS_ADMIN))
-			return -EPERM;
-		down(&open_lock);
-		LOCK_FDC(drive,1);
-		floppy_type[type] = *g;
-		floppy_type[type].name="user format";
-		for (cnt = type << 2; cnt < (type << 2) + 4; cnt++)
-			floppy_sizes[cnt]= floppy_sizes[cnt+0x80]=
-				floppy_type[type].size+1;
-		process_fd_request();
-		for (cnt = 0; cnt < N_DRIVE; cnt++) {
-			struct block_device *bdev = opened_bdev[cnt];
-			if (!bdev || ITYPE(drive_state[cnt].fd_device) != type)
-				continue;
-			__invalidate_device(bdev, 0);
-		}
-		up(&open_lock);
-	} else {
-		LOCK_FDC(drive,1);
-		if (cmd != FDDEFPRM)
-			/* notice a disk change immediately, else
-			 * we lose our settings immediately*/
-			CALL(poll_drive(1, FD_RAW_NEED_DISK));
-		user_params[drive] = *g;
-		if (buffer_drive == drive)
-			SUPBOUND(buffer_max, user_params[drive].sect);
-		current_type[drive] = &user_params[drive];
-		floppy_sizes[drive] = user_params[drive].size;
-		if (cmd == FDDEFPRM)
-			DRS->keep_data = -1;
-		else
-			DRS->keep_data = 1;
-		/* invalidation. Invalidate only when needed, i.e.
-		 * when there are already sectors in the buffer cache
-		 * whose number will change. This is useful, because
-		 * mtools often changes the geometry of the disk after
-		 * looking at the boot block */
-		if (DRS->maxblock > user_params[drive].sect || DRS->maxtrack)
-			invalidate_drive(bdev);
-		else
-			process_fd_request();
-	}
-	return 0;
-}
-
-/* handle obsolete ioctl's */
-static int ioctl_table[]= {
-	FDCLRPRM,
-	FDSETPRM,
-	FDDEFPRM,
-	FDGETPRM,
-	FDMSGON,
-	FDMSGOFF,
-	FDFMTBEG,
-	FDFMTTRK,
-	FDFMTEND,
-	FDSETEMSGTRESH,
-	FDFLUSH,
-	FDSETMAXERRS,
-	FDGETMAXERRS,
-	FDGETDRVTYP,
-	FDSETDRVPRM,
-	FDGETDRVPRM,
-	FDGETDRVSTAT,
-	FDPOLLDRVSTAT,
-	FDRESET,
-	FDGETFDCSTAT,
-	FDWERRORCLR,
-	FDWERRORGET,
-	FDRAWCMD,
-	FDEJECT,
-	FDTWADDLE
-};
-
-static inline int normalize_ioctl(int *cmd, int *size)
-{
-	int i;
-
-	for (i=0; i < ARRAY_SIZE(ioctl_table); i++) {
-		if ((*cmd & 0xffff) == (ioctl_table[i] & 0xffff)){
-			*size = _IOC_SIZE(*cmd);
-			*cmd = ioctl_table[i];
-			if (*size > _IOC_SIZE(*cmd)) {
-				printk("ioctl not yet supported\n");
-				return -EFAULT;
-			}
-			return 0;
-		}
-	}
-	return -EINVAL;
-}
-
-static int get_floppy_geometry(int drive, int type, struct floppy_struct **g)
-{
-	if (type)
-		*g = &floppy_type[type];
-	else {
-		LOCK_FDC(drive,0);
-		CALL(poll_drive(0,0));
-		process_fd_request();		
-		*g = current_type[drive];
-	}
-	if (!*g)
-		return -ENODEV;
-	return 0;
-}
-
-static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
-		    unsigned long param)
-{
-#define FD_IOCTL_ALLOWED ((filp) && (filp)->private_data)
-#define OUT(c,x) case c: outparam = (const char *) (x); break
-#define IN(c,x,tag) case c: *(x) = inparam. tag ; return 0
-
-	int drive = (long)inode->i_bdev->bd_disk->private_data;
-	int i, type = ITYPE(UDRS->fd_device);
-	int ret;
-	int size;
-	union inparam {
-		struct floppy_struct g; /* geometry */
-		struct format_descr f;
-		struct floppy_max_errors max_errors;
-		struct floppy_drive_params dp;
-	} inparam; /* parameters coming from user space */
-	const char *outparam; /* parameters passed back to user space */
-
-	/* convert compatibility eject ioctls into floppy eject ioctl.
-	 * We do this in order to provide a means to eject floppy disks before
-	 * installing the new fdutils package */
-	if (cmd == CDROMEJECT || /* CD-ROM eject */
-	    cmd == 0x6470 /* SunOS floppy eject */) {
-		DPRINT("obsolete eject ioctl\n");
-		DPRINT("please use floppycontrol --eject\n");
-		cmd = FDEJECT;
-	}
-
-	/* generic block device ioctls */
-	switch(cmd) {
-		/* the following have been inspired by the corresponding
-		 * code for other block devices. */
-		struct floppy_struct *g;
-		case HDIO_GETGEO:
-		{
-			struct hd_geometry loc;
-			ECALL(get_floppy_geometry(drive, type, &g));
-			loc.heads = g->head;
-			loc.sectors = g->sect;
-			loc.cylinders = g->track;
-			loc.start = 0;
-			return _COPYOUT(loc);
-		}
-	}
-
-	/* convert the old style command into a new style command */
-	if ((cmd & 0xff00) == 0x0200) {
-		ECALL(normalize_ioctl(&cmd, &size));
-	} else
-		return -EINVAL;
-
-	/* permission checks */
-	if (((cmd & 0x40) && !FD_IOCTL_ALLOWED) ||
-	    ((cmd & 0x80) && !capable(CAP_SYS_ADMIN)))
-		return -EPERM;
-
-	/* copyin */
-	CLEARSTRUCT(&inparam);
-	if (_IOC_DIR(cmd) & _IOC_WRITE)
-		ECALL(fd_copyin((void *)param, &inparam, size))
-
-	switch (cmd) {
-		case FDEJECT:
-			if (UDRS->fd_ref != 1)
-				/* somebody else has this drive open */
-				return -EBUSY;
-			LOCK_FDC(drive,1);
-
-			/* do the actual eject. Fails on
-			 * non-Sparc architectures */
-			ret=fd_eject(UNIT(drive));
-
-			USETF(FD_DISK_CHANGED);
-			USETF(FD_VERIFY);
-			process_fd_request();
-			return ret;			
-		case FDCLRPRM:
-			LOCK_FDC(drive,1);
-			current_type[drive] = NULL;
-			floppy_sizes[drive] = MAX_DISK_SIZE << 1;
-			UDRS->keep_data = 0;
-			return invalidate_drive(inode->i_bdev);
-		case FDSETPRM:
-		case FDDEFPRM:
-			return set_geometry(cmd, & inparam.g,
-					    drive, type, inode->i_bdev);
-		case FDGETPRM:
-			ECALL(get_floppy_geometry(drive, type, 
-						  (struct floppy_struct**)
-						  &outparam));
-			break;
-
-		case FDMSGON:
-			UDP->flags |= FTD_MSG;
-			return 0;
-		case FDMSGOFF:
-			UDP->flags &= ~FTD_MSG;
-			return 0;
-
-		case FDFMTBEG:
-			LOCK_FDC(drive,1);
-			CALL(poll_drive(1, FD_RAW_NEED_DISK));
-			ret = UDRS->flags;
-			if (ret & FD_VERIFY) {
-				CALL(poll_drive(1, FD_RAW_NEED_DISK));
-				ret = UDRS->flags;
-			}
-
-			if (ret & FD_VERIFY) {
-				CALL(poll_drive(1, FD_RAW_NEED_DISK));
-				ret = UDRS->flags;
-			}
-
-			if (ret & FD_VERIFY) {
-				CALL(poll_drive(1, FD_RAW_NEED_DISK));
-				ret = UDRS->flags;
-			}
-
-			if (ret & FD_VERIFY) {
-				CALL(poll_drive(1, FD_RAW_NEED_DISK));
-				ret = UDRS->flags;
-			}
-
-			if(ret & FD_VERIFY){
-				CALL(poll_drive(1, FD_RAW_NEED_DISK));
-				ret = UDRS->flags;
-			}
-			process_fd_request();
-			if (ret & FD_VERIFY)
-				return -ENODEV;
-			if (!(ret & FD_DISK_WRITABLE))
-				return -EROFS;
-			return 0;
-		case FDFMTTRK:
-			if (UDRS->fd_ref != 1)
-				return -EBUSY;
-			return do_format(drive, &inparam.f);
-		case FDFMTEND:
-		case FDFLUSH:
-			LOCK_FDC(drive,1);
-			return invalidate_drive(inode->i_bdev);
-
-		case FDSETEMSGTRESH:
-			UDP->max_errors.reporting =
-				(unsigned short) (param & 0x0f);
-			return 0;
-		OUT(FDGETMAXERRS, &UDP->max_errors);
-		IN(FDSETMAXERRS, &UDP->max_errors, max_errors);
-
-		case FDGETDRVTYP:
-			outparam = drive_name(type,drive);
-			SUPBOUND(size,strlen(outparam)+1);
-			break;
-
-		IN(FDSETDRVPRM, UDP, dp);
-		OUT(FDGETDRVPRM, UDP);
-
-		case FDPOLLDRVSTAT:
-			LOCK_FDC(drive,1);
-			CALL(poll_drive(1, FD_RAW_NEED_DISK));
-			process_fd_request();
-			/* fall through */
-	       	OUT(FDGETDRVSTAT, UDRS);
-
-		case FDRESET:
-			return user_reset_fdc(drive, (int)param, 1);
-
-		OUT(FDGETFDCSTAT,UFDCS);
-
-		case FDWERRORCLR:
-			CLEARSTRUCT(UDRWE);
-			return 0;
-		OUT(FDWERRORGET,UDRWE);
-
-		case FDRAWCMD:
-			if (type)
-				return -EINVAL;
-			LOCK_FDC(drive,1);
-			set_floppy(drive);
-			CALL(i = raw_cmd_ioctl(cmd,(void *) param));
-			process_fd_request();
-			return i;
-
-		case FDTWADDLE:
-			LOCK_FDC(drive,1);
-			twaddle();
-			process_fd_request();
-			return 0;
-
-		default:
-			return -EINVAL;
-	}
-
-	if (_IOC_DIR(cmd) & _IOC_READ)
-		return fd_copyout((void *)param, outparam, size);
-	else
-		return 0;
-#undef OUT
-#undef IN
-}
-
-static void __init config_types(void)
-{
-	int first=1;
-	int drive;
-	extern struct fd_info {
-		unsigned char dummy[4 * 6];
-		unsigned char fd_types[8];
-	} drive_info;
-
-	for (drive = 0; drive < 4; drive++)
-		UDP->cmos = drive_info.fd_types[drive];
-
-	/* XXX */
-	/* additional physical CMOS drive detection should go here */
-
-	for (drive=0; drive < N_DRIVE; drive++){
-		unsigned int type = UDP->cmos;
-		struct floppy_drive_params *params;
-		const char *name = NULL;
-		static char temparea[32];
-
-		if (type < NUMBER(default_drive_params)) {
-			params = &default_drive_params[type].params;
-			if (type) {
-				name = default_drive_params[type].name;
-				allowed_drive_mask |= 1 << drive;
-			}
-			else
-				allowed_drive_mask &= ~(1 << drive);
-		} else {
-			params = &default_drive_params[0].params;
-			sprintf(temparea, "unknown type %d (usb?)", type);
-			name = temparea;
-		}
-		if (name) {
-			const char * prepend = ",";
-			if (first) {
-				prepend = KERN_INFO "Floppy drive(s):";
-				first = 0;
-			}
-			printk("%s fd%d is %s", prepend, drive, name);
-			register_devfs_entries (drive);
-		}
-		*UDP = *params;
-	}
-	if (!first)
-		printk("\n");
-}
-
-static int floppy_release(struct inode * inode, struct file * filp)
-{
-	int drive = (long)inode->i_bdev->bd_disk->private_data;
-
-	down(&open_lock);
-	if (UDRS->fd_ref < 0)
-		UDRS->fd_ref=0;
-	else if (!UDRS->fd_ref--) {
-		DPRINT("floppy_release with fd_ref == 0");
-		UDRS->fd_ref = 0;
-	}
-	if (!UDRS->fd_ref)
-		opened_bdev[drive] = NULL;
-	floppy_release_irq_and_dma();
-	up(&open_lock);
-	return 0;
-}
-
-/*
- * floppy_open check for aliasing (/dev/fd0 can be the same as
- * /dev/PS0 etc), and disallows simultaneous access to the same
- * drive with different device numbers.
- */
-#define RETERR(x) do{floppy_release(inode,filp); return -(x);}while(0)
-
-static int floppy_open(struct inode * inode, struct file * filp)
-{
-	int drive = (long)inode->i_bdev->bd_disk->private_data;
-	int old_dev;
-	int try;
-	int res = -EBUSY;
-	char *tmp;
-
-#ifdef PC9800_DEBUG_FLOPPY
-	printk("floppy open: start\n");
-#endif
-	filp->private_data = (void*) 0;
-
-#ifdef PC9800_DEBUG_FLOPPY
-	printk("floppy open: drive=%d, current_drive=%d, UDP->cmos=%d\n"
-		   "floppy open: FDCS={spec1=%d, spec2=%d, dtr=%d, version=%d, dor=%d, address=%lu}\n",
-		   drive, current_drive, UDP->cmos, FDCS->spec1, FDCS->spec2,
-		   FDCS->dtr, FDCS->version, FDCS->dor, FDCS->address);
-	if (_floppy) {
-		printk("floppy open: _floppy={size=%d, sect=%d, head=%d, track=%d, spec1=%d}\n",
-			   _floppy->size, _floppy->sect, _floppy->head,
-			   _floppy->track, _floppy->spec1);
-	} else {
-		printk("floppy open: _floppy=NULL\n");
-	}
-#endif /* PC9800_DEBUG_FLOPPY */
-
-	down(&open_lock);
-	old_dev = UDRS->fd_device;
-	if (opened_bdev[drive] && opened_bdev[drive] != inode->i_bdev)
-		goto out2;
-
-	if (!UDRS->fd_ref && (UDP->flags & FD_BROKEN_DCL)){
-		USETF(FD_DISK_CHANGED);
-		USETF(FD_VERIFY);
-	}
-
-	if (UDRS->fd_ref == -1 ||
-	   (UDRS->fd_ref && (filp->f_flags & O_EXCL)))
-		goto out2;
-
-	if (floppy_grab_irq_and_dma())
-		goto out2;
-
-	if (filp->f_flags & O_EXCL)
-		UDRS->fd_ref = -1;
-	else
-		UDRS->fd_ref++;
-
-	opened_bdev[drive] = inode->i_bdev;
-
-	res = -ENXIO;
-
-	if (!floppy_track_buffer){
-		/* if opening an ED drive, reserve a big buffer,
-		 * else reserve a small one */
-		if ((UDP->cmos == 6) || (UDP->cmos == 5))
-			try = 64; /* Only 48 actually useful */
-		else
-			try = 32; /* Only 24 actually useful */
-
-		tmp=(char *)fd_dma_mem_alloc(1024 * try);
-		if (!tmp && !floppy_track_buffer) {
-			try >>= 1; /* buffer only one side */
-			INFBOUND(try, 16);
-			tmp= (char *)fd_dma_mem_alloc(1024*try);
-		}
-		if (!tmp && !floppy_track_buffer) {
-			fallback_on_nodma_alloc(&tmp, 2048 * try);
-		}
-		if (!tmp && !floppy_track_buffer) {
-			DPRINT("Unable to allocate DMA memory\n");
-			goto out;
-		}
-		if (floppy_track_buffer) {
-			if (tmp)
-				fd_dma_mem_free((unsigned long)tmp,try*1024);
-		} else {
-			buffer_min = buffer_max = -1;
-			floppy_track_buffer = tmp;
-			max_buffer_sectors = try;
-		}
-	}
-
-	UDRS->fd_device = iminor(inode);
-	set_capacity(disks[drive], floppy_sizes[iminor(inode)]);
-	if (old_dev != -1 && old_dev != iminor(inode)) {
-		if (buffer_drive == drive)
-			buffer_track = -1;
-	}
-
-#ifdef PC9800_DEBUG_FLOPPY
-	printk("floppy open: floppy.c:%d passed\n", __LINE__);
-#endif
-
-
-	/* Allow ioctls if we have write-permissions even if read-only open.
-	 * Needed so that programs such as fdrawcmd still can work on write
-	 * protected disks */
-	if (filp->f_mode & 2 || permission(filp->f_dentry->d_inode,2,NULL) == 0)
-	    filp->private_data = (void*) 8;
-
-	if (UFDCS->rawcmd == 1)
-		UFDCS->rawcmd = 2;
-
-#ifdef PC9800_DEBUG_FLOPPY
-	printk("floppy open: floppy.c:%d passed\n", __LINE__);
-#endif
-
-	if (!(filp->f_flags & O_NDELAY)) {
-		if (filp->f_mode & 3) {
-			UDRS->last_checked = 0;
-			check_disk_change(inode->i_bdev);
-			if (UTESTF(FD_DISK_CHANGED))
-				goto out;
-		}
-		res = -EROFS;
-		if ((filp->f_mode & 2) && !(UTESTF(FD_DISK_WRITABLE)))
-			goto out;
-#ifdef PC9800_DEBUG_FLOPPY
-		printk("floppy open: end normally\n");
-#endif
-	}
-	up(&open_lock);
-	return 0;
-out:
-	if (UDRS->fd_ref < 0)
-		UDRS->fd_ref=0;
-	else
-		UDRS->fd_ref--;
-	if (!UDRS->fd_ref)
-		opened_bdev[drive] = NULL;
-	floppy_release_irq_and_dma();
-out2:
-	up(&open_lock);
-	return res;
-}
-
-/*
- * Check if the disk has been changed or if a change has been faked.
- */
-static int check_floppy_change(struct gendisk *disk)
-{
-	int drive = (long)disk->private_data;
-
-#ifdef PC9800_DEBUG_FLOPPY
-	printk("check_floppy_change: MINOR=%d\n", minor(dev));
-#endif
-
-	if (UTESTF(FD_DISK_CHANGED) || UTESTF(FD_VERIFY))
-		return 1;
-
-	if (UDP->checkfreq < (int)(jiffies - UDRS->last_checked)) {
-		if(floppy_grab_irq_and_dma()) {
-			return 1;
-		}
-
-		lock_fdc(drive,0);
-		poll_drive(0,0);
-		process_fd_request();
-		floppy_release_irq_and_dma();
-	}
-
-	if (UTESTF(FD_DISK_CHANGED) ||
-	   UTESTF(FD_VERIFY) ||
-	   test_bit(drive, &fake_change) ||
-	   (!ITYPE(UDRS->fd_device) && !current_type[drive]))
-		return 1;
-	return 0;
-}
-
-/*
- * This implements "read block 0" for floppy_revalidate().
- * Needed for format autodetection, checking whether there is
- * a disk in the drive, and whether that disk is writable.
- */
-
-static int floppy_rb0_complete(struct bio *bio, unsigned int bytes_done, int err)
-{
-	if (bio->bi_size)
-		return 1;
-
-	complete((struct completion*)bio->bi_private);
-	return 0;
-}
-
-static int __floppy_read_block_0(struct block_device *bdev)
-{
-	struct bio bio;
-	struct bio_vec bio_vec;
-	struct completion complete;
-	struct page *page;
-	size_t size;
-
-	page = alloc_page(GFP_NOIO);
-	if (!page) {
-		process_fd_request();
-		return -ENOMEM;
-	}
-
-	size = bdev->bd_block_size;
-	if (!size)
-		size = 1024;
-
-	bio_init(&bio);
-	bio.bi_io_vec = &bio_vec;
-	bio_vec.bv_page = page;
-	bio_vec.bv_len = size;
-	bio_vec.bv_offset = 0;
-	bio.bi_vcnt = 1;
-	bio.bi_idx = 0;
-	bio.bi_size = size;
-	bio.bi_bdev = bdev;
-	bio.bi_sector = 0;
-	init_completion(&complete);
-	bio.bi_private = &complete;
-	bio.bi_end_io = floppy_rb0_complete;
-
-	submit_bio(READ, &bio);
-	generic_unplug_device(bdev_get_queue(bdev));
-	process_fd_request();
-	wait_for_completion(&complete);
-
-	__free_page(page);
-
-	return 0;
-}
-
-/* revalidate the floppy disk, i.e. trigger format autodetection by reading
- * the bootblock (block 0). "Autodetection" is also needed to check whether
- * there is a disk in the drive at all... Thus we also do it for fixed
- * geometry formats */
-static int floppy_revalidate(struct gendisk *disk)
-{
-	int drive=(long)disk->private_data;
-#define NO_GEOM (!current_type[drive] && !ITYPE(UDRS->fd_device))
-	int cf;
-	int res = 0;
-
-	if (UTESTF(FD_DISK_CHANGED) ||
-	    UTESTF(FD_VERIFY) ||
-	    test_bit(drive, &fake_change) ||
-	    NO_GEOM){
-		if(usage_count == 0) {
-			printk("VFS: revalidate called on non-open device.\n");
-			return -EFAULT;
-		}
-		lock_fdc(drive,0);
-		cf = UTESTF(FD_DISK_CHANGED) || UTESTF(FD_VERIFY);
-		if (!(cf || test_bit(drive, &fake_change) || NO_GEOM)){
-			process_fd_request(); /*already done by another thread*/
-			return 0;
-		}
-		UDRS->maxblock = 0;
-		UDRS->maxtrack = 0;
-		if (buffer_drive == drive)
-			buffer_track = -1;
-		clear_bit(drive, &fake_change);
-		UCLEARF(FD_DISK_CHANGED);
-		if (cf)
-			UDRS->generation++;
-		if (NO_GEOM){
-			/* auto-sensing */
-			res = __floppy_read_block_0(opened_bdev[drive]);
-		} else {
-			if (cf)
-				poll_drive(0, FD_RAW_NEED_DISK);
-			process_fd_request();
-		}
-	}
-	set_capacity(disk, floppy_sizes[UDRS->fd_device]);
-	return res;
-}
-
-static struct block_device_operations floppy_fops = {
-	.owner		= THIS_MODULE,
-	.open		= floppy_open,
-	.release	= floppy_release,
-	.ioctl		= fd_ioctl,
-	.media_changed	= check_floppy_change,
-	.revalidate_disk= floppy_revalidate,
-};
-
-static char *table[] =
-{"",
-#if 0
-	"d360", 
-#else
-	"h1232",
-#endif
-	"h1200", "u360", "u720", "h360", "h720",
-	"u1440", "u2880", "CompaQ", "h1440", "u1680", "h410",
-	"u820", "h1476", "u1722", "h420", "u830", "h1494", "u1743",
-	"h880", "u1040", "u1120", "h1600", "u1760", "u1920",
-	"u3200", "u3520", "u3840", "u1840", "u800", "u1600",
-NULL
-};
-
-static int t360[] = {
-	1,0
-};
-static int t1200[] = {
-	2,5,6,10,12,14,16,18,20,23,0
-};
-static int t3in[] = {
-	 8, 9,26,27,28, 7,11,15,19,24,25,
-	29,31, 3, 4,13,17,21,22,30, 0
-};
-
-static int *table_sup[] = {
-	NULL, t360, t1200, t3in+5+8, t3in+5, t3in, t3in
-};
-
-static void __init register_devfs_entries (int drive)
-{
-	int base_minor = (drive < 4) ? drive : (124 + drive);
-
-	if (UDP->cmos < NUMBER(default_drive_params)) {
-		int i = 0;
-		do {
-			int minor = base_minor + (table_sup[UDP->cmos][i] << 2);
-
-			devfs_mk_bdev(MKDEV(FLOPPY_MAJOR, minor), 
-					S_IFBLK|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP,
-					"floppy/%d%s",
-					drive, table[table_sup[UDP->cmos][i]]);
-		} while (table_sup[UDP->cmos][i++]);
-	}
-}
-
-/*
- * Floppy Driver initialization
- * =============================
- */
-
-static inline char __init get_fdc_version(void)
-{
-	return FDC_8272A;
-}
-
-/* lilo configuration */
-
-static void __init floppy_set_flags(int *ints,int param, int param2)
-{
-	int i;
-
-	for (i=0; i < ARRAY_SIZE(default_drive_params); i++){
-		if (param)
-			default_drive_params[i].params.flags |= param2;
-		else
-			default_drive_params[i].params.flags &= ~param2;
-	}
-	DPRINT("%s flag 0x%x\n", param2 ? "Setting" : "Clearing", param);
-}
-
-static void __init daring(int *ints,int param, int param2)
-{
-	int i;
-
-	for (i=0; i < ARRAY_SIZE(default_drive_params); i++){
-		if (param){
-			default_drive_params[i].params.select_delay = 0;
-			default_drive_params[i].params.flags |= FD_SILENT_DCL_CLEAR;
-		} else {
-			default_drive_params[i].params.select_delay = 2*HZ/100;
-			default_drive_params[i].params.flags &= ~FD_SILENT_DCL_CLEAR;
-		}
-	}
-	DPRINT("Assuming %s floppy hardware\n", param ? "standard" : "broken");
-}
-
-static void __init set_cmos(int *ints, int dummy, int dummy2)
-{
-	int current_drive=0;
-
-	if (ints[0] != 2){
-		DPRINT("wrong number of parameters for CMOS\n");
-		return;
-	}
-	current_drive = ints[1];
-	if (current_drive < 0 || current_drive >= 8){
-		DPRINT("bad drive for set_cmos\n");
-		return;
-	}
-#if N_FDC > 1
-	if (current_drive >= 4 && !FDC2)
-		FDC2 = 0x370;
-#endif
-	DP->cmos = ints[2];
-	DPRINT("setting CMOS code to %d\n", ints[2]);
-}
-
-static struct param_table {
-	const char *name;
-	void (*fn)(int *ints, int param, int param2);
-	int *var;
-	int def_param;
-	int param2;
-} config_params[]={
-	{ "allowed_drive_mask", 0, &allowed_drive_mask, 0xff, 0}, /* obsolete */
-	{ "all_drives", 0, &allowed_drive_mask, 0xff, 0 }, /* obsolete */
-	{ "irq", 0, &FLOPPY_IRQ, DEFAULT_FLOPPY_IRQ, 0 },
-	{ "dma", 0, &FLOPPY_DMA, DEFAULT_FLOPPY_DMA, 0 },
-
-	{ "daring", daring, 0, 1, 0},
-#if N_FDC > 1
-	{ "two_fdc",  0, &FDC2, 0x370, 0 },
-	{ "one_fdc", 0, &FDC2, 0, 0 },
-#endif
-	{ "broken_dcl", floppy_set_flags, 0, 1, FD_BROKEN_DCL },
-	{ "messages", floppy_set_flags, 0, 1, FTD_MSG },
-	{ "silent_dcl_clear", floppy_set_flags, 0, 1, FD_SILENT_DCL_CLEAR },
-	{ "debug", floppy_set_flags, 0, 1, FD_DEBUG },
-
-	{ "nodma", 0, &can_use_virtual_dma, 1, 0 },
-	{ "yesdma", 0, &can_use_virtual_dma, 0, 0 },
-
-	{ "fifo_depth", 0, &fifo_depth, 0xa, 0 },
-	{ "nofifo", 0, &no_fifo, 0x20, 0 },
-	{ "usefifo", 0, &no_fifo, 0, 0 },
-
-	{ "cmos", set_cmos, 0, 0, 0 },
-	{ "slow", 0, &slow_floppy, 1, 0 },
-
-	{ "unexpected_interrupts", 0, &print_unex, 1, 0 },
-	{ "no_unexpected_interrupts", 0, &print_unex, 0, 0 },
-
-	EXTRA_FLOPPY_PARAMS
-};
-
-static int __init floppy_setup(char *str)
-{
-	int i;
-	int param;
-	int ints[11];
-
-	str = get_options(str,ARRAY_SIZE(ints),ints);
-	if (str) {
-		for (i=0; i< ARRAY_SIZE(config_params); i++){
-			if (strcmp(str,config_params[i].name) == 0){
-				if (ints[0])
-					param = ints[1];
-				else
-					param = config_params[i].def_param;
-				if (config_params[i].fn)
-					config_params[i].
-						fn(ints,param,
-						   config_params[i].param2);
-				if (config_params[i].var) {
-					DPRINT("%s=%d\n", str, param);
-					*config_params[i].var = param;
-				}
-				return 1;
-			}
-		}
-	}
-	if (str) {
-		DPRINT("unknown floppy option [%s]\n", str);
-		
-		DPRINT("allowed options are:");
-		for (i=0; i< ARRAY_SIZE(config_params); i++)
-			printk(" %s",config_params[i].name);
-		printk("\n");
-	} else
-		DPRINT("botched floppy option\n");
-	DPRINT("Read linux/Documentation/floppy.txt\n");
-	return 0;
-}
-
-static int have_no_fdc= -ENODEV;
-
-static void floppy_device_release(struct device *dev)
-{
-	complete(&device_release);
-}
-
-static struct platform_device floppy_device = {
-	.name		= "floppy",
-	.id		= 0,
-	.dev		= {
-			.release = floppy_device_release,
-	},
-};
-
-static struct kobject *floppy_find(dev_t dev, int *part, void *data)
-{
-	int drive = (*part&3) | ((*part&0x80) >> 5);
-	if (drive >= N_DRIVE ||
-	    !(allowed_drive_mask & (1 << drive)) ||
-	    fdc_state[FDC(drive)].version == FDC_NONE)
-		return NULL;
-	if (((*part>>2) & 0x1f) >= NUMBER(floppy_type))
-		return NULL;
-	*part = 0;
-	return get_disk(disks[drive]);
-}
-
-int __init floppy_init(void)
-{
-	int i,unit,drive;
-	int err;
-
-	raw_cmd = NULL;
-	FDC1 = 0x90;
-
-	for (i=0; i<N_DRIVE; i++) {
-		disks[i] = alloc_disk(1);
-		if (!disks[i])
-			goto Enomem;
-	}
-
-	devfs_mk_dir (NULL, "floppy", NULL);
-	if ((err = register_blkdev(FLOPPY_MAJOR,"fd")))
-		goto out;
-
-	for (i=0; i<N_DRIVE; i++) {
-		disks[i]->major = FLOPPY_MAJOR;
-		disks[i]->first_minor = TOMINOR(i);
-		disks[i]->fops = &floppy_fops;
-		sprintf(disks[i]->disk_name, "fd%d", i);
-	}
-
-	blk_register_region(MKDEV(FLOPPY_MAJOR, 0), 256, THIS_MODULE,
-				floppy_find, NULL, NULL);
-
-	for (i=0; i<256; i++)
-		if (ITYPE(i))
-			floppy_sizes[i] = floppy_type[ITYPE(i)].size;
-		else
-			floppy_sizes[i] = MAX_DISK_SIZE << 1;
-
-	floppy_queue = blk_init_queue(do_fd_request, &floppy_lock);
-	if (!floppy_queue)
-		goto out_queue;
-
-	reschedule_timeout(MAXTIMEOUT, "floppy init", MAXTIMEOUT);
-	config_types();
-
-	for (i = 0; i < N_FDC; i++) {
-		fdc = i;
-		CLEARSTRUCT(FDCS);
-		FDCS->dtr = -1;
-		FDCS->dor = 0;
-	}
-
-	if ((fd_inb(FD_MODE_CHANGE) & 1) == 0)
-		FDC1 = 0xc8;
-
-	use_virtual_dma = can_use_virtual_dma & 1;
-	fdc_state[0].address = FDC1;
-	if (fdc_state[0].address == -1) {
-		err = -ENODEV;
-		goto out1;
-	}
-#if N_FDC > 1
-	fdc_state[1].address = FDC2;
-#endif
-
-	fdc = 0; /* reset fdc in case of unexpected interrupt */
-	if (floppy_grab_irq_and_dma()){
-		err = -EBUSY;
-		goto out1;
-	}
-
-	/* initialise drive state */
-	for (drive = 0; drive < N_DRIVE; drive++) {
-		CLEARSTRUCT(UDRS);
-		CLEARSTRUCT(UDRWE);
-		USETF(FD_DISK_NEWCHANGE);
-		USETF(FD_DISK_CHANGED);
-		USETF(FD_VERIFY);
-		UDRS->fd_device = -1;
-		floppy_track_buffer = NULL;
-		max_buffer_sectors = 0;
-	}
-
-	for (i = 0; i < N_FDC; i++) {
-		fdc = i;
-		FDCS->driver_version = FD_DRIVER_VERSION;
-		for (unit=0; unit<4; unit++)
-			FDCS->track[unit] = 0;
-		if (FDCS->address == -1)
-			continue;
-		FDCS->rawcmd = 2;
-		user_reset_fdc(-1, FD_RESET_ALWAYS, 0);
-
-		/* Try to determine the floppy controller type */
-		FDCS->version = get_fdc_version();
-		if (FDCS->version == FDC_NONE){
- 			/* free ioports reserved by floppy_grab_irq_and_dma() */
-			release_region(FDCS->address, 1);
-			release_region(FDCS->address + 2, 1);
-			release_region(FDCS->address + 4, 1);
-			release_region(0xbe, 1);
-			release_region(0x4be, 1);
-			FDCS->address = -1;
-			continue;
-		}
-		if (can_use_virtual_dma == 2 && FDCS->version < FDC_82072A)
-			can_use_virtual_dma = 0;
-
-		have_no_fdc = 0;
-		/* Not all FDCs seem to be able to handle the version command
-		 * properly, so force a reset for the standard FDC clones,
-		 * to avoid interrupt garbage.
-		 */
-		user_reset_fdc(-1,FD_RESET_ALWAYS,0);
-	}
-	fdc=0;
-	del_timer(&fd_timeout);
-	current_drive = 0;
-	floppy_release_irq_and_dma();
-#if 0  /* no message */
-	initialising=0;
-#endif
-	if (have_no_fdc) {
-		DPRINT("no floppy controllers found\n");
-		flush_scheduled_work();
-		if (usage_count)
-			floppy_release_irq_and_dma();
-		err = have_no_fdc;
-		goto out2;
-	}
-	
-	for (drive = 0; drive < N_DRIVE; drive++) {
-		init_timer(&motor_off_timer[drive]);
-		motor_off_timer[drive].data = drive;
-		motor_off_timer[drive].function = motor_off_callback;
-		if (!(allowed_drive_mask & (1 << drive)))
-			continue;
-		if (fdc_state[FDC(drive)].version == FDC_NONE)
-			continue;
-		/* to be cleaned up... */
-		disks[drive]->private_data = (void*)(long)drive;
-		disks[drive]->queue = floppy_queue;
-		add_disk(disks[drive]);
-	}
-
-	platform_device_register(&floppy_device);
-	return 0;
-
-out1:
-	del_timer_sync(&fd_timeout);
-out2:
-	blk_cleanup_queue(floppy_queue);
-out_queue:
-	blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
-	unregister_blkdev(FLOPPY_MAJOR,"fd");
-out:
-	for (i=0; i<N_DRIVE; i++)
-		put_disk(disks[i]);
-	return err;
-
-Enomem:
-	while (i--)
-		put_disk(disks[i]);
-	return -ENOMEM;
-}
-
-static spinlock_t floppy_usage_lock = SPIN_LOCK_UNLOCKED;
-
-static int floppy_grab_irq_and_dma(void)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&floppy_usage_lock, flags);
-	if (usage_count++){
-		spin_unlock_irqrestore(&floppy_usage_lock, flags);
-		return 0;
-	}
-	spin_unlock_irqrestore(&floppy_usage_lock, flags);
-	if (fd_request_irq()) {
-		DPRINT("Unable to grab IRQ%d for the floppy driver\n",
-			FLOPPY_IRQ);
-		spin_lock_irqsave(&floppy_usage_lock, flags);
-		usage_count--;
-		spin_unlock_irqrestore(&floppy_usage_lock, flags);
-		return -1;
-	}
-	if (fd_request_dma()) {
-		DPRINT("Unable to grab DMA%d for the floppy driver\n",
-			FLOPPY_DMA);
-		fd_free_irq();
-		spin_lock_irqsave(&floppy_usage_lock, flags);
-		usage_count--;
-		spin_unlock_irqrestore(&floppy_usage_lock, flags);
-		return -1;
-	}
-
-	for (fdc=0; fdc< N_FDC; fdc++){
-		if (FDCS->address != -1){
-			static char floppy[] = "floppy";
-			if (!request_region(FDCS->address, 1, floppy))
-				goto cleanup0;
-
-			if (!request_region(FDCS->address + 2, 1, floppy)) {
-				release_region(FDCS->address, 1);
-				goto cleanup0;
-			}
-
-			if (!request_region(FDCS->address + 4, 1, floppy)) {
-				release_region(FDCS->address, 1);
-				release_region(FDCS->address + 2, 1);
-				goto cleanup0;
-			}
-
-			if (fdc == 0) {  /* internal FDC */
-				if (request_region(0xbe, 1, "floppy mode change")) {
-					if (request_region(0x4be, 1, "floppy ex. mode change"))
-						continue;
-					else
-						DPRINT("Floppy io-port 0x4be in use\n");
-
-					release_region(0xbe, 1);
-				} else
-					DPRINT("Floppy io-port 0xbe in use\n");
-
-				release_region(FDCS->address, 1);
-				release_region(FDCS->address + 2, 1);
-				release_region(FDCS->address + 4, 1);
-			}
-
-			goto cleanup1;
-		}
-	}
-	for (fdc=0; fdc< N_FDC; fdc++){
-		if (FDCS->address != -1){
-			reset_fdc_info(1);
-			fd_outb(FDCS->dor, FD_MODE);
-		}
-	}
-	fdc = 0;
-	fd_outb((FDCS->dor & 8), FD_MODE);
-
-	for (fdc = 0; fdc < N_FDC; fdc++)
-		if (FDCS->address != -1)
-			fd_outb(FDCS->dor, FD_MODE);
-	/*
-	 *	The driver will try and free resources and relies on us
-	 *	to know if they were allocated or not.
-	 */
-	fdc = 0;
-	irqdma_allocated = 1;
-	return 0;
-
-cleanup0:
-	DPRINT("Floppy io-port 0x%04lx in use\n", FDCS->address);
-cleanup1:
-	fd_free_irq();
-	fd_free_dma();
-	while(--fdc >= 0) {
-		release_region(FDCS->address, 1);
-		release_region(FDCS->address + 2, 1);
-		release_region(FDCS->address + 4, 1);
-		if (fdc == 0) {
-			release_region(0x00be, 1);
-			release_region(0x04be, 1);
-		}
-	}
-	spin_lock_irqsave(&floppy_usage_lock, flags);
-	usage_count--;
-	spin_unlock_irqrestore(&floppy_usage_lock, flags);
-	return -1;
-}
-
-static void floppy_release_irq_and_dma(void)
-{
-	int old_fdc;
-#ifdef FLOPPY_SANITY_CHECK
-	int drive;
-#endif
-	long tmpsize;
-	unsigned long tmpaddr;
-	unsigned long flags;
-
-	spin_lock_irqsave(&floppy_usage_lock, flags);
-	if (--usage_count){
-		spin_unlock_irqrestore(&floppy_usage_lock, flags);
-		return;
-	}
-	spin_unlock_irqrestore(&floppy_usage_lock, flags);
-	if(irqdma_allocated)
-	{
-		fd_disable_dma();
-		fd_free_dma();
-		fd_free_irq();
-		irqdma_allocated=0;
-	}
-	fd_outb(0, FD_MODE);
-	floppy_enable_hlt();
-
-	if (floppy_track_buffer && max_buffer_sectors) {
-		tmpsize = max_buffer_sectors*1024;
-		tmpaddr = (unsigned long)floppy_track_buffer;
-		floppy_track_buffer = NULL;
-		max_buffer_sectors = 0;
-		buffer_min = buffer_max = -1;
-		fd_dma_mem_free(tmpaddr, tmpsize);
-	}
-
-#ifdef FLOPPY_SANITY_CHECK
-	for (drive=0; drive < N_FDC * 4; drive++)
-		if (timer_pending(motor_off_timer + drive))
-			printk("motor off timer %d still active\n", drive);
-
-	if (timer_pending(&fd_timeout))
-		printk("floppy timer still active:%s\n", timeout_message);
-	if (timer_pending(&fd_timer))
-		printk("auxiliary floppy timer still active\n");
-	if (floppy_work.pending)
-		printk("work still pending\n");
-#endif
-	old_fdc = fdc;
-	for (fdc = 0; fdc < N_FDC; fdc++)
-		if (FDCS->address != -1) {
-			release_region(FDCS->address, 1);
-			release_region(FDCS->address + 2, 1);
-			release_region(FDCS->address + 4, 1);
-			if (fdc == 0) {
-				release_region(0xbe, 1);
-				release_region(0x4be, 1);
-			}
-		}
-	fdc = old_fdc;
-}
-
-
-#ifdef MODULE
-
-char *floppy;
-
-static void unregister_devfs_entries (int drive)
-{
-    int i;
-
-    if (UDP->cmos < NUMBER(default_drive_params)) {
-	i = 0;
-	do {
-	    devfs_remove("floppy/%d%s", drive, table[table_sup[UDP->cmos][i]]);
-	} while (table_sup[UDP->cmos][i++]);
-    }
-}
-
-static void __init parse_floppy_cfg_string(char *cfg)
-{
-	char *ptr;
-
-	while(*cfg) {
-		for(ptr = cfg;*cfg && *cfg != ' ' && *cfg != '\t'; cfg++);
-		if (*cfg) {
-			*cfg = '\0';
-			cfg++;
-		}
-		if (*ptr)
-			floppy_setup(ptr);
-	}
-}
-
-int init_module(void)
-{
-	printk(KERN_INFO "inserting floppy driver for " UTS_RELEASE "\n");
-		
-	if (floppy)
-		parse_floppy_cfg_string(floppy);
-	return floppy_init();
-}
-
-void cleanup_module(void)
-{
-	int drive;
-		
-	init_completion(&device_release);
-	platform_device_unregister(&floppy_device);
-	blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
-	unregister_blkdev(FLOPPY_MAJOR, "fd");
-
-	for (drive = 0; drive < N_DRIVE; drive++) {
-		del_timer_sync(&motor_off_timer[drive]);
-
-		if ((allowed_drive_mask & (1 << drive)) &&
-		    fdc_state[FDC(drive)].version != FDC_NONE) {
-			del_gendisk(disks[drive]);
-			unregister_devfs_entries(drive);
-		}
-		put_disk(disks[drive]);
-	}
-	devfs_remove("floppy");
-
-	del_timer_sync(&fd_timeout);
-	del_timer_sync(&fd_timer);
-	blk_cleanup_queue(floppy_queue);
-
-	if (usage_count)
-		floppy_release_irq_and_dma();
-
-	/* eject disk, if any */
-	fd_eject(0);
-
-	wait_for_completion(&device_release);
-}
-
-MODULE_PARM(floppy,"s");
-MODULE_PARM(FLOPPY_IRQ,"i");
-MODULE_PARM(FLOPPY_DMA,"i");
-MODULE_AUTHOR("Osamu Tomita");
-MODULE_SUPPORTED_DEVICE("fd");
-MODULE_LICENSE("GPL");
-
-#else
-
-__setup ("floppy=", floppy_setup);
-module_init(floppy_init)
-#endif
--- diff/drivers/char/lp_old98.c	2004-05-19 22:11:34.000000000 +0100
+++ source/drivers/char/lp_old98.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,537 +0,0 @@
-/*
- *	linux/drivers/char/lp_old98.c
- *
- * printer port driver for ancient PC-9800s with no bidirectional port support
- *
- * Copyright (C)  1998,99  Kousuke Takai <tak@kmc.kyoto-u.ac.jp>,
- *			   Kyoto University Microcomputer Club
- *
- * This driver is based on and has compatibility with `lp.c',
- * generic PC printer port driver.
- */
-
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/config.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/major.h>
-#include <linux/sched.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
-#include <linux/ioport.h>
-#include <linux/fcntl.h>
-#include <linux/delay.h>
-#include <linux/console.h>
-#include <linux/fs.h>
-
-#include <asm/io.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
-
-#include <linux/lp.h>
-
-/*
- *  I/O port numbers
- */
-#define	LP_PORT_DATA	0x40
-#define	LP_PORT_STATUS	(LP_PORT_DATA + 2)
-#define	LP_PORT_STROBE	(LP_PORT_DATA + 4)
-#define LP_PORT_CONTROL	(LP_PORT_DATA + 6)
-
-#define	LP_PORT_H98MODE	0x0448
-#define	LP_PORT_EXTMODE	0x0149
-
-/*
- *  bit mask for I/O
- */
-#define	LP_MASK_nBUSY	(1 << 2)
-#define	LP_MASK_nSTROBE	(1 << 7)
-
-#define LP_CONTROL_ASSERT_STROBE	(0x0e)
-#define LP_CONTROL_NEGATE_STROBE	(0x0f)
-
-/*
- *  Acceptable maximum value for non-privileged user for LPCHARS ioctl.
- */
-#define LP_CHARS_NOPRIV_MAX	65535
-
-#define	DC1	'\x11'
-#define	DC3	'\x13'
-
-/* PC-9800s have at least and at most one old-style printer port. */
-static struct lp_struct lp = {
-	.flags	= LP_EXIST | LP_ABORTOPEN,
-	.chars	= LP_INIT_CHAR,
-	.time	= LP_INIT_TIME,
-	.wait	= LP_INIT_WAIT,
-};
-
-static	int	dc1_check;
-static spinlock_t lp_old98_lock = SPIN_LOCK_UNLOCKED;
-
-
-#undef LP_OLD98_DEBUG
-
-#ifdef CONFIG_PC9800_OLDLP_CONSOLE
-static struct console lp_old98_console;		/* defined later */
-static short saved_console_flags;
-#endif
-
-static DECLARE_WAIT_QUEUE_HEAD (lp_old98_waitq);
-
-static void lp_old98_timer_function(unsigned long data)
-{
-	if (inb(LP_PORT_STATUS) & LP_MASK_nBUSY)
-		wake_up_interruptible(&lp_old98_waitq);
-	else {
-		struct timer_list *t = (struct timer_list *) data;
-
-		t->expires = jiffies + 1;
-		add_timer(t);
-	}
-}
-
-static inline int lp_old98_wait_ready(void)
-{
-	struct timer_list timer;
-
-	init_timer(&timer);
-	timer.function = lp_old98_timer_function;
-	timer.expires = jiffies + 1;
-	timer.data = (unsigned long)&timer;
-	add_timer(&timer);
-	interruptible_sleep_on(&lp_old98_waitq);
-	del_timer(&timer);
-	return signal_pending(current);
-}
-
-static inline int lp_old98_char(char lpchar)
-{
-	unsigned long count = 0;
-#ifdef LP_STATS
-	int tmp;
-#endif
-
-	while (!(inb(LP_PORT_STATUS) & LP_MASK_nBUSY)) {
-		count++;
-		if (count >= lp.chars)
-			return 0;
-	}
-
-	outb(lpchar, LP_PORT_DATA);
-
-#ifdef LP_STATS
-	/*
-	 *  Update lp statsistics here (and between next two outb()'s).
-	 *  Time to compute it is part of storobe delay.
-	 */
-	if (count > lp.stats.maxwait) {
-#ifdef LP_OLD98_DEBUG
-		printk(KERN_DEBUG "lp_old98: success after %d counts.\n",
-		       count);
-#endif
-		lp.stats.maxwait = count;
-	}
-	count *= 256;
-	tmp = count - lp.stats.meanwait;
-	if (tmp < 0)
-		tmp = -tmp;
-#endif
-	ndelay(lp.wait);
-    
-	/* negate PSTB# (activate strobe)	*/
-	outb(LP_CONTROL_ASSERT_STROBE, LP_PORT_CONTROL);
-
-#ifdef LP_STATS
-	lp.stats.meanwait = (255 * lp.stats.meanwait + count + 128) / 256;
-	lp.stats.mdev = (127 * lp.stats.mdev + tmp + 64) / 128;
-	lp.stats.chars ++;
-#endif
-
-	ndelay(lp.wait);
-
-	/* assert PSTB# (deactivate strobe)	*/
-	outb(LP_CONTROL_NEGATE_STROBE, LP_PORT_CONTROL);
-
-	return 1;
-}
-
-static ssize_t lp_old98_write(struct file * file,
-			      const char * buf, size_t count,
-			      loff_t *dummy)
-{
-	unsigned long total_bytes_written = 0;
-
-	if (!access_ok(VERIFY_READ, buf, count))
-		return -EFAULT;
-
-#ifdef LP_STATS
-	if (jiffies - lp.lastcall > lp.time)
-		lp.runchars = 0;
-	lp.lastcall = jiffies;
-#endif
-
-	do {
-		unsigned long bytes_written = 0;
-		unsigned long copy_size
-			= (count < LP_BUFFER_SIZE ? count : LP_BUFFER_SIZE);
-
-		if (__copy_from_user(lp.lp_buffer, buf, copy_size))
-			return -EFAULT;
-
-		while (bytes_written < copy_size) {
-			if (lp_old98_char(lp.lp_buffer[bytes_written]))
-				bytes_written ++;
-			else {
-#ifdef LP_STATS
-				int rc = lp.runchars + bytes_written;
-
-				if (rc > lp.stats.maxrun)
-					lp.stats.maxrun = rc;
-
-				lp.stats.sleeps ++;
-#endif
-#ifdef LP_OLD98_DEBUG
-				printk(KERN_DEBUG
-				       "lp_old98: sleeping at %d characters"
-				       " for %d jiffies\n",
-				       lp.runchars, lp.time);
-				lp.runchars = 0;
-#endif
-				if (lp_old98_wait_ready())
-					return ((total_bytes_written
-						 + bytes_written)
-						? : -EINTR);
-			}
-		}
-		total_bytes_written += bytes_written;
-		buf += bytes_written;
-#ifdef LP_STATS
-		lp.runchars += bytes_written;
-#endif
-		count -= bytes_written;
-	} while (count > 0);
-
-	return total_bytes_written;
-}
-
-static int lp_old98_open(struct inode * inode, struct file * file)
-{
-	if (iminor(inode) != 0)
-		return -ENXIO;
-
-	if (lp.flags & LP_BUSY)
-		return -EBUSY;
-
-	if (dc1_check && (lp.flags & LP_ABORTOPEN)
-	    && !(file->f_flags & O_NONBLOCK)) {
-		/*
-		 *  Check whether printer is on-line.
-		 *  PC-9800's old style port have only BUSY# as status input,
-		 *  so that it is impossible to distinguish that the printer is
-		 *  ready and that the printer is off-line or not connected
-		 *  (in both case BUSY# is in the same state). So:
-		 *
-		 *    (1) output DC1 (0x11) to printer port and do strobe.
-		 *    (2) watch BUSY# line for a while. If BUSY# is pulled
-		 *	  down, the printer will be ready. Otherwise,
-		 *	  it will be off-line (or not connected, or power-off,
-		 *	   ...).
-		 *
-		 *  The source of this procedure:
-		 *	Terumasa KODAKA, Kazufumi SHIMIZU, Yu HAYAMI:
-		 *		`PC-9801 Super Technique', Ascii, 1992.
-		 */
-		int count;
-		unsigned long flags;
-
-		/* interrupts while check is fairly bad */
-		spin_lock_irqsave(&lp_old98_lock, flags);
-
-		if (!lp_old98_char(DC1)) {
-			spin_unlock_irqrestore(&lp_old98_lock, flags);
-			return -EBUSY;
-		}
-		count = (unsigned int)dc1_check > 10000 ? 10000 : dc1_check;
-		while (inb(LP_PORT_STATUS) & LP_MASK_nBUSY) {
-			if (--count == 0) {
-				spin_unlock_irqrestore(&lp_old98_lock, flags);
-				return -ENODEV;
-			}
-		}
-		spin_unlock_irqrestore(&lp_old98_lock, flags);
-	}
-
-	if ((lp.lp_buffer = kmalloc(LP_BUFFER_SIZE, GFP_KERNEL)) == NULL)
-		return -ENOMEM;
-
-	lp.flags |= LP_BUSY;
-
-#ifdef CONFIG_PC9800_OLDLP_CONSOLE
-	saved_console_flags = lp_old98_console.flags;
-	lp_old98_console.flags &= ~CON_ENABLED;
-#endif
-	return 0;
-}
-
-static int lp_old98_release(struct inode * inode, struct file * file)
-{
-	kfree(lp.lp_buffer);
-	lp.lp_buffer = NULL;
-	lp.flags &= ~LP_BUSY;
-#ifdef CONFIG_PC9800_OLDLP_CONSOLE
-	lp_old98_console.flags = saved_console_flags;
-#endif
-	return 0;
-}
-
-static int lp_old98_init_device(void)
-{
-	unsigned char data;
-
-	if ((data = inb(LP_PORT_EXTMODE)) != 0xFF && (data & 0x10)) {
-		printk(KERN_INFO
-		       "lp_old98: shutting down extended parallel port mode...\n");
-		outb(data & ~0x10, LP_PORT_EXTMODE);
-	}
-#ifdef	PC98_HW_H98
-	if ((pc98_hw_flags & PC98_HW_H98)
-	    && ((data = inb(LP_PORT_H98MODE)) & 0x01)) {
-		printk(KERN_INFO
-		       "lp_old98: shutting down H98 full centronics mode...\n");
-		outb(data & ~0x01, LP_PORT_H98MODE);
-	}
-#endif
-	return 0;
-}
-
-static int lp_old98_ioctl(struct inode *inode, struct file *file,
-			  unsigned int command, unsigned long arg)
-{
-	int retval = 0;
-
-	switch (command) {
-	case LPTIME:
-		lp.time = arg * HZ/100;
-		break;
-	case LPCHAR:
-		lp.chars = arg;
-		break;
-	case LPABORT:
-		if (arg)
-			lp.flags |= LP_ABORT;
-		else
-			lp.flags &= ~LP_ABORT;
-		break;
-	case LPABORTOPEN:
-		if (arg)
-			lp.flags |= LP_ABORTOPEN;
-		else
-			lp.flags &= ~LP_ABORTOPEN;
-		break;
-	case LPCAREFUL:
-		/* do nothing */
-		break;
-	case LPWAIT:
-		lp.wait = arg;
-		break;
-	case LPGETIRQ:
-		retval = put_user(0, (int *)arg);
-		break;
-	case LPGETSTATUS:
-		/*
-		 * convert PC-9800's status to IBM PC's one, so that tunelp(8)
-		 * works in the same way on this driver.
-		 */
-		retval = put_user((inb(LP_PORT_STATUS) & LP_MASK_nBUSY)
-					? (LP_PBUSY | LP_PERRORP) : LP_PERRORP,
-					(int *)arg);
-		break;
-	case LPRESET:
-		retval = lp_old98_init_device();
-		break;
-#ifdef LP_STATS
-	case LPGETSTATS:
-		if (copy_to_user((struct lp_stats *)arg, &lp.stats,
-				 sizeof(struct lp_stats)))
-			retval = -EFAULT;
-		else if (suser())
-			memset(&lp.stats, 0, sizeof(struct lp_stats));
-		break;
-#endif
-	case LPGETFLAGS:
-		retval = put_user(lp.flags, (int *)arg);
-		break;
-	case LPSETIRQ: 
-	default:
-		retval = -EINVAL;
-	}
-	return retval;
-}
-
-static struct file_operations lp_old98_fops = {
-	.owner		= THIS_MODULE,
-	.write		= lp_old98_write,
-	.ioctl		= lp_old98_ioctl,
-	.open		= lp_old98_open,
-	.release	= lp_old98_release,
-};
-
-/*
- *  Support for console on lp_old98
- */
-#ifdef CONFIG_PC9800_OLDLP_CONSOLE
-
-static inline void io_delay(void)
-{
-	unsigned char dummy;	/* actually not output */
-
-	asm volatile ("out%B0 %0,%1" : "=a"(dummy) : "N"(0x5f));
-}
-
-static void lp_old98_console_write(struct console *console,
-				    const char *s, unsigned int count)
-{
-	int i;
-	static unsigned int timeout_run = 0;
-
-	while (count) {
-		/* wait approx 1.2 seconds */
-		for (i = 2000000; !(inb(LP_PORT_STATUS) & LP_MASK_nBUSY);
-								io_delay())
-			if (!--i) {
-				if (++timeout_run >= 10)
-					/* disable forever... */
-					console->flags &= ~CON_ENABLED;
-				return;
-			}
-
-		timeout_run = 0;
-
-		if (*s == '\n') {
-			outb('\r', LP_PORT_DATA);
-			io_delay();
-			io_delay();
-			outb(LP_CONTROL_ASSERT_STROBE, LP_PORT_CONTROL);
-			io_delay();
-			io_delay();
-			outb(LP_CONTROL_NEGATE_STROBE, LP_PORT_CONTROL);
-			io_delay();
-			io_delay();
-			for (i = 1000000;
-					!(inb(LP_PORT_STATUS) & LP_MASK_nBUSY);
-					io_delay())
-				if (!--i)
-					return;
-		}
-
-		outb(*s++, LP_PORT_DATA);
-		io_delay();
-		io_delay();
-		outb(LP_CONTROL_ASSERT_STROBE, LP_PORT_CONTROL);
-		io_delay();
-		io_delay();
-		outb(LP_CONTROL_NEGATE_STROBE, LP_PORT_CONTROL);
-		io_delay();
-		io_delay();
-
-		--count;
-	}
-}
-
-static struct console lp_old98_console = {
-	.name	= "lp_old98",
-	.write	= lp_old98_console_write,
-	.flags	= CON_PRINTBUFFER,
-	.index	= -1,
-};
-
-#endif	/* console on lp_old98 */
-
-static int __init lp_old98_init(void)
-{
-	char *errmsg = "I/O ports already occupied, giving up.";
-
-#ifdef	PC98_HW_H98
-	if (pc98_hw_flags & PC98_HW_H98)
-	    if (!request_region(LP_PORT_H98MODE, 1, "lp_old98")
-		goto err1;
-#endif
-	if (!request_region(LP_PORT_DATA,   1, "lp_old98"))
-		goto err2;
-	if (!request_region(LP_PORT_STATUS, 1, "lp_old98"))
-		goto err3;
-	if (!request_region(LP_PORT_STROBE, 1, "lp_old98"))
-		goto err4;
-	if (!request_region(LP_PORT_EXTMODE, 1, "lp_old98"))
-		goto err5;
-	if (!register_chrdev(LP_MAJOR, "lp", &lp_old98_fops)) {
-#ifdef CONFIG_PC9800_OLDLP_CONSOLE
-		register_console(&lp_old98_console);
-		printk(KERN_INFO "lp_old98: console ready\n");
-#endif
-		/*
-		 * rest are not needed by this driver,
-		 * but for locking out other printer drivers...
-		 */
-		lp_old98_init_device();
-		return 0;
-	} else
-		errmsg = "unable to register device";
-
-	release_region(LP_PORT_EXTMODE, 1);
-err5:
-	release_region(LP_PORT_STROBE, 1);
-err4:
-	release_region(LP_PORT_STATUS, 1);
-err3:
-	release_region(LP_PORT_DATA, 1);
-err2:
-#ifdef	PC98_HW_H98
-	if (pc98_hw_flags & PC98_HW_H98)
-	    release_region(LP_PORT_H98MODE, 1);
-
-err1:
-#endif
-	printk(KERN_ERR "lp_old98: %s\n", errmsg);
-	return -EBUSY;
-}
-
-static void __exit lp_old98_exit(void)
-{
-#ifdef CONFIG_PC9800_OLDLP_CONSOLE
-	unregister_console(&lp_old98_console);
-#endif
-	unregister_chrdev(LP_MAJOR, "lp");
-
-	release_region(LP_PORT_DATA,   1);
-	release_region(LP_PORT_STATUS, 1);
-	release_region(LP_PORT_STROBE, 1);
-#ifdef	PC98_HW_H98
-	if (pc98_hw_flags & PC98_HW_H98)
-		release_region(LP_PORT_H98MODE, 1);
-#endif
-	release_region(LP_PORT_EXTMODE, 1);
-}
-
-#ifndef MODULE
-static int __init lp_old98_setup(char *str)
-{
-        int ints[4];
-
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0)
-		dc1_check = ints[1];
-        return 1;
-}
-__setup("lp_old98_dc1_check=", lp_old98_setup);
-#endif
-
-MODULE_PARM(dc1_check, "i");
-MODULE_AUTHOR("Kousuke Takai <tak@kmc.kyoto-u.ac.jp>");
-MODULE_DESCRIPTION("PC-9800 old printer port driver");
-MODULE_LICENSE("GPL");
-
-module_init(lp_old98_init);
-module_exit(lp_old98_exit);
--- diff/drivers/char/sn_serial.c	2004-06-30 14:25:45.000000000 +0100
+++ source/drivers/char/sn_serial.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,1028 +0,0 @@
-/*
- * C-Brick Serial Port (and console) driver for SGI Altix machines.
- *
- * This driver is NOT suitable for talking to the l1-controller for
- * anything other than 'console activities' --- please use the l1
- * driver for that.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2003 Silicon Graphics, Inc. All rights reserved.
- */
-
-#include <linux/config.h>
-#include <linux/interrupt.h>
-#include <linux/tty.h>
-#include <linux/serial.h>
-#include <linux/console.h>
-#include <linux/module.h>
-#include <linux/sysrq.h>
-#include <linux/circ_buf.h>
-#include <linux/serial_reg.h>
-#include <asm/uaccess.h>
-#include <asm/sn/sgi.h>
-#include <asm/sn/sn_sal.h>
-#include <asm/sn/pci/pciio.h>
-#include <asm/sn/simulator.h>
-#include <asm/sn/sn2/sn_private.h>
-
-#if defined(CONFIG_SGI_L1_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-static char sysrq_serial_str[] = "\eSYS";
-static char *sysrq_serial_ptr = sysrq_serial_str;
-static unsigned long sysrq_requested;
-#endif /* CONFIG_SGI_L1_SERIAL_CONSOLE && CONFIG_MAGIC_SYSRQ */
-
-/* minor device number */
-#define SN_SAL_MINOR 64
-
-/* number of characters left in xmit buffer before we ask for more */
-#define WAKEUP_CHARS 128
-
-/* number of characters we can transmit to the SAL console at a time */
-#define SN_SAL_MAX_CHARS 120
-
-#define SN_SAL_EVENT_WRITE_WAKEUP 0
-
-/* 64K, when we're asynch, it must be at least printk's LOG_BUF_LEN to
- * avoid losing chars, (always has to be a power of 2) */
-#define SN_SAL_BUFFER_SIZE (64 * (1 << 10))
-
-#define SN_SAL_UART_FIFO_DEPTH 16
-#define SN_SAL_UART_FIFO_SPEED_CPS 9600/10
-
-/* we don't kmalloc/get_free_page these as we want them available
- * before either of those are initialized */
-static char sn_xmit_buff_mem[SN_SAL_BUFFER_SIZE];
-
-struct volatile_circ_buf {
-	char *cb_buf;
-	int cb_head;
-	int cb_tail;
-};
-
-static struct volatile_circ_buf xmit = { .cb_buf = sn_xmit_buff_mem };
-static char sn_tmp_buffer[SN_SAL_BUFFER_SIZE];
-
-static struct tty_struct *sn_sal_tty;
-
-static struct timer_list sn_sal_timer;
-static int sn_sal_event; /* event type for task queue */
-
-static int sn_sal_is_asynch;
-static int sn_sal_irq;
-static spinlock_t sn_sal_lock = SPIN_LOCK_UNLOCKED;
-static int sn_total_tx_count;
-static int sn_total_rx_count;
-
-static void sn_sal_tasklet_action(unsigned long data);
-static DECLARE_TASKLET(sn_sal_tasklet, sn_sal_tasklet_action, 0);
-
-static unsigned long sn_interrupt_timeout;
-
-extern u64 master_node_bedrock_address;
-
-#undef DEBUG
-#ifdef DEBUG
-static int sn_debug_printf(const char *fmt, ...);
-#define DPRINTF(x...) sn_debug_printf(x)
-#else
-#define DPRINTF(x...) do { } while (0)
-#endif
-
-struct sn_sal_ops {
-	int (*sal_puts)(const char *s, int len);
-	int (*sal_getc)(void);
-	int (*sal_input_pending)(void);
-	void (*sal_wakeup_transmit)(void);
-};
-
-/* This is the pointer used. It is assigned to point to one of
- * the tables below.
- */
-static struct sn_sal_ops *sn_func;
-
-/* Prototypes */
-static int snt_hw_puts(const char *, int);
-static int snt_poll_getc(void);
-static int snt_poll_input_pending(void);
-static int snt_sim_puts(const char *, int);
-static int snt_sim_getc(void);
-static int snt_sim_input_pending(void);
-static int snt_intr_getc(void);
-static int snt_intr_input_pending(void);
-static void sn_intr_transmit_chars(void);
-
-/* A table for polling */
-static struct sn_sal_ops poll_ops = {
-	.sal_puts		= snt_hw_puts,
-	.sal_getc		= snt_poll_getc,
-	.sal_input_pending	= snt_poll_input_pending
-};
-
-/* A table for the simulator */
-static struct sn_sal_ops sim_ops = {
-	.sal_puts		= snt_sim_puts,
-	.sal_getc		= snt_sim_getc,
-	.sal_input_pending	= snt_sim_input_pending
-};
-
-/* A table for interrupts enabled */
-static struct sn_sal_ops intr_ops = {
-	.sal_puts		= snt_hw_puts,
-	.sal_getc		= snt_intr_getc,
-	.sal_input_pending	= snt_intr_input_pending,
-	.sal_wakeup_transmit	= sn_intr_transmit_chars
-};
-
-
-/* the console does output in two distinctly different ways:
- * synchronous and asynchronous (buffered).  initally, early_printk
- * does synchronous output.  any data written goes directly to the SAL
- * to be output (incidentally, it is internally buffered by the SAL)
- * after interrupts and timers are initialized and available for use,
- * the console init code switches to asynchronous output.  this is
- * also the earliest opportunity to begin polling for console input.
- * after console initialization, console output and tty (serial port)
- * output is buffered and sent to the SAL asynchronously (either by
- * timer callback or by UART interrupt) */
-
-
-/* routines for running the console in polling mode */
-
-static int
-snt_hw_puts(const char *s, int len)
-{
-	/* looking at the PROM source code, putb calls the flush
-	 * routine, so if we send characters in FIFO sized chunks, it
-	 * should go out by the next time the timer gets called */
-	return ia64_sn_console_putb(s, len);
-}
-
-static int
-snt_poll_getc(void)
-{
-	int ch;
-	ia64_sn_console_getc(&ch);
-	return ch;
-}
-
-static int
-snt_poll_input_pending(void)
-{
-	int status, input;
-
-	status = ia64_sn_console_check(&input);
-	return !status && input;
-}
-
-
-/* routines for running the console on the simulator */
-
-static int
-snt_sim_puts(const char *str, int count)
-{
-	int counter = count;
-
-#ifdef FLAG_DIRECT_CONSOLE_WRITES
-	/* This is an easy way to pre-pend the output to know whether the output
-	 * was done via sal or directly */
-	writeb('[', master_node_bedrock_address + (UART_TX << 3));
-	writeb('+', master_node_bedrock_address + (UART_TX << 3));
-	writeb(']', master_node_bedrock_address + (UART_TX << 3));
-	writeb(' ', master_node_bedrock_address + (UART_TX << 3));
-#endif /* FLAG_DIRECT_CONSOLE_WRITES */
-	while (counter > 0) {
-		writeb(*str, master_node_bedrock_address + (UART_TX << 3));
-		counter--;
-		str++;
-	}
-
-	return count;
-}
-
-static int
-snt_sim_getc(void)
-{
-	return readb(master_node_bedrock_address + (UART_RX << 3));
-}
-
-static int
-snt_sim_input_pending(void)
-{
-	return readb(master_node_bedrock_address + (UART_LSR << 3)) & UART_LSR_DR;
-}
-
-
-/* routines for an interrupt driven console (normal) */
-
-static int
-snt_intr_getc(void)
-{
-	return ia64_sn_console_readc();
-}
-
-static int
-snt_intr_input_pending(void)
-{
-	return ia64_sn_console_intr_status() & SAL_CONSOLE_INTR_RECV;
-}
-
-/* The early printk (possible setup) and function call */
-
-void
-early_printk_sn_sal(const char *s, unsigned count)
-{
-	extern void early_sn_setup(void);
-
-	if (!sn_func) {
-		if (IS_RUNNING_ON_SIMULATOR())
-			sn_func = &sim_ops;
-		else
-			sn_func = &poll_ops;
-
-		early_sn_setup();
-	}
-	sn_func->sal_puts(s, count);
-}
-
-#ifdef DEBUG
-/* this is as "close to the metal" as we can get, used when the driver
- * itself may be broken */
-static int
-sn_debug_printf(const char *fmt, ...)
-{
-	static char printk_buf[1024];
-	int printed_len;
-	va_list args;
-
-	va_start(args, fmt);
-	printed_len = vscnprintf(printk_buf, sizeof(printk_buf), fmt, args);
-	early_printk_sn_sal(printk_buf, printed_len);
-	va_end(args);
-	return printed_len;
-}
-#endif /* DEBUG */
-
-/*
- * Interrupt handling routines.
- */
-
-static void
-sn_sal_sched_event(int event)
-{
-	sn_sal_event |= (1 << event);
-	tasklet_schedule(&sn_sal_tasklet);
-}
-
-/* sn_receive_chars can be called before sn_sal_tty is initialized.  in
- * that case, its only use is to trigger sysrq and kdb */
-static void
-sn_receive_chars(struct pt_regs *regs, unsigned long *flags)
-{
-	int ch;
-
-	while (sn_func->sal_input_pending()) {
-		ch = sn_func->sal_getc();
-		if (ch < 0) {
-			printk(KERN_ERR "sn_serial: An error occured while "
-			       "obtaining data from the console (0x%0x)\n", ch);
-			break;
-		}
-#if defined(CONFIG_SGI_L1_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-		if (sysrq_requested) {
-			unsigned long sysrq_timeout = sysrq_requested + HZ*5;
-
-			sysrq_requested = 0;
-			if (ch && time_before(jiffies, sysrq_timeout)) {
-				spin_unlock_irqrestore(&sn_sal_lock, *flags);
-				handle_sysrq(ch, regs, NULL);
-				spin_lock_irqsave(&sn_sal_lock, *flags);
-				/* don't record this char */
-				continue;
-			}
-		}
-		if (ch == *sysrq_serial_ptr) {
-			if (!(*++sysrq_serial_ptr)) {
-				sysrq_requested = jiffies;
-				sysrq_serial_ptr = sysrq_serial_str;
-			}
-		}
-		else
-			sysrq_serial_ptr = sysrq_serial_str;
-#endif /* CONFIG_SGI_L1_SERIAL_CONSOLE && CONFIG_MAGIC_SYSRQ */
-
-		/* record the character to pass up to the tty layer */
-		if (sn_sal_tty) {
-			*sn_sal_tty->flip.char_buf_ptr = ch;
-			sn_sal_tty->flip.char_buf_ptr++;
-			sn_sal_tty->flip.count++;
-			if (sn_sal_tty->flip.count == TTY_FLIPBUF_SIZE)
-				break;
-		}
-		sn_total_rx_count++;
-	}
-
-	if (sn_sal_tty)
-		tty_flip_buffer_push((struct tty_struct *)sn_sal_tty);
-}
-
-
-/* synch_flush_xmit must be called with sn_sal_lock */
-static void
-synch_flush_xmit(void)
-{
-	int xmit_count, tail, head, loops, ii;
-	int result;
-	char *start;
-
-	if (xmit.cb_head == xmit.cb_tail)
-		return; /* Nothing to do. */
-
-	head = xmit.cb_head;
-	tail = xmit.cb_tail;
-	start = &xmit.cb_buf[tail];
-
-	/* twice around gets the tail to the end of the buffer and
-	 * then to the head, if needed */
-	loops = (head < tail) ? 2 : 1;
-
-	for (ii = 0; ii < loops; ii++) {
-		xmit_count = (head < tail) ?  (SN_SAL_BUFFER_SIZE - tail) : (head - tail);
-
-		if (xmit_count > 0) {
-			result = sn_func->sal_puts((char *)start, xmit_count);
-			if (!result)
-				DPRINTF("\n*** synch_flush_xmit failed to flush\n");
-			if (result > 0) {
-				xmit_count -= result;
-				sn_total_tx_count += result;
-				tail += result;
-				tail &= SN_SAL_BUFFER_SIZE - 1;
-				xmit.cb_tail = tail;
-				start = (char *)&xmit.cb_buf[tail];
-			}
-		}
-	}
-}
-
-/* must be called with a lock protecting the circular buffer and
- * sn_sal_tty */
-static void
-sn_poll_transmit_chars(void)
-{
-	int xmit_count, tail, head;
-	int result;
-	char *start;
-
-	BUG_ON(!sn_sal_is_asynch);
-
-	if (xmit.cb_head == xmit.cb_tail ||
-	    (sn_sal_tty && (sn_sal_tty->stopped || sn_sal_tty->hw_stopped))) {
-		/* Nothing to do. */
-		return;
-	}
-
-	head = xmit.cb_head;
-	tail = xmit.cb_tail;
-	start = &xmit.cb_buf[tail];
-
-	xmit_count = (head < tail) ?  (SN_SAL_BUFFER_SIZE - tail) : (head - tail);
-
-	if (xmit_count == 0)
-		DPRINTF("\n*** empty xmit_count\n");
-
-	/* use the ops, as we could be on the simulator */
-	result = sn_func->sal_puts((char *)start, xmit_count);
-	if (!result)
-		DPRINTF("\n*** error in synchronous sal_puts\n");
-	/* XXX chadt clean this up */
-	if (result > 0) {
-		xmit_count -= result;
-		sn_total_tx_count += result;
-		tail += result;
-		tail &= SN_SAL_BUFFER_SIZE - 1;
-		xmit.cb_tail = tail;
-		start = &xmit.cb_buf[tail];
-	}
-
-	/* if there's few enough characters left in the xmit buffer
-	 * that we could stand for the upper layer to send us some
-	 * more, ask for it. */
-	if (sn_sal_tty)
-		if (CIRC_CNT(xmit.cb_head, xmit.cb_tail, SN_SAL_BUFFER_SIZE) < WAKEUP_CHARS)
-			sn_sal_sched_event(SN_SAL_EVENT_WRITE_WAKEUP);
-}
-
-
-/* must be called with a lock protecting the circular buffer and
- * sn_sal_tty */
-static void
-sn_intr_transmit_chars(void)
-{
-	int xmit_count, tail, head, loops, ii;
-	int result;
-	char *start;
-
-	BUG_ON(!sn_sal_is_asynch);
-
-	if (xmit.cb_head == xmit.cb_tail ||
-	    (sn_sal_tty && (sn_sal_tty->stopped || sn_sal_tty->hw_stopped))) {
-		/* Nothing to do. */
-		return;
-	}
-
-	head = xmit.cb_head;
-	tail = xmit.cb_tail;
-	start = &xmit.cb_buf[tail];
-
-	/* twice around gets the tail to the end of the buffer and
-	 * then to the head, if needed */
-	loops = (head < tail) ? 2 : 1;
-
-	for (ii = 0; ii < loops; ii++) {
-		xmit_count = (head < tail) ?
-			(SN_SAL_BUFFER_SIZE - tail) : (head - tail);
-
-		if (xmit_count > 0) {
-			result = ia64_sn_console_xmit_chars((char *)start, xmit_count);
-#ifdef DEBUG
-			if (!result)
-				DPRINTF("`");
-#endif
-			if (result > 0) {
-				xmit_count -= result;
-				sn_total_tx_count += result;
-				tail += result;
-				tail &= SN_SAL_BUFFER_SIZE - 1;
-				xmit.cb_tail = tail;
-				start = &xmit.cb_buf[tail];
-			}
-		}
-	}
-
-	/* if there's few enough characters left in the xmit buffer
-	 * that we could stand for the upper layer to send us some
-	 * more, ask for it. */
-	if (sn_sal_tty)
-		if (CIRC_CNT(xmit.cb_head, xmit.cb_tail, SN_SAL_BUFFER_SIZE) < WAKEUP_CHARS)
-			sn_sal_sched_event(SN_SAL_EVENT_WRITE_WAKEUP);
-}
-
-
-static irqreturn_t
-sn_sal_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	/* this call is necessary to pass the interrupt back to the
-	 * SAL, since it doesn't intercept the UART interrupts
-	 * itself */
-	int status = ia64_sn_console_intr_status();
-	unsigned long flags;
-
-	spin_lock_irqsave(&sn_sal_lock, flags);
-	if (status & SAL_CONSOLE_INTR_RECV)
-		sn_receive_chars(regs, &flags);
-	if (status & SAL_CONSOLE_INTR_XMIT)
-		sn_intr_transmit_chars();
-	spin_unlock_irqrestore(&sn_sal_lock, flags);
-	return IRQ_HANDLED;
-}
-
-
-/* returns the console irq if interrupt is successfully registered,
- * else 0 */
-static int
-sn_sal_connect_interrupt(void)
-{
-	cpuid_t intr_cpuid;
-	unsigned int intr_cpuloc;
-	nasid_t console_nasid;
-	unsigned int console_irq;
-	int result;
-
-	console_nasid = ia64_sn_get_console_nasid();
-	intr_cpuid = first_cpu(node_to_cpumask(nasid_to_cnodeid(console_nasid)));
-	intr_cpuloc = cpu_physical_id(intr_cpuid);
-	console_irq = CPU_VECTOR_TO_IRQ(intr_cpuloc, SGI_UART_VECTOR);
-
-	result = intr_connect_level(intr_cpuid, SGI_UART_VECTOR);
-	BUG_ON(result != SGI_UART_VECTOR);
-
-	result = request_irq(console_irq, sn_sal_interrupt, SA_INTERRUPT,  "SAL console driver", &sn_sal_tty);
-	if (result >= 0)
-		return console_irq;
-
-	printk(KERN_WARNING "sn_serial: console proceeding in polled mode\n");
-	return 0;
-}
-
-static void
-sn_sal_tasklet_action(unsigned long data)
-{
-	unsigned long flags;
-
-	if (sn_sal_tty) {
-		spin_lock_irqsave(&sn_sal_lock, flags);
-		if (sn_sal_tty) {
-			if (test_and_clear_bit(SN_SAL_EVENT_WRITE_WAKEUP, &sn_sal_event)) {
-				if ((sn_sal_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && sn_sal_tty->ldisc.write_wakeup)
-					(sn_sal_tty->ldisc.write_wakeup)((struct tty_struct *)sn_sal_tty);
-				wake_up_interruptible((wait_queue_head_t *)&sn_sal_tty->write_wait);
-			}
-		}
-		spin_unlock_irqrestore(&sn_sal_lock, flags);
-	}
-}
-
-
-/*
- * This function handles polled mode.
- */
-static void
-sn_sal_timer_poll(unsigned long dummy)
-{
-	unsigned long flags;
-
-	if (!sn_sal_irq) {
-		spin_lock_irqsave(&sn_sal_lock, flags);
-		sn_receive_chars(NULL, &flags);
-		sn_poll_transmit_chars();
-		spin_unlock_irqrestore(&sn_sal_lock, flags);
-		mod_timer(&sn_sal_timer, jiffies + sn_interrupt_timeout);
-	}
-}
-
-
-/*
- * User-level console routines
- */
-
-static int
-sn_sal_open(struct tty_struct *tty, struct file *filp)
-{
-	unsigned long flags;
-
-	DPRINTF("sn_sal_open: sn_sal_tty = %p, tty = %p, filp = %p\n",
-		sn_sal_tty, tty, filp);
-
-	spin_lock_irqsave(&sn_sal_lock, flags);
-	if (!sn_sal_tty)
-		sn_sal_tty = tty;
-	spin_unlock_irqrestore(&sn_sal_lock, flags);
-
-	return 0;
-}
-
-
-/* We're keeping all our resources.  We're keeping interrupts turned
- * on.  Maybe just let the tty layer finish its stuff...? GMSH
- */
-static void
-sn_sal_close(struct tty_struct *tty, struct file * filp)
-{
-	if (tty->count == 1) {
-		unsigned long flags;
-		tty->closing = 1;
-		if (tty->driver->flush_buffer)
-			tty->driver->flush_buffer(tty);
-		if (tty->ldisc.flush_buffer)
-			tty->ldisc.flush_buffer(tty);
-		tty->closing = 0;
-		spin_lock_irqsave(&sn_sal_lock, flags);
-		sn_sal_tty = NULL;
-		spin_unlock_irqrestore(&sn_sal_lock, flags);
-	}
-}
-
-
-static int
-sn_sal_write(struct tty_struct *tty, int from_user,
-	     const unsigned char *buf, int count)
-{
-	int c, ret = 0;
-	unsigned long flags;
-
-	if (from_user) {
-		while (1) {
-			int c1;
-			c = CIRC_SPACE_TO_END(xmit.cb_head, xmit.cb_tail,
-					      SN_SAL_BUFFER_SIZE);
-
-			if (count < c)
-				c = count;
-			if (c <= 0)
-				break;
-
-			c -= copy_from_user(sn_tmp_buffer, buf, c);
-			if (!c) {
-				if (!ret)
-					ret = -EFAULT;
-				break;
-			}
-
-			/* Turn off interrupts and see if the xmit buffer has
-			 * moved since the last time we looked.
-			 */
-			spin_lock_irqsave(&sn_sal_lock, flags);
-			c1 = CIRC_SPACE_TO_END(xmit.cb_head, xmit.cb_tail, SN_SAL_BUFFER_SIZE);
-
-			if (c1 < c)
-				c = c1;
-
-			memcpy(xmit.cb_buf + xmit.cb_head, sn_tmp_buffer, c);
-			xmit.cb_head = ((xmit.cb_head + c) & (SN_SAL_BUFFER_SIZE - 1));
-			spin_unlock_irqrestore(&sn_sal_lock, flags);
-
-			buf += c;
-			count -= c;
-			ret += c;
-		}
-	}
-	else {
-		/* The buffer passed in isn't coming from userland,
-		 * so cut out the middleman (sn_tmp_buffer).
-		 */
-		spin_lock_irqsave(&sn_sal_lock, flags);
-		while (1) {
-			c = CIRC_SPACE_TO_END(xmit.cb_head, xmit.cb_tail, SN_SAL_BUFFER_SIZE);
-
-			if (count < c)
-				c = count;
-			if (c <= 0) {
-				break;
-			}
-			memcpy(xmit.cb_buf + xmit.cb_head, buf, c);
-			xmit.cb_head = ((xmit.cb_head + c) & (SN_SAL_BUFFER_SIZE - 1));
-			buf += c;
-			count -= c;
-			ret += c;
-		}
-		spin_unlock_irqrestore(&sn_sal_lock, flags);
-	}
-
-	spin_lock_irqsave(&sn_sal_lock, flags);
-	if (xmit.cb_head != xmit.cb_tail && !(tty && (tty->stopped || tty->hw_stopped)))
-		if (sn_func->sal_wakeup_transmit)
-			sn_func->sal_wakeup_transmit();
-	spin_unlock_irqrestore(&sn_sal_lock, flags);
-
-	return ret;
-}
-
-
-static void
-sn_sal_put_char(struct tty_struct *tty, unsigned char ch)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&sn_sal_lock, flags);
-	if (CIRC_SPACE(xmit.cb_head, xmit.cb_tail, SN_SAL_BUFFER_SIZE) != 0) {
-		xmit.cb_buf[xmit.cb_head] = ch;
-		xmit.cb_head = (xmit.cb_head + 1) & (SN_SAL_BUFFER_SIZE-1);
-		if ( sn_func->sal_wakeup_transmit )
-			sn_func->sal_wakeup_transmit();
-	}
-	spin_unlock_irqrestore(&sn_sal_lock, flags);
-}
-
-
-static void
-sn_sal_flush_chars(struct tty_struct *tty)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&sn_sal_lock, flags);
-	if (CIRC_CNT(xmit.cb_head, xmit.cb_tail, SN_SAL_BUFFER_SIZE))
-		if (sn_func->sal_wakeup_transmit)
-			sn_func->sal_wakeup_transmit();
-	spin_unlock_irqrestore(&sn_sal_lock, flags);
-}
-
-
-static int
-sn_sal_write_room(struct tty_struct *tty)
-{
-	unsigned long flags;
-	int space;
-
-	spin_lock_irqsave(&sn_sal_lock, flags);
-	space = CIRC_SPACE(xmit.cb_head, xmit.cb_tail, SN_SAL_BUFFER_SIZE);
-	spin_unlock_irqrestore(&sn_sal_lock, flags);
-	return space;
-}
-
-
-static int
-sn_sal_chars_in_buffer(struct tty_struct *tty)
-{
-	unsigned long flags;
-	int space;
-
-	spin_lock_irqsave(&sn_sal_lock, flags);
-	space = CIRC_CNT(xmit.cb_head, xmit.cb_tail, SN_SAL_BUFFER_SIZE);
-	DPRINTF("<%d>", space);
-	spin_unlock_irqrestore(&sn_sal_lock, flags);
-	return space;
-}
-
-
-static void
-sn_sal_flush_buffer(struct tty_struct *tty)
-{
-	unsigned long flags;
-
-	/* drop everything */
-	spin_lock_irqsave(&sn_sal_lock, flags);
-	xmit.cb_head = xmit.cb_tail = 0;
-	spin_unlock_irqrestore(&sn_sal_lock, flags);
-
-	/* wake up tty level */
-	wake_up_interruptible(&tty->write_wait);
-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
-		(tty->ldisc.write_wakeup)(tty);
-}
-
-
-static void
-sn_sal_hangup(struct tty_struct *tty)
-{
-	sn_sal_flush_buffer(tty);
-}
-
-
-static void
-sn_sal_wait_until_sent(struct tty_struct *tty, int timeout)
-{
-	/* this is SAL's problem */
-	DPRINTF("<sn_serial: should wait until sent>");
-}
-
-
-/*
- * sn_sal_read_proc
- *
- * Console /proc interface
- */
-
-static int
-sn_sal_read_proc(char *page, char **start, off_t off, int count,
-		   int *eof, void *data)
-{
-	int len = 0;
-	off_t	begin = 0;
-
-	len += sprintf(page, "sn_serial: nasid:%ld irq:%d tx:%d rx:%d\n",
-		       ia64_sn_get_console_nasid(), sn_sal_irq,
-		       sn_total_tx_count, sn_total_rx_count);
-	*eof = 1;
-
-	if (off >= len+begin)
-		return 0;
-	*start = page + (off-begin);
-
-	return count < begin+len-off ? count : begin+len-off;
-}
-
-
-static struct tty_operations sn_sal_driver_ops = {
-	.open		 = sn_sal_open,
-	.close		 = sn_sal_close,
-	.write		 = sn_sal_write,
-	.put_char	 = sn_sal_put_char,
-	.flush_chars	 = sn_sal_flush_chars,
-	.write_room	 = sn_sal_write_room,
-	.chars_in_buffer = sn_sal_chars_in_buffer,
-	.hangup		 = sn_sal_hangup,
-	.wait_until_sent = sn_sal_wait_until_sent,
-	.read_proc	 = sn_sal_read_proc,
-};
-static struct tty_driver *sn_sal_driver;
-
-/* sn_sal_init wishlist:
- * - allocate sn_tmp_buffer
- * - fix up the tty_driver struct
- * - turn on receive interrupts
- * - do any termios twiddling once and for all
- */
-
-/*
- * Boot-time initialization code
- */
-
-static void __init
-sn_sal_switch_to_asynch(void)
-{
-	unsigned long flags;
-
-	/* without early_printk, we may be invoked late enough to race
-	 * with other cpus doing console IO at this point, however
-	 * console interrupts will never be enabled */
-	spin_lock_irqsave(&sn_sal_lock, flags);
-
-	if (sn_sal_is_asynch) {
-		spin_unlock_irqrestore(&sn_sal_lock, flags);
-		return;
-	}
-
-	DPRINTF("sn_serial: switch to asynchronous console\n");
-
-	/* early_printk invocation may have done this for us */
-	if (!sn_func) {
-		if (IS_RUNNING_ON_SIMULATOR())
-			sn_func = &sim_ops;
-		else
-			sn_func = &poll_ops;
-	}
-
-	/* we can't turn on the console interrupt (as request_irq
-	 * calls kmalloc, which isn't set up yet), so we rely on a
-	 * timer to poll for input and push data from the console
-	 * buffer.
-	 */
-	init_timer(&sn_sal_timer);
-	sn_sal_timer.function = sn_sal_timer_poll;
-
-	if (IS_RUNNING_ON_SIMULATOR())
-		sn_interrupt_timeout = 6;
-	else {
-		/* 960cps / 16 char FIFO = 60HZ
-		 * HZ / (SN_SAL_FIFO_SPEED_CPS / SN_SAL_FIFO_DEPTH) */
-		sn_interrupt_timeout = HZ * SN_SAL_UART_FIFO_DEPTH / SN_SAL_UART_FIFO_SPEED_CPS;
-	}
-	mod_timer(&sn_sal_timer, jiffies + sn_interrupt_timeout);
-
-	sn_sal_is_asynch = 1;
-	spin_unlock_irqrestore(&sn_sal_lock, flags);
-}
-
-static void __init
-sn_sal_switch_to_interrupts(void)
-{
-	int irq;
-
-	DPRINTF("sn_serial: switching to interrupt driven console\n");
-
-	irq = sn_sal_connect_interrupt();
-	if (irq) {
-		unsigned long flags;
-		spin_lock_irqsave(&sn_sal_lock, flags);
-
-		/* sn_sal_irq is a global variable.  When it's set to
-		 * a non-zero value, we stop polling for input (since
-		 * interrupts should now be enabled). */
-		sn_sal_irq = irq;
-		sn_func = &intr_ops;
-
-		/* turn on receive interrupts */
-		ia64_sn_console_intr_enable(SAL_CONSOLE_INTR_RECV);
-		spin_unlock_irqrestore(&sn_sal_lock, flags);
-	}
-}
-
-static int __init
-sn_sal_module_init(void)
-{
-	int retval;
-
-	DPRINTF("sn_serial: sn_sal_module_init\n");
-
-	if (!ia64_platform_is("sn2"))
-		return -ENODEV;
-
-	sn_sal_driver = alloc_tty_driver(1);
-	if ( !sn_sal_driver )
-		return -ENOMEM;
-
-	sn_sal_driver->owner = THIS_MODULE;
-	sn_sal_driver->driver_name = "sn_serial";
-	sn_sal_driver->name = "ttyS";
-	sn_sal_driver->major = TTY_MAJOR;
-	sn_sal_driver->minor_start = SN_SAL_MINOR;
-	sn_sal_driver->type = TTY_DRIVER_TYPE_SERIAL;
-	sn_sal_driver->subtype = SERIAL_TYPE_NORMAL;
-	sn_sal_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
-
-	tty_set_operations(sn_sal_driver, &sn_sal_driver_ops);
-
-	/* when this driver is compiled in, the console initialization
-	 * will have already switched us into asynchronous operation
-	 * before we get here through the module initcalls */
-	sn_sal_switch_to_asynch();
-
-	/* at this point (module_init) we can try to turn on interrupts */
-	if (!IS_RUNNING_ON_SIMULATOR())
-	    sn_sal_switch_to_interrupts();
-
-	sn_sal_driver->init_termios = tty_std_termios;
-	sn_sal_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-
-	if ((retval = tty_register_driver(sn_sal_driver))) {
-		printk(KERN_ERR "sn_serial: Unable to register tty driver\n");
-		return retval;
-	}
-	return 0;
-}
-
-
-static void __exit
-sn_sal_module_exit(void)
-{
-	del_timer_sync(&sn_sal_timer);
-	tty_unregister_driver(sn_sal_driver);
-	put_tty_driver(sn_sal_driver);
-}
-
-module_init(sn_sal_module_init);
-module_exit(sn_sal_module_exit);
-
-/*
- * Kernel console definitions
- */
-
-#ifdef CONFIG_SGI_L1_SERIAL_CONSOLE
-/*
- * Print a string to the SAL console.  The console_lock must be held
- * when we get here.
- */
-static void
-sn_sal_console_write(struct console *co, const char *s, unsigned count)
-{
-	unsigned long flags;
-	const char *s1;
-
-	BUG_ON(!sn_sal_is_asynch);
-
-	/* somebody really wants this output, might be an
-	 * oops, kdb, panic, etc.  make sure they get it. */
-	if (spin_is_locked(&sn_sal_lock)) {
-		synch_flush_xmit();
-		/* Output '\r' before each '\n' */
-		while ((s1 = memchr(s, '\n', count)) != NULL) {
-			sn_func->sal_puts(s, s1 - s);
-			sn_func->sal_puts("\r\n", 2);
-			count -= s1 + 1 - s;
-			s = s1 + 1;
-		}
-		sn_func->sal_puts(s, count);
-	}
-	else if (in_interrupt()) {
-		spin_lock_irqsave(&sn_sal_lock, flags);
-		synch_flush_xmit();
-		spin_unlock_irqrestore(&sn_sal_lock, flags);
-		/* Output '\r' before each '\n' */
-		while ((s1 = memchr(s, '\n', count)) != NULL) {
-			sn_func->sal_puts(s, s1 - s);
-			sn_func->sal_puts("\r\n", 2);
-			count -= s1 + 1 - s;
-			s = s1 + 1;
-		}
-		sn_func->sal_puts(s, count);
-	}
-	else {
-		/* Output '\r' before each '\n' */
-		while ((s1 = memchr(s, '\n', count)) != NULL) {
-			sn_sal_write(NULL, 0, s, s1 - s);
-			sn_sal_write(NULL, 0, "\r\n", 2);
-			count -= s1 + 1 - s;
-			s = s1 + 1;
-		}
-		sn_sal_write(NULL, 0, s, count);
-	}
-}
-
-static struct tty_driver *
-sn_sal_console_device(struct console *c, int *index)
-{
-	*index = c->index;
-	return sn_sal_driver;
-}
-
-static int __init
-sn_sal_console_setup(struct console *co, char *options)
-{
-	return 0;
-}
-
-
-static struct console sal_console = {
-	.name = "ttyS",
-	.write = sn_sal_console_write,
-	.device = sn_sal_console_device,
-	.setup = sn_sal_console_setup,
-	.index = -1
-};
-
-static int __init
-sn_sal_serial_console_init(void)
-{
-	if (ia64_platform_is("sn2")) {
-		sn_sal_switch_to_asynch();
-		DPRINTF("sn_sal_serial_console_init : register console\n");
-		register_console(&sal_console);
-	}
-	return 0;
-}
-console_initcall(sn_sal_serial_console_init);
-
-#endif /* CONFIG_SGI_L1_SERIAL_CONSOLE */
--- diff/drivers/char/upd4990a.c	2004-05-19 22:11:35.000000000 +0100
+++ source/drivers/char/upd4990a.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,432 +0,0 @@
-/*
- * NEC PC-9800 Real Time Clock interface for Linux	
- *
- * Copyright (C) 1997-2001  Linux/98 project,
- *			    Kyoto University Microcomputer Club.
- *
- * Based on:
- *	drivers/char/rtc.c by Paul Gortmaker
- *
- * Changes:
- *  2001-02-09	Call check_region on rtc_init and do not request I/O 0033h.
- *		Call del_timer and release_region on rtc_exit. -- tak
- *  2001-07-14	Rewrite <linux/upd4990a.h> and split to <linux/upd4990a.h>
- *		and <asm-i386/upd4990a.h>.
- *		Introduce a lot of spin_lock/unlock (&rtc_lock).
- */
-
-#define RTC98_VERSION	"1.2"
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/miscdevice.h>
-#include <linux/ioport.h>
-#include <linux/fcntl.h>
-#include <linux/rtc.h>
-#include <linux/bcd.h>
-#include <linux/upd4990a.h>
-#include <linux/init.h>
-#include <linux/poll.h>
-#include <linux/proc_fs.h>
-#include <linux/spinlock.h>
-
-#include <asm/io.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
-
-/*
- *	We sponge a minor off of the misc major. No need slurping
- *	up another valuable major dev number for this. If you add
- *	an ioctl, make sure you don't conflict with SPARC's RTC
- *	ioctls.
- */
-
-static struct fasync_struct *rtc_async_queue;
-
-static DECLARE_WAIT_QUEUE_HEAD(rtc_wait);
-
-static struct timer_list rtc_uie_timer;
-static u8 old_refclk;
-
-static int rtc_ioctl(struct inode *inode, struct file *file,
-			unsigned int cmd, unsigned long arg);
-
-static int rtc_read_proc(char *page, char **start, off_t off,
-			  int count, int *eof, void *data);
-
-/*
- *	Bits in rtc_status. (5 bits of room for future expansion)
- */
-
-#define RTC_IS_OPEN		0x01	/* means /dev/rtc is in use	*/
-#define RTC_TIMER_ON            0x02    /* not used */
-#define RTC_UIE_TIMER_ON        0x04	/* UIE emulation timer is active */
-
-/*
- * rtc_status is never changed by rtc_interrupt, and ioctl/open/close is
- * protected by the big kernel lock. However, ioctl can still disable the timer
- * in rtc_status and then with del_timer after the interrupt has read
- * rtc_status but before mod_timer is called, which would then reenable the
- * timer (but you would need to have an awful timing before you'd trip on it)
- */
-static unsigned char rtc_status;	/* bitmapped status byte.	*/
-static unsigned long rtc_irq_data;	/* our output to the world	*/
-
-static const unsigned char days_in_mo[] = 
-{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
-
-extern spinlock_t rtc_lock;	/* defined in arch/i386/kernel/time.c */
-
-static void rtc_uie_intr(unsigned long data)
-{
-	u8 refclk, tmp;
-
-	/* Kernel timer does del_timer internally before calling
-	   each timer entry, so this is unnecessary.
-	   del_timer(&rtc_uie_timer);  */
-	spin_lock(&rtc_lock);
-
-	/* Detect rising edge of 1Hz reference clock.  */
-	refclk = UPD4990A_READ_DATA();
-	tmp = old_refclk & refclk;
-	old_refclk = ~refclk;
-	if (!(tmp & 1))
-		rtc_irq_data += 0x100;
-
-	spin_unlock(&rtc_lock);
-
-	if (!(tmp & 1)) {
-		/* Now do the rest of the actions */
-		wake_up_interruptible(&rtc_wait);
-		kill_fasync(&rtc_async_queue, SIGIO, POLL_IN);
-	}
-
-	rtc_uie_timer.expires = jiffies + 1;
-	add_timer(&rtc_uie_timer);
-}
-
-/*
- *	Now all the various file operations that we export.
- */
-
-static ssize_t rtc_read(struct file *file, char *buf,
-			size_t count, loff_t *ppos)
-{
-	DECLARE_WAITQUEUE(wait, current);
-	unsigned long data;
-	ssize_t retval = 0;
-	
-	if (count < sizeof(unsigned long))
-		return -EINVAL;
-
-	add_wait_queue(&rtc_wait, &wait);
-
-	set_current_state(TASK_INTERRUPTIBLE);
-
-	do {
-		/* First make it right. Then make it fast. Putting this whole
-		 * block within the parentheses of a while would be too
-		 * confusing. And no, xchg() is not the answer. */
-		spin_lock_irq(&rtc_lock);
-		data = rtc_irq_data;
-		rtc_irq_data = 0;
-		spin_unlock_irq(&rtc_lock);
-
-		if (data != 0)
-			break;
-		if (file->f_flags & O_NONBLOCK) {
-			retval = -EAGAIN;
-			goto out;
-		}
-		if (signal_pending(current)) {
-			retval = -ERESTARTSYS;
-			goto out;
-		}
-		schedule();
-	} while (1);
-
-	retval = put_user(data, (unsigned long *)buf);
-	if (!retval)
-		retval = sizeof(unsigned long); 
- out:
-	set_current_state(TASK_RUNNING);
-	remove_wait_queue(&rtc_wait, &wait);
-
-	return retval;
-}
-
-static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-		     unsigned long arg)
-{
-	struct rtc_time wtime; 
-	struct upd4990a_raw_data raw;
-
-	switch (cmd) {
-	case RTC_UIE_OFF:	/* Mask ints from RTC updates.	*/
-		spin_lock_irq(&rtc_lock);
-		if (rtc_status & RTC_UIE_TIMER_ON) {
-			rtc_status &= ~RTC_UIE_TIMER_ON;
-			del_timer(&rtc_uie_timer);
-		}
-		spin_unlock_irq(&rtc_lock);
-		return 0;
-
-	case RTC_UIE_ON:	/* Allow ints for RTC updates.	*/
-		spin_lock_irq(&rtc_lock);
-		rtc_irq_data = 0;
-		if (!(rtc_status & RTC_UIE_TIMER_ON)) {
-			rtc_status |= RTC_UIE_TIMER_ON;
-			rtc_uie_timer.expires = jiffies + 1;
-			add_timer(&rtc_uie_timer);
-		}
-		/* Just in case... */
-		upd4990a_serial_command(UPD4990A_REGISTER_HOLD);
-		old_refclk = ~UPD4990A_READ_DATA();
-		spin_unlock_irq(&rtc_lock);
-		return 0;
-
-	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
-		spin_lock_irq(&rtc_lock);
-		upd4990a_get_time(&raw, 0);
-		spin_unlock_irq(&rtc_lock);
-
-		wtime.tm_sec	= BCD2BIN(raw.sec);
-		wtime.tm_min	= BCD2BIN(raw.min);
-		wtime.tm_hour	= BCD2BIN(raw.hour);
-		wtime.tm_mday	= BCD2BIN(raw.mday);
-		wtime.tm_mon	= raw.mon - 1; /* convert to 0-base */
-		wtime.tm_wday	= raw.wday;
-
-		/*
-		 * Account for differences between how the RTC uses the values
-		 * and how they are defined in a struct rtc_time;
-		 */
-		if ((wtime.tm_year = BCD2BIN(raw.year)) < 95)
-			wtime.tm_year += 100;
-
-		wtime.tm_isdst = 0;
-		break;
-
-	case RTC_SET_TIME:	/* Set the RTC */
-	{
-		int leap_yr;
-
-		if (!capable(CAP_SYS_TIME))
-			return -EACCES;
-
-		if (copy_from_user(&wtime, (struct rtc_time *) arg,
-				    sizeof (struct rtc_time)))
-			return -EFAULT;
-
-		/* Valid year is 1995 - 2094, inclusive.  */
-		if (wtime.tm_year < 95 || wtime.tm_year > 194)
-			return -EINVAL;
-
-		if (wtime.tm_mon > 11 || wtime.tm_mday == 0)
-			return -EINVAL;
-
-		/* For acceptable year domain (1995 - 2094),
-		   this IS sufficient.  */
-		leap_yr = !(wtime.tm_year % 4);
-
-		if (wtime.tm_mday > (days_in_mo[wtime.tm_mon]
-				     + (wtime.tm_mon == 2 && leap_yr)))
-			return -EINVAL;
-			
-		if (wtime.tm_hour >= 24
-		    || wtime.tm_min >= 60 || wtime.tm_sec >= 60)
-			return -EINVAL;
-
-		if (wtime.tm_wday > 6)
-			return -EINVAL;
-
-		raw.sec  = BIN2BCD(wtime.tm_sec);
-		raw.min  = BIN2BCD(wtime.tm_min);
-		raw.hour = BIN2BCD(wtime.tm_hour);
-		raw.mday = BIN2BCD(wtime.tm_mday);
-		raw.mon  = wtime.tm_mon + 1;
-		raw.wday = wtime.tm_wday;
-		raw.year = BIN2BCD(wtime.tm_year % 100);
-
-		spin_lock_irq(&rtc_lock);
-		upd4990a_set_time(&raw, 0);
-		spin_unlock_irq(&rtc_lock);
-
-		return 0;
-	}
-	default:
-		return -EINVAL;
-	}
-	return copy_to_user((void *)arg, &wtime, sizeof wtime) ? -EFAULT : 0;
-}
-
-/*
- *	We enforce only one user at a time here with the open/close.
- *	Also clear the previous interrupt data on an open, and clean
- *	up things on a close.
- */
-
-static int rtc_open(struct inode *inode, struct file *file)
-{
-	spin_lock_irq(&rtc_lock);
-
-	if(rtc_status & RTC_IS_OPEN)
-		goto out_busy;
-
-	rtc_status |= RTC_IS_OPEN;
-
-	rtc_irq_data = 0;
-	spin_unlock_irq(&rtc_lock);
-	return 0;
-
- out_busy:
-	spin_unlock_irq(&rtc_lock);
-	return -EBUSY;
-}
-
-static int rtc_fasync(int fd, struct file *filp, int on)
-{
-	return fasync_helper(fd, filp, on, &rtc_async_queue);
-}
-
-static int rtc_release(struct inode *inode, struct file *file)
-{
-	del_timer(&rtc_uie_timer);
-
-	if (file->f_flags & FASYNC)
-		rtc_fasync(-1, file, 0);
-
-	rtc_irq_data = 0;
-
-	/* No need for locking -- nobody else can do anything until this rmw is
-	 * committed, and no timer is running. */
-	rtc_status &= ~(RTC_IS_OPEN | RTC_UIE_TIMER_ON);
-	return 0;
-}
-
-static unsigned int rtc_poll(struct file *file, poll_table *wait)
-{
-	unsigned long l;
-
-	poll_wait(file, &rtc_wait, wait);
-
-	spin_lock_irq(&rtc_lock);
-	l = rtc_irq_data;
-	spin_unlock_irq(&rtc_lock);
-
-	if (l != 0)
-		return POLLIN | POLLRDNORM;
-	return 0;
-}
-
-/*
- *	The various file operations we support.
- */
-
-static struct file_operations rtc_fops = {
-	.owner		= THIS_MODULE,
-	.read		= rtc_read,
-	.poll		= rtc_poll,
-	.ioctl		= rtc_ioctl,
-	.open		= rtc_open,
-	.release	= rtc_release,
-	.fasync		= rtc_fasync,
-};
-
-static struct miscdevice rtc_dev=
-{
-	.minor	= RTC_MINOR,
-	.name	= "rtc",
-	.fops	= &rtc_fops,
-};
-
-static int __init rtc_init(void)
-{
-	int err = 0;
-
-	if (!request_region(UPD4990A_IO, 1, "rtc")) {
-		printk(KERN_ERR "upd4990a: could not acquire I/O port %#x\n",
-			UPD4990A_IO);
-		return -EBUSY;
-	}
-
-	err = misc_register(&rtc_dev);
-	if (err) {
-		printk(KERN_ERR "upd4990a: can't misc_register() on minor=%d\n",
-			RTC_MINOR);
-		release_region(UPD4990A_IO, 1);
-		return err;
-	}
-		
-#if 0
-	printk(KERN_INFO "\xB6\xDA\xDD\xC0\xDE \xC4\xDE\xB9\xB2 Driver\n");  /* Calender Clock Driver */
-#else
-	printk(KERN_INFO
-	       "Real Time Clock driver for NEC PC-9800 v" RTC98_VERSION "\n");
-#endif
-	create_proc_read_entry("driver/rtc", 0, NULL, rtc_read_proc, NULL);
-
-	init_timer(&rtc_uie_timer);
-	rtc_uie_timer.function = rtc_uie_intr;
-
-	return 0;
-}
-
-module_init (rtc_init);
-
-static void __exit rtc_exit(void)
-{
-	del_timer(&rtc_uie_timer);
-	release_region(UPD4990A_IO, 1);
-	remove_proc_entry("driver/rtc", NULL);
-	misc_deregister(&rtc_dev);
-}
-
-module_exit (rtc_exit);
-
-/*
- *	Info exported via "/proc/driver/rtc".
- */
-
-static inline int rtc_get_status(char *buf)
-{
-	char *p;
-	unsigned int year;
-	struct upd4990a_raw_data data;
-
-	p = buf;
-
-	upd4990a_get_time(&data, 0);
-
-	/*
-	 * There is no way to tell if the luser has the RTC set for local
-	 * time or for Universal Standard Time (GMT). Probably local though.
-	 */
-	if ((year = BCD2BIN(data.year) + 1900) < 1995)
-		year += 100;
-	p += sprintf(p,
-		     "rtc_time\t: %02d:%02d:%02d\n"
-		     "rtc_date\t: %04d-%02d-%02d\n",
-		     BCD2BIN(data.hour), BCD2BIN(data.min),
-		     BCD2BIN(data.sec),
-		     year, data.mon, BCD2BIN(data.mday));
-
-	return  p - buf;
-}
-
-static int rtc_read_proc(char *page, char **start, off_t off,
-			 int count, int *eof, void *data)
-{
-	int len = rtc_get_status(page);
-
-	if (len <= off + count)
-		*eof = 1;
-	*start = page + off;
-	len -= off;
-	if (len > count)
-		len = count;
-	if (len < 0)
-		len = 0;
-	return len;
-}
--- diff/drivers/ide/legacy/hd98.c	2004-05-19 22:11:41.000000000 +0100
+++ source/drivers/ide/legacy/hd98.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,883 +0,0 @@
-/*
- *  Copyright (C) 1991, 1992  Linus Torvalds
- *
- * This is the low-level hd interrupt support. It traverses the
- * request-list, using interrupts to jump between functions. As
- * all the functions are called within interrupts, we may not
- * sleep. Special care is recommended.
- *
- *  modified by Drew Eckhardt to check nr of hd's from the CMOS.
- *
- *  Thanks to Branko Lankester, lankeste@fwi.uva.nl, who found a bug
- *  in the early extended-partition checks and added DM partitions
- *
- *  IRQ-unmask, drive-id, multiple-mode, support for ">16 heads",
- *  and general streamlining by Mark Lord.
- *
- *  Removed 99% of above. Use Mark's ide driver for those options.
- *  This is now a lightweight ST-506 driver. (Paul Gortmaker)
- *
- *  Modified 1995 Russell King for ARM processor.
- *
- *  Bugfix: max_sectors must be <= 255 or the wheels tend to come
- *  off in a hurry once you queue things up - Paul G. 02/2001
- */
-
-/* Uncomment the following if you want verbose error reports. */
-/* #define VERBOSE_ERRORS */
-
-#include <linux/errno.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/genhd.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/ioport.h>
-#include <linux/mc146818rtc.h> /* CMOS defines */
-#include <linux/init.h>
-#include <linux/blkpg.h>
-#include <linux/hdreg.h>
-
-#define REALLY_SLOW_IO
-#include <asm/system.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
-
-#include "io_ports.h"
-
-#ifdef __arm__
-#undef  HD_IRQ
-#endif
-#include <asm/irq.h>
-#ifdef __arm__
-#define HD_IRQ IRQ_HARDDISK
-#endif
-
-/* Hd controller regster ports */
-
-#define HD_DATA		0x640	/* _CTL when writing */
-#define HD_ERROR	0x642	/* see err-bits */
-#define HD_NSECTOR	0x644	/* nr of sectors to read/write */
-#define HD_SECTOR	0x646	/* starting sector */
-#define HD_LCYL		0x648	/* starting cylinder */
-#define HD_HCYL		0x64a	/* high byte of starting cyl */
-#define HD_CURRENT	0x64c	/* 101dhhhh , d=drive, hhhh=head */
-#define HD_STATUS	0x64e	/* see status-bits */
-#define HD_FEATURE	HD_ERROR	/* same io address, read=error, write=feature */
-#define HD_PRECOMP	HD_FEATURE	/* obsolete use of this port - predates IDE */
-#define HD_COMMAND	HD_STATUS	/* same io address, read=status, write=cmd */
-
-#define HD_CMD		0x74c	/* used for resets */
-#define HD_ALTSTATUS	0x74c	/* same as HD_STATUS but doesn't clear irq */
-
-/* Bits of HD_STATUS */
-#define ERR_STAT		0x01
-#define INDEX_STAT		0x02
-#define ECC_STAT		0x04	/* Corrected error */
-#define DRQ_STAT		0x08
-#define SEEK_STAT		0x10
-#define SERVICE_STAT		SEEK_STAT
-#define WRERR_STAT		0x20
-#define READY_STAT		0x40
-#define BUSY_STAT		0x80
-
-/* Bits for HD_ERROR */
-#define MARK_ERR		0x01	/* Bad address mark */
-#define TRK0_ERR		0x02	/* couldn't find track 0 */
-#define ABRT_ERR		0x04	/* Command aborted */
-#define MCR_ERR			0x08	/* media change request */
-#define ID_ERR			0x10	/* ID field not found */
-#define MC_ERR			0x20	/* media changed */
-#define ECC_ERR			0x40	/* Uncorrectable ECC error */
-#define BBD_ERR			0x80	/* pre-EIDE meaning:  block marked bad */
-#define ICRC_ERR		0x80	/* new meaning:  CRC error during transfer */
-
-static spinlock_t hd_lock = SPIN_LOCK_UNLOCKED;
-static struct request_queue *hd_queue;
-
-#define CURRENT elv_next_request(hd_queue)
-
-#define TIMEOUT_VALUE	(6*HZ)
-#define	HD_DELAY	0
-
-#define MAX_ERRORS     16	/* Max read/write errors/sector */
-#define RESET_FREQ      8	/* Reset controller every 8th retry */
-#define RECAL_FREQ      4	/* Recalibrate every 4th retry */
-#define MAX_HD		2
-
-#define STAT_OK		(READY_STAT|SEEK_STAT)
-#define OK_STATUS(s)	(((s)&(STAT_OK|(BUSY_STAT|WRERR_STAT|ERR_STAT)))==STAT_OK)
-
-static void recal_intr(void);
-static void bad_rw_intr(void);
-
-static int reset;
-static int hd_error;
-
-/*
- *  This struct defines the HD's and their types.
- */
-struct hd_i_struct {
-	unsigned int head,sect,cyl,wpcom,lzone,ctl;
-	int unit;
-	int recalibrate;
-	int special_op;
-};
-	
-#ifdef HD_TYPE
-static struct hd_i_struct hd_info[] = { HD_TYPE };
-static int NR_HD = ((sizeof (hd_info))/(sizeof (struct hd_i_struct)));
-#else
-static struct hd_i_struct hd_info[MAX_HD];
-static int NR_HD;
-#endif
-
-static struct gendisk *hd_gendisk[MAX_HD];
-
-static struct timer_list device_timer;
-
-#define TIMEOUT_VALUE (6*HZ)
-
-#define SET_TIMER							\
-	do {								\
-		mod_timer(&device_timer, jiffies + TIMEOUT_VALUE);	\
-	} while (0)
-
-static void (*do_hd)(void) = NULL;
-#define SET_HANDLER(x) \
-if ((do_hd = (x)) != NULL) \
-	SET_TIMER; \
-else \
-	del_timer(&device_timer);
-
-
-#if (HD_DELAY > 0)
-unsigned long last_req;
-
-unsigned long read_timer(void)
-{
-        extern spinlock_t i8253_lock;
-	unsigned long t, flags;
-	int i;
-
-	spin_lock_irqsave(&i8253_lock, flags);
-	t = jiffies * 11932;
-    	outb_p(0, PIT_MODE);
-	i = inb_p(PIT_CH0);
-	i |= inb(PIT_CH0) << 8;
-	spin_unlock_irqrestore(&i8253_lock, flags);
-	return(t - i);
-}
-#endif
-
-void __init hd_setup(char *str, int *ints)
-{
-	int hdind = 0;
-
-	if (ints[0] != 3)
-		return;
-	if (hd_info[0].head != 0)
-		hdind=1;
-	hd_info[hdind].head = ints[2];
-	hd_info[hdind].sect = ints[3];
-	hd_info[hdind].cyl = ints[1];
-	hd_info[hdind].wpcom = 0;
-	hd_info[hdind].lzone = ints[1];
-	hd_info[hdind].ctl = (ints[2] > 8 ? 8 : 0);
-	NR_HD = hdind+1;
-}
-
-static void dump_status (const char *msg, unsigned int stat)
-{
-	char *name = CURRENT ?
-			CURRENT->rq_dev->bd_disk->disk_name :
-			"hd?";
-#ifdef VERBOSE_ERRORS
-	printk("%s: %s: status=0x%02x { ", name, msg, stat & 0xff);
-	if (stat & BUSY_STAT)	printk("Busy ");
-	if (stat & READY_STAT)	printk("DriveReady ");
-	if (stat & WRERR_STAT)	printk("WriteFault ");
-	if (stat & SEEK_STAT)	printk("SeekComplete ");
-	if (stat & DRQ_STAT)	printk("DataRequest ");
-	if (stat & ECC_STAT)	printk("CorrectedError ");
-	if (stat & INDEX_STAT)	printk("Index ");
-	if (stat & ERR_STAT)	printk("Error ");
-	printk("}\n");
-	if ((stat & ERR_STAT) == 0) {
-		hd_error = 0;
-	} else {
-		hd_error = inb(HD_ERROR);
-		printk("%s: %s: error=0x%02x { ", name, msg, hd_error & 0xff);
-		if (hd_error & BBD_ERR)		printk("BadSector ");
-		if (hd_error & ECC_ERR)		printk("UncorrectableError ");
-		if (hd_error & ID_ERR)		printk("SectorIdNotFound ");
-		if (hd_error & ABRT_ERR)	printk("DriveStatusError ");
-		if (hd_error & TRK0_ERR)	printk("TrackZeroNotFound ");
-		if (hd_error & MARK_ERR)	printk("AddrMarkNotFound ");
-		printk("}");
-		if (hd_error & (BBD_ERR|ECC_ERR|ID_ERR|MARK_ERR)) {
-			printk(", CHS=%d/%d/%d", (inb(HD_HCYL)<<8) + inb(HD_LCYL),
-				inb(HD_CURRENT) & 0xf, inb(HD_SECTOR));
-			if (CURRENT)
-				printk(", sector=%ld", CURRENT->sector);
-		}
-		printk("\n");
-	}
-#else
-	printk("%s: %s: status=0x%02x.\n", name, msg, stat & 0xff);
-	if ((stat & ERR_STAT) == 0) {
-		hd_error = 0;
-	} else {
-		hd_error = inb(HD_ERROR);
-		printk("%s: %s: error=0x%02x.\n", name, msg, hd_error & 0xff);
-	}
-#endif
-}
-
-void check_status(void)
-{
-	int i = inb(HD_STATUS);
-
-	if (!OK_STATUS(i)) {
-		dump_status("check_status", i);
-		bad_rw_intr();
-	}
-}
-
-static int controller_busy(void)
-{
-	int retries = 100000;
-	unsigned char status;
-
-	do {
-		status = inb(HD_STATUS);
-	} while ((status & BUSY_STAT) && --retries);
-	return status;
-}
-
-static int status_ok(void)
-{
-	unsigned char status = inb(HD_STATUS);
-
-	if (status & BUSY_STAT)
-		return 1;	/* Ancient, but does it make sense??? */
-	if (status & WRERR_STAT)
-		return 0;
-	if (!(status & READY_STAT))
-		return 0;
-	if (!(status & SEEK_STAT))
-		return 0;
-	return 1;
-}
-
-static int controller_ready(unsigned int drive, unsigned int head)
-{
-	int retry = 100;
-
-	do {
-		if (controller_busy() & BUSY_STAT)
-			return 0;
-		outb(0xA0 | (drive<<4) | head, HD_CURRENT);
-		if (status_ok())
-			return 1;
-	} while (--retry);
-	return 0;
-}
-
-static void hd_out(struct hd_i_struct *disk,
-		   unsigned int nsect,
-		   unsigned int sect,
-		   unsigned int head,
-		   unsigned int cyl,
-		   unsigned int cmd,
-		   void (*intr_addr)(void))
-{
-	unsigned short port;
-
-#if (HD_DELAY > 0)
-	while (read_timer() - last_req < HD_DELAY)
-		/* nothing */;
-#endif
-	if (reset)
-		return;
-	if (!controller_ready(disk->unit, head)) {
-		reset = 1;
-		return;
-	}
-	SET_HANDLER(intr_addr);
-	outb(disk->ctl,HD_CMD);
-	port=HD_DATA + 2;
-	outb(disk->wpcom>>2, port); port += 2;
-	outb(nsect, port); port += 2;
-	outb(sect, port); port += 2;
-	outb(cyl, port); port += 2;
-	outb(cyl>>8, port); port += 2;
-	outb(0xA0|(disk->unit<<4)|head, port); port += 2;
-	outb(cmd, port);
-}
-
-static void hd_request (void);
-
-static int drive_busy(void)
-{
-	unsigned int i;
-	unsigned char c;
-
-	for (i = 0; i < 500000 ; i++) {
-		c = inb(HD_STATUS);
-		if ((c & (BUSY_STAT | READY_STAT | SEEK_STAT)) == STAT_OK)
-			return 0;
-	}
-	dump_status("reset timed out", c);
-	return 1;
-}
-
-static void reset_controller(void)
-{
-	int	i;
-
-	outb(4,HD_CMD);
-	for(i = 0; i < 1000; i++) barrier();
-	outb(hd_info[0].ctl & 0x0f,HD_CMD);
-	for(i = 0; i < 1000; i++) barrier();
-	if (drive_busy())
-		printk("hd: controller still busy\n");
-	else if ((hd_error = inb(HD_ERROR)) != 1)
-		printk("hd: controller reset failed: %02x\n",hd_error);
-}
-
-static void reset_hd(void)
-{
-	static int i;
-
-repeat:
-	if (reset) {
-		reset = 0;
-		i = -1;
-		reset_controller();
-	} else {
-		check_status();
-		if (reset)
-			goto repeat;
-	}
-	if (++i < NR_HD) {
-		struct hd_i_struct *disk = &hd_info[i];
-		disk->special_op = disk->recalibrate = 1;
-		hd_out(disk, disk->sect, disk->sect, disk->head-1,
-			disk->cyl, WIN_SPECIFY, &reset_hd);
-		if (reset)
-			goto repeat;
-	} else
-		hd_request();
-}
-
-/*
- * Ok, don't know what to do with the unexpected interrupts: on some machines
- * doing a reset and a retry seems to result in an eternal loop. Right now I
- * ignore it, and just set the timeout.
- *
- * On laptops (and "green" PCs), an unexpected interrupt occurs whenever the
- * drive enters "idle", "standby", or "sleep" mode, so if the status looks
- * "good", we just ignore the interrupt completely.
- */
-void unexpected_hd_interrupt(void)
-{
-	unsigned int stat = inb(HD_STATUS);
-
-	if (stat & (BUSY_STAT|DRQ_STAT|ECC_STAT|ERR_STAT)) {
-		dump_status ("unexpected interrupt", stat);
-		SET_TIMER;
-	}
-}
-
-/*
- * bad_rw_intr() now tries to be a bit smarter and does things
- * according to the error returned by the controller.
- * -Mika Liljeberg (liljeber@cs.Helsinki.FI)
- */
-static void bad_rw_intr(void)
-{
-	struct request *req = CURRENT;
-	struct hd_i_struct *disk;
-
-	if (!req)
-		return;
-	disk = req->rq_disk->private_data;
-	if (++req->errors >= MAX_ERRORS || (hd_error & BBD_ERR)) {
-		end_request(req, 0);
-		disk->special_op = disk->recalibrate = 1;
-	} else if (req->errors % RESET_FREQ == 0)
-		reset = 1;
-	else if ((hd_error & TRK0_ERR) || req->errors % RECAL_FREQ == 0)
-		disk->special_op = disk->recalibrate = 1;
-	/* Otherwise just retry */
-}
-
-static inline int wait_DRQ(void)
-{
-	int retries = 100000, stat;
-
-	while (--retries > 0)
-		if ((stat = inb(HD_STATUS)) & DRQ_STAT)
-			return 0;
-	dump_status("wait_DRQ", stat);
-	return -1;
-}
-
-static void read_intr(void)
-{
-	int i, retries = 100000;
-	struct request *req;
-
-	do {
-		i = (unsigned) inb(HD_STATUS);
-		if (i & BUSY_STAT)
-			continue;
-		if (!OK_STATUS(i))
-			break;
-		if (i & DRQ_STAT)
-			goto ok_to_read;
-	} while (--retries > 0);
-	dump_status("read_intr", i);
-	bad_rw_intr();
-	hd_request();
-	return;
-ok_to_read:
-	req = CURRENT;
-	insw(HD_DATA,req->buffer,256);
-	req->sector++;
-	req->buffer += 512;
-	req->errors = 0;
-	i = --req->nr_sectors;
-	--req->current_nr_sectors;
-#ifdef DEBUG
-	printk("%s: read: sector %ld, remaining = %ld, buffer=%p\n",
-		req->rq_disk->disk_name, req->sector, req->nr_sectors,
-		req->buffer+512);
-#endif
-	if (req->current_nr_sectors <= 0)
-		end_request(req, 1);
-	if (i > 0) {
-		SET_HANDLER(&read_intr);
-		return;
-	}
-	(void) inb(HD_STATUS);
-#if (HD_DELAY > 0)
-	last_req = read_timer();
-#endif
-	if (CURRENT)
-		hd_request();
-	return;
-}
-
-static void write_intr(void)
-{
-	int i;
-	int retries = 100000;
-	struct request *req = CURRENT;
-
-	do {
-		i = (unsigned) inb(HD_STATUS);
-		if (i & BUSY_STAT)
-			continue;
-		if (!OK_STATUS(i))
-			break;
-		if ((req->nr_sectors <= 1) || (i & DRQ_STAT))
-			goto ok_to_write;
-	} while (--retries > 0);
-	dump_status("write_intr", i);
-	bad_rw_intr();
-	hd_request();
-	return;
-ok_to_write:
-	req->sector++;
-	i = --req->nr_sectors;
-	--req->current_nr_sectors;
-	req->buffer += 512;
-	if (!i || (req->bio && req->current_nr_sectors < 1))
-		end_request(req, 1);
-	if (i > 0) {
-		SET_HANDLER(&write_intr);
-		outsw(HD_DATA,req->buffer,256);
-		local_irq_enable();
-	} else {
-#if (HD_DELAY > 0)
-		last_req = read_timer();
-#endif
-		hd_request();
-	}
-	return;
-}
-
-static void recal_intr(void)
-{
-	check_status();
-#if (HD_DELAY > 0)
-	last_req = read_timer();
-#endif
-	hd_request();
-}
-
-/*
- * This is another of the error-routines I don't know what to do with. The
- * best idea seems to just set reset, and start all over again.
- */
-static void hd_times_out(unsigned long dummy)
-{
-	do_hd = NULL;
-
-	if (!CURRENT)
-		return;
-
-	disable_irq(HD_IRQ);
-	local_irq_enable();
-	reset = 1;
-	printk("%s: timeout\n", CURRENT->rq_disk->disk_name);
-	if (++CURRENT->errors >= MAX_ERRORS) {
-#ifdef DEBUG
-		printk("%s: too many errors\n", CURRENT->rq_disk->disk_name);
-#endif
-		end_request(CURRENT, 0);
-	}
-	local_irq_disable();
-	hd_request();
-	enable_irq(HD_IRQ);
-}
-
-int do_special_op(struct hd_i_struct *disk, struct request *req)
-{
-	if (disk->recalibrate) {
-		disk->recalibrate = 0;
-		hd_out(disk, disk->sect,0,0,0,WIN_RESTORE,&recal_intr);
-		return reset;
-	}
-	if (disk->head > 16) {
-		printk ("%s: cannot handle device with more than 16 heads - giving up\n", req->rq_disk->disk_name);
-		end_request(req, 0);
-	}
-	disk->special_op = 0;
-	return 1;
-}
-
-/*
- * The driver enables interrupts as much as possible.  In order to do this,
- * (a) the device-interrupt is disabled before entering hd_request(),
- * and (b) the timeout-interrupt is disabled before the sti().
- *
- * Interrupts are still masked (by default) whenever we are exchanging
- * data/cmds with a drive, because some drives seem to have very poor
- * tolerance for latency during I/O. The IDE driver has support to unmask
- * interrupts for non-broken hardware, so use that driver if required.
- */
-static void hd_request(void)
-{
-	unsigned int block, nsect, sec, track, head, cyl;
-	struct hd_i_struct *disk;
-	struct request *req;
-
-	if (do_hd)
-		return;
-repeat:
-	del_timer(&device_timer);
-	local_irq_enable();
-
-	if (!CURRENT) {
-		do_hd = NULL;
-		return;
-	}
-	req = CURRENT;
-
-	if (reset) {
-		local_irq_disable();
-		reset_hd();
-		return;
-	}
-	disk = req->rq_disk->private_data;
-	block = req->sector;
-	nsect = req->nr_sectors;
-	if (block >= get_capacity(req->rq_disk) ||
-	    ((block+nsect) > get_capacity(req->rq_disk))) {
-		printk("%s: bad access: block=%d, count=%d\n",
-			req->rq_disk->disk_name, block, nsect);
-		end_request(req, 0);
-		goto repeat;
-	}
-
-	if (disk->special_op) {
-		if (do_special_op(disk, req))
-			goto repeat;
-		return;
-	}
-	sec   = block % disk->sect + 1;
-	track = block / disk->sect;
-	head  = track % disk->head;
-	cyl   = track / disk->head;
-#ifdef DEBUG
-	printk("%s: %sing: CHS=%d/%d/%d, sectors=%d, buffer=%p\n",
-		req->rq_disk->disk_name, (req->cmd == READ)?"read":"writ",
-		cyl, head, sec, nsect, req->buffer);
-#endif
-	if (req->flags & REQ_CMD) {
-		switch (rq_data_dir(req)) {
-		case READ:
-			hd_out(disk,nsect,sec,head,cyl,WIN_READ,&read_intr);
-			if (reset)
-				goto repeat;
-			break;
-		case WRITE:
-			hd_out(disk,nsect,sec,head,cyl,WIN_WRITE,&write_intr);
-			if (reset)
-				goto repeat;
-			if (wait_DRQ()) {
-				bad_rw_intr();
-				goto repeat;
-			}
-			outsw(HD_DATA,req->buffer,256);
-			break;
-		default:
-			printk("unknown hd-command\n");
-			end_request(req, 0);
-			break;
-		}
-	}
-}
-
-static void do_hd_request (request_queue_t * q)
-{
-	disable_irq(HD_IRQ);
-	hd_request();
-	enable_irq(HD_IRQ);
-}
-
-static int hd_ioctl(struct inode * inode, struct file * file,
-	unsigned int cmd, unsigned long arg)
-{
-	struct hd_i_struct *disk = inode->i_bdev->bd_disk->private_data;
-	struct hd_geometry *loc = (struct hd_geometry *) arg;
-	struct hd_geometry g; 
-
-	if (cmd != HDIO_GETGEO)
-		return -EINVAL;
-	if (!loc)
-		return -EINVAL;
-	g.heads = disk->head;
-	g.sectors = disk->sect;
-	g.cylinders = disk->cyl;
-	g.start = get_start_sect(inode->i_bdev);
-	return copy_to_user(loc, &g, sizeof g) ? -EFAULT : 0; 
-}
-
-/*
- * Releasing a block device means we sync() it, so that it can safely
- * be forgotten about...
- */
-
-static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	void (*handler)(void) = do_hd;
-
-	do_hd = NULL;
-	del_timer(&device_timer);
-	if (!handler)
-		handler = unexpected_hd_interrupt;
-	handler();
-	local_irq_enable();
-}
-
-static struct block_device_operations hd_fops = {
-	.ioctl =	hd_ioctl,
-};
-
-/*
- * This is the hard disk IRQ description. The SA_INTERRUPT in sa_flags
- * means we run the IRQ-handler with interrupts disabled:  this is bad for
- * interrupt latency, but anything else has led to problems on some
- * machines.
- *
- * We enable interrupts in some of the routines after making sure it's
- * safe.
- */
-
-static int __init hd_init(void)
-{
-	int drive;
-	if (register_blkdev(HD_MAJOR,"hd")) {
-		printk("hd: unable to get major %d for hard disk\n",HD_MAJOR);
-		return -1;
-	}
-	hd_queue = blk_init_queue(do_hd_request, &hd_lock);
-	if (!hd_queue) {
-		unregister_blkdev(HD_MAJOR,"hd");
-		return -1;
-	}
-	blk_queue_max_sectors(hd_queue, 255);
-	init_timer(&device_timer);
-	device_timer.function = hd_times_out;
-	blk_queue_hardsect_size(hd_queue, 512);
-
-#ifdef __i386__
-	if (!NR_HD) {
-		extern struct drive_info drive_info;
-		unsigned char *BIOS = (unsigned char *) &drive_info;
-		unsigned long flags;
-#ifndef CONFIG_X86_PC9800
-		int cmos_disks;
-#endif
-
-		for (drive=0 ; drive<2 ; drive++) {
-			hd_info[drive].cyl = *(unsigned short *) BIOS;
-			hd_info[drive].head = *(3+BIOS);
-			hd_info[drive].sect = *(2+BIOS);
-			hd_info[drive].wpcom = 0;
-			hd_info[drive].ctl = *(3+BIOS) > 8 ? 8 : 0;
-			hd_info[drive].lzone = *(unsigned short *) BIOS;
-			if (hd_info[drive].cyl && NR_HD == drive)
-				NR_HD++;
-			BIOS += 6;
-		}
-
-	}
-#endif /* __i386__ */
-#ifdef __arm__
-	if (!NR_HD) {
-		/* We don't know anything about the drive.  This means
-		 * that you *MUST* specify the drive parameters to the
-		 * kernel yourself.
-		 */
-		printk("hd: no drives specified - use hd=cyl,head,sectors"
-			" on kernel command line\n");
-	}
-#endif
-	if (!NR_HD)
-		goto out;
-
-	for (drive=0 ; drive < NR_HD ; drive++) {
-		struct gendisk *disk = alloc_disk(64);
-		struct hd_i_struct *p = &hd_info[drive];
-		if (!disk)
-			goto Enomem;
-		disk->major = HD_MAJOR;
-		disk->first_minor = drive << 6;
-		disk->fops = &hd_fops;
-		sprintf(disk->disk_name, "hd%c", 'a'+drive);
-		disk->private_data = p;
-		set_capacity(disk, p->head * p->sect * p->cyl);
-		disk->queue = hd_queue;
-		p->unit = drive;
-		hd_gendisk[drive] = disk;
-		printk ("%s: %luMB, CHS=%d/%d/%d\n",
-			disk->disk_name, (unsigned long)get_capacity(disk)/2048,
-			p->cyl, p->head, p->sect);
-	}
-
-	if (request_irq(HD_IRQ, hd_interrupt, SA_INTERRUPT, "hd", NULL)) {
-		printk("hd: unable to get IRQ%d for the hard disk driver\n",
-			HD_IRQ);
-		goto out1;
-	}
-
-	if (!request_region(HD_DATA, 2, "hd(data)")) {
-		printk(KERN_WARNING "hd: port 0x%x busy\n", HD_DATA);
-		NR_HD = 0;
-		free_irq(HD_IRQ, NULL);
-		return;
-	}
-
-	if (!request_region(HD_DATA + 2, 1, "hd"))
-	{
-		printk(KERN_WARNING "hd: port 0x%x busy\n", HD_DATA);
-		goto out2;
-	}
-
-	if (!request_region(HD_DATA + 4, 1, "hd"))
-	{
-		printk(KERN_WARNING "hd: port 0x%x busy\n", HD_DATA);
-		goto out3;
-	}
-
-	if (!request_region(HD_DATA + 6, 1, "hd"))
-	{
-		printk(KERN_WARNING "hd: port 0x%x busy\n", HD_DATA);
-		goto out4;
-	}
-
-	if (!request_region(HD_DATA + 8, 1, "hd"))
-	{
-		printk(KERN_WARNING "hd: port 0x%x busy\n", HD_DATA);
-		goto out5;
-	}
-
-	if (!request_region(HD_DATA + 10, 1, "hd"))
-	{
-		printk(KERN_WARNING "hd: port 0x%x busy\n", HD_DATA);
-		goto out6;
-	}
-
-	if (!request_region(HD_DATA + 12, 1, "hd"))
-	{
-		printk(KERN_WARNING "hd: port 0x%x busy\n", HD_DATA);
-		goto out7;
-	}
-
-	if (!request_region(HD_CMD, 1, "hd(cmd)"))
-	{
-		printk(KERN_WARNING "hd: port 0x%x busy\n", HD_CMD);
-		goto out8;
-	}
-
-	if (!request_region(HD_CMD + 2, 1, "hd(cmd)"))
-	{
-		printk(KERN_WARNING "hd: port 0x%x busy\n", HD_CMD);
-		goto out9;
-	}
-
-	for(drive=0; drive < NR_HD; drive++)
-		add_disk(hd_gendisk[drive]);
-	return 0;
-
-out9:
-	release_region(HD_CMD, 1);
-out8:
-	release_region(HD_DATA + 12, 1);
-out7:
-	release_region(HD_DATA + 10, 1);
-out6:
-	release_region(HD_DATA + 8, 1);
-out5:
-	release_region(HD_DATA + 6, 1);
-out4:
-	release_region(HD_DATA + 4, 1);
-out3:
-	release_region(HD_DATA + 2, 1);
-out2:
-	release_region(HD_DATA, 2);
-	free_irq(HD_IRQ, NULL);
-out1:
-	for (drive = 0; drive < NR_HD; drive++)
-		put_disk(hd_gendisk[drive]);
-	NR_HD = 0;
-out:
-	del_timer(&device_timer);
-	unregister_blkdev(HD_MAJOR,"hd");
-	blk_cleanup_queue(hd_queue);
-	return -1;
-Enomem:
-	while (drive--)
-		put_disk(hd_gendisk[drive]);
-	goto out;
-}
-
-static int parse_hd_setup (char *line) {
-	int ints[6];
-
-	(void) get_options(line, ARRAY_SIZE(ints), ints);
-	hd_setup(NULL, ints);
-
-	return 1;
-}
-__setup("hd=", parse_hd_setup);
-
-module_init(hd_init);
--- diff/drivers/ide/legacy/pc9800.c	2004-05-19 22:11:41.000000000 +0100
+++ source/drivers/ide/legacy/pc9800.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,84 +0,0 @@
-/*
- *  ide_pc9800.c
- *
- *  Copyright (C) 1997-2000  Linux/98 project,
- *			     Kyoto University Microcomputer Club.
- */
-
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/ioport.h>
-#include <linux/ide.h>
-#include <linux/init.h>
-
-#include <asm/io.h>
-#include <asm/pc9800.h>
-
-#define PC9800_IDE_BANKSELECT	0x432
-
-#undef PC9800_IDE_DEBUG
-
-static void pc9800_select(ide_drive_t *drive)
-{
-#ifdef PC9800_IDE_DEBUG
-	byte old;
-
-	/* Too noisy: */
-	/* printk(KERN_DEBUG "pc9800_select(%s)\n", drive->name); */
-
-	outb(0x80, PC9800_IDE_BANKSELECT);
-	old = inb(PC9800_IDE_BANKSELECT);
-	if (old != HWIF(drive)->index)
-		printk(KERN_DEBUG "ide-pc9800: switching bank #%d -> #%d\n",
-			old, HWIF(drive)->index);
-#endif
-	outb(HWIF(drive)->index, PC9800_IDE_BANKSELECT);
-}
-
-void __init ide_probe_for_pc9800(void)
-{
-	u8 saved_bank;
-
-	if (!PC9800_9821_P() /* || !PC9821_IDEIF_DOUBLE_P() */)
-		return;
-
-	if (!request_region(PC9800_IDE_BANKSELECT, 1, "ide0/1 bank")) {
-		printk(KERN_ERR
-			"ide: bank select port (%#x) is already occupied!\n",
-			PC9800_IDE_BANKSELECT);
-		return;
-	}
-
-	/* Do actual probing. */
-	if ((saved_bank = inb(PC9800_IDE_BANKSELECT)) == (u8) ~0
-	    || (outb(saved_bank ^ 1, PC9800_IDE_BANKSELECT),
-		/* Next outb is dummy for reading status. */
-		outb(0x80, PC9800_IDE_BANKSELECT),
-		inb(PC9800_IDE_BANKSELECT) != (saved_bank ^ 1))) {
-		printk(KERN_INFO
-			"ide: pc9800 type bank selecting port not found\n");
-		release_region(PC9800_IDE_BANKSELECT, 1);
-		return;
-	}
-
-	/* Restore original value, just in case. */
-	outb(saved_bank, PC9800_IDE_BANKSELECT);
-
-	/* These ports are reseved by IDE I/F.  */
-	if (!request_region(0x430, 1, "ide") ||
-	    !request_region(0x435, 1, "ide")) {
-		printk(KERN_WARNING
-			"ide: IO port 0x430 and 0x435 are reserved for IDE"
-			" the card using these ports may not work\n");
-	}
-
-	if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET] == HD_DATA &&
-	    ide_hwifs[1].io_ports[IDE_DATA_OFFSET] == HD_DATA) {
-		ide_hwifs[0].chipset = ide_pc9800;
-		ide_hwifs[0].mate = &ide_hwifs[1];
-		ide_hwifs[0].selectproc = pc9800_select;
-		ide_hwifs[1].chipset = ide_pc9800;
-		ide_hwifs[1].mate = &ide_hwifs[0];
-		ide_hwifs[1].selectproc = pc9800_select;
-	}
-}
--- diff/drivers/input/keyboard/98kbd.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/keyboard/98kbd.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,391 +0,0 @@
-/*
- *  drivers/input/keyboard/98kbd.c
- *
- *  PC-9801 keyboard driver for Linux
- *
- *    Based on atkbd.c and xtkbd.c written by Vojtech Pavlik
- *
- *  Copyright (c) 2002 Osamu Tomita
- *  Copyright (c) 1999-2001 Vojtech Pavlik
- */
-
-/*
- * 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/delay.h>
-#include <linux/slab.h>
-#include <linux/module.h>
-#include <linux/input.h>
-#include <linux/init.h>
-#include <linux/serio.h>
-
-#include <asm/io.h>
-#include <asm/pc9800.h>
-
-MODULE_AUTHOR("Osamu Tomita <tomita@cinet.co.jp>");
-MODULE_DESCRIPTION("PC-9801 keyboard driver");
-MODULE_LICENSE("GPL");
-
-#define KBD98_KEY	0x7f
-#define KBD98_RELEASE	0x80
-
-static unsigned char kbd98_keycode[256] = {
-	  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 43, 14, 15,
-	 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 41, 26, 28, 30, 31, 32,
-	 33, 34, 35, 36, 37, 38, 39, 40, 27, 44, 45, 46, 47, 48, 49, 50,
-	 51, 52, 53, 12, 57, 92,109,104,110,111,103,105,106,108,102,107,
-	 74, 98, 71, 72, 73, 55, 75, 76, 77, 78, 79, 80, 81,117, 82,121,
-	 83, 94, 87, 88,183,184,185,  0,  0,  0,  0,  0,  0,  0,102,  0,
-	 99,133, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,  0,  0,  0,  0,
-	 54, 58, 42, 56, 29
-};
-
-struct jis_kbd_conv {
-	unsigned char scancode;
-	struct {
-		unsigned char shift;
-		unsigned char keycode;
-	} emul[2];
-};
-
-static struct jis_kbd_conv kbd98_jis[] = {
-	{0x02, {{0,   3}, {1,  40}}},
-	{0x06, {{0,   7}, {1,   8}}},
-	{0x07, {{0,   8}, {0,  40}}},
-	{0x08, {{0,   9}, {1,  10}}},
-	{0x09, {{0,  10}, {1,  11}}},
-	{0x0a, {{0,  11}, {1, 255}}},
-	{0x0b, {{0,  12}, {0,  13}}},
-	{0x0c, {{1,   7}, {0,  41}}},
-	{0x1a, {{1,   3}, {1,  41}}},
-	{0x26, {{0,  39}, {1,  13}}},
-	{0x27, {{1,  39}, {1,   9}}},
-	{0x33, {{0, 255}, {1,  12}}},
-	{0xff, {{0, 255}, {1, 255}}}	/* terminater */
-};
-
-#define KBD98_CMD_SETEXKEY	0x1095	/* Enable/Disable Windows, Appli key */
-#define KBD98_CMD_SETRATE	0x109c	/* Set typematic rate */
-#define KBD98_CMD_SETLEDS	0x109d	/* Set keyboard leds */
-#define KBD98_CMD_GETLEDS	0x119d	/* Get keyboard leds */
-#define KBD98_CMD_GETID		0x019f
-
-#define KBD98_RET_ACK		0xfa
-#define KBD98_RET_NAK		0xfc	/* Command NACK, send the cmd again */
-
-#define KBD98_KEY_JIS_EMUL	253
-#define KBD98_KEY_UNKNOWN	254
-#define KBD98_KEY_NULL		255
-
-static char *kbd98_name = "PC-9801 Keyboard";
-
-struct kbd98 {
-	unsigned char keycode[256];
-	struct input_dev dev;
-	struct serio *serio;
-	char phys[32];
-	unsigned char cmdbuf[4];
-	unsigned char cmdcnt;
-	signed char ack;
-	unsigned char shift;
-	struct {
-		unsigned char scancode;
-		unsigned char keycode;
-	} emul;
-	struct jis_kbd_conv jis[16];
-};
-
-irqreturn_t kbd98_interrupt(struct serio *serio, unsigned char data,
-			    unsigned int flags, struct pt_regs *regs)
-{
-	struct kbd98 *kbd98 = serio->private;
-	unsigned char scancode, keycode;
-	int press, i;
-
-	switch (data) {
-		case KBD98_RET_ACK:
-			kbd98->ack = 1;
-			goto out;
-		case KBD98_RET_NAK:
-			kbd98->ack = -1;
-			goto out;
-	}
-
-	if (kbd98->cmdcnt) {
-		kbd98->cmdbuf[--kbd98->cmdcnt] = data;
-		goto out;
-	}
-
-	scancode = data & KBD98_KEY;
-	keycode = kbd98->keycode[scancode];
-	press = !(data & KBD98_RELEASE);
-	if (kbd98->emul.scancode != KBD98_KEY_UNKNOWN
-	    && scancode != kbd98->emul.scancode) {
-		input_report_key(&kbd98->dev, kbd98->emul.keycode, 0);
-		kbd98->emul.scancode = KBD98_KEY_UNKNOWN;
-	}
-
-	if (keycode == KEY_RIGHTSHIFT)
-		kbd98->shift = press;
-
-	switch (keycode) {
-		case KEY_2:
-		case KEY_6:
-		case KEY_7:
-		case KEY_8:
-		case KEY_9:
-		case KEY_0:
-		case KEY_MINUS:
-		case KEY_EQUAL:
-		case KEY_GRAVE:
-		case KEY_SEMICOLON:
-		case KEY_APOSTROPHE:
-			/* emulation: JIS keyboard to US101 keyboard */
-			i = 0;
-			while (kbd98->jis[i].scancode != 0xff) {
-				if (scancode == kbd98->jis[i].scancode)
-					break;
-				i ++;
-			}
-
-			keycode = kbd98->jis[i].emul[kbd98->shift].keycode;
-			if (keycode == KBD98_KEY_NULL)
-				break;
-
-			if (press) {
-				kbd98->emul.scancode = scancode;
-				kbd98->emul.keycode = keycode;
-				if (kbd98->jis[i].emul[kbd98->shift].shift
-								!= kbd98->shift)
-					input_report_key(&kbd98->dev,
-							KEY_RIGHTSHIFT,
-							!(kbd98->shift));
-			}
-
-			input_report_key(&kbd98->dev, keycode, press);
-			if (!press) {
-				if (kbd98->jis[i].emul[kbd98->shift].shift
-								!= kbd98->shift)
-					input_report_key(&kbd98->dev,
-							KEY_RIGHTSHIFT,
-							kbd98->shift);
-				kbd98->emul.scancode = KBD98_KEY_UNKNOWN;
-			}
-
-			input_sync(&kbd98->dev);
-			break;
-
-		case KEY_CAPSLOCK:
-			input_report_key(&kbd98->dev, keycode, 1);
-			input_sync(&kbd98->dev);
-			input_report_key(&kbd98->dev, keycode, 0);
-			input_sync(&kbd98->dev);
-			break;
-
-		case KBD98_KEY_NULL:
-			break;
-
-		case 0:
-			printk(KERN_WARNING "kbd98.c: Unknown key (scancode %#x) %s.\n",
-				data & KBD98_KEY, data & KBD98_RELEASE ? "released" : "pressed");
-			break;
-
-		default:
-			input_report_key(&kbd98->dev, keycode, press);
-			input_sync(&kbd98->dev);
-			break;
-	}
-
-out:
-	return IRQ_HANDLED;
-}
-
-/*
- * kbd98_sendbyte() sends a byte to the keyboard, and waits for
- * acknowledge. It doesn't handle resends according to the keyboard
- * protocol specs, because if these are needed, the keyboard needs
- * replacement anyway, and they only make a mess in the protocol.
- */
-
-static int kbd98_sendbyte(struct kbd98 *kbd98, unsigned char byte)
-{
-	int timeout = 10000; /* 100 msec */
-	kbd98->ack = 0;
-
-	if (serio_write(kbd98->serio, byte))
-		return -1;
-
-	while (!kbd98->ack && timeout--) udelay(10);
-
-	return -(kbd98->ack <= 0);
-}
-
-/*
- * kbd98_command() sends a command, and its parameters to the keyboard,
- * then waits for the response and puts it in the param array.
- */
-
-static int kbd98_command(struct kbd98 *kbd98, unsigned char *param, int command)
-{
-	int timeout = 50000; /* 500 msec */
-	int send = (command >> 12) & 0xf;
-	int receive = (command >> 8) & 0xf;
-	int i;
-
-	kbd98->cmdcnt = receive;
-
-	if (command & 0xff)
-		if (kbd98_sendbyte(kbd98, command & 0xff))
-			return (kbd98->cmdcnt = 0) - 1;
-
-	for (i = 0; i < send; i++)
-		if (kbd98_sendbyte(kbd98, param[i]))
-			return (kbd98->cmdcnt = 0) - 1;
-
-	while (kbd98->cmdcnt && timeout--) udelay(10);
-
-	if (param)
-		for (i = 0; i < receive; i++)
-			param[i] = kbd98->cmdbuf[(receive - 1) - i];
-
-	if (kbd98->cmdcnt)
-		return (kbd98->cmdcnt = 0) - 1;
-
-	return 0;
-}
-
-/*
- * Event callback from the input module. Events that change the state of
- * the hardware are processed here.
- */
-
-static int kbd98_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
-{
-	struct kbd98 *kbd98 = dev->private;
-	char param[2];
-
-	switch (type) {
-
-		case EV_LED:
-
-			if (__PC9800SCA_TEST_BIT(0x481, 3)) {
-				/* 98note with Num Lock key */
-				/* keep Num Lock status     */
-				*param = 0x60;
-				if (kbd98_command(kbd98, param,
-							KBD98_CMD_GETLEDS))
-					printk(KERN_DEBUG
-						"kbd98: Get keyboard LED"
-						" status Error\n");
-
-				*param &= 1;
-			} else {
-				/* desktop PC-9801 */
-				*param = 1;	/* Always set Num Lock */
-			}
-
-			*param |= 0x70
-			       | (test_bit(LED_CAPSL,   dev->led) ? 4 : 0)
-			       | (test_bit(LED_KANA,    dev->led) ? 8 : 0);
-		        kbd98_command(kbd98, param, KBD98_CMD_SETLEDS);
-
-			return 0;
-	}
-
-	return -1;
-}
-
-void kbd98_connect(struct serio *serio, struct serio_dev *dev)
-{
-	struct kbd98 *kbd98;
-	int i;
-
-	if ((serio->type & SERIO_TYPE) != SERIO_PC9800)
-		return;
-
-	if (!(kbd98 = kmalloc(sizeof(struct kbd98), GFP_KERNEL)))
-		return;
-
-	memset(kbd98, 0, sizeof(struct kbd98));
-	kbd98->emul.scancode = KBD98_KEY_UNKNOWN;
-
-	kbd98->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP);
-	kbd98->dev.ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_KANA);
-
-	kbd98->serio = serio;
-
-	init_input_dev(&kbd98->dev);
-	kbd98->dev.keycode = kbd98->keycode;
-	kbd98->dev.keycodesize = sizeof(unsigned char);
-	kbd98->dev.keycodemax = ARRAY_SIZE(kbd98_keycode);
-	kbd98->dev.event = kbd98_event;
-	kbd98->dev.private = kbd98;
-
-	serio->private = kbd98;
-
-	if (serio_open(serio, dev)) {
-		kfree(kbd98);
-		return;
-	}
-
-	memcpy(kbd98->jis, kbd98_jis, sizeof(kbd98_jis));
-	memcpy(kbd98->keycode, kbd98_keycode, sizeof(kbd98->keycode));
-	for (i = 0; i < 255; i++)
-		set_bit(kbd98->keycode[i], kbd98->dev.keybit);
-	clear_bit(0, kbd98->dev.keybit);
-
-	sprintf(kbd98->phys, "%s/input0", serio->phys);
-
-	kbd98->dev.name = kbd98_name;
-	kbd98->dev.phys = kbd98->phys;
-	kbd98->dev.id.bustype = BUS_XTKBD;
-	kbd98->dev.id.vendor = 0x0002;
-	kbd98->dev.id.product = 0x0001;
-	kbd98->dev.id.version = 0x0100;
-
-	input_register_device(&kbd98->dev);
-
-	printk(KERN_INFO "input: %s on %s\n", kbd98_name, serio->phys);
-}
-
-void kbd98_disconnect(struct serio *serio)
-{
-	struct kbd98 *kbd98 = serio->private;
-	input_unregister_device(&kbd98->dev);
-	serio_close(serio);
-	kfree(kbd98);
-}
-
-struct serio_dev kbd98_dev = {
-	.interrupt =	kbd98_interrupt,
-	.connect =	kbd98_connect,
-	.disconnect =	kbd98_disconnect
-};
-
-int __init kbd98_init(void)
-{
-	serio_register_device(&kbd98_dev);
-	return 0;
-}
-
-void __exit kbd98_exit(void)
-{
-	serio_unregister_device(&kbd98_dev);
-}
-
-module_init(kbd98_init);
-module_exit(kbd98_exit);
--- diff/drivers/input/misc/98spkr.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/misc/98spkr.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,96 +0,0 @@
-/*
- *  PC-9800 Speaker beeper driver for Linux
- *
- *  Copyright (c) 2002 Osamu Tomita
- *  Copyright (c) 2002 Vojtech Pavlik
- *  Copyright (c) 1992 Orest Zborowski
- *
- */
-
-/*
- * 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/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/input.h>
-#include <asm/8253pit.h>
-#include <asm/io.h>
-
-MODULE_AUTHOR("Osamu Tomita <tomita@cinet.co.jp>");
-MODULE_DESCRIPTION("PC-9800 Speaker beeper driver");
-MODULE_LICENSE("GPL");
-
-static char spkr98_name[] = "PC-9801 Speaker";
-static char spkr98_phys[] = "isa3fdb/input0";
-static struct input_dev spkr98_dev;
-
-spinlock_t i8253_beep_lock = SPIN_LOCK_UNLOCKED;
-
-static int spkr98_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
-{
-	unsigned int count = 0;
-	unsigned long flags;
-
-	if (type != EV_SND)
-		return -1;
-
-	switch (code) {
-		case SND_BELL: if (value) value = 1000;
-		case SND_TONE: break;
-		default: return -1;
-	}
-
-	if (value > 20 && value < 32767)
-		count = PIT_TICK_RATE / value;
-
-	spin_lock_irqsave(&i8253_beep_lock, flags);
-
-	if (count) {
-		outb(0x76, 0x3fdf);
-		outb(0, 0x5f);
-		outb(count & 0xff, 0x3fdb);
-		outb(0, 0x5f);
-		outb((count >> 8) & 0xff, 0x3fdb);
-		/* beep on */
-		outb(6, 0x37);
-	} else {
-		/* beep off */
-		outb(7, 0x37);
-	}
-
-	spin_unlock_irqrestore(&i8253_beep_lock, flags);
-
-	return 0;
-}
-
-static int __init spkr98_init(void)
-{
-	spkr98_dev.evbit[0] = BIT(EV_SND);
-	spkr98_dev.sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
-	spkr98_dev.event = spkr98_event;
-
-	spkr98_dev.name = spkr98_name;
-	spkr98_dev.phys = spkr98_phys;
-	spkr98_dev.id.bustype = BUS_ISA;
-	spkr98_dev.id.vendor = 0x001f;
-	spkr98_dev.id.product = 0x0001;
-	spkr98_dev.id.version = 0x0100;
-
-	input_register_device(&spkr98_dev);
-
-        printk(KERN_INFO "input: %s\n", spkr98_name);
-
-	return 0;
-}
-
-static void __exit spkr98_exit(void)
-{
-        input_unregister_device(&spkr98_dev);
-}
-
-module_init(spkr98_init);
-module_exit(spkr98_exit);
--- diff/drivers/input/mouse/98busmouse.c	2004-05-19 22:11:44.000000000 +0100
+++ source/drivers/input/mouse/98busmouse.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,197 +0,0 @@
-/*
- *
- *  Copyright (c) 2002 Osamu Tomita
- *
- *  Based on the work of:
- *	James Banks		Matthew Dillon
- *	David Giller		Nathan Laredo
- *	Linus Torvalds		Johan Myreen
- *	Cliff Matthews		Philip Blundell
- *	Russell King		Vojtech Pavlik
- */
-
-/*
- * NEC PC-9801 Bus Mouse Driver for Linux
- */
-
-/*
- * 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/config.h>
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/delay.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/input.h>
-#include <linux/interrupt.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-
-MODULE_AUTHOR("Osamu Tomita <tomita@cinet.co.jp>");
-MODULE_DESCRIPTION("PC-9801 busmouse driver");
-MODULE_LICENSE("GPL");
-
-#define	PC98BM_BASE		0x7fd9
-#define	PC98BM_DATA_PORT	PC98BM_BASE + 0
-/*	PC98BM_SIGNATURE_PORT	does not exist */
-#define	PC98BM_CONTROL_PORT	PC98BM_BASE + 4
-/*	PC98BM_INTERRUPT_PORT	does not exist */
-#define	PC98BM_CONFIG_PORT	PC98BM_BASE + 6
-
-#define	PC98BM_ENABLE_IRQ	0x00
-#define	PC98BM_DISABLE_IRQ	0x10
-#define	PC98BM_READ_X_LOW	0x80
-#define	PC98BM_READ_X_HIGH	0xa0
-#define	PC98BM_READ_Y_LOW	0xc0
-#define	PC98BM_READ_Y_HIGH	0xe0
-
-#define PC98BM_DEFAULT_MODE	0x93
-/*	PC98BM_CONFIG_BYTE	is not used */
-/*	PC98BM_SIGNATURE_BYTE	is not used */
-
-#define PC98BM_TIMER_PORT	0xbfdb
-#define PC98BM_DEFAULT_TIMER_VAL	0x00
-
-#define PC98BM_IRQ		13
-
-static int pc98bm_irq = PC98BM_IRQ;
-module_param_named(irq, pc98bm_irq, uint, 0);
-MODULE_PARM_DESC(irq, "IRQ number (13=default)");
-
-__obsolete_setup("pc98bm_irq=");
-
-static int pc98bm_used = 0;
-
-static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-
-static int pc98bm_open(struct input_dev *dev)
-{
-	if (pc98bm_used++)
-		return 0;
-	if (request_irq(pc98bm_irq, pc98bm_interrupt, 0, "98busmouse", NULL)) {
-		pc98bm_used--;
-		printk(KERN_ERR "98busmouse.c: Can't allocate irq %d\n", pc98bm_irq);
-		return -EBUSY;
-	}
-	outb(PC98BM_ENABLE_IRQ, PC98BM_CONTROL_PORT);
-	return 0;
-}
-
-static void pc98bm_close(struct input_dev *dev)
-{
-	if (--pc98bm_used)
-		return;
-	outb(PC98BM_DISABLE_IRQ, PC98BM_CONTROL_PORT);
-	free_irq(pc98bm_irq, NULL);
-}
-
-static struct input_dev pc98bm_dev = {
-	.evbit	= { BIT(EV_KEY) | BIT(EV_REL) },
-	.keybit = { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT) },
-	.relbit	= { BIT(REL_X) | BIT(REL_Y) },
-	.open	= pc98bm_open,
-	.close	= pc98bm_close,
-	.name	= "PC-9801 bus mouse",
-	.phys	= "isa7fd9/input0",
-	.id	= {
-		.bustype = BUS_ISA,
-		.vendor  = 0x0004,
-		.product = 0x0001,
-		.version = 0x0100,
-	},
-};
-
-static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	char dx, dy;
-	unsigned char buttons;
-
-	outb(PC98BM_READ_X_LOW, PC98BM_CONTROL_PORT);
-	dx = (inb(PC98BM_DATA_PORT) & 0xf);
-	outb(PC98BM_READ_X_HIGH, PC98BM_CONTROL_PORT);
-	dx |= (inb(PC98BM_DATA_PORT) & 0xf) << 4;
-	outb(PC98BM_READ_Y_LOW, PC98BM_CONTROL_PORT);
-	dy = (inb(PC98BM_DATA_PORT) & 0xf);
-	outb(PC98BM_READ_Y_HIGH, PC98BM_CONTROL_PORT);
-	buttons = inb(PC98BM_DATA_PORT);
-	dy |= (buttons & 0xf) << 4;
-	buttons = ~buttons >> 5;
-
-	input_report_rel(&pc98bm_dev, REL_X, dx);
-	input_report_rel(&pc98bm_dev, REL_Y, dy);
-	input_report_key(&pc98bm_dev, BTN_RIGHT,  buttons & 1);
-	input_report_key(&pc98bm_dev, BTN_MIDDLE, buttons & 2);
-	input_report_key(&pc98bm_dev, BTN_LEFT,   buttons & 4);
-	input_sync(&pc98bm_dev);
-
-	outb(PC98BM_ENABLE_IRQ, PC98BM_CONTROL_PORT);
-
-	return IRQ_HANDLED;
-}
-
-static int __init pc98bm_init(void)
-{
-	int i;
-
-	for (i = 0; i <= 6; i += 2) {
-		if (!request_region(PC98BM_BASE + i, 1, "98busmouse")) {
-			printk(KERN_ERR "98busmouse.c: Can't allocate ports at %#x\n", PC98BM_BASE + i);
-			while (i > 0) {
-				i -= 2;
-				release_region(PC98BM_BASE + i, 1);
-			}
-
-			return -EBUSY;
-		}
-
-	}
-
-	if (!request_region(PC98BM_TIMER_PORT, 1, "98busmouse")) {
-		printk(KERN_ERR "98busmouse.c: Can't allocate ports at %#x\n", PC98BM_TIMER_PORT);
-		for (i = 0; i <= 6; i += 2)
-			release_region(PC98BM_BASE + i, 1);
-
-		return -EBUSY;
-	}
-
-	outb(PC98BM_DEFAULT_MODE, PC98BM_CONFIG_PORT);
-	outb(PC98BM_DISABLE_IRQ, PC98BM_CONTROL_PORT);
-
-	outb(PC98BM_DEFAULT_TIMER_VAL, PC98BM_TIMER_PORT);
-
-	input_register_device(&pc98bm_dev);
-	
-	printk(KERN_INFO "input: PC-9801 bus mouse at %#x irq %d\n", PC98BM_BASE, pc98bm_irq);
-
-	return 0;
-}
-
-static void __exit pc98bm_exit(void)
-{
-	int i;
-
-	input_unregister_device(&pc98bm_dev);
-	for (i = 0; i <= 6; i += 2)
-		release_region(PC98BM_BASE + i, 1);
-
-	release_region(PC98BM_TIMER_PORT, 1);
-}
-
-module_init(pc98bm_init);
-module_exit(pc98bm_exit);
--- diff/drivers/input/serio/98kbd-io.c	2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/input/serio/98kbd-io.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,179 +0,0 @@
-/*
- *  NEC PC-9801 keyboard controller driver for Linux
- *
- *  Copyright (c) 1999-2002 Osamu Tomita <tomita@cinet.co.jp>
- *    Based on i8042.c written by Vojtech Pavlik
- */
-
-/*
- * 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/delay.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/serio.h>
-#include <linux/sched.h>
-
-#include <asm/io.h>
-
-MODULE_AUTHOR("Osamu Tomita <tomita@cinet.co.jp>");
-MODULE_DESCRIPTION("NEC PC-9801 keyboard controller driver");
-MODULE_LICENSE("GPL");
-
-/*
- * Names.
- */
-
-#define KBD98_PHYS_DESC "isa0041/serio0"
-
-/*
- * IRQs.
- */
-
-#define KBD98_IRQ	1
-
-/*
- * Register numbers.
- */
-
-#define KBD98_COMMAND_REG	0x43
-#define KBD98_STATUS_REG	0x43
-#define KBD98_DATA_REG		0x41
-
-spinlock_t kbd98io_lock = SPIN_LOCK_UNLOCKED;
-
-static struct serio kbd98_port;
-extern struct pt_regs *kbd_pt_regs;
-
-static irqreturn_t kbd98io_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-
-/*
- * kbd98_flush() flushes all data that may be in the keyboard buffers
- */
-
-static int kbd98_flush(void)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&kbd98io_lock, flags);
-
-	while (inb(KBD98_STATUS_REG) & 0x02) /* RxRDY */
-		inb(KBD98_DATA_REG);
-
-	if (inb(KBD98_STATUS_REG) & 0x38)
-		printk("98kbd-io: Keyboard error!\n");
-
-	spin_unlock_irqrestore(&kbd98io_lock, flags);
-
-	return 0;
-}
-
-/*
- * kbd98_write() sends a byte out through the keyboard interface.
- */
-
-static int kbd98_write(struct serio *port, unsigned char c)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&kbd98io_lock, flags);
-
-	outb(0, 0x5f);			/* wait */
-	outb(0x17, KBD98_COMMAND_REG);	/* enable send command */
-	outb(0, 0x5f);			/* wait */
-	outb(c, KBD98_DATA_REG);
-	outb(0, 0x5f);			/* wait */
-	outb(0x16, KBD98_COMMAND_REG);	/* disable send command */
-	outb(0, 0x5f);			/* wait */
-
-	spin_unlock_irqrestore(&kbd98io_lock, flags);
-
-	return 0;
-}
-
-/*
- * kbd98_open() is called when a port is open by the higher layer.
- * It allocates the interrupt and enables in in the chip.
- */
-
-static int kbd98_open(struct serio *port)
-{
-	kbd98_flush();
-
-	if (request_irq(KBD98_IRQ, kbd98io_interrupt, 0, "kbd98", NULL)) {
-		printk(KERN_ERR "98kbd-io.c: Can't get irq %d for %s, unregistering the port.\n", KBD98_IRQ, "KBD");
-		serio_unregister_port(port);
-		return -1;
-	}
-
-	return 0;
-}
-
-static void kbd98_close(struct serio *port)
-{
-	free_irq(KBD98_IRQ, NULL);
-
-	kbd98_flush();
-}
-
-/*
- * Structures for registering the devices in the serio.c module.
- */
-
-static struct serio kbd98_port =
-{
-	.type =		SERIO_PC9800,
-	.write =	kbd98_write,
-	.open =		kbd98_open,
-	.close =	kbd98_close,
-	.driver =	NULL,
-	.name =		"PC-9801 Kbd Port",
-	.phys =		KBD98_PHYS_DESC,
-};
-
-/*
- * kbd98io_interrupt() is the most important function in this driver -
- * it handles the interrupts from keyboard, and sends incoming bytes
- * to the upper layers.
- */
-
-static irqreturn_t kbd98io_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	unsigned long flags;
-	unsigned char data;
-
-	spin_lock_irqsave(&kbd98io_lock, flags);
-
-	data = inb(KBD98_DATA_REG);
-	spin_unlock_irqrestore(&kbd98io_lock, flags);
-	serio_interrupt(&kbd98_port, data, 0, regs);
-
-	return IRQ_HANDLED;
-}
-
-int __init kbd98io_init(void)
-{
-	serio_register_port(&kbd98_port);
-
-	printk(KERN_INFO "serio: PC-9801 %s port at %#lx,%#lx irq %d\n",
-	       "KBD",
-	       (unsigned long) KBD98_DATA_REG,
-	       (unsigned long) KBD98_COMMAND_REG,
-	       KBD98_IRQ);
-
-	return 0;
-}
-
-void __exit kbd98io_exit(void)
-{
-	serio_unregister_port(&kbd98_port);
-}
-
-module_init(kbd98io_init);
-module_exit(kbd98io_exit);
--- diff/drivers/net/ne2k_cbus.c	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/ne2k_cbus.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,887 +0,0 @@
-/*
-
-  ne2k_cbus.c: A driver for the NE2000 like ethernet on NEC PC-9800.
-
-	This is a copy of the 2.5.66 Linux ISA NE2000 driver "ne.c" 
-	(Donald Becker/Paul Gortmaker) with the NEC PC-9800 specific
-	changes added by Osamu Tomita. 
-
-From ne.c:
------------
-    Copyright 1993 United States Government as represented by the
-    Director, National Security Agency.
-
-    This software may be used and distributed according to the terms
-    of the GNU General Public License, incorporated herein by reference.
------------
-
-*/
-
-/* Routines for the NatSemi-based designs (NE[12]000). */
-
-static const char version[] =
-"ne2k_cbus.c:v1.0 3/24/03 Osamu Tomita\n";
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/isapnp.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/delay.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-
-#include <asm/system.h>
-#include <asm/io.h>
-
-#include "8390.h"
-
-/* Some defines that people can play with if so inclined. */
-
-/* Do we support clones that don't adhere to 14,15 of the SAprom ? */
-#define SUPPORT_NE_BAD_CLONES
-
-/* Do we perform extra sanity checks on stuff ? */
-/* #define NE_SANITY_CHECK */
-
-/* Do we implement the read before write bugfix ? */
-/* #define NE_RW_BUGFIX */
-
-/* Do we have a non std. amount of memory? (in units of 256 byte pages) */
-/* #define PACKETBUF_MEMSIZE	0x40 */
-
-#ifdef SUPPORT_NE_BAD_CLONES
-/* A list of bad clones that we none-the-less recognize. */
-static struct { const char *name8, *name16; unsigned char SAprefix[4];}
-bad_clone_list[] __initdata = {
-    {"LA/T-98?", "LA/T-98", {0x00, 0xa0, 0xb0}},	/* I/O Data */
-    {"EGY-98?", "EGY-98", {0x00, 0x40, 0x26}},		/* Melco EGY98 */
-    {"ICM?", "ICM-27xx-ET", {0x00, 0x80, 0xc8}},	/* ICM IF-27xx-ET */
-    {"CNET-98/EL?", "CNET(98)E/L", {0x00, 0x80, 0x4C}},	/* Contec CNET-98/EL */
-    {0,}
-};
-#endif
-
-/* ---- No user-serviceable parts below ---- */
-
-#define NE_BASE	 (dev->base_addr)
-#define NE_CMD	 	EI_SHIFT(0x00)
-#define NE_DATAPORT	EI_SHIFT(0x10)	/* NatSemi-defined port window offset. */
-#define NE_RESET	EI_SHIFT(0x1f) /* Issue a read to reset, a write to clear. */
-#define NE_IO_EXTENT	0x20
-
-#define NE1SM_START_PG	0x20	/* First page of TX buffer */
-#define NE1SM_STOP_PG 	0x40	/* Last page +1 of RX ring */
-#define NESM_START_PG	0x40	/* First page of TX buffer */
-#define NESM_STOP_PG	0x80	/* Last page +1 of RX ring */
-
-#include "ne2k_cbus.h"
-
-static int ne_probe1(struct net_device *dev, int ioaddr);
-static int ne_open(struct net_device *dev);
-static int ne_close(struct net_device *dev);
-
-static void ne_reset_8390(struct net_device *dev);
-static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
-			  int ring_page);
-static void ne_block_input(struct net_device *dev, int count,
-			  struct sk_buff *skb, int ring_offset);
-static void ne_block_output(struct net_device *dev, const int count,
-		const unsigned char *buf, const int start_page);
-
-
-/*  Probe for various non-shared-memory ethercards.
-
-   NEx000-clone boards have a Station Address PROM (SAPROM) in the packet
-   buffer memory space.  NE2000 clones have 0x57,0x57 in bytes 0x0e,0x0f of
-   the SAPROM, while other supposed NE2000 clones must be detected by their
-   SA prefix.
-
-   Reading the SAPROM from a word-wide card with the 8390 set in byte-wide
-   mode results in doubled values, which can be detected and compensated for.
-
-   The probe is also responsible for initializing the card and filling
-   in the 'dev' and 'ei_status' structures.
-
-   We use the minimum memory size for some ethercard product lines, iff we can't
-   distinguish models.  You can increase the packet buffer size by setting
-   PACKETBUF_MEMSIZE.  Reported Cabletron packet buffer locations are:
-	E1010   starts at 0x100 and ends at 0x2000.
-	E1010-x starts at 0x100 and ends at 0x8000. ("-x" means "more memory")
-	E2010	 starts at 0x100 and ends at 0x4000.
-	E2010-x starts at 0x100 and ends at 0xffff.  */
-
-static int __init do_ne_probe(struct net_device *dev)
-{
-	unsigned int base_addr = dev->base_addr;
-	int irq = dev->irq;
-
-	SET_MODULE_OWNER(dev);
-
-	if (ei_debug > 2)
-		printk(KERN_DEBUG "ne_probe(): entered.\n");
-
-	/* If CONFIG_NET_CBUS,
-	   we need dev->priv->reg_offset BEFORE to probe */
-	if (ne2k_cbus_init(dev) != 0)
-		return -ENOMEM;
-
-	/* First check any supplied i/o locations. User knows best. <cough> */
-	if (base_addr > 0) {
-		int result;
-		const struct ne2k_cbus_hwinfo *hw = ne2k_cbus_get_hwinfo((int)(dev->mem_start & NE2K_CBUS_HARDWARE_TYPE_MASK));
-
-		if (ei_debug > 2)
-			printk(KERN_DEBUG "ne_probe(): call ne_probe_cbus(base_addr=0x%x)\n", base_addr);
-
-		result = ne_probe_cbus(dev, hw, base_addr, irq);
-		if (result != 0)
-			ne2k_cbus_destroy(dev);
-
-		return result;
-	}
-
-	if (ei_debug > 2)
-		printk(KERN_DEBUG "ne_probe(): base_addr is not specified.\n");
-
-#ifndef MODULE
-	/* Last resort. The semi-risky C-Bus auto-probe. */
-	if (ei_debug > 2)
-		printk(KERN_DEBUG "ne_probe(): auto-probe start.\n");
-
-	{
-		const struct ne2k_cbus_hwinfo *hw = ne2k_cbus_get_hwinfo((int)(dev->mem_start & NE2K_CBUS_HARDWARE_TYPE_MASK));
-
-		if (hw && hw->hwtype) {
-			const unsigned short *plist;
-			for (plist = hw->portlist; *plist; plist++)
-				if (ne_probe_cbus(dev, hw, *plist, irq) == 0)
-					return 0;
-		} else {
-			for (hw = &ne2k_cbus_hwinfo_list[0]; hw->hwtype; hw++) {
-				const unsigned short *plist;
-				for (plist = hw->portlist; *plist; plist++)
-					if (ne_probe_cbus(dev, hw, *plist, irq) == 0)
-						return 0;
-			}
-		}
-	}
-#endif
-
-	ne2k_cbus_destroy(dev);
-
-	return -ENODEV;
-}
-
-static void cleanup_card(struct net_device *dev)
-{
-	const struct ne2k_cbus_region *rlist;
-	const struct ne2k_cbus_hwinfo *hw = ne2k_cbus_get_hwinfo((int)(dev->mem_start & NE2K_CBUS_HARDWARE_TYPE_MASK));
-
-	free_irq(dev->irq, dev);
-	for (rlist = hw->regionlist; rlist->range; rlist++) {
-		release_region(dev->base_addr + rlist->start,
-				rlist->range);
-	}
-	ne2k_cbus_destroy(dev);
-}
-
-struct net_device * __init ne_probe(int unit)
-{
-	struct net_device *dev = alloc_ei_netdev();
-	int err;
-
-	if (!dev)
-		return ERR_PTR(-ENOMEM);
-
-	sprintf(dev->name, "eth%d", unit);
-	netdev_boot_setup_check(dev);
-
-	err = do_ne_probe(dev);
-	if (err)
-		goto out;
-	err = register_netdev(dev);
-	if (err)
-		goto out1;
-	return dev;
-out1:
-	cleanup_card(dev);
-out:
-	free_netdev(dev);
-	return ERR_PTR(err);
-}
-
-static int __init ne_probe_cbus(struct net_device *dev, const struct ne2k_cbus_hwinfo *hw, int ioaddr, int irq)
-{
-	if (ei_debug > 2)
-		printk(KERN_DEBUG "ne_probe_cbus(): entered. (called from %p)\n",
-		       __builtin_return_address(0));
-
-	if (hw && hw->hwtype) {
-		ne2k_cbus_set_hwtype(dev, hw, ioaddr);
-		dev->irq = irq;
-		return ne_probe1(dev, ioaddr);
-	} else {
-		/* auto detect */
-
-		printk(KERN_DEBUG "ne_probe_cbus(): try to determine hardware types.\n");
-		for (hw = &ne2k_cbus_hwinfo_list[0]; hw->hwtype; hw++) {
-			ne2k_cbus_set_hwtype(dev, hw, ioaddr);
-			dev->irq = irq;
-			if (ne_probe1(dev, ioaddr) == 0)
-				return 0;
-		}
-	}
-	return -ENODEV;
-}
-
-static int __init ne_probe1(struct net_device *dev, int ioaddr)
-{
-	int i;
-	unsigned char SA_prom[32];
-	int wordlength = 2;
-	const char *name = NULL;
-	int start_page, stop_page;
-	int neX000, bad_card;
-	int reg0, ret;
-	static unsigned version_printed;
-	const struct ne2k_cbus_region *rlist;
-	const struct ne2k_cbus_hwinfo *hw = ne2k_cbus_get_hwinfo((int)(dev->mem_start & NE2K_CBUS_HARDWARE_TYPE_MASK));
-	struct ei_device *ei_local = (struct ei_device *)(dev->priv);
-
-#ifdef CONFIG_NE2K_CBUS_CNET98EL
-	if (hw->hwtype == NE2K_CBUS_HARDWARE_TYPE_CNET98EL) {
-		outb_p(0, CONFIG_NE2K_CBUS_CNET98EL_IO_BASE);
-		/* udelay(5000);	*/
-		outb_p(1, CONFIG_NE2K_CBUS_CNET98EL_IO_BASE);
-		/* udelay(5000);	*/
-		outb_p((ioaddr & 0xf000) >> 8 | 0x08 | 0x01, CONFIG_NE2K_CBUS_CNET98EL_IO_BASE + 2);
-		/* udelay(5000); */
-	}
-#endif
-
-	for (rlist = hw->regionlist; rlist->range; rlist++)
-		if (!request_region(ioaddr + rlist->start,
-					rlist->range, dev->name)) {
-			ret = -EBUSY;
-			goto err_out;
-		}
-
-	reg0 = inb_p(ioaddr + EI_SHIFT(0));
-	if (reg0 == 0xFF) {
-		ret = -ENODEV;
-		goto err_out;
-	}
-
-	/* Do a preliminary verification that we have a 8390. */
-#ifdef CONFIG_NE2K_CBUS_CNET98EL
-	if (hw->hwtype != NE2K_CBUS_HARDWARE_TYPE_CNET98EL)
-#endif
-	{
-		int regd;
-		outb_p(E8390_NODMA+E8390_PAGE1+E8390_STOP, ioaddr + E8390_CMD);
-		regd = inb_p(ioaddr + EI_SHIFT(0x0d));
-		outb_p(0xff, ioaddr + EI_SHIFT(0x0d));
-		outb_p(E8390_NODMA+E8390_PAGE0, ioaddr + E8390_CMD);
-		inb_p(ioaddr + EN0_COUNTER0); /* Clear the counter by reading. */
-		if (inb_p(ioaddr + EN0_COUNTER0) != 0) {
-			outb_p(reg0, ioaddr);
-			outb_p(regd, ioaddr + EI_SHIFT(0x0d));	/* Restore the old values. */
-			ret = -ENODEV;
-			goto err_out;
-		}
-	}
-
-	if (ei_debug  &&  version_printed++ == 0)
-		printk(KERN_INFO "%s", version);
-
-	printk(KERN_INFO "NE*000 ethercard probe at %#3x:", ioaddr);
-
-	/* A user with a poor card that fails to ack the reset, or that
-	   does not have a valid 0x57,0x57 signature can still use this
-	   without having to recompile. Specifying an i/o address along
-	   with an otherwise unused dev->mem_end value of "0xBAD" will
-	   cause the driver to skip these parts of the probe. */
-
-	bad_card = ((dev->base_addr != 0) && (dev->mem_end == 0xbad));
-
-	/* Reset card. Who knows what dain-bramaged state it was left in. */
-
-	{
-		unsigned long reset_start_time = jiffies;
-
-		/* derived from CNET98EL-patch for bad clones */
-		outb_p(E8390_NODMA | E8390_STOP, ioaddr + E8390_CMD);
-
-		/* DON'T change these to inb_p/outb_p or reset will fail on clones. */
-		outb(inb(ioaddr + NE_RESET), ioaddr + NE_RESET);
-
-		while ((inb_p(ioaddr + EN0_ISR) & ENISR_RESET) == 0)
-		if (jiffies - reset_start_time > 2*HZ/100) {
-			if (bad_card) {
-				printk(" (warning: no reset ack)");
-				break;
-			} else {
-				printk(" not found (no reset ack).\n");
-				ret = -ENODEV;
-				goto err_out;
-			}
-		}
-
-		outb_p(0xff, ioaddr + EN0_ISR);		/* Ack all intr. */
-	}
-
-#ifdef CONFIG_NE2K_CBUS_CNET98EL
-	if (hw->hwtype == NE2K_CBUS_HARDWARE_TYPE_CNET98EL) {
-		static const char pat[32] ="AbcdeFghijKlmnoPqrstUvwxyZ789012";
-		char buf[32];
-		int maxwait = 200;
-
-		if (ei_debug > 2)
-			printk(" [CNET98EL-specific initialize...");
-		outb_p(E8390_NODMA | E8390_STOP, ioaddr + E8390_CMD); /* 0x20|0x1 */
-		ret = -ENODEV;
-		i = inb(ioaddr);
-		if ((i & ~0x2) != (0x20 | 0x01))
-			goto err_out;
-		if ((inb(ioaddr + 0x7) & 0x80) != 0x80)
-			goto err_out;
-		outb_p(E8390_RXOFF, ioaddr + EN0_RXCR); /* out(ioaddr+0xc, 0x20) */
-		/* outb_p(ENDCFG_WTS|ENDCFG_FT1|ENDCFG_LS, ioaddr+EN0_DCFG); */
-		outb_p(ENDCFG_WTS | 0x48, ioaddr + EN0_DCFG); /* 0x49 */
-		outb_p(CNET98EL_START_PG, ioaddr + EN0_STARTPG);
-		outb_p(CNET98EL_STOP_PG, ioaddr + EN0_STOPPG);
-		if (ei_debug > 2)
-			printk("memory check");
-		for (i = 0; i < 65536; i += 1024) {
-			if (ei_debug > 2)
-				printk(" %04x", i);
-			ne2k_cbus_writemem(dev, ioaddr, i, pat, 32);
-			while (((inb(ioaddr + EN0_ISR) & ENISR_RDC) != ENISR_RDC) && --maxwait)
-				;
-			ne2k_cbus_readmem(dev, ioaddr, i, buf, 32);
-			if (memcmp(pat, buf, 32)) {
-				if (ei_debug > 2)
-					printk(" failed.");
-				break;
-			}
-		}
-		if (i != 16384) {
-			if (ei_debug > 2)
-				printk("] ");
-			printk("memory failure at %x\n", i);
-			goto err_out;
-		}
-		if (ei_debug > 2)
-			printk(" good...");
-		if (!dev->irq) {
-			if (ei_debug > 2)
-				printk("] ");
-			printk("IRQ must be specified for C-NET(98)E/L. probe failed.\n");
-			goto err_out;
-		}
-		outb((dev->irq > 5) ? (dev->irq & 4):(dev->irq >> 1), ioaddr + (0x2 | 0x400));
-		outb(0x7e, ioaddr + (0x4 | 0x400));
-		ne2k_cbus_readmem(dev, ioaddr, 16384, SA_prom, 32);
-		outb(0xff, ioaddr + EN0_ISR);
-		if (ei_debug > 2)
-			printk("done]");
-	} else
-#endif /* CONFIG_NE2K_CBUS_CNET98EL */
-	/* Read the 16 bytes of station address PROM.
-	   We must first initialize registers, similar to NS8390_init(eifdev, 0).
-	   We can't reliably read the SAPROM address without this.
-	   (I learned the hard way!). */
-	{
-		struct {unsigned char value; unsigned short offset;} program_seq[] = 
-		{
-			{E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD}, /* Select page 0*/
-			/* NEC PC-9800: some board can only handle word-wide access? */
-			{0x48 | ENDCFG_WTS,	EN0_DCFG},	/* Set word-wide (0x48) access. */
-			{16384 / 256, EN0_STARTPG},
-			{32768 / 256, EN0_STOPPG},
-			{0x00,	EN0_RCNTLO},	/* Clear the count regs. */
-			{0x00,	EN0_RCNTHI},
-			{0x00,	EN0_IMR},	/* Mask completion irq. */
-			{0xFF,	EN0_ISR},
-			{E8390_RXOFF, EN0_RXCR},	/* 0x20  Set to monitor */
-			{E8390_TXOFF, EN0_TXCR},	/* 0x02  and loopback mode. */
-			{32,	EN0_RCNTLO},
-			{0x00,	EN0_RCNTHI},
-			{0x00,	EN0_RSARLO},	/* DMA starting at 0x0000. */
-			{0x00,	EN0_RSARHI},
-			{E8390_RREAD+E8390_START, E8390_CMD},
-		};
-
-		for (i = 0; i < sizeof(program_seq)/sizeof(program_seq[0]); i++)
-			outb_p(program_seq[i].value, ioaddr + program_seq[i].offset);
-		insw(ioaddr + NE_DATAPORT, SA_prom, 32 >> 1);
-
-	}
-
-	if (wordlength == 2)
-	{
-		for (i = 0; i < 16; i++)
-			SA_prom[i] = SA_prom[i+i];
-		start_page = NESM_START_PG;
-		stop_page = NESM_STOP_PG;
-#ifdef CONFIG_NE2K_CBUS_CNET98EL
-		if (hw->hwtype == NE2K_CBUS_HARDWARE_TYPE_CNET98EL) {
-			start_page = CNET98EL_START_PG;
-			stop_page = CNET98EL_STOP_PG;
-		}
-#endif
-	} else {
-		start_page = NE1SM_START_PG;
-		stop_page = NE1SM_STOP_PG;
-	}
-
-	neX000 = (SA_prom[14] == 0x57  &&  SA_prom[15] == 0x57);
-	if (neX000) {
-		name = "C-Bus-NE2K-compat";
-	}
-	else
-	{
-#ifdef SUPPORT_NE_BAD_CLONES
-		/* Ack!  Well, there might be a *bad* NE*000 clone there.
-		   Check for total bogus addresses. */
-		for (i = 0; bad_clone_list[i].name8; i++)
-		{
-			if (SA_prom[0] == bad_clone_list[i].SAprefix[0] &&
-				SA_prom[1] == bad_clone_list[i].SAprefix[1] &&
-				SA_prom[2] == bad_clone_list[i].SAprefix[2])
-			{
-				if (wordlength == 2)
-				{
-					name = bad_clone_list[i].name16;
-				} else {
-					name = bad_clone_list[i].name8;
-				}
-				break;
-			}
-		}
-		if (bad_clone_list[i].name8 == NULL)
-		{
-			printk(" not found (invalid signature %2.2x %2.2x).\n",
-				SA_prom[14], SA_prom[15]);
-			ret = -ENXIO;
-			goto err_out;
-		}
-#else
-		printk(" not found.\n");
-		ret = -ENXIO;
-		goto err_out;
-#endif
-	}
-
-	if (dev->irq < 2)
-	{
-		unsigned long cookie = probe_irq_on();
-		outb_p(0x50, ioaddr + EN0_IMR);	/* Enable one interrupt. */
-		outb_p(0x00, ioaddr + EN0_RCNTLO);
-		outb_p(0x00, ioaddr + EN0_RCNTHI);
-		outb_p(E8390_RREAD+E8390_START, ioaddr); /* Trigger it... */
-		mdelay(10);		/* wait 10ms for interrupt to propagate */
-		outb_p(0x00, ioaddr + EN0_IMR); 		/* Mask it again. */
-		dev->irq = probe_irq_off(cookie);
-		if (ei_debug > 2)
-			printk(" autoirq is %d\n", dev->irq);
-	} else if (dev->irq == 7)
-		/* Fixup for users that don't know that IRQ 7 is really IRQ 11,
-		   or don't know which one to set. */
-		dev->irq = 11;
-
-	if (! dev->irq) {
-		printk(" failed to detect IRQ line.\n");
-		ret = -EAGAIN;
-		goto err_out;
-	}
-
-	/* Snarf the interrupt now.  There's no point in waiting since we cannot
-	   share and the board will usually be enabled. */
-	ret = request_irq(dev->irq, ei_interrupt, 0, name, dev);
-	if (ret) {
-		printk (" unable to get IRQ %d (errno=%d).\n", dev->irq, ret);
-		goto err_out_kfree;
-	}
-
-	dev->base_addr = ioaddr;
-
-	for(i = 0; i < ETHER_ADDR_LEN; i++) {
-		printk(" %2.2x", SA_prom[i]);
-		dev->dev_addr[i] = SA_prom[i];
-	}
-
-	printk("\n%s: %s found at %#x, hardware type %d(%s), using IRQ %d.\n",
-		   dev->name, name, ioaddr, hw->hwtype, hw->hwident, dev->irq);
-
-	ei_status.name = name;
-	ei_status.tx_start_page = start_page;
-	ei_status.stop_page = stop_page;
-	ei_status.word16 = (wordlength == 2);
-
-	ei_status.rx_start_page = start_page + TX_PAGES;
-#ifdef PACKETBUF_MEMSIZE
-	 /* Allow the packet buffer size to be overridden by know-it-alls. */
-	ei_status.stop_page = ei_status.tx_start_page + PACKETBUF_MEMSIZE;
-#endif
-
-	ei_status.reset_8390 = &ne_reset_8390;
-	ei_status.block_input = &ne_block_input;
-	ei_status.block_output = &ne_block_output;
-	ei_status.get_8390_hdr = &ne_get_8390_hdr;
-	ei_status.priv = 0;
-	dev->open = &ne_open;
-	dev->stop = &ne_close;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-	dev->poll_controller = ei_poll;
-#endif
-	NS8390_init(dev, 0);
-	return 0;
-
-err_out_kfree:
-	ne2k_cbus_destroy(dev);
-err_out:
-	while (rlist > hw->regionlist) {
-		rlist --;
-		release_region(ioaddr + rlist->start, rlist->range);
-	}
-	return ret;
-}
-
-static int ne_open(struct net_device *dev)
-{
-	ei_open(dev);
-	return 0;
-}
-
-static int ne_close(struct net_device *dev)
-{
-	if (ei_debug > 1)
-		printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name);
-	ei_close(dev);
-	return 0;
-}
-
-/* Hard reset the card.  This used to pause for the same period that a
-   8390 reset command required, but that shouldn't be necessary. */
-
-static void ne_reset_8390(struct net_device *dev)
-{
-	unsigned long reset_start_time = jiffies;
-	struct ei_device *ei_local = (struct ei_device *)(dev->priv);
-
-	if (ei_debug > 1)
-		printk(KERN_DEBUG "resetting the 8390 t=%ld...", jiffies);
-
-	/* derived from CNET98EL-patch for bad clones... */
-	outb_p(E8390_NODMA | E8390_STOP, NE_BASE + E8390_CMD);  /* 0x20 | 0x1 */
-
-	/* DON'T change these to inb_p/outb_p or reset will fail on clones. */
-	outb(inb(NE_BASE + NE_RESET), NE_BASE + NE_RESET);
-
-	ei_status.txing = 0;
-	ei_status.dmaing = 0;
-
-	/* This check _should_not_ be necessary, omit eventually. */
-	while ((inb_p(NE_BASE+EN0_ISR) & ENISR_RESET) == 0)
-		if (jiffies - reset_start_time > 2*HZ/100) {
-			printk(KERN_WARNING "%s: ne_reset_8390() did not complete.\n", dev->name);
-			break;
-		}
-	outb_p(ENISR_RESET, NE_BASE + EN0_ISR);	/* Ack intr. */
-}
-
-/* Grab the 8390 specific header. Similar to the block_input routine, but
-   we don't need to be concerned with ring wrap as the header will be at
-   the start of a page, so we optimize accordingly. */
-
-static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
-{
-	int nic_base = dev->base_addr;
-	struct ei_device *ei_local = (struct ei_device *)(dev->priv);
-
-	/* This *shouldn't* happen. If it does, it's the last thing you'll see */
-
-	if (ei_status.dmaing)
-	{
-		printk(KERN_EMERG "%s: DMAing conflict in ne_get_8390_hdr "
-			"[DMAstat:%d][irqlock:%d].\n",
-			dev->name, ei_status.dmaing, ei_status.irqlock);
-		return;
-	}
-
-	ei_status.dmaing |= 0x01;
-	outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, nic_base+ NE_CMD);
-	outb_p(sizeof(struct e8390_pkt_hdr), nic_base + EN0_RCNTLO);
-	outb_p(0, nic_base + EN0_RCNTHI);
-	outb_p(0, nic_base + EN0_RSARLO);		/* On page boundary */
-	outb_p(ring_page, nic_base + EN0_RSARHI);
-	outb_p(E8390_RREAD+E8390_START, nic_base + NE_CMD);
-
-	if (ei_status.word16)
-		insw(NE_BASE + NE_DATAPORT, hdr, sizeof(struct e8390_pkt_hdr)>>1);
-	else
-		insb(NE_BASE + NE_DATAPORT, hdr, sizeof(struct e8390_pkt_hdr));
-
-	outb_p(ENISR_RDC, nic_base + EN0_ISR);	/* Ack intr. */
-	ei_status.dmaing &= ~0x01;
-
-	le16_to_cpus(&hdr->count);
-}
-
-/* Block input and output, similar to the Crynwr packet driver.  If you
-   are porting to a new ethercard, look at the packet driver source for hints.
-   The NEx000 doesn't share the on-board packet memory -- you have to put
-   the packet out through the "remote DMA" dataport using outb. */
-
-static void ne_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset)
-{
-#ifdef NE_SANITY_CHECK
-	int xfer_count = count;
-#endif
-	int nic_base = dev->base_addr;
-	char *buf = skb->data;
-	struct ei_device *ei_local = (struct ei_device *)(dev->priv);
-
-	/* This *shouldn't* happen. If it does, it's the last thing you'll see */
-	if (ei_status.dmaing)
-	{
-		printk(KERN_EMERG "%s: DMAing conflict in ne_block_input "
-			"[DMAstat:%d][irqlock:%d].\n",
-			dev->name, ei_status.dmaing, ei_status.irqlock);
-		return;
-	}
-	ei_status.dmaing |= 0x01;
-
-	/* round up count to a word (derived from ICM-patch) */
-	count = (count + 1) & ~1;
-
-	outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, nic_base+ NE_CMD);
-	outb_p(count & 0xff, nic_base + EN0_RCNTLO);
-	outb_p(count >> 8, nic_base + EN0_RCNTHI);
-	outb_p(ring_offset & 0xff, nic_base + EN0_RSARLO);
-	outb_p(ring_offset >> 8, nic_base + EN0_RSARHI);
-	outb_p(E8390_RREAD+E8390_START, nic_base + NE_CMD);
-	if (ei_status.word16)
-	{
-		insw(NE_BASE + NE_DATAPORT,buf,count>>1);
-		if (count & 0x01)
-		{
-			buf[count-1] = inb(NE_BASE + NE_DATAPORT);
-#ifdef NE_SANITY_CHECK
-			xfer_count++;
-#endif
-		}
-	} else {
-		insb(NE_BASE + NE_DATAPORT, buf, count);
-	}
-
-#ifdef NE_SANITY_CHECK
-	/* This was for the ALPHA version only, but enough people have
-	   been encountering problems so it is still here.  If you see
-	   this message you either 1) have a slightly incompatible clone
-	   or 2) have noise/speed problems with your bus. */
-
-	if (ei_debug > 1)
-	{
-		/* DMA termination address check... */
-		int addr, tries = 20;
-		do {
-			/* DON'T check for 'inb_p(EN0_ISR) & ENISR_RDC' here
-			   -- it's broken for Rx on some cards! */
-			int high = inb_p(nic_base + EN0_RSARHI);
-			int low = inb_p(nic_base + EN0_RSARLO);
-			addr = (high << 8) + low;
-			if (((ring_offset + xfer_count) & 0xff) == low)
-				break;
-		} while (--tries > 0);
-	 	if (tries <= 0)
-			printk(KERN_WARNING "%s: RX transfer address mismatch,"
-				"%#4.4x (expected) vs. %#4.4x (actual).\n",
-				dev->name, ring_offset + xfer_count, addr);
-	}
-#endif
-	outb_p(ENISR_RDC, nic_base + EN0_ISR);	/* Ack intr. */
-	ei_status.dmaing &= ~0x01;
-}
-
-static void ne_block_output(struct net_device *dev, int count,
-		const unsigned char *buf, const int start_page)
-{
-	int nic_base = NE_BASE;
-	unsigned long dma_start;
-#ifdef NE_SANITY_CHECK
-	int retries = 0;
-#endif
-	struct ei_device *ei_local = (struct ei_device *)(dev->priv);
-
-	/* Round the count up for word writes.  Do we need to do this?
-	   What effect will an odd byte count have on the 8390?
-	   I should check someday. */
-
-	if (ei_status.word16 && (count & 0x01))
-		count++;
-
-	/* This *shouldn't* happen. If it does, it's the last thing you'll see */
-	if (ei_status.dmaing)
-	{
-		printk(KERN_EMERG "%s: DMAing conflict in ne_block_output."
-			"[DMAstat:%d][irqlock:%d]\n",
-			dev->name, ei_status.dmaing, ei_status.irqlock);
-		return;
-	}
-	ei_status.dmaing |= 0x01;
-	/* We should already be in page 0, but to be safe... */
-	outb_p(E8390_PAGE0+E8390_START+E8390_NODMA, nic_base + NE_CMD);
-
-#ifdef NE_SANITY_CHECK
-retry:
-#endif
-
-#ifdef NE8390_RW_BUGFIX
-	/* Handle the read-before-write bug the same way as the
-	   Crynwr packet driver -- the NatSemi method doesn't work.
-	   Actually this doesn't always work either, but if you have
-	   problems with your NEx000 this is better than nothing! */
-
-	outb_p(0x42, nic_base + EN0_RCNTLO);
-	outb_p(0x00,   nic_base + EN0_RCNTHI);
-	outb_p(0x42, nic_base + EN0_RSARLO);
-	outb_p(0x00, nic_base + EN0_RSARHI);
-	outb_p(E8390_RREAD+E8390_START, nic_base + NE_CMD);
-	/* Make certain that the dummy read has occurred. */
-	udelay(6);
-#endif
-
-	outb_p(ENISR_RDC, nic_base + EN0_ISR);
-
-	/* Now the normal output. */
-	outb_p(count & 0xff, nic_base + EN0_RCNTLO);
-	outb_p(count >> 8,   nic_base + EN0_RCNTHI);
-	outb_p(0x00, nic_base + EN0_RSARLO);
-	outb_p(start_page, nic_base + EN0_RSARHI);
-
-	outb_p(E8390_RWRITE+E8390_START, nic_base + NE_CMD);
-	if (ei_status.word16) {
-		outsw(NE_BASE + NE_DATAPORT, buf, count>>1);
-	} else {
-		outsb(NE_BASE + NE_DATAPORT, buf, count);
-	}
-
-	dma_start = jiffies;
-
-#ifdef NE_SANITY_CHECK
-	/* This was for the ALPHA version only, but enough people have
-	   been encountering problems so it is still here. */
-
-	if (ei_debug > 1)
-	{
-		/* DMA termination address check... */
-		int addr, tries = 20;
-		do {
-			int high = inb_p(nic_base + EN0_RSARHI);
-			int low = inb_p(nic_base + EN0_RSARLO);
-			addr = (high << 8) + low;
-			if ((start_page << 8) + count == addr)
-				break;
-		} while (--tries > 0);
-
-		if (tries <= 0)
-		{
-			printk(KERN_WARNING "%s: Tx packet transfer address mismatch,"
-				"%#4.4x (expected) vs. %#4.4x (actual).\n",
-				dev->name, (start_page << 8) + count, addr);
-			if (retries++ == 0)
-				goto retry;
-		}
-	}
-#endif
-
-	while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0)
-		if (jiffies - dma_start > 2*HZ/100) {		/* 20ms */
-			printk(KERN_WARNING "%s: timeout waiting for Tx RDC.\n", dev->name);
-			ne_reset_8390(dev);
-			NS8390_init(dev,1);
-			break;
-		}
-
-	outb_p(ENISR_RDC, nic_base + EN0_ISR);	/* Ack intr. */
-	ei_status.dmaing &= ~0x01;
-	return;
-}
-
-
-#ifdef MODULE
-#define MAX_NE_CARDS	4	/* Max number of NE cards per module */
-static struct net_device *dev_ne[MAX_NE_CARDS];
-static int io[MAX_NE_CARDS];
-static int irq[MAX_NE_CARDS];
-static int bad[MAX_NE_CARDS];	/* 0xbad = bad sig or no reset ack */
-static int hwtype[MAX_NE_CARDS] = { 0, }; /* board type */
-
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
-MODULE_PARM(bad, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
-MODULE_PARM(hwtype, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
-MODULE_PARM_DESC(io, "I/O base address(es),required");
-MODULE_PARM_DESC(irq, "IRQ number(s)");
-MODULE_PARM_DESC(bad, "Accept card(s) with bad signatures");
-MODULE_PARM_DESC(hwtype, "Board type of PC-9800 C-Bus NIC");
-MODULE_DESCRIPTION("NE1000/NE2000 PC-9800 C-bus Ethernet driver");
-MODULE_LICENSE("GPL");
-
-/* This is set up so that no ISA autoprobe takes place. We can't guarantee
-that the ne2k probe is the last 8390 based probe to take place (as it
-is at boot) and so the probe will get confused by any other 8390 cards.
-ISA device autoprobes on a running machine are not recommended anyway. */
-
-int init_module(void)
-{
-	int this_dev, found = 0;
-
-	for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) {
-		struct net_device *dev = alloc_ei_netdev();
-		if (!dev)
-			break;
-		dev->irq = irq[this_dev];
-		dev->mem_end = bad[this_dev];
-		dev->base_addr = io[this_dev];
-		dev->mem_start = hwtype[this_dev];
-		if (do_ne_probe(dev) == 0) {
-			if (register_netdev(dev) == 0) {
-				dev_ne[found++] = dev;
-				continue;
-			}
-			cleanup_card(dev);
-		}
-		free_netdev(dev);
-		if (found)
-			break;
-		if (io[this_dev] != 0)
-			printk(KERN_WARNING "ne2k_cbus: No NE*000 card found at i/o = %#x\n", io[this_dev]);
-		else
-			printk(KERN_NOTICE "ne.c: You must supply \"io=0xNNN\" value(s) for ISA cards.\n");
-		return -ENXIO;
-	}
-	if (found)
-		return 0;
- 	return -ENODEV;
-}
-
-void cleanup_module(void)
-{
-	int this_dev;
-
-	for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) {
-		struct net_device *dev = dev_ne[this_dev];
-		if (dev) {
-			unregister_netdev(dev);
-			cleanup_card(dev);
-			free_netdev(dev);
-		}
-	}
-}
-#endif /* MODULE */
-
--- diff/drivers/net/ne2k_cbus.h	2004-05-19 22:11:55.000000000 +0100
+++ source/drivers/net/ne2k_cbus.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,481 +0,0 @@
-/* ne2k_cbus.h: 
-   vender-specific information definition for NEC PC-9800
-   C-bus Ethernet Cards
-   Used in ne.c 
-
-   (C)1998,1999 KITAGWA Takurou & Linux/98 project
-*/
-
-#include <linux/config.h>
-
-#undef NE_RESET
-#define NE_RESET EI_SHIFT(0x11) /* Issue a read to reset, a write to clear. */
-
-#ifdef CONFIG_NE2K_CBUS_CNET98EL
-#ifndef CONFIG_NE2K_CBUS_CNET98EL_IO_BASE
-#warning CONFIG_NE2K_CBUS_CNET98EL_IO_BASE is not defined(config error?)
-#warning use 0xaaed as default
-#define CONFIG_NE2K_CBUS_CNET98EL_IO_BASE 0xaaed /* or 0x55ed */
-#endif
-#define CNET98EL_START_PG 0x00
-#define CNET98EL_STOP_PG 0x40
-#endif
-
-/* Hardware type definition (derived from *BSD) */
-#define NE2K_CBUS_HARDWARE_TYPE_MASK 0xff
-
-/* 0: reserved for auto-detect */
-/* 1: (not tested)
-   Allied Telesis CentreCom LA-98-T */
-#define NE2K_CBUS_HARDWARE_TYPE_ATLA98 1
-/* 2: (not tested)
-   ELECOM Laneed
-   LD-BDN[123]A
-   PLANET SMART COM 98 EN-2298-C
-   MACNICA ME98 */
-#define NE2K_CBUS_HARDWARE_TYPE_BDN 2
-/* 3:
-   Melco EGY-98
-   Contec C-NET(98)E*A/L*A,C-NET(98)P */
-#define NE2K_CBUS_HARDWARE_TYPE_EGY98 3
-/* 4:
-   Melco LGY-98,IND-SP,IND-SS
-   MACNICA NE2098 */
-#define NE2K_CBUS_HARDWARE_TYPE_LGY98 4
-/* 5:
-   ICM DT-ET-25,DT-ET-T5,IF-2766ET,IF-2771ET
-   PLANET SMART COM 98 EN-2298-T,EN-2298P-T
-   D-Link DE-298PT,DE-298PCAT
-   ELECOM Laneed LD-98P */
-#define NE2K_CBUS_HARDWARE_TYPE_ICM 5
-/* 6: (reserved for SIC-98, which is not supported in this driver.) */
-/* 7: (unused in *BSD?)
-   <Original NE2000 compatible>
-   <for PCI/PCMCIA cards>
-*/
-#define NE2K_CBUS_HARDWARE_TYPE_NE2K 7
-/* 8:
-   NEC PC-9801-108 */
-#define NE2K_CBUS_HARDWARE_TYPE_NEC108 8
-/* 9:
-   I-O DATA LA-98,LA/T-98 */
-#define NE2K_CBUS_HARDWARE_TYPE_IOLA98 9
-/* 10: (reserved for C-NET(98), which is not supported in this driver.) */
-/* 11:
-   Contec C-NET(98)E,L */
-#define NE2K_CBUS_HARDWARE_TYPE_CNET98EL 11
-
-#define NE2K_CBUS_HARDWARE_TYPE_MAX 11
-
-/* HARDWARE TYPE ID 12-31: reserved */
-
-struct ne2k_cbus_offsetinfo {
-	unsigned short skip;
-	unsigned short offset8; /* +0x8 - +0xf */
-	unsigned short offset10; /* +0x10 */
-	unsigned short offset1f; /* +0x1f */
-};
-
-struct ne2k_cbus_region {
-	unsigned short start;
-	short range;
-};
-
-struct ne2k_cbus_hwinfo {
-	const unsigned short hwtype;
-	const unsigned char *hwident;
-#ifndef MODULE
-	const unsigned short *portlist;
-#endif
-	const struct ne2k_cbus_offsetinfo *offsetinfo;
-	const struct ne2k_cbus_region *regionlist;
-};
-
-#ifdef CONFIG_NE2K_CBUS_ATLA98
-#ifndef MODULE
-static unsigned short atla98_portlist[] __initdata = {
-	0xd0,
-	0
-};
-#endif
-#define atla98_offsetinfo ne2k_offsetinfo
-#define atla98_regionlist ne2k_regionlist
-#endif /* CONFIG_NE2K_CBUS_ATLA98 */
-
-#ifdef CONFIG_NE2K_CBUS_BDN
-#ifndef MODULE
-static unsigned short bdn_portlist[] __initdata = {
-	0xd0,
-	0
-};
-#endif
-static struct ne2k_cbus_offsetinfo bdn_offsetinfo __initdata = {
-#if 0
-	/* comes from FreeBSD(98) ed98.h */
-	0x1000, 0x8000, 0x100, 0xc200 /* ??? */
-#else
-	/* comes from NetBSD/pc98 if_ne_isa.c */
-	0x1000, 0x8000, 0x100, 0x7f00 /* ??? */
-#endif
-};
-static struct ne2k_cbus_region bdn_regionlist[] __initdata = {
-	{0x0, 1}, {0x1000, 1}, {0x2000, 1}, {0x3000,1},
-	{0x4000, 1}, {0x5000, 1}, {0x6000, 1}, {0x7000, 1},
-	{0x8000, 1}, {0x9000, 1}, {0xa000, 1}, {0xb000, 1},
-	{0xc000, 1}, {0xd000, 1}, {0xe000, 1}, {0xf000, 1},
-	{0x100, 1}, {0x7f00, 1},
-	{0x0, 0}
-};
-#endif /* CONFIG_NE2K_CBUS_BDN */
-
-#ifdef CONFIG_NE2K_CBUS_EGY98
-#ifndef MODULE
-static unsigned short egy98_portlist[] __initdata = {
-	0xd0,
-	0
-};
-#endif
-static struct ne2k_cbus_offsetinfo egy98_offsetinfo __initdata = {
-	0x02, 0x100, 0x200, 0x300
-};
-static struct ne2k_cbus_region egy98_regionlist[] __initdata = {
-	{0x0, 1}, {0x2, 1}, {0x4, 1}, {0x6, 1},
-	{0x8, 1}, {0xa, 1}, {0xc, 1}, {0xe, 1},
-	{0x100, 1}, {0x102, 1}, {0x104, 1}, {0x106, 1},
-	{0x108, 1}, {0x10a, 1}, {0x10c, 1}, {0x10e, 1},
-	{0x200, 1}, {0x300, 1},
-	{0x0, 0}
-};
-#endif /* CONFIG_NE2K_CBUS_EGY98 */
-
-#ifdef CONFIG_NE2K_CBUS_LGY98
-#ifndef MODULE
-static unsigned short lgy98_portlist[] __initdata = {
-	0xd0, 0x10d0, 0x20d0, 0x30d0, 0x40d0, 0x50d0, 0x60d0, 0x70d0,
-	0
-};
-#endif
-static struct ne2k_cbus_offsetinfo lgy98_offsetinfo __initdata = {
-	0x01, 0x08, 0x200, 0x300
-};
-static struct ne2k_cbus_region lgy98_regionlist[] __initdata = {
-	{0x0, 16}, {0x200, 1}, {0x300, 1},
-	{0x0, 0}
-};
-#endif /* CONFIG_NE2K_CBUS_LGY98 */
-
-#ifdef CONFIG_NE2K_CBUS_ICM
-#ifndef MODULE
-static unsigned short icm_portlist[] __initdata = {
-	/* ICM */
-	0x56d0,
-	/* LD-98PT */
-	0x46d0, 0x66d0, 0x76d0, 0x86d0, 0x96d0, 0xa6d0, 0xb6d0, 0xc6d0,
-	0
-};
-#endif
-static struct ne2k_cbus_offsetinfo icm_offsetinfo __initdata = {
-	0x01, 0x08, 0x100, 0x10f
-};
-static struct ne2k_cbus_region icm_regionlist[] __initdata = {
-	{0x0, 16}, {0x100, 16},
-	{0x0, 0}
-};
-#endif /* CONFIG_NE2K_CBUS_ICM */
-
-#if defined(CONFIG_NE2K_CBUS_NE2K) && !defined(MODULE)
-static unsigned short ne2k_portlist[] __initdata = {
-	0xd0, 0x300, 0x280, 0x320, 0x340, 0x360, 0x380,
-	0
-};
-#endif
-#if defined(CONFIG_NE2K_CBUS_NE2K) || defined(CONFIG_NE2K_CBUS_ATLA98)
-static struct ne2k_cbus_offsetinfo ne2k_offsetinfo __initdata = {
-	0x01, 0x08, 0x10, 0x1f
-};
-static struct ne2k_cbus_region ne2k_regionlist[] __initdata = {
-	{0x0, 32},
-	{0x0, 0}
-};
-#endif
-
-#ifdef CONFIG_NE2K_CBUS_NEC108
-#ifndef MODULE
-static unsigned short nec108_portlist[] __initdata = {
-	0x770, 0x2770, 0x4770, 0x6770,
-	0
-};
-#endif
-static struct ne2k_cbus_offsetinfo nec108_offsetinfo __initdata = {
-	0x02, 0x1000, 0x888, 0x88a
-};
-static struct ne2k_cbus_region nec108_regionlist[] __initdata = {
-	{0x0, 1}, {0x2, 1}, {0x4, 1}, {0x6, 1},
-	{0x8, 1}, {0xa, 1}, {0xc, 1}, {0xe, 1},
-	{0x1000, 1}, {0x1002, 1}, {0x1004, 1}, {0x1006, 1},
-	{0x1008, 1}, {0x100a, 1}, {0x100c, 1}, {0x100e, 1},
-	{0x888, 1}, {0x88a, 1}, {0x88c, 1}, {0x88e, 1},
-	{0x0, 0}
-};
-#endif
-
-#ifdef CONFIG_NE2K_CBUS_IOLA98
-#ifndef MODULE
-static unsigned short iola98_portlist[] __initdata = {
-	0xd0, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde,
-	0
-};
-#endif
-static struct ne2k_cbus_offsetinfo iola98_offsetinfo __initdata = {
-	0x1000, 0x8000, 0x100, 0xf100
-};
-static struct ne2k_cbus_region iola98_regionlist[] __initdata = {
-	{0x0, 1}, {0x1000, 1}, {0x2000, 1}, {0x3000, 1},
-	{0x4000, 1}, {0x5000, 1}, {0x6000, 1}, {0x7000, 1},
-	{0x8000, 1}, {0x9000, 1}, {0xa000, 1}, {0xb000, 1},
-	{0xc000, 1}, {0xd000, 1}, {0xe000, 1}, {0xf000, 1},
-	{0x100, 1}, {0xf100, 1},
-	{0x0,0}
-};
-#endif /* CONFIG_NE2K_CBUS_IOLA98 */
-
-#ifdef CONFIG_NE2K_CBUS_CNET98EL
-#ifndef MODULE
-static unsigned short cnet98el_portlist[] __initdata = {
-	0x3d0, 0x13d0, 0x23d0, 0x33d0, 0x43d0, 0x53d0, 0x60d0, 0x70d0,
-	0
-};
-#endif
-static struct ne2k_cbus_offsetinfo cnet98el_offsetinfo __initdata = {
-	0x01, 0x08, 0x40e, 0x400
-};
-static struct ne2k_cbus_region cnet98el_regionlist[] __initdata = {
-	{0x0, 16}, {0x400, 16},
-	{0x0, 0}
-};
-#endif
-
-
-/* port information table (for ne.c initialize/probe process) */
-
-static struct ne2k_cbus_hwinfo ne2k_cbus_hwinfo_list[] __initdata = {
-#ifdef CONFIG_NE2K_CBUS_ATLA98
-/* NOT TESTED */
-	{
-		NE2K_CBUS_HARDWARE_TYPE_ATLA98,
-		"LA-98-T",
-#ifndef MODULE
-		atla98_portlist,
-#endif
-		&atla98_offsetinfo, atla98_regionlist
-	},
-#endif
-#ifdef CONFIG_NE2K_CBUS_BDN
-/* NOT TESTED */
-	{
-		NE2K_CBUS_HARDWARE_TYPE_BDN,
-		"LD-BDN[123]A",
-#ifndef MODULE
-		bdn_portlist,
-#endif
-		&bdn_offsetinfo, bdn_regionlist
-	},
-#endif
-#ifdef CONFIG_NE2K_CBUS_ICM
-	{
-		NE2K_CBUS_HARDWARE_TYPE_ICM,
-		"IF-27xxET",
-#ifndef MODULE
-		icm_portlist,
-#endif
-		&icm_offsetinfo, icm_regionlist
-	},
-#endif
-#ifdef CONFIG_NE2K_CBUS_NE2K
-	{
-		NE2K_CBUS_HARDWARE_TYPE_NE2K,
-		"NE2000 compat.",
-#ifndef MODULE
-		ne2k_portlist,
-#endif
-		&ne2k_offsetinfo, ne2k_regionlist
-	},
-#endif
-#ifdef CONFIG_NE2K_CBUS_NEC108
-	{
-		NE2K_CBUS_HARDWARE_TYPE_NEC108,
-		"PC-9801-108",
-#ifndef MODULE
-		nec108_portlist,
-#endif
-		&nec108_offsetinfo, nec108_regionlist
-	},
-#endif
-#ifdef CONFIG_NE2K_CBUS_IOLA98
-	{
-		NE2K_CBUS_HARDWARE_TYPE_IOLA98,
-		"LA-98",
-#ifndef MODULE
-		iola98_portlist,
-#endif
-		&iola98_offsetinfo, iola98_regionlist
-	},
-#endif
-#ifdef CONFIG_NE2K_CBUS_CNET98EL
-	{
-		NE2K_CBUS_HARDWARE_TYPE_CNET98EL,
-		"C-NET(98)E/L",
-#ifndef MODULE
-		cnet98el_portlist,
-#endif
-		&cnet98el_offsetinfo, cnet98el_regionlist
-	},
-#endif
-/* NOTE: LGY98 must be probed before EGY98, or system stalled!? */
-#ifdef CONFIG_NE2K_CBUS_LGY98
-	{
-		NE2K_CBUS_HARDWARE_TYPE_LGY98,
-		"LGY-98",
-#ifndef MODULE
-		lgy98_portlist,
-#endif
-		&lgy98_offsetinfo, lgy98_regionlist
-	},
-#endif
-#ifdef CONFIG_NE2K_CBUS_EGY98
-	{
-		NE2K_CBUS_HARDWARE_TYPE_EGY98,
-		"EGY-98",
-#ifndef MODULE
-		egy98_portlist,
-#endif
-		&egy98_offsetinfo, egy98_regionlist
-	},
-#endif
-	{
-		0,
-		"unsupported hardware",
-#ifndef MODULE
-		NULL,
-#endif
-		NULL, NULL
-	}
-};
-
-static int __init ne2k_cbus_init(struct net_device *dev)
-{
-	struct ei_device *ei_local;
-	if (dev->priv == NULL) {
-		ei_local = kmalloc(sizeof(struct ei_device), GFP_KERNEL);
-		if (ei_local == NULL)
-			return -ENOMEM;
-		memset(ei_local, 0, sizeof(struct ei_device));
-		ei_local->reg_offset = kmalloc(sizeof(typeof(*ei_local->reg_offset))*18, GFP_KERNEL);
-		if (ei_local->reg_offset == NULL) {
-			kfree(ei_local);
-			return -ENOMEM;
-		}
-		spin_lock_init(&ei_local->page_lock);
-		dev->priv = ei_local;
-	}
-	return 0;
-}
-
-static void ne2k_cbus_destroy(struct net_device *dev)
-{
-	struct ei_device *ei_local = (struct ei_device *)(dev->priv);
-	if (ei_local != NULL) {
-		if (ei_local->reg_offset)
-			kfree(ei_local->reg_offset);
-		kfree(dev->priv);
-		dev->priv = NULL;
-	}
-}
-
-static const struct ne2k_cbus_hwinfo * __init ne2k_cbus_get_hwinfo(int hwtype)
-{
-	const struct ne2k_cbus_hwinfo *hw;
-
-	for (hw = &ne2k_cbus_hwinfo_list[0]; hw->hwtype; hw++) {
-		if (hw->hwtype == hwtype) break;
-	}
-	return hw;
-}
-
-static void __init ne2k_cbus_set_hwtype(struct net_device *dev, const struct ne2k_cbus_hwinfo *hw, int ioaddr)
-{
-	struct ei_device *ei_local = (struct ei_device *)(dev->priv);
-	int i;
-	int hwtype_old = dev->mem_start & NE2K_CBUS_HARDWARE_TYPE_MASK;
-
-	if (!ei_local)
-		panic("Gieee! ei_local == NULL!! (from %p)",
-		       __builtin_return_address(0));
-
-	dev->mem_start &= ~NE2K_CBUS_HARDWARE_TYPE_MASK;
-	dev->mem_start |= hw->hwtype & NE2K_CBUS_HARDWARE_TYPE_MASK;
-
-	if (ei_debug > 2) {
-		printk(KERN_DEBUG "hwtype changed: %d -> %d\n",hwtype_old,(int)(dev->mem_start & NE2K_CBUS_HARDWARE_TYPE_MASK));
-	}
-
-	if (hw->offsetinfo) {
-		for (i = 0; i < 8; i++) {
-			ei_local->reg_offset[i] = hw->offsetinfo->skip * i;
-		}
-		for (i = 8; i < 16; i++) {
-			ei_local->reg_offset[i] =
-				hw->offsetinfo->skip*(i-8) + hw->offsetinfo->offset8;
-		}
-#ifdef CONFIG_NE2K_CBUS_NEC108
-		if (hw->hwtype == NE2K_CBUS_HARDWARE_TYPE_NEC108) {
-			int adj = (ioaddr & 0xf000) /2;
-			ei_local->reg_offset[16] = 
-				(hw->offsetinfo->offset10 | adj) - ioaddr;
-			ei_local->reg_offset[17] = 
-				(hw->offsetinfo->offset1f | adj) - ioaddr;
-		} else {
-#endif /* CONFIG_NE2K_CBUS_NEC108 */
-			ei_local->reg_offset[16] = hw->offsetinfo->offset10;
-			ei_local->reg_offset[17] = hw->offsetinfo->offset1f;
-#ifdef CONFIG_NE2K_CBUS_NEC108
-		}
-#endif
-	} else {
-		/* make dummmy offset list */
-		for (i = 0; i < 16; i++) {
-			ei_local->reg_offset[i] = i;
-		}
-		ei_local->reg_offset[16] = 0x10;
-		ei_local->reg_offset[17] = 0x1f;
-	}
-}
-
-#if defined(CONFIG_NE2K_CBUS_ICM) || defined(CONFIG_NE2K_CBUS_CNET98EL)
-static void __init ne2k_cbus_readmem(struct net_device *dev, int ioaddr, unsigned short memaddr, char *buf, unsigned short len)
-{
-	struct ei_device *ei_local = (struct ei_device *)(dev->priv);
-	outb_p(E8390_NODMA | E8390_START, ioaddr+E8390_CMD);
-	outb_p(len & 0xff, ioaddr+EN0_RCNTLO);
-	outb_p(len >> 8, ioaddr+EN0_RCNTHI);
-	outb_p(memaddr & 0xff, ioaddr+EN0_RSARLO);
-	outb_p(memaddr >> 8, ioaddr+EN0_RSARHI);
-	outb_p(E8390_RREAD | E8390_START, ioaddr+E8390_CMD);
-	insw(ioaddr+NE_DATAPORT, buf, len >> 1);
-}
-static void __init ne2k_cbus_writemem(struct net_device *dev, int ioaddr, unsigned short memaddr, const char *buf, unsigned short len)
-{
-	struct ei_device *ei_local = (struct ei_device *)(dev->priv);
-	outb_p(E8390_NODMA | E8390_START, ioaddr+E8390_CMD);
-	outb_p(ENISR_RDC, ioaddr+EN0_ISR);
-	outb_p(len & 0xff, ioaddr+EN0_RCNTLO);
-	outb_p(len >> 8, ioaddr+EN0_RCNTHI);
-	outb_p(memaddr & 0xff, ioaddr+EN0_RSARLO);
-	outb_p(memaddr >> 8, ioaddr+EN0_RSARHI);
-	outb_p(E8390_RWRITE | E8390_START, ioaddr+E8390_CMD);
-	outsw(ioaddr+NE_DATAPORT, buf, len >> 1);
-}
-#endif
-
-static int ne_probe_cbus(struct net_device *dev, const struct ne2k_cbus_hwinfo *hw, int ioaddr, int irq);
-/* End of ne2k_cbus.h */
--- diff/drivers/scsi/pc980155.c	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/pc980155.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,299 +0,0 @@
-/*
- *
- *  drivers/scsi/pc980155.c
- *
- *  PC-9801-55 SCSI host adapter driver
- *
- *  Copyright (C) 1997-2003  Kyoto University Microcomputer Club
- *			     (Linux/98 project)
- *			     Tomoharu Ugawa <ohirune@kmc.gr.jp>
- *
- */
-
-#include <linux/module.h>
-#include <linux/blkdev.h>
-#include <linux/ioport.h>
-#include <linux/interrupt.h>
-#include <linux/types.h>
-#include <linux/delay.h>
-
-#include <asm/dma.h>
-
-#include "scsi.h"
-#include "hosts.h"
-#include "wd33c93.h"
-#include "pc980155.h"
-
-extern int pc98_bios_param(struct scsi_device *, struct block_device *,
-				sector_t, int *);
-static int scsi_pc980155_detect(Scsi_Host_Template *);
-static int scsi_pc980155_release(struct Scsi_Host *);
-
-#ifndef CMD_PER_LUN
-#define CMD_PER_LUN 2
-#endif
-
-#ifndef CAN_QUEUE
-#define CAN_QUEUE 16
-#endif
-
-#undef PC_9801_55_DEBUG
-#undef PC_9801_55_DEBUG_VERBOSE
-
-#define NR_BASE_IOS 4
-static int nr_base_ios = NR_BASE_IOS;
-static unsigned int base_ios[NR_BASE_IOS] = {0xcc0, 0xcd0, 0xce0, 0xcf0};
-static wd33c93_regs init_regs;
-static int io;
-
-static struct Scsi_Host *pc980155_host = NULL;
-
-static void pc980155_intr_handle(int irq, void *dev_id, struct pt_regs *regp);
-
-static inline void pc980155_dma_enable(unsigned int base_io)
-{
-	outb(0x01, REG_CWRITE);
-}
-
-static inline void pc980155_dma_disable(unsigned int base_io)
-{
-	outb(0x02, REG_CWRITE);
-}
-
-
-static void pc980155_intr_handle(int irq, void *dev_id, struct pt_regs *regp)
-{
-	wd33c93_intr(pc980155_host);
-}
-
-static int dma_setup(Scsi_Cmnd *sc, int dir_in)
-{
-  /*
-   * sc->SCp.this_residual : transfer count
-   * sc->SCp.ptr : distination address (virtual address)
-   * dir_in : data direction (DATA_OUT_DIR:0 or DATA_IN_DIR:1)
-   *
-   * if success return 0
-   */
-
-   /*
-    * DMA WRITE MODE
-    * bit 7,6 01b single mode (this mode only)
-    * bit 5   inc/dec (default:0 = inc)
-    * bit 4   auto initialize (normaly:0 = off)
-    * bit 3,2 01b memory -> io
-    *         10b io -> memory
-    *         00b verify
-    * bit 1,0 channel
-    */
-	disable_dma(sc->device->host->dma_channel);
-	set_dma_mode(sc->device->host->dma_channel,
-			0x40 | (dir_in ? 0x04 : 0x08));
-	clear_dma_ff(sc->device->host->dma_channel);
-	set_dma_addr(sc->device->host->dma_channel, virt_to_phys(sc->SCp.ptr));
-	set_dma_count(sc->device->host->dma_channel, sc->SCp.this_residual);
-#ifdef PC_9801_55_DEBUG
-	printk("D%d(%x)D", sc->device->host->dma_channel,
-		sc->SCp.this_residual);
-#endif
-	enable_dma(sc->device->host->dma_channel);
-	pc980155_dma_enable(sc->device->host->io_port);
-	return 0;
-}
-
-static void dma_stop(struct Scsi_Host *instance, Scsi_Cmnd *sc, int status)
-{
-  /*
-   * instance: Hostadapter's instance
-   * sc: scsi command
-   * status: True if success
-   */
-	pc980155_dma_disable(sc->device->host->io_port);
-	disable_dma(sc->device->host->dma_channel);
-}  
-
-/* return non-zero on detection */
-static inline int pc980155_test_port(wd33c93_regs regs)
-{
-	/* Quick and dirty test for presence of the card. */
-	if (inb(regs.SASR) == 0xff)
-		return 0;
-
-	return 1;
-}
-
-static inline int pc980155_getconfig(unsigned int base_io, wd33c93_regs regs,
-					unsigned char* irq, unsigned char* dma,
-					unsigned char* scsi_id)
-{
-	static unsigned char irqs[] = {3, 5, 6, 9, 12, 13};
-	unsigned char result;
-  
-	printk(KERN_DEBUG "PC-9801-55: base_io=%x SASR=%x SCMD=%x\n",
-		base_io, regs.SASR, regs.SCMD);
-	result = read_pc980155_resetint(regs);
-	printk(KERN_DEBUG "PC-9801-55: getting config (%x)\n", result);
-	*scsi_id = result & 0x07;
-	*irq = (result >> 3) & 0x07;
-	if (*irq > 5) {
-		printk(KERN_ERR "PC-9801-55 (base %#x): impossible IRQ (%d)"
-			" - other device here?\n", base_io, *irq);
-		return 0;
-	}
-
-	*irq = irqs[*irq];
-	result = inb(REG_STATRD);
-	*dma = result & 0x03;
-	if (*dma == 1) {
-		printk(KERN_ERR
-			"PC-9801-55 (base %#x): impossible DMA channl (%d)"
-			" - other device here?\n", base_io, *dma);
-		return 0;
-	}
-#ifdef PC_9801_55_DEBUG
-	printk("PC-9801-55: end of getconfig\n");
-#endif
-	return 1;
-}
-
-/* return non-zero on detection */
-static int scsi_pc980155_detect(Scsi_Host_Template* tpnt)
-{
-	unsigned int base_io;
-	unsigned char irq, dma, scsi_id;
-	int i;
-#ifdef PC_9801_55_DEBUG
-	unsigned char debug;
-#endif
-  
-	if (io) {
-		base_ios[0] = io;
-		nr_base_ios = 1;
-	}
-
-	for (i = 0; i < nr_base_ios; i++) {
-		base_io = base_ios[i];
-		init_regs.SASR = REG_ADDRST;
-		init_regs.SCMD = REG_CONTRL;
-#ifdef PC_9801_55_DEBUG
-		printk("PC-9801-55: SASR(%x = %x)\n", SASR, REG_ADDRST);
-#endif
-		if (!request_region(base_io, 6, "PC-9801-55"))
-			continue;
-
-		if (pc980155_test_port(init_regs) &&
-		    pc980155_getconfig(base_io, init_regs,
-					&irq, &dma, &scsi_id))
-			goto found;
-
-		release_region(base_io, 6);
-	}
-
-	printk("PC-9801-55: not found\n");
-	return 0;
-
-	found:
-#ifdef PC_9801_55_DEBUG
-	printk("PC-9801-55: config: base io = %x, irq = %d, dma channel = %d, scsi id = %d\n", base_io, irq, dma, scsi_id);
-#endif
-	if (request_irq(irq, pc980155_intr_handle, 0, "PC-9801-55", NULL)) {
-		printk(KERN_ERR "PC-9801-55: unable to allocate IRQ %d\n", irq);
-		goto err1;
-	}
-
-	if (request_dma(dma, "PC-9801-55")) {
-		printk(KERN_ERR "PC-9801-55: unable to allocate DMA channel %d\n", dma);
-		goto err2;
-	}
-
-	pc980155_host = scsi_register(tpnt, sizeof(struct WD33C93_hostdata));
-	if (pc980155_host) {
-		pc980155_host->this_id = scsi_id;
-		pc980155_host->io_port = base_io;
-		pc980155_host->n_io_port = 6;
-		pc980155_host->irq = irq;
-		pc980155_host->dma_channel = dma;
-		printk("PC-9801-55: scsi host found at %x irq = %d, use dma channel %d.\n", base_io, irq, dma);
-		pc980155_int_enable(init_regs);
-		wd33c93_init(pc980155_host, init_regs, dma_setup, dma_stop,
-				WD33C93_FS_12_15);
-		return 1;
-	}
-
-	printk(KERN_ERR "PC-9801-55: failed to register device\n");
-
-err2:
-	free_irq(irq, NULL);
-err1:
-	release_region(base_io, 6);
-	return 0;
-}
-
-static int scsi_pc980155_release(struct Scsi_Host *shost)
-{
-	struct WD33C93_hostdata *hostdata
-		= (struct WD33C93_hostdata *)shost->hostdata;
-
-	pc980155_int_disable(hostdata->regs);
-	release_region(shost->io_port, shost->n_io_port);
-	free_irq(shost->irq, NULL);
-	free_dma(shost->dma_channel);
-	wd33c93_release();
-	return 1;
-}
-
-static int pc980155_bus_reset(Scsi_Cmnd *cmd)
-{
-	struct WD33C93_hostdata *hostdata
-		= (struct WD33C93_hostdata *)cmd->device->host->hostdata;
-
-	pc980155_int_disable(hostdata->regs);
-	pc980155_assert_bus_reset(hostdata->regs);
-	udelay(50);
-	pc980155_negate_bus_reset(hostdata->regs);
-	(void) inb(hostdata->regs.SASR);
-	(void) read_pc980155(hostdata->regs, WD_SCSI_STATUS);
-	pc980155_int_enable(hostdata->regs);
-	wd33c93_host_reset(cmd);
-	return SUCCESS;
-}
-
-
-#ifndef MODULE
-static int __init pc980155_setup(char *str)
-{
-        int ints[4];
-
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0)
-		io = ints[1];
-        return 1;
-}
-__setup("pc980155_io=", pc980155_setup);
-#endif
-
-MODULE_PARM(io, "i");
-MODULE_AUTHOR("Tomoharu Ugawa <ohirune@kmc.gr.jp>");
-MODULE_DESCRIPTION("PC-9801-55 SCSI host adapter driver");
-MODULE_LICENSE("GPL");
-
-static Scsi_Host_Template driver_template = {
-	.proc_info		= wd33c93_proc_info,
-	.name			= "SCSI PC-9801-55",
-	.detect			= scsi_pc980155_detect,
-	.release		= scsi_pc980155_release,
-	.queuecommand		= wd33c93_queuecommand,
-	.eh_abort_handler	= wd33c93_abort,
-	.eh_bus_reset_handler	= pc980155_bus_reset,
-	.eh_host_reset_handler	= wd33c93_host_reset,
-	.bios_param		= pc98_bios_param,
-	.can_queue		= CAN_QUEUE,
-	.this_id		= 7,
-	.sg_tablesize		= SG_ALL,
-	.cmd_per_lun		= CMD_PER_LUN, /* dont use link command */
-	.unchecked_isa_dma	= 1, /* use dma **XXXX***/
-	.use_clustering		= ENABLE_CLUSTERING,
-	.proc_name		= "PC_9801_55",
-};
-
-#include "scsi_module.c"
--- diff/drivers/scsi/pc980155.h	2004-05-19 22:12:10.000000000 +0100
+++ source/drivers/scsi/pc980155.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,52 +0,0 @@
-/*
- *
- *  drivers/scsi/pc980155.h
- *
- *  PC-9801-55 SCSI host adapter driver
- *
- *  Copyright (C) 1997-2003  Kyoto University Microcomputer Club
- *			     (Linux/98 project)
- *			     Tomoharu Ugawa <ohirune@kmc.gr.jp>
- *
- */
-
-#ifndef __PC980155_H
-#define __PC980155_H
-
-#include "wd33c93.h"
-
-#define REG_ADDRST (base_io)
-#define REG_CONTRL (base_io + 2)
-#define REG_CWRITE (base_io + 4)
-#define REG_STATRD (base_io + 4)
-
-#define WD_MEMORYBANK	0x30
-#define WD_RESETINT	0x33
-
-static inline uchar read_pc980155(const wd33c93_regs regs, uchar reg_num)
-{
-	outb(reg_num, regs.SASR);
-	return (uchar)inb(regs.SCMD);
-}
-
-static inline void write_memorybank(const wd33c93_regs regs, uchar value)
-{
-      outb(WD_MEMORYBANK, regs.SASR);
-      outb(value, regs.SCMD);
-}
-
-#define read_pc980155_resetint(regs) \
-	read_pc980155((regs), WD_RESETINT)
-#define pc980155_int_enable(regs) \
-	write_memorybank((regs), read_pc980155((regs), WD_MEMORYBANK) | 0x04)
-
-#define pc980155_int_disable(regs) \
-	write_memorybank((regs), read_pc980155((regs), WD_MEMORYBANK) & ~0x04)
-
-#define pc980155_assert_bus_reset(regs) \
-	write_memorybank((regs), read_pc980155((regs), WD_MEMORYBANK) | 0x02)
-
-#define pc980155_negate_bus_reset(regs) \
-	write_memorybank((regs), read_pc980155((regs), WD_MEMORYBANK) & ~0x02)
-
-#endif /* __PC980155_H */
--- diff/drivers/scsi/qla2xxx/qla_os.h	2004-05-19 22:12:14.000000000 +0100
+++ source/drivers/scsi/qla2xxx/qla_os.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,94 +0,0 @@
-/******************************************************************************
- *                  QLOGIC LINUX SOFTWARE
- *
- * QLogic ISP2x00 device driver for Linux 2.6.x
- * Copyright (C) 2003-2004 QLogic Corporation
- * (www.qlogic.com)
- *
- * Portions (C) Arjan van de Ven <arjanv@redhat.com> for Red Hat, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, 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.
- *
- ******************************************************************************/
-
-#ifndef __QLA_OS_H
-#define __QLA_OS_H
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/version.h>
-#include <linux/init.h>
-#include <linux/string.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/ioport.h>
-#include <linux/delay.h>
-#include <linux/timer.h>
-#include <linux/sched.h>
-#include <linux/pci.h>
-#include <linux/proc_fs.h>
-#include <linux/blkdev.h>
-#include <linux/interrupt.h>
-#include <linux/stat.h>
-#include <linux/slab.h>
-#include <linux/mempool.h>
-#include <linux/vmalloc.h>
-#include <linux/smp_lock.h>
-#include <linux/bio.h>
-#include <linux/moduleparam.h>
-#include <linux/capability.h>
-#include <linux/list.h>
-
-#include <asm/system.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/segment.h>
-#include <asm/byteorder.h>
-#include <asm/pgtable.h>
-
-#include <linux/ioctl.h>
-#include <asm/uaccess.h>
-
-#include "scsi.h"
-#include "hosts.h"
-
-#include <scsi/scsicam.h>
-#include <scsi/scsi_ioctl.h>
-#include <scsi/scsi_transport.h>
-#include <scsi/scsi_transport_fc.h>
-
-//TODO Fix this!!!
-/*
-* String arrays
-*/
-#define LINESIZE    256
-#define MAXARGS      26
-
-/***********************************************************************
-* We use the struct scsi_pointer structure that's included with each 
-* command SCSI_Cmnd as a scratchpad. 
-*
-* SCp is defined as follows:
-*  - SCp.ptr  -- > pointer to the SRB
-*  - SCp.this_residual  -- > HBA completion status for ioctl code. 
-*
-* Cmnd->host_scribble --> Used to hold the hba actived handle (1..255).
-***********************************************************************/
-#define	CMD_SP(Cmnd)		((Cmnd)->SCp.ptr)
-#define CMD_COMPL_STATUS(Cmnd)  ((Cmnd)->SCp.this_residual)
-/* Additional fields used by ioctl passthru */
-#define CMD_RESID_LEN(Cmnd)	((Cmnd)->SCp.buffers_residual)
-#define CMD_SCSI_STATUS(Cmnd)	((Cmnd)->SCp.Status)
-#define CMD_ACTUAL_SNSLEN(Cmnd)	((Cmnd)->SCp.Message)
-#define CMD_ENTRY_STATUS(Cmnd)	((Cmnd)->SCp.have_data_in)
-
-#endif
--- diff/drivers/scsi/scsi_pc98.c	2004-05-19 22:12:11.000000000 +0100
+++ source/drivers/scsi/scsi_pc98.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,69 +0,0 @@
-/*
- *  Copyright (C) 2003  Osamu Tomita <tomita@cinet.co.jp>
- *
- *  PC9801 BIOS geometry handling.
- */
-
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/genhd.h>
-#include <linux/blkdev.h>
-#include <asm/pc9800.h>
-
-#include "scsi.h"
-#include "hosts.h"
-
-
-static int pc98_first_bios_param(struct scsi_device *sdev, int *ip)
-{
-	const u8 *p = (&__PC9800SCA(u8, PC9800SCA_SCSI_PARAMS) + sdev->id * 4);
-
-	ip[0] = p[1];   /* # of heads */
-	ip[1] = p[0];   /* # of sectors/track */
-	ip[2] = *(u16 *)&p[2] & 0x0fff; /* # of cylinders */
-	if (p[3] & (1 << 6)) { /* #-of-cylinders is 16-bit */
-		ip[2] |= (ip[0] & 0xf0) << 8;
-		ip[0] &= 0x0f;
-	}
-
-	return 0;
-}
-
-int pc98_bios_param(struct scsi_device *sdev, struct block_device *bdev,
-			sector_t capacity, int *ip)
-{
-	struct Scsi_Host *first_real = first_real_host();
-
-	/*
-	 * XXX
-	 * XXX This needs to become a sysfs attribute that's set
-	 * XXX by code that knows which host is the first one.
-	 * XXX
-	 * XXX Currently we support only one host on with a
-	 * XXX PC98ish HBA.
-	 * XXX
-	 */
-	if (1 || sdev->host == first_real && sdev->id < 7 &&
-	    __PC9800SCA_TEST_BIT(PC9800SCA_DISK_EQUIPS, sdev->id))
-	    	return pc98_first_bios_param(sdev, ip);
-
-	/* Assume PC-9801-92 compatible parameters for HAs without BIOS.  */
-	ip[0] = 8;
-	ip[1] = 32;
-	ip[2] = capacity / (8 * 32);
-	if (ip[2] > 65535) {    /* if capacity >= 8GB */
-		/* Recent on-board adapters seem to use this parameter. */
-		ip[1] = 128;
-		ip[2] = capacity / (8 * 128);
-		if (ip[2] > 65535) { /* if capacity >= 32GB  */
-			/* Clip the number of cylinders.  Currently
-			   this is the limit that we deal with.  */
-			ip[2] = 65535;
-		}
-	}
-
-	return 0;
-}
-
-EXPORT_SYMBOL(pc98_bios_param);
--- diff/drivers/serial/8250_hcdp.c	2004-05-19 22:12:15.000000000 +0100
+++ source/drivers/serial/8250_hcdp.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,268 +0,0 @@
-/*
- * linux/drivers/char/hcdp_serial.c
- *
- * Copyright (C) 2002 Hewlett-Packard Co.
- *	Khalid Aziz <khalid_aziz@hp.com>
- *
- * Parse the EFI HCDP table to locate serial console and debug ports and
- * initialize them.
- *
- * 2002/08/29 davidm	Adjust it to new 2.5 serial driver infrastructure.
- */
-
-#include <linux/config.h>
-#include <linux/console.h>
-#include <linux/kernel.h>
-#include <linux/efi.h>
-#include <linux/init.h>
-#include <linux/tty.h>
-#include <linux/serial.h>
-#include <linux/serial_core.h>
-#include <linux/types.h>
-#include <linux/acpi.h>
-
-#include <asm/io.h>
-#include <asm/serial.h>
-#include <asm/acpi.h>
-
-#include "8250_hcdp.h"
-
-#undef SERIAL_DEBUG_HCDP
-
-/*
- * Parse the HCDP table to find descriptions for headless console and debug
- * serial ports and add them to rs_table[]. A pointer to HCDP table is
- * passed as parameter. This function should be called before
- * serial_console_init() is called to make sure the HCDP serial console will
- * be available for use. IA-64 kernel calls this function from setup_arch()
- * after the EFI and ACPI tables have been parsed.
- */
-void __init
-setup_serial_hcdp(void *tablep)
-{
-	hcdp_dev_t *hcdp_dev;
-	struct uart_port port;
-	unsigned long iobase;
-	hcdp_t hcdp;
-	int gsi, nr;
-	static char options[16];
-#if 0
-	static int shift_once = 1;
-#endif
-
-#ifdef SERIAL_DEBUG_HCDP
-	printk("Entering setup_serial_hcdp()\n");
-#endif
-
-	/* Verify we have a valid table pointer */
-	if (!tablep)
-		return;
-
-	memset(&port, 0, sizeof(port));
-
-	/*
-	 * Don't trust firmware to give us a table starting at an aligned
-	 * address. Make a local copy of the HCDP table with aligned
-	 * structures.
-	 */
-	memcpy(&hcdp, tablep, sizeof(hcdp));
-
-	/*
-	 * Perform a sanity check on the table. Table should have a signature
-	 * of "HCDP" and it should be atleast 82 bytes long to have any
-	 * useful information.
-	 */
-	if ((strncmp(hcdp.signature, HCDP_SIGNATURE, HCDP_SIG_LEN) != 0))
-		return;
-	if (hcdp.len < 82)
-		return;
-
-#ifdef SERIAL_DEBUG_HCDP
-	printk("setup_serial_hcdp(): table pointer = 0x%p, sig = '%.4s'\n",
-	       tablep, hcdp.signature);
-	printk(" length = %d, rev = %d, ", hcdp.len, hcdp.rev);
-	printk("OEM ID = %.6s, # of entries = %d\n", hcdp.oemid,
-			hcdp.num_entries);
-#endif
-
-	/*
-	 * Parse each device entry
-	 */
-	for (nr = 0; nr < hcdp.num_entries; nr++) {
-		hcdp_dev = hcdp.hcdp_dev + nr;
-		/*
-		 * We will parse only the primary console device which is
-		 * the first entry for these devices. We will ignore rest
-		 * of the entries for the same type device that has already
-		 * been parsed and initialized
-		 */
-		if (hcdp_dev->type != HCDP_DEV_CONSOLE)
-			continue;
-
-		iobase = ((u64) hcdp_dev->base_addr.addrhi << 32) |
-					hcdp_dev->base_addr.addrlo;
-		gsi = hcdp_dev->global_int;
-
-		/* See PCI spec v2.2, Appendix D (Class Codes): */
-		switch (hcdp_dev->pci_prog_intfc) {
-		case 0x00:
-			port.type = PORT_8250;
-			break;
-		case 0x01:
-			port.type = PORT_16450;
-			break;
-		case 0x02:
-			port.type = PORT_16550;
-			break;
-		case 0x03:
-			port.type = PORT_16650;
-			break;
-		case 0x04:
-			port.type = PORT_16750;
-			break;
-		case 0x05:
-			port.type = PORT_16850;
-			break;
-		case 0x06:
-			port.type = PORT_16C950;
-			break;
-		default:
-			printk(KERN_WARNING "warning: EFI HCDP table reports "
-				"unknown serial programming interface 0x%02x; "
-				"will autoprobe.\n", hcdp_dev->pci_prog_intfc);
-			port.type = PORT_UNKNOWN;
-			break;
-		}
-
-#ifdef SERIAL_DEBUG_HCDP
-		printk("  type = %s, uart = %d\n",
-			((hcdp_dev->type == HCDP_DEV_CONSOLE) ?
-			"Headless Console" :
-			((hcdp_dev->type == HCDP_DEV_DEBUG) ?
-			"Debug port" : "Huh????")), port.type);
-		printk("  base address space = %s, base address = 0x%lx\n",
-		       ((hcdp_dev->base_addr.space_id == ACPI_MEM_SPACE) ?
-		       "Memory Space" :
-			((hcdp_dev->base_addr.space_id == ACPI_IO_SPACE) ?
-			"I/O space" : "PCI space")),
-		       iobase);
-		printk("  gsi = %d, baud rate = %lu, bits = %d, clock = %d\n",
-		       gsi, (unsigned long) hcdp_dev->baud, hcdp_dev->bits,
-		       hcdp_dev->clock_rate);
-		if (HCDP_PCI_UART(hcdp_dev))
-			printk(" PCI id: %02x:%02x:%02x, vendor ID=0x%x, "
-				"dev ID=0x%x\n", hcdp_dev->pci_seg,
-				hcdp_dev->pci_bus, hcdp_dev->pci_dev,
-				hcdp_dev->pci_vendor_id, hcdp_dev->pci_dev_id);
-#endif
-		/*
-		 * Now fill in a port structure to update the 8250 port table..
-		 */
-		if (hcdp_dev->clock_rate)
-			port.uartclk = hcdp_dev->clock_rate;
-		else
-			port.uartclk = BASE_BAUD * 16;
-
-		/*
-		 * Check if this is an I/O mapped address or a memory mapped
-		 * address
-		 */
-		if (hcdp_dev->base_addr.space_id == ACPI_MEM_SPACE) {
-			port.iobase = 0;
-			port.mapbase = iobase;
-			port.membase = ioremap(iobase, 64);
-			port.iotype = SERIAL_IO_MEM;
-		} else if (hcdp_dev->base_addr.space_id == ACPI_IO_SPACE) {
-			port.iobase = iobase;
-			port.mapbase = 0;
-			port.membase = NULL;
-			port.iotype = SERIAL_IO_PORT;
-		} else if (hcdp_dev->base_addr.space_id == ACPI_PCICONF_SPACE) {
-			printk(KERN_WARNING"warning: No support for PCI serial console\n");
-			return;
-		}
-
-		if (HCDP_IRQ_SUPPORTED(hcdp_dev)) {
-#ifdef CONFIG_IA64
-			if (HCDP_PCI_UART(hcdp_dev))
-				port.irq = acpi_register_irq(gsi,
-					ACPI_ACTIVE_LOW, ACPI_LEVEL_SENSITIVE);
-			else
-				port.irq = acpi_register_irq(gsi,
-					ACPI_ACTIVE_HIGH, ACPI_EDGE_SENSITIVE);
-#else
-			port.irq = gsi;
-#endif
-			port.flags |= UPF_AUTO_IRQ;
-
-			if (HCDP_PCI_UART(hcdp_dev))
-				port.flags |= UPF_SHARE_IRQ;
-		}
-
-		port.flags |= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_RESOURCES;
-
-		/*
-		 * Note: the above memset() initializes port.line to 0,
-		 * so we register this port as ttyS0.
-		 */
-		if (early_serial_setup(&port) < 0) {
-			printk("setup_serial_hcdp(): early_serial_setup() "
-				"for HCDP serial console port failed. "
-				"Will try any additional consoles in HCDP.\n");
-			memset(&port, 0, sizeof(port));
-			continue;
-		}
-
-		if (efi_uart_console_only()) {
-			snprintf(options, sizeof(options), "%lun%d",
-				hcdp_dev->baud, hcdp_dev->bits);
-			add_preferred_console("ttyS", port.line, options);
-		}
-		break;
-	}
-
-#ifdef SERIAL_DEBUG_HCDP
-	printk("Leaving setup_serial_hcdp()\n");
-#endif
-}
-
-#ifdef CONFIG_IA64_EARLY_PRINTK_UART
-unsigned long
-hcdp_early_uart (void)
-{
-	efi_system_table_t *systab;
-	efi_config_table_t *config_tables;
-	unsigned long addr = 0;
-	hcdp_t *hcdp = 0;
-	hcdp_dev_t *dev;
-	int i;
-
-	systab = (efi_system_table_t *) ia64_boot_param->efi_systab;
-	if (!systab)
-		return 0;
-	systab = __va(systab);
-
-	config_tables = (efi_config_table_t *) systab->tables;
-	if (!config_tables)
-		return 0;
-	config_tables = __va(config_tables);
-
-	for (i = 0; i < systab->nr_tables; i++) {
-		if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) {
-			hcdp = (hcdp_t *) config_tables[i].table;
-			break;
-		}
-	}
-	if (!hcdp)
-		return 0;
-	hcdp = __va(hcdp);
-
-	for (i = 0, dev = hcdp->hcdp_dev; i < hcdp->num_entries; i++, dev++) {
-		if (dev->type == HCDP_DEV_CONSOLE) {
-			addr = (u64) dev->base_addr.addrhi << 32 | dev->base_addr.addrlo;
-			break;
-		}
-	}
-	return addr;
-}
-#endif /* CONFIG_IA64_EARLY_PRINTK_UART */
--- diff/drivers/serial/8250_hcdp.h	2004-05-19 22:12:15.000000000 +0100
+++ source/drivers/serial/8250_hcdp.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,82 +0,0 @@
-/*
- * drivers/serial/8250_hcdp.h
- *
- * Copyright (C) 2002 Hewlett-Packard Co.
- *	Khalid Aziz <khalid_aziz@hp.com>
- *
- * Definitions for HCDP defined serial ports (Serial console and debug
- * ports)
- */
-
-/* ACPI table signatures */
-#define HCDP_SIG_LEN		4
-#define HCDP_SIGNATURE		"HCDP"
-
-/* Space ID as defined in ACPI generic address structure */
-#define ACPI_MEM_SPACE		0
-#define ACPI_IO_SPACE		1
-#define ACPI_PCICONF_SPACE	2
-
-/*
- * Maximum number of HCDP devices we want to read in
- */
-#define MAX_HCDP_DEVICES	6
-
-/*
- * Default UART clock rate if clock rate is 0 in HCDP table.
- */
-#define DEFAULT_UARTCLK		115200
-
-/*
- * ACPI Generic Address Structure
- */
-typedef struct {
-	u8  space_id;
-	u8  bit_width;
-	u8  bit_offset;
-	u8  resv;
-	u32 addrlo;
-	u32 addrhi;
-} acpi_gen_addr;
-
-/* HCDP Device descriptor entry types */
-#define HCDP_DEV_CONSOLE	0
-#define HCDP_DEV_DEBUG		1
-
-/* HCDP Device descriptor type */
-typedef struct {
-	u8	type;
-	u8	bits;
-	u8	parity;
-	u8	stop_bits;
-	u8	pci_seg;
-	u8	pci_bus;
-	u8	pci_dev;
-	u8	pci_func;
-	u64	baud;
-	acpi_gen_addr	base_addr;
-	u16	pci_dev_id;
-	u16	pci_vendor_id;
-	u32	global_int;
-	u32	clock_rate;
-	u8	pci_prog_intfc;
-	u8	resv;
-} hcdp_dev_t;
-
-/* HCDP Table format */
-typedef struct {
-	u8	signature[4];
-	u32	len;
-	u8	rev;
-	u8	chksum;
-	u8	oemid[6];
-	u8	oem_tabid[8];
-	u32	oem_rev;
-	u8	creator_id[4];
-	u32	creator_rev;
-	u32	num_entries;
-	hcdp_dev_t	hcdp_dev[MAX_HCDP_DEVICES];
-} hcdp_t;
-
-#define HCDP_PCI_UART(x) (x->pci_func & 1UL<<7)
-#define HCDP_IRQ_SUPPORTED(x) (x->pci_func & 1UL<<6)
--- diff/drivers/serial/serial98.c	2004-05-19 22:12:15.000000000 +0100
+++ source/drivers/serial/serial98.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,1120 +0,0 @@
-/*
- *  linux/drivers/serial/serial98.c
- *
- *  Driver for NEC PC-9801/PC-9821 standard serial ports
- *
- *  Based on drivers/serial/8250.c, by Russell King.
- *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
- *
- *  Copyright (C) 2002 Osamu Tomita <tomita@cinet.co.jp>
- *
- * 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.
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/tty.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/serial.h>
-#include <linux/console.h>
-#include <linux/sysrq.h>
-#include <linux/serial_reg.h>
-#include <linux/delay.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/pc9800.h>
-#include <asm/pc9800_sca.h>
-
-#if defined(CONFIG_SERIAL98_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-#define SUPPORT_SYSRQ
-#endif
-
-#include <linux/serial_core.h>
-
-#define SERIAL98_NR		1
-#define SERIAL98_ISR_PASS_LIMIT	256
-#define SERIAL98_EXT		0x434
-
-//#define RX_8251F		0x130	/* In: Receive buffer */
-//#define TX_8251F		0x130	/* Out: Transmit buffer */
-//#define LSR_8251F		0x132	/* In: Line Status Register */
-//#define MSR_8251F		0x134	/* In: Modem Status Register */
-#define IIR_8251F		0x136	/* In: Interrupt ID Register */
-#define FCR_8251F		0x138	/* I/O: FIFO Control Register */
-#define VFAST_8251F		0x13a	/* I/O: VFAST mode Register */
-
-#define CMD_8251F		0x32	/* Out: 8251 Command Resister */
-#define IER2_8251F		0x34	/* I/O: Interrupt Enable Register */
-#define IER1_8251F		0x35	/* I/O: Interrupt Enable Register */
-#define IER1_CTL		0x37	/* Out: Interrupt Enable Register */
-#define DIS_RXR_INT		0x00	/* disable RxRDY Interrupt */
-#define ENA_RXR_INT		0x01	/* enable RxRDY Interrupt */
-#define DIS_TXE_INT		0x02	/* disable TxEMPTY Interrupt */
-#define ENA_TXE_INT		0x03	/* enable TxEMPTY Interrupt */
-#define DIS_TXR_INT		0x04	/* disable TxRDY Interrupt */
-#define ENA_TXR_INT		0x05	/* enable TxRDY Interrupt */
-
-#define CMD_RESET		0x40	/* Reset Command */
-#define CMD_RTS			0x20	/* Set RTS line */
-#define CMD_CLR_ERR		0x10	/* Clear error flag */
-#define CMD_BREAK		0x08	/* Send Break */
-#define CMD_RXE			0x04	/* Enable receive */
-#define CMD_DTR			0x02	/* Set DTR line */
-#define CMD_TXE			0x01	/* Enable send */
-#define CMD_DUMMY		0x00	/* Dummy Command */
-
-#define VFAST_ENABLE		0x80	/* V.Fast mode Enable */
-
-/* Interrupt masks */
-#define INTR_8251_TXRE		0x04
-#define INTR_8251_TXEE		0x02
-#define INTR_8251_RXRE		0x01
-/* I/O Port */
-//#define PORT_8251_DATA	0
-//#define PORT_8251_CMD		2
-//#define PORT_8251_MOD		2
-//#define PORT_8251_STS		2
-/* status read */
-#define STAT_8251_TXRDY		0x01
-#define STAT_8251_RXRDY		0x02
-#define STAT_8251_TXEMP		0x04
-#define STAT_8251_PER		0x08
-#define STAT_8251_OER		0x10
-#define STAT_8251_FER		0x20
-#define STAT_8251_BRK		0x40
-#define STAT_8251_DSR		0x80
-#if 1
-#define STAT_8251F_TXEMP	0x01
-#define STAT_8251F_TXRDY	0x02
-#define STAT_8251F_RXRDY	0x04
-#define STAT_8251F_DSR		0x08
-#define STAT_8251F_OER		0x10
-#define STAT_8251F_PER		0x20
-#define STAT_8251F_FER		0x40
-#define STAT_8251F_BRK		0x80
-#else
-#define STAT_8251F_TXEMP	0x01
-#define STAT_8251F_TEMT		0x01
-#define STAT_8251F_TXRDY	0x02
-#define STAT_8251F_THRE		0x02
-#define STAT_8251F_RXRDY	0x04
-#define STAT_8251F_DSR		0x04
-#define STAT_8251F_PER		0x08
-#define STAT_8251F_OER		0x10
-#define STAT_8251F_FER		0x20
-#define STAT_8251F_BRK		0x40
-#endif
-
-/*
- * We wrap our port structure around the generic uart_port.
- */
-struct serial98_port {
-	struct uart_port	port;
-	unsigned int		type;
-	unsigned int		ext;
-	unsigned int		lsr_break_flag;
-	unsigned char		cmd;
-	unsigned char		mode;
-	unsigned char		msr;
-	unsigned char		ier;
-	unsigned char		rxchk;
-	unsigned char		txemp;
-	unsigned char		txrdy;
-	unsigned char		rxrdy;
-	unsigned char		brk;
-	unsigned char		fe;
-	unsigned char		oe;
-	unsigned char		pe;
-	unsigned char		dr;
-};
-
-#ifdef CONFIG_SERIAL98_CONSOLE
-static void
-serial98_console_write(struct console *co, const char *s, unsigned int count);
-static int __init serial98_console_setup(struct console *co, char *options);
-
-extern struct uart_driver serial98_reg;
-static struct console serial98_console = {
-	.name		= "ttyS",
-	.write		= serial98_console_write,
-	.device		= uart_console_device,
-	.setup		= serial98_console_setup,
-	.flags		= CON_PRINTBUFFER,
-	.index		= -1,
-	.data		= &serial98_reg,
-};
-
-#define SERIAL98_CONSOLE	&serial98_console
-#else
-#define SERIAL98_CONSOLE	NULL
-#endif
-
-static struct uart_driver serial98_reg = {
-	.owner			= THIS_MODULE,
-	.driver_name		= "serial98",
-	.dev_name		= "ttyS",
-	.major			= TTY_MAJOR,
-	.minor			= 64,
-	.nr			= SERIAL98_NR,
-	.cons			= SERIAL98_CONSOLE,
-};
-
-static int serial98_clk;
-static char type_str[48];
-
-#define PORT98 ((struct serial98_port *)port)
-#define PORT (PORT98->port)
-
-static void serial98_fifo_enable(struct uart_port *port, int enable)
-{
-	unsigned char fcr;
-
-	if (PORT.type == PORT_FIFO_PC98 || PORT.type == PORT_VFAST_PC98) {
-		fcr = inb(FCR_8251F);
-		if (enable)
-			fcr |= UART_FCR_ENABLE_FIFO;
-		else
-			fcr &= ~UART_FCR_ENABLE_FIFO;
-		outb(fcr, FCR_8251F);
-	}
-
-	if (!enable)
-		return;
-
-	outb(0, 0x5f);	/* wait */
-	outb(0, 0x5f);
-	outb(0, 0x5f);
-	outb(0, 0x5f);
-}
-
-static void serial98_cmd_out(struct uart_port *port, unsigned char cmd)
-{
-	serial98_fifo_enable(port, 0);
-	outb(cmd, CMD_8251F);
-	serial98_fifo_enable(port, 1);
-}
-
-static void serial98_mode_set(struct uart_port *port)
-{
-	serial98_cmd_out(port, CMD_DUMMY);
-	serial98_cmd_out(port, CMD_DUMMY);
-	serial98_cmd_out(port, CMD_DUMMY);
-	serial98_cmd_out(port, CMD_RESET);
-	serial98_cmd_out(port, PORT98->mode);
-}
-
-static unsigned char serial98_msr_in(struct uart_port *port)
-{
-	unsigned long flags;
-	unsigned int ms, st;
-	unsigned int tmp;
-
-	spin_lock_irqsave(&PORT.lock, flags);
-	if (PORT.type == PORT_FIFO_PC98 || PORT.type == PORT_VFAST_PC98) {
-		PORT98->msr = inb(PORT.iobase + 4);
-	} else {
-		ms = inb(0x33);
-		st = inb(0x32);
-		tmp = 0;
-		if(!(ms & 0x20))
-			tmp |= UART_MSR_DCD;
-		if(!(ms & 0x80)) {
-			tmp |= UART_MSR_RI;
-			PORT98->msr |= UART_MSR_RI;
-		}
-		if(!(ms & 0x40))
-			tmp |= UART_MSR_CTS;
-		if(st & 0x80)
-			tmp |= UART_MSR_DSR;
-		PORT98->msr = ((PORT98->msr ^ tmp) >> 4) | tmp;
-	}
-
-	spin_unlock_irqrestore(&PORT.lock, flags);
-	return PORT98->msr;
-}
-
-static void serial98_stop_tx(struct uart_port *port, unsigned int tty_stop)
-{
-	unsigned int ier = inb(IER1_8251F);
-
-	ier &= ~(INTR_8251_TXRE | INTR_8251_TXEE);
-	outb(ier, IER1_8251F);
-}
-
-static void serial98_start_tx(struct uart_port *port, unsigned int tty_start)
-{
-	unsigned int ier = inb(IER1_8251F);
-
-	ier |= INTR_8251_TXRE | INTR_8251_TXEE;
-	outb(ier, IER1_8251F);
-}
-
-static void serial98_stop_rx(struct uart_port *port)
-{
-	PORT.read_status_mask &= ~PORT98->dr;
-	outb(DIS_RXR_INT, IER1_CTL);
-}
-
-static void serial98_enable_ms(struct uart_port *port)
-{
-	outb(PORT98->ier | 0x80, IER2_8251F);
-}
-
-static void serial98_rx_chars(struct uart_port *port, int *status,
-				struct pt_regs *regs)
-{
-	struct tty_struct *tty = PORT.info->tty;
-	unsigned char ch;
-	int max_count = 256;
-
-	do {
-		if (unlikely(tty->flip.count >= TTY_FLIPBUF_SIZE)) {
-			tty->flip.work.func((void *)tty);
-			if (tty->flip.count >= TTY_FLIPBUF_SIZE)
-				return; // if TTY_DONT_FLIP is set
-		}
-		ch = inb(PORT.iobase);
-		*tty->flip.char_buf_ptr = ch;
-		*tty->flip.flag_buf_ptr = TTY_NORMAL;
-		PORT.icount.rx++;
-
-		if (unlikely(*status & (PORT98->brk | PORT98->pe |
-				       PORT98->fe | PORT98->oe))) {
-			/*
-			 * For statistics only
-			 */
-			if (*status & PORT98->brk) {
-				*status &= ~(PORT98->fe | PORT98->pe);
-				PORT.icount.brk++;
-				/*
-				 * We do the SysRQ and SAK checking
-				 * here because otherwise the break
-				 * may get masked by ignore_status_mask
-				 * or read_status_mask.
-				 */
-				if (uart_handle_break(&PORT))
-					goto ignore_char;
-			} else if (*status & PORT98->pe)
-				PORT.icount.parity++;
-			else if (*status & PORT98->fe)
-				PORT.icount.frame++;
-			if (*status & PORT98->oe)
-				PORT.icount.overrun++;
-
-			/*
-			 * Mask off conditions which should be ingored.
-			 */
-			*status &= PORT.read_status_mask;
-
-#ifdef CONFIG_SERIAL98_CONSOLE
-			if (PORT.line == PORT.cons->index) {
-				/* Recover the break flag from console xmit */
-				*status |= PORT98->lsr_break_flag;
-				PORT98->lsr_break_flag = 0;
-			}
-#endif
-			if (*status & PORT98->brk) {
-				*tty->flip.flag_buf_ptr = TTY_BREAK;
-			} else if (*status & PORT98->pe)
-				*tty->flip.flag_buf_ptr = TTY_PARITY;
-			else if (*status & PORT98->fe)
-				*tty->flip.flag_buf_ptr = TTY_FRAME;
-		}
-		if (uart_handle_sysrq_char(&PORT, ch, regs))
-			goto ignore_char;
-		if ((*status & PORT.ignore_status_mask) == 0) {
-			tty->flip.flag_buf_ptr++;
-			tty->flip.char_buf_ptr++;
-			tty->flip.count++;
-		}
-		if ((*status & PORT98->oe) &&
-		    tty->flip.count < TTY_FLIPBUF_SIZE) {
-			/*
-			 * Overrun is special, since it's reported
-			 * immediately, and doesn't affect the current
-			 * character.
-			 */
-			*tty->flip.flag_buf_ptr = TTY_OVERRUN;
-			tty->flip.flag_buf_ptr++;
-			tty->flip.char_buf_ptr++;
-			tty->flip.count++;
-		}
-	ignore_char:
-		*status = inb(PORT.iobase + 2);
-	} while ((*status & PORT98->rxchk) && (max_count-- > 0));
-	tty_flip_buffer_push(tty);
-}
-
-static void serial98_tx_chars(struct uart_port *port)
-{
-	struct circ_buf *xmit = &PORT.info->xmit;
-	int count;
-
-	if (PORT.x_char) {
-		outb(PORT.x_char, PORT.iobase);
-		PORT.icount.tx++;
-		PORT.x_char = 0;
-		return;
-	}
-	if (uart_circ_empty(xmit) || uart_tx_stopped(&PORT)) {
-		serial98_stop_tx(port, 0);
-		return;
-	}
-
-	count = PORT.fifosize;
-	do {
-		outb(xmit->buf[xmit->tail], PORT.iobase);
-		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
-		PORT.icount.tx++;
-		if (uart_circ_empty(xmit))
-			break;
-	} while (--count > 0);
-
-	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
-		uart_write_wakeup(&PORT);
-
-	if (uart_circ_empty(xmit))
-		serial98_stop_tx(&PORT, 0);
-}
-
-static void serial98_modem_status(struct uart_port *port)
-{
-	int status;
-
-	status = serial98_msr_in(port);
-
-	if ((status & UART_MSR_ANY_DELTA) == 0)
-		return;
-
-	if (status & UART_MSR_TERI)
-		PORT.icount.rng++;
-	if (status & UART_MSR_DDSR)
-		PORT.icount.dsr++;
-	if (status & UART_MSR_DDCD)
-		uart_handle_dcd_change(&PORT, status & UART_MSR_DCD);
-	if (status & UART_MSR_DCTS)
-		uart_handle_cts_change(&PORT, status & UART_MSR_CTS);
-
-	wake_up_interruptible(&PORT.info->delta_msr_wait);
-}
-
-static void serial98_int(int irq, void *port, struct pt_regs *regs)
-{
-	unsigned int status;
-
-	spin_lock(&PORT.lock);
-	status = inb(PORT.iobase + 2);
-	if (status & PORT98->rxrdy) {
-		serial98_rx_chars(port, &status, regs);
-	}
-	serial98_modem_status(port);
-	if (status & PORT98->txrdy) {
-		serial98_tx_chars(port);
-	}
-	spin_unlock(&PORT.lock);
-}
-
-static unsigned int serial98_tx_empty(struct uart_port *port)
-{
-	unsigned long flags;
-	unsigned int ret = 0;
-
-	spin_lock_irqsave(&PORT.lock, flags);
-	if (inb(PORT.iobase + 2) & PORT98->txemp)
-			ret = TIOCSER_TEMT;
-
-	spin_unlock_irqrestore(&PORT.lock, flags);
-	return ret;
-}
-
-static unsigned int serial98_get_mctrl(struct uart_port *port)
-{
-	unsigned char status;
-	unsigned int ret = 0;
-
-	status = serial98_msr_in(port);
-	if (status & UART_MSR_DCD)
-		ret |= TIOCM_CAR;
-	if (status & UART_MSR_RI)
-		ret |= TIOCM_RNG;
-	if (status & UART_MSR_DSR)
-		ret |= TIOCM_DSR;
-	if (status & UART_MSR_CTS)
-		ret |= TIOCM_CTS;
-	return ret;
-}
-
-static void serial98_set_mctrl(struct uart_port *port, unsigned int mctrl)
-{
-	PORT98->cmd &= 0xdd;
-	if (mctrl & TIOCM_RTS)
-		PORT98->cmd |= CMD_RTS;
-
-	if (mctrl & TIOCM_DTR)
-		PORT98->cmd |= CMD_DTR;
-
-	serial98_cmd_out(port, PORT98->cmd);
-}
-
-static void serial98_break_ctl(struct uart_port *port, int break_state)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&PORT.lock, flags);
-	if (break_state == -1)
-		PORT98->cmd |= CMD_BREAK;
-	else
-		PORT98->cmd &= ~CMD_BREAK;
-
-	serial98_cmd_out(port, PORT98->cmd);
-	spin_unlock_irqrestore(&PORT.lock, flags);
-}
-
-static int serial98_startup(struct uart_port *port)
-{
-	int retval;
-
-	if (PORT.type == PORT_8251_PC98) {
-		/* Wake up UART */
-		PORT98->mode = 0xfc;
-		serial98_mode_set(port);
-		outb(DIS_RXR_INT, IER1_CTL);
-		outb(DIS_TXE_INT, IER1_CTL);
-		outb(DIS_TXR_INT, IER1_CTL);
-		PORT98->mode = 0;
-		serial98_mode_set(port);
-	}
-
-	/*
-	 * Clear the FIFO buffers and disable them.
-	 * (they will be reeanbled in set_termios())
-	 */
-	if (PORT.type == PORT_FIFO_PC98 || PORT.type == PORT_VFAST_PC98) {
-		outb(UART_FCR_ENABLE_FIFO, FCR_8251F);
-		outb((UART_FCR_ENABLE_FIFO
-			| UART_FCR_CLEAR_RCVR
-			| UART_FCR_CLEAR_XMIT), FCR_8251F);
-		outb(0, FCR_8251F);
-	}
-
-	/* Clear the interrupt registers. */
-	inb(0x30);
-	inb(0x32);
-	if (PORT.type == PORT_FIFO_PC98 || PORT.type == PORT_VFAST_PC98) {
-		inb(PORT.iobase);
-		inb(PORT.iobase + 2);
-		inb(PORT.iobase + 4);
-		inb(PORT.iobase + 6);
-	}
-
-	/* Allocate the IRQ */
-	retval = request_irq(PORT.irq, serial98_int, 0,
-				serial98_reg.driver_name, port);
-	if (retval)
-		return retval;
-
-	/*
-	 * Now, initialize the UART
-	 */
-	PORT98->mode = 0x4e;
-	serial98_mode_set(port);
-	PORT98->cmd = 0x15;
-	serial98_cmd_out(port, PORT98->cmd);
-	PORT98->cmd = 0x05;
-
-	/*
-	 * Finally, enable interrupts
-	 */
-	outb(0x00, IER2_8251F);
-	outb(ENA_RXR_INT, IER1_CTL);
-
-	/*
-	 * And clear the interrupt registers again for luck.
-	 */
-	inb(0x30);
-	inb(0x32);
-	if (PORT.type == PORT_FIFO_PC98 || PORT.type == PORT_VFAST_PC98) {
-		inb(PORT.iobase);
-		inb(PORT.iobase + 2);
-		inb(PORT.iobase + 4);
-		inb(PORT.iobase + 6);
-	}
-
-	return 0;
-}
-
-static void serial98_shutdown(struct uart_port *port)
-{
-	unsigned long flags;
-
-	/*
-	 * disable all interrupts
-	 */
-	spin_lock_irqsave(&PORT.lock, flags);
-	if (PORT.type == PORT_VFAST_PC98)
-		outb(0, VFAST_8251F);		/* V.FAST mode off */
-
-	/* disnable all modem status interrupt */
-	outb(0x80, IER2_8251F);
-
-	/* disnable TX/RX interrupt */
-	outb(0x00, IER2_8251F);
-	outb(DIS_RXR_INT, IER1_CTL);
-	outb(DIS_TXE_INT, IER1_CTL);
-	outb(DIS_TXR_INT, IER1_CTL);
-	PORT98->ier = 0;
-
-	spin_unlock_irqrestore(&PORT.lock, flags);
-
-	/*
-	 * Free the interrupt
-	 */
-	free_irq(PORT.irq, port);
-
-	/* disable break condition and disable the port */
-	serial98_mode_set(port);
-
-	/* disable FIFO's */	
-	if (PORT.type == PORT_FIFO_PC98 || PORT.type == PORT_VFAST_PC98) {
-		outb((UART_FCR_ENABLE_FIFO
-			| UART_FCR_CLEAR_RCVR
-			| UART_FCR_CLEAR_XMIT), FCR_8251F);
-		outb(0, FCR_8251F);
-	}
-
-	inb(PORT.iobase);
-}
-
-static void
-serial98_set_termios(struct uart_port *port, struct termios *termios,
-		       struct termios *old)
-{
-	unsigned char stopbit, cval, fcr = 0, ier = 0;
-	unsigned long flags;
-	unsigned int baud, quot;
-
-	stopbit = 0x80;
-	switch (termios->c_cflag & CSIZE) {
-		case CS5:
-			cval = 0x42;
-			stopbit = 0xc0;
-			break;
-		case CS6:
-			cval = 0x46;
-			break;
-		case CS7:
-			cval = 0x4a;
-			break;
-		default:
-		case CS8:
-			cval = 0x4e;
-			break;
-	}
-
-	if (termios->c_cflag & CSTOPB)
-		cval ^= stopbit;
-	if (termios->c_cflag & PARENB)
-		cval |= 0x10;
-	if (!(termios->c_cflag & PARODD))
-		cval |= 0x20;
-
-	/*
-	 * Ask the core to calculate the divisor for us.
-	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
-	quot = uart_get_divisor(port, baud);
-
-	if (PORT.type == PORT_FIFO_PC98 || PORT.type == PORT_VFAST_PC98) {
-		if ((PORT.uartclk / quot) < (2400 * 16))
-			fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1;
-		else
-			fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_8;
-	}
-
-	/*
-	 * Ok, we're now changing the port state.  Do it with
-	 * interrupts disabled.
-	 */
-	spin_lock_irqsave(&PORT.lock, flags);
-
-	/*
-	 * Update the per-port timeout.
-	 */
-	uart_update_timeout(port, termios->c_cflag, baud);
-
-	PORT.read_status_mask = PORT98->oe | PORT98->txemp | PORT98->dr;
-	if (termios->c_iflag & INPCK)
-		PORT.read_status_mask |= PORT98->fe | PORT98->pe;
-
-	if (termios->c_iflag & (BRKINT | PARMRK))
-		PORT.read_status_mask |= PORT98->brk;
-	/*
-	 * Characters to ignore
-	 */
-	PORT.ignore_status_mask = 0;
-	if (termios->c_iflag & IGNPAR)
-		PORT.ignore_status_mask |= PORT98->fe | PORT98->pe;
-
-	if (termios->c_iflag & IGNBRK) {
-		PORT.ignore_status_mask |= PORT98->brk;
-		/*
-		 * If we're ignoring parity and break indicators,
-		 * ignore overruns too (for real raw support).
-		 */
-		if (termios->c_iflag & IGNPAR)
-			PORT.ignore_status_mask |= PORT98->oe;
-	}
-
-	/*
-	 * ignore all characters if CREAD is not set
-	 */
-	if ((termios->c_cflag & CREAD) == 0)
-		PORT.ignore_status_mask |= PORT98->dr;
-
-	/*
-	 * CTS flow control flag and modem status interrupts
-	 */
-	if (PORT.flags & UPF_HARDPPS_CD)
-		ier |= 0x80;	/* enable modem status interrupt */
-	if (termios->c_cflag & CRTSCTS) {
-		ier |= 0x08;	/* enable CTS interrupt */
-		ier |= 0x80;	/* enable modem status interrupt */
-	}
-	if (!(termios->c_cflag & CLOCAL)) {
-		ier |= 0x20;	/* enable CD interrupt */
-		ier |= 0x80;	/* enable modem status interrupt */
-	}
-	PORT98->ier = ier;
-
-	PORT98->mode = cval;
-	serial98_mode_set(port);
-	if (PORT.type == PORT_VFAST_PC98 && quot <= 48) {
-		quot /= 4;
-		if (quot < 1)
-			quot = 1;
-		outb(quot | VFAST_ENABLE, VFAST_8251F);
-	} else {
-		quot /= 3;
-		if (quot < 1)
-			quot = 1;
-		if (PORT.type == PORT_VFAST_PC98)
-			outb(0, VFAST_8251F);		/* V.FAST mode off */
-		outb(0xb6, 0x77);
-		outb(quot & 0xff, 0x75);		/* LS of divisor */
-		outb(quot >> 8, 0x75);			/* MS of divisor */
-	}
-
-	if (fcr & UART_FCR_ENABLE_FIFO) {
-		outb(UART_FCR_ENABLE_FIFO, FCR_8251F);
-		outb(fcr, FCR_8251F);
-	}
-
-	/* enable RX/TX */
-	PORT98->cmd = 0x15;
-	serial98_cmd_out(port, PORT98->cmd);
-	PORT98->cmd = 0x05;
-	/* enable interrupts */
-	outb(0x00, IER2_8251F);
-	outb(ENA_RXR_INT, IER1_CTL);
-	spin_unlock_irqrestore(&PORT.lock, flags);
-}
-
-static const char *serial98_type(struct uart_port *port)
-{
-	char *p;
-
-	switch (PORT.type) {
-		case PORT_8251_PC98:
-			p = "PC98 onboard legacy 8251";
-			break;
-		case PORT_19K_PC98:
-			p =  "PC98 onboard max 19200bps";
-			break;
-		case PORT_FIFO_PC98:
-			p = "PC98 onboard with FIFO";
-			break;
-		case PORT_VFAST_PC98:
-			p = "PC98 onboard V.FAST";
-			break;
-		case PORT_PC9861:
-			p = "PC-9861K RS-232C ext. board";
-			break;
-		case PORT_PC9801_101:
-			p = "PC-9801-101 RS-232C ext. board";
-			break;
-		default:
-			return NULL;
-	}
-
-	sprintf(type_str, "%s  Clock %dMHz", p, serial98_clk);
-	return type_str;
-}
-
-/* Release the region(s) being used by 'port' */
-static void serial98_release_port(struct uart_port *port)
-{
-	switch (PORT.type) {
-		case PORT_VFAST_PC98:
-			release_region(PORT.iobase + 0xa, 1);
-		case PORT_FIFO_PC98:
-			release_region(PORT.iobase + 8, 1);
-			release_region(PORT.iobase + 6, 1);
-			release_region(PORT.iobase + 4, 1);
-			release_region(PORT.iobase + 2, 1);
-			release_region(PORT.iobase, 1);
-		case PORT_19K_PC98:
-			release_region(SERIAL98_EXT, 1);
-			release_region(0x34, 1);
-		case PORT_8251_PC98:
-			release_region(0x32, 1);
-			release_region(0x30, 1);
-	}
-}
-
-/* Request the region(s) being used by 'port' */
-#define REQ_REGION98(base) (request_region((base), 1, serial98_reg.driver_name))
-static int serial98_request_region(unsigned int type)
-{
-	if (!REQ_REGION98(0x30))
-		return -EBUSY;
-	if (REQ_REGION98(0x32)) {
-		if (type == PORT_8251_PC98)
-			return 0;
-		if (REQ_REGION98(0x34)) {
-			if (REQ_REGION98(SERIAL98_EXT)) {
-				unsigned long base;
-
-				if (type == PORT_19K_PC98)
-					return 0;
-				for (base = 0x130; base <= 0x138; base += 2) {
-					if (!REQ_REGION98(base)) {
-						base -= 2;
-						goto err;
-					}
-				}
-				if (type == PORT_FIFO_PC98)
-					return 0;
-				if (type == PORT_VFAST_PC98) {
-					if (REQ_REGION98(0x13a))
-						return 0;
-				}
-				err:
-				while (base >= 0x130) {
-					release_region(base, 1);
-					base -= 2;
-				}
-				release_region(SERIAL98_EXT, 1);
-			}
-			release_region(0x34, 1);
-		}
-		release_region(0x32, 1);
-	}
-	release_region(0x30, 1);
-	return -EBUSY;
-}
-
-static int serial98_request_port(struct uart_port *port)
-{
-	return serial98_request_region(PORT.type);
-}
-
-/*
- * Configure/autoconfigure the port.
- */
-static void serial98_config_port(struct uart_port *port, int flags)
-{
-	if (flags & UART_CONFIG_TYPE)
-		PORT.type = PORT98->type;
-}
-
-/*
- * verify the new serial_struct (for TIOCSSERIAL).
- */
-static int serial98_verify_port(struct uart_port *port, struct serial_struct *ser)
-{
-	switch (ser->type) {
-		case PORT_VFAST_PC98:
-		case PORT_FIFO_PC98:
-		case PORT_19K_PC98:
-		case PORT_8251_PC98:
-		/* not implemented yet
-		case PORT_PC9861:
-		case PORT_PC9801_101:
-		*/
-		case PORT_UNKNOWN:
-			break;
-		default:
-			return -EINVAL;
-	}
-	if (ser->irq < 0 || ser->irq >= NR_IRQS)
-		return -EINVAL;
-	if (ser->baud_base < 9600)
-		return -EINVAL;
-	return 0;
-}
-
-static struct uart_ops serial98_ops = {
-	.tx_empty	= serial98_tx_empty,
-	.set_mctrl	= serial98_set_mctrl,
-	.get_mctrl	= serial98_get_mctrl,
-	.stop_tx	= serial98_stop_tx,
-	.start_tx	= serial98_start_tx,
-	.stop_rx	= serial98_stop_rx,
-	.enable_ms	= serial98_enable_ms,
-	.break_ctl	= serial98_break_ctl,
-	.startup	= serial98_startup,
-	.shutdown	= serial98_shutdown,
-	.set_termios	= serial98_set_termios,
-	.type		= serial98_type,
-	.release_port	= serial98_release_port,
-	.request_port	= serial98_request_port,
-	.config_port	= serial98_config_port,
-	.verify_port	= serial98_verify_port,
-};
-
-static struct serial98_port serial98_ports[SERIAL98_NR] = {
-	{
-		.port =	{
-				.iobase		= 0x30,
-				.iotype		= SERIAL_IO_PORT,
-				.irq		= 4,
-				.fifosize	= 1,
-				.ops		= &serial98_ops,
-				.flags		= ASYNC_BOOT_AUTOCONF,
-				.line		= 0,
-			},
-		.rxchk = STAT_8251_RXRDY,
-		.txemp = STAT_8251_TXEMP,
-		.txrdy = STAT_8251_TXRDY,
-		.rxrdy = STAT_8251_RXRDY,
-		.brk = STAT_8251_BRK,
-		.fe = STAT_8251_FER,
-		.oe = STAT_8251_OER,
-		.pe = STAT_8251_PER,
-		.dr = STAT_8251_DSR,
-	},
-};
-
-#ifdef CONFIG_SERIAL98_CONSOLE
-
-#define BOTH_EMPTY (PORT98->txemp | PORT98->txrdy)
-
-/*
- *	Wait for transmitter & holding register to empty
- */
-static inline void wait_for_xmitr(struct uart_port *port)
-{
-	unsigned int status, tmout = 10000;
-
-	/* Wait up to 10ms for the character(s) to be sent. */
-	do {
-		status = inb(PORT.iobase + 2);
-
-		if (status & PORT98->brk)
-			PORT98->lsr_break_flag = PORT98->brk;
-
-		if (--tmout == 0)
-			break;
-		udelay(1);
-	} while ((status & BOTH_EMPTY) != BOTH_EMPTY);
-
-	/* Wait up to 1s for flow control if necessary */
-	if (PORT.flags & UPF_CONS_FLOW) {
-		tmout = 1000000;
-		while (--tmout &&
-		       ((serial98_msr_in(port) & UART_MSR_CTS) == 0))
-			udelay(1);
-	}
-}
-
-/*
- *	Print a string to the serial port trying not to disturb
- *	any possible real use of the port...
- *
- *	The console_lock must be held when we get here.
- */
-static void
-serial98_console_write(struct console *co, const char *s, unsigned int count)
-{
-	struct uart_port *port = (struct uart_port *)&serial98_ports[co->index];
-	unsigned int ier1, ier2;
-	int i;
-
-	/*
-	 *	First save the UER then disable the interrupts
-	 */
-	ier1 = inb(IER1_8251F);
-	ier2 = inb(IER2_8251F);
-	/* disnable all modem status interrupt */
-	outb(0x80, IER2_8251F);
-
-	/* disnable TX/RX interrupt */
-	outb(0x00, IER2_8251F);
-	outb(DIS_RXR_INT, IER1_CTL);
-	outb(DIS_TXE_INT, IER1_CTL);
-	outb(DIS_TXR_INT, IER1_CTL);
-
-	/*
-	 *	Now, do each character
-	 */
-	for (i = 0; i < count; i++, s++) {
-		wait_for_xmitr(port);
-
-		/*
-		 *	Send the character out.
-		 *	If a LF, also do CR...
-		 */
-		outb(*s, PORT.iobase);
-		if (*s == 10) {
-			wait_for_xmitr(port);
-			outb(13, PORT.iobase);
-		}
-	}
-
-	/*
-	 *	Finally, wait for transmitter to become empty
-	 *	and restore the IER
-	 */
-	wait_for_xmitr(port);
-
-	/* restore TX/RX interrupt */
-	outb(0x00, IER2_8251F);
-	if (ier1 & 0x01)
-		outb(ENA_RXR_INT, IER1_CTL);
-	if (ier1 & 0x02)
-		outb(ENA_TXE_INT, IER1_CTL);
-	if (ier1 & 0x04)
-		outb(ENA_TXR_INT, IER1_CTL);
-
-	/* restore modem status interrupt */
-	outb(ier2, IER2_8251F);
-}
-
-static int __init serial98_console_setup(struct console *co, char *options)
-{
-	struct uart_port *port;
-	int baud = 9600;
-	int bits = 8;
-	int parity = 'n';
-	int flow = 'n';
-
-	/*
-	 * Check whether an invalid uart number has been specified, and
-	 * if so, search for the first available port that does have
-	 * console support.
-	 */
-	if (co->index >= SERIAL98_NR)
-		co->index = 0;
-	port = &serial98_ports[co->index].port;
-
-	/*
-	 * Temporary fix.
-	 */
-	spin_lock_init(&port->lock);
-
-	if (options)
-		uart_parse_options(options, &baud, &parity, &bits, &flow);
-
-	return uart_set_options(port, co, baud, parity, bits, flow);
-}
-
-void __init serial98_console_init(void)
-{
-	register_console(&serial98_console);
-}
-
-#endif /* CONFIG_SERIAL98_CONSOLE */
-
-
-static int __init serial98_init(void)
-{
-	int ret;
-	unsigned char iir1, iir2;
-
-	if (PC9800_8MHz_P()) {
-		serial98_clk = 8;
-		serial98_ports[0].port.uartclk = 374400 * 16;
-	} else {
-		serial98_clk = 5;
-		serial98_ports[0].port.uartclk = 460800 * 16;
-	}
-
-	printk(KERN_INFO "serial98: PC-9801 standard serial port driver Version 0.1alpha\n");
-	serial98_ports[0].type = PORT_8251_PC98;
-	/* Check FIFO exist */
-	iir1 = inb(IIR_8251F);
-	iir2 = inb(IIR_8251F);
-	if ((iir1 & 0x40) != (iir2 & 0x40) && (iir1 & 0x20) == (iir2 & 0x20)) {
-		serial98_ports[0].port.iobase = 0x130;
-		serial98_ports[0].port.fifosize = 16;
-		serial98_ports[0].rxchk = STAT_8251F_DSR;
-		serial98_ports[0].txemp = STAT_8251F_TXEMP;
-		serial98_ports[0].txrdy = STAT_8251F_TXRDY;
-		serial98_ports[0].rxrdy = STAT_8251F_RXRDY;
-		serial98_ports[0].brk = STAT_8251F_BRK;
-		serial98_ports[0].fe = STAT_8251F_FER;
-		serial98_ports[0].oe = STAT_8251F_OER;
-		serial98_ports[0].pe = STAT_8251F_PER;
-		serial98_ports[0].dr = STAT_8251F_DSR;
-
-		if (*(unsigned char*)__va(PC9821SCA_RSFLAGS) & 0x10)
-			serial98_ports[0].type = PORT_VFAST_PC98;
-		else {
-			outb(serial98_ports[0].ext | 0x40, SERIAL98_EXT);
-			serial98_ports[0].port.uartclk *= 4;
-			serial98_ports[0].type = PORT_FIFO_PC98;
-		}
-	} else if ((serial98_ports[0].ext = inb(SERIAL98_EXT)) != 0xff) {
-		outb(serial98_ports[0].ext | 0x40, SERIAL98_EXT);
-		if (inb(SERIAL98_EXT) == (serial98_ports[0].ext | 0x40)) {
-			serial98_ports[0].port.uartclk *= 4;
-			serial98_ports[0].type = PORT_19K_PC98;
-		} else {
-			serial98_ops.enable_ms = NULL;
-			outb(serial98_ports[0].ext, SERIAL98_EXT);
-		}
-	}
-
-	if (serial98_request_region(serial98_ports[0].type))
-		return -EBUSY;
-
-	ret = uart_register_driver(&serial98_reg);
-	if (ret == 0) {
-		int i;
-
-		for (i = 0; i < SERIAL98_NR; i++) {
-			uart_add_one_port(&serial98_reg,
-					(struct uart_port *)&serial98_ports[i]);
-		}
-	}
-
-	return ret;
-}
-
-static void __exit serial98_exit(void)
-{
-	int i;
-
-	if (serial98_ports[0].type == PORT_19K_PC98
-			|| serial98_ports[0].type == PORT_FIFO_PC98)
-		outb(serial98_ports[0].ext, SERIAL98_EXT);
-
-	for (i = 0; i < SERIAL98_NR; i++) {
-		uart_remove_one_port(&serial98_reg,
-					(struct uart_port *)&serial98_ports[i]);
-	}
-
-	uart_unregister_driver(&serial98_reg);
-}
-
-module_init(serial98_init);
-module_exit(serial98_exit);
-
-MODULE_AUTHOR("Osamu Tomita <tomita@cinet.co.jp>");
-MODULE_DESCRIPTION("PC-9801 standard serial port driver Version 0.1alpha");
-MODULE_LICENSE("GPL");
--- diff/fs/partitions/nec98.c	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/partitions/nec98.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,188 +0,0 @@
-/*
- *  NEC PC-9800 series partition supports
- *
- *  Copyright (C) 1999	Kyoto University Microcomputer Club
- */
-
-#include <linux/config.h>
-#include <linux/fs.h>
-#include <linux/genhd.h>
-#include <linux/kernel.h>
-#include <linux/hdreg.h>
-
-#include "check.h"
-#include "nec98.h"
-
-struct nec98_partition {
-	__u8	mid;		/* 0x80 - active */
-	__u8	sid;		/* 0x80 - bootable */
-	__u16	pad1;		/* dummy for padding */
-	__u8	ipl_sector;	/* IPL sector	*/
-	__u8	ipl_head;	/* IPL head	*/
-	__u16	ipl_cyl;	/* IPL cylinder	*/
-	__u8	sector;		/* starting sector	*/
-	__u8	head;		/* starting head	*/
-	__u16	cyl;		/* starting cylinder	*/
-	__u8	end_sector;	/* end sector	*/
-	__u8	end_head;	/* end head	*/
-	__u16	end_cyl;	/* end cylinder	*/
-	unsigned char name[16];
-} __attribute__((__packed__));
-
-#define NEC98_BSD_PARTITION_MID 0x14
-#define NEC98_BSD_PARTITION_SID 0x44
-#define MID_SID_16(mid, sid)	(((mid) & 0xFF) | (((sid) & 0xFF) << 8))
-#define NEC98_BSD_PARTITION_MID_SID	\
-	MID_SID_16(NEC98_BSD_PARTITION_MID, NEC98_BSD_PARTITION_SID)
-#define NEC98_VALID_PTABLE_ENTRY(P) \
-	(!(P)->pad1 && (P)->cyl <= (P)->end_cyl)
-
-extern int pc98_bios_param(struct block_device *bdev, int *ip);
-
-static inline int
-is_valid_nec98_partition_table(const struct nec98_partition *ptable,
-				__u8 nsectors, __u8 nheads)
-{
-	int i;
-	int valid = 0;
-
-	for (i = 0; i < 16; i++) {
-		if (!*(__u16 *)&ptable[i])
-			continue;	/* empty slot */
-		if (ptable[i].pad1	/* `pad1' contains junk */
-		    || ptable[i].ipl_sector	>= nsectors
-		    || ptable[i].sector		>= nsectors
-		    || ptable[i].end_sector	>= nsectors
-		    || ptable[i].ipl_head	>= nheads
-		    || ptable[i].head		>= nheads
-		    || ptable[i].end_head	>= nheads
-		    || ptable[i].cyl > ptable[i].end_cyl)
-			return 0;
-		valid = 1;	/* We have a valid partition.  */
-	}
-	/* If no valid PC-9800-style partitions found,
-	   the disk may have other type of partition table.  */
-	return valid;
-}
-
-int nec98_partition(struct parsed_partitions *state, struct block_device *bdev)
-{
-	unsigned int nr;
-	struct hd_geometry geo;
-	Sector sect;
-	const struct nec98_partition *part;
-	unsigned char *data;
-	int sector_size = bdev_hardsect_size(bdev);
-
-	if (ioctl_by_bdev(bdev, HDIO_GETGEO, (unsigned long)&geo) != 0) {
-		printk(" unsupported disk (%s)\n", bdev->bd_disk->disk_name);
-		return 0;
-	}
-
-#ifdef NEC98_PARTITION_DEBUG
-	printk("ioctl_by_bdev head=%d sect=%d\n", geo.heads, geo.sectors);
-#endif
-	data = read_dev_sector(bdev, 0, &sect);
-	if (!data) {
-		if (warn_no_part)
-			printk(" unable to read partition table\n");
-		return -1;
-	}
-
-	/* magic(?) check */
-	if (*(__u16 *)(data + sector_size - 2) != NEC98_PTABLE_MAGIC) {
-		put_dev_sector(sect);
-		return 0;
-	}
-
-	put_dev_sector(sect);
-	data = read_dev_sector(bdev, 1, &sect);
-	if (!data) {
-		if (warn_no_part)
-			printk(" unable to read partition table\n");
-		return -1;
-	}
-
-	if (!is_valid_nec98_partition_table((struct nec98_partition *)data,
-					     geo.sectors, geo.heads)) {
-#ifdef NEC98_PARTITION_DEBUG
-		if (warn_no_part)
-			printk(" partition table consistency check failed"
-				" (not PC-9800 disk?)\n");
-#endif
-		put_dev_sector(sect);
-		return 0;
-	}
-
-	part = (const struct nec98_partition *)data;
-	for (nr = 0; nr < 16; nr++, part++) {
-		unsigned int start_sect, end_sect;
-
-		if (part->mid == 0 || part->sid == 0)
-			continue;
-
-		if (nr)
-			printk("     ");
-
-		{	/* Print partition name. Fdisk98 might put NUL
-			   characters in partition name... */
-
-			int j;
-			unsigned char *p;
-			unsigned char buf[sizeof (part->name) * 2 + 1];
-
-			for (p = buf, j = 0; j < sizeof (part->name); j++, p++)
-				if ((*p = part->name[j]) < ' ') {
-					*p++ = '^';
-					*p = part->name[j] + '@';
-				}
-
-			*p = 0;
-			printk(" <%s>", buf);
-		}
-		start_sect = (part->cyl * geo.heads + part->head) * geo.sectors
-			+ part->sector;
-		end_sect = (part->end_cyl + 1) * geo.heads * geo.sectors;
-		if (end_sect <= start_sect) {
-			printk(" (invalid partition info)\n");
-			continue;
-		}
-
-		put_partition(state, nr + 1, start_sect, end_sect - start_sect);
-#ifdef CONFIG_BSD_DISKLABEL
-		if ((*(__u16 *)&part->mid & 0x7F7F)
-		    == NEC98_BSD_PARTITION_MID_SID) {
-			printk("!");
-			/* NEC98_BSD_PARTITION_MID_SID is not valid SYSIND for
-			   IBM PC's MS-DOS partition table, so we simply pass
-			   it to bsd_disklabel_partition;
-			   it will just print `<bsd: ... >'. */
-			parse_bsd(state, bdev, start_sect,
-					end_sect - start_sect, nr + 1,
-					"bsd98", BSD_MAXPARTITIONS);
-		}
-#endif
-		{	/* Pretty size printing. */
-			/* XXX sector size? */
-			unsigned int psize = (end_sect - start_sect) / 2;
-			int unit_char = 'K';
-
-			if (psize > 99999) {
-				psize >>= 10;
-				unit_char = 'M';
-			}
-			printk(" %5d%cB (%5d-%5d)\n", 
-			       psize, unit_char, part->cyl, part->end_cyl);
-		}
-	}
-
-	put_dev_sector(sect);
-
-	return nr ? 1 : 0;
-}
-
-/*
- * Local variables:
- * c-basic-offset: 8
- * End:
- */
--- diff/fs/partitions/nec98.h	2004-05-19 22:12:31.000000000 +0100
+++ source/fs/partitions/nec98.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-/*
- *  NEC PC-9800 series partition supports
- *
- *  Copyright (C) 1998-2000	Kyoto University Microcomputer Club
- */
-
-#define NEC98_PTABLE_MAGIC	0xAA55
-
-extern int nec98_partition(struct parsed_partitions *state,
-				struct block_device *bdev);
--- diff/include/asm-alpha/cpumask.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-alpha/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_ALPHA_CPUMASK_H
-#define _ASM_ALPHA_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_ALPHA_CPUMASK_H */
--- diff/include/asm-alpha/init.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-alpha/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#error "<asm/init.h> should never be used - use <linux/init.h> instead"
--- diff/include/asm-arm/arch-adifcc/adi_evb.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/adi_evb.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-/*
- * linux/include/asm/arch-80200fcc/adi_evb.h
- *
- * ADI 80200FCC evaluation board definitions
- *
- * Author: Deepak Saxena <dsaxena@mvista.com>
- *
- * Copyright (C) 2001 MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
- */
-
-#define ADI_EVB__RAMBASE	0xa0000000
-#define ADI_EVB__UART		0x00400000    /* UART */
-#define ADI_EVB_7SEG_1		0x00500000    /* 7-Segment */
-
--- diff/include/asm-arm/arch-adifcc/dma.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/dma.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-/*
- * linux/include/asm-arm/arch-80200fcc/dma.h
- *
- * Copyright (C) 2001 MontaVista Software, Inc.
- *
- * 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.
- */
-#ifndef __ASM_ARCH_DMA_H
-#define __ASM_ARCH_DMA_H
-
-#define MAX_DMA_ADDRESS		0xffffffff
-
-/* No DMA */
-#define MAX_DMA_CHANNELS	0
-
-#endif /* _ASM_ARCH_DMA_H */
--- diff/include/asm-arm/arch-adifcc/hardware.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/hardware.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/*
- * linux/include/asm-arm/arch-adifcc/hardware.h
- *
- * Hardware definitions for ADI based systems
- *
- * Author: Deepak Saxena <dsaxena@mvista.com>
- *
- * Copyright (C) 2000-2001 MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
- */
-
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-#include <linux/config.h>
-
-#define PCIO_BASE	0
-
-#if defined(CONFIG_ARCH_ADI_EVB)
-#include "adi_evb.h"
-#endif
-
-#endif  /* _ASM_ARCH_HARDWARE_H */
--- diff/include/asm-arm/arch-adifcc/io.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/io.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-/*
- * linux/include/asm-arm/arch-adifcc/io.h
- *
- * Author: Deepak Saxena <dsaxena@mvista.com>
- *
- * Copyright (C) 2001  MontaVista Software, Inc.
- *
- * 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.
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a)			(PCIO_BASE + (a))
-#define __mem_pci(a)		((unsigned long)(a))
-#define __mem_isa(a)		((unsigned long)(a))
-
-#endif
--- diff/include/asm-arm/arch-adifcc/irqs.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/irqs.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-/*
- * linux/include/asm-arm/arch-80200fcc/irqs.h
- *
- * Author:	Deepak Saxena <dsaxena@mvista.com>
- * Copyright:	(C) 2001 MontaVista Software Inc.
- *
- * 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.
- */
-
-#define IRQ_XS80200_BCU		0	/* Bus Control Unit */
-#define IRQ_XS80200_PMU		1	/* Performance Monitoring Unit */
-#define IRQ_XS80200_EXTIRQ	2	/* external IRQ signal */
-#define IRQ_XS80200_EXTFIQ	3	/* external IRQ signal */
-
-#define NR_XS80200_IRQS		4
-#define NR_IRQS			NR_XS80200_IRQS
-
-#define	IRQ_XSCALE_PMU		IRQ_XS80200_PMU
--- diff/include/asm-arm/arch-adifcc/memory.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/memory.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/*
- * linux/include/asm-arm/arch-adifcc/memory.h
- *
- * Copyright (c) 2001 MontaVista Software, Inc.
- */
-
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-/*
- * Physical DRAM offset.
- */
-#define PHYS_OFFSET	(0xC0000000UL)
-
-/*
- * Virtual view <-> DMA view memory address translations
- * virt_to_bus: Used to translate the virtual address to an
- *		address suitable to be passed to set_dma_addr
- * bus_to_virt: Used to convert an address for DMA operations
- *		to an address that the kernel can use.
- *
- * These are dummies for now.
- */
-#define __virt_to_bus(x)	 __virt_to_phys(x)
-#define __bus_to_virt(x)	 __phys_to_virt(x)
-
-#endif
--- diff/include/asm-arm/arch-adifcc/param.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/param.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-adifcc/param.h
- */
--- diff/include/asm-arm/arch-adifcc/serial.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/serial.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-/*
- * include/asm-arm/arch-adifcc/serial.h
- *
- * Author: Deepak Saxena <dsaxena@mvista.com>
- *
- * Copyright (c) 2001 MontaVista Software, Inc.
- */
-#include <linux/config.h>
-
-/*
- * This assumes you have a 1.8432 MHz clock for your UART.
- *
- * It'd be nice if someone built a serial card with a 24.576 MHz
- * clock, since the 16550A is capable of handling a top speed of 1.5
- * megabits/second; but this requires the faster clock.
- */
-#define BASE_BAUD ( 1852000 / 16 )
-
-/* Standard COM flags */
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
-
-#ifdef CONFIG_ARCH_ADI_EVB
-
-/*
- * One serial port, int goes to FIQ, so we run in polled mode
- */
-#define STD_SERIAL_PORT_DEFNS			\
-       /* UART CLK      PORT        IRQ        FLAGS        */			\
-	{ 0, BASE_BAUD, 0xff400000, 0,  STD_COM_FLAGS }  /* ttyS0 */
-
-#define EXTRA_SERIAL_PORT_DEFNS
-
-#endif
-
--- diff/include/asm-arm/arch-adifcc/system.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/system.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-/*
- * linux/include/asm-arm/arch-adifcc/system.h
- *
- * Copyright (C) 2001 MontaVista Software, Inc.
- *
- * 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.
- */
-
-static inline void arch_idle(void)
-{
-#if 0
-	cpu_do_idle();
-#endif
-}
-
-
-static inline void arch_reset(char mode)
-{
-	if ( 1 && mode == 's') {
-		/* Jump into ROM at address 0 */
-		cpu_reset(0);
-	} else {
-		/* Use on-chip reset capability */
-	}
-}
-
--- diff/include/asm-arm/arch-adifcc/time.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-/*
- * linux/include/asm-arm/arch-adifcc/time.h
- *
- */
-
-/*
- * No on board timer, implementation @ arch/arm/kernel/xscale-time.c
- */
-
--- diff/include/asm-arm/arch-adifcc/timex.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/timex.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-/*
- * linux/include/asm-arm/arch-adifcc/timex.h
- *
- * XScale architecture timex specifications
- */
-
-/* This is for a timer based on the XS80200's PMU counter */
-
-#define CLOCK_TICK_RATE 600000000 /* Underlying HZ */
-
--- diff/include/asm-arm/arch-adifcc/uncompress.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/uncompress.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-/*
- * linux/include/asm-arm/arch-adifcc/uncompress.h
- *
- * Author: Deepak Saxena <dsaxena@mvista.com>
- *
- * Copyright (c) 2001 MontaVista Software, Inc.
- *
- */
-
-#define UART_BASE    ((volatile unsigned char *)0x00400000)
-
-static __inline__ void putc(char c)
-{
-	while ((UART_BASE[5] & 0x60) != 0x60);
-	UART_BASE[0] = c;
-}
-
-/*
- * This does not append a newline
- */
-static void puts(const char *s)
-{
-	while (*s) {
-		putc(*s);
-		if (*s == '\n')
-			putc('\r');
-		s++;
-	}
-}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-#define arch_decomp_wdog()
--- diff/include/asm-arm/arch-adifcc/vmalloc.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-adifcc/vmalloc.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-/*
- * linux/include/asm-arm/arch-adifcc/vmalloc.h
- */
-
-/*
- * Just any arbitrary offset to the start of the vmalloc VM area: the
- * current 8MB value just means that there will be a 8MB "hole" after the
- * physical memory until the kernel virtual memory starts.  That means that
- * any out-of-bounds memory accesses will hopefully be caught.
- * The vmalloc() routines leaves a hole of 4kB between each vmalloced
- * area for the same reason. ;)
- */
-#define VMALLOC_OFFSET	  (8*1024*1024)
-#define VMALLOC_START	  (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
-#define VMALLOC_END       (0xe8000000)
--- diff/include/asm-arm/arch-cl7500/time.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/arch-cl7500/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-/*
- * linux/include/asm-arm/arch-cl7500/time.h
- *
- * Copyright (c) 1996-2000 Russell King.
- *
- * Changelog:
- *  24-Sep-1996	RMK	Created
- *  10-Oct-1996	RMK	Brought up to date with arch-sa110eval
- *  04-Dec-1997	RMK	Updated for new arch/arm/time.c
- */
-
-extern void ioctime_init(void);
-
-static irqreturn_t
-timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	do_timer(regs);
-	do_set_rtc();
-	do_profile(regs);
-
-	{
-		/* Twinkle the lights. */
-		static int count, state = 0xff00;
-		if (count-- == 0) {
-			state ^= 0x100;
-			count = 25;
-			*((volatile unsigned int *)LED_ADDRESS) = state;
-		}
-	}
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt.
- */
-void __init time_init(void)
-{
-	ioctime_init();
-
-	timer_irq.handler = timer_interrupt;
-
-	setup_irq(IRQ_TIMER, &timer_irq);
-}
--- diff/include/asm-arm/arch-ebsa110/time.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-ebsa110/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,118 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-ebsa110/time.h
- *
- *  Copyright (C) 1996,1997,1998 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * No real time clock on the evalulation board!
- *
- * Changelog:
- *  10-Oct-1996	RMK	Created
- *  04-Dec-1997	RMK	Updated for new arch/arm/kernel/time.c
- *  07-Aug-1998	RMK	Updated for arch/arm/kernel/leds.c
- *  28-Dec-1998	APH	Made leds code optional
- */
-
-#include <asm/leds.h>
-#include <asm/io.h>
-
-extern unsigned long (*gettimeoffset)(void);
-
-#define PIT_CTRL		(PIT_BASE + 0x0d)
-#define PIT_T2			(PIT_BASE + 0x09)
-#define PIT_T1			(PIT_BASE + 0x05)
-#define PIT_T0			(PIT_BASE + 0x01)
-
-/*
- * This is the rate at which your MCLK signal toggles (in Hz)
- * This was measured on a 10 digit frequency counter sampling
- * over 1 second.
- */
-#define MCLK	47894000
-
-/*
- * This is the rate at which the PIT timers get clocked
- */
-#define CLKBY7	(MCLK / 7)
-
-/*
- * This is the counter value.  We tick at 200Hz on this platform.
- */
-#define COUNT	((CLKBY7 + (HZ / 2)) / HZ)
-
-/*
- * Get the time offset from the system PIT.  Note that if we have missed an
- * interrupt, then the PIT counter will roll over (ie, be negative).
- * This actually works out to be convenient.
- */
-static unsigned long ebsa110_gettimeoffset(void)
-{
-	unsigned long offset, count;
-
-	__raw_writeb(0x40, PIT_CTRL);
-	count = __raw_readb(PIT_T1);
-	count |= __raw_readb(PIT_T1) << 8;
-
-	/*
-	 * If count > COUNT, make the number negative.
-	 */
-	if (count > COUNT)
-		count |= 0xffff0000;
-
-	offset = COUNT;
-	offset -= count;
-
-	/*
-	 * `offset' is in units of timer counts.  Convert
-	 * offset to units of microseconds.
-	 */
-	offset = offset * (1000000 / HZ) / COUNT;
-
-	return offset;
-}
-
-static irqreturn_t
-timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	u32 count;
-
-	/* latch and read timer 1 */
-	__raw_writeb(0x40, PIT_CTRL);
-	count = __raw_readb(PIT_T1);
-	count |= __raw_readb(PIT_T1) << 8;
-
-	count += COUNT;
-
-	__raw_writeb(count & 0xff, PIT_T1);
-	__raw_writeb(count >> 8, PIT_T1);
-
-	do_leds();
-	do_timer(regs);
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt.
- */
-void __init time_init(void)
-{
-	/*
-	 * Timer 1, mode 2, LSB/MSB
-	 */
-	__raw_writeb(0x70, PIT_CTRL);
-	__raw_writeb(COUNT & 0xff, PIT_T1);
-	__raw_writeb(COUNT >> 8, PIT_T1);
-
-	gettimeoffset = ebsa110_gettimeoffset;
-
-	timer_irq.handler = timer_interrupt;
-
-	setup_irq(IRQ_EBSA110_TIMER0, &timer_irq);
-}
-
-
--- diff/include/asm-arm/arch-ebsa285/time.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-ebsa285/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,287 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-ebsa285/time.h
- *
- *  Copyright (C) 1998 Russell King.
- *  Copyright (C) 1998 Phil Blundell
- *
- * CATS has a real-time clock, though the evaluation board doesn't.
- *
- * Changelog:
- *  21-Mar-1998	RMK	Created
- *  27-Aug-1998	PJB	CATS support
- *  28-Dec-1998	APH	Made leds optional
- *  20-Jan-1999	RMK	Started merge of EBSA285, CATS and NetWinder
- *  16-Mar-1999	RMK	More support for EBSA285-like machines with RTCs in
- */
-
-#define RTC_PORT(x)		(rtc_base+(x))
-#define RTC_ALWAYS_BCD		0
-
-#include <linux/mc146818rtc.h>
-#include <linux/bcd.h>
-
-#include <asm/hardware/dec21285.h>
-#include <asm/leds.h>
-#include <asm/mach-types.h>
-
-static int rtc_base;
-
-#define mSEC_10_from_14 ((14318180 + 100) / 200)
-
-static unsigned long isa_gettimeoffset(void)
-{
-	int count;
-
-	static int count_p = (mSEC_10_from_14/6);    /* for the first call after boot */
-	static unsigned long jiffies_p = 0;
-
-	/*
-	 * cache volatile jiffies temporarily; we have IRQs turned off. 
-	 */
-	unsigned long jiffies_t;
-
-	/* timer count may underflow right here */
-	outb_p(0x00, 0x43);	/* latch the count ASAP */
-
-	count = inb_p(0x40);	/* read the latched count */
-
-	/*
-	 * We do this guaranteed double memory access instead of a _p 
-	 * postfix in the previous port access. Wheee, hackady hack
-	 */
- 	jiffies_t = jiffies;
-
-	count |= inb_p(0x40) << 8;
-
-	/* Detect timer underflows.  If we haven't had a timer tick since 
-	   the last time we were called, and time is apparently going
-	   backwards, the counter must have wrapped during this routine. */
-	if ((jiffies_t == jiffies_p) && (count > count_p))
-		count -= (mSEC_10_from_14/6);
-	else
-		jiffies_p = jiffies_t;
-
-	count_p = count;
-
-	count = (((mSEC_10_from_14/6)-1) - count) * (tick_nsec / 1000);
-	count = (count + (mSEC_10_from_14/6)/2) / (mSEC_10_from_14/6);
-
-	return count;
-}
-
-static irqreturn_t
-isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	if (machine_is_netwinder())
-		do_leds();
-
-	do_timer(regs);
-	do_set_rtc();
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-static unsigned long __init get_isa_cmos_time(void)
-{
-	unsigned int year, mon, day, hour, min, sec;
-	int i;
-
-	// check to see if the RTC makes sense.....
-	if ((CMOS_READ(RTC_VALID) & RTC_VRT) == 0)
-		return mktime(1970, 1, 1, 0, 0, 0);
-
-	/* The Linux interpretation of the CMOS clock register contents:
-	 * When the Update-In-Progress (UIP) flag goes from 1 to 0, the
-	 * RTC registers show the second which has precisely just started.
-	 * Let's hope other operating systems interpret the RTC the same way.
-	 */
-	/* read RTC exactly on falling edge of update flag */
-	for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */
-		if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)
-			break;
-
-	for (i = 0 ; i < 1000000 ; i++) /* must try at least 2.228 ms */
-		if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP))
-			break;
-
-	do { /* Isn't this overkill ? UIP above should guarantee consistency */
-		sec  = CMOS_READ(RTC_SECONDS);
-		min  = CMOS_READ(RTC_MINUTES);
-		hour = CMOS_READ(RTC_HOURS);
-		day  = CMOS_READ(RTC_DAY_OF_MONTH);
-		mon  = CMOS_READ(RTC_MONTH);
-		year = CMOS_READ(RTC_YEAR);
-	} while (sec != CMOS_READ(RTC_SECONDS));
-
-	if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
-		BCD_TO_BIN(sec);
-		BCD_TO_BIN(min);
-		BCD_TO_BIN(hour);
-		BCD_TO_BIN(day);
-		BCD_TO_BIN(mon);
-		BCD_TO_BIN(year);
-	}
-	if ((year += 1900) < 1970)
-		year += 100;
-	return mktime(year, mon, day, hour, min, sec);
-}
-
-static int
-set_isa_cmos_time(void)
-{
-	int retval = 0;
-	int real_seconds, real_minutes, cmos_minutes;
-	unsigned char save_control, save_freq_select;
-	unsigned long nowtime = xtime.tv_sec;
-
-	save_control = CMOS_READ(RTC_CONTROL); /* tell the clock it's being set */
-	CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
-
-	save_freq_select = CMOS_READ(RTC_FREQ_SELECT); /* stop and reset prescaler */
-	CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
-
-	cmos_minutes = CMOS_READ(RTC_MINUTES);
-	if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
-		BCD_TO_BIN(cmos_minutes);
-
-	/*
-	 * since we're only adjusting minutes and seconds,
-	 * don't interfere with hour overflow. This avoids
-	 * messing with unknown time zones but requires your
-	 * RTC not to be off by more than 15 minutes
-	 */
-	real_seconds = nowtime % 60;
-	real_minutes = nowtime / 60;
-	if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1)
-		real_minutes += 30;		/* correct for half hour time zone */
-	real_minutes %= 60;
-
-	if (abs(real_minutes - cmos_minutes) < 30) {
-		if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
-			BIN_TO_BCD(real_seconds);
-			BIN_TO_BCD(real_minutes);
-		}
-		CMOS_WRITE(real_seconds,RTC_SECONDS);
-		CMOS_WRITE(real_minutes,RTC_MINUTES);
-	} else
-		retval = -1;
-
-	/* The following flags have to be released exactly in this order,
-	 * otherwise the DS12887 (popular MC146818A clone with integrated
-	 * battery and quartz) will not reset the oscillator and will not
-	 * update precisely 500 ms later. You won't find this mentioned in
-	 * the Dallas Semiconductor data sheets, but who believes data
-	 * sheets anyway ...                           -- Markus Kuhn
-	 */
-	CMOS_WRITE(save_control, RTC_CONTROL);
-	CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
-
-	return retval;
-}
-
-
-static unsigned long timer1_latch;
-
-static unsigned long timer1_gettimeoffset (void)
-{
-	unsigned long value = timer1_latch - *CSR_TIMER1_VALUE;
-
-	return ((tick_nsec / 1000) * value) / timer1_latch;
-}
-
-static irqreturn_t
-timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	*CSR_TIMER1_CLR = 0;
-
-	/* Do the LEDs things */
-	do_leds();
-	do_timer(regs);
-	do_set_rtc();
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt.
- */
-void __init time_init(void)
-{
-	int irq;
-
-	if (machine_is_co285() ||
-	    machine_is_personal_server())
-		/*
-		 * Add-in 21285s shouldn't access the RTC
-		 */
-		rtc_base = 0;
-	else
-		rtc_base = 0x70;
-
-	if (rtc_base) {
-		int reg_d, reg_b;
-
-		/*
-		 * Probe for the RTC.
-		 */
-		reg_d = CMOS_READ(RTC_REG_D);
-
-		/*
-		 * make sure the divider is set
-		 */
-		CMOS_WRITE(RTC_REF_CLCK_32KHZ, RTC_REG_A);
-
-		/*
-		 * Set control reg B
-		 *   (24 hour mode, update enabled)
-		 */
-		reg_b = CMOS_READ(RTC_REG_B) & 0x7f;
-		reg_b |= 2;
-		CMOS_WRITE(reg_b, RTC_REG_B);
-
-		if ((CMOS_READ(RTC_REG_A) & 0x7f) == RTC_REF_CLCK_32KHZ &&
-		    CMOS_READ(RTC_REG_B) == reg_b) {
-			struct timespec tv;
-
-			/*
-			 * We have a RTC.  Check the battery
-			 */
-			if ((reg_d & 0x80) == 0)
-				printk(KERN_WARNING "RTC: *** warning: CMOS battery bad\n");
-
-			tv.tv_nsec = 0;
-			tv.tv_sec = get_isa_cmos_time();
-			do_settimeofday(&tv);
-			set_rtc = set_isa_cmos_time;
-		} else
-			rtc_base = 0;
-	}
-
-	if (machine_is_ebsa285() ||
-	    machine_is_co285() ||
-	    machine_is_personal_server()) {
-		gettimeoffset = timer1_gettimeoffset;
-
-		timer1_latch = (mem_fclk_21285 + 8 * HZ) / (16 * HZ);
-
-		*CSR_TIMER1_CLR  = 0;
-		*CSR_TIMER1_LOAD = timer1_latch;
-		*CSR_TIMER1_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_AUTORELOAD | TIMER_CNTL_DIV16;
-
-		timer_irq.handler = timer1_interrupt;
-		irq = IRQ_TIMER1;
-	} else {
-		/* enable PIT timer */
-		/* set for periodic (4) and LSB/MSB write (0x30) */
-		outb(0x34, 0x43);
-		outb((mSEC_10_from_14/6) & 0xFF, 0x40);
-		outb((mSEC_10_from_14/6) >> 8, 0x40);
-
-		gettimeoffset = isa_gettimeoffset;
-		timer_irq.handler = isa_timer_interrupt;
-		irq = IRQ_ISA_TIMER;
-	}
-	setup_irq(irq, &timer_irq);
-}
--- diff/include/asm-arm/arch-epxa10db/time.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-epxa10db/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,60 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-epxa10db/time.h
- *
- *  Copyright (C) 2001 Altera Corporation
- * 
- * 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 <asm/system.h>
-#include <asm/leds.h>
-#include <asm/arch/hardware.h>
-#define TIMER00_TYPE (volatile unsigned int*)
-#include <asm/arch/timer00.h>
-
-
-/*
- * IRQ handler for the timer
- */
-static irqreturn_t
-excalibur_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-
-	// ...clear the interrupt
-	*TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))|=TIMER0_CR_CI_MSK;
-
-	do_leds();
-	do_timer(regs);
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt, and return the current time in seconds.
- */
-void __init time_init(void)
-{
-	timer_irq.handler = excalibur_timer_interrupt;
-
-	/* 
-	 * Make irqs happen for the system timer
-	 */
-	setup_irq(IRQ_TIMER0, &timer_irq);
-
-	/* Start the timer */
-	*TIMER0_LIMIT(IO_ADDRESS(EXC_TIMER00_BASE))=(unsigned int)(EXC_AHB2_CLK_FREQUENCY/200);
-	*TIMER0_PRESCALE(IO_ADDRESS(EXC_TIMER00_BASE))=1;
-	*TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))=TIMER0_CR_IE_MSK | TIMER0_CR_S_MSK;
-}
--- diff/include/asm-arm/arch-iop3xx/time.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-iop3xx/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-/*
- * linux/include/asm-arm/arch-iop80310/time.h
- *
- * Author:  Nicolas Pitre
- * Copyright:   (C) 2001 MontaVista Software Inc.
- *
- * 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.
- *
- */
-
--- diff/include/asm-arm/arch-ixp4xx/time.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-ixp4xx/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-/*
- * linux/include/asm-arm/arch-ixp4xx/time.h
- *
- * We implement timer code in arch/arm/mach-ixp4xx/time.c
- *
- */
-
--- diff/include/asm-arm/arch-lh7a40x/time.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-lh7a40x/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,53 +0,0 @@
-/* include/asm-arm/arch-lh7a40x/time.h
- *
- *  Copyright (C) 2004 Logic Product Development
- *
- *  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.
- *
- */
-
-#if HZ < 100
-# define TIMER_CONTROL	TIMER_CONTROL1
-# define TIMER_LOAD	TIMER_LOAD1
-# define TIMER_CONSTANT	(508469/HZ)
-# define TIMER_MODE	(TIMER_C_ENABLE | TIMER_C_PERIODIC | TIMER_C_508KHZ)
-# define TIMER_EOI	TIMER_EOI1
-# define TIMER_IRQ	IRQ_T1UI
-#else
-# define TIMER_CONTROL	TIMER_CONTROL3
-# define TIMER_LOAD	TIMER_LOAD3
-# define TIMER_CONSTANT	(3686400/HZ)
-# define TIMER_MODE	(TIMER_C_ENABLE | TIMER_C_PERIODIC)
-# define TIMER_EOI	TIMER_EOI3
-# define TIMER_IRQ	IRQ_T3UI
-#endif
-
-static irqreturn_t
-lh7a40x_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	TIMER_EOI = 0;
-	do_profile (regs);
-	do_leds();
-	do_set_rtc();
-	do_timer (regs);
-
-	return IRQ_HANDLED;
-}
-
-void __init time_init(void)
-{
-				/* Stop/disable all timers */
-	TIMER_CONTROL1 = 0;
-	TIMER_CONTROL2 = 0;
-	TIMER_CONTROL3 = 0;
-
-	timer_irq.handler = lh7a40x_timer_interrupt;
-	timer_irq.flags |= SA_INTERRUPT;
-	setup_irq (TIMER_IRQ, &timer_irq);
-
-	TIMER_LOAD = TIMER_CONSTANT;
-	TIMER_CONTROL = TIMER_MODE;
-}
-
--- diff/include/asm-arm/arch-nexuspci/dma.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/dma.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/dma.h
- *
- * Architecture DMA routines
- *
- * Copyright (C) 1998, 1999 Philip Blundell
- */
-
-/*
- * 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 is the maximum DMA address that can be DMAd to.
- */
-#define MAX_DMA_ADDRESS		0xffffffff
-#define MAX_DMA_CHANNELS	0
--- diff/include/asm-arm/arch-nexuspci/hardware.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/hardware.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,76 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/hardware.h
- *
- * Copyright (C) 1998, 1999, 2000 FutureTV Labs Ltd.
- *
- * This file contains the hardware definitions of the FTV PCI card.
- */
-
-/*
- * 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.
- */
-
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-/*    Logical    Physical
- * 0xffe00000	0x20000000	INTCONT
- * 0xffd00000	0x30000000	Status
- * 0xffc00000	0x60000000	PLX registers
- * 0xfe000000	0xC0000000	PCI I/O
- * 0xfd000000	0x70000000	cache flush
- * 0xfc000000	0x80000000	PCI/ISA memory
- * 0xe0000000	0x10000000	SCC2691 DUART
- */
-
-/*
- * Mapping areas
- */
-#define INTCONT_BASE		0xffe00000
-#define STATUS_BASE		0xffd00000
-#define PLX_BASE		0xffc00000
-#define PCIO_BASE		0xfe000000
-#define FLUSH_BASE		0xfd000000
-#define DUART_BASE		0xe0000000
-#define PCIMEM_BASE		0xfc000000
-
-#define PLX_IO_START		0xC0000000
-#define PLX_MEM_START		0x80000000
-#define PLX_START		0x60000000
-#define STATUS_START		0x30000000
-#define INTCONT_START		0x20000000
-#define DUART_START		0x10000000
-
-/*
- * RAM definitions
- */
-#define RAM_BASE		0x40000000
-#define FLUSH_BASE_PHYS		0x70000000
-
-/*
- * Miscellaneous INTCONT bits
- */
-#define INTCONT_FIQ_PLX		0x00
-#define INTCONT_FIQ_D		0x02
-#define INTCONT_FIQ_C		0x04
-#define INTCONT_FIQ_B		0x06
-#define INTCONT_FIQ_A		0x08
-#define INTCONT_FIQ_SYSERR	0x0a
-#define INTCONT_IRQ_DUART	0x0c
-#define INTCONT_IRQ_PLX		0x0e
-#define INTCONT_IRQ_D		0x10
-#define INTCONT_IRQ_C		0x12
-#define INTCONT_IRQ_B		0x14
-#define INTCONT_IRQ_A		0x16
-#define INTCONT_IRQ_SYSERR	0x1e
-
-#define INTCONT_WATCHDOG	0x18
-#define INTCONT_LED		0x1a
-#define INTCONT_PCI_RESET	0x1c
-
-#define UNCACHEABLE_ADDR	STATUS_BASE
-
-#endif
--- diff/include/asm-arm/arch-nexuspci/io.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/io.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,58 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/io.h
- *
- * Copyright (C) 1997-1999 Russell King
- * Copyright (C) 2000 FutureTV Labs Ltd.
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffff
-
-/*
- * Translation of various region addresses to virtual addresses
- */
-#define __io(a)			(PCIO_BASE + (a))
-#if 1
-#define __mem_pci(a)		((unsigned long)(a))
-#define __mem_isa(a)		(PCIMEM_BASE + (unsigned long)(a))
-#else
-
-static inline unsigned long ___mem_pci(unsigned long a)
-{
-	/* PCI addresses must have been ioremapped */
-	if (a <= 0xc0000000 || a >= 0xe0000000)
-		*((int *)0) = 0;
-	return a;
-}
-
-static inline unsigned long ___mem_isa(unsigned long a)
-{
-	BUG_ON(a >= 16*1048576);
-	return PCIMEM_BASE + a;
-}
-#define __mem_pci(a)		___mem_pci((unsigned long)(a))
-#define __mem_isa(a)		___mem_isa((unsigned long)(a))
-#endif
-
-/*
- * ioremap support - validate a PCI memory address,
- * and convert a PCI memory address to a physical
- * address for the page tables.
- */
-#define iomem_valid_addr(iomem,sz)	\
-	((iomem) < 0x80000000 && (iomem) + (sz) <= 0x80000000)
-#define iomem_to_phys(iomem)	((iomem) + PLX_MEM_START)
-
-#define __arch_ioremap(off,sz,nocache)				\
- ({								\
-	unsigned long _off = (off), _size = (sz);		\
-	void *_ret = (void *)0;					\
-	if (iomem_valid_addr(_off, _size))			\
-		_ret = __ioremap(iomem_to_phys(_off),_size,0);	\
-	_ret;							\
- })
-
-#define __arch_iounmap __iounmap
-
-#endif
--- diff/include/asm-arm/arch-nexuspci/irqs.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/irqs.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/irqs.h
- *
- * Copyright (C) 1997, 1998, 2000 Philip Blundell
- */
-
-/*
- * 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.
- */
-
-/*
- * The hardware is capable of routing any interrupt source (except the
- * DUART) to either IRQ or FIQ.  We ignore FIQ and use IRQ exclusively
- * for simplicity.  
- */
-
-#define IRQ_DUART		0
-#define IRQ_PLX 		1
-#define IRQ_PCI_D		2
-#define IRQ_PCI_C		3
-#define IRQ_PCI_B		4
-#define IRQ_PCI_A	        5
-#define IRQ_SYSERR		6	/* only from IOSLAVE rev B */
-
-#define FIRST_IRQ		IRQ_DUART
-#define LAST_IRQ		IRQ_SYSERR
-
-/* timer is part of the DUART */
-#define IRQ_TIMER		IRQ_DUART
-
-#define irq_canonicalize(i)	(i)
--- diff/include/asm-arm/arch-nexuspci/memory.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/memory.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/memory.h
- *
- * Copyright (c) 1997, 1998, 2000 FutureTV Labs Ltd.
- * Copyright (c) 1999 Russell King
- *
- */
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-/*
- * Physical DRAM offset.
- */
-#define PHYS_OFFSET	(0x40000000UL)
-#define BUS_OFFSET	(0xe0000000UL)
-
-/*
- * On the PCI bus the DRAM appears at address 0xe0000000
- */
-#define __virt_to_bus(x) ((unsigned long)(x) - PAGE_OFFSET + BUS_OFFSET)
-#define __bus_to_virt(x) ((unsigned long)(x) + PAGE_OFFSET - BUS_OFFSET)
-
-#endif
--- diff/include/asm-arm/arch-nexuspci/param.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/param.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-nexuspci/param.h
- */
--- diff/include/asm-arm/arch-nexuspci/system.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/system.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/system.h
- *
- * Copyright (c) 1996, 97, 98, 99, 2000 FutureTV Labs Ltd.
- */
-
-/*
- * 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.
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-	cpu_do_idle();
-}
-
-#define arch_reset(mode)	do { } while (0)
-
-#endif
--- diff/include/asm-arm/arch-nexuspci/time.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,62 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/time.h
- *
- * Copyright (c) 1997, 1998, 1999, 2000 FutureTV Labs Ltd.
- *
- * The FTV PCI card has no real-time clock.  We get timer ticks from the
- * SCC chip.
- */
-
-/*
- * 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.
- */
-
-static irqreturn_t
-timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	static int count = 25;
-	unsigned char stat = __raw_readb(DUART_BASE + 0x14);
-	if (!(stat & 0x10))
-		return;		/* Not for us */
-
-	/* Reset counter */
-	__raw_writeb(0x90, DUART_BASE + 8);
-
-	if (--count == 0) {
-		static int state = 1;
-		state ^= 1;
-		__raw_writeb(0x1a + state, INTCONT_BASE);
-		__raw_writeb(0x18 + state, INTCONT_BASE);
-		count = 50;
-	}
-
-	/* Wait for slow rise time */
-	__raw_readb(DUART_BASE + 0x14);
-	__raw_readb(DUART_BASE + 0x14);
-	__raw_readb(DUART_BASE + 0x14);
-	__raw_readb(DUART_BASE + 0x14);
-	__raw_readb(DUART_BASE + 0x14);
-	__raw_readb(DUART_BASE + 0x14);
-
-	do_timer(regs);
-
-	return IRQ_HANDLED;
-}
-
-void __init time_init(void)
-{
-	int tick = 3686400 / 16 / 2 / 100;
-
-	__raw_writeb(tick & 0xff, DUART_BASE + 0x1c);
-	__raw_writeb(tick >> 8, DUART_BASE + 0x18);
-	__raw_writeb(0x80, DUART_BASE + 8);
-	__raw_writeb(0x10, DUART_BASE + 0x14);
-
-	timer_irq.handler = timer_interrupt;
-	timer_irq.flags = SA_SHIRQ;
-
-	setup_irq(IRQ_TIMER, &timer_irq);
-}
--- diff/include/asm-arm/arch-nexuspci/timex.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/timex.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/timex.h
- *
- * NexusPCI StrongARM card timex specifications
- *
- * Copyright (C) 1998 Philip Blundell
- */
-
--- diff/include/asm-arm/arch-nexuspci/uncompress.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/uncompress.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,66 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/uncompress.h
- *
- * Copyright (C) 1998, 1999, 2000 Philip Blundell
- */
-
-/*
- * 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.
- */
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-
-/*
- * Write a character to the UART
- */
-void _ll_write_char(char c)
-{
-	while (!(__raw_readb(DUART_START + 0x4) & 0x4))
-		;
-	__raw_writeb(c, DUART_START + 0xc);
-}
-
-/*
- * This does not append a newline
- */
-static void puts(const char *s)
-{
-	while (*s) {
-		if (*s == '\n')
-			_ll_write_char('\r');
-		_ll_write_char(*(s++));
-	}
-}
-
-/*
- * Set up for decompression
- */
-static void arch_decomp_setup(void)
-{
-	/* LED off */
-	__raw_writel(INTCONT_LED, INTCONT_START);
-
-	/* Set up SCC */
-	__raw_writeb(42, DUART_START + 8);
-	__raw_writeb(48, DUART_START + 8);
-	__raw_writeb(16, DUART_START + 8);
-	__raw_writeb(0x93, DUART_START);
-	__raw_writeb(0x17, DUART_START);
-	__raw_writeb(0xbb, DUART_START + 4);
-	__raw_writeb(0x78, DUART_START + 16);
-	__raw_writeb(0xa0, DUART_START + 8);
-	__raw_writeb(5, DUART_START + 8);
-}
-
-/*
- * Stroke the watchdog so we don't get reset during decompression.
- */
-static inline void arch_decomp_wdog(void)
-{
-	__raw_writel(INTCONT_WATCHDOG, INTCONT_START);
-	__raw_writel(INTCONT_WATCHDOG | 1, INTCONT_START);
-}
--- diff/include/asm-arm/arch-nexuspci/vmalloc.h	2004-05-19 22:12:35.000000000 +0100
+++ source/include/asm-arm/arch-nexuspci/vmalloc.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/vmalloc.h
- */
-
-/*
- * Just any arbitrary offset to the start of the vmalloc VM area: the
- * current 8MB value just means that there will be a 8MB "hole" after the
- * physical memory until the kernel virtual memory starts.  That means that
- * any out-of-bounds memory accesses will hopefully be caught.
- * The vmalloc() routines leaves a hole of 4kB between each vmalloced
- * area for the same reason. ;)
- */
-#define VMALLOC_OFFSET	  (8*1024*1024)
-#define VMALLOC_START	  (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
-#define VMALLOC_END       (PAGE_OFFSET + 0x20000000)
--- diff/include/asm-arm/arch-omap/time.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-omap/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,212 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/time.h
- *
- * 32kHz timer definition
- *
- * Copyright (C) 2000 RidgeRun, Inc.
- * Author: Greg Lonnon <glonnon@ridgerun.com>
- *
- * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the  GNU General Public License along
- * with this program; if not, write  to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#if !defined(__ASM_ARCH_OMAP_TIME_H)
-#define __ASM_ARCH_OMAP_TIME_H
-
-#include <linux/config.h>
-#include <linux/delay.h>
-#include <asm/system.h>
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/leds.h>
-#include <asm/irq.h>
-#include <asm/mach/irq.h>
-#include <asm/arch/clocks.h>
-
-#ifndef __instrument
-#define __instrument
-#define __noinstrument __attribute__ ((no_instrument_function))
-#endif
-
-typedef struct {
-	u32 cntl;     /* CNTL_TIMER, R/W */
-	u32 load_tim; /* LOAD_TIM,   W */
-	u32 read_tim; /* READ_TIM,   R */
-} mputimer_regs_t;
-
-#define mputimer_base(n) \
-    ((volatile mputimer_regs_t*)IO_ADDRESS(OMAP_MPUTIMER_BASE + \
-				 (n)*OMAP_MPUTIMER_OFFSET))
-
-static inline unsigned long timer32k_read(int reg) {
-	unsigned long val;
-	val = omap_readw(reg + OMAP_32kHz_TIMER_BASE);
-	return val;
-}
-static inline void timer32k_write(int reg,int val) {
-	omap_writew(val, reg + OMAP_32kHz_TIMER_BASE);
-}
-
-/*
- * How long is the timer interval? 100 HZ, right...
- * IRQ rate = (TVR + 1) / 32768 seconds
- * TVR = 32768 * IRQ_RATE -1
- * IRQ_RATE =  1/100
- * TVR = 326
- */
-#define TIMER32k_PERIOD 326
-//#define TIMER32k_PERIOD 0x7ff
-
-static inline void start_timer32k(void) {
-	timer32k_write(TIMER32k_CR,
-		       TIMER32k_TSS | TIMER32k_TRB |
-		       TIMER32k_INT | TIMER32k_ARL);
-}
-
-#ifdef CONFIG_MACH_OMAP_PERSEUS2
-/*
- * After programming PTV with 0 and setting the MPUTIM_CLOCK_ENABLE
- * (external clock enable)  bit, the timer count rate is 6.5 MHz (13
- * MHZ input/2). !! The divider by 2 is undocumented !!
- */
-#define MPUTICKS_PER_SEC (13000000/2)
-#else
-/*
- * After programming PTV with 0, the timer count rate is 6 MHz.
- * WARNING! this must be an even number, or machinecycles_to_usecs
- * below will break.
- */
-#define MPUTICKS_PER_SEC  (12000000/2)
-#endif
-
-static int mputimer_started[3] = {0,0,0};
-
-static inline void __noinstrument start_mputimer(int n,
-						 unsigned long load_val)
-{
-	volatile mputimer_regs_t* timer = mputimer_base(n);
-
-	mputimer_started[n] = 0;
-	timer->cntl = MPUTIM_CLOCK_ENABLE;
-	udelay(1);
-
-	timer->load_tim = load_val;
-        udelay(1);
-	timer->cntl = (MPUTIM_CLOCK_ENABLE | MPUTIM_AR | MPUTIM_ST);
-	mputimer_started[n] = 1;
-}
-
-static inline unsigned long __noinstrument
-read_mputimer(int n)
-{
-	volatile mputimer_regs_t* timer = mputimer_base(n);
-	return (mputimer_started[n] ? timer->read_tim : 0);
-}
-
-void __noinstrument start_mputimer1(unsigned long load_val)
-{
-	start_mputimer(0, load_val);
-}
-void __noinstrument start_mputimer2(unsigned long load_val)
-{
-	start_mputimer(1, load_val);
-}
-void __noinstrument start_mputimer3(unsigned long load_val)
-{
-	start_mputimer(2, load_val);
-}
-
-unsigned long __noinstrument read_mputimer1(void)
-{
-	return read_mputimer(0);
-}
-unsigned long __noinstrument read_mputimer2(void)
-{
-	return read_mputimer(1);
-}
-unsigned long __noinstrument read_mputimer3(void)
-{
-	return read_mputimer(2);
-}
-
-unsigned long __noinstrument do_getmachinecycles(void)
-{
-	return 0 - read_mputimer(0);
-}
-
-unsigned long __noinstrument machinecycles_to_usecs(unsigned long mputicks)
-{
-	/* Round up to nearest usec */
-	return ((mputicks * 1000) / (MPUTICKS_PER_SEC / 2 / 1000) + 1) >> 1;
-}
-
-/*
- * This marks the time of the last system timer interrupt
- * that was *processed by the ISR* (timer 2).
- */
-static unsigned long systimer_mark;
-
-static unsigned long omap1510_gettimeoffset(void)
-{
-	/* Return elapsed usecs since last system timer ISR */
-	return machinecycles_to_usecs(do_getmachinecycles() - systimer_mark);
-}
-
-static irqreturn_t
-omap1510_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	unsigned long now, ilatency;
-
-	/*
-	 * Mark the time at which the timer interrupt ocurred using
-	 * timer1. We need to remove interrupt latency, which we can
-	 * retrieve from the current system timer2 counter. Both the
-	 * offset timer1 and the system timer2 are counting at 6MHz,
-	 * so we're ok.
-	 */
-	now = 0 - read_mputimer1();
-	ilatency = MPUTICKS_PER_SEC / 100 - read_mputimer2();
-	systimer_mark = now - ilatency;
-
-	do_leds();
-	do_timer(regs);
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-void __init time_init(void)
-{
-	/* Since we don't call request_irq, we must init the structure */
-	gettimeoffset = omap1510_gettimeoffset;
-
-	timer_irq.handler = omap1510_timer_interrupt;
-	timer_irq.flags = SA_INTERRUPT;
-#ifdef OMAP1510_USE_32KHZ_TIMER
-	timer32k_write(TIMER32k_CR, 0x0);
-	timer32k_write(TIMER32k_TVR,TIMER32k_PERIOD);
-	setup_irq(INT_OS_32kHz_TIMER, &timer_irq);
-	start_timer32k();
-#else
-	setup_irq(INT_TIMER2, &timer_irq);
-	start_mputimer2(MPUTICKS_PER_SEC / 100 - 1);
-#endif
-}
-
-#endif
--- diff/include/asm-arm/arch-pxa/time.h	2004-05-19 22:12:36.000000000 +0100
+++ source/include/asm-arm/arch-pxa/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,105 +0,0 @@
-/*
- * linux/include/asm-arm/arch-pxa/time.h
- *
- * Author:	Nicolas Pitre
- * Created:	Jun 15, 2001
- * Copyright:	MontaVista Software Inc.
- *
- * 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.
- */
-
-
-static inline unsigned long pxa_get_rtc_time(void)
-{
-	return RCNR;
-}
-
-static int pxa_set_rtc(void)
-{
-	unsigned long current_time = xtime.tv_sec;
-
-	if (RTSR & RTSR_ALE) {
-		/* make sure not to forward the clock over an alarm */
-		unsigned long alarm = RTAR;
-		if (current_time >= alarm && alarm >= RCNR)
-			return -ERESTARTSYS;
-	}
-	RCNR = current_time;
-	return 0;
-}
-
-/* IRQs are disabled before entering here from do_gettimeofday() */
-static unsigned long pxa_gettimeoffset (void)
-{
-	long ticks_to_match, elapsed, usec;
-
-	/* Get ticks before next timer match */
-	ticks_to_match = OSMR0 - OSCR;
-
-	/* We need elapsed ticks since last match */
-	elapsed = LATCH - ticks_to_match;
-
-	/* don't get fooled by the workaround in pxa_timer_interrupt() */
-	if (elapsed <= 0)
-		return 0;
-
-	/* Now convert them to usec */
-	usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH;
-
-	return usec;
-}
-
-static irqreturn_t
-pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	int next_match;
-
-	do_profile(regs);
-
-	/* Loop until we get ahead of the free running timer.
-	 * This ensures an exact clock tick count and time accuracy.
-	 * IRQs are disabled inside the loop to ensure coherence between
-	 * lost_ticks (updated in do_timer()) and the match reg value, so we
-	 * can use do_gettimeofday() from interrupt handlers.
-	 *
-	 * HACK ALERT: it seems that the PXA timer regs aren't updated right
-	 * away in all cases when a write occurs.  We therefore compare with
-	 * 8 instead of 0 in the while() condition below to avoid missing a
-	 * match if OSCR has already reached the next OSMR value.
-	 * Experience has shown that up to 6 ticks are needed to work around
-	 * this problem, but let's use 8 to be conservative.  Note that this
-	 * affect things only when the timer IRQ has been delayed by nearly
-	 * exactly one tick period which should be a pretty rare event.
-	 */
-	do {
-		do_leds();
-		do_set_rtc();
-		do_timer(regs);
-		OSSR = OSSR_M0;  /* Clear match on timer 0 */
-		next_match = (OSMR0 += LATCH);
-	} while( (signed long)(next_match - OSCR) <= 8 );
-
-	return IRQ_HANDLED;
-}
-
-void __init time_init(void)
-{
-	struct timespec tv;
-
-	gettimeoffset = pxa_gettimeoffset;
-	set_rtc = pxa_set_rtc;
-
-	tv.tv_nsec = 0;
-	tv.tv_sec = pxa_get_rtc_time();
-	do_settimeofday(&tv);
-
-	timer_irq.handler = pxa_timer_interrupt;
-	OSMR0 = 0;		/* set initial match at 0 */
-	OSSR = 0xf;		/* clear status on all timers */
-	setup_irq(IRQ_OST0, &timer_irq);
-	OIER |= OIER_E0;	/* enable match on timer 0 to cause interrupts */
-	OSCR = 0;		/* initialize free-running timer, force first match */
-}
-
--- diff/include/asm-arm/arch-rpc/time.h	2004-05-19 22:12:36.000000000 +0100
+++ source/include/asm-arm/arch-rpc/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,37 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-rpc/time.h
- *
- *  Copyright (C) 1996-2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Changelog:
- *   24-Sep-1996 RMK	Created
- *   10-Oct-1996 RMK	Brought up to date with arch-sa110eval
- *   04-Dec-1997 RMK	Updated for new arch/arm/time.c
- */
-extern void ioctime_init(void);
-
-static irqreturn_t
-timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	do_timer(regs);
-	do_set_rtc();
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt.
- */
-void __init time_init(void)
-{
-	ioctime_init();
-
-	timer_irq.handler = timer_interrupt;
-
-	setup_irq(IRQ_TIMER, &timer_irq);
-}
--- diff/include/asm-arm/arch-s3c2410/time.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-s3c2410/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,173 +0,0 @@
-/* linux/include/asm-arm/arch-s3c2410/time.h
- *
- *  Copyright (C) 2003 Simtec Electronics <linux@simtec.co.uk>
- *    Ben Dooks, <ben@simtec.co.uk>
- *
- * 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 <asm/system.h>
-#include <asm/leds.h>
-#include <asm/mach-types.h>
-
-#include <asm/io.h>
-#include <asm/arch/map.h>
-#include <asm/arch/regs-timer.h>
-
-extern unsigned long (*gettimeoffset)(void);
-
-static unsigned long timer_startval;
-static unsigned long timer_ticks_usec;
-
-#ifdef CONFIG_S3C2410_RTC
-extern void s3c2410_rtc_check();
-#endif
-
-/* with an 12MHz clock, we get 12 ticks per-usec
- */
-
-
-/***
- * Returns microsecond  since last clock interrupt.  Note that interrupts
- * will have been disabled by do_gettimeoffset()
- * IRQs are disabled before entering here from do_gettimeofday()
- */
-static unsigned long s3c2410_gettimeoffset (void)
-{
-	unsigned long tdone;
-	unsigned long usec;
-
-	/* work out how many ticks have gone since last timer interrupt */
-
-	tdone = timer_startval - __raw_readl(S3C2410_TCNTO(4));
-
-	/* currently, tcnt is in 12MHz units, but this may change
-	 * for non-bast machines...
-	 */
-
-	usec = tdone / timer_ticks_usec;
-
-	return usec;
-}
-
-
-/*
- * IRQ handler for the timer
- */
-static irqreturn_t
-s3c2410_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	do_leds();
-	do_timer(regs);
-
-	do_set_rtc();
-	//s3c2410_rtc_check();
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt, and return the current time in seconds.
- */
-
-/* currently we only use timer4, as it is the only timer which has no
- * other function that can be exploited externally
-*/
-
-void __init time_init (void)
-{
-	unsigned long tcon;
-	unsigned long tcnt;
-	unsigned long tcfg1;
-	unsigned long tcfg0;
-
-	gettimeoffset = s3c2410_gettimeoffset;
-	timer_irq.handler = s3c2410_timer_interrupt;
-
-	tcnt = 0xffff;  /* default value for tcnt */
-
-	/* read the current timer configuration bits */
-
-	tcon = __raw_readl(S3C2410_TCON);
-	tcfg1 = __raw_readl(S3C2410_TCFG1);
-	tcfg0 = __raw_readl(S3C2410_TCFG0);
-
-	/* configure the system for whichever machine is in use */
-
-	if (machine_is_bast() || machine_is_vr1000()) {
-		timer_ticks_usec = 12;	      /* timer is at 12MHz */
-		tcnt = (timer_ticks_usec * (1000*1000)) / HZ;
-	}
-
-	/* for the h1940, we use the pclk from the core to generate
-	 * the timer values. since 67.5MHz is not a value we can directly
-	 * generate the timer value from, we need to pre-scale and
-	 * divied before using it.
-	 *
-	 * overall divsior to get 200Hz is 337500
-	 *   we can fit tcnt if we pre-scale by 6, producing a tick rate
-	 *   of 11.25MHz, and a tcnt of 56250.
-	 */
-
-	if (machine_is_h1940() || machine_is_smdk2410() ) {
-		timer_ticks_usec = s3c2410_pclk / (1000*1000);
-		timer_ticks_usec /= 6;
-
-		tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK;
-		tcfg1 |= S3C2410_TCFG1_MUX4_DIV2;
-
-		tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK;
-		tcfg0 |= ((6 - 1) / 2) << S3C2410_TCFG_PRESCALER1_SHIFT;
-
-		tcnt = (s3c2410_pclk / 6) / HZ;
-	}
-
-
-	printk("setup_timer tcon=%08lx, tcnt %04lx, tcfg %08lx,%08lx\n",
-	       tcon, tcnt, tcfg0, tcfg1);
-
-	/* check to see if timer is within 16bit range... */
-	if (tcnt > 0xffff) {
-		panic("setup_timer: HZ is too small, cannot configure timer!");
-		return;
-	}
-
-	__raw_writel(tcfg1, S3C2410_TCFG1);
-	__raw_writel(tcfg0, S3C2410_TCFG0);
-
-	timer_startval = tcnt;
-	__raw_writel(tcnt, S3C2410_TCNTB(4));
-
-	/* ensure timer is stopped... */
-
-	tcon &= ~(7<<20);
-	tcon |= S3C2410_TCON_T4RELOAD;
-	tcon |= S3C2410_TCON_T4MANUALUPD;
-
-	__raw_writel(tcon, S3C2410_TCON);
-	__raw_writel(tcnt, S3C2410_TCNTB(4));
-	__raw_writel(tcnt, S3C2410_TCMPB(4));
-
-	setup_irq(IRQ_TIMER4, &timer_irq);
-
-	/* start the timer running */
-	tcon |= S3C2410_TCON_T4START;
-	tcon &= ~S3C2410_TCON_T4MANUALUPD;
-	__raw_writel(tcon, S3C2410_TCON);
-}
-
-
-
--- diff/include/asm-arm/arch-sa1100/time.h	2004-05-19 22:12:36.000000000 +0100
+++ source/include/asm-arm/arch-sa1100/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,111 +0,0 @@
-/*
- * linux/include/asm-arm/arch-sa1100/time.h
- *
- * Copyright (C) 1998 Deborah Wallach.
- * Twiddles  (C) 1999 	Hugo Fiennes <hugo@empeg.com>
- * 
- * 2000/03/29 (C) Nicolas Pitre <nico@cam.org>
- *	Rewritten: big cleanup, much simpler, better HZ accuracy.
- *
- */
-
-
-#define RTC_DEF_DIVIDER		(32768 - 1)
-#define RTC_DEF_TRIM            0
-
-static unsigned long __init sa1100_get_rtc_time(void)
-{
-	/*
-	 * According to the manual we should be able to let RTTR be zero
-	 * and then a default diviser for a 32.768KHz clock is used.
-	 * Apparently this doesn't work, at least for my SA1110 rev 5.
-	 * If the clock divider is uninitialized then reset it to the
-	 * default value to get the 1Hz clock.
-	 */
-	if (RTTR == 0) {
-		RTTR = RTC_DEF_DIVIDER + (RTC_DEF_TRIM << 16);
-		printk(KERN_WARNING "Warning: uninitialized Real Time Clock\n");
-		/* The current RTC value probably doesn't make sense either */
-		RCNR = 0;
-		return 0;
-	}
-	return RCNR;
-}
-
-static int sa1100_set_rtc(void)
-{
-	unsigned long current_time = xtime.tv_sec;
-
-	if (RTSR & RTSR_ALE) {
-		/* make sure not to forward the clock over an alarm */
-		unsigned long alarm = RTAR;
-		if (current_time >= alarm && alarm >= RCNR)
-			return -ERESTARTSYS;
-	}
-	RCNR = current_time;
-	return 0;
-}
-
-/* IRQs are disabled before entering here from do_gettimeofday() */
-static unsigned long sa1100_gettimeoffset (void)
-{
-	unsigned long ticks_to_match, elapsed, usec;
-
-	/* Get ticks before next timer match */
-	ticks_to_match = OSMR0 - OSCR;
-
-	/* We need elapsed ticks since last match */
-	elapsed = LATCH - ticks_to_match;
-
-	/* Now convert them to usec */
-	usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH;
-
-	return usec;
-}
-
-/*
- * We will be entered with IRQs enabled.
- *
- * Loop until we get ahead of the free running timer.
- * This ensures an exact clock tick count and time accuracy.
- * IRQs are disabled inside the loop to ensure coherence between
- * lost_ticks (updated in do_timer()) and the match reg value, so we
- * can use do_gettimeofday() from interrupt handlers.
- */
-static irqreturn_t
-sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	unsigned int next_match;
-
-	do {
-		do_leds();
-		do_timer(regs);
-		OSSR = OSSR_M0;  /* Clear match on timer 0 */
-		next_match = (OSMR0 += LATCH);
-		do_set_rtc();
-	} while ((signed long)(next_match - OSCR) <= 0);
-
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-void __init time_init(void)
-{
-	struct timespec tv;
-
-	gettimeoffset = sa1100_gettimeoffset;
-	set_rtc = sa1100_set_rtc;
-
-	tv.tv_nsec = 0;
-	tv.tv_sec = sa1100_get_rtc_time();
-	do_settimeofday(&tv);
-
-	timer_irq.handler = sa1100_timer_interrupt;
-	OSMR0 = 0;		/* set initial match at 0 */
-	OSSR = 0xf;		/* clear status on all timers */
-	setup_irq(IRQ_OST0, &timer_irq);
-	OIER |= OIER_E0;	/* enable match on timer 0 to cause interrupts */
-	OSCR = 0;		/* initialize free-running timer, force first match */
-}
-
--- diff/include/asm-arm/arch-shark/time.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-shark/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-/*
- * linux/include/asm-arm/arch-shark/time.h
- *
- * by Alexander Schulz
- *
- * derived from include/asm-arm/arch-ebsa110/time.h
- * Copyright (c) 1996,1997,1998 Russell King.
- */
-
-#include <asm/leds.h>
-#include <asm/param.h>
-
-#define IRQ_TIMER 0
-#define HZ_TIME ((1193180 + HZ/2) / HZ)
-
-static irqreturn_t
-timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	do_leds();
-	do_timer(regs);
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt, and return the current time in seconds.
- */
-void __init time_init(void)
-{
-        unsigned long flags;
-
-	outb(0x34, 0x43);               /* binary, mode 0, LSB/MSB, Ch 0 */
-	outb(HZ_TIME & 0xff, 0x40);     /* LSB of count */
-	outb(HZ_TIME >> 8, 0x40);
-
-	timer_irq.handler = timer_interrupt;
-	setup_irq(IRQ_TIMER, &timer_irq);
-}
--- diff/include/asm-arm/arch-tbox/dma.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/dma.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,37 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/dma.h
- *
- * Architecture DMA routines.  We have to contend with the bizarre DMA
- * machine built into the Tbox hardware.
- *
- * Copyright (C) 1998 Philip Blundell
- */
-
-/*
- * 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.
- */
-
-/*
- * DMA channel definitions.  Some of these are physically strange but
- * we sort it out inside dma.c so the user never has to care.  The
- * exception is the double-buffering which we can't really abstract
- * away sensibly.
- */
-#define DMA_VIDEO			0
-#define DMA_MPEG_B			1
-#define DMA_AUDIO_B			2
-#define DMA_ASHRX_B			3
-#define DMA_ASHTX			4
-#define DMA_MPEG			5
-#define DMA_AUDIO			6
-#define DMA_ASHRX			7
-
-#define MAX_DMA_CHANNELS		0	/* XXX */
-
-/*
- * This is the maximum DMA address that can be DMAd to.
- */
-#define MAX_DMA_ADDRESS		0xffffffff
--- diff/include/asm-arm/arch-tbox/hardware.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/hardware.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,60 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/hardware.h
- *
- * Copyright (C) 1998, 1999, 2000 Philip Blundell
- * Copyright (C) 2000 FutureTV Labs Ltd
- *
- * This file contains the hardware definitions of the Tbox
- */
-
-/*
- * 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.
- */
-
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-/*    Logical    Physical
- * 0xfff00000	0x00100000	I/O
- * 0xfff00000	0x00100000	  Expansion CS0
- * 0xfff10000	0x00110000	  DMA
- * 0xfff20000	0x00120000	  C-Cube
- * 0xfff30000	0x00130000	  FPGA 1
- * 0xfff40000	0x00140000	  UART 2
- * 0xfff50000	0x00150000	  UART 1
- * 0xfff60000	0x00160000	  CS8900
- * 0xfff70000	0x00170000	  INTCONT
- * 0xfff80000	0x00180000	  RAMDAC
- * 0xfff90000	0x00190000	  Control 0
- * 0xfffa0000	0x001a0000	  Control 1
- * 0xfffb0000	0x001b0000	  Control 2
- * 0xfffc0000	0x001c0000	  FPGA 2
- * 0xfffd0000	0x001d0000	  INTRESET
- * 0xfffe0000	0x001e0000	  C-Cube DMA throttle
- * 0xffff0000	0x001f0000	  Expansion CS1
- * 0xffe00000	0x82000000	cache flush
- */
-
-/*
- * Mapping areas
- */
-#define IO_BASE			0xfff00000
-#define IO_START		0x00100000
-#define FLUSH_BASE		0xffe00000
-
-#define INTCONT			0xfff70000
-
-#define FPGA1CONT		0xffff3000
-
-/*
- * RAM definitions
- */
-#define RAM_BASE		0x80000000
-#define FLUSH_BASE_PHYS		0x82000000
-
-#define UNCACHEABLE_ADDR	INTCONT
-
-#endif
--- diff/include/asm-arm/arch-tbox/io.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/io.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/io.h
- *
- * Copyright (C) 1996-1999 Russell King
- * Copyright (C) 1998, 1999 Philip Blundell
- *
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(_x)		((_x) << 2)
-
-/*
- * Generic virtual read/write
- */
-static inline unsigned int __arch_getw(unsigned long a)
-{
-	unsigned int value;
-	__asm__ __volatile__("ldr%?h	%0, [%1, #0]	@ getw"
-		: "=&r" (value)
-		: "r" (a));
-	return value;
-}
-
-static inline void __arch_putw(unsigned int value, unsigned long a)
-{
-	__asm__ __volatile__("str%?h	%0, [%1, #0]	@ putw"
-		: : "r" (value), "r" (a));
-}
-
-/* Idem, for devices on the upper byte lanes */
-#define inb_u(p)		__arch_getb(__io_pc(p) + 2)
-#define inw_u(p)		__arch_getw(__io_pc(p) + 2)
-
-#define outb_u(v,p)		__arch_putb(v,__io_pc(p) + 2)
-#define outw_u(v,p)		__arch_putw(v,__io_pc(p) + 2)
-
-#endif
--- diff/include/asm-arm/arch-tbox/irqs.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/irqs.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/irqs.h
- *
- * Copyright (C) 1998, 2000 Philip Blundell
- */
-
-/*
- * 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.
- */
-
-#define IRQ_MPEGDMA		0
-#define IRQ_ASHTX		1
-#define IRQ_ASHRX		2
-#define IRQ_VSYNC		3
-#define IRQ_HSYNC		4
-#define IRQ_MPEG		5
-#define IRQ_UART2		6
-#define IRQ_UART1		7
-#define IRQ_ETHERNET		8
-#define IRQ_TIMER		9
-#define IRQ_AUDIODMA		10
-/* bit 11 used for video field ident */
-#define IRQ_EXPMODCS0		12
-#define IRQ_EXPMODCS1		13
-
-#define irq_canonicalize(i)	(i)
--- diff/include/asm-arm/arch-tbox/memory.h	2004-06-30 14:25:58.000000000 +0100
+++ source/include/asm-arm/arch-tbox/memory.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/memory.h
- *
- * Copyright (c) 1996-1999 Russell King.
- * Copyright (c) 1998-1999 Phil Blundell
- */
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-/*
- * Physical DRAM offset.
- */
-#define PHYS_OFFSET		(0x80000000UL)
-
-/*
- * Bus view is the same as physical view
- */
-#define __virt_to_bus(x)	__virt_to_phys(x)
-#define __bus_to_virt(x)	__phys_to_virt(x)
-
-#endif
--- diff/include/asm-arm/arch-tbox/param.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/param.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-tbox/param.h
- */
-#define __KERNEL_HZ 1000
--- diff/include/asm-arm/arch-tbox/serial.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/serial.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/serial.h
- *
- * Copyright (c) 1996 Russell King.
- * Copyright (c) 1998 Phil Blundell
- *
- * Changelog:
- *  15-10-1996	RMK	Created
- *  09-06-1998  PJB	tbox version
- */
-#ifndef __ASM_ARCH_SERIAL_H
-#define __ASM_ARCH_SERIAL_H
-
-/*
- * This assumes you have a 1.8432 MHz clock for your UART.
- *
- * It'd be nice if someone built a serial card with a 24.576 MHz
- * clock, since the 16550A is capable of handling a top speed of 1.5
- * megabits/second; but this requires the faster clock.
- */
-#define BASE_BAUD (1843200 / 16)
-
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
-
-     /* UART CLK        PORT  IRQ     FLAGS        */
-#define STD_SERIAL_PORT_DEFNS \
-	{ 0, BASE_BAUD, 0xffff4000 >> 2, 6, STD_COM_FLAGS }, /* ttyS0 */ \
-	{ 0, BASE_BAUD, 0xffff5000 >> 2, 7, STD_COM_FLAGS }, /* ttyS1 */
-
-#define EXTRA_SERIAL_PORT_DEFNS
-
-#endif
--- diff/include/asm-arm/arch-tbox/system.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/system.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/system.h
- *
- * Copyright (c) 1996-1999 Russell King.
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-	cpu_do_idle();
-}
-
-#define arch_reset(mode)	do { } while (0)
-
-#endif
--- diff/include/asm-arm/arch-tbox/time.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/time.h
- *
- * Copyright (c) 1997, 1999 Phil Blundell.
- * Copyright (c) 2000 FutureTV Labs Ltd
- *
- * Tbox has no real-time clock -- we get millisecond ticks to update
- * our soft copy.
- */
-
-/*
- * 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.
- */
-
-#include <asm/io.h>
-#include <asm/hardware.h>
-
-#define update_rtc()
-
-static irqreturn_t
-timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
-{
-	/* Clear irq */
-	__raw_writel(1, FPGA1CONT + 0xc); 
-	__raw_writel(0, FPGA1CONT + 0xc);
-
-	do_timer(regs);
-
-	return IRQ_HANDLED;
-}
-
-void __init time_init(void)
-{
-	timer_irq.handler = timer_interrupt;
-	setup_irq(IRQ_TIMER, &timer_irq);
-}
--- diff/include/asm-arm/arch-tbox/timex.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/timex.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/timex.h
- *
- * Tbox timex specifications
- *
- * Copyright (C) 1999 Philip Blundell
- */
-
--- diff/include/asm-arm/arch-tbox/uncompress.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/uncompress.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-/*
- * linux/include/asm-arm/arch-nexuspci/uncompress.h
- *  from linux/include/asm-arm/arch-ebsa110/uncompress.h
- *
- * Copyright (C) 1996,1997,1998 Russell King
- * Copyright (C) 1998, 1999 Phil Blundell
- */
-
-#include <asm/io.h>
-
-#define UARTBASE 0x00400000
-
-/*
- * This does not append a newline
- */
-static void puts(const char *s)
-{
-  while (*s)
-  {
-    char c = *(s++);
-    while (!(__raw_readb(UARTBASE + 0x14) & 0x20));
-    __raw_writeb(c, UARTBASE);
-    if (c == 10) {
-      while (!(__raw_readb(UARTBASE + 0x14) & 0x20));
-      __raw_writeb(13, UARTBASE);
-    }
-  }
-}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-
-/*
- * Stroke the watchdog so we don't get reset during decompression.
- */
-#define arch_decomp_wdog()				\
-	do {						\
-	__raw_writel(1, 0xa00000);			\
-	__raw_writel(0, 0xa00000);			\
-	} while (0)
--- diff/include/asm-arm/arch-tbox/vmalloc.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-tbox/vmalloc.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-/*
- * linux/include/asm-arm/arch-tbox/vmalloc.h
- */
-
-/*
- * Just any arbitrary offset to the start of the vmalloc VM area: the
- * current 8MB value just means that there will be a 8MB "hole" after the
- * physical memory until the kernel virtual memory starts.  That means that
- * any out-of-bounds memory accesses will hopefully be caught.
- * The vmalloc() routines leaves a hole of 4kB between each vmalloced
- * area for the same reason. ;)
- */
-#define VMALLOC_OFFSET	  (8*1024*1024)
-#define VMALLOC_START	  (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
-#define VMALLOC_END       (PAGE_OFFSET + 0x10000000)
--- diff/include/asm-arm/arch-versatile/time.h	2004-05-19 22:12:37.000000000 +0100
+++ source/include/asm-arm/arch-versatile/time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,158 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-versatile/time.h
- *
- * 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 <asm/system.h>
-#include <asm/leds.h>
-
-/*
- * Where is the timer (VA)?
- */
-#define TIMER0_VA_BASE		 IO_ADDRESS(VERSATILE_TIMER0_1_BASE)
-#define TIMER1_VA_BASE		(IO_ADDRESS(VERSATILE_TIMER0_1_BASE) + 0x20)
-#define TIMER2_VA_BASE		 IO_ADDRESS(VERSATILE_TIMER2_3_BASE)
-#define TIMER3_VA_BASE		(IO_ADDRESS(VERSATILE_TIMER2_3_BASE) + 0x20)
-#define VA_IC_BASE		 IO_ADDRESS(VERSATILE_VIC_BASE) 
-
-/*
- * How long is the timer interval?
- */
-#define TIMER_INTERVAL	(TICKS_PER_uSEC * mSEC_10)
-#if TIMER_INTERVAL >= 0x100000
-#define TIMER_RELOAD	(TIMER_INTERVAL >> 8)		/* Divide by 256 */
-#define TIMER_CTRL	0x88				/* Enable, Clock / 256 */
-#define TICKS2USECS(x)	(256 * (x) / TICKS_PER_uSEC)
-#elif TIMER_INTERVAL >= 0x10000
-#define TIMER_RELOAD	(TIMER_INTERVAL >> 4)		/* Divide by 16 */
-#define TIMER_CTRL	0x84				/* Enable, Clock / 16 */
-#define TICKS2USECS(x)	(16 * (x) / TICKS_PER_uSEC)
-#else
-#define TIMER_RELOAD	(TIMER_INTERVAL)
-#define TIMER_CTRL	0x80				/* Enable */
-#define TICKS2USECS(x)	((x) / TICKS_PER_uSEC)
-#endif
-
-#define TIMER_CTRL_IE	(1 << 5)	/* Interrupt Enable */
-
-/*
- * What does it look like?
- */
-typedef struct TimerStruct {
-	unsigned long TimerLoad;
-	unsigned long TimerValue;
-	unsigned long TimerControl;
-	unsigned long TimerClear;
-} TimerStruct_t;
-
-extern unsigned long (*gettimeoffset)(void);
-
-/*
- * Returns number of ms since last clock interrupt.  Note that interrupts
- * will have been disabled by do_gettimeoffset()
- */
-static unsigned long versatile_gettimeoffset(void)
-{
-	volatile TimerStruct_t *timer0 = (TimerStruct_t *)TIMER0_VA_BASE;
-	unsigned long ticks1, ticks2, status;
-
-	/*
-	 * Get the current number of ticks.  Note that there is a race
-	 * condition between us reading the timer and checking for
-	 * an interrupt.  We get around this by ensuring that the
-	 * counter has not reloaded between our two reads.
-	 */
-	ticks2 = timer0->TimerValue & 0xffff;
-	do {
-		ticks1 = ticks2;
-		status = __raw_readl(VA_IC_BASE + VIC_IRQ_RAW_STATUS);
-		ticks2 = timer0->TimerValue & 0xffff;
-	} while (ticks2 > ticks1);
-
-	/*
-	 * Number of ticks since last interrupt.
-	 */
-	ticks1 = TIMER_RELOAD - ticks2;
-
-	/*
-	 * Interrupt pending?  If so, we've reloaded once already.
-	 *
-	 * FIXME: Need to check this is effectively timer 0 that expires
-	 */
-	if (status & IRQMASK_TIMERINT0_1)
-		ticks1 += TIMER_RELOAD;
-
-	/*
-	 * Convert the ticks to usecs
-	 */
-	return TICKS2USECS(ticks1);
-}
-
-/*
- * IRQ handler for the timer
- */
-static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	volatile TimerStruct_t *timer0 = (volatile TimerStruct_t *)TIMER0_VA_BASE;
-
-	// ...clear the interrupt
-	timer0->TimerClear = 1;
-
-	do_leds();
-	do_timer(regs);
-	do_profile(regs);
-
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt, and return the current time in seconds.
- */
-void __init time_init(void)
-{
-	volatile TimerStruct_t *timer0 = (volatile TimerStruct_t *)TIMER0_VA_BASE;
-	volatile TimerStruct_t *timer1 = (volatile TimerStruct_t *)TIMER1_VA_BASE;
-	volatile TimerStruct_t *timer2 = (volatile TimerStruct_t *)TIMER2_VA_BASE;
-	volatile TimerStruct_t *timer3 = (volatile TimerStruct_t *)TIMER3_VA_BASE;
-
-	/* 
-	 * set clock frequency: 
-	 *	VERSATILE_REFCLK is 32KHz
-	 *	VERSATILE_TIMCLK is 1MHz
-	 */
-	*(volatile unsigned int *)IO_ADDRESS(VERSATILE_SCTL_BASE) |= 
-	  ((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | 
-	   (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel));
-
-	timer_irq.handler = versatile_timer_interrupt;
-
-	/*
-	 * Initialise to a known state (all timers off)
-	 */
-	timer0->TimerControl = 0;
-	timer1->TimerControl = 0;
-	timer2->TimerControl = 0;
-	timer3->TimerControl = 0;
-
-	timer0->TimerLoad    = TIMER_RELOAD;
-	timer0->TimerValue   = TIMER_RELOAD;
-	timer0->TimerControl = TIMER_CTRL | 0x40 | TIMER_CTRL_IE;  /* periodic + IE */
-
-	/* 
-	 * Make irqs happen for the system timer
-	 */
-	setup_irq(IRQ_TIMERINT0_1, &timer_irq);
-	gettimeoffset = versatile_gettimeoffset;
-}
--- diff/include/asm-arm/cpumask.h	2004-05-19 22:12:34.000000000 +0100
+++ source/include/asm-arm/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_ARM_CPUMASK_H
-#define _ASM_ARM_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_ARM_CPUMASK_H */
--- diff/include/asm-arm26/cpumask.h	2004-05-19 22:12:38.000000000 +0100
+++ source/include/asm-arm26/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_ARM26_CPUMASK_H
-#define _ASM_ARM26_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_ARM26_CPUMASK_H */
--- diff/include/asm-cris/cpumask.h	2004-05-19 22:12:38.000000000 +0100
+++ source/include/asm-cris/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_CRIS_CPUMASK_H
-#define _ASM_CRIS_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_CRIS_CPUMASK_H */
--- diff/include/asm-generic/cpumask.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-generic/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-#ifndef __ASM_GENERIC_CPUMASK_H
-#define __ASM_GENERIC_CPUMASK_H
-
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/threads.h>
-#include <linux/types.h>
-#include <linux/bitmap.h>
-
-#if NR_CPUS > BITS_PER_LONG && NR_CPUS != 1
-#define CPU_ARRAY_SIZE		BITS_TO_LONGS(NR_CPUS)
-
-struct cpumask
-{
-	unsigned long mask[CPU_ARRAY_SIZE];
-};
-
-typedef struct cpumask cpumask_t;
-
-#else
-typedef unsigned long cpumask_t;
-#endif
-
-#ifdef CONFIG_SMP
-#if NR_CPUS > BITS_PER_LONG
-#include <asm-generic/cpumask_array.h>
-#else
-#include <asm-generic/cpumask_arith.h>
-#endif
-#else
-#include <asm-generic/cpumask_up.h>
-#endif
-
-#if NR_CPUS <= 4*BITS_PER_LONG
-#include <asm-generic/cpumask_const_value.h>
-#else
-#include <asm-generic/cpumask_const_reference.h>
-#endif
-
-#endif /* __ASM_GENERIC_CPUMASK_H */
--- diff/include/asm-generic/cpumask_arith.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-generic/cpumask_arith.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,49 +0,0 @@
-#ifndef __ASM_GENERIC_CPUMASK_ARITH_H
-#define __ASM_GENERIC_CPUMASK_ARITH_H
-
-/*
- * Arithmetic type -based cpu bitmaps. A single unsigned long is used
- * to contain the whole cpu bitmap.
- */
-
-#define cpu_set(cpu, map)		set_bit(cpu, &(map))
-#define cpu_clear(cpu, map)		clear_bit(cpu, &(map))
-#define cpu_isset(cpu, map)		test_bit(cpu, &(map))
-#define cpu_test_and_set(cpu, map)	test_and_set_bit(cpu, &(map))
-
-#define cpus_and(dst,src1,src2)		do { dst = (src1) & (src2); } while (0)
-#define cpus_or(dst,src1,src2)		do { dst = (src1) | (src2); } while (0)
-#define cpus_clear(map)			do { map = 0; } while (0)
-#define cpus_complement(map)		do { map = ~(map); } while (0)
-#define cpus_equal(map1, map2)		((map1) == (map2))
-#define cpus_empty(map)			((map) == 0)
-#define cpus_addr(map)			(&(map))
-
-#if BITS_PER_LONG == 32
-#define cpus_weight(map)		hweight32(map)
-#elif BITS_PER_LONG == 64
-#define cpus_weight(map)		hweight64(map)
-#endif
-
-#define cpus_shift_right(dst, src, n)	do { dst = (src) >> (n); } while (0)
-#define cpus_shift_left(dst, src, n)	do { dst = (src) << (n); } while (0)
-
-#define any_online_cpu(map)			\
-({						\
-	cpumask_t __tmp__;			\
-	cpus_and(__tmp__, map, cpu_online_map);	\
-	__tmp__ ? first_cpu(__tmp__) : NR_CPUS;	\
-})
-
-#define CPU_MASK_ALL	(~((cpumask_t)0) >> (8*sizeof(cpumask_t) - NR_CPUS))
-#define CPU_MASK_NONE	((cpumask_t)0)
-
-/* only ever use this for things that are _never_ used on large boxen */
-#define cpus_coerce(map)		((unsigned long)(map))
-#define cpus_promote(map)		({ map; })
-#define cpumask_of_cpu(cpu)		({ ((cpumask_t)1) << (cpu); })
-
-#define first_cpu(map)			find_first_bit(&(map), NR_CPUS)
-#define next_cpu(cpu, map)		find_next_bit(&(map), NR_CPUS, cpu + 1)
-
-#endif /* __ASM_GENERIC_CPUMASK_ARITH_H */
--- diff/include/asm-generic/cpumask_array.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-generic/cpumask_array.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,54 +0,0 @@
-#ifndef __ASM_GENERIC_CPUMASK_ARRAY_H
-#define __ASM_GENERIC_CPUMASK_ARRAY_H
-
-/*
- * Array-based cpu bitmaps. An array of unsigned longs is used to contain
- * the bitmap, and then contained in a structure so it may be passed by
- * value.
- */
-
-#define CPU_ARRAY_SIZE		BITS_TO_LONGS(NR_CPUS)
-
-#define cpu_set(cpu, map)		set_bit(cpu, (map).mask)
-#define cpu_clear(cpu, map)		clear_bit(cpu, (map).mask)
-#define cpu_isset(cpu, map)		test_bit(cpu, (map).mask)
-#define cpu_test_and_set(cpu, map)	test_and_set_bit(cpu, (map).mask)
-
-#define cpus_and(dst,src1,src2)	bitmap_and((dst).mask,(src1).mask, (src2).mask, NR_CPUS)
-#define cpus_or(dst,src1,src2)	bitmap_or((dst).mask, (src1).mask, (src2).mask, NR_CPUS)
-#define cpus_clear(map)		bitmap_zero((map).mask, NR_CPUS)
-#define cpus_complement(map)	bitmap_complement((map).mask, NR_CPUS)
-#define cpus_equal(map1, map2)	bitmap_equal((map1).mask, (map2).mask, NR_CPUS)
-#define cpus_empty(map)		bitmap_empty(map.mask, NR_CPUS)
-#define cpus_addr(map)		((map).mask)
-#define cpus_weight(map)		bitmap_weight((map).mask, NR_CPUS)
-#define cpus_shift_right(d, s, n)	bitmap_shift_right((d).mask, (s).mask, n, NR_CPUS)
-#define cpus_shift_left(d, s, n)	bitmap_shift_left((d).mask, (s).mask, n, NR_CPUS)
-#define first_cpu(map)		find_first_bit((map).mask, NR_CPUS)
-#define next_cpu(cpu, map)	find_next_bit((map).mask, NR_CPUS, cpu + 1)
-
-/* only ever use this for things that are _never_ used on large boxen */
-#define cpus_coerce(map)	((map).mask[0])
-#define cpus_promote(map)	({ cpumask_t __cpu_mask = CPU_MASK_NONE;\
-					__cpu_mask.mask[0] = map;	\
-					__cpu_mask;			\
-				})
-#define cpumask_of_cpu(cpu)	({ cpumask_t __cpu_mask = CPU_MASK_NONE;\
-					cpu_set(cpu, __cpu_mask);	\
-					__cpu_mask;			\
-				})
-#define any_online_cpu(map)			\
-({						\
-	cpumask_t __tmp__;			\
-	cpus_and(__tmp__, map, cpu_online_map);	\
-	find_first_bit(__tmp__.mask, NR_CPUS);	\
-})
-
-
-/*
- * um, these need to be usable as static initializers
- */
-#define CPU_MASK_ALL	((cpumask_t) { {[0 ... CPU_ARRAY_SIZE-1] = ~0UL} })
-#define CPU_MASK_NONE	((cpumask_t) { {[0 ... CPU_ARRAY_SIZE-1] =  0UL} })
-
-#endif /* __ASM_GENERIC_CPUMASK_ARRAY_H */
--- diff/include/asm-generic/cpumask_const_reference.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-generic/cpumask_const_reference.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-#ifndef __ASM_GENERIC_CPUMASK_CONST_REFERENCE_H
-#define __ASM_GENERIC_CPUMASK_CONST_REFERENCE_H
-
-struct cpumask_ref {
-	const cpumask_t *val;
-};
-
-typedef const struct cpumask_ref cpumask_const_t;
-
-#define mk_cpumask_const(map)		((cpumask_const_t){ &(map) })
-#define cpu_isset_const(cpu, map)	cpu_isset(cpu, *(map).val)
-
-#define cpus_and_const(dst,src1,src2)	cpus_and(dst,*(src1).val,*(src2).val)
-#define cpus_or_const(dst,src1,src2)	cpus_or(dst,*(src1).val,*(src2).val)
-
-#define cpus_equal_const(map1, map2)	cpus_equal(*(map1).val, *(map2).val)
-
-#define cpus_copy_const(map1, map2)	bitmap_copy((map1).mask, (map2).val->mask, NR_CPUS)
-
-#define cpus_empty_const(map)		cpus_empty(*(map).val)
-#define cpus_weight_const(map)		cpus_weight(*(map).val)
-#define first_cpu_const(map)		first_cpu(*(map).val)
-#define next_cpu_const(cpu, map)	next_cpu(cpu, *(map).val)
-
-/* only ever use this for things that are _never_ used on large boxen */
-#define cpus_coerce_const(map)		cpus_coerce(*(map).val)
-#define any_online_cpu_const(map)	any_online_cpu(*(map).val)
-
-#endif /* __ASM_GENERIC_CPUMASK_CONST_REFERENCE_H */
--- diff/include/asm-generic/cpumask_const_value.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-generic/cpumask_const_value.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-#ifndef __ASM_GENERIC_CPUMASK_CONST_VALUE_H
-#define __ASM_GENERIC_CPUMASK_CONST_VALUE_H
-
-typedef const cpumask_t cpumask_const_t;
-
-#define mk_cpumask_const(map)		(map)
-#define cpu_isset_const(cpu, map)	cpu_isset(cpu, map)
-#define cpus_and_const(dst,src1,src2)	cpus_and(dst, src1, src2)
-#define cpus_or_const(dst,src1,src2)	cpus_or(dst, src1, src2)
-#define cpus_equal_const(map1, map2)	cpus_equal(map1, map2)
-#define cpus_empty_const(map)		cpus_empty(map)
-#define cpus_copy_const(map1, map2)	do { map1 = (cpumask_t)map2; } while (0)
-#define cpus_weight_const(map)		cpus_weight(map)
-#define first_cpu_const(map)		first_cpu(map)
-#define next_cpu_const(cpu, map)	next_cpu(cpu, map)
-
-/* only ever use this for things that are _never_ used on large boxen */
-#define cpus_coerce_const(map)		cpus_coerce(map)
-#define any_online_cpu_const(map)	any_online_cpu(map)
-
-#endif /* __ASM_GENERIC_CPUMASK_CONST_VALUE_H */
--- diff/include/asm-generic/cpumask_up.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-generic/cpumask_up.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,59 +0,0 @@
-#ifndef __ASM_GENERIC_CPUMASK_UP_H
-#define __ASM_GENERIC_CPUMASK_UP_H
-
-#define cpus_coerce(map)	(map)
-
-#define cpu_set(cpu, map)		do { (void)(cpu); cpus_coerce(map) = 1UL; } while (0)
-#define cpu_clear(cpu, map)		do { (void)(cpu); cpus_coerce(map) = 0UL; } while (0)
-#define cpu_isset(cpu, map)		((void)(cpu), cpus_coerce(map) != 0UL)
-#define cpu_test_and_set(cpu, map)	((void)(cpu), test_and_set_bit(0, &(map)))
-
-#define cpus_and(dst, src1, src2)					\
-	do {								\
-		if (cpus_coerce(src1) && cpus_coerce(src2))		\
-			cpus_coerce(dst) = 1UL;				\
-		else							\
-			cpus_coerce(dst) = 0UL;				\
-	} while (0)
-
-#define cpus_or(dst, src1, src2)					\
-	do {								\
-		if (cpus_coerce(src1) || cpus_coerce(src2))		\
-			cpus_coerce(dst) = 1UL;				\
-		else							\
-			cpus_coerce(dst) = 0UL;				\
-	} while (0)
-
-#define cpus_clear(map)			do { cpus_coerce(map) = 0UL; } while (0)
-
-#define cpus_complement(map)						\
-	do {								\
-		cpus_coerce(map) = !cpus_coerce(map);			\
-	} while (0)
-
-#define cpus_equal(map1, map2)		(cpus_coerce(map1) == cpus_coerce(map2))
-#define cpus_empty(map)			(cpus_coerce(map) == 0UL)
-#define cpus_addr(map)			(&(map))
-#define cpus_weight(map)		(cpus_coerce(map) ? 1UL : 0UL)
-#define cpus_shift_right(d, s, n)	do { cpus_coerce(d) = 0UL; } while (0)
-#define cpus_shift_left(d, s, n)	do { cpus_coerce(d) = 0UL; } while (0)
-#define first_cpu(map)			(cpus_coerce(map) ? 0 : 1)
-#define next_cpu(cpu, map)		1
-
-/* only ever use this for things that are _never_ used on large boxen */
-#define cpus_promote(map)						\
-	({								\
-		cpumask_t __tmp__;					\
-		cpus_coerce(__tmp__) = map;				\
-		__tmp__;						\
-	})
-#define cpumask_of_cpu(cpu)		((void)(cpu), cpus_promote(1))
-#define any_online_cpu(map)		(cpus_coerce(map) ? 0 : 1)
-
-/*
- * um, these need to be usable as static initializers
- */
-#define CPU_MASK_ALL	1UL
-#define CPU_MASK_NONE	0UL
-
-#endif /* __ASM_GENERIC_CPUMASK_UP_H */
--- diff/include/asm-h8300/cpumask.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-h8300/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_H8300_CPUMASK_H
-#define _ASM_H8300_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_H8300_CPUMASK_H */
--- diff/include/asm-h8300/h8300_ne.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-h8300/h8300_ne.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-/****************************************************************************/
-
-/*
- *	h8300_ne.h -- NE2000 in H8/300H Evalution Board.
- *      
- *	(C) Copyright 2002, Yoshinori Sato <ysato@users.sourceforge.jp>
- */
-
-/****************************************************************************/
-#ifndef	h8300ne_h
-#define	h8300ne_h
-/****************************************************************************/
-
-#define H8300_NE_DEFINE
-#include <asm/machine-depend.h>
-#define NE2000_IRQ_VECTOR	(12 + NE2000_IRQ)
-#undef  H8300_NE_DEFINE
-
-/****************************************************************************/
-#endif	/* h8300ne_h */
--- diff/include/asm-h8300/init.h	2004-05-19 22:12:39.000000000 +0100
+++ source/include/asm-h8300/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-#ifndef _H8300_INIT_H
-#define _H8300_INIT_H
-
-#define __init __attribute__ ((__section__ (".text.init")))
-#define __initdata __attribute__ ((__section__ (".data.init")))
-/* For assembly routines */
-#define __INIT		.section	".text.init",#alloc,#execinstr
-#define __FINIT		.previous
-#define __INITDATA	.section	".data.init",#alloc,#write
-
-#endif
--- diff/include/asm-i386/cpumask.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_I386_CPUMASK_H
-#define _ASM_I386_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_I386_CPUMASK_H */
--- diff/include/asm-i386/init.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#error "<asm/init.h> should never be used - use <linux/init.h> instead"
--- diff/include/asm-i386/mach-pc9800/apm.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/apm.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,82 +0,0 @@
-/*
- *  include/asm-i386/mach-pc9800/apm.h
- *
- *  Machine specific APM BIOS functions for NEC PC9800.
- *  Split out from apm.c by Osamu Tomita <tomita@cinet.co.jp>
- */
-
-#ifndef _ASM_APM_H
-#define _ASM_APM_H
-
-#include <linux/apm_bios.h>
-
-#ifdef APM_ZERO_SEGS
-#	define APM_DO_ZERO_SEGS \
-		"pushl %%ds\n\t" \
-		"pushl %%es\n\t" \
-		"xorl %%edx, %%edx\n\t" \
-		"mov %%dx, %%ds\n\t" \
-		"mov %%dx, %%es\n\t" \
-		"mov %%dx, %%fs\n\t" \
-		"mov %%dx, %%gs\n\t"
-#	define APM_DO_POP_SEGS \
-		"popl %%es\n\t" \
-		"popl %%ds\n\t"
-#else
-#	define APM_DO_ZERO_SEGS
-#	define APM_DO_POP_SEGS
-#endif
-
-static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in,
-					u32 *eax, u32 *ebx, u32 *ecx,
-					u32 *edx, u32 *esi)
-{
-	/*
-	 * N.B. We do NOT need a cld after the BIOS call
-	 * because we always save and restore the flags.
-	 */
-	__asm__ __volatile__(APM_DO_ZERO_SEGS
-		"pushl %%edi\n\t"
-		"pushl %%ebp\n\t"
-		"pushfl\n\t"
-		"lcall *%%cs:apm_bios_entry\n\t"
-		"setc %%al\n\t"
-		"popl %%ebp\n\t"
-		"popl %%edi\n\t"
-		APM_DO_POP_SEGS
-		: "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx),
-		  "=S" (*esi)
-		: "a" (func), "b" (ebx_in), "c" (ecx_in)
-		: "memory", "cc");
-}
-
-static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in,
-						u32 ecx_in, u32 *eax)
-{
-	int	cx, dx, si;
-	u8	error;
-
-	/*
-	 * N.B. We do NOT need a cld after the BIOS call
-	 * because we always save and restore the flags.
-	 */
-	__asm__ __volatile__(APM_DO_ZERO_SEGS
-		"pushl %%edi\n\t"
-		"pushl %%ebp\n\t"
-		"pushfl\n\t"
-		"lcall *%%cs:apm_bios_entry\n\t"
-		"setc %%bl\n\t"
-		"popl %%ebp\n\t"
-		"popl %%edi\n\t"
-		APM_DO_POP_SEGS
-		: "=a" (*eax), "=b" (error), "=c" (cx), "=d" (dx),
-		  "=S" (si)
-		: "a" (func), "b" (ebx_in), "c" (ecx_in)
-		: "memory", "cc");
-	if (func == APM_FUNC_VERSION)
-		*eax = (*eax & 0xff00) | ((*eax & 0x00f0) >> 4);
-
-	return error;
-}
-
-#endif /* _ASM_APM_H */
--- diff/include/asm-i386/mach-pc9800/bios_ebda.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/bios_ebda.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-#ifndef _MACH_BIOS_EBDA_H
-#define _MACH_BIOS_EBDA_H
-
-/*
- * PC-9800 has no EBDA.
- * Its BIOS uses 0x40E for other purpose,
- * Not pointer to 4K EBDA area.
- */
-static inline unsigned int get_bios_ebda(void)
-{
-	return 0;	/* 0 means none */
-}
-
-#endif /* _MACH_BIOS_EBDA_H */
--- diff/include/asm-i386/mach-pc9800/do_timer.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/do_timer.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,82 +0,0 @@
-/* defines for inline arch setup functions */
-
-#include <asm/apic.h>
-
-/**
- * do_timer_interrupt_hook - hook into timer tick
- * @regs:	standard registers from interrupt
- *
- * Description:
- *	This hook is called immediately after the timer interrupt is ack'd.
- *	It's primary purpose is to allow architectures that don't possess
- *	individual per CPU clocks (like the CPU APICs supply) to broadcast the
- *	timer interrupt as a means of triggering reschedules etc.
- **/
-
-static inline void do_timer_interrupt_hook(struct pt_regs *regs)
-{
-	do_timer(regs);
-/*
- * In the SMP case we use the local APIC timer interrupt to do the
- * profiling, except when we simulate SMP mode on a uniprocessor
- * system, in that case we have to call the local interrupt handler.
- */
-#ifndef CONFIG_X86_LOCAL_APIC
-	x86_do_profile(regs);
-#else
-	if (!using_apic_timer)
-		smp_local_timer_interrupt(regs);
-#endif
-}
-
-
-/* you can safely undefine this if you don't have the Neptune chipset */
-
-#define BUGGY_NEPTUN_TIMER
-
-/**
- * do_timer_overflow - process a detected timer overflow condition
- * @count:	hardware timer interrupt count on overflow
- *
- * Description:
- *	This call is invoked when the jiffies count has not incremented but
- *	the hardware timer interrupt has.  It means that a timer tick interrupt
- *	came along while the previous one was pending, thus a tick was missed
- **/
-static inline int do_timer_overflow(int count)
-{
-	int i;
-
-	spin_lock(&i8259A_lock);
-	/*
-	 * This is tricky when I/O APICs are used;
-	 * see do_timer_interrupt().
-	 */
-	i = inb(0x00);
-	spin_unlock(&i8259A_lock);
-	
-	/* assumption about timer being IRQ0 */
-	if (i & 0x01) {
-		/*
-		 * We cannot detect lost timer interrupts ... 
-		 * well, that's why we call them lost, don't we? :)
-		 * [hmm, on the Pentium and Alpha we can ... sort of]
-		 */
-		count -= LATCH;
-	} else {
-#ifdef BUGGY_NEPTUN_TIMER
-		/*
-		 * for the Neptun bug we know that the 'latch'
-		 * command doesn't latch the high and low value
-		 * of the counter atomically. Thus we have to 
-		 * substract 256 from the counter 
-		 * ... funny, isnt it? :)
-		 */
-		
-		count -= 256;
-#else
-		printk("do_slow_gettimeoffset(): hardware timer problem?\n");
-#endif
-	}
-	return count;
-}
--- diff/include/asm-i386/mach-pc9800/io_ports.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/io_ports.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-/*
- *  arch/i386/mach-pc9800/io_ports.h
- *
- *  Machine specific IO port address definition for PC-9800.
- *  Written by Osamu Tomita <tomita@cinet.co.jp>
- */
-#ifndef _MACH_IO_PORTS_H
-#define _MACH_IO_PORTS_H
-
-/* i8253A PIT registers */
-#define PIT_MODE		0x77
-#define PIT_CH0			0x71
-#define PIT_CH2			0x75
-
-/* i8259A PIC registers */
-#define PIC_MASTER_CMD		0x00
-#define PIC_MASTER_IMR		0x02
-#define PIC_MASTER_ISR		PIC_MASTER_CMD
-#define PIC_MASTER_POLL		PIC_MASTER_ISR
-#define PIC_MASTER_OCW3		PIC_MASTER_ISR
-#define PIC_SLAVE_CMD		0x08
-#define PIC_SLAVE_IMR		0x0a
-
-/* i8259A PIC related values */
-#define PIC_CASCADE_IR		7
-#define MASTER_ICW4_DEFAULT	0x1d
-#define SLAVE_ICW4_DEFAULT	0x09
-#define PIC_ICW4_AEOI		0x02
-
-#endif /* !_MACH_IO_PORTS_H */
--- diff/include/asm-i386/mach-pc9800/irq_vectors.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/irq_vectors.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,99 +0,0 @@
-/*
- * This file should contain #defines for all of the interrupt vector
- * numbers used by this architecture.
- *
- * In addition, there are some standard defines:
- *
- *	FIRST_EXTERNAL_VECTOR:
- *		The first free place for external interrupts
- *
- *	SYSCALL_VECTOR:
- *		The IRQ vector a syscall makes the user to kernel transition
- *		under.
- *
- *	TIMER_IRQ:
- *		The IRQ number the timer interrupt comes in at.
- *
- *	NR_IRQS:
- *		The total number of interrupt vectors (including all the
- *		architecture specific interrupts) needed.
- *
- *	NR_IRQ_VECTORS:
- *		The total number of IO APIC vector inputs
- *
- */			
-#ifndef _ASM_IRQ_VECTORS_H
-#define _ASM_IRQ_VECTORS_H
-
-/*
- * IDT vectors usable for external interrupt sources start
- * at 0x20:
- */
-#define FIRST_EXTERNAL_VECTOR	0x20
-
-#define SYSCALL_VECTOR		0x80
-
-/*
- * Vectors 0x20-0x2f are used for ISA interrupts.
- */
-
-/*
- * Special IRQ vectors used by the SMP architecture, 0xf0-0xff
- *
- *  some of the following vectors are 'rare', they are merged
- *  into a single vector (CALL_FUNCTION_VECTOR) to save vector space.
- *  TLB, reschedule and local APIC vectors are performance-critical.
- *
- *  Vectors 0xf0-0xfa are free (reserved for future Linux use).
- */
-#define SPURIOUS_APIC_VECTOR	0xff
-#define ERROR_APIC_VECTOR	0xfe
-#define INVALIDATE_TLB_VECTOR	0xfd
-#define RESCHEDULE_VECTOR	0xfc
-#define CALL_FUNCTION_VECTOR	0xfb
-
-#define THERMAL_APIC_VECTOR	0xf0
-/*
- * Local APIC timer IRQ vector is on a different priority level,
- * to work around the 'lost local interrupt if more than 2 IRQ
- * sources per level' errata.
- */
-#define LOCAL_TIMER_VECTOR	0xef
-
-/*
- * First APIC vector available to drivers: (vectors 0x30-0xee)
- * we start at 0x31 to spread out vectors evenly between priority
- * levels. (0x80 is the syscall vector)
- */
-#define FIRST_DEVICE_VECTOR	0x31
-#define FIRST_SYSTEM_VECTOR	0xef
-
-#define TIMER_IRQ 0
-
-/*
- * 16 8259A IRQ's, 208 potential APIC interrupt sources.
- * Right now the APIC is mostly only used for SMP.
- * 256 vectors is an architectural limit. (we can have
- * more than 256 devices theoretically, but they will
- * have to use shared interrupts)
- * Since vectors 0x00-0x1f are used/reserved for the CPU,
- * the usable vector space is 0x20-0xff (224 vectors)
- */
-#ifdef CONFIG_X86_IO_APIC
-#define NR_IRQS 224
-#else
-#define NR_IRQS 16
-#endif
-
-#define NR_VECTORS 256
-#define NR_IRQ_VECTORS NR_IRQS
-
-#define FPU_IRQ			8
-
-#define	FIRST_VM86_IRQ		2
-#define LAST_VM86_IRQ		15
-#define invalid_vm86_irq(irq)	((irq) < 2 || (irq) == 7 || (irq) > 15)
-
-#endif /* _ASM_IRQ_VECTORS_H */
-
-
--- diff/include/asm-i386/mach-pc9800/mach_reboot.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/mach_reboot.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-/*
- *  arch/i386/mach-pc9800/mach_reboot.h
- *
- *  Machine specific reboot functions for PC-9800.
- *  Written by Osamu Tomita <tomita@cinet.co.jp>
- */
-#ifndef _MACH_REBOOT_H
-#define _MACH_REBOOT_H
-
-#ifdef CMOS_WRITE
-#undef CMOS_WRITE
-#define CMOS_WRITE(a,b)	do{}while(0)
-#endif
-
-static inline void mach_reboot(void)
-{
-	outb(0, 0xf0);		/* signal CPU reset */
-	mdelay(1);
-}
-
-#endif /* !_MACH_REBOOT_H */
--- diff/include/asm-i386/mach-pc9800/mach_time.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/mach_time.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,100 +0,0 @@
-/*
- *  include/asm-i386/mach-pc9800/mach_time.h
- *
- *  Machine specific set RTC function for PC-9800.
- *  Written by Osamu Tomita <tomita@cinet.co.jp>
- */
-#ifndef _MACH_TIME_H
-#define _MACH_TIME_H
-
-#include <linux/bcd.h>
-#include <linux/upd4990a.h>
-
-/* for check timing call set_rtc_mmss() */
-/* used in arch/i386/time.c::do_timer_interrupt() */
-/*
- * Because PC-9800's RTC (NEC uPD4990A) does not allow setting
- * time partially, we always have to read-modify-write the
- * entire time (including year) so that set_rtc_mmss() will
- * take quite much time to execute.  You may want to relax
- * RTC resetting interval (currently ~11 minuts)...
- */
-#define USEC_AFTER	1000000
-#define USEC_BEFORE	0
-
-static inline int mach_set_rtc_mmss(unsigned long nowtime)
-{
-	int retval = 0;
-	int real_seconds, real_minutes, cmos_minutes;
-	struct upd4990a_raw_data data;
-
-	upd4990a_get_time(&data, 1);
-	cmos_minutes = BCD2BIN(data.min);
-
-	/*
-	 * since we're only adjusting minutes and seconds,
-	 * don't interfere with hour overflow. This avoids
-	 * messing with unknown time zones but requires your
-	 * RTC not to be off by more than 15 minutes
-	 */
-	real_seconds = nowtime % 60;
-	real_minutes = nowtime / 60;
-	if (((abs(real_minutes - cmos_minutes) + 15) / 30) & 1)
-		real_minutes += 30;	/* correct for half hour time zone */
-	real_minutes %= 60;
-
-	if (abs(real_minutes - cmos_minutes) < 30) {
-		u8 temp_seconds = (real_seconds / 10) * 16 + real_seconds % 10;
-		u8 temp_minutes = (real_minutes / 10) * 16 + real_minutes % 10;
-
-		if (data.sec != temp_seconds || data.min != temp_minutes) {
-			data.sec = temp_seconds;
-			data.min = temp_minutes;
-			upd4990a_set_time(&data, 1);
-		}
-	} else {
-		printk(KERN_WARNING
-		       "set_rtc_mmss: can't update from %d to %d\n",
-		       cmos_minutes, real_minutes);
-		retval = -1;
-	}
-
-	/* uPD4990A users' manual says we should issue Register Hold
-	 * command after reading time, or future Time Read command
-	 * may not work.  When we have set the time, this also starts
-	 * the clock.
-	 */
-	upd4990a_serial_command(UPD4990A_REGISTER_HOLD);
-
-	return retval;
-}
-
-static inline unsigned long mach_get_cmos_time(void)
-{
-	int i;
-	u8 prev, cur;
-	unsigned int year;
-	struct upd4990a_raw_data data;
-
-	/* Connect uPD4990A's DATA OUT pin to its 1Hz reference clock. */
-	upd4990a_serial_command(UPD4990A_REGISTER_HOLD);
-
-	/* Catch rising edge of reference clock.  */
-	prev = ~UPD4990A_READ_DATA();
-	for (i = 0; i < 1800000; i++) { /* may take up to 1 second... */
-		__asm__ ("outb %%al,%0" : : "N" (0x5f)); /* 0.6usec delay */
-		cur = UPD4990A_READ_DATA();
-		if (!(prev & cur & 1))
-			break;
-		prev = ~cur;
-	}
-
-	upd4990a_get_time(&data, 0);
-
-	if ((year = BCD2BIN(data.year) + 1900) < 1995)
-		year += 100;
-	return mktime(year, data.mon, BCD2BIN(data.mday), BCD2BIN(data.hour),
-			BCD2BIN(data.min), BCD2BIN(data.sec));
-}
-
-#endif /* !_MACH_TIME_H */
--- diff/include/asm-i386/mach-pc9800/mach_timer.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/mach_timer.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-/*
- *  include/asm-i386/mach-pc9800/mach_timer.h
- *
- *  Machine specific calibrate_tsc() for PC-9800.
- *  Written by Osamu Tomita <tomita@cinet.co.jp>
- */
-/* ------ Calibrate the TSC ------- 
- * PC-9800:
- *  CTC cannot be used because some models (especially
- *  note-machines) may disable clock to speaker channel (#1)
- *  unless speaker is enabled.  We use ARTIC instead.
- */
-#ifndef _MACH_TIMER_H
-#define _MACH_TIMER_H
-
-#define CALIBRATE_LATCH	(5 * 307200/HZ) /* 0.050sec * 307200Hz = 15360 */
-
-static inline void mach_prepare_counter(void)
-{
-	/* ARTIC can't be stopped nor reset. So we wait roundup. */
-	while (inw(0x5c));
-}
-
-static inline void mach_countup(unsigned long *count)
-{
-	do {
-		*count = inw(0x5c);
-	} while (*count < CALIBRATE_LATCH);
-}
-
-#endif /* !_MACH_TIMER_H */
--- diff/include/asm-i386/mach-pc9800/mach_traps.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/mach_traps.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/*
- *  include/asm-i386/mach-pc9800/mach_traps.h
- *
- *  Machine specific NMI handling for PC-9800.
- *  Written by Osamu Tomita <tomita@cinet.co.jp>
- */
-#ifndef _MACH_TRAPS_H
-#define _MACH_TRAPS_H
-
-static inline void clear_mem_error(unsigned char reason)
-{
-	outb(0x08, 0x37);
-	outb(0x09, 0x37);
-}
-
-static inline unsigned char get_nmi_reason(void)
-{
-	return (inb(0x33) & 6) ? 0x80 : 0;
-}
-
-static inline void reassert_nmi(void)
-{
-	outb(0x09, 0x50);	/* disable NMI once */
-	outb(0x09, 0x52);	/* re-enable it */
-}
-
-#endif /* !_MACH_TRAPS_H */
--- diff/include/asm-i386/mach-pc9800/mach_wakecpu.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/mach_wakecpu.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,45 +0,0 @@
-#ifndef __ASM_MACH_WAKECPU_H
-#define __ASM_MACH_WAKECPU_H
-
-/* 
- * This file copes with machines that wakeup secondary CPUs by the
- * INIT, INIT, STARTUP sequence.
- */
-
-#define WAKE_SECONDARY_VIA_INIT
-
-/*
- * On PC-9800, continuation on warm reset is done by loading
- * %ss:%sp from 0x0000:0404 and executing 'lret', so:
- */
-#define TRAMPOLINE_LOW phys_to_virt(0x4fa)
-#define TRAMPOLINE_HIGH phys_to_virt(0x4fc)
-
-#define boot_cpu_apicid boot_cpu_physical_apicid
-
-static inline void wait_for_init_deassert(atomic_t *deassert)
-{
-	while (!atomic_read(deassert));
-	return;
-}
-
-/* Nothing to do for most platforms, since cleared by the INIT cycle */
-static inline void smp_callin_clear_local_apic(void)
-{
-}
-
-static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
-{
-}
-
-static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
-{
-}
-
-#if APIC_DEBUG
- #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid)
-#else
- #define inquire_remote_apic(apicid) {}
-#endif
-
-#endif /* __ASM_MACH_WAKECPU_H */
--- diff/include/asm-i386/mach-pc9800/pci-functions.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/pci-functions.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-/*
- *	PCI BIOS function codes for the PC9800. Different to
- *	standard PC systems
- */
-
-/* Note: PC-9800 confirms PCI 2.1 on only few models */
-
-#define PCIBIOS_PCI_FUNCTION_ID 	0xccXX
-#define PCIBIOS_PCI_BIOS_PRESENT 	0xcc81
-#define PCIBIOS_FIND_PCI_DEVICE		0xcc82
-#define PCIBIOS_FIND_PCI_CLASS_CODE	0xcc83
-/*      PCIBIOS_GENERATE_SPECIAL_CYCLE	0xcc86	(not supported by bios) */
-#define PCIBIOS_READ_CONFIG_BYTE	0xcc88
-#define PCIBIOS_READ_CONFIG_WORD	0xcc89
-#define PCIBIOS_READ_CONFIG_DWORD	0xcc8a
-#define PCIBIOS_WRITE_CONFIG_BYTE	0xcc8b
-#define PCIBIOS_WRITE_CONFIG_WORD	0xcc8c
-#define PCIBIOS_WRITE_CONFIG_DWORD	0xcc8d
-#define PCIBIOS_GET_ROUTING_OPTIONS	0xcc8e	/* PCI 2.1 only */
-#define PCIBIOS_SET_PCI_HW_INT		0xcc8f	/* PCI 2.1 only */
--- diff/include/asm-i386/mach-pc9800/setup_arch_post.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/setup_arch_post.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-/**
- * machine_specific_memory_setup - Hook for machine specific memory setup.
- *
- * Description:
- *	This is included late in kernel/setup.c so that it can make
- *	use of all of the static functions.
- **/
-
-static inline char * __init machine_specific_memory_setup(void)
-{
-	char *who;
-	unsigned long low_mem_size, lower_high, higher_high;
-
-
-	who = "BIOS (common area)";
-
-	low_mem_size = ((*(unsigned char *)__va(PC9800SCA_BIOS_FLAG) & 7) + 1) << 17;
-	add_memory_region(0, low_mem_size, 1);
-	lower_high = (__u32) *(__u8 *) bus_to_virt(PC9800SCA_EXPMMSZ) << 17;
-	higher_high = (__u32) *(__u16 *) bus_to_virt(PC9800SCA_MMSZ16M) << 20;
-	if (lower_high != 0x00f00000UL) {
-		add_memory_region(HIGH_MEMORY, lower_high, 1);
-		add_memory_region(0x01000000UL, higher_high, 1);
-	}
-	else
-		add_memory_region(HIGH_MEMORY, lower_high + higher_high, 1);
-
-	return who;
-}
--- diff/include/asm-i386/mach-pc9800/setup_arch_pre.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/setup_arch_pre.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,36 +0,0 @@
-/* Hook to call BIOS initialisation function */
-
-/* no action for generic */
-
-#define ARCH_SETUP arch_setup_pc9800();
-
-#include <linux/timex.h>
-#include <asm/io.h>
-#include <asm/pc9800.h>
-#include <asm/pc9800_sca.h>
-
-int CLOCK_TICK_RATE;
-extern unsigned long tick_usec;	/* ACTHZ          period (usec) */
-extern unsigned long tick_nsec;	/* USER_HZ period (nsec) */
-unsigned char pc9800_misc_flags;
-/* (bit 0) 1:High Address Video ram exists 0:otherwise */
-
-#ifdef CONFIG_SMP
-#define MPC_TABLE_SIZE 512
-#define MPC_TABLE ((char *) (PARAM+0x400))
-char mpc_table[MPC_TABLE_SIZE];
-#endif
-
-static  inline void arch_setup_pc9800(void)
-{
-	CLOCK_TICK_RATE = PC9800_8MHz_P() ? 1996800 : 2457600;
-	printk(KERN_DEBUG "CLOCK_TICK_RATE = %d\n", CLOCK_TICK_RATE);
-	tick_usec = TICK_USEC; 		/* USER_HZ period (usec) */
-	tick_nsec = TICK_NSEC;		/* ACTHZ period (nsec) */
-
-	pc9800_misc_flags = PC9800_MISC_FLAGS;
-#ifdef CONFIG_SMP
-	if ((*(u32 *)(MPC_TABLE)) == 0x504d4350)
-		memcpy(mpc_table, MPC_TABLE, *(u16 *)(MPC_TABLE + 4));
-#endif /* CONFIG_SMP */
-}
--- diff/include/asm-i386/mach-pc9800/smpboot_hooks.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-i386/mach-pc9800/smpboot_hooks.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,52 +0,0 @@
-/* two abstractions specific to kernel/smpboot.c, mainly to cater to visws
- * which needs to alter them. */
-
-static inline void smpboot_clear_io_apic_irqs(void)
-{
-	io_apic_irqs = 0;
-}
-
-static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
-{
-	/* reset code is stored in 8255 on PC-9800. */
-	outb(0x0e, 0x37);	/* SHUT0 = 0 */
-	local_flush_tlb();
-	Dprintk("1.\n");
-	*((volatile unsigned short *) TRAMPOLINE_HIGH) = start_eip >> 4;
-	Dprintk("2.\n");
-	*((volatile unsigned short *) TRAMPOLINE_LOW) = start_eip & 0xf;
-	Dprintk("3.\n");
-	/*
-	 * On PC-9800, continuation on warm reset is done by loading
-	 * %ss:%sp from 0x0000:0404 and executing 'lret', so:
-	 */
-	/* 0x3f0 is on unused interrupt vector and should be safe... */
-	*((volatile unsigned long *) phys_to_virt(0x404)) = 0x000003f0;
-	Dprintk("4.\n");
-}
-
-static inline void smpboot_restore_warm_reset_vector(void)
-{
-	/*
-	 * Install writable page 0 entry to set BIOS data area.
-	 */
-	local_flush_tlb();
-
-	/*
-	 * Paranoid:  Set warm reset code and vector here back
-	 * to default values.
-	 */
-	outb(0x0f, 0x37);	/* SHUT0 = 1 */
-
-	*((volatile long *) phys_to_virt(0x404)) = 0;
-}
-
-static inline void smpboot_setup_io_apic(void)
-{
-	/*
-	 * Here we can be sure that there is an IO-APIC in the system. Let's
-	 * go and set it up:
-	 */
-	if (!skip_ioapic_setup && nr_ioapics)
-		setup_IO_APIC();
-}
--- diff/include/asm-i386/pc9800.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/pc9800.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/*
- *  PC-9800 machine types.
- *
- *  Copyright (C) 1999	TAKAI Kosuke <tak@kmc.kyoto-u.ac.jp>
- *			(Linux/98 Project)
- */
-
-#ifndef _ASM_PC9800_H_
-#define _ASM_PC9800_H_
-
-#include <asm/pc9800_sca.h>
-#include <asm/types.h>
-
-#define __PC9800SCA(type, pa)	(*(type *) phys_to_virt(pa))
-#define __PC9800SCA_TEST_BIT(pa, n)	\
-	((__PC9800SCA(u8, pa) & (1U << (n))) != 0)
-
-#define PC9800_HIGHRESO_P()	__PC9800SCA_TEST_BIT(PC9800SCA_BIOS_FLAG, 3)
-#define PC9800_8MHz_P()		__PC9800SCA_TEST_BIT(PC9800SCA_BIOS_FLAG, 7)
-
-				/* 0x2198 is 98 21 on memory... */
-#define PC9800_9821_P()		(__PC9800SCA(u16, PC9821SCA_ROM_ID) == 0x2198)
-
-/* Note PC9821_...() are valid only when PC9800_9821_P() was true. */
-#define PC9821_IDEIF_DOUBLE_P()	__PC9800SCA_TEST_BIT(PC9821SCA_ROM_FLAG4, 4)
-
-#endif
--- diff/include/asm-i386/pc9800_sca.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/pc9800_sca.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-/*
- *  System-common area definitions for NEC PC-9800 series
- *
- *  Copyright (C) 1999	TAKAI Kousuke <tak@kmc.kyoto-u.ac.jp>,
- *			Kyoto University Microcomputer Club.
- */
-
-#ifndef _ASM_I386_PC9800SCA_H_
-#define _ASM_I386_PC9800SCA_H_
-
-#define PC9800SCA_EXPMMSZ		(0x0401)	/* B */
-#define PC9800SCA_SCSI_PARAMS		(0x0460)	/* 8 * 4B */
-#define PC9800SCA_DISK_EQUIPS		(0x0482)	/* B */
-#define PC9800SCA_XROM_ID		(0x04C0)	/* 52B */
-#define PC9800SCA_BIOS_FLAG		(0x0501)	/* B */
-#define PC9800SCA_MMSZ16M		(0x0594)	/* W */
-
-/* PC-9821 have additional system common area in their BIOS-ROM segment. */
-
-#define PC9821SCA__BASE			(0xF8E8 << 4)
-#define PC9821SCA_ROM_ID		(PC9821SCA__BASE + 0x00)
-#define PC9821SCA_ROM_FLAG4		(PC9821SCA__BASE + 0x05)
-#define PC9821SCA_RSFLAGS		(PC9821SCA__BASE + 0x11)	/* B */
-
-#endif /* !_ASM_I386_PC9800SCA_H_ */
--- diff/include/asm-i386/std_resources.h	2004-05-19 22:12:40.000000000 +0100
+++ source/include/asm-i386/std_resources.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-/*
- * include/asm-i386/std_resources.h
- */
-
-#ifndef __ASM_I386_STD_RESOURCES_H
-#define __ASM_I386_STD_RESOURCES_H
-
-#include <linux/init.h>
-
-void probe_roms(void) __init;
-void request_graphics_resource(void) __init;
-void request_standard_io_resources(void) __init;
-
-#endif
--- diff/include/asm-ia64/cpumask.h	2004-05-19 22:12:41.000000000 +0100
+++ source/include/asm-ia64/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_IA64_CPUMASK_H
-#define _ASM_IA64_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_IA64_CPUMASK_H */
--- diff/include/asm-m68k/cpumask.h	2004-05-19 22:12:44.000000000 +0100
+++ source/include/asm-m68k/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_M68K_CPUMASK_H
-#define _ASM_M68K_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_M68K_CPUMASK_H */
--- diff/include/asm-m68k/init.h	2004-05-19 22:12:44.000000000 +0100
+++ source/include/asm-m68k/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-#ifndef _M68K_INIT_H
-#define _M68K_INIT_H
-
-#define __init __attribute__ ((__section__ (".text.init")))
-#define __initdata __attribute__ ((__section__ (".data.init")))
-/* For assembly routines */
-#define __INIT		.section	".text.init",#alloc,#execinstr
-#define __FINIT		.previous
-#define __INITDATA	.section	".data.init",#alloc,#write
-
-#endif
--- diff/include/asm-m68knommu/cpumask.h	2004-05-19 22:12:45.000000000 +0100
+++ source/include/asm-m68knommu/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_M68KNOMMU_CPUMASK_H
-#define _ASM_M68KNOMMU_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_M68KNOMMU_CPUMASK_H */
--- diff/include/asm-m68knommu/init.h	2004-05-19 22:12:45.000000000 +0100
+++ source/include/asm-m68knommu/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include <asm-m68k/init.h>
--- diff/include/asm-mips/cpumask.h	2004-05-19 22:12:45.000000000 +0100
+++ source/include/asm-mips/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_MIPS_CPUMASK_H
-#define _ASM_MIPS_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_MIPS_CPUMASK_H */
--- diff/include/asm-mips/init.h	2004-05-19 22:12:46.000000000 +0100
+++ source/include/asm-mips/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#error "<asm/init.h> should never be used - use <linux/init.h> instead"
--- diff/include/asm-mips/vr41xx/tb0229.h	2004-05-19 22:12:48.000000000 +0100
+++ source/include/asm-mips/vr41xx/tb0229.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,73 +0,0 @@
-/*
- * FILE NAME
- *	include/asm-mips/vr41xx/tb0229.h
- *
- * BRIEF MODULE DESCRIPTION
- *	Include file for TANBAC TB0229 and TB0219.
- *
- * Copyright 2002,2003 Yoichi Yuasa
- *                yuasa@hh.iij4u.or.jp
- *
- * Modified for TANBAC TB0229:
- * Copyright 2003 Megasolution Inc.
- *                matsu@megasolution.jp
- *
- *  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.
- */
-#ifndef __TANBAC_TB0229_H
-#define __TANBAC_TB0229_H
-
-#include <asm/addrspace.h>
-#include <asm/vr41xx/vr41xx.h>
-
-/*
- * Board specific address mapping
- */
-#define VR41XX_PCI_MEM1_BASE		0x10000000
-#define VR41XX_PCI_MEM1_SIZE		0x04000000
-#define VR41XX_PCI_MEM1_MASK		0x7c000000
-
-#define VR41XX_PCI_MEM2_BASE		0x14000000
-#define VR41XX_PCI_MEM2_SIZE		0x02000000
-#define VR41XX_PCI_MEM2_MASK		0x7e000000
-
-#define VR41XX_PCI_IO_BASE		0x16000000
-#define VR41XX_PCI_IO_SIZE		0x02000000
-#define VR41XX_PCI_IO_MASK		0x7e000000
-
-#define VR41XX_PCI_IO_START		0x01000000
-#define VR41XX_PCI_IO_END		0x01ffffff
-
-#define VR41XX_PCI_MEM_START		0x12000000
-#define VR41XX_PCI_MEM_END		0x15ffffff
-
-#define IO_PORT_BASE			KSEG1ADDR(VR41XX_PCI_IO_BASE)
-#define IO_PORT_RESOURCE_START		0
-#define IO_PORT_RESOURCE_END		VR41XX_PCI_IO_SIZE
-#define IO_MEM1_RESOURCE_START		VR41XX_PCI_MEM1_BASE
-#define IO_MEM1_RESOURCE_END		(VR41XX_PCI_MEM1_BASE + VR41XX_PCI_MEM1_SIZE)
-#define IO_MEM2_RESOURCE_START		VR41XX_PCI_MEM2_BASE
-#define IO_MEM2_RESOURCE_END		(VR41XX_PCI_MEM2_BASE + VR41XX_PCI_MEM2_SIZE)
-
-/*
- * General-Purpose I/O Pin Number
- */
-#define TB0219_PCI_SLOT1_PIN		2
-#define TB0219_PCI_SLOT2_PIN		3
-#define TB0219_PCI_SLOT3_PIN		4
-
-/*
- * Interrupt Number
- */
-#define TB0219_PCI_SLOT1_IRQ		GIU_IRQ(TB0219_PCI_SLOT1_PIN)
-#define TB0219_PCI_SLOT2_IRQ		GIU_IRQ(TB0219_PCI_SLOT2_PIN)
-#define TB0219_PCI_SLOT3_IRQ		GIU_IRQ(TB0219_PCI_SLOT3_PIN)
-
-#define TB0219_RESET_REGS		KSEG1ADDR(0x0a00000e)
-
-extern void tanbac_tb0229_restart(char *command);
-
-#endif /* __TANBAC_TB0229_H */
--- diff/include/asm-parisc/cpumask.h	2004-05-19 22:12:48.000000000 +0100
+++ source/include/asm-parisc/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_PARISC_CPUMASK_H
-#define _ASM_PARISC_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_PARISC_CPUMASK_H */
--- diff/include/asm-ppc/cpm_8260.h	2004-05-19 22:12:49.000000000 +0100
+++ source/include/asm-ppc/cpm_8260.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,702 +0,0 @@
-/*
- * MPC8260 Communication Processor Module.
- * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
- *
- * This file contains structures and information for the communication
- * processor channels found in the dual port RAM or parameter RAM.
- * All CPM control and status is available through the MPC8260 internal
- * memory map.  See immap.h for details.
- */
-#ifdef __KERNEL__
-#ifndef __CPM_82XX__
-#define __CPM_82XX__
-
-#include <asm/immap_8260.h>
-
-/* CPM Command register.
-*/
-#define CPM_CR_RST	((uint)0x80000000)
-#define CPM_CR_PAGE	((uint)0x7c000000)
-#define CPM_CR_SBLOCK	((uint)0x03e00000)
-#define CPM_CR_FLG	((uint)0x00010000)
-#define CPM_CR_MCN	((uint)0x00003fc0)
-#define CPM_CR_OPCODE	((uint)0x0000000f)
-
-/* Device sub-block and page codes.
-*/
-#define CPM_CR_SCC1_SBLOCK	(0x04)
-#define CPM_CR_SCC2_SBLOCK	(0x05)
-#define CPM_CR_SCC3_SBLOCK	(0x06)
-#define CPM_CR_SCC4_SBLOCK	(0x07)
-#define CPM_CR_SMC1_SBLOCK	(0x08)
-#define CPM_CR_SMC2_SBLOCK	(0x09)
-#define CPM_CR_SPI_SBLOCK	(0x0a)
-#define CPM_CR_I2C_SBLOCK	(0x0b)
-#define CPM_CR_TIMER_SBLOCK	(0x0f)
-#define CPM_CR_RAND_SBLOCK	(0x0e)
-#define CPM_CR_FCC1_SBLOCK	(0x10)
-#define CPM_CR_FCC2_SBLOCK	(0x11)
-#define CPM_CR_FCC3_SBLOCK	(0x12)
-#define CPM_CR_IDMA1_SBLOCK	(0x14)
-#define CPM_CR_IDMA2_SBLOCK	(0x15)
-#define CPM_CR_IDMA3_SBLOCK	(0x16)
-#define CPM_CR_IDMA4_SBLOCK	(0x17)
-#define CPM_CR_MCC1_SBLOCK	(0x1c)
-
-#define CPM_CR_SCC1_PAGE	(0x00)
-#define CPM_CR_SCC2_PAGE	(0x01)
-#define CPM_CR_SCC3_PAGE	(0x02)
-#define CPM_CR_SCC4_PAGE	(0x03)
-#define CPM_CR_SMC1_PAGE	(0x07)
-#define CPM_CR_SMC2_PAGE	(0x08)
-#define CPM_CR_SPI_PAGE		(0x09)
-#define CPM_CR_I2C_PAGE		(0x0a)
-#define CPM_CR_TIMER_PAGE	(0x0a)
-#define CPM_CR_RAND_PAGE	(0x0a)
-#define CPM_CR_FCC1_PAGE	(0x04)
-#define CPM_CR_FCC2_PAGE	(0x05)
-#define CPM_CR_FCC3_PAGE	(0x06)
-#define CPM_CR_IDMA1_PAGE	(0x07)
-#define CPM_CR_IDMA2_PAGE	(0x08)
-#define CPM_CR_IDMA3_PAGE	(0x09)
-#define CPM_CR_IDMA4_PAGE	(0x0a)
-#define CPM_CR_MCC1_PAGE	(0x07)
-#define CPM_CR_MCC2_PAGE	(0x08)
-
-/* Some opcodes (there are more...later)
-*/
-#define CPM_CR_INIT_TRX		((ushort)0x0000)
-#define CPM_CR_INIT_RX		((ushort)0x0001)
-#define CPM_CR_INIT_TX		((ushort)0x0002)
-#define CPM_CR_HUNT_MODE	((ushort)0x0003)
-#define CPM_CR_STOP_TX		((ushort)0x0004)
-#define CPM_CR_RESTART_TX	((ushort)0x0006)
-#define CPM_CR_SET_GADDR	((ushort)0x0008)
-
-#define mk_cr_cmd(PG, SBC, MCN, OP) \
-	((PG << 26) | (SBC << 21) | (MCN << 6) | OP)
-
-/* Dual Port RAM addresses.  The first 16K is available for almost
- * any CPM use, so we put the BDs there.  The first 128 bytes are
- * used for SMC1 and SMC2 parameter RAM, so we start allocating
- * BDs above that.  All of this must change when we start
- * downloading RAM microcode.
- */
-#define CPM_DATAONLY_BASE	((uint)128)
-#define CPM_DATAONLY_SIZE	((uint)(16 * 1024) - CPM_DATAONLY_BASE)
-#define CPM_DP_NOSPACE		((uint)0x7fffffff)
-#define CPM_FCC_SPECIAL_BASE	((uint)0x0000b000)
-
-/* The number of pages of host memory we allocate for CPM.  This is
- * done early in kernel initialization to get physically contiguous
- * pages.
- */
-#define NUM_CPM_HOST_PAGES	2
-
-
-/* Export the base address of the communication processor registers
- * and dual port ram.
- */
-extern	cpm8260_t	*cpmp;		/* Pointer to comm processor */
-uint		m8260_cpm_dpalloc(uint size, uint align);
-uint		m8260_cpm_hostalloc(uint size, uint align);
-void		m8260_cpm_setbrg(uint brg, uint rate);
-void		m8260_cpm_fastbrg(uint brg, uint rate, int div16);
-
-/* Buffer descriptors used by many of the CPM protocols.
-*/
-typedef struct cpm_buf_desc {
-	ushort	cbd_sc;		/* Status and Control */
-	ushort	cbd_datlen;	/* Data length in buffer */
-	uint	cbd_bufaddr;	/* Buffer address in host memory */
-} cbd_t;
-
-#define BD_SC_EMPTY	((ushort)0x8000)	/* Receive is empty */
-#define BD_SC_READY	((ushort)0x8000)	/* Transmit is ready */
-#define BD_SC_WRAP	((ushort)0x2000)	/* Last buffer descriptor */
-#define BD_SC_INTRPT	((ushort)0x1000)	/* Interrupt on change */
-#define BD_SC_LAST	((ushort)0x0800)	/* Last buffer in frame */
-#define BD_SC_CM	((ushort)0x0200)	/* Continous mode */
-#define BD_SC_ID	((ushort)0x0100)	/* Rec'd too many idles */
-#define BD_SC_P		((ushort)0x0100)	/* xmt preamble */
-#define BD_SC_BR	((ushort)0x0020)	/* Break received */
-#define BD_SC_FR	((ushort)0x0010)	/* Framing error */
-#define BD_SC_PR	((ushort)0x0008)	/* Parity error */
-#define BD_SC_OV	((ushort)0x0002)	/* Overrun */
-#define BD_SC_CD	((ushort)0x0001)	/* ?? */
-
-/* Function code bits, usually generic to devices.
-*/
-#define CPMFCR_GBL	((u_char)0x20)	/* Set memory snooping */
-#define CPMFCR_EB	((u_char)0x10)	/* Set big endian byte order */
-#define CPMFCR_TC2	((u_char)0x04)	/* Transfer code 2 value */
-#define CPMFCR_DTB	((u_char)0x02)	/* Use local bus for data when set */
-#define CPMFCR_BDB	((u_char)0x01)	/* Use local bus for BD when set */
-
-/* Parameter RAM offsets from the base.
-*/
-#define PROFF_SCC1		((uint)0x8000)
-#define PROFF_SCC2		((uint)0x8100)
-#define PROFF_SCC3		((uint)0x8200)
-#define PROFF_SCC4		((uint)0x8300)
-#define PROFF_FCC1		((uint)0x8400)
-#define PROFF_FCC2		((uint)0x8500)
-#define PROFF_FCC3		((uint)0x8600)
-#define PROFF_MCC1		((uint)0x8700)
-#define PROFF_SMC1_BASE		((uint)0x87fc)
-#define PROFF_IDMA1_BASE	((uint)0x87fe)
-#define PROFF_MCC2		((uint)0x8800)
-#define PROFF_SMC2_BASE		((uint)0x88fc)
-#define PROFF_IDMA2_BASE	((uint)0x88fe)
-#define PROFF_SPI_BASE		((uint)0x89fc)
-#define PROFF_IDMA3_BASE	((uint)0x89fe)
-#define PROFF_TIMERS		((uint)0x8ae0)
-#define PROFF_REVNUM		((uint)0x8af0)
-#define PROFF_RAND		((uint)0x8af8)
-#define PROFF_I2C_BASE		((uint)0x8afc)
-#define PROFF_IDMA4_BASE	((uint)0x8afe)
-
-/* The SMCs are relocated to any of the first eight DPRAM pages.
- * We will fix these at the first locations of DPRAM, until we
- * get some microcode patches :-).
- * The parameter ram space for the SMCs is fifty-some bytes, and
- * they are required to start on a 64 byte boundary.
- */
-#define PROFF_SMC1	(0)
-#define PROFF_SMC2	(64)
-
-
-/* Define enough so I can at least use the serial port as a UART.
- */
-typedef struct smc_uart {
-	ushort	smc_rbase;	/* Rx Buffer descriptor base address */
-	ushort	smc_tbase;	/* Tx Buffer descriptor base address */
-	u_char	smc_rfcr;	/* Rx function code */
-	u_char	smc_tfcr;	/* Tx function code */
-	ushort	smc_mrblr;	/* Max receive buffer length */
-	uint	smc_rstate;	/* Internal */
-	uint	smc_idp;	/* Internal */
-	ushort	smc_rbptr;	/* Internal */
-	ushort	smc_ibc;	/* Internal */
-	uint	smc_rxtmp;	/* Internal */
-	uint	smc_tstate;	/* Internal */
-	uint	smc_tdp;	/* Internal */
-	ushort	smc_tbptr;	/* Internal */
-	ushort	smc_tbc;	/* Internal */
-	uint	smc_txtmp;	/* Internal */
-	ushort	smc_maxidl;	/* Maximum idle characters */
-	ushort	smc_tmpidl;	/* Temporary idle counter */
-	ushort	smc_brklen;	/* Last received break length */
-	ushort	smc_brkec;	/* rcv'd break condition counter */
-	ushort	smc_brkcr;	/* xmt break count register */
-	ushort	smc_rmask;	/* Temporary bit mask */
-	uint	smc_stmp;	/* SDMA Temp */
-} smc_uart_t;
-
-/* SMC uart mode register (Internal memory map).
-*/
-#define SMCMR_REN	((ushort)0x0001)
-#define SMCMR_TEN	((ushort)0x0002)
-#define SMCMR_DM	((ushort)0x000c)
-#define SMCMR_SM_GCI	((ushort)0x0000)
-#define SMCMR_SM_UART	((ushort)0x0020)
-#define SMCMR_SM_TRANS	((ushort)0x0030)
-#define SMCMR_SM_MASK	((ushort)0x0030)
-#define SMCMR_PM_EVEN	((ushort)0x0100)	/* Even parity, else odd */
-#define SMCMR_REVD	SMCMR_PM_EVEN
-#define SMCMR_PEN	((ushort)0x0200)	/* Parity enable */
-#define SMCMR_BS	SMCMR_PEN
-#define SMCMR_SL	((ushort)0x0400)	/* Two stops, else one */
-#define SMCR_CLEN_MASK	((ushort)0x7800)	/* Character length */
-#define smcr_mk_clen(C)	(((C) << 11) & SMCR_CLEN_MASK)
-
-/* SMC Event and Mask register.
-*/
-#define SMCM_BRKE       ((unsigned char)0x40)   /* When in UART Mode */
-#define SMCM_BRK        ((unsigned char)0x10)   /* When in UART Mode */
-#define SMCM_TXE	((unsigned char)0x10)
-#define SMCM_BSY	((unsigned char)0x04)
-#define SMCM_TX		((unsigned char)0x02)
-#define SMCM_RX		((unsigned char)0x01)
-
-/* Baud rate generators.
-*/
-#define CPM_BRG_RST		((uint)0x00020000)
-#define CPM_BRG_EN		((uint)0x00010000)
-#define CPM_BRG_EXTC_INT	((uint)0x00000000)
-#define CPM_BRG_EXTC_CLK3_9	((uint)0x00004000)
-#define CPM_BRG_EXTC_CLK5_15	((uint)0x00008000)
-#define CPM_BRG_ATB		((uint)0x00002000)
-#define CPM_BRG_CD_MASK		((uint)0x00001ffe)
-#define CPM_BRG_DIV16		((uint)0x00000001)
-
-/* SCCs.
-*/
-#define SCC_GSMRH_IRP		((uint)0x00040000)
-#define SCC_GSMRH_GDE		((uint)0x00010000)
-#define SCC_GSMRH_TCRC_CCITT	((uint)0x00008000)
-#define SCC_GSMRH_TCRC_BISYNC	((uint)0x00004000)
-#define SCC_GSMRH_TCRC_HDLC	((uint)0x00000000)
-#define SCC_GSMRH_REVD		((uint)0x00002000)
-#define SCC_GSMRH_TRX		((uint)0x00001000)
-#define SCC_GSMRH_TTX		((uint)0x00000800)
-#define SCC_GSMRH_CDP		((uint)0x00000400)
-#define SCC_GSMRH_CTSP		((uint)0x00000200)
-#define SCC_GSMRH_CDS		((uint)0x00000100)
-#define SCC_GSMRH_CTSS		((uint)0x00000080)
-#define SCC_GSMRH_TFL		((uint)0x00000040)
-#define SCC_GSMRH_RFW		((uint)0x00000020)
-#define SCC_GSMRH_TXSY		((uint)0x00000010)
-#define SCC_GSMRH_SYNL16	((uint)0x0000000c)
-#define SCC_GSMRH_SYNL8		((uint)0x00000008)
-#define SCC_GSMRH_SYNL4		((uint)0x00000004)
-#define SCC_GSMRH_RTSM		((uint)0x00000002)
-#define SCC_GSMRH_RSYN		((uint)0x00000001)
-
-#define SCC_GSMRL_SIR		((uint)0x80000000)	/* SCC2 only */
-#define SCC_GSMRL_EDGE_NONE	((uint)0x60000000)
-#define SCC_GSMRL_EDGE_NEG	((uint)0x40000000)
-#define SCC_GSMRL_EDGE_POS	((uint)0x20000000)
-#define SCC_GSMRL_EDGE_BOTH	((uint)0x00000000)
-#define SCC_GSMRL_TCI		((uint)0x10000000)
-#define SCC_GSMRL_TSNC_3	((uint)0x0c000000)
-#define SCC_GSMRL_TSNC_4	((uint)0x08000000)
-#define SCC_GSMRL_TSNC_14	((uint)0x04000000)
-#define SCC_GSMRL_TSNC_INF	((uint)0x00000000)
-#define SCC_GSMRL_RINV		((uint)0x02000000)
-#define SCC_GSMRL_TINV		((uint)0x01000000)
-#define SCC_GSMRL_TPL_128	((uint)0x00c00000)
-#define SCC_GSMRL_TPL_64	((uint)0x00a00000)
-#define SCC_GSMRL_TPL_48	((uint)0x00800000)
-#define SCC_GSMRL_TPL_32	((uint)0x00600000)
-#define SCC_GSMRL_TPL_16	((uint)0x00400000)
-#define SCC_GSMRL_TPL_8		((uint)0x00200000)
-#define SCC_GSMRL_TPL_NONE	((uint)0x00000000)
-#define SCC_GSMRL_TPP_ALL1	((uint)0x00180000)
-#define SCC_GSMRL_TPP_01	((uint)0x00100000)
-#define SCC_GSMRL_TPP_10	((uint)0x00080000)
-#define SCC_GSMRL_TPP_ZEROS	((uint)0x00000000)
-#define SCC_GSMRL_TEND		((uint)0x00040000)
-#define SCC_GSMRL_TDCR_32	((uint)0x00030000)
-#define SCC_GSMRL_TDCR_16	((uint)0x00020000)
-#define SCC_GSMRL_TDCR_8	((uint)0x00010000)
-#define SCC_GSMRL_TDCR_1	((uint)0x00000000)
-#define SCC_GSMRL_RDCR_32	((uint)0x0000c000)
-#define SCC_GSMRL_RDCR_16	((uint)0x00008000)
-#define SCC_GSMRL_RDCR_8	((uint)0x00004000)
-#define SCC_GSMRL_RDCR_1	((uint)0x00000000)
-#define SCC_GSMRL_RENC_DFMAN	((uint)0x00003000)
-#define SCC_GSMRL_RENC_MANCH	((uint)0x00002000)
-#define SCC_GSMRL_RENC_FM0	((uint)0x00001000)
-#define SCC_GSMRL_RENC_NRZI	((uint)0x00000800)
-#define SCC_GSMRL_RENC_NRZ	((uint)0x00000000)
-#define SCC_GSMRL_TENC_DFMAN	((uint)0x00000600)
-#define SCC_GSMRL_TENC_MANCH	((uint)0x00000400)
-#define SCC_GSMRL_TENC_FM0	((uint)0x00000200)
-#define SCC_GSMRL_TENC_NRZI	((uint)0x00000100)
-#define SCC_GSMRL_TENC_NRZ	((uint)0x00000000)
-#define SCC_GSMRL_DIAG_LE	((uint)0x000000c0)	/* Loop and echo */
-#define SCC_GSMRL_DIAG_ECHO	((uint)0x00000080)
-#define SCC_GSMRL_DIAG_LOOP	((uint)0x00000040)
-#define SCC_GSMRL_DIAG_NORM	((uint)0x00000000)
-#define SCC_GSMRL_ENR		((uint)0x00000020)
-#define SCC_GSMRL_ENT		((uint)0x00000010)
-#define SCC_GSMRL_MODE_ENET	((uint)0x0000000c)
-#define SCC_GSMRL_MODE_DDCMP	((uint)0x00000009)
-#define SCC_GSMRL_MODE_BISYNC	((uint)0x00000008)
-#define SCC_GSMRL_MODE_V14	((uint)0x00000007)
-#define SCC_GSMRL_MODE_AHDLC	((uint)0x00000006)
-#define SCC_GSMRL_MODE_PROFIBUS	((uint)0x00000005)
-#define SCC_GSMRL_MODE_UART	((uint)0x00000004)
-#define SCC_GSMRL_MODE_SS7	((uint)0x00000003)
-#define SCC_GSMRL_MODE_ATALK	((uint)0x00000002)
-#define SCC_GSMRL_MODE_HDLC	((uint)0x00000000)
-
-#define SCC_TODR_TOD		((ushort)0x8000)
-
-/* SCC Event and Mask register.
-*/
-#define SCCM_TXE	((unsigned char)0x10)
-#define SCCM_BSY	((unsigned char)0x04)
-#define SCCM_TX		((unsigned char)0x02)
-#define SCCM_RX		((unsigned char)0x01)
-
-typedef struct scc_param {
-	ushort	scc_rbase;	/* Rx Buffer descriptor base address */
-	ushort	scc_tbase;	/* Tx Buffer descriptor base address */
-	u_char	scc_rfcr;	/* Rx function code */
-	u_char	scc_tfcr;	/* Tx function code */
-	ushort	scc_mrblr;	/* Max receive buffer length */
-	uint	scc_rstate;	/* Internal */
-	uint	scc_idp;	/* Internal */
-	ushort	scc_rbptr;	/* Internal */
-	ushort	scc_ibc;	/* Internal */
-	uint	scc_rxtmp;	/* Internal */
-	uint	scc_tstate;	/* Internal */
-	uint	scc_tdp;	/* Internal */
-	ushort	scc_tbptr;	/* Internal */
-	ushort	scc_tbc;	/* Internal */
-	uint	scc_txtmp;	/* Internal */
-	uint	scc_rcrc;	/* Internal */
-	uint	scc_tcrc;	/* Internal */
-} sccp_t;
-
-/* CPM Ethernet through SCC1.
- */
-typedef struct scc_enet {
-	sccp_t	sen_genscc;
-	uint	sen_cpres;	/* Preset CRC */
-	uint	sen_cmask;	/* Constant mask for CRC */
-	uint	sen_crcec;	/* CRC Error counter */
-	uint	sen_alec;	/* alignment error counter */
-	uint	sen_disfc;	/* discard frame counter */
-	ushort	sen_pads;	/* Tx short frame pad character */
-	ushort	sen_retlim;	/* Retry limit threshold */
-	ushort	sen_retcnt;	/* Retry limit counter */
-	ushort	sen_maxflr;	/* maximum frame length register */
-	ushort	sen_minflr;	/* minimum frame length register */
-	ushort	sen_maxd1;	/* maximum DMA1 length */
-	ushort	sen_maxd2;	/* maximum DMA2 length */
-	ushort	sen_maxd;	/* Rx max DMA */
-	ushort	sen_dmacnt;	/* Rx DMA counter */
-	ushort	sen_maxb;	/* Max BD byte count */
-	ushort	sen_gaddr1;	/* Group address filter */
-	ushort	sen_gaddr2;
-	ushort	sen_gaddr3;
-	ushort	sen_gaddr4;
-	uint	sen_tbuf0data0;	/* Save area 0 - current frame */
-	uint	sen_tbuf0data1;	/* Save area 1 - current frame */
-	uint	sen_tbuf0rba;	/* Internal */
-	uint	sen_tbuf0crc;	/* Internal */
-	ushort	sen_tbuf0bcnt;	/* Internal */
-	ushort	sen_paddrh;	/* physical address (MSB) */
-	ushort	sen_paddrm;
-	ushort	sen_paddrl;	/* physical address (LSB) */
-	ushort	sen_pper;	/* persistence */
-	ushort	sen_rfbdptr;	/* Rx first BD pointer */
-	ushort	sen_tfbdptr;	/* Tx first BD pointer */
-	ushort	sen_tlbdptr;	/* Tx last BD pointer */
-	uint	sen_tbuf1data0;	/* Save area 0 - current frame */
-	uint	sen_tbuf1data1;	/* Save area 1 - current frame */
-	uint	sen_tbuf1rba;	/* Internal */
-	uint	sen_tbuf1crc;	/* Internal */
-	ushort	sen_tbuf1bcnt;	/* Internal */
-	ushort	sen_txlen;	/* Tx Frame length counter */
-	ushort	sen_iaddr1;	/* Individual address filter */
-	ushort	sen_iaddr2;
-	ushort	sen_iaddr3;
-	ushort	sen_iaddr4;
-	ushort	sen_boffcnt;	/* Backoff counter */
-
-	/* NOTE: Some versions of the manual have the following items
-	 * incorrectly documented.  Below is the proper order.
-	 */
-	ushort	sen_taddrh;	/* temp address (MSB) */
-	ushort	sen_taddrm;
-	ushort	sen_taddrl;	/* temp address (LSB) */
-} scc_enet_t;
-
-
-/* SCC Event register as used by Ethernet.
-*/
-#define SCCE_ENET_GRA	((ushort)0x0080)	/* Graceful stop complete */
-#define SCCE_ENET_TXE	((ushort)0x0010)	/* Transmit Error */
-#define SCCE_ENET_RXF	((ushort)0x0008)	/* Full frame received */
-#define SCCE_ENET_BSY	((ushort)0x0004)	/* All incoming buffers full */
-#define SCCE_ENET_TXB	((ushort)0x0002)	/* A buffer was transmitted */
-#define SCCE_ENET_RXB	((ushort)0x0001)	/* A buffer was received */
-
-/* SCC Mode Register (PSMR) as used by Ethernet.
-*/
-#define SCC_PSMR_HBC	((ushort)0x8000)	/* Enable heartbeat */
-#define SCC_PSMR_FC	((ushort)0x4000)	/* Force collision */
-#define SCC_PSMR_RSH	((ushort)0x2000)	/* Receive short frames */
-#define SCC_PSMR_IAM	((ushort)0x1000)	/* Check individual hash */
-#define SCC_PSMR_ENCRC	((ushort)0x0800)	/* Ethernet CRC mode */
-#define SCC_PSMR_PRO	((ushort)0x0200)	/* Promiscuous mode */
-#define SCC_PSMR_BRO	((ushort)0x0100)	/* Catch broadcast pkts */
-#define SCC_PSMR_SBT	((ushort)0x0080)	/* Special backoff timer */
-#define SCC_PSMR_LPB	((ushort)0x0040)	/* Set Loopback mode */
-#define SCC_PSMR_SIP	((ushort)0x0020)	/* Sample Input Pins */
-#define SCC_PSMR_LCW	((ushort)0x0010)	/* Late collision window */
-#define SCC_PSMR_NIB22	((ushort)0x000a)	/* Start frame search */
-#define SCC_PSMR_FDE	((ushort)0x0001)	/* Full duplex enable */
-
-/* Buffer descriptor control/status used by Ethernet receive.
- * Common to SCC and FCC.
- */
-#define BD_ENET_RX_EMPTY	((ushort)0x8000)
-#define BD_ENET_RX_WRAP		((ushort)0x2000)
-#define BD_ENET_RX_INTR		((ushort)0x1000)
-#define BD_ENET_RX_LAST		((ushort)0x0800)
-#define BD_ENET_RX_FIRST	((ushort)0x0400)
-#define BD_ENET_RX_MISS		((ushort)0x0100)
-#define BD_ENET_RX_BC		((ushort)0x0080)	/* FCC Only */
-#define BD_ENET_RX_MC		((ushort)0x0040)	/* FCC Only */
-#define BD_ENET_RX_LG		((ushort)0x0020)
-#define BD_ENET_RX_NO		((ushort)0x0010)
-#define BD_ENET_RX_SH		((ushort)0x0008)
-#define BD_ENET_RX_CR		((ushort)0x0004)
-#define BD_ENET_RX_OV		((ushort)0x0002)
-#define BD_ENET_RX_CL		((ushort)0x0001)
-#define BD_ENET_RX_STATS	((ushort)0x01ff)	/* All status bits */
-
-/* Buffer descriptor control/status used by Ethernet transmit.
- * Common to SCC and FCC.
- */
-#define BD_ENET_TX_READY	((ushort)0x8000)
-#define BD_ENET_TX_PAD		((ushort)0x4000)
-#define BD_ENET_TX_WRAP		((ushort)0x2000)
-#define BD_ENET_TX_INTR		((ushort)0x1000)
-#define BD_ENET_TX_LAST		((ushort)0x0800)
-#define BD_ENET_TX_TC		((ushort)0x0400)
-#define BD_ENET_TX_DEF		((ushort)0x0200)
-#define BD_ENET_TX_HB		((ushort)0x0100)
-#define BD_ENET_TX_LC		((ushort)0x0080)
-#define BD_ENET_TX_RL		((ushort)0x0040)
-#define BD_ENET_TX_RCMASK	((ushort)0x003c)
-#define BD_ENET_TX_UN		((ushort)0x0002)
-#define BD_ENET_TX_CSL		((ushort)0x0001)
-#define BD_ENET_TX_STATS	((ushort)0x03ff)	/* All status bits */
-
-/* SCC as UART
-*/
-typedef struct scc_uart {
-	sccp_t	scc_genscc;
-	uint	scc_res1;	/* Reserved */
-	uint	scc_res2;	/* Reserved */
-	ushort	scc_maxidl;	/* Maximum idle chars */
-	ushort	scc_idlc;	/* temp idle counter */
-	ushort	scc_brkcr;	/* Break count register */
-	ushort	scc_parec;	/* receive parity error counter */
-	ushort	scc_frmec;	/* receive framing error counter */
-	ushort	scc_nosec;	/* receive noise counter */
-	ushort	scc_brkec;	/* receive break condition counter */
-	ushort	scc_brkln;	/* last received break length */
-	ushort	scc_uaddr1;	/* UART address character 1 */
-	ushort	scc_uaddr2;	/* UART address character 2 */
-	ushort	scc_rtemp;	/* Temp storage */
-	ushort	scc_toseq;	/* Transmit out of sequence char */
-	ushort	scc_char1;	/* control character 1 */
-	ushort	scc_char2;	/* control character 2 */
-	ushort	scc_char3;	/* control character 3 */
-	ushort	scc_char4;	/* control character 4 */
-	ushort	scc_char5;	/* control character 5 */
-	ushort	scc_char6;	/* control character 6 */
-	ushort	scc_char7;	/* control character 7 */
-	ushort	scc_char8;	/* control character 8 */
-	ushort	scc_rccm;	/* receive control character mask */
-	ushort	scc_rccr;	/* receive control character register */
-	ushort	scc_rlbc;	/* receive last break character */
-} scc_uart_t;
-
-/* SCC Event and Mask registers when it is used as a UART.
-*/
-#define UART_SCCM_GLR		((ushort)0x1000)
-#define UART_SCCM_GLT		((ushort)0x0800)
-#define UART_SCCM_AB		((ushort)0x0200)
-#define UART_SCCM_IDL		((ushort)0x0100)
-#define UART_SCCM_GRA		((ushort)0x0080)
-#define UART_SCCM_BRKE		((ushort)0x0040)
-#define UART_SCCM_BRKS		((ushort)0x0020)
-#define UART_SCCM_CCR		((ushort)0x0008)
-#define UART_SCCM_BSY		((ushort)0x0004)
-#define UART_SCCM_TX		((ushort)0x0002)
-#define UART_SCCM_RX		((ushort)0x0001)
-
-/* The SCC PMSR when used as a UART.
-*/
-#define SCU_PMSR_FLC		((ushort)0x8000)
-#define SCU_PMSR_SL		((ushort)0x4000)
-#define SCU_PMSR_CL		((ushort)0x3000)
-#define SCU_PMSR_UM		((ushort)0x0c00)
-#define SCU_PMSR_FRZ		((ushort)0x0200)
-#define SCU_PMSR_RZS		((ushort)0x0100)
-#define SCU_PMSR_SYN		((ushort)0x0080)
-#define SCU_PMSR_DRT		((ushort)0x0040)
-#define SCU_PMSR_PEN		((ushort)0x0010)
-#define SCU_PMSR_RPM		((ushort)0x000c)
-#define SCU_PMSR_REVP		((ushort)0x0008)
-#define SCU_PMSR_TPM		((ushort)0x0003)
-#define SCU_PMSR_TEVP		((ushort)0x0003)
-
-/* CPM Transparent mode SCC.
- */
-typedef struct scc_trans {
-	sccp_t	st_genscc;
-	uint	st_cpres;	/* Preset CRC */
-	uint	st_cmask;	/* Constant mask for CRC */
-} scc_trans_t;
-
-#define BD_SCC_TX_LAST		((ushort)0x0800)
-
-/* How about some FCCs.....
-*/
-#define FCC_GFMR_DIAG_NORM	((uint)0x00000000)
-#define FCC_GFMR_DIAG_LE	((uint)0x40000000)
-#define FCC_GFMR_DIAG_AE	((uint)0x80000000)
-#define FCC_GFMR_DIAG_ALE	((uint)0xc0000000)
-#define FCC_GFMR_TCI		((uint)0x20000000)
-#define FCC_GFMR_TRX		((uint)0x10000000)
-#define FCC_GFMR_TTX		((uint)0x08000000)
-#define FCC_GFMR_TTX		((uint)0x08000000)
-#define FCC_GFMR_CDP		((uint)0x04000000)
-#define FCC_GFMR_CTSP		((uint)0x02000000)
-#define FCC_GFMR_CDS		((uint)0x01000000)
-#define FCC_GFMR_CTSS		((uint)0x00800000)
-#define FCC_GFMR_SYNL_NONE	((uint)0x00000000)
-#define FCC_GFMR_SYNL_AUTO	((uint)0x00004000)
-#define FCC_GFMR_SYNL_8		((uint)0x00008000)
-#define FCC_GFMR_SYNL_16	((uint)0x0000c000)
-#define FCC_GFMR_RTSM		((uint)0x00002000)
-#define FCC_GFMR_RENC_NRZ	((uint)0x00000000)
-#define FCC_GFMR_RENC_NRZI	((uint)0x00000800)
-#define FCC_GFMR_REVD		((uint)0x00000400)
-#define FCC_GFMR_TENC_NRZ	((uint)0x00000000)
-#define FCC_GFMR_TENC_NRZI	((uint)0x00000100)
-#define FCC_GFMR_TCRC_16	((uint)0x00000000)
-#define FCC_GFMR_TCRC_32	((uint)0x00000080)
-#define FCC_GFMR_ENR		((uint)0x00000020)
-#define FCC_GFMR_ENT		((uint)0x00000010)
-#define FCC_GFMR_MODE_ENET	((uint)0x0000000c)
-#define FCC_GFMR_MODE_ATM	((uint)0x0000000a)
-#define FCC_GFMR_MODE_HDLC	((uint)0x00000000)
-
-/* Generic FCC parameter ram.
-*/
-typedef struct fcc_param {
-	ushort	fcc_riptr;	/* Rx Internal temp pointer */
-	ushort	fcc_tiptr;	/* Tx Internal temp pointer */
-	ushort	fcc_res1;
-	ushort	fcc_mrblr;	/* Max receive buffer length, mod 32 bytes */
-	uint	fcc_rstate;	/* Upper byte is Func code, must be set */
-	uint	fcc_rbase;	/* Receive BD base */
-	ushort	fcc_rbdstat;	/* RxBD status */
-	ushort	fcc_rbdlen;	/* RxBD down counter */
-	uint	fcc_rdptr;	/* RxBD internal data pointer */
-	uint	fcc_tstate;	/* Upper byte is Func code, must be set */
-	uint	fcc_tbase;	/* Transmit BD base */
-	ushort	fcc_tbdstat;	/* TxBD status */
-	ushort	fcc_tbdlen;	/* TxBD down counter */
-	uint	fcc_tdptr;	/* TxBD internal data pointer */
-	uint	fcc_rbptr;	/* Rx BD Internal buf pointer */
-	uint	fcc_tbptr;	/* Tx BD Internal buf pointer */
-	uint	fcc_rcrc;	/* Rx temp CRC */
-	uint	fcc_res2;
-	uint	fcc_tcrc;	/* Tx temp CRC */
-} fccp_t;
-
-
-/* Ethernet controller through FCC.
-*/
-typedef struct fcc_enet {
-	fccp_t	fen_genfcc;
-	uint	fen_statbuf;	/* Internal status buffer */
-	uint	fen_camptr;	/* CAM address */
-	uint	fen_cmask;	/* Constant mask for CRC */
-	uint	fen_cpres;	/* Preset CRC */
-	uint	fen_crcec;	/* CRC Error counter */
-	uint	fen_alec;	/* alignment error counter */
-	uint	fen_disfc;	/* discard frame counter */
-	ushort	fen_retlim;	/* Retry limit */
-	ushort	fen_retcnt;	/* Retry counter */
-	ushort	fen_pper;	/* Persistence */
-	ushort	fen_boffcnt;	/* backoff counter */
-	uint	fen_gaddrh;	/* Group address filter, high 32-bits */
-	uint	fen_gaddrl;	/* Group address filter, low 32-bits */
-	ushort	fen_tfcstat;	/* out of sequence TxBD */
-	ushort	fen_tfclen;
-	uint	fen_tfcptr;
-	ushort	fen_mflr;	/* Maximum frame length (1518) */
-	ushort	fen_paddrh;	/* MAC address */
-	ushort	fen_paddrm;
-	ushort	fen_paddrl;
-	ushort	fen_ibdcount;	/* Internal BD counter */
-	ushort	fen_idbstart;	/* Internal BD start pointer */
-	ushort	fen_ibdend;	/* Internal BD end pointer */
-	ushort	fen_txlen;	/* Internal Tx frame length counter */
-	uint	fen_ibdbase[8]; /* Internal use */
-	uint	fen_iaddrh;	/* Individual address filter */
-	uint	fen_iaddrl;
-	ushort	fen_minflr;	/* Minimum frame length (64) */
-	ushort	fen_taddrh;	/* Filter transfer MAC address */
-	ushort	fen_taddrm;
-	ushort	fen_taddrl;
-	ushort	fen_padptr;	/* Pointer to pad byte buffer */
-	ushort	fen_cftype;	/* control frame type */
-	ushort	fen_cfrange;	/* control frame range */
-	ushort	fen_maxb;	/* maximum BD count */
-	ushort	fen_maxd1;	/* Max DMA1 length (1520) */
-	ushort	fen_maxd2;	/* Max DMA2 length (1520) */
-	ushort	fen_maxd;	/* internal max DMA count */
-	ushort	fen_dmacnt;	/* internal DMA counter */
-	uint	fen_octc;	/* Total octect counter */
-	uint	fen_colc;	/* Total collision counter */
-	uint	fen_broc;	/* Total broadcast packet counter */
-	uint	fen_mulc;	/* Total multicast packet count */
-	uint	fen_uspc;	/* Total packets < 64 bytes */
-	uint	fen_frgc;	/* Total packets < 64 bytes with errors */
-	uint	fen_ospc;	/* Total packets > 1518 */
-	uint	fen_jbrc;	/* Total packets > 1518 with errors */
-	uint	fen_p64c;	/* Total packets == 64 bytes */
-	uint	fen_p65c;	/* Total packets 64 < bytes <= 127 */
-	uint	fen_p128c;	/* Total packets 127 < bytes <= 255 */
-	uint	fen_p256c;	/* Total packets 256 < bytes <= 511 */
-	uint	fen_p512c;	/* Total packets 512 < bytes <= 1023 */
-	uint	fen_p1024c;	/* Total packets 1024 < bytes <= 1518 */
-	uint	fen_cambuf;	/* Internal CAM buffer poiner */
-	ushort	fen_rfthr;	/* Received frames threshold */
-	ushort	fen_rfcnt;	/* Received frames count */
-} fcc_enet_t;
-
-/* FCC Event/Mask register as used by Ethernet.
-*/
-#define FCC_ENET_GRA	((ushort)0x0080)	/* Graceful stop complete */
-#define FCC_ENET_RXC	((ushort)0x0040)	/* Control Frame Received */
-#define FCC_ENET_TXC	((ushort)0x0020)	/* Out of seq. Tx sent */
-#define FCC_ENET_TXE	((ushort)0x0010)	/* Transmit Error */
-#define FCC_ENET_RXF	((ushort)0x0008)	/* Full frame received */
-#define FCC_ENET_BSY	((ushort)0x0004)	/* Busy.  Rx Frame dropped */
-#define FCC_ENET_TXB	((ushort)0x0002)	/* A buffer was transmitted */
-#define FCC_ENET_RXB	((ushort)0x0001)	/* A buffer was received */
-
-/* FCC Mode Register (FPSMR) as used by Ethernet.
-*/
-#define FCC_PSMR_HBC	((uint)0x80000000)	/* Enable heartbeat */
-#define FCC_PSMR_FC	((uint)0x40000000)	/* Force Collision */
-#define FCC_PSMR_SBT	((uint)0x20000000)	/* Stop backoff timer */
-#define FCC_PSMR_LPB	((uint)0x10000000)	/* Local protect. 1 = FDX */
-#define FCC_PSMR_LCW	((uint)0x08000000)	/* Late collision select */
-#define FCC_PSMR_FDE	((uint)0x04000000)	/* Full Duplex Enable */
-#define FCC_PSMR_MON	((uint)0x02000000)	/* RMON Enable */
-#define FCC_PSMR_PRO	((uint)0x00400000)	/* Promiscuous Enable */
-#define FCC_PSMR_FCE	((uint)0x00200000)	/* Flow Control Enable */
-#define FCC_PSMR_RSH	((uint)0x00100000)	/* Receive Short Frames */
-#define FCC_PSMR_CAM	((uint)0x00000400)	/* CAM enable */
-#define FCC_PSMR_BRO	((uint)0x00000200)	/* Broadcast pkt discard */
-#define FCC_PSMR_ENCRC	((uint)0x00000080)	/* Use 32-bit CRC */
-
-/* IIC parameter RAM.
-*/
-typedef struct iic {
-	ushort	iic_rbase;	/* Rx Buffer descriptor base address */
-	ushort	iic_tbase;	/* Tx Buffer descriptor base address */
-	u_char	iic_rfcr;	/* Rx function code */
-	u_char	iic_tfcr;	/* Tx function code */
-	ushort	iic_mrblr;	/* Max receive buffer length */
-	uint	iic_rstate;	/* Internal */
-	uint	iic_rdp;	/* Internal */
-	ushort	iic_rbptr;	/* Internal */
-	ushort	iic_rbc;	/* Internal */
-	uint	iic_rxtmp;	/* Internal */
-	uint	iic_tstate;	/* Internal */
-	uint	iic_tdp;	/* Internal */
-	ushort	iic_tbptr;	/* Internal */
-	ushort	iic_tbc;	/* Internal */
-	uint	iic_txtmp;	/* Internal */
-} iic_t;
-
-#define BD_IIC_START		((ushort)0x0400)
-
-#endif /* __CPM_82XX__ */
-#endif /* __KERNEL__ */
--- diff/include/asm-ppc/cpumask.h	2004-05-19 22:12:49.000000000 +0100
+++ source/include/asm-ppc/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_PPC_CPUMASK_H
-#define _ASM_PPC_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_PPC_CPUMASK_H */
--- diff/include/asm-ppc/immap_8260.h	2004-05-19 22:12:50.000000000 +0100
+++ source/include/asm-ppc/immap_8260.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,433 +0,0 @@
-/*
- * MPC8260 Internal Memory Map
- * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
- *
- * The Internal Memory Map of the 8260.  I don't know how generic
- * this will be, as I don't have any knowledge of the subsequent
- * parts at this time.  I copied this from the 8xx_immap.h.
- */
-#ifdef __KERNEL__
-#ifndef __IMMAP_82XX__
-#define __IMMAP_82XX__
-
-/* System configuration registers.
-*/
-typedef	struct sys_conf {
-	uint	sc_siumcr;
-	uint	sc_sypcr;
-	char	res1[6];
-	ushort	sc_swsr;
-	char	res2[20];
-	uint	sc_bcr;
-	u_char	sc_ppc_acr;
-	char	res3[3];
-	uint	sc_ppc_alrh;
-	uint	sc_ppc_alrl;
-	u_char	sc_lcl_acr;
-	char	res4[3];
-	uint	sc_lcl_alrh;
-	uint	sc_lcl_alrl;
-	uint	sc_tescr1;
-	uint	sc_tescr2;
-	uint	sc_ltescr1;
-	uint	sc_ltescr2;
-	uint	sc_pdtea;
-	u_char	sc_pdtem;
-	char	res5[3];
-	uint	sc_ldtea;
-	u_char	sc_ldtem;
-	char	res6[163];
-} sysconf8260_t;
-
-
-/* Memory controller registers.
-*/
-typedef struct	mem_ctlr {
-	uint	memc_br0;
-	uint	memc_or0;
-	uint	memc_br1;
-	uint	memc_or1;
-	uint	memc_br2;
-	uint	memc_or2;
-	uint	memc_br3;
-	uint	memc_or3;
-	uint	memc_br4;
-	uint	memc_or4;
-	uint	memc_br5;
-	uint	memc_or5;
-	uint	memc_br6;
-	uint	memc_or6;
-	uint	memc_br7;
-	uint	memc_or7;
-	uint	memc_br8;
-	uint	memc_or8;
-	uint	memc_br9;
-	uint	memc_or9;
-	uint	memc_br10;
-	uint	memc_or10;
-	uint	memc_br11;
-	uint	memc_or11;
-	char	res1[8];
-	uint	memc_mar;
-	char	res2[4];
-	uint	memc_mamr;
-	uint	memc_mbmr;
-	uint	memc_mcmr;
-	char	res3[8];
-	ushort	memc_mptpr;
-	char	res4[2];
-	uint	memc_mdr;
-	char	res5[4];
-	uint	memc_psdmr;
-	uint	memc_lsdmr;
-	u_char	memc_purt;
-	char	res6[3];
-	u_char	memc_psrt;
-	char	res7[3];
-	u_char	memc_lurt;
-	char	res8[3];
-	u_char	memc_lsrt;
-	char	res9[3];
-	uint	memc_immr;
-	char	res10[84];
-} memctl8260_t;
-
-/* System Integration Timers.
-*/
-typedef struct	sys_int_timers {
-	char	res1[32];
-	ushort	sit_tmcntsc;
-	char	res2[2];
-	uint	sit_tmcnt;
-	char	res3[4];
-	uint	sit_tmcntal;
-	char	res4[16];
-	ushort	sit_piscr;
-	char	res5[2];
-	uint	sit_pitc;
-	uint	sit_pitr;
-	char	res6[94];
-	char	res7[2390];
-} sit8260_t;
-
-#define PISCR_PIRQ_MASK		((ushort)0xff00)
-#define PISCR_PS		((ushort)0x0080)
-#define PISCR_PIE		((ushort)0x0004)
-#define PISCR_PTF		((ushort)0x0002)
-#define PISCR_PTE		((ushort)0x0001)
-
-/* Interrupt Controller.
-*/
-typedef struct interrupt_controller {
-	ushort	ic_sicr;
-	char	res1[2];
-	uint	ic_sivec;
-	uint	ic_sipnrh;
-	uint	ic_sipnrl;
-	uint	ic_siprr;
-	uint	ic_scprrh;
-	uint	ic_scprrl;
-	uint	ic_simrh;
-	uint	ic_simrl;
-	uint	ic_siexr;
-	char	res2[88];
-} intctl8260_t;
-
-/* Clocks and Reset.
-*/
-typedef struct clk_and_reset {
-	uint	car_sccr;
-	char	res1[4];
-	uint	car_scmr;
-	char	res2[4];
-	uint	car_rsr;
-	uint	car_rmr;
-	char	res[104];
-} car8260_t;
-
-/* Input/Output Port control/status registers.
- * Names consistent with processor manual, although they are different
- * from the original 8xx names.......
- */
-typedef struct io_port {
-	uint	iop_pdira;
-	uint	iop_ppara;
-	uint	iop_psora;
-	uint	iop_podra;
-	uint	iop_pdata;
-	char	res1[12];
-	uint	iop_pdirb;
-	uint	iop_pparb;
-	uint	iop_psorb;
-	uint	iop_podrb;
-	uint	iop_pdatb;
-	char	res2[12];
-	uint	iop_pdirc;
-	uint	iop_pparc;
-	uint	iop_psorc;
-	uint	iop_podrc;
-	uint	iop_pdatc;
-	char	res3[12];
-	uint	iop_pdird;
-	uint	iop_ppard;
-	uint	iop_psord;
-	uint	iop_podrd;
-	uint	iop_pdatd;
-	char	res4[12];
-} iop8260_t;
-
-/* Communication Processor Module Timers
-*/
-typedef struct cpm_timers {
-	u_char	cpmt_tgcr1;
-	char	res1[3];
-	u_char	cpmt_tgcr2;
-	char	res2[11];
-	ushort	cpmt_tmr1;
-	ushort	cpmt_tmr2;
-	ushort	cpmt_trr1;
-	ushort	cpmt_trr2;
-	ushort	cpmt_tcr1;
-	ushort	cpmt_tcr2;
-	ushort	cpmt_tcn1;
-	ushort	cpmt_tcn2;
-	ushort	cpmt_tmr3;
-	ushort	cpmt_tmr4;
-	ushort	cpmt_trr3;
-	ushort	cpmt_trr4;
-	ushort	cpmt_tcr3;
-	ushort	cpmt_tcr4;
-	ushort	cpmt_tcn3;
-	ushort	cpmt_tcn4;
-	ushort	cpmt_ter1;
-	ushort	cpmt_ter2;
-	ushort	cpmt_ter3;
-	ushort	cpmt_ter4;
-	char	res3[584];
-} cpmtimer8260_t;
-
-/* DMA control/status registers.
-*/
-typedef struct sdma_csr {
-	char	res0[24];
-	u_char	sdma_sdsr;
-	char	res1[3];
-	u_char	sdma_sdmr;
-	char	res2[3];
-	u_char	sdma_idsr1;
-	char	res3[3];
-	u_char	sdma_idmr1;
-	char	res4[3];
-	u_char	sdma_idsr2;
-	char	res5[3];
-	u_char	sdma_idmr2;
-	char	res6[3];
-	u_char	sdma_idsr3;
-	char	res7[3];
-	u_char	sdma_idmr3;
-	char	res8[3];
-	u_char	sdma_idsr4;
-	char	res9[3];
-	u_char	sdma_idmr4;
-	char	res10[707];
-} sdma8260_t;
-
-/* Fast controllers
-*/
-typedef struct fcc {
-	uint	fcc_gfmr;
-	uint	fcc_fpsmr;
-	ushort	fcc_ftodr;
-	char	res1[2];
-	ushort	fcc_fdsr;
-	char	res2[2];
-	ushort	fcc_fcce;
-	char	res3[2];
-	ushort	fcc_fccm;
-	char	res4[2];
-	u_char	fcc_fccs;
-	char	res5[3];
-	u_char	fcc_ftirr_phy[4];
-} fcc_t;
-
-/* I2C
-*/
-typedef struct i2c {
-	u_char	i2c_i2mod;
-	char	res1[3];
-	u_char	i2c_i2add;
-	char	res2[3];
-	u_char	i2c_i2brg;
-	char	res3[3];
-	u_char	i2c_i2com;
-	char	res4[3];
-	u_char	i2c_i2cer;
-	char	res5[3];
-	u_char	i2c_i2cmr;
-	char	res6[331];
-} i2c8260_t;
-
-typedef struct scc {		/* Serial communication channels */
-	uint	scc_gsmrl;
-	uint	scc_gsmrh;
-	ushort	scc_pmsr;
-	char	res1[2];
-	ushort	scc_todr;
-	ushort	scc_dsr;
-	ushort	scc_scce;
-	char	res2[2];
-	ushort	scc_sccm;
-	char	res3;
-	u_char	scc_sccs;
-	char	res4[8];
-} scc_t;
-
-typedef struct smc {		/* Serial management channels */
-	char	res1[2];
-	ushort	smc_smcmr;
-	char	res2[2];
-	u_char	smc_smce;
-	char	res3[3];
-	u_char	smc_smcm;
-	char	res4[5];
-} smc_t;
-
-/* Serial Peripheral Interface.
-*/
-typedef struct spi {
-	ushort	spi_spmode;
-	char	res1[4];
-	u_char	spi_spie;
-	char	res2[3];
-	u_char	spi_spim;
-	char	res3[2];
-	u_char	spi_spcom;
-	char	res4[82];
-} spi_t;
-
-/* CPM Mux.
-*/
-typedef struct cpmux {
-	u_char	cmx_si1cr;
-	char	res1;
-	u_char	cmx_si2cr;
-	char	res2;
-	uint	cmx_fcr;
-	uint	cmx_scr;
-	u_char	cmx_smr;
-	char	res3;
-	ushort	cmx_uar;
-	char	res4[16];
-} cpmux_t;
-
-/* SIRAM control
-*/
-typedef struct siram {
-	ushort	si_amr;
-	ushort	si_bmr;
-	ushort	si_cmr;
-	ushort	si_dmr;
-	u_char	si_gmr;
-	char	res1;
-	u_char	si_cmdr;
-	char	res2;
-	u_char	si_str;
-	char	res3;
-	ushort	si_rsr;
-} siramctl_t;
-
-typedef struct mcc {
-	ushort	mcc_mcce;
-	char	res1[2];
-	ushort	mcc_mccm;
-	char	res2[2];
-	u_char	mcc_mccf;
-	char	res3[7];
-} mcc_t;
-
-typedef struct comm_proc {
-	uint	cp_cpcr;
-	uint	cp_rccr;
-	char	res1[14];
-	ushort	cp_rter;
-	char	res2[2];
-	ushort	cp_rtmr;
-	ushort	cp_rtscr;
-	char	res3[2];
-	uint	cp_rtsr;
-	char	res4[12];
-} cpm8260_t;
-
-/* ...and the whole thing wrapped up....
-*/
-typedef struct immap {
-	/* Some references are into the unique and known dpram spaces,
-	 * others are from the generic base.
-	 */
-#define im_dprambase	im_dpram1
-	u_char		im_dpram1[16*1024];
-	char		res1[16*1024];
-	u_char		im_dpram2[4*1024];
-	char		res2[8*1024];
-	u_char		im_dpram3[4*1024];
-	char		res3[16*1024];
-
-	sysconf8260_t	im_siu_conf;	/* SIU Configuration */
-	memctl8260_t	im_memctl;	/* Memory Controller */
-	sit8260_t	im_sit;		/* System Integration Timers */
-	intctl8260_t	im_intctl;	/* Interrupt Controller */
-	car8260_t	im_clkrst;	/* Clocks and reset */
-	iop8260_t	im_ioport;	/* IO Port control/status */
-	cpmtimer8260_t	im_cpmtimer;	/* CPM timers */
-	sdma8260_t	im_sdma;	/* SDMA control/status */
-
-	fcc_t		im_fcc[3];	/* Three FCCs */
-
-	char		res4[159];
-
-	/* First set of baud rate generators.
-	*/
-	char		res4a[496];
-	uint		im_brgc5;
-	uint		im_brgc6;
-	uint		im_brgc7;
-	uint		im_brgc8;
-
-	char		res5[608];
-
-	i2c8260_t	im_i2c;		/* I2C control/status */
-	cpm8260_t	im_cpm;		/* Communication processor */
-
-	/* Second set of baud rate generators.
-	*/
-	uint		im_brgc1;
-	uint		im_brgc2;
-	uint		im_brgc3;
-	uint		im_brgc4;
-
-	scc_t		im_scc[4];	/* Four SCCs */
-	smc_t		im_smc[2];	/* Couple of SMCs */
-	spi_t		im_spi;		/* A SPI */
-	cpmux_t		im_cpmux;	/* CPM clock route mux */
-	siramctl_t	im_siramctl1;	/* First SI RAM Control */
-	mcc_t		im_mcc1;	/* First MCC */
-	siramctl_t	im_siramctl2;	/* Second SI RAM Control */
-	mcc_t		im_mcc2;	/* Second MCC */
-
-	char		res6[1184];
-
-	ushort		im_si1txram[256];
-	char		res7[512];
-	ushort		im_si1rxram[256];
-	char		res8[512];
-	ushort		im_si2txram[256];
-	char		res9[512];
-	ushort		im_si2rxram[256];
-	char		res10[512];
-	char		res11[4096];
-} immap_t;
-
-extern immap_t	*immr;
-
-#endif /* __IMMAP_82XX__ */
-#endif /* __KERNEL__ */
--- diff/include/asm-ppc64/cpumask.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_PPC64_CPUMASK_H
-#define _ASM_PPC64_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_PPC64_CPUMASK_H */
--- diff/include/asm-ppc64/init.h	2004-05-19 22:12:51.000000000 +0100
+++ source/include/asm-ppc64/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#error "<asm/init.h> should never be used - use <linux/init.h> instead"
--- diff/include/asm-s390/cpumask.h	2004-05-19 22:12:52.000000000 +0100
+++ source/include/asm-s390/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_S390_CPUMASK_H
-#define _ASM_S390_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_S390_CPUMASK_H */
--- diff/include/asm-s390/init.h	2004-05-19 22:12:52.000000000 +0100
+++ source/include/asm-s390/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-/*
- *  include/asm-s390/init.h
- *
- *  S390 version
- */
-
-#error "<asm/init.h> should never be used - use <linux/init.h> instead"
--- diff/include/asm-sh/cpumask.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_SH_CPUMASK_H
-#define _ASM_SH_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_SH_CPUMASK_H */
--- diff/include/asm-sh/init.h	2004-05-19 22:12:53.000000000 +0100
+++ source/include/asm-sh/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#error "<asm/init.h> should never be used - use <linux/init.h> instead"
--- diff/include/asm-sparc/cpumask.h	2004-05-19 22:12:55.000000000 +0100
+++ source/include/asm-sparc/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_SPARC_CPUMASK_H
-#define _ASM_SPARC_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_SPARC_CPUMASK_H */
--- diff/include/asm-sparc/init.h	2004-05-19 22:12:55.000000000 +0100
+++ source/include/asm-sparc/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#error "<asm/init.h> should never be used - use <linux/init.h> instead"
--- diff/include/asm-sparc64/cpumask.h	2004-05-19 22:12:56.000000000 +0100
+++ source/include/asm-sparc64/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_SPARC64_CPUMASK_H
-#define _ASM_SPARC64_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_SPARC64_CPUMASK_H */
--- diff/include/asm-sparc64/init.h	2004-05-19 22:12:56.000000000 +0100
+++ source/include/asm-sparc64/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#error "<asm/init.h> should never be used - use <linux/init.h> instead"
--- diff/include/asm-um/cpumask.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-um/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_UM_CPUMASK_H
-#define _ASM_UM_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_UM_CPUMASK_H */
--- diff/include/asm-um/init.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-um/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-#ifndef _UM_INIT_H
-#define _UM_INIT_H
-
-#ifdef notdef
-#define __init
-#define __initdata
-#define __initfunc(__arginit) __arginit
-#define __cacheline_aligned 
-#endif
-
-#endif
--- diff/include/asm-v850/cpumask.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-v850/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_V850_CPUMASK_H
-#define _ASM_V850_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_V850_CPUMASK_H */
--- diff/include/asm-x86_64/cpumask.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-x86_64/cpumask.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#ifndef _ASM_X86_64_CPUMASK_H
-#define _ASM_X86_64_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_X86_64_CPUMASK_H */
--- diff/include/asm-x86_64/init.h	2004-05-19 22:12:57.000000000 +0100
+++ source/include/asm-x86_64/init.h	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#error "<asm/init.h> should never be used - use <linux/init.h> instead"
--- diff/include/linux/802_11.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/802_11.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,191 +0,0 @@
-#ifndef IEEE_802_11
-#define IEEE_802_11  
-
-#include <linux/types.h>
-
-enum ieee_802_11_link_status_failure_reason {
-	reserved0, Unspecified=1, Previous_not_valid, 
-	Sender_Quits_ESS_or_IBSS,
-	Due_Inactivity, AP_Overload, 
-	Class_2_from_NonAuth,
-	Class_3_from_NonAuth,
-	Sender_Quits_BSS,
-	Association_requester_not_authenticated,
-	Reserved10 
-};
-	
-	
-#define IEEE_802_11_LINK_STATUS_FAILURE_REASON_STRINGS \
-{	\
-        {reserved0,		0xff," Reserved reason "},\
-        {Unspecified,		0xff," Unspecified Reason "},\
-        {Previous_not_valid,	0xff," Previous Authentication no longer valid "},\
-        {Sender_Quits_ESS_or_IBSS,0xff," Deauthenticated because sending station is leaving (has left) IBSS or ESS "},\
-        {Due_Inactivity,	0xff," Disassociated due to inactivity "},\
-        {AP_Overload,		0xff," Disassociated because AP is unable to handle all currently associated stations "},\
-        {Class_2_from_NonAuth,	0xff," Class 2 frame received from non-Authenticated station"},\
-        {Class_3_from_NonAuth,	0xff," Class 3 frame received from non­Associated station"},\
-        {Sender_Quits_BSS,	0xff," Disassociated because sending station is leaving (has left) BSS"},\
-        {Association_requester_not_authenticated,0xff," Station requesting (Re)Association is not Authenticated with responding station"},\
-        {Reserved10,		0xff," Reserved"},\
-	{0,0,NULL}\
-};
-
-
-
-struct ieee_802_11_header {
-	u16	frame_control;// needs to be subtyped
-	u16	duration;
-	u8	mac1[6];
-	u8	mac2[6];
-	u8	mac3[6];
-	u16	SeqCtl;
-	u8	mac4[6];
-	u16	gapLen;
-	u8	gap[8];
-};
-
-
-struct ieee_802_3_header {
-
-	u16	status;
-	u16	payload_length;
-	u8	dst_mac[6];
-	u8	src_mac[6];
-	
-};
-
-#define P80211_OUI_LEN 3
-
-struct ieee_802_11_snap_header { 
-
-	u8    dsap;   /* always 0xAA */
-	u8    ssap;   /* always 0xAA */
-	u8    ctrl;   /* always 0x03 */
-	u8    oui[P80211_OUI_LEN];    /* organizational universal id */
-
-} __attribute__ ((packed));
-
-#define P80211_LLC_OUI_LEN 3
-
-struct ieee_802_11_802_1H_header {
-
-	u8    dsap;   
-	u8    ssap;   /* always 0xAA */
-	u8    ctrl;   /* always 0x03 */
-	u8    oui[P80211_OUI_LEN];    /* organizational universal id */
-	u16    unknown1;      /* packet type ID fields */
-	u16    unknown2;		/* here is something like length in some cases */
-} __attribute__ ((packed));
-
-struct ieee_802_11_802_2_header {
-
-	u8    dsap;   
-	u8    ssap;   /* always 0xAA */
-	u8    ctrl;   /* always 0x03 */
-	u8    oui[P80211_OUI_LEN];    /* organizational universal id */
-	u8    type;      /* packet type ID field. i guess,  */
-
-} __attribute__ ((packed));
-
-
-
-// following is incoplete and may be incorrect and need reorganization
-
-#define ieee_802_11_frame_type_Management	0x00
-#define ieee_802_11_frame_type_Control		0x01
-#define ieee_802_11_frame_type_Data		0x10
-#define ieee_802_11_frame_type_Reserved		0x11
-
-#define ieee_802_11_frame_subtype_Association_Req	0x0 // Association Request
-#define ieee_802_11_frame_subtype_Association_Resp	0x1 // Association Response
-#define ieee_802_11_frame_subtype_Reassociation_Req	0x2 // Reassociation Request
-#define ieee_802_11_frame_subtype_Reassociation_Resp	0x3 // Reassociation Response
-#define ieee_802_11_frame_subtype_Probe_Req		0x4 // Probe Request
-#define ieee_802_11_frame_subtype_Probe_Resp		0x5 // Probe Response
-#define ieee_802_11_frame_subtype_Beacon 		0x8 // Beacon
-#define ieee_802_11_frame_subtype_ATIM 			0x9 // ATIM
-#define ieee_802_11_frame_subtype_Disassociation 	0xA // Disassociation
-#define ieee_802_11_frame_subtype_Authentication 	0xB // Authentication
-#define ieee_802_11_frame_subtype_Deauthentication 	0xC // Deauthentication
-#define ieee_802_11_frame_subtype_PS_Poll 		0xA // PS-Poll
-#define ieee_802_11_frame_subtype_RTS 			0xB // RTS
-#define ieee_802_11_frame_subtype_CTS 			0xC // CTS
-#define ieee_802_11_frame_subtype_ACK 			0xD // ACK
-#define ieee_802_11_frame_subtype_CFEnd 		0xE // CF-End
-#define ieee_802_11_frame_subtype_CFEnd_CFAck 		0xF // CF-End + CF-Ack
-#define ieee_802_11_frame_subtype_Data 			0x0 // Data
-#define ieee_802_11_frame_subtype_Data_CFAck 		0x1 // Data + CF-Ack
-#define ieee_802_11_frame_subtype_Data_CF_Poll 		0x2 // Data + CF-Poll
-#define ieee_802_11_frame_subtype_Data_CF_AckCF_Poll 	0x3 // Data + CF-Ack + CF-Poll
-#define ieee_802_11_frame_subtype_NullFunction 		0x4 // Null Function (no data)
-#define ieee_802_11_frame_subtype_CF_Ack 		0x5 // CF-Ack (no data)
-#define ieee_802_11_frame_subtype_CF_Poll 		0x6 // CF-Poll (no data)
-#define ieee_802_11_frame_subtype_CF_AckCF_Poll 	0x7 // CF-Ack + CF-Poll (no data)
-
-
-#define ieee_802_11_frame_subtype_strings {\
-	{ ieee_802_11_frame_subtype_Association_Req,	0xF,"f  Association Request"},\
-	{ ieee_802_11_frame_subtype_Association_Resp,	0xF,"1  Association Response"},\
-	{ ieee_802_11_frame_subtype_Reassociation_Req,	0xF,"2  Reassociation Request"},\
-	{ ieee_802_11_frame_subtype_Reassociation_Resp,	0xF,"3  Reassociation Response"},\
-	{ ieee_802_11_frame_subtype_Probe_Req	,	0xF,"4  Probe Request"},\
-	{ ieee_802_11_frame_subtype_Probe_Resp	,	0xF,"5  Probe Response"},\
-	{ ieee_802_11_frame_subtype_Beacon 	,	0xF,"8  Beacon"},\
-	{ ieee_802_11_frame_subtype_ATIM 	,	0xF,"9  ATIM"},\
-	{ ieee_802_11_frame_subtype_Disassociation,	0xF,"A  Disassociation"},\
-	{ ieee_802_11_frame_subtype_Authentication,	0xF,"B  Authentication"},\
-	{ ieee_802_11_frame_subtype_Deauthentication,	0xF,"C  Deauthentication"},\
-	{ ieee_802_11_frame_subtype_PS_Poll 	,	0xF,"A  PS-Poll"},\
-	{ ieee_802_11_frame_subtype_RTS 	,	0xF,"B  RTS"},\
-	{ ieee_802_11_frame_subtype_CTS 	,	0xF,"C  CTS"},\
-	{ ieee_802_11_frame_subtype_ACK 	,	0xF,"D  ACK"},\
-	{ ieee_802_11_frame_subtype_CFEnd	,	0xF,"E  CF-End"},\
-	{ ieee_802_11_frame_subtype_CFEnd_CFAck ,	0xF,"F  CF-End + CF-Ack"},\
-	{ ieee_802_11_frame_subtype_Data 	,	0xF,"0  Data"},\
-	{ ieee_802_11_frame_subtype_Data_CFAck 	,	0xF,"1  Data + CF-Ack"},\
-	{ ieee_802_11_frame_subtype_Data_CFPoll ,	0xF,"2  Data + CF-Poll"},\
-	{ ieee_802_11_frame_subtype_Data_CFAck_CFPoll,	0xF,"3  Data + CF-Ack + CF-Poll"},\
-	{ ieee_802_11_frame_subtype_Null_Function ,	0xF,"4  Null Function (no data)"},\
-	{ ieee_802_11_frame_subtype_CFAck ,		0xF,"5  CF-Ack (no data)"},\
-	{ ieee_802_11_frame_subtype_CFPoll ,		0xF,"6  CF-Poll (no data)"},\
-	{ ieee_802_11_frame_subtype_CFAck_CFPoll,	0xF,"y7  CF-Ack + CF-Poll (no data)"},\
-	{ 0,0,NULL}\
-}
-struct ieee_802_11_frame_subtype_class {
-	u8	subtype;
-	u8	mask;
-	u8	class;
-	u8	type;
-};
-#define ieee_802_11_frame_subtype_classes {\
-	{ ieee_802_11_frame_subtype_Association_Req,	0xF,2,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_Association_Resp,	0xF,2,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_Reassociation_Req,	0xF,2,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_Reassociation_Resp,	0xF,2,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_Probe_Req	,	0xF,1,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_Probe_Resp	,	0xF,1,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_Beacon 	,	0xF,1,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_ATIM 	,	0xF,1,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_Disassociation,	0xF,2,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_Authentication,	0xF,1,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_Deauthentication,	0xF,3,ieee_802_11_frame_type_Management},\
-	{ ieee_802_11_frame_subtype_PS-Poll 	,	0xF,3,ieee_802_11_frame_type_Control},\
-	{ ieee_802_11_frame_subtype_RTS 	,	0xF,1,ieee_802_11_frame_type_Control},\
-	{ ieee_802_11_frame_subtype_CTS 	,	0xF,1,ieee_802_11_frame_type_Control},\
-	{ ieee_802_11_frame_subtype_ACK 	,	0xF,1,ieee_802_11_frame_type_Control},\
-	{ ieee_802_11_frame_subtype_CFEnd	,	0xF,1,ieee_802_11_frame_type_Control},\
-	{ ieee_802_11_frame_subtype_CFEnd_CFAck ,	0xF,1,ieee_802_11_frame_type_Control},\
-	{ ieee_802_11_frame_subtype_Data 	,	0xF,3,ieee_802_11_frame_type_Data},\
-	{ ieee_802_11_frame_subtype_Data_CFAck 	,	0xF,3,ieee_802_11_frame_type_Data},\
-	{ ieee_802_11_frame_subtype_Data_CF_Poll 	0xF,3,ieee_802_11_frame_type_Data},\
-	{ ieee_802_11_frame_subtype_Data_CF_AckCF_Poll,	0xF,3,ieee_802_11_frame_type_Data},\
-	{ ieee_802_11_frame_subtype_NullFunction 	0xF,1,ieee_802_11_frame_type_Data},\
-	{ ieee_802_11_frame_subtype_CF_Ack ,		0xF,1,ieee_802_11_frame_type_Data},\
-	{ ieee_802_11_frame_subtype_CF_Poll ,		0xF,1,ieee_802_11_frame_type_Data},\
-	{ ieee_802_11_frame_subtype_CF_AckCF_Poll,	0xF,1,ieee_802_11_frame_type_Data},\
-	{ 0,0,NULL}\
-}
-
-
-#endif
--- diff/include/linux/acpi_serial.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/acpi_serial.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,107 +0,0 @@
-/*
- *  linux/include/linux/acpi_serial.h
- *
- *  Copyright (C) 2000  Hewlett-Packard Co.
- *  Copyright (C) 2000  Khalid Aziz <khalid_aziz@hp.com>
- *
- *  Definitions for ACPI defined serial ports (headless console and 
- *  debug ports)
- *
- */
-
-#include <linux/serial.h>
-
-extern void setup_serial_acpi(void *);
-
-#define ACPI_SIG_LEN		4
-
-/* ACPI table signatures */
-#define ACPI_SPCRT_SIGNATURE	"SPCR"
-#define ACPI_DBGPT_SIGNATURE	"DBGP"
-
-/* Interface type as defined in ACPI serial port tables */
-#define ACPI_SERIAL_INTFC_16550	0
-#define ACPI_SERIAL_INTFC_16450	1
-
-/* Interrupt types for ACPI serial port tables */
-#define ACPI_SERIAL_INT_PCAT	0x01
-#define ACPI_SERIAL_INT_APIC	0x02
-#define ACPI_SERIAL_INT_SAPIC	0x04
-
-/* Baud rates as defined in ACPI serial port tables */
-#define ACPI_SERIAL_BAUD_9600		3
-#define ACPI_SERIAL_BAUD_19200		4
-#define ACPI_SERIAL_BAUD_57600		6
-#define ACPI_SERIAL_BAUD_115200		7
-
-/* Parity as defined in ACPI serial port tables */
-#define ACPI_SERIAL_PARITY_NONE		0
-
-/* Flow control methods as defined in ACPI serial port tables */
-#define ACPI_SERIAL_FLOW_DCD	0x01
-#define ACPI_SERIAL_FLOW_RTS	0x02
-#define ACPI_SERIAL_FLOW_XON	0x04
-
-/* Terminal types as defined in ACPI serial port tables */
-#define ACPI_SERIAL_TERM_VT100		0
-#define ACPI_SERIAL_TERM_VT100X	1
-
-/* PCI Flags as defined by SPCR table */
-#define ACPI_SERIAL_PCIFLAG_PNP	0x00000001
-
-/* Space ID as defined in base address structure in ACPI serial port tables */
-#define ACPI_SERIAL_MEM_SPACE		0
-#define ACPI_SERIAL_IO_SPACE		1
-#define ACPI_SERIAL_PCICONF_SPACE	2
-
-/* 
- * Generic Register Address Structure - as defined by Microsoft 
- * in http://www.microsoft.com/hwdev/onnow/download/LFreeACPI.doc
- *
-*/
-typedef struct {
-	u8  space_id;
-	u8  bit_width;
-	u8  bit_offset;
-	u8  resv;
-	u32 addrl;
-	u32 addrh;
-} gen_regaddr;
-
-/* Space ID for generic register address structure */
-#define REGADDR_SPACE_SYSMEM	0
-#define REGADDR_SPACE_SYSIO	1
-#define REGADDR_SPACE_PCICONFIG	2
-
-/* Serial Port Console Redirection and Debug Port Table formats */
-typedef struct {
-	u8 signature[4];
-	u32 length;
-	u8  rev;
-	u8  chksum;
-	u8  oemid[6];
-	u8  oem_tabid[8];
-	u32 oem_rev;
-	u8  creator_id[4];
-	u32 creator_rev;
-	u8  intfc_type;
-	u8  resv1[3];
-	gen_regaddr base_addr;
-	u8  int_type;
-	u8  irq;
-	u8  global_int[4];
-	u8  baud;
-	u8  parity;
-	u8  stop_bits;
-	u8  flow_ctrl;
-	u8  termtype;
-	u8  language;
-	u16 pci_dev_id;
-	u16 pci_vendor_id;
-	u8  pci_bus;
-	u8  pci_dev;
-	u8  pci_func;
-	u8  pci_flags[4];
-	u8  pci_seg;
-	u32 resv2;
-} acpi_ser_t;
--- diff/include/linux/adb_mouse.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/adb_mouse.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-#ifndef _LINUX_ADB_MOUSE_H
-#define _LINUX_ADB_MOUSE_H
-
-/*
- * linux/include/linux/mac_mouse.h
- * header file for Macintosh ADB mouse driver
- * 27-10-97 Michael Schmitz
- * copied from:
- * header file for Atari Mouse driver
- * by Robert de Vries (robert@and.nl) on 19Jul93
- */
-
-struct mouse_status {
-	char		buttons;
-	short		dx;
-	short		dy;
-	int		ready;
-	int		active;
-	struct wait_queue *wait;
-	struct fasync_struct *fasyncptr;
-};
-
-#endif
--- diff/include/linux/atapi.h	2004-05-19 22:12:58.000000000 +0100
+++ source/include/linux/atapi.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,370 +0,0 @@
-/**** vi:set ts=8 sts=8 sw=8:************************************************
- *
- * Copyright (C) 2002 Marcin Dalecki <martin@dalecki.de>
- *
- * 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.
- *
- * 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.
- */
-
-#include <linux/types.h>
-#include <asm/byteorder.h>
-
-/*
- * With each packet command, we allocate a buffer.
- * This is used for several packet
- * commands (Not for READ/WRITE commands).
- */
-#define IDEFLOPPY_PC_BUFFER_SIZE	256
-#define IDETAPE_PC_BUFFER_SIZE		256
-
-/*
- * Packet flags bits.
- */
-
-#define	PC_ABORT		0	/* set when an error is considered normal - we won't retry */
-#define PC_WAIT_FOR_DSC		1	/* 1 when polling for DSC on a media access command */
-#define PC_DMA_RECOMMENDED	2	/* 1 when we prefer to use DMA if possible */
-#define	PC_DMA_IN_PROGRESS	3	/* 1 while DMA in progress */
-#define	PC_DMA_ERROR		4	/* 1 when encountered problem during DMA */
-#define	PC_WRITING		5	/* data direction */
-#define	PC_SUPPRESS_ERROR	6	/* suppress error reporting */
-#define PC_TRANSFORM		7	/* transform SCSI commands */
-
-/* This struct get's shared between different drivers.
- */
-struct atapi_packet_command {
-	u8 c[12];			/* Actual packet bytes */
-	char *buffer;			/* Data buffer */
-	int buffer_size;		/* Size of our data buffer */
-	char *current_position;		/* Pointer into the above buffer */
-	int request_transfer;		/* Bytes to transfer */
-	int actually_transferred;	/* Bytes actually transferred */
-
-	unsigned long flags;		/* Status/Action bit flags: long for set_bit */
-
-	/* FIXME: the following is ugly as hell, but the only way we can start
-	 * actually to unify the code.
-	 */
-	/* driver specific data. */
-	/* floppy/tape */
-	int retries;				/* On each retry, we increment retries */
-	int error;				/* Error code */
-	char *b_data;				/* Pointer which runs on the buffers */
-	unsigned int b_count;			/* Missing/Available data on the current buffer */
-	u8 pc_buffer[IDEFLOPPY_PC_BUFFER_SIZE];	/* Temporary buffer */
-	/* Called when this packet command is completed */
-	void (*callback) (struct ata_device *, struct request *);
-
-	/* only tape */
-	struct bio *bio;
-
-	/* only scsi */
-	struct {
-		unsigned int b_count;			/* Bytes transferred from current entry */
-		struct scatterlist *sg;			/* Scatter gather table */
-		struct scsi_cmnd *scsi_cmd;		/* SCSI command */
-		void (*done)(struct scsi_cmnd *);	/* Scsi completion routine */
-		unsigned long timeout;			/* Command timeout */
-	} s;
-};
-
-/*
- *	ATAPI Status Register.
- */
-typedef union {
-	u8 all			: 8;
-	struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-		u8 check	: 1;	/* Error occurred */
-		u8 idx		: 1;	/* Reserved */
-		u8 corr		: 1;	/* Correctable error occurred */
-		u8 drq		: 1;	/* Data is request by the device */
-		u8 dsc		: 1;	/* Media access command finished / Buffer availability */
-		u8 reserved5	: 1;	/* Reserved */
-		u8 drdy		: 1;	/* Ignored for ATAPI commands (ready to accept ATA command) */
-		u8 bsy		: 1;	/* The device has access to the command block */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-		u8 bsy		: 1;
-		u8 drdy		: 1;
-		u8 reserved5	: 1;
-		u8 dsc		: 1;
-		u8 drq		: 1;
-		u8 corr		: 1;
-		u8 idx		: 1;
-		u8 check	: 1;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	} b;
-} atapi_status_reg_t;
-
-/*
- *	ATAPI error register.
- */
-typedef union {
-	u8 all			: 8;
-	struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-		u8 ili		: 1;	/* Illegal Length Indication */
-		u8 eom		: 1;	/* End Of Media Detected */
-		u8 abrt		: 1;	/* Aborted command - As defined by ATA */
-		u8 mcr		: 1;	/* Media Change Requested - As defined by ATA */
-		u8 sense_key	: 4;	/* Sense key of the last failed packet command */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-		u8 sense_key	: 4;
-		u8 mcr		: 1;
-		u8 abrt		: 1;
-		u8 eom		: 1;
-		u8 ili		: 1;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	} b;
-} atapi_error_reg_t;
-
-/* Currently unused, but please do not remove.  --bkz */
-/*
- *	ATAPI Feature Register.
- */
-typedef union {
-	u8 all			: 8;
-	struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-		u8 dma		: 1;	/* Using DMA or PIO */
-		u8 reserved321	: 3;	/* Reserved */
-		u8 reserved654	: 3;	/* Reserved (Tag Type) */
-		u8 reserved7	: 1;	/* Reserved */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-		u8 reserved7	: 1;
-		u8 reserved654	: 3;
-		u8 reserved321	: 3;
-		u8 dma		: 1;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	} b;
-} atapi_feature_reg_t;
-
-/*
- *	ATAPI Byte Count Register.
- */
-typedef union {
-	u16 all			: 16;
-	struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-		u8 low;			/* LSB */
-		u8 high;		/* MSB */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-		u8 high;
-		u8 low;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	} b;
-} atapi_bcount_reg_t;
-
-/*
- *	ATAPI Interrupt Reason Register.
- */
-typedef union {
-	u8 all			: 8;
-	struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-		u8 cod		: 1;	/* Information transferred is command (1) or data (0) */
-		u8 io		: 1;	/* The device requests us to read (1) or write (0) */
-		u8 reserved	: 6;	/* Reserved */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-		u8 reserved	: 6;
-		u8 io		: 1;
-		u8 cod		: 1;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	} b;
-} atapi_ireason_reg_t;
-
-/* Currently unused, but please do not remove.  --bkz */
-/*
- *	ATAPI Drive Select Register.
- */
-typedef union {
-	u8 all			:8;
-	struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-		u8 sam_lun	:3;	/* Logical unit number */
-		u8 reserved3	:1;	/* Reserved */
-		u8 drv		:1;	/* The responding drive will be drive 0 (0) or drive 1 (1) */
-		u8 one5		:1;	/* Should be set to 1 */
-		u8 reserved6	:1;	/* Reserved */
-		u8 one7		:1;	/* Should be set to 1 */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-		u8 one7		:1;
-		u8 reserved6	:1;
-		u8 one5		:1;
-		u8 drv		:1;
-		u8 reserved3	:1;
-		u8 sam_lun	:3;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	} b;
-} atapi_drivesel_reg_t;
-
-/* Currently unused, but please do not remove.  --bkz */
-/*
- *	ATAPI Device Control Register.
- */
-typedef union {
-	u8 all			: 8;
-	struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-		u8 zero0	: 1;	/* Should be set to zero */
-		u8 nien		: 1;	/* Device interrupt is disabled (1) or enabled (0) */
-		u8 srst		: 1;	/* ATA software reset. ATAPI devices should use the new ATAPI srst. */
-		u8 one3		: 1;	/* Should be set to 1 */
-		u8 reserved4567	: 4;	/* Reserved */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-		u8 reserved4567	: 4;
-		u8 one3		: 1;
-		u8 srst		: 1;
-		u8 nien		: 1;
-		u8 zero0	: 1;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	} b;
-} atapi_control_reg_t;
-
-/*
- *	The following is used to format the general configuration word
- *	of the ATAPI IDENTIFY DEVICE command.
- */
-struct atapi_id_gcw {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-	u8 packet_size		: 2;	/* Packet Size */
-	u8 reserved234		: 3;	/* Reserved */
-	u8 drq_type		: 2;	/* Command packet DRQ type */
-	u8 removable		: 1;	/* Removable media */
-	u8 device_type		: 5;	/* Device type */
-	u8 reserved13		: 1;	/* Reserved */
-	u8 protocol		: 2;	/* Protocol type */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-	u8 protocol		: 2;
-	u8 reserved13		: 1;
-	u8 device_type		: 5;
-	u8 removable		: 1;
-	u8 drq_type		: 2;
-	u8 reserved234		: 3;
-	u8 packet_size		: 2;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-};
-
-/*
- *	INQUIRY packet command - Data Format.
- */
-typedef struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-	u8	device_type	: 5;	/* Peripheral Device Type */
-	u8	reserved0_765	: 3;	/* Peripheral Qualifier - Reserved */
-	u8	reserved1_6t0	: 7;	/* Reserved */
-	u8	rmb		: 1;	/* Removable Medium Bit */
-	u8	ansi_version	: 3;	/* ANSI Version */
-	u8	ecma_version	: 3;	/* ECMA Version */
-	u8	iso_version	: 2;	/* ISO Version */
-	u8	response_format : 4;	/* Response Data Format */
-	u8	reserved3_45	: 2;	/* Reserved */
-	u8	reserved3_6	: 1;	/* TrmIOP - Reserved */
-	u8	reserved3_7	: 1;	/* AENC - Reserved */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-	u8	reserved0_765	: 3;
-	u8	device_type	: 5;
-	u8	rmb		: 1;
-	u8	reserved1_6t0	: 7;
-	u8	iso_version	: 2;
-	u8	ecma_version	: 3;
-	u8	ansi_version	: 3;
-	u8	reserved3_7	: 1;
-	u8	reserved3_6	: 1;
-	u8	reserved3_45	: 2;
-	u8	response_format : 4;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	u8	additional_length;	/* Additional Length (total_length-4) */
-	u8	rsv5, rsv6, rsv7;	/* Reserved */
-	u8	vendor_id[8];		/* Vendor Identification */
-	u8	product_id[16];		/* Product Identification */
-	u8	revision_level[4];	/* Revision Level */
-	u8	vendor_specific[20];	/* Vendor Specific - Optional */
-	u8	reserved56t95[40];	/* Reserved - Optional */
-					/* Additional information may be returned */
-} atapi_inquiry_result_t;
-
-/*
- *	REQUEST SENSE packet command result - Data Format.
- */
-typedef struct atapi_request_sense {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-	u8	error_code	: 7;	/* Error Code (0x70 - current or 0x71 - deferred) */
-	u8	valid		: 1;	/* The information field conforms to standard */
-	u8	reserved1	: 8;	/* Reserved (Segment Number) */
-	u8	sense_key	: 4;	/* Sense Key */
-	u8	reserved2_4	: 1;	/* Reserved */
-	u8	ili		: 1;	/* Incorrect Length Indicator */
-	u8	eom		: 1;	/* End Of Medium */
-	u8	filemark	: 1;	/* Filemark */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-	u8	valid		: 1;
-	u8	error_code	: 7;
-	u8	reserved1	: 8;
-	u8	filemark	: 1;
-	u8	eom		: 1;
-	u8	ili		: 1;
-	u8	reserved2_4	: 1;
-	u8	sense_key	: 4;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	u32	information __attribute__ ((packed));
-	u8	asl;			/* Additional sense length (n-7) */
-	u32	command_specific;	/* Additional command specific information */
-	u8	asc;			/* Additional Sense Code */
-	u8	ascq;			/* Additional Sense Code Qualifier */
-	u8	replaceable_unit_code;	/* Field Replaceable Unit Code */
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-	u8	sk_specific1	: 7;	/* Sense Key Specific */
-	u8	sksv		: 1;	/* Sense Key Specific information is valid */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-	u8	sksv		: 1;	/* Sense Key Specific information is valid */
-	u8	sk_specific1	: 7;	/* Sense Key Specific */
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-	u8	sk_specific[2];		/* Sense Key Specific */
-	u8	pad[2];			/* Padding to 20 bytes */
-} atapi_request_sense_result_t;
-
-
-extern void atapi_init_pc(struct atapi_packet_command *pc);
-
-extern void atapi_discard_data(struct ata_device *, unsigned int);
-extern void atapi_write_zeros(struct ata_device *, unsigned int);
-
-extern void atapi_read(struct ata_device *, u8 *, unsigned int);
-extern void atapi_write(struct ata_device *, u8 *, unsigned int);
-
-typedef enum {
-	ide_wait,	/* insert rq at end of list, and wait for it */
-	ide_preempt,	/* insert rq in front of current request */
-	ide_end		/* insert rq at end of list, but don't wait for it */
-} ide_action_t;
-
-extern int ide_do_drive_cmd(struct ata_device *, struct request *, ide_action_t);
--- diff/include/linux/fsfilter.h	2004-05-19 22:12:59.000000000 +0100
+++ source/include/linux/fsfilter.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,134 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef __FILTER_H_
-#define __FILTER_H_ 1
-
-#ifdef __KERNEL__
-
-/* cachetype.c */
-
-/* 
- * it is important that things like inode, super and file operations
- * for intermezzo are not defined statically.  If methods are NULL
- * the VFS takes special action based on that.  Given that different
- * cache types have NULL ops at different slots, we must install opeation 
- * talbes for InterMezzo with NULL's in the same spot
- */
-
-struct filter_ops { 
-        struct super_operations filter_sops;
-
-        struct inode_operations filter_dir_iops;
-        struct inode_operations filter_file_iops;
-        struct inode_operations filter_sym_iops;
-
-        struct file_operations filter_dir_fops;
-        struct file_operations filter_file_fops;
-        struct file_operations filter_sym_fops;
-
-        struct dentry_operations filter_dentry_ops;
-};
-
-struct cache_ops {
-        /* operations on the file store */
-        struct super_operations *cache_sops;
-
-        struct inode_operations *cache_dir_iops;
-        struct inode_operations *cache_file_iops;
-        struct inode_operations *cache_sym_iops;
-
-        struct file_operations *cache_dir_fops;
-        struct file_operations *cache_file_fops;
-        struct file_operations *cache_sym_fops;
-
-        struct dentry_operations *cache_dentry_ops;
-};
-
-
-#define FILTER_DID_SUPER_OPS 0x1
-#define FILTER_DID_INODE_OPS 0x2
-#define FILTER_DID_FILE_OPS 0x4
-#define FILTER_DID_DENTRY_OPS 0x8
-#define FILTER_DID_DEV_OPS 0x10
-#define FILTER_DID_SYMLINK_OPS 0x20
-#define FILTER_DID_DIR_OPS 0x40
-
-struct filter_fs {
-        int o_flags;
-        struct filter_ops o_fops;
-        struct cache_ops  o_caops;
-        struct journal_ops *o_trops;
-        struct snapshot_ops *o_snops;
-};
-
-#define FILTER_FS_TYPES 6
-#define FILTER_FS_EXT2 0
-#define FILTER_FS_EXT3 1
-#define FILTER_FS_REISERFS 2
-#define FILTER_FS_XFS 3
-#define FILTER_FS_OBDFS 4
-#define FILTER_FS_TMPFS 5
-extern struct filter_fs filter_oppar[FILTER_FS_TYPES];
-
-struct filter_fs *filter_get_filter_fs(const char *cache_type);
-void filter_setup_journal_ops(struct filter_fs *ops, char *cache_type);
-struct super_operations *filter_c2usops(struct filter_fs *cache);
-struct inode_operations *filter_c2ufiops(struct filter_fs *cache);
-struct inode_operations *filter_c2udiops(struct filter_fs *cache);
-struct inode_operations *filter_c2usiops(struct filter_fs *cache);
-struct file_operations *filter_c2uffops(struct filter_fs *cache);
-struct file_operations *filter_c2udfops(struct filter_fs *cache);
-struct file_operations *filter_c2usfops(struct filter_fs *cache);
-struct super_operations *filter_c2csops(struct filter_fs *cache);
-struct inode_operations *filter_c2cfiops(struct filter_fs *cache);
-struct inode_operations *filter_c2cdiops(struct filter_fs *cache);
-struct inode_operations *filter_c2csiops(struct filter_fs *cache);
-struct file_operations *filter_c2cffops(struct filter_fs *cache);
-struct file_operations *filter_c2cdfops(struct filter_fs *cache);
-struct file_operations *filter_c2csfops(struct filter_fs *cache);
-struct dentry_operations *filter_c2cdops(struct filter_fs *cache);
-struct dentry_operations *filter_c2udops(struct filter_fs *cache);
-
-void filter_setup_super_ops(struct filter_fs *cache, struct super_operations *cache_ops, struct super_operations *filter_sops);
-void filter_setup_dir_ops(struct filter_fs *cache, struct inode *cache_inode, struct inode_operations *filter_iops, struct file_operations *ffops);
-void filter_setup_file_ops(struct filter_fs *cache, struct inode *cache_inode, struct inode_operations *filter_iops, struct file_operations *filter_op);
-void filter_setup_symlink_ops(struct filter_fs *cache, struct inode *cache_inode, struct inode_operations *filter_iops, struct file_operations *filter_op);
-void filter_setup_dentry_ops(struct filter_fs *cache, struct dentry_operations *cache_dop,  struct dentry_operations *filter_dop);
-
-
-#define PRESTO_DEBUG
-#ifdef PRESTO_DEBUG
-/* debugging masks */
-#define D_SUPER     1  
-#define D_INODE     2   /* print entry and exit into procedure */
-#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 FDEBUG(mask, format, a...)                                      \
-        do {                                                            \
-                if (filter_debug & mask) {                              \
-                        printk("(%s,l. %d): ", __FUNCTION__, __LINE__); \
-                        printk(format, ##a); }                          \
-        } while (0)
-
-#define FENTRY                                                          \
-        if(filter_print_entry)                                          \
-                printk("Process %d entered %s\n", current->pid, __FUNCTION__)
-
-#define FEXIT                                                           \
-        if(filter_print_entry)                                          \
-                printk("Process %d leaving %s at %d\n", current->pid,   \
-                       __FUNCTION__,__LINE__)
-#endif
-#endif
-#endif
--- diff/include/linux/in_systm.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/in_systm.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-/*
- * INET		An implementation of the TCP/IP protocol suite for the LINUX
- *		operating system.  INET is implemented using the  BSD Socket
- *		interface as the means of communication with the user level.
- *
- *		Miscellaneous internetwork definitions for kernel.
- *
- * Version:	@(#)in_systm.h  1.0.0   12/17/93
- *
- * Authors:	Original taken from Berkeley BSD UNIX 4.3-RENO.
- *		Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
- *
- *		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.
- */
-#ifndef _LINUX_IN_SYSTM_H
-#define _LINUX_IN_SYSTM_H
-
-/*
- * Network types.
- * The n_ types are network-order variants of their natural
- * equivalents.  The Linux kernel NET-2 code does not use
- * them (yet), but it might in the future.  This is mostly
- * there for compatibility with BSD user-level programs.
- */
-typedef u_short	n_short;	/* short as received from the net	*/
-typedef u_long	n_long;		/* long as received from the net	*/
-typedef u_long	n_time;		/* ms since 00:00 GMT, byte rev		*/
-
-#endif /* _LINUX_IN_SYSTM_H */
--- diff/include/linux/isdn_lzscomp.h	2004-05-19 22:13:00.000000000 +0100
+++ source/include/linux/isdn_lzscomp.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-/* $Id: isdn_lzscomp.h,v 1.1.10.1 2001/09/23 22:25:05 kai Exp $
- *
- * Header for isdn_lzscomp.c
- * Concentrated here to not mess up half a dozen kernel headers with code
- * snippets
- *
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- *
- */
-
-#define CI_LZS_COMPRESS		17
-#define CILEN_LZS_COMPRESS	5
-
-#define LZS_CMODE_NONE		0
-#define LZS_CMODE_LCB		1
-#define LZS_CMODE_CRC		2
-#define LZS_CMODE_SEQNO		3	/* MUST be implemented (default) */
-#define LZS_CMODE_EXT		4	/* Seems to be what Win0.95 uses */
-
-#define LZS_COMP_MAX_HISTS	1	/* Don't waste peers ressources */
-#define LZS_COMP_DEF_HISTS	1	/* Most likely to negotiate */
-#define LZS_DECOMP_MAX_HISTS	32	/* More is really nonsense */
-#define LZS_DECOMP_DEF_HISTS	8	/* If we get it, this may be optimal */
-
-#define LZS_HIST_BYTE1(word)   	(word>>8)	/* Just for better reading */
-#define LZS_HIST_BYTE2(word)	(word&0xff)	/* of this big endian stuff */
-#define LZS_HIST_WORD(b1,b2)	((b1<<8)|b2)	/* (network byte order rulez) */
--- diff/include/linux/mpp.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/mpp.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-#ifndef _LINUX_MPP_H
-#define _LINUX_MPP_H
-
-/*
- * Definitions related to Massively Parallel Processing support.
- */
-
-/* All mpp implementations must supply these functions */
-
-extern void mpp_init(void);
-extern void mpp_hw_init(void);
-extern void mpp_procfs_init(void);
-
-extern int mpp_num_cells(void);
-extern int mpp_cid(void);
-extern int get_mppinfo(char *buffer);
-
-#endif
--- diff/include/linux/netbeui.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/netbeui.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-#ifndef _LINUX_NETBEUI_H
-#define _LINUX_NETBEUI_H
-
-#include <linux/if.h>
-
-#define NB_NAME_LEN	20	/* Set this properly from the full docs when
-				   I get them */
-				   
-struct sockaddr_netbeui
-{
-	sa_family	snb_family;
-	char		snb_name[NB_NAME_LEN];
-	char		snb_devhint[IFNAMSIZ];
-};
-
-#endif
--- diff/include/linux/netfilter_ddp.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/netfilter_ddp.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-#ifndef __LINUX_DDP_NETFILTER_H
-#define __LINUX_DDP_NETFILTER_H
-
-/* DDP-specific defines for netfilter.  Complete me sometime.
- * (C)1998 Rusty Russell -- This code is GPL.
- */
-
-#include <linux/netfilter.h>
-
-/* Appletalk hooks */
-#define NF_DDP_INPUT	0
-#define NF_DDP_FORWARD	1
-#define NF_DDP_OUTPUT	2
-#endif /*__LINUX_DDP_NETFILTER_H*/
--- diff/include/linux/netfilter_ipx.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/netfilter_ipx.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-#ifndef __LINUX_IPX_NETFILTER_H
-#define __LINUX_IPX_NETFILTER_H
-
-/* IPX-specific defines for netfilter.  Complete me sometime.
- * (C)1998 Rusty Russell -- This code is GPL.
- */
-
-#include <linux/netfilter.h>
-
-/* IPX Hooks */
-#define NF_IPX_INPUT	0
-#define NF_IPX_FORWARD	1
-#define NF_IPX_OUTPUT	2
-#endif /*__LINUX_IPX_NETFILTER_H*/
--- diff/include/linux/netfilter_x25.h	2004-05-19 22:13:01.000000000 +0100
+++ source/include/linux/netfilter_x25.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-#ifndef __LINUX_X25_NETFILTER_H
-#define __LINUX_X25_NETFILTER_H
-
-/* X25-specific defines for netfilter.  Complete me sometime.
- * (C)1998 Rusty Russell -- This code is GPL.
- */
-
-#include <linux/netfilter.h>
-
-/* Hooks */
-#define NF_X25_INPUT	0
-#define NF_X25_FORWARD	1
-#define NF_X25_OUTPUT	2
-
-#endif /*__LINUX_X25_NETFILTER_H*/
--- diff/net/irda/crc.c	2004-05-19 22:13:15.000000000 +0100
+++ source/net/irda/crc.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,68 +0,0 @@
-/*********************************************************************
- *                
- * Filename:      crc.c
- * Version:       0.1
- * Description:   CRC calculation routines
- * Status:        Experimental.
- * Author:        Dag Brattli <dagb@cs.uit.no>
- * Created at:    Mon Aug  4 20:40:53 1997
- * Modified at:   Sun May  2 20:28:08 1999
- * Modified by:   Dag Brattli <dagb@cs.uit.no>
- * Sources:       ppp.c by Michael Callahan <callahan@maths.ox.ac.uk>
- *                Al Longyear <longyear@netcom.com>
- *
- ********************************************************************/
-
-#include <net/irda/crc.h>
-#include <linux/module.h>
-
-/*
- * This mysterious table is just the CRC of each possible byte.  It can be
- * computed using the standard bit-at-a-time methods.  The polynomial can
- * be seen in entry 128, 0x8408.  This corresponds to x^0 + x^5 + x^12.
- * Add the implicit x^16, and you have the standard CRC-CCITT.
- */
-__u16 const irda_crc16_table[256] =
-{
-	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
-	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
-	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
-	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
-	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
-	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
-	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
-	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
-	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
-	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
-	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
-	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
-	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
-	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
-	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
-	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
-	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
-	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
-	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
-	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
-	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
-	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
-	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
-	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
-	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
-	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
-	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
-	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
-	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
-	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
-	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
-	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
-};
-EXPORT_SYMBOL(irda_crc16_table);
-
-__u16 irda_calc_crc16( __u16 fcs, __u8 const *buf, size_t len) 
-{
-	while (len--)
-                fcs = irda_fcs(fcs, *buf++);
-	return fcs;
-}
-EXPORT_SYMBOL(irda_calc_crc16);
--- diff/net/xfrm/xfrm_output.c	2004-05-19 22:13:18.000000000 +0100
+++ source/net/xfrm/xfrm_output.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,46 +0,0 @@
-/* 
- * generic xfrm output routines
- *
- * Copyright (c) 2003 James Morris <jmorris@intercode.com.au>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option) 
- * any later version.
- */
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/skbuff.h>
-#include <net/xfrm.h>
-
-int xfrm_check_output(struct xfrm_state *x,
-                      struct sk_buff *skb, unsigned short family)
-{
-	int err;
-	
-	err = xfrm_state_check_expire(x);
-	if (err)
-		goto out;
-		
-	if (x->props.mode) {
-		switch (family) {
-		case AF_INET:
-			err = xfrm4_tunnel_check_size(skb);
-			break;
-			
-		case AF_INET6:
-			err = xfrm6_tunnel_check_size(skb);
-			break;
-			
-		default:
-			err = -EINVAL;
-		}
-		
-		if (err)
-			goto out;
-	}
-
-	err = xfrm_state_check_space(x, skb);
-out:
-	return err;
-}
--- diff/scripts/mkspec	2004-05-19 22:13:18.000000000 +0100
+++ source/scripts/mkspec	1970-01-01 01:00:00.000000000 +0100
@@ -1,72 +0,0 @@
-#!/bin/sh
-#
-#	Output a simple RPM spec file that uses no fancy features requring
-#	RPM v4. This is intended to work with any RPM distro.
-#
-#	The only gothic bit here is redefining install_post to avoid 
-#	stripping the symbols from files in the kernel which we want
-#
-#	Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
-#
-# That's the voodoo to see if it's a x86.
-ISX86=`echo ${ARCH:=\`arch\`} | grep -ie i.86`
-if [ ! -z $ISX86 ]; then
-	PC=1
-else
-	PC=0
-fi
-# starting to output the spec
-if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
-	PROVIDES=kernel-drm
-fi
-
-PROVIDES="$PROVIDES kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
-
-echo "Name: kernel"
-echo "Summary: The Linux Kernel"
-echo "Version: "$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION | sed -e "s/-//g"
-# we need to determine the NEXT version number so that uname and
-# rpm -q will agree
-echo "Release: `. $srctree/scripts/mkversion`"
-echo "License: GPL"
-echo "Group: System Environment/Kernel"
-echo "Vendor: The Linux Community"
-echo "URL: http://www.kernel.org"
-echo -n "Source: kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL"
-echo "$EXTRAVERSION.tar.gz" | sed -e "s/-//g"
-echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root"
-echo "Provides: $PROVIDES"
-echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"
-echo "%define debug_package %{nil}"
-echo ""
-echo "%description"
-echo "The Linux Kernel, the operating system core itself"
-echo ""
-echo "%prep"
-echo "%setup -q"
-echo ""
-echo "%build"
-echo "make clean all"
-echo ""
-echo "%install"
-echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
-echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install'
-# This is the first disagreement between i386 and most others
-if [ $PC = 1 ]; then
-	echo 'cp arch/i386/boot/bzImage $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
-else
-	echo 'cp vmlinux $RPM_BUILD_ROOT'"/boot/vmlinux-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
-fi
-# Back on track
-echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
-echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
-echo ""
-echo "%clean"
-echo '#echo -rf $RPM_BUILD_ROOT'
-echo ""
-echo "%files"
-echo '%defattr (-, root, root)'
-echo "%dir /lib/modules"
-echo "/lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
-echo "/boot/*"
-echo ""
--- diff/sound/isa/cs423x/pc98.c	2004-06-30 14:26:08.000000000 +0100
+++ source/sound/isa/cs423x/pc98.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,438 +0,0 @@
-/*
- *  Driver for CS4232 on NEC PC9800 series
- *  Copyright (c) by Jaroslav Kysela <perex@suse.cz>
- *                   Osamu Tomita <tomita@cinet.co.jp>
- *                   Takashi Iwai <tiwai@suse.de>
- *                   Hideaki Okubo <okubo@msh.biglobe.ne.jp>
- *
- *
- *   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 <sound/driver.h>
-#include <linux/init.h>
-#include <linux/slab.h>
-#include <linux/moduleparam.h>
-#include <sound/core.h>
-#include <sound/cs4231.h>
-#include <sound/mpu401.h>
-#include <sound/opl3.h>
-#include <sound/initval.h>
-#include "sound_pc9800.h"
-
-#define chip_t cs4231_t
-
-MODULE_AUTHOR("Osamu Tomita <tomita@cinet.co.jp>");
-MODULE_LICENSE("GPL");
-MODULE_CLASSES("{sound}");
-MODULE_DESCRIPTION("NEC PC9800 CS4232");
-MODULE_DEVICES("{{NEC,PC9800}}");
-
-#define IDENT "PC98-CS4232"
-
-static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
-static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-#if 0 /* NOT USED */
-static long cport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-#endif
-static long mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;/* PnP setup */
-static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,11,12,15 */
-static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 9,11,12,15 */
-static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
-static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
-static int pc98ii[SNDRV_CARDS];				/* PC98II */
-static int boot_devs;
-
-module_param_array(index, int, boot_devs, 0444);
-MODULE_PARM_DESC(index, "Index value for " IDENT " soundcard.");
-MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
-module_param_array(id, charp, boot_devs, 0444);
-MODULE_PARM_DESC(id, "ID string for " IDENT " soundcard.");
-MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
-module_param_array(enable, bool, boot_devs, 0444);
-MODULE_PARM_DESC(enable, "Enable " IDENT " soundcard.");
-MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
-module_param_array(port, long, boot_devs, 0444);
-MODULE_PARM_DESC(port, "Port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
-#if 0 /* NOT USED */
-module_param_array(cport, long, boot_devs, 0444);
-MODULE_PARM_DESC(cport, "Control port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(cport, SNDRV_PORT12_DESC);
-#endif
-module_param_array(mpu_port, long, boot_devs, 0444);
-MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC);
-module_param_array(fm_port, long, boot_devs, 0444);
-MODULE_PARM_DESC(fm_port, "FM port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC);
-module_param_array(irq, int, boot_devs, 0444);
-MODULE_PARM_DESC(irq, "IRQ # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
-module_param_array(mpu_irq, int, boot_devs, 0444);
-MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
-module_param_array(dma1, int, boot_devs, 0444);
-MODULE_PARM_DESC(dma1, "DMA1 # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
-module_param_array(dma2, int, boot_devs, 0444);
-MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
-module_param_array(pc98ii, bool, boot_devs, 0444);
-MODULE_PARM_DESC(pc98ii, "Roland MPU-PC98II support.");
-MODULE_PARM_SYNTAX(pc98ii, SNDRV_BOOLEAN_FALSE_DESC);
-
-
-static snd_card_t *snd_pc98_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
-
-/*
- * initialize MPU401-UART
- */
-
-static int __init pc98_mpu401_init(int irq)
-{
-#include "pc9801_118_magic.h"
-#define outp118(reg,data) outb((reg),0x148e);outb((data),0x148f)
-#define WAIT118 outb(0x00,0x5f)
-	int	mpu_intr, count;
-#ifdef OOKUBO_ORIGINAL
-	int	err = 0;
-#endif /* OOKUBO_ORIGINAL */
-
-	switch (irq) {
-	case 3:
-		mpu_intr = 3;
-		break;
-	case 5:
-		mpu_intr = 2;
-		break;
-	case 6:
-		mpu_intr = 1;
-		break;
-	case 10:
-		mpu_intr = 0;
-		break;
-	default:
-		snd_printk(KERN_ERR IDENT ": Bad IRQ %d\n", irq);
-		return -EINVAL;
-	}
-
-	outp118(0x21, mpu_intr);
-	WAIT118;
-	outb(0x00, 0x148e);
-	if (inb(0x148f) & 0x08) {
-		snd_printk(KERN_INFO IDENT ": No MIDI daughter board found\n");
-		return 0;
-	}
-
-	outp118(0x20, 0x00);
-	outp118(0x05, 0x04);
-	for (count = 0; count < 35000; count ++)
-		WAIT118;
-	outb(0x05, 0x148e);
-	for (count = 0; count < 65000; count ++)
-		if (inb(0x148f) == 0x04)
-			goto set_mode_118;
-	snd_printk(KERN_ERR IDENT ": MIDI daughter board initialize failed at stage1\n\n");
-	return -EINVAL;
-
- set_mode_118:
-	outp118(0x05, 0x0c);
-	outb(0xaa, 0x485);
-	outb(0x99, 0x485);
-	outb(0x2a, 0x485);
-	for (count = 0; count < sizeof(Data0485_99); count ++) {
-		outb(Data0485_99[count], 0x485);
-		WAIT118;
-	}
-
-	outb(0x00, 0x486);
-	outb(0xaa, 0x485);
-	outb(0x9e, 0x485);
-	outb(0x2a, 0x485);
-	for (count = 0; count < sizeof(Data0485_9E); count ++)
-		if (inb(0x485) != Data0485_9E[count]) {
-#ifdef OOKUBO_ORIGINAL
-			err = 1;
-#endif /* OOKUBO_ORIGINAL */
-			break;
-		}
-	outb(0x00, 0x486);
-	for (count = 0; count < 2000; count ++)
-		WAIT118;
-#ifdef OOKUBO_ORIGINAL
-	if (!err) {
-		outb(0xaa, 0x485);
-		outb(0x36, 0x485);
-		outb(0x28, 0x485);
-		for (count = 0; count < sizeof(Data0485_36); count ++)
-			outb(Data0485_36[count], 0x485);
-		outb(0x00, 0x486);
-		for (count = 0; count < 1500; count ++)
-			WAIT118;
-		outp118(0x05, inb(0x148f) | 0x08);
-		outb(0xff, 0x148c);
-		outp118(0x05, inb(0x148f) & 0xf7);
-		for (count = 0; count < 1500; count ++)
-			WAIT118;
-	}
-#endif /* OOKUBO_ORIGINAL */
-
-	outb(0xaa, 0x485);
-	outb(0xa9, 0x485);
-	outb(0x21, 0x485);
-	for (count = 0; count < sizeof(Data0485_A9); count ++) {
-		outb(Data0485_A9[count], 0x485);
-		WAIT118;
-	}
-
-	outb(0x00, 0x486);
-	outb(0xaa, 0x485);
-	outb(0x0c, 0x485);
-	outb(0x20, 0x485);
-	for (count = 0; count < sizeof(Data0485_0C); count ++) {
-		outb(Data0485_0C[count], 0x485);
-		WAIT118;
-	}
-
-	outb(0x00, 0x486);
-	outb(0xaa, 0x485);
-	outb(0x66, 0x485);
-	outb(0x20, 0x485);
-	for (count = 0; count < sizeof(Data0485_66); count ++) {
-		outb(Data0485_66[count], 0x485);
-		WAIT118;
-	}
-
-	outb(0x00, 0x486);
-	outb(0xaa, 0x485);
-	outb(0x60, 0x485);
-	outb(0x20, 0x485);
-	for (count = 0; count < sizeof(Data0485_60); count ++) {
-		outb(Data0485_60[count], 0x485);
-		WAIT118;
-	}
-
-	outb(0x00, 0x486);
-	outp118(0x05, 0x04);
-	outp118(0x05, 0x00);
-	for (count = 0; count < 35000; count ++)
-		WAIT118;
-	outb(0x05, 0x148e);
-	for (count = 0; count < 65000; count ++)
-		if (inb(0x148f) == 0x00)
-			goto end_mode_118;
-	snd_printk(KERN_ERR IDENT ": MIDI daughter board initialize failed at stage2\n");
-	return -EINVAL;
-
- end_mode_118:
-	outb(0x3f, 0x148d);
-	snd_printk(KERN_INFO IDENT ": MIDI daughter board initialized\n");
-	return 0;
-}
-
-static int __init pc98_cs4231_chip_init(int dev)
-{
-	int intr_bits, intr_bits2, dma_bits;
-
-	switch (irq[dev]) {
-	case 3:
-		intr_bits = 0x08;
-		intr_bits2 = 0x03;
-		break;
-	case 5:
-		intr_bits = 0x10;
-		intr_bits2 = 0x08;
-		break;
-	case 10:
-		intr_bits = 0x18;
-		intr_bits2 = 0x02;
-		break;
-	case 12:
-		intr_bits = 0x20;
-		intr_bits2 = 0x00;
-		break;
-	default:
-		snd_printk(KERN_ERR IDENT ": Bad IRQ %d\n", irq[dev]);
-		return -EINVAL;
-	}
-
-	switch (dma1[dev]) {
-	case 0:
-		dma_bits = 0x01;
-		break;
-	case 1:
-		dma_bits = 0x02;
-		break;
-	case 3:
-		dma_bits = 0x03;
-		break;
-	default:
-		snd_printk(KERN_ERR IDENT ": Bad DMA %d\n", dma1[dev]);
-		return -EINVAL;
-	}
-
-	if (dma2[dev] >= 2) {
-		snd_printk(KERN_ERR IDENT ": Bad DMA %d\n", dma2[dev]);
-		return -EINVAL;
-	}
-
-	outb(dma1[dev], 0x29);		/* dma1 boundary 64KB */
-	if (dma1[dev] != dma2[dev] && dma2[dev] >= 0) {
-		outb(0, 0x5f);		/* wait */
-		outb(dma2[dev], 0x29);	/* dma2 boundary 64KB */
-		intr_bits |= 0x04;
-	}
-
-	if (PC9800_SOUND_ID() == PC9800_SOUND_ID_118) {
-		/* Set up CanBe control registers. */
-		snd_printd(KERN_INFO "Setting up CanBe Sound System\n");
-		outb(inb(PC9800_SOUND_IO_ID) | 0x03, PC9800_SOUND_IO_ID);
-		outb(0x01, 0x0f4a);
-		outb(intr_bits2, 0x0f4b);
-	}
-
-	outb(intr_bits | dma_bits, 0xf40);
-	return 0;
-}
-
-
-static int __init snd_card_pc98_probe(int dev)
-{
-	snd_card_t *card;
-	snd_pcm_t *pcm = NULL;
-	cs4231_t *chip;
-	opl3_t *opl3;
-	int err;
-
-	if (port[dev] == SNDRV_AUTO_PORT) {
-		snd_printk(KERN_ERR IDENT ": specify port\n");
-		return -EINVAL;
-	}
-	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
-	if (card == NULL)
-		return -ENOMEM;
-
-	if ((err = pc98_cs4231_chip_init(dev)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
-
-	if ((err = snd_cs4231_create(card,
-				     port[dev],
-				     -1,
-				     irq[dev],
-				     dma1[dev],
-				     dma2[dev],
-				     CS4231_HW_DETECT,
-				     0,
-				     &chip)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
-	if ((err = snd_cs4231_pcm(chip, 0, &pcm)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
-	if ((err = snd_cs4231_mixer(chip)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
-
-	if ((err = snd_cs4231_timer(chip, 0, NULL)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
-
-	if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
-		/* ??? */
-		outb(0x00, fm_port[dev] + 6);
-		inb(fm_port[dev] + 7);
-		/* Enable OPL-3 Function */
-		outb(inb(PC9800_SOUND_IO_ID) | 0x03, PC9800_SOUND_IO_ID);
-		if (snd_opl3_create(card,
-				    fm_port[dev], fm_port[dev] + 2,
-				    OPL3_HW_OPL3_PC98, 0, &opl3) < 0) {
-			printk(KERN_ERR IDENT ": OPL3 not detected\n");
-		} else {
-			if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
-				snd_card_free(card);
-				return err;
-			}
-		}
-	}
-
-	if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
-		err = pc98_mpu401_init(mpu_irq[dev]);
-		if (! err) {
-			err = snd_mpu401_uart_new(card, 0,
-						  pc98ii[dev] ? MPU401_HW_PC98II : MPU401_HW_MPU401,
-						  mpu_port[dev], 0,
-						  mpu_irq[dev], SA_INTERRUPT, NULL);
-			if (err < 0)
-				snd_printk(KERN_INFO IDENT ": MPU401 not detected\n");
-		}
-	}
-
-	strcpy(card->driver, pcm->name);
-	strcpy(card->shortname, pcm->name);
-	sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i",
-		pcm->name,
-		chip->port,
-		irq[dev],
-		dma1[dev]);
-	if (dma2[dev] >= 0)
-		sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]);
-	if ((err = snd_card_register(card)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
-	snd_pc98_cards[dev] = card;
-	return 0;
-}
-
-static int __init alsa_card_pc98_init(void)
-{
-	int dev, cards = 0;
-
-	for (dev = 0; dev < SNDRV_CARDS; dev++) {
-		if (!enable[dev])
-			continue;
-		if (snd_card_pc98_probe(dev) >= 0)
-			cards++;
-	}
-	if (!cards) {
-#ifdef MODULE
-		printk(KERN_ERR IDENT " soundcard not found or device busy\n");
-#endif
-		return -ENODEV;
-	}
-	return 0;
-}
-
-static void __exit alsa_card_pc98_exit(void)
-{
-	int idx;
-
-	for (idx = 0; idx < SNDRV_CARDS; idx++)
-		snd_card_free(snd_pc98_cards[idx]);
-}
-
-module_init(alsa_card_pc98_init)
-module_exit(alsa_card_pc98_exit)
--- diff/sound/isa/cs423x/pc9801_118_magic.h	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/isa/cs423x/pc9801_118_magic.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,411 +0,0 @@
-		static unsigned char	Data0485_A9[] = {
-		0x12, 0x03, 0x90, 0xc2, 0x2a, 0x75, 0x1e, 0x20,
-		0xe4, 0x12, 0x2b, 0x9b, 0x22, 0xa9, 0x16, 0x77,
-		0x33, 0xe9, 0x04, 0x54, 0x03, 0x44, 0xa8, 0xf5,
-		0x16, 0xc2, 0x2f, 0x22, 0xa9, 0x16, 0x77, 0x42,
-		0xe9, 0x04, 0x54, 0x03, 0x44, 0xa8, 0xf9, 0x77,
-		0xf8, 0x04, 0x54, 0x03, 0x44, 0xa8, 0xf5, 0x16,
-		0xc2, 0x2f, 0x22, 0x90, 0x25, 0x9f, 0x30, 0x04,
-		0x05, 0xc2, 0x04, 0x12, 0x1f, 0x62, 0x30, 0x00,
-		0x05, 0xc2, 0x00, 0x12, 0x15, 0xe6, 0x30, 0x01,
-		0x05, 0xc2, 0x01, 0x12, 0x29, 0xaf, 0x30, 0x02,
-		0x05, 0xc2, 0x02, 0x12, 0x29, 0xaf, 0x30, 0x05,
-		0x05, 0xc2, 0x05, 0x12, 0x16, 0x65, 0x30, 0x06,
-		0x08, 0xc2, 0x06, 0x12, 0x16, 0xb1, 0x12, 0x29,
-		0xaf, 0x30, 0x07, 0x08, 0xc2, 0x07, 0x12, 0x16,
-		0xe9, 0x12, 0x29, 0xaf, 0x22, 0x20, 0x97, 0x09,
-		0x53, 0xa8, 0xfb, 0x12, 0x04, 0x2c, 0x43, 0xa8,
-		0x04, 0x22, 0x71, 0xb8, 0x71, 0xb8, 0x71, 0xb8,
-		0x22, 0x20, 0x4b, 0x04, 0x75, 0x4e, 0x02, 0x22,
-		0xe5, 0x35, 0x24, 0xff, 0xf5, 0x35, 0xe5, 0x36,
-		0x34, 0xff, 0xf5, 0x36, 0x75, 0x4e, 0x02, 0x22,
-		0x10, 0x19, 0x02, 0x80, 0x08, 0x78, 0x00, 0xe2,
-		0x78, 0x07, 0xf2, 0x61, 0x9b, 0x78, 0x11, 0xe2,
-		0xc0, 0x01, 0xc0, 0xf0, 0xc0, 0xd0, 0xc0, 0x02,
-		0x71, 0x14, 0xe5, 0x30, 0xb4, 0x01, 0x02, 0x61,
-		0x93, 0x43, 0x08, 0x40, 0x12, 0x2a, 0x53, 0x61,
-		0x93, 0x79, 0x03, 0xe3, 0xa2, 0xe2, 0x92, 0x26,
-		0xa2, 0xe3, 0x92, 0x27, 0x22, 0xad, 0x2b, 0xbd,
-		0x04, 0x07, 0xf5, 0x72, 0x78, 0x27, 0x02, 0x11,
-		0x76, 0x02, 0x11, 0x30, 0x00, 0x00, 0x00, 0x12,
-		0x28, 0xba, 0x79, 0x01, 0xe3, 0x75, 0x21, 0x3f,
-		0x75, 0x49, 0x11, 0x75, 0x4c, 0x11, 0x31, 0xdc,
-		0x75, 0x1a, 0x80, 0x51, 0x72, 0x75, 0x81, 0xe3,
-		0x12, 0x25, 0xc9, 0x43, 0xa8, 0x01, 0x00, 0x53,
-		0xa8, 0xfe, 0x10, 0x50, 0x02, 0x80, 0x03, 0x12,
-		0x1a, 0x8d, 0xd1, 0x28, 0x12, 0x03, 0xd9, 0xd1,
-		0xf2, 0x12, 0x2d, 0xf0, 0xb0, 0x11, 0x92, 0xe0,
-		0xa2, 0x2a, 0xa0, 0xb5, 0x82, 0xe0, 0x50, 0x03,
-		0x79, 0x0f, 0xe3, 0x71, 0xca, 0x51, 0x1e, 0x91,
-		0xe4, 0x53, 0xa8, 0xfb, 0x10, 0x10, 0x02, 0x80,
-		0x26, 0xc2, 0x8e, 0xd2, 0xab, 0xa2, 0x1c, 0x40,
-		0x13, 0xa2, 0x1d, 0x50, 0x0a, 0x43, 0x08, 0x40,
-		0x12, 0x1a, 0x01, 0xd1, 0xd7, 0x80, 0x0b, 0x12,
-		0x26, 0x04, 0x61, 0x08, 0x43, 0x08, 0x40, 0x12,
-		0x1a, 0x01, 0xd2, 0x1f, 0x12, 0x17, 0x7f, 0x43,
-		0xa8, 0x04, 0x51, 0x1e, 0x91, 0xe4, 0x12, 0x13,
-		0x34, 0x80, 0x98, 0xa2, 0x17, 0x72, 0x16, 0x72,
-		0x15, 0x72, 0x2d, 0x50, 0x06, 0xfa, 0x12, 0x13,
-		0x66, 0x80, 0x25, 0xc2, 0x13, 0x30, 0x28, 0x05,
-		0x12, 0x02, 0xbe, 0x80, 0x1b, 0xb4, 0x10, 0x12,
-		0x78, 0x00, 0xf2, 0xe5, 0x30, 0xb4, 0x01, 0x06,
-		0x12, 0x03, 0x90, 0xd2, 0x19, 0x22, 0x12, 0x00,
-		0xdd, 0x22, 0x75, 0x30, 0x00, 0x12, 0x00, 0xa1,
-		0x22, 0x00, 0x00, 0x75, 0x1e, 0x00, 0x74, 0x0c,
-		0x12, 0x2b, 0x9b, 0x74, 0x40, 0x79, 0x05, 0xf3,
-		0x74, 0x49, 0x12, 0x2b, 0x9b, 0x74, 0x04, 0x79,
-		0x05, 0xf3, 0x75, 0x15, 0x04, 0x74, 0x10, 0x12,
-		0x2b, 0x9b, 0x74, 0x00, 0x79, 0x05, 0xf3, 0x74,
-		0x17, 0x12, 0x2b, 0x9b, 0x74, 0x00, 0x79, 0x05,
-		0xf3, 0x74, 0x1a, 0x12, 0x2b, 0x9b, 0x74, 0x00,
-		0x79, 0x05, 0xf3, 0x74, 0x0a, 0x12, 0x2b, 0x9b,
-		0x74, 0x20, 0x79, 0x05, 0xf3, 0x79, 0xe0, 0x77,
-		0x20, 0x22, 0xd0, 0x02, 0xd0, 0xd0, 0xd0, 0xf0,
-		0xd0, 0x01, 0xe5, 0x5f, 0xd0, 0xa8, 0x22, 0x00,
-		0x00, 0x90, 0x25, 0x9f, 0x75, 0x26, 0xff, 0x75,
-		0x27, 0xff, 0x75, 0x28, 0x03, 0x75, 0x13, 0xff,
-		0x75, 0x1f, 0x00, 0x75, 0x14, 0xff, 0x22, 0x79,
-		0x06, 0xe5, 0x29, 0x60, 0x0b, 0xe3, 0x30, 0xe1,
-		0xf8, 0xe5, 0x4f, 0x64, 0x80, 0x79, 0x07, 0xf3,
-		0x22, 0x10, 0x4c, 0x01, 0x22, 0x30, 0x4b, 0x0a,
-		0xc2, 0x4b, 0xe5, 0x4d, 0x64, 0x80, 0xf5, 0x4f,
-		0x80, 0x1d, 0xe5, 0x15, 0xa2, 0xe0, 0x82, 0xe6,
-		0x40, 0x02, 0x80, 0x35, 0x30, 0x4a, 0x04, 0xb1,
-		0xe6, 0x80, 0x0c, 0x30, 0x49, 0x04, 0x51, 0x2b,
-		0x80, 0x05, 0x30, 0x48, 0x24, 0x91, 0x7e, 0x79,
-		0x06, 0xe3, 0x30, 0xe0, 0x1a, 0x79, 0x06, 0xf3,
-		0xe5, 0x4e, 0x24, 0xff, 0x50, 0x04, 0xf5, 0x4e,
-		0x80, 0x0d, 0x79, 0x0f, 0xf3, 0x20, 0x2a, 0x07,
-		0x12, 0x2b, 0x32, 0x75, 0x29, 0x00, 0x22, 0x91,
-		0x1b, 0x22, 0x79, 0x0f, 0xe3, 0xc0, 0xa8, 0x75,
-		0xa8, 0x00, 0x30, 0x2b, 0x03, 0xd0, 0xa8, 0x22,
-		0x79, 0x0e, 0xf3, 0xd0, 0xa8, 0x22, 0x8a, 0xf0,
-		0xe5, 0x50, 0x10, 0xf3, 0x10, 0x23, 0x23, 0x23,
-		0x25, 0xf0, 0x12, 0x2c, 0xb8, 0xa2, 0xe7, 0x92,
-		0xe4, 0xc2, 0xe7, 0x80, 0x08, 0x23, 0x23, 0x23,
-		0x25, 0xf0, 0x12, 0x2c, 0x19, 0x25, 0x4f, 0x20,
-		0xd2, 0x04, 0xf5, 0x4f, 0x80, 0x0a, 0x40, 0x05,
-		0x75, 0x4f, 0x7f, 0x80, 0x03, 0x75, 0x4f, 0xff,
-		0xea, 0x12, 0x2c, 0x3c, 0x25, 0x50, 0x20, 0xe7,
-		0x05, 0xb4, 0x03, 0x07, 0x80, 0x0c, 0x75, 0x50,
-		0x00, 0x80, 0x09, 0x40, 0x05, 0x75, 0x50, 0x03,
-		0x80, 0x02, 0xf5, 0x50, 0x22, 0xe5, 0x4d, 0xc4,
-		0x54, 0x0c, 0x03, 0x03, 0xfa, 0x91, 0xa9, 0x71,
-		0xb8, 0xe5, 0x4d, 0xc4, 0x54, 0x03, 0xfa, 0x91,
-		0xa9, 0x71, 0xb8, 0xe5, 0x4d, 0x54, 0x0c, 0x03,
-		0x03, 0xfa, 0x91, 0xa9, 0x71, 0xb8, 0xe5, 0x4d,
-		0x54, 0x03, 0xfa, 0x91, 0xa9, 0x71, 0xb8, 0x22,
-		0x8a, 0xf0, 0xe5, 0x50, 0x23, 0x23, 0x25, 0xf0,
-		0x12, 0x2b, 0xf6, 0x25, 0x4f, 0x20, 0xd2, 0x04,
-		0xf5, 0x4f, 0x80, 0x0a, 0x40, 0x05, 0x75, 0x4f,
-		0x7f, 0x80, 0x03, 0x75, 0x4f, 0xff, 0xea, 0x12,
-		0x2c, 0x40, 0x25, 0x50, 0x20, 0xe7, 0x05, 0xb4,
-		0x05, 0x07, 0x80, 0x0c, 0x75, 0x50, 0x00, 0x80,
-		0x09, 0x40, 0x05, 0x75, 0x50, 0x05, 0x80, 0x02,
-		0xf5, 0x50, 0x22, 0x30, 0x26, 0x03, 0x12, 0x1e,
-		0xf5, 0x30, 0x27, 0x03, 0x12, 0x1f, 0x37, 0x30,
-		0x25, 0x09, 0x12, 0x1f, 0x4e, 0x30, 0x23, 0x03,
-		0x12, 0x1f, 0x1e, 0x10, 0x22, 0x02, 0x80, 0x0a,
-		0xe5, 0x3b, 0xb4, 0xff, 0x02, 0xc2, 0x20, 0x12,
-		0x1e, 0x79, 0x22, 0x78, 0x11, 0xe2, 0x20, 0xe0,
-		0x07, 0xc0, 0x01, 0x12, 0x28, 0xba, 0xd0, 0x01,
-		0x78, 0x00, 0xf2, 0x61, 0x9b, 0x12, 0x2b, 0x32,
-		0x12, 0x17, 0x7f, 0x78, 0x00, 0xf2, 0xaa, 0x35,
-		0xab, 0x36, 0xea, 0x24, 0xff, 0xfa, 0xeb, 0x34,
-		0xff, 0xfb, 0x50, 0x03, 0xd2, 0x10, 0x22, 0x75,
-		0x37, 0x01, 0x75, 0x38, 0x00, 0x75, 0x39, 0x00,
-		0x12, 0x04, 0x04, 0xd2, 0x8e, 0x22, 0xa8, 0x2b,
-		0xb8, 0x00, 0x02, 0x80, 0x03, 0x02, 0x11, 0xbd,
-		0xf5, 0x74, 0x78, 0x2a, 0x12, 0x11, 0xec, 0xe5,
-		0x74, 0x78, 0x29, 0x12, 0x11, 0xec, 0x22, 0xfa,
-		0xe5, 0x2b, 0x60, 0x01, 0x22, 0xea, 0x78, 0x2b,
-		0xf5, 0x75, 0x12, 0x11, 0xec, 0x22, 0x74, 0x10,
-		0x12, 0x2b, 0x9b, 0x74, 0x20, 0x78, 0x05, 0xf2,
-		0x74, 0x09, 0x12, 0x17, 0x75, 0xe5, 0x15, 0x44,
-		0x80, 0x79, 0x05, 0xf3, 0xf5, 0x15, 0x12, 0x17,
-		0x7f, 0x22, 0x12, 0x03, 0x84, 0x79, 0x0f, 0xe3,
-		0x78, 0x00, 0xf2, 0x12, 0x2b, 0x28, 0xe5, 0x81,
-		0x24, 0xfc, 0xf5, 0x81, 0x61, 0x93, 0xd2, 0x07,
-		0x78, 0x11, 0xe2, 0x44, 0x11, 0xf5, 0x4c, 0xc2,
-		0x0f, 0x12, 0x29, 0xa3, 0x61, 0x93, 0x02, 0x1b,
-		0x77, 0x00, 0xe1, 0x81, 0xe1, 0x9a, 0xd2, 0x2c,
-		0xa1, 0x0c, 0x20, 0x20, 0x02, 0xd2, 0x26, 0x02,
-		0x1e, 0x35, 0x02, 0x1e, 0x61, 0x02, 0x1d, 0x8f,
-		0xc2, 0x8e, 0x75, 0xa8, 0x9e, 0x22, 0x41, 0x49,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x02, 0x29, 0x91, 0x00, 0x00, 0x00, 0xa1, 0xbb,
-		0xa1, 0xc3, 0x02, 0x1e, 0x6b, 0xe5, 0x4d, 0xc4,
-		0x54, 0x0f, 0xfa, 0x91, 0x2f, 0x71, 0xb8, 0xe5,
-		0x4d, 0x54, 0x0f, 0xfa, 0x91, 0x2f, 0x71, 0xb8,
-		0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0xc6,
-		0x02, 0x1d, 0x8f, 0xc2, 0x8e, 0xd2, 0xab, 0xc2,
-		0x10, 0x79, 0x0f, 0xf3, 0x22, 0x00, 0x02, 0x2a,
-		0x84, 0x00, 0xe1, 0xbc, 0xe1, 0xc8, 0x02, 0x1e,
-		0x27, 0x00, 0x78, 0x00, 0xf2, 0x78, 0x0b, 0xe2,
-		0xf4, 0xf5, 0x4d, 0xd2, 0x4c, 0x61, 0x9b, 0x30,
-		0xb5, 0x02, 0xc2, 0x11, 0x22, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x79, 0xbd, 0xf1, 0x3d, 0x83,
-		0x22, 0xdd, 0xbd, 0xbd, 0xbd, 0x61, 0xbd, 0x8d,
-		0x7a, 0xbd, 0xbd, 0xbd, 0xbd, 0x30, 0xbd, 0xbd,
-		0xbd, 0x55, 0xbd, 0xbd, 0xbd, 0x52, 0xbd, 0xb6,
-		0xb6, 0xbd, 0xbd, 0xbd, 0xbd, 0x00, 0xbd, 0xbd,
-		0xbd, 0xe8, 0xda, 0xbd, 0xbd, 0xcf, 0xb9, 0xbd,
-		0xc4, 0xf1, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd,
-		0xbd, 0x7b, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd,
-		0xbd, 0x70, 0x6a, 0x57, 0x47, 0x34, 0xbd, 0xbd,
-		0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0x29, 0xbd,
-		0xbd, 0xbd, 0xb6, 0xb6, 0xbd, 0xbd, 0xbd, 0xbd,
-		0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0x2e, 0x25,
-		0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xfe, 0xf5,
-		0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0x19, 0xbd,
-		0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0x21, 0x8f,
-		0x09, 0xbd, 0xf9, 0x86, 0xbd, 0xbd, 0xbd, 0xd7,
-		0xbd, 0xa9, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0x9b,
-		0xd1, 0x9d, 0xbd, 0xae, 0xbd, 0xbd, 0xbd, 0xcb,
-		0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd,
-		0xb6, 0xa5, 0xbd, 0xc5, 0xbd, 0xbd, 0xbd, 0xc3,
-		0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0x74, 0x10,
-		0x12, 0x2b, 0x9b, 0xe4, 0x78, 0x05, 0xf2, 0x74,
-		0x09, 0x12, 0x17, 0x75, 0xe5, 0x15, 0x54, 0x7f,
-		0x79, 0x05, 0xf3, 0xf5, 0x15, 0x12, 0x17, 0x7f,
-		0x22, 0x30, 0x51, 0x01, 0x22, 0x53, 0xa8, 0xfb,
-		0x12, 0x2d, 0xf0, 0x50, 0x22, 0x79, 0x03, 0xe3,
-		0x20, 0xe4, 0x1c, 0xaa, 0x35, 0xab, 0x36, 0xea,
-		0x24, 0xf0, 0xfa, 0xeb, 0x34, 0xff, 0xfb, 0x50,
-		0x0e, 0x10, 0x1f, 0x02, 0x80, 0x09, 0x20, 0x2a,
-		0x03, 0x12, 0x2b, 0x32, 0x12, 0x2d, 0xd6, 0x43,
-		0xa8, 0x04, 0x22, 0xa2, 0x1c, 0x72, 0x1d, 0x40,
-		0x07, 0x53, 0x08, 0xbf, 0x78, 0x00, 0xf2, 0x22,
-		0xb1, 0x1e, 0x22, 0x00, 0x79, 0x02, 0x12, 0x27,
-		0x3d, 0x02, 0x2d, 0x37, 0x14, 0x54, 0xf0, 0x60,
-		0x21, 0xe5, 0xf0, 0x24, 0xb6, 0xe5, 0xf0, 0x50,
-		0x16, 0x24, 0x8b, 0x50, 0x15, 0xe5, 0xf0, 0x24,
-		0x56, 0xe5, 0xf0, 0x50, 0x08, 0x24, 0x2f, 0x50,
-		0x09, 0xe5, 0xf0, 0x24, 0xd9, 0x24, 0xd5, 0x24,
-		0xf0, 0x22, 0x15, 0x81, 0x15, 0x81, 0xe9, 0x22,
-		0x78, 0x13, 0x74, 0x00, 0xf2, 0x75, 0x2e, 0x01,
-		0xd2, 0x6a, 0xc2, 0x69, 0xc2, 0x68, 0xc2, 0x6c,
-		0x90, 0x25, 0x9f, 0x75, 0xb8, 0x07, 0x41, 0xa4,
-		0xc0, 0x01, 0xc0, 0xf0, 0xc0, 0xd0, 0xc0, 0x02,
-		0xe5, 0x3d, 0x54, 0x7d, 0x03, 0x10, 0xe5, 0x05,
-		0x90, 0x28, 0x4b, 0x80, 0x03, 0x90, 0x2b, 0x7c,
-		0x73, 0xe5, 0x3d, 0x30, 0xe5, 0x07, 0x74, 0xfd,
-		0x78, 0x00, 0xf2, 0x61, 0x9b, 0x90, 0x1a, 0x97,
-		0x74, 0xb6, 0xc0, 0xe0, 0x74, 0x27, 0xc0, 0xe0,
-		0xc0, 0xa8, 0x02, 0x1b, 0xab, 0x90, 0x25, 0x9f,
-		0xd0, 0xa8, 0x22, 0x90, 0x27, 0xb6, 0xc0, 0x82,
-		0xc0, 0x83, 0xc0, 0xa8, 0x02, 0x1d, 0xa6, 0x90,
-		0x27, 0xb6, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0xa8,
-		0x02, 0x1e, 0x0a, 0xea, 0x24, 0xf0, 0xfa, 0xeb,
-		0x34, 0xff, 0xfb, 0x50, 0x2e, 0x20, 0x0b, 0x05,
-		0x85, 0x44, 0xe0, 0x80, 0x03, 0x75, 0xe0, 0x00,
-		0x30, 0xe1, 0x20, 0xe5, 0x35, 0x24, 0xff, 0xf5,
-		0x35, 0xe5, 0x36, 0x34, 0xff, 0xf5, 0x36, 0xc3,
-		0xe5, 0x36, 0x13, 0xf5, 0x36, 0xe5, 0x35, 0x13,
-		0xf5, 0x35, 0x75, 0x3a, 0x10, 0x12, 0x1a, 0x77,
-		0x02, 0x18, 0x77, 0x75, 0x3a, 0x00, 0x12, 0x1a,
-		0x77, 0x02, 0x18, 0x1b, 0x20, 0x4b, 0x04, 0x75,
-		0x4e, 0x03, 0x22, 0xe5, 0x35, 0x24, 0xff, 0xf5,
-		0x35, 0xe5, 0x36, 0x34, 0xff, 0xf5, 0x36, 0x75,
-		0x4e, 0x03, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x02, 0x2c,
-		0x70, 0xd2, 0x00, 0x78, 0x11, 0xe2, 0x44, 0x11,
-		0xf5, 0x3f, 0xc2, 0x08, 0x12, 0x29, 0xa3, 0x02,
-		0x23, 0x93, 0x21, 0x62, 0x61, 0x40, 0x01, 0x3a,
-		0x01, 0x73, 0x21, 0x76, 0x61, 0xa8, 0x21, 0x39,
-		0x21, 0x4a, 0x02, 0x2a, 0x7b, 0x79, 0x06, 0xf3,
-		0xc0, 0xd0, 0x12, 0x03, 0xd9, 0x78, 0x00, 0xf2,
-		0xd0, 0xd0, 0x22, 0x00, 0x00, 0x00, 0x00, 0x02,
-		0x2c, 0xb4, 0x78, 0x11, 0xe2, 0x44, 0x11, 0x54,
-		0x0f, 0xf8, 0xc4, 0x48, 0xd2, 0x05, 0xf5, 0x48,
-		0xc2, 0x0d, 0x31, 0xa3, 0x02, 0x23, 0x93, 0x20,
-		0x4b, 0x04, 0x75, 0x4e, 0x01, 0x22, 0xe5, 0x35,
-		0x24, 0xff, 0xf5, 0x35, 0xe5, 0x36, 0x34, 0xff,
-		0xf5, 0x36, 0x75, 0x4e, 0x01, 0x22, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x79, 0xd0, 0x77, 0x1b, 0x79, 0xd1, 0x77, 0x18,
-		0x79, 0xd2, 0x77, 0x77, 0x79, 0xd3, 0x77, 0x18,
-		0x22, 0x75, 0x29, 0x00, 0x75, 0x25, 0x00, 0x75,
-		0x34, 0x03, 0x75, 0x22, 0x00, 0x75, 0x23, 0x05,
-		0x75, 0x4f, 0x00, 0x75, 0x50, 0x00, 0x75, 0x30,
-		0x00, 0x79, 0xdc, 0x77, 0x03, 0xc2, 0x8e, 0x75,
-		0x17, 0xa8, 0x75, 0x16, 0xa8, 0x74, 0xaa, 0x79,
-		0x01, 0xf3, 0x79, 0xd7, 0x77, 0x74, 0x79, 0xd8,
-		0x77, 0xff, 0x79, 0xd9, 0x77, 0x07, 0x79, 0xda,
-		0x77, 0x00, 0x12, 0x25, 0x6f, 0x43, 0x08, 0x40,
-		0x71, 0x32, 0x79, 0x0e, 0xe3, 0x10, 0x51, 0x1c,
-		0x74, 0x06, 0x71, 0x9b, 0xe5, 0x11, 0x44, 0x80,
-		0x79, 0x05, 0xf3, 0xf5, 0x11, 0x74, 0x07, 0x71,
-		0x9b, 0xe5, 0x12, 0x44, 0x80, 0x79, 0x05, 0xf3,
-		0xf5, 0x12, 0x80, 0x18, 0x53, 0x27, 0xa0, 0x53,
-		0x28, 0x01, 0x75, 0x20, 0xf7, 0x12, 0x23, 0x4c,
-		0x75, 0x11, 0x80, 0x75, 0x12, 0x80, 0x12, 0x1f,
-		0xc0, 0x12, 0x21, 0xdc, 0x79, 0x06, 0xf3, 0x22,
-		0xd2, 0x02, 0x78, 0x11, 0xe2, 0x44, 0x11, 0xf5,
-		0x43, 0xc2, 0x0a, 0x12, 0x29, 0xa3, 0x02, 0x23,
-		0x93, 0x78, 0x11, 0xe2, 0x44, 0x11, 0xf5, 0x44,
-		0xc2, 0x0b, 0x12, 0x29, 0xa3, 0x02, 0x23, 0x93,
-		0x78, 0x00, 0xe2, 0x90, 0x25, 0x9f, 0x02, 0x23,
-		0x93, 0x78, 0x11, 0xe2, 0x75, 0x20, 0xf7, 0x75,
-		0x21, 0x3f, 0x75, 0x49, 0x11, 0x75, 0x4c, 0x11,
-		0x31, 0xa3, 0x02, 0x23, 0x93, 0x78, 0x11, 0xe2,
-		0x44, 0x11, 0x54, 0x0f, 0xf8, 0xc4, 0x48, 0xf8,
-		0xe5, 0x49, 0x45, 0x3f, 0x58, 0xf5, 0x49, 0xd2,
-		0x06, 0xc2, 0x0e, 0x31, 0xa3, 0x02, 0x23, 0x93,
-		0xc0, 0x01, 0x20, 0x2a, 0x04, 0x71, 0x32, 0xc2,
-		0x11, 0x11, 0x5e, 0xc2, 0x1f, 0xd0, 0x01, 0x02,
-		0x23, 0x9b, 0x12, 0x21, 0xdc, 0x78, 0x00, 0xf2,
-		0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xda,
-		0xe7, 0x70, 0x2b, 0x20, 0x0a, 0x05, 0x85, 0x43,
-		0xe0, 0x80, 0x03, 0x75, 0xe0, 0x00, 0x30, 0xe1,
-		0x1d, 0x20, 0xe2, 0x1f, 0x74, 0xe0, 0xca, 0x74,
-		0x00, 0x71, 0x9b, 0xca, 0x79, 0x05, 0xf3, 0xf5,
-		0x09, 0xca, 0x74, 0x01, 0x71, 0x9b, 0xca, 0x79,
-		0x05, 0xf3, 0xf5, 0x0a, 0x80, 0x43, 0x12, 0x15,
-		0x3e, 0x80, 0x3e, 0xe5, 0x0b, 0xb4, 0x17, 0x02,
-		0x80, 0x0b, 0x50, 0x09, 0x74, 0x17, 0xc3, 0x95,
-		0x0b, 0x44, 0x60, 0x80, 0x02, 0x74, 0x60, 0xca,
-		0x74, 0x00, 0x71, 0x9b, 0xca, 0x79, 0x05, 0xf3,
-		0xf5, 0x09, 0xe5, 0x0c, 0xb4, 0x17, 0x02, 0x80,
-		0x0b, 0x50, 0x09, 0x74, 0x17, 0xc3, 0x95, 0x0c,
-		0x44, 0x60, 0x80, 0x02, 0x74, 0x60, 0xca, 0x74,
-		0x01, 0x71, 0x9b, 0xca, 0x79, 0x05, 0xf3, 0xf5,
-		0x0a, 0x22, 0xd2, 0x04, 0x78, 0x11, 0xe2, 0x44,
-		0x11, 0xf5, 0x46, 0xc2, 0x0c, 0x31, 0xa3, 0x02,
-		0x23, 0x93, 0xd2, 0x05, 0x78, 0x11, 0xe2, 0x44,
-		0x11, 0xf5, 0x48, 0xc2, 0x0d, 0x31, 0xa3, 0x02,
-		0x23, 0x93, 0xd2, 0x06, 0x78, 0x11, 0xe2, 0x44,
-		0x11, 0xf5, 0x49, 0xc2, 0x0e, 0x31, 0xa3, 0x02,
-		0x23, 0x93, 0x30, 0x1c, 0x21, 0x20, 0x4d, 0x1e,
-		0xe5, 0x29, 0x60, 0x1a, 0xc2, 0x1c, 0x12, 0x19,
-		0xec, 0x12, 0x13, 0xcf, 0xd2, 0x4d, 0x12, 0x17,
-		0x7f, 0x78, 0x00, 0xf2, 0x79, 0x06, 0xf3, 0x43,
-		0xa8, 0x04, 0x12, 0x24, 0x1b, 0x22, 0x12, 0x27,
-		0x24, 0x22, 0x78, 0x00, 0xe2, 0x90, 0x25, 0x9f,
-		0x02, 0x23, 0x93, 0x78, 0x00, 0xe2, 0xa2, 0xe7,
-		0x72, 0xe3, 0x92, 0xe7, 0x02, 0x1d, 0x85, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x79, 0x04, 0xe3, 0x54, 0x80, 0x70, 0xf9, 0x22,
-		0xe5, 0x29, 0x79, 0xde, 0xf7, 0x75, 0x29, 0x00,
-		0x70, 0x12, 0xe5, 0x15, 0x79, 0xdd, 0xf7, 0x12,
-		0x2d, 0xf0, 0x40, 0x08, 0x20, 0x1c, 0x07, 0x20,
-		0x1d, 0x04, 0x80, 0x02, 0x71, 0x32, 0x30, 0xb5,
-		0x0c, 0x79, 0x06, 0xf3, 0x20, 0x2a, 0x06, 0x79,
-		0xdd, 0xe7, 0x54, 0xfc, 0xf7, 0xd2, 0x2b, 0x12,
-		0x25, 0x6f, 0x22, 0x00, 0x00, 0x00, 0x00, 0xe5,
-		0x15, 0xa2, 0xe0, 0xb0, 0xe6, 0x40, 0x31, 0xa2,
-		0xe1, 0xb0, 0xe7, 0x40, 0x38, 0x10, 0x2b, 0x02,
-		0x80, 0x26, 0x79, 0xde, 0xe7, 0x70, 0x0b, 0x79,
-		0xdd, 0xe7, 0x20, 0xe0, 0x12, 0x20, 0xe1, 0x28,
-		0x80, 0x16, 0xf5, 0x29, 0x30, 0x4d, 0x11, 0x20,
-		0x4c, 0x0e, 0x12, 0x24, 0x1b, 0x80, 0x09, 0x43,
-		0x08, 0x40, 0x12, 0x13, 0xcf, 0x12, 0x17, 0x7f,
-		0xe5, 0x13, 0x20, 0xe4, 0x05, 0x12, 0x18, 0x1b,
-		0x80, 0x03, 0x12, 0x18, 0x77, 0xc2, 0x2b, 0x22,
-		0x12, 0x26, 0xd7, 0x12, 0x13, 0xb7, 0x22, 0x78,
-		0x04, 0x79, 0x00, 0xd9, 0xfe, 0xd8, 0xfa, 0x22,
-		0x00, 0x74, 0x09, 0x71, 0x9b, 0xe5, 0x15, 0x54,
-		0xfc, 0x79, 0x05, 0xf3, 0xf5, 0x15, 0x22, 0x78,
-		0x11, 0xe2, 0x44, 0x11, 0x54, 0x0f, 0xf8, 0xc4,
-		0x48, 0xf5, 0x46, 0xc2, 0x0c, 0xd2, 0x04, 0x31,
-		0xa3, 0x02, 0x23, 0x93, 0x12, 0x26, 0xd7, 0x12,
-		0x00, 0xb7, 0x22, 0x00, 0x79, 0x06, 0xf3, 0x74,
-		0x0a, 0x71, 0x9b, 0x79, 0xe0, 0xe7, 0x44, 0x02,
-		0xf7, 0x79, 0x05, 0xf3, 0x22, 0x74, 0x0a, 0x71,
-		0x9b, 0x79, 0xe0, 0xe7, 0x54, 0xfd, 0xf7, 0x79,
-		0x05, 0xf3, 0x22, 0x21, 0x59, 0x41, 0x23, 0x21,
-		0x59, 0x41, 0x33, 0x41, 0x43, 0x21, 0x59, 0x21,
-		0x59, 0x02, 0x25, 0x9f, 0x00, 0x74, 0x0d, 0x71,
-		0x9b, 0x74, 0x4d, 0x79, 0x05, 0xf3, 0xd2, 0x52,
-		0x22, 0x00, 0x53, 0x08, 0x40, 0x45, 0x08, 0x45,
-		0x1e, 0x79, 0x04, 0xf3, 0xf5, 0x08, 0x22, 0xd2,
-		0x01, 0x78, 0x11, 0xe2, 0x44, 0x11, 0xf5, 0x42,
-		0xc2, 0x09, 0x31, 0xa3, 0x02, 0x23, 0x93, 0x00,
-		0x00, 0x00, 0x00, 0x71, 0x6e, 0x74, 0x09, 0x12,
-		0x17, 0x75, 0xe5, 0x15, 0x44, 0x40, 0x79, 0x05,
-		0xf3, 0xf5, 0x15, 0x75, 0x3a, 0x00, 0x12, 0x1a,
-		0x77, 0x02, 0x18, 0x1b, 0xf5, 0x38, 0xe5, 0x37,
-		0x24, 0x01, 0xf5, 0x37, 0xe5, 0x38, 0x34, 0x00,
-		0xf5, 0x38, 0x40, 0x05, 0x75, 0x39, 0x00, 0x80,
-		0x03, 0x75, 0x39, 0x01, 0x12, 0x04, 0x04, 0xd2,
-		0x8e, 0x02, 0x03, 0x8d, 0x00, 0xb4, 0x0d, 0x03,
-		0x74, 0x14, 0x22, 0x04, 0x83, 0x22, 0x00, 0x02,
-		0xff, 0x01, 0x00, 0x05, 0xfe, 0xff, 0x00, 0x0a,
-		0xfc, 0xfe, 0x00, 0xc0, 0xf8, 0xfc, 0x00, 0x28,
-		0xf0, 0xf8, 0x00, 0x30, 0xe0, 0xd0, 0x01, 0x88,
-		0x04, 0x83, 0x22, 0x00, 0xff, 0xfe, 0xfd, 0xfc,
-		0xfc, 0xfb, 0xfa, 0xfe, 0xfd, 0xfb, 0xf9, 0xf7,
-		0xf7, 0xf5, 0xf3, 0xfc, 0xfa, 0xf6, 0xf2, 0xee,
-		0xee, 0xea, 0xe6, 0xf8, 0xf4, 0xec, 0xe4, 0xdc,
-		0xd4, 0xcc, 0xc4, 0x24, 0x21, 0x83, 0x22, 0x04,
-		0x83, 0x22, 0xff, 0x01, 0xff, 0x01, 0x00, 0x00,
-		0x00, 0x02, 0x22, 0x32, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
-		0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0xff,
-		0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x83,
-		0x22, 0x8a, 0x01, 0x20, 0x01, 0x0b, 0xea, 0xf3,
-		0xf9, 0x8b, 0x7e, 0x6b, 0xd5, 0x01, 0x00, 0x01,
-		0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x01, 0x3a, 0x01, 0x38, 0x01, 0x4b, 0x01,
-		0x49, 0x01, 0x5c, 0x01, 0x5a, 0x01, 0x08, 0x08,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x01, 0x15, 0x24, 0x48, 0x83, 0x22, 0x04,
-		0x83, 0x22, 0x00, 0x01, 0x02, 0x03, 0x04, 0x06,
-		0x07, 0x08, 0x00, 0x03, 0x05, 0x07, 0x09, 0x0d,
-		0x0f, 0x81, 0x00, 0x06, 0x0a, 0x0e, 0x82, 0x8a,
-		0x8e, 0x22, 0x00, 0x0c, 0x84, 0x8c, 0x24, 0x2c,
-		0xa4, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0xaa, 0x35, 0xab, 0x36,
-		0x02, 0x27, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
-		0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x25,
-		0x03, 0x03, 0x2b, 0x03, 0x00, 0x03, 0x00, 0x03,
-		0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
-		0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
-		0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x83, 0x22,
-		0x00, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02,
-		0x2b, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02,
-		0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x01,
-		0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
-		0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
-		0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02,
-		0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02,
-		0x21, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00,
-		0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x21,
-		0x01, 0x02, 0x21, 0x02, 0x02, 0x02, 0x00, 0x02,
-		0x02, 0x02, 0x02, 0x02, 0x02, 0x20, 0xb5, 0x05,
-		0x79, 0x0f, 0xf3, 0xc2, 0x11, 0x22, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5,
-		0x15, 0xa2, 0xe0, 0xb0, 0xe6, 0x50, 0x01, 0x22,
-		0xa2, 0xe1, 0xb0, 0xe7, 0x22, 0x02, 0x00};
-		static unsigned char	Data0485_0C[] = {
-		0x02, 0x27, 0x69};
-		static unsigned char	Data0485_66[] = {
-		0x02, 0x25, 0x47, 0x02, 0x25, 0x60};
-		static unsigned char	Data0485_60[] = {
-		0x02, 0x22, 0x7e};
-		static unsigned char	Data0485_99[] = {
-		0xc2, 0x53, 0x02, 0x12, 0x86};
-		static unsigned char	Data0485_9E[] = {
-		0x70, 0xf9, 0x22};
-#ifdef OOKUBO_ORIGINAL
-		static unsigned char	Data0485_36[] = {
-		0x78, 0x00, 0xf2, 0xc2, 0x53, 0x74, 0x86, 0xc0,
-		0xe0, 0x74, 0x12, 0xc0,	0xe0, 0x32};
-#endif /* OOKUBO_ORIGINAL */
--- diff/sound/isa/cs423x/sound_pc9800.h	2004-05-19 22:13:20.000000000 +0100
+++ source/sound/isa/cs423x/sound_pc9800.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-#ifndef _SOUND_PC9800_H_
-#define _SOUND_PC9800_H_
-
-#include <asm/io.h>
-
-#define PC9800_SOUND_IO_ID	0xa460
-
-/* Sound Functions ID. */
-#define PC9800_SOUND_ID()	((inb(PC9800_SOUND_IO_ID) >> 4) & 0x0f)
-
-#define PC9800_SOUND_ID_DO	0x0	/* PC-98DO+ Internal */
-#define PC9800_SOUND_ID_GS	0x1	/* PC-98GS Internal */
-#define PC9800_SOUND_ID_73	0x2	/* PC-9801-73 (base 0x18x) */
-#define PC9800_SOUND_ID_73A	0x3	/* PC-9801-73/76 (base 0x28x) */
-#define PC9800_SOUND_ID_86	0x4	/* PC-9801-86 and compatible (base 0x18x) */
-#define PC9800_SOUND_ID_86A	0x5	/* PC-9801-86 (base 0x28x) */
-#define PC9800_SOUND_ID_NF	0x6	/* PC-9821Nf/Np Internal */
-#define PC9800_SOUND_ID_XMATE	0x7	/* X-Mate Internal and compatible */
-#define PC9800_SOUND_ID_118	0x8	/* PC-9801-118 and compatible(CanBe Internal, etc.) */
-
-#define PC9800_SOUND_ID_UNKNOWN	0xf	/* Unknown (No Sound System or PC-9801-26) */
-
-#endif
